(()=>{var e={693:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){a.prototype.append=function(e,t){e=i(e),t=o(t);var s=this.map[e];s||(s=[],this.map[e]=s),s.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)]=[o(t)]},a.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(s){this.map[s].forEach(function(r){e.call(t,r,s,this)},this)},this)};var s={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},c.call(d.prototype),c.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var n=[301,302,303,307,308];m.redirect=function(e,t){if(-1===n.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.Headers=a,t.Request=d,t.Response=m,t.fetch=function(e,t){return new Promise(function(r,n){var i;i=d.prototype.isPrototypeOf(e)&&!t?e:new d(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 n(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 s=e.trim().split(":"),r=s.shift().trim(),n=s.join(":").trim();t.append(r,n)}),t}(o),url:"responseURL"in o?o.responseURL:/^X-Request-URL:/m.test(o.getAllResponseHeaders())?o.getResponseHeader("X-Request-URL"):void 0},s="response"in o?o.response:o.responseText;l||(l=!0,r(new m(s,t)))}}o.onreadystatechange=u,o.onload=u,o.onerror=function(){l||(l=!0,n(new TypeError("Network request failed")))},o.open(i.method,i.url,!0);try{"include"===i.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&&s.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.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 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,s){e.onload=function(){t(e.result)},e.onerror=function(){s(e.error)}})}function h(e){var t=new FileReader;return t.readAsArrayBuffer(e),u(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(s.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(s.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!s.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},s.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(h)},this.text=function(){var e,t,s,r,n,i,o,a=l(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,s=new FileReader,r=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",n=/charset\=[0-9a-zA-Z\-\_]*;?/,i=e.type.match(n)||r.match(n),o=[e],i&&o.push(i[0].replace(/^charset\=/,"").replace(/;$/,"")),s.readAsText.apply(s,o),u(s);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e,t){var s,n,i=(t=t||{}).body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new 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=(s=t.method||this.method||"GET",n=s.toUpperCase(),r.indexOf(n)>-1?n:s),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 p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var s=e.split("="),r=s.shift().replace(/\+/g," "),n=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(n))}}),t}function m(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof a?t.headers:new a(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},144:function(e,t){var s,r,n;r=[t,e],void 0===(n="function"==typeof(s=function(e,t){"use strict";var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function n(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,o=t.timeout||s.timeout,a=t.jsonpCallback||s.jsonpCallback,l=void 0;return new Promise(function(s,u){var h=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=a+"_"+h;window[h]=function(e){s({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),n(c),r(h)},i+=-1===i.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+i+a+"="+h),t.charset&&d.setAttribute("charset",t.charset),d.id=c,document.getElementsByTagName("head")[0].appendChild(d),l=setTimeout(function(){u(new Error("JSONP request to "+e+" timed out")),r(h),n(c),window[h]=function(){r(h)}},o),d.onerror=function(){u(new Error("JSONP request to "+e+" failed")),r(h),n(c),l&&clearTimeout(l)}})}})?s.apply(t,r):s)||(e.exports=n)},107:function(e,t,s){!function(){"use strict";function e(e){var t=this.constructor;return this.then(function(s){return t.resolve(e()).then(function(){return s})},function(s){return t.resolve(e()).then(function(){return t.reject(s)})})}function t(e){return new this(function(t,s){if(!e||void 0===e.length)return s(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var n=r.length;function i(e,s){if(s&&("object"==typeof s||"function"==typeof s)){var o=s.then;if("function"==typeof o)return void o.call(s,function(t){i(e,t)},function(s){r[e]={status:"rejected",reason:s},0==--n&&t(r)})}r[e]={status:"fulfilled",value:s},0==--n&&t(r)}for(var o=0;o{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}),s.d=((e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),(()=>{"use strict";class e{constructor(e,t,s){this.x=e?parseFloat(e):0,this.y=t?parseFloat(t):0,this.mode=s,this.CLASS_NAME="SuperMap.Pixel"}toString(){return"x="+this.x+",y="+this.y}clone(){return new e(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(t,s){if(null==t||null==s)throw new TypeError("Pixel.add cannot receive null values");return new e(this.x+t,this.y+s)}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.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"};var t={startsWith:function(e,t){return 0==e.indexOf(t)},contains:function(e,t){return-1!=e.indexOf(t)},trim:function(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(e){for(var t=e.split("-"),s=t[0],r=1,n=t.length;r0&&(s=parseFloat(e.toPrecision(t))),s},format:function(e,t,s,n){t=void 0!==t?t:0,s=void 0!==s?s:r.thousandsSeparator,n=void 0!==n?n:r.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var i=e.toString().split(".");1===i.length&&null==t&&(t=0);var o,a=i[0];if(s)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(a);)a=a.replace(l,"$1"+s+"$2");if(0==t)o=a;else{var u=i.length>1?i[1]:"0";null!=t&&(u+=new Array(t-u.length+1).join("0")),o=a+n+u}return o}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return r.limitSigDigs(this,e)});var n={bind:function(e,t){var s=Array.prototype.slice.apply(arguments,[2]);return function(){var r=s.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,r)}},bindAsEventListener:function(e,t){return function(s){return e.call(t,s||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}};class i{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=l.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new i}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}const o=function(){var e,t="",s="",r="pc",n=navigator.userAgent.toLowerCase();return n.indexOf("msie")>-1||n.indexOf("trident")>-1&&n.indexOf("rv")>-1?(t="msie",e=n.match(/msie ([\d.]+)/)||n.match(/rv:([\d.]+)/)):n.indexOf("chrome")>-1?(t="chrome",e=n.match(/chrome\/([\d.]+)/)):n.indexOf("firefox")>-1?(t="firefox",e=n.match(/firefox\/([\d.]+)/)):n.indexOf("opera")>-1?(t="opera",e=n.match(/version\/([\d.]+)/)):n.indexOf("safari")>-1&&(t="safari",e=n.match(/version\/([\d.]+)/)),s=e?e[1]:"",n.indexOf("ipad")>-1||n.indexOf("ipod")>-1||n.indexOf("iphone")>-1?r="apple":n.indexOf("android")>-1&&(s=(e=n.match(/version\/([\d.]+)/))?e[1]:"",r="android"),{name:t,version:s,device:r}}(),a=function(){var e=!0,t=o;return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e}(),l=(function(){var e=navigator.userAgent.toLowerCase();-1===e.indexOf("webkit")&&e.indexOf("gecko")}(),{assign(e){for(var t=0;t=0;s--)e[s]===t&&e.splice(s,1);return e},indexOf:function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s=0&&parseFloat(a)<1?(e.style.filter="alpha(opacity="+100*a+")",e.style.opacity=a):1===parseFloat(a)&&(e.style.filter="",e.style.opacity="")},applyDefaults:function(e,t){e=e||{};var s="function"==typeof window.Event&&t instanceof window.Event;for(var r in t)(void 0===e[r]||!s&&t.hasOwnProperty&&t.hasOwnProperty(r)&&!e.hasOwnProperty(r))&&(e[r]=t[r]);return!s&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},getParameterString:function(e){var t=[];for(var s in e){var r,n=e[s];if(null!=n&&"function"!=typeof n)r=Array.isArray(n)||"[object Object]"===n.toString()?encodeURIComponent(JSON.stringify(n)):encodeURIComponent(n),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},urlAppend:function(e,t){var s=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var r=(e+" ").split(/[?&]/);s+=" "===r.pop()?t:r.length?"&"+t:"?"+t}return s},urlPathAppend:function(e,t){let s=e;if(!t)return s;0===t.indexOf("/")&&(t=t.substring(1));const r=e.split("?");return r[0].indexOf("/",r[0].length-1)<0&&(r[0]+="/"),s=`${r[0]}${t}${r.length>1?`?${r[1]}`:""}`},DEFAULT_PRECISION:14,toFloat:function(e,t){return null==t&&(t=l.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},rad:function(e){return e*Math.PI/180},getParameters:function(e){e=null===e||void 0===e?window.location.href:e;var s="";if(t.contains(e,"?")){var r=e.indexOf("?")+1,n=t.contains(e,"#")?e.indexOf("#"):e.length;s=e.substring(r,n)}for(var i={},o=s.split(/[&;]/),a=0,l=o.length;a1?1/e:e},getResolutionFromScale:function(e,t){var s;e&&(null==t&&(t="degrees"),s=1/(l.normalizeScale(e)*u[t]*96));return s},getScaleFromResolution:function(e,t){return null==t&&(t="degrees"),e*u[t]*96},getBrowser:function(){return o},isSupportCanvas:a,supportCanvas:function(){return l.isSupportCanvas},isInTheSameDomain:function(e){if(!e)return!0;var t=e.indexOf("//"),s=document.location.toString(),r=s.indexOf("//");if(-1===t)return!0;var n,i=n=e.substring(0,t),o=s.substring(r+2);r=o.indexOf("/");var a=o.indexOf(":"),l=o.substring(0,r),u=document.location.protocol;if(-1!==a||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==i.toLowerCase())return!1;var h=(i=e.substring(t+2)).indexOf(":");t=i.indexOf("/");var c,d=i.substring(0,t);return-1!==h?c=i.substring(0,h):(c=i.substring(0,t),d+=":"+("http:"===n.toLowerCase()?80:443)),c===document.domain&&d===l},calculateDpi:function(e,t,s,r,n){if(e&&t&&s){var i,o=e.getWidth(),a=e.getHeight(),l=t.w,u=t.h;if(n=n||6378137,"degree"===(r=r||"degrees").toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()){let e=o/l,t=a/u;i=254/(e>t?e:t)/s/(2*Math.PI*n/360)/1e4}else{i=254/(o/l)/s/1e4}return i}},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 s="",r=0,n=t.length;r0?"{"+e.join(",")+"}":"{}"}return t.toString()}},getResolutionFromScaleDpi:function(e,t,s,r){return r=r||6378137,s=s||"",e>0&&t>0?(e=l.normalizeScale(e),"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4):-1},getScaleFromResolutionDpi:function(e,t,s,r){return r=r||6378137,s=s||"",e>0&&t>0?"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4:-1},transformResult:function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},copyAttributes:function(e,t){if(e=e||{},t)for(var s in t){var r=t[s];void 0!==r&&"CLASS_NAME"!==s&&"function"!=typeof r&&(e[s]=r)}return e},copyAttributesWithClip:function(e,t,s){if(e=e||{},t)for(var r in t){var n=!1;if(s&&s.length)for(var i=0,o=s.length;i=0&&o<=1&&n<=1&&o>=0?new i.Point(e.x+n*(t.x-e.x),e.y+n*(t.y-e.y)):"No Intersection";else if(0==l&&0==u){var c=Math.max(e.y,t.y),d=Math.min(e.y,t.y),p=Math.max(e.x,t.x),m=Math.min(e.x,t.x);a=(s.y>=d&&s.y<=c||r.y>=d&&r.y<=c)&&s.x>=m&&s.x<=p||r.x>=m&&r.x<=p?"Coincident":"Parallel"}else a="Parallel";return a},getTextBounds:function(e,t,s){document.body.appendChild(s),s.style.width="auto",s.style.height="auto",e.fontSize&&(s.style.fontSize=e.fontSize),e.fontFamily&&(s.style.fontFamily=e.fontFamily),e.fontWeight&&(s.style.fontWeight=e.fontWeight),s.style.position="relative",s.style.visibility="hidden",s.style.display="inline-block",s.innerHTML=t;var r=s.clientWidth,n=s.clientHeight;return document.body.removeChild(s),{textWidth:r,textHeight:n}},convertPath:function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,(e,s)=>{var r;return r=t.hasOwnProperty(s)?function(e){if(void 0==e||null==e)return"";if(e instanceof Date)return e.toJSON();if(function(e){if("string"!=typeof e&&"object"!=typeof e)return!1;try{const t=e.toString();return"[object Object]"===t||"[object Array]"===t}catch(e){return!1}}(e))return JSON.stringify(e);return e.toString()}(t[s]):e,encodeURIComponent(r)}):e}}),u={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};u.in=u.inches,u.degrees=u.dd,u.nmi=1852*u.m;l.extend(u,{Inch:u.inches,Meter:39.37,Foot:12,IFoot:11.999976,ClarkeFoot:11.999868327581488,SearsFoot:11.999955194477684,GoldCoastFoot:11.999964589846002,IInch:.9999979999999999,MicroInch:999998e-9,Mil:9.99998e-7,Centimeter:.3937,Kilometer:39370,Yard:36,SearsYard:35.99986558343306,IndianYard:35.99987015540864,IndianYd37:35.999740205100004,IndianYd62:35.999880755999996,IndianYd75:35.999868945,IndianFoot:11.9999567087,IndianFt37:11.9999134017,IndianFt62:11.999960252000001,IndianFt75:11.999956315,Mile:63360,IYard:35.999928,IMile:63359.87328,NautM:72913.24,"Lat-66":4367838.370169282,"Lat-83":4367954.152606599,Decimeter:3.9370000000000003,Millimeter:.03937,Dekameter:393.7,Decameter:393.7,Hectometer:3937,GermanMeter:39.370535294205006,CaGrid:39.359685060000004,ClarkeChain:791.991309620512,GunterChain:792.0000000000001,BenoitChain:791.9977268035781,SearsChain:791.9970428354235,ClarkeLink:7.91991309620512,GunterLink:7.920000000000001,BenoitLink:7.919977268035781,SearsLink:7.919970428354236,Rod:198.00000000000014,IntnlChain:791.998416,IntnlLink:7.91998416,Perch:198.00000000000014,Pole:198.00000000000014,Furlong:7919.999999999997,Rood:148.75036777426,CapeFoot:11.999868185255002,Brealey:14763.75,ModAmFt:12.000458400000001,Fathom:71.999856,"NautM-UK":72959.85408,"50kilometers":1968500,"150kilometers":5905500}),l.extend(u,{mm:u.Meter/1e3,cm:u.Meter/100,dm:100*u.Meter,km:1e3*u.Meter,kmi:u.nmi,fath:u.Fathom,ch:u.IntnlChain,link:u.IntnlLink,"us-in":u.inches,"us-ft":u.Foot,"us-yd":u.Yard,"us-ch":u.GunterChain,"us-mi":u.Mile,"ind-yd":u.IndianYd37,"ind-ft":u.IndianFt37,"ind-ch":791.9942845122}),u.degree=u.dd,u.meter=u.m,u.foot=u.ft,u.inch=u.inches,u.mile=u.mi,u.kilometer=u.km,u.yard=u.yd;var h={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var s=h.element(e);s.parentNode&&(!s.tagName||s.tagName.toUpperCase()!=t.toUpperCase());)s=s.parentNode;return s},observe:function(e,t,s,r){var n=l.getElement(e);if(r=r||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||n.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!n._eventCacheID){var i="eventCacheID_";n.id&&(i=n.id+"_"+i),n._eventCacheID=l.createUniqueID(i)}var o=n._eventCacheID;this.observers[o]||(this.observers[o]=[]),this.observers[o].push({element:n,name:t,observer:s,useCapture:r}),n.addEventListener?"mousewheel"===t?n.addEventListener(t,s,{useCapture:r,passive:!1}):n.addEventListener(t,s,r):n.attachEvent&&n.attachEvent("on"+t,s)},stopObservingElement:function(e){var t=l.getElement(e)._eventCacheID;this._removeElementObservers(h.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var s=e[t],r=new Array(s.element,s.name,s.observer,s.useCapture);h.stopObserving.apply(this,r)}},stopObserving:function(e,t,s,r){r=r||!1;var n=l.getElement(e),i=n._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||n.detachEvent)&&(t="keydown");var o=!1,a=h.observers[i];if(a)for(var u=0;!o&&u=t.limitLength){if(0==o)return!1;n.push(i),i=r,o=0,l--}else if(i.length+t.queryKeys[l].length+2+t.queryValues[l].length>t.limitLength)for(var u=t.queryValues[l];u.length>0;){var h=t.limitLength-i.length-t.queryKeys[l].length-2;i.indexOf("?")>-1?i+="&":i+="?";var c=u.substring(0,h);"%"===c.substring(h-1,h)?(h-=1,c=u.substring(0,h)):"%"===c.substring(h-2,h-1)&&(h-=2,c=u.substring(0,h)),i+=t.queryKeys[l]+"="+c,u=u.substring(h),c.length>0&&(n.push(i),i=r,o=0)}else o++,i.indexOf("?")>-1?i+="&":i+="?",i+=t.queryKeys[l]+"="+t.queryValues[l];return n.push(i),t.send(n,"SuperMapJSONPCallbacks_"+s,e&&e.proxy)},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,s){var r=e.length;if(r>0)return new Promise(n=>{for(var i=(new Date).getTime(),o=0;o-1?a+="&":a+="?",a+="sectionCount="+r,a+="§ionIndex="+o,a+="&jsonpUserID="+i,s&&(a=decodeURIComponent(a),a=s+encodeURIComponent(a)),f()(a,{jsonpCallbackFunction:t,timeout:3e4}).then(e=>{n(e.json())})}})},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)}},E=function(){return v||45e3},b={commit:function(e,t,s,r){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,s,r);case"POST":return this.post(t,s,r);case"PUT":return this.put(t,s,r);case"DELETE":return this.delete(t,s,r);default:return this.get(t,s,r)}},supportDirectRequest:function(e,t){return!!l.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:(void 0!=g?g:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest)||t.proxy)},get:function(e,t,s){s=s||{};if(e=l.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){var r={url:e=e.replace(".json",".jsonp"),data:t};return S.GET(r)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")),t,s):this._fetch(e,t,s,"GET")},delete:function(e,t,s){s=s||{};if(e=l.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return S.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")),t,s):this._fetch(e,t,s,"DELETE")},post:function(e,t,s){if(s=s||{},e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var r={url:l.urlAppend(e,"_method=POST"),data:t};return S.POST(r)}return this._fetch(e,t,s,"POST")},put:function(e,t,s){if(s=s||{},e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=PUT",data:t};return S.PUT(r)}return this._fetch(e,t,s,"PUT")},urlIsLong:function(e){for(var t=0,s=null,r=0,n=e.length;r-1?"&":"?")+"_method="+e,"string"!=typeof s&&(s=JSON.stringify(s)),this.post(t,s,r)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var s=e.split("?");2===s.length&&(e=s[0]+".json?"+s[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,s,r){return(s=s||{}).headers=s.headers||{},s.headers["Content-Type"]||FormData.prototype.isPrototypeOf(t)||(s.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),s.timeout?this._timeout(s.timeout,y(e,{method:r,headers:s.headers,body:"PUT"===r||"POST"===r?t:void 0,credentials:this._getWithCredentials(s),mode:"cors",timeout:E()}).then(function(e){return e})):y(e,{method:r,body:"PUT"===r||"POST"===r?t:void 0,headers:s.headers,credentials:this._getWithCredentials(s),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||{},f()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(s,r){setTimeout(function(){r(new Error("timeout"))},e),t.then(s,r)})},_getParameterString:function(e){var t=[];for(var s in e){var r,n=e[s];if(null!=n&&"function"!=typeof n)r=Array.isArray(n)||"[object Object]"===n.toString()?encodeURIComponent(JSON.stringify(n)):encodeURIComponent(n),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};class C{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}}C.CREDENTIAL=null;class w{static generateToken(e,t){var s=this.servers[e];if(s)return b.post(s.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},l.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}}class V{constructor(e){e&&(this.datasetName="",this.query="",this.resolution=80,this.method=0,this.meshType=0,this.fields="",this.radius=300,this.meshSizeUnit=F.METER,this.radiusUnit=F.METER,this.areaUnit=D.SQUAREMILE,this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}class K{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=x.CONTAIN,this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}class q{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}class H{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=J.AVERAGE,this.fields="",this.type=U.SUMMARYMESH,this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s?"output"!==s?("SUMMARYMESH"===e.type&&"regionDataset"!==s||"SUMMARYREGION"===e.type&&!r(["meshType","resolution","query"],s))&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s]);function r(e,t){for(var s=e.length;s--;)if(e[s]===t)return!0;return!1}}}class Y{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=F.METER,this.type=U.SUMMARYMESH,this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s&&"type"!==s?"output"!==s?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==s)&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s])}}class W{constructor(e){e&&(this.datasetName="",this.datasetOverlay="",this.mode="",this.srcFields="",this.overlayFields="",this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!=s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}class Q{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=F.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"bounds"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}class z{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=k.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}class ${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,l.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}class X{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,l.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}}var Z=window.SuperMap=window.SuperMap||{};Z.REST=Z.REST||{};const ee=function(){try{return mapv}catch(e){return{}}}();var te=function(e){var t;if(e===T)t=1;else if(e===N)t=2*Math.PI*6378137/360;else if(e===_)t=.001;else if(e===A)t=1/.025399999918;else{if(e!==P)return t;t=.3048}return t};var se=ee.baiduMapLayer?ee.baiduMapLayer.__proto__:Function;class re extends se{constructor(e,t,s,r){if(super(e,s,r),!se)return this;r=r||{},this.init(r),this.argCheck(r),this.canvasLayer=t,this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),this.bindEvent()}clickEvent(e){var t=e.xy,s=this.devicePixelRatio||1;super.clickEvent({x:t.x/s,y:t.y/s},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 s=e;e&&e.get&&(s=e.get()),this.dataSet.add(s),this.update({options:t})}setData(e,t){var s=e;e&&e.get&&(s=e.get()),this.dataSet=this.dataSet||new ee.DataSet,this.dataSet.set(s),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=Z.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,s=this.getContext(),r=this.map;if(this.isEnabledTime()){if(void 0===e)return void this.clear(s);"2d"===this.context&&(s.save(),s.globalCompositeOperation="destination-out",s.fillStyle="rgba(0, 0, 0, .1)",s.fillRect(0,0,s.canvas.width,s.canvas.height),s.restore())}else this.clear(s);if("2d"===this.context)for(var n in this.options)s[n]=this.options[n];else s.clear(s.COLOR_BUFFER_BIT);if(!(this.options.minZoom&&r.getZoom()this.options.maxZoom)){var i=this.canvasLayer,o={fromColumn:"coordinates",transferCoordinate:function(e){var t={lon:e[0],lat:e[1]},s=r.getViewPortPxFromLonLat(t);return[s.x,s.y]}};void 0!==e&&(o.filter=function(s){var r=t.trails||10;return e&&s.time>e-r&&s.timeMapV with © SuperMap iClient",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 re(e,this,this.dataSet,this.options),this.renderer.devicePixelRatio=this.devicePixelRatio,this.supported?this.redraw():this.map.removeLayer(this)}moveTo(e,t,s){if(super.moveTo(e,t,s),this.supported){if(this.zoomChanged=t,!s){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","heatmap"===this.options.draw?(this.canvas.width=parseInt(r.w)*this.devicePixelRatio,this.canvas.height=parseInt(r.h)*this.devicePixelRatio):(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()}}transferToMapLatLng(e){var t="EPSG:4326",s=this.map.getUnits()||"degree";return["m","meter"].indexOf(s.toLowerCase())>-1&&(t="EPSG:3857"),new Z.LonLat(e.lon,e.lat).transform("EPSG:4326",t)}};class ne{constructor(e){this.data=null,this.keepData=!1,l.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}class ie extends ne{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t,s,r,n=["{"];this.level+=1;var i=!1;for(t in e)e.hasOwnProperty(t)&&(s=this.write.apply(this,[t,this.pretty]),r=this.write.apply(this,[e[t],this.pretty]),null!=s&&null!=r&&(i&&n.push(","),n.push(this.writeNewline(),this.writeIndent(),s,":",this.writeSpace(),r),i=!0));return this.level-=1,n.push(this.writeNewline(),this.writeIndent(),"}"),n.join("")},array:function(e){var t,s=["["];this.level+=1;for(var r=0,n=e.length;r0&&s.push(","),s.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,s.push(this.writeNewline(),this.writeIndent(),"]"),s.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,s){var r=t[s];return r||(r=s.charCodeAt(),"\\u00"+Math.floor(r/16).toString(16)+(r%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var s;if(this.nativeJSON)try{s=JSON.parse(e,t)}catch(t){return{data:e}}return this.keepData&&(this.data=s),s}write(e,t){this.pretty=!!t;var s=null,r=typeof e;if(this.serialize[r])try{s=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[r].apply(this,[e])}catch(e){}return s}writeIndent(){var e=[];if(this.pretty)for(var t=0;t0?(s.totalTimes--,s.ajaxPolling(t)):e&&e(r,t)}}ajaxPolling(e){let t=this,s=e.url,r=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;t.index=parseInt(Math.random()*t.length),t.url=t.urls[t.index],s=s.replace(r,r.exec(t.url)[0]),e.url=s,e.isInTheSameDomain=l.isInTheSameDomain(s),t._commit(e)}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.timese.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,t){e=l.transformResult(e),this.events.triggerEvent("processCompleted",{result:e,options:t})}serviceProcessFailed(e,t){let s=(e=l.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:s,options:t})}_returnContent(e){return e.scope.format!==O.FGB&&!!e.scope.returnContent}supportDataFormat(e){return this.dataFormat().includes(e)}dataFormat(){return[O.GEOJSON,O.ISERVER]}_commit(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=l.urlAppend(e.url,l.getParameterString(e.params||{}))),"object"==typeof e.data)try{e.params=l.toJSON(e.data)}catch(e){console.log("不是json对象")}else e.params=e.data;b.commit(e.method,e.url,e.params,{headers:e.headers,withoutFormatSuffix:e.withoutFormatSuffix,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){let s=t;return"string"==typeof t&&(s=(new ie).read(t)),(!s||s.error||s.code>=300&&304!==s.code)&&(s=s&&s.error?{error:s.error}:{error:s}),s&&e.scope.format===O.FGB&&(s.newResourceLocation=s.newResourceLocation.replace(".json","")+".fgb"),s}).catch(function(e){return{error:e}}).then(t=>{t.error?(e.scope?n.bind(e.failure,e.scope):e.failure)(t):(t.succeed=void 0==t.succeed||t.succeed,(e.scope?n.bind(e.success,e.scope):e.success)(t))})}}class ae extends oe{constructor(e,t){super(e,t),this.options=t||{},this.eventCount=0,this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t,s){t instanceof $&&this.processAsync(e,t,s)}decode(e,t,s){t instanceof X&&this.processAsync(e,t,s)}processAsync(e,t,s){let r=++this.eventCount,n={scope:this,processCompleted:function(e){if(r===e.result.eventId&&s)return delete e.result.eventId,s(e),this.events&&this.events.un(n),!1},processFailed:function(e){if((r===e.error.eventId||r===e.eventId)&&s)return s(e),this.events&&this.events.un(n),!1}};this.events.on(n),this.request({method:"GET",url:e,params:t,scope:this,success(e,t){e.eventId=r,this.serviceProcessCompleted(e,t)},failure(e,t){e.error&&(e.error.eventId=r),e.eventId=r,this.serviceProcessFailed(e,t)}})}serviceProcessCompleted(e,t){e.succeed&&delete e.succeed,super.serviceProcessCompleted(e,t)}serviceProcessFailed(e,t){super.serviceProcessFailed(e,t)}}Z.REST.AddressMatchService=class extends oe{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.REST.AddressMatchService"}code(e,t){var s=this;new ae(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).code(s.url+"/geocoding",e)}decode(e,t){var s=this;new ae(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).decode(s.url+"/geodecoding",e)}};class le extends oe{constructor(e,t){super(e,t),t&&(this.datasource=null,this.dataset=null,this.eventCount=0,t&&l.extend(this,t),this.CLASS_NAME="SuperMap.DatasetService")}destroy(){super.destroy();this.datasource=null,this.dataset=null}getDatasetsService(e,t){const s=l.urlPathAppend(this.url,`datasources/name/${e}/datasets`);this.processAsync(s,"GET",t)}getDatasetService(e,t,s){const r=l.urlPathAppend(this.url,`datasources/name/${e}/datasets/name/${t}`);this.processAsync(r,"GET",s)}setDatasetService(e,t){if(!e)return;const s=l.urlPathAppend(this.url,`datasources/name/${e.datasourceName}/datasets/name/${e.datasetName}`);delete e.datasourceName,this.processAsync(s,"PUT",t,e)}deleteDatasetService(e,t,s){const r=l.urlPathAppend(this.url,`datasources/name/${e}/datasets/name/${t}`);this.processAsync(r,"DELETE",s)}processAsync(e,t,s,r){let n=++this.eventCount,i={scope:this,processCompleted:function(e){if(n===e.result.eventId&&s)return delete e.result.eventId,s(e),this.events&&this.events.un(i),!1},processFailed:function(e){if((n===e.error.eventId||n===e.eventId)&&s)return s(e),this.events&&this.events.un(i),!1}};this.events.on(i);var o=this;let a={url:e,method:t,scope:o,success(e,t){e.eventId=n,o.serviceProcessCompleted(e,t)},failure(e,t){e.error&&(e.error.eventId=n),e.eventId=n,o.serviceProcessFailed(e,t)}};r&&(a.data=l.toJSON(r)),o.request(a)}}class ue{constructor(e){e&&(this.datasourceName=null,this.datasetName=null,this.datasetType=null,e&&l.extend(this,e),this.CLASS_NAME="SuperMap.CreateDatasetParameters")}destroy(){this.datasourceName=null,this.datasetName=null,this.datasetType=null}}class he{constructor(e){e&&(this.datasourceName=null,this.datasetName=null,this.isFileCache=null,this.description=null,this.prjCoordSys=null,this.charset=null,this.palette=null,this.noValue=null,e&&l.extend(this,e),this.CLASS_NAME="SuperMap.UpdateDatasetParameters")}destroy(){var e=this;e.datasourceName=null,e.datasetName=null,e.isFileCache=null,e.prjCoordSys=null,e.charset=null,e.palette=null,e.noValue=null}}Z.REST.DatasetService=class extends oe{constructor(e,t){super(e,t);const s=this;this._datasetService=new le(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers}),this.CLASS_NAME="SuperMap.REST.DatasetService"}getDatasets(e,t){e&&this._datasetService.getDatasetsService(e,t)}getDataset(e,t,s){e&&t&&this._datasetService.getDatasetService(e,t,s)}setDataset(e,t){if(!(e instanceof ue||e instanceof he))return;let s;e instanceof ue?s={datasetType:e.datasetType,datasourceName:e.datasourceName,datasetName:e.datasetName}:e instanceof he&&(s={datasetName:e.datasetName,datasourceName:e.datasourceName,isFileCache:e.isFileCache,description:e.description,prjCoordSys:e.prjCoordSys,charset:e.charset}),this._datasetService.setDatasetService(s,t)}deleteDataset(e,t,s){this._datasetService.deleteDatasetService(e,t,s)}};class ce extends oe{constructor(e,t){super(e,t),t&&l.extend(this,t),this.eventCount=0,this.CLASS_NAME="SuperMap.DatasourceService"}destroy(){this.eventCount=0,super.destroy()}getDatasourceService(e,t){let s=l.urlPathAppend(this.url,`datasources/name/${e}`);this.processAsync(s,"GET",t)}getDatasourcesService(e){let t=l.urlPathAppend(this.url,"datasources");this.processAsync(t,"GET",e)}setDatasourceService(e,t){if(!e)return;const s=l.urlPathAppend(this.url,`datasources/name/${e.datasourceName}`);this.processAsync(s,"PUT",t,e)}processAsync(e,t,s,r){let n=++this.eventCount,i={scope:this,processCompleted:function(e){if(n===e.result.eventId&&s)return delete e.result.eventId,s(e),this.events&&this.events.un(i),!1},processFailed:function(e){if((n===e.error.eventId||n===e.eventId)&&s)return s(e),this.events&&this.events.un(i),!1}};this.events.on(i);let o={url:e,method:t,scope:this,success(e,t){e.eventId=n,this.serviceProcessCompleted(e,t)},failure(e,t){e.error&&(e.error.eventId=n),e.eventId=n,this.serviceProcessFailed(e,t)}};r&&(o.data=l.toJSON(r)),this.request(o)}}class de{constructor(e){e&&(this.datasourceName=null,this.description=null,this.coordUnit=null,this.distanceUnit=null,e&&l.extend(this,e),this.CLASS_NAME="SuperMap.SetDatasourceParameters")}destroy(){this.datasourceName=null,this.description=null,this.coordUnit=null,this.distanceUnit=null}}Z.REST.DatasourceService=class extends oe{constructor(e,t){super(e,t);const s=this;this._datasourceService=new ce(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers}),this.CLASS_NAME="SuperMap.REST.DatasourceService"}getDatasources(e){this._datasourceService.getDatasourcesService(e)}getDatasource(e,t){e&&this._datasourceService.getDatasourceService(e,t)}setDatasource(e,t){if(!(e instanceof de))return;const s={description:e.description,coordUnit:e.coordUnit,distanceUnit:e.distanceUnit,datasourceName:e.datasourceName};this._datasourceService.setDatasourceService(s,t)}};class pe extends oe{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;b.get(w.appendCredential(e),null,{proxy:t.proxy}).then(function(e){return e.json()}).then(function(e){t.events.triggerEvent("processCompleted",{result:e})}).catch(function(e){t.eventListeners.processFailed({error:e})})}addJob(e,t,s,r){var n=this,i=null;t&&t instanceof s&&(i=new Object,s.toObject(t,i));let o=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},n.headers||{});var a={proxy:n.proxy,headers:o,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,isInTheSameDomain:n.isInTheSameDomain};b.post(w.appendCredential(e),JSON.stringify(i),a).then(function(e){return e.json()}).then(function(e){e.succeed?n.serviceProcessCompleted(e,r):n.serviceProcessFailed(e)}).catch(function(e){n.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=l.transformResult(e),t=t||1e3;var s=this;if(e)var r=setInterval(function(){b.get(w.appendCredential(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){s.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(r),s.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(r),s.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(r),s.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}}class me extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/density"),this.CLASS_NAME="SuperMap.KernelDensityJobsService"}destroy(){super.destroy()}getKernelDensityJobs(){super.getJobs(this.url)}getKernelDensityJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addKernelDensityJob(e,t){super.addJob(this.url,e,V,t)}}class fe extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,K,t)}}class ye extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,H,t)}}class ge extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,Y,t)}}class ve{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=M.CLIP,this.output=null,this.mappingParameters=null,l.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 G&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}class Se extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,ve,t)}}class Ee extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/overlay"),this.CLASS_NAME="SuperMap.OverlayGeoJobsService"}destroy(){super.destroy()}getOverlayGeoJobs(){super.getJobs(this.url)}getOverlayGeoJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addOverlayGeoJob(e,t){super.addJob(this.url,e,W,t)}}class be extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,Q,t)}}class Ce extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,z,t)}}class we extends pe{constructor(e,t){super(e,t),this.url=l.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(l.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,q,t)}}Z.REST.ProcessingService=class extends oe{constructor(e,t){super(e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}}getKernelDensityJobs(e,t){var s=this,r=s._processFormat(t);new me(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getKernelDensityJobs()}getKernelDensityJob(e,t,s){var r=this,n=r._processFormat(s);new me(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getKernelDensityJob(e)}addKernelDensityJob(e,t,s,r){var n=this,i=n._processFormat(r);new me(n.url,{headers:n.headers,proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning(e){n.kernelDensityJobs[e.id]=e.state}},format:i}).addKernelDensityJob(e,s)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var s=this,r=s._processFormat(t);new ye(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,s){var r=this,n=r._processFormat(s);new ye(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,s,r){var n=this,i=n._processFormat(r);new ye(n.url,{headers:n.headers,proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning(e){n.summaryMeshJobs[e.id]=e.state}},format:i}).addSummaryMeshJob(e,s)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var s=this,r=s._processFormat(t);new fe(s.url,{headers:s.headers,proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getQueryJobs()}getQueryJob(e,t,s){var r=this,n=r._processFormat(s);new fe(r.url,{headers:r.headers,proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getQueryJob(e)}addQueryJob(e,t,s,r){var n=this,i=n._processParams(e),o=n._processFormat(r);new fe(n.url,{headers:n.headers,proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning(e){n.queryJobs[e.id]=e.state}},format:o}).addQueryJob(i,s)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var s=this,r=s._processFormat(t);new ge(s.url,{proxy:s.proxy,headers:s.headers,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,s){var r=this,n=r._processFormat(s);new ge(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,s,r){var n=this,i=n._processFormat(r);new ge(n.url,{proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,headers:n.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning(e){n.summaryRegionJobs[e.id]=e.state}},format:i}).addSummaryRegionJob(e,s)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var s=this,r=s._processFormat(t);new Se(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getVectorClipJobs()}getVectorClipJob(e,t,s){var r=this,n=r._processFormat(s);new Se(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getVectorClipJob(e)}addVectorClipJob(e,t,s,r){var n=this,i=n._processParams(e),o=n._processFormat(r);new Se(n.url,{proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,headers:n.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning(e){n.vectorClipJobs[e.id]=e.state}},format:o}).addVectorClipJob(i,s)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var s=this,r=s._processFormat(t);new Ee(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,s){var r=this,n=r._processFormat(s);new Ee(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,s,r){var n=this,i=n._processFormat(r);new Ee(n.url,{proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,headers:n.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning:function(e){n.overlayGeoJobs[e.id]=e.state}},format:i}).addOverlayGeoJob(e,s)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var s=this,r=s._processFormat(t);new be(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getBuffersJobs()}getBuffersJob(e,t,s){var r=this,n=r._processFormat(s);new be(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getBuffersJob(e)}addBuffersJob(e,t,s,r){var n=this,i=n._processFormat(r);new be(n.url,{proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,headers:n.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning:function(e){n.buffersJobs[e.id]=e.state}},format:i}).addBuffersJob(e,s)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var s=this,r=s._processFormat(t);new Ce(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,s){var r=this,n=r._processFormat(s);new Ce(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,s,r){var n=this,i=n._processFormat(r);new Ce(n.url,{proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,headers:n.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning:function(e){n.topologyValidatorJobs[e.id]=e.state}},format:i}).addTopologyValidatorJob(e,s)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var s=this,r=s._processFormat(t);new we(s.url,{proxy:s.proxy,withCredentials:s.withCredentials,crossOrigin:s.crossOrigin,headers:s.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,s){var r=this,n=r._processFormat(s);new we(r.url,{proxy:r.proxy,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,headers:r.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:n}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,s,r){var n=this,i=n._processFormat(r);new we(n.url,{proxy:n.proxy,withCredentials:n.withCredentials,crossOrigin:n.crossOrigin,headers:n.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t,processRunning:function(e){n.summaryAttributesJobs[e.id]=e.state}},format:i}).addSummaryAttributesJob(e,s)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||O.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 s=[],r=0;rt.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),s})}_distance(e,t,s,r){return Math.sqrt((e-s)*(e-s)+(t-r)*(t-r))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}},Z.SecurityManager=w,Z.KernelDensityJobParameter=V,Z.SingleObjectQueryJobsParameter=K,Z.SummaryAttributesJobsParameter=q,Z.SummaryMeshJobParameter=H,Z.SummaryRegionJobParameter=Y,Z.OverlayGeoJobParameter=W,Z.BuffersAnalystJobsParameter=Q,Z.TopologyValidatorJobsParameter=z,Z.OutputSetting=B,Z.MappingParameters=G,Z.GeoCodingParameter=$,Z.GeoDecodingParameter=X,Z.Util={...Z.Util,...l}})()})();