wdpapi
Version:
51WORLD WdpApi is a set of programming interfaces developed by JavaScript that is responsible for negotiating between web pages and cloud rendering platforms. Supported by 51Cloud rendering platform, it enables the users to create any HTML5 UI element on
24 lines • 1.22 MB
JavaScript
var WdpApi=function(e){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function t(e,t,o,i){return new(o||(o=Promise))(function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var o=function e(){if(this instanceof e){var o=[null];return o.push.apply(o,arguments),new(Function.bind.apply(t,o))}return t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),o}var r,a,s={exports:{}};
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/r=s,a=s.exports,function(){var e,t="Expected a function",i="__lodash_hash_undefined__",n="__lodash_placeholder__",s=16,l=32,d=64,c=128,u=256,v=1/0,h=9007199254740991,m=NaN,g=4294967295,f=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",d],["rearg",u]],y="[object Arguments]",b="[object Array]",p="[object Boolean]",E="[object Date]",w="[object Error]",I="[object Function]",j="[object GeneratorFunction]",S="[object Map]",C="[object Number]",G="[object Object]",O="[object Promise]",$="[object RegExp]",T="[object Set]",M="[object String]",A="[object Symbol]",D="[object WeakMap]",R="[object ArrayBuffer]",x="[object DataView]",N="[object Float32Array]",L="[object Float64Array]",V="[object Int8Array]",P="[object Int16Array]",k="[object Int32Array]",_="[object Uint8Array]",F="[object Uint8ClampedArray]",U="[object Uint16Array]",B="[object Uint32Array]",q=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,Y=RegExp(H.source),Q=RegExp(Z.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(ie.source),re=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,ve=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,pe=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Ie=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Ge="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",$e="\\ufe0e\\ufe0f",Te="\\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",Me="['’]",Ae="["+je+"]",De="["+Te+"]",Re="["+Se+"]",xe="\\d+",Ne="["+Ce+"]",Le="["+Ge+"]",Ve="[^"+je+Te+xe+Ce+Ge+Oe+"]",Pe="\\ud83c[\\udffb-\\udfff]",ke="[^"+je+"]",_e="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Oe+"]",Be="\\u200d",qe="(?:"+Le+"|"+Ve+")",ze="(?:"+Ue+"|"+Ve+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+Re+"|"+Pe+")?",Ye="["+$e+"]?",Qe=Ye+Ze+"(?:"+Be+"(?:"+[ke,_e,Fe].join("|")+")"+Ye+Ze+")*",Je="(?:"+[Ne,_e,Fe].join("|")+")"+Qe,Xe="(?:"+[ke+Re+"?",Re,_e,Fe,Ae].join("|")+")",Ke=RegExp(Me,"g"),et=RegExp(Re,"g"),tt=RegExp(Pe+"(?="+Pe+")|"+Xe+Qe,"g"),ot=RegExp([Ue+"?"+Le+"+"+We+"(?="+[De,Ue,"$"].join("|")+")",ze+"+"+He+"(?="+[De,Ue+qe,"$"].join("|")+")",Ue+"?"+qe+"+"+We,Ue+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xe,Je].join("|"),"g"),it=RegExp("["+Be+je+Se+$e+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],at=-1,st={};st[N]=st[L]=st[V]=st[P]=st[k]=st[_]=st[F]=st[U]=st[B]=!0,st[y]=st[b]=st[R]=st[p]=st[x]=st[E]=st[w]=st[I]=st[S]=st[C]=st[G]=st[$]=st[T]=st[M]=st[D]=!1;var lt={};lt[y]=lt[b]=lt[R]=lt[x]=lt[p]=lt[E]=lt[N]=lt[L]=lt[V]=lt[P]=lt[k]=lt[S]=lt[C]=lt[G]=lt[$]=lt[T]=lt[M]=lt[A]=lt[_]=lt[F]=lt[U]=lt[B]=!0,lt[w]=lt[I]=lt[D]=!1;var dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ut=parseInt,vt="object"==typeof o&&o&&o.Object===Object&&o,ht="object"==typeof self&&self&&self.Object===Object&&self,mt=vt||ht||Function("return this")(),gt=a&&!a.nodeType&&a,ft=gt&&r&&!r.nodeType&&r,yt=ft&&ft.exports===gt,bt=yt&&vt.process,pt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(e){}}(),Et=pt&&pt.isArrayBuffer,wt=pt&&pt.isDate,It=pt&&pt.isMap,jt=pt&&pt.isRegExp,St=pt&&pt.isSet,Ct=pt&&pt.isTypedArray;function Gt(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}function Ot(e,t,o,i){for(var n=-1,r=null==e?0:e.length;++n<r;){var a=e[n];t(i,a,o(a),e)}return i}function $t(e,t){for(var o=-1,i=null==e?0:e.length;++o<i&&!1!==t(e[o],o,e););return e}function Tt(e,t){for(var o=null==e?0:e.length;o--&&!1!==t(e[o],o,e););return e}function Mt(e,t){for(var o=-1,i=null==e?0:e.length;++o<i;)if(!t(e[o],o,e))return!1;return!0}function At(e,t){for(var o=-1,i=null==e?0:e.length,n=0,r=[];++o<i;){var a=e[o];t(a,o,e)&&(r[n++]=a)}return r}function Dt(e,t){return!(null==e||!e.length)&&Ut(e,t,0)>-1}function Rt(e,t,o){for(var i=-1,n=null==e?0:e.length;++i<n;)if(o(t,e[i]))return!0;return!1}function xt(e,t){for(var o=-1,i=null==e?0:e.length,n=Array(i);++o<i;)n[o]=t(e[o],o,e);return n}function Nt(e,t){for(var o=-1,i=t.length,n=e.length;++o<i;)e[n+o]=t[o];return e}function Lt(e,t,o,i){var n=-1,r=null==e?0:e.length;for(i&&r&&(o=e[++n]);++n<r;)o=t(o,e[n],n,e);return o}function Vt(e,t,o,i){var n=null==e?0:e.length;for(i&&n&&(o=e[--n]);n--;)o=t(o,e[n],n,e);return o}function Pt(e,t){for(var o=-1,i=null==e?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1}var kt=Wt("length");function _t(e,t,o){var i;return o(e,function(e,o,n){if(t(e,o,n))return i=o,!1}),i}function Ft(e,t,o,i){for(var n=e.length,r=o+(i?1:-1);i?r--:++r<n;)if(t(e[r],r,e))return r;return-1}function Ut(e,t,o){return t==t?function(e,t,o){for(var i=o-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}(e,t,o):Ft(e,qt,o)}function Bt(e,t,o,i){for(var n=o-1,r=e.length;++n<r;)if(i(e[n],t))return n;return-1}function qt(e){return e!=e}function zt(e,t){var o=null==e?0:e.length;return o?Yt(e,t)/o:m}function Wt(t){return function(o){return null==o?e:o[t]}}function Ht(t){return function(o){return null==t?e:t[o]}}function Zt(e,t,o,i,n){return n(e,function(e,n,r){o=i?(i=!1,e):t(o,e,n,r)}),o}function Yt(t,o){for(var i,n=-1,r=t.length;++n<r;){var a=o(t[n]);a!==e&&(i=i===e?a:i+a)}return i}function Qt(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i}function Jt(e){return e?e.slice(0,go(e)+1).replace(re,""):e}function Xt(e){return function(t){return e(t)}}function Kt(e,t){return xt(t,function(t){return e[t]})}function eo(e,t){return e.has(t)}function to(e,t){for(var o=-1,i=e.length;++o<i&&Ut(t,e[o],0)>-1;);return o}function oo(e,t){for(var o=e.length;o--&&Ut(t,e[o],0)>-1;);return o}var io=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),no=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function ro(e){return"\\"+dt[e]}function ao(e){return it.test(e)}function so(e){var t=-1,o=Array(e.size);return e.forEach(function(e,i){o[++t]=[i,e]}),o}function lo(e,t){return function(o){return e(t(o))}}function co(e,t){for(var o=-1,i=e.length,r=0,a=[];++o<i;){var s=e[o];s!==t&&s!==n||(e[o]=n,a[r++]=o)}return a}function uo(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=e}),o}function vo(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=[e,e]}),o}function ho(e){return ao(e)?function(e){for(var t=tt.lastIndex=0;tt.test(e);)++t;return t}(e):kt(e)}function mo(e){return ao(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function go(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var fo=Ht({"&":"&","<":"<",">":">",""":'"',"'":"'"}),yo=function o(r){var a,ae=(r=null==r?mt:yo.defaults(mt.Object(),r,yo.pick(mt,rt))).Array,je=r.Date,Se=r.Error,Ce=r.Function,Ge=r.Math,Oe=r.Object,$e=r.RegExp,Te=r.String,Me=r.TypeError,Ae=ae.prototype,De=Ce.prototype,Re=Oe.prototype,xe=r["__core-js_shared__"],Ne=De.toString,Le=Re.hasOwnProperty,Ve=0,Pe=(a=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",ke=Re.toString,_e=Ne.call(Oe),Fe=mt._,Ue=$e("^"+Ne.call(Le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=yt?r.Buffer:e,qe=r.Symbol,ze=r.Uint8Array,We=Be?Be.allocUnsafe:e,He=lo(Oe.getPrototypeOf,Oe),Ze=Oe.create,Ye=Re.propertyIsEnumerable,Qe=Ae.splice,Je=qe?qe.isConcatSpreadable:e,Xe=qe?qe.iterator:e,tt=qe?qe.toStringTag:e,it=function(){try{var e=hr(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),dt=r.clearTimeout!==mt.clearTimeout&&r.clearTimeout,vt=je&&je.now!==mt.Date.now&&je.now,ht=r.setTimeout!==mt.setTimeout&&r.setTimeout,gt=Ge.ceil,ft=Ge.floor,bt=Oe.getOwnPropertySymbols,pt=Be?Be.isBuffer:e,kt=r.isFinite,Ht=Ae.join,bo=lo(Oe.keys,Oe),po=Ge.max,Eo=Ge.min,wo=je.now,Io=r.parseInt,jo=Ge.random,So=Ae.reverse,Co=hr(r,"DataView"),Go=hr(r,"Map"),Oo=hr(r,"Promise"),$o=hr(r,"Set"),To=hr(r,"WeakMap"),Mo=hr(Oe,"create"),Ao=To&&new To,Do={},Ro=kr(Co),xo=kr(Go),No=kr(Oo),Lo=kr($o),Vo=kr(To),Po=qe?qe.prototype:e,ko=Po?Po.valueOf:e,_o=Po?Po.toString:e;function Fo(e){if(os(e)&&!za(e)&&!(e instanceof zo)){if(e instanceof qo)return e;if(Le.call(e,"__wrapped__"))return _r(e)}return new qo(e)}var Uo=function(){function t(){}return function(o){if(!ts(o))return{};if(Ze)return Ze(o);t.prototype=o;var i=new t;return t.prototype=e,i}}();function Bo(){}function qo(t,o){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=e}function zo(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Wo(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}function Ho(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}function Zo(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}function Yo(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new Zo;++t<o;)this.add(e[t])}function Qo(e){var t=this.__data__=new Ho(e);this.size=t.size}function Jo(e,t){var o=za(e),i=!o&&qa(e),n=!o&&!i&&Ya(e),r=!o&&!i&&!n&&cs(e),a=o||i||n||r,s=a?Qt(e.length,Te):[],l=s.length;for(var d in e)!t&&!Le.call(e,d)||a&&("length"==d||n&&("offset"==d||"parent"==d)||r&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Er(d,l))||s.push(d);return s}function Xo(t){var o=t.length;return o?t[Yi(0,o-1)]:e}function Ko(e,t){return Lr(An(e),li(t,0,e.length))}function ei(e){return Lr(An(e))}function ti(t,o,i){(i!==e&&!Fa(t[o],i)||i===e&&!(o in t))&&ai(t,o,i)}function oi(t,o,i){var n=t[o];Le.call(t,o)&&Fa(n,i)&&(i!==e||o in t)||ai(t,o,i)}function ii(e,t){for(var o=e.length;o--;)if(Fa(e[o][0],t))return o;return-1}function ni(e,t,o,i){return hi(e,function(e,n,r){t(i,e,o(e),r)}),i}function ri(e,t){return e&&Dn(t,Ds(t),e)}function ai(e,t,o){"__proto__"==t&&it?it(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function si(t,o){for(var i=-1,n=o.length,r=ae(n),a=null==t;++i<n;)r[i]=a?e:Os(t,o[i]);return r}function li(t,o,i){return t==t&&(i!==e&&(t=t<=i?t:i),o!==e&&(t=t>=o?t:o)),t}function di(t,o,i,n,r,a){var s,l=1&o,d=2&o,c=4&o;if(i&&(s=r?i(t,n,r,a):i(t)),s!==e)return s;if(!ts(t))return t;var u=za(t);if(u){if(s=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&Le.call(e,"index")&&(o.index=e.index,o.input=e.input),o}(t),!l)return An(t,s)}else{var v=fr(t),h=v==I||v==j;if(Ya(t))return Cn(t,l);if(v==G||v==y||h&&!r){if(s=d||h?{}:br(t),!l)return d?function(e,t){return Dn(e,gr(e),t)}(t,function(e,t){return e&&Dn(t,Rs(t),e)}(s,t)):function(e,t){return Dn(e,mr(e),t)}(t,ri(s,t))}else{if(!lt[v])return r?t:{};s=function(e,t,o){var i,n=e.constructor;switch(t){case R:return Gn(e);case p:case E:return new n(+e);case x:return function(e,t){var o=t?Gn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}(e,o);case N:case L:case V:case P:case k:case _:case F:case U:case B:return On(e,o);case S:return new n;case C:case M:return new n(e);case $:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new n;case A:return i=e,ko?Oe(ko.call(i)):{}}}(t,v,l)}}a||(a=new Qo);var m=a.get(t);if(m)return m;a.set(t,s),ss(t)?t.forEach(function(e){s.add(di(e,o,i,e,t,a))}):is(t)&&t.forEach(function(e,n){s.set(n,di(e,o,i,n,t,a))});var g=u?e:(c?d?ar:rr:d?Rs:Ds)(t);return $t(g||t,function(e,n){g&&(e=t[n=e]),oi(s,n,di(e,o,i,n,t,a))}),s}function ci(t,o,i){var n=i.length;if(null==t)return!n;for(t=Oe(t);n--;){var r=i[n],a=o[r],s=t[r];if(s===e&&!(r in t)||!a(s))return!1}return!0}function ui(o,i,n){if("function"!=typeof o)throw new Me(t);return Dr(function(){o.apply(e,n)},i)}function vi(e,t,o,i){var n=-1,r=Dt,a=!0,s=e.length,l=[],d=t.length;if(!s)return l;o&&(t=xt(t,Xt(o))),i?(r=Rt,a=!1):t.length>=200&&(r=eo,a=!1,t=new Yo(t));e:for(;++n<s;){var c=e[n],u=null==o?c:o(c);if(c=i||0!==c?c:0,a&&u==u){for(var v=d;v--;)if(t[v]===u)continue e;l.push(c)}else r(t,u,i)||l.push(c)}return l}Fo.templateSettings={escape:J,evaluate:X,interpolate:K,variable:"",imports:{_:Fo}},Fo.prototype=Bo.prototype,Fo.prototype.constructor=Fo,qo.prototype=Uo(Bo.prototype),qo.prototype.constructor=qo,zo.prototype=Uo(Bo.prototype),zo.prototype.constructor=zo,Wo.prototype.clear=function(){this.__data__=Mo?Mo(null):{},this.size=0},Wo.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wo.prototype.get=function(t){var o=this.__data__;if(Mo){var n=o[t];return n===i?e:n}return Le.call(o,t)?o[t]:e},Wo.prototype.has=function(t){var o=this.__data__;return Mo?o[t]!==e:Le.call(o,t)},Wo.prototype.set=function(t,o){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Mo&&o===e?i:o,this},Ho.prototype.clear=function(){this.__data__=[],this.size=0},Ho.prototype.delete=function(e){var t=this.__data__,o=ii(t,e);return!(o<0||(o==t.length-1?t.pop():Qe.call(t,o,1),--this.size,0))},Ho.prototype.get=function(t){var o=this.__data__,i=ii(o,t);return i<0?e:o[i][1]},Ho.prototype.has=function(e){return ii(this.__data__,e)>-1},Ho.prototype.set=function(e,t){var o=this.__data__,i=ii(o,e);return i<0?(++this.size,o.push([e,t])):o[i][1]=t,this},Zo.prototype.clear=function(){this.size=0,this.__data__={hash:new Wo,map:new(Go||Ho),string:new Wo}},Zo.prototype.delete=function(e){var t=ur(this,e).delete(e);return this.size-=t?1:0,t},Zo.prototype.get=function(e){return ur(this,e).get(e)},Zo.prototype.has=function(e){return ur(this,e).has(e)},Zo.prototype.set=function(e,t){var o=ur(this,e),i=o.size;return o.set(e,t),this.size+=o.size==i?0:1,this},Yo.prototype.add=Yo.prototype.push=function(e){return this.__data__.set(e,i),this},Yo.prototype.has=function(e){return this.__data__.has(e)},Qo.prototype.clear=function(){this.__data__=new Ho,this.size=0},Qo.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},Qo.prototype.get=function(e){return this.__data__.get(e)},Qo.prototype.has=function(e){return this.__data__.has(e)},Qo.prototype.set=function(e,t){var o=this.__data__;if(o instanceof Ho){var i=o.__data__;if(!Go||i.length<199)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new Zo(i)}return o.set(e,t),this.size=o.size,this};var hi=Nn(wi),mi=Nn(Ii,!0);function gi(e,t){var o=!0;return hi(e,function(e,i,n){return o=!!t(e,i,n)}),o}function fi(t,o,i){for(var n=-1,r=t.length;++n<r;){var a=t[n],s=o(a);if(null!=s&&(l===e?s==s&&!ds(s):i(s,l)))var l=s,d=a}return d}function yi(e,t){var o=[];return hi(e,function(e,i,n){t(e,i,n)&&o.push(e)}),o}function bi(e,t,o,i,n){var r=-1,a=e.length;for(o||(o=pr),n||(n=[]);++r<a;){var s=e[r];t>0&&o(s)?t>1?bi(s,t-1,o,i,n):Nt(n,s):i||(n[n.length]=s)}return n}var pi=Ln(),Ei=Ln(!0);function wi(e,t){return e&&pi(e,t,Ds)}function Ii(e,t){return e&&Ei(e,t,Ds)}function ji(e,t){return At(t,function(t){return Xa(e[t])})}function Si(t,o){for(var i=0,n=(o=wn(o,t)).length;null!=t&&i<n;)t=t[Pr(o[i++])];return i&&i==n?t:e}function Ci(e,t,o){var i=t(e);return za(e)?i:Nt(i,o(e))}function Gi(t){return null==t?t===e?"[object Undefined]":"[object Null]":tt&&tt in Oe(t)?function(t){var o=Le.call(t,tt),i=t[tt];try{t[tt]=e;var n=!0}catch(e){}var r=ke.call(t);return n&&(o?t[tt]=i:delete t[tt]),r}(t):function(e){return ke.call(e)}(t)}function Oi(e,t){return e>t}function $i(e,t){return null!=e&&Le.call(e,t)}function Ti(e,t){return null!=e&&t in Oe(e)}function Mi(t,o,i){for(var n=i?Rt:Dt,r=t[0].length,a=t.length,s=a,l=ae(a),d=1/0,c=[];s--;){var u=t[s];s&&o&&(u=xt(u,Xt(o))),d=Eo(u.length,d),l[s]=!i&&(o||r>=120&&u.length>=120)?new Yo(s&&u):e}u=t[0];var v=-1,h=l[0];e:for(;++v<r&&c.length<d;){var m=u[v],g=o?o(m):m;if(m=i||0!==m?m:0,!(h?eo(h,g):n(c,g,i))){for(s=a;--s;){var f=l[s];if(!(f?eo(f,g):n(t[s],g,i)))continue e}h&&h.push(g),c.push(m)}}return c}function Ai(t,o,i){var n=null==(t=Tr(t,o=wn(o,t)))?t:t[Pr(Jr(o))];return null==n?e:Gt(n,t,i)}function Di(e){return os(e)&&Gi(e)==y}function Ri(t,o,i,n,r){return t===o||(null==t||null==o||!os(t)&&!os(o)?t!=t&&o!=o:function(t,o,i,n,r,a){var s=za(t),l=za(o),d=s?b:fr(t),c=l?b:fr(o),u=(d=d==y?G:d)==G,v=(c=c==y?G:c)==G,h=d==c;if(h&&Ya(t)){if(!Ya(o))return!1;s=!0,u=!1}if(h&&!u)return a||(a=new Qo),s||cs(t)?ir(t,o,i,n,r,a):function(e,t,o,i,n,r,a){switch(o){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!r(new ze(e),new ze(t)));case p:case E:case C:return Fa(+e,+t);case w:return e.name==t.name&&e.message==t.message;case $:case M:return e==t+"";case S:var s=so;case T:var l=1&i;if(s||(s=uo),e.size!=t.size&&!l)return!1;var d=a.get(e);if(d)return d==t;i|=2,a.set(e,t);var c=ir(s(e),s(t),i,n,r,a);return a.delete(e),c;case A:if(ko)return ko.call(e)==ko.call(t)}return!1}(t,o,d,i,n,r,a);if(!(1&i)){var m=u&&Le.call(t,"__wrapped__"),g=v&&Le.call(o,"__wrapped__");if(m||g){var f=m?t.value():t,I=g?o.value():o;return a||(a=new Qo),r(f,I,i,n,a)}}return!!h&&(a||(a=new Qo),function(t,o,i,n,r,a){var s=1&i,l=rr(t),d=l.length,c=rr(o),u=c.length;if(d!=u&&!s)return!1;for(var v=d;v--;){var h=l[v];if(!(s?h in o:Le.call(o,h)))return!1}var m=a.get(t),g=a.get(o);if(m&&g)return m==o&&g==t;var f=!0;a.set(t,o),a.set(o,t);for(var y=s;++v<d;){var b=t[h=l[v]],p=o[h];if(n)var E=s?n(p,b,h,o,t,a):n(b,p,h,t,o,a);if(!(E===e?b===p||r(b,p,i,n,a):E)){f=!1;break}y||(y="constructor"==h)}if(f&&!y){var w=t.constructor,I=o.constructor;w==I||!("constructor"in t)||!("constructor"in o)||"function"==typeof w&&w instanceof w&&"function"==typeof I&&I instanceof I||(f=!1)}return a.delete(t),a.delete(o),f}(t,o,i,n,r,a))}(t,o,i,n,Ri,r))}function xi(t,o,i,n){var r=i.length,a=r,s=!n;if(null==t)return!a;for(t=Oe(t);r--;){var l=i[r];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++r<a;){var d=(l=i[r])[0],c=t[d],u=l[1];if(s&&l[2]){if(c===e&&!(d in t))return!1}else{var v=new Qo;if(n)var h=n(c,u,d,t,o,v);if(!(h===e?Ri(u,c,3,n,v):h))return!1}}return!0}function Ni(e){return!(!ts(e)||(t=e,Pe&&Pe in t))&&(Xa(e)?Ue:ye).test(kr(e));var t}function Li(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?za(e)?Ui(e[0],e[1]):Fi(e):hl(e)}function Vi(e){if(!Cr(e))return bo(e);var t=[];for(var o in Oe(e))Le.call(e,o)&&"constructor"!=o&&t.push(o);return t}function Pi(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var o in Oe(e))t.push(o);return t}(e);var t=Cr(e),o=[];for(var i in e)("constructor"!=i||!t&&Le.call(e,i))&&o.push(i);return o}function ki(e,t){return e<t}function _i(e,t){var o=-1,i=Ha(e)?ae(e.length):[];return hi(e,function(e,n,r){i[++o]=t(e,n,r)}),i}function Fi(e){var t=vr(e);return 1==t.length&&t[0][2]?Or(t[0][0],t[0][1]):function(o){return o===e||xi(o,e,t)}}function Ui(t,o){return Ir(t)&&Gr(o)?Or(Pr(t),o):function(i){var n=Os(i,t);return n===e&&n===o?$s(i,t):Ri(o,n,3)}}function Bi(t,o,i,n,r){t!==o&&pi(o,function(a,s){if(r||(r=new Qo),ts(a))!function(t,o,i,n,r,a,s){var l=Mr(t,i),d=Mr(o,i),c=s.get(d);if(c)ti(t,i,c);else{var u=a?a(l,d,i+"",t,o,s):e,v=u===e;if(v){var h=za(d),m=!h&&Ya(d),g=!h&&!m&&cs(d);u=d,h||m||g?za(l)?u=l:Za(l)?u=An(l):m?(v=!1,u=Cn(d,!0)):g?(v=!1,u=On(d,!0)):u=[]:rs(d)||qa(d)?(u=l,qa(l)?u=bs(l):ts(l)&&!Xa(l)||(u=br(d))):v=!1}v&&(s.set(d,u),r(u,d,n,a,s),s.delete(d)),ti(t,i,u)}}(t,o,s,i,Bi,n,r);else{var l=n?n(Mr(t,s),a,s+"",t,o,r):e;l===e&&(l=a),ti(t,s,l)}},Rs)}function qi(t,o){var i=t.length;if(i)return Er(o+=o<0?i:0,i)?t[o]:e}function zi(e,t,o){t=t.length?xt(t,function(e){return za(e)?function(t){return Si(t,1===e.length?e[0]:e)}:e}):[nl];var i=-1;t=xt(t,Xt(cr()));var n=_i(e,function(e,o,n){var r=xt(t,function(t){return t(e)});return{criteria:r,index:++i,value:e}});return function(e,t){var o=e.length;for(e.sort(t);o--;)e[o]=e[o].value;return e}(n,function(e,t){return function(e,t,o){for(var i=-1,n=e.criteria,r=t.criteria,a=n.length,s=o.length;++i<a;){var l=$n(n[i],r[i]);if(l)return i>=s?l:l*("desc"==o[i]?-1:1)}return e.index-t.index}(e,t,o)})}function Wi(e,t,o){for(var i=-1,n=t.length,r={};++i<n;){var a=t[i],s=Si(e,a);o(s,a)&&en(r,wn(a,e),s)}return r}function Hi(e,t,o,i){var n=i?Bt:Ut,r=-1,a=t.length,s=e;for(e===t&&(t=An(t)),o&&(s=xt(e,Xt(o)));++r<a;)for(var l=0,d=t[r],c=o?o(d):d;(l=n(s,c,l,i))>-1;)s!==e&&Qe.call(s,l,1),Qe.call(e,l,1);return e}function Zi(e,t){for(var o=e?t.length:0,i=o-1;o--;){var n=t[o];if(o==i||n!==r){var r=n;Er(n)?Qe.call(e,n,1):hn(e,n)}}return e}function Yi(e,t){return e+ft(jo()*(t-e+1))}function Qi(e,t){var o="";if(!e||t<1||t>h)return o;do{t%2&&(o+=e),(t=ft(t/2))&&(e+=e)}while(t);return o}function Ji(e,t){return Rr($r(e,t,nl),e+"")}function Xi(e){return Xo(Fs(e))}function Ki(e,t){var o=Fs(e);return Lr(o,li(t,0,o.length))}function en(t,o,i,n){if(!ts(t))return t;for(var r=-1,a=(o=wn(o,t)).length,s=a-1,l=t;null!=l&&++r<a;){var d=Pr(o[r]),c=i;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(r!=s){var u=l[d];(c=n?n(u,d,l):e)===e&&(c=ts(u)?u:Er(o[r+1])?[]:{})}oi(l,d,c),l=l[d]}return t}var tn=Ao?function(e,t){return Ao.set(e,t),e}:nl,on=it?function(e,t){return it(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:nl;function nn(e){return Lr(Fs(e))}function rn(e,t,o){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(o=o>n?n:o)<0&&(o+=n),n=t>o?0:o-t>>>0,t>>>=0;for(var r=ae(n);++i<n;)r[i]=e[i+t];return r}function an(e,t){var o;return hi(e,function(e,i,n){return!(o=t(e,i,n))}),!!o}function sn(e,t,o){var i=0,n=null==e?i:e.length;if("number"==typeof t&&t==t&&n<=2147483647){for(;i<n;){var r=i+n>>>1,a=e[r];null!==a&&!ds(a)&&(o?a<=t:a<t)?i=r+1:n=r}return n}return ln(e,t,nl,o)}function ln(t,o,i,n){var r=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(o=i(o))!=o,l=null===o,d=ds(o),c=o===e;r<a;){var u=ft((r+a)/2),v=i(t[u]),h=v!==e,m=null===v,g=v==v,f=ds(v);if(s)var y=n||g;else y=c?g&&(n||h):l?g&&h&&(n||!m):d?g&&h&&!m&&(n||!f):!m&&!f&&(n?v<=o:v<o);y?r=u+1:a=u}return Eo(a,4294967294)}function dn(e,t){for(var o=-1,i=e.length,n=0,r=[];++o<i;){var a=e[o],s=t?t(a):a;if(!o||!Fa(s,l)){var l=s;r[n++]=0===a?0:a}}return r}function cn(e){return"number"==typeof e?e:ds(e)?m:+e}function un(e){if("string"==typeof e)return e;if(za(e))return xt(e,un)+"";if(ds(e))return _o?_o.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function vn(e,t,o){var i=-1,n=Dt,r=e.length,a=!0,s=[],l=s;if(o)a=!1,n=Rt;else if(r>=200){var d=t?null:Jn(e);if(d)return uo(d);a=!1,n=eo,l=new Yo}else l=t?[]:s;e:for(;++i<r;){var c=e[i],u=t?t(c):c;if(c=o||0!==c?c:0,a&&u==u){for(var v=l.length;v--;)if(l[v]===u)continue e;t&&l.push(u),s.push(c)}else n(l,u,o)||(l!==s&&l.push(u),s.push(c))}return s}function hn(e,t){return null==(e=Tr(e,t=wn(t,e)))||delete e[Pr(Jr(t))]}function mn(e,t,o,i){return en(e,t,o(Si(e,t)),i)}function gn(e,t,o,i){for(var n=e.length,r=i?n:-1;(i?r--:++r<n)&&t(e[r],r,e););return o?rn(e,i?0:r,i?r+1:n):rn(e,i?r+1:0,i?n:r)}function fn(e,t){var o=e;return o instanceof zo&&(o=o.value()),Lt(t,function(e,t){return t.func.apply(t.thisArg,Nt([e],t.args))},o)}function yn(e,t,o){var i=e.length;if(i<2)return i?vn(e[0]):[];for(var n=-1,r=ae(i);++n<i;)for(var a=e[n],s=-1;++s<i;)s!=n&&(r[n]=vi(r[n]||a,e[s],t,o));return vn(bi(r,1),t,o)}function bn(t,o,i){for(var n=-1,r=t.length,a=o.length,s={};++n<r;){var l=n<a?o[n]:e;i(s,t[n],l)}return s}function pn(e){return Za(e)?e:[]}function En(e){return"function"==typeof e?e:nl}function wn(e,t){return za(e)?e:Ir(e,t)?[e]:Vr(ps(e))}var In=Ji;function jn(t,o,i){var n=t.length;return i=i===e?n:i,!o&&i>=n?t:rn(t,o,i)}var Sn=dt||function(e){return mt.clearTimeout(e)};function Cn(e,t){if(t)return e.slice();var o=e.length,i=We?We(o):new e.constructor(o);return e.copy(i),i}function Gn(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function On(e,t){var o=t?Gn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function $n(t,o){if(t!==o){var i=t!==e,n=null===t,r=t==t,a=ds(t),s=o!==e,l=null===o,d=o==o,c=ds(o);if(!l&&!c&&!a&&t>o||a&&s&&d&&!l&&!c||n&&s&&d||!i&&d||!r)return 1;if(!n&&!a&&!c&&t<o||c&&i&&r&&!n&&!a||l&&i&&r||!s&&r||!d)return-1}return 0}function Tn(e,t,o,i){for(var n=-1,r=e.length,a=o.length,s=-1,l=t.length,d=po(r-a,0),c=ae(l+d),u=!i;++s<l;)c[s]=t[s];for(;++n<a;)(u||n<r)&&(c[o[n]]=e[n]);for(;d--;)c[s++]=e[n++];return c}function Mn(e,t,o,i){for(var n=-1,r=e.length,a=-1,s=o.length,l=-1,d=t.length,c=po(r-s,0),u=ae(c+d),v=!i;++n<c;)u[n]=e[n];for(var h=n;++l<d;)u[h+l]=t[l];for(;++a<s;)(v||n<r)&&(u[h+o[a]]=e[n++]);return u}function An(e,t){var o=-1,i=e.length;for(t||(t=ae(i));++o<i;)t[o]=e[o];return t}function Dn(t,o,i,n){var r=!i;i||(i={});for(var a=-1,s=o.length;++a<s;){var l=o[a],d=n?n(i[l],t[l],l,i,t):e;d===e&&(d=t[l]),r?ai(i,l,d):oi(i,l,d)}return i}function Rn(e,t){return function(o,i){var n=za(o)?Ot:ni,r=t?t():{};return n(o,e,cr(i,2),r)}}function xn(t){return Ji(function(o,i){var n=-1,r=i.length,a=r>1?i[r-1]:e,s=r>2?i[2]:e;for(a=t.length>3&&"function"==typeof a?(r--,a):e,s&&wr(i[0],i[1],s)&&(a=r<3?e:a,r=1),o=Oe(o);++n<r;){var l=i[n];l&&t(o,l,n,a)}return o})}function Nn(e,t){return function(o,i){if(null==o)return o;if(!Ha(o))return e(o,i);for(var n=o.length,r=t?n:-1,a=Oe(o);(t?r--:++r<n)&&!1!==i(a[r],r,a););return o}}function Ln(e){return function(t,o,i){for(var n=-1,r=Oe(t),a=i(t),s=a.length;s--;){var l=a[e?s:++n];if(!1===o(r[l],l,r))break}return t}}function Vn(t){return function(o){var i=ao(o=ps(o))?mo(o):e,n=i?i[0]:o.charAt(0),r=i?jn(i,1).join(""):o.slice(1);return n[t]()+r}}function Pn(e){return function(t){return Lt(Xs(qs(t).replace(Ke,"")),e,"")}}function kn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var o=Uo(e.prototype),i=e.apply(o,t);return ts(i)?i:o}}function _n(t){return function(o,i,n){var r=Oe(o);if(!Ha(o)){var a=cr(i,3);o=Ds(o),i=function(e){return a(r[e],e,r)}}var s=t(o,i,n);return s>-1?r[a?o[s]:s]:e}}function Fn(o){return nr(function(i){var n=i.length,r=n,a=qo.prototype.thru;for(o&&i.reverse();r--;){var s=i[r];if("function"!=typeof s)throw new Me(t);if(a&&!l&&"wrapper"==lr(s))var l=new qo([],!0)}for(r=l?r:n;++r<n;){var d=lr(s=i[r]),c="wrapper"==d?sr(s):e;l=c&&jr(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[lr(c[0])].apply(l,c[3]):1==s.length&&jr(s)?l[d]():l.thru(s)}return function(){var e=arguments,t=e[0];if(l&&1==e.length&&za(t))return l.plant(t).value();for(var o=0,r=n?i[o].apply(this,e):t;++o<n;)r=i[o].call(this,r);return r}})}function Un(t,o,i,n,r,a,s,l,d,u){var v=o&c,h=1&o,m=2&o,g=24&o,f=512&o,y=m?e:kn(t);return function c(){for(var b=arguments.length,p=ae(b),E=b;E--;)p[E]=arguments[E];if(g)var w=dr(c),I=function(e,t){for(var o=e.length,i=0;o--;)e[o]===t&&++i;return i}(p,w);if(n&&(p=Tn(p,n,r,g)),a&&(p=Mn(p,a,s,g)),b-=I,g&&b<u){var j=co(p,w);return Yn(t,o,Un,c.placeholder,i,p,j,l,d,u-b)}var S=h?i:this,C=m?S[t]:t;return b=p.length,l?p=function(t,o){for(var i=t.length,n=Eo(o.length,i),r=An(t);n--;){var a=o[n];t[n]=Er(a,i)?r[a]:e}return t}(p,l):f&&b>1&&p.reverse(),v&&d<b&&(p.length=d),this&&this!==mt&&this instanceof c&&(C=y||kn(C)),C.apply(S,p)}}function Bn(e,t){return function(o,i){return function(e,t,o,i){return wi(e,function(e,n,r){t(i,o(e),n,r)}),i}(o,e,t(i),{})}}function qn(t,o){return function(i,n){var r;if(i===e&&n===e)return o;if(i!==e&&(r=i),n!==e){if(r===e)return n;"string"==typeof i||"string"==typeof n?(i=un(i),n=un(n)):(i=cn(i),n=cn(n)),r=t(i,n)}return r}}function zn(e){return nr(function(t){return t=xt(t,Xt(cr())),Ji(function(o){var i=this;return e(t,function(e){return Gt(e,i,o)})})})}function Wn(t,o){var i=(o=o===e?" ":un(o)).length;if(i<2)return i?Qi(o,t):o;var n=Qi(o,gt(t/ho(o)));return ao(o)?jn(mo(n),0,t).join(""):n.slice(0,t)}function Hn(t){return function(o,i,n){return n&&"number"!=typeof n&&wr(o,i,n)&&(i=n=e),o=ms(o),i===e?(i=o,o=0):i=ms(i),function(e,t,o,i){for(var n=-1,r=po(gt((t-e)/(o||1)),0),a=ae(r);r--;)a[i?r:++n]=e,e+=o;return a}(o,i,n=n===e?o<i?1:-1:ms(n),t)}}function Zn(e){return function(t,o){return"string"==typeof t&&"string"==typeof o||(t=ys(t),o=ys(o)),e(t,o)}}function Yn(t,o,i,n,r,a,s,c,u,v){var h=8&o;o|=h?l:d,4&(o&=~(h?d:l))||(o&=-4);var m=[t,o,r,h?a:e,h?s:e,h?e:a,h?e:s,c,u,v],g=i.apply(e,m);return jr(t)&&Ar(g,m),g.placeholder=n,xr(g,t,o)}function Qn(e){var t=Ge[e];return function(e,o){if(e=ys(e),(o=null==o?0:Eo(gs(o),292))&&kt(e)){var i=(ps(e)+"e").split("e");return+((i=(ps(t(i[0]+"e"+(+i[1]+o)))+"e").split("e"))[0]+"e"+(+i[1]-o))}return t(e)}}var Jn=$o&&1/uo(new $o([,-0]))[1]==v?function(e){return new $o(e)}:dl;function Xn(e){return function(t){var o=fr(t);return o==S?so(t):o==T?vo(t):function(e,t){return xt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Kn(o,i,r,a,v,h,m,g){var f=2&i;if(!f&&"function"!=typeof o)throw new Me(t);var y=a?a.length:0;if(y||(i&=-97,a=v=e),m=m===e?m:po(gs(m),0),g=g===e?g:gs(g),y-=v?v.length:0,i&d){var b=a,p=v;a=v=e}var E=f?e:sr(o),w=[o,i,r,a,v,b,p,h,m,g];if(E&&function(e,t){var o=e[1],i=t[1],r=o|i,a=r<131,s=i==c&&8==o||i==c&&o==u&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==o;if(!a&&!s)return e;1&i&&(e[2]=t[2],r|=1&o?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?Tn(d,l,t[4]):l,e[4]=d?co(e[3],n):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Mn(d,l,t[6]):l,e[6]=d?co(e[5],n):t[6]),(l=t[7])&&(e[7]=l),i&c&&(e[8]=null==e[8]?t[8]:Eo(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(w,E),o=w[0],i=w[1],r=w[2],a=w[3],v=w[4],!(g=w[9]=w[9]===e?f?0:o.length:po(w[9]-y,0))&&24&i&&(i&=-25),i&&1!=i)I=8==i||i==s?function(t,o,i){var n=kn(t);return function r(){for(var a=arguments.length,s=ae(a),l=a,d=dr(r);l--;)s[l]=arguments[l];var c=a<3&&s[0]!==d&&s[a-1]!==d?[]:co(s,d);return(a-=c.length)<i?Yn(t,o,Un,r.placeholder,e,s,c,e,e,i-a):Gt(this&&this!==mt&&this instanceof r?n:t,this,s)}}(o,i,g):i!=l&&33!=i||v.length?Un.apply(e,w):function(e,t,o,i){var n=1&t,r=kn(e);return function t(){for(var a=-1,s=arguments.length,l=-1,d=i.length,c=ae(d+s),u=this&&this!==mt&&this instanceof t?r:e;++l<d;)c[l]=i[l];for(;s--;)c[l++]=arguments[++a];return Gt(u,n?o:this,c)}}(o,i,r,a);else var I=function(e,t,o){var i=1&t,n=kn(e);return function t(){return(this&&this!==mt&&this instanceof t?n:e).apply(i?o:this,arguments)}}(o,i,r);return xr((E?tn:Ar)(I,w),o,i)}function er(t,o,i,n){return t===e||Fa(t,Re[i])&&!Le.call(n,i)?o:t}function tr(t,o,i,n,r,a){return ts(t)&&ts(o)&&(a.set(o,t),Bi(t,o,e,tr,a),a.delete(o)),t}function or(t){return rs(t)?e:t}function ir(t,o,i,n,r,a){var s=1&i,l=t.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var c=a.get(t),u=a.get(o);if(c&&u)return c==o&&u==t;var v=-1,h=!0,m=2&i?new Yo:e;for(a.set(t,o),a.set(o,t);++v<l;){var g=t[v],f=o[v];if(n)var y=s?n(f,g,v,o,t,a):n(g,f,v,t,o,a);if(y!==e){if(y)continue;h=!1;break}if(m){if(!Pt(o,function(e,t){if(!eo(m,t)&&(g===e||r(g,e,i,n,a)))return m.push(t)})){h=!1;break}}else if(g!==f&&!r(g,f,i,n,a)){h=!1;break}}return a.delete(t),a.delete(o),h}function nr(t){return Rr($r(t,e,Wr),t+"")}function rr(e){return Ci(e,Ds,mr)}function ar(e){return Ci(e,Rs,gr)}var sr=Ao?function(e){return Ao.get(e)}:dl;function lr(e){for(var t=e.name+"",o=Do[t],i=Le.call(Do,t)?o.length:0;i--;){var n=o[i],r=n.func;if(null==r||r==e)return n.name}return t}function dr(e){return(Le.call(Fo,"placeholder")?Fo:e).placeholder}function cr(){var e=Fo.iteratee||rl;return e=e===rl?Li:e,arguments.length?e(arguments[0],arguments[1]):e}function ur(e,t){var o,i,n=e.__data__;return("string"==(i=typeof(o=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==o:null===o)?n["string"==typeof t?"string":"hash"]:n.map}function vr(e){for(var t=Ds(e),o=t.length;o--;){var i=t[o],n=e[i];t[o]=[i,n,Gr(n)]}return t}function hr(t,o){var i=function(t,o){return null==t?e:t[o]}(t,o);return Ni(i)?i:e}var mr=bt?function(e){return null==e?[]:(e=Oe(e),At(bt(e),function(t){return Ye.call(e,t)}))}:fl,gr=bt?function(e){for(var t=[];e;)Nt(t,mr(e)),e=He(e);return t}:fl,fr=Gi;function yr(e,t,o){for(var i=-1,n=(t=wn(t,e)).length,r=!1;++i<n;){var a=Pr(t[i]);if(!(r=null!=e&&o(e,a)))break;e=e[a]}return r||++i!=n?r:!!(n=null==e?0:e.length)&&es(n)&&Er(a,n)&&(za(e)||qa(e))}function br(e){return"function"!=typeof e.constructor||Cr(e)?{}:Uo(He(e))}function pr(e){return za(e)||qa(e)||!!(Je&&e&&e[Je])}function Er(e,t){var o=typeof e;return!!(t=null==t?h:t)&&("number"==o||"symbol"!=o&&pe.test(e))&&e>-1&&e%1==0&&e<t}function wr(e,t,o){if(!ts(o))return!1;var i=typeof t;return!!("number"==i?Ha(o)&&Er(t,o.length):"string"==i&&t in o)&&Fa(o[t],e)}function Ir(e,t){if(za(e))return!1;var o=typeof e;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=e&&!ds(e))||te.test(e)||!ee.test(e)||null!=t&&e in Oe(t)}function jr(e){var t=lr(e),o=Fo[t];if("function"!=typeof o||!(t in zo.prototype))return!1;if(e===o)return!0;var i=sr(o);return!!i&&e===i[0]}(Co&&fr(new Co(new ArrayBuffer(1)))!=x||Go&&fr(new Go)!=S||Oo&&fr(Oo.resolve())!=O||$o&&fr(new $o)!=T||To&&fr(new To)!=D)&&(fr=function(t){var o=Gi(t),i=o==G?t.constructor:e,n=i?kr(i):"";if(n)switch(n){case Ro:return x;case xo:return S;case No:return O;case Lo:return T;case Vo:return D}return o});var Sr=xe?Xa:yl;function Cr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Gr(e){return e==e&&!ts(e)}function Or(t,o){return function(i){return null!=i&&i[t]===o&&(o!==e||t in Oe(i))}}function $r(t,o,i){return o=po(o===e?t.length-1:o,0),function(){for(var e=arguments,n=-1,r=po(e.length-o,0),a=ae(r);++n<r;)a[n]=e[o+n];n=-1;for(var s=ae(o+1);++n<o;)s[n]=e[n];return s[o]=i(a),Gt(t,this,s)}}function Tr(e,t){return t.length<2?e:Si(e,rn(t,0,-1))}function Mr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ar=Nr(tn),Dr=ht||function(e,t){return mt.setTimeout(e,t)},Rr=Nr(on);function xr(e,t,o){var i=t+"";return Rr(e,function(e,t){var o=t.length;if(!o)return e;var i=o-1;return t[i]=(o>1?"& ":"")+t[i],t=t.join(o>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return $t(f,function(o){var i="_."+o[0];t&o[1]&&!Dt(e,i)&&e.push(i)}),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(de):[]}(i),o)))}function Nr(t){var o=0,i=0;return function(){var n=wo(),r=16-(n-i);if(i=n,r>0){if(++o>=800)return arguments[0]}else o=0;return t.apply(e,arguments)}}function Lr(t,o){var i=-1,n=t.length,r=n-1;for(o=o===e?n:o;++i<o;){var a=Yi(i,r),s=t[a];t[a]=t[i],t[i]=s}return t.length=o,t}var Vr=function(e){var t=Na(e,function(e){return 500===o.size&&o.clear(),e}),o=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(oe,function(e,o,i,n){t.push(i?n.replace(ve,"$1"):o||e)}),t});function Pr(e){if("string"==typeof e||ds(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function kr(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function _r(e){if(e instanceof zo)return e.clone();var t=new qo(e.__wrapped__,e.__chain__);return t.__actions__=An(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fr=Ji(function(e,t){return Za(e)?vi(e,bi(t,1,Za,!0)):[]}),Ur=Ji(function(t,o){var i=Jr(o);return Za(i)&&(i=e),Za(t)?vi(t,bi(o,1,Za,!0),cr(i,2)):[]}),Br=Ji(function(t,o){var i=Jr(o);return Za(i)&&(i=e),Za(t)?vi(t,bi(o,1,Za,!0),e,i):[]});function qr(e,t,o){var i=null==e?0:e.length;if(!i)return-1;var n=null==o?0:gs(o);return n<0&&(n=po(i+n,0)),Ft(e,cr(t,3),n)}function zr(t,o,i){var n=null==t?0:t.length;if(!n)return-1;var r=n-1;return i!==e&&(r=gs(i),r=i<0?po(n+r,0):Eo(r,n-1)),Ft(t,cr(o,3),r,!0)}function Wr(e){return null!=e&&e.length?bi(e,1):[]}function Hr(t){return t&&t.length?t[0]:e}var Zr=Ji(function(e){var t=xt(e,pn);return t.length&&t[0]===e[0]?Mi(t):[]}),Yr=Ji(function(t){var o=Jr(t),i=xt(t,pn);return o===Jr(i)?o=e:i.pop(),i.length&&i[0]===t[0]?Mi(i,cr(o,2)):[]}),Qr=Ji(function(t){var o=Jr(t),i=xt(t,pn);return(o="function"==typeof o?o:e)&&i.pop(),i.length&&i[0]===t[0]?Mi(i,e,o):[]});function Jr(t){var o=null==t?0:t.length;return o?t[o-1]:e}var Xr=Ji(Kr);function Kr(e,t){return e&&e.length&&t&&t.length?Hi(e,t):e}var ea=nr(function(e,t){var o=null==e?0:e.length,i=si(e,t);return Zi(e,xt(t,function(e){return Er(e,o)?+e:e}).sort($n)),i});function ta(e){return null==e?e:So.call(e)}var oa=Ji(function(e){return vn(bi(e,1,Za,!0))}),ia=Ji(function(t){var o=Jr(t);return Za(o)&&(o=e),vn(bi(t,1,Za,!0),cr(o,2))}),na=Ji(function(t){var o=Jr(t);return o="function"==typeof o?o:e,vn(bi(t,1,Za,!0),e,o)});function ra(e){if(!e||!e.length)return[];var t=0;return e=At(e,function(e){if(Za(e))return t=po(e.length,t),!0}),Qt(t,function(t){return xt(e,Wt(t))})}function aa(t,o){if(!t||!t.length)return[];var i=ra(t);return null==o?i:xt(i,function(t){return Gt(o,e,t)})}var sa=Ji(function(e,t){return Za(e)?vi(e,t):[]}),la=Ji(function(e){return yn(At(e,Za))}),da=Ji(function(t){var o=Jr(t);return Za(o)&&(o=e),yn(At(t,Za),cr(o,2))}),ca=Ji(function(t){var o=Jr(t);return o="function"==typeof o?o:e,yn(At(t,Za),e,o)}),ua=Ji(ra),va=Ji(function(t){var o=t.length,i=o>1?t[o-1]:e;return i="function"==typeof i?(t.pop(),i):e,aa(t,i)});function ha(e){var t=Fo(e);return t.__chain__=!0,t}function ma(e,t){return t(e)}var ga=nr(function(t){var o=t.length,i=o?t[0]:0,n=this.__wrapped__,r=function(e){return si(e,t)};return!(o>1||this.__actions__.length)&&n instanceof zo&&Er(i)?((n=n.slice(i,+i+(o?1:0))).__actions__.push({func:ma,args:[r],thisArg:e}),new qo(n,this.__chain__).thru(function(t){return o&&!t.length&&t.push(e),t})):this.thru(r)}),fa=Rn(function(e,t,o){Le.call(e,o)?++e[o]:ai(e,o,1)}),ya=_n(qr),ba=_n(zr);function pa(e,t){return(za(e)?$t:hi)(e,cr(t,3))}function Ea(e,t){return(za(e)?Tt:mi)(e,cr(t,3))}var wa=Rn(function(e,t,o){Le.call(e,o)?e[o].push(t):ai(e,o,[t])}),Ia=Ji(function(e,t,o){var i=-1,n="function"==typeof t,r=Ha(e)?ae(e.length):[];return hi(e,function(e){r[++i]=n?Gt(t,e,o):Ai(e,t,o)}),r}),ja=Rn(function(e,t,o){ai(e,o,t)});function Sa(e,t){return(za(e)?xt:_i)(e,cr(t,3))}var Ca=Rn(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]}),Ga=Ji(function(e,t){if(null==e)return[];var o=t.length;return o>1&&wr(e,t[0],t[1])?t=[]:o>2&&wr(t[0],t[1],t[2])&&(t=[t[0]]),zi(e,bi(t,1),[])}),Oa=vt||function(){return mt.Date.now()};function $a(t,o,i){return o=i?e:o,o=t&&null==o?t.length:o,Kn(t,c,e,e,e,e,o)}function Ta(o,i){var n;if("function"!=typeof i)throw new Me(t);return o=gs(o),function(){return--o>0&&(n=i.apply(this,arguments)),o<=1&&(i=e),n}}var Ma=Ji(function(e,t,o){var i=1;if(o.length){var n=co(o,dr(Ma));i|=l}return Kn(e,i,t,o,n)}),Aa=Ji(function(e,t,o){var i=3;if(o.length){var n=co(o,dr(Aa));i|=l}return Kn(t,i,e,o,n)});function Da(o,i,n){var r,a,s,l,d,c,u=0,v=!1,h=!1,m=!0;if("function"!=typeof o)throw new Me(t);function g(t){var i=r,n=a;return r=a=e,u=t,l=o.apply(n,i)}function f(t){var o=t-c;return c===e||o>=i||o<0||h&&t-u>=s}function y(){var e=Oa();if(f(e))return b(e);d=Dr(y,function(e){var t=i-(e-c);return h?Eo(t,s-(e-u)):t}(e))}function b(t){return d=e,m&&r?g(t):(r=a=e,l)}function p(){var t=Oa(),o=f(t);if(r=arguments,a=this,c=t,o){if(d===e)return function(e){return u=e,d=Dr(y,i),v?g(e):l}(c);if(h)return Sn(d),d=Dr(y,i),g(c)}return d===e&&(d=Dr(y,i)),l}return i=ys(i)||0,ts(n)&&(v=!!n.leading,s=(h="maxWait"in n)?po(ys(n.maxWait)||0,i):s,m="trailing"in n?!!n.trailing:m),p.cancel=function(){d!==e&&Sn(d),u=0,r=c=a=d=e},p.flush=function(){return d===e?l:b(Oa())},p}var Ra=Ji(function(e,t){return ui(e,1,t)}),xa=Ji(function(e,t,o){return ui(e,ys(t)||0,o)});function Na(e,o){if("function"!=typeof e||null!=o&&"function"!=typeof o)throw new Me(t);var i=function(){var t=arguments,n=o?o.apply(this,t):t[0],r=i.cache;if(r.has(n))return r.get(n);var a=e.apply(this,t);return i.cache=r.set(n,a)||r,a};return i.cache=new(Na.Cache||Zo),i}function La(e){if("function"!=typeof e)throw new Me(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Na.Cache=Zo;var Va=In(function(e,t){var o=(t=1==t.length&&za(t[0])?xt(t[0],Xt(cr())):xt(bi(t,1),Xt(cr()))).length;return Ji(function(i){for(var n=-1,r=Eo(i.length,o);++n<r;)i[n]=t[n].call(this,i[n]);return Gt(e,this,i)})}),Pa=Ji(function(t,o){var i=co(o,dr(Pa));return Kn(t,l,e,o,i)}),ka=Ji(function(t,o){var i=co(o,dr(ka));return Kn(t,d,e,o,i)}),_a=nr(function(t,o){return Kn(t,u,e,e,e,o)});function Fa(e,t){return e===t||e!=e&&t!=t}var Ua=Zn(Oi),Ba=Zn(function(e,t){return e>=t}),qa=Di(function(){return arguments}())?Di:function(e){return os(e)&&Le.call(e,"callee")&&!Ye.call(e,"callee")},za=ae.isArray,Wa=Et?Xt(Et):function(e){return os(e)&&Gi(e)==R};function Ha(e){return null!=e&&es(e.length)&&!Xa(e)}function Za(e){return os(e)&&Ha(e)}var Ya=pt||yl,Qa=wt?Xt(wt):function(e){return os(e)&&Gi(e)==E};function Ja(e){if(!os(e))return!1;var t=Gi(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Xa(e){if(!ts(e))return!1;var t=Gi(e);return t==I||t==j||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==gs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function os(e){return null!=e&&"object"==typeof e}var is=It?Xt(It):function(e){return os(e)&&fr(e)==S};function ns(e){return"number"==typeof e||os(e)&&Gi(e)==C}function rs(e){if(!os(e)||Gi(e)!=G)return!1;var t=He(e);if(null===t)return!0;var o=Le.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&Ne.call(o)==_e}var as=jt?Xt(jt):function(e){return os(e)&&Gi(e)==$},ss=St?Xt(St):function(e){return os(e)&&fr(e)==T};function ls(e){return"string"==typeof e||!za(e)&&os(e)&&Gi(e)==M}function ds(e){return"symbol"==typeof e||os(e)&&Gi(e)==A}var cs=Ct?Xt(Ct):function(e){return os(e)&&es(e.length)&&!!st[Gi(e)]},us=Zn(ki),vs=Zn(function(e,t){return e<=t});function hs(e){if(!e)return[];if(Ha(e))return ls(e)?mo(e):An(e);if(Xe&&e[Xe])return function(e){for(var t,o=[];!(t=e.next()).done;)o.push(t.value);return o}(e[Xe]());var t=fr(e);return(t==S?so:t==T?uo:Fs)(e)}function ms(e){return e?(e=ys(e))===v||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function gs(e){var t=ms(e),o=t%1;return t==t?o?t-o:t:0}function fs(e){return e?li(gs(e),0,g):0}function ys(e){if("number"==typeof e)return e;if(ds(e))return m;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var o=fe.test(e);return o||be.test(e)?ut(e.slice(2),o?2:8):ge.test(e)?m:+e}function bs(e){return Dn(e,Rs(e))}function ps(e){return null==e?"":un(e)}var Es=xn(function(e,t){if(Cr(t)||Ha(t))Dn(t,Ds(t),e);else for(var o in t)Le.call(t,o)&&oi(e,o,t[o])}),ws=xn(function(e,t){Dn(t,Rs(t),e)}),Is=xn(function(e,t,o,i){Dn(t,Rs(t),e,i)}),js=xn(function(e,t,o,i){Dn(t,Ds(t),e,i)}),Ss=nr(si),Cs=Ji(function(t,o){t=Oe(t);var i=-1,n=o.length,r=n>2?o[2]:e;for(r&&wr(o[0],o[1],r)&&(n=1);++i<n;)for(var a=o[i],s=Rs(a),l=-1,d=s.length;++l<d;){var c=s[l],u=t[c];(u===e||Fa(u,Re[c])&&!Le.call(t,c))&&(t[c]=a[c])}return t}),Gs=Ji(function(t){return t.push(e,tr),Gt(Ns,e,t)});function Os(t,o,i){var n=null==t?e:Si(t,o);return n===e?i:n}function $s(e,t){return null!=e&&yr(e,t,Ti)}var Ts=Bn(function(e,t,o){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),e[t]=o},tl(nl)),Ms=Bn(function(e,t,o){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),Le.call(e,t)?e[t].push(o):e[t]=[o]},cr),As=Ji(Ai);function Ds(e){return Ha(e)?Jo(e):Vi(e)}function Rs(e){return Ha(e)?Jo(e,!0):Pi(e)}var xs=xn(function(e,t,o){Bi(e,t,o)}),Ns=xn(function(e,t,o,i){Bi(e,t,o,i)}),Ls=nr(function(e,t){var o={};if(null==e)return o;var i=!1;t=xt(t,function(t){return t=wn(t,e),i||(i=t.length>1),t}),Dn(e,ar(e),o),i&&(o=di(o,7,or));for(var n=t.length;n--;)hn(o,t[n]);return o}),Vs=nr(function(e,t){return null==e?{}:function(e,t){return Wi(e,t,function(t,o){return $s(e,o)})}(e,t)});function Ps(e,t){if(null==e)return{};var o=xt(ar(e),function(e){return[e]});return t=cr(t),Wi(e,o,function(e,o){return t(e,o[0])})}var ks=Xn(Ds),_s=Xn(Rs);function Fs(e){return null==e?[]:Kt(e,Ds(e))}var Us=Pn(function(e,t,o){return t=t.toLowerCase(),e+(o?Bs(t):t)});function Bs(e){return Js(ps(e).toLowerCase())}function qs(e){return(e=ps(e))&&e.replace(Ee,io).replace(et,"")}var zs=Pn(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),Ws=Pn(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),Hs=Vn("toLowerCase"),Zs=Pn(function(e,t,o){return e+(o?"_":"")+t.toLowerCase()}),Ys=Pn(function(e,t,o){return e+(o?" ":"")+Js(t)}),Qs=Pn(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Js=Vn("toUpperCase");function Xs(t,o,i){return t=ps(t),(o=i?e:o)===e?function(e){return nt.test(e)}(t)?function(e){return e.match(ot)||[]}(t):function(e){return e.match(ce)||[]}(t):t.match(o)||[]}var Ks=Ji(function(t,o){try{return Gt(t,e,o)}catch(e){return Ja(e)?e:new Se(e)}}),el=nr(function(e,t){return $t(t,function(t){t=Pr(t),ai(e,t,Ma(e[t],e))}),e});function tl(e){return function(){return e}}var ol=Fn(),il=Fn(!0);function nl(e){return e}function rl(e){return Li("function"==typeof e?e:di(e,1))}var al=Ji(function(e,t){return function(o){return Ai(o,e,t)}}),sl=Ji(function(e,t){return function(o){return Ai(e,o,t)}});function ll(e,t,o){var i=Ds(t),n=ji(t,i);null!=o||ts(t)&&(n.length||!i.length)||(o=t,t=e,e=this,n=ji(t,Ds(t)));var r=!(ts(o)&&"chain"in o&&!o.chain),a=Xa(e);return $t(n,function(o){var i=t[o];e[o]=i,a&&(e.prototype[o]=function(){var t=this.__chain__;if(r||t){var o=e(this.__wrapped__);return(o.__actions__=An(this.__actions__)).push({func:i,args:arguments,thisArg:e}),o.__chain__=t,o}return i.apply(e,Nt([this.value()],arguments))})}),e}function dl(){}var cl=zn(xt),ul=zn(Mt),vl=zn(Pt);function hl(e){return Ir(e)?Wt(Pr(e)):function(e){return function(t){return Si(t,e)}}(e)}var ml=Hn(),gl=Hn(!0);function fl(){return[]}function yl(){return!1}var bl,pl=qn(function(e,t){return e+t},0),El=Qn("ceil"),wl=qn(function(e,t){return e/t},1),Il=Qn("floor"),jl=qn(function(e,t){return e*t},1),Sl=Qn("round"),Cl=qn(function(e,t){return e-t},0);return Fo.after=function(e,o){if("function"!=typeof o)throw new Me(t);return e=gs(e),function(){if(--e<1)return o.apply(this,arguments)}},Fo.ary=$a,Fo.assign=Es,Fo.assignIn=ws,Fo.assignInWith=Is,Fo.assignWith=js,Fo.at=Ss,Fo.before=Ta,Fo.bind=Ma,Fo.bindAll=el,Fo.bindKey=Aa,Fo.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return za(e)?e:[e]},Fo.chain=ha,Fo.chunk=function(t,o,i){o=(i?wr(t,o,i):o===e)?1:po(gs(o),0);var n=null==t?0:t.length;if(!n||o<1)return[];for(var r=0,a=0,s=ae(gt(n/o));r<n;)s[a++]=rn(t,r,r+=o);return s},Fo.compact=function(e){for(var t=-1,o=null==e?0:e.length,i=0,n=[];++t<o;){var r=e[t];r&&(n[i++]=r)}return n},Fo.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),o=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Nt(za(o)?An(o):[o],bi(t,1))},Fo.cond=function(e){var o=null==e?0:e.length,i=cr();return e=o?xt(e,function(e){if("function"!=typeof e[1])throw new Me(t);return[i(e[0]),e[1]]}):[],Ji(function(t){for(var i=-1;++i<o;){var n=e[i];if(Gt(n[0],this,t))return Gt(n[1],this,t)}})},Fo.conforms=function(e){return function(e){var t=Ds(e);return function(o){return ci(o,e,t)}}(di(e,1))},Fo.constant=tl,Fo.countBy=fa,Fo.create=function(e,t){var o=Uo(e);return null==t?o:ri(o,t)},Fo.curry=function t(o,i,n){var r=Kn(o,8,e,e,e,e,e,i=n?e:i);return r.placeholder=t.placeholder,r},Fo.curryRight=function t(o,i,n){var r=Kn(o,s,e,e,e,e,e,i=n?e:i);return r.placeholder=t.placeholder,r},Fo.debounce=Da,Fo.defaults=Cs,Fo.defaultsDeep=Gs,Fo.defer=Ra,Fo.delay=xa,Fo.difference=Fr,Fo.differenceBy=Ur,Fo.differenceWith=Br,Fo.drop=function(t,o,i){var n=null==t?0:t.length;return n?rn(t,(o=i||o===e?1:gs(o))<0?0:o,n):[]},Fo.dropRight=function(t,o,i){var n=null==t?0:t.length;return n?rn(t,0,(o=n-(o=i||o===e?1:gs(o)))<0?0:o):[]},Fo.dropRightWhile=function(e,t){return e&&e.length?gn(e,cr(t,3),!0,!0):[]},Fo.dropWhile=function(e,t){return e&&e.length?gn(e,cr(t,3),!0):[]},Fo.fill=function(t,o,i,n){var r=null==t?0:t.length;return r?(i&&"number"!=typeof i&&wr(t,o,i)&&(i=0,n=r),function(t,o,i,n){var r=t.length;for((i=gs(i))<0&&(i=-i>r?0:r+i),(n=n===e||n>r?r:gs(n))<0&&(n+=r),n=i>n?0:fs(n);i<n;)t[i++]=o;return t}(t,o,i,n)):[]},Fo.filter=function(e,t){return(za(e)?At:yi)(e,cr(t,3))},Fo.flatMap=function(e,t){return bi(Sa(e,t),1)},Fo.flatMapDeep=function(e,t){return bi(Sa(e,t),v)},Fo.flatMapDepth=function(t,o,i){return i=i===e?1:gs(i),bi(Sa(t,o),i)},Fo.flatten=Wr,Fo.flattenDeep=function(e){return null!=e&&e.length?bi(e,v):[]},Fo.flattenDepth=function(t,o){return null!=t&&t.length?bi(t,o=o===e?1:gs(o)):[]},Fo.flip=function(e){return Kn(e,512)},Fo.flow=ol,Fo.flowRight=il,Fo.fromPairs=function(e){for(var t=-1,o=null==e?0:e.length,i={};++t<o;){var n=e[t];i[n[0]]=n[1]}return i},Fo.functions=function(e){return null==e?[]:ji(e,Ds(e))},Fo.functionsIn=function(e){return null==e?[]:ji(e,Rs(e))},Fo.groupBy=wa,Fo.initial=function(e){return null!=e&&e.length?rn(e,0,-1):[]},Fo.intersection=Zr,Fo.intersectionBy=Yr,Fo.intersectionWith=Qr,Fo.invert=Ts,Fo.invertBy=Ms,Fo.invokeMap=Ia,Fo.iteratee=rl,Fo.keyBy=ja,Fo.keys=Ds,Fo.keysIn=Rs,Fo.map=Sa,Fo.mapKeys=function(e,t){var o={};return t=cr(t,3),wi(e,function(e,i,n){ai(o,t(e,i,n),e)}),o},Fo.mapValues=function(e,t){var o={};return t=cr(t,3),wi(e,function(e,i,n){ai(o,i,t(e,i,n))}),o},Fo.matches=function(e){return Fi(di(e,1))},Fo.matchesProperty=function(e,t){return Ui(e,di(t,1))},Fo.memoize=Na,Fo.merge=xs,Fo.mergeWith=Ns,Fo.method=al,Fo.methodOf=sl,Fo.mixin=ll,Fo.negate=La,Fo.nthArg=function(e){return e=gs(e),Ji(function(t){return qi(t,e)})},Fo.omit=Ls,Fo.omitBy=function(e,t){return Ps(e,La(cr(t)))},Fo.once=function(e){return Ta(2,e)},Fo.orderBy=function(t,o,i,n){return null==t?[]:(za(o)||(o=null==o?[]:[o]),za(i=n?e:i)||(i=null==i?[]:[i]),zi(t,o,i))},Fo.over=cl,Fo.overArgs=Va,Fo.overEvery=ul,Fo.overSome=vl,Fo.partial=Pa,Fo.partialRight=ka,Fo.partition=Ca,Fo.pick=Vs,Fo.pickBy=Ps,Fo.property=hl,Fo.propertyOf=function(t){return function(o){return null==t?e:Si(t,o)}},Fo.pull=Xr,Fo.pullAll=Kr,Fo.pullAllBy=function(e,t,o){return e&&e.length&&t&&t.length?Hi(e,t,cr(o,2)):e},Fo.pullAllWith=function(t,o,i){return t&&t.length&&o&&o.length?Hi(t,o,e,i):t},Fo.pullAt=ea,Fo.range=ml,Fo.rangeRight=gl,Fo.rearg=_a,Fo.reject=function(e,t){return(za(e)?At:yi)(e,La(cr(t,3)))},Fo.remove=function(e,t){var o=[];if(!e||!e.length)return o;var i=-1,n=[],r=e.length;for(t=cr(t,3);++i<r;){var a=e[i];t(a,i,e)&&(o.push(a),n.push(i))}return Zi(e,n),o},Fo.rest=function(o,i){if("function"!=typeof o)throw new Me(t);return Ji(o,i=i===e?i:gs(i))},Fo.reverse=ta,Fo.sampleSize=function(t,o,i){return o=(i?wr(t,o,i):o===e)?1:gs(o),(za(t)?Ko:Ki)(t,o)},Fo.set=function(e,t,o){return null==e?e:en(e,t,o)},Fo.setWith=function(t,o,i,n){return n="function"==typeof n?n:e,null==t?t:en(t,o,i,n)},Fo.shuffle=function(e){return(za(e)?ei:nn)(e)},Fo.slice=function(t,o,i){var n=null==t?0:t.length;return n?(i&&"number"!=typeof i&&wr(t,o,i)?(o=0,i=n):(o=null==o?0:gs(o),i=i===e?n:gs(i)),rn(t,o,i)):[]},Fo.sortBy=Ga,Fo.sortedUniq=function(e){return e&&e.length?dn(e):[]},Fo.sortedUniqBy=function(e,t){return e&&e.length?dn(e,cr(t,2)):[]},Fo.split=function(t,o,i){return i&&"number"!=typeof i&&wr(t,o,i)&&(o=i=e),(i=i===e?g:i>>>0)?(t=ps(t))&&("string"==typeof o||null!=o&&!as(o))&&!(o=un(o))&&ao(t)?jn(mo(t),0,i):t.split(o,i):[]},Fo.spread=function(e,o){if("function"!=typeof e)throw new Me(t);return o=null==o?0:po(gs(o),0),Ji(function(t){var i=t[o],n=jn(t,0,o);return i&&Nt(n,i),Gt(e,this,n)})},Fo.tail=function(e){var t=null==e?0:e.length;return t?rn(e,1,t):[]},Fo.take=function(t,o,i){return t&&t.length?rn(t,0,(o=i||o===e?1:gs(o))<0?0:o):[]},Fo.takeRight=function(t,o,i){var n=null==t?0:t.length;return n?rn(t,(o=n-(o=i||o===e?1:gs(o)))<0?0:o,n):[]},Fo.takeRightWhile=function(e,t){return e&&e.length?gn(e,cr(t,3),!1,!0):[]},Fo.takeWhile=function(e,t){return e&&e.length?gn(e,cr(t,3)):[]},Fo.tap=function(e,t){return t(e),e},Fo.throttle=function(e,o,i){var n=!0,r=!0;if("function"!=typeof e)throw new Me(t);return ts(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),Da(e,o,{leading:n,maxWait:o,trailing:r})},Fo.thru=ma,Fo.toArray=hs,Fo.toPairs=ks,Fo.toPairsIn=_s,Fo.toPath=function(e){return za(e)?xt(e,Pr):ds(e)?[e]:An(Vr(ps(e)))},Fo.toPlainObject=bs,Fo.transform=function(e,t,o){var i=za(e),n=i||Ya(e)||cs(e);if(t=cr(t,4),null==o){var r=e&&e.constructor;o=n?i?new r:[]:ts(e)&&Xa(r)?Uo(He(e)):{}}return(n?$t:wi)(e,function(e,i,n){return t(o,e,i,n)}),o},Fo.unary=function(e){return $a(e,1)},Fo.union=oa,Fo.unionBy=ia,Fo.unionWith=na,Fo.uniq=function(e){return e&&e.length?vn(e):[]},Fo.uniqBy=function(e,t){return e&&e.length?vn(e,cr(t,2)):[]},Fo.uniqWith=function(t,o){return o="function"==typeof o?o:e,t&&t.length?vn(t,e,o):[]},Fo.unset=function(e,t){return null==e||hn(e,t)},Fo.unzip=ra,Fo.unzipWith=aa,Fo.update=function(e,t,o){return null==e?e:mn(e,t,En(o))},Fo.updateWith=function(t,o,i,n){return n="function"==typeof n?n:e,null==t?t:mn(t,o,En(i),n)},Fo.values=Fs,Fo.valuesIn=function(e){return null==e?[]:Kt(e,Rs(e))},Fo.without=sa,Fo.words=Xs,Fo.wrap=function(e,t){return Pa(En(t),e)},Fo.xor=la,Fo.xorBy=da,Fo.xorWith=ca,Fo.zip=ua,Fo.zipObject=function(e,t){return bn(e||[],t||[],oi)},Fo.zipObjectDeep=function(e,t){return bn(e||[],t||[],en)},Fo.zipWith=va,Fo.entries=ks,Fo.entriesIn=_s,Fo.extend=ws,Fo.extendWith=Is,ll(Fo,Fo),Fo.add=pl,Fo.attempt=Ks,Fo.camelCase=Us,Fo.capitalize=Bs,Fo.ceil=El,Fo.clamp=function(t,o,i){return i===e&&(i=o,o=e),i!==e&&(i=(i=ys(i))==i?i:0),o!==e&&(o=(o=ys(o))==o?o:0),li(ys(t),o,i)},Fo.clone=function(e){return di(e,4)},Fo.cloneDeep=function(e){return di(e,5)},Fo.cloneDeepWith=function(t,o){return di(t,5,o="function"==typeof o?o:e)},Fo.cloneWith=function(t,o){return di(t,4,o="function"==typeof o?o:e)},Fo.conformsTo=function(e,t){return null==t||ci(e,t,Ds(t))},Fo.deburr=qs,Fo.defaultTo=function(e,t){return null==e||e!=e?t:e},Fo.divide=wl,Fo.endsWith=function(t,o,i){t=ps(t),o=un(o);var n=t.length,r=i=i===e?n:li(gs(i),0,n);return(i-=o.length)>=0&&t.slice(i,r)==o},Fo.eq=Fa,Fo.escape=function(e){return(e=ps(e))&&Q.test(e)?e.replace(Z,no):e},Fo.escapeRegExp=function(e){return(e=ps(e))&&ne.test(e)?e.replace(ie,"\\$&"):e},Fo.every=function(t,o,i){var n=za(t)?Mt:gi;return i&&wr(t,o,i)&&(o=e),n(t,cr(o,3))},Fo.find=ya,Fo.findIndex=qr,Fo.findKey=function(e,t){return _t(e,cr(t,3),wi)},Fo.findLast=ba,Fo.findLastIndex=zr,Fo.findLastKey=function(e,t){return _t(e,cr(t,3),Ii)},Fo.floor=Il,Fo.forEach=pa,Fo.forEachRight=Ea,Fo.forIn=function(e,t){return null==e?e:pi(e,cr(t,3),Rs)},Fo.forInRight=function(e,t){return null==e?e:Ei(e,cr(t,3),Rs)},Fo.forOwn=function(e,t){return e&&wi(e,cr(t,3))},Fo.forOwnRight=function(e,t){return e&&Ii(e,cr(t,3))},Fo.get=Os,Fo.gt=Ua,Fo.gte=Ba,Fo.has=function(e,t){return null!=e&&yr(e,t,$i)},Fo.hasIn=$s,Fo.head=Hr,Fo.identity=nl,Fo.includes=function(e,t,o,i){e=Ha(e)?e:Fs(e),o=o&&!i?gs(o):0;var n=e.length;return o<0&&(o=po(n+o,0)),ls(e)?o<=n&&e.indexOf(t,o)>-1:!!n&&Ut(e,t,o)>-1},Fo.indexOf=function(e,t,o){var i=null==e?0:e.length;if(!i)return-1;var n=null==o?0:gs(o);return n<0&&(n=po(i+n,0)),Ut(e,t,n)},Fo.inRange=function(t,o,i){return o=ms(o),i===e?(i=o,o=0):i=ms(i),function(e,t,o){return e>=Eo(t,o)&&e<po(t,o)}(t=ys(t),o,i)},Fo.invoke=As,Fo.isArguments=qa,Fo.isArray=za,Fo.isArrayBuffer=Wa,Fo.isArrayLike=Ha,Fo.isArrayLikeObject=Za,Fo.isBoolean=function(e){return!0===e||!1===e||os(e)&&Gi(e)==p},Fo.isBuffer=Ya,Fo.isDate=Qa,Fo.isElement=function(e){return os(e)&&1===e.nodeType&&!rs(e)},Fo.isEmpty=function(e){if(null==e)return!0;if(Ha(e)&&(za(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cs(e)||qa(e)))return!e.length;var t=fr(e);if(t==S||t==T)return!e.size;if(Cr(e))return!Vi(e).length;for(var o in e)if(Le.call(e,o))return!1;return!0},Fo.isEqual=function(e,t){return Ri(e,t)},Fo.isEqualWith=function(t,o,i){var n=(i="function"==typeof i?i:e)?i(t,o):e;return n===e?Ri(t,o,e,i):!!n},Fo.isError=Ja,Fo.isFinite=function(e){return"number"==typeof e&&kt(e)},Fo.isFunction=Xa,Fo.isInteger=Ka,Fo.isLength=es,Fo.isMap=is,Fo.isMatch=function(e,t){return e===t||xi(e,t,vr(t))},Fo.isMatchWith=function(t,o,i){return i="function"==typeof i?i:e,xi(t,o,vr(o),i)},Fo.isNaN=function(e){return ns(e)&&e!=+e},Fo.isNative=function(e){if(Sr(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ni(e)},Fo.isNil=function(e){return null==e},Fo.isNull=function(e){return null===e},Fo.isNumber=ns,Fo.isObject=ts,Fo.isObjectLike=os,Fo.isPlainObject=rs,Fo.isRegExp=as,Fo.isSafeInteger=function(e){return Ka(e)&&e>=-9007199254740991&&e<=h},Fo.isSet=ss,Fo.isString=ls,Fo.isSymbol=ds,Fo.isTypedArray=cs,Fo.isUndefined=function(t){return t===e},Fo.isWeakMap=function(e){return os(e)&&fr(e)==D},Fo.isWeakSet=function(e){return os(e)&&"[object WeakSet]"==Gi(e)},Fo.join=function(e,t){return null==e?"":Ht.call(e,t)},Fo.kebabCase=zs,Fo.last=Jr,Fo.lastIndexOf=function(t,o,i){var n=null==t?0:t.length;if(!n)return-1;var r=n;return i!==e&&(r=(r=gs(i))<0?po(n+r,0):Eo(r,n-1)),o==o?function(e,t,o){for(var i=o+1;i--;)if(e[i]===t)return i;return i}(t,o,r):Ft(t,qt,r,!0)},Fo.lowerCase=Ws,Fo.lowerFirst=Hs,Fo.lt=us,Fo.lte=vs,Fo.max=function(t){return t&&t.length?fi(t,nl,Oi):e},Fo.maxBy=function(t,o){return t&&t.length?fi(t,cr(o,2),Oi):e},Fo.mean=function(e){return zt(e,nl)},Fo.meanBy=function(e,t){return zt(e,cr(t,2))},Fo.min=function(t){return t&&t.length?fi(t,nl,ki):e},Fo.minBy=function(t,o){return t&&t.length?fi(t,cr(o,2),ki):e},Fo.stubArray=fl,Fo.stubFalse=yl,Fo.stubObject=function(){return{}},Fo.stubString=function(){return""},Fo.stubTrue=function(){return!0},Fo.multiply=jl,Fo.nth=function(t,o){return t&&t.length?qi(t,gs(o)):e},Fo.noConflict=function(){return mt._===this&&(mt._=Fe),this},Fo.noop=dl,Fo.now=Oa,Fo.pad=function(e,t,o){e=ps(e);var i=(t=gs(t))?ho(e):0;if(!t||i>=t)return e;var n=(t-i)/2;return Wn(ft(n),o)+e+Wn(gt(n),o)},Fo.padEnd=function(e,t,o){e=ps(e);var i=(t=gs(t))?ho(e):0;return t&&i<t?e+Wn(t-i,o):e},Fo.padStart=function(e,t,o){e=ps(e);var i=(t=gs(t))?ho(e):0;return t&&i<t?Wn(t-i,o)+e:e},Fo.parseInt=function(e,t,o){return o||null==t?t=0:t&&(t=+t),Io(ps(e).replace(re,""),t||0)},Fo.random=function(t,o,i){if(i&&"boolean"!=typeof i&&wr(t,o,i)&&(o=i=e),i===e&&("boolean"==typeof o?(i=o,o=e):"boolean"==typeof t&&(i=t,t=e)),t===e&&o===e?(t=0,o=1):(t=ms(t),o===e?(o=t,t=0):o=ms(o)),t>o){var n=t;t=o,o=n}if(i||t%1||o%1){var r=jo();return Eo(t+r*(o-t+ct("1e-"+((r+"").length-1))),o)}return Yi(t,o)},Fo.reduce=function(e,t,o){var i=za(e)?Lt:Zt,n=arguments.length<3;return i(e,cr(t,4),o,n,hi)},Fo.reduceRight=function(e,t,o){var i=za(e)?Vt:Zt,n=arguments.length<3;return i(e,cr(t,4),o,n,mi)},Fo.repeat=function(t,o,i){return o=(i?wr(t,o,i):o===e)?1:gs(o),Qi(ps(t),o)},Fo.replace=function(){var e=arguments,t=ps(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fo.result=function(t,o,i){var n=-1,r=(o=wn(o,t)).length;for(r||(r=1,t=e);++n<r;){var a=null==t?e:t[Pr(o[n])];a===e&&(n=r,a=i),t=Xa(a)?a.call(t):a}return t},Fo.round=Sl,Fo.runInContext=o,Fo.sample=function(e){return(za(e)?Xo:Xi)(e)},Fo.size=function(e){if(null==e)return 0;if(Ha(e))return ls(e)?ho(e):e.length;var t=fr(e);return t==S||t==T?e.size:Vi(e).length},Fo.snakeCase=Zs,Fo.some=function(t,o,i){var n=za(t)?Pt:an;return i&&wr(t,o,i)&&(o=e),n(t,cr(o,3))},Fo.sortedIndex=function(e,t){return sn(e,t)},Fo.sortedIndexBy=function(e,t,o){return ln(e,t,cr(o,2))},Fo.sortedIndexOf=function(e,t){var o=null==e?0:e.length;if(o){var i=sn(e,t);if(i<o&&Fa(e[i],t))return i}return-1},Fo.sortedLastIndex=function(e,t){return sn(e,t,!0)},Fo.sortedLastIndexBy=function(e,t,o){return ln(e,t,cr(o,2),!0)},Fo.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var o=sn(e,t,!0)-1;if(Fa(e[o],t))return o}return-1},Fo.startCase=Ys,Fo.startsWith=function(e,t,o){return e=ps(e),o=null==o?0:li(gs(o),0,e.length),t=un(t),e.slice(o,o+t.length)==t},Fo.subtract=Cl,Fo.sum=function(e){return e&&e.length?Yt(e,nl):0},Fo.sumBy=function(e,t){return e&&e.length?Yt(e,cr(t,2)):0},Fo.template=function(t,o,i){var n=Fo.templateSettings;i&&wr(t,o,i)&&(o=e),t=ps(t),o=Is({},o,n,er);var r,a,s=Is({},o.imports,n.imports,er),l=Ds(s),d=Kt(s,l),c=0,u=o.interpolate||we,v="__p += '",h=$e((o.escape||we).source+"|"+u.source+"|"+(u===K?he:we).source+"|"+(o.evaluate||we).source+"|$","g"),m="//# sourceURL="+(Le.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";t.replace(h,function(e,o,i,n,s,l){return i||(i=n),v+=t.slice(c,l).replace(Ie,ro),o&&(r=!0,v+="' +\n__e("+o+") +\n'"),s&&(a=!0,v+="';\n"+s+";\n__p += '"),i&&(v+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+e.length,e}),v+="';\n";var g=Le.call(o,"variable")&&o.variable;if(g){if(ue.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else v="with (obj) {\n"+v+"\n}\n";v=(a?v.replace(q,""):v).replace(z,"$1").replace(W,"$1;"),v="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+v+"return __p\n}";var f=Ks(function(){return Ce(l,m+"return "+v).apply(e,d)});if(f.source=v,Ja(f))throw f;return f},Fo.times=function(e,t){if((e=gs(e))<1||e>h)return[];var o=g,i=Eo(e,g);t=cr(t),e-=g;for(var n=Qt(i,t);++o<e;)t(o);return n},Fo.toFinite=ms,Fo.toInteger=gs,Fo.toLength=fs,Fo.toLower=function(e){return ps(e).toLowerCase()},Fo.toNumber=ys,Fo.toSafeInteger=function(e){return e?li(gs(e),-9007199254740991,h):0===e?e:0},Fo.toString=ps,Fo.toUpper=function(e){return ps(e).toUpperCase()},Fo.trim=function(t,o,i){if((t=ps(t))&&(i||o===e))return Jt(t);if(!t||!(o=un(o)))return t;var n=mo(t),r=mo(o);return jn(n,to(n,r),oo(n,r)+1).join("")},Fo.trimEnd=function(t,o,i){if((t=ps(t))&&(i||o===e))return t.slice(0,go(t)+1);if(!t||!(o=un(o)))return t;var n=mo(t);return jn(n,0,oo(n,mo(o))+1).join("")},Fo.trimStart=function(t,o,i){if((t=ps(t))&&(i||o===e))return t.replace(re,"");if(!t||!(o=un(o)))return t;var n=mo(t);return jn(n,to(n,mo(o))).join("")},Fo.truncate=function(t,o){var i=30,n="...";if(ts(o)){var r="separator"in o?o.separator:r;i="length"in o?gs(o.length):i,n="omission"in o?un(o.omission):n}var a=(t=ps(t)).length;if(ao(t)){var s=mo(t);a=s.length}if(i>=a)return t;var l=i-ho(n);if(l<1)return n;var d=s?jn(s,0,l).join(""):t.slice(0,l);if(r===e)return d+n;if(s&&(l+=d.length-l),as(r)){if(t.slice(l).search(r)){var c,u=d;for(r.global||(r=$e(r.source,ps(me.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var v=c.index;d=d.slice(0,v===e?l:v)}}else if(t.indexOf(un(r),l)!=l){var h=d.lastIndexOf(r);h>-1&&(d=d.slice(0,h))}return d+n},Fo.unescape=function(e){return(e=ps(e))&&Y.test(e)?e.replace(H,fo):e},Fo.uniqueId=function(e){var t=++Ve;return ps(e)+t},Fo.upperCase=Qs,Fo.upperFirst=Js,Fo.each=pa,Fo.eachRight=Ea,Fo.first=Hr,ll(Fo,(bl={},wi(Fo,function(e,t){Le.call(Fo.prototype,t)||(bl[t]=e)}),bl),{chain:!1}),Fo.VERSION="4.17.21",$t(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Fo[e].placeholder=Fo}),$t(["drop","take"],function(t,o){zo.prototype[t]=function(i){i=i===e?1:po(gs(i),0);var n=this.__filtered__&&!o?new zo(this):this.clone();return n.__filtered__?n.__takeCount__=Eo(i,n.__takeCount__):n.__views__.push({size:Eo(i,g),type:t+(n.__dir__<0?"Right":"")}),n},zo.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),$t(["filter","map","takeWhile"],function(e,t){var o=t+1,i=1==o||3==o;zo.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:cr(e,3),type:o}),t.__filtered__=t.__filtered__||i,t}}),$t(["head","last"],function(e,t){var o="take"+(t?"Right":"");zo.prototype[e]=function(){return this[o](1).value()[0]}}),$t(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");zo.prototype[e]=function(){return this.__filtered__?new zo(this):this[o](1)}}),zo.prototype.compact=function(){return this.filter(nl)},zo.prototype.find=function(e){return this.filter(e).head()},zo.prototype.findLast=function(e){return this.reverse().find(e)},zo.prototype.invokeMap=Ji(function(e,t){return"function"==typeof e?new zo(this):this.map(function(o){return Ai(o,e,t)})}),zo.prototype.reject=function(e){return this.filter(La(cr(e)))},zo.prototype.slice=function(t,o){t=gs(t);var i=this;return i.__filtered__&&(t>0||o<0)?new zo(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),o!==e&&(i=(o=gs(o))<0?i.dropRight(-o):i.take(o-t)),i)},zo.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zo.prototype.toArray=function(){return this.take(g)},wi(zo.prototype,function(t,o){var i=/^(?:filter|find|map|reject)|While$/.test(o),n=/^(?:head|last)$/.test(o),r=Fo[n?"take"+("last"==o?"Right":""):o],a=n||/^find/.test(o);r&&(Fo.prototype[o]=function(){var o=this.__wrapped__,s=n?[1]:arguments,l=o instanceof zo,d=s[0],c=l||za(o),u=function(e){var t=r.apply(Fo,Nt([e],s));return n&&v?t[0]:t};c&&i&&"function"==typeof d&&1!=d.length&&(l=c=!1);var v=this.__chain__,h=!!this.__actions__.length,m=a&&!v,g=l&&!h;if(!a&&c){o=g?o:new zo(this);var f=t.apply(o,s);return f.__actions__.push({func:ma,args:[u],thisArg:e}),new qo(f,v)}return m&&g?t.apply(this,s):(f=this.thru(u),m?n?f.value()[0]:f.value():f)})}),$t(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ae[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);Fo.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(za(n)?n:[],e)}return this[o](function(o){return t.apply(za(o)?o:[],e)})}}),wi(zo.prototype,function(e,t){var o=Fo[t];if(o){var i=o.name+"";Le.call(Do,i)||(Do[i]=[]),Do[i].push({name:t,func:o})}}),Do[Un(e,2).name]=[{name:"wrapper",func:e}],zo.prototype.clone=function(){var e=new zo(this.__wrapped__);return e.__actions__=An(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=An(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=An(this.__views__),e},zo.prototype.reverse=function(){if(this.__filtered__){var e=new zo(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zo.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,o=za(e),i=t<0,n=o?e.length:0,r=function(e,t,o){for(var i=-1,n=o.length;++i<n;){var r=o[i],a=r.size;switch(r.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Eo(t,e+a);break;case"takeRight":e=po(e,t-a)}}return{start:e,end:t}}(0,n,this.__views__),a=r.start,s=r.end,l=s-a,d=i?s:a-1,c=this.__iteratees__,u=c.length,v=0,h=Eo(l,this.__takeCount__);if(!o||!i&&n==l&&h==l)return fn(e,this.__actions__);var m=[];e:for(;l--&&v<h;){for(var g=-1,f=e[d+=t];++g<u;){var y=c[g],b=y.iteratee,p=y.type,E=b(f);if(2==p)f=E;else if(!E){if(1==p)continue e;break e}}m[v++]=f}return m},Fo.prototype.at=ga,Fo.prototype.chain=function(){return ha(this)},Fo.prototype.commit=function(){return new qo(this.value(),this.__chain__)},Fo.prototype.next=function(){this.__values__===e&&(this.__values__=hs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Fo.prototype.plant=function(t){for(var o,i=this;i instanceof Bo;){var n=_r(i);n.__index__=0,n.__values__=e,o?r.__wrapped__=n:o=n;var r=n;i=i.__wrapped__}return r.__wrapped__=t,o},Fo.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof zo){var o=t;return this.__actions__.length&&(o=new zo(this)),(o=o.reverse()).__actions__.push({func:ma,args:[ta],thisArg:e}),new qo(o,this.__chain__)}return this.thru(ta)},Fo.prototype.toJSON=Fo.prototype.valueOf=Fo.prototype.value=function(){return fn(this.__wrapped__,this.__actions__)},Fo.prototype.first=Fo.prototype.head,Xe&&(Fo.prototype[Xe]=function(){return this}),Fo}();ft?((ft.exports=yo)._=yo,gt._=yo):mt._=yo}.call(o);var l,d,c=s.exports;!function(e){e[e.API=0]="API",e[e.EVENT=1]="EVENT",e[e.ERROR=2]="ERROR"}(l||(l={})),function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove",e[e.Clear=2]="Clear"}(d||(d={}));const u=new Map;var v,h={exports:{}},m=function(e,t){return function(){for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];return e.apply(t,o)}},g=m,f=Object.prototype.toString,y=(v=Object.create(null),function(e){var t=f.call(e);return v[t]||(v[t]=t.slice(8,-1).toLowerCase())});function b(e){return e=e.toLowerCase(),function(t){return y(t)===e}}function p(e){return Array.isArray(e)}function E(e){return void 0===e}var w=b("ArrayBuffer");function I(e){return null!==e&&"object"==typeof e}function j(e){if("object"!==y(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var S=b("Date"),C=b("File"),G=b("Blob"),O=b("FileList");function $(e){return"[object Function]"===f.call(e)}var T=b("URLSearchParams");function M(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),p(e))for(var o=0,i=e.length;o<i;o++)t.call(null,e[o],o,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}var A,D=(A="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return A&&e instanceof A}),R={isArray:p,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||f.call(e)===t||$(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:I,isPlainObject:j,isUndefined:E,isDate:S,isFile:C,isBlob:G,isFunction:$,isStream:function(e){return I(e)&&$(e.pipe)},isURLSearchParams:T,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:M,merge:function e(){var t={};function o(o,i){j(t[i])&&j(o)?t[i]=e(t[i],o):j(o)?t[i]=e({},o):p(o)?t[i]=o.slice():t[i]=o}for(var i=0,n=arguments.length;i<n;i++)M(arguments[i],o);return t},extend:function(e,t,o){return M(t,function(t,i){e[i]=o&&"function"==typeof t?g(t,o):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,o,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,o&&Object.assign(e.prototype,o)},toFlatObject:function(e,t,o){var i,n,r,a={};t=t||{};do{for(n=(i=Object.getOwnPropertyNames(e)).length;n-- >0;)a[r=i[n]]||(t[r]=e[r],a[r]=!0);e=Object.getPrototypeOf(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},kindOf:y,kindOfTest:b,endsWith:function(e,t,o){e=String(e),(void 0===o||o>e.length)&&(o=e.length),o-=t.length;var i=e.indexOf(t,o);return-1!==i&&i===o},toArray:function(e){if(!e)return null;var t=e.length;if(E(t))return null;for(var o=new Array(t);t-- >0;)o[t]=e[t];return o},isTypedArray:D,isFileList:O},x=R;function N(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var L=function(e,t,o){if(!t)return e;var i;if(o)i=o(t);else if(x.isURLSearchParams(t))i=t.toString();else{var n=[];x.forEach(t,function(e,t){null!=e&&(x.isArray(e)?t+="[]":e=[e],x.forEach(e,function(e){x.isDate(e)?e=e.toISOString():x.isObject(e)&&(e=JSON.stringify(e)),n.push(N(t)+"="+N(e))}))}),i=n.join("&")}if(i){var r=e.indexOf("#");-1!==r&&(e=e.slice(0,r)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e},V=R;function P(){this.handlers=[]}P.prototype.use=function(e,t,o){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!o&&o.synchronous,runWhen:o?o.runWhen:null}),this.handlers.length-1},P.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},P.prototype.forEach=function(e){V.forEach(this.handlers,function(t){null!==t&&e(t)})};var k=P,_="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function F(){throw new Error("setTimeout has not been defined")}function U(){throw new Error("clearTimeout has not been defined")}var B=F,q=U;function z(e){if(B===setTimeout)return setTimeout(e,0);if((B===F||!B)&&setTimeout)return B=setTimeout,setTimeout(e,0);try{return B(e,0)}catch(t){try{return B.call(null,e,0)}catch(t){return B.call(this,e,0)}}}"function"==typeof _.setTimeout&&(B=setTimeout),"function"==typeof _.clearTimeout&&(q=clearTimeout);var W,H=[],Z=!1,Y=-1;function Q(){Z&&W&&(Z=!1,W.length?H=W.concat(H):Y=-1,H.length&&J())}function J(){if(!Z){var e=z(Q);Z=!0;for(var t=H.length;t;){for(W=H,H=[];++Y<t;)W&&W[Y].run();Y=-1,t=H.length}W=null,Z=!1,function(e){if(q===clearTimeout)return clearTimeout(e);if((q===U||!q)&&clearTimeout)return q=clearTimeout,clearTimeout(e);try{return q(e)}catch(t){try{return q.call(null,e)}catch(t){return q.call(this,e)}}}(e)}}function X(e,t){this.fun=e,this.array=t}X.prototype.run=function(){this.fun.apply(null,this.array)};function K(){}var ee=K,te=K,oe=K,ie=K,ne=K,re=K,ae=K;var se=_.performance||{},le=se.now||se.mozNow||se.msNow||se.oNow||se.webkitNow||function(){return(new Date).getTime()};var de=new Date;var ce,ue,ve={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];H.push(new X(e,t)),1!==H.length||Z||z(J)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:ee,addListener:te,once:oe,off:ie,removeListener:ne,removeAllListeners:re,emit:ae,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*le.call(se),o=Math.floor(t),i=Math.floor(t%1*1e9);return e&&(o-=e[0],(i-=e[1])<0&&(o--,i+=1e9)),[o,i]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-de)/1e3}},he=R;function me(){if(ue)return ce;ue=1;var e=R;function t(e,t,o,i,n){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),i&&(this.request=i),n&&(this.response=n)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=t.prototype,i={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){i[e]={value:e}}),Object.defineProperties(t,i),Object.defineProperty(o,"isAxiosError",{value:!0}),t.from=function(i,n,r,a,s,l){var d=Object.create(o);return e.toFlatObject(i,d,function(e){return e!==Error.prototype}),t.call(d,i.message,n,r,a,s),d.name=i.name,l&&Object.assign(d,l),d},ce=t}var ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fe=[],ye=[],be="undefined"!=typeof Uint8Array?Uint8Array:Array,pe=!1;function Ee(){pe=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)fe[t]=e[t],ye[e.charCodeAt(t)]=t;ye["-".charCodeAt(0)]=62,ye["_".charCodeAt(0)]=63}function we(e){return fe[e>>18&63]+fe[e>>12&63]+fe[e>>6&63]+fe[63&e]}function Ie(e,t,o){for(var i,n=[],r=t;r<o;r+=3)i=(e[r]<<16)+(e[r+1]<<8)+e[r+2],n.push(we(i));return n.join("")}function je(e){var t;pe||Ee();for(var o=e.length,i=o%3,n="",r=[],a=16383,s=0,l=o-i;s<l;s+=a)r.push(Ie(e,s,s+a>l?l:s+a));return 1===i?(t=e[o-1],n+=fe[t>>2],n+=fe[t<<4&63],n+="=="):2===i&&(t=(e[o-2]<<8)+e[o-1],n+=fe[t>>10],n+=fe[t>>4&63],n+=fe[t<<2&63],n+="="),r.push(n),r.join("")}function Se(e,t,o,i,n){var r,a,s=8*n-i-1,l=(1<<s)-1,d=l>>1,c=-7,u=o?n-1:0,v=o?-1:1,h=e[t+u];for(u+=v,r=h&(1<<-c)-1,h>>=-c,c+=s;c>0;r=256*r+e[t+u],u+=v,c-=8);for(a=r&(1<<-c)-1,r>>=-c,c+=i;c>0;a=256*a+e[t+u],u+=v,c-=8);if(0===r)r=1-d;else{if(r===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,i),r-=d}return(h?-1:1)*a*Math.pow(2,r-i)}function Ce(e,t,o,i,n,r){var a,s,l,d=8*r-n-1,c=(1<<d)-1,u=c>>1,v=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:r-1,m=i?1:-1,g=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=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?v/l:v*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,n),a+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,n),a=0));n>=8;e[o+h]=255&s,h+=m,s/=256,n-=8);for(a=a<<n|s,d+=n;d>0;e[o+h]=255&a,h+=m,a/=256,d-=8);e[o+h-m]|=128*g}var Ge={}.toString,Oe=Array.isArray||function(e){return"[object Array]"==Ge.call(e)};function $e(){return Me.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Te(e,t){if($e()<t)throw new RangeError("Invalid typed array length");return Me.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Me.prototype:(null===e&&(e=new Me(t)),e.length=t),e}function Me(e,t,o){if(!(Me.TYPED_ARRAY_SUPPORT||this instanceof Me))return new Me(e,t,o);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Re(this,e)}return Ae(this,e,t,o)}function Ae(e,t,o,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,o,i){if(t.byteLength,o<0||t.byteLength<o)throw new RangeError("'offset' is out of bounds");if(t.byteLength<o+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===o&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,o):new Uint8Array(t,o,i);Me.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Me.prototype:e=xe(e,t);return e}(e,t,o,i):"string"==typeof t?function(e,t,o){"string"==typeof o&&""!==o||(o="utf8");if(!Me.isEncoding(o))throw new TypeError('"encoding" must be a valid string encoding');var i=0|Ve(t,o);e=Te(e,i);var n=e.write(t,o);n!==i&&(e=e.slice(0,n));return e}(e,t,o):function(e,t){if(Le(t)){var o=0|Ne(t.length);return 0===(e=Te(e,o)).length||t.copy(e,0,0,o),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?Te(e,0):xe(e,t);if("Buffer"===t.type&&Oe(t.data))return xe(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function De(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Re(e,t){if(De(t),e=Te(e,t<0?0:0|Ne(t)),!Me.TYPED_ARRAY_SUPPORT)for(var o=0;o<t;++o)e[o]=0;return e}function xe(e,t){var o=t.length<0?0:0|Ne(t.length);e=Te(e,o);for(var i=0;i<o;i+=1)e[i]=255&t[i];return e}function Ne(e){if(e>=$e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$e().toString(16)+" bytes");return 0|e}function Le(e){return!(null==e||!e._isBuffer)}function Ve(e,t){if(Le(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return ft(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return yt(e).length;default:if(i)return ft(e).length;t=(""+t).toLowerCase(),i=!0}}function Pe(e,t,o){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ke(this,t,o);case"utf8":case"utf-8":return Ye(this,t,o);case"ascii":return Je(this,t,o);case"latin1":case"binary":return Xe(this,t,o);case"base64":return Ze(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,t,o);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function ke(e,t,o){var i=e[t];e[t]=e[o],e[o]=i}function _e(e,t,o,i,n){if(0===e.length)return-1;if("string"==typeof o?(i=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=n?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(n)return-1;o=e.length-1}else if(o<0){if(!n)return-1;o=0}if("string"==typeof t&&(t=Me.from(t,i)),Le(t))return 0===t.length?-1:Fe(e,t,o,i,n);if("number"==typeof t)return t&=255,Me.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):Fe(e,[t],o,i,n);throw new TypeError("val must be string, number or Buffer")}function Fe(e,t,o,i,n){var r,a=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,o/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var c=-1;for(r=o;r<s;r++)if(d(e,r)===d(t,-1===c?0:r-c)){if(-1===c&&(c=r),r-c+1===l)return c*a}else-1!==c&&(r-=r-c),c=-1}else for(o+l>s&&(o=s-l),r=o;r>=0;r--){for(var u=!0,v=0;v<l;v++)if(d(e,r+v)!==d(t,v)){u=!1;break}if(u)return r}return-1}function Ue(e,t,o,i){o=Number(o)||0;var n=e.length-o;i?(i=Number(i))>n&&(i=n):i=n;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");i>r/2&&(i=r/2);for(var a=0;a<i;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[o+a]=s}return a}function Be(e,t,o,i){return bt(ft(t,e.length-o),e,o,i)}function qe(e,t,o,i){return bt(function(e){for(var t=[],o=0;o<e.length;++o)t.push(255&e.charCodeAt(o));return t}(t),e,o,i)}function ze(e,t,o,i){return qe(e,t,o,i)}function We(e,t,o,i){return bt(yt(t),e,o,i)}function He(e,t,o,i){return bt(function(e,t){for(var o,i,n,r=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(o=e.charCodeAt(a))>>8,n=o%256,r.push(n),r.push(i);return r}(t,e.length-o),e,o,i)}function Ze(e,t,o){return 0===t&&o===e.length?je(e):je(e.slice(t,o))}function Ye(e,t,o){o=Math.min(e.length,o);for(var i=[],n=t;n<o;){var r,a,s,l,d=e[n],c=null,u=d>239?4:d>223?3:d>191?2:1;if(n+u<=o)switch(u){case 1:d<128&&(c=d);break;case 2:128==(192&(r=e[n+1]))&&(l=(31&d)<<6|63&r)>127&&(c=l);break;case 3:r=e[n+1],a=e[n+2],128==(192&r)&&128==(192&a)&&(l=(15&d)<<12|(63&r)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:r=e[n+1],a=e[n+2],s=e[n+3],128==(192&r)&&128==(192&a)&&128==(192&s)&&(l=(15&d)<<18|(63&r)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,u=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=u}return function(e){var t=e.length;if(t<=Qe)return String.fromCharCode.apply(String,e);var o="",i=0;for(;i<t;)o+=String.fromCharCode.apply(String,e.slice(i,i+=Qe));return o}(i)}Me.TYPED_ARRAY_SUPPORT=void 0===_.TYPED_ARRAY_SUPPORT||_.TYPED_ARRAY_SUPPORT,$e(),Me.poolSize=8192,Me._augment=function(e){return e.__proto__=Me.prototype,e},Me.from=function(e,t,o){return Ae(null,e,t,o)},Me.TYPED_ARRAY_SUPPORT&&(Me.prototype.__proto__=Uint8Array.prototype,Me.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Me[Symbol.species]),Me.alloc=function(e,t,o){return function(e,t,o,i){return De(t),t<=0?Te(e,t):void 0!==o?"string"==typeof i?Te(e,t).fill(o,i):Te(e,t).fill(o):Te(e,t)}(null,e,t,o)},Me.allocUnsafe=function(e){return Re(null,e)},Me.allocUnsafeSlow=function(e){return Re(null,e)},Me.isBuffer=function(e){return null!=e&&(!!e._isBuffer||pt(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&pt(e.slice(0,0))}(e))},Me.compare=function(e,t){if(!Le(e)||!Le(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var o=e.length,i=t.length,n=0,r=Math.min(o,i);n<r;++n)if(e[n]!==t[n]){o=e[n],i=t[n];break}return o<i?-1:i<o?1:0},Me.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Me.concat=function(e,t){if(!Oe(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Me.alloc(0);var o;if(void 0===t)for(t=0,o=0;o<e.length;++o)t+=e[o].length;var i=Me.allocUnsafe(t),n=0;for(o=0;o<e.length;++o){var r=e[o];if(!Le(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(i,n),n+=r.length}return i},Me.byteLength=Ve,Me.prototype._isBuffer=!0,Me.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)ke(this,t,t+1);return this},Me.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)ke(this,t,t+3),ke(this,t+1,t+2);return this},Me.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)ke(this,t,t+7),ke(this,t+1,t+6),ke(this,t+2,t+5),ke(this,t+3,t+4);return this},Me.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Ye(this,0,e):Pe.apply(this,arguments)},Me.prototype.equals=function(e){if(!Le(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Me.compare(this,e)},Me.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Me.prototype.compare=function(e,t,o,i,n){if(!Le(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===o&&(o=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||o>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=o)return 0;if(i>=n)return-1;if(t>=o)return 1;if(this===e)return 0;for(var r=(n>>>=0)-(i>>>=0),a=(o>>>=0)-(t>>>=0),s=Math.min(r,a),l=this.slice(i,n),d=e.slice(t,o),c=0;c<s;++c)if(l[c]!==d[c]){r=l[c],a=d[c];break}return r<a?-1:a<r?1:0},Me.prototype.includes=function(e,t,o){return-1!==this.indexOf(e,t,o)},Me.prototype.indexOf=function(e,t,o){return _e(this,e,t,o,!0)},Me.prototype.lastIndexOf=function(e,t,o){return _e(this,e,t,o,!1)},Me.prototype.write=function(e,t,o,i){if(void 0===t)i="utf8",o=this.length,t=0;else if(void 0===o&&"string"==typeof t)i=t,o=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(o)?(o|=0,void 0===i&&(i="utf8")):(i=o,o=void 0)}var n=this.length-t;if((void 0===o||o>n)&&(o=n),e.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var r=!1;;)switch(i){case"hex":return Ue(this,e,t,o);case"utf8":case"utf-8":return Be(this,e,t,o);case"ascii":return qe(this,e,t,o);case"latin1":case"binary":return ze(this,e,t,o);case"base64":return We(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(this,e,t,o);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},Me.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Qe=4096;function Je(e,t,o){var i="";o=Math.min(e.length,o);for(var n=t;n<o;++n)i+=String.fromCharCode(127&e[n]);return i}function Xe(e,t,o){var i="";o=Math.min(e.length,o);for(var n=t;n<o;++n)i+=String.fromCharCode(e[n]);return i}function Ke(e,t,o){var i=e.length;(!t||t<0)&&(t=0),(!o||o<0||o>i)&&(o=i);for(var n="",r=t;r<o;++r)n+=gt(e[r]);return n}function et(e,t,o){for(var i=e.slice(t,o),n="",r=0;r<i.length;r+=2)n+=String.fromCharCode(i[r]+256*i[r+1]);return n}function tt(e,t,o){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>o)throw new RangeError("Trying to access beyond buffer length")}function ot(e,t,o,i,n,r){if(!Le(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<r)throw new RangeError('"value" argument is out of bounds');if(o+i>e.length)throw new RangeError("Index out of range")}function it(e,t,o,i){t<0&&(t=65535+t+1);for(var n=0,r=Math.min(e.length-o,2);n<r;++n)e[o+n]=(t&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function nt(e,t,o,i){t<0&&(t=4294967295+t+1);for(var n=0,r=Math.min(e.length-o,4);n<r;++n)e[o+n]=t>>>8*(i?n:3-n)&255}function rt(e,t,o,i,n,r){if(o+i>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function at(e,t,o,i,n){return n||rt(e,0,o,4),Ce(e,t,o,i,23,4),o+4}function st(e,t,o,i,n){return n||rt(e,0,o,8),Ce(e,t,o,i,52,8),o+8}Me.prototype.slice=function(e,t){var o,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),Me.TYPED_ARRAY_SUPPORT)(o=this.subarray(e,t)).__proto__=Me.prototype;else{var n=t-e;o=new Me(n,void 0);for(var r=0;r<n;++r)o[r]=this[r+e]}return o},Me.prototype.readUIntLE=function(e,t,o){e|=0,t|=0,o||tt(e,t,this.length);for(var i=this[e],n=1,r=0;++r<t&&(n*=256);)i+=this[e+r]*n;return i},Me.prototype.readUIntBE=function(e,t,o){e|=0,t|=0,o||tt(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},Me.prototype.readUInt8=function(e,t){return t||tt(e,1,this.length),this[e]},Me.prototype.readUInt16LE=function(e,t){return t||tt(e,2,this.length),this[e]|this[e+1]<<8},Me.prototype.readUInt16BE=function(e,t){return t||tt(e,2,this.length),this[e]<<8|this[e+1]},Me.prototype.readUInt32LE=function(e,t){return t||tt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Me.prototype.readUInt32BE=function(e,t){return t||tt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Me.prototype.readIntLE=function(e,t,o){e|=0,t|=0,o||tt(e,t,this.length);for(var i=this[e],n=1,r=0;++r<t&&(n*=256);)i+=this[e+r]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},Me.prototype.readIntBE=function(e,t,o){e|=0,t|=0,o||tt(e,t,this.length);for(var i=t,n=1,r=this[e+--i];i>0&&(n*=256);)r+=this[e+--i]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},Me.prototype.readInt8=function(e,t){return t||tt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Me.prototype.readInt16LE=function(e,t){t||tt(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},Me.prototype.readInt16BE=function(e,t){t||tt(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},Me.prototype.readInt32LE=function(e,t){return t||tt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Me.prototype.readInt32BE=function(e,t){return t||tt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Me.prototype.readFloatLE=function(e,t){return t||tt(e,4,this.length),Se(this,e,!0,23,4)},Me.prototype.readFloatBE=function(e,t){return t||tt(e,4,this.length),Se(this,e,!1,23,4)},Me.prototype.readDoubleLE=function(e,t){return t||tt(e,8,this.length),Se(this,e,!0,52,8)},Me.prototype.readDoubleBE=function(e,t){return t||tt(e,8,this.length),Se(this,e,!1,52,8)},Me.prototype.writeUIntLE=function(e,t,o,i){(e=+e,t|=0,o|=0,i)||ot(this,e,t,o,Math.pow(2,8*o)-1,0);var n=1,r=0;for(this[t]=255&e;++r<o&&(n*=256);)this[t+r]=e/n&255;return t+o},Me.prototype.writeUIntBE=function(e,t,o,i){(e=+e,t|=0,o|=0,i)||ot(this,e,t,o,Math.pow(2,8*o)-1,0);var n=o-1,r=1;for(this[t+n]=255&e;--n>=0&&(r*=256);)this[t+n]=e/r&255;return t+o},Me.prototype.writeUInt8=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,1,255,0),Me.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Me.prototype.writeUInt16LE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,2,65535,0),Me.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):it(this,e,t,!0),t+2},Me.prototype.writeUInt16BE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,2,65535,0),Me.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):it(this,e,t,!1),t+2},Me.prototype.writeUInt32LE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,4,4294967295,0),Me.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},Me.prototype.writeUInt32BE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,4,4294967295,0),Me.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},Me.prototype.writeIntLE=function(e,t,o,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*o-1);ot(this,e,t,o,n-1,-n)}var r=0,a=1,s=0;for(this[t]=255&e;++r<o&&(a*=256);)e<0&&0===s&&0!==this[t+r-1]&&(s=1),this[t+r]=(e/a|0)-s&255;return t+o},Me.prototype.writeIntBE=function(e,t,o,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*o-1);ot(this,e,t,o,n-1,-n)}var r=o-1,a=1,s=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===s&&0!==this[t+r+1]&&(s=1),this[t+r]=(e/a|0)-s&255;return t+o},Me.prototype.writeInt8=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,1,127,-128),Me.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Me.prototype.writeInt16LE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,2,32767,-32768),Me.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):it(this,e,t,!0),t+2},Me.prototype.writeInt16BE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,2,32767,-32768),Me.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):it(this,e,t,!1),t+2},Me.prototype.writeInt32LE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,4,2147483647,-2147483648),Me.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},Me.prototype.writeInt32BE=function(e,t,o){return e=+e,t|=0,o||ot(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Me.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},Me.prototype.writeFloatLE=function(e,t,o){return at(this,e,t,!0,o)},Me.prototype.writeFloatBE=function(e,t,o){return at(this,e,t,!1,o)},Me.prototype.writeDoubleLE=function(e,t,o){return st(this,e,t,!0,o)},Me.prototype.writeDoubleBE=function(e,t,o){return st(this,e,t,!1,o)},Me.prototype.copy=function(e,t,o,i){if(o||(o=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<o&&(i=o),i===o)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-o&&(i=e.length-t+o);var n,r=i-o;if(this===e&&o<t&&t<i)for(n=r-1;n>=0;--n)e[n+t]=this[n+o];else if(r<1e3||!Me.TYPED_ARRAY_SUPPORT)for(n=0;n<r;++n)e[n+t]=this[n+o];else Uint8Array.prototype.set.call(e,this.subarray(o,o+r),t);return r},Me.prototype.fill=function(e,t,o,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,o=this.length):"string"==typeof o&&(i=o,o=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!Me.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<o)throw new RangeError("Out of range index");if(o<=t)return this;var r;if(t>>>=0,o=void 0===o?this.length:o>>>0,e||(e=0),"number"==typeof e)for(r=t;r<o;++r)this[r]=e;else{var a=Le(e)?e:ft(new Me(e,i).toString()),s=a.length;for(r=0;r<o-t;++r)this[r+t]=a[r%s]}return this};var lt,dt,ct,ut,vt,ht,mt=/[^+\/0-9A-Za-z-_]/g;function gt(e){return e<16?"0"+e.toString(16):e.toString(16)}function ft(e,t){var o;t=t||1/0;for(var i=e.length,n=null,r=[],a=0;a<i;++a){if((o=e.charCodeAt(a))>55295&&o<57344){if(!n){if(o>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&r.push(239,191,189);continue}n=o;continue}if(o<56320){(t-=3)>-1&&r.push(239,191,189),n=o;continue}o=65536+(n-55296<<10|o-56320)}else n&&(t-=3)>-1&&r.push(239,191,189);if(n=null,o<128){if((t-=1)<0)break;r.push(o)}else if(o<2048){if((t-=2)<0)break;r.push(o>>6|192,63&o|128)}else if(o<65536){if((t-=3)<0)break;r.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return r}function yt(e){return function(e){var t,o,i,n,r,a;pe||Ee();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");r="="===e[s-2]?2:"="===e[s-1]?1:0,a=new be(3*s/4-r),i=r>0?s-4:s;var l=0;for(t=0,o=0;t<i;t+=4,o+=3)n=ye[e.charCodeAt(t)]<<18|ye[e.charCodeAt(t+1)]<<12|ye[e.charCodeAt(t+2)]<<6|ye[e.charCodeAt(t+3)],a[l++]=n>>16&255,a[l++]=n>>8&255,a[l++]=255&n;return 2===r?(n=ye[e.charCodeAt(t)]<<2|ye[e.charCodeAt(t+1)]>>4,a[l++]=255&n):1===r&&(n=ye[e.charCodeAt(t)]<<10|ye[e.charCodeAt(t+1)]<<4|ye[e.charCodeAt(t+2)]>>2,a[l++]=n>>8&255,a[l++]=255&n),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(mt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function bt(e,t,o,i){for(var n=0;n<i&&!(n+o>=t.length||n>=e.length);++n)t[n+o]=e[n];return n}function pt(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Et(){if(dt)return lt;dt=1;var e=R;return lt=function(t,o){o=o||new FormData;var i=[];function n(t){return null===t?"":e.isDate(t)?t.toISOString():e.isArrayBuffer(t)||e.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Me.from(t):t}return function t(r,a){if(e.isPlainObject(r)||e.isArray(r)){if(-1!==i.indexOf(r))throw Error("Circular reference detected in "+a);i.push(r),e.forEach(r,function(i,r){if(!e.isUndefined(i)){var s,l=a?a+"."+r:r;if(i&&!a&&"object"==typeof i)if(e.endsWith(r,"{}"))i=JSON.stringify(i);else if(e.endsWith(r,"[]")&&(s=e.toArray(i)))return void s.forEach(function(t){!e.isUndefined(t)&&o.append(l,n(t))});t(i,l)}}),i.pop()}else o.append(a,n(r))}(t),o},lt}function wt(){if(ut)return ct;ut=1;var e=me();return ct=function(t,o,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?o(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}}function It(){if(ht)return vt;ht=1;var e=R;return vt=e.isStandardBrowserEnv()?{write:function(t,o,i,n,r,a){var s=[];s.push(t+"="+encodeURIComponent(o)),e.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),e.isString(n)&&s.push("path="+n),e.isString(r)&&s.push("domain="+r),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}}var jt,St,Ct,Gt,Ot,$t,Tt,Mt,At,Dt,Rt,xt,Nt=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Lt=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},Vt=function(e,t){return e&&!Nt(t)?Lt(e,t):t};function Pt(){if(St)return jt;St=1;var e=R,t=["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 jt=function(o){var i,n,r,a={};return o?(e.forEach(o.split("\n"),function(o){if(r=o.indexOf(":"),i=e.trim(o.substr(0,r)).toLowerCase(),n=e.trim(o.substr(r+1)),i){if(a[i]&&t.indexOf(i)>=0)return;a[i]="set-cookie"===i?(a[i]?a[i]:[]).concat([n]):a[i]?a[i]+", "+n:n}}),a):a}}function kt(){if(Gt)return Ct;Gt=1;var e=R;return Ct=e.isStandardBrowserEnv()?function(){var t,o=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(e){var t=e;return o&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=n(window.location.href),function(o){var i=e.isString(o)?n(o):o;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0}}function _t(){if($t)return Ot;$t=1;var e=me();function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return R.inherits(t,e,{__CANCEL__:!0}),Ot=t}function Ft(){return Mt?Tt:(Mt=1,Tt=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""})}function Ut(){if(Dt)return At;Dt=1;var e=R,t=wt(),o=It(),i=L,n=Vt,r=Pt(),a=kt(),s=ge,l=me(),d=_t(),c=Ft();return At=function(u){return new Promise(function(v,h){var m,g=u.data,f=u.headers,y=u.responseType;function b(){u.cancelToken&&u.cancelToken.unsubscribe(m),u.signal&&u.signal.removeEventListener("abort",m)}e.isFormData(g)&&e.isStandardBrowserEnv()&&delete f["Content-Type"];var p=new XMLHttpRequest;if(u.auth){var E=u.auth.username||"",w=u.auth.password?unescape(encodeURIComponent(u.auth.password)):"";f.Authorization="Basic "+btoa(E+":"+w)}var I=n(u.baseURL,u.url);function j(){if(p){var e="getAllResponseHeaders"in p?r(p.getAllResponseHeaders()):null,o={data:y&&"text"!==y&&"json"!==y?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:e,config:u,request:p};t(function(e){v(e),b()},function(e){h(e),b()},o),p=null}}if(p.open(u.method.toUpperCase(),i(I,u.params,u.paramsSerializer),!0),p.timeout=u.timeout,"onloadend"in p?p.onloadend=j:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(j)},p.onabort=function(){p&&(h(new l("Request aborted",l.ECONNABORTED,u,p)),p=null)},p.onerror=function(){h(new l("Network Error",l.ERR_NETWORK,u,p,p)),p=null},p.ontimeout=function(){var e=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",t=u.transitional||s;u.timeoutErrorMessage&&(e=u.timeoutErrorMessage),h(new l(e,t.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,u,p)),p=null},e.isStandardBrowserEnv()){var S=(u.withCredentials||a(I))&&u.xsrfCookieName?o.read(u.xsrfCookieName):void 0;S&&(f[u.xsrfHeaderName]=S)}"setRequestHeader"in p&&e.forEach(f,function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),e.isUndefined(u.withCredentials)||(p.withCredentials=!!u.withCredentials),y&&"json"!==y&&(p.responseType=u.responseType),"function"==typeof u.onDownloadProgress&&p.addEventListener("progress",u.onDownloadProgress),"function"==typeof u.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",u.onUploadProgress),(u.cancelToken||u.signal)&&(m=function(e){p&&(h(!e||e&&e.type?new d:e),p.abort(),p=null)},u.cancelToken&&u.cancelToken.subscribe(m),u.signal&&(u.signal.aborted?m():u.signal.addEventListener("abort",m))),g||(g=null);var C=c(I);C&&-1===["http","https","file"].indexOf(C)?h(new l("Unsupported protocol "+C+":",l.ERR_BAD_REQUEST,u)):p.send(g)})},At}var Bt=R,qt=function(e,t){he.forEach(e,function(o,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=o,delete e[i])})},zt=me(),Wt=ge,Ht=Et(),Zt={"Content-Type":"application/x-www-form-urlencoded"};function Yt(e,t){!Bt.isUndefined(e)&&Bt.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Qt,Jt={transitional:Wt,adapter:(("undefined"!=typeof XMLHttpRequest||"[object process]"===Object.prototype.toString.call(ve))&&(Qt=Ut()),Qt),transformRequest:[function(e,t){if(qt(t,"Accept"),qt(t,"Content-Type"),Bt.isFormData(e)||Bt.isArrayBuffer(e)||Bt.isBuffer(e)||Bt.isStream(e)||Bt.isFile(e)||Bt.isBlob(e))return e;if(Bt.isArrayBufferView(e))return e.buffer;if(Bt.isURLSearchParams(e))return Yt(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var o,i=Bt.isObject(e),n=t&&t["Content-Type"];if((o=Bt.isFileList(e))||i&&"multipart/form-data"===n){var r=this.env&&this.env.FormData;return Ht(o?{"files[]":e}:e,r&&new r)}return i||"application/json"===n?(Yt(t,"application/json"),function(e,t,o){if(Bt.isString(e))try{return(t||JSON.parse)(e),Bt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(o||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Jt.transitional,o=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,n=!o&&"json"===this.responseType;if(n||i&&Bt.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw zt.from(e,zt.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:xt?Rt:(xt=1,Rt=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Bt.forEach(["delete","get","head"],function(e){Jt.headers[e]={}}),Bt.forEach(["post","put","patch"],function(e){Jt.headers[e]=Bt.merge(Zt)});var Xt,Kt,eo=Jt,to=R,oo=eo;function io(){return Kt?Xt:(Kt=1,Xt=function(e){return!(!e||!e.__CANCEL__)})}var no=R,ro=function(e,t,o){var i=this||oo;return to.forEach(o,function(o){e=o.call(i,e,t)}),e},ao=io(),so=eo,lo=_t();function co(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new lo}var uo,vo,ho=R,mo=function(e,t){t=t||{};var o={};function i(e,t){return ho.isPlainObject(e)&&ho.isPlainObject(t)?ho.merge(e,t):ho.isPlainObject(t)?ho.merge({},t):ho.isArray(t)?t.slice():t}function n(o){return ho.isUndefined(t[o])?ho.isUndefined(e[o])?void 0:i(void 0,e[o]):i(e[o],t[o])}function r(e){if(!ho.isUndefined(t[e]))return i(void 0,t[e])}function a(o){return ho.isUndefined(t[o])?ho.isUndefined(e[o])?void 0:i(void 0,e[o]):i(void 0,t[o])}function s(o){return o in t?i(e[o],t[o]):o in e?i(void 0,e[o]):void 0}var l={url:r,method:r,data:r,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 ho.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=l[e]||n,i=t(e);ho.isUndefined(i)&&t!==s||(o[e]=i)}),o};function go(){return vo?uo:(vo=1,uo={version:"0.27.2"})}var fo=go().version,yo=me(),bo={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){bo[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var po={};bo.transitional=function(e,t,o){function i(e,t){return"[Axios v"+fo+"] Transitional option '"+e+"'"+t+(o?". "+o:"")}return function(o,n,r){if(!1===e)throw new yo(i(n," has been removed"+(t?" in "+t:"")),yo.ERR_DEPRECATED);return t&&!po[n]&&(po[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(o,n,r)}};var Eo,wo,Io,jo,So,Co,Go={assertOptions:function(e,t,o){if("object"!=typeof e)throw new yo("options must be an object",yo.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),n=i.length;n-- >0;){var r=i[n],a=t[r];if(a){var s=e[r],l=void 0===s||a(s,r,e);if(!0!==l)throw new yo("option "+r+" must be "+l,yo.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new yo("Unknown option "+r,yo.ERR_BAD_OPTION)}},validators:bo},Oo=R,$o=L,To=k,Mo=function(e){return co(e),e.headers=e.headers||{},e.data=ro.call(e,e.data,e.headers,e.transformRequest),e.headers=no.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),no.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||so.adapter)(e).then(function(t){return co(e),t.data=ro.call(e,t.data,t.headers,e.transformResponse),t},function(t){return ao(t)||(co(e),t&&t.response&&(t.response.data=ro.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})},Ao=mo,Do=Vt,Ro=Go,xo=Ro.validators;function No(e){this.defaults=e,this.interceptors={request:new To,response:new To}}No.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Ao(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var o=t.transitional;void 0!==o&&Ro.assertOptions(o,{silentJSONParsing:xo.transitional(xo.boolean),forcedJSONParsing:xo.transitional(xo.boolean),clarifyTimeoutError:xo.transitional(xo.boolean)},!1);var i=[],n=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});var r,a=[];if(this.interceptors.response.forEach(function(e){a.push(e.fulfilled,e.rejected)}),!n){var s=[Mo,void 0];for(Array.prototype.unshift.apply(s,i),s=s.concat(a),r=Promise.resolve(t);s.length;)r=r.then(s.shift(),s.shift());return r}for(var l=t;i.length;){var d=i.shift(),c=i.shift();try{l=d(l)}catch(e){c(e);break}}try{r=Mo(l)}catch(e){return Promise.reject(e)}for(;a.length;)r=r.then(a.shift(),a.shift());return r},No.prototype.getUri=function(e){e=Ao(this.defaults,e);var t=Do(e.baseURL,e.url);return $o(t,e.params,e.paramsSerializer)},Oo.forEach(["delete","get","head","options"],function(e){No.prototype[e]=function(t,o){return this.request(Ao(o||{},{method:e,url:t,data:(o||{}).data}))}}),Oo.forEach(["post","put","patch"],function(e){function t(t){return function(o,i,n){return this.request(Ao(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}No.prototype[e]=t(),No.prototype[e+"Form"]=t(!0)});var Lo=R,Vo=m,Po=No,ko=mo;var _o=function e(t){var o=new Po(t),i=Vo(Po.prototype.request,o);return Lo.extend(i,Po.prototype,o),Lo.extend(i,o),i.create=function(o){return e(ko(t,o))},i}(eo);_o.Axios=Po,_o.CanceledError=_t(),_o.CancelToken=function(){if(wo)return Eo;wo=1;var e=_t();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var o;this.promise=new Promise(function(e){o=e});var i=this;this.promise.then(function(e){if(i._listeners){var t,o=i._listeners.length;for(t=0;t<o;t++)i._listeners[t](e);i._listeners=null}}),this.promise.then=function(e){var t,o=new Promise(function(e){i.subscribe(e),t=e}).then(e);return o.cancel=function(){i.unsubscribe(t)},o},t(function(t){i.reason||(i.reason=new e(t),o(i.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},t.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},t.source=function(){var e;return{token:new t(function(t){e=t}),cancel:e}},Eo=t}(),_o.isCancel=io(),_o.VERSION=go().version,_o.toFormData=Et(),_o.AxiosError=me(),_o.Cancel=_o.CanceledError,_o.all=function(e){return Promise.all(e)},_o.spread=jo?Io:(jo=1,Io=function(e){return function(t){return e.apply(null,t)}}),_o.isAxiosError=function(){if(Co)return So;Co=1;var e=R;return So=function(t){return e.isObject(t)&&!0===t.isAxiosError}}(),h.exports=_o,h.exports.default=_o;var Fo=i(h.exports);var Uo={exports:{}},Bo=n(Object.freeze({__proto__:null,default:{}}));!function(e){!function(t){var o,i,n,r,a;t?function(){var e=t.crypto||t.msCrypto;if(!o&&e&&e.getRandomValues)try{var n=new Uint8Array(16);r=o=function(){return e.getRandomValues(n),n},o()}catch(e){}if(!o){var a=new Array(16);i=o=function(){for(var e,t=0;t<16;t++)3&t||(e=4294967296*Math.random()),a[t]=e>>>((3&t)<<3)&255;return a},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}():function(){try{var e=Bo.randomBytes;n=o=e&&function(){return e(16)},o()}catch(e){}}();for(var s=Me,l=[],d={},c=0;c<256;c++)l[c]=(c+256).toString(16).substr(1),d[l[c]]=c;function u(e,t){var o=t||0,i=l;return i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]}var v=o(),h=[1|v[0],v[1],v[2],v[3],v[4],v[5]],m=16383&(v[6]<<8|v[7]),g=0,f=0;function y(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"===e?new s(16):null,e=null);var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var a=0;a<16;a++)t[n+a]=r[a];return t||u(r)}var b=y;b.v1=function(e,t,o){var i=t&&o||0,n=t||[],r=null!=(e=e||{}).clockseq?e.clockseq:m,a=null!=e.msecs?e.msecs:(new Date).getTime(),s=null!=e.nsecs?e.nsecs:f+1,l=a-g+(s-f)/1e4;if(l<0&&null==e.clockseq&&(r=r+1&16383),(l<0||a>g)&&null==e.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=a,f=s,m=r;var d=(1e4*(268435455&(a+=122192928e5))+s)%4294967296;n[i++]=d>>>24&255,n[i++]=d>>>16&255,n[i++]=d>>>8&255,n[i++]=255&d;var c=a/4294967296*1e4&268435455;n[i++]=c>>>8&255,n[i++]=255&c,n[i++]=c>>>24&15|16,n[i++]=c>>>16&255,n[i++]=r>>>8|128,n[i++]=255&r;for(var v=e.node||h,y=0;y<6;y++)n[i+y]=v[y];return t||u(n)},b.v4=y,b.parse=function(e,t,o){var i=t&&o||0,n=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){n<16&&(t[i+n++]=d[e])});n<16;)t[i+n++]=0;return t},b.unparse=u,b.BufferClass=s,b._rng=o,b._mathRNG=i,b._nodeRNG=n,b._whatwgRNG=r,e.exports?e.exports=b:(a=t.uuid,b.noConflict=function(){return t.uuid=a,b},t.uuid=b)}("undefined"!=typeof window?window:null)}(Uo);var qo=i(Uo.exports);class zo{constructor(e){Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}setOptions(e,t){console.log(this.obj.url+this.obj.prefix);return{method:"post",baseURL:this.obj.url+this.obj.prefix,url:e,responseType:"arraybuffer",headers:{"x-request-id":qo.v1(),"X-Requested-With":"XMLHttpRequest","Content-Type":"application/octet-stream"},data:t}}requestFuncProtobuff(e,t){return Fo(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 Fo({method:"post",baseURL:this.obj.url+this.obj.prefix,url:e,responseType:"json",headers:{"x-request-id":qo.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,o,i={}){const n={method:o,baseURL:this.obj.url+this.obj.prefix,url:e,responseType:"json",headers:i};return"get"===o?n.params=t:n.data=t,n.headers["x-request-id"]=qo.v1(),Fo(n).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}))}requestActionForAgent(e,t,o,i={}){const n={method:o,baseURL:this.obj.agentHost,url:e,responseType:"json",headers:i};return"get"===o?n.params=t:n.data=t,n.headers["x-request-id"]=qo.v1(),Fo(n).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 Wo{constructor(){Object.defineProperty(this,"listeners",{enumerable:!0,configurable:!0,writable:!0,value:[]})}static getInstance(){return this.instance||(this.instance=new Wo),this.instance}findListener(e){return this.listeners.find(t=>t.guid==e)}addListener(e){return e.guid=qo.v1(),e.time=(new Date).getTime(),this.listeners.push(e),e.guid}removeListener(e){const t=this.listeners.findIndex(t=>t.guid==e);t>=0&&this.listeners.splice(t,1)}randomString(e){const t=(new Date).getTime();e=e||32;const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(let t=0;t<e;t++)i+=o.charAt(Math.floor(62*Math.random()));return`${i}_${t}`}}const Ho=new Map([["Point","PointEntity"],["Point2D","Point2DEntity"],["Polygon","PolygonEntity"],["Polygon2D","Polygon2DEntity"],["Polyline","PolylineEntity"],["Polyline2D","Polyline2DEntity"],["Camera","CameraPresetEntity"],["Bound","MoveAlongPathEntity"],["HeatMap","BP_HeatMapEntity_C"],["Particle","ParticleEntity"],["Poi","PoiEntity"],["Text3D","Text3DEntity"],["ColumnarHeatMap","BP_ColumnarHeatMapEntity_C"],["HighlightArea","BP_HighlightAreaEntity_C"],["Path","BP_PathEntity_C"],["Range","BP_RangeEntity_C"],["Window","WindowEntity"],["Parabola","BP_ParabolaEntity_C"],["Light","LightEntity"],["Static","StaticMeshEntity"],["Hierarchy","HierarchyMeshEntity"],["Viewshed","BP_ViewshedEntity_C"],["Tiles","AesTilesEntity"],["Environment","WdpEnvironmentEntity"],["Effects","WdpEffectsEntity"],["Raster","BP_RasterEntity_C"],["RoadHeatMap","BP_RoadHeatMapEntity_C"],["RealTimeVideo","RealTimeVideoEntity"],["SpaceHeatMap","SpaceHeatMapEntity"],["Skeletal","SkeletalMeshEntity"],["CameraRoam","CameraRoamEntity"],["CameraStart","WdpCameraStartEntity"],["Section","BP_SectionEntity_C"],["Outliner","WdpSceneOutlinerEntity"],["Group","WdpGroupEntity"],["Material","WdpMaterialInstance"],["Vegetation","VegetationEntity"],["Project","WdpProjectEntity"],["LocalGeoReference","WdpLocalGeoReferenceEntity"],["GeoReference","WdpGeoReferenceEntity"],["ModelerEmbank","ModelerEmbankEntity"],["ModelerWater","ModelerWaterEntity"],["ModelerRiver","ModelerRiverEntity"],["ModelerFence","ModelerFenceEntity"],["ModelerFloor","ModelerFloorEntity"],["EarthTiles","AesEarthEntity"],["ProjectModel","ProjectModelEntity"],["ProjectInstance","ProjectInstanceEntity"],["StaticInstance","InstanceStaticMeshEntity"]]);class Zo{constructor(){Object.defineProperty(this,"EntityType",{enumerable:!0,configurable:!0,writable:!0,value:Ho}),Object.defineProperty(this,"ObjectTypes",{enumerable:!0,configurable:!0,writable:!0,value:[]})}Get(e){return e?this.ObjectTypes.find(t=>t.name===e):this.ObjectTypes}GetIndex(e){return this.ObjectTypes.findIndex(t=>t.name===e)}Delete(e){this.ObjectTypes.splice(e,1)}GetTypes(){return this.ObjectTypes}Register(e){this.ObjectTypes.push(...e)}GetByValue(e,t){for(const[o,i]of e.entries())if(i===t)return o;return null}}class Yo{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(e){return e?this.list.find(t=>t.obj.GetData().eid===e):this.list}Set(e,t){this.list.push({obj:e,func:t})}Remove(e){if(e){const t=this.list.findIndex(t=>t.obj.GetData().eid==e);t>=0&&this.list.splice(t,1)}else this.list=[]}GetDb(e){return e?this.dbList.find(t=>t.obj.GetData().eid===e):this.dbList}SetDb(e,t){this.dbList.push({obj:e,func:t})}RemoveDb(e){if(e){const t=this.dbList.findIndex(t=>t.obj.GetData().eid==e);t>=0&&this.dbList.splice(t,1)}else this.dbList=[]}GetEnter(e){return e?this.enterList.find(t=>t.obj.GetData().eid===e):this.enterList}SetEnter(e,t){this.enterList.push({obj:e,func:t})}RemoveEnter(e){if(e){const t=this.enterList.findIndex(t=>t.obj.GetData().eid==e);t>=0&&this.enterList.splice(t,1)}else this.enterList=[]}GetOut(e){return e?this.outList.find(t=>t.obj.GetData().eid===e):this.outList}SetOut(e,t){this.outList.push({obj:e,func:t})}RemoveOut(e){if(e){const t=this.outList.findIndex(t=>t.obj.GetData().eid==e);t>=0&&this.outList.splice(t,1)}else this.outList=[]}GetType(e){return e?this.listType.find(t=>t.type===e):this.listType}SetType(e,t){this.listType.push({type:e,func:t})}RemoveType(e){if(e){const t=this.listType.findIndex(t=>t.type==e);t>=0&&this.listType.splice(t,1)}else this.listType=[]}GetDbType(e){return e?this.dbListType.find(t=>t.type===e):this.dbListType}SetDbType(e,t){this.dbListType.push({type:e,func:t})}RemoveDbType(e){if(e){const t=this.dbListType.findIndex(t=>t.type==e);t>=0&&this.dbListType.splice(t,1)}else this.dbListType=[]}GetEnterType(e){return e?this.enterListType.find(t=>t.type===e):this.enterListType}SetEnterType(e,t){this.enterListType.push({type:e,func:t})}RemoveEnterType(e){if(e){const t=this.enterListType.findIndex(t=>t.type==e);t>=0&&this.enterListType.splice(t,1)}else this.enterListType=[]}GetOutType(e){return e?this.outListType.find(t=>t.type===e):this.outListType}SetOutType(e,t){this.outListType.push({type:e,func:t})}RemoveOutType(e){if(e){const t=this.outListType.findIndex(t=>t.type==e);t>=0&&this.outListType.splice(t,1)}else this.outListType=[]}}const Qo={company:"51WORLD",slogan:"Digital twin storm is now",version:"2.0.1_20027",updated:"2025/8/1 09:19:59",author:"51WORLD",document:"https://wdpapi.51aes.com/"},Jo=(e,o,i,n)=>t(void 0,void 0,void 0,function*(){var t;const o={},r=Object.keys(e.entitiesData);for(let a=0;a<r.length;a++){const s=i.GetByValue(i.EntityType,r[a]);if(o[s]=[],s)for(let l=0;l<e.entitiesData[r[a]].entities.length;l++){const d=n.get(`${e.entitiesData[r[a]].entities[l].Eid}`);if(d)d.generateObjectData(e.entitiesData[r[a]].entities[l]),o[s].push(d);else{const n=i.Get(s);if(n){const i=(null===(t=n.object)||void 0===t?void 0:t.GenerateObject)?yield n.object.GenerateObject(e.entitiesData[r[a]].entities[l]):yield n.object.Get(`${e.entitiesData[r[a]].entities[l].Eid}`);i.success&&o[s].push(i.result.object)}}}}return o}),Xo=(e,o,i,n)=>t(void 0,void 0,void 0,function*(){var t,r;const a=[],s=[];for(let t=0;t<e.length;t++){const o=n.get(`${e[t]}`);o?s.push(o):a.push(e[t])}if(a.length>0){const e=yield o.GetEntitiesData(a);if(e.success){const o=[];for(let n=0;n<e.result.entitiesData.length;n++){const r=i.GetByValue(i.EntityType,e.result.entitiesData[n].Type);if(r)if("Group"===r||"Bound"===r)o.push(e.result.entitiesData[n]);else{const o=i.Get(r);if(o){const i=(null===(t=o.object)||void 0===t?void 0:t.GenerateObject)?yield o.object.GenerateObject(e.result.entitiesData[n]):yield o.object.Get(`${e.result.entitiesData[n].Eid}`);i.success&&s.push(i.result.object)}}}if(o.length>0)for(let e=0;e<o.length;e++){const t=i.GetByValue(i.EntityType,o[e].Type);if(t){const n=i.Get(t);if(n){const t=(null===(r=n.object)||void 0===r?void 0:r.GenerateObject)?yield n.object.GenerateObject(o[e]):yield n.object.Get(`${o[e].Eid}`);t.success&&s.push(t.result.object)}}}}}return s}),Ko=(e,o,i,n)=>t(void 0,void 0,void 0,function*(){var t,r;const a={},s=[],l=Object.keys(e.entityTypeToEids);for(let t=0;t<l.length;t++){const o=i.GetByValue(i.EntityType,l[t]);if(o){a[o]=[];for(let i=0;i<e.entityTypeToEids[l[t]].eids.length;i++){const r=n.get(`${e.entityTypeToEids[l[t]].eids[i]}`);r?a[o].push(r):s.push(`${e.entityTypeToEids[l[t]].eids[i]}`)}}}if(s.length>0){const e=yield o.GetEntitiesData(s);if(e.success){const o=[];for(let n=0;n<e.result.entitiesData.length;n++){const r=i.GetByValue(i.EntityType,e.result.entitiesData[n].Type);if(r)if("Group"===r||"Bound"===r)o.push(e.result.entitiesData[n]);else{const o=i.Get(r);if(o){const i=(null===(t=o.object)||void 0===t?void 0:t.GenerateObject)?yield o.object.GenerateObject(e.result.entitiesData[n]):yield o.object.Get(`${e.result.entitiesData[n].Eid}`);i.success&&(a[r]?a[r].push(i.result.object):a[r]=[i.result.object])}}}if(o.length>0)for(let e=0;e<o.length;e++){const t=i.GetByValue(i.EntityType,o[e].Type);if(t){const n=i.Get(t);if(n){const i=(null===(r=n.object)||void 0===r?void 0:r.GenerateObject)?yield n.object.GenerateObject(o[e]):yield n.object.Get(`${o[e].Eid}`);i.success&&(a[t]?a[t].push(i.result.object):a[t]=[i.result.object])}}}}}return a}),ei=(e,o,i,n)=>t(void 0,void 0,void 0,function*(){var t;const r=e.success&&(null===(t=e.result)||void 0===t?void 0:t.sceneChangeInfo)?Object.assign(Object.assign({},e.result),{sceneChangeInfo:yield ti(e.result.sceneChangeInfo,o,i,n)}):e.result;return{success:e.success,message:e.message,result:r}}),ti=(e,o,i,n,r=!1)=>t(void 0,void 0,void 0,function*(){var t,a,s,l;const d={};if(e.addedEids.length>0){const s=[],l=[];for(let t=0;t<e.addedEids.length;t++){const o=n.get(e.addedEids[t]);if(o){if(r){const n=i.Get(o.oType);n&&(yield n.object.GetOnly(e.addedEids[t]))}l.push(o)}else s.push(`${e.addedEids[t]}`)}if(s.length>0){const e=yield o.GetEntitiesData(s);if(e.success){const o=[];for(let n=0;n<e.result.entitiesData.length;n++){const r=i.GetByValue(i.EntityType,e.result.entitiesData[n].Type);if(r)if("Group"===r||"Bound"===r)o.push(e.result.entitiesData[n]);else{const o=i.Get(r);if(o){const i=(null===(t=o.object)||void 0===t?void 0:t.GenerateObject)?yield o.object.GenerateObject(e.result.entitiesData[n]):yield o.object.Get(`${e.result.entitiesData[n].Eid}`);i.success&&l.push(i.result.object)}}}if(o.length>0)for(let e=0;e<o.length;e++){const t=i.GetByValue(i.EntityType,o[e].Type);if(t){const n=i.Get(t);if(n){const t=(null===(a=n.object)||void 0===a?void 0:a.GenerateObject)?yield n.object.GenerateObject(o[e]):yield n.object.Get(`${o[e].Eid}`);t.success&&l.push(t.result.object)}}}}}d.added=l}if(e.removedEids.length>0){const t=[];for(let o=0;o<e.removedEids.length;o++){const i=n.get(e.removedEids[o]);i&&i.DeleteFromCache(),t.push(e.removedEids[o])}d.removed=t}if(e.updateInfo){const t=[],r=Object.keys(e.updateInfo);if(r.length>0){const a=[];for(let o=0;o<r.length;o++){const i=n.get(r[o]);i?(i.generateObjectData&&i.generateObjectData(e.updateInfo[r[o]]),a.push(i)):t.push(`${r[o]}`)}if(t.length>0){const e=yield o.GetEntitiesData(t);if(e.success){const t=[];for(let o=0;o<e.result.entitiesData.length;o++){const n=i.GetByValue(i.EntityType,e.result.entitiesData[o].Type);if(n)if("Group"===n||"Bound"===n)t.push(e.result.entitiesData[o]);else{const t=i.Get(n);if(t){const i=(null===(s=t.object)||void 0===s?void 0:s.GenerateObject)?yield t.object.GenerateObject(e.result.entitiesData[o]):yield t.object.Get(`${e.result.entitiesData[o].Eid}`);i.success&&a.push(i.result.object)}}}if(t.length>0)for(let e=0;e<t.length;e++){const o=i.GetByValue(i.EntityType,t[e].Type);if(o){const n=i.Get(o);if(n){const o=(null===(l=n.object)||void 0===l?void 0:l.GenerateObject)?yield n.object.GenerateObject(t[e]):yield n.object.Get(`${t[e].Eid}`);o.success&&a.push(o.result.object)}}}}}d.updated=a}}return d}),oi=(e,o)=>t(void 0,void 0,void 0,function*(){const t=Object.keys(e),i={};for(let n=0;n<t.length;n++){const r=[],a=o.GetByValue(o.EntityType,t[n]);if(a){const s=o.Get(a);if(s){for(let o=0;o<e[t[n]].eids.length;o++){const i=yield s.object.Get(`${e[t[n]].eids[o]}`);i.success&&r.push(i.result.object)}i[a]=r}}else i[t[n]]=e[t[n]]}return i}),ii=(e,o,i)=>t(void 0,void 0,void 0,function*(){var t,n,r;const a={};if(e){const s=Object.keys(e);for(let l=0;l<s.length;l++){const d=yield o.GetEntitiesData(e[s[l]].eids);if(d.success&&(null===(n=null===(t=d.result)||void 0===t?void 0:t.entitiesData)||void 0===n?void 0:n.length)>0){a[s[l]]=[];for(let e=0;e<d.result.entitiesData.length;e++){const t=i.GetByValue(i.EntityType,d.result.entitiesData[e].Type);if(t){const o=i.Get(t);if(o){const t=yield o.object.Get(d.result.entitiesData[e].Eid);t.success&&(null===(r=t.result)||void 0===r?void 0:r.object)&&a[s[l]].push(t.result.object)}}}}}}return a}),ni=(e,t)=>{const o=[];return o[0]=void 0!==t.x?t.x:e.location[0],o[1]=void 0!==t.y?t.y:e.location[1],o[2]=void 0!==t.z?t.z:e.location[2],o},ri=(e,t)=>{const o={pitch:0,yaw:0,roll:0};return o.pitch=void 0!==t.pitch?t.pitch:e.rotator.pitch,o.yaw=void 0!==t.yaw?t.yaw:e.rotator.yaw,o.roll=void 0!==t.roll?t.roll:e.rotator.roll,o},ai=(e,t)=>{const o=[],i=[...t.values()];return e.forEach(e=>{o.push(...i.filter(t=>t.customId==e))}),o},si=(e,t)=>{const o=[],i=[...t.values()];return e.forEach(e=>{o.push(...i.filter(t=>t.entityName==e))}),o};class li{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 li),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: ${li.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(li,"globalInstance",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(li,"apiCRS",{enumerable:!0,configurable:!0,writable:!0,value:"EPSG:4326"}),Object.defineProperty(li,"sceneCRS",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(li,"coordType",{enumerable:!0,configurable:!0,writable:!0,value:"Geo"}),Object.defineProperty(li,"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(li,"columnarheatmapType",{enumerable:!0,configurable:!0,writable:!0,value:["cube","cylinder","needle","frame"]}),Object.defineProperty(li,"heatmapType",{enumerable:!0,configurable:!0,writable:!0,value:["fit","plane"]}),Object.defineProperty(li,"roadHeatMapType",{enumerable:!0,configurable:!0,writable:!0,value:["fit","plane"]}),Object.defineProperty(li,"parabolaType",{enumerable:!0,configurable:!0,writable:!0,value:["arrow","solid","scanline"]}),Object.defineProperty(li,"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(li,"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(li,"rangeFillAreaType",{enumerable:!0,configurable:!0,writable:!0,value:["none","solid","block","block2","dot","dot2","dot3","dash_line","radar"]}),Object.defineProperty(li,"rasterType",{enumerable:!0,configurable:!0,writable:!0,value:["fit","plane"]}),Object.defineProperty(li,"text3DType",{enumerable:!0,configurable:!0,writable:!0,value:["plain","reflection","metal"]}),Object.defineProperty(li,"shapeType",{enumerable:!0,configurable:!0,writable:!0,value:["polygon","circle"]}),Object.defineProperty(li,"snapModeType",{enumerable:!0,configurable:!0,writable:!0,value:["surface","ground","altitude"]}),Object.defineProperty(li,"samplerType",{enumerable:!0,configurable:!0,writable:!0,value:["Line","Grid","Uniform","Natural"]}),Object.defineProperty(li,"gridType",{enumerable:!0,configurable:!0,writable:!0,value:["Auto","Fixed"]}),Object.defineProperty(li,"controlModeType",{enumerable:!0,configurable:!0,writable:!0,value:["RTS","FPS","TPS"]}),Object.defineProperty(li,"sceneWeather",{enumerable:!0,configurable:!0,writable:!0,value:["Sunny","Cloudy","PartlyCloudy","Overcast","LightRain","ModerateRain","HeavyRain","LightSnow","ModerateSnow","HeavySnow","Foggy","Sand","Haze","auto"]}),Object.defineProperty(li,"directionType",{enumerable:!0,configurable:!0,writable:!0,value:["forward","backward","left","right","up","down"]}),Object.defineProperty(li,"directionType2",{enumerable:!0,configurable:!0,writable:!0,value:["clockwise","anticlockwise"]}),Object.defineProperty(li,"stateType",{enumerable:!0,configurable:!0,writable:!0,value:["play","pause","stop"]}),Object.defineProperty(li,"modeType",{enumerable:!0,configurable:!0,writable:!0,value:["none","normal","high","all"]}),Object.defineProperty(li,"coordZRefType",{enumerable:!0,configurable:!0,writable:!0,value:["surface","ground","altitude"]}),Object.defineProperty(li,"editormodeType",{enumerable:!0,configurable:!0,writable:!0,value:["Runtime","Editor"]}),Object.defineProperty(li,"gizmoStateType",{enumerable:!0,configurable:!0,writable:!0,value:["Disable","Enable"]}),Object.defineProperty(li,"gizmoCoordinateSystemType",{enumerable:!0,configurable:!0,writable:!0,value:["World","Local"]}),Object.defineProperty(li,"editModeType",{enumerable:!0,configurable:!0,writable:!0,value:["Create","Move","InsertOrDelete"]}),Object.defineProperty(li,"rendererModeType",{enumerable:!0,configurable:!0,writable:!0,value:["fixed","full"]}),Object.defineProperty(li,"selectModeType",{enumerable:!0,configurable:!0,writable:!0,value:["None","New","Add","Subtract","Reverse"]}),Object.defineProperty(li,"updateType",{enumerable:!0,configurable:!0,writable:!0,value:["Insert","Append","Remove","Update"]}),Object.defineProperty(li,"baseType",{enumerable:!0,configurable:!0,writable:!0,value:["Asphalt","Brick","Concert","GrassRoad","PlasticTrack","StoneRoad","Wood"]}),Object.defineProperty(li,"sideType",{enumerable:!0,configurable:!0,writable:!0,value:["Brick","ConcreteGrassGrid","GrassSlope","Landscape","SoilSlope","StoneSlope","ConcreteVertical","Wood","GrassSlope_02","StoneSlope_02"]}),Object.defineProperty(li,"fenceType",{enumerable:!0,configurable:!0,writable:!0,value:["ConcreteFence","GrassFence","MetalRail","StoneRail","WoodRail","MetalRail_02"]}),Object.defineProperty(li,"waterType",{enumerable:!0,configurable:!0,writable:!0,value:["Water01","Water02","Water03","Water04","Water05","Water06","Water07","Water08","Water09"]}),Object.defineProperty(li,"layersType",{enumerable:!0,configurable:!0,writable:!0,value:["Terrain","Building","Road","Tree","Water","District","Buildinginstance","Roadinstance","Districtinstance"]}),Object.defineProperty(li,"settingMode",{enumerable:!0,configurable:!0,writable:!0,value:["Auto","Custom"]}),Object.defineProperty(li,"coordTypes",{enumerable:!0,configurable:!0,writable:!0,value:["Local","Geo"]}),Object.defineProperty(li,"riverType",{enumerable:!0,configurable:!0,writable:!0,value:["River01","River02","River03","River04","River05"]}),Object.defineProperty(li,"stateReset",{enumerable:!0,configurable:!0,writable:!0,value:["Default","Last"]}),Object.defineProperty(li,"stateResetLimit",{enumerable:!0,configurable:!0,writable:!0,value:["Default","Free"]}),Object.defineProperty(li,"cameraStepMove",{enumerable:!0,configurable:!0,writable:!0,value:["E_Forward","E_Backward","E_Left","E_Right","E_Up","E_Down"]}),Object.defineProperty(li,"cameraStepRotate",{enumerable:!0,configurable:!0,writable:!0,value:["E_Pitch","E_Yaw"]}),Object.defineProperty(li,"sceneStyle",{enumerable:!0,configurable:!0,writable:!0,value:["comic","sketch","dark","ashy","false"]}),Object.defineProperty(li,"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(li,"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(li,"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(li,"ArrayDuplicateCoordType",{enumerable:!0,configurable:!0,writable:!0,value:["world","local"]}),Object.defineProperty(li,"anchorsType",{enumerable:!0,configurable:!0,writable:!0,value:["leftTop","leftMiddle","leftDown","middleTop","middleCenter","middleDown","rightTop","rightMiddle","rightDown"]}),Object.defineProperty(li,"alphaType",{enumerable:!0,configurable:!0,writable:!0,value:["decimal","integer"]}),Object.defineProperty(li,"labelContentJustificationType",{enumerable:!0,configurable:!0,writable:!0,value:["Left","Center","Right"]}),Object.defineProperty(li,"bgOverlapType",{enumerable:!0,configurable:!0,writable:!0,value:["backward","forward","hide"]}),Object.defineProperty(li,"scrollPolicyType",{enumerable:!0,configurable:!0,writable:!0,value:["default","always"]});class di{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(e,o){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"CreateEntities"},i={createEntityParams:e};o&&(i.operations=o);return yield this.obj.startApi(t,i)})}CreateEntitiesWithParamTemplate(e,o,i){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"CreateEntitiesWithParamTemplate"},n={defaultParam:e,batchParams:o};i&&(n.operations=i);return yield this.obj.startApi(t,n)})}UpdateEntitiesByEids(e,o){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"UpdateEntities"},i={eidToNewEntityParams:{}};e.forEach(e=>{i.eidToNewEntityParams[e.eid]=e.entities}),o&&(i.operations=o);const n=yield this.obj.startApi(t,i);return yield ei(n,this,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UpdateEntities(e,o,i){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"UpdateEntities"},n={eidToNewEntityParams:{}};n.eidToNewEntityParams[e]=o,i&&(n.operations=i);const r=yield this.obj.startApi(t,n);return yield ei(r,this,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RemoveEntity(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"RemoveEntityByEids"},o={eids:e},i=yield this.obj.startApi(t,o);return yield ei(i,this,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RemoveEntityByTypes(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"RemoveEntityByTypes"},o={types:e},i=yield this.obj.startApi(t,o);return yield ei(i,this,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetEntitiesData(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"GetEntitiesData"},o={eids:e};return yield this.obj.startApi(t,o)})}GetAllEntities(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"GetAllEntities"},o={};void 0!==e&&(o.entityTypes=e.map(e=>Ho.get(e)));return yield this.obj.startApi(t,o)})}GetAllEntitiesData(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"GetAllEntitiesData"},o={};void 0!==e&&(o.entityTypes=e.map(e=>Ho.get(e)));return yield this.obj.startApi(t,o)})}}class ci{constructor(e){Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}StartApi(e,o,i){return t(this,void 0,void 0,function*(){const t={apiClassName:e,apiFuncName:o};return yield this.obj.startApi(t,i)})}}class ui{validateStartByTaskId(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("string"!=typeof e)throw l&&l.func(`io ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`io ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if("string"!=typeof t)throw l&&l.func(`taskId ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`taskId ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateSetResolutionMultiple(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&("number"!=typeof e||e<0))throw r&&r.func(`multiple ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().positiveNumber}`),new Error(`multiple ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().positiveNumber}`)}validateSetResolution(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("number"!=typeof e||e<200)throw l&&l.func(`w ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}. and must be >= 200`),new Error(`w ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number}. and must be >= 200`);if("number"!=typeof t||t<200)throw l&&l.func(`h ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}. and must be >= 200`),new Error(`h ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}. and must be >= 200`)}}validateSetFrameRateLimit(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`maxFPS ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`maxFPS ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}validateSetBitrate(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`bitrate ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`bitrate ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}validateRegisterEvent(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`events ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`events ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw s&&s.func(`events value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`events value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);e.forEach(e=>{var t,o,i,n,r,a,l,d;const c={name:"",func:()=>{},sync:!1};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===c[e])throw s&&s.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0===e.name)throw s&&s.func(`the name of events value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().required}`),new Error(`the name of events value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().required}`);if("string"!=typeof e.name)throw s&&s.func(`the name of events value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`the name of events value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(void 0===e.func)throw s&&s.func(`the func of events value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().required}`),new Error(`the func of events value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`);if(void 0!==e.sync&&"boolean"!=typeof e.sync)throw s&&s.func(`the sync of events value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`),new Error(`the sync of events value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`)})}}validateUnRegisterEvent(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`events ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`events ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`events ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayString}`),new Error(`events ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`)}}validateSetRendererMode(e,t){var o,i,n,r,a,s,l,d,c,u;const v=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("string"!=typeof e)throw v&&v.func(`mode ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`mode ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(!li.rendererModeType.find(t=>t===e))throw v&&v.func(`mode ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.rendererModeType.toString()}`),new Error(`mode ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.rendererModeType.toString()}`);if(t&&void 0!==t){if("object"!=typeof t||void 0===t.length)throw v&&v.func(`resolution ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`),new Error(`resolution ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`);if(2!==t.filter(e=>"number"==typeof e&&e>=200).length)throw v&&v.func(`resolution value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayNumberLength} 2, and must be >= 200`),new Error(`resolution value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumberLength} 2, and must be >= 200`)}}}validateGetSnapshot(e,t){var o,i,n,r,a,s,l,d,c,u;const v=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw v&&v.func(`resolution ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`resolution ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e&&e>=200).length)throw v&&v.func(`resolution value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 2, and must be >= 200`),new Error(`resolution value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 2, and must be >= 200`);if("number"!=typeof t||t<0||t>1)throw v&&v.func(`quolity ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}. quolity ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} 0 ~ 1`),new Error(`quolity ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}. quolity ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} 0 ~ 1`)}}}class vi extends ci{constructor(e){super(e),Object.defineProperty(this,"RendererValidate",{enumerable:!0,configurable:!0,writable:!0,value:new ui})}Start(e="/Renderers/Any/order"){return this.obj.startCloud(e)}Restart(){return t(this,void 0,void 0,function*(){this.obj.sceneIsReady=!1,this.obj.reconenctWebRtc()})}Stop(){return t(this,void 0,void 0,function*(){this.obj.sceneIsReady=!1,this.obj.ObjectEidMap.clear();this.obj.RegisterObj.Get().forEach(e=>{var t;(null===(t=null==e?void 0:e.object)||void 0===t?void 0:t.clearMap)&&e.object.clearMap()}),this.obj.stopRenderCloud()})}StartByTaskId(e,t){return this.RendererValidate.validateStartByTaskId(e,t),this.obj.startCloudByTaskId(e,t)}SetResolutionMultiple(e=1){return t(this,void 0,void 0,function*(){return this.RendererValidate.validateSetResolutionMultiple(e),this.obj.setResolutionMultiple(e),{success:!0,message:""}})}GetMaxFpsRequest(){return t(this,void 0,void 0,function*(){this.obj.emitMaxFpsRequest()})}SetResolution(e,o){return t(this,void 0,void 0,function*(){return this.RendererValidate.validateSetResolution(e,o),e<200||o<200?{success:!1,message:`invalid resolution: ${e} x ${o}`}:(this.obj.setResolution(e,o),{success:!0,message:""})})}SetFrameRateLimit(e){return t(this,void 0,void 0,function*(){return this.RendererValidate.validateSetFrameRateLimit(e),e>60||e<2?{success:!1,message:"invalid maxFPS"}:(this.obj.setFrameRate(e),{success:!0,message:""})})}SetBitrate(e){return t(this,void 0,void 0,function*(){return this.RendererValidate.validateSetBitrate(e),e>15||e<5?{success:!1,message:"invalid bitrate"}:(this.obj.setBitrate(e),{success:!0,message:""})})}GetStats(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:yield this.obj.getAggregatedStats()}})}RegisterErrorEvent(e){var o;return t(this,void 0,void 0,function*(){this.RendererValidate.validateRegisterEvent(e),null===(o=li.getInstance())||void 0===o||o.Register(e)})}UnRegisterErrorEvent(e){var o;return t(this,void 0,void 0,function*(){this.RendererValidate.validateUnRegisterEvent(e),null===(o=li.getInstance())||void 0===o||o.RemoveEvent(e)})}RegisterEvent(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateRegisterEvent(e),this.obj.registerEvent(e)})}RegisterEvents(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateRegisterEvent(e),this.obj.registerEvents(e)})}UnRegisterEvent(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateUnRegisterEvent(e),this.obj.unRegisterEvent(e)})}UnRegisterEvents(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateUnRegisterEvent(e),this.obj.unRegisterEvents(e)})}RegisterSceneEvent(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateRegisterEvent(e),this.obj.registerSceneEvent(e)})}UnRegisterSceneEvent(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateUnRegisterEvent(e),this.obj.unRegisterSceneEvent(e)})}RegisterSceneEvents(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateRegisterEvent(e),this.obj.registerSceneEvents(e)})}UnRegisterSceneEvents(e){return t(this,void 0,void 0,function*(){this.RendererValidate.validateUnRegisterEvent(e),this.obj.unRegisterSceneEvents(e)})}GetRegisterSceneEvent(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:[...this.obj.UeEvent].map(e=>e[0]).filter(e=>e.indexOf("_system")<0)}})}GetRegisterSceneEvents(){return t(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,o){return t(this,void 0,void 0,function*(){this.RendererValidate.validateSetRendererMode(e,o),this.obj.setRendererMode(e,o)})}GetSnapshot(e,o=1){return t(this,void 0,void 0,function*(){this.RendererValidate.validateGetSnapshot(e,o);const t=((e,t,o,i=1)=>{var n;let r=null;const a=document.getElementById(e),s=document.createElement("canvas");return s.width=t,s.height=o,a&&(null===(n=s.getContext("2d"))||void 0===n||n.drawImage(a,0,0,t,o),r=s.toDataURL("image/jpeg",i)),r})("streamingVideo",e[0],e[1],o);return{success:!0,message:"",result:t}})}}class hi{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 t(this,void 0,void 0,function*(){const e={apiClassName:this.apiClassName,apiFuncName:"GetDebugLogs"},t=yield this.obj.startApi(e,{});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class mi{validateSetLogMode(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("string"!=typeof e)throw s&&s.func(`mode ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`mode ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(!li.modeType.find(t=>t===e))throw s&&s.func(`mode ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().range} ${li.modeType.toString()}`),new Error(`mode ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.modeType.toString()}`)}}}class gi extends ci{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 mi}),this.Log=new hi(e)}SetLogMode(e="none"){return t(this,void 0,void 0,function*(){this.DebugValidate.validateSetLogMode(e),this.obj.setLogLevel(e)})}StartRecord(){return t(this,void 0,void 0,function*(){this.obj.recordMode=!0})}EndRecord(){return t(this,void 0,void 0,function*(){this.obj.recordMode=!1})}GetRecord(){return t(this,void 0,void 0,function*(){return this.obj.record})}GetDebugLogs(){return t(this,void 0,void 0,function*(){return yield this.Log.GetDebugLogs()})}DownloadDebugLogs(){return t(this,void 0,void 0,function*(){const e=(yield this.GetDebugLogs()).result.logCaches,t=new Blob([e],{type:"text/plain"}),o=document.createElement("a");o.download="logs.log";const i=window.URL||window.webkitURL||window;o.href=i.createObjectURL(t),o.click(),i.revokeObjectURL(t)})}}class fi extends ci{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 di(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()]}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(e){return t(this,void 0,void 0,function*(){const t=yield this.RequestEntity.RemoveEntity(e);return t.success&&e.length>0&&e.forEach(e=>{this.removeFromMap(e),this.obj.ObjectEidMap.delete(e)}),t})}SetLocation(e,o){return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`),i=yield this.RequestEntity.UpdateEntities(e,{TransformAtom:{location:o}});if(i.success&&t){const e={location:o};this.generateDataObject(e,t.object)}return i})}SetRotator(e,o){return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`),i=yield this.RequestEntity.UpdateEntities(e,{TransformAtom:{rotator:o}});if(i.success&&t){const e={rotator:o};this.generateDataObject(e,t.object)}return i})}SetScale3d(e,o){return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`),i=yield this.RequestEntity.UpdateEntities(e,{TransformAtom:{scale3d:o}});if(i.success&&t){const e={scale3d:o};this.generateDataObject(e,t.object)}return i})}SetVisible(e,o=!0){return t(this,void 0,void 0,function*(){const t=yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e,entities:{VisibleAtom:{bVisible:o}}})));return t.success&&e.length>0&&e.forEach(e=>{const t=this.findFromMap(`${e}`);t&&this.generateDataObject({bVisible:o},t.object)}),t})}ClearCache(){return t(this,void 0,void 0,function*(){return this.clearMap(),{success:!0,message:""}})}UpdateBasic(e,o){return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`),i={entityName:o.entityName,customId:o.customId,customData:"object"==typeof o.customData?JSON.stringify(o.customData):o.customData,parentEid:o.parentEid},n=yield this.RequestEntity.UpdateEntities(e,{BasicInfoAtom:i});return n.success&&t&&this.generateDataObject({entityName:o.entityName,customId:o.customId,customData:o.customData,parentEid:o.parentEid},t.object),n})}CreateWithTemplate(e,o,i){var n;return t(this,void 0,void 0,function*(){const t=new this.ObjectClass,r=[];let a={};const s=Object.assign({EntityType:Ho.get(this.type)},t.generateAtomData(e)),l=[];o.forEach(e=>{l.push(t.generateAtomData(e))});const d=i?yield this.RequestEntity.CreateEntitiesWithParamTemplate(s,l,i):yield this.RequestEntity.CreateEntitiesWithParamTemplate(s,l);if(d.success){o.forEach((t,o)=>{Reflect.deleteProperty(e,"type");const i=new this.ObjectClass(e);i.SetData(t),this.addToMap(`${d.result.eids[o]}`,{object:this.generateDataObject({eid:`${d.result.eids[o]}`},i)}),i.setObj(this.obj),r.push(i)});const t=!!i;(null===(n=d.result)||void 0===n?void 0:n.sceneChangeInfo)&&(a=yield ti(d.result.sceneChangeInfo,this.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap,t))}return{success:d.success,message:d.message,result:{objects:r,sceneChangeInfo:a}}})}GetObject(e){return Reflect.deleteProperty(e,"type"),new this.ObjectClass(e)}Create(e){return t(this,void 0,void 0,function*(){const t=new this.ObjectClass(e);return yield this.obj.Scene.Add(t)})}Add(e,o){var i;return t(this,void 0,void 0,function*(){let t={};e.setObj(this.obj);const n=Object.assign({},e.addNewScheme),r=o?yield this.RequestEntity.CreateEntities([n],o):yield this.RequestEntity.CreateEntities([n]);if(r.success){const n={eid:`${r.result.eids[0]}`};if(this.addToMap(`${r.result.eids[0]}`,{object:this.generateDataObject(n,e)}),"Group"===e.oType){const t=this.obj.RegisterObj.Get(e.oType);t&&(yield t.object.GetOnly(e.eid))}const a=!!o;(null===(i=r.result)||void 0===i?void 0:i.sceneChangeInfo)&&(t=yield ti(r.result.sceneChangeInfo,this.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap,a))}return{success:r.success,message:r.message,result:{object:e,sceneChangeInfo:t}}})}Get(e){return t(this,void 0,void 0,function*(){if(!e)return{success:!0,result:this.findFromMap()};const t=this.findFromMap(`${e}`);if(t)return{success:!0,result:t};const o=yield this.RequestEntity.GetEntitiesData([`${e}`]);if(!o.success)return{success:!1,message:"Eid is non-existent"};const i=new this.ObjectClass({eid:e});return i.generateObjectData(o.result.entitiesData[0]),this.addToMap(`${e}`,{object:i}),i.setObj(this.obj),{success:!0,message:"",result:{object:i}}})}checkCacheExist(e){const t=this.findFromMap(`${e}`);return t?{success:!0,result:t}:{success:!1,message:""}}GenerateObject(e){return t(this,void 0,void 0,function*(){const t=new this.ObjectClass({eid:e.Eid});return t.generateObjectData(e),this.addToMap(`${e.Eid}`,{object:t}),t.setObj(this.obj),{success:!0,message:"",result:{object:t}}})}GetOnly(e){return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`);if(!t)return{success:!1,message:"Eid is illegal"};const o=yield this.RequestEntity.GetEntitiesData([`${e}`]);return o.success?(t.object.generateObjectData(o.result.entitiesData[0]),{success:!0}):{success:!1,message:"Eid is non-existent"}})}}class yi{Log(...e){console.group(`%c ${e[0]}`,"color:white;padding:5px;background:#CC4040;border-radius:5px;"),e.forEach((e,t)=>{t>0&&console.log(e)}),console.groupEnd()}}class bi{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,o,i){return t(this,void 0,void 0,function*(){if(!this.obj)return{success:!1,message:"Object is empty"};const t={apiClassName:e,apiFuncName:o};return yield this.obj.startApi(t,i)})}}const pi=e=>`${e>15?"":0}${e.toString(16)}`,Ei=e=>{const{r:t,g:o,b:i,a:n=1}=e;return`${pi(t)}${pi(o)}${pi(i)}${1===n?"":pi(Math.floor(255*n))}`},wi=e=>{let t=e,o=1;3===t.length&&(t=`${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`),8===t.length&&(o=parseInt(t.slice(6),16)/255,t=t.slice(0,6));const i=parseInt(t,16);return{r:i>>16&255,g:i>>8&255,b:255&i,a:o}},Ii=e=>{let t=e,o=255;3===t.length&&(t=`${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`),8===t.length&&(o=parseInt(t.slice(6),16),t=t.slice(0,6));const i=parseInt(t,16);return{r:i>>16&255,g:i>>8&255,b:255&i,a:o}},ji=e=>e.startsWith("#")?wi(e.slice(1)):e.startsWith("rgb")?(e=>{const t=e.match(/(\d(\.\d+)?)+/g)||[],o=t.map(e=>parseInt(e,10));return{r:o[0],g:o[1],b:o[2],a:parseFloat(t[3])}})(e):wi("transparent"===e?"00000000":e);class Si{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(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"SetOutlineThickness"},o={thickness:e},i=yield this.obj.startApi(t,o);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetOutlineThickness(){return t(this,void 0,void 0,function*(){const e={apiClassName:this.apiClassName,apiFuncName:"GetOutlineThickness"},t=yield this.obj.startApi(e,{});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetVisualColorStyle(e,o){return t(this,void 0,void 0,function*(){o=Ei("object"==typeof o?o:ji(o));const t={apiClassName:this.apiClassName,apiFuncName:"SetVisualColorStyle"},i={styleName:e,color:o},n=yield this.obj.startApi(t,i);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetVisualColorStyle(){return t(this,void 0,void 0,function*(){const e={apiClassName:this.apiClassName,apiFuncName:"GetVisualColorStyle"},t=yield this.obj.startApi(e,{});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEntityOutline(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"SetEntityOutline"},o=yield this.obj.startApi(t,e);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEntityHighlight(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"SetEntityHighlight"},o=yield this.obj.startApi(t,e);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}const Ci=(e,t)=>{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)},Gi=(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)};class Oi extends bi{constructor(){super(...arguments),Object.defineProperty(this,"err",{enumerable:!0,configurable:!0,writable:!0,value:new yi}),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"]})}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}getEid(){return{eid:this.eid}}setEid(e){void 0!==e.eid&&(this.Eid=e.eid)}handleDeleteAction(){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield new di(this.obj).RemoveEntity([this.eid])})}handleAtom(e,t){((e,t)=>{Object.keys(t).forEach(o=>{void 0!==t[o]&&(e[o]=t[o])})})(e,t)}handleAndCheckAtom(e,t){((e,t)=>{Object.keys(t).forEach(o=>{void 0!==e[o]&&(e[o]=t[o])})})(e,t)}validateEid(e){var t,o,i;const n=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("string"!=typeof e)throw n&&n.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().eidErr),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().eidErr)}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 t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.atomObj.GetData()}})}Update(e,o){var i;return t(this,void 0,void 0,function*(){(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState())&&this.atomObj.Validate&&this.atomObj.Validate(e);let t=!0;if(this.eid){const i=this.atomObj.generateAtomData?this.atomObj.generateAtomData(e):e;(o?yield new di(this.obj).UpdateEntities(this.eid,i,o):yield new di(this.obj).UpdateEntities(this.eid,i)).success||(t=!1)}return t&&this.atomObj.SetData(e),{success:t,message:""}})}Delete(){return t(this,void 0,void 0,function*(){return yield this.handleDeleteAction()})}SnapTo(e){return t(this,void 0,void 0,function*(){return yield new di(this.obj).UpdateEntities(this.eid,{},e)})}SetEntityOutline(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};const t={eids:[this.eid]};return void 0!==e.styleName&&(t.styleName=e.styleName),void 0!==e.bOutline&&(t.bOutline=e.bOutline),yield new Si(this.obj).SetEntityOutline(t)})}SetEntityHighlight(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};const t={eids:[this.eid]};return void 0!==e.styleName&&(t.styleName=e.styleName),void 0!==e.bHighlight&&(t.bHighlight=e.bHighlight),yield new Si(this.obj).SetEntityHighlight(t)})}GetAllScheme(){const e=this.atomObj.GetScheme?this.atomObj.GetScheme():{};return Object.assign({},e)}GetData(){return Object.assign({},this.getEid())}GetDataForEdit(){const e=this.atomObj.GetData();return e.eid&&Reflect.deleteProperty(e,"eid"),e}DeleteFromCache(){if(this.obj){const e=this.obj.RegisterObj.Get(this.oType);e&&e.object.removeFromMap(this.eid),this.obj.ObjectEidMap.delete(this.eid)}}generateObjectData(e,t=this.atomObj){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?this.generateObjectData(e[o],t[o]):t[o]=e[o])})}}class $i extends Oi{constructor(){super(...arguments),Object.defineProperty(this,"activeBaseAttributes",{enumerable:!0,configurable:!0,writable:!0,value:["eid","oType","entityName","customId","customData","parentEid","index","bVisible","bLocked"]}),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,"VisibleAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bVisible:!0}}),Object.defineProperty(this,"EntityFlagAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bLocked:!1}})}get bVisible(){return this.VisibleAtom.bVisible}set bVisible(e){this.handleVisibleAction(e).then(t=>{t.success&&(this.VisibleAtom.bVisible=e)})}get bLocked(){return this.EntityFlagAtom.bLocked}set bLocked(e){this.handleLockAction(e).then(t=>{t.success&&(this.EntityFlagAtom.bLocked=e)})}get entityName(){return this.BasicInfoAtom.entityName}set entityName(e){this.UpdateBasic({entityName:e}).then(t=>{t.success&&(this.BasicInfoAtom.entityName=e)})}get customId(){return this.BasicInfoAtom.customId}set customId(e){this.UpdateBasic({customId:e}).then(t=>{t.success&&(this.BasicInfoAtom.customId=e)})}get customData(){return this.BasicInfoAtom.customData}set customData(e){this.UpdateBasic({customData:e}).then(t=>{t.success&&(this.BasicInfoAtom.customData=e)})}get parentEid(){return this.BasicInfoAtom.parentEid}set parentEid(e){this.UpdateBasic({parentEid:e}).then(t=>{t.success&&(this.BasicInfoAtom.parentEid=e)})}get index(){return this.EntityOutlinerAtom.index}set index(e){this.UpdateOutliner({index:e}).then(t=>{t.success&&(this.EntityOutlinerAtom.index=e)})}GetLocked(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.EntityFlagAtom.bLocked}})}SetLocked(e=!0){return t(this,void 0,void 0,function*(){const t=yield this.handleLockAction(e);return t.success&&(this.EntityFlagAtom.bLocked=e),t})}GetVisible(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VisibleAtom.bVisible}})}SetVisible(e=!0){var o;return t(this,void 0,void 0,function*(){(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&this.validateVisible(e);const t=yield this.handleVisibleAction(e);return t.success&&(this.VisibleAtom.bVisible=e),t})}GetEntityName(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.entityName}})}SetEntityName(e){var o;return t(this,void 0,void 0,function*(){(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&this.validateEntityName(e);const t=yield this.UpdateBasic({entityName:e});return t.success&&(this.BasicInfoAtom.entityName=e),t})}GetCustomId(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.customId}})}SetCustomId(e){var o;return t(this,void 0,void 0,function*(){(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&this.validateCustomId(e);const t=yield this.UpdateBasic({customId:e});return t.success&&(this.BasicInfoAtom.customId=e),t})}GetCustomData(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.customData}})}SetCustomData(e){return t(this,void 0,void 0,function*(){const t=yield this.UpdateBasic({customData:e});return t.success&&(this.BasicInfoAtom.customData=e),t})}GetParentEid(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.parentEid}})}SetParentEid(e){return t(this,void 0,void 0,function*(){const t=yield this.UpdateBasic({parentEid:e});return t.success&&(this.BasicInfoAtom.parentEid=e),t})}handleVisibleAction(e=!0){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield new di(this.obj).UpdateEntitiesByEids([{eid:this.eid,entities:{VisibleAtom:{bVisible:e}}}])})}handleLockAction(e=!1){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield new di(this.obj).UpdateEntitiesByEids([{eid:this.eid,entities:{EntityFlagAtom:{bLocked:e}}}])})}getOtherData(){return{bVisible:this.bVisible,bLocked:this.bLocked,index:this.index}}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){Ci(this.BasicInfoAtom,e)}getBasicData(){return{entityName:this.BasicInfoAtom.entityName,customId:this.BasicInfoAtom.customId,customData:this.BasicInfoAtom.customData,parentEid:this.BasicInfoAtom.parentEid}}handleBasicAtom(e,t){Ci(e,t)}handleVisibleAtom(e,t){((e,t)=>{void 0!==t.bVisible&&(e.bVisible=t.bVisible)})(e,t)}handleLockedAtom(e,t){((e,t)=>{void 0!==t.bLocked&&(e.bLocked=t.bLocked)})(e,t)}handleEntityOutlinerAtom(e,t){((e,t)=>{void 0!==t.index&&(e.index=t.index)})(e,t)}validateEntityName(e){var t,o,i;const n=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("string"!=typeof e)throw n&&n.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().nameErr),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().nameErr)}validateCustomId(e){var t,o,i;const n=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("string"!=typeof e)throw n&&n.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().customIdErr),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().customIdErr)}validateVisible(e){var t,o,i;const n=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("boolean"!=typeof e)throw n&&n.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().bVisible),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().bVisible)}GetBasicScheme(){return{BasicInfoAtom:this.BasicInfoAtom}}GetVisibleScheme(){return{VisibleAtom:this.VisibleAtom}}GetBaseScheme(){return Object.assign(Object.assign({},this.GetBasicScheme()),this.GetVisibleScheme())}GetAllScheme(){const e=this.atomObj.GetScheme?this.atomObj.GetScheme():{};return Object.assign(Object.assign({},e),this.GetBaseScheme())}UpdateBasic(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};const t={};if(void 0!==e.entityName&&(t.entityName=e.entityName),void 0!==e.customId&&(t.customId=e.customId),void 0!==e.customData&&(t.customData="object"==typeof e.customData?JSON.stringify(e.customData):e.customData),void 0!==e.parentEid&&(t.parentEid=e.parentEid),Object.keys(t).length>0){return new di(this.obj).UpdateEntities(this.eid,{BasicInfoAtom:t})}return{success:!0,message:"No data change"}})}UpdateOutliner(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};const t={};if(void 0!==e.index&&(t.index=e.index),Object.keys(t).length>0){return new di(this.obj).UpdateEntities(this.eid,{EntityOutlinerAtom:t})}return{success:!0,message:"No data change"}})}SetVisibleCache(e=!0){this.VisibleAtom.bVisible=e}generateVisibleAtom(e){return{VisibleAtom:{bVisible:e}}}generateEntityFlagAtom(e){return{EntityFlagAtom:{bLocked:e}}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData())}GetDataForEdit(){const e=this.atomObj.GetData();return e.eid&&Reflect.deleteProperty(e,"eid"),e.bVisible&&Reflect.deleteProperty(e,"bVisible"),e.bLocked&&Reflect.deleteProperty(e,"bLocked"),e}}const Ti=(e,o,i,n,r,a)=>{const s=Object.keys(e);s.length>0&&s.forEach(s=>{if(!n.find(e=>e===s)){let n=s;const l=r.find(e=>e.name===s);l&&(n=l.newName),Object.defineProperty(o,n,{get:()=>e[s],set:e=>{const t={};a?(t[`${a}`]={},t[`${a}`][`${s}`]=e):t[`${s}`]=e,o.Update(t)}}),o[`Get${Ai(n,i)}`]=()=>t(void 0,void 0,void 0,function*(){return{success:!0,message:"",result:e[s]}}),o[`Set${Ai(n,i)}`]=e=>t(void 0,void 0,void 0,function*(){const t={};a?(t[`${a}`]={},t[`${a}`][`${s}`]=e):t[`${s}`]=e;return yield o.Update(t)}),i.find(e=>e===n)&&n.startsWith("b")&&(o[`Get${Mi(n)}`]=()=>t(void 0,void 0,void 0,function*(){return{success:!0,message:"",result:e[s]}}),o[`Set${Mi(n)}`]=e=>t(void 0,void 0,void 0,function*(){const t={};a?(t[`${a}`]={},t[`${a}`][`${s}`]=e):t[`${s}`]=e;return yield o.Update(t)}))}})};function Mi(e){return e.slice(1)}function Ai(e,t){return t.find(t=>t===e)||0===e.length?e:e.charAt(0).toUpperCase()+e.slice(1)}class Di extends $i{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=Ho.get(this.oType),Ti(this.WdpEnvironmentAtom,this,["bSkylightRealtime","bSceneWeatherRealtime"],[],[],"environmentStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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&&this.handleAtom(this.WdpEnvironmentAtom,e.environmentStyle)}generateAtomData(e){const t={},o={},i={},n={},r={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleLockedAtom(i,e),Object.keys(i).length>0&&(t.EntityFlagAtom=i),this.handleEntityOutlinerAtom(n,e),Object.keys(n).length>0&&(t.EntityOutlinerAtom=n),void 0!==e.environmentStyle&&this.handleAtom(r,e.environmentStyle),Object.keys(r).length>0&&(t.WdpEnvironmentAtom=r),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{environmentStyle:this.WdpEnvironmentAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j;const S=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw S&&S.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const C=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===C[e])throw S&&S.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.environmentStyle){if("object"!=typeof e.environmentStyle)throw S&&S.func(`environmentStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`environmentStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.WdpEnvironmentAtom;if(Object.keys(e.environmentStyle).forEach(e=>{var o,i;if(void 0===t[e])throw S&&S.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`environmentStyle.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.environmentStyle)||void 0===a?void 0:a.bSkylightRealtime)&&"boolean"!=typeof e.environmentStyle.bSkylightRealtime)throw S&&S.func(`environmentStyle.bSkylightRealtime ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`),new Error(`environmentStyle.bSkylightRealtime ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`);if(void 0!==(null===(d=e.environmentStyle)||void 0===d?void 0:d.bSceneWeatherRealtime)&&"boolean"!=typeof e.environmentStyle.bSceneWeatherRealtime)throw S&&S.func(`environmentStyle.bSceneWeatherRealtime ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`),new Error(`environmentStyle.bSceneWeatherRealtime ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`);if(void 0!==(null===(v=e.environmentStyle)||void 0===v?void 0:v.skylightTime)){if("string"!=typeof e.environmentStyle.skylightTime)throw S&&S.func(`environmentStyle.skylightTime ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`environmentStyle.skylightTime ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`);const t=e.environmentStyle.skylightTime.split(":");if(2!==t.length)throw S&&S.func("environmentStyle.skylightTime must be format 00:00"),new Error("environmentStyle.skylightTime must be format 00:00");if(parseInt(t[0])<0||parseInt(t[0])>24)throw S&&S.func(`environmentStyle.skylightTime hour ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} 00 ~ 24`),new Error(`environmentStyle.skylightTime hour ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} 00 ~ 24`);if(parseInt(t[1])<0||parseInt(t[1])>59)throw S&&S.func(`environmentStyle.skylightTime min ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().range} 00 ~ 59`),new Error(`environmentStyle.skylightTime min ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} 00 ~ 59`)}if(void 0!==(null===(p=e.environmentStyle)||void 0===p?void 0:p.sceneWeather)){if("string"!=typeof e.environmentStyle.sceneWeather)throw S&&S.func(`environmentStyle.sceneWeather ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`),new Error(`environmentStyle.sceneWeather ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().string}`);if(!li.sceneWeather.find(t=>{var o;return t===(null===(o=e.environmentStyle)||void 0===o?void 0:o.sceneWeather)}))throw S&&S.func(`environmentStyle.sceneWeather ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().range} ${li.sceneWeather.toString()}`),new Error(`environmentStyle.sceneWeather ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().range} ${li.sceneWeather.toString()}`)}}}}class Ri{validateGetCurrentWeather(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"string"!=typeof e)throw r&&r.func(`cityName ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`cityName ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`)}validateGetCityInfo(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"string"!=typeof e)throw r&&r.func(`cityName ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`cityName ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`)}validateSetRealTimeWeatherTimerAllowed(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"boolean"!=typeof e)throw r&&r.func(`isAllowed ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`isAllowed ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`)}validateSetSkylightTime(e,t,o){var i,n,r,a,s,l,d,c;const u=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("string"!=typeof e)throw u&&u.func(`skylightTime ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`skylightTime ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);const i=e.split(":");if(2!==i.length)throw u&&u.func("skylightTime must be format 00:00"),new Error("skylightTime must be format 00:00");if(parseInt(i[0])<0||parseInt(i[0])>24)throw u&&u.func("skylightTime hour must be 00 ~ 24"),new Error("skylightTime hour must be 00 ~ 24");if(parseInt(i[1])<0||parseInt(i[1])>59)throw u&&u.func("skylightTime min must be 00 ~ 59"),new Error("skylightTime min must be 00 ~ 59");if("number"!=typeof t)throw u&&u.func(`durationSeconds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`durationSeconds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if("boolean"!=typeof o)throw u&&u.func(`bRealtime ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bRealtime ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`)}}validateSetSceneWeather(e,t,o){var i,n,r,a,s,l,d,c;const u=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("string"!=typeof e)throw u&&u.func(`sceneWeather ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`sceneWeather ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if("number"!=typeof t)throw u&&u.func(`durationSeconds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`durationSeconds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if("boolean"!=typeof o)throw u&&u.func(`bRealtime ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bRealtime ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`)}}}class xi extends fi{constructor(e){super(e,Di),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpEnvironmentAPI"}),Object.defineProperty(this,"EnvironmentValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Ri}),this.setType("Environment")}GetCurrentWeather(e){return t(this,void 0,void 0,function*(){this.EnvironmentValidate.validateGetCurrentWeather(e);const t={cityName:e},o=yield this.StartApi(this.apiClassName,"RequestCurrentWeather",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetCityInfo(e){return t(this,void 0,void 0,function*(){this.EnvironmentValidate.validateGetCityInfo(e);const t={cityName:e},o=yield this.StartApi(this.apiClassName,"RequestCityInfo",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetRealTimeWeatherTimerAllowed(e=!0){return t(this,void 0,void 0,function*(){this.EnvironmentValidate.validateSetRealTimeWeatherTimerAllowed(e);const t={isAllowed:e},o=yield this.StartApi(this.apiClassName,"SetRealTimeWeatherTimerAllowed",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetSkylightTime(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"GetSkylightTime",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetSkylightTime(e,o,i=!1){return t(this,void 0,void 0,function*(){this.EnvironmentValidate.validateSetSkylightTime(e,o,i);const t={skylightTime:e,durationSeconds:o,bRealtime:i},n=yield this.StartApi(this.apiClassName,"SetSkylightTime",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetSceneWeather(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"GetSceneWeather",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetSceneWeather(e,o,i=!1){return t(this,void 0,void 0,function*(){this.EnvironmentValidate.validateSetSceneWeather(e,o,i);const t={sceneWeather:e,durationSeconds:o,bRealtime:i},n=yield this.StartApi(this.apiClassName,"SetSceneWeather",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Ni{validateToggleAPIEventChannel(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`apiEvents ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`apiEvents ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n,a,s;if("object"!=typeof e)throw r&&r.func(`apiEvents value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`apiEvents value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);const l={eventName:"",bOpen:!0};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===l[e])throw r&&r.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.eventName&&"string"!=typeof e.eventName)throw r&&r.func(`eventName ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`eventName ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(void 0!==e.bOpen&&"boolean"!=typeof e.bOpen)throw r&&r.func(`bOpen ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`),new Error(`bOpen ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`)})}}validateSetOption(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={url:"",order:"",resolution:[1920,1080]};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.url&&"string"!=typeof e.url)throw h&&h.func(`opt.url ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`opt.url ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(void 0!==e.order&&"string"!=typeof e.order)throw h&&h.func(`opt.order ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`opt.order ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(void 0!==e.resolution){if("object"!=typeof e.resolution||void 0===e.resolution.length)throw h&&h.func(`opt.resolution ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`opt.resolution ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(2!==e.resolution.filter(e=>"number"==typeof e&&e>=200).length)throw h&&h.func(`opt.resolution value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumberLength} 2. and must be >= 200`),new Error(`opt.resolution value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayNumberLength} 2. and must be >= 200`)}}}validateSetDefaultBrowserFunctionKeyboard(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"boolean"!=typeof e)throw r&&r.func(`bool ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bool ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`)}validateSetDefaultKeyboard(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"boolean"!=typeof e)throw r&&r.func(`bool ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bool ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`)}validateSetDeviceLock(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"boolean"!=typeof e)throw r&&r.func(`bool ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bool ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`)}validateSetFullScreen(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"boolean"!=typeof e)throw r&&r.func(`bool ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bool ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`)}validateSetTimeoutTime(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`timeout ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`timeout ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}validateSetApiRequestMode(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("string"!=typeof e)throw l&&l.func(`mode ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`mode ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if("string"!=typeof t)throw l&&l.func(`url ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`url ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateGetTypes(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"string"!=typeof e)throw r&&r.func(`category ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`category ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`)}}class Li extends ci{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 Ni})}ToggleAPIEventChannel(e){return t(this,void 0,void 0,function*(){this.SystemValidate.validateToggleAPIEventChannel(e);const t={apiClassName:this.WdpAPISystem,apiFuncName:"ToggleAPIEventChannel"},o=yield this.obj.startApi(t,{apiEvents:e});return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetInfomation(){var e,o;return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"GetApiVersion"},i=yield this.obj.startApi(t,{}),n=yield this.obj.Plugin.Get(),r=function(){const e=navigator.userAgent.toLocaleLowerCase(),t=/macintosh|mac os x/i.test(e);return/(iPhone)/i.test(navigator.userAgent)?"IOS":/(iPad)/i.test(navigator.userAgent)?"iPad":e.indexOf("win32")>=0||e.indexOf("wow32")>=0?"win32":e.indexOf("win64")>=0||e.indexOf("wow64")>=0?"win64":t?"mac":/(Android)/i.test(e)?"Android":"other"}(),a="fixed"===this.obj.rendererMode?this.obj.width:null===(e=document.getElementById(this.obj.id))||void 0===e?void 0:e.clientWidth,s="fixed"===this.obj.rendererMode?this.obj.height:null===(o=document.getElementById(this.obj.id))||void 0===o?void 0:o.clientHeight;return{success:!0,message:"",result:Object.assign(Object.assign({wdpApiJsSdk:Qo.version,wdpApiScenePlugins:i.success?i.result.version:null,renderingResolution:[a,s],screenResolution:[window.innerWidth,window.innerHeight]},Qo),{plugins:n.success?n.result:[],os:r,userAgent:navigator.userAgent})}})}SetOption(e){return t(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 t(this,void 0,void 0,function*(){this.SystemValidate.validateSetDefaultBrowserFunctionKeyboard(e),this.obj.setDefaultBrowserFunctionKeyboard(e)})}SetDefaultKeyboard(e=!0){return t(this,void 0,void 0,function*(){this.SystemValidate.validateSetDefaultKeyboard(e),this.obj.setDefaultKeyboard(e)})}SetDeviceLock(e=!1){return t(this,void 0,void 0,function*(){this.SystemValidate.validateSetDeviceLock(e),this.obj.setDeviceLock(e)})}SetFullScreen(e=!1){return t(this,void 0,void 0,function*(){this.SystemValidate.validateSetFullScreen(e),this.obj.setFullScreen(e)})}SetTimeoutTime(e=1e4){return t(this,void 0,void 0,function*(){this.SystemValidate.validateSetTimeoutTime(e),this.obj.timeoutTime=e})}SetApiRequestMode(e,o=""){return t(this,void 0,void 0,function*(){this.SystemValidate.validateSetApiRequestMode(e,o),this.obj.apiRequestMode=e,this.obj.apiRequestURL=o,this.obj.startSocketDebugMode()})}GetTypes(e){return t(this,void 0,void 0,function*(){e&&this.SystemValidate.validateGetTypes(e);const t=this.obj.RegisterObj.GetTypes();return e?{success:!0,message:"",result:t.filter(t=>t.category===e).map(e=>({type:e.name,category:e.category}))}:{success:!0,message:"",result:t.map(e=>({type:e.name,category:e.category}))}})}}class Vi extends ci{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpApiStateManager"})}Record(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"RecordApiState",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Reset(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"ResetApiState",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Pi{validateDisplay(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:[],coordZRef:0,coordZ:0};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),"object"!=typeof e.entity||void 0===e.entity.length)throw h&&h.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.entity.filter(e=>"object"==typeof e).length!==e.entity.length)throw h&&h.func(`entity value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`),new Error(`entity value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`);if("number"!=typeof e.coordZRef)throw h&&h.func(`coordZRef ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`coordZRef ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`);if("number"!=typeof e.coordZ)throw h&&h.func(`coordZ ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`coordZ ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`)}}}class ki extends ci{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 Pi})}Display(e){return t(this,void 0,void 0,function*(){this.CoordaideValidate.validateDisplay(e);const t={};t.eids=void 0!==e.entity?e.entity.map(e=>e.GetData().eid):[],t.coordZRef=void 0!==e.coordZRef?e.coordZRef:0,t.coordZ=void 0!==e.coordZ?e.coordZ:0;const o=yield this.StartApi(this.apiClassName,"DisplayCoordinate",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"ClearCoordinate",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class _i{validateCreateCADGeoRef(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw d&&d.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.cadPoints)){if("object"!=typeof e.cadPoints||void 0===e.cadPoints.length)throw d&&d.func(`cadPoints ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`cadPoints ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);e.cadPoints.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw d&&d.func(`cadPoints value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`cadPoints value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw d&&d.func(`the value of cadPoints value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of cadPoints value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==(null==e?void 0:e.worldPoints)){if("object"!=typeof e.worldPoints||void 0===e.worldPoints.length)throw d&&d.func(`worldPoints ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`worldPoints ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);e.worldPoints.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw d&&d.func(`worldPoints value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`worldPoints value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw d&&d.func(`the value of worldPoints value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of worldPoints value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}}}validateLocalFrom(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`local ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`local ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("object"!=typeof t||void 0===t.length)throw l&&l.func(`from ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`from ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);t.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw l&&l.func(`from value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`from value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw l&&l.func(`the value of from value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of from value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}}validateFrom(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`from ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`from ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw r&&r.func(`from value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`from value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(`the value of from value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of from value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}}validateCartesianToGIS(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`from ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`from ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw r&&r.func(`from value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`from value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(`the value of from value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of from value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}}validateWorldPosToScreenPos(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`worldPos ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`worldPos ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw s&&s.func(`worldPos value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayNumberLength} 3`),new Error(`worldPos value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 3`)}}}var Fi={exports:{}};!function(e){e.exports=function(){var e=function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var t=1;t<=60;++t)e("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),e("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]},t=1,o=2,i=3,n=4,r=5,a=6378137,s=6356752.314,l=.0066943799901413165,d=484813681109536e-20,c=Math.PI/2,u=.16666666666666666,v=.04722222222222222,h=.022156084656084655,m=1e-10,g=.017453292519943295,f=57.29577951308232,y=Math.PI/4,b=2*Math.PI,p=3.14159265359,E={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},w={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.01},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}},I=/[\s_\-\/\(\)]/g;function j(e,t){if(e[t])return e[t];for(var o,i=Object.keys(e),n=t.toLowerCase().replace(I,""),r=-1;++r<i.length;)if((o=i[r]).toLowerCase().replace(I,"")===n)return e[o]}var S=function(e){var t,o,i,n={},r=e.split("+").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var o=t.split("=");return o.push(!0),e[o[0].toLowerCase()]=o[1],e},{}),a={proj:"projName",datum:"datumCode",rf:function(e){n.rf=parseFloat(e)},lat_0:function(e){n.lat0=e*g},lat_1:function(e){n.lat1=e*g},lat_2:function(e){n.lat2=e*g},lat_ts:function(e){n.lat_ts=e*g},lon_0:function(e){n.long0=e*g},lon_1:function(e){n.long1=e*g},lon_2:function(e){n.long2=e*g},alpha:function(e){n.alpha=parseFloat(e)*g},gamma:function(e){n.rectified_grid_angle=parseFloat(e)},lonc:function(e){n.longc=e*g},x_0:function(e){n.x0=parseFloat(e)},y_0:function(e){n.y0=parseFloat(e)},k_0:function(e){n.k0=parseFloat(e)},k:function(e){n.k0=parseFloat(e)},a:function(e){n.a=parseFloat(e)},b:function(e){n.b=parseFloat(e)},r:function(e){n.a=n.b=parseFloat(e)},r_a:function(){n.R_A=!0},zone:function(e){n.zone=parseInt(e,10)},south:function(){n.utmSouth=!0},towgs84:function(e){n.datum_params=e.split(",").map(function(e){return parseFloat(e)})},to_meter:function(e){n.to_meter=parseFloat(e)},units:function(e){n.units=e;var t=j(w,e);t&&(n.to_meter=t.to_meter)},from_greenwich:function(e){n.from_greenwich=e*g},pm:function(e){var t=j(E,e);n.from_greenwich=(t||parseFloat(e))*g},nadgrids:function(e){"@null"===e?n.datumCode="none":n.nadgrids=e},axis:function(e){var t="ewnsud";3===e.length&&-1!==t.indexOf(e.substr(0,1))&&-1!==t.indexOf(e.substr(1,1))&&-1!==t.indexOf(e.substr(2,1))&&(n.axis=e)},approx:function(){n.approx=!0}};for(t in r)o=r[t],t in a?"function"==typeof(i=a[t])?i(o):n[i]=o:n[t]=o;return"string"==typeof n.datumCode&&"WGS84"!==n.datumCode&&(n.datumCode=n.datumCode.toLowerCase()),n},C=1,G=2,O=3,$=4,T=5,M=-1,A=/\s/,D=/[A-Za-z]/,R=/[A-Za-z84_]/,x=/[,\]]/,N=/[\d\.E\-\+]/;function L(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=C}function V(e){return new L(e).output()}function P(e,t,o){Array.isArray(t)&&(o.unshift(t),t=null);var i=t?{}:e,n=o.reduce(function(e,t){return k(t,e),e},i);t&&(e[t]=n)}function k(e,t){if(Array.isArray(e)){var o=e.shift();if("PARAMETER"===o&&(o=e.shift()),1===e.length)return Array.isArray(e[0])?(t[o]={},void k(e[0],t[o])):void(t[o]=e[0]);if(e.length)if("TOWGS84"!==o){if("AXIS"===o)return o in t||(t[o]=[]),void t[o].push(e);var i;switch(Array.isArray(o)||(t[o]={}),o){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[o]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&k(e[2],t[o]));case"SPHEROID":case"ELLIPSOID":return t[o]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&k(e[3],t[o]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return e[0]=["name",e[0]],void P(t,o,e);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return e[0]=["name",e[0]],P(t,o,e),void(t[o].type=o);default:for(i=-1;++i<e.length;)if(!Array.isArray(e[i]))return k(e,t[o]);return P(t,o,e)}}else t[o]=e;else t[o]=!0}else t[e]=!0}L.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==$)for(;A.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case C:return this.neutral(e);case G:return this.keyword(e);case $:return this.quoted(e);case T:return this.afterquote(e);case O:return this.number(e);case M:return}},L.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=$);if(x.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},L.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=C)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=C,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=M))):void 0},L.prototype.number=function(e){if(!N.test(e)){if(x.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},L.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=T},L.prototype.keyword=function(e){if(R.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=C)}if(!x.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},L.prototype.neutral=function(e){if(D.test(e))return this.word=e,void(this.state=G);if('"'===e)return this.word="",void(this.state=$);if(N.test(e))return this.word=e,void(this.state=O);if(!x.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},L.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===M)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var _=.017453292519943295,F=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function U(e,t){var o=t[0],i=t[1];!(o in e)&&i in e&&(e[o]=e[i],3===t.length&&(e[o]=t[2](e[o])))}function B(e){return e*_}function q(e){for(var t=Object.keys(e),o=0,i=t.length;o<i;++o){var n=t[o];-1!==F.indexOf(n)&&z(e[n]),"object"==typeof e[n]&&q(e[n])}}function z(e){if(e.AUTHORITY){var t=Object.keys(e.AUTHORITY)[0];t&&t in e.AUTHORITY&&(e.title=t+":"+e.AUTHORITY[t])}if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var o="",i=0,n=e.AXIS.length;i<n;++i){var r=[e.AXIS[i][0].toLowerCase(),e.AXIS[i][1].toLowerCase()];-1!==r[0].indexOf("north")||("y"===r[0]||"lat"===r[0])&&"north"===r[1]?o+="n":-1!==r[0].indexOf("south")||("y"===r[0]||"lat"===r[0])&&"south"===r[1]?o+="s":-1!==r[0].indexOf("east")||("x"===r[0]||"lon"===r[0])&&"east"===r[1]?o+="e":-1===r[0].indexOf("west")&&("x"!==r[0]&&"lon"!==r[0]||"west"!==r[1])||(o+="w")}2===o.length&&(o+="u"),3===o.length&&(e.axis=o)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var a=e.GEOGCS;function s(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(a=e),a&&(a.DATUM?e.datumCode=a.DATUM.name.toLowerCase():e.datumCode=a.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),"new_zealand_1949"===e.datumCode&&(e.datumCode="nzgd49"),"wgs_1984"!==e.datumCode&&"world_geodetic_system_1984"!==e.datumCode||("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"belge_1972"===e.datumCode&&(e.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(e.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=a.DATUM.SPHEROID.a,e.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(e.datum_params=a.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",B],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",B],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",B],["lat0","latitude_of_origin",B],["lat0","standard_parallel_1",B],["lat1","standard_parallel_1",B],["lat2","standard_parallel_2",B],["azimuth","Azimuth"],["alpha","azimuth",B],["srsCode","name"]].forEach(function(t){return U(e,t)}),e.long0||!e.longc||"Albers_Conic_Equal_Area"!==e.projName&&"Lambert_Azimuthal_Equal_Area"!==e.projName||(e.long0=e.longc),e.lat_ts||!e.lat1||"Stereographic_South_Pole"!==e.projName&&"Polar Stereographic (variant B)"!==e.projName?!e.lat_ts&&e.lat0&&"Polar_Stereographic"===e.projName&&(e.lat_ts=e.lat0,e.lat0=B(e.lat0>0?90:-90)):(e.lat0=B(e.lat1>0?90:-90),e.lat_ts=e.lat1)}var W=function(e){var t=V(e),o=t[0],i={};return k(t,i),q(i),i[o]};function H(e){var t=this;if(2===arguments.length){var o=arguments[1];"string"==typeof o?"+"===o.charAt(0)?H[e]=S(arguments[1]):H[e]=W(arguments[1]):H[e]=o}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?H.apply(t,e):H(e)});if("string"==typeof e){if(e in H)return H[e]}else"EPSG"in e?H["EPSG:"+e.EPSG]=e:"ESRI"in e?H["ESRI:"+e.ESRI]=e:"IAU2000"in e?H["IAU2000:"+e.IAU2000]=e:console.log(e);return}}function Z(e){return"string"==typeof e}function Y(e){return e in H}e(H);var Q=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function J(e){return Q.some(function(t){return e.indexOf(t)>-1})}var X=["3857","900913","3785","102113"];function K(e){var t=j(e,"authority");if(t){var o=j(t,"epsg");return o&&X.indexOf(o)>-1}}function ee(e){var t=j(e,"extension");if(t)return j(t,"proj4")}function te(e){return"+"===e[0]}function oe(e){if(!Z(e))return e;if(Y(e))return H[e];if(J(e)){var t=W(e);if(K(t))return H["EPSG:3857"];var o=ee(t);return o?S(o):t}return te(e)?S(e):void 0}var ie=function(e,t){var o,i;if(e=e||{},!t)return e;for(i in t)void 0!==(o=t[i])&&(e[i]=o);return e},ne=function(e,t,o){var i=e*t;return o/Math.sqrt(1-i*i)},re=function(e){return e<0?-1:1},ae=function(e){return Math.abs(e)<=p?e:e-re(e)*b},se=function(e,t,o){var i=e*o,n=.5*e;return i=Math.pow((1-i)/(1+i),n),Math.tan(.5*(c-t))/i},le=function(e,t){for(var o,i,n=.5*e,r=c-2*Math.atan(t),a=0;a<=15;a++)if(o=e*Math.sin(r),r+=i=c-2*Math.atan(t*Math.pow((1-o)/(1+o),n))-r,Math.abs(i)<=1e-10)return r;return-9999};function de(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ne(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function ce(e){var t,o,i=e.x,n=e.y;if(n*f>90&&n*f<-90&&i*f>180&&i*f<-180)return null;if(Math.abs(Math.abs(n)-c)<=m)return null;if(this.sphere)t=this.x0+this.a*this.k0*ae(i-this.long0),o=this.y0+this.a*this.k0*Math.log(Math.tan(y+.5*n));else{var r=Math.sin(n),a=se(this.e,n,r);t=this.x0+this.a*this.k0*ae(i-this.long0),o=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=o,e}function ue(e){var t,o,i=e.x-this.x0,n=e.y-this.y0;if(this.sphere)o=c-2*Math.atan(Math.exp(-n/(this.a*this.k0)));else{var r=Math.exp(-n/(this.a*this.k0));if(-9999===(o=le(this.e,r)))return null}return t=ae(this.long0+i/(this.a*this.k0)),e.x=t,e.y=o,e}var ve={init:de,forward:ce,inverse:ue,names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]};function he(){}function me(e){return e}var ge=[ve,{init:he,forward:me,inverse:me,names:["longlat","identity"]}],fe={},ye=[];function be(e,t){var o=ye.length;return e.names?(ye[o]=e,e.names.forEach(function(e){fe[e.toLowerCase()]=o}),this):(console.log(t),!0)}function pe(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==fe[t]&&ye[fe[t]]?ye[fe[t]]:void 0}function Ee(){ge.forEach(be)}var we={start:Ee,add:be,get:pe},Ie={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},je=Ie.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};function Se(e,t,o,i){var n=e*e,r=t*t,a=(n-r)/n,s=0;return i?(n=(e*=1-a*(u+a*(v+a*h)))*e,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(n-r)/r}}function Ce(e,t,o,i,n){if(!e){var r=j(Ie,i);r||(r=je),e=r.a,t=r.b,o=r.rf}return o&&!t&&(t=(1-1/o)*e),(0===o||Math.abs(e-t)<m)&&(n=!0,t=e),{a:e,b:t,rf:o,sphere:n}}Ie.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Ge={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};for(var Oe in Ge){var $e=Ge[Oe];Ge[$e.datumName]=$e}function Te(e,a,s,l,c,u,v){var h={};return h.datum_type=void 0===e||"none"===e?r:n,a&&(h.datum_params=a.map(parseFloat),0===h.datum_params[0]&&0===h.datum_params[1]&&0===h.datum_params[2]||(h.datum_type=t),h.datum_params.length>3&&(0===h.datum_params[3]&&0===h.datum_params[4]&&0===h.datum_params[5]&&0===h.datum_params[6]||(h.datum_type=o,h.datum_params[3]*=d,h.datum_params[4]*=d,h.datum_params[5]*=d,h.datum_params[6]=h.datum_params[6]/1e6+1))),v&&(h.datum_type=i,h.grids=v),h.a=s,h.b=l,h.es=c,h.ep2=u,h}var Me={};function Ae(e,t){var o=new DataView(t),i=Ne(o),n=Le(o,i),r={header:n,subgrids:Pe(o,n,i)};return Me[e]=r,r}function De(e){return void 0===e?null:e.split(",").map(Re)}function Re(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Me[e]||null,isNull:!1}}function xe(e){return e/3600*Math.PI/180}function Ne(e){var t=e.getInt32(8,!1);return 11!==t&&(11!==(t=e.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function Le(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:Ve(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}function Ve(e,t,o){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,o)))}function Pe(e,t,o){for(var i=176,n=[],r=0;r<t.nSubgrids;r++){var a=_e(e,i,o),s=Fe(e,i,a,o),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),d=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);n.push({ll:[xe(a.lowerLongitude),xe(a.lowerLatitude)],del:[xe(a.longitudeInterval),xe(a.latitudeInterval)],lim:[l,d],count:a.gridNodeCount,cvs:ke(s)}),i+=176+16*a.gridNodeCount}return n}function ke(e){return e.map(function(e){return[xe(e.longitudeShift),xe(e.latitudeShift)]})}function _e(e,t,o){return{name:Ve(e,t+8,t+16).trim(),parent:Ve(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,o),upperLatitude:e.getFloat64(t+88,o),lowerLongitude:e.getFloat64(t+104,o),upperLongitude:e.getFloat64(t+120,o),latitudeInterval:e.getFloat64(t+136,o),longitudeInterval:e.getFloat64(t+152,o),gridNodeCount:e.getInt32(t+168,o)}}function Fe(e,t,o,i){for(var n=t+176,r=16,a=[],s=0;s<o.gridNodeCount;s++){var l={latitudeShift:e.getFloat32(n+s*r,i),longitudeShift:e.getFloat32(n+s*r+4,i),latitudeAccuracy:e.getFloat32(n+s*r+8,i),longitudeAccuracy:e.getFloat32(n+s*r+12,i)};a.push(l)}return a}function Ue(e,t){if(!(this instanceof Ue))return new Ue(e);t=t||function(e){if(e)throw e};var o=oe(e);if("object"==typeof o){var i=Ue.projections.get(o.projName);if(i){if(o.datumCode&&"none"!==o.datumCode){var n=j(Ge,o.datumCode);n&&(o.datum_params=o.datum_params||(n.towgs84?n.towgs84.split(","):null),o.ellps=n.ellipse,o.datumName=n.datumName?n.datumName:o.datumCode)}o.k0=o.k0||1,o.axis=o.axis||"enu",o.ellps=o.ellps||"wgs84",o.lat1=o.lat1||o.lat0;var r=Ce(o.a,o.b,o.rf,o.ellps,o.sphere),a=Se(r.a,r.b,r.rf,o.R_A),s=De(o.nadgrids),l=o.datum||Te(o.datumCode,o.datum_params,r.a,r.b,a.es,a.ep2,s);ie(this,o),ie(this,i),this.a=r.a,this.b=r.b,this.rf=r.rf,this.sphere=r.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),t(null,this)}else t("Could not get projection name from: "+e)}else t("Could not parse to valid json: "+e)}function Be(e,i){return e.datum_type===i.datum_type&&!(e.a!==i.a||Math.abs(e.es-i.es)>5e-11)&&(e.datum_type===t?e.datum_params[0]===i.datum_params[0]&&e.datum_params[1]===i.datum_params[1]&&e.datum_params[2]===i.datum_params[2]:e.datum_type!==o||e.datum_params[0]===i.datum_params[0]&&e.datum_params[1]===i.datum_params[1]&&e.datum_params[2]===i.datum_params[2]&&e.datum_params[3]===i.datum_params[3]&&e.datum_params[4]===i.datum_params[4]&&e.datum_params[5]===i.datum_params[5]&&e.datum_params[6]===i.datum_params[6])}function qe(e,t,o){var i,n,r,a,s=e.x,l=e.y,d=e.z?e.z:0;if(l<-c&&l>-1.001*c)l=-c;else if(l>c&&l<1.001*c)l=c;else{if(l<-c)return{x:-1/0,y:-1/0,z:e.z};if(l>c)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),n=Math.sin(l),a=Math.cos(l),r=n*n,{x:((i=o/Math.sqrt(1-t*r))+d)*a*Math.cos(s),y:(i+d)*a*Math.sin(s),z:(i*(1-t)+d)*n}}function ze(e,t,o,i){var n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p=1e-12,E=p*p,w=30,I=e.x,j=e.y,S=e.z?e.z:0;if(n=Math.sqrt(I*I+j*j),r=Math.sqrt(I*I+j*j+S*S),n/o<p){if(y=0,r/o<p)return b=-i,{x:e.x,y:e.y,z:e.z}}else y=Math.atan2(j,I);a=S/r,u=(s=n/r)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),v=a*l,f=0;do{f++,d=t*(c=o/Math.sqrt(1-t*v*v))/(c+(b=n*u+S*v-c*(1-t*v*v))),g=(m=a*(l=1/Math.sqrt(1-d*(2-d)*s*s)))*u-(h=s*(1-d)*l)*v,u=h,v=m}while(g*g>E&&f<w);return{x:y,y:Math.atan(m/Math.abs(h)),z:b}}function We(e,i,n){if(i===t)return{x:e.x+n[0],y:e.y+n[1],z:e.z+n[2]};if(i===o){var r=n[0],a=n[1],s=n[2],l=n[3],d=n[4],c=n[5],u=n[6];return{x:u*(e.x-c*e.y+d*e.z)+r,y:u*(c*e.x+e.y-l*e.z)+a,z:u*(-d*e.x+l*e.y+e.z)+s}}}function He(e,i,n){if(i===t)return{x:e.x-n[0],y:e.y-n[1],z:e.z-n[2]};if(i===o){var r=n[0],a=n[1],s=n[2],l=n[3],d=n[4],c=n[5],u=n[6],v=(e.x-r)/u,h=(e.y-a)/u,m=(e.z-s)/u;return{x:v+c*h-d*m,y:-c*v+h+l*m,z:d*v-l*h+m}}}function Ze(e){return e===t||e===o}Ue.projections=we,Ue.projections.start();var Ye=function(e,t,o){if(Be(e,t))return o;if(e.datum_type===r||t.datum_type===r)return o;var n=e.a,d=e.es;if(e.datum_type===i){if(0!==Qe(e,!1,o))return;n=a,d=l}var c=t.a,u=t.b,v=t.es;return t.datum_type===i&&(c=a,u=s,v=l),d!==v||n!==c||Ze(e.datum_type)||Ze(t.datum_type)?(o=qe(o,d,n),Ze(e.datum_type)&&(o=We(o,e.datum_type,e.datum_params)),Ze(t.datum_type)&&(o=He(o,t.datum_type,t.datum_params)),o=ze(o,v,c,u),t.datum_type!==i||0===Qe(t,!0,o)?o:void 0):o};function Qe(e,t,o){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;var i={x:-o.x,y:o.y},n={x:Number.NaN,y:Number.NaN},r=[];e:for(var a=0;a<e.grids.length;a++){var s=e.grids[a];if(r.push(s.name),s.isNull){n=i;break}if(null!==s.grid)for(var l=s.grid.subgrids,d=0,c=l.length;d<c;d++){var u=l[d],v=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,h=u.ll[0]-v,m=u.ll[1]-v,g=u.ll[0]+(u.lim[0]-1)*u.del[0]+v,y=u.ll[1]+(u.lim[1]-1)*u.del[1]+v;if(!(m>i.y||h>i.x||y<i.y||g<i.x||(n=Je(i,t,u),isNaN(n.x))))break e}else if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1}return isNaN(n.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*f+" "+i.y*f+" tried: '"+r+"'"),-1):(o.x=-n.x,o.y=n.y,0)}function Je(e,t,o){var i={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return i;var n={x:e.x,y:e.y};n.x-=o.ll[0],n.y-=o.ll[1],n.x=ae(n.x-Math.PI)+Math.PI;var r=Xe(n,o);if(t){if(isNaN(r.x))return i;r.x=n.x-r.x,r.y=n.y-r.y;var a,s,l=9,d=1e-12;do{if(s=Xe(r,o),isNaN(s.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}a={x:n.x-(s.x+r.x),y:n.y-(s.y+r.y)},r.x+=a.x,r.y+=a.y}while(l--&&Math.abs(a.x)>d&&Math.abs(a.y)>d);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=ae(r.x+o.ll[0]),i.y=r.y+o.ll[1]}else isNaN(r.x)||(i.x=e.x+r.x,i.y=e.y+r.y);return i}function Xe(e,t){var o,i={x:e.x/t.del[0],y:e.y/t.del[1]},n={x:Math.floor(i.x),y:Math.floor(i.y)},r={x:i.x-1*n.x,y:i.y-1*n.y},a={x:Number.NaN,y:Number.NaN};if(n.x<0||n.x>=t.lim[0])return a;if(n.y<0||n.y>=t.lim[1])return a;o=n.y*t.lim[0]+n.x;var s={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var l={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var d={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var c={x:t.cvs[o][0],y:t.cvs[o][1]},u=r.x*r.y,v=r.x*(1-r.y),h=(1-r.x)*(1-r.y),m=(1-r.x)*r.y;return a.x=h*s.x+v*l.x+m*c.x+u*d.x,a.y=h*s.y+v*l.y+m*c.y+u*d.y,a}var Ke=function(e,t,o){var i,n,r,a=o.x,s=o.y,l=o.z||0,d={};for(r=0;r<3;r++)if(!t||2!==r||void 0!==o.z)switch(0===r?(i=a,n=-1!=="ew".indexOf(e.axis[r])?"x":"y"):1===r?(i=s,n=-1!=="ns".indexOf(e.axis[r])?"y":"x"):(i=l,n="z"),e.axis[r]){case"e":case"n":d[n]=i;break;case"w":case"s":d[n]=-i;break;case"u":void 0!==o[n]&&(d.z=i);break;case"d":void 0!==o[n]&&(d.z=-i);break;default:return null}return d},et=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},tt=function(e){ot(e.x),ot(e.y)};function ot(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function it(e,n){return(e.datum.datum_type===t||e.datum.datum_type===o||e.datum.datum_type===i)&&"WGS84"!==n.datumCode||(n.datum.datum_type===t||n.datum.datum_type===o||n.datum.datum_type===i)&&"WGS84"!==e.datumCode}function nt(e,t,o,i){var n,r=void 0!==(o=Array.isArray(o)?et(o):{x:o.x,y:o.y,z:o.z,m:o.m}).z;if(tt(o),e.datum&&t.datum&&it(e,t)&&(o=nt(e,n=new Ue("WGS84"),o,i),e=n),i&&"enu"!==e.axis&&(o=Ke(e,!1,o)),"longlat"===e.projName)o={x:o.x*g,y:o.y*g,z:o.z||0};else if(e.to_meter&&(o={x:o.x*e.to_meter,y:o.y*e.to_meter,z:o.z||0}),!(o=e.inverse(o)))return;if(e.from_greenwich&&(o.x+=e.from_greenwich),o=Ye(e.datum,t.datum,o))return t.from_greenwich&&(o={x:o.x-t.from_greenwich,y:o.y,z:o.z||0}),"longlat"===t.projName?o={x:o.x*f,y:o.y*f,z:o.z||0}:(o=t.forward(o),t.to_meter&&(o={x:o.x/t.to_meter,y:o.y/t.to_meter,z:o.z||0})),i&&"enu"!==t.axis?Ke(t,!0,o):(o&&!r&&delete o.z,o)}var rt=Ue("WGS84");function at(e,t,o,i){var n,r,a;return Array.isArray(o)?(n=nt(e,t,o,i)||{x:NaN,y:NaN},o.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(o.slice(3)):[n.x,n.y,o[2]].concat(o.slice(3)):[n.x,n.y].concat(o.slice(2)):[n.x,n.y]):(r=nt(e,t,o,i),2===(a=Object.keys(o)).length||a.forEach(function(i){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;r[i]=o[i]}),r)}function st(e){return e instanceof Ue?e:e.oProj?e.oProj:Ue(e)}function lt(e,t,o){e=st(e);var i,n=!1;return void 0===t?(t=e,e=rt,n=!0):(void 0!==t.x||Array.isArray(t))&&(o=t,t=e,e=rt,n=!0),t=st(t),o?at(e,t,o):(i={forward:function(o,i){return at(e,t,o,i)},inverse:function(o,i){return at(t,e,o,i)}},n&&(i.oProj=t),i)}var dt=6,ct="AJSAJS",ut="AFAFAF",vt=65,ht=73,mt=79,gt=86,ft=90,yt={forward:bt,inverse:pt,toPoint:Et};function bt(e,t){return t=t||5,Gt(jt({lat:e[1],lon:e[0]}),t)}function pt(e){var t=St(Mt(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Et(e){var t=St(Mt(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function wt(e){return e*(Math.PI/180)}function It(e){return e/Math.PI*180}function jt(e){var t,o,i,n,r,a,s,l=e.lat,d=e.lon,c=6378137,u=.00669438,v=.9996,h=wt(l),m=wt(d);s=Math.floor((d+180)/6)+1,180===d&&(s=60),l>=56&&l<64&&d>=3&&d<12&&(s=32),l>=72&&l<84&&(d>=0&&d<9?s=31:d>=9&&d<21?s=33:d>=21&&d<33?s=35:d>=33&&d<42&&(s=37)),a=wt(6*(s-1)-180+3),t=u/(1-u),o=c/Math.sqrt(1-u*Math.sin(h)*Math.sin(h)),i=Math.tan(h)*Math.tan(h),n=t*Math.cos(h)*Math.cos(h);var g=v*o*((r=Math.cos(h)*(m-a))+(1-i+n)*r*r*r/6+(5-18*i+i*i+72*n-58*t)*r*r*r*r*r/120)+5e5,f=v*(c*((1-u/4-3*u*u/64-5*u*u*u/256)*h-(3*u/8+3*u*u/32+45*u*u*u/1024)*Math.sin(2*h)+(15*u*u/256+45*u*u*u/1024)*Math.sin(4*h)-35*u*u*u/3072*Math.sin(6*h))+o*Math.tan(h)*(r*r/2+(5-i+9*n+4*n*n)*r*r*r*r/24+(61-58*i+i*i+600*n-330*t)*r*r*r*r*r*r/720));return l<0&&(f+=1e7),{northing:Math.round(f),easting:Math.round(g),zoneNumber:s,zoneLetter:Ct(l)}}function St(e){var t=e.northing,o=e.easting,i=e.zoneLetter,n=e.zoneNumber;if(n<0||n>60)return null;var r,a,s,l,d,c,u,v,h,m=.9996,g=6378137,f=.00669438,y=(1-Math.sqrt(1-f))/(1+Math.sqrt(1-f)),b=o-5e5,p=t;i<"N"&&(p-=1e7),u=6*(n-1)-180+3,r=f/(1-f),h=(v=p/m/(g*(1-f/4-3*f*f/64-5*f*f*f/256)))+(3*y/2-27*y*y*y/32)*Math.sin(2*v)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*v)+151*y*y*y/96*Math.sin(6*v),a=g/Math.sqrt(1-f*Math.sin(h)*Math.sin(h)),s=Math.tan(h)*Math.tan(h),l=r*Math.cos(h)*Math.cos(h),d=g*(1-f)/Math.pow(1-f*Math.sin(h)*Math.sin(h),1.5),c=b/(a*m);var E=h-a*Math.tan(h)/d*(c*c/2-(5+3*s+10*l-4*l*l-9*r)*c*c*c*c/24+(61+90*s+298*l+45*s*s-252*r-3*l*l)*c*c*c*c*c*c/720);E=It(E);var w,I=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*r+24*s*s)*c*c*c*c*c/120)/Math.cos(h);if(I=u+It(I),e.accuracy){var j=St({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});w={top:j.lat,right:j.lon,bottom:E,left:I}}else w={lat:E,lon:I};return w}function Ct(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function Gt(e,t){var o="00000"+e.easting,i="00000"+e.northing;return e.zoneNumber+e.zoneLetter+Ot(e.easting,e.northing,e.zoneNumber)+o.substr(o.length-5,t)+i.substr(i.length-5,t)}function Ot(e,t,o){var i=$t(o);return Tt(Math.floor(e/1e5),Math.floor(t/1e5)%20,i)}function $t(e){var t=e%dt;return 0===t&&(t=dt),t}function Tt(e,t,o){var i=o-1,n=ct.charCodeAt(i),r=ut.charCodeAt(i),a=n+e-1,s=r+t,l=!1;return a>ft&&(a=a-ft+vt-1,l=!0),(a===ht||n<ht&&a>ht||(a>ht||n<ht)&&l)&&a++,(a===mt||n<mt&&a>mt||(a>mt||n<mt)&&l)&&++a===ht&&a++,a>ft&&(a=a-ft+vt-1),s>gt?(s=s-gt+vt-1,l=!0):l=!1,(s===ht||r<ht&&s>ht||(s>ht||r<ht)&&l)&&s++,(s===mt||r<mt&&s>mt||(s>mt||r<mt)&&l)&&++s===ht&&s++,s>gt&&(s=s-gt+vt-1),String.fromCharCode(a)+String.fromCharCode(s)}function Mt(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,o=e.length,i=null,n="",r=0;!/[A-Z]/.test(t=e.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+e;n+=t,r++}var a=parseInt(n,10);if(0===r||r+3>o)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(r++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;i=e.substring(r,r+=2);for(var l=$t(a),d=At(i.charAt(0),l),c=Dt(i.charAt(1),l);c<Rt(s);)c+=2e6;var u=o-r;if(u%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var v,h,m,g=u/2,f=0,y=0;return g>0&&(v=1e5/Math.pow(10,g),h=e.substring(r,r+g),f=parseFloat(h)*v,m=e.substring(r+g),y=parseFloat(m)*v),{easting:f+d,northing:y+c,zoneLetter:s,zoneNumber:a,accuracy:v}}function At(e,t){for(var o=ct.charCodeAt(t-1),i=1e5,n=!1;o!==e.charCodeAt(0);){if(++o===ht&&o++,o===mt&&o++,o>ft){if(n)throw"Bad character: "+e;o=vt,n=!0}i+=1e5}return i}function Dt(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var o=ut.charCodeAt(t-1),i=0,n=!1;o!==e.charCodeAt(0);){if(++o===ht&&o++,o===mt&&o++,o>gt){if(n)throw"Bad character: "+e;o=vt,n=!0}i+=1e5}return i}function Rt(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function xt(e,t,o){if(!(this instanceof xt))return new xt(e,t,o);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var i=e.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=e,this.y=t,this.z=o||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}xt.fromMGRS=function(e){return new xt(Et(e))},xt.prototype.toMGRS=function(e){return bt([this.x,this.y],e)};var Nt=1,Lt=.25,Vt=.046875,Pt=.01953125,kt=.01068115234375,_t=.75,Ft=.46875,Ut=.013020833333333334,Bt=.007120768229166667,qt=.3645833333333333,zt=.005696614583333333,Wt=.3076171875,Ht=function(e){var t=[];t[0]=Nt-e*(Lt+e*(Vt+e*(Pt+e*kt))),t[1]=e*(_t-e*(Vt+e*(Pt+e*kt)));var o=e*e;return t[2]=o*(Ft-e*(Ut+e*Bt)),o*=e,t[3]=o*(qt-e*zt),t[4]=o*e*Wt,t},Zt=function(e,t,o,i){return o*=t,t*=t,i[0]*e-o*(i[1]+t*(i[2]+t*(i[3]+t*i[4])))},Yt=20,Qt=function(e,t,o){for(var i=1/(1-t),n=e,r=Yt;r;--r){var a=Math.sin(n),s=1-t*a*a;if(n-=s=(Zt(n,a,Math.cos(n),o)-e)*(s*Math.sqrt(s))*i,Math.abs(s)<m)return n}return n};function Jt(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Ht(this.es),this.ml0=Zt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Xt(e){var t,o,i,n=e.x,r=e.y,a=ae(n-this.long0),s=Math.sin(r),l=Math.cos(r);if(this.es){var d=l*a,c=Math.pow(d,2),u=this.ep2*Math.pow(l,2),v=Math.pow(u,2),h=Math.abs(l)>m?Math.tan(r):0,g=Math.pow(h,2),f=Math.pow(g,2);t=1-this.es*Math.pow(s,2),d/=Math.sqrt(t);var y=Zt(r,s,l,this.en);o=this.a*(this.k0*d*(1+c/6*(1-g+u+c/20*(5-18*g+f+14*u-58*g*u+c/42*(61+179*f-f*g-479*g)))))+this.x0,i=this.a*(this.k0*(y-this.ml0+s*a*d/2*(1+c/12*(5-g+9*u+4*v+c/30*(61+f-58*g+270*u-330*g*u+c/56*(1385+543*f-f*g-3111*g))))))+this.y0}else{var b=l*Math.sin(a);if(Math.abs(Math.abs(b)-1)<m)return 93;if(o=.5*this.a*this.k0*Math.log((1+b)/(1-b))+this.x0,i=l*Math.cos(a)/Math.sqrt(1-Math.pow(b,2)),(b=Math.abs(i))>=1){if(b-1>m)return 93;i=0}else i=Math.acos(i);r<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return e.x=o,e.y=i,e}function Kt(e){var t,o,i,n,r=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,o=Qt(t,this.es,this.en),Math.abs(o)<c){var s=Math.sin(o),l=Math.cos(o),d=Math.abs(l)>m?Math.tan(o):0,u=this.ep2*Math.pow(l,2),v=Math.pow(u,2),h=Math.pow(d,2),g=Math.pow(h,2);t=1-this.es*Math.pow(s,2);var f=r*Math.sqrt(t)/this.k0,y=Math.pow(f,2);i=o-(t*=d)*y/(1-this.es)*.5*(1-y/12*(5+3*h-9*u*h+u-4*v-y/30*(61+90*h-252*u*h+45*g+46*u-y/56*(1385+3633*h+4095*g+1574*g*h)))),n=ae(this.long0+f*(1-y/6*(1+2*h+u-y/20*(5+28*h+24*g+8*u*h+6*u-y/42*(61+662*h+1320*g+720*g*h))))/l)}else i=c*re(a),n=0;else{var b=Math.exp(r/this.k0),p=.5*(b-1/b),E=this.lat0+a/this.k0,w=Math.cos(E);t=Math.sqrt((1-Math.pow(w,2))/(1+Math.pow(p,2))),i=Math.asin(t),a<0&&(i=-i),n=0===p&&0===w?0:ae(Math.atan2(p,w)+this.long0)}return e.x=n,e.y=i,e}var eo={init:Jt,forward:Xt,inverse:Kt,names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},to=function(e){var t=Math.exp(e);return t=(t-1/t)/2},oo=function(e,t){e=Math.abs(e),t=Math.abs(t);var o=Math.max(e,t),i=Math.min(e,t)/(o||1);return o*Math.sqrt(1+Math.pow(i,2))},io=function(e){var t=1+e,o=t-1;return 0===o?e:e*Math.log(t)/o},no=function(e){var t=Math.abs(e);return t=io(t*(1+t/(oo(1,t)+1))),e<0?-t:t},ro=function(e,t){for(var o,i=2*Math.cos(2*t),n=e.length-1,r=e[n],a=0;--n>=0;)o=i*r-a+e[n],a=r,r=o;return t+o*Math.sin(2*t)},ao=function(e,t){for(var o,i=2*Math.cos(t),n=e.length-1,r=e[n],a=0;--n>=0;)o=i*r-a+e[n],a=r,r=o;return Math.sin(t)*o},so=function(e){var t=Math.exp(e);return t=(t+1/t)/2},lo=function(e,t,o){for(var i,n,r=Math.sin(t),a=Math.cos(t),s=to(o),l=so(o),d=2*a*l,c=-2*r*s,u=e.length-1,v=e[u],h=0,m=0,g=0;--u>=0;)i=m,n=h,v=d*(m=v)-i-c*(h=g)+e[u],g=c*m-n+d*h;return[(d=r*l)*v-(c=a*s)*g,d*g+c*v]};function co(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(eo.init.apply(this),this.forward=eo.forward,this.inverse=eo.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),o=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),o*=t,this.cgb[1]=o*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=o*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),o*=t,this.cgb[2]=o*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=o*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),o*=t,this.cgb[3]=o*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=o*(1237/630+t*(t*(-24832/14175)-2.4)),o*=t,this.cgb[4]=o*(4174/315+t*(-144838/6237)),this.cbg[4]=o*(-734/315+t*(109598/31185)),o*=t,this.cgb[5]=o*(601676/22275),this.cbg[5]=o*(444337/155925),o=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+o*(1/4+o*(1/64+o/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=o*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=o*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),o*=t,this.utg[2]=o*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=o*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),o*=t,this.utg[3]=o*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=o*(49561/161280+t*(-179/168+t*(6601661/7257600))),o*=t,this.utg[4]=o*(-4583/161280+t*(108847/3991680)),this.gtu[4]=o*(34729/80640+t*(-3418889/1995840)),o*=t,this.utg[5]=o*(-20648693/638668800),this.gtu[5]=.6650675310896665*o;var i=ro(this.cbg,this.lat0);this.Zb=-this.Qn*(i+ao(this.gtu,2*i))}function uo(e){var t=ae(e.x-this.long0),o=e.y;o=ro(this.cbg,o);var i=Math.sin(o),n=Math.cos(o),r=Math.sin(t),a=Math.cos(t);o=Math.atan2(i,a*n),t=Math.atan2(r*n,oo(i,n*a)),t=no(Math.tan(t));var s,l,d=lo(this.gtu,2*o,2*t);return o+=d[0],t+=d[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*o+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e}function vo(e){var t,o,i=(e.x-this.x0)*(1/this.a),n=(e.y-this.y0)*(1/this.a);if(n=(n-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var r=lo(this.utg,2*n,2*i);n+=r[0],i+=r[1],i=Math.atan(to(i));var a=Math.sin(n),s=Math.cos(n),l=Math.sin(i),d=Math.cos(i);n=Math.atan2(a*d,oo(l,d*s)),i=Math.atan2(l,d*s),t=ae(i+this.long0),o=ro(this.cgb,n)}else t=1/0,o=1/0;return e.x=t,e.y=o,e}var ho={init:co,forward:uo,inverse:vo,names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},mo=function(e,t){if(void 0===e){if((e=Math.floor(30*(ae(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e};function go(){var e=mo(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*g,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ho.init.apply(this),this.forward=ho.forward,this.inverse=ho.inverse}var fo={init:go,names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},yo=function(e,t){return Math.pow((1-e)/(1+e),t)},bo=20;function po(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+y)/(Math.pow(Math.tan(.5*this.lat0+y),this.C)*yo(this.e*e,this.ratexp))}function Eo(e){var t=e.x,o=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*o+y),this.C)*yo(this.e*Math.sin(o),this.ratexp))-c,e.x=this.C*t,e}function wo(e){for(var t=1e-14,o=e.x/this.C,i=e.y,n=Math.pow(Math.tan(.5*i+y)/this.K,1/this.C),r=bo;r>0&&(i=2*Math.atan(n*yo(this.e*Math.sin(e.y),-.5*this.e))-c,!(Math.abs(i-e.y)<t));--r)e.y=i;return r?(e.x=o,e.y=i,e):null}var Io={init:po,forward:Eo,inverse:wo,names:["gauss"]};function jo(){Io.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function So(e){var t,o,i,n;return e.x=ae(e.x-this.long0),Io.forward.apply(this,[e]),t=Math.sin(e.y),o=Math.cos(e.y),i=Math.cos(e.x),n=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*o*i),e.x=n*o*Math.sin(e.x),e.y=n*(this.cosc0*t-this.sinc0*o*i),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function Co(e){var t,o,i,n,r;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,r=oo(e.x,e.y)){var a=2*Math.atan2(r,this.R2);t=Math.sin(a),o=Math.cos(a),n=Math.asin(o*this.sinc0+e.y*t*this.cosc0/r),i=Math.atan2(e.x*t,r*this.cosc0*o-e.y*this.sinc0*t)}else n=this.phic0,i=0;return e.x=i,e.y=n,Io.inverse.apply(this,[e]),e.x=ae(e.x+this.long0),e}var Go={init:jo,forward:So,inverse:Co,names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function Oo(e,t,o){return t*=o,Math.tan(.5*(c+e))*Math.pow((1-t)/(1+t),.5*o)}function $o(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=m&&(this.k0=.5*(1+re(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=m&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=m&&Math.abs(Math.cos(this.lat_ts))>m&&(this.k0=.5*this.cons*ne(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/se(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ne(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-c,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function To(e){var t,o,i,n,r,a,s=e.x,l=e.y,d=Math.sin(l),u=Math.cos(l),v=ae(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=m&&Math.abs(l+this.lat0)<=m?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*d+this.coslat0*u*Math.cos(v)),e.x=this.a*t*u*Math.sin(v)+this.x0,e.y=this.a*t*(this.coslat0*d-this.sinlat0*u*Math.cos(v))+this.y0,e):(o=2*Math.atan(this.ssfn_(l,d,this.e))-c,n=Math.cos(o),i=Math.sin(o),Math.abs(this.coslat0)<=m?(r=se(this.e,l*this.con,this.con*d),a=2*this.a*this.k0*r/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)<m?(t=2*this.a*this.k0/(1+n*Math.cos(v)),e.y=t*i):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*n*Math.cos(v))),e.y=t*(this.cosX0*i-this.sinX0*n*Math.cos(v))+this.y0),e.x=t*n*Math.sin(v)+this.x0,e))}function Mo(e){var t,o,i,n,r;e.x-=this.x0,e.y-=this.y0;var a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,o=this.lat0,a<=m?(e.x=t,e.y=o,e):(o=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/a),t=Math.abs(this.coslat0)<m?this.lat0>0?ae(this.long0+Math.atan2(e.x,-1*e.y)):ae(this.long0+Math.atan2(e.x,e.y)):ae(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=o,e)}if(Math.abs(this.coslat0)<=m){if(a<=m)return o=this.lat0,t=this.long0,e.x=t,e.y=o,e;e.x*=this.con,e.y*=this.con,i=a*this.cons/(2*this.a*this.k0),o=this.con*le(this.e,i),t=this.con*ae(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else n=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=m?r=this.X0:(r=Math.asin(Math.cos(n)*this.sinX0+e.y*Math.sin(n)*this.cosX0/a),t=ae(this.long0+Math.atan2(e.x*Math.sin(n),a*this.cosX0*Math.cos(n)-e.y*this.sinX0*Math.sin(n)))),o=-1*le(this.e,Math.tan(.5*(c+r)));return e.x=t,e.y=o,e}var Ao={init:$o,forward:To,inverse:Mo,names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:Oo};function Do(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),o=this.a,i=1/this.rf,n=2*i-Math.pow(i,2),r=this.e=Math.sqrt(n);this.R=this.k0*o*Math.sqrt(1-n)/(1-n*Math.pow(t,2)),this.alpha=Math.sqrt(1+n/(1-n)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+r*t)/(1-r*t));this.K=a-this.alpha*s+this.alpha*r/2*l}function Ro(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),o=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),i=-this.alpha*(t+o)+this.K,n=2*(Math.atan(Math.exp(i))-Math.PI/4),r=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(n)+Math.cos(this.b0)*Math.cos(r))),s=Math.asin(Math.cos(this.b0)*Math.sin(n)-Math.sin(this.b0)*Math.cos(n)*Math.cos(r));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function xo(e){for(var t=e.x-this.x0,o=e.y-this.y0,i=t/this.R,n=2*(Math.atan(Math.exp(o/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(n)+Math.sin(this.b0)*Math.cos(n)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(n))),s=this.lambda0+a/this.alpha,l=0,d=r,c=-1e3,u=0;Math.abs(d-c)>1e-7;){if(++u>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(d))/2)),c=d,d=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=d,e}var No={init:Do,forward:Ro,inverse:xo,names:["somerc"]},Lo=1e-7;function Vo(e){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],o="object"==typeof e.PROJECTION?Object.keys(e.PROJECTION)[0]:e.PROJECTION;return"no_uoff"in e||"no_off"in e||-1!==t.indexOf(o)}function Po(){var e,t,o,i,n,r,a,s,l,d,u,v=0,h=0,f=0,p=0,E=0,w=0,I=0;this.no_off=Vo(this),this.no_rot="no_rot"in this;var j=!1;"alpha"in this&&(j=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),j&&(I=this.alpha),S&&(v=this.rectified_grid_angle*g),j||S)h=this.longc;else if(f=this.long1,E=this.lat1,p=this.long2,w=this.lat2,Math.abs(E-w)<=Lo||(e=Math.abs(E))<=Lo||Math.abs(e-c)<=Lo||Math.abs(Math.abs(this.lat0)-c)<=Lo||Math.abs(Math.abs(w)-c)<=Lo)throw new Error;var C=1-this.es;t=Math.sqrt(C),Math.abs(this.lat0)>m?(s=Math.sin(this.lat0),o=Math.cos(this.lat0),e=1-this.es*s*s,this.B=o*o,this.B=Math.sqrt(1+this.es*this.B*this.B/C),this.A=this.B*this.k0*t/e,(n=(i=this.B*t/(o*Math.sqrt(e)))*i-1)<=0?n=0:(n=Math.sqrt(n),this.lat0<0&&(n=-n)),this.E=n+=i,this.E*=Math.pow(se(this.e,this.lat0,s),this.B)):(this.B=1/t,this.A=this.k0,this.E=i=n=1),j||S?(j?(u=Math.asin(Math.sin(I)/i),S||(v=I)):(u=v,I=Math.asin(i*Math.sin(u))),this.lam0=h-Math.asin(.5*(n-1/n)*Math.tan(u))/this.B):(r=Math.pow(se(this.e,E,Math.sin(E)),this.B),a=Math.pow(se(this.e,w,Math.sin(w)),this.B),n=this.E/r,l=(a-r)/(a+r),d=((d=this.E*this.E)-a*r)/(d+a*r),(e=f-p)<-Math.pi?p-=b:e>Math.pi&&(p+=b),this.lam0=ae(.5*(f+p)-Math.atan(d*Math.tan(.5*this.B*(f-p))/l)/this.B),u=Math.atan(2*Math.sin(this.B*ae(f-this.lam0))/(n-1/n)),v=I=Math.asin(i*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(v),this.cosrot=Math.cos(v),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(I))),this.lat0<0&&(this.u_0=-this.u_0)),n=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(y-n)),this.v_pole_s=this.ArB*Math.log(Math.tan(y+n))}function ko(e){var t,o,i,n,r,a,s,l,d={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-c)>m){if(t=.5*((r=this.E/Math.pow(se(this.e,e.y,Math.sin(e.y)),this.B))-(a=1/r)),o=.5*(r+a),n=Math.sin(this.B*e.x),i=(t*this.singam-n*this.cosgam)/o,Math.abs(Math.abs(i)-1)<m)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),a=Math.cos(this.B*e.x),s=Math.abs(a)<Lo?this.A*e.x:this.ArB*Math.atan2(t*this.cosgam+n*this.singam,a)}else l=e.y>0?this.v_pole_n:this.v_pole_s,s=this.ArB*e.y;return this.no_rot?(d.x=s,d.y=l):(s-=this.u_0,d.x=l*this.cosrot+s*this.sinrot,d.y=s*this.cosrot-l*this.sinrot),d.x=this.a*d.x+this.x0,d.y=this.a*d.y+this.y0,d}function _o(e){var t,o,i,n,r,a,s,l={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(o=e.y,t=e.x):(o=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),n=.5*((i=Math.exp(-this.BrA*o))-1/i),r=.5*(i+1/i),s=((a=Math.sin(this.BrA*t))*this.cosgam+n*this.singam)/r,Math.abs(Math.abs(s)-1)<m)l.x=0,l.y=s<0?-c:c;else{if(l.y=this.E/Math.sqrt((1+s)/(1-s)),l.y=le(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(n*this.cosgam-a*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var Fo={init:Po,forward:ko,inverse:_o,names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};function Uo(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<m)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),o=Math.cos(this.lat1),i=ne(this.e,t,o),n=se(this.e,this.lat1,t),r=Math.sin(this.lat2),a=Math.cos(this.lat2),s=ne(this.e,r,a),l=se(this.e,this.lat2,r),d=se(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>m?this.ns=Math.log(i/s)/Math.log(n/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=i/(this.ns*Math.pow(n,this.ns)),this.rh=this.a*this.f0*Math.pow(d,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Bo(e){var t=e.x,o=e.y;Math.abs(2*Math.abs(o)-Math.PI)<=m&&(o=re(o)*(c-2*m));var i,n,r=Math.abs(Math.abs(o)-c);if(r>m)i=se(this.e,o,Math.sin(o)),n=this.a*this.f0*Math.pow(i,this.ns);else{if((r=o*this.ns)<=0)return null;n=0}var a=this.ns*ae(t-this.long0);return e.x=this.k0*(n*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-n*Math.cos(a))+this.y0,e}function qo(e){var t,o,i,n,r,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),o=1):(t=-Math.sqrt(a*a+s*s),o=-1);var l=0;if(0!==t&&(l=Math.atan2(o*a,o*s)),0!==t||this.ns>0){if(o=1/this.ns,i=Math.pow(t/(this.a*this.f0),o),-9999===(n=le(this.e,i)))return null}else n=-c;return r=ae(l/this.ns+this.long0),e.x=r,e.y=n,e}var zo={init:Uo,forward:Bo,inverse:qo,names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};function Wo(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function Ho(e){var t,o,i,n,r,a,s,l=e.x,d=e.y,c=ae(l-this.long0);return t=Math.pow((1+this.e*Math.sin(d))/(1-this.e*Math.sin(d)),this.alfa*this.e/2),o=2*(Math.atan(this.k*Math.pow(Math.tan(d/2+this.s45),this.alfa)/t)-this.s45),i=-c*this.alfa,n=Math.asin(Math.cos(this.ad)*Math.sin(o)+Math.sin(this.ad)*Math.cos(o)*Math.cos(i)),r=Math.asin(Math.cos(o)*Math.sin(i)/Math.cos(n)),a=this.n*r,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(n/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Zo(e){var t,o,i,n,r,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),r=Math.sqrt(e.x*e.x+e.y*e.y),n=Math.atan2(e.y,e.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/r,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(t)),e.x=this.long0-o/this.alfa,a=t,s=0;var d=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,d+=1}while(0===s&&d<15);return d>=15?null:e}var Yo={init:Wo,forward:Ho,inverse:Zo,names:["Krovak","krovak"]},Qo=function(e,t,o,i,n){return e*n-t*Math.sin(2*n)+o*Math.sin(4*n)-i*Math.sin(6*n)},Jo=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},Xo=function(e){return.375*e*(1+.25*e*(1+.46875*e))},Ko=function(e){return.05859375*e*e*(1+.75*e)},ei=function(e){return e*e*e*(35/3072)},ti=function(e,t,o){var i=t*o;return e/Math.sqrt(1-i*i)},oi=function(e){return Math.abs(e)<c?e:e-re(e)*Math.PI},ii=function(e,t,o,i,n){var r,a;r=e/t;for(var s=0;s<15;s++)if(r+=a=(e-(t*r-o*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)))/(t-2*o*Math.cos(2*r)+4*i*Math.cos(4*r)-6*n*Math.cos(6*r)),Math.abs(a)<=1e-10)return r;return NaN};function ni(){this.sphere||(this.e0=Jo(this.es),this.e1=Xo(this.es),this.e2=Ko(this.es),this.e3=ei(this.es),this.ml0=this.a*Qo(this.e0,this.e1,this.e2,this.e3,this.lat0))}function ri(e){var t,o,i=e.x,n=e.y;if(i=ae(i-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(n)*Math.sin(i)),o=this.a*(Math.atan2(Math.tan(n),Math.cos(i))-this.lat0);else{var r=Math.sin(n),a=Math.cos(n),s=ti(this.a,this.e,r),l=Math.tan(n)*Math.tan(n),d=i*Math.cos(n),c=d*d,u=this.es*a*a/(1-this.es);t=s*d*(1-c*l*(1/6-(8-l+8*u)*c/120)),o=this.a*Qo(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+s*r/a*c*(.5+(5-l+6*u)*c/24)}return e.x=t+this.x0,e.y=o+this.y0,e}function ai(e){e.x-=this.x0,e.y-=this.y0;var t,o,i=e.x/this.a,n=e.y/this.a;if(this.sphere){var r=n+this.lat0;t=Math.asin(Math.sin(r)*Math.cos(i)),o=Math.atan2(Math.tan(i),Math.cos(r))}else{var a=this.ml0/this.a+n,s=ii(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-c)<=m)return e.x=this.long0,e.y=c,n<0&&(e.y*=-1),e;var l=ti(this.a,this.e,Math.sin(s)),d=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(s),2),v=i*this.a/l,h=v*v;t=s-l*Math.tan(s)/d*v*v*(.5-(1+3*u)*v*v/24),o=v*(1-h*(u/3+(1+3*u)*u*h/15))/Math.cos(s)}return e.x=ae(o+this.long0),e.y=oi(t),e}var si={init:ni,forward:ri,inverse:ai,names:["Cassini","Cassini_Soldner","cass"]},li=function(e,t){var o;return e>1e-7?(1-e*e)*(t/(1-(o=e*t)*o)-.5/e*Math.log((1-o)/(1+o))):2*t};function di(){var e,t=Math.abs(this.lat0);if(Math.abs(t-c)<m?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<m?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=li(this.e,1),this.mmf=.5/(1-this.es),this.apa=bi(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=li(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function ci(e){var t,o,i,n,r,a,s,l,d,u,v=e.x,h=e.y;if(v=ae(v-this.long0),this.sphere){if(r=Math.sin(h),u=Math.cos(h),i=Math.cos(v),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((o=this.mode===this.EQUIT?1+u*i:1+this.sinph0*r+this.cosph0*u*i)<=m)return null;t=(o=Math.sqrt(2/o))*u*Math.sin(v),o*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*u*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(h+this.lat0)<m)return null;o=y-.5*h,t=(o=2*(this.mode===this.S_POLE?Math.cos(o):Math.sin(o)))*Math.sin(v),o*=i}}else{switch(s=0,l=0,d=0,i=Math.cos(v),n=Math.sin(v),r=Math.sin(h),a=li(this.e,r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(s=a/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:d=1+this.sinb1*s+this.cosb1*l*i;break;case this.EQUIT:d=1+l*i;break;case this.N_POLE:d=c+h,a=this.qp-a;break;case this.S_POLE:d=h-c,a=this.qp+a}if(Math.abs(d)<m)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:d=Math.sqrt(2/d),o=this.mode===this.OBLIQ?this.ymf*d*(this.cosb1*s-this.sinb1*l*i):(d=Math.sqrt(2/(1+l*i)))*s*this.ymf,t=this.xmf*d*l*n;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(d=Math.sqrt(a))*n,o=i*(this.mode===this.S_POLE?d:-d)):t=o=0}}return e.x=this.a*t+this.x0,e.y=this.a*o+this.y0,e}function ui(e){e.x-=this.x0,e.y-=this.y0;var t,o,i,n,r,a,s,l=e.x/this.a,d=e.y/this.a;if(this.sphere){var u,v=0,h=0;if((o=.5*(u=Math.sqrt(l*l+d*d)))>1)return null;switch(o=2*Math.asin(o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(h=Math.sin(o),v=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(u)<=m?0:Math.asin(d*h/u),l*=h,d=v*u;break;case this.OBLIQ:o=Math.abs(u)<=m?this.lat0:Math.asin(v*this.sinph0+d*h*this.cosph0/u),l*=h*this.cosph0,d=(v-Math.sin(o)*this.sinph0)*u;break;case this.N_POLE:d=-d,o=c-o;break;case this.S_POLE:o-=c}t=0!==d||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,d):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,d*=this.dd,(a=Math.sqrt(l*l+d*d))<m)return e.x=this.long0,e.y=this.lat0,e;n=2*Math.asin(.5*a/this.rq),i=Math.cos(n),l*=n=Math.sin(n),this.mode===this.OBLIQ?(s=i*this.sinb1+d*n*this.cosb1/a,r=this.qp*s,d=a*this.cosb1*i-d*this.sinb1*n):(s=d*n/a,r=this.qp*s,d=a*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(d=-d),!(r=l*l+d*d))return e.x=this.long0,e.y=this.lat0,e;s=1-r/this.qp,this.mode===this.S_POLE&&(s=-s)}t=Math.atan2(l,d),o=pi(Math.asin(s),this.apa)}return e.x=ae(this.long0+t),e.y=o,e}var vi=.3333333333333333,hi=.17222222222222222,mi=.10257936507936508,gi=.06388888888888888,fi=.0664021164021164,yi=.016415012942191543;function bi(e){var t,o=[];return o[0]=e*vi,t=e*e,o[0]+=t*hi,o[1]=t*gi,t*=e,o[0]+=t*mi,o[1]+=t*fi,o[2]=t*yi,o}function pi(e,t){var o=e+e;return e+t[0]*Math.sin(o)+t[1]*Math.sin(o+o)+t[2]*Math.sin(o+o+o)}var Ei={init:di,forward:ci,inverse:ui,names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},wi=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)};function Ii(){Math.abs(this.lat1+this.lat2)<m||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ne(this.e3,this.sin_po,this.cos_po),this.qs1=li(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ne(this.e3,this.sin_po,this.cos_po),this.qs2=li(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=li(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>m?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function ji(e){var t=e.x,o=e.y;this.sin_phi=Math.sin(o),this.cos_phi=Math.cos(o);var i=li(this.e3,this.sin_phi),n=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,r=this.ns0*ae(t-this.long0),a=n*Math.sin(r)+this.x0,s=this.rh-n*Math.cos(r)+this.y0;return e.x=a,e.y=s,e}function Si(e){var t,o,i,n,r,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),i=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),i=-1),n=0,0!==t&&(n=Math.atan2(i*e.x,i*e.y)),i=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-i*i)/(2*this.ns0)):(o=(this.c-i*i)/this.ns0,a=this.phi1z(this.e3,o)),r=ae(n/this.ns0+this.long0),e.x=r,e.y=a,e}function Ci(e,t){var o,i,n,r,a=wi(.5*t);if(e<m)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=r=.5*(n=1-(i=e*(o=Math.sin(a)))*i)*n/Math.cos(a)*(t/(1-s)-o/n+.5/e*Math.log((1-i)/(1+i))),Math.abs(r)<=1e-7)return a;return null}var Gi={init:Ii,forward:ji,inverse:Si,names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:Ci};function Oi(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function $i(e){var t,o,i,n,r,a,s,l,d=e.x,c=e.y;return i=ae(d-this.long0),t=Math.sin(c),o=Math.cos(c),n=Math.cos(i),r=1,(a=this.sin_p14*t+this.cos_p14*o*n)>0||Math.abs(a)<=m?(s=this.x0+this.a*r*o*Math.sin(i)/a,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*o*n)/a):(s=this.x0+this.infinity_dist*o*Math.sin(i),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*o*n)),e.x=s,e.y=l,e}function Ti(e){var t,o,i,n,r,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(n=Math.atan2(t,this.rc),o=Math.sin(n),i=Math.cos(n),a=wi(i*this.sin_p14+e.y*o*this.cos_p14/t),r=Math.atan2(e.x*o,t*this.cos_p14*i-e.y*this.sin_p14*o),r=ae(this.long0+r)):(a=this.phic0,r=0),e.x=r,e.y=a,e}var Mi={init:Oi,forward:$i,inverse:Ti,names:["gnom"]},Ai=function(e,t){var o=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-o)<1e-6)return t<0?-1*c:c;for(var i,n,r,a,s=Math.asin(.5*t),l=0;l<30;l++)if(n=Math.sin(s),r=Math.cos(s),a=e*n,s+=i=Math.pow(1-a*a,2)/(2*r)*(t/(1-e*e)-n/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(i)<=1e-10)return s;return NaN};function Di(){this.sphere||(this.k0=ne(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Ri(e){var t,o,i=e.x,n=e.y,r=ae(i-this.long0);if(this.sphere)t=this.x0+this.a*r*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts);else{var a=li(this.e,Math.sin(n));t=this.x0+this.a*this.k0*r,o=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=o,e}function xi(e){var t,o;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=ae(this.long0+e.x/this.a/Math.cos(this.lat_ts)),o=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(o=Ai(this.e,2*e.y*this.k0/this.a),t=ae(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=o,e}var Ni={init:Di,forward:Ri,inverse:xi,names:["cea"]};function Li(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Vi(e){var t=e.x,o=e.y,i=ae(t-this.long0),n=oi(o-this.lat0);return e.x=this.x0+this.a*i*this.rc,e.y=this.y0+this.a*n,e}function Pi(e){var t=e.x,o=e.y;return e.x=ae(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=oi(this.lat0+(o-this.y0)/this.a),e}var ki={init:Li,forward:Vi,inverse:Pi,names:["Equirectangular","Equidistant_Cylindrical","eqc"]},_i=20;function Fi(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Jo(this.es),this.e1=Xo(this.es),this.e2=Ko(this.es),this.e3=ei(this.es),this.ml0=this.a*Qo(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Ui(e){var t,o,i,n=e.x,r=e.y,a=ae(n-this.long0);if(i=a*Math.sin(r),this.sphere)Math.abs(r)<=m?(t=this.a*a,o=-1*this.a*this.lat0):(t=this.a*Math.sin(i)/Math.tan(r),o=this.a*(oi(r-this.lat0)+(1-Math.cos(i))/Math.tan(r)));else if(Math.abs(r)<=m)t=this.a*a,o=-1*this.ml0;else{var s=ti(this.a,this.e,Math.sin(r))/Math.tan(r);t=s*Math.sin(i),o=this.a*Qo(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*(1-Math.cos(i))}return e.x=t+this.x0,e.y=o+this.y0,e}function Bi(e){var t,o,i,n,r,a,s,l,d;if(i=e.x-this.x0,n=e.y-this.y0,this.sphere)if(Math.abs(n+this.a*this.lat0)<=m)t=ae(i/this.a+this.long0),o=0;else{var c;for(a=this.lat0+n/this.a,s=i*i/this.a/this.a+a*a,l=a,r=_i;r;--r)if(l+=d=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(d)<=m){o=l;break}t=ae(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(o))}else if(Math.abs(n+this.ml0)<=m)o=0,t=ae(this.long0+i/this.a);else{var u,v,h,g,f;for(a=(this.ml0+n)/this.a,s=i*i/this.a/this.a+a*a,l=a,r=_i;r;--r)if(f=this.e*Math.sin(l),u=Math.sqrt(1-f*f)*Math.tan(l),v=this.a*Qo(this.e0,this.e1,this.e2,this.e3,l),h=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=d=(a*(u*(g=v/this.a)+1)-g-.5*u*(g*g+s))/(this.es*Math.sin(2*l)*(g*g+s-2*a*g)/(4*u)+(a-g)*(u*h-2/Math.sin(2*l))-h),Math.abs(d)<=m){o=l;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(o),2))*Math.tan(o),t=ae(this.long0+Math.asin(i*u/this.a)/Math.sin(o))}return e.x=t,e.y=o,e}var qi={init:Fi,forward:Ui,inverse:Bi,names:["Polyconic","poly"]};function zi(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function Wi(e){var t,o=e.x,i=e.y-this.lat0,n=o-this.long0,r=i/d*1e-5,a=n,s=1,l=0;for(t=1;t<=10;t++)s*=r,l+=this.A[t]*s;var c,u=l,v=a,h=1,m=0,g=0,f=0;for(t=1;t<=6;t++)c=m*u+h*v,h=h*u-m*v,m=c,g=g+this.B_re[t]*h-this.B_im[t]*m,f=f+this.B_im[t]*h+this.B_re[t]*m;return e.x=f*this.a+this.x0,e.y=g*this.a+this.y0,e}function Hi(e){var t,o,i=e.x,n=e.y,r=i-this.x0,a=(n-this.y0)/this.a,s=r/this.a,l=1,c=0,u=0,v=0;for(t=1;t<=6;t++)o=c*a+l*s,l=l*a-c*s,c=o,u=u+this.C_re[t]*l-this.C_im[t]*c,v=v+this.C_im[t]*l+this.C_re[t]*c;for(var h=0;h<this.iterations;h++){var m,g=u,f=v,y=a,b=s;for(t=2;t<=6;t++)m=f*u+g*v,g=g*u-f*v,f=m,y+=(t-1)*(this.B_re[t]*g-this.B_im[t]*f),b+=(t-1)*(this.B_im[t]*g+this.B_re[t]*f);g=1,f=0;var p=this.B_re[1],E=this.B_im[1];for(t=2;t<=6;t++)m=f*u+g*v,g=g*u-f*v,f=m,p+=t*(this.B_re[t]*g-this.B_im[t]*f),E+=t*(this.B_im[t]*g+this.B_re[t]*f);var w=p*p+E*E;u=(y*p+b*E)/w,v=(b*p-y*E)/w}var I=u,j=v,S=1,C=0;for(t=1;t<=9;t++)S*=I,C+=this.D[t]*S;var G=this.lat0+C*d*1e5,O=this.long0+j;return e.x=O,e.y=G,e}var Zi={init:zi,forward:Wi,inverse:Hi,names:["New_Zealand_Map_Grid","nzmg"]};function Yi(){}function Qi(e){var t=e.x,o=e.y,i=ae(t-this.long0),n=this.x0+this.a*i,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+o/2.5))*1.25;return e.x=n,e.y=r,e}function Ji(e){e.x-=this.x0,e.y-=this.y0;var t=ae(this.long0+e.x/this.a),o=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=o,e}var Xi={init:Yi,forward:Qi,inverse:Ji,names:["Miller_Cylindrical","mill"]},Ki=20;function en(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Ht(this.es)}function tn(e){var t,o,i=e.x,n=e.y;if(i=ae(i-this.long0),this.sphere){if(this.m)for(var r=this.n*Math.sin(n),a=Ki;a;--a){var s=(this.m*n+Math.sin(n)-r)/(this.m+Math.cos(n));if(n-=s,Math.abs(s)<m)break}else n=1!==this.n?Math.asin(this.n*Math.sin(n)):n;t=this.a*this.C_x*i*(this.m+Math.cos(n)),o=this.a*this.C_y*n}else{var l=Math.sin(n),d=Math.cos(n);o=this.a*Zt(n,l,d,this.en),t=this.a*i*d/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=o,e}function on(e){var t,o,i,n;return e.x-=this.x0,i=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,i/=this.C_x*(this.m+Math.cos(t)),this.m?t=wi((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=wi(Math.sin(t)/this.n)),i=ae(i+this.long0),t=oi(t)):(t=Qt(e.y/this.a,this.es,this.en),(n=Math.abs(t))<c?(n=Math.sin(t),o=this.long0+e.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(t)),i=ae(o)):n-m<c&&(i=this.long0)),e.x=i,e.y=t,e}var nn={init:en,forward:tn,inverse:on,names:["Sinusoidal","sinu"]};function rn(){}function an(e){for(var t=e.x,o=e.y,i=ae(t-this.long0),n=o,r=Math.PI*Math.sin(o);;){var a=-(n+Math.sin(n)-r)/(1+Math.cos(n));if(n+=a,Math.abs(a)<m)break}n/=2,Math.PI/2-Math.abs(o)<m&&(i=0);var s=.900316316158*this.a*i*Math.cos(n)+this.x0,l=1.4142135623731*this.a*Math.sin(n)+this.y0;return e.x=s,e.y=l,e}function sn(e){var t,o;e.x-=this.x0,e.y-=this.y0,o=e.y/(1.4142135623731*this.a),Math.abs(o)>.999999999999&&(o=.999999999999),t=Math.asin(o);var i=ae(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),o=(2*t+Math.sin(2*t))/Math.PI,Math.abs(o)>1&&(o=1);var n=Math.asin(o);return e.x=i,e.y=n,e}var ln={init:rn,forward:an,inverse:sn,names:["Mollweide","moll"]};function dn(){Math.abs(this.lat1+this.lat2)<m||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Jo(this.es),this.e1=Xo(this.es),this.e2=Ko(this.es),this.e3=ei(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=ne(this.e,this.sinphi,this.cosphi),this.ml1=Qo(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<m?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=ne(this.e,this.sinphi,this.cosphi),this.ml2=Qo(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Qo(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function cn(e){var t,o=e.x,i=e.y;if(this.sphere)t=this.a*(this.g-i);else{var n=Qo(this.e0,this.e1,this.e2,this.e3,i);t=this.a*(this.g-n)}var r=this.ns*ae(o-this.long0),a=this.x0+t*Math.sin(r),s=this.y0+this.rh-t*Math.cos(r);return e.x=a,e.y=s,e}function un(e){var t,o,i,n;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(o=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(o=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var r=0;if(0!==o&&(r=Math.atan2(t*e.x,t*e.y)),this.sphere)return n=ae(this.long0+r/this.ns),i=oi(this.g-o/this.a),e.x=n,e.y=i,e;var a=this.g-o/this.a;return i=ii(a,this.e0,this.e1,this.e2,this.e3),n=ae(this.long0+r/this.ns),e.x=n,e.y=i,e}var vn={init:dn,forward:cn,inverse:un,names:["Equidistant_Conic","eqdc"]};function hn(){this.R=this.a}function mn(e){var t,o,i=e.x,n=e.y,r=ae(i-this.long0);Math.abs(n)<=m&&(t=this.x0+this.R*r,o=this.y0);var a=wi(2*Math.abs(n/Math.PI));(Math.abs(r)<=m||Math.abs(Math.abs(n)-c)<=m)&&(t=this.x0,o=n>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/r-r/Math.PI),l=s*s,d=Math.sin(a),u=Math.cos(a),v=u/(d+u-1),h=v*v,g=v*(2/d-1),f=g*g,y=Math.PI*this.R*(s*(v-f)+Math.sqrt(l*(v-f)*(v-f)-(f+l)*(h-f)))/(f+l);r<0&&(y=-y),t=this.x0+y;var b=l+v;return y=Math.PI*this.R*(g*b-s*Math.sqrt((f+l)*(l+1)-b*b))/(f+l),o=n>=0?this.y0+y:this.y0-y,e.x=t,e.y=o,e}function gn(e){var t,o,i,n,r,a,s,l,d,c,u,v;return e.x-=this.x0,e.y-=this.y0,u=Math.PI*this.R,r=(i=e.x/u)*i+(n=e.y/u)*n,u=3*(n*n/(l=-2*(a=-Math.abs(n)*(1+r))+1+2*n*n+r*r)+(2*(s=a-2*n*n+i*i)*s*s/l/l/l-9*a*s/l/l)/27)/(d=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-d/3)),Math.abs(u)>1&&(u=u>=0?1:-1),v=Math.acos(u)/3,o=e.y>=0?(-c*Math.cos(v+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(v+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(i)<m?this.long0:ae(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(i*i-n*n)+r*r))/2/i),e.x=t,e.y=o,e}var fn={init:hn,forward:mn,inverse:gn,names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};function yn(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function bn(e){var t,o,i,n,r,a,s,l,d,u,v,h,g,f,y,b,p,E,w,I,j,S,C=e.x,G=e.y,O=Math.sin(e.y),$=Math.cos(e.y),T=ae(C-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=m?(e.x=this.x0+this.a*(c-G)*Math.sin(T),e.y=this.y0-this.a*(c-G)*Math.cos(T),e):Math.abs(this.sin_p12+1)<=m?(e.x=this.x0+this.a*(c+G)*Math.sin(T),e.y=this.y0+this.a*(c+G)*Math.cos(T),e):(E=this.sin_p12*O+this.cos_p12*$*Math.cos(T),p=(b=Math.acos(E))?b/Math.sin(b):1,e.x=this.x0+this.a*p*$*Math.sin(T),e.y=this.y0+this.a*p*(this.cos_p12*O-this.sin_p12*$*Math.cos(T)),e):(t=Jo(this.es),o=Xo(this.es),i=Ko(this.es),n=ei(this.es),Math.abs(this.sin_p12-1)<=m?(r=this.a*Qo(t,o,i,n,c),a=this.a*Qo(t,o,i,n,G),e.x=this.x0+(r-a)*Math.sin(T),e.y=this.y0-(r-a)*Math.cos(T),e):Math.abs(this.sin_p12+1)<=m?(r=this.a*Qo(t,o,i,n,c),a=this.a*Qo(t,o,i,n,G),e.x=this.x0+(r+a)*Math.sin(T),e.y=this.y0+(r+a)*Math.cos(T),e):(s=O/$,l=ti(this.a,this.e,this.sin_p12),d=ti(this.a,this.e,O),u=Math.atan((1-this.es)*s+this.es*l*this.sin_p12/(d*$)),w=0===(v=Math.atan2(Math.sin(T),this.cos_p12*Math.tan(u)-this.sin_p12*Math.cos(T)))?Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.abs(Math.abs(v)-Math.PI)<=m?-Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.asin(Math.sin(T)*Math.cos(u)/Math.sin(v)),h=this.e*this.sin_p12/Math.sqrt(1-this.es),b=l*w*(1-(I=w*w)*(y=(g=this.e*this.cos_p12*Math.cos(v)/Math.sqrt(1-this.es))*g)*(1-y)/6+(j=I*w)/8*(f=h*g)*(1-2*y)+(S=j*w)/120*(y*(4-7*y)-3*h*h*(1-7*y))-S*w/48*f),e.x=this.x0+b*Math.sin(v),e.y=this.y0+b*Math.cos(v),e))}function pn(e){var t,o,i,n,r,a,s,l,d,u,v,h,g,f,y,b,p,E,w,I,j,S,C;if(e.x-=this.x0,e.y-=this.y0,this.sphere){if((t=Math.sqrt(e.x*e.x+e.y*e.y))>2*c*this.a)return;return o=t/this.a,i=Math.sin(o),n=Math.cos(o),r=this.long0,Math.abs(t)<=m?a=this.lat0:(a=wi(n*this.sin_p12+e.y*i*this.cos_p12/t),s=Math.abs(this.lat0)-c,r=Math.abs(s)<=m?this.lat0>=0?ae(this.long0+Math.atan2(e.x,-e.y)):ae(this.long0-Math.atan2(-e.x,e.y)):ae(this.long0+Math.atan2(e.x*i,t*this.cos_p12*n-e.y*this.sin_p12*i))),e.x=r,e.y=a,e}return l=Jo(this.es),d=Xo(this.es),u=Ko(this.es),v=ei(this.es),Math.abs(this.sin_p12-1)<=m?(h=this.a*Qo(l,d,u,v,c),t=Math.sqrt(e.x*e.x+e.y*e.y),a=ii((h-t)/this.a,l,d,u,v),r=ae(this.long0+Math.atan2(e.x,-1*e.y)),e.x=r,e.y=a,e):Math.abs(this.sin_p12+1)<=m?(h=this.a*Qo(l,d,u,v,c),t=Math.sqrt(e.x*e.x+e.y*e.y),a=ii((t-h)/this.a,l,d,u,v),r=ae(this.long0+Math.atan2(e.x,e.y)),e.x=r,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),y=Math.atan2(e.x,e.y),g=ti(this.a,this.e,this.sin_p12),b=Math.cos(y),E=-(p=this.e*this.cos_p12*b)*p/(1-this.es),w=3*this.es*(1-E)*this.sin_p12*this.cos_p12*b/(1-this.es),S=1-E*(j=(I=t/g)-E*(1+E)*Math.pow(I,3)/6-w*(1+3*E)*Math.pow(I,4)/24)*j/2-I*j*j*j/6,f=Math.asin(this.sin_p12*Math.cos(j)+this.cos_p12*Math.sin(j)*b),r=ae(this.long0+Math.asin(Math.sin(y)*Math.sin(j)/Math.cos(f))),C=Math.sin(f),a=Math.atan2((C-this.es*S*this.sin_p12)*Math.tan(f),C*(1-this.es)),e.x=r,e.y=a,e)}var En={init:yn,forward:bn,inverse:pn,names:["Azimuthal_Equidistant","aeqd"]};function wn(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function In(e){var t,o,i,n,r,a,s,l,d=e.x,c=e.y;return i=ae(d-this.long0),t=Math.sin(c),o=Math.cos(c),n=Math.cos(i),r=1,((a=this.sin_p14*t+this.cos_p14*o*n)>0||Math.abs(a)<=m)&&(s=this.a*r*o*Math.sin(i),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*o*n)),e.x=s,e.y=l,e}function jn(e){var t,o,i,n,r,a,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),o=wi(t/this.a),i=Math.sin(o),n=Math.cos(o),a=this.long0,Math.abs(t)<=m?(s=this.lat0,e.x=a,e.y=s,e):(s=wi(n*this.sin_p14+e.y*i*this.cos_p14/t),r=Math.abs(this.lat0)-c,Math.abs(r)<=m?(a=this.lat0>=0?ae(this.long0+Math.atan2(e.x,-e.y)):ae(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=ae(this.long0+Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i)),e.x=a,e.y=s,e))}var Sn={init:wn,forward:In,inverse:jn,names:["ortho"]},Cn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Gn={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function On(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=c-y/2?this.face=Cn.TOP:this.lat0<=-(c-y/2)?this.face=Cn.BOTTOM:Math.abs(this.long0)<=y?this.face=Cn.FRONT:Math.abs(this.long0)<=c+y?this.face=this.long0>0?Cn.RIGHT:Cn.LEFT:this.face=Cn.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function $n(e){var t,o,i,n,r,a,s={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,o=e.x,this.face===Cn.TOP)n=c-t,o>=y&&o<=c+y?(l.value=Gn.AREA_0,i=o-c):o>c+y||o<=-(c+y)?(l.value=Gn.AREA_1,i=o>0?o-p:o+p):o>-(c+y)&&o<=-y?(l.value=Gn.AREA_2,i=o+c):(l.value=Gn.AREA_3,i=o);else if(this.face===Cn.BOTTOM)n=c+t,o>=y&&o<=c+y?(l.value=Gn.AREA_0,i=-o+c):o<y&&o>=-y?(l.value=Gn.AREA_1,i=-o):o<-y&&o>=-(c+y)?(l.value=Gn.AREA_2,i=-o-c):(l.value=Gn.AREA_3,i=o>0?-o+p:-o-p);else{var d,u,v,h,m,g;this.face===Cn.RIGHT?o=An(o,+c):this.face===Cn.BACK?o=An(o,+p):this.face===Cn.LEFT&&(o=An(o,-c)),h=Math.sin(t),m=Math.cos(t),g=Math.sin(o),d=m*Math.cos(o),u=m*g,v=h,this.face===Cn.FRONT?i=Mn(n=Math.acos(d),v,u,l):this.face===Cn.RIGHT?i=Mn(n=Math.acos(u),v,-d,l):this.face===Cn.BACK?i=Mn(n=Math.acos(-d),v,-u,l):this.face===Cn.LEFT?i=Mn(n=Math.acos(-u),v,d,l):(n=i=0,l.value=Gn.AREA_0)}return a=Math.atan(12/p*(i+Math.acos(Math.sin(i)*Math.cos(y))-c)),r=Math.sqrt((1-Math.cos(n))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(i))))),l.value===Gn.AREA_1?a+=c:l.value===Gn.AREA_2?a+=p:l.value===Gn.AREA_3&&(a+=1.5*p),s.x=r*Math.cos(a),s.y=r*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e}function Tn(e){var t,o,i,n,r,a,s,l,d,u,v,h,m={lam:0,phi:0},g={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,o=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?g.value=Gn.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(g.value=Gn.AREA_1,t-=c):e.x<0&&-e.x>=Math.abs(e.y)?(g.value=Gn.AREA_2,t=t<0?t+p:t-p):(g.value=Gn.AREA_3,t+=c),d=p/12*Math.tan(t),r=Math.sin(d)/(Math.cos(d)-1/Math.sqrt(2)),a=Math.atan(r),(s=1-(i=Math.cos(t))*i*(n=Math.tan(o))*n*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===Cn.TOP)l=Math.acos(s),m.phi=c-l,g.value===Gn.AREA_0?m.lam=a+c:g.value===Gn.AREA_1?m.lam=a<0?a+p:a-p:g.value===Gn.AREA_2?m.lam=a-c:m.lam=a;else if(this.face===Cn.BOTTOM)l=Math.acos(s),m.phi=l-c,g.value===Gn.AREA_0?m.lam=-a+c:g.value===Gn.AREA_1?m.lam=-a:g.value===Gn.AREA_2?m.lam=-a-c:m.lam=a<0?-a-p:-a+p;else{var f,y,b;d=(f=s)*f,y=(d+=(b=d>=1?0:Math.sqrt(1-d)*Math.sin(a))*b)>=1?0:Math.sqrt(1-d),g.value===Gn.AREA_1?(d=y,y=-b,b=d):g.value===Gn.AREA_2?(y=-y,b=-b):g.value===Gn.AREA_3&&(d=y,y=b,b=-d),this.face===Cn.RIGHT?(d=f,f=-y,y=d):this.face===Cn.BACK?(f=-f,y=-y):this.face===Cn.LEFT&&(d=f,f=y,y=-d),m.phi=Math.acos(-b)-c,m.lam=Math.atan2(y,f),this.face===Cn.RIGHT?m.lam=An(m.lam,-c):this.face===Cn.BACK?m.lam=An(m.lam,-p):this.face===Cn.LEFT&&(m.lam=An(m.lam,+c))}return 0!==this.es&&(u=m.phi<0?1:0,v=Math.tan(m.phi),h=this.b/Math.sqrt(v*v+this.one_minus_f_squared),m.phi=Math.atan(Math.sqrt(this.a*this.a-h*h)/(this.one_minus_f*h)),u&&(m.phi=-m.phi)),m.lam+=this.long0,e.x=m.lam,e.y=m.phi,e}function Mn(e,t,o,i){var n;return e<m?(i.value=Gn.AREA_0,n=0):(n=Math.atan2(t,o),Math.abs(n)<=y?i.value=Gn.AREA_0:n>y&&n<=c+y?(i.value=Gn.AREA_1,n-=c):n>c+y||n<=-(c+y)?(i.value=Gn.AREA_2,n=n>=0?n-p:n+p):(i.value=Gn.AREA_3,n+=c)),n}function An(e,t){var o=e+t;return o<-p?o+=b:o>+p&&(o-=b),o}var Dn={init:On,forward:$n,inverse:Tn,names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Rn=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],xn=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Nn=.8487,Ln=1.3523,Vn=f/5,Pn=1/Vn,kn=18,_n=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Fn=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};function Un(e,t,o,i){for(var n=t;i;--i){var r=e(n);if(n-=r,Math.abs(r)<o)break}return n}function Bn(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function qn(e){var t=ae(e.x-this.long0),o=Math.abs(e.y),i=Math.floor(o*Vn);i<0?i=0:i>=kn&&(i=kn-1),o=f*(o-Pn*i);var n={x:_n(Rn[i],o)*t,y:_n(xn[i],o)};return e.y<0&&(n.y=-n.y),n.x=n.x*this.a*Nn+this.x0,n.y=n.y*this.a*Ln+this.y0,n}function zn(e){var t={x:(e.x-this.x0)/(this.a*Nn),y:Math.abs(e.y-this.y0)/(this.a*Ln)};if(t.y>=1)t.x/=Rn[kn][0],t.y=e.y<0?-c:c;else{var o=Math.floor(t.y*kn);for(o<0?o=0:o>=kn&&(o=kn-1);;)if(xn[o][0]>t.y)--o;else{if(!(xn[o+1][0]<=t.y))break;++o}var i=xn[o],n=5*(t.y-i[0])/(xn[o+1][0]-i[0]);n=Un(function(e){return(_n(i,e)-t.y)/Fn(i,e)},n,m,100),t.x/=_n(Rn[o],n),t.y=(5*o+n)*g,e.y<0&&(t.y=-t.y)}return t.x=ae(t.x+this.long0),t}var Wn={init:Bn,forward:qn,inverse:zn,names:["Robinson","robin"]};function Hn(){this.name="geocent"}function Zn(e){return qe(e,this.es,this.a)}function Yn(e){return ze(e,this.es,this.a,this.b)}var Qn={init:Hn,forward:Zn,inverse:Yn,names:["Geocentric","geocentric","geocent","Geocent"]},Jn={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Xn={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function Kn(){if(Object.keys(Xn).forEach(function(e){if(void 0===this[e])this[e]=Xn[e].def;else{if(Xn[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Xn[e].num&&(this[e]=parseFloat(this[e]))}Xn[e].degrees&&(this[e]=this[e]*g)}.bind(this)),Math.abs(Math.abs(this.lat0)-c)<m?this.mode=this.lat0<0?Jn.S_POLE:Jn.N_POLE:Math.abs(this.lat0)<m?this.mode=Jn.EQUIT:(this.mode=Jn.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(e),this.sw=Math.sin(e)}function er(e){e.x-=this.long0;var t,o,i,n,r=Math.sin(e.y),a=Math.cos(e.y),s=Math.cos(e.x);switch(this.mode){case Jn.OBLIQ:o=this.sinph0*r+this.cosph0*a*s;break;case Jn.EQUIT:o=a*s;break;case Jn.S_POLE:o=-r;break;case Jn.N_POLE:o=r}switch(t=(o=this.pn1/(this.p-o))*a*Math.sin(e.x),this.mode){case Jn.OBLIQ:o*=this.cosph0*r-this.sinph0*a*s;break;case Jn.EQUIT:o*=r;break;case Jn.N_POLE:o*=-a*s;break;case Jn.S_POLE:o*=a*s}return n=1/((i=o*this.cg+t*this.sg)*this.sw*this.h1+this.cw),t=(t*this.cg-o*this.sg)*this.cw*n,o=i*n,e.x=t*this.a,e.y=o*this.a,e}function tr(e){e.x/=this.a,e.y/=this.a;var t,o,i,n={x:e.x,y:e.y};i=1/(this.pn1-e.y*this.sw),t=this.pn1*e.x*i,o=this.pn1*e.y*this.cw*i,e.x=t*this.cg+o*this.sg,e.y=o*this.cg-t*this.sg;var r=oo(e.x,e.y);if(Math.abs(r)<m)n.x=0,n.y=e.y;else{var a,s;switch(s=1-r*r*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/r+r/this.pn1),a=Math.sqrt(1-s*s),this.mode){case Jn.OBLIQ:n.y=Math.asin(a*this.sinph0+e.y*s*this.cosph0/r),e.y=(a-this.sinph0*Math.sin(n.y))*r,e.x*=s*this.cosph0;break;case Jn.EQUIT:n.y=Math.asin(e.y*s/r),e.y=a*r,e.x*=s;break;case Jn.N_POLE:n.y=Math.asin(a),e.y=-e.y;break;case Jn.S_POLE:n.y=-Math.asin(a)}n.x=Math.atan2(e.x,e.y)}return e.x=n.x+this.long0,e.y=n.y,e}var or={init:Kn,forward:er,inverse:tr,names:["Tilted_Perspective","tpers"]};function ir(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function nr(e){var t,o,i,n,r=e.x,a=e.y;if(r-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var s=this.radius_p/oo(this.radius_p*Math.cos(a),Math.sin(a));if(o=s*Math.cos(r)*Math.cos(a),i=s*Math.sin(r)*Math.cos(a),n=s*Math.sin(a),(this.radius_g-o)*o-i*i-n*n*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;t=this.radius_g-o,this.flip_axis?(e.x=this.radius_g_1*Math.atan(i/oo(n,t)),e.y=this.radius_g_1*Math.atan(n/t)):(e.x=this.radius_g_1*Math.atan(i/t),e.y=this.radius_g_1*Math.atan(n/oo(i,t)))}else"sphere"===this.shape&&(t=Math.cos(a),o=Math.cos(r)*t,i=Math.sin(r)*t,n=Math.sin(a),t=this.radius_g-o,this.flip_axis?(e.x=this.radius_g_1*Math.atan(i/oo(n,t)),e.y=this.radius_g_1*Math.atan(n/t)):(e.x=this.radius_g_1*Math.atan(i/t),e.y=this.radius_g_1*Math.atan(n/oo(i,t))));return e.x=e.x*this.a,e.y=e.y*this.a,e}function rr(e){var t,o,i,n,r=-1,a=0,s=0;if(e.x=e.x/this.a,e.y=e.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*oo(1,s)):(a=Math.tan(e.x/this.radius_g_1),s=Math.tan(e.y/this.radius_g_1)*oo(1,a));var l=s/this.radius_p;if(t=a*a+l*l+r*r,(i=(o=2*this.radius_g*r)*o-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;n=(-o-Math.sqrt(i))/(2*t),r=this.radius_g+n*r,a*=n,s*=n,e.x=Math.atan2(a,r),e.y=Math.atan(s*Math.cos(e.x)/r),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+s*s)):(a=Math.tan(e.x/this.radius_g_1),s=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+a*a)),t=a*a+s*s+r*r,(i=(o=2*this.radius_g*r)*o-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;n=(-o-Math.sqrt(i))/(2*t),r=this.radius_g+n*r,a*=n,s*=n,e.x=Math.atan2(a,r),e.y=Math.atan(s*Math.cos(e.x)/r)}return e.x=e.x+this.long0,e}var ar={init:ir,forward:nr,inverse:rr,names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},sr=1.340264,lr=-.081106,dr=893e-6,cr=.003796,ur=Math.sqrt(3)/2;function vr(){this.es=0,this.long0=void 0!==this.long0?this.long0:0}function hr(e){var t=ae(e.x-this.long0),o=e.y,i=Math.asin(ur*Math.sin(o)),n=i*i,r=n*n*n;return e.x=t*Math.cos(i)/(ur*(sr+3*lr*n+r*(7*dr+9*cr*n))),e.y=i*(sr+lr*n+r*(dr+cr*n)),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function mr(e){e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a;var t,o,i,n,r=1e-9,a=12,s=e.y;for(n=0;n<a&&(s-=i=(s*(sr+lr*(t=s*s)+(o=t*t*t)*(dr+cr*t))-e.y)/(sr+3*lr*t+o*(7*dr+9*cr*t)),!(Math.abs(i)<r));++n);return o=(t=s*s)*t*t,e.x=ur*e.x*(sr+3*lr*t+o*(7*dr+9*cr*t))/Math.cos(s),e.y=Math.asin(Math.sin(s)/ur),e.x=ae(e.x+this.long0),e}var gr={init:vr,forward:hr,inverse:mr,names:["eqearth","Equal Earth","Equal_Earth"]},fr=1e-10;function yr(){var e;if(this.phi1=this.lat1,Math.abs(this.phi1)<fr)throw new Error;this.es?(this.en=Ht(this.es),this.m1=Zt(this.phi1,this.am1=Math.sin(this.phi1),e=Math.cos(this.phi1),this.en),this.am1=e/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=pr,this.forward=br):(Math.abs(this.phi1)+fr>=c?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=wr,this.forward=Er)}function br(e){var t,o,i,n=ae(e.x-(this.long0||0)),r=e.y;return t=this.am1+this.m1-Zt(r,o=Math.sin(r),i=Math.cos(r),this.en),o=i*n/(t*Math.sqrt(1-this.es*o*o)),e.x=t*Math.sin(o),e.y=this.am1-t*Math.cos(o),e.x=this.a*e.x+(this.x0||0),e.y=this.a*e.y+(this.y0||0),e}function pr(e){var t,o,i,n;if(e.x=(e.x-(this.x0||0))/this.a,e.y=(e.y-(this.y0||0))/this.a,o=oo(e.x,e.y=this.am1-e.y),n=Qt(this.am1+this.m1-o,this.es,this.en),(t=Math.abs(n))<c)t=Math.sin(n),i=o*Math.atan2(e.x,e.y)*Math.sqrt(1-this.es*t*t)/Math.cos(n);else{if(!(Math.abs(t-c)<=fr))throw new Error;i=0}return e.x=ae(i+(this.long0||0)),e.y=oi(n),e}function Er(e){var t,o,i=ae(e.x-(this.long0||0)),n=e.y;return o=this.cphi1+this.phi1-n,Math.abs(o)>fr?(e.x=o*Math.sin(t=i*Math.cos(n)/o),e.y=this.cphi1-o*Math.cos(t)):e.x=e.y=0,e.x=this.a*e.x+(this.x0||0),e.y=this.a*e.y+(this.y0||0),e}function wr(e){var t,o;e.x=(e.x-(this.x0||0))/this.a,e.y=(e.y-(this.y0||0))/this.a;var i=oo(e.x,e.y=this.cphi1-e.y);if(o=this.cphi1+this.phi1-i,Math.abs(o)>c)throw new Error;return t=Math.abs(Math.abs(o)-c)<=fr?0:i*Math.atan2(e.x,e.y)/Math.cos(o),e.x=ae(t+(this.long0||0)),e.y=oi(o),e}var Ir={init:yr,names:["bonne","Bonne (Werner lat_1=90)"]},jr=function(e){e.Proj.projections.add(eo),e.Proj.projections.add(ho),e.Proj.projections.add(fo),e.Proj.projections.add(Go),e.Proj.projections.add(Ao),e.Proj.projections.add(No),e.Proj.projections.add(Fo),e.Proj.projections.add(zo),e.Proj.projections.add(Yo),e.Proj.projections.add(si),e.Proj.projections.add(Ei),e.Proj.projections.add(Gi),e.Proj.projections.add(Mi),e.Proj.projections.add(Ni),e.Proj.projections.add(ki),e.Proj.projections.add(qi),e.Proj.projections.add(Zi),e.Proj.projections.add(Xi),e.Proj.projections.add(nn),e.Proj.projections.add(ln),e.Proj.projections.add(vn),e.Proj.projections.add(fn),e.Proj.projections.add(En),e.Proj.projections.add(Sn),e.Proj.projections.add(Dn),e.Proj.projections.add(Wn),e.Proj.projections.add(Qn),e.Proj.projections.add(or),e.Proj.projections.add(ar),e.Proj.projections.add(gr),e.Proj.projections.add(Ir)};return lt.defaultDatum="WGS84",lt.Proj=Ue,lt.WGS84=new lt.Proj("WGS84"),lt.Point=xt,lt.toPoint=et,lt.defs=H,lt.nadgrid=Ae,lt.transform=nt,lt.mgrs=yt,lt.version="2.15.0",jr(lt),lt}()}(Fi);var Ui=i(Fi.exports);class Bi extends ci{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 _i})}CreateCADGeoRef(e){return t(this,void 0,void 0,function*(){this.CoordinateValidate.validateCreateCADGeoRef(e);const t=yield this.StartApi(this.apiClassName,"CreateCADGeoRef",e);if(t.success){const e=yield this.obj.DataModel.LocalGeoReference.Get(`${t.result.eid}`);e.success&&(t.result.object=e.result.object)}return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GISToCartesian(e){return t(this,void 0,void 0,function*(){this.CoordinateValidate.validateFrom(e);const t={from:e},o=yield this.StartApi(this.apiClassName,"GISToCartesian",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CartesianToGIS(e){return t(this,void 0,void 0,function*(){this.CoordinateValidate.validateCartesianToGIS(e);const t={from:e},o=yield this.StartApi(this.apiClassName,"CartesianToGIS",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}WorldPosToScreenPos(e){return t(this,void 0,void 0,function*(){this.CoordinateValidate.validateWorldPosToScreenPos(e);const t={worldPos:e},o=yield this.StartApi(this.apiClassName,"WorldPosToScreenPos",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GISToScreenPos(e){return t(this,void 0,void 0,function*(){this.CoordinateValidate.validateFrom(e);const t={from:e},o=yield this.StartApi(this.apiClassName,"GISToScreenPos",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GlobalToLocalGeoRef(e,o){return t(this,void 0,void 0,function*(){this.CoordinateValidate.validateLocalFrom(e,o);const t={geoRefEid:e.eid,from:o},i=yield this.StartApi(this.apiClassName,"GlobalToLocalGeoRef",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}LocalToGlobalGeoRef(e,o){return t(this,void 0,void 0,function*(){this.CoordinateValidate.validateLocalFrom(e,o);const t={geoRefEid:e.eid,from:o},i=yield this.StartApi(this.apiClassName,"LocalToGlobalGeoRef",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Exchange(e,o,i){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:i.map(t=>Ui(e,o,t))}})}}class qi extends ci{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpMeasureAPI"})}Start(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"StartMeasure",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}End(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"EndMeasure",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class zi{validatePickByScreenPos(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`screenPos ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`screenPos ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw s&&s.func(`screenPos value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 2`)}}validatePickWorldPointByScreenPos(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`screenPos value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`screenPos value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw s&&s.func(`screenPos value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 2`)}}validatePickAesTilesNodeByScreenPos(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw g&&g.func(`screenPos ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`screenPos value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw g&&g.func(`screenPos value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 2`);if("object"!=typeof t||void 0===t.length)throw g&&g.func(`EntityTypeFilter ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`EntityTypeFilter ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(t.filter(e=>"string"==typeof e).length!==t.length)throw g&&g.func(`EntityTypeFilter value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`EntityTypeFilter value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`);if("boolean"!=typeof o)throw g&&g.func(`bFilterForExclude ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`bFilterForExclude ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`)}}validatePickAesTilesNodesByRectangle(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b;const p=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw p&&p.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={point1:[0,0],point2:[1,1],bMustBeFullyEnclosed:!0,selectMode:"New"};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw p&&p.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.point1){if("object"!=typeof e.point1||void 0===e.point1.length)throw p&&p.func(`point1 ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`point1 ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(2!==e.point1.filter(e=>"number"==typeof e).length)throw p&&p.func(`point1 value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 2`),new Error(`point1 value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==e.point2){if("object"!=typeof e.point2||void 0===e.point2.length)throw p&&p.func(`point2 ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`point2 ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(2!==e.point2.filter(e=>"number"==typeof e).length)throw p&&p.func(`point2 value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumberLength} 2`),new Error(`point2 value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==e.bMustBeFullyEnclosed&&"boolean"!=typeof e.bMustBeFullyEnclosed)throw p&&p.func(`bMustBeFullyEnclosed ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`bMustBeFullyEnclosed ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`);if(void 0!==e.selectMode){if("string"!=typeof e.selectMode)throw p&&p.func(`selectMode ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().string}`),new Error(`selectMode ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().string}`);if(!li.selectModeType.find(t=>t===e.selectMode))throw p&&p.func(`selectMode ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().range} ${li.selectModeType.toString()}`),new Error(`selectMode ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} ${li.selectModeType.toString()}`)}}}validatePickEntityByRectangle(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G;const O=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw O&&O.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={p0:[0,0],p1:[1,1],bMustBeFullyEnclosed:!0,bHighlightPicked:!0,entityTypeFilter:[],bFilterForExclude:!0,selectMode:"New"};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw O&&O.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.p0){if("object"!=typeof e.p0||void 0===e.p0.length)throw O&&O.func(`p0 ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`p0 ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(2!==e.p0.filter(e=>"number"==typeof e).length)throw O&&O.func(`p0 value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 2`),new Error(`p0 value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==e.p1){if("object"!=typeof e.p1||void 0===e.p1.length)throw O&&O.func(`p1 ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`p1 ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(2!==e.p1.filter(e=>"number"==typeof e).length)throw O&&O.func(`p1 value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumberLength} 2`),new Error(`p1 value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==e.bMustBeFullyEnclosed&&"boolean"!=typeof e.bMustBeFullyEnclosed)throw O&&O.func(`bMustBeFullyEnclosed ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`bMustBeFullyEnclosed ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`);if(void 0!==e.bHighlightPicked&&"boolean"!=typeof e.bHighlightPicked)throw O&&O.func(`bHighlightPicked ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().boolean}`),new Error(`bHighlightPicked ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`);if(void 0!==e.bFilterForExclude&&"boolean"!=typeof e.bFilterForExclude)throw O&&O.func(`bFilterForExclude ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().boolean}`),new Error(`bFilterForExclude ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().boolean}`);if(void 0!==e.selectMode){if("string"!=typeof e.selectMode)throw O&&O.func(`selectMode ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().string}`),new Error(`selectMode ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`);if(!li.selectModeType.find(t=>t===e.selectMode))throw O&&O.func(`selectMode ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} ${li.selectModeType.toString()}`),new Error(`selectMode ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().range} ${li.selectModeType.toString()}`)}if(void 0!==e.entityTypeFilter){if("object"!=typeof e.entityTypeFilter||void 0===e.entityTypeFilter.length)throw O&&O.func(`entityTypeFilter ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().array}`),new Error(`entityTypeFilter ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().array}`);if(e.entityTypeFilter.filter(e=>"string"==typeof e).length!==e.entityTypeFilter.length)throw O&&O.func(`entityTypeFilter value ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().arrayString}`),new Error(`entityTypeFilter value ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().arrayString}`);e.entityTypeFilter.forEach(e=>{var t,o;if(!Ho.get(e))throw O&&O.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}}}validatePickMaterialByScreenPos(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={screenPos:[0,0],EntityTypeFilter:[],bFilterForExclude:!0};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.screenPos){if("object"!=typeof e.screenPos||void 0===e.screenPos.length)throw g&&g.func(`screenPos ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`screenPos ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(2!==e.screenPos.filter(e=>"number"==typeof e).length)throw g&&g.func(`screenPos value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==e.EntityTypeFilter){if("object"!=typeof e.EntityTypeFilter||void 0===e.EntityTypeFilter.length)throw g&&g.func(`EntityTypeFilter ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`EntityTypeFilter ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(e.EntityTypeFilter.filter(e=>"string"==typeof e).length!==e.EntityTypeFilter.length)throw g&&g.func(`EntityTypeFilter value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayString}`),new Error(`EntityTypeFilter value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayString}`);e.EntityTypeFilter.forEach(e=>{var t,o;if(!Ho.get(e))throw g&&g.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}if(void 0!==e.bFilterForExclude&&"boolean"!=typeof e.bFilterForExclude)throw g&&g.func(`bFilterForExclude ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`bFilterForExclude ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`)}}validateGetEntitiesInViewport(e,t){var o,i,n,r,a,s,l,d;const c=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw c&&c.func(`entityTypeFilter ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`entityTypeFilter ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw c&&c.func(`entityTypeFilter value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`),new Error(`entityTypeFilter value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`);if(e.forEach(e=>{var t,o;if(!Ho.get(e))throw c&&c.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)}),void 0!==t&&"boolean"!=typeof t)throw c&&c.func(`bFilterForExclude ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`),new Error(`bFilterForExclude ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`)}}validateStartRectPick(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I;const j=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&void 0!==e){const t={bMustBeFullyEnclosed:!0,entityTypeFilter:[],bFilterForExclude:!1,selectMode:"New",highlightColor:"6c5dd34d",rectangleStyle:{borderColor:"6c5dd3",borderThickness:2}};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw j&&j.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.bMustBeFullyEnclosed)&&"boolean"!=typeof e.bMustBeFullyEnclosed)throw j&&j.func(`bMustBeFullyEnclosed ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bMustBeFullyEnclosed ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.bFilterForExclude)&&"boolean"!=typeof e.bMustBeFullyEnclosed)throw j&&j.func(`bFilterForExclude ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().boolean}`),new Error(`bFilterForExclude ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.entityTypeFilter)){if("object"!=typeof e.entityTypeFilter||void 0===e.entityTypeFilter.length)throw j&&j.func(`entityTypeFilter ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`entityTypeFilter ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.entityTypeFilter.filter(e=>"string"==typeof e).length!==e.entityTypeFilter.length)throw j&&j.func(`entityTypeFilter value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`entityTypeFilter value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`);e.entityTypeFilter.forEach(e=>{var t,o;if(!Ho.get(e))throw j&&j.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`entityTypeFilter.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}if(void 0!==(null==e?void 0:e.selectMode)){if("string"!=typeof e.selectMode)throw j&&j.func(`selectMode ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`selectMode ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`);if(!li.selectModeType.find(t=>t===e.selectMode))throw j&&j.func(`selectMode ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} ${li.selectModeType.toString()}`),new Error(`selectMode ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} ${li.selectModeType.toString()}`)}if(void 0!==(null==e?void 0:e.highlightColor)&&"string"!=typeof e.highlightColor)throw j&&j.func(`highlightColor ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().hexa}`),new Error(`highlightColor ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().hexa}`);if(void 0!==(null==e?void 0:e.rectangleStyle)){if(void 0!==(null===(y=e.rectangleStyle)||void 0===y?void 0:y.borderColor)&&"string"!=typeof e.rectangleStyle.borderColor)throw j&&j.func(`rectangleStyle.borderColor ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().hexa}`),new Error(`rectangleStyle.borderColor ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().hexa}`);if(void 0!==(null===(E=e.rectangleStyle)||void 0===E?void 0:E.borderThickness)&&("number"!=typeof e.rectangleStyle.borderThickness||e.rectangleStyle.borderThickness<0))throw j&&j.func(`rectangleStyle.borderThickness ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().positiveNumber}`),new Error(`rectangleStyle.borderThickness ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().positiveNumber}`)}}}}class Wi{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(e,o){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"RunAction"},i={actionName:e,actionParams:o},n=yield this.obj.startApi(t,i);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndAction(e=!1){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"EndCurrentAction"},o=yield this.obj.startApi(t,{bIsCancel:e});return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetAction(){return t(this,void 0,void 0,function*(){const e={apiClassName:this.apiClassName,apiFuncName:"GetCurrentAction"},t=yield this.obj.startApi(e,{});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Hi extends ci{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 zi}),Object.defineProperty(this,"Action",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Action=new Wi(e)}PickByScreenPos(e){return t(this,void 0,void 0,function*(){this.PickerValidate.validatePickByScreenPos(e);const t={screenPos:e},o=yield this.StartApi(this.apiClassName,"PickEntityByScreenPos",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickWorldPointByScreenPos(e){return t(this,void 0,void 0,function*(){this.PickerValidate.validatePickWorldPointByScreenPos(e);const t={screenPos:e},o=yield this.StartApi(this.apiClassName,"PickWorldPointByScreenPos",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickAesTilesNodeByScreenPos(e,o,i=!1){return t(this,void 0,void 0,function*(){this.PickerValidate.validatePickAesTilesNodeByScreenPos(e,o,i);const t={screenPos:e,bFilterForExclude:i,EntityTypeFilter:o.map(e=>this.obj.RegisterObj.EntityType.get(e))},n=yield this.StartApi(this.apiClassName,"PickAesTilesNodeByScreenPos",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickAesTilesNodesByRectangle(e){return t(this,void 0,void 0,function*(){this.PickerValidate.validatePickAesTilesNodesByRectangle(e);const t=yield this.StartApi(this.apiClassName,"PickAesTilesNodesByRectangle",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickEntityByRectangle(e){return t(this,void 0,void 0,function*(){this.PickerValidate.validatePickEntityByRectangle(e);const 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"},o=yield this.StartApi(this.apiClassName,"PickEntityByRectangle",t);if(o.success){const e=yield Xo(o.result.eids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);o.result=e}return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickMaterialByScreenPos(e){return t(this,void 0,void 0,function*(){this.PickerValidate.validatePickMaterialByScreenPos(e);const t={screenPos:e.screenPos,EntityTypeFilter:e.EntityTypeFilter.map(e=>this.obj.RegisterObj.EntityType.get(e)),bFilterForExclude:e.bFilterForExclude||!1},o=yield this.StartApi(this.apiClassName,"PickMaterialByScreenPos",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetEntitiesInViewport(e,o){var i;return t(this,void 0,void 0,function*(){this.PickerValidate.validateGetEntitiesInViewport(e,o);const t={entityTypeFilter:e.map(e=>this.obj.RegisterObj.EntityType.get(e)),bFilterForExclude:void 0===o||o},n=yield this.StartApi(this.apiClassName,"GetEntitiesInViewport",t),r=yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);if(r.success&&(null===(i=null==r?void 0:r.result)||void 0===i?void 0:i.eids)){const e=yield Xo(r.result.eids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);r.result.objects=e}return r})}StartRectPick(e){var o;return t(this,void 0,void 0,function*(){this.PickerValidate.validateStartRectPick(e);let t={};void 0!==e?(void 0!==e.entityTypeFilter&&(e.entityTypeFilter=e.entityTypeFilter.map(e=>Ho.get(e))),void 0!==e.highlightColor&&(e.highlightColor="object"==typeof e.highlightColor?Ei(e.highlightColor):Ei(ji(e.highlightColor))),void 0!==e.rectangleStyle&&void 0!==(null===(o=e.rectangleStyle)||void 0===o?void 0:o.borderColor)&&(e.rectangleStyle.borderColor="object"==typeof e.rectangleStyle.borderColor?Ei(e.rectangleStyle.borderColor):Ei(ji(e.rectangleStyle.borderColor))),t=e):t={};return yield this.Action.RunAction(this.RectPickEntityAction,t)})}EndRectPick(){return t(this,void 0,void 0,function*(){return yield this.Action.EndAction()})}}class Zi{validateStartPickPoint(e,t,o){var i,n,r,a,s,l,d,c,u,v;const h=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("boolean"!=typeof e)throw h&&h.func(`coordinateShow ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().boolean}`),new Error(`coordinateShow ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`);if("boolean"!=typeof t)throw h&&h.func(`iconShow ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`),new Error(`iconShow ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`);if("string"!=typeof o)throw h&&h.func(`coordZRef ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`),new Error(`coordZRef ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`);if(!li.coordZRefType.find(e=>e===o))throw h&&h.func(`coordZRef ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} ${li.coordZRefType.toString()}`),new Error(`coordZRef ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().range} ${li.coordZRefType.toString()}`)}}validateGetPickedPoint(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("string"!=typeof e)throw s&&s.func(`coordZRef ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`coordZRef ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(!li.coordZRefType.find(t=>t===e))throw s&&s.func(`coordZRef ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().range} ${li.coordZRefType.toString()}`),new Error(`coordZRef ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.coordZRefType.toString()}`)}}}class Yi extends ci{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 Zi})}StartPickPoint(e,o,i){return t(this,void 0,void 0,function*(){this.PickerpointValidate.validateStartPickPoint(e,o,i);const t={coordinateShow:e,iconShow:o,coordZRef:i},n=yield this.StartApi(this.apiClassName,"StartPickPoint",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndPickPoint(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"EndPickPoint",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetPickedPoints(e="altitude"){return t(this,void 0,void 0,function*(){this.PickerpointValidate.validateGetPickedPoint(e);const t={coordZRef:e},o=yield this.StartApi(this.apiClassName,"GetPickedPoints",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Qi{validateGetPickedPolylines(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`coordZRef ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`coordZRef ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}}class Ji extends ci{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 Qi})}StartPickPolyline(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"StartPickPolyline",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndPickPolyline(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"EndPickPolyline",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetPickedPolylines(e=0){return t(this,void 0,void 0,function*(){this.PickerpolylineValidate.validateGetPickedPolylines(e);const t={coordZRef:e},o=yield this.StartApi(this.apiClassName,"GetPickedPolylines",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Xi{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,o,i,n,r,a;(null==e?void 0:e.eid)&&(this.eid=e.eid),(null==e?void 0:e.type)&&(this.type=e.type),(null==e?void 0:e.mappingAnchors)&&(this.mappingAnchors=e.mappingAnchors),(null==e?void 0:e.source)&&((null===(t=e.source)||void 0===t?void 0:t.bg)&&(this.source.bg=e.source.bg),(null===(o=e.source)||void 0===o?void 0:o.needle)&&(this.source.needle=e.source.needle),(null===(i=e.source)||void 0===i?void 0:i.mask)&&(this.source.mask=e.source.mask),(null===(n=e.source)||void 0===n?void 0:n.frame)&&(this.source.frame=e.source.frame)),(null==e?void 0:e.display)&&((null===(r=e.display)||void 0===r?void 0:r.position)&&(this.display.position=e.display.position),(null===(a=e.display)||void 0===a?void 0:a.size)&&(this.display.size=e.display.size))}}class Ki{validateStart(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V;const P=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw P&&P.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={type:"manual",source:{bg:"",needle:"",mask:"",frame:""},mappingAnchors:[[0,0],[1,1]],display:{position:[0,0],size:0,anchors:"leftTop"}};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw P&&P.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.type&&"manual"!==e.type)throw P&&P.func(`type ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}, must be manual`),new Error(`type ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}, must be manual`);if(void 0!==e.source){if("object"!=typeof e.source)throw P&&P.func(`source ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`),new Error(`source ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`);const t={bg:"",needle:"",mask:"",frame:""};if(Object.keys(e.source).forEach(e=>{var o,i;if(void 0===t[e])throw P&&P.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`source.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(d=e.source)||void 0===d?void 0:d.bg)&&"string"!=typeof e.source.bg)throw P&&P.func(`source.bg ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`),new Error(`source.bg ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`);if(void 0!==(null===(v=e.source)||void 0===v?void 0:v.needle)&&"string"!=typeof e.source.needle)throw P&&P.func(`source.needle ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`source.needle ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`);if(void 0!==(null===(g=e.source)||void 0===g?void 0:g.mask)&&"string"!=typeof e.source.mask)throw P&&P.func(`source.mask ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().string}`),new Error(`source.mask ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().string}`);if(void 0!==(null===(b=e.source)||void 0===b?void 0:b.frame)&&"string"!=typeof e.source.frame)throw P&&P.func(`source.frame ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().string}`),new Error(`source.frame ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`)}if(void 0!==e.mappingAnchors){if("object"!=typeof e.mappingAnchors||void 0===e.mappingAnchors.length)throw P&&P.func(`mappingAnchors ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().array}`),new Error(`mappingAnchors ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().array}`);e.mappingAnchors.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw P&&P.func(`mappingAnchors value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`mappingAnchors value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(e.filter(e=>"number"==typeof e).length!==e.length)throw P&&P.func(`the value of mappingAnchors value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumber}`),new Error(`the value of mappingAnchors value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumber}`)})}if(void 0!==e.display){if("object"!=typeof e.display)throw P&&P.func(`display ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().object}`),new Error(`display ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().object}`);const t={position:[0,0],size:0,anchors:"leftTop"};if(Object.keys(e.display).forEach(e=>{var o,i;if(void 0===t[e])throw P&&P.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`display.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(C=e.display)||void 0===C?void 0:C.position)){if("object"!=typeof e.display.position||void 0===e.display.position.length)throw P&&P.func(`display.position ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().array}`),new Error(`display.position ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().array}`);if(2!==e.display.position.filter(e=>"number"==typeof e).length)throw P&&P.func(`display.position value ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().arrayNumberLength} 2`),new Error(`display.position value ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(M=e.display)||void 0===M?void 0:M.size)&&"number"!=typeof e.display.size)throw P&&P.func(`display.size ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().number}`),new Error(`display.size ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().number}`);if(void 0!==(null===(R=e.display)||void 0===R?void 0:R.anchors)){if("string"!=typeof e.display.anchors)throw P&&P.func(`display.anchors ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().string}`),new Error(`display.anchors ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().string}`);if(!li.anchorsType.find(t=>{var o;return t===(null===(o=e.display)||void 0===o?void 0:o.anchors)}))throw P&&P.func(`display.anchors ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().range} ${li.anchorsType.toString()}`),new Error(`display.anchors ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().range} ${li.anchorsType.toString()}`)}}}}}class en extends ci{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 Ki}),Object.defineProperty(this,"miniMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.miniMap=new Xi}Start(e){return t(this,void 0,void 0,function*(){e&&this.MinimapValidate.validateStart(e),e&&this.miniMap.SetData(e);const t=yield this.StartApi(this.apiClassName,"StartMiniMap",Object.assign({},e));return t.success&&(this.miniMap.SetData({eid:t.result.eid}),t.result={object:this.miniMap}),t})}End(){return t(this,void 0,void 0,function*(){if(!this.miniMap.GetData().eid)return{success:!1,message:"Please start first!"};return yield this.StartApi(this.apiClassName,"EndMiniMap",{eid:this.miniMap.GetData().eid})})}Get(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.miniMap.GetData()}})}}class tn{validateUpdateShapePoints(e,t){var o,i,n,r,a,s,l,d,c,u;const v=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw v&&v.func(`points ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`points ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw v&&v.func(`points value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`points value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if(e.forEach(e=>{var t,o,i,n,r,a,s,l,d,c;const u={pointIndex:0,point:[0,0,0]};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===u[e])throw v&&v.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0===e.pointIndex)throw v&&v.func(`pointIndex ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().required}`),new Error(`pointIndex ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().required}`);if("number"!=typeof e.pointIndex)throw v&&v.func(`pointIndex ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`pointIndex ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`);if(void 0===e.point)throw v&&v.func(`point ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().required}`),new Error(`point ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`);if("object"!=typeof e.point||void 0===e.point.length)throw v&&v.func(`point value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`point value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(3!==e.point.filter(e=>"number"==typeof e).length)throw v&&v.func(`point value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayNumberLength} 3`),new Error(`point value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayNumberLength} 3`)}),"string"!=typeof t)throw v&&v.func(`updateType ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`),new Error(`updateType ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`);if(!li.updateType.find(e=>e===t))throw v&&v.func(`updateType ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.updateType.toString()}`),new Error(`updateType ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} ${li.updateType.toString()}`)}}validateRangePickShapePoints(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m,g,f;const y=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw y&&y.func(`start ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`start ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw y&&y.func(`start value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 2`),new Error(`start value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 2`);if("object"!=typeof t||void 0===t.length)throw y&&y.func(`end ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`end ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(2!==t.filter(e=>"number"==typeof e).length)throw y&&y.func(`end value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumberLength} 2`),new Error(`end value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayNumberLength} 2`);if("string"!=typeof o)throw y&&y.func(`selectMode ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`selectMode ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`);if(!li.selectModeType.find(e=>e===o))throw y&&y.func(`selectMode ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} ${li.selectModeType.toString()}`),new Error(`selectMode ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} ${li.selectModeType.toString()}`)}}}class on extends ci{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 tn})}UpdateShapePoints(e,o){return t(this,void 0,void 0,function*(){this.ShapeValidate.validateUpdateShapePoints(e,o);const t={points:e,updateType:o},i=yield this.StartApi(this.apiClassName,"UpdateShapePoints",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RangePickShapePoints(e,o,i){return t(this,void 0,void 0,function*(){this.ShapeValidate.validateRangePickShapePoints(e,o,i);const t={start:e,end:o,selectMode:i},n=yield this.StartApi(this.apiClassName,"RangePickShapePoints",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class nn{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,o,i,n;(null==e?void 0:e.eid)&&(this.eid=e.eid),(null==e?void 0:e.source)&&(void 0!==(null===(t=e.source)||void 0===t?void 0:t.bg)&&(this.source.bg=e.source.bg),void 0!==(null===(o=e.source)||void 0===o?void 0:o.needle)&&(this.source.needle=e.source.needle)),(null==e?void 0:e.display)&&((null===(i=e.display)||void 0===i?void 0:i.position)&&(this.display.position=e.display.position),(null===(n=e.display)||void 0===n?void 0:n.size)&&(this.display.size=e.display.size))}}class rn{validateStart(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O;const $=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw $&&$.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={source:{bg:"",needle:""},display:{position:[0,0],size:0,anchors:"leftTop"}};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw $&&$.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.source){if("object"!=typeof e.source)throw $&&$.func(`source ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`source ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);const t={bg:"",needle:""};if(Object.keys(e.source).forEach(e=>{var o,i;if(void 0===t[e])throw $&&$.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`source.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(s=e.source)||void 0===s?void 0:s.bg)&&"string"!=typeof e.source.bg)throw $&&$.func(`sourc.bg ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`),new Error(`sourc.bg ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`);if(void 0!==(null===(c=e.source)||void 0===c?void 0:c.needle)&&"string"!=typeof e.source.needle)throw $&&$.func(`sourc.needle ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`sourc.needle ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`)}if(void 0!==e.display){if("object"!=typeof e.display)throw $&&$.func(`display ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().object}`),new Error(`display ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().object}`);const t={position:[0,0],size:0,anchors:"leftTop"};if(Object.keys(e.display).forEach(e=>{var o,i;if(void 0===t[e])throw $&&$.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`display.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(g=e.display)||void 0===g?void 0:g.position)){if("object"!=typeof e.display.position||void 0===e.display.position.length)throw $&&$.func(`display.position ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`),new Error(`display。position ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().array}`);if(2!==e.display.position.filter(e=>"number"==typeof e).length)throw $&&$.func(`display.position ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 2`),new Error(`display.position ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(E=e.display)||void 0===E?void 0:E.size)&&"number"!=typeof e.display.size)throw $&&$.func(`display.size ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}`),new Error(`display.size ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`);if(void 0!==(null===(j=e.display)||void 0===j?void 0:j.anchors)){if("string"!=typeof e.display.anchors)throw $&&$.func(`display.anchors ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().string}`),new Error(`display.anchors ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().string}`);if(!li.anchorsType.find(t=>{var o;return t===(null===(o=e.display)||void 0===o?void 0:o.anchors)}))throw $&&$.func(`display.anchors ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().range} ${li.anchorsType.toString()}`),new Error(`display.anchors ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().range} ${li.anchorsType.toString()}`)}}}}}class an extends ci{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 rn}),Object.defineProperty(this,"compass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.compass=new nn}Start(e){return t(this,void 0,void 0,function*(){e&&this.CompassValidate.validateStart(e),e&&this.compass.SetData(e);const t=yield this.StartApi(this.apiClassName,"StartCompass",Object.assign({},e));return t.success&&(this.compass.SetData({eid:t.result.eid}),t.result={object:this.compass}),t})}End(){return t(this,void 0,void 0,function*(){if(!this.compass.GetData().eid)return{success:!1,message:"Please start first!"};return yield this.StartApi(this.apiClassName,"EndCompass",{eid:this.compass.GetData().eid})})}Get(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.compass.GetData()}})}}class sn{validateMoveLinear(e,t){var o,i,n,r,a,s,l,d,c,u,v,h;const m=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw m&&m.func(`datas ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`datas ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.forEach(e=>{var t,o,i,n,r,a,s,l,d,c,u,v;const h={objects:[],location:[0,0,0],time:1};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===h[e])throw m&&m.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`datas.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0===e.objects)throw m&&m.func(`datas.objects ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().required}`),new Error(`datas.objects ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().required}`);if("object"!=typeof e.objects||void 0===e.objects.length)throw m&&m.func(`datas.objects ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`datas.objects ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.objects.filter(e=>"object"==typeof e).length!==e.objects.length)throw m&&m.func(`datas.objects value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`datas.objects value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0===e.location)throw m&&m.func(`datas.location ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`),new Error(`datas.location ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().required}`);if(3!==e.location.filter(e=>"number"==typeof e).length)throw m&&m.func(`datas.location value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayNumberLength} 3`),new Error(`datas.location ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayNumberLength} 3`);if(void 0!==e.time&&("number"!=typeof e.time||e.time<0))throw m&&m.func(`datas.time ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().positiveNumber}`),new Error(`datas.time ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().positiveNumber}`)}),void 0!==t){if("object"!=typeof t.calculateCoordZ)throw m&&m.func(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().calculateCoordZ),new Error(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw m&&m.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw m&&m.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().coordZRef),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw m&&m.func(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().coordZRef2),new Error(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw m&&m.func(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().coordZOffset),new Error(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZOffset)}}}}class ln extends ci{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 sn})}Move(e,o){return t(this,void 0,void 0,function*(){this.MoveLinearValidate.validateMoveLinear(e,o);const t={data:e.map(e=>{var t;return{eids:e.objects.map(e=>e.eid),time:null!==(t=e.time)&&void 0!==t?t:1,location:e.location}})};o&&(t.operations=o);const i=yield this.StartApi(this.apiClassName,"MoveLinear",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class dn extends ci{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 Wi(e)}Start(e){return t(this,void 0,void 0,function*(){const t={bContinuous:!0};this.pickerMaterialDataList=[],void 0!==e&&(void 0!==(null==e?void 0:e.bContinuous)&&(t.bContinuous=e.bContinuous),void 0!==(null==e?void 0:e.func)&&(yield this.obj.Renderer.RegisterSceneEvent([{name:"OnWdpMaterialHit",func:e.func}])));return yield this.Action.RunAction("WdpPickMaterialAction",t)})}End(){return t(this,void 0,void 0,function*(){const e=yield this.Action.EndAction();return e.success&&(yield this.obj.Renderer.UnRegisterSceneEvent(["OnWdpMaterialHit"])),e})}GetMaterials(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pickerMaterialDataList}})}}class cn{validateRgbaToHexa(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$;const T=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw T&&T.func(`rgba ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`rgba ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const o={r:0,g:0,b:0,a:0};if(Object.keys(e).forEach(e=>{var t,i;if(void 0===o[e])throw T&&T.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0===(null==e?void 0:e.r))throw T&&T.func(`rgba.r ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`),new Error(`rgba.r ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`);if(void 0===(null==e?void 0:e.g))throw T&&T.func(`rgba.g ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().required}`),new Error(`rgba.g ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().required}`);if(void 0===(null==e?void 0:e.b))throw T&&T.func(`rgba.b ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().required}`),new Error(`rgba.b ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().required}`);if("number"!=typeof e.r||e.r<0||e.r>255)throw T&&T.func(`rgba.r ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}. ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} 0 ~ 255`),new Error(`rgba.r ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`);if("number"!=typeof e.g||e.r<0||e.r>255)throw T&&T.func(`rgba.g ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}. ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} 0 ~ 255`),new Error(`rgba.g ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`);if("number"!=typeof e.b||e.r<0||e.r>255)throw T&&T.func(`rgba.b ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}. ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} 0 ~ 255`),new Error(`rgba.b ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`);if(!li.alphaType.find(e=>e===t))throw T&&T.func(`alphaType ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} ${li.alphaType.toString()}`),new Error(`alphaType ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().range} ${li.alphaType.toString()}`);if(void 0!==(null==e?void 0:e.a))if("decimal"===t){if("number"!=typeof e.a||e.a<0||e.a>1)throw T&&T.func(`rgba.a ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}. ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().range} 0 ~ 1`),new Error(`rgba.a ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().number}`)}else if("number"!=typeof e.a||e.a<0||e.a>255)throw T&&T.func(`rgba.a ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().number}. ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().range} 0 ~ 255`),new Error(`rgba.a ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().number}`)}}validateHexaToRgba(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("string"!=typeof e)throw l&&l.func(`hexa ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`hexa ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(!li.alphaType.find(e=>e===t))throw l&&l.func(`alphaType ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.alphaType.toString()}`),new Error(`alphaType ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.alphaType.toString()}`)}}}class un{constructor(){Object.defineProperty(this,"ColorValidate",{enumerable:!0,configurable:!0,writable:!0,value:new cn})}RgbaToHexa(e,o="decimal"){return t(this,void 0,void 0,function*(){this.ColorValidate.validateRgbaToHexa(e,o);let t="";return t="decimal"===o?Ei(e):(e=>{const{r:t,g:o,b:i,a:n=255}=e;return`${pi(t)}${pi(o)}${pi(i)}${255===n?"":pi(n)}`})(e),{success:!0,message:"",result:t}})}HexaToRgba(e,o="decimal"){return t(this,void 0,void 0,function*(){let t;return this.ColorValidate.validateHexaToRgba(e,o),t="decimal"===o?wi(e):Ii(e),{success:!0,message:"",result:t}})}}class vn{validateAddScreenPosBound(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e.locations)throw u&&u.func(`locations ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`locations ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e.locations||void 0===e.locations.length)throw u&&u.func(`locations ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`locations ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.locations.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw u&&u.func(`The value of locations ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`The value of locations ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw u&&u.func(`The value of locations ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`The value of locations ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)}),void 0===e.enableChangeNotify)throw u&&u.func(`enableChangeNotify ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`),new Error(`enableChangeNotify ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().required}`);if(e.enableChangeNotify.filter(e=>"boolean"==typeof e).length!==e.enableChangeNotify.length)throw u&&u.func(`The value of enableChangeNotify ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`The value of enableChangeNotify ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`)}}validateUpdateScreenPosBound(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e.id)throw u&&u.func(`id ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`id ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if(void 0!==e.enableChangeNotify&&"boolean"!=typeof e.enableChangeNotify)throw u&&u.func(`enableChangeNotify ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().boolean}`),new Error(`enableChangeNotify ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`);if(void 0!==e.location){if("object"!=typeof e.location||void 0===e.location.length)throw u&&u.func(`location ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`location ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(3!==e.location.filter(e=>"number"==typeof e).length)throw u&&u.func(`The value of location ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayNumberLength} 3`),new Error(`The value of location ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayNumberLength} 3`)}}}validateRemoveScreenPosBound(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw d&&d.func(`ids ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`ids ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e||void 0===e.length)throw d&&d.func(`ids ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`ids ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw d&&d.func(`ids ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`ids ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`)}}}class hn extends ci{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"UWdpScreenPosBoundAPI"}),Object.defineProperty(this,"ScreenValidate",{enumerable:!0,configurable:!0,writable:!0,value:new vn})}AddScreenPosBound(e){return t(this,void 0,void 0,function*(){this.ScreenValidate.validateAddScreenPosBound(e);const t=yield this.StartApi(this.apiClassName,"AddScreenPosBound",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UpdateScreenPosBound(e){return t(this,void 0,void 0,function*(){this.ScreenValidate.validateUpdateScreenPosBound(e);const t=yield this.StartApi(this.apiClassName,"UpdateScreenPosBound",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RemoveScreenPosBound(e){return t(this,void 0,void 0,function*(){this.ScreenValidate.validateRemoveScreenPosBound(e);const t=yield this.StartApi(this.apiClassName,"RemoveScreenPosBound",{ids:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class mn extends ci{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}),Object.defineProperty(this,"Color",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Screen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.CoordAide=new ki(e),this.Coordinate=new Bi(e),this.Measure=new qi(e),this.Picker=new Hi(e),this.PickerPoint=new Yi(e),this.PickerPolyline=new Ji(e),this.MiniMap=new en(e),this.Shape=new on(e),this.Compass=new an(e),this.MoveLinear=new ln(e),this.PickerMaterial=new dn(e),this.Color=new un,this.Screen=new hn(e)}}class gn{validateRunCustomizeApi(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"object"!=typeof e)throw r&&r.func(`params ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`params ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`)}validateRun(e,t,o={}){var i,n,r,a,s,l,d,c;const u=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("string"!=typeof e)throw u&&u.func(`apiClassName ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`apiClassName ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if("string"!=typeof t)throw u&&u.func(`apiFuncName ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`apiFuncName ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if("object"!=typeof o)throw u&&u.func(`params ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`),new Error(`params ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`)}}}class fn extends ci{constructor(e){super(e),Object.defineProperty(this,"CustomValidate",{enumerable:!0,configurable:!0,writable:!0,value:new gn})}RunCustomizeApi(e){return t(this,void 0,void 0,function*(){this.CustomValidate.validateRunCustomizeApi(e);return yield this.obj.startApiByObject(e)})}Run(e,o,i={}){return t(this,void 0,void 0,function*(){this.CustomValidate.validateRun(e,o,i);const t={apiClassName:e,apiFuncName:o};return yield this.obj.startApi(t,i)})}}class yn{validateSetCoordZType(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`coordZTypeValue ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`coordZTypeValue ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}validateSetAudioVolume(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`volume ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`volume ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}validateSetMode(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("string"!=typeof e)throw s&&s.func(`mode ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`mode ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(!li.editormodeType.find(t=>t===e))throw s&&s.func(`mode ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().range} ${li.editormodeType.toString()}`),new Error(`mode ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.editormodeType.toString()}`)}}validateSetDefaultActionSetting(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j;const S=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw S&&S.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={bSelectActionEnabled:!0,bClickedEventEnabled:!0,bHoverEventEnabled:!0,pickFilter:{bFilterForExclude:!0,filterEntityTypes:[],excludeEntities:[]},selectionMode:"New"};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw S&&S.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.pickFilter){if("object"!=typeof e.pickFilter)throw S&&S.func(`pickFilter ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`pickFilter ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);const t={bFilterForExclude:!0,filterEntityTypes:[],excludeEntities:[]};if(Object.keys(e.pickFilter).forEach(e=>{var o,i;if(void 0===t[e])throw S&&S.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(s=e.pickFilter)||void 0===s?void 0:s.bFilterForExclude)&&"boolean"!=typeof e.pickFilter.bFilterForExclude)throw S&&S.func(`pickFilter.bFilterForExclude ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`),new Error(`pickFilter.bFilterForExclude ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`);if(void 0!==(null===(c=e.pickFilter)||void 0===c?void 0:c.filterEntityTypes)){if("object"!=typeof e.pickFilter.filterEntityTypes||void 0===e.pickFilter.filterEntityTypes.length)throw S&&S.func(`pickFilter.filterEntityTypes ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`),new Error(`pickFilter.filterEntityTypes ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().array}`);if(e.pickFilter.filterEntityTypes.filter(e=>"string"==typeof e).length!==e.pickFilter.filterEntityTypes.length)throw S&&S.func(`pickFilter.filterEntityTypes value ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayString}`),new Error(`pickFilter.filterEntityTypes value ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().arrayString}`);e.pickFilter.filterEntityTypes.forEach(e=>{var t,o;if(!Ho.get(e))throw S&&S.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}if(void 0!==(null===(g=e.pickFilter)||void 0===g?void 0:g.excludeEntities)){if("object"!=typeof e.pickFilter.excludeEntities||void 0===e.pickFilter.excludeEntities.length)throw S&&S.func(`pickFilter.excludeEntities ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`),new Error(`pickFilter.excludeEntities ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().array}`);if(e.pickFilter.excludeEntities.filter(e=>"object"==typeof e).length!==e.pickFilter.excludeEntities.length)throw S&&S.func(`pickFilter.excludeEntities value ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().object}`),new Error(`pickFilter.excludeEntities value ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().object}`)}}if(void 0!==e.selectionMode){if("string"!=typeof e.selectionMode)throw S&&S.func(`selectionMode ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`),new Error(`selectionMode ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().string}`);if(!li.selectModeType.find(t=>t===e.selectionMode))throw S&&S.func(`selectionMode ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().range} ${li.selectModeType.toString()}`),new Error(`selectionMode ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().range} ${li.selectModeType.toString()}`)}}}validateSetGizmoSetting(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={gizmoState:"Disable",gizmoCoordinateSystem:"World",bPreserveScaleRatio:!0};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.gizmoState){if("string"!=typeof e.gizmoState)throw g&&g.func(`gizmoState ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`gizmoState ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.gizmoStateType.find(t=>t===e.gizmoState))throw g&&g.func(`gizmoState ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.gizmoStateType.toString()}`),new Error(`gizmoState ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.gizmoStateType.toString()}`)}if(void 0!==e.gizmoCoordinateSystem){if("string"!=typeof e.gizmoCoordinateSystem)throw g&&g.func(`gizmoCoordinateSystem ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`),new Error(`gizmoCoordinateSystem ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`);if(!li.gizmoCoordinateSystemType.find(t=>t===e.gizmoCoordinateSystem))throw g&&g.func(`gizmoCoordinateSystem ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} ${li.gizmoCoordinateSystemType.toString()}`),new Error(`gizmoCoordinateSystem ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().range} ${li.gizmoCoordinateSystemType.toString()}`)}if(void 0!==e.bPreserveScaleRatio&&"boolean"!=typeof e.bPreserveScaleRatio)throw g&&g.func(`bPreserveScaleRatio ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`bPreserveScaleRatio ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`)}}validateSetEditShapeActionSetting(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw u&&u.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={editMode:"Create",lineWidth:20};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw u&&u.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.editMode){if("string"!=typeof e.editMode)throw u&&u.func(`editMode ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`editMode ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.editModeType.find(t=>t===e.editMode))throw u&&u.func(`editMode ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.editModeType.toString()}`),new Error(`editMode ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.editModeType.toString()}`)}if(void 0!==e.lineWidth&&("number"!=typeof e.lineWidth||e.lineWidth<0))throw u&&u.func(`lineWidth ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().positiveNumber}`),new Error(`lineWidth ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().positiveNumber}`)}}validateSetOutlineThickness(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`thickness ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`thickness ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}validateSetVisualColorStyle(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("string"!=typeof e)throw l&&l.func(`styleName ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`styleName ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if("string"!=typeof t)throw l&&l.func(`color ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().hexa}`),new Error(`color ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().hexa}`)}}validateSetScreenPercentage(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"number"!=typeof e)throw r&&r.func(`screenPercentage ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`screenPercentage ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)}}class bn extends ci{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 yn}),Object.defineProperty(this,"Visual",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Visual=new Si(e)}GetValiDateState(){var e;return null===(e=li.getInstance())||void 0===e?void 0:e.GetValiDateState()}SetValiDateState(e){var t;null===(t=li.getInstance())||void 0===t||t.SetValiDateState(e)}GetApiVersion(){return t(this,void 0,void 0,function*(){const e={apiClassName:this.apiClassName,apiFuncName:"GetApiVersion"},t=yield this.obj.startApi(e,{});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCoordType(e){return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetCoordZType(e);const t={coordZTypeValue:e};return yield this.StartApi(this.apiClassName,"SetCoordType",t)})}GetCoordType(){return t(this,void 0,void 0,function*(){return yield this.StartApi(this.apiClassName,"GetCoordType",{})})}SetCoordZType(e){return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetCoordZType(e);const t={coordZTypeValue:e};return yield this.StartApi(this.apiClassName,"SetCoordZType",t)})}GetCoordZType(){return t(this,void 0,void 0,function*(){return yield this.StartApi(this.apiClassName,"GetCoordZType",{})})}SetAudioVolume(e){return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetAudioVolume(e);const t=yield this.StartApi(this.apiClassName,"SetAudioVolume",{volume:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetMode(e="Runtime"){return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetMode(e);const t=yield this.StartApi(this.apiClassName,"SetInteractiveMode",{mode:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetDefaultActionSetting(e){var o,i,n,r;return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetDefaultActionSetting(e);const t={};(null==e?void 0:e.pickFilter)&&(t.pickFilter={},t.pickFilter.bFilterForExclude=void 0===(null===(o=e.pickFilter)||void 0===o?void 0:o.bFilterForExclude)||e.pickFilter.bFilterForExclude,t.pickFilter.filterEntityTypes=(null===(i=e.pickFilter)||void 0===i?void 0:i.filterEntityTypes)?e.pickFilter.filterEntityTypes.map(e=>this.obj.RegisterObj.EntityType.get(e)):[],t.pickFilter.excludeEntities=(null===(n=e.pickFilter)||void 0===n?void 0:n.excludeEntities)?e.pickFilter.excludeEntities.map(e=>e.eid):[]),t.selectionMode=null!==(r=e.selectionMode)&&void 0!==r?r:"New",t.bEditPivotMode=void 0!==e.bEditPivotMode&&e.bEditPivotMode;const a=yield this.StartApi(this.WdpActionSettingsAPI,"SetDefaultActionSetting",t);return yield ei(a,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetGizmoSetting(e={}){return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetGizmoSetting(e);const t=yield this.StartApi(this.apiClassName,"SetGizmoSetting",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEditShapeActionSetting(e){return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetEditShapeActionSetting(e);const t=yield this.StartApi(this.WdpActionSettingsAPI,"SetEditShapeActionSetting",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetOutlineThickness(e){return t(this,void 0,void 0,function*(){return this.SettingValidate.validateSetOutlineThickness(e),yield this.Visual.SetOutlineThickness(e)})}GetOutlineThickness(){return t(this,void 0,void 0,function*(){return yield this.Visual.GetOutlineThickness()})}SetVisualColorStyle(e,o){return t(this,void 0,void 0,function*(){return this.SettingValidate.validateSetVisualColorStyle(e,o),yield this.Visual.SetVisualColorStyle(e,o)})}GetVisualColorStyle(){return t(this,void 0,void 0,function*(){return yield this.Visual.GetVisualColorStyle()})}SetScreenPercentage(e){return t(this,void 0,void 0,function*(){this.SettingValidate.validateSetScreenPercentage(e);const t=yield this.StartApi(this.apiClassName,"SetScreenPercentage",{screenPercentage:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetScreenPercentage(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"GetScreenPercentage",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class pn extends $i{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=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0: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 t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PointEntityAtom.point}})}SetPoint(e){return t(this,void 0,void 0,function*(){return yield this.Update({point:e})})}GetScheme(){return{PointEntityAtom:this.PointEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{point:this.PointEntityAtom.point})}SetData(e){this.setEid(e),this.setBasicData(e),void 0!==e.point&&(this.PointEntityAtom.point=e.point)}generateAtomData(e){const t={},o={},i={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),void 0!==e.point&&(i.point=e.point),Object.keys(i).length>0&&(t.PointEntityAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{point:this.PointEntityAtom.point})}Validate(e){var t,o,i,n,r,a,s;const l=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw l&&l.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const d=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw l&&l.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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!==(null==e?void 0:e.point)){if("object"!=typeof e.point||void 0===e.point.length)throw l&&l.func(`point ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`point ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(3!==e.point.filter(e=>"number"==typeof e).length)throw l&&l.func(`point ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 3`),new Error(`point ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 3`)}}}class En extends fi{constructor(e){super(e,pn),this.setType("Point")}}class wn extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Point2D"}),Object.defineProperty(this,"Point2DEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{point:[0,0]}}),this.setObjAtom(this),this.oType="Point2D",this.type=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get point(){return this.Point2DEntityAtom.point}set point(e){this.Update({point:e})}GetPoint(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Point2DEntityAtom.point}})}SetPoint(e){return t(this,void 0,void 0,function*(){return yield this.Update({point:e})})}GetScheme(){return{Point2DEntityAtom:this.Point2DEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{point:this.Point2DEntityAtom.point})}SetData(e){this.setEid(e),this.setBasicData(e),void 0!==e.point&&(this.Point2DEntityAtom.point=e.point)}generateAtomData(e){const t={},o={},i={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),void 0!==e.point&&(i.point=e.point),Object.keys(i).length>0&&(t.Point2DEntityAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{point:this.Point2DEntityAtom.point})}Validate(e){var t,o,i,n,r,a,s;const l=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw l&&l.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const d=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw l&&l.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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!==(null==e?void 0:e.point)){if("object"!=typeof e.point||void 0===e.point.length)throw l&&l.func(`point ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`point ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(2!==e.point.filter(e=>"number"==typeof e).length)throw l&&l.func(`point ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 2`),new Error(`point ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 2`)}}}class In extends fi{constructor(e){super(e,wn),this.setType("Point2D")}}class jn extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Polyline"}),Object.defineProperty(this,"PolylineEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{polyline:[[0,0,0]]}}),this.setObjAtom(this),this.oType="Polyline",this.type=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0: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 t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineEntityAtom.polyline}})}SetPolyline(e){return t(this,void 0,void 0,function*(){return yield this.Update({polyline:e})})}GetScheme(){return{PolylineEntityAtom:this.PolylineEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polyline:this.PolylineEntityAtom.polyline})}SetData(e){this.setEid(e),this.setBasicData(e),void 0!==e.polyline&&(this.PolylineEntityAtom.polyline=e.polyline)}generateAtomData(e){const t={},o={},i={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),void 0!==e.polyline&&(i.polyline=e.polyline),Object.keys(i).length>0&&(t.PolylineEntityAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polyline:this.PolylineEntityAtom.polyline})}Validate(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw a&&a.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const s=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===s[e])throw a&&a.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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!==(null==e?void 0:e.polyline)){if("object"!=typeof e.polyline||void 0===e.polyline.length)throw a&&a.func(`polyline value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`polyline value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);e.polyline.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw a&&a.func(`the value of polyline value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polyline value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(`the value of polyline value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polyline value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}}}class Sn extends fi{constructor(e){super(e,jn),this.setType("Polyline")}}class Cn extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Polyline2D"}),Object.defineProperty(this,"Polyline2DEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{polyline:[[0,0]]}}),this.setObjAtom(this),this.oType="Polyline2D",this.type=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get polyline(){return this.Polyline2DEntityAtom.polyline}set polyline(e){this.Update({polyline:e})}GetPolyline(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Polyline2DEntityAtom.polyline}})}SetPolyline(e){return t(this,void 0,void 0,function*(){return yield this.Update({polyline:e})})}GetScheme(){return{Polyline2DEntityAtom:this.Polyline2DEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polyline:this.Polyline2DEntityAtom.polyline})}SetData(e){this.setEid(e),this.setBasicData(e),void 0!==e.polyline&&(this.Polyline2DEntityAtom.polyline=e.polyline)}generateAtomData(e){const t={},o={},i={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),void 0!==e.polyline&&(i.polyline=e.polyline),Object.keys(i).length>0&&(t.Polyline2DEntityAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polyline:this.Polyline2DEntityAtom.polyline})}Validate(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw a&&a.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const s=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===s[e])throw a&&a.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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!==(null==e?void 0:e.polyline)){if("object"!=typeof e.polyline||void 0===e.polyline.length)throw a&&a.func(`polyline value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`polyline value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);e.polyline.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw a&&a.func(`the value of polyline value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polyline value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(`the value of polyline value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of polyline value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})}}}class Gn extends fi{constructor(e){super(e,Cn),this.setType("Polyline2D")}}class On extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Polygon"}),Object.defineProperty(this,"PolygonEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{polygon:[[[0,0,0]]]}}),this.setObjAtom(this),this.oType="Polygon",this.type=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get polygon(){return this.PolygonEntityAtom.polygon}set polygon(e){this.Update({polygon:e})}GetPolygon(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolygonEntityAtom.polygon}})}SetPolygon(e){return t(this,void 0,void 0,function*(){return yield this.Update({polygon:e})})}GetScheme(){return{PolygonEntityAtom:this.PolygonEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polygon:this.PolygonEntityAtom.polygon})}SetData(e){this.setEid(e),this.setBasicData(e),void 0!==e.polygon&&(this.PolygonEntityAtom.polygon=e.polygon)}generateAtomData(e){const t={},o={},i={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),void 0!==e.polygon&&(i.polygon=e.polygon),Object.keys(i).length>0&&(t.PolygonEntityAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polygon:this.PolygonEntityAtom.polygon})}Validate(e){var t,o,i,n,r,a,s;const l=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw l&&l.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const d=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw l&&l.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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!==(null==e?void 0:e.polygon)){if("object"!=typeof e.polygon)throw l&&l.func(`polygon ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`polygon ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.PolygonEntityAtom.polygon;if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw l&&l.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.polygon){if("object"!=typeof e.polygon||void 0===e.polygon.length)throw l&&l.func(`polygon ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`polygon ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);e.polygon.forEach(e=>{var t,o;if("object"!=typeof e||void 0===e.length)throw l&&l.func(`polygon value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`polygon value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw l&&l.func(`the value of polygon value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polygon value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw l&&l.func(`the value of polygon value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of polygon value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})})}}}}class $n extends fi{constructor(e){super(e,On),this.setType("Polygon")}}class Tn extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Polygon2D"}),Object.defineProperty(this,"Polygon2DEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{polygon:[[[0,0]]]}}),this.setObjAtom(this),this.oType="Polygon2D",this.type=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0: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 t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Polygon2DEntityAtom.polygon}})}SetPolygon(e){return t(this,void 0,void 0,function*(){return yield this.Update({polygon:e})})}GetScheme(){return{Polygon2DEntityAtom:this.Polygon2DEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polygon:this.Polygon2DEntityAtom.polygon})}SetData(e){this.setEid(e),this.setBasicData(e),void 0!==e.polygon&&(this.Polygon2DEntityAtom.polygon=e.polygon)}generateAtomData(e){const t={},o={},i={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),void 0!==e.polygon&&(i.polygon=e.polygon),Object.keys(i).length>0&&(t.Polygon2DEntityAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{polygon:this.Polygon2DEntityAtom.polygon})}Validate(e){var t,o,i,n,r,a,s;const l=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw l&&l.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const d=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw l&&l.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.polygon)){if("object"!=typeof e.polygon)throw l&&l.func(`polygon ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`polygon ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.Polygon2DEntityAtom.polygon;if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw l&&l.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.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.polygon){if("object"!=typeof e.polygon||void 0===e.polygon.length)throw l&&l.func(`polygon ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`polygon ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);e.polygon.forEach(e=>{var t,o;if("object"!=typeof e||void 0===e.length)throw l&&l.func(`polygon value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`polygon value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw l&&l.func(`the value of polygon value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polygon value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw l&&l.func(`the value of polygon value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of polygon value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})})}}}}class Mn extends fi{constructor(e){super(e,Tn),this.setType("Polygon2D")}}class An{validateStartShowCoord(e,t){var o,i,n,r,a,s,l,d,c,u;const v=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if(void 0===e)throw v&&v.func(`coordinates ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`),new Error(`coordinates ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().required}`);if("object"!=typeof e||void 0===e.length)throw v&&v.func(`coordinates ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`coordinates ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);if(e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw v&&v.func(`The value of coordinates ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`The value of coordinates ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw v&&v.func(`The value of coordinates ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`The value of coordinates ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)}),void 0!==t){if("string"!=typeof t)throw v&&v.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().coordZRef),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===t))throw v&&v.func(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().coordZRef2),new Error(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef2)}}}validateClearByTypes(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw d&&d.func(`types ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`types ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e||void 0===e.length)throw d&&d.func(`types ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`types ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw d&&d.func(`types ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`types ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`);e.forEach(e=>{var t,o;if(!Ho.get(e))throw d&&d.func(`types.${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`types.,${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}}validateUrl(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("string"!=typeof e)throw s&&s.func(`url ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`url ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if("string"!=typeof e)throw s&&s.func(`url ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`url ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`)}}}class Dn extends ci{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 An}),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,"Point2D",{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,"Polyline2D",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Polygon",{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 di(e),this.Point=new En(e),this.Point2D=new In(e),this.Polyline=new Sn(e),this.Polyline2D=new Gn(e),this.Polygon=new $n(e),this.Polygon2D=new Mn(e)}StartShowCoord(e,o){return t(this,void 0,void 0,function*(){this.GeometryValidate.validateStartShowCoord(e,o);const t=yield this.StartApi(this.apiClassName,"StartShowCoord",{coordinates:e,coordZRef:o});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndShowCoord(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"EndShowCoord",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EnableDraw(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"EnableGeometryDraw",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}DisableDraw(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"DisableGeometryDraw",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ClearByTypes(e){return t(this,void 0,void 0,function*(){if(this.GeometryValidate.validateClearByTypes(e),(e=e.filter(e=>{if(this.obj.RegisterObj.GetTypes().find(t=>t.name===e&&"Geometry"===t.category))return e})).length<=0)return{success:!1,message:"Type is empty"};const t=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e)));if(t.success)for(let t=0;t<e.length;t++){const o=this.obj.RegisterObj.GetTypes().find(o=>o.name===e[t]);o&&(yield o.object.ClearCache())}return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return t(this,void 0,void 0,function*(){const e=this.obj.RegisterObj.GetTypes().filter(e=>"Geometry"===e.category),t=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e.name)));t.success&&(yield this.ClearCache());return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ClearCache(){return t(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 o,i,n,r,a,s;return t(this,void 0,void 0,function*(){this.GeometryValidate.validateUrl(e);let t=yield this.StartApi(this.apiClassName,"CreateGeometryEntitiesFromGeoJson",{url:e});t=yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);const l={success:!0,message:"",result:{point:[],point2D:[],polyline:[],polyline2D:[],polygon:[],polygon2D:[]}};if(t.result.sceneChangeInfo&&(l.result.sceneChangeInfo=t.result.sceneChangeInfo),t.success){if(null===(o=t.result)||void 0===o?void 0:o.pointEids)for(let e=0;e<t.result.pointEids.length;e++){const o=yield this.Point.Get(t.result.pointEids[e]);o.success&&l.result.point.push(o.result.object)}if(null===(i=t.result)||void 0===i?void 0:i.point2DEids)for(let e=0;e<t.result.point2DEids.length;e++){const o=yield this.Point2D.Get(t.result.point2DEids[e]);o.success&&l.result.point2D.push(o.result.object)}if(null===(n=t.result)||void 0===n?void 0:n.polylineEids)for(let e=0;e<t.result.polylineEids.length;e++){const o=yield this.Polyline.Get(t.result.polylineEids[e]);o.success&&l.result.polyline.push(o.result.object)}if(null===(r=t.result)||void 0===r?void 0:r.polyline2DEids)for(let e=0;e<t.result.polyline2DEids.length;e++){const o=yield this.Polyline2D.Get(t.result.polyline2DEids[e]);o.success&&l.result.polyline2D.push(o.result.object)}if(null===(a=t.result)||void 0===a?void 0:a.polygonEids)for(let e=0;e<t.result.polygonEids.length;e++){const o=yield this.Polygon.Get(t.result.polygonEids[e]);o.success&&l.result.polygon.push(o.result.object)}if(null===(s=t.result)||void 0===s?void 0:s.polygon2DEids)for(let e=0;e<t.result.polygon2DEids.length;e++){const o=yield this.Polygon2D.Get(t.result.polygon2DEids[e]);o.success&&l.result.polygon2D.push(o.result.object)}}else l.success=!1,l.message="Create geometry from geo json error";return l})}CreateGeometryFromShapefile(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){this.GeometryValidate.validateUrl(e);let t=yield this.StartApi(this.apiClassName,"CreateGeometryEntitiesFromShapefile",{url:e});t=yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);const l={success:!0,message:"",result:{point:[],point2D:[],polyline:[],polyline2D:[],polygon:[],polygon2D:[]}};if(t.result.sceneChangeInfo&&(l.result.sceneChangeInfo=t.result.sceneChangeInfo),t.success){if(null===(o=t.result)||void 0===o?void 0:o.pointEids)for(let e=0;e<t.result.pointEids.length;e++){const o=yield this.Point.Get(t.result.pointEids[e]);o.success&&l.result.point.push(o.result.object)}if(null===(i=t.result)||void 0===i?void 0:i.point2DEids)for(let e=0;e<t.result.point2DEids.length;e++){const o=yield this.Point2D.Get(t.result.point2DEids[e]);o.success&&l.result.point2D.push(o.result.object)}if(null===(n=t.result)||void 0===n?void 0:n.polylineEids)for(let e=0;e<t.result.polylineEids.length;e++){const o=yield this.Polyline.Get(t.result.polylineEids[e]);o.success&&l.result.polyline.push(o.result.object)}if(null===(r=t.result)||void 0===r?void 0:r.polyline2DEids)for(let e=0;e<t.result.polyline2DEids.length;e++){const o=yield this.Polyline2D.Get(t.result.polyline2DEids[e]);o.success&&l.result.polyline2D.push(o.result.object)}if(null===(a=t.result)||void 0===a?void 0:a.polygonEids)for(let e=0;e<t.result.polygonEids.length;e++){const o=yield this.Polygon.Get(t.result.polygonEids[e]);o.success&&l.result.polygon.push(o.result.object)}if(null===(s=t.result)||void 0===s?void 0:s.polygon2DEids)for(let e=0;e<t.result.polygon2DEids.length;e++){const o=yield this.Polygon2D.Get(t.result.polygon2DEids[e]);o.success&&l.result.polygon2D.push(o.result.object)}}else l.success=!1,l.message="Create geometry from shape file error";return l})}}class Rn{validateSeedId(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"string"!=typeof e)throw r&&r.func(`seedId ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`seedId ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`)}validateReplaceAssetById(e,t){var o,i,n,r,a,s,l,d;const c=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("string"!=typeof e)throw c&&c.func(`seedId ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`seedId ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if("object"!=typeof t||void 0===t.length)throw c&&c.func(`objects ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`objects ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);if(t.filter(e=>"object"==typeof e).length!==t.length)throw c&&c.func(`objects value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`),new Error(`objects value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`)}}}class xn extends ci{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 Rn})}LoadAssetById(e){return t(this,void 0,void 0,function*(){this.AssetLoaderValidate.validateSeedId(e);let t,o=yield this.StartApi(this.apiClassName,"LoadAssetById",{seedId:e});if(o=yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),o.success){const e=this.obj.RegisterObj.GetByValue(this.obj.RegisterObj.EntityType,o.result.type);if(e){const i=this.obj.RegisterObj.Get(e);if(i){const e=yield i.object.Get(o.result.eid);e.success&&(t=e.result.object)}}}return{success:o.success,message:o.message,result:t}})}ReplaceAssetById(e,o){return t(this,void 0,void 0,function*(){this.AssetLoaderValidate.validateReplaceAssetById(e,o);const t={seedId:e,eids:o.map(e=>e.eid)},i=yield this.StartApi(this.apiClassName,"ReplaceAssetById",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetMeshSizeById(e){return t(this,void 0,void 0,function*(){this.AssetLoaderValidate.validateSeedId(e);const t={seedId:e},o=yield this.StartApi(this.apiClassName,"GetMeshSizeById",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Nn extends $i{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=Ho.get(this.oType),Ti(this.MIParamsAtom,this,["uTiling","vTiling","uPanner","vPanner"],[],[{name:"diffuse_Color",newName:"diffuseColor"},{name:"roughness_Intensity",newName:"roughnessIntensity"}],"materialStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0: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}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&&this.handleAtom(this.MIParamsAtom,e.materialStyle),void 0!==e.seedId&&(this.MIParamsAtom.mid=e.seedId)}generateAtomData(e){const t={},o={},i={},n={},r={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleLockedAtom(n,e),Object.keys(n).length>0&&(t.EntityFlagAtom=n),this.handleEntityOutlinerAtom(r,e),Object.keys(r).length>0&&(t.EntityOutlinerAtom=r),void 0!==e.materialStyle&&(void 0!==e.materialStyle.diffuse_Color&&(e.materialStyle.diffuse_Color=Ii(e.materialStyle.diffuse_Color)),this.handleAtom(i,e.materialStyle)),void 0!==e.seedId&&(i.mid=e.seedId),Object.keys(i).length>0&&(t.MIParamsAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),{materialStyle:this.MIParamsAtom,seedId:this.MIParamsAtom.mid})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L;const V=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw V&&V.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const P=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===P[e])throw V&&V.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 V&&V.func(`materialStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`materialStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.MIParamsAtom;if(Object.keys(e.materialStyle).forEach(e=>{var o,i;if(void 0===t[e])throw V&&V.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.materialStyle)||void 0===a?void 0:a.mid)&&"string"!=typeof e.materialStyle.mid)throw V&&V.func(`materialStyle.mid ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`materialStyle.mid ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(void 0!==(null===(d=e.materialStyle)||void 0===d?void 0:d.uTiling)&&"number"!=typeof e.materialStyle.uTiling)throw V&&V.func(`materialStyle.uTiling ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`),new Error(`materialStyle.uTiling ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`);if(void 0!==(null===(v=e.materialStyle)||void 0===v?void 0:v.vTiling)&&"number"!=typeof e.materialStyle.vTiling)throw V&&V.func(`materialStyle.vTiling ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`),new Error(`materialStyle.vTiling ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`);if(void 0!==(null===(g=e.materialStyle)||void 0===g?void 0:g.uPanner)&&"number"!=typeof e.materialStyle.uPanner)throw V&&V.func(`materialStyle.uPanner ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`),new Error(`materialStyle.uPanner ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`);if(void 0!==(null===(b=e.materialStyle)||void 0===b?void 0:b.vPanner)&&"number"!=typeof e.materialStyle.vPanner)throw V&&V.func(`materialStyle.vPanner ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}`),new Error(`materialStyle.vPanner ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`);if(void 0!==(null===(w=e.materialStyle)||void 0===w?void 0:w.rotationAngle)&&"number"!=typeof e.materialStyle.rotationAngle)throw V&&V.func(`materialStyle.rotationAngle ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`),new Error(`materialStyle.rotationAngle ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}`);if(void 0!==(null===(S=e.materialStyle)||void 0===S?void 0:S.diffuse_Color)&&"string"!=typeof e.materialStyle.diffuse_Color)throw V&&V.func(`materialStyle.diffuse_Color ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().string}`),new Error(`materialStyle.diffuse_Color ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().string}`);if(void 0!==(null===(O=e.materialStyle)||void 0===O?void 0:O.roughness_Intensity)&&("number"!=typeof e.materialStyle.roughness_Intensity||e.materialStyle.roughness_Intensity<0||e.materialStyle.roughness_Intensity>1))throw V&&V.func(`materialStyle.roughness_Intensity ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().number}. ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().range} 0 ~ 1`),new Error(`materialStyle.roughness_Intensity ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().number}. ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().range} 0 ~ 1`);if(void 0!==(null===(D=e.materialStyle)||void 0===D?void 0:D.opacity)&&("number"!=typeof e.materialStyle.opacity||e.materialStyle.opacity<0||e.materialStyle.opacity>1))throw V&&V.func(`materialStyle.opacity ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().number}. ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().range} 0 ~ 1`),new Error(`materialStyle.opacity ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().number}. ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().range} 0 ~ 1`)}}}class Ln{validateApply(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`datas ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`datas ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n,a,s,l,d,c,u;if(void 0===e.obj)throw r&&r.func(`obj ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().required}`),new Error(`obj ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().required}`);if("object"!=typeof e.obj)throw r&&r.func(`obj ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`obj ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if(void 0===e.newMaterialsInfo)throw r&&r.func(`newMaterialsInfo ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`),new Error(`newMaterialsInfo ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`);if("object"!=typeof e.newMaterialsInfo||void 0===e.newMaterialsInfo.length)throw r&&r.func(`newMaterialsInfo ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`),new Error(`newMaterialsInfo ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`);if(e.newMaterialsInfo.filter(e=>"object"==typeof e).length!==e.newMaterialsInfo.length)throw r&&r.func(`The value of newMaterialsInfo ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`),new Error(`The value of newMaterialsInfo ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().object}`)})}}validateSetModelMaterial(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if(void 0===(null==e?void 0:e.TargetMaterials))throw h&&h.func(`opt.TargetMaterials ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().required}`),new Error(`opt.TargetMaterials ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`);if(void 0===(null==e?void 0:e.MaterialEid))throw h&&h.func(`opt.MaterialEid ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`),new Error(`opt.MaterialEid ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().required}`);if("object"!=typeof e.TargetMaterials||void 0===e.TargetMaterials.length)throw h&&h.func(`opt.TargetMaterials ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`opt.TargetMaterials ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if("string"!=typeof e.MaterialEid)throw h&&h.func(`opt.MaterialEid ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`opt.MaterialEid ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`)}}validateGetList(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw s&&s.func(`obj ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`obj ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e)throw s&&s.func(`obj ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`obj ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`)}}validateSetEntitySlotsHighlight(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`entitySlotParams ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`entitySlotParams ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n,a,s,l,d,c,u,v,h,m,g,f,y;if(void 0===e.entity)throw r&&r.func(`entity ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().required}`),new Error(`entity ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().required}`);if("object"!=typeof e.entity)throw r&&r.func(`entity ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`entity ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if(void 0===e.meshName)throw r&&r.func(`meshName ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`),new Error(`meshName ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`);if("string"!=typeof e.meshName)throw r&&r.func(`meshName ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`),new Error(`meshName ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`);if(void 0===e.MaterialIndex)throw r&&r.func(`MaterialIndex ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().required}`),new Error(`MaterialIndex ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().required}`);if("number"!=typeof e.MaterialIndex)throw r&&r.func(`MaterialIndex ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`),new Error(`MaterialIndex ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`);if(void 0===e.bHighlight)throw r&&r.func(`bHighlight ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().required}`),new Error(`bHighlight ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().required}`);if("number"!=typeof e.bHighlight)throw r&&r.func(`bHighlight ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`),new Error(`bHighlight ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().boolean}`)})}}}class Vn extends fi{constructor(e){super(e,Nn),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"MaterialToolAPI"}),Object.defineProperty(this,"MaterialValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Ln}),this.setType("Material")}Apply(e){return t(this,void 0,void 0,function*(){this.MaterialValidate.validateApply(e);const t={eidToNewMaterialInfo:{}};e.forEach(e=>{t.eidToNewMaterialInfo[e.obj.eid]={NewMaterialsInfo:e.newMaterialsInfo}});const o=yield this.StartApi(this.apiClassName,"ApplyMaterialToEntity",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetModelMaterial(e){return t(this,void 0,void 0,function*(){this.MaterialValidate.validateSetModelMaterial(e);const t={eidToNewMaterialInfo:{}};e.TargetMaterials.forEach(o=>{const i={MIEid:e.MaterialEid,MeshName:o.meshName,MaterialIndex:o.materialIndex};if(void 0!==t.eidToNewMaterialInfo[o.eid])t.eidToNewMaterialInfo[o.eid].NewMaterialsInfo.push(i);else{const e={NewMaterialsInfo:[i]};t.eidToNewMaterialInfo[o.eid]=e}});const o=yield this.StartApi(this.apiClassName,"ApplyMaterialToEntity",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetList(e){return t(this,void 0,void 0,function*(){this.MaterialValidate.validateGetList(e);const t=yield this.StartApi(this.apiClassName,"GetEntityMaterialSlots",{eids:e.map(e=>e.eid)});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEntitySlotsHighlight(e){return t(this,void 0,void 0,function*(){this.MaterialValidate.validateSetEntitySlotsHighlight(e);const t=yield this.StartApi(this.apiClassName,"SetEntitySlotsHighlight",{entitySlotParams:e.map(e=>({eid:e.entity.eid,meshName:e.meshName,MaterialIndex:e.MaterialIndex,bHighlight:e.bHighlight}))});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Pn extends Oi{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=Ho.get(this.oType),Ti(this.LocalGeoReferenceAtom,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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){const t={},o={};return void 0!==(null==e?void 0:e.coordType)&&(o.coordType=e.coordType),void 0!==(null==e?void 0:e.sceneCRS)&&(o.sceneCRS=e.sceneCRS),void 0!==(null==e?void 0:e.apiCRS)&&(o.apiCRS=e.apiCRS),void 0!==(null==e?void 0:e.originLocation)&&(o.originLocation=e.originLocation),void 0!==(null==e?void 0:e.originRotation)&&(o.originRotation=e.originRotation),void 0!==(null==e?void 0:e.originScale)&&(o.originScale=e.originScale),Object.keys(o).length>0&&(t.LocalGeoReferenceAtom=o),t}GetValidateRules(){return Object.assign(Object.assign({},this.getEid()),this.LocalGeoReferenceAtom)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M;const A=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw A&&A.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const D=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===D[e])throw A&&A.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.coordType)){if("string"!=typeof e.coordType)throw A&&A.func(`coordType ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`coordType ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(!li.coordTypes.find(t=>t===e.coordType))throw A&&A.func(`coordType.${e.coordType} is illegal. ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.coordTypes.toString()}`),new Error(`coordType.${e.coordType} is illegal. ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.coordTypes.toString()}`)}if(void 0!==(null==e?void 0:e.sceneCRS)&&"string"!=typeof e.sceneCRS)throw A&&A.func(`sceneCRS ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`),new Error(`sceneCRS ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.apiCRS)&&"string"!=typeof e.apiCRS)throw A&&A.func(`apiCRS ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`),new Error(`apiCRS ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.originLocation)){if("object"!=typeof e.originLocation||void 0===e.originLocation.length)throw A&&A.func(`originLocation ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().array}`),new Error(`originLocation ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().array}`);if(3!==e.originLocation.filter(e=>"number"==typeof e).length)throw A&&A.func(`originLocation ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().arrayNumberLength} 3`),new Error(`originLocation ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==e?void 0:e.originRotation)){if("object"!=typeof e.originRotation)throw A&&A.func(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().rotatorErr),new Error(null===(y=li.getInstance())||void 0===y?void 0:y.getErrorTxt().rotatorErr);const t=this.LocalGeoReferenceAtom.originRotation;if(Object.keys(e.originRotation).forEach(e=>{var o,i;if(void 0===t[e])throw A&&A.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(b=e.originRotation)||void 0===b?void 0:b.pitch)&&("number"!=typeof e.originRotation.pitch||e.originRotation.pitch<-180||e.originRotation.pitch>180))throw A&&A.func(null===(p=li.getInstance())||void 0===p?void 0:p.getErrorTxt().rotatorErr2),new Error(null===(E=li.getInstance())||void 0===E?void 0:E.getErrorTxt().rotatorErr2);if(void 0!==(null===(w=e.originRotation)||void 0===w?void 0:w.yaw)&&("number"!=typeof e.originRotation.yaw||e.originRotation.yaw<-180||e.originRotation.yaw>180))throw A&&A.func(null===(I=li.getInstance())||void 0===I?void 0:I.getErrorTxt().rotatorErr2),new Error(null===(j=li.getInstance())||void 0===j?void 0:j.getErrorTxt().rotatorErr2);if(void 0!==(null===(S=e.originRotation)||void 0===S?void 0:S.roll)&&("number"!=typeof e.originRotation.roll||e.originRotation.roll<-180||e.originRotation.roll>180))throw A&&A.func(null===(C=li.getInstance())||void 0===C?void 0:C.getErrorTxt().rotatorErr2),new Error(null===(G=li.getInstance())||void 0===G?void 0:G.getErrorTxt().rotatorErr2)}if(void 0!==(null==e?void 0:e.originScale)){if("object"!=typeof e.originScale||void 0===e.originScale.length)throw A&&A.func(`originScale ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().array}`),new Error(`originScale ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().array}`);if(3!==e.originScale.filter(e=>"number"==typeof e).length)throw A&&A.func(`origioriginScalenLocation ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().arrayNumberLength} 3`),new Error(`originScale ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().arrayNumberLength} 3`)}}}class kn extends fi{constructor(e){super(e,Pn),this.setType("LocalGeoReference")}}class _n extends Oi{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="GeoReference",this.type=Ho.get(this.oType),Ti(this.GeoReferenceAtom,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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&&(li.coordType=e.coordType,this.GeoReferenceAtom.coordType=e.coordType),void 0!==e.sceneCRS&&(li.sceneCRS=e.sceneCRS,this.GeoReferenceAtom.sceneCRS=e.sceneCRS),void 0!==e.apiCRS&&(li.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){const t={},o={};return void 0!==(null==e?void 0:e.settingMode)&&(o.settingMode=e.settingMode),void 0!==(null==e?void 0:e.coordType)&&(o.coordType=e.coordType),void 0!==(null==e?void 0:e.sceneCRS)&&(o.sceneCRS=e.sceneCRS),void 0!==(null==e?void 0:e.apiCRS)&&(o.apiCRS=e.apiCRS),void 0!==(null==e?void 0:e.originLocation)&&(o.originLocation=e.originLocation),void 0!==(null==e?void 0:e.originRotation)&&(o.originRotation=e.originRotation),void 0!==(null==e?void 0:e.originScale)&&(o.originScale=e.originScale),Object.keys(o).length>0&&(t.GeoReferenceAtom=o),t}generateObjectData(e,t=this){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?this.generateObjectData(e[o],t[o]):(t[o]=e[o],"sceneCRS"===o?li.sceneCRS=e[o]:"apiCRS"===o?li.apiCRS=e[o]:"coordType"===o&&(li.coordType=e[o])))})}GetValidateRules(){return Object.assign(Object.assign({},this.getEid()),this.GeoReferenceAtom)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x;const N=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw N&&N.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const L=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===L[e])throw N&&N.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.settingMode)){if("string"!=typeof e.coordType)throw N&&N.func(`settingMode ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`settingMode ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(!li.settingMode.find(t=>t===e.settingMode))throw N&&N.func(`settingMode.${e.settingMode} is illegal. ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.settingMode.toString()}`),new Error(`settingMode.${e.settingMode} is illegal. ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.settingMode.toString()}`)}if(void 0!==(null==e?void 0:e.coordType)){if("string"!=typeof e.coordType)throw N&&N.func(`coordType ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`),new Error(`coordType ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`);if(!li.coordTypes.find(t=>t===e.coordType))throw N&&N.func(`coordType.${e.coordType} is illegal. ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.coordTypes.toString()}`),new Error(`coordType.${e.coordType} is illegal. ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} ${li.coordTypes.toString()}`)}if(void 0!==(null==e?void 0:e.sceneCRS)&&"string"!=typeof e.sceneCRS)throw N&&N.func(`sceneCRS ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`),new Error(`sceneCRS ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.apiCRS)&&"string"!=typeof e.apiCRS)throw N&&N.func(`apiCRS ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`),new Error(`apiCRS ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.originLocation)){if("object"!=typeof e.originLocation||void 0===e.originLocation.length)throw N&&N.func(`originLocation ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`),new Error(`originLocation ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().array}`);if(3!==e.originLocation.filter(e=>"number"==typeof e).length)throw N&&N.func(`originLocation ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 3`),new Error(`originLocation ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==e?void 0:e.originRotation)){if("object"!=typeof e.originRotation)throw N&&N.func(null===(E=li.getInstance())||void 0===E?void 0:E.getErrorTxt().rotatorErr),new Error(null===(w=li.getInstance())||void 0===w?void 0:w.getErrorTxt().rotatorErr);const t=this.GeoReferenceAtom.originRotation;if(Object.keys(e.originRotation).forEach(e=>{var o,i;if(void 0===t[e])throw N&&N.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(I=e.originRotation)||void 0===I?void 0:I.pitch)&&("number"!=typeof e.originRotation.pitch||e.originRotation.pitch<-180||e.originRotation.pitch>180))throw N&&N.func(null===(j=li.getInstance())||void 0===j?void 0:j.getErrorTxt().rotatorErr2),new Error(null===(S=li.getInstance())||void 0===S?void 0:S.getErrorTxt().rotatorErr2);if(void 0!==(null===(C=e.originRotation)||void 0===C?void 0:C.yaw)&&("number"!=typeof e.originRotation.yaw||e.originRotation.yaw<-180||e.originRotation.yaw>180))throw N&&N.func(null===(G=li.getInstance())||void 0===G?void 0:G.getErrorTxt().rotatorErr2),new Error(null===(O=li.getInstance())||void 0===O?void 0:O.getErrorTxt().rotatorErr2);if(void 0!==(null===($=e.originRotation)||void 0===$?void 0:$.roll)&&("number"!=typeof e.originRotation.roll||e.originRotation.roll<-180||e.originRotation.roll>180))throw N&&N.func(null===(T=li.getInstance())||void 0===T?void 0:T.getErrorTxt().rotatorErr2),new Error(null===(M=li.getInstance())||void 0===M?void 0:M.getErrorTxt().rotatorErr2)}if(void 0!==(null==e?void 0:e.originScale)){if("object"!=typeof e.originScale||void 0===e.originScale.length)throw N&&N.func(`originScale ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().array}`),new Error(`originScale ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().array}`);if(3!==e.originScale.filter(e=>"number"==typeof e).length)throw N&&N.func(`origioriginScalenLocation ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().arrayNumberLength} 3`),new Error(`originScale ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().arrayNumberLength} 3`)}}}class Fn extends fi{constructor(e){super(e,_n),this.setType("GeoReference")}}class Un{validateStart(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"object"!=typeof e)throw r&&r.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`)}validateCreate(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateUpdate(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateDelete(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateReset(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateDeleteGather(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateGetList(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateCount(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateGetGatherList(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateSearchByPoint(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateSearchByLine(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}validateSearchByArea(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("string"!=typeof t)throw l&&l.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}}class Bn extends ci{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 Un}),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 t(this,void 0,void 0,function*(){return e>99||e<1?{success:!1,message:"Count limit value range is 1 ~ 99"}:(this.countLimit=e,{success:!0,message:"Count limit set success"})})}Start(e){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateStart(e);const t={algorithm:e.algorithm,filters:{attr:e.filters.attr.map(e=>({queryId:e.queryId,gather:e.gather,condition:e.condition}))}};t.mode=void 0!==e.mode?e.mode:"cloud",void 0!==e.url&&(t.url=e.url);const o=yield this.StartApi(this.apiClassName,"StartCluster",t);o.success&&(this.clusterCacheData=e.filters.attr,this.clusterStatus=!0,void 0!==e.openonclick&&(this.openonclick=e.openonclick));return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}End(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"EndCluster",{}),t=yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);return e.success&&(this.clusterCacheData=[],this.generatedEntity=[],this.evnetCacheData=[],this.clusterStatus=!1,this.openonclick=!1,this.clusterEventStatus="none"),t})}Create(e,o="/v1/aggregation/poi"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateCreate(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"post")})}Update(e,o="/v1/aggregation/poi"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateUpdate(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"put")})}Delete(e,o="/v1/aggregation/poi"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateDelete(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"delete")})}Reset(e,o="/v1/aggregation/poi/reset"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateReset(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"post")})}DeleteGather(e,o="/v1/aggregation/poi/gather"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateDeleteGather(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"delete")})}GetList(e,o="/v1/aggregation/poi/list"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateGetList(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"post")})}Count(e,o="/v1/aggregation/poi/count"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateCount(e,o);const t=e.mode||this.defaultMode;o+=`?mode=${t}&gather=${e.gather}`;return yield this.obj.reqMan.requestAction(o,{},"get")})}GetGatherList(e,o="/v1/aggregation/poi/gather/list"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateGetGatherList(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"post")})}SearchByPoint(e,o="/v1/aggregation/poi/get-circle-region"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateSearchByPoint(e,o),e.mode=e.mode||this.defaultMode;return yield this.obj.reqMan.requestAction(o,e,"post")})}SearchByLine(e,o="/v1/aggregation/poi/get-line-region"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateSearchByLine(e,o),e.mode=e.mode||this.defaultMode,e.filters.selector.coord=e.filters.selector.coord.join(",");return yield this.obj.reqMan.requestAction(o,e,"post")})}SearchByArea(e,o="/v1/aggregation/poi/get-area-region"){return t(this,void 0,void 0,function*(){this.ClusterValidate.validateSearchByArea(e,o),e.mode=e.mode||this.defaultMode,e.filters.selector.coord=e.filters.selector.coord.join(",");return yield this.obj.reqMan.requestAction(o,e,"post")})}}class qn{validateGetCloudDiskFileList(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j;const S=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw S&&S.func(`data ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`data ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const o={category:"",format:[],sort:"",pageNumber:0,pageSize:0};if(Object.keys(e).forEach(e=>{var t,i;if(void 0===o[e])throw S&&S.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.category)&&"string"!=typeof e.category)throw S&&S.func(`category ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`category ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.format)){if("object"!=typeof e.format||void 0===e.format.length)throw S&&S.func(`format ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`),new Error(`format ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`);if(e.format.filter(e=>"string"==typeof e).length!==e.format.length)throw S&&S.func(`The value of format ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`),new Error(`The value of format ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`)}if(void 0!==(null==e?void 0:e.sort)&&"string"!=typeof e.sort)throw S&&S.func(`sort ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`),new Error(`sort ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`);if(void 0===(null==e?void 0:e.pageNumber))throw S&&S.func(`pageNumber ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().required}`),new Error(`pageNumber ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().required}`);if("number"!=typeof e.pageNumber)throw S&&S.func(`pageNumber ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`),new Error(`pageNumber ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`);if(void 0===(null==e?void 0:e.pageSize))throw S&&S.func(`pageSize ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().required}`),new Error(`pageSize ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().required}`);if("number"!=typeof e.pageSize)throw S&&S.func(`pageSize ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`),new Error(`pageSize ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}`);if("string"!=typeof t)throw S&&S.func(`path ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().string}`),new Error(`path ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().string}`)}}}class zn extends ci{constructor(e){super(e),Object.defineProperty(this,"DaaSValidate",{enumerable:!0,configurable:!0,writable:!0,value:new qn})}GetCloudDiskFileList(e,o="/v1/daas/cloud-disk/file/list"){return t(this,void 0,void 0,function*(){this.DaaSValidate.validateGetCloudDiskFileList(e,o);const t=yield this.obj.reqMan.requestAction(o,e,"post",this.obj.headers);return"SUCCESS"===(null==t?void 0:t.status)?{success:!0,message:t.messages,result:t.result}:{success:!1,message:t.messages}})}}class Wn extends ci{constructor(e){super(e),Object.defineProperty(this,"Geometry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"AssetLoader",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"LocalGeoReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"GeoReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Cluster",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"DaaS",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Geometry=new Dn(e),this.AssetLoader=new xn(e),this.Material=new Vn(e),this.LocalGeoReference=new kn(e),this.GeoReference=new Fn(e),this.Cluster=new Bn(e),this.DaaS=new zn(e)}}class Hn{validateClearByTypes(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw d&&d.func(`types ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`types ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e||void 0===e.length)throw d&&d.func(`types ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`types ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw d&&d.func(`types ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`types ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`);e.forEach(e=>{var t,o;if(!Ho.get(e))throw d&&d.func(`types.${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`types.,${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}}}class Zn extends $i{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=Ho.get(this.oType),Ti(this.CirclePolygon2DAtom,this,[],[],[],"circlePolygon2D"),Ti(this.RangeEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"rangeStyle"),Ti(this.Polygon2DAtom,this,[],[],[],"polygon2D"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.color)&&(e.rangeStyle.color="object"==typeof e.rangeStyle.color?Ei(e.rangeStyle.color):Ei(ji(e.rangeStyle.color))),this.handleAtom(this.RangeEntityAtom,e.rangeStyle)),void 0!==e.circlePolygon2D&&this.handleAtom(this.CirclePolygon2DAtom,e.circlePolygon2D),void 0!==e.polygon2D&&this.handleAtom(this.Polygon2DAtom,e.polygon2D)}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={},d={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(o.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(o.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(o.EntityOutlinerAtom=a),void 0!==e.rangeStyle&&((null===(t=e.rangeStyle)||void 0===t?void 0:t.color)&&(e.rangeStyle.color="object"==typeof e.rangeStyle.color?Ei(e.rangeStyle.color):Ei(ji(e.rangeStyle.color))),this.handleAtom(l,e.rangeStyle)),Object.keys(l).length>0&&(o.RangeEntityAtom=l),void 0!==e.circlePolygon2D&&this.handleAtom(d,e.circlePolygon2D),Object.keys(d).length>0&&(o.CirclePolygon2DAtom=d),void 0!==e.polygon2D&&(void 0!==e.polygon2D.coordinates&&(s.coordinates=e.polygon2D.coordinates),void 0!==e.polygon2D.coordZ&&(s.coordZ=e.polygon2D.coordZ)),Object.keys(s).length>0&&(o.Polygon2DAtom=s),o}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{rangeStyle:this.RangeEntityAtom,circlePolygon2D:this.CirclePolygon2DAtom,polygon2D:this.Polygon2DAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y;const Q=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw Q&&Q.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const J=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===J[e])throw Q&&Q.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.rangeStyle){if("object"!=typeof e.rangeStyle)throw Q&&Q.func(`rangeStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`rangeStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.RangeEntityAtom;if(Object.keys(e.rangeStyle).forEach(e=>{var o,i;if(void 0===t[e])throw Q&&Q.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.rangeStyle)||void 0===a?void 0:a.shape)){if("string"!=typeof e.rangeStyle.shape)throw Q&&Q.func(`rangeStyle.shape ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`rangeStyle.shape ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(!li.shapeType.find(t=>{var o;return t===(null===(o=e.rangeStyle)||void 0===o?void 0:o.shape)}))throw Q&&Q.func(`rangeStyle.shape ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} ${li.shapeType.toString()}`),new Error(`rangeStyle.shape ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.shapeType.toString()}`)}if(void 0!==(null===(u=e.rangeStyle)||void 0===u?void 0:u.type)){if("string"!=typeof e.rangeStyle.type)throw Q&&Q.func(`rangeStyle.type ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`),new Error(`rangeStyle.type ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`);if(!li.rangeType.find(t=>{var o;return t===(null===(o=e.rangeStyle)||void 0===o?void 0:o.type)}))throw Q&&Q.func(`rangeStyle.type ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} ${li.rangeType.toString()}`),new Error(`rangeStyle.type ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} ${li.rangeType.toString()}`)}if(void 0!==(null===(f=e.rangeStyle)||void 0===f?void 0:f.fillAreaType)){if("string"!=typeof e.rangeStyle.fillAreaType)throw Q&&Q.func(`rangeStyle.fillAreaType ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().string}`),new Error(`rangeStyle.fillAreaType ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().string}`);if(!li.rangeFillAreaType.find(t=>{var o;return t===(null===(o=e.rangeStyle)||void 0===o?void 0:o.fillAreaType)}))throw Q&&Q.func(`rangeStyle.fillAreaType ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} ${li.rangeFillAreaType.toString()}`),new Error(`rangeStyle.fillAreaType ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().range} ${li.rangeFillAreaType.toString()}`)}if(void 0!==(null===(w=e.rangeStyle)||void 0===w?void 0:w.height)&&("number"!=typeof e.rangeStyle.height||e.rangeStyle.height<0))throw Q&&Q.func(`rangeStyle.height ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().positiveNumber}`),new Error(`rangeStyle.height ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().positiveNumber}`);if(void 0!==(null===(S=e.rangeStyle)||void 0===S?void 0:S.strokeWeight)&&("number"!=typeof e.rangeStyle.strokeWeight||e.rangeStyle.strokeWeight<0))throw Q&&Q.func(`rangeStyle.strokeWeight ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().positiveNumber}`),new Error(`rangeStyle.strokeWeight ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().positiveNumber}`);if(void 0!==(null===(O=e.rangeStyle)||void 0===O?void 0:O.color)&&"string"!=typeof e.rangeStyle.color)throw Q&&Q.func(`rangeStyle.color ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().hexa}`),new Error(`rangeStyle.color ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().hexa}`)}if(e.circlePolygon2D){if("object"!=typeof e.circlePolygon2D)throw Q&&Q.func(`circlePolygon2D ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().object}`),new Error(`circlePolygon2D ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().object}`);const t=this.CirclePolygon2DAtom;if(Object.keys(e.circlePolygon2D).forEach(e=>{var o,i;if(void 0===t[e])throw Q&&Q.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(D=e.circlePolygon2D)||void 0===D?void 0:D.center)){if("object"!=typeof e.circlePolygon2D.center||void 0===e.circlePolygon2D.center.length)throw Q&&Q.func(`circlePolygon2D.center ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().array}`),new Error(`circlePolygon2D.center ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().array}`);if(3!==e.circlePolygon2D.center.filter(e=>"number"==typeof e).length)throw Q&&Q.func(`circlePolygon2D.center ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().arrayNumberLength} 3`),new Error(`circlePolygon2D.center ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null===(V=e.circlePolygon2D)||void 0===V?void 0:V.radius)&&("number"!=typeof e.circlePolygon2D.radius||e.circlePolygon2D.radius<0))throw Q&&Q.func(`circlePolygon2D ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().positiveNumber}`),new Error(`circlePolygon2D ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().positiveNumber}`)}if(e.polygon2D){if("object"!=typeof e.polygon2D)throw Q&&Q.func(`polygon2D ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().object}`),new Error(`polygon2D ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().object}`);if(void 0===(null===(U=e.polygon2D)||void 0===U?void 0:U.coordinates))throw Q&&Q.func(`polygon2D.coordinates ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().required}`),new Error(`polygon2D.coordinates ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().required}`);if("object"!=typeof e.polygon2D.coordinates||void 0===e.polygon2D.coordinates.length)throw Q&&Q.func(`polygon2D.coordinates ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().array}`),new Error(`polygon2D.coordinates ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().array}`);if(e.polygon2D.coordinates.forEach(e=>{var t,o;if("object"!=typeof e||void 0===e.length)throw Q&&Q.func(`the value of polygon2D.coordinates ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polygon2D.coordinates ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw Q&&Q.func(`the value of polygon2D.coordinates's value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polygon2D.coordinates's value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw Q&&Q.func(`the value of polygon2D.coordinates's value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of polygon2D.coordinates's value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})}),void 0!==(null===(H=e.polygon2D)||void 0===H?void 0:H.coordZ)&&"number"!=typeof e.polygon2D.coordZ)throw Q&&Q.func(`polygon2D.coordZ ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().number}`),new Error(`polygon2D.coordZ ${null===(Y=li.getInstance())||void 0===Y?void 0:Y.GetCommonErr().number}`)}}}class Yn extends fi{constructor(e){super(e,Zn),this.setType("Range")}}class Qn extends $i{constructor(){super(...arguments),Object.defineProperty(this,"activeBaseAttributes",{enumerable:!0,configurable:!0,writable:!0,value:["eid","oType","entityName","customId","customData","parentEid","index","location","rotator","scale3d","pivotOffset","bVisible","bLocked"]}),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]}})}get location(){return this.TransformAtom.location}set location(e){this.handleLocationAction(e).then(t=>{t.success&&(this.TransformAtom.location=e)})}get rotator(){return this.TransformAtom.rotator}set rotator(e){this.handleRotatorAction(e).then(t=>{t.success&&(this.TransformAtom.rotator=e)})}get scale3d(){return this.TransformAtom.scale3d}set scale3d(e){this.handleScale3dAction(e).then(t=>{t.success&&(this.TransformAtom.scale3d=e)})}get pivotOffset(){return this.TransformAtom.pivotOffset}set pivotOffset(e){this.handlePivotOffsetAction(e).then(t=>{t.success&&(this.TransformAtom.pivotOffset=e)})}GetLocation(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.location}})}SetLocation(e){var o;return t(this,void 0,void 0,function*(){(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&this.validateLocation(e);const t=yield this.handleLocationAction(e);return t.success&&(this.TransformAtom.location=e),t})}GetRotator(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.rotator}})}SetRotator(e){var o;return t(this,void 0,void 0,function*(){(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&this.validateRotator(e);const t=yield this.handleRotatorAction(e);return t.success&&(this.TransformAtom.rotator=e),t})}GetScale3d(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.scale3d}})}SetScale3d(e){var o;return t(this,void 0,void 0,function*(){(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&this.validateScale3d(e);const t=yield this.handleScale3dAction(e);return t.success&&(this.TransformAtom.scale3d=e),t})}GetPivotOffset(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.pivotOffset}})}SetPivotOffset(e){var o;return t(this,void 0,void 0,function*(){(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&this.validatePivotOffset(e);const t=yield this.handlePivotOffsetAction(e);return t.success&&(this.TransformAtom.pivotOffset=e),t})}GetTransformScheme(){return{TransformAtom:this.TransformAtom}}GetBaseScheme(){return Object.assign(Object.assign(Object.assign({},this.GetBasicScheme()),this.GetTransformScheme()),this.GetVisibleScheme())}GetAllScheme(){const e=this.atomObj.GetScheme?this.atomObj.GetScheme():{};return Object.assign(Object.assign({},e),this.GetBaseScheme())}handleLocationAction(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield new di(this.obj).UpdateEntities(this.eid,{TransformAtom:{location:e}})})}handleRotatorAction(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield new di(this.obj).UpdateEntities(this.eid,{TransformAtom:{rotator:e}})})}handleScale3dAction(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield new di(this.obj).UpdateEntities(this.eid,{TransformAtom:{scale3d:e}})})}handlePivotOffsetAction(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield new di(this.obj).UpdateEntities(this.eid,{TransformAtom:{pivotOffset:e}})})}setTransformData(e){Gi(this.TransformAtom,e)}getTransformData(){return{location:this.location,rotator:this.rotator,scale3d:this.scale3d,pivotOffset:this.pivotOffset}}handleTransformAtom(e,t){Gi(e,t)}validateLocation(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw a&&a.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().locationErr),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().locationErr);if(3!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().locationErr2),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr2)}validateRotator(e){var t,o,i,n,r,a,s,l,d;const c=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw c&&c.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().rotatorErr),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().rotatorErr);const u=this.rotator;if(Object.keys(e).forEach(e=>{var t,o;if(void 0===u[e])throw c&&c.func(`rotator.${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`rotator.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.pitch)&&"number"!=typeof e.pitch)throw c&&c.func(`rotator.pitch ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`),new Error(`rotator.pitch ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number}`);if(void 0!==(null==e?void 0:e.yaw)&&"number"!=typeof e.yaw)throw c&&c.func(`rotator.yaw ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}`),new Error(`rotator.yaw ${null===(s=li.getInstance())||void 0===s?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=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`),new Error(`rotator.roll ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`)}validateScale3d(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw a&&a.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().scale3dErr2),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().scale3dErr2);if(3!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().scale3dErr2),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().scale3dErr2)}validatePivotOffset(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw a&&a.func(`pivotOffset ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`),new Error(`pivotOffset ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(`pivotOffset ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`),new Error(`pivotOffset ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayNumberLength} 3`)}generateLocationAtom(e){return{TransformAtom:{location:e}}}generateRotatorAtom(e){return{TransformAtom:{rotator:e}}}generateScale3dAtom(e){return{TransformAtom:{scale3d:e}}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData())}}class Jn extends Qn{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,labelContentJustification:"Left",labelContentAutoWrap:!1,scrollPolicy:"default"}}),Object.defineProperty(this,"TransformAtom2D",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0]}}),Object.defineProperty(this,"Visible2DAtom",{enumerable:!0,configurable:!0,writable:!0,value:{camera:{hideDistance:1e6,hideType:"none",scaleMode:"2D",url:"",size:[100,100]},interaction:{clickTop:!0,hoverTop:!0},entity:{overlapOrder:1}}}),this.setObjAtom(this),this.oType="Poi",this.type=Ho.get(this.oType),Ti(this.PoiEntityAtom,this,[],[],[],"poiStyle"),Ti(this.TransformAtom2D,this,[],[],[]),this.activeBaseAttributes.push("camera","interaction","entity"),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"rotator"!==e&&"scale3d"!==e),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),e&&this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get overlapOrder(){return this.Visible2DAtom.entity.overlapOrder}set overlapOrder(e){this.handleVisible2DAction({entity:{overlapOrder:e}}).then(t=>{t.success&&(this.Visible2DAtom.entity.overlapOrder=e)})}get hideDistance(){return this.Visible2DAtom.camera.hideDistance}set hideDistance(e){this.handleVisible2DAction({camera:{hideDistance:e}}).then(t=>{t.success&&(this.Visible2DAtom.camera.hideDistance=e)})}get hideType(){return this.Visible2DAtom.camera.hideType}set hideType(e){this.handleVisible2DAction({camera:{hideType:e}}).then(t=>{t.success&&(this.Visible2DAtom.camera.hideType=e)})}get scaleMode(){return this.Visible2DAtom.camera.scaleMode}set scaleMode(e){this.handleVisible2DAction({camera:{scaleMode:e}}).then(t=>{t.success&&(this.Visible2DAtom.camera.scaleMode=e)})}get url(){return this.Visible2DAtom.camera.url}set url(e){this.handleVisible2DAction({camera:{url:e}}).then(t=>{t.success&&(this.Visible2DAtom.camera.url=e)})}get size(){return this.Visible2DAtom.camera.size}set size(e){this.handleVisible2DAction({camera:{size:e}}).then(t=>{t.success&&(this.Visible2DAtom.camera.size=e)})}get clickTop(){return this.Visible2DAtom.interaction.clickTop}set clickTop(e){this.handleVisible2DAction({interaction:{clickTop:e}}).then(t=>{t.success&&(this.Visible2DAtom.interaction.clickTop=e)})}get hoverTop(){return this.Visible2DAtom.interaction.hoverTop}set hoverTop(e){this.handleVisible2DAction({interaction:{hoverTop:e}}).then(t=>{t.success&&(this.Visible2DAtom.interaction.hoverTop=e)})}GetOverlapOrder(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.entity.overlapOrder}})}SetOverlapOrder(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({entity:{overlapOrder:e}});return t.success&&(this.Visible2DAtom.entity.overlapOrder=e),t})}GetHideDistance(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.hideDistance}})}SetHideDistance(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{hideDistance:e}});return t.success&&(this.Visible2DAtom.camera.hideDistance=e),t})}GetHideType(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.hideType}})}SetHideType(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{hideType:e}});return t.success&&(this.Visible2DAtom.camera.hideType=e),t})}GetScaleMode(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.scaleMode}})}SetScaleMode(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{scaleMode:e}});return t.success&&(this.Visible2DAtom.camera.scaleMode=e),t})}GetUrl(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.url}})}SetUrl(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{url:e}});return t.success&&(this.Visible2DAtom.camera.url=e),t})}GetSize(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.url}})}SetSize(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{size:e}});return t.success&&(this.Visible2DAtom.camera.size=e),t})}GetClickTop(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.interaction.clickTop}})}SetClickTop(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({interaction:{clickTop:e}});return t.success&&(this.Visible2DAtom.interaction.clickTop=e),t})}GetHoverTop(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.interaction.hoverTop}})}SetHoverTop(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({interaction:{hoverTop:e}});return t.success&&(this.Visible2DAtom.interaction.hoverTop=e),t})}GetVisible2DScheme(){return{Visible2DAtom:this.Visible2DAtom}}GetScheme(){return{PoiEntityAtom:this.PoiEntityAtom}}getTransform2DEntityData(){return{location:this.location}}setTransform2DEntityData(e){this.handleTransformAtom(this.TransformAtom2D,e)}SetVisible2D(e){var o,i,n,r,a,s,l,d;return t(this,void 0,void 0,function*(){const t={};void 0!==(null==e?void 0:e.camera)&&(t.camera=this.Visible2DAtom.camera,void 0!==(null===(o=e.camera)||void 0===o?void 0:o.hideDistance)&&(t.camera.hideDistance=e.camera.hideDistance),void 0!==(null===(i=e.camera)||void 0===i?void 0:i.hideType)&&(t.camera.hideType=e.camera.hideType),void 0!==(null===(n=e.camera)||void 0===n?void 0:n.scaleMode)&&(t.camera.scaleMode=e.camera.scaleMode),void 0!==(null===(r=e.camera)||void 0===r?void 0:r.url)&&(t.camera.url=e.camera.url),void 0!==(null===(a=e.camera)||void 0===a?void 0:a.size)&&(t.camera.size=e.camera.size)),void 0!==(null==e?void 0:e.interaction)&&(t.interaction=this.Visible2DAtom.interaction,void 0!==(null===(s=e.interaction)||void 0===s?void 0:s.clickTop)&&(t.interaction.clickTop=e.interaction.clickTop),void 0!==(null===(l=e.interaction)||void 0===l?void 0:l.hoverTop)&&(t.interaction.hoverTop=e.interaction.hoverTop)),void 0!==(null==e?void 0:e.entity)&&(t.entity=this.Visible2DAtom.entity,void 0!==(null===(d=e.entity)||void 0===d?void 0:d.overlapOrder)&&(t.entity.overlapOrder=e.entity.overlapOrder));const c=yield this.handleVisible2DAction(e);return c.success&&this.SetVisible2DData(e),c})}handleVisible2DAction(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield this.obj.RequestEntity(this.obj).UpdateEntitiesByEids([{eid:this.eid,entities:{Visible2DAtom:e}}])})}GetVisible2DData(){return{camera:{hideDistance:this.Visible2DAtom.camera.hideDistance,hideType:this.Visible2DAtom.camera.hideType,scaleMode:this.Visible2DAtom.camera.scaleMode,url:this.Visible2DAtom.camera.url,size:this.Visible2DAtom.camera.size},interaction:{clickTop:this.Visible2DAtom.interaction.clickTop,hoverTop:this.Visible2DAtom.interaction.hoverTop},entity:{overlapOrder:this.Visible2DAtom.entity.overlapOrder}}}SetVisible2DData(e){var t,o,i,n,r,a,s,l;void 0!==(null==e?void 0:e.camera)&&(void 0!==(null===(t=e.camera)||void 0===t?void 0:t.hideDistance)&&(this.Visible2DAtom.camera.hideDistance=e.camera.hideDistance),void 0!==(null===(o=e.camera)||void 0===o?void 0:o.hideType)&&(this.Visible2DAtom.camera.hideType=e.camera.hideType),void 0!==(null===(i=e.camera)||void 0===i?void 0:i.scaleMode)&&(this.Visible2DAtom.camera.scaleMode=e.camera.scaleMode),void 0!==(null===(n=e.camera)||void 0===n?void 0:n.url)&&(this.Visible2DAtom.camera.url=e.camera.url),void 0!==(null===(r=e.camera)||void 0===r?void 0:r.size)&&(this.Visible2DAtom.camera.size=e.camera.size)),void 0!==(null==e?void 0:e.interaction)&&(void 0!==(null===(a=e.interaction)||void 0===a?void 0:a.clickTop)&&(this.Visible2DAtom.interaction.clickTop=e.interaction.clickTop),void 0!==(null===(s=e.interaction)||void 0===s?void 0:s.hoverTop)&&(this.Visible2DAtom.interaction.hoverTop=e.interaction.hoverTop)),void 0!==(null==e?void 0:e.entity)&&null!=(null===(l=e.entity)||void 0===l?void 0:l.overlapOrder)&&(this.Visible2DAtom.entity.overlapOrder=e.entity.overlapOrder)}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&&this.handleAtom(this.PoiEntityAtom,e.poiStyle)}generateAtomData(e){var t,o,i,n,r,a,s,l,d,c,u;const v={},h={},m={},g={},f={},y={},b={},p={};return this.handleBasicAtom(h,e),Object.keys(h).length>0&&(v.BasicInfoAtom=h),this.handleTransformAtom(m,e),Object.keys(m).length>0&&(v.TransformAtom2D=m),this.handleVisibleAtom(g,e),Object.keys(g).length>0&&(v.VisibleAtom=g),this.handleLockedAtom(f,e),Object.keys(f).length>0&&(v.EntityFlagAtom=f),this.handleEntityOutlinerAtom(y,e),Object.keys(y).length>0&&(v.EntityOutlinerAtom=y),void 0!==(null==e?void 0:e.visible2D)&&(void 0!==(null===(t=e.visible2D)||void 0===t?void 0:t.camera)&&(b.camera=this.Visible2DAtom.camera,void 0!==(null===(o=e.visible2D.camera)||void 0===o?void 0:o.hideDistance)&&(b.camera.hideDistance=e.visible2D.camera.hideDistance),void 0!==(null===(i=e.visible2D.camera)||void 0===i?void 0:i.hideType)&&(b.camera.hideType=e.visible2D.camera.hideType),void 0!==(null===(n=e.visible2D.camera)||void 0===n?void 0:n.scaleMode)&&(b.camera.scaleMode=e.visible2D.camera.scaleMode),void 0!==(null===(r=e.visible2D.camera)||void 0===r?void 0:r.url)&&(b.camera.url=e.visible2D.camera.url),void 0!==(null===(a=e.visible2D.camera)||void 0===a?void 0:a.size)&&(b.camera.size=e.visible2D.camera.size)),void 0!==(null===(s=e.visible2D)||void 0===s?void 0:s.interaction)&&(b.interaction=this.Visible2DAtom.interaction,void 0!==(null===(l=e.visible2D.interaction)||void 0===l?void 0:l.clickTop)&&(b.interaction.clickTop=e.visible2D.interaction.clickTop),void 0!==(null===(d=e.visible2D.interaction)||void 0===d?void 0:d.hoverTop)&&(b.interaction.hoverTop=e.visible2D.interaction.hoverTop)),void 0!==(null===(c=e.visible2D)||void 0===c?void 0:c.entity)&&(b.entity=this.Visible2DAtom.entity,void 0!==(null===(u=e.visible2D.entity)||void 0===u?void 0:u.overlapOrder)&&(b.entity.overlapOrder=e.visible2D.entity.overlapOrder))),Object.keys(b).length>0&&(v.Visible2DAtom=b),void 0!==e.poiStyle&&this.handleAtom(p,e.poiStyle),Object.keys(p).length>0&&(v.PoiEntityAtom=p),v}GetValidateRules(){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})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te,oe,ie,ne,re,ae,se,le,de,ce,ue,ve,he;const me=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw me&&me.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const ge=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===ge[e])throw me&&me.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 me&&me.func(`poiStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().objecr}`),new Error(`poiStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().objecr}`);const t=this.PoiEntityAtom;if(Object.keys(e.poiStyle).forEach(e=>{var o,i;if(void 0===t[e])throw me&&me.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.poiStyle)||void 0===a?void 0:a.markerVisible)&&"boolean"!=typeof e.poiStyle.markerVisible)throw me&&me.func(`poiStyle.markerVisible ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`),new Error(`poiStyle.markerVisible ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`);if(void 0!==(null===(d=e.poiStyle)||void 0===d?void 0:d.markerNormalUrl)&&"string"!=typeof e.poiStyle.markerNormalUrl)throw me&&me.func(`poiStyle.markerNormalUrl ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`),new Error(`poiStyle.markerNormalUrl ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`);if(void 0!==(null===(v=e.poiStyle)||void 0===v?void 0:v.markerActivateUrl)&&"string"!=typeof e.poiStyle.markerActivateUrl)throw me&&me.func(`poiStyle.markerActivateUrl ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`poiStyle.markerActivateUrl ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`);if(void 0!==(null===(g=e.poiStyle)||void 0===g?void 0:g.markerSize)){if("object"!=typeof e.poiStyle.markerSize||void 0===e.poiStyle.markerSize.length)throw me&&me.func(`poiStyle.markerSize ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`),new Error(`poiStyle.markerSize ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().array}`);if(2!==e.poiStyle.markerSize.filter(e=>"number"==typeof e&&e>=0).length)throw me&&me.func(`poiStyle.markerSize ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`poiStyle.markerSize ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null===(E=e.poiStyle)||void 0===E?void 0:E.labelVisible)&&"boolean"!=typeof e.poiStyle.labelVisible)throw me&&me.func(`poiStyle.labelVisible ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().boolean}`),new Error(`poiStyle.labelVisible ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().boolean}`);if(void 0!==(null===(j=e.poiStyle)||void 0===j?void 0:j.labelBgImageUrl)&&"string"!=typeof e.poiStyle.labelBgImageUrl)throw me&&me.func(`poiStyle.labelBgImageUrl ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().string}`),new Error(`poiStyle.labelBgImageUrl ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().string}`);if(void 0!==(null===(G=e.poiStyle)||void 0===G?void 0:G.labelBgSize)){if("object"!=typeof e.poiStyle.labelBgSize||void 0===e.poiStyle.labelBgSize.length)throw me&&me.func(`poiStyle.labelBgSize ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().array}`),new Error(`poiStyle.labelBgSize ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().array}`);if(2!==e.poiStyle.labelBgSize.filter(e=>"number"==typeof e&&e>=0).length)throw me&&me.func(`poiStyle.labelBgSize ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`poiStyle.labelBgSize ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null===(A=e.poiStyle)||void 0===A?void 0:A.labelBgOffset)){if("object"!=typeof e.poiStyle.labelBgOffset||void 0===e.poiStyle.labelBgOffset.length)throw me&&me.func(`poiStyle.labelBgOffset ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().array}`),new Error(`poiStyle.labelBgOffset ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().array}`);if(2!==e.poiStyle.labelBgOffset.filter(e=>"number"==typeof e).length)throw me&&me.func(`poiStyle.labelBgOffset ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().arrayNumberLength} 2`),new Error(`poiStyle.labelBgOffset ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(L=e.poiStyle)||void 0===L?void 0:L.labelContent)){if("object"!=typeof e.poiStyle.labelContent||void 0===e.poiStyle.labelContent.length)throw me&&me.func(`poiStyle.labelContent ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().array}`),new Error(`poiStyle.labelContent ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().array}`);if(3!==e.poiStyle.labelContent.filter(e=>"string"==typeof e).length)throw me&&me.func(`poiStyle.labelContent ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().arrayStringLength} 3`),new Error(`poiStyle.labelContent ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().arrayStringLength} 3`)}if(void 0!==(null===(F=e.poiStyle)||void 0===F?void 0:F.labelContentOffset)){if("object"!=typeof e.poiStyle.labelContentOffset||void 0===e.poiStyle.labelContentOffset.length)throw me&&me.func(`poiStyle.labelContentOffset ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().array}`),new Error(`poiStyle.labelContentOffset ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().array}`);if(2!==e.poiStyle.labelContentOffset.filter(e=>"number"==typeof e).length)throw me&&me.func(`poiStyle.labelContentOffset ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().arrayNumberLength} 2`),new Error(`poiStyle.labelContentOffset ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(W=e.poiStyle)||void 0===W?void 0:W.labelTop)&&"boolean"!=typeof e.poiStyle.labelTop)throw me&&me.func(`poiStyle.labelTop ${null===(H=li.getInstance())||void 0===H?void 0:H.GetCommonErr().boolean}`),new Error(`poiStyle.labelTop ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().boolean}`);if(void 0!==(null===(Y=e.poiStyle)||void 0===Y?void 0:Y.scrollSpeed)&&"number"!=typeof e.poiStyle.scrollSpeed)throw me&&me.func(`poiStyle.scrollSpeed ${null===(Q=li.getInstance())||void 0===Q?void 0:Q.GetCommonErr().number}`),new Error(`poiStyle.scrollSpeed ${null===(J=li.getInstance())||void 0===J?void 0:J.GetCommonErr().number}`);if(void 0!==(null===(X=e.poiStyle)||void 0===X?void 0:X.textBoxWidth)&&"number"!=typeof e.poiStyle.textBoxWidth)throw me&&me.func(`poiStyle.textBoxWidth ${null===(K=li.getInstance())||void 0===K?void 0:K.GetCommonErr().number}`),new Error(`poiStyle.textBoxWidth ${null===(ee=li.getInstance())||void 0===ee?void 0:ee.GetCommonErr().number}`);if(void 0!==(null===(te=e.poiStyle)||void 0===te?void 0:te.labelContentJustification)){if("string"!=typeof e.poiStyle.labelContentJustification)throw me&&me.func(`poiStyle.labelContentJustification ${null===(oe=li.getInstance())||void 0===oe?void 0:oe.GetCommonErr().string}`),new Error(`poiStyle.labelContentJustification ${null===(ie=li.getInstance())||void 0===ie?void 0:ie.GetCommonErr().string}`);if(!li.labelContentJustificationType.find(t=>{var o;return t===(null===(o=e.poiStyle)||void 0===o?void 0:o.labelContentJustification)}))throw me&&me.func(`poiStyle.labelContentJustification ${null===(ne=li.getInstance())||void 0===ne?void 0:ne.GetCommonErr().range} ${li.labelContentJustificationType.toString()}`),new Error(`poiStyle.labelContentJustification ${null===(re=li.getInstance())||void 0===re?void 0:re.GetCommonErr().range} ${li.labelContentJustificationType.toString()}`)}if(void 0!==(null===(ae=e.poiStyle)||void 0===ae?void 0:ae.labelContentAutoWrap)&&"boolean"!=typeof e.poiStyle.labelContentAutoWrap)throw me&&me.func(`poiStyle.labelContentAutoWrap ${null===(se=li.getInstance())||void 0===se?void 0:se.GetCommonErr().boolean}`),new Error(`poiStyle.labelContentAutoWrap ${null===(le=li.getInstance())||void 0===le?void 0:le.GetCommonErr().boolean}`);if(void 0!==(null===(de=e.poiStyle)||void 0===de?void 0:de.scrollPolicy)){if("string"!=typeof e.poiStyle.scrollPolicy)throw me&&me.func(`poiStyle.scrollPolicy ${null===(ce=li.getInstance())||void 0===ce?void 0:ce.GetCommonErr().string}`),new Error(`poiStyle.scrollPolicy ${null===(ue=li.getInstance())||void 0===ue?void 0:ue.GetCommonErr().string}`);if(!li.scrollPolicyType.find(t=>{var o;return t===(null===(o=e.poiStyle)||void 0===o?void 0:o.scrollPolicy)}))throw me&&me.func(`poiStyle.scrollPolicy ${null===(ve=li.getInstance())||void 0===ve?void 0:ve.GetCommonErr().range} ${li.scrollPolicyType.toString()}`),new Error(`poiStyle.scrollPolicy ${null===(he=li.getInstance())||void 0===he?void 0:he.GetCommonErr().range} ${li.scrollPolicyType.toString()}`)}}e.visible2D&&this.validateVisible2D(e.visible2D)}validateVisible2D(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x;const N=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null==e?void 0:e.camera){if("object"!=typeof e.camera)throw N&&N.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().cameraErr),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().cameraErr);if(null===(n=e.camera)||void 0===n?void 0:n.hideDistance){if("number"!=typeof e.camera.hideDistance)throw N&&N.func(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().hideDistanceErr),new Error(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().hideDistanceErr);if(e.camera.hideDistance<0)throw N&&N.func(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().hideDistanceErr2),new Error(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().hideDistanceErr2)}if(null===(d=e.camera)||void 0===d?void 0:d.hideType){if("string"!=typeof e.camera.hideType)throw N&&N.func(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().hideTypeErr),new Error(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().hideTypeErr);if("none"!==e.camera.hideType&&"default"!==e.camera.hideType)throw N&&N.func(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().hideTypeErr2),new Error(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().hideTypeErr2)}if(null===(m=e.camera)||void 0===m?void 0:m.scaleMode){if("string"!=typeof e.camera.scaleMode)throw N&&N.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().scaleModeErr),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().scaleModeErr);if("2D"!==e.camera.scaleMode&&"3D"!==e.camera.scaleMode)throw N&&N.func(null===(y=li.getInstance())||void 0===y?void 0:y.getErrorTxt().scaleModeErr2),new Error(null===(b=li.getInstance())||void 0===b?void 0:b.getErrorTxt().scaleModeErr2)}if((null===(p=e.camera)||void 0===p?void 0:p.url)&&"string"!=typeof e.camera.url)throw N&&N.func(`camera.url ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`),new Error(`camera.url ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().string}`);if(null===(I=e.camera)||void 0===I?void 0:I.size){if("object"!=typeof e.camera.size||void 0===e.camera.size.length)throw N&&N.func(`camera.size ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().array}`),new Error(`camera.size ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().array}`);if(2!==e.camera.size.filter(e=>"number"==typeof e).length)throw N&&N.func(`The value of camera.size ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of camera.size ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().arrayNumberLength} 2`)}}if(null==e?void 0:e.interaction){if("object"!=typeof e.interaction)throw N&&N.func(null===(O=li.getInstance())||void 0===O?void 0:O.getErrorTxt().interactionErr),new Error(null===($=li.getInstance())||void 0===$?void 0:$.getErrorTxt().interactionErr);if(void 0!==(null===(T=e.interaction)||void 0===T?void 0:T.clickTop)&&"boolean"!=typeof e.interaction.clickTop)throw N&&N.func(null===(M=li.getInstance())||void 0===M?void 0:M.getErrorTxt().clickTopErr),new Error(null===(A=li.getInstance())||void 0===A?void 0:A.getErrorTxt().clickTopErr);if(void 0!==(null===(D=e.interaction)||void 0===D?void 0:D.hoverTop)&&"boolean"!=typeof e.interaction.hoverTop)throw N&&N.func(null===(R=li.getInstance())||void 0===R?void 0:R.getErrorTxt().hoverTopErr),new Error(null===(x=li.getInstance())||void 0===x?void 0:x.getErrorTxt().hoverTopErr)}}}class Xn extends fi{constructor(e){super(e,Jn),this.setType("Poi")}}class Kn extends $i{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,speedupFactor:1,opacity:1,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=Ho.get(this.oType),Ti(this.PathEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"pathStyle"),Ti(this.PolylineAtom,this,["bClosed"],[],[],"polyline"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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,o;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.pathStyle&&((null===(t=e.pathStyle)||void 0===t?void 0:t.color)&&(e.pathStyle.color="object"==typeof e.pathStyle.color?Ei(e.pathStyle.color):Ei(ji(e.pathStyle.color))),(null===(o=e.pathStyle)||void 0===o?void 0:o.passColor)&&(e.pathStyle.passColor="object"==typeof e.pathStyle.passColor?Ei(e.pathStyle.passColor):Ei(ji(e.pathStyle.passColor))),this.handleAtom(this.PathEntityAtom,e.pathStyle)),void 0!==e.polyline&&this.handleAtom(this.PolylineAtom,e.polyline)}generateAtomData(e){var t,o,i,n;const r={},a={},s={},l={},d={},c={},u={};return this.handleBasicAtom(a,e),Object.keys(a).length>0&&(r.BasicInfoAtom=a),this.handleVisibleAtom(s,e),Object.keys(s).length>0&&(r.VisibleAtom=s),this.handleLockedAtom(l,e),Object.keys(l).length>0&&(r.EntityFlagAtom=l),this.handleEntityOutlinerAtom(d,e),Object.keys(d).length>0&&(r.EntityOutlinerAtom=d),void 0!==e.pathStyle&&((null===(t=e.pathStyle)||void 0===t?void 0:t.color)&&(e.pathStyle.color="object"==typeof e.pathStyle.color?Ei(e.pathStyle.color):Ei(ji(e.pathStyle.color))),(null===(o=e.pathStyle)||void 0===o?void 0:o.passColor)&&(e.pathStyle.passColor="object"==typeof e.pathStyle.passColor?Ei(e.pathStyle.passColor):Ei(ji(e.pathStyle.passColor))),this.handleAtom(u,e.pathStyle)),Object.keys(u).length>0&&(r.PathEntityAtom=u),void 0!==e.polyline&&(void 0!==(null===(i=e.polyline)||void 0===i?void 0:i.coordinates)&&(c.coordinates=e.polyline.coordinates),void 0!==(null===(n=e.polyline)||void 0===n?void 0:n.bClosed)&&(c.bClosed=e.polyline.bClosed)),Object.keys(c).length>0&&(r.PolylineAtom=c),r}Modify(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"ModifyPath",Object.assign({eid:this.eid},e));return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{pathStyle:this.PathEntityAtom,polyline:this.PolylineAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N;const L=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw L&&L.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const V=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===V[e])throw L&&L.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.pathStyle){if("object"!=typeof e.pathStyle)throw L&&L.func(`pathStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`pathStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.PathEntityAtom;if(Object.keys(e.pathStyle).forEach(e=>{var o,i;if(void 0===t[e])throw L&&L.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.pathStyle)||void 0===a?void 0:a.type)){if("string"!=typeof e.pathStyle.type)throw L&&L.func(`pathStyle.type ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`pathStyle.type ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(!li.pathType.find(t=>{var o;return t===(null===(o=e.pathStyle)||void 0===o?void 0:o.type)}))throw L&&L.func(`pathStyle.type ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} ${li.pathType.toString()}`),new Error(`pathStyle.type ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.pathType.toString()}`)}if(void 0!==(null===(u=e.pathStyle)||void 0===u?void 0:u.width)&&("number"!=typeof e.pathStyle.width||e.pathStyle.width<0))throw L&&L.func(`pathStyle.width ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().positiveNumber}`),new Error(`pathStyle.width ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().positiveNumber}`);if(void 0!==(null===(m=e.pathStyle)||void 0===m?void 0:m.speedupFactor)&&"number"!=typeof e.pathStyle.speedupFactor)throw L&&L.func(`pathStyle.speedupFactor ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`),new Error(`pathStyle.speedupFactor ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`);if(void 0!==(null===(y=e.pathStyle)||void 0===y?void 0:y.opacity)&&"number"!=typeof e.pathStyle.opacity)throw L&&L.func(`pathStyle.opacity ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`),new Error(`pathStyle.opacity ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}`);if(void 0!==(null===(E=e.pathStyle)||void 0===E?void 0:E.color)&&"string"!=typeof e.pathStyle.color)throw L&&L.func(`pathStyle.color ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().hexa}`),new Error(`pathStyle.color ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().hexa}`);if(void 0!==(null===(j=e.pathStyle)||void 0===j?void 0:j.passColor)&&"string"!=typeof e.pathStyle.passColor)throw L&&L.func(`pathStyle.passColor ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().hexa}`),new Error(`pathStyle.passColor ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().hexa}`)}if(e.polyline){if("object"!=typeof e.polyline)throw L&&L.func(`polyline ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().object}`),new Error(`polyline ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().object}`);if(void 0===(null===($=e.polyline)||void 0===$?void 0:$.coordinates))throw L&&L.func(`polyline.coordinates ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().required}`),new Error(`polyline.coordinates ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().required}`);if("object"!=typeof e.polyline.coordinates||void 0===e.polyline.coordinates.length)throw L&&L.func(`polyline.coordinates ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().array}`),new Error(`polyline.coordinates ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().array}`);if(e.polyline.coordinates.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw L&&L.func(`the value of polyline.coordinates ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polyline.coordinates ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw L&&L.func(`the value of polyline.coordinates ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polyline.coordinates ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)}),void 0!==(null===(R=e.polyline)||void 0===R?void 0:R.bClosed)&&"boolean"!=typeof e.polyline.bClosed)throw L&&L.func(`polyline.bClosed ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().boolean}`),new Error(`polyline.bClosed ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().boolean}`)}}}class er extends fi{constructor(e){super(e,Kn),this.setType("Path")}}class tr extends Qn{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=Ho.get(this.oType),Ti(this.Text3DEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"text3DStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.color)&&(e.text3DStyle.color="object"==typeof e.text3DStyle.color?Ei(e.text3DStyle.color):Ei(ji(e.text3DStyle.color))),this.handleAtom(this.Text3DEntityAtom,e.text3DStyle))}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleTransformAtom(n,e),Object.keys(n).length>0&&(o.TransformAtom=n),this.handleVisibleAtom(r,e),Object.keys(r).length>0&&(o.VisibleAtom=r),this.handleLockedAtom(a,e),Object.keys(a).length>0&&(o.EntityFlagAtom=a),this.handleEntityOutlinerAtom(s,e),Object.keys(s).length>0&&(o.EntityOutlinerAtom=s),void 0!==e.text3DStyle&&((null===(t=e.text3DStyle)||void 0===t?void 0:t.color)&&(e.text3DStyle.color="object"==typeof e.text3DStyle.color?Ei(e.text3DStyle.color):Ei(ji(e.text3DStyle.color))),this.handleAtom(l,e.text3DStyle)),Object.keys(l).length>0&&(o.Text3DEntityAtom=l),o}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{text3DStyle:this.Text3DEntityAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R;const x=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw x&&x.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const N=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===N[e])throw x&&x.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.text3DStyle){if("object"!=typeof e.text3DStyle)throw x&&x.func(`text3DStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`text3DStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.Text3DEntityAtom;if(Object.keys(e.text3DStyle).forEach(e=>{var o,i;if(void 0===t[e])throw x&&x.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.text3DStyle)||void 0===a?void 0:a.text)&&"string"!=typeof e.text3DStyle.text)throw x&&x.func(`text3DStyle.text ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`text3DStyle.text ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(void 0!==(null===(d=e.text3DStyle)||void 0===d?void 0:d.color)&&"string"!=typeof e.text3DStyle.color)throw x&&x.func(`text3DStyle.color ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().hexa}`),new Error(`text3DStyle.color ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().hexa}`);if(void 0!==(null===(v=e.text3DStyle)||void 0===v?void 0:v.type)){if("string"!=typeof e.text3DStyle.type)throw x&&x.func(`text3DStyle.type ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`text3DStyle.type ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`);if(!li.text3DType.find(t=>{var o;return t===(null===(o=e.text3DStyle)||void 0===o?void 0:o.type)}))throw x&&x.func(`text3DStyle.type ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} ${li.text3DType.toString()}`),new Error(`text3DStyle.type ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} ${li.text3DType.toString()}`)}if(void 0!==(null===(y=e.text3DStyle)||void 0===y?void 0:y.outline)){if("number"!=typeof e.text3DStyle.outline)throw x&&x.func(`text3DStyle.outline ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`),new Error(`text3DStyle.outline ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}`);if(e.text3DStyle.outline<0||e.text3DStyle.outline>1)throw x&&x.func(`text3DStyle.outline ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().range} 0 ~ 1`),new Error(`text3DStyle.outline ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} 0 ~ 1`)}if(void 0!==(null===(I=e.text3DStyle)||void 0===I?void 0:I.portrait)&&"boolean"!=typeof e.text3DStyle.portrait)throw x&&x.func(`text3DStyle.portrait ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().boolean}`),new Error(`text3DStyle.portrait ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().boolean}`);if(void 0!==(null===(C=e.text3DStyle)||void 0===C?void 0:C.space)&&"number"!=typeof e.text3DStyle.space)throw x&&x.func(`text3DStyle.space ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().number}`),new Error(`text3DStyle.space ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().number}`);if(void 0!==(null===($=e.text3DStyle)||void 0===$?void 0:$.bounce)&&"number"!=typeof e.text3DStyle.bounce)throw x&&x.func(`text3DStyle.bounce ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().number}`),new Error(`text3DStyle.bounce ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().number}`);if(void 0!==(null===(A=e.text3DStyle)||void 0===A?void 0:A.faceToCamera)&&"boolean"!=typeof e.text3DStyle.faceToCamera)throw x&&x.func(`text3DStyle.faceToCamera ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().boolean}`),new Error(`text3DStyle.faceToCamera ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().boolean}`)}}}class or extends fi{constructor(e){super(e,tr),this.setType("Text3D")}}class ir extends Qn{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Particle"}),Object.defineProperty(this,"ParticleEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{particleType:"alarm"}}),this.setObjAtom(this),this.oType="Particle",this.type=Ho.get(this.oType),Ti(this.ParticleEntityAtom,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}GetScheme(){return{ParticleEntityAtom:this.ParticleEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{particleType:this.ParticleEntityAtom.particleType})}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.particleType&&(this.ParticleEntityAtom.particleType=e.particleType)}generateAtomData(e){const t={},o={},i={},n={},r={},a={},s={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(a,e),Object.keys(a).length>0&&(t.TransformAtom=a),this.handleVisibleAtom(i,e),Object.keys(i).length>0&&(t.VisibleAtom=i),this.handleLockedAtom(n,e),Object.keys(n).length>0&&(t.EntityFlagAtom=n),this.handleEntityOutlinerAtom(r,e),Object.keys(r).length>0&&(t.EntityOutlinerAtom=r),void 0!==e.particleType&&(s.particleType=e.particleType),Object.keys(s).length>0&&(t.ParticleEntityAtom=s),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{particleType:this.ParticleEntityAtom.particleType})}Validate(e){var t,o,i,n,r,a,s;const l=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw l&&l.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const d=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw l&&l.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.particleType){if("string"!=typeof e.particleType)throw l&&l.func(`particleType ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`particleType ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(!li.particleType.find(t=>t===e.particleType))throw l&&l.func(`particleType ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.particleType.toString()}`),new Error(`particleType ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.particleType.toString()}`)}}}class nr extends fi{constructor(e){super(e,ir),this.setType("Particle")}}class rr extends $i{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=Ho.get(this.oType),Ti(this.HighlightAreaEntityAtom,this,[],[],[],"highlightAreaStyle"),Ti(this.Polygon2DAtom,this,[],[],[],"polygon2D"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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,o,i;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.highlightAreaStyle&&((null===(t=e.highlightAreaStyle)||void 0===t?void 0:t.interiorColor)&&(e.highlightAreaStyle.interiorColor="object"==typeof e.highlightAreaStyle.interiorColor?Ei(e.highlightAreaStyle.interiorColor):Ei(ji(e.highlightAreaStyle.interiorColor))),(null===(o=e.highlightAreaStyle)||void 0===o?void 0:o.exteriorColor)&&(e.highlightAreaStyle.exteriorColor="object"==typeof e.highlightAreaStyle.exteriorColor?Ei(e.highlightAreaStyle.exteriorColor):Ei(ji(e.highlightAreaStyle.exteriorColor))),(null===(i=e.highlightAreaStyle)||void 0===i?void 0:i.exteriorOutlineColor)&&(e.highlightAreaStyle.exteriorOutlineColor="object"==typeof e.highlightAreaStyle.exteriorOutlineColor?Ei(e.highlightAreaStyle.exteriorOutlineColor):Ei(ji(e.highlightAreaStyle.exteriorOutlineColor))),this.handleAtom(this.HighlightAreaEntityAtom,e.highlightAreaStyle)),void 0!==e.polygon2D&&this.handleAtom(this.Polygon2DAtom,e.polygon2D)}generateAtomData(e){var t,o,i;const n={},r={},a={},s={},l={},d={},c={};return this.handleBasicAtom(r,e),Object.keys(r).length>0&&(n.BasicInfoAtom=r),this.handleVisibleAtom(a,e),Object.keys(a).length>0&&(n.VisibleAtom=a),this.handleLockedAtom(s,e),Object.keys(s).length>0&&(n.EntityFlagAtom=s),this.handleEntityOutlinerAtom(l,e),Object.keys(l).length>0&&(n.EntityOutlinerAtom=l),void 0!==e.highlightAreaStyle&&((null===(t=e.highlightAreaStyle)||void 0===t?void 0:t.interiorColor)&&(e.highlightAreaStyle.interiorColor="object"==typeof e.highlightAreaStyle.interiorColor?Ei(e.highlightAreaStyle.interiorColor):Ei(ji(e.highlightAreaStyle.interiorColor))),(null===(o=e.highlightAreaStyle)||void 0===o?void 0:o.exteriorColor)&&(e.highlightAreaStyle.exteriorColor="object"==typeof e.highlightAreaStyle.exteriorColor?Ei(e.highlightAreaStyle.exteriorColor):Ei(ji(e.highlightAreaStyle.exteriorColor))),(null===(i=e.highlightAreaStyle)||void 0===i?void 0:i.exteriorOutlineColor)&&(e.highlightAreaStyle.exteriorOutlineColor="object"==typeof e.highlightAreaStyle.exteriorOutlineColor?Ei(e.highlightAreaStyle.exteriorOutlineColor):Ei(ji(e.highlightAreaStyle.exteriorOutlineColor))),this.handleAtom(c,e.highlightAreaStyle)),Object.keys(c).length>0&&(n.HighlightAreaEntityAtom=c),void 0!==e.polygon2D&&(void 0!==e.polygon2D.coordinates&&(d.coordinates=e.polygon2D.coordinates),void 0!==e.polygon2D.coordZ&&(d.coordZ=e.polygon2D.coordZ)),Object.keys(d).length>0&&(n.Polygon2DAtom=d),n}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{highlightAreaStyle:this.HighlightAreaEntityAtom,polygon2D:this.Polygon2DAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k;const _=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw _&&_.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const F=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===F[e])throw _&&_.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 _&&_.func(`highlightAreaStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`highlightAreaStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.HighlightAreaEntityAtom;if(Object.keys(e.highlightAreaStyle).forEach(e=>{var o,i;if(void 0===t[e])throw _&&_.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.highlightAreaStyle)||void 0===a?void 0:a.interiorColor)&&"string"!=typeof e.highlightAreaStyle.interiorColor)throw _&&_.func(`highlightAreaStyle.interiorColor ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().hexa}`),new Error(`highlightAreaStyle.interiorColor ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().hexa}`);if(void 0!==(null===(d=e.highlightAreaStyle)||void 0===d?void 0:d.exteriorColor)&&"string"!=typeof e.highlightAreaStyle.exteriorColor)throw _&&_.func(`highlightAreaStyle.exteriorColor ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().hexa}`),new Error(`highlightAreaStyle.exteriorColor ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().hexa}`);if(void 0!==(null===(v=e.highlightAreaStyle)||void 0===v?void 0:v.exteriorOutlineColor)&&"string"!=typeof e.highlightAreaStyle.exteriorOutlineColor)throw _&&_.func(`highlightAreaStyle.exteriorOutlineColor ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().hexa}`),new Error(`highlightAreaStyle.exteriorOutlineColor ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().hexa}`);if(void 0!==(null===(g=e.highlightAreaStyle)||void 0===g?void 0:g.exteriorSaturation)){if("number"!=typeof e.highlightAreaStyle.exteriorSaturation)throw _&&_.func(`highlightAreaStyle.exteriorSaturation ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`),new Error(`highlightAreaStyle.exteriorSaturation ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`);if(e.highlightAreaStyle.exteriorSaturation<-100||e.highlightAreaStyle.exteriorSaturation>100)throw _&&_.func(`highlightAreaStyle.exteriorSaturation ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number} -100 ~ 100`),new Error(`highlightAreaStyle.exteriorSaturation ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number} -100 ~ 100`)}if(void 0!==(null===(E=e.highlightAreaStyle)||void 0===E?void 0:E.exteriorBrightness)){if("number"!=typeof e.highlightAreaStyle.exteriorBrightness)throw _&&_.func(`highlightAreaStyle.exteriorBrightness ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}`),new Error(`highlightAreaStyle.exteriorBrightness ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`);if(e.highlightAreaStyle.exteriorBrightness<-100||e.highlightAreaStyle.exteriorBrightness>100)throw _&&_.func(`highlightAreaStyle.exteriorBrightness ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number} -100 ~ 100`),new Error(`highlightAreaStyle.exteriorBrightness ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().number} -100 ~ 100`)}if(void 0!==(null===(C=e.highlightAreaStyle)||void 0===C?void 0:C.exteriorContrast)){if("number"!=typeof e.highlightAreaStyle.exteriorContrast)throw _&&_.func(`highlightAreaStyle.exteriorContrast ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().number}`),new Error(`highlightAreaStyle.exteriorContrast ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().number}`);if(e.highlightAreaStyle.exteriorContrast<-100||e.highlightAreaStyle.exteriorContrast>100)throw _&&_.func(`highlightAreaStyle.exteriorContrast ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().number} -100 ~ 100`),new Error(`highlightAreaStyle.exteriorContrast ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().number} -100 ~ 100`)}}if(e.polygon2D){if("object"!=typeof e.polygon2D)throw _&&_.func(`polygon2D ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().object}`),new Error(`polygon2D ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().object}`);if(void 0===(null===(D=e.polygon2D)||void 0===D?void 0:D.coordinates))throw _&&_.func(`polygon2D.coordinates ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().required}`),new Error(`polygon2D.coordinates ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().required}`);if("object"!=typeof e.polygon2D.coordinates||void 0===e.polygon2D.coordinates.length)throw _&&_.func(`polygon2D.coordinates ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().array}`),new Error(`polygon2D.coordinates ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().array}`);if(e.polygon2D.coordinates.forEach(e=>{var t,o;if("object"!=typeof e||void 0===e.length)throw _&&_.func(`the value of polygon2D.coordinates ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polygon2D.coordinates ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw _&&_.func(`the value of polygon2D.coordinates's value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polygon2D.coordinates's value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw _&&_.func(`the value of polygon2D.coordinates's value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of polygon2D.coordinates's value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})}),void 0!==(null===(V=e.polygon2D)||void 0===V?void 0:V.coordZ)&&"number"!=typeof e.polygon2D.coordZ)throw _&&_.func(`polygon2D.coordZ ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().number}`),new Error(`polygon2D.coordZ ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().number}`)}}}class ar extends fi{constructor(e){super(e,rr),this.setType("HighlightArea")}}class sr extends $i{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,mappingHeightRange:[-1e6,1e6],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=Ho.get(this.oType),Ti(this.HeatMapEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"heatMapStyle"),Ti(this.PointValueAtom,this,[],[],[],"points"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.gradientSetting)&&(e.heatMapStyle.gradientSetting=e.heatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(this.HeatMapEntityAtom,e.heatMapStyle)),void 0!==e.points&&this.handleAtom(this.PointValueAtom,e.points)}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(o.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(o.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(o.EntityOutlinerAtom=a),void 0!==e.heatMapStyle&&((null===(t=e.heatMapStyle)||void 0===t?void 0:t.gradientSetting)&&(e.heatMapStyle.gradientSetting=e.heatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(l,e.heatMapStyle)),Object.keys(l).length>0&&(o.HeatMapEntityAtom=l),void 0!==e.points&&void 0!==e.points.features&&(s.features=e.points.features),Object.keys(s).length>0&&(o.PointValueAtom=s),o}Clip(e,o="aaff00ff"){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"ClipHeatMapEntity",{eid:this.eid,polygon:e,color:Ei("object"==typeof o?o:ji(o))});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnClip(){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const e=yield this.StartApi(this.apiClassName,"UnClipHeatMapEntity",{eid:this.eid});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Modify(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"ModifyHeatMap",Object.assign({eid:this.eid},e));return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetHeatValue(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`location ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`location ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw t&&t.func(`location ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 3`),new Error(`location ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLengt} 3`)}if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"GetHeatMapEntity",{eid:this.eid,location:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Filter(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`filterValueRange ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`filterValueRange ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw t&&t.func(`filterValueRange ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 2`),new Error(`filterValueRange ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLengt} 2`)}if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"FilterHeatMapEntity",{eid:this.eid,filterValueRange:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnFilter(){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const e=yield this.StartApi(this.apiClassName,"UnFilterHeatMapEntity",{eid:this.eid});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{heatMapStyle:this.HeatMapEntityAtom,points:this.PointValueAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R;const x=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw x&&x.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const N=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===N[e])throw x&&x.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.heatMapStyle){if("object"!=typeof e.heatMapStyle)throw x&&x.func(`heatMapStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`heatMapStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.HeatMapEntityAtom;if(Object.keys(e.heatMapStyle).forEach(e=>{var o,i;if(void 0===t[e])throw x&&x.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.heatMapStyle)||void 0===a?void 0:a.type)){if("string"!=typeof e.heatMapStyle.type)throw x&&x.func(`heatMapStyle.type ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`heatMapStyle.type ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(!li.heatmapType.find(t=>{var o;return t===(null===(o=e.heatMapStyle)||void 0===o?void 0:o.type)}))throw x&&x.func(`heatMapStyle.type ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} ${li.heatmapType.toString()}`),new Error(`heatMapStyle.type ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.heatmapType.toString()}`)}if(void 0!==(null===(u=e.heatMapStyle)||void 0===u?void 0:u.brushDiameter)&&"number"!=typeof e.heatMapStyle.brushDiameter)throw x&&x.func(`heatMapStyle.brushDiameter ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().positiveNumber}`),new Error(`heatMapStyle.brushDiameter ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().positiveNumber}`);if(void 0!==(null===(m=e.heatMapStyle)||void 0===m?void 0:m.mappingHeightRange)){if("object"!=typeof e.heatMapStyle.mappingHeightRange||void 0===e.heatMapStyle.mappingHeightRange.length)throw x&&x.func(`heatMapStyle.mappingHeightRange ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`heatMapStyle.mappingHeightRange ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(2!=e.heatMapStyle.mappingHeightRange.filter(e=>"number"==typeof e).length)throw x&&x.func(`heatMapStyle.mappingHeightRange ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 2`),new Error(`heatMapStyle.mappingHeightRange ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(p=e.heatMapStyle)||void 0===p?void 0:p.mappingValueRange)){if("object"!=typeof e.heatMapStyle.mappingValueRange||void 0===e.heatMapStyle.mappingValueRange.length)throw x&&x.func(`heatMapStyle.mappingValueRange ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().array}`),new Error(`heatMapStyle.mappingValueRange ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().array}`);if(2!=e.heatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw x&&x.func(`heatMapStyle.mappingValueRange ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().arrayNumberLength} 2`),new Error(`heatMapStyle.mappingValueRange ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(S=e.heatMapStyle)||void 0===S?void 0:S.gradientSetting)){if("object"!=typeof e.heatMapStyle.gradientSetting||void 0===e.heatMapStyle.gradientSetting.length)throw x&&x.func(`heatMapStyle.gradientSetting ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().array}`),new Error(`heatMapStyle.gradientSetting ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().array}`);if(5!=e.heatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw x&&x.func(`the value of heatMapStyle.gradientSetting ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().arrayHEXALength} 5`),new Error(`the value of heatMapStyle.gradientSetting ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().arrayHEXALength} 5`)}}if(void 0!==e.points){if("object"!=typeof e.points)throw x&&x.func(`points ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().object}`),new Error(`points ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().object}`);if(void 0!==(null===(A=e.points)||void 0===A?void 0:A.features)){if("object"!=typeof e.points.features||void 0===e.points.features.length)throw x&&x.func(`points.features ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().array}`),new Error(`points.features ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().array}`);e.points.features.forEach(e=>{var t,o,i,n,r,a,s,l,d,c;if("object"!=typeof e)throw x&&x.func(`the value of points.features ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`the value of points.features ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);if(void 0===e.point||void 0===e.value)throw x&&x.func(`the value(point and value) of points.features ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`the value(point and value) of points.features ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if(Object.keys(e).forEach(e=>{var t,o;if("point"!==e&&"value"!==e)throw x&&x.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"object"!=typeof e.point||void 0===e.point.length)throw x&&x.func(`the point of points.features ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`the point of points.features ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(3!==e.point.filter(e=>"number"==typeof e).length)throw x&&x.func(`the point of points.features ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw x&&x.func(`the value of points.features ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`the value of points.features ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)})}}}}class lr extends fi{constructor(e){super(e,sr),this.setType("HeatMap")}}class dr extends $i{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=Ho.get(this.oType),Ti(this.ColumnarHeatMapEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"columnarHeatMapStyle"),Ti(this.PointValueAtom,this,[],[],[],"points"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.gradientSetting)&&(e.columnarHeatMapStyle.gradientSetting=e.columnarHeatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(this.ColumnarHeatMapEntityAtom,e.columnarHeatMapStyle)),void 0!==e.points&&this.handleAtom(this.PointValueAtom,e.points)}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(o.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(o.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(o.EntityOutlinerAtom=a),void 0!==e.columnarHeatMapStyle&&((null===(t=e.columnarHeatMapStyle)||void 0===t?void 0:t.gradientSetting)&&(e.columnarHeatMapStyle.gradientSetting=e.columnarHeatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(l,e.columnarHeatMapStyle)),Object.keys(l).length>0&&(o.ColumnarHeatMapEntityAtom=l),void 0!==e.points&&void 0!==e.points.features&&(s.features=e.points.features),Object.keys(s).length>0&&(o.PointValueAtom=s),o}Clip(e,o="aaff00ff"){return t(this,void 0,void 0,function*(){const t=yield this.StartApi(this.apiClassName,"ClipColumnarHeatMapEntity",{eid:this.eid,polygon:e,color:Ei("object"==typeof o?o:ji(o))});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnClip(){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const e=yield this.StartApi(this.apiClassName,"UnClipColumnarHeatMapEntity",{eid:this.eid});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Modify(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"ModifyColumnarHeatMap",Object.assign({eid:this.eid},e));return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetHeatValue(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`location ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`location ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw t&&t.func(`location ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 3`),new Error(`location ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLengt} 3`)}if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"GetColumnarHeatMapEntity",{eid:this.eid,location:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Filter(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`filterValueRange ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`filterValueRange ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw t&&t.func(`filterValueRange ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 2`),new Error(`filterValueRange ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLengt} 2`)}if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"FilterColumnarHeatMapEntity",{eid:this.eid,filterValueRange:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnFilter(){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const e=yield this.StartApi(this.apiClassName,"UnFilterColumnarHeatMapEntity",{eid:this.eid});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{columnarHeatMapStyle:this.ColumnarHeatMapEntityAtom,points:this.PointValueAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k;const _=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw _&&_.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const F=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===F[e])throw _&&_.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.columnarHeatMapStyle){if("object"!=typeof e.columnarHeatMapStyle)throw _&&_.func(`columnarHeatMapStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`columnarHeatMapStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.ColumnarHeatMapEntityAtom;if(Object.keys(e.columnarHeatMapStyle).forEach(e=>{var o,i;if(void 0===t[e])throw _&&_.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.columnarHeatMapStyle)||void 0===a?void 0:a.type)){if("string"!=typeof e.columnarHeatMapStyle.type)throw _&&_.func(`columnarHeatMapStyle.type ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`columnarHeatMapStyle.type ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(!li.columnarheatmapType.find(t=>{var o;return t===(null===(o=e.columnarHeatMapStyle)||void 0===o?void 0:o.type)}))throw _&&_.func(`columnarHeatMapStyle.type ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} ${li.columnarheatmapType.toString()}`),new Error(`columnarHeatMapStyle.type ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.columnarheatmapType.toString()}`)}if(void 0!==(null===(u=e.columnarHeatMapStyle)||void 0===u?void 0:u.brushDiameter)&&("number"!=typeof e.columnarHeatMapStyle.brushDiameter||e.columnarHeatMapStyle.brushDiameter<0))throw _&&_.func(`columnarHeatMapStyle.brushDiameter ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().positiveNumber}`),new Error(`columnarHeatMapStyle.brushDiameter ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().positiveNumber}`);if(void 0!==(null===(m=e.columnarHeatMapStyle)||void 0===m?void 0:m.columnarWidth)&&"number"!=typeof e.columnarHeatMapStyle.columnarWidth)throw _&&_.func(`columnarHeatMapStyle.columnarWidth ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().positiveNumber}`),new Error(`columnarHeatMapStyle.columnarWidth ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().positiveNumber}`);if(void 0!==(null===(y=e.columnarHeatMapStyle)||void 0===y?void 0:y.mappingValueRange)){if("object"!=typeof e.columnarHeatMapStyle.mappingValueRange||void 0===e.columnarHeatMapStyle.mappingValueRange.length)throw _&&_.func(`columnarHeatMapStyle.mappingValueRange ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().array}`),new Error(`columnarHeatMapStyle.mappingValueRange ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().array}`);if(2!=e.columnarHeatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw _&&_.func(`columnarHeatMapStyle.mappingValueRange ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().arrayNumberLength} 2`),new Error(`columnarHeatMapStyle.mappingValueRange ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(I=e.columnarHeatMapStyle)||void 0===I?void 0:I.mappingHeightRange)){if("object"!=typeof e.columnarHeatMapStyle.mappingHeightRange||void 0===e.columnarHeatMapStyle.mappingHeightRange.length)throw _&&_.func(`columnarHeatMapStyle.mappingHeightRange ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().array}`),new Error(`columnarHeatMapStyle.mappingHeightRange ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().array}`);if(2!=e.columnarHeatMapStyle.mappingHeightRange.filter(e=>"number"==typeof e&&e>=0).length)throw _&&_.func(`columnarHeatMapStyle.mappingHeightRange ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`columnarHeatMapStyle.mappingHeightRange ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null===(O=e.columnarHeatMapStyle)||void 0===O?void 0:O.enableGap)&&"boolean"!=typeof e.columnarHeatMapStyle.enableGap)throw _&&_.func(`columnarHeatMapStyle.enableGap ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().boolean}`),new Error(`columnarHeatMapStyle.enableGap ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().boolean}`);if(void 0!==(null===(M=e.columnarHeatMapStyle)||void 0===M?void 0:M.gradientSetting)){if("object"!=typeof e.columnarHeatMapStyle.gradientSetting||void 0===e.columnarHeatMapStyle.gradientSetting.length)throw _&&_.func(`columnarHeatMapStyle.gradientSetting ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().array}`),new Error(`columnarHeatMapStyle.gradientSetting ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().array}`);if(5!=e.columnarHeatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw _&&_.func(`columnarHeatMapStyle.gradientSetting ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().arrayHEXALength} 5`),new Error(`columnarHeatMapStyle.gradientSetting ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().arrayHEXALength} 5`)}}if(void 0!==e.points){if("object"!=typeof e.points)throw _&&_.func(`points ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().object}`),new Error(`points ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().object}`);if(void 0!==(null===(V=e.points)||void 0===V?void 0:V.features)){if("object"!=typeof e.points.features||void 0===e.points.features.length)throw _&&_.func(`points.features ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().array}`),new Error(`points.features ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().array}`);e.points.features.forEach(e=>{var t,o,i,n,r,a,s,l,d,c;if("object"!=typeof e)throw _&&_.func(`the value of points.features ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`the value of points.features ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);if(void 0===e.point||void 0===e.value)throw _&&_.func(`the value(point and value) of points.features ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`the value(point and value) of points.features ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if(Object.keys(e).forEach(e=>{var t,o;if("point"!==e&&"value"!==e)throw _&&_.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"object"!=typeof e.point||void 0===e.point.length)throw _&&_.func(`the point of points.features ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`the point of points.features ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(3!==e.point.filter(e=>"number"==typeof e).length)throw _&&_.func(`the point of points.features ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw _&&_.func(`the value of points.features ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`the value of points.features ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)})}}}}class cr extends fi{constructor(e){super(e,dr),this.setType("ColumnarHeatMap")}}class ur extends Qn{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Window"}),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]}}),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}}}),this.setObjAtom(this),this.oType="Window",this.type=Ho.get(this.oType),Ti(this.WindowEntityAtom,this,[],[],[],"windowStyle"),this.activeBaseAttributes.push("camera","interaction","entity"),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"rotator"!==e&&"scale3d"!==e),e&&((null===(t=li.getInstance())||void 0===t?void 0: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(e){this.Update({location:e}).then(t=>{t.success&&(this.TransformAtom2D.location=e)})}get overlapOrder(){return this.Visible2DAtom.entity.overlapOrder}set overlapOrder(e){this.handleVisible2DAction({entity:{overlapOrder:e}}).then(t=>{t.success&&(this.Visible2DAtom.entity.overlapOrder=e)})}get hideDistance(){return this.Visible2DAtom.camera.hideDistance}set hideDistance(e){this.handleVisible2DAction({camera:{hideDistance:e,hideType:this.Visible2DAtom.camera.hideType,scaleMode:this.Visible2DAtom.camera.scaleMode}}).then(t=>{t.success&&(this.Visible2DAtom.camera.hideDistance=e)})}get hideType(){return this.Visible2DAtom.camera.hideType}set hideType(e){this.handleVisible2DAction({camera:{hideType:e,hideDistance:this.Visible2DAtom.camera.hideDistance,scaleMode:this.Visible2DAtom.camera.scaleMode}}).then(t=>{t.success&&(this.Visible2DAtom.camera.hideType=e)})}get scaleMode(){return this.Visible2DAtom.camera.scaleMode}set scaleMode(e){this.handleVisible2DAction({camera:{scaleMode:e,hideDistance:this.Visible2DAtom.camera.hideDistance,hideType:this.Visible2DAtom.camera.hideType}}).then(t=>{t.success&&(this.Visible2DAtom.camera.scaleMode=e)})}get clickTop(){return this.Visible2DAtom.interaction.clickTop}set clickTop(e){this.handleVisible2DAction({interaction:{clickTop:e,hoverTop:this.Visible2DAtom.interaction.hoverTop}}).then(t=>{t.success&&(this.Visible2DAtom.interaction.clickTop=e)})}get hoverTop(){return this.Visible2DAtom.interaction.hoverTop}set hoverTop(e){this.handleVisible2DAction({interaction:{hoverTop:e,clickTop:this.Visible2DAtom.interaction.clickTop}}).then(t=>{t.success&&(this.Visible2DAtom.interaction.hoverTop=e)})}GetLocation(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom2D.location}})}SetLocation(e){return t(this,void 0,void 0,function*(){const t=yield this.Update({location:e});return t.success&&(this.TransformAtom2D.location=e),t})}GetOverlapOrder(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.entity.overlapOrder}})}SetOverlapOrder(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({entity:{overlapOrder:e}});return t.success&&(this.Visible2DAtom.entity.overlapOrder=e),t})}GetHideDistance(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.hideDistance}})}SetHideDistance(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{hideDistance:e}});return t.success&&(this.Visible2DAtom.camera.hideDistance=e),t})}GetHideType(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.hideType}})}SetHideType(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{hideType:e}});return t.success&&(this.Visible2DAtom.camera.hideType=e),t})}GetScaleMode(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.scaleMode}})}SetScaleMode(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({camera:{scaleMode:e}});return t.success&&(this.Visible2DAtom.camera.scaleMode=e),t})}GetClickTop(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.interaction.clickTop}})}SetClickTop(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({interaction:{clickTop:e}});return t.success&&(this.Visible2DAtom.interaction.clickTop=e),t})}GetHoverTop(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.interaction.hoverTop}})}SetHoverTop(e){return t(this,void 0,void 0,function*(){const t=yield this.handleVisible2DAction({interaction:{hoverTop:e}});return t.success&&(this.Visible2DAtom.interaction.hoverTop=e),t})}GetVisible2DScheme(){return{Visible2DAtom:this.Visible2DAtom}}GetScheme(){return{WindowEntityAtom:this.WindowEntityAtom}}getTransform2DEntityData(){return{location:this.location}}setTransform2DEntityData(e){this.handleTransformAtom(this.TransformAtom2D,e)}SetVisible2D(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){const t={};void 0!==(null==e?void 0:e.camera)&&(t.camera=this.Visible2DAtom.camera,void 0!==(null===(o=e.camera)||void 0===o?void 0:o.hideDistance)&&(t.camera.hideDistance=e.camera.hideDistance),void 0!==(null===(i=e.camera)||void 0===i?void 0:i.hideType)&&(t.camera.hideType=e.camera.hideType),void 0!==(null===(n=e.camera)||void 0===n?void 0:n.scaleMode)&&(t.camera.scaleMode=e.camera.scaleMode)),void 0!==(null==e?void 0:e.interaction)&&(t.interaction=this.Visible2DAtom.interaction,void 0!==(null===(r=e.interaction)||void 0===r?void 0:r.clickTop)&&(t.interaction.clickTop=e.interaction.clickTop),void 0!==(null===(a=e.interaction)||void 0===a?void 0:a.hoverTop)&&(t.interaction.hoverTop=e.interaction.hoverTop)),void 0!==(null==e?void 0:e.entity)&&(t.entity=this.Visible2DAtom.entity,void 0!==(null===(s=e.entity)||void 0===s?void 0:s.overlapOrder)&&(t.entity.overlapOrder=e.entity.overlapOrder));const l=yield this.handleVisible2DAction(e);return l.success&&this.SetVisible2DData(e),l})}handleVisible2DAction(e){return t(this,void 0,void 0,function*(){if(!this.obj)return this.err.Log("Please Add first"),{success:!1,message:"Please Add first"};return yield this.obj.RequestEntity.UpdateEntitiesByEids([{eid:this.eid,entities:{Visible2DAtom:e}}])})}GetVisible2DData(){return{camera:{hideDistance:this.Visible2DAtom.camera.hideDistance,hideType:this.Visible2DAtom.camera.hideType,scaleMode:this.Visible2DAtom.camera.scaleMode},interaction:{clickTop:this.Visible2DAtom.interaction.clickTop,hoverTop:this.Visible2DAtom.interaction.hoverTop},entity:{overlapOrder:this.Visible2DAtom.entity.overlapOrder}}}SetVisible2DData(e){var t,o,i,n,r,a;void 0!==(null==e?void 0:e.camera)&&(void 0!==(null===(t=e.camera)||void 0===t?void 0:t.hideDistance)&&(this.Visible2DAtom.camera.hideDistance=e.camera.hideDistance),void 0!==(null===(o=e.camera)||void 0===o?void 0:o.hideType)&&(this.Visible2DAtom.camera.hideType=e.camera.hideType),void 0!==(null===(i=e.camera)||void 0===i?void 0:i.scaleMode)&&(this.Visible2DAtom.camera.scaleMode=e.camera.scaleMode)),void 0!==(null==e?void 0:e.interaction)&&(void 0!==(null===(n=e.interaction)||void 0===n?void 0:n.clickTop)&&(this.Visible2DAtom.interaction.clickTop=e.interaction.clickTop),void 0!==(null===(r=e.interaction)||void 0===r?void 0:r.hoverTop)&&(this.Visible2DAtom.interaction.hoverTop=e.interaction.hoverTop)),void 0!==(null==e?void 0:e.entity)&&null!=(null===(a=e.entity)||void 0===a?void 0:a.overlapOrder)&&(this.Visible2DAtom.entity.overlapOrder=e.entity.overlapOrder)}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&&this.handleAtom(this.WindowEntityAtom,e.windowStyle)}generateAtomData(e){var t,o,i,n,r,a,s,l,d;const c={},u={},v={},h={},m={},g={},f={},y={};return this.handleBasicAtom(u,e),Object.keys(u).length>0&&(c.BasicInfoAtom=u),this.handleTransformAtom(v,e),Object.keys(v).length>0&&(c.TransformAtom2D=v),this.handleVisibleAtom(h,e),Object.keys(h).length>0&&(c.VisibleAtom=h),this.handleLockedAtom(g,e),Object.keys(g).length>0&&(c.EntityFlagAtom=g),this.handleEntityOutlinerAtom(f,e),Object.keys(f).length>0&&(c.EntityOutlinerAtom=f),void 0!==(null==e?void 0:e.visible2D)&&(void 0!==(null===(t=e.visible2D)||void 0===t?void 0:t.camera)&&(m.camera=this.Visible2DAtom.camera,void 0!==(null===(o=e.visible2D.camera)||void 0===o?void 0:o.hideDistance)&&(m.camera.hideDistance=e.visible2D.camera.hideDistance),void 0!==(null===(i=e.visible2D.camera)||void 0===i?void 0:i.hideType)&&(m.camera.hideType=e.visible2D.camera.hideType),void 0!==(null===(n=e.visible2D.camera)||void 0===n?void 0:n.scaleMode)&&(m.camera.scaleMode=e.visible2D.camera.scaleMode)),void 0!==(null===(r=e.visible2D)||void 0===r?void 0:r.interaction)&&(m.interaction=this.Visible2DAtom.interaction,void 0!==(null===(a=e.visible2D.interaction)||void 0===a?void 0:a.clickTop)&&(m.interaction.clickTop=e.visible2D.interaction.clickTop),void 0!==(null===(s=e.visible2D.interaction)||void 0===s?void 0:s.hoverTop)&&(m.interaction.hoverTop=e.visible2D.interaction.hoverTop)),void 0!==(null===(l=e.visible2D)||void 0===l?void 0:l.entity)&&(m.entity=this.Visible2DAtom.entity,void 0!==(null===(d=e.visible2D.entity)||void 0===d?void 0:d.overlapOrder)&&(m.entity.overlapOrder=e.visible2D.entity.overlapOrder))),Object.keys(m).length>0&&(c.Visible2DAtom=m),void 0!==e.windowStyle&&this.handleAtom(y,e.windowStyle),Object.keys(y).length>0&&(c.WindowEntityAtom=y),c}GetValidateRules(){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})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b;const p=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw p&&p.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const E=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===E[e])throw p&&p.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 p&&p.func(`windowStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`windowStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.WindowEntityAtom;if(Object.keys(e.windowStyle).forEach(e=>{var o,i;if(void 0===t[e])throw p&&p.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.windowStyle)||void 0===a?void 0:a.url)&&"string"!=typeof e.windowStyle.url)throw p&&p.func(`windowStyle.url ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`windowStyle.url ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(void 0!==(null===(d=e.windowStyle)||void 0===d?void 0:d.size)){if("object"!=typeof e.windowStyle.size||void 0===e.windowStyle.size.length)throw p&&p.func(`windowStyle.size ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`),new Error(`windowStyle.size ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`);if(2!==e.windowStyle.size.filter(e=>"number"==typeof e&&e>=0).length)throw p&&p.func(`windowStyle.size ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`windowStyle.size ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null===(m=e.windowStyle)||void 0===m?void 0:m.offset)){if("object"!=typeof e.windowStyle.offset||void 0===e.windowStyle.offset.length)throw p&&p.func(`windowStyle.offset ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`windowStyle.offset ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(2!==e.windowStyle.offset.filter(e=>"number"==typeof e).length)throw p&&p.func(`windowStyle.offset ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 2`),new Error(`windowStyle.offset ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 2`)}}e.visible2D&&this.validateVisible2D(e.visible2D)}validateVisible2D(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G;const O=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null==e?void 0:e.camera){if("object"!=typeof e.camera)throw O&&O.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().cameraErr),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().cameraErr);if(null===(n=e.camera)||void 0===n?void 0:n.hideDistance){if("number"!=typeof e.camera.hideDistance)throw O&&O.func(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().hideDistanceErr),new Error(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().hideDistanceErr);if(e.camera.hideDistance<0)throw O&&O.func(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().hideDistanceErr2),new Error(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().hideDistanceErr2)}if(null===(d=e.camera)||void 0===d?void 0:d.hideType){if("string"!=typeof e.camera.hideType)throw O&&O.func(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().hideTypeErr),new Error(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().hideTypeErr);if("none"!==e.camera.hideType&&"default"!==e.camera.hideType)throw O&&O.func(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().hideTypeErr2),new Error(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().hideTypeErr2)}if(null===(m=e.camera)||void 0===m?void 0:m.scaleMode){if("string"!=typeof e.camera.scaleMode)throw O&&O.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().scaleModeErr),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().scaleModeErr);if("2D"!==e.camera.scaleMode&&"3D"!==e.camera.scaleMode)throw O&&O.func(null===(y=li.getInstance())||void 0===y?void 0:y.getErrorTxt().scaleModeErr2),new Error(null===(b=li.getInstance())||void 0===b?void 0:b.getErrorTxt().scaleModeErr2)}}if(null==e?void 0:e.interaction){if("object"!=typeof e.interaction)throw O&&O.func(null===(p=li.getInstance())||void 0===p?void 0:p.getErrorTxt().interactionErr),new Error(null===(E=li.getInstance())||void 0===E?void 0:E.getErrorTxt().interactionErr);if(void 0!==(null===(w=e.interaction)||void 0===w?void 0:w.clickTop)&&"boolean"!=typeof e.interaction.clickTop)throw O&&O.func(null===(I=li.getInstance())||void 0===I?void 0:I.getErrorTxt().clickTopErr),new Error(null===(j=li.getInstance())||void 0===j?void 0:j.getErrorTxt().clickTopErr);if(void 0!==(null===(S=e.interaction)||void 0===S?void 0:S.hoverTop)&&"boolean"!=typeof e.interaction.hoverTop)throw O&&O.func(null===(C=li.getInstance())||void 0===C?void 0:C.getErrorTxt().hoverTopErr),new Error(null===(G=li.getInstance())||void 0===G?void 0:G.getErrorTxt().hoverTopErr)}}}class vr extends fi{constructor(e){super(e,ur),this.setType("Window")}}class hr extends Qn{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=Ho.get(this.oType),Ti(this.ViewShedEntityAtom,this,[],[],[],"viewshedStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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&&this.handleAtom(this.ViewShedEntityAtom,e.viewshedStyle)}generateAtomData(e){const t={},o={},i={},n={},r={},a={},s={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==e.viewshedStyle&&this.handleAtom(s,e.viewshedStyle),Object.keys(s).length>0&&(t.ViewShedEntityAtom=s),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{viewshedStyle:this.ViewShedEntityAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I;const j=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw j&&j.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const S=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===S[e])throw j&&j.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 j&&j.func(`viewshedStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`viewshedStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.ViewShedEntityAtom;if(Object.keys(e.viewshedStyle).forEach(e=>{var o,i;if(void 0===t[e])throw j&&j.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.viewshedStyle)||void 0===a?void 0:a.fieldOfView)){if("number"!=typeof e.viewshedStyle.fieldOfView)throw j&&j.func(`viewshedStyle.fieldOfView ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`viewshedStyle.fieldOfView ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(e.viewshedStyle.fieldOfView<0||e.viewshedStyle.fieldOfView>120)throw j&&j.func(`viewshedStyle.fieldOfView ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} 0 ~ 120`),new Error(`viewshedStyle.fieldOfView ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} 0 ~ 120`)}if(void 0!==(null===(u=e.viewshedStyle)||void 0===u?void 0:u.radius)&&"number"!=typeof e.viewshedStyle.radius)throw j&&j.func(`viewshedStyle.radius ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`),new Error(`viewshedStyle.radius ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`);if(void 0!==(null===(m=e.viewshedStyle)||void 0===m?void 0:m.outline)&&"boolean"!=typeof e.viewshedStyle.outline)throw j&&j.func(`viewshedStyle.outline ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().boolean}`),new Error(`viewshedStyle.outline ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`);if(void 0!==(null===(y=e.viewshedStyle)||void 0===y?void 0:y.hiddenColor)&&"string"!=typeof e.viewshedStyle.hiddenColor)throw j&&j.func(`viewshedStyle.hiddenColor ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().hexa}`),new Error(`viewshedStyle.hiddenColor ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().hexa}`);if(void 0!==(null===(E=e.viewshedStyle)||void 0===E?void 0:E.visibleColor)&&"string"!=typeof e.viewshedStyle.visibleColor)throw j&&j.func(`viewshedStyle.visibleColor ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().hexa}`),new Error(`viewshedStyle.visibleColor ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().hexa}`)}}}class mr extends fi{constructor(e){super(e,hr),this.setType("Viewshed")}}class gr extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Parabola"}),Object.defineProperty(this,"ParabolaEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{type:"arrow",topHeight:10,topScale:.3,width:10,color:"aaff00ff",gather:!1}}),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="Parabola",this.type=Ho.get(this.oType),Ti(this.ParabolaEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"parabolaStyle"),Ti(this.PolylineAtom,this,["bClosed"],[],[],"polyline"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.color)&&(e.parabolaStyle.color="object"==typeof e.parabolaStyle.color?Ei(e.parabolaStyle.color):Ei(ji(e.parabolaStyle.color))),this.handleAtom(this.ParabolaEntityAtom,e.parabolaStyle)),void 0!==e.polyline&&this.handleAtom(this.PolylineAtom,e.polyline)}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(o.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(o.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(o.EntityOutlinerAtom=a),void 0!==e.parabolaStyle&&((null===(t=e.parabolaStyle)||void 0===t?void 0:t.color)&&(e.parabolaStyle.color="object"==typeof e.parabolaStyle.color?Ei(e.parabolaStyle.color):Ei(ji(e.parabolaStyle.color))),this.handleAtom(l,e.parabolaStyle)),Object.keys(l).length>0&&(o.ParabolaEntityAtom=l),void 0!==e.polyline&&(void 0!==e.polyline.coordinates&&(s.coordinates=e.polyline.coordinates),void 0!==e.polyline.bClosed&&(s.bClosed=e.polyline.bClosed)),Object.keys(s).length>0&&(o.PolylineAtom=s),o}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{parabolaStyle:this.ParabolaEntityAtom,polyline:this.PolylineAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F;const U=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw U&&U.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const B=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===B[e])throw U&&U.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.parabolaStyle){if("object"!=typeof e.parabolaStyle)throw U&&U.func(`parabolaStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`parabolaStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.ParabolaEntityAtom;if(Object.keys(e.parabolaStyle).forEach(e=>{var o,i;if(void 0===t[e])throw U&&U.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.parabolaStyle)||void 0===a?void 0:a.type)){if("string"!=typeof e.parabolaStyle.type)throw U&&U.func(`parabolaStyle.type ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`parabolaStyle.type ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(!li.parabolaType.find(t=>{var o;return t===(null===(o=e.parabolaStyle)||void 0===o?void 0:o.type)}))throw U&&U.func(`parabolaStyle.type ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} ${li.parabolaType.toString()}`),new Error(`parabolaStyle.type ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.parabolaType.toString()}`)}if(void 0!==(null===(u=e.parabolaStyle)||void 0===u?void 0:u.topHeight)){if("number"!=typeof e.parabolaStyle.topHeight)throw U&&U.func(`parabolaStyle.topHeight ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`),new Error(`parabolaStyle.topHeight ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`);if(e.parabolaStyle.topHeight<0)throw U&&U.func(`parabolaStyle.topHeight ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().positiveNumber}`),new Error(`parabolaStyle.topHeight ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().positiveNumber}`)}if(void 0!==(null===(f=e.parabolaStyle)||void 0===f?void 0:f.topScale)){if("number"!=typeof e.parabolaStyle.topScale)throw U&&U.func(`parabolaStyle.topScale ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`),new Error(`parabolaStyle.topScale ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`);if(e.parabolaStyle.topScale<0||e.parabolaStyle.topScale>1)throw U&&U.func(`parabolaStyle.topScale ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} 0 ~ 1`),new Error(`parabolaStyle.topScale ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().range} 0 ~ 1`)}if(void 0!==(null===(w=e.parabolaStyle)||void 0===w?void 0:w.width)){if("number"!=typeof e.parabolaStyle.width)throw U&&U.func(`parabolaStyle.width ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`),new Error(`parabolaStyle.width ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}`);if(e.parabolaStyle.width<0)throw U&&U.func(`parabolaStyle.width ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().positiveNumber}`),new Error(`parabolaStyle.width ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().positiveNumber}`)}if(void 0!==(null===(G=e.parabolaStyle)||void 0===G?void 0:G.color)&&"string"!=typeof e.parabolaStyle.color)throw U&&U.func(`parabolaStyle.color ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().hexa}`),new Error(`parabolaStyle.color ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().hexa}`);if(void 0!==(null===(T=e.parabolaStyle)||void 0===T?void 0:T.gather)&&"boolean"!=typeof e.parabolaStyle.gather)throw U&&U.func(`parabolaStyle.gather ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().boolean}`),new Error(`parabolaStyle.gather ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().boolean}`)}if(e.polyline){if("object"!=typeof e.polyline)throw U&&U.func(`polyline ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().object}`),new Error(`polyline ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().object}`);if(void 0===(null===(x=e.polyline)||void 0===x?void 0:x.coordinates))throw U&&U.func(`polyline.coordinates ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().required}`),new Error(`polyline.coordinates ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().required}`);if("object"!=typeof e.polyline.coordinates||void 0===e.polyline.coordinates.length)throw U&&U.func(`polyline.coordinates ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().array}`),new Error(`polyline.coordinates ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().array}`);if(e.polyline.coordinates.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw U&&U.func(`the value of polyline.coordinates ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of polyline.coordinates ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw U&&U.func(`the value of polyline.coordinates ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polyline.coordinates ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)}),void 0!==(null===(k=e.polyline)||void 0===k?void 0:k.bClosed)&&"boolean"!=typeof e.polyline.bClosed)throw U&&U.func(`polyline.bClosed ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().boolean}`),new Error(`polyline.bClosed ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().boolean}`)}}}class fr extends fi{constructor(e){super(e,gr),this.setType("Parabola")}}class yr extends Qn{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=Ho.get(this.oType),Ti(this.RasterEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"rasterStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.gradientSetting)&&(e.rasterStyle.gradientSetting=e.rasterStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(this.RasterEntityAtom,e.rasterStyle))}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleTransformAtom(n,e),Object.keys(n).length>0&&(o.TransformAtom=n),this.handleVisibleAtom(r,e),Object.keys(r).length>0&&(o.VisibleAtom=r),this.handleLockedAtom(a,e),Object.keys(a).length>0&&(o.EntityFlagAtom=a),this.handleEntityOutlinerAtom(s,e),Object.keys(s).length>0&&(o.EntityOutlinerAtom=s),void 0!==e.rasterStyle&&((null===(t=e.rasterStyle)||void 0===t?void 0:t.gradientSetting)&&(e.rasterStyle.gradientSetting=e.rasterStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(l,e.rasterStyle)),Object.keys(l).length>0&&(o.RasterEntityAtom=l),o}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{rasterStyle:this.RasterEntityAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b;const p=/^(http|https|file)?:\/\/(.+\/)+.+(\.(tif))$/i,E=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw E&&E.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const w=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===w[e])throw E&&E.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.rasterStyle){if("object"!=typeof e.rasterStyle)throw E&&E.func(`rasterStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`rasterStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.RasterEntityAtom;if(Object.keys(e.rasterStyle).forEach(e=>{var o,i;if(void 0===t[e])throw E&&E.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.rasterStyle)||void 0===a?void 0:a.path)&&("string"!=typeof e.rasterStyle.path||!p.test(e.rasterStyle.path)))throw E&&E.func(`rasterStyle.path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}. (TIF file address supports two forms: http(s):// or file://)`),new Error(`rasterStyle.path ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}. (TIF file address supports two forms: http(s):// or file://)`);if(void 0!==(null===(d=e.rasterStyle)||void 0===d?void 0:d.type)){if("string"!=typeof e.rasterStyle.type)throw E&&E.func(`rasterStyle.type ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`),new Error(`rasterStyle.type ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`);if(!li.rasterType.find(t=>{var o;return t===(null===(o=e.rasterStyle)||void 0===o?void 0:o.type)}))throw E&&E.func(`rasterStyle.type ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().range} ${li.rasterType.toString()}`),new Error(`rasterStyle.type ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} ${li.rasterType.toString()}`)}if(void 0!==(null===(m=e.rasterStyle)||void 0===m?void 0:m.gradientSetting)){if("object"!=typeof e.rasterStyle.gradientSetting||void 0===e.rasterStyle.gradientSetting.length)throw E&&E.func(`rasterStyle.gradientSetting ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`rasterStyle.gradientSetting ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(5!=e.rasterStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw E&&E.func(`rasterStyle.gradientSetting ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayStringLength} 5`),new Error(`rasterStyle.gradientSetting ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayStringLength} 5`)}}}}class br extends fi{constructor(e){super(e,yr),this.setType("Raster")}}class pr extends $i{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=Ho.get(this.oType),Ti(this.RoadHeatMapEntityAtom,this,["sType"],[],[{name:"type",newName:"sType"}],"roadHeatMapStyle"),Ti(this.PointValueAtom,this,[],[],[],"points"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.gradientSetting)&&(e.roadHeatMapStyle.gradientSetting=e.roadHeatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(this.RoadHeatMapEntityAtom,e.roadHeatMapStyle)),void 0!==e.points&&this.handleAtom(this.PointValueAtom,e.points)}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(o.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(o.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(o.EntityOutlinerAtom=a),void 0!==e.roadHeatMapStyle&&((null===(t=e.roadHeatMapStyle)||void 0===t?void 0:t.gradientSetting)&&(e.roadHeatMapStyle.gradientSetting=e.roadHeatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(l,e.roadHeatMapStyle)),Object.keys(l).length>0&&(o.RoadHeatMapEntityAtom=l),void 0!==e.points&&void 0!==e.points.features&&(s.features=e.points.features),Object.keys(s).length>0&&(o.PointValueAtom=s),o}Modify(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"ModifyRoadHeatMap",Object.assign({eid:this.eid},e));return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetHeatValue(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`location ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`location ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw t&&t.func(`location ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 3`),new Error(`location ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLengt} 3`)}if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"GetRoadHeatMapEntity",{eid:this.eid,location:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Filter(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`filterValueRange ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`filterValueRange ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw t&&t.func(`filterValueRange ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumberLength} 2`),new Error(`filterValueRange ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLengt} 2`)}if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"FilterRoadHeatMapEntity",{eid:this.eid,filterValueRange:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnFilter(){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const e=yield this.StartApi(this.apiClassName,"UnFilterRoadHeatMapEntity",{eid:this.eid});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{roadHeatMapStyle:this.RoadHeatMapEntityAtom,points:this.PointValueAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D;const R=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw R&&R.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const x=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===x[e])throw R&&R.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.roadHeatMapStyle){if("object"!=typeof e.roadHeatMapStyle)throw R&&R.func(`roadHeatMapStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`roadHeatMapStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.RoadHeatMapEntityAtom;if(Object.keys(e.roadHeatMapStyle).forEach(e=>{var o,i;if(void 0===t[e])throw R&&R.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.roadHeatMapStyle)||void 0===a?void 0:a.type)){if("string"!=typeof e.roadHeatMapStyle.type)throw R&&R.func(`roadHeatMapStyle.type ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`roadHeatMapStyle.type ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(!li.roadHeatMapType.find(t=>{var o;return t===(null===(o=e.roadHeatMapStyle)||void 0===o?void 0:o.type)}))throw R&&R.func(`roadHeatMapStyle.type ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} ${li.roadHeatMapType.toString()}`),new Error(`roadHeatMapStyle.type ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.roadHeatMapType.toString()}`)}if(void 0!==(null===(u=e.roadHeatMapStyle)||void 0===u?void 0:u.width)&&("number"!=typeof e.roadHeatMapStyle.width||e.roadHeatMapStyle.width<0))throw R&&R.func(`roadHeatMapStyle.width ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().positiveNumber}`),new Error(`roadHeatMapStyle.width ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().positiveNumber}`);if(void 0!==(null===(m=e.roadHeatMapStyle)||void 0===m?void 0:m.mappingValueRange)){if("object"!=typeof e.roadHeatMapStyle.mappingValueRange||void 0===e.roadHeatMapStyle.mappingValueRange.length)throw R&&R.func(`roadHeatMapStyle.mappingValueRange ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`roadHeatMapStyle.mappingValueRange ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(2!=e.roadHeatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw R&&R.func(`roadHeatMapStyle.mappingValueRange ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 2`),new Error(`roadHeatMapStyle.mappingValueRange ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(p=e.roadHeatMapStyle)||void 0===p?void 0:p.gradientSetting)){if("object"!=typeof e.roadHeatMapStyle.gradientSetting||void 0===e.roadHeatMapStyle.gradientSetting.length)throw R&&R.func(`roadHeatMapStyle.gradientSetting ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().array}`),new Error(`roadHeatMapStyle.gradientSetting ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().array}`);if(5!=e.roadHeatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw R&&R.func(`roadHeatMapStyle.gradientSetting ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().arrayHEXALength} 5`),new Error(`roadHeatMapStyle.gradientSetting ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().arrayHEXALength} 5`)}if(void 0!==(null===(S=e.roadHeatMapStyle)||void 0===S?void 0:S.filter)&&void 0!==(null===(C=null==e?void 0:e.roadHeatMapStyle)||void 0===C?void 0:C.type)&&"fit"===e.roadHeatMapStyle.type){if("object"!=typeof e.roadHeatMapStyle.filter||void 0===e.roadHeatMapStyle.filter.length)throw R&&R.func(`roadHeatMapStyle.filter ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().array}`),new Error(`roadHeatMapStyle.filter ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().array}`);e.roadHeatMapStyle.filter.forEach(e=>{var t,o;if("string"!=typeof e)throw R&&R.func(`the value of roadHeatMapStyle.filter ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().hexa}`),new Error(`the value of roadHeatMapStyle.filter ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().hexa}`)})}}if(void 0!==e.points){if("object"!=typeof e.points)throw R&&R.func(`points ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().object}`),new Error(`points ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().object}`);if(void 0!==(null===(M=e.points)||void 0===M?void 0:M.features)){if("object"!=typeof e.points.features||void 0===e.points.features.length)throw R&&R.func(`points.features ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().array}`),new Error(`points.features ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().array}`);e.points.features.forEach(e=>{var t,o,i,n,r,a,s,l,d,c;if("object"!=typeof e)throw R&&R.func(`the value of points.features ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`the value of points.features ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);if(void 0===e.point||void 0===e.value)throw R&&R.func(`the value(point and value) of points.features ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`the value(point and value) of points.features ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if(Object.keys(e).forEach(e=>{var t,o;if("point"!==e&&"value"!==e)throw R&&R.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"object"!=typeof e.point||void 0===e.point.length)throw R&&R.func(`the point of points.features ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`the point of points.features ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(3!==e.point.filter(e=>"number"==typeof e).length)throw R&&R.func(`the point of points.features ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw R&&R.func(`the value of points.features ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`the value of points.features ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)})}}}}class Er extends fi{constructor(e){super(e,pr),this.setType("RoadHeatMap")}}class wr extends Qn{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,bokeh:0,cornerShift:[[0,0],[0,0],[0,0],[0,0]],bgUrl:"",bgPadding:[0,0,0,0],bgOverlap:"hide",labelContent:[],labelOffset:[0,0],labelSize:[0,0],labelContentJustification:"Left",labelContentAutoWrap:!1,btnNormalUrl:"",btnActivateUrl:"",btnOffset:[0,0],btnSize:[0,0]}}),this.setObjAtom(this),this.oType="RealTimeVideo",this.type=Ho.get(this.oType),Ti(this.RealTimeVideoEntityAtom,this,[],[],[],"realTimeVideoStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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&&this.handleAtom(this.RealTimeVideoEntityAtom,e.realTimeVideoStyle)}generateAtomData(e){const t={},o={},i={},n={},r={},a={},s={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==e.realTimeVideoStyle&&this.handleAtom(s,e.realTimeVideoStyle),Object.keys(s).length>0&&(t.RealTimeVideoEntityAtom=s),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{realTimeVideoStyle:this.RealTimeVideoEntityAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te,oe,ie,ne,re,ae,se,le,de,ce,ue,ve,he,me,ge,fe,ye,be,pe,Ee,we,Ie,je,Se,Ce,Ge,Oe,$e,Te,Me,Ae,De,Re,xe,Ne,Le,Ve,Pe,ke,_e,Fe,Ue,Be,qe,ze,We;const He=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw He&&He.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const Ze=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===Ze[e])throw He&&He.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 He&&He.func(`realTimeVideoStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`realTimeVideoStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.RealTimeVideoEntityAtom;if(Object.keys(e.realTimeVideoStyle).forEach(e=>{var o,i;if(void 0===t[e])throw He&&He.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.realTimeVideoStyle)||void 0===a?void 0:a.url)&&"string"!=typeof e.realTimeVideoStyle.url)throw He&&He.func(`realTimeVideoStyle.url ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`realTimeVideoStyle.url ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(void 0!==(null===(d=e.realTimeVideoStyle)||void 0===d?void 0:d.resolution)){if("object"!=typeof e.realTimeVideoStyle.resolution||void 0===e.realTimeVideoStyle.resolution.length)throw He&&He.func(`realTimeVideoStyle.resolution ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`),new Error(`realTimeVideoStyle.resolution ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`);if(2!=e.realTimeVideoStyle.resolution.filter(e=>"number"==typeof e&&e>=0).length)throw He&&He.func(`realTimeVideoStyle.resolution ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`realTimeVideoStyle.resolution ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null===(m=e.realTimeVideoStyle)||void 0===m?void 0:m.offset)){if("object"!=typeof e.realTimeVideoStyle.offset||void 0===e.realTimeVideoStyle.offset.length)throw He&&He.func(`realTimeVideoStyle.offset ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`realTimeVideoStyle.offset ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(2!=e.realTimeVideoStyle.offset.filter(e=>"number"==typeof e).length)throw He&&He.func(`realTimeVideoStyle.offset ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 2`),new Error(`realTimeVideoStyle.offset ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(p=e.realTimeVideoStyle)||void 0===p?void 0:p.state)){if("string"!=typeof e.realTimeVideoStyle.state)throw He&&He.func(`realTimeVideoStyle.state ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`),new Error(`realTimeVideoStyle.state ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().string}`);if(!li.stateType.find(t=>{var o;return t===(null===(o=e.realTimeVideoStyle)||void 0===o?void 0:o.state)}))throw He&&He.func(`realTimeVideoStyle.state ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().range} ${li.stateType.toString()}`),new Error(`realTimeVideoStyle.state ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().range} ${li.stateType.toString()}`)}if(void 0!==(null===(S=e.realTimeVideoStyle)||void 0===S?void 0:S.overlapOrder)){if("number"!=typeof e.realTimeVideoStyle.overlapOrder)throw He&&He.func(`realTimeVideoStyle.overlapOrder ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().number}`),new Error(`realTimeVideoStyle.overlapOrder ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().number}`);if(e.realTimeVideoStyle.overlapOrder<1||e.realTimeVideoStyle.overlapOrder>10)throw He&&He.func(`realTimeVideoStyle.overlapOrder ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().range} 1 ~ 10`),new Error(`realTimeVideoStyle.overlapOrder ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().range} 1 ~ 10`)}if(void 0!==(null===(T=e.realTimeVideoStyle)||void 0===T?void 0:T.bokeh)){if("number"!=typeof e.realTimeVideoStyle.bokeh)throw He&&He.func(`realTimeVideoStyle.bokeh ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().number}`),new Error(`realTimeVideoStyle.bokeh ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().number}`);if(e.realTimeVideoStyle.bokeh<0||e.realTimeVideoStyle.bokeh>1)throw He&&He.func(`realTimeVideoStyle.bokeh ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().range} 0 ~ 1`),new Error(`realTimeVideoStyle.bokeh ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().range} 0 ~ 1`)}if(void 0!==(null===(x=e.realTimeVideoStyle)||void 0===x?void 0:x.cornerShift)){if("object"!=typeof e.realTimeVideoStyle.cornerShift||void 0===e.realTimeVideoStyle.cornerShift.length)throw He&&He.func(`realTimeVideoStyle.cornerShift ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().array}`),new Error(`realTimeVideoStyle.cornerShift ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().array}`);if(4!=e.realTimeVideoStyle.cornerShift.length)throw He&&He.func(`realTimeVideoStyle.cornerShift ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().arrayLength} 4`),new Error(`realTimeVideoStyle.cornerShift ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().arrayLength} 4`);e.realTimeVideoStyle.cornerShift.forEach(e=>{var t,o;if(2!=e.filter(e=>"number"==typeof e).length)throw He&&He.func(`The value of realTimeVideoStyle.cornerShift ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of realTimeVideoStyle.cornerShift ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().arrayNumberLength} 2`)})}if(void 0!==(null===(k=e.realTimeVideoStyle)||void 0===k?void 0:k.bgUrl)&&"string"!=typeof e.realTimeVideoStyle.bgUrl)throw He&&He.func(`realTimeVideoStyle.bgUrl ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().string}`),new Error(`realTimeVideoStyle.bgUrl ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().string}`);if(void 0!==(null===(U=e.realTimeVideoStyle)||void 0===U?void 0:U.bgPadding)){if("object"!=typeof e.realTimeVideoStyle.bgPadding||void 0===e.realTimeVideoStyle.bgPadding.length)throw He&&He.func(`realTimeVideoStyle.bgPadding ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().array}`),new Error(`realTimeVideoStyle.bgPadding ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().array}`);if(4!==e.realTimeVideoStyle.bgPadding.length&&1!==e.realTimeVideoStyle.bgPadding.length&&2!==e.realTimeVideoStyle.bgPadding.length)throw He&&He.func(`realTimeVideoStyle.bgPadding ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().arrayLength} 1 or 2 or 4`),new Error(`realTimeVideoStyle.bgPadding ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().arrayLength} 1 or 2 or 4`);if(e.realTimeVideoStyle.bgPadding.filter(e=>"number"==typeof e).length!==e.realTimeVideoStyle.bgPadding.length)throw He&&He.func(`realTimeVideoStyle.bgPadding ${null===(H=li.getInstance())||void 0===H?void 0:H.GetCommonErr().arrayNumber}`),new Error(`realTimeVideoStyle.bgPadding ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().arrayNumber}`)}if(void 0!==(null===(Y=e.realTimeVideoStyle)||void 0===Y?void 0:Y.bgOverlap)){if("string"!=typeof e.realTimeVideoStyle.bgOverlap)throw He&&He.func(`realTimeVideoStyle.bgOverlap ${null===(Q=li.getInstance())||void 0===Q?void 0:Q.GetCommonErr().string}`),new Error(`realTimeVideoStyle.bgOverlap ${null===(J=li.getInstance())||void 0===J?void 0:J.GetCommonErr().string}`);if(!li.bgOverlapType.find(t=>{var o;return t===(null===(o=e.realTimeVideoStyle)||void 0===o?void 0:o.bgOverlap)}))throw He&&He.func(`realTimeVideoStyle.bgOverlap ${null===(X=li.getInstance())||void 0===X?void 0:X.GetCommonErr().range} ${li.bgOverlapType.toString()}`),new Error(`realTimeVideoStyle.bgOverlap ${null===(K=li.getInstance())||void 0===K?void 0:K.GetCommonErr().range} ${li.bgOverlapType.toString()}`)}if(void 0!==(null===(ee=e.realTimeVideoStyle)||void 0===ee?void 0:ee.labelContent)){if("object"!=typeof e.realTimeVideoStyle.labelContent||void 0===e.realTimeVideoStyle.labelContent.length)throw He&&He.func(`realTimeVideoStyle.labelContent ${null===(te=li.getInstance())||void 0===te?void 0:te.GetCommonErr().array}`),new Error(`realTimeVideoStyle.labelContent ${null===(oe=li.getInstance())||void 0===oe?void 0:oe.GetCommonErr().array}`);if(3!==e.realTimeVideoStyle.labelContent.filter(e=>"string"==typeof e).length)throw He&&He.func(`realTimeVideoStyle.labelContent ${null===(ie=li.getInstance())||void 0===ie?void 0:ie.GetCommonErr().arrayStringLength} 3`),new Error(`realTimeVideoStyle.labelContent ${null===(ne=li.getInstance())||void 0===ne?void 0:ne.GetCommonErr().arrayStringLength} 3`)}if(void 0!==(null===(re=e.realTimeVideoStyle)||void 0===re?void 0:re.labelOffset)){if("object"!=typeof e.realTimeVideoStyle.labelOffset||void 0===e.realTimeVideoStyle.labelOffset.length)throw He&&He.func(`realTimeVideoStyle.labelOffset ${null===(ae=li.getInstance())||void 0===ae?void 0:ae.GetCommonErr().array}`),new Error(`realTimeVideoStyle.labelOffset ${null===(se=li.getInstance())||void 0===se?void 0:se.GetCommonErr().array}`);if(2!==e.realTimeVideoStyle.labelOffset.length)throw He&&He.func(`realTimeVideoStyle.labelOffset ${null===(le=li.getInstance())||void 0===le?void 0:le.GetCommonErr().arrayLength} 2`),new Error(`realTimeVideoStyle.labelOffset ${null===(de=li.getInstance())||void 0===de?void 0:de.GetCommonErr().arrayLength} 2`);if(e.realTimeVideoStyle.labelOffset.filter(e=>"number"==typeof e).length!==e.realTimeVideoStyle.labelOffset.length)throw He&&He.func(`realTimeVideoStyle.labelOffset ${null===(ce=li.getInstance())||void 0===ce?void 0:ce.GetCommonErr().arrayNumber}`),new Error(`realTimeVideoStyle.labelOffset ${null===(ue=li.getInstance())||void 0===ue?void 0:ue.GetCommonErr().arrayNumber}`)}if(void 0!==(null===(ve=e.realTimeVideoStyle)||void 0===ve?void 0:ve.labelSize)){if("object"!=typeof e.realTimeVideoStyle.labelSize||void 0===e.realTimeVideoStyle.labelSize.length)throw He&&He.func(`realTimeVideoStyle.labelSize ${null===(he=li.getInstance())||void 0===he?void 0:he.GetCommonErr().array}`),new Error(`realTimeVideoStyle.labelSize ${null===(me=li.getInstance())||void 0===me?void 0:me.GetCommonErr().array}`);if(2!==e.realTimeVideoStyle.labelSize.length)throw He&&He.func(`realTimeVideoStyle.labelSize ${null===(ge=li.getInstance())||void 0===ge?void 0:ge.GetCommonErr().arrayLength} 2`),new Error(`realTimeVideoStyle.labelSize ${null===(fe=li.getInstance())||void 0===fe?void 0:fe.GetCommonErr().arrayLength} 2`);if(e.realTimeVideoStyle.labelSize.filter(e=>"number"==typeof e).length!==e.realTimeVideoStyle.labelSize.length)throw He&&He.func(`realTimeVideoStyle.labelSize ${null===(ye=li.getInstance())||void 0===ye?void 0:ye.GetCommonErr().arrayNumber}`),new Error(`realTimeVideoStyle.labelSize ${null===(be=li.getInstance())||void 0===be?void 0:be.GetCommonErr().arrayNumber}`)}if(void 0!==(null===(pe=e.realTimeVideoStyle)||void 0===pe?void 0:pe.labelContentJustification)){if("string"!=typeof e.realTimeVideoStyle.labelContentJustification)throw He&&He.func(`realTimeVideoStyle.labelContentJustification ${null===(Ee=li.getInstance())||void 0===Ee?void 0:Ee.GetCommonErr().string}`),new Error(`realTimeVideoStyle.labelContentJustification ${null===(we=li.getInstance())||void 0===we?void 0:we.GetCommonErr().string}`);if(!li.labelContentJustificationType.find(t=>{var o;return t===(null===(o=e.realTimeVideoStyle)||void 0===o?void 0:o.labelContentJustification)}))throw He&&He.func(`realTimeVideoStyle.labelContentJustification ${null===(Ie=li.getInstance())||void 0===Ie?void 0:Ie.GetCommonErr().range} ${li.labelContentJustificationType.toString()}`),new Error(`realTimeVideoStyle.labelContentJustification ${null===(je=li.getInstance())||void 0===je?void 0:je.GetCommonErr().range} ${li.labelContentJustificationType.toString()}`)}if(void 0!==(null===(Se=e.realTimeVideoStyle)||void 0===Se?void 0:Se.labelContentAutoWrap)&&"boolean"!=typeof e.realTimeVideoStyle.labelContentAutoWrap)throw He&&He.func(`realTimeVideoStyle.labelContentAutoWrap ${null===(Ce=li.getInstance())||void 0===Ce?void 0:Ce.GetCommonErr().boolean}`),new Error(`realTimeVideoStyle.labelContentAutoWrap ${null===(Ge=li.getInstance())||void 0===Ge?void 0:Ge.GetCommonErr().boolean}`);if(void 0!==(null===(Oe=e.realTimeVideoStyle)||void 0===Oe?void 0:Oe.btnNormalUrl)&&"string"!=typeof e.realTimeVideoStyle.btnNormalUrl)throw He&&He.func(`realTimeVideoStyle.btnNormalUrl ${null===($e=li.getInstance())||void 0===$e?void 0:$e.GetCommonErr().string}`),new Error(`realTimeVideoStyle.btnNormalUrl ${null===(Te=li.getInstance())||void 0===Te?void 0:Te.GetCommonErr().string}`);if(void 0!==(null===(Me=e.realTimeVideoStyle)||void 0===Me?void 0:Me.btnActivateUrl)&&"string"!=typeof e.realTimeVideoStyle.btnActivateUrl)throw He&&He.func(`realTimeVideoStyle.btnActivateUrl ${null===(Ae=li.getInstance())||void 0===Ae?void 0:Ae.GetCommonErr().string}`),new Error(`realTimeVideoStyle.btnActivateUrl ${null===(De=li.getInstance())||void 0===De?void 0:De.GetCommonErr().string}`);if(void 0!==(null===(Re=e.realTimeVideoStyle)||void 0===Re?void 0:Re.btnOffset)){if("object"!=typeof e.realTimeVideoStyle.btnOffset||void 0===e.realTimeVideoStyle.btnOffset.length)throw He&&He.func(`realTimeVideoStyle.btnOffset ${null===(xe=li.getInstance())||void 0===xe?void 0:xe.GetCommonErr().array}`),new Error(`realTimeVideoStyle.btnOffset ${null===(Ne=li.getInstance())||void 0===Ne?void 0:Ne.GetCommonErr().array}`);if(2!==e.realTimeVideoStyle.btnOffset.length)throw He&&He.func(`realTimeVideoStyle.btnOffset ${null===(Le=li.getInstance())||void 0===Le?void 0:Le.GetCommonErr().arrayLength} 2`),new Error(`realTimeVideoStyle.btnOffset ${null===(Ve=li.getInstance())||void 0===Ve?void 0:Ve.GetCommonErr().arrayLength} 2`);if(e.realTimeVideoStyle.btnOffset.filter(e=>"number"==typeof e).length!==e.realTimeVideoStyle.btnOffset.length)throw He&&He.func(`realTimeVideoStyle.btnOffset ${null===(Pe=li.getInstance())||void 0===Pe?void 0:Pe.GetCommonErr().arrayNumber}`),new Error(`realTimeVideoStyle.btnOffset ${null===(ke=li.getInstance())||void 0===ke?void 0:ke.GetCommonErr().arrayNumber}`)}if(void 0!==(null===(_e=e.realTimeVideoStyle)||void 0===_e?void 0:_e.btnSize)){if("object"!=typeof e.realTimeVideoStyle.btnSize||void 0===e.realTimeVideoStyle.btnSize.length)throw He&&He.func(`realTimeVideoStyle.btnSize ${null===(Fe=li.getInstance())||void 0===Fe?void 0:Fe.GetCommonErr().array}`),new Error(`realTimeVideoStyle.btnSize ${null===(Ue=li.getInstance())||void 0===Ue?void 0:Ue.GetCommonErr().array}`);if(2!==e.realTimeVideoStyle.btnSize.length)throw He&&He.func(`realTimeVideoStyle.btnSize ${null===(Be=li.getInstance())||void 0===Be?void 0:Be.GetCommonErr().arrayLength} 2`),new Error(`realTimeVideoStyle.btnSize ${null===(qe=li.getInstance())||void 0===qe?void 0:qe.GetCommonErr().arrayLength} 2`);if(e.realTimeVideoStyle.btnSize.filter(e=>"number"==typeof e).length!==e.realTimeVideoStyle.btnSize.length)throw He&&He.func(`realTimeVideoStyle.btnSize ${null===(ze=li.getInstance())||void 0===ze?void 0:ze.GetCommonErr().arrayNumber}`),new Error(`realTimeVideoStyle.btnSize ${null===(We=li.getInstance())||void 0===We?void 0:We.GetCommonErr().arrayNumber}`)}}}}class Ir extends fi{constructor(e){super(e,wr),this.setType("RealTimeVideo")}}class jr extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SpaceHeatMap"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"SpaceHeatMapAPI"}),Object.defineProperty(this,"SpaceHeatMapEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{brushDiameter:3e3,mappingValueRange:[1,100],gradientSetting:["000000","000303","051900","593A00","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="SpaceHeatMap",this.type=Ho.get(this.oType),Ti(this.SpaceHeatMapEntityAtom,this,[],[],[],"spaceHeatMapStyle"),Ti(this.PointValueAtom,this,[],[],[],"points"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.gradientSetting)&&(e.spaceHeatMapStyle.gradientSetting=e.spaceHeatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(this.SpaceHeatMapEntityAtom,e.spaceHeatMapStyle)),void 0!==e.points&&this.handleAtom(this.PointValueAtom,e.points)}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(o.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(o.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(o.EntityOutlinerAtom=a),void 0!==e.spaceHeatMapStyle&&((null===(t=e.spaceHeatMapStyle)||void 0===t?void 0:t.gradientSetting)&&(e.spaceHeatMapStyle.gradientSetting=e.spaceHeatMapStyle.gradientSetting.map(e=>Ei("object"==typeof e?e:ji(e)))),this.handleAtom(l,e.spaceHeatMapStyle)),Object.keys(l).length>0&&(o.SpaceHeatMapEntityAtom=l),void 0!==e.points&&void 0!==e.points.features&&(s.features=e.points.features),Object.keys(s).length>0&&(o.PointValueAtom=s),o}Modify(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};const t=yield this.StartApi(this.apiClassName,"ModifySpaceHeatMap",Object.assign({eid:this.eid},e));return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{spaceHeatMapStyle:this.SpaceHeatMapEntityAtom,points:this.PointValueAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j;const S=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw S&&S.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const C=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===C[e])throw S&&S.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 S&&S.func(`spaceHeatMapStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`spaceHeatMapStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.SpaceHeatMapEntityAtom;if(Object.keys(e.spaceHeatMapStyle).forEach(e=>{var o,i;if(void 0===t[e])throw S&&S.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.spaceHeatMapStyle)||void 0===a?void 0:a.brushDiameter)&&("number"!=typeof e.spaceHeatMapStyle.brushDiameter||e.spaceHeatMapStyle.brushDiameter<0))throw S&&S.func(`spaceHeatMapStyle.brushDiameter ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().positiveNumber}`),new Error(`spaceHeatMapStyle.brushDiameter ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().positiveNumber}`);if(void 0!==(null===(d=e.spaceHeatMapStyle)||void 0===d?void 0:d.mappingValueRange)){if("object"!=typeof e.spaceHeatMapStyle.mappingValueRange||void 0===e.spaceHeatMapStyle.mappingValueRange.length)throw S&&S.func(`spaceHeatMapStyle.mappingValueRange ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`),new Error(`spaceHeatMapStyle.mappingValueRange ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`);if(2!=e.spaceHeatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw S&&S.func(`spaceHeatMapStyle.mappingValueRange ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayNumberLength} 2`),new Error(`spaceHeatMapStyle.mappingValueRange ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null===(m=e.spaceHeatMapStyle)||void 0===m?void 0:m.gradientSetting)){if("object"!=typeof e.spaceHeatMapStyle.gradientSetting||void 0===e.spaceHeatMapStyle.gradientSetting.length)throw S&&S.func(`spaceHeatMapStyle.gradientSetting ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`spaceHeatMapStyle.gradientSetting ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(5!=e.spaceHeatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw S&&S.func(`spaceHeatMapStyle.gradientSetting ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayHEXALength} 5`),new Error(`spaceHeatMapStyle.gradientSetting ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayHEXALength} 5`)}}if(void 0!==e.points){if("object"!=typeof e.points)throw S&&S.func(`points ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().object}`),new Error(`points ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().object}`);if(void 0!==(null===(w=e.points)||void 0===w?void 0:w.features)){if("object"!=typeof e.points.features||void 0===e.points.features.length)throw S&&S.func(`points.features ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().array}`),new Error(`points.features ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().array}`);e.points.features.forEach(e=>{var t,o,i,n,r,a,s,l,d,c;if("object"!=typeof e)throw S&&S.func(`the value of points.features ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`the value of points.features ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);if(void 0===e.point||void 0===e.value)throw S&&S.func(`the value(point and value) of points.features ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`the value(point and value) of points.features ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if(Object.keys(e).forEach(e=>{var t,o;if("point"!==e&&"value"!==e)throw S&&S.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"object"!=typeof e.point||void 0===e.point.length)throw S&&S.func(`the point of points.features ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`the point of points.features ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(3!==e.point.filter(e=>"number"==typeof e).length)throw S&&S.func(`the point of points.features ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw S&&S.func(`the value of points.features ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`the value of points.features ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)})}}}}class Sr extends fi{constructor(e){super(e,jr),this.setType("SpaceHeatMap")}}class Cr extends $i{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,offset:{left:0,forward:0,up:0},rotator:{pitch:0,yaw:0,roll:0},state:"play",pathUpdatePoints:[]}}),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=Ho.get(this.oType),Ti(this.MoveAlongPathEntityAtom,this,["bLoop","bReverse"],["movingEid","pathEid","offset","rotator"],[],"columnarHeatMapStyle"),Ti(this.MoveAlongPathEntityAtom,this,[],["movingEid","pathEid","time","bLoop","bReverse","state","pathUpdatePoints"],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0: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})}GetMoving(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pathObj}})}SetMoving(e){return t(this,void 0,void 0,function*(){return yield this.Update({moving:e})})}GetPath(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pathObj}})}SetPath(e){return t(this,void 0,void 0,function*(){return yield this.Update({path:e})})}GetScheme(){return{MoveAlongPathEntityAtom:this.MoveAlongPathEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),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,state:this.MoveAlongPathEntityAtom.state,pathUpdatePoints:this.MoveAlongPathEntityAtom.pathUpdatePoints}})}SetData(e){var t,o,i,n,r,a;this.setEid(e),this.setBasicData(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?void 0:t.left)&&(this.MoveAlongPathEntityAtom.offset.left=e.offset.left),void 0!==(null===(o=e.offset)||void 0===o?void 0:o.forward)&&(this.MoveAlongPathEntityAtom.offset.forward=e.offset.forward),void 0!==(null===(i=e.offset)||void 0===i?void 0:i.up)&&(this.MoveAlongPathEntityAtom.offset.up=e.offset.up)),void 0!==e.rotator&&(void 0!==(null===(n=e.rotator)||void 0===n?void 0:n.pitch)&&(this.MoveAlongPathEntityAtom.rotator.pitch=e.rotator.pitch),void 0!==(null===(r=e.rotator)||void 0===r?void 0:r.yaw)&&(this.MoveAlongPathEntityAtom.rotator.yaw=e.rotator.yaw),void 0!==(null===(a=e.rotator)||void 0===a?void 0:a.roll)&&(this.MoveAlongPathEntityAtom.rotator.roll=e.rotator.roll)),void 0!==e.boundStyle&&this.handleAtom(this.MoveAlongPathEntityAtom,e.boundStyle)}generateAtomData(e){var t,o,i,n,r,a;const s={},l={},d={},c={},u={},v={};return this.handleBasicAtom(l,e),Object.keys(l).length>0&&(s.BasicInfoAtom=l),this.handleVisibleAtom(d,e),Object.keys(d).length>0&&(s.VisibleAtom=d),this.handleLockedAtom(c,e),Object.keys(c).length>0&&(s.EntityFlagAtom=c),this.handleEntityOutlinerAtom(u,e),Object.keys(u).length>0&&(s.EntityOutlinerAtom=u),void 0!==e.moving&&(v.movingEid=e.moving.eid),void 0!==e.path&&(v.pathEid=e.path.eid),void 0!==e.offset&&(v.offset=this.MoveAlongPathEntityAtom.offset,void 0!==(null===(t=e.offset)||void 0===t?void 0:t.left)&&(v.offset.left=e.offset.left),void 0!==(null===(o=e.offset)||void 0===o?void 0:o.forward)&&(v.offset.forward=e.offset.forward),void 0!==(null===(i=e.offset)||void 0===i?void 0:i.up)&&(v.offset.up=e.offset.up)),void 0!==e.rotator&&(v.rotator=this.MoveAlongPathEntityAtom.rotator,void 0!==(null===(n=e.rotator)||void 0===n?void 0:n.pitch)&&(v.rotator.pitch=e.rotator.pitch),void 0!==(null===(r=e.rotator)||void 0===r?void 0:r.yaw)&&(v.rotator.yaw=e.rotator.yaw),void 0!==(null===(a=e.rotator)||void 0===a?void 0:a.roll)&&(v.rotator.roll=e.rotator.roll)),void 0!==e.boundStyle&&this.handleAtom(v,e.boundStyle),Object.keys(v).length>0&&(s.MoveAlongPathEntityAtom=v),s}generateObjectData(e,t=this.atomObj){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?this.generateObjectData(e[o],t[o]):(t[o]=e[o],"movingEid"===o&&(this.movingObj=this.obj.ObjectEidMap.get(`${e[o]}`)),"pathEid"===o&&(this.pathObj=this.obj.ObjectEidMap.get(`${e[o]}`))))})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),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,state:this.MoveAlongPathEntityAtom.state,pathUpdatePoints:this.MoveAlongPathEntityAtom.pathUpdatePoints}})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te;const oe=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw oe&&oe.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const ie=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===ie[e])throw oe&&oe.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),e.eid&&this.validateEid(e.eid),e.entityName&&this.validateEntityName(e.entityName),e.customId&&this.validateCustomId(e.customId),void 0!==e.moving&&"object"!=typeof e.moving)throw oe&&oe.func(`moving ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`moving ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if(void 0!==e.path&&"object"!=typeof e.path)throw oe&&oe.func(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`path ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if(void 0!==e.offset){if("object"!=typeof e.offset)throw oe&&oe.func(`offset ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`),new Error(`offset ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`);const t=this.MoveAlongPathEntityAtom.offset;if(Object.keys(e.offset).forEach(e=>{var o,i;if(void 0===t[e])throw oe&&oe.func(`offset.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`offset.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(c=e.offset)||void 0===c?void 0:c.left)&&"number"!=typeof e.offset.left)throw oe&&oe.func(`offset.left ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`offset.left ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(void 0!==(null===(h=e.offset)||void 0===h?void 0:h.forward)&&"number"!=typeof e.offset.forward)throw oe&&oe.func(`offset.forward ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`),new Error(`offset.forward ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`);if(void 0!==(null===(f=e.offset)||void 0===f?void 0:f.up)&&"number"!=typeof e.offset.up)throw oe&&oe.func(`offset.up ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`),new Error(`offset.up ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`)}if(void 0!==e.rotator){if("object"!=typeof e.rotator)throw oe&&oe.func(`rotator ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().object}`),new Error(`rotator ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().object}`);const t=this.MoveAlongPathEntityAtom.rotator;if(Object.keys(e.rotator).forEach(e=>{var o,i;if(void 0===t[e])throw oe&&oe.func(`rotator.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotator.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(w=e.rotator)||void 0===w?void 0:w.pitch)&&("number"!=typeof e.rotator.pitch||e.rotator.pitch<-180||e.rotator.pitch>180))throw oe&&oe.func(`rotator.pitch ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}. rotator.pitch ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().range} -180 ~ 180`),new Error(`rotator.pitch ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().number}. rotator.pitch ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().range} -180 ~ 180`);if(void 0!==(null===(G=e.rotator)||void 0===G?void 0:G.yaw)&&("number"!=typeof e.rotator.yaw||e.rotator.yaw<-180||e.rotator.yaw>180))throw oe&&oe.func(`rotator.yaw ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().number}. rotator.yaw ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().range} -180 ~ 180`),new Error(`rotator.yaw ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().number}. rotator.yaw ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().range} -180 ~ 180`);if(void 0!==(null===(A=e.rotator)||void 0===A?void 0:A.roll)&&("number"!=typeof e.rotator.roll||e.rotator.roll<-180||e.rotator.roll>180))throw oe&&oe.func(`rotator.roll ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().number}. rotator.roll ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().range} -180 ~ 180`),new Error(`rotator.roll ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().number}. rotator.roll ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().range} -180 ~ 180`)}if(e.boundStyle){if("object"!=typeof e.boundStyle)throw oe&&oe.func(`boundStyle ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().object}`),new Error(`boundStyle ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().object}`);const t=this.MoveAlongPathEntityAtom;if(Object.keys(e.boundStyle).forEach(e=>{var o,i;if(void 0===t[e])throw oe&&oe.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(P=e.boundStyle)||void 0===P?void 0:P.bLoop)&&"boolean"!=typeof e.boundStyle.bLoop)throw oe&&oe.func(`boundStyle.bLoop ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().boolean}`),new Error(`boundStyle.bLoop ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().boolean}`);if(void 0!==(null===(F=e.boundStyle)||void 0===F?void 0:F.bReverse)&&"boolean"!=typeof e.boundStyle.bReverse)throw oe&&oe.func(`boundStyle.bReverse ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().boolean}`),new Error(`boundStyle.bReverse ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().boolean}`);if(void 0!==(null===(q=e.boundStyle)||void 0===q?void 0:q.time)&&("number"!=typeof e.boundStyle.time||e.boundStyle.time<0))throw oe&&oe.func(`boundStyle.time ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().positiveNumber}`),new Error(`boundStyle.time ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().positiveNumber}`);if(void 0!==(null===(H=e.boundStyle)||void 0===H?void 0:H.state)){if("string"!=typeof e.boundStyle.state)throw oe&&oe.func(`boundStyle.state ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().string}`),new Error(`boundStyle.state ${null===(Y=li.getInstance())||void 0===Y?void 0:Y.GetCommonErr().string}`);if(!li.stateType.find(t=>{var o;return t===(null===(o=e.boundStyle)||void 0===o?void 0:o.state)}))throw oe&&oe.func(`${e.boundStyle.state} is illegal. ${null===(Q=li.getInstance())||void 0===Q?void 0:Q.GetCommonErr().range} ${li.stateType.toString()}`),new Error(`${e.boundStyle.state} is illegal. ${null===(J=li.getInstance())||void 0===J?void 0:J.GetCommonErr().range} ${li.stateType.toString()}`)}if(void 0!==(null===(X=e.boundStyle)||void 0===X?void 0:X.pathUpdatePoints)){if("object"!=typeof e.boundStyle.pathUpdatePoints||null==(null===(K=e.boundStyle.pathUpdatePoints)||void 0===K?void 0:K.length))throw oe&&oe.func(`boundStyle.pathUpdatePoints ${null===(ee=li.getInstance())||void 0===ee?void 0:ee.GetCommonErr().array}`),new Error(`boundStyle.pathUpdatePoints ${null===(te=li.getInstance())||void 0===te?void 0:te.GetCommonErr().array}`);e.boundStyle.pathUpdatePoints.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===(null==e?void 0:e.length))throw oe&&oe.func(`the value of boundStyle.pathUpdatePoints ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of boundStyle.pathUpdatePoints ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw oe&&oe.func(`every value of boundStyle.pathUpdatePoints ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`every value of boundStyle.pathUpdatePoints ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}}}}class Gr extends fi{constructor(e){super(e,Cr),this.setType("Bound")}Get(e){var o,i,n,r;return t(this,void 0,void 0,function*(){if(!e)return{success:!0,result:this.findFromMap()};const t=this.findFromMap(`${e}`);if(t)return{success:!0,result:t};const a=yield this.RequestEntity.GetEntitiesData([`${e}`]);if(!a.success)return{success:!1,message:"Eid is non-existent"};let s=[],l=[];(null===(i=null===(o=a.result.entitiesData[0])||void 0===o?void 0:o.MoveAlongPathEntityAtom)||void 0===i?void 0:i.movingEid)&&(s=yield Xo([a.result.entitiesData[0].MoveAlongPathEntityAtom.movingEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),(null===(r=null===(n=a.result.entitiesData[0])||void 0===n?void 0:n.MoveAlongPathEntityAtom)||void 0===r?void 0:r.pathEid)&&(l=yield Xo([a.result.entitiesData[0].MoveAlongPathEntityAtom.pathEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap));const d=new Cr({eid:e,moving:s[0],path:l[0]});return d.setObj(this.obj),d.generateObjectData(a.result.entitiesData[0]),this.addToMap(`${e}`,{object:d}),{success:a.success,message:a.message,result:{object:d}}})}GenerateObject(e){var o,i,n,r;return t(this,void 0,void 0,function*(){let t=[],a=[];(null===(i=null===(o=e.result.entitiesData[0])||void 0===o?void 0:o.MoveAlongPathEntityAtom)||void 0===i?void 0:i.movingEid)&&(t=yield Xo([e.result.entitiesData[0].MoveAlongPathEntityAtom.movingEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),(null===(r=null===(n=e.result.entitiesData[0])||void 0===n?void 0:n.MoveAlongPathEntityAtom)||void 0===r?void 0:r.pathEid)&&(a=yield Xo([e.result.entitiesData[0].MoveAlongPathEntityAtom.pathEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap));const s=new Cr({eid:e.Eid,moving:t[0],path:a[0]});return s.setObj(this.obj),s.generateObjectData(e),this.addToMap(`${e.Eid}`,{object:s}),{success:!0,message:"",result:{object:s}}})}GetOnly(e){var o,i,n,r;return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`);if(!t)return{success:!1,message:"Eid is illegal"};const a=yield this.RequestEntity.GetEntitiesData([`${e}`]);if(!a.success)return{success:!1,message:"Eid is non-existent"};let s=[],l=[];return(null===(i=null===(o=a.result.entitiesData[0])||void 0===o?void 0:o.MoveAlongPathEntityAtom)||void 0===i?void 0:i.movingEid)&&(s=yield Xo([a.result.entitiesData[0].MoveAlongPathEntityAtom.movingEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),(null===(r=null===(n=a.result.entitiesData[0])||void 0===n?void 0:n.MoveAlongPathEntityAtom)||void 0===r?void 0:r.pathEid)&&(l=yield Xo([a.result.entitiesData[0].MoveAlongPathEntityAtom.pathEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),t.object.SetData({moving:s[0],path:l[0]}),t.object.generateObjectData(a.result.entitiesData[0]),{success:!0}})}}class Or extends Qn{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=Ho.get(this.oType),Ti(this.LightEntityAtom,this,[],[],[{name:"haze_Intensity",newName:"hazeIntensity"}],"lightStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.color)&&(e.lightStyle.color="object"==typeof e.lightStyle.color?Ei(e.lightStyle.color):Ei(ji(e.lightStyle.color))),this.handleAtom(this.LightEntityAtom,e.lightStyle))}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleTransformAtom(n,e),Object.keys(n).length>0&&(o.TransformAtom=n),this.handleVisibleAtom(r,e),Object.keys(r).length>0&&(o.VisibleAtom=r),this.handleLockedAtom(a,e),Object.keys(a).length>0&&(o.EntityFlagAtom=a),this.handleEntityOutlinerAtom(s,e),Object.keys(s).length>0&&(o.EntityOutlinerAtom=s),void 0!==e.lightStyle&&((null===(t=e.lightStyle)||void 0===t?void 0:t.color)&&(e.lightStyle.color="object"==typeof e.lightStyle.color?Ei(e.lightStyle.color):Ei(ji(e.lightStyle.color))),this.handleAtom(l,e.lightStyle)),Object.keys(l).length>0&&(o.LightEntityAtom=l),o}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{lightStyle:this.LightEntityAtom})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D;const R=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw R&&R.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const x=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===x[e])throw R&&R.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 R&&R.func(`lightStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`lightStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.LightEntityAtom;if(Object.keys(e.lightStyle).forEach(e=>{var o,i;if(void 0===t[e])throw R&&R.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.lightStyle)||void 0===a?void 0:a.intensity)){if("number"!=typeof e.lightStyle.intensity)throw R&&R.func(`lightStyle.intensity ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`lightStyle.intensity ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(e.lightStyle.intensity<0||e.lightStyle.intensity>100)throw R&&R.func(`lightStyle.intensity ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} 0 ~ 100`),new Error(`lightStyle.intensity ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} 0 ~ 100`)}if(void 0!==(null===(u=e.lightStyle)||void 0===u?void 0:u.color)&&"string"!=typeof e.lightStyle.color)throw R&&R.func(`lightStyle.color ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().hexa}`),new Error(`lightStyle.color ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().hexa}`);if(void 0!==(null===(m=e.lightStyle)||void 0===m?void 0:m.angle)){if("number"!=typeof e.lightStyle.angle)throw R&&R.func(`lightStyle.angle ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`),new Error(`lightStyle.angle ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`);if(e.lightStyle.angle<0||e.lightStyle.angle>50)throw R&&R.func(`lightStyle.angle ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().range} 0 ~ 50`),new Error(`lightStyle.angle ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} 0 ~ 50`)}if(void 0!==(null===(p=e.lightStyle)||void 0===p?void 0:p.attenuation)&&"number"!=typeof e.lightStyle.attenuation)throw R&&R.func(`lightStyle.attenuation ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`),new Error(`lightStyle.attenuation ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}`);if(void 0!==(null===(I=e.lightStyle)||void 0===I?void 0:I.shadows)&&"boolean"!=typeof e.lightStyle.shadows)throw R&&R.func(`lightStyle.shadows ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().boolean}`),new Error(`lightStyle.shadows ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().boolean}`);if(void 0!==(null===(C=e.lightStyle)||void 0===C?void 0:C.haze)&&"boolean"!=typeof e.lightStyle.haze)throw R&&R.func(`lightStyle.haze ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().boolean}`),new Error(`lightStyle.haze ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().boolean}`);if(void 0!==(null===($=e.lightStyle)||void 0===$?void 0:$.haze_Intensity)){if("number"!=typeof e.lightStyle.haze_Intensity)throw R&&R.func(`lightStyle.haze_Intensity ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().number}`),new Error(`lightStyle.haze_Intensity ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().number}`);if(e.lightStyle.haze_Intensity<0||e.lightStyle.haze_Intensity>100)throw R&&R.func(`lightStyle.haze_Intensity ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().range} 0 ~ 100`),new Error(`lightStyle.haze_Intensity ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().range} 0 ~ 100`)}}}}class $r extends fi{constructor(e){super(e,Or),this.setType("Light")}}class Tr extends ci{constructor(e){super(e),Object.defineProperty(this,"RequestEntity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Range",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Poi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Path",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Text3D",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Particle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"HighlightArea",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"HeatMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ColumnarHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Window",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Viewshed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Parabola",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Raster",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"RoadHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"RealTimeVideo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"SpaceHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Bound",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Light",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"CoveringValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Hn}),this.RequestEntity=new di(e),this.Bound=new Gr(e),this.Range=new Yn(e),this.Poi=new Xn(e),this.Path=new er(e),this.Text3D=new or(e),this.Particle=new nr(e),this.HighlightArea=new ar(e),this.HeatMap=new lr(e),this.ColumnarHeatMap=new cr(e),this.Window=new vr(e),this.Viewshed=new mr(e),this.Parabola=new fr(e),this.Raster=new br(e),this.RoadHeatMap=new Er(e),this.RealTimeVideo=new Ir(e),this.SpaceHeatMap=new Sr(e),this.Light=new $r(e)}ClearByTypes(e){return t(this,void 0,void 0,function*(){if(this.CoveringValidate.validateClearByTypes(e),(e=e.filter(e=>{if(this.obj.RegisterObj.GetTypes().find(t=>t.name===e&&"Covering"===t.category))return e})).length<=0)return{success:!1,message:"Type is empty"};const t=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e)));if(t.success)for(let t=0;t<e.length;t++){const o=this.obj.RegisterObj.GetTypes().find(o=>o.name===e[t]);o&&(yield o.object.ClearCache())}return t})}Clear(){return t(this,void 0,void 0,function*(){const e=this.obj.RegisterObj.GetTypes().filter(e=>"Covering"===e.category),t=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e.name)));return t.success&&(yield this.ClearCache()),t})}ClearCache(){return t(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 Mr{validateClearByTypes(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw d&&d.func(`types ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`types ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e||void 0===e.length)throw d&&d.func(`types ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`types ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw d&&d.func(`types ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`types ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`);e.forEach(e=>{var t,o;if(!Ho.get(e))throw d&&d.func(`types.${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`types.,${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}}}class Ar extends Qn{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:[],bReceivesDecals:!0}}),Object.defineProperty(this,"materialEntities",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.setObjAtom(this),this.oType="Static",this.type=Ho.get(this.oType),Ti(this.AssetAtom,this,[],[],[]),Ti(this.MaterialAtom,this,["bReceivesDecals"],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0: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}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,bReceivesDecals:this.MaterialAtom.bReceivesDecals})}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.bReceivesDecals)&&(this.MaterialAtom.bReceivesDecals=e.bReceivesDecals)}generateAtomData(e){const t={},o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==e.seedId&&(s.seedId=e.seedId),Object.keys(s).length>0&&(t.AssetAtom=s),void 0!==e.changedMaterialInfo&&(l.changedMaterialInfo=e.changedMaterialInfo),void 0!==e.bReceivesDecals&&(l.bReceivesDecals=e.bReceivesDecals),Object.keys(l).length>0&&(t.MaterialAtom=l),t}GetMaterial(){return t(this,void 0,void 0,function*(){if(this.MaterialAtom.changedMaterialInfo.length<=0)return{success:!1,message:"material is empty"};const e=[];for(let t=0;t<this.MaterialAtom.changedMaterialInfo.length;t++){const o=yield this.obj.DataModel.Material.Get(this.MaterialAtom.changedMaterialInfo[t].mIEid);o.success&&e.push(o.result.object)}return this.material=e,{success:!0,message:"",result:this.material}})}GetValidateRules(){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})}Validate(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw a&&a.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const s=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===s[e])throw a&&a.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`seedId ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`)}}class Dr extends fi{constructor(e){super(e,Ar),this.setType("Static")}}class Rr extends Qn{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:[],bReceivesDecals:!0}}),this.setObjAtom(this),this.oType="Hierarchy",this.type=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0: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 t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AssetAtom.seedId}})}SetSeedId(e){return t(this,void 0,void 0,function*(){return yield this.Update({seedId:e})})}GetChangedMaterialInfo(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MaterialAtom.changedMaterialInfo}})}SetChangedMaterialInfo(e){return t(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){const t={},o={},i={},n={},r={},a={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),e.seedId&&(a.seedId=e.seedId),Object.keys(a).length>0&&(t.AssetAtom=a),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedId:this.AssetAtom.seedId})}Validate(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw a&&a.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const s=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===s[e])throw a&&a.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`seedId ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`)}}class xr extends fi{constructor(e){super(e,Rr),this.setType("Hierarchy")}}class Nr extends Qn{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:[],bReceivesDecals:!0}}),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=Ho.get(this.oType),Ti(this.AssetAtom,this,[],[],[]),Ti(this.SkeletalMeshAtom,this,["bPause","bLoop"],[],[]),Ti(this.MaterialAtom,this,["bReceivesDecals"],[],[]),Ti(this.operations,this,[],[],[]),Ti(this.extraQueryInfo,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0: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}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,bReceivesDecals:this.MaterialAtom.bReceivesDecals,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.bReceivesDecals)&&(this.MaterialAtom.bReceivesDecals=e.bReceivesDecals),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){const t={},o={},i={},n={},r={},a={},s={},l={},d={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==(null==e?void 0:e.seedId)&&(l.seedId=e.seedId),Object.keys(l).length>0&&(t.AssetAtom=l),void 0!==(null==e?void 0:e.animSequenceIndex)&&(s.animSequenceIndex=e.animSequenceIndex),void 0!==(null==e?void 0:e.bPause)&&(s.bPause=e.bPause),void 0!==(null==e?void 0:e.bLoop)&&(s.bLoop=e.bLoop),void 0!==(null==e?void 0:e.playRate)&&(s.playRate=e.playRate),void 0!==(null==e?void 0:e.playInterval)&&(s.playInterval=e.playInterval),void 0!==(null==e?void 0:e.animSequences)&&(s.animSequences=e.animSequences),Object.keys(s).length>0&&(t.SkeletalMeshAtom=s),void 0!==e.changedMaterialInfo&&(d.changedMaterialInfo=e.changedMaterialInfo),void 0!==e.bReceivesDecals&&(d.bReceivesDecals=e.bReceivesDecals),Object.keys(d).length>0&&(t.MaterialAtom=d),t}GetMaterial(){return t(this,void 0,void 0,function*(){if(this.MaterialAtom.changedMaterialInfo.length<=0)return{success:!1,message:"material is empty"};const e=[];for(let t=0;t<this.MaterialAtom.changedMaterialInfo.length;t++){const o=yield this.obj.DataModel.Material.Get(this.MaterialAtom.changedMaterialInfo[t].mIEid);o.success&&e.push(o.result.object)}return this.material=e,{success:!0,message:"",result:this.material}})}generateObjectData(e,t=this){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?"animSequenceLength"===o?t[o]=e[o]:this.generateObjectData(e[o],t[o]):t[o]=e[o])})}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,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p;const E=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw E&&E.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const w=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===w[e])throw E&&E.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 E&&E.func(`seedId ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`seedId ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(void 0!==e.animSequenceIndex&&("number"!=typeof e.animSequenceIndex||e.animSequenceIndex<0))throw E&&E.func(`animSequenceIndex ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().positiveNumber}`),new Error(`animSequenceIndex ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().positiveNumber}`);if(void 0!==e.playRate&&("number"!=typeof e.playRate||e.playRate<0))throw E&&E.func(`playRate ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().positiveNumber}`),new Error(`playRate ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().positiveNumber}`);if(void 0!==e.bPause&&"boolean"!=typeof e.bPause)throw E&&E.func(`bPause ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`),new Error(`bPause ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`);if(void 0!==e.bLoop&&"boolean"!=typeof e.bLoop)throw E&&E.func(`bLoop ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`),new Error(`bLoop ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`);if(void 0!==e.animSequences){if("object"!=typeof e.animSequences||void 0===e.animSequences.length)throw E&&E.func(`animSequences ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().array}`),new Error(`animSequences ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`);if(e.animSequences.filter(e=>"string"==typeof e).length!==e.animSequences.length)throw E&&E.func(`animSequences value ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().string}`),new Error(`animSequences value ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().string}`)}if(void 0!==e.playInterval){if("object"!=typeof e.playInterval)throw E&&E.func(`playInterval ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().object}`),new Error(`playInterval ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().object}`);const t=this.SkeletalMeshAtom.playInterval;Object.keys(e.playInterval).forEach(e=>{var o,i;if(void 0===t[e])throw E&&E.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`playInterval.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)})}}}class Lr extends fi{constructor(e){super(e,Nr),this.setType("Skeletal")}}class Vr{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(e,o){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"RemoveRegion"},i={eid:e,indexArray:o};return yield this.obj.startApi(t,i)})}UpdateRegionName(e,o){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"UpdateRegionName"},i={eid:e,indexAndNameArray:o};return yield this.obj.startApi(t,i)})}ToggleRegion(e,o){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"ToggleRegion"},i={eid:e,indexAndSwitchArray:o};return yield this.obj.startApi(t,i)})}QueryRegion(e){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"QueryRegion"},o={eid:e};return yield this.obj.startApi(t,o)})}}class Pr extends Qn{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=Ho.get(this.oType),Ti(this.RelativePolygon2DAtom,this,[],[],[]),Ti(this.VegetationAssetsAtom,this,[],[],[]),Ti(this.VegetationAssetsTemp,this,["bUseIndividualZOffset"],[],[]),Ti(this.VegetationAtom,this,["zOffset"],[],[],"vegetationStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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&&this.handleAtom(this.VegetationAtom,e.vegetationStyle),e.coordinates&&(this.RelativePolygon2DAtom.coordinates=e.coordinates),e.assets&&(this.VegetationAssetsAtom.assets=e.assets)}generateAtomData(e){const t={},o={},i={},n={},r={},a={},s={},l={},d={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==e.vegetationStyle&&this.handleAtom(s,e.vegetationStyle),Object.keys(s).length>0&&(t.VegetationAtom=s),void 0!==e.coordinates&&(l.coordinates=e.coordinates),Object.keys(l).length>0&&(t.RelativePolygon2DAtom=l),void 0!==e.assets&&(d.assets=e.assets),Object.keys(d).length>0&&(t.VegetationAssetsAtom=d),t}RemoveRegion(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`indexArray ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`indexArray ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"number"==typeof e).length!==e.length)throw t&&t.func(`The value of indexArray ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumber}`),new Error(`The value of indexArray ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumber}`)}return yield new Vr(this.obj).RemoveRegion(this.eid,e)})}UpdateRegionName(e){var o,i,n,r;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`indexAndNameArray ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`indexAndNameArray ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`)}return yield new Vr(this.obj).UpdateRegionName(this.eid,e)})}ToggleRegion(e){var o,i,n,r;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`indexAndSwitchArray ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`indexAndSwitchArray ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`)}return yield new Vr(this.obj).ToggleRegion(this.eid,e)})}QueryRegion(){return t(this,void 0,void 0,function*(){return yield new Vr(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(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te,oe,ie,ne,re,ae;const se=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw se&&se.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const le=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===le[e])throw se&&se.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.vegetationStyle){if("object"!=typeof e.vegetationStyle)throw se&&se.func(`vegetationStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`vegetationStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.VegetationAtom;if(Object.keys(e.vegetationStyle).forEach(e=>{var o,i;if(void 0===t[e])throw se&&se.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`vegetationStyle.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.vegetationStyle)||void 0===a?void 0:a.randomSeed)&&("number"!=typeof e.vegetationStyle.randomSeed||e.vegetationStyle.randomSeed<0))throw se&&se.func(`vegetationStyle.randomSeed ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().positiveNumber}`),new Error(`vegetationStyle.randomSeed ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().positiveNumber}`);if(void 0!==(null===(d=e.vegetationStyle)||void 0===d?void 0:d.snapMode)){if("string"!=typeof e.vegetationStyle.snapMode)throw se&&se.func(`vegetationStyle.snapMode ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`),new Error(`vegetationStyle.snapMode ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`);if(!li.snapModeType.find(t=>{var o;return t===(null===(o=e.vegetationStyle)||void 0===o?void 0:o.snapMode)}))throw se&&se.func(`vegetationStyle.snapMode ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().range} ${li.snapModeType.toString()}`),new Error(`vegetationStyle.snapMode ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} ${li.snapModeType.toString()}`)}if(void 0!==(null===(m=e.vegetationStyle)||void 0===m?void 0:m.zOffset)&&"number"!=typeof e.vegetationStyle.zOffset)throw se&&se.func(`vegetationStyle.zOffset ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`),new Error(`vegetationStyle.zOffset ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`);if(void 0!==(null===(y=e.vegetationStyle)||void 0===y?void 0:y.samplerType)){if("string"!=typeof e.vegetationStyle.samplerType)throw se&&se.func(`vegetationStyle.samplerType ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().string}`),new Error(`vegetationStyle.samplerType ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().string}`);if(!li.samplerType.find(t=>{var o;return t===(null===(o=e.vegetationStyle)||void 0===o?void 0:o.samplerType)}))throw se&&se.func(`vegetationStyle.samplerType ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().range} ${li.samplerType.toString()}`),new Error(`vegetationStyle.samplerType ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} ${li.samplerType.toString()}`)}if(void 0!==(null===(I=e.vegetationStyle)||void 0===I?void 0:I.gridType)){if("string"!=typeof e.vegetationStyle.gridType)throw se&&se.func(`vegetationStyle.gridType ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().string}`),new Error(`vegetationStyle.gridType ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().string}`);if(!li.gridType.find(t=>{var o;return t===(null===(o=e.vegetationStyle)||void 0===o?void 0:o.gridType)}))throw se&&se.func(`vegetationStyle.gridType ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().range} ${li.gridType.toString()}`),new Error(`vegetationStyle.gridType ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().range} ${li.gridType.toString()}`)}if(void 0!==(null===(O=e.vegetationStyle)||void 0===O?void 0:O.lineSpace)&&"number"!=typeof e.vegetationStyle.lineSpace)throw se&&se.func(`vegetationStyle.lineSpace ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().number}`),new Error(`vegetationStyle.lineSpace ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().number}`);if(void 0!==(null===(M=e.vegetationStyle)||void 0===M?void 0:M.randomness)&&"number"!=typeof e.vegetationStyle.randomness)throw se&&se.func(`vegetationStyle.randomness ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().number}`),new Error(`vegetationStyle.randomness ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().number}`);if(void 0!==(null===(R=e.vegetationStyle)||void 0===R?void 0:R.rowNum)&&("number"!=typeof e.vegetationStyle.rowNum||e.vegetationStyle.rowNum<0))throw se&&se.func(`vegetationStyle.rowNum ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().positiveNumber}`),new Error(`vegetationStyle.rowNum ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().positiveNumber}`);if(void 0!==(null===(L=e.vegetationStyle)||void 0===L?void 0:L.columnNum)&&("number"!=typeof e.vegetationStyle.columnNum||e.vegetationStyle.columnNum<0))throw se&&se.func(`vegetationStyle.columnNum ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().positiveNumber}`),new Error(`vegetationStyle.columnNum ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().positiveNumber}`);if(void 0!==(null===(k=e.vegetationStyle)||void 0===k?void 0:k.rowSpace)&&"number"!=typeof e.vegetationStyle.rowSpace)throw se&&se.func(`vegetationStyle.rowSpace ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().number}`),new Error(`vegetationStyle.rowSpace ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().number}`);if(void 0!==(null===(U=e.vegetationStyle)||void 0===U?void 0:U.columnSpace)&&"number"!=typeof e.vegetationStyle.columnSpace)throw se&&se.func(`vegetationStyle.columnSpace ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().number}`),new Error(`vegetationStyle.columnSpace ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().number}`);if(void 0!==(null===(z=e.vegetationStyle)||void 0===z?void 0:z.density)&&("number"!=typeof e.vegetationStyle.density||e.vegetationStyle.density<0))throw se&&se.func(`vegetationStyle.density ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().positiveNumber}`),new Error(`vegetationStyle.density ${null===(H=li.getInstance())||void 0===H?void 0:H.GetCommonErr().positiveNumber}`);if(void 0!==(null===(Z=e.vegetationStyle)||void 0===Z?void 0:Z.clusterRatio)&&("number"!=typeof e.vegetationStyle.clusterRatio||e.vegetationStyle.clusterRatio<0))throw se&&se.func(`vegetationStyle.clusterRatio ${null===(Y=li.getInstance())||void 0===Y?void 0:Y.GetCommonErr().positiveNumber}`),new Error(`vegetationStyle.clusterRatio ${null===(Q=li.getInstance())||void 0===Q?void 0:Q.GetCommonErr().positiveNumber}`);if(void 0!==(null===(J=e.vegetationStyle)||void 0===J?void 0:J.pointZs)&&("object"!=typeof e.vegetationStyle.pointZs||void 0===e.vegetationStyle.pointZs.length))throw se&&se.func(`vegetationStyle.pointZs ${null===(X=li.getInstance())||void 0===X?void 0:X.GetCommonErr().array}`),new Error(`vegetationStyle.pointZs ${null===(K=li.getInstance())||void 0===K?void 0:K.GetCommonErr().array}`);if(void 0!==(null===(ee=e.vegetationStyle)||void 0===ee?void 0:ee.cullRegions)&&("object"!=typeof e.vegetationStyle.cullRegions||void 0===e.vegetationStyle.cullRegions.length))throw se&&se.func(`vegetationStyle.cullRegions ${null===(te=li.getInstance())||void 0===te?void 0:te.GetCommonErr().array}`),new Error(`vegetationStyle.cullRegions ${null===(oe=li.getInstance())||void 0===oe?void 0:oe.GetCommonErr().array}`)}if(void 0!==e.coordinates){if("object"!=typeof e.coordinates||void 0===e.coordinates.length)throw se&&se.func(`coordinates ${null===(ie=li.getInstance())||void 0===ie?void 0:ie.GetCommonErr().array}`),new Error(`coordinates ${null===(ne=li.getInstance())||void 0===ne?void 0:ne.GetCommonErr().array}`);e.coordinates.forEach(e=>{var t,o;if("object"!=typeof e||void 0===e.length)throw se&&se.func(`coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw se&&se.func(`the value of coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`the value of coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw se&&se.func(`the value of coordinates value's ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of coordinates value's ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})})}if(void 0!==e.assets){if("object"!=typeof e.assets||void 0===e.assets.length)throw se&&se.func(`assets ${null===(re=li.getInstance())||void 0===re?void 0:re.GetCommonErr().array}`),new Error(`assets ${null===(ae=li.getInstance())||void 0===ae?void 0:ae.GetCommonErr().array}`);e.assets.forEach(e=>{var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S;if("object"!=typeof e)throw se&&se.func(`assets value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`assets value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);const C=this.VegetationAssetsTemp;if(Object.keys(e).forEach(e=>{var t,o;if(void 0===C[e])throw se&&se.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`assets.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.SeedId)&&"string"!=typeof e.SeedId)throw se&&se.func(`SeedId of assets value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`SeedId of assets value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.Ratio)&&("number"!=typeof e.Ratio||e.Ratio<0))throw se&&se.func(`Ratio of assets value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().positiveNumber}`),new Error(`Ratio of assets value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().positiveNumber}`);if(void 0!==(null==e?void 0:e.OverlapRatio)&&("number"!=typeof e.OverlapRatio||e.OverlapRatio<0))throw se&&se.func(`OverlapRatio of assets value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().positiveNumber}`),new Error(`OverlapRatio of assets value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().positiveNumber}`);if(void 0!==(null==e?void 0:e.RandomScaleRange)){if("object"!=typeof e.RandomScaleRange||void 0===e.RandomScaleRange.length)throw se&&se.func(`RandomScaleRange of assets value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`RandomScaleRange of assets value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(2!==e.RandomScaleRange.filter(e=>"number"==typeof e&&e>=0&&e<=1).length)throw se&&se.func(`RandomScaleRange of assets value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().range} 0 ~ 1`),new Error(`RandomScaleRange of assets value ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} 0 ~ 1`)}if(void 0!==(null==e?void 0:e.RandomRotateRange)){if("object"!=typeof e.RandomRotateRange||void 0===e.RandomRotateRange.length)throw se&&se.func(`RandomRotateRange of assets value ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`RandomRotateRange of assets value ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(2!==e.RandomRotateRange.filter(e=>"number"==typeof e&&e>=-360&&e<=360).length)throw se&&se.func(`RandomScaleRange of assets value ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} -360 ~ 360`),new Error(`RandomScaleRange of assets value ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().range} -360 ~ 360`)}if(void 0!==(null==e?void 0:e.bUseIndividualZOffset)&&"boolean"!=typeof e.bUseIndividualZOffset)throw se&&se.func(`bUseIndividualZOffset of assets value ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().boolean}`),new Error(`bUseIndividualZOffset of assets value ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.IndividualZOffset)&&("number"!=typeof e.IndividualZOffset||e.IndividualZOffset<0))throw se&&se.func(`IndividualZOffset of assets value ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().positiveNumber}`),new Error(`IndividualZOffset of assets value ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().positiveNumber}`)})}}}class kr extends fi{constructor(e){super(e,Pr),this.setType("Vegetation")}}class _r extends Qn{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=Ho.get(this.oType),Ti(this.ModelerEmbankPolylineAtom,this,["bClosed"],[],[]),Ti(this.ModelerEmbankAtom,this,["bReverseSide","bTwoSide","bUseVertexCorner","bUseVertexSideScale","bUseVertexWidth"],[],[],"modelerEmbankStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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&&this.handleAtom(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){const t={},o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==e.modelerEmbankStyle&&this.handleAtom(s,e.modelerEmbankStyle),Object.keys(s).length>0&&(t.ModelerEmbankAtom=s),void 0!==e.coordinates&&(l.coordinates=e.coordinates),void 0!==e.attributes&&(l.attributes=e.attributes),void 0!==e.bClosed&&(l.bClosed=e.bClosed),Object.keys(l).length>0&&(t.ModelerEmbankPolylineAtom=l),t}GetValidateRules(){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)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te,oe,ie,ne,re,ae,se,le,de,ce,ue,ve,he,me;const ge=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw ge&&ge.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const fe=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===fe[e])throw ge&&ge.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.modelerEmbankStyle){if("object"!=typeof e.modelerEmbankStyle)throw ge&&ge.func(`modelerEmbankStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`modelerEmbankStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.ModelerEmbankAtom;if(Object.keys(e.modelerEmbankStyle).forEach(e=>{var o,i;if(void 0===t[e])throw ge&&ge.func(`modelerEmbankStyle.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerEmbankStyle.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.modelerEmbankStyle)||void 0===a?void 0:a.baseType)){if("string"!=typeof e.modelerEmbankStyle.baseType)throw ge&&ge.func(`modelerEmbankStyle.baseType ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`modelerEmbankStyle.baseType ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(!li.baseType.find(t=>{var o;return t===(null===(o=e.modelerEmbankStyle)||void 0===o?void 0:o.baseType)}))throw ge&&ge.func(`modelerEmbankStyle.baseType ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} ${li.baseType.toString()}`),new Error(`modelerEmbankStyle.baseType ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.baseType.toString()}`)}if(void 0!==(null===(u=e.modelerEmbankStyle)||void 0===u?void 0:u.baseWidth)&&("number"!=typeof e.modelerEmbankStyle.baseWidth||e.modelerEmbankStyle.baseWidth<0))throw ge&&ge.func(`modelerEmbankStyle.baseWidth ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().positiveNumber}`),new Error(`modelerEmbankStyle.baseWidth ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().positiveNumber}`);if(void 0!==(null===(m=e.modelerEmbankStyle)||void 0===m?void 0:m.baseHeight)&&("number"!=typeof e.modelerEmbankStyle.baseHeight||e.modelerEmbankStyle.baseHeight<0))throw ge&&ge.func(`modelerEmbankStyle.baseHeight ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().positiveNumber}`),new Error(`modelerEmbankStyle.baseHeight ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().positiveNumber}`);if(void 0!==(null===(y=e.modelerEmbankStyle)||void 0===y?void 0:y.sideType)){if("string"!=typeof e.modelerEmbankStyle.sideType)throw ge&&ge.func(`modelerEmbankStyle.sideType ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().string}`),new Error(`modelerEmbankStyle.sideType ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().string}`);if(!li.sideType.find(t=>{var o;return t===(null===(o=e.modelerEmbankStyle)||void 0===o?void 0:o.sideType)}))throw ge&&ge.func(`modelerEmbankStyle.sideType ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().range} ${li.sideType.toString()}`),new Error(`modelerEmbankStyle.sideType ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} ${li.sideType.toString()}`)}if(void 0!==(null===(I=e.modelerEmbankStyle)||void 0===I?void 0:I.sideWidth)&&("number"!=typeof e.modelerEmbankStyle.sideWidth||e.modelerEmbankStyle.sideWidth<0))throw ge&&ge.func(`modelerEmbankStyle.sideWidth ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().positiveNumber}`),new Error(`modelerEmbankStyle.sideWidth ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().positiveNumber}`);if(void 0!==(null===(C=e.modelerEmbankStyle)||void 0===C?void 0:C.sideWidthScale)&&("number"!=typeof e.modelerEmbankStyle.sideWidthScale||e.modelerEmbankStyle.sideWidthScale<0))throw ge&&ge.func(`modelerEmbankStyle.sideWidthScale ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().positiveNumber}`),new Error(`modelerEmbankStyle.sideWidthScale ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().positiveNumber}`);if(void 0!==(null===($=e.modelerEmbankStyle)||void 0===$?void 0:$.bReverseSide)&&"boolean"!=typeof e.modelerEmbankStyle.bReverseSide)throw ge&&ge.func(`modelerEmbankStyle.bReverseSide ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().boolean}`),new Error(`modelerEmbankStyle.bReverseSide ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().boolean}`);if(void 0!==(null===(A=e.modelerEmbankStyle)||void 0===A?void 0:A.bTwoSide)&&"boolean"!=typeof e.modelerEmbankStyle.bTwoSide)throw ge&&ge.func(`modelerEmbankStyle.bTwoSide ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().boolean}`),new Error(`modelerEmbankStyle.bTwoSide ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().boolean}`);if(void 0!==(null===(x=e.modelerEmbankStyle)||void 0===x?void 0:x.fenceType)){if("string"!=typeof e.modelerEmbankStyle.fenceType)throw ge&&ge.func(`modelerEmbankStyle.fenceType ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().string}`),new Error(`modelerEmbankStyle.fenceType ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().string}`);if(!li.fenceType.find(t=>{var o;return t===(null===(o=e.modelerEmbankStyle)||void 0===o?void 0:o.fenceType)}))throw ge&&ge.func(`modelerEmbankStyle.fenceType ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().range} ${li.fenceType.toString()}`),new Error(`modelerEmbankStyle.fenceType ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().range} ${li.fenceType.toString()}`)}if(void 0!==(null===(k=e.modelerEmbankStyle)||void 0===k?void 0:k.fenceWidth)&&("number"!=typeof e.modelerEmbankStyle.fenceWidth||e.modelerEmbankStyle.fenceWidth<0))throw ge&&ge.func(`modelerEmbankStyle.fenceWidth ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().positiveNumber}`),new Error(`modelerEmbankStyle.fenceWidth ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().positiveNumber}`);if(void 0!==(null===(U=e.modelerEmbankStyle)||void 0===U?void 0:U.fenceHeight)&&("number"!=typeof e.modelerEmbankStyle.fenceHeight||e.modelerEmbankStyle.fenceHeight<0))throw ge&&ge.func(`modelerEmbankStyle.fenceHeight ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().positiveNumber}`),new Error(`modelerEmbankStyle.fenceHeight ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().positiveNumber}`);if(void 0!==(null===(z=e.modelerEmbankStyle)||void 0===z?void 0:z.fenceOffset)&&"number"!=typeof e.modelerEmbankStyle.fenceOffset)throw ge&&ge.func(`modelerEmbankStyle.fenceOffset ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().number}`),new Error(`modelerEmbankStyle.fenceOffset ${null===(H=li.getInstance())||void 0===H?void 0:H.GetCommonErr().number}`);if(void 0!==(null===(Z=e.modelerEmbankStyle)||void 0===Z?void 0:Z.cornerRadius)&&("number"!=typeof e.modelerEmbankStyle.cornerRadius||e.modelerEmbankStyle.cornerRadius<0))throw ge&&ge.func(`modelerEmbankStyle.cornerRadius ${null===(Y=li.getInstance())||void 0===Y?void 0:Y.GetCommonErr().positiveNumber}`),new Error(`modelerEmbankStyle.cornerRadius ${null===(Q=li.getInstance())||void 0===Q?void 0:Q.GetCommonErr().positiveNumber}`);if(void 0!==(null===(J=e.modelerEmbankStyle)||void 0===J?void 0:J.cornerSplitNum)&&"number"!=typeof e.modelerEmbankStyle.cornerSplitNum)throw ge&&ge.func(`modelerEmbankStyle.cornerSplitNum ${null===(X=li.getInstance())||void 0===X?void 0:X.GetCommonErr().number}`),new Error(`modelerEmbankStyle.cornerSplitNum ${null===(K=li.getInstance())||void 0===K?void 0:K.GetCommonErr().number}`);if(void 0!==(null===(ee=e.modelerEmbankStyle)||void 0===ee?void 0:ee.bUseVertexCorner)&&"boolean"!=typeof e.modelerEmbankStyle.bUseVertexCorner)throw ge&&ge.func(`modelerEmbankStyle.bUseVertexCorner ${null===(te=li.getInstance())||void 0===te?void 0:te.GetCommonErr().boolean}`),new Error(`modelerEmbankStyle.bUseVertexCorner ${null===(oe=li.getInstance())||void 0===oe?void 0:oe.GetCommonErr().boolean}`);if(void 0!==(null===(ie=e.modelerEmbankStyle)||void 0===ie?void 0:ie.bUseVertexSideScale)&&"boolean"!=typeof e.modelerEmbankStyle.bUseVertexSideScale)throw ge&&ge.func(`modelerEmbankStyle.bUseVertexSideScale ${null===(ne=li.getInstance())||void 0===ne?void 0:ne.GetCommonErr().boolean}`),new Error(`modelerEmbankStyle.bUseVertexSideScale ${null===(re=li.getInstance())||void 0===re?void 0:re.GetCommonErr().boolean}`);if(void 0!==(null===(ae=e.modelerEmbankStyle)||void 0===ae?void 0:ae.bUseVertexWidth)&&"boolean"!=typeof e.modelerEmbankStyle.bUseVertexWidth)throw ge&&ge.func(`modelerEmbankStyle.bUseVertexWidth ${null===(se=li.getInstance())||void 0===se?void 0:se.GetCommonErr().boolean}`),new Error(`modelerEmbankStyle.bUseVertexWidth ${null===(le=li.getInstance())||void 0===le?void 0:le.GetCommonErr().boolean}`)}if(void 0!==e.coordinates){if("object"!=typeof e.coordinates||void 0===e.coordinates.length)throw ge&&ge.func(`coordinates ${null===(de=li.getInstance())||void 0===de?void 0:de.GetCommonErr().array}`),new Error(`coordinates ${null===(ce=li.getInstance())||void 0===ce?void 0:ce.GetCommonErr().array}`);e.coordinates.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw ge&&ge.func(`coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw ge&&ge.func(`coordinates value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`coordinates value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==e.bClosed&&"boolean"!=typeof e.bClosed)throw ge&&ge.func(`bClosed ${null===(ue=li.getInstance())||void 0===ue?void 0:ue.GetCommonErr().boolean}`),new Error(`bClosed ${null===(ve=li.getInstance())||void 0===ve?void 0:ve.GetCommonErr().boolean}`);if(void 0!==e.attributes){if("object"!=typeof e.attributes||void 0===e.attributes.length)throw ge&&ge.func(`attributes ${null===(he=li.getInstance())||void 0===he?void 0:he.GetCommonErr().array}`),new Error(`attributes ${null===(me=li.getInstance())||void 0===me?void 0:me.GetCommonErr().array}`);e.attributes.forEach(e=>{var t,o,i,n,r,a,s,l;const d={cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw ge&&ge.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`attributes.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw ge&&ge.func(null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().number),new Error(`attributes.cornerRadius ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().number}`);if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw ge&&ge.func(null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number),new Error(`attributes.cornerSplitNum ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`);if(void 0!==e.baseWidth&&"number"!=typeof e.baseWidth)throw ge&&ge.func(null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number),new Error(`attributes.baseWidth ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}`);if(void 0!==e.sideWidthScale&&"number"!=typeof e.sideWidthScale)throw ge&&ge.func(null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number),new Error(`attributes.sideWidthScale ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`)})}}}class Fr extends fi{constructor(e){super(e,_r),this.setType("ModelerEmbank")}}class Ur extends Qn{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=Ho.get(this.oType),Ti(this.ModelerWaterPolygonAtom,this,[],[],[]),Ti(this.ModelerWaterAtom,this,["bInverseNormal","bAlignZ","bUseVertexCorner"],[],[],"modelerWaterStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.waterColor)&&(e.modelerWaterStyle.waterColor="object"==typeof e.modelerWaterStyle.waterColor?Ei(e.modelerWaterStyle.waterColor):Ei(ji(e.modelerWaterStyle.waterColor))),this.handleAtom(this.ModelerWaterAtom,e.modelerWaterStyle)),e.coordinates&&(this.ModelerWaterPolygonAtom.coordinates=e.coordinates),e.attributes&&(this.ModelerWaterPolygonAtom.attributes=e.attributes)}generateAtomData(e){var t;const o={},i={},n={},r={},a={},s={},l={},d={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleTransformAtom(n,e),Object.keys(n).length>0&&(o.TransformAtom=n),this.handleVisibleAtom(r,e),Object.keys(r).length>0&&(o.VisibleAtom=r),this.handleLockedAtom(a,e),Object.keys(a).length>0&&(o.EntityFlagAtom=a),this.handleEntityOutlinerAtom(s,e),Object.keys(s).length>0&&(o.EntityOutlinerAtom=s),void 0!==e.modelerWaterStyle&&((null===(t=e.modelerWaterStyle)||void 0===t?void 0:t.waterColor)&&(e.modelerWaterStyle.waterColor="object"==typeof e.modelerWaterStyle.waterColor?Ei(e.modelerWaterStyle.waterColor):Ei(ji(e.modelerWaterStyle.waterColor))),this.handleAtom(l,e.modelerWaterStyle)),Object.keys(l).length>0&&(o.ModelerWaterAtom=l),void 0!==e.coordinates&&(d.coordinates=e.coordinates),void 0!==e.attributes&&(d.attributes=e.attributes),Object.keys(d).length>0&&(o.ModelerWaterPolygonAtom=d),o}GetValidateRules(){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)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te,oe,ie;const ne=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw ne&&ne.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const re=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===re[e])throw ne&&ne.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.modelerWaterStyle){if("object"!=typeof e.modelerWaterStyle)throw ne&&ne.func(`modelerWaterStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`modelerWaterStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.ModelerWaterAtom;if(Object.keys(e.modelerWaterStyle).forEach(e=>{var o,i;if(void 0===t[e])throw ne&&ne.func(`modelerWaterStyle.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerWaterStyle.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.modelerWaterStyle)||void 0===a?void 0:a.waterHeight)&&"number"!=typeof e.modelerWaterStyle.waterHeight)throw ne&&ne.func(`modelerWaterStyle.waterHeight ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`modelerWaterStyle.waterHeight ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(void 0!==(null===(d=e.modelerWaterStyle)||void 0===d?void 0:d.bInverseNormal)&&"boolean"!=typeof e.modelerWaterStyle.bInverseNormal)throw ne&&ne.func(`modelerWaterStyle.bInverseNormal ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`),new Error(`modelerWaterStyle.bInverseNormal ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`);if(void 0!==(null===(v=e.modelerWaterStyle)||void 0===v?void 0:v.bAlignZ)&&"boolean"!=typeof e.modelerWaterStyle.bAlignZ)throw ne&&ne.func(`modelerWaterStyle.bAlignZ ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`modelerWaterStyle.bAlignZ ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`);if(void 0!==(null===(g=e.modelerWaterStyle)||void 0===g?void 0:g.bUseVertexCorner)&&"boolean"!=typeof e.modelerWaterStyle.bUseVertexCorner)throw ne&&ne.func(`modelerWaterStyle.bUseVertexCorner ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`),new Error(`modelerWaterStyle.bUseVertexCorner ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().boolean}`);if(void 0!==(null===(b=e.modelerWaterStyle)||void 0===b?void 0:b.cornerRadius)&&"number"!=typeof e.modelerWaterStyle.cornerRadius)throw ne&&ne.func(`modelerWaterStyle.cornerRadius ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}`),new Error(`modelerWaterStyle.cornerRadius ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`);if(void 0!==(null===(w=e.modelerWaterStyle)||void 0===w?void 0:w.cornerSplitNum)&&"number"!=typeof e.modelerWaterStyle.cornerSplitNum)throw ne&&ne.func(`modelerWaterStyle.cornerSplitNum ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`),new Error(`modelerWaterStyle.cornerSplitNum ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}`);if(void 0!==(null===(S=e.modelerWaterStyle)||void 0===S?void 0:S.waterType)){if("string"!=typeof e.modelerWaterStyle.waterType)throw ne&&ne.func(`modelerWaterStyle.waterType ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().string}`),new Error(`modelerWaterStyle.waterType ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().string}`);if(!li.waterType.find(t=>{var o;return t===(null===(o=e.modelerWaterStyle)||void 0===o?void 0:o.waterType)}))throw ne&&ne.func(`modelerWaterStyle.waterType ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().range} ${li.waterType.toString()}`),new Error(`modelerWaterStyle.waterType ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().range} ${li.waterType.toString()}`)}if(void 0!==(null===(T=e.modelerWaterStyle)||void 0===T?void 0:T.waterColor)&&"string"!=typeof e.modelerWaterStyle.waterColor)throw ne&&ne.func(`modelerWaterStyle.waterColor ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().string}`),new Error(`modelerWaterStyle.waterColor ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().string}`);if(void 0!==(null===(D=e.modelerWaterStyle)||void 0===D?void 0:D.waveHeight)&&"number"!=typeof e.modelerWaterStyle.waveHeight)throw ne&&ne.func(`modelerWaterStyle.waveHeight ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().number}`),new Error(`modelerWaterStyle.waveHeight ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().number}`);if(void 0!==(null===(N=e.modelerWaterStyle)||void 0===N?void 0:N.waterTransparency)&&"number"!=typeof e.modelerWaterStyle.waterTransparency)throw ne&&ne.func(`modelerWaterStyle.waterTransparency ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().number}`),new Error(`modelerWaterStyle.waterTransparency ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().number}`);if(void 0!==(null===(P=e.modelerWaterStyle)||void 0===P?void 0:P.waterTransparentDepth)&&"number"!=typeof e.modelerWaterStyle.waterTransparentDepth)throw ne&&ne.func(`modelerWaterStyle.waterTransparentDepth ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().number}`),new Error(`modelerWaterStyle.waterTransparentDepth ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().number}`);if(void 0!==(null===(F=e.modelerWaterStyle)||void 0===F?void 0:F.rippleScale)&&"number"!=typeof e.modelerWaterStyle.rippleScale)throw ne&&ne.func(`modelerWaterStyle.rippleScale ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().number}`),new Error(`modelerWaterStyle.rippleScale ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().number}`);if(void 0!==(null===(q=e.modelerWaterStyle)||void 0===q?void 0:q.waveRotate)&&"number"!=typeof e.modelerWaterStyle.waveRotate)throw ne&&ne.func(`modelerWaterStyle.waveRotate ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().number}`),new Error(`modelerWaterStyle.waveRotate ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().number}`);if(void 0!==(null===(H=e.modelerWaterStyle)||void 0===H?void 0:H.waveSpeed)&&"number"!=typeof e.modelerWaterStyle.waveSpeed)throw ne&&ne.func(`modelerWaterStyle.waveSpeed ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().number}`),new Error(`modelerWaterStyle.waveSpeed ${null===(Y=li.getInstance())||void 0===Y?void 0:Y.GetCommonErr().number}`);if(void 0!==(null===(Q=e.modelerWaterStyle)||void 0===Q?void 0:Q.waveIntensity)&&"number"!=typeof e.modelerWaterStyle.waveIntensity)throw ne&&ne.func(`modelerWaterStyle.waveIntensity ${null===(J=li.getInstance())||void 0===J?void 0:J.GetCommonErr().number}`),new Error(`modelerWaterStyle.waveIntensity ${null===(X=li.getInstance())||void 0===X?void 0:X.GetCommonErr().number}`);if(void 0!==(null===(K=e.modelerWaterStyle)||void 0===K?void 0:K.waveScale)&&"number"!=typeof e.modelerWaterStyle.waveScale)throw ne&&ne.func(`modelerWaterStyle.waveScale ${null===(ee=li.getInstance())||void 0===ee?void 0:ee.GetCommonErr().number}`),new Error(`modelerWaterStyle.waveScale ${null===(te=li.getInstance())||void 0===te?void 0:te.GetCommonErr().number}`)}if(void 0!==e.coordinates){if("object"!=typeof e.coordinates||void 0===e.coordinates.length)throw ne&&ne.func(`coordinates ${null===(oe=li.getInstance())||void 0===oe?void 0:oe.GetCommonErr().array}`),new Error(`coordinates ${null===(ie=li.getInstance())||void 0===ie?void 0:ie.GetCommonErr().array}`);e.coordinates.forEach(e=>{var t,o;if("object"!=typeof e||void 0===e.length)throw ne&&ne.func(`coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw ne&&ne.func(`value of coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`value of coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw ne&&ne.func(`value of coordinates value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`value of coordinates value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})})}}}class Br{validateGenerate(e,t){var o,i,n,r,a,s,l,d,c,u;const v=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if(void 0===e)throw v&&v.func(`name ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`),new Error(`name ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().required}`);if(void 0===t)throw v&&v.func(`coordinate ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`),new Error(`coordinate ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`);if("string"!=typeof e)throw v&&v.func(`name ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`),new Error(`name ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`);if("object"!=typeof t||void 0===t.length)throw v&&v.func(`coordinate ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`),new Error(`coordinate ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`)}}}class qr extends fi{constructor(e){super(e,Ur),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpModelerAPI"}),Object.defineProperty(this,"ModelerWaterValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Br}),this.setType("ModelerWater")}Generate(e,o){return t(this,void 0,void 0,function*(){this.ModelerWaterValidate.validateGenerate(e,o);const t=yield this.StartApi(this.apiClassName,"GenerateModelerWater",{name:e,coordinate:JSON.stringify(o)});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class zr extends Qn{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=Ho.get(this.oType),Ti(this.ModelerRiverPolylineAtom,this,["bClosed"],[],[]),Ti(this.ModelerRiverAtom,this,["bInverseNormal","bUseVertexCorner","bUseVertexWidth"],[],[],"modelerRiverStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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)||void 0===t?void 0:t.waterColor)&&(e.modelerRiverStyle.waterColor="object"==typeof e.modelerRiverStyle.waterColor?Ei(e.modelerRiverStyle.waterColor):Ei(ji(e.modelerRiverStyle.waterColor))),this.handleAtom(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;const o={},i={},n={},r={},a={},s={},l={},d={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(o.BasicInfoAtom=i),this.handleTransformAtom(n,e),Object.keys(n).length>0&&(o.TransformAtom=n),this.handleVisibleAtom(r,e),Object.keys(r).length>0&&(o.VisibleAtom=r),this.handleLockedAtom(a,e),Object.keys(a).length>0&&(o.EntityFlagAtom=a),this.handleEntityOutlinerAtom(s,e),Object.keys(s).length>0&&(o.EntityOutlinerAtom=s),void 0!==e.modelerRiverStyle&&((null===(t=e.modelerRiverStyle)||void 0===t?void 0:t.waterColor)&&(e.modelerRiverStyle.waterColor="object"==typeof e.modelerRiverStyle.waterColor?Ei(e.modelerRiverStyle.waterColor):Ei(ji(e.modelerRiverStyle.waterColor))),this.handleAtom(l,e.modelerRiverStyle)),Object.keys(l).length>0&&(o.ModelerRiverAtom=l),void 0!==e.coordinates&&(d.coordinates=e.coordinates),void 0!==e.attributes&&(d.attributes=e.attributes),void 0!==e.bClosed&&(d.bClosed=e.bClosed),Object.keys(d).length>0&&(o.ModelerRiverPolylineAtom=d),o}GetValidateRules(){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)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te,oe,ie,ne,re,ae,se;const le=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw le&&le.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const de=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===de[e])throw le&&le.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.modelerRiverStyle){if("object"!=typeof e.modelerRiverStyle)throw le&&le.func(`modelerEmbankStyle ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`modelerEmbankStyle ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t=this.ModelerRiverAtom;if(Object.keys(e.modelerRiverStyle).forEach(e=>{var o,i;if(void 0===t[e])throw le&&le.func(`modelerRiverStyle.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerRiverStyle.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.modelerRiverStyle)||void 0===a?void 0:a.mergeLength)&&"number"!=typeof e.modelerRiverStyle.mergeLength)throw le&&le.func(`modelerRiverStyle.mergeLength ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`modelerRiverStyle.mergeLength ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(void 0!==(null===(d=e.modelerRiverStyle)||void 0===d?void 0:d.riverWidth)&&"number"!=typeof e.modelerRiverStyle.riverWidth)throw le&&le.func(`modelerRiverStyle.riverWidth ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`),new Error(`modelerRiverStyle.riverWidth ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`);if(void 0!==(null===(v=e.modelerRiverStyle)||void 0===v?void 0:v.riverHeight)&&"number"!=typeof e.modelerRiverStyle.riverHeight)throw le&&le.func(`modelerRiverStyle.riverHeight ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`),new Error(`modelerRiverStyle.riverHeight ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`);if(void 0!==(null===(g=e.modelerRiverStyle)||void 0===g?void 0:g.bInverseNormal)&&"boolean"!=typeof e.modelerRiverStyle.bInverseNormal)throw le&&le.func(`modelerRiverStyle.bInverseNormal ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`),new Error(`modelerRiverStyle.bInverseNormal ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().boolean}`);if(void 0!==(null===(b=e.modelerRiverStyle)||void 0===b?void 0:b.cornerRadius)&&"number"!=typeof e.modelerRiverStyle.cornerRadius)throw le&&le.func(`modelerRiverStyle.cornerRadius ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}`),new Error(`modelerRiverStyle.cornerRadius ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`);if(void 0!==(null===(w=e.modelerRiverStyle)||void 0===w?void 0:w.cornerSplitNum)&&"number"!=typeof e.modelerRiverStyle.cornerSplitNum)throw le&&le.func(`modelerRiverStyle.cornerSplitNum ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`),new Error(`modelerRiverStyle.cornerSplitNum ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}`);if(void 0!==(null===(S=e.modelerRiverStyle)||void 0===S?void 0:S.bUseVertexCorner)&&"boolean"!=typeof e.modelerRiverStyle.bUseVertexCorner)throw le&&le.func(`modelerRiverStyle.bUseVertexCorner ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().boolean}`),new Error(`modelerRiverStyle.bUseVertexCorner ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().boolean}`);if(void 0!==(null===(O=e.modelerRiverStyle)||void 0===O?void 0:O.bUseVertexWidth)&&"boolean"!=typeof e.modelerRiverStyle.bUseVertexWidth)throw le&&le.func(`modelerRiverStyle.bUseVertexWidth ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().boolean}`),new Error(`modelerRiverStyle.bUseVertexWidth ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().boolean}`);if(void 0!==(null===(M=e.modelerRiverStyle)||void 0===M?void 0:M.waterType)){if("string"!=typeof e.modelerRiverStyle.waterType)throw le&&le.func(`modelerRiverStyle.waterType ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().string}`),new Error(`modelerRiverStyle.waterType ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().string}`);if(!li.riverType.find(t=>{var o;return t===(null===(o=e.modelerRiverStyle)||void 0===o?void 0:o.waterType)}))throw le&&le.func(`modelerRiverStyle.waterType ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().range} ${li.riverType.toString()}`),new Error(`modelerRiverStyle.waterType ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().range} ${li.riverType.toString()}`)}if(void 0!==(null===(N=e.modelerRiverStyle)||void 0===N?void 0:N.waterColor)&&"string"!=typeof e.modelerRiverStyle.waterColor)throw le&&le.func(`modelerRiverStyle.waterColor ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().string}`),new Error(`modelerRiverStyle.waterColor ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().string}`);if(void 0!==(null===(P=e.modelerRiverStyle)||void 0===P?void 0:P.waveHeight)&&"number"!=typeof e.modelerRiverStyle.waveHeight)throw le&&le.func(`modelerRiverStyle.waveHeight ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().number}`),new Error(`modelerRiverStyle.waveHeight ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().number}`);if(void 0!==(null===(F=e.modelerRiverStyle)||void 0===F?void 0:F.waterTransparency)&&"number"!=typeof e.modelerRiverStyle.waterTransparency)throw le&&le.func(`modelerRiverStyle.waterTransparency ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().number}`),new Error(`modelerRiverStyle.waterTransparency ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().number}`);if(void 0!==(null===(q=e.modelerRiverStyle)||void 0===q?void 0:q.waterTransparentDepth)&&"number"!=typeof e.modelerRiverStyle.waterTransparentDepth)throw le&&le.func(`modelerRiverStyle.waterTransparentDepth ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().number}`),new Error(`modelerRiverStyle.waterTransparentDepth ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().number}`);if(void 0!==(null===(H=e.modelerRiverStyle)||void 0===H?void 0:H.rippleScale)&&"number"!=typeof e.modelerRiverStyle.rippleScale)throw le&&le.func(`modelerRiverStyle.rippleScale ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().number}`),new Error(`modelerRiverStyle.rippleScale ${null===(Y=li.getInstance())||void 0===Y?void 0:Y.GetCommonErr().number}`);if(void 0!==(null===(Q=e.modelerRiverStyle)||void 0===Q?void 0:Q.waveRotate)&&"number"!=typeof e.modelerRiverStyle.waveRotate)throw le&&le.func(`modelerRiverStyle.waveRotate ${null===(J=li.getInstance())||void 0===J?void 0:J.GetCommonErr().number}`),new Error(`modelerRiverStyle.waveRotate ${null===(X=li.getInstance())||void 0===X?void 0:X.GetCommonErr().number}`);if(void 0!==(null===(K=e.modelerRiverStyle)||void 0===K?void 0:K.waveSpeed)&&"number"!=typeof e.modelerRiverStyle.waveSpeed)throw le&&le.func(`modelerRiverStyle.waveSpeed ${null===(ee=li.getInstance())||void 0===ee?void 0:ee.GetCommonErr().number}`),new Error(`modelerRiverStyle.waveSpeed ${null===(te=li.getInstance())||void 0===te?void 0:te.GetCommonErr().number}`)}if(void 0!==e.coordinates){if("object"!=typeof e.coordinates||void 0===e.coordinates.length)throw le&&le.func(`coordinates ${null===(oe=li.getInstance())||void 0===oe?void 0:oe.GetCommonErr().array}`),new Error(`coordinates ${null===(ie=li.getInstance())||void 0===ie?void 0:ie.GetCommonErr().array}`);e.coordinates.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw le&&le.func(`coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw le&&le.func(`coordinates value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`coordinates value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==e.bClosed&&"boolean"!=typeof e.bClosed)throw le&&le.func(`bClosed ${null===(ne=li.getInstance())||void 0===ne?void 0:ne.GetCommonErr().boolean}`),new Error(`bClosed ${null===(re=li.getInstance())||void 0===re?void 0:re.GetCommonErr().boolean}`);if(void 0!==e.attributes){if("object"!=typeof e.attributes||void 0===e.attributes.length)throw le&&le.func(`attributes ${null===(ae=li.getInstance())||void 0===ae?void 0:ae.GetCommonErr().array}`),new Error(`attributes ${null===(se=li.getInstance())||void 0===se?void 0:se.GetCommonErr().array}`);e.attributes.forEach(e=>{var t,o,i,n,r,a,s,l;const d={cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw le&&le.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`attributes.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw le&&le.func(null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().number),new Error(`attributes.cornerRadius ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().number}`);if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw le&&le.func(null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number),new Error(`attributes.cornerSplitNum ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`);if(void 0!==e.baseWidth&&"number"!=typeof e.baseWidth)throw le&&le.func(null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number),new Error(`attributes.baseWidth ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}`);if(void 0!==e.sideWidthScale&&"number"!=typeof e.sideWidthScale)throw le&&le.func(null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number),new Error(`attributes.sideWidthScale ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`)})}}}class Wr extends fi{constructor(e){super(e,zr),this.setType("ModelerRiver")}}class Hr extends Qn{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=Ho.get(this.oType),Ti(this.ModelerFencePolylineAtom,this,["bClosed"],[],[]),Ti(this.ModelerFenceAtom,this,["bUseVertexCorner","bRotCol"],[],[],"ModelerFenceStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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&&this.handleAtom(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){const t={},o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==e.ModelerFenceStyle&&this.handleAtom(s,e.ModelerFenceStyle),Object.keys(s).length>0&&(t.ModelerFenceAtom=s),void 0!==e.coordinates&&(l.coordinates=e.coordinates),void 0!==e.attributes&&(l.attributes=e.attributes),void 0!==e.bClosed&&(l.bClosed=e.bClosed),Object.keys(l).length>0&&(t.ModelerFencePolylineAtom=l),t}GetValidateRules(){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)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$;const T=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw T&&T.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const M=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===M[e])throw T&&T.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.coordinates){if("object"!=typeof e.coordinates||void 0===e.coordinates.length)throw T&&T.func(`coordinates ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`coordinates ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);e.coordinates.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw T&&T.func(`coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw T&&T.func(`coordinates value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`coordinates value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==e.bClosed&&"boolean"!=typeof e.bClosed)throw T&&T.func(`bClosed ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`),new Error(`bClosed ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`);if(void 0!==e.attributes){if("object"!=typeof e.attributes||void 0===e.attributes.length)throw T&&T.func(`attributes ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`),new Error(`attributes ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`);e.attributes.forEach(e=>{var t,o,i,n,r,a,s,l;const d={cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw T&&T.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`attributes.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw T&&T.func(null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().number),new Error(`attributes.cornerRadius ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().number}`);if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw T&&T.func(null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number),new Error(`attributes.cornerSplitNum ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`);if(void 0!==e.baseWidth&&"number"!=typeof e.baseWidth)throw T&&T.func(null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number),new Error(`attributes.baseWidth ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}`);if(void 0!==e.sideWidthScale&&"number"!=typeof e.sideWidthScale)throw T&&T.func(null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number),new Error(`attributes.sideWidthScale ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`)})}if(void 0!==e.ModelerFenceStyle){if("object"!=typeof e.ModelerFenceStyle)throw T&&T.func(`ModelerFenceStyle ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`),new Error(`ModelerFenceStyle ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().object}`);const t=this.ModelerFenceAtom;if(Object.keys(e.ModelerFenceStyle).forEach(e=>{var o,i;if(void 0===t[e])throw T&&T.func(`ModelerFenceStyle.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`ModelerFenceStyle.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(v=e.ModelerFenceStyle)||void 0===v?void 0:v.bUseVertexCorner)&&"boolean"!=typeof e.ModelerFenceStyle.bUseVertexCorner)throw T&&T.func(`ModelerFenceStyle.bUseVertexCorner ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`ModelerFenceStyle.bUseVertexCorner ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`);if(void 0!==(null===(g=e.ModelerFenceStyle)||void 0===g?void 0:g.bRotCol)&&"boolean"!=typeof e.ModelerFenceStyle.bRotCol)throw T&&T.func(`ModelerFenceStyle.bRotCol ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`),new Error(`ModelerFenceStyle.bRotCol ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().boolean}`);if(void 0!==(null===(b=e.ModelerFenceStyle)||void 0===b?void 0:b.fenceMeshTypeName)){if("string"!=typeof e.ModelerFenceStyle.fenceMeshTypeName)throw T&&T.func(`ModelerFenceStyle.fenceMeshTypeName ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().string}`),new Error(`ModelerFenceStyle.fenceMeshTypeName ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`);if(!li.modelerFenceType.find(t=>{var o;return t===(null===(o=e.ModelerFenceStyle)||void 0===o?void 0:o.fenceMeshTypeName)}))throw T&&T.func(`ModelerFenceStyle.fenceMeshTypeName ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} ${li.modelerFenceType.toString()}`),new Error(`ModelerFenceStyle.fenceMeshTypeName ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().range} ${li.modelerFenceType.toString()}`)}if(void 0!==(null===(j=e.ModelerFenceStyle)||void 0===j?void 0:j.cornerRadius)&&("number"!=typeof e.ModelerFenceStyle.cornerRadius||e.ModelerFenceStyle.cornerRadius<0))throw T&&T.func(`ModelerFenceStyle.cornerRadius ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().positiveNumber}`),new Error(`ModelerFenceStyle.cornerRadius ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().positiveNumber}`);if(void 0!==(null===(G=e.ModelerFenceStyle)||void 0===G?void 0:G.fenceScale)&&("number"!=typeof e.ModelerFenceStyle.fenceScale||e.ModelerFenceStyle.fenceScale<0))throw T&&T.func(`ModelerFenceStyle.fenceScale ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().positiveNumber}`),new Error(`ModelerFenceStyle.fenceScale ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().positiveNumber}`)}}}class Zr extends fi{constructor(e){super(e,Hr),this.setType("ModelerFence")}}class Yr extends Qn{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=Ho.get(this.oType),Ti(this.ModelerFloorPolygonAtom,this,[],[],[]),Ti(this.ModelerFloorAtom,this,["bUseVertexCorner","bAlignZ","bInverseNormal"],[],[],"modelerFloorStyle"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D;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?void 0:t.innerMatName)&&(this.ModelerFloorAtom.innerMatName=e.modelerFloorStyle.innerMatName),void 0!==(null===(o=e.modelerFloorStyle)||void 0===o?void 0:o.outerMatName)&&(this.ModelerFloorAtom.outerMatName=e.modelerFloorStyle.outerMatName),void 0!==(null===(i=e.modelerFloorStyle)||void 0===i?void 0:i.innerHeight)&&(this.ModelerFloorAtom.innerHeight=e.modelerFloorStyle.innerHeight),void 0!==(null===(n=e.modelerFloorStyle)||void 0===n?void 0:n.outerHeight)&&(this.ModelerFloorAtom.outerHeight=e.modelerFloorStyle.outerHeight),void 0!==(null===(r=e.modelerFloorStyle)||void 0===r?void 0:r.outerWidth)&&(this.ModelerFloorAtom.outerWidth=e.modelerFloorStyle.outerWidth),void 0!==(null===(a=e.modelerFloorStyle)||void 0===a?void 0:a.cornerRadius)&&(this.ModelerFloorAtom.cornerRadius=e.modelerFloorStyle.cornerRadius),void 0!==(null===(s=e.modelerFloorStyle)||void 0===s?void 0:s.cornerSplitNum)&&(this.ModelerFloorAtom.cornerSplitNum=e.modelerFloorStyle.cornerSplitNum),void 0!==(null===(l=e.modelerFloorStyle)||void 0===l?void 0:l.bUseVertexCorner)&&(this.ModelerFloorAtom.bUseVertexCorner=e.modelerFloorStyle.bUseVertexCorner),void 0!==(null===(d=e.modelerFloorStyle)||void 0===d?void 0:d.bAlignZ)&&(this.ModelerFloorAtom.bAlignZ=e.modelerFloorStyle.bAlignZ),void 0!==(null===(c=e.modelerFloorStyle)||void 0===c?void 0:c.bInverseNormal)&&(this.ModelerFloorAtom.bInverseNormal=e.modelerFloorStyle.bInverseNormal),void 0!==(null===(u=e.modelerFloorStyle)||void 0===u?void 0:u.innerRoughness)&&(this.ModelerFloorAtom.innerRoughness=e.modelerFloorStyle.innerRoughness),void 0!==(null===(v=e.modelerFloorStyle)||void 0===v?void 0:v.outerRoughness)&&(this.ModelerFloorAtom.outerRoughness=e.modelerFloorStyle.outerRoughness),void 0!==(null===(h=e.modelerFloorStyle)||void 0===h?void 0:h.innerNormal)&&(this.ModelerFloorAtom.innerNormal=e.modelerFloorStyle.innerNormal),void 0!==(null===(m=e.modelerFloorStyle)||void 0===m?void 0:m.outerNormal)&&(this.ModelerFloorAtom.outerNormal=e.modelerFloorStyle.outerNormal),void 0!==(null===(g=e.modelerFloorStyle)||void 0===g?void 0:g.innerBrightness)&&(this.ModelerFloorAtom.innerBrightness=e.modelerFloorStyle.innerBrightness),void 0!==(null===(f=e.modelerFloorStyle)||void 0===f?void 0:f.outerBrightness)&&(this.ModelerFloorAtom.outerBrightness=e.modelerFloorStyle.outerBrightness),void 0!==(null===(y=e.modelerFloorStyle)||void 0===y?void 0:y.outerUVTransform)&&(void 0!==(null===(b=e.modelerFloorStyle.outerUVTransform)||void 0===b?void 0:b.rotation)&&(void 0!==(null===(p=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===p?void 0:p.x)&&(this.ModelerFloorAtom.outerUVTransform.rotation.x=e.modelerFloorStyle.outerUVTransform.rotation.x),void 0!==(null===(E=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===E?void 0:E.y)&&(this.ModelerFloorAtom.outerUVTransform.rotation.y=e.modelerFloorStyle.outerUVTransform.rotation.y),void 0!==(null===(w=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===w?void 0:w.z)&&(this.ModelerFloorAtom.outerUVTransform.rotation.z=e.modelerFloorStyle.outerUVTransform.rotation.z),void 0!==(null===(I=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===I?void 0:I.w)&&(this.ModelerFloorAtom.outerUVTransform.rotation.w=e.modelerFloorStyle.outerUVTransform.rotation.w)),void 0!==(null===(j=e.modelerFloorStyle.outerUVTransform)||void 0===j?void 0:j.translation)&&(this.ModelerFloorAtom.outerUVTransform.translation=e.modelerFloorStyle.outerUVTransform.translation),void 0!==(null===(S=e.modelerFloorStyle.outerUVTransform)||void 0===S?void 0:S.scale3d)&&(this.ModelerFloorAtom.outerUVTransform.scale3d=e.modelerFloorStyle.outerUVTransform.scale3d)),void 0!==(null===(C=e.modelerFloorStyle)||void 0===C?void 0:C.innerUVTransform)&&(void 0!==(null===(G=e.modelerFloorStyle.innerUVTransform)||void 0===G?void 0:G.rotation)&&(void 0!==(null===(O=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===O?void 0:O.x)&&(this.ModelerFloorAtom.innerUVTransform.rotation.x=e.modelerFloorStyle.innerUVTransform.rotation.x),void 0!==(null===($=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===$?void 0:$.y)&&(this.ModelerFloorAtom.innerUVTransform.rotation.y=e.modelerFloorStyle.innerUVTransform.rotation.y),void 0!==(null===(T=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===T?void 0:T.z)&&(this.ModelerFloorAtom.innerUVTransform.rotation.z=e.modelerFloorStyle.innerUVTransform.rotation.z),void 0!==(null===(M=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===M?void 0:M.w)&&(this.ModelerFloorAtom.innerUVTransform.rotation.w=e.modelerFloorStyle.innerUVTransform.rotation.w)),void 0!==(null===(A=e.modelerFloorStyle.innerUVTransform)||void 0===A?void 0:A.translation)&&(this.ModelerFloorAtom.innerUVTransform.translation=e.modelerFloorStyle.innerUVTransform.translation),void 0!==(null===(D=e.modelerFloorStyle.innerUVTransform)||void 0===D?void 0:D.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,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D;const R={},x={},N={},L={},V={},P={},k={},_={};return this.handleBasicAtom(x,e),Object.keys(x).length>0&&(R.BasicInfoAtom=x),this.handleTransformAtom(N,e),Object.keys(N).length>0&&(R.TransformAtom=N),this.handleVisibleAtom(L,e),Object.keys(L).length>0&&(R.VisibleAtom=L),this.handleLockedAtom(V,e),Object.keys(V).length>0&&(R.EntityFlagAtom=V),this.handleEntityOutlinerAtom(P,e),Object.keys(P).length>0&&(R.EntityOutlinerAtom=P),void 0!==e.modelerFloorStyle&&(this.handleAtom(k,e.modelerFloorStyle),void 0!==(null===(t=e.modelerFloorStyle)||void 0===t?void 0:t.innerMatName)&&(k.innerMatName=e.modelerFloorStyle.innerMatName),void 0!==(null===(o=e.modelerFloorStyle)||void 0===o?void 0:o.outerMatName)&&(k.outerMatName=e.modelerFloorStyle.outerMatName),void 0!==(null===(i=e.modelerFloorStyle)||void 0===i?void 0:i.innerHeight)&&(k.innerHeight=e.modelerFloorStyle.innerHeight),void 0!==(null===(n=e.modelerFloorStyle)||void 0===n?void 0:n.outerHeight)&&(k.outerHeight=e.modelerFloorStyle.outerHeight),void 0!==(null===(r=e.modelerFloorStyle)||void 0===r?void 0:r.outerWidth)&&(k.outerWidth=e.modelerFloorStyle.outerWidth),void 0!==(null===(a=e.modelerFloorStyle)||void 0===a?void 0:a.cornerRadius)&&(k.cornerRadius=e.modelerFloorStyle.cornerRadius),void 0!==(null===(s=e.modelerFloorStyle)||void 0===s?void 0:s.cornerSplitNum)&&(k.cornerSplitNum=e.modelerFloorStyle.cornerSplitNum),void 0!==(null===(l=e.modelerFloorStyle)||void 0===l?void 0:l.bUseVertexCorner)&&(k.bUseVertexCorner=e.modelerFloorStyle.bUseVertexCorner),void 0!==(null===(d=e.modelerFloorStyle)||void 0===d?void 0:d.bAlignZ)&&(k.bAlignZ=e.modelerFloorStyle.bAlignZ),void 0!==(null===(c=e.modelerFloorStyle)||void 0===c?void 0:c.bInverseNormal)&&(k.bInverseNormal=e.modelerFloorStyle.bInverseNormal),void 0!==(null===(u=e.modelerFloorStyle)||void 0===u?void 0:u.innerRoughness)&&(k.innerRoughness=e.modelerFloorStyle.innerRoughness),void 0!==(null===(v=e.modelerFloorStyle)||void 0===v?void 0:v.outerRoughness)&&(k.outerRoughness=e.modelerFloorStyle.outerRoughness),void 0!==(null===(h=e.modelerFloorStyle)||void 0===h?void 0:h.innerNormal)&&(k.innerNormal=e.modelerFloorStyle.innerNormal),void 0!==(null===(m=e.modelerFloorStyle)||void 0===m?void 0:m.outerNormal)&&(k.outerNormal=e.modelerFloorStyle.outerNormal),void 0!==(null===(g=e.modelerFloorStyle)||void 0===g?void 0:g.innerBrightness)&&(k.innerBrightness=e.modelerFloorStyle.innerBrightness),void 0!==(null===(f=e.modelerFloorStyle)||void 0===f?void 0:f.outerBrightness)&&(k.outerBrightness=e.modelerFloorStyle.outerBrightness),void 0!==(null===(y=e.modelerFloorStyle)||void 0===y?void 0:y.outerUVTransform)&&(k.outerUVTransform=this.ModelerFloorAtom.outerUVTransform,void 0!==(null===(b=e.modelerFloorStyle.outerUVTransform)||void 0===b?void 0:b.rotation)&&(void 0!==(null===(p=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===p?void 0:p.x)&&(k.outerUVTransform.rotation.x=e.modelerFloorStyle.outerUVTransform.rotation.x),void 0!==(null===(E=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===E?void 0:E.y)&&(k.outerUVTransform.rotation.y=e.modelerFloorStyle.outerUVTransform.rotation.y),void 0!==(null===(w=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===w?void 0:w.z)&&(k.outerUVTransform.rotation.z=e.modelerFloorStyle.outerUVTransform.rotation.z),void 0!==(null===(I=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===I?void 0:I.w)&&(k.outerUVTransform.rotation.w=e.modelerFloorStyle.outerUVTransform.rotation.w)),void 0!==(null===(j=e.modelerFloorStyle.outerUVTransform)||void 0===j?void 0:j.translation)&&(k.outerUVTransform.translation=e.modelerFloorStyle.outerUVTransform.translation),void 0!==(null===(S=e.modelerFloorStyle.outerUVTransform)||void 0===S?void 0:S.scale3d)&&(k.outerUVTransform.scale3d=e.modelerFloorStyle.outerUVTransform.scale3d)),void 0!==(null===(C=e.modelerFloorStyle)||void 0===C?void 0:C.innerUVTransform)&&(k.innerUVTransform=this.ModelerFloorAtom.innerUVTransform,void 0!==(null===(G=e.modelerFloorStyle.innerUVTransform)||void 0===G?void 0:G.rotation)&&(void 0!==(null===(O=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===O?void 0:O.x)&&(k.innerUVTransform.rotation.x=e.modelerFloorStyle.innerUVTransform.rotation.x),void 0!==(null===($=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===$?void 0:$.y)&&(k.innerUVTransform.rotation.y=e.modelerFloorStyle.innerUVTransform.rotation.y),void 0!==(null===(T=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===T?void 0:T.z)&&(k.innerUVTransform.rotation.z=e.modelerFloorStyle.innerUVTransform.rotation.z),void 0!==(null===(M=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===M?void 0:M.w)&&(k.innerUVTransform.rotation.w=e.modelerFloorStyle.innerUVTransform.rotation.w)),void 0!==(null===(A=e.modelerFloorStyle.innerUVTransform)||void 0===A?void 0:A.translation)&&(k.innerUVTransform.translation=e.modelerFloorStyle.innerUVTransform.translation),void 0!==(null===(D=e.modelerFloorStyle.innerUVTransform)||void 0===D?void 0:D.scale3d)&&(k.innerUVTransform.scale3d=e.modelerFloorStyle.innerUVTransform.scale3d))),Object.keys(k).length>0&&(R.ModelerFloorAtom=k),void 0!==e.coordinates&&(_.coordinates=e.coordinates),void 0!==e.attributes&&(_.attributes=e.attributes),Object.keys(_).length>0&&(R.ModelerFloorPolygonAtom=_),R}GetValidateRules(){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)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z,Y,Q,J,X,K,ee,te,oe,ie,ne,re,ae,se,le,de,ce,ue,ve,he,me,ge,fe,ye,be,pe,Ee,we,Ie,je,Se,Ce,Ge,Oe,$e,Te,Me,Ae,De,Re,xe,Ne,Le,Ve,Pe,ke,_e,Fe,Ue,Be,qe,ze,We,He,Ze,Ye,Qe,Je,Xe,Ke,et,tt,ot,it,nt,rt,at,st,lt,dt;const ct=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw ct&&ct.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const ut=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===ut[e])throw ct&&ct.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.attributes){if("object"!=typeof e.attributes||void 0===e.attributes.length)throw ct&&ct.func(`attributes ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`attributes ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);e.attributes.forEach(e=>{var t,o,i,n;const r={cornerRadius:1,cornerSplitNum:10};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===r[e])throw ct&&ct.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`attributes.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw ct&&ct.func(null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().number),new Error(`attributes.cornerRadius ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().number}`);if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw ct&&ct.func(null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number),new Error(`attributes.cornerSplitNum ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`)})}if(void 0!==e.coordinates){if("object"!=typeof e.coordinates||void 0===e.coordinates.length)throw ct&&ct.func(`coordinates ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`coordinates ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);e.coordinates.forEach(e=>{var t,o;if("object"!=typeof e||void 0===e.length)throw ct&&ct.func(`coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw ct&&ct.func(`value of coordinates value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`value of coordinates value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(3!==e.filter(e=>"number"==typeof e).length)throw ct&&ct.func(`value of coordinates value ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 3`),new Error(`value of coordinates value ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 3`)})})}if(void 0!==e.modelerFloorStyle){if("object"!=typeof e.modelerFloorStyle)throw ct&&ct.func(`modelerFloorStyle ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`),new Error(`modelerFloorStyle ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`);const t=this.ModelerFloorAtom;if(Object.keys(e.modelerFloorStyle).forEach(e=>{var o,i;if(void 0===t[e])throw ct&&ct.func(`modelerFloorStyle.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerFloorStyle.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(c=e.modelerFloorStyle)||void 0===c?void 0:c.innerMatName)){if("string"!=typeof e.modelerFloorStyle.innerMatName)throw ct&&ct.func(`modelerFloorStyle.innerMatName ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`modelerFloorStyle.innerMatName ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`);if(!li.innerMatNameType.find(t=>{var o;return t===(null===(o=e.modelerFloorStyle)||void 0===o?void 0:o.innerMatName)}))throw ct&&ct.func(`modelerFloorStyle.innerMatName ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} ${li.innerMatNameType.toString()}`),new Error(`modelerFloorStyle.innerMatName ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} ${li.innerMatNameType.toString()}`)}if(void 0!==(null===(g=e.modelerFloorStyle)||void 0===g?void 0:g.outerMatName)){if("string"!=typeof e.modelerFloorStyle.outerMatName)throw ct&&ct.func(`modelerFloorStyle.outerMatName ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().string}`),new Error(`modelerFloorStyle.outerMatName ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().string}`);if(!li.outerMatNameType.find(t=>{var o;return t===(null===(o=e.modelerFloorStyle)||void 0===o?void 0:o.outerMatName)}))throw ct&&ct.func(`modelerFloorStyle.outerMatName ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} ${li.outerMatNameType.toString()}`),new Error(`modelerFloorStyle.outerMatName ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} ${li.outerMatNameType.toString()}`)}if(void 0!==(null===(E=e.modelerFloorStyle)||void 0===E?void 0:E.innerHeight)&&"number"!=typeof e.modelerFloorStyle.innerHeight)throw ct&&ct.func(`modelerFloorStyle.innerHeight ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}`),new Error(`modelerFloorStyle.innerHeight ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`);if(void 0!==(null===(j=e.modelerFloorStyle)||void 0===j?void 0:j.outerHeight)&&"number"!=typeof e.modelerFloorStyle.outerHeight)throw ct&&ct.func(`modelerFloorStyle.outerHeight ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().number}`),new Error(`modelerFloorStyle.outerHeight ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().number}`);if(void 0!==(null===(G=e.modelerFloorStyle)||void 0===G?void 0:G.outerWidth)&&"number"!=typeof e.modelerFloorStyle.outerWidth)throw ct&&ct.func(`modelerFloorStyle.outerWidth ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().number}`),new Error(`modelerFloorStyle.outerWidth ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().number}`);if(void 0!==(null===(T=e.modelerFloorStyle)||void 0===T?void 0:T.cornerRadius)&&"number"!=typeof e.modelerFloorStyle.cornerRadius)throw ct&&ct.func(`modelerFloorStyle.cornerRadius ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().number}`),new Error(`modelerFloorStyle.cornerRadius ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().number}`);if(void 0!==(null===(D=e.modelerFloorStyle)||void 0===D?void 0:D.cornerSplitNum)&&"number"!=typeof e.modelerFloorStyle.cornerSplitNum)throw ct&&ct.func(`modelerFloorStyle.cornerSplitNum ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().number}`),new Error(`modelerFloorStyle.cornerSplitNum ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().number}`);if(void 0!==(null===(N=e.modelerFloorStyle)||void 0===N?void 0:N.bUseVertexCorner)&&"boolean"!=typeof e.modelerFloorStyle.bUseVertexCorner)throw ct&&ct.func(`modelerFloorStyle.bUseVertexCorner ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().boolean}`),new Error(`modelerFloorStyle.bUseVertexCorner ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().boolean}`);if(void 0!==(null===(P=e.modelerFloorStyle)||void 0===P?void 0:P.bAlignZ)&&"boolean"!=typeof e.modelerFloorStyle.bAlignZ)throw ct&&ct.func(`modelerFloorStyle.bAlignZ ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().boolean}`),new Error(`modelerFloorStyle.bAlignZ ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().boolean}`);if(void 0!==(null===(F=e.modelerFloorStyle)||void 0===F?void 0:F.bInverseNormal)&&"boolean"!=typeof e.modelerFloorStyle.bInverseNormal)throw ct&&ct.func(`modelerFloorStyle.bInverseNormal ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().boolean}`),new Error(`modelerFloorStyle.bInverseNormal ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().boolean}`);if(void 0!==(null===(q=e.modelerFloorStyle)||void 0===q?void 0:q.innerRoughness)&&"number"!=typeof e.modelerFloorStyle.innerRoughness)throw ct&&ct.func(`modelerFloorStyle.innerRoughness ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().number}`),new Error(`modelerFloorStyle.innerRoughness ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().number}`);if(void 0!==(null===(H=e.modelerFloorStyle)||void 0===H?void 0:H.outerRoughness)&&"number"!=typeof e.modelerFloorStyle.outerRoughness)throw ct&&ct.func(`modelerFloorStyle.outerRoughness ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().number}`),new Error(`modelerFloorStyle.outerRoughness ${null===(Y=li.getInstance())||void 0===Y?void 0:Y.GetCommonErr().number}`);if(void 0!==(null===(Q=e.modelerFloorStyle)||void 0===Q?void 0:Q.innerNormal)&&"number"!=typeof e.modelerFloorStyle.innerNormal)throw ct&&ct.func(`modelerFloorStyle.innerNormal ${null===(J=li.getInstance())||void 0===J?void 0:J.GetCommonErr().number}`),new Error(`modelerFloorStyle.innerNormal ${null===(X=li.getInstance())||void 0===X?void 0:X.GetCommonErr().number}`);if(void 0!==(null===(K=e.modelerFloorStyle)||void 0===K?void 0:K.outerNormal)&&"number"!=typeof e.modelerFloorStyle.outerNormal)throw ct&&ct.func(`modelerFloorStyle.outerNormal ${null===(ee=li.getInstance())||void 0===ee?void 0:ee.GetCommonErr().number}`),new Error(`modelerFloorStyle.outerNormal ${null===(te=li.getInstance())||void 0===te?void 0:te.GetCommonErr().number}`);if(void 0!==(null===(oe=e.modelerFloorStyle)||void 0===oe?void 0:oe.innerBrightness)&&"number"!=typeof e.modelerFloorStyle.innerBrightness)throw ct&&ct.func(`modelerFloorStyle.innerBrightness ${null===(ie=li.getInstance())||void 0===ie?void 0:ie.GetCommonErr().number}`),new Error(`modelerFloorStyle.innerBrightness ${null===(ne=li.getInstance())||void 0===ne?void 0:ne.GetCommonErr().number}`);if(void 0!==(null===(re=e.modelerFloorStyle)||void 0===re?void 0:re.outerBrightness)&&"number"!=typeof e.modelerFloorStyle.outerBrightness)throw ct&&ct.func(`modelerFloorStyle.outerBrightness ${null===(ae=li.getInstance())||void 0===ae?void 0:ae.GetCommonErr().number}`),new Error(`modelerFloorStyle.outerBrightness ${null===(se=li.getInstance())||void 0===se?void 0:se.GetCommonErr().number}`);if(void 0!==(null===(le=e.modelerFloorStyle)||void 0===le?void 0:le.outerUVTransform)){if("object"!=typeof e.modelerFloorStyle.outerUVTransform)throw ct&&ct.func(`modelerFloorStyle.outerUVTransform ${null===(de=li.getInstance())||void 0===de?void 0:de.GetCommonErr().object}`),new Error(`modelerFloorStyle.outerUVTransform ${null===(ce=li.getInstance())||void 0===ce?void 0:ce.GetCommonErr().object}`);const t=this.ModelerFloorAtom.outerUVTransform;if(Object.keys(e.modelerFloorStyle.outerUVTransform).forEach(e=>{var o,i;if(void 0===t[e])throw ct&&ct.func(`modelerFloorStyle.outerUVTransform.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerFloorStyle.outerUVTransform.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(ue=e.modelerFloorStyle.outerUVTransform)||void 0===ue?void 0:ue.rotation)){if("object"!=typeof e.modelerFloorStyle.outerUVTransform.rotation)throw ct&&ct.func(`modelerFloorStyle.outerUVTransform.rotation ${null===(ve=li.getInstance())||void 0===ve?void 0:ve.GetCommonErr().object}`),new Error(`modelerFloorStyle.outerUVTransform.rotation ${null===(he=li.getInstance())||void 0===he?void 0:he.GetCommonErr().object}`);const t=this.ModelerFloorAtom.outerUVTransform.rotation;if(Object.keys(e.modelerFloorStyle.outerUVTransform.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw ct&&ct.func(`modelerFloorStyle.outerUVTransform.rotation.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerFloorStyle.outerUVTransform.rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(me=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===me?void 0:me.x)&&"number"!=typeof e.modelerFloorStyle.outerUVTransform.rotation.x)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.rotation.x ${null===(ge=li.getInstance())||void 0===ge?void 0:ge.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.outerUVTransform.rotation.x ${null===(fe=li.getInstance())||void 0===fe?void 0:fe.GetCommonErr().number}`);if(void 0!==(null===(ye=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===ye?void 0:ye.y)&&"number"!=typeof e.modelerFloorStyle.outerUVTransform.rotation.y)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.rotation.y ${null===(be=li.getInstance())||void 0===be?void 0:be.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.outerUVTransform.rotation.y ${null===(pe=li.getInstance())||void 0===pe?void 0:pe.GetCommonErr().number}`);if(void 0!==(null===(Ee=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===Ee?void 0:Ee.z)&&"number"!=typeof e.modelerFloorStyle.outerUVTransform.rotation.z)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.rotation.z ${null===(we=li.getInstance())||void 0===we?void 0:we.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.outerUVTransform.rotation.z ${null===(Ie=li.getInstance())||void 0===Ie?void 0:Ie.GetCommonErr().number}`);if(void 0!==(null===(je=e.modelerFloorStyle.outerUVTransform.rotation)||void 0===je?void 0:je.w)&&"number"!=typeof e.modelerFloorStyle.outerUVTransform.rotation.w)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.rotation.w ${null===(Se=li.getInstance())||void 0===Se?void 0:Se.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.outerUVTransform.rotation.w ${null===(Ce=li.getInstance())||void 0===Ce?void 0:Ce.GetCommonErr().number}`)}if(void 0!==(null===(Ge=e.modelerFloorStyle.outerUVTransform)||void 0===Ge?void 0:Ge.translation)){if("object"!=typeof e.modelerFloorStyle.outerUVTransform.translation||void 0===e.modelerFloorStyle.outerUVTransform.translation.length)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.translation ${null===(Oe=li.getInstance())||void 0===Oe?void 0:Oe.GetCommonErr().array}`),new Error(`opt.modelerFloorStyle.outerUVTransform.translation ${null===($e=li.getInstance())||void 0===$e?void 0:$e.GetCommonErr().array}`);if(3!==e.modelerFloorStyle.outerUVTransform.translation.filter(e=>"number"==typeof e).length)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.translation ${null===(Te=li.getInstance())||void 0===Te?void 0:Te.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.outerUVTransform.translation ${null===(Me=li.getInstance())||void 0===Me?void 0:Me.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null===(Ae=e.modelerFloorStyle.outerUVTransform)||void 0===Ae?void 0:Ae.scale3d)){if("object"!=typeof e.modelerFloorStyle.outerUVTransform.scale3d||void 0===e.modelerFloorStyle.outerUVTransform.scale3d.length)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.scale3d ${null===(De=li.getInstance())||void 0===De?void 0:De.GetCommonErr().array}`),new Error(`opt.modelerFloorStyle.outerUVTransform.scale3d ${null===(Re=li.getInstance())||void 0===Re?void 0:Re.GetCommonErr().array}`);if(3!==e.modelerFloorStyle.outerUVTransform.scale3d.filter(e=>"number"==typeof e).length)throw ct&&ct.func(`opt.modelerFloorStyle.outerUVTransform.scale3d ${null===(xe=li.getInstance())||void 0===xe?void 0:xe.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.outerUVTransform.scale3d ${null===(Ne=li.getInstance())||void 0===Ne?void 0:Ne.GetCommonErr().arrayNumberLength} 3`)}}if(void 0!==(null===(Le=e.modelerFloorStyle)||void 0===Le?void 0:Le.innerUVTransform)){if("object"!=typeof e.modelerFloorStyle.innerUVTransform)throw ct&&ct.func(`modelerFloorStyle.innerUVTransform ${null===(Ve=li.getInstance())||void 0===Ve?void 0:Ve.GetCommonErr().object}`),new Error(`modelerFloorStyle.innerUVTransform ${null===(Pe=li.getInstance())||void 0===Pe?void 0:Pe.GetCommonErr().object}`);const t=this.ModelerFloorAtom.innerUVTransform;if(Object.keys(e.modelerFloorStyle.innerUVTransform).forEach(e=>{var o,i;if(void 0===t[e])throw ct&&ct.func(`modelerFloorStyle.innerUVTransform.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerFloorStyle.innerUVTransform.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(ke=e.modelerFloorStyle.innerUVTransform)||void 0===ke?void 0:ke.rotation)){if("object"!=typeof e.modelerFloorStyle.innerUVTransform.rotation)throw ct&&ct.func(`modelerFloorStyle.innerUVTransform.rotation ${null===(_e=li.getInstance())||void 0===_e?void 0:_e.GetCommonErr().object}`),new Error(`modelerFloorStyle.innerUVTransform.rotation ${null===(Fe=li.getInstance())||void 0===Fe?void 0:Fe.GetCommonErr().object}`);const t=this.ModelerFloorAtom.innerUVTransform.rotation;if(Object.keys(e.modelerFloorStyle.innerUVTransform.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw ct&&ct.func(`modelerFloorStyle.innerUVTransform.rotation.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`modelerFloorStyle.innerUVTransform.rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(Ue=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===Ue?void 0:Ue.x)&&"number"!=typeof e.modelerFloorStyle.innerUVTransform.rotation.x)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.rotation.x ${null===(Be=li.getInstance())||void 0===Be?void 0:Be.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.innerUVTransform.rotation.x ${null===(qe=li.getInstance())||void 0===qe?void 0:qe.GetCommonErr().number}`);if(void 0!==(null===(ze=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===ze?void 0:ze.y)&&"number"!=typeof e.modelerFloorStyle.innerUVTransform.rotation.y)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.rotation.y ${null===(We=li.getInstance())||void 0===We?void 0:We.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.innerUVTransform.rotation.y ${null===(He=li.getInstance())||void 0===He?void 0:He.GetCommonErr().number}`);if(void 0!==(null===(Ze=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===Ze?void 0:Ze.z)&&"number"!=typeof e.modelerFloorStyle.innerUVTransform.rotation.z)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.rotation.z ${null===(Ye=li.getInstance())||void 0===Ye?void 0:Ye.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.innerUVTransform.rotation.z ${null===(Qe=li.getInstance())||void 0===Qe?void 0:Qe.GetCommonErr().number}`);if(void 0!==(null===(Je=e.modelerFloorStyle.innerUVTransform.rotation)||void 0===Je?void 0:Je.w)&&"number"!=typeof e.modelerFloorStyle.innerUVTransform.rotation.w)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.rotation.w ${null===(Xe=li.getInstance())||void 0===Xe?void 0:Xe.GetCommonErr().number}`),new Error(`opt.modelerFloorStyle.innerUVTransform.rotation.w ${null===(Ke=li.getInstance())||void 0===Ke?void 0:Ke.GetCommonErr().number}`)}if(void 0!==(null===(et=e.modelerFloorStyle.innerUVTransform)||void 0===et?void 0:et.translation)){if("object"!=typeof e.modelerFloorStyle.innerUVTransform.translation||void 0===e.modelerFloorStyle.innerUVTransform.translation.length)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.translation ${null===(tt=li.getInstance())||void 0===tt?void 0:tt.GetCommonErr().array}`),new Error(`opt.modelerFloorStyle.innerUVTransform.translation ${null===(ot=li.getInstance())||void 0===ot?void 0:ot.GetCommonErr().array}`);if(3!==e.modelerFloorStyle.innerUVTransform.translation.filter(e=>"number"==typeof e).length)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.translation ${null===(it=li.getInstance())||void 0===it?void 0:it.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.innerUVTransform.translation ${null===(nt=li.getInstance())||void 0===nt?void 0:nt.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null===(rt=e.modelerFloorStyle.innerUVTransform)||void 0===rt?void 0:rt.scale3d)){if("object"!=typeof e.modelerFloorStyle.innerUVTransform.scale3d||void 0===e.modelerFloorStyle.innerUVTransform.scale3d.length)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.scale3d ${null===(at=li.getInstance())||void 0===at?void 0:at.GetCommonErr().array}`),new Error(`opt.modelerFloorStyle.innerUVTransform.scale3d ${null===(st=li.getInstance())||void 0===st?void 0:st.GetCommonErr().array}`);if(3!==e.modelerFloorStyle.innerUVTransform.scale3d.filter(e=>"number"==typeof e).length)throw ct&&ct.func(`opt.modelerFloorStyle.innerUVTransform.scale3d ${null===(lt=li.getInstance())||void 0===lt?void 0:lt.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.innerUVTransform.scale3d ${null===(dt=li.getInstance())||void 0===dt?void 0:dt.GetCommonErr().arrayNumberLength} 3`)}}}}}class Qr extends fi{constructor(e){super(e,Yr),this.setType("ModelerFloor")}}class Jr extends Oi{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ProjectModel"}),Object.defineProperty(this,"ProjectModelAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bVisible:!0,entityName:"",customData:""}}),Object.defineProperty(this,"ProjectModelTransformAtom",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0],rotator:{pitch:0,yaw:0,roll:0},scale3d:[1,1,1]}}),this.setObjAtom(this),this.oType="ProjectModel",this.type=Ho.get(this.oType),Ti(this.ProjectModelAtom,this,["bVisible"],[],[]),Ti(this.ProjectModelTransformAtom,this,[],[],[]),this.activeBaseAttributes.push("entityName","location","rotator","scale3d","bVisible","customData"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}GetScheme(){return{ProjectModelAtom:this.ProjectModelAtom,ProjectModelTransformAtom:this.ProjectModelTransformAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.ProjectModelAtom),this.ProjectModelTransformAtom)}SetData(e){this.setEid(e),this.handleAndCheckAtom(this.ProjectModelTransformAtom,e),this.handleAndCheckAtom(this.ProjectModelAtom,e),void 0!==(null==e?void 0:e.customData)&&(this.ProjectModelAtom.customData="object"==typeof e.customData?JSON.stringify(e.customData):e.customData)}generateAtomData(e){const t={},o={},i={};return Gi(o,e),Object.keys(o).length>0&&(t.ProjectModelTransformAtom=o),void 0!==e.bVisible&&(i.bVisible=e.bVisible),void 0!==e.entityName&&(i.entityName=e.entityName),void 0!==e.customData&&(i.customData="object"==typeof e.customData?JSON.stringify(e.customData):e.customData),Object.keys(i).length>0&&(t.ProjectModelAtom=i),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.ProjectModelAtom),this.ProjectModelTransformAtom)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G;const O=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw O&&O.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const $=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===$[e])throw O&&O.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.location){if("object"!=typeof e.location||void 0===e.location.length)throw O&&O.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().locationErr),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw O&&O.func(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().locationErr2),new Error(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().locationErr2)}if(void 0!==e.rotator){if("object"!=typeof e.rotator)throw O&&O.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().rotatorErr),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().rotatorErr);const t={pitch:0,yaw:0,roll:0};if(Object.keys(e.rotator).forEach(e=>{var o,i;if(void 0===t[e])throw O&&O.func(`rotator.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotator.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(c=e.rotator)||void 0===c?void 0:c.pitch)&&"number"!=typeof e.rotator.pitch)throw O&&O.func(`rotator.pitch ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`rotator.pitch ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(void 0!==(null===(h=e.rotator)||void 0===h?void 0:h.yaw)&&"number"!=typeof e.rotator.yaw)throw O&&O.func(`rotator.yaw ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`),new Error(`rotator.yaw ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`);if(void 0!==(null===(f=e.rotator)||void 0===f?void 0:f.roll)&&"number"!=typeof e.rotator.roll)throw O&&O.func(`rotator.roll ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`),new Error(`rotator.roll ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`)}if(void 0!==e.scale3d){if("object"!=typeof e.scale3d||void 0===e.scale3d.length)throw O&&O.func(null===(p=li.getInstance())||void 0===p?void 0:p.getErrorTxt().scale3dErr2),new Error(null===(E=li.getInstance())||void 0===E?void 0:E.getErrorTxt().scale3dErr2);if(3!==e.scale3d.filter(e=>"number"==typeof e).length)throw O&&O.func(null===(w=li.getInstance())||void 0===w?void 0:w.getErrorTxt().scale3dErr2),new Error(null===(I=li.getInstance())||void 0===I?void 0:I.getErrorTxt().scale3dErr2)}if(void 0!==e.bVisible&&"boolean"!=typeof e.bVisible)throw O&&O.func(`bVisible ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().boolean}`),new Error(`bVisible ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().boolean}`);if(void 0!==e.entityName&&"string"!=typeof e.entityName)throw O&&O.func(`entityName ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().string}`),new Error(`entityName ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().string}`)}}class Xr extends fi{constructor(e){super(e,Jr),this.setType("ProjectModel")}}class Kr{validateTiles(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw s&&s.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:{}};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw s&&s.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw s&&s.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`)}}validateSetNodesOutline(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:{},nodeIds:[],bOutline:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw g&&g.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw g&&g.func(`nodeIds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`nodeIds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw g&&g.func(`nodeIds value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`nodeIds value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw g&&g.func(`bOutline ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bOutline ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw g&&g.func(`styleName ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`styleName ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`)}}validateSetNodesHighlight(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:{},nodeIds:[],bHighlight:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw g&&g.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw g&&g.func(`nodeIds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`nodeIds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw g&&g.func(`nodeIds value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`nodeIds value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw g&&g.func(`bHighlight ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bHighlight ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw g&&g.func(`styleName ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`styleName ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`)}}validateRemoveVisibilityGroup(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw d&&d.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:{},groupNames:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw d&&d.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw d&&d.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.groupNames)&&"string"!=typeof e.groupNames)throw d&&d.func(`groupNames ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`groupNames ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`)}}validateUpdateVisibilityGroup(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E;const w=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw w&&w.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:{},addNodes:[],removeNodes:[],bVisible:!1,newGroupName:"",groupName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw w&&w.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw w&&w.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.addNodes)){if("object"!=typeof e.addNodes||void 0===e.addNodes.length)throw w&&w.func(`addNodes ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`addNodes ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.addNodes.filter(e=>"string"==typeof e).length!==e.addNodes.length)throw w&&w.func(`addNodes value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`addNodes value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.removeNodes)){if("object"!=typeof e.removeNodes||void 0===e.removeNodes.length)throw w&&w.func(`removeNodes ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`),new Error(`removeNodes ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().array}`);if(e.removeNodes.filter(e=>"string"==typeof e).length!==e.removeNodes.length)throw w&&w.func(`removeNodes value ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayString}`),new Error(`removeNodes value ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw w&&w.func(`bVisible ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().boolean}`),new Error(`bVisible ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.newGroupName)&&"string"!=typeof e.newGroupName)throw w&&w.func(`newGroupName ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().string}`),new Error(`newGroupName ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.groupName)&&"string"!=typeof e.groupName)throw w&&w.func(`groupName ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().string}`),new Error(`groupName ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`)}}validateAddVisibilityGroup(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:{},nodeIds:[],bVisible:!1,groupName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw g&&g.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw g&&g.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw g&&g.func(`layers value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`layers value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw g&&g.func(`bVisible ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bVisible ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.groupName)&&"string"!=typeof e.groupName)throw g&&g.func(`groupName ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`groupName ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`)}}validateSetNodesVisibility(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={entity:{},nodeIds:[],bVisible:!1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw h&&h.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw h&&h.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw h&&h.func(`layers value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`layers value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw h&&h.func(`bVisible ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bVisible ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`)}}validateSetNodesOutlineEntity(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},nodeIds:[],bOutline:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw h&&h.func(`layers ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`layers ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw h&&h.func(`layers value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`layers value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw h&&h.func(`bOutline ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bOutline ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw h&&h.func(`styleName ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`styleName ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`)}}validateSetNodesHighlightEntity(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},nodeIds:[],bHighlight:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw h&&h.func(`layers ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`layers ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw h&&h.func(`layers value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`layers value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw h&&h.func(`bHighlight ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bHighlight ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw h&&h.func(`styleName ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`styleName ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`)}}validateSetNodesVisibilityEntity(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw u&&u.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},nodeIds:[],bVisible:!1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw u&&u.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw u&&u.func(`layers ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`layers ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw u&&u.func(`layers value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`layers value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw u&&u.func(`bVisible ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bVisible ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`)}}}class ea extends Oi{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ProjectInstance"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"NodeValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Kr}),Object.defineProperty(this,"ProjectInstanceAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bVisible:!0,entityName:"",customData:"",hiddenNodes:[]}}),Object.defineProperty(this,"ProjectInstanceTransformAtom",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0],rotator:{pitch:0,yaw:0,roll:0},scale3d:[1,1,1]}}),this.setObjAtom(this),this.oType="ProjectInstance",this.type=Ho.get(this.oType),Ti(this.ProjectInstanceAtom,this,["bVisible"],[],[]),Ti(this.ProjectInstanceTransformAtom,this,[],[],[]),this.activeBaseAttributes.push("entityName","location","rotator","scale3d","bVisible","customData","hiddenNodes"),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}GetScheme(){return{ProjectInstanceAtom:this.ProjectInstanceAtom,ProjectInstanceTransformAtom:this.ProjectInstanceTransformAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.ProjectInstanceAtom),this.ProjectInstanceTransformAtom)}SetData(e){this.setEid(e),this.handleAndCheckAtom(this.ProjectInstanceTransformAtom,e),this.handleAndCheckAtom(this.ProjectInstanceAtom,e),void 0!==(null==e?void 0:e.customData)&&(this.ProjectInstanceAtom.customData="object"==typeof e.customData?JSON.stringify(e.customData):e.customData)}generateAtomData(e){const t={},o={},i={};return Gi(o,e),Object.keys(o).length>0&&(t.ProjectInstanceTransformAtom=o),void 0!==e.bVisible&&(i.bVisible=e.bVisible),void 0!==e.entityName&&(i.entityName=e.entityName),void 0!==e.customData&&(i.customData="object"==typeof e.customData?JSON.stringify(e.customData):e.customData),void 0!==e.hiddenNodes&&(i.hiddenNodes=e.hiddenNodes),Object.keys(i).length>0&&(t.ProjectInstanceAtom=i),t}SetNodesOutline(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesOutlineEntity(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesHighlight(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesHighlightEntity(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesVisibility(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesVisibilityEntity(e);const t=JSON.parse(JSON.stringify(this.ProjectInstanceAtom.hiddenNodes));return e.bVisible?e.nodeIds.forEach(e=>{const o=this.ProjectInstanceAtom.hiddenNodes.findIndex(t=>t===e);o>=0&&t.splice(o,1)}):e.nodeIds.forEach(e=>{this.ProjectInstanceAtom.hiddenNodes.findIndex(t=>t===e)<0&&t.push(e)}),yield this.SetHiddenNodes(t)})}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.ProjectInstanceAtom),this.ProjectInstanceTransformAtom)}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M;const A=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw A&&A.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const D=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===D[e])throw A&&A.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.location){if("object"!=typeof e.location||void 0===e.location.length)throw A&&A.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().locationErr),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw A&&A.func(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().locationErr2),new Error(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().locationErr2)}if(void 0!==e.rotator){if("object"!=typeof e.rotator)throw A&&A.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().rotatorErr),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().rotatorErr);const t={pitch:0,yaw:0,roll:0};if(Object.keys(e.rotator).forEach(e=>{var o,i;if(void 0===t[e])throw A&&A.func(`rotator.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotator.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(c=e.rotator)||void 0===c?void 0:c.pitch)&&"number"!=typeof e.rotator.pitch)throw A&&A.func(`rotator.pitch ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`rotator.pitch ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(void 0!==(null===(h=e.rotator)||void 0===h?void 0:h.yaw)&&"number"!=typeof e.rotator.yaw)throw A&&A.func(`rotator.yaw ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`),new Error(`rotator.yaw ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`);if(void 0!==(null===(f=e.rotator)||void 0===f?void 0:f.roll)&&"number"!=typeof e.rotator.roll)throw A&&A.func(`rotator.roll ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`),new Error(`rotator.roll ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`)}if(void 0!==e.scale3d){if("object"!=typeof e.scale3d||void 0===e.scale3d.length)throw A&&A.func(null===(p=li.getInstance())||void 0===p?void 0:p.getErrorTxt().scale3dErr2),new Error(null===(E=li.getInstance())||void 0===E?void 0:E.getErrorTxt().scale3dErr2);if(3!==e.scale3d.filter(e=>"number"==typeof e).length)throw A&&A.func(null===(w=li.getInstance())||void 0===w?void 0:w.getErrorTxt().scale3dErr2),new Error(null===(I=li.getInstance())||void 0===I?void 0:I.getErrorTxt().scale3dErr2)}if(void 0!==e.bVisible&&"boolean"!=typeof e.bVisible)throw A&&A.func(`bVisible ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().boolean}`),new Error(`bVisible ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().boolean}`);if(void 0!==e.entityName&&"string"!=typeof e.entityName)throw A&&A.func(`entityName ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().string}`),new Error(`entityName ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().string}`);if(void 0!==e.hiddenNodes){if("object"!=typeof e.hiddenNodes||void 0===e.hiddenNodes.length)throw A&&A.func(`hiddenNodes ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().array}`),new Error(`hiddenNodes ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().array}`);if(e.hiddenNodes.filter(e=>"string"==typeof e).length!==e.hiddenNodes.length)throw A&&A.func(`hiddenNodes ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().arrayString}`),new Error(`hiddenNodes ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().arrayString}`)}}}class ta extends fi{constructor(e){super(e,ea),this.setType("ProjectInstance")}}class oa extends Qn{constructor(){super(...arguments),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpInstanceEntityAPI"})}DeleteComponents(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`componentNames ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`componentNames ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw t&&t.func(`componentNames ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`),new Error(`componentNames ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`)}const t=yield this.StartApi(this.apiClassName,"DeleteComponents",{eid:this.eid,componentNames:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetComponentsTransform(e){var o,i,n,r;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e)throw t&&t.func(`componentNameToTransform ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`componentNameToTransform ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`)}const t={eid:this.eid,componentNameToTransform:e},a=yield this.StartApi(this.apiClassName,"SetComponentsTransform",t);return yield ei(a,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}DeleteNodes(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`nodeIds ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`nodeIds ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"number"==typeof e).length!==e.length)throw t&&t.func(`nodeIds ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayNumber}`),new Error(`nodeIds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumber}`)}const t=yield this.StartApi(this.apiClassName,"DeleteNodes",{eid:this.eid,nodeIds:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesTransform(e){var o,i,n,r;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===(null==e?void 0:e.length))throw t&&t.func(`nodesTransformInfo ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`nodesTransformInfo ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);e.forEach((e,o)=>{var i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H;if("object"!=typeof e)throw t&&t.func(`nodesTransformInfo[${o}] ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`nodesTransformInfo[${o}] ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const Z={nodeIds:[],rotator:{pitch:0,yaw:0,roll:0},location:[0,0,0],scale3d:[1,1,1]};if(Object.keys(e).forEach(e=>{var i,n;if(void 0===Z[e])throw t&&t.func(`nodesTransformInfo[${o}].${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`),new Error(`nodesTransformInfo[${o}].${e} ${null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().keyErr}`)}),void 0===e.nodeIds)throw t&&t.func(`nodesTransformInfo[${o}].nodeIds ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().required}`),new Error(`nodesTransformInfo[${o}].nodeIds ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`);if("object"!=typeof e.nodeIds||void 0===(null===(s=e.nodeIds)||void 0===s?void 0:s.length))throw t&&t.func(`nodeIds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`),new Error(`nodeIds ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"number"==typeof e).length!==e.nodeIds.length)throw t&&t.func(`nodeIds ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayNumber}`),new Error(`nodeIds ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumber}`);if(void 0===e.location)throw t&&t.func(`nodesTransformInfo[${o}].location ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().required}`),new Error(`nodesTransformInfo[${o}].location ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().required}`);if("object"!=typeof e.location||null==(null===(m=e.location)||void 0===m?void 0:m.length))throw t&&t.func(`nodesTransformInfo[${o}].location ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`nodesTransformInfo[${o}].location ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(3!==e.location.filter(e=>"number"==typeof e).length)throw t&&t.func(`nodesTransformInfo[${o}].location ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 3`),new Error(`nodesTransformInfo[${o}].location ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 3`);if(void 0===e.rotator)throw t&&t.func(`nodesTransformInfo[${o}].rotator ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().required}`),new Error(`nodesTransformInfo[${o}].rotator ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().required}`);if("object"!=typeof e.rotator)throw t&&t.func(`nodesTransformInfo[${o}].rotator ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().object}`),new Error(`nodesTransformInfo[${o}].rotator ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().object}`);if(Object.keys(e.rotator).forEach(e=>{var i,n;if(void 0===Z.rotation[o])throw t&&t.func(`nodesTransformInfo[${o}].rotator.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`),new Error(`nodesTransformInfo[${o}].rotator.${e} ${null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().keyErr}`)}),void 0===(null===(j=e.rotator)||void 0===j?void 0:j.pitch))throw t&&t.func(`nodesTransformInfo[${o}].rotator.pitch ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().required}`),new Error(`nodesTransformInfo[${o}].rotator.pitch ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().required}`);if("number"!=typeof(null===(G=e.rotator)||void 0===G?void 0:G.pitch))throw t&&t.func(`nodesTransformInfo[${o}].rotator.pitch ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().number}`),new Error(`nodesTransformInfo[${o}].rotator.pitch ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().number}`);if(void 0===(null===(T=e.rotator)||void 0===T?void 0:T.yaw))throw t&&t.func(`nodesTransformInfo[${o}].rotator.yaw ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().required}`),new Error(`nodesTransformInfo[${o}].rotator.yaw ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().required}`);if("number"!=typeof(null===(D=e.rotator)||void 0===D?void 0:D.yaw))throw t&&t.func(`nodesTransformInfo[${o}].rotator.yaw ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().number}`),new Error(`nodesTransformInfo[${o}].rotator.yaw ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().number}`);if(void 0===(null===(N=e.rotator)||void 0===N?void 0:N.roll))throw t&&t.func(`nodesTransformInfo[${o}].rotator.roll ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().required}`),new Error(`nodesTransformInfo[${o}].rotator.roll ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().required}`);if("number"!=typeof(null===(P=e.rotator)||void 0===P?void 0:P.roll))throw t&&t.func(`nodesTransformInfo[${o}].rotator.roll ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().number}`),new Error(`nodesTransformInfo[${o}].rotator.roll ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().number}`);if(void 0===e.scale3d)throw t&&t.func(`nodesTransformInfo[${o}].scale3d ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().required}`),new Error(`nodesTransformInfo[${o}].scale3d ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().required}`);if("object"!=typeof e.scale3d||null==(null===(B=e.scale3d)||void 0===B?void 0:B.length))throw t&&t.func(`nodesTransformInfo[${o}].scale3d ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().array}`),new Error(`nodesTransformInfo[${o}].scale3d ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().array}`);if(3!==e.scale3d.filter(e=>"number"==typeof e).length)throw t&&t.func(`nodesTransformInfo[${o}].scale3d ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().arrayNumberLength} 3`),new Error(`nodesTransformInfo[${o}].scale3d ${null===(H=li.getInstance())||void 0===H?void 0:H.GetCommonErr().arrayNumberLength} 3`)})}const t=yield this.StartApi(this.apiClassName,"SetNodesTransform",{eid:this.eid,nodesTransformInfo:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}OutlineComponents(e,o=!0){var i,n,r,a,s,l,d,c;return t(this,void 0,void 0,function*(){if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){const t=null===(n=li.getInstance())||void 0===n?void 0:n.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`componentNames ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`componentNames ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw t&&t.func(`componentNames ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`componentNames ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`);if("boolean"!=typeof o)throw t&&t.func(`bOutline ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bOutline ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`)}const t=yield this.StartApi(this.apiClassName,"OutlineComponents",{eid:this.eid,componentNames:e,bOutline:o});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FocusComponents(e){var o,i,n,r,a,s;return t(this,void 0,void 0,function*(){if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){const t=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw t&&t.func(`componentNames ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`componentNames ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw t&&t.func(`componentNames ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`),new Error(`componentNames ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`)}const t=yield this.StartApi(this.apiClassName,"FocusComponents",{eid:this.eid,componentNames:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class ia extends oa{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"StaticInstance"}),Object.defineProperty(this,"AssetsAtom",{enumerable:!0,configurable:!0,writable:!0,value:{seedIds:[]}}),Object.defineProperty(this,"IsmEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{instanceComponentInfos:[]}}),this.setObjAtom(this),this.oType="StaticInstance",this.type=Ho.get(this.oType),Ti(this.AssetsAtom,this,[],[],[]),Ti(this.IsmEntityAtom,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}GetScheme(){return{AssetsAtom:this.AssetsAtom,IsmEntityAtom:this.IsmEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedIds:this.AssetsAtom.seedIds,instanceComponentInfos:this.IsmEntityAtom.instanceComponentInfos})}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.seedIds)&&(this.AssetsAtom.seedIds=e.seedIds),void 0!==(null==e?void 0:e.instanceComponentInfos)&&(this.IsmEntityAtom.instanceComponentInfos=e.instanceComponentInfos)}generateAtomData(e){const t={},o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),e.seedIds&&(s.seedIds=e.seedIds),Object.keys(s).length>0&&(t.AssetsAtom=s),e.instanceComponentInfos&&(l.instanceComponentInfos=e.instanceComponentInfos),Object.keys(l).length>0&&(t.IsmEntityAtom=l),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedIds:this.AssetsAtom.seedIds,instanceComponentInfos:this.IsmEntityAtom.instanceComponentInfos})}Validate(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw d&&d.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const c=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===c[e])throw d&&d.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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.seedIds){if("object"!=typeof e.seedIds||void 0===(null===(n=e.seedIds)||void 0===n?void 0:n.length))throw d&&d.func(`seedIds ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`seedIds ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.seedIds.filter(e=>"string"==typeof e).length!==e.seedIds.length)throw d&&d.func(`seedIds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`seedIds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`)}}}class na extends fi{constructor(e){super(e,ia),this.setType("StaticInstance")}}class ra extends ci{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,"ProjectModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ProjectInstance",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"StaticInstance",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ModelValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Mr}),this.RequestEntity=new di(e),this.Static=new Dr(e),this.Hierarchy=new xr(e),this.Skeletal=new Lr(e),this.Vegetation=new kr(e),this.ModelerEmbank=new Fr(e),this.ModelerWater=new qr(e),this.ModelerRiver=new Wr(e),this.ModelerFence=new Zr(e),this.ModelerFloor=new Qr(e),this.ProjectModel=new Xr(e),this.ProjectInstance=new ta(e),this.StaticInstance=new na(e)}ClearByTypes(e){return t(this,void 0,void 0,function*(){if(this.ModelValidate.validateClearByTypes(e),(e=e.filter(e=>{if(this.obj.RegisterObj.GetTypes().find(t=>t.name===e&&"Model"===t.category))return e})).length<=0)return{success:!1,message:"Type is empty"};const t=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e)));if(t.success)for(let t=0;t<e.length;t++){const o=this.obj.RegisterObj.GetTypes().find(o=>o.name===e[t]);o&&(yield o.object.ClearCache())}return t})}Clear(){return t(this,void 0,void 0,function*(){const e=this.obj.RegisterObj.GetTypes().filter(e=>"Model"===e.category),t=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e.name)));return t.success&&(yield this.ClearCache()),t})}ClearCache(){return t(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 aa extends Qn{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,"NodeValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Kr}),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=Ho.get(this.oType),Ti(this.AesTilesEntityAtom,this,[],[],[]),Ti(this.AssetsAtom,this,[],[],[]),Ti(this.AesTilesVisualAtom,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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){const t={},o={},i={},n={},r={},a={},s={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleLockedAtom(r,e),Object.keys(r).length>0&&(t.EntityFlagAtom=r),this.handleEntityOutlinerAtom(a,e),Object.keys(a).length>0&&(t.EntityOutlinerAtom=a),void 0!==e.spaceId&&(s.spaceId=e.spaceId),void 0!==e.rangeBox&&(s.rangeBox=e.rangeBox),void 0!==e.version&&(s.version=e.version),Object.keys(s).length>0&&(t.AesTilesEntityAtom=s),t}SetNodesOutline(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesOutlineEntity(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesHighlight(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesHighlightEntity(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesVisibility(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesVisibilityEntity(e);const t={nodes:e.nodeIds,aesTilesEid:this.eid};t.bVisible=void 0!==e.bVisible&&e.bVisible;const o=yield this.StartApi(this.apiClassName,"SetNodesVisibility",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}generateObjectData(e,t=this){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?"visualGroupToNodes"===o?t[o]=e[o]:this.generateObjectData(e[o],t[o]):t[o]=e[o])})}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){var t,o,i,n,r,a,s,l,d;const c=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw c&&c.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const u=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===u[e])throw c&&c.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`version ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(void 0!==e.rangeBox){if("object"!=typeof e.rangeBox||void 0===e.rangeBox.length)throw c&&c.func(`rangeBox ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`rangeBox ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);if(4!==e.rangeBox.length)throw c&&c.func(`rangeBox ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayLength} 4`),new Error(`rangeBox ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayLength} 4`);e.rangeBox.forEach(e=>{var t,o;if(2!==e.filter(e=>"number"==typeof e).length)throw c&&c.func(`rangeBox value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`rangeBox value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().arrayNumberLength} 2`)})}}}class sa{validateTiles(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&void 0!==e&&"object"!=typeof e)throw r&&r.func(`tiles ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`tiles ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`)}validateSetLayersOutline(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},layers:[],bOutline:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw h&&h.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.layers)){if("object"!=typeof e.layers||void 0===e.layers.length)throw h&&h.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);e.layers.forEach(e=>{var t,o;if(!li.layersType.find(t=>t===e))throw h&&h.func(`layers.${e} is illegal. ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().range} ${li.layersType.toString()}`),new Error(`layers.${e} is illegal. ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().range} ${li.layersType.toString()}`)})}if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw h&&h.func(`bOutline ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bOutline ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw h&&h.func(`styleName ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`styleName ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`)}}validateSetLayersHighlight(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},layers:[],bHighlight:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw h&&h.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.layers)){if("object"!=typeof e.layers||void 0===e.layers.length)throw h&&h.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);e.layers.forEach(e=>{var t,o;if(!li.layersType.find(t=>t===e))throw h&&h.func(`layers.${e} is illegal. ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().range} ${li.layersType.toString()}`),new Error(`layers.${e} is illegal. ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().range} ${li.layersType.toString()}`)})}if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw h&&h.func(`bHighlight ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bHighlight ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw h&&h.func(`styleName ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`styleName ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`)}}validateSetLayersVisibility(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw u&&u.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},layers:[],bVisible:!1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw u&&u.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw u&&u.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.layers)){if("object"!=typeof e.layers||void 0===e.layers.length)throw u&&u.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);e.layers.forEach(e=>{var t,o;if(!li.layersType.find(t=>t===e))throw u&&u.func(`layers.${e} is illegal. ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().range} ${li.layersType.toString()}`),new Error(`layers.${e} is illegal. ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().range} ${li.layersType.toString()}`)})}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw u&&u.func(`bVisible ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bVisible ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`)}}validateCreateAesTilesEntityWithOutGRPC(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw s&&s.func(`uri ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`uri ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("string"!=typeof e)throw s&&s.func(`uri ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`uri ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`)}}validateSetNodesOutline(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},nodeIds:[],bOutline:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw g&&g.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw g&&g.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw g&&g.func(`layers value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`layers value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw g&&g.func(`bOutline ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bOutline ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw g&&g.func(`styleName ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`styleName ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`)}}validateSetNodesHighlight(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},nodeIds:[],bHighlight:!1,styleName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw g&&g.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw g&&g.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw g&&g.func(`layers value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`layers value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw g&&g.func(`bHighlight ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bHighlight ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw g&&g.func(`styleName ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`styleName ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`)}}validateRemoveVisibilityGroup(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw d&&d.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},groupNames:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw d&&d.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw d&&d.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.groupNames)&&"string"!=typeof e.groupNames)throw d&&d.func(`groupNames ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`groupNames ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`)}}validateUpdateVisibilityGroup(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E;const w=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw w&&w.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},addNodes:[],removeNodes:[],bVisible:!1,newGroupName:"",groupName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw w&&w.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw w&&w.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.addNodes)){if("object"!=typeof e.addNodes||void 0===e.addNodes.length)throw w&&w.func(`addNodes ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`addNodes ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.addNodes.filter(e=>"string"==typeof e).length!==e.addNodes.length)throw w&&w.func(`addNodes value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`addNodes value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.removeNodes)){if("object"!=typeof e.removeNodes||void 0===e.removeNodes.length)throw w&&w.func(`removeNodes ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`),new Error(`removeNodes ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().array}`);if(e.removeNodes.filter(e=>"string"==typeof e).length!==e.removeNodes.length)throw w&&w.func(`removeNodes value ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayString}`),new Error(`removeNodes value ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw w&&w.func(`bVisible ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().boolean}`),new Error(`bVisible ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.newGroupName)&&"string"!=typeof e.newGroupName)throw w&&w.func(`newGroupName ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().string}`),new Error(`newGroupName ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.groupName)&&"string"!=typeof e.groupName)throw w&&w.func(`groupName ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().string}`),new Error(`groupName ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().string}`)}}validateAddVisibilityGroup(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw g&&g.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},nodeIds:[],bVisible:!1,groupName:""};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw g&&g.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw g&&g.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw g&&g.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw g&&g.func(`layers value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`layers value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw g&&g.func(`bVisible ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bVisible ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.groupName)&&"string"!=typeof e.groupName)throw g&&g.func(`groupName ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().string}`),new Error(`groupName ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().string}`)}}validateSetNodesVisibility(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={tiles:{},nodeIds:[],bVisible:!1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw h&&h.func(`tiles ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`tiles ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw h&&h.func(`layers ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`layers ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw h&&h.func(`layers value ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`),new Error(`layers value ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().arrayString}`)}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw h&&h.func(`bVisible ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bVisible ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`)}}}class la extends fi{constructor(e){super(e,aa),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new sa}),this.setType("Tiles")}ActivateAesTiles(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={eid:""};if(void 0!==e)t.eid=e.eid;else{const e=yield this.GetTiles();t.eid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"ActivateAesTiles",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}DeactivateAesTiles(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={eid:""};if(void 0!==e)t.eid=e.eid;else{const e=yield this.GetTiles();t.eid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"DeactivateAesTiles",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}IsActivated(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={eid:""};if(void 0!==e)t.eid=e.eid;else{const e=yield this.GetTiles();t.eid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"IsActivated",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLayersOutline(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetLayersOutline(e);const t={layers:e.layers};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetLayersOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLayersHighlight(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetLayersHighlight(e);const t={layers:e.layers};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetLayersHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLayersVisibility(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetLayersVisibility(e);const t={layers:e.layers};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bVisible=null===(o=e.bVisible)||void 0===o||o;const i=yield this.StartApi(this.apiClassName,"SetLayersVisibility",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetLayers(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={aesTilesEid:""};if(void 0!==e)t.aesTilesEid=e.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"GetLayers",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CreateAesTilesEntityWithOutGRPC(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateCreateAesTilesEntityWithOutGRPC(e);const t=yield this.StartApi(this.apiClassName,"CreateAesTilesEntity_WithOutGRPC",{uri:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetTiles(){var e;return t(this,void 0,void 0,function*(){const t=this.findFromMap();if(0===t.length){const t=yield this.obj.Scene.GetTiles();return t.success&&(null===(e=t.result[0])||void 0===e?void 0:e.Tiles)?t.result[0].Tiles:[]}return t.map(e=>e.object)})}}class da extends ci{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 sa})}SetNodesOutline(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesOutline(e);const t={nodeIds:e.nodeIds};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesHighlight(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesHighlight(e);const t={nodeIds:e.nodeIds};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RemoveVisibilityGroup(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateRemoveVisibilityGroup(e);const t={};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}e.groupNames&&(t.groupNames=e.groupNames);const o=yield this.StartApi(this.apiClassName,"RemoveVisibilityGroup",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UpdateVisibilityGroup(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateUpdateVisibilityGroup(e);const t={};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}e.newGroupName&&(t.newGroupName=e.newGroupName),e.groupName&&(t.groupName=e.groupName),e.addNodes&&(t.addNodes=e.addNodes),e.removeNodes&&(t.removeNodes=e.removeNodes),void 0!==e.bVisible&&(t.bVisible=e.bVisible);const o=yield this.StartApi(this.apiClassName,"UpdateVisibilityGroup",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetVisibilityGroup(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={aesTilesEid:""};if(void 0!==e)t.aesTilesEid=e.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"GetVisibilityGroup",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}AddVisibilityGroup(e){var o,i;return t(this,void 0,void 0,function*(){this.TilesValidate.validateAddVisibilityGroup(e);const t={nodeIds:e.nodeIds};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.groupName=null!==(o=e.groupName)&&void 0!==o?o:"None",t.bVisible=null===(i=e.bVisible)||void 0===i||i;const n=yield this.StartApi(this.apiClassName,"AddVisibilityGroup",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesVisibility(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesVisibility(e);const t={nodes:e.nodeIds};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bVisible=void 0!==e.bVisible&&e.bVisible;const o=yield this.StartApi(this.apiClassName,"SetNodesVisibility",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class ca extends ci{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"NodeValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Kr})}SetNodesOutline(e,o="Tiles"){var i;return t(this,void 0,void 0,function*(){this.NodeValidate.validateSetNodesOutline(e);const t={nodeIds:e.nodeIds};if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}else void 0!==(null==e?void 0:e.entity)&&(t.aesTilesEid=e.entity.eid);t.bOutline=null===(i=e.bOutline)||void 0===i||i,t.styleName=void 0!==e.styleName?e.styleName:"Default";const n=yield this.StartApi(this.apiClassName,"SetNodesOutline",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesHighlight(e,o="Tiles"){var i;return t(this,void 0,void 0,function*(){this.NodeValidate.validateSetNodesHighlight(e);const t={nodeIds:e.nodeIds};if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}else void 0!==(null==e?void 0:e.entity)&&(t.aesTilesEid=e.entity.eid);t.bHighlight=null===(i=e.bHighlight)||void 0===i||i,t.styleName=void 0!==e.styleName?e.styleName:"Default";const n=yield this.StartApi(this.apiClassName,"SetNodesHighlight",t);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RemoveVisibilityGroup(e,o="Tiles"){return t(this,void 0,void 0,function*(){this.NodeValidate.validateRemoveVisibilityGroup(e);const t={};if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}else void 0!==(null==e?void 0:e.entity)&&(t.aesTilesEid=e.entity.eid);e.groupNames&&(t.groupNames=e.groupNames);const i=yield this.StartApi(this.apiClassName,"RemoveVisibilityGroup",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UpdateVisibilityGroup(e,o="Tiles"){return t(this,void 0,void 0,function*(){this.NodeValidate.validateUpdateVisibilityGroup(e);const t={};if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}else void 0!==(null==e?void 0:e.entity)&&(t.aesTilesEid=e.entity.eid);e.newGroupName&&(t.newGroupName=e.newGroupName),e.groupName&&(t.groupName=e.groupName),e.addNodes&&(t.addNodes=e.addNodes),e.removeNodes&&(t.removeNodes=e.removeNodes),void 0!==e.bVisible&&(t.bVisible=e.bVisible);const i=yield this.StartApi(this.apiClassName,"UpdateVisibilityGroup",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetVisibilityGroup(e,o="Tiles"){return t(this,void 0,void 0,function*(){this.NodeValidate.validateTiles(e);const t={aesTilesEid:""};if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}else void 0!==(null==e?void 0:e.entity)&&(t.aesTilesEid=e.entity.eid);const i=yield this.StartApi(this.apiClassName,"GetVisibilityGroup",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}AddVisibilityGroup(e,o="Tiles"){var i,n;return t(this,void 0,void 0,function*(){this.NodeValidate.validateAddVisibilityGroup(e);const t={nodeIds:e.nodeIds};if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}else void 0!==(null==e?void 0:e.entity)&&(t.aesTilesEid=e.entity.eid);t.groupName=null!==(i=e.groupName)&&void 0!==i?i:"None",t.bVisible=null===(n=e.bVisible)||void 0===n||n;const r=yield this.StartApi(this.apiClassName,"AddVisibilityGroup",t);return yield ei(r,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesVisibility(e,o="Tiles"){var i;return t(this,void 0,void 0,function*(){this.NodeValidate.validateSetNodesVisibility(e);const t={nodes:e.nodeIds};if("Project"===o||"Tiles"===o){if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.aesTilesEid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bVisible=void 0!==e.bVisible&&e.bVisible;const i=yield this.StartApi(this.apiClassName,"SetNodesVisibility",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)}if(void 0!==(null==e?void 0:e.entity)){return yield e.entity.SetNodesVisibility({nodeIds:e.nodeIds,bVisible:null!==(i=null==e?void 0:e.bVisible)&&void 0!==i&&i})}return{success:!1,message:"entity is required!"}})}}class ua extends Qn{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"EarthTiles"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new sa}),Object.defineProperty(this,"AssetAtom",{enumerable:!0,configurable:!0,writable:!0,value:{seedId:""}}),Object.defineProperty(this,"AesEarthEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{projectWorldIndex:0}}),Object.defineProperty(this,"AesTilesVisualAtom",{enumerable:!0,configurable:!0,writable:!0,value:{visualGroupToNodes:{},hiddenLayers:[]}}),this.setObjAtom(this),this.oType="EarthTiles",Ti(this.AssetAtom,this,[],[],[]),Ti(this.AesEarthEntityAtom,this,[],[],[]),this.type=Ho.get(this.oType),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}GetScheme(){return{AesEarthEntityAtom:this.AesEarthEntityAtom,AssetAtom:this.AssetAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getTransformData()),this.getOtherData()),this.AesEarthEntityAtom),this.AssetAtom)}SetData(e){this.setEid(e),this.setBasicData(e),this.setTransformData(e),this.setVisibleData(e),this.setIndexData(e),void 0!==e.projectWorldIndex&&(this.AesEarthEntityAtom.projectWorldIndex=e.projectWorldIndex),void 0!==e.seedId&&(this.AssetAtom.seedId=e.seedId)}generateAtomData(e){const t={},o={},i={},n={},r={},a={},s={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleTransformAtom(i,e),Object.keys(i).length>0&&(t.TransformAtom=i),this.handleVisibleAtom(n,e),Object.keys(n).length>0&&(t.VisibleAtom=n),this.handleEntityOutlinerAtom(r,e),Object.keys(r).length>0&&(t.EntityOutlinerAtom=r),void 0!==e.projectWorldIndex&&(a.projectWorldIndex=e.projectWorldIndex),Object.keys(a).length>0&&(t.AesEarthEntityAtom=a),void 0!==e.seedId&&(s.seedId=e.seedId),Object.keys(s).length>0&&(t.AssetAtom=s),t}SetNodesOutline(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.TilesValidate.validateSetNodesOutline(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesHighlight(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.TilesValidate.validateSetNodesHighlight(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesVisibility(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.TilesValidate.validateSetNodesVisibility(e);const t={nodes:e.nodeIds,aesTilesEid:this.eid};t.bVisible=void 0!==e.bVisible&&e.bVisible;const o=yield this.StartApi(this.apiClassName,"SetNodesVisibility",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}generateObjectData(e,t=this){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?"visualGroupToNodes"===o?t[o]=e[o]:this.generateObjectData(e[o],t[o]):t[o]=e[o])})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getTransformData()),this.getOtherData()),this.AesEarthEntityAtom),this.AssetAtom)}Validate(e){var t,o,i,n,r,a,s;const l=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw l&&l.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const d=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===d[e])throw l&&l.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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 l&&l.func(`projectWorldIndex ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`),new Error(`projectWorldIndex ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number}`);if(void 0!==e.seedId&&"string"!=typeof e.seedId)throw l&&l.func(`seedId ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`seedId ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`)}}class va extends fi{constructor(e){super(e,ua),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new sa}),this.setType("EarthTiles")}ActivateAesTiles(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={eid:""};if(void 0!==e)t.eid=e.eid;else{const e=yield this.GetTiles();t.eid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"ActivateAesTiles",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}DeactivateAesTiles(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={eid:""};if(void 0!==e)t.eid=e.eid;else{const e=yield this.GetTiles();t.eid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"DeactivateAesTiles",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}IsActivated(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={eid:""};if(void 0!==e)t.eid=e.eid;else{const e=yield this.GetTiles();t.eid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"IsActivated",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLayersOutline(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetLayersOutline(e);const t={layers:e.layers};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetLayersOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLayersHighlight(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetLayersHighlight(e);const t={layers:e.layers};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetLayersHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLayersVisibility(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetLayersVisibility(e);const t={layers:e.layers};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}t.bVisible=null===(o=e.bVisible)||void 0===o||o;const i=yield this.StartApi(this.apiClassName,"SetLayersVisibility",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetLayers(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);const t={aesTilesEid:""};if(void 0!==e)t.aesTilesEid=e.eid;else{const e=yield this.GetTiles();t.aesTilesEid=e.length>0?e[0].eid:""}const o=yield this.StartApi(this.apiClassName,"GetLayers",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CreateAesTilesEntityWithOutGRPC(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateCreateAesTilesEntityWithOutGRPC(e);const t=yield this.StartApi(this.apiClassName,"CreateAesTilesEntity_WithOutGRPC",{uri:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetTiles(){var e;return t(this,void 0,void 0,function*(){const t=this.findFromMap();if(0===t.length){const t=yield this.obj.Scene.GetTiles();return t.success&&(null===(e=t.result[0])||void 0===e?void 0:e.EarthTiles)?t.result[0].EarthTiles:[]}return t.map(e=>e.object)})}}class ha extends Qn{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=Ho.get(this.oType),Ti(this.AssetAtom,this,[],[],[]),Ti(this.EffectsAtom,this,["bActive"],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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){const t={},o={},i={},n={},r={},a={},s={},l={};return this.handleBasicAtom(i,e),Object.keys(i).length>0&&(t.BasicInfoAtom=i),this.handleTransformAtom(n,e),Object.keys(n).length>0&&(t.TransformAtom=n),this.handleVisibleAtom(r,e),Object.keys(r).length>0&&(t.VisibleAtom=r),this.handleLockedAtom(a,e),Object.keys(a).length>0&&(t.EntityFlagAtom=a),this.handleEntityOutlinerAtom(s,e),Object.keys(s).length>0&&(t.EntityOutlinerAtom=s),e.seedId&&(o.seedId=e.seedId),Object.keys(o).length>0&&(t.AssetAtom=o),void 0!==e.bActive&&(l.bActive=e.bActive),void 0!==e.speed&&(l.speed=e.speed),Object.keys(l).length>0&&(t.EffectsAtom=l),t}GetValidateRules(){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})}Validate(e){var t,o,i,n,r,a,s,l,d;const c=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw c&&c.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const u=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===u[e])throw c&&c.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`seedId ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if(void 0!==e.bActive&&"boolean"!=typeof e.bActive)throw c&&c.func(`bActive ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`),new Error(`bActive ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`);if(void 0!==e.speed&&("number"!=typeof e.speed||e.speed<0))throw c&&c.func(`speed ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().positiveNumber}`),new Error(`speed ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().positiveNumber}`)}}class ma extends fi{constructor(e){super(e,ha),this.setType("Effects")}}class ga{validateObjNodeIds(e,t){var o,i,n,r,a,s,l,d;const c=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw c&&c.func(`obj ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`obj ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if("object"!=typeof t||void 0===t.length)throw c&&c.func(`nodeIds ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`),new Error(`nodeIds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`);if(t.filter(e=>"string"==typeof e).length!==t.length)throw c&&c.func(`nodeIds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`),new Error(`nodeIds ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayString}`)}}}class fa extends ci{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 ga})}Add(e,o){return t(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(e,o);const t=yield this.StartApi(this.apiClassName,"Add",{eid:e.eid,nodeIds:o});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Remove(e,o){return t(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(e,o);const t=yield this.StartApi(this.apiClassName,"Remove",{eid:e.eid,nodeIds:o});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Draw(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"DrawSelection",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"ClearSelection",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}AddDraw(e,o){return t(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(e,o);let t=!0;if((yield this.Add(e,o)).success){(yield this.Draw()).success||(t=!1)}else t=!1;return{success:t,message:""}})}RemoveDraw(e,o){return t(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(e,o);let t=!0;if((yield this.Remove(e,o)).success){(yield this.Draw()).success||(t=!1)}else t=!1;return{success:t,message:""}})}ClearDraw(){return t(this,void 0,void 0,function*(){let e=!0;if((yield this.Clear()).success){(yield this.Draw()).success||(e=!1)}else e=!1;return{success:e,message:""}})}}class ya extends Qn{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=Ho.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 t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpSceneOutlinerAtom.eids}})}SetEids(e){return t(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(e){this.setEid(e),this.setBasicData(e),this.setVisibleData(e),void 0!==e.entities&&(this.entities=e.entities,Object.keys(e.entities).forEach(t=>{this.WdpSceneOutlinerAtom.eids[t]={eids:e.entities[t].map(e=>e.eid)}}))}generateAtomData(e){const t={},o={},i={};return void 0!==e.entityName&&(o.entityName=e.entityName),void 0!==e.customId&&(o.customId=e.customId),void 0!==e.customData&&(o.customData="object"==typeof e.customData?JSON.stringify(e.customData):e.customData),Object.keys(o).length>0&&(t.BasicInfoAtom=o),void 0!==e.entities&&Object.keys(e.entities).forEach(t=>{i.eids={},i.eids[t]={eids:e.entities[t].map(e=>e.eid)}}),Object.keys(i).length>0&&(t.WdpSceneOutlinerAtom=i),t}}class ba extends fi{constructor(e){super(e,ya),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpSceneOutlinerAPI"}),this.setType("Outliner")}Create(e){return t(this,void 0,void 0,function*(){const t=new ya(e);return yield this.obj.Scene.Add(t)})}Get(e){return t(this,void 0,void 0,function*(){if(!e)return{success:!0,result:this.findFromMap()};const t=this.findFromMap(`${e}`);if(t)return{success:!0,result:t};const o=yield this.RequestEntity.GetEntitiesData([`${e}`]);if(!o.success)return{success:!1,message:"Eid is non-existent"};const i=yield ii(o.result.entitiesData[0].WdpSceneOutlinerAtom.eids,this.RequestEntity,this.obj.RegisterObj),n=new ya({eid:e,entities:i,entityName:o.result.entitiesData[0].BasicInfoAtom.entityName,customId:o.result.entitiesData[0].BasicInfoAtom.customId,customData:o.result.entitiesData[0].BasicInfoAtom.customData});return this.addToMap(`${e}`,{object:n}),n.setObj(this.obj),{success:!0,message:"",result:{object:n}}})}GenerateObject(e){return t(this,void 0,void 0,function*(){const t=yield ii(e.entitiesData[0].WdpSceneOutlinerAtom.eids,this.RequestEntity,this.obj.RegisterObj),o=new ya({eid:e.entitiesData[0].Eid,entities:t,entityName:e.entitiesData[0].BasicInfoAtom.entityName,customId:e.entitiesData[0].BasicInfoAtom.customId,customData:e.entitiesData[0].BasicInfoAtom.customData});return this.addToMap(`${e.entitiesData[0].Eid}`,{object:o}),o.setObj(this.obj),{success:!0,message:"",result:{object:o}}})}GetOnly(e){return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`);if(!t)return{success:!1,message:"Eid is illegal"};const o=yield this.RequestEntity.GetEntitiesData([`${e}`]);if(!o.success)return{success:!1,message:"Eid is non-existent"};const i=yield ii(o.result.entitiesData[0].WdpSceneOutlinerAtom.eids,this.RequestEntity,this.obj.RegisterObj);return t.object.SetData({entities:i,entityName:o.result.entitiesData[0].BasicInfoAtom.entityName,customId:o.result.entitiesData[0].BasicInfoAtom.customId,customData:o.result.entitiesData[0].BasicInfoAtom.customData}),{success:!0}})}Move(e,o,i="None"){return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"MoveItems"},n={eids:e.map(e=>e.GetData().eid),position:o,category:i};return yield this.obj.startApi(t,n)})}}class pa extends $i{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=Ho.get(this.oType),Ti(this.WdpGroupTransformAtom,this,[],[],[]),Ti(this.WdpGroupVisibleAtom,this,["bVisible"],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get children(){return this.childrenEntities}set children(e){this.Update({children:e})}GetChildren(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.childrenEntities}})}SetChildren(e){return t(this,void 0,void 0,function*(){return yield this.Update({children: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),Gi(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){const t={},o={},i={},n={},r={},a={},s={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),Gi(i,e),Object.keys(i).length>0&&(t.WdpGroupTransformAtom=i),this.handleVisibleAtom(r,e),Object.keys(r).length>0&&(t.WdpGroupVisibleAtom=r),this.handleLockedAtom(a,e),Object.keys(a).length>0&&(t.EntityFlagAtom=a),this.handleEntityOutlinerAtom(s,e),Object.keys(s).length>0&&(t.EntityOutlinerAtom=s),void 0!==e.children&&(n.childrenEids=e.children.map(e=>e.eid)),Object.keys(n).length>0&&(t.EntityChildrenAtom=n),t}generateObjectData(e,t=this.atomObj){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?this.generateObjectData(e[o],t[o]):(t[o]=e[o],"childrenEids"===o&&(this.childrenEntities=e[o].map(e=>this.obj.ObjectEidMap.get(`${e}`)))))})}UnGroup(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"UnGroup",{eid:this.eid});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Add(e,o=-1){return t(this,void 0,void 0,function*(){const t=yield this.StartApi(this.apiClassName,"Add",{groupEid:this.eid,addToGroupPosition:o,addEids:e.map(e=>e.eid)});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Remove(e){return t(this,void 0,void 0,function*(){let t=!0;const o=this.children.filter(t=>!e.find(e=>e.eid===t.eid));(yield this.SetChildren(o)).success||(t=!1);for(let o=0;o<e.length;o++){(yield e[o].SetParentEid("-1")).success||(t=!1)}return{success:t,message:""}})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.WdpGroupTransformAtom),this.getBasicData()),this.getOtherData()),{children:this.children})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G;const O=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw O&&O.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const $=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===$[e])throw O&&O.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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){if("object"!=typeof e.location||void 0===e.location.length)throw O&&O.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().locationErr),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw O&&O.func(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().locationErr2),new Error(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().locationErr2)}if(void 0!==e.rotator){if("object"!=typeof e.rotator)throw O&&O.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().rotatorErr),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().rotatorErr);const t={pitch:0,yaw:0,roll:0};if(Object.keys(e.rotator).forEach(e=>{var o,i;if(void 0===t[e])throw O&&O.func(`rotator.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotator.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(c=e.rotator)||void 0===c?void 0:c.pitch)&&"number"!=typeof e.rotator.pitch)throw O&&O.func(`rotator.pitch ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`rotator.pitch ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(void 0!==(null===(h=e.rotator)||void 0===h?void 0:h.yaw)&&"number"!=typeof e.rotator.yaw)throw O&&O.func(`rotator.yaw ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`),new Error(`rotator.yaw ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`);if(void 0!==(null===(f=e.rotator)||void 0===f?void 0:f.roll)&&"number"!=typeof e.rotator.roll)throw O&&O.func(`rotator.roll ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`),new Error(`rotator.roll ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`)}if(void 0!==e.scale3d){if("object"!=typeof e.scale3d||void 0===e.scale3d.length)throw O&&O.func(null===(p=li.getInstance())||void 0===p?void 0:p.getErrorTxt().scale3dErr2),new Error(null===(E=li.getInstance())||void 0===E?void 0:E.getErrorTxt().scale3dErr2);if(3!==e.scale3d.filter(e=>"number"==typeof e).length)throw O&&O.func(null===(w=li.getInstance())||void 0===w?void 0:w.getErrorTxt().scale3dErr2),new Error(null===(I=li.getInstance())||void 0===I?void 0:I.getErrorTxt().scale3dErr2)}if(void 0!==e.children){if("object"!=typeof e.children||void 0===e.children.length)throw O&&O.func(`children ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().array}`),new Error(`children ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().array}`);if(e.children.filter(e=>"object"==typeof e).length!==e.children.length)throw O&&O.func(`children value ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().object}`),new Error(`children value ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().object}`)}}}class Ea extends fi{constructor(e){super(e,pa),this.setType("Group")}Get(e){return t(this,void 0,void 0,function*(){if(!e)return{success:!0,result:this.findFromMap()};const t=this.findFromMap(`${e}`);if(t)return{success:!0,result:t};const o=yield this.RequestEntity.GetEntitiesData([`${e}`]);if(!o.success)return{success:!1,message:"Eid is non-existent"};let i=[];o.result.entitiesData[0].EntityChildrenAtom.childrenEids.length>0&&(i=yield Xo(o.result.entitiesData[0].EntityChildrenAtom.childrenEids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap));const n=new pa({eid:e,children:i});return n.setObj(this.obj),n.generateObjectData(o.result.entitiesData[0]),this.addToMap(`${e}`,{object:n}),{success:o.success,message:o.message,result:{object:n}}})}GenerateObject(e){return t(this,void 0,void 0,function*(){let t=[];e.EntityChildrenAtom.childrenEids.length>0&&(t=yield Xo(e.EntityChildrenAtom.childrenEids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap));const o=new pa({eid:e.Eid,children:t});return o.setObj(this.obj),o.generateObjectData(e),this.addToMap(`${e.Eid}`,{object:o}),{success:!0,message:"",result:{object:o}}})}GetOnly(e){return t(this,void 0,void 0,function*(){const t=this.findFromMap(`${e}`);if(!t)return{success:!1,message:"Eid is illegal"};const o=yield this.RequestEntity.GetEntitiesData([`${e}`]);if(!o.success)return{success:!1,message:"Eid is non-existent"};let i=[];return o.result.entitiesData[0].EntityChildrenAtom.childrenEids.length>0&&(i=yield Xo(o.result.entitiesData[0].EntityChildrenAtom.childrenEids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),t.object.SetData({children:i}),t.object.generateObjectData(o.result.entitiesData[0]),{success:!0}})}}class wa{validateStart(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L;const V=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw V&&V.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.coordZRef)){if("string"!=typeof e.coordZRef)throw V&&V.func(`coordZRef ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`coordZRef ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.coordZRefType.find(t=>t===e.coordZRef))throw V&&V.func(`coordZRef ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.coordZRefType.toString()}`),new Error(`coordZRef ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.coordZRefType.toString()}`)}if(void 0!==(null==e?void 0:e.invert)&&"boolean"!=typeof e.invert)throw V&&V.func(`invert ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`invert ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.strokeColor)&&"string"!=typeof e.strokeColor)throw V&&V.func(`strokeColor ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().hexa}`),new Error(`strokeColor ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().hexa}`);if(void 0!==(null==e?void 0:e.strokeWeight)&&"number"!=typeof e.strokeWeight)throw V&&V.func(`strokeWeight ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`),new Error(`strokeWeight ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`);if(void 0!==(null==e?void 0:e.transform)){if(void 0!==(null===(g=e.transform)||void 0===g?void 0:g.location)){if("object"!=typeof e.transform.location||void 0===e.transform.location.length)throw V&&V.func(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().locationErr),new Error(null===(y=li.getInstance())||void 0===y?void 0:y.getErrorTxt().locationErr);if(3!==e.transform.location.filter(e=>"number"==typeof e).length)throw V&&V.func(null===(b=li.getInstance())||void 0===b?void 0:b.getErrorTxt().locationErr2),new Error(null===(p=li.getInstance())||void 0===p?void 0:p.getErrorTxt().locationErr2)}if(void 0!==(null===(E=e.transform)||void 0===E?void 0:E.scale3d)){if("object"!=typeof e.transform.scale3d||void 0===e.transform.scale3d.length)throw V&&V.func(null===(w=li.getInstance())||void 0===w?void 0:w.getErrorTxt().scale3dErr2),new Error(null===(I=li.getInstance())||void 0===I?void 0:I.getErrorTxt().locationErr);if(3!==e.transform.scale3d.filter(e=>"number"==typeof e).length)throw V&&V.func(null===(j=li.getInstance())||void 0===j?void 0:j.getErrorTxt().scale3dErr2),new Error(null===(S=li.getInstance())||void 0===S?void 0:S.getErrorTxt().locationErr2)}if(void 0!==(null===(C=e.transform)||void 0===C?void 0:C.rotator)){if("object"!=typeof e.transform.rotator)throw V&&V.func(null===(G=li.getInstance())||void 0===G?void 0:G.getErrorTxt().rotatorErr),new Error(null===(O=li.getInstance())||void 0===O?void 0:O.getErrorTxt().rotatorErr);const t={pitch:0,yaw:0,roll:0};if(Object.keys(e.transform.rotator).forEach(e=>{var o,i;if(void 0===t[e])throw V&&V.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotator.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===($=e.transform.rotator)||void 0===$?void 0:$.pitch)&&("number"!=typeof e.transform.rotator.pitch||e.transform.rotator.pitch<-180||e.transform.rotator.pitch>180))throw V&&V.func(null===(T=li.getInstance())||void 0===T?void 0:T.getErrorTxt().rotatorErr2),new Error(null===(M=li.getInstance())||void 0===M?void 0:M.getErrorTxt().rotatorErr2);if(void 0!==(null===(A=e.transform.rotator)||void 0===A?void 0:A.yaw)&&("number"!=typeof e.transform.rotator.yaw||e.transform.rotator.yaw<-180||e.transform.rotator.yaw>180))throw V&&V.func(null===(D=li.getInstance())||void 0===D?void 0:D.getErrorTxt().rotatorErr2),new Error(null===(R=li.getInstance())||void 0===R?void 0:R.getErrorTxt().rotatorErr2);if(void 0!==(null===(x=e.transform.rotator)||void 0===x?void 0:x.roll)&&("number"!=typeof e.transform.rotator.roll||e.transform.rotator.roll<-180||e.transform.rotator.roll>180))throw V&&V.func(null===(N=li.getInstance())||void 0===N?void 0:N.getErrorTxt().rotatorErr2),new Error(null===(L=li.getInstance())||void 0===L?void 0:L.getErrorTxt().rotatorErr2)}}}}}class Ia extends ci{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"SectionAPI"}),Object.defineProperty(this,"SectionValidate",{enumerable:!0,configurable:!0,writable:!0,value:new wa})}Start(e){var o;return t(this,void 0,void 0,function*(){this.SectionValidate.validateStart(e);const t={apiClassName:this.apiClassName,apiFuncName:"StartSection"},i=yield this.obj.startApi(t,e);return(null===(o=i.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(i.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:i.success,message:i.message,result:i.success?this.obj.ObjectEidMap.get(i.result.eid):""}})}End(){var e;return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"EndSection"},o=yield this.obj.startApi(t,{});return(null===(e=o.result)||void 0===e?void 0:e.sceneChangeInfo)&&(yield ti(o.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:o.success,message:o.message,result:o.success?this.obj.ObjectEidMap.get(o.result.eid):""}})}}class ja extends $i{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Project"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"NodeValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Kr}),Object.defineProperty(this,"ProjectEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{visualGroupToNodes:{}}}),this.setObjAtom(this),this.oType="Project",this.type=Ho.get(this.oType),Ti(this.ProjectEntityAtom,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}GetScheme(){return{ProjectEntityAtom:this.ProjectEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{visualGroupToNodes:this.ProjectEntityAtom.visualGroupToNodes})}SetData(e){this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.visualGroupToNodes&&(this.ProjectEntityAtom.visualGroupToNodes=e.visualGroupToNodes)}generateAtomData(e){const t={},o={},i={},n={},r={},a={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleVisibleAtom(i,e),Object.keys(i).length>0&&(t.VisibleAtom=i),this.handleLockedAtom(n,e),Object.keys(n).length>0&&(t.EntityFlagAtom=n),this.handleEntityOutlinerAtom(r,e),Object.keys(r).length>0&&(t.EntityOutlinerAtom=r),void 0!==e.visualGroupToNodes&&(a.visualGroupToNodes=e.visualGroupToNodes),Object.keys(a).length>0&&(t.ProjectEntityAtom=a),t}SetNodesOutline(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesOutlineEntity(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesHighlight(e){var o;return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesHighlightEntity(e);const t={nodeIds:e.nodeIds,aesTilesEid:this.eid};t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesVisibility(e){return t(this,void 0,void 0,function*(){if(!this.eid)return{success:!1,message:"Please add first"};this.NodeValidate.validateSetNodesVisibilityEntity(e);const t={nodes:e.nodeIds,aesTilesEid:this.eid};t.bVisible=void 0!==e.bVisible&&e.bVisible;const o=yield this.StartApi(this.apiClassName,"SetNodesVisibility",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}generateObjectData(e,t=this){const o=Object.keys(e);o.length>0&&o.forEach(o=>{void 0!==t[o]&&"Eid"!==o&&"Type"!==o&&("object"==typeof e[o]&&void 0===e[o].length?"visualGroupToNodes"===o?t[o]=e[o]:this.generateObjectData(e[o],t[o]):t[o]=e[o])})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{visualGroupToNodes:this.ProjectEntityAtom.visualGroupToNodes})}Validate(e){var t,o,i,n,r;const a=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw a&&a.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const s=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===s[e])throw a&&a.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`visualGroupToNodes ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`)}}class Sa extends fi{constructor(e){super(e,ja),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new sa}),this.setType("Project")}SetNodesOutline(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesOutline(e);const t={nodeIds:e.nodeIds};if(void 0!==(null==e?void 0:e.project))t.aesTilesEid=e.project.eid;else{const e=yield this.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}t.bOutline=null===(o=e.bOutline)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesOutline",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesHighlight(e){var o;return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesHighlight(e);const t={nodeIds:e.nodeIds};if(void 0!==(null==e?void 0:e.project))t.aesTilesEid=e.project.eid;else{const e=yield this.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}t.bHighlight=null===(o=e.bHighlight)||void 0===o||o,t.styleName=void 0!==e.styleName?e.styleName:"Default";const i=yield this.StartApi(this.apiClassName,"SetNodesHighlight",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetNodesVisibility(e){return t(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesVisibility(e);const t={nodes:e.nodeIds};if(void 0!==(null==e?void 0:e.project))t.aesTilesEid=e.project.eid;else{const e=yield this.GetProject();t.aesTilesEid=e.length>0?e[0].eid:""}t.bVisible=void 0!==e.bVisible&&e.bVisible;const o=yield this.StartApi(this.apiClassName,"SetNodesVisibility",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetProject(){var e;return t(this,void 0,void 0,function*(){const t=this.findFromMap();if(0===t.length){const t=yield this.obj.Scene.GetTiles();return t.success&&(null===(e=t.result[0])||void 0===e?void 0:e.Project)?t.result[0].Project:[]}return t.map(e=>e.object)})}}class Ca{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(e){var o;return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"Add"},i={eids:e.map(e=>e.GetData().eid)},n=yield this.obj.startApi(t,i);return n.success&&(this.handleCache(e,"Add"),(null===(o=n.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(n.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap))),{success:n.success,message:n.message,result:this.selections}})}Get(){return t(this,void 0,void 0,function*(){return this.selections})}Remove(e){var o;return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"Remove"},i={eids:e.map(e=>e.GetData().eid)},n=yield this.obj.startApi(t,i);return n.success&&(this.handleCache(e,"Remove"),(null===(o=n.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(n.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap))),{success:n.success,message:n.message,result:this.selections}})}Clear(){var e;return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"ClearSelection"},o=yield this.obj.startApi(t,{});return o.success&&(this.handleCache([],"Clear"),(null===(e=o.result)||void 0===e?void 0:e.sceneChangeInfo)&&(yield ti(o.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap))),{success:o.success,message:o.message,result:this.selections}})}Draw(){var e;return t(this,void 0,void 0,function*(){const t={apiClassName:this.apiClassName,apiFuncName:"DrawSelection"},o=yield this.obj.startApi(t,{});return(null===(e=o.result)||void 0===e?void 0:e.sceneChangeInfo)&&(yield ti(o.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:o.success,message:o.message,result:this.selections}})}handleCache(e,t="add"){if("Add"===t){this.selections.push(...e);const t=new Set(this.selections);this.selections=[...t]}else"Remove"===t?e.forEach(e=>{const t=this.selections.findIndex(t=>t.eid===e.eid);t>=0&&this.selections.splice(t,1)}):"Clear"===t&&(this.selections=[])}}class Ga{validateDelete(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`objs ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw s&&s.func(`objs value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`)}}validateGetTypesByEids(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`eids ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`eids ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`eids value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayString}`),new Error(`eids value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`)}}validateClear(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`EntityTypesToIgnore ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`EntityTypesToIgnore ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`EntityTypesToIgnore value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayString}`),new Error(`EntityTypesToIgnore value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`);e.forEach(e=>{var t,o;if(!Ho.get(e))throw s&&s.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}}validateClearByObjects(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`objs ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw s&&s.func(`objs value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`)}}validateClearByEids(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`eids ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`eids ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`eids value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`eids value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`)}}validateClearByTypes(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw d&&d.func(`types ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`types ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e||void 0===e.length)throw d&&d.func(`types ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`types ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw d&&d.func(`types ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`types ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`);e.forEach(e=>{var t,o;if(!Ho.get(e))throw d&&d.func(`types.${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`types.,${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}}validateSetVisibleByObjects(e,t){var o,i,n,r,a,s,l,d;const c=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw c&&c.func(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw c&&c.func(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`objs value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if("boolean"!=typeof t)throw c&&c.func(`bVisible ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`),new Error(`bVisible ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`)}}validateSetLocked(e,t=!0){var o,i,n,r,a,s,l,d;const c=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw c&&c.func(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw c&&c.func(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`objs value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if("boolean"!=typeof t)throw c&&c.func(`bLocked ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`),new Error(`bLocked ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`)}}validateRunAction(e,t){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("string"!=typeof e)throw l&&l.func(`actionName ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`),new Error(`actionName ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`);if("object"!=typeof t)throw l&&l.func(`actionParams ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`actionParams ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`)}}validateAddSelection(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`objs ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw s&&s.func(`objs value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`)}}validateRemoveSelection(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`objs ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw s&&s.func(`objs value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`)}}validateSave(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"string"!=typeof e)throw r&&r.func(`containerId ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`containerId ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`)}validateLoad(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"string"!=typeof e)throw r&&r.func(`containerId ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`containerId ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`)}validateGetObjectEid(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"string"!=typeof e)throw r&&r.func(`eid ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`eid ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`)}validateMerge(e,t,o){var i,n,r,a,s,l,d,c,u,v;const h=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("string"!=typeof e)throw h&&h.func(`containerId ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`containerId ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if("string"!=typeof t)throw h&&h.func(`anotherContainerId ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`anotherContainerId ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if("object"!=typeof o||void 0===o.length)throw h&&h.func(`EntityTypesToIgnore ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`EntityTypesToIgnore ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(o.filter(e=>"string"==typeof e).length!==o.length)throw h&&h.func(`EntityTypesToIgnore value ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayString}`),new Error(`EntityTypesToIgnore value ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().arrayString}`);o.forEach(e=>{var t,o;if(!Ho.get(e))throw h&&h.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}}validateSetLocation(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g;const f=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw f&&f.func(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw f&&f.func(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`objs value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if("object"!=typeof t)throw f&&f.func(`location ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`),new Error(`location ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`);const o={x:0,y:0,z:0};if(Object.keys(t).forEach(e=>{var t,i;if(void 0===o[e])throw f&&f.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`location.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.x&&"number"!=typeof t.x)throw f&&f.func(`location.x ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`),new Error(`location.x ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`);if(void 0!==t.y&&"number"!=typeof t.y)throw f&&f.func(`location.y ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`),new Error(`location.y ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`);if(void 0!==t.z&&"number"!=typeof t.z)throw f&&f.func(`location.z ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`),new Error(`location.z ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`)}}validateSetLocations(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`datas ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`datas ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n,a,s,l,d,c,u,v,h,m;const g={object:{},location:{x:0,y:0,z:0}};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===g[e])throw r&&r.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"object"!=typeof e.object)throw r&&r.func(`datas.object ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`datas.object ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);if("object"!=typeof e.location)throw r&&r.func(`datas.location ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`datas.location ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const f={x:0,y:0,z:0};if(Object.keys(e.location).forEach(e=>{var t,o;if(void 0===f[e])throw r&&r.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.location)||void 0===a?void 0:a.x)&&"number"!=typeof e.location.x)throw r&&r.func(`datas.location.x ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`datas.location.x ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(void 0!==(null===(d=e.location)||void 0===d?void 0:d.y)&&"number"!=typeof e.location.y)throw r&&r.func(`datas.location.y ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`),new Error(`datas.location.y ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`);if(void 0!==(null===(v=e.location)||void 0===v?void 0:v.z)&&"number"!=typeof e.location.z)throw r&&r.func(`datas.location.z ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`),new Error(`datas.location.z ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`)})}}validateSetRotator(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w;const I=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw I&&I.func(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw I&&I.func(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`objs value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if("object"!=typeof t)throw I&&I.func(`rotator ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`),new Error(`rotator ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`);const o={pitch:0,yaw:0,roll:0};if(Object.keys(t).forEach(e=>{var t,i;if(void 0===o[e])throw I&&I.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`location.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.pitch&&("number"!=typeof t.pitch||t.pitch<-180||t.pitch>180))throw I&&I.func(`rotator.pitch ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}. ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} -180 ~ 180`),new Error(`rotator.pitch ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}. ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} -180 ~ 180`);if(void 0!==t.yaw&&("number"!=typeof t.yaw||t.yaw<-180||t.yaw>180))throw I&&I.func(`rotator.yaw ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}. ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} -180 ~ 180`),new Error(`rotator.yaw ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}. ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().range} -180 ~ 180`);if(void 0!==t.roll&&("number"!=typeof t.roll||t.roll<-180||t.roll>180))throw I&&I.func(`rotator.roll ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}. ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} -180 ~ 180`),new Error(`rotator.roll ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}. ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} -180 ~ 180`)}}validateSetRotators(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`datas ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`datas ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n,a,s,l,d,c,u,v,h,m;const g={object:{},rotator:{pitch:0,yaw:0,roll:0}};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===g[e])throw r&&r.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"object"!=typeof e.object)throw r&&r.func(`datas.object ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`datas.object ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);if("object"!=typeof e.rotator)throw r&&r.func(`datas.rotator ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`datas.rotator ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const f={pitch:0,yaw:0,roll:0};if(Object.keys(e.rotator).forEach(e=>{var t,o;if(void 0===f[e])throw r&&r.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.rotator)||void 0===a?void 0:a.pitch)&&"number"!=typeof e.rotator.pitch)throw r&&r.func(`datas.rotator.pitch ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`datas.rotator.pitch ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(void 0!==(null===(d=e.rotator)||void 0===d?void 0:d.yaw)&&"number"!=typeof e.rotator.yaw)throw r&&r.func(`datas.rotator.yaw ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`),new Error(`datas.rotator.yaw ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`);if(void 0!==(null===(v=e.rotator)||void 0===v?void 0:v.roll)&&"number"!=typeof e.rotator.roll)throw r&&r.func(`datas.rotator.roll ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`),new Error(`datas.rotator.roll ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`)})}}validateSetScale3D(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g;const f=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw f&&f.func(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw f&&f.func(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`objs value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if("object"!=typeof t)throw f&&f.func(`scale3d ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`),new Error(`scale3d ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`);const o={x:0,y:0,z:0};if(Object.keys(t).forEach(e=>{var t,i;if(void 0===o[e])throw f&&f.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`location.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.x&&"number"!=typeof t.x)throw f&&f.func(`scale3d.x ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`),new Error(`scale3d.x ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`);if(void 0!==t.y&&"number"!=typeof t.y)throw f&&f.func(`scale3d.y ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`),new Error(`scale3d.y ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`);if(void 0!==t.z&&"number"!=typeof t.z)throw f&&f.func(`scale3d.z ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`),new Error(`scale3d.z ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`)}}validateSetScale3Ds(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func(`datas ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`datas ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.forEach(e=>{var t,o,i,n,a,s,l,d,c,u,v,h,m;const g={object:{},scale3d:{x:0,y:0,z:0}};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===g[e])throw r&&r.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"object"!=typeof e.object)throw r&&r.func(`datas.object ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`datas.object ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);if("object"!=typeof e.scale3d)throw r&&r.func(`datas.scale3d ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`datas.scale3d ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const f={x:0,y:0,z:0};if(Object.keys(e.scale3d).forEach(e=>{var t,o;if(void 0===f[e])throw r&&r.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.scale3d)||void 0===a?void 0:a.x)&&"number"!=typeof e.scale3d.x)throw r&&r.func(`datas.scale3d.x ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`datas.scale3d.x ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(void 0!==(null===(d=e.scale3d)||void 0===d?void 0:d.y)&&"number"!=typeof e.scale3d.y)throw r&&r.func(`datas.scale3d.y ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`),new Error(`datas.scale3d.y ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`);if(void 0!==(null===(v=e.scale3d)||void 0===v?void 0:v.z)&&"number"!=typeof e.scale3d.z)throw r&&r.func(`datas.scale3d.z ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`),new Error(`datas.scale3d.z ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}`)})}}validateSetVisible(e,t){var o,i,n,r,a,s,l,d;const c=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw c&&c.func(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw c&&c.func(`objs value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`objs value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if("boolean"!=typeof t)throw c&&c.func(`bVisible ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`),new Error(`bVisible ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`)}}validateClearByCustomId(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`cids ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`cids ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`cids value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayString}`),new Error(`cids value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`)}}validateGetByCustomId(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`cids ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`cids ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`cids value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayString}`),new Error(`cids value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`)}}validateUpdateByCustomId(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b;const p=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw p&&p.func(`cids ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`cids ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw p&&p.func(`cids value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`cids value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`);if("object"!=typeof t)throw p&&p.func(`opt ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`),new Error(`opt ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`);if(void 0!==o){if("object"!=typeof o.calculateCoordZ)throw p&&p.func(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().calculateCoordZ),new Error(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(o.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw p&&p.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==o.calculateCoordZ.coordZRef){if("string"!=typeof o.calculateCoordZ.coordZRef)throw p&&p.func(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef),new Error(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===o.calculateCoordZ.coordZRef))throw p&&p.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZRef2),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().coordZRef2)}if(void 0!==o.calculateCoordZ.coordZOffset&&"number"!=typeof o.calculateCoordZ.coordZOffset)throw p&&p.func(null===(y=li.getInstance())||void 0===y?void 0:y.getErrorTxt().coordZOffset),new Error(null===(b=li.getInstance())||void 0===b?void 0:b.getErrorTxt().coordZOffset)}}}validateUpdateByCustomIds(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g;const f=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw f&&f.func(`opts ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`opts ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw f&&f.func(`opts value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`opts value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if(void 0!==t){if("object"!=typeof t.calculateCoordZ)throw f&&f.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().calculateCoordZ),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw f&&f.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw f&&f.func(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().coordZRef),new Error(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw f&&f.func(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().coordZRef2),new Error(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw f&&f.func(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZOffset),new Error(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZOffset)}}}validateClearByEntityName(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`entityNames ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`entityNames ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`entityNames value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().arrayString}`),new Error(`entityNames value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`)}}validateUpdateByEntityName(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b;const p=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw p&&p.func(`entityNames ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`entityNames ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw p&&p.func(`entityNames value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`),new Error(`entityNames value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayString}`);if("object"!=typeof t)throw p&&p.func(`opt ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`),new Error(`opt ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`);if(void 0!==o){if("object"!=typeof o.calculateCoordZ)throw p&&p.func(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().calculateCoordZ),new Error(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(o.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw p&&p.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==o.calculateCoordZ.coordZRef){if("string"!=typeof o.calculateCoordZ.coordZRef)throw p&&p.func(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef),new Error(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===o.calculateCoordZ.coordZRef))throw p&&p.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZRef2),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().coordZRef2)}if(void 0!==o.calculateCoordZ.coordZOffset&&"number"!=typeof o.calculateCoordZ.coordZOffset)throw p&&p.func(null===(y=li.getInstance())||void 0===y?void 0:y.getErrorTxt().coordZOffset),new Error(null===(b=li.getInstance())||void 0===b?void 0:b.getErrorTxt().coordZOffset)}}}validateUpdateByEntityNames(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g;const f=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw f&&f.func(`opts ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`opts ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw f&&f.func(`opts value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`opts value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if(void 0!==t){if("object"!=typeof t.calculateCoordZ)throw f&&f.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().calculateCoordZ),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw f&&f.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw f&&f.func(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().coordZRef),new Error(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw f&&f.func(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().coordZRef2),new Error(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw f&&f.func(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZOffset),new Error(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZOffset)}}}validateSetEntityOutline(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if("object"!=typeof e.entities||void 0===e.entities.length)throw h&&h.func(`opt.entities ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`opt.entities ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.entities.filter(e=>"object"==typeof e).length!==e.entities.length)throw h&&h.func(`opt.entities value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`),new Error(`opt.entities value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw h&&h.func(`opt.styleName ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`),new Error(`opt.styleName ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw h&&h.func(`opt.bOutline ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`opt.bOutline ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`)}}validateSetEntityHighlight(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if("object"!=typeof e.entities||void 0===e.entities.length)throw h&&h.func(`opt.entities ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`opt.entities ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.entities.filter(e=>"object"==typeof e).length!==e.entities.length)throw h&&h.func(`opt.entities value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`),new Error(`opt.entities value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw h&&h.func(`opt.styleName ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`),new Error(`opt.styleName ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().string}`);if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw h&&h.func(`opt.bHighlight ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`opt.bHighlight ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`)}}validateGetByEids(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func(`eids ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`eids ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func(`eids value ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`eids value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`)}}validateCreate(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m,g,f;const y=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e)throw y&&y.func(`defaultParam ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`defaultParam ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if("object"!=typeof t||void 0===t.length)throw y&&y.func(`batchParams ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`batchParams ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(void 0!==o){if("object"!=typeof o.calculateCoordZ)throw y&&y.func(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().calculateCoordZ),new Error(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(o.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw y&&y.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==o.calculateCoordZ.coordZRef){if("string"!=typeof o.calculateCoordZ.coordZRef)throw y&&y.func(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef),new Error(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===o.calculateCoordZ.coordZRef))throw y&&y.func(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef2),new Error(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZRef2)}if(void 0!==o.calculateCoordZ.coordZOffset&&"number"!=typeof o.calculateCoordZ.coordZOffset)throw y&&y.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZOffset),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().coordZOffset)}}}validateCreates(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g;const f=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw f&&f.func(`jsonData ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`jsonData ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw f&&f.func(`jsonData value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`),new Error(`jsonData value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`);if(void 0!==t){if("object"!=typeof t.calculateCoordZ)throw f&&f.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().calculateCoordZ),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw f&&f.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw f&&f.func(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().coordZRef),new Error(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw f&&f.func(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().coordZRef2),new Error(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw f&&f.func(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZOffset),new Error(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZOffset)}}}validateCreateByGeoJson(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m,g,f;const y=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e)throw y&&y.func(`jsonData ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`jsonData ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);const i={point:{},polyline:{},polygon2D:{}};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===i[e])throw y&&y.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"string"!=typeof t)throw y&&y.func(`url ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`url ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(void 0!==o){if("object"!=typeof o.calculateCoordZ)throw y&&y.func(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().calculateCoordZ),new Error(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(o.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw y&&y.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==o.calculateCoordZ.coordZRef){if("string"!=typeof o.calculateCoordZ.coordZRef)throw y&&y.func(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef),new Error(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===o.calculateCoordZ.coordZRef))throw y&&y.func(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef2),new Error(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZRef2)}if(void 0!==o.calculateCoordZ.coordZOffset&&"number"!=typeof o.calculateCoordZ.coordZOffset)throw y&&y.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZOffset),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().coordZOffset)}}}validateCreateByShapefile(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m,g,f;const y=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e)throw y&&y.func(`jsonData ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`jsonData ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);const i={point:{},polyline:{},polygon2D:{}};if(Object.keys(e).forEach(e=>{var t,o;if(void 0===i[e])throw y&&y.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),"string"!=typeof t)throw y&&y.func(`url ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`),new Error(`url ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`);if(void 0!==o){if("object"!=typeof o.calculateCoordZ)throw y&&y.func(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().calculateCoordZ),new Error(null===(c=li.getInstance())||void 0===c?void 0:c.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(o.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw y&&y.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==o.calculateCoordZ.coordZRef){if("string"!=typeof o.calculateCoordZ.coordZRef)throw y&&y.func(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().coordZRef),new Error(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===o.calculateCoordZ.coordZRef))throw y&&y.func(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef2),new Error(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZRef2)}if(void 0!==o.calculateCoordZ.coordZOffset&&"number"!=typeof o.calculateCoordZ.coordZOffset)throw y&&y.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZOffset),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().coordZOffset)}}}validateUpdate(e,t,o){var i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b;const p=null===(i=li.getInstance())||void 0===i?void 0:i.GetEvent("OnValidateError");if(null===(n=li.getInstance())||void 0===n?void 0:n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw p&&p.func(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`objs ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.filter(e=>"object"==typeof e).length!==e.length)throw p&&p.func(`objs value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`),new Error(`objs value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`);if("object"!=typeof t)throw p&&p.func(`obj ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`),new Error(`obj ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`);if(void 0!==o){if("object"!=typeof o.calculateCoordZ)throw p&&p.func(null===(u=li.getInstance())||void 0===u?void 0:u.getErrorTxt().calculateCoordZ),new Error(null===(v=li.getInstance())||void 0===v?void 0:v.getErrorTxt().calculateCoordZ);const e={coordZRef:"surface",coordZOffset:0};if(Object.keys(o.calculateCoordZ).forEach(t=>{var o,i;if(void 0===e[t])throw p&&p.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`operations.calculateCoordZ.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==o.calculateCoordZ.coordZRef){if("string"!=typeof o.calculateCoordZ.coordZRef)throw p&&p.func(null===(h=li.getInstance())||void 0===h?void 0:h.getErrorTxt().coordZRef),new Error(null===(m=li.getInstance())||void 0===m?void 0:m.getErrorTxt().coordZRef);if(!li.coordZRefType.find(e=>e===o.calculateCoordZ.coordZRef))throw p&&p.func(null===(g=li.getInstance())||void 0===g?void 0:g.getErrorTxt().coordZRef2),new Error(null===(f=li.getInstance())||void 0===f?void 0:f.getErrorTxt().coordZRef2)}if(void 0!==o.calculateCoordZ.coordZOffset&&"number"!=typeof o.calculateCoordZ.coordZOffset)throw p&&p.func(null===(y=li.getInstance())||void 0===y?void 0:y.getErrorTxt().coordZOffset),new Error(null===(b=li.getInstance())||void 0===b?void 0:b.getErrorTxt().coordZOffset)}}}validateSetSceneStyle(e="comic"){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("string"!=typeof e)throw s&&s.func(`style ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`style ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(!li.sceneStyle.find(t=>t===e))throw s&&s.func(`style ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().range} ${li.sceneStyle.toString()}`),new Error(`style ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.sceneStyle.toString()}`)}}validateGetBound(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0===e)throw s&&s.func(`objs ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`objs ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("object"!=typeof e)throw s&&s.func(`objs ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`objs ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`)}}validateArrayDuplicate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M;const A=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw A&&A.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if("object"!=typeof e.entities||void 0===e.entities.length)throw A&&A.func(`opt.entities ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`opt.entities ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(e.entities.filter(e=>"object"==typeof e).length!==e.entities.length)throw A&&A.func(`opt.entities value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`),new Error(`opt.entities value ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`);if(void 0!==(null==e?void 0:e.num)&&"number"!=typeof e.num)throw A&&A.func(`opt.num ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`opt.num ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`);if(void 0!==(null==e?void 0:e.translation)){if("object"!=typeof e.translation||void 0===e.translation.length)throw A&&A.func(`opt.translation ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().array}`),new Error(`opt.translation ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().array}`);if(3!==e.translation.filter(e=>"number"==typeof e).length)throw A&&A.func(`opt.translation ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.translation ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==e?void 0:e.rotator)){if("object"!=typeof e.rotator||void 0===e.rotator.length)throw A&&A.func(`opt.rotator ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().array}`),new Error(`opt.rotator ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`);if(3!==e.rotator.filter(e=>"number"==typeof e).length)throw A&&A.func(`opt.rotator ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.rotator ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==e?void 0:e.scale)){if("object"!=typeof e.scale||void 0===e.scale.length)throw A&&A.func(`opt.scale ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().array}`),new Error(`opt.scale ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().array}`);if(3!==e.scale.filter(e=>"number"==typeof e).length)throw A&&A.func(`opt.scale ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.scale ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==e.coordType){if("string"!=typeof e.coordType)throw A&&A.func(`opt.coordType ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().string}`),new Error(`opt.coordType ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().string}`);if(!li.ArrayDuplicateCoordType.find(t=>t===e.coordType))throw A&&A.func(`opt.coordType ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().range} ${li.ArrayDuplicateCoordType.toString()}`),new Error(`opt.coordType ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().range} ${li.ArrayDuplicateCoordType.toString()}`)}if(void 0!==e.bInstance&&"boolean"!=typeof e.bInstance)throw A&&A.func(`opt.bInstance ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().boolean}`),new Error(`opt.bInstance ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().boolean}`);if(void 0!==e.instanceName&&"string"!=typeof e.instanceName)throw A&&A.func(`opt.instanceName ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().string}`),new Error(`opt.instanceName ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().string}`)}}validateMove(e){var t,o,i,n,r,a,s,l,d,c,u,v,h;const m=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw m&&m.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);if(void 0===(null==e?void 0:e.path))throw m&&m.func(`path ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().required}`),new Error(`path ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().required}`);if(void 0===(null==e?void 0:e.entity))throw m&&m.func(`entity ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`),new Error(`entity ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().required}`);if(void 0===(null==e?void 0:e.moving))throw m&&m.func(`moving ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().required}`),new Error(`moving ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().required}`);if(void 0===(null===(u=e.entity)||void 0===u?void 0:u.type))throw m&&m.func(`entity.type ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().required}`),new Error(`entity.type ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().required}`)}}}class Oa extends ci{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 Ga}),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,"Node",{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,"Visual",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Covering=new Tr(e),this.Model=new ra(e),this.Tiles=new la(e),this.TilesNode=new da(e),this.Node=new ca(e),this.EarthTiles=new va(e),this.Effects=new ma(e),this.NodeSelection=new fa(e),this.Outliner=new ba(e),this.Group=new Ea(e),this.Section=new Ia(e),this.Project=new Sa(e),this.Action=new Wi(e),this.Selection=new Ca(e),this.RequestEntity=new di(e),this.Visual=new Si(e)}Create(e,o,i){return t(this,void 0,void 0,function*(){if(this.SceneValidate.validateCreate(e,o,i),!e.type)return{success:!1,message:"Type is needed"};const t=this.obj.RegisterObj.Get(e.type);if(!t)return{success:!1,message:"Type is illegal"};return yield t.object.CreateWithTemplate(e,o,i)})}Creates(e,o){return t(this,void 0,void 0,function*(){this.SceneValidate.validateCreates(e,o);const t=[];return e.forEach(e=>{const o=this.obj.RegisterObj.Get(e.type);o&&t.push(o.object.GetObject(e))}),yield this.Add(t,o)})}CreateByGeoJson(e,o,i){return t(this,void 0,void 0,function*(){this.SceneValidate.validateCreateByGeoJson(e,o,i);const t=yield this.obj.DataModel.Geometry.CreateGeometryFromGeoJson(o);return t.success?yield this.handleGeometryDataToGenerateEntity(e,t.result,i):t})}CreateByShapefile(e,o,i){return t(this,void 0,void 0,function*(){this.SceneValidate.validateCreateByShapefile(e,o,i);const t=yield this.obj.DataModel.Geometry.CreateGeometryFromShapefile(o);return t.success?yield this.handleGeometryDataToGenerateEntity(e,t.result,i):t})}handleGeometryDataToGenerateEntity(e,o,i){var n,r,a,s,l,d;return t(this,void 0,void 0,function*(){const t=[];return(null==e?void 0:e.point)&&(null==o?void 0:o.point)&&(null===(n=null==o?void 0:o.point)||void 0===n?void 0:n.length)>0&&o.point.forEach(o=>{t.push(Object.assign(Object.assign({},e.point),{location:o.point}))}),(null==e?void 0:e.point2D)&&(null==o?void 0:o.point2D)&&(null===(r=null==o?void 0:o.point2D)||void 0===r?void 0:r.length)>0&&o.point2D.forEach(o=>{t.push(Object.assign(Object.assign({},e.point2D),{location:o.point}))}),(null==e?void 0:e.polyline)&&(null==o?void 0:o.polyline)&&(null===(a=null==o?void 0:o.polyline)||void 0===a?void 0:a.length)>0&&o.polyline.forEach(o=>{var i,n,r;t.push(Object.assign(Object.assign({},e.polyline),{polyline:{coordinates:o.polyline,bClosed:null!==(r=null===(n=null===(i=e.polyline)||void 0===i?void 0:i.polyline)||void 0===n?void 0:n.bClosed)&&void 0!==r&&r}}))}),(null==e?void 0:e.polyline2D)&&(null==o?void 0:o.polyline2D)&&(null===(s=null==o?void 0:o.polyline2D)||void 0===s?void 0:s.length)>0&&o.polyline2D.forEach(o=>{var i,n,r;t.push(Object.assign(Object.assign({},e.polyline2D),{polyline2D:{coordinates:o.polyline,bClosed:null!==(r=null===(n=null===(i=e.polyline2D)||void 0===i?void 0:i.polyline2D)||void 0===n?void 0:n.bClosed)&&void 0!==r&&r}}))}),(null==e?void 0:e.polygon)&&(null==o?void 0:o.polygon)&&(null===(l=null==o?void 0:o.polygon)||void 0===l?void 0:l.length)>0&&o.polygon.forEach(o=>{t.push(Object.assign(Object.assign({},e.polygon),{polygon:{coordinates:o.polygon}}))}),(null==e?void 0:e.polygon2D)&&(null==o?void 0:o.polygon2D)&&(null===(d=null==o?void 0:o.polygon2D)||void 0===d?void 0:d.length)>0&&o.polygon2D.forEach(o=>{var i,n,r;t.push(Object.assign(Object.assign({},e.polygon2D),{polygon2D:{coordinates:o.polygon,coordZ:null!==(r=null===(n=null===(i=e.polygon2D)||void 0===i?void 0:i.polygon2D)||void 0===n?void 0:n.coordZ)&&void 0!==r?r:0}}))}),yield this.Creates(t,i)})}Delete(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateDelete(e);return yield this.RequestEntity.RemoveEntity(e.map(e=>e.eid))})}Add(e,o){return t(this,void 0,void 0,function*(){return e instanceof Array?o?yield this.AddActMulit(e,o):yield this.AddActMulit(e):o?yield this.AddAct(e,o):yield this.AddAct(e)})}GetTypesByEids(e){var o;return t(this,void 0,void 0,function*(){this.SceneValidate.validateGetTypesByEids(e);const t=yield this.StartApi(this.apiClassName,"GetEntityTypeByEids",{eids:e}),i=yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);return i.success&&void 0!==(null===(o=null==i?void 0:i.result)||void 0===o?void 0:o.entityTypes)&&(i.result.entityTypes=i.result.entityTypes.map(e=>this.obj.RegisterObj.GetByValue(this.obj.RegisterObj.EntityType,e))),i})}Clear(e=[]){return t(this,void 0,void 0,function*(){this.SceneValidate.validateClear(e);const t=yield this.StartApi(this.apiClassName,"ClearScene",{entityTypesToIgnore:e.map(e=>this.obj.RegisterObj.EntityType.get(e))});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ClearByObjects(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateClearByObjects(e);return yield this.RequestEntity.RemoveEntity(e.map(e=>e.eid))})}ClearByEids(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateClearByEids(e);return yield this.RequestEntity.RemoveEntity(e)})}ClearByTypes(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateClearByTypes(e);return this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e)))})}SetVisibleByObjects(e,o=!0){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetVisibleByObjects(e,o);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.eid,entities:e.generateAtomData({bVisible:o})})))})}AddAct(e,o){return t(this,void 0,void 0,function*(){if(!e.className)return{success:!1,message:"No ClassName"};const t=e.className,i=this.obj.RegisterObj.GetTypes().find(e=>e.name===t);if(!i)return{success:!1,message:"Entity type is illegal"};return o?yield i.object.Add(e,o):yield i.object.Add(e)})}AddActMulit(e,o){var i,n;return t(this,void 0,void 0,function*(){let t=!0,r={};const a=[];for(let t=0;t<e.length;t++)e[t].setObj(this.obj),(null===(i=e[t])||void 0===i?void 0:i.addNewScheme)&&a.push(e[t].addNewScheme);if(a.length>0){const i=o?yield this.RequestEntity.CreateEntities(a,o):yield this.RequestEntity.CreateEntities(a);if(i.success){for(let t=0;t<e.length;t++){const o=this.obj.RegisterObj.Get(e[t].oType);o&&(o.object.addToMap(`${i.result.eids[t]}`,{object:o.object.generateDataObject({eid:`${i.result.eids[t]}`},e[t])}),"Group"===e[t].oType&&(yield o.object.GetOnly(e[t].eid)))}const t=!!o;(null===(n=i.result)||void 0===n?void 0:n.sceneChangeInfo)&&(r=yield ti(i.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap,t))}else t=!1}return{success:t,message:"",result:{objects:e,sceneChangeInfo:r}}})}RunAction(e,o){return t(this,void 0,void 0,function*(){this.SceneValidate.validateRunAction(e,o);return yield this.Action.RunAction(e,o)})}EndAction(e=!1){return t(this,void 0,void 0,function*(){return yield this.Action.EndAction(e)})}GetAction(){return t(this,void 0,void 0,function*(){return yield this.Action.GetAction()})}AddSelection(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateAddSelection(e);return yield this.Selection.Add(e)})}RemoveSelection(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateRemoveSelection(e);return yield this.Selection.Remove(e)})}ClearSelection(){return t(this,void 0,void 0,function*(){return yield this.Selection.Clear()})}DrawSelection(){return t(this,void 0,void 0,function*(){return yield this.Selection.Draw()})}GetSelection(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:yield this.Selection.Get()}})}Save(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSave(e);const t=yield this.StartApi(this.apiClassName,"SaveScene",{containerId:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Load(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateLoad(e);const t=yield this.StartApi(this.apiClassName,"LoadScene",{containerId:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetObjectEid(e){return t(this,void 0,void 0,function*(){return e&&this.SceneValidate.validateGetObjectEid(e),e?this.obj.ObjectEidMap.get(`${e}`):this.obj.ObjectEidMap})}Refresh(){return t(this,void 0,void 0,function*(){const e=yield this.obj.RequestEntity.GetAllEntitiesData();let t=[];return e.success&&e.result&&(t=yield Jo(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:t}})}GetAll(){var e;return t(this,void 0,void 0,function*(){const t=yield this.obj.RequestEntity.GetAllEntities();let o={};return t.success&&(o=yield Ko(t.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(e=t.result)||void 0===e?void 0:e.sceneChangeInfo)&&(yield ti(t.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap))),{success:t.success,message:t.message,result:o}})}GetByTypes(e){var o;return t(this,void 0,void 0,function*(){const t=yield this.obj.RequestEntity.GetAllEntities(e);let i={};if(t.success){i=yield Ko(t.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(o=t.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(t.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap));const e=Object.keys(i);for(let t=0;t<e.length;t++)i[e[t]]=i[e[t]].filter(o=>o.oType===e[t])}return{success:t.success,message:t.message,result:i}})}GetGlobal(){var e,o;return t(this,void 0,void 0,function*(){const t=yield this.obj.DataModel.GeoReference.Get(),i=yield this.obj.CameraStart.Get(),n=[],r={};if(t.success&&(null===(e=null==t?void 0:t.result)||void 0===e?void 0:e.length)>0?r.GeoReference=t.result.map(e=>e.object):n.push("GeoReference"),i.success&&(null===(o=null==i?void 0:i.result)||void 0===o?void 0:o.length)>0?r.CameraStart=i.result.map(e=>e.object):n.push("CameraStart"),n.length>0){const e=yield this.obj.RequestEntity.GetAllEntitiesData(n);let t=[];return e.success&&e.result&&(t=yield Jo(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),n.forEach(e=>{r[e]=t[e]})),{success:!0,message:"",result:r}}return{success:!0,message:"",result:r}})}GetCameraStart(){var e,o;return t(this,void 0,void 0,function*(){const t=yield this.obj.CameraStart.Get();if(t.success&&(null===(e=null==t?void 0:t.result)||void 0===e?void 0:e.length)>0)return{success:!0,message:"",result:{CameraStart:t.result.map(e=>e.object)}};{const e=yield this.obj.RequestEntity.GetAllEntities(["CameraStart"]);let t={};return e.success&&(t=yield Ko(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(o=e.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap))),{success:e.success,message:e.message,result:t}}})}GetGeoReference(){var e,o;return t(this,void 0,void 0,function*(){const t=yield this.obj.DataModel.GeoReference.Get();if(t.success&&(null===(e=null==t?void 0:t.result)||void 0===e?void 0:e.length)>0)return{success:!0,message:"",result:{GeoReference:t.result.map(e=>e.object)}};{const e=yield this.obj.RequestEntity.GetAllEntities(["GeoReference"]);let t={};return e.success&&(t=yield Ko(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(o=e.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap))),{success:e.success,message:e.message,result:t}}})}GetTiles(){var e,o,i,n,r,a;return t(this,void 0,void 0,function*(){const t=[{Tiles:[]},{Project:[]},{EarthTiles:[]}],s=yield this.Tiles.Get();if(s.success&&(null===(e=null==s?void 0:s.result)||void 0===e?void 0:e.length)>0)t[0].Tiles=s.result.map(e=>e.object);else{const e=yield this.obj.RequestEntity.GetAllEntities(["Tiles"]);let i={};e.success&&(i=yield Ko(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(o=e.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),t[0].Tiles=i.Tiles)}const l=yield this.Project.Get();if(l.success&&(null===(i=null==l?void 0:l.result)||void 0===i?void 0:i.length)>0)t[1].Project=l.result.map(e=>e.object);else{const e=yield this.obj.RequestEntity.GetAllEntities(["Project"]);let o={};e.success&&(o=yield Ko(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(n=e.result)||void 0===n?void 0:n.sceneChangeInfo)&&(yield ti(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),t[1].Project=o.Project)}const d=yield this.EarthTiles.Get();if(d.success&&(null===(r=null==d?void 0:d.result)||void 0===r?void 0:r.length)>0)t[2].EarthTiles=d.result.map(e=>e.object);else{const e=yield this.obj.RequestEntity.GetAllEntities(["EarthTiles"]);let o={};e.success&&(o=yield Ko(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(a=e.result)||void 0===a?void 0:a.sceneChangeInfo)&&(yield ti(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),t[2].EarthTiles=o.EarthTiles)}return{success:!0,message:"",result:t}})}GetProject(){var e,o;return t(this,void 0,void 0,function*(){const t=yield this.Project.Get();if(t.success&&(null===(e=null==t?void 0:t.result)||void 0===e?void 0:e.length)>0)return{success:!0,message:"",result:{Project:t.result.map(e=>e.object)}};{const e=yield this.obj.RequestEntity.GetAllEntities(["Project"]);let t={};return e.success&&(t=yield Ko(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),(null===(o=e.result)||void 0===o?void 0:o.sceneChangeInfo)&&(yield ti(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap))),{success:e.success,message:e.message,result:t}}})}Merge(e,o,i=[]){return t(this,void 0,void 0,function*(){this.SceneValidate.validateMerge(e,o,i);const t=yield this.StartApi(this.apiClassName,"MergeScene",{containerId:e,anotherContainerId:o,EntityTypesToIgnore:i.map(e=>this.obj.RegisterObj.EntityType.get(e))});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLocation(e,o){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetLocation(e,o);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.eid,entities:e.generateAtomData({location:ni(e,o)})})))})}SetLocations(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetLocations(e);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.object.eid,entities:e.object.generateAtomData({location:ni(e.object,e.location)})})))})}SetRotator(e,o){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetRotator(e,o);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.eid,entities:e.generateAtomData({rotator:ri(e,o)})})))})}SetRotators(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetRotators(e);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.object.eid,entities:e.object.generateAtomData({rotator:ri(e.object,e.rotator)})})))})}SetScale3D(e,o){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetScale3D(e,o);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.eid,entities:e.generateAtomData({scale3d:ni(e,o)})})))})}SetScale3Ds(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetScale3Ds(e);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.object.eid,entities:e.object.generateAtomData({scale3d:ni(e.object,e.scale3d)})})))})}SetVisible(e,o=!0){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetVisible(e,o);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.eid,entities:e.generateAtomData({bVisible:o})})))})}SetLocked(e,o=!0){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetLocked(e,o);return yield this.RequestEntity.UpdateEntitiesByEids(e.map(e=>({eid:e.eid,entities:e.generateAtomData({bLocked:o})})))})}Update(e,o,i){return t(this,void 0,void 0,function*(){this.SceneValidate.validateUpdate(e,o,i);const t=[];for(let i=0;i<e.length;i++)if(e[i].generateAtomData)t.push({eid:e[i].eid,entities:e[i].generateAtomData(o)});else{if(!(yield e[i].Update(o)).success)return{success:!1,message:"error",result:e[i]}}return i?yield this.RequestEntity.UpdateEntitiesByEids(t,i):yield this.RequestEntity.UpdateEntitiesByEids(t)})}Updates(e,o){var i;return t(this,void 0,void 0,function*(){const t=[];for(let o=0;o<e.length;o++)if(null===(i=e[o].object)||void 0===i?void 0:i.generateAtomData)t.push({eid:e[o].object.eid,entities:e[o].object.generateAtomData(e[o].jsonData)});else{if(!(yield e[o].object.Update(e[o].jsonData)).success)return{success:!1,message:"error",result:e[o].object}}return o?yield this.RequestEntity.UpdateEntitiesByEids(t,o):yield this.RequestEntity.UpdateEntitiesByEids(t)})}ClearByCustomId(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateClearByCustomId(e);const t=ai(e,this.obj.ObjectEidMap).map(e=>e.eid);if(0==t.length)return{success:!1,message:"No Objects"};return yield this.RequestEntity.RemoveEntity(t)})}GetByCustomId(e){return t(this,void 0,void 0,function*(){return this.SceneValidate.validateGetByCustomId(e),{success:!0,message:"",result:ai(e,this.obj.ObjectEidMap)}})}UpdateByCustomId(e,o,i){return t(this,void 0,void 0,function*(){this.SceneValidate.validateUpdateByCustomId(e,o,i);let t=!0;const n=ai(e,this.obj.ObjectEidMap),r=[];for(let e=0;e<n.length;e++)if(n[e].generateAtomData)r.push({eid:n[e].eid,entities:n[e].generateAtomData(o)});else{(yield n[e].Update(o)).success||(t=!1)}if(r.length>0){if((i?yield this.RequestEntity.UpdateEntitiesByEids(r,i):yield this.RequestEntity.UpdateEntitiesByEids(r)).success||(t=!1),t)for(let e=0;e<n.length;e++)n[e].SetData(o)}return{success:t,message:""}})}UpdateByCustomIds(e,o){return t(this,void 0,void 0,function*(){this.SceneValidate.validateUpdateByCustomIds(e,o);let t=!0;const i=ai(e.filter(e=>void 0!==e.customId).map(e=>e.customId),this.obj.ObjectEidMap),n=[];for(let o=0;o<i.length;o++){const r=e.find(e=>e.customId===i[o].customId);if(r)if(i[o].generateAtomData)n.push({eid:i[o].eid,entities:i[o].generateAtomData(r)});else{(yield i[o].Update(r)).success||(t=!1)}}if(n.length>0){if((o?yield this.RequestEntity.UpdateEntitiesByEids(n,o):yield this.RequestEntity.UpdateEntitiesByEids(n)).success||(t=!1),t)for(let t=0;t<i.length;t++){const o=e.find(e=>e.customId===i[t].customId);o&&i[t].SetData(o)}}return{success:t,message:""}})}ClearByEntityName(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateClearByEntityName(e);const t=si(e,this.obj.ObjectEidMap).map(e=>e.eid);if(0==t.length)return{success:!1,message:"No Objects"};return yield this.RequestEntity.RemoveEntity(t)})}GetByEntityName(e){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:si(e,this.obj.ObjectEidMap)}})}UpdateByEntityName(e,o,i){return t(this,void 0,void 0,function*(){this.SceneValidate.validateUpdateByEntityName(e,o,i);let t=!0;const n=si(e,this.obj.ObjectEidMap),r=[];for(let e=0;e<n.length;e++)if(n[e].generateAtomData)r.push({eid:n[e].eid,entities:n[e].generateAtomData(o)});else{(yield n[e].Update(o)).success||(t=!1)}if(r.length>0){if((i?yield this.RequestEntity.UpdateEntitiesByEids(r,i):yield this.RequestEntity.UpdateEntitiesByEids(r)).success||(t=!1),t)for(let e=0;e<n.length;e++)n[e].SetData(o)}return{success:t,message:""}})}UpdateByEntityNames(e,o){return t(this,void 0,void 0,function*(){this.SceneValidate.validateUpdateByEntityNames(e,o);let t=!0;const i=si(e.filter(e=>void 0!==e.entityName).map(e=>e.entityName),this.obj.ObjectEidMap),n=[];for(let o=0;o<i.length;o++){const r=e.find(e=>e.entityName===i[o].entityName);if(r)if(i[o].generateAtomData)n.push({eid:i[o].eid,entities:i[o].generateAtomData(r)});else{(yield i[o].Update(r)).success||(t=!1)}}if(n.length>0){if((o?yield this.RequestEntity.UpdateEntitiesByEids(n,o):yield this.RequestEntity.UpdateEntitiesByEids(n)).success||(t=!1),t)for(let t=0;t<i.length;t++){const o=e.find(e=>e.entityName===i[t].entityName);o&&i[t].SetData(o)}}return{success:t,message:""}})}SetEntityOutline(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetEntityOutline(e);const t={eids:e.entities.map(e=>e.eid)};return void 0!==e.styleName&&(t.styleName=e.styleName),void 0!==e.bOutline&&(t.bOutline=e.bOutline),yield this.Visual.SetEntityOutline(t)})}SetEntityHighlight(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetEntityHighlight(e);const t={eids:e.entities.map(e=>e.eid)};return void 0!==e.styleName&&(t.styleName=e.styleName),void 0!==e.bHighlight&&(t.bHighlight=e.bHighlight),yield new Si(this.obj).SetEntityHighlight(t)})}GetByEids(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateGetByEids(e);return{success:!0,message:"",result:yield Xo(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)}})}SetSceneStyle(e="comic"){return t(this,void 0,void 0,function*(){this.SceneValidate.validateSetSceneStyle(e);const t=yield this.StartApi(this.SetSceneStyleAPI,"SetSceneStyle",{style:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetBoundingBox(e){var o;return t(this,void 0,void 0,function*(){this.SceneValidate.validateGetBound(e);const t=yield this.StartApi(this.apiClassName,"GetEntitiesBound",{eids:e.map(e=>e.eid)}),i=yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);return i.success&&(null===(o=null==i?void 0:i.result)||void 0===o?void 0:o.entitiesBound)&&(i.result.entitiesBound.center=[(i.result.entitiesBound.max[0]+i.result.entitiesBound.min[0])/2,(i.result.entitiesBound.max[1]+i.result.entitiesBound.min[1])/2,(i.result.entitiesBound.max[2]+i.result.entitiesBound.min[2])/2]),i})}ArrayDuplicate(e){var o,i,n,r,a,s,l,d;return t(this,void 0,void 0,function*(){this.SceneValidate.validateArrayDuplicate(e);const t=yield this.StartApi(this.WdpArrayDuplicateAPI,"ExecuteArrayDuplicate",{eids:e.entities.map(e=>e.eid),num:null!==(o=e.num)&&void 0!==o?o:1,translation:null!==(i=e.translation)&&void 0!==i?i:[0,0,0],rotator:null!==(n=e.rotator)&&void 0!==n?n:[0,0,0],scale:null!==(r=e.scale)&&void 0!==r?r:[1,1,1],coordType:null!==(a=e.coordType)&&void 0!==a?a:"world",bInstance:null!==(s=null==e?void 0:e.bInstance)&&void 0!==s&&s,instanceName:null!==(l=null==e?void 0:e.instanceName)&&void 0!==l?l:""}),c=yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);if(c.success&&(null===(d=null==c?void 0:c.result)||void 0===d?void 0:d.eids)){const e=yield Xo(c.result.eids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);c.result.entities=e}return c})}Move(e){return t(this,void 0,void 0,function*(){this.SceneValidate.validateMove(e);const t=new this.obj.Path(e.path),o=this.obj.RegisterObj.Get(e.entity.type);if(o){const i=o.object.GetObject(e.entity);if(t&&i){if((yield this.Add([t,i])).success){const o=new this.obj.Bound(Object.assign({moving:i,path:t},e.moving)),n=yield this.Add(o);if(n.success)return n}}}return{success:!1,message:""}})}}class $a{validateFocusToNodes(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$;const T=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw T&&T.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={entity:{},nodeIds:[],rotation:{pitch:-30,yaw:0},distanceFactor:1,flyTime:1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw T&&T.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.entity)&&"object"!=typeof e.entity)throw T&&T.func(`entity ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`entity ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(void 0===(null==e?void 0:e.nodeIds))throw T&&T.func(`nodeIds ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().required}`),new Error(`nodeIds ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().required}`);if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw T&&T.func(`nodeIds ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`),new Error(`nodeIds ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().array}`);if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw T&&T.func(`The value of nodeIds ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().string}`),new Error(`The value of nodeIds ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().string}`);if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw T&&T.func(`rotation ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().object}`),new Error(`rotation ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().object}`);const t={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw T&&T.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(g=e.rotation)||void 0===g?void 0:g.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw T&&T.func(`rotation.pitch ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}. ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}. ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(E=e.rotation)||void 0===E?void 0:E.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw T&&T.func(`rotation.yaw ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}. ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}. ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().numrangeber} -180 ~ 180`)}if(void 0!==e.distanceFactor&&"number"!=typeof e.distanceFactor)throw T&&T.func(`distanceFactor ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().number}`),new Error(`distanceFactor ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().number}`);if(void 0!==e.flyTime&&"number"!=typeof e.flyTime)throw T&&T.func(`flyTime ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().number}`),new Error(`flyTime ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().number}`)}}validateResetCameraLimit(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("string"!=typeof e)throw s&&s.func(`state ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`state ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(!li.stateResetLimit.find(t=>t===e))throw s&&s.func(`state ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().range} ${li.stateResetLimit.toString()}`),new Error(`state ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.stateResetLimit.toString()}`)}}validateSetCameraLockLimit(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b;const p=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw p&&p.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={locationLimit:10,pitchLimit:10,yawLimit:10,viewDistanceLimit:1e3};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw p&&p.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.locationLimit&&"number"!=typeof e.locationLimit)throw p&&p.func(`locationLimit ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number}`),new Error(`locationLimit ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}`);if(void 0!==e.pitchLimit){if("number"!=typeof e.pitchLimit)throw p&&p.func(`pitchLimit ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`pitchLimit ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(e.pitchLimit<-10||e.pitchLimit>10)throw p&&p.func(`pitchLimit ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} -10 ~ 10`),new Error(`pitchLimit ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} -10 ~ 10`)}if(void 0!==e.yawLimit){if("number"!=typeof e.yawLimit)throw p&&p.func(`yawLimit ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`yawLimit ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(e.yawLimit<-20||e.yawLimit>20)throw p&&p.func(`yawLimit ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} -20 ~ 20`),new Error(`yawLimit ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} -20 ~ 20`)}if(void 0!==e.viewDistanceLimit){if("number"!=typeof e.viewDistanceLimit)throw p&&p.func(`viewDistanceLimit ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`),new Error(`viewDistanceLimit ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`);if(e.viewDistanceLimit<-100||e.viewDistanceLimit>100)throw p&&p.func(`viewDistanceLimit ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().range} -100 ~ 100`),new Error(`viewDistanceLimit ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} -100 ~ 100`)}}}validateSetCameraLimit(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I;const j=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw j&&j.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={locationLimit:[[0,0],[0,0]],pitchLimit:[-90,0],yawLimit:[-180,180],viewDistanceLimit:[500,600]};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw j&&j.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null==e?void 0:e.locationLimit)){if("object"!=typeof e.locationLimit||void 0===e.locationLimit.length)throw j&&j.func(`locationLimit ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`locationLimit ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);e.locationLimit.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw j&&j.func(`The value of locationLimit ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`The value of locationLimit ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw j&&j.func(`The value of locationLimit ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of locationLimit ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})}if(void 0!==e.pitchLimit){if("object"!=typeof e.pitchLimit||void 0===e.pitchLimit.length)throw j&&j.func(`pitchLimit ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().array}`),new Error(`pitchLimit ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`);if(2!==e.pitchLimit.filter(e=>"number"==typeof e&&e>=-90&&e<=0).length)throw j&&j.func(`pitchLimit ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().arrayNumberLength} 2. ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().arrayNumberLength} 2. ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().range} -90 ~ 0`);if(e.pitchLimit[0]>e.pitchLimit[1])throw j&&j.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 j&&j.func(`yawLimit ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().array}`),new Error(`yawLimit ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().array}`);if(2!==e.yawLimit.filter(e=>"number"==typeof e&&e>=-180&&e<=180).length)throw j&&j.func(`yawLimit value ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().arrayNumberLength} 2. ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit value ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().arrayNumberLength} 2. ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} -180 ~ 180`);if(e.yawLimit[0]>e.yawLimit[1])throw j&&j.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 j&&j.func(`viewDistanceLimit ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().object}`),new Error(`viewDistanceLimit ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().object}`);if(2!==e.viewDistanceLimit.filter(e=>"number"==typeof e&&e>=0).length)throw j&&j.func(`viewDistanceLimit value ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit value ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().arrayPositiveNumberLength} 2`);if(e.viewDistanceLimit[0]>e.viewDistanceLimit[1])throw j&&j.func("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]")}}}validateResetCameraPose(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw u&&u.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={state:"Default",flyTime:1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw u&&u.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.state){if("string"!=typeof e.state)throw u&&u.func(`state ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`state ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.stateReset.find(t=>t===e.state))throw u&&u.func(`state ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.stateReset.toString()}`),new Error(`state ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.stateReset.toString()}`)}if(void 0!==e.flyTime&&"number"!=typeof e.flyTime)throw u&&u.func(`flyTime ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`flyTime ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)}}validateSetCameraPose(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I;const j=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw j&&j.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={location:[121.48940131,31.25135281,500],rotation:{pitch:-30,yaw:0},flyTime:1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw j&&j.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.location){if("object"!=typeof e.location||void 0===e.location.length)throw j&&j.func(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr),new Error(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw j&&j.func(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().locationErr2),new Error(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().locationErr2)}if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw j&&j.func(`rotation ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`),new Error(`rotation ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`);const t={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw j&&j.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(u=e.rotation)||void 0===u?void 0:u.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw j&&j.func(`rotation.pitch ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}. ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}. ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(f=e.rotation)||void 0===f?void 0:f.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw j&&j.func(`rotation.yaw ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}. ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}. ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().numrangeber} -180 ~ 180`)}if(void 0!==e.flyTime&&"number"!=typeof e.flyTime)throw j&&j.func(`flyTime ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}`),new Error(`flyTime ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`)}}validateSetCameraMode(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("string"!=typeof e)throw s&&s.func(`controlMode ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().string}`),new Error(`controlMode ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().string}`);if(!li.controlModeType.find(t=>t===e))throw s&&s.func(`controlModeType ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().range} ${li.controlModeType.toString()}`),new Error(`controlModeType ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().range} ${li.controlModeType.toString()}`)}}validateUpdateCamera(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z,W,H,Z;const Y=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw Y&&Y.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={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(e).forEach(e=>{var o,i;if(void 0===t[e])throw Y&&Y.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.location){if("object"!=typeof e.location||void 0===e.location.length)throw Y&&Y.func(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr),new Error(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw Y&&Y.func(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().locationErr2),new Error(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().locationErr2)}if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw Y&&Y.func(`rotation ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`),new Error(`rotation ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`);const t={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw Y&&Y.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(u=e.rotation)||void 0===u?void 0:u.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw Y&&Y.func(`rotation.pitch ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}. ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}. ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(f=e.rotation)||void 0===f?void 0:f.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw Y&&Y.func(`rotation.yaw ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}. ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}. ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().numrangeber} -180 ~ 180`)}if(void 0!==(null==e?void 0:e.locationLimit)){if("object"!=typeof e.locationLimit||void 0===e.locationLimit.length)throw Y&&Y.func(`locationLimit ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().array}`),new Error(`locationLimit ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().array}`);e.locationLimit.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw Y&&Y.func(`The value of locationLimit ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`The value of locationLimit ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw Y&&Y.func(`The value of locationLimit ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of locationLimit ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})}if(void 0!==e.pitchLimit){if("object"!=typeof e.pitchLimit||void 0===e.pitchLimit.length)throw Y&&Y.func(`pitchLimit ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().array}`),new Error(`pitchLimit ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().array}`);if(2!==e.pitchLimit.filter(e=>"number"==typeof e&&e>=-90&&e<=0).length)throw Y&&Y.func(`pitchLimit ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().arrayNumberLength} 2. ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().arrayNumberLength} 2. ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().range} -90 ~ 0`);if(e.pitchLimit[0]>e.pitchLimit[1])throw Y&&Y.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 Y&&Y.func(`yawLimit ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().array}`),new Error(`yawLimit ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().array}`);if(2!==e.yawLimit.filter(e=>"number"==typeof e&&e>=-180&&e<=180).length)throw Y&&Y.func(`yawLimit value ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().arrayNumberLength} 2. ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit value ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().arrayNumberLength} 2. ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().range} -180 ~ 180`);if(e.yawLimit[0]>e.yawLimit[1])throw Y&&Y.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 Y&&Y.func(`viewDistanceLimit ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().object}`),new Error(`viewDistanceLimit ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().object}`);if(2!==e.viewDistanceLimit.filter(e=>"number"==typeof e&&e>=0).length)throw Y&&Y.func(`viewDistanceLimit value ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit value ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().arrayPositiveNumberLength} 2`);if(e.viewDistanceLimit[0]>e.viewDistanceLimit[1])throw Y&&Y.func("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]")}if(void 0!==e.fieldOfView&&("number"!=typeof e.fieldOfView||e.fieldOfView<0||e.fieldOfView>120))throw Y&&Y.func(`fieldOfView ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().number}. ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().range} 0 ~ 120`),new Error(`fieldOfView ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().number}. ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().range} 0 ~ 120`);if(void 0!==e.controlMode){if("string"!=typeof e.controlMode)throw Y&&Y.func(`controlMode ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().string}`),new Error(`controlMode ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().string}`);if(!li.controlModeType.find(t=>t===e.controlMode))throw Y&&Y.func(`controlModeType ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().range} ${li.controlModeType.toString()}`),new Error(`controlModeType ${null===(W=li.getInstance())||void 0===W?void 0:W.GetCommonErr().range} ${li.controlModeType.toString()}`)}if(void 0!==e.flyTime&&"number"!=typeof e.flyTime)throw Y&&Y.func(`flyTime ${null===(H=li.getInstance())||void 0===H?void 0:H.GetCommonErr().number}`),new Error(`flyTime ${null===(Z=li.getInstance())||void 0===Z?void 0:Z.GetCommonErr().number}`)}}validateFlyTo(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S;const C=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw C&&C.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={targetPosition:[121.48533665,31.24164246,30],rotation:{pitch:-30,yaw:0},distance:500,flyTime:1};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw C&&C.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.targetPosition){if("object"!=typeof e.targetPosition||void 0===e.targetPosition.length)throw C&&C.func(`targetPosition ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`),new Error(`targetPosition ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().array}`);if(3!==e.targetPosition.filter(e=>"number"==typeof e).length)throw C&&C.func(`targetPosition ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayNumberLength} 3`),new Error(`targetPosition ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw C&&C.func(`rotation ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().object}`),new Error(`rotation ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`);const t={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw C&&C.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(u=e.rotation)||void 0===u?void 0:u.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw C&&C.func(`rotation.pitch ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}, ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}, ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(f=e.rotation)||void 0===f?void 0:f.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw C&&C.func(`rotation.yaw ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}, ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}, ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().range} -180 ~ 180`)}if(void 0!==e.distance&&"number"!=typeof e.distance)throw C&&C.func(`distance ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().number}`),new Error(`distance ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`);if(void 0!==e.flyTime&&"number"!=typeof e.flyTime)throw C&&C.func(`flyTime ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}`),new Error(`flyTime ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().number}`)}}validateMove(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw u&&u.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={direction:"right",velocity:10};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw u&&u.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.direction){if("string"!=typeof e.direction)throw u&&u.func(`direction ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`direction ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.directionType.find(t=>t===e.direction))throw u&&u.func(`direction ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.directionType.toString()}`),new Error(`direction ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.directionType.toString()}`)}if(void 0!==e.velocity&&"number"!=typeof e.velocity)throw u&&u.func(`velocity ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`velocity ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)}}validateFocus(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S;const C=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw C&&C.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={rotation:{pitch:-30,yaw:0},distanceFactor:.8,flyTime:1,entity:[]};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw C&&C.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.rotation){if("object"!=typeof e.rotation)throw C&&C.func(`rotation ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`rotation ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);const t={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw C&&C.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(s=e.rotation)||void 0===s?void 0:s.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw C&&C.func(`rotation.pitch ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}. ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}. ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(v=e.rotation)||void 0===v?void 0:v.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw C&&C.func(`rotation.yaw ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().object}. ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().object}. ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} -180 ~ 180`)}if(void 0!==e.distanceFactor&&"number"!=typeof e.distanceFactor)throw C&&C.func(`distanceFactor ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`),new Error(`distanceFactor ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}`);if(void 0!==e.flyTime&&"number"!=typeof e.flyTime)throw C&&C.func(`flyTime ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}`),new Error(`flyTime ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`);if(void 0!==e.entity){if("object"!=typeof e.entity||void 0===e.entity.length)throw C&&C.func(`entity ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().array}`),new Error(`entity ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().array}`);if(e.entity.filter(e=>"object"==typeof e).length!==e.entity.length)throw C&&C.func(`entity value ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().object}`),new Error(`entity value ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().object}`)}}}validateFollow(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S;const C=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw C&&C.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={followRotation:{pitch:-30,yaw:0},useRelativeRotation:!0,distance:200,bFPS:!1,entity:{}};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw C&&C.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.followRotation){if("object"!=typeof e.followRotation)throw C&&C.func(`followRotation ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`followRotation ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);const t={pitch:-30,yaw:0};if(Object.keys(e.followRotation).forEach(e=>{var o,i;if(void 0===t[e])throw C&&C.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(s=e.followRotation)||void 0===s?void 0:s.pitch)&&("number"!=typeof e.followRotation.pitch||e.followRotation.pitch<-90||e.followRotation.pitch>0))throw C&&C.func(`followRotation.pitch ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}. ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().range} -90 ~ 0`),new Error(`followRotation.pitch ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}. ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(v=e.followRotation)||void 0===v?void 0:v.yaw)&&("number"!=typeof e.followRotation.yaw||e.followRotation.yaw<-180||e.followRotation.yaw>180))throw C&&C.func(`followRotation.yaw ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}. ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} -180 ~ 180`),new Error(`followRotation.yaw ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}. ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} -180 ~ 180`)}if(void 0!==e.useRelativeRotation&&"boolean"!=typeof e.useRelativeRotation)throw C&&C.func(`useRelativeRotation ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().boolean}`),new Error(`useRelativeRotation ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().boolean}`);if(void 0!==e.distance&&"number"!=typeof e.distance)throw C&&C.func(`distance ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().number}`),new Error(`distance ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}`);if(void 0!==e.bFPS&&"boolean"!=typeof e.bFPS)throw C&&C.func(`bFPS ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().boolean}`),new Error(`bFPS ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().boolean}`);if(void 0!==e.entity&&"object"!=typeof e.entity)throw C&&C.func(`entity ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().object}`),new Error(`entity ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().object}`)}}validateRotate(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw u&&u.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={direction:"forwar",velocity:10};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw u&&u.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.direction){if("string"!=typeof e.direction)throw u&&u.func(`direction ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`),new Error(`direction ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().object}`);if(!li.directionType.find(t=>t===e.direction))throw u&&u.func(`direction ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.directionType.toString()}`),new Error(`direction ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.directionType.toString()}`)}if(void 0!==e.velocity&&"number"!=typeof e.velocity)throw u&&u.func(`velocity ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`velocity ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)}}validateAround(e){var t,o,i,n,r,a,s,l,d,c;const u=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw u&&u.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj);const t={direction:"forwar",velocity:10};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw u&&u.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.direction){if("string"!=typeof e.direction)throw u&&u.func(`direction ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`direction ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.directionType2.find(t=>t===e.direction))throw u&&u.func(`direction ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.directionType2.toString()}`),new Error(`direction ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.directionType2.toString()}`)}if(void 0!==e.velocity&&"number"!=typeof e.velocity)throw u&&u.func(`velocity ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`),new Error(`velocity ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().number}`)}}validatePlayCameraRoam(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j;const S=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw S&&S.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj2),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().notObj2);if(void 0!==t){if("object"!=typeof t)throw S&&S.func(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().notObj),new Error(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().notObj);const e={state:"Play",progressRatio:.5,speedRatio:1,bReverse:!1};if(Object.keys(t).forEach(t=>{var o,i;if(void 0===e[t])throw S&&S.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.state){if("string"!=typeof t.state)throw S&&S.func(`state ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().string}`),new Error(`state ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().string}`);if(!li.stateType.find(e=>e===t.state))throw S&&S.func(`state ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} ${li.stateType.toString()}`),new Error(`state ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} ${li.stateType.toString()}`)}if(void 0!==t.progressRatio){if("number"!=typeof t.progressRatio)throw S&&S.func(`progressRatio ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`),new Error(`progressRatio ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`);if(t.progressRatio<0||t.progressRatio>1)throw S&&S.func(`progressRatio ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} 0 ~ 1`),new Error(`progressRatio ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} 0 ~ 1`)}if(void 0!==t.speedRatio&&"number"!=typeof t.speedRatio)throw S&&S.func(`speedRatio ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`),new Error(`speedRatio ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().number}`);if(void 0!==t.bReverse&&"boolean"!=typeof t.bReverse)throw S&&S.func(`bReverse ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().boolean}`),new Error(`bReverse ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().boolean}`);if(void 0!==t.bEnableRotatingOnPause&&"boolean"!=typeof t.bEnableRotatingOnPause)throw S&&S.func(`bEnableRotatingOnPause ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().boolean}`),new Error(`bEnableRotatingOnPause ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().boolean}`);if(void 0!==t.bEnableZoomingOnPause&&"boolean"!=typeof t.bEnableZoomingOnPause)throw S&&S.func(`bEnableZoomingOnPause ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().boolean}`),new Error(`bEnableZoomingOnPause ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().boolean}`)}}}validateGetCameraRoamingInfo(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"object"!=typeof e)throw r&&r.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj2),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj2)}validatePlayRoam(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g;const f=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw f&&f.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj2),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().notObj2);if(void 0!==t){if("object"!=typeof t)throw f&&f.func(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().notObj),new Error(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().notObj);const e={progressRatio:.5,speedRatio:1,bReverse:!1};if(Object.keys(t).forEach(t=>{var o,i;if(void 0===e[t])throw f&&f.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.progressRatio){if("number"!=typeof t.progressRatio)throw f&&f.func(`progressRatio ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`),new Error(`progressRatio ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}`);if(t.progressRatio<0||t.progressRatio>1)throw f&&f.func(`progressRatio ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} 0 ~ 1`),new Error(`progressRatio ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().range} 0 ~ 1`)}if(void 0!==t.speedRatio&&"number"!=typeof t.speedRatio)throw f&&f.func(`speedRatio ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`),new Error(`speedRatio ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}`);if(void 0!==t.bReverse&&"boolean"!=typeof t.bReverse)throw f&&f.func(`bReverse ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`),new Error(`bReverse ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().boolean}`)}}}validatePauseRoam(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&void 0!==e){if(void 0!==e.bEnableRotatingOnPause&&"boolean"!=typeof e.bEnableRotatingOnPause)throw s&&s.func(`bEnableRotatingOnPause ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bEnableRotatingOnPause ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`);if(void 0!==e.bEnableZoomingOnPause&&"boolean"!=typeof e.bEnableZoomingOnPause)throw s&&s.func(`bEnableZoomingOnPause ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().boolean}`),new Error(`bEnableZoomingOnPause ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`)}}validateApply(e,t=1){var o,i,n,r,a,s;const l=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e)throw l&&l.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().notObj3),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().notObj3);if("number"!=typeof t)throw l&&l.func(`flyTime ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}`),new Error(`flyTime ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`)}}validateFocusByCustomId(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T;const M=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw M&&M.func(`cids ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`cids ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw M&&M.func(`cids value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().arrayString}`),new Error(`cids value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().arrayString}`);if("object"!=typeof t)throw M&&M.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().notObj),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().notObj);const o={rotation:{pitch:-30,yaw:0},distanceFactor:.8,flyTime:1,entity:[]};if(Object.keys(t).forEach(e=>{var t,i;if(void 0===o[e])throw M&&M.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.rotation){if("object"!=typeof t.rotation)throw M&&M.func(`rotation ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`),new Error(`rotation ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().object}`);const e={pitch:-30,yaw:0};if(Object.keys(t.rotation).forEach(t=>{var o,i;if(void 0===e[t])throw M&&M.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(v=t.rotation)||void 0===v?void 0:v.pitch)&&("number"!=typeof t.rotation.pitch||t.rotation.pitch<-90||t.rotation.pitch>0))throw M&&M.func(`rotation.pitch ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}. ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}. ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(y=t.rotation)||void 0===y?void 0:y.yaw)&&("number"!=typeof t.rotation.yaw||t.rotation.yaw<-180||t.rotation.yaw>180))throw M&&M.func(`rotation.yaw ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}. ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}. ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} -180 ~ 180`)}if(void 0!==t.distanceFactor&&"number"!=typeof t.distanceFactor)throw M&&M.func(`distanceFactor ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`),new Error(`distanceFactor ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}`);if(void 0!==t.flyTime&&"number"!=typeof t.flyTime)throw M&&M.func(`flyTime ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().number}`),new Error(`flyTime ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().number}`);if(void 0!==t.entity){if("object"!=typeof t.entity||void 0===t.entity.length)throw M&&M.func(`entity ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().array}`),new Error(`entity ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().array}`);if(t.entity.filter(e=>"object"==typeof e).length!==t.entity.length)throw M&&M.func(`entity value ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().object}`),new Error(`entity value ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().object}`)}}}validateFocusByEntityName(e,t){var o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T;const M=null===(o=li.getInstance())||void 0===o?void 0:o.GetEvent("OnValidateError");if(null===(i=li.getInstance())||void 0===i?void 0:i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw M&&M.func(`entityNames ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`),new Error(`entityNames ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().array}`);if(e.filter(e=>"string"==typeof e).length!==e.length)throw M&&M.func(`entityNames value ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`),new Error(`entityNames value ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().string}`);if("object"!=typeof t)throw M&&M.func(null===(l=li.getInstance())||void 0===l?void 0:l.getErrorTxt().notObj),new Error(null===(d=li.getInstance())||void 0===d?void 0:d.getErrorTxt().notObj);const o={rotation:{pitch:-30,yaw:0},distanceFactor:.8,flyTime:1,entity:[]};if(Object.keys(t).forEach(e=>{var t,i;if(void 0===o[e])throw M&&M.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==t.rotation){if("object"!=typeof t.rotation)throw M&&M.func(`rotation ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`),new Error(`rotation ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().object}`);const e={pitch:-30,yaw:0};if(Object.keys(t.rotation).forEach(t=>{var o,i;if(void 0===e[t])throw M&&M.func(`${t} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${t} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(v=t.rotation)||void 0===v?void 0:v.pitch)&&("number"!=typeof t.rotation.pitch||t.rotation.pitch<-90||t.rotation.pitch>0))throw M&&M.func(`rotation.pitch ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}. ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}. ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(y=t.rotation)||void 0===y?void 0:y.yaw)&&("number"!=typeof t.rotation.yaw||t.rotation.yaw<-180||t.rotation.yaw>180))throw M&&M.func(`rotation.yaw ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}. ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}. ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} -180 ~ 180`)}if(void 0!==t.distanceFactor&&"number"!=typeof t.distanceFactor)throw M&&M.func(`distanceFactor ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().number}`),new Error(`distanceFactor ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().number}`);if(void 0!==t.flyTime&&"number"!=typeof t.flyTime)throw M&&M.func(`flyTime ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().number}`),new Error(`flyTime ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().number}`);if(void 0!==t.entity){if("object"!=typeof t.entity||void 0===t.entity.length)throw M&&M.func(`entity ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().array}`),new Error(`entity ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().array}`);if(t.entity.filter(e=>"object"==typeof e).length!==t.entity.length)throw M&&M.func(`entity value ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().object}`),new Error(`entity value ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().object}`)}}}validateFocusToAll(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.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===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().array}`),new Error(`types ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().array}`);e.types.forEach(e=>{var t,o;if(!Ho.get(e))throw s&&s.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().entityType}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().entityType}`)})}if(void 0!==(null==e?void 0:e.bFilterForExclude)&&"boolean"!=typeof e.bFilterForExclude)throw s&&s.func(`bFilterForExclude ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().boolean}`),new Error(`bFilterForExclude ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`)}}validateCameraStepMove(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&void 0!==e){if(void 0===(null==e?void 0:e.moveDirection))throw g&&g.func(`moveDirection ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`moveDirection ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("string"!=typeof e.moveDirection)throw g&&g.func(`moveDirection ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`moveDirection ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.cameraStepMove.find(t=>t===e.moveDirection))throw g&&g.func(`moveDirection ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.cameraStepMove.toString()}`),new Error(`moveDirection ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.cameraStepMove.toString()}`);if(void 0===(null==e?void 0:e.step))throw g&&g.func(`step ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().required}`),new Error(`step ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().required}`);if("number"!=typeof e.step)throw g&&g.func(`step ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`step ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(void 0!==(null==e?void 0:e.bContinuous)&&"boolean"!=typeof e.bContinuous)throw g&&g.func(`bContinuous ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`bContinuous ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`)}}validateCameraStepRotate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m;const g=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&void 0!==e){if(void 0===(null==e?void 0:e.rotateDirection))throw g&&g.func(`rotateDirection ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`rotateDirection ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("string"!=typeof e.rotateDirection)throw g&&g.func(`rotateDirection ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`rotateDirection ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(!li.cameraStepRotate.find(t=>t===e.rotateDirection))throw g&&g.func(`rotateDirection ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().range} ${li.cameraStepRotate.toString()}`),new Error(`rotateDirection ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} ${li.cameraStepRotate.toString()}`);if(void 0===(null==e?void 0:e.step))throw g&&g.func(`step ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().required}`),new Error(`step ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().required}`);if("number"!=typeof e.step)throw g&&g.func(`step ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`step ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(void 0!==(null==e?void 0:e.bContinuous)&&"boolean"!=typeof e.bContinuous)throw g&&g.func(`bContinuous ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().boolean}`),new Error(`bContinuous ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().boolean}`)}}validateCameraStepZoom(e){var t,o,i,n,r,a,s,l;const d=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&void 0!==e){if(void 0===(null==e?void 0:e.step))throw d&&d.func(`step ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().required}`),new Error(`step ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().required}`);if("number"!=typeof e.step)throw d&&d.func(`step ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().number}`),new Error(`step ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().number}`);if(void 0!==(null==e?void 0:e.bContinuous)&&"boolean"!=typeof e.bContinuous)throw d&&d.func(`bContinuous ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`),new Error(`bContinuous ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`)}}validateSetCameraSpeed(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E;const w=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0!==(null==e?void 0:e.rotationYawSpeedScale)){if("number"!=typeof e.rotationYawSpeedScale)throw w&&w.func(`rotationYawSpeedScale ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().number}`),new Error(`rotationYawSpeedScale ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().number}`);if(e.rotationYawSpeedScale<0)throw w&&w.func(`rotationYawSpeedScale ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().positiveNumber}`),new Error(`rotationYawSpeedScale ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().positiveNumber}`)}if(void 0!==(null==e?void 0:e.rotationPitchSpeedScale)){if("number"!=typeof e.rotationPitchSpeedScale)throw w&&w.func(`rotationPitchSpeedScale ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}`),new Error(`rotationPitchSpeedScale ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().number}`);if(e.rotationPitchSpeedScale<0)throw w&&w.func(`rotationPitchSpeedScale ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().positiveNumber}`),new Error(`rotationPitchSpeedScale ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().positiveNumber}`)}if(void 0!==(null==e?void 0:e.zoomSpeedScale)){if("number"!=typeof e.zoomSpeedScale)throw w&&w.func(`zoomSpeedScale ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}`),new Error(`zoomSpeedScale ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}`);if(e.zoomSpeedScale<0)throw w&&w.func(`zoomSpeedScale ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().positiveNumber}`),new Error(`zoomSpeedScale ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().positiveNumber}`)}if(void 0!==(null==e?void 0:e.keyMovementBaseSpeed)){if("number"!=typeof e.keyMovementBaseSpeed)throw w&&w.func(`keyMovementBaseSpeed ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}`),new Error(`keyMovementBaseSpeed ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}`);if(e.keyMovementBaseSpeed<0)throw w&&w.func(`keyMovementBaseSpeed ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().positiveNumber}`),new Error(`keyMovementBaseSpeed ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().positiveNumber}`)}if(void 0!==(null==e?void 0:e.enableDynamicSpeed)&&"boolean"!=typeof e.enableDynamicSpeed)throw w&&w.func(`enableDynamicSpeed ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().boolean}`),new Error(`enableDynamicSpeed ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().boolean}`)}}validateSetCameraAnimation(e){var t,o,i,n,r,a;const s=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if(void 0!==(null==e?void 0:e.showTouchEffect)&&"boolean"!=typeof e.showTouchEffect)throw s&&s.func(`showTouchEffect ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`showTouchEffect ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.showRotateICON)&&"boolean"!=typeof e.showRotateICON)throw s&&s.func(`showRotateICON ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().boolean}`),new Error(`showRotateICON ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`)}}validateToggleCameraSelfRotate(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"boolean"!=typeof e)throw r&&r.func(`bSelfRotate ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bSelfRotate ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`)}}class Ta extends fi{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 $a}),Object.defineProperty(this,"currentRoam",{enumerable:!0,configurable:!0,writable:!0,value:null})}FocusToNodes(e,o="Tiles"){return t(this,void 0,void 0,function*(){this.CameraValidate.validateFocusToNodes(e);const t={nodeIds:e.nodeIds};if("Project"===o)if(void 0!==(null==e?void 0:e.entity))t.eid=e.entity.eid;else{const e=yield this.obj.Scene.Project.GetProject();t.eid=e.length>0?e[0].eid:""}else if("Tiles"===o)if(void 0!==(null==e?void 0:e.entity))t.eid=e.entity.eid;else{const e=yield this.obj.Scene.Tiles.GetTiles();t.eid=e.length>0?e[0].eid:""}else if("EarthTiles"===o)if(void 0!==(null==e?void 0:e.entity))t.eid=e.entity.eid;else{const e=yield this.obj.Scene.EarthTiles.GetTiles();t.eid=e.length>0?e[0].eid:""}else void 0!==(null==e?void 0:e.entity)&&(t.eid=e.entity.eid);void 0!==e.rotation&&(t.rotation=e.rotation),void 0!==e.distanceFactor&&(t.distanceFactor=e.distanceFactor),void 0!==e.flyTime&&(t.flyTime=e.flyTime);const i=yield this.StartApi(this.controllerName,"FocusToNodes",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ResetCameraLimit(e="Default"){return t(this,void 0,void 0,function*(){this.CameraValidate.validateResetCameraLimit(e);const t=yield this.StartApi(this.controllerName,"ResetCameraLimit",{state:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCameraLockLimit(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateSetCameraLockLimit(e);const t=yield this.StartApi(this.controllerName,"SetCameraLockLimit",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCameraLimit(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateSetCameraLimit(e);const t=yield this.StartApi(this.controllerName,"SetCameraLimit",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetCameraLimit(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.controllerName,"GetCameraLimit",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ResetCameraPose(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateResetCameraPose(e);const t=yield this.StartApi(this.controllerName,"ResetCameraPose",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetCameraPose(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.controllerName,"GetCameraPose",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCameraPose(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateSetCameraPose(e);const t=yield this.StartApi(this.controllerName,"SetCameraPose",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCameraMode(e="RTS"){return t(this,void 0,void 0,function*(){this.CameraValidate.validateSetCameraMode(e);const t=yield this.StartApi(this.controllerName,"SetCameraMode",{controlMode:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetCameraInfo(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.controllerName,"GetCameraInfo",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UpdateCamera(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateUpdateCamera(e);const t=yield this.StartApi(this.controllerName,"UpdateCamera",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FlyTo(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateFlyTo(e);const t=yield this.StartApi(this.controllerName,"FocusToPosition",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Move(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateMove(e);const t=e,o=yield this.StartApi(this.controllerName,"CameraMove",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Focus(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateFocus(e);const t={};void 0!==e.rotation&&(t.rotation=e.rotation),t.distanceFactor=void 0!==e.distanceFactor?e.distanceFactor:1,t.flyTime=void 0!==e.flyTime?e.flyTime:1,t.eids=e.entity?e.entity.map(e=>e.eid):[];const o=yield this.StartApi(this.controllerName,"FocusToEntities",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FocusToAll(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateFocusToAll(e);const t={};void 0!==e&&(void 0!==(null==e?void 0:e.types)&&(t.entityTypes=e.types.map(e=>Ho.get(e))),void 0!==(null==e?void 0:e.bFilterForExclude)&&(t.bFilterForExclude=e.bFilterForExclude));const o=yield this.StartApi(this.controllerName,"FocusToAllEntities",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Follow(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateFollow(e);const t={};t.followRotation=void 0!==e.followRotation?e.followRotation:{pitch:-30,yaw:0},t.useRelativeRotation=void 0!==e.useRelativeRotation&&e.useRelativeRotation,t.distance=void 0!==e.distance?e.distance:1e3,t.bFPS=void 0!==e.bFPS&&e.bFPS,t.eid=e.entity?e.entity.GetData().eid:"";const o=yield this.StartApi(this.controllerName,"FollowEntity",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Stop(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.controllerName,"CameraStop",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Rotate(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateRotate(e);const t=e;return yield this.StartApi(this.controllerName,"CameraRotate",t)})}Around(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateAround(e);const t={};t.direction=void 0!==e.direction?e.direction:"clockwise",t.velocity=void 0!==e.velocity?e.velocity:10;const o=yield this.StartApi(this.controllerName,"CameraAround",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PlayCameraRoam(e,o){return t(this,void 0,void 0,function*(){this.CameraValidate.validatePlayCameraRoam(e,o);const t=o?Object.assign({cameraRoamEid:e.eid},o):{cameraRoamEid:e.eid},i=yield this.StartApi(this.controllerName,"PlayCameraRoam",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PlayRoam(e,o){return t(this,void 0,void 0,function*(){if(e){this.CameraValidate.validatePlayRoam(e,o);const t=o?Object.assign({cameraRoamEid:e.eid,state:"Play"},o):{cameraRoamEid:e.eid,state:"Play"},i=yield this.StartApi(this.controllerName,"PlayCameraRoam",t);i.success&&(this.currentRoam=e);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)}{if(!this.currentRoam)return{success:!1,message:"No roaming is running!"};const e=yield this.StartApi(this.controllerName,"PlayCameraRoam",{cameraRoamEid:this.currentRoam.eid,state:"Play"});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)}})}PauseRoam(e){return t(this,void 0,void 0,function*(){if(this.CameraValidate.validatePauseRoam(e),!this.currentRoam)return{success:!1,message:"No roaming is running!"};const t=e?Object.assign({cameraRoamEid:this.currentRoam.eid,state:"Pause"},e):{cameraRoamEid:this.currentRoam.eid,state:"Pause"},o=yield this.StartApi(this.controllerName,"PlayCameraRoam",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}StopRoam(){return t(this,void 0,void 0,function*(){if(!this.currentRoam)return{success:!1,message:"No roaming is running!"};const e=yield this.StartApi(this.controllerName,"PlayCameraRoam",{cameraRoamEid:this.currentRoam.eid,state:"Stop"});e.success&&(this.currentRoam=null);return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetCameraRoamingInfo(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateGetCameraRoamingInfo(e);const t=yield this.StartApi(this.controllerName,"GetCameraRoamingInfo",{cameraRoamEid:e.eid});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Apply(e,o=1){return t(this,void 0,void 0,function*(){this.CameraValidate.validateApply(e,o);const{eid:t}=e.GetData(),i={eid:t,flyTime:o},n=yield this.StartApi(this.controllerName,"ApplyCameraPreset",i);return yield ei(n,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FocusByCustomId(e,o){return t(this,void 0,void 0,function*(){this.CameraValidate.validateFocusByCustomId(e,o);const t={};void 0!==o.rotation&&(t.rotation=o.rotation),t.distanceFactor=void 0!==o.distanceFactor?o.distanceFactor:1,t.flyTime=void 0!==o.flyTime?o.flyTime:1,t.eids=ai(e,this.obj.ObjectEidMap).map(e=>e.eid);const i=yield this.StartApi(this.controllerName,"FocusToEntities",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FocusByEntityName(e,o){return t(this,void 0,void 0,function*(){this.CameraValidate.validateFocusByEntityName(e,o);const t={};void 0!==o.rotation&&(t.rotation=o.rotation),t.distanceFactor=void 0!==o.distanceFactor?o.distanceFactor:1,t.flyTime=void 0!==o.flyTime?o.flyTime:1,t.eids=si(e,this.obj.ObjectEidMap).map(e=>e.eid);const i=yield this.StartApi(this.controllerName,"FocusToEntities",t);return yield ei(i,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CameraStepMove(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateCameraStepMove(e);const t=yield this.StartApi(this.controllerName,"CameraStepMove",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CameraStepRotate(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateCameraStepRotate(e);const t=yield this.StartApi(this.controllerName,"CameraStepRotate",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CameraStepZoom(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateCameraStepZoom(e);const t=yield this.StartApi(this.controllerName,"CameraStepZoom",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}StopCameraStepUpdate(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.controllerName,"StopCameraStepUpdate",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetCameraSpeed(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.controllerName,"GetCameraSpeed",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCameraSpeed(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateSetCameraSpeed(e);const t=yield this.StartApi(this.controllerName,"SetCameraSpeed",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetCameraAnimation(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.controllerName,"GetCameraAnimation",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCameraAnimation(e){return t(this,void 0,void 0,function*(){this.CameraValidate.validateSetCameraAnimation(e);const t=yield this.StartApi(this.controllerName,"SetCameraAnimation",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ToggleCameraSelfRotate(e=!0){return t(this,void 0,void 0,function*(){this.CameraValidate.validateToggleCameraSelfRotate(e);const t=yield this.StartApi(this.controllerName,"ToggleCameraSelfRotate",{bSelfRotate:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Ma extends $i{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=Ho.get(this.oType),Ti(this.CameraPresetEntityAtom,this,["bDefaultCamera"],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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){const t={},o={},i={},n={},r={},a={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleVisibleAtom(i,e),Object.keys(i).length>0&&(t.VisibleAtom=i),this.handleLockedAtom(n,e),Object.keys(n).length>0&&(t.EntityFlagAtom=n),this.handleEntityOutlinerAtom(r,e),Object.keys(r).length>0&&(t.EntityOutlinerAtom=r),e.bDefaultCamera&&(a.bDefaultCamera=e.bDefaultCamera),e.location&&(a.location=e.location),e.rotation&&(a.rotation=e.rotation),e.pitchLimit&&(a.pitchLimit=e.pitchLimit),e.yawLimit&&(a.yawLimit=e.yawLimit),e.viewDistanceLimit&&(a.viewDistanceLimit=e.viewDistanceLimit),e.fieldOfView&&(a.fieldOfView=e.fieldOfView),e.controlMode&&(a.controlMode=e.controlMode),Object.keys(a).length>0&&(t.CameraPresetEntityAtom=a),t}GetValidateRules(){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})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F,U,B,q,z;const W=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw W&&W.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const H=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===H[e])throw W&&W.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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){if("object"!=typeof e.location||void 0===e.location.length)throw W&&W.func(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().locationErr),new Error(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw W&&W.func(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().locationErr2),new Error(null===(s=li.getInstance())||void 0===s?void 0:s.getErrorTxt().locationErr2)}if(void 0!==e.bDefaultCamera&&"boolean"!=typeof e.bDefaultCamera)throw W&&W.func(`bDefaultCamera ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`),new Error(`bDefaultCamera ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`);if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw W&&W.func(`rotation ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().object}`),new Error(`rotation ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().object}`);const t={pitch:0,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw W&&W.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(v=e.rotation)||void 0===v?void 0:v.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw W&&W.func(`rotation.pitch ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}. rotation.pitch ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().number}. rotation.pitch ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(y=e.rotation)||void 0===y?void 0:y.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw W&&W.func(`rotation.yaw ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}. rotation.pitch ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().number}. rotation.pitch ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} -180 ~ 180`)}if(void 0!==e.pitchLimit){if("object"!=typeof e.pitchLimit||void 0===e.pitchLimit.length)throw W&&W.func(`pitchLimit ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().array}`),new Error(`pitchLimit ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().array}`);if(2!==e.pitchLimit.filter(e=>"number"==typeof e&&e>=-90&&e<=0).length)throw W&&W.func(`pitchLimit ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().arrayNumberLength} 2. ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().arrayNumberLength} 2. ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().range} -90 ~ 0`);if(e.pitchLimit[0]>e.pitchLimit[1])throw W&&W.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 W&&W.func(`yawLimit ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().array}`),new Error(`yawLimit ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().array}`);if(2!==e.yawLimit.filter(e=>"number"==typeof e&&e>=-180&&e<=180).length)throw W&&W.func(`yawLimit ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().arrayNumberLength} 2. ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().arrayNumberLength} 2. ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().range} -180 ~ 180`);if(e.yawLimit[0]>e.yawLimit[1])throw W&&W.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 W&&W.func(`viewDistanceLimit ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().array}`),new Error(`viewDistanceLimit ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().array}`);if(2!==e.viewDistanceLimit.filter(e=>"number"==typeof e&&e>=0).length)throw W&&W.func(`viewDistanceLimit ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().arrayPositiveNumberLength} 2`);if(e.viewDistanceLimit[0]>e.viewDistanceLimit[1])throw W&&W.func("viewDistanceLimit[0] must be <= viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be <= viewDistanceLimit[1]")}if(void 0!==e.fieldOfView&&("number"!=typeof e.fieldOfView||e.fieldOfView<0||e.fieldOfView>120))throw W&&W.func(`fieldOfView ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().number}. ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().range} 0 ~ 120`),new Error(`fieldOfView ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().number}. ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().range} 0 ~ 120`);if(void 0!==e.controlMode){if("string"!=typeof e.controlMode)throw W&&W.func(`controlMode ${null===(U=li.getInstance())||void 0===U?void 0:U.GetCommonErr().string}`),new Error(`controlMode ${null===(B=li.getInstance())||void 0===B?void 0:B.GetCommonErr().string}`);if(!li.controlModeType.find(t=>t===e.controlMode))throw W&&W.func(`controlMode ${null===(q=li.getInstance())||void 0===q?void 0:q.GetCommonErr().range} ${li.controlModeType.toString()}`),new Error(`controlMode ${null===(z=li.getInstance())||void 0===z?void 0:z.GetCommonErr().range} ${li.controlModeType.toString()}`)}}}class Aa extends fi{constructor(e){super(e,Ma),this.setType("Camera")}}class Da extends $i{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:[],bAutoRotation:!1,bResetAfterFinished:!0}}),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=Ho.get(this.oType),Ti(this.CameraRoamAtom,this,["bAutoRotation","bResetAfterFinished"],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(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,bAutoRotation:this.CameraRoamAtom.bAutoRotation,bResetAfterFinished:this.CameraRoamAtom.bResetAfterFinished})}SetData(e){this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setIndexData(e),e.frames&&(this.CameraRoamAtom.frames=e.frames),void 0!==e.bAutoRotation&&(this.CameraRoamAtom.bAutoRotation=e.bAutoRotation),void 0!==e.bResetAfterFinished&&(this.CameraRoamAtom.bResetAfterFinished=e.bResetAfterFinished)}generateAtomData(e){const t={},o={},i={},n={},r={},a={};return this.handleBasicAtom(o,e),Object.keys(o).length>0&&(t.BasicInfoAtom=o),this.handleVisibleAtom(i,e),Object.keys(i).length>0&&(t.VisibleAtom=i),this.handleLockedAtom(n,e),Object.keys(n).length>0&&(t.EntityFlagAtom=n),this.handleEntityOutlinerAtom(r,e),Object.keys(r).length>0&&(t.EntityOutlinerAtom=r),e.frames&&(a.frames=e.frames),void 0!==e.bAutoRotation&&(a.bAutoRotation=e.bAutoRotation),void 0!==e.bResetAfterFinished&&(a.bResetAfterFinished=e.bResetAfterFinished),Object.keys(a).length>0&&(t.CameraRoamAtom=a),t}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{frames:this.CameraRoamAtom.frames})}Validate(e){var t,o,i,n,r,a,s,l,d;const c=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw c&&c.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const u=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===u[e])throw c&&c.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.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!==(null==e?void 0:e.bAutoRotation)&&"boolean"!=typeof e.bAutoRotation)throw c&&c.func(`bAutoRotation ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`),new Error(`bAutoRotation ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().boolean}`);if(void 0!==(null==e?void 0:e.bResetAfterFinished)&&"boolean"!=typeof e.bResetAfterFinished)throw c&&c.func(`bResetAfterFinished ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().boolean}`),new Error(`bResetAfterFinished ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`);if(void 0!==e.frames){if("object"!=typeof e.frames||void 0===e.frames.length)throw c&&c.func(`frames ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().array}`),new Error(`frames ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().array}`);e.frames.forEach(e=>{var t,o,i,n,r,a,s,l,d,u,v,h,m,g,f,y,b,p,E,w;if("object"!=typeof e)throw c&&c.func(`frames value ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().object}`),new Error(`frames value ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().object}`);const I=this.CameraRoamFrames;if(Object.keys(e).forEach(e=>{var t,o;if(void 0===I[e])throw c&&c.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`frames.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.location){if("object"!=typeof e.location||void 0===e.location.length)throw c&&c.func(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().locationErr),new Error(null===(n=li.getInstance())||void 0===n?void 0:n.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw c&&c.func(null===(r=li.getInstance())||void 0===r?void 0:r.getErrorTxt().locationErr2),new Error(null===(a=li.getInstance())||void 0===a?void 0:a.getErrorTxt().locationErr2)}if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw c&&c.func(`rotation ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().object}`),new Error(`rotation ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().object}`);const t={pitch:0,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw c&&c.func(`rotation.${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(d=e.rotation)||void 0===d?void 0:d.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw c&&c.func(`rotation.pitch ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().number}. ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().number}. ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(g=e.rotation)||void 0===g?void 0:g.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw c&&c.func(`rotation.yaw ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().number}. ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().number}. ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().range} -180 ~ 180`)}if(void 0!==e.time&&("number"!=typeof e.time||e.time<0))throw c&&c.func(`time ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().positiveNumber}`),new Error(`time ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().positiveNumber}`)})}}}class Ra extends fi{constructor(e){super(e,Da),this.setType("CameraRoam")}}class xa extends Oi{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CameraStart"}),Object.defineProperty(this,"CameraStartAtom",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0],rotation:{pitch:-30,yaw:0},locationLimit:[[121.1,30.1],[121.2,30.3]],pitchLimit:[-90,0],yawLimit:[0,360],viewDistanceLimit:[100,1e6],fieldOfView:0,controlMode:"RTS"}}),this.setObjAtom(this),this.oType="CameraStart",this.type=Ho.get(this.oType),Ti(this.CameraStartAtom,this,[],[],[]),e&&((null===(t=li.getInstance())||void 0===t?void 0:t.GetValiDateState())&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}GetScheme(){return{CameraStartAtom:this.CameraStartAtom}}GetData(){return Object.assign(Object.assign({},this.getEid()),{location:this.CameraStartAtom.location,rotation:this.CameraStartAtom.rotation,locationLimit:this.CameraStartAtom.locationLimit,pitchLimit:this.CameraStartAtom.pitchLimit,yawLimit:this.CameraStartAtom.yawLimit,viewDistanceLimit:this.CameraStartAtom.viewDistanceLimit,fieldOfView:this.CameraStartAtom.fieldOfView,controlMode:this.CameraStartAtom.controlMode})}SetData(e){this.setEid(e),e.location&&(this.CameraStartAtom.location=e.location),e.rotation&&(this.CameraStartAtom.rotation=e.rotation),e.locationLimit&&(this.CameraStartAtom.locationLimit=e.locationLimit),e.pitchLimit&&(this.CameraStartAtom.pitchLimit=e.pitchLimit),e.yawLimit&&(this.CameraStartAtom.yawLimit=e.yawLimit),e.viewDistanceLimit&&(this.CameraStartAtom.viewDistanceLimit=e.viewDistanceLimit),e.fieldOfView&&(this.CameraStartAtom.fieldOfView=e.fieldOfView),e.controlMode&&(this.CameraStartAtom.controlMode=e.controlMode)}generateAtomData(e){const t={},o={};return e.location&&(o.location=e.location),e.rotation&&(o.rotation=e.rotation),e.locationLimit&&(o.locationLimit=e.locationLimit),e.pitchLimit&&(o.pitchLimit=e.pitchLimit),e.yawLimit&&(o.yawLimit=e.yawLimit),e.viewDistanceLimit&&(o.viewDistanceLimit=e.viewDistanceLimit),e.fieldOfView&&(o.fieldOfView=e.fieldOfView),e.controlMode&&(o.controlMode=e.controlMode),Object.keys(o).length>0&&(t.CameraStartAtom=o),t}GetValidateRules(){return Object.assign(Object.assign({},this.getEid()),{location:this.CameraStartAtom.location,rotation:this.CameraStartAtom.rotation,locationLimit:this.CameraStartAtom.locationLimit,pitchLimit:this.CameraStartAtom.pitchLimit,yawLimit:this.CameraStartAtom.yawLimit,viewDistanceLimit:this.CameraStartAtom.viewDistanceLimit,fieldOfView:this.CameraStartAtom.fieldOfView,controlMode:this.CameraStartAtom.controlMode})}Validate(e){var t,o,i,n,r,a,s,l,d,c,u,v,h,m,g,f,y,b,p,E,w,I,j,S,C,G,O,$,T,M,A,D,R,x,N,L,V,P,k,_,F;const U=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw U&&U.func(null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().notObj),new Error(null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().notObj);const B=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t,o;if(void 0===B[e])throw U&&U.func(`${e} ${null===(t=li.getInstance())||void 0===t?void 0:t.getErrorTxt().keyErr}`),new Error(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`)}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.rotation){if("object"!=typeof e.rotation)throw U&&U.func(`rotation ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`),new Error(`rotation ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().object}`);const t={pitch:0,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var o,i;if(void 0===t[e])throw U&&U.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`rotation.${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==(null===(a=e.rotation)||void 0===a?void 0:a.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||e.rotation.pitch>0))throw U&&U.func(`rotation.pitch ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().number}. rotation.pitch ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().range} -90 ~ 0`),new Error(`rotation.pitch ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().number}. rotation.pitch ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().range} -90 ~ 0`);if(void 0!==(null===(u=e.rotation)||void 0===u?void 0:u.yaw)&&("number"!=typeof e.rotation.yaw||e.rotation.yaw<-180||e.rotation.yaw>180))throw U&&U.func(`rotation.yaw ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().number}. rotation.pitch ${null===(h=li.getInstance())||void 0===h?void 0:h.GetCommonErr().range} -180 ~ 180`),new Error(`rotation.yaw ${null===(m=li.getInstance())||void 0===m?void 0:m.GetCommonErr().number}. rotation.pitch ${null===(g=li.getInstance())||void 0===g?void 0:g.GetCommonErr().range} -180 ~ 180`)}if(void 0!==(null==e?void 0:e.locationLimit)){if("object"!=typeof e.locationLimit||void 0===e.locationLimit.length)throw U&&U.func(`locationLimit ${null===(f=li.getInstance())||void 0===f?void 0:f.GetCommonErr().array}`),new Error(`locationLimit ${null===(y=li.getInstance())||void 0===y?void 0:y.GetCommonErr().array}`);e.locationLimit.forEach(e=>{var t,o,i,n;if("object"!=typeof e||void 0===e.length)throw U&&U.func(`The value of locationLimit ${null===(t=li.getInstance())||void 0===t?void 0:t.GetCommonErr().array}`),new Error(`The value of locationLimit ${null===(o=li.getInstance())||void 0===o?void 0:o.GetCommonErr().array}`);if(2!==e.filter(e=>"number"==typeof e).length)throw U&&U.func(`The value of locationLimit ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of locationLimit ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().arrayNumberLength} 2`)})}if(void 0!==e.pitchLimit){if("object"!=typeof e.pitchLimit||void 0===e.pitchLimit.length)throw U&&U.func(`pitchLimit ${null===(b=li.getInstance())||void 0===b?void 0:b.GetCommonErr().array}`),new Error(`pitchLimit ${null===(p=li.getInstance())||void 0===p?void 0:p.GetCommonErr().array}`);if(2!==e.pitchLimit.filter(e=>"number"==typeof e&&e>=-90&&e<=0).length)throw U&&U.func(`pitchLimit ${null===(E=li.getInstance())||void 0===E?void 0:E.GetCommonErr().arrayNumberLength} 2. ${null===(w=li.getInstance())||void 0===w?void 0:w.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null===(I=li.getInstance())||void 0===I?void 0:I.GetCommonErr().arrayNumberLength} 2. ${null===(j=li.getInstance())||void 0===j?void 0:j.GetCommonErr().range} -90 ~ 0`);if(e.pitchLimit[0]>e.pitchLimit[1])throw U&&U.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 U&&U.func(`yawLimit ${null===(S=li.getInstance())||void 0===S?void 0:S.GetCommonErr().array}`),new Error(`yawLimit ${null===(C=li.getInstance())||void 0===C?void 0:C.GetCommonErr().array}`);if(2!==e.yawLimit.filter(e=>"number"==typeof e&&e>=-180&&e<=180).length)throw U&&U.func(`yawLimit ${null===(G=li.getInstance())||void 0===G?void 0:G.GetCommonErr().arrayNumberLength} 2. ${null===(O=li.getInstance())||void 0===O?void 0:O.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit ${null===($=li.getInstance())||void 0===$?void 0:$.GetCommonErr().arrayNumberLength} 2. ${null===(T=li.getInstance())||void 0===T?void 0:T.GetCommonErr().range} -180 ~ 180`);if(e.yawLimit[0]>e.yawLimit[1])throw U&&U.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 U&&U.func(`viewDistanceLimit ${null===(M=li.getInstance())||void 0===M?void 0:M.GetCommonErr().array}`),new Error(`viewDistanceLimit ${null===(A=li.getInstance())||void 0===A?void 0:A.GetCommonErr().array}`);if(2!==e.viewDistanceLimit.filter(e=>"number"==typeof e&&e>=0).length)throw U&&U.func(`viewDistanceLimit ${null===(D=li.getInstance())||void 0===D?void 0:D.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit ${null===(R=li.getInstance())||void 0===R?void 0:R.GetCommonErr().arrayPositiveNumberLength} 2`);if(e.viewDistanceLimit[0]>e.viewDistanceLimit[1])throw U&&U.func("viewDistanceLimit[0] must be <= viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be <= viewDistanceLimit[1]")}if(void 0!==e.fieldOfView&&("number"!=typeof e.fieldOfView||e.fieldOfView<0||e.fieldOfView>120))throw U&&U.func(`fieldOfView ${null===(x=li.getInstance())||void 0===x?void 0:x.GetCommonErr().number}. ${null===(N=li.getInstance())||void 0===N?void 0:N.GetCommonErr().range} 0 ~ 120`),new Error(`fieldOfView ${null===(L=li.getInstance())||void 0===L?void 0:L.GetCommonErr().number}. ${null===(V=li.getInstance())||void 0===V?void 0:V.GetCommonErr().range} 0 ~ 120`);if(void 0!==e.controlMode){if("string"!=typeof e.controlMode)throw U&&U.func(`controlMode ${null===(P=li.getInstance())||void 0===P?void 0:P.GetCommonErr().string}`),new Error(`controlMode ${null===(k=li.getInstance())||void 0===k?void 0:k.GetCommonErr().string}`);if(!li.controlModeType.find(t=>t===e.controlMode))throw U&&U.func(`controlMode ${null===(_=li.getInstance())||void 0===_?void 0:_.GetCommonErr().range} ${li.controlModeType.toString()}`),new Error(`controlMode ${null===(F=li.getInstance())||void 0===F?void 0:F.GetCommonErr().range} ${li.controlModeType.toString()}`)}}}class Na extends fi{constructor(e){super(e,xa),this.setType("CameraStart")}}class La{validateSetEnable(e){var t,o,i,n;const r=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if((null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState())&&"boolean"!=typeof e)throw r&&r.func(`bEnableTransaction ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().boolean}`),new Error(`bEnableTransaction ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().boolean}`)}validateStart(e){var t,o,i,n,r,a,s,l,d,c,u,v;const h=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("OnValidateError");if(null===(o=li.getInstance())||void 0===o?void 0:o.GetValiDateState()){if("object"!=typeof e)throw h&&h.func(`opt ${null===(i=li.getInstance())||void 0===i?void 0:i.GetCommonErr().object}`),new Error(`opt ${null===(n=li.getInstance())||void 0===n?void 0:n.GetCommonErr().object}`);const t={transactionName:"",bTransactionGroup:!0,bCanUndo:!0,bCanCommit:!0};if(Object.keys(e).forEach(e=>{var o,i;if(void 0===t[e])throw h&&h.func(`${e} ${null===(o=li.getInstance())||void 0===o?void 0:o.getErrorTxt().keyErr}`),new Error(`${e} ${null===(i=li.getInstance())||void 0===i?void 0:i.getErrorTxt().keyErr}`)}),void 0!==e.transactionName&&"string"!=typeof e.transactionName)throw h&&h.func(`transactionName ${null===(r=li.getInstance())||void 0===r?void 0:r.GetCommonErr().string}`),new Error(`transactionName ${null===(a=li.getInstance())||void 0===a?void 0:a.GetCommonErr().string}`);if(void 0!==e.bTransactionGroup&&"boolean"!=typeof e.bTransactionGroup)throw h&&h.func(`bTransactionGroup ${null===(s=li.getInstance())||void 0===s?void 0:s.GetCommonErr().boolean}`),new Error(`bTransactionGroup ${null===(l=li.getInstance())||void 0===l?void 0:l.GetCommonErr().boolean}`);if(void 0!==e.bCanUndo&&"boolean"!=typeof e.bCanUndo)throw h&&h.func(`bCanUndo ${null===(d=li.getInstance())||void 0===d?void 0:d.GetCommonErr().boolean}`),new Error(`bCanUndo ${null===(c=li.getInstance())||void 0===c?void 0:c.GetCommonErr().boolean}`);if(void 0!==e.bCanCommit&&"boolean"!=typeof e.bCanCommit)throw h&&h.func(`bCanCommit ${null===(u=li.getInstance())||void 0===u?void 0:u.GetCommonErr().boolean}`),new Error(`bCanCommit ${null===(v=li.getInstance())||void 0===v?void 0:v.GetCommonErr().boolean}`)}}}class Va extends ci{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 La})}SetEnable(e=!1){return t(this,void 0,void 0,function*(){this.TransactionValidate.validateSetEnable(e);const t={bEnableTransaction:e},o=yield this.StartApi(this.apiClassName,"SetTransactionEnable",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Start(e){return t(this,void 0,void 0,function*(){this.TransactionValidate.validateStart(e);const t=Object.assign({},e),o=yield this.StartApi(this.apiClassName,"CreateTransaction",t);return yield ei(o,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Commit(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"CommitTransaction",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Rollback(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"RollbackTransaction",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Undo(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"Undo",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Redo(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"Redo",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CanUndo(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"CanUndo",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CanRedo(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"CanRedo",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"ClearTransactions",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Get(){return t(this,void 0,void 0,function*(){const e=yield this.StartApi(this.apiClassName,"GetTransactionList",{});return yield ei(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Pa extends ci{constructor(e){super(e),Object.defineProperty(this,"pluginInstance",{enumerable:!0,configurable:!0,writable:!0,value:[]})}Install(e){return t(this,void 0,void 0,function*(){const t=new e(this.obj);if(!t.install)return{success:!1,message:"Install error. Plugin must include install function!"};const o=yield t.install();if(!o.list||0===o.list.length)return{success:!1,message:"Install error. Install list is empty!"};o.list.forEach((e,t)=>{var i,n;if(this.obj.highLevelLog(`Plugin install start: ${t+1} / ${o.list.length}`),e.factory&&e.name){const r=new((null===(i=e.factory)||void 0===i?void 0:i.extendsCore)?e.factory.extendsCore(fi,Qn):e.factory)(this.obj);if(e.category?"DataModel"===e.category?this.obj.DataModel[e.name]=r:"Geometry"===e.category?this.obj.DataModel.Geometry[e.name]=r:"Scene"===e.category?this.obj.Scene[e.name]=r:"Covering"===e.category?this.obj.Scene.Covering[e.name]=r:"Model"===e.category?this.obj.Scene.Model[e.name]=r:this.obj[e.category]?this.obj[e.category][e.name]=r:this.obj[e.category]=r:this.obj[e.name]=r,e.type&&e.category){this.obj.RegisterObj.EntityType.set(e.name,e.type);const t=this.obj.RegisterObj.Get(e.name);t?(t.object=r,t.category=e.category):this.obj.RegisterObj.Register([{name:e.name,object:r,category:e.category}])}if(e.object){const t=(null===(n=e.object)||void 0===n?void 0:n.extendsCore)?e.object.extendsCore(Qn):e.object;this.obj[e.name]=t}this.obj.cloudApiLog(`Plugin install process: ${t+1} / ${o.list.length}`)}});const i=qo.v1();return this.pluginInstance.push(o.info?{id:i,list:o.list,info:o.info}:{id:i,list:o.list}),{success:!0,message:"Install success!",result:{id:i}}})}Uninstall(e){return t(this,void 0,void 0,function*(){if(0===this.pluginInstance.length)return{success:!1,message:"No Plugin is installed!"};const t=this.pluginInstance.findIndex(t=>t.id===e);return t<0?{success:!1,message:"Id is illegal"}:0===this.pluginInstance[t].list.length?{success:!1,message:"List is empty!"}:(this.pluginInstance[t].list.forEach((e,o)=>{if(this.obj.highLevelLog(`Plugin uninstall start: ${o+1} / ${this.pluginInstance[t].list.length}`),e.name){if(e.category?"DataModel"===e.category?this.obj.DataModel[e.name]=null:"Geometry"===e.category?this.obj.DataModel.Geometry[e.name]=null:"Scene"===e.category?this.obj.Scene[e.name]=null:"Covering"===e.category?this.obj.Scene.Covering[e.name]=null:"Model"===e.category?this.obj.Scene.Model[e.name]=null:this.obj[e.category]&&(this.obj[e.category]=null):this.obj[e.name]=null,e.type&&e.category){this.obj.RegisterObj.EntityType.delete(e.name);const t=this.obj.RegisterObj.GetIndex(e.name);t>=0&&this.obj.RegisterObj.Delete(t)}e.object&&(this.obj[e.name]=null),this.obj.cloudApiLog(`Plugin uninstall process: ${o+1} / ${this.pluginInstance[t].list.length}`)}}),this.pluginInstance.splice(t,1),{success:!0,message:"Uninstall success!"})})}Get(){return t(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pluginInstance.map(e=>e.info)}})}}class ka extends ci{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"EarthEditorAPI"}),Object.defineProperty(this,"wimApiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WimModelerWaterAPIRegister"})}Enter(e="cn"){return t(this,void 0,void 0,function*(){const t=yield this.StartApi(this.apiClassName,"EnterEarthEditor",{language:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Wim(e,o="cn"){return t(this,void 0,void 0,function*(){const t=yield this.StartApi(this.wimApiClassName,"ChangeModelerWaterMode",{isOpen:e});return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SendFileListToWim(e){return t(this,void 0,void 0,function*(){const t=yield this.StartApi(this.wimApiClassName,"SendModelerWaterFileList",e);return yield ei(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class _a extends ci{constructor(e){super(e),Object.defineProperty(this,"base",{enumerable:!0,configurable:!0,writable:!0,value:"/v1"}),Object.defineProperty(this,"apiQueue",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"isExecuting",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"eventSource",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"onOpen",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"onMessage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"onError",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"onClose",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"runApi",{enumerable:!0,configurable:!0,writable:!0,value:e=>t(this,void 0,void 0,function*(){const t=new Function(`return async function() {${e.replaceAll("App","this.obj")}} `)();yield t.call(this),this.obj.highLevelLog("Code has been excuted:",e)})}),Object.defineProperty(this,"onOpenAction",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.obj.highLevelLog("SSE connencted!"),this.onOpen&&this.onOpen()}}),Object.defineProperty(this,"onCloseAction",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.obj.highLevelLog("SSE closed!"),this.onClose&&this.onClose()}}),Object.defineProperty(this,"onMessageAction",{enumerable:!0,configurable:!0,writable:!0,value:e=>t(this,void 0,void 0,function*(){this.obj.highLevelLog("SSE stream event data:",e);try{const t=JSON.parse(e.data);if(this.obj.highLevelLog("SSE stream data:",t),this.onMessage&&this.onMessage(t),"script"===t.event)if("queue"===(null==t?void 0:t.execution_mode)){if(this.apiQueue.push(t.answer),!this.isExecuting){for(this.isExecuting=!0;this.apiQueue.length>0;){const e=this.apiQueue.shift()||"";yield this.runApi(e)}this.isExecuting=!1}}else"clearQueue"===(null==t?void 0:t.execution_mode)?(this.apiQueue=[],this.isExecuting=!1,(null==t?void 0:t.answer)&&(yield this.runApi(t.answer))):yield this.runApi(t.answer)}catch(e){console.error(e)}})}),Object.defineProperty(this,"onErrorAction",{enumerable:!0,configurable:!0,writable:!0,value:e=>{e.target instanceof EventSource&&(e.target.readyState===EventSource.CLOSED?this.obj.highLevelLog("SSE disconnected!"):this.obj.highLevelLog("error:",e)),this.onError&&this.onError(e)}})}SetBase(e){this.base=e}SetAgentHost(e){this.obj.setAgentHost(e)}Start(e,o="/event"){return t(this,void 0,void 0,function*(){(null==e?void 0:e.onOpen)&&(this.onOpen=e.onOpen),(null==e?void 0:e.onMessage)&&(this.onMessage=e.onMessage),(null==e?void 0:e.onError)&&(this.onError=e.onError);let t=!0;try{this.eventSource=new EventSource(this.obj.agentHost+this.base+o),this.eventSource.addEventListener("open",this.onOpenAction,!1),this.eventSource.addEventListener("message",this.onMessageAction,!1),this.eventSource.addEventListener("error",this.onErrorAction,!1),this.eventSource.addEventListener("close",this.onCloseAction,!1)}catch(e){t=!1,console.error(e)}return{success:t,message:""}})}Stop(){var e,o,i,n,r;return t(this,void 0,void 0,function*(){return null===(e=this.eventSource)||void 0===e||e.close(),null===(o=this.eventSource)||void 0===o||o.removeEventListener("open",this.onOpenAction),null===(i=this.eventSource)||void 0===i||i.removeEventListener("message",this.onMessageAction),null===(n=this.eventSource)||void 0===n||n.removeEventListener("error",this.onErrorAction),null===(r=this.eventSource)||void 0===r||r.removeEventListener("close",this.onCloseAction),this.onOpen=null,this.onClose=null,this.onMessage=null,this.onError=null,this.eventSource=null,{success:!0,message:""}})}Talk(e,o="/chat-messages"){return t(this,void 0,void 0,function*(){const t={query:e.query,inputs:(null==e?void 0:e.inputs)||{}};(null==e?void 0:e.conversation_id)&&(t.conversation_id=e.conversation_id);const i=yield this.obj.reqMan.requestActionForAgent(this.base+o,t,"post",this.obj.headers);return i.success?{success:!0,message:"",result:i.results}:{success:!1,message:""}})}StopChat(e,o,i="/chat-messages/:task_id/stop/:session_id"){return t(this,void 0,void 0,function*(){const t=yield this.obj.reqMan.requestActionForAgent(this.base+i.replace(":task_id",e).replace(":session_id",o),{},"post",this.obj.headers);return t.success?{success:!0,message:"",result:t.results}:{success:!1,message:""}})}}class Fa{constructor(e,t){Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"atomClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"objectMap",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.obj=e,this.atomClass=t}findFromMap(e){return e?this.objectMap.get(e):[...this.objectMap.values()]}addToMap(e,t){this.findFromMap(e)||this.objectMap.set(e,t)}removeFromMap(e){this.objectMap.delete(e)}clearMap(){this.objectMap.clear()}Add(e){return(null==e?void 0:e.length)>0&&e.forEach(e=>{(null==e?void 0:e.dom)&&(this.obj.playerDom.appendChild(e.dom),this.addToMap(`${e.id}`,{object:e}),e.setFactory(this))}),e}Create(e){return this.Add([new this.atomClass(e)])}Creates(e){const t=[];return(null==e?void 0:e.length)>0&&e.forEach(e=>{t.push(new this.atomClass(e))}),this.Add(t)}Remove(e){(null==e?void 0:e.length)>0&&e.forEach(e=>{this.obj.playerDom.removeChild(e.dom),this.removeFromMap(`${e.id}`)})}Get(e){return e?this.findFromMap(e):this.findFromMap()}}class Ua{constructor(e){Object.defineProperty(this,"factory",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"compId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"compDom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"windowStyle",{enumerable:!0,configurable:!0,writable:!0,value:{width:"200px",height:"150px",position:"absolute",left:"",top:"",right:"",bottom:"",zIndex:"0",fontSize:"12px",color:"#000000",background:"#ffffff",overflowX:"hidden",overflowY:"auto",border:"none",borderRadius:"5px",transition:"none"}}),this.generateComponent(),this.generateWindowStyle(e)}get id(){return this.compId}GetId(){return this.compId}get dom(){return this.compDom}GetDom(){return this.compDom}get width(){return this.windowStyle.width}set width(e){this.windowStyle.width=e,this.generateWindowStyle({width:e})}GetWidth(){return this.windowStyle.width}SetWidth(e){this.windowStyle.width=e,this.generateWindowStyle({width:e})}get height(){return this.windowStyle.height}set height(e){this.windowStyle.height=e,this.generateWindowStyle({height:e})}GetHeight(){return this.windowStyle.height}SetHeight(e){this.windowStyle.height=e,this.generateWindowStyle({height:e})}get position(){return this.windowStyle.position}set position(e){this.windowStyle.position=e,this.generateWindowStyle({position:e})}GetPosition(){return this.windowStyle.position}SetPosition(e){this.windowStyle.position=e,this.generateWindowStyle({position:e})}get left(){return this.windowStyle.left}set left(e){this.windowStyle.left=e,this.generateWindowStyle({left:e})}GetLeft(){return this.windowStyle.left}SetLeft(e){this.windowStyle.left=e,this.generateWindowStyle({left:e})}get top(){return this.windowStyle.top}set top(e){this.windowStyle.top=e,this.generateWindowStyle({top:e})}GetTop(){return this.windowStyle.top}SetTop(e){this.windowStyle.top=e,this.generateWindowStyle({top:e})}get right(){return this.windowStyle.right}set right(e){this.windowStyle.right=e,this.generateWindowStyle({right:e})}GetRight(){return this.windowStyle.right}SetRight(e){this.windowStyle.right=e,this.generateWindowStyle({right:e})}get bottom(){return this.windowStyle.bottom}set bottom(e){this.windowStyle.bottom=e,this.generateWindowStyle({bottom:e})}GetBottom(){return this.windowStyle.bottom}SetBottom(e){this.windowStyle.bottom=e,this.generateWindowStyle({bottom:e})}get zIndex(){return this.windowStyle.zIndex}set zIndex(e){this.windowStyle.zIndex=e,this.generateWindowStyle({zIndex:e})}GetZIndex(){return this.windowStyle.zIndex}SetZIndex(e){this.windowStyle.zIndex=e,this.generateWindowStyle({zIndex:e})}get fontSize(){return this.windowStyle.fontSize}set fontSize(e){this.windowStyle.fontSize=e,this.generateWindowStyle({fontSize:e})}GetFontSize(){return this.windowStyle.fontSize}SetFontSize(e){this.windowStyle.fontSize=e,this.generateWindowStyle({fontSize:e})}get color(){return this.windowStyle.color}set color(e){this.windowStyle.color=e,this.generateWindowStyle({color:e})}GetColor(){return this.windowStyle.color}SetColor(e){this.windowStyle.color=e,this.generateWindowStyle({color:e})}get background(){return this.windowStyle.background}set background(e){this.windowStyle.background=e,this.generateWindowStyle({background:e})}GetBackground(){return this.windowStyle.background}SetBackground(e){this.windowStyle.background=e,this.generateWindowStyle({background:e})}get overflowX(){return this.windowStyle.overflowX}set overflowX(e){this.windowStyle.overflowX=e,this.generateWindowStyle({overflowX:e})}GetOverflowX(){return this.windowStyle.overflowX}SetOverflowX(e){this.windowStyle.overflowX=e,this.generateWindowStyle({overflowX:e})}get overflowY(){return this.windowStyle.overflowY}set overflowY(e){this.windowStyle.overflowY=e,this.generateWindowStyle({overflowY:e})}GetOverflowY(){return this.windowStyle.overflowY}SetOverflowY(e){this.windowStyle.overflowY=e,this.generateWindowStyle({overflowY:e})}get border(){return this.windowStyle.border}set border(e){this.windowStyle.border=e,this.generateWindowStyle({border:e})}GetBorder(){return this.windowStyle.border}SetBorder(e){this.windowStyle.border=e,this.generateWindowStyle({border:e})}get borderRadius(){return this.windowStyle.borderRadius}set borderRadius(e){this.windowStyle.borderRadius=e,this.generateWindowStyle({borderRadius:e})}GetBorderRadius(){return this.windowStyle.borderRadius}SetBorderRadius(e){this.windowStyle.borderRadius=e,this.generateWindowStyle({borderRadius:e})}get transition(){return this.windowStyle.transition}set transition(e){this.windowStyle.transition=e,this.generateWindowStyle({transition:e})}GetTransition(){return this.windowStyle.transition}SetTransition(e){this.windowStyle.transition=e,this.generateWindowStyle({transition:e})}generateComponent(){this.compId=this.generateUUID(),this.compDom=document.createElement("div"),this.compDom.id=this.compId}generateUUID(e="comp"){return`${e}_${qo.v1()}`}generateWindowStyle(e){void 0!==(null==e?void 0:e.width)&&(this.compDom.style.width=this.windowStyle.width=e.width),void 0!==(null==e?void 0:e.height)&&(this.compDom.style.height=this.windowStyle.height=e.height),void 0!==(null==e?void 0:e.position)&&(this.compDom.style.position=this.windowStyle.position=e.position),void 0!==(null==e?void 0:e.left)&&(this.compDom.style.left=this.windowStyle.left=e.left),void 0!==(null==e?void 0:e.top)&&(this.compDom.style.top=this.windowStyle.top=e.top),void 0!==(null==e?void 0:e.right)&&(this.compDom.style.right=this.windowStyle.right=e.right),void 0!==(null==e?void 0:e.bottom)&&(this.compDom.style.bottom=this.windowStyle.bottom=e.bottom),void 0!==(null==e?void 0:e.zIndex)&&(this.compDom.style.zIndex=this.windowStyle.zIndex=e.zIndex),void 0!==(null==e?void 0:e.fontSize)&&(this.compDom.style.fontSize=this.windowStyle.fontSize=e.fontSize),void 0!==(null==e?void 0:e.color)&&(this.compDom.style.color=this.windowStyle.color=e.color),void 0!==(null==e?void 0:e.background)&&(this.compDom.style.background=this.windowStyle.background=e.background),void 0!==(null==e?void 0:e.overflowX)&&(this.compDom.style.overflowX=this.windowStyle.overflowX=e.overflowX),void 0!==(null==e?void 0:e.overflowY)&&(this.compDom.style.overflowY=this.windowStyle.overflowY=e.overflowY),void 0!==(null==e?void 0:e.border)&&(this.compDom.style.border=this.windowStyle.border=e.border),void 0!==(null==e?void 0:e.borderRadius)&&(this.compDom.style.borderRadius=this.windowStyle.borderRadius=e.borderRadius),void 0!==(null==e?void 0:e.transition)&&(this.compDom.style.transition=this.windowStyle.transition=e.transition)}setFactory(e){this.factory=e}Delete(){this.factory&&this.factory.Remove([this])}AddEvents(e){e.length>0&&e.forEach(e=>{this.compDom.addEventListener(e.type,e.func,void 0!==(null==e?void 0:e.useCapture)&&e.useCapture)})}}class Ba extends Ua{constructor(e){super(e.windowStyle),Object.defineProperty(this,"iframeDom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"windowUIContent",{enumerable:!0,configurable:!0,writable:!0,value:{url:"",content:""}}),this.generateContent(e.windowUIContent)}get iframe(){return this.iframeDom}GetIframe(){return this.iframeDom}get url(){return this.windowUIContent.url}set url(e){this.windowUIContent.url=e,this.Update({windowUIContent:{url:e}})}GetUrl(){return this.windowUIContent.url}SetUrl(e){this.windowUIContent.url=e,this.Update({windowUIContent:{url:e}})}get content(){return this.windowUIContent.content}set content(e){this.windowUIContent.content=e,this.Update({windowUIContent:{content:e}})}GetContent(){return this.windowUIContent.content}SetContent(e){this.windowUIContent.content=e,this.Update({windowUIContent:{content:e}})}generateContent(e){void 0!==(null==e?void 0:e.url)?(this.iframeDom=document.createElement("iframe"),this.iframeDom.id=this.generateUUID("windowUI"),this.iframeDom.style.width="100%",this.iframeDom.style.height="100%",this.iframeDom.style.border="none",this.iframeDom.style.background="none",this.iframeDom.src=this.windowUIContent.url=e.url,this.dom.appendChild(this.iframeDom)):void 0!==(null==e?void 0:e.content)&&(this.dom.innerHTML=this.windowUIContent.content=e.content)}Update(e){void 0!==(null==e?void 0:e.windowUIContent)&&(this.iframeDom&&(this.dom.removeChild(this.iframeDom),this.iframeDom=null),this.dom.innerHTML="",this.generateContent(e.windowUIContent)),void 0!==(null==e?void 0:e.windowStyle)&&this.generateWindowStyle(e.windowStyle)}}class qa extends Fa{constructor(e){super(e,Ba)}}class za extends Ua{constructor(e){super(e.windowStyle),Object.defineProperty(this,"poiUIContent",{enumerable:!0,configurable:!0,writable:!0,value:{normalImage:"http://wdpapi.51aes.com/doc-static/images/static/markerNormal.png",activeImage:"http://wdpapi.51aes.com/doc-static/images/static/markerActive.png",content:""}}),this.generateContent(e.poiUIContent)}get normalImage(){return this.poiUIContent.normalImage}set normalImage(e){this.poiUIContent.normalImage=e,this.Update({poiUIContent:{normalImage:e}})}GetNormalImage(){return this.poiUIContent.normalImage}SetNormalImage(e){this.poiUIContent.normalImage=e,this.Update({poiUIContent:{normalImage:e}})}get activeImage(){return this.poiUIContent.activeImage}set activeImage(e){this.poiUIContent.activeImage=e,this.Update({poiUIContent:{activeImage:e}})}GetActiveImage(){return this.poiUIContent.activeImage}SetActiveImage(e){this.poiUIContent.activeImage=e,this.Update({poiUIContent:{activeImage:e}})}get content(){return this.poiUIContent.content}set content(e){this.poiUIContent.content=e,this.Update({poiUIContent:{content:e}})}GetContent(){return this.poiUIContent.content}SetContent(e){this.poiUIContent.content=e,this.Update({poiUIContent:{content:e}})}generateContent(e){void 0!==(null==e?void 0:e.normalImage)&&(this.poiUIContent.normalImage=e.normalImage),void 0!==(null==e?void 0:e.activeImage)&&(this.poiUIContent.activeImage=e.activeImage),void 0!==(null==e?void 0:e.content)&&(this.poiUIContent.content=e.content);const t=this.generateUUID("poi"),o=""===this.poiUIContent.activeImage?this.poiUIContent.normalImage:this.poiUIContent.activeImage;this.dom.innerHTML=`<div class="${t}">${this.poiUIContent.content}</div><style>.${t} {width: 100%; height: 100%; background: url(${this.poiUIContent.normalImage}) no-repeat center center; background-size: 100% 100%; transition: all 0.3s}.${t}:hover {background: url(${o}) no-repeat center center; background-size: 100% 100%;}</style>`}Update(e){void 0!==(null==e?void 0:e.poiUIContent)&&(this.dom.innerHTML="",this.generateContent(e.poiUIContent)),void 0!==(null==e?void 0:e.windowStyle)&&this.generateWindowStyle(e.windowStyle)}}class Wa extends Fa{constructor(e){super(e,za)}}class Ha extends Ua{constructor(e){super(e.windowStyle),Object.defineProperty(this,"videoUIContent",{enumerable:!0,configurable:!0,writable:!0,value:{src:"",autoplay:!0,controls:!0,loop:!1,muted:!1,poster:"",preload:"none"}}),this.generateContent(e.videoUIContent)}get src(){return this.videoUIContent.src}set src(e){this.videoUIContent.src=e,this.Update({videoUIContent:{src:e}})}GetSrc(){return this.videoUIContent.src}SetSrc(e){this.videoUIContent.src=e,this.Update({videoUIContent:{src:e}})}get autoplay(){return this.videoUIContent.autoplay}set autoplay(e){this.videoUIContent.autoplay=e,this.Update({videoUIContent:{autoplay:e}})}GetAutoplay(){return this.videoUIContent.autoplay}SetAutoplay(e){this.videoUIContent.autoplay=e,this.Update({videoUIContent:{autoplay:e}})}get controls(){return this.videoUIContent.controls}set controls(e){this.videoUIContent.controls=e,this.Update({videoUIContent:{controls:e}})}GetControls(){return this.videoUIContent.controls}SetControls(e){this.videoUIContent.controls=e,this.Update({videoUIContent:{controls:e}})}get loop(){return this.videoUIContent.loop}set loop(e){this.videoUIContent.loop=e,this.Update({videoUIContent:{loop:e}})}GetLoop(){return this.videoUIContent.loop}SetLoop(e){this.videoUIContent.loop=e,this.Update({videoUIContent:{loop:e}})}get muted(){return this.videoUIContent.muted}set muted(e){this.videoUIContent.muted=e,this.Update({videoUIContent:{muted:e}})}GetMuted(){return this.videoUIContent.muted}SetMuted(e){this.videoUIContent.muted=e,this.Update({videoUIContent:{muted:e}})}get poster(){return this.videoUIContent.poster}set poster(e){this.videoUIContent.poster=e,this.Update({videoUIContent:{poster:e}})}GetPoster(){return this.videoUIContent.poster}SetPoster(e){this.videoUIContent.poster=e,this.Update({videoUIContent:{poster:e}})}get preload(){return this.videoUIContent.preload}set preload(e){this.videoUIContent.preload=e,this.Update({videoUIContent:{preload:e}})}GetPreload(){return this.videoUIContent.preload}SetPreload(e){this.videoUIContent.preload=e,this.Update({videoUIContent:{preload:e}})}generateContent(e){void 0!==(null==e?void 0:e.src)&&(this.videoUIContent.src=e.src),void 0!==(null==e?void 0:e.autoplay)&&(this.videoUIContent.autoplay=e.autoplay),void 0!==(null==e?void 0:e.controls)&&(this.videoUIContent.controls=e.controls),void 0!==(null==e?void 0:e.loop)&&(this.videoUIContent.loop=e.loop),void 0!==(null==e?void 0:e.muted)&&(this.videoUIContent.muted=e.muted),void 0!==(null==e?void 0:e.poster)&&(this.videoUIContent.poster=e.poster),void 0!==(null==e?void 0:e.preload)&&(this.videoUIContent.preload=e.preload);const t=this.generateUUID("video");this.dom.innerHTML=`<video style="width: 100%; height: 100%;" class="${t}" src="${this.videoUIContent.src}" ${this.videoUIContent.autoplay?"autoplay":""} ${this.videoUIContent.controls?"controls":""} ${this.videoUIContent.loop?"loop":""} ${this.videoUIContent.muted?"muted":""} poster="${this.videoUIContent.poster}" preload="${this.videoUIContent.preload}">Your browser does not support the video tag</video>`}Update(e){void 0!==(null==e?void 0:e.videoUIContent)&&(this.dom.innerHTML="",this.generateContent(e.videoUIContent)),void 0!==(null==e?void 0:e.windowStyle)&&this.generateWindowStyle(e.windowStyle)}}class Za extends Fa{constructor(e){super(e,Ha)}}class Ya{constructor(e){Object.defineProperty(this,"WindowUI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"PoiUI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"VideoUI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.WindowUI=new qa(e),this.PoiUI=new Wa(e),this.VideoUI=new Za(e)}}return class extends e{constructor(e){var o,i;const n={id:e.id};void 0!==(null==e?void 0:e.debugMode)&&(n.debugMode=e.debugMode),void 0!==(null==e?void 0:e.keyboard)&&(n.keyboard=e.keyboard),void 0!==(null==e?void 0:e.lock)&&(n.lock=e.lock),void 0!==(null==e?void 0:e.fullscreen)&&(n.fullscreen=e.fullscreen),n.initLog=null!==(o=e.initLog)&&void 0!==o&&o,super(n),Object.defineProperty(this,"recordMode",{enumerable:!0,configurable:!0,writable:!0,value:!1}),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:u}),Object.defineProperty(this,"RegisterObj",{enumerable:!0,configurable:!0,writable:!0,value:new Zo}),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,"token",{enumerable:!0,configurable:!0,writable:!0,value:localStorage.getItem("token")}),Object.defineProperty(this,"headers",{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,"brandingShow",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"bCached",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"agentHost",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"RequestEntity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"globalTools",{enumerable:!0,configurable:!0,writable:!0,value:{handleDataToObjectDataGenerate:Jo,handleEidToObjectData:Xo,handleEidToObjectDataByType:Ko,handleResultSceneChangeInfo:ei,handleSceneChangedData:ti,handleTypeToEidsData:oi,handleOutlinerData:ii,handleCoordData:ni,handleRotatorData:ri,findObjectFromListByCustomId:ai,findObjectFromListByEntityName:si}}),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,"AI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Camera",{enumerable:!0,configurable:!0,writable:!0,value:Ma}),Object.defineProperty(this,"CameraRoam",{enumerable:!0,configurable:!0,writable:!0,value:Da}),Object.defineProperty(this,"Point",{enumerable:!0,configurable:!0,writable:!0,value:pn}),Object.defineProperty(this,"Point2D",{enumerable:!0,configurable:!0,writable:!0,value:wn}),Object.defineProperty(this,"Polyline",{enumerable:!0,configurable:!0,writable:!0,value:jn}),Object.defineProperty(this,"Polyline2D",{enumerable:!0,configurable:!0,writable:!0,value:Cn}),Object.defineProperty(this,"Polygon",{enumerable:!0,configurable:!0,writable:!0,value:On}),Object.defineProperty(this,"Polygon2D",{enumerable:!0,configurable:!0,writable:!0,value:Tn}),Object.defineProperty(this,"Range",{enumerable:!0,configurable:!0,writable:!0,value:Zn}),Object.defineProperty(this,"Poi",{enumerable:!0,configurable:!0,writable:!0,value:Jn}),Object.defineProperty(this,"Path",{enumerable:!0,configurable:!0,writable:!0,value:Kn}),Object.defineProperty(this,"HeatMap",{enumerable:!0,configurable:!0,writable:!0,value:sr}),Object.defineProperty(this,"HighlightArea",{enumerable:!0,configurable:!0,writable:!0,value:rr}),Object.defineProperty(this,"Particle",{enumerable:!0,configurable:!0,writable:!0,value:ir}),Object.defineProperty(this,"Text3D",{enumerable:!0,configurable:!0,writable:!0,value:tr}),Object.defineProperty(this,"ColumnarHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:dr}),Object.defineProperty(this,"Window",{enumerable:!0,configurable:!0,writable:!0,value:ur}),Object.defineProperty(this,"Viewshed",{enumerable:!0,configurable:!0,writable:!0,value:hr}),Object.defineProperty(this,"Parabola",{enumerable:!0,configurable:!0,writable:!0,value:gr}),Object.defineProperty(this,"Bound",{enumerable:!0,configurable:!0,writable:!0,value:Cr}),Object.defineProperty(this,"Light",{enumerable:!0,configurable:!0,writable:!0,value:Or}),Object.defineProperty(this,"Tiles",{enumerable:!0,configurable:!0,writable:!0,value:aa}),Object.defineProperty(this,"EarthTiles",{enumerable:!0,configurable:!0,writable:!0,value:ua}),Object.defineProperty(this,"Static",{enumerable:!0,configurable:!0,writable:!0,value:Ar}),Object.defineProperty(this,"Hierarchy",{enumerable:!0,configurable:!0,writable:!0,value:Rr}),Object.defineProperty(this,"Skeletal",{enumerable:!0,configurable:!0,writable:!0,value:Nr}),Object.defineProperty(this,"SpaceHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:jr}),Object.defineProperty(this,"RoadHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:pr}),Object.defineProperty(this,"Raster",{enumerable:!0,configurable:!0,writable:!0,value:yr}),Object.defineProperty(this,"RealTimeVideo",{enumerable:!0,configurable:!0,writable:!0,value:wr}),Object.defineProperty(this,"Group",{enumerable:!0,configurable:!0,writable:!0,value:pa}),Object.defineProperty(this,"Material",{enumerable:!0,configurable:!0,writable:!0,value:Nn}),Object.defineProperty(this,"Effects",{enumerable:!0,configurable:!0,writable:!0,value:ha}),Object.defineProperty(this,"LocalGeoReference",{enumerable:!0,configurable:!0,writable:!0,value:Pn}),Object.defineProperty(this,"Vegetation",{enumerable:!0,configurable:!0,writable:!0,value:Pr}),Object.defineProperty(this,"ModelerEmbank",{enumerable:!0,configurable:!0,writable:!0,value:_r}),Object.defineProperty(this,"ModelerWater",{enumerable:!0,configurable:!0,writable:!0,value:Ur}),Object.defineProperty(this,"ModelerRiver",{enumerable:!0,configurable:!0,writable:!0,value:zr}),Object.defineProperty(this,"ModelerFence",{enumerable:!0,configurable:!0,writable:!0,value:Hr}),Object.defineProperty(this,"ModelerFloor",{enumerable:!0,configurable:!0,writable:!0,value:Yr}),Object.defineProperty(this,"ProjectModel",{enumerable:!0,configurable:!0,writable:!0,value:Jr}),Object.defineProperty(this,"ProjectInstance",{enumerable:!0,configurable:!0,writable:!0,value:ea}),Object.defineProperty(this,"StaticInstance",{enumerable:!0,configurable:!0,writable:!0,value:ia}),Object.defineProperty(this,"WindowUI",{enumerable:!0,configurable:!0,writable:!0,value:Ba}),Object.defineProperty(this,"PoiUI",{enumerable:!0,configurable:!0,writable:!0,value:za}),Object.defineProperty(this,"VideoUI",{enumerable:!0,configurable:!0,writable:!0,value:Ha}),Object.defineProperty(this,"startCloud",{enumerable:!0,configurable:!0,writable:!0,value:e=>t(this,void 0,void 0,function*(){var t,o,i;const n="fixed"===this.rendererMode?this.width:null===(t=document.getElementById(this.id))||void 0===t?void 0:t.clientWidth,r="fixed"===this.rendererMode?this.height:null===(o=document.getElementById(this.id))||void 0===o?void 0:o.clientHeight,a=yield this.reqMan.requestFunc(e,{order:this.order,width:n,height:r});if(null==a?void 0:a.success){this.agentHost=null===(i=a.results)||void 0===i?void 0:i.agentHost;let{io:e}=a.results;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,a.results.taskId),{success:!0,message:"start Render Cloud",result:a.results}}return this.cloudApiLog("get IO Error!"),{success:!1,message:a.msg,errCode:a.code}})}),Object.defineProperty(this,"startCloudByTaskId",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){return this.startRenderCloud(e,o),{success:!0,message:"start Render Cloud"}})}),Object.defineProperty(this,"startApi",{enumerable:!0,configurable:!0,writable:!0,value:(e,t={})=>new Promise((o,i)=>{let n=null;this.highLevelLog("Params data",e,t);const r=Wo.getInstance().addListener({callback:e=>{this.highLevelLog("return callback data",e),o(e),n&&(clearTimeout(n),n=null)}}),a=Object.assign(Object.assign({},e),{args:Object.assign({guid:r},t)});this.cloudApiLog("Send Data",JSON.stringify(a),a),this.recordMode&&(this.record+=JSON.stringify(a)+",\n"),"WS"===this.apiRequestMode?this.ws&&this.ws.send(JSON.stringify(a)):this.sendLargeDataAction("string",JSON.stringify(a),(...e)=>{this.highLevelLog("large string send process",e)}),n=window.setTimeout(()=>{const e={success:!1,message:"Request timeout!",result:r};this.cloudApiLog("return callback data",e),i(e),null!==n&&clearTimeout(n),n=null},this.timeoutTime)})}),Object.defineProperty(this,"startApiByObject",{enumerable:!0,configurable:!0,writable:!0,value:(e=null)=>new Promise((t,o)=>{let i=null;this.highLevelLog("Params data",e);const n=Wo.getInstance().addListener({callback:e=>{this.highLevelLog("return callback data",e),t(e),i&&(clearTimeout(i),i=null)}});e.args.guid=n,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)}),i=window.setTimeout(()=>{const e={success:!1,message:"Request timeout!",result:n};this.cloudApiLog("return callback data",e),o(e),null!==i&&clearTimeout(i),i=null},this.timeoutTime)})}),Object.defineProperty(this,"handleDataChannelMessage",{enumerable:!0,configurable:!0,writable:!0,value:(e,t=null)=>{this.highLevelLog("handle datachannel data(string): ",e);try{const t=JSON.parse(e);switch(t.type){case l.API:this.cloudApiLog("Reponse(type: API): ",e,t),this.handleApiData(t);break;case l.EVENT:this.cloudApiLog("Reponse(type: EVENT): ",e,t),this.handleUEEventData(t);break;case l.ERROR:this.cloudApiLog("Reponse(type: ERROR): ",e,t),this.handleErrorData(t);break;default:this.cloudApiLog("Reponse(type: Unknowen): ",e,t),this.handleDefaultData(t)}}catch(e){console.error(e)}}}),Object.defineProperty(this,"handleApiData",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if(e.guid){const t=Wo.getInstance().findListener(e.guid);if(t){const o={success:e.success,message:e.message,result:e.result};t.callback(o),Wo.getInstance().removeListener(e.guid)}else this.cloudApiLog("can not find callback")}}}),Object.defineProperty(this,"handleUEEventData",{enumerable:!0,configurable:!0,writable:!0,value:e=>{var t;const o=this.UeEvent.get(`${e.event_name}_system`),i=this.UeEvents.filter(t=>t.name.indexOf(`${e.event_name}_private`)>=0&&t.sync),n=this.UeEvents.filter(t=>t.name.indexOf(`${e.event_name}_private`)>=0&&!t.sync),r=this.UeEvent.get(e.event_name),a=this.UeEvents.filter(t=>t.name===e.event_name);if(this.highLevelLog("all Register Func list (system, privateSync, private, user, users)",o,i,n,r,a),null===(t=e.args)||void 0===t?void 0:t.type){const t=this.RegisterObj.GetByValue(this.RegisterObj.EntityType,e.args.type);t&&(e.args.type=t)}const s={success:!0,message:e.event_name,event_name:e.event_name,result:e.args};o?o.func(s,{objSync:i,objPri:n,obj:r,objs:a}):(i&&(null==i?void 0:i.length)>0?i.forEach(e=>{e.func(s,{obj:r,objs:a})}):(a&&a.length>0&&a.forEach(e=>{e.func(s)}),r&&r.func(s)),n&&(null==n?void 0:n.length)>0&&n.forEach(e=>{e.func(s)}))}}),Object.defineProperty(this,"handleErrorData",{enumerable:!0,configurable:!0,writable:!0,value:e=>{var t;this.highLevelLog("Renderer Error Message: ",e);const o=null===(t=li.getInstance())||void 0===t?void 0:t.GetEvent("onDataError");o&&o.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:(e,t)=>{var o,i;t&&(t.objSync&&(null===(o=t.objSync)||void 0===o?void 0:o.length)>0?t.objSync.forEach(o=>{o.func(e,{obj:t.obj,objs:t.objs})}):(t.objs&&t.objs.length>0&&t.objs.forEach(t=>{t.func(e)}),t.obj&&t.obj.func(e)),t.objPri&&(null===(i=t.objPri)||void 0===i?void 0:i.length)>0&&t.objPri.forEach(t=>{t.func(e)}))}}),Object.defineProperty(this,"OnWdpSceneIsReady",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t;if(this.highLevelLog("(system) OnWdpSceneIsReady: ",e),100===(null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.progress)){if(this.sceneIsReady=!0,yield this.ToggleAPIEventChannel(),yield this.CheckVersionConsistent(),this.bCached){const e=yield this.Scene.GetAll();this.cloudApiLog("Start caching data",e)}else{this.cloudApiLog("The scene has placed models/overlays. If caching behavior has not been performed, caching operations can be performed through the this.Scene.GetAll or this.Scene.GetByTypes methods");const e=yield this.Scene.GetGlobal();this.cloudApiLog("Global object(entity)",e)}this.generateDebugRTC()}this.highLevelLog("OnWdpSceneIsReady all Register Func",o),this.handleUserAndPluginEventLogic({success:!0,message:"OnWdpSceneIsReady",event_name:"OnWdpSceneIsReady",result:null==e?void 0:e.result},o),this.cloudApiLog("(system) OnWdpSceneIsReady result:",{success:!0,message:"OnWdpSceneIsReady",event_name:"OnWdpSceneIsReady",result:null==e?void 0:e.result})})}),Object.defineProperty(this,"CheckVersionConsistent",{enumerable:!0,configurable:!0,writable:!0,value:()=>t(this,void 0,void 0,function*(){var e,t,o,i,n,r,a,s,l,d,c,u,v;const h=yield this.System.GetInfomation();if(h.success){"equal"!==((e,t,o=2)=>{const i=e.split("_")[0].split(".").map(e=>parseInt(e,10)),n=t.split(".").map(e=>parseInt(e,10));let r="equal";for(let e=0;e<i.length;e++){if(i[e]>n[e]){r="greater";break}if(i[e]<n[e]){r="less";break}if(e+1==o)break}return r})(h.result.wdpApiJsSdk,h.result.wdpApiScenePlugins)&&console.warn("The SDK version does not match the Runtime version. This will cause some functions to not operate properly. Please install an SDK that matches the Runtime!");const m=[{Name:"SDK version",Value:null===(e=h.result)||void 0===e?void 0:e.wdpApiJsSdk},{Name:"Runtime version",Value:null===(t=h.result)||void 0===t?void 0:t.wdpApiScenePlugins},{Name:"Updated",Value:null===(o=h.result)||void 0===o?void 0:o.updated},{Name:"UserAgent",Value:null===(i=h.result)||void 0===i?void 0:i.userAgent},{Name:"OS",Value:null===(n=h.result)||void 0===n?void 0:n.os},{Name:"Rendering resolution",Value:(null===(r=h.result)||void 0===r?void 0:r.renderingResolution)?`${null===(a=h.result)||void 0===a?void 0:a.renderingResolution[0]} x ${null===(s=h.result)||void 0===s?void 0:s.renderingResolution[1]}`:null},{Name:"Screen resolution",Value:(null===(l=h.result)||void 0===l?void 0:l.screenResolution)?`${null===(d=h.result)||void 0===d?void 0:d.screenResolution[0]} x ${null===(c=h.result)||void 0===c?void 0:c.screenResolution[1]}`:null}];if(console.table(m),(null===(v=null===(u=h.result)||void 0===u?void 0:u.plugins)||void 0===v?void 0:v.length)>0){console.log("%c Plugins:","color:white;padding:5px;background:#2374D6;border-radius:5px;");const e=[];h.result.plugins.forEach(t=>{e.push({Plugin:t.name,Version:t.version})}),console.table(e)}}})}),Object.defineProperty(this,"OnEntityClicked",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n,r,a;if(this.highLevelLog("(system) Entity clicked: ",e),(null===(t=e.result)||void 0===t?void 0:t.type)&&(null===(i=e.result)||void 0===i?void 0:i.eid)){const t=this.RegisterObj.Get(e.result.type);if(t){const i=yield t.object.Get(`${e.result.eid}`),s={result:{}};if(i.success){s.result.object=i.result.object,void 0!==(null===(n=e.result)||void 0===n?void 0:n.position)&&(s.result.position=e.result.position),void 0!==(null===(r=e.result)||void 0===r?void 0:r.nodeId)&&(s.result.nodeId=e.result.nodeId),void 0!==(null===(a=e.result)||void 0===a?void 0:a.triggerType)&&(s.result.triggerType=e.result.triggerType),this.handleUserAndPluginEventLogic(s,o);const t=this.EventList.GetType(e.result.type);t&&t.func(s);const l=this.EventList.Get(`${e.result.eid}`);l&&l.func(s)}if(this.DataModel.Cluster.openonclick&&this.DataModel.Cluster.generatedEntity.length>0&&"pending"!==this.DataModel.Cluster.clusterEventStatus){const t=[],o=this.DataModel.Cluster.generatedEntity.find(t=>t.eid===`${e.result.eid}`);if(o){const i=this.DataModel.Cluster.evnetCacheData.find(e=>e.aggregation_id===o.customId);if((null==i?void 0:i.aggregate_count)>1&&(null==i?void 0:i.aggregate_count)<=this.DataModel.Cluster.countLimit){const n=this.DataModel.Cluster.clusterCacheData.find(e=>e.queryId===(null==i?void 0:i.queryId));if(n){const r=n.calculateCoordZ;if(null==i||i.aggregation.forEach(e=>{const o=e.coord.split(",").map(e=>parseFloat(e));o.push(0);const i=e;let r=JSON.stringify(n.covering);Object.keys(i).forEach(e=>{r=r.replace(`{${e}}`,i[e])});const a=JSON.parse(r);a.location=o,a.customId=e.id;const s=Object.assign({},a);t.push(s)}),t.length>0){if((yield this.Scene.ClearByObjects([o])).success){const o=this.DataModel.Cluster.generatedEntity.findIndex(t=>t.eid===`${e.result.eid}`);o>=0&&this.DataModel.Cluster.generatedEntity.splice(o,1),this.Scene.Creates(t,{calculateCoordZ:r}).then(e=>{e.success&&this.DataModel.Cluster.generatedEntity.push(...e.result.objects)})}}}}}}this.cloudApiLog("OnEntityClicked result:",s)}else this.cloudApiLog(`OnEntityClicked result: ${e.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:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n,r;if(this.highLevelLog("(system) Entity double clicked: ",e),(null===(t=e.result)||void 0===t?void 0:t.type)&&(null===(i=e.result)||void 0===i?void 0:i.eid)){const t=this.RegisterObj.Get(e.result.type);if(t){const i=yield t.object.Get(`${e.result.eid}`),a={result:{}};if(i.success){a.result.object=i.result.object,void 0!==(null===(n=e.result)||void 0===n?void 0:n.position)&&(a.result.position=e.result.position),void 0!==(null===(r=e.result)||void 0===r?void 0:r.nodeId)&&(a.result.nodeId=e.result.nodeId),this.handleUserAndPluginEventLogic(a,o);const t=this.EventList.GetDbType(e.result.type);t&&t.func(a);const s=this.EventList.GetDb(`${e.result.eid}`);s&&s.func(a)}this.cloudApiLog("OnEntityDbClicked result:",a)}else this.cloudApiLog(`OnEntityDbClicked result: ${e.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:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n;if(this.highLevelLog("(system) Entity mouse enter: ",e),(null===(t=e.result)||void 0===t?void 0:t.type)&&(null===(i=e.result)||void 0===i?void 0:i.eid)){const t=this.RegisterObj.Get(e.result.type);if(t){const i=yield t.object.Get(`${e.result.eid}`),r={result:{}};if(i.success){r.result.object=i.result.object,void 0!==(null===(n=e.result)||void 0===n?void 0:n.mousePos)&&(r.result.mousePos=e.result.mousePos),this.handleUserAndPluginEventLogic(r,o);const t=this.EventList.GetEnterType(e.result.type);t&&t.func(r);const a=this.EventList.GetEnter(`${e.result.eid}`);a&&a.func(r)}this.cloudApiLog("OnMouseEnterEntity result:",r)}else this.cloudApiLog(`OnMouseEnterEntity result: ${e.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:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n;if(this.highLevelLog("(system) Entity mouse out: ",e),(null===(t=e.result)||void 0===t?void 0:t.type)&&(null===(i=e.result)||void 0===i?void 0:i.eid)){const t=this.RegisterObj.Get(e.result.type);if(t){const i=yield t.object.Get(`${e.result.eid}`),r={result:{}};if(i.success){r.result.object=i.result.object,void 0!==(null===(n=e.result)||void 0===n?void 0:n.mousePos)&&(r.result.mousePos=e.result.mousePos),this.handleUserAndPluginEventLogic(r,o);const t=this.EventList.GetOutType(e.result.type);t&&t.func(r);const a=this.EventList.GetOut(`${e.result.eid}`);a&&a.func(r)}this.cloudApiLog("OnMouseOutEntity result:",r)}else this.cloudApiLog(`OnMouseOutEntity result: ${e.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:(e,o)=>t(this,void 0,void 0,function*(){var t,i;this.highLevelLog("(system) Entity Nodes Selection changed: ",e);const n={object:null,nodeIds:[],selectionType:null};if(n.nodeIds=e.result.nodeIds,null===(t=e.result)||void 0===t?void 0:t.selectionType)switch(n.selectionType=e.result.selectionType,parseInt(e.result.selectionType,10)){case d.Add:n.selectionType="Add";break;case d.Remove:n.selectionType="Remove";break;case d.Clear:n.selectionType="Clear"}if(null===(i=e.result)||void 0===i?void 0:i.eid){const t=yield Xo([e.result.eid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);n.object=t.length>0?t[0]:e.result.eid}this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityNodeSelectionChanged",event_name:"OnEntityNodeSelectionChanged",result:n},o),this.cloudApiLog("(system) OnEntityNodeSelectionChanged result:",{success:!0,message:"OnEntityNodeSelectionChanged",event_name:"OnEntityNodeSelectionChanged",result:n})})}),Object.defineProperty(this,"OnEntitySelectionChanged",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i;this.highLevelLog("(system) Selection changed: ",e);const n={objects:[],selectionType:null};if(null===(t=e.result)||void 0===t?void 0:t.selectionType)switch(n.selectionType=e.result.selectionType,parseInt(e.result.selectionType,10)){case d.Add:n.selectionType="Add";break;case d.Remove:n.selectionType="Remove";break;case d.Clear:n.selectionType="Clear"}if(null===(i=e.result)||void 0===i?void 0:i.eids){const t=yield Xo(e.result.eids,this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t.length>0&&this.Scene.Selection.handleCache(t,n.selectionType),n.objects=t,this.handleUserAndPluginEventLogic({success:!0,message:"OnEntitySelectionChanged",event_name:"OnEntitySelectionChanged",result:n},o)}this.cloudApiLog("(system) OnEntitySelectionChanged result:",{success:!0,message:"OnEntitySelectionChanged",event_name:"OnEntitySelectionChanged",result:n})})}),Object.defineProperty(this,"OnEntityAdded",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t;if(this.highLevelLog("(system) Entity added: ",e),null===(t=e.result)||void 0===t?void 0:t.typeToEids){const t=yield oi(e.result.typeToEids,this.RegisterObj);this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityAdded",event_name:"OnEntityAdded",result:t},o),this.cloudApiLog("(system) OnEntityAdded result:",{success:!0,message:"OnEntityAdded",event_name:"OnEntityAdded",result:t})}else this.cloudApiLog("(system) OnEntityAdded result:",{success:!0,message:"typeToEids is undefined",event_name:"OnEntityAdded"})})}),Object.defineProperty(this,"OnEntityRemoved",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t;if(this.highLevelLog("(system) Entity removed: ",e),null===(t=e.result)||void 0===t?void 0:t.typeToEids){const t=yield oi(e.result.typeToEids,this.RegisterObj);this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityRemoved",event_name:"OnEntityRemoved",result:t},o),this.cloudApiLog("(system) OnEntityRemoved result:",{success:!0,message:"OnEntityRemoved",event_name:"OnEntityRemoved",result:t})}else this.cloudApiLog("(system) OnEntityRemoved result:",{success:!0,message:"typeToEids is undefined",event_name:"OnEntityRemoved"})})}),Object.defineProperty(this,"OnEntityUpdated",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t;if(this.highLevelLog("(system) Entity updated: ",e),null===(t=e.result)||void 0===t?void 0:t.typeToEids){const t=yield oi(e.result.typeToEids,this.RegisterObj);this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityUpdated",event_name:"OnEntityUpdated",result:t},o),this.cloudApiLog("(system) OnEntityUpdated result:",{success:!0,message:"OnEntityUpdated",event_name:"OnEntityUpdated",result:t})}else this.cloudApiLog("(system) OnEntityUpdated result:",{success:!0,message:"typeToEids is undefined",event_name:"OnEntityUpdated"})})}),Object.defineProperty(this,"OnWdpSceneChanged",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){this.highLevelLog("(system) Scene changed: ",e);const t=yield ti(e.result,this.RequestEntity,this.RegisterObj,this.ObjectEidMap);this.handleUserAndPluginEventLogic({success:!0,message:"OnWdpSceneChanged",event_name:"OnWdpSceneChanged",result:t},o),this.cloudApiLog("(system) OnWdpSceneChanged result:",{success:!0,message:"OnWdpSceneChanged",event_name:"OnWdpSceneChanged",result:t})})}),Object.defineProperty(this,"OnMoveAlongPathEnd",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n,r;this.highLevelLog("(system) Move along path end: ",e);const a={};if(void 0!==(null===(t=e.result)||void 0===t?void 0:t.pathEid)){const t=yield Xo([e.result.pathEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t&&t.length>0&&(a.path=t[0])}if(void 0!==(null===(i=e.result)||void 0===i?void 0:i.moveEntityEid)){const t=yield Xo([e.result.moveEntityEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t&&t.length>0&&(a.move=t[0])}if(void 0!==(null===(n=e.result)||void 0===n?void 0:n.moveAlongEid)){const t=yield Xo([e.result.moveAlongEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t&&t.length>0&&(a.bound=t[0])}void 0!==(null===(r=e.result)||void 0===r?void 0:r.bReverse)&&(a.bReverse=e.result.bReverse),this.handleUserAndPluginEventLogic({success:!0,message:"OnMoveAlongPathEnd",event_name:"OnMoveAlongPathEnd",result:a},o),this.cloudApiLog("(system) OnMoveAlongPathEnd result:",{success:!0,message:"OnMoveAlongPathEnd",event_name:"OnMoveAlongPathEnd",result:a})})}),Object.defineProperty(this,"OnMoveAlongPathProcessEvent",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n,r,a,s;this.highLevelLog("(system) Move along path process event: ",e);const l={};if(void 0!==(null===(t=e.result)||void 0===t?void 0:t.pathEid)){const t=yield Xo([e.result.pathEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t&&t.length>0&&(l.path=t[0])}if(void 0!==(null===(i=e.result)||void 0===i?void 0:i.moveEntityEid)){const t=yield Xo([e.result.moveEntityEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t&&t.length>0&&(l.move=t[0])}if(void 0!==(null===(n=e.result)||void 0===n?void 0:n.moveAlongEid)){const t=yield Xo([e.result.moveAlongEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t&&t.length>0&&(l.bound=t[0])}void 0!==(null===(r=e.result)||void 0===r?void 0:r.passedPoint)&&(l.passedPoint=e.result.passedPoint),void 0!==(null===(a=e.result)||void 0===a?void 0:a.passedOriginalPoint)&&(l.passedOriginalPoint=e.result.passedOriginalPoint),void 0!==(null===(s=e.result)||void 0===s?void 0:s.passedPointIndex)&&(l.passedPointIndex=e.result.passedPointIndex),this.handleUserAndPluginEventLogic({success:!0,message:"OnMoveAlongPathProcessEvent",event_name:"OnMoveAlongPathProcessEvent",result:l},o),this.cloudApiLog("(system) OnMoveAlongPathProcessEvent result:",{success:!0,message:"OnMoveAlongPathProcessEvent",event_name:"OnMoveAlongPathProcessEvent",result:l})})}),Object.defineProperty(this,"OnCameraMotionStartEvent",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t;this.highLevelLog("(system) OnCameraMotionStartEvent: ",e);const i={cameraMotionReason:""};(null===(t=e.result)||void 0===t?void 0:t.cameraMotionReason)&&(i.cameraMotionReason=e.result.cameraMotionReason),this.handleUserAndPluginEventLogic({success:!0,message:"OnCameraMotionStartEvent",event_name:"OnCameraMotionStartEvent",result:i},o),this.cloudApiLog("(system) OnCameraMotionStartEvent result:",{success:!0,message:"OnCameraMotionStartEvent",event_name:"OnCameraMotionStartEvent",result:i})})}),Object.defineProperty(this,"OnCameraMotionEndEvent",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i;this.highLevelLog("(system) OnCameraMotionEndEvent: ",e);const n={cameraMotionReason:"",objects:[]};if((null===(t=e.result)||void 0===t?void 0:t.cameraMotionReason)&&(n.cameraMotionReason=e.result.cameraMotionReason),(null===(i=e.result)||void 0===i?void 0:i.eids)&&e.result.eids.length>0)for(let t=0;t<e.result.eids.length;t++)n.objects.push(this.ObjectEidMap.get(`${e.result.eids[t]}`));this.handleUserAndPluginEventLogic({success:!0,message:"OnCameraMotionEndEvent",event_name:"OnCameraMotionEndEvent",result:n},o),this.cloudApiLog("(system) OnCameraMotionEndEvent result:",{success:!0,message:"OnCameraMotionEndEvent",event_name:"OnCameraMotionEndEvent",result:n})})}),Object.defineProperty(this,"OnEntityReady",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i;this.highLevelLog("(system) OnEntityReady: ",e);const n={object:{},progress:0};if(void 0!==(null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.eid)&&void 0!==(null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.progress)){const t=yield Xo([e.result.eid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);n.object=t.length>0?t[0]:e.result.eid,n.progress=e.result.progress}this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityReady",event_name:"OnEntityReady",result:n},o),this.cloudApiLog("(system) OnEntityReady result:",{success:!0,message:"OnEntityReady",event_name:"OnEntityReady",result:n})})}),Object.defineProperty(this,"OnVegetationCreating",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i;this.highLevelLog("(system) OnVegetationCreating: ",e);const n={object:{},tip:""};if(void 0!==(null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.entityId)&&void 0!==(null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.tip)){const t=yield Xo([e.result.entityId],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);n.object=t.length>0?t[0]:e.result.entityId,n.tip=e.result.tip}this.handleUserAndPluginEventLogic({success:!0,message:"OnVegetationCreating",event_name:"OnVegetationCreating",result:n},o),this.cloudApiLog("(system) OnVegetationCreating result:",{success:!0,message:"OnVegetationCreating",event_name:"OnVegetationCreating",result:n})})}),Object.defineProperty(this,"OnVegetationCreated",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i;this.highLevelLog("(system) OnVegetationCreated: ",e);const n={object:{},vegetationNum:0};if(void 0!==(null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.entityId)&&void 0!==(null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.vegetationNum)){const t=yield Xo([e.result.entityId],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);n.object=t.length>0?t[0]:e.result.entityId,n.vegetationNum=e.result.vegetationNum}this.handleUserAndPluginEventLogic({success:!0,message:"OnVegetationCreated",event_name:"OnVegetationCreated",result:n},o),this.cloudApiLog("(system) OnVegetationCreated result:",{success:!0,message:"OnVegetationCreated",event_name:"OnVegetationCreated",result:n})})}),Object.defineProperty(this,"OnWdpMaterialHit",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n;this.highLevelLog("(system) OnWdpMaterialHit: ",e);const r={eid:"",meshName:"",materialIndex:-1};void 0!==(null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.eid)&&(yield Xo([e.result.eid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap),r.eid=e.result.eid),void 0!==(null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.meshName)&&(r.meshName=e.result.meshName),void 0!==(null===(n=null==e?void 0:e.result)||void 0===n?void 0:n.materialIndex)&&(r.materialIndex=e.result.materialIndex),this.Tools.PickerMaterial.pickerMaterialDataList.push(r),this.handleUserAndPluginEventLogic({success:!0,message:"OnWdpMaterialHit",event_name:"OnWdpMaterialHit",result:r},o),this.cloudApiLog("(system) OnWdpMaterialHit result:",{success:!0,message:"OnWdpMaterialHit",event_name:"OnWdpMaterialHit",result:r})})}),Object.defineProperty(this,"OnRealTimeVideoEvent",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n;this.highLevelLog("(system) OnRealTimeVideoEvent: ",e);const r={removed:[],name:null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.name};if(void 0!==(null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.args)){const t=JSON.parse(e.result.args);if("onDestroy"===(null===(n=null==e?void 0:e.result)||void 0===n?void 0:n.name)){const e=yield ti({addedEids:[],updateInfo:{},removedEids:null==t?void 0:t.eids},this.RequestEntity,this.RegisterObj,this.ObjectEidMap);r.removed=e.removed}}this.handleUserAndPluginEventLogic({success:!0,message:"OnRealTimeVideoEvent",event_name:"OnRealTimeVideoEvent",result:r},o),this.cloudApiLog("(system) OnRealTimeVideoEvent result:",{success:!0,message:"OnRealTimeVideoEvent",event_name:"OnRealTimeVideoEvent",result:r})})}),Object.defineProperty(this,"OnCameraRoamingFrame",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i,n;this.highLevelLog("(system) OnCameraRoamingFrame: ",e);const r={};if(void 0!==(null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.frameIndex)&&(r.frameIndex=e.result.frameIndex),void 0!==(null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.bFinished)&&(r.bFinished=e.result.bFinished),void 0!==(null===(n=null==e?void 0:e.result)||void 0===n?void 0:n.cameraRoamEid)){const t=yield Xo([e.result.cameraRoamEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);r.cameraRoam=t.length>0?t[0]:e.result.cameraRoamEid}this.handleUserAndPluginEventLogic({success:!0,message:"OnCameraRoamingFrame",event_name:"OnCameraRoamingFrame",result:r},o),this.cloudApiLog("(system) OnCameraRoamingFrame result:",{success:!0,message:"OnCameraRoamingFrame",event_name:"OnCameraRoamingFrame",result:r})})}),Object.defineProperty(this,"OnEntityGraphicsReady",{enumerable:!0,configurable:!0,writable:!0,value:(e,o)=>t(this,void 0,void 0,function*(){var t,i;this.highLevelLog("(system) OnEntityGraphicsReady: ",e);const n={object:{},progress:0};if(void 0!==(null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.eid)&&void 0!==(null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.progress)){const t=yield Xo([e.result.eid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);n.object=t.length>0?t[0]:e.result.eid,n.progress=e.result.progress}this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityGraphicsReady",event_name:"OnEntityGraphicsReady",result:n},o),this.cloudApiLog("(system) OnEntityGraphicsReady result:",{success:!0,message:"OnEntityGraphicsReady",event_name:"OnEntityGraphicsReady",result:n})})}),Object.defineProperty(this,"OnClusterResultEvent",{enumerable:!0,configurable:!0,writable:!0,value:c.debounce((e,o)=>t(this,void 0,void 0,function*(){var t,o,i,n;if(this.highLevelLog("(private) OnClusterResultEvent:",e,this.DataModel.Cluster.clusterCacheData),0!==this.DataModel.Cluster.clusterCacheData.length){if(this.highLevelLog("clusterEventStatus",`${this.DataModel.Cluster.clusterEventStatus}`),(null===(o=null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.result)||void 0===o?void 0:o.length)>0&&"pending"!==this.DataModel.Cluster.clusterEventStatus){if(this.DataModel.Cluster.clusterEventStatus="pending",this.DataModel.Cluster.evnetCacheData=[],this.DataModel.Cluster.generatedEntity.length>0){(yield this.Scene.ClearByObjects(this.DataModel.Cluster.generatedEntity)).success&&(this.DataModel.Cluster.generatedEntity=[])}for(let t=0;t<e.result.result.length;t++){const o=[],r=this.DataModel.Cluster.clusterCacheData.find(o=>o.queryId===e.result.result[t].queryId);if(this.highLevelLog("Cluster styleObj",r,e.result.result[t].data),r&&(null===(n=null===(i=e.result.result[t])||void 0===i?void 0:i.data)||void 0===n?void 0:n.length)>0){const i=r.calculateCoordZ;if(e.result.result[t].data.forEach(i=>{i.queryId=e.result.result[t].queryId,this.DataModel.Cluster.evnetCacheData.push(i);const n=i.aggregate_coord.split(",").map(e=>parseFloat(e));if(n.push(0),this.highLevelLog("Cluster styleObj loc",n),parseInt(i.aggregate_count)>1){const e=parseInt(i.aggregate_count)>this.DataModel.Cluster.countLimit?`${this.DataModel.Cluster.countLimit}+`:i.aggregate_count,t=JSON.parse(JSON.stringify(r.aggicon).replace("{count}",e));t.location=n,t.customId=i.aggregation_id;const a=Object.assign({},t);o.push(a)}else if(1===parseInt(i.aggregate_count)){const e=i.aggregation[0];let t=JSON.stringify(r.covering);Object.keys(e).forEach(o=>{t=t.replace(`{${o}}`,e[o])});const a=JSON.parse(t);a.location=n,a.customId=i.aggregation_id;const s=Object.assign({},a);o.push(s)}}),this.highLevelLog("createJsonData",o),o.length>0){const e=yield this.Scene.Creates(o,{calculateCoordZ:i});e.success&&this.DataModel.Cluster.generatedEntity.push(...e.result.objects)}}}this.DataModel.Cluster.clusterEventStatus="resolve",this.highLevelLog("clusterEventStatus resolve",`${this.DataModel.Cluster.clusterEventStatus}`)}}else this.cloudApiLog("OnClusterResultEvent error:",{success:!1,message:"OnClusterResultEvent cache data is empty!"})}),300)}),this.brandingShow=null===(i=e.initLog)||void 0===i||i,this.url=e.url,void 0!==e.prefix&&(this.prefix=e.prefix),this.order=e.order,(null==e?void 0:e.resolution)&&(this.width=e.resolution[0],this.height=e.resolution[1],this.rendererMode="fixed"),void 0!==(null==e?void 0:e.bCached)&&(this.bCached=e.bCached),""!==this.order?this.headers["x-render-order"]=this.order:this.headers.Authorization=`Bearer ${this.token}`,this.reqMan=new zo(this),this.EventList=new Yo,this.init()}init(){this.initLog(),this.RequestEntity=new di(this),this.Renderer=new vi(this),this.Debug=new gi(this),this.Environment=new xi(this),this.System=new Li(this),this.ApiStateManager=new Vi(this),this.Tools=new mn(this),this.Customize=new fn(this),this.Setting=new bn(this),this.DataModel=new Wn(this),this.Scene=new Oa(this),this.CameraControl=new Ta(this),this.CameraPreset=new Aa(this),this.CameraRoams=new Ra(this),this.CameraStart=new Na(this),this.Transaction=new Va(this),this.Plugin=new Pa(this),this.Editor=new ka(this),this.AI=new _a(this),this.Component=new Ya(this),this.RegisterObj.Register([{name:"Point",object:this.DataModel.Geometry.Point,category:"Geometry"},{name:"Point2D",object:this.DataModel.Geometry.Point2D,category:"Geometry"},{name:"Polyline",object:this.DataModel.Geometry.Polyline,category:"Geometry"},{name:"Polyline2D",object:this.DataModel.Geometry.Polyline2D,category:"Geometry"},{name:"Polygon",object:this.DataModel.Geometry.Polygon,category:"Geometry"},{name:"Polygon2D",object:this.DataModel.Geometry.Polygon2D,category:"Geometry"}]),this.RegisterObj.Register([{name:"Material",object:this.DataModel.Material,category:"Material"}]),this.RegisterObj.Register([{name:"LocalGeoReference",object:this.DataModel.LocalGeoReference,category:"data"},{name:"GeoReference",object:this.DataModel.GeoReference,category:"data"}]),this.RegisterObj.Register([{name:"Bound",object:this.Scene.Covering.Bound,category:"Covering"},{name:"Range",object:this.Scene.Covering.Range,category:"Covering"},{name:"Poi",object:this.Scene.Covering.Poi,category:"Covering"},{name:"Path",object:this.Scene.Covering.Path,category:"Covering"},{name:"Text3D",object:this.Scene.Covering.Text3D,category:"Covering"},{name:"Particle",object:this.Scene.Covering.Particle,category:"Covering"},{name:"HighlightArea",object:this.Scene.Covering.HighlightArea,category:"Covering"},{name:"HeatMap",object:this.Scene.Covering.HeatMap,category:"Covering"},{name:"ColumnarHeatMap",object:this.Scene.Covering.ColumnarHeatMap,category:"Covering"},{name:"Window",object:this.Scene.Covering.Window,category:"Covering"},{name:"Viewshed",object:this.Scene.Covering.Viewshed,category:"Covering"},{name:"Parabola",object:this.Scene.Covering.Parabola,category:"Covering"},{name:"Raster",object:this.Scene.Covering.Raster,category:"Covering"},{name:"RoadHeatMap",object:this.Scene.Covering.RoadHeatMap,category:"Covering"},{name:"RealTimeVideo",object:this.Scene.Covering.RealTimeVideo,category:"Covering"},{name:"SpaceHeatMap",object:this.Scene.Covering.SpaceHeatMap,category:"Covering"},{name:"Light",object:this.Scene.Covering.Light,category:"Covering"}]),this.RegisterObj.Register([{name:"Static",object:this.Scene.Model.Static,category:"Model"},{name:"Hierarchy",object:this.Scene.Model.Hierarchy,category:"Model"},{name:"Skeletal",object:this.Scene.Model.Skeletal,category:"Model"},{name:"Effects",object:this.Scene.Effects,category:"Model"},{name:"Vegetation",object:this.Scene.Model.Vegetation,category:"Model"},{name:"ModelerEmbank",object:this.Scene.Model.ModelerEmbank,category:"Model"},{name:"ModelerWater",object:this.Scene.Model.ModelerWater,category:"Model"},{name:"ModelerRiver",object:this.Scene.Model.ModelerRiver,category:"Model"},{name:"ModelerFence",object:this.Scene.Model.ModelerFence,category:"Model"},{name:"ModelerFloor",object:this.Scene.Model.ModelerFloor,category:"Model"},{name:"ProjectModel",object:this.Scene.Model.ProjectModel,category:"Model"},{name:"ProjectInstance",object:this.Scene.Model.ProjectInstance,category:"Model"},{name:"StaticInstance",object:this.Scene.Model.StaticInstance,category:"Model"}]),this.RegisterObj.Register([{name:"Outliner",object:this.Scene.Outliner,category:"other"},{name:"Group",object:this.Scene.Group,category:"other"}]),this.RegisterObj.Register([{name:"Tiles",object:this.Scene.Tiles,category:"Tiles"},{name:"TilesNode",object:this.Scene.TilesNode,category:"Tiles"},{name:"EarthTiles",object:this.Scene.EarthTiles,category:"Tiles"},{name:"Project",object:this.Scene.Project,category:"Tiles"}]),this.RegisterObj.Register([{name:"Environment",object:this.Environment,category:"Environment"}]),this.RegisterObj.Register([{name:"Camera",object:this.CameraPreset,category:"Camera"},{name:"CameraRoam",object:this.CameraRoams,category:"Camera"},{name:"CameraStart",object:this.CameraStart,category:"Camera"}]),this.registerEvent([{name:"onLargeDataCallback_system",func:this.handleDataChannelMessage}]),this.registerSceneEvent([{name:"OnWdpSceneChanged_system",func:this.OnWdpSceneChanged},{name:"OnEntityClicked_system",func:this.OnEntityClicked},{name:"OnEntityDbClicked_system",func:this.OnEntityDbClicked},{name:"OnMouseEnterEntity_system",func:this.OnMouseEnterEntity},{name:"OnMouseOutEntity_system",func:this.OnMouseOutEntity},{name:"OnEntityAdded_system",func:this.OnEntityAdded},{name:"OnEntityRemoved_system",func:this.OnEntityRemoved},{name:"OnEntityUpdated_system",func:this.OnEntityUpdated},{name:"OnEntitySelectionChanged_system",func:this.OnEntitySelectionChanged},{name:"OnWdpSceneIsReady_system",func:this.OnWdpSceneIsReady},{name:"OnEntityNodeSelectionChanged_system",func:this.OnEntityNodeSelectionChanged},{name:"OnMoveAlongPathEndEvent_system",func:this.OnMoveAlongPathEnd},{name:"OnMoveAlongPathProcessEvent_system",func:this.OnMoveAlongPathProcessEvent},{name:"OnCameraMotionStartEvent_system",func:this.OnCameraMotionStartEvent},{name:"OnCameraMotionEndEvent_system",func:this.OnCameraMotionEndEvent},{name:"OnEntityReady_system",func:this.OnEntityReady},{name:"OnVegetationCreating_system",func:this.OnVegetationCreating},{name:"OnVegetationCreated_system",func:this.OnVegetationCreated},{name:"OnWdpMaterialHit_system",func:this.OnWdpMaterialHit},{name:"OnRealTimeVideoEvent_system",func:this.OnRealTimeVideoEvent},{name:"OnCameraRoamingFrame_system",func:this.OnCameraRoamingFrame},{name:"OnEntityGraphicsReady_system",func:this.OnEntityGraphicsReady}]),this.registerSceneEvents([{name:"OnClusterResultEvent_private",func:this.OnClusterResultEvent}])}initLog(){this.brandingShow?(console.log("%c ",'background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNC4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxMjAwIDQwNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIwMCA0MDQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MHtmaWxsOnVybCgjU1ZHSURfMV8pO30NCjwvc3R5bGU+DQo8Zz4NCgk8cmVjdCB4PSIxMTE0IiB5PSI3MCIgd2lkdGg9IjM0LjEiIGhlaWdodD0iMTkzLjEiLz4NCgk8cGF0aCBkPSJNNjM4LjEsMjg5LjFjLTEuOC0xLTMuOS0xLjUtNi4zLTEuNWgtMTMuNHYzNi42aDYuOXYtMTIuOGg2LjVjMi40LDAsNC41LTAuNSw2LjMtMS41czMuMi0yLjQsNC4yLTQuMg0KCQljMS0xLjgsMS41LTMuOSwxLjUtNi4yYzAtMi40LTAuNS00LjQtMS41LTYuMkM2NDEuMywyOTEuNSw2MzkuOSwyOTAuMSw2MzguMSwyODkuMXogTTYzNS4yLDMwNC4zYy0xLjIsMS4xLTIuOCwxLjctNC45LDEuN2gtNC45DQoJCXYtMTNoNC45YzIuMSwwLDMuNywwLjYsNC45LDEuN3MxLjcsMi43LDEuNyw0LjhTNjM2LjMsMzAzLjIsNjM1LjIsMzA0LjN6Ii8+DQoJPHBhdGggZD0iTTY2Ny43LDI5OC4yYy0yLTEuMi00LjItMS44LTYuNy0xLjhzLTQuNywwLjYtNi44LDEuOGMtMiwxLjItMy42LDIuOS00LjcsNWMtMS4xLDIuMi0xLjcsNC42LTEuNyw3LjRzMC42LDUuMywxLjcsNy40DQoJCWMxLjEsMi4xLDIuNywzLjgsNC43LDVzNC4zLDEuOCw2LjgsMS44czQuOC0wLjYsNi43LTEuOGMyLTEuMiwzLjYtMi44LDQuNy01YzEuMS0yLjIsMS43LTQuNiwxLjctNy40cy0wLjYtNS4zLTEuNy03LjQNCgkJQzY3MS4yLDMwMS4xLDY2OS42LDI5OS40LDY2Ny43LDI5OC4yeiBNNjY1LjcsMzE3LjJjLTEuMiwxLjctMi44LDIuNS00LjgsMi41cy0zLjYtMC44LTQuOC0yLjVzLTEuOC0zLjktMS44LTYuNg0KCQljLTAuMS0yLjcsMC41LTQuOSwxLjgtNi42YzEuMi0xLjcsMi44LTIuNSw0LjgtMi41czMuNiwwLjksNC44LDIuNWMxLjIsMS43LDEuOCwzLjksMS44LDYuNlM2NjYuOSwzMTUuNSw2NjUuNywzMTcuMnoiLz4NCgk8cG9seWdvbiBwb2ludHM9IjcwNy4xLDMxOC4zIDcwMS42LDI5NyA2OTQuMSwyOTcgNjg4LjYsMzE4LjMgNjg0LjEsMjk3IDY3Ny42LDI5NyA2ODQuOCwzMjQuMiA2OTIuMywzMjQuMiA2OTcuNywzMDIuOSANCgkJNzAzLjIsMzI0LjIgNzEwLjYsMzI0LjIgNzE3LjgsMjk3IDcxMS42LDI5NyAJIi8+DQoJPHBhdGggZD0iTTc0MC41LDI5OC4yYy0xLjktMS4yLTQuMS0xLjgtNi42LTEuOGMtMi40LDAtNC41LDAuNi02LjUsMS44Yy0xLjksMS4yLTMuNCwyLjktNC41LDVzLTEuNyw0LjYtMS43LDcuNHMwLjUsNS4yLDEuNiw3LjQNCgkJYzEuMSwyLjEsMi43LDMuOCw0LjcsNXM0LjQsMS44LDcuMiwxLjhjNS41LDAsOS4yLTIuMSwxMS02LjRsLTUuMy0yLjVjLTAuNSwxLjItMS4yLDIuMi0yLjEsMi45Yy0wLjksMC43LTIuMSwxLTMuNywxDQoJCWMtMiwwLTMuNi0wLjYtNC44LTEuOXMtMS45LTMuMS0yLjEtNS41aDE4LjVjMC4xLTAuNSwwLjEtMS4xLDAuMS0xLjdjMC0yLjktMC41LTUuNC0xLjUtNy41Qzc0My44LDMwMS4xLDc0Mi40LDI5OS40LDc0MC41LDI5OC4yeg0KCQkgTTcyNy45LDMwNy44YzAuMy0yLDEtMy42LDItNC42YzEuMS0xLjEsMi40LTEuNiw0LTEuNmMxLjcsMCwzLjEsMC41LDQuMSwxLjZjMC45LDAuOSwxLjUsMi41LDEuOCw0LjZINzI3Ljl6Ii8+DQoJPHBhdGggZD0iTTc2MC42LDI5Ny43Yy0xLjMsMC44LTIuNCwyLjEtMy4yLDMuN2MtMC4xLTItMC4yLTMuNC0wLjMtNC4zaC01LjZjMC4xLDEuNiwwLjIsMy43LDAuMiw2LjJ2MjAuOWg2LjR2LTE0LjgNCgkJYzAtMi4zLDAuNi00LjEsMS44LTUuM2MxLjItMS4zLDIuOC0xLjksNC44LTEuOWMwLjYsMCwxLjMsMC4xLDIsMC4ydi01LjdjLTAuNC0wLjItMC45LTAuMy0xLjctMC4zDQoJCUM3NjMuNCwyOTYuNCw3NjEuOSwyOTYuOSw3NjAuNiwyOTcuN3oiLz4NCgk8cGF0aCBkPSJNNzg5LjUsMjk4LjJjLTEuOS0xLjItNC4xLTEuOC02LjYtMS44Yy0yLjQsMC00LjUsMC42LTYuNSwxLjhjLTEuOSwxLjItMy40LDIuOS00LjUsNXMtMS43LDQuNi0xLjcsNy40czAuNSw1LjIsMS42LDcuNA0KCQljMS4xLDIuMSwyLjcsMy44LDQuNyw1czQuNCwxLjgsNy4yLDEuOGM1LjUsMCw5LjItMi4xLDExLTYuNGwtNS4zLTIuNWMtMC41LDEuMi0xLjIsMi4yLTIuMSwyLjljLTAuOSwwLjctMi4xLDEtMy43LDENCgkJYy0yLDAtMy42LTAuNi00LjgtMS45Yy0xLjEtMS4zLTEuOS0zLjEtMi4xLTUuNWgxOC41YzAuMS0wLjUsMC4xLTEuMSwwLjEtMS43YzAtMi45LTAuNS01LjQtMS41LTcuNQ0KCQlDNzkyLjgsMzAxLjEsNzkxLjQsMjk5LjQsNzg5LjUsMjk4LjJ6IE03NzYuOSwzMDcuOGMwLjMtMiwxLTMuNiwyLTQuNmMxLjEtMS4xLDIuNC0xLjYsNC0xLjZjMS43LDAsMy4xLDAuNSw0LjEsMS42DQoJCWMxLDAuOSwxLjYsMi41LDEuOCw0LjZINzc2Ljl6Ii8+DQoJPHBhdGggZD0iTTgyNiwyODZoLTYuNHYxNC4yYy0xLTEuMi0yLjItMi4yLTMuNi0yLjhjLTEuNC0wLjYtMy0xLTQuNy0xYy0yLjEsMC00LjEsMC42LTUuOCwxLjhjLTEuOCwxLjItMy4yLDIuOS00LjIsNQ0KCQlzLTEuNSw0LjYtMS41LDcuNHMwLjUsNS4yLDEuNSw3LjRjMSwyLjEsMi40LDMuOCw0LjIsNXMzLjcsMS44LDUuOCwxLjhjMS45LDAsMy42LTAuNCw1LjEtMS4yYzEuNi0wLjgsMi44LTEuOSwzLjgtMy40DQoJCWMwLDEuOCwwLjEsMy4yLDAuMyw0aDUuN2MtMC4yLTEuNi0wLjItMy43LTAuMi02LjJMODI2LDI4Nkw4MjYsMjg2eiBNODE3LjcsMzE3LjJjLTEuMiwxLjctMi45LDIuNS00LjksMi41DQoJCWMtMS4zLDAtMi41LTAuNC0zLjUtMS4xcy0xLjgtMS44LTIuNC0zLjJjLTAuNi0xLjQtMC44LTMtMC44LTQuOHMwLjMtMy40LDAuOC00LjhjMC42LTEuNCwxLjMtMi40LDIuNC0zLjJjMS0wLjgsMi4yLTEuMSwzLjUtMS4xDQoJCWMyLjEsMCwzLjcsMC44LDQuOSwyLjVzMS45LDMuOSwxLjksNi42UzgxOSwzMTUuNSw4MTcuNywzMTcuMnoiLz4NCgk8cGF0aCBkPSJNODY1LjksMjk4LjJjLTEuOC0xLjItMy43LTEuOC01LjgtMS44Yy0xLjcsMC0zLjMsMC4zLTQuNywxcy0yLjYsMS42LTMuNiwyLjh2LTE0LjFoLTYuNHYzMmMwLDIuNS0wLjEsNC42LTAuMiw2LjJoNS43DQoJCWMwLjItMSwwLjMtMi4zLDAuMy0zLjljMSwxLjUsMi4yLDIuNiwzLjgsMy40YzEuNSwwLjgsMy4yLDEuMiw1LjEsMS4yYzIuMSwwLDQuMS0wLjYsNS44LTEuOGMxLjgtMS40LDMuMS0zLDQuMi01LjINCgkJYzEtMi4xLDEuNS00LjYsMS41LTcuNHMtMC41LTUuMi0xLjUtNy40Qzg2OS4xLDMwMSw4NjcuNywyOTkuMyw4NjUuOSwyOTguMnogTTg2My4zLDMxNy4yYy0xLjIsMS43LTIuOSwyLjUtNC45LDIuNQ0KCQlzLTMuNi0wLjgtNC44LTIuNXMtMS44LTMuOS0xLjgtNi42czAuNi01LDEuOC02LjZjMS4yLTEuNywyLjgtMi41LDQuOC0yLjVjMi4xLDAsMy43LDAuOCw0LjksMi41czEuOSwzLjksMS45LDYuNg0KCQlTODY0LjYsMzE1LjUsODYzLjMsMzE3LjJ6Ii8+DQoJPHBvbHlnb24gcG9pbnRzPSI4ODguNiwzMTguNSA4ODIsMjk3IDg3NC43LDI5NyA4ODUuNiwzMjQuOCA4ODEuMSwzMzQuMiA4ODguMiwzMzQuMiA5MDEuOCwyOTcgODk0LjgsMjk3IAkiLz4NCgk8cGF0aCBkPSJNOTM3LjcsMzAyLjhjLTEuNy0xLTMuNy0xLjUtNS45LTEuNWMtMS42LDAtMy4zLDAuNS01LDEuNWwxLTkuOGgxNHYtNS40aC0xOS42bC0yLDIwLjNsNS4zLDEuNGMwLjUtMC44LDEuMS0xLjQsMi0xLjkNCgkJczItMC43LDMuMy0wLjdjMS44LDAsMy4zLDAuNSw0LjUsMS43YzEuMSwxLjEsMS43LDIuNiwxLjcsNC41cy0wLjUsMy41LTEuNyw0LjdjLTEuMSwxLjItMi43LDEuOC00LjYsMS44Yy0xLjcsMC0zLjEtMC40LTQuMy0xLjMNCgkJYy0xLjItMC44LTIuMS0yLTIuNy0zLjZsLTQuOCwyLjljMC43LDIuMSwyLDMuOSw0LjEsNS4zYzIsMS40LDQuNiwyLjEsNy42LDIuMWMyLjUsMCw0LjctMC41LDYuNi0xLjVjMi0xLDMuNC0yLjQsNC41LTQuMg0KCQljMS4xLTEuOCwxLjYtMy45LDEuNi02LjJjMC0yLjItMC40LTQuMi0xLjYtNS45Qzk0MC44LDMwNS4yLDkzOS40LDMwMy44LDkzNy43LDMwMi44eiIvPg0KCTxwb2x5Z29uIHBvaW50cz0iOTQ4LjYsMjkzIDk0OC42LDI5OS42IDk1Ni4yLDI5NS4yIDk1Ni4yLDMyNC4yIDk2Mi44LDMyNC4yIDk2Mi44LDI4Ny42IDk1Ny45LDI4Ny42IAkiLz4NCgk8cG9seWdvbiBwb2ludHM9IjEwMDMuNiwzMTYuMSA5OTYuNywyODcuNiA5ODkuNiwyODcuNiA5ODIuNywzMTYuMSA5NzYuNywyODcuNiA5NjkuNSwyODcuNiA5NzguOCwzMjQuMiA5ODYsMzI0LjIgOTkzLjEsMjk2IA0KCQkxMDAwLjEsMzI0LjIgMTAwNy4zLDMyNC4yIDEwMTYuNiwyODcuNiAxMDA5LjYsMjg3LjYgCSIvPg0KCTxwYXRoIGQ9Ik0xMDQ1LjUsMjg5LjNjLTIuNS0xLjYtNS41LTIuNC04LjctMi40Yy0zLjMsMC02LjIsMC44LTguNywyLjRzLTQuNSwzLjgtNS45LDYuN3MtMi4xLDYuMi0yLjEsOS45YzAsMy43LDAuNyw3LDIuMSw5LjkNCgkJYzEuNCwyLjgsMy40LDUuMSw1LjksNi43czUuNCwyLjQsOC43LDIuNGMzLjMsMCw2LjItMC44LDguNy0yLjRjMi42LTEuNiw0LjUtMy44LDUuOS02LjdjMS40LTIuOSwyLjEtNi4yLDIuMS05LjkNCgkJYzAtMy43LTAuNy03LTIuMS05LjlTMTA0OCwyOTAuOSwxMDQ1LjUsMjg5LjN6IE0xMDQ1LjUsMzEyLjhjLTAuOSwyLTIsMy42LTMuNSw0LjdzLTMuMiwxLjctNS4xLDEuN3MtMy42LTAuNi01LjEtMS43DQoJCXMtMi42LTIuNy0zLjUtNC43Yy0wLjgtMi0xLjItNC4zLTEuMi02LjlzMC40LTQuOSwxLjItNi45YzAuOC0yLDItMy42LDMuNS00LjdzMy4yLTEuNyw1LjEtMS43czMuNiwwLjYsNS4xLDEuN3MyLjcsMi43LDMuNSw0LjcNCgkJczEuMiw0LjMsMS4yLDYuOVMxMDQ2LjMsMzEwLjgsMTA0NS41LDMxMi44eiIvPg0KCTxwYXRoIGQ9Ik0xMDgzLjIsMzA1LjljMS40LTEuOSwyLjEtNC4zLDIuMS03LjFjMC0yLjItMC41LTQuMi0xLjQtNS45Yy0wLjktMS43LTIuMi0zLTMuOS0zLjljLTEuNy0wLjktMy42LTEuNC01LjktMS40aC0xNC43djM2LjYNCgkJaDYuOXYtMTQuMWgzLjhsOS4xLDE0LjFoOC4zbC0xMC4yLTE0LjVDMTA3OS44LDMwOS4xLDEwODEuNywzMDcuOSwxMDgzLjIsMzA1Ljl6IE0xMDcyLjQsMzA0LjdoLTYuMlYyOTNoNi4yDQoJCWMxLjgsMCwzLjMsMC41LDQuMywxLjVzMS41LDIuNCwxLjUsNC4zcy0wLjUsMy4zLTEuNSw0LjNDMTA3NS43LDMwNC4yLDEwNzQuMywzMDQuNywxMDcyLjQsMzA0Ljd6Ii8+DQoJPHBvbHlnb24gcG9pbnRzPSIxMDk4LjIsMjg3LjYgMTA5MS4zLDI4Ny42IDEwOTEuMywzMjQuMiAxMTEzLjQsMzI0LjIgMTExMy40LDMxOC41IDEwOTguMiwzMTguNSAJIi8+DQoJPHBhdGggZD0iTTExNDYuOSwyOTYuM2MtMS4zLTIuOC0zLjItNC45LTUuNy02LjRzLTUuMy0yLjMtOC42LTIuM2gtMTR2MzYuNmgxNGMzLjMsMCw2LjItMC44LDguNi0yLjNjMi41LTEuNCw0LjQtMy42LDUuNy02LjMNCgkJYzEuMy0yLjgsMi02LDItOS43UzExNDguMiwyOTksMTE0Ni45LDI5Ni4zeiBNMTEzOS4yLDMxNWMtMS45LDIuMy00LjUsMy40LTcuOSwzLjRoLTUuOHYtMjVoNS44YzMuNCwwLDYsMS4xLDcuOSwzLjQNCgkJYzEuOSwyLjIsMi44LDUuMywyLjgsOS4xUzExNDEuMSwzMTIuOCwxMTM5LjIsMzE1eiIvPg0KCTxwYXRoIGQ9Ik0xMDcyLjUsMTM1LjJjMC05LjgtMS4xLTIzLjctOC4zLTM4LjljLTYuMS0xMS4xLTEzLjItMTkuNy0yMy44LTIzLjJjLTYuMi0yLjEtMTYuNi0zLjEtMzEuMi0zLjFoLTc5Ljl2MTkyLjhsMzQuMS02LjQNCgkJbC0wLjQtNjEuMmg1NC43YzkuMywwLDE2LjYtMC44LDIyLTIuNGM1LjMtMS42LDE0LjktNy4xLDIyLjQtMTlDMTA2OS43LDE2MS44LDEwNzIuNSwxNDMuNCwxMDcyLjUsMTM1LjJ6IE0xMDI3LjIsMTU2DQoJCWMtMy4zLDMtOS4yLDQuNS0xNy41LDQuNWgtNDYuM3YtNTYuNGg0N2M2LDAsMTAuMywwLjYsMTMsMS45YzcuNSwzLjUsMTEuMywxMy4yLDExLjMsMjUuNkMxMDM0LjcsMTQzLjEsMTAzMi4yLDE1MS40LDEwMjcuMiwxNTZ6Ig0KCQkvPg0KCTxwb2x5Z29uIHBvaW50cz0iODAxLDExNi40IDg0Ny40LDI2Mi45IDg4Ny4zLDI2Mi44IDgyMS40LDY5LjggNzgxLjYsNjkuOCA3MTQuMiwyNjIuOCA3NTQuNywyNjIuOCAJIi8+DQoJPHBhdGggZD0iTTY2My40LDEzNWMwLTkuOC0xLjEtMjMuNy04LjMtMzguOUM2NDksODUsNjQxLjksNzYuNCw2MzEuMyw3Mi45Yy02LjItMi4xLTE2LjYtMy4xLTMxLjItMy4xaC03OS45djE5Mi44bDM0LjEtNi40DQoJCWwtMC40LTYxLjJoNTQuN2M5LjMsMCwxNi42LTAuOCwyMi0yLjRjNS4zLTEuNiwxNC45LTcuMSwyMi40LTE5QzY2MC42LDE2MS42LDY2My40LDE0My4yLDY2My40LDEzNXogTTYxOC4xLDE1NS44DQoJCWMtMy4zLDMtOS4yLDQuNS0xNy41LDQuNWgtNDYuM3YtNTYuNGg0N2M2LDAsMTAuMywwLjYsMTMsMS45YzcuNSwzLjUsMTEuMywxMy4yLDExLjMsMjUuNkM2MjUuNiwxNDIuOSw2MjMuMSwxNTEuMiw2MTguMSwxNTUuOHoiDQoJCS8+DQoJPHBvbHlnb24gcG9pbnRzPSIyMzcuNywyMTcuNiAyMDIuMSw2OS44IDE2Miw2OS44IDEyNi41LDIxNy42IDg4LjQsNjkuOCA1MS4xLDY5LjggMTA2LDI2Ni4yIDE0Ny4xLDI2Ni4yIDE4MiwxMjQuNiAyMTcuMSwyNjYuMiANCgkJMjU4LjMsMjY2LjIgMzEyLjksNjkuOCAyNzUuOCw2OS44IAkiLz4NCgk8cGF0aCBkPSJNNDEwLjgsNjkuOGgtNzAuNXYxMzEuOWgzNC40di05My4zaDM1LjhjMTMuOSwwLDI0LDMuMiwzMC41LDkuNmM0LjQsNC41LDkuMiw5LjgsMTIsMTljMi43LDkuMiwzLjYsMjAuNywzLjYsMzEuOA0KCQljMCwxMC0wLjksMjAuMi0zLjIsMjljLTIuMiw4LjUtNi40LDE0LTEwLjEsMTguOGMtMC4yLDAuMi0wLjMsMC40LTAuNSwwLjZjLTYuMSw3LjctMjIuNCwxMC0zMi4zLDEwaC03MC4ydjM5aDcyLjUNCgkJYzE0LjUtMC4xLDIwLjItMC42LDMxLjktMy43YzExLjctMy4yLDM1LjQtMjIuMyw0MS41LTQ1YzQuMy0xNS43LDYuNy0zMS44LDYuNy00OS41YzAtMTcuOC0yLjEtMzQuNS02LjctNTAuMg0KCQlDNDc0LjYsNzguNCw0MzguMyw2OS44LDQxMC44LDY5Ljh6Ii8+DQoJDQoJCTxsaW5lYXJHcmFkaWVudCBpZD0iU1ZHSURfMV8iIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iODYwLjMzMDUiIHkxPSItNTMzLjcxMTUiIHgyPSI3NDUuNDg1IiB5Mj0iLTY0Mi4yNjc4IiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDAgLTM5MS44ODk4KSI+DQoJCTxzdG9wICBvZmZzZXQ9IjAiIHN0eWxlPSJzdG9wLWNvbG9yOiNCQThDRkYiLz4NCgkJPHN0b3AgIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6Izc0NTZFOSIvPg0KCTwvbGluZWFyR3JhZGllbnQ+DQoJPHBhdGggY2xhc3M9InN0MCIgZD0iTTcxNC4yLDI2Mi42Yy0wLjEsMC4xLDUzLjIsMC40LDUzLjUsMC4zYzM3LjMtOTUuOCwxNTQuNC0xMzkuNSwxNTQuNC0xMzkuNVM3NjkuMSwxMzYuNyw3MTQuMiwyNjIuNg0KCQlMNzE0LjIsMjYyLjZ6Ii8+DQo8L2c+DQo8L3N2Zz4NCg=="); background-size: cover; padding: 50px 200px;'),console.group(`%c 🌍 ${Qo.company} -- ${Qo.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${Qo.version}`),console.log("%c 🌟 Updated","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",Qo.updated),console.log("%c 🌟 Author","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",Qo.author),console.log("%c 🌟 Company","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",Qo.company),console.log("%c 🌟 Document","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",Qo.document),console.groupEnd()):(console.log("%c 🌟 Version","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",`V${Qo.version}`),console.log("%c 🌟 Updated","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",Qo.updated))}setAgentHost(e){this.agentHost=e}registerSceneEvents(e){if(this.UeEvents.push(...e),this.sceneIsReady){const t=e.filter(e=>!e.sync).map(e=>e.name.split("_private")[0]),o=Array.from(new Set(t));this.System.ToggleAPIEventChannel(o.map(e=>({eventName:e,bOpen:!0})))}}registerSceneEvent(e){if(e.forEach(e=>{this.UeEvent.set(e.name,e)}),this.sceneIsReady){const t=e.map(e=>e.name),o=Array.from(new Set(t));this.System.ToggleAPIEventChannel(o.map(e=>({eventName:e,bOpen:!0})))}}unRegisterSceneEvent(e){if(e.forEach(e=>{this.UeEvent.delete(e)}),this.sceneIsReady){const t=[],o=e;Array.from(new Set(o)).forEach(e=>{const o=this.UeEvents.filter(t=>t.name.indexOf(`${e}_private`)>=0&&!t.sync),i=this.UeEvents.filter(t=>t.name===e);this.highLevelLog("UnRegister Func list (private, users)",o,i),0===o.length&&0===i.length&&t.push(e)}),t.length>0&&this.System.ToggleAPIEventChannel(t.map(e=>({eventName:e,bOpen:!1})))}}unRegisterSceneEvents(e){if(this.UeEvents=this.UeEvents.filter(t=>e.findIndex(e=>t.name===e)<0),this.sceneIsReady){const t=[],o=e;Array.from(new Set(o)).forEach(e=>{const o=e.split("_private")[0],i=this.UeEvents.filter(e=>e.name.indexOf(`${o}_private`)>=0&&!e.sync),n=this.UeEvent.get(o),r=this.UeEvents.filter(e=>e.name===o);this.highLevelLog("UnRegister Func list (private, user, users)",i,n,r),0!==i.length||0!==r.length||n||t.push(o)}),t.length>0&&this.System.ToggleAPIEventChannel(t.map(e=>({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 t(this,void 0,void 0,function*(){const 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]),o=Array.from(new Set(e.concat(t)));yield this.System.ToggleAPIEventChannel(o.map(e=>({eventName:e,bOpen:!0})))})}generateDebugRTC(){const e=document.getElementById(this.id),t=document.createElement("div");t.id="playerDebugRTC",t.style.padding="10px",t.style.position="fixed",t.style.left="0",t.style.bottom="0",t.style.zIndex="100000",t.style.color="white",t.style.background="rgba(0, 0, 0, 0.7)",t.style.border="#ccc solid 1px",t.style.width="240px",t.style.overflowX="auto",setInterval(()=>{!0===(null===window||void 0===window?void 0:window.debugRTC)?this.Renderer.GetStats().then(o=>{var i,n,r,a,s,l,d,c,u,v,h,m,g;e.querySelector("#playerDebugRTC")||e.appendChild(t),console.log("RTC Stats:",o);const f=new Intl.NumberFormat(window.navigator.language,{maximumFractionDigits:0}),y=new Intl.NumberFormat(window.navigator.language,{maximumFractionDigits:0,minimumIntegerDigits:2});let b=(o.result.timestamp-o.result.timestampStart)/1e3;const p=[],E=[60,60];for(let e=0;e<E.length;e++)p.push(b%E[e]),b/=E[e];p.push(b);const w=p[0],I=Math.floor(p[1]),j=Math.floor(p[2]);let S="B",C=void 0!==(null===(i=o.result)||void 0===i?void 0:i.bytesReceived)?o.result.bytesReceived:0;const G=["kB","MB","GB"];for(let e=0;e<G.length&&!(C<1e5);e++)C/=1e3,S=G[e];t.innerHTML=`\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Codec:</div>\n <div>${void 0!==(null===(n=o.result)||void 0===n?void 0:n.video_codec)?o.result.video_codec:"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Latency (ms):</div>\n <div>${void 0!==(null===(r=o.result)||void 0===r?void 0:r.currentRoundTripTime)?f.format(1e3*o.result.currentRoundTripTime):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Duration:</div>\n <div>${y.format(j)}:${y.format(I)}:${y.format(w)}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Received (${S}):</div>\n <div>${f.format(C)}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Frames Decoded:</div>\n <div>${void 0!==(null===(a=o.result)||void 0===a?void 0:a.framesDecoded)?f.format(o.result.framesDecoded):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Packets Lost:</div>\n <div>${void 0!==(null===(s=o.result)||void 0===s?void 0:s.packetsLost)?f.format(o.result.packetsLost):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Bitrate (Mbps):</div>\n <div>${void 0!==(null===(l=o.result)||void 0===l?void 0:l.bitrate)?(o.result.bitrate/1e3).toFixed(2):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Low Bitrate (Mbps):</div>\n <div>${void 0!==(null===(d=o.result)||void 0===d?void 0:d.lowBitrate)?(o.result.lowBitrate/1e3).toFixed(2):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>High Bitrate (Mbps):</div>\n <div>${void 0!==(null===(c=o.result)||void 0===c?void 0:c.highBitrate)?(o.result.highBitrate/1e3).toFixed(2):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>AVG Bitrate (Mbps):</div>\n <div>${void 0!==(null===(u=o.result)||void 0===u?void 0:u.avgBitrate)?(o.result.avgBitrate/1e3).toFixed(2):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Framerate:</div>\n <div>${void 0!==(null===(v=o.result)||void 0===v?void 0:v.framerate)?f.format(o.result.framerate):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>Low Framerate:</div>\n <div>${void 0!==(null===(h=o.result)||void 0===h?void 0:h.lowFramerate)?f.format(o.result.lowFramerate):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>High Framerate:</div>\n <div>${void 0!==(null===(m=o.result)||void 0===m?void 0:m.highFramerate)?f.format(o.result.highFramerate):"N/A"}</div>\n </div>\n <div style="display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;">\n <div>AVG Framerate:</div>\n <div>${void 0!==(null===(g=o.result)||void 0===g?void 0:g.avgframerate)?f.format(o.result.avgframerate):"N/A"}</div>\n </div>\n `}):e.querySelector("#playerDebugRTC")&&t.remove()},1e3)}}}(CloudApi);