iclient-mapboxgl-es6.min.js 810 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722
  1. /*!
  2. *
  3. * iclient-mapboxgl.(https://iclient.supermap.io)
  4. * Copyright© 2000 - 2020 SuperMap Software Co.Ltd
  5. * license: Apache-2.0
  6. * version: v10.1.0
  7. *
  8. */!function(e){var t={};function s(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,s),i.l=!0,i.exports}s.m=e,s.c=t,s.d=function(e,t,r){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(r,i,function(t){return e[t]}.bind(null,i));return r},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=11)}([function(e,t){e.exports=mapboxgl},function(e,t){e.exports=function(){try{return mapv}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return THREE}catch(e){return{}}}()},function(e,t){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(e){"object"==typeof window&&(s=window)}e.exports=s},function(e,t,s){var r,i,a;i=[t,e],void 0===(a="function"==typeof(r=function(e,t){"use strict";var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,n=t.timeout||s.timeout,o=t.jsonpCallback||s.jsonpCallback,l=void 0;return new Promise(function(s,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){s({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(c),r(u)},a+=-1===a.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+o+"="+u),t.charset&&d.setAttribute("charset",t.charset),d.id=c,document.getElementsByTagName("head")[0].appendChild(d),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),r(u),i(c),window[u]=function(){r(u)}},n),d.onerror=function(){h(new Error("JSONP request to "+e+" failed")),r(u),i(c),l&&clearTimeout(l)}})}})?r.apply(t,i):r)||(e.exports=a)},function(e,t){e.exports=function(){try{return XLSX}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return convert}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return elasticsearch}catch(e){return{}}}()},function(e,t,s){(function(t){var s=9007199254740991,r="[object Arguments]",i="[object Function]",a="[object GeneratorFunction]",n="[object Map]",o="[object Set]",l=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")();function p(e,t){return function(e,t){for(var s=-1,r=e?e.length:0,i=Array(r);++s<r;)i[s]=t(e[s],s,e);return i}(t,function(t){return[t,e[t]]})}var m,f,y,g=Function.prototype,v=Object.prototype,S=d["__core-js_shared__"],b=(m=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",x=g.toString,C=v.hasOwnProperty,T=v.toString,_=RegExp("^"+x.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=v.propertyIsEnumerable,A=(f=Object.keys,y=Object,function(e){return f(y(e))}),w=U(d,"DataView"),P=U(d,"Map"),L=U(d,"Promise"),O=U(d,"Set"),M=U(d,"WeakMap"),N=j(w),I=j(P),F=j(L),R=j(O),D=j(M);function k(e,t){var s=V(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&W(e)}(e)&&C.call(e,"callee")&&(!E.call(e,"callee")||T.call(e)==r)}(e)?function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}(e.length,String):[],i=s.length,a=!!i;for(var n in e)!t&&!C.call(e,n)||a&&("length"==n||H(n,i))||s.push(n);return s}function B(e){return!(!q(e)||b&&b in e)&&(z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?_:l).test(j(e))}function G(e){if(s=(t=e)&&t.constructor,r="function"==typeof s&&s.prototype||v,t!==r)return A(e);var t,s,r,i=[];for(var a in Object(e))C.call(e,a)&&"constructor"!=a&&i.push(a);return i}function U(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return B(s)?s:void 0}var J=function(e){return T.call(e)};function H(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}function j(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(w&&"[object DataView]"!=J(new w(new ArrayBuffer(1)))||P&&J(new P)!=n||L&&"[object Promise]"!=J(L.resolve())||O&&J(new O)!=o||M&&"[object WeakMap]"!=J(new M))&&(J=function(e){var t=T.call(e),s="[object Object]"==t?e.constructor:void 0,r=s?j(s):void 0;if(r)switch(r){case N:return"[object DataView]";case I:return n;case F:return"[object Promise]";case R:return o;case D:return"[object WeakMap]"}return t});var V=Array.isArray;function W(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&!z(e)}function z(e){var t=q(e)?T.call(e):"";return t==i||t==a}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Y,Q=(Y=function(e){return W(e)?k(e):G(e)},function(e){var t,s,r,i=J(e);return i==n?(t=e,s=-1,r=Array(t.size),t.forEach(function(e,t){r[++s]=[t,e]}),r):i==o?function(e){var t=-1,s=Array(e.size);return e.forEach(function(e){s[++t]=[e,e]}),s}(e):p(e,Y(e))});e.exports=Q}).call(this,s(3))},function(e,t){e.exports=function(){try{return echarts}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return canvg}catch(e){return{}}}()},function(e,t,s){s(18),e.exports=s(17)},function(e,t,s){(function(e,t){(function(){"use strict";function s(e){var t=this.constructor;return this.then(function(s){return t.resolve(e()).then(function(){return s})},function(s){return t.resolve(e()).then(function(){return t.reject(s)})})}var r=setTimeout;function i(e){return Boolean(e&&void 0!==e.length)}function a(){}function n(e){if(!(this instanceof n))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,n._immediateFn(function(){var s=1===e._state?t.onFulfilled:t.onRejected;if(null!==s){var r;try{r=s(e._value)}catch(e){return void h(t.promise,e)}l(t.promise,r)}else(1===e._state?l:h)(t.promise,e._value)})):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var s=t.then;if(t instanceof n)return e._state=3,e._value=t,void u(e);if("function"==typeof s)return void c((r=s,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){h(e,t)}var r,i}function h(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&n._immediateFn(function(){e._handled||n._unhandledRejectionFn(e._value)});for(var t=0,s=e._deferreds.length;t<s;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t){var s=!1;try{e(function(e){s||(s=!0,l(t,e))},function(e){s||(s=!0,h(t,e))})}catch(e){if(s)return;s=!0,h(t,e)}}n.prototype.catch=function(e){return this.then(null,e)},n.prototype.then=function(e,t){var s=new this.constructor(a);return o(this,new function(e,t,s){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=s}(e,t,s)),s},n.prototype.finally=s,n.all=function(e){return new n(function(t,s){if(!i(e))return s(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var a=r.length;function n(e,i){try{if(i&&("object"==typeof i||"function"==typeof i)){var o=i.then;if("function"==typeof o)return void o.call(i,function(t){n(e,t)},s)}r[e]=i,0==--a&&t(r)}catch(e){s(e)}}for(var o=0;o<r.length;o++)n(o,r[o])})},n.resolve=function(e){return e&&"object"==typeof e&&e.constructor===n?e:new n(function(t){t(e)})},n.reject=function(e){return new n(function(t,s){s(e)})},n.race=function(e){return new n(function(t,s){if(!i(e))return s(new TypeError("Promise.race accepts an array"));for(var r=0,a=e.length;r<a;r++)n.resolve(e[r]).then(t,s)})},n._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){r(e,0)},n._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();"Promise"in d?d.Promise.prototype.finally||(d.Promise.prototype.finally=s):d.Promise=n})()}).call(this,s(13).setImmediate,s(3))},function(e,t,s){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},s(14),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,s(3))},function(e,t,s){(function(e,t){!function(e,s){"use strict";if(!e.setImmediate){var r,i,a,n,o,l=1,h={},u=!1,c=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){m(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,s=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=s,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){m(e.data)},r=function(e){a.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,r=function(e){var t=c.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(m,0,e)}:(n="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&m(+t.data.slice(n.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),r=function(t){e.postMessage(n+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),s=0;s<t.length;s++)t[s]=arguments[s+1];var i={callback:e,args:t};return h[l]=i,r(l),l++},d.clearImmediate=p}function p(e){delete h[e]}function m(e){if(u)setTimeout(m,0,e);else{var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(s,r)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,s(3),s(15))},function(e,t){var s,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(s===setTimeout)return setTimeout(e,0);if((s===a||!s)&&setTimeout)return s=setTimeout,setTimeout(e,0);try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}!function(){try{s="function"==typeof setTimeout?setTimeout:a}catch(e){s=a}try{r="function"==typeof clearTimeout?clearTimeout:n}catch(e){r=n}}();var l,h=[],u=!1,c=-1;function d(){u&&l&&(u=!1,l.length?h=l.concat(h):c=-1,h.length&&p())}function p(){if(!u){var e=o(d);u=!0;for(var t=h.length;t;){for(l=h,h=[];++c<t;)l&&l[c].run();c=-1,t=h.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===n||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)t[s-1]=arguments[s];h.push(new m(e,t)),1!==h.length||u||o(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,s){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){o.prototype.append=function(e,t){e=a(e),t=n(t);var s=this.map[e];s||(s=[],this.map[e]=s),s.push(t)},o.prototype.delete=function(e){delete this.map[a(e)]},o.prototype.get=function(e){var t=this.map[a(e)];return t?t[0]:null},o.prototype.getAll=function(e){return this.map[a(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},o.prototype.set=function(e,t){this.map[a(e)]=[n(t)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(s){this.map[s].forEach(function(r){e.call(t,r,s,this)},this)},this)};var s={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},c.call(d.prototype),c.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var i=[301,302,303,307,308];m.redirect=function(e,t){if(-1===i.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.Headers=o,t.Request=d,t.Response=m,t.fetch=function(e,t){return new Promise(function(r,i){var a;a=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var n=new XMLHttpRequest;var l=!1;function h(){if(4===n.readyState){var e=1223===n.status?204:n.status;if(e<100||e>599){if(l)return;return l=!0,void i(new TypeError("Network request failed"))}var t={status:e,statusText:n.statusText,headers:function(e){var t=new o;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var s=e.trim().split(":"),r=s.shift().trim(),i=s.join(":").trim();t.append(r,i)}),t}(n),url:"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0},s="response"in n?n.response:n.responseText;l||(l=!0,r(new m(s,t)))}}n.onreadystatechange=h,n.onload=h,n.onerror=function(){l||(l=!0,i(new TypeError("Network request failed")))},n.open(a.method,a.url,!0);try{"include"===a.credentials&&("withCredentials"in n?n.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(e){console&&console.warn&&console.warn("set withCredentials error:"+e)}"responseType"in n&&s.blob&&(n.responseType="blob"),a.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send(void 0===a._bodyInit?null:a._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,s){e.onload=function(){t(e.result)},e.onerror=function(){s(e.error)}})}function u(e){var t=new FileReader;return t.readAsArrayBuffer(e),h(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(s.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(s.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!s.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},s.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var e,t,s,r,i,a,n,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,s=new FileReader,r=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,a=e.type.match(i)||r.match(i),n=[e],a&&n.push(a[0].replace(/^charset\=/,"").replace(/;$/,"")),s.readAsText.apply(s,n),h(s);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e,t){var s,i,a=(t=t||{}).body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,a||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=(s=t.method||this.method||"GET",i=s.toUpperCase(),r.indexOf(i)>-1?i:s),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a,t)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var s=e.split("="),r=s.shift().replace(/\+/g," "),i=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function m(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},function(e,t,s){"use strict";s.r(t);s(19),s(25)},function(e,t,s){"use strict";s.r(t),s.d(t,"SuperMap",function(){return r}),s.d(t,"DataFormat",function(){return i}),s.d(t,"ServerType",function(){return a}),s.d(t,"GeometryType",function(){return n}),s.d(t,"QueryOption",function(){return o}),s.d(t,"JoinType",function(){return l}),s.d(t,"EngineType",function(){return m}),s.d(t,"MeasureMode",function(){return c}),s.d(t,"SpatialRelationType",function(){return u}),s.d(t,"DataReturnMode",function(){return D}),s.d(t,"Unit",function(){return d}),s.d(t,"BufferRadiusUnit",function(){return p}),s.d(t,"SpatialQueryMode",function(){return h}),s.d(t,"ThemeGraphTextFormat",function(){return f}),s.d(t,"ThemeGraphType",function(){return y}),s.d(t,"GraphAxesTextDisplayMode",function(){return g}),s.d(t,"GraduatedMode",function(){return v}),s.d(t,"RangeMode",function(){return S}),s.d(t,"ThemeType",function(){return b}),s.d(t,"ColorGradientType",function(){return x}),s.d(t,"TextAlignment",function(){return C}),s.d(t,"FillGradientMode",function(){return T}),s.d(t,"SideType",function(){return P}),s.d(t,"AlongLineDirection",function(){return _}),s.d(t,"LabelBackShape",function(){return E}),s.d(t,"LabelOverLengthMode",function(){return A}),s.d(t,"DirectionType",function(){return w}),s.d(t,"OverlayOperationType",function(){return N}),s.d(t,"SupplyCenterType",function(){return L}),s.d(t,"TurnType",function(){return O}),s.d(t,"BufferEndType",function(){return M}),s.d(t,"SmoothMethod",function(){return F}),s.d(t,"SurfaceAnalystMethod",function(){return R}),s.d(t,"ColorSpaceType",function(){return J}),s.d(t,"ChartType",function(){return K}),s.d(t,"EditType",function(){return k}),s.d(t,"TransferTactic",function(){return B}),s.d(t,"TransferPreference",function(){return G}),s.d(t,"GridType",function(){return U}),s.d(t,"ClientType",function(){return X}),s.d(t,"LayerType",function(){return H}),s.d(t,"UGCLayerType",function(){return j}),s.d(t,"StatisticMode",function(){return V}),s.d(t,"PixelFormat",function(){return W}),s.d(t,"SearchMode",function(){return z}),s.d(t,"SummaryType",function(){return se}),s.d(t,"InterpolationAlgorithmType",function(){return q}),s.d(t,"VariogramMode",function(){return Y}),s.d(t,"Exponent",function(){return Q}),s.d(t,"ClipAnalystMode",function(){return Z}),s.d(t,"AnalystAreaUnit",function(){return $}),s.d(t,"AnalystSizeUnit",function(){return ee}),s.d(t,"StatisticAnalystMode",function(){return te}),s.d(t,"TopologyValidatorRule",function(){return re}),s.d(t,"OutputType",function(){return I}),s.d(t,"AggregationQueryBuilderType",function(){return ae}),s.d(t,"AggregationType",function(){return ie}),s.d(t,"GetFeatureMode",function(){return ne}),s.d(t,"TimeFlowControl",function(){return ze}),s.d(t,"IManager",function(){return st}),s.d(t,"IManagerServiceBase",function(){return et}),s.d(t,"IManagerCreateNodeParam",function(){return tt}),s.d(t,"IPortal",function(){return lt}),s.d(t,"IPortalQueryParam",function(){return it}),s.d(t,"IPortalResource",function(){return nt}),s.d(t,"IPortalQueryResult",function(){return at}),s.d(t,"IPortalShareParam",function(){return ot}),s.d(t,"IPortalShareEntity",function(){return ht}),s.d(t,"IPortalServiceBase",function(){return rt}),s.d(t,"IPortalUser",function(){return yt}),s.d(t,"IPortalAddResourceParam",function(){return ut}),s.d(t,"IPortalRegisterServiceParam",function(){return ct}),s.d(t,"IPortalAddDataParam",function(){return dt}),s.d(t,"IPortalDataMetaInfoParam",function(){return pt}),s.d(t,"IPortalDataStoreInfoParam",function(){return mt}),s.d(t,"IPortalDataConnectionInfoParam",function(){return ft}),s.d(t,"Online",function(){return Da}),s.d(t,"OnlineData",function(){return Ra}),s.d(t,"OnlineQueryDatasParameter",function(){return ka}),s.d(t,"ServiceStatus",function(){return Oa}),s.d(t,"DataItemType",function(){return Ma}),s.d(t,"DataItemOrderBy",function(){return Na}),s.d(t,"FilterField",function(){return Ia}),s.d(t,"OnlineServiceBase",function(){return Fa}),s.d(t,"KeyServiceParameter",function(){return Ba}),s.d(t,"SecurityManager",function(){return $e}),s.d(t,"ServerInfo",function(){return Ga}),s.d(t,"TokenServiceParameter",function(){return Ua}),s.d(t,"ElasticSearch",function(){return ja}),s.d(t,"FetchRequest",function(){return Ze}),s.d(t,"ColorsPickerUtil",function(){return qa}),s.d(t,"ArrayStatistic",function(){return Ya}),s.d(t,"AreaSolarRadiationParameters",function(){return Tt}),s.d(t,"AggregationParameter",function(){return Ct}),s.d(t,"AggQueryBuilderParameter",function(){return xt}),s.d(t,"BufferAnalystParameters",function(){return Pt}),s.d(t,"BufferDistance",function(){return At}),s.d(t,"BuffersAnalystJobsParameter",function(){return Gt}),s.d(t,"BufferSetting",function(){return wt}),s.d(t,"BurstPipelineAnalystParameters",function(){return Ht}),s.d(t,"ChartQueryFilterParameter",function(){return zt}),s.d(t,"ChartQueryParameters",function(){return qt}),s.d(t,"ClipParameter",function(){return Xt}),s.d(t,"ColorDictionary",function(){return Kt}),s.d(t,"ComputeWeightMatrixParameters",function(){return es}),s.d(t,"DataReturnOption",function(){return Lt}),s.d(t,"DatasetBufferAnalystParameters",function(){return Ft}),s.d(t,"DatasetInfo",function(){return rs}),s.d(t,"DatasetOverlayAnalystParameters",function(){return as}),s.d(t,"DatasetSurfaceAnalystParameters",function(){return ls}),s.d(t,"DatasetThiessenAnalystParameters",function(){return us}),s.d(t,"DatasourceConnectionInfo",function(){return Mt}),s.d(t,"DensityKernelAnalystParameters",function(){return cs}),s.d(t,"EditFeaturesParameters",function(){return ps}),s.d(t,"FacilityAnalyst3DParameters",function(){return fs}),s.d(t,"FacilityAnalystSinks3DParameters",function(){return ys}),s.d(t,"FacilityAnalystSources3DParameters",function(){return vs}),s.d(t,"FacilityAnalystStreamParameters",function(){return bs}),s.d(t,"FacilityAnalystTracedown3DParameters",function(){return Cs}),s.d(t,"FacilityAnalystTraceup3DParameters",function(){return _s}),s.d(t,"FacilityAnalystUpstream3DParameters",function(){return As}),s.d(t,"FieldParameters",function(){return Ls}),s.d(t,"FieldStatisticsParameters",function(){return Os}),s.d(t,"FilterParameter",function(){return It}),s.d(t,"FilterAggParameter",function(){return Ps}),s.d(t,"FindClosestFacilitiesParameters",function(){return Ns}),s.d(t,"FindLocationParameters",function(){return Fs}),s.d(t,"FindMTSPPathsParameters",function(){return Ds}),s.d(t,"FindPathParameters",function(){return Bs}),s.d(t,"FindServiceAreasParameters",function(){return Us}),s.d(t,"FindTSPPathsParameters",function(){return Hs}),s.d(t,"GenerateSpatialDataParameters",function(){return Vs}),s.d(t,"GeoBoundingBoxQueryBuilderParameter",function(){return zs}),s.d(t,"GeoCodingParameter",function(){return vt}),s.d(t,"GeoDecodingParameter",function(){return St}),s.d(t,"GeoHashGridAggParameter",function(){return qs}),s.d(t,"GeometryBufferAnalystParameters",function(){return Rt}),s.d(t,"GeometryOverlayAnalystParameters",function(){return Ys}),s.d(t,"GeometrySurfaceAnalystParameters",function(){return Qs}),s.d(t,"GeometryThiessenAnalystParameters",function(){return Xs}),s.d(t,"GeoRelationAnalystParameters",function(){return Zs}),s.d(t,"GetFeaturesByBoundsParameters",function(){return tr}),s.d(t,"GetFeaturesByBufferParameters",function(){return ir}),s.d(t,"GetFeaturesByGeometryParameters",function(){return nr}),s.d(t,"GetFeaturesByIDsParameters",function(){return lr}),s.d(t,"GetFeaturesBySQLParameters",function(){return ur}),s.d(t,"GetGridCellInfosParameters",function(){return pr}),s.d(t,"Grid",function(){return jr}),s.d(t,"Image",function(){return on}),s.d(t,"InterpolationAnalystParameters",function(){return qr}),s.d(t,"InterpolationIDWAnalystParameters",function(){return Xr}),s.d(t,"InterpolationKrigingAnalystParameters",function(){return Kr}),s.d(t,"InterpolationRBFAnalystParameters",function(){return Yr}),s.d(t,"JoinItem",function(){return Ot}),s.d(t,"KernelDensityJobParameter",function(){return $r}),s.d(t,"LabelImageCell",function(){return si}),s.d(t,"LabelMatrixCell",function(){return ti}),s.d(t,"LabelMixedTextStyle",function(){return Cr}),s.d(t,"LabelSymbolCell",function(){return ri}),s.d(t,"LabelThemeCell",function(){return ii}),s.d(t,"LayerStatus",function(){return ai}),s.d(t,"LinkItem",function(){return Nt}),s.d(t,"MathExpressionAnalysisParameters",function(){return oi}),s.d(t,"MeasureParameters",function(){return hi}),s.d(t,"OutputSetting",function(){return kt}),s.d(t,"MappingParameters",function(){return Bt}),s.d(t,"OverlapDisplayedOptions",function(){return Gr}),s.d(t,"OverlayAnalystParameters",function(){return is}),s.d(t,"OverlayGeoJobParameter",function(){return di}),s.d(t,"PointWithMeasure",function(){return Ue}),s.d(t,"QueryByBoundsParameters",function(){return mi}),s.d(t,"QueryByDistanceParameters",function(){return gi}),s.d(t,"QueryByGeometryParameters",function(){return Si}),s.d(t,"QueryBySQLParameters",function(){return xi}),s.d(t,"QueryParameters",function(){return Yt}),s.d(t,"Route",function(){return Je}),s.d(t,"RouteCalculateMeasureParameters",function(){return Ti}),s.d(t,"RouteLocatorParameters",function(){return Ei}),s.d(t,"ServerColor",function(){return Be}),s.d(t,"ServerFeature",function(){return wi}),s.d(t,"ServerGeometry",function(){return He}),s.d(t,"ServerStyle",function(){return Ge}),s.d(t,"ServerTextStyle",function(){return gr}),s.d(t,"ServerTheme",function(){return Hr}),s.d(t,"SetLayerInfoParameters",function(){return Pi}),s.d(t,"SetLayersInfoParameters",function(){return Oi}),s.d(t,"SetLayerStatusParameters",function(){return Ni}),s.d(t,"SingleObjectQueryJobsParameter",function(){return Fi}),s.d(t,"StopQueryParameters",function(){return Di}),s.d(t,"SummaryAttributesJobsParameter",function(){return Bi}),s.d(t,"SummaryMeshJobParameter",function(){return Ui}),s.d(t,"SummaryRegionJobParameter",function(){return Hi}),s.d(t,"SupplyCenter",function(){return Vi}),s.d(t,"SurfaceAnalystParameters",function(){return os}),s.d(t,"SurfaceAnalystParametersSetting",function(){return ns}),s.d(t,"TerrainCurvatureCalculationParameters",function(){return zi}),s.d(t,"Theme",function(){return yr}),s.d(t,"ThemeDotDensity",function(){return Ir}),s.d(t,"ThemeFlow",function(){return br}),s.d(t,"ThemeGraduatedSymbol",function(){return Rr}),s.d(t,"ThemeGraduatedSymbolStyle",function(){return Fr}),s.d(t,"ThemeGraph",function(){return Nr}),s.d(t,"ThemeGraphAxes",function(){return Pr}),s.d(t,"ThemeGraphItem",function(){return Mr}),s.d(t,"ThemeGraphSize",function(){return Lr}),s.d(t,"ThemeGraphText",function(){return Or}),s.d(t,"ThemeGridRange",function(){return Qi}),s.d(t,"ThemeGridRangeItem",function(){return Yi}),s.d(t,"ThemeGridUnique",function(){return Ki}),s.d(t,"ThemeGridUniqueItem",function(){return Xi}),s.d(t,"ThemeLabel",function(){return Ar}),s.d(t,"ThemeLabelAlongLine",function(){return _r}),s.d(t,"ThemeLabelBackground",function(){return Er}),s.d(t,"ThemeLabelItem",function(){return vr}),s.d(t,"ThemeLabelText",function(){return Tr}),s.d(t,"ThemeLabelUniqueItem",function(){return Zi}),s.d(t,"ThemeMemoryData",function(){return fr}),s.d(t,"ThemeOffset",function(){return xr}),s.d(t,"ThemeParameters",function(){return $i}),s.d(t,"ThemeRange",function(){return kr}),s.d(t,"ThemeRangeItem",function(){return Dr}),s.d(t,"ThemeUnique",function(){return wr}),s.d(t,"ThemeUniqueItem",function(){return Sr}),s.d(t,"ThiessenAnalystParameters",function(){return hs}),s.d(t,"TopologyValidatorJobsParameter",function(){return ia}),s.d(t,"TransferLine",function(){return na}),s.d(t,"TransferPathParameters",function(){return oa}),s.d(t,"TransferSolutionParameters",function(){return ha}),s.d(t,"TransportationAnalystParameter",function(){return $t}),s.d(t,"TransportationAnalystResultSetting",function(){return Zt}),s.d(t,"UGCLayer",function(){return Br}),s.d(t,"UGCMapLayer",function(){return Ur}),s.d(t,"UGCSubLayer",function(){return Jr}),s.d(t,"UpdateEdgeWeightParameters",function(){return ca}),s.d(t,"UpdateTurnNodeWeightParameters",function(){return pa}),s.d(t,"Vector",function(){return Wr}),s.d(t,"VectorClipJobsParameter",function(){return fa}),s.d(t,"WebPrintingJobCustomItems",function(){return va}),s.d(t,"WebPrintingJobImage",function(){return Sa}),s.d(t,"WebPrintingJobLayers",function(){return ba}),s.d(t,"WebPrintingJobLegendOptions",function(){return xa}),s.d(t,"WebPrintingJobLittleMapOptions",function(){return Ca}),s.d(t,"WebPrintingJobNorthArrowOptions",function(){return Ta}),s.d(t,"WebPrintingJobScaleBarOptions",function(){return _a}),s.d(t,"WebPrintingJobContent",function(){return Ea}),s.d(t,"WebPrintingJobLayoutOptions",function(){return Aa}),s.d(t,"WebPrintingJobExportOptions",function(){return wa}),s.d(t,"WebPrintingJobParameters",function(){return Pa}),s.d(t,"WebPrintingService",function(){return La}),s.d(t,"FileTypes",function(){return Un}),s.d(t,"FileConfig",function(){return Jn}),s.d(t,"FileModel",function(){return Hn}),s.d(t,"MessageBox",function(){return jn}),s.d(t,"CommonContainer",function(){return eo}),s.d(t,"DropDownBox",function(){return so}),s.d(t,"Select",function(){return to}),s.d(t,"AttributesPopContainer",function(){return io}),s.d(t,"PopContainer",function(){return ro}),s.d(t,"IndexTabsPageContainer",function(){return ao}),s.d(t,"CityTabsPage",function(){return no}),s.d(t,"NavTabsPage",function(){return oo}),s.d(t,"PaginationContainer",function(){return lo}),s.d(t,"ComponentsUtil",function(){return ho}),s.d(t,"FileReaderUtil",function(){return Qn}),s.d(t,"ChartView",function(){return Zn}),s.d(t,"ChartViewModel",function(){return Kn}),s.d(t,"Logo",function(){return mo}),s.d(t,"Util",function(){return fo}),s.d(t,"MapExtend",function(){return po}),s.d(t,"Graph",function(){return vo}),s.d(t,"Label",function(){return bo}),s.d(t,"MapvLayer",function(){return _o}),s.d(t,"RangeTheme3DLayer",function(){return Ao}),s.d(t,"Range",function(){return wo}),s.d(t,"RankSymbol",function(){return Po}),s.d(t,"UniqueTheme3DLayer",function(){return Lo}),s.d(t,"Unique",function(){return Oo}),s.d(t,"GraphicLayer",function(){return Io}),s.d(t,"ThreeLayer",function(){return $o}),s.d(t,"HeatMapLayer",function(){return el}),s.d(t,"DeckglLayer",function(){return tl}),s.d(t,"Graphic",function(){return Mo}),s.d(t,"MapvDataSet",function(){return sl}),s.d(t,"MapvRenderer",function(){return To}),s.d(t,"getDefaultVectorTileStyle",function(){return rl}),s.d(t,"setBackground",function(){return il}),s.d(t,"setPaintProperty",function(){return al}),s.d(t,"GeoFeature",function(){return So}),s.d(t,"Theme3DLayer",function(){return Eo}),s.d(t,"ThemeFeature",function(){return yo}),s.d(t,"ThemeLayer",function(){return go}),s.d(t,"ThreeLayerRenderer",function(){return qo}),s.d(t,"Transform",function(){return ko}),s.d(t,"AddressMatchService",function(){return ll}),s.d(t,"ChartService",function(){return hl}),s.d(t,"DataFlowService",function(){return ul}),s.d(t,"FeatureService",function(){return cl}),s.d(t,"FieldService",function(){return dl}),s.d(t,"GridCellInfosService",function(){return pl}),s.d(t,"GeoprocessingService",function(){return ml}),s.d(t,"LayerInfoService",function(){return fl}),s.d(t,"MapService",function(){return yl}),s.d(t,"MeasureService",function(){return gl}),s.d(t,"NetworkAnalystService",function(){return vl}),s.d(t,"NetworkAnalyst3DService",function(){return Sl}),s.d(t,"ProcessingService",function(){return bl}),s.d(t,"QueryService",function(){return xl}),s.d(t,"ServiceBase",function(){return ol}),s.d(t,"SpatialAnalystService",function(){return Cl}),s.d(t,"ThemeService",function(){return Tl}),s.d(t,"TrafficTransferAnalystService",function(){return _l}),s.d(t,"WebPrintingJobService",function(){return El}),s.d(t,"WebMap",function(){return Il});
  9. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10. * This program are made available under the terms of the Apache License, Version 2.0
  11. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12. var r=window.SuperMap=window.SuperMap||{};r.Components=window.SuperMap.Components||{};
  13. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  14. * This program are made available under the terms of the Apache License, Version 2.0
  15. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  16. var i=r.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},a=r.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},n=r.GeometryType={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"},o=r.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},l=r.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},h=r.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"},u=r.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},c=r.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"},d=r.Unit={METER:"METER",KILOMETER:"KILOMETER",MILE:"MILE",YARD:"YARD",DEGREE:"DEGREE",MILLIMETER:"MILLIMETER",CENTIMETER:"CENTIMETER",INCH:"INCH",DECIMETER:"DECIMETER",FOOT:"FOOT",SECOND:"SECOND",MINUTE:"MINUTE",RADIAN:"RADIAN"},p=r.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},m=r.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},f=r.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"},y=r.ThemeGraphType={AREA:"AREA",BAR:"BAR",BAR3D:"BAR3D",LINE:"LINE",PIE:"PIE",PIE3D:"PIE3D",POINT:"POINT",RING:"RING",ROSE:"ROSE",ROSE3D:"ROSE3D",STACK_BAR:"STACK_BAR",STACK_BAR3D:"STACK_BAR3D",STEP:"STEP"},g=r.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},v=r.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},S=r.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},b=r.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},x=r.ColorGradientType={BLACK_WHITE:"BLACKWHITE",BLUE_BLACK:"BLUEBLACK",BLUE_RED:"BLUERED",BLUE_WHITE:"BLUEWHITE",CYAN_BLACK:"CYANBLACK",CYAN_BLUE:"CYANBLUE",CYAN_GREEN:"CYANGREEN",CYAN_WHITE:"CYANWHITE",GREEN_BLACK:"GREENBLACK",GREEN_BLUE:"GREENBLUE",GREEN_ORANGE_VIOLET:"GREENORANGEVIOLET",GREEN_RED:"GREENRED",GREEN_WHITE:"GREENWHITE",PINK_BLACK:"PINKBLACK",PINK_BLUE:"PINKBLUE",PINK_RED:"PINKRED",PINK_WHITE:"PINKWHITE",RAIN_BOW:"RAINBOW",RED_BLACK:"REDBLACK",RED_WHITE:"REDWHITE",SPECTRUM:"SPECTRUM",TERRAIN:"TERRAIN",YELLOW_BLACK:"YELLOWBLACK",YELLOW_BLUE:"YELLOWBLUE",YELLOW_GREEN:"YELLOWGREEN",YELLOW_RED:"YELLOWRED",YELLOW_WHITE:"YELLOWWHITE"},C=r.TextAlignment={TOPLEFT:"TOPLEFT",TOPCENTER:"TOPCENTER",TOPRIGHT:"TOPRIGHT",BASELINELEFT:"BASELINELEFT",BASELINECENTER:"BASELINECENTER",BASELINERIGHT:"BASELINERIGHT",BOTTOMLEFT:"BOTTOMLEFT",BOTTOMCENTER:"BOTTOMCENTER",BOTTOMRIGHT:"BOTTOMRIGHT",MIDDLELEFT:"MIDDLELEFT",MIDDLECENTER:"MIDDLECENTER",MIDDLERIGHT:"MIDDLERIGHT"},T=r.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},_=r.AlongLineDirection={NORMAL:"ALONG_LINE_NORMAL",LB_TO_RT:"LEFT_BOTTOM_TO_RIGHT_TOP",LT_TO_RB:"LEFT_TOP_TO_RIGHT_BOTTOM",RB_TO_LT:"RIGHT_BOTTOM_TO_LEFT_TOP",RT_TO_LB:"RIGHT_TOP_TO_LEFT_BOTTOM"},E=r.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},A=r.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},w=r.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},P=r.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},L=r.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},O=r.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},M=r.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"},N=r.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},I=r.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},F=r.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},R=r.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},D=r.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},k=r.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},B=r.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},G=r.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},U=r.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},J=r.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},H=r.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},j=r.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},V=r.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},W=r.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},z=r.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},q=r.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},Y=r.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"},Q=r.Exponent={EXP1:"EXP1",EXP2:"EXP2"},X=r.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},K=r.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},Z=r.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"},$=r.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},ee=r.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},te=r.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},se=r.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},re=r.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},ie=r.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},ae=r.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},ne=r.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},oe=r.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"};r.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},r.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},r.OrderType={ASC:"ASC",DESC:"DESC"},r.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},r.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},r.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},r.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},r.DataItemType={WORKSPACE:"WORKSPACE",UDB:"UDB",SHP:"SHP",EXCEL:"EXCEL",CSV:"CSV",GEOJSON:"GEOJSON",SMTILES:"SMTILES",SVTILES:"SVTILES",MBTILES:"MBTILES",TPK:"TPK",UGCV5:"UGCV5",UGCV5_MVT:"UGCV5_MVT",JSON:"JSON"},r.WebExportFormatType={PNG:"PNG",PDF:"PDF"},r.WebScaleOrientationType={HORIZONTALLABELSBELOW:"HORIZONTALLABELSBELOW",HORIZONTALLABELSABOVE:"HORIZONTALLABELSABOVE",VERTICALLABELSLEFT:"VERTICALLABELSLEFT",VERTICALLABELSRIGHT:"VERTICALLABELSRIGHT"},r.WebScaleType={LINE:"LINE",BAR:"BAR",BAR_SUB:"BAR_SUB"},r.WebScaleUnit={METER:"METER",FOOT:"FOOT",DEGREES:"DEGREES"};
  17. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  18. * This program are made available under the terms of the Apache License, Version 2.0
  19. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  20. class le{constructor(e,t){this.w=e?parseFloat(e):0,this.h=e?parseFloat(t):0,this.CLASS_NAME="SuperMap.Size"}toString(){return"w="+this.w+",h="+this.h}clone(){return new le(this.w,this.h)}equals(e){var t=!1;return null!=e&&(t=this.w===e.w&&this.h===e.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(e.w)&&isNaN(e.h)),t}destroy(){this.w=null,this.h=null}}r.Size=le;
  21. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  22. * This program are made available under the terms of the Apache License, Version 2.0
  23. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  24. class he{constructor(e,t,s){this.x=e?parseFloat(e):0,this.y=t?parseFloat(t):0,this.mode=s,this.CLASS_NAME="SuperMap.Pixel",r.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new he(this.x,this.y,this.mode)}equals(e){var t=!1;return null!=e&&(t=this.x==e.x&&this.y==e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}add(e,t){if(null==e||null==t)throw new TypeError("Pixel.add cannot receive null values");return new he(this.x+e,this.y+t)}offset(e){var t=this.clone();return e&&(t=this.add(e.x,e.y)),t}destroy(){this.x=null,this.y=null,this.mode=null}}r.Pixel=he,
  25. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  26. * This program are made available under the terms of the Apache License, Version 2.0
  27. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  28. r.inherit=function(e,t){var s,i,a,n=function(){};for(n.prototype=t.prototype,e.prototype=new n,s=2,i=arguments.length;s<i;s++)"function"==typeof(a=arguments[s])&&(a=a.prototype),r.Util.extend(e.prototype,a)},r.mixin=function(...e){class t{constructor(t){for(var s=0;s<e.length;s++)i(this,new e[s](t))}}for(var s=0;s<e.length;s++){var r=e[s];i(t,r),i(t.prototype,r.prototype),i(t.prototype,new r)}return t;function i(e,t){var s=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(t)));for(var r=0;r<s.length;r++){var i=s[r];if("constructor"!==i&&"prototype"!==i&&"name"!==i&&"length"!==i){let s=Object.getOwnPropertyDescriptor(t,i);window.ActiveXObject?Object.defineProperty(e,i,s||{}):Object.defineProperty(e,i,s)}}}};var ue=r.String={startsWith:function(e,t){return 0==e.indexOf(t)},contains:function(e,t){return-1!=e.indexOf(t)},trim:function(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(e){for(var t=e.split("-"),s=t[0],r=1,i=t.length;r<i;r++){var a=t[r];s+=a.charAt(0).toUpperCase()+a.substring(1)}return s},format:function(e,t,s){t||(t=window);return e.replace(r.String.tokenRegEx,function(e,r){for(var i,a=r.split(/\.+/),n=0;n<a.length;n++)0==n&&(i=t),i=i[a[n]];return"function"==typeof i&&(i=s?i.apply(null,s):i()),void 0===i?"undefined":i})},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(e){return r.String.numberRegEx.test(e)},numericIf:function(e){return r.String.isNumeric(e)?parseFloat(e):e}},ce=r.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(e,t){var s=0;return t>0&&(s=parseFloat(e.toPrecision(t))),s},format:function(e,t,s,i){t=void 0!==t?t:0,s=void 0!==s?s:r.Number.thousandsSeparator,i=void 0!==i?i:r.Number.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var a=e.toString().split(".");1===a.length&&null==t&&(t=0);var n,o=a[0];if(s)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(o);)o=o.replace(l,"$1"+s+"$2");if(0==t)n=o;else{var h=a.length>1?a[1]:"0";null!=t&&(h+=new Array(t-h.length+1).join("0")),n=o+i+h}return n}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return ce.limitSigDigs(this,e)});var de,pe,me,fe=r.Function={bind:function(e,t){var s=Array.prototype.slice.apply(arguments,[2]);return function(){var r=s.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,r)}},bindAsEventListener:function(e,t){return function(s){return e.call(t,s||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},ye=(r.Array={filter:function(e,t,s){var r=[];if(Array.prototype.filter)r=e.filter(t,s);else{var i=e.length;if("function"!=typeof t)throw new TypeError;for(var a=0;a<i;a++)if(a in e){var n=e[a];t.call(s,n,a,e)&&r.push(n)}}return r}},r.Util=r.Util||{});r.Util.extend=function(e,t){if(e=e||{},t){for(var s in t){var r=t[s];void 0!==r&&(e[s]=r)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},r.Util.copy=function(e,t){var s;if(e=e||{},t)for(var r in e)void 0!==(s=t[r])&&(e[r]=s)},r.Util.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var s in e[t])e[t][s].destroy&&e[t][s].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},r.Util.getElement=function(){for(var e=[],t=0,s=arguments.length;t<s;t++){var r=arguments[t];if("string"==typeof r&&(r=document.getElementById(r)),1===arguments.length)return r;e.push(r)}return e},r.Util.isElement=function(e){return!(!e||1!==e.nodeType)},r.Util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r.Util.removeItem=function(e,t){for(var s=e.length-1;s>=0;s--)e[s]===t&&e.splice(s,1);return e},r.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s<r;s++)if(e[s]===t)return s;return-1},r.Util.modifyDOMElement=function(e,t,s,r,i,a,n,o){t&&(e.id=t),s&&(e.style.left=s.x+"px",e.style.top=s.y+"px"),r&&(e.style.width=r.w+"px",e.style.height=r.h+"px"),i&&(e.style.position=i),a&&(e.style.border=a),n&&(e.style.overflow=n),parseFloat(o)>=0&&parseFloat(o)<1?(e.style.filter="alpha(opacity="+100*o+")",e.style.opacity=o):1===parseFloat(o)&&(e.style.filter="",e.style.opacity="")},r.Util.applyDefaults=function(e,t){e=e||{};var s="function"==typeof window.Event&&t instanceof window.Event;for(var r in t)(void 0===e[r]||!s&&t.hasOwnProperty&&t.hasOwnProperty(r)&&!e.hasOwnProperty(r))&&(e[r]=t[r]);return!s&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},r.Util.getParameterString=function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},r.Util.urlAppend=function(e,t){var s=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var r=(e+" ").split(/[?&]/);s+=" "===r.pop()?t:r.length?"&"+t:"?"+t}return s},r.Util.urlPathAppend=function(e,t){let s=e;if(!t)return s;0===t.indexOf("/")&&(t=t.substring(1));const r=e.split("?");return r[0].indexOf("/",r[0].length-1)<0&&(r[0]+="/"),s=`${r[0]}${t}${r.length>1?`?${r[1]}`:""}`},r.Util.DEFAULT_PRECISION=14,r.Util.toFloat=function(e,t){return null==t&&(t=r.Util.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},r.Util.rad=function(e){return e*Math.PI/180},r.Util.getParameters=function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(r.String.contains(e,"?")){var s=e.indexOf("?")+1,i=r.String.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(s,i)}for(var a={},n=t.split(/[&;]/),o=0,l=n.length;o<l;++o){var h=n[o].split("=");if(h[0]){var u=h[0];try{u=decodeURIComponent(u)}catch(e){u=unescape(u)}var c=(h[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch(e){c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),a[u]=c}}return a},r.Util.lastSeqID=0,r.Util.createUniqueID=function(e){return null==e&&(e="id_"),r.Util.lastSeqID+=1,e+r.Util.lastSeqID},r.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36},r.INCHES_PER_UNIT.in=r.INCHES_PER_UNIT.inches,r.INCHES_PER_UNIT.degrees=r.INCHES_PER_UNIT.dd,r.INCHES_PER_UNIT.nmi=1852*r.INCHES_PER_UNIT.m,r.METERS_PER_INCH=.0254000508001016,r.Util.extend(r.INCHES_PER_UNIT,{Inch:r.INCHES_PER_UNIT.inches,Meter:1/r.METERS_PER_INCH,Foot:.3048006096012192/r.METERS_PER_INCH,IFoot:.3048/r.METERS_PER_INCH,ClarkeFoot:.3047972651151/r.METERS_PER_INCH,SearsFoot:.30479947153867626/r.METERS_PER_INCH,GoldCoastFoot:.3047997101815088/r.METERS_PER_INCH,IInch:.0254/r.METERS_PER_INCH,MicroInch:254e-7/r.METERS_PER_INCH,Mil:2.54e-8/r.METERS_PER_INCH,Centimeter:.01/r.METERS_PER_INCH,Kilometer:1e3/r.METERS_PER_INCH,Yard:.9144018288036576/r.METERS_PER_INCH,SearsYard:.914398414616029/r.METERS_PER_INCH,IndianYard:.9143985307444408/r.METERS_PER_INCH,IndianYd37:.91439523/r.METERS_PER_INCH,IndianYd62:.9143988/r.METERS_PER_INCH,IndianYd75:.9143985/r.METERS_PER_INCH,IndianFoot:.30479951/r.METERS_PER_INCH,IndianFt37:.30479841/r.METERS_PER_INCH,IndianFt62:.3047996/r.METERS_PER_INCH,IndianFt75:.3047995/r.METERS_PER_INCH,Mile:1609.3472186944373/r.METERS_PER_INCH,IYard:.9144/r.METERS_PER_INCH,IMile:1609.344/r.METERS_PER_INCH,NautM:1852/r.METERS_PER_INCH,"Lat-66":110943.31648893273/r.METERS_PER_INCH,"Lat-83":110946.25736872235/r.METERS_PER_INCH,Decimeter:.1/r.METERS_PER_INCH,Millimeter:.001/r.METERS_PER_INCH,Dekameter:10/r.METERS_PER_INCH,Decameter:10/r.METERS_PER_INCH,Hectometer:100/r.METERS_PER_INCH,GermanMeter:1.0000135965/r.METERS_PER_INCH,CaGrid:.999738/r.METERS_PER_INCH,ClarkeChain:20.1166194976/r.METERS_PER_INCH,GunterChain:20.11684023368047/r.METERS_PER_INCH,BenoitChain:20.116782494375872/r.METERS_PER_INCH,SearsChain:20.11676512155/r.METERS_PER_INCH,ClarkeLink:.201166194976/r.METERS_PER_INCH,GunterLink:.2011684023368047/r.METERS_PER_INCH,BenoitLink:.20116782494375873/r.METERS_PER_INCH,SearsLink:.2011676512155/r.METERS_PER_INCH,Rod:5.02921005842012/r.METERS_PER_INCH,IntnlChain:20.1168/r.METERS_PER_INCH,IntnlLink:.201168/r.METERS_PER_INCH,Perch:5.02921005842012/r.METERS_PER_INCH,Pole:5.02921005842012/r.METERS_PER_INCH,Furlong:201.1684023368046/r.METERS_PER_INCH,Rood:3.778266898/r.METERS_PER_INCH,CapeFoot:.3047972615/r.METERS_PER_INCH,Brealey:375/r.METERS_PER_INCH,ModAmFt:.304812252984506/r.METERS_PER_INCH,Fathom:1.8288/r.METERS_PER_INCH,"NautM-UK":1853.184/r.METERS_PER_INCH,"50kilometers":5e4/r.METERS_PER_INCH,"150kilometers":15e4/r.METERS_PER_INCH}),r.Util.extend(r.INCHES_PER_UNIT,{mm:r.INCHES_PER_UNIT.Meter/1e3,cm:r.INCHES_PER_UNIT.Meter/100,dm:100*r.INCHES_PER_UNIT.Meter,km:1e3*r.INCHES_PER_UNIT.Meter,kmi:r.INCHES_PER_UNIT.nmi,fath:r.INCHES_PER_UNIT.Fathom,ch:r.INCHES_PER_UNIT.IntnlChain,link:r.INCHES_PER_UNIT.IntnlLink,"us-in":r.INCHES_PER_UNIT.inches,"us-ft":r.INCHES_PER_UNIT.Foot,"us-yd":r.INCHES_PER_UNIT.Yard,"us-ch":r.INCHES_PER_UNIT.GunterChain,"us-mi":r.INCHES_PER_UNIT.Mile,"ind-yd":r.INCHES_PER_UNIT.IndianYd37,"ind-ft":r.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/r.METERS_PER_INCH}),r.DOTS_PER_INCH=96,r.Util.normalizeScale=function(e){return e>1?1/e:e},r.Util.getResolutionFromScale=function(e,t){var s;e&&(null==t&&(t="degrees"),s=1/(r.Util.normalizeScale(e)*r.INCHES_PER_UNIT[t]*r.DOTS_PER_INCH));return s},r.Util.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*r.INCHES_PER_UNIT[t]*r.DOTS_PER_INCH},r.IS_GECKO=-1===(de=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==de.indexOf("gecko"),r.Browser=function(){var e,t="",s="",r="pc",i=navigator.userAgent.toLowerCase();return i.indexOf("msie")>-1||i.indexOf("trident")>-1&&i.indexOf("rv")>-1?(t="msie",e=i.match(/msie ([\d.]+)/)||i.match(/rv:([\d.]+)/)):i.indexOf("chrome")>-1?(t="chrome",e=i.match(/chrome\/([\d.]+)/)):i.indexOf("firefox")>-1?(t="firefox",e=i.match(/firefox\/([\d.]+)/)):i.indexOf("opera")>-1?(t="opera",e=i.match(/version\/([\d.]+)/)):i.indexOf("safari")>-1&&(t="safari",e=i.match(/version\/([\d.]+)/)),s=e?e[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?r="apple":i.indexOf("android")>-1&&(s=(e=i.match(/version\/([\d.]+)/))?e[1]:"",r="android"),{name:t,version:s,device:r}}(),r.Util.getBrowser=function(){return r.Browser},r.Util.isSupportCanvas=(pe=!0,me=r.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===me.name&&parseFloat(me.version)<5&&(pe=!1),"safari"===me.name&&parseFloat(me.version)<4&&(pe=!1),"opera"===me.name&&parseFloat(me.version)<10&&(pe=!1),"msie"===me.name&&parseFloat(me.version)<9&&(pe=!1)):pe=!1,pe),r.Util.supportCanvas=function(){return r.Util.isSupportCanvas},r.INCHES_PER_UNIT.degree=r.INCHES_PER_UNIT.dd,r.INCHES_PER_UNIT.meter=r.INCHES_PER_UNIT.m,r.INCHES_PER_UNIT.foot=r.INCHES_PER_UNIT.ft,r.INCHES_PER_UNIT.inch=r.INCHES_PER_UNIT.inches,r.INCHES_PER_UNIT.mile=r.INCHES_PER_UNIT.mi,r.INCHES_PER_UNIT.kilometer=r.INCHES_PER_UNIT.km,r.INCHES_PER_UNIT.yard=r.INCHES_PER_UNIT.yd,r.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),s=document.location.toString(),r=s.indexOf("//");if(-1===t)return!0;var i,a=i=e.substring(0,t),n=s.substring(r+2);r=n.indexOf("/");var o=n.indexOf(":"),l=n.substring(0,r),h=document.location.protocol;if(-1!==o||(l+=":"+("http:"===h.toLowerCase()?80:443)),h.toLowerCase()!==a.toLowerCase())return!1;var u=(a=e.substring(t+2)).indexOf(":");t=a.indexOf("/");var c,d=a.substring(0,t);return-1!==u?c=a.substring(0,u):(c=a.substring(0,t),d+=":"+("http:"===i.toLowerCase()?80:443)),c===document.domain&&d===l},r.Util.calculateDpi=function(e,t,s,r,i){if(e&&t&&s){var a,n=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(i=i||6378137,"degree"===(r=r||"degrees").toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()){let e=n/l,t=o/h;a=254/(e>t?e:t)/s/(2*Math.PI*i/360)/1e4}else{a=254/(n/l)/s/1e4}return a}},r.Util.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","&lt;")).replace(">","&gt;")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var s=[],i=0,a=t.length;i<a;i++)s.push(r.Util.toJSON(t[i]));return"["+s.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let s=0,i=t.length;s<i;s++)e.push(r.Util.toJSON(t[s]));return"["+e.join(",")+"]"}let e=[];for(let s in t)"function"!=typeof t[s]&&"CLASS_NAME"!==s&&"parent"!==s&&e.push("'"+s+"':"+r.Util.toJSON(t[s]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},r.Util.getResolutionFromScaleDpi=function(e,t,s,i){return i=i||6378137,s=s||"",e>0&&t>0?(e=r.Util.normalizeScale(e),"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*i/360)/1e4:254/t/e/1e4):-1},r.Util.getScaleFromResolutionDpi=function(e,t,s,r){return r=r||6378137,s=s||"",e>0&&t>0?"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4:-1},r.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},r.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var s in t){var r=t[s];void 0!==r&&"CLASS_NAME"!==s&&"function"!=typeof r&&(e[s]=r)}return e},r.Util.copyAttributesWithClip=function(e,t,s){if(e=e||{},t)for(var r in t){var i=!1;if(s&&s.length)for(var a=0,n=s.length;a<n;a++)if(r===s[a]){i=!0;break}if(!0!==i){var o=t[r];void 0!==o&&"CLASS_NAME"!==r&&"function"!=typeof o&&(e[r]=o)}}return e},r.Util.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array){return e.slice(0)}if(e instanceof Object){let s={};for(var t in e)e.hasOwnProperty(t)&&(s[t]=r.Util.cloneObject(e[t]));return s}throw new Error("Unable to copy obj! Its type isn't supported.")},r.Util.lineIntersection=function(e,t,s,i){var a,n,o=null,l=(i.x-s.x)*(e.y-s.y)-(i.y-s.y)*(e.x-s.x),h=(t.x-e.x)*(e.y-s.y)-(t.y-e.y)*(e.x-s.x),u=(i.y-s.y)*(t.x-e.x)-(i.x-s.x)*(t.y-e.y);if(0!=u)n=h/u,o=(a=l/u)>=0&&n<=1&&a<=1&&n>=0?new r.Geometry.Point(e.x+a*(t.x-e.x),e.y+a*(t.y-e.y)):"No Intersection";else if(0==l&&0==h){var c=Math.max(e.y,t.y),d=Math.min(e.y,t.y),p=Math.max(e.x,t.x),m=Math.min(e.x,t.x);o=(s.y>=d&&s.y<=c||i.y>=d&&i.y<=c)&&s.x>=m&&s.x<=p||i.x>=m&&i.x<=p?"Coincident":"Parallel"}else o="Parallel";return o},r.Util.getTextBounds=function(e,t,s){document.body.appendChild(s),s.style.width="auto",s.style.height="auto",e.fontSize&&(s.style.fontSize=e.fontSize),e.fontFamily&&(s.style.fontFamily=e.fontFamily),e.fontWeight&&(s.style.fontWeight=e.fontWeight),s.style.position="relative",s.style.visibility="hidden",s.style.display="inline-block",s.innerHTML=t;var r=s.clientWidth,i=s.clientHeight;return document.body.removeChild(s),{textWidth:r,textHeight:i}};
  29. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  30. * This program are made available under the terms of the Apache License, Version 2.0
  31. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  32. class ge{constructor(e,t){ye.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?ye.toFloat(e):0,this.lat=t?ye.toFloat(t):0,this.CLASS_NAME="SuperMap.LonLat"}toString(){return"lon="+this.lon+",lat="+this.lat}toShortString(){return this.lon+","+this.lat}clone(){return new ge(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new ge(this.lon+ye.toFloat(e),this.lat+ye.toFloat(t))}equals(e){var t=!1;return null!=e&&(t=this.lon===e.lon&&this.lat===e.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(e.lon)&&isNaN(e.lat)),t}wrapDateLine(e){var t=this.clone();if(e){for(;t.lon<e.left;)t.lon+=e.getWidth();for(;t.lon>e.right;)t.lon-=e.getWidth()}return t}destroy(){this.lon=null,this.lat=null}static fromString(e){var t=e.split(",");return new ge(t[0],t[1])}static fromArray(e){var t=ye.isArray(e),s=t&&e[0],r=t&&e[1];return new ge(s,r)}}
  33. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  34. * This program are made available under the terms of the Apache License, Version 2.0
  35. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ve{constructor(e,t,s,r){ye.isArray(e)&&(r=e[3],s=e[2],t=e[1],e=e[0]),this.left=null!=e?ye.toFloat(e):this.left,this.bottom=null!=t?ye.toFloat(t):this.bottom,this.right=null!=s?ye.toFloat(s):this.right,this.top=null!=r?ye.toFloat(r):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new ve(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var s=Math.pow(10,e),r=Math.round(this.left*s)/s,i=Math.round(this.bottom*s)/s,a=Math.round(this.right*s)/s,n=Math.round(this.top*s)/s;return!0===t?i+","+r+","+n+","+a:r+","+i+","+a+","+n}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new le(this.getWidth(),this.getHeight())}getCenterPixel(){return new he((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new ge((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var s,r;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(s=t.lon,r=t.lat):(s=t.x,r=t.y);var i=(this.left-s)*e+s,a=(this.bottom-r)*e+r,n=(this.right-s)*e+s,o=(this.top-r)*e+r;return new ve(i,a,n,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new ve(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new ve(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new ve(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var s=this.contains(e.lon,e.lat,t.inclusive),r=t.worldBounds;if(r&&!s){var i=r.getWidth(),a=(r.left+r.right)/2,n=Math.round((e.lon-a)/i);s=this.containsLonLat({lon:e.lon-n*i,lat:e.lat},{inclusive:t.inclusive})}return s}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,s){if(null==s&&(s=!0),null==e||null==t)return!1;return s?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var s=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else s=this;null==t.inclusive&&(t.inclusive=!0);var r=!1,i=s.left===e.right||s.right===e.left||s.top===e.bottom||s.bottom===e.top;if(t.inclusive||!i){var a=e.bottom>=s.bottom&&e.bottom<=s.top||s.bottom>=e.bottom&&s.bottom<=e.top,n=e.top>=s.bottom&&e.top<=s.top||s.top>e.bottom&&s.top<e.top,o=e.left>=s.left&&e.left<=s.right||s.left>=e.left&&s.left<=e.right,l=e.right>=s.left&&e.right<=s.right||s.right>=e.left&&s.right<=e.right;r=(a||n)&&(o||l)}if(t.worldBounds&&!r){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(s),d=!h.containsBounds(e);c&&!d?(e=e.add(-u,0),r=s.intersectsBounds(e,{inclusive:t.inclusive})):d&&!c&&(s=s.add(-u,0),r=e.intersectsBounds(s,{inclusive:t.inclusive}))}return r}containsBounds(e,t,s){null==t&&(t=!1),null==s&&(s=!0);var r=this.contains(e.left,e.bottom,s),i=this.contains(e.right,e.bottom,s),a=this.contains(e.left,e.top,s),n=this.contains(e.right,e.top,s);return t?r||i||a||n:r&&i&&a&&n}determineQuadrant(e){var t="",s=this.getCenterLonLat();return t+=e.lat<s.lat?"b":"t",t+=e.lon<s.lon?"l":"r"}wrapDateLine(e,t){var s=(t=t||{}).leftTolerance||0,r=t.rightTolerance||0,i=this.clone();if(e){for(var a=e.getWidth();i.left<e.left&&i.right-r<=e.left;)i=i.add(a,0);for(;i.left+s>=e.right&&i.right>e.right;)i=i.add(-a,0);var n=i.left+s;n<e.right&&n>e.left&&i.right-r>e.right&&(i=i.add(-a,0))}return i}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var s=e.split(",");return ve.fromArray(s,t)}static fromArray(e,t){return!0===t?new ve(e[1],e[0],e[3],e[2]):new ve(e[0],e[1],e[2],e[3])}static fromSize(e){return new ve(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}r.Bounds=ve;
  36. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  37. * This program are made available under the terms of the Apache License, Version 2.0
  38. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  39. class Se{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new Se}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}r.Geometry=Se;
  40. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  41. * This program are made available under the terms of the Apache License, Version 2.0
  42. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  43. class be extends Se{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new be,t=0,s=this.components.length;t<s;t++)e.addComponent(this.components[t].clone());return ye.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,s=this.components.length;t<s;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new ve,t=this.components;if(t)for(var s=0,r=t.length;s<r;s++)e.extend(t[s].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){ye.isArray(e)||(e=[e]);for(var t=0,s=e.length;t<s;t++)this.addComponent(e[t])}addComponent(e,t){var s=!1;if(e&&(null==this.componentTypes||ye.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var r=this.components.slice(0,t),i=this.components.slice(t,this.components.length);r.push(e),this.components=r.concat(i)}else this.components.push(e);e.parent=this,this.clearBounds(),s=!0}return s}removeComponents(e){var t=!1;ye.isArray(e)||(e=[e]);for(var s=e.length-1;s>=0;--s)t=this.removeComponent(e[s])||t;return t}removeComponent(e){return ye.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,s=this.components.length;t<s;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(ye.isArray(e.components)&&e.components.length===this.components.length){for(var s=0,r=this.components.length;s<r;++s)if(!this.components[s].equals(e.components[s])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],s=0,r=this.components.length;s<r;++s)Array.prototype.push.apply(t,this.components[s].getVertices(e));return t}}r.Geometry.Collection=be;
  44. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  45. * This program are made available under the terms of the Apache License, Version 2.0
  46. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  47. class xe extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}r.Geometry.MultiPoint=xe;
  48. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  49. * This program are made available under the terms of the Apache License, Version 2.0
  50. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  51. class Ce extends xe{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}r.Geometry.Curve=Ce;
  52. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  53. * This program are made available under the terms of the Apache License, Version 2.0
  54. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  55. class Te extends Se{constructor(e,t,s,r){super(e,t,s,r),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=r||0==r?parseFloat(r):null,this.type=s||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new Te(this.x,this.y)),ye.applyDefaults(e,this),e}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(e){return[this]}}r.Geometry.Point=Te;
  56. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  57. * This program are made available under the terms of the Apache License, Version 2.0
  58. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  59. class _e extends Ce{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&super.removeComponent.apply(this,arguments),t}getSortedSegments(){for(var e,t,s=this.components.length-1,r=new Array(s),i=0;i<s;++i)e=this.components[i],t=this.components[i+1],e.x<t.x?r[i]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:r[i]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return r.sort(function(e,t){return e.x1-t.x1})}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}static calculateCircle(e){if(e.length<3)return e;var t={},s=e[0],r=e[1],i=e[2],a=0,n=0,o=!0,l=0,h=0,u=0,c=[],d=(i.y-s.y)/(i.x-s.x),p=i.y-d*i.x;if(i.x!=s.x&&i.y!=s.y&&r.y==d*r.x+p||i.x==s.x&&r.x==s.x||i.y==s.y&&r.y==s.y||i.x==s.x&&i.y==s.y||i.x==r.x&&i.y==r.y||s.x==r.x&&s.y==r.y)c.push(s),c.push(r),c.push(i);else{var m=(r.x*r.x+r.y*r.y-(s.x*s.x+s.y*s.y))*(2*(i.y-s.y))-(i.x*i.x+i.y*i.y-(s.x*s.x+s.y*s.y))*(2*(r.y-s.y)),f=2*(r.x-s.x)*(i.x*i.x+i.y*i.y-(s.x*s.x+s.y*s.y))-2*(i.x-s.x)*(r.x*r.x+r.y*r.y-(s.x*s.x+s.y*s.y)),y=4*((r.x-s.x)*(i.y-s.y)-(i.x-s.x)*(r.y-s.y));t.x=m/y,t.y=f/y;var g=(2*(a=Math.sqrt((s.x-t.x)*(s.x-t.x)+(s.y-t.y)*(s.y-t.y)))*a-((s.x-i.x)*(s.x-i.x)+(s.y-i.y)*(s.y-i.y)))/(2*a*a);g=(g=g>=1?1:g)<=-1?-1:g,u=180*Math.acos(g)/Math.PI,n=(u=i.x==s.x?t.x>s.x&&r.x>s.x||t.x<s.x&&r.x<s.x?360-u:u:t.y>d*t.x+p&&r.y>d*r.x+p||t.y<d*t.x+p&&r.y<d*r.x+p?360-u:u)/72,i.y!=s.y?i.x==s.x?i.y>s.y?r.x<s.x&&(o=!1):r.x>s.x&&(o=!1):i.x<s.x?r.y<d*r.x+p&&(o=!1):r.y>d*r.x+p&&(o=!1):i.x>s.x?r.y>s.y&&(o=!1):r.y<s.y&&(o=!1);var v=(s.y-t.y)/(s.x-t.x),S=v>=0?180*Math.atan(v)/Math.PI:Math.abs(180*Math.atan(v)/Math.PI)+90,b=Math.abs(t.y);s.y==b&&b==i.y&&s.x<i.x&&(S+=180);var x=s.y-t.y;c.push(s);for(var C=1;C<72;C++){l=n*C,h=S,o?x>=0?v>=0?h+=l:h=180-(h-90)+l:h=v>0?h-180+l:90-h+l:x>=0?v>=0?h-=l:h=180-(h-90)-l:h=v>=0?h-180-l:90-h-l,h=h*Math.PI/180;var T=t.x+a*Math.cos(h),_=t.y+a*Math.sin(h);c.push(new Te(T,_))}c.push(i)}return c}static createLineEPS(e){var t=[],s=e.length;if(s<2)return e;for(var r=0;r<s;){if("LTypeArc"==e[r].type){var i=_e.createLineArc(t,r,s,e);t=i[0],r=i[1]}else t.push(e[r]),r++}return t}static createLineArc(e,t,s,r){if(0==t){let i=_e.addPointEPS(r,t,s,"LTypeArc");Array.prototype.push.apply(e,i[0]),t=i[1]+1}else if(t==s-1){var i=[r[t-1],r[t]],a=_e.calculateCircle(i);Array.prototype.push.apply(e,a),t++}else{let i=_e.addPointEPS(r,t,s,"LTypeArc");e.pop(),Array.prototype.push.apply(e,i[0]),t=i[1]+1}return[e,t]}static addPointEPS(e,t,s,r){var i,a=[],n=t+1;return 0==t?Array.prototype.push.apply(a,[e[t],e[t+1]]):t==s-1?Array.prototype.push.apply(a,[e[t-1],e[t]]):Array.prototype.push.apply(a,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==r?i=_e.calculatePointsFBZN(a):"LTypeArc"==r&&(i=_e.calculateCircle(a)),[i,n]}}r.Geometry.LineString=_e;
  60. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  61. * This program are made available under the terms of the Apache License, Version 2.0
  62. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  63. class Ee extends Se{constructor(e,t,s){super(e,t,s),this.x=parseFloat(e),this.y=parseFloat(t),this.text=s.toString(),this.bsInfo={h:null,w:null},this.element=document.createElement("span"),this.CLASS_NAME="SuperMap.Geometry.GeoText",this.geometryType="GeoText"}destroy(){super.destroy(),this.x=null,this.y=null,this.text=null}getCentroid(){return new Te(this.x,this.y)}clone(e){return null==e&&(e=new Ee(this.x,this.y,this.text)),ye.applyDefaults(e,this),e}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x,this.y)}getLabelPxBoundsByLabel(e,t,s,r){var i,a,n,o,l=ye.cloneObject(e),h=(r.label||this.text).split("\n").length;if(t=parseFloat(t),s=parseFloat(s),h>1&&(s=parseFloat(s)*h),r.labelAlign&&"cm"!==r.labelAlign)switch(r.labelAlign){case"lt":l.x+=t/2,l.y+=s/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=s/2;break;case"ct":l.y+=s/2;break;case"cb":l.y-=s/2;break;case"rt":l.x-=t/2,l.y+=s/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=s/2}return this.bsInfo.h=s,this.bsInfo.w=t,i=l.x-parseFloat(t)/2,a=l.y+parseFloat(s)/2,o=l.x+parseFloat(t)/2,n=l.y-parseFloat(s)/2,new ve(i,a,o,n)}getLabelPxBoundsByText(e,t){var s,r,i,a,n=this.getLabelPxSize(t),o=ye.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":o.x+=n.w/2,o.y+=n.h/2;break;case"lm":o.x+=n.w/2;break;case"lb":o.x+=n.w/2,o.y-=n.h/2;break;case"ct":o.y+=n.h/2;break;case"cb":o.y-=n.h/2;break;case"rt":o.x-=n.w/2,o.y+=n.h/2;break;case"rm":o.x-=n.w/2;break;case"rb":o.x-=n.w/2,o.y-=n.h/2}return this.bsInfo.h=n.h,this.bsInfo.w=n.w,s=o.x-n.w/2,r=o.y+n.h/2,a=t.fontStyle&&"italic"===t.fontStyle?o.x+n.w/2+parseInt(parseFloat(t.fontSize)/2):o.x+n.w/2,i=o.y-n.h/2,new ve(s,r,a,i)}getLabelPxSize(e){var t,s,r,i,a=parseFloat(e.strokeWidth);t=e.label||this.text,s=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var n=t.split("\n"),o=n.length;i=o>1?s*o+o+a+.2*s:s+a+.2*s+1,r=0,this.labelWTmp&&r<this.labelWTmp&&(r=this.labelWTmp);for(var l=0;l<o;l++){var h=this.getTextCount(n[l]),u=this.labelWTmp=ye.getTextBounds(e,n[l],this.element).textWidth+1*h.textC+a;r<u&&(r=u)}var c=new Object;return c.h=i,c.w=r,c}getTextCount(e){for(var t={},s=0,r=0,i=0;i<e.length;i++)e.charCodeAt(i)>255?s++:r++;return t.cnC=s,t.enC=r,t.textC=e.length,t}}r.Geometry.GeoText=Ee;
  64. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  65. * This program are made available under the terms of the Apache License, Version 2.0
  66. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  67. class Ae extends _e{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var s=!1,r=this.components.pop();null==t&&e.equals(r)||(s=super.addComponent.apply(this,arguments));var i=this.components[0];return super.addComponent.apply(this,[i]),s}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var s=this.components[0];super.addComponent.apply(this,[s])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,s=0,r=this.components.length;s<r-1;s++){var i=this.components[s],a=this.components[s+1];t+=(i.x+a.x)*(a.y-i.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}r.Geometry.LinearRing=Ae;
  68. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  69. * This program are made available under the terms of the Apache License, Version 2.0
  70. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  71. class we extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}r.Geometry.MultiLineString=we;
  72. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  73. * This program are made available under the terms of the Apache License, Version 2.0
  74. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  75. class Pe extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}r.Geometry.MultiPolygon=Pe;
  76. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  77. * This program are made available under the terms of the Apache License, Version 2.0
  78. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  79. class Le extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,s=this.components.length;t<s;t++)e-=Math.abs(this.components[t].getArea())}return e}}r.Geometry.Polygon=Le;
  80. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  81. * This program are made available under the terms of the Apache License, Version 2.0
  82. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  83. class Oe extends Se{constructor(e,t,s,r){super(e,t,s,r),this.x=e,this.y=t,this.width=s,this.height=r,this.CLASS_NAME="SuperMap.Geometry.Rectangle",this.geometryType="Rectangle"}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x+this.width,this.y+this.height)}getArea(){return this.width*this.height}}r.Geometry.Rectangle=Oe;
  84. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  85. * This program are made available under the terms of the Apache License, Version 2.0
  86. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  87. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  88. * This program are made available under the terms of the Apache License, Version 2.0
  89. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  90. class Me{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.Credential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}Me.CREDENTIAL=null,r.Credential=Me;
  91. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  92. * This program are made available under the terms of the Apache License, Version 2.0
  93. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  94. r.Date={toISOString:function(){if("toISOString"in Date.prototype)return function(e){return e.toISOString()};{function e(e,t){for(var s=e+"";s.length<t;)s="0"+s;return s}return function(t){return isNaN(t.getTime())?"Invalid Date":t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1,2)+"-"+e(t.getUTCDate(),2)+"T"+e(t.getUTCHours(),2)+":"+e(t.getUTCMinutes(),2)+":"+e(t.getUTCSeconds(),2)+"."+e(t.getUTCMilliseconds(),3)+"Z"}}}(),parse:function(e){var t,s=e.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/);if(s&&(s[1]||s[7])){var r=parseInt(s[1],10)||0,i=parseInt(s[2],10)-1||0,a=parseInt(s[3],10)||1;t=new Date(Date.UTC(r,i,a));var n=s[7];if(n){var o=parseInt(s[4],10),l=parseInt(s[5],10),h=parseFloat(s[6]),u=0|h,c=Math.round(1e3*(h-u));if(t.setUTCHours(o,l,u,c),"Z"!==n){var d=-1e3*(60*parseInt(n,10)*60+60*(parseInt(s[8],10)||0));t=new Date(t.getTime()+d)}}}else t=new Date("invalid");return t}};
  95. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  96. * This program are made available under the terms of the Apache License, Version 2.0
  97. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var Ne=r.Event={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var s=r.Event.element(e);s.parentNode&&(!s.tagName||s.tagName.toUpperCase()!=t.toUpperCase());)s=s.parentNode;return s},observe:function(e,t,s,r){var i=ye.getElement(e);if(r=r||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!i._eventCacheID){var a="eventCacheID_";i.id&&(a=i.id+"_"+a),i._eventCacheID=ye.createUniqueID(a)}var n=i._eventCacheID;this.observers[n]||(this.observers[n]=[]),this.observers[n].push({element:i,name:t,observer:s,useCapture:r}),i.addEventListener?"mousewheel"===t?i.addEventListener(t,s,{useCapture:r,passive:!1}):i.addEventListener(t,s,r):i.attachEvent&&i.attachEvent("on"+t,s)},stopObservingElement:function(e){var t=ye.getElement(e)._eventCacheID;this._removeElementObservers(r.Event.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var s=e[t],i=new Array(s.element,s.name,s.observer,s.useCapture);r.Event.stopObserving.apply(this,i)}},stopObserving:function(e,t,s,i){i=i||!1;var a=ye.getElement(e),n=a._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.detachEvent)&&(t="keydown");var o=!1,l=r.Event.observers[n];if(l)for(var h=0;!o&&h<l.length;){var u=l[h];if(u.name===t&&u.observer===s&&u.useCapture===i){l.splice(h,1),0==l.length&&delete r.Event.observers[n],o=!0;break}h++}return o&&(a.removeEventListener?a.removeEventListener(t,s,i):a&&a.detachEvent&&a.detachEvent("on"+t,s)),o},unloadCache:function(){if(r.Event&&r.Event.observers){for(var e in r.Event.observers){var t=r.Event.observers[e];r.Event._removeElementObservers.apply(this,[t])}r.Event.observers=!1}},CLASS_NAME:"SuperMap.Event"};r.Event=Ne,r.Event.observe(window,"unload",r.Event.unloadCache,!1);
  98. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  99. * This program are made available under the terms of the Apache License, Version 2.0
  100. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  101. class Ie{constructor(e,t,s,r,i){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=r,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,ye.extend(this,i),null!=s)for(var a=0,n=s.length;a<n;a++)this.addEventType(s[a]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(Ne.stopObservingElement(this.element),this.element.hasScrollEvent&&Ne.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?Ne.stopObservingElement(this.element):(this.eventHandler=fe.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=fe.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,s=this.BROWSER_EVENTS.length;t<s;t++){var r=this.BROWSER_EVENTS[t];this.addEventType(r),Ne.observe(e,r,this.eventHandler)}Ne.observe(e,"dragstart",Ne.stop)}on(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.register(t,e.scope,e[t])}register(e,t,s,r){if(e in Ie&&!this.extensions[e]&&(this.extensions[e]=new Ie[e](this)),null!=s&&-1!==ye.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var i=this.listeners[e];i||(i=[],this.listeners[e]=i,this.extensionCount[e]=0);var a={obj:t,func:s};r?(i.splice(this.extensionCount[e],0,a),"object"==typeof r&&r.extension&&this.extensionCount[e]++):i.push(a)}}registerPriority(e,t,s){this.register(e,t,s,!0)}un(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.unregister(t,e.scope,e[t])}unregister(e,t,s){null==t&&(t=this.object);var r=this.listeners[e];if(null!=r)for(var i=0,a=r.length;i<a;i++)if(r[i].obj===t&&r[i].func===s){r.splice(i,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var s=this.listeners[e];if(s&&0!=s.length){var r;null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var i=0,a=(s=s.slice()).length;i<a;i++){var n=s[i];if(void 0!=(r=n.func.apply(n.obj,[t]))&&!1===r)break}return this.fallThrough||Ne.stop(t,!0),r}}handleBrowserEvent(e){var t=e.type,s=this.listeners[t];if(s&&0!=s.length){var r=e.touches;if(r&&r[0]){for(var i,a=0,n=0,o=r.length,l=0;l<o;++l)a+=(i=r[l]).clientX,n+=i.clientY;e.clientX=a/o,e.clientY=n/o}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(Ne.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=ye.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=ye.pagePosition(this.element)),new he(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}}r.Events=Ie,r.Events.prototype.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"];
  102. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  103. * This program are made available under the terms of the Apache License, Version 2.0
  104. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  105. class Fe{constructor(e,t,s){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=null!=s?s:{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}r.Feature=Fe;
  106. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  107. * This program are made available under the terms of the Apache License, Version 2.0
  108. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  109. class Re extends Fe{constructor(e,t,s){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=ye.extend(this.attributes,t)),this.bounds=null,this.state=null,this.style=s||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",r.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"},Re.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,super.destroy()}clone(){return new Re(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===r.State.UPDATE)switch(this.state){case r.State.UNKNOWN:case r.State.DELETE:this.state=e;break;case r.State.UPDATE:case r.State.INSERT:}else if(e===r.State.INSERT)switch(this.state){case r.State.UNKNOWN:break;default:this.state=e}else if(e===r.State.DELETE)switch(this.state){case r.State.INSERT:case r.State.DELETE:break;case r.State.UNKNOWN:case r.State.UPDATE:this.state=e}else e===r.State.UNKNOWN&&(this.state=e)}}r.Feature.Vector=Re;
  110. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  111. * This program are made available under the terms of the Apache License, Version 2.0
  112. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  113. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  114. * This program are made available under the terms of the Apache License, Version 2.0
  115. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  116. class De{constructor(e){this.data=null,this.keepData=!1,ye.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}r.Format=r.Format||De;
  117. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  118. * This program are made available under the terms of the Apache License, Version 2.0
  119. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  120. class ke extends De{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t,s,r,i=["{"];this.level+=1;var a=!1;for(t in e)e.hasOwnProperty(t)&&(s=this.write.apply(this,[t,this.pretty]),r=this.write.apply(this,[e[t],this.pretty]),null!=s&&null!=r&&(a&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),s,":",this.writeSpace(),r),a=!0));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"}"),i.join("")},array:function(e){var t,s=["["];this.level+=1;for(var r=0,i=e.length;r<i;++r)null!=(t=this.write.apply(this,[e[r],this.pretty]))&&(r>0&&s.push(","),s.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,s.push(this.writeNewline(),this.writeIndent(),"]"),s.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,s){var r=t[s];return r||(r=s.charCodeAt(),"\\u00"+Math.floor(r/16).toString(16)+(r%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var s;if(this.nativeJSON)try{s=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=s),s}write(e,t){this.pretty=!!t;var s=null,r=typeof e;if(this.serialize[r])try{s=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[r].apply(this,[e])}catch(e){}return s}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}r.Format.JSON=ke;
  121. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  122. * This program are made available under the terms of the Apache License, Version 2.0
  123. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  124. class Be{constructor(e,t,s){this.red=e||0==e?e:255,this.green=t||0,this.blue=s||0,this.CLASS_NAME="SuperMap.ServerColor"}destroy(){this.red=null,this.green=null,this.blue=null}static fromJson(e){if(e){var t=new Be,s=255;null!==e.red&&(s=Number(e.red)),t.red=s;var r=0;null!==e.green&&(r=Number(e.green)),t.green=r;var i=0;return null!==e.blue&&(i=Number(e.blue)),t.blue=i,t}}}r.ServerColor=Be;
  125. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  126. * This program are made available under the terms of the Apache License, Version 2.0
  127. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  128. class Ge{constructor(e){this.fillBackColor=new Be(255,255,255),this.fillBackOpaque=!1,this.fillForeColor=new Be(255,0,0),this.fillGradientMode=null,this.fillGradientAngle=0,this.fillGradientOffsetRatioX=0,this.fillGradientOffsetRatioY=0,this.fillOpaqueRate=100,this.fillSymbolID=0,this.lineColor=new Be(0,0,0),this.lineSymbolID=0,this.lineWidth=1,this.markerAngle=0,this.markerSize=1,this.markerSymbolID=-1,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerStyle"}destroy(){var e=this;e.fillBackColor&&(e.fillBackColor.destroy(),e.fillBackColor=null),e.fillBackOpaque=null,e.fillForeColor&&(e.fillForeColor.destroy(),e.fillForeColor=null),e.fillGradientMode=null,e.fillGradientAngle=null,e.fillGradientOffsetRatioX=null,e.fillGradientOffsetRatioY=null,e.fillOpaqueRate=null,e.fillSymbolID=null,e.lineColor&&(e.lineColor.destroy(),e.lineColor=null),e.lineSymbolID=null,e.lineWidth=null,e.markerAngle=null,e.markerSize=null,e.markerSymbolID=null}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}static fromJson(e){if(e)return new Ge({fillBackColor:Be.fromJson(e.fillBackColor),fillBackOpaque:e.fillBackOpaque,fillForeColor:Be.fromJson(e.fillForeColor),fillGradientMode:e.fillGradientMode,fillGradientAngle:e.fillGradientAngle,fillGradientOffsetRatioX:e.fillGradientOffsetRatioX,fillGradientOffsetRatioY:e.fillGradientOffsetRatioY,fillOpaqueRate:e.fillOpaqueRate,fillSymbolID:e.fillSymbolID,lineColor:Be.fromJson(e.lineColor),lineSymbolID:e.lineSymbolID,lineWidth:e.lineWidth,markerAngle:e.markerAngle,markerSize:e.markerSize,markerSymbolID:e.markerSymbolID})}}r.ServerStyle=Ge;
  129. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  130. * This program are made available under the terms of the Apache License, Version 2.0
  131. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  132. class Ue extends Te{constructor(e){super(e),this.measure=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var s=this.x===e.x&&this.y===e.y&&this.measure===e.measure,r=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),i=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=s||r&&i}return t}toJson(){var e="{";return null!=this.measure&&void 0!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){this.measure=null,this.x=null,this.y=null}static fromJson(e){if(e)return new Ue({x:e.x,y:e.y,measure:e.measure})}}r.PointWithMeasure=Ue;
  133. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  134. * This program are made available under the terms of the Apache License, Version 2.0
  135. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  136. class Je extends be{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}toJson(){var e="{";if(null!=this.id&&void 0!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&void 0!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&void 0!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&void 0!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&void 0!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&void 0!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&void 0!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&void 0!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var s=0,r=this.components.length;s<r;s++)for(var i=0,a=this.components[s].components.length;i<a;i++)e+=this.components[s].components[i].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],s=e.points||[],r=t.length,i=[];if(!(r>0))return null;for(var a=0,n=0,o=[];a<r;a++){for(var l=0;l<t[a];l++)o.push(Ue.fromJson(s[n+l]));n+=t[a],o[0].equals(o[t[a]-1])?i.push(new Ae(o)):i.push(new _e(o)),o=[]}return new Je(i,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}r.Route=Je;
  137. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  138. * This program are made available under the terms of the Apache License, Version 2.0
  139. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  140. class He{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case n.POINT:return e.toGeoPoint();case n.LINE:return e.toGeoLine();case n.LINEM:return e.toGeoLinem();case n.REGION:return e.toGeoRegion();case n.POINTEPS:return e.toGeoPoint();case n.LINEEPS:return e.toGeoLineEPS();case n.REGIONEPS:return e.toGeoRegionEPS();case n.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],s=e.length;if(s>0){if(1===s)return new Te(t[0].x,t[0].y);var r=[];for(let e=0;e<s;e++)r.push(new Te(t[e].x,t[e].y));return new xe(r)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],s=e.length;if(s>0){if(1===s){let s=[];for(let r=0;r<e[0];r++)s.push(new Te(t[r].x,t[r].y));return s[0].equals(s[e[0]-1])?new Ae(s):new _e(s)}{let r=[];for(let i=0;i<s;i++){let s=[];for(let r=0;r<e[i];r++)s.push(new Te(t[r].x,t[r].y));r.push(new _e(s)),t.splice(0,e[i])}return new we(r)}}return null}toGeoLineEPS(){var e,t,s,r,i,a=this.parts||[],n=this.points||[],o=a.length;if(o>0){if(1===o){for(e=0,s=[];e<a[0];e++)s.push(new Te(n[e].x,n[e].y,n[e].type));return s[0].equals(s[a[0]-1])?(i=_e.createLineEPS(s),new Ae(i)):(i=_e.createLineEPS(s),new _e(i))}for(e=0,r=[];e<o;e++){for(t=0,s=[];t<a[e];t++)s.push(new Te(n[t].x,n[t].y));i=_e.createLineEPS(s),r.push(new _e(i)),n.splice(0,a[e])}return new we(r)}return null}toGeoLinem(){return Je.fromJson(this)}toGeoRegion(){var e=this.parts||[],t=this.partTopo||[],s=this.points||[],r=e.length;if(r<=0)return null;var i=[],a=[];if(1==r){for(let e=0;e<s.length;e++)a.push(new Te(s[e].x,s[e].y));return i.push(new Le([new Ae(a)])),new Pe(i)}var n=[],o=[],l=[],h=[],u=[];for(let i=0,n=0;i<r;i++){for(let t=0;t<e[i];t++)a.push(new Te(s[n+t].x,s[n+t].y));n+=e[i];var c=new Le([new Ae(a)]);a=[],l.push(c),0===t.length&&h.push(c.getBounds()),u.push(1),o.push(c.getArea())}if(He.bubbleSort(o,l,t,h),0===t.length){var d=[];for(let e=1;e<l.length;e++)for(let t=e-1;t>=0;t--)if(d[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(d[e]=t);break}for(let e=0;e<l.length;e++)u[e]>0?i.push(l[e]):(i[d[e]].components=i[d[e]].components.concat(l[e].components),i.push(""))}else{i=new Array;for(let e=0;e<l.length;e++)if(t[e]&&-1==t[e]?n=n.concat(l[e].components):(n.length>0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(n),n=[]),i.push(l[e])),e==r-1){var p=i.length;if(p)i[p-1].components=i[p-1].components.concat(n);else for(let e=0,t=n.length;e<t;e++)i.push(new Le(n))}}return new Pe(i)}toGeoRegionEPS(){var e=this.parts||[],t=this.partTopo||[],s=this.points||[],r=e.length;if(r<=0)return null;var i,a=[],n=[];if(1==r){for(var o=0;o<s.length;o++)n.push(new Te(s[o].x,s[o].y));return i=_e.createLineEPS(n),a.push(new Le([new Ae(i)])),new Pe(a)}var l=[],h=[],u=[],c=[],d=[];for(let a=0,o=0;a<r;a++){for(let t=0;t<e[a];t++)n.push(new Te(s[o+t].x,s[o+t].y));o+=e[a],i=_e.createLineEPS(n);var p=new Le([new Ae(i)]);n=[],u.push(p),0===t.length&&c.push(p.getBounds()),d.push(1),h.push(p.getArea())}if(He.bubbleSort(h,u,t,c),0===t.length){var m=[];for(let e=1;e<u.length;e++)for(let t=e-1;t>=0;t--)if(m[e]=-1,c[t].containsBounds(c[e])){d[e]=-1*d[t],d[e]<0&&(m[e]=t);break}for(let e=0;e<u.length;e++)d[e]>0?a.push(u[e]):(a[m[e]].components=a[m[e]].components.concat(u[e].components),a.push(""))}else{a=new Array;for(let e=0;e<u.length;e++)if(t[e]&&-1==t[e]?l=l.concat(u[e].components):(l.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(l),l=[]),a.push(u[e])),e==r-1){var f=a.length;if(f)a[f-1].components=a[f-1].components.concat(l);else for(let e=0,t=l.length;e<t;e++)a.push(new Le(l))}}return new Pe(a)}transformGeoCompound(){const e=this.geoParts||[],t=e.length;if(t<=0)return null;const s=[];for(let r=0;r<t;r++){const t=e[r];s.push(new He(t).toGeometry())}return new be(s)}static fromJson(e){if(e)return new He({id:e.id,style:Ge.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}static fromGeometry(e){if(e){var t=0,s=[],r=[],i=null,a=e.components,o=e.CLASS_NAME,l={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=o&&"SuperMap.Geometry.LineString"!=o&&(e instanceof xe||e instanceof we)){let e=a.length;for(let t=0;t<e;t++){let e=a[t].getVertices().length;s.push(e);for(let s=0;s<e;s++)r.push(new Te(a[t].getVertices()[s].x,a[t].getVertices()[s].y))}i="SuperMap.Geometry.MultiPoint"==o?n.POINT:n.LINE}else if(e instanceof Pe){let e=a.length;for(let t=0;t<e;t++){let e=a[t].components,i=e.length;for(let t=0;t<i;t++){let i=e[t].getVertices().length+1;s.push(i);for(let s=0;s<i-1;s++)r.push(new Te(e[t].getVertices()[s].x,e[t].getVertices()[s].y));r.push(new Te(e[t].getVertices()[0].x,e[t].getVertices()[0].y))}}i=n.REGION}else if(e instanceof Le){let e=a.length;for(let t=0;t<e;t++){let e=a[t].getVertices().length+1;s.push(e);for(let s=0;s<e-1;s++)r.push(new Te(a[t].getVertices()[s].x,a[t].getVertices()[s].y));r.push(new Te(a[t].getVertices()[0].x,a[t].getVertices()[0].y))}i=n.REGION}else{let t=e.getVertices().length;for(let s=0;s<t;s++)r.push(new Te(e.getVertices()[s].x,e.getVertices()[s].y));e instanceof Ae&&(r.push(new Te(e.getVertices()[0].x,e.getVertices()[0].y)),t++),s.push(t),i=e instanceof Te?n.POINT:n.LINE}return new He({id:t,style:null,parts:s,points:r,type:i,prjCoordSys:l})}}static IsClockWise(e){var t=e.length;if(t<3)return 0;var s=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var r=1;r<t;r++)s+=e[r].y*(e[r-1].x-e[r+1].x);return.5*s}static bubbleSort(e,t,s,r){for(var i=0;i<e.length;i++)for(var a=0;a<e.length;a++)if(e[i]>e[a]){var n=e[a];e[a]=e[i],e[i]=n;var o=t[a];if(t[a]=t[i],t[i]=o,s&&s.length>0){var l=s[a];s[a]=s[i],s[i]=l}if(r&&r.length>0){var h=r[a];r[a]=r[i],r[i]=h}}}}r.ServerGeometry=He;
  141. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  142. * This program are made available under the terms of the Apache License, Version 2.0
  143. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  144. class je extends ke{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Te(e[0],e[1])},multipoint:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.point.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new xe(t)},linestring:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.point.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new _e(t)},multilinestring:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new we(t)},polygon:function(e){for(var t,s,r=[],i=0,a=e.length;i<a;++i){try{s=this.parseCoords.linestring.apply(this,[e[i]])}catch(e){throw e}t=new Ae(s.components),r.push(t)}return new Le(r)},multipolygon:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.polygon.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new Pe(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Le([new Ae([new Te(e[0][0],e[0][1]),new Te(e[1][0],e[0][1]),new Te(e[1][0],e[1][1]),new Te(e[0][0],e[1][1]),new Te(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),s={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(s.properties.texts=e.geometry.texts,s.properties.textStyle=e.geometry.textStyle),e.fid&&(s.id=e.fid),e.ID&&(s.id=e.ID),s},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,s=e.hasOwnProperty("geometryType")?e:new He(e).toGeometry()||e,r=s.geometryType||s.type;return"LinearRing"===r&&(r="LineString"),"LINEM"===r&&(r="MultiLineString"),t=this.extract[r.toLowerCase()].apply(this,[s]),"Collection"===(r="TEXT"===r?"Point":r)?{type:"GeometryCollection",geometries:t}:{type:r,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var s in e)"x"===s||"y"===s||null===e[s]||isNaN(e[s])||t.push(e[s]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t},linestring:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t},multilinestring:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.linestring.apply(this,[e.components[s]]));return t},polygon:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.linestring.apply(this,[e.components[s]]));return t},multipolygon:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.polygon.apply(this,[e.components[s]]));return t},collection:function(e){for(var t=e.components.length,s=new Array(t),r=0;r<t;++r)s[r]=this.extract.geometry.apply(this,[e.components[r]]);return s}}}read(e,t,s){t=t||"FeatureCollection";var r=null,i=null;if(i="string"==typeof e?super.read(e,s):e){if("string"!=typeof i.type);else if(this.isValidType(i,t))switch(t){case"Geometry":try{r=this.parseGeometry(i)}catch(e){}break;case"Feature":try{(r=this.parseFeature(i)).type="Feature"}catch(e){}break;case"FeatureCollection":switch(r=[],i.type){case"Feature":try{r.push(this.parseFeature(i))}catch(e){r=null}break;case"FeatureCollection":for(var a=0,n=i.features.length;a<n;++a)try{r.push(this.parseFeature(i.features[a]))}catch(e){r=null}break;default:try{var o=this.parseGeometry(i);r.push(new Re(o))}catch(e){r=null}}}}else;return r}write(e,t){return super.write(this.toGeoJSON(e),t)}fromGeoJSON(e,t,s){let r=this.read(e,t,s);return ye.isArray(r)?r.map(e=>this._toiSevrerFeature(e)):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(ye.isArray(e)){t.type="FeatureCollection";var s=e.length;t.features=new Array(s);for(var r=0;r<s;++r){var i=e[r];if(a(i)){let e={};e.geometry=i,t.features[r]=this.extract.feature.apply(this,[e])}else t.features[r]=this.extract.feature.apply(this,[i])}}else if(a(e)){let s={};s.geometry=e,t=this.extract.feature.apply(this,[s])}else t=this.extract.feature.apply(this,[e]);function a(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var s=!1;switch(t){case"Geometry":-1==ye.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(s=!0);break;case"FeatureCollection":s=!0;break;default:e.type==t&&(s=!0)}return s}parseFeature(e){var t,s,r,i;r=e.properties?e.properties:{},i=e.geometry&&e.geometry.bbox||e.bbox;try{s=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Re(s,r),i&&(t.bounds=ve.fromArray(i)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!ye.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var s=e.geometries.length,r=new Array(s),i=0;i<s;++i)r[i]=this.parseGeometry.apply(this,[e.geometries[i]]);t=new be(r)}else{if(!ye.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),s={};if(t.match(/epsg:/i)){var r=parseInt(t.substring(t.indexOf(":")+1));s=4326==r?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+r}}}return s}_toiSevrerFeature(e){const t=e.attributes,s=[],r=[];for(var i in t)s.push(i),r.push(t[i]);const a={fieldNames:s,fieldValues:r,geometry:He.fromGeometry(e.geometry)};return a.geometry.id=e.fid,a}createAttributes(e){if(!e)return null;var t={};!function(e,t){if(!e.hasOwnProperty("fieldNames")||!e.hasOwnProperty("fieldValues"))return;var s=e.fieldNames,r=e.fieldValues;for(var i in s)t[s[i]]=r[i]}(e,t);var s=["fieldNames","fieldValues","geometry","stringID","ID"];for(var r in e)s.indexOf(r)>-1||(t[r]=e[r]);return t}}r.Format.GeoJSON=je;r.Format.WKT=
  145. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  146. * This program are made available under the terms of the Apache License, Version 2.0
  147. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  148. class extends De{constructor(e){super(e),this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},this.CLASS_NAME="SuperMap.Format.WKT",this.extract={point:function(e){return e.x+" "+e.y},multipoint(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.point.apply(this,[e.components[s]])+")");return t.join(",")},linestring(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t.join(",")},multilinestring(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.linestring.apply(this,[e.components[s]])+")");return t.join(",")},polygon(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.linestring.apply(this,[e.components[s]])+")");return t.join(",")},multipolygon(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.polygon.apply(this,[e.components[s]])+")");return t.join(",")},collection(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extractGeometry.apply(this,[e.components[s]]));return t.join(",")}},this.parse={point:function(e){var t=ue.trim(e).split(this.regExes.spaces);return new Re(new Te(t[0],t[1]))},multipoint:function(e){for(var t,s=ue.trim(e).split(","),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.point.apply(this,[t]).geometry);return new Re(new xe(r))},linestring:function(e){for(var t=ue.trim(e).split(","),s=[],r=0,i=t.length;r<i;++r)s.push(this.parse.point.apply(this,[t[r]]).geometry);return new Re(new _e(s))},multilinestring:function(e){for(var t,s=ue.trim(e).split(this.regExes.parenComma),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.linestring.apply(this,[t]).geometry);return new Re(new we(r))},polygon:function(e){for(var t,s,r,i=ue.trim(e).split(this.regExes.parenComma),a=[],n=0,o=i.length;n<o;++n)t=i[n].replace(this.regExes.trimParens,"$1"),s=this.parse.linestring.apply(this,[t]).geometry,r=new Ae(s.components),a.push(r);return new Re(new Le(a))},multipolygon:function(e){for(var t,s=ue.trim(e).split(this.regExes.doubleParenComma),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.polygon.apply(this,[t]).geometry);return new Re(new Pe(r))},geometrycollection:function(e){e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var t=ue.trim(e).split("|"),s=[],r=0,i=t.length;r<i;++r)s.push(this.read(t[r]));return s}}}read(e){var t,s,r;e=e.replace(/[\n\r]/g," ");var i=this.regExes.typeStr.exec(e);return i&&(s=i[1].toLowerCase(),r=i[2],this.parse[s]&&(t=this.parse[s].apply(this,[r]))),t}write(e){var t,s,r;e.constructor===Array?(t=e,r=!0):(t=[e],r=!1);var i=[];r&&i.push("GEOMETRYCOLLECTION(");for(var a=0,n=t.length;a<n;++a)r&&a>0&&i.push(","),s=t[a].geometry,i.push(this.extractGeometry(s));return r&&i.push(")"),i.join("")}extractGeometry(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}};
  149. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  150. * This program are made available under the terms of the Apache License, Version 2.0
  151. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  152. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  153. * This program are made available under the terms of the Apache License, Version 2.0
  154. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  155. var Ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAdCAYAAAAjHtusAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozYWZlOGIwMi01MWE3LTRiZjYtYWVkYS05MGQ2ZTQ4YjZiMmUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg0NkFBQUE3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg0NkFBQTk3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4MWI3NzdhNC1lZmEyLTQ1MzUtOGQzNi03MmRjNDkyODMzN2UiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjYTYzODVjMi1jNDQ1LTExN2EtYTc0ZC1lM2I5MzJlMGE4Y2QiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5q1HM0AAAF/ElEQVR42tSabYhUVRjHZ7W01C1uaCRW4F3oi9SXCUnwQ9gsGUFvOEtQH1bLu5VS9sbYh5KicjYt29qiGQwVg2xWWKgocob91AvC+CWsoJqB3qHMSdTMpZyeU/+Df07n3pk7997Z6cBv99z7nHvOvf/z/pxJNZvNVI/jCKXmv6EquAmVkxPSlvtp2GItr0/96fFQForChJAWDiVYTkMYMu4XBFcYjLOwWS3sNwmn8NGzZ0h4Flv/zwIdchAnh/slCGmmKUNIBzYPaXOUr0vPuEjD71JAPh7l61embzinhV3V8nnCGmGT8LwlzSL8/yUh4Tfjo9T/CgnCIYNKycA2Qq21AcHU/VHE80Idoo3Qs0W6p0UtUnkZvEMDeVcCyqxEafF7hL8Qf0oYsIj+lfC9cH1CwhchWAGCtZO+AooQOkdC1Km1VtCb63StW73uFSzgKFUkNwBbmZGGmqowhvg8ZNpH9oXChcIcYRdeNomgxLkaH+S1SGubAxyIpFv+Zp+0DYjrAS00j/dem2VGEl6FJ4Qa4quEu8j2hTCJ+GJhe4JjfQMf6JCYPPbysMPxBlp0BUKOogEF9Rg9/heNvNKYfM0KsZUZaYxX4STGrzJa+zbhPeFH2DcK10KItcI+pI0rVElwXl1ULaKnIJhDw0oRQpTQc1zcbwRU8ATy4DR6yMlTzwkqMziEWHvubJ4Nk4ZtHdnqwvwY17xq3Z4FjrG+z2Kdrdf2ZSGD+xlLPh6t1R0jP9fI22ZzKI92yvQl7EbmBxI4S7Y+vIAOL87QZqsc5uNnssxZIcfYjXT9snCR7jjobidp+FkxA2v+Cq1QervMDmp4P7Xs3YZtE9kOC3P/By6JGaETl8ElwueYTNTDq4UDsKnd7YfCNbT239LF1udS72xYJt1UWxNfN4IIP4bWuTpEja01JtMFZFsm/AHbtHBlDE6yasA4moYTrUbvdBTXHqUrAH4uSadbyzF+vbBM2IsNkS3MNa5305JxqfA02T4TnkX8XOH1mPw8ruVejpxbI9hZD2Cz1U7LdrrUvjP/WfZinNZhr6V27hP+FPZh9aLvLxVO4DllX0G2OcKnlO/DCblxaz6uXBtmi+8mBaP3/SP8IuEIiTRoPPQm2TaEmEyXo0JU+F0YiPFD0hhOsiE/vqeEVwyTgF8L51OilcIZ2I4Ll5NttvAJPfukUeB2sk0ZPSbKIUUJpCII7+DasWy08uhNNazT0wGHI7mAtB7KqMKm38HhDdAUibTVKGicbB8YAqrJ9DRsp43JdB4qUof1HQrPE6XTQWu3Ce/inVzjXhXpMiTwUYugNVQ+p80jrUsV5EH0POKeuXO9QjhFq5GryNYvfEMCDhsftYVsB9ETtG0V9ZjfhCURhbcJFpfwVZ9jvhxsLHwTYtp2svlWQw3vXL8UnqHVSIG8l8ex+tHhBXgjddgqHEZ8ufAA2aaEnYgrF/KrPXrEmMUqZ9THLW06xhoBaVueQpkug+ewOUphE3Qv2Q5gGamXYa+QbVq4O+DQ5FHyZqrjxNt7UHh9uuRa0F7HjCF8o9PCTOGnscM7g2u1Hl9C9oeEnxC/1ajZg8JLiM9Hj9GHJseMShwL2DO0G5yEWn3Zh1QUods5CPkIoqlwAZxhXMsb6HrcEPBxchhdJ6wj29vCW4hfLOzo8J3rltYX50nXQAATSf/K4DEaGlTLvplsk/QCpoD60EQ7gLYZc8H9wq+I3yncEOEcNhuz6HWf3XEiwU/4Y8YEqVp2P10rt+8REvBGw026i4aDcbL9jF8r8Blmf4fCOzhViiscskygXRdehf3CO4hfigmTBXyQrl8TFtD1IzQX3CbcQrY3hPcRv4z8OmHPXwchVNln2MmE7BX6VwIFi/he6uxvb6JM3m0fdqvx/ATidxg2JeC7VDErAw5NzGfvwRJVheEIQ8Mg/pdwIM+UOmi9Q8ivCsrIy0tF+wVbEcLrd3Pb2XisEb4Tdlhsi4WP4RBbaLGrHfC3PrvMIezy9rTpGm5lz9LOMG15xvFxD/j5gjzjjDbMOzk+9zzt3v5bgAEAibzFeFHVgYkAAAAASUVORK5CYII=";
  156. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  157. * This program are made available under the terms of the Apache License, Version 2.0
  158. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class We{constructor(e){var t=this;e=e||{},this.speed=e.speed&&e.speed>=0?e.speed:1,this.frequency=e.speed&&e.frequency>=0?e.frequency:1e3,this.startTime=e.startTime&&null!=e.startTime?e.startTime:0,this.endTime=e.endTime&&null!=e.endTime&&e.endTime>=t.startTime?e.endTime:+new Date,this.repeat=void 0===e.repeat||e.repeat,this.reverse=void 0!==e.reverse&&e.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],t.events=new Ie(this,null,this.EVENT_TYPES),t.speed=Number(t.speed),t.frequency=Number(t.frequency),t.startTime=Number(t.startTime),t.endTime=Number(t.endTime),t.startTime=Date.parse(new Date(t.startTime)),t.endTime=Date.parse(new Date(t.endTime)),t.currentTime=t.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}updateOptions(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}start(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}pause(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}stop(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}toggle(){this.running?this.pause():this.start()}setSpeed(e){return e>=0&&(this.speed=e,!0)}getSpeed(){return this.speed}setFrequency(e){return e>=0&&(this.frequency=e,!0)}getFrequency(){return this.frequency}setStartTime(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime<t.startTime&&(t.currentTime=t.startTime,t.tick()),!0)}getStartTime(){return this.startTime}setEndTime(e){var t=this;return t.endTime=Date.parse(new Date(t.endTime)),!(e<t.startTime)&&(t.endTime=e,t.currentTime>=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}getEndTime(){return this.endTime}setCurrentTime(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}getCurrentTime(){return this.currentTime}setRepeat(e){this.repeat=e}getRepeat(){return this.repeat}setReverse(e){this.reverse=e}getReverse(){return this.reverse}getRunning(){return this.running}destroy(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}tick(){}}r.TimeControlBase=We;
  159. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  160. * This program are made available under the terms of the Apache License, Version 2.0
  161. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  162. class ze extends We{constructor(e,t){super(t);var s=this;s.callback=e,Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),s=this,r=function(){},i=function(){return s.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),s.update=s.update.bind(s),s.oldTime=s.currentTime,s.CLASS_NAME="SuperMap.TimeFlowControl"}updateOptions(e){e=e||{},super.updateOptions(e)}start(){var e=this;e.running||(e.running=!0,e.reverse?e.currentTime===e.startTime&&(e.oldTime=e.endTime,e.currentTime=e.oldTime):e.oldTime===e.endTime&&(e.currentTime=e.startTime,e.oldTime=e.currentTime),e.tick())}stop(){super.stop();var e=this;e.oldTime=e.currentTime,e.running&&(e.running=!1),e.intervalId&&window.clearTimeout(e.intervalId)}destroy(){super.destroy();this.oldTime=null,this.callback=null}tick(){var e=this;e.intervalId&&window.clearInterval(e.intervalId),e.intervalId=null,e.update(),e.intervalId=window.setInterval(e.update,e.frequency)}update(){var e=this;if(e.running)if(e.callback&&e.callback(e.currentTime),e.reverse){if(e.currentTime===e.startTime){if(!e.repeat)return e.running=!1,null;e.oldTime=e.endTime,e.currentTime=e.oldTime}else e.currentTime=e.oldTime,e.oldTime-=e.speed;e.oldTime<=e.startTime&&(e.oldTime=e.startTime)}else{if(e.currentTime===e.endTime){if(!e.repeat)return e.running=!1,e.stop(),null;e.stop(),e.currentTime=e.startTime,e.oldTime=e.currentTime,e.start()}else e.oldTime=e.currentTime,e.currentTime+=e.speed;e.currentTime>=e.endTime&&(e.currentTime=e.endTime)}}}r.TimeFlowControl=ze;
  163. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  164. * This program are made available under the terms of the Apache License, Version 2.0
  165. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  166. s(12),s(16);var qe=s(4),Ye=s.n(qe);
  167. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  168. * This program are made available under the terms of the Apache License, Version 2.0
  169. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  170. let Qe=window.fetch;r.setCORS=function(e){r.CORS=e};var Xe=r.isCORS=function(){return void 0!=r.CORS?r.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},Ke=(r.setRequestTimeout=function(e){return r.RequestTimeout=e},r.getRequestTimeout=function(){return r.RequestTimeout||45e3}),Ze=r.FetchRequest={commit:function(e,t,s,r){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,s,r);case"POST":return this.post(t,s,r);case"PUT":return this.put(t,s,r);case"DELETE":return this.delete(t,s,r);default:return this.get(t,s,r)}},supportDirectRequest:function(e,t){return!!ye.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Xe()||t.proxy)},get:function(e,t,s){s=s||{};if(e=ye.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){var i={url:e=e.replace(".json",".jsonp"),data:t};return r.Util.RequestJSONPPromise.GET(i)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,s):this._fetch(e,t,s,"GET")},delete:function(e,t,s){s=s||{};if(e=ye.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=DELETE",data:t};return r.Util.RequestJSONPPromise.DELETE(i)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")-1),t,s):this._fetch(e,t,s,"DELETE")},post:function(e,t,s){if(s=s||{},!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=POST",data:t};return r.Util.RequestJSONPPromise.POST(i)}return this._fetch(this._processUrl(e,s),t,s,"POST")},put:function(e,t,s){if(s=s||{},e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=PUT",data:t};return r.Util.RequestJSONPPromise.PUT(i)}return this._fetch(e,t,s,"PUT")},urlIsLong:function(e){for(var t=0,s=null,r=0,i=e.length;r<i;r++)(s=e.charCodeAt(r))<127?t++:128<=s&&s<=2047?t+=2:2048<=s&&s<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,s,r){return t+=(t.indexOf("?")>-1?"&":"?")+"_method="+e,"string"!=typeof s&&(s=JSON.stringify(s)),this.post(t,s,r)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var s=e.split("?");2===s.length&&(e=s[0]+".json?"+s[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,s,r){return(s=s||{}).headers=s.headers||{},s.headers["Content-Type"]||(s.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),s.timeout?this._timeout(s.timeout,Qe(e,{method:r,headers:s.headers,body:"PUT"===r||"POST"===r?t:void 0,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ke()}).then(function(e){return e})):Qe(e,{method:r,body:"PUT"===r||"POST"===r?t:void 0,headers:s.headers,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ke()}).then(function(e){return e})},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},Ye()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(s,r){setTimeout(function(){r(new Error("timeout"))},e),t.then(s,r)})},_getParameterString:function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};r.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=r.Util.toJSON(e[t]));var s=encodeURIComponent(e[t]);this.queryValues.push(s)}},issue:function(e){for(var t=this,s=t.getUid(),r=e.url,i=[],a=new Promise(function(e){t.supermap_callbacks[s]=function(r){delete t.supermap_callbacks[s],e(r)}}),n=r,o=0,l=t.queryKeys?t.queryKeys.length:0,h=0;h<l;h++)if(n.length+t.queryKeys[h].length+2>=t.limitLength){if(0==o)return!1;i.push(n),n=r,o=0,h--}else if(n.length+t.queryKeys[h].length+2+t.queryValues[h].length>t.limitLength)for(var u=t.queryValues[h];u.length>0;){var c=t.limitLength-n.length-t.queryKeys[h].length-2;n.indexOf("?")>-1?n+="&":n+="?";var d=u.substring(0,c);"%"===d.substring(c-1,c)?(c-=1,d=u.substring(0,c)):"%"===d.substring(c-2,c-1)&&(c-=2,d=u.substring(0,c)),n+=t.queryKeys[h]+"="+d,u=u.substring(c),d.length>0&&(i.push(n),n=r,o=0)}else o++,n.indexOf("?")>-1?n+="&":n+="?",n+=t.queryKeys[h]+"="+t.queryValues[h];return i.push(n),t.send(i,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+s+"]",e&&e.proxy),a},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,s){var r=e.length;if(r>0)for(var i=(new Date).getTime(),a=0;a<r;a++){var n=e[a];n.indexOf("?")>-1?n+="&":n+="?",n+="sectionCount="+r,n+="&sectionIndex="+a,n+="&jsonpUserID="+i,s&&(n=decodeURIComponent(n),n=s+encodeURIComponent(n)),Ye()(n,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings(e.params),this.issue(e)},POST:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},PUT:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},DELETE:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)}};
  171. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  172. * This program are made available under the terms of the Apache License, Version 2.0
  173. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  174. class $e{static generateToken(e,t){var s=this.servers[e];if(s)return Ze.post(s.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},ye.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++){var s=e[t];this.servers[s.server]=s}}static registerToken(e,t){if(this.tokens=this.tokens||{},e&&t){var s=this._getTokenStorageKey(e);this.tokens[s]=t}}static registerKey(e,t){if(this.keys=this.keys||{},e&&!(e.length<1)&&t){e=ye.isArray(e)?e:[e];for(var s=0;s<e.length;s++){var r=this._getUrlRestString(e[0])||e[0];this.keys[r]=t}}}static getServerInfo(e){return this.servers=this.servers||{},this.servers[e]}static getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}static getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}static loginiServer(e,t,s,r){e=ye.urlPathAppend(e,"services/security/login");var i={username:t&&t.toString(),password:s&&s.toString(),rememberme:r};i=JSON.stringify(i);return Ze.post(e,i,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return e.json()})}static logoutiServer(e){e=ye.urlPathAppend(e,"services/security/logout");return Ze.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginOnline(e,t){var s=$e.SSO+"/login?service="+e;this._open(s,t)}static loginiPortal(e,t,s){e=ye.urlPathAppend(e,"web/login");var r={username:t&&t.toString(),password:s&&s.toString()};r=JSON.stringify(r);return Ze.post(e,r,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0}).then(function(e){return e.json()})}static logoutiPortal(e){e=ye.urlPathAppend(e,"services/security/logout");return Ze.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0,withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginManager(e,t,s){if(ye.isInTheSameDomain(e)){var r=ye.urlPathAppend(e,"icloud/security/tokens"),i=t||{},a={username:i.userName&&i.userName.toString(),password:i.password&&i.password.toString()};a=JSON.stringify(a);var n=this;return Ze.post(r,a,{headers:{Accept:"*/*","Content-Type":"application/json"}}).then(function(e){e.text().then(function(e){return n.imanagerToken=e,e})})}var o=!s||s.isNewTab;this._open(e,o)}static destroyAllCredentials(){this.keys=null,this.tokens=null,this.servers=null}static destroyToken(e){if(e){var t=this._getTokenStorageKey(e);this.tokens=this.tokens||{},this.tokens[t]&&delete this.tokens[t]}}static destroyKey(e){if(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;this.keys[t]&&delete this.keys[t]}}static _open(e,t){t=null==t||t;var s=window.screen.availWidth/2-this.INNER_WINDOW_WIDTH/2,r=window.screen.availHeight/2-this.INNER_WINDOW_HEIGHT/2,i="height="+this.INNER_WINDOW_HEIGHT+", width="+this.INNER_WINDOW_WIDTH+",top="+r+", left="+s+",toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no";t?window.open(e,"login"):window.open(e,"login",i)}static _getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}static _getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}}$e.INNER_WINDOW_WIDTH=600,$e.INNER_WINDOW_HEIGHT=600,$e.SSO="https://sso.supermap.com",$e.ONLINE="https://www.supermapol.com",r.SecurityManager=$e;
  175. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  176. * This program are made available under the terms of the Apache License, Version 2.0
  177. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  178. class et{constructor(e,t){if(e){var s=e.substr(e.length-1,1);this.serviceUrl="/"===s?e.substr(0,e.length-2):e}this.options=t||{},this.CLASS_NAME="SuperMap.iManagerServiceBase"}request(e,t,s,r){(r=r||{headers:{Accept:"*/*","Content-Type":"application/json"}}).hasOwnProperty("withCredentials")||(r.withCredentials=!0),r.crossOrigin=this.options.crossOrigin,r.headers=this.options.headers;var i=$e.imanagerToken;return i&&(r.headers||(r.headers=[]),r.headers["X-Auth-Token"]=i),s&&(s=JSON.stringify(s)),Ze.commit(e,t,s,r).then(function(e){return e.json()})}}r.iManagerServiceBase=et;
  179. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  180. * This program are made available under the terms of the Apache License, Version 2.0
  181. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  182. class tt{constructor(e){e=e||{},this.nodeSpec="SMALL",this.nodeCount=1,this.nodeName="",this.password="",this.description="",this.physicalMachineName="",this.ips=[],this.userName="",ye.extend(this,e)}}r.iManagerCreateNodeParam=tt;
  183. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  184. * This program are made available under the terms of the Apache License, Version 2.0
  185. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  186. class st extends et{constructor(e){super(e)}load(){return this.request("GET",this.serviceUrl+"/web/api/service.json")}createIServer(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/server.json",new tt(e))}createIPortal(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/portal.json",new tt(e))}iServerList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/server.json")}iPortalList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/portal.json")}startNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/started.json",e)}stopNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/stopped.json",e)}}r.iManager=st;
  187. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  188. * This program are made available under the terms of the Apache License, Version 2.0
  189. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  190. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  191. * This program are made available under the terms of the Apache License, Version 2.0
  192. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  193. class rt{constructor(e,t){t=t||{},this.serviceUrl=e,this.serverType=a.iPortal,this.CLASS_NAME="SuperMap.iPortalServiceBase",this.withCredentials=t.withCredentials||!1,this.crossOrigin=t.crossOrigin,this.headers=t.headers}request(e,t,s,r={headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials}){return t=this.createCredentialUrl(t),Ze.commit(e,t,s,r).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,s=this.getCredential();if(s){var r=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===r?t+=s.getUrlParameters():t.indexOf("?")>-1&&"?"!==r?t+="&"+s.getUrlParameters():t+="?"+s.getUrlParameters()}return t}getCredential(){var e,t=$e.getToken(this.serviceUrl);return(e=t?new Me(t,"token"):null)||(e=(t=this.getKey())?new Me(t,"key"):null),e}getKey(){}}r.iPortalServiceBase=rt;
  194. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  195. * This program are made available under the terms of the Apache License, Version 2.0
  196. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  197. class it{constructor(e){e=e||{},this.resourceType="",this.pageSize=12,this.currentPage=1,this.orderBy="UPDATETIME",this.orderType="DESC",this.searchType="PUBLIC",this.tags=[],this.dirIds=[],this.resourceSubTypes=[],this.aggregationTypes=[],this.text="",this.groupIds=[],this.departmentIds=[],ye.extend(this,e)}}r.iPortalQueryParam=it;
  198. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  199. * This program are made available under the terms of the Apache License, Version 2.0
  200. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  201. class at{constructor(e){e=e||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,ye.extend(this,e)}}r.iPortalQueryResult=at;
  202. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  203. * This program are made available under the terms of the Apache License, Version 2.0
  204. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  205. class nt extends rt{constructor(e,t){super(e),t=t||{},this.authorizeSetting=[],this.bounds="",this.bounds4326="",this.checkStatus="",this.createTime=0,this.description=null,this.dirId=null,this.epsgCode=0,this.heatLevel=0,this.id=0,this.name="",this.personalDirId=null,this.resourceId=0,this.resourceSubType=null,this.resourceType=null,this.serviceRootUrlId=null,this.tags=null,this.thumbnail=null,this.updateTime=0,this.userName="",this.sourceJSON={},ye.extend(this,t),this.resourceUrl=e+"/web/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId,this.withCredentials&&(this.resourceUrl=e+"/web/mycontent/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId)}load(){var e=this;return e.request("GET",e.resourceUrl+".json").then(function(t){if(t.error)return t;e.sourceJSON=t})}update(){var e=this.resourceType.replace("_","").toLowerCase();"data"===e&&(this.resourceUrl=this.resourceUrl+"/attributes.json");var t=JSON.stringify(this.sourceJSON);if("service"===e){var s={authorizeSetting:this.sourceJSON.authorizeSetting,metadata:this.sourceJSON.metadata,tags:this.sourceJSON.tags,thumbnail:this.sourceJSON.thumbnail,tokenRefreshUrl:this.sourceJSON.tokenRefreshUrl};t=JSON.stringify(s)}return this.request("PUT",this.resourceUrl,t,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}r.iPortalResource=nt;
  206. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  207. * This program are made available under the terms of the Apache License, Version 2.0
  208. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  209. class ot{constructor(e){e=e||{},this.ids=[],this.entities=[],this.resourceType="",ye.extend(this,e)}}r.iPortalShareParam=ot;
  210. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  211. * This program are made available under the terms of the Apache License, Version 2.0
  212. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  213. class lt extends rt{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return Ze.get(this.iportalUrl+"/web")}queryResources(e){if(!(e instanceof it))return new Promise(function(e){e("queryParams is not instanceof iPortalQueryParam !")});var t=this,s=this.iportalUrl+"/gateway/catalog/resource/search.json";return e.t=(new Date).getTime(),this.request("GET",s,e).then(function(e){var s=[];e.content.forEach(function(e){s.push(new nt(t.iportalUrl,e))});let r=new at;return r.content=s,r.total=e.total,r.currentPage=e.currentPage,r.pageSize=e.pageSize,r.aggregations=e.aggregations,r})}updateResourcesShareSetting(e){if(!(e instanceof ot))return new Promise(function(e){e("shareParams is not instanceof iPortalShareParam !")});var t=e.resourceType.replace("_","").toLowerCase()+"s";"datas"===t&&(t="mycontent/"+t);var s={ids:e.ids,entities:e.entities},r=this.iportalUrl+"/web/"+t+"/sharesetting.json";return this.request("PUT",r,JSON.stringify(s)).then(function(e){return e})}}r.iPortal=lt;
  214. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  215. * This program are made available under the terms of the Apache License, Version 2.0
  216. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  217. class ht{constructor(e){e=e||{},this.permissionType="",this.entityType="",this.entityName="GUEST",this.entityId=null,ye.extend(this,e)}}r.iPortalShareEntity=ht;
  218. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  219. * This program are made available under the terms of the Apache License, Version 2.0
  220. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  221. class ut{constructor(e){e=e||{},this.rootUrl="",this.tags=[],this.entities=[],ye.extend(this,e)}}r.iPortalAddResourceParam=ut;
  222. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  223. * This program are made available under the terms of the Apache License, Version 2.0
  224. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  225. class ct{constructor(e){e=e||{},this.type="",this.tags=[],this.entities=[],this.metadata={},this.addedMapNames=[],this.addedSceneNames=[],ye.extend(this,e)}}r.iPortalRegisterServiceParam=ct;
  226. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  227. * This program are made available under the terms of the Apache License, Version 2.0
  228. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  229. class dt{constructor(e){e=e||{},this.fileName="",this.type="",this.tags=[],this.dataMetaInfo={},ye.extend(this,e)}}r.iPortalAddDataParam=dt;
  230. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  231. * This program are made available under the terms of the Apache License, Version 2.0
  232. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  233. class pt{constructor(e){e=e||{},this.xField="",this.yField="",this.fileEncoding="UTF-8",this.xIndex=1,this.yIndex=1,this.fieldTypes=[],this.separator="",this.firstRowIsHead=!0,this.url="",this.dataStoreInfo={},ye.extend(this,e)}}r.iPortalDataMetaInfoParam=pt;
  234. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  235. * This program are made available under the terms of the Apache License, Version 2.0
  236. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  237. class mt{constructor(e){e=e||{},this.type="",this.url="",this.connectionInfo={},ye.extend(this,e)}}r.iPortalDataStoreInfoParam=mt;
  238. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  239. * This program are made available under the terms of the Apache License, Version 2.0
  240. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  241. class ft{constructor(e){e=e||{},this.dataBase="",this.server="",ye.extend(this,e)}}r.iPortalDataConnectionInfoParam=ft;
  242. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  243. * This program are made available under the terms of the Apache License, Version 2.0
  244. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  245. class yt extends rt{constructor(e){super(e),this.iportalUrl=e}deleteResources(e){var t=e.resourceType.replace("_","").toLowerCase(),s=this.iportalUrl+"/web/"+t+"s.json?ids="+encodeURI(JSON.stringify(e.ids));return"data"===t?(s=this.iportalUrl+"/web/mycontent/datas/delete.json",this.request("POST",s,JSON.stringify(e.ids))):this.request("DELETE",s)}addMap(e){if(!(e instanceof ut))return this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/maps/batchaddmaps.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}addScene(e){if(!(e instanceof ut))return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/scenes/batchaddscenes.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}registerService(e){if(!(e instanceof ct))return this.getErrMsgPromise("registerParams is not instanceof IPortalRegisterServiceParam !");let t={type:e.type,tags:e.tags,authorizeSetting:e.entities,metadata:e.metadata,addedMapNames:e.addedMapNames,addedSceneNames:e.addedSceneNames},s=this.iportalUrl+"/web/services.json";return this.request("POST",s,JSON.stringify(t)).then(e=>e)}getErrMsgPromise(e){return new Promise(t=>{t(e)})}uploadDataRequest(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/upload.json";return this.request("POST",s,t)}addData(e,t){if(!(e instanceof dt))return this.getErrMsgPromise("params is not instanceof iPortalAddDataParam !");var s,r=this.iportalUrl+"/web/mycontent/datas.json",i={fileName:e.fileName,tags:e.tags,type:e.type},a=e.type.toLowerCase();if("excel"===a||"csv"===a){if(!(e.dataMetaInfo instanceof pt))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");s={xField:e.dataMetaInfo.xField,yField:e.dataMetaInfo.yField},"csv"===a&&(s.fileEncoding=e.dataMetaInfo.fileEncoding),i.coordType="WGS84",i.dataMetaInfo=s}else if("hdfs"===a||"hbase"===a){if(!(e.dataMetaInfo instanceof pt))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");if(!(e.dataMetaInfo.dataStoreInfo instanceof mt))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo is not instanceof iPortalDataStoreInfoParam !");var n={type:e.dataMetaInfo.dataStoreInfo.type};switch(a){case"hdfs":n.url=e.dataMetaInfo.dataStoreInfo.url,s={url:e.dataMetaInfo.url,dataStoreInfo:n};break;case"hbase":if(!(e.dataMetaInfo.dataStoreInfo.connectionInfo instanceof ft))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo.connectionInfo is not instanceof iPortalDataConnectionInfoParam !");n.connectionInfo={dataBase:e.dataMetaInfo.dataStoreInfo.connectionInfo.dataBase,server:e.dataMetaInfo.dataStoreInfo.connectionInfo.server,engineType:"HBASE"},n.datastoreType="SPATIAL",s={dataStoreInfo:n}}i.dataMetaInfo=s}return this.request("POST",r,JSON.stringify(i)).then(e=>"hdfs"===a||"hbase"===a?e:e.childID?this.uploadDataRequest(e.childID,t):e.customResult)}publishOrUnpublish(e,t){if(!e.dataId||!e.serviceType)return this.getErrMsgPromise("option.dataID and option.serviceType are Required!");var s=e.dataId,r=e.dataServiceId,i=e.serviceType,a=this.iportalUrl+"/web/mycontent/datas/"+s+"/publishstatus.json?serviceType="+i;return r&&(a+="&dataServiceId="+r),this.request("PUT",a,JSON.stringify(t)).then(e=>t?(r||(r=e.customResult),r):e)}getDataPublishedStatus(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/publishstatus.json?dataServiceId="+t+"&forPublish=true";return this.request("GET",s)}unPublishDataService(e){return this.publishOrUnpublish(e,!1)}publishDataService(e){return this.publishOrUnpublish(e,!0)}}r.iPortalUser=yt;
  246. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  247. * This program are made available under the terms of the Apache License, Version 2.0
  248. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  249. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  250. * This program are made available under the terms of the Apache License, Version 2.0
  251. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  252. class gt{constructor(e,t){let s=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.serverType=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,ye.isArray(e)?(s.urls=e,s.length=e.length,s.totalTimes=s.length,1===s.length?s.url=e[0]:(s.index=parseInt(Math.random()*s.length),s.url=e[s.index])):(s.totalTimes=1,s.url=e),ye.isArray(e)&&!s.isServiceSupportPolling()&&(s.url=e[0],s.totalTimes=1),s.serverType=s.serverType||a.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,ye.extend(this,t),s.isInTheSameDomain=ye.isInTheSameDomain(s.url),s.events=new Ie(s,null,s.EVENT_TYPES,!0),s.eventListeners instanceof Object&&s.events.on(s.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;ye.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){let t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=void 0!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=void 0!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain;let s=this.getCredential(e.url);s&&(e.url=ye.urlAppend(e.url,s.getUrlParameters())),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getCredential(e){let t,s,r=e;switch(this.serverType){case a.IPORTAL:(t=(s=$e.getToken(r))?new Me(s,"token"):null)||(t=(s=$e.getKey(r))?new Me(s,"key"):null);break;case a.ONLINE:t=(s=$e.getKey(r))?new Me(s,"key"):null;break;default:t=(s=$e.getToken(r))?new Me(s,"token"):null}return t}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){let t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){let e=this,t=e.options.url,s=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(s,s.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=ye.isInTheSameDomain(t),e._commit(e.options)}calculatePollingTimes(){let e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=ye.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=ye.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=ye.urlAppend(e.url,ye.getParameterString(e.params||{}))),e.params=e.data),Ze.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(t){var s=t;("string"==typeof t&&(s=(new ke).read(t)),(!s||s.error||s.code>=300&&304!==s.code)&&(s=s&&s.error?{error:s.error}:{error:s}),s.error)?(e.scope?fe.bind(e.failure,e.scope):e.failure)(s):(s.succeed=void 0==s.succeed||s.succeed,(e.scope?fe.bind(e.success,e.scope):e.success)(s))}).catch(function(t){(e.scope?fe.bind(e.failure,e.scope):e.failure)(t)})}}r.CommonServiceBase=gt;
  253. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  254. * This program are made available under the terms of the Apache License, Version 2.0
  255. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  256. class vt{constructor(e){e.filters&&"string"==typeof e.filters&&(e.filters=e.filters.split(",")),this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,ye.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}r.GeoCodingParameter=vt;
  257. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  258. * This program are made available under the terms of the Apache License, Version 2.0
  259. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  260. class St{constructor(e){e.filters&&(e.filters=e.filters.split(",")),this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null,ye.extend(this,e)}destroy(){this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null}}r.GeoDecodingParameter=St;
  261. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  262. * This program are made available under the terms of the Apache License, Version 2.0
  263. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  264. class bt extends gt{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof vt&&this.processAsync(e,t)}decode(e,t){t instanceof St&&this.processAsync(e,t)}processAsync(e,t){this.request({method:"GET",url:e,params:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){e.succeed&&delete e.succeed,super.serviceProcessCompleted(e)}serviceProcessFailed(e){super.serviceProcessFailed(e)}}r.AddressMatchService=bt;
  265. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  266. * This program are made available under the terms of the Apache License, Version 2.0
  267. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  268. class xt{constructor(e){this.name=null,this.queryType=null,this.CLASS_NAME="SuperMap.AggQueryBuilderParameter",ye.extend(this,e)}destroy(){this.name=null,this.queryType=null}}r.AggQueryBuilderParameter=xt;
  269. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  270. * This program are made available under the terms of the Apache License, Version 2.0
  271. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  272. class Ct{constructor(e){this.aggName=null,this.aggType=null,this.aggFieldName=null,this.subAgg=null,this.CLASS_NAME="SuperMap.AggregationParameter",ye.extend(this,e)}destroy(){var e=this;e.aggName=null,e.aggFieldName=null,e.aggType=null,e.subAgg&&(e.subAgg=null)}}r.AggregationParameter=Ct;
  273. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  274. * This program are made available under the terms of the Apache License, Version 2.0
  275. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  276. class Tt{constructor(e){this.dataset=null,this.targetDatasourceName=null,this.totalGridName=null,this.diffuseDatasetGridName=null,this.durationDatasetGridName=null,this.directDatasetGridName=null,this.latitude=null,this.timeMode="MULTIDAYS",this.dayStart=null,this.dayEnd=null,this.hourStart=null,this.hourEnd=null,this.transmittance=null,this.hourInterval=null,this.dayInterval=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.AreaSolarRadiationParameters"}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){var s={};for(var r in e){if("dataset"!==r)"latitude"===r||"timeMode"===r||"dayStart"===r||("dayEnd"===r||"hourStart"===r||"hourEnd"===r)||("transmittance"===r||"hourInterval"===r||"dayInterval"===r)?s[r]=e[r]:t[r]=e[r]}t.parameter=s}}r.AreaSolarRadiationParameters=Tt;
  277. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  278. * This program are made available under the terms of the Apache License, Version 2.0
  279. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  280. class _t extends gt{constructor(e,t){super(e,t),this.format=i.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,s=this;if((e=ye.transformResult(e))&&s.format===i.GEOJSON&&"function"==typeof s.toGeoJSONResult)if(ye.isArray(e)){for(var r=0;r<e.length;r++)e[r]=s.toGeoJSONResult(e[r]);t=e}else t=s.toGeoJSONResult(e);t||(t=e),s.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){if(!e)return null;e.result&&e.result.resultGeometry&&(e=e.result);var t=new je;if(e.recordsets)for(var s=0,r=e.recordsets,i=r.length;s<i;s++)r[s].features&&(r[s].features=t.toGeoJSON(r[s].features));else e.recordset&&e.recordset.features&&(e.recordset.features=t.toGeoJSON(e.recordset.features));return e.resultGeometry&&(e.resultGeometry=t.toGeoJSON(e.resultGeometry)),e.regions&&(e.regions=t.toGeoJSON(e.regions)),e}}r.SpatialAnalystBase=_t;
  281. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  282. * This program are made available under the terms of the Apache License, Version 2.0
  283. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  284. class Et extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.AreaSolarRadiationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Tt){var t=this,s={};e instanceof Tt&&(t.url=ye.urlPathAppend(t.url,`datasets/${e.dataset}/solarradiation`)),t.url=ye.urlAppend(t.url,"returnContent=true"),Tt.toObject(e,s);var r=ye.toJSON(s);t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}r.AreaSolarRadiationService=Et;
  285. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  286. * This program are made available under the terms of the Apache License, Version 2.0
  287. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  288. class At{constructor(e){this.exp=null,this.value=100,ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferDistance"}destroy(){this.exp=null,this.value=null}}r.BufferDistance=At;
  289. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  290. * This program are made available under the terms of the Apache License, Version 2.0
  291. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  292. class wt{constructor(e){this.endType=M.FLAT,this.leftDistance=new At,this.rightDistance=new At,this.semicircleLineSegment=4,this.radiusUnit=p.METER,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferSetting"}destroy(){let e=this;e.endType=null,e.leftDistance&&(e.leftDistance.destroy(),e.leftDistance=null),e.rightDistance&&(e.rightDistance.destroy(),e.rightDistance=null),e.semicircleLineSegment=null,e.radiusUnit=null}}r.BufferSetting=wt;
  293. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  294. * This program are made available under the terms of the Apache License, Version 2.0
  295. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  296. class Pt{constructor(e){this.bufferSetting=new wt,ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferAnalystParameters"}destroy(){this.bufferSetting&&(this.bufferSetting.destroy(),this.bufferSetting=null)}}r.BufferAnalystParameters=Pt;
  297. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  298. * This program are made available under the terms of the Apache License, Version 2.0
  299. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  300. class Lt{constructor(e){this.expectCount=1e3,this.dataset=null,this.dataReturnMode=D.RECORDSET_ONLY,this.deleteExistResultDataset=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.DataReturnOption"}destroy(){this.expectCount=null,this.dataset=null,this.dataReturnMode=null,this.deleteExistResultDataset=null}}r.DataReturnOption=Lt;
  301. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  302. * This program are made available under the terms of the Apache License, Version 2.0
  303. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  304. class Ot{constructor(e){this.foreignTableName=null,this.joinFilter=null,this.joinType=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.JoinItem"}destroy(){this.foreignTableName=null,this.joinFilter=null,this.joinType=null}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}}r.JoinItem=Ot;
  305. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  306. * This program are made available under the terms of the Apache License, Version 2.0
  307. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  308. class Mt{constructor(e){this.alias=null,this.connect=null,this.dataBase=null,this.driver=null,this.engineType=null,this.exclusive=null,this.OpenLinkTable=null,this.password=null,this.readOnly=null,this.server=null,this.user=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasourceConnectionInfo"}destroy(){var e=this;e.alias=null,e.connect=null,e.dataBase=null,e.driver=null,e.engineType=null,e.exclusive=null,e.OpenLinkTable=null,e.password=null,e.readOnly=null,e.server=null,e.user=null}}r.DatasourceConnectionInfo=Mt;
  309. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  310. * This program are made available under the terms of the Apache License, Version 2.0
  311. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  312. class Nt{constructor(e){this.datasourceConnectionInfo=null,this.foreignKeys=null,this.foreignTable=null,this.linkFields=null,this.linkFilter=null,this.name=null,this.primaryKeys=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LinkItem"}destroy(){var e=this;e.datasourceConnectionInfo instanceof Mt&&(e.datasourceConnectionInfo.destroy(),e.datasourceConnectionInfo=null),e.foreignKeys=null,e.foreignTable=null,e.linkFields=null,e.linkFilter=null,e.name=null,e.primaryKeys=null}}r.LinkItem=Nt;
  313. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  314. * This program are made available under the terms of the Apache License, Version 2.0
  315. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  316. class It{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,s=e.joinItems,r=s.length;t<r;t++)s[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,s=e.linkItems,r=s.length;t<r;t++)s[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}r.FilterParameter=It;
  317. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  318. * This program are made available under the terms of the Apache License, Version 2.0
  319. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  320. class Ft extends Pt{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new It,this.resultSetting=new Lt,this.isAttributeRetained=!0,this.isUnion=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetBufferAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.isAttributeRetained=null,e.isUnion=null}static toObject(e,t){for(var s in e)if("bufferSetting"===s)e.bufferSetting.radiusUnit=e.bufferSetting.radiusUnit.toUpperCase(),t.bufferAnalystParameter=e.bufferSetting;else if("resultSetting"===s)t.dataReturnOption=e.resultSetting;else{if("dataset"===s)continue;t[s]=e[s]}}}r.DatasetBufferAnalystParameters=Ft;
  321. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  322. * This program are made available under the terms of the Apache License, Version 2.0
  323. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  324. class Rt extends Pt{constructor(e){super(e),this.sourceGeometry=null,this.sourceGeometrySRID=null,e&&ye.extend(this,e),this.CLASS_NAME=" SuperMap.GeometryBufferAnalystParameters"}destroy(){super.destroy();this.sourceGeometry&&(this.sourceGeometry.destroy(),this.sourceGeometry=null)}static toObject(e,t){for(var s in e)if("bufferSetting"===s){var r={};for(var i in e.bufferSetting)r[i]=e.bufferSetting[i];t.analystParameter=r}else"sourceGeometry"===s?t.sourceGeometry=He.fromGeometry(e.sourceGeometry):t[s]=e[s]}}r.GeometryBufferAnalystParameters=Rt;
  325. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  326. * This program are made available under the terms of the Apache License, Version 2.0
  327. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  328. class Dt extends _t{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.BufferAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof Ft?(s.mode="datasets",s.url=ye.urlPathAppend(s.url,"datasets/"+e.dataset+"/buffer"),Ft.toObject(e,t)):e instanceof Rt&&(s.mode="geometry",s.url=ye.urlPathAppend(s.url,"geometry/buffer"),Rt.toObject(e,t));var r=ye.toJSON(t);s.url=ye.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}r.BufferAnalystService=Dt;
  329. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  330. * This program are made available under the terms of the Apache License, Version 2.0
  331. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  332. class kt{constructor(e){this.type=I.UDB,this.datasetName="analystResult",this.datasourceInfo=null,this.outputPath="",ye.extend(this,e),this.CLASS_NAME="SuperMap.OutputSetting"}destroy(){var e=this;e.type=null,e.datasetName=null,e.outputPath=null,e.datasourceInfo instanceof Mt&&(e.datasourceInfo.destroy(),e.datasourceInfo=null)}}r.OutputSetting=kt;
  333. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  334. * This program are made available under the terms of the Apache License, Version 2.0
  335. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  336. class Bt{constructor(e){this.items=null,this.numericPrecision=1,this.rangeMode=S.EQUALINTERVAL,this.rangeCount="",this.colorGradientType=x.YELLOW_RED,ye.extend(this,e),this.CLASS_NAME="SuperMap.MappingParameters"}destroy(){var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.numericPrecision=null,e.rangeMode=null,e.rangeCount=null,e.colorGradientType=null}}r.MappingParameters=Bt;
  337. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  338. * This program are made available under the terms of the Apache License, Version 2.0
  339. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  340. class Gt{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=ee.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;ye.extend(this,e),this.CLASS_NAME="SuperMap.BuffersAnalystJobsParameter"}destroy(){this.datasetName=null,this.bounds=null,this.distance=null,this.distanceField=null,this.distanceUnit=null,this.dissolveField=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"bounds"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}r.BuffersAnalystJobsParameter=Gt;
  341. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  342. * This program are made available under the terms of the Apache License, Version 2.0
  343. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  344. class Ut extends gt{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.ProcessingServiceBase"}destroy(){super.destroy()}getJobs(e){var t=this;Ze.get(t._processUrl(e),null,{proxy:t.proxy}).then(function(e){return e.json()}).then(function(e){t.events.triggerEvent("processCompleted",{result:e})}).catch(function(e){t.eventListeners.processFailed({error:e})})}addJob(e,t,s,r){var i=this,a=null;t&&t instanceof s&&(a=new Object,s.toObject(t,a));let n=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},i.headers||{});var o={proxy:i.proxy,headers:n,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,isInTheSameDomain:i.isInTheSameDomain};Ze.post(i._processUrl(e),JSON.stringify(a),o).then(function(e){return e.json()}).then(function(e){e.succeed?i.serviceProcessCompleted(e,r):i.serviceProcessFailed(e)}).catch(function(e){i.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=ye.transformResult(e),t=t||1e3;var s=this;if(e)var r=setInterval(function(){Ze.get(s._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){s.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(r),s.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(r),s.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(r),s.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return $e.getToken(e)&&(e=ye.urlAppend(e,"token="+$e.getToken(e))),e}}r.ProcessingServiceBase=Ut;
  345. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  346. * This program are made available under the terms of the Apache License, Version 2.0
  347. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  348. class Jt extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,Gt,t)}}r.BuffersAnalystJobsService=Jt;
  349. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  350. * This program are made available under the terms of the Apache License, Version 2.0
  351. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  352. class Ht{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}}r.BurstPipelineAnalystParameters=Ht;
  353. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  354. * This program are made available under the terms of the Apache License, Version 2.0
  355. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  356. class jt extends gt{constructor(e,t){super(e,t),this.format=i.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t;(e=ye.transformResult(e))&&this.format===i.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(t=this.toGeoJSONResult(e)),t||(t=e),this.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}r.NetworkAnalystServiceBase=jt;
  357. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  358. * This program are made available under the terms of the Apache License, Version 2.0
  359. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  360. class Vt extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof Ht))return null;var t,s=this;if(s.url=ye.urlPathAppend(s.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}r.BurstPipelineAnalystService=Vt;
  361. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  362. * This program are made available under the terms of the Apache License, Version 2.0
  363. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  364. class Wt extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),ye.reset(this)}processAsync(){var e=this;e.isTempLayers||ye.urlPathAppend(e.url,"chartFeatureInfoSpecs"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}r.ChartFeatureInfoSpecsService=Wt;
  365. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  366. * This program are made available under the terms of the Apache License, Version 2.0
  367. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  368. class zt{constructor(e){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryFilterParameter"}destroy(){var e=this;e.isQueryPoint=null,e.isQueryLine=null,e.isQueryRegion=null,e.attributeFilter=null,e.chartFeatureInfoSpecCode=null}toJson(){var e="";return e+='"isQueryPoint":'+this.isQueryPoint+",",e+='"isQueryLine":'+this.isQueryLine+",",e+='"isQueryRegion":'+this.isQueryRegion+",",this.attributeFilter&&(e+='"attributeFilter": "'+this.attributeFilter+'",'),e="{"+(e+='"chartFeatureInfoSpecCode":'+this.chartFeatureInfoSpecCode)+"}"}}r.ChartQueryFilterParameter=zt;
  369. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  370. * This program are made available under the terms of the Apache License, Version 2.0
  371. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  372. class qt{constructor(e){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryParameters"}destroy(){var e=this;e.queryMode=null,e.bounds=null,e.chartLayerNames=null,e.chartQueryFilterParameters=null,e.returnContent=!0,e.startRecord=0,e.expectCount=null}getVariablesJson(){var e="";if(e+='"queryMode":"'+this.queryMode+'",',this.chartLayerNames&&this.chartLayerNames.length){for(var t=[],s=this.chartLayerNames.length,r=0;r<s;r++)t.push('"'+this.chartLayerNames[r]+'"');e+='"chartLayerNames":'+("["+t.join(",")+"]")+","}if("ChartBoundsQuery"===this.queryMode&&this.bounds&&(e+='"bounds":{"leftBottom":{"x":'+this.bounds.left+',"y":'+this.bounds.bottom+'},"rightTop":{"x":'+this.bounds.right+',"y":'+this.bounds.top+"}},"),this.chartQueryFilterParameters&&this.chartQueryFilterParameters.length){for(var i=[],a=this.chartQueryFilterParameters.length,n=0;n<a;n++){var o=this.chartQueryFilterParameters[n];o instanceof zt&&i.push(o.toJson())}var l="["+i.join(",")+"]";l='"chartQueryParams":'+l+",",l+='"startRecord":'+this.startRecord+",",e+='"chartQueryParameters":'+(l="{"+(l+='"expectCount":'+this.expectCount)+"}")}return e="{"+e+"}"}}r.ChartQueryParameters=qt;
  373. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  374. * This program are made available under the terms of the Apache License, Version 2.0
  375. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  376. class Yt{constructor(e){e&&(this.customParams=null,this.prjCoordSys=null,this.expectCount=1e5,this.networkType=n.LINE,this.queryOption=o.ATTRIBUTEANDGEOMETRY,this.queryParams=null,this.startRecord=0,this.holdTime=10,this.returnCustomResult=!1,this.returnFeatureWithFieldCaption=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryParameters")}destroy(){var e=this;if(e.customParams=null,e.expectCount=null,e.networkType=null,e.queryOption=null,e.queryParams){for(var t=0,s=e.queryParams,r=s.length;t<r;t++)s[t].destroy();e.queryParams=null}e.startRecord=null,e.holdTime=null,e.returnCustomResult=null,e.prjCoordSys=null}}r.QueryParameters=Yt;
  377. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  378. * This program are made available under the terms of the Apache License, Version 2.0
  379. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  380. class Qt extends gt{constructor(e,t){super(e,t),t=t||{},this.returnContent=null,this.format=i.GEOJSON,ye.extend(this,t);t.format&&(this.format=t.format.toUpperCase()),this.url&&(this.url=ye.urlPathAppend(this.url,"queryResults"),this.CLASS_NAME="SuperMap.ChartQueryService")}destroy(){gt.prototype.destroy.apply(this,arguments),this.returnContent=null,this.format=null}processAsync(e){if(e instanceof qt){var t,s=this;s.returnContent=e.returnContent,t=e.getVariablesJson(),s.returnContent&&(s.url=ye.urlAppend(s.url,"returnContent=true")),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if((e=ye.transformResult(e))&&e.recordsets&&this.format===i.GEOJSON)for(var t=0,s=e.recordsets,r=s.length;t<r;t++)if(s[t].features){var a=new je;s[t].features=a.toGeoJSON(s[t].features)}this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Yt({queryMode:e.queryMode,bounds:e.bounds,chartLayerNames:e.chartLayerNames,chartQueryFilterParameters:e.chartQueryFilterParameters,returnContent:e.returnContent})}}r.ChartQueryService=Qt;
  381. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  382. * This program are made available under the terms of the Apache License, Version 2.0
  383. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  384. class Xt{constructor(e){this.clipDatasetName=null,this.clipDatasourceName=null,this.clipRegion=null,this.isClipInRegion=!0,this.isExactClip=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ClipParameter"}destroy(){var e=this;e.clipDatasetName=null,e.clipDatasourceName=null,e.clipRegion=null,e.isClipInRegion=null,e.isExactClip=null}toJSON(){return ye.toJSON({isClipInRegion:this.isClipInRegion,clipDatasetName:this.clipDatasetName,clipDatasourceName:this.clipDatasourceName,isExactClip:this.isExactClip,clipRegion:He.fromGeometry(this.clipRegion)})}}r.ClipParameter=Xt;
  385. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  386. * This program are made available under the terms of the Apache License, Version 2.0
  387. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  388. class Kt{constructor(e){e=e||{},this.elevation=null,this.color=null,ye.extend(this,e);var t=this.color;t&&(this.color=new Be(t.red,t.green,t.blue)),this.CLASS_NAME="SuperMap.ColorDictionary"}destroy(){ye.reset(this)}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}}r.ColorDictionary=Kt;
  389. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  390. * This program are made available under the terms of the Apache License, Version 2.0
  391. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  392. class Zt{constructor(e){e&&(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}r.TransportationAnalystResultSetting=Zt;
  393. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  394. * This program are made available under the terms of the Apache License, Version 2.0
  395. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  396. class $t{constructor(e){e&&(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new Zt,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}r.TransportationAnalystParameter=$t;
  397. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  398. * This program are made available under the terms of the Apache License, Version 2.0
  399. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  400. class es{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new $t,ye.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}r.ComputeWeightMatrixParameters=es;
  401. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  402. * This program are made available under the terms of the Apache License, Version 2.0
  403. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  404. class ts extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof es){var t,s=this;s.url=ye.urlPathAppend(s.url,"weightmatrix"),t={parameter:ye.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}}r.ComputeWeightMatrixService=ts;
  405. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  406. * This program are made available under the terms of the Apache License, Version 2.0
  407. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  408. class ss extends gt{constructor(e,t){(t=t||{}).EVENT_TYPES=["broadcastSocketConnected","broadcastSocketError","broadcastFailed","broadcastSucceeded","subscribeSocketConnected","subscribeSocketError","messageSucceeded","setFilterParamSucceeded"],super(e,t),this.geometry=null,this.prjCoordSys=null,this.excludeField=null,ye.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(ye.urlPathAppend(e.url,"broadcast")),this.broadcastWebSocket.onopen=function(t){e.broadcastWebSocket.isOpen=!0,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onclose=function(t){e.broadcastWebSocket.isOpen=!1,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onerror=function(t){t.eventType="broadcastSocketError",e.events.triggerEvent("broadcastSocketError",t)},this}broadcast(e){this.broadcastWebSocket&&this.broadcastWebSocket.isOpen?(this.broadcastWebSocket.send(JSON.stringify(e)),this.events.triggerEvent("broadcastSucceeded")):this.events.triggerEvent("broadcastFailed")}initSubscribe(){var e=this;return this.subscribeWebSocket=this._connect(ye.urlPathAppend(e.url,"subscribe")),this.subscribeWebSocket.onopen=function(t){e.subscribeWebSocket.send(e._getFilterParams()),t.eventType="subscribeSocketConnected",e.events.triggerEvent("subscribeSocketConnected",t)},this.subscribeWebSocket.onerror=function(t){t.eventType="subscribeSocketError",e.events.triggerEvent("subscribeSocketError",t)},this.subscribeWebSocket.onmessage=function(t){e._onMessage(t)},this}setExcludeField(e){return this.excludeField=e,this.subscribeWebSocket.send(this._getFilterParams()),this}setGeometry(e){return this.geometry=e,this.subscribeWebSocket.send(this._getFilterParams()),this}unSubscribe(){this.subscribeWebSocket&&(this.subscribeWebSocket.close(),this.subscribeWebSocket=null)}unBroadcast(){this.broadcastWebSocket&&(this.broadcastWebSocket.close(),this.broadcastWebSocket=null)}destroy(){gt.prototype.destroy.apply(this,arguments);this.geometry=null,this.prjCoordSys=null,this.excludeField=null,this.unBroadcast(),this.unSubscribe()}_getFilterParams(){var e={filterParam:{prjCoordSys:this.prjCoordSys,excludeField:this.excludeField,geometry:this.geometry}};return ye.toJSON(e)}_onMessage(e){if(e.data&&e.data.indexOf("filterParam")>=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var s=JSON.parse(e.data);e.featureResult=s,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}_connect(e){return e=this._appendCredentials(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}_appendCredentials(e){var t=$e.getToken(e);return t&&(e=ye.urlAppend(e,"token="+t)),e}}r.DataFlowService=ss;
  409. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  410. * This program are made available under the terms of the Apache License, Version 2.0
  411. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  412. class rs{constructor(e){e=e||{},this.bounds=null,this.dataSourceName=null,this.description=null,this.encodeType=null,this.isReadOnly=null,this.name=null,this.prjCoordSys=null,this.tableName=null,this.type=null,ye.extend(this,e);var t=this.bounds;t&&(this.bounds=new ve(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){ye.reset(this)}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}r.DatasetInfo=rs;
  413. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  414. * This program are made available under the terms of the Apache License, Version 2.0
  415. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  416. class is{constructor(e){this.operation=N.UNION,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}}r.OverlayAnalystParameters=is;
  417. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  418. * This program are made available under the terms of the Apache License, Version 2.0
  419. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  420. class as extends is{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new It,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new It,this.tolerance=0,this.resultSetting=new Lt,ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetOverlayAnalystParameters"}destroy(){super.destroy();var e=this;if(e.operateDataset=null,e.operateDatasetFields=null,e.operateDatasetFilter&&(e.operateDatasetFilter.destroy(),e.operateDatasetFilter=null),e.operateRegions){for(var t=0,s=e.operateRegions,r=s.length;t<r;t++)s[t].destroy();e.operateRegions=null}e.sourceDataset=null,e.sourceDatasetFields=null,e.sourceDatasetFilter&&(e.sourceDatasetFilter.destroy(),e.sourceDatasetFilter=null),e.tolerance=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null)}static toObject(e,t){for(var s in e)if("sourceDataset"!==s)if("operateRegions"===s){t.operateRegions=[];var r=e.operateRegions;for(var i in r)r.hasOwnProperty(i)&&(t.operateRegions[i]=He.fromGeometry(r[i]))}else"resultSetting"===s?t.dataReturnOption=e.resultSetting:t[s]=e[s]}}r.DatasetOverlayAnalystParameters=as;
  421. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  422. * This program are made available under the terms of the Apache License, Version 2.0
  423. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  424. class ns{constructor(e){this.clipRegion=null,this.datumValue=0,this.expectedZValues=null,this.interval=0,this.resampleTolerance=0,this.smoothMethod=F.BSPLINE,this.smoothness=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParametersSetting"}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.datumValue=null,e.expectedZValues=null,e.interval=null,e.resampleTolerance=null,e.smoothMethod=null,e.smoothness=null}toJSON(){let e="'datumValue':"+ye.toJSON(this.datumValue);if(e+=",'interval':"+ye.toJSON(this.interval),e+=",'resampleTolerance':"+ye.toJSON(this.resampleTolerance),e+=",'smoothMethod':"+ye.toJSON(this.smoothMethod),e+=",'smoothness':"+ye.toJSON(this.smoothness),null!=this.expectedZValues&&(e+=",'expectedZValues':"+ye.toJSON(this.expectedZValues)),null!=this.clipRegion){var t=this.clipRegion;this.clipRegion instanceof Se&&this.clipRegion.components&&(t=He.fromGeometry(this.clipRegion)),e+=",'clipRegion':"+ye.toJSON(t)}return"{"+e+"}"}}r.SurfaceAnalystParametersSetting=ns;
  425. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  426. * This program are made available under the terms of the Apache License, Version 2.0
  427. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  428. class os{constructor(e){this.resolution=0,this.extractParameter=new ns,this.resultSetting=new Lt,this.surfaceAnalystMethod=R.ISOLINE,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParameters"}destroy(){var e=this;e.resolution=null,e.extractParameter&&(e.extractParameter.destroy(),e.extractParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.surfaceAnalystMethod=null}}r.SurfaceAnalystParameters=os;
  429. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  430. * This program are made available under the terms of the Apache License, Version 2.0
  431. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  432. class ls extends os{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new It,this.zValueFieldName=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetSurfaceAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.zValueFieldName=null}static toObject(e,t){for(var s in e)if("filterQueryParameter"===s&&(t.filterQueryParameter=e.filterQueryParameter),"extractParameter"===s)e.extractParameter.clipRegion instanceof Se&&e.extractParameter.clipRegion.components&&(e.extractParameter.clipRegion=He.fromGeometry(e.extractParameter.clipRegion)),t.extractParameter=e.extractParameter;else{if("dataset"===s)continue;if("surfaceAnalystMethod"===s)continue;t[s]=e[s]}}}r.DatasetSurfaceAnalystParameters=ls;
  433. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  434. * This program are made available under the terms of the Apache License, Version 2.0
  435. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  436. class hs{constructor(e){e&&(this.clipRegion=null,this.createResultDataset=!1,this.resultDatasetName=null,this.resultDatasourceName=null,this.returnResultRegion=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.ThiessenAnalystParameters")}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.createResultDataset=null,e.resultDatasetName=null,e.resultDatasourceName=null,e.returnResultRegion=null}}r.ThiessenAnalystParameters=hs;
  437. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  438. * This program are made available under the terms of the Apache License, Version 2.0
  439. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  440. class us extends hs{constructor(e){super(e),this.filterQueryParameter=null,this.dataset=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetThiessenAnalystParameters"}destroy(){super.destroy();this.filterQueryParameter&&(this.filterQueryParameter.destroy(),this.filterQueryParameter=null)}static toObject(e,t){for(var s in e)"clipRegion"===s?t.clipRegion=He.fromGeometry(e.clipRegion):t[s]=e[s]}}r.DatasetThiessenAnalystParameters=us;
  441. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  442. * This program are made available under the terms of the Apache License, Version 2.0
  443. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  444. class cs{constructor(e){this.dataset=null,this.bounds=null,this.fieldName=null,this.resultGridDatasetResolution=null,this.searchRadius=null,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.DensityKernelAnalystParameters"}destroy(){var e=this;e.dataset=null,e.bounds=null,e.fieldName=null,e.resultGridDatasetResolution=null,e.searchRadius=null,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var s in e)"dataset"!==s&&(t[s]=e[s])}}r.DensityKernelAnalystParameters=cs;
  445. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  446. * This program are made available under the terms of the Apache License, Version 2.0
  447. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  448. class ds extends _t{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.DensityAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t=this,s=new Object;e instanceof cs&&(t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/densityanalyst/kernel"),t.mode="kernel"),cs.toObject(e,s);var r=ye.toJSON(s);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}r.DensityAnalystService=ds;
  449. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  450. * This program are made available under the terms of the Apache License, Version 2.0
  451. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  452. class ps{constructor(e){this.dataSourceName=null,this.dataSetName=null,this.features=null,this.editType=k.ADD,this.IDs=null,this.returnContent=!1,this.isUseBatch=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.EditFeaturesParameters"}destroy(){var e=this;e.dataSourceName=null,e.dataSetName=null,e.features=null,e.editType=null,e.IDs=null,e.returnContent=null}static toJsonParameters(e){var t,s,r;if(e.editType===k.DELETE){if(null===e.IDs)return;r={ids:e.IDs}}else if(r=[],e.features){s=e.features.length;for(var i=0;i<s;i++)(t=e.features[i]).geometry=He.fromGeometry(t.geometry),r.push(t)}return ye.toJSON(r)}}r.EditFeaturesParameters=ps;
  453. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  454. * This program are made available under the terms of the Apache License, Version 2.0
  455. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  456. class ms extends gt{constructor(e,t){super(e,t),this.returnContent=!1,this.isUseBatch=!1,t&&ye.extend(this,t),this.url=ye.urlPathAppend(this.url,"features"),this.CLASS_NAME="SuperMap.EditFeaturesService"}destroy(){super.destroy();this.returnContent=null,this.isUseBatch=null,this.fromIndex=null,this.toIndex=null}processAsync(e){if(e instanceof ps){var t=this,s="POST",r="",i=e.editType,a=null;t.returnContent=e.returnContent,t.isUseBatch=e.isUseBatch,a=ps.toJsonParameters(e),i===k.DELETE?(r=ye.toJSON(e.IDs),t.url=ye.urlAppend(t.url,"ids="+r),s="DELETE",a=r):i===k.UPDATE?s="PUT":(t.isUseBatch&&(t.url=ye.urlAppend(t.url,`isUseBatch=${t.isUseBatch}`),t.returnContent=!1),t.returnContent&&(t.url=ye.urlAppend(t.url,"returnContent=true"),s="POST")),t.request({method:s,data:a,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}r.EditFeaturesService=ms;
  457. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  458. * This program are made available under the terms of the Apache License, Version 2.0
  459. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  460. class fs{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=null}}r.FacilityAnalyst3DParameters=fs;
  461. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  462. * This program are made available under the terms of the Apache License, Version 2.0
  463. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  464. class ys extends fs{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DParameters"}destroy(){super.destroy()}}r.FacilityAnalystSinks3DParameters=ys;
  465. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  466. * This program are made available under the terms of the Apache License, Version 2.0
  467. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  468. class gs extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DService"}destroy(){gt.prototype.destroy.apply(this,arguments)}processAsync(e){if(e instanceof ys){var t,s=this;s.url=ye.urlPathAppend(s.url,"sinks"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}r.FacilityAnalystSinks3DService=gs;
  469. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  470. * This program are made available under the terms of the Apache License, Version 2.0
  471. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  472. class vs extends fs{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DParameters"}destroy(){super.destroy()}}r.FacilityAnalystSources3DParameters=vs;
  473. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  474. * This program are made available under the terms of the Apache License, Version 2.0
  475. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  476. class Ss extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof vs){var t,s=this;s.url=ye.urlPathAppend(s.url,"sources"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}r.FacilityAnalystSources3DService=Ss;
  477. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  478. * This program are made available under the terms of the Apache License, Version 2.0
  479. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  480. class bs{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}r.FacilityAnalystStreamParameters=bs;
  481. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  482. * This program are made available under the terms of the Apache License, Version 2.0
  483. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  484. class xs extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof bs){var t,s=this;if(0===e.queryType)s.url=ye.urlPathAppend(s.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;s.url=ye.urlPathAppend(s.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID||null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed}))}}}r.FacilityAnalystStreamService=xs;
  485. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  486. * This program are made available under the terms of the Apache License, Version 2.0
  487. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  488. class Cs extends fs{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}r.FacilityAnalystTracedown3DParameters=Cs;
  489. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  490. * This program are made available under the terms of the Apache License, Version 2.0
  491. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  492. class Ts extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Cs){var t,s=this;s.url=ye.urlPathAppend(s.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}r.FacilityAnalystTracedown3DService=Ts;
  493. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  494. * This program are made available under the terms of the Apache License, Version 2.0
  495. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  496. class _s extends fs{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}r.FacilityAnalystTraceup3DParameters=_s;
  497. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  498. * This program are made available under the terms of the Apache License, Version 2.0
  499. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  500. class Es extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _s){var t,s=this;s.url=ye.urlPathAppend(s.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}r.FacilityAnalystTraceup3DService=Es;
  501. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  502. * This program are made available under the terms of the Apache License, Version 2.0
  503. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  504. class As extends fs{constructor(e){super(e),e=e||{},this.sourceNodeIDs=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DParameters"}destroy(){super.destroy(),this.sourceNodeIDs=null}}r.FacilityAnalystUpstream3DParameters=As;
  505. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  506. * This program are made available under the terms of the Apache License, Version 2.0
  507. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  508. class ws extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof As){var t,s=this;s.url=ye.urlPathAppend(s.url,"upstreamcirticalfaclilities"),t={sourceNodeIDs:e.sourceNodeIDs,edgeID:e.edgeID,nodeID:e.nodeID,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}r.FacilityAnalystUpstream3DService=ws;
  509. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  510. * This program are made available under the terms of the Apache License, Version 2.0
  511. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  512. class Ps extends Ct{constructor(e){super(e),this.filterParam=null,this.aggType=ie.FILTER,this.CLASS_NAME="SuperMap.FilterAggParameter",ye.extend(this,e)}destroy(){super.destroy();this.filterParam&&(this.filterParam=null)}}r.FilterAggParameter=Ps;
  513. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  514. * This program are made available under the terms of the Apache License, Version 2.0
  515. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  516. class Ls{constructor(e){this.datasource=null,this.dataset=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FieldParameters"}destroy(){this.datasource=null,this.dataset=null}}r.FieldParameters=Ls;
  517. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  518. * This program are made available under the terms of the Apache License, Version 2.0
  519. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  520. class Os extends Ls{constructor(e){super(e),this.fieldName=null,this.statisticMode=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FieldStatisticsParameters"}destroy(){this.fieldName=null,this.statisticMode=null}}r.FieldStatisticsParameters=Os;
  521. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  522. * This program are made available under the terms of the Apache License, Version 2.0
  523. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  524. class Ms extends gt{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.FieldStatisticService"}destroy(){super.destroy();this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null}processAsync(){var e=this,t="datasources/"+e.datasource+"/datasets/"+e.dataset+"/fields/"+e.field+"/"+e.statisticMode;e.url=ye.urlPathAppend(e.url,t),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}r.FieldStatisticService=Ms;
  525. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  526. * This program are made available under the terms of the Apache License, Version 2.0
  527. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  528. class Ns{constructor(e){this.event=null,this.expectFacilityCount=1,this.facilities=null,this.fromEvent=!1,this.isAnalyzeById=!1,this.maxWeight=0,this.parameter=new $t,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindClosestFacilitiesParameters"}destroy(){var e=this;e.event=null,e.expectFacilityCount=null,e.facilities=null,e.fromEvent=null,e.isAnalyzeById=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}r.FindClosestFacilitiesParameters=Ns;
  529. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  530. * This program are made available under the terms of the Apache License, Version 2.0
  531. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  532. class Is extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ns){var t,s=this;s.url=ye.urlPathAppend(s.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:ye.toJSON(e.parameter),event:ye.toJSON(e.event),facilities:s.getJson(e.isAnalyzeById,e.facilities)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new je;return e.facilityPathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}r.FindClosestFacilitiesService=Is;
  533. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  534. * This program are made available under the terms of the Apache License, Version 2.0
  535. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  536. class Fs{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,s=e.supplyCenters,r=s.length;t<r;t++)s[t].destroy();e.supplyCenters=null}}}r.FindLocationParameters=Fs;
  537. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  538. * This program are made available under the terms of the Apache License, Version 2.0
  539. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  540. class Rs extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Fs){var t,s=this;s.url=ye.urlPathAppend(s.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:ye.toJSON(e.mapParameter),supplyCenters:s.getCentersJson(e.supplyCenters)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getCentersJson(e){for(var t="[",s=e?e.length:0,r=0;r<s;r++)r>0&&(t+=","),t+=ye.toJSON(e[r]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new je;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}r.FindLocationService=Rs;
  541. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  542. * This program are made available under the terms of the Apache License, Version 2.0
  543. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  544. class Ds{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new $t,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}r.FindMTSPPathsParameters=Ds;
  545. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  546. * This program are made available under the terms of the Apache License, Version 2.0
  547. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  548. class ks extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ds){var t,s=this,r=s.getJson(e.isAnalyzeById,e.centers),i=s.getJson(e.isAnalyzeById,e.nodes);s.url=ye.urlPathAppend(s.url,"mtsppath"),t={centers:r,nodes:i,parameter:ye.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new je;return e.pathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}r.FindMTSPPathsService=ks;
  549. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  550. * This program are made available under the terms of the Apache License, Version 2.0
  551. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  552. class Bs{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new $t,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}r.FindPathParameters=Bs;
  553. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  554. * This program are made available under the terms of the Apache License, Version 2.0
  555. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  556. class Gs extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Bs){var t,s=this;s.url=ye.urlPathAppend(s.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:ye.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new je;return e.pathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}r.FindPathService=Gs;
  557. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  558. * This program are made available under the terms of the Apache License, Version 2.0
  559. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  560. class Us{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new $t,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}r.FindServiceAreasParameters=Us;
  561. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  562. * This program are made available under the terms of the Apache License, Version 2.0
  563. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  564. class Js extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Us){var t,s=this;s.url=ye.urlPathAppend(s.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:ye.toJSON(e.parameter),centers:s.getJson(e.isAnalyzeById,e.centers),weights:s.getJson(!0,e.weights)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new je;return e.serviceAreaList.map(function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e}),e}}r.FindServiceAreasService=Js;
  565. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  566. * This program are made available under the terms of the Apache License, Version 2.0
  567. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  568. class Hs{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new $t,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}r.FindTSPPathsParameters=Hs;
  569. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  570. * This program are made available under the terms of the Apache License, Version 2.0
  571. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  572. class js extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Hs){var t,s=this;s.url=ye.urlPathAppend(s.url,"tsppath"),t={parameter:r.Util.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:s.getNodesJson(e)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getNodesJson(e){var t,s,r,i,a="";if(!1===e.isAnalyzeById){for(t="[",s=0,r=(i=e.nodes).length;s<r;s++)s>0&&(t+=","),t+='{"x":'+i[s].x+',"y":'+i[s].y+"}";a+=t+="]"}else if(!0===e.isAnalyzeById){let t="[",s=e.nodes,r=s.length;for(let e=0;e<r;e++)e>0&&(t+=","),t+=s[e];a+=t+="]"}return a}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new je;return e.tspPathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}r.FindTSPPathsService=js;
  573. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  574. * This program are made available under the terms of the Apache License, Version 2.0
  575. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  576. class Vs{constructor(e){this.routeTable=null,this.routeIDField=null,this.attributeFilter=null,this.eventTable=null,this.eventRouteIDField=null,this.measureField=null,this.measureStartField=null,this.measureEndField=null,this.measureOffsetField=null,this.errorInfoField=null,this.retainedFields=null,this.dataReturnOption=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GenerateSpatialDataParameters"}destroy(){var e=this;e.routeTable&&(e.routeTable=null),e.routeIDField=null,e.attributeFilter=null,e.eventTable=null,e.eventRouteIDField=null,e.measureField=null,e.measureStartField=null,e.measureEndField=null,e.measureOffsetField=null,e.errorInfoField=null,e.dataReturnOption&&(e.dataReturnOption.destroy(),e.dataReturnOption=null)}}r.GenerateSpatialDataParameters=Vs;
  577. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  578. * This program are made available under the terms of the Apache License, Version 2.0
  579. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  580. class Ws extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Vs){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return this.url=ye.urlPathAppend(this.url,t),this.url=ye.urlAppend(this.url,"returnContent=true"),ye.toJSON(e)}}r.GenerateSpatialDataService=Ws;
  581. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  582. * This program are made available under the terms of the Apache License, Version 2.0
  583. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  584. class zs extends xt{constructor(e){super(e),this.bounds=null,this.queryType=ae.GEO_BOUNDING_BOX,this.CLASS_NAME="SuperMap.GeoBoundingBoxQueryBuilderParameter",ye.extend(this,e)}destroy(){super.destroy(),this.bounds=null,this.queryType=null}}r.GeoBoundingBoxQueryBuilderParameter=zs;
  585. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  586. * This program are made available under the terms of the Apache License, Version 2.0
  587. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class qs extends Ct{constructor(e){super(e),this.precision=5,this.aggType=ie.GEOHASH_GRID,ye.extend(this,e),this.CLASS_NAME="SuperMap.GeoHashGridAggParameter"}destroy(){super.destroy(),this.aggType=null}static toJsonParameters(e){var t={aggName:e.aggName,aggFieldName:e.aggFieldName,aggType:e.aggType,precision:e.precision};return e.subAgg&&(t.subAgg=e.subAgg),ye.toJson(t)}}r.GeoHashGridAggParameter=qs;
  588. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  589. * This program are made available under the terms of the Apache License, Version 2.0
  590. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  591. class Ys extends is{constructor(e){super(e),e&&e.operateGeometry&&(this.operateGeometry=e.operateGeometry),e&&e.sourceGeometry&&(this.sourceGeometry=e.sourceGeometry),e&&e.operateGeometries&&(this.operateGeometries=e.operateGeometries),e&&e.sourceGeometries&&(this.sourceGeometries=e.sourceGeometries),e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometryOverlayAnalystParameters"}destroy(){super.destroy();var e=this;e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.sourceGeometries&&(e.sourceGeometries.destroy(),e.sourceGeometries=null),e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.operateGeometries&&(e.operateGeometries.destroy(),e.operateGeometries=null)}static toObject(e,t){for(var s in e)if("sourceGeometry"===s)t.sourceGeometry=He.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===s){for(var r=[],i=0;i<e.sourceGeometries.length;i++)r.push(He.fromGeometry(e.sourceGeometries[i]));t.sourceGeometries=r}else if("operateGeometry"===s)t.operateGeometry=He.fromGeometry(e.operateGeometry);else if("operateGeometries"===s){for(var a=[],n=0;n<e.operateGeometries.length;n++)a.push(He.fromGeometry(e.operateGeometries[n]));t.operateGeometries=a}else t[s]=e[s]}}r.GeometryOverlayAnalystParameters=Ys;
  592. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  593. * This program are made available under the terms of the Apache License, Version 2.0
  594. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  595. class Qs extends os{constructor(e){super(e),this.points=null,this.zValues=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometrySurfaceAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=0,t=this.points,s=t.length;e<s;e++)t[e].destroy();this.points=null}this.zValues=null}}r.GeometrySurfaceAnalystParameters=Qs;
  596. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  597. * This program are made available under the terms of the Apache License, Version 2.0
  598. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  599. class Xs extends hs{constructor(e){super(e),this.points=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometryThiessenAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=this.points.length-1;e>=0;e--)this.points[e].destroy();this.points=null}}static toObject(e,t){for(var s in e)"clipRegion"===s?t.clipRegion=He.fromGeometry(e.clipRegion):t[s]=e[s]}}r.GeometryThiessenAnalystParameters=Xs;class Ks extends gt{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.GeoprocessingService",this.headers={},this.crossOrigin=!0}getTools(){this._get(`${this.url}/list`)}getTool(e){this._get(`${this.url}/${e}`)}execute(e,t,s){const r={parameter:t=t||null,environment:s=s||null};this._get(`${this.url}/${e}/execute`,r)}submitJob(e,t,s){const r={parameter:t=t||null,environments:s=s||null};this.request({url:`${this.url}/${e}/jobs`,headers:{"Content-type":"application/json"},method:"POST",data:JSON.stringify(r),scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}waitForJobCompletion(e,t,s){const r=this,i=setInterval(function(){r._get(`${r.url}/${t}/jobs/${e}`,null,function(e){const t=e.state.runState;switch(s.statusCallback&&s.statusCallback(t),t){case"FINISHED":clearInterval(i),r.events.triggerEvent("processCompleted",{result:e});break;case"FAILED":case"CANCELED":clearInterval(i),r.events.triggerEvent("processFailed",{result:e})}})},s.interval)}getJobInfo(e,t){this._get(`${this.url}/${e}/jobs/${t}`)}cancelJob(e,t){this._get(`${this.url}/${e}/jobs/${t}/cancel`)}getJobs(e){let t=`${this.url}/jobs`;e&&(t=`${this.url}/${e}/jobs`),this._get(t)}getResults(e,t,s){let r=`${this.url}/${e}/jobs/${t}/results`;s&&(r=`${r}/${s}`),this._get(r)}_get(e,t,s,r){this.request({url:e,method:"GET",params:t,headers:{"Content-type":"application/json"},scope:this,success:s||this.serviceProcessCompleted,failure:r||this.serviceProcessFailed})}}r.GeoprocessingService=Ks;
  600. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  601. * This program are made available under the terms of the Apache License, Version 2.0
  602. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  603. class Zs{constructor(e){this.dataset=null,this.sourceFilter=null,this.referenceFilter=null,this.spatialRelationType=null,this.isBorderInside=null,this.returnFeature=null,this.returnGeoRelatedOnly=null,this.startRecord=0,this.expectCount=500,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeoRelationAnalystParameters"}destroy(){var e=this;e.sourceFilter&&e.sourceFilter.destroy(),e.sourceFilter=null,e.referenceFilter&&e.referenceFilter.destroy(),e.referenceFilter=null,e.dataset=null,e.spatialRelationType=null,e.isBorderInside=null,e.returnFeature=null,e.returnGeoRelatedOnly=null,e.startRecord=null,e.expectCount=null}}r.GeoRelationAnalystParameters=Zs;
  604. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  605. * This program are made available under the terms of the Apache License, Version 2.0
  606. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  607. class $s extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Zs){var t=this;t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/georelation");var s=r.Util.toJSON(e);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}r.GeoRelationAnalystService=$s;
  608. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  609. * This program are made available under the terms of the Apache License, Version 2.0
  610. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  611. class er{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.aggregations=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}r.GetFeaturesParametersBase=er;
  612. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  613. * This program are made available under the terms of the Apache License, Version 2.0
  614. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  615. class tr extends er{constructor(e){super(e),this.getFeatureMode=tr.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,s,r;return s={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},r={datasetNames:e.datasetNames,getFeatureMode:tr.getFeatureMode.BOUNDS,bounds:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new It).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode=tr.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),ye.toJSON(r)}}tr.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"},r.GetFeaturesByBoundsParameters=tr;
  616. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  617. * This program are made available under the terms of the Apache License, Version 2.0
  618. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  619. class sr extends gt{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.maxFeatures=null,this.format=i.GEOJSON,ye.extend(this,t),this.url=ye.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null}processAsync(e){if(e){var t,s=this,r=!0;s.returnContent=e.returnContent,s.fromIndex=e.fromIndex,s.toIndex=e.toIndex,s.maxFeatures=e.maxFeatures,s.returnContent&&(s.url=ye.urlAppend(s.url,"returnContent="+s.returnContent),r=!1),null!=s.fromIndex&&null!=s.toIndex&&!isNaN(s.fromIndex)&&!isNaN(s.toIndex)&&s.fromIndex>=0&&s.toIndex>=0&&!r&&(s.url=ye.urlAppend(s.url,`fromIndex=${s.fromIndex}&toIndex=${s.toIndex}`)),e.returnCountOnly&&(s.url=ye.urlAppend(s.url,"&returnCountOnly="+e.returnContent)),t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=ye.transformResult(e),this.format===i.GEOJSON&&e.features){var t=new je;e.features=t.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}r.GetFeaturesServiceBase=sr;
  620. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  621. * This program are made available under the terms of the Apache License, Version 2.0
  622. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  623. class rr extends sr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return tr.toJsonParameters(e)}}r.GetFeaturesByBoundsService=rr;
  624. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  625. * This program are made available under the terms of the Apache License, Version 2.0
  626. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  627. class ir extends er{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBufferParameters"}destroy(){super.destroy();var e=this;if(e.bufferDistance=null,e.attributeFilter=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}static toJsonParameters(e){var t,s,r;return r=He.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:r},e.fields&&((t=new It).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),ye.toJSON(s)}}r.GetFeaturesByBufferParameters=ir;
  628. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  629. * This program are made available under the terms of the Apache License, Version 2.0
  630. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  631. class ar extends sr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof ir)return r.GetFeaturesByBufferParameters.toJsonParameters(e)}}r.GetFeaturesByBufferService=ar;
  632. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  633. * This program are made available under the terms of the Apache License, Version 2.0
  634. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  635. class nr extends er{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryParameters"}destroy(){super.destroy();var e=this;if(e.geometry&&(e.geometry.destroy(),e.geometry=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,s,r;return s=He.fromGeometry(e.geometry),r={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new It).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),ye.toJSON(r)}}r.GetFeaturesByGeometryParameters=nr;
  636. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  637. * This program are made available under the terms of the Apache License, Version 2.0
  638. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  639. class or extends sr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return nr.toJsonParameters(e)}}r.GetFeaturesByGeometryService=or;
  640. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  641. * This program are made available under the terms of the Apache License, Version 2.0
  642. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  643. class lr extends er{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByIDsParameters"}destroy(){super.destroy();var e=this;if(e.IDs=null,e.getFeatureMode=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}}static toJsonParameters(e){var t,s;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((s=new It).name=e.datasetNames,s.fields=e.fields,t.queryParameter=s),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),ye.toJSON(t)}}r.GetFeaturesByIDsParameters=lr;
  644. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  645. * This program are made available under the terms of the Apache License, Version 2.0
  646. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  647. class hr extends sr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return lr.toJsonParameters(e)}}r.GetFeaturesByIDsService=hr;
  648. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  649. * This program are made available under the terms of the Apache License, Version 2.0
  650. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  651. class ur extends er{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesBySQLParameters"}destroy(){super.destroy();this.getFeatureMode=null,this.queryParameter&&(this.queryParameter.destroy(),this.queryParameter=null)}static toJsonParameters(e){var t={datasetNames:e.datasetNames,getFeatureMode:"SQL",queryParameter:e.queryParameter};return e.maxFeatures&&!isNaN(e.maxFeatures)&&(t.maxFeatures=e.maxFeatures),e.aggregations&&(t.aggregations=e.aggregations),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),ye.toJSON(t)}}r.GetFeaturesBySQLParameters=ur;
  652. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  653. * This program are made available under the terms of the Apache License, Version 2.0
  654. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  655. class cr extends sr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return ur.toJsonParameters(e)}}r.GetFeaturesBySQLService=cr;
  656. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  657. * This program are made available under the terms of the Apache License, Version 2.0
  658. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  659. class dr extends gt{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this;e.url=ye.urlPathAppend(e.url,`datasources/${e.datasource}/datasets/${e.dataset}/fields`),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}r.GetFieldsService=dr;
  660. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  661. * This program are made available under the terms of the Apache License, Version 2.0
  662. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  663. class pr{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}}r.GetGridCellInfosParameters=pr;
  664. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  665. * This program are made available under the terms of the Apache License, Version 2.0
  666. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  667. class mr extends gt{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetGridCellInfosService"}destroy(){super.destroy();var e=this;e.X=null,e.Y=null,e.datasetName=null,e.dataSourceName=null,e.datasetType=null}processAsync(e){if(e instanceof pr){ye.extend(this,e);var t=this;t.url=ye.urlPathAppend(t.url,`datasources/${t.dataSourceName}/datasets/${t.datasetName}`),t.queryRequest(t.getDatasetInfoCompleted,t.getDatasetInfoFailed)}}queryRequest(e,t){this.request({method:"GET",data:null,scope:this,success:e,failure:t})}getDatasetInfoCompleted(e){e=ye.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this;e.url=ye.urlPathAppend(e.url,"GRID"==e.datasetType?"gridValue":"imageValue"),null!=e.X&&null!=e.Y&&(e.url=ye.urlAppend(e.url,`x=${e.X}&y=${e.Y}`)),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}}r.GetGridCellInfosService=mr;
  668. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  669. * This program are made available under the terms of the Apache License, Version 2.0
  670. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  671. class fr{constructor(e,t){this.srcData=e,this.targetData=t,this.CLASS_NAME="SuperMap.ThemeMemoryData"}destroy(){this.srcData=null,this.targetData=null}toJSON(){if(this.srcData&&this.targetData){for(var e="",t=Math.min(this.srcData.length,this.targetData.length),s=0;s<t;s++)e+="'"+this.srcData[s]+"':'"+this.targetData[s]+"',";return s>0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}r.ThemeMemoryData=fr;
  672. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  673. * This program are made available under the terms of the Apache License, Version 2.0
  674. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  675. class yr{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}}r.Theme=yr;
  676. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  677. * This program are made available under the terms of the Apache License, Version 2.0
  678. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  679. class gr{constructor(e){this.align=C.BASELINECENTER,this.backColor=new Be(255,255,255),this.foreColor=new Be(0,0,0),this.backOpaque=!1,this.sizeFixed=!0,this.fontHeight=6,this.fontWidth=0,this.fontWeight=400,this.fontName="Times New Roman",this.bold=!1,this.italic=!1,this.italicAngle=0,this.shadow=!1,this.strikeout=!1,this.outline=!1,this.opaqueRate=0,this.underline=!1,this.rotation=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerTextStyle"}destroy(){var e=this;e.align=null,e.backColor&&(e.backColor.destroy(),e.backColor=null),e.foreColor&&(e.foreColor.destroy(),e.foreColor=null),e.backOpaque=null,e.sizeFixed=null,e.fontHeight=null,e.fontWidth=null,e.fontWeight=null,e.fontName=null,e.bold=null,e.italic=null,e.italicAngle=null,e.shadow=null,e.strikeout=null,e.outline=null,e.opaqueRate=null,e.underline=null,e.rotation=null}static fromObj(e){var t=new gr(e);return ye.copy(t,e),t.backColor=Be.fromJson(e.backColor),t.foreColor=Be.fromJson(e.foreColor),t}}r.ServerTextStyle=gr;
  680. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  681. * This program are made available under the terms of the Apache License, Version 2.0
  682. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  683. class vr{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new gr,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new vr;return ye.copy(t,e),t}}}r.ThemeLabelItem=vr;
  684. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  685. * This program are made available under the terms of the Apache License, Version 2.0
  686. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  687. class Sr{constructor(e){this.caption=null,this.style=new Ge,this.unique=null,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new Sr;return ye.copy(t,e),t.style=Ge.fromJson(e.style),t}}r.ThemeUniqueItem=Sr;
  688. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  689. * This program are made available under the terms of the Apache License, Version 2.0
  690. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  691. class br{constructor(e){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeFlow"}destroy(){var e=this;e.flowEnabled=null,e.leaderLineDisplayed=null,e.leaderLineStyle&&(e.leaderLineStyle.destroy(),e.leaderLineStyle=null)}static fromObj(e){if(e){var t=new br;return ye.copy(t,e),t.leaderLineStyle=Ge.fromJson(e.leaderLineStyle),t}}}r.ThemeFlow=br;
  692. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  693. * This program are made available under the terms of the Apache License, Version 2.0
  694. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  695. class xr{constructor(e){this.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeOffset"}destroy(){this.offsetFixed=null,this.offsetX=null,this.offsetY=null}static fromObj(e){if(e){var t=new xr;return ye.copy(t,e),t}}}r.ThemeOffset=xr;
  696. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  697. * This program are made available under the terms of the Apache License, Version 2.0
  698. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  699. class Cr{constructor(e){this.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new gr,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelMixedTextStyle"}destroy(){var e=this;if(e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null),e.separator=null,e.separatorEnabled=null,e.splitIndexes&&(e.splitIndexes=null),e.styles){for(var t=0,s=e.styles,r=s.length;t<r;t++)s[t].destroy();e.styles=null}}static fromObj(e){if(e){var t=new Cr,s=e.styles;if(ye.copy(t,e),t.defaultStyle=new gr(e.defaultStyle),s){t.styles=[];for(var r=0,i=s.length;r<i;r++)t.styles.push(new gr(s[r]))}return t}}}r.LabelMixedTextStyle=Cr;
  700. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  701. * This program are made available under the terms of the Apache License, Version 2.0
  702. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  703. class Tr{constructor(e){this.maxTextHeight=0,this.maxTextWidth=0,this.minTextHeight=0,this.minTextWidth=0,this.uniformStyle=new gr,this.uniformMixedStyle=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelText"}destroy(){var e=this;e.maxTextHeight=null,e.maxTextWidth=null,e.minTextHeight=null,e.minTextWidth=null,e.uniformStyle&&(e.uniformStyle.destroy(),e.uniformStyle=null),e.uniformMixedStyle&&(e.uniformMixedStyle.destroy(),e.uniformMixedStyle=null)}static fromObj(e){if(e){var t=new Tr;return ye.copy(t,e),t.uniformStyle=gr.fromObj(e.uniformStyle),t.uniformMixedStyle=Cr.fromObj(e.uniformMixedStyle),t}}}r.ThemeLabelText=Tr;
  704. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  705. * This program are made available under the terms of the Apache License, Version 2.0
  706. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  707. class _r{constructor(e){this.isAlongLine=!0,this.alongLineDirection=_.LB_TO_RT,this.angleFixed=!1,this.repeatedLabelAvoided=!1,this.repeatIntervalFixed=!1,this.labelRepeatInterval=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelAlongLine"}destroy(){var e=this;e.isAlongLine=null,e.alongLineDirection=null,e.angleFixed=null,e.repeatedLabelAvoided=null,e.repeatIntervalFixed=null,e.labelRepeatInterval=null}static fromObj(e){if(e){var t=new _r;return ye.copy(t,e),t}}}r.ThemeLabelAlongLine=_r;
  708. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  709. * This program are made available under the terms of the Apache License, Version 2.0
  710. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  711. class Er{constructor(e){this.labelBackShape=E.NONE,this.backStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelBackground"}destroy(){this.labelBackShape=null,this.backStyle&&(this.backStyle.destroy(),this.backStyle=null)}static fromObj(e){if(e){var t=new Er;return t.labelBackShape=e.labelBackShape,t.backStyle=Ge.fromJson(e.backStyle),t}}}r.ThemeLabelBackground=Er;
  712. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  713. * This program are made available under the terms of the Apache License, Version 2.0
  714. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  715. class Ar extends yr{constructor(e){super("LABEL",e),this.alongLine=new _r,this.background=new Er,this.flow=new br,this.items=null,this.uniqueItems=null,this.labelExpression=null,this.labelOverLengthMode=A.NONE,this.matrixCells=null,this.maxLabelLength=256,this.numericPrecision=0,this.offset=new xr,this.overlapAvoided=!0,this.rangeExpression=null,this.uniqueExpression=null,this.smallGeometryLabeled=!1,this.text=new Tr,this.textSpace=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabel"}destroy(){super.destroy();var e=this;if(e.alongLine=null,e.background&&(e.background.destroy(),e.background=null),e.flow=null,e.items){for(var t=0,s=e.items,r=s.length;t<r;t++)s[t].destroy();e.items=null}if(e.uniqueItems){for(var i=0,a=e.uniqueItems,n=a.length;i<n;i++)a[i].destory();e.uniqueItems=null}e.labelExpression=null,e.labelOverLengthMode=null,e.matrixCells=null,e.maxLabelLength=null,e.numericPrecision=null,e.overlapAvoided=null,e.rangeExpression=null,e.uniqueExpression=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.smallGeometryLabeled=null,e.text&&(e.text.destroy(),e.text=null),e.textSpace=null}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,this.alongLine&&(e.alongLine=this.alongLine.isAlongLine,e.alongLineDirection=this.alongLine.alongLineDirection,e.angleFixed=this.alongLine.angleFixed,e.isLabelRepeated=this.alongLine.isLabelRepeated,e.labelRepeatInterval=this.alongLine.labelRepeatInterval,e.repeatedLabelAvoided=this.alongLine.repeatedLabelAvoided,e.repeatIntervalFixed=this.alongLine.repeatIntervalFixed),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.text&&(e.maxTextHeight=this.text.maxTextHeight,e.maxTextWidth=this.text.maxTextWidth,e.minTextHeight=this.text.minTextHeight,e.minTextWidth=this.text.minTextWidth,e.uniformStyle=this.text.uniformStyle,e.uniformMixedStyle=this.text.uniformMixedStyle),this.background&&(e.labelBackShape=this.background.labelBackShape,e.backStyle=this.background.backStyle),e.labelOverLengthMode=this.labelOverLengthMode,e.maxLabelLength=this.maxLabelLength,e.smallGeometryLabeled=this.smallGeometryLabeled,e.rangeExpression=this.rangeExpression,e.uniqueExpression=this.uniqueExpression,e.numericPrecision=this.numericPrecision,e.items=this.items,e.uniqueItems=this.uniqueItems,e.labelExpression=this.labelExpression,e.overlapAvoided=this.overlapAvoided,e.matrixCells=this.matrixCells,e.textSpace=this.textSpace,e}static fromObj(e){if(e){var t=new Ar,s=e.items,r=e.uniqueItems,i=e.matrixCells;if(e.matrixCells=null,ye.copy(t,e),t.alongLine=_r.fromObj(e),t.background=Er.fromObj(e),t.flow=new br({flowEnabled:e.flowEnabled,leaderLineDisplayed:e.leaderLineDisplayed,leaderLineStyle:e.leaderLineStyle}),s){t.items=[];for(var a=0,n=s.length;a<n;a++)t.items.push(vr.fromObj(s[a]))}if(r){t.uniqueItems=[];for(let e=0,s=r.length;e<s;e++)t.uniqueItems.push(Sr.fromObj(r[e]))}if(i){t.matrixCells=[];for(let e=0,t=i.length;e<t;e++);}return t.offset=xr.fromObj(e),t.text=Tr.fromObj(e),t}}}r.ThemeLabel=Ar;
  716. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  717. * This program are made available under the terms of the Apache License, Version 2.0
  718. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  719. class wr extends yr{constructor(e){super("UNIQUE",e),this.defaultStyle=new Ge,this.items=null,this.uniqueExpression=null,this.colorGradientType=x.YELLOW_RED,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUnique"}destroy(){super.destroy();var e=this;if(e.uniqueExpression=null,e.colorGradientType=null,e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}toServerJSONObject(){var e={};if((e=ye.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r<s;r++)t.push(e.items[r].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new wr,s=e.items,r=s?s.length:0;ye.extend(t,e),t.items=[],t.defaultStyle=Ge.fromJson(e.defaultStyle);for(var i=0;i<r;i++)t.items.push(Sr.fromObj(s[i]));return t}}r.ThemeUnique=wr;
  720. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  721. * This program are made available under the terms of the Apache License, Version 2.0
  722. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  723. class Pr{constructor(e){this.axesColor=new Be(0,0,0),this.axesDisplayed=!1,this.axesGridDisplayed=!1,this.axesTextDisplayed=!1,this.axesTextStyle=new gr,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphAxes"}destroy(){var e=this;e.axesColor&&(e.axesColor.destroy(),e.axesColor=null),e.axesDisplayed=null,e.axesGridDisplayed=null,e.axesTextDisplayed=null,e.axesTextStyle&&(e.axesTextStyle.destroy(),e.axesTextStyle=null)}static fromObj(e){if(e){var t=new Pr;return ye.copy(t,e),t.axesColor=Be.fromJson(e.axesColor),t.axesTextStyle=gr.fromObj(e.axesTextStyle),t}}}r.ThemeGraphAxes=Pr;
  724. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  725. * This program are made available under the terms of the Apache License, Version 2.0
  726. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  727. class Lr{constructor(e){this.maxGraphSize=0,this.minGraphSize=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphSize"}destroy(){this.maxGraphSize=null,this.minGraphSize=null}static fromObj(e){var t=new Lr;return ye.copy(t,e),t}}r.ThemeGraphSize=Lr;
  728. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  729. * This program are made available under the terms of the Apache License, Version 2.0
  730. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  731. class Or{constructor(e){this.graphTextDisplayed=!1,this.graphTextFormat=f.CAPTION,this.graphTextStyle=new gr,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphText"}destroy(){var e=this;e.graphTextDisplayed=null,e.graphTextFormat=null,e.graphTextStyle&&(e.graphTextStyle.destroy(),e.graphTextStyle=null)}static fromObj(e){var t=new Or;return ye.copy(t,e),t.graphTextStyle=gr.fromObj(e.graphTextStyle),t}}r.ThemeGraphText=Or;
  732. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  733. * This program are made available under the terms of the Apache License, Version 2.0
  734. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  735. class Mr{constructor(e){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphItem"}destroy(){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=null}static fromObj(e){if(e){var t=new Mr;return ye.copy(t,e),t.uniformStyle=Ge.fromJson(e.uniformStyle),t}}}r.ThemeGraphItem=Mr;
  736. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  737. * This program are made available under the terms of the Apache License, Version 2.0
  738. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  739. class Nr extends yr{constructor(e){super("GRAPH",e),this.barWidth=0,this.flow=new br,this.graduatedMode=v.CONSTANT,this.graphAxes=new Pr,this.graphSize=new Lr,this.graphSizeFixed=!1,this.graphText=new Or,this.graphType=y.AREA,this.graphAxesTextDisplayMode=g.NONE,this.items=null,this.memoryKeys=null,this.negativeDisplayed=!1,this.offset=new xr,this.overlapAvoided=!0,this.roseAngle=0,this.startAngle=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraph"}destroy(){super.destroy();var e=this;if(e.barWidth=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=null,e.graphAxes&&(e.graphAxes.destroy(),e.graphAxes=null),e.graphSize&&(e.graphSize.destroy(),e.graphSize=null),e.graphSizeFixed=null,e.graphText&&(e.graphText.destroy(),e.graphText=null),e.graphType=null,e.items){for(var t=0,s=e.items,r=s.length;t<r;t++)s[t].destroy();e.items=null}e.memoryKeys=null,e.negativeDisplayed=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.roseAngle=null,e.startAngle=null,e.graphAxesTextDisplayMode=null}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,this.graphText&&(e.graphTextDisplayed=this.graphText.graphTextDisplayed,e.graphTextFormat=this.graphText.graphTextFormat,e.graphTextStyle=this.graphText.graphTextStyle),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.graphAxes&&(e.axesColor=this.graphAxes.axesColor,e.axesDisplayed=this.graphAxes.axesDisplayed,e.axesGridDisplayed=this.graphAxes.axesGridDisplayed,e.axesTextDisplayed=this.graphAxes.axesTextDisplayed,e.axesTextStyle=this.graphAxes.axesTextStyle),this.graphSize&&(e.maxGraphSize=this.graphSize.maxGraphSize,e.minGraphSize=this.graphSize.minGraphSize),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),e.barWidth=this.barWidth,e.graduatedMode=this.graduatedMode,e.graphSizeFixed=this.graphSizeFixed,e.graphType=this.graphType,e.graphAxesTextDisplayMode=this.graphAxesTextDisplayMode,e.items=this.items,e.memoryKeys=this.memoryKeys,e.negativeDisplayed=this.negativeDisplayed,e.overlapAvoided=this.overlapAvoided,e.roseAngle=this.roseAngle,e.startAngle=this.startAngle,e}static fromObj(e){var t=new Nr,s=e.items,r=s?s.length:0;ye.copy(t,e),t.items=[],t.flow=br.fromObj(e),t.graphAxes=Pr.fromObj(e),t.graphSize=Lr.fromObj(e),t.graphText=Or.fromObj(e),t.offset=xr.fromObj(e);for(var i=0;i<r;i++)t.items.push(Mr.fromObj(s[i]));return t}}r.ThemeGraph=Nr;
  740. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  741. * This program are made available under the terms of the Apache License, Version 2.0
  742. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  743. class Ir extends yr{constructor(e){super("DOTDENSITY",e),this.dotExpression=null,this.style=new Ge,this.value=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeDotDensity"}destroy(){var e=this;e.dotExpression=null,e.value=null,e.style&&(e.style.destroy(),e.style=null)}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Ir;return ye.copy(t,e),t.style=Ge.fromJson(e.style),t}}}r.ThemeDotDensity=Ir;
  744. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  745. * This program are made available under the terms of the Apache License, Version 2.0
  746. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  747. class Fr{constructor(e){this.negativeDisplayed=!1,this.negativeStyle=new Ge,this.positiveStyle=new Ge,this.zeroDisplayed=!1,this.zeroStyle=new Ge,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbolStyle"}destroy(){var e=this;e.negativeDisplayed=null,e.negativeStyle=null,e.positiveStyle=null,e.zeroDisplayed=null,e.zeroStyle=null}static fromObj(e){if(e){var t=new Fr;return ye.copy(t,e),t.negativeStyle=Ge.fromJson(e.negativeStyle),t.positiveStyle=Ge.fromJson(e.positiveStyle),t.zeroStyle=Ge.fromJson(e.zeroStyle),t}}}r.ThemeGraduatedSymbolStyle=Fr;
  748. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  749. * This program are made available under the terms of the Apache License, Version 2.0
  750. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  751. class Rr extends yr{constructor(e){super("GRADUATEDSYMBOL",e),this.baseValue=0,this.expression=null,this.flow=new br,this.graduatedMode=r.GraduatedMode.CONSTAN,this.offset=new xr,this.style=new Fr,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbol"}destroy(){super.destroy();var e=this;e.expression=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=v.CONSTANT,e.offset&&(e.offset.destroy(),e.offset=null),e.style&&(e.style.destroy(),e.style=null)}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,e.baseValue=this.baseValue,e.expression=this.expression,e.graduatedMode=this.graduatedMode,this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.style&&(e.negativeStyle=this.style.negativeStyle,e.negativeDisplayed=this.style.negativeDisplayed,e.positiveStyle=this.style.positiveStyle,e.zeroDisplayed=this.style.zeroDisplayed,e.zeroStyle=this.style.zeroStyle),e}static fromObj(e){if(e){var t=new r.ThemeGraduatedSymbol;return ye.copy(t,e),t.flow=br.fromObj(e),t.offset=xr.fromObj(e),t.style=Fr.fromObj(e),t}}}r.ThemeGraduatedSymbol=Rr;
  752. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  753. * This program are made available under the terms of the Apache License, Version 2.0
  754. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  755. class Dr{constructor(e){this.caption=null,this.end=0,this.start=0,this.style=new Ge,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Dr;return ye.copy(t,e),t.style=Ge.fromJson(e.style),t}}}r.ThemeRangeItem=Dr;
  756. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  757. * This program are made available under the terms of the Apache License, Version 2.0
  758. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  759. class kr extends yr{constructor(e){super("RANGE",e),this.precision="1.0E-12",this.items=null,this.rangeExpression=null,this.rangeMode=S.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=x.YELLOW_RED,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new kr;ye.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i<r;i++)t.items.push(Dr.fromObj(s[i]));return t}}}r.ThemeRange=kr;
  760. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  761. * This program are made available under the terms of the Apache License, Version 2.0
  762. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  763. class Br{constructor(e){e=e||{},this.bounds=null,this.caption=null,this.description=null,this.name=null,this.queryable=null,this.subLayers=null,this.type=null,this.visible=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.UGCLayer"}destroy(){ye.reset(this)}fromJson(e){e=e||{},ye.extend(this,e);var t=this.bounds;t&&(this.bounds=new ve(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y))}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}r.UGCLayer=Br;
  764. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  765. * This program are made available under the terms of the Apache License, Version 2.0
  766. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  767. class Gr{constructor(e){e=e||{},this.allowPointOverlap=!0,this.allowPointWithTextDisplay=!0,this.allowTextOverlap=!1,this.allowTextAndPointOverlap=!0,this.allowThemeGraduatedSymbolOverlap=!1,this.allowThemeGraphOverlap=!1,this.horizontalOverlappedSpaceSize=0,this.verticalOverlappedSpaceSize=0,ye.extend(this,e),this.ugcLayer=new Br(e),this.CLASS_NAME="SuperMap.OverlapDisplayedOptions"}destroy(){ye.reset(this)}fromJson(e){this.ugcLayer.fromJson.apply(this,[e])}toServerJSONObject(){return this.ugcLayer.toServerJSONObject.apply(this,arguments)}toString(){var e=this.ugcLayer.toServerJSONObject.apply(this,arguments),t="{";for(var s in e)e.hasOwnProperty(s)&&(t+="'"+s+"':"+e[s]+",");return t=t.substr(0,t.length-1),t+="}"}}r.OverlapDisplayedOptions=Gr;
  768. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  769. * This program are made available under the terms of the Apache License, Version 2.0
  770. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  771. class Ur extends Br{constructor(e){super(e=e||{}),this.completeLineSymbolDisplayed=null,this.maxScale=null,this.minScale=null,this.minVisibleGeometrySize=null,this.opaqueRate=null,this.symbolScalable=null,this.symbolScale=null,this.overlapDisplayed=null,this.overlapDisplayedOptions=null,this.CLASS_NAME="SuperMap.UGCMapLayer"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e)}toServerJSONObject(){return super.toServerJSONObject()}}r.UGCMapLayer=Ur;
  772. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  773. * This program are made available under the terms of the Apache License, Version 2.0
  774. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  775. class Jr extends Ur{constructor(e){super(e=e||{}),this.datasetInfo=null,this.displayFilter=null,this.joinItems=null,this.representationField=null,this.ugcLayerType=null,this.CLASS_NAME="SuperMap.UGCSubLayer"}fromJson(e){if(super.fromJson(e),this.datasetInfo&&(this.datasetInfo=new rs(this.datasetInfo)),this.joinItems&&this.joinItems.length){for(var t=[],s=0;s<this.joinItems.length;s++)t[s]=new Ot(this.joinItems[s]);this.joinItems=t}}destroy(){super.destroy(),ye.reset(this)}toServerJSONObject(){var e=super.toServerJSONObject();if(e.joinItems){for(var t=[],s=0;s<e.joinItems.length;s++)e.joinItems[s].toServerJSONObject&&(t[s]=e.joinItems[s].toServerJSONObject());e.joinItems=t}return e.datasetInfo&&e.datasetInfo.toServerJSONObject&&(e.datasetInfo=e.datasetInfo.toServerJSONObject()),e}}r.UGCSubLayer=Jr;
  776. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  777. * This program are made available under the terms of the Apache License, Version 2.0
  778. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  779. class Hr extends Jr{constructor(e){super(e=e||{}),this.theme=null,this.themeElementPosition=null,this.CLASS_NAME="SuperMap.ServerTheme"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e);var t=this.theme;switch(t&&t.type){case"LABEL":this.theme=Ar.fromObj(t);break;case"UNIQUE":this.theme=wr.fromObj(t);break;case"GRAPH":this.theme=Nr.fromObj(t);break;case"DOTDENSITY":this.theme=Ir.fromObj(t);break;case"GRADUATEDSYMBOL":this.theme=Rr.fromObj(t);break;case"RANGE":this.theme=kr.fromObj(t)}this.themeElementPosition&&(this.themeElementPosition=new ge(this.themeElementPosition.x,this.themeElementPosition.y))}toServerJSONObject(){var e=super.toServerJSONObject();return e.themeElementPosition&&e.themeElementPosition.toServerJSONObject&&(e.themeElementPosition=e.themeElementPosition.toServerJSONObject()),e.theme&&e.theme.toServerJSONObject&&(e.theme=e.theme.toServerJSONObject()),e}}r.ServerTheme=Hr;
  780. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  781. * This program are made available under the terms of the Apache License, Version 2.0
  782. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  783. class jr extends Jr{constructor(e){super(e=e||{}),this.colorDictionarys=null,this.brightness=null,this.colorGradientType=null,this.colors=null,this.contrast=null,this.dashStyle=null,this.gridType=null,this.horizontalSpacing=null,this.sizeFixed=null,this.solidStyle=null,this.specialColor=null,this.specialValue=null,this.specialValueTransparent=null,this.verticalSpacing=null,this.CLASS_NAME="SuperMap.Grid"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){if(super.fromJson(e),this.specialColor&&(this.specialColor=new Be(this.specialColor.red,this.specialColor.green,this.specialColor.blue)),this.colors){var t,s=[];for(var r in this.colors)t=this.colors[r],s.push(new Be(t.red,t.green,t.blue));this.colors=s}if(this.dashStyle&&(this.dashStyle=new Ge(this.dashStyle)),this.solidStyle&&(this.solidStyle=new Ge(this.solidStyle)),this.colorDictionary){var i,a=[];for(var n in this.colorDictionary)i=this.colorDictionary[n],a.push(new Kt({elevation:n,color:i}));this.colorDictionarys=a}delete this.colorDictionary}toServerJSONObject(){var e=super.toServerJSONObject();return e.dashStyle&&e.dashStyle.toServerJSONObject&&(e.dashStyle=e.dashStyle.toServerJSONObject()),e.solidStyle&&e.solidStyle.toServerJSONObject&&(e.solidStyle=e.solidStyle.toServerJSONObject()),e}}r.Grid=jr;
  784. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  785. * This program are made available under the terms of the Apache License, Version 2.0
  786. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  787. class Vr extends Jr{constructor(e){super(e=e||{}),this.brightness=null,this.colorSpaceType=null,this.contrast=null,this.displayBandIndexes=null,this.transparent=null,this.transparentColor=null,this.transparentColorTolerance=null,this.CLASS_NAME="SuperMap.Image"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e),this.transparentColor&&(this.transparentColor=new Be(this.transparentColor.red,this.transparentColor.green,this.transparentColor.blue))}toServerJSONObject(){return super.toServerJSONObject()}}r.Image=Vr;
  788. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  789. * This program are made available under the terms of the Apache License, Version 2.0
  790. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  791. class Wr extends Jr{constructor(e){super(e=e||{}),this.style=null,this.CLASS_NAME="SuperMap.Vector"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e);var t=this.style;t&&(this.style=new Ge(t))}toServerJSONObject(){var e=r.toServerJSONObject();return e.style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}}r.Vector=Wr;
  792. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  793. * This program are made available under the terms of the Apache License, Version 2.0
  794. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  795. class zr extends gt{constructor(e,t){super(e,t),this.isTempLayers=!1,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetLayersInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(){var e=this;e.isTempLayers||(e.url=ye.urlPathAppend(e.url,"layers")),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}serviceProcessCompleted(e){var t,s;s=(t=!!(e=ye.transformResult(e))&&e.length>0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(s,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var s;if(e)for(var r=0;r<e;r++){if(t[r].subLayers&&t[r].subLayers.layers&&t[r].subLayers.layers.length>0)this.handleLayers(t[r].subLayers.layers.length,t[r].subLayers.layers);else switch(t[r].ugcLayerType){case"THEME":(s=new Hr).fromJson(t[r]),t[r]=s;break;case"GRID":(s=new jr).fromJson(t[r]),t[r]=s;break;case"IMAGE":(s=new Vr).fromJson(t[r]),t[r]=s;break;case"VECTOR":(s=new Wr).fromJson(t[r]),t[r]=s}}}}r.GetLayersInfoService=zr;
  796. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  797. * This program are made available under the terms of the Apache License, Version 2.0
  798. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  799. class qr{constructor(e){e&&(this.bounds=null,this.searchRadius=0,this.zValueFieldName=null,this.zValueScale=1,this.resolution=null,this.filterQueryParameter=null,this.outputDatasetName=null,this.outputDatasourceName=null,this.pixelFormat=null,this.dataset=null,this.inputPoints=null,this.InterpolationAnalystType="dataset",this.clipParam=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationAnalystParameters")}destroy(){var e=this;e.bounds=null,e.searchRadius=null,e.zValueFieldName=null,e.zValueScale=null,e.resolution=null,e.filterQueryParameter=null,e.outputDatasetName=null,e.pixelFormat=null}static toObject(e,t){for(var s in e)if("inputPoints"===s&&"geometry"===e.InterpolationAnalystType){for(var r=[],i=0;i<e.inputPoints.length;i++){var a=e.inputPoints[i],n={x:a.x,y:a.y,z:a.tag};r.push(n)}t[s]=r}else t[s]=e[s]}}r.InterpolationAnalystParameters=qr;
  800. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  801. * This program are made available under the terms of the Apache License, Version 2.0
  802. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  803. class Yr extends qr{constructor(e){super(e),this.smooth=.1,this.tension=40,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationRBFAnalystParameters"}destroy(){super.destroy();var e=this;e.smooth=null,e.tension=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}static toObject(e,t){for(var s in e)t[s]=e[s]}}r.InterpolationRBFAnalystParameters=Yr;
  804. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  805. * This program are made available under the terms of the Apache License, Version 2.0
  806. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  807. class Qr extends qr{constructor(e){super(e),e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationDensityAnalystParameters"}destroy(){super.destroy()}}r.InterpolationDensityAnalystParameters=Qr;
  808. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  809. * This program are made available under the terms of the Apache License, Version 2.0
  810. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  811. class Xr extends qr{constructor(e){super(e),this.power=2,this.searchMode=null,this.expectedCount=12,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationIDWAnalystParameters"}destroy(){super.destroy();this.power=null,this.searchMode=null,this.expectedCount=null}}r.InterpolationIDWAnalystParameters=Xr;
  812. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  813. * This program are made available under the terms of the Apache License, Version 2.0
  814. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  815. class Kr extends qr{constructor(e){super(e),this.type=null,this.mean=null,this.angle=0,this.nugget=0,this.range=0,this.sill=0,this.variogramMode=Y.SPHERICAL,this.exponent=Q.EXP1,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationKrigingAnalystParameters"}destroy(){super.destroy();var e=this;e.type=null,e.mean=null,e.angle=null,e.nugget=null,e.range=null,e.sill=null,e.variogramMode=null,e.exponent=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}}r.InterpolationKrigingAnalystParameters=Kr;
  816. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  817. * This program are made available under the terms of the Apache License, Version 2.0
  818. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  819. class Zr extends _t{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t)}destroy(){super.destroy(),this.mode=null,this.CLASS_NAME="SuperMap.InterpolationAnalystService"}processAsync(e){var t={},s=this;e instanceof Qr?(s.mode="Density","geometry"===e.InterpolationAnalystType?s.url=ye.urlPathAppend(s.url,"geometry/interpolation/density"):s.url=ye.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/density")):e instanceof Xr?(s.mode="IDW","geometry"===e.InterpolationAnalystType?s.url=ye.urlPathAppend(s.url,"geometry/interpolation/idw"):s.url=ye.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/idw")):e instanceof Yr?(s.mode="RBF","geometry"===e.InterpolationAnalystType?s.url=ye.urlPathAppend(s.url,"geometry/interpolation/rbf"):s.url=ye.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/rbf")):e instanceof Kr&&(s.mode="Kriging","geometry"===e.InterpolationAnalystType?s.url=ye.urlPathAppend(s.url,"geometry/interpolation/kriging"):s.url=ye.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/kriging")),qr.toObject(e,t);var r=ye.toJSON(t);s.url=ye.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}r.InterpolationAnalystService=Zr;
  820. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  821. * This program are made available under the terms of the Apache License, Version 2.0
  822. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  823. class $r{constructor(e){e&&(this.datasetName="",this.query="",this.resolution=80,this.method=0,this.meshType=0,this.fields="",this.radius=300,this.meshSizeUnit=ee.METER,this.radiusUnit=ee.METER,this.areaUnit=$.SQUAREMILE,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.KernelDensityJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.method=null,this.radius=null,this.meshType=null,this.fields=null,this.meshSizeUnit=null,this.radiusUnit=null,this.areaUnit=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}r.KernelDensityJobParameter=$r;
  824. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  825. * This program are made available under the terms of the Apache License, Version 2.0
  826. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  827. class ei extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/density"),this.CLASS_NAME="SuperMap.KernelDensityJobsService"}destroy(){super.destroy()}getKernelDensityJobs(){super.getJobs(this.url)}getKernelDensityJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addKernelDensityJob(e,t){super.addJob(this.url,e,$r,t)}}r.KernelDensityJobsService=ei;
  828. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  829. * This program are made available under the terms of the Apache License, Version 2.0
  830. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  831. class ti{constructor(){this.CLASS_NAME="LabelMatrixCell"}}r.LabelMatrixCell=ti;
  832. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  833. * This program are made available under the terms of the Apache License, Version 2.0
  834. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  835. class si extends ti{constructor(e){super(e),this.height=0,this.pathField=null,this.rotation=0,this.width=0,this.sizeFixed=!1,this.type="IMAGE",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelImageCell"}destroy(){var e=this;e.height=null,e.pathField=null,e.rotation=null,e.width=null,e.sizeFixed=null}}r.LabelImageCell=si;
  836. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  837. * This program are made available under the terms of the Apache License, Version 2.0
  838. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  839. class ri extends ti{constructor(e){super(e),this.style=new Ge,this.symbolIDField=null,this.type="SYMBOL",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelSymbolCell"}destroy(){this.style&&(this.style.destroy(),this.style=null),this.symbolIDField=null}}r.LabelSymbolCell=ri;
  840. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  841. * This program are made available under the terms of the Apache License, Version 2.0
  842. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  843. class ii extends ti{constructor(e){super(e),this.themeLabel=new Ar,this.type="THEME",e&&ye.extend(this,e),this.CLASS_NAME=" SuperMap.LabelThemeCell"}destroy(){this.themeLabel&&(this.themeLabel.destroy(),this.themeLabel=null)}}r.LabelThemeCell=ii;
  844. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  845. * This program are made available under the terms of the Apache License, Version 2.0
  846. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  847. class ai{constructor(e){this.layerName=null,this.isVisible=null,this.displayFilter=null,this.fieldValuesDisplayFilter=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LayerStatus"}destroy(){this.layerName=null,this.isVisible=null,this.displayFilter=null}toJSON(){var e="{";e+='"type":"UGC",';var t=[];return this.layerName&&(t.push('"name":"'+this.layerName+'"'),t.push('"visible":'+this.isVisible)),this.displayFilter&&t.push('"displayFilter":"'+this.displayFilter+'"'),(this.minScale||0==this.minScale)&&t.push('"minScale":'+this.minScale),(this.maxScale||0==this.maxScale)&&t.push('"maxScale":'+this.maxScale),this.fieldValuesDisplayFilter&&t.push('"fieldValuesDisplayFilter":'+ye.toJSON(this.fieldValuesDisplayFilter)),e+=t,e+="}"}}r.LayerStatus=ai;
  848. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  849. * This program are made available under the terms of the Apache License, Version 2.0
  850. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  851. class ni extends gt{constructor(e,t){super(e,t),this.projection=null,this.CLASS_NAME="SuperMap.MapService",t&&ye.extend(this,t);var s=this;if(s.projection){var r=s.projection.split(":");r instanceof Array&&(2===r.length&&(s.url=ye.urlAppend(s.url,`prjCoordSys=${encodeURIComponent(`{"epsgCode":"${r[1]}"}`)}`)),1===r.length&&(s.url=ye.urlAppend(s.url,`prjCoordSys=${encodeURIComponent(`{"epsgCode":"${r[0]}"}`)}`)))}}destroy(){super.destroy();var e=this;e.events&&(e.events.un(e.eventListeners),e.events.listeners=null,e.events.destroy(),e.events=null,e.eventListeners=null)}processAsync(){this.request({method:"GET",scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){var t=(e=ye.transformResult(e)).code>=200&&e.code<300||0==e.code||304===e.code,s=e.code&&t;!e.code||s?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}r.MapService=ni;
  852. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  853. * This program are made available under the terms of the Apache License, Version 2.0
  854. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  855. class oi{constructor(e){e&&(this.dataset=null,this.extractRegion=null,this.expression=null,this.isZip=!1,this.ignoreNoValue=!1,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.MathExpressionAnalysisParameters")}destroy(){var e=this;e.dataset=null,e.bounds=null,e.expression=null,e.isZip=!0,e.ignoreNoValue=!0,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var s in e)if("dataset"!==s&&(t[s]=e[s]),"extractRegion"===s&&e[s]){for(var r=e[s].components[0].components,i={},a=[],n=r.length,o=0;o<n-1;o++){var l={};l.x=r[o].x,l.y=r[o].y,a.push(l)}i.points=a,i.type="REGION",t[s]=i}}}r.MathExpressionAnalysisParameters=oi;
  856. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  857. * This program are made available under the terms of the Apache License, Version 2.0
  858. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  859. class li extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.MathExpressionAnalysisService"}destroy(){super.destroy()}processAsync(e){var t=this,s={};e instanceof oi&&(t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/mathanalyst")),oi.toObject(e,s);var r=ye.toJSON(s);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}r.MathExpressionAnalysisService=li;
  860. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  861. * This program are made available under the terms of the Apache License, Version 2.0
  862. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  863. class hi{constructor(e,t){e&&(this.geometry=e,this.unit=d.METER,this.prjCoordSys=null,this.distanceMode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.MeasureParameters")}destroy(){this.geometry=null,this.unit=null,this.prjCoordSys=null}}r.MeasureParameters=hi;
  864. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  865. * This program are made available under the terms of the Apache License, Version 2.0
  866. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  867. class ui extends gt{constructor(e,t){super(e,t),this.measureMode=c.DISTANCE,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.MeasureService"}destroy(){super.destroy();this.measureMode=null}processAsync(e){if(e instanceof hi){var t,s,r=this,i=e.geometry;if(i){r.url=ye.urlPathAppend(r.url,r.measureMode===c.AREA?"area":"distance");var a,n,o,l=He.fromGeometry(i);if(l)t=l.parts[0],s=l.points.splice(0,t),e.prjCoordSys?("object"==typeof e.prjCoordSys?a='{"epsgCode"'+(n=e.prjCoordSys.projCode).substring(n.indexOf(":"),n.length)+"}":"string"==typeof e.prjCoordSys&&(a='{"epsgCode"'+e.prjCoordSys.substring(e.prjCoordSys.indexOf(":"),e.prjCoordSys.length)+"}"),o={point2Ds:ye.toJSON(s),unit:e.unit,prjCoordSys:a}):o={point2Ds:ye.toJSON(s),unit:e.unit},r.request({method:"GET",params:o,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}}r.MeasureService=ui;
  868. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  869. * This program are made available under the terms of the Apache License, Version 2.0
  870. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  871. class ci extends _t{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.OverlayAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof as?(s.mode="datasets",s.url=ye.urlPathAppend(s.url,"datasets/"+e.sourceDataset+"/overlay"),as.toObject(e,t)):e instanceof Ys&&(s.mode="geometry",e.operateGeometries&&e.sourceGeometries?(s.url=ye.urlPathAppend(s.url,"geometry/overlay/batch"),s.url=ye.urlAppend(s.url,"ignoreAnalystParam=true")):s.url=ye.urlPathAppend(s.url,"geometry/overlay"),Ys.toObject(e,t)),s.url=ye.urlAppend(s.url,"returnContent=true");var r=ye.toJSON(t);s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}r.OverlayAnalystService=ci;
  872. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  873. * This program are made available under the terms of the Apache License, Version 2.0
  874. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  875. class di{constructor(e){e&&(this.datasetName="",this.datasetOverlay="",this.mode="",this.srcFields="",this.overlayFields="",this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.OverlayGeoJobParameter")}destroy(){this.datasetName=null,this.datasetOverlay=null,this.mode=null,this.srcFields=null,this.overlayFields=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!=s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}r.OverlayGeoJobParameter=di;
  876. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  877. * This program are made available under the terms of the Apache License, Version 2.0
  878. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  879. class pi extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/overlay"),this.CLASS_NAME="SuperMap.OverlayGeoJobsService"}destroy(){super.destroy()}getOverlayGeoJobs(){super.getJobs(this.url)}getOverlayGeoJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addOverlayGeoJob(e,t){super.addJob(this.url,e,di,t)}}r.OverlayGeoJobsService=pi;
  880. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  881. * This program are made available under the terms of the Apache License, Version 2.0
  882. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  883. class mi extends Yt{constructor(e){e&&(super(e),this.returnContent=!0,this.bounds=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByBoundsParameters")}destroy(){super.destroy();this.returnContent=null,this.bounds&&(this.bounds=null)}}r.QueryByBoundsParameters=mi;
  884. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  885. * This program are made available under the terms of the Apache License, Version 2.0
  886. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  887. class fi extends gt{constructor(e,t){super(e,t),this.returnContent=!1,this.format=i.GEOJSON,this.returnFeatureWithFieldCaption=!1,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.QueryService",this.url&&(t&&t.format&&(this.format=t.format.toUpperCase()),this.url=ye.urlPathAppend(this.url,"queryResults"))}destroy(){super.destroy();this.returnContent=null,this.format=null}processAsync(e){if(e instanceof Yt){var t,s=this,r=null;s.returnContent=e.returnContent,t=s.getJsonParameters(e),s.returnContent?s.url=ye.urlAppend(s.url,"returnContent="+s.returnContent):(r=e.returnCustomResult)&&(s.url=ye.urlAppend(s.url,"returnCustomResult="+r)),s.returnFeatureWithFieldCaption=e.returnFeatureWithFieldCaption,s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){e=ye.transformResult(e);var t=new je;if(e&&e.recordsets)for(var s=0,r=e.recordsets,a=r.length;s<a;s++)r[s].features&&(!0===this.returnFeatureWithFieldCaption&&r[s].features.map(e=>(e.fieldNames=r[s].fieldCaptions,e)),this.format===i.GEOJSON&&(r[s].features=t.toGeoJSON(r[s].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Yt({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}}r.QueryService=fi;
  888. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  889. * This program are made available under the terms of the Apache License, Version 2.0
  890. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  891. class yi extends fi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof mi))return null;var t,s="",r=e.bounds;return t=this.getQueryParameters(e),s+="'queryMode':'BoundsQuery','queryParameters':",s+=ye.toJSON(t),s="{"+(s+=",'bounds': {'rightTop':{'y':"+r.top+",'x':"+r.right+"},'leftBottom':{'y':"+r.bottom+",'x':"+r.left+"}}")+"}"}}r.QueryByBoundsService=yi;
  892. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  893. * This program are made available under the terms of the Apache License, Version 2.0
  894. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  895. class gi extends Yt{constructor(e){e&&(super(e),this.distance=0,this.geometry=null,this.isNearest=null,this.returnContent=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByDistanceParameters")}destroy(){super.destroy();var e=this;e.returnContent=null,e.distance=null,e.isNearest=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}}r.QueryByDistanceParameters=gi;
  896. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  897. * This program are made available under the terms of the Apache License, Version 2.0
  898. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  899. class vi extends fi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof gi){var t="",s=this.getQueryParameters(e),r=He.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=ye.toJSON(s),t="{"+(t+=",'geometry':"+ye.toJSON(r)+",'distance':"+e.distance)+"}"}}}r.QueryByDistanceService=vi;
  900. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  901. * This program are made available under the terms of the Apache License, Version 2.0
  902. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  903. class Si extends Yt{constructor(e){e&&(super(e),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=h.INTERSECT,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters")}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}}r.QueryByGeometryParameters=Si;
  904. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  905. * This program are made available under the terms of the Apache License, Version 2.0
  906. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  907. class bi extends fi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Si){var t,s="",r=e.geometry,i=He.fromGeometry(r);return t=this.getQueryParameters(e),s+="'queryMode':'SpatialQuery','queryParameters':",s="{"+(s+=ye.toJSON(t)+",'geometry':"+ye.toJSON(i)+",'spatialQueryMode':"+ye.toJSON(e.spatialQueryMode))+"}"}}}r.QueryByGeometryService=bi;
  908. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  909. * This program are made available under the terms of the Apache License, Version 2.0
  910. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  911. class xi extends Yt{constructor(e){e&&(super(e),this.returnContent=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters")}destroy(){super.destroy();this.returnContent=null}}r.QueryBySQLParameters=xi;
  912. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  913. * This program are made available under the terms of the Apache License, Version 2.0
  914. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  915. class Ci extends fi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof xi){var t,s="";return t=this.getQueryParameters(e),s+="'queryMode':'SqlQuery','queryParameters':",s="{"+(s+=ye.toJSON(t))+"}"}}}r.QueryBySQLService=Ci;
  916. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  917. * This program are made available under the terms of the Apache License, Version 2.0
  918. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  919. class Ti{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.RouteCalculateMeasureParameters"}destroy(){var e=this;e.sourceRoute=null,e.point=null,e.tolerance&&(e.tolerance=null),e.isIgnoreGap&&(e.isIgnoreGap=!1)}}r.RouteCalculateMeasureParameters=Ti;
  920. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  921. * This program are made available under the terms of the Apache License, Version 2.0
  922. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  923. class _i extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ti){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){return this.url=ye.urlPathAppend(this.url,"geometry/calculatemeasure"),this.url=ye.urlAppend(this.url,"returnContent=true"),ye.toJSON(e)}}r.RouteCalculateMeasureService=_i;
  924. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  925. * This program are made available under the terms of the Apache License, Version 2.0
  926. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  927. class Ei{constructor(e){if(!e)return this;this.sourceRoute=null,this.dataset=null,this.routeIDField=null,this.routeID=null,this.type=null,this.measure=null,this.offset=0,this.isIgnoreGap=!1,this.startMeasure=null,this.endMeasure=null;var t=e.sourceRoute,s={};if(t&&t instanceof Se&&t.components){s.type=t.type,s.parts=t.parts;for(var r=[],i=0,a=t.components.length;i<a;i++)r=r.concat(t.components[i].components);s.points=r,e.sourceRoute=s}ye.extend(this,e),this.CLASS_NAME="SuperMap.RouteLocatorParameters"}destroy(){var e=this;e.sourceRoute=null,e.type=null,e.measure=null,e.offset=0,e.isIgnoreGap=!1,e.startMeasure=null,e.endMeasure=null,e.dataset=null,e.routeID=null,e.routeIDField=null}}r.RouteLocatorParameters=Ei;
  928. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  929. * This program are made available under the terms of the Apache License, Version 2.0
  930. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  931. class Ai extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteLocatorService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ei){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="geometry/routelocator";return e.dataset&&(t="datasets/"+e.dataset+"/linearreferencing/routelocator",e.sourceRoute=null),this.url=ye.urlPathAppend(this.url,t),this.url=ye.urlAppend(this.url,"returnContent=true"),ye.toJSON(e)}}r.RouteLocatorService=Ai;
  932. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  933. * This program are made available under the terms of the Apache License, Version 2.0
  934. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  935. class wi{constructor(e){this.fieldNames=null,this.fieldValues=null,this.geometry=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerFeature"}destroy(){var e=this;e.fieldNames=null,e.fieldValues=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}toFeature(){var e,t,s,r,i={},a=this;for(var n in e=a.fieldNames,t=a.fieldValues,e)i[e[n]]=t[n];return a.geometry&&(s=a.geometry.toGeometry()),r=new Re(s,i),a.geometry&&a.geometry.id&&(r.fid=a.geometry.id),r}static fromJson(e){var t=null;if(e)return(t=e.geometry)&&(t=He.fromJson(t)),new wi({fieldNames:e.fieldNames,fieldValues:e.fieldValues,geometry:t})}}r.ServerFeature=wi;
  936. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  937. * This program are made available under the terms of the Apache License, Version 2.0
  938. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  939. class Pi{constructor(e){e=e||{},this.resourceID=null,this.tempLayerName=null,this.layerInfo=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SetLayerInfoParameters"}destroy(){this.resourceID=null,this.tempLayerName=null,this.layerInfo=null}}r.SetLayerInfoParameters=Pi;
  940. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  941. * This program are made available under the terms of the Apache License, Version 2.0
  942. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  943. class Li extends gt{constructor(e,t){super(e,t),t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e){var t=ye.toJSON(e);this.request({method:"PUT",data:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}}r.SetLayerInfoService=Li;
  944. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  945. * This program are made available under the terms of the Apache License, Version 2.0
  946. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  947. class Oi{constructor(e){e=e||{},this.isTempLayers=null,this.resourceID=null,this.layersInfo=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SetLayersInfoParameters"}destroy(){this.isTempLayers=null,this.resourceID=null,this.layersInfo=null}}r.SetLayersInfoParameters=Oi;
  948. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  949. * This program are made available under the terms of the Apache License, Version 2.0
  950. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  951. class Mi extends gt{constructor(e,t){super(e,t),this.resourceID=null,this.isTempLayers=!1,t&&r.Util.extend(this,t),this.CLASS_NAME="SuperMap.SetLayersInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e){var t,s=[],r=this,i="";r.isTempLayers?(r.url=ye.urlPathAppend(r.url,"tempLayersSet/"+r.resourceID),i="PUT"):(r.url=ye.urlPathAppend(r.url,"tempLayersSet"),i="POST"),e.subLayers||(e.subLayers={layers:[]}),e.subLayers.layers||(e.subLayers.layers=[]);var a=e.subLayers.layers,n=a.length;for(let e in a){if("GRID"===a[e].ugcLayerType){var o={},l=a[e].colorDictionarys;for(var h in l){o[l[h].elevation]=l[h].color}}a[e].colorDictionary=o,delete a[e].colorDictionarys}for(let e=0;e<n;e++)a[e].toJsonObject?s.push(a[e].toJsonObject()):s.push(a[e]);(t=ye.extend(t,e)).subLayers={layers:s},t.object=null;var u=ye.toJSON([t]);r.request({method:i,data:u,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}r.SetLayersInfoService=Mi;
  952. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  953. * This program are made available under the terms of the Apache License, Version 2.0
  954. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  955. class Ni{constructor(e){this.layerStatusList=[],this.holdTime=15,this.resourceID=null,e&&ye.extend(this,e)}destroy(){this.layerStatusList=null,this.holdTime=null,this.resourceID=null}toJSON(){var e="{";e+='"layers":[';for(var t=[],s=0,r=this.layerStatusList.length;s<r;s++)t.push(this.layerStatusList[s].toJSON());return e+=t,e+="]",e+="}"}}r.SetLayerStatusParameters=Ni;
  956. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  957. * This program are made available under the terms of the Apache License, Version 2.0
  958. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  959. class Ii extends gt{constructor(e,t){super(e,t),this.lastparams=null,this.mapUrl=e,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerStatusService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e instanceof Ni){var t=this;if(t.url=t.mapUrl,null==e.resourceID)t.url=ye.urlPathAppend(t.url,"tempLayersSet"),t.lastparams=e,t.request({method:"POST",scope:t,success:t.createTempLayerComplete,failure:t.serviceProcessFailed});else{t.url=ye.urlPathAppend(t.url,"tempLayersSet/"+e.resourceID),t.url=ye.urlAppend(t.url,"elementRemain=true&reference="+e.resourceID+"&holdTime="+e.holdTime.toString());var s="[{";s+='"type":"UGC",',null!=e.layerStatusList&&e.layerStatusList.length>0&&(s+='"subLayers":'+e.toJSON()),s+=',"visible":true,',s+='"name":"'+this.getMapName(this.mapUrl)+'"',s+="}]",t.request({method:"PUT",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}createTempLayerComplete(e){(e=ye.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}getMapName(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var s=t.lastIndexOf("/");return t.substring(s+1,t.length)}serviceProcessCompleted(e){null!=(e=ye.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}r.SetLayerStatusService=Ii;
  960. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  961. * This program are made available under the terms of the Apache License, Version 2.0
  962. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  963. class Fi{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=h.CONTAIN,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}r.SingleObjectQueryJobsParameter=Fi;
  964. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  965. * This program are made available under the terms of the Apache License, Version 2.0
  966. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  967. class Ri extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,Fi,t)}}r.SingleObjectQueryJobsService=Ri;
  968. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  969. * This program are made available under the terms of the Apache License, Version 2.0
  970. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  971. class Di{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){ye.reset(this)}}r.StopQueryParameters=Di;
  972. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  973. * This program are made available under the terms of the Apache License, Version 2.0
  974. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  975. class ki extends gt{constructor(e,t){super(e,t),t=t||{},ye.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e instanceof Di){var t=this;t.url=ye.urlPathAppend(t.url,"stops/keyword/"+e.keyWord),t.request({method:"GET",params:{returnPosition:e.returnPosition},scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}r.StopQueryService=ki;
  976. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  977. * This program are made available under the terms of the Apache License, Version 2.0
  978. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  979. class Bi{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}r.SummaryAttributesJobsParameter=Bi;
  980. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  981. * This program are made available under the terms of the Apache License, Version 2.0
  982. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  983. class Gi extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,Bi,t)}}r.SummaryAttributesJobsService=Gi;
  984. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  985. * This program are made available under the terms of the Apache License, Version 2.0
  986. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  987. class Ui{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=te.AVERAGE,this.fields="",this.type=se.SUMMARYMESH,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryMeshJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.statisticModes=null,this.meshType=null,this.fields=null,this.regionDataset=null,this.type=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s?"output"!==s?("SUMMARYMESH"===e.type&&"regionDataset"!==s||"SUMMARYREGION"===e.type&&!r(["meshType","resolution","query"],s))&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s]);function r(e,t){for(var s=e.length;s--;)if(e[s]===t)return!0;return!1}}}r.SummaryMeshJobParameter=Ui;
  988. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  989. * This program are made available under the terms of the Apache License, Version 2.0
  990. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  991. class Ji extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,Ui,t)}}r.SummaryMeshJobsService=Ji;
  992. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  993. * This program are made available under the terms of the Apache License, Version 2.0
  994. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  995. class Hi{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.sumShape=!0,this.query="",this.standardSummaryFields=!1,this.standardFields="",this.standardStatisticModes="",this.weightedSummaryFields=!1,this.weightedFields="",this.weightedStatisticModes="",this.meshType=0,this.resolution=100,this.meshSizeUnit=ee.METER,this.type=se.SUMMARYMESH,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryRegionJobParameter")}destroy(){this.datasetName=null,this.sumShape=null,this.regionDataset=null,this.query=null,this.standardSummaryFields=null,this.standardFields=null,this.standardStatisticModes=null,this.weightedSummaryFields=null,this.weightedFields=null,this.weightedStatisticModes=null,this.meshType=null,this.resolution=null,this.meshSizeUnit=null,this.type=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s&&"type"!==s?"output"!==s?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==s)&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s])}}r.SummaryRegionJobParameter=Hi;
  996. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  997. * This program are made available under the terms of the Apache License, Version 2.0
  998. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  999. class ji extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,Hi,t)}}r.SummaryRegionJobsService=ji;
  1000. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1001. * This program are made available under the terms of the Apache License, Version 2.0
  1002. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1003. class Vi{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SupplyCenter"}destroy(){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null}static fromJson(e){if(e)return new Vi({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}}r.SupplyCenter=Vi;
  1004. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1005. * This program are made available under the terms of the Apache License, Version 2.0
  1006. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1007. class Wi extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof os){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="",s={},r=this;if(e instanceof ls)r.url=ye.urlPathAppend(r.url,"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()),ls.toObject(e,s),t=ye.toJSON(s);else{if(!(e instanceof Qs))return;r.url=ye.urlPathAppend(r.url,"geometry/"+e.surfaceAnalystMethod.toLowerCase()),t=ye.toJSON(e)}return r.url=ye.urlAppend(r.url,"returnContent=true"),t}}r.SurfaceAnalystService=Wi;
  1008. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1009. * This program are made available under the terms of the Apache License, Version 2.0
  1010. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1011. class zi{constructor(e){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationParameters")}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){for(var s in e)"dataset"!==s&&(t[s]=e[s])}}r.TerrainCurvatureCalculationParameters=zi;
  1012. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1013. * This program are made available under the terms of the Apache License, Version 2.0
  1014. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1015. class qi extends _t{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(e){var t=this,s={};e instanceof zi&&(t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/terraincalculation/curvature")),zi.toObject(e,s);var i=r.Util.toJSON(s);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:i,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}r.TerrainCurvatureCalculationService=qi;
  1016. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1017. * This program are made available under the terms of the Apache License, Version 2.0
  1018. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1019. class Yi{constructor(e){this.caption=null,this.color=new Be,this.end=0,this.start=0,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Yi;return ye.copy(t,e),t.color=Be.fromJson(e.color),t}}}r.ThemeGridRangeItem=Yi;
  1020. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1021. * This program are made available under the terms of the Apache License, Version 2.0
  1022. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1023. class Qi extends yr{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=S.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=x.YELLOW_RED,this.reverseColor=!1,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Qi;ye.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i<r;i++)t.items.push(Yi.fromObj(s[i]));return t}}}r.ThemeGridRange=Qi;
  1024. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1025. * This program are made available under the terms of the Apache License, Version 2.0
  1026. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1027. class Xi{constructor(e){this.caption=null,this.color=new Be,this.unique=null,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){var t=new Xi;return ye.copy(t,e),t.color=Be.fromJson(e.color),t}}r.ThemeGridUniqueItem=Xi;
  1028. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1029. * This program are made available under the terms of the Apache License, Version 2.0
  1030. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1031. class Ki extends yr{constructor(e){super("GRIDUNIQUE",e),this.defaultcolor=new Be,this.items=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUnique"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultcolor&&(e.defaultcolor.destroy(),e.defaultcolor=null)}toServerJSONObject(){var e={};if((e=ye.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r<s;r++)t.push(e.items[r].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new Ki,s=e.items,r=s?s.length:0;ye.extend(t,e),t.items=[],t.defaultcolor=Be.fromJson(e.defaultcolor);for(var i=0;i<r;i++)t.items.push(Xi.fromObj(s[i]));return t}}r.ThemeGridUnique=Ki;
  1032. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1033. * This program are made available under the terms of the Apache License, Version 2.0
  1034. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1035. class Zi{constructor(e){this.caption=null,this.unique=null,this.offsetX=0,this.offsetY=0,this.visible=!0,this.style=new gr,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelUniqueItem"}destroy(){var e=this;e.unique=null,e.caption=null,e.offsetX=null,e.offsetY=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new Zi;return ye.copy(t,e),t}}}r.ThemeLabelUniqueItem=Zi;
  1036. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1037. * This program are made available under the terms of the Apache License, Version 2.0
  1038. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1039. class $i{constructor(e){this.datasetNames=null,this.dataSourceNames=null,this.joinItems=null,this.themes=null,this.displayFilters=null,this.displayOrderBys=null,this.fieldValuesDisplayFilter=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeParameters"}destroy(){var e=this;if(e.datasetNames=null,e.dataSourceNames=null,e.joinItems){for(let t=0,s=e.joinItems,r=s.length;t<r;t++)s[t].destroy();e.joinItems=null}if(e.themes){for(let t=0,s=e.themes,r=s.length;t<r;t++)s[t].destroy();e.themes=null}}}r.ThemeParameters=$i;
  1040. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1041. * This program are made available under the terms of the Apache License, Version 2.0
  1042. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1043. class ea extends gt{constructor(e,t){super(e,t),t&&r.Util.extend(this,t),this.url=ye.urlPathAppend(this.url,"tempLayersSet"),this.CLASS_NAME="SuperMap.ThemeService"}destroy(){super.destroy()}processAsync(e){if(e instanceof $i){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t,s="",r=null,i=null,a=null;s+="[{'type': 'UGC','subLayers': {'layers': [";for(var n=0;n<e.themes.length;n++){r=e.themes[n];var o=ye.toJSON(r);if(s+="{'theme': "+(o=o.slice(0,-1))+"},'type': 'UGC','ugcLayerType': 'THEME',",(i=e.displayFilters)&&i.length>0&&(1===i.length?s+="'displayFilter':\""+i[0]+'",':s+="'displayFilter':\""+i[n]+'",'),(a=e.displayOrderBy)&&a.length>0&&(1===a.length?s+="'displayOrderBy':'"+a[0]+"',":s+="'displayOrderBy':'"+a[n]+"',"),(t=e.fieldValuesDisplayFilter)&&(s+="'fieldValuesDisplayFilter':"+ye.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[n]&&(s+="'joinItems':["+ye.toJSON(e.joinItems[n])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[n]?n:e.datasetNames.length-1,h=e.dataSourceNames[n]?n:e.dataSourceNames.length-1;s+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else s+="},"}e.themes&&e.themes.length>0&&(s=s.substring(0,s.length-1)),s+="]},";var u=this.url.split("/");return s+="'name': '"+u[u.length-2]+"'}]"}}r.ThemeService=ea;
  1044. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1045. * This program are made available under the terms of the Apache License, Version 2.0
  1046. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1047. class ta extends _t{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof us?(s.mode="datasets",s.url=ye.urlPathAppend(s.url,"datasets/"+e.dataset+"/thiessenpolygon"),us.toObject(e,t)):e instanceof Xs&&(s.mode="geometry",s.url=ye.urlPathAppend(s.url,"geometry/thiessenpolygon"),Xs.toObject(e,t));var r=ye.toJSON(t);s.url=ye.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}r.ThiessenAnalystService=ta;
  1048. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1049. * This program are made available under the terms of the Apache License, Version 2.0
  1050. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1051. class sa extends _t{constructor(e,t){super(e,t),t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;t.url=ye.urlPathAppend(t.url,"geometry/batchanalyst"),t.url=ye.urlAppend(t.url,"returnContent=true&ignoreAnalystParam=true");var s=t._processParams(e),r=ye.toJSON(s);t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(ye.isArray(e)){var s=[];return e.map(function(e){return s.push(t._toJSON(e)),e}),s}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},Rt.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},Ys.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},qr.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},qr.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},qr.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},qr.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},Xs.toObject(e.param,t.param)}return t}destroy(){super.destroy()}}r.GeometryBatchAnalystService=sa;
  1052. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1053. * This program are made available under the terms of the Apache License, Version 2.0
  1054. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1055. class ra extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this;e.url=ye.urlPathAppend(e.url,"tilesets"),e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}r.TilesetsService=ra;
  1056. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1057. * This program are made available under the terms of the Apache License, Version 2.0
  1058. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1059. class ia{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=re.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}r.TopologyValidatorJobsParameter=ia;
  1060. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1061. * This program are made available under the terms of the Apache License, Version 2.0
  1062. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1063. class aa extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,ia,t)}}r.TopologyValidatorJobsService=aa;
  1064. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1065. * This program are made available under the terms of the Apache License, Version 2.0
  1066. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1067. class na{constructor(e){e=e||{},this.lineID=null,this.lineName=null,this.lineAliasName=null,this.startStopIndex=null,this.startStopName=null,this.startStopAliasName=null,this.endStopIndex=null,this.endStopName=null,this.endStopAliasName=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){ye.reset(this)}static fromJson(e){if(e)return new na({lineID:e.lineID,lineName:e.lineName,lineAliasName:e.lineAliasName,startStopIndex:e.startStopIndex,startStopName:e.startStopName,startStopAliasName:e.startStopAliasName,endStopIndex:e.endStopIndex,endStopName:e.endStopName,endStopAliasName:e.endStopAliasName})}}r.TransferLine=na;
  1068. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1069. * This program are made available under the terms of the Apache License, Version 2.0
  1070. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1071. class oa{constructor(e){e=e||{},this.transferLines=null,this.points=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){ye.reset(this)}static toJson(e){if(e)return ye.toJSON(e)}}r.TransferPathParameters=oa;
  1072. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1073. * This program are made available under the terms of the Apache License, Version 2.0
  1074. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1075. class la extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof oa){var t,s=this;s.url=ye.urlPathAppend(s.url,"path"),t={points:ye.toJSON(e.points),transferLines:ye.toJSON(e.transferLines)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}r.TransferPathService=la;
  1076. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1077. * This program are made available under the terms of the Apache License, Version 2.0
  1078. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1079. class ha{constructor(e){e=e||{},this.solutionCount=6,this.transferPreference=G.NONE,this.transferTactic=B.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){ye.reset(this)}static toJson(e){if(e)return ye.toJSON(e)}}r.TransferSolutionParameters=ha;
  1080. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1081. * This program are made available under the terms of the Apache License, Version 2.0
  1082. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1083. class ua extends gt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ha){var t,s=this;s.url=ye.urlPathAppend(s.url,"solutions"),t={points:ye.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=ye.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=ye.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=ye.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=ye.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}r.TransferSolutionService=ua;
  1084. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1085. * This program are made available under the terms of the Apache License, Version 2.0
  1086. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1087. class ca{constructor(e){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",ye.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}r.UpdateEdgeWeightParameters=ca;
  1088. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1089. * This program are made available under the terms of the Apache License, Version 2.0
  1090. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1091. class da extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ca){var t=this,s=t.parse(e);t.url=ye.urlPathAppend(t.url,s);var r=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"edgeWeight"!==e[s])switch(s){case"edgeId":t+="/edgeweight/"+e[s];break;case"fromNodeId":t+="/fromnode/"+e[s];break;case"toNodeId":t+="/tonode/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}r.UpdateEdgeWeightService=da;
  1092. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1093. * This program are made available under the terms of the Apache License, Version 2.0
  1094. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1095. class pa{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",ye.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}r.UpdateTurnNodeWeightParameters=pa;
  1096. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1097. * This program are made available under the terms of the Apache License, Version 2.0
  1098. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1099. class ma extends jt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof pa){var t=this,s=t.parse(e);t.url=ye.urlPathAppend(t.url,s);var r=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"turnNodeWeight"!==e[s])switch(s){case"nodeId":t+="/turnnodeweight/"+e[s];break;case"fromEdgeId":t+="/fromedge/"+e[s];break;case"toEdgeId":t+="/toedge/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}r.UpdateTurnNodeWeightService=ma;
  1100. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1101. * This program are made available under the terms of the Apache License, Version 2.0
  1102. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1103. class fa{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=Z.CLIP,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof kt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof Bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}r.VectorClipJobsParameter=fa;
  1104. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1105. * This program are made available under the terms of the Apache License, Version 2.0
  1106. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1107. class ya extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,fa,t)}}r.VectorClipJobsService=ya;
  1108. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1109. * This program are made available under the terms of the Apache License, Version 2.0
  1110. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1111. class ga{constructor(e){e=e||{},this.type=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}}r.RasterFunctionParameter=ga;r.NDVIParameter=
  1112. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1113. * This program are made available under the terms of the Apache License, Version 2.0
  1114. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1115. class extends ga{constructor(e){super(e),this.redIndex=0,this.nirIndex=1,this.colorMap="0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff",this.type=oe.NDVI,ye.extend(this,e),this.CLASS_NAME="SuperMap.NDVIParameter"}destroy(){super.destroy(),this.redIndex=null,this.nirIndex=null,this.colorMap=null}toJSON(){return{redIndex:this.redIndex,nirIndex:this.nirIndex,colorMap:this.colorMap,type:this.type}}};r.HillshadeParameter=
  1116. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1117. * This program are made available under the terms of the Apache License, Version 2.0
  1118. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1119. class extends ga{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=oe.HILLSHADE,ye.extend(this,e),this.CLASS_NAME="SuperMap.HillshadeParameter"}destroy(){super.destroy(),this.altitude=null,this.azimuth=null,this.zFactor=null}toJSON(){return{altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,type:this.type}}};
  1120. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1121. * This program are made available under the terms of the Apache License, Version 2.0
  1122. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1123. class va{constructor(e){this.name=null,this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobCustomItems",ye.extend(this,e)}destroy(){this.name=null,this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={name:this.name};return this.title&&(e.title=this.title),this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),ye.toJSON(e)}}r.WebPrintingJobCustomItems=va;
  1124. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1125. * This program are made available under the terms of the Apache License, Version 2.0
  1126. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1127. class Sa{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobImage",ye.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl&&(e.picAsUrl=this.picAsUrl),this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),ye.toJSON(e)}}r.WebPrintingJobImage=Sa;
  1128. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1129. * This program are made available under the terms of the Apache License, Version 2.0
  1130. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1131. class ba{constructor(e){this.name=null,this.layerType=null,this.url=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayers",ye.extend(this,e)}destroy(){this.name=null,this.layerType=null,this.url=null}}r.WebPrintingJobLayers=ba;
  1132. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1133. * This program are made available under the terms of the Apache License, Version 2.0
  1134. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1135. class xa{constructor(e){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers=null,this.customItems=null,this.CLASS_NAME="SuperMap.WebPrintingJobLegendOptions",ye.extend(this,e)}destroy(){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers instanceof ba&&(this.layers.destroy(),this.layers=null),this.customItems instanceof va&&(this.customItems.destroy(),this.customItems=null)}toJSON(){var e={title:this.title||""};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64?e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,""):this.customItems&&(e.customItems=this.customItems),ye.toJSON(e)}}r.WebPrintingJobLegendOptions=xa;
  1136. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1137. * This program are made available under the terms of the Apache License, Version 2.0
  1138. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1139. class Ca{constructor(e){this.center=null,this.scale=null,this.layerNames=null,this.image=null,this.layers=null,this.CLASS_NAME="SuperMap.WebPrintingJobLittleMapOptions",ye.extend(this,e)}destroy(){this.center=null,this.scale=null,this.layerNames=null,this.image instanceof Sa&&(this.image.destroy(),this.image=null),this.layers instanceof ba&&(this.layers.destroy(),this.layers=null)}toJSON(){var e={scale:this.scale,center:this.center};return this.layerNames?e.layerNames=this.layerNames:this.layers&&(e.layers=this.layers),this.image&&(e.image=this.image),ye.toJSON(e)}}r.WebPrintingJobLittleMapOptions=Ca;
  1140. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1141. * This program are made available under the terms of the Apache License, Version 2.0
  1142. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1143. class Ta{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobNorthArrowOptions",ye.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),ye.toJSON(e)}}r.WebPrintingJobNorthArrowOptions=Ta;
  1144. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1145. * This program are made available under the terms of the Apache License, Version 2.0
  1146. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1147. class _a{constructor(e){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null,this.CLASS_NAME="SuperMap.WebPrintingJobScaleBarOptions",ye.extend(this,e)}destroy(){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null}toJSON(){var e={scaleText:this.scaleText||"",type:this.type||"BAR",intervals:this.intervals||"",unit:this.unit||"METER"};return this.orientation&&(e.orientation=this.orientation),ye.toJSON(e)}}r.WebPrintingJobScaleBarOptions=_a;
  1148. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1149. * This program are made available under the terms of the Apache License, Version 2.0
  1150. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1151. class Ea{constructor(e){this.type=null,this.url=null,this.token=null,this.value=null,this.CLASS_NAME="SuperMap.WebPrintingJobContent",ye.extend(this,e)}destroy(){this.type="WEBMAP",this.url=null,this.token=null,this.value=null}toJSON(){var e={type:this.type};return this.token&&(e.token=this.token),this.url?e.url=this.url:this.value&&(e.value=this.value),ye.toJSON(e)}}r.WebPrintingJobContent=Ea;
  1152. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1153. * This program are made available under the terms of the Apache License, Version 2.0
  1154. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1155. class Aa{constructor(e){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions=null,this.northArrowOptions=null,this.littleMapOptions=null,this.legendOptions=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayoutOptions",ye.extend(this,e)}destroy(){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions instanceof _a&&(this.scaleBarOptions.destroy(),this.scaleBarOptions=null),this.northArrowOptions instanceof Ta&&(this.northArrowOptions.destroy(),this.northArrowOptions=null),this.littleMapOptions instanceof Ca&&(this.littleMapOptions.destroy(),this.littleMapOptions=null),this.legendOptions instanceof xa&&(this.legendOptions.destroy(),this.legendOptions=null)}toJSON(){var e={templateName:this.templateName,title:this.title,subTitle:this.subTitle,author:this.author,copyright:this.copyright};return this.scaleBarOptions&&(e.scaleBarOptions=this.scaleBarOptions),this.northArrowOptions&&(e.northArrowOptions=this.northArrowOptions),this.littleMapOptions&&(e.littleMapOptions=this.littleMapOptions),this.legendOptions&&(e.legendOptions=this.legendOptions),ye.toJSON(e)}}r.WebPrintingJobLayoutOptions=Aa;
  1156. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1157. * This program are made available under the terms of the Apache License, Version 2.0
  1158. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1159. class wa{constructor(e){this.format=null,this.dpi=96,this.scale=null,this.rotation=null,this.center=null,this.CLASS_NAME="SuperMap.WebPrintingJobExportOptions",ye.extend(this,e)}destroy(){this.format=null,this.dpi=null,this.scale=null,this.rotation=null,this.center=null,this.outputSize=null}toJSON(){var e={format:this.format||"PDF",dpi:this.dpi,scale:this.scale,center:this.center};return this.rotation&&(e.rotation=this.rotation),this.outputSize&&(e.outputSize=this.outputSize),ye.toJSON(e)}}r.WebPrintingJobExportOptions=wa;
  1160. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1161. * This program are made available under the terms of the Apache License, Version 2.0
  1162. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1163. class Pa{constructor(e){e&&(this.content=null,this.layoutOptions=null,this.exportOptions=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.WebPrintingJobParameters")}destroy(){this.content instanceof Ea&&(this.content.destroy(),this.content=null),this.layoutOptions instanceof Aa&&(this.layoutOptions.destroy(),this.layoutOptions=null),this.exportOptions instanceof wa&&(this.exportOptions.destroy(),this.exportOptions=null)}}r.WebPrintingJobParameters=Pa;
  1164. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1165. * This program are made available under the terms of the Apache License, Version 2.0
  1166. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1167. class La extends gt{constructor(e,t){super(e,t),t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.WebPrintingService",this.url}destroy(){super.destroy()}createWebPrintingJob(e){if(e){e.layoutOptions&&e.layoutOptions.legendOptions&&(!e.layoutOptions.legendOptions.title&&(e.layoutOptions.legendOptions.title=""),e.layoutOptions.legendOptions.picAsBase64=e.layoutOptions.legendOptions.picAsBase64&&e.layoutOptions.legendOptions.picAsBase64.replace(/^data:.+;base64,/,""),e.layoutOptions.legendOptions.customItems&&e.layoutOptions.legendOptions.customItems.hasOwnProperty("picAsBase64")&&(e.layoutOptions.legendOptions.customItems.picAsBase64=e.layoutOptions.legendOptions.customItems.picAsBase64.replace(/^data:.+;base64,/,"")));var t=this;t.request({url:t._processUrl("jobs"),method:"POST",data:ye.toJSON(e),scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}getPrintingJob(e){var t=this,s=t._processUrl(`jobs/${e}`);t.request({url:s,method:"GET",scope:t,success:function(e){t.rollingProcess(e,s)},failure:t.serviceProcessFailed})}getPrintingJobResult(e){var t=this;t.request({url:t._processUrl(`jobs/${e}/result`),method:"GET",scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}getLayoutTemplates(){var e=this;e.request({url:e._processUrl("layouts"),method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}rollingProcess(e,t){var s=this;if(e)var r=setInterval(function(){s.request({url:t,method:"GET",scope:s,success:function(e){switch(e.status){case"FINISHED":clearInterval(r),s.serviceProcessCompleted(e);break;case"ERROR":clearInterval(r),s.serviceProcessFailed(e);break;case"RUNNING":s.events.triggerEvent("processRunning",e)}},failure:s.serviceProcessFailed})},1e3)}_processUrl(e){return e?ye.urlPathAppend(this.url,e):this.url}}r.WebPrintingService=La;
  1168. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1169. * This program are made available under the terms of the Apache License, Version 2.0
  1170. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1171. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1172. * This program are made available under the terms of the Apache License, Version 2.0
  1173. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1174. var Oa=r.ServiceStatus={DOES_NOT_INVOLVE:"DOES_NOT_INVOLVE",PUBLISH_FAILED:"PUBLISH_FAILED",PUBLISHED:"PUBLISHED",PUBLISHING:"PUBLISHING",UNPUBLISHED:"UNPUBLISHED",UNPUBLISHED_FAILED:"UNPUBLISHED_FAILED"},Ma=r.DataItemType={AUDIO:"AUDIO",COLOR:"COLOR",COLORSCHEME:"COLORSCHEME",CSV:"CSV",EXCEL:"EXCEL",FILLSYMBOL:"FILLSYMBOL",IMAGE:"IMAGE",LAYERTEMPLATE:"LAYERTEMPLATE",LAYOUTTEMPLATE:"LAYOUTTEMPLATE",LINESYMBOL:"LINESYMBOL",MAPTEMPLATE:"MAPTEMPLATE",MARKERSYMBOL:"MARKERSYMBOL",MBTILES:"MBTILES",PHOTOS:"PHOTOS",SHP:"SHP",SMTILES:"SMTILES",SVTILES:"SVTILES",THEMETEMPLATE:"THEMETEMPLATE",TPK:"TPK",UDB:"UDB",UGCV5:"UGCV5",UNKNOWN:"UNKNOWN",VIDEO:"VIDEO",WORKENVIRONMENT:"WORKENVIRONMENT",WORKSPACE:"WORKSPACE"},Na=r.DataItemOrderBy={FILENAME:"FILENAME",ID:"ID",LASTMODIFIEDTIME:"LASTMODIFIEDTIME",NICKNAME:"NICKNAME",SERVICESTATUS:"SERVICESTATUS",SIZE:"SIZE",STATUS:"STATUS",TYPE:"TYPE",UPDATETIME:"UPDATETIME",USERNAME:"USERNAME"},Ia=r.FilterField={LINKPAGE:"LINKPAGE",MAPTITLE:"MAPTITLE",NICKNAME:"NICKNAME",RESTITLE:"RESTITLE",USERNAME:"USERNAME"};
  1175. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1176. * This program are made available under the terms of the Apache License, Version 2.0
  1177. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1178. class Fa{constructor(e){e=e||{},ye.extend(this,e),this.serverType=a.ONLINE,this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,s,r={}){return t=this.createCredentialUrl(t),r.crossOrigin=this.options.crossOrigin,r.headers=this.options.headers,Ze.commit(e,t,s,r).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,s=this.getCredential();if(s){var r="key="+s,i=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===i?t+=r:t.indexOf("?")>-1&&"?"!==i?t+="&"+r:t+="?"+r}return t}getCredential(){}}r.OnlineServiceBase=Fa;
  1179. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1180. * This program are made available under the terms of the Apache License, Version 2.0
  1181. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1182. class Ra extends Fa{constructor(e,t){super(e),t=t||{},this.MD5=null,this.type=null,this.userName=null,this.fileName=null,this.size=null,this.serviceStatus=null,this.serviceId=null,this.id=null,this.lastModfiedTime=null,this.status=null,this.storageId=null,this.publishInfo=null,this.authorizeSetting=null,this.nickname=null,this.tags=[],this.description=null,this.dataItemServices=null,this.coordType=null,this.dataCheckResult=null,this.dataMetaInfo=null,this.thumbnail=null,ye.extend(this,t),this.id&&(this.serviceUrl=e+"/"+this.id),this.CLASS_NAME="SuperMap.OnlineData"}load(){if(this.serviceUrl){var e=this;return e.request("GET",this.serviceUrl).then(function(t){ye.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}r.OnlineData=Ra;
  1183. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1184. * This program are made available under the terms of the Apache License, Version 2.0
  1185. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1186. class Da{constructor(){this.rootUrl="https://www.supermapol.com",this.webUrl=this.rootUrl+"/web";var e=this.webUrl+"/mycontent";this.mDatasUrl=e+"/datas",this.CLASS_NAME="SuperMap.Online"}load(){return Ze.get(this.rootUrl).then(function(e){return e})}login(){$e.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,s=t.mDatasUrl;return e&&(e=e.toJSON()),Ze.get(s,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var s=[],r=e.content,i=r.length,a=0;a<i;a++){var n=r[a],o=new Ra(t.mDatasUrl,n);s.push(o)}return s}})}}r.Online=Da;
  1187. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1188. * This program are made available under the terms of the Apache License, Version 2.0
  1189. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1190. class ka{constructor(e){e=e||{},this.userNames=null,this.types=null,this.fileName=null,this.serviceStatuses=null,this.serviceId=null,this.ids=null,this.keywords=null,this.orderBy=null,this.tags=null,this.filterFields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.OnlineQueryDatasParameter"}toJSON(){var e=this,t={types:e.types,fileName:e.fileName,serviceStatuses:e.serviceStatuses,serviceId:e.serviceId,ids:e.ids,keywords:e.keywords,orderBy:e.orderBy,tags:e.tags,filterFields:e.filterFields};for(var s in t)null==t[s]&&delete t[s];return t}}r.OnlineQueryDatasParameter=ka;
  1191. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1192. * This program are made available under the terms of the Apache License, Version 2.0
  1193. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1194. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1195. * This program are made available under the terms of the Apache License, Version 2.0
  1196. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1197. class Ba{constructor(e){this.name=null,this.serviceIds=null,this.clientType=X.SERVER,this.limitation=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.KeyServiceParameter"}toJSON(){return{name:this.name,serviceIds:this.serviceIds,clientType:this.clientType,limitation:this.limitation}}}r.KeyServiceParameter=Ba;
  1198. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1199. * This program are made available under the terms of the Apache License, Version 2.0
  1200. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1201. class Ga{constructor(e,t){this.type=e,this.server=null,this.tokenServiceUrl=null,this.keyServiceUrl=null,ye.extend(this,t),this.CLASS_NAME="SuperMap.ServerInfo",this.type=this.type||a.ISERVER,this.server||console.error("server url require is not undefined");var s="/services/security/tokens";this.type===a.ISERVER&&this.server.indexOf("iserver")<0&&(s="/iserver"+s),this.tokenServiceUrl||(this.tokenServiceUrl=ye.urlPathAppend(this.server,s)),this.keyServiceUrl||(this.type===a.IPORTAL?this.keyServiceUrl=ye.urlPathAppend(this.server,"/web/mycontent/keys/register"):this.type===a.ONLINE&&(this.keyServiceUrl=ye.urlPathAppend(this.server,"/web/mycontent/keys")))}}r.ServerInfo=Ga;
  1202. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1203. * This program are made available under the terms of the Apache License, Version 2.0
  1204. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1205. class Ua{constructor(e){this.userName=null,this.password=null,this.clientType=X.NONE,this.ip=null,this.referer=null,this.expiration=60,ye.extend(this,e),this.CLASS_NAME="SuperMap.TokenServiceParameter"}toJSON(){return{userName:this.userName,password:this.password,clientType:this.clientType,ip:this.ip,referer:this.referer,expiration:this.expiration}}}r.TokenServiceParameter=Ua;
  1206. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1207. * This program are made available under the terms of the Apache License, Version 2.0
  1208. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1209. var Ja=s(7),Ha=s.n(Ja);
  1210. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1211. * This program are made available under the terms of the Apache License, Version 2.0
  1212. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1213. class ja{constructor(e,t){t=t||{},this.url=e,this.client=new Ha.a.Client({host:this.url}),this.change=null,this.openGeoFence=!1,this.outOfGeoFence=null,this.geoFence=null,this.EVENT_TYPES=["change","error","outOfGeoFence"],this.events=new Ie(this,null,this.EVENT_TYPES),this.eventListeners=null,ye.extend(this,t),this.eventListeners instanceof Object&&this.events.on(this.eventListeners)}setGeoFence(e){this.geoFence=e}bulk(e,t){return this.client.bulk(e,t)}clearScroll(e,t){return this.client.clearScroll(e,t)}count(e,t){return this.client.count(e,t)}create(e,t){return this.client.create(e,t)}delete(e,t){return this.client.delete(e,t)}deleteByQuery(e,t){return this.client.deleteByQuery(e,t)}deleteScript(e,t){return this.client.deleteScript(e,t)}deleteTemplate(e,t){return this.client.deleteTemplate(e,t)}exists(e,t){return this.client.exists(e,t)}existsSource(e,t){return this.client.existsSource(e,t)}explain(e,t){return this.client.explain(e,t)}fieldCaps(e,t){return this.client.fieldCaps(e,t)}get(e,t){return this.client.get(e,t)}getScript(e,t){return this.client.getScript(e,t)}getSource(e,t){return this.client.getSource(e,t)}getTemplate(e,t){return this.client.getTemplate(e,t)}index(e,t){return this.client.index(e,t)}info(e,t){return this.client.info(e,t)}mget(e,t){return this.client.mget(e,t)}msearch(e,t){let s=this;return s.client.msearch(e).then(function(e){return s._update(e.responses,t),e},function(e){return t(e),s.events.triggerEvent("error",{error:e}),e})}msearchTemplate(e,t){return this.client.msearchTemplate(e,t)}mtermvectors(e,t){return this.client.mtermvectors(e,t)}ping(e,t){return this.client.ping(e,t)}putScript(e,t){return this.client.putScript(e,t)}putTemplate(e,t){return this.client.putTemplate(e,t)}reindex(e,t){return this.client.reindex(e,t)}reindexRessrottle(e,t){return this.client.reindexRessrottle(e,t)}renderSearchTemplate(e,t){return this.client.renderSearchTemplate(e,t)}scroll(e,t){return this.client.scroll(e,t)}search(e,t){let s=this;return s.client.search(e).then(function(e){return s._update(e.responses,t),e},function(e){return t(e),s.events.triggerEvent("error",{error:e}),e})}searchShards(e,t){return this.client.searchShards(e,t)}searchTemplate(e,t){return this.client.searchTemplate(e,t)}suggest(e,t){return this.client.suggest(e,t)}termvectors(e,t){return this.client.termvectors(e,t)}update(e,t){return this.client.update(e,t)}updateByQuery(e,t){return this.client.updateByQuery(e,t)}_update(e,t){let s=this;e&&(s.data=e,s.openGeoFence&&s.geoFence&&s._validateDatas(e),s.events.triggerEvent("change",{data:s.data}),s.change?s.change&&s.change(e):t&&t(void 0,{responses:e}))}_validateDatas(e){if(e){e instanceof Array||(e=[e]);var t,s=e.length;for(t=0;t<s;t++)this._validateData(e[t])}}_validateData(e){let t=this;e.hits.hits.map(function(s){let r=s._source,i=t._getMeterPerMapUnit(t.geoFence.unit),a=t.geoFence.center[0]*i,n=t.geoFence.center[1]*i,o=r.x*i,l=r.y*i;return t._distance(o,l,a,n)>t.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),s})}_distance(e,t,s,r){return Math.sqrt((e-s)*(e-s)+(t-r)*(t-r))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}r.ElasticSearch=ja;
  1214. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1215. * This program are made available under the terms of the Apache License, Version 2.0
  1216. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1217. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1218. * This program are made available under the terms of the Apache License, Version 2.0
  1219. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1220. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1221. * This program are made available under the terms of the Apache License, Version 2.0
  1222. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1223. class Va{constructor(){this.BUILTIN_OBJECT={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},this._ctx=null,this._canvas=null,this._pixelCtx=null,this._width=null,this._height=null,this._offsetX=0,this._offsetY=0,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Util"}clone(e){var t=this.BUILTIN_OBJECT;if("object"==typeof e&&null!==e){var s=e;if(e instanceof Array){s=[];for(var r=0,i=e.length;r<i;r++)s[r]=this.clone(e[r])}else if(!t[Object.prototype.toString.call(e)])for(var a in s={},e)e.hasOwnProperty(a)&&(s[a]=this.clone(e[a]));return s}return e}mergeItem(e,t,s,r){var i=this.BUILTIN_OBJECT;t.hasOwnProperty(s)&&("object"!=typeof e[s]||i[Object.prototype.toString.call(e[s])]?!r&&s in e||(e[s]=t[s]):this.merge(e[s],t[s],r))}merge(e,t,s){for(var r in t)this.mergeItem(e,t,r,s);return e}getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}getPixelContext(){return this._pixelCtx||(this._canvas=document.createElement("canvas"),this._width=this._canvas.width,this._height=this._canvas.height,this._pixelCtx=this._canvas.getContext("2d")),this._pixelCtx}adjustCanvasSize(e,t){var s,r=this._canvas,i=this._pixelCtx,a=this._width,n=this._height,o=this._offsetX,l=this._offsetY;e+o>a&&(a=e+o+100,r.width=a,s=!0),t+l>n&&(n=t+l+100,r.height=n,s=!0),e<-o&&(a+=o=100*Math.ceil(-e/100),r.width=a,s=!0),t<-l&&(n+=l=100*Math.ceil(-t/100),r.height=n,s=!0),s&&i.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s<r;s++)if(e[s]===t)return s;return-1}inherits(e,t){var s=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,s)e.prototype[i]=s[i];e.constructor=e}}
  1224. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1225. * This program are made available under the terms of the Apache License, Version 2.0
  1226. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Wa{constructor(){this.util=new Va,this._ctx=null,this.palette=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],this._palette=this.palette,this.highlightColor="rgba(0,0,255,1)",this._highlightColor=this.highlightColor,this.colorRegExp=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,this._nameColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Color"}customPalette(e){this.palette=e}resetPalette(){this.palette=this._palette}getColor(e,t){return e|=0,(t=t||this.palette)[e%t.length]}customHighlight(e){this.highlightColor=e}resetHighlight(){this.highlightColor=this._highlightColor}getHighlightColor(){return this.highlightColor}getRadialGradient(e,t,s,r,i,a,n){var o=this.util;this._ctx||(this._ctx=o.getContext());for(var l=this._ctx.createRadialGradient(e,t,s,r,i,a),h=0,u=n.length;h<u;h++)l.addColorStop(n[h][0],n[h][1]);return l.__nonRecursion=!0,l}getLinearGradient(e,t,s,r,i){var a=this.util;this._ctx||(this._ctx=a.getContext());for(var n=this._ctx.createLinearGradient(e,t,s,r),o=0,l=i.length;o<l;o++)n.addColorStop(i[o][0],i[o][1]);return n.__nonRecursion=!0,n}getStepColors(e,t,s){e=this.toRGBA(e),t=this.toRGBA(t),e=this.getData(e);for(var r=[],i=((t=this.getData(t))[0]-e[0])/s,a=(t[1]-e[1])/s,n=(t[2]-e[2])/s,o=(t[3]-e[3])/s,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<s;l++)r[l]=this.toColor([this.adjust(Math.floor(h),[0,255]),this.adjust(Math.floor(u),[0,255]),this.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"rgba"),h+=i,u+=a,c+=n,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],r[l]=this.toColor([h,u,c,d],"rgba"),r}getGradientColors(e,t){var s=[],r=e.length;if(void 0===t&&(t=20),1===r)s=this.getStepColors(e[0],e[0],t);else if(r>1)for(var i=0,a=r-1;i<a;i++){var n=this.getStepColors(e[i],e[i+1],t);i<a-1&&n.pop(),s=s.concat(n)}return s}toColor(e,t){if(t=t||"rgb",e&&(3===e.length||4===e.length)){if(e=this.map(e,function(e){return e>1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var s=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=s[0],e[2]=s[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}toArray(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],s=0;return e.replace(/[\d.]+/g,function(e){s<3?e|=0:e=+e,t[s++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var s=this.getData(e),r=s[3];return void 0===r&&(r=1),e.indexOf("hsb")>-1?s=this._HSV_2_RGB(s):e.indexOf("hsl")>-1&&(s=this._HSL_2_RGB(s)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?s=this._RGB_2_HSB(s):t.indexOf("hsl")>-1&&(s=this._RGB_2_HSL(s)),s[3]=r,this.toColor(s,t)}toRGBA(e){return this.convert(e,"rgba")}toRGB(e){return this.convert(e,"rgb")}toHex(e){return this.convert(e,"hex")}toHSVA(e){return this.convert(e,"hsva")}toHSV(e){return this.convert(e,"hsv")}toHSBA(e){return this.convert(e,"hsba")}toHSB(e){return this.convert(e,"hsb")}toHSLA(e){return this.convert(e,"hsla")}toHSL(e){return this.convert(e,"hsl")}toName(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}trim(e){return String(e).replace(/\s+/g,"")}normalize(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,s=(240&e)<<4,r=15&e;e="#"+((1<<24)+(t<<4)+t+(s<<4)+s+(r<<4)+r).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var s=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var r=this.getData(e),i=0;i<3;i++)r[i]=1===s?r[i]*(1-t)|0:(255-r[i])*t+r[i]|0;return"rgb("+r.join(",")+")"}reverse(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}mix(e,t,s){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===s&&(s=.5);for(var r=2*(s=1-this.adjust(s,[0,1]))-1,i=this.getData(this.toRGBA(e)),a=this.getData(this.toRGBA(t)),n=i[3]-a[3],o=((r*n==-1?r:(r+n)/(1+r*n))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=i[u]*o+a[u]*l;var c=i[3]*s+a[3]*(1-s);return c=Math.max(0,Math.min(1,c)),1===i[3]&&1===a[3]?this.toColor(h,"rgb"):(h[3]=c,this.toColor(h,"rgba"))}random(){return"#"+Math.random().toString(16).slice(2,8)}getData(e){var t,s,r=(e=this.normalize(e)).match(this.colorRegExp);if(null===r)throw new Error("The color format error");var i,a=[];if(r[2])i=[(t=r[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],a=this.map(i,function(e){return Wa.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(r[4]){var n=r[4].split(",");s=n[3],i=n.slice(0,3),a=this.map(i,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),Wa.prototype.adjust.call(this,e,[0,255])}),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}else if(r[5]||r[6]){var o=(r[5]||r[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];s=o[3],(a=this.map([h,u],function(e){return Wa.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}return a}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var s=this.getData(this.toRGBA(e));return s[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(s,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var s=e?e.length:0,r=0;r<s;r++)e[r]=t(e[r]);return e}adjust(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}isCalculableColor(e){return e instanceof Array||"string"==typeof e}_HSV_2_RGB(e){var t,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=255*n;else{var o=6*i;6===o&&(o=0);var l=0|o,h=n*(1-a),u=n*(1-a*(o-l)),c=n*(1-a*(1-(o-l))),d=0,p=0,m=0;0===l?(d=n,p=c,m=h):1===l?(d=u,p=n,m=h):2===l?(d=h,p=n,m=c):3===l?(d=h,p=u,m=n):4===l?(d=c,p=h,m=n):(d=n,p=h,m=u),t=255*d,s=255*p,r=255*m}return[t,s,r]}_HSL_2_RGB(e){var t,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=255*n;else{var o,l=2*n-(o=n<.5?n*(1+a):n+a-a*n);t=255*this._HUE_2_RGB(l,o,i+1/3),s=255*this._HUE_2_RGB(l,o,i),r=255*this._HUE_2_RGB(l,o,i-1/3)}return[t,s,r]}_HUE_2_RGB(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),6*s<1?e+6*(t-e)*s:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}_RGB_2_HSB(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=o;if(0===l)t=0,s=0;else{s=l/o;var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;r===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}_RGB_2_HSL(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=(o+n)/2;if(0===l)t=0,s=0;else{s=h<.5?l/(o+n):l/(2-o-n);var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;r===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}}var za=new Wa;class qa{static createCanvas(e,t){var s=document.createElement("canvas");return s.height=e,s.width=t,s.getContext("2d")}static getLinearGradient(e,t,s,r,i){this._ctx||(this._ctx=this.getContext());for(var a=this._ctx.createLinearGradient(e,t,s,r),n=i.length,o=1/(n-1),l=0,h=0;h<n;h++)a.addColorStop(l,i[h]),l+=o;return a.__nonRecursion=!0,a}static getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}static getStepColors(e,t,s){e=za.toRGBA(e),t=za.toRGBA(t),e=za.getData(e);for(var r=[],i=((t=za.getData(t))[0]-e[0])/s,a=(t[1]-e[1])/s,n=(t[2]-e[2])/s,o=(t[3]-e[3])/s,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<s;l++)r[l]=za.toColor([za.adjust(Math.floor(h),[0,255]),za.adjust(Math.floor(u),[0,255]),za.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"hex"),h+=i,u+=a,c+=n,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],r[l]=za.toColor([h,u,c,d],"hex"),r}static getGradientColors(e,t,s){var r,i,a,n=[],o=e.length;if(void 0!==t){if(o>=t)if("RANGE"===s)for(i=0;i<t;i++)n.push(e[i]);else for(i=0;i<t;i++){let t=Math.floor(i/2);if(i%2==0)n.push(e[t]);else{let s=e.length-1-t;n.push(e[s])}}else{for(r=Math.ceil(t/(o-1)),i=0,a=o-1;i<a;i++){var l=this.getStepColors(e[i],e[i+1],r);i<a-1&&l.pop(),n=n.concat(l)}for(var h=n.length-t,u=0;u<h;u++)n.splice(2,1)}return n}}}r.ColorsPickerUtil=qa;class Ya{static newInstance(){return this.geostatsInstance||(this.geostatsInstance=new window.geostats),this.geostatsInstance}static getInstance(e){let t=this.newInstance();return t.setSerie(e),t}static getArrayStatistic(e,t){return e.length?"Sum"===t||"求和"===t?this.getSum(e):"Maximum"===t||"最大值"===t?this.getMax(e):"Minimum"===t||"最小值"===t?this.getMin(e):"Average"===t||"平均值"===t?this.getMean(e):"Median"===t||"中位数"===t?this.getMedian(e):"times"===t||"计数"===t?this.getTimes(e):void 0:0}static getArraySegments(e,t,s){if("offset"===t)return this.getEqInterval(e,s);if("jenks"===t)return this.getJenks(e,s);if("square"===t){return this.getMin(e)>=0&&this.getSqrtInterval(e,s)}if("logarithm"===t){return this.getMin(e)>0&&this.getGeometricProgression(e,s)}}static getSum(e){return this.getInstance(e).sum()}static getMax(e){return this.getInstance(e).max()}static getMin(e){return this.getInstance(e).min()}static getMean(e){return this.getInstance(e).mean()}static getMedian(e){return this.getInstance(e).median()}static getTimes(e){return e.length}static getEqInterval(e,t){return this.getInstance(e).getClassEqInterval(t)}static getJenks(e,t){return this.getInstance(e).getClassJenks(t)}static getSqrtInterval(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}static getGeometricProgression(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}r.ArrayStatistic=Ya;var Qa=function(e){var t;if(e===d.METER)t=1;else if(e===d.DEGREE)t=2*Math.PI*6378137/360;else if(e===d.KILOMETER)t=.001;else if(e===d.INCH)t=1/.025399999918;else{if(e!==d.FOOT)return t;t=.3048}return t},Xa=s(8),Ka=s.n(Xa);
  1227. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1228. * This program are made available under the terms of the Apache License, Version 2.0
  1229. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1230. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1231. * This program are made available under the terms of the Apache License, Version 2.0
  1232. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1233. class Za{constructor(e){this.env=null,this.parser=null,this.ruleSet=null,this.cartoStr="",this.shaders=null,"string"==typeof e&&(this.cartoStr=e,this.env={frames:[],errors:[],error:function(e){this.errors.push(e)}},this.parser=this.getParser(this.env),this.parse(e),this.shaders=this.toShaders())}getParser(e){var t,s,i,a,n,o,l,h,u,c=this;function d(){a=l[i],n=s,h=s}function p(){l[i]=a,h=s=n}function m(){s>h&&(l[i]=l[i].slice(s-h),h=s)}function f(e){var r,a,n,o;if(e instanceof Function)return e.call(u.parsers);if("string"==typeof e)r=t.charAt(s)===e?e:null,a=1,m();else{if(m(),!(r=e.exec(l[i])))return null;a=r[0].length}if(r){var c=s+=a;for(o=s+l[i].length-a;s<o&&(32===(n=t.charCodeAt(s))||10===n||9===n);)s++;return l[i]=l[i].slice(a+(s-c)),h=s,0===l[i].length&&i<l.length-1&&i++,"string"==typeof r?r:1===r.length?r[0]:r}}function y(s){var r,i={index:o,filename:e.filename,message:"Parse error.",line:0,column:-1};for(var a in i)0===s[a]&&(s[a]=i[a]);r=s.filename&&c.env.inputs&&c.env.inputs[s.filename]?c.env.inputs[s.filename]:t,s.line=(r.slice(0,s.index).match(/\n/g)||"").length+1;for(var n=s.index;n>=0&&"\n"!==r.charAt(n);n--)s.column++;return new Error([s.filename,s.line,s.column,s.message].join(";"))}return this.env=e=e||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},u={parse:function(a){var n,u=null;if(s=i=h=o=0,l=[],t=a.replace(/\r\n/g,"\n"),e.filename&&(c.env.inputs[e.filename]=t),l=function(e){for(var s,r,i,a,n=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,h=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,d=e[0],p=0;p<t.length;)if(o.lastIndex=p,(s=o.exec(t))&&s.index===p&&(p+=s[0].length,d.push(s[0])),i=t.charAt(p),l.lastIndex=h.lastIndex=p,(s=h.exec(t))&&s.index===p)p+=s[0].length,d.push(s[0]);else if(r||"/"!==i||"/"!==(a=t.charAt(p+1))&&"*"!==a||!(s=l.exec(t))||s.index!==p){switch(i){case"{":if(!r){c++,d.push(i);break}case"}":if(!r){c--,d.push(i),e[++n]=d=[];break}case"(":if(!r){r=!0,d.push(i);break}case")":if(r){r=!1,d.push(i);break}default:d.push(i)}p++}else p+=s[0].length,d.push(s[0]);return 0!==c&&(u={index:p-1,type:"Parse",message:c>0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),u)throw y(u);var d=function(e,t){var s=e.specificity,r=t.specificity;return s[0]!=r[0]?r[0]-s[0]:s[1]!=r[1]?r[1]-s[1]:s[2]!=r[2]?r[2]-s[2]:r[3]-s[3]};return(n=new r.CartoCSS.Tree.Ruleset([],f(this.parsers.primary))).root=!0,n.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+y(t).message:e.errors.message=y(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(d),t},n},parsers:{primary:function(){for(var e,t=[];(e=f(this.rule)||f(this.ruleset)||f(this.comment))||f(/^[\s\n]+/)||(e=f(this.invalid));)e&&t.push(e);return t},invalid:function(){var e=f(/^[^;\n]*[;\n]/);if(e)return new r.CartoCSS.Tree.Invalid(e,n)},comment:function(){var e;if("/"===t.charAt(s))return"/"===t.charAt(s+1)?new r.CartoCSS.Tree.Comment(f(/^\/\/.*/),!0):(e=f(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new r.CartoCSS.Tree.Comment(e):void 0},entities:{quoted:function(){if('"'===t.charAt(s)||"'"===t.charAt(s)){var e=f(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return e?new r.CartoCSS.Tree.Quoted(e[1]||e[2]):void 0}},field:function(){if(f("[")){var e=f(/(^[^\]]+)/);if(f("]"))return e?new r.CartoCSS.Tree.Field(e[1]):void 0}},comparison:function(){var e=f(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var e=f(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(e)return new r.CartoCSS.Tree.Keyword(e)},call:function(){var e,t;if(e=/^([\w\-]+|%)\(/.exec(l[i])){if("url"===(e=e[1]))return null;s+=e.length;if(f("("),t=f(this.entities.arguments),f(")"))return e?new r.CartoCSS.Tree.Call(e,t,s):void 0}},arguments:function(){for(var e,t=[];e=f(this.expression);){t.push(e);if(!f(","))break}return t},literal:function(){return f(this.entities.dimension)||f(this.entities.keywordcolor)||f(this.entities.hexcolor)||f(this.entities.quoted)},url:function(){var e;if("u"===t.charAt(s)&&f(/^url\(/)){e=f(this.entities.quoted)||f(this.entities.variable)||f(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return f(")")?new r.CartoCSS.Tree.URL(void 0!==e.value||e instanceof r.CartoCSS.Tree.Variable?e:new r.CartoCSS.Tree.Quoted(e)):new r.CartoCSS.Tree.Invalid(e,n,"Missing closing ) in URL.")}},variable:function(){var i,a=s;if("@"===t.charAt(s)&&(i=f(/^@[\w-]+/)))return new r.CartoCSS.Tree.Variable(i,a,e.filename)},hexcolor:function(){var e;if("#"===t.charAt(s)&&(e=f(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new r.CartoCSS.Tree.Color(e[1])},keywordcolor:function(){var e=l[i].match(/^[a-z]+/);if(e&&e[0]in r.CartoCSS.Tree.Reference.data.colors)return new r.CartoCSS.Tree.Color(r.CartoCSS.Tree.Reference.data.colors[f(/^[a-z]+/)])},dimension:function(){var e=t.charCodeAt(s);if(!(e>57||e<45||47===e)){var i=f(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return i?new r.CartoCSS.Tree.Dimension(i[1],i[2],n):void 0}}},variable:function(){var e;if("@"===t.charAt(s)&&(e=f(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=f(this.entities.call)||f(this.entities.literal),t=f(this.entities.field)||f(this.entities.variable),s=f(this.entities.url)||f(this.entities.keyword);return e||t||s},end:function(){var e;return f(";")||("string"==typeof(e="}")?t.charAt(s)===e:!!e.test(l[i]))},element:function(){var e=f(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(e)return new r.CartoCSS.Tree.Element(e)},attachment:function(){var e=f(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var e,i,a,o,l,h=[],u=new r.CartoCSS.Tree.Filterset,c=[],d=0,p=0;(a=f(this.element))||(l=f(this.zoom))||(o=f(this.filter))||(e=f(this.attachment));){if(d++,a)h.push(a);else if(l)c.push(l),p++;else if(o){var m=u.add(o);if(m)throw y({message:m,index:s-1});p++}else{if(i)throw y({message:"Encountered second attachment name.",index:s-1});i=e}var g=t.charAt(s);if("{"===g||"}"===g||";"===g||","===g)break}if(d)return new r.CartoCSS.Tree.Selector(u,c,h,i,p,n)},filter:function(){d();var t,s,i;if(f("[")&&(t=f(/^[a-zA-Z0-9\-_]+/)||f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.keyword)||f(this.entities.field))&&(t instanceof r.CartoCSS.Tree.Quoted&&(t=new r.CartoCSS.Tree.Field(t.toString())),(s=f(this.entities.comparison))&&(i=f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.dimension)||f(this.entities.keyword)||f(this.entities.field)))){if(!f("]"))throw y({message:"Missing closing ] of filter.",index:n-1});return t.is||(t=new r.CartoCSS.Tree.Field(t)),new r.CartoCSS.Tree.Filter(t,s,i,n,e.filename)}},zoom:function(){d();var e,t;if(f(/^\[\s*zoom/g)&&(e=f(this.entities.comparison))&&(t=f(this.entities.variable)||f(this.entities.dimension))&&f("]"))return new r.CartoCSS.Tree.Zoom(e,t,n);p()},block:function(){var e;if(f("{")&&(e=f(this.primary))&&f("}"))return e},ruleset:function(){var e,t,s=[];for(d();e=f(this.selector);){for(s.push(e);f(this.comment););if(!f(","))break;for(;f(this.comment););}if(e)for(;f(this.comment););if(s.length>0&&(t=f(this.block))){if(1===s.length&&s[0].elements.length&&"Map"===s[0].elements[0].value){var i=new r.CartoCSS.Tree.Ruleset(s,t);return i.isMap=!0,i}return new r.CartoCSS.Tree.Ruleset(s,t)}p()},rule:function(){var i,a,l=t.charAt(s);if(d(),"."!==l&&"#"!==l&&(i=f(this.variable)||f(this.property))){if((a=f(this.value))&&f(this.end))return new r.CartoCSS.Tree.Rule(i,a,n,e.filename);o=s,p()}},font:function(){for(var e,t=[],s=[];e=f(this.entity);)s.push(e);if(t.push(new r.CartoCSS.Tree.Expression(s)),f(","))for(;(e=f(this.expression))&&(t.push(e),f(",")););return new r.CartoCSS.Tree.Value(t)},value:function(){for(var e,t=[];(e=f(this.expression))&&(t.push(e),f(",")););return t.length>1?new r.CartoCSS.Tree.Value(t.map(function(e){return e.value[0]})):1===t.length?new r.CartoCSS.Tree.Value(t):void 0},sub:function(){var e;if(f("(")&&(e=f(this.expression))&&f(")"))return e},multiplication:function(){var e,t,s,i;if(e=f(this.operand)){for(;(s=f("/")||f("*")||f("%"))&&(t=f(this.operand));)i=new r.CartoCSS.Tree.Operation(s,[i||e,t],n);return i||e}},addition:function(){var e,i,a,o;if(e=f(this.multiplication)){for(;(a=f(/^[-+]\s+/)||" "!=t.charAt(s-1)&&(f("+")||f("-")))&&(i=f(this.multiplication));)o=new r.CartoCSS.Tree.Operation(a,[o||e,i],n);return o||e}},operand:function(){return f(this.sub)||f(this.entity)},expression:function(){for(var e,t=[];e=f(this.addition)||f(this.entity);)t.push(e);if(t.length>0)return new r.CartoCSS.Tree.Expression(t)},property:function(){var e=f(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}parse(e){var t=this.parser;return this.ruleSet=t.parse(e)}toShaders(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var s={},r=[];this._toShaders(s,r,t);for(var i=[],a={},n=0,o=t.length;n<o;++n){var l=t[n],h=l.attachment,u=s[r[n]],c=[];if(!a[h]){var d=0;for(var p in u)if("zoom"!==p&&"frames"!==p&&"attachment"!==p&&"elements"!=p)if("layer-index"===p){var m=(u[p].join("\n"),null);Object.defineProperty(c,"layerIndex",{configurable:!0,enumerable:!1,value:m})}else c[d++]=function(e,t){if(!Array.isArray(e))return e;var s=e.join("\n"),r='attributes["FEATUREID"]&&attributes["FEATUREID"]',i=s.indexOf(r);if(i>=0){if(!t.featureFilter){var a=i+r.length,n=s.indexOf(")",a+1),o="featureId&&(featureId"+s.substring(a,n)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:p,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+s+";} return _value; ")}}return{property:p,getValue:Function("attributes","zoom","var _value = null;"+s+"; return _value; ")}}(u[p],c);Object.defineProperty(c,"attachment",{configurable:!0,enumerable:!1,value:h}),Object.defineProperty(c,"elements",{configurable:!0,enumerable:!1,value:l.elements}),i.push(c),a[r[n]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return i}}return null}_toShaders(e,t,s){for(let i=0,a=s.length;i<a;++i){let a=s[i],n=[];for(let e=0,t=a.elements.length;e<t;e++)n.push(a.elements[e]);let o=a.filters.filters,l=[];for(let e in o)l.push(o[e].id);let h=n.join("/")+"::"+a.attachment+"_"+l.join("_");t.push(h);let u=e[h]=e[h]||{};u.zoom=r.CartoCSS.Tree.Zoom.all;let c=a.toJS(this.env);for(let e in c)(u[e]=u[e]||[]).push(c[e].join("\n"))}}getShaders(){return this.shaders}destroy(){this.cartoStr=null,this.env=null,this.ruleSet=null,this.parser=null,this.shaders=null}}r._mapnik_reference_latest={version:"2.1.1",style:{"filter-mode":{type:["all","first"],doc:"Control the processing behavior of Rule filters within a Style. If 'all' is used then all Rules are processed sequentially independent of whether any previous filters matched. If 'first' is used then it means processing ends after the first match (a positive filter evaluation) and no further Rules in the Style are processed ('first' is usually the default for CSS implementations on top of Mapnik to simplify translation from CSS to Mapnik XML)","default-value":"all","default-meaning":"All Rules in a Style are processed whether they have filters or not and whether or not the filter conditions evaluate to true."},"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},layer:{name:{"default-value":"",type:"string",required:!0,"default-meaning":"No layer name has been provided",doc:"The name of a layer. Can be anything you wish and is not strictly validated, but ideally unique in the map"},srs:{"default-value":"",type:"string","default-meaning":"No srs value is provided and the value will be inherited from the Map's srs",doc:"The spatial reference system definition for the layer, aka the projection. Can either be a proj4 literal string like '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' or, if the proper proj4 epsg/nad/etc identifier files are installed, a string that uses an id like: '+init=epsg:4326'"},status:{"default-value":!0,type:"boolean","default-meaning":"This layer will be marked as active and available for processing",doc:"A property that can be set to false to disable this layer from being processed"},minzoom:{"default-value":"0",type:"float","default-meaning":"The layer will be visible at the minimum possible scale",doc:"The minimum scale denominator that this layer will be visible at. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},maxzoom:{"default-value":"1.79769e+308",type:"float","default-meaning":"The layer will be visible at the maximum possible scale",doc:"The maximum scale denominator that this layer will be visible at. The default is the numeric limit of the C++ double type, which may vary slightly by system, but is likely a massive number like 1.79769e+308 and ensures that this layer will always be visible unless the value is reduced. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},queryable:{"default-value":!1,type:"boolean","default-meaning":"The layer will not be available for the direct querying of data values",doc:"This property was added for GetFeatureInfo/WMS compatibility and is rarely used. It is off by default meaning that in a WMS context the layer will not be able to be queried unless the property is explicitly set to true"},"clear-label-cache":{"default-value":!1,type:"boolean","default-meaning":"The renderer's collision detector cache (used for avoiding duplicate labels and overlapping markers) will not be cleared immediately before processing this layer",doc:"This property, by default off, can be enabled to allow a user to clear the collision detector cache before a given layer is processed. This may be desirable to ensure that a given layers data shows up on the map even if it normally would not because of collisions with previously rendered labels or markers"},"group-by":{"default-value":"",type:"string","default-meaning":"No special layer grouping will be used during rendering",doc:"https://github.com/mapnik/mapnik/wiki/Grouped-rendering"},"buffer-size":{"default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:"Extra tolerance around the Layer extent (in pixels) used to when querying and (potentially) clipping the layer data during rendering"},"maximum-extent":{"default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query this specific layer data during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Layer."}},symbolizers:{"*":{"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},map:{"background-color":{css:"background-color","default-value":"none","default-meaning":"transparent",type:"color",doc:"Map Background color"},"background-image":{css:"background-image",type:"uri","default-value":"","default-meaning":"transparent",doc:"An image that is repeated below all features on a map as a background.",description:"Map Background image"},srs:{css:"srs",type:"string","default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},line:{stroke:{css:"line-color","default-value":"rgba(0,0,0,1)",type:"color","default-meaning":"black and fully opaque (alpha = 1), same as rgb(0,0,0)",doc:"The color of a drawn line"},"stroke-width":{css:"line-width","default-value":1,type:"float",doc:"The width of a line in pixels"},"stroke-opacity":{css:"line-opacity","default-value":1,type:"float","default-meaning":"opaque",doc:"The opacity of a line"},"stroke-linejoin":{css:"line-join","default-value":"miter",type:["miter","round","bevel"],doc:"The behavior of lines when joining"},"stroke-linecap":{css:"line-cap","default-value":"butt",type:["butt","round","square"],doc:"The display of line endings"},"stroke-gamma":{css:"line-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of stroke line"},"stroke-gamma-method":{css:"line-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},"stroke-dasharray":{css:"line-dasharray",type:"numbers",doc:"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.","default-value":"none","default-meaning":"solid line"},"stroke-dashoffset":{css:"line-dash-offset",type:"numbers",doc:"valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled)","default-value":"none","default-meaning":"solid line"},"stroke-miterlimit":{css:"line-miterlimit",type:"float",doc:"The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts.","default-value":4,"default-meaning":"Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'"},clip:{css:"line-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},offset:{css:"line-offset",type:"float","default-value":0,"default-meaning":"no offset",doc:"Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line)."},rasterizer:{css:"line-rasterizer",type:["full","fast"],"default-value":"full",doc:"Exposes an alternate AGG rendering method that sacrifices some accuracy for speed."},"geometry-transform":{css:"line-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},markers:{file:{css:"marker-file",doc:"An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.","default-value":"","default-meaning":"An ellipse or circle, if width equals height",type:"uri"},opacity:{css:"marker-opacity",doc:"The overall opacity of the marker, if set, overrides both the opacity of both the fill and stroke","default-value":1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"expression"},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"expression"},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color"},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"marker-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"marker-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},shield:{name:{css:"shield-name",type:"expression",serialization:"content",doc:'Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]'},file:{css:"shield-file",required:!0,type:"uri","default-value":"none",doc:"Image file to render behind the shield text"},"face-name":{css:"shield-face-name",type:"string",validate:"font",doc:"Font name and style to use for the shield text","default-value":"",required:!0},"unlock-image":{css:"shield-unlock-image",type:"boolean",doc:"This parameter should be set to true if you are trying to position text beside rather than on top of the shield image","default-value":!1,"default-meaning":"text alignment relative to the shield image uses the center of the image as the anchor for text positioning."},size:{css:"shield-size",type:"float",doc:"The size of the shield text in pixels"},fill:{css:"shield-fill",type:"color",doc:"The color of the shield text"},placement:{css:"shield-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons."},"avoid-edges":{css:"shield-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.",type:"boolean","default-value":!1},"allow-overlap":{css:"shield-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping shields are shown or hidden.","default-meaning":"Do not allow shields to overlap with other map elements already placed."},"minimum-distance":{css:"shield-min-distance",type:"float","default-value":0,doc:"Minimum distance to the next shield symbol, not necessarily the same shield."},spacing:{css:"shield-spacing",type:"float","default-value":0,doc:"The spacing between repeated occurrences of the same shield on a line"},"minimum-padding":{css:"shield-min-padding","default-value":0,doc:"Determines the minimum amount of padding that a shield gets relative to other shields",type:"float"},"wrap-width":{css:"shield-wrap-width",type:"unsigned","default-value":0,doc:"Length of a chunk of text in characters before wrapping text"},"wrap-before":{css:"shield-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"shield-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long names."},"halo-fill":{css:"shield-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"shield-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},"character-spacing":{css:"shield-character-spacing",type:"unsigned","default-value":0,doc:"Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."},"line-spacing":{css:"shield-line-spacing",doc:"Vertical spacing between lines of multiline labels (in pixels)",type:"unsigned"},dx:{css:"shield-text-dx",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"shield-text-dy",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"shield-dx":{css:"shield-dx",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},"shield-dy":{css:"shield-dy",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},opacity:{css:"shield-opacity",type:"float",doc:"(Default 1.0) - opacity of the image used for the shield","default-value":1},"text-opacity":{css:"shield-text-opacity",type:"float",doc:"(Default 1.0) - opacity of the text placed on top of the shield","default-value":1},"horizontal-alignment":{css:"shield-horizontal-alignment",type:["left","middle","right","auto"],doc:"The shield's horizontal alignment from its centerpoint","default-value":"auto"},"vertical-alignment":{css:"shield-vertical-alignment",type:["top","middle","bottom","auto"],doc:"The shield's vertical alignment from its centerpoint","default-value":"middle"},"text-transform":{css:"shield-text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"justify-alignment":{css:"shield-justify-alignment",type:["left","center","right","auto"],doc:"Define how text in a shield's label is justified","default-value":"auto"},clip:{css:"shield-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"shield-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"line-pattern":{file:{css:"line-pattern-file",type:"uri","default-value":"none",required:!0,doc:"An image file to be repeated and warped along a line"},clip:{css:"line-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"line-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"polygon-pattern":{file:{css:"polygon-pattern-file",type:"uri","default-value":"none",required:!0,doc:"Image to use as a repeated pattern fill within a polygon"},alignment:{css:"polygon-pattern-alignment",type:["local","global"],"default-value":"local",doc:"Specify whether to align pattern fills to the layer or to the map."},gamma:{css:"polygon-pattern-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon pattern edges"},opacity:{css:"polygon-pattern-opacity",type:"float",doc:"(Default 1.0) - Apply an opacity level to the image used for the pattern","default-value":1,"default-meaning":"The image is rendered without modifications"},clip:{css:"polygon-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},raster:{opacity:{css:"raster-opacity","default-value":1,"default-meaning":"opaque",type:"float",doc:"The opacity of the raster symbolizer on top of other symbolizers."},"filter-factor":{css:"raster-filter-factor","default-value":-1,"default-meaning":"Allow the datasource to choose appropriate downscaling.",type:"float",doc:"This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed."},scaling:{css:"raster-scaling",type:["near","fast","bilinear","bilinear8","bicubic","spline16","spline36","hanning","hamming","hermite","kaiser","quadric","catrom","gaussian","bessel","mitchell","sinc","lanczos","blackman"],"default-value":"near",doc:"The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality."},"mesh-size":{css:"raster-mesh-size","default-value":16,"default-meaning":"Reprojection mesh will be 1/16 of the resolution of the source image",type:"unsigned",doc:"A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion."},"comp-op":{css:"raster-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},point:{file:{css:"point-file",type:"uri",required:!1,"default-value":"none",doc:"Image file to represent a point"},"allow-overlap":{css:"point-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping points are shown or hidden.","default-meaning":"Do not allow points to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"point-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},opacity:{css:"point-opacity",type:"float","default-value":1,"default-meaning":"Fully opaque",doc:"A value from 0 to 1 to control the opacity of the point"},placement:{css:"point-placement",type:["centroid","interior"],doc:"How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.","default-value":"centroid"},transform:{css:"point-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},"comp-op":{css:"point-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},text:{name:{css:"text-name",type:"expression",required:!0,"default-value":"",serialization:"content",doc:"Value to use for a text label. Data columns are specified using brackets like [column_name]"},"face-name":{css:"text-face-name",type:"string",validate:"font",doc:"Font name and style to render a label in",required:!0},size:{css:"text-size",type:"float","default-value":10,doc:"Text size in pixels"},"text-ratio":{css:"text-ratio",doc:"Define the amount of text (of the total) present on successive lines when wrapping occurs","default-value":0,type:"unsigned"},"wrap-width":{css:"text-wrap-width",doc:"Length of a chunk of text in characters before wrapping text","default-value":0,type:"unsigned"},"wrap-before":{css:"text-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"text-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long text."},spacing:{css:"text-spacing",type:"unsigned",doc:"Distance between repeated text labels on a line (aka. label-spacing)"},"character-spacing":{css:"text-character-spacing",type:"float","default-value":0,doc:"Horizontal spacing adjustment between characters in pixels"},"line-spacing":{css:"text-line-spacing","default-value":0,type:"unsigned",doc:"Vertical spacing adjustment between lines in pixels"},"label-position-tolerance":{css:"text-label-position-tolerance","default-value":0,type:"unsigned",doc:"Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line)"},"max-char-angle-delta":{css:"text-max-char-angle-delta",type:"float","default-value":"22.5",doc:"The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners."},fill:{css:"text-fill",doc:"Specifies the color for the text","default-value":"#000000",type:"color"},opacity:{css:"text-opacity",doc:"A number from 0 to 1 specifying the opacity for the text","default-value":1,"default-meaning":"Fully opaque",type:"float"},"halo-fill":{css:"text-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"text-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},dx:{css:"text-dx",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"text-dy",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"vertical-alignment":{css:"text-vertical-alignment",type:["top","middle","bottom","auto"],doc:"Position of label relative to point position.","default-value":"auto","default-meaning":'Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.'},"avoid-edges":{css:"text-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.","default-value":!1,type:"boolean"},"minimum-distance":{css:"text-min-distance",doc:"Minimum permitted distance to the next text symbolizer.",type:"float"},"minimum-padding":{css:"text-min-padding",doc:"Determines the minimum amount of padding that a text symbolizer gets relative to other text",type:"float"},"minimum-path-length":{css:"text-min-path-length",type:"float","default-value":0,"default-meaning":"place labels on all paths",doc:"Place labels only on paths longer than this value."},"allow-overlap":{css:"text-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping text is shown or hidden.","default-meaning":"Do not allow text to overlap with other text - overlapping markers will not be shown."},orientation:{css:"text-orientation",type:"expression",doc:"Rotate the text."},placement:{css:"text-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"Control the style of placement of a point versus the geometry it is attached to."},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"expression","default-value":"0"}}},colors:{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50],transparent:[0,0,0,0]},filter:{value:["true","false","null","point","linestring","polygon","collection"]}},Za.mapnik_reference={version:{latest:r._mapnik_reference_latest,"2.1.1":r._mapnik_reference_latest}},r.CartoCSS=Za,r.CartoCSS.Tree={},r.CartoCSS.Tree.operate=function(e,t,s){switch(e){case"+":return t+s;case"-":return t-s;case"*":return t*s;case"%":return t%s;case"/":return t/s}},r.CartoCSS.Tree.functions={rgb:function(e,t,s){return this.rgba(e,t,s,1)},rgba:function(e,t,s,i){var a=this,n=[e,t,s].map(function(e){return a.number(e)});return i=a.number(i),n.some(isNaN)||isNaN(i)?null:new r.CartoCSS.Tree.Color(n,i)},stop:function(e){var t,s;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(s=arguments[2]),{is:"tag",val:e,color:t,mode:s,toString:r=>'\n\t<stop value="'+e.ev(r)+'"'+(t?' color="'+t.ev(r)+'" ':"")+(s?' mode="'+s.ev(r)+'" ':"")+"/>"}},hsl:function(e,t,s){return this.hsla(e,t,s,1)},hsla:function(e,t,s,r){if([e=this.number(e)%360/360,t=this.number(t),s=this.number(s),r=this.number(r)].some(isNaN))return null;var i=s<=.5?s*(t+1):s+t-s*t,a=2*s-i;return this.rgba(255*n(e+1/3),255*n(e),255*n(e-1/3),r);function n(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?a+(i-a)*e*6:2*e<1?i:3*e<2?a+(i-a)*(2/3-e)*6:a}},hue:function(e){return"toHSL"in e?new r.CartoCSS.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new r.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new r.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new r.CartoCSS.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s+=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},desaturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s-=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},lighten:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l+=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},darken:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l-=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},fadein:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a+=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},fadeout:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a-=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},spin:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL(),r=(s.h+t.value)%360;return s.h=r<0?360+r:r,this.hsla_simple(s)},replace:function(e,t,s){return"field"===e.is?e.toString+".replace("+t.toString()+", "+s.toString()+")":e.replace(t,s)},mix:function(e,t,s){var i=s.value/100,a=2*i-1,n=e.toHSL().a-t.toHSL().a,o=((a*n==-1?a:(a+n)/(1+a*n))+1)/2,l=1-o,h=[e.rgb[0]*o+t.rgb[0]*l,e.rgb[1]*o+t.rgb[1]*l,e.rgb[2]*o+t.rgb[2]*l],u=e.alpha*i+t.alpha*(1-i);return new r.CartoCSS.Tree.Color(h,u)},greyscale:function(e){return this.desaturate(e,new r.CartoCSS.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),s=e.value,i=0;i<t.length;i++)s=s.replace(/%s/,t[i].value).replace(/%[da]/,t[i].toString());return s=s.replace(/%%/g,"%"),new r.CartoCSS.Tree.Quoted(s)},hsla_simple:function(e){return this.hsla(e.h,e.s,e.l,e.a)},number:function(e){return e instanceof r.CartoCSS.Tree.Dimension?parseFloat("%"===e.unit?e.value/100:e.value):"number"==typeof e?e:NaN},clamp:function(e){return Math.min(1,Math.max(0,e))}},r.CartoCSS.Tree.Call=class{constructor(e,t,s){this.is="call",this.name=e,this.args=t,this.index=s}ev(e){for(var t=this.args.map(function(t){return t.ev(e)}),s=0;s<t.length;s++)if("undefined"===t[s].is)return{is:"undefined",value:"undefined"};if(this.name in r.CartoCSS.Tree.functions){if(r.CartoCSS.Tree.functions[this.name].length<=t.length){var i=r.CartoCSS.Tree.functions[this.name].apply(r.CartoCSS.Tree.functions,t);return null===i?(e.error({message:"incorrect arguments given to "+this.name+"()",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):i}return e.error({message:"incorrect number of arguments for "+this.name+"(). "+r.CartoCSS.Tree.functions[this.name].length+" expected.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}var a=r.CartoCSS.Tree.Reference.mapnikFunctions[this.name];if(void 0===a){var n=Ka()(r.CartoCSS.Tree.Reference.mapnikFunctions),o=this.name,l=n.map(function(e){return[e[0],r.CartoCSS.Tree.Reference.editDistance(o,e[0]),e[1]]}).sort(function(e,t){return e[1]-t[1]});return e.error({message:"unknown function "+this.name+"(), did you mean "+l[0][0]+"("+l[0][2]+")",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}return a!==t.length&&-1!==a?(e.error({message:"function "+this.name+"() takes "+a+" arguments and was given "+t.length,index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):(this.args=t,this)}toString(e,t){return this.args.length?this.name+"("+this.args.join(",")+")":this.name}},r.CartoCSS.Tree.Color=class{constructor(e,t){this.is="color",Array.isArray(e)?this.rgb=e.slice(0,3):6==e.length?this.rgb=e.match(/.{2}/g).map(function(e){return parseInt(e,16)}):this.rgb=e.split("").map(function(e){return parseInt(e+e,16)}),"number"==typeof t?this.alpha=t:4===e.length?this.alpha=e[3]:this.alpha=1}ev(){return this}toString(){return"rgba("+this.rgb.map(function(e){return Math.round(e)}).concat(this.alpha).join(", ")+")"}operate(e,t,s){var i=[];s instanceof r.CartoCSS.Tree.Color||(s=s.toColor());for(var a=0;a<3;a++)i[a]=r.CartoCSS.Tree.operate(t,this.rgb[a],s.rgb[a]);return new r.CartoCSS.Tree.Color(i)}toHSL(){var e,t,s=this.rgb[0]/255,r=this.rgb[1]/255,i=this.rgb[2]/255,a=this.alpha,n=Math.max(s,r,i),o=Math.min(s,r,i),l=(n+o)/2,h=n-o;if(n===o)e=t=0;else{switch(t=l>.5?h/(2-n-o):h/(n+o),n){case s:e=(r-i)/h+(r<i?6:0);break;case r:e=(i-s)/h+2;break;case i:e=(s-r)/h+4}e/=6}return{h:360*e,s:t,l,a}}},r.CartoCSS.Tree.Comment=class{constructor(e,t){this.value=e,this.silent=!!t}toString(e){return"\x3c!--"+this.value+"--\x3e"}ev(){return this}},r.CartoCSS.Tree.Definition=class{constructor(e,t){this.elements=e.elements,this.rules=t,this.ruleIndex={};for(var s=0;s<this.rules.length;s++)"zoom"in this.rules[s]&&(this.rules[s]=this.rules[s].clone()),this.rules[s].zoom=e.zoom,this.ruleIndex[this.rules[s].updateID()]=!0;this.filters=e.filters,this.zoom=e.zoom,this.attachment=e.attachment||"__default__",this.specificity=e.specificity()}toString(){for(var e=this.filters.toString(),t=0;t<this.rules.length;t++)e+="\n "+this.rules[t];return e}toJS(e){var t={},s=this.zoom,i=this.filters.toJS(e),a=[s];function n(s){if(s instanceof r.CartoCSS.Tree.Rule)t[s.name]=t[s.name]||[],i?t[s.name].push("if("+i+"){"+s.value.toJS(e)+"}"):t[s.name].push(s.value.toJS(e));else if(s instanceof r.CartoCSS.Tree.Ruleset){var a=s.toJS(e);for(var n in a)for(var o in t[n]=t[n]||[],a[n])t[n].push(a[n][o])}}for(var o in i&&a.push(i),i=a.join(" && "),this.rules)n(this.rules[o]);return t}},r.CartoCSS.Tree.Dimension=class{constructor(e,t,s){this.is="float",this.physical_units=["m","cm","in","mm","pt","pc"],this.screen_units=["px","%"],this.all_units=["m","cm","in","mm","pt","pc","px","%"],this.densities={m:.0254,mm:25.4,cm:2.54,pt:72,pc:6},this.value=parseFloat(e),this.unit=t||null,this.index=s}ev(e){if(this.unit&&this.all_units.indexOf(this.unit)<0)return e.error({message:"Invalid unit: '"+this.unit+"'",index:this.index}),{is:"undefined",value:"undefined"};if(this.unit&&this.physical_units.indexOf(this.unit)>=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}toColor(){return new r.CartoCSS.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(e,t,s){return"%"===this.unit&&"%"!==s.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===s.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new r.CartoCSS.Tree.Dimension(r.CartoCSS.Tree.operate(t,this.value,this.value*s.value*.01),this.unit):new r.CartoCSS.Tree.Dimension(r.CartoCSS.Tree.operate(t,this.value,s.value),this.unit||s.unit)}},r.CartoCSS.Tree.Element=class{constructor(e){this.value=e.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}specificity(){return["id"===this.type?1:0,"class"===this.type?1:0]}toString(){return this.value}},r.CartoCSS.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(e){return this.value.length>1?new r.CartoCSS.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},r.CartoCSS.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},r.CartoCSS.Tree.Filter=class{constructor(e,t,s,r,i){this.ops={"<":[" &lt; ","numeric"],">":[" &gt; ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" &lt;= ","numeric"],">=":[" &gt;= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=s,this.index=r,this.filename=i,this.id=this.key+this.op+this.val}ev(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}toString(){return"["+this.id+"]"}},r.CartoCSS.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var s=e.val;void 0!==e._val&&(s=e._val.toString(!0)),e.key&&"scale"===e.key.value?s=+s:"string"!=typeof s&&"object"!=typeof s||(s="'"+s+"'");var r="attributes";return r+"&&"+r+e.key+"&&"+r+e.key+" "+t+s}var s=[];for(var r in this.filters)s.push(t(this.filters[r]));return s.join(" && ")}toString(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}ev(e){for(var t in this.filters)this.filters[t].ev(e);return this}clone(){var e=new r.CartoCSS.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}cloneWith(e){var t=[];for(var s in e.filters){var i=this.addable(e.filters[s]);if(!1===i)return!1;!0===i&&t.push(e.filters[s])}if(!t.length)return null;var a=new r.CartoCSS.Tree.Filterset;for(s in this.filters)a.filters[s]=this.filters[s];for(;s=t.shift();)a.add(s);return a}addable(e){var t=e.key.toString(),s=e.val.toString();switch(s.match(/^[0-9]+(\.[0-9]*)?_match/)&&(s=parseFloat(s)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==s&&null:void 0===this.filters[t+"!="+s]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s))));case"=~":return!0;case"!=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val!==s&&null:void 0!==this.filters[t+"!="+s]?null:void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)||null;case">":return t+"="in this.filters?!(this.filters[t+"="].val<=s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val<s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)||null));case"<=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)||null))}}conflict(e){var t=e.key.toString(),s=e.val.toString();return isNaN(parseFloat(s))||(s=parseFloat(s)),("="===e.op&&void 0!==this.filters[t+"="]&&s!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&s==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&s===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var s,r=e.key.toString(),i=e.op,a=this.conflict(e);if(a)return a;if("="===i){for(var n in this.filters)this.filters[n].key===r&&delete this.filters[n];this.filters[r+"="]=e}else if("!="===i)this.filters[r+"!="+e.val]=e;else if("=~"===i)this.filters[r+"=~"+e.val]=e;else if(">"===i){for(var o in this.filters)this.filters[o].key===r&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[r+">"]=e}else if(">="===i){for(var l in this.filters)s=+this.filters[l].val.toString(),this.filters[l].key===r&&s<e.val&&delete this.filters[l];void 0!==this.filters[r+"!="+e.val]?(delete this.filters[r+"!="+e.val],e.op=">",this.filters[r+">"]=e):this.filters[r+">="]=e}else if("<"===i){for(var h in this.filters)s=+this.filters[h].val.toString(),this.filters[h].key===r&&s>=e.val&&delete this.filters[h];this.filters[r+"<"]=e}else if("<="===i){for(var u in this.filters)s=+this.filters[u].val.toString(),this.filters[u].key===r&&s>e.val&&delete this.filters[u];void 0!==this.filters[r+"!="+e.val]?(delete this.filters[r+"!="+e.val],e.op="<",this.filters[r+"<"]=e):this.filters[r+"<="]=e}}},r.CartoCSS.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},r.CartoCSS.Tree.Invalid=class{constructor(e,t,s){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=s||"Invalid code: "+this.chunk}ev(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}},r.CartoCSS.Tree.Keyword=class{ev(){return this}constructor(e){this.value=e;var t={transparent:"color",true:"boolean",false:"boolean"};this.is=t[e]?t[e]:"keyword"}toString(){return this.value}},r.CartoCSS.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},r.CartoCSS.Tree.Operation=class{constructor(e,t,s){this.is="operation",this.op=e.trim(),this.operands=t,this.index=s}ev(e){var t,s=this.operands[0].ev(e),i=this.operands[1].ev(e);return"undefined"===s.is||"undefined"===i.is?{is:"undefined",value:"undefined"}:(s instanceof r.CartoCSS.Tree.Dimension&&i instanceof r.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(t=i,i=s,s=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),s instanceof r.CartoCSS.Tree.Quoted&&i instanceof r.CartoCSS.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):s instanceof r.CartoCSS.Tree.Field||i instanceof r.CartoCSS.Tree.Field||s instanceof r.CartoCSS.Tree.Literal||i instanceof r.CartoCSS.Tree.Literal?"color"===s.is||"color"===i.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new r.CartoCSS.Tree.Literal(s.ev(e).toString(!0)+this.op+i.ev(e).toString(!0)):void 0===s.operate?(e.error({message:"Cannot do math with type "+s.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):s.operate(e,this.op,i))}},r.CartoCSS.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&amp;"),s=t.replace(/\'/g,"\\'").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/\>/g,"&gt;");return!0===e?"'"+s+"'":t}ev(){return this}operate(e,t,s){return new r.CartoCSS.Tree.Quoted(r.CartoCSS.Tree.operate(t,this.toString(),s.toString(this.contains_field)))}},r.CartoCSS.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var s in e.symbolizers)for(var r in e.symbolizers[s])e.symbolizers[s][r].hasOwnProperty("css")&&(t[e.symbolizers[s][r].css]=[e.symbolizers[s][r],s,r]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var s in e.symbolizers)for(var r in e.symbolizers[s])if("functions"===e.symbolizers[s][r].type)for(var i=0;i<e.symbolizers[s][r].functions.length;i++){var a=e.symbolizers[s][r].functions[i];t[a[0]]=a[1]}return t}(e),this.required_cache=function(e){var t={};for(var s in e.symbolizers)for(var r in t[s]=[],e.symbolizers[s])e.symbolizers[s][r].required&&t[s].push(e.symbolizers[s][r].css);return t}(e)},setVersion:function(e){return!!r.CartoCSS.mapnik_reference.version.hasOwnProperty(e)&&(this.setData(r.CartoCSS.mapnik_reference.version[e]),!0)},selectorData:function(e,t){if(this.selector_cache&&this.selector_cache[e])return this.selector_cache[e][t]},validSelector:function(e){return!!this.selector_cache[e]},selectorName:function(e){return this.selectorData(e,2)},selector:function(e){return this.selectorData(e,0)},symbolizer:function(e){return this.selectorData(e,1)},requiredProperties:function(e,t){var s=this.required_cache[e];for(var r in s)if(!(s[r]in t))return"Property "+s[r]+" required for defining "+e+" styles."},isFont:function(e){return"font"===this.selector(e).validate},editDistance:function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;for(var s=[],r=0;r<=t.length;r++)s[r]=[r];for(var i=0;i<=e.length;i++)s[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?s[r][i]=s[r-1][i-1]:s[r][i]=Math.min(s[r-1][i-1]+1,Math.min(s[r][i-1]+1,s[r-1][i]+1));return s[t.length][e.length]},validValue:function(e,t,s){var r;if(this.selector(t)){if("keyword"===s.value[0].is)return function(e,t){return"object"==typeof this.selector(t).type?-1!==this.selector(t).type.indexOf(e.value[0].value):"string"===this.selector(t).type}(s,t);if("undefined"===s.value[0].is)return!0;if("numbers"===this.selector(t).type){for(r in s.value)if("float"!==s.value[r].is)return!1;return!0}if("tags"===this.selector(t).type){if(!s.value)return!1;if(!s.value[0].value)return"tag"===s.value[0].is;for(r=0;r<s.value[0].value.length;r++)if("tag"!==s.value[0].value[r].is)return!1;return!0}if("functions"==this.selector(t).type)return function(e,t){if("string"===e.value[0].is)return!0;for(var s in e.value)for(var r in e.value[s].value){if("call"!==e.value[s].value[r].is)return!1;var i=find(this.selector(t).functions,function(t){return t[0]===e.value[s].value[r].name});if(!(i&&-1===i[1]||i&&i[1]===e.value[s].value[r].args.length))return!1}return!0}(s,t);if("expression"===this.selector(t).type)return!0;if("unsigned"===this.selector(t).type)return"float"===s.value[0].is&&(s.value[0].round(),!0);if(this.selector(t).validate){for(r=0;r<s.value.length;r++)if(this.selector(t).type===s.value[r].is&&this._validateValue[this.selector(t).validate](e,s.value[r].value))return!0;return!1}return this.selector(t).type===s.value[0].is}return!1}},r.CartoCSS.Tree.Reference.setVersion("latest"),r.CartoCSS.Tree.Rule=class{constructor(e,t,s,i){this.is="rule";var a=e.split("/");this.name=a.pop(),this.instance=a.length?a[0]:"__default__",this.value=t instanceof r.CartoCSS.Tree.Value?t:new r.CartoCSS.Tree.Value([t]),this.index=s,this.symbolizer=r.CartoCSS.Tree.Reference.symbolizer(this.name),this.filename=i,this.variable="@"===e.charAt(0)}clone(){var e=Object.create(r.CartoCSS.Tree.Rule.prototype);return e.name=this.name,e.value=this.value,e.index=this.index,e.instance=this.instance,e.symbolizer=this.symbolizer,e.filename=this.filename,e.variable=this.variable,e}updateID(){return this.id=this.zoom+"#"+this.instance+"#"+this.name}toString(){return"["+r.CartoCSS.Tree.Zoom.toString(this.zoom)+"] "+this.name+": "+this.value}ev(e){return new r.CartoCSS.Tree.Rule(this.name,this.value.ev(e),this.index,this.filename)}},r.CartoCSS.Tree.Ruleset=class{constructor(e,t){this.is="ruleset",this.selectors=e,this.rules=t,this._lookups={}}ev(e){var t,s,i=new r.CartoCSS.Tree.Ruleset(this.selectors,this.rules.slice(0));for(i.root=this.root,e.frames.unshift(i),t=0;t<i.rules.length;t++)s=i.rules[t],i.rules[t]=s.ev?s.ev(e):s;return e.frames.shift(),i}match(e){return!e||0===e.length}variables(){return this._variables?this._variables:this._variables=this.rules.reduce(function(e,t){return t instanceof r.CartoCSS.Tree.Rule&&!0===t.variable&&(e[t.name]=t),e},{})}variable(e){return this.variables()[e]}rulesets(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(e){return e instanceof r.CartoCSS.Tree.Ruleset})}find(e,t){t=t||this;var s=[],i=e.toString();return i in this._lookups?this._lookups[i]:(this.rulesets().forEach(function(i){if(i!==t)for(var a=0;a<i.selectors.length;a++)if(e.match(i.selectors[a])){e.elements.length>1?Array.prototype.push.apply(s,i.find(new r.CartoCSS.Tree.Selector(null,null,e.elements.slice(1)),t)):s.push(i);break}}),this._lookups[i]=s)}evZooms(e){for(var t=0;t<this.selectors.length;t++){for(var s=r.CartoCSS.Tree.Zoom.all,i=0;i<this.selectors[t].zoom.length;i++)s=this.selectors[t].zoom[i].ev(e).zoom;this.selectors[t].zoom=s}}flatten(e,t,s){var i,a,n=[];for(0===this.selectors.length&&(s.frames=s.frames.concat(this.rules)),this.evZooms(s),i=0;i<this.selectors.length;i++){var o=this.selectors[i];if(o.filters)if(t.length)for(a=0;a<t.length;a++){var l=t[a],h=l.filters.cloneWith(o.filters);if(null===h){if(l.zoom===o.zoom&&l.attachment===o.attachment&&l.elements.join()===o.elements.join()){n.push(l);continue}h=l.filters}else if(!h)continue;var u=Object.create(r.CartoCSS.Tree.Selector.prototype);u.filters=h,u.zoom=o.zoom,u.elements=l.elements.concat(o.elements),l.attachment&&o.attachment?u.attachment=l.attachment+"/"+o.attachment:u.attachment=o.attachment||l.attachment,u.conditions=l.conditions+o.conditions,u.index=o.index,n.push(u)}else n.push(o)}var c=[];for(i=0;i<this.rules.length;i++){var d=this.rules[i];d instanceof r.CartoCSS.Tree.Ruleset?d.flatten(e,n,s):d instanceof r.CartoCSS.Tree.Rule?c.push(d):d instanceof r.CartoCSS.Tree.Invalid&&s.error(d)}var p=!!c.length&&c[0].index;for(i=0;i<n.length;i++)!1!==p&&(n[i].index=p),e.push(new r.CartoCSS.Tree.Definition(n[i],c.slice()));return e}},r.CartoCSS.Tree.Selector=class{constructor(e,t,s,i,a,n){this.elements=s||[],this.attachment=i,this.filters=e||{},this.zoom=void 0!==t?t:r.CartoCSS.Tree.Zoom.all,this.conditions=a,this.index=n}specificity(){return this.elements.reduce(function(e,t){var s=t.specificity();return e[0]+=s[0],e[1]+=s[1],e},[0,0,this.conditions,this.index])}},r.CartoCSS.Tree.URL=class{constructor(e,t){this.is="uri",this.value=e,this.paths=t}toString(){return this.value.toString()}ev(e){return new r.CartoCSS.Tree.URL(this.value.ev(e),this.paths)}},r.CartoCSS.Tree.Value=class{constructor(e){this.is="value",this.value=e}ev(e){return 1===this.value.length?this.value[0].ev(e):new r.CartoCSS.Tree.Value(this.value.map(function(t){return t.ev(e)}))}toJS(e){var t=this.ev(e),s=t.toString();return"color"===t.is||"uri"===t.is||"string"===t.is||"keyword"===t.is?s="'"+s+"'":"field"===t.is?s=s.replace(/\[(.*)\]/g,"attributes['_match1']"):t.value&&"object"==typeof t.value&&(s="["+s+"]"),"_value = "+s+";"}toString(e,t,s,r){return this.value.map(function(t){return t.toString(e,r)}).join(s||", ")}clone(){var e=Object.create(r.CartoCSS.Tree.Value.prototype);return Array.isArray(e)?e.value=this.value.slice():e.value=this.value,e.is=this.is,e}},r.CartoCSS.Tree.Variable=class{constructor(e,t,s){this.is="variable",this.name=e,this.index=t,this.filename=s}toString(){return this.name}ev(e){if(this._css)return this._css;var t=e.frames.filter(function(e){return e.name===this.name}.bind(this));return t.length?t[0].value.ev(e):(e.error({message:"variable "+this.name+" is undefined",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"})}},r.CartoCSS.Tree.Zoom=class{constructor(e,t,s){this.op=e,this.value=t,this.index=s}setZoom(e){return this.zoom=e,this}ev(e){var t=parseInt(this.value.ev(e).toString(),10);switch((t>r.CartoCSS.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+r.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t;break;default:return this}return this}toString(){for(var e="",t=0;t<=r.CartoCSS.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<<t?"X":".";return e}},r.CartoCSS.Tree.Zoom.all=23,r.CartoCSS.Tree.Zoom.maxZoom=22,r.CartoCSS.Tree.Zoom.ranges={0:1e9,1:5e8,2:2e8,3:1e8,4:5e7,5:25e6,6:125e5,7:65e5,8:3e6,9:15e5,10:75e4,11:4e5,12:2e5,13:1e5,14:5e4,15:25e3,16:12500,17:5e3,18:2500,19:1500,20:750,21:500,22:250,23:100};r.ThemeStyle=
  1234. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1235. * This program are made available under the terms of the Apache License, Version 2.0
  1236. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1237. class{constructor(e){e=e||{},this.fill=!0,this.fillColor="#000000",this.fillOpacity=1,this.stroke=!1,this.strokeColor="#000000",this.strokeOpacity=1,this.strokeWidth=1,this.strokeLinecap="butt",this.strokeLineJoin="miter",this.strokeDashstyle="solid",this.pointRadius=6,this.shadowBlur=0,this.shadowColor="#000000",this.shadowOffsetX=0,this.shadowOffsetY=0,this.label="",this.labelRect=!1,this.fontColor="",this.fontSize=12,this.fontStyle="normal",this.fontVariant="normal",this.fontWeight="normal",this.fontFamily="arial,sans-serif",this.labelPosition="top",this.labelAlign="center",this.labelBaseline="middle",this.labelXOffset=0,this.labelYOffset=0,ye.extend(this,e)}};
  1238. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1239. * This program are made available under the terms of the Apache License, Version 2.0
  1240. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1241. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1242. * This program are made available under the terms of the Apache License, Version 2.0
  1243. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1244. class $a{constructor(){this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=!0,this.hoverable=!0,this.style=null,this.highlightStyle={},this.CLASS_NAME="SuperMap.Feature.ShapeParameters"}destroy(){this.refOriginalPosition=null,this.refDataID=null,this.isHoverByRefDataID=null,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=null,this.hoverable=null,this.style=null,this.highlightStyle=null}}r.Feature=r.Feature||{},r.Feature.ShapeParameters=$a;
  1245. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1246. * This program are made available under the terms of the Apache License, Version 2.0
  1247. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1248. class en extends $a{constructor(e,t){super(e,t),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=6,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Point"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Point=en;
  1249. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1250. * This program are made available under the terms of the Apache License, Version 2.0
  1251. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1252. class tn extends $a{constructor(e){super(e),this.pointList=e,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Line"}destroy(){this.pointList=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Line=tn;
  1253. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1254. * This program are made available under the terms of the Apache License, Version 2.0
  1255. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1256. class sn extends $a{constructor(e){super(e),this.pointList=e,this.holePolygonPointLists=null,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Polygon"}destroy(){this.pointList=null,this.holePolygonPointLists=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Polygon=sn;
  1257. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1258. * This program are made available under the terms of the Apache License, Version 2.0
  1259. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1260. class rn extends $a{constructor(e,t,s,r){super(e,t,s,r),this.x=isNaN(e)?0:e,this.y=isNaN(e)?0:t,this.width=isNaN(s)?0:s,this.height=isNaN(r)?0:r,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Rectangle"}destroy(){this.x=null,this.y=null,this.width=null,this.height=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Rectangle=rn;
  1261. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1262. * This program are made available under the terms of the Apache License, Version 2.0
  1263. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1264. class an extends $a{constructor(e,t,s,r,i,a,n){super(e,t,s,r,i,a,n),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(s)?0:s,this.startAngle=isNaN(r)?0:r,this.endAngle=isNaN(i)?0:i,this.r0=isNaN(a)?0:a,this.clockWise=n,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Sector"}destroy(){this.x=null,this.y=null,this.r=null,this.startAngle=null,this.endAngle=null,this.r0=null,this.clockWise=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Sector=an;
  1265. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1266. * This program are made available under the terms of the Apache License, Version 2.0
  1267. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1268. class nn extends $a{constructor(e,t,s){super(e,t,s),this.x=e,this.y=t,this.text=s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Label"}destroy(){this.x=null,this.y=null,this.text=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Label=nn;
  1269. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1270. * This program are made available under the terms of the Apache License, Version 2.0
  1271. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1272. class on extends $a{constructor(e,t,s,r,i,a,n,o,l){super(e,t,s,r,i,a,n,o,l),this.x=e,this.y=t,this.image=s,this.width=r,this.height=i,this.sx=a,this.sy=n,this.sWidth=o,this.sHeight=l,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Image"}destroy(){this.x=null,this.y=null,this.image=null,this.width=null,this.height=null,this.sx=null,this.sy=null,this.sWidth=null,this.sHeight=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Image=on;
  1273. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1274. * This program are made available under the terms of the Apache License, Version 2.0
  1275. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1276. class ln extends $a{constructor(e,t,s){super(e,t,s),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(s)?0:s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Circle"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}r.Feature=r.Feature||{},r.Feature.ShapeParameters.Circle=ln;
  1277. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1278. * This program are made available under the terms of the Apache License, Version 2.0
  1279. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1280. class hn{constructor(){this._handlers={},this.CLASS_NAME="SuperMap.LevelRenderer.Eventful"}destroy(){this._handlers=null}one(e,t,s){var r=this._handlers;return t&&e?(r[e]||(r[e]=[]),r[e].push({h:t,one:!0,ctx:s||this}),this):this}bind(e,t,s){var r=this._handlers;return t&&e?(r[e]||(r[e]=[]),r[e].push({h:t,one:!1,ctx:s||this}),this):this}unbind(e,t){var s=this._handlers;if(!e)return this._handlers={},this;if(t){if(s[e]){for(var r=[],i=0,a=s[e].length;i<a;i++)s[e][i].h!=t&&r.push(s[e][i]);s[e]=r}s[e]&&0===s[e].length&&delete s[e]}else delete s[e];return this}dispatch(e){if(this._handlers[e]){var t=arguments,s=t.length;s>3&&(t=Array.prototype.slice.call(t,1));for(var r=this._handlers[e],i=r.length,a=0;a<i;){switch(s){case 1:r[a].h.call(r[a].ctx);break;case 2:r[a].h.call(r[a].ctx,t[1]);break;case 3:r[a].h.call(r[a].ctx,t[1],t[2]);break;default:r[a].h.apply(r[a].ctx,t)}r[a].one?(r.splice(a,1),i--):a++}}return this}dispatchWithContext(e){if(this._handlers[e]){var t=arguments,s=t.length;s>4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var r=t[t.length-1],i=this._handlers[e],a=i.length,n=0;n<a;){switch(s){case 1:i[n].h.call(r);break;case 2:i[n].h.call(r,t[1]);break;case 3:i[n].h.call(r,t[1],t[2]);break;default:i[n].h.apply(r,t)}i[n].one?(i.splice(n,1),a--):n++}}return this}}
  1281. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1282. * This program are made available under the terms of the Apache License, Version 2.0
  1283. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class un{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Vector"}create(e,t){var s=new(0,this.ArrayCtor)(2);return s[0]=e||0,s[1]=t||0,s}copy(e,t){return e[0]=t[0],e[1]=t[1],e}set(e,t,s){return e[0]=t,e[1]=s,e}add(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e}scaleAndAdd(e,t,s,r){return e[0]=t[0]+s[0]*r,e[1]=t[1]+s[1]*r,e}sub(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e}len(e){return Math.sqrt(this.lenSquare(e))}lenSquare(e){return e[0]*e[0]+e[1]*e[1]}mul(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e}div(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e}dot(e,t){return e[0]*t[0]+e[1]*t[1]}scale(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e}normalize(e,t){var s=this.len(t);return 0===s?(e[0]=0,e[1]=0):(e[0]=t[0]/s,e[1]=t[1]/s),e}distance(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}distanceSquare(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}negate(e,t){return e[0]=-t[0],e[1]=-t[1],e}lerp(e,t,s,r){return e[0]=t[0]+r*(s[0]-t[0]),e[1]=t[1]+r*(s[1]-t[1]),e}applyTransform(e,t,s){var r=t[0],i=t[1];return e[0]=s[0]*r+s[2]*i+s[4],e[1]=s[1]*r+s[3]*i+s[5],e}min(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e}max(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e}length(e){return this.len(e)}lengthSquare(e){return this.lenSquare(e)}dist(e,t){return this.distance(e,t)}distSquare(e,t){return this.distanceSquare(e,t)}}
  1284. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1285. * This program are made available under the terms of the Apache License, Version 2.0
  1286. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class cn{constructor(){this.vector=new un,this.EPSILON=1e-4,this.THREE_SQRT=Math.sqrt(3),this.ONE_THIRD=1/3,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Curve"}isAroundZero(e){return e>-this.EPSILON&&e<this.EPSILON}isNotAroundZero(e){return e>this.EPSILON||e<-this.EPSILON}cubicAt(e,t,s,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*s)}cubicDerivativeAt(e,t,s,r,i){var a=1-i;return 3*(((t-e)*a+2*(s-t)*i)*a+(r-s)*i*i)}cubicRootAt(e,t,s,r,i,a){var n=r+3*(t-s)-e,o=3*(s-2*t+e),l=3*(t-e),h=e-i,u=o*o-3*n*l,c=o*l-9*n*h,d=l*l-3*o*h,p=0;if(this.isAroundZero(u)&&this.isAroundZero(c))if(this.isAroundZero(o))a[0]=0;else{let e=-l/o;e>=0&&e<=1&&(a[p++]=e)}else{var m=c*c-4*u*d;if(this.isAroundZero(m)){var f=c/u;let e=-o/n+f,t=-f/2;e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t)}else if(m>0){let e=Math.sqrt(m),t=u*o+1.5*n*(-c+e),s=u*o+1.5*n*(-c-e),r=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(s=s<0?-Math.pow(-s,this.ONE_THIRD):Math.pow(s,this.ONE_THIRD))))/(3*n);r>=0&&r<=1&&(a[p++]=r)}else{var y=(2*u*o-3*n*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(y)/3,v=Math.sqrt(u),S=Math.cos(g);let e=(-o-2*v*S)/(3*n),t=(-o+v*(S+this.THREE_SQRT*Math.sin(g)))/(3*n),s=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*n);e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t),s>=0&&s<=1&&(a[p++]=s)}}return p}cubicExtrema(e,t,s,r,i){var a=6*s-12*t+6*e,n=9*t+3*r-3*e-9*s,o=3*t-3*e,l=0;if(this.isAroundZero(n)){if(this.isNotAroundZero(a)){let e=-o/a;e>=0&&e<=1&&(i[l++]=e)}}else{var h=a*a-4*n*o;if(this.isAroundZero(h))i[0]=-a/(2*n);else if(h>0){let e=Math.sqrt(h),t=(-a+e)/(2*n),s=(-a-e)/(2*n);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}cubicSubdivide(e,t,s,r,i,a){var n=(t-e)*i+e,o=(s-t)*i+t,l=(r-s)*i+s,h=(o-n)*i+n,u=(l-o)*i+o,c=(u-h)*i+h;a[0]=e,a[1]=n,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=r}cubicProjectPoint(e,t,s,r,i,a,n,o,l,h,u){var c,d=this.vector.create(),p=this.vector.create(),m=this.vector.create(),f=.005,y=1/0;d[0]=l,d[1]=h;for(let l=0;l<1;l+=.05){p[0]=this.cubicAt(e,s,i,n,l),p[1]=this.cubicAt(t,r,a,o,l);let h=this.vector.distSquare(d,p);h<y&&(c=l,y=h)}y=1/0;for(let l=0;l<32&&!(f<this.EPSILON);l++){let l=c-f,h=c+f;p[0]=this.cubicAt(e,s,i,n,l),p[1]=this.cubicAt(t,r,a,o,l);let u=this.vector.distSquare(p,d);if(l>=0&&u<y)c=l,y=u;else{m[0]=this.cubicAt(e,s,i,n,h),m[1]=this.cubicAt(t,r,a,o,h);let l=this.vector.distSquare(m,d);h<=1&&l<y?(c=h,y=l):f*=.5}}return u&&(u[0]=this.cubicAt(e,s,i,n,c),u[1]=this.cubicAt(t,r,a,o,c)),Math.sqrt(y)}quadraticAt(e,t,s,r){var i=1-r;return i*(i*e+2*r*t)+r*r*s}quadraticDerivativeAt(e,t,s,r){return 2*((1-r)*(t-e)+r*(s-t))}quadraticRootAt(e,t,s,r,i){var a=e-2*t+s,n=2*(t-e),o=e-r,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(n)){var h=-o/n;h>=0&&h<=1&&(i[l++]=h)}}else{var u=n*n-4*a*o;if(this.isAroundZero(u)){let e=-n/(2*a);e>=0&&e<=1&&(i[l++]=e)}else if(u>0){let e=Math.sqrt(u),t=(-n+e)/(2*a),s=(-n-e)/(2*a);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}quadraticExtremum(e,t,s){var r=e+s-2*t;return 0===r?.5:(e-t)/r}quadraticProjectPoint(e,t,s,r,i,a,n,o,l){var h,u=this.vector.create(),c=this.vector.create(),d=this.vector.create(),p=.005,m=1/0;u[0]=n,u[1]=o;for(let n=0;n<1;n+=.05){c[0]=this.quadraticAt(e,s,i,n),c[1]=this.quadraticAt(t,r,a,n);let o=this.vector.distSquare(u,c);o<m&&(h=n,m=o)}m=1/0;for(let n=0;n<32&&!(p<this.EPSILON);n++){let n=h-p,o=h+p;c[0]=this.quadraticAt(e,s,i,n),c[1]=this.quadraticAt(t,r,a,n);let l=this.vector.distSquare(c,u);if(n>=0&&l<m)h=n,m=l;else{d[0]=this.quadraticAt(e,s,i,o),d[1]=this.quadraticAt(t,r,a,o);let n=this.vector.distSquare(d,u);o<=1&&n<m?(h=o,m=n):p*=.5}}return l&&(l[0]=this.quadraticAt(e,s,i,h),l[1]=this.quadraticAt(t,r,a,h)),Math.sqrt(m)}}
  1287. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1288. * This program are made available under the terms of the Apache License, Version 2.0
  1289. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1290. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1291. * This program are made available under the terms of the Apache License, Version 2.0
  1292. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1293. class dn{}dn.EVENT={RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},dn.catchBrushException=!1,dn.debugMode=0;
  1294. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1295. * This program are made available under the terms of the Apache License, Version 2.0
  1296. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1297. class pn{static SUtil_smoothBezier(e,t,s,r,i){i&&2===i||(i=[0,0]);var a,n,o=i,l=[],h=[],u=[],c=[],d=!!r;if(d){a=[1/0,1/0],n=[-1/0,-1/0];let t=e.length;for(let s=0;s<t;s++)pn.Util_vector.min(a,a,[e[s][0]+o[0],e[s][1]+o[1]]),pn.Util_vector.max(n,n,[e[s][0]+o[0],e[s][1]+o[1]]);pn.Util_vector.min(a,a,r[0]),pn.Util_vector.max(n,n,r[1])}let p=e.length;for(let r=0;r<p;r++){let i,m,f=[e[r][0]+o[0],e[r][1]+o[1]];if(s)i=[e[r?r-1:p-1][0]+o[0],e[r?r-1:p-1][1]+o[1]],m=[e[(r+1)%p][0]+o[0],e[(r+1)%p][1]+o[1]];else{if(0===r||r===p-1){l.push([e[r][0]+o[0],e[r][1]+o[1]]);continue}i=[e[r-1][0]+o[0],e[r-1][1]+o[1]],m=[e[r+1][0]+o[0],e[r+1][1]+o[1]]}pn.Util_vector.sub(h,m,i),pn.Util_vector.scale(h,h,t);let y=pn.Util_vector.distance(f,i),g=pn.Util_vector.distance(f,m),v=y+g;0!==v&&(y/=v,g/=v),pn.Util_vector.scale(u,h,-y),pn.Util_vector.scale(c,h,g);let S=pn.Util_vector.add([],f,u),b=pn.Util_vector.add([],f,c);d&&(pn.Util_vector.max(S,S,a),pn.Util_vector.min(S,S,n),pn.Util_vector.max(b,b,a),pn.Util_vector.min(b,b,n)),l.push(S),l.push(b)}return s&&l.push(l.shift()),l}static SUtil_smoothSpline(e,t,s,r){r&&2===r||(r=[0,0]);var i=r,a=e.length,n=[],o=0;for(let t=1;t<a;t++)o+=pn.Util_vector.distance([e[t-1][0]+i[0],e[t-1][1]+i[1]],[e[t][0]+i[0],e[t][1]+i[1]]);var l=o/5;l=l<a?a:l;for(let s=0;s<l;s++){let r,o,u,c=s/(l-1)*(t?a:a-1),d=Math.floor(c),p=c-d,m=[e[d%a][0]+i[0],e[d%a][1]+i[1]];t?(r=[e[(d-1+a)%a][0]+i[0],e[(d-1+a)%a][1]+i[1]],o=[e[(d+1)%a][0]+i[0],e[(d+1)%a][1]+i[1]],u=[e[(d+2)%a][0]+i[0],e[(d+2)%a][1]+i[1]]):(r=[e[0===d?d:d-1][0]+i[0],e[0===d?d:d-1][1]+i[1]],o=[e[d>a-2?a-1:d+1][0]+i[0],e[d>a-2?a-1:d+1][1]+i[1]],u=[e[d>a-3?a-1:d+2][0]+i[0],e[d>a-3?a-1:d+2][1]+i[1]]);let f=p*p,y=p*f;n.push([h(r[0],m[0],o[0],u[0],p,f,y),h(r[1],m[1],o[1],u[1],p,f,y)])}return n;function h(e,t,s,r,i,a,n){var o=.5*(s-e),l=.5*(r-t);return(2*(t-s)+o+l)*n+(-3*(t-s)-2*o-l)*a+o*i+t}}static SUtil_dashedLineTo(e,t,s,r,i,a,n){var o=[5,5];if(a="number"!=typeof a?5:a,e.setLineDash)return o[0]=a,o[1]=a,n&&n instanceof Array?e.setLineDash(n):e.setLineDash(o),e.moveTo(t,s),void e.lineTo(r,i);var l=r-t,h=i-s,u=Math.floor(Math.sqrt(l*l+h*h)/a);l/=u,h/=u;for(var c=!0,d=0;d<u;++d)c?e.moveTo(t,s):e.lineTo(t,s),c=!c,t+=l,s+=h;e.lineTo(r,i)}}pn.Util_area=new class{constructor(){this.util=new Va,this.curve=new cn,this._ctx=null,this._textWidthCache={},this._textHeightCache={},this._textWidthCacheCounter=0,this._textHeightCacheCounter=0,this.TEXT_CACHE_MAX=5e3,this.PI2=2*Math.PI,this.roots=[-1,-1,-1],this.extrema=[-1,-1],this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Area"}normalizeRadian(e){return(e%=this.PI2)<0&&(e+=this.PI2),e}isInside(e,t,s,r){if(!t||!e)return!1;var i=e.type;this._ctx=this._ctx||this.util.getContext();var a=this._mathMethod(e,t,s,r);if(void 0!==a)return a;if(e.buildPath&&this._ctx.isPointInPath)return this._buildPathMethod(e,this._ctx,t,s,r);switch(i){case"ellipse":case"smicellipse":return!0;case"trochoid":var n="out"==t.location?t.r1+t.r2+t.d:t.r1-t.r2+t.d;return this.isInsideCircle(t,s,r,n);case"rose":return this.isInsideCircle(t,s,r,t.maxr);default:return!1}}_mathMethod(e,t,s,r){switch(e.type){case"bezier-curve":return void 0===t.cpX2?this.isInsideQuadraticStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.xEnd,t.yEnd,t.lineWidth,s,r):this.isInsideCubicStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd,t.lineWidth,s,r);case"line":return this.isInsideLine(t.xStart,t.yStart,t.xEnd,t.yEnd,t.lineWidth,s,r);case"broken-line":return this.isInsideBrokenLine(t.pointList,t.lineWidth,s,r);case"smicbroken-line":{let i=s,a=r;return e.refOriginalPosition&&(i=s-e.refOriginalPosition[0],a=r-e.refOriginalPosition[1]),this.isInsideBrokenLine(t.pointList,t.lineWidth,i,a)}case"ring":return this.isInsideRing(t.x,t.y,t.r0,t.r,s,r);case"smicring":{let i=t.x,a=t.y;return e.refOriginalPosition&&(i=t.x+e.refOriginalPosition[0],a=t.y+e.refOriginalPosition[1]),this.isInsideRing(i,a,t.r0,t.r,s,r)}case"circle":return this.isInsideCircle(t.x,t.y,t.r,s,r);case"smicpoint":{let i=s,a=r;return e.refOriginalPosition&&(i=s-e.refOriginalPosition[0],a=r-e.refOriginalPosition[1]),this.isInsideCircle(t.x,t.y,t.r,i,a)}case"sector":{let e=t.startAngle*Math.PI/180,i=t.endAngle*Math.PI/180;return t.clockWise||(e=-e,i=-i),this.isInsideSector(t.x,t.y,t.r0,t.r,e,i,!t.clockWise,s,r)}case"smicsector":{let i=t.startAngle*Math.PI/180,a=t.endAngle*Math.PI/180;t.clockWise||(i=-i,a=-a);let n=t.x,o=t.y;return e.refOriginalPosition&&(n=t.x+e.refOriginalPosition[0],o=t.y+e.refOriginalPosition[1]),this.isInsideSector(n,o,t.r0,t.r,i,a,!t.clockWise,s,r)}case"path":return this.isInsidePath(t.pathArray,Math.max(t.lineWidth,5),t.brushType,s,r);case"polygon":case"star":case"smicstar":case"isogon":case"smicisogon":return this.isInsidePolygon(t.pointList,s,r);case"smicpolygon":{let u=s,c=r;if(e.refOriginalPosition&&(u=s-e.refOriginalPosition[0],c=r-e.refOriginalPosition[1]),e.holePolygonPointLists&&e.holePolygonPointLists.length>0){for(var i=this.isInsidePolygon(t.pointList,u,c),a=e.holePolygonPointLists,n=!1,o=0,l=a.length;o<l;o++){var h=a[o];!0===this.isInsidePolygon(h,u,c)&&(n=!0)}return!0===i&&!1===n}return this.isInsidePolygon(t.pointList,u,c)}case"text":var u=t.__rect||e.getRect(t);return this.isInsideRect(u.x,u.y,u.width,u.height,s,r);case"smictext":var c=e.getTextBackground(t);return this.isInsidePolygon(c,s,r);case"rectangle":case"image":return this.isInsideRect(t.x,t.y,t.width,t.height,s,r);case"smicimage":{let i=t.x,a=t.y;return e.refOriginalPosition&&(i=t.x+e.refOriginalPosition[0],a=t.y+e.refOriginalPosition[1]),this.isInsideRect(i,a,t.width,t.height,s,r)}}}_buildPathMethod(e,t,s,r,i){return t.beginPath(),e.buildPath(t,s),t.closePath(),t.isPointInPath(r,i)}isOutside(e,t,s,r){return!this.isInside(e,t,s,r)}isInsideLine(e,t,s,r,i,a,n){if(0===i)return!1;var o=Math.max(i,5),l=0;if(n>t+o&&n>r+o||n<t-o&&n<r-o||a>e+o&&a>s+o||a<e-o&&a<s-o)return!1;if(e===s)return Math.abs(a-e)<=o/2;var h=(l=(t-r)/(e-s))*a-n+(e*r-s*t)/(e-s);return h*h/(l*l+1)<=o/2*o/2}isInsideCubicStroke(e,t,s,r,i,a,n,o,l,h,u){if(0===l)return!1;var c=Math.max(l,5);return!(u>t+c&&u>r+c&&u>a+c&&u>o+c||u<t-c&&u<r-c&&u<a-c&&u<o-c||h>e+c&&h>s+c&&h>i+c&&h>n+c||h<e-c&&h<s-c&&h<i-c&&h<n-c)&&this.curve.cubicProjectPoint(e,t,s,r,i,a,n,o,h,u,null)<=c/2}isInsideQuadraticStroke(e,t,s,r,i,a,n,o,l){if(0===n)return!1;var h=Math.max(n,5);return!(l>t+h&&l>r+h&&l>a+h||l<t-h&&l<r-h&&l<a-h||o>e+h&&o>s+h&&o>i+h||o<e-h&&o<s-h&&o<i-h)&&this.curve.quadraticProjectPoint(e,t,s,r,i,a,o,l,null)<=h/2}isInsideArcStroke(e,t,s,r,i,a,n,o,l){var h=this.PI2;if(0===n)return!1;var u=Math.max(n,5);o-=e,l-=t;var c=Math.sqrt(o*o+l*l);if(c-u>s||c+u<s)return!1;if(Math.abs(r-i)>=h)return!0;if(a){var d=r;r=this.normalizeRadian(i),i=this.normalizeRadian(d)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var p=Math.atan2(l,o);return p<0&&(p+=h),p>=r&&p<=i||p+h>=r&&p+h<=i}isInsideBrokenLine(e,t,s,r){for(var i=Math.max(t,10),a=0,n=e.length-1;a<n;a++){var o=e[a][0],l=e[a][1],h=e[a+1][0],u=e[a+1][1];if(this.isInsideLine(o,l,h,u,i,s,r))return!0}return!1}isInsideRing(e,t,s,r,i,a){var n=(i-e)*(i-e)+(a-t)*(a-t);return n<r*r&&n>s*s}isInsideRect(e,t,s,r,i,a){return i>=e&&i<=e+s&&a>=t&&a<=t+r}isInsideCircle(e,t,s,r,i){return(r-e)*(r-e)+(i-t)*(i-t)<s*s}isInsideSector(e,t,s,r,i,a,n,o,l){return this.isInsideArcStroke(e,t,(s+r)/2,i,a,n,r-s,o,l)}isInsidePolygon(e,t,s){for(var r=e.length,i=0,a=0,n=r-1;a<r;a++){var o=e[n][0],l=e[n][1],h=e[a][0],u=e[a][1];i+=this.windingLine(o,l,h,u,t,s),n=a}return 0!==i}windingLine(e,t,s,r,i,a){return a>t&&a>r||a<t&&a<r?0:r==t?0:(a-t)/(r-t)*(s-e)+e>i?r<t?1:-1:0}swapExtrema(){var e=this.extrema[0];this.extrema[0]=this.extrema[1],this.extrema[1]=e}windingCubic(e,t,s,r,i,a,n,o,l,h){var u=this.curve,c=this.roots,d=this.extrema;if(h>t&&h>r&&h>a&&h>o||h<t&&h<r&&h<a&&h<o)return 0;var p=u.cubicRootAt(t,r,a,o,h,c);if(0===p)return 0;for(var m,f,y=0,g=-1,v=0;v<p;v++){var S=c[v];u.cubicAt(e,s,i,n,S)<l||(g<0&&(g=u.cubicExtrema(t,r,a,o,d),d[1]<d[0]&&g>1&&this.swapExtrema(),m=u.cubicAt(t,r,a,o,d[0]),g>1&&(f=u.cubicAt(t,r,a,o,d[1]))),2==g?S<d[0]?y+=m<t?1:-1:S<d[1]?y+=f<m?1:-1:y+=o<f?1:-1:S<d[0]?y+=m<t?1:-1:y+=o<m?1:-1)}return y}windingQuadratic(e,t,s,r,i,a,n,o){var l=this.curve,h=this.roots;if(o>t&&o>r&&o>a||o<t&&o<r&&o<a)return 0;var u=l.quadraticRootAt(t,r,a,o,h);if(0===u)return 0;var c=l.quadraticExtremum(t,r,a);if(c>=0&&c<=1){var d=0,p=l.quadraticAt(t,r,a,c);for(let r=0;r<u;r++)l.quadraticAt(e,s,i,h[r])>n||(h[r]<c?d+=p<t?1:-1:d+=a<p?1:-1);return d}return l.quadraticAt(e,s,i,h[0])>n?0:a<t?1:-1}windingArc(e,t,s,r,i,a,n,o){var l=this.roots,h=this.PI2;if((o-=t)>s||o<-s)return 0;let u=Math.sqrt(s*s-o*o);if(l[0]=-u,l[1]=u,Math.abs(r-i)>=h){r=0,i=h;var c=a?1:-1;return n>=l[0]+e&&n<=l[1]+e?c:0}if(a){let e=r;r=this.normalizeRadian(i),i=this.normalizeRadian(e)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var d=0;for(let t=0;t<2;t++){var p=l[t];if(p+e>n){let e=Math.atan2(o,p),t=a?1:-1;e<0&&(e=h+e),(e>=r&&e<=i||e+h>=r&&e+h<=i)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),d+=t)}}return d}isInsidePath(e,t,s,r,i){for(var a=0,n=0,o=0,l=0,h=0,u=!0,c=!0,d="stroke"===(s=s||"fill")||"both"===s,p="fill"===s||"both"===s,m=0;m<e.length;m++){var f=e[m],y=f.points;if(u||"M"===f.command){if(m>0&&(p&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a))return!0;l=y[y.length-2],h=y[y.length-1],u=!1,c&&"A"!==f.command&&(c=!1,n=l,o=h)}switch(f.command){case"M":n=y[0],o=y[1];break;case"L":if(d&&this.isInsideLine(n,o,y[0],y[1],t,r,i))return!0;p&&(a+=this.windingLine(n,o,y[0],y[1],r,i)),n=y[0],o=y[1];break;case"C":if(d&&this.isInsideCubicStroke(n,o,y[0],y[1],y[2],y[3],y[4],y[5],t,r,i))return!0;p&&(a+=this.windingCubic(n,o,y[0],y[1],y[2],y[3],y[4],y[5],r,i)),n=y[4],o=y[5];break;case"Q":if(d&&this.isInsideQuadraticStroke(n,o,y[0],y[1],y[2],y[3],t,r,i))return!0;p&&(a+=this.windingQuadratic(n,o,y[0],y[1],y[2],y[3],r,i)),n=y[2],o=y[3];break;case"A":var g=y[0],v=y[1],S=y[2],b=y[3],x=y[4],C=y[5],T=Math.cos(x)*S+g,_=Math.sin(x)*b+v;c?(c=!1,l=T,h=_):a+=this.windingLine(n,o,T,_);var E=(r-g)*b/S+g;if(d&&this.isInsideArcStroke(g,v,b,x,x+C,1-y[7],t,E,i))return!0;p&&(a+=this.windingArc(g,v,b,x,x+C,1-y[7],E,i)),n=Math.cos(x+C)*S+g,o=Math.sin(x+C)*b+v;break;case"z":if(d&&this.isInsideLine(n,o,l,h,t,r,i))return!0;u=!0}}return p&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a}getTextWidth(e,t){var s=e+":"+t;if(this._textWidthCache[s])return this._textWidthCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var r=0,i=0,a=(e=(e+"").split("\n")).length;i<a;i++)r=Math.max(this._ctx.measureText(e[i]).width,r);return this._ctx.restore(),this._textWidthCache[s]=r,++this._textWidthCacheCounter>this.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),r}getTextHeight(e,t){var s=e+":"+t;if(this._textHeightCache[s])return this._textHeightCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var r=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[s]=r,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),r}}
  1298. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1299. * This program are made available under the terms of the Apache License, Version 2.0
  1300. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,pn.Util_color=new Wa,pn.Util_computeBoundingBox=new class{constructor(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,s){if(0!==e.length){for(var r=e[0][0],i=e[0][0],a=e[0][1],n=e[0][1],o=1;o<e.length;o++){var l=e[o];l[0]<r&&(r=l[0]),l[0]>i&&(i=l[0]),l[1]<a&&(a=l[1]),l[1]>n&&(n=l[1])}t[0]=r,t[1]=a,s[0]=i,s[1]=n}}cubeBezier(e,t,s,r,i,a){var n=new cn,o=[];n.cubicExtrema(e[0],t[0],s[0],r[0],o);for(let i=0;i<o.length;i++)o[i]=n.cubicAt(e[0],t[0],s[0],r[0],o[i]);var l=[];n.cubicExtrema(e[1],t[1],s[1],r[1],l);for(let i=0;i<l.length;i++)l[i]=n.cubicAt(e[1],t[1],s[1],r[1],l[i]);o.push(e[0],r[0]),l.push(e[1],r[1]);var h=Math.min.apply(null,o),u=Math.max.apply(null,o),c=Math.min.apply(null,l),d=Math.max.apply(null,l);i[0]=h,i[1]=c,a[0]=u,a[1]=d}quadraticBezier(e,t,s,r,i){var a=new cn,n=a.quadraticExtremum(e[0],t[0],s[0]),o=a.quadraticExtremum(e[1],t[1],s[1]),l=1-(n=Math.max(Math.min(n,1),0)),h=1-(o=Math.max(Math.min(o,1),0)),u=l*l*e[0]+2*l*n*t[0]+n*n*s[0],c=l*l*e[1]+2*l*n*t[1]+n*n*s[1],d=h*h*e[0]+2*h*o*t[0]+o*o*s[0],p=h*h*e[1]+2*h*o*t[1]+o*o*s[1];r[0]=Math.min(e[0],s[0],u,d),r[1]=Math.min(e[1],s[1],c,p),i[0]=Math.max(e[0],s[0],u,d),i[1]=Math.max(e[1],s[1],c,p)}arc(e,t,s,r,i,a,n,o){var l=new un,h=l.create(),u=l.create(),c=l.create();if(h[0]=Math.cos(r)*s+e,h[1]=Math.sin(r)*s+t,u[0]=Math.cos(i)*s+e,u[1]=Math.sin(i)*s+t,l.min(n,h,u),l.max(o,h,u),(r%=2*Math.PI)<0&&(r+=2*Math.PI),(i%=2*Math.PI)<0&&(i+=2*Math.PI),r>i&&!a?i+=2*Math.PI:r<i&&a&&(r+=2*Math.PI),a){var d=i;i=r,r=d}for(var p=0;p<i;p+=Math.PI/2)p>r&&(c[0]=Math.cos(p)*s+e,c[1]=Math.sin(p)*s+t,l.min(n,c,n),l.max(o,c,o))}}
  1301. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1302. * This program are made available under the terms of the Apache License, Version 2.0
  1303. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,pn.Util_curve=new cn,pn.Util_env=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,s,r,i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S,b,x=this;return e=navigator.userAgent,t=x.os={},s=x.browser={},r=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),o=!a&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),u=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),d=e.match(/(BlackBerry).*Version\/([\d.]+)/),p=e.match(/(BB10).*Version\/([\d.]+)/),m=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),f=e.match(/PlayBook/),y=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=r&&e.match(/Mobile\//)&&!y,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!y,(s.webkit=!!r)&&(s.version=r[1]),i&&(t.android=!0,t.version=i[2]),o&&!n&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),a&&(t.ios=t.ipad=!0,t.version=a[2].replace(/_/g,".")),n&&(t.ios=t.ipod=!0,t.version=n[3]?n[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),d&&(t.blackberry=!0,t.version=d[2]),p&&(t.bb10=!0,t.version=p[2]),m&&(t.rimtabletos=!0,t.version=m[2]),f&&(s.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(s.silk=!0,s.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(s.silk=!0),y&&(s.chrome=!0,s.version=y[1]),g&&(s.firefox=!0,s.version=g[1]),v&&(s.ie=!0,s.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(s.safari=!0),b&&(s.webview=!0),v&&(s.ie=!0,s.version=v[1]),t.tablet=!!(a||f||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(i||o||l||d||p||y&&e.match(/Android/)||y&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:s,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}}
  1304. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1305. * This program are made available under the terms of the Apache License, Version 2.0
  1306. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,pn.Util_event=new class{constructor(){this.stop="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Event"}getX(e){return void 0!==e.zrenderX&&e.zrenderX||void 0!==e.offsetX&&e.offsetX||void 0!==e.layerX&&e.layerX||void 0!==e.clientX&&e.clientX}getY(e){return void 0!==e.zrenderY&&e.zrenderY||void 0!==e.offsetY&&e.offsetY||void 0!==e.layerY&&e.layerY||void 0!==e.clientY&&e.clientY}getDelta(e){return void 0!==e.zrenderDelta&&e.zrenderDelta||void 0!==e.wheelDelta&&e.wheelDelta||void 0!==e.detail&&-e.detail}}
  1307. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1308. * This program are made available under the terms of the Apache License, Version 2.0
  1309. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,pn.Util_http=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,s){if("object"==typeof e){var r=e;e=r.url,t=r.onsuccess,s=r.onerror}var i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");i.open("GET",e,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status>=200&&i.status<300||304===i.status?t&&t(i.responseText):s&&s(),i.onreadystatechange=new Function,i=null)},i.send(null)}},pn.Util_log=new
  1310. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1311. * This program are made available under the terms of the Apache License, Version 2.0
  1312. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1313. class{constructor(){return this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Log",function(){if(0!==dn.debugMode)if(1==dn.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(dn.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}}
  1314. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1315. * This program are made available under the terms of the Apache License, Version 2.0
  1316. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,pn.Util_math=new class{constructor(){this._radians=window.Math.PI/180,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Math"}sin(e,t){return window.Math.sin(t?e*this._radians:e)}cos(e,t){return window.Math.cos(t?e*this._radians:e)}degreeToRadian(e){return e*this._radians}radianToDegree(e){return e/this._radians}}
  1317. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1318. * This program are made available under the terms of the Apache License, Version 2.0
  1319. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,pn.Util_matrix=new class{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Matrix"}create(){var e=new(0,this.ArrayCtor)(6);return this.identity(e),e}identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}mul(e,t,s){return e[0]=t[0]*s[0]+t[2]*s[1],e[1]=t[1]*s[0]+t[3]*s[1],e[2]=t[0]*s[2]+t[2]*s[3],e[3]=t[1]*s[2]+t[3]*s[3],e[4]=t[0]*s[4]+t[2]*s[5]+t[4],e[5]=t[1]*s[4]+t[3]*s[5]+t[5],e}translate(e,t,s){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+s[0],e[5]=t[5]+s[1],e}rotate(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5],h=Math.sin(s),u=Math.cos(s);return e[0]=r*u+n*h,e[1]=-r*h+n*u,e[2]=i*u+o*h,e[3]=-i*h+u*o,e[4]=u*a+h*l,e[5]=u*l-h*a,e}scale(e,t,s){var r=s[0],i=s[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}invert(e,t){var s=t[0],r=t[2],i=t[4],a=t[1],n=t[3],o=t[5],l=s*n-a*r;return l?(l=1/l,e[0]=n*l,e[1]=-a*l,e[2]=-r*l,e[3]=s*l,e[4]=(r*o-n*i)*l,e[5]=(a*i-s*o)*l,e):null}mulVector(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5];return e[0]=s[0]*r+s[1]*i+a,e[1]=s[0]*n+s[1]*o+l,e}},pn.Util=new Va,pn.Util_vector=new un;
  1320. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1321. * This program are made available under the terms of the Apache License, Version 2.0
  1322. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1323. class mn{constructor(){var e;this.position=[0,0],this.rotation=[0,0,0],this.scale=[1,1,0,0],this.needLocalTransform=!1,this.needTransform=!1,this.CLASS_NAME="SuperMap.LevelRenderer.Transformable",this.lookAt=(e=pn.Util_vector.create(),function(t){this.transform||(this.transform=pn.Util_matrix.create());var s=this.transform;function r(e){return e>-5e-5&&e<5e-5}pn.Util_vector.sub(e,t,this.position),r(e[0])&&r(e[1])||(pn.Util_vector.normalize(e,e),s[2]=e[0]*this.scale[1],s[3]=e[1]*this.scale[1],s[0]=e[1]*this.scale[0],s[1]=-e[0]*this.scale[0],s[4]=this.position[0],s[5]=this.position[1],this.decomposeTransform())})}destroy(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}updateNeedTransform(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}updateTransform(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||pn.Util_matrix.create();if(pn.Util_matrix.identity(t),this.needLocalTransform){if(s(this.scale[0])||s(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let r=s(e[0])||s(e[1]);r&&pn.Util_matrix.translate(t,t,e),pn.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],pn.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;let r=s(e[0])||s(e[1]);r&&pn.Util_matrix.translate(t,t,e),pn.Util_matrix.rotate(t,t,this.rotation[0]),r&&(e[0]=-e[0],e[1]=-e[1],pn.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&pn.Util_matrix.rotate(t,t,this.rotation);(s(this.position[0])||s(this.position[1]))&&pn.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?pn.Util_matrix.mul(this.transform,this.parent.transform,this.transform):pn.Util_matrix.copy(this.transform,this.parent.transform))}function s(e){return e>5e-5||e<-5e-5}}setTransform(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}decomposeTransform(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],s=this.position,r=this.scale,i=this.rotation;n(t-1)&&(t=Math.sqrt(t));var a=e[2]*e[2]+e[3]*e[3];n(a-1)&&(a=Math.sqrt(a)),s[0]=e[4],s[1]=e[5],r[0]=t,r[1]=a,r[2]=r[3]=0,i[0]=Math.atan2(-e[1]/a,e[0]/t),i[1]=i[2]=0}function n(e){return e>5e-5||e<-5e-5}}}
  1324. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1325. * This program are made available under the terms of the Apache License, Version 2.0
  1326. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class fn extends(r.mixin(hn,mn)){constructor(e){var t;super(e),e=e||{},this.id=null,this.style={},this.highlightStyle=null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],this.invisible=!1,this.ignore=!1,this.zlevel=0,this.draggable=!1,this.clickable=!1,this.hoverable=!0,this.z=0,this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,ye.extend(this,e),this.id=this.id||ye.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,s){var r=[e,s];return this.needTransform&&this.transform&&(pn.Util_matrix.invert(t,this.transform),pn.Util_matrix.mulVector(r,t,[e,s,1]),e==r[0]&&s==r[1]&&this.updateNeedTransform()),r})}destroy(){this.id=null,this.style=null,this.highlightStyle=null,this.parent=null,this.__dirty=null,this.__clipShapes=null,this.invisible=null,this.ignore=null,this.zlevel=null,this.draggable=null,this.clickable=null,this.hoverable=null,this.z=null,this.refOriginalPosition=null,this.refDataID=null,this.refDataHoverGroup=null,this.isHoverByRefDataID=null,this.dataInfo=null,super.destroy()}brush(e,t){var s=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,s),s.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",s),e.fill(),s.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",s),e.stroke()),this.setCtxGlobalAlpha(e,"reset",s);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",s),s.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",s);break;default:this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)}this.drawText(e,s,this.style),this.afterBrush(e)}beforeBrush(e,t){var s=this.style;return this.brushTypeOnly&&(s.brushType=this.brushTypeOnly),t&&(s=this.getHighlightStyle(s,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(s.strokeColor=s.strokeColor||s.color),e.save(),this.doClip(e),this.setContext(e,s),this.setTransform(e),s}afterBrush(e){e.restore()}setContext(e,t){for(var s=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],r=0,i=s.length;r<i;r++){var a=t[s[r][0]],n=s[r][1];void 0!==a&&(e[n]=a)}}doClip(e){var t=pn.Util_matrix.create();if(this.__clipShapes)for(var s=0;s<this.__clipShapes.length;s++){var r=this.__clipShapes[s];if(r.needTransform){let s=r.transform;pn.Util_matrix.invert(t,s),e.transform(s[0],s[1],s[2],s[3],s[4],s[5])}if(e.beginPath(),r.buildPath(e,r.style),e.clip(),r.needTransform){let s=t;e.transform(s[0],s[1],s[2],s[3],s[4],s[5])}}}getHighlightStyle(e,t,s){var r={};for(let t in e)r[t]=e[t];var i=pn.Util_color.getHighlightColor();"stroke"!=e.brushType?(r.strokeColor=i,r.lineWidth=e.lineWidth||1,r.brushType="both"):"stroke"!=s?(r.strokeColor=i,r.lineWidth=e.lineWidth||1):r.strokeColor=t.strokeColor||pn.Util_color.mix(e.strokeColor,pn.Util_color.toRGB(i));for(let e in t)void 0!==t[e]&&(r[e]=t[e]);return r}getHighlightZoom(){return"text"!=this.type?6:2}drift(e,t){this.position[0]+=e,this.position[1]+=t}buildPath(e,t){pn.Util_log("buildPath not implemented in "+this.type)}getRect(e){pn.Util_log("getRect not implemented in "+this.type)}isCover(e,t){var s=this.getTansform(e,t);e=s[0],t=s[1];var r=this.style.__rect;return r||(r=this.style.__rect=this.getRect(this.style)),e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height&&pn.Util_area.isInside(this,this.style,e,t)}drawText(e,t,s){if(void 0!==t.text&&!1!==t.text){var r=t.textColor||t.color||t.strokeColor;e.fillStyle=r;var i,a,n,o,l=10,h=t.textPosition||this.textPosition||"top",u=[];switch(u=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],h){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var c=(s||t).__rect||this.getRect(s||t);switch(h){case"inside":n=c.x+c.width/2,o=c.y+c.height/2,i="center",a="middle","stroke"!=t.brushType&&r==t.color&&(e.fillStyle="#fff");break;case"left":n=c.x-l,o=c.y+c.height/2,i="end",a="middle";break;case"right":n=c.x+c.width+l,o=c.y+c.height/2,i="start",a="middle";break;case"top":n=c.x+c.width/2,o=c.y-l,i="center",a="bottom";break;case"bottom":n=c.x+c.width/2,o=c.y+c.height+l,i="center",a="top"}}break;case"start":case"end":var d=0,p=0,m=0,f=0;if(void 0!==t.pointList){var y=t.pointList;if(y.length<2)return;var g=y.length;switch(h){case"start":d=y[0][0]+u[0],p=y[1][0]+u[0],m=y[0][1]+u[1],f=y[1][1]+u[1];break;case"end":d=y[g-2][0]+u[0],p=y[g-1][0]+u[0],m=y[g-2][1]+u[1],f=y[g-1][1]+u[1]}}else d=t.xStart+u[0]||0,p=t.xEnd+u[0]||0,m=t.yStart+u[1]||0,f=t.yEnd+u[1]||0;switch(h){case"start":i=d<p?"end":"start",a=m<f?"bottom":"top",n=d,o=m;break;case"end":i=d<p?"start":"end",a=m<f?"top":"bottom",n=p,o=f}l-=4,d&&p&&d!=p?n-="end"==i?l:-l:i="center",m!=f?o-="bottom"==a?l:-l:a="middle";break;case"specific":n=t.textX||0,o=t.textY||0,i="start",a="middle"}t.labelXOffset&&!isNaN(t.labelXOffset)&&(n+=t.labelXOffset),t.labelYOffset&&!isNaN(t.labelYOffset)&&(o+=t.labelYOffset),null!=n&&null!=o&&fn._fillText(e,t.text,n,o,t.textFont,t.textAlign||i,t.textBaseline||a)}}modSelf(){this.__dirty=!0,this.style&&(this.style.__rect=null),this.highlightStyle&&(this.highlightStyle.__rect=null)}isSilent(){return!(this.hoverable||this.draggable||this.clickable||this.onmousemove||this.onmouseover||this.onmouseout||this.onmousedown||this.onmouseup||this.onclick||this.ondragenter||this.ondragover||this.ondragleave||this.ondrop)}setCtxGlobalAlpha(e,t,s){e.globalAlpha="fill"===t?void 0===s.fillOpacity?void 0===s.opacity?1:s.opacity:s.fillOpacity:"stroke"===t?void 0===s.strokeOpacity?void 0===s.opacity?1:s.opacity:s.strokeOpacity:void 0===s.opacity?1:s.opacity}static _fillText(e,t,s,r,i,a,n){i&&(e.font=i),e.textAlign=a,e.textBaseline=n;var o=fn._getTextRect(t,s,r,i,a,n);t=(t+"").split("\n");var l=pn.Util_area.getTextHeight("ZH",i);switch(n){case"top":r=o.y;break;case"bottom":r=o.y+l;break;default:r=o.y+l/2}for(var h=0,u=t.length;h<u;h++)e.fillText(t[h],s,r),r+=l}static _getTextRect(e,t,s,r,i,a){var n=pn.Util_area.getTextWidth(e,r),o=pn.Util_area.getTextHeight("ZH",r);switch(e=(e+"").split("\n"),i){case"end":case"right":t-=n;break;case"center":t-=n/2}switch(a){case"top":break;case"bottom":s-=o*e.length;break;default:s-=o*e.length/2}return{x:t,y:s,width:n,height:o*e.length}}}
  1327. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1328. * This program are made available under the terms of the Apache License, Version 2.0
  1329. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class yn extends fn{constructor(e){super(e),this.type="smicpoint",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPoint"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;e.arc(t.x+s[0],t.y+s[1],t.r,0,2*Math.PI,!0)}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+s[0]-e.r-t/2),y:Math.round(e.y+s[1]-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect)}}
  1330. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1331. * This program are made available under the terms of the Apache License, Version 2.0
  1332. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class gn extends fn{constructor(e){super(e),this.type="smictext",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicText"}destroy(){this.type=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=this.style;if(t&&(r=this.getHighlightStyle(r,this.highlightStyle||{})),void 0!==r.text&&!1!==r.text){e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r.textFont&&(e.font=r.textFont),e.textAlign=r.textAlign||"start",e.textBaseline=r.textBaseline||"middle";var i,a=(r.text+"").split("\n"),n=pn.Util_area.getTextHeight("ZH",r.textFont),o=this.getRectNoRotation(r),l=r.x+s[0];i="top"==r.textBaseline?o.y:"bottom"==r.textBaseline?o.y+n:o.y+n/2;for(var h=r.x+s[0],u=r.y+s[1],c=0,d=a.length;c<d;c++){switch(r.labelRect&&(e.fillRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=r.strokeColor,e.strokeRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=r.textColor),r.brushType){case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?e.strokeText(a[c],0,n*c,r.maxWidth):e.strokeText(a[c],0,n*c):"bottom"==r.textBaseline?r.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height,r.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height):r.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):r.maxWidth?e.strokeText(a[c],l,i,r.maxWidth):e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r);break;case"both":r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*c,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*c,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",r)):"bottom"==r.textBaseline?r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",r)):r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",r)),e.restore()):r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],l,i,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],l,i,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r));break;default:this.setCtxGlobalAlpha(e,"fill",r),r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?e.fillText(a[c],0,n*c,r.maxWidth):e.fillText(a[c],0,n*c):"bottom"==r.textBaseline?r.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height,r.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height):r.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):r.maxWidth?e.fillText(a[c],l,i,r.maxWidth):e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r)}i+=n}e.restore()}}getRect(e){if(e.__rect)return e.__rect;for(var t,s,r,i,a=this.getTextBackground(e,!0),n=0,o=a.length;n<o;n++){var l=a[n];0==n?(t=l[0],r=l[0],s=l[1],i=l[1]):(l[0]<t&&(t=l[0]),l[0]>r&&(r=l[0]),l[1]<s&&(s=l[1]),l[1]>i&&(i=l[1]))}return e.__rect={x:t,y:s,width:r-t,height:i-s},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,r=pn.Util_area.getTextHeight("ZH",e.textFont),i=pn.Util_area.getTextWidth(e.text,e.textFont),a=pn.Util_area.getTextHeight(e.text,e.textFont),n=e.x+s[0];"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2),t="top"==e.textBaseline?e.y+s[1]:"bottom"==e.textBaseline?e.y+s[1]-a:e.y+s[1]-a/2;var o,l=!1;if(e.maxWidth){var h=parseInt(e.maxWidth);h<i&&(o=i,l=!0,i=h),n=e.x+s[0],"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2)}e.textFont&&(e.textFont.toLowerCase().indexOf("italic")>-1&&(i+=!0===l?r/3*(i/o):r/3));return{x:n,y:t,width:i,height:a}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var r=this.getRectNoRotation(e),i=e.x+s[0],a=e.y+s[1],n=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,s=this.getRotatedLocation(r.x,r.y,i,a,t),o=this.getRotatedLocation(r.x+r.width,r.y,i,a,t),l=this.getRotatedLocation(r.x+r.width,r.y+r.height,i,a,t),h=this.getRotatedLocation(r.x,r.y+r.height,i,a,t);n.push(s),n.push(o),n.push(l),n.push(h)}else{let e=[r.x,r.y],t=[r.x+r.width,r.y],s=[r.x+r.width,r.y+r.height],i=[r.x,r.y+r.height];n.push(e),n.push(t),n.push(s),n.push(i)}return e.__textBackground=n,e.__textBackground}getRotatedLocation(e,t,s,r,i){var a,n,o=new Array;return t=-t,r=-r,i=-i,a=(e-s)*Math.cos(i/180*Math.PI)-(t-r)*Math.sin(i/180*Math.PI)+s,n=(e-s)*Math.sin(i/180*Math.PI)+(t-r)*Math.cos(i/180*Math.PI)+r,o[0]=a,o[1]=-n,o}}
  1333. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1334. * This program are made available under the terms of the Apache License, Version 2.0
  1335. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class vn extends fn{constructor(e){super(e),this.type="smiccircle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicCircle"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1];return e.moveTo(r+t.r,i),e.arc(r,i,t.r,0,2*Math.PI,!0),!0}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,r=e.x+s[0],i=e.y+s[1],a=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(r-a-t/2),y:Math.round(i-a-t/2),width:2*a+t,height:2*a+t},e.__rect}}
  1336. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1337. * This program are made available under the terms of the Apache License, Version 2.0
  1338. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Sn extends fn{constructor(e){super(e),this.type="smicpolygon",this.holePolygonPointLists=null,this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPolygon"}destroy(){this.type=null,this.holePolygonPointLists=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.style;t&&(s=this.getHighlightStyle(s,this.highlightStyle||{})),e.save(),this.setContext(e,s),this.setTransform(e);var r=!1;"fill"!=s.brushType&&"both"!=s.brushType&&void 0!==s.brushType||(e.beginPath(),"dashed"==s.lineType||"dotted"==s.lineType||"dot"==s.lineType||"dash"==s.lineType||"dashdot"==s.lineType||"longdash"==s.lineType||"longdashdot"==s.lineType?this.buildPath(e,{lineType:"solid",lineWidth:s.lineWidth,pointList:s.pointList}):(this.buildPath(e,s),r=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)),s.lineWidth>0&&("stroke"==s.brushType||"both"==s.brushType)&&(r||(e.beginPath(),this.buildPath(e,s)),this.setCtxGlobalAlpha(e,"stroke",s),e.stroke(),this.setCtxGlobalAlpha(e,"reset",s)),this.drawText(e,s,this.style);var i=ye.cloneObject(s);if(i.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var a=this.holePolygonPointLists,n=a.length,o=0;o<n;o++){var l=a[o];i.pointList=l,e.globalCompositeOperation="destination-out",r=!1,"fill"!=i.brushType&&"both"!=i.brushType&&void 0!==i.brushType||(e.beginPath(),"dashed"==i.lineType||"dotted"==i.lineType||"dot"==i.lineType||"dash"==i.lineType||"dashdot"==i.lineType||"longdash"==i.lineType||"longdashdot"==i.lineType?this.buildPath(e,{lineType:"solid",lineWidth:i.lineWidth,pointList:i.pointList}):(this.buildPath(e,i),r=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",i),e.fill(),this.setCtxGlobalAlpha(e,"reset",i)),i.lineWidth>0&&("stroke"==i.brushType||"both"==i.brushType)?(r||(e.beginPath(),this.buildPath(e,i)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",i),e.stroke(),this.setCtxGlobalAlpha(e,"reset",i)):e.globalCompositeOperation="source-over"}e.restore()}buildPath(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.pointList;if(!(r.length<2))if(t.smooth&&"spline"!==t.smooth){var i,a,n,o=pn.SUtil_smoothBezier(r,t.smooth,!0,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(var l=r.length,h=0;h<l;h++)i=o[2*h],a=o[2*h+1],n=[r[(h+1)%l][0]+s[0],r[(h+1)%l][1]+s[1]],e.bezierCurveTo(i[0],i[1],a[0],a[1],n[0],n[1])}else if("spline"===t.smooth&&(r=pn.SUtil_smoothSpline(r,!0,null,s)),t.lineType&&"solid"!=t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let i=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=i;let a=t.lineWidth||1,n=a,o=a;"dashed"===t.lineType&&(n*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a)),"dash"===t.lineType&&(n*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"longdash"===t.lineType&&(n*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)pn.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o]);pn.SUtil_dashedLineTo(e,r[r.length-1][0]+s[0],r[r.length-1][1]+s[1],r[0][0]+s[0],r[0][1]+s[1],a,[n,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let i=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=i;let a=t.lineWidth||1,n=a,o=a,l=a,h=a;"dashdot"===t.lineType&&(n*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),"longdashdot"===t.lineType&&(n*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)pn.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o,l,h]);pn.SUtil_dashedLineTo(e,r[r.length-1][0]+s[0],r[r.length-1][1]+s[1],r[0][0]+s[0],r[0][1]+s[1],a,[n,o,l,h])}}else{e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)e.lineTo(r[t][0]+s[0],r[t][1]+s[1]);e.lineTo(r[0][0]+s[0],r[0][1]+s[1])}}getRect(e,t){var s;if(t?s=t:(this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),s=this.refOriginalPosition),e.__rect)return e.__rect;for(var r,i=Number.MAX_VALUE,a=Number.MIN_VALUE,n=Number.MAX_VALUE,o=Number.MIN_VALUE,l=e.pointList,h=0,u=l.length;h<u;h++)l[h][0]+s[0]<i&&(i=l[h][0]+s[0]),l[h][0]+s[0]>a&&(a=l[h][0]+s[0]),l[h][1]+s[1]<n&&(n=l[h][1]+s[1]),l[h][1]+s[1]>o&&(o=l[h][1]+s[1]);return r="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(i-r/2),y:Math.round(n-r/2),width:a-i+r,height:o-n+r},e.__rect}}
  1339. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1340. * This program are made available under the terms of the Apache License, Version 2.0
  1341. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class bn extends fn{constructor(e){super(e),this.brushTypeOnly="stroke",this.textPosition="end",this.type="smicbroken-line",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicBrokenLine"}destroy(){this.brushTypeOnly=null,this.textPosition=null,this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.pointList;if(!(r.length<2)){var i=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){var a,n,o,l=pn.SUtil_smoothBezier(r,t.smooth,!1,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=0;t<i-1;t++)a=l[2*t],n=l[2*t+1],o=[r[t+1][0]+s[0],r[t+1][1]+s[1]],e.bezierCurveTo(a[0],a[1],n[0],n[1],o[0],o[1])}else if("spline"===t.smooth&&(i=(r=pn.SUtil_smoothSpline(r,null,null,s)).length),t.lineType&&"solid"!==t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let a=t.lineWidth||1,n=a,o=a;"dashed"===t.lineType&&(n*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a)),"dash"===t.lineType&&(n*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"longdash"===t.lineType&&(n*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(var h=1;h<i;h++)pn.SUtil_dashedLineTo(e,r[h-1][0]+s[0],r[h-1][1]+s[1],r[h][0]+s[0],r[h][1]+s[1],a,[n,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let a=t.lineWidth||1,n=a,o=a,l=a,h=a;"dashdot"===t.lineType&&(n*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),"longdashdot"===t.lineType&&(n*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),a=(t.lineWidth||1)*("dashed"===t.lineType?5:1),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<i;t++)pn.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o,l,h])}}else{e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<i;t++)e.lineTo(r[t][0]+s[0],r[t][1]+s[1])}}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return Sn.prototype.getRect.apply(this,[e,t])}}
  1342. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1343. * This program are made available under the terms of the Apache License, Version 2.0
  1344. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class xn extends fn{constructor(e){super(e),this.type="smicimage",this._imageCache={},this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicImage"}destroy(){this.type=null,this._imageCache=null,super.destroy()}brush(e,t,s){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,i=this.style||{};t&&(i=this.getHighlightStyle(i,this.highlightStyle||{}));var a=i.image,n=this;if("string"==typeof a){var o=a;this._imageCache[o]?a=this._imageCache[o]:((a=new Image).onload=function(){a.onload=null,clearTimeout(xn._refreshTimeout),xn._needsRefresh.push(n),xn._refreshTimeout=setTimeout(function(){s&&s(xn._needsRefresh),xn._needsRefresh=[]},10)},a.src=o,this._imageCache[o]=a)}if(a){if("IMG"==a.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=a.readyState)return}else if(!a.complete)return;var l=i.width||a.width,h=i.height||a.height,u=i.x+r[0],c=i.y+r[1];if(!a.width||!a.height)return;if(e.save(),this.doClip(e),this.setContext(e,i),this.setTransform(e),i.sWidth&&i.sHeight){let t=i.sx+r[0]||0,s=i.sy+r[1]||0;e.drawImage(a,t,s,i.sWidth,i.sHeight,u,c,l,h)}else if(i.sx&&i.sy){let t=i.sx+r[0],s=i.sy+r[1];var d=l-t,p=h-s;e.drawImage(a,t,s,d,p,u,c,l,h)}else e.drawImage(a,u,c,l,h);i.width||(i.width=l),i.height||(i.height=h),this.style.width||(this.style.width=l),this.style.height||(this.style.height=h),this.drawText(e,i,this.style),e.restore()}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return{x:e.x+t[0],y:e.y+t[1],width:e.width,height:e.height}}clearCache(){this._imageCache={}}}xn._needsRefresh=[],xn._refreshTimeout=null;
  1345. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1346. * This program are made available under the terms of the Apache License, Version 2.0
  1347. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1348. class Cn extends fn{constructor(e){super(e),this.type="smicrectangle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicRectangle"}destroy(){this.type=null,super.destroy()}_buildRadiusPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s,r,i,a,n,o=this.refOriginalPosition,l=t.x+o[0],h=t.y+o[1],u=t.width,c=t.height,d=t.radius;"number"==typeof d?s=r=i=a=d:d instanceof Array?1===d.length?s=r=i=a=d[0]:2===d.length?(s=i=d[0],r=a=d[1]):3===d.length?(s=d[0],r=a=d[1],i=d[2]):(s=d[0],r=d[1],i=d[2],a=d[3]):s=r=i=a=0,s+r>u&&(s*=u/(n=s+r),r*=u/n),i+a>u&&(i*=u/(n=i+a),a*=u/n),r+i>c&&(r*=c/(n=r+i),i*=c/n),s+a>c&&(s*=c/(n=s+a),a*=c/n),e.moveTo(l+s,h),e.lineTo(l+u-r,h),0!==r&&e.quadraticCurveTo(l+u,h,l+u,h+r),e.lineTo(l+u,h+c-i),0!==i&&e.quadraticCurveTo(l+u,h+c,l+u-i,h+c),e.lineTo(l+a,h+c),0!==a&&e.quadraticCurveTo(l,h+c,l,h+c-a),e.lineTo(l,h+s),0!==s&&e.quadraticCurveTo(l,h,l+s,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+s[0],t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+s[0]-t/2),y:Math.round(e.y+s[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}
  1349. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1350. * This program are made available under the terms of the Apache License, Version 2.0
  1351. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Tn extends fn{constructor(e){super(e),this.type="smicsector",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicSector"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1],a=t.r0||0,n=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=pn.Util_math.degreeToRadian(o),l=pn.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=pn.Util_math.cos(o),c=pn.Util_math.sin(o);e.moveTo(u*a+r,c*a+i),e.lineTo(u*n+r,c*n+i),e.arc(r,i,n,o,l,!h),e.lineTo(pn.Util_math.cos(l)*a+r,pn.Util_math.sin(l)*a+i),0!==a&&e.arc(r,i,a,l,o,h),e.closePath()}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition,s=pn.Util_vector.create(),r=pn.Util_vector.create(),i=pn.Util_vector.create(),a=pn.Util_vector.create(),n=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=pn.Util_math.degreeToRadian(e.startAngle),c=pn.Util_math.degreeToRadian(e.endAngle),d=e.clockWise;return d||(u=-u,c=-c),l>1?pn.Util_computeBoundingBox.arc(n,o,l,u,c,!d,s,i):(s[0]=i[0]=n,s[1]=i[1]=o),pn.Util_computeBoundingBox.arc(n,o,h,u,c,!d,r,a),pn.Util_vector.min(s,s,r),pn.Util_vector.max(i,i,a),e.__rect={x:s[0],y:s[1],width:i[0]-s[0],height:i[1]-s[1]},e.__rect}}
  1352. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1353. * This program are made available under the terms of the Apache License, Version 2.0
  1354. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class _n{constructor(e){this.shapeParameters=e,this.CLASS_NAME="SuperMap.Feature.ShapeFactory"}destroy(){this.shapeParameters=null}createShape(e){if(e&&(this.shapeParameters=e),!this.shapeParameters)return null;var t=this.shapeParameters;if(t instanceof en){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=ye.copyAttributesWithClip(e,t.style,["x","y"]);let s=new yn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["x","y","style","highlightStyle"]),s}if(t instanceof tn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ye.copyAttributesWithClip(e,t.style,["pointList"]);let s=new bn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof sn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ye.copyAttributesWithClip(e,t.style,["pointList"]);let s=new Sn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof rn){if(!t.x&&!t.y&!t.width&!t.height)return null;let e=new Object;e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e=ye.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let s=new Cn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["x","y","width","height","style","highlightStyle"]),s}if(t instanceof an){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e.startAngle=t.startAngle,e.endAngle=t.endAngle,t.r0&&(e.r0=t.r0),t.clockWise&&(e.clockWise=t.clockWise),e=ye.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let s=new Tn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),s}if(t instanceof nn){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=ye.copyAttributesWithClip(e,t.style,["x","y","text"]);let s=new gn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["x","y","text","style","highlightStyle"]),s}if(t instanceof on){let e=new Object;e.x=t.x,e.y=t.y,t.image&&(e.image=t.image),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sx&&(e.sx=t.sx),t.sy&&(e.sy=t.sy),t.sWidth&&(e.sWidth=t.sWidth),t.sHeight&&(e.sHeight=t.sHeight),e=ye.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let s=new xn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["x","y","image","width","height","style","highlightStyle"]),s}if(t instanceof ln){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=ye.copyAttributesWithClip(e,t.style,["x","y","r"]);let s=new vn;return s.style=_n.transformStyle(e),s.highlightStyle=_n.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(s,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),s}return null}static transformStyle(e){var t={},s=["normal","normal","normal","12","arial,sans-serif"],r=[!0,!1];for(var i in e)switch(i){case"fill":r[0]=e[i];break;case"fillColor":t.color=e[i];break;case"stroke":r[1]=e[i];break;case"strokeWidth":t.lineWidth=e[i];break;case"strokeLinecap":t.lineCap=e[i];break;case"strokeLineJoin":t.lineJoin=e[i];break;case"strokeDashstyle":t.lineType=e[i];break;case"pointRadius":t.r=e[i];break;case"label":t.text=e[i];break;case"labelRect":t.labelRect=e[i];break;case"fontColor":t.textColor=e[i];break;case"fontStyle":s[0]=e[i];break;case"fontVariant":s[1]=e[i];break;case"fontWeight":s[2]=e[i];break;case"fontSize":var a="";e[i]&&e[i].toString().indexOf("px")<0&&(a="px"),s[3]=e[i]+a;break;case"fontFamily":s[4]=e[i];break;case"fontOpacity":t.opacity=e[i];break;case"labelPosition":t.textPosition=e[i];break;case"labelAlign":t.textAlign=e[i];break;case"labelBaseline":t.textBaseline=e[i];break;case"labelRotation":t.textRotation=e[i];break;default:t[i]=e[i]}return t.textFont=s.join(" "),!0===r[0]&&!1===r[1]?t.brushType="fill":!1===r[0]&&!0===r[1]?t.brushType="stroke":!0===r[0]&&!0===r[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,s){var r=s||{},i=new rn(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return i.style={fillColor:"#f3f3f3"},r.backgroundStyle&&ye.copyAttributesWithClip(i.style,r.backgroundStyle),r.backgroundRadius&&(i.style.radius=r.backgroundRadius),i.clickable=!1,i.hoverable=!1,e.createShape(i)}static GraphAxis(e,t,s,r){var i=t,a=s||{},n=[],o=[],l=!!a.useXReferenceLine&&a.useXReferenceLine,h=a.axisYTick&&!isNaN(a.axisYTick)?a.axisYTick:0,u=[],c=[];if(0==h){if(c.push([i[0],i[3]-5]),c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}else{var d=Math.abs(i[1]-i[3])/h,p=i[3];c.push([i[0],p-5]);for(var m=0;m<h;m++){if(c.push([i[0],p]),c.push([i[0]-5,p]),c.push([i[0],p]),l){var f=new tn([[i[0],p],[i[2],p]]);f.style={strokeColor:"#cfcfcf",strokeLinecap:"butt",strokeLineJoin:"round",strokeWidth:1},f.clickable=!1,f.hoverable=!1,a.xReferenceLineStyle&&ye.copyAttributesWithClip(f.style,a.xReferenceLineStyle),n.push(e.createShape(f))}p+=d}if(c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}if(a.axisUseArrow){var y=[[i[2]+5,i[1]+4],[i[2]+13,i[1]],[i[2]+5,i[1]-4]],g=[[i[0]-4,i[3]-5],[i[0],i[3]-13],[i[0]+4,i[3]-5]],v=new sn(y);v.style={fillColor:"#008acd"},ye.copyAttributesWithClip(v.style,a.axisStyle),o.push(e.createShape(v));var S=new sn(g);if(S.style={fillColor:"#008acd"},ye.copyAttributesWithClip(S.style,a.axisStyle),o.push(e.createShape(S)),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){var b=new sn(u);b.style={fillColor:"#008acd"},ye.copyAttributesWithClip(b.style,a.axisStyle),o.push(e.createShape(b))}}var x=new tn(c);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},a.axisStyle&&ye.copyAttributesWithClip(x.style,a.axisStyle),x.clickable=!1,x.hoverable=!1;var C=[e.createShape(x)],T=[];if(a.axisYLabels&&a.axisYLabels.length&&a.axisYLabels.length>0){var _=a.axisYLabels;let t=_.length;var E=[0,0];if(a.axisYLabelsOffset&&a.axisYLabelsOffset.length&&(E=a.axisYLabelsOffset),1==t){let t=new nn(i[0]-5+E[0],i[3]+E[1],_[0]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&ye.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,T.push(e.createShape(t))}else for(var A=i[3],w=Math.abs(i[1]-i[3])/(t-1),P=0;P<t;P++){let t=new nn(i[0]-5+E[0],A+E[1],_[P]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&ye.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,T.push(e.createShape(t)),A+=w}}var L=[];if(a.axisXLabels&&a.axisXLabels.length&&a.axisXLabels.length>0){let t=a.axisXLabels,s=t.length,n=[0,0];if(a.axisXLabelsOffset&&a.axisXLabelsOffset.length&&(n=a.axisXLabelsOffset),r&&r.xPositions&&r.xPositions.length&&r.xPositions.length==s){let o=r.xPositions;for(let r=0;r<s;r++){let s=new nn(o[r]+n[0],i[1]+n[1],t[r]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&ye.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,L.push(e.createShape(s))}}else if(1==s){let s=new nn(i[0]-5+n[0],i[1]+n[0],t[0]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&ye.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,L.push(e.createShape(s))}else{let r=i[0],o=Math.abs(i[2]-i[0])/(s-1);for(let l=0;l<s;l++){let s=new nn(r+n[0],i[1]+n[1],t[l]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&ye.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,L.push(e.createShape(s)),r+=o}}}return n.concat(C).concat(T).concat(L).concat(o)}static ShapeStyleTool(e,t,s,r,i,a){var n=e||{};if(t&&ye.copyAttributesWithClip(n,t),s&&s.length&&void 0!==i&&!isNaN(i)&&i>=0&&s[i]&&ye.copyAttributesWithClip(n,s[i]),r&&r.length&&void 0!==a)for(var o=r,l=o.length,h=parseFloat(a),u=0;u<l;u++)if(o[u].start<=h&&h<o[u].end){ye.copyAttributesWithClip(n,o[u].style);break}return n}}r.Feature=r.Feature||{},r.Feature.ShapeFactory=_n;
  1355. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1356. * This program are made available under the terms of the Apache License, Version 2.0
  1357. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1358. class En{constructor(e,t){e&&t&&t.map&&t.renderer&&(this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=null,this.location=[],this.data=e,this.shapes=[],this.layer=t,this.CLASS_NAME="SuperMap.Feature.Theme")}destroy(){this.data=null,this.id=null,this.lonlat=null,this.location=null,this.shapes=null,this.layer=null}getLocalXY(e){var t=this.layer.map.getResolution(),s=this.layer.map.getExtent();if(e instanceof Te||e instanceof Ee){return[e.x/t+-s.left/t,s.top/t-e.y/t]}if(e instanceof ge){return[e.lon/t+-s.left/t,s.top/t-e.lat/t]}return null}}r.Feature=r.Feature||{},r.Feature.Theme=En;
  1359. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1360. * This program are made available under the terms of the Apache License, Version 2.0
  1361. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1362. class An extends En{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.shapeFactory=new _n,this.shapeParameters=null,this.RelativeCoordinate=!1,this.setting=null,this.origonPoint=null,this.chartBox=null,this.chartBounds=null,this.width=null,this.height=null,this.XOffset=0,this.YOffset=0,this.DVBParameter=null,this.dataViewBox=null,this.DVBCodomain=null,this.DVBCenterPoint=null,this.DVBUnitValue=null,this.DVBOrigonPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.origonPointOffset=null,this.fields=s||[],this.dataValues=null,this.lonlat=i||this.data.geometry.getBounds().getCenterLonLat(),r&&r.width&&r.height&&r.codomain&&(this.setting=r),this.CLASS_NAME="SuperMap.Feature.Theme.Graph"}destroy(){this.shapeFactory=null,this.shapeParameters=null,this.width=null,this.height=null,this.origonPoint=null,this.chartBox=null,this.dataViewBox=null,this.chartBounds=null,this.DVBParameter=null,this.DVBOrigonPoint=null,this.DVBCenterPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.DVBCodomain=null,this.DVBUnitValue=null,this.origonPointOffset=null,this.XOffset=null,this.YOffset=null,this.fields=null,this.dataValues=null,this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;if(!(e.width&&e.height&&e.codomain))return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,s=En.getDataValues(this.data,this.fields,t);this.dataValues=s||[],this.width=parseFloat(e.width),this.height=parseFloat(e.height),this.DVBCodomain=e.codomain,this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var r=this.width,i=this.height,a=this.location;this.origonPoint=[a[0]-r/2,a[1]-i/2];var n=this.origonPoint;this.chartBox=[n[0],n[1]+i,n[0]+r,n[1]];var o=this.chartBox,l=this.DVBParameter;this.dataViewBox=[o[0]+l[0],o[1]-l[1],o[2]-l[2],o[3]+l[3]];var h=this.dataViewBox;return!(h[0]>=h[2]||h[1]<=h[3])&&(this.DVBOrigonPoint=[h[0],h[3]],this.DVBWidth=Math.abs(h[2]-h[0]),this.DVBHeight=Math.abs(h[1]-h[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-n[0],this.DVBOrigonPoint[1]-n[1]],!0)}resetLocation(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var s=this.width,r=this.height,i=this.location;return this.chartBounds=new ve(i[0]-s/2,i[1]+r/2,i[0]+s/2,i[1]-r/2),this.resetLinearGradient(),i}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,s=0,r=e.length;s<r;s++){e[s].refOriginalPosition=t;var i=e[s].style;for(var a in i)switch(a){case"pointList":for(var n=i[a],o=0,l=n.length;o<l;o++)n[o][0]-=t[0],n[o][1]-=t[1];break;case"x":i[a]-=t[0];break;case"y":i[a]-=t[1]}}this.RelativeCoordinate=!0}assembleShapes(){}getLocalXY(e){return this.layer.getLocalXY(e)}}En.getDataValues=function(e,t,s){if(!e.attributes)return!1;for(var r=[],i=e.attributes,a=0;a<t.length;a++)for(var n in i)if(n===t[a])try{!isNaN(s)&&s>=0?r.push(parseFloat(i[n].toString()).toFixed(s)):r.push(parseFloat(i[n].toString()))}catch(e){throw new Error("not a number")}return r.length===t.length&&r},r.Feature.Theme.Graph=An;r.Feature.Theme.Bar=
  1363. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1364. * This program are made available under the terms of the Apache License, Version 2.0
  1365. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1366. class extends An{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar"}destroy(){super.destroy()}assembleShapes(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.dataViewBox,i=this.dataValues;if(!(i.length<1)){for(let e=0,t=i.length;e<t;e++)if(i[e]<s[0]||i[e]>s[1])return;var a=this.calculateXShapeInfo();if(a){var n=a.xPositions,o=a.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(_n.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(_n.GraphAxis(this.shapeFactory,r,t,a)));for(var l=0;l<i.length;l++){var h=r[1]-(i[l]-s[0])/this.DVBUnitValue,u=[[n[l]-o/2,r[1]-1],[n[l]+o/2,r[1]-1],[n[l]+o/2,h],[n[l]-o/2,h]],c=new sn(u);if(void 0===t.showShadow||t.showShadow){if(t.barShadowStyle){var d=t.barShadowStyle;d.shadowBlur&&(e.shadowBlur=d.shadowBlur),d.shadowColor&&(e.shadowColor=d.shadowColor),d.shadowOffsetX&&(e.shadowOffsetX=d.shadowOffsetX),d.shadowOffsetY&&(e.shadowOffsetY=d.shadowOffsetY)}c.style={},ye.copyAttributesWithClip(c.style,e)}c.refDataID=this.data.id,c.dataInfo={field:this.fields[l],value:i[l]},void 0!==t.barHoverAble&&(c.hoverable=t.barHoverAble),void 0!==t.barClickAble&&(c.clickable=t.barClickAble),this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=0,n=this.DVBWidth;if(s.xShapeBlank&&s.xShapeBlank.length&&3==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[2]+(r-1)*e[1]);if(o<=r)return null;a=o/r}else e=[a=n/(2*r+1),a,a];for(var l=0,h=0;h<r;h++)0==h?l=e[0]+a/2:l+=a+e[1],i.push(t[0]+l);return{xPositions:i,width:a}}resetLinearGradient(){if(this.RelativeCoordinate)for(var e=this.shapes.length,t=this.setting.barLinearGradient,s=-1,r=0;r<e;r++){var i=this.shapes[r];if("SuperMap.LevelRenderer.Shape.SmicPolygon"===i.CLASS_NAME){var a=i.style,n=this.location[0]+a.pointList[0][0],o=this.location[0]+a.pointList[1][0];++s>=t.length&&(s%=t.length);var l=t[s][0],h=t[s][1],u=(new Wa).getLinearGradient(n,0,o,0,[[0,l],[1,h]]);i.style.color=u}}}};r.Feature.Theme.Bar3D=
  1367. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1368. * This program are made available under the terms of the Apache License, Version 2.0
  1369. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1370. class extends An{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar3D"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,25,20,20]:e.dataViewBoxParameter=[5,5,5,5]),e.axisUseArrow=void 0===e.axisUseArrow||e.axisUseArrow,e.axisXLabelsOffset=void 0!==e.axisXLabelsOffset?e.axisXLabelsOffset:[-10,10],this.initBaseParameter()){var t=this.DVBCodomain;this.DVBUnitValue=(t[1]-t[0])/this.DVBHeight;var s=this.dataViewBox,r=this.dataValues;if(!(r.length<1)){for(let e=0,s=r.length;e<s;e++)if(r[e]<t[0]||r[e]>t[1])return;var i=this.calculateXShapeInfo();if(i){var a=i.xPositions,n=i.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(_n.Background(this.shapeFactory,this.chartBox,e)),(!e.axis3DParameter||isNaN(e.axis3DParameter)||e.axis3DParameter<15)&&(e.axis3DParameter=20),(void 0===e.useAxis||e.useAxis)&&(this.shapes=this.shapes.concat(_n.GraphAxis(this.shapeFactory,s,e,i)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let i=0;i<r.length;i++){var l=s[1]-(r[i]-t[0])/this.DVBUnitValue,h=a[i]-n/2,u=a[i]+n/2,c=[[h,l],[u,l],[u-o,l+o],[h-o,l+o]],d=[[u,l],[u-o,l+o],[u-o,s[1]+o],[u,s[1]]],p=[[h-o,s[1]+o],[u-o,s[1]+o],[u-o,l+o],[h-o,l+o]];o<=0&&(p=[[h,s[1]],[u,s[1]],[u,l],[h,l]]);var m=new sn(c),f=new sn(d),y=new sn(p);e.barSideStyle=e.barSideStyle?e.barSideStyle:e.barFaceStyle,e.barSideStyleByFields=e.barSideStyleByFields?e.barSideStyleByFields:e.barFaceStyleByFields,e.barSideStyleByCodomain=e.barSideStyleByCodomain?e.barSideStyleByCodomain:e.barFaceStyleByCodomain,e.barTopStyle=e.barTopStyle?e.barTopStyle:e.barFaceStyle,e.barTopStyleByFields=e.barTopStyleByFields?e.barTopStyleByFields:e.barFaceStyleByFields,e.barTopStyleByCodomain=e.barTopStyleByCodomain?e.barTopStyleByCodomain:e.barFaceStyleByCodomain,y.style=_n.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barFaceStyle,e.barFaceStyleByFields,e.barFaceStyleByCodomain,i,r[i]),f.style=_n.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barSideStyle,e.barSideStyleByFields,e.barSideStyleByCodomain,i,r[i]),m.style=_n.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barTopStyle,e.barTopStyleByFields,e.barTopStyleByCodomain,i,r[i]),e.barSideHoverStyle=e.barSideHoverStyle?e.barSideHoverStyle:e.barFaceHoverStyle,e.barTopHoverStyle=e.barTopHoverStyle?e.barTopHoverStyle:e.barFaceHoverStyle,y.highlightStyle=_n.ShapeStyleTool({stroke:!0},e.barFaceHoverStyle),f.highlightStyle=_n.ShapeStyleTool({stroke:!0},e.barSideHoverStyle),m.highlightStyle=_n.ShapeStyleTool({stroke:!0},e.barTopHoverStyle),m.refDataID=f.refDataID=y.refDataID=this.data.id,m.isHoverByRefDataID=f.isHoverByRefDataID=y.isHoverByRefDataID=!0,m.refDataHoverGroup=f.refDataHoverGroup=y.refDataHoverGroup=ye.createUniqueID("lr_shg"),m.dataInfo=f.dataInfo=y.dataInfo={field:this.fields[i],value:r[i]},void 0!==e.barHoverAble&&(m.hoverable=f.hoverable=y.hoverable=e.barHoverAble),void 0!==e.barClickAble&&(m.clickable=f.clickable=y.clickable=e.barClickAble),this.shapes.push(this.shapeFactory.createShape(f)),this.shapes.push(this.shapeFactory.createShape(m)),this.shapes.push(this.shapeFactory.createShape(y))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=0,n=this.DVBWidth;if(s.xShapeBlank&&s.xShapeBlank.length&&3==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[2]+(r-1)*e[1]);if(o<=r)return null;a=o/r}else e=[a=n/(2*r+1),a,a];for(var l=0,h=0;h<r;h++)0==h?l=e[0]+a/2:l+=a+e[1],i.push(t[0]+l);return{xPositions:i,width:a}}};
  1371. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1372. * This program are made available under the terms of the Apache License, Version 2.0
  1373. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1374. class wn extends An{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.setting=null,r&&r.codomain&&(this.setting=r,this.DVBCodomain=this.setting.codomain),this.CLASS_NAME="SuperMap.Feature.Theme.RankSymbol"}destroy(){this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;e.XOffset&&(this.XOffset=e.XOffset),e.YOffset&&(this.YOffset=e.YOffset),this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var t=this.width,s=this.height,r=this.location;this.origonPoint=[r[0]-t/2,r[1]-s/2];var i=this.origonPoint;this.chartBox=[i[0],i[1]+s,i[0]+t,i[1]];var a=this.chartBox,n=this.DVBParameter;this.dataViewBox=[a[0]+n[0],a[1]-n[1],a[2]-n[2],a[3]+n[3]];var o=this.dataViewBox;return!(o[0]>=o[2]||o[1]<=o[3])&&(this.DVBOrigonPoint=[o[0],o[3]],this.DVBWidth=Math.abs(o[2]-o[0]),this.DVBHeight=Math.abs(o[1]-o[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-i[0],this.DVBOrigonPoint[1]-i[1]],!0)}}r.Feature.Theme.RankSymbol=wn;r.Feature.Theme.Circle=
  1375. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1376. * This program are made available under the terms of the Apache License, Version 2.0
  1377. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1378. class extends wn{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Circle"}destroy(){super.destroy()}assembleShapes(){if(!this.setting)return!1;var e=this.setting;if(!e.codomain)return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,s=En.getDataValues(this.data,this.fields,t);this.dataValues=s||[];var r=this.dataValues;e.maxR||(e.maxR=100),e.minR||(e.minR=0);var i=this.DVBCodomain;i&&i[1]-i[0]>0?this.DVBUnitValue=e.maxR/(i[1]-i[0]):this.DVBUnitValue=e.maxR;var a=this.DVBUnitValue,n=r[0]*a+e.minR;if(this.width=2*n,this.height=2*n,this.initBaseParameter()&&(!i||!(r[0]<i[0]||r[0]>i[1]))){var o=this.DVBCenterPoint,l=new ln(o[0],o[1],n);l.style=_n.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=_n.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(l.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(l.clickable=e.circleClickAble),l.refDataID=this.data.id,l.dataInfo={field:this.fields[0],r:n,value:r[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}};r.Feature.Theme.Line=
  1379. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1380. * This program are made available under the terms of the Apache License, Version 2.0
  1381. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1382. class extends An{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Line"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.DVBUnitValue,i=this.dataValues;if(!(i.length<1)){var a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(_n.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(_n.GraphAxis(this.shapeFactory,t,e,a));for(var h=[],u=[],c=0,d=i.length;c<d;c++){if(i[c]<s[0]||i[c]>s[1])return null;n=l[c],o=t[1]-(i[c]-s[0])/r;var p=new en(n,o);p.style=_n.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,i[c]),p.highlightStyle=_n.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(p.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(p.clickable=e.pointClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:i[c]},u.push(this.shapeFactory.createShape(p));var m=[n,o];h.push(m)}var f=new tn(h);f.style=_n.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),f.clickable=!1,f.hoverable=!1;var y=this.shapeFactory.createShape(f);this.shapes.push(y),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;h<r;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};r.Feature.Theme.Pie=
  1383. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1384. * This program are made available under the terms of the Apache License, Version 2.0
  1385. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1386. class extends An{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Pie"}destroy(){super.destroy()}assembleShapes(){var e=this.setting,t=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}];if(this.initBaseParameter()){e.useBackground&&this.shapes.push(_n.Background(this.shapeFactory,this.chartBox,e));var s=this.dataValues;if(!(s.length<1)){var r=this.DVBCodomain;for(let e=0;e<s.length;e++)if(s[e]<r[0]||s[e]>r[1])return;var i=0;for(let e=0;e<s.length;e++)i+=Math.abs(s[e]);this.DVBUnitValue=360/i;for(var a=this.DVBUnitValue,n=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=0;c<s.length;c++){var d=Math.abs(s[c]);(l=0===c?o+d*a:c===d.length-1?h:o+d*a)-o>=360&&(l=359.9999999);var p=new an(n[0],n[1],u,o,l);if(void 0===e.sectorStyleByFields){var m=c%t.length;p.style=_n.ShapeStyleTool(null,e.sectorStyle,t,null,m)}else p.style=_n.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,s[c]);p.highlightStyle=_n.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(p.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(p.clickable=e.sectorClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:s[c]},this.shapes.push(this.shapeFactory.createShape(p)),o=l}this.shapesConvertToRelativeCoordinate()}}}};r.Feature.Theme.Point=
  1387. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1388. * This program are made available under the terms of the Apache License, Version 2.0
  1389. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1390. class extends An{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Point"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.DVBUnitValue,i=this.dataValues,a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(_n.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(_n.GraphAxis(this.shapeFactory,t,e,a));for(var h=0,u=i.length;h<u;h++){if(i[h]<s[0]||i[h]>s[1])return null;n=l[h],o=t[1]-(i[h]-s[0])/r;var c=new en(n,o);c.style=_n.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,i[h]),c.highlightStyle=_n.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(c.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(c.clickable=e.pointClickAble),c.refDataID=this.data.id,c.dataInfo={field:this.fields[h],value:i[h]},this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;h<r;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};r.Feature.Theme.Ring=
  1391. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1392. * This program are made available under the terms of the Apache License, Version 2.0
  1393. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1394. class extends An{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Ring"}destroy(){super.destroy()}assembleShapes(){if(this.initBaseParameter()){var e=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}],t=this.setting;t.useBackground&&this.shapes.push(_n.Background(this.shapeFactory,this.chartBox,t));var s=this.dataValues;if(!(s.length<1)){var r=this.DVBCodomain;for(let e=0;e<s.length;e++)if(s[e]<r[0]||s[e]>r[1])return;var i=0;for(let e=0;e<s.length;e++)i+=Math.abs(s[e]);this.DVBUnitValue=360/i;for(var a=this.DVBUnitValue,n=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=t.innerRingRadius>=0&&t.innerRingRadius<u,d=void 0!==t.innerRingRadius&&!isNaN(t.innerRingRadius)&&c?t.innerRingRadius:0,p=0;p<s.length;p++){var m=Math.abs(s[p]);l=0===p?o+m*a:p===m.length-1?h:o+m*a;var f=new an(n[0],n[1],u,o,l,d);if(void 0===t.sectorStyleByFields){var y=p%e.length;f.style=_n.ShapeStyleTool(null,t.sectorStyle,e,null,y)}else f.style=_n.ShapeStyleTool(null,t.sectorStyle,t.sectorStyleByFields,t.sectorStyleByCodomain,p,s[p]);f.highlightStyle=_n.ShapeStyleTool(null,t.sectorHoverStyle),void 0!==t.sectorHoverAble&&(f.hoverable=t.sectorHoverAble),void 0!==t.sectorClickAble&&(f.clickable=t.sectorClickAble),f.refDataID=this.data.id,f.dataInfo={field:this.fields[p],value:s[p]},this.shapes.push(this.shapeFactory.createShape(f)),o=l}this.shapesConvertToRelativeCoordinate()}}}};
  1395. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1396. * This program are made available under the terms of the Apache License, Version 2.0
  1397. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1398. class Pn extends En{constructor(e,t,s,r,i){if(super(e,t),e.geometry&&e.geometry instanceof Se){this.dataBounds=e.geometry.getBounds(),this.nodesClipPixel=2,this.isHoverAble=!0,this.isMultiHover=!0,this.isClickAble=!0,this.highlightStyle=null,this.shapeOptions={},this.style=s||{},this.CLASS_NAME="SuperMap.Feature.Theme.Vector",this.style=s||{},r&&ye.copyAttributesWithClip(this,r,["shapeOptions","dataBounds"]),i&&ye.copyAttributesWithClip(this.shapeOptions,i);var a=e.geometry;this.lonlat=this.dataBounds.getCenterLonLat(),this.location=this.getLocalXY(this.lonlat),a instanceof Ae?this.lineToTF(a):a instanceof _e?this.lineToTF(a):a instanceof Ce||(a instanceof xe?this.multiPointToTF(a):a instanceof we?this.multiLineStringToTF(a):a instanceof Pe?this.multiPolygonToTF(a):a instanceof Le?this.polygonToTF(a):a instanceof be||(a instanceof Te?this.pointToTF(a):a instanceof Oe?this.rectangleToTF(a):a instanceof Ee&&this.geoTextToTF(a)))}}destroy(){this.style=null,this.dataBounds=null,this.nodesClipPixel=null,this.isHoverAble=null,this.isMultiHover=null,this.isClickAble=null,this.highlightStyle=null,this.shapeOptions=null,super.destroy()}lineToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(r=[],s=this.getLocalXY(l),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r)}if(a.length<2)return null;var u=new Object;(u=ye.copyAttributesWithClip(u,this.style,["pointList"])).pointList=a;var c=new bn({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=this.location,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(r=[],s=this.getLocalXY(l),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r);var u=new Object;u.r=6,(u=ye.copyAttributesWithClip(u,this.style)).x=r[0],u.y=r[1];var c=new yn({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=i,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,s=0;s<t.length;s++){var r=t[s];this.lineToTF(r)}}multiPolygonToTF(e){for(var t=e.components,s=0;s<t.length;s++){var r=t[s];this.polygonToTF(r)}}pointToTF(e){var t=this.location,s=this.getLocalXY(e),r=new Object;r.r=6,(r=ye.copyAttributesWithClip(r,this.style)).x=s[0]-t[0],r.y=s[1]-t[1];var i=new yn({style:r,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}polygonToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=[],o=[],l=this.nodesClipPixel,h=0;h<t.length;h++){var u=t[h].components;if(0===h){a=[];for(var c=0;c<u.length;c++){if(r=[],s=this.getLocalXY(u[c]),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var d=a[a.length-1];if(Math.abs(d[0]-r[0])<=l&&Math.abs(d[1]-r[1])<=l)continue}a.push(r)}}else{n=[];for(var p=0;p<u.length;p++){if(r=[],s=this.getLocalXY(u[p]),r[0]=s[0]-i[0],r[1]=s[1]-i[1],n.length>0){var m=n[n.length-1];if(Math.abs(m[0]-r[0])<=l&&Math.abs(m[1]-r[1])<=l)continue}n.push(r)}}n.length<2||o.push(n)}if(!(a.length<2)){var f={};(f=ye.copyAttributesWithClip(f,this.style,["pointList"])).pointList=a;var y=new Sn({style:f,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(y.highlightStyle=this.highlightStyle),y.refOriginalPosition=this.location,y.refDataID=this.data.id,y.isHoverByRefDataID=this.isMultiHover,o.length>0&&(y.holePolygonPointLists=o),this.shapeOptions&&ye.copyAttributesWithClip(y,this.shapeOptions),this.shapes.push(y)}}rectangleToTF(e){var t=this.location,s=new ge(e.x,e.y),r=this.layer.map.getResolution(),i=this.getLocalXY(s),a=new Object;a.r=6,(a=ye.copyAttributesWithClip(a,this.style)).x=i[0]-t[0],a.y=i[1]-t[1]-2*e.width/r,a.width=e.width/r,a.height=e.height/r;var n=new Cn({style:a,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(n.highlightStyle=this.highlightStyle),n.refOriginalPosition=t,n.refDataID=this.data.id,n.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(n,this.shapeOptions),this.shapes.push(n)}geoTextToTF(e){var t=this.location,s=this.getLocalXY(e),r=new Object;r.r=6,(r=ye.copyAttributesWithClip(r,this.style,["x","y","text"])).x=s[0]-t[0],r.y=s[1]-t[1],r.text=e.text;var i=new gn({style:r,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,s=0,r=this.shapes.length;s<r;s++){var i=this.shapes[s];i.refOriginalPosition=e,t.addShape(i)}}getShapesCount(){return this.shapes.length}getLocalXY(e){return this.layer.getLocalXY(e)}}r.Feature.Theme.ThemeVector=Pn;
  1399. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1400. * This program are made available under the terms of the Apache License, Version 2.0
  1401. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1402. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1403. * This program are made available under the terms of the Apache License, Version 2.0
  1404. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1405. class Ln extends(r.mixin(hn,mn)){constructor(e){super(e),e=e||{},this.id=null,this.type="group",this.clipShape=null,this._children=[],this._storage=null,this.__dirty=!0,this.ignore=!1,ye.extend(this,e),this.id=this.id||ye.createUniqueID("smShapeGroup_"),this.CLASS_NAME="SuperMap.LevelRenderer.Group"}destroy(){this.id=null,this.type=null,this.clipShape=null,this._children=null,this._storage=null,this.__dirty=null,this.ignore=null,super.destroy()}children(){return this._children.slice()}childAt(e){return this._children[e]}addChild(e){e!=this&&e.parent!=this&&(e.parent&&e.parent.removeChild(e),this._children.push(e),e.parent=this,this._storage&&this._storage!==e._storage&&(this._storage.addToMap(e),e instanceof Ln&&e.addChildrenToStorage(this._storage)))}removeChild(e){var t=ye.indexOf(this._children,e);this._children.splice(t,1),e.parent=null,this._storage&&(this._storage.delFromMap(e.id),e instanceof Ln&&e.delChildrenFromStorage(this._storage))}eachChild(e,t){for(var s=!!t,r=0;r<this._children.length;r++){var i=this._children[r];s?e.call(t,i):e(i)}}traverse(e,t){for(var s=!!t,r=0;r<this._children.length;r++){var i=this._children[r];s?e.call(t,i):e(i),"group"===i.type&&i.traverse(e,t)}}addChildrenToStorage(e){for(var t=0;t<this._children.length;t++){var s=this._children[t];e.addToMap(s),"group"===s.type&&s.addChildrenToStorage(e)}}delChildrenFromStorage(e){for(var t=0;t<this._children.length;t++){var s=this._children[t];e.delFromMap(s.id),"group"===s.type&&s.delChildrenFromStorage(e)}}modSelf(){this.__dirty=!0}}
  1406. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1407. * This program are made available under the terms of the Apache License, Version 2.0
  1408. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class On{constructor(){this._elements={},this._hoverElements=[],this._roots=[],this._shapeList=[],this._shapeListOffset=0,this.CLASS_NAME="SuperMap.LevelRenderer.Storage"}destroy(){this.dispose(),this._shapeList=null,this._shapeListOffset=null}iterShape(e,t){if(!t){t={hover:!1,normal:"down",update:!1}}if(t.hover)for(var s=0,r=this._hoverElements.length;s<r;s++){var i=this._hoverElements[s];if(i.updateTransform(),e(i))return this}switch(t.update&&this.updateShapeList(),t.normal){case"down":{let t=this._shapeList.length;for(;t--;)if(e(this._shapeList[t]))return this;break}default:for(let t=0,s=this._shapeList.length;t<s;t++)if(e(this._shapeList[t]))return this}return this}getHoverShapes(e){var t=[],s=this._hoverElements.length;for(let e=0;e<s;e++){t.push(this._hoverElements[e]);var r=this._hoverElements[e].hoverConnect;if(r)for(var i,a=0,n=(r=r instanceof Array?r:[r]).length;a<n;a++)(i=r[a].id?r[a]:this.get(r[a]))&&t.push(i)}if(t.sort(On.shapeCompareFunc),e)for(let e=0,s=t.length;e<s;e++)t[e].updateTransform();return t}getShapeList(e){return e&&this.updateShapeList(),this._shapeList}updateShapeList(){this._shapeListOffset=0;var e=this._roots.length;for(let t=0;t<e;t++){let e=this._roots[t];this._updateAndAddShape(e)}this._shapeList.length=this._shapeListOffset;var t=this._shapeList.length;for(let e=0;e<t;e++)this._shapeList[e].__renderidx=e;this._shapeList.sort(On.shapeCompareFunc)}_updateAndAddShape(e,t){if(!e.ignore)if(e.updateTransform(),"group"==e.type){e.clipShape&&(e.clipShape.parent=e,e.clipShape.updateTransform(),t?(t=t.slice()).push(e.clipShape):t=[e.clipShape]);for(var s=0;s<e._children.length;s++){var r=e._children[s];r.__dirty=e.__dirty||r.__dirty,this._updateAndAddShape(r,t)}e.__dirty=!1}else e.__clipShapes=t,this._shapeList[this._shapeListOffset++]=e}mod(e,t){var s=this._elements[e];if(s&&(s.modSelf(),t))if(t.parent||t._storage||t.__startClip){var r={};for(var i in t)"parent"!=i&&"_storage"!=i&&"__startClip"!=i&&t.hasOwnProperty(i)&&(r[i]=t[i]);(new Va).merge(s,r,!0)}else(new Va).merge(s,t,!0);return this}drift(e,t,s){var r=this._elements[e];return r&&(r.needTransform=!0,"horizontal"===r.draggable?s=0:"vertical"===r.draggable&&(t=0),(!r.ondrift||r.ondrift&&!r.ondrift(t,s))&&r.drift(t,s)),this}addHover(e){return e.updateNeedTransform(),this._hoverElements.push(e),this}delHover(){return this._hoverElements=[],this}hasHoverShape(){return this._hoverElements.length>0}addRoot(e){e instanceof Ln&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}delRoot(e){if(void 0===e){for(var t=0;t<this._roots.length;t++){var s=this._roots[t];s instanceof Ln&&s.delChildrenFromStorage(this)}return this._elements={},this._hoverElements=[],void(this._roots=[])}if(e instanceof Array){var r=e.length;for(let t=0;t<r;t++)this.delRoot(e[t])}else{var i;i="string"==typeof e?this._elements[e]:e;var a=(new Va).indexOf(this._roots,i);a>=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof Ln&&i.delChildrenFromStorage(this))}}addToMap(e){return e instanceof Ln&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}get(e){return this._elements[e]}delFromMap(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof Ln&&(t._storage=null)),this}dispose(){this._elements=null,this._roots=null,this._hoverElements=null}static shapeCompareFunc(e,t){return e.zlevel==t.zlevel?e.z==t.z?e.__renderidx-t.__renderidx:e.z-t.z:e.zlevel-t.zlevel}}
  1409. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1410. * This program are made available under the terms of the Apache License, Version 2.0
  1411. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Mn{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,Mn.devicePixelRatio=Math.max(window.devicePixelRatio||1,1),this.CLASS_NAME="SuperMap.LevelRenderer.Painter",this.root.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var s=document.createElement("div");this._domRoot=s,s.style.position="relative",s.style.overflow="hidden",s.style.width=this._width+"px",s.style.height=this._height+"px",this.root.appendChild(s),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=Mn.createDom(ye.createUniqueID("SuperMap.Theme_background_"),"div",this),s.appendChild(this._bgDom),this._bgDom.onselectstart=a,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none",this._bgDom.style["-webkit-touch-callout"]="none";var r=new Nn(ye.createUniqueID("_highLightLayer_"),this);this._layers.hover=r,s.appendChild(r.dom),r.initContext(),r.dom.onselectstart=a,r.dom.style["-webkit-user-select"]="none",r.dom.style["user-select"]="none",r.dom.style["-webkit-touch-callout"]="none";var i=this;function a(){return!1}this.updatePainter=function(e,t){i.refreshShapes(e,t)}}destroy(){this.dispose(),this._zlevelList=null,this._layerConfig=null,this._bgDom=null,this.shapeToImage=null}render(e){return this.refresh(e,!0),this}refresh(e,t){var s=this.storage.getShapeList(!0);return this._paintList(s,t),"function"==typeof e&&e(),this}_paintList(e,t){var s,r,i;for(var a in void 0===t&&(t=!1),this._updateLayerStatus(e),this._layers)"hover"!==a&&(this._layers[a].unusedCount++,this._layers[a].updateTransform());for(var n=[],o=0,l=e.length;o<l;o++){var h=e[o];if(r!==h.zlevel&&(s&&s.needTransform&&i.restore(),i=(s=this.getLayer(h.zlevel)).ctx,r=h.zlevel,s.unusedCount=0,(s.dirty||t)&&s.clear(),s.needTransform&&(i.save(),s.setTransform(i))),i&&h.__startClip){var u=h.__startClip;if(i.save(),u.needTransform){let e=u.transform;pn.Util_matrix.invert(n,e),i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}if(i.beginPath(),u.buildPath(i,u.style),i.clip(),u.needTransform){let e=n;i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}}if((s&&s.dirty||t)&&!h.invisible&&(!h.onbrush||h.onbrush&&!h.onbrush(i,!1)))if(dn.catchBrushException)try{h.brush(i,!1,this.updatePainter)}catch(e){pn.Util_log(e,"brush error of "+h.type,h)}else h.brush(i,!1,this.updatePainter);i&&h.__stopClip&&i.restore(),h.__dirty=!1}i&&s&&s.needTransform&&i.restore();for(let e in this._layers)if("hover"!==e){var c=this._layers[e];c.dirty=!1,1==c.unusedCount&&c.clear()}}getLayer(e){var t=this._layers[e];if(!t){var s=this._zlevelList.length,r=null,i=-1;if(s>0&&e>this._zlevelList[0]){for(i=0;i<s-1&&!(this._zlevelList[i]<e&&this._zlevelList[i+1]>e);i++);r=this._layers[this._zlevelList[i]]}this._zlevelList.splice(i+1,0,e),t=new Nn(ye.createUniqueID("_levelLayer_"+e),this);var a=r?r.dom:this._bgDom;a.nextSibling?a.parentNode.insertBefore(t.dom,a.nextSibling):a.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new Va).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,s={};for(let e in t)"hover"!==e&&(s[e]=t[e].elCount,t[e].elCount=0);for(let s=0;s<e.length;s++){var r=e[s],i=t[r.zlevel];if(i){if(i.elCount++,i.dirty)continue;i.dirty=r.__dirty}}for(let e in t)"hover"!==e&&s[e]!==t[e].elCount&&(t[e].dirty=!0)}refreshShapes(e,t){for(var s=0,r=e.length;s<r;s++){var i=e[s];this.storage.mod(i.id)}return this.refresh(t),this}clear(){for(var e in this._layers)"hover"!=e&&this._layers[e].clear();return this}modLayer(e,t){if(t){this._layerConfig[e]?(new Va).merge(this._layerConfig[e],t,!0):this._layerConfig[e]=t;var s=this._layers[e];s&&(new Va).merge(s,this._layerConfig[e],!0)}}delLayer(e){var t=this._layers[e];t&&(this.modLayer(e,{position:t.position,rotation:t.rotation,scale:t.scale}),t.dom.parentNode.removeChild(t.dom),delete this._layers[e],this._zlevelList.splice((new Va).indexOf(this._zlevelList,e),1))}refreshHover(){this.clearHover();for(var e=this.storage.getHoverShapes(!0),t=0,s=e.length;t<s;t++)this._brushHover(e[t]);return this.storage.delHover(),this}clearHover(){var e=this._layers.hover;return e&&e.clear(),this}resize(){var e=this._domRoot;e.style.display="none";var t=this._getWidth(),s=this._getHeight();if(e.style.display="",this._width!=t||s!=this._height){for(var r in this._width=t,this._height=s,e.style.width=t+"px",e.style.height=s+"px",this._layers)this._layers[r].resize(t,s);this.refresh(null,!0)}return this}clearLayer(e){var t=this._layers[e];t&&t.clear()}dispose(){this.root.innerHTML="",this.root=null,this.storage=null,this._domRoot=null,this._layers=null}getDomHover(){return this._layers.hover.dom}toDataURL(e,t,s){var r=Mn.createDom(ye.createUniqueID("SuperMap.Theme.image_"),"canvas",this);this._bgDom.appendChild(r);var i=r.getContext("2d");1!=Mn.devicePixelRatio&&i.scale(Mn.devicePixelRatio,Mn.devicePixelRatio),i.fillStyle=t||"#fff",i.rect(0,0,this._width*Mn.devicePixelRatio,this._height*Mn.devicePixelRatio),i.fill();var a=this;this.storage.iterShape(function(e){if(!e.invisible&&(!e.onbrush||e.onbrush&&!e.onbrush(i,!1)))if(dn.catchBrushException)try{e.brush(i,!1,a.updatePainter)}catch(t){pn.Util_log(t,"brush error of "+e.type,e)}else e.brush(i,!1,a.updatePainter)},{normal:"up",update:!0});var n=r.toDataURL(e,s);return i=null,this._bgDom.removeChild(r),n}getWidth(){return this._width}getHeight(){return this._height}_getWidth(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientWidth||parseInt(t.width,10))-parseInt(t.paddingLeft,10)-parseInt(t.paddingRight,10)).toFixed(0)-0}_getHeight(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientHeight||parseInt(t.height,10))-parseInt(t.paddingTop,10)-parseInt(t.paddingBottom,10)).toFixed(0)-0}_brushHover(e){var t=this._layers.hover.ctx;if(!e.onbrush||e.onbrush&&!e.onbrush(t,!0)){var s=this.getLayer(e.zlevel);if(s.needTransform&&(t.save(),s.setTransform(t)),dn.catchBrushException)try{e.brush(t,!0,this.updatePainter)}catch(t){pn.Util_log(t,"hoverBrush error of "+e.type,e)}else e.brush(t,!0,this.updatePainter);s.needTransform&&t.restore()}}_shapeToImage(e,t,s,r,i){var a=document.createElement("canvas"),n=a.getContext("2d"),o=i||window.devicePixelRatio||1;a.style.width=s+"px",a.style.height=r+"px",a.setAttribute("width",s*o),a.setAttribute("height",r*o),n.clearRect(0,0,s*o,r*o);var l={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[0,0,0],t.rotation=0,t.scale=[1,1],t&&t.brush(n,!1);var h=new xn({id:e,style:{x:0,y:0,image:a}});return null!=l.position&&(h.position=t.position=l.position),null!=l.rotation&&(h.rotation=t.rotation=l.rotation),null!=l.scale&&(h.scale=t.scale=l.scale),h}_createShapeToImageProcessor(){var e=this;return function(t,s,r,i){return e._shapeToImage(t,s,r,i,Mn.devicePixelRatio)}}updateHoverLayer(e){if(!(e instanceof Array))return this;this.clearHover(),this.storage.delHover();for(var t=0;t<e.length;t++)this.storage.addHover(e[t]),this._brushHover(e[t])}static createDom(e,t,s){var r=document.createElement(t),i=s._width,a=s._height;return r.style.position="absolute",r.style.left=0,r.style.top=0,r.style.width=i+"px",r.style.height=a+"px",r.setAttribute("width",i*Mn.devicePixelRatio),r.setAttribute("height",a*Mn.devicePixelRatio),r.setAttribute("id",e),r}}class Nn extends mn{constructor(e,t){super(e,t),this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=t,this.unusedCount=0,this.config=null,this.dirty=!0,this.elCount=0,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.zoomable=!1,this.panable=!1,this.maxZoom=1/0,this.minZoom=0,this.ctx=null,this.dom=Mn.createDom(ye.createUniqueID("SuperMap.Theme"+e),"canvas",t),this.dom.onselectstart=function(){return!1},this.dom.style["-webkit-user-select"]="none",this.dom.style["user-select"]="none",this.dom.style["-webkit-touch-callout"]="none",this.CLASS_NAME="SuperMap.LevelRenderer.Painter.Layer"}destroy(){this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=null,this.unusedCount=null,this.config=null,this.dirty=null,this.elCount=null,this.clearColor=null,this.motionBlur=null,this.lastFrameAlpha=null,this.zoomable=null,this.panable=null,this.maxZoom=null,this.minZoom=null,this.ctx=null,mn.destroy.apply(this,arguments)}initContext(){this.ctx=this.dom.getContext("2d"),1!=Mn.devicePixelRatio&&this.ctx.scale(Mn.devicePixelRatio,Mn.devicePixelRatio)}createBackBuffer(){this.domBack=Mn.createDom(ye.createUniqueID("SuperMap.Theme.back-"+this.id),"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d"),1!=Mn.devicePixelRatio&&this.ctxBack.scale(Mn.devicePixelRatio,Mn.devicePixelRatio)}resize(e,t){this.dom.style.width=e+"px",this.dom.style.height=t+"px",this.dom.setAttribute("width",e*Mn.devicePixelRatio),this.dom.setAttribute("height",t*Mn.devicePixelRatio),1!=Mn.devicePixelRatio&&this.ctx.scale(Mn.devicePixelRatio,Mn.devicePixelRatio),this.domBack&&(this.domBack.setAttribute("width",e*Mn.devicePixelRatio),this.domBack.setAttribute("height",t*Mn.devicePixelRatio),1!=Mn.devicePixelRatio&&this.ctxBack.scale(Mn.devicePixelRatio,Mn.devicePixelRatio))}clear(){var e=this.dom,t=this.ctx,s=e.width,r=e.height,i=this.clearColor,a=this.motionBlur,n=this.lastFrameAlpha;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,s/Mn.devicePixelRatio,r/Mn.devicePixelRatio)),i?(t.save(),t.fillStyle=this.config.clearColor,t.fillRect(0,0,s/Mn.devicePixelRatio,r/Mn.devicePixelRatio),t.restore()):t.clearRect(0,0,s/Mn.devicePixelRatio,r/Mn.devicePixelRatio),a){var o=this.domBack;t.save(),t.globalAlpha=n,t.drawImage(o,0,0,s/Mn.devicePixelRatio,r/Mn.devicePixelRatio),t.restore()}}}
  1412. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1413. * This program are made available under the terms of the Apache License, Version 2.0
  1414. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class In extends hn{constructor(e,t,s){var r,i;super(e,t,s),this.root=e,this.storage=t,this.painter=s,this._lastX=0,this._lastY=0,this._mouseX=0,this._mouseY=0,this._findHover=null,this._domHover=null,this._findHover=(r=function(e,t,s){var r=this;if(r._draggingTarget&&r._draggingTarget.id==e.id||e.isSilent())return!1;var i=r._event;if(e.isCover(t,s)){if(e.hoverable)if(e.isHoverByRefDataID&&!0===e.isHoverByRefDataID){if(e.refDataID){var a=e.refDataID,n=null;e.refDataHoverGroup&&(n=e.refDataHoverGroup);for(var o=r.storage._shapeList,l=0,h=o.length;l<h;l++){var u=o[l];u.refDataID&&a===u.refDataID&&(n?u.refDataHoverGroup&&n===u.refDataHoverGroup&&r.storage.addHover(u):r.storage.addHover(u))}}}else r.storage.addHover(e);for(var c=e.parent;c;){if(c.clipShape&&!c.clipShape.isCover(r._mouseX,r._mouseY))return!1;c=c.parent}return r._lastHover!=e&&(r._processOutShape(i),r._processDragLeave(i),r._lastHover=e,r._processDragEnter(i)),r._processOverShape(i),r._processDragOver(i),r._hasfound=1,!0}return!1},i=this,function(e,t,s){return r.call(i,e,t,s)}),this._domHover=s.getDomHover(),this.CLASS_NAME="SuperMap.LevelRenderer.Handler";var a={resize:function(e){e=e||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(dn.EVENT.RESIZE,e)},click:function(e){e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<10&&this._dispatchAgency(t,dn.EVENT.CLICK,e),this._mousemoveHandler(e)},dblclick:function(e){e=e||window.event,e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<5&&this._dispatchAgency(t,dn.EVENT.DBLCLICK,e),this._mousemoveHandler(e)},mousewheel:function(e){var t=((e=this._zrenderEventFixed(e)).wheelDelta||-e.detail)>0?1.1:1/1.1,s=this.painter.getLayers(),r=!1;for(var i in s)if("hover"!==i){var a=s[i],n=a.position;if(a.zoomable){a.__zoom=a.__zoom||1;var o=a.__zoom;o*=t,t=(o=Math.max(Math.min(a.maxZoom,o),a.minZoom))/a.__zoom,a.__zoom=o,n[0]-=(this._mouseX-n[0])*(t-1),n[1]-=(this._mouseY-n[1])*(t-1),a.scale[0]*=t,a.scale[1]*=t,a.dirty=!0,r=!0}}r&&this.painter.refresh(),this._dispatchAgency(this._lastHover,dn.EVENT.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){this._clickThreshold++,e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=pn.Util_event.getX(e),this._mouseY=pn.Util_event.getY(e);var t=this._mouseX-this._lastX,s=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var r="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,s),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var i=this.painter.getLayers(),a=!1;for(var n in i)if("hover"!==n){var o=i[n];o.panable&&(r="move",o.position[0]+=t,o.position[1]+=s,a=!0,o.dirty=!0)}a&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?r="move":this._hasfound&&this._lastHover.clickable&&(r="pointer"),this.root.style.cursor=r,this._dispatchAgency(this._lastHover,dn.EVENT.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){var t=(e=this._zrenderEventFixed(e)).toElement||e.relatedTarget;if(t!=this.root)for(;t&&9!=t.nodeType;){if(t==this.root)return void this._mousemoveHandler(e);t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.refreshHover(),this.dispatch(dn.EVENT.GLOBALOUT,e)},mousedown:function(e){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,dn.EVENT.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,dn.EVENT.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&pn.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment<dn.EVENT.touchClickDelay&&(this._mobildFindFixed(e),this._clickHandler(e),t-this._lastClickMoment<dn.EVENT.touchClickDelay/2&&(this._dblclickHandler(e),this._lastHover&&this._lastHover.clickable&&pn.Util_event.stop(e)),this._lastClickMoment=t),this.painter.clearHover()}};function n(e,t){return function(s){return e.call(t,s)}}!function(e){var t=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],s=t.length;for(;s--;){var r=t[s];e["_"+r+"Handler"]=n(a[r],e)}}(this),window.addEventListener?(window.addEventListener("resize",this._resizeHandler),pn.Util_env.os.tablet||pn.Util_env.os.phone?(e.addEventListener("touchstart",this._touchstartHandler),e.addEventListener("touchmove",this._touchmoveHandler),e.addEventListener("touchend",this._touchendHandler)):(e.addEventListener("click",this._clickHandler),e.addEventListener("dblclick",this._dblclickHandler),e.addEventListener("mousewheel",this._mousewheelHandler),e.addEventListener("mousemove",this._mousemoveHandler),e.addEventListener("mousedown",this._mousedownHandler),e.addEventListener("mouseup",this._mouseupHandler)),e.addEventListener("DOMMouseScroll",this._mousewheelHandler),e.addEventListener("mouseout",this._mouseoutHandler)):(window.attachEvent("onresize",this._resizeHandler),e.attachEvent("onclick",this._clickHandler),e.ondblclick=this._dblclickHandler,e.attachEvent("onmousewheel",this._mousewheelHandler),e.attachEvent("onmousemove",this._mousemoveHandler),e.attachEvent("onmouseout",this._mouseoutHandler),e.attachEvent("onmousedown",this._mousedownHandler),e.attachEvent("onmouseup",this._mouseupHandler))}destroy(){this.dispose(),this._lastX=null,this._lastY=null,this._mouseX=null,this._mouseY=null,this._findHover=null,hn.prototype.destroy.apply(this,arguments)}on(e,t){return this.bind(e,t),this}un(e,t){return this.unbind(e,t),this}trigger(e,t){var s=dn.EVENT;switch(e){case s.RESIZE:case s.CLICK:case s.DBLCLICK:case s.MOUSEWHEEL:case s.MOUSEMOVE:case s.MOUSEDOWN:case s.MOUSEUP:case s.MOUSEOUT:this["_"+e+"Handler"](t)}}dispose(){var e=this.root;window.removeEventListener?(window.removeEventListener("resize",this._resizeHandler),pn.Util_env.os.tablet||pn.Util_env.os.phone?(e.removeEventListener("touchstart",this._touchstartHandler),e.removeEventListener("touchmove",this._touchmoveHandler),e.removeEventListener("touchend",this._touchendHandler)):(e.removeEventListener("click",this._clickHandler),e.removeEventListener("dblclick",this._dblclickHandler),e.removeEventListener("mousewheel",this._mousewheelHandler),e.removeEventListener("mousemove",this._mousemoveHandler),e.removeEventListener("mousedown",this._mousedownHandler),e.removeEventListener("mouseup",this._mouseupHandler)),e.removeEventListener("DOMMouseScroll",this._mousewheelHandler),e.removeEventListener("mouseout",this._mouseoutHandler)):(window.detachEvent("onresize",this._resizeHandler),e.detachEvent("onclick",this._clickHandler),e.detachEvent("dblclick",this._dblclickHandler),e.detachEvent("onmousewheel",this._mousewheelHandler),e.detachEvent("onmousemove",this._mousemoveHandler),e.detachEvent("onmouseout",this._mouseoutHandler),e.detachEvent("onmousedown",this._mousedownHandler),e.detachEvent("onmouseup",this._mouseupHandler)),this.root=null,this._domHover=null,this.storage=null,this.painter=null,this.un()}_processDragStart(e){var t=this._lastHover;if(this._isMouseDown&&t&&t.draggable&&!this._draggingTarget&&this._mouseDownTarget==t){if(t.dragEnableTime&&new Date-this._lastMouseDownMoment<t.dragEnableTime)return;var s=t;this._draggingTarget=s,this._isDragging=1,s.invisible=!0,this.storage.mod(s.id),this._dispatchAgency(s,dn.EVENT.DRAGSTART,e),this.painter.refresh()}}_processDragEnter(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,dn.EVENT.DRAGENTER,e,this._draggingTarget)}_processDragOver(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,dn.EVENT.DRAGOVER,e,this._draggingTarget)}_processDragLeave(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,dn.EVENT.DRAGLEAVE,e,this._draggingTarget)}_processDrop(e){this._draggingTarget&&(this._draggingTarget.invisible=!1,this.storage.mod(this._draggingTarget.id),this.painter.refresh(),this._dispatchAgency(this._lastHover,dn.EVENT.DROP,e,this._draggingTarget))}_processDragEnd(e){this._draggingTarget&&(this._dispatchAgency(this._draggingTarget,dn.EVENT.DRAGEND,e),this._lastHover=null),this._isDragging=0,this._draggingTarget=null}_processOverShape(e){this._dispatchAgency(this._lastHover,dn.EVENT.MOUSEOVER,e)}_processOutShape(e){this._dispatchAgency(this._lastHover,dn.EVENT.MOUSEOUT,e)}_dispatchAgency(e,t,s,r){var i="on"+t,a={type:t,event:s,target:e,cancelBubble:!1},n=e;for(r&&(a.dragged=r);n&&(n[i]&&(a.cancelBubble=n[i](a)),n.dispatch(t,a),n=n.parent,!a.cancelBubble););e?a.cancelBubble||this.dispatch(t,a):r||this.dispatch(t,{type:t,event:s})}_iterateAndFindHover(){for(var e,t=pn.Util_matrix.create(),s=this.storage.getShapeList(),r=[0,0],i=s.length-1;i>=0;i--){var a=s[i];if(void 0!==a.zlevel&&(e=this.painter.getLayer(a.zlevel,e),r[0]=this._mouseX,r[1]=this._mouseY,e.needTransform&&(pn.Util_matrix.invert(t,e.transform),pn.Util_vector.applyTransform(r,r,t))),this._findHover(a,r[0],r[1]))break}}_mobildFindFixed(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var s=0;!this._lastHover&&s<t.length;s++){var r=t[s];r.x&&(this._mouseX+=r.x),r.y&&(this._mouseX+=r.y),this._iterateAndFindHover()}this._lastHover&&(e.zrenderX=this._mouseX,e.zrenderY=this._mouseY)}_zrenderEventFixed(e,t){if(e.zrenderFixed)return e;if(t){var s="touchend"!=e.type?e.targetTouches[0]:e.changedTouches[0];if(s){var r=this.root.getBoundingClientRect();e.zrenderX=s.clientX-r.left,e.zrenderY=s.clientY-r.top}}else{var i=(e=e||window.event).toElement||e.relatedTarget||e.srcElement||e.target;i&&i!=this._domHover&&(e.zrenderX=(void 0!==e.offsetX?e.offsetX:e.layerX)+i.offsetLeft,e.zrenderY=(void 0!==e.offsetY?e.offsetY:e.layerY)+i.offsetTop)}return e.zrenderFixed=1,e}getLastHoverOne(){return this._lastHover?this._lastHover:null}}
  1415. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1416. * This program are made available under the terms of the Apache License, Version 2.0
  1417. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Fn{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Animation.easing"}destroy(){}Linear(e){return e}QuadraticIn(e){return e*e}QuadraticOut(e){return e*(2-e)}QuadraticInOut(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}CubicIn(e){return e*e*e}CubicOut(e){return--e*e*e+1}CubicInOut(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}QuarticIn(e){return e*e*e*e}QuarticOut(e){return 1- --e*e*e*e}QuarticInOut(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}QuinticIn(e){return e*e*e*e*e}QuinticOut(e){return--e*e*e*e*e+1}QuinticInOut(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}SinusoidalIn(e){return 1-Math.cos(e*Math.PI/2)}SinusoidalOut(e){return Math.sin(e*Math.PI/2)}SinusoidalInOut(e){return.5*(1-Math.cos(Math.PI*e))}ExponentialIn(e){return 0===e?0:Math.pow(1024,e-1)}ExponentialOut(e){return 1===e?1:1-Math.pow(2,-10*e)}ExponentialInOut(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}CircularIn(e){return 1-Math.sqrt(1-e*e)}CircularOut(e){return Math.sqrt(1- --e*e)}CircularInOut(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}ElasticIn(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),-s*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))}ElasticOut(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),s*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)}ElasticInOut(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),(e*=2)<1?s*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:s*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)}BackIn(e){var t=1.70158;return e*e*((t+1)*e-t)}BackOut(e){var t=1.70158;return--e*e*((t+1)*e+t)+1}BackInOut(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}BounceIn(e){return 1-this.BounceOut(1-e)}BounceOut(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}BounceInOut(e){return e<.5?.5*this.BounceIn(2*e):.5*this.BounceOut(2*e-1)+.5}}
  1418. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1419. * This program are made available under the terms of the Apache License, Version 2.0
  1420. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Rn{constructor(e){this._targetPool=e.target||{},this._targetPool instanceof Array||(this._targetPool=[this._targetPool]),this._life=e.life||1e3,this._delay=e.delay||0,this._startTime=(new Date).getTime()+this._delay,this._endTime=this._startTime+1e3*this._life,this.loop=void 0!==e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Clip"}destroy(){}step(e){var t=new Fn,s=(e-this._startTime)/this._life;if(!(s<0)){s=Math.min(s,1);var r="string"==typeof this.easing?t[this.easing]:this.easing,i="function"==typeof r?r(s):s;return this.fire("frame",i),1==s?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}}restart(){var e=((new Date).getTime()-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap}fire(e,t){for(var s=0,r=this._targetPool.length;s<r;s++)this["on"+e]&&this["on"+e](this._targetPool[s],t)}}
  1421. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1422. * This program are made available under the terms of the Apache License, Version 2.0
  1423. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Dn extends hn{constructor(e){super(e),e=e||{},this.stage={},this.onframe=function(){},this._clips=[],this._running=!1,this._time=0,ye.extend(this,e),this.CLASS_NAME="SuperMap.LevelRenderer.Animation"}add(e){this._clips.push(e)}remove(e){var t=(new Va).indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,s=this._clips,r=s.length,i=[],a=[];for(let t=0;t<r;t++){var n=s[t],o=n.step(e);o&&(i.push(o),a.push(n))}this.stage.update&&this.stage.update();for(let e=0;e<r;)s[e]._needsRemove?(s[e]=s[r-1],s.pop(),r--):e++;r=i.length;for(let e=0;e<r;e++)a[e].fire(i[e]);this._time=e,this.onframe(t),this.dispatch("frame",t)}start(){var e=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},t=this;this._running=!0,this._time=(new Date).getTime(),e(function s(){t._running&&(t._update(),e(s))})}stop(){this._running=!1}clear(){this._clips=[]}animate(e,t){var s=new kn(e,(t=t||{}).loop,t.getter,t.setter);return s.animation=this,s}static _interpolateNumber(e,t,s){return(t-e)*s+e}static _interpolateArray(e,t,s,r,i){var a=e.length;if(1==i)for(let i=0;i<a;i++)r[i]=Dn._interpolateNumber(e[i],t[i],s);else{var n=e[0].length;for(let i=0;i<a;i++)for(let a=0;a<n;a++)r[i][a]=Dn._interpolateNumber(e[i][a],t[i][a],s)}}static _isArrayLike(e){switch(typeof e){case"undefined":case"string":return!1}return void 0!==e.length}static _catmullRomInterpolateArray(e,t,s,r,i,a,n,o,l){var h=e.length;if(1==l)for(let l=0;l<h;l++)o[l]=Dn._catmullRomInterpolate(e[l],t[l],s[l],r[l],i,a,n);else{var u=e[0].length;for(let l=0;l<h;l++)for(var c=0;c<u;c++)o[l][c]=Dn._catmullRomInterpolate(e[l][c],t[l][c],s[l][c],r[l][c],i,a,n)}}static _catmullRomInterpolate(e,t,s,r,i,a,n){var o=.5*(s-e),l=.5*(r-t);return(2*(t-s)+o+l)*n+(-3*(t-s)-2*o-l)*a+o*i+t}static _cloneValue(e){var t=Array.prototype.slice;if(Dn._isArrayLike(e)){var s=e.length;if(Dn._isArrayLike(e[0])){for(var r=[],i=0;i<s;i++)r.push(t.call(e[i]));return r}return t.call(e)}return e}static rgba2String(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}}class kn{constructor(e,t,s,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=s||function(e,t){return e[t]},this._setter=r||function(e,t,s){e[t]=s},this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[],this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Animator"}when(e,t){for(var s in t)this._tracks[s]||(this._tracks[s]=[],0!==e&&this._tracks[s].push({time:0,value:Dn._cloneValue(this._getter(this._target,s))})),this._tracks[s].push({time:parseInt(e,10),value:t[s]});return this}during(e){return this._onframeList.push(e),this}start(e){var t=this,s=this._setter,r=this._getter,i=t._onframeList.length,a="spline"===e,n=function(){if(t._clipCount--,0===t._clipCount){t._tracks={};for(var e=t._doneList.length,s=0;s<e;s++)t._doneList[s].call(t)}},o=function(o,l){var h=o.length;if(h){var u=o[0].value,c=Dn._isArrayLike(u),d=!1,p=c&&Dn._isArrayLike(u[0])?2:1;o.sort(function(e,t){return e.time-t.time});var m=o[h-1].time,f=[],y=[];for(let e=0;e<h;e++){f.push(o[e].time/m);var g=o[e].value;"string"==typeof g&&(0===(g=pn.Util_color.toArray(g)).length&&(g[0]=g[1]=g[2]=0,g[3]=1),d=!0),y.push(g)}var v,S,b,x,C,T,_,E=0,A=0;if(d)var w=[0,0,0,0];var P=new Rn({target:t._target,life:m,loop:t._loop,delay:t._delay,onframe:function(e,n){if(n<A){for(v=Math.min(E+1,h-1),S=v;S>=0&&!(f[S]<=n);S--);S=Math.min(S,h-2)}else{for(S=E;S<h&&!(f[S]>n);S++);S=Math.min(S-1,h-2)}E=S,A=n;var o=f[S+1]-f[S];if(0!==o){if(b=(n-f[S])/o,a)if(C=y[S],x=y[0===S?S:S-1],T=y[S>h-2?h-1:S+1],_=y[S>h-3?h-1:S+2],c)Dn._catmullRomInterpolateArray(x,C,T,_,b,b*b,b*b*b,r(e,l),p);else{let t;t=d?Dn.rgba2String(w):Dn._catmullRomInterpolate(x,C,T,_,b,b*b,b*b*b),s(e,l,t)}else if(c)Dn._interpolateArray(y[S],y[S+1],b,r(e,l),p);else{let t;d?(Dn._interpolateArray(y[S],y[S+1],b,w,1),t=Dn.rgba2String(w)):t=Dn._interpolateNumber(y[S],y[S+1],b),s(e,l,t)}for(S=0;S<i;S++)t._onframeList[S](e,n)}},ondestroy:n});e&&"spline"!==e&&(P.easing=e),t._clipList.push(P),t._clipCount++,t.animation.add(P)}};for(var l in this._tracks)o(this._tracks[l],l);return this}stop(){for(var e=0;e<this._clipList.length;e++){var t=this._clipList[e];this.animation.remove(t)}this._clipList=[]}delay(e){return this._delay=e,this}done(e){return e&&this._doneList.push(e),this}}
  1424. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1425. * This program are made available under the terms of the Apache License, Version 2.0
  1426. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Bn{constructor(e,t){this.id=e,this.storage=new On,this.painter=new Mn(t,this.storage),this.handler=new In(t,this.storage,this.painter),this.animatingElements=[],this.animation=new Dn({stage:{update:Bn.getFrameCallback(this)}}),this._needsRefreshNextFrame=!1,this.animation.start(),this.CLASS_NAME="SuperMap.LevelRenderer.Render"}destroy(){this.id=null,this.storage=null,this.painter=null,this.handler=null,this.animatingElements=null,this.animation=null,this._needsRefreshNextFrame=null}getId(){return this.id}addShape(e){return this.storage.addRoot(e),this}addGroup(e){return this.storage.addRoot(e),this}delShape(e){return this.storage.delRoot(e),this}delGroup(e){return this.storage.delRoot(e),this}modShape(e,t){return this.storage.mod(e,t),this}modGroup(e,t){return this.storage.mod(e,t),this}modLayer(e,t){return this.painter.modLayer(e,t),this}addHoverShape(e){return this.storage.addHover(e),this}render(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this}refresh(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this}refreshNextFrame(){return this._needsRefreshNextFrame=!0,this}refreshHover(e){return this.painter.refreshHover(e),this}refreshShapes(e,t){return this.painter.refreshShapes(e,t),this}resize(){return this.painter.resize(),this}animate(e,t,s){if("string"==typeof e&&(e=this.storage.get(e)),e){var r;if(t){for(var i=t.split("."),a=e,n=0,o=i.length;n<o;n++)a&&(a=a[i[n]]);a&&(r=a)}else r=e;if(!r)return void pn.Util_log('Property "'+t+'" is not existed in element '+e.id);var l=this.animatingElements;return void 0===e.__aniCount&&(e.__aniCount=0),0===e.__aniCount&&l.push(e),e.__aniCount++,this.animation.animate(r,{loop:s}).done(function(){if(e.__aniCount--,0===e.__aniCount){var t=(new Va).indexOf(l,e);l.splice(t,1)}})}pn.Util_log("Element not existed")}clearAnimation(){this.animation.clear()}getWidth(){return this.painter.getWidth()}getHeight(){return this.painter.getHeight()}toDataURL(e,t,s){return this.painter.toDataURL(e,t,s)}shapeToImage(e,t,s){var r=ye.createUniqueID("SuperMap.LevelRenderer.ToImage_");return this.painter.shapeToImage(r,e,t,s)}on(e,t){return this.handler.on(e,t),this}un(e,t){return this.handler.un(e,t),this}trigger(e,t){return this.handler.trigger(e,t),this.handler.dispatch(e,t),this}clear(){return this.storage.delRoot(),this.painter.clear(),this}dispose(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=null,this.animatingElements=null,this.storage=null,this.painter=null,this.handler=null}updateHoverShapes(e){return this.painter.updateHoverLayer(e),this}getAllShapes(){return this.storage._shapeList}clearAll(){return this.clear(),this.painter.clearHover(),this}getHoverOne(){return this.handler.getLastHoverOne()}static getFrameCallback(e){return function(){var t=e.animatingElements;if(t instanceof Array){for(var s=0,r=t.length;s<r;s++)e.storage.mod(t[s].id);(t.length||e._needsRefreshNextFrame)&&e.refresh()}}}}
  1427. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1428. * This program are made available under the terms of the Apache License, Version 2.0
  1429. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Gn{constructor(){Gn._instances={},Gn.Tool={},this.version="2.0.4",this.CLASS_NAME="SuperMap.LevelRenderer"}destroy(){this.dispose(),this.version=null}init(e){var t=new Bn(ye.createUniqueID("LRenderer_"),e);return Gn._instances[t.id]=t,t}dispose(e){if(e)e.dispose(),this.delInstance(e.id);else{for(var t in Gn._instances)Gn._instances[t].dispose();Gn._instances={}}return this}getInstance(e){return Gn._instances[e]}delInstance(e){return delete Gn._instances[e],this}}r.LevelRenderer=Gn;
  1430. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1431. * This program are made available under the terms of the Apache License, Version 2.0
  1432. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1433. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1434. * This program are made available under the terms of the Apache License, Version 2.0
  1435. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1436. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1437. * This program are made available under the terms of the Apache License, Version 2.0
  1438. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1439. const Un={EXCEL:"EXCEL",CSV:"CSV",ISERVER:"ISERVER",GEOJSON:"GEOJSON",JSON:"JSON"},Jn={fileMaxSize:10485760};
  1440. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1441. * This program are made available under the terms of the Apache License, Version 2.0
  1442. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1443. class Hn{constructor(e){this.FileTypes=Un,this.FileConfig=Jn,this.loadFileObject=e&&e.loadFileObject?e.loadFileObject:[]}set(e,t){this[e]=t}get(e){return this[e]}}
  1444. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1445. * This program are made available under the terms of the Apache License, Version 2.0
  1446. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class jn{constructor(){this._initView()}_initView(){const e=document.createElement("div");e.hidden=!0,e.setAttribute("class","component-messageboxcontainer component-border-bottom-orange");const t=document.createElement("div");t.setAttribute("class","icon"),this.icon=document.createElement("span"),this.icon.setAttribute("class","supermapol-icons-message-warning"),t.appendChild(this.icon),e.appendChild(t);const s=document.createElement("div");s.setAttribute("class","component-messagebox"),s.innerHTML="",e.appendChild(s),this.messageBox=s;const r=document.createElement("div");r.setAttribute("class","component-messagebox__cancelbtncontainer");const i=document.createElement("button");i.setAttribute("class","component-messagebox__cancelBtn"),i.innerHTML="x",i.onclick=this.closeView.bind(this),r.appendChild(i),e.appendChild(r),this.messageBoxContainer=e,document.body.appendChild(this.messageBoxContainer)}closeView(){this.messageBoxContainer.hidden=!0}showView(e,t="warring"){"success"===t?(this.icon.setAttribute("class","supermapol-icons-message-success"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-green")):"failure"===t?(this.icon.setAttribute("class","supermapol-icons-message-failure"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-red")):"warring"===t&&(this.icon.setAttribute("class","supermapol-icons-message-warning"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-orange")),this.messageBox.innerHTML=e,this.messageBoxContainer.hidden=!1}}r.Components.MessageBox=jn;var Vn=s(9),Wn=s.n(Vn);
  1447. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1448. * This program are made available under the terms of the Apache License, Version 2.0
  1449. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1450. let zn={code:null,defaultCode:"en-US",getCode:function(){return r.Lang.code||r.Lang.setCode(),r.Lang.code},setCode:function(){var e=this.getLanguageFromCookie();e?r.Lang.code=e:(e=r.Lang.defaultCode,0===(e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),r.Lang.code=e)},getLanguageFromCookie(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){for(var s=e[t];" "===s.charAt(0);)s=s.substring(1);if(-1!==s.indexOf("language="))return s.substring("language=".length,s.length)}return""},i18n:function(e){var t=r.Lang[r.Lang.getCode()],s=t&&t[e];return s||(s=e),s}};r.Lang=zn,r.i18n=r.Lang.i18n;var qn=s(5),Yn=s.n(qn);
  1451. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1452. * This program are made available under the terms of the Apache License, Version 2.0
  1453. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1454. let Qn={rABS:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsBinaryString,rABF:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsArrayBuffer,rAT:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsText,readFile(e,t,s,r,i){Un.JSON===e||Un.GEOJSON===e?this.readTextFile(t,s,r,i):Un.EXCEL!==e&&Un.CSV!==e||this.readXLSXFile(t,s,r,i)},readTextFile(e,t,s,r){let i=new FileReader;i.onloadend=function(e){t&&t.call(r,e.target.result)},i.onerror=function(e){s&&s.call(r,e)},this.rAT?i.readAsText(e.file,"utf-8"):i.readAsBinaryString(e.file)},readXLSXFile(e,t,s,r){let i=new FileReader;i.onloadend=function(e){let i=new Uint8Array(e.target.result),a=Yn.a.read(i,{type:"array"});try{if(a&&a.SheetNames&&a.SheetNames.length>0){let e=a.SheetNames[0],s=Yn.a.utils.sheet_to_csv(a.Sheets[e]);t&&t.call(r,s)}}catch(e){s&&s.call(r,e)}},i.onerror=function(e){s&&s.call(r,e)},this.rABF&&i.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,s,r,i){let a=null;if("EXCEL"===e||"CSV"===e)a=this.processExcelDataToGeoJson(t),s&&s.call(i,a);else if("JSON"===e||"GEOJSON"===e){let e=t;"string"==typeof e&&(e=JSON.parse(e)),"ISERVER"===e.type?a=e.data.recordsets[0].features:"FeatureCollection"===e.type?a=e:r&&r.call(i,zn.i18n("msg_dataInWrongGeoJSONFormat")),s&&s.call(i,a)}else r&&r.call(i,zn.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),s=t.colTitles,r=-1,i=-1;for(let e=0,t=s.length;e<t;e++)this.isXField(s[e])&&(r=e),this.isYField(s[e])&&(i=e);let a=[];for(let e=0,s=t.rows.length;e<s;e++){let s=t.rows[e],n=Number(s[r]),o=Number(s[i]),l={};for(let s in t.colTitles){l[t.colTitles[s]]=t.rows[e][s]}let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};a.push(h)}return a},isXField(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t||"x坐标"===t},isYField(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t||"y坐标"===t},string2Csv(e,t){let s=e.split("\n"),r={};r.colTitles=t?[]:s[0].split(","),r.rows=[];for(let e=t?0:1;e<s.length;e++)s[e]&&r.rows.push(s[e].split(","));return r}};r.Components.FileReaderUtil=Qn;
  1455. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1456. * This program are made available under the terms of the Apache License, Version 2.0
  1457. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1458. class Xn{constructor(e){this.datasets=e,this.EVENT_TYPES=["getdatafailed"],this.events=new Ie(this,null,this.EVENT_TYPES)}getDatasetInfo(e){let t=this.datasets.url,s=this;Ze.get(t).then(function(e){return e.json()}).then(function(t){if(t.datasetInfo){let r=t.datasetInfo;s.datasetsInfo={dataSourceName:r.dataSourceName,datasetName:r.name,mapName:t.name},e({result:s.datasetsInfo})}}).catch(function(e){console.log(e),s._fireFailedEvent(e)})}getDataFeatures(e,t){let s,i,a,n=e.result,o={name:n.datasetName+"@"+n.dataSourceName};Object.assign(o,this.datasets.queryInfo),s=new r.FilterParameter(o),i=new r.GetFeaturesBySQLParameters({queryParameter:s,datasetNames:[n.dataSourceName+":"+n.datasetName],fromIndex:0,toIndex:1e5}),(a=new r.GetFeaturesBySQLService(n.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(i)}getLayerFeatures(e,t){let s,i,a,n=e.result,o={name:n.mapName};Object.assign(o,this.datasets.queryInfo),s=new r.FilterParameter(o),i=new r.QueryBySQLParameters({queryParams:[s],expectCount:1e5}),(a=new r.QueryBySQLService(n.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(i)}getDataInfoByIptl(e){this.getServiceInfo(this.datasets.url,e)}getServiceInfo(e,t){let s=this;Ze.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(r=>{if(!1!==r.succeed)if(r.dataItemServices&&r.dataItemServices.length>0){let i;r.dataItemServices.forEach(r=>{if("RESTDATA"===r.serviceType&&"PUBLISHED"===r.serviceStatus)i=r;else{if("RESTMAP"!==r.serviceType||"PUBLISHED"!==r.serviceStatus)return void s.getDatafromContent(e,t);i=r}}),i&&s.getDatafromRest(i.serviceType,i.address,t)}else s.getDatafromContent(e,t);else s._fireFailedEvent(r)}).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromContent(e,t){let s={result:{}},r=this;e+="/content.json?pageSize=9999999&currentPage=1",Ze.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(e=>{if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(zn.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);s.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);s.result.features={type:"FeatureCollection",features:t}}t(s,"content")}}else r._fireFailedEvent(e)},this).catch(e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRest(e,t,s){let r=this,i=this.datasets.withCredentials;if("RESTDATA"===e){let e,a,n=`${t}/data/datasources`;Ze.get(n,null,{withCredentials:i}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],n=`${t}/data/datasources/${e}/datasets`,Ze.get(n,null,{withCredentials:i}).then(e=>e.json()).then(i=>(a=i.datasetNames[0],r.getDatafromRestData(`${t}/data`,[e+":"+a],s),[e+":"+a])).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}else{let e,a,n,o=`${t}/maps`;Ze.get(o,null,{withCredentials:i}).then(e=>e.json()).then(l=>{e=l[0].name,n=l[0].path,o=o=`${t}/maps/${e}/layers`,Ze.get(o,null,{withCredentials:i}).then(e=>e.json()).then(e=>(a=e[0].subLayers.layers[0].caption,r.getDatafromRestMap(a,n,s),a)).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}}getDatafromRestData(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{s(e,"RESTDATA")},e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRestMap(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{s(e,"RESTMAP")},e=>{console.log(e),r._fireFailedEvent(e)})}_getFeatureBySQL(e,t,s,r,i){let a,n,o,l={name:t.join().replace(":","@")};Object.assign(l,s),a=new It(l),o=new ur({queryParameter:a,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(n=new cr(e,{eventListeners:{processCompleted:e=>{r&&r(e)},processFailed:e=>{i&&i(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,s,r,i,a,n,l,h,u){var c,d,p={name:t};Object.assign(p,s),c=new It(p),r&&(c.fields=r);var m={queryParams:[c]};u&&(m.queryOption=o.ATTRIBUTE),l&&(m.startRecord=l),h&&(m.expectCount=h),i&&(m.prjCoordSys={epsgCode:i}),d=new xi(m),this._queryBySQL(e,d,e=>{"processCompleted"===e.type?a(e):n(e)})}_queryBySQL(e,t,s,r){new Ci(e,{eventListeners:{scope:this,processCompleted:s,processFailed:s},format:this._processFormat(r)}).processAsync(t)}_processFormat(e){return e||i.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,s=-1,r=-1;for(let e=0,i=t.length;e<i;e++)Qn.isXField(t[e])&&(s=e),Qn.isYField(t[e])&&(r=e);let i=[];for(let t=0,a=e.rows.length;t<a;t++){let a=e.rows[t],n=Number(a[s]),o=Number(a[r]),l={};for(let s in e.colTitles){l[e.colTitles[s]]=e.rows[t][s]}l.index=t+"";let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};i.push(h)}return i}_fireFailedEvent(e){let t=e?{error:e,message:zn.i18n("msg_getdatafailed")}:{message:zn.i18n("msg_getdatafailed")};this.events.triggerEvent("getdatafailed",t)}}
  1459. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1460. * This program are made available under the terms of the Apache License, Version 2.0
  1461. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Kn{constructor(e){this.datasets=e.datasets,this.xField=[],this.yField=[],this.grid={top:"50px",bottom:"50px",left:"50px",right:"60px"},this.chartType=e.type||"bar",this._initXYField(e.chartOptions),this.EVENT_TYPES=["getdatafailed"],this.events=new Ie(this,null,this.EVENT_TYPES)}_initXYField(e){let t=this;e&&e.length>0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}getDatasetInfo(e){this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new Xn(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:e=>{this.events.triggerEvent("getdatafailed",e)}}))}_getDatasetInfoSuccess(e){let t=this.datasets.url,s=t.indexOf("rest");if(s>0){let r=t.indexOf("/",s+5),i=t.substring(s+5,r),a=t.substring(0,s+4)+"/data";if("maps"===i){let i=t.indexOf("/",r+1),n=t.substring(r+1,i);a=t.substring(0,s+4)+"/maps/"+n,e.result.dataUrl=a,this._getLayerFeatures(e)}else"data"===i&&(e.result.dataUrl=a,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let s=this;"RESTMAP"===t?s._getChartDatasFromLayer(e):s._getChartDatas(e)}_getDataFeatures(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}_getLayerFeatures(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}_getChartDatas(e){if(e){this.features=e.result.features;let t=this.features.features,s={};if(t.length){let e=t[0],r=[],i=[];for(let t in e.properties)r.push(t),i.push(this._getDataType(e.properties[t]));s={features:t,fieldCaptions:r,fieldTypes:i,fieldValues:[]};for(let e in i){let r=[];for(let i in t){let a=t[i],n=s.fieldCaptions[e],o=a.properties[n];r.push(o)}s.fieldValues.push(r)}this.createChart(s)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],s=t.features.features;this.features=t.features;let r={};if(s.length){r={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in r.fieldCaptions){let t=[];for(let i in s){let a=s[i],n=r.fieldCaptions[e],o=a.properties[n];t.push(o)}r.fieldValues.push(t)}this.createChart(r)}}}_createChartOptions(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}changeType(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}updateData(e,t,s){this.updateChart=s,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}_updateDataSuccess(e){let t=this._createChartOptions(e);this.updateChart(t)}updateChartOptions(e,t){if(this.calculatedData){let s=this.grid,r=this._createChartSeries(this.calculatedData,e),i=[];for(let e in this.calculatedData.XData)i.push({value:this.calculatedData.XData[e].fieldsData});let a={type:"category",name:this.xField[0].name||"X",data:i,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},n={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},o={formatter:"{b0}: {c0}"},l="#404a59";return t&&(t.grid&&(s=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:s,series:r,xAxis:a,yAxis:n,tooltip:o}}}_createChartDatas(e){let t=0,s=[],r=e.fieldCaptions,i=this;r.forEach(function(e,s){i.xField[0]&&e===i.xField[0].field&&(t=s)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(i.yFieldName=i.yFieldName+","),i.yFieldName=i.yFieldName+e.name,r.forEach(function(t,r){t===e.field&&s.push(r)})});let a=this._getAttrData(e,t),n=[];if(s.length>0)s.forEach(function(t){let s=[];for(let r in e.fieldValues[t])s.push({value:e.fieldValues[t][r]});n.push(s)});else{let e=[],t=[],s=a.length;for(let r=0;r<s;r++){let s=!1;for(let i=0,n=t.length;i<n;i++)if(a[r].fieldsData===t[i].fieldsData){e[i].value++,t[i].recordIndexs.push(r),s=!0;break}s||a[r].fieldsData&&(t.push({fieldsData:a[r].fieldsData,recordIndexs:[r]}),e.push({value:1}))}a=t,n=[e]}return{XData:a,YData:n}}_getAttrData(e,t){0===t&&(this.xField=[{field:e.fieldCaptions[t],name:e.fieldCaptions[t]}]);let s=[];for(let r=0,i=e.fieldValues[t].length;r<i;r++){let i=e.fieldValues[t][r];s.push({recordIndexs:r,fieldsData:i})}return s}_createChartSeries(e,t){let s=[];return e.YData.forEach(function(e){let r=0,i=[];for(let t of e)r=t.value,i.push({value:r});let a={type:t,data:i,name:"y"};s.push(a)}),s}_isDate(e){return/((^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(10|12|0?[13578])([-\/\._])(3[01]|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(11|0?[469])([-\/\._])(30|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(0?2)([-\/\._])(2[0-8]|1[0-9]|0?[1-9])$)|(^([2468][048]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([3579][26]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][13579][26])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][13579][26])([-\/\._])(0?2)([-\/\._])(29)$))/gi.test(e)}_isNumber(e){let t=Number(e);return 0===t||!isNaN(t)}_getDataType(e){if(null!==e&&void 0!==e&&""!==e){if(this._isDate(e))return"DATE";if(this._isNumber(e))return"NUMBER"}return"STRING"}_checkUrl(e){let t;return t=!(""===e||!this._isMatchUrl(e))&&(!/^http[s]?:\/\/localhost/.test(e)&&!/^http[s]?:\/\/127.0.0.1/.test(e))}_isMatchUrl(e){return new RegExp("(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]").test(e)}getStyle(){return{grid:this.grid,tooltip:this.tooltip,backgroundColor:this.backgroundColor}}getFeatures(){return this.features}setStyle(e){return this.updateChartOptions(this.chartType,e)}}r.Components.ChartViewModel=Kn;
  1462. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1463. * This program are made available under the terms of the Apache License, Version 2.0
  1464. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1465. class Zn{constructor(e,t){this.domID=e,this.chartType=t.type||"bar",t.datasets.type=t.datasets.type||"iServer",t.datasets.withCredentials=t.datasets.withCredentials||!1,this.viewModel=new Kn(t),this._fillDataToView()}onAdd(e){this.addChart=e}_fillDataToView(){let e=new jn;this.viewModel.getDatasetInfo(this._createChart.bind(this)),this.viewModel.events.on({getdatafailed:t=>{e.showView(t.message)}})}getStyle(){return this.viewModel.getStyle()}getFeatures(){return this.viewModel.getFeatures()}setStyle(e){let t=this.viewModel.setStyle(e);this._updateChart(t)}changeType(e){if(this.chartType!==e){this.chartType=e;let t=this.viewModel.changeType(e);this._updateChart(t)}}updateData(e,t){let s=this;this.viewModel.updateData(e,t,function(e){s._updateChart(e),s.addChart&&s.addChart()})}_createChart(e){this.echart=Wn.a.init(document.getElementById(this.domID),null,{renderer:"canvas"});let t=this.viewModel._createChartOptions(e);this.echart.setOption(t),this.addChart&&this.addChart()}_updateChart(e){this.echart&&(this.echart.clear(),this.echart.setOption(e))}}r.Components.Chart=Zn;
  1466. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1467. * This program are made available under the terms of the Apache License, Version 2.0
  1468. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1469. class $n{constructor(e){e=e||{},this.id=e.id?e.id:null,this.rootContainer=null}getElement(){return this.id&&(this.rootContainer.id=this.id),this.rootContainer}_initView(){}showView(){this.rootContainer.hidden=!1}closeView(){this.rootContainer.hidden=!0}}r.Components.TemplateBase=$n;
  1470. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1471. * This program are made available under the terms of the Apache License, Version 2.0
  1472. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1473. class eo extends $n{constructor(e){super(e);let t=e.title?e.title:"";this._initView(t)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-container");const s=document.createElement("div");s.setAttribute("class","component-title");const r=document.createElement("div");r.innerHTML=e,s.appendChild(r),t.appendChild(s);const i=document.createElement("div");return i.setAttribute("class","component-content"),t.appendChild(i),this.content=i,this.rootContainer=t,t}getContentElement(){return this.content}appendContent(e){this.content.appendChild(e)}}r.Components.CommonContainer=eo;
  1474. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1475. * This program are made available under the terms of the Apache License, Version 2.0
  1476. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1477. class to extends $n{constructor(e){super(e),this._initView(e)}_initView(e){let t=this._createElement("div","component-selecttool");if(e.labelName){this._createElement("label","component-selecttool__lable--describe",t).innerHTML=e.labelName}let s=this._createElement("div","component-selecttool--chart",t);s.setAttribute("tabindex","1");let r=this._createElement("div","component-selecttool__name",s);r.title=e.optionsArr[0],r.innerHTML=e.optionsArr[0];let i=this._createElement("div","component-selecttool__trianglebtn--chart",s),a=this._createElement("div","component-triangle-down-img",i),n=this._createElement("div","component-selecttool__content",s),o=this._createElement("div","component-selecttool__content--chart",n),l=this._createElement("div","component-selecttool__scrollarea__content",o);l.setAttribute("tabindex","1"),this.createOptions(l,e.optionsArr),this.optionClickEvent(l,r,e.optionsClickCb),this._selectClickEvent(s,n,a),this.rootContainer=t}createOptions(e,t){for(let s in t){let r=this._createElement("div","component-selecttool__option",e);r.title=t[s],r.innerHTML=t[s]}}_selectClickEvent(e,t,s){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",s.className="component-triangle-down-img"):(t.style.display="block",s.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())},e.onblur=function(){t.style.display="none",s.className="component-triangle-down-img"}}_createElement(e,t,s){let r=document.createElement(e||"div");return t&&(r.className=t),s&&s.appendChild(r),r}optionClickEvent(e,t,s){for(let r=0;r<e.children.length;r++){let i=e.children[r];i.onclick=function(){t.innerHTML=i.innerHTML,t.title=i.title,i.getAttribute("data-value")&&t.setAttribute("data-value",i.getAttribute("data-value")),s&&s(i)}}}}r.Components.Select=to;
  1478. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1479. * This program are made available under the terms of the Apache License, Version 2.0
  1480. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1481. class so extends $n{constructor(e){super(e),this._initView(e)}_initView(e){let t=document.createElement("div");t.className="component-dropdownbox--container";let s=document.createElement("div");s.setAttribute("tabindex","1"),s.className="component-dropdownbox",t.appendChild(s);let r=document.createElement("div");s.appendChild(r),this._createDropDownOption(e[0],r);let i=document.createElement("div");i.className="component-dropdownbox__triangle-btn",s.appendChild(i);let a=document.createElement("div");a.className="component-triangle-down-img",i.appendChild(a);let n={parentEle:s,dropDownContent:["component-dropdownbox__content component-dropdownbox__content--chart","dropDownContent"],scrollareaContent:"component-selecttool__scrollarea__content",optionsArr:e,triangleBtn:a,dropDownTopContainer:r};this._createDropDownBox(n),this.rootContainer=t}_createDropDownBox(e){let t=e.parentEle,s=e.dropDownTopContainer,r=document.createElement("div");r.className=e.dropDownContent[0],t.appendChild(r);let i=document.createElement("div");i.className=e.scrollareaContent,r.appendChild(i);let a=e.optionsArr;for(let e=0;e<a.length;e++)this._createDropDownOption(a[e],i);let n=e.triangleBtn;this._dropDownClickEvent(t,r,n),this._eleOnblur(t,r,n);let o=i.children;for(let e=0;e<o.length;e++)o[e].onclick=function(){s.innerHTML=o[e].outerHTML}}_createDropDownOption(e,t){let s=document.createElement("div");s.className="component-dropdownbox__item";let r=e;r.dataValue&&s.setAttribute("data-value",r.dataValue),t.appendChild(s);let i=document.createElement("div");i.className="component-dropdownbox__item__img",s.appendChild(i);let a=document.createElement("div");r.icon.className&&(a.className=r.icon.className),r.icon.background&&(a.style.background=r.icon.background),i.appendChild(a);let n=document.createElement("div");n.className="component-dropdownbox__item__title",n.title=r.title,n.innerHTML=r.title,s.appendChild(n);let o=document.createElement("div");o.className="component-dropdownbox__item__remark",o.title=r.remark,o.innerHTML=r.remark,s.appendChild(o)}_dropDownClickEvent(e,t,s){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",s.className="component-triangle-down-img"):(t.style.display="block",s.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())}}_eleOnblur(e,t,s){e.onblur=function(){t.style.display="none",s.className="component-triangle-down-img"}}_createElement(e,t,s){let r=document.createElement(e||"div");return t&&(r.className=t),s&&s.appendChild(r),r}}r.Components.DropDownBox=so;
  1482. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1483. * This program are made available under the terms of the Apache License, Version 2.0
  1484. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1485. class ro extends $n{constructor(e){super(e=e||{}),e.title=e.title?e.title:"",this._initView(e.title)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-popcontainer");const s=document.createElement("div");s.setAttribute("class","component-popcontainer__header");const r=document.createElement("label");r.setAttribute("class","component-popcontainer__header__title"),r.innerHTML=e,s.appendChild(r);const i=document.createElement("span");i.setAttribute("class","supermapol-icons-clear component-popcontainer__header__close"),i.onclick=this.closeView.bind(this),t.appendChild(i),t.appendChild(s);const a=document.createElement("div");a.setAttribute("class","component-popcontainer__content"),this.content=a,t.appendChild(a),this.rootContainer=t}appendContent(e){this.content.appendChild(e)}}r.Components.PopContainer=ro;
  1486. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1487. * This program are made available under the terms of the Apache License, Version 2.0
  1488. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1489. class io extends ro{constructor(e){e.title=e.title?e.title:"属性",super(e),this.rootContainer.firstChild.hidden=!0,e.attributes=e.attributes?e.attributes:[],this._createAttributesTable(e.attributes)}_createAttributesTable(e){const t=document.createElement("table");t.setAttribute("class","component-popcontainer__content__table");const s=document.createElement("tbody");let r=!0;for(let t in e){const i=document.createElement("tr");r&&i.setAttribute("class","component-popcontainer__content__td--color");const a=document.createElement("td"),n=document.createElement("Span");n.innerHTML=t,a.appendChild(n);const o=document.createElement("td");o.innerHTML=e[t],i.appendChild(a),i.appendChild(o),s.appendChild(i),r=!r}t.appendChild(s),this.appendContent(t)}}r.Components.AttributesPopContainer=io;
  1490. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1491. * This program are made available under the terms of the Apache License, Version 2.0
  1492. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1493. class ao extends $n{constructor(e){super(e),this._initView()}_initView(){const e=document.createElement("div");e.setAttribute("class","component-tabpage");const t=document.createElement("ul");this.header=t;const s=document.createElement("div");s.setAttribute("class","component-tabpage__content"),this.content=s,e.appendChild(t),e.appendChild(s),this.rootContainer=e}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let s=document.createElement("span");s.index=t,s.appendChild(document.createTextNode(e[t].title)),s.onclick=this._changeTabsPage.bind(this);let r=e[t].content;r.index=t,r.hidden=!0,this.header.appendChild(s),this.content.appendChild(r)}this.header.firstChild.setAttribute("class","on"),this.content.firstChild.hidden=!1}removeTab(e){this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}removeAllTabs(){for(let e=this.header.children.length;e>0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class",""),this.content.children[e].hidden=!0,e===t&&(this.header.children[e].setAttribute("class","on"),this.content.children[e].hidden=!1)}}r.Components.IndexTabsPageContainer=ao;
  1494. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1495. * This program are made available under the terms of the Apache License, Version 2.0
  1496. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1497. class no extends ao{constructor(e){super(e),this.rootContainer.classList.add("component-citytabpage--noneBoxShadow"),this.config=e.config,ye.isArray(this.config)?(this.header.hidden=!0,this._createCityItem("城市",this.config),this.content.style.border="none"):(this._createTabs(),this.header.onclick=(e=>{for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class","");e.target.setAttribute("class","on"),this._createCityContent(e.target.innerHTML)}))}_createTabs(){if(ye.isArray(this.config))for(let e=0;e<this.config.length;e++){let t="";for(const s in this.config[e])t+=s;let s=document.createElement("li");s.innerHTML=t,this.header.appendChild(s)}else for(const e in this.config){let t=document.createElement("li");t.innerHTML=e,this.header.appendChild(t)}this.header.firstChild.setAttribute("class","on"),this._createCityContent(this.header.firstChild.innerHTML)}_createCityContent(e){for(let e=this.content.children.length;e>0;e--)this.content.removeChild(this.content.children[e-1]);const t=this.config[e];for(let e in t)this._createCityItem(e,t[e])}_createCityItem(e,t){const s=document.createElement("div"),r=document.createElement("div");r.setAttribute("class","component-citytabpag__py-key"),r.innerHTML=e,s.appendChild(r);const i=document.createElement("div");i.setAttribute("class","component-citytabpag__content");for(let e=0;e<t.length;e++){let s=document.createElement("span");s.innerHTML=t[e],i.appendChild(s)}"HOT"===e&&(i.style.width="428px"),s.appendChild(i),this.content.appendChild(s)}}r.Components.CityTabsPage=no;
  1498. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1499. * This program are made available under the terms of the Apache License, Version 2.0
  1500. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1501. class oo extends $n{constructor(e){super(e),this.navTabsTitle=null,this.navTabsContent=null,e.tabs=e.tabs?e.tabs:[],this._initView(e.tabs)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-navtabspage");const s=document.createElement("span");s.setAttribute("class","supermapol-icons-close"),s.onclick=this.closeView.bind(this),t.appendChild(s);const r=document.createElement("div");this.navTabsTitle=r,r.setAttribute("class","component-navtabspage__title"),t.appendChild(r);const i=document.createElement("div");this.navTabsContent=i,i.setAttribute("class","component-navtabspage__content"),t.appendChild(i),e.length>0&&this.appendTabs(e),this.rootContainer=t}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let s=document.createElement("span");s.index=t,s.appendChild(document.createTextNode(e[t].title)),s.onclick=this._changeTabsPage.bind(this);let r=e[t].content;r.index=t,r.hidden=!0,this.navTabsTitle.appendChild(s),this.navTabsContent.appendChild(r)}this.navTabsTitle.firstChild.setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.firstChild.hidden=!1}removeTab(e){this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}removeAllTabs(){for(let e=this.navTabsTitle.children.length;e>0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.navTabsTitle.children.length;e++)this.navTabsTitle.children[e].setAttribute("class",""),this.navTabsContent.children[e].hidden=!0,e===t&&(this.navTabsTitle.children[e].setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.children[e].hidden=!1)}}r.Components.NavTabsPage=oo;
  1502. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1503. * This program are made available under the terms of the Apache License, Version 2.0
  1504. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1505. class lo extends $n{constructor(e){super(e=e||{}),this.currentPage=0,this.pageNumberLis=[],this.currentPageNumberLis=[],this.linkageEvent=null,e.contents=e.contents?e.contents:null,e.pageCounts=e.pageCounts?e.pageCounts:0,this._initView(e.contents,e.pageCounts)}setLinkageEvent(e){this.linkageEvent=e}_initView(e,t){const s=document.createElement("div");s.setAttribute("class","component-pagination");const r=document.createElement("div");r.setAttribute("class","component-pagination__content"),s.appendChild(r),this.content=r;const i=document.createElement("ul");i.setAttribute("class","component-pagination__link"),i.onclick=this._changePageEvent.bind(this),s.appendChild(i),this._createLink(i),this.link=i,e&&this.setContent(e),0!==t&&this.setPageLink(t),this.rootContainer=s}setContent(e){this.clearContent(),this.appendContent(e)}appendContent(e){this.content.appendChild(e)}clearContent(){for(let e=this.content.children.length-1;e>=0;e--)this.content.removeChild(this.content.children[e])}setPageLink(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}_createPageLi(e){for(let t=0;t<e;t++){const e=document.createElement("li");e.innerHTML=t+1,this.pageNumberLis.push(e)}if(this.pageNumberLis[0].setAttribute("class","active"),this.currentPage=1,e<5)this.currentPageNumberLis=this.pageNumberLis;else for(let e=0;e<5;e++)this.currentPageNumberLis.push(this.pageNumberLis[e])}_appendPageLink(){for(let e=0;e<this.currentPageNumberLis.length;e++)this.link.insertBefore(this.currentPageNumberLis[e],this.link.childNodes[this.link.children.length-2]);for(let e=0;e<this.currentPageNumberLis.length;e++)this.currentPageNumberLis[e].setAttribute("class",""),Number(this.currentPageNumberLis[e].innerHTML)===this.currentPage&&this.currentPageNumberLis[e].setAttribute("class","active");this._changeDisableState(),this.linkageEvent&&this.linkageEvent(this.currentPage)}clearPageLink(){for(let e=this.link.children.length-3;e>1;e--)this.link.removeChild(this.link.children[e])}_createLink(e){for(let t=0;t<4;t++){const s=document.createElement("li");s.setAttribute("class","disable");const r=document.createElement("span");s.appendChild(r),0===t?(r.id="first",r.setAttribute("class","supermapol-icons-first")):1===t?(r.id="prev",r.setAttribute("class","supermapol-icons-prev")):2===t?(r.id="next",r.setAttribute("class","supermapol-icons-next")):3===t&&(r.id="last",r.setAttribute("class","supermapol-icons-last")),e.appendChild(s)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let s;if(t.id)s=t.id;else{if(!Number(t.innerHTML))return;s=Number(t.innerHTML)}this._prePageNum(s),this.clearPageLink(),this._appendPageLink()}_changeDisableState(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}_prePageNum(e){const t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(let e=0;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage<=3)for(let e=0;e<5;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage>=this.pageNumberLis.length-3)for(let e=this.pageNumberLis.length-5;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else for(let e=this.currentPage-3;e<=this.currentPage+1;e++)t.push(this.pageNumberLis[e]);t.length>0&&(this.currentPageNumberLis=t)}}r.Components.PaginationContainer=lo;
  1506. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1507. * This program are made available under the terms of the Apache License, Version 2.0
  1508. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1509. let ho={getFileType:e=>/^.*\.(?:xls|xlsx)$/i.test(e)?Un.EXCEL:/^.*\.(?:csv)$/i.test(e)?Un.CSV:/^.*\.(?:geojson|json)$/i.test(e)?Un.GEOJSON:null};
  1510. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1511. * This program are made available under the terms of the Apache License, Version 2.0
  1512. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1513. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1514. * This program are made available under the terms of the Apache License, Version 2.0
  1515. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1516. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1517. * This program are made available under the terms of the Apache License, Version 2.0
  1518. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/r.Lang["en-US"]={title_dataFlowService:"Data Flow Service",title_distributedAnalysis:"Distributed Analysis",title_clientComputing:"Client Computing",title_dataServiceQuery:"Data Service Query",title_searchCity:"Search city",title_searchLayer:" Search layer",text_input_value_inputDataFlowUrl:"Please enter the data stream service address such as: ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"Display feature information",text_subscribe:"subscribe",text_cancelSubscribe:"unsubscribe",text_densityAnalysis:"Density Analysis",text_CalculateTheValuePerUnitArea:"Calculate the value per unit area within the neighborhood shape",text_option_selectDataset:"Please select a dataset",text_label_dataset:"Dataset",text_option_simplePointDensityAnalysis:"Simple point density analysis",text_option_nuclearDensityAnalysis:"Nuclear density analysis",text_label_analyticalMethod:"Analytical method",text_option_quadrilateral:"Quadrilateral",text_option_hexagon:"hexagon",text_label_meshType:"Mesh type",text_option_notSet:"Not set",text_label_weightField:"Weight field",text_label_gridSizeInMeters:"Grid size",text_label_searchRadius:"Search radius",text_label_queryRange:"Scope of analysis",text_label_areaUnit:"Area unit",text_option_equidistantSegmentation:"Equidistant segmentation",text_option_logarithm:"Logarithm",text_option_equalCountingSegment:"Equal counting segment",text_option_squareRootSegmentation:"Square root segmentation",text_label_thematicMapSegmentationMode:"Thematic map segmentation mode",text_label_thematicMapSegmentationParameters:"Thematic map segmentation parameters",text_option_greenOrangePurpleGradient:"Green orange purple gradient",text_option_greenOrangeRedGradient:"Green orange red gradient",text_option_rainbowGradient:"Rainbow gradient",text_option_spectralGradient:"Spectral gradient",text_option_terrainGradient:"Terrain gradient",text_label_thematicMapColorGradientMode:"Thematic map color gradient mode",text_label_resultLayerName:"Result layer name",text_chooseFile:"Open File",text_isoline:"Isoline",text_extractDiscreteValue:"Extract discrete value generation curve",text_buffer:"Buffer",text_specifyTheDistance:"Specify the distance to create the surrounding area",text_label_analysisLayer:"Analysis layer",text_label_extractField:"Extract field",text_label_extractedValue:"Extracted value",text_label_distanceAttenuation:"Distance attenuation",text_label_gridSize:"gridSize",text_label_bufferRadius:"Buffer radius",text_label_defaultkilometers:"Default 10 kilometers",text_label_kilometer:"kilometer",text_label_unit:"unit",text_retainOriginal:"Retain original object field",text_mergeBuffer:"Merge buffer",text_label_color:"Color",text_label_buffer:"[Buffer]",text_label_isolines:"[Isolines]",text_label_queryRangeTips:"The default is the full range of input data. Example: -74.050, 40.650, -73.850, 40.850",text_label_queryModel:"Query mode",text_label_IDArrayOfFeatures:"ID array of features",text_label_maxFeatures:"The maximum number of features that can be returned",text_label_bufferDistance:"Buffer distance",text_label_queryRange1:"Query range",text_label_spatialQueryMode:"Spatial query mode",text_label_featureFilter:"Feature filter",text_label_geometricObject:"Geometric object",text_label_queryMode:"Query mode",text_label_searchTips:"Search for city locations or layer features",text_label_chooseSearchLayers:"Select a query layer",text_loadSearchCriteria:"Load search criteria",text_saveSearchCriteria:"Save search criteria",btn_analyze:"Analyze",btn_analyzing:"Analyzing",btn_emptyTheAnalysisLayer:"Empty the analysis layer",btn_cancelAnalysis:"Cancel",btn_query:"Query",btn_querying:"Querying",btn_emptyTheRresultLayer:"Clear all result layers","msg_dataReturnedIsEmpty.":"The request is successful and the data returned by the query is empty.",msg_dataFlowServiceHasBeenSubscribed:"The data stream service has been subscribed to.",msg_inputDataFlowUrlFirst:"Please enter the data stream service address first.",msg_datasetOrMethodUnsupport:"This dataset does not support this analysis type. Please reselect the dataset.",msg_selectDataset:"Please select a data set!",msg_setTheWeightField:"Please set the weight field!",msg_theFieldNotSupportAnalysis:"The field you currently select does not support analysis!",msg_resultIsEmpty:"The result of the analysis is empty!",msg_openFileFail:"Failed to open file!",msg_fileTypeUnsupported:"File format is not supported!",msg_fileSizeExceeded:"File size exceeded! The file size should not exceed 10M!",msg_dataInWrongGeoJSONFormat:"Wrong data format! Non standard GEOJSON format data!",msg_dataInWrongFormat:"Wrong data format! Non standard EXCEL, CSV or GEOJSON format data!",msg_searchKeywords:"Search keywords cannot be empty. Please enter your search criteria.",msg_searchGeocodeField:"Did not match the address matching service data!",msg_cityGeocodeField:"The address matching service of the current city is not configured.",msg_getFeatureField:"No related vector features found!",msg_dataflowservicesubscribed:"The data stream service has been subscribed to.",msg_subscribesucceeded:"The data stream service subscription was successful.",msg_crsunsupport:"Does not support the coordinate system of the current map",msg_tilematrixsetunsupport:"Incoming TileMatrixSet is not supported",msg_jsonResolveFiled:"JSON format parsing failure!",msg_requestContentFiled:"Failed to request data through iportal!",msg_getdatafailed:"Failed to get data!"};r.Lang["zh-CN"]={title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例:-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型,请重新选择数据集",msg_selectDataset:"请选择数据集!",msg_setTheWeightField:"请设置权重字段!",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析!",msg_resultIsEmpty:"分析的结果为空!",msg_dataReturnedIsEmpty:"请求成功,查询返回的数据为空。",msg_openFileFail:"打开文件失败!",msg_fileTypeUnsupported:"不支持该文件格式!",msg_fileSizeExceeded:"文件大小超限!文件大小不得超过 10M!",msg_dataInWrongGeoJSONFormat:"数据格式错误!非标准的 GEOJSON 格式数据!",msg_dataInWrongFormat:"数据格式错误!非标准的 EXCEL, CSV 或 GEOJSON 格式数据!",msg_searchKeywords:"搜索关键字不能为空,请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据!",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素!",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败!",msg_requestContentFiled:"通过iportal请求数据失败!",msg_getdatafailed:"获取数据失败!"};
  1519. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1520. * This program are made available under the terms of the Apache License, Version 2.0
  1521. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1522. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1523. * This program are made available under the terms of the Apache License, Version 2.0
  1524. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1525. var uo=s(0),co=s.n(uo),po=function(){co.a.Map.prototype.overlayLayersManager={},co.a.Map.prototype.addLayerBak=co.a.Map.prototype.addLayer,co.a.Map.prototype.addLayer=function(e,t){return e.source||"custom"===e.type||"background"===e.type?(this.addLayerBak(e,t),this):this.overlayLayersManager[e.id]||this.style._layers[e.id]?void this.fire("error",{error:new Error("A layer with this id already exists.")}):(function(e,t){e.onAdd&&e.onAdd(t)}(e,this),this.overlayLayersManager[e.id]=e,this)},co.a.Map.prototype.getLayer=function(e){return this.overlayLayersManager[e]?this.overlayLayersManager[e]:this.style.getLayer(e)},co.a.Map.prototype.moveLayer=function(e,t){return this.overlayLayersManager[e]?(function(e,t){var s=document.getElementById(e);if(t){var r=document.getElementById(t);r||co.a.Evented.prototype.fire("error",{error:new Error(`Layer with id "${t}" does not exist on this document.`)})}s&&r?r.parentNode.insertBefore(s,r):s.parentNode.appendChild(s)}(e,t),this):this.style._layers[e]?(this.style.moveLayer(e,t),this._update(!0),this):void 0},co.a.Map.prototype.removeLayer=function(e){return this.overlayLayersManager[e]?((t=this.overlayLayersManager[e]).removeFromMap&&t.removeFromMap(),delete this.overlayLayersManager[e],this):(this.style.removeLayer(e),this._update(!0),this);var t},co.a.Map.prototype.setLayoutProperty=function(e,t,s){return this.overlayLayersManager[e]?("visibility"===t&&(s="visible"===s,r=this.overlayLayersManager[e],i=s,r.setVisibility&&r.setVisibility(i),this.style.fire("data",{dataType:"style"})),this):(this.style.setLayoutProperty(e,t,s),this._update(!0),this);var r,i},co.a.Map.prototype.updateTransform=function(e,t,s,r,i,a,n){this.transform.units=e,this.transform.latRange=[this._tileExtent[1],this._tileExtent[3]],this.transform.lngRange=[this._tileExtent[0],this._tileExtent[2]];var o=this.mercatorZfromAltitude;co.a.MercatorCoordinate.fromLngLat=function(e,r){r=r||0;const i=co.a.LngLat.convert(e);return new co.a.MercatorCoordinate((i.lng-t)/a,(s-i.lat)/n,o(r,i.lat))},co.a.MercatorCoordinate.prototype.toLngLat=function(){return new co.a.LngLat(this.x*a+t,s-this.y*n)},this.customConvertPoint=window.URL.createObjectURL(new Blob(["customConvertPoint = {projectX:function(x){return (x - "+r+") / "+a+" + 0.5},projectY:function(y){y = 0.5 - ((y - "+i+") / "+n+");return y < 0 ? 0 : y > 1 ? 1 : y;},toY:function(y){return (0.5-y)*"+n+"+"+i+";}}"],{type:"text/javascript"}))}}();
  1526. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1527. * This program are made available under the terms of the Apache License, Version 2.0
  1528. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1529. co.a.supermap=co.a.supermap||{};
  1530. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1531. * This program are made available under the terms of the Apache License, Version 2.0
  1532. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1533. class mo{constructor(e){this.imageUrl=null,this.link=null,this.width=null,this.height=null,this.alt="SuperMap iClient",this._extend(this,e)}onAdd(e){this._map=e,this._container=document.createElement("div"),this._container.className="mapboxgl-ctrl iclient-logo",this._container.style.marginTop=0,this._container.style.marginBottom=0,this._container.style.marginLeft=0,this._container.style.marginRight=0;var t=Ve;this.imageUrl&&(t=this.imageUrl);var s=this.alt,r="94px",i="29px",a="width:"+r+";height:"+i+";";this.imageUrl&&(a="width:"+(r=this.width)+";height:"+(i=this.height)+";",r&&i||(a=""));var n=this.link||"https://iclient.supermap.io";return this._container.innerHTML="<a href='"+n+"' target='_blank'><img src="+t+" alt='"+s+"' style='"+a+"margin-bottom: 2px'></a>",this._createStyleSheet(),this._container}_createStyleSheet(){var e=document.createElement("style");e.type="text/css",e.innerHTML=".iclient-logo{margin:0 !important;}.iclient-logo a{border: none;display: block;height:31px;}.iclient-logo img{border: none;white-space: nowrap}",document.getElementsByTagName("head")[0].appendChild(e)}_extend(e){for(var t=0;t<Object.getOwnPropertyNames(arguments).length;t++){var s=Object.getOwnPropertyNames(arguments)[t];if("caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s){var r=arguments[s];if(r)for(var i=0;i<Object.getOwnPropertyNames(r).length;i++){var a=Object.getOwnPropertyNames(r)[i];"caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s&&(e[a]=r[a])}}}return e}}co.a.supermap.LogoControl=mo;
  1534. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1535. * This program are made available under the terms of the Apache License, Version 2.0
  1536. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1537. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1538. * This program are made available under the terms of the Apache License, Version 2.0
  1539. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1540. class fo{static toSuperMapGeometry(e){if(e&&e.type)return(new je).read(e,"FeatureCollection")[0].geometry}static toSuperMapBounds(e){return this.isArray(e)?new ve(e[0],e[1],e[2],e[3]):new ve(e.getWest(),e.getSouth(),e.getEast(),e.getNorth())}static toSuperMapPoint(e){return this.isArray(e)?new Te(e[0],e[1]):e.lng&&e.lat?new Te(e.lng,e.lat):new Te(e.geometry.coordinates[0],e.geometry.coordinates[1])}static toSuperMapPolygon(e){const t=e.getWest(),s=e.getEast(),r=e.getSouth(),i=e.getNorth();return new Le([new Ae([new Te(t,r),new Te(s,r),new Te(s,i),new Te(t,i)])])}static isArray(e){return"[object Array]"==Object.prototype.toString.call(e)}static toGeoJSON(e){if(e)return(new je).toGeoJSON(e)}static toProcessingParam(e){var t={};if(e.length<1)t="";else{for(var s=[],r=0;r<e.length;r++){var i={};i.x=e[r][0],i.y=e[r][1],s.push(i)}t.type="REGION",t.points=s}return t}static extend(e){for(var t=0;t<Object.getOwnPropertyNames(arguments).length;t++){var s=Object.getOwnPropertyNames(arguments)[t];if("caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s){var r=arguments[s];if(r)for(var i=0;i<Object.getOwnPropertyNames(r).length;i++){var a=Object.getOwnPropertyNames(r)[i];"caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s&&(e[a]=r[a])}}}return e}static isNumber(e){if(""===e)return!1;let t=Number(e);return 0===t||!isNaN(t)}static isString(e){return"string"==typeof e&&e.constructor===String}static newGuid(e){let t=e||32,s="";for(let e=1;e<t;e++){s+=Math.floor(16*Math.random()).toString(16)}return s}static hexToRgba(e,t){var s=[],r=[];if(3==(e=e.replace(/#/,"")).length){var i=[];for(let t=0;t<3;t++)i.push(e.charAt(t)+e.charAt(t));e=i.join("")}for(let t=0;t<6;t+=2)s[t]="0x"+e.substr(t,2),r.push(parseInt(Number(s[t])));return r.push(t),"rgba("+r.join(",")+")"}static isMatchAdministrativeName(e,t){if(this.isString(t)){let s=e.substr(0,2);return"张家"===s&&(s=e.substr(0,3)),!!t.match(new RegExp(s))}return!1}}co.a.supermap.Util=fo;
  1541. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1542. * This program are made available under the terms of the Apache License, Version 2.0
  1543. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1544. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1545. * This program are made available under the terms of the Apache License, Version 2.0
  1546. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1547. class yo{constructor(e,t){this.geometry=e,this.attributes=t}toFeature(){var e=fo.toSuperMapGeometry(this.geometry),t=[];return this.geometry instanceof co.a.LngLat?t=[this.geometry.lng,this.geometry.lat]:this.geometry instanceof co.a.Point?t=[this.geometry.x,this.geometry.y]:3===this.geometry.length&&(e=new Ee(this.geometry[0],this.geometry[1],this.geometry[2])),t.length>1&&(e=new Te(t[0],t[1])),new Re(e,this.attributes)}}co.a.supermap.ThemeFeature=yo;
  1548. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1549. * This program are made available under the terms of the Apache License, Version 2.0
  1550. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1551. class go{constructor(e,t){var s=t||{};this.name=e,this.id=s.id?s.id:ye.createUniqueID("themeLayer_"),this.opacity=s.opacity?s.opacity:1,this.visibility=!0,this.loadWhileAnimating=void 0===s.loadWhileAnimating||s.loadWhileAnimating,this.map=s.map?s.map:null,this.features=[],this.TFEvents=[],this.map&&this.map.addLayer(this)}onAdd(e){this.map=e,this._createCanvasContainer(),this.addTFEvents(),this.map.on("resize",this.resizeEvent.bind(this)),this.map.on("zoomstart",this.zoomStartEvent.bind(this)),this.map.on("zoomend",this.zoomEndEvent.bind(this)),this.map.on("rotatestart",this.rotateStartEvent.bind(this)),this.map.on("rotate",this.rotateEvent.bind(this)),this.map.on("rotateend",this.rotateEndEvent.bind(this)),this.map.on("dragend",this.dragEndEvent.bind(this)),this.map.on("movestart",this.moveStartEvent.bind(this)),this.map.on("move",this.moveEvent.bind(this)),this.map.on("moveend",this.moveEndEvent.bind(this)),this.map.on("remove",this.removeFromMap.bind(this)),this.refresh()}refresh(){0!==this.features.length&&this.map&&this.redrawThematicFeatures(this.map.getBounds())}_createCanvasContainer(){this.movingOffset=[0,0],this.mapContainer=this.map.getCanvasContainer(),this.div=document.createElement("div"),this.div.id=this.id,this.div.style.position="absolute";var e=this.map.getCanvasContainer(),t=this.map.getCanvas();this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px",this.div.style.width=t.style.width,this.div.style.height=t.style.height,this.div.className="themeLayer",this.div.width=parseInt(t.width),this.div.height=parseInt(t.height),e.appendChild(this.div),this.setOpacity(this.opacity),this.levelRenderer=new Gn,this.renderer=this.levelRenderer.init(this.div),this.renderer.clear()}destroyFeatures(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}setVisibility(e){e!==this.visibility&&(this.visibility=e,this.display(e),this.redrawThematicFeatures(this.map.getBounds()))}display(e){this.div.style.display=e?"block":"none"}setOpacity(e){if(e!==this.opacity){this.opacity=e;var t=this.div;ye.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&co.a.Evented.prototype.fire("changelayer",{layer:this,property:"opacity"})}}addFeatures(e){}removeFeatures(e){if(e&&0!==e.length){if(e===this.features)return this.removeAllFeatures();ye.isArray(e)||(e=[e]);for(var t=[],s=e.length-1;s>=0;s--){var r=e[s],i=ye.indexOf(this.features,r);-1!==i?this.features.splice(i,1):t.push(r)}for(var a=[],n=0,o=this.features.length;n<o;n++)r=this.features[n],a.push(r);this.features=[],this.addFeatures(a),this.renderer&&this.redrawThematicFeatures(this.map.getBounds());var l=0==t.length;co.a.Evented.prototype.fire("featuresremoved",{features:t,succeed:l})}}removeAllFeatures(){this.renderer&&this.renderer.clear(),this.features=[],co.a.Evented.prototype.fire("featuresremoved",{features:[],succeed:!0})}getFeatures(){for(var e=this.features.length,t=new Array(e),s=0;s<e;++s)t[s]=this.features[s];return t}getFeatureBy(e,t){var s=null;for(var r in this.features)if(this.features[r][e]===t){s=this.features[r];break}return s}getFeatureById(e){return this.getFeatureBy("id",e)}getFeaturesByAttribute(e,t){var s,r=[];for(var i in this.features)(s=this.features[i])&&s.attributes&&s.attributes[e]===t&&r.push(s);return r}redrawThematicFeatures(e){}on(e,t,s){return this.renderer?this.renderer.on(e,t):this.map.on(e,t),this}off(e,t,s){return this.renderer?this.renderer.off(e,t):this.map.off(e,t),this}addTFEvents(){for(var e=this.TFEvents,t=e.length,s=0;s<t;s++)this.renderer.on(e[s][0],e[s][1])}getLocalXY(e){var t,s=this.map;if(e instanceof Te||e instanceof Ee){let r=s.project(new co.a.LngLat(e.x,e.y));t=[r.x,r.y]}if(e instanceof ge){let r=s.project(new co.a.LngLat(e.lon,e.lat));t=[r.x,r.y]}return t}toiClientFeature(e){ye.isArray(e)||(e=[e]);let t=[];for(let s=0;s<e.length;s++)if(e[s]instanceof yo)t.push(e[s].toFeature());else if(e[s]instanceof Re)t.push(e[s]);else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[s].type)){let r=new je;t=t.concat(r.read(e[s]))}else{if(!e[s].geometry||!e[s].geometry.parts)throw new Error("features's type is not be supported.");t.push(wi.fromJson(e[s]).toFeature())}return t}toFeature(e){return this.toiClientFeature(e)}moveEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.div.style.transform="",this.redrawThematicFeatures(this.map.getBounds()),this._show())}moveStartEvent(){if(!this.loadWhileAnimating&&this.visibility){this.startPitch=this.map.getPitch(),this.startBearing=this.map.getBearing();var e=this.map.project(new co.a.LngLat(0,0));this.startMoveX=e.x,this.startMoveY=e.y}}moveEvent(){if(!this.loadWhileAnimating&&this.visibility){if(!this.rotating&&!this.zooming){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing,s=this.map.project(new co.a.LngLat(0,0)),r=s.x-this.startMoveX,i=s.y-this.startMoveY;this.div.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+r+"px, "+i+"px, 0px)"}}else this.redrawThematicFeatures(this.map.getBounds())}zoomStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!0,this._hide())}zoomEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!1,this._show())}rotateStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!0)}rotateEvent(){if(!this.loadWhileAnimating&&this.visibility){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing;this.div.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg)"}}rotateEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!1,this._show())}dragEndEvent(){!this.loadWhileAnimating&&this.visibility&&this._hide()}resizeEvent(){this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getCanvas();this.div.style.width=e.style.width,this.div.style.height=e.style.height,this.div.width=parseInt(e.width),this.div.height=parseInt(e.height),this.renderer.resize()}removeFromMap(){this.mapContainer.removeChild(this.div),this.removeAllFeatures()}moveTo(e,t){const s=document.getElementById(this.div.id);if(t=void 0===t||t){const t=document.getElementById(e);return void(s&&t&&t.parentNode.insertBefore(s,t))}const r=document.getElementById(e);if(s){if(r.nextSibling)return void r.parentNode.insertBefore(s,r.nextSibling);r.parentNode.appendChild(s)}}_hide(){this.renderer.painter.root.style.display="none"}_show(){this.renderer.painter.root.style.display="block"}}co.a.supermap.ThemeLayer=go;
  1552. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1553. * This program are made available under the terms of the Apache License, Version 2.0
  1554. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1555. class vo extends go{constructor(e,t,s){super(e,s),this.chartsSetting=s.chartsSetting||{},this.themeFields=s.themeFields||null,this.overlayWeightField=s.overlayWeightField||null,this.isOverLay=void 0===s.isOverLay||s.isOverLay,this.charts=s.charts||[],this.cache=s.cache||{},this.chartsType=t}setChartsType(e){this.chartsType=e,this.redraw()}addFeatures(e){!1!==co.a.Evented.prototype.fire("beforefeaturesadded",{features:e})&&(this.features=this.toiClientFeature(e),this.renderer&&this.redrawThematicFeatures(this.map.getBounds()))}redrawThematicFeatures(e){this.clearCache(),this.renderer.clearAll();for(var t=this.features,s=0,r=t.length;s<r;s++){var i=t[s],a=this.cache,n=i.id;if(!a[n]){a[n]=n;var o=this.createThematicFeature(i);o&&this.overlayWeightField&&i.attributes[this.overlayWeightField]&&!isNaN(i.attributes[this.overlayWeightField])&&(o.__overlayWeight=i.attributes[this.overlayWeightField]),o&&this.charts.push(o)}}this.drawCharts()}createThematicFeature(e){var t;return En[this.chartsType]&&this.themeFields&&this.chartsSetting&&(t=new En[this.chartsType](e,this,this.themeFields,this.chartsSetting)),!!t&&(t.assembleShapes(),t)}drawCharts(){if(this.renderer){var e=this.charts;if(this.overlayWeightField&&e.sort(function(e,t){return void 0===e.__overlayWeight&&void 0===t.__overlayWeight?0:void 0!==e.__overlayWeight&&void 0===t.__overlayWeight?-1:void 0===e.__overlayWeight&&void 0!==t.__overlayWeight?1:void 0!==e.__overlayWeight&&void 0!==t.__overlayWeight?parseFloat(e.__overlayWeight)<parseFloat(t.__overlayWeight)?1:-1:0}),this.isOverLay){var t=[];for(let l=0,h=e.length;l<h;l++){var s=e[l],r=s.resetLocation(),i=s.chartBounds,a=[{x:i.left,y:i.top},{x:i.left,y:i.bottom},{x:i.right,y:i.bottom},{x:i.right,y:i.top},{x:i.left,y:i.top}],n=!1;if(0!==l)for(let e=0;e<t.length;e++)if(this.isQuadrilateralOverLap(a,t[e])){n=!0;break}if(!n){t.push(a);var o=s.shapes;for(let e=0,t=o.length;e<t;e++)o[e].refOriginalPosition=r,this.renderer.addShape(o[e])}}}else for(var l=0,h=e.length;l<h;l++)for(var u=e[l],c=u.resetLocation(),d=u.shapes,p=0,m=d.length;p<m;p++)d[p].refOriginalPosition=c,this.renderer.addShape(d[p]);this.renderer.render()}}getShapesByFeatureID(e){var t=[],s=this.renderer.getAllShapes();if(!e)return s;for(var r=0,i=s.length;r<i;r++){var a=s[r];a.refDataID&&e===a.refDataID&&t.push(a)}return t}isQuadrilateralOverLap(e,t){var s=e.length,r=t.length;if(5!==s||5!==r)return null;var i=!1;for(let r=0;r<s;r++)if(this.isPointInPoly(e[r],t)){i=!0;break}for(let s=0;s<r;s++)if(this.isPointInPoly(t[s],e)){i=!0;break}for(let a=0;a<s-1&&!i;a++)for(let s=0;s<r-1;s++){if("SuperMap.Geometry.Point"===ye.lineIntersection(e[a],e[a+1],t[s],t[s+1]).CLASS_NAME){i=!0;break}}return i}isPointInPoly(e,t){for(var s=!1,r=-1,i=t.length,a=i-1;++r<i;a=r)(t[r].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[r].y)&&e.x<(t[a].x-t[r].x)*(e.y-t[r].y)/(t[a].y-t[r].y)+t[r].x&&(s=!s);return s}isChartInMap(e,t){for(var s=e,r=!1,i=0,a=t.length;i<a;i++){var n=t[i];if(n.x>=s.left&&n.x<=s.right&&n.y>=s.top&&n.y<=s.bottom){r=!0;break}}return r}clearCache(){this.cache={},this.charts=[]}removeFeatures(e){this.clearCache(),super.removeFeatures(e)}removeAllFeatures(){this.clearCache(),super.removeAllFeatures()}redraw(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getBounds()),!0)}clear(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}}co.a.supermap.GraphThemeLayer=vo;
  1556. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1557. * This program are made available under the terms of the Apache License, Version 2.0
  1558. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1559. class So extends go{constructor(e,t){super(e,t),this.name=null,this.style=null,this.highlightStyle=null,this.nodesClipPixel=2,this.isHoverAble=!1,this.isMultiHover=!1,this.isClickAble=!0,this.isAllowFeatureStyle=!1,ye.extend(this,t),this.cache=t.cache||{},this.cacheFields=t.cacheFields||[],this.maxCacheCount=t.maxCacheCount||0,this.isCustomSetMaxCacheCount=void 0!==t.isCustomSetMaxCacheCount&&t.isCustomSetMaxCacheCount}addFeatures(e){co.a.Evented.prototype.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),this.isCustomSetMaxCacheCount||(this.maxCacheCount=5*this.features.length),this.renderer&&this.redrawThematicFeatures(this.map.getBounds())}removeFeatures(e){this.clearCache(),go.prototype.removeFeatures.apply(this,arguments)}removeAllFeatures(){this.clearCache(),go.prototype.removeAllFeatures.apply(this,arguments)}redrawThematicFeatures(e){this.clearCache();var t=this.renderer.getHoverOne(),s=null;t&&t.refDataID&&(s=t.refDataID),this.renderer.clearAll();for(var r=this.features,i=this.cache,a=this.cacheFields,n=this.map.getZoom(),o=this.maxCacheCount,l=0,h=r.length;l<h;l++){var u,c=r[l].id+"_zoom_"+n.toString();if(i[c])i[c].updateAndAddShapes();else{if((u=this.createThematicFeature(r[l])).getShapesCount()<1)continue;if(i[c]=u,a.push(c),a.length>o){var d=a[0];a.splice(0,1),delete i[d]}}}if(this.renderer.render(),s&&this.isHoverAble&&this.isMultiHover){var p=this.getShapesByFeatureID(s);this.renderer.updateHoverShapes(p)}}createThematicFeature(e){var t=ye.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=ye.copyAttributesWithClip(e.style));var s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=_n.transformStyle(this.highlightStyle);for(var r=new Pn(e,this,_n.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}clearCache(){this.cache={},this.cacheFields=[]}clear(){this.renderer.clearAll(),this.renderer.refresh(),this.removeAllFeatures(),this.clearCache()}getCacheCount(){return this.cacheFields.length}setMaxCacheCount(e){isNaN(e)||(this.maxCacheCount=e,this.isCustomSetMaxCacheCount=!0)}getShapesByFeatureID(e){var t=[],s=this.renderer.getAllShapes();if(!e)return s;for(var r=0,i=s.length;r<i;r++){var a=s[r];a.refDataID&&e===a.refDataID&&t.push(a)}return t}}co.a.supermap.GeoFeatureThemeLayer=So;
  1560. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1561. * This program are made available under the terms of the Apache License, Version 2.0
  1562. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1563. class bo extends So{constructor(e,t){super(e,t),this.isOverLay=!0,this.isAvoid=!0,this.themeField=null,this.styleGroups=null,ye.extend(this,t),this.defaultStyle={fontColor:"#000000",fontOpacity:1,fontSize:"12px",fontStyle:"normal",fontWeight:"normal",labelAlign:"cm",labelXOffset:0,labelYOffset:0,labelRotation:0,fill:!1,fillColor:"#ee9900",fillOpacity:.4,stroke:!1,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",labelRect:!0,labelSelect:!0,_isGeoTextStrategyStyle:!0},this.getPxBoundsMode=0,this.labelFeatures=[]}redrawThematicFeatures(e){if(this.features.length>0&&0==this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),s=0,r=t.length;s<r;s++)this.labelFeatures.push(t[s]);this.features=this.getDrawnLabels(this.labelFeatures),super.redrawThematicFeatures.call(this,e)}removeFeatures(e){this.labelFeatures=[],super.removeFeatures.call(this,arguments)}removeAllFeatures(){this.labelFeatures=[],super.removeAllFeatures.call(this,arguments)}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=_n.transformStyle(this.highlightStyle);for(var r=new Pn(e,this,_n.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getDrawnLabels(e){for(var t,s,r,i,a=[],n=[],o={labelAlign:"cm",labelXOffset:0,labelYOffset:0},l=this.map,h=l.getZoom(),u=l.getCanvas(),c={x:parseFloat(u.style.width),y:parseFloat(u.style.height)},d=0,p=e.length;d<p;d++){((s=e[d]).isStyleChange||void 0===s.isStyleChange)&&(s=this.setStyle(s));var m=this.getLabelPxLocation(s);if(m.x>=0&&m.x<=c.x&&m.y>=0&&m.y<=c.y){if(s.style.minZoomLevel>-1&&h<=s.style.minZoomLevel)continue;if(s.style.maxZoomLevel>-1&&h>s.style.maxZoomLevel)continue;var f=null;s.isStyleChange?(s.isStyleChange=null,f=this.calculateLabelBounds(s,m)):f=s.geometry.bsInfo.w&&s.geometry.bsInfo.h?this.calculateLabelBounds2(s,m):this.calculateLabelBounds(s,m);var y=new ve(0,c.y,c.x,0),g=f.length;if(this.isAvoid){var v=this.getAvoidInfo(y,f);if(v){if("left"===v.aspectW){s.style.labelXOffset+=v.offsetX;for(let e=0;e<g;e++)f[e].x+=v.offsetX}else if("right"===v.aspectW){s.style.labelXOffset+=-v.offsetX;for(let e=0;e<g;e++)f[e].x+=-v.offsetX}if("top"===v.aspectH){s.style.labelYOffset+=v.offsetY;for(let e=0;e<g;e++)f[e].y+=v.offsetY}else if("bottom"===v.aspectH){s.style.labelYOffset+=-v.offsetY;for(let e=0;e<g;e++)f[e].y+=-v.offsetY}s.isStyleChange=!0}}if(this.isOverLay){var S=!1;if(0!=d)for(let e=0;e<n.length;e++)if(this.isQuadrilateralOverLap(f,n[e])){S=!0;break}if(S)continue;n.push(f)}var b=[];for(let e=0;e<g-1;e++)b.push(l.unproject(f[e]));var x=b[3],C=b[1],T=new ve(x.lng,x.lat,C.lng,C.lat).getCenterLonLat(),_=new Ee(T.lon,T.lat,s.attributes[this.themeField]);_.calculateBounds(),r=ye.cloneObject(s.style),i=ye.cloneObject(ye.copyAttributes(r,o)),(t=new Re(_,s.attributes,i)).id=s.id,t.fid=s.fid,a.push(t)}}return a}getStyleByData(e){var t=e;if(t.style=ye.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=ye.copyAttributes(t.style,this.style),this.themeField&&this.styleGroups&&t.attributes){var s=this.themeField,r=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in r)if(s===o){a=!0,n=r[o];break}if(a)for(var l=0,h=i.length;l<h;l++)if(n>=i[l].start&&n<i[l].end){var u=i[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=ye.copyAttributes(t.style,u)}t.style.label=t.attributes[this.themeField]}return t.style}setLabelsStyle(e){for(var t,s=[],r=0,i=e.length;r<i;r++){var a=e[r];if("SuperMap.Geometry.GeoText"!==a.geometry.CLASS_NAME)return e;(a.geometry.bsInfo.w||a.geometry.bsInfo.h)&&(a.geometry.bsInfo.w=null,a.geometry.bsInfo.h=null,a.geometry.labelWTmp=null),(t=this.setStyle(a)).layer=this.layer,s.push(t)}return s}setStyle(e){var t=e;if(t.style=ye.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=ye.copyAttributes(t.style,this.style),this.groupField&&this.styleGroups&&t.attributes){var s=this.groupField,r=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in r)if(s===o){a=!0,n=r[o];break}if(a)for(var l=0,h=i.length;l<h;l++)if(n>=i[l].start&&n<i[l].end){var u=i[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=ye.copyAttributes(t.style,u)}}return t.style.label=t.geometry.text,t}getLabelPxLocation(e){var t=e.geometry,s=e.style,r=t.getCentroid(),i=this.map.project(new co.a.LngLat(r.x,r.y)),a=new co.a.Point(i.x,i.y);if(s.labelXOffset||s.labelYOffset){var n=isNaN(s.labelXOffset)?0:s.labelXOffset,o=isNaN(s.labelYOffset)?0:s.labelYOffset,l=a.add(new co.a.Point(n,-o));return new co.a.Point(l.x,l.y)}return new co.a.Point(a.x,a.y)}calculateLabelBounds(e,t){var s=e.geometry,r=null,i=null;if(0==this.getPxBoundsMode)r=s.getLabelPxBoundsByText(t,e.style);else{if(1!==this.getPxBoundsMode)return null;i=this.getLabelInfo(e.geometry.getCentroid(),e.style),r=s.getLabelPxBoundsByLabel(t,i.w,i.h,e.style)}var a=[];return a=e.style.labelRotation%180==0?[{x:r.left,y:r.top},{x:r.right,y:r.top},{x:r.right,y:r.bottom},{x:r.left,y:r.bottom},{x:r.left,y:r.top}]:this.rotationBounds(r,t,e.style.labelRotation),s.bounds=new ve(a[1].x,a[3].y,a[2].x,a[4].y),a}calculateLabelBounds2(e,t){var s,r,i,a,n,o=e.geometry.bsInfo,l=e.style,h=ye.cloneObject(t);if(l.labelAlign&&"cm"!==l.labelAlign)switch(l.labelAlign){case"lt":h.x+=o.w/2,h.y+=o.h/2;break;case"lm":h.x+=o.w/2;break;case"lb":h.x+=o.w/2,h.y-=o.h/2;break;case"ct":h.y+=o.h/2;break;case"cb":h.y-=o.h/2;break;case"rt":h.x-=o.w/2,h.y+=o.h/2;break;case"rm":h.x-=o.w/2;break;case"rb":h.x-=o.w/2,h.y-=o.h/2}r=h.x-o.w/2,i=h.y+o.h/2,n=l.fontStyle&&"italic"===l.fontStyle?h.x+o.w/2+parseInt(parseFloat(l.fontSize)/2):h.x+o.w/2,a=h.y-o.h/2,s=new ve(r,i,n,a);var u=[];return u=l.labelRotation%180==0?[{x:s.left,y:s.top},{x:s.right,y:s.top},{x:s.right,y:s.bottom},{x:s.left,y:s.bottom},{x:s.left,y:s.top}]:this.rotationBounds(s,t,l.labelRotation),e.geometry.bounds=new ve(u[1].x,u[3].y,u[2].x,u[4].y),u}getLabelInfo(e,t){var s={l:"left",r:"right",t:"top",b:"bottom"},r={l:0,r:-1,t:0,b:-1};t=ye.extend({fontColor:"#000000",labelAlign:"cm"},t);var i=this.getLocalXY(e),a=0;if(t.labelXOffset||t.labelYOffset){var n=isNaN(t.labelXOffset)?0:t.labelXOffset,o=isNaN(t.labelYOffset)?0:t.labelYOffset;i[0]+=n,i[1]-=o}var l=document.createElement("canvas");l.globalAlpha=0,l.lineWidth=1;var h=l.getContext("2d");h.fillStyle=t.fontColor,h.globalAlpha=t.fontOpacity||1;var u,c,d,p=[t.fontStyle?t.fontStyle:"normal","normal",t.fontWeight?t.fontWeight:"normal",t.fontSize?t.fontSize:"1em",t.fontFamily?t.fontFamily:"sans-serif"].join(" "),m=t.label.split("\n"),f=m.length;if(h.fillText){h.font=p,h.textAlign=s[t.labelAlign[0]]||"center",h.textBaseline=s[t.labelAlign[1]]||"middle",null==(u=r[t.labelAlign[1]])&&(u=-.5),c=h.measureText("Mg").height||h.measureText("xx").width,i[1]+=c*u*(f-1);for(let e=0;e<f;e++)a<(d=h.measureText(m[e]).width)&&(a=d)}else if(h.mozDrawText){h.mozTextStyle=p,null==(u=r[t.labelAlign[1]])&&(u=-.5),c=h.mozMeasureText("xx"),i[1]+=c*(1+u*f);for(let e=0;e<f;e++)a<(d=h.measureText(m[e]).width)&&(a=d)}var y={};return a?(y.w=a,y.h=t.fontSize,y.rows=m.length,y):null}rotationBounds(e,t,s){var r=new co.a.Point(e.left,e.top),i=new co.a.Point(e.right,e.top),a=new co.a.Point(e.right,e.bottom),n=new co.a.Point(e.left,e.bottom),o=[];o.push(this.getRotatedLocation(r.x,r.y,t.x,t.y,s)),o.push(this.getRotatedLocation(i.x,i.y,t.x,t.y,s)),o.push(this.getRotatedLocation(a.x,a.y,t.x,t.y,s)),o.push(this.getRotatedLocation(n.x,n.y,t.x,t.y,s));for(var l=[],h=0;h<o.length;h++)l.push({x:o[h].x,y:o[h].y});return l.push({x:o[0].x,y:o[0].y}),l}getRotatedLocation(e,t,s,r,i){var a,n,o={};return t=-t,r=-r,i=-i,a=(e-s)*Math.cos(i/180*Math.PI)-(t-r)*Math.sin(i/180*Math.PI)+s,n=(e-s)*Math.sin(i/180*Math.PI)+(t-r)*Math.cos(i/180*Math.PI)+r,o.x=a,o.y=-n,o}getAvoidInfo(e,t){if(5!==t.length)return null;for(var s=[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.right,y:e.bottom},{x:e.left,y:e.bottom},{x:e.left,y:e.top}],r=!1,i=s.length,a=t.length,n=0,o=0,l="",h="",u=0;u<i-1;u++)for(var c=0;c<a-1;c++){"SuperMap.Geometry.Point"===ye.lineIntersection(s[u],s[u+1],t[c],t[c+1]).CLASS_NAME&&(d(t[c]),d(t[c+1]),r=!0)}return r?{aspectW:h,aspectH:l,offsetX:n,offsetY:o}:null;function d(t){if(!e.contains(t.x,t.y)){if(t.y<e.top){let s=Math.abs(e.top-t.y);s>o&&(o=s,l="top")}if(t.y>e.bottom){let s=Math.abs(t.y-e.bottom);s>o&&(o=s,l="bottom")}if(t.x<e.left){let s=Math.abs(e.left-t.x);s>n&&(n=s,h="left")}if(t.x>e.right){let s=Math.abs(t.x-e.right);s>n&&(n=s,h="right")}}}}isQuadrilateralOverLap(e,t){var s=e.length,r=t.length;if(5!==s||5!==r)return null;var i=!1;for(let r=0;r<s;r++)if(this.isPointInPoly(e[r],t)){i=!0;break}for(let s=0;s<r;s++)if(this.isPointInPoly(t[s],e)){i=!0;break}for(let n=0;n<s-1&&!i;n++)for(var a=0;a<r-1;a++){if("SuperMap.Geometry.Point"===ye.lineIntersection(e[n],e[n+1],t[a],t[a+1]).CLASS_NAME){i=!0;break}}return i}isPointInPoly(e,t){for(var s=!1,r=-1,i=t.length,a=i-1;++r<i;a=r)(t[r].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[r].y)&&e.x<(t[a].x-t[r].x)*(e.y-t[r].y)/(t[a].y-t[r].y)+t[r].x&&(s=!s);return s}}co.a.supermap.LabelThemeLayer=bo;var xo=s(1),Co=xo.baiduMapLayer?xo.baiduMapLayer.__proto__:Function;
  1564. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1565. * This program are made available under the terms of the Apache License, Version 2.0
  1566. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class To extends Co{constructor(e,t,s,r){if(super(e,s,r),Co){this.map=e;r=r||{},this.init(r),this.argCheck(r),this.canvasLayer=t,this.stopAniamation=!1,this.animation=r.animation,this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),this.bindMapEvent(),this.bindEvent(),this._expectShow=!0}}clickEvent(e){var t=e.point;super.clickEvent(t,e)}mousemoveEvent(e){var t=e.point;super.mousemoveEvent(t,e)}bindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.on("click",this.clickEvent),this.options.methods.mousemove&&e.on("mousemove",this.mousemoveEvent))}unbindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.off("click",this.clickEvent),this.options.methods.mousemove&&e.off("mousemove",this.mousemoveEvent))}getContext(){return this.canvasLayer.canvas.getContext(this.context)}addData(e,t){var s=e;e&&e.get&&(s=e.get()),this.dataSet.add(s),this.update({options:t})}update(e){var t=e||{},s=t.data;s&&s.get&&(s=s.get()),void 0!=s&&this.dataSet.set(s),super.update({options:t.options})}getData(){return this.dataSet}removeData(e){if(this.dataSet){var t=this.dataSet.get({filter:function(t){return null==e||"function"!=typeof e||!e(t)}});this.dataSet.set(t),this.update({options:null})}}clearData(){this.dataSet&&this.dataSet.clear(),this.update({options:null})}updateData(e,t){e&&e.get&&this.dataSet.set(e.get()),this.update({options:t})}_canvasUpdate(e){var t=this.map;if(this.canvasLayer&&!this.stopAniamation){var s=this,r=s.options.animation,i=this.getContext();if(s.isEnabledTime()){if(void 0===e)return void this.clear(i);"2d"===this.context&&(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else this.clear(i);if("2d"===this.context)for(var a in s.options)i[a]=s.options[a];else i.clear(i.COLOR_BUFFER_BIT);if(!(s.options.minZoom&&t.getZoom()<s.options.minZoom||s.options.maxZoom&&t.getZoom()>s.options.maxZoom)){var n=t.getBounds(),o=n.getEast()-n.getWest(),l=n.getNorth()-n.getSouth(),h=o/this.canvasLayer.canvas.width,u=l/this.canvasLayer.canvas.height,c=Qa("DEGREE")*h,d=t.getCenter(),p=t.project(d),m={transferCoordinate:function(e){if(t.transform.rotationMatrix||"2d"===s.context){var r=t.project(new co.a.LngLat(e[0],e[1]));return[r.x,r.y]}var i=[(e[0]-d.lng)/h,(d.lat-e[1])/u];return[i[0]+p.x,i[1]+p.y]}};void 0!==e&&(m.filter=function(t){var s=r.trails||10;return e&&t.time>e-s&&t.time<e});var f=s.dataSet.get(m);this.processData(f),"m"===s.options.unit?(s.options.size&&(s.options._size=s.options.size/c),s.options.width&&(s.options._width=s.options.width/c),s.options.height&&(s.options._height=s.options.height/c)):(s.options._size=s.options.size,s.options._height=s.options.height,s.options._width=s.options.width);var y=t.project(new co.a.LngLat(0,0));this.drawContext(i,f,s.options,y),s.options.updateCallback&&s.options.updateCallback(e)}}}init(e){this.options=e,this.initDataRange(e),this.context=this.options.context||"2d",this.options.zIndex&&this.canvasLayer&&this.canvasLayer.setZIndex(this.options.zIndex),this.initAnimator()}bindMapEvent(){this.mapEvent={resizeEvent:this.resizeEvent.bind(this),zoomStartEvent:this.zoomStartEvent.bind(this),zoomEndEvent:this.zoomEndEvent.bind(this),rotateStartEvent:this.rotateStartEvent.bind(this),rotateEvent:this.rotateEvent.bind(this),moveStartEvent:this.moveStartEvent.bind(this),rotateEndEvent:this.rotateEndEvent.bind(this),moveEvent:this.moveEvent.bind(this),moveEndEvent:this.moveEndEvent.bind(this),removeEvent:this.removeEvent.bind(this)},this.map.on("resize",this.mapEvent.resizeEvent),this.map.on("zoomstart",this.mapEvent.zoomStartEvent),this.map.on("zoomend",this.mapEvent.zoomEndEvent),this.map.on("rotatestart",this.mapEvent.rotateStartEvent),this.map.on("rotate",this.mapEvent.rotateEvent),this.map.on("rotateend",this.mapEvent.rotateEndEvent),this.map.on("movestart",this.mapEvent.moveStartEvent),this.map.on("move",this.mapEvent.moveEvent),this.map.on("moveend",this.mapEvent.moveEndEvent),this.map.on("remove",this.mapEvent.removeEvent)}unbindMapEvent(){this.map.off("resize",this.mapEvent.resizeEvent),this.map.off("zoomstart",this.mapEvent.zoomStartEvent),this.map.off("zoomend",this.mapEvent.zoomEndEvent),this.map.off("rotatestart",this.mapEvent.rotateStartEvent),this.map.off("rotate",this.mapEvent.rotateEvent),this.map.off("rotateend",this.mapEvent.rotateEndEvent),this.map.off("movestart",this.mapEvent.moveStartEvent),this.map.off("move",this.mapEvent.moveEvent),this.map.off("moveend",this.mapEvent.moveEndEvent),this.map.off("remove",this.mapEvent.removeEvent)}destroy(){this.unbindMapEvent(),this.unbindEvent(),this.clearData(),this.animator&&this.animator.stop(),this.animator=null,this.canvasLayer=null}addAnimatorEvent(){}removeEvent(){this.canvasLayer.mapContainer.removeChild(this.canvasLayer.canvas)}resizeEvent(){this.canvasLayer.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.canvasLayer.canvas;e.style.position="absolute",e.style.top="0px",e.style.left="0px";var t="undefined"==typeof window?{}:window,s=this.canvasLayer.devicePixelRatio=t.devicePixelRatio||1;e.width=parseInt(this.map.getCanvas().style.width)*s,e.height=parseInt(this.map.getCanvas().style.height)*s,this.canvasLayer.mapVOptions.context&&"2d"!=this.canvasLayer.mapVOptions.context||e.getContext("2d").scale(s,s),e.style.width=this.map.getCanvas().style.width,e.style.height=this.map.getCanvas().style.height}moveEndEvent(){this.stopAniamation=!1,this.getContext().canvas.style.transform="",this._canvasUpdate(),!0===this._expectShow&&this._show()}moveStartEvent(){this.startPitch=this.map.getPitch(),this.startBearing=this.map.getBearing();var e=this.map.project(new co.a.LngLat(0,0));this.startMoveX=e.x,this.startMoveY=e.y,this.animation&&(this.stopAniamation=!0),this.rotating||this.zooming||(this._expectShow="none"!==this.canvasLayer.canvas.style.display,0!==this.map.getPitch()&&this._hide())}moveEvent(){this.canvasLayer.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing,s=this.map.project(new co.a.LngLat(0,0)),r=s.x-this.startMoveX,i=s.y-this.startMoveY;this.getContext().canvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+r+"px, "+i+"px, 0px)"}zoomStartEvent(){this.zooming=!0,this._hide()}zoomEndEvent(){this.zooming=!1}rotateStartEvent(){this.rotating=!0,0!==this.map.getPitch()&&this._hide()}rotateEvent(){this.canvasLayer.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing;this.getContext().canvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg)"}rotateEndEvent(){this.rotating=!1}clear(e){e&&e.clearRect&&e.clearRect(0,0,parseInt(this.map.getCanvas().style.width),parseInt(this.map.getCanvas().style.height))}draw(){this._canvasUpdate()}_hide(){this.canvasLayer.canvas.style.display="none"}_show(){this.canvasLayer.canvas.style.display="block"}}
  1567. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1568. * This program are made available under the terms of the Apache License, Version 2.0
  1569. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class _o{constructor(e,t,s){this.map=e,this.id=s.layerID?s.layerID:ye.createUniqueID("mapvLayer_"),delete s.layerID,this.mapVOptions=s,this.dataSet=t,this.visibility=!0,this.map&&this.map.addLayer(this)}onAdd(e){this.map=e,this.renderer=new To(this.map,this,this.dataSet,this.mapVOptions),this.canvas=this._createCanvas(),this.renderer._canvasUpdate(),this.mapContainer=e.getCanvasContainer(),this.mapContainer.appendChild(this.canvas),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px"}removeFromMap(){this.mapContainer.removeChild(this.canvas),this.renderer.destroy()}setVisibility(e){e!==this.visibility&&(this.visibility=e,e?this.show():this.hide())}moveTo(e,t){const s=document.getElementById(this.canvas.id);if(t=void 0===t||t){const t=document.getElementById(e);return void(s&&t&&t.parentNode.insertBefore(s,t))}const r=document.getElementById(e);if(s){if(r.nextSibling)return void r.parentNode.insertBefore(s,r.nextSibling);r.parentNode.appendChild(s)}}getTopLeft(){var e,t=this.map;t&&(e=t.getBounds().getNorthWest());return e}addData(e,t){this.renderer.addData(e,t)}update(e){this.renderer.update(e)}getData(){return this.renderer&&(this.dataSet=this.renderer.getData()),this.dataSet}removeData(e){this.renderer&&this.renderer.removeData(e)}clearData(){this.renderer.clearData()}show(){return this.renderer&&this.renderer._show(),this}hide(){return this.renderer&&this.renderer._hide(),this}_createCanvas(){var e=document.createElement("canvas");e.id=this.id,e.style.position="absolute",e.style.top="0px",e.style.left="0px";var t="undefined"==typeof window?{}:window,s=this.devicePixelRatio=t.devicePixelRatio||1;return e.width=parseInt(this.map.getCanvas().style.width)*s,e.height=parseInt(this.map.getCanvas().style.height)*s,this.mapVOptions.context&&"2d"!=this.mapVOptions.context||e.getContext("2d").scale(s,s),e.style.width=this.map.getCanvas().style.width,e.style.height=this.map.getCanvas().style.height,e}setZIndex(e){this.canvas.style.zIndex=e}}co.a.supermap.MapvLayer=_o;
  1570. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1571. * This program are made available under the terms of the Apache License, Version 2.0
  1572. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1573. class Eo{constructor(e,t){this.id=e,this.map=null,this.opacity=1,this.parseNumber=!1,this.enableHighlight=!1,this.highlight={color:"#ADA91E"},this.baseHeightField=null,this.height=null,this.heightField="height",this.themeField=this.heightField,this.showLegend=!0,this.legendTitle=null,this.legendTheme="light",this.legendOrientation="horizontal",this.legendPosition="bottom-right",this._highlightLayerId=`${this.id}-highlightLayer`,this._extend(this,t)}setLayerOptions(e){return this._extend(this,e),this}setHighlightStyleOptions(e){return this._extend(this.highlight,e),this}setData(e,t){var s=this;return s.data=e,null!=t&&(s.parseNumber=t),s.parseNumber&&s.data&&s.data.features&&s.data.features.map(function(e){return s.baseHeightField&&e.properties[s.baseHeightField]&&(e.properties[s.baseHeightField]=parseFloat(e.properties[s.baseHeightField])),s.heightField&&e.properties[s.heightField]&&(e.properties[s.heightField]=parseFloat(e.properties[s.heightField])),e}),this}getData(){return this.data}addTo(e){return this.map=e,this.map?(this.show(),this):this}show(e){return this._extend(this,e),this._addLayer(),this.enableHighlight&&this._addHighLightLayer(),this.showLegend&&(this.legend||(this.legend=this._createLegendControl()),this.map.addControl(this.legend,this.legendPosition)),this}remove(){if(!this.map)return this;var e=this.id?this.id:"theme3DLayer";return this.map.getLayer(e)&&(this.map.off("mousemove",e,this._onMouseMove.bind(this)),this.map.on("mouseout",e,this._onMouseMove.bind(this)),this.map.removeLayer(e)),this.map.getLayer(this._highlightLayerId)&&(this._selectFeatureId=null,this.map.removeLayer(this._highlightLayerId)),this.legend&&this.map.removeControl(this.legend),this}getLayerStyleOptions(){}getHighlightStyleOptions(){}_createLegendControl(e){var t=this;function s(){}return s.prototype.onAdd=function(s){this._map=s,this._container=document.createElement("div");var r="legend-light";"dark"===t.legendTheme&&(r="legend-dark");var i=" legend-horizontal";if("vertical"===t.legendOrientation&&(i=" legend-vertical"),this._container.className="mapboxgl-ctrl legend "+r+i,e)this._container.innerHTML=e;else{var a=" <div class='legend-title'>"+(t.legendTitle||"")+"</div>",n="<div class='legend-content'>"+(t._createLegendElement.call(t)||"")+"</div>";this._container.innerHTML=a+n}return t._appendLegendCSSStyle(),this._container},s.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},new s}_createLegendElement(){}_addLayer(){var e=this.getLayerStyleOptions(),t=this.id?this.id:"theme3DLayer",s=this.sourceId=t+"Source";this.map.getSource(s)?(this.map.removeSource(s),this.map.addSource(s,{type:"geojson",data:this.data})):this.map.addSource(s,{type:"geojson",data:this.data}),this.map.addLayer({id:t,type:"fill-extrusion",source:s,paint:e}),this.map.moveLayer(t)}_addHighLightLayer(){if(this.map){var e=this.map;e.addLayer({id:this._highlightLayerId,type:"fill-extrusion",source:this.sourceId,paint:this.getHighlightStyleOptions(),filter:["in","$id",""]}),this._selectFeatureId=null,e.on("mousemove",this.id,this._onMouseMove.bind(this)),e.on("mouseout",this.id,this._onMouseMove.bind(this))}}_onMouseMove(e){var t=this,s=this.map,r=s.queryRenderedFeatures(e.point,{layers:[t.id]});if(t.highlight&&t.highlight.callback&&t.highlight.callback(r,e),!r||r.length<1)return t._clearHighlight.call(t),void(t._selectFeatureId=null);var i=r[0].id;t._selectFeatureId!==i&&(t._selectFeatureId=i,s.setFilter(t._highlightLayerId,["==","$id",t._selectFeatureId]))}_clearHighlight(){this.map&&this.map.setFilter(this._highlightLayerId,["in","$id",""])}_appendLegendCSSStyle(){var e=document.createElement("style");e.type="text/css";e.innerHTML="\n .legend {\n display: inline-block;\n border-radius: 2px;\n -moz-border-radius: 2px;\n -webkit-border-radius: 2px;\n font-size: 12px;\n color: rgba(0, 0, 0, 0.8);\n background-color: rgb(255, 255, 255);\n }\n .legend-light {\n color: rgba(0, 0, 0, 0.8);\n background-color: rgb(255, 255, 255);\n box-shadow: 0px 0px 6px #bbbbbb;\n -moz-box-shadow: 0px 6px 10px #bbbbbb;\n -webkit-box-shadow: 0px 0px 6px #bbbbbb;\n }\n .legend-dark {\n color: rgba(255, 255, 255, 0.8);\n background-color: rgb(64, 64, 64);\n }\n .legend .legend-title {\n min-height: 14px;\n max-width: 500px;\n padding:6px 10px;\n }\n .legend-light .legend-title {\n color: rgba(0, 0, 0, 0.8);\n }\n .legend-dark .legend-title {\n color: rgba(255, 255, 255, 0.8);\n }\n .legend-content{\n padding:6px 10px;\n }\n "+this._legendCSSStyle(),document.getElementsByTagName("head")[0].appendChild(e)}_legendCSSStyle(){return"\n .legend ul {\n padding: 0;\n margin: 0 16px;\n height: 100%;\n display: block;\n list-style: none;\n }\n\n .legend li {\n vertical-align: middle;\n }\n\n .legend li span:first-child {\n vertical-align: middle;\n }\n\n .legend li span:last-child {\n line-height: 28px;\n max-width: 200px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n -ms-text-overflow: ellipsis;\n }\n\n .legend-vertical li {\n height: 28px;\n }\n\n .legend-vertical li span:first-child {\n display: inline-block;\n width: 60px;\n height: 100%;\n }\n\n .legend-vertical li span:last-child {\n display: inline-block;\n margin-left: 16px;\n height: 100%;\n }\n\n .legend-horizontal li {\n height: 56px;\n float: left;\n }\n\n .legend-horizontal li span:first-child {\n display: block;\n width: 100%;\n height: 50%;\n }\n\n .legend-horizontal li span:last-child {\n display: block;\n vertical-align: middle;\n width: 60px;\n height: 50%;\n text-align: center;\n }\n "}_extend(e){for(var t=0;t<Object.getOwnPropertyNames(arguments).length;t++){var s=Object.getOwnPropertyNames(arguments)[t];if("caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s){var r=arguments[s];if(r)for(var i=0;i<Object.getOwnPropertyNames(r).length;i++){var a=Object.getOwnPropertyNames(r)[i];"caller"!=s&&"callee"!=s&&"length"!=s&&"arguments"!=s&&(e[a]=r[a])}}}return e}}co.a.supermap.Theme3DLayer=Eo;
  1574. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1575. * This program are made available under the terms of the Apache License, Version 2.0
  1576. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1577. class Ao extends Eo{constructor(e,t){super(e,t),this.heightStops=null,this.colorStops=null,this.base=null,this.legendRatio=1,this._extend(this,t)}getLayerStyleOptions(){var e=null==this.opacity?1:this.opacity;e=isNaN(parseFloat(e))?1:parseFloat(e);var t=/^[0-9]+.?[0-9]*$/,s={"fill-extrusion-color":{stops:this.colorStops,property:this.themeField||this.heightField,type:"interval",base:t.test(this.base)?this.base:1},"fill-extrusion-opacity":e};return this.heightStops?s["fill-extrusion-height"]={stops:this.heightStops,property:this.heightField||"height",base:t.test(this.base)?this.base:1}:this.height?s["fill-extrusion-height"]=this.height:s["fill-extrusion-height"]={property:this.heightField||"height",type:"identity"},this.baseHeightField&&(s["fill-extrusion-base"]={property:this.baseHeightField,type:"identity"}),s}getHighlightStyleOptions(){return{"fill-extrusion-color":this.highlight&&null!=this.highlight.color?this.highlight.color:"#ADA91E","fill-extrusion-height":{stops:this.heightStops,property:this.heightField},"fill-extrusion-opacity":this.highlight&&this.highlight.opacity||.6}}_createLegendElement(){var e,t=this.colorStops&&this.colorStops.length||0,s="<ul>";for(e=0;e<t;e++){var r=this.colorStops[e][0],i=this._getWrapperText(r);if(e===t-1)i="> "+i;else i=i+"-"+this._getWrapperText(this.colorStops[e+1][0]);s+="<li><span style='background-color:"+this.colorStops[e][1]+";'></span><span>"+i+"</span></li>"}return s+="</ul>"}_getWrapperText(e){var t=e*(null==this.legendRatio?1:parseFloat(this.legendRatio)),s=parseFloat(t);return s%1e6<=1e6?s.toString():parseInt(s/1e3)+"k"}}co.a.supermap.RangeTheme3DLayer=Ao;
  1578. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1579. * This program are made available under the terms of the Apache License, Version 2.0
  1580. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1581. class wo extends So{constructor(e,t){super(e,t),this.style=t.style,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle,this.themeField=t.themeField,this.styleGroups=t.styleGroups}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=_n.transformStyle(this.highlightStyle);for(var r=new Pn(e,this,_n.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getStyleByData(e){var t={},s=e;if(t=ye.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h<u;h++)if(o>=a[h].start&&o<a[h].end){var c=a[h].style;t=ye.copyAttributesWithClip(t,c)}}return s.style&&!0===this.isAllowFeatureStyle&&(t=ye.copyAttributesWithClip(s.style)),t}}co.a.supermap.RangeThemeLayer=wo;
  1582. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1583. * This program are made available under the terms of the Apache License, Version 2.0
  1584. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1585. class Po extends vo{constructor(e,t,s){super(e,t,s),this.symbolType=t,this.symbolSetting=s.symbolSetting,this.themeField=s.themeField}setSymbolType(e){this.symbolType=e,this.redraw()}createThematicFeature(e){var t;return En[this.symbolType]&&this.themeField&&this.symbolSetting&&(t=new En[this.symbolType](e,this,[this.themeField],this.symbolSetting)),!!t&&(t.assembleShapes(),t)}}co.a.supermap.RankSymbolThemeLayer=Po;
  1586. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1587. * This program are made available under the terms of the Apache License, Version 2.0
  1588. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1589. class Lo extends Eo{constructor(e,t){super(e,t),this.colorStops=null,this._extend(this,t)}getLayerStyleOptions(){var e=null==this.opacity?1:this.opacity;e=isNaN(parseFloat(e))?1:parseFloat(e);var t={"fill-extrusion-color":{stops:this.colorStops,property:this.themeField,type:"categorical"},"fill-extrusion-opacity":e};return null!=this.height?t["fill-extrusion-height"]=this.height:t["fill-extrusion-height"]={property:this.heightField||"height",type:"categorical"},this.baseHeightField&&(t["fill-extrusion-base"]={property:this.baseHeightField,type:"identity"}),t}getHighlightStyleOptions(){var e={"fill-extrusion-color":this.highlight&&null!=this.highlight.color?this.highlight.color:"#ADA91E","fill-extrusion-height":{stops:this.heightStops,property:this.heightField,type:"categorical"},"fill-extrusion-opacity":this.highlight&&this.highlight.opacity||.6};return null!=this.height&&(e["fill-extrusion-height"]=this.height||0),e}_createLegendElement(){for(var e="<ul>",t=this.colorStops&&this.colorStops.length||0,s=0;s<t;s++){var r=this.colorStops[s][0];e+="<li><span style='background-color:"+this.colorStops[s][1]+";'></span><span>"+r+"</span></li>"}return e+="</ul>"}}co.a.supermap.UniqueTheme3DLayer=Lo;
  1590. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1591. * This program are made available under the terms of the Apache License, Version 2.0
  1592. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1593. class Oo extends So{constructor(e,t){super(e,t),this.themeField=t.themeField,this.style=t.style,this.styleGroups=t.styleGroups,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=_n.transformStyle(this.highlightStyle);for(var r=new Pn(e,this,_n.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getStyleByData(e){var t={},s=e;if(t=ye.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h<u;h++)if(o.toString()===a[h].value.toString()){var c=a[h].style;t=ye.copyAttributesWithClip(t,c)}}return s.style&&!0===this.isAllowFeatureStyle&&(t=ye.copyAttributesWithClip(s.style)),t}}co.a.supermap.UniqueThemeLayer=Oo;
  1594. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1595. * This program are made available under the terms of the Apache License, Version 2.0
  1596. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1597. class Mo{constructor(e,t,s){this.lngLat=fo.isArray(e)?{lng:e[0],lat:e[1]}:e,this.style=fo.extend({},t),this.attributes=s}getId(){return this.id}setId(e){this.id=e}getLngLat(){return this.lngLat}setLngLat(e){this.lngLat=fo.isArray(e)?{lng:e[0],lat:e[1]}:e}setStyle(e){this.style=fo.extend(this.style,e)}getStyle(){return this.style}setAttributes(e){this.attributes=fo.extend({},this.attributes,e)}getAttributes(){return this.attributes}}co.a.supermap.Graphic=Mo;
  1598. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1599. * This program are made available under the terms of the Apache License, Version 2.0
  1600. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1601. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1602. * This program are made available under the terms of the Apache License, Version 2.0
  1603. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1604. const No={color:[0,0,0,255],opacity:.8,radius:10,radiusScale:1,radiusMinPixels:0,radiusMaxPixels:Number.MAX_SAFE_INTEGER,strokeWidth:1,outline:!1};class Io{constructor(e,t){let s=fo.extend(this,No,t);this.id=e||ye.createUniqueID("graphicLayer_"),this.graphics=[].concat(s.graphics),this.visibility=!0}addTo(e){this.onAdd(e)}onAdd(e){if(this.map=e,this.canvas)return this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas),this;this._initContainer(),e.getCRS&&e.getCRS()!==co.a.CRS.EPSG3857&&(this.coordinateSystem=3,this.isGeographicCoordinateSystem=!0);let t=this.getState(),{data:s,color:r,radius:i,opacity:a,highlightColor:n,radiusScale:o,radiusMinPixels:l,radiusMaxPixels:h,strokeWidth:u,outline:c}=t,d=this,p={id:"scatter-plot",data:s,pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:r,opacity:a,radius:i,radiusScale:o,highlightColor:n,radiusMinPixels:l,radiusMaxPixels:h,strokeWidth:u,outline:c,isGeographicCoordinateSystem:this.isGeographicCoordinateSystem,coordinateSystem:this.coordinateSystem,getPosition:function(e){if(!e)return[0,0,0];let t=e.getLngLat();return t&&[t.lng,t.lat,0]},getColor:function(e){let t=e&&e.getStyle();return t&&t.color||d.color},getRadius:function(e){let t=e&&e.getStyle();return t&&t.radius||d.radius},updateTriggers:{getColor:[r],getRadius:[i]}};this.onClick&&(p.onClick=this.onClick),this.onHover&&(p.onHover=this.onHover),this.layer=new window.DeckGL.ScatterplotLayer(p);let m={};for(let e in t)m[e]=t[e];return m.layers=[this.layer],m.canvas=this.canvas,this.deckGL=new window.DeckGL.experimental.DeckGLJS(m),this.map.on("render",this._moveEvent.bind(this)),this.map.on("resize",this._resizeEvent.bind(this)),this.draw(),this}setStyle(e){let t={color:this.color,radius:this.radius,opacity:this.opacity,highlightColor:this.highlightColor,radiusScale:this.radiusScale,radiusMinPixels:this.radiusMinPixels,radiusMaxPixels:this.radiusMaxPixels,strokeWidth:this.strokeWidth,outline:this.outline};fo.extend(this,t,e),this.update()}setGraphics(e){this.graphics=this.graphics||[],this.graphics.length=0;let t=fo.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]),this.layer.props.data.length=0;for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.update()}addGraphics(e){this.graphics=this.graphics||[];let t=fo.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]);for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.update()}getGraphicBy(e,t){let s=null;for(let r in this.graphics)if(this.graphics[r][e]===t){s=this.graphics[r];break}return s}getGraphicById(e){return this.getGraphicBy("id",e)}getGraphicsByAttribute(e,t){var s,r=[];for(let i in this.graphics)(s=this.graphics[i])&&s.attributes&&s.attributes[e]===t&&r.push(s);return r}removeGraphics(e=null){if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,this.layer.props.data&&(this.layer.props.data.length=0),void this.update();ye.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--){let s=e[t],r=ye.indexOf(this.graphics,s);-1!==r&&this.graphics.splice(r,1)}this.update()}update(){if("Awaiting state"!==this.layer.lifecycle){this.layer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0});let e=this.getState();this.layer.setState(e)}}clear(){this.removeGraphics(),this.deckGL.finalize()}remove(){this.map.off("render",this._moveEvent.bind(this)),this.map.off("resize",this._resizeEvent.bind(this)),this.map.getCanvasContainer().removeChild(this.canvas)}removeFromMap(){this.remove(),this.clear()}moveTo(e,t){var s=document.getElementById(this.id);if(t=void 0===t||t){var r=document.getElementById(e);s&&r&&r.parentNode.insertBefore(s,r)}else{var i=document.getElementById(e);if(s){if(i.nextSibling)return void i.parentNode.insertBefore(s,i.nextSibling);i.parentNode.appendChild(s)}}}setVisibility(e){this.canvas&&e!==this.visibility&&(this.visibility=e,this.canvas.style.display=e?"block":"none")}getState(){let e=this.map,t=parseInt(this.canvas.style.width),s=parseInt(this.canvas.style.height),r=e.getCenter(),i={longitude:r.lng,latitude:r.lat,zoom:e.getZoom(),maxZoom:e.getMaxZoom(),pitch:e.getPitch(),bearing:e.getBearing()},a={};for(let e in i)a[e]=i[e];return a.width=t,a.height=s,a.data=this.graphics,a.color=this.color,a.radius=this.radius,a.opacity=this.opacity,a.highlightColor=this.highlightColor,a.radiusScale=this.radiusScale,a.radiusMinPixels=this.radiusMinPixels,a.radiusMaxPixels=this.radiusMaxPixels,a.strokeWidth=this.strokeWidth,a.outline=this.outline,e.getCRS&&e.getCRS()!==co.a.CRS.EPSG3857&&(a.coordinateSystem=this.coordinateSystem,a.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem),a}draw(){let e=this.getState(),t={};for(let s in e)t[s]=e[s];t.layers=[this.layer],t.canvas=this.canvas,this.deckGL.setProps(t)}_moveEvent(){this.draw()}_resizeEvent(){let e=this.canvas,t=this.map;e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,this.draw()}_initContainer(){this.canvas=this._createCanvas(),this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}_createCanvas(){let e=document.createElement("canvas");this.id&&(e.id=this.id),e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.cursor="";let t=this.map;return e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,e}}co.a.supermap.GraphicLayer=Io;var Fo=s(2);
  1605. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1606. * This program are made available under the terms of the Apache License, Version 2.0
  1607. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/function Ro(e,t,s){if(e===s||e===t)return e;let r=s-t;return((e-t)%r+r)%r+t}function Do(e){return e*Math.PI/180}var ko={matrix:[1,-1,0,0],projection:{R:6378137,minZoom:0,maxZoom:22,nativeMaxZoom:19,RAD:Math.PI/180,METERS_PER_DEGREE:6378137*Math.PI/180,MAX_LATITUDE:85.0511287798,project:function(e){const t=this.RAD,s=this.METERS_PER_DEGREE,r=this.MAX_LATITUDE;let i,a=e instanceof Array?{lng:e[0],lat:e[1]}:{lng:e.lng,lat:e.lat},n=a.lng,o=Math.max(Math.min(r,a.lat),-r);return{x:n*s,y:(i=0===o?0:Math.log(Math.tan((90+o)*t/2))/t)*s}},unproject:function(e){const t=e.x,s=e.y,r=this.RAD,i=this.METERS_PER_DEGREE;let a;return 0===s?a=0:(a=s/i,a=(2*Math.atan(Math.exp(a*r))-Math.PI/2)/r),{lng:Ro(t/i,-180,180),lat:Ro(a,-this.MAX_LATITUDE,this.MAX_LATITUDE)}},locate:function(e,t,s){if(!e)return null;if(t=t||0,s=s||0,!t&&!s)return e;let r=e.lng;if(0!==t){let s=Math.abs(t),i=Do(e.lng);r=Ro(180*(i+=2*Math.sqrt(Math.pow(Math.sin(s/(2*this.R)),2)/Math.pow(Math.cos(i),2))*(s>0?1:-1))/Math.PI,-180,180)}let i=e.lat;if(0!==s){let t=Math.abs(s),r=Do(e.lat);i=Ro(180*(r+=2*Math.sin(t/(2*this.R))*(t>0?1:-1))/Math.PI,-90,90)}return{lng:r,lat:i}},getResolution:function(e){if(!this.resolutions){for(var t=[],s=12756274*Math.PI,r=0;r<=this.maxZoom;r++)t[r]=s/(256*Math.pow(2,r));this.resolutions=t}let i=0|e,a=this.resolutions.length;i=i<0?0:i>a-1?a-1:i;const n=this.resolutions[i];if((0|e)!==e&&i!==a-1){return n+(this.resolutions[i+1]-n)*(e-i)}return n}},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},lngLatToPoint:function(e,t){var s=this.project(e);return this.transform(s,this.projection.getResolution(t))},locate:function(e,t,s){return this.projection.locate(e,t,s)},transform:function(e,t){return{x:this.matrix[0]*(e.x-this.matrix[2])/t,y:this.matrix[1]*(e.y-this.matrix[3])/t}}};co.a.supermap.Transform=ko;
  1608. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1609. * This program are made available under the terms of the Apache License, Version 2.0
  1610. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1611. const Bo=ko.projection,{Color:Go,Scene:Uo,WebGLRenderer:Jo,CanvasRenderer:Ho,PerspectiveCamera:jo}=Fo,Vo=Math.PI/180,Wo=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,zo=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;class qo{constructor(e,t,s){this._layer=e,this.renderer=t||"gl",this.options=s}setMap(e){this.map=e}render(){this._layer&&(this.prepare(),this._layer.fire("initialized"),this._layer&&this._layer.draw(this.context,this.scene,this.camera),this._layer.fire("draw"),this.renderScene())}update(){this.remove(),this.render()}renderScene(){this.locationCamera(),this.animationFrame=this.renderFrame(function(){this.animationFrame=null,this.context&&this.context.render(this.scene,this.camera)}.bind(this))}renderFrame(e){return Wo(function(){e&&"function"==typeof e&&e()})}resize(){this._resetElementSize(this.container),this._resetElementSize(this.canvas);let e=this.canvas.width,t=this.canvas.height,s=this.getMapSize();this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.context.setSize(s.width,s.height),this.renderScene()}prepare(){if(!this.map)return new Error("map object is necessary");this.canvas?this.clear(this.context):(this._initContainer(),this._initThreeRenderer(),this._layer.fire("rendererinitialized"))}getMapSize(){let e=this.map.getContainer();return{width:e.clientWidth,height:e.clientHeight}}cancelFrame(){null!=this.animationFrame&&zo(this.animationFrame)}remove(){null!=this.animationFrame&&zo(this.animationFrame),this.container.removeChild(this.canvas),this.container.parentNode.removeChild(this.container),this.context=null,this.canvas=null,this.container=null}clear(e){e&&e.clear&&e.clear(),e&&e.clearRect&&e.clearRect(0,0,e.canvas.width,e.canvas.height)}getScale(e){let t=this.map,s=null==e?t.getZoom():e,r=Bo.getResolution(Bo.nativeMaxZoom);return Bo.getResolution(s)/r}getCanvasContainer(){return this.container}getCanvas(){return this.canvas}locationCamera(){let e=this.map,t=this.getMapSize(),s=e.transform.zoomScale(Bo.nativeMaxZoom-e.getZoom()-1),r=Math.tan(e.transform.fov/2*Vo),i=this.camera,a=e.getPitch()*Vo,n=-s*t.height/2/r;i.position.z=n*Math.cos(a);let o=ko.lngLatToPoint(e.getCenter(),Bo.nativeMaxZoom),l=Math.sin(a)*n,h=e.getBearing()*Vo;i.position.x=o.x+l*Math.sin(h),i.position.y=o.y-l*Math.cos(h),i.up.set(Math.sin(h),-Math.cos(h),0),i.lookAt(new Fo.Vector3(o.x,o.y,0)),i.updateProjectionMatrix()}_initContainer(){var e=this._createCanvas(),t=this.container=document.createElement("div");this._layer._layerId&&(t.id=this._layer._layerId),t.className="threejs-wrapper",t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.overflow="hidden",this._resetElementSize(t),t.appendChild(e),this.map.getCanvasContainer().appendChild(t)}_createCanvas(){if(this.canvas)return;const e=this.canvas=document.createElement("canvas");return e.className="threejs-overlay",e.style.outline="none",this._resetElementSize(e),e}_resetElementSize(e){if(!e)return;const t=this.getMapSize(),s=window.devicePixelRatio?window.devicePixelRatio:1,r=s*t.width,i=s*t.height;e.width=r,e.height=i,e.style.width=t.width+"px",e.style.height=t.height+"px"}_initThreeRenderer(){let e,t=this.map,s=this.getMapSize();"gl"===(this.renderer||"gl")?((e=new Jo({canvas:this.canvas,alpha:!0,antialias:!0,preserveDrawingBuffer:!0},this.options)).autoClear=!0,e.clear()):e=new Ho(ye.extend({canvas:this.canvas,alpha:!0},this.options)),e.setClearColor(new Go(1,1,1),0),e.canvas=this.canvas,this.context=e;let r=t.transform.fov,i=Math.tan(r/2*Vo),a=this.getScale(Bo.minZoom)/this.getScale(Bo.nativeMaxZoom)*s.height/2/i;this.camera=new jo(r,s.width/s.height,1,a),this.scene=new Uo,this.scene.add(this.camera)}}
  1612. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1613. * This program are made available under the terms of the Apache License, Version 2.0
  1614. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1615. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1616. * This program are made available under the terms of the Apache License, Version 2.0
  1617. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/const{Vector3:Yo,Shape:Qo,Mesh:Xo,BufferGeometry:Ko,ExtrudeGeometry:Zo}=Fo;class $o extends co.a.Evented{constructor(e,t,s){super(),this._layerId=e,this.options=s;let r=s&&s.threeOptions;this.renderer=new qo(this,t,r)}toThreeShape(e){if(!e)return null;let t=this.getCoordinatesCenter(e),s=this.lngLatToPosition(t),r=e.map(e=>this.lngLatToPosition({lng:e[0],lat:e[1]}).sub(s));return new Qo(r)}toThreeMesh(e,t,s,r){if(!e)return null;let i=e;r&&(i=this.removeDuplicatedCoordinates(e));let a=this.distanceToThreeVector3(t,t).x,n=this.toThreeShape(i),o=new Zo(n,{amount:a,bevelEnabled:!0}),l=(new Ko).fromGeometry(o),h=new Xo(l,s),u=this.lngLatToPosition(this.getCoordinatesCenter(i));return h.position.set(u.x,u.y,-a),h}addObject(e,t){t&&e&&this.setPosition(e,t),this.renderer&&this.renderer.scene.add(e)}getScene(){return this.renderer.scene}getCamera(){return this.renderer.camera}getThreeRenderer(){return this.renderer.context}clearMesh(){let e=this.renderer.scene;if(!e)return this;for(let t=e.children.length-1;t>=0;t--)e.children[t]instanceof Fo.Mesh&&e.remove(e.children[t]);return this}clearAll(e){let t=this.renderer.scene;if(!t)return this;for(let s=t.children.length-1;s>=0;s--)!e&&t.children[s]instanceof Fo.Camera||t.remove(t.children[s]);return this}setPosition(e,t){if(!e||!t)return this;var s=this.lngLatToPosition(t);return e.position.set(s.x,s.y,s.z),this}lngLatToPosition(e){let t=ko.projection.nativeMaxZoom,s=ko.lngLatToPoint(e,t);return new Yo(s.x,s.y,-0)}distanceToThreeVector3(e,t,s){let r=this._map,i=s||r.getCenter(),a=ko.projection.nativeMaxZoom,n=ko.locate(i,e,t),o=ko.lngLatToPoint(i,a),l=ko.lngLatToPoint(n,a),h=Math.abs(l.x-o.x)*Math.sign(e),u=Math.abs(l.y-o.y)*Math.sign(t);return new Yo(h,u,0)}removeDuplicatedCoordinates(e){function t(e,t){return e[0]===t[0]&&e[1]===t[1]}let s=[].concat(e);for(let e=s.length-1;e>=1;e--)t(s[e],s[e-1])&&s.splice(e,1);return t(s[0],s[s.length-1])&&s.splice(s.length-1,1),s}getCoordinatesCenter(e){let t=0,s=0,r=0,i=0,a=e.length;for(;i<a;i++)e[i]&&(t+=e[i][0],s+=e[i][1],r++);return{lng:t/r,lat:s/r}}addTo(e){var t=this;return t._map=e,t.renderer.setMap(e),t.renderer.render(),t._map.on("render",this._update.bind(t)),t._map.on("resize",this._resize.bind(t)),t.on("render",function(){this.context&&this.context.render(this.scene,this.camera)}.bind(t.renderer)),this}getCanvasContainer(){return this.renderer.getCanvasContainer()}getCanvas(){return this.renderer.getCanvas()}remove(){let e=this._map,t=this;e.off("render",t._update.bind(t)),e.off("resize",t._resize.bind(t)),t.renderer.remove(),t._map=null}draw(e,t,s){return this}renderScene(){return this.renderer.renderScene(),this.fire("renderscene"),this}_resize(){this.renderer.resize()}_update(){return this.renderScene(),this.fire("render"),this}}co.a.supermap.ThreeLayer=$o;
  1618. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1619. * This program are made available under the terms of the Apache License, Version 2.0
  1620. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1621. class el extends co.a.Evented{constructor(e,t){super();var s=t||{};this.name=e,this.id=s.id?s.id:ye.createUniqueID("HeatMapLayer_"),this.map=s.map?s.map:null,this.loadWhileAnimating=void 0===s.loadWhileAnimating||s.loadWhileAnimating,this.visibility=!0,this.opacity=s.opacity?s.opacity:1,this.colors=s.colors?s.colors:["blue","cyan","lime","yellow","red"],this.useGeoUnit=!!s.useGeoUnit&&s.useGeoUnit,this.radius=s.radius?s.radius:50,this.featureWeight=s.featureWeight?s.featureWeight:null,this.features=[],this.maxWeight=null,this.minWeight=null,this.EVENT_TYPES=["featuresadded","featuresremoved","featuresdrawcompleted"],this.supported=!1,this.rootCanvas=null,this.canvasContext=null,this.maxWidth=null,this.maxHeight=null}onAdd(e){this.map=e,0!==this.features.length&&(this._createCanvasContainer(),this.map.on("resize",this._resizeEvent.bind(this)),this.map.on("zoomstart",this._zoomStartEvent.bind(this)),this.map.on("zoomend",this._zoomEndEvent.bind(this)),this.map.on("rotatestart",this._rotateStartEvent.bind(this)),this.map.on("rotate",this._rotateEvent.bind(this)),this.map.on("rotateend",this._rotateEndEvent.bind(this)),this.map.on("dragend",this._dragEndEvent.bind(this)),this.map.on("movestart",this._moveStartEvent.bind(this)),this.map.on("move",this._moveEvent.bind(this)),this.map.on("moveend",this._moveEndEvent.bind(this)),this.map.on("remove",this.removeFromMap.bind(this)),this.refresh())}removeFromMap(){this.removeAllFeatures(),this.map.getCanvasContainer().removeChild(this.rootCanvas)}_createCanvasContainer(){this.supported=!0,this.mapContainer=this.map.getCanvasContainer(),this.rootCanvas=document.createElement("canvas"),this.rootCanvas.id=this.id;var e=this.map.getCanvas();this.rootCanvas.width=this.maxWidth=parseInt(e.width),this.rootCanvas.height=this.maxHeight=parseInt(e.height),ye.modifyDOMElement(this.rootCanvas,null,null,null,"absolute",null,null,this.opacity),this.canvasContext=this.rootCanvas.getContext("2d"),this.mapContainer.appendChild(this.rootCanvas)}addFeatures(e){this.features=this.toiClientFeature(e),this.fire(this.EVENT_TYPES[0],{features:e,succeed:!0}),this.refresh()}refresh(){if(0!==this.features.length&&this.map){var e=this.map.getBounds();this.updateHeatPoints(e)}}setOpacity(e){e!==this.opacity&&(this.opacity=e,ye.modifyDOMElement(this.rootCanvas,null,null,null,null,null,null,e),null!==this.map&&this.fire("changelayer",{layer:this,property:"opacity"}))}updateHeatPoints(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}convertFastToPixelPoints(e){var t,s,r,i,a,n,o,l=[],h=e.getEast()-e.getWest(),u=e.getNorth()-e.getSouth(),c=this.map.getCanvas();i=h/c.width>u/c.height?h/c.width:u/c.height,this.useRadius=this.useGeoUnit?parseInt(this.radius/i):this.radius;for(var d=0;d<this.features.length;d++){var p=this.features[d],m=p.geometry,f=this.getPixelXY(new ge(m.x,m.y));this.featureWeight?(f.weight=p.attributes[this.featureWeight],this.maxWeight||(a=a||f.weight,n=n||f.weight,a=Math.max(a,f.weight),n=Math.min(n,f.weight))):f.weight=1,t=Math.floor(f.x),s=Math.floor(f.y),r=f.weight,l.push([t,s,r])}this.maxWeight?this.draw(l,this.maxWeight):(o=a&&n?(a+n)/2:1,this.draw(l,o))}draw(e,t){if(!(this.maxHeight>0&&this.maxWidth>0))return!1;var s=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var r=0;r<e.length;r++){var i=e[r];this.canvasContext.globalAlpha=Math.max(i[2]/t,.05),this.canvasContext.drawImage(this.circle,i[0]-this.useRadius,i[1]-this.useRadius)}var a=s.getImageData(0,0,this.maxWidth,this.maxHeight);this.colorize(a.data,this.grad),s.putImageData(a,0,0)}colorize(e,t){for(var s,r=0;r<e.length;r+=4)(s=4*e[r+3])&&(e[r]=t[s],e[r+1]=t[s+1],e[r+2]=t[s+2])}drawCircle(e){var t=e/2,s=this.circle=document.createElement("canvas"),r=s.getContext("2d");s.height=2*e,s.width=2*e,r.shadowOffsetX=r.shadowOffsetY=2*e,r.shadowBlur=t,r.shadowColor="#000000",r.beginPath(),r.arc(-e,-e,e/2,0,2*Math.PI,!0),r.closePath(),r.fill()}createGradient(){var e=this.colors,t=document.createElement("canvas"),s=t.getContext("2d"),r=s.createLinearGradient(0,0,0,256);t.height=256,t.width=1;for(var i=1,a=0,n=e.length;a<n;a++)r.addColorStop(i/n,e[a]),i++;s.fillStyle=r,s.fillRect(0,0,1,256),this.grad=s.getImageData(0,0,1,256).data}getPixelXY(e){var t,s=this.map;if(e instanceof Te||e instanceof Ee){let r=s.project(new co.a.LngLat(e.x,e.y));t={x:parseInt(r.x),y:parseInt(r.y)}}if(e instanceof ge){let r=s.project(new co.a.LngLat(e.lon,e.lat));t={x:parseInt(r.x),y:parseInt(r.y)}}return t}toiClientFeature(e){ye.isArray(e)||(e=[e]);let t=[];for(let s=0;s<e.length;s++)if(e[s]instanceof Re)t.push(e[s]);else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[s].type)){let r=new je;t=t.concat(r.read(e[s]))}else{if(!e[s].geometry||!e[s].geometry.parts)throw new Error(`Features[${s}]'s type does not match, please check.`);t.push(wi.fromJson(e[s]).toFeature())}return t}removeFeatures(e){if(e&&0!==e.length&&this.features&&0!==this.features.length){if(e===this.features)return this.removeAllFeatures();ye.isArray(e)||(e=[e]);for(var t,s,r=[],i=0,a=e.length;i<a;i++)t=e[i],-1!==(s=ye.indexOf(this.features,t))?this.features.splice(s,1):r.push(t);var n=0==r.length;this.fire(this.EVENT_TYPES[1],{features:r,succeed:n}),this.refresh()}}removeAllFeatures(){this.features=[],this.refresh()}moveTo(e,t){var s=document.getElementById(this.rootCanvas.id);if(t=void 0===t||t){var r=document.getElementById(e);s&&r&&r.parentNode.insertBefore(s,r)}else{var i=document.getElementById(e);if(s){if(i.nextSibling)return void i.parentNode.insertBefore(s,i.nextSibling);i.parentNode.appendChild(s)}}}setVisibility(e){this.rootCanvas&&e!==this.visibility&&(this.visibility=e,this.rootCanvas.style.display=e?"block":"none")}_resizeEvent(){this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getCanvas();this.rootCanvas.style.width=e.style.width,this.rootCanvas.style.height=e.style.height,this.rootCanvas.width=this.maxWidth=parseInt(e.width),this.rootCanvas.height=this.maxHeight=parseInt(e.height);let t=window.devicePixelRatio||1;1!==t&&this.canvasContext&&this.canvasContext.scale(t,t),this.refresh()}_zoomStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!0,this._hide())}_zoomEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.zooming=!1,this._show())}_rotateStartEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!0)}_rotateEvent(){if(!this.loadWhileAnimating&&this.visibility){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing;this.rootCanvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg)"}}_rotateEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rotating=!1,this._show())}_dragEndEvent(){!this.loadWhileAnimating&&this.visibility&&this._hide()}_moveEndEvent(){!this.loadWhileAnimating&&this.visibility&&(this.rootCanvas.style.transform="",this.refresh(),this._show())}_moveStartEvent(){if(!this.loadWhileAnimating&&this.visibility){this.startPitch=this.map.getPitch(),this.startBearing=this.map.getBearing();var e=this.map.project(new co.a.LngLat(0,0));this.startMoveX=e.x,this.startMoveY=e.y}}_moveEvent(){if(!this.loadWhileAnimating&&this.visibility){if(!this.rotating&&!this.zooming){0!==this.map.getPitch()&&this._hide(),this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px";var e=this.map.getPitch()-this.startPitch,t=-this.map.getBearing()+this.startBearing,s=this.map.project(new co.a.LngLat(0,0)),r=s.x-this.startMoveX,i=s.y-this.startMoveY;this.rootCanvas.style.transform="rotateX("+e+"deg) rotateZ("+t+"deg) translate3d("+r+"px, "+i+"px, 0px)"}}else this.refresh()}_hide(){this.rootCanvas.style.display="none"}_show(){this.rootCanvas.style.display="block"}}co.a.supermap.HeatMapLayer=el;
  1622. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1623. * This program are made available under the terms of the Apache License, Version 2.0
  1624. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1625. class tl{constructor(e,t){this.layerTypeID=e,this.data=[].concat(t.data),this.props=t.props?t.props:{},this.callback=t.callback?t.callback:{},this.id=t.layerId?t.layerId:ye.createUniqueID("graphicLayer_"+this.layerTypeID+"_"),this.visibility=!0}onAdd(e){if(this.map=e,this.canvas)return this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas),this;e.getCRS&&e.getCRS()!==co.a.CRS.EPSG3857&&(this.coordinateSystem=3,this.isGeographicCoordinateSystem=!0),this._initContainer(),this._createLayerByLayerTypeID();var t=this._getState();let s={};for(let e in t)s[e]=t[e];return s.layers=[this.layer],s.canvas=this.canvas,this.deckGL=new window.DeckGL.experimental.DeckGLJS(s),this.map.on("render",this._moveEvent.bind(this)),this.map.on("resize",this._resizeEvent.bind(this)),this._draw(),this}remove(){this.map.off("render",this._moveEvent.bind(this)),this.map.off("resize",this._resizeEvent.bind(this)),this.map.getCanvasContainer().removeChild(this.canvas)}removeFromMap(){this.remove(),this.clear()}moveTo(e,t){var s=document.getElementById(this.id);if(t=void 0===t||t){var r=document.getElementById(e);s&&r&&r.parentNode.insertBefore(s,r)}else{var i=document.getElementById(e);if(s){if(i.nextSibling)return void i.parentNode.insertBefore(s,i.nextSibling);i.parentNode.appendChild(s)}}}setVisibility(e){this.canvas&&e!==this.visibility&&(this.visibility=e,this.canvas.style.display=e?"block":"none")}setStyle(e){fo.extend(this.props,e),this._createLayerByLayerTypeID(),this.update()}setData(e){this.data=this.data||[],this.data.length=0;let t=fo.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]),this.layer.props.data.length=0;for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.data=this.layer.props.data,this.update()}addData(e){this.data=this.data||[];let t=fo.isArray(e)?[].concat(e):[e];this.layer.props.data||(this.layer.props.data=[]);for(let e=0;e<t.length;e++)this.layer.props.data.push(t[e]);this.update()}update(){if("Awaiting state"!==this.layer.lifecycle){let e={dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0};this.layer.setChangeFlags(e)}this._draw()}clear(){this.removeData(),this.deckGL.finalize()}removeData(){this.data.length=0,this.layer.props.data&&(this.layer.props.data.length=0),this.update()}_draw(){let e=this._getState();e.layers=[this.layer],e.canvas=this.canvas,this.deckGL.setProps(e)}_getState(){let e=this.map,t=parseInt(this.canvas.style.width),s=parseInt(this.canvas.style.height),r=e.getCenter(),i={width:t,height:s,longitude:r.lng,latitude:r.lat,zoom:e.getZoom(),maxZoom:e.getMaxZoom(),pitch:e.getPitch(),bearing:e.getBearing()},a={};for(let e in i)a[e]=i[e];for(let e in this.props)a[e]=this.props[e];return e.getCRS&&e.getCRS()!==co.a.CRS.EPSG3857&&(a.coordinateSystem=this.coordinateSystem,a.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem),a.data=this.data,a}_createLayerByLayerTypeID(){if(this.props.data=this.data,this.props.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem,this.props.coordinateSystem=this.coordinateSystem,this.props.pickable=Boolean(this.props.onClick)||Boolean(this.props.onHover),"scatter-plot"===this.layerTypeID)this.props.id="scatter-plot",this._createScatterPlotLayer();else if("path-layer"===this.layerTypeID)this.props.id="path-layer",this._createPathLayer();else if("polygon-layer"===this.layerTypeID)this.props.id="polygon-layer",this._createPolygonLayer();else if("arc-layer"===this.layerTypeID)this.props.id="arc-layer",this._createArcLineLayer();else{if("hexagon-layer"!==this.layerTypeID)throw new Error(this.layerTypeID+" does not support");this.props.id="hexagon-layer",this._createHexagonLayer()}}_createScatterPlotLayer(){var e=this;this.props.getPosition=this.callback.getPosition?this.callback.getPosition:function(e){if(!e)return[0,0,0];let t=e.getLngLat();return t&&[t.lng,t.lat,0]},this.callback.getColor&&(this.props.getColor=this.callback.getColor?this.callback.getColor:function(t){let s=t&&t.getStyle();return s&&s.color||e.props.color}),this.callback.getRadius&&(this.props.getRadius=this.callback.getRadius?this.callback.getRadius:function(t){let s=t&&t.getStyle();return s&&s.radius||e.props.radius}),(this.props.color||this.props.radius)&&(this.props.updateTriggers={},this.props.radius&&(this.props.updateTriggers.getRadius=[this.props.radius]),this.props.color&&(this.props.updateTriggers.getColor=[this.props.color])),this.layer=new window.DeckGL.ScatterplotLayer(this.props)}_createPathLayer(){this.props.getPath=this.callback.getPath?this.callback.getPath:function(e){return e.geometry.coordinates},this.callback.getColor&&(this.props.getColor=this.callback.getColor),this.callback.getWidth&&(this.props.getWidth=this.callback.getWidth),this.callback.getDashArray&&(this.props.getDashArray=this.callback.getDashArray),this.layer=new window.DeckGL.PathLayer(this.props)}_createPolygonLayer(){this.props.getPolygon=this.callback.getPolygon?this.callback.getPolygon:function(e){return e.geometry.coordinates},this.callback.getElevation&&(this.props.getElevation=this.callback.getElevation),this.callback.getFillColor&&(this.props.getFillColor=this.callback.getFillColor),this.callback.getLineColor&&(this.props.getLineColor=this.callback.getLineColor),this.callback.getLineWidth&&(this.props.getLineWidth=this.callback.getLineWidth),this.props.updateTriggers={},this.props.updateTriggers.getColor=this.props.color?this.props.color:[0,0,128,128],this.layer=new window.DeckGL.PolygonLayer(this.props)}_createArcLineLayer(){this.props.getSourcePosition=this.callback.getSourcePosition?this.callback.getSourcePosition:function(e){return e?e.geometry.coordinates[0]:[0,0,0]},this.props.getTargetPosition=this.callback.getTargetPosition?this.callback.getTargetPosition:function(e){return e?e.geometry.coordinates[1]:[0,0,0]},this.callback.getStrokeWidth&&(this.props.getStrokeWidth=this.callback.getStrokeWidth),this.callback.getSourceColor&&(this.props.getSourceColor=this.callback.getSourceColor),this.callback.getTargetColor&&(this.props.getTargetColor=this.callback.getTargetColor),this.layer=new window.DeckGL.ArcLayer(this.props)}_createHexagonLayer(){this.props.getPosition=this.callback.getPosition?this.callback.getPosition:function(e){return e?e.geometry.coordinates:[0,0,0]},this.callback.getColorValue&&(this.props.getColorValue=this.callback.getColorValue),this.callback.getElevationValue&&(this.props.getElevationValue=this.callback.getElevationValue),this.layer=new window.DeckGL.HexagonLayer(this.props)}_initContainer(){this.canvas=this._createCanvas(),this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}_createCanvas(){let e=document.createElement("canvas");e.id=this.id,e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.cursor="";let t=this.map;return e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,e}_moveEvent(){this._draw()}_resizeEvent(){let e=this.canvas,t=this.map;e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,this._draw()}}co.a.supermap.DeckglLayer=tl;
  1626. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1627. * This program are made available under the terms of the Apache License, Version 2.0
  1628. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1629. var sl={getPoint:function(e){if(e&&e instanceof Array)return new xo.DataSet([{geometry:{type:"Point",coordinates:e}}])},getPoints:function(e){if(e&&e instanceof Array){var t=[];return e.map(function(e){return t.push({geometry:{type:"Point",coordinates:e.geometry.coordinates}}),e}),new xo.DataSet(t)}},getCurveLines:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var s=[];return t.map(function(t){var r=t.geometry&&t.geometry.coordinates,i={lng:r[0],lat:r[1]},a={lng:e[0],lat:e[1]},n=xo.utilCurve.getPoints([a,i]);return s.push({geometry:{type:"LineString",coordinates:n}}),t}),new xo.DataSet(s)}},getCurveDynamicPoints:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var s=[];return t.map(function(t){for(var r=t.geometry&&t.geometry.coordinates,i={lng:r[0],lat:r[1]},a={lng:e[0],lat:e[1]},n=xo.utilCurve.getPoints([a,i]),o=0;o<n.length;o++)s.push({geometry:{type:"Point",coordinates:n[o]},time:o});return t}),new xo.DataSet(s)}}};co.a.supermap.MapvDataSet=sl,
  1630. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1631. * This program are made available under the terms of the Apache License, Version 2.0
  1632. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1633. co.a.supermap=co.a.supermap||{},co.a.supermap.map=co.a.supermap.map||{};var rl=function(e,t){t=t||{};var s={};s.version=t.version||8,s.layers=t.layers||[],s.light=t.light||{anchor:"viewport",color:"#fcf6ef",intensity:.5,position:[1.15,201,20]};var r={version:s.version,sources:{"vector-tiles":{type:"vector",tiles:[e]}},layers:s.layers,light:s.light};return null!=t.sprite&&(r.sprite=t.sprite),null!=t.glyphs&&(r.glyphs=t.glyphs),r},il=function(e,t){t&&e&&e.addLayer({id:"background",type:"background",paint:{"background-color":t}},"background")},al=function(e,t,s,r,i,a){if(t&&e){"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);for(var n=0;n<t.length;n++){var o=a?a[n]:null,l=nl(t[n],s,i,o,r);e.addLayer(l,t[n]),e.moveLayer(t[n])}}};function nl(e,t,s,r,i){return{id:e,type:t,source:s||"vector-tiles","source-layer":r||e,paint:i}}co.a.supermap.map.getDefaultVectorTileStyle=rl,co.a.supermap.map.setBackground=il,co.a.supermap.map.setPaintProperty=al;
  1634. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1635. * This program are made available under the terms of the Apache License, Version 2.0
  1636. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1637. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1638. * This program are made available under the terms of the Apache License, Version 2.0
  1639. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1640. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1641. * This program are made available under the terms of the Apache License, Version 2.0
  1642. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1643. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1644. * This program are made available under the terms of the Apache License, Version 2.0
  1645. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1646. class ol extends co.a.Evented{constructor(e,t){super(),this.options=t||{},this.url=e,this.fire("initialized",this)}}co.a.supermap.ServiceBase=ol;
  1647. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1648. * This program are made available under the terms of the Apache License, Version 2.0
  1649. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1650. class ll extends ol{constructor(e,t){super(e,t)}code(e,t){var s=this;new bt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).code(ye.urlPathAppend(s.url,"geocoding"),e)}decode(e,t){var s=this;new bt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).decode(ye.urlPathAppend(s.url,"geodecoding"),e)}}co.a.supermap.AddressMatchService=ll;
  1651. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1652. * This program are made available under the terms of the Apache License, Version 2.0
  1653. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1654. class hl extends ol{constructor(e,t){super(e,t)}queryChart(e,t,s){var r=this,i=r._processParams(e),a=r._processFormat(s);new Qt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:a}).processAsync(i)}getChartFeatureInfo(e){var t=this,s=t.url.concat();s=ye.urlPathAppend(s,"chartFeatureInfoSpecs"),new Wt(s,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}_processParams(e){if(!e)return{};e.returnContent=null==e.returnContent||e.returnContent,e.filter&&(e.chartQueryFilterParameters=fo.isArray(e.filter)?e.filter:[e.filter]),e.bounds&&(e.bounds instanceof Array&&(e.bounds=new ve(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.bounds instanceof co.a.LngLatBounds&&(e.bounds=new ve(e.bounds.getSouthWest().lng,e.bounds.getSouthWest().lat,e.bounds.getNorthEast().lng,e.bounds.getNorthEast().lat)))}_processFormat(e){return e||i.GEOJSON}}co.a.supermap.ChartService=hl;
  1655. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1656. * This program are made available under the terms of the Apache License, Version 2.0
  1657. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1658. class ul extends ol{constructor(e,t){(t=t||{}).projection&&(t.prjCoordSys=t.projection),super(e,t),this.dataFlow=new ss(e,t),this.dataFlow.events.on({broadcastSocketConnected:this._defaultEvent,broadcastSocketError:this._defaultEvent,broadcastFailed:this._defaultEvent,broadcastSucceeded:this._defaultEvent,subscribeSocketConnected:this._defaultEvent,subscribeSocketError:this._defaultEvent,messageSucceeded:this._defaultEvent,setFilterParamSucceeded:this._defaultEvent,scope:this});var s=this;s.on("subscribeSocketConnected",function(e){s.fire("subscribesucceeded",e)})}initBroadcast(){return this.dataFlow.initBroadcast(),this}broadcast(e){this.dataFlow.broadcast(e)}initSubscribe(){return this.dataFlow.initSubscribe(),this}setExcludeField(e){return this.dataFlow.setExcludeField(e),this.options.excludeField=e,this}setGeometry(e){return this.dataFlow.setGeometry(e),this.options.geometry=e,this}unSubscribe(){this.dataFlow.unSubscribe()}unBroadcast(){this.dataFlow.unBroadcast()}_defaultEvent(e){this.fire(e.eventType||e.type,e)}}co.a.supermap.DataFlowService=ul;
  1659. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1660. * This program are made available under the terms of the Apache License, Version 2.0
  1661. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1662. class cl extends ol{constructor(e,t){super(e,t)}getFeaturesByIDs(e,t,s){var r=this;new hr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByBounds(e,t,s){var r=this;new rr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByBuffer(e,t,s){var r=this;new ar(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesBySQL(e,t,s){var r=this;new cr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByGeometry(e,t,s){var r=this;new or(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}editFeatures(e,t){if(e&&e.dataSourceName&&e.dataSetName){var s=this,r=s.url,i=e.dataSourceName,a=e.dataSetName;r=ye.urlPathAppend(r,"datasources/"+i+"/datasets/"+a),new ms(r,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}}_processParams(e){if(!e)return{};var t=this;if(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=0===e.toIndex?0:e.toIndex?e.toIndex:-1,e.bounds&&(e.bounds=fo.toSuperMapBounds(e.bounds)),e.editType&&(e.editType=e.editType.toLowerCase()),e.geometry&&(e.geometry instanceof co.a.LngLatBounds?e.geometry=fo.toSuperMapPolygon(e.geometry):e.geometry=fo.toSuperMapGeometry(e.geometry)),e.features){var s=[];fo.isArray(e.features)?e.features.map(function(e){return s.push(t._createServerFeature(e)),s}):s.push(t._createServerFeature(e.features)),e.features=s}return e}_createServerFeature(e){var t={},s=[],r=[],i=e.properties;for(var a in i)s.push(a),r.push(i[a]);return t.fieldNames=s,t.fieldValues=r,e.id&&(t.id=e.id),t.geometry=fo.toSuperMapGeometry(e),t}_processFormat(e){return e||i.GEOJSON}}co.a.supermap.FeatureService=cl;
  1663. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1664. * This program are made available under the terms of the Apache License, Version 2.0
  1665. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1666. class dl extends ol{constructor(e,t){super(e,t)}getFields(e,t){var s=this;new dr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},datasource:e.datasource,dataset:e.dataset}).processAsync()}getFieldStatisticsInfo(e,t){var s=this,r=e.fieldName,i=e.statisticMode;i&&!fo.isArray(i)&&(i=[i]),s.currentStatisticResult={fieldName:r},s._statisticsCallback=t,i.forEach(t=>{s.currentStatisticResult[t]=null,s._fieldStatisticRequest(e.datasource,e.dataset,r,t)})}_fieldStatisticRequest(e,t,s,r){var i=this;new Ms(i.url,{eventListeners:{scope:i,processCompleted:i._processCompleted,processFailed:i._statisticsCallback},datasource:e,dataset:t,field:s,statisticMode:r,crossOrigin:i.options.crossOrigin,headers:i.options.headers}).processAsync()}_processCompleted(e){var t=this,s=!0,r=e.result;for(var i in this.currentStatisticResult&&null==t.currentStatisticResult[r.mode]&&(this.currentStatisticResult[r.mode]=r.result),t.currentStatisticResult)if(null==t.currentStatisticResult[i]){s=!1;break}s&&t._statisticsCallback({result:t.currentStatisticResult})}}co.a.supermap.FieldService=dl;
  1667. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1668. * This program are made available under the terms of the Apache License, Version 2.0
  1669. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1670. class pl extends ol{constructor(e,t){super(e,t)}getGridCellInfos(e,t){if(!e)return null;var s=this;new mr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}co.a.supermap.GridCellInfosService=pl;class ml extends ol{constructor(e,t){super(e,t),this.headers={},this.crossOrigin=!0,this.withCredentials=!0,this.proxy=!0}getTools(e){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:e,processFailed:e}}).getTools()}getTool(e,t){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getTool(e)}execute(e,t,s,r){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).execute(e,t,s)}submitJob(e,t,s,r){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).submitJob(e,t,s)}waitForJobCompletion(e,t,s,r){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).waitForJobCompletion(e,t,s)}getJobInfo(e,t,s){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).getJobInfo(e,t)}cancelJob(e,t,s){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).cancelJob(e,t)}getJobs(e,t){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getJobs(e)}getResults(e,t,s,r){new Ks(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).getResults(e,t,s)}}co.a.supermap.GeoprocessingService=ml;
  1671. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1672. * This program are made available under the terms of the Apache License, Version 2.0
  1673. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1674. class fl extends ol{constructor(e,t){super(e,t)}getLayersInfo(e){var t=this;new zr(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{processCompleted:e,processFailed:e}}).processAsync()}setLayerInfo(e,t){if(e){var s=this,r=e.resourceID,i=e.tempLayerName,a=e.layerInfo;if(r&&i){var n=ye.urlPathAppend(s.url,"tempLayersSet/"+r+"/"+i);new Li(n,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(a)}}}setLayersInfo(e,t){if(e){var s=this,r=e.resourceID,i=!!e.isTempLayers&&e.isTempLayers,a=e.layersInfo;if((!i||r)&&a)new Mi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},resourceID:r,isTempLayers:i}).processAsync(a)}}setLayerStatus(e,t){if(e){var s=this;new Ii(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(e)}}}co.a.supermap.LayerInfoService=fl;
  1675. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1676. * This program are made available under the terms of the Apache License, Version 2.0
  1677. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1678. class yl extends ol{constructor(e,t){super(e,t)}getMapInfo(e){var t=this;new ni(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()}getTilesets(e){var t=this;new ra(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}}co.a.supermap.MapService=yl;
  1679. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1680. * This program are made available under the terms of the Apache License, Version 2.0
  1681. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1682. class gl extends ol{constructor(e,t){super(e,t)}measureDistance(e,t){this.measure(e,"DISTANCE",t)}measureArea(e,t){this.measure(e,"AREA",t)}measure(e,t,s){var r=this;new ui(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,measureMode:t,eventListeners:{scope:r,processCompleted:s,processFailed:s}}).processAsync(r._processParam(e))}_processParam(e){return!e||e.geometry instanceof Se||(e.geometry=fo.toSuperMapGeometry(e.geometry)),e}}co.a.supermap.MeasureService=gl;
  1683. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1684. * This program are made available under the terms of the Apache License, Version 2.0
  1685. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1686. class vl extends ol{constructor(e,t){super(e,t)}burstPipelineAnalyst(e,t){var s=this;new Vt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}computeWeightMatrix(e,t){var s=this;new ts(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}findClosestFacilities(e,t,s){var r=this;new Is(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}streamFacilityAnalyst(e,t,s){var r=this;new xs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findLocation(e,t,s){var r=this;new Rs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findPath(e,t,s){var r=this;new Gs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findTSPPaths(e,t,s){var r=this;new js(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findMTSPPaths(e,t,s){var r=this;new ks(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findServiceAreas(e,t,s){var r=this;new Js(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}updateEdgeWeight(e,t){var s=this;new da(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var s=this;new ma(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};var t=this;if(e.centers&&fo.isArray(e.centers)&&e.centers.map(function(s,r){return e.centers[r]=t._toPointObject(s),e.centers[r]}),e.nodes&&fo.isArray(e.nodes)&&e.nodes.map(function(s,r){return e.nodes[r]=t._toPointObject(s),e.nodes[r]}),e.event&&(e.event=t._toPointObject(e.event)),e.facilities&&fo.isArray(e.facilities)&&e.facilities.map(function(s,r){return e.facilities[r]=t._toPointObject(s),e.facilities[r]}),e.parameter&&e.parameter.barrierPoints){var s=e.parameter.barrierPoints;fo.isArray(s)?s.map(function(s,r){return e.parameter[r]=t._toPointObject(s),e.parameter.barrierPoints[r]}):e.parameter.barrierPoints=[s instanceof co.a.LngLat?{x:s.lng,y:s.lat}:s]}return e}_toPointObject(e){return fo.isArray(e)?{x:e[0],y:e[1]}:e instanceof co.a.LngLat?{x:e.lng,y:e.lat}:e instanceof co.a.Point?{x:e.x,y:e.y}:e}_processFormat(e){return e||i.GEOJSON}}co.a.supermap.NetworkAnalystService=vl;
  1687. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1688. * This program are made available under the terms of the Apache License, Version 2.0
  1689. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1690. class Sl extends ol{constructor(e,t){super(e,t)}sinksFacilityAnalyst(e,t){var s=this;new gs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}sourcesFacilityAnalyst(e,t){var s=this;new Ss(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}traceUpFacilityAnalyst(e,t){var s=this;new Es(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}traceDownFacilityAnalyst(e,t){var s=this;new Ts(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}upstreamFacilityAnalyst(e,t){var s=this;new ws(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}co.a.supermap.NetworkAnalyst3DService=Sl;
  1691. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1692. * This program are made available under the terms of the Apache License, Version 2.0
  1693. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1694. class bl extends ol{constructor(e,t){super(e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}}getKernelDensityJobs(e,t){var s=this,r=s._processFormat(t);new ei(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getKernelDensityJobs()}getKernelDensityJob(e,t,s){var r=this,i=r._processFormat(s);new ei(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getKernelDensityJob(e)}addKernelDensityJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new ei(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.kernelDensityJobs[e.id]=e.state}},format:n}).addKernelDensityJob(a,s)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var s=this,r=s._processFormat(t);new Ji(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,s){var r=this,i=r._processFormat(s);new Ji(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Ji(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryMeshJobs[e.id]=e.state}},format:n}).addSummaryMeshJob(a,s)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var s=this,r=s._processFormat(t);new Ri(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getQueryJobs()}getQueryJob(e,t,s){var r=this,i=r._processFormat(s);new Ri(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getQueryJob(e)}addQueryJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Ri(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.queryJobs[e.id]=e.state}},format:n}).addQueryJob(a,s)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var s=this,r=s._processFormat(t);new ji(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,s){var r=this,i=r._processFormat(s);new ji(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new ji(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryRegionJobs[e.id]=e.state}},format:n}).addSummaryRegionJob(a,s)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var s=this,r=s._processFormat(t);new ya(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getVectorClipJobs()}getVectorClipJob(e,t,s){var r=this,i=r._processFormat(s);new ya(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getVectorClipJob(e)}addVectorClipJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new ya(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.vectorClipJobs[e.id]=e.state}},format:n}).addVectorClipJob(a,s)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var s=this,r=s._processFormat(t);new pi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,s){var r=this,i=r._processFormat(s);new pi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new pi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.overlayGeoJobs[e.id]=e.state}},format:n}).addOverlayGeoJob(a,s)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var s=this,r=s._processFormat(t);new Jt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getBuffersJobs()}getBuffersJob(e,t,s){var r=this,i=r._processFormat(s);new Jt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getBuffersJob(e)}addBuffersJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Jt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.buffersJobs[e.id]=e.state}},format:n}).addBuffersJob(a,s)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var s=this,r=s._processFormat(t);new aa(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,s){var r=this,i=r._processFormat(s);new aa(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new aa(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.topologyValidatorJobs[e.id]=e.state}},format:n}).addTopologyValidatorJob(a,s)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var s=this,r=s._processFormat(t);new Gi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,s){var r=this,i=r._processFormat(s);new Gi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Gi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryAttributesJobs[e.id]=e.state}},format:n}).addSummaryAttributesJob(a,s)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||i.GEOJSON}_processParams(e){return e?(e.bounds&&(e.bounds=fo.toSuperMapBounds(e.bounds)),e.query&&(e.query=fo.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=fo.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=fo.toProcessingParam(e.geometryClip)),e):{}}}co.a.supermap.ProcessingService=bl;
  1695. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1696. * This program are made available under the terms of the Apache License, Version 2.0
  1697. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1698. class xl extends ol{constructor(e,t){super(e,t)}queryByBounds(e,t,s){var r=this;new yi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByDistance(e,t,s){var r=this;new vi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryBySQL(e,t,s){var r=this;new Ci(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByGeometry(e,t,s){var r=this;new bi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!fo.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds instanceof Array&&(e.bounds=new ve(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.bounds instanceof co.a.LngLatBounds&&(e.bounds=new ve(e.bounds.getSouthWest().lng,e.bounds.getSouthWest().lat,e.bounds.getNorthEast().lng,e.bounds.getNorthEast().lat))),e.geometry&&(e.geometry instanceof co.a.LngLat&&(e.geometry=new Te(e.geometry.lng,e.geometry.lat)),e.geometry instanceof co.a.Point&&(e.geometry=new Te(e.geometry.x,e.geometry.y)),e.geometry instanceof co.a.LngLatBounds&&(e.geometry=fo.toSuperMapPolygon(e.geometry)),e.geometry instanceof Se||(e.geometry=fo.toSuperMapGeometry(e.geometry))),e):{}}_processFormat(e){return e||i.GEOJSON}}co.a.supermap.QueryService=xl;
  1699. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1700. * This program are made available under the terms of the Apache License, Version 2.0
  1701. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1702. class Cl extends ol{constructor(e,t){super(e,t)}getAreaSolarRadiationResult(e,t,s){var r=this;new Et(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}bufferAnalysis(e,t,s){var r=this;new Dt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}densityAnalysis(e,t,s){var r=this;new ds(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}generateSpatialData(e,t,s){var r=this;new Ws(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}geoRelationAnalysis(e,t,s){var r=this;new $s(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}interpolationAnalysis(e,t,s){var r=this;new Zr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}mathExpressionAnalysis(e,t,s){var r=this;new li(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}overlayAnalysis(e,t,s){var r=this;new ci(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeCalculateMeasure(e,t,s){var r=this;new _i(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeLocate(e,t,s){var r=this;new Ai(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}surfaceAnalysis(e,t,s){var r=this;new Wi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}terrainCurvatureCalculate(e,t,s){var r=this;new qi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}thiessenAnalysis(e,t,s){var r=this;new ta(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}geometrybatchAnalysis(e,t,s){for(var r=this,i=new sa(r.url,{serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}),a=[],n=0;n<e.length;n++){var o=e[n];a.push({analystName:o.analystName,param:r._processParams(o.param)})}i.processAsync(a)}_processParams(e){if(!e)return{};if(e.bounds&&(e.bounds=fo.toSuperMapBounds(e.bounds)),e.inputPoints)for(var t=0;t<e.inputPoints.length;t++){var s=e.inputPoints[t];fo.isArray(s)&&(e.inputPoints[t]={x:s[0],y:s[1],tag:s[2]})}if(e.points)for(let t=0;t<e.points.length;t++){var r=e.points[t];e.points[t]=fo.toSuperMapPoint(r)}if(e.point&&(e.point=fo.toSuperMapPoint(e.point)),e.extractRegion&&(e.extractRegion=fo.toSuperMapGeometry(e.extractRegion)),e.extractParameter&&e.extractParameter.clipRegion&&(e.extractParameter.clipRegion=fo.toSuperMapGeometry(e.extractParameter.clipRegion)),e.clipParam&&e.clipParam.clipRegion&&(e.clipParam.clipRegion=fo.toSuperMapGeometry(e.clipParam.clipRegion)),e.sourceRoute&&e.sourceRoute){var i={type:"LINEM"};i.parts=[e.sourceRoute.geometry.coordinates.length],i.points=[];for(let t=0;t<e.sourceRoute.geometry.coordinates.length;t++){var a=e.sourceRoute.geometry.coordinates[t];i.points=i.points.concat({x:a[0],y:a[1],measure:a[2]})}e.sourceRoute=i}if(e.operateRegions&&fo.isArray(e.operateRegions)&&e.operateRegions.map(function(t,s){return e.operateRegions[s]=fo.toSuperMapGeometry(t),e.operateRegions[s]}),e.sourceGeometry){var n=null;e.sourceGeometrySRID&&(n=e.sourceGeometrySRID),e.sourceGeometry=fo.toSuperMapGeometry(e.sourceGeometry),n&&(e.sourceGeometry.SRID=n),delete e.sourceGeometry.sourceGeometrySRID}if(e.operateGeometry&&(e.operateGeometry=fo.toSuperMapGeometry(e.operateGeometry)),e.sourceGeometries){for(var o=[],l=0;l<e.sourceGeometries.length;l++)o.push(fo.toSuperMapGeometry(e.sourceGeometries[l]));e.sourceGeometries=o}if(e.operateGeometries){for(var h=[],u=0;u<e.operateGeometries.length;u++)h.push(fo.toSuperMapGeometry(e.operateGeometries[u]));e.operateGeometries=h}return e.sourceRoute&&e.sourceRoute.components&&fo.isArray(e.sourceRoute.components)&&e.sourceRoute.components.map(function(t,s){return e.sourceRoute.components[s]=fo.toSuperMapGeometry(t),e.sourceRoute.components[s]}),e}_processFormat(e){return e||i.GEOJSON}}co.a.supermap.SpatialAnalystService=Cl;
  1703. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1704. * This program are made available under the terms of the Apache License, Version 2.0
  1705. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1706. class Tl extends ol{constructor(e,t){super(e,t)}getThemeInfo(e,t){var s=this;new ea(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}co.a.supermap.ThemeService=Tl;
  1707. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1708. * This program are made available under the terms of the Apache License, Version 2.0
  1709. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1710. class _l extends ol{constructor(e,t){super(e,t)}queryStop(e,t){var s=this;new ki(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}analysisTransferPath(e,t){var s=this;new la(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}analysisTransferSolution(e,t){var s=this;new ua(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}_processParams(e){return e?(e.transferLines&&!fo.isArray(e.transferLines)&&(e.transferLines=[e.transferLines]),e.points&&fo.isArray(e.points)&&e.points.map(function(t,s){return e.points[s]=t instanceof co.a.LngLat?{x:t.lng,y:t.lat}:t,e.points[s]}),e):{}}}co.a.supermap.TrafficTransferAnalystService=_l;
  1711. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1712. * This program are made available under the terms of the Apache License, Version 2.0
  1713. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1714. class El extends ol{constructor(e,t){super(e,t)}createWebPrintingJob(e,t){if(e){var s=this;new La(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).createWebPrintingJob(s._processParams(e))}}getPrintingJob(e,t){var s=this;new La(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).getPrintingJob(e)}getPrintingJobResult(e,t){var s=this;new La(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).getPrintingJobResult(e)}getLayoutTemplates(e){var t=this;new La(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).getLayoutTemplates()}_processParams(e){return e.layoutOptions&&e.layoutOptions.littleMapOptions&&(e.layoutOptions.littleMapOptions.center=this._toPointObject(e.layoutOptions.littleMapOptions.center)),e.exportOptions&&(e.exportOptions.center=this._toPointObject(e.exportOptions.center)),e}_toPointObject(e){return fo.isArray(e)?{x:e[0],y:e[1]}:e instanceof r.Geometry.Point||e instanceof co.a.Point?{x:e.x,y:e.y}:e instanceof co.a.LngLat?{x:e.lng,y:e.lat}:e}}co.a.supermap.WebPrintingJobService=El;
  1715. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1716. * This program are made available under the terms of the Apache License, Version 2.0
  1717. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1718. var Al=s(6),wl=s.n(Al),Pl=s(10),Ll=s.n(Pl);
  1719. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1720. * This program are made available under the terms of the Apache License, Version 2.0
  1721. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1722. co.a.supermap=co.a.supermap||{};const Ol=["559082264.0287178","279541132.0143589","139770566.0071794","69885283.00358972","34942641.50179486","17471320.75089743","8735660.375448715","4367830.1877224357","2183915.093862179","1091957.546931089","545978.7734655447","272989.7734655447","272989.3867327723","136494.6933663862","68247.34668319309","34123.67334159654","17061.83667079827","8530.918335399136","4265.459167699568","2132.729583849784"],Ml=["5.590822640287176E8","2.795411320143588E8","1.397705660071794E8","6.98852830035897E7","3.494264150179485E7","1.7471320750897426E7","8735660.375448713","4367830.187724357","2183915.0938621783","1091957.5469310891","545978.7734655446","272989.3867327723","136494.69336638614","68247.34668319307","34123.673341596535","17061.836670798268","8530.918335399134"],Nl=["GoogleCRS84Quad","GoogleMapsCompatible"];class Il extends co.a.Evented{constructor(e,t){super(),this.mapId=e,t=t||{},this.server=t.server||"https://www.supermapol.com",this.credentialKey=t.credentialKey,this.credentialValue=t.credentialValue,this.withCredentials=t.withCredentials||!1,this.target=t.target||"map",this._createWebMap()}resize(){this.map.resize()}setMapId(e){this.mapId=e,this._createWebMap()}setWebMapOptions(e){this.server=e.server,this._createWebMap()}setMapOptions(e){let{center:t,zoom:s,maxBounds:r,minZoom:i,maxZoom:a,isWorldCopy:n,bearing:o,pitch:l}=e;t&&t.length&&this.map.setCenter(t),s&&this.map.setZoom(s),r&&this.map.setMaxBounds(r),i&&this.map.setMinZoom(i),a&&this.map.setMaxZoom(a),n&&this.map.setRenderWorldCopies(n),o&&this.map.setBearing(o),l&&this.map.setPitch(l)}_createWebMap(){let e=this.server.split("");"/"!==e[e.length-1]&&(this.server+="/");let t=this.server+"web/maps/"+this.mapId+"/map";this.credentialValue&&this.credentialKey&&(t+="?"+this.credentialKey+"="+this.credentialValue);let s="getUrlResource.json?url=";if(this.excludePortalProxyUrl&&this.server.indexOf(s)>-1){let e=this.server.split(s);e.length>1&&(t=e[0]+s+this.server+"web/maps/"+this.mapId+"/map.json")}this._getMapInfo(t)}_createMap(e){let t=[],s=e.layers;s&&s.length>0&&s.forEach(e=>{e.labelStyle&&t.push(e.labelStyle.fontFamily)},this),t.push("'supermapol-icons'");let r,i=t.join(","),a=e.center,n=e.level||0,o=0;n+=o=e.minScale&&e.maxScale?this._transformScaleToZoom(e.minScale,co.a.CRS?co.a.CRS.get(this.baseProjection):"EPSG:3857"):+Math.log2(this._getResolution(co.a.CRS?co.a.CRS.get(this.baseProjection).getExtent():[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892])/this._getResolution(e.extent)).toFixed(2),r=a?this._unproject([a.x,a.y]):new co.a.LngLat(0,0),this.map=new co.a.Map({container:this.target,center:r,zoom:n,style:{version:8,sources:{},layers:[]},crs:this.baseProjection,localIdeographFontFamily:i||""}),this.fire("mapinitialized")}_getMapInfo(e){let t=-1===e.indexOf(".json")?`${e}.json`:e;Ze.get(t,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(e=>{this.baseProjection=e.projection,this.mapParams={title:e.title,description:e.description};if(!(this.baseProjection in{"EPSG:4490":"EPSG:4490","EPSG:4214":"EPSG:4214","EPSG:4610":"EPSG:4610","EPSG:3857":"EPSG:3857","EPSG:4326":"EPSG:4326"}))throw Error(zn.i18n("msg_crsunsupport"));{this._createMap(e,this.mapSetting);let t=e.layers;this.map.on("load",()=>{this._addBaseMap(e),t&&0!==t.length?this._addLayers(t):this._sendMapToUser(0,0)})}}).catch(e=>{this.fire("getmapfailed",{error:e})})}_addBaseMap(e){this._createBaseLayer(e)}_createBaseLayer(e){let t=e.baseLayer||e,s=t.layerType;(s.indexOf("TIANDITU_VEC")>-1||s.indexOf("TIANDITU_IMG")>-1||s.indexOf("TIANDITU_TER")>-1)&&(s=s.substr(0,12));let r,i={CLOUD:"http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",CLOUD_BLACK:"http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",OSM:"http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",GOOGLE:"https://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0",GOOGLE_CN:"https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}",JAPAN_STD:"https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",JAPAN_PALE:"https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",JAPAN_RELIEF:"https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",JAPAN_ORT:"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"};switch(s){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":this._createTiandituLayer(e);break;case"BING":this._createBingLayer(t.name);break;case"WMS":this._createWMSLayer(t);break;case"WMTS":this._createWMTSLayer(t);break;case"TILE":case"SUPERMAP_REST":this._createDynamicTiledLayer(t);break;case"CLOUD":case"CLOUD_BLACK":case"OSM":case"JAPAN_ORT":case"JAPAN_RELIEF":case"JAPAN_PALE":case"JAPAN_STD":case"GOOGLE_CN":case"GOOGLE":r=i[s],this._createXYZLayer(t,r);break;case"MAPBOXSTYLE":this._createMapboxStyle(t)}}_createMapboxStyle(e){let t,s=this,{dataSource:r={}}=e,{serverId:i,url:a}=r;t=void 0!==i?`${this.server}web/datas/${i}/download`:a,Ze.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(e=>e.json()).then(e=>{s._matchStyleObject(e),s.map.setStyle(e)})}_matchStyleObject(e){let{sprite:t,glyphs:s}=e;t&&"object"==typeof t&&(e.sprite=Object.values(t)[0]),s&&"object"==typeof s&&(e.glyphs=Object.values(s)[0])}_createTiandituLayer(e){let t=this._getTiandituUrl(e),s=e.baseLayer.layerType,r=Boolean(e.baseLayer.labelLayerVisible),i=t.labelUrl,a=t.tiandituUrl;this._addBaselayer(a,"tianditu-layers-"+s),r&&this._addBaselayer(i,"tianditu-label-layers-"+s)}_createWMTSLayer(e){let t=this._getWMTSUrl(e);this._filterWMTSIsMatched(e,(s,r)=>{s&&this._addBaselayer([t],"wmts-layers"+e.name,0,r)})}_filterWMTSIsMatched(e,t){let s=!1,r=22,i=e.url;Ze.get(i,null,{withCredentials:!1,withoutFormatSuffix:!0}).then(e=>e.text()).then(i=>{let a=wl.a?wl.a:window.convert,n=JSON.parse(a.xml2json(i,{compact:!0,spaces:4})).Capabilities.Contents.TileMatrixSet;Array.isArray(n)||(n=[n]);for(let t=0;t<n.length;t++)if(n[t]["ows:Identifier"]&&n[t]["ows:Identifier"]._text===e.tileMatrixSet)if(Nl.indexOf(n[t].WellKnownScaleSet._text)>-1)s=!0;else{if(!n[t].WellKnownScaleSet||"Custom"!==n[t].WellKnownScaleSet._text)throw Error(zn.i18n("msg_tilematrixsetunsupport"));{let e=[],i="EPSG:3857"===this.map.crs?Ol:Ml;for(let s=0,r=i.length;s<r&&n[t].TileMatrix[s]&&i[s]===n[t].TileMatrix[s].ScaleDenominator._text;s++)e.push(i[s]);if(r=e.length-1,0===e.length)throw Error(zn.i18n("msg_tilematrixsetunsupport"));s=!0}}t(s,r)}).catch(e=>{this.fire("getwmtsfailed",{error:e,map:this.map})})}_createBingLayer(e){this.addLayer(["https://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadkey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z"],"bing-layers-"+e)}_createXYZLayer(e,t){let s=[];if("OSM"===e.layerType){let e=t.match(/\w\-\w/g)[0],r=e[0],i=e[2],a="";for(let e=97;e<123;e++)a+=String.fromCharCode(e);let n=a.split(""),o=n.indexOf(r),l=n.indexOf(i),h=n.slice(o,l+1);for(let e=0;e<h.length;e++){let r=t.replace(/{\w\-\w}/g,h[e]);s.push(r)}}else if("GOOGLE_CN"===e.layerType){let e=t.match(/\d\-\d/g)[0],r=e[0],i=e[2];for(let e=r;e<=i;e++){let r=t.replace(/{\d\-\d}/g,e);s.push(r)}}else s=[t];this._addBaselayer(s,"XYZ-layers-"+e.name)}_createDynamicTiledLayer(e){let t=e.url;const s=e.layerID||e.name,{minzoom:r,maxzoom:i}=e;this._addBaselayer([t],s,r,i,!0)}_createWMSLayer(e){let t=this._getWMSUrl(e);this._addBaselayer([t],"WMS-layers-"+e.name)}_createVectorLayer(e,t){let s=e.style,r=e.featureType,i=e.layerID,a=e.visible,n={};n.style=this._transformStyleToMapBoxGl(s,r),n.layout={visibility:a};let o={type:"geojson",data:{type:"FeatureCollection",features:t}};this._addOverlayToMap(r,o,i,n),"POLYGON"===r&&s.strokeColor&&this._addStrokeLineForPoly(s,o,i+"-strokeLine",a)}_getTiandituUrl(e){let t=/t0/gi,s={},r=e.baseLayer.layerType.split("_")[1].toLowerCase(),i=Boolean(e.baseLayer.labelLayerVisible),a="https://t0.tianditu.gov.cn/{layer}_{proj}/wmts?",n=a,o={vec:"cva",ter:"cta",img:"cia"},l="EPSG:4326"===this.baseProjection?"c":"w",h={service:"WMTS",request:"GetTile",style:"default",version:"1.0.0",layer:r,tilematrixSet:l,format:"tiles",width:256,height:256},u=(a+=this._getParamString(h,a)+"&tilematrix={z}&tilerow={y}&tilecol={x}").replace("{layer}",r).replace("{proj}",l),c=[];for(let e=0;e<8;e++)c.push(u.replace(t,`t${e}`));if(s.tiandituUrl=c,i){let e=o[r];h.layer=e,n=(n+=this._getParamString(h,n)+"&tilematrix={z}&tilerow={y}&tilecol={x}").replace("{layer}",e).replace("{proj}",l);let i=[];for(let e=0;e<8;e++)i.push(n.replace(t,`t${e}`));s.labelUrl=i}return s}_getWMSUrl(e){let t=e.url,s=(t=t.split("?")[0]).split("/"),r={service:"WMS",request:"GetMap",layers:s[s.length-1],styles:"",format:"image/png",transparent:"true",version:"1.1.1",width:256,height:256,srs:this.baseProjection},i="EPSG:4326"===this.baseProjection?"{bbox-epsg-4326}":"{bbox-epsg-3857}";return t+=this._getParamString(r,t)+`&bbox=${i}`}_addLayers(e){this.layers=e;let t,s=0,r=e.length;e.forEach((e,i)=>{if(e.dataSource&&e.dataSource.serverId||"MARKER"===e.layerType){let a=e.dataSource?e.dataSource.serverId:e.serverId,n=`${this.server}web/datas/${a}/content.json?pageSize=9999999&currentPage=1`;a&&Ze.get(n,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(a=>{if(!1===a.succeed)return s++,this._sendMapToUser(s,r),void this.fire("getlayersfailed",{error:a.error,map:this.map});a.type&&("JSON"===a.type||"GEOJSON"===a.type?(a.content=JSON.parse(a.content.trim()),t=this._formatGeoJSON(a.content,e)):"EXCEL"!==a.type&&"CSV"!==a.type||(t=this._excelData2Feature(a.content,e)),this._addLayer(e,t,i),s++,this._sendMapToUser(s,r))}).catch(e=>{s++,this._sendMapToUser(s,r),this.fire("getlayersfailed",{error:e,map:this.map})})}else if("SUPERMAP_REST"===e.layerType||"TILE"===e.layerType||"WMS"===e.layerType||"WMTS"===e.layerType)this._createBaseLayer(e),s++,this._sendMapToUser(s,r);else if(e.dataSource&&"REST_DATA"===e.dataSource.type){let a=e.dataSource;this._getFeatureBySQL(a.url,[a.dataSourseName||e.name],a=>{t=this._parseGeoJsonData2Feature({allDatas:{features:a.result.features.features},fileCode:e.projection,featureProjection:this.baseProjection}),this._addLayer(e,t,i),s++,this._sendMapToUser(s,r)},e=>{s++,this._sendMapToUser(s,r),this.fire("getfeaturesfailed",{error:e})})}else e.dataSource&&"REST_MAP"===e.dataSource.type&&e.dataSource.url&&this._queryFeatureBySQL(e.dataSource.url,e.dataSource.layerName,"smid=1",null,null,t=>{let a=t&&t.result.recordsets,n=a&&a[0],o=n.fields;if(n&&o){let t=[];for(let e in o){let s=o[e];0===s.indexOf("Sm")&&"SmID"!==s||t.push(s)}this._getFeatures(t,e,t=>{this._addLayer(e,t,i),s++,this._sendMapToUser(s,r)},e=>{s++,this.fire("getfeaturesfailed",{error:e,map:this.map})})}},e=>{this.fire("getlayersfailed",{error:e,map:this.map})})},this)}_getFeatures(e,t,s,r){let i=t.dataSource,a=t.projection;this._queryFeatureBySQL(i.url,i.layerName,null,e,null,e=>{let t=e.result.recordsets[0].features.features,r=this._parseGeoJsonData2Feature({allDatas:{features:t},fileCode:a,featureProjection:this.baseProjection},"JSON");s(r)},e=>{r(e)})}_addLayer(e,t,s){let r=e.layerType;e.layerID=r+"-"+e.name+"-"+s,e.visible=e.visible?"visible":"none",t[0]&&"Polygon"===t[0].geometry.type&&(t=this._handleMultyPolygon(t)),e.style&&e.filterCondition&&"RANGE"!==r&&"UNIQUE"!==r&&(t=this._getFiterFeatures(e.filterCondition,t)),"VECTOR"===r?"POINT"===e.featureType?"SYMBOL_POINT"===e.style.type?this._createSymbolLayer(e,t):this._createGraphicLayer(e,t):this._createVectorLayer(e,t):"UNIQUE"===r?this._createUniqueLayer(e,t):"RANGE"===r?this._createRangeLayer(e,t):"HEAT"===r?this._createHeatLayer(e,t):"MARKER"===r&&this._createMarkerLayer(e,t),e.labelStyle&&e.labelStyle.labelField&&this._addLabelLayer(e,t)}_addLabelLayer(e,t){let s=e.labelStyle;this.map.addLayer({id:e.layerID+"label",type:"symbol",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:{"text-color":s.fill},layout:{"text-field":`{${s.labelField}}`,"text-size":parseFloat(s.fontSize)||12,"text-offset":s.offsetX?[s.offsetX/10||0,s.offsetY/10||0]:[0,-1.5],"text-font":["DIN Offc Pro Italic","Arial Unicode MS Regular"],visibility:e.visible}})}_createSymbolLayer(e,t){document.getElementById(`${this.target}`).classList.add("supermapol-icons-map");let s=e.style,r=e.style.unicode,i=String.fromCharCode(parseInt(r.replace(/^&#x/,""),16)),a=e.layerID;this.map.addSource(a+"-source",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:a,type:"symbol",source:a+"-source",paint:{"text-color":s.fillColor},layout:{"text-field":i,"text-font":["DIN Offc Pro Italic","Arial Unicode MS Regular"],visibility:e.visible}}),this.map.getSource(a+"-source").setData({type:"FeatureCollection",features:t})}_createGraphicLayer(e,t){let s=e.style,r={},i=e.layerID,a={type:"geojson",data:{type:"FeatureCollection",features:t}};if("IMAGE_POINT"===s.type){let t=s.imageInfo,r=t.img;r&&r.src||(t.url=this.server+t.url),this.map.loadImage(t.url||r.src,(t,r)=>{t&&console.log(t);let n=2*Number.parseFloat((s.radius/r.height).toFixed(2));this.map.addImage("imageIcon",r),this.map.addLayer({id:i,type:"symbol",source:a,layout:{"icon-image":"imageIcon","icon-size":n,visibility:e.visible}})})}else if("SVG_POINT"===s.type){let t=s.url;this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(t,this.svgDiv,t=>{let r=t.toDataURL("img/png");r&&this.map.loadImage(r,(r,n)=>{r&&console.log(r);let o=Number.parseFloat((s.radius/t.width).toFixed(2));this.map.addImage("imageIcon",n),this.map.addLayer({id:i,type:"symbol",source:a,layout:{"icon-image":"imageIcon","icon-size":o,visibility:e.visible}})},this)})}else r.style=this._transformStyleToMapBoxGl(s,e.featureType),r.layout={visibility:e.visible},this._addOverlayToMap("POINT",a,i,r)}_createUniqueLayer(e,t){let s=this._getUniqueStyleGroup(e,t);t=this._getFiterFeatures(e.filterCondition,t);let r=e.style,i={},a=e.themeSetting.themeField,n=e.featureType,o=["match",["get","index"]],l=e.layerID;t.forEach(e=>{s.forEach(t=>{t.value===e.properties[a]&&o.push(e.properties.index,t.color)})}),o.push("#ffffff"),i.style=this._transformStyleToMapBoxGl(r,n,o);let h=e.visible;i.layout={visibility:h};let u={type:"geojson",data:{type:"FeatureCollection",features:t}};this._addOverlayToMap(n,u,l,i),"POLYGON"===n&&r.strokeColor&&this._addStrokeLineForPoly(r,u,l+"-strokeLine",h)}_getUniqueStyleGroup(e,t){let s=e.featureType,r=e.style,i=e.themeSetting,a=i.themeField,n=i.colors,o=[],l=i.customSettings;for(let e in t){let s=t[e].properties[a],r=!1;for(let e in o)if(o[e]===s){r=!0;break}r||o.push(s)}let h=n||this.defaultParameters.colors;h=qa.getGradientColors(h,o.length);let u=[];return o.forEach((e,t)=>{let i=h[t];e in l&&(i=l[e]),"LINE"===s?r.strokeColor=i:r.fillColor=i,u.push({color:i,value:e})},this),u}_getWMTSUrl(e){let t={service:"WMTS",request:"GetTile",version:"1.0.0",style:"default",layer:e.layer,tilematrixSet:e.tileMatrixSet,format:"image/png"},s=e.url;return s+=this._getParamString(t,s)+"&tilematrix={z}&tilerow={y}&tilecol={x}"}_createMarkerLayer(e,t){t&&t.forEach(t=>{let s=t.geometry.type.toUpperCase(),r=t.dv_v5_markerStyle;"POINT"===s&&r.text&&(s="TEXT");let i=this.setFeatureInfo(t);t.properties.useStyle=r,t.properties.featureInfo=i,"POINT"===s&&r.src&&-1===r.src.indexOf("http://")&&-1===r.src.indexOf("https://")&&(r.src=this.server+r.src);let a={type:"geojson",data:t},n=t.properties.index,o=s+"-"+n;if("POINT"===s&&r.src&&r.src.indexOf("svg")<=-1&&this.map.loadImage(r.src,(t,s)=>{t&&console.log(t),this.map.addImage(n+"",s),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":r.scale,visibility:e.visible}})},this),"POINT"===s&&r.src&&r.src.indexOf("svg")>-1&&(this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(r.src,this.svgDiv,t=>{let s=t.toDataURL("img/png");s&&this.map.loadImage(s,(t,s)=>{t&&console.log(t),this.map.addImage(n+"",s),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":r.scale,visibility:e.visible}})},this)})),!r.src){let t={layout:{}};"LINESTRING"===s&&r.lineCap&&(s="LINE",t.layout={"line-cap":r.lineCap});let i=e.visible;t.layout.visibility=i,t.style=this._transformStyleToMapBoxGl(r,s),this._addOverlayToMap(s,a,o,t),"POLYGON"===s&&r.strokeColor&&this._addStrokeLineForPoly(r,a,o+"-strokeLine",i)}},this)}setFeatureInfo(e){let t,s=e.dv_v5_markerInfo;if(!s||!s.dataViz_title)return s;t=s;let r=e.properties;for(let e in t)r[e]&&(t[e]=r[e],delete r[e]);return t}_createHeatLayer(e,t){let s=e.themeSetting,r={};r.gradient=s.colors.slice(),r.radius=parseInt(s.radius);let i=s.customSettings;for(let e in i)r.gradient[e]=i[e];s.weight&&this._changeWeight(t,s.weight);let a=["interpolate",["linear"],["heatmap-density"]],n=(1/r.gradient.length).toFixed(2);r.gradient.forEach((e,t)=>{a.push(t*n),0===t&&(e=fo.hexToRgba(e,0)),a.push(e)});let o={"heatmap-color":a,"heatmap-radius":s.radius+15,"heatmap-intensity":{base:1,stops:[[0,.8],[22,1]]}};if(t[0].weight&&t.length>=4){let e=[];t.forEach(t=>{e.push(t.weight)});let s=Ya.getMax(e),r=Ya.getMin(e);o["heatmap-weight"]=["interpolate",["linear"],["get","weight"],r,0,s,1]}this.map.addLayer({id:e.layerID,type:"heatmap",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:o})}_changeWeight(e,t){this.fieldMaxValue={},this._getMaxValue(e,t);let s=this.fieldMaxValue[t];e.forEach(e=>{let r=e.properties[t];e.weight=r/s})}_getMaxValue(e,t){let s,r=[],i=t;this.fieldMaxValue[i]||(e.forEach(e=>{(s=e.properties)&&parseFloat(s[i])&&r.push(parseFloat(s[i]))}),this.fieldMaxValue[i]=Ya.getArrayStatistic(r,"Maximum"))}_createRangeLayer(e,t){let s=e.themeSetting.themeField,r=e.style,i=e.featureType,a=this._getRangeStyleGroup(e,t),n={type:"geojson",data:{type:"FeatureCollection",features:t=this._getFiterFeatures(e.filterCondition,t)}},o=["match",["get","index"]];t.forEach(e=>{let t=parseFloat(e.properties[s]);for(let s=0;s<a.length;s++)a[s].start<=t&&t<a[s].end&&o.push(e.properties.index,a[s].color);!t&&o.push(e.properties.index,"rgba(0, 0, 0, 0)")},this),o.push("rgba(0, 0, 0, 0)");let l={layout:{}};"LINE"===i&&r.lineCap&&(l.layout={"line-cap":r.lineCap});let h=e.visible;l.layout.visibility=h,l.style=this._transformStyleToMapBoxGl(r,i,o);let u=e.layerID;this._addOverlayToMap(i,n,u,l),"POLYGON"===i&&r.strokeColor&&this._addStrokeLineForPoly(r,n,u+"-strokeline",h)}_getFiterFeatures(e,t){if(!e)return t;let s="select * from json where ("+this._replaceFilterCharacter(e)+")",r=[];for(let e=0;e<t.length;e++){let i=t[e],a=!1;try{a=window.jsonsql.query(s,{properties:i.properties})}catch(e){continue}a&&a.length>0&&r.push(i)}return r}_replaceFilterCharacter(e){return e=e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=")}_getRangeStyleGroup(e,t){let s,r=e.featureType,i=e.style,a=[],n=e.themeSetting,o=n.customSettings,l=n.themeField,h=n.segmentCount;t.forEach(e=>{(s=e.properties||e.get("Properties"))?s[l]&&fo.isNumber(s[l])&&a.push(parseFloat(s[l])):e.get(l)&&fo.isNumber(e.get(l))&&e.get(l)&&a.push(parseFloat(e.get(l)))},this);let u=Ya.getArraySegments(a,n.segmentMethod,h);if(u){let e=h;s&&u[0]===u[s.length-1]&&(e=1,u.length=2);for(let e in u){let t=u[e];t=0==e?Math.floor(100*t)/100:Math.ceil(100*t)/100+.1,u[e]=Number(t.toFixed(2))}let t=n.colors;for(let t=0;t<e;t++)t in o&&(o[t].segment.start&&(u[t]=o[t].segment.start),o[t].segment.end&&(u[t+1]=o[t].segment.end));let a=[];for(let s=0;s<e;s++){let e=t[s];s in o&&o[s].color&&(e=o[s].color),"LINE"===r?i.strokeColor=e:i.fillColor=e;let n=u[s],l=u[s+1],h=JSON.parse(JSON.stringify(i));a.push({style:h,color:e,start:n,end:l})}return a}}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,s=-1,r=-1;for(let e=0,i=t.length;e<i;e++)this._isXField(t[e])&&(s=e),this._isYField(t[e])&&(r=e);let i=[];for(let t=0,a=e.rows.length;t<a;t++){let a=e.rows[t],n=Number(a[s]),o=Number(a[r]),l={};for(let s in e.colTitles){l[e.colTitles[s]]=e.rows[t][s]}l.index=t+"";let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};i.push(h)}return i}_sendMapToUser(e,t){e===t&&this.fire("addlayerssucceeded",{map:this.map,mapparams:this.mapParams,layers:this.layers})}_unproject(e){for(var t,s=180/Math.PI,r=6378137,i=Math.exp(-e[1]/r),a=Math.PI/2-2*Math.atan(i),n=0,o=.1;n<15&&Math.abs(o)>1e-7;n++)t=1,a+=o=Math.PI/2-2*Math.atan(i*t)-a;return new co.a.LngLat(e[0]*s/r,a*s)}_getParamString(e,t,s){var r=[];for(var i in e)r.push((s?i.toUpperCase():i)+"="+e[i]);return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")}_isXField(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t}_isYField(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t}_transformStyleToMapBoxGl(e,t,s){let r={};"POINT"!==e.type&&"BASIC_POINT"!==e.type&&"POINT"!==t||"LINE"===t?"LINE"===t?r={strokeWidth:"line-width",strokeColor:"line-color",strokeOpacity:"line-opacity"}:"POLYGON"===t&&(r={fillColor:"fill-color",fillOpacity:"fill-opacity",strokeColor:"fill-outline-color"}):r={fillColor:"circle-color",strokeWidth:"circle-stroke-width",fillOpacity:"circle-opacity",radius:"circle-radius",strokeColor:"circle-stroke-color",strokeOpacity:"circle-stroke-opacity"};let i={};for(let t in e)r[t]&&(i[r[t]]=e[t]);return s&&(i["circle-color"]?i["circle-color"]=s:i["line-color"]?i["line-color"]=s:i["fill-color"]=s),e.lineDash&&"solid"!==e.lineDash&&"LINE"===t&&(i["line-dasharray"]=this._dashStyle(e)),i}_dashStyle(e){if(!e)return[];var t=e.strokeDashstyle||e.lineDash;switch(t){case"solid":return[];case"dot":return[1,4];case"dash":return[4,4];case"dashdot":return[4,4,1,4];case"longdash":return[8,4];case"longdashdot":return[8,4,1,4];default:return t?ye.isArray(t)?t:(t=ue.trim(t).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}_getCanvasFromSVG(e,t,s){let r=document.createElement("canvas");r.id="dataviz-canvas-"+fo.newGuid(8),r.style.display="none",t.appendChild(r),(window.canvg?window.canvg:Ll.a)(r.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:()=>{r.width>300||r.height>300||s(r)},forceRedraw:()=>!1})}_addOverlayToMap(e,t,s,r){"circle"!==(e={POINT:"circle",LINE:"line",POLYGON:"fill"}[e])&&"line"!==e&&"fill"!==e||this.map.addLayer({id:s,type:e,source:t,paint:r.style,layout:r.layout||{}})}_addBaselayer(e,t,s=0,r=22,i){this.map.addLayer({id:t,type:"raster",source:{type:"raster",tiles:e,tileSize:256,rasterSource:i?"iserver":"",prjCoordSys:i?{epsgCode:this.baseProjection.split(":")[1]}:""},minzoom:s,maxzoom:r})}_addStrokeLineForPoly(e,t,s,r){let i={};i.style=this._transformStyleToMapBoxGl(e,"LINE"),i.layout={visibility:r},this._addOverlayToMap("LINE",t,s,i)}_parseGeoJsonData2Feature(e){let t=e.allDatas.features,s=[];for(let e=0,r=t.length;e<r;e++){let r=t[e],i=r.geometry.coordinates;"Point"===t[e].geometry.type&&t[e].properties&&(t[e].properties.lon=i[0],t[e].properties.lat=i[1]),s.properties.index=e+"",s.push(r)}return s}_getFeatureBySQL(e,t,s,r){let i,a,n;i=new It({name:t.join().replace(":","@"),attributeFilter:"SMID > 0"}),n=new ur({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(a=new cr(e,{eventListeners:{processCompleted:e=>{s&&s(e)},processFailed:e=>{r&&r(e)}}})).processAsync(n)}_queryFeatureBySQL(e,t,s,r,i,a,n,l,h,u){var c,d;c=new It({name:t,attributeFilter:s}),r&&(c.fields=r);var p={queryParams:[c]};u&&(p.queryOption=o.ATTRIBUTE),l&&(p.startRecord=l),h&&(p.expectCount=h),i&&(p.prjCoordSys={epsgCode:i}),d=new xi(p),new co.a.supermap.QueryService(e).queryBySQL(d,e=>{"processCompleted"===e.type?a(e):n(e)})}_handleMultyPolygon(e){return e.forEach(e=>{if("Polygon"!==e.geometry.type)return;let t=e.geometry.coordinates;if(t.length>1){let s=[];t.forEach(e=>{s.push([e])}),e.geometry.coordinates=s,e.geometry.type="MultiPolygon"}}),e}_transformScaleToZoom(e,t){let s=295829515.2024169;"EPSG:3857"!==(t||this.map.getCRS()).epsgCode&&(s=295295895);const r=e.split(":")[1];return Math.min(24,+Math.log2(s/+r).toFixed(2))}_getResolution(e,t=512){return e.leftBottom&&e.rightTop?Math.max(e.rightTop.x-e.leftBottom.x,e.rightTop.y-e.leftBottom.y)/t:Math.max(e[2]-e[0],e[3]-e[1])/t}}co.a.supermap.WebMap=Il},function(e,t){},,,,,,function(e,t){}]);