/*! * * iclient-classic.(https://iclient.supermap.io) * Copyright© 2000 - 2020 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v10.1.0 * */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t){e.exports=function(){try{return mapv}catch(e){return{}}}()},function(e,t){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){var r,o,i;o=[t,e],void 0===(i="function"==typeof(r=function(e,t){"use strict";var n={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(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],i=e,s=t.timeout||n.timeout,a=t.jsonpCallback||n.jsonpCallback,u=void 0;return new Promise(function(n,l){var c=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),f=a+"_"+c;window[c]=function(e){n({ok:!0,json:function(){return Promise.resolve(e)}}),u&&clearTimeout(u),o(f),r(c)},i+=-1===i.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+i+a+"="+c),t.charset&&p.setAttribute("charset",t.charset),p.id=f,document.getElementsByTagName("head")[0].appendChild(p),u=setTimeout(function(){l(new Error("JSONP request to "+e+" timed out")),r(c),o(f),window[c]=function(){r(c)}},s),p.onerror=function(){l(new Error("JSONP request to "+e+" failed")),r(c),o(f),u&&clearTimeout(u)}})}})?r.apply(t,o):r)||(e.exports=i)},function(e,t){e.exports=function(){try{return elasticsearch}catch(e){return{}}}()},function(e,t,n){(function(r,o){var i,s,a;function u(e){"@babel/helpers - typeof";return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a=function(){"use strict";function e(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}var t=setTimeout;function n(e){return Boolean(e&&void 0!==e.length)}function i(){}function s(e){if(!(this instanceof s))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=[],p(e,this)}function a(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,s._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void c(t.promise,e)}l(t.promise,r)}else(1===e._state?l:c)(t.promise,e._value)})):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===u(t)||"function"==typeof t)){var n=t.then;if(t instanceof s)return e._state=3,e._value=t,void f(e);if("function"==typeof n)return void p((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,f(e)}catch(t){c(e,t)}var r,o}function c(e,t){e._state=2,e._value=t,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&s._immediateFn(function(){e._handled||s._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(6),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,s,a,u=1,l={},c=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){y(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){y(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){y(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(y,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&y(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n599){if(u)return;return u=!0,void o(new TypeError("Network request failed"))}var t={status:e,statusText:s.statusText,headers:function(e){var t=new a;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();t.append(r,o)}),t}(s),url:"responseURL"in s?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):void 0},n="response"in s?s.response:s.responseText;u||(u=!0,r(new y(n,t)))}}s.onreadystatechange=l,s.onload=l,s.onerror=function(){u||(u=!0,o(new TypeError("Network request failed")))},s.open(i.method,i.url,!0);try{"include"===i.credentials&&("withCredentials"in s?s.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 s&&n.blob&&(s.responseType="blob"),i.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),s.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function i(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 s(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 u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function c(e){var t=new FileReader;return t.readAsArrayBuffer(e),l(t)}function f(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(n.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(n.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!n.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},n.blob?(this.blob=function(){var e=u(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(c)},this.text=function(){var e,t,n,r,o,i,s,a=u(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,n=new FileReader,r=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",o=/charset\=[0-9a-zA-Z\-\_]*;?/,i=e.type.match(o)||r.match(o),s=[e],i&&s.push(i[0].replace(/^charset\=/,"").replace(/;$/,"")),n.readAsText.apply(n,s),l(n);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=u(this);return e||Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e,t){var n,o,i=(t=t||{}).body;if(p.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,i||(i=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=(n=t.method||this.method||"GET",o=n.toUpperCase(),r.indexOf(o)>-1?o:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i,t)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(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)},function(e,t,n){"use strict";n.r(t),n.d(t,"ElasticSearch",function(){return b}),n.d(t,"SecurityManager",function(){return P}),n.d(t,"KernelDensityJobParameter",function(){return Q}),n.d(t,"SingleObjectQueryJobsParameter",function(){return z}),n.d(t,"SummaryAttributesJobsParameter",function(){return $}),n.d(t,"SummaryMeshJobParameter",function(){return te}),n.d(t,"SummaryRegionJobParameter",function(){return re}),n.d(t,"OverlayGeoJobParameter",function(){return ie}),n.d(t,"BuffersAnalystJobsParameter",function(){return ae}),n.d(t,"TopologyValidatorJobsParameter",function(){return le}),n.d(t,"OutputSetting",function(){return K}),n.d(t,"MappingParameters",function(){return W}),n.d(t,"GeoCodingParameter",function(){return fe}),n.d(t,"GeoDecodingParameter",function(){return he}),n.d(t,"MapVLayer",function(){return ke}),n.d(t,"MapVRenderer",function(){return _e}),n.d(t,"AddressMatchService",function(){return it}),n.d(t,"ProcessingService",function(){return Cn}),n.d(t,"SuperMap",function(){return ye}); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var r=window.SuperMap=window.SuperMap||{};function o(e,t){for(var n=0;n0&&(n=parseFloat(e.toPrecision(t))),n},format:function(e,t,n,o){t=void 0!==t?t:0,n=void 0!==n?n:r.Number.thousandsSeparator,o=void 0!==o?o:r.Number.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var i=e.toString().split(".");1===i.length&&null==t&&(t=0);var s,a=i[0];if(n)for(var u=/(-?[0-9]+)([0-9]{3})/;u.test(a);)a=a.replace(u,"$1"+n+"$2");if(0==t)s=a;else{var l=i.length>1?i[1]:"0";null!=t&&(l+=new Array(t-l.length+1).join("0")),s=a+o+l}return s}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return s.limitSigDigs(this,e)});var a=r.Function={bind:function(e,t){var n=Array.prototype.slice.apply(arguments,[2]);return function(){var r=n.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,r)}},bindAsEventListener:function(e,t){return function(n){return e.call(t,n||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}};r.Array={filter:function(e,t,n){var r=[];if(Array.prototype.filter)r=e.filter(t,n);else{var o=e.length;if("function"!=typeof t)throw new TypeError;for(var i=0;i=0;n--)e[n]===t&&e.splice(n,1);return e},r.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n=0&&parseFloat(a)<1?(e.style.filter="alpha(opacity="+100*a+")",e.style.opacity=a):1===parseFloat(a)&&(e.style.filter="",e.style.opacity="")},r.Util.applyDefaults=function(e,t){e=e||{};var n="function"==typeof window.Event&&t instanceof window.Event;for(var r in t)(void 0===e[r]||!n&&t.hasOwnProperty&&t.hasOwnProperty(r)&&!e.hasOwnProperty(r))&&(e[r]=t[r]);return!n&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},r.Util.getParameterString=function(e){var t=[];for(var n in e){var r,o=e[n];if(null!=o&&"function"!=typeof o)r=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(n)+"="+r)}return t.join("&")},r.Util.urlAppend=function(e,t){var n=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var r=(e+" ").split(/[?&]/);n+=" "===r.pop()?t:r.length?"&"+t:"?"+t}return n},r.Util.urlPathAppend=function(e,t){var n=e;if(!t)return n;0===t.indexOf("/")&&(t=t.substring(1));var r=e.split("?");return r[0].indexOf("/",r[0].length-1)<0&&(r[0]+="/"),n="".concat(r[0]).concat(t).concat(r.length>1?"?".concat(r[1]):"")},r.Util.DEFAULT_PRECISION=14,r.Util.toFloat=function(e,t){return null==t&&(t=r.Util.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},r.Util.rad=function(e){return e*Math.PI/180},r.Util.getParameters=function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(r.String.contains(e,"?")){var n=e.indexOf("?")+1,o=r.String.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(n,o)}for(var i={},s=t.split(/[&;]/),a=0,u=s.length;a1?1/e:e},r.Util.getResolutionFromScale=function(e,t){var n;e&&(null==t&&(t="degrees"),n=1/(r.Util.normalizeScale(e)*r.INCHES_PER_UNIT[t]*r.DOTS_PER_INCH));return n},r.Util.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*r.INCHES_PER_UNIT[t]*r.DOTS_PER_INCH},r.IS_GECKO=-1===(l=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==l.indexOf("gecko"),r.Browser=function(){var e,t="",n="",r="pc",o=navigator.userAgent.toLowerCase();return o.indexOf("msie")>-1||o.indexOf("trident")>-1&&o.indexOf("rv")>-1?(t="msie",e=o.match(/msie ([\d.]+)/)||o.match(/rv:([\d.]+)/)):o.indexOf("chrome")>-1?(t="chrome",e=o.match(/chrome\/([\d.]+)/)):o.indexOf("firefox")>-1?(t="firefox",e=o.match(/firefox\/([\d.]+)/)):o.indexOf("opera")>-1?(t="opera",e=o.match(/version\/([\d.]+)/)):o.indexOf("safari")>-1&&(t="safari",e=o.match(/version\/([\d.]+)/)),n=e?e[1]:"",o.indexOf("ipad")>-1||o.indexOf("ipod")>-1||o.indexOf("iphone")>-1?r="apple":o.indexOf("android")>-1&&(n=(e=o.match(/version\/([\d.]+)/))?e[1]:"",r="android"),{name:t,version:n,device:r}}(),r.Util.getBrowser=function(){return r.Browser},r.Util.isSupportCanvas=(c=!0,f=r.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===f.name&&parseFloat(f.version)<5&&(c=!1),"safari"===f.name&&parseFloat(f.version)<4&&(c=!1),"opera"===f.name&&parseFloat(f.version)<10&&(c=!1),"msie"===f.name&&parseFloat(f.version)<9&&(c=!1)):c=!1,c),r.Util.supportCanvas=function(){return r.Util.isSupportCanvas},r.INCHES_PER_UNIT.degree=r.INCHES_PER_UNIT.dd,r.INCHES_PER_UNIT.meter=r.INCHES_PER_UNIT.m,r.INCHES_PER_UNIT.foot=r.INCHES_PER_UNIT.ft,r.INCHES_PER_UNIT.inch=r.INCHES_PER_UNIT.inches,r.INCHES_PER_UNIT.mile=r.INCHES_PER_UNIT.mi,r.INCHES_PER_UNIT.kilometer=r.INCHES_PER_UNIT.km,r.INCHES_PER_UNIT.yard=r.INCHES_PER_UNIT.yd,r.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),n=document.location.toString(),r=n.indexOf("//");if(-1===t)return!0;var o,i=o=e.substring(0,t),s=n.substring(r+2);r=s.indexOf("/");var a=s.indexOf(":"),u=s.substring(0,r),l=document.location.protocol;if(-1!==a||(u+=":"+("http:"===l.toLowerCase()?80:443)),l.toLowerCase()!==i.toLowerCase())return!1;var c=(i=e.substring(t+2)).indexOf(":");t=i.indexOf("/");var f,p=i.substring(0,t);return-1!==c?f=i.substring(0,c):(f=i.substring(0,t),p+=":"+("http:"===o.toLowerCase()?80:443)),f===document.domain&&p===u},r.Util.calculateDpi=function(e,t,n,r,o){if(e&&t&&n){var i,s=e.getWidth(),a=e.getHeight(),u=t.w,l=t.h;if(o=o||6378137,"degree"===(r=r||"degrees").toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()){var c=s/u,f=a/l;i=254/(c>f?c:f)/n/(2*Math.PI*o/360)/1e4}else{i=254/(s/u)/n/1e4}return i}},r.Util.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var n=[],o=0,i=t.length;o0?"{"+c.join(",")+"}":"{}"}return t.toString()}},r.Util.getResolutionFromScaleDpi=function(e,t,n,o){return o=o||6378137,n=n||"",e>0&&t>0?(e=r.Util.normalizeScale(e),"degree"===n.toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()?254/t/e/(2*Math.PI*o/360)/1e4:254/t/e/1e4):-1},r.Util.getScaleFromResolutionDpi=function(e,t,n,r){return r=r||6378137,n=n||"",e>0&&t>0?"degree"===n.toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4:-1},r.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},r.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var n in t){var r=t[n];void 0!==r&&"CLASS_NAME"!==n&&"function"!=typeof r&&(e[n]=r)}return e},r.Util.copyAttributesWithClip=function(e,t,n){if(e=e||{},t)for(var r in t){var o=!1;if(n&&n.length)for(var i=0,s=n.length;i=0&&s<=1&&i<=1&&s>=0?new r.Geometry.Point(e.x+i*(t.x-e.x),e.y+i*(t.y-e.y)):"No Intersection";else if(0==u&&0==l){var f=Math.max(e.y,t.y),p=Math.min(e.y,t.y),h=Math.max(e.x,t.x),y=Math.min(e.x,t.x);a=(n.y>=p&&n.y<=f||o.y>=p&&o.y<=f)&&n.x>=y&&n.x<=h||o.x>=y&&o.x<=h?"Coincident":"Parallel"}else a="Parallel";return a},r.Util.getTextBounds=function(e,t,n){document.body.appendChild(n),n.style.width="auto",n.style.height="auto",e.fontSize&&(n.style.fontSize=e.fontSize),e.fontFamily&&(n.style.fontFamily=e.fontFamily),e.fontWeight&&(n.style.fontWeight=e.fontWeight),n.style.position="relative",n.style.visibility="hidden",n.style.display="inline-block",n.innerHTML=t;var r=n.clientWidth,o=n.clientHeight;return document.body.removeChild(n),{textWidth:r,textHeight:o}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var h=r.Event={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var n=r.Event.element(e);n.parentNode&&(!n.tagName||n.tagName.toUpperCase()!=t.toUpperCase());)n=n.parentNode;return n},observe:function(e,t,n,r){var o=p.getElement(e);if(r=r||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!o._eventCacheID){var i="eventCacheID_";o.id&&(i=o.id+"_"+i),o._eventCacheID=p.createUniqueID(i)}var s=o._eventCacheID;this.observers[s]||(this.observers[s]=[]),this.observers[s].push({element:o,name:t,observer:n,useCapture:r}),o.addEventListener?"mousewheel"===t?o.addEventListener(t,n,{useCapture:r,passive:!1}):o.addEventListener(t,n,r):o.attachEvent&&o.attachEvent("on"+t,n)},stopObservingElement:function(e){var t=p.getElement(e)._eventCacheID;this._removeElementObservers(r.Event.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var n=e[t],o=new Array(n.element,n.name,n.observer,n.useCapture);r.Event.stopObserving.apply(this,o)}},stopObserving:function(e,t,n,o){o=o||!1;var i=p.getElement(e),s=i._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.detachEvent)&&(t="keydown");var a=!1,u=r.Event.observers[s];if(u)for(var l=0;!a&&lt.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),n})}},{key:"_distance",value:function(e,t,n,r){return Math.sqrt((e-n)*(e-n)+(t-r)*(t-r))}},{key:"_getMeterPerMapUnit",value:function(e){var t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}])&&g(t.prototype,n),r&&g(t,r),e}();r.ElasticSearch=b;n(4),n(8);var S=n(2),T=n.n(S),O=window.fetch,R=(r.setCORS=function(e){r.CORS=e},r.isCORS=function(){return void 0!=r.CORS?r.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest}),_=(r.setRequestTimeout=function(e){return r.RequestTimeout=e},r.getRequestTimeout=function(){return r.RequestTimeout||45e3}),I=r.FetchRequest={commit:function(e,t,n,r){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,n,r);case"POST":return this.post(t,n,r);case"PUT":return this.put(t,n,r);case"DELETE":return this.delete(t,n,r);default:return this.get(t,n,r)}},supportDirectRequest:function(e,t){return!!p.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:R()||t.proxy)},get:function(e,t,n){n=n||{};if(e=p.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,n),!this.supportDirectRequest(e,n)){var o={url:e=e.replace(".json",".jsonp"),data:t};return r.Util.RequestJSONPPromise.GET(o)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,n):this._fetch(e,t,n,"GET")},delete:function(e,t,n){n=n||{};if(e=p.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,n),!this.supportDirectRequest(e,n)){e=e.replace(".json",".jsonp");var o={url:e+="&_method=DELETE",data:t};return r.Util.RequestJSONPPromise.DELETE(o)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")-1),t,n):this._fetch(e,t,n,"DELETE")},post:function(e,t,n){if(n=n||{},!this.supportDirectRequest(e,n)){e=e.replace(".json",".jsonp");var o={url:e+="&_method=POST",data:t};return r.Util.RequestJSONPPromise.POST(o)}return this._fetch(this._processUrl(e,n),t,n,"POST")},put:function(e,t,n){if(n=n||{},e=this._processUrl(e,n),!this.supportDirectRequest(e,n)){e=e.replace(".json",".jsonp");var o={url:e+="&_method=PUT",data:t};return r.Util.RequestJSONPPromise.PUT(o)}return this._fetch(e,t,n,"PUT")},urlIsLong:function(e){for(var t=0,n=null,r=0,o=e.length;r-1?"&":"?")+"_method="+e,"string"!=typeof n&&(n=JSON.stringify(n)),this.post(t,n,r)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var n=e.split("?");2===n.length&&(e=n[0]+".json?"+n[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,n,r){return(n=n||{}).headers=n.headers||{},n.headers["Content-Type"]||(n.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),n.timeout?this._timeout(n.timeout,O(e,{method:r,headers:n.headers,body:"PUT"===r||"POST"===r?t:void 0,credentials:this._getWithCredentials(n),mode:"cors",timeout:_()}).then(function(e){return e})):O(e,{method:r,body:"PUT"===r||"POST"===r?t:void 0,headers:n.headers,credentials:this._getWithCredentials(n),mode:"cors",timeout:_()}).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||{},T()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(n,r){setTimeout(function(){r(new Error("timeout"))},e),t.then(n,r)})},_getParameterString:function(e){var t=[];for(var n in e){var r,o=e[n];if(null!=o&&"function"!=typeof o)r=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(n)+"="+r)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};function N(e,t){for(var n=0;n=t.limitLength){if(0==a)return!1;o.push(s),s=r,a=0,l--}else if(s.length+t.queryKeys[l].length+2+t.queryValues[l].length>t.limitLength)for(var c=t.queryValues[l];c.length>0;){var f=t.limitLength-s.length-t.queryKeys[l].length-2;s.indexOf("?")>-1?s+="&":s+="?";var p=c.substring(0,f);"%"===p.substring(f-1,f)?(f-=1,p=c.substring(0,f)):"%"===p.substring(f-2,f-1)&&(f-=2,p=c.substring(0,f)),s+=t.queryKeys[l]+"="+p,c=c.substring(f),p.length>0&&(o.push(s),s=r,a=0)}else a++,s.indexOf("?")>-1?s+="&":s+="?",s+=t.queryKeys[l]+"="+t.queryValues[l];return o.push(s),t.send(o,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+n+"]",e&&e.proxy),i},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,n){var r=e.length;if(r>0)for(var o=(new Date).getTime(),i=0;i-1?s+="&":s+="?",s+="sectionCount="+r,s+="§ionIndex="+i,s+="&jsonpUserID="+o,n&&(s=decodeURIComponent(s),s=n+encodeURIComponent(s)),T()(s,{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)}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var P=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"generateToken",value:function(e,t){var n=this.servers[e];if(n)return I.post(n.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}},{key:"registerServers",value:function(e){this.servers=this.servers||{},p.isArray(e)||(e=[e]);for(var t=0;t0)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}}])&&Y(t.prototype,n),r&&Y(t,r),e}();function q(e,t){for(var n=0;n-1){var e=this.dataSet.get();e=this.dataSet.transferCoordinate(e,function(e){var t=ye.Projection.transform({x:e[0],y:e[1]},"EPSG:3857","EPSG:4326");return[t.x,t.y]},"coordinates","coordinates"),this.dataSet._set(e)}}},{key:"_canvasUpdate",value:function(e){if(this.canvasLayer){var t=this.options.animation,n=this.getContext(),r=this.map;if(this.isEnabledTime()){if(void 0===e)return void this.clear(n);"2d"===this.context&&(n.save(),n.globalCompositeOperation="destination-out",n.fillStyle="rgba(0, 0, 0, .1)",n.fillRect(0,0,n.canvas.width,n.canvas.height),n.restore())}else this.clear(n);if("2d"===this.context)for(var o in this.options)n[o]=this.options[o];else n.clear(n.COLOR_BUFFER_BIT);if(!(this.options.minZoom&&r.getZoom()this.options.maxZoom)){var i=this.canvasLayer,s={fromColumn:"coordinates",transferCoordinate:function(e){var t={lon:e[0],lat:e[1]},n=r.getViewPortPxFromLonLat(t);return[n.x,n.y]}};void 0!==e&&(s.filter=function(n){var r=t.trails||10;return e&&n.time>e-r&&n.timeMapV with © SuperMap iClient",n.CLASS_NAME="SuperMap.Layer.MapVLayer",n}return t=i,(n=[{key:"destroy",value:function(){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,Pe(Me(i.prototype),"destroy",this).call(this)}},{key:"addData",value:function(e,t){this.renderer&&this.renderer.addData(e,t)}},{key:"setData",value:function(e,t){this.renderer&&this.renderer.setData(e,t)}},{key:"getData",value:function(){return this.renderer&&(this.dataSet=this.renderer.getData()),this.dataSet}},{key:"removeData",value:function(e){this.renderer&&this.renderer.removeData(e)}},{key:"clearData",value:function(){this.renderer.clearData()}},{key:"setMap",value:function(e){Pe(Me(i.prototype),"setMap",this).call(this,e),this.renderer=new _e(e,this,this.dataSet,this.options),this.supported?this.redraw():this.map.removeLayer(this)}},{key:"moveTo",value:function(e,t,n){if(Pe(Me(i.prototype),"moveTo",this).call(this,e,t,n),this.supported){if(this.zoomChanged=t,!n){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 r=this.map.getSize();this.div.style.width=parseInt(r.w)+"px",this.div.style.height=parseInt(r.h)+"px",this.canvas.width=parseInt(r.w),this.canvas.height=parseInt(r.h),this.canvas.style.width=this.div.style.width,this.canvas.style.height=this.div.style.height,this.maxWidth=r.w,this.maxHeight=r.h,this.div.style.visibility="",t||this.renderer&&this.renderer.render()}t&&this.renderer&&this.renderer.render()}}},{key:"transferToMapLatLng",value:function(e){var t="EPSG:4326",n=this.map.getUnits()||"degree";return["m","meter"].indexOf(n.toLowerCase())>-1&&(t="EPSG:3857"),new ye.LonLat(e.lon,e.lat).transform("EPSG:4326",t)}}])&&Ne(t.prototype,n),r&&Ne(t,r),i}();function De(e,t){for(var n=0;n0&&n.push(","),n.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,n.push(this.writeNewline(),this.writeIndent(),"]"),n.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,n){var r=t[n];return r||(r=n.charCodeAt(),"\\u00"+Math.floor(r/16).toString(16)+(r%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}},t}return t=i,(n=[{key:"read",value:function(e,t){var n;if(this.nativeJSON)try{n=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=n),n}},{key:"write",value:function(e,t){this.pretty=!!t;var n=null,r=Fe(e);if(this.serialize[r])try{n=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[r].apply(this,[e])}catch(e){}return n}},{key:"writeIndent",value:function(){var e=[];if(this.pretty)for(var t=0;t0?(this.totalTimes--,this.ajaxPolling()):this._processFailed(e)}},{key:"ajaxPolling",value:function(){var e=this,t=e.options.url,n=/^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(n,n.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=p.isInTheSameDomain(t),e._commit(e.options)}},{key:"calculatePollingTimes",value:function(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.timese.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}},{key:"isServiceSupportPolling",value:function(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}},{key:"serviceProcessCompleted",value:function(e){e=p.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}},{key:"serviceProcessFailed",value:function(e){var t=(e=p.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}},{key:"_commit",value:function(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=p.urlAppend(e.url,p.getParameterString(e.params||{}))),e.params=e.data),I.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 n=t;("string"==typeof t&&(n=(new Ve).read(t)),(!n||n.error||n.code>=300&&304!==n.code)&&(n=n&&n.error?{error:n.error}:{error:n}),n.error)?(e.scope?a.bind(e.failure,e.scope):e.failure)(n):(n.succeed=void 0==n.succeed||n.succeed,(e.scope?a.bind(e.success,e.scope):e.success)(n))}).catch(function(t){(e.scope?a.bind(e.failure,e.scope):e.failure)(t)})}}])&&Ke(t.prototype,n),r&&Ke(t,r),e}();function We(e){"@babel/helpers - typeof";return(We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qe(e,t){for(var n=0;n