iclient-classic-es6.min.js 103 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*!
  2. *
  3. * iclient-classic.(https://iclient.supermap.io)
  4. * Copyright© 2000 - 2021 SuperMap Software Co.Ltd
  5. * license: Apache-2.0
  6. * version: v10.1.1
  7. *
  8. */(()=>{var e={693:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){a.prototype.append=function(e,t){e=n(e),t=o(t);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(t)},a.prototype.delete=function(e){delete this.map[n(e)]},a.prototype.get=function(e){var t=this.map[n(e)];return t?t[0]:null},a.prototype.getAll=function(e){return this.map[n(e)]||[]},a.prototype.has=function(e){return this.map.hasOwnProperty(n(e))},a.prototype.set=function(e,t){this.map[n(e)]=[o(t)]},a.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(s){e.call(t,s,r,this)},this)},this)};var r={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},s=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this)},p.call(c.prototype),p.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var i=[301,302,303,307,308];E.redirect=function(e,t){if(-1===i.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.Headers=a,t.Request=c,t.Response=E,t.fetch=function(e,t){return new Promise(function(s,i){var n;n=c.prototype.isPrototypeOf(e)&&!t?e:new c(e,t);var o=new XMLHttpRequest;var l=!1;function u(){if(4===o.readyState){var e=1223===o.status?204:o.status;if(e<100||e>599){if(l)return;return l=!0,void i(new TypeError("Network request failed"))}var t={status:e,statusText:o.statusText,headers:function(e){var t=new a;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var r=e.trim().split(":"),s=r.shift().trim(),i=r.join(":").trim();t.append(s,i)}),t}(o),url:"responseURL"in o?o.responseURL:/^X-Request-URL:/m.test(o.getAllResponseHeaders())?o.getResponseHeader("X-Request-URL"):void 0},r="response"in o?o.response:o.responseText;l||(l=!0,s(new E(r,t)))}}o.onreadystatechange=u,o.onload=u,o.onerror=function(){l||(l=!0,i(new TypeError("Network request failed")))},o.open(n.method,n.url,!0);try{"include"===n.credentials&&("withCredentials"in o?o.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 o&&r.blob&&(o.responseType="blob"),n.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send(void 0===n._bodyInit?null:n._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function n(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 o(e){return"string"!=typeof e&&(e=String(e)),e}function a(e){this.map={},e instanceof a?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 u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function h(e){var t=new FileReader;return t.readAsArrayBuffer(e),u(t)}function p(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!r.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},r.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(h)},this.text=function(){var e,t,r,s,i,n,o,a=l(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,r=new FileReader,s=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,n=e.type.match(i)||s.match(i),o=[e],n&&o.push(n[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,o),u(r);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)},r.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e,t){var r,i,n=(t=t||{}).body;if(c.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new a(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new a(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),s.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n,t)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),s=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(i))}}),t}function E(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 a?t.headers:new a(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},144:function(e,t){var r,s,i;s=[t,e],void 0===(i="function"==typeof(r=function(e,t){"use strict";var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function s(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],n=e,o=t.timeout||r.timeout,a=t.jsonpCallback||r.jsonpCallback,l=void 0;return new Promise(function(r,u){var h=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),p=a+"_"+h;window[h]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(p),s(h)},n+=-1===n.indexOf("?")?"?":"&";var c=document.createElement("script");c.setAttribute("src",""+n+a+"="+h),t.charset&&c.setAttribute("charset",t.charset),c.id=p,document.getElementsByTagName("head")[0].appendChild(c),l=setTimeout(function(){u(new Error("JSONP request to "+e+" timed out")),s(h),i(p),window[h]=function(){s(h)}},o),c.onerror=function(){u(new Error("JSONP request to "+e+" failed")),s(h),i(p),l&&clearTimeout(l)}})}})?r.apply(t,s):r)||(e.exports=i)},107:function(e,t,r){!function(){"use strict";function e(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}var t=setTimeout;function s(e){return Boolean(e&&void 0!==e.length)}function i(){}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=[],h(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,n._immediateFn(function(){var r=1===e._state?t.onFulfilled:t.onRejected;if(null!==r){var s;try{s=r(e._value)}catch(e){return void l(t.promise,e)}a(t.promise,s)}else(1===e._state?a:l)(t.promise,e._value)})):e._deferreds.push(t)}function a(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 r=t.then;if(t instanceof n)return e._state=3,e._value=t,void u(e);if("function"==typeof r)return void h((s=r,i=t,function(){s.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){l(e,t)}var s,i}function l(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,r=e._deferreds.length;t<r;t++)o(e,e._deferreds[t]);e._deferreds=null}function h(e,t){var r=!1;try{e(function(e){r||(r=!0,a(t,e))},function(e){r||(r=!0,l(t,e))})}catch(e){if(r)return;r=!0,l(t,e)}}n.prototype.catch=function(e){return this.then(null,e)},n.prototype.then=function(e,t){var r=new this.constructor(i);return o(this,new function(e,t,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=r}(e,t,r)),r},n.prototype.finally=e,n.all=function(e){return new n(function(t,r){if(!s(e))return r(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var n=i.length;function o(e,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(t){o(e,t)},r)}i[e]=s,0==--n&&t(i)}catch(e){r(e)}}for(var a=0;a<i.length;a++)o(a,i[a])})},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,r){r(e)})},n.race=function(e){return new n(function(t,r){if(!s(e))return r(new TypeError("Promise.race accepts an array"));for(var i=0,o=e.length;i<o;i++)n.resolve(e[i]).then(t,r)})},n._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},n._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();"Promise"in p?p.Promise.prototype.finally||(p.Promise.prototype.finally=e):p.Promise=n}()}},t={};function r(s){if(t[s])return t[s].exports;var i=t[s]={exports:{}};return e[s].call(i.exports,i,i.exports,r),i.exports}r.n=(e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}),r.d=((e,t)=>{for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),(()=>{"use strict";
  9. /* Copyright© 2000 - 2021 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 e=window.SuperMap=window.SuperMap||{};e.Components=window.SuperMap.Components||{};
  13. /* Copyright© 2000 - 2021 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. class t{constructor(t,r,s){this.x=t?parseFloat(t):0,this.y=r?parseFloat(r):0,this.mode=s,this.CLASS_NAME="SuperMap.Pixel",e.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new t(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,r){if(null==e||null==r)throw new TypeError("Pixel.add cannot receive null values");return new t(this.x+e,this.y+r)}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}}e.Pixel=t,
  17. /* Copyright© 2000 - 2021 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. e.inherit=function(t,r){var s,i,n,o=function(){};for(o.prototype=r.prototype,t.prototype=new o,s=2,i=arguments.length;s<i;s++)"function"==typeof(n=arguments[s])&&(n=n.prototype),e.Util.extend(t.prototype,n)},e.mixin=function(...e){class t{constructor(t){for(var r=0;r<e.length;r++)i(this,new e[r](t))}}for(var r=0;r<e.length;r++){var s=e[r];i(t,s),i(t.prototype,s.prototype),i(t.prototype,new s)}return t;function i(e,t){var r=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var s=0;s<r.length;s++){var i=r[s];if("constructor"!==i&&"prototype"!==i&&"name"!==i&&"length"!==i){let r=Object.getOwnPropertyDescriptor(t,i);window.ActiveXObject?Object.defineProperty(e,i,r||{}):Object.defineProperty(e,i,r)}}}};e.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("-"),r=t[0],s=1,i=t.length;s<i;s++){var n=t[s];r+=n.charAt(0).toUpperCase()+n.substring(1)}return r},format:function(t,r,s){r||(r=window);return t.replace(e.String.tokenRegEx,function(e,t){for(var i,n=t.split(/\.+/),o=0;o<n.length;o++)0==o&&(i=r),i=i[n[o]];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(t){return e.String.numberRegEx.test(t)},numericIf:function(t){return e.String.isNumeric(t)?parseFloat(t):t}};var s=e.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(e,t){var r=0;return t>0&&(r=parseFloat(e.toPrecision(t))),r},format:function(t,r,s,i){r=void 0!==r?r:0,s=void 0!==s?s:e.Number.thousandsSeparator,i=void 0!==i?i:e.Number.decimalSeparator,null!=r&&(t=parseFloat(t.toFixed(r)));var n=t.toString().split(".");1===n.length&&null==r&&(r=0);var o,a=n[0];if(s)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(a);)a=a.replace(l,"$1"+s+"$2");if(0==r)o=a;else{var u=n.length>1?n[1]:"0";null!=r&&(u+=new Array(r-u.length+1).join("0")),o=a+i+u}return o}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return s.limitSigDigs(this,e)});var i=e.Function={bind:function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var s=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,s)}},bindAsEventListener:function(e,t){return function(r){return e.call(t,r||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},n=(e.Array={filter:function(e,t,r){var s=[];if(Array.prototype.filter)s=e.filter(t,r);else{var i=e.length;if("function"!=typeof t)throw new TypeError;for(var n=0;n<i;n++)if(n in e){var o=e[n];t.call(r,o,n,e)&&s.push(o)}}return s}},e.Util=e.Util||{});e.Util.extend=function(e,t){if(e=e||{},t){for(var r in t){var s=t[r];void 0!==s&&(e[r]=s)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},e.Util.copy=function(e,t){var r;if(e=e||{},t)for(var s in e)void 0!==(r=t[s])&&(e[s]=r)},e.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 r in e[t])e[t][r].destroy&&e[t][r].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},e.Util.getElement=function(){for(var e=[],t=0,r=arguments.length;t<r;t++){var s=arguments[t];if("string"==typeof s&&(s=document.getElementById(s)),1===arguments.length)return s;e.push(s)}return e},e.Util.isElement=function(e){return!(!e||1!==e.nodeType)},e.Util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.Util.removeItem=function(e,t){for(var r=e.length-1;r>=0;r--)e[r]===t&&e.splice(r,1);return e},e.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var r=0,s=e.length;r<s;r++)if(e[r]===t)return r;return-1},e.Util.modifyDOMElement=function(e,t,r,s,i,n,o,a){t&&(e.id=t),r&&(e.style.left=r.x+"px",e.style.top=r.y+"px"),s&&(e.style.width=s.w+"px",e.style.height=s.h+"px"),i&&(e.style.position=i),n&&(e.style.border=n),o&&(e.style.overflow=o),parseFloat(a)>=0&&parseFloat(a)<1?(e.style.filter="alpha(opacity="+100*a+")",e.style.opacity=a):1===parseFloat(a)&&(e.style.filter="",e.style.opacity="")},e.Util.applyDefaults=function(e,t){e=e||{};var r="function"==typeof window.Event&&t instanceof window.Event;for(var s in t)(void 0===e[s]||!r&&t.hasOwnProperty&&t.hasOwnProperty(s)&&!e.hasOwnProperty(s))&&(e[s]=t[s]);return!r&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},e.Util.getParameterString=function(e){var t=[];for(var r in e){var s,i=e[r];if(null!=i&&"function"!=typeof i)s=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(r)+"="+s)}return t.join("&")},e.Util.urlAppend=function(e,t){var r=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var s=(e+" ").split(/[?&]/);r+=" "===s.pop()?t:s.length?"&"+t:"?"+t}return r},e.Util.urlPathAppend=function(e,t){let r=e;if(!t)return r;0===t.indexOf("/")&&(t=t.substring(1));const s=e.split("?");return s[0].indexOf("/",s[0].length-1)<0&&(s[0]+="/"),r=`${s[0]}${t}${s.length>1?`?${s[1]}`:""}`},e.Util.DEFAULT_PRECISION=14,e.Util.toFloat=function(t,r){return null==r&&(r=e.Util.DEFAULT_PRECISION),"number"!=typeof t&&(t=parseFloat(t)),0===r?t:parseFloat(t.toPrecision(r))},e.Util.rad=function(e){return e*Math.PI/180},e.Util.getParameters=function(t){t=null===t||void 0===t?window.location.href:t;var r="";if(e.String.contains(t,"?")){var s=t.indexOf("?")+1,i=e.String.contains(t,"#")?t.indexOf("#"):t.length;r=t.substring(s,i)}for(var n={},o=r.split(/[&;]/),a=0,l=o.length;a<l;++a){var u=o[a].split("=");if(u[0]){var h=u[0];try{h=decodeURIComponent(h)}catch(e){h=unescape(h)}var p=(u[1]||"").replace(/\+/g," ");try{p=decodeURIComponent(p)}catch(e){p=unescape(p)}1==(p=p.split(",")).length&&(p=p[0]),n[h]=p}}return n},e.Util.lastSeqID=0,e.Util.createUniqueID=function(t){return null==t&&(t="id_"),e.Util.lastSeqID+=1,t+e.Util.lastSeqID},e.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36},e.INCHES_PER_UNIT.in=e.INCHES_PER_UNIT.inches,e.INCHES_PER_UNIT.degrees=e.INCHES_PER_UNIT.dd,e.INCHES_PER_UNIT.nmi=1852*e.INCHES_PER_UNIT.m,e.METERS_PER_INCH=.0254000508001016,e.Util.extend(e.INCHES_PER_UNIT,{Inch:e.INCHES_PER_UNIT.inches,Meter:1/e.METERS_PER_INCH,Foot:.3048006096012192/e.METERS_PER_INCH,IFoot:.3048/e.METERS_PER_INCH,ClarkeFoot:.3047972651151/e.METERS_PER_INCH,SearsFoot:.30479947153867626/e.METERS_PER_INCH,GoldCoastFoot:.3047997101815088/e.METERS_PER_INCH,IInch:.0254/e.METERS_PER_INCH,MicroInch:254e-7/e.METERS_PER_INCH,Mil:2.54e-8/e.METERS_PER_INCH,Centimeter:.01/e.METERS_PER_INCH,Kilometer:1e3/e.METERS_PER_INCH,Yard:.9144018288036576/e.METERS_PER_INCH,SearsYard:.914398414616029/e.METERS_PER_INCH,IndianYard:.9143985307444408/e.METERS_PER_INCH,IndianYd37:.91439523/e.METERS_PER_INCH,IndianYd62:.9143988/e.METERS_PER_INCH,IndianYd75:.9143985/e.METERS_PER_INCH,IndianFoot:.30479951/e.METERS_PER_INCH,IndianFt37:.30479841/e.METERS_PER_INCH,IndianFt62:.3047996/e.METERS_PER_INCH,IndianFt75:.3047995/e.METERS_PER_INCH,Mile:1609.3472186944373/e.METERS_PER_INCH,IYard:.9144/e.METERS_PER_INCH,IMile:1609.344/e.METERS_PER_INCH,NautM:1852/e.METERS_PER_INCH,"Lat-66":110943.31648893273/e.METERS_PER_INCH,"Lat-83":110946.25736872235/e.METERS_PER_INCH,Decimeter:.1/e.METERS_PER_INCH,Millimeter:.001/e.METERS_PER_INCH,Dekameter:10/e.METERS_PER_INCH,Decameter:10/e.METERS_PER_INCH,Hectometer:100/e.METERS_PER_INCH,GermanMeter:1.0000135965/e.METERS_PER_INCH,CaGrid:.999738/e.METERS_PER_INCH,ClarkeChain:20.1166194976/e.METERS_PER_INCH,GunterChain:20.11684023368047/e.METERS_PER_INCH,BenoitChain:20.116782494375872/e.METERS_PER_INCH,SearsChain:20.11676512155/e.METERS_PER_INCH,ClarkeLink:.201166194976/e.METERS_PER_INCH,GunterLink:.2011684023368047/e.METERS_PER_INCH,BenoitLink:.20116782494375873/e.METERS_PER_INCH,SearsLink:.2011676512155/e.METERS_PER_INCH,Rod:5.02921005842012/e.METERS_PER_INCH,IntnlChain:20.1168/e.METERS_PER_INCH,IntnlLink:.201168/e.METERS_PER_INCH,Perch:5.02921005842012/e.METERS_PER_INCH,Pole:5.02921005842012/e.METERS_PER_INCH,Furlong:201.1684023368046/e.METERS_PER_INCH,Rood:3.778266898/e.METERS_PER_INCH,CapeFoot:.3047972615/e.METERS_PER_INCH,Brealey:375/e.METERS_PER_INCH,ModAmFt:.304812252984506/e.METERS_PER_INCH,Fathom:1.8288/e.METERS_PER_INCH,"NautM-UK":1853.184/e.METERS_PER_INCH,"50kilometers":5e4/e.METERS_PER_INCH,"150kilometers":15e4/e.METERS_PER_INCH}),e.Util.extend(e.INCHES_PER_UNIT,{mm:e.INCHES_PER_UNIT.Meter/1e3,cm:e.INCHES_PER_UNIT.Meter/100,dm:100*e.INCHES_PER_UNIT.Meter,km:1e3*e.INCHES_PER_UNIT.Meter,kmi:e.INCHES_PER_UNIT.nmi,fath:e.INCHES_PER_UNIT.Fathom,ch:e.INCHES_PER_UNIT.IntnlChain,link:e.INCHES_PER_UNIT.IntnlLink,"us-in":e.INCHES_PER_UNIT.inches,"us-ft":e.INCHES_PER_UNIT.Foot,"us-yd":e.INCHES_PER_UNIT.Yard,"us-ch":e.INCHES_PER_UNIT.GunterChain,"us-mi":e.INCHES_PER_UNIT.Mile,"ind-yd":e.INCHES_PER_UNIT.IndianYd37,"ind-ft":e.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/e.METERS_PER_INCH}),e.DOTS_PER_INCH=96,e.Util.normalizeScale=function(e){return e>1?1/e:e},e.Util.getResolutionFromScale=function(t,r){var s;t&&(null==r&&(r="degrees"),s=1/(e.Util.normalizeScale(t)*e.INCHES_PER_UNIT[r]*e.DOTS_PER_INCH));return s},e.Util.getScaleFromResolution=function(t,r){return null==r&&(r="degrees"),t*e.INCHES_PER_UNIT[r]*e.DOTS_PER_INCH},e.IS_GECKO=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),e.Browser=function(){var e,t="",r="",s="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.]+)/)),r=e?e[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?s="apple":i.indexOf("android")>-1&&(r=(e=i.match(/version\/([\d.]+)/))?e[1]:"",s="android"),{name:t,version:r,device:s}}(),e.Util.getBrowser=function(){return e.Browser},e.Util.isSupportCanvas=function(){var t=!0,r=e.Util.getBrowser();return document.createElement("canvas").getContext?("firefox"===r.name&&parseFloat(r.version)<5&&(t=!1),"safari"===r.name&&parseFloat(r.version)<4&&(t=!1),"opera"===r.name&&parseFloat(r.version)<10&&(t=!1),"msie"===r.name&&parseFloat(r.version)<9&&(t=!1)):t=!1,t}(),e.Util.supportCanvas=function(){return e.Util.isSupportCanvas},e.INCHES_PER_UNIT.degree=e.INCHES_PER_UNIT.dd,e.INCHES_PER_UNIT.meter=e.INCHES_PER_UNIT.m,e.INCHES_PER_UNIT.foot=e.INCHES_PER_UNIT.ft,e.INCHES_PER_UNIT.inch=e.INCHES_PER_UNIT.inches,e.INCHES_PER_UNIT.mile=e.INCHES_PER_UNIT.mi,e.INCHES_PER_UNIT.kilometer=e.INCHES_PER_UNIT.km,e.INCHES_PER_UNIT.yard=e.INCHES_PER_UNIT.yd,e.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),s=r.indexOf("//");if(-1===t)return!0;var i,n=i=e.substring(0,t),o=r.substring(s+2);s=o.indexOf("/");var a=o.indexOf(":"),l=o.substring(0,s),u=document.location.protocol;if(-1!==a||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==n.toLowerCase())return!1;var h=(n=e.substring(t+2)).indexOf(":");t=n.indexOf("/");var p,c=n.substring(0,t);return-1!==h?p=n.substring(0,h):(p=n.substring(0,t),c+=":"+("http:"===i.toLowerCase()?80:443)),p===document.domain&&c===l},e.Util.calculateDpi=function(e,t,r,s,i){if(e&&t&&r){var n,o=e.getWidth(),a=e.getHeight(),l=t.w,u=t.h;if(i=i||6378137,"degree"===(s=s||"degrees").toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()){let e=o/l,t=a/u;n=254/(e>t?e:t)/r/(2*Math.PI*i/360)/1e4}else{n=254/(o/l)/r/1e4}return n}},e.Util.toJSON=function(t){var r=t;if(null==r)return null;switch(r.constructor){case String:return r=(r=(r=(r=(r=(r=(r='"'+r.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,n=r.length;i<n;i++)s.push(e.Util.toJSON(r[i]));return"["+s.join(",")+"]";case Number:return isFinite(r)?String(r):null;case Boolean:return String(r);case Date:return"{'__type':\"System.DateTime\",'Year':"+r.getFullYear()+",'Month':"+(r.getMonth()+1)+",'Day':"+r.getDate()+",'Hour':"+r.getHours()+",'Minute':"+r.getMinutes()+",'Second':"+r.getSeconds()+",'Millisecond':"+r.getMilliseconds()+",'TimezoneOffset':"+r.getTimezoneOffset()+"}";default:if(null!=r.toJSON&&"function"==typeof r.toJSON)return r.toJSON();if("object"==typeof r){if(r.length){let t=[];for(let s=0,i=r.length;s<i;s++)t.push(e.Util.toJSON(r[s]));return"["+t.join(",")+"]"}let t=[];for(let s in r)"function"!=typeof r[s]&&"CLASS_NAME"!==s&&"parent"!==s&&t.push("'"+s+"':"+e.Util.toJSON(r[s]));return t.length>0?"{"+t.join(",")+"}":"{}"}return r.toString()}},e.Util.getResolutionFromScaleDpi=function(t,r,s,i){return i=i||6378137,s=s||"",t>0&&r>0?(t=e.Util.normalizeScale(t),"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/r/t/(2*Math.PI*i/360)/1e4:254/r/t/1e4):-1},e.Util.getScaleFromResolutionDpi=function(e,t,r,s){return s=s||6378137,r=r||"",e>0&&t>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*s/360)/1e4:254/t/e/1e4:-1},e.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},e.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var r in t){var s=t[r];void 0!==s&&"CLASS_NAME"!==r&&"function"!=typeof s&&(e[r]=s)}return e},e.Util.copyAttributesWithClip=function(e,t,r){if(e=e||{},t)for(var s in t){var i=!1;if(r&&r.length)for(var n=0,o=r.length;n<o;n++)if(s===r[n]){i=!0;break}if(!0!==i){var a=t[s];void 0!==a&&"CLASS_NAME"!==s&&"function"!=typeof a&&(e[s]=a)}}return e},e.Util.cloneObject=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date){let e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array){return t.slice(0)}if(t instanceof Object){let s={};for(var r in t)t.hasOwnProperty(r)&&(s[r]=e.Util.cloneObject(t[r]));return s}throw new Error("Unable to copy obj! Its type isn't supported.")},e.Util.lineIntersection=function(t,r,s,i){var n,o,a=null,l=(i.x-s.x)*(t.y-s.y)-(i.y-s.y)*(t.x-s.x),u=(r.x-t.x)*(t.y-s.y)-(r.y-t.y)*(t.x-s.x),h=(i.y-s.y)*(r.x-t.x)-(i.x-s.x)*(r.y-t.y);if(0!=h)o=u/h,a=(n=l/h)>=0&&o<=1&&n<=1&&o>=0?new e.Geometry.Point(t.x+n*(r.x-t.x),t.y+n*(r.y-t.y)):"No Intersection";else if(0==l&&0==u){var p=Math.max(t.y,r.y),c=Math.min(t.y,r.y),d=Math.max(t.x,r.x),E=Math.min(t.x,r.x);a=(s.y>=c&&s.y<=p||i.y>=c&&i.y<=p)&&s.x>=E&&s.x<=d||i.x>=E&&i.x<=d?"Coincident":"Parallel"}else a="Parallel";return a},e.Util.getTextBounds=function(e,t,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",e.fontSize&&(r.style.fontSize=e.fontSize),e.fontFamily&&(r.style.fontFamily=e.fontFamily),e.fontWeight&&(r.style.fontWeight=e.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=t;var s=r.clientWidth,i=r.clientHeight;return document.body.removeChild(r),{textWidth:s,textHeight:i}};
  21. /* Copyright© 2000 - 2021 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. var o=e.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(t,r){for(var s=e.Event.element(t);s.parentNode&&(!s.tagName||s.tagName.toUpperCase()!=r.toUpperCase());)s=s.parentNode;return s},observe:function(e,t,r,s){var i=n.getElement(e);if(s=s||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!i._eventCacheID){var o="eventCacheID_";i.id&&(o=i.id+"_"+o),i._eventCacheID=n.createUniqueID(o)}var a=i._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:i,name:t,observer:r,useCapture:s}),i.addEventListener?"mousewheel"===t?i.addEventListener(t,r,{useCapture:s,passive:!1}):i.addEventListener(t,r,s):i.attachEvent&&i.attachEvent("on"+t,r)},stopObservingElement:function(t){var r=n.getElement(t)._eventCacheID;this._removeElementObservers(e.Event.observers[r])},_removeElementObservers:function(t){if(t)for(var r=t.length-1;r>=0;r--){var s=t[r],i=new Array(s.element,s.name,s.observer,s.useCapture);e.Event.stopObserving.apply(this,i)}},stopObserving:function(t,r,s,i){i=i||!1;var o=n.getElement(t),a=o._eventCacheID;"keypress"===r&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.detachEvent)&&(r="keydown");var l=!1,u=e.Event.observers[a];if(u)for(var h=0;!l&&h<u.length;){var p=u[h];if(p.name===r&&p.observer===s&&p.useCapture===i){u.splice(h,1),0==u.length&&delete e.Event.observers[a],l=!0;break}h++}return l&&(o.removeEventListener?o.removeEventListener(r,s,i):o&&o.detachEvent&&o.detachEvent("on"+r,s)),l},unloadCache:function(){if(e.Event&&e.Event.observers){for(var t in e.Event.observers){var r=e.Event.observers[t];e.Event._removeElementObservers.apply(this,[r])}e.Event.observers=!1}},CLASS_NAME:"SuperMap.Event"};e.Event=o,e.Event.observe(window,"unload",e.Event.unloadCache,!1);
  25. /* Copyright© 2000 - 2021 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. class a{constructor(e,t,r,s,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=s,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,n.extend(this,i),null!=r)for(var o=0,a=r.length;o<a;o++)this.addEventType(r[o]);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&&(o.stopObservingElement(this.element),this.element.hasScrollEvent&&o.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?o.stopObservingElement(this.element):(this.eventHandler=i.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=i.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,r=this.BROWSER_EVENTS.length;t<r;t++){var s=this.BROWSER_EVENTS[t];this.addEventType(s),o.observe(e,s,this.eventHandler)}o.observe(e,"dragstart",o.stop)}on(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.register(t,e.scope,e[t])}register(e,t,r,s){if(e in a&&!this.extensions[e]&&(this.extensions[e]=new a[e](this)),null!=r&&-1!==n.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 o={obj:t,func:r};s?(i.splice(this.extensionCount[e],0,o),"object"==typeof s&&s.extension&&this.extensionCount[e]++):i.push(o)}}registerPriority(e,t,r){this.register(e,t,r,!0)}un(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.unregister(t,e.scope,e[t])}unregister(e,t,r){null==t&&(t=this.object);var s=this.listeners[e];if(null!=s)for(var i=0,n=s.length;i<n;i++)if(s[i].obj===t&&s[i].func===r){s.splice(i,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var r=this.listeners[e];if(r&&0!=r.length){var s;null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var i=0,n=(r=r.slice()).length;i<n;i++){var a=r[i];if(void 0!=(s=a.func.apply(a.obj,[t]))&&!1===s)break}return this.fallThrough||o.stop(t,!0),s}}handleBrowserEvent(e){var t=e.type,r=this.listeners[t];if(r&&0!=r.length){var s=e.touches;if(s&&s[0]){for(var i,n=0,o=0,a=s.length,l=0;l<a;++l)n+=(i=s[l]).clientX,o+=i.clientY;e.clientX=n/a,e.clientY=o/a}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||(o.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var r=n.getViewportElement();this.element.scrolls=[r.scrollLeft,r.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=n.pagePosition(this.element)),new t(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])}}e.Events=a,e.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"];const l=function(){try{return elasticsearch}catch(e){return{}}}();var u=r.n(l);e.ElasticSearch=
  29. /* Copyright© 2000 - 2021 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{constructor(e,t){t=t||{},this.url=e,this.client=new(u().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 a(this,null,this.EVENT_TYPES),this.eventListeners=null,n.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 r=this;return r.client.msearch(e).then(function(e){return r._update(e.responses,t),e},function(e){return t(e),r.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 r=this;return r.client.search(e).then(function(e){return r._update(e.responses,t),e},function(e){return t(e),r.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 r=this;e&&(r.data=e,r.openGeoFence&&r.geoFence&&r._validateDatas(e),r.events.triggerEvent("change",{data:r.data}),r.change?r.change&&r.change(e):t&&t(void 0,{responses:e}))}_validateDatas(e){if(e){e instanceof Array||(e=[e]);var t,r=e.length;for(t=0;t<r;t++)this._validateData(e[t])}}_validateData(e){let t=this;e.hits.hits.map(function(r){let s=r._source,i=t._getMeterPerMapUnit(t.geoFence.unit),n=t.geoFence.center[0]*i,o=t.geoFence.center[1]*i,a=s.x*i,l=s.y*i;return t._distance(a,l,n,o)>t.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),r})}_distance(e,t,r,s){return Math.sqrt((e-r)*(e-r)+(t-s)*(t-s))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}};r(107),r(693);var h=r(144),p=r.n(h);
  33. /* Copyright© 2000 - 2021 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.*/
  36. let c=window.fetch;e.setCORS=function(t){e.CORS=t};var d=e.isCORS=function(){return void 0!=e.CORS?e.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},E=(e.setRequestTimeout=function(t){return e.RequestTimeout=t},e.getRequestTimeout=function(){return e.RequestTimeout||45e3}),m=e.FetchRequest={commit:function(e,t,r,s){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,r,s);case"POST":return this.post(t,r,s);case"PUT":return this.put(t,r,s);case"DELETE":return this.delete(t,r,s);default:return this.get(t,r,s)}},supportDirectRequest:function(e,t){return!!n.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:d()||t.proxy)},get:function(t,r,s){s=s||{};if(t=n.urlAppend(t,this._getParameterString(r||{})),t=this._processUrl(t,s),!this.supportDirectRequest(t,s)){var i={url:t=t.replace(".json",".jsonp"),data:r};return e.Util.RequestJSONPPromise.GET(i)}return this.urlIsLong(t)?this._postSimulatie("GET",t.substring(0,t.indexOf("?")-1),r,s):this._fetch(t,r,s,"GET")},delete:function(t,r,s){s=s||{};if(t=n.urlAppend(t,this._getParameterString(r||{})),t=this._processUrl(t,s),!this.supportDirectRequest(t,s)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=DELETE",data:r};return e.Util.RequestJSONPPromise.DELETE(i)}return this.urlIsLong(t)?this._postSimulatie("DELETE",t.substring(0,t.indexOf("?")-1),r,s):this._fetch(t,r,s,"DELETE")},post:function(t,r,s){if(s=s||{},!this.supportDirectRequest(t,s)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=POST",data:r};return e.Util.RequestJSONPPromise.POST(i)}return this._fetch(this._processUrl(t,s),r,s,"POST")},put:function(t,r,s){if(s=s||{},t=this._processUrl(t,s),!this.supportDirectRequest(t,s)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=PUT",data:r};return e.Util.RequestJSONPPromise.PUT(i)}return this._fetch(t,r,s,"PUT")},urlIsLong:function(e){for(var t=0,r=null,s=0,i=e.length;s<i;s++)(r=e.charCodeAt(s))<127?t++:128<=r&&r<=2047?t+=2:2048<=r&&r<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,r,s){return t+=(t.indexOf("?")>-1?"&":"?")+"_method="+e,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(t,r,s)},_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 r=e.split("?");2===r.length&&(e=r[0]+".json?"+r[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,r,s){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,c(e,{method:s,headers:r.headers,body:"PUT"===s||"POST"===s?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:E()}).then(function(e){return e})):c(e,{method:s,body:"PUT"===s||"POST"===s?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:E()}).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||{},p()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(r,s){setTimeout(function(){s(new Error("timeout"))},e),t.then(r,s)})},_getParameterString:function(e){var t=[];for(var r in e){var s,i=e[r];if(null!=i&&"function"!=typeof i)s=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(r)+"="+s)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};e.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(t){for(var r in t){this.queryKeys.push(r),"string"!=typeof t[r]&&(t[r]=e.Util.toJSON(t[r]));var s=encodeURIComponent(t[r]);this.queryValues.push(s)}},issue:function(e){for(var t=this,r=t.getUid(),s=e.url,i=[],n=new Promise(function(e){t.supermap_callbacks[r]=function(s){delete t.supermap_callbacks[r],e(s)}}),o=s,a=0,l=t.queryKeys?t.queryKeys.length:0,u=0;u<l;u++)if(o.length+t.queryKeys[u].length+2>=t.limitLength){if(0==a)return!1;i.push(o),o=s,a=0,u--}else if(o.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var h=t.queryValues[u];h.length>0;){var p=t.limitLength-o.length-t.queryKeys[u].length-2;o.indexOf("?")>-1?o+="&":o+="?";var c=h.substring(0,p);"%"===c.substring(p-1,p)?(p-=1,c=h.substring(0,p)):"%"===c.substring(p-2,p-1)&&(p-=2,c=h.substring(0,p)),o+=t.queryKeys[u]+"="+c,h=h.substring(p),c.length>0&&(i.push(o),o=s,a=0)}else a++,o.indexOf("?")>-1?o+="&":o+="?",o+=t.queryKeys[u]+"="+t.queryValues[u];return i.push(o),t.send(i,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+r+"]",e&&e.proxy),n},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,r){var s=e.length;if(s>0)for(var i=(new Date).getTime(),n=0;n<s;n++){var o=e[n];o.indexOf("?")>-1?o+="&":o+="?",o+="sectionCount="+s,o+="&sectionIndex="+n,o+="&jsonpUserID="+i,r&&(o=decodeURIComponent(o),o=r+encodeURIComponent(o)),p()(o,{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)}};
  37. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  38. * This program are made available under the terms of the Apache License, Version 2.0
  39. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  40. class y{static generateToken(e,t){var r=this.servers[e];if(r)return m.post(r.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},n.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++){var r=e[t];this.servers[r.server]=r}}static registerToken(e,t){if(this.tokens=this.tokens||{},e&&t){var r=this._getTokenStorageKey(e);this.tokens[r]=t}}static registerKey(e,t){if(this.keys=this.keys||{},e&&!(e.length<1)&&t){e=n.isArray(e)?e:[e];for(var r=0;r<e.length;r++){var s=this._getUrlRestString(e[0])||e[0];this.keys[s]=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,r,s){e=n.urlPathAppend(e,"services/security/login");var i={username:t&&t.toString(),password:r&&r.toString(),rememberme:s};i=JSON.stringify(i);return m.post(e,i,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return e.json()})}static logoutiServer(e){e=n.urlPathAppend(e,"services/security/logout");return m.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 r=y.SSO+"/login?service="+e;this._open(r,t)}static loginiPortal(e,t,r){e=n.urlPathAppend(e,"web/login");var s={username:t&&t.toString(),password:r&&r.toString()};s=JSON.stringify(s);return m.post(e,s,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0}).then(function(e){return e.json()})}static logoutiPortal(e){e=n.urlPathAppend(e,"services/security/logout");return m.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,r){if(n.isInTheSameDomain(e)){var s=n.urlPathAppend(e,"icloud/security/tokens"),i=t||{},o={username:i.userName&&i.userName.toString(),password:i.password&&i.password.toString()};o=JSON.stringify(o);var a=this;return m.post(s,o,{headers:{Accept:"*/*","Content-Type":"application/json"}}).then(function(e){e.text().then(function(e){return a.imanagerToken=e,e})})}var l=!r||r.isNewTab;this._open(e,l)}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 r=window.screen.availWidth/2-this.INNER_WINDOW_WIDTH/2,s=window.screen.availHeight/2-this.INNER_WINDOW_HEIGHT/2,i="height="+this.INNER_WINDOW_HEIGHT+", width="+this.INNER_WINDOW_WIDTH+",top="+s+", left="+r+",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}}y.INNER_WINDOW_WIDTH=600,y.INNER_WINDOW_HEIGHT=600,y.SSO="https://sso.supermap.com",y.ONLINE="https://www.supermapol.com",e.SecurityManager=y;
  41. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  42. * This program are made available under the terms of the Apache License, Version 2.0
  43. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  44. var f=e.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},T=e.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},S=(e.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"},e.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},e.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},e.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"}),g=(e.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},e.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"},e.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"}),v=(e.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},e.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},e.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"},e.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"},e.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},e.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},e.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"}),R=(e.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},e.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"}),I=(e.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"},e.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},e.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.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},e.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},e.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},e.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},e.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},e.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},e.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"},e.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},e.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"}),N=(e.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},e.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},e.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},e.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},e.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},e.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},e.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},e.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},e.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},e.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},e.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},e.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},e.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},e.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},e.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"},e.Exponent={EXP1:"EXP1",EXP2:"EXP2"},e.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},e.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},e.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"}),O=e.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},C=e.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},_=e.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},A=e.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},P=e.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"};e.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},e.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},e.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},e.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"},e.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},e.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},e.OrderType={ASC:"ASC",DESC:"DESC"},e.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},e.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},e.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},e.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},e.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"},e.WebExportFormatType={PNG:"PNG",PDF:"PDF"},e.WebScaleOrientationType={HORIZONTALLABELSBELOW:"HORIZONTALLABELSBELOW",HORIZONTALLABELSABOVE:"HORIZONTALLABELSABOVE",VERTICALLABELSLEFT:"VERTICALLABELSLEFT",VERTICALLABELSRIGHT:"VERTICALLABELSRIGHT"},e.WebScaleType={LINE:"LINE",BAR:"BAR",BAR_SUB:"BAR_SUB"},e.WebScaleUnit={METER:"METER",FOOT:"FOOT",DEGREES:"DEGREES"};
  45. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  46. * This program are made available under the terms of the Apache License, Version 2.0
  47. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  48. class L{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&&n.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}}e.DatasourceConnectionInfo=L;
  49. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  50. * This program are made available under the terms of the Apache License, Version 2.0
  51. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  52. class b{constructor(e){this.type=I.UDB,this.datasetName="analystResult",this.datasourceInfo=null,this.outputPath="",n.extend(this,e),this.CLASS_NAME="SuperMap.OutputSetting"}destroy(){var e=this;e.type=null,e.datasetName=null,e.outputPath=null,e.datasourceInfo instanceof L&&(e.datasourceInfo.destroy(),e.datasourceInfo=null)}}e.OutputSetting=b;
  53. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  54. * This program are made available under the terms of the Apache License, Version 2.0
  55. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  56. class M{constructor(e){this.items=null,this.numericPrecision=1,this.rangeMode=v.EQUALINTERVAL,this.rangeCount="",this.colorGradientType=R.YELLOW_RED,n.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}}e.MappingParameters=M;
  57. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  58. * This program are made available under the terms of the Apache License, Version 2.0
  59. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  60. class w{constructor(e){e&&(this.datasetName="",this.query="",this.resolution=80,this.method=0,this.meshType=0,this.fields="",this.radius=300,this.meshSizeUnit=C.METER,this.radiusUnit=C.METER,this.areaUnit=O.SQUAREMILE,this.output=null,this.mappingParameters=null,n.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 b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}e.KernelDensityJobParameter=w;
  61. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  62. * This program are made available under the terms of the Apache License, Version 2.0
  63. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  64. class x{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=S.CONTAIN,this.output=null,this.mappingParameters=null,n.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}e.SingleObjectQueryJobsParameter=x;
  65. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  66. * This program are made available under the terms of the Apache License, Version 2.0
  67. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  68. class D{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,n.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}e.SummaryAttributesJobsParameter=D;
  69. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  70. * This program are made available under the terms of the Apache License, Version 2.0
  71. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  72. class U{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=_.AVERAGE,this.fields="",this.type=A.SUMMARYMESH,this.output=null,this.mappingParameters=null,n.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 b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"type"!==r?"output"!==r?("SUMMARYMESH"===e.type&&"regionDataset"!==r||"SUMMARYREGION"===e.type&&!s(["meshType","resolution","query"],r))&&(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):t.type=e[r]:(t.input=t.input||{},t.input[r]=e[r]);function s(e,t){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}}}e.SummaryMeshJobParameter=U;
  73. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  74. * This program are made available under the terms of the Apache License, Version 2.0
  75. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  76. class F{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=C.METER,this.type=A.SUMMARYMESH,this.output=null,this.mappingParameters=null,n.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 b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"type"!==r&&"type"!==r?"output"!==r?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==r)&&(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):t.type=e[r]:(t.input=t.input||{},t.input[r]=e[r])}}e.SummaryRegionJobParameter=F;
  77. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  78. * This program are made available under the terms of the Apache License, Version 2.0
  79. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  80. class H{constructor(e){e&&(this.datasetName="",this.datasetOverlay="",this.mode="",this.srcFields="",this.overlayFields="",this.output=null,this.mappingParameters=null,n.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 b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!=r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}e.OverlayGeoJobParameter=H;
  81. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  82. * This program are made available under the terms of the Apache License, Version 2.0
  83. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  84. class J{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=C.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;n.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 b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},"bounds"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}e.BuffersAnalystJobsParameter=J;
  85. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  86. * This program are made available under the terms of the Apache License, Version 2.0
  87. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  88. class B{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=P.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,n.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}e.TopologyValidatorJobsParameter=B;
  89. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  90. * This program are made available under the terms of the Apache License, Version 2.0
  91. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  92. class G{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,n.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}e.GeoCodingParameter=G;
  93. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  94. * This program are made available under the terms of the Apache License, Version 2.0
  95. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  96. class V{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,n.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}}e.GeoDecodingParameter=V;var k=window.SuperMap=window.SuperMap||{};k.REST=k.REST||{};const j=function(){try{return mapv}catch(e){return{}}}();var K=function(e){var t;if(e===g.METER)t=1;else if(e===g.DEGREE)t=2*Math.PI*6378137/360;else if(e===g.KILOMETER)t=.001;else if(e===g.INCH)t=1/.025399999918;else{if(e!==g.FOOT)return t;t=.3048}return t};
  97. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  98. * This program are made available under the terms of the Apache License, Version 2.0
  99. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  100. var Y=j.baiduMapLayer?j.baiduMapLayer.__proto__:Function;class W extends Y{constructor(e,t,r,s){if(super(e,r,s),!Y)return this;s=s||{},this.init(s),this.argCheck(s),this.canvasLayer=t,this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),this.bindEvent()}clickEvent(e){var t=e.xy;super.clickEvent(t,e)}mousemoveEvent(e){var t=e.xy;super.mousemoveEvent(t,e)}bindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.events.on({click:this.clickEvent}),this.options.methods.mousemove&&e.events.on({mousemove:this.mousemoveEvent}))}unbindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.events.un({click:this.clickEvent}),this.options.methods.mousemove&&e.events.un({mousemove:this.mousemoveEvent}))}getContext(){return this.canvasLayer&&this.canvasLayer.canvasContext}addData(e,t){var r=e;e&&e.get&&(r=e.get()),this.dataSet.add(r),this.update({options:t})}setData(e,t){var r=e;e&&e.get&&(r=e.get()),this.dataSet=this.dataSet||new j.DataSet,this.dataSet.set(r),this.update({options:t})}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})}render(e){this._canvasUpdate(e)}transferToMercator(){if(this.options.coordType&&["bd09mc","coordinates_mercator"].indexOf(this.options.coordType)>-1){var e=this.dataSet.get();e=this.dataSet.transferCoordinate(e,function(e){var t=k.Projection.transform({x:e[0],y:e[1]},"EPSG:3857","EPSG:4326");return[t.x,t.y]},"coordinates","coordinates"),this.dataSet._set(e)}}_canvasUpdate(e){if(this.canvasLayer){var t=this.options.animation,r=this.getContext(),s=this.map;if(this.isEnabledTime()){if(void 0===e)return void this.clear(r);"2d"===this.context&&(r.save(),r.globalCompositeOperation="destination-out",r.fillStyle="rgba(0, 0, 0, .1)",r.fillRect(0,0,r.canvas.width,r.canvas.height),r.restore())}else this.clear(r);if("2d"===this.context)for(var i in this.options)r[i]=this.options[i];else r.clear(r.COLOR_BUFFER_BIT);if(!(this.options.minZoom&&s.getZoom()<this.options.minZoom||this.options.maxZoom&&s.getZoom()>this.options.maxZoom)){var n=this.canvasLayer,o={fromColumn:"coordinates",transferCoordinate:function(e){var t={lon:e[0],lat:e[1]},r=s.getViewPortPxFromLonLat(t);return[r.x,r.y]}};void 0!==e&&(o.filter=function(r){var s=t.trails||10;return e&&r.time>e-s&&r.time<e});var a=this.dataSet.get(o);this.processData(a);var l=s.getResolution()*K("DEGREE");"m"===this.options.unit?(this.options.size&&(this.options._size=this.options.size/l),this.options.width&&(this.options._width=this.options.width/l),this.options.height&&(this.options._height=this.options.height/l)):(this.options._size=this.options.size,this.options._height=this.options.height,this.options._width=this.options.width);var u=s.getViewPortPxFromLonLat(n.transferToMapLatLng({lon:0,lat:0}));this.drawContext(r,a,this.options,u),this.options.updateCallback&&this.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()}addAnimatorEvent(){this.map.events.on({movestart:this.animatorMovestartEvent.bind(this)}),this.map.events.on({moveend:this.animatorMoveendEvent.bind(this)})}clear(e){e&&e.clearRect&&e.clearRect(0,0,e.canvas.width,e.canvas.height)}show(){this.map.addLayer(this.canvasLayer)}hide(){this.map.removeLayer(this.canvasLayer)}draw(){this.canvasLayer.redraw()}}k.Layer.MapVLayer=
  101. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  102. * This program are made available under the terms of the Apache License, Version 2.0
  103. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  104. class extends k.Layer{constructor(e,t){if(super(e,t),this.dataSet=null,this.options=null,this.supported=!1,this.canvas=null,this.canvasContext=null,t&&k.Util.extend(this,t),this.canvas=document.createElement("canvas"),this.canvas.getContext){this.supported=!0,this.canvas.style.position="absolute",this.canvas.style.top="0px",this.canvas.style.left="0px",this.div.appendChild(this.canvas);var r=this.options&&this.options.context||"2d";this.canvasContext=this.canvas.getContext(r);var s="undefined"==typeof window?{}:window,i=this.devicePixelRatio=s.devicePixelRatio||1;"2d"==r&&this.canvasContext.scale(i,i),this.attribution="© 2018 百度 <a href='https://mapv.baidu.com' target='_blank'>MapV</a> with <span>© <a target='_blank' href='https://iclient.supermap.io' style='color: #08c;text-decoration: none;'>SuperMap iClient</a></span>",this.CLASS_NAME="SuperMap.Layer.MapVLayer"}}destroy(){this.renderer&&this.renderer.animator&&(this.renderer.animator.stop(),this.renderer.animator=null),this.dataSet=null,this.options=null,this.renderer=null,this.supported=null,this.canvas=null,this.canvasContext=null,this.maxWidth=null,this.maxHeight=null,super.destroy()}addData(e,t){this.renderer&&this.renderer.addData(e,t)}setData(e,t){this.renderer&&this.renderer.setData(e,t)}getData(){return this.renderer&&(this.dataSet=this.renderer.getData()),this.dataSet}removeData(e){this.renderer&&this.renderer.removeData(e)}clearData(){this.renderer.clearData()}setMap(e){super.setMap(e),this.renderer=new W(e,this,this.dataSet,this.options),this.supported?this.redraw():this.map.removeLayer(this)}moveTo(e,t,r){if(super.moveTo(e,t,r),this.supported){if(this.zoomChanged=t,!r){this.div.style.visibility="hidden",this.div.style.left=-parseInt(this.map.layerContainerDiv.style.left)+"px",this.div.style.top=-parseInt(this.map.layerContainerDiv.style.top)+"px";var s=this.map.getSize();this.div.style.width=parseInt(s.w)+"px",this.div.style.height=parseInt(s.h)+"px",this.canvas.width=parseInt(s.w),this.canvas.height=parseInt(s.h),this.canvas.style.width=this.div.style.width,this.canvas.style.height=this.div.style.height,this.maxWidth=s.w,this.maxHeight=s.h,this.div.style.visibility="",t||this.renderer&&this.renderer.render()}t&&this.renderer&&this.renderer.render()}}transferToMapLatLng(e){var t="EPSG:4326",r=this.map.getUnits()||"degree";return["m","meter"].indexOf(r.toLowerCase())>-1&&(t="EPSG:3857"),new k.LonLat(e.lon,e.lat).transform("EPSG:4326",t)}};
  105. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  106. * This program are made available under the terms of the Apache License, Version 2.0
  107. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  108. class q{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}}q.CREDENTIAL=null,e.Credential=q;
  109. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  110. * This program are made available under the terms of the Apache License, Version 2.0
  111. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  112. class Q{constructor(e){this.data=null,this.keepData=!1,n.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}e.Format=e.Format||Q;
  113. /* Copyright© 2000 - 2021 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 X extends Q{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,r,s,i=["{"];this.level+=1;var n=!1;for(t in e)e.hasOwnProperty(t)&&(r=this.write.apply(this,[t,this.pretty]),s=this.write.apply(this,[e[t],this.pretty]),null!=r&&null!=s&&(n&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),r,":",this.writeSpace(),s),n=!0));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"}"),i.join("")},array:function(e){var t,r=["["];this.level+=1;for(var s=0,i=e.length;s<i;++s)null!=(t=this.write.apply(this,[e[s],this.pretty]))&&(s>0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.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,r){var s=t[r];return s||(s=r.charCodeAt(),"\\u00"+Math.floor(s/16).toString(16)+(s%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 r;if(this.nativeJSON)try{r=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=r),r}write(e,t){this.pretty=!!t;var r=null,s=typeof e;if(this.serialize[s])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[s].apply(this,[e])}catch(e){}return r}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:""}}e.Format.JSON=X;
  117. /* Copyright© 2000 - 2021 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 z{constructor(e,t){let r=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,n.isArray(e)?(r.urls=e,r.length=e.length,r.totalTimes=r.length,1===r.length?r.url=e[0]:(r.index=parseInt(Math.random()*r.length),r.url=e[r.index])):(r.totalTimes=1,r.url=e),n.isArray(e)&&!r.isServiceSupportPolling()&&(r.url=e[0],r.totalTimes=1),r.serverType=r.serverType||T.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,n.extend(this,t),r.isInTheSameDomain=n.isInTheSameDomain(r.url),r.events=new a(r,null,r.EVENT_TYPES,!0),r.eventListeners instanceof Object&&r.events.on(r.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;n.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 r=this.getCredential(e.url);r&&(e.url=n.urlAppend(e.url,r.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,r,s=e;switch(this.serverType){case T.IPORTAL:(t=(r=y.getToken(s))?new q(r,"token"):null)||(t=(r=y.getKey(s))?new q(r,"key"):null);break;case T.ONLINE:t=(r=y.getKey(s))?new q(r,"key"):null;break;default:t=(r=y.getToken(s))?new q(r,"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,r=/^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(r,r.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=n.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=n.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=n.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=n.urlAppend(e.url,n.getParameterString(e.params||{}))),e.params=e.data),m.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 r=t;("string"==typeof t&&(r=(new X).read(t)),(!r||r.error||r.code>=300&&304!==r.code)&&(r=r&&r.error?{error:r.error}:{error:r}),r.error)?(e.scope?i.bind(e.failure,e.scope):e.failure)(r):(r.succeed=void 0==r.succeed||r.succeed,(e.scope?i.bind(e.success,e.scope):e.success)(r))}).catch(function(t){(e.scope?i.bind(e.failure,e.scope):e.failure)(t)})}}e.CommonServiceBase=z;
  121. /* Copyright© 2000 - 2021 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 Z extends z{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof G&&this.processAsync(e,t)}decode(e,t){t instanceof V&&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)}}e.AddressMatchService=Z;k.REST.AddressMatchService=
  125. /* Copyright© 2000 - 2021 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 extends z{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.REST.AddressMatchService"}code(e,t){var r=this;new Z(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,serverType:r.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).code(r.url+"/geocoding",e)}decode(e,t){var r=this;new Z(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,serverType:r.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).decode(r.url+"/geodecoding",e)}};
  129. /* Copyright© 2000 - 2021 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 $ extends z{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;m.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,r,s){var i=this,n=null;t&&t instanceof r&&(n=new Object,r.toObject(t,n));let o=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},i.headers||{});var a={proxy:i.proxy,headers:o,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,isInTheSameDomain:i.isInTheSameDomain};m.post(i._processUrl(e),JSON.stringify(n),a).then(function(e){return e.json()}).then(function(e){e.succeed?i.serviceProcessCompleted(e,s):i.serviceProcessFailed(e)}).catch(function(e){i.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=n.transformResult(e),t=t||1e3;var r=this;if(e)var s=setInterval(function(){m.get(r._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){r.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(s),r.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(s),r.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(s),r.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return y.getToken(e)&&(e=n.urlAppend(e,"token="+y.getToken(e))),e}}e.ProcessingServiceBase=$;
  133. /* Copyright© 2000 - 2021 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 ee extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/density"),this.CLASS_NAME="SuperMap.KernelDensityJobsService"}destroy(){super.destroy()}getKernelDensityJobs(){super.getJobs(this.url)}getKernelDensityJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addKernelDensityJob(e,t){super.addJob(this.url,e,w,t)}}e.KernelDensityJobsService=ee;
  137. /* Copyright© 2000 - 2021 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 te extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,x,t)}}e.SingleObjectQueryJobsService=te;
  141. /* Copyright© 2000 - 2021 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 re extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,U,t)}}e.SummaryMeshJobsService=re;
  145. /* Copyright© 2000 - 2021 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 se extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,F,t)}}e.SummaryRegionJobsService=se;
  149. /* Copyright© 2000 - 2021 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. class ie{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=N.CLIP,this.output=null,this.mappingParameters=null,n.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof b&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof M&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}e.VectorClipJobsParameter=ie;
  153. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  154. * This program are made available under the terms of the Apache License, Version 2.0
  155. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  156. class ne extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,ie,t)}}e.VectorClipJobsService=ne;
  157. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  158. * This program are made available under the terms of the Apache License, Version 2.0
  159. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  160. class oe extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/overlay"),this.CLASS_NAME="SuperMap.OverlayGeoJobsService"}destroy(){super.destroy()}getOverlayGeoJobs(){super.getJobs(this.url)}getOverlayGeoJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addOverlayGeoJob(e,t){super.addJob(this.url,e,H,t)}}e.OverlayGeoJobsService=oe;
  161. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  162. * This program are made available under the terms of the Apache License, Version 2.0
  163. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  164. class ae extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,J,t)}}e.BuffersAnalystJobsService=ae;
  165. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  166. * This program are made available under the terms of the Apache License, Version 2.0
  167. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  168. class le extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,B,t)}}e.TopologyValidatorJobsService=le;
  169. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  170. * This program are made available under the terms of the Apache License, Version 2.0
  171. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  172. class ue extends ${constructor(e,t){super(e,t),this.url=n.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(n.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,D,t)}}e.SummaryAttributesJobsService=ue;k.REST.ProcessingService=
  173. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  174. * This program are made available under the terms of the Apache License, Version 2.0
  175. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  176. class extends z{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 r=this,s=r._processFormat(t);new ee(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getKernelDensityJobs()}getKernelDensityJob(e,t,r){var s=this,i=s._processFormat(r);new ee(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getKernelDensityJob(e)}addKernelDensityJob(e,t,r,s){var i=this,n=i._processFormat(s);new ee(i.url,{headers:i.headers,proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning(e){i.kernelDensityJobs[e.id]=e.state}},format:n}).addKernelDensityJob(e,r)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var r=this,s=r._processFormat(t);new re(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,r){var s=this,i=s._processFormat(r);new re(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,r,s){var i=this,n=i._processFormat(s);new re(i.url,{headers:i.headers,proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning(e){i.summaryMeshJobs[e.id]=e.state}},format:n}).addSummaryMeshJob(e,r)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var r=this,s=r._processFormat(t);new te(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getQueryJobs()}getQueryJob(e,t,r){var s=this,i=s._processFormat(r);new te(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getQueryJob(e)}addQueryJob(e,t,r,s){var i=this,n=i._processParams(e),o=i._processFormat(s);new te(i.url,{headers:i.headers,proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning(e){i.queryJobs[e.id]=e.state}},format:o}).addQueryJob(n,r)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var r=this,s=r._processFormat(t);new se(r.url,{proxy:r.proxy,headers:r.headers,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,r){var s=this,i=s._processFormat(r);new se(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,r,s){var i=this,n=i._processFormat(s);new se(i.url,{proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,headers:i.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning(e){i.summaryRegionJobs[e.id]=e.state}},format:n}).addSummaryRegionJob(e,r)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var r=this,s=r._processFormat(t);new ne(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getVectorClipJobs()}getVectorClipJob(e,t,r){var s=this,i=s._processFormat(r);new ne(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getVectorClipJob(e)}addVectorClipJob(e,t,r,s){var i=this,n=i._processParams(e),o=i._processFormat(s);new ne(i.url,{proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,headers:i.headers,serverType:i.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning(e){i.vectorClipJobs[e.id]=e.state}},format:o}).addVectorClipJob(n,r)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var r=this,s=r._processFormat(t);new oe(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,r){var s=this,i=s._processFormat(r);new oe(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,r,s){var i=this,n=i._processFormat(s);new oe(i.url,{proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,headers:i.headers,serverType:i.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.overlayGeoJobs[e.id]=e.state}},format:n}).addOverlayGeoJob(e,r)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var r=this,s=r._processFormat(t);new ae(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getBuffersJobs()}getBuffersJob(e,t,r){var s=this,i=s._processFormat(r);new ae(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getBuffersJob(e)}addBuffersJob(e,t,r,s){var i=this,n=i._processFormat(s);new ae(i.url,{proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,headers:i.headers,serverType:i.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.buffersJobs[e.id]=e.state}},format:n}).addBuffersJob(e,r)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var r=this,s=r._processFormat(t);new le(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,r){var s=this,i=s._processFormat(r);new le(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,r,s){var i=this,n=i._processFormat(s);new le(i.url,{proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,headers:i.headers,serverType:i.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.topologyValidatorJobs[e.id]=e.state}},format:n}).addTopologyValidatorJob(e,r)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var r=this,s=r._processFormat(t);new ue(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,serverType:r.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,r){var s=this,i=s._processFormat(r);new ue(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,serverType:s.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,r,s){var i=this,n=i._processFormat(s);new ue(i.url,{proxy:i.proxy,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,headers:i.headers,serverType:i.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryAttributesJobs[e.id]=e.state}},format:n}).addSummaryAttributesJob(e,r)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||f.GEOJSON}_processParams(e){return e?(e.geometryQuery&&(e.geometryQuery=this._convertPatams(e.geometryQuery)),e.geometryClip&&(e.geometryClip=this._convertPatams(e.geometryClip)),e):{}}_convertPatams(e){var t={};if(e.length<1)t="";else{for(var r=[],s=0;s<e.length;s++){var i={};i.x=e[s].x,i.y=e[s].y,r.push(i)}t.type="REGION",t.points=r}return t}}})()})();