/*! * * iclient-classic.(https://iclient.supermap.io) * Copyright© 2000 - 2021 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v10.1.1 * */!function(){var e={122:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){a.prototype.append=function(e,t){e=i(e),t=s(t);var n=this.map[e];n||(n=[],this.map[e]=n),n.push(t)},a.prototype.delete=function(e){delete this.map[i(e)]},a.prototype.get=function(e){var t=this.map[i(e)];return t?t[0]:null},a.prototype.getAll=function(e){return this.map[i(e)]||[]},a.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},a.prototype.set=function(e,t){this.map[i(e)]=[s(t)]},a.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)};var n={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this)},f.call(p.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var o=[301,302,303,307,308];y.redirect=function(e,t){if(-1===o.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.Headers=a,t.Request=p,t.Response=y,t.fetch=function(e,t){return new Promise(function(r,o){var i;i=p.prototype.isPrototypeOf(e)&&!t?e:new p(e,t);var s=new XMLHttpRequest;var u=!1;function l(){if(4===s.readyState){var e=1223===s.status?204:s.status;if(e<100||e>599){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)},683:function(e,t){var n,r,o;r=[t,e],void 0===(o="function"==typeof(n=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)}})}})?n.apply(t,r):n)||(e.exports=o)},347:function(e,t,n){var r,o,i;function s(e){"@babel/helpers - typeof";return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=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 r(e){return Boolean(e&&void 0!==e.length)}function o(){}function i(e){if(!(this instanceof i))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=[],f(e,this)}function a(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,i._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 l(t.promise,e)}u(t.promise,r)}else(1===e._state?u:l)(t.promise,e._value)})):e._deferreds.push(t)}function u(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===s(t)||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void f((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,c(e)}catch(t){l(e,t)}var r,o}function l(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t0&&(n=parseFloat(e.toPrecision(t))),n},format:function(t,n,r,o){n=void 0!==n?n:0,r=void 0!==r?r:e.Number.thousandsSeparator,o=void 0!==o?o:e.Number.decimalSeparator,null!=n&&(t=parseFloat(t.toFixed(n)));var i=t.toString().split(".");1===i.length&&null==n&&(n=0);var s,a=i[0];if(r)for(var u=/(-?[0-9]+)([0-9]{3})/;u.test(a);)a=a.replace(u,"$1"+r+"$2");if(0==n)s=a;else{var l=i.length>1?i[1]:"0";null!=n&&(l+=new Array(n-l.length+1).join("0")),s=a+o+l}return s}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return o.limitSigDigs(this,e)});var i=e.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(){}};e.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},e.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="")},e.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},e.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("&")},e.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},e.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]):"")},e.Util.DEFAULT_PRECISION=14,e.Util.toFloat=function(t,n){return null==n&&(n=e.Util.DEFAULT_PRECISION),"number"!=typeof t&&(t=parseFloat(t)),0===n?t:parseFloat(t.toPrecision(n))},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 n="";if(e.String.contains(t,"?")){var r=t.indexOf("?")+1,o=e.String.contains(t,"#")?t.indexOf("#"):t.length;n=t.substring(r,o)}for(var i={},s=n.split(/[&;]/),a=0,u=s.length;a1?1/e:e},e.Util.getResolutionFromScale=function(t,n){var r;t&&(null==n&&(n="degrees"),r=1/(e.Util.normalizeScale(t)*e.INCHES_PER_UNIT[n]*e.DOTS_PER_INCH));return r},e.Util.getScaleFromResolution=function(t,n){return null==n&&(n="degrees"),t*e.INCHES_PER_UNIT[n]*e.DOTS_PER_INCH},e.IS_GECKO=-1===(a=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==a.indexOf("gecko"),e.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}}(),e.Util.getBrowser=function(){return e.Browser},e.Util.isSupportCanvas=(u=!0,l=e.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===l.name&&parseFloat(l.version)<5&&(u=!1),"safari"===l.name&&parseFloat(l.version)<4&&(u=!1),"opera"===l.name&&parseFloat(l.version)<10&&(u=!1),"msie"===l.name&&parseFloat(l.version)<9&&(u=!1)):u=!1,u),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("//"),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},e.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}},e.Util.toJSON=function(t){var n=t;if(null==n)return null;switch(n.constructor){case String:return n=(n=(n=(n=(n=(n=(n='"'+n.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r=[],o=0,i=n.length;o0?"{"+c.join(",")+"}":"{}"}return n.toString()}},e.Util.getResolutionFromScaleDpi=function(t,n,r,o){return o=o||6378137,r=r||"",t>0&&n>0?(t=e.Util.normalizeScale(t),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/n/t/(2*Math.PI*o/360)/1e4:254/n/t/1e4):-1},e.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},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 n in t){var r=t[n];void 0!==r&&"CLASS_NAME"!==n&&"function"!=typeof r&&(e[n]=r)}return e},e.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 e.Geometry.Point(t.x+i*(n.x-t.x),t.y+i*(n.y-t.y)):"No Intersection";else if(0==u&&0==l){var f=Math.max(t.y,n.y),p=Math.min(t.y,n.y),h=Math.max(t.x,n.x),y=Math.min(t.x,n.x);a=(r.y>=p&&r.y<=f||o.y>=p&&o.y<=f)&&r.x>=y&&r.x<=h||o.x>=y&&o.x<=h?"Coincident":"Parallel"}else a="Parallel";return a},e.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 - 2021 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 f=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,n){for(var r=e.Event.element(t);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=n.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,n,r){var o=c.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=c.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(t){var n=c.getElement(t)._eventCacheID;this._removeElementObservers(e.Event.observers[n])},_removeElementObservers:function(t){if(t)for(var n=t.length-1;n>=0;n--){var r=t[n],o=new Array(r.element,r.name,r.observer,r.useCapture);e.Event.stopObserving.apply(this,o)}},stopObserving:function(t,n,r,o){o=o||!1;var i=c.getElement(t),s=i._eventCacheID;"keypress"===n&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.detachEvent)&&(n="keydown");var a=!1,u=e.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}}])&&E(t.prototype,n),r&&E(t,r),e}();e.ElasticSearch=m;n(347),n(122);var g=n(683),b=n.n(g),S=window.fetch,T=(e.setCORS=function(t){e.CORS=t},e.isCORS=function(){return void 0!=e.CORS?e.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest}),O=(e.setRequestTimeout=function(t){return e.RequestTimeout=t},e.getRequestTimeout=function(){return e.RequestTimeout||45e3}),R=e.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!!c.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:T()||t.proxy)},get:function(t,n,r){r=r||{};if(t=c.urlAppend(t,this._getParameterString(n||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){var o={url:t=t.replace(".json",".jsonp"),data:n};return e.Util.RequestJSONPPromise.GET(o)}return this.urlIsLong(t)?this._postSimulatie("GET",t.substring(0,t.indexOf("?")-1),n,r):this._fetch(t,n,r,"GET")},delete:function(t,n,r){r=r||{};if(t=c.urlAppend(t,this._getParameterString(n||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=DELETE",data:n};return e.Util.RequestJSONPPromise.DELETE(o)}return this.urlIsLong(t)?this._postSimulatie("DELETE",t.substring(0,t.indexOf("?")-1),n,r):this._fetch(t,n,r,"DELETE")},post:function(t,n,r){if(r=r||{},!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=POST",data:n};return e.Util.RequestJSONPPromise.POST(o)}return this._fetch(this._processUrl(t,r),n,r,"POST")},put:function(t,n,r){if(r=r||{},t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=PUT",data:n};return e.Util.RequestJSONPPromise.PUT(o)}return this._fetch(t,n,r,"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,S(e,{method:r,headers:n.headers,body:"PUT"===r||"POST"===r?t:void 0,credentials:this._getWithCredentials(n),mode:"cors",timeout:O()}).then(function(e){return e})):S(e,{method:r,body:"PUT"===r||"POST"===r?t:void 0,headers:n.headers,credentials:this._getWithCredentials(n),mode:"cors",timeout:O()}).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||{},b()(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 _(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)),b()(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 - 2021 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 I=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 R.post(n.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}},{key:"registerServers",value:function(e){this.servers=this.servers||{},c.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}}])&&V(t.prototype,n),r&&V(t,r),e}();function Y(e,t){for(var n=0;n-1){var e=this.dataSet.get();e=this.dataSet.transferCoordinate(e,function(e){var t=pe.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,Ie(Ae(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){Ie(Ae(i.prototype),"setMap",this).call(this,e),this.renderer=new Oe(e,this,this.dataSet,this.options),this.supported?this.redraw():this.map.removeLayer(this)}},{key:"moveTo",value:function(e,t,n){if(Ie(Ae(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 pe.LonLat(e.lon,e.lat).transform("EPSG:4326",t)}}])&&_e(t.prototype,n),r&&_e(t,r),i}();function Me(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=Ue(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=c.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=c.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}},{key:"serviceProcessFailed",value:function(e){var t=(e=c.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=c.urlAppend(e.url,c.getParameterString(e.params||{}))),e.params=e.data),R.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 Be).read(t)),(!n||n.error||n.code>=300&&304!==n.code)&&(n=n&&n.error?{error:n.error}:{error:n}),n.error)?(e.scope?i.bind(e.failure,e.scope):e.failure)(n):(n.succeed=void 0==n.succeed||n.succeed,(e.scope?i.bind(e.success,e.scope):e.success)(n))}).catch(function(t){(e.scope?i.bind(e.failure,e.scope):e.failure)(t)})}}])&&Ge(t.prototype,n),r&&Ge(t,r),e}();function Ke(e){"@babel/helpers - typeof";return(Ke="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 Ye(e,t){for(var n=0;n