/*! * * iclient-openlayers.(https://iclient.supermap.io) * Copyright© 2000 - 2020 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v10.1.0 * */!function(e){var t={};function r(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(s,i,function(t){return e[t]}.bind(null,i));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=63)}([function(e,t){e.exports=ol.style.Style},function(e,t){e.exports=ol.style.Stroke},function(e,t){e.exports=ol.format.GeoJSON},function(e,t){e.exports=ol.style.Fill},function(e,t){e.exports=ol.geom.Point},function(e,t){e.exports=ol.layer},function(e,t){e.exports=ol.proj},function(e,t){e.exports=ol.source},function(e,t){e.exports=ol.Feature},function(e,t){e.exports=ol.tilegrid.TileGrid},function(e,t){e.exports=ol.style.Circle},function(e,t){e.exports=ol.style},function(e,t){e.exports=ol.format.MVT},function(e,t){e.exports=ol.geom.Geometry},function(e,t){e.exports=ol.style.Icon},function(e,t){e.exports=ol.style.Text},function(e,t){e.exports=ol.Observable},function(e,t){e.exports=ol.source.ImageCanvas},function(e,t){e.exports=ol.Map},function(e,t){e.exports=ol.extent},function(e,t){e.exports=ol.source.Vector},function(e,t){e.exports=ol.source.TileImage},function(e,t){e.exports=ol.size},function(e,t){e.exports=ol.Object},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=ol.tilegrid.WMTS},function(e,t){e.exports=ol.geom.LineString},function(e,t){e.exports=ol.control.Control},function(e,t){e.exports=ol.render},function(e,t){e.exports=ol.tilegrid},function(e,t){e.exports=ol.util},function(e,t){e.exports=ol.proj.proj4},function(e,t,r){var s,i,a;i=[t,e],void 0===(a="function"==typeof(s=function(e,t){"use strict";var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function s(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,n=t.timeout||r.timeout,o=t.jsonpCallback||r.jsonpCallback,l=void 0;return new Promise(function(r,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(c),s(u)},a+=-1===a.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+o+"="+u),t.charset&&d.setAttribute("charset",t.charset),d.id=c,document.getElementsByTagName("head")[0].appendChild(d),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),s(u),i(c),window[u]=function(){s(u)}},n),d.onerror=function(){h(new Error("JSONP request to "+e+" failed")),s(u),i(c),l&&clearTimeout(l)}})}})?s.apply(t,i):s)||(e.exports=a)},function(e,t){e.exports=function(){try{return XLSX}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return mapv}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return turf}catch(e){return{}}}()},function(e,t){e.exports=ol.View},function(e,t){e.exports=ol.format.WMTSCapabilities},function(e,t){e.exports=ol.geom},function(e,t){e.exports=function(){try{return elasticsearch}catch(e){return{}}}()},function(e,t,r){(function(t){var r=9007199254740991,s="[object Arguments]",i="[object Function]",a="[object GeneratorFunction]",n="[object Map]",o="[object Set]",l=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")();function p(e,t){return function(e,t){for(var r=-1,s=e?e.length:0,i=Array(s);++r-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!q(e)}function q(e){var t=W(e)?T.call(e):"";return t==i||t==a}function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Y,X=(Y=function(e){return z(e)?k(e):B(e)},function(e){var t,r,s,i=j(e);return i==n?(t=e,r=-1,s=Array(t.size),t.forEach(function(e,t){s[++r]=[t,e]}),s):i==o?function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}(e):p(e,Y(e))});e.exports=X}).call(this,r(24))},function(e,t){e.exports=function(){try{return echarts}catch(e){return{}}}()},function(e,t){e.exports=ol.control.ScaleLine},function(e,t){e.exports=ol.AssertionError},function(e,t){e.exports=ol.layer.Vector},function(e,t){e.exports=function(){try{return canvg}catch(e){return{}}}()},function(e,t){e.exports=ol.layer.Group},function(e,t){e.exports=ol.asserts},function(e,t){e.exports=ol.source.XYZ},function(e,t){e.exports=ol.source.WMTS},function(e,t){e.exports=ol.style.RegularShape},function(e,t){e.exports=ol.geom.Polygon},function(e,t){e.exports=ol.layer.Image},function(e,t){e.exports=ol.interaction.Pointer},function(e,t){e.exports=ol.source.VectorTile},function(e,t){e.exports=ol.proj.Projection},function(e,t,r){(function(e,r){var s=200,i="Expected a function",a="__lodash_hash_undefined__",n=1,o=2,l=1/0,h=9007199254740991,u="[object Arguments]",c="[object Array]",d="[object Boolean]",p="[object Date]",m="[object Error]",f="[object Function]",y="[object GeneratorFunction]",g="[object Map]",v="[object Number]",S="[object Object]",b="[object RegExp]",x="[object Set]",C="[object String]",T="[object Symbol]",_="[object ArrayBuffer]",w="[object DataView]",M=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/,A=/^\./,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,O=/\\(\\)?/g,L=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,N={};N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N[u]=N[c]=N[_]=N[d]=N[w]=N[p]=N[m]=N[f]=N[g]=N[v]=N[S]=N[b]=N[x]=N[C]=N["[object WeakMap]"]=!1;var R="object"==typeof e&&e&&e.Object===Object&&e,F="object"==typeof self&&self&&self.Object===Object&&self,D=R||F||Function("return this")(),k=t&&!t.nodeType&&t,G=k&&"object"==typeof r&&r&&!r.nodeType&&r,B=G&&G.exports===k&&R.process,U=function(){try{return B&&B.binding("util")}catch(e){}}(),j=U&&U.isTypedArray;function V(e,t){for(var r=-1,s=e?e.length:0;++rh))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var d=-1,p=!0,m=i&n?new Me:void 0;for(a.set(e,t),a.set(t,e);++d-1},_e.prototype.set=function(e,t){var r=this.__data__,s=Pe(r,e);return s<0?r.push([e,t]):r[s][1]=t,this},we.prototype.clear=function(){this.__data__={hash:new Te,map:new(ue||_e),string:new Te}},we.prototype.delete=function(e){return Ge(this,e).delete(e)},we.prototype.get=function(e){return Ge(this,e).get(e)},we.prototype.has=function(e){return Ge(this,e).has(e)},we.prototype.set=function(e,t){return Ge(this,e).set(e,t),this},Me.prototype.add=Me.prototype.push=function(e){return this.__data__.set(e,a),this},Me.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.clear=function(){this.__data__=new _e},Ee.prototype.delete=function(e){return this.__data__.delete(e)},Ee.prototype.get=function(e){return this.__data__.get(e)},Ee.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.set=function(e,t){var r=this.__data__;if(r instanceof _e){var i=r.__data__;if(!ue||i.length-1&&e%1==0&&ei?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++s-1&&e%1==0&&e<=h}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function it(e){return!!e&&"object"==typeof e}function at(e){return"symbol"==typeof e||it(e)&&re.call(e)==T}var nt=j?function(e){return function(t){return e(t)}}(j):function(e){return it(e)&&rt(e.length)&&!!N[re.call(e)]};function ot(e){return et(e)?Ae(e):Fe(e)}function lt(e){return e}r.exports=function(e,t){var r=[];if(!e||!e.length)return r;var s=-1,i=[],a=e.length;for(t=Re(t);++s=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(66),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(24))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var s,i,a,n,o,l=1,h={},u=!1,c=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?s=function(e){t.nextTick(function(){m(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){m(e.data)},s=function(e){a.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,s=function(e){var t=c.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):s=function(e){setTimeout(m,0,e)}:(n="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&m(+t.data.slice(n.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),s=function(t){e.postMessage(n+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r1)for(var r=1;r599){if(l)return;return l=!0,void i(new TypeError("Network request failed"))}var t={status:e,statusText:n.statusText,headers:function(e){var t=new o;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var r=e.trim().split(":"),s=r.shift().trim(),i=r.join(":").trim();t.append(s,i)}),t}(n),url:"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0},r="response"in n?n.response:n.responseText;l||(l=!0,s(new m(r,t)))}}n.onreadystatechange=h,n.onload=h,n.onerror=function(){l||(l=!0,i(new TypeError("Network request failed")))},n.open(a.method,a.url,!0);try{"include"===a.credentials&&("withCredentials"in n?n.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(e){console&&console.warn&&console.warn("set withCredentials error:"+e)}"responseType"in n&&r.blob&&(n.responseType="blob"),a.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send(void 0===a._bodyInit?null:a._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function u(e){var t=new FileReader;return t.readAsArrayBuffer(e),h(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!r.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},r.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var e,t,r,s,i,a,n,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,r=new FileReader,s=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,a=e.type.match(i)||s.match(i),n=[e],a&&n.push(a[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,n),h(r);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e,t){var r,i,a=(t=t||{}).body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,a||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),s.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a,t)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),s=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(i))}}),t}function m(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";r.r(t);r(72),r(74)},function(e,t,r){"use strict";r.r(t),r.d(t,"ChangeTileVersion",function(){return mo}),r.d(t,"ScaleLine",function(){return bo}),r.d(t,"Logo",function(){return xo}),r.d(t,"StyleUtils",function(){return cl}),r.d(t,"Util",function(){return Wo}),r.d(t,"MapExtend",function(){return yl}),r.d(t,"BaiduMap",function(){return Cl}),r.d(t,"ImageSuperMapRest",function(){return wl}),r.d(t,"SuperMapCloud",function(){return Al}),r.d(t,"Tianditu",function(){return Nl}),r.d(t,"TileSuperMapRest",function(){return Rl}),r.d(t,"WebMap",function(){return Sp}),r.d(t,"DataFlow",function(){return Gc}),r.d(t,"Graph",function(){return Hc}),r.d(t,"Graphic",function(){return ld}),r.d(t,"Label",function(){return ud}),r.d(t,"Mapv",function(){return gd}),r.d(t,"Range",function(){return vd}),r.d(t,"RankSymbol",function(){return Sd}),r.d(t,"Turf",function(){return xd}),r.d(t,"Unique",function(){return Cd}),r.d(t,"VectorTileSuperMapRest",function(){return Od}),r.d(t,"HeatMap",function(){return Ld}),r.d(t,"OverlayGraphic",function(){return ed}),r.d(t,"CloverShape",function(){return qc}),r.d(t,"HitCloverShape",function(){return Wc}),r.d(t,"GraphicCanvasRenderer",function(){return $c}),r.d(t,"GraphicWebGLRenderer",function(){return Zc}),r.d(t,"MapvCanvasLayer",function(){return cd}),r.d(t,"MapvLayer",function(){return yd}),r.d(t,"GeoFeature",function(){return hd}),r.d(t,"Theme",function(){return Vc}),r.d(t,"ThemeFeature",function(){return Bc}),r.d(t,"pointStyle",function(){return Mo}),r.d(t,"lineStyle",function(){return Eo}),r.d(t,"polygonStyle",function(){return Ao}),r.d(t,"DeafultCanvasStyle",function(){return Po}),r.d(t,"pointMap",function(){return Co}),r.d(t,"lineMap",function(){return To}),r.d(t,"polygonMap",function(){return _o}),r.d(t,"StyleMap",function(){return wo}),r.d(t,"VectorTileStyles",function(){return Td}),r.d(t,"MapboxStyles",function(){return kd}),r.d(t,"AddressMatchService",function(){return Gd}),r.d(t,"ChartService",function(){return Bd}),r.d(t,"DataFlowService",function(){return kc}),r.d(t,"FeatureService",function(){return Fo}),r.d(t,"FieldService",function(){return Ud}),r.d(t,"GridCellInfosService",function(){return jd}),r.d(t,"GeoprocessingService",function(){return Vd}),r.d(t,"LayerInfoService",function(){return Hd}),r.d(t,"MapService",function(){return uo}),r.d(t,"MeasureService",function(){return Jd}),r.d(t,"NetworkAnalyst3DService",function(){return zd}),r.d(t,"NetworkAnalystService",function(){return qd}),r.d(t,"ProcessingService",function(){return Wd}),r.d(t,"QueryService",function(){return Ro}),r.d(t,"ServiceBase",function(){return a}),r.d(t,"SpatialAnalystService",function(){return Yd}),r.d(t,"ThemeService",function(){return Xd}),r.d(t,"TrafficTransferAnalystService",function(){return Qd}),r.d(t,"WebPrintingJobService",function(){return Kd}),r.d(t,"SuperMap",function(){return n}),r.d(t,"DataFormat",function(){return o}),r.d(t,"ServerType",function(){return l}),r.d(t,"GeometryType",function(){return h}),r.d(t,"QueryOption",function(){return u}),r.d(t,"JoinType",function(){return c}),r.d(t,"EngineType",function(){return g}),r.d(t,"MeasureMode",function(){return m}),r.d(t,"SpatialRelationType",function(){return p}),r.d(t,"DataReturnMode",function(){return B}),r.d(t,"Unit",function(){return f}),r.d(t,"BufferRadiusUnit",function(){return y}),r.d(t,"SpatialQueryMode",function(){return d}),r.d(t,"ThemeGraphTextFormat",function(){return v}),r.d(t,"ThemeGraphType",function(){return S}),r.d(t,"GraphAxesTextDisplayMode",function(){return b}),r.d(t,"GraduatedMode",function(){return x}),r.d(t,"RangeMode",function(){return C}),r.d(t,"ThemeType",function(){return T}),r.d(t,"ColorGradientType",function(){return _}),r.d(t,"TextAlignment",function(){return w}),r.d(t,"FillGradientMode",function(){return M}),r.d(t,"SideType",function(){return L}),r.d(t,"AlongLineDirection",function(){return E}),r.d(t,"LabelBackShape",function(){return A}),r.d(t,"LabelOverLengthMode",function(){return P}),r.d(t,"DirectionType",function(){return O}),r.d(t,"OverlayOperationType",function(){return F}),r.d(t,"SupplyCenterType",function(){return I}),r.d(t,"TurnType",function(){return N}),r.d(t,"BufferEndType",function(){return R}),r.d(t,"SmoothMethod",function(){return k}),r.d(t,"SurfaceAnalystMethod",function(){return G}),r.d(t,"ColorSpaceType",function(){return J}),r.d(t,"ChartType",function(){return ee}),r.d(t,"EditType",function(){return U}),r.d(t,"TransferTactic",function(){return j}),r.d(t,"TransferPreference",function(){return V}),r.d(t,"GridType",function(){return H}),r.d(t,"ClientType",function(){return $}),r.d(t,"LayerType",function(){return z}),r.d(t,"UGCLayerType",function(){return q}),r.d(t,"StatisticMode",function(){return W}),r.d(t,"PixelFormat",function(){return Y}),r.d(t,"SearchMode",function(){return X}),r.d(t,"SummaryType",function(){return ae}),r.d(t,"InterpolationAlgorithmType",function(){return Q}),r.d(t,"VariogramMode",function(){return K}),r.d(t,"Exponent",function(){return Z}),r.d(t,"ClipAnalystMode",function(){return te}),r.d(t,"AnalystAreaUnit",function(){return re}),r.d(t,"AnalystSizeUnit",function(){return se}),r.d(t,"StatisticAnalystMode",function(){return ie}),r.d(t,"TopologyValidatorRule",function(){return ne}),r.d(t,"OutputType",function(){return D}),r.d(t,"AggregationQueryBuilderType",function(){return le}),r.d(t,"AggregationType",function(){return oe}),r.d(t,"GetFeatureMode",function(){return he}),r.d(t,"TimeFlowControl",function(){return Xe}),r.d(t,"IManager",function(){return at}),r.d(t,"IManagerServiceBase",function(){return st}),r.d(t,"IManagerCreateNodeParam",function(){return it}),r.d(t,"IPortal",function(){return ct}),r.d(t,"IPortalQueryParam",function(){return ot}),r.d(t,"IPortalResource",function(){return ht}),r.d(t,"IPortalQueryResult",function(){return lt}),r.d(t,"IPortalShareParam",function(){return ut}),r.d(t,"IPortalShareEntity",function(){return dt}),r.d(t,"IPortalServiceBase",function(){return nt}),r.d(t,"IPortalUser",function(){return St}),r.d(t,"IPortalAddResourceParam",function(){return pt}),r.d(t,"IPortalRegisterServiceParam",function(){return mt}),r.d(t,"IPortalAddDataParam",function(){return ft}),r.d(t,"IPortalDataMetaInfoParam",function(){return yt}),r.d(t,"IPortalDataStoreInfoParam",function(){return gt}),r.d(t,"IPortalDataConnectionInfoParam",function(){return vt}),r.d(t,"Online",function(){return Ga}),r.d(t,"OnlineData",function(){return ka}),r.d(t,"OnlineQueryDatasParameter",function(){return Ba}),r.d(t,"ServiceStatus",function(){return Ia}),r.d(t,"DataItemType",function(){return Na}),r.d(t,"DataItemOrderBy",function(){return Ra}),r.d(t,"FilterField",function(){return Fa}),r.d(t,"OnlineServiceBase",function(){return Da}),r.d(t,"KeyServiceParameter",function(){return Ua}),r.d(t,"SecurityManager",function(){return rt}),r.d(t,"ServerInfo",function(){return ja}),r.d(t,"TokenServiceParameter",function(){return Va}),r.d(t,"ElasticSearch",function(){return za}),r.d(t,"FetchRequest",function(){return tt}),r.d(t,"ColorsPickerUtil",function(){return Xa}),r.d(t,"ArrayStatistic",function(){return Qa}),r.d(t,"AreaSolarRadiationParameters",function(){return Mt}),r.d(t,"AggregationParameter",function(){return wt}),r.d(t,"AggQueryBuilderParameter",function(){return _t}),r.d(t,"BufferAnalystParameters",function(){return Lt}),r.d(t,"BufferDistance",function(){return Pt}),r.d(t,"BuffersAnalystJobsParameter",function(){return Vt}),r.d(t,"BufferSetting",function(){return Ot}),r.d(t,"BurstPipelineAnalystParameters",function(){return zt}),r.d(t,"ChartQueryFilterParameter",function(){return Xt}),r.d(t,"ChartQueryParameters",function(){return Qt}),r.d(t,"ClipParameter",function(){return $t}),r.d(t,"ColorDictionary",function(){return er}),r.d(t,"ComputeWeightMatrixParameters",function(){return sr}),r.d(t,"DataReturnOption",function(){return It}),r.d(t,"DatasetBufferAnalystParameters",function(){return kt}),r.d(t,"DatasetInfo",function(){return nr}),r.d(t,"DatasetOverlayAnalystParameters",function(){return lr}),r.d(t,"DatasetSurfaceAnalystParameters",function(){return cr}),r.d(t,"DatasetThiessenAnalystParameters",function(){return pr}),r.d(t,"DatasourceConnectionInfo",function(){return Rt}),r.d(t,"DensityKernelAnalystParameters",function(){return mr}),r.d(t,"EditFeaturesParameters",function(){return yr}),r.d(t,"FacilityAnalyst3DParameters",function(){return vr}),r.d(t,"FacilityAnalystSinks3DParameters",function(){return Sr}),r.d(t,"FacilityAnalystSources3DParameters",function(){return xr}),r.d(t,"FacilityAnalystStreamParameters",function(){return Tr}),r.d(t,"FacilityAnalystTracedown3DParameters",function(){return wr}),r.d(t,"FacilityAnalystTraceup3DParameters",function(){return Er}),r.d(t,"FacilityAnalystUpstream3DParameters",function(){return Pr}),r.d(t,"FieldParameters",function(){return Ir}),r.d(t,"FieldStatisticsParameters",function(){return Nr}),r.d(t,"FilterParameter",function(){return Dt}),r.d(t,"FilterAggParameter",function(){return Lr}),r.d(t,"FindClosestFacilitiesParameters",function(){return Fr}),r.d(t,"FindLocationParameters",function(){return kr}),r.d(t,"FindMTSPPathsParameters",function(){return Br}),r.d(t,"FindPathParameters",function(){return jr}),r.d(t,"FindServiceAreasParameters",function(){return Hr}),r.d(t,"FindTSPPathsParameters",function(){return zr}),r.d(t,"GenerateSpatialDataParameters",function(){return Wr}),r.d(t,"GeoBoundingBoxQueryBuilderParameter",function(){return Xr}),r.d(t,"GeoCodingParameter",function(){return xt}),r.d(t,"GeoDecodingParameter",function(){return Ct}),r.d(t,"GeoHashGridAggParameter",function(){return Qr}),r.d(t,"GeometryBufferAnalystParameters",function(){return Gt}),r.d(t,"GeometryOverlayAnalystParameters",function(){return Kr}),r.d(t,"GeometrySurfaceAnalystParameters",function(){return Zr}),r.d(t,"GeometryThiessenAnalystParameters",function(){return $r}),r.d(t,"GeoRelationAnalystParameters",function(){return ts}),r.d(t,"GetFeaturesByBoundsParameters",function(){return is}),r.d(t,"GetFeaturesByBufferParameters",function(){return os}),r.d(t,"GetFeaturesByGeometryParameters",function(){return hs}),r.d(t,"GetFeaturesByIDsParameters",function(){return cs}),r.d(t,"GetFeaturesBySQLParameters",function(){return ps}),r.d(t,"GetGridCellInfosParameters",function(){return ys}),r.d(t,"Grid",function(){return qs}),r.d(t,"Image",function(){return ln}),r.d(t,"InterpolationAnalystParameters",function(){return Qs}),r.d(t,"InterpolationIDWAnalystParameters",function(){return $s}),r.d(t,"InterpolationKrigingAnalystParameters",function(){return ei}),r.d(t,"InterpolationRBFAnalystParameters",function(){return Ks}),r.d(t,"JoinItem",function(){return Nt}),r.d(t,"KernelDensityJobParameter",function(){return ri}),r.d(t,"LabelImageCell",function(){return ai}),r.d(t,"LabelMatrixCell",function(){return ii}),r.d(t,"LabelMixedTextStyle",function(){return ws}),r.d(t,"LabelSymbolCell",function(){return ni}),r.d(t,"LabelThemeCell",function(){return oi}),r.d(t,"LayerStatus",function(){return li}),r.d(t,"LinkItem",function(){return Ft}),r.d(t,"MathExpressionAnalysisParameters",function(){return ui}),r.d(t,"MeasureParameters",function(){return di}),r.d(t,"OutputSetting",function(){return Ut}),r.d(t,"MappingParameters",function(){return jt}),r.d(t,"OverlapDisplayedOptions",function(){return Vs}),r.d(t,"OverlayAnalystParameters",function(){return or}),r.d(t,"OverlayGeoJobParameter",function(){return fi}),r.d(t,"PointWithMeasure",function(){return He}),r.d(t,"QueryByBoundsParameters",function(){return gi}),r.d(t,"QueryByDistanceParameters",function(){return bi}),r.d(t,"QueryByGeometryParameters",function(){return Ci}),r.d(t,"QueryBySQLParameters",function(){return _i}),r.d(t,"QueryParameters",function(){return Kt}),r.d(t,"Route",function(){return Je}),r.d(t,"RouteCalculateMeasureParameters",function(){return Mi}),r.d(t,"RouteLocatorParameters",function(){return Ai}),r.d(t,"ServerColor",function(){return je}),r.d(t,"ServerFeature",function(){return Oi}),r.d(t,"ServerGeometry",function(){return ze}),r.d(t,"ServerStyle",function(){return Ve}),r.d(t,"ServerTextStyle",function(){return bs}),r.d(t,"ServerTheme",function(){return zs}),r.d(t,"SetLayerInfoParameters",function(){return Li}),r.d(t,"SetLayersInfoParameters",function(){return Ni}),r.d(t,"SetLayerStatusParameters",function(){return Fi}),r.d(t,"SingleObjectQueryJobsParameter",function(){return ki}),r.d(t,"StopQueryParameters",function(){return Bi}),r.d(t,"SummaryAttributesJobsParameter",function(){return ji}),r.d(t,"SummaryMeshJobParameter",function(){return Hi}),r.d(t,"SummaryRegionJobParameter",function(){return zi}),r.d(t,"SupplyCenter",function(){return Wi}),r.d(t,"SurfaceAnalystParameters",function(){return ur}),r.d(t,"SurfaceAnalystParametersSetting",function(){return hr}),r.d(t,"TerrainCurvatureCalculationParameters",function(){return Xi}),r.d(t,"CommonTheme",function(){return Ss}),r.d(t,"ThemeDotDensity",function(){return Ds}),r.d(t,"ThemeFlow",function(){return Ts}),r.d(t,"ThemeGraduatedSymbol",function(){return Gs}),r.d(t,"ThemeGraduatedSymbolStyle",function(){return ks}),r.d(t,"ThemeGraph",function(){return Fs}),r.d(t,"ThemeGraphAxes",function(){return Ls}),r.d(t,"ThemeGraphItem",function(){return Rs}),r.d(t,"ThemeGraphSize",function(){return Is}),r.d(t,"ThemeGraphText",function(){return Ns}),r.d(t,"ThemeGridRange",function(){return Zi}),r.d(t,"ThemeGridRangeItem",function(){return Ki}),r.d(t,"ThemeGridUnique",function(){return ea}),r.d(t,"ThemeGridUniqueItem",function(){return $i}),r.d(t,"ThemeLabel",function(){return Ps}),r.d(t,"ThemeLabelAlongLine",function(){return Es}),r.d(t,"ThemeLabelBackground",function(){return As}),r.d(t,"ThemeLabelItem",function(){return xs}),r.d(t,"ThemeLabelText",function(){return Ms}),r.d(t,"ThemeLabelUniqueItem",function(){return ta}),r.d(t,"ThemeMemoryData",function(){return vs}),r.d(t,"ThemeOffset",function(){return _s}),r.d(t,"ThemeParameters",function(){return ra}),r.d(t,"ThemeRange",function(){return Us}),r.d(t,"ThemeRangeItem",function(){return Bs}),r.d(t,"ThemeUnique",function(){return Os}),r.d(t,"ThemeUniqueItem",function(){return Cs}),r.d(t,"ThiessenAnalystParameters",function(){return dr}),r.d(t,"TopologyValidatorJobsParameter",function(){return oa}),r.d(t,"TransferLine",function(){return ha}),r.d(t,"TransferPathParameters",function(){return ua}),r.d(t,"TransferSolutionParameters",function(){return da}),r.d(t,"TransportationAnalystParameter",function(){return rr}),r.d(t,"TransportationAnalystResultSetting",function(){return tr}),r.d(t,"UGCLayer",function(){return js}),r.d(t,"UGCMapLayer",function(){return Hs}),r.d(t,"UGCSubLayer",function(){return Js}),r.d(t,"UpdateEdgeWeightParameters",function(){return ma}),r.d(t,"UpdateTurnNodeWeightParameters",function(){return ya}),r.d(t,"Vector",function(){return Ys}),r.d(t,"VectorClipJobsParameter",function(){return va}),r.d(t,"FileTypes",function(){return jn}),r.d(t,"FileConfig",function(){return Vn}),r.d(t,"FileModel",function(){return Hn}),r.d(t,"MessageBox",function(){return Jn}),r.d(t,"CommonContainer",function(){return eo}),r.d(t,"DropDownBox",function(){return ro}),r.d(t,"Select",function(){return to}),r.d(t,"AttributesPopContainer",function(){return io}),r.d(t,"PopContainer",function(){return so}),r.d(t,"IndexTabsPageContainer",function(){return ao}),r.d(t,"CityTabsPage",function(){return no}),r.d(t,"NavTabsPage",function(){return oo}),r.d(t,"PaginationContainer",function(){return lo}),r.d(t,"ComponentsUtil",function(){return ho}),r.d(t,"FileReaderUtil",function(){return Qn});var s=r(16),i=r.n(s); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class a extends i.a{constructor(e,t){super(e,t),this.options=t||{},this.url=e,this.dispatchEvent({type:"initialized",value:this})}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var n=window.SuperMap=window.SuperMap||{};n.Components=window.SuperMap.Components||{}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var o=n.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},l=n.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},h=n.GeometryType={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"},u=n.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},c=n.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},d=n.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"},p=n.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},m=n.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"},f=n.Unit={METER:"METER",KILOMETER:"KILOMETER",MILE:"MILE",YARD:"YARD",DEGREE:"DEGREE",MILLIMETER:"MILLIMETER",CENTIMETER:"CENTIMETER",INCH:"INCH",DECIMETER:"DECIMETER",FOOT:"FOOT",SECOND:"SECOND",MINUTE:"MINUTE",RADIAN:"RADIAN"},y=n.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},g=n.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},v=n.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"},S=n.ThemeGraphType={AREA:"AREA",BAR:"BAR",BAR3D:"BAR3D",LINE:"LINE",PIE:"PIE",PIE3D:"PIE3D",POINT:"POINT",RING:"RING",ROSE:"ROSE",ROSE3D:"ROSE3D",STACK_BAR:"STACK_BAR",STACK_BAR3D:"STACK_BAR3D",STEP:"STEP"},b=n.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},x=n.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},C=n.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},T=n.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},_=n.ColorGradientType={BLACK_WHITE:"BLACKWHITE",BLUE_BLACK:"BLUEBLACK",BLUE_RED:"BLUERED",BLUE_WHITE:"BLUEWHITE",CYAN_BLACK:"CYANBLACK",CYAN_BLUE:"CYANBLUE",CYAN_GREEN:"CYANGREEN",CYAN_WHITE:"CYANWHITE",GREEN_BLACK:"GREENBLACK",GREEN_BLUE:"GREENBLUE",GREEN_ORANGE_VIOLET:"GREENORANGEVIOLET",GREEN_RED:"GREENRED",GREEN_WHITE:"GREENWHITE",PINK_BLACK:"PINKBLACK",PINK_BLUE:"PINKBLUE",PINK_RED:"PINKRED",PINK_WHITE:"PINKWHITE",RAIN_BOW:"RAINBOW",RED_BLACK:"REDBLACK",RED_WHITE:"REDWHITE",SPECTRUM:"SPECTRUM",TERRAIN:"TERRAIN",YELLOW_BLACK:"YELLOWBLACK",YELLOW_BLUE:"YELLOWBLUE",YELLOW_GREEN:"YELLOWGREEN",YELLOW_RED:"YELLOWRED",YELLOW_WHITE:"YELLOWWHITE"},w=n.TextAlignment={TOPLEFT:"TOPLEFT",TOPCENTER:"TOPCENTER",TOPRIGHT:"TOPRIGHT",BASELINELEFT:"BASELINELEFT",BASELINECENTER:"BASELINECENTER",BASELINERIGHT:"BASELINERIGHT",BOTTOMLEFT:"BOTTOMLEFT",BOTTOMCENTER:"BOTTOMCENTER",BOTTOMRIGHT:"BOTTOMRIGHT",MIDDLELEFT:"MIDDLELEFT",MIDDLECENTER:"MIDDLECENTER",MIDDLERIGHT:"MIDDLERIGHT"},M=n.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},E=n.AlongLineDirection={NORMAL:"ALONG_LINE_NORMAL",LB_TO_RT:"LEFT_BOTTOM_TO_RIGHT_TOP",LT_TO_RB:"LEFT_TOP_TO_RIGHT_BOTTOM",RB_TO_LT:"RIGHT_BOTTOM_TO_LEFT_TOP",RT_TO_LB:"RIGHT_TOP_TO_LEFT_BOTTOM"},A=n.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},P=n.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},O=n.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},L=n.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},I=n.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},N=n.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},R=n.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"},F=n.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},D=n.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},k=n.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},G=n.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},B=n.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},U=n.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},j=n.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},V=n.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},H=n.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},J=n.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},z=n.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},q=n.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},W=n.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},Y=n.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},X=n.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},Q=n.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},K=n.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"},Z=n.Exponent={EXP1:"EXP1",EXP2:"EXP2"},$=n.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},ee=n.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},te=n.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"},re=n.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},se=n.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},ie=n.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},ae=n.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},ne=n.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},oe=n.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},le=n.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},he=n.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},ue=n.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"};n.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},n.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},n.OrderType={ASC:"ASC",DESC:"DESC"},n.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},n.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},n.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},n.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},n.DataItemType={WORKSPACE:"WORKSPACE",UDB:"UDB",SHP:"SHP",EXCEL:"EXCEL",CSV:"CSV",GEOJSON:"GEOJSON",SMTILES:"SMTILES",SVTILES:"SVTILES",MBTILES:"MBTILES",TPK:"TPK",UGCV5:"UGCV5",UGCV5_MVT:"UGCV5_MVT",JSON:"JSON"},n.WebExportFormatType={PNG:"PNG",PDF:"PDF"},n.WebScaleOrientationType={HORIZONTALLABELSBELOW:"HORIZONTALLABELSBELOW",HORIZONTALLABELSABOVE:"HORIZONTALLABELSABOVE",VERTICALLABELSLEFT:"VERTICALLABELSLEFT",VERTICALLABELSRIGHT:"VERTICALLABELSRIGHT"},n.WebScaleType={LINE:"LINE",BAR:"BAR",BAR_SUB:"BAR_SUB"},n.WebScaleUnit={METER:"METER",FOOT:"FOOT",DEGREES:"DEGREES"}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ce{constructor(e,t){this.w=e?parseFloat(e):0,this.h=e?parseFloat(t):0,this.CLASS_NAME="SuperMap.Size"}toString(){return"w="+this.w+",h="+this.h}clone(){return new ce(this.w,this.h)}equals(e){var t=!1;return null!=e&&(t=this.w===e.w&&this.h===e.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(e.w)&&isNaN(e.h)),t}destroy(){this.w=null,this.h=null}}n.Size=ce; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class de{constructor(e,t,r){this.x=e?parseFloat(e):0,this.y=t?parseFloat(t):0,this.mode=r,this.CLASS_NAME="SuperMap.Pixel",n.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new de(this.x,this.y,this.mode)}equals(e){var t=!1;return null!=e&&(t=this.x==e.x&&this.y==e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}add(e,t){if(null==e||null==t)throw new TypeError("Pixel.add cannot receive null values");return new de(this.x+e,this.y+t)}offset(e){var t=this.clone();return e&&(t=this.add(e.x,e.y)),t}destroy(){this.x=null,this.y=null,this.mode=null}}n.Pixel=de, /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ n.inherit=function(e,t){var r,s,i,a=function(){};for(a.prototype=t.prototype,e.prototype=new a,r=2,s=arguments.length;r0&&(r=parseFloat(e.toPrecision(t))),r},format:function(e,t,r,s){t=void 0!==t?t:0,r=void 0!==r?r:n.Number.thousandsSeparator,s=void 0!==s?s:n.Number.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var i=e.toString().split(".");1===i.length&&null==t&&(t=0);var a,o=i[0];if(r)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(o);)o=o.replace(l,"$1"+r+"$2");if(0==t)a=o;else{var h=i.length>1?i[1]:"0";null!=t&&(h+=new Array(t-h.length+1).join("0")),a=o+s+h}return a}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return me.limitSigDigs(this,e)});var fe,ye,ge,ve=n.Function={bind:function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var s=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,s)}},bindAsEventListener:function(e,t){return function(r){return e.call(t,r||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},Se=(n.Array={filter:function(e,t,r){var s=[];if(Array.prototype.filter)s=e.filter(t,r);else{var i=e.length;if("function"!=typeof t)throw new TypeError;for(var a=0;a=0;r--)e[r]===t&&e.splice(r,1);return e},n.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var r=0,s=e.length;r=0&&parseFloat(o)<1?(e.style.filter="alpha(opacity="+100*o+")",e.style.opacity=o):1===parseFloat(o)&&(e.style.filter="",e.style.opacity="")},n.Util.applyDefaults=function(e,t){e=e||{};var r="function"==typeof window.Event&&t instanceof window.Event;for(var s in t)(void 0===e[s]||!r&&t.hasOwnProperty&&t.hasOwnProperty(s)&&!e.hasOwnProperty(s))&&(e[s]=t[s]);return!r&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},n.Util.getParameterString=function(e){var t=[];for(var r in e){var s,i=e[r];if(null!=i&&"function"!=typeof i)s=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(r)+"="+s)}return t.join("&")},n.Util.urlAppend=function(e,t){var r=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var s=(e+" ").split(/[?&]/);r+=" "===s.pop()?t:s.length?"&"+t:"?"+t}return r},n.Util.urlPathAppend=function(e,t){let r=e;if(!t)return r;0===t.indexOf("/")&&(t=t.substring(1));const s=e.split("?");return s[0].indexOf("/",s[0].length-1)<0&&(s[0]+="/"),r=`${s[0]}${t}${s.length>1?`?${s[1]}`:""}`},n.Util.DEFAULT_PRECISION=14,n.Util.toFloat=function(e,t){return null==t&&(t=n.Util.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},n.Util.rad=function(e){return e*Math.PI/180},n.Util.getParameters=function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(n.String.contains(e,"?")){var r=e.indexOf("?")+1,s=n.String.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(r,s)}for(var i={},a=t.split(/[&;]/),o=0,l=a.length;o1?1/e:e},n.Util.getResolutionFromScale=function(e,t){var r;e&&(null==t&&(t="degrees"),r=1/(n.Util.normalizeScale(e)*n.INCHES_PER_UNIT[t]*n.DOTS_PER_INCH));return r},n.Util.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*n.INCHES_PER_UNIT[t]*n.DOTS_PER_INCH},n.IS_GECKO=-1===(fe=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==fe.indexOf("gecko"),n.Browser=function(){var e,t="",r="",s="pc",i=navigator.userAgent.toLowerCase();return i.indexOf("msie")>-1||i.indexOf("trident")>-1&&i.indexOf("rv")>-1?(t="msie",e=i.match(/msie ([\d.]+)/)||i.match(/rv:([\d.]+)/)):i.indexOf("chrome")>-1?(t="chrome",e=i.match(/chrome\/([\d.]+)/)):i.indexOf("firefox")>-1?(t="firefox",e=i.match(/firefox\/([\d.]+)/)):i.indexOf("opera")>-1?(t="opera",e=i.match(/version\/([\d.]+)/)):i.indexOf("safari")>-1&&(t="safari",e=i.match(/version\/([\d.]+)/)),r=e?e[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?s="apple":i.indexOf("android")>-1&&(r=(e=i.match(/version\/([\d.]+)/))?e[1]:"",s="android"),{name:t,version:r,device:s}}(),n.Util.getBrowser=function(){return n.Browser},n.Util.isSupportCanvas=(ye=!0,ge=n.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===ge.name&&parseFloat(ge.version)<5&&(ye=!1),"safari"===ge.name&&parseFloat(ge.version)<4&&(ye=!1),"opera"===ge.name&&parseFloat(ge.version)<10&&(ye=!1),"msie"===ge.name&&parseFloat(ge.version)<9&&(ye=!1)):ye=!1,ye),n.Util.supportCanvas=function(){return n.Util.isSupportCanvas},n.INCHES_PER_UNIT.degree=n.INCHES_PER_UNIT.dd,n.INCHES_PER_UNIT.meter=n.INCHES_PER_UNIT.m,n.INCHES_PER_UNIT.foot=n.INCHES_PER_UNIT.ft,n.INCHES_PER_UNIT.inch=n.INCHES_PER_UNIT.inches,n.INCHES_PER_UNIT.mile=n.INCHES_PER_UNIT.mi,n.INCHES_PER_UNIT.kilometer=n.INCHES_PER_UNIT.km,n.INCHES_PER_UNIT.yard=n.INCHES_PER_UNIT.yd,n.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),s=r.indexOf("//");if(-1===t)return!0;var i,a=i=e.substring(0,t),n=r.substring(s+2);s=n.indexOf("/");var o=n.indexOf(":"),l=n.substring(0,s),h=document.location.protocol;if(-1!==o||(l+=":"+("http:"===h.toLowerCase()?80:443)),h.toLowerCase()!==a.toLowerCase())return!1;var u=(a=e.substring(t+2)).indexOf(":");t=a.indexOf("/");var c,d=a.substring(0,t);return-1!==u?c=a.substring(0,u):(c=a.substring(0,t),d+=":"+("http:"===i.toLowerCase()?80:443)),c===document.domain&&d===l},n.Util.calculateDpi=function(e,t,r,s,i){if(e&&t&&r){var a,n=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(i=i||6378137,"degree"===(s=s||"degrees").toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()){let e=n/l,t=o/h;a=254/(e>t?e:t)/r/(2*Math.PI*i/360)/1e4}else{a=254/(n/l)/r/1e4}return a}},n.Util.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r=[],s=0,i=t.length;s0?"{"+e.join(",")+"}":"{}"}return t.toString()}},n.Util.getResolutionFromScaleDpi=function(e,t,r,s){return s=s||6378137,r=r||"",e>0&&t>0?(e=n.Util.normalizeScale(e),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*s/360)/1e4:254/t/e/1e4):-1},n.Util.getScaleFromResolutionDpi=function(e,t,r,s){return s=s||6378137,r=r||"",e>0&&t>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*s/360)/1e4:254/t/e/1e4:-1},n.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},n.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var r in t){var s=t[r];void 0!==s&&"CLASS_NAME"!==r&&"function"!=typeof s&&(e[r]=s)}return e},n.Util.copyAttributesWithClip=function(e,t,r){if(e=e||{},t)for(var s in t){var i=!1;if(r&&r.length)for(var a=0,n=r.length;a=0&&a<=1&&i<=1&&a>=0?new n.Geometry.Point(e.x+i*(t.x-e.x),e.y+i*(t.y-e.y)):"No Intersection";else if(0==l&&0==h){var c=Math.max(e.y,t.y),d=Math.min(e.y,t.y),p=Math.max(e.x,t.x),m=Math.min(e.x,t.x);o=(r.y>=d&&r.y<=c||s.y>=d&&s.y<=c)&&r.x>=m&&r.x<=p||s.x>=m&&s.x<=p?"Coincident":"Parallel"}else o="Parallel";return o},n.Util.getTextBounds=function(e,t,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",e.fontSize&&(r.style.fontSize=e.fontSize),e.fontFamily&&(r.style.fontFamily=e.fontFamily),e.fontWeight&&(r.style.fontWeight=e.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=t;var s=r.clientWidth,i=r.clientHeight;return document.body.removeChild(r),{textWidth:s,textHeight:i}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class be{constructor(e,t){Se.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?Se.toFloat(e):0,this.lat=t?Se.toFloat(t):0,this.CLASS_NAME="SuperMap.LonLat"}toString(){return"lon="+this.lon+",lat="+this.lat}toShortString(){return this.lon+","+this.lat}clone(){return new be(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new be(this.lon+Se.toFloat(e),this.lat+Se.toFloat(t))}equals(e){var t=!1;return null!=e&&(t=this.lon===e.lon&&this.lat===e.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(e.lon)&&isNaN(e.lat)),t}wrapDateLine(e){var t=this.clone();if(e){for(;t.lone.right;)t.lon-=e.getWidth()}return t}destroy(){this.lon=null,this.lat=null}static fromString(e){var t=e.split(",");return new be(t[0],t[1])}static fromArray(e){var t=Se.isArray(e),r=t&&e[0],s=t&&e[1];return new be(r,s)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class xe{constructor(e,t,r,s){Se.isArray(e)&&(s=e[3],r=e[2],t=e[1],e=e[0]),this.left=null!=e?Se.toFloat(e):this.left,this.bottom=null!=t?Se.toFloat(t):this.bottom,this.right=null!=r?Se.toFloat(r):this.right,this.top=null!=s?Se.toFloat(s):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new xe(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var r=Math.pow(10,e),s=Math.round(this.left*r)/r,i=Math.round(this.bottom*r)/r,a=Math.round(this.right*r)/r,n=Math.round(this.top*r)/r;return!0===t?i+","+s+","+n+","+a:s+","+i+","+a+","+n}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new ce(this.getWidth(),this.getHeight())}getCenterPixel(){return new de((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new be((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var r,s;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(r=t.lon,s=t.lat):(r=t.x,s=t.y);var i=(this.left-r)*e+r,a=(this.bottom-s)*e+s,n=(this.right-r)*e+r,o=(this.top-s)*e+s;return new xe(i,a,n,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new xe(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new xe(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new xe(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.leftthis.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var r=this.contains(e.lon,e.lat,t.inclusive),s=t.worldBounds;if(s&&!r){var i=s.getWidth(),a=(s.left+s.right)/2,n=Math.round((e.lon-a)/i);r=this.containsLonLat({lon:e.lon-n*i,lat:e.lat},{inclusive:t.inclusive})}return r}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,r){if(null==r&&(r=!0),null==e||null==t)return!1;return r?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&ethis.bottom&&t=r.bottom&&e.bottom<=r.top||r.bottom>=e.bottom&&r.bottom<=e.top,n=e.top>=r.bottom&&e.top<=r.top||r.top>e.bottom&&r.top=r.left&&e.left<=r.right||r.left>=e.left&&r.left<=e.right,l=e.right>=r.left&&e.right<=r.right||r.right>=e.left&&r.right<=e.right;s=(a||n)&&(o||l)}if(t.worldBounds&&!s){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(r),d=!h.containsBounds(e);c&&!d?(e=e.add(-u,0),s=r.intersectsBounds(e,{inclusive:t.inclusive})):d&&!c&&(r=r.add(-u,0),s=e.intersectsBounds(r,{inclusive:t.inclusive}))}return s}containsBounds(e,t,r){null==t&&(t=!1),null==r&&(r=!0);var s=this.contains(e.left,e.bottom,r),i=this.contains(e.right,e.bottom,r),a=this.contains(e.left,e.top,r),n=this.contains(e.right,e.top,r);return t?s||i||a||n:s&&i&&a&&n}determineQuadrant(e){var t="",r=this.getCenterLonLat();return t+=e.lat=e.right&&i.right>e.right;)i=i.add(-a,0);var n=i.left+r;ne.left&&i.right-s>e.right&&(i=i.add(-a,0))}return i}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var r=e.split(",");return xe.fromArray(r,t)}static fromArray(e,t){return!0===t?new xe(e[1],e[0],e[3],e[2]):new xe(e[0],e[1],e[2],e[3])}static fromSize(e){return new xe(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}n.Bounds=xe; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ce{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=Se.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 Ce}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}}n.Geometry=Ce; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Te extends Ce{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new Te,t=0,r=this.components.length;t-1)){if(null!=t&&t=0;--r)t=this.removeComponent(e[r])||t;return t}removeComponent(e){return Se.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,r=this.components.length;t2;return t&&super.removeComponent.apply(this,arguments),t}getSortedSegments(){for(var e,t,r=this.components.length-1,s=new Array(r),i=0;i=1?1:g)<=-1?-1:g,u=180*Math.acos(g)/Math.PI,n=(u=i.x==r.x?t.x>r.x&&s.x>r.x||t.xd*t.x+p&&s.y>d*s.x+p||t.yr.y?s.xr.x&&(o=!1):i.xd*s.x+p&&(o=!1):i.x>r.x?s.y>r.y&&(o=!1):s.y=0?180*Math.atan(v)/Math.PI:Math.abs(180*Math.atan(v)/Math.PI)+90,b=Math.abs(t.y);r.y==b&&b==i.y&&r.x=0?v>=0?h+=l:h=180-(h-90)+l:h=v>0?h-180+l:90-h+l:x>=0?v>=0?h-=l:h=180-(h-90)-l:h=v>=0?h-180-l:90-h-l,h=h*Math.PI/180;var T=t.x+a*Math.cos(h),_=t.y+a*Math.sin(h);c.push(new Me(T,_))}c.push(i)}return c}static createLineEPS(e){var t=[],r=e.length;if(r<2)return e;for(var s=0;s1&&(r=parseFloat(r)*h),s.labelAlign&&"cm"!==s.labelAlign)switch(s.labelAlign){case"lt":l.x+=t/2,l.y+=r/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=r/2;break;case"ct":l.y+=r/2;break;case"cb":l.y-=r/2;break;case"rt":l.x-=t/2,l.y+=r/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=r/2}return this.bsInfo.h=r,this.bsInfo.w=t,i=l.x-parseFloat(t)/2,a=l.y+parseFloat(r)/2,o=l.x+parseFloat(t)/2,n=l.y-parseFloat(r)/2,new xe(i,a,o,n)}getLabelPxBoundsByText(e,t){var r,s,i,a,n=this.getLabelPxSize(t),o=Se.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":o.x+=n.w/2,o.y+=n.h/2;break;case"lm":o.x+=n.w/2;break;case"lb":o.x+=n.w/2,o.y-=n.h/2;break;case"ct":o.y+=n.h/2;break;case"cb":o.y-=n.h/2;break;case"rt":o.x-=n.w/2,o.y+=n.h/2;break;case"rm":o.x-=n.w/2;break;case"rb":o.x-=n.w/2,o.y-=n.h/2}return this.bsInfo.h=n.h,this.bsInfo.w=n.w,r=o.x-n.w/2,s=o.y+n.h/2,a=t.fontStyle&&"italic"===t.fontStyle?o.x+n.w/2+parseInt(parseFloat(t.fontSize)/2):o.x+n.w/2,i=o.y-n.h/2,new xe(r,s,a,i)}getLabelPxSize(e){var t,r,s,i,a=parseFloat(e.strokeWidth);t=e.label||this.text,r=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var n=t.split("\n"),o=n.length;i=o>1?r*o+o+a+.2*r:r+a+.2*r+1,s=0,this.labelWTmp&&s255?r++:s++;return t.cnC=r,t.enC=s,t.textC=e.length,t}}n.Geometry.GeoText=Ae; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Pe extends Ee{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var r=!1,s=this.components.pop();null==t&&e.equals(s)||(r=super.addComponent.apply(this,arguments));var i=this.components[0];return super.addComponent.apply(this,[i]),r}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var r=this.components[0];super.addComponent.apply(this,[r])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,r=0,s=this.components.length;r0){e+=Math.abs(this.components[0].getArea());for(var t=1,r=this.components.length;t1},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 r=n.Event.element(e);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=t.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,r,s){var i=Se.getElement(e);if(s=s||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!i._eventCacheID){var a="eventCacheID_";i.id&&(a=i.id+"_"+a),i._eventCacheID=Se.createUniqueID(a)}var n=i._eventCacheID;this.observers[n]||(this.observers[n]=[]),this.observers[n].push({element:i,name:t,observer:r,useCapture:s}),i.addEventListener?"mousewheel"===t?i.addEventListener(t,r,{useCapture:s,passive:!1}):i.addEventListener(t,r,s):i.attachEvent&&i.attachEvent("on"+t,r)},stopObservingElement:function(e){var t=Se.getElement(e)._eventCacheID;this._removeElementObservers(n.Event.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var r=e[t],s=new Array(r.element,r.name,r.observer,r.useCapture);n.Event.stopObserving.apply(this,s)}},stopObserving:function(e,t,r,s){s=s||!1;var i=Se.getElement(e),a=i._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.detachEvent)&&(t="keydown");var o=!1,l=n.Event.observers[a];if(l)for(var h=0;!o&&h0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,r){var s=t[r];return s||(s=r.charCodeAt(),"\\u00"+Math.floor(s/16).toString(16)+(s%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var r;if(this.nativeJSON)try{r=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=r),r}write(e,t){this.pretty=!!t;var r=null,s=typeof e;if(this.serialize[s])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[s].apply(this,[e])}catch(e){}return r}writeIndent(){var e=[];if(this.pretty)for(var t=0;t0){e+='"points":[';for(var r=0,s=this.components.length;r0))return null;for(var a=0,n=0,o=[];a0){if(1===r)return new Me(t[0].x,t[0].y);var s=[];for(let e=0;e0){if(1===r){let r=[];for(let s=0;s0){if(1===o){for(e=0,r=[];e=0;t--)if(d[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(d[e]=t);break}for(let e=0;e0?i.push(l[e]):(i[d[e]].components=i[d[e]].components.concat(l[e].components),i.push(""))}else{i=new Array;for(let e=0;e0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(n),n=[]),i.push(l[e])),e==s-1){var p=i.length;if(p)i[p-1].components=i[p-1].components.concat(n);else for(let e=0,t=n.length;e=0;t--)if(m[e]=-1,c[t].containsBounds(c[e])){d[e]=-1*d[t],d[e]<0&&(m[e]=t);break}for(let e=0;e0?a.push(u[e]):(a[m[e]].components=a[m[e]].components.concat(u[e].components),a.push(""))}else{a=new Array;for(let e=0;e0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(l),l=[]),a.push(u[e])),e==s-1){var f=a.length;if(f)a[f-1].components=a[f-1].components.concat(l);else for(let e=0,t=l.length;ee[a]){var n=e[a];e[a]=e[i],e[i]=n;var o=t[a];if(t[a]=t[i],t[i]=o,r&&r.length>0){var l=r[a];r[a]=r[i],r[i]=l}if(s&&s.length>0){var h=s[a];s[a]=s[i],s[i]=h}}}}n.ServerGeometry=ze; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class qe extends Ue{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Me(e[0],e[1])},multipoint:function(e){for(var t=[],r=null,s=0,i=e.length;sthis._toiSevrerFeature(e)):this._toiSevrerFeature(s)}toGeoJSON(e){var t={type:null};if(Se.isArray(e)){t.type="FeatureCollection";var r=e.length;t.features=new Array(r);for(var s=0;s-1||(t[s]=e[s]);return t}}n.Format.GeoJSON=qe;n.Format.WKT= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends Be{constructor(e){super(e),this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},this.CLASS_NAME="SuperMap.Format.WKT",this.extract={point:function(e){return e.x+" "+e.y},multipoint(e){for(var t=[],r=0,s=e.components.length;r0&&i.push(","),r=t[a].geometry,i.push(this.extractGeometry(r));return s&&i.push(")"),i.join("")}extractGeometry(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var We="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAdCAYAAAAjHtusAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozYWZlOGIwMi01MWE3LTRiZjYtYWVkYS05MGQ2ZTQ4YjZiMmUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg0NkFBQUE3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg0NkFBQTk3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4MWI3NzdhNC1lZmEyLTQ1MzUtOGQzNi03MmRjNDkyODMzN2UiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjYTYzODVjMi1jNDQ1LTExN2EtYTc0ZC1lM2I5MzJlMGE4Y2QiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5q1HM0AAAF/ElEQVR42tSabYhUVRjHZ7W01C1uaCRW4F3oi9SXCUnwQ9gsGUFvOEtQH1bLu5VS9sbYh5KicjYt29qiGQwVg2xWWKgocob91AvC+CWsoJqB3qHMSdTMpZyeU/+Df07n3pk7997Z6cBv99z7nHvOvf/z/pxJNZvNVI/jCKXmv6EquAmVkxPSlvtp2GItr0/96fFQForChJAWDiVYTkMYMu4XBFcYjLOwWS3sNwmn8NGzZ0h4Flv/zwIdchAnh/slCGmmKUNIBzYPaXOUr0vPuEjD71JAPh7l61embzinhV3V8nnCGmGT8LwlzSL8/yUh4Tfjo9T/CgnCIYNKycA2Qq21AcHU/VHE80Idoo3Qs0W6p0UtUnkZvEMDeVcCyqxEafF7hL8Qf0oYsIj+lfC9cH1CwhchWAGCtZO+AooQOkdC1Km1VtCb63StW73uFSzgKFUkNwBbmZGGmqowhvg8ZNpH9oXChcIcYRdeNomgxLkaH+S1SGubAxyIpFv+Zp+0DYjrAS00j/dem2VGEl6FJ4Qa4quEu8j2hTCJ+GJhe4JjfQMf6JCYPPbysMPxBlp0BUKOogEF9Rg9/heNvNKYfM0KsZUZaYxX4STGrzJa+zbhPeFH2DcK10KItcI+pI0rVElwXl1ULaKnIJhDw0oRQpTQc1zcbwRU8ATy4DR6yMlTzwkqMziEWHvubJ4Nk4ZtHdnqwvwY17xq3Z4FjrG+z2Kdrdf2ZSGD+xlLPh6t1R0jP9fI22ZzKI92yvQl7EbmBxI4S7Y+vIAOL87QZqsc5uNnssxZIcfYjXT9snCR7jjobidp+FkxA2v+Cq1QervMDmp4P7Xs3YZtE9kOC3P/By6JGaETl8ElwueYTNTDq4UDsKnd7YfCNbT239LF1udS72xYJt1UWxNfN4IIP4bWuTpEja01JtMFZFsm/AHbtHBlDE6yasA4moYTrUbvdBTXHqUrAH4uSadbyzF+vbBM2IsNkS3MNa5305JxqfA02T4TnkX8XOH1mPw8ruVejpxbI9hZD2Cz1U7LdrrUvjP/WfZinNZhr6V27hP+FPZh9aLvLxVO4DllX0G2OcKnlO/DCblxaz6uXBtmi+8mBaP3/SP8IuEIiTRoPPQm2TaEmEyXo0JU+F0YiPFD0hhOsiE/vqeEVwyTgF8L51OilcIZ2I4Ll5NttvAJPfukUeB2sk0ZPSbKIUUJpCII7+DasWy08uhNNazT0wGHI7mAtB7KqMKm38HhDdAUibTVKGicbB8YAqrJ9DRsp43JdB4qUof1HQrPE6XTQWu3Ce/inVzjXhXpMiTwUYugNVQ+p80jrUsV5EH0POKeuXO9QjhFq5GryNYvfEMCDhsftYVsB9ETtG0V9ZjfhCURhbcJFpfwVZ9jvhxsLHwTYtp2svlWQw3vXL8UnqHVSIG8l8ex+tHhBXgjddgqHEZ8ufAA2aaEnYgrF/KrPXrEmMUqZ9THLW06xhoBaVueQpkug+ewOUphE3Qv2Q5gGamXYa+QbVq4O+DQ5FHyZqrjxNt7UHh9uuRa0F7HjCF8o9PCTOGnscM7g2u1Hl9C9oeEnxC/1ajZg8JLiM9Hj9GHJseMShwL2DO0G5yEWn3Zh1QUods5CPkIoqlwAZxhXMsb6HrcEPBxchhdJ6wj29vCW4hfLOzo8J3rltYX50nXQAATSf/K4DEaGlTLvplsk/QCpoD60EQ7gLYZc8H9wq+I3yncEOEcNhuz6HWf3XEiwU/4Y8YEqVp2P10rt+8REvBGw026i4aDcbL9jF8r8Blmf4fCOzhViiscskygXRdehf3CO4hfigmTBXyQrl8TFtD1IzQX3CbcQrY3hPcRv4z8OmHPXwchVNln2MmE7BX6VwIFi/he6uxvb6JM3m0fdqvx/ATidxg2JeC7VDErAw5NzGfvwRJVheEIQ8Mg/pdwIM+UOmi9Q8ivCsrIy0tF+wVbEcLrd3Pb2XisEb4Tdlhsi4WP4RBbaLGrHfC3PrvMIezy9rTpGm5lz9LOMG15xvFxD/j5gjzjjDbMOzk+9zzt3v5bgAEAibzFeFHVgYkAAAAASUVORK5CYII="; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Ye{constructor(e){var t=this;e=e||{},this.speed=e.speed&&e.speed>=0?e.speed:1,this.frequency=e.speed&&e.frequency>=0?e.frequency:1e3,this.startTime=e.startTime&&null!=e.startTime?e.startTime:0,this.endTime=e.endTime&&null!=e.endTime&&e.endTime>=t.startTime?e.endTime:+new Date,this.repeat=void 0===e.repeat||e.repeat,this.reverse=void 0!==e.reverse&&e.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],t.events=new De(this,null,this.EVENT_TYPES),t.speed=Number(t.speed),t.frequency=Number(t.frequency),t.startTime=Number(t.startTime),t.endTime=Number(t.endTime),t.startTime=Date.parse(new Date(t.startTime)),t.endTime=Date.parse(new Date(t.endTime)),t.currentTime=t.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}updateOptions(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}start(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}pause(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}stop(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}toggle(){this.running?this.pause():this.start()}setSpeed(e){return e>=0&&(this.speed=e,!0)}getSpeed(){return this.speed}setFrequency(e){return e>=0&&(this.frequency=e,!0)}getFrequency(){return this.frequency}setStartTime(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}getEndTime(){return this.endTime}setCurrentTime(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}getCurrentTime(){return this.currentTime}setRepeat(e){this.repeat=e}getRepeat(){return this.repeat}setReverse(e){this.reverse=e}getReverse(){return this.reverse}getRunning(){return this.running}destroy(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}tick(){}}n.TimeControlBase=Ye; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Xe extends Ye{constructor(e,t){super(t);var r=this;r.callback=e,Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),r=this,s=function(){},i=function(){return r.apply(this instanceof s&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return s.prototype=this.prototype,i.prototype=new s,i}),r.update=r.update.bind(r),r.oldTime=r.currentTime,r.CLASS_NAME="SuperMap.TimeFlowControl"}updateOptions(e){e=e||{},super.updateOptions(e)}start(){var e=this;e.running||(e.running=!0,e.reverse?e.currentTime===e.startTime&&(e.oldTime=e.endTime,e.currentTime=e.oldTime):e.oldTime===e.endTime&&(e.currentTime=e.startTime,e.oldTime=e.currentTime),e.tick())}stop(){super.stop();var e=this;e.oldTime=e.currentTime,e.running&&(e.running=!1),e.intervalId&&window.clearTimeout(e.intervalId)}destroy(){super.destroy();this.oldTime=null,this.callback=null}tick(){var e=this;e.intervalId&&window.clearInterval(e.intervalId),e.intervalId=null,e.update(),e.intervalId=window.setInterval(e.update,e.frequency)}update(){var e=this;if(e.running)if(e.callback&&e.callback(e.currentTime),e.reverse){if(e.currentTime===e.startTime){if(!e.repeat)return e.running=!1,null;e.oldTime=e.endTime,e.currentTime=e.oldTime}else e.currentTime=e.oldTime,e.oldTime-=e.speed;e.oldTime<=e.startTime&&(e.oldTime=e.startTime)}else{if(e.currentTime===e.endTime){if(!e.repeat)return e.running=!1,e.stop(),null;e.stop(),e.currentTime=e.startTime,e.oldTime=e.currentTime,e.start()}else e.oldTime=e.currentTime,e.currentTime+=e.speed;e.currentTime>=e.endTime&&(e.currentTime=e.endTime)}}}n.TimeFlowControl=Xe; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ r(64),r(68);var Qe=r(32),Ke=r.n(Qe); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ let Ze=window.fetch;n.setCORS=function(e){n.CORS=e};var $e=n.isCORS=function(){return void 0!=n.CORS?n.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},et=(n.setRequestTimeout=function(e){return n.RequestTimeout=e},n.getRequestTimeout=function(){return n.RequestTimeout||45e3}),tt=n.FetchRequest={commit:function(e,t,r,s){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,r,s);case"POST":return this.post(t,r,s);case"PUT":return this.put(t,r,s);case"DELETE":return this.delete(t,r,s);default:return this.get(t,r,s)}},supportDirectRequest:function(e,t){return!!Se.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:$e()||t.proxy)},get:function(e,t,r){r=r||{};if(e=Se.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){var s={url:e=e.replace(".json",".jsonp"),data:t};return n.Util.RequestJSONPPromise.GET(s)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,r):this._fetch(e,t,r,"GET")},delete:function(e,t,r){r=r||{};if(e=Se.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var s={url:e+="&_method=DELETE",data:t};return n.Util.RequestJSONPPromise.DELETE(s)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")-1),t,r):this._fetch(e,t,r,"DELETE")},post:function(e,t,r){if(r=r||{},!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var s={url:e+="&_method=POST",data:t};return n.Util.RequestJSONPPromise.POST(s)}return this._fetch(this._processUrl(e,r),t,r,"POST")},put:function(e,t,r){if(r=r||{},e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var s={url:e+="&_method=PUT",data:t};return n.Util.RequestJSONPPromise.PUT(s)}return this._fetch(e,t,r,"PUT")},urlIsLong:function(e){for(var t=0,r=null,s=0,i=e.length;s-1?"&":"?")+"_method="+e,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(t,r,s)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var r=e.split("?");2===r.length&&(e=r[0]+".json?"+r[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,r,s){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,Ze(e,{method:s,headers:r.headers,body:"PUT"===s||"POST"===s?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:et()}).then(function(e){return e})):Ze(e,{method:s,body:"PUT"===s||"POST"===s?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:et()}).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||{},Ke()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(r,s){setTimeout(function(){s(new Error("timeout"))},e),t.then(r,s)})},_getParameterString:function(e){var t=[];for(var r in e){var s,i=e[r];if(null!=i&&"function"!=typeof i)s=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(r)+"="+s)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};n.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=n.Util.toJSON(e[t]));var r=encodeURIComponent(e[t]);this.queryValues.push(r)}},issue:function(e){for(var t=this,r=t.getUid(),s=e.url,i=[],a=new Promise(function(e){t.supermap_callbacks[r]=function(s){delete t.supermap_callbacks[r],e(s)}}),n=s,o=0,l=t.queryKeys?t.queryKeys.length:0,h=0;h=t.limitLength){if(0==o)return!1;i.push(n),n=s,o=0,h--}else if(n.length+t.queryKeys[h].length+2+t.queryValues[h].length>t.limitLength)for(var u=t.queryValues[h];u.length>0;){var c=t.limitLength-n.length-t.queryKeys[h].length-2;n.indexOf("?")>-1?n+="&":n+="?";var d=u.substring(0,c);"%"===d.substring(c-1,c)?(c-=1,d=u.substring(0,c)):"%"===d.substring(c-2,c-1)&&(c-=2,d=u.substring(0,c)),n+=t.queryKeys[h]+"="+d,u=u.substring(c),d.length>0&&(i.push(n),n=s,o=0)}else o++,n.indexOf("?")>-1?n+="&":n+="?",n+=t.queryKeys[h]+"="+t.queryValues[h];return i.push(n),t.send(i,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+r+"]",e&&e.proxy),a},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,r){var s=e.length;if(s>0)for(var i=(new Date).getTime(),a=0;a-1?n+="&":n+="?",n+="sectionCount="+s,n+="§ionIndex="+a,n+="&jsonpUserID="+i,r&&(n=decodeURIComponent(n),n=r+encodeURIComponent(n)),Ke()(n,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings(e.params),this.issue(e)},POST:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},PUT:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},DELETE:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class rt{static generateToken(e,t){var r=this.servers[e];if(r)return tt.post(r.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},Se.isArray(e)||(e=[e]);for(var t=0;t-1&&"?"===s?t+=r.getUrlParameters():t.indexOf("?")>-1&&"?"!==s?t+="&"+r.getUrlParameters():t+="?"+r.getUrlParameters()}return t}getCredential(){var e,t=rt.getToken(this.serviceUrl);return(e=t?new Re(t,"token"):null)||(e=(t=this.getKey())?new Re(t,"key"):null),e}getKey(){}}n.iPortalServiceBase=nt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ot{constructor(e){e=e||{},this.resourceType="",this.pageSize=12,this.currentPage=1,this.orderBy="UPDATETIME",this.orderType="DESC",this.searchType="PUBLIC",this.tags=[],this.dirIds=[],this.resourceSubTypes=[],this.aggregationTypes=[],this.text="",this.groupIds=[],this.departmentIds=[],Se.extend(this,e)}}n.iPortalQueryParam=ot; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class lt{constructor(e){e=e||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,Se.extend(this,e)}}n.iPortalQueryResult=lt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ht extends nt{constructor(e,t){super(e),t=t||{},this.authorizeSetting=[],this.bounds="",this.bounds4326="",this.checkStatus="",this.createTime=0,this.description=null,this.dirId=null,this.epsgCode=0,this.heatLevel=0,this.id=0,this.name="",this.personalDirId=null,this.resourceId=0,this.resourceSubType=null,this.resourceType=null,this.serviceRootUrlId=null,this.tags=null,this.thumbnail=null,this.updateTime=0,this.userName="",this.sourceJSON={},Se.extend(this,t),this.resourceUrl=e+"/web/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId,this.withCredentials&&(this.resourceUrl=e+"/web/mycontent/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId)}load(){var e=this;return e.request("GET",e.resourceUrl+".json").then(function(t){if(t.error)return t;e.sourceJSON=t})}update(){var e=this.resourceType.replace("_","").toLowerCase();"data"===e&&(this.resourceUrl=this.resourceUrl+"/attributes.json");var t=JSON.stringify(this.sourceJSON);if("service"===e){var r={authorizeSetting:this.sourceJSON.authorizeSetting,metadata:this.sourceJSON.metadata,tags:this.sourceJSON.tags,thumbnail:this.sourceJSON.thumbnail,tokenRefreshUrl:this.sourceJSON.tokenRefreshUrl};t=JSON.stringify(r)}return this.request("PUT",this.resourceUrl,t,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}n.iPortalResource=ht; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ut{constructor(e){e=e||{},this.ids=[],this.entities=[],this.resourceType="",Se.extend(this,e)}}n.iPortalShareParam=ut; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ct extends nt{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return tt.get(this.iportalUrl+"/web")}queryResources(e){if(!(e instanceof ot))return new Promise(function(e){e("queryParams is not instanceof iPortalQueryParam !")});var t=this,r=this.iportalUrl+"/gateway/catalog/resource/search.json";return e.t=(new Date).getTime(),this.request("GET",r,e).then(function(e){var r=[];e.content.forEach(function(e){r.push(new ht(t.iportalUrl,e))});let s=new lt;return s.content=r,s.total=e.total,s.currentPage=e.currentPage,s.pageSize=e.pageSize,s.aggregations=e.aggregations,s})}updateResourcesShareSetting(e){if(!(e instanceof ut))return new Promise(function(e){e("shareParams is not instanceof iPortalShareParam !")});var t=e.resourceType.replace("_","").toLowerCase()+"s";"datas"===t&&(t="mycontent/"+t);var r={ids:e.ids,entities:e.entities},s=this.iportalUrl+"/web/"+t+"/sharesetting.json";return this.request("PUT",s,JSON.stringify(r)).then(function(e){return e})}}n.iPortal=ct; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class dt{constructor(e){e=e||{},this.permissionType="",this.entityType="",this.entityName="GUEST",this.entityId=null,Se.extend(this,e)}}n.iPortalShareEntity=dt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class pt{constructor(e){e=e||{},this.rootUrl="",this.tags=[],this.entities=[],Se.extend(this,e)}}n.iPortalAddResourceParam=pt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class mt{constructor(e){e=e||{},this.type="",this.tags=[],this.entities=[],this.metadata={},this.addedMapNames=[],this.addedSceneNames=[],Se.extend(this,e)}}n.iPortalRegisterServiceParam=mt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ft{constructor(e){e=e||{},this.fileName="",this.type="",this.tags=[],this.dataMetaInfo={},Se.extend(this,e)}}n.iPortalAddDataParam=ft; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class yt{constructor(e){e=e||{},this.xField="",this.yField="",this.fileEncoding="UTF-8",this.xIndex=1,this.yIndex=1,this.fieldTypes=[],this.separator="",this.firstRowIsHead=!0,this.url="",this.dataStoreInfo={},Se.extend(this,e)}}n.iPortalDataMetaInfoParam=yt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class gt{constructor(e){e=e||{},this.type="",this.url="",this.connectionInfo={},Se.extend(this,e)}}n.iPortalDataStoreInfoParam=gt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class vt{constructor(e){e=e||{},this.dataBase="",this.server="",Se.extend(this,e)}}n.iPortalDataConnectionInfoParam=vt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class St extends nt{constructor(e){super(e),this.iportalUrl=e}deleteResources(e){var t=e.resourceType.replace("_","").toLowerCase(),r=this.iportalUrl+"/web/"+t+"s.json?ids="+encodeURI(JSON.stringify(e.ids));return"data"===t?(r=this.iportalUrl+"/web/mycontent/datas/delete.json",this.request("POST",r,JSON.stringify(e.ids))):this.request("DELETE",r)}addMap(e){if(!(e instanceof pt))return this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},r=this.iportalUrl+"/web/maps/batchaddmaps.json";return this.request("POST",r,JSON.stringify(t)).then(function(e){return e})}addScene(e){if(!(e instanceof pt))return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},r=this.iportalUrl+"/web/scenes/batchaddscenes.json";return this.request("POST",r,JSON.stringify(t)).then(function(e){return e})}registerService(e){if(!(e instanceof mt))return this.getErrMsgPromise("registerParams is not instanceof IPortalRegisterServiceParam !");let t={type:e.type,tags:e.tags,authorizeSetting:e.entities,metadata:e.metadata,addedMapNames:e.addedMapNames,addedSceneNames:e.addedSceneNames},r=this.iportalUrl+"/web/services.json";return this.request("POST",r,JSON.stringify(t)).then(e=>e)}getErrMsgPromise(e){return new Promise(t=>{t(e)})}uploadDataRequest(e,t){var r=this.iportalUrl+"/web/mycontent/datas/"+e+"/upload.json";return this.request("POST",r,t)}addData(e,t){if(!(e instanceof ft))return this.getErrMsgPromise("params is not instanceof iPortalAddDataParam !");var r,s=this.iportalUrl+"/web/mycontent/datas.json",i={fileName:e.fileName,tags:e.tags,type:e.type},a=e.type.toLowerCase();if("excel"===a||"csv"===a){if(!(e.dataMetaInfo instanceof yt))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");r={xField:e.dataMetaInfo.xField,yField:e.dataMetaInfo.yField},"csv"===a&&(r.fileEncoding=e.dataMetaInfo.fileEncoding),i.coordType="WGS84",i.dataMetaInfo=r}else if("hdfs"===a||"hbase"===a){if(!(e.dataMetaInfo instanceof yt))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");if(!(e.dataMetaInfo.dataStoreInfo instanceof gt))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo is not instanceof iPortalDataStoreInfoParam !");var n={type:e.dataMetaInfo.dataStoreInfo.type};switch(a){case"hdfs":n.url=e.dataMetaInfo.dataStoreInfo.url,r={url:e.dataMetaInfo.url,dataStoreInfo:n};break;case"hbase":if(!(e.dataMetaInfo.dataStoreInfo.connectionInfo instanceof vt))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo.connectionInfo is not instanceof iPortalDataConnectionInfoParam !");n.connectionInfo={dataBase:e.dataMetaInfo.dataStoreInfo.connectionInfo.dataBase,server:e.dataMetaInfo.dataStoreInfo.connectionInfo.server,engineType:"HBASE"},n.datastoreType="SPATIAL",r={dataStoreInfo:n}}i.dataMetaInfo=r}return this.request("POST",s,JSON.stringify(i)).then(e=>"hdfs"===a||"hbase"===a?e:e.childID?this.uploadDataRequest(e.childID,t):e.customResult)}publishOrUnpublish(e,t){if(!e.dataId||!e.serviceType)return this.getErrMsgPromise("option.dataID and option.serviceType are Required!");var r=e.dataId,s=e.dataServiceId,i=e.serviceType,a=this.iportalUrl+"/web/mycontent/datas/"+r+"/publishstatus.json?serviceType="+i;return s&&(a+="&dataServiceId="+s),this.request("PUT",a,JSON.stringify(t)).then(e=>t?(s||(s=e.customResult),s):e)}getDataPublishedStatus(e,t){var r=this.iportalUrl+"/web/mycontent/datas/"+e+"/publishstatus.json?dataServiceId="+t+"&forPublish=true";return this.request("GET",r)}unPublishDataService(e){return this.publishOrUnpublish(e,!1)}publishDataService(e){return this.publishOrUnpublish(e,!0)}}n.iPortalUser=St; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class bt{constructor(e,t){let r=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.serverType=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,Se.isArray(e)?(r.urls=e,r.length=e.length,r.totalTimes=r.length,1===r.length?r.url=e[0]:(r.index=parseInt(Math.random()*r.length),r.url=e[r.index])):(r.totalTimes=1,r.url=e),Se.isArray(e)&&!r.isServiceSupportPolling()&&(r.url=e[0],r.totalTimes=1),r.serverType=r.serverType||l.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,Se.extend(this,t),r.isInTheSameDomain=Se.isInTheSameDomain(r.url),r.events=new De(r,null,r.EVENT_TYPES,!0),r.eventListeners instanceof Object&&r.events.on(r.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;Se.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){let t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=void 0!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=void 0!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain;let r=this.getCredential(e.url);r&&(e.url=Se.urlAppend(e.url,r.getUrlParameters())),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getCredential(e){let t,r,s=e;switch(this.serverType){case l.IPORTAL:(t=(r=rt.getToken(s))?new Re(r,"token"):null)||(t=(r=rt.getKey(s))?new Re(r,"key"):null);break;case l.ONLINE:t=(r=rt.getKey(s))?new Re(r,"key"):null;break;default:t=(r=rt.getToken(s))?new Re(r,"token"):null}return t}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){let t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){let e=this,t=e.options.url,r=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(r,r.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=Se.isInTheSameDomain(t),e._commit(e.options)}calculatePollingTimes(){let e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.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){e=Se.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=Se.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=Se.urlAppend(e.url,Se.getParameterString(e.params||{}))),e.params=e.data),tt.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(t){var r=t;("string"==typeof t&&(r=(new Ue).read(t)),(!r||r.error||r.code>=300&&304!==r.code)&&(r=r&&r.error?{error:r.error}:{error:r}),r.error)?(e.scope?ve.bind(e.failure,e.scope):e.failure)(r):(r.succeed=void 0==r.succeed||r.succeed,(e.scope?ve.bind(e.success,e.scope):e.success)(r))}).catch(function(t){(e.scope?ve.bind(e.failure,e.scope):e.failure)(t)})}}n.CommonServiceBase=bt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class xt{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,Se.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}n.GeoCodingParameter=xt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ct{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,Se.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}}n.GeoDecodingParameter=Ct; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Tt extends bt{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof xt&&this.processAsync(e,t)}decode(e,t){t instanceof Ct&&this.processAsync(e,t)}processAsync(e,t){this.request({method:"GET",url:e,params:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){e.succeed&&delete e.succeed,super.serviceProcessCompleted(e)}serviceProcessFailed(e){super.serviceProcessFailed(e)}}n.AddressMatchService=Tt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class _t{constructor(e){this.name=null,this.queryType=null,this.CLASS_NAME="SuperMap.AggQueryBuilderParameter",Se.extend(this,e)}destroy(){this.name=null,this.queryType=null}}n.AggQueryBuilderParameter=_t; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class wt{constructor(e){this.aggName=null,this.aggType=null,this.aggFieldName=null,this.subAgg=null,this.CLASS_NAME="SuperMap.AggregationParameter",Se.extend(this,e)}destroy(){var e=this;e.aggName=null,e.aggFieldName=null,e.aggType=null,e.subAgg&&(e.subAgg=null)}}n.AggregationParameter=wt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Mt{constructor(e){this.dataset=null,this.targetDatasourceName=null,this.totalGridName=null,this.diffuseDatasetGridName=null,this.durationDatasetGridName=null,this.directDatasetGridName=null,this.latitude=null,this.timeMode="MULTIDAYS",this.dayStart=null,this.dayEnd=null,this.hourStart=null,this.hourEnd=null,this.transmittance=null,this.hourInterval=null,this.dayInterval=null,this.deleteExistResultDataset=!1,Se.extend(this,e),this.CLASS_NAME="SuperMap.AreaSolarRadiationParameters"}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){var r={};for(var s in e){if("dataset"!==s)"latitude"===s||"timeMode"===s||"dayStart"===s||("dayEnd"===s||"hourStart"===s||"hourEnd"===s)||("transmittance"===s||"hourInterval"===s||"dayInterval"===s)?r[s]=e[s]:t[s]=e[s]}t.parameter=r}}n.AreaSolarRadiationParameters=Mt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Et extends bt{constructor(e,t){super(e,t),this.format=o.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,r=this;if((e=Se.transformResult(e))&&r.format===o.GEOJSON&&"function"==typeof r.toGeoJSONResult)if(Se.isArray(e)){for(var s=0;s0)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}}n.MappingParameters=jt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Vt{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=se.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;Se.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 Ut&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof jt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},"bounds"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}n.BuffersAnalystJobsParameter=Vt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ht extends bt{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;tt.get(t._processUrl(e),null,{proxy:t.proxy}).then(function(e){return e.json()}).then(function(e){t.events.triggerEvent("processCompleted",{result:e})}).catch(function(e){t.eventListeners.processFailed({error:e})})}addJob(e,t,r,s){var i=this,a=null;t&&t instanceof r&&(a=new Object,r.toObject(t,a));let n=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},i.headers||{});var o={proxy:i.proxy,headers:n,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,isInTheSameDomain:i.isInTheSameDomain};tt.post(i._processUrl(e),JSON.stringify(a),o).then(function(e){return e.json()}).then(function(e){e.succeed?i.serviceProcessCompleted(e,s):i.serviceProcessFailed(e)}).catch(function(e){i.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=Se.transformResult(e),t=t||1e3;var r=this;if(e)var s=setInterval(function(){tt.get(r._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){r.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(s),r.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(s),r.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(s),r.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return rt.getToken(e)&&(e=Se.urlAppend(e,"token="+rt.getToken(e))),e}}n.ProcessingServiceBase=Ht; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Jt extends Ht{constructor(e,t){super(e,t),this.url=Se.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(Se.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,Vt,t)}}n.BuffersAnalystJobsService=Jt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class zt{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,Se.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}}n.BurstPipelineAnalystParameters=zt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class qt extends bt{constructor(e,t){super(e,t),this.format=o.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t;(e=Se.transformResult(e))&&this.format===o.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(t=this.toGeoJSONResult(e)),t||(t=e),this.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}n.NetworkAnalystServiceBase=qt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Wt extends qt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof zt))return null;var t,r=this;if(r.url=Se.urlPathAppend(r.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}n.BurstPipelineAnalystService=Wt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Yt extends bt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),Se.reset(this)}processAsync(){var e=this;e.isTempLayers||Se.urlPathAppend(e.url,"chartFeatureInfoSpecs"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}n.ChartFeatureInfoSpecsService=Yt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Xt{constructor(e){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryFilterParameter"}destroy(){var e=this;e.isQueryPoint=null,e.isQueryLine=null,e.isQueryRegion=null,e.attributeFilter=null,e.chartFeatureInfoSpecCode=null}toJson(){var e="";return e+='"isQueryPoint":'+this.isQueryPoint+",",e+='"isQueryLine":'+this.isQueryLine+",",e+='"isQueryRegion":'+this.isQueryRegion+",",this.attributeFilter&&(e+='"attributeFilter": "'+this.attributeFilter+'",'),e="{"+(e+='"chartFeatureInfoSpecCode":'+this.chartFeatureInfoSpecCode)+"}"}}n.ChartQueryFilterParameter=Xt; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Qt{constructor(e){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryParameters"}destroy(){var e=this;e.queryMode=null,e.bounds=null,e.chartLayerNames=null,e.chartQueryFilterParameters=null,e.returnContent=!0,e.startRecord=0,e.expectCount=null}getVariablesJson(){var e="";if(e+='"queryMode":"'+this.queryMode+'",',this.chartLayerNames&&this.chartLayerNames.length){for(var t=[],r=this.chartLayerNames.length,s=0;s0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(r+=","),r+=t[e];return r+="]"}}n.ComputeWeightMatrixService=ir; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ar extends bt{constructor(e,t){(t=t||{}).EVENT_TYPES=["broadcastSocketConnected","broadcastSocketError","broadcastFailed","broadcastSucceeded","subscribeSocketConnected","subscribeSocketError","messageSucceeded","setFilterParamSucceeded"],super(e,t),this.geometry=null,this.prjCoordSys=null,this.excludeField=null,Se.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(Se.urlPathAppend(e.url,"broadcast")),this.broadcastWebSocket.onopen=function(t){e.broadcastWebSocket.isOpen=!0,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onclose=function(t){e.broadcastWebSocket.isOpen=!1,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onerror=function(t){t.eventType="broadcastSocketError",e.events.triggerEvent("broadcastSocketError",t)},this}broadcast(e){this.broadcastWebSocket&&this.broadcastWebSocket.isOpen?(this.broadcastWebSocket.send(JSON.stringify(e)),this.events.triggerEvent("broadcastSucceeded")):this.events.triggerEvent("broadcastFailed")}initSubscribe(){var e=this;return this.subscribeWebSocket=this._connect(Se.urlPathAppend(e.url,"subscribe")),this.subscribeWebSocket.onopen=function(t){e.subscribeWebSocket.send(e._getFilterParams()),t.eventType="subscribeSocketConnected",e.events.triggerEvent("subscribeSocketConnected",t)},this.subscribeWebSocket.onerror=function(t){t.eventType="subscribeSocketError",e.events.triggerEvent("subscribeSocketError",t)},this.subscribeWebSocket.onmessage=function(t){e._onMessage(t)},this}setExcludeField(e){return this.excludeField=e,this.subscribeWebSocket.send(this._getFilterParams()),this}setGeometry(e){return this.geometry=e,this.subscribeWebSocket.send(this._getFilterParams()),this}unSubscribe(){this.subscribeWebSocket&&(this.subscribeWebSocket.close(),this.subscribeWebSocket=null)}unBroadcast(){this.broadcastWebSocket&&(this.broadcastWebSocket.close(),this.broadcastWebSocket=null)}destroy(){bt.prototype.destroy.apply(this,arguments);this.geometry=null,this.prjCoordSys=null,this.excludeField=null,this.unBroadcast(),this.unSubscribe()}_getFilterParams(){var e={filterParam:{prjCoordSys:this.prjCoordSys,excludeField:this.excludeField,geometry:this.geometry}};return Se.toJSON(e)}_onMessage(e){if(e.data&&e.data.indexOf("filterParam")>=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var r=JSON.parse(e.data);e.featureResult=r,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}_connect(e){return e=this._appendCredentials(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}_appendCredentials(e){var t=rt.getToken(e);return t&&(e=Se.urlAppend(e,"token="+t)),e}}n.DataFlowService=ar; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class nr{constructor(e){e=e||{},this.bounds=null,this.dataSourceName=null,this.description=null,this.encodeType=null,this.isReadOnly=null,this.name=null,this.prjCoordSys=null,this.tableName=null,this.type=null,Se.extend(this,e);var t=this.bounds;t&&(this.bounds=new xe(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){Se.reset(this)}toServerJSONObject(){var e={};return(e=Se.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}n.DatasetInfo=nr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class or{constructor(e){this.operation=F.UNION,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}}n.OverlayAnalystParameters=or; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class lr extends or{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new Dt,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new Dt,this.tolerance=0,this.resultSetting=new It,Se.extend(this,e),this.CLASS_NAME="SuperMap.DatasetOverlayAnalystParameters"}destroy(){super.destroy();var e=this;if(e.operateDataset=null,e.operateDatasetFields=null,e.operateDatasetFilter&&(e.operateDatasetFilter.destroy(),e.operateDatasetFilter=null),e.operateRegions){for(var t=0,r=e.operateRegions,s=r.length;t0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new qe;return e.facilityPathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}n.FindClosestFacilitiesService=Dr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class kr{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,r=e.supplyCenters,s=r.length;t0&&(t+=","),t+=Se.toJSON(e[s]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new qe;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}n.FindLocationService=Gr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Br{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new rr,Se.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}n.FindMTSPPathsParameters=Br; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ur extends qt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Br){var t,r=this,s=r.getJson(e.isAnalyzeById,e.centers),i=r.getJson(e.isAnalyzeById,e.nodes);r.url=Se.urlPathAppend(r.url,"mtsppath"),t={centers:s,nodes:i,parameter:Se.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new qe;return e.pathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}n.FindMTSPPathsService=Ur; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class jr{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new rr,Se.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}n.FindPathParameters=jr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Vr extends qt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof jr){var t,r=this;r.url=Se.urlPathAppend(r.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:Se.toJSON(e.parameter),nodes:r.getJson(e.isAnalyzeById,e.nodes)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new qe;return e.pathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}n.FindPathService=Vr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Hr{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new rr,Se.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}n.FindServiceAreasParameters=Hr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Jr extends qt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Hr){var t,r=this;r.url=Se.urlPathAppend(r.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:Se.toJSON(e.parameter),centers:r.getJson(e.isAnalyzeById,e.centers),weights:r.getJson(!0,e.weights)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJson(e,t){var r="[",s=t?t.length:0;if(!1===e)for(let e=0;e0&&(r+=","),r+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(r+=","),r+=t[e];return r+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new qe;return e.serviceAreaList.map(function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e}),e}}n.FindServiceAreasService=Jr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class zr{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new rr,Se.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}n.FindTSPPathsParameters=zr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class qr extends qt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof zr){var t,r=this;r.url=Se.urlPathAppend(r.url,"tsppath"),t={parameter:n.Util.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:r.getNodesJson(e)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getNodesJson(e){var t,r,s,i,a="";if(!1===e.isAnalyzeById){for(t="[",r=0,s=(i=e.nodes).length;r0&&(t+=","),t+='{"x":'+i[r].x+',"y":'+i[r].y+"}";a+=t+="]"}else if(!0===e.isAnalyzeById){let t="[",r=e.nodes,s=r.length;for(let e=0;e0&&(t+=","),t+=r[e];a+=t+="]"}return a}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new qe;return e.tspPathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}n.FindTSPPathsService=qr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Wr{constructor(e){this.routeTable=null,this.routeIDField=null,this.attributeFilter=null,this.eventTable=null,this.eventRouteIDField=null,this.measureField=null,this.measureStartField=null,this.measureEndField=null,this.measureOffsetField=null,this.errorInfoField=null,this.retainedFields=null,this.dataReturnOption=null,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.GenerateSpatialDataParameters"}destroy(){var e=this;e.routeTable&&(e.routeTable=null),e.routeIDField=null,e.attributeFilter=null,e.eventTable=null,e.eventRouteIDField=null,e.measureField=null,e.measureStartField=null,e.measureEndField=null,e.measureOffsetField=null,e.errorInfoField=null,e.dataReturnOption&&(e.dataReturnOption.destroy(),e.dataReturnOption=null)}}n.GenerateSpatialDataParameters=Wr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Yr extends Et{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Wr){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return this.url=Se.urlPathAppend(this.url,t),this.url=Se.urlAppend(this.url,"returnContent=true"),Se.toJSON(e)}}n.GenerateSpatialDataService=Yr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Xr extends _t{constructor(e){super(e),this.bounds=null,this.queryType=le.GEO_BOUNDING_BOX,this.CLASS_NAME="SuperMap.GeoBoundingBoxQueryBuilderParameter",Se.extend(this,e)}destroy(){super.destroy(),this.bounds=null,this.queryType=null}}n.GeoBoundingBoxQueryBuilderParameter=Xr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Qr extends wt{constructor(e){super(e),this.precision=5,this.aggType=oe.GEOHASH_GRID,Se.extend(this,e),this.CLASS_NAME="SuperMap.GeoHashGridAggParameter"}destroy(){super.destroy(),this.aggType=null}static toJsonParameters(e){var t={aggName:e.aggName,aggFieldName:e.aggFieldName,aggType:e.aggType,precision:e.precision};return e.subAgg&&(t.subAgg=e.subAgg),Se.toJson(t)}}n.GeoHashGridAggParameter=Qr; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Kr extends or{constructor(e){super(e),e&&e.operateGeometry&&(this.operateGeometry=e.operateGeometry),e&&e.sourceGeometry&&(this.sourceGeometry=e.sourceGeometry),e&&e.operateGeometries&&(this.operateGeometries=e.operateGeometries),e&&e.sourceGeometries&&(this.sourceGeometries=e.sourceGeometries),e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.GeometryOverlayAnalystParameters"}destroy(){super.destroy();var e=this;e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.sourceGeometries&&(e.sourceGeometries.destroy(),e.sourceGeometries=null),e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.operateGeometries&&(e.operateGeometries.destroy(),e.operateGeometries=null)}static toObject(e,t){for(var r in e)if("sourceGeometry"===r)t.sourceGeometry=ze.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===r){for(var s=[],i=0;i=0;e--)this.points[e].destroy();this.points=null}}static toObject(e,t){for(var r in e)"clipRegion"===r?t.clipRegion=ze.fromGeometry(e.clipRegion):t[r]=e[r]}}n.GeometryThiessenAnalystParameters=$r;class es extends bt{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.GeoprocessingService",this.headers={},this.crossOrigin=!0}getTools(){this._get(`${this.url}/list`)}getTool(e){this._get(`${this.url}/${e}`)}execute(e,t,r){const s={parameter:t=t||null,environment:r=r||null};this._get(`${this.url}/${e}/execute`,s)}submitJob(e,t,r){const s={parameter:t=t||null,environments:r=r||null};this.request({url:`${this.url}/${e}/jobs`,headers:{"Content-type":"application/json"},method:"POST",data:JSON.stringify(s),scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}waitForJobCompletion(e,t,r){const s=this,i=setInterval(function(){s._get(`${s.url}/${t}/jobs/${e}`,null,function(e){const t=e.state.runState;switch(r.statusCallback&&r.statusCallback(t),t){case"FINISHED":clearInterval(i),s.events.triggerEvent("processCompleted",{result:e});break;case"FAILED":case"CANCELED":clearInterval(i),s.events.triggerEvent("processFailed",{result:e})}})},r.interval)}getJobInfo(e,t){this._get(`${this.url}/${e}/jobs/${t}`)}cancelJob(e,t){this._get(`${this.url}/${e}/jobs/${t}/cancel`)}getJobs(e){let t=`${this.url}/jobs`;e&&(t=`${this.url}/${e}/jobs`),this._get(t)}getResults(e,t,r){let s=`${this.url}/${e}/jobs/${t}/results`;r&&(s=`${s}/${r}`),this._get(s)}_get(e,t,r,s){this.request({url:e,method:"GET",params:t,headers:{"Content-type":"application/json"},scope:this,success:r||this.serviceProcessCompleted,failure:s||this.serviceProcessFailed})}}n.GeoprocessingService=es; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ts{constructor(e){this.dataset=null,this.sourceFilter=null,this.referenceFilter=null,this.spatialRelationType=null,this.isBorderInside=null,this.returnFeature=null,this.returnGeoRelatedOnly=null,this.startRecord=0,this.expectCount=500,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.GeoRelationAnalystParameters"}destroy(){var e=this;e.sourceFilter&&e.sourceFilter.destroy(),e.sourceFilter=null,e.referenceFilter&&e.referenceFilter.destroy(),e.referenceFilter=null,e.dataset=null,e.spatialRelationType=null,e.isBorderInside=null,e.returnFeature=null,e.returnGeoRelatedOnly=null,e.startRecord=null,e.expectCount=null}}n.GeoRelationAnalystParameters=ts; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class rs extends Et{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ts){var t=this;t.url=Se.urlPathAppend(t.url,"datasets/"+e.dataset+"/georelation");var r=n.Util.toJSON(e);t.url=Se.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}n.GeoRelationAnalystService=rs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ss{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.aggregations=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}n.GetFeaturesParametersBase=ss; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class is extends ss{constructor(e){super(e),this.getFeatureMode=is.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=d.CONTAIN,Se.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,r,s;return r={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},s={datasetNames:e.datasetNames,getFeatureMode:is.getFeatureMode.BOUNDS,bounds:r,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new Dt).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode=is.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),Se.toJSON(s)}}is.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"},n.GetFeaturesByBoundsParameters=is; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class as extends bt{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.maxFeatures=null,this.format=o.GEOJSON,Se.extend(this,t),this.url=Se.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null}processAsync(e){if(e){var t,r=this,s=!0;r.returnContent=e.returnContent,r.fromIndex=e.fromIndex,r.toIndex=e.toIndex,r.maxFeatures=e.maxFeatures,r.returnContent&&(r.url=Se.urlAppend(r.url,"returnContent="+r.returnContent),s=!1),null!=r.fromIndex&&null!=r.toIndex&&!isNaN(r.fromIndex)&&!isNaN(r.toIndex)&&r.fromIndex>=0&&r.toIndex>=0&&!s&&(r.url=Se.urlAppend(r.url,`fromIndex=${r.fromIndex}&toIndex=${r.toIndex}`)),e.returnCountOnly&&(r.url=Se.urlAppend(r.url,"&returnCountOnly="+e.returnContent)),t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=Se.transformResult(e),this.format===o.GEOJSON&&e.features){var t=new qe;e.features=t.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}n.GetFeaturesServiceBase=as; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ns extends as{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return is.toJsonParameters(e)}}n.GetFeaturesByBoundsService=ns; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class os extends ss{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBufferParameters"}destroy(){super.destroy();var e=this;if(e.bufferDistance=null,e.attributeFilter=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}static toJsonParameters(e){var t,r,s;return s=ze.fromGeometry(e.geometry),r={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:s},e.fields&&((t=new Dt).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),Se.toJSON(r)}}n.GetFeaturesByBufferParameters=os; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ls extends as{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof os)return n.GetFeaturesByBufferParameters.toJsonParameters(e)}}n.GetFeaturesByBufferService=ls; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class hs extends ss{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=d.CONTAIN,Se.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryParameters"}destroy(){super.destroy();var e=this;if(e.geometry&&(e.geometry.destroy(),e.geometry=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,r,s;return r=ze.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:r,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new Dt).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),Se.toJSON(s)}}n.GetFeaturesByGeometryParameters=hs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class us extends as{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return hs.toJsonParameters(e)}}n.GetFeaturesByGeometryService=us; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class cs extends ss{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByIDsParameters"}destroy(){super.destroy();var e=this;if(e.IDs=null,e.getFeatureMode=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}}static toJsonParameters(e){var t,r;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((r=new Dt).name=e.datasetNames,r.fields=e.fields,t.queryParameter=r),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),Se.toJSON(t)}}n.GetFeaturesByIDsParameters=cs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ds extends as{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return cs.toJsonParameters(e)}}n.GetFeaturesByIDsService=ds; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ps extends ss{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesBySQLParameters"}destroy(){super.destroy();this.getFeatureMode=null,this.queryParameter&&(this.queryParameter.destroy(),this.queryParameter=null)}static toJsonParameters(e){var t={datasetNames:e.datasetNames,getFeatureMode:"SQL",queryParameter:e.queryParameter};return e.maxFeatures&&!isNaN(e.maxFeatures)&&(t.maxFeatures=e.maxFeatures),e.aggregations&&(t.aggregations=e.aggregations),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),Se.toJSON(t)}}n.GetFeaturesBySQLParameters=ps; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ms extends as{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return ps.toJsonParameters(e)}}n.GetFeaturesBySQLService=ms; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class fs extends bt{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&Se.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this;e.url=Se.urlPathAppend(e.url,`datasources/${e.datasource}/datasets/${e.dataset}/fields`),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}n.GetFieldsService=fs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ys{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}}n.GetGridCellInfosParameters=ys; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class gs extends bt{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&Se.extend(this,t),this.CLASS_NAME="SuperMap.GetGridCellInfosService"}destroy(){super.destroy();var e=this;e.X=null,e.Y=null,e.datasetName=null,e.dataSourceName=null,e.datasetType=null}processAsync(e){if(e instanceof ys){Se.extend(this,e);var t=this;t.url=Se.urlPathAppend(t.url,`datasources/${t.dataSourceName}/datasets/${t.datasetName}`),t.queryRequest(t.getDatasetInfoCompleted,t.getDatasetInfoFailed)}}queryRequest(e,t){this.request({method:"GET",data:null,scope:this,success:e,failure:t})}getDatasetInfoCompleted(e){e=Se.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this;e.url=Se.urlPathAppend(e.url,"GRID"==e.datasetType?"gridValue":"imageValue"),null!=e.X&&null!=e.Y&&(e.url=Se.urlAppend(e.url,`x=${e.X}&y=${e.Y}`)),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}}n.GetGridCellInfosService=gs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class vs{constructor(e,t){this.srcData=e,this.targetData=t,this.CLASS_NAME="SuperMap.ThemeMemoryData"}destroy(){this.srcData=null,this.targetData=null}toJSON(){if(this.srcData&&this.targetData){for(var e="",t=Math.min(this.srcData.length,this.targetData.length),r=0;r0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}n.ThemeMemoryData=vs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ss{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&Se.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}}n.Theme=Ss; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class bs{constructor(e){this.align=w.BASELINECENTER,this.backColor=new je(255,255,255),this.foreColor=new je(0,0,0),this.backOpaque=!1,this.sizeFixed=!0,this.fontHeight=6,this.fontWidth=0,this.fontWeight=400,this.fontName="Times New Roman",this.bold=!1,this.italic=!1,this.italicAngle=0,this.shadow=!1,this.strikeout=!1,this.outline=!1,this.opaqueRate=0,this.underline=!1,this.rotation=0,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.ServerTextStyle"}destroy(){var e=this;e.align=null,e.backColor&&(e.backColor.destroy(),e.backColor=null),e.foreColor&&(e.foreColor.destroy(),e.foreColor=null),e.backOpaque=null,e.sizeFixed=null,e.fontHeight=null,e.fontWidth=null,e.fontWeight=null,e.fontName=null,e.bold=null,e.italic=null,e.italicAngle=null,e.shadow=null,e.strikeout=null,e.outline=null,e.opaqueRate=null,e.underline=null,e.rotation=null}static fromObj(e){var t=new bs(e);return Se.copy(t,e),t.backColor=je.fromJson(e.backColor),t.foreColor=je.fromJson(e.foreColor),t}}n.ServerTextStyle=bs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class xs{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new bs,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new xs;return Se.copy(t,e),t}}}n.ThemeLabelItem=xs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Cs{constructor(e){this.caption=null,this.style=new Ve,this.unique=null,this.visible=!0,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=Se.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new Cs;return Se.copy(t,e),t.style=Ve.fromJson(e.style),t}}n.ThemeUniqueItem=Cs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ts{constructor(e){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new Ve,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.ThemeFlow"}destroy(){var e=this;e.flowEnabled=null,e.leaderLineDisplayed=null,e.leaderLineStyle&&(e.leaderLineStyle.destroy(),e.leaderLineStyle=null)}static fromObj(e){if(e){var t=new Ts;return Se.copy(t,e),t.leaderLineStyle=Ve.fromJson(e.leaderLineStyle),t}}}n.ThemeFlow=Ts; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class _s{constructor(e){this.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.ThemeOffset"}destroy(){this.offsetFixed=null,this.offsetX=null,this.offsetY=null}static fromObj(e){if(e){var t=new _s;return Se.copy(t,e),t}}}n.ThemeOffset=_s; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ws{constructor(e){this.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new bs,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.LabelMixedTextStyle"}destroy(){var e=this;if(e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null),e.separator=null,e.separatorEnabled=null,e.splitIndexes&&(e.splitIndexes=null),e.styles){for(var t=0,r=e.styles,s=r.length;t0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}toServerJSONObject(){var e={};if((e=Se.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,s=0;s0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Us;Se.copy(t,e);var r=e.items,s=r?r.length:0;t.items=[];for(var i=0;i0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(r,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var r;if(e)for(var s=0;s0)this.handleLayers(t[s].subLayers.layers.length,t[s].subLayers.layers);else switch(t[s].ugcLayerType){case"THEME":(r=new zs).fromJson(t[s]),t[s]=r;break;case"GRID":(r=new qs).fromJson(t[s]),t[s]=r;break;case"IMAGE":(r=new Ws).fromJson(t[s]),t[s]=r;break;case"VECTOR":(r=new Ys).fromJson(t[s]),t[s]=r}}}}n.GetLayersInfoService=Xs; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Qs{constructor(e){e&&(this.bounds=null,this.searchRadius=0,this.zValueFieldName=null,this.zValueScale=1,this.resolution=null,this.filterQueryParameter=null,this.outputDatasetName=null,this.outputDatasourceName=null,this.pixelFormat=null,this.dataset=null,this.inputPoints=null,this.InterpolationAnalystType="dataset",this.clipParam=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationAnalystParameters")}destroy(){var e=this;e.bounds=null,e.searchRadius=null,e.zValueFieldName=null,e.zValueScale=null,e.resolution=null,e.filterQueryParameter=null,e.outputDatasetName=null,e.pixelFormat=null}static toObject(e,t){for(var r in e)if("inputPoints"===r&&"geometry"===e.InterpolationAnalystType){for(var s=[],i=0;i=200&&e.code<300||0==e.code||304===e.code,r=e.code&&t;!e.code||r?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}n.MapService=hi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ui{constructor(e){e&&(this.dataset=null,this.extractRegion=null,this.expression=null,this.isZip=!1,this.ignoreNoValue=!1,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,Se.extend(this,e),this.CLASS_NAME="SuperMap.MathExpressionAnalysisParameters")}destroy(){var e=this;e.dataset=null,e.bounds=null,e.expression=null,e.isZip=!0,e.ignoreNoValue=!0,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var r in e)if("dataset"!==r&&(t[r]=e[r]),"extractRegion"===r&&e[r]){for(var s=e[r].components[0].components,i={},a=[],n=s.length,o=0;o(e.fieldNames=s[r].fieldCaptions,e)),this.format===o.GEOJSON&&(s[r].features=t.toGeoJSON(s[r].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Kt({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}}n.QueryService=vi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Si extends vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof gi))return null;var t,r="",s=e.bounds;return t=this.getQueryParameters(e),r+="'queryMode':'BoundsQuery','queryParameters':",r+=Se.toJSON(t),r="{"+(r+=",'bounds': {'rightTop':{'y':"+s.top+",'x':"+s.right+"},'leftBottom':{'y':"+s.bottom+",'x':"+s.left+"}}")+"}"}}n.QueryByBoundsService=Si; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class bi extends Kt{constructor(e){e&&(super(e),this.distance=0,this.geometry=null,this.isNearest=null,this.returnContent=!0,Se.extend(this,e),this.CLASS_NAME="SuperMap.QueryByDistanceParameters")}destroy(){super.destroy();var e=this;e.returnContent=null,e.distance=null,e.isNearest=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}}n.QueryByDistanceParameters=bi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class xi extends vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof bi){var t="",r=this.getQueryParameters(e),s=ze.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=Se.toJSON(r),t="{"+(t+=",'geometry':"+Se.toJSON(s)+",'distance':"+e.distance)+"}"}}}n.QueryByDistanceService=xi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ci extends Kt{constructor(e){e&&(super(e),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=d.INTERSECT,Se.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters")}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}}n.QueryByGeometryParameters=Ci; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ti extends vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Ci){var t,r="",s=e.geometry,i=ze.fromGeometry(s);return t=this.getQueryParameters(e),r+="'queryMode':'SpatialQuery','queryParameters':",r="{"+(r+=Se.toJSON(t)+",'geometry':"+Se.toJSON(i)+",'spatialQueryMode':"+Se.toJSON(e.spatialQueryMode))+"}"}}}n.QueryByGeometryService=Ti; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class _i extends Kt{constructor(e){e&&(super(e),this.returnContent=!0,Se.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters")}destroy(){super.destroy();this.returnContent=null}}n.QueryBySQLParameters=_i; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class wi extends vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof _i){var t,r="";return t=this.getQueryParameters(e),r+="'queryMode':'SqlQuery','queryParameters':",r="{"+(r+=Se.toJSON(t))+"}"}}}n.QueryBySQLService=wi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Mi{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,Se.extend(this,e),this.CLASS_NAME="SuperMap.RouteCalculateMeasureParameters"}destroy(){var e=this;e.sourceRoute=null,e.point=null,e.tolerance&&(e.tolerance=null),e.isIgnoreGap&&(e.isIgnoreGap=!1)}}n.RouteCalculateMeasureParameters=Mi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ei extends Et{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Mi){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){return this.url=Se.urlPathAppend(this.url,"geometry/calculatemeasure"),this.url=Se.urlAppend(this.url,"returnContent=true"),Se.toJSON(e)}}n.RouteCalculateMeasureService=Ei; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ai{constructor(e){if(!e)return this;this.sourceRoute=null,this.dataset=null,this.routeIDField=null,this.routeID=null,this.type=null,this.measure=null,this.offset=0,this.isIgnoreGap=!1,this.startMeasure=null,this.endMeasure=null;var t=e.sourceRoute,r={};if(t&&t instanceof Ce&&t.components){r.type=t.type,r.parts=t.parts;for(var s=[],i=0,a=t.components.length;i0&&(r+='"subLayers":'+e.toJSON()),r+=',"visible":true,',r+='"name":"'+this.getMapName(this.mapUrl)+'"',r+="}]",t.request({method:"PUT",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}createTempLayerComplete(e){(e=Se.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}getMapName(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var r=t.lastIndexOf("/");return t.substring(r+1,t.length)}serviceProcessCompleted(e){null!=(e=Se.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}n.SetLayerStatusService=Di; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ki{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=d.CONTAIN,this.output=null,this.mappingParameters=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof Ut&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof jt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}n.SingleObjectQueryJobsParameter=ki; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Gi extends Ht{constructor(e,t){super(e,t),this.url=Se.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(Se.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,ki,t)}}n.SingleObjectQueryJobsService=Gi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Bi{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,Se.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){Se.reset(this)}}n.StopQueryParameters=Bi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ui extends bt{constructor(e,t){super(e,t),t=t||{},Se.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),Se.reset(this)}processAsync(e){if(e instanceof Bi){var t=this;t.url=Se.urlPathAppend(t.url,"stops/keyword/"+e.keyWord),t.request({method:"GET",params:{returnPosition:e.returnPosition},scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}n.StopQueryService=Ui; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ji{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof Ut&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof jt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}n.SummaryAttributesJobsParameter=ji; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Vi extends Ht{constructor(e,t){super(e,t),this.url=Se.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(Se.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,ji,t)}}n.SummaryAttributesJobsService=Vi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Hi{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=ie.AVERAGE,this.fields="",this.type=ae.SUMMARYMESH,this.output=null,this.mappingParameters=null,Se.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 Ut&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof jt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"type"!==r?"output"!==r?("SUMMARYMESH"===e.type&&"regionDataset"!==r||"SUMMARYREGION"===e.type&&!s(["meshType","resolution","query"],r))&&(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):t.type=e[r]:(t.input=t.input||{},t.input[r]=e[r]);function s(e,t){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}}}n.SummaryMeshJobParameter=Hi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ji extends Ht{constructor(e,t){super(e,t),this.url=Se.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(Se.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,Hi,t)}}n.SummaryMeshJobsService=Ji; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class zi{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=se.METER,this.type=ae.SUMMARYMESH,this.output=null,this.mappingParameters=null,Se.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 Ut&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof jt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"type"!==r&&"type"!==r?"output"!==r?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==r)&&(t.analyst=t.analyst||{},"query"===r&&e[r]?t.analyst[r]=e[r].toBBOX():t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):t.type=e[r]:(t.input=t.input||{},t.input[r]=e[r])}}n.SummaryRegionJobParameter=zi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class qi extends Ht{constructor(e,t){super(e,t),this.url=Se.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(Se.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,zi,t)}}n.SummaryRegionJobsService=qi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Wi{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.SupplyCenter"}destroy(){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null}static fromJson(e){if(e)return new Wi({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}}n.SupplyCenter=Wi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Yi extends Et{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ur){var t,r=this;t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getJsonParameters(e){var t="",r={},s=this;if(e instanceof cr)s.url=Se.urlPathAppend(s.url,"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()),cr.toObject(e,r),t=Se.toJSON(r);else{if(!(e instanceof Zr))return;s.url=Se.urlPathAppend(s.url,"geometry/"+e.surfaceAnalystMethod.toLowerCase()),t=Se.toJSON(e)}return s.url=Se.urlAppend(s.url,"returnContent=true"),t}}n.SurfaceAnalystService=Yi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Xi{constructor(e){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,Se.extend(this,e),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationParameters")}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){for(var r in e)"dataset"!==r&&(t[r]=e[r])}}n.TerrainCurvatureCalculationParameters=Xi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Qi extends Et{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(e){var t=this,r={};e instanceof Xi&&(t.url=Se.urlPathAppend(t.url,"datasets/"+e.dataset+"/terraincalculation/curvature")),Xi.toObject(e,r);var s=n.Util.toJSON(r);t.url=Se.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}n.TerrainCurvatureCalculationService=Qi; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ki{constructor(e){this.caption=null,this.color=new je,this.end=0,this.start=0,this.visible=!0,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=Se.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Ki;return Se.copy(t,e),t.color=je.fromJson(e.color),t}}}n.ThemeGridRangeItem=Ki; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Zi extends Ss{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=C.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=_.YELLOW_RED,this.reverseColor=!1,e&&Se.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Zi;Se.copy(t,e);var r=e.items,s=r?r.length:0;t.items=[];for(var i=0;i0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultcolor&&(e.defaultcolor.destroy(),e.defaultcolor=null)}toServerJSONObject(){var e={};if((e=Se.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,s=0;s0&&(1===i.length?r+="'displayFilter':\""+i[0]+'",':r+="'displayFilter':\""+i[n]+'",'),(a=e.displayOrderBy)&&a.length>0&&(1===a.length?r+="'displayOrderBy':'"+a[0]+"',":r+="'displayOrderBy':'"+a[n]+"',"),(t=e.fieldValuesDisplayFilter)&&(r+="'fieldValuesDisplayFilter':"+Se.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[n]&&(r+="'joinItems':["+Se.toJSON(e.joinItems[n])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[n]?n:e.datasetNames.length-1,h=e.dataSourceNames[n]?n:e.dataSourceNames.length-1;r+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else r+="},"}e.themes&&e.themes.length>0&&(r=r.substring(0,r.length-1)),r+="]},";var u=this.url.split("/");return r+="'name': '"+u[u.length-2]+"'}]"}}n.ThemeService=sa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ia extends Et{constructor(e,t){super(e,t),this.mode=null,t&&Se.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},r=this;e instanceof pr?(r.mode="datasets",r.url=Se.urlPathAppend(r.url,"datasets/"+e.dataset+"/thiessenpolygon"),pr.toObject(e,t)):e instanceof $r&&(r.mode="geometry",r.url=Se.urlPathAppend(r.url,"geometry/thiessenpolygon"),$r.toObject(e,t));var s=Se.toJSON(t);r.url=Se.urlAppend(r.url,"returnContent=true"),r.request({method:"POST",data:s,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}n.ThiessenAnalystService=ia; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class aa extends Et{constructor(e,t){super(e,t),t&&Se.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;t.url=Se.urlPathAppend(t.url,"geometry/batchanalyst"),t.url=Se.urlAppend(t.url,"returnContent=true&ignoreAnalystParam=true");var r=t._processParams(e),s=Se.toJSON(r);t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(Se.isArray(e)){var r=[];return e.map(function(e){return r.push(t._toJSON(e)),e}),r}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},Gt.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},Kr.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},Qs.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},Qs.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},Qs.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},Qs.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},$r.toObject(e.param,t.param)}return t}destroy(){super.destroy()}}n.GeometryBatchAnalystService=aa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class na extends bt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this;e.url=Se.urlPathAppend(e.url,"tilesets"),e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}n.TilesetsService=na; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class oa{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=ne.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof Ut&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof jt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}n.TopologyValidatorJobsParameter=oa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class la extends Ht{constructor(e,t){super(e,t),this.url=Se.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(Se.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,oa,t)}}n.TopologyValidatorJobsService=la; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ha{constructor(e){e=e||{},this.lineID=null,this.lineName=null,this.lineAliasName=null,this.startStopIndex=null,this.startStopName=null,this.startStopAliasName=null,this.endStopIndex=null,this.endStopName=null,this.endStopAliasName=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){Se.reset(this)}static fromJson(e){if(e)return new ha({lineID:e.lineID,lineName:e.lineName,lineAliasName:e.lineAliasName,startStopIndex:e.startStopIndex,startStopName:e.startStopName,startStopAliasName:e.startStopAliasName,endStopIndex:e.endStopIndex,endStopName:e.endStopName,endStopAliasName:e.endStopAliasName})}}n.TransferLine=ha; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ua{constructor(e){e=e||{},this.transferLines=null,this.points=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){Se.reset(this)}static toJson(e){if(e)return Se.toJSON(e)}}n.TransferPathParameters=ua; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ca extends bt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ua){var t,r=this;r.url=Se.urlPathAppend(r.url,"path"),t={points:Se.toJSON(e.points),transferLines:Se.toJSON(e.transferLines)},r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}n.TransferPathService=ca; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class da{constructor(e){e=e||{},this.solutionCount=6,this.transferPreference=V.NONE,this.transferTactic=j.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){Se.reset(this)}static toJson(e){if(e)return Se.toJSON(e)}}n.TransferSolutionParameters=da; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class pa extends bt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof da){var t,r=this;r.url=Se.urlPathAppend(r.url,"solutions"),t={points:Se.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=Se.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=Se.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=Se.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=Se.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),r.request({method:"GET",params:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}n.TransferSolutionService=pa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ma{constructor(e){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",Se.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}n.UpdateEdgeWeightParameters=ma; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class fa extends qt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ma){var t=this,r=t.parse(e);t.url=Se.urlPathAppend(t.url,r);var s=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:s,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var r in e)if(""!==e[r]&&"edgeWeight"!==e[r])switch(r){case"edgeId":t+="/edgeweight/"+e[r];break;case"fromNodeId":t+="/fromnode/"+e[r];break;case"toNodeId":t+="/tonode/"+e[r];break;case"weightField":t+="/weightfield/"+e[r]}return t}}}n.UpdateEdgeWeightService=fa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ya{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",Se.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}n.UpdateTurnNodeWeightParameters=ya; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ga extends qt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ya){var t=this,r=t.parse(e);t.url=Se.urlPathAppend(t.url,r);var s=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:s,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var r in e)if(""!==e[r]&&"turnNodeWeight"!==e[r])switch(r){case"nodeId":t+="/turnnodeweight/"+e[r];break;case"fromEdgeId":t+="/fromedge/"+e[r];break;case"toEdgeId":t+="/toedge/"+e[r];break;case"weightField":t+="/weightfield/"+e[r]}return t}}}n.UpdateTurnNodeWeightService=ga; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class va{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=te.CLIP,this.output=null,this.mappingParameters=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof Ut&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof jt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var r in e)"datasetName"!==r?"output"!==r?(t.analyst=t.analyst||{},t.analyst[r]=e[r],"mappingParameters"===r&&(t.analyst[r]=t.analyst[r]||{},t.analyst.mappingParameters=e[r])):(t.output=t.output||{},t.output=e[r]):(t.input=t.input||{},t.input[r]=e[r])}}n.VectorClipJobsParameter=va; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Sa extends Ht{constructor(e,t){super(e,t),this.url=Se.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(Se.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,va,t)}}n.VectorClipJobsService=Sa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ba{constructor(e){e=e||{},this.type=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}}n.RasterFunctionParameter=ba;n.NDVIParameter= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends ba{constructor(e){super(e),this.redIndex=0,this.nirIndex=1,this.colorMap="0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff",this.type=ue.NDVI,Se.extend(this,e),this.CLASS_NAME="SuperMap.NDVIParameter"}destroy(){super.destroy(),this.redIndex=null,this.nirIndex=null,this.colorMap=null}toJSON(){return{redIndex:this.redIndex,nirIndex:this.nirIndex,colorMap:this.colorMap,type:this.type}}};n.HillshadeParameter= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends ba{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=ue.HILLSHADE,Se.extend(this,e),this.CLASS_NAME="SuperMap.HillshadeParameter"}destroy(){super.destroy(),this.altitude=null,this.azimuth=null,this.zFactor=null}toJSON(){return{altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,type:this.type}}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class xa{constructor(e){this.name=null,this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobCustomItems",Se.extend(this,e)}destroy(){this.name=null,this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={name:this.name};return this.title&&(e.title=this.title),this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),Se.toJSON(e)}}n.WebPrintingJobCustomItems=xa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ca{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobImage",Se.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl&&(e.picAsUrl=this.picAsUrl),this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),Se.toJSON(e)}}n.WebPrintingJobImage=Ca; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ta{constructor(e){this.name=null,this.layerType=null,this.url=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayers",Se.extend(this,e)}destroy(){this.name=null,this.layerType=null,this.url=null}}n.WebPrintingJobLayers=Ta; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class _a{constructor(e){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers=null,this.customItems=null,this.CLASS_NAME="SuperMap.WebPrintingJobLegendOptions",Se.extend(this,e)}destroy(){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers instanceof Ta&&(this.layers.destroy(),this.layers=null),this.customItems instanceof xa&&(this.customItems.destroy(),this.customItems=null)}toJSON(){var e={title:this.title||""};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64?e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,""):this.customItems&&(e.customItems=this.customItems),Se.toJSON(e)}}n.WebPrintingJobLegendOptions=_a; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class wa{constructor(e){this.center=null,this.scale=null,this.layerNames=null,this.image=null,this.layers=null,this.CLASS_NAME="SuperMap.WebPrintingJobLittleMapOptions",Se.extend(this,e)}destroy(){this.center=null,this.scale=null,this.layerNames=null,this.image instanceof Ca&&(this.image.destroy(),this.image=null),this.layers instanceof Ta&&(this.layers.destroy(),this.layers=null)}toJSON(){var e={scale:this.scale,center:this.center};return this.layerNames?e.layerNames=this.layerNames:this.layers&&(e.layers=this.layers),this.image&&(e.image=this.image),Se.toJSON(e)}}n.WebPrintingJobLittleMapOptions=wa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ma{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobNorthArrowOptions",Se.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),Se.toJSON(e)}}n.WebPrintingJobNorthArrowOptions=Ma; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ea{constructor(e){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null,this.CLASS_NAME="SuperMap.WebPrintingJobScaleBarOptions",Se.extend(this,e)}destroy(){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null}toJSON(){var e={scaleText:this.scaleText||"",type:this.type||"BAR",intervals:this.intervals||"",unit:this.unit||"METER"};return this.orientation&&(e.orientation=this.orientation),Se.toJSON(e)}}n.WebPrintingJobScaleBarOptions=Ea; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Aa{constructor(e){this.type=null,this.url=null,this.token=null,this.value=null,this.CLASS_NAME="SuperMap.WebPrintingJobContent",Se.extend(this,e)}destroy(){this.type="WEBMAP",this.url=null,this.token=null,this.value=null}toJSON(){var e={type:this.type};return this.token&&(e.token=this.token),this.url?e.url=this.url:this.value&&(e.value=this.value),Se.toJSON(e)}}n.WebPrintingJobContent=Aa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Pa{constructor(e){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions=null,this.northArrowOptions=null,this.littleMapOptions=null,this.legendOptions=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayoutOptions",Se.extend(this,e)}destroy(){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions instanceof Ea&&(this.scaleBarOptions.destroy(),this.scaleBarOptions=null),this.northArrowOptions instanceof Ma&&(this.northArrowOptions.destroy(),this.northArrowOptions=null),this.littleMapOptions instanceof wa&&(this.littleMapOptions.destroy(),this.littleMapOptions=null),this.legendOptions instanceof _a&&(this.legendOptions.destroy(),this.legendOptions=null)}toJSON(){var e={templateName:this.templateName,title:this.title,subTitle:this.subTitle,author:this.author,copyright:this.copyright};return this.scaleBarOptions&&(e.scaleBarOptions=this.scaleBarOptions),this.northArrowOptions&&(e.northArrowOptions=this.northArrowOptions),this.littleMapOptions&&(e.littleMapOptions=this.littleMapOptions),this.legendOptions&&(e.legendOptions=this.legendOptions),Se.toJSON(e)}}n.WebPrintingJobLayoutOptions=Pa; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Oa{constructor(e){this.format=null,this.dpi=96,this.scale=null,this.rotation=null,this.center=null,this.CLASS_NAME="SuperMap.WebPrintingJobExportOptions",Se.extend(this,e)}destroy(){this.format=null,this.dpi=null,this.scale=null,this.rotation=null,this.center=null,this.outputSize=null}toJSON(){var e={format:this.format||"PDF",dpi:this.dpi,scale:this.scale,center:this.center};return this.rotation&&(e.rotation=this.rotation),this.outputSize&&(e.outputSize=this.outputSize),Se.toJSON(e)}}n.WebPrintingJobExportOptions=Oa;n.WebPrintingJobParameters= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class{constructor(e){e&&(this.content=null,this.layoutOptions=null,this.exportOptions=null,Se.extend(this,e),this.CLASS_NAME="SuperMap.WebPrintingJobParameters")}destroy(){this.content instanceof Aa&&(this.content.destroy(),this.content=null),this.layoutOptions instanceof Pa&&(this.layoutOptions.destroy(),this.layoutOptions=null),this.exportOptions instanceof Oa&&(this.exportOptions.destroy(),this.exportOptions=null)}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class La extends bt{constructor(e,t){super(e,t),t&&Se.extend(this,t),this.CLASS_NAME="SuperMap.WebPrintingService",this.url}destroy(){super.destroy()}createWebPrintingJob(e){if(e){e.layoutOptions&&e.layoutOptions.legendOptions&&(!e.layoutOptions.legendOptions.title&&(e.layoutOptions.legendOptions.title=""),e.layoutOptions.legendOptions.picAsBase64=e.layoutOptions.legendOptions.picAsBase64&&e.layoutOptions.legendOptions.picAsBase64.replace(/^data:.+;base64,/,""),e.layoutOptions.legendOptions.customItems&&e.layoutOptions.legendOptions.customItems.hasOwnProperty("picAsBase64")&&(e.layoutOptions.legendOptions.customItems.picAsBase64=e.layoutOptions.legendOptions.customItems.picAsBase64.replace(/^data:.+;base64,/,"")));var t=this;t.request({url:t._processUrl("jobs"),method:"POST",data:Se.toJSON(e),scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}getPrintingJob(e){var t=this,r=t._processUrl(`jobs/${e}`);t.request({url:r,method:"GET",scope:t,success:function(e){t.rollingProcess(e,r)},failure:t.serviceProcessFailed})}getPrintingJobResult(e){var t=this;t.request({url:t._processUrl(`jobs/${e}/result`),method:"GET",scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}getLayoutTemplates(){var e=this;e.request({url:e._processUrl("layouts"),method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}rollingProcess(e,t){var r=this;if(e)var s=setInterval(function(){r.request({url:t,method:"GET",scope:r,success:function(e){switch(e.status){case"FINISHED":clearInterval(s),r.serviceProcessCompleted(e);break;case"ERROR":clearInterval(s),r.serviceProcessFailed(e);break;case"RUNNING":r.events.triggerEvent("processRunning",e)}},failure:r.serviceProcessFailed})},1e3)}_processUrl(e){return e?Se.urlPathAppend(this.url,e):this.url}}n.WebPrintingService=La; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var Ia=n.ServiceStatus={DOES_NOT_INVOLVE:"DOES_NOT_INVOLVE",PUBLISH_FAILED:"PUBLISH_FAILED",PUBLISHED:"PUBLISHED",PUBLISHING:"PUBLISHING",UNPUBLISHED:"UNPUBLISHED",UNPUBLISHED_FAILED:"UNPUBLISHED_FAILED"},Na=n.DataItemType={AUDIO:"AUDIO",COLOR:"COLOR",COLORSCHEME:"COLORSCHEME",CSV:"CSV",EXCEL:"EXCEL",FILLSYMBOL:"FILLSYMBOL",IMAGE:"IMAGE",LAYERTEMPLATE:"LAYERTEMPLATE",LAYOUTTEMPLATE:"LAYOUTTEMPLATE",LINESYMBOL:"LINESYMBOL",MAPTEMPLATE:"MAPTEMPLATE",MARKERSYMBOL:"MARKERSYMBOL",MBTILES:"MBTILES",PHOTOS:"PHOTOS",SHP:"SHP",SMTILES:"SMTILES",SVTILES:"SVTILES",THEMETEMPLATE:"THEMETEMPLATE",TPK:"TPK",UDB:"UDB",UGCV5:"UGCV5",UNKNOWN:"UNKNOWN",VIDEO:"VIDEO",WORKENVIRONMENT:"WORKENVIRONMENT",WORKSPACE:"WORKSPACE"},Ra=n.DataItemOrderBy={FILENAME:"FILENAME",ID:"ID",LASTMODIFIEDTIME:"LASTMODIFIEDTIME",NICKNAME:"NICKNAME",SERVICESTATUS:"SERVICESTATUS",SIZE:"SIZE",STATUS:"STATUS",TYPE:"TYPE",UPDATETIME:"UPDATETIME",USERNAME:"USERNAME"},Fa=n.FilterField={LINKPAGE:"LINKPAGE",MAPTITLE:"MAPTITLE",NICKNAME:"NICKNAME",RESTITLE:"RESTITLE",USERNAME:"USERNAME"}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Da{constructor(e){e=e||{},Se.extend(this,e),this.serverType=l.ONLINE,this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,r,s={}){return t=this.createCredentialUrl(t),s.crossOrigin=this.options.crossOrigin,s.headers=this.options.headers,tt.commit(e,t,r,s).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,r=this.getCredential();if(r){var s="key="+r,i=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===i?t+=s:t.indexOf("?")>-1&&"?"!==i?t+="&"+s:t+="?"+s}return t}getCredential(){}}n.OnlineServiceBase=Da; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class ka extends Da{constructor(e,t){super(e),t=t||{},this.MD5=null,this.type=null,this.userName=null,this.fileName=null,this.size=null,this.serviceStatus=null,this.serviceId=null,this.id=null,this.lastModfiedTime=null,this.status=null,this.storageId=null,this.publishInfo=null,this.authorizeSetting=null,this.nickname=null,this.tags=[],this.description=null,this.dataItemServices=null,this.coordType=null,this.dataCheckResult=null,this.dataMetaInfo=null,this.thumbnail=null,Se.extend(this,t),this.id&&(this.serviceUrl=e+"/"+this.id),this.CLASS_NAME="SuperMap.OnlineData"}load(){if(this.serviceUrl){var e=this;return e.request("GET",this.serviceUrl).then(function(t){Se.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}n.OnlineData=ka; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ga{constructor(){this.rootUrl="https://www.supermapol.com",this.webUrl=this.rootUrl+"/web";var e=this.webUrl+"/mycontent";this.mDatasUrl=e+"/datas",this.CLASS_NAME="SuperMap.Online"}load(){return tt.get(this.rootUrl).then(function(e){return e})}login(){rt.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,r=t.mDatasUrl;return e&&(e=e.toJSON()),tt.get(r,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var r=[],s=e.content,i=s.length,a=0;at.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),r})}_distance(e,t,r,s){return Math.sqrt((e-r)*(e-r)+(t-s)*(t-s))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}n.ElasticSearch=za; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class qa{constructor(){this.BUILTIN_OBJECT={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},this._ctx=null,this._canvas=null,this._pixelCtx=null,this._width=null,this._height=null,this._offsetX=0,this._offsetY=0,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Util"}clone(e){var t=this.BUILTIN_OBJECT;if("object"==typeof e&&null!==e){var r=e;if(e instanceof Array){r=[];for(var s=0,i=e.length;sa&&(a=e+o+100,s.width=a,r=!0),t+l>n&&(n=t+l+100,s.height=n,r=!0),e<-o&&(a+=o=100*Math.ceil(-e/100),s.width=a,r=!0),t<-l&&(n+=l=100*Math.ceil(-t/100),s.height=n,r=!0),r&&i.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,s=e.length;r1)for(var i=0,a=s-1;i1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var r=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=r[0],e[2]=r[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}toArray(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],r=0;return e.replace(/[\d.]+/g,function(e){r<3?e|=0:e=+e,t[r++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var r=this.getData(e),s=r[3];return void 0===s&&(s=1),e.indexOf("hsb")>-1?r=this._HSV_2_RGB(r):e.indexOf("hsl")>-1&&(r=this._HSL_2_RGB(r)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?r=this._RGB_2_HSB(r):t.indexOf("hsl")>-1&&(r=this._RGB_2_HSL(r)),r[3]=s,this.toColor(r,t)}toRGBA(e){return this.convert(e,"rgba")}toRGB(e){return this.convert(e,"rgb")}toHex(e){return this.convert(e,"hex")}toHSVA(e){return this.convert(e,"hsva")}toHSV(e){return this.convert(e,"hsv")}toHSBA(e){return this.convert(e,"hsba")}toHSB(e){return this.convert(e,"hsb")}toHSLA(e){return this.convert(e,"hsla")}toHSL(e){return this.convert(e,"hsl")}toName(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}trim(e){return String(e).replace(/\s+/g,"")}normalize(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,r=(240&e)<<4,s=15&e;e="#"+((1<<24)+(t<<4)+t+(r<<4)+r+(s<<4)+s).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var r=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var s=this.getData(e),i=0;i<3;i++)s[i]=1===r?s[i]*(1-t)|0:(255-s[i])*t+s[i]|0;return"rgb("+s.join(",")+")"}reverse(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}mix(e,t,r){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===r&&(r=.5);for(var s=2*(r=1-this.adjust(r,[0,1]))-1,i=this.getData(this.toRGBA(e)),a=this.getData(this.toRGBA(t)),n=i[3]-a[3],o=((s*n==-1?s:(s+n)/(1+s*n))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=i[u]*o+a[u]*l;var c=i[3]*r+a[3]*(1-r);return c=Math.max(0,Math.min(1,c)),1===i[3]&&1===a[3]?this.toColor(h,"rgb"):(h[3]=c,this.toColor(h,"rgba"))}random(){return"#"+Math.random().toString(16).slice(2,8)}getData(e){var t,r,s=(e=this.normalize(e)).match(this.colorRegExp);if(null===s)throw new Error("The color format error");var i,a=[];if(s[2])i=[(t=s[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],a=this.map(i,function(e){return Wa.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(s[4]){var n=s[4].split(",");r=n[3],i=n.slice(0,3),a=this.map(i,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),Wa.prototype.adjust.call(this,e,[0,255])}),void 0!==r&&a.push(this.adjust(parseFloat(r),[0,1]))}else if(s[5]||s[6]){var o=(s[5]||s[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];r=o[3],(a=this.map([h,u],function(e){return Wa.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==r&&a.push(this.adjust(parseFloat(r),[0,1]))}return a}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var r=this.getData(this.toRGBA(e));return r[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(r,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var r=e?e.length:0,s=0;s=t[1]&&(e=t[1]),e}isCalculableColor(e){return e instanceof Array||"string"==typeof e}_HSV_2_RGB(e){var t,r,s,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,r=255*n,s=255*n;else{var o=6*i;6===o&&(o=0);var l=0|o,h=n*(1-a),u=n*(1-a*(o-l)),c=n*(1-a*(1-(o-l))),d=0,p=0,m=0;0===l?(d=n,p=c,m=h):1===l?(d=u,p=n,m=h):2===l?(d=h,p=n,m=c):3===l?(d=h,p=u,m=n):4===l?(d=c,p=h,m=n):(d=n,p=h,m=u),t=255*d,r=255*p,s=255*m}return[t,r,s]}_HSL_2_RGB(e){var t,r,s,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,r=255*n,s=255*n;else{var o,l=2*n-(o=n<.5?n*(1+a):n+a-a*n);t=255*this._HUE_2_RGB(l,o,i+1/3),r=255*this._HUE_2_RGB(l,o,i),s=255*this._HUE_2_RGB(l,o,i-1/3)}return[t,r,s]}_HUE_2_RGB(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?e+6*(t-e)*r:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}_RGB_2_HSB(e){var t,r,s=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(s,i,a),o=Math.max(s,i,a),l=o-n,h=o;if(0===l)t=0,r=0;else{r=l/o;var u=((o-s)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;s===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,h*=100]}_RGB_2_HSL(e){var t,r,s=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(s,i,a),o=Math.max(s,i,a),l=o-n,h=(o+n)/2;if(0===l)t=0,r=0;else{r=h<.5?l/(o+n):l/(2-o-n);var u=((o-s)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;s===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,h*=100]}}var Ya=new Wa;class Xa{static createCanvas(e,t){var r=document.createElement("canvas");return r.height=e,r.width=t,r.getContext("2d")}static getLinearGradient(e,t,r,s,i){this._ctx||(this._ctx=this.getContext());for(var a=this._ctx.createLinearGradient(e,t,r,s),n=i.length,o=1/(n-1),l=0,h=0;h=t)if("RANGE"===r)for(i=0;i=0&&this.getSqrtInterval(e,r)}if("logarithm"===t){return this.getMin(e)>0&&this.getGeometricProgression(e,r)}}static getSum(e){return this.getInstance(e).sum()}static getMax(e){return this.getInstance(e).max()}static getMin(e){return this.getInstance(e).min()}static getMean(e){return this.getInstance(e).mean()}static getMedian(e){return this.getInstance(e).median()}static getTimes(e){return e.length}static getEqInterval(e,t){return this.getInstance(e).getClassEqInterval(t)}static getJenks(e,t){return this.getInstance(e).getClassJenks(t)}static getSqrtInterval(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}static getGeometricProgression(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}n.ArrayStatistic=Qa;var Ka=r(40),Za=r.n(Ka); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class $a{constructor(e){this.env=null,this.parser=null,this.ruleSet=null,this.cartoStr="",this.shaders=null,"string"==typeof e&&(this.cartoStr=e,this.env={frames:[],errors:[],error:function(e){this.errors.push(e)}},this.parser=this.getParser(this.env),this.parse(e),this.shaders=this.toShaders())}getParser(e){var t,r,s,i,a,o,l,h,u,c=this;function d(){i=l[s],a=r,h=r}function p(){l[s]=i,h=r=a}function m(){r>h&&(l[s]=l[s].slice(r-h),h=r)}function f(e){var i,a,n,o;if(e instanceof Function)return e.call(u.parsers);if("string"==typeof e)i=t.charAt(r)===e?e:null,a=1,m();else{if(m(),!(i=e.exec(l[s])))return null;a=i[0].length}if(i){var c=r+=a;for(o=r+l[s].length-a;r=0&&"\n"!==s.charAt(n);n--)r.column++;return new Error([r.filename,r.line,r.column,r.message].join(";"))}return this.env=e=e||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},u={parse:function(i){var a,u=null;if(r=s=h=o=0,l=[],t=i.replace(/\r\n/g,"\n"),e.filename&&(c.env.inputs[e.filename]=t),l=function(e){for(var r,s,i,a,n=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,h=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,d=e[0],p=0;p0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),u)throw y(u);var d=function(e,t){var r=e.specificity,s=t.specificity;return r[0]!=s[0]?s[0]-r[0]:r[1]!=s[1]?s[1]-r[1]:r[2]!=s[2]?s[2]-r[2]:s[3]-r[3]};return(a=new n.CartoCSS.Tree.Ruleset([],f(this.parsers.primary))).root=!0,a.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+y(t).message:e.errors.message=y(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(d),t},a},parsers:{primary:function(){for(var e,t=[];(e=f(this.rule)||f(this.ruleset)||f(this.comment))||f(/^[\s\n]+/)||(e=f(this.invalid));)e&&t.push(e);return t},invalid:function(){var e=f(/^[^;\n]*[;\n]/);if(e)return new n.CartoCSS.Tree.Invalid(e,a)},comment:function(){var e;if("/"===t.charAt(r))return"/"===t.charAt(r+1)?new n.CartoCSS.Tree.Comment(f(/^\/\/.*/),!0):(e=f(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new n.CartoCSS.Tree.Comment(e):void 0},entities:{quoted:function(){if('"'===t.charAt(r)||"'"===t.charAt(r)){var e=f(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return e?new n.CartoCSS.Tree.Quoted(e[1]||e[2]):void 0}},field:function(){if(f("[")){var e=f(/(^[^\]]+)/);if(f("]"))return e?new n.CartoCSS.Tree.Field(e[1]):void 0}},comparison:function(){var e=f(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var e=f(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(e)return new n.CartoCSS.Tree.Keyword(e)},call:function(){var e,t;if(e=/^([\w\-]+|%)\(/.exec(l[s])){if("url"===(e=e[1]))return null;r+=e.length;if(f("("),t=f(this.entities.arguments),f(")"))return e?new n.CartoCSS.Tree.Call(e,t,r):void 0}},arguments:function(){for(var e,t=[];e=f(this.expression);){t.push(e);if(!f(","))break}return t},literal:function(){return f(this.entities.dimension)||f(this.entities.keywordcolor)||f(this.entities.hexcolor)||f(this.entities.quoted)},url:function(){var e;if("u"===t.charAt(r)&&f(/^url\(/)){e=f(this.entities.quoted)||f(this.entities.variable)||f(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return f(")")?new n.CartoCSS.Tree.URL(void 0!==e.value||e instanceof n.CartoCSS.Tree.Variable?e:new n.CartoCSS.Tree.Quoted(e)):new n.CartoCSS.Tree.Invalid(e,a,"Missing closing ) in URL.")}},variable:function(){var s,i=r;if("@"===t.charAt(r)&&(s=f(/^@[\w-]+/)))return new n.CartoCSS.Tree.Variable(s,i,e.filename)},hexcolor:function(){var e;if("#"===t.charAt(r)&&(e=f(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new n.CartoCSS.Tree.Color(e[1])},keywordcolor:function(){var e=l[s].match(/^[a-z]+/);if(e&&e[0]in n.CartoCSS.Tree.Reference.data.colors)return new n.CartoCSS.Tree.Color(n.CartoCSS.Tree.Reference.data.colors[f(/^[a-z]+/)])},dimension:function(){var e=t.charCodeAt(r);if(!(e>57||e<45||47===e)){var s=f(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return s?new n.CartoCSS.Tree.Dimension(s[1],s[2],a):void 0}}},variable:function(){var e;if("@"===t.charAt(r)&&(e=f(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=f(this.entities.call)||f(this.entities.literal),t=f(this.entities.field)||f(this.entities.variable),r=f(this.entities.url)||f(this.entities.keyword);return e||t||r},end:function(){var e;return f(";")||("string"==typeof(e="}")?t.charAt(r)===e:!!e.test(l[s]))},element:function(){var e=f(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(e)return new n.CartoCSS.Tree.Element(e)},attachment:function(){var e=f(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var e,s,i,o,l,h=[],u=new n.CartoCSS.Tree.Filterset,c=[],d=0,p=0;(i=f(this.element))||(l=f(this.zoom))||(o=f(this.filter))||(e=f(this.attachment));){if(d++,i)h.push(i);else if(l)c.push(l),p++;else if(o){var m=u.add(o);if(m)throw y({message:m,index:r-1});p++}else{if(s)throw y({message:"Encountered second attachment name.",index:r-1});s=e}var g=t.charAt(r);if("{"===g||"}"===g||";"===g||","===g)break}if(d)return new n.CartoCSS.Tree.Selector(u,c,h,s,p,a)},filter:function(){d();var t,r,s;if(f("[")&&(t=f(/^[a-zA-Z0-9\-_]+/)||f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.keyword)||f(this.entities.field))&&(t instanceof n.CartoCSS.Tree.Quoted&&(t=new n.CartoCSS.Tree.Field(t.toString())),(r=f(this.entities.comparison))&&(s=f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.dimension)||f(this.entities.keyword)||f(this.entities.field)))){if(!f("]"))throw y({message:"Missing closing ] of filter.",index:a-1});return t.is||(t=new n.CartoCSS.Tree.Field(t)),new n.CartoCSS.Tree.Filter(t,r,s,a,e.filename)}},zoom:function(){d();var e,t;if(f(/^\[\s*zoom/g)&&(e=f(this.entities.comparison))&&(t=f(this.entities.variable)||f(this.entities.dimension))&&f("]"))return new n.CartoCSS.Tree.Zoom(e,t,a);p()},block:function(){var e;if(f("{")&&(e=f(this.primary))&&f("}"))return e},ruleset:function(){var e,t,r=[];for(d();e=f(this.selector);){for(r.push(e);f(this.comment););if(!f(","))break;for(;f(this.comment););}if(e)for(;f(this.comment););if(r.length>0&&(t=f(this.block))){if(1===r.length&&r[0].elements.length&&"Map"===r[0].elements[0].value){var s=new n.CartoCSS.Tree.Ruleset(r,t);return s.isMap=!0,s}return new n.CartoCSS.Tree.Ruleset(r,t)}p()},rule:function(){var s,i,l=t.charAt(r);if(d(),"."!==l&&"#"!==l&&(s=f(this.variable)||f(this.property))){if((i=f(this.value))&&f(this.end))return new n.CartoCSS.Tree.Rule(s,i,a,e.filename);o=r,p()}},font:function(){for(var e,t=[],r=[];e=f(this.entity);)r.push(e);if(t.push(new n.CartoCSS.Tree.Expression(r)),f(","))for(;(e=f(this.expression))&&(t.push(e),f(",")););return new n.CartoCSS.Tree.Value(t)},value:function(){for(var e,t=[];(e=f(this.expression))&&(t.push(e),f(",")););return t.length>1?new n.CartoCSS.Tree.Value(t.map(function(e){return e.value[0]})):1===t.length?new n.CartoCSS.Tree.Value(t):void 0},sub:function(){var e;if(f("(")&&(e=f(this.expression))&&f(")"))return e},multiplication:function(){var e,t,r,s;if(e=f(this.operand)){for(;(r=f("/")||f("*")||f("%"))&&(t=f(this.operand));)s=new n.CartoCSS.Tree.Operation(r,[s||e,t],a);return s||e}},addition:function(){var e,s,i,o;if(e=f(this.multiplication)){for(;(i=f(/^[-+]\s+/)||" "!=t.charAt(r-1)&&(f("+")||f("-")))&&(s=f(this.multiplication));)o=new n.CartoCSS.Tree.Operation(i,[o||e,s],a);return o||e}},operand:function(){return f(this.sub)||f(this.entity)},expression:function(){for(var e,t=[];e=f(this.addition)||f(this.entity);)t.push(e);if(t.length>0)return new n.CartoCSS.Tree.Expression(t)},property:function(){var e=f(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}parse(e){var t=this.parser;return this.ruleSet=t.parse(e)}toShaders(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var r={},s=[];this._toShaders(r,s,t);for(var i=[],a={},n=0,o=t.length;n=0){if(!t.featureFilter){var a=i+s.length,n=r.indexOf(")",a+1),o="featureId&&(featureId"+r.substring(a,n)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:p,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+r+";} return _value; ")}}return{property:p,getValue:Function("attributes","zoom","var _value = null;"+r+"; return _value; ")}}(u[p],c);Object.defineProperty(c,"attachment",{configurable:!0,enumerable:!1,value:h}),Object.defineProperty(c,"elements",{configurable:!0,enumerable:!1,value:l.elements}),i.push(c),a[s[n]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return i}}return null}_toShaders(e,t,r){for(let s=0,i=r.length;s= minzoom - 1e-6 and scale < maxzoom + 1e-6"},maxzoom:{"default-value":"1.79769e+308",type:"float","default-meaning":"The layer will be visible at the maximum possible scale",doc:"The maximum scale denominator that this layer will be visible at. The default is the numeric limit of the C++ double type, which may vary slightly by system, but is likely a massive number like 1.79769e+308 and ensures that this layer will always be visible unless the value is reduced. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},queryable:{"default-value":!1,type:"boolean","default-meaning":"The layer will not be available for the direct querying of data values",doc:"This property was added for GetFeatureInfo/WMS compatibility and is rarely used. It is off by default meaning that in a WMS context the layer will not be able to be queried unless the property is explicitly set to true"},"clear-label-cache":{"default-value":!1,type:"boolean","default-meaning":"The renderer's collision detector cache (used for avoiding duplicate labels and overlapping markers) will not be cleared immediately before processing this layer",doc:"This property, by default off, can be enabled to allow a user to clear the collision detector cache before a given layer is processed. This may be desirable to ensure that a given layers data shows up on the map even if it normally would not because of collisions with previously rendered labels or markers"},"group-by":{"default-value":"",type:"string","default-meaning":"No special layer grouping will be used during rendering",doc:"https://github.com/mapnik/mapnik/wiki/Grouped-rendering"},"buffer-size":{"default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:"Extra tolerance around the Layer extent (in pixels) used to when querying and (potentially) clipping the layer data during rendering"},"maximum-extent":{"default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query this specific layer data during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Layer."}},symbolizers:{"*":{"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},map:{"background-color":{css:"background-color","default-value":"none","default-meaning":"transparent",type:"color",doc:"Map Background color"},"background-image":{css:"background-image",type:"uri","default-value":"","default-meaning":"transparent",doc:"An image that is repeated below all features on a map as a background.",description:"Map Background image"},srs:{css:"srs",type:"string","default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},line:{stroke:{css:"line-color","default-value":"rgba(0,0,0,1)",type:"color","default-meaning":"black and fully opaque (alpha = 1), same as rgb(0,0,0)",doc:"The color of a drawn line"},"stroke-width":{css:"line-width","default-value":1,type:"float",doc:"The width of a line in pixels"},"stroke-opacity":{css:"line-opacity","default-value":1,type:"float","default-meaning":"opaque",doc:"The opacity of a line"},"stroke-linejoin":{css:"line-join","default-value":"miter",type:["miter","round","bevel"],doc:"The behavior of lines when joining"},"stroke-linecap":{css:"line-cap","default-value":"butt",type:["butt","round","square"],doc:"The display of line endings"},"stroke-gamma":{css:"line-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of stroke line"},"stroke-gamma-method":{css:"line-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},"stroke-dasharray":{css:"line-dasharray",type:"numbers",doc:"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.","default-value":"none","default-meaning":"solid line"},"stroke-dashoffset":{css:"line-dash-offset",type:"numbers",doc:"valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled)","default-value":"none","default-meaning":"solid line"},"stroke-miterlimit":{css:"line-miterlimit",type:"float",doc:"The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts.","default-value":4,"default-meaning":"Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'"},clip:{css:"line-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},offset:{css:"line-offset",type:"float","default-value":0,"default-meaning":"no offset",doc:"Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line)."},rasterizer:{css:"line-rasterizer",type:["full","fast"],"default-value":"full",doc:"Exposes an alternate AGG rendering method that sacrifices some accuracy for speed."},"geometry-transform":{css:"line-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},markers:{file:{css:"marker-file",doc:"An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.","default-value":"","default-meaning":"An ellipse or circle, if width equals height",type:"uri"},opacity:{css:"marker-opacity",doc:"The overall opacity of the marker, if set, overrides both the opacity of both the fill and stroke","default-value":1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"expression"},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"expression"},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color"},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"marker-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"marker-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},shield:{name:{css:"shield-name",type:"expression",serialization:"content",doc:'Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]'},file:{css:"shield-file",required:!0,type:"uri","default-value":"none",doc:"Image file to render behind the shield text"},"face-name":{css:"shield-face-name",type:"string",validate:"font",doc:"Font name and style to use for the shield text","default-value":"",required:!0},"unlock-image":{css:"shield-unlock-image",type:"boolean",doc:"This parameter should be set to true if you are trying to position text beside rather than on top of the shield image","default-value":!1,"default-meaning":"text alignment relative to the shield image uses the center of the image as the anchor for text positioning."},size:{css:"shield-size",type:"float",doc:"The size of the shield text in pixels"},fill:{css:"shield-fill",type:"color",doc:"The color of the shield text"},placement:{css:"shield-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons."},"avoid-edges":{css:"shield-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.",type:"boolean","default-value":!1},"allow-overlap":{css:"shield-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping shields are shown or hidden.","default-meaning":"Do not allow shields to overlap with other map elements already placed."},"minimum-distance":{css:"shield-min-distance",type:"float","default-value":0,doc:"Minimum distance to the next shield symbol, not necessarily the same shield."},spacing:{css:"shield-spacing",type:"float","default-value":0,doc:"The spacing between repeated occurrences of the same shield on a line"},"minimum-padding":{css:"shield-min-padding","default-value":0,doc:"Determines the minimum amount of padding that a shield gets relative to other shields",type:"float"},"wrap-width":{css:"shield-wrap-width",type:"unsigned","default-value":0,doc:"Length of a chunk of text in characters before wrapping text"},"wrap-before":{css:"shield-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"shield-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long names."},"halo-fill":{css:"shield-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"shield-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},"character-spacing":{css:"shield-character-spacing",type:"unsigned","default-value":0,doc:"Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."},"line-spacing":{css:"shield-line-spacing",doc:"Vertical spacing between lines of multiline labels (in pixels)",type:"unsigned"},dx:{css:"shield-text-dx",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"shield-text-dy",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"shield-dx":{css:"shield-dx",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},"shield-dy":{css:"shield-dy",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},opacity:{css:"shield-opacity",type:"float",doc:"(Default 1.0) - opacity of the image used for the shield","default-value":1},"text-opacity":{css:"shield-text-opacity",type:"float",doc:"(Default 1.0) - opacity of the text placed on top of the shield","default-value":1},"horizontal-alignment":{css:"shield-horizontal-alignment",type:["left","middle","right","auto"],doc:"The shield's horizontal alignment from its centerpoint","default-value":"auto"},"vertical-alignment":{css:"shield-vertical-alignment",type:["top","middle","bottom","auto"],doc:"The shield's vertical alignment from its centerpoint","default-value":"middle"},"text-transform":{css:"shield-text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"justify-alignment":{css:"shield-justify-alignment",type:["left","center","right","auto"],doc:"Define how text in a shield's label is justified","default-value":"auto"},clip:{css:"shield-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"shield-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"line-pattern":{file:{css:"line-pattern-file",type:"uri","default-value":"none",required:!0,doc:"An image file to be repeated and warped along a line"},clip:{css:"line-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"line-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"polygon-pattern":{file:{css:"polygon-pattern-file",type:"uri","default-value":"none",required:!0,doc:"Image to use as a repeated pattern fill within a polygon"},alignment:{css:"polygon-pattern-alignment",type:["local","global"],"default-value":"local",doc:"Specify whether to align pattern fills to the layer or to the map."},gamma:{css:"polygon-pattern-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon pattern edges"},opacity:{css:"polygon-pattern-opacity",type:"float",doc:"(Default 1.0) - Apply an opacity level to the image used for the pattern","default-value":1,"default-meaning":"The image is rendered without modifications"},clip:{css:"polygon-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},raster:{opacity:{css:"raster-opacity","default-value":1,"default-meaning":"opaque",type:"float",doc:"The opacity of the raster symbolizer on top of other symbolizers."},"filter-factor":{css:"raster-filter-factor","default-value":-1,"default-meaning":"Allow the datasource to choose appropriate downscaling.",type:"float",doc:"This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed."},scaling:{css:"raster-scaling",type:["near","fast","bilinear","bilinear8","bicubic","spline16","spline36","hanning","hamming","hermite","kaiser","quadric","catrom","gaussian","bessel","mitchell","sinc","lanczos","blackman"],"default-value":"near",doc:"The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality."},"mesh-size":{css:"raster-mesh-size","default-value":16,"default-meaning":"Reprojection mesh will be 1/16 of the resolution of the source image",type:"unsigned",doc:"A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion."},"comp-op":{css:"raster-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},point:{file:{css:"point-file",type:"uri",required:!1,"default-value":"none",doc:"Image file to represent a point"},"allow-overlap":{css:"point-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping points are shown or hidden.","default-meaning":"Do not allow points to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"point-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},opacity:{css:"point-opacity",type:"float","default-value":1,"default-meaning":"Fully opaque",doc:"A value from 0 to 1 to control the opacity of the point"},placement:{css:"point-placement",type:["centroid","interior"],doc:"How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.","default-value":"centroid"},transform:{css:"point-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},"comp-op":{css:"point-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},text:{name:{css:"text-name",type:"expression",required:!0,"default-value":"",serialization:"content",doc:"Value to use for a text label. Data columns are specified using brackets like [column_name]"},"face-name":{css:"text-face-name",type:"string",validate:"font",doc:"Font name and style to render a label in",required:!0},size:{css:"text-size",type:"float","default-value":10,doc:"Text size in pixels"},"text-ratio":{css:"text-ratio",doc:"Define the amount of text (of the total) present on successive lines when wrapping occurs","default-value":0,type:"unsigned"},"wrap-width":{css:"text-wrap-width",doc:"Length of a chunk of text in characters before wrapping text","default-value":0,type:"unsigned"},"wrap-before":{css:"text-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"text-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long text."},spacing:{css:"text-spacing",type:"unsigned",doc:"Distance between repeated text labels on a line (aka. label-spacing)"},"character-spacing":{css:"text-character-spacing",type:"float","default-value":0,doc:"Horizontal spacing adjustment between characters in pixels"},"line-spacing":{css:"text-line-spacing","default-value":0,type:"unsigned",doc:"Vertical spacing adjustment between lines in pixels"},"label-position-tolerance":{css:"text-label-position-tolerance","default-value":0,type:"unsigned",doc:"Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line)"},"max-char-angle-delta":{css:"text-max-char-angle-delta",type:"float","default-value":"22.5",doc:"The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners."},fill:{css:"text-fill",doc:"Specifies the color for the text","default-value":"#000000",type:"color"},opacity:{css:"text-opacity",doc:"A number from 0 to 1 specifying the opacity for the text","default-value":1,"default-meaning":"Fully opaque",type:"float"},"halo-fill":{css:"text-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"text-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},dx:{css:"text-dx",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"text-dy",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"vertical-alignment":{css:"text-vertical-alignment",type:["top","middle","bottom","auto"],doc:"Position of label relative to point position.","default-value":"auto","default-meaning":'Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.'},"avoid-edges":{css:"text-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.","default-value":!1,type:"boolean"},"minimum-distance":{css:"text-min-distance",doc:"Minimum permitted distance to the next text symbolizer.",type:"float"},"minimum-padding":{css:"text-min-padding",doc:"Determines the minimum amount of padding that a text symbolizer gets relative to other text",type:"float"},"minimum-path-length":{css:"text-min-path-length",type:"float","default-value":0,"default-meaning":"place labels on all paths",doc:"Place labels only on paths longer than this value."},"allow-overlap":{css:"text-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping text is shown or hidden.","default-meaning":"Do not allow text to overlap with other text - overlapping markers will not be shown."},orientation:{css:"text-orientation",type:"expression",doc:"Rotate the text."},placement:{css:"text-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"Control the style of placement of a point versus the geometry it is attached to."},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"expression","default-value":"0"}}},colors:{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50],transparent:[0,0,0,0]},filter:{value:["true","false","null","point","linestring","polygon","collection"]}},$a.mapnik_reference={version:{latest:n._mapnik_reference_latest,"2.1.1":n._mapnik_reference_latest}},n.CartoCSS=$a,n.CartoCSS.Tree={},n.CartoCSS.Tree.operate=function(e,t,r){switch(e){case"+":return t+r;case"-":return t-r;case"*":return t*r;case"%":return t%r;case"/":return t/r}},n.CartoCSS.Tree.functions={rgb:function(e,t,r){return this.rgba(e,t,r,1)},rgba:function(e,t,r,s){var i=this,a=[e,t,r].map(function(e){return i.number(e)});return s=i.number(s),a.some(isNaN)||isNaN(s)?null:new n.CartoCSS.Tree.Color(a,s)},stop:function(e){var t,r;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(r=arguments[2]),{is:"tag",val:e,color:t,mode:r,toString:s=>'\n\t"}},hsl:function(e,t,r){return this.hsla(e,t,r,1)},hsla:function(e,t,r,s){if([e=this.number(e)%360/360,t=this.number(t),r=this.number(r),s=this.number(s)].some(isNaN))return null;var i=r<=.5?r*(t+1):r+t-r*t,a=2*r-i;return this.rgba(255*n(e+1/3),255*n(e),255*n(e-1/3),s);function n(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?a+(i-a)*e*6:2*e<1?i:3*e<2?a+(i-a)*(2/3-e)*6:a}},hue:function(e){return"toHSL"in e?new n.CartoCSS.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new n.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new n.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new n.CartoCSS.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s+=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},desaturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s-=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},lighten:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l+=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},darken:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l-=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},fadein:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a+=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},fadeout:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a-=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},spin:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL(),s=(r.h+t.value)%360;return r.h=s<0?360+s:s,this.hsla_simple(r)},replace:function(e,t,r){return"field"===e.is?e.toString+".replace("+t.toString()+", "+r.toString()+")":e.replace(t,r)},mix:function(e,t,r){var s=r.value/100,i=2*s-1,a=e.toHSL().a-t.toHSL().a,o=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,l=1-o,h=[e.rgb[0]*o+t.rgb[0]*l,e.rgb[1]*o+t.rgb[1]*l,e.rgb[2]*o+t.rgb[2]*l],u=e.alpha*s+t.alpha*(1-s);return new n.CartoCSS.Tree.Color(h,u)},greyscale:function(e){return this.desaturate(e,new n.CartoCSS.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),r=e.value,s=0;s.5?h/(2-n-o):h/(n+o),n){case r:e=(s-i)/h+(s=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}toColor(){return new n.CartoCSS.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(e,t,r){return"%"===this.unit&&"%"!==r.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===r.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new n.CartoCSS.Tree.Dimension(n.CartoCSS.Tree.operate(t,this.value,this.value*r.value*.01),this.unit):new n.CartoCSS.Tree.Dimension(n.CartoCSS.Tree.operate(t,this.value,r.value),this.unit||r.unit)}},n.CartoCSS.Tree.Element=class{constructor(e){this.value=e.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}specificity(){return["id"===this.type?1:0,"class"===this.type?1:0]}toString(){return this.value}},n.CartoCSS.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(e){return this.value.length>1?new n.CartoCSS.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},n.CartoCSS.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},n.CartoCSS.Tree.Filter=class{constructor(e,t,r,s,i){this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=r,this.index=s,this.filename=i,this.id=this.key+this.op+this.val}ev(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}toString(){return"["+this.id+"]"}},n.CartoCSS.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var r=e.val;void 0!==e._val&&(r=e._val.toString(!0)),e.key&&"scale"===e.key.value?r=+r:"string"!=typeof r&&"object"!=typeof r||(r="'"+r+"'");var s="attributes";return s+"&&"+s+e.key+"&&"+s+e.key+" "+t+r}var r=[];for(var s in this.filters)r.push(t(this.filters[s]));return r.join(" && ")}toString(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}ev(e){for(var t in this.filters)this.filters[t].ev(e);return this}clone(){var e=new n.CartoCSS.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}cloneWith(e){var t=[];for(var r in e.filters){var s=this.addable(e.filters[r]);if(!1===s)return!1;!0===s&&t.push(e.filters[r])}if(!t.length)return null;var i=new n.CartoCSS.Tree.Filterset;for(r in this.filters)i.filters[r]=this.filters[r];for(;r=t.shift();)i.add(r);return i}addable(e){var t=e.key.toString(),r=e.val.toString();switch(r.match(/^[0-9]+(\.[0-9]*)?_match/)&&(r=parseFloat(r)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==r&&null:void 0===this.filters[t+"!="+r]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val"]&&this.filters[t+">"].val>=r?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val":return t+"="in this.filters?!(this.filters[t+"="].val<=r)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=r)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].valr)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)||null))}}conflict(e){var t=e.key.toString(),r=e.val.toString();return isNaN(parseFloat(r))||(r=parseFloat(r)),("="===e.op&&void 0!==this.filters[t+"="]&&r!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&r==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&r===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var r,s=e.key.toString(),i=e.op,a=this.conflict(e);if(a)return a;if("="===i){for(var n in this.filters)this.filters[n].key===s&&delete this.filters[n];this.filters[s+"="]=e}else if("!="===i)this.filters[s+"!="+e.val]=e;else if("=~"===i)this.filters[s+"=~"+e.val]=e;else if(">"===i){for(var o in this.filters)this.filters[o].key===s&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[s+">"]=e}else if(">="===i){for(var l in this.filters)r=+this.filters[l].val.toString(),this.filters[l].key===s&&r",this.filters[s+">"]=e):this.filters[s+">="]=e}else if("<"===i){for(var h in this.filters)r=+this.filters[h].val.toString(),this.filters[h].key===s&&r>=e.val&&delete this.filters[h];this.filters[s+"<"]=e}else if("<="===i){for(var u in this.filters)r=+this.filters[u].val.toString(),this.filters[u].key===s&&r>e.val&&delete this.filters[u];void 0!==this.filters[s+"!="+e.val]?(delete this.filters[s+"!="+e.val],e.op="<",this.filters[s+"<"]=e):this.filters[s+"<="]=e}}},n.CartoCSS.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},n.CartoCSS.Tree.Invalid=class{constructor(e,t,r){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=r||"Invalid code: "+this.chunk}ev(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}},n.CartoCSS.Tree.Keyword=class{ev(){return this}constructor(e){this.value=e;var t={transparent:"color",true:"boolean",false:"boolean"};this.is=t[e]?t[e]:"keyword"}toString(){return this.value}},n.CartoCSS.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},n.CartoCSS.Tree.Operation=class{constructor(e,t,r){this.is="operation",this.op=e.trim(),this.operands=t,this.index=r}ev(e){var t,r=this.operands[0].ev(e),s=this.operands[1].ev(e);return"undefined"===r.is||"undefined"===s.is?{is:"undefined",value:"undefined"}:(r instanceof n.CartoCSS.Tree.Dimension&&s instanceof n.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(t=s,s=r,r=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),r instanceof n.CartoCSS.Tree.Quoted&&s instanceof n.CartoCSS.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r instanceof n.CartoCSS.Tree.Field||s instanceof n.CartoCSS.Tree.Field||r instanceof n.CartoCSS.Tree.Literal||s instanceof n.CartoCSS.Tree.Literal?"color"===r.is||"color"===s.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new n.CartoCSS.Tree.Literal(r.ev(e).toString(!0)+this.op+s.ev(e).toString(!0)):void 0===r.operate?(e.error({message:"Cannot do math with type "+r.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r.operate(e,this.op,s))}},n.CartoCSS.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&"),r=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(//g,">");return!0===e?"'"+r+"'":t}ev(){return this}operate(e,t,r){return new n.CartoCSS.Tree.Quoted(n.CartoCSS.Tree.operate(t,this.toString(),r.toString(this.contains_field)))}},n.CartoCSS.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var r in e.symbolizers)for(var s in e.symbolizers[r])e.symbolizers[r][s].hasOwnProperty("css")&&(t[e.symbolizers[r][s].css]=[e.symbolizers[r][s],r,s]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var r in e.symbolizers)for(var s in e.symbolizers[r])if("functions"===e.symbolizers[r][s].type)for(var i=0;i1?Array.prototype.push.apply(r,s.find(new n.CartoCSS.Tree.Selector(null,null,e.elements.slice(1)),t)):r.push(s);break}}),this._lookups[s]=r)}evZooms(e){for(var t=0;tn.CartoCSS.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+n.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t;break;default:return this}return this}toString(){for(var e="",t=0;t<=n.CartoCSS.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<3&&(t=Array.prototype.slice.call(t,1));for(var s=this._handlers[e],i=s.length,a=0;a4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var s=t[t.length-1],i=this._handlers[e],a=i.length,n=0;n-this.EPSILON&&ethis.EPSILON||e<-this.EPSILON}cubicAt(e,t,r,s,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*s+3*a*r)}cubicDerivativeAt(e,t,r,s,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(s-r)*i*i)}cubicRootAt(e,t,r,s,i,a){var n=s+3*(t-r)-e,o=3*(r-2*t+e),l=3*(t-e),h=e-i,u=o*o-3*n*l,c=o*l-9*n*h,d=l*l-3*o*h,p=0;if(this.isAroundZero(u)&&this.isAroundZero(c))if(this.isAroundZero(o))a[0]=0;else{let e=-l/o;e>=0&&e<=1&&(a[p++]=e)}else{var m=c*c-4*u*d;if(this.isAroundZero(m)){var f=c/u;let e=-o/n+f,t=-f/2;e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t)}else if(m>0){let e=Math.sqrt(m),t=u*o+1.5*n*(-c+e),r=u*o+1.5*n*(-c-e),s=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(r=r<0?-Math.pow(-r,this.ONE_THIRD):Math.pow(r,this.ONE_THIRD))))/(3*n);s>=0&&s<=1&&(a[p++]=s)}else{var y=(2*u*o-3*n*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(y)/3,v=Math.sqrt(u),S=Math.cos(g);let e=(-o-2*v*S)/(3*n),t=(-o+v*(S+this.THREE_SQRT*Math.sin(g)))/(3*n),r=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*n);e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t),r>=0&&r<=1&&(a[p++]=r)}}return p}cubicExtrema(e,t,r,s,i){var a=6*r-12*t+6*e,n=9*t+3*s-3*e-9*r,o=3*t-3*e,l=0;if(this.isAroundZero(n)){if(this.isNotAroundZero(a)){let e=-o/a;e>=0&&e<=1&&(i[l++]=e)}}else{var h=a*a-4*n*o;if(this.isAroundZero(h))i[0]=-a/(2*n);else if(h>0){let e=Math.sqrt(h),t=(-a+e)/(2*n),r=(-a-e)/(2*n);t>=0&&t<=1&&(i[l++]=t),r>=0&&r<=1&&(i[l++]=r)}}return l}cubicSubdivide(e,t,r,s,i,a){var n=(t-e)*i+e,o=(r-t)*i+t,l=(s-r)*i+r,h=(o-n)*i+n,u=(l-o)*i+o,c=(u-h)*i+h;a[0]=e,a[1]=n,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=s}cubicProjectPoint(e,t,r,s,i,a,n,o,l,h,u){var c,d=this.vector.create(),p=this.vector.create(),m=this.vector.create(),f=.005,y=1/0;d[0]=l,d[1]=h;for(let l=0;l<1;l+=.05){p[0]=this.cubicAt(e,r,i,n,l),p[1]=this.cubicAt(t,s,a,o,l);let h=this.vector.distSquare(d,p);h=0&&u=0&&h<=1&&(i[l++]=h)}}else{var u=n*n-4*a*o;if(this.isAroundZero(u)){let e=-n/(2*a);e>=0&&e<=1&&(i[l++]=e)}else if(u>0){let e=Math.sqrt(u),t=(-n+e)/(2*a),r=(-n-e)/(2*a);t>=0&&t<=1&&(i[l++]=t),r>=0&&r<=1&&(i[l++]=r)}}return l}quadraticExtremum(e,t,r){var s=e+r-2*t;return 0===s?.5:(e-t)/s}quadraticProjectPoint(e,t,r,s,i,a,n,o,l){var h,u=this.vector.create(),c=this.vector.create(),d=this.vector.create(),p=.005,m=1/0;u[0]=n,u[1]=o;for(let n=0;n<1;n+=.05){c[0]=this.quadraticAt(e,r,i,n),c[1]=this.quadraticAt(t,s,a,n);let o=this.vector.distSquare(u,c);o=0&&la-2?a-1:d+1][0]+i[0],e[d>a-2?a-1:d+1][1]+i[1]],u=[e[d>a-3?a-1:d+2][0]+i[0],e[d>a-3?a-1:d+2][1]+i[1]]);let f=p*p,y=p*f;n.push([h(s[0],m[0],o[0],u[0],p,f,y),h(s[1],m[1],o[1],u[1],p,f,y)])}return n;function h(e,t,r,s,i,a,n){var o=.5*(r-e),l=.5*(s-t);return(2*(t-r)+o+l)*n+(-3*(t-r)-2*o-l)*a+o*i+t}}static SUtil_dashedLineTo(e,t,r,s,i,a,n){var o=[5,5];if(a="number"!=typeof a?5:a,e.setLineDash)return o[0]=a,o[1]=a,n&&n instanceof Array?e.setLineDash(n):e.setLineDash(o),e.moveTo(t,r),void e.lineTo(s,i);var l=s-t,h=i-r,u=Math.floor(Math.sqrt(l*l+h*h)/a);l/=u,h/=u;for(var c=!0,d=0;d0){for(var i=this.isInsidePolygon(t.pointList,u,c),a=e.holePolygonPointLists,n=!1,o=0,l=a.length;ot+o&&n>s+o||ne+o&&a>r+o||at+c&&u>s+c&&u>a+c&&u>o+c||ue+c&&h>r+c&&h>i+c&&h>n+c||ht+h&&l>s+h&&l>a+h||le+h&&o>r+h&&o>i+h||or||c+u=h)return!0;if(a){var d=s;s=this.normalizeRadian(i),i=this.normalizeRadian(d)}else s=this.normalizeRadian(s),i=this.normalizeRadian(i);s>i&&(i+=h);var p=Math.atan2(l,o);return p<0&&(p+=h),p>=s&&p<=i||p+h>=s&&p+h<=i}isInsideBrokenLine(e,t,r,s){for(var i=Math.max(t,10),a=0,n=e.length-1;ar*r}isInsideRect(e,t,r,s,i,a){return i>=e&&i<=e+r&&a>=t&&a<=t+s}isInsideCircle(e,t,r,s,i){return(s-e)*(s-e)+(i-t)*(i-t)t&&a>s||ai?st&&h>s&&h>a&&h>o||h1&&this.swapExtrema(),m=u.cubicAt(t,s,a,o,d[0]),g>1&&(f=u.cubicAt(t,s,a,o,d[1]))),2==g?St&&o>s&&o>a||o=0&&c<=1){var d=0,p=l.quadraticAt(t,s,a,c);for(let s=0;sn||(h[s]n?0:ar||o<-r)return 0;let u=Math.sqrt(r*r-o*o);if(l[0]=-u,l[1]=u,Math.abs(s-i)>=h){s=0,i=h;var c=a?1:-1;return n>=l[0]+e&&n<=l[1]+e?c:0}if(a){let e=s;s=this.normalizeRadian(i),i=this.normalizeRadian(e)}else s=this.normalizeRadian(s),i=this.normalizeRadian(i);s>i&&(i+=h);var d=0;for(let t=0;t<2;t++){var p=l[t];if(p+e>n){let e=Math.atan2(o,p),t=a?1:-1;e<0&&(e=h+e),(e>=s&&e<=i||e+h>=s&&e+h<=i)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),d+=t)}}return d}isInsidePath(e,t,r,s,i){for(var a=0,n=0,o=0,l=0,h=0,u=!0,c=!0,d="stroke"===(r=r||"fill")||"both"===r,p="fill"===r||"both"===r,m=0;m0&&(p&&(a+=this.windingLine(n,o,l,h,s,i)),0!==a))return!0;l=y[y.length-2],h=y[y.length-1],u=!1,c&&"A"!==f.command&&(c=!1,n=l,o=h)}switch(f.command){case"M":n=y[0],o=y[1];break;case"L":if(d&&this.isInsideLine(n,o,y[0],y[1],t,s,i))return!0;p&&(a+=this.windingLine(n,o,y[0],y[1],s,i)),n=y[0],o=y[1];break;case"C":if(d&&this.isInsideCubicStroke(n,o,y[0],y[1],y[2],y[3],y[4],y[5],t,s,i))return!0;p&&(a+=this.windingCubic(n,o,y[0],y[1],y[2],y[3],y[4],y[5],s,i)),n=y[4],o=y[5];break;case"Q":if(d&&this.isInsideQuadraticStroke(n,o,y[0],y[1],y[2],y[3],t,s,i))return!0;p&&(a+=this.windingQuadratic(n,o,y[0],y[1],y[2],y[3],s,i)),n=y[2],o=y[3];break;case"A":var g=y[0],v=y[1],S=y[2],b=y[3],x=y[4],C=y[5],T=Math.cos(x)*S+g,_=Math.sin(x)*b+v;c?(c=!1,l=T,h=_):a+=this.windingLine(n,o,T,_);var w=(s-g)*b/S+g;if(d&&this.isInsideArcStroke(g,v,b,x,x+C,1-y[7],t,w,i))return!0;p&&(a+=this.windingArc(g,v,b,x,x+C,1-y[7],w,i)),n=Math.cos(x+C)*S+g,o=Math.sin(x+C)*b+v;break;case"z":if(d&&this.isInsideLine(n,o,l,h,t,s,i))return!0;u=!0}}return p&&(a+=this.windingLine(n,o,l,h,s,i)),0!==a}getTextWidth(e,t){var r=e+":"+t;if(this._textWidthCache[r])return this._textWidthCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var s=0,i=0,a=(e=(e+"").split("\n")).length;ithis.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),s}getTextHeight(e,t){var r=e+":"+t;if(this._textHeightCache[r])return this._textHeightCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var s=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[r]=s,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),s}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,mn.Util_color=new Wa,mn.Util_computeBoundingBox=new class{constructor(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,r){if(0!==e.length){for(var s=e[0][0],i=e[0][0],a=e[0][1],n=e[0][1],o=1;oi&&(i=l[0]),l[1]n&&(n=l[1])}t[0]=s,t[1]=a,r[0]=i,r[1]=n}}cubeBezier(e,t,r,s,i,a){var n=new dn,o=[];n.cubicExtrema(e[0],t[0],r[0],s[0],o);for(let i=0;ii&&!a?i+=2*Math.PI:ss&&(c[0]=Math.cos(p)*r+e,c[1]=Math.sin(p)*r+t,l.min(n,c,n),l.max(o,c,o))}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,mn.Util_curve=new dn,mn.Util_env=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,r,s,i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S,b,x=this;return e=navigator.userAgent,t=x.os={},r=x.browser={},s=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),o=!a&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),u=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),d=e.match(/(BlackBerry).*Version\/([\d.]+)/),p=e.match(/(BB10).*Version\/([\d.]+)/),m=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),f=e.match(/PlayBook/),y=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=s&&e.match(/Mobile\//)&&!y,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!y,(r.webkit=!!s)&&(r.version=s[1]),i&&(t.android=!0,t.version=i[2]),o&&!n&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),a&&(t.ios=t.ipad=!0,t.version=a[2].replace(/_/g,".")),n&&(t.ios=t.ipod=!0,t.version=n[3]?n[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),d&&(t.blackberry=!0,t.version=d[2]),p&&(t.bb10=!0,t.version=p[2]),m&&(t.rimtabletos=!0,t.version=m[2]),f&&(r.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(r.silk=!0,r.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(r.silk=!0),y&&(r.chrome=!0,r.version=y[1]),g&&(r.firefox=!0,r.version=g[1]),v&&(r.ie=!0,r.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(r.safari=!0),b&&(r.webview=!0),v&&(r.ie=!0,r.version=v[1]),t.tablet=!!(a||f||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(i||o||l||d||p||y&&e.match(/Android/)||y&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:r,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,mn.Util_event=new class{constructor(){this.stop="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Event"}getX(e){return void 0!==e.zrenderX&&e.zrenderX||void 0!==e.offsetX&&e.offsetX||void 0!==e.layerX&&e.layerX||void 0!==e.clientX&&e.clientX}getY(e){return void 0!==e.zrenderY&&e.zrenderY||void 0!==e.offsetY&&e.offsetY||void 0!==e.layerY&&e.layerY||void 0!==e.clientY&&e.clientY}getDelta(e){return void 0!==e.zrenderDelta&&e.zrenderDelta||void 0!==e.wheelDelta&&e.wheelDelta||void 0!==e.detail&&-e.detail}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,mn.Util_http=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,r){if("object"==typeof e){var s=e;e=s.url,t=s.onsuccess,r=s.onerror}var i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");i.open("GET",e,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status>=200&&i.status<300||304===i.status?t&&t(i.responseText):r&&r(),i.onreadystatechange=new Function,i=null)},i.send(null)}},mn.Util_log=new /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class{constructor(){return this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Log",function(){if(0!==pn.debugMode)if(1==pn.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(pn.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,mn.Util_math=new class{constructor(){this._radians=window.Math.PI/180,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Math"}sin(e,t){return window.Math.sin(t?e*this._radians:e)}cos(e,t){return window.Math.cos(t?e*this._radians:e)}degreeToRadian(e){return e*this._radians}radianToDegree(e){return e/this._radians}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,mn.Util_matrix=new class{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Matrix"}create(){var e=new(0,this.ArrayCtor)(6);return this.identity(e),e}identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}mul(e,t,r){return e[0]=t[0]*r[0]+t[2]*r[1],e[1]=t[1]*r[0]+t[3]*r[1],e[2]=t[0]*r[2]+t[2]*r[3],e[3]=t[1]*r[2]+t[3]*r[3],e[4]=t[0]*r[4]+t[2]*r[5]+t[4],e[5]=t[1]*r[4]+t[3]*r[5]+t[5],e}translate(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}rotate(e,t,r){var s=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5],h=Math.sin(r),u=Math.cos(r);return e[0]=s*u+n*h,e[1]=-s*h+n*u,e[2]=i*u+o*h,e[3]=-i*h+u*o,e[4]=u*a+h*l,e[5]=u*l-h*a,e}scale(e,t,r){var s=r[0],i=r[1];return e[0]=t[0]*s,e[1]=t[1]*i,e[2]=t[2]*s,e[3]=t[3]*i,e[4]=t[4]*s,e[5]=t[5]*i,e}invert(e,t){var r=t[0],s=t[2],i=t[4],a=t[1],n=t[3],o=t[5],l=r*n-a*s;return l?(l=1/l,e[0]=n*l,e[1]=-a*l,e[2]=-s*l,e[3]=r*l,e[4]=(s*o-n*i)*l,e[5]=(a*i-r*o)*l,e):null}mulVector(e,t,r){var s=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5];return e[0]=r[0]*s+r[1]*i+a,e[1]=r[0]*n+r[1]*o+l,e}},mn.Util=new qa,mn.Util_vector=new cn; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class fn{constructor(){var e;this.position=[0,0],this.rotation=[0,0,0],this.scale=[1,1,0,0],this.needLocalTransform=!1,this.needTransform=!1,this.CLASS_NAME="SuperMap.LevelRenderer.Transformable",this.lookAt=(e=mn.Util_vector.create(),function(t){this.transform||(this.transform=mn.Util_matrix.create());var r=this.transform;function s(e){return e>-5e-5&&e<5e-5}mn.Util_vector.sub(e,t,this.position),s(e[0])&&s(e[1])||(mn.Util_vector.normalize(e,e),r[2]=e[0]*this.scale[1],r[3]=e[1]*this.scale[1],r[0]=e[1]*this.scale[0],r[1]=-e[0]*this.scale[0],r[4]=this.position[0],r[5]=this.position[1],this.decomposeTransform())})}destroy(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}updateNeedTransform(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}updateTransform(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||mn.Util_matrix.create();if(mn.Util_matrix.identity(t),this.needLocalTransform){if(r(this.scale[0])||r(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let s=r(e[0])||r(e[1]);s&&mn.Util_matrix.translate(t,t,e),mn.Util_matrix.scale(t,t,this.scale),s&&(e[0]=-e[0],e[1]=-e[1],mn.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;let s=r(e[0])||r(e[1]);s&&mn.Util_matrix.translate(t,t,e),mn.Util_matrix.rotate(t,t,this.rotation[0]),s&&(e[0]=-e[0],e[1]=-e[1],mn.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&mn.Util_matrix.rotate(t,t,this.rotation);(r(this.position[0])||r(this.position[1]))&&mn.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?mn.Util_matrix.mul(this.transform,this.parent.transform,this.transform):mn.Util_matrix.copy(this.transform,this.parent.transform))}function r(e){return e>5e-5||e<-5e-5}}setTransform(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}decomposeTransform(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],r=this.position,s=this.scale,i=this.rotation;n(t-1)&&(t=Math.sqrt(t));var a=e[2]*e[2]+e[3]*e[3];n(a-1)&&(a=Math.sqrt(a)),r[0]=e[4],r[1]=e[5],s[0]=t,s[1]=a,s[2]=s[3]=0,i[0]=Math.atan2(-e[1]/a,e[0]/t),i[1]=i[2]=0}function n(e){return e>5e-5||e<-5e-5}}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class yn extends(n.mixin(un,fn)){constructor(e){var t;super(e),e=e||{},this.id=null,this.style={},this.highlightStyle=null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],this.invisible=!1,this.ignore=!1,this.zlevel=0,this.draggable=!1,this.clickable=!1,this.hoverable=!0,this.z=0,this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,Se.extend(this,e),this.id=this.id||Se.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,r){var s=[e,r];return this.needTransform&&this.transform&&(mn.Util_matrix.invert(t,this.transform),mn.Util_matrix.mulVector(s,t,[e,r,1]),e==s[0]&&r==s[1]&&this.updateNeedTransform()),s})}destroy(){this.id=null,this.style=null,this.highlightStyle=null,this.parent=null,this.__dirty=null,this.__clipShapes=null,this.invisible=null,this.ignore=null,this.zlevel=null,this.draggable=null,this.clickable=null,this.hoverable=null,this.z=null,this.refOriginalPosition=null,this.refDataID=null,this.refDataHoverGroup=null,this.isHoverByRefDataID=null,this.dataInfo=null,super.destroy()}brush(e,t){var r=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,r),r.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",r),e.fill(),r.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",r),e.stroke()),this.setCtxGlobalAlpha(e,"reset",r);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",r);break;default:this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)}this.drawText(e,r,this.style),this.afterBrush(e)}beforeBrush(e,t){var r=this.style;return this.brushTypeOnly&&(r.brushType=this.brushTypeOnly),t&&(r=this.getHighlightStyle(r,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(r.strokeColor=r.strokeColor||r.color),e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r}afterBrush(e){e.restore()}setContext(e,t){for(var r=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],s=0,i=r.length;s=s.x&&e<=s.x+s.width&&t>=s.y&&t<=s.y+s.height&&mn.Util_area.isInside(this,this.style,e,t)}drawText(e,t,r){if(void 0!==t.text&&!1!==t.text){var s=t.textColor||t.color||t.strokeColor;e.fillStyle=s;var i,a,n,o,l=10,h=t.textPosition||this.textPosition||"top",u=[];switch(u=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],h){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var c=(r||t).__rect||this.getRect(r||t);switch(h){case"inside":n=c.x+c.width/2,o=c.y+c.height/2,i="center",a="middle","stroke"!=t.brushType&&s==t.color&&(e.fillStyle="#fff");break;case"left":n=c.x-l,o=c.y+c.height/2,i="end",a="middle";break;case"right":n=c.x+c.width+l,o=c.y+c.height/2,i="start",a="middle";break;case"top":n=c.x+c.width/2,o=c.y-l,i="center",a="bottom";break;case"bottom":n=c.x+c.width/2,o=c.y+c.height+l,i="center",a="top"}}break;case"start":case"end":var d=0,p=0,m=0,f=0;if(void 0!==t.pointList){var y=t.pointList;if(y.length<2)return;var g=y.length;switch(h){case"start":d=y[0][0]+u[0],p=y[1][0]+u[0],m=y[0][1]+u[1],f=y[1][1]+u[1];break;case"end":d=y[g-2][0]+u[0],p=y[g-1][0]+u[0],m=y[g-2][1]+u[1],f=y[g-1][1]+u[1]}}else d=t.xStart+u[0]||0,p=t.xEnd+u[0]||0,m=t.yStart+u[1]||0,f=t.yEnd+u[1]||0;switch(h){case"start":i=ds&&(s=l[0]),l[1]i&&(i=l[1]))}return e.__rect={x:t,y:r,width:s-t,height:i-r},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,s=mn.Util_area.getTextHeight("ZH",e.textFont),i=mn.Util_area.getTextWidth(e.text,e.textFont),a=mn.Util_area.getTextHeight(e.text,e.textFont),n=e.x+r[0];"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2),t="top"==e.textBaseline?e.y+r[1]:"bottom"==e.textBaseline?e.y+r[1]-a:e.y+r[1]-a/2;var o,l=!1;if(e.maxWidth){var h=parseInt(e.maxWidth);h-1&&(i+=!0===l?s/3*(i/o):s/3));return{x:n,y:t,width:i,height:a}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var s=this.getRectNoRotation(e),i=e.x+r[0],a=e.y+r[1],n=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,r=this.getRotatedLocation(s.x,s.y,i,a,t),o=this.getRotatedLocation(s.x+s.width,s.y,i,a,t),l=this.getRotatedLocation(s.x+s.width,s.y+s.height,i,a,t),h=this.getRotatedLocation(s.x,s.y+s.height,i,a,t);n.push(r),n.push(o),n.push(l),n.push(h)}else{let e=[s.x,s.y],t=[s.x+s.width,s.y],r=[s.x+s.width,s.y+s.height],i=[s.x,s.y+s.height];n.push(e),n.push(t),n.push(r),n.push(i)}return e.__textBackground=n,e.__textBackground}getRotatedLocation(e,t,r,s,i){var a,n,o=new Array;return t=-t,s=-s,i=-i,a=(e-r)*Math.cos(i/180*Math.PI)-(t-s)*Math.sin(i/180*Math.PI)+r,n=(e-r)*Math.sin(i/180*Math.PI)+(t-s)*Math.cos(i/180*Math.PI)+s,o[0]=a,o[1]=-n,o}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Sn extends yn{constructor(e){super(e),this.type="smiccircle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicCircle"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.x+r[0],i=t.y+r[1];return e.moveTo(s+t.r,i),e.arc(s,i,t.r,0,2*Math.PI,!0),!0}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,s=e.x+r[0],i=e.y+r[1],a=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(s-a-t/2),y:Math.round(i-a-t/2),width:2*a+t,height:2*a+t},e.__rect}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class bn extends yn{constructor(e){super(e),this.type="smicpolygon",this.holePolygonPointLists=null,this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPolygon"}destroy(){this.type=null,this.holePolygonPointLists=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.style;t&&(r=this.getHighlightStyle(r,this.highlightStyle||{})),e.save(),this.setContext(e,r),this.setTransform(e);var s=!1;"fill"!=r.brushType&&"both"!=r.brushType&&void 0!==r.brushType||(e.beginPath(),"dashed"==r.lineType||"dotted"==r.lineType||"dot"==r.lineType||"dash"==r.lineType||"dashdot"==r.lineType||"longdash"==r.lineType||"longdashdot"==r.lineType?this.buildPath(e,{lineType:"solid",lineWidth:r.lineWidth,pointList:r.pointList}):(this.buildPath(e,r),s=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)),r.lineWidth>0&&("stroke"==r.brushType||"both"==r.brushType)&&(s||(e.beginPath(),this.buildPath(e,r)),this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)),this.drawText(e,r,this.style);var i=Se.cloneObject(r);if(i.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var a=this.holePolygonPointLists,n=a.length,o=0;o0&&("stroke"==i.brushType||"both"==i.brushType)?(s||(e.beginPath(),this.buildPath(e,i)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",i),e.stroke(),this.setCtxGlobalAlpha(e,"reset",i)):e.globalCompositeOperation="source-over"}e.restore()}buildPath(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.pointList;if(!(s.length<2))if(t.smooth&&"spline"!==t.smooth){var i,a,n,o=mn.SUtil_smoothBezier(s,t.smooth,!0,t.smoothConstraint,r);e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(var l=s.length,h=0;ha&&(a=l[h][0]+r[0]),l[h][1]+r[1]o&&(o=l[h][1]+r[1]);return s="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(i-s/2),y:Math.round(n-s/2),width:a-i+s,height:o-n+s},e.__rect}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class xn extends yn{constructor(e){super(e),this.brushTypeOnly="stroke",this.textPosition="end",this.type="smicbroken-line",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicBrokenLine"}destroy(){this.brushTypeOnly=null,this.textPosition=null,this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.pointList;if(!(s.length<2)){var i=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){var a,n,o,l=mn.SUtil_smoothBezier(s,t.smooth,!1,t.smoothConstraint,r);e.moveTo(s[0][0]+r[0],s[0][1]+r[1]);for(let t=0;tu&&(r*=u/(n=r+s),s*=u/n),i+a>u&&(i*=u/(n=i+a),a*=u/n),s+i>c&&(s*=c/(n=s+i),i*=c/n),r+a>c&&(r*=c/(n=r+a),a*=c/n),e.moveTo(l+r,h),e.lineTo(l+u-s,h),0!==s&&e.quadraticCurveTo(l+u,h,l+u,h+s),e.lineTo(l+u,h+c-i),0!==i&&e.quadraticCurveTo(l+u,h+c,l+u-i,h+c),e.lineTo(l+a,h+c),0!==a&&e.quadraticCurveTo(l,h+c,l,h+c-a),e.lineTo(l,h+r),0!==r&&e.quadraticCurveTo(l,h,l+r,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+r[0],t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+r[0]-t/2),y:Math.round(e.y+r[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class _n extends yn{constructor(e){super(e),this.type="smicsector",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicSector"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,s=t.x+r[0],i=t.y+r[1],a=t.r0||0,n=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=mn.Util_math.degreeToRadian(o),l=mn.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=mn.Util_math.cos(o),c=mn.Util_math.sin(o);e.moveTo(u*a+s,c*a+i),e.lineTo(u*n+s,c*n+i),e.arc(s,i,n,o,l,!h),e.lineTo(mn.Util_math.cos(l)*a+s,mn.Util_math.sin(l)*a+i),0!==a&&e.arc(s,i,a,l,o,h),e.closePath()}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition,r=mn.Util_vector.create(),s=mn.Util_vector.create(),i=mn.Util_vector.create(),a=mn.Util_vector.create(),n=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=mn.Util_math.degreeToRadian(e.startAngle),c=mn.Util_math.degreeToRadian(e.endAngle),d=e.clockWise;return d||(u=-u,c=-c),l>1?mn.Util_computeBoundingBox.arc(n,o,l,u,c,!d,r,i):(r[0]=i[0]=n,r[1]=i[1]=o),mn.Util_computeBoundingBox.arc(n,o,h,u,c,!d,s,a),mn.Util_vector.min(r,r,s),mn.Util_vector.max(i,i,a),e.__rect={x:r[0],y:r[1],width:i[0]-r[0],height:i[1]-r[1]},e.__rect}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class wn{constructor(e){this.shapeParameters=e,this.CLASS_NAME="SuperMap.Feature.ShapeFactory"}destroy(){this.shapeParameters=null}createShape(e){if(e&&(this.shapeParameters=e),!this.shapeParameters)return null;var t=this.shapeParameters;if(t instanceof tn){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=Se.copyAttributesWithClip(e,t.style,["x","y"]);let r=new gn;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["x","y","style","highlightStyle"]),r}if(t instanceof rn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=Se.copyAttributesWithClip(e,t.style,["pointList"]);let r=new xn;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["pointList","style","highlightStyle"]),r}if(t instanceof sn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=Se.copyAttributesWithClip(e,t.style,["pointList"]);let r=new bn;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["pointList","style","highlightStyle"]),r}if(t instanceof an){if(!t.x&&!t.y&!t.width&!t.height)return null;let e=new Object;e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e=Se.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let r=new Tn;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["x","y","width","height","style","highlightStyle"]),r}if(t instanceof nn){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e.startAngle=t.startAngle,e.endAngle=t.endAngle,t.r0&&(e.r0=t.r0),t.clockWise&&(e.clockWise=t.clockWise),e=Se.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let r=new _n;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),r}if(t instanceof on){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=Se.copyAttributesWithClip(e,t.style,["x","y","text"]);let r=new vn;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["x","y","text","style","highlightStyle"]),r}if(t instanceof ln){let e=new Object;e.x=t.x,e.y=t.y,t.image&&(e.image=t.image),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sx&&(e.sx=t.sx),t.sy&&(e.sy=t.sy),t.sWidth&&(e.sWidth=t.sWidth),t.sHeight&&(e.sHeight=t.sHeight),e=Se.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let r=new Cn;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["x","y","image","width","height","style","highlightStyle"]),r}if(t instanceof hn){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=Se.copyAttributesWithClip(e,t.style,["x","y","r"]);let r=new Sn;return r.style=wn.transformStyle(e),r.highlightStyle=wn.transformStyle(t.highlightStyle),Se.copyAttributesWithClip(r,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),r}return null}static transformStyle(e){var t={},r=["normal","normal","normal","12","arial,sans-serif"],s=[!0,!1];for(var i in e)switch(i){case"fill":s[0]=e[i];break;case"fillColor":t.color=e[i];break;case"stroke":s[1]=e[i];break;case"strokeWidth":t.lineWidth=e[i];break;case"strokeLinecap":t.lineCap=e[i];break;case"strokeLineJoin":t.lineJoin=e[i];break;case"strokeDashstyle":t.lineType=e[i];break;case"pointRadius":t.r=e[i];break;case"label":t.text=e[i];break;case"labelRect":t.labelRect=e[i];break;case"fontColor":t.textColor=e[i];break;case"fontStyle":r[0]=e[i];break;case"fontVariant":r[1]=e[i];break;case"fontWeight":r[2]=e[i];break;case"fontSize":var a="";e[i]&&e[i].toString().indexOf("px")<0&&(a="px"),r[3]=e[i]+a;break;case"fontFamily":r[4]=e[i];break;case"fontOpacity":t.opacity=e[i];break;case"labelPosition":t.textPosition=e[i];break;case"labelAlign":t.textAlign=e[i];break;case"labelBaseline":t.textBaseline=e[i];break;case"labelRotation":t.textRotation=e[i];break;default:t[i]=e[i]}return t.textFont=r.join(" "),!0===s[0]&&!1===s[1]?t.brushType="fill":!1===s[0]&&!0===s[1]?t.brushType="stroke":!0===s[0]&&!0===s[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,r){var s=r||{},i=new an(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return i.style={fillColor:"#f3f3f3"},s.backgroundStyle&&Se.copyAttributesWithClip(i.style,s.backgroundStyle),s.backgroundRadius&&(i.style.radius=s.backgroundRadius),i.clickable=!1,i.hoverable=!1,e.createShape(i)}static GraphAxis(e,t,r,s){var i=t,a=r||{},n=[],o=[],l=!!a.useXReferenceLine&&a.useXReferenceLine,h=a.axisYTick&&!isNaN(a.axisYTick)?a.axisYTick:0,u=[],c=[];if(0==h){if(c.push([i[0],i[3]-5]),c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}else{var d=Math.abs(i[1]-i[3])/h,p=i[3];c.push([i[0],p-5]);for(var m=0;m=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}if(a.axisUseArrow){var y=[[i[2]+5,i[1]+4],[i[2]+13,i[1]],[i[2]+5,i[1]-4]],g=[[i[0]-4,i[3]-5],[i[0],i[3]-13],[i[0]+4,i[3]-5]],v=new sn(y);v.style={fillColor:"#008acd"},Se.copyAttributesWithClip(v.style,a.axisStyle),o.push(e.createShape(v));var S=new sn(g);if(S.style={fillColor:"#008acd"},Se.copyAttributesWithClip(S.style,a.axisStyle),o.push(e.createShape(S)),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){var b=new sn(u);b.style={fillColor:"#008acd"},Se.copyAttributesWithClip(b.style,a.axisStyle),o.push(e.createShape(b))}}var x=new rn(c);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},a.axisStyle&&Se.copyAttributesWithClip(x.style,a.axisStyle),x.clickable=!1,x.hoverable=!1;var C=[e.createShape(x)],T=[];if(a.axisYLabels&&a.axisYLabels.length&&a.axisYLabels.length>0){var _=a.axisYLabels;let t=_.length;var w=[0,0];if(a.axisYLabelsOffset&&a.axisYLabelsOffset.length&&(w=a.axisYLabelsOffset),1==t){let t=new on(i[0]-5+w[0],i[3]+w[1],_[0]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&Se.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,T.push(e.createShape(t))}else for(var M=i[3],E=Math.abs(i[1]-i[3])/(t-1),A=0;A0){let t=a.axisXLabels,r=t.length,n=[0,0];if(a.axisXLabelsOffset&&a.axisXLabelsOffset.length&&(n=a.axisXLabelsOffset),s&&s.xPositions&&s.xPositions.length&&s.xPositions.length==r){let o=s.xPositions;for(let s=0;s=0&&r[i]&&Se.copyAttributesWithClip(n,r[i]),s&&s.length&&void 0!==a)for(var o=s,l=o.length,h=parseFloat(a),u=0;u=h[2]||h[1]<=h[3])&&(this.DVBOrigonPoint=[h[0],h[3]],this.DVBWidth=Math.abs(h[2]-h[0]),this.DVBHeight=Math.abs(h[1]-h[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-n[0],this.DVBOrigonPoint[1]-n[1]],!0)}resetLocation(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var r=this.width,s=this.height,i=this.location;return this.chartBounds=new xe(i[0]-r/2,i[1]+s/2,i[0]+r/2,i[1]-s/2),this.resetLinearGradient(),i}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,r=0,s=e.length;r=0?s.push(parseFloat(i[n].toString()).toFixed(r)):s.push(parseFloat(i[n].toString()))}catch(e){throw new Error("not a number")}return s.length===t.length&&s},n.Feature.Theme.Graph=En;n.Feature.Theme.Bar= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends En{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar"}destroy(){super.destroy()}assembleShapes(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var s=this.dataViewBox,i=this.dataValues;if(!(i.length<1)){for(let e=0,t=i.length;er[1])return;var a=this.calculateXShapeInfo();if(a){var n=a.xPositions,o=a.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(wn.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(wn.GraphAxis(this.shapeFactory,s,t,a)));for(var l=0;l=t.length&&(r%=t.length);var l=t[r][0],h=t[r][1],u=(new Wa).getLinearGradient(n,0,o,0,[[0,l],[1,h]]);i.style.color=u}}}};n.Feature.Theme.Bar3D= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends En{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar3D"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,25,20,20]:e.dataViewBoxParameter=[5,5,5,5]),e.axisUseArrow=void 0===e.axisUseArrow||e.axisUseArrow,e.axisXLabelsOffset=void 0!==e.axisXLabelsOffset?e.axisXLabelsOffset:[-10,10],this.initBaseParameter()){var t=this.DVBCodomain;this.DVBUnitValue=(t[1]-t[0])/this.DVBHeight;var r=this.dataViewBox,s=this.dataValues;if(!(s.length<1)){for(let e=0,r=s.length;et[1])return;var i=this.calculateXShapeInfo();if(i){var a=i.xPositions,n=i.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(wn.Background(this.shapeFactory,this.chartBox,e)),(!e.axis3DParameter||isNaN(e.axis3DParameter)||e.axis3DParameter<15)&&(e.axis3DParameter=20),(void 0===e.useAxis||e.useAxis)&&(this.shapes=this.shapes.concat(wn.GraphAxis(this.shapeFactory,r,e,i)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let i=0;i=o[2]||o[1]<=o[3])&&(this.DVBOrigonPoint=[o[0],o[3]],this.DVBWidth=Math.abs(o[2]-o[0]),this.DVBHeight=Math.abs(o[1]-o[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-i[0],this.DVBOrigonPoint[1]-i[1]],!0)}}n.Feature.Theme.RankSymbol=An;n.Feature.Theme.Circle= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends An{constructor(e,t,r,s,i){super(e,t,r,s,i),this.CLASS_NAME="SuperMap.Feature.Theme.Circle"}destroy(){super.destroy()}assembleShapes(){if(!this.setting)return!1;var e=this.setting;if(!e.codomain)return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,r=Mn.getDataValues(this.data,this.fields,t);this.dataValues=r||[];var s=this.dataValues;e.maxR||(e.maxR=100),e.minR||(e.minR=0);var i=this.DVBCodomain;i&&i[1]-i[0]>0?this.DVBUnitValue=e.maxR/(i[1]-i[0]):this.DVBUnitValue=e.maxR;var a=this.DVBUnitValue,n=s[0]*a+e.minR;if(this.width=2*n,this.height=2*n,this.initBaseParameter()&&(!i||!(s[0]i[1]))){var o=this.DVBCenterPoint,l=new hn(o[0],o[1],n);l.style=wn.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=wn.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(l.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(l.clickable=e.circleClickAble),l.refDataID=this.data.id,l.dataInfo={field:this.fields[0],r:n,value:s[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}};n.Feature.Theme.Line= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends En{constructor(e,t,r,s,i,a){super(e,t,r,s,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Line"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var s=this.DVBUnitValue,i=this.dataValues;if(!(i.length<1)){var a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(wn.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(wn.GraphAxis(this.shapeFactory,t,e,a));for(var h=[],u=[],c=0,d=i.length;cr[1])return null;n=l[c],o=t[1]-(i[c]-r[0])/s;var p=new tn(n,o);p.style=wn.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,i[c]),p.highlightStyle=wn.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(p.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(p.clickable=e.pointClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:i[c]},u.push(this.shapeFactory.createShape(p));var m=[n,o];h.push(m)}var f=new rn(h);f.style=wn.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),f.clickable=!1,f.hoverable=!1;var y=this.shapeFactory.createShape(f);this.shapes.push(y),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,r=this.setting,s=this.dataValues.length;if(s<1)return null;var i=[],a=this.DVBWidth,n=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var o=a-((e=r.xShapeBlank)[0]+e[1]);if(o<=s)return null;n=o/(s-1)}else e=[n=a/(s+1),n,n];for(var l=0,h=0;hs[1])return;var i=0;for(let e=0;e=360&&(l=359.9999999);var p=new nn(n[0],n[1],u,o,l);if(void 0===e.sectorStyleByFields){var m=c%t.length;p.style=wn.ShapeStyleTool(null,e.sectorStyle,t,null,m)}else p.style=wn.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,r[c]);p.highlightStyle=wn.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(p.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(p.clickable=e.sectorClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:r[c]},this.shapes.push(this.shapeFactory.createShape(p)),o=l}this.shapesConvertToRelativeCoordinate()}}}};n.Feature.Theme.Point= /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class extends En{constructor(e,t,r,s,i,a){super(e,t,r,s,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Point"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var s=this.DVBUnitValue,i=this.dataValues,a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(wn.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(wn.GraphAxis(this.shapeFactory,t,e,a));for(var h=0,u=i.length;hr[1])return null;n=l[h],o=t[1]-(i[h]-r[0])/s;var c=new tn(n,o);c.style=wn.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,i[h]),c.highlightStyle=wn.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(c.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(c.clickable=e.pointClickAble),c.refDataID=this.data.id,c.dataInfo={field:this.fields[h],value:i[h]},this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}calculateXShapeInfo(){var e,t=this.dataViewBox,r=this.setting,s=this.dataValues.length;if(s<1)return null;var i=[],a=this.DVBWidth,n=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var o=a-((e=r.xShapeBlank)[0]+e[1]);if(o<=s)return null;n=o/(s-1)}else e=[n=a/(s+1),n,n];for(var l=0,h=0;hs[1])return;var i=0;for(let e=0;e=0&&t.innerRingRadius0){var h=a[a.length-1];if(Math.abs(h[0]-s[0])<=n&&Math.abs(h[1]-s[1])<=n)continue}a.push(s)}if(a.length<2)return null;var u=new Object;(u=Se.copyAttributesWithClip(u,this.style,["pointList"])).pointList=a;var c=new xn({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=this.location,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&Se.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,r=[],s=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o0){var h=a[a.length-1];if(Math.abs(h[0]-s[0])<=n&&Math.abs(h[1]-s[1])<=n)continue}a.push(s);var u=new Object;u.r=6,(u=Se.copyAttributesWithClip(u,this.style)).x=s[0],u.y=s[1];var c=new gn({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=i,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&Se.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,r=0;r0){var d=a[a.length-1];if(Math.abs(d[0]-s[0])<=l&&Math.abs(d[1]-s[1])<=l)continue}a.push(s)}}else{n=[];for(var p=0;p0){var m=n[n.length-1];if(Math.abs(m[0]-s[0])<=l&&Math.abs(m[1]-s[1])<=l)continue}n.push(s)}}n.length<2||o.push(n)}if(!(a.length<2)){var f={};(f=Se.copyAttributesWithClip(f,this.style,["pointList"])).pointList=a;var y=new bn({style:f,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(y.highlightStyle=this.highlightStyle),y.refOriginalPosition=this.location,y.refDataID=this.data.id,y.isHoverByRefDataID=this.isMultiHover,o.length>0&&(y.holePolygonPointLists=o),this.shapeOptions&&Se.copyAttributesWithClip(y,this.shapeOptions),this.shapes.push(y)}}rectangleToTF(e){var t=this.location,r=new be(e.x,e.y),s=this.layer.map.getResolution(),i=this.getLocalXY(r),a=new Object;a.r=6,(a=Se.copyAttributesWithClip(a,this.style)).x=i[0]-t[0],a.y=i[1]-t[1]-2*e.width/s,a.width=e.width/s,a.height=e.height/s;var n=new Tn({style:a,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(n.highlightStyle=this.highlightStyle),n.refOriginalPosition=t,n.refDataID=this.data.id,n.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&Se.copyAttributesWithClip(n,this.shapeOptions),this.shapes.push(n)}geoTextToTF(e){var t=this.location,r=this.getLocalXY(e),s=new Object;s.r=6,(s=Se.copyAttributesWithClip(s,this.style,["x","y","text"])).x=r[0]-t[0],s.y=r[1]-t[1],s.text=e.text;var i=new vn({style:s,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&Se.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,r=0,s=this.shapes.length;r0}addRoot(e){e instanceof On&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}delRoot(e){if(void 0===e){for(var t=0;t=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof On&&i.delChildrenFromStorage(this))}}addToMap(e){return e instanceof On&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}get(e){return this._elements[e]}delFromMap(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof On&&(t._storage=null)),this}dispose(){this._elements=null,this._roots=null,this._hoverElements=null}static shapeCompareFunc(e,t){return e.zlevel==t.zlevel?e.z==t.z?e.__renderidx-t.__renderidx:e.z-t.z:e.zlevel-t.zlevel}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class In{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,In.devicePixelRatio=Math.max(window.devicePixelRatio||1,1),this.CLASS_NAME="SuperMap.LevelRenderer.Painter",this.root.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var r=document.createElement("div");this._domRoot=r,r.style.position="relative",r.style.overflow="hidden",r.style.width=this._width+"px",r.style.height=this._height+"px",this.root.appendChild(r),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=In.createDom(Se.createUniqueID("SuperMap.Theme_background_"),"div",this),r.appendChild(this._bgDom),this._bgDom.onselectstart=a,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none",this._bgDom.style["-webkit-touch-callout"]="none";var s=new Nn(Se.createUniqueID("_highLightLayer_"),this);this._layers.hover=s,r.appendChild(s.dom),s.initContext(),s.dom.onselectstart=a,s.dom.style["-webkit-user-select"]="none",s.dom.style["user-select"]="none",s.dom.style["-webkit-touch-callout"]="none";var i=this;function a(){return!1}this.updatePainter=function(e,t){i.refreshShapes(e,t)}}destroy(){this.dispose(),this._zlevelList=null,this._layerConfig=null,this._bgDom=null,this.shapeToImage=null}render(e){return this.refresh(e,!0),this}refresh(e,t){var r=this.storage.getShapeList(!0);return this._paintList(r,t),"function"==typeof e&&e(),this}_paintList(e,t){var r,s,i;for(var a in void 0===t&&(t=!1),this._updateLayerStatus(e),this._layers)"hover"!==a&&(this._layers[a].unusedCount++,this._layers[a].updateTransform());for(var n=[],o=0,l=e.length;o0&&e>this._zlevelList[0]){for(i=0;ie);i++);s=this._layers[this._zlevelList[i]]}this._zlevelList.splice(i+1,0,e),t=new Nn(Se.createUniqueID("_levelLayer_"+e),this);var a=s?s.dom:this._bgDom;a.nextSibling?a.parentNode.insertBefore(t.dom,a.nextSibling):a.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new qa).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,r={};for(let e in t)"hover"!==e&&(r[e]=t[e].elCount,t[e].elCount=0);for(let r=0;r0?1.1:1/1.1,r=this.painter.getLayers(),s=!1;for(var i in r)if("hover"!==i){var a=r[i],n=a.position;if(a.zoomable){a.__zoom=a.__zoom||1;var o=a.__zoom;o*=t,t=(o=Math.max(Math.min(a.maxZoom,o),a.minZoom))/a.__zoom,a.__zoom=o,n[0]-=(this._mouseX-n[0])*(t-1),n[1]-=(this._mouseY-n[1])*(t-1),a.scale[0]*=t,a.scale[1]*=t,a.dirty=!0,s=!0}}s&&this.painter.refresh(),this._dispatchAgency(this._lastHover,pn.EVENT.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){this._clickThreshold++,e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=mn.Util_event.getX(e),this._mouseY=mn.Util_event.getY(e);var t=this._mouseX-this._lastX,r=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var s="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,r),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var i=this.painter.getLayers(),a=!1;for(var n in i)if("hover"!==n){var o=i[n];o.panable&&(s="move",o.position[0]+=t,o.position[1]+=r,a=!0,o.dirty=!0)}a&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?s="move":this._hasfound&&this._lastHover.clickable&&(s="pointer"),this.root.style.cursor=s,this._dispatchAgency(this._lastHover,pn.EVENT.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){var t=(e=this._zrenderEventFixed(e)).toElement||e.relatedTarget;if(t!=this.root)for(;t&&9!=t.nodeType;){if(t==this.root)return void this._mousemoveHandler(e);t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.refreshHover(),this.dispatch(pn.EVENT.GLOBALOUT,e)},mousedown:function(e){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,pn.EVENT.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,pn.EVENT.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&mn.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;i--){var a=r[i];if(void 0!==a.zlevel&&(e=this.painter.getLayer(a.zlevel,e),s[0]=this._mouseX,s[1]=this._mouseY,e.needTransform&&(mn.Util_matrix.invert(t,e.transform),mn.Util_vector.applyTransform(s,s,t))),this._findHover(a,s[0],s[1]))break}}_mobildFindFixed(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var r=0;!this._lastHover&&r=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,r=this._clips,s=r.length,i=[],a=[];for(let t=0;t=0&&!(f[S]<=n);S--);S=Math.min(S,h-2)}else{for(S=w;Sn);S++);S=Math.min(S-1,h-2)}w=S,M=n;var o=f[S+1]-f[S];if(0!==o){if(b=(n-f[S])/o,a)if(C=y[S],x=y[0===S?S:S-1],T=y[S>h-2?h-1:S+1],_=y[S>h-3?h-1:S+2],c)kn._catmullRomInterpolateArray(x,C,T,_,b,b*b,b*b*b,s(e,l),p);else{let t;t=d?kn.rgba2String(E):kn._catmullRomInterpolate(x,C,T,_,b,b*b,b*b*b),r(e,l,t)}else if(c)kn._interpolateArray(y[S],y[S+1],b,s(e,l),p);else{let t;d?(kn._interpolateArray(y[S],y[S+1],b,E,1),t=kn.rgba2String(E)):t=kn._interpolateNumber(y[S],y[S+1],b),r(e,l,t)}for(S=0;S0){let e=a.SheetNames[0],r=Xn.a.utils.sheet_to_csv(a.Sheets[e]);t&&t.call(s,r)}}catch(e){r&&r.call(s,e)}},i.onerror=function(e){r&&r.call(s,e)},this.rABF&&i.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,r,s,i){let a=null;if("EXCEL"===e||"CSV"===e)a=this.processExcelDataToGeoJson(t),r&&r.call(i,a);else if("JSON"===e||"GEOJSON"===e){let e=t;"string"==typeof e&&(e=JSON.parse(e)),"ISERVER"===e.type?a=e.data.recordsets[0].features:"FeatureCollection"===e.type?a=e:s&&s.call(i,Wn.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(i,a)}else s&&s.call(i,Wn.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),r=t.colTitles,s=-1,i=-1;for(let e=0,t=r.length;ee.json()).then(s=>{if(!1!==s.succeed)if(s.dataItemServices&&s.dataItemServices.length>0){let i;s.dataItemServices.forEach(s=>{if("RESTDATA"===s.serviceType&&"PUBLISHED"===s.serviceStatus)i=s;else{if("RESTMAP"!==s.serviceType||"PUBLISHED"!==s.serviceStatus)return void r.getDatafromContent(e,t);i=s}}),i&&r.getDatafromRest(i.serviceType,i.address,t)}else r.getDatafromContent(e,t);else r._fireFailedEvent(s)}).catch(e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromContent(e,t){let r={result:{}},s=this;e+="/content.json?pageSize=9999999¤tPage=1",tt.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(e=>{if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(Wn.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);r.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);r.result.features={type:"FeatureCollection",features:t}}t(r,"content")}}else s._fireFailedEvent(e)},this).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromRest(e,t,r){let s=this,i=this.datasets.withCredentials;if("RESTDATA"===e){let e,a,n=`${t}/data/datasources`;tt.get(n,null,{withCredentials:i}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],n=`${t}/data/datasources/${e}/datasets`,tt.get(n,null,{withCredentials:i}).then(e=>e.json()).then(i=>(a=i.datasetNames[0],s.getDatafromRestData(`${t}/data`,[e+":"+a],r),[e+":"+a])).catch(function(e){s._fireFailedEvent(e)})}).catch(function(e){s._fireFailedEvent(e)})}else{let e,a,n,o=`${t}/maps`;tt.get(o,null,{withCredentials:i}).then(e=>e.json()).then(l=>{e=l[0].name,n=l[0].path,o=o=`${t}/maps/${e}/layers`,tt.get(o,null,{withCredentials:i}).then(e=>e.json()).then(e=>(a=e[0].subLayers.layers[0].caption,s.getDatafromRestMap(a,n,r),a)).catch(function(e){s._fireFailedEvent(e)})}).catch(function(e){s._fireFailedEvent(e)})}}getDatafromRestData(e,t,r){let s=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{r(e,"RESTDATA")},e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromRestMap(e,t,r){let s=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{r(e,"RESTMAP")},e=>{console.log(e),s._fireFailedEvent(e)})}_getFeatureBySQL(e,t,r,s,i){let a,n,o,l={name:t.join().replace(":","@")};Object.assign(l,r),a=new Dt(l),o=new ps({queryParameter:a,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(n=new ms(e,{eventListeners:{processCompleted:e=>{s&&s(e)},processFailed:e=>{i&&i(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,r,s,i,a,n,o,l,h){var c,d,p={name:t};Object.assign(p,r),c=new Dt(p),s&&(c.fields=s);var m={queryParams:[c]};h&&(m.queryOption=u.ATTRIBUTE),o&&(m.startRecord=o),l&&(m.expectCount=l),i&&(m.prjCoordSys={epsgCode:i}),d=new _i(m),this._queryBySQL(e,d,e=>{"processCompleted"===e.type?a(e):n(e)})}_queryBySQL(e,t,r,s){new wi(e,{eventListeners:{scope:this,processCompleted:r,processFailed:r},format:this._processFormat(s)}).processAsync(t)}_processFormat(e){return e||o.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,r=-1,s=-1;for(let e=0,i=t.length;e0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}getDatasetInfo(e){this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new Kn(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:e=>{this.events.triggerEvent("getdatafailed",e)}}))}_getDatasetInfoSuccess(e){let t=this.datasets.url,r=t.indexOf("rest");if(r>0){let s=t.indexOf("/",r+5),i=t.substring(r+5,s),a=t.substring(0,r+4)+"/data";if("maps"===i){let i=t.indexOf("/",s+1),n=t.substring(s+1,i);a=t.substring(0,r+4)+"/maps/"+n,e.result.dataUrl=a,this._getLayerFeatures(e)}else"data"===i&&(e.result.dataUrl=a,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let r=this;"RESTMAP"===t?r._getChartDatasFromLayer(e):r._getChartDatas(e)}_getDataFeatures(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}_getLayerFeatures(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}_getChartDatas(e){if(e){this.features=e.result.features;let t=this.features.features,r={};if(t.length){let e=t[0],s=[],i=[];for(let t in e.properties)s.push(t),i.push(this._getDataType(e.properties[t]));r={features:t,fieldCaptions:s,fieldTypes:i,fieldValues:[]};for(let e in i){let s=[];for(let i in t){let a=t[i],n=r.fieldCaptions[e],o=a.properties[n];s.push(o)}r.fieldValues.push(s)}this.createChart(r)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],r=t.features.features;this.features=t.features;let s={};if(r.length){s={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in s.fieldCaptions){let t=[];for(let i in r){let a=r[i],n=s.fieldCaptions[e],o=a.properties[n];t.push(o)}s.fieldValues.push(t)}this.createChart(s)}}}_createChartOptions(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}changeType(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}updateData(e,t,r){this.updateChart=r,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}_updateDataSuccess(e){let t=this._createChartOptions(e);this.updateChart(t)}updateChartOptions(e,t){if(this.calculatedData){let r=this.grid,s=this._createChartSeries(this.calculatedData,e),i=[];for(let e in this.calculatedData.XData)i.push({value:this.calculatedData.XData[e].fieldsData});let a={type:"category",name:this.xField[0].name||"X",data:i,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},n={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},o={formatter:"{b0}: {c0}"},l="#404a59";return t&&(t.grid&&(r=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:r,series:s,xAxis:a,yAxis:n,tooltip:o}}}_createChartDatas(e){let t=0,r=[],s=e.fieldCaptions,i=this;s.forEach(function(e,r){i.xField[0]&&e===i.xField[0].field&&(t=r)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(i.yFieldName=i.yFieldName+","),i.yFieldName=i.yFieldName+e.name,s.forEach(function(t,s){t===e.field&&r.push(s)})});let a=this._getAttrData(e,t),n=[];if(r.length>0)r.forEach(function(t){let r=[];for(let s in e.fieldValues[t])r.push({value:e.fieldValues[t][s]});n.push(r)});else{let e=[],t=[],r=a.length;for(let s=0;s{e.showView(t.message)}})}getStyle(){return this.viewModel.getStyle()}getFeatures(){return this.viewModel.getFeatures()}setStyle(e){let t=this.viewModel.setStyle(e);this._updateChart(t)}changeType(e){if(this.chartType!==e){this.chartType=e;let t=this.viewModel.changeType(e);this._updateChart(t)}}updateData(e,t){let r=this;this.viewModel.updateData(e,t,function(e){r._updateChart(e),r.addChart&&r.addChart()})}_createChart(e){this.echart=qn.a.init(document.getElementById(this.domID),null,{renderer:"canvas"});let t=this.viewModel._createChartOptions(e);this.echart.setOption(t),this.addChart&&this.addChart()}_updateChart(e){this.echart&&(this.echart.clear(),this.echart.setOption(e))}}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class $n{constructor(e){e=e||{},this.id=e.id?e.id:null,this.rootContainer=null}getElement(){return this.id&&(this.rootContainer.id=this.id),this.rootContainer}_initView(){}showView(){this.rootContainer.hidden=!1}closeView(){this.rootContainer.hidden=!0}}n.Components.TemplateBase=$n; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class eo extends $n{constructor(e){super(e);let t=e.title?e.title:"";this._initView(t)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-container");const r=document.createElement("div");r.setAttribute("class","component-title");const s=document.createElement("div");s.innerHTML=e,r.appendChild(s),t.appendChild(r);const i=document.createElement("div");return i.setAttribute("class","component-content"),t.appendChild(i),this.content=i,this.rootContainer=t,t}getContentElement(){return this.content}appendContent(e){this.content.appendChild(e)}}n.Components.CommonContainer=eo; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class to extends $n{constructor(e){super(e),this._initView(e)}_initView(e){let t=this._createElement("div","component-selecttool");if(e.labelName){this._createElement("label","component-selecttool__lable--describe",t).innerHTML=e.labelName}let r=this._createElement("div","component-selecttool--chart",t);r.setAttribute("tabindex","1");let s=this._createElement("div","component-selecttool__name",r);s.title=e.optionsArr[0],s.innerHTML=e.optionsArr[0];let i=this._createElement("div","component-selecttool__trianglebtn--chart",r),a=this._createElement("div","component-triangle-down-img",i),n=this._createElement("div","component-selecttool__content",r),o=this._createElement("div","component-selecttool__content--chart",n),l=this._createElement("div","component-selecttool__scrollarea__content",o);l.setAttribute("tabindex","1"),this.createOptions(l,e.optionsArr),this.optionClickEvent(l,s,e.optionsClickCb),this._selectClickEvent(r,n,a),this.rootContainer=t}createOptions(e,t){for(let r in t){let s=this._createElement("div","component-selecttool__option",e);s.title=t[r],s.innerHTML=t[r]}}_selectClickEvent(e,t,r){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",r.className="component-triangle-down-img"):(t.style.display="block",r.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())},e.onblur=function(){t.style.display="none",r.className="component-triangle-down-img"}}_createElement(e,t,r){let s=document.createElement(e||"div");return t&&(s.className=t),r&&r.appendChild(s),s}optionClickEvent(e,t,r){for(let s=0;s0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e{for(let e=0;e0;e--)this.content.removeChild(this.content.children[e-1]);const t=this.config[e];for(let e in t)this._createCityItem(e,t[e])}_createCityItem(e,t){const r=document.createElement("div"),s=document.createElement("div");s.setAttribute("class","component-citytabpag__py-key"),s.innerHTML=e,r.appendChild(s);const i=document.createElement("div");i.setAttribute("class","component-citytabpag__content");for(let e=0;e0&&this.appendTabs(e),this.rootContainer=t}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e=0;e--)this.content.removeChild(this.content.children[e])}setPageLink(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}_createPageLi(e){for(let t=0;t1;e--)this.link.removeChild(this.link.children[e])}_createLink(e){for(let t=0;t<4;t++){const r=document.createElement("li");r.setAttribute("class","disable");const s=document.createElement("span");r.appendChild(s),0===t?(s.id="first",s.setAttribute("class","supermapol-icons-first")):1===t?(s.id="prev",s.setAttribute("class","supermapol-icons-prev")):2===t?(s.id="next",s.setAttribute("class","supermapol-icons-next")):3===t&&(s.id="last",s.setAttribute("class","supermapol-icons-last")),e.appendChild(r)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let r;if(t.id)r=t.id;else{if(!Number(t.innerHTML))return;r=Number(t.innerHTML)}this._prePageNum(r),this.clearPageLink(),this._appendPageLink()}_changeDisableState(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}_prePageNum(e){const t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(let e=0;e=this.pageNumberLis.length-3)for(let e=this.pageNumberLis.length-5;e0&&(this.currentPageNumberLis=t)}}n.Components.PaginationContainer=lo; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ let ho={getFileType:e=>/^.*\.(?:xls|xlsx)$/i.test(e)?jn.EXCEL:/^.*\.(?:csv)$/i.test(e)?jn.CSV:/^.*\.(?:geojson|json)$/i.test(e)?jn.GEOJSON:null}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/n.Lang["en-US"]={title_dataFlowService:"Data Flow Service",title_distributedAnalysis:"Distributed Analysis",title_clientComputing:"Client Computing",title_dataServiceQuery:"Data Service Query",title_searchCity:"Search city",title_searchLayer:" Search layer",text_input_value_inputDataFlowUrl:"Please enter the data stream service address such as: ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"Display feature information",text_subscribe:"subscribe",text_cancelSubscribe:"unsubscribe",text_densityAnalysis:"Density Analysis",text_CalculateTheValuePerUnitArea:"Calculate the value per unit area within the neighborhood shape",text_option_selectDataset:"Please select a dataset",text_label_dataset:"Dataset",text_option_simplePointDensityAnalysis:"Simple point density analysis",text_option_nuclearDensityAnalysis:"Nuclear density analysis",text_label_analyticalMethod:"Analytical method",text_option_quadrilateral:"Quadrilateral",text_option_hexagon:"hexagon",text_label_meshType:"Mesh type",text_option_notSet:"Not set",text_label_weightField:"Weight field",text_label_gridSizeInMeters:"Grid size",text_label_searchRadius:"Search radius",text_label_queryRange:"Scope of analysis",text_label_areaUnit:"Area unit",text_option_equidistantSegmentation:"Equidistant segmentation",text_option_logarithm:"Logarithm",text_option_equalCountingSegment:"Equal counting segment",text_option_squareRootSegmentation:"Square root segmentation",text_label_thematicMapSegmentationMode:"Thematic map segmentation mode",text_label_thematicMapSegmentationParameters:"Thematic map segmentation parameters",text_option_greenOrangePurpleGradient:"Green orange purple gradient",text_option_greenOrangeRedGradient:"Green orange red gradient",text_option_rainbowGradient:"Rainbow gradient",text_option_spectralGradient:"Spectral gradient",text_option_terrainGradient:"Terrain gradient",text_label_thematicMapColorGradientMode:"Thematic map color gradient mode",text_label_resultLayerName:"Result layer name",text_chooseFile:"Open File",text_isoline:"Isoline",text_extractDiscreteValue:"Extract discrete value generation curve",text_buffer:"Buffer",text_specifyTheDistance:"Specify the distance to create the surrounding area",text_label_analysisLayer:"Analysis layer",text_label_extractField:"Extract field",text_label_extractedValue:"Extracted value",text_label_distanceAttenuation:"Distance attenuation",text_label_gridSize:"gridSize",text_label_bufferRadius:"Buffer radius",text_label_defaultkilometers:"Default 10 kilometers",text_label_kilometer:"kilometer",text_label_unit:"unit",text_retainOriginal:"Retain original object field",text_mergeBuffer:"Merge buffer",text_label_color:"Color",text_label_buffer:"[Buffer]",text_label_isolines:"[Isolines]",text_label_queryRangeTips:"The default is the full range of input data. Example: -74.050, 40.650, -73.850, 40.850",text_label_queryModel:"Query mode",text_label_IDArrayOfFeatures:"ID array of features",text_label_maxFeatures:"The maximum number of features that can be returned",text_label_bufferDistance:"Buffer distance",text_label_queryRange1:"Query range",text_label_spatialQueryMode:"Spatial query mode",text_label_featureFilter:"Feature filter",text_label_geometricObject:"Geometric object",text_label_queryMode:"Query mode",text_label_searchTips:"Search for city locations or layer features",text_label_chooseSearchLayers:"Select a query layer",text_loadSearchCriteria:"Load search criteria",text_saveSearchCriteria:"Save search criteria",btn_analyze:"Analyze",btn_analyzing:"Analyzing",btn_emptyTheAnalysisLayer:"Empty the analysis layer",btn_cancelAnalysis:"Cancel",btn_query:"Query",btn_querying:"Querying",btn_emptyTheRresultLayer:"Clear all result layers","msg_dataReturnedIsEmpty.":"The request is successful and the data returned by the query is empty.",msg_dataFlowServiceHasBeenSubscribed:"The data stream service has been subscribed to.",msg_inputDataFlowUrlFirst:"Please enter the data stream service address first.",msg_datasetOrMethodUnsupport:"This dataset does not support this analysis type. Please reselect the dataset.",msg_selectDataset:"Please select a data set!",msg_setTheWeightField:"Please set the weight field!",msg_theFieldNotSupportAnalysis:"The field you currently select does not support analysis!",msg_resultIsEmpty:"The result of the analysis is empty!",msg_openFileFail:"Failed to open file!",msg_fileTypeUnsupported:"File format is not supported!",msg_fileSizeExceeded:"File size exceeded! The file size should not exceed 10M!",msg_dataInWrongGeoJSONFormat:"Wrong data format! Non standard GEOJSON format data!",msg_dataInWrongFormat:"Wrong data format! Non standard EXCEL, CSV or GEOJSON format data!",msg_searchKeywords:"Search keywords cannot be empty. Please enter your search criteria.",msg_searchGeocodeField:"Did not match the address matching service data!",msg_cityGeocodeField:"The address matching service of the current city is not configured.",msg_getFeatureField:"No related vector features found!",msg_dataflowservicesubscribed:"The data stream service has been subscribed to.",msg_subscribesucceeded:"The data stream service subscription was successful.",msg_crsunsupport:"Does not support the coordinate system of the current map",msg_tilematrixsetunsupport:"Incoming TileMatrixSet is not supported",msg_jsonResolveFiled:"JSON format parsing failure!",msg_requestContentFiled:"Failed to request data through iportal!",msg_getdatafailed:"Failed to get data!"};n.Lang["zh-CN"]={title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例:-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型,请重新选择数据集",msg_selectDataset:"请选择数据集!",msg_setTheWeightField:"请设置权重字段!",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析!",msg_resultIsEmpty:"分析的结果为空!",msg_dataReturnedIsEmpty:"请求成功,查询返回的数据为空。",msg_openFileFail:"打开文件失败!",msg_fileTypeUnsupported:"不支持该文件格式!",msg_fileSizeExceeded:"文件大小超限!文件大小不得超过 10M!",msg_dataInWrongGeoJSONFormat:"数据格式错误!非标准的 GEOJSON 格式数据!",msg_dataInWrongFormat:"数据格式错误!非标准的 EXCEL, CSV 或 GEOJSON 格式数据!",msg_searchKeywords:"搜索关键字不能为空,请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据!",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素!",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败!",msg_requestContentFiled:"通过iportal请求数据失败!",msg_getdatafailed:"获取数据失败!"}; /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class uo extends a{constructor(e,t){super(e,t)}getMapInfo(e){var t=this;new hi(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()}getTilesets(e){var t=this;new na(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}}var co=r(27),po=r.n(co); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class mo extends po.a{constructor(e){function t(e,t,r){var s=document.createElement(e);return s.className=t||"",r&&r.appendChild(s),s}function r(e,t,r,s){var i=function(t){if(r)return r.call(s||e,t||window.event)},a=i;return"addEventListener"in e?"mousewheel"===t?e.addEventListener("onwheel"in e?"wheel":"mousewheel",i,!1):"mouseenter"===t||"mouseleave"===t?(i=function(t){t=t||window.event,function(e,t){var r=t.relatedTarget;if(!r)return!0;try{for(;r&&r!==e;)r=r.parentNode}catch(e){return!1}return r!==e}(e,t)&&a(t)},e.addEventListener("mouseenter"===t?"mouseover":"mouseout",i,!1)):e.addEventListener(t,i,!1):"attachEvent"in e&&e.attachEvent("on"+t,i),this}function s(){this._container.classList.add("ol-control-ctv-expanded")}function i(){this._container.classList.remove("ol-control-ctv-expanded")}function a(){var e=this.getVersion();this.tilesVersion(e)}(e=e||{}).title||(e.title="switch tile version"),e.tooltip||(e.tooltip="top"),e.collapsed||(e.collapsed=!0),e.lastText||(e.lastText="-"),e.nextText||(e.nextText="+"),e.ico||(e.ico="V"),"vertical"!==e.orientation&&(e.orientation="horizontal"),e.switch||(e.switch=!0),super(e),this.options=e,this.element=e.element=function(){var n="ol-control-ctv";this._container=t("div",n+" "+n+"-"+e.orientation+" ol-unselectable ol-control"),this._sliderBtn=t("button",n+"-toggle",this._container),this._sliderBtn.setAttribute("title",e.title),this._sliderBtn.innerHTML=e.ico,this._sliderValue=t("p",n+"-value",this._container),this._sliderValue.innerHTML=e.ico,this._sliderValue.setAttribute("title",e.title);this._sliderContent=t("div","ol-ctv-slider-main tooltip",this._container),"vertical"===e.orientation&&"top"===e.tooltip&&(e.tooltip="right");this.tooltip=t("span","tooltip-text tooltip-"+e.tooltip,this._sliderContent),this.tooltip.innerHTML=e.ico,e.switch&&(this._next=t("a","ol-ctv-slider-incdec ol-ctv-slider-next",this._sliderContent),this._next.innerHTML=e.nextText,r(this._next,"click",this.nextTilesVersion,this),this._container.classList.add(n+"-incdec"));this._sliderContainer=t("div","ol-ctv-slider-container",this._sliderContent),this.slider=t("input","ol-ctv-slider",this._sliderContainer),this.min=null==this.min||isNaN(this.min)?0:parseInt(this.min),this.slider.setAttribute("title",e.title),this.slider.setAttribute("id","slider"),this.slider.setAttribute("type","range"),this.slider.setAttribute("min",this.min),this.slider.setAttribute("max",0),this.slider.setAttribute("step",1),this.slider.setAttribute("value",0),this.firstLoad=!0,"oninput"in this.slider||"onchange"in this.slider?r(this.slider,"change",a,this):this.slider.onpropertychange=a;e.switch&&(this._last=t("a","ol-ctv-slider-incdec ol-ctv-slider-last",this._sliderContent),this._last.innerHTML=e.lastText,r(this._last,"click",this.lastTilesVersion,this));"vertical"==e.orientation?(this.slider.style.width="170px",this._sliderContainer.style.height="170px"):this._sliderContainer.style.width="150px";r(this._container,"click",function(e){e.preventDefault(),e.stopPropagation()},this),e.collapsed?(r(this._container,"mouseenter",s,this),r(this._container,"mouseleave",i,this),r(this._sliderBtn,"click",function(e){e.preventDefault(),e.stopPropagation()}),r(this._sliderBtn,"click",s,this),r(this._sliderBtn,"focus",s,this)):s();return this._container}.call(this),e.layer&&this.setLayer(e.layer)}setContent(e){var t=e||{};this.setVersionName(t.desc).setToolTip(t.desc)}setVersionName(e){var t=e;return e||(t=this.getValue()),this._sliderValue.innerHTML=t,this}setToolTip(e){return this.tooltip.innerHTML=e,this}updateLength(e){e>0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))}setLayer(e){e&&(this.options.layer=e);var t=this,r=t.options.layer;r.on("tilesetsinfoloaded",function(e){var r=e.value&&e.value.tileVersions;t.update(r)}),r.on("tileversionschanged",function(e){var r=e.value&&e.value.tileVersion;t.setContent(r)}),t.getTileSetsInfo()}update(e){this.tileVersions=e,this.updateLength(this.tileVersions.length)}getTileSetsInfo(){var e=this;e.options.layer&&new uo(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})}removeLayer(){this.options.layer=null}nextTilesVersion(){return this.firstLoad?(this.options.layer.nextTilesVersion(),this.firstLoad=!1,this):parseInt(this.slider.value)>this.max-1?this:(this.slider.value=parseInt(this.slider.value)+1,this.options.layer.nextTilesVersion(),this)}lastTilesVersion(){return parseInt(this.slider.value)=this.minWidth_)break;++d}this.renderedHTML_=this.renderedHTML_||this.D,this.innerElement_=this.innerElement_||this.l,this.renderedWidth_=this.renderedWidth_||this.B,this.renderedVisible_=this.renderedVisible_||this.j,this.element_=this.element_||this.c;let p=h.toFixed(c<0?-c:0)+" "+o;this.renderedHTML_!=p&&(this.innerElement_.innerHTML=p,this.renderedHTML_=p),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class xo extends po.a{constructor(e){(e=e||{}).imageUrl=e.imageUrl||null,e.width=e.width||null,e.height=e.height||null,e.link=e.link||"https://iclient.supermap.io",e.alt=e.alt||"SuperMap iClient",super(e),this.options=e,this.element=e.element=function(){var e=document.createElement("div");e.className="ol-control-logo ol-unselectable ol-control",function(e){var t=document.getElementsByClassName("ol-attribution"),r=(t=t&&t[0])&&t.clientHeight||29;e.style.bottom=parseInt(r)+6+"px",e.style.right="4px",e.style.marginTop=0,e.style.marginLeft=0,e.style.marginBottom=0,e.style.marginRight=0;var s=document.createElement("style");s.type="text/css",s.innerHTML=".ol-control-logo,.ol-control-logo:hover {background-color: rgba(255,255,255,0);}",document.getElementsByTagName("head")[0].appendChild(s)}.call(this,e);var t=We;this.options.imageUrl&&(t=this.options.imageUrl);var r=this.options.alt,s=this.options.link,i="94px",a="29px",n="width:"+i+";height:"+a+";";this.options.imageUrl&&(i=this.options.width,a=this.options.height,n="width:"+i+";height:"+a+";",i&&a||(n=""));return e.innerHTML=""+r+"",e}.call(this)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var Co={"point-file":"pointFile","point-fill":"fillStyle","point-radius":"pointRadius","point-halo-radius":"pointHaloRadius","point-halo-color":"pointHaloColor","point-dx":"offsetX","point-dy":"offsetY","point-opacity":"globalAlpha","point-comp-op":"globalCompositeOperation"},To={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","line-offset":"offset","line-comp-op":"globalCompositeOperation"},_o={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","polygon-fill":"fillStyle","polygon-dx":"offsetX","polygon-dy":"offsetY","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"},wo={CartoStyleMap:{TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-vertical-alignment":"textBaseline","text-horizontal-alignment":"textAlign","text-bold":"bold","text-weight":"fontWeight","text-name":"textName","text-halo-radius":"haloRadius","text-halo-color":"backColor","text-fill":"foreColor","text-opacity":"globalAlpha","text-dx":"offsetX","text-dy":"offsetY","text-comp-op":"globalCompositeOperation"},POINT:Co,MULTIPOINT:Co,LINE:To,LINESTRING:To,MULTILINESTRING:To,REGION:_o,POLYGON:_o,MULTIPOLYGON:_o},ServerStyleMap:{fillBackOpaque:{canvasStyle:"",type:"bool",defaultValue:!0},lineWidth:{canvasStyle:"lineWidth",type:"number",unit:"mm",defaultValue:.1},fillBackColor:{canvasStyle:"",type:"color",defaultValue:"rgba(0,0,0,0)"},markerWidth:{canvasStyle:"",type:"number",unit:"mm",defaultValue:""},markerAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:""},fillForeColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{canvasStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},fillGradientOffsetRatioX:{canvasStyle:"",type:"number",defaultValue:0},fillGradientOffsetRatioY:{canvasStyle:"",type:"number",defaultValue:0},lineColor:{canvasStyle:"strokeStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},fillOpaqueRate:{canvasStyle:"",type:"number",defaultValue:100},markerHeight:{canvasStyle:"",type:"number",unit:"mm",defaultValue:0},fillGradientMode:{canvasStyle:"",type:"string",defaultValue:"NONE"},fillSymbolID:{canvasStyle:"",type:"number",defaultValue:0},fillGradientAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:0},markerSymbolID:{canvasStyle:"",type:"number",defaultValue:0},lineSymbolID:{canvasStyle:"",type:"number",defaultValue:0}},CartoCompOpMap:{clear:"",src:"",dst:"","src-over":"source-over","dst-over":"destination-over","src-in":"source-in","dst-in":"destination-in","src-out":"source-out","dst-out":"destination-out","src-atop":"source-atop","dst-atop":"destination-atop",xor:"xor",plus:"lighter",minus:"",multiply:"",screen:"",overlay:"",darken:"",lighten:"lighter","color-dodge":"","color-burn":"","hard-light":"","soft-light":"",difference:"",exclusion:"",contrast:"",invert:"","invert-rgb":"","grain-merge":"","grain-extract":"",hue:"",saturation:"",color:"",value:""}},Mo={pointFile:"",pointRadius:3,pointHaloRadius:1,pointHaloColor:"#c33",offsetX:0,offsetY:0,fillStyle:"#fc0",globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},Eo={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineDasharray:[],strokeOpacity:1,offset:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},Ao={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineOpacity:1,fillOpacity:1,lineDasharray:[],fillStyle:"rgba(0,0,0,0)",polygonOpacity:1,offsetX:0,offsetY:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},Po={TEXT:{font:"10px sans-serif",textAlign:"middle",textBaseline:"center",direction:"ltr",bold:!1,haloRadius:0,backColor:"rgba(255,255,255,1)",foreColor:"rgba(0,0,0,1)",offsetX:0,offsetY:0,textHeight:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},POINT:Mo,MULTIPOINT:Mo,LINE:Eo,LINESTRING:Eo,MULTILINESTRING:Eo,REGION:Ao,POLYGON:Ao,MULTIPOLYGON:Ao,SHADOW:{shadowBlur:0,shadowColor:"rgba(0,0,0,0)",shadowOffsetX:0,shadowOffsetY:0},GLOBAL:{globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0}},Oo=r(4),Lo=r.n(Oo),Io=r(2),No=r.n(Io); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ro extends a{constructor(e,t){super(e,t)}queryByBounds(e,t,r){var s=this;new Si(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}queryByDistance(e,t,r){var s=this;new xi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}queryBySQL(e,t,r){var s=this;new wi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}queryByGeometry(e,t,r){var s=this;new Ti(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!Wo.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds=new xe(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.geometry&&(e.geometry instanceof Lo.a?e.geometry=new Me(e.geometry.getCoordinates()[0],e.geometry.getCoordinates()[1]):e.geometry=Wo.toSuperMapGeometry(JSON.parse((new No.a).writeGeometry(e.geometry)))),e):{}}_processFormat(e){return e||o.GEOJSON}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Fo extends a{constructor(e,t){super(e,t)}getFeaturesByIDs(e,t,r){var s=this;new ds(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesByBounds(e,t,r){var s=this;new ns(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesByBuffer(e,t,r){var s=this;new ls(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesBySQL(e,t,r){var s=this;new ms(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}getFeaturesByGeometry(e,t,r){var s=this;new us(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}editFeatures(e,t){if(e&&e.dataSourceName&&e.dataSetName){var r=this,s=r.url,i=e.dataSourceName,a=e.dataSetName;s=Se.urlPathAppend(s,"datasources/"+i+"/datasets/"+a),new gr(s,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}}_processParams(e){if(!e)return{};var t=this;if(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.bounds&&(e.bounds=Wo.toSuperMapBounds(e.bounds)),e.geometry&&(e.geometry=Wo.toSuperMapGeometry(JSON.parse((new No.a).writeGeometry(e.geometry)))),e.editType&&(e.editType=e.editType.toLowerCase()),e.features){var r=[];Wo.isArray(e.features)?e.features.map(function(e){return r.push(t._createServerFeature(e)),e}):r.push(t._createServerFeature(e.features)),e.features=r}return e}_createServerFeature(e){var t={},r=[],s=[],i=e.getProperties();for(var a in i)a!==e.getGeometryName()&&(r.push(a),s.push(i[a]));return t.fieldNames=r,t.fieldValues=s,e.getId()&&(t.id=e.getId()),t.geometry=Wo.toSuperMapGeometry((new No.a).writeFeatureObject(e)),t}_processFormat(e){return e||o.GEOJSON}}var Do=r(30),ko=r(13),Go=r.n(ko),Bo=r(28),Uo=r(20),jo=r.n(Uo),Vo=r(44),Ho=r.n(Vo),Jo=r(11),zo=r(8),qo=r.n(zo); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Wo{constructor(){}static getOlVersion(){if(Do&&Do.VERSION)return Do.VERSION.split(".")[0];if(window&&window.ol){if(window.ol.util)return"6";if(window.ol.WebGLMap)return"5"}return"4"}static toGeoJSON(e){return e?(new qe).toGeoJSON(e):null}static toSuperMapGeometry(e){if(!e||!e.type)return null;return(new qe).read(e,"FeatureCollection")[0].geometry}static resolutionToScale(e,t,r){return 1/(e*t*(1/.0254)*this.getMeterPerMapUnit(r))}static toSuperMapBounds(e){return new xe(e[0],e[1],e[2],e[3])}static toProcessingParam(e){if(e.length<1)return"";const t={},r=[];for(let t=0;t-180&&h<90&&h>-90;if(o.length!==a.length||!u)continue;const c={type:"Feature",geometry:{},properties:{}};c.geometry.type="Point",c.geometry.coordinates=[l,h];for(let e=0;e{"processCompleted"===e.type?s&&s(e):i&&i(e)})}static queryFeatureBySQL(e,t,r,s,i,a,n,o,l,h){const c=new Dt({name:t,attributeFilter:r});s&&(c.fields=s);const d={queryParams:[c]};h&&(d.queryOption=u.ATTRIBUTE),o&&(d.startRecord=o),l&&(d.expectCount=l),i&&(d.prjCoordSys={epsgCode:i});const p=new _i(d);new Ro(e).queryBySQL(p,function(e){"processCompleted"===e.type?a(e):n(e)})}static getFeatureProperties(e){let t=[];return Wo.isArray(e)&&e.length&&e.forEach(e=>{let r=e.get("attributes");r&&t.push(r)}),t}static isMatchAdministrativeName(e,t){if(Wo.isString(t)){let r=e.substr(0,2);return"张家"===r&&(r=e.substr(0,3)),!!t.match(new RegExp(r))}return!1}static setMask(e,t){if(!t)return;if(!((t instanceof qo.a?t.getGeometry():t)instanceof Go.a)&&["MultiPolygon","Polygon"].indexOf(t.getType())<0)return;const r=t instanceof qo.a?t:new qo.a(t),s=new Jo.Style({fill:new Jo.Fill({color:"black"})}),i=new Ho.a({source:new jo.a({features:[r],wrapX:!1})}),a=function(e){const t=Object(Bo.getVectorContext)(e);e.context.globalCompositeOperation="destination-in",i.getSource().forEachFeature(function(r){t.drawFeature(r,s),e.context.globalCompositeOperation="source-over"})},n=Array.isArray(e)?e:[e];Wo.unsetMask(n),n.forEach(e=>{e.classNameBak_=e.className_,e.className_="ol_mask_layer",e.clipRender=a,e.extentBak_=e.getExtent(),e.setExtent(i.getSource().getExtent()),e.on("postrender",a),e.changed()})}static unsetMask(e){const t=Array.isArray(e)?e:[e];for(let e=0;e0&&f[f.length-1]}p=t.getProperties().attributes?t.getProperties().attributes[m]:t.getProperties()[m]}return t.getProperties().TEXT_FEATURE_CONTENT&&(p=t.getProperties().TEXT_FEATURE_CONTENT),p?this.toOLTextStyle(a,p):this.toOLPointStyle(this.getDefaultStyle("POINT"))}if(i){var y=i.fillSymbolID>7?0:i.fillSymbolID,g=i.lineSymbolID>5?0:i.lineSymbolID;for(var v in i){var S,b=wo.ServerStyleMap[v],x=b.canvasStyle;if(x&&""!=x)switch(b.type){case"number":S=i[v],b.unit&&(S=S*n.DOTS_PER_INCH*n.INCHES_PER_UNIT[b.unit]*2.5),a[x]=S;break;case"color":var C=i[v],T=i.fillBackColor,_=1;if("fillStyle"===x)if(0===y||1===y)_=1-y,S="rgba("+C.red+","+C.green+","+C.blue+","+_+")";else try{var w=document.createElement("canvas");w.height=8,w.width=8;var M=w.getContext("2d"),E=new Image;this.layer&&this.layer.fillImages&&M.drawImage(this.layer.fillImages["System "+y],0,0);for(var A=M.getImageData(0,0,w.width,w.height),P=A.data,O=0,L=P.length;O{r=new $o.a({img:e,scale:c/e.width,imgSize:[e.width,e.height],anchor:[.5,.5]})})):r=new $o.a({src:p,scale:m,anchor:g}):r=new tl.a({radius:c,fill:new sl.a({color:v}),stroke:new al.a({width:h||ul,color:S}),displacement:this.getCircleDisplacement(c,f,y)}),a.setImage(r);else if("LINE"===t||"LINESTRING"===t||"MULTILINESTRING"===t||"LINEARRING"===t)i=new al.a({width:h||ul,color:S,lineCap:d||"round",lineDash:this.dashStyle(e,1)}),a.setStroke(i);else if("POLYGON"===t||"MULTIPOLYGON"===t||"REGION"===t)s=new sl.a({color:v}),i=new al.a({width:h||ul,color:S,lineCap:d||"round",lineDash:this.dashStyle(e,1)}),a.setFill(s),a.setStroke(i);else{let t=this.getCanvas(e);r=new $o.a({img:t.canvas,imgSize:[t.width,t.height],scale:1,anchor:[.5,.5]}),a.setImage(r)}return a}static getIconAnchor(e=.5,t=.5){return[e,t]}static getCircleDisplacement(e,t=0,r=0){return[e*t,-(e*r)]}static getTextOffset(e,t=0,r=0){const s=e.substr(0,e.length-2)/2;return{x:s*t,y:s*r}}static getCanvas(e){let t;e.canvas?t=document.querySelector("#"+e.canvas)?document.getElemntById(e.canvas):this.createCanvas(e):(t=this.createCanvas(e),e.canvas=t.id),t.style.display="none";var r=t.getContext("2d");let s=Number(e.font.replace(/[^0-9]/gi,"")),i=e.text.split("\r\n"),a=i.length;r.font=e.font;let n=this.drawRect(r,e,i,s,t);return this.positionY=ll,a>1?i.forEach(function(t,i){0!==i&&(this.positionY=this.positionY+s),this.canvasTextAutoLine(t,e,r,s,n.width)},this):this.canvasTextAutoLine(i[0],e,r,s,n.width),{canvas:t,width:n.width,height:n.height}}static createCanvas(e){let t=document.createElement("div");document.body.appendChild(t);let r=document.createElement("canvas");return r.id=e.canvas?e.canvas:"textCanvas"+Wo.newGuid(8),t.appendChild(r),r}static drawRect(e,t,r,s,i){let a,n=t.backgroundFill,o=t.maxWidth-hl,l=0,h=0,u=[];return r.forEach(function(t){let r,s="";h++;for(var i=0;io&&i>0||"\n"===t[i]?(s=t[i],h++,r=!0):(s=n,a=l)}r?u.push(o):u.push(a)},this),a=this.getCanvasWidth(u,o),l=h*s,l+=hl,i.width=a,i.height=l,e.fillStyle=n,e.fillRect(0,0,a,l),{width:a,height:l}}static getCanvasWidth(e,t){let r=0;for(let s=0;s=t)return t+hl;i>r&&(r=i)}return r+hl}static canvasTextAutoLine(e,t,r,s,i){r.font=t.font;let a=t.textAlign,n=this.getPositionX(a,i),o=e.split(""),l="",h=t.fillColor,u=t.maxWidth-hl;for(var c=0;cu&&c>0||"\n"===o[c]?(r.fillStyle=h,r.textAlign=a,r.textBaseline="top",r.fillText(l,n,this.positionY),l=o[c],this.positionY+=s):l=e}r.fillStyle=h,r.textAlign=a,r.textBaseline="top",r.fillText(l,n,this.positionY)}static getPositionX(e,t){let r,s=t-hl;switch(e){case"center":r=s/2;break;case"right":r=s;break;default:r=8}return r}static hexToRgb(e){if(e){var t=e.replace("#","").split(""),r=[t[0]+t[1],t[2]+t[3],t[4]+t[5]];return r=r.map(function(e){return parseInt(e,16)})}}static formatRGB(e){let t;return 3===e.length?(t="rgb(",e.forEach(function(e,r){t+=2===r?e:e+","})):(t="rgba(",e.forEach(function(e,r){t+=3===r?e:e+","})),t+=")"}static getCanvasFromSVG(e,t,r){let s=window.canvg?window.canvg:Xo.a,i=document.createElement("canvas");i.id="dataviz-canvas-"+Wo.newGuid(8),i.style.display="none",t.appendChild(i);try{s(i.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:function(){i.width>300||i.height>300||r(i)},forceRedraw:function(){return!1}})}catch(e){return}}static getMarkerDefaultStyle(e,t){let r;switch(e){case"POINT":r={src:`${t}apps/dataviz/static/imgs/markers/mark_red.png`,scale:1,anchor:[.5,1]};break;case"LINE":case"LINESTRING":case"MULTILINESTRING":r={strokeColor:"#3498db",strokeOpacity:1,strokeWidth:5,lineCap:"round",lineDash:"solid"};break;case"REGION":case"POLYGON":case"MULTIPOLYGON":r={fillColor:"#1abd9c",fillOpacity:1,strokeColor:"#3498db",strokeOpacity:1,strokeWidth:3,lineCap:"round",lineDash:"solid"}}return r}static getOpenlayersStyle(e,t,r){let s;return"BASIC_POINT"===e.type?s=this.toOpenLayersStyle(e,t):"SYMBOL_POINT"===e.type?s=this.getSymbolStyle(e,r):"SVG_POINT"===e.type?s=this.getSVGStyle(e):"IMAGE_POINT"===e.type&&(s=this.getImageStyle(e)),s}static getSymbolStyle(e,t){let r="";e.unicode&&(r=String.fromCharCode(parseInt(e.unicode.replace(/^&#x/,""),16)));let s=cl.hexToRgb(e.fillColor);s.push(e.fillOpacity);let i=cl.hexToRgb(e.strokeColor);i.push(e.strokeOpacity);let a=t?2*e.radius+"px":e.fontSize;const{offsetX:n,offsetY:o,rotation:l}=e,h=cl.getTextOffset(a,n,o);return new Ko.a({text:new ol.a({text:r,font:a+" supermapol-icons",placement:"point",textAlign:"center",fill:new sl.a({color:s}),backgroundFill:new sl.a({color:[0,0,0,0]}),stroke:new al.a({width:e.strokeWidth||1e-6,color:i}),offsetX:h.x,offsetY:h.y,rotation:l})})}static getSVGStyle(e){let t,r=this;r.svgDiv||(r.svgDiv=document.createElement("div"),document.body.appendChild(r.svgDiv));const{url:s,radius:i,offsetX:a,offsetY:n,fillOpacity:o,rotation:l}=e;let h=this.getIconAnchor(a,n);return cl.getCanvasFromSVG(s,r.svgDiv,function(s){t=new Ko.a({image:new $o.a({img:r.setColorToCanvas(s,e),scale:2*i/s.width,imgSize:[s.width,s.height],anchor:h||[.5,.5],opacity:o,anchorOrigin:"bottom-right",rotation:l})})}),t}static setColorToCanvas(e,t){let r=e.getContext("2d"),s=cl.hexToRgb(t.fillColor);s&&s.push(t.fillOpacity);let i=cl.hexToRgb(t.strokeColor);return i&&i.push(t.strokeOpacity),r.fillStyle=cl.formatRGB(s),r.fill(),r.strokeStyle=cl.formatRGB(i),r.lineWidth=t.strokeWidth,r.stroke(),e}static getImageStyle(e){let t=e.imageInfo.size,r=2*e.radius/t.w,s=e.imageInfo,i=s.img;i&&i.src||((i=new Image).src=s.url);const{offsetX:a,offsetY:n,rotation:o}=e;let l=this.getIconAnchor(a,n);return new Ko.a({image:new $o.a({img:i,scale:r,imgSize:[t.w,t.h],anchor:l||[.5,.5],anchorOrigin:"bottom-right",rotation:o})})}static getRoadPath(e,t){const{strokeWidth:r=ul,lineCap:s,strokeColor:i,strokeOpacity:a}=e;let n=this.hexToRgb(i);n&&n.push(a);var o=new Ko.a({stroke:new al.a({width:r||ul,color:n,lineCap:s||"round",lineDash:[0]})});const{strokeColor:l}=t;let h=this.hexToRgb(l);h&&h.push(a);let u=0===r?ul:r+2;return[new Ko.a({stroke:new al.a({width:u,color:h,lineCap:s||"round",lineDash:[0]})}),o]}static getPathway(e,t){let{strokeWidth:r=ul,strokeColor:s,strokeOpacity:i}=e;const a=(e=>[e,e+2*r])(4*r);let n=this.hexToRgb(s);n&&n.push(i);var o=new Ko.a({stroke:new al.a({width:.5*r||ul,color:n,lineCap:"square",lineDash:a})});const{strokeColor:l}=t;let h=this.hexToRgb(l);return h&&h.push(i),[new Ko.a({stroke:new al.a({width:r||ul,color:h,lineCap:"square"})}),o]}}var dl=r(18),pl=r.n(dl),ml=r(46),fl=r.n(ml),yl=function(){const e=function(t,r,s,i,a,n){t instanceof fl.a?t.getLayers().forEach(function(t){e(t,r,s,i,a,n)}):t.getSource()._forEachFeatureAtCoordinate&&t.getSource()._forEachFeatureAtCoordinate(r,s,e=>{i(e,t)},a,n)};pl.a.prototype.forEachFeatureAtPixelDefault=pl.a.prototype.forEachFeatureAtPixel,pl.a.prototype.forEachFeatureAtPixel=pl.a.prototype.Tc=function(t,r,s,i){const a=s&&s.layerFilter?s.layerFilter:()=>!0,n=this.getLayers().getArray(),o=this.getView().getResolution(),l=this.getCoordinateFromPixel(t);for(let s=0;s© SuperMap iClient",s=Cl.defaultTileGrid(),i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",a=void 0!==t.url?t.url:"http://online1.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles={styles}&udt=20170408",n=t.hidpi||(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;a=a.replace("{styles}",n?"ph":"pl"),super({attributions:r,cacheSize:t.cacheSize,crossOrigin:i,opaque:void 0===t.opaque||t.opaque,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,projection:"EPSG:3857",wrapX:t.wrapX,tilePixelRatio:n?2:1,tileGrid:s,tileUrlFunction:function(e,t,r){var i=a.replace("{z}",e[0].toString()).replace("{x}",e[1].toString()).replace("{y}",function(){console.log(Wo.getOlVersion());var t=["4","5"].indexOf(Wo.getOlVersion())>-1?e[2]:-e[2]-1;return t.toString()}).replace("{-y}",function(){var t=e[0],r=s.getFullTileRange(t);Sl.assert(r,55);var i=r.getHeight()+e[2];return i.toString()});o.tileProxy&&(i=o.tileProxy+encodeURIComponent(i));return i}}),t.tileProxy&&(this.tileProxy=t.tileProxy);var o=this}static defaultTileGrid(){return new xl.a({extent:[-33554432,-33554432,33554432,33554432],resolutions:[262144,131072,65536,32768,16284,8192,4096,2048,1024,512,256,128,64,32,16,8,4,2,1,.5],origin:[0,0],minZoom:3})}}var Tl=r(22),_l=r(29); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class wl extends vl.a{constructor(e){if(void 0===e.url)return;e.attributions=e.attributions||"Map Data © SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png";var t=Se.urlPathAppend(e.url,"image."+e.format);e.serverType=e.serverType||l.ISERVER,t=function(e,t,r){var s,i,a=t;switch(r){case l.IPORTAL:i=rt.getToken(e),(s=i?new Re(i,"token"):null)||(i=rt.getKey(e),s=i?new Re(i,"key"):null);break;case l.ONLINE:i=rt.getKey(e),s=i?new Re(i,"key"):null;break;default:i=rt.getToken(e),s=i?new Re(i,"token"):null}s&&(a=Se.urlAppend(a,s.getUrlParameters()));return a}(e.url,t,e.serverType);const r={};var s=void 0===e.transparent||e.transparent;r.transparent=s;var i=void 0===e.cacheEnabled||e.cacheEnabled;r.cacheEnabled=i,void 0!==e.layersID&&(r.layersID=e.layersID);var a=!1;void 0!==e.redirect&&(a=e.redirect),r.redirect=a,e.prjCoordSys&&(r.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.clipRegionEnabled&&e.clipRegion instanceof Go.a&&(e.clipRegion=Wo.toSuperMapGeometry((new No.a).writeGeometryObject(e.clipRegion)),e.clipRegion=Se.toJSON(ze.fromGeometry(e.clipRegion)),r.clipRegionEnabled=e.clipRegionEnabled,r.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed&&e.overlapDisplayedOptions&&(r.overlapDisplayed=e.overlapDisplayed,r.overlapDisplayedOptions=e.overlapDisplayedOptions.toString()),!0===i&&e.tileversion&&(r.tileversion=e.tileversion),e.rasterfunction&&(r.rasterfunction=JSON.stringify(e.rasterfunction)),t=Se.urlAppend(encodeURI(t),Se.getParameterString(r)),super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===Wo.getOlVersion()?e.logo:null,opaque:e.opaque,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:function(r,s,i){this.tileGrid||(this.tileGrid=this.getTileGridForProjection&&this.getTileGridForProjection(i));this.tileGrid||(e.extent?(this.tileGrid=wl.createTileGrid(e.extent),this.resolutions&&(this.tileGrid.resolutions=n.resolutions)):("EPSG:3857"===i.getCode()&&(this.tileGrid=wl.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),this.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===i.getCode()&&(this.tileGrid=wl.createTileGrid([-180,-90,180,90]),this.extent=[-180,-90,180,90])));var a=this.tileGrid.getTileCoordExtent(r,this.tmpExtent_),o=Tl.toSize(this.tileGrid.getTileSize(r[0]),this.tmpSize),l=t+encodeURI("&width="+o[0]+"&height="+o[1]+'&viewBounds={"leftBottom" : {"x":'+a[0]+',"y":'+a[1]+'},"rightTop" : {"x":'+a[2]+',"y":'+a[3]+"}}");n.tileProxy&&(l=n.tileProxy+encodeURIComponent(l));n.cacheEnabled||(l+="&_t="+(new Date).getTime());return l},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID}),this.cacheEnabled=i,e.tileProxy&&(this.tileProxy=e.tileProxy);var n=this}static optionsFromMapJSON(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var s=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],i=function(){var e,r=s[2]-s[0],i=s[3]-s[1],a=r>=i?r:i;e=a===r?a/t.viewer.width:a/t.viewer.height;var n=[],o=f.METER;t.coordUnit===f.DEGREE&&(o=f.DEGREE);if(t.visibleScales.length>0)for(let e=0;e© SuperMap iClient",s=t.mapName||"quanguo",i=t.mapType||"web",a=t.url||"http://t2.dituhui.com/FileService/image?map={mapName}&type={type}&x={x}&y={y}&z={z}";a=a.replace("{mapName}",s).replace("{type}",i);var n={attributions:r,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,opaque:void 0===t.opaque||t.opaque,maxZoom:t.maxZoom||18,reprojectionErrorThreshold:t.reprojectionErrorThreshold,url:a,wrapX:t.wrapX};t.tileProxy&&(n.tileLoadFunction=function(e,t){e.getImage().src=o.tileProxy+encodeURIComponent(t)}),super(n),t.tileProxy&&(this.tileProxy=t.tileProxy);var o=this}}var Pl=r(49),Ol=r.n(Pl),Ll=r(25),Il=r.n(Ll); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Nl extends Ol.a{constructor(e){var t=e||{},r=t.attributions||"Map Data with © SuperMap iClient";t.layerType=t.layerType||"vec",t.layerType=t.isLabel?{vec:"cva",ter:"cta",img:"cia"}[t.layerType]:t.layerType,t.matrixSet="EPSG:4326"===t.projection||"EPSG:4490"===t.projection?"c":"w",t.url||t.urls||(t.url="http://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),t.key&&(t.url=`${t.url}tk=${t.key}`),t.url=t.url.replace("{layer}",t.layerType).replace("{proj}",t.matrixSet);var s=t.tileGrid||Nl.getTileGrid(t.projection||"EPSG:3857"),i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",a={version:t.version||"1.0.0",format:t.format||"tiles",dimensions:t.dimensions||{},layer:t.layerType,matrixSet:t.matrixSet,tileGrid:s,style:t.style||"default",attributions:r,cacheSize:t.cacheSize,crossOrigin:i,opaque:void 0===t.opaque||t.opaque,maxZoom:{vec:18,ter:14,img:18}[t.layerType],reprojectionErrorThreshold:t.reprojectionErrorThreshold,url:t.url,urls:t.urls,projection:t.projection||"EPSG:3857",wrapX:t.wrapX};t.tileProxy&&(a.tileLoadFunction=function(e,t){e.getImage().src=n.tileProxy+encodeURIComponent(t)}),super(a),t.tileProxy&&(this.tileProxy=t.tileProxy);var n=this}static getTileGrid(e){return"EPSG:4326"===e||"EPSG:4490"===e?Nl.default4326TileGrid():Nl.default3857TileGrid()}static default4326TileGrid(){for(var e=[],t=[],r=1;r<19;r++)e.push(1.40625/Math.pow(2,r)),t.push(r);return new Il.a({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}static default3857TileGrid(){for(var e=[],t=[],r=1;r<19;r++)e.push(156543.03392804062/Math.pow(2,r)),t.push(r);return new Il.a({extent:[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],resolutions:e,matrixIds:t,origin:[-20037508.3427892,20037508.3427892],minZoom:1})}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Rl extends vl.a{constructor(e){if(void 0!==(e=e||{}).url){e.attributions=e.attributions||"Map Data © SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png",e.serverType=e.serverType||l.ISERVER,super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===Wo.getOlVersion()?e.logo:null,opaque:e.opaque,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:function(r,i,a){t.tileGrid||(e.extent?(t.tileGrid=Rl.createTileGrid(e.extent),t.resolutions&&(t.tileGrid.resolutions=t.resolutions)):("EPSG:3857"===a.getCode()&&(t.tileGrid=Rl.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),t.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===a.getCode()&&(t.tileGrid=Rl.createTileGrid([-180,-90,180,90]),t.extent=[-180,-90,180,90])));t.origin=t.tileGrid.getOrigin(0);var n=r[0],o=r[1],l=["4","5"].indexOf(Wo.getOlVersion())>-1?-r[2]-1:r[2],h=t.tileGrid.getResolution(n),u=a.getUnits()||f.DEGREE;"degrees"!==u&&"degree"!==u||(u=f.DEGREE);"m"!==u&&"meter"!==u||(u=f.METER);var c=Wo.resolutionToScale(h,96,u),d=Tl.toSize(t.tileGrid.getTileSize(n,t.tmpSize)),p=function(){this._paramsChanged&&(this._layerUrl=s.call(this),this._paramsChanged=!1);return this._layerUrl||s.call(this)}.call(t)+encodeURI("&x="+o+"&y="+l+"&width="+d[0]+"&height="+d[1]+"&scale="+c);t.tileProxy&&(p=t.tileProxy+encodeURIComponent(p));t.cacheEnabled||(p+="&_t="+(new Date).getTime());return p},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID}),e.tileProxy&&(this.tileProxy=e.tileProxy),this.options=e,this._url=e.url,this.tileSetsIndex=-1,this.tempIndex=-1;var t=this,r=Se.urlPathAppend(e.url,"tileImage."+e.format)}function s(){return this.requestParams=this.requestParams||function(){var t={};return t.redirect=void 0!==e.redirect&&e.redirect,t.transparent=void 0===e.transparent||e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),this.cacheEnabled=t.cacheEnabled,t._cache=t.cacheEnabled,this.origin&&(t.origin=JSON.stringify({x:this.origin[0],y:this.origin[1]})),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegion instanceof Go.a&&(e.clipRegionEnabled=!0,e.clipRegion=Wo.toSuperMapGeometry((new No.a).writeGeometryObject(e.clipRegion)),e.clipRegion=Se.toJSON(ze.fromGeometry(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed?t.overlapDisplayed=!0:(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=this.overlapDisplayedOptions.toString())),t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t}.call(this),this._layerUrl=Se.urlAppend(r,Se.getParameterString(this.requestParams)),this._layerUrl=function(e,r){var s,i,a=e;switch(r){case l.IPORTAL:(s=(i=rt.getToken(t._url))?new Re(i,"token"):null)||(s=(i=rt.getKey(t._url))?new Re(i,"key"):null);break;case l.ONLINE:s=(i=rt.getKey(t._url))?new Re(i,"key"):null;break;default:s=(i=rt.getToken(t._url))?new Re(i,"token"):null}return s&&(a=Se.urlAppend(a,s.getUrlParameters())),a}(this._layerUrl,e.serverType),this._layerUrl}}setTileSetsInfo(e){this.tileSets=e,Wo.isArray(this.tileSets)&&(this.tileSets=e[0]),this.tileSets&&(this.dispatchEvent({type:"tilesetsinfoloaded",value:{tileVersions:this.tileSets.tileVersions}}),this.changeTilesVersion())}lastTilesVersion(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()}nextTilesVersion(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()}changeTilesVersion(){var e=this;if(null!=e.tileSets&&!(e.tempIndex===e.tileSetsIndex||this.tempIndex<0)){var t=e.tileSets.tileVersions;if(t&&e.tempIndex=0){var r=t[e.tempIndex].name;e.mergeTileVersionParam(r)&&(e.tileSetsIndex=e.tempIndex,e.dispatchEvent({type:"tileversionschanged",value:{tileVersion:t[e.tempIndex]}}))}}}updateCurrentTileSetsIndex(e){this.tempIndex=e}mergeTileVersionParam(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.refresh(),!0)}static optionsFromMapJSON(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var s=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],i=function(){var e,r=s[2]-s[0],i=s[3]-s[1],a=r>=i?r:i;e=a===r?a/t.viewer.width:a/t.viewer.height;var n=[],o=f.METER;t.coordUnit===f.DEGREE&&(o=f.DEGREE);if(t.visibleScalesEnabled&&t.visibleScales&&t.visibleScales.length>0)for(let e=0;e=this.text.length)return;e=this.text[this.place++]}switch(this.state){case rh:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},lh.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(nh.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},lh.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=rh)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=rh,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},lh.prototype.number=function(e){if(!oh.test(e)){if(nh.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},lh.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},lh.prototype.keyword=function(e){if(ah.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=rh)}if(!nh.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},lh.prototype.neutral=function(e){if(ih.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(oh.test(e))return this.word=e,void(this.state=3);if(!nh.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},lh.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(i),i};function fh(e){var t=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?fh[e]=eh(arguments[1]):fh[e]=mh(arguments[1]):fh[e]=r}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?fh.apply(t,e):fh(e)});if("string"==typeof e){if(e in fh)return fh[e]}else"EPSG"in e?fh["EPSG:"+e.EPSG]=e:"ESRI"in e?fh["ESRI:"+e.ESRI]=e:"IAU2000"in e?fh["IAU2000:"+e.IAU2000]=e:console.log(e);return}}(ph=fh)("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),ph("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),ph("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),ph.WGS84=ph["EPSG:4326"],ph["EPSG:3785"]=ph["EPSG:3857"],ph.GOOGLE=ph["EPSG:3857"],ph["EPSG:900913"]=ph["EPSG:3857"],ph["EPSG:102113"]=ph["EPSG:3857"];var yh=fh;var gh=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var vh=["3857","900913","3785","102113"];var Sh=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in yh}(e))return yh[e];if(function(e){return gh.some(function(t){return e.indexOf(t)>-1})}(e)){var t=mh(e);if(function(e){var t=$l(e,"authority");if(t){var r=$l(t,"epsg");return r&&vh.indexOf(r)>-1}}(t))return yh["EPSG:3857"];var r=function(e){var t=$l(e,"extension");if(t)return $l(t,"proj4")}(t);return r?eh(r):t}return function(e){return"+"===e[0]}(e)?eh(e):void 0},bh=function(e,t){var r,s;if(e=e||{},!t)return e;for(s in t)void 0!==(r=t[s])&&(e[s]=r);return e},xh=function(e,t,r){var s=e*t;return r/Math.sqrt(1-s*s)},Ch=function(e){return e<0?-1:1},Th=function(e){return Math.abs(e)<=Xl?e:e-Ch(e)*Yl},_h=function(e,t,r){var s=e*r,i=.5*e;return s=Math.pow((1-s)/(1+s),i),Math.tan(.5*(Ul-t))/s},wh=function(e,t){for(var r,s,i=.5*e,a=Ul-2*Math.atan(t),n=0;n<=15;n++)if(r=e*Math.sin(a),a+=s=Ul-2*Math.atan(t*Math.pow((1-r)/(1+r),i))-a,Math.abs(s)<=1e-10)return a;return-9999};function Mh(e){return e}var Eh=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=xh(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,r,s=e.x,i=e.y;if(i*ql>90&&i*ql<-90&&s*ql>180&&s*ql<-180)return null;if(Math.abs(Math.abs(i)-Ul)<=Jl)return null;if(this.sphere)t=this.x0+this.a*this.k0*Th(s-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(Wl+.5*i));else{var a=Math.sin(i),n=_h(this.e,i,a);t=this.x0+this.a*this.k0*Th(s-this.long0),r=this.y0-this.a*this.k0*Math.log(n)}return e.x=t,e.y=r,e},inverse:function(e){var t,r,s=e.x-this.x0,i=e.y-this.y0;if(this.sphere)r=Ul-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var a=Math.exp(-i/(this.a*this.k0));if(-9999===(r=wh(this.e,a)))return null}return t=Th(this.long0+s/(this.a*this.k0)),e.x=t,e.y=r,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:Mh,inverse:Mh,names:["longlat","identity"]}],Ah={},Ph=[];function Oh(e,t){var r=Ph.length;return e.names?(Ph[r]=e,e.names.forEach(function(e){Ah[e.toLowerCase()]=r}),this):(console.log(t),!0)}var Lh={start:function(){Eh.forEach(Oh)},add:Oh,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==Ah[t]&&Ph[Ah[t]]?Ph[Ah[t]]:void 0}},Ih={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Nh=Ih.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ih.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Rh={};Rh.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Rh.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Rh.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Rh.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Rh.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Rh.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Rh.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Rh.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},Rh.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Rh.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Rh.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Rh.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Rh.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Rh.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Rh.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Rh.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Rh.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var Fh=function(e,t,r,s,i,a){var n={};return n.datum_type=void 0===e||"none"===e?Gl:kl,t&&(n.datum_params=t.map(parseFloat),0===n.datum_params[0]&&0===n.datum_params[1]&&0===n.datum_params[2]||(n.datum_type=Fl),n.datum_params.length>3&&(0===n.datum_params[3]&&0===n.datum_params[4]&&0===n.datum_params[5]&&0===n.datum_params[6]||(n.datum_type=Dl,n.datum_params[3]*=Bl,n.datum_params[4]*=Bl,n.datum_params[5]*=Bl,n.datum_params[6]=n.datum_params[6]/1e6+1))),n.a=r,n.b=s,n.es=i,n.ep2=a,n};function Dh(e,t){if(!(this instanceof Dh))return new Dh(e);t=t||function(e){if(e)throw e};var r=Sh(e);if("object"==typeof r){var s=Dh.projections.get(r.projName);if(s){if(r.datumCode&&"none"!==r.datumCode){var i=$l(Rh,r.datumCode);i&&(r.datum_params=i.towgs84?i.towgs84.split(","):null,r.ellps=i.ellipse,r.datumName=i.datumName?i.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84";var a,n,o,l,h,u,c,d=function(e,t,r,s,i){if(!e){var a=$l(Ih,s);a||(a=Nh),e=a.a,t=a.b,r=a.rf}return r&&!t&&(t=(1-1/r)*e),(0===r||Math.abs(e-t)-1.001*Ul)l=-Ul;else if(l>Ul&&l<1.001*Ul)l=Ul;else{if(l<-Ul)return{x:-1/0,y:-1/0,z:e.z};if(l>Ul)return{x:1/0,y:1/0,z:e.z}}return o>Math.PI&&(o-=2*Math.PI),i=Math.sin(l),n=Math.cos(l),a=i*i,{x:((s=r/Math.sqrt(1-t*a))+h)*n*Math.cos(o),y:(s+h)*n*Math.sin(o),z:(s*(1-t)+h)*i}}function Bh(e,t,r,s){var i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S=e.x,b=e.y,x=e.z?e.z:0;if(i=Math.sqrt(S*S+b*b),a=Math.sqrt(S*S+b*b+x*x),i/r<1e-12){if(g=0,a/r<1e-12)return Ul,v=-s,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2(b,S);n=x/a,c=(o=i/a)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*o*o)),d=n*l,y=0;do{y++,h=t*(u=r/Math.sqrt(1-t*d*d))/(u+(v=i*c+x*d-u*(1-t*d*d))),f=(m=n*(l=1/Math.sqrt(1-h*(2-h)*o*o)))*c-(p=o*(1-h)*l)*d,c=p,d=m}while(f*f>1e-24&&y<30);return{x:g,y:Math.atan(m/Math.abs(p)),z:v}}function Uh(e){return e===Fl||e===Dl}var jh=function(e,t,r){return function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===Fl?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==Dl||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t)?r:e.datum_type===Gl||t.datum_type===Gl?r:e.es!==t.es||e.a!==t.a||Uh(e.datum_type)||Uh(t.datum_type)?(r=Gh(r,e.es,e.a),Uh(e.datum_type)&&(r=function(e,t,r){if(t===Fl)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(t===Dl){var s=r[0],i=r[1],a=r[2],n=r[3],o=r[4],l=r[5],h=r[6];return{x:h*(e.x-l*e.y+o*e.z)+s,y:h*(l*e.x+e.y-n*e.z)+i,z:h*(-o*e.x+n*e.y+e.z)+a}}}(r,e.datum_type,e.datum_params)),Uh(t.datum_type)&&(r=function(e,t,r){if(t===Fl)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(t===Dl){var s=r[0],i=r[1],a=r[2],n=r[3],o=r[4],l=r[5],h=r[6],u=(e.x-s)/h,c=(e.y-i)/h,d=(e.z-a)/h;return{x:u+l*c-o*d,y:-l*u+c+n*d,z:o*u-n*c+d}}}(r,t.datum_type,t.datum_params)),Bh(r,t.es,t.a,t.b)):r},Vh=function(e,t,r){var s,i,a,n=r.x,o=r.y,l=r.z||0,h={};for(a=0;a<3;a++)if(!t||2!==a||void 0!==r.z)switch(0===a?(s=n,i=-1!=="ew".indexOf(e.axis[a])?"x":"y"):1===a?(s=o,i=-1!=="ns".indexOf(e.axis[a])?"y":"x"):(s=l,i="z"),e.axis[a]){case"e":case"w":case"n":case"s":h[i]=s;break;case"u":void 0!==r[i]&&(h.z=s);break;case"d":void 0!==r[i]&&(h.z=-s);break;default:return null}return h},Hh=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},Jh=function(e){zh(e.x),zh(e.y)};function zh(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function qh(e,t,r){var s;if(Array.isArray(r)&&(r=Hh(r)),Jh(r),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===Fl||e.datum.datum_type===Dl)&&"WGS84"!==t.datumCode||(t.datum.datum_type===Fl||t.datum.datum_type===Dl)&&"WGS84"!==e.datumCode}(e,t)&&(r=qh(e,s=new kh("WGS84"),r),e=s),"enu"!==e.axis&&(r=Vh(e,!1,r)),"longlat"===e.projName)r={x:r.x*zl,y:r.y*zl,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),!(r=e.inverse(r)))return;return e.from_greenwich&&(r.x+=e.from_greenwich),r=jh(e.datum,t.datum,r),t.from_greenwich&&(r={x:r.x-t.from_greenwich,y:r.y,z:r.z||0}),"longlat"===t.projName?r={x:r.x*ql,y:r.y*ql,z:r.z||0}:(r=t.forward(r),t.to_meter&&(r={x:r.x/t.to_meter,y:r.y/t.to_meter,z:r.z||0})),"enu"!==t.axis?Vh(t,!0,r):r}var Wh=kh("WGS84");function Yh(e,t,r){var s,i,a;return Array.isArray(r)?(s=qh(e,t,r)||{x:NaN,y:NaN},r.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof s.z?[s.x,s.y,s.z].concat(r.splice(3)):[s.x,s.y,r[2]].concat(r.splice(3)):[s.x,s.y].concat(r.splice(2)):[s.x,s.y]):(i=qh(e,t,r),2===(a=Object.keys(r)).length?i:(a.forEach(function(s){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===s||"y"===s||"z"===s)return}else if("x"===s||"y"===s)return;i[s]=r[s]}),i))}function Xh(e){return e instanceof kh?e:e.oProj?e.oProj:kh(e)}var Qh=function(e,t,r){e=Xh(e);var s,i=!1;return void 0===t?(t=e,e=Wh,i=!0):(void 0!==t.x||Array.isArray(t))&&(r=t,t=e,e=Wh,i=!0),t=Xh(t),r?Yh(e,t,r):(s={forward:function(r){return Yh(e,t,r)},inverse:function(r){return Yh(t,e,r)}},i&&(s.oProj=t),s)},Kh=6,Zh="AJSAJS",$h="AFAFAF",eu=65,tu=73,ru=79,su=86,iu=90,au={forward:nu,inverse:function(e){var t=uu(du(e.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:ou};function nu(e,t){return t=t||5,function(e,t){var r="00000"+e.easting,s="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(p=e.easting,m=e.northing,f=e.zoneNumber,y=cu(f),g=Math.floor(p/1e5),v=Math.floor(m/1e5)%20,i=g,a=v,n=y,o=n-1,l=Zh.charCodeAt(o),h=$h.charCodeAt(o),u=l+i-1,c=h+a,d=!1,u>iu&&(u=u-iu+eu-1,d=!0),(u===tu||ltu||(u>tu||lru||(u>ru||liu&&(u=u-iu+eu-1),c>su?(c=c-su+eu-1,d=!0):d=!1,(c===tu||htu||(c>tu||hru||(c>ru||hsu&&(c=c-su+eu-1),String.fromCharCode(u)+String.fromCharCode(c))+r.substr(r.length-5,t)+s.substr(s.length-5,t);var i,a,n,o,l,h,u,c,d;var p,m,f,y,g,v}(function(e){var t,r,s,i,a,n,o,l=e.lat,h=e.lon,u=6378137,c=lu(l),d=lu(h);o=Math.floor((h+180)/6)+1,180===h&&(o=60);l>=56&&l<64&&h>=3&&h<12&&(o=32);l>=72&&l<84&&(h>=0&&h<9?o=31:h>=9&&h<21?o=33:h>=21&&h<33?o=35:h>=33&&h<42&&(o=37));n=lu(6*(o-1)-180+3),.006739496752268451,t=u/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),r=Math.tan(c)*Math.tan(c),s=.006739496752268451*Math.cos(c)*Math.cos(c),i=Math.cos(c)*(d-n),a=u*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c));var p=.9996*t*(i+(1-r+s)*i*i*i/6+(5-18*r+r*r+72*s-.39089081163157013)*i*i*i*i*i/120)+5e5,m=.9996*(a+t*Math.tan(c)*(i*i/2+(5-r+9*s+4*s*s)*i*i*i*i/24+(61-58*r+r*r+600*s-2.2240339282485886)*i*i*i*i*i*i/720));l<0&&(m+=1e7);return{northing:Math.round(m),easting:Math.round(p),zoneNumber:o,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(l)}}({lat:e[1],lon:e[0]}),t)}function ou(e){var t=uu(du(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function lu(e){return e*(Math.PI/180)}function hu(e){return e/Math.PI*180}function uu(e){var t=e.northing,r=e.easting,s=e.zoneLetter,i=e.zoneNumber;if(i<0||i>60)return null;var a,n,o,l,h,u,c,d,p=6378137,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),f=r-5e5,y=t;s<"N"&&(y-=1e7),u=6*(i-1)-180+3,d=(c=y/.9996/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*c)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*c)+151*m*m*m/96*Math.sin(6*c),a=p/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),n=Math.tan(d)*Math.tan(d),o=.006739496752268451*Math.cos(d)*Math.cos(d),l=.99330562*p/Math.pow(1-.00669438*Math.sin(d)*Math.sin(d),1.5),h=f/(.9996*a);var g=d-a*Math.tan(d)/l*(h*h/2-(5+3*n+10*o-4*o*o-.06065547077041606)*h*h*h*h/24+(61+90*n+298*o+45*n*n-1.6983531815716497-3*o*o)*h*h*h*h*h*h/720);g=hu(g);var v,S=(h-(1+2*n+o)*h*h*h/6+(5-2*o+28*n-3*o*o+.05391597401814761+24*n*n)*h*h*h*h*h/120)/Math.cos(d);if(S=u+hu(S),e.accuracy){var b=uu({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});v={top:b.lat,right:b.lon,bottom:g,left:S}}else v={lat:g,lon:S};return v}function cu(e){var t=e%Kh;return 0===t&&(t=Kh),t}function du(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,r=e.length,s=null,i="",a=0;!/[A-Z]/.test(t=e.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+e;i+=t,a++}var n=parseInt(i,10);if(0===a||a+3>r)throw"MGRSPoint bad conversion from: "+e;var o=e.charAt(a++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+e;s=e.substring(a,a+=2);for(var l=cu(n),h=function(e,t){var r=Zh.charCodeAt(t-1),s=1e5,i=!1;for(;r!==e.charCodeAt(0);){if(++r===tu&&r++,r===ru&&r++,r>iu){if(i)throw"Bad character: "+e;r=eu,i=!0}s+=1e5}return s}(s.charAt(0),l),u=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var r=$h.charCodeAt(t-1),s=0,i=!1;for(;r!==e.charCodeAt(0);){if(++r===tu&&r++,r===ru&&r++,r>su){if(i)throw"Bad character: "+e;r=eu,i=!0}s+=1e5}return s}(s.charAt(1),l);u0&&(d=1e5/Math.pow(10,f),p=e.substring(a,a+f),y=parseFloat(p)*d,m=e.substring(a+f),g=parseFloat(m)*d),{easting:y+h,northing:g+u,zoneLetter:o,zoneNumber:n,accuracy:d}}function pu(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function mu(e,t,r){if(!(this instanceof mu))return new mu(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var s=e.split(",");this.x=parseFloat(s[0],10),this.y=parseFloat(s[1],10),this.z=parseFloat(s[2],10)||0}else this.x=e,this.y=t,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}mu.fromMGRS=function(e){return new mu(ou(e))},mu.prototype.toMGRS=function(e){return nu([this.x,this.y],e)};var fu=mu,yu=.01068115234375,gu=function(e){var t=[];t[0]=1-e*(.25+e*(.046875+e*(.01953125+e*yu))),t[1]=e*(.75-e*(.046875+e*(.01953125+e*yu)));var r=e*e;return t[2]=r*(.46875-e*(.013020833333333334+.007120768229166667*e)),r*=e,t[3]=r*(.3645833333333333-.005696614583333333*e),t[4]=r*e*.3076171875,t},vu=function(e,t,r,s){return r*=t,t*=t,s[0]*e-r*(s[1]+t*(s[2]+t*(s[3]+t*s[4])))},Su=function(e,t,r){for(var s=1/(1-t),i=e,a=20;a;--a){var n=Math.sin(i),o=1-t*n*n;if(i-=o=(vu(i,n,Math.cos(i),r)-e)*(o*Math.sqrt(o))*s,Math.abs(o)Jl?Math.tan(a):0,m=Math.pow(p,2),f=Math.pow(m,2);t=1-this.es*Math.pow(o,2),h/=Math.sqrt(t);var y=vu(a,o,l,this.en);r=this.a*(this.k0*h*(1+u/6*(1-m+c+u/20*(5-18*m+f+14*c-58*m*c+u/42*(61+179*f-f*m-479*m)))))+this.x0,s=this.a*(this.k0*(y-this.ml0+o*n*h/2*(1+u/12*(5-m+9*c+4*d+u/30*(61+f-58*m+270*c-330*m*c+u/56*(1385+543*f-f*m-3111*m))))))+this.y0}else{var g=l*Math.sin(n);if(Math.abs(Math.abs(g)-1)=1){if(g-1>Jl)return 93;s=0}else s=Math.acos(s);a<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return e.x=r,e.y=s,e},inverse:function(e){var t,r,s,i,a=(e.x-this.x0)*(1/this.a),n=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+n/this.k0,r=Su(t,this.es,this.en),Math.abs(r)Jl?Math.tan(r):0,u=this.ep2*Math.pow(l,2),c=Math.pow(u,2),d=Math.pow(h,2),p=Math.pow(d,2);t=1-this.es*Math.pow(o,2);var m=a*Math.sqrt(t)/this.k0,f=Math.pow(m,2);s=r-(t*=h)*f/(1-this.es)*.5*(1-f/12*(5+3*d-9*u*d+u-4*c-f/30*(61+90*d-252*u*d+45*p+46*u-f/56*(1385+3633*d+4095*p+1574*p*d)))),i=Th(this.long0+m*(1-f/6*(1+2*d+u-f/20*(5+28*d+24*p+8*u*d+6*u-f/42*(61+662*d+1320*p+720*p*d))))/l)}else s=Ul*Ch(n),i=0;else{var y=Math.exp(a/this.k0),g=.5*(y-1/y),v=this.lat0+n/this.k0,S=Math.cos(v);t=Math.sqrt((1-Math.pow(S,2))/(1+Math.pow(g,2))),s=Math.asin(t),n<0&&(s=-s),i=0===g&&0===S?0:Th(Math.atan2(g,S)+this.long0)}return e.x=i,e.y=s,e},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},xu=function(e){var t=Math.exp(e);return t=(t-1/t)/2},Cu=function(e,t){e=Math.abs(e),t=Math.abs(t);var r=Math.max(e,t),s=Math.min(e,t)/(r||1);return r*Math.sqrt(1+Math.pow(s,2))},Tu=function(e){var t=Math.abs(e);return t=function(e){var t=1+e,r=t-1;return 0===r?e:e*Math.log(t)/r}(t*(1+t/(Cu(1,t)+1))),e<0?-t:t},_u=function(e,t){for(var r,s=2*Math.cos(2*t),i=e.length-1,a=e[i],n=0;--i>=0;)r=s*a-n+e[i],n=a,a=r;return t+r*Math.sin(2*t)},wu=function(e,t){for(var r,s=2*Math.cos(t),i=e.length-1,a=e[i],n=0;--i>=0;)r=s*a-n+e[i],n=a,a=r;return Math.sin(t)*r},Mu=function(e,t,r){for(var s,i,a=Math.sin(t),n=Math.cos(t),o=xu(r),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(r),h=2*n*l,u=-2*a*o,c=e.length-1,d=e[c],p=0,m=0,f=0;--c>=0;)s=m,i=p,d=h*(m=d)-s-u*(p=f)+e[c],f=u*m-i+h*p;return[(h=a*l)*d-(u=n*o)*f,h*f+u*d]};var Eu={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),r=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),r*=t,this.cgb[1]=r*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),r*=t,this.cgb[2]=r*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=r*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),r*=t,this.cgb[3]=r*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=r*(1237/630+t*(t*(-24832/14175)-2.4)),r*=t,this.cgb[4]=r*(4174/315+t*(-144838/6237)),this.cbg[4]=r*(-734/315+t*(109598/31185)),r*=t,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+r*(.25+r*(1/64+r/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=r*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=r*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),r*=t,this.utg[2]=r*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=r*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),r*=t,this.utg[3]=r*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=r*(49561/161280+t*(-179/168+t*(6601661/7257600))),r*=t,this.utg[4]=r*(-4583/161280+t*(108847/3991680)),this.gtu[4]=r*(34729/80640+t*(-3418889/1995840)),r*=t,this.utg[5]=-.03233083094085698*r,this.gtu[5]=.6650675310896665*r;var s=_u(this.cbg,this.lat0);this.Zb=-this.Qn*(s+wu(this.gtu,2*s))},forward:function(e){var t=Th(e.x-this.long0),r=e.y;r=_u(this.cbg,r);var s=Math.sin(r),i=Math.cos(r),a=Math.sin(t),n=Math.cos(t);r=Math.atan2(s,n*i),t=Math.atan2(a*i,Cu(s,i*n)),t=Tu(Math.tan(t));var o,l,h=Mu(this.gtu,2*r,2*t);return r+=h[0],t+=h[1],Math.abs(t)<=2.623395162778?(o=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*r+this.Zb)+this.y0):(o=1/0,l=1/0),e.x=o,e.y=l,e},inverse:function(e){var t,r,s=(e.x-this.x0)*(1/this.a),i=(e.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,s/=this.Qn,Math.abs(s)<=2.623395162778){var a=Mu(this.utg,2*i,2*s);i+=a[0],s+=a[1],s=Math.atan(xu(s));var n=Math.sin(i),o=Math.cos(i),l=Math.sin(s),h=Math.cos(s);i=Math.atan2(n*h,Cu(l,h*o)),s=Math.atan2(l,h*o),t=Th(s+this.long0),r=_u(this.cgb,i)}else t=1/0,r=1/0;return e.x=t,e.y=r,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]},Au=function(e,t){if(void 0===e){if((e=Math.floor(30*(Th(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e};var Pu={init:function(){var e=Au(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*zl,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Eu.init.apply(this),this.forward=Eu.forward,this.inverse=Eu.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Ou=function(e,t){return Math.pow((1-e)/(1+e),t)},Lu=20;var Iu={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Wl)/(Math.pow(Math.tan(.5*this.lat0+Wl),this.C)*Ou(this.e*e,this.ratexp))},forward:function(e){var t=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+Wl),this.C)*Ou(this.e*Math.sin(r),this.ratexp))-Ul,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,r=e.y,s=Math.pow(Math.tan(.5*r+Wl)/this.K,1/this.C),i=Lu;i>0&&(r=2*Math.atan(s*Ou(this.e*Math.sin(e.y),-.5*this.e))-Ul,!(Math.abs(r-e.y)<1e-14));--i)e.y=r;return i?(e.x=t,e.y=r,e):null},names:["gauss"]};var Nu={init:function(){Iu.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,r,s,i;return e.x=Th(e.x-this.long0),Iu.forward.apply(this,[e]),t=Math.sin(e.y),r=Math.cos(e.y),s=Math.cos(e.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*r*s),e.x=i*r*Math.sin(e.x),e.y=i*(this.cosc0*t-this.sinc0*r*s),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,r,s,i,a;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,a=Math.sqrt(e.x*e.x+e.y*e.y)){var n=2*Math.atan2(a,this.R2);t=Math.sin(n),r=Math.cos(n),i=Math.asin(r*this.sinc0+e.y*t*this.cosc0/a),s=Math.atan2(e.x*t,a*this.cosc0*r-e.y*this.sinc0*t)}else i=this.phic0,s=0;return e.x=s,e.y=i,Iu.inverse.apply(this,[e]),e.x=Th(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var Ru={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Jl&&(this.k0=.5*(1+Ch(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Jl&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Jl&&(this.k0=.5*this.cons*xh(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/_h(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=xh(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Ul,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,r,s,i,a,n,o=e.x,l=e.y,h=Math.sin(l),u=Math.cos(l),c=Th(o-this.long0);return Math.abs(Math.abs(o-this.long0)-Math.PI)<=Jl&&Math.abs(l+this.lat0)<=Jl?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*h+this.coslat0*u*Math.cos(c)),e.x=this.a*t*u*Math.sin(c)+this.x0,e.y=this.a*t*(this.coslat0*h-this.sinlat0*u*Math.cos(c))+this.y0,e):(r=2*Math.atan(this.ssfn_(l,h,this.e))-Ul,i=Math.cos(r),s=Math.sin(r),Math.abs(this.coslat0)<=Jl?(a=_h(this.e,l*this.con,this.con*h),n=2*this.a*this.k0*a/this.cons,e.x=this.x0+n*Math.sin(o-this.long0),e.y=this.y0-this.con*n*Math.cos(o-this.long0),e):(Math.abs(this.sinlat0)0?Th(this.long0+Math.atan2(e.x,-1*e.y)):Th(this.long0+Math.atan2(e.x,e.y)):Th(this.long0+Math.atan2(e.x*Math.sin(o),n*this.coslat0*Math.cos(o)-e.y*this.sinlat0*Math.sin(o))),e.x=t,e.y=r,e)}if(Math.abs(this.coslat0)<=Jl){if(n<=Jl)return r=this.lat0,t=this.long0,e.x=t,e.y=r,e;e.x*=this.con,e.y*=this.con,s=n*this.cons/(2*this.a*this.k0),r=this.con*wh(this.e,s),t=this.con*Th(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else i=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,n<=Jl?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+e.y*Math.sin(i)*this.cosX0/n),t=Th(this.long0+Math.atan2(e.x*Math.sin(i),n*this.cosX0*Math.cos(i)-e.y*this.sinX0*Math.sin(i)))),r=-1*wh(this.e,Math.tan(.5*(Ul+a)));return e.x=t,e.y=r,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,r){return t*=r,Math.tan(.5*(Ul+e))*Math.pow((1-t)/(1+t),.5*r)}};var Fu={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),r=this.a,s=1/this.rf,i=2*s-Math.pow(s,2),a=this.e=Math.sqrt(i);this.R=this.k0*r*Math.sqrt(1-i)/(1-i*Math.pow(t,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+a*t)/(1-a*t));this.K=n-this.alpha*o+this.alpha*a/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),s=-this.alpha*(t+r)+this.K,i=2*(Math.atan(Math.exp(s))-Math.PI/4),a=this.alpha*(e.x-this.lambda0),n=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),o=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return e.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,e.x=this.R*n+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,r=e.y-this.y0,s=t/this.R,i=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(s)),n=Math.atan(Math.sin(s)/(Math.cos(this.b0)*Math.cos(s)-Math.sin(this.b0)*Math.tan(i))),o=this.lambda0+n/this.alpha,l=0,h=a,u=-1e3,c=0;Math.abs(h-u)>1e-7;){if(++c>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=o,e.y=h,e},names:["somerc"]};var Du={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),r=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-r*r);var s,i,a=_h(this.e,this.lat0,e),n=this.bl/t*Math.sqrt((1-this.es)/(1-r*r));if(n*n<1&&(n=1),isNaN(this.longc)){var o=_h(this.e,this.lat1,Math.sin(this.lat1)),l=_h(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(n+Math.sqrt(n*n-1))*Math.pow(a,this.bl):this.el=(n-Math.sqrt(n*n-1))*Math.pow(a,this.bl);var h=Math.pow(o,this.bl),u=Math.pow(l,this.bl);i=.5*((s=this.el/h)-1/s);var c=(this.el*this.el-u*h)/(this.el*this.el+u*h),d=(u-h)/(u+h),p=Th(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(c*Math.tan(.5*this.bl*p)/d)/this.bl,this.long0=Th(this.long0);var m=Th(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*m)/i),this.alpha=Math.asin(n*Math.sin(this.gamma0))}else s=this.lat0>=0?n+Math.sqrt(n*n-1):n-Math.sqrt(n*n-1),this.el=s*Math.pow(a,this.bl),i=.5*(s-1/s),this.gamma0=Math.asin(Math.sin(this.alpha)/n),this.long0=this.longc-Math.asin(i*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(n*n-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(n*n-1),Math.cos(this.alpha))},forward:function(e){var t,r,s,i=e.x,a=e.y,n=Th(i-this.long0);if(Math.abs(Math.abs(a)-Ul)<=Jl)s=a>0?-1:1,r=this.al/this.bl*Math.log(Math.tan(Wl+s*this.gamma0*.5)),t=-1*s*Ul*this.al/this.bl;else{var o=_h(this.e,a,Math.sin(a)),l=this.el/Math.pow(o,this.bl),h=.5*(l-1/l),u=.5*(l+1/l),c=Math.sin(this.bl*n),d=(h*Math.sin(this.gamma0)-c*Math.cos(this.gamma0))/u;r=Math.abs(Math.abs(d)-1)<=Jl?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*n))<=Jl?this.al*this.bl*n:this.al*Math.atan2(h*Math.cos(this.gamma0)+c*Math.sin(this.gamma0),Math.cos(this.bl*n))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+r):(t-=this.uc,e.x=this.x0+r*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-r*Math.sin(this.alpha)),e},inverse:function(e){var t,r;this.no_rot?(r=e.y-this.y0,t=e.x-this.x0):(r=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var s=Math.exp(-1*this.bl*r/this.al),i=.5*(s-1/s),a=.5*(s+1/s),n=Math.sin(this.bl*t/this.al),o=(n*Math.cos(this.gamma0)+i*Math.sin(this.gamma0))/a,l=Math.pow(this.el/Math.sqrt((1+o)/(1-o)),1/this.bl);return Math.abs(o-1)Jl?this.ns=Math.log(s/o)/Math.log(i/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=s/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=Jl&&(r=Ch(r)*(Ul-2*Jl));var s,i,a=Math.abs(Math.abs(r)-Ul);if(a>Jl)s=_h(this.e,r,Math.sin(r)),i=this.a*this.f0*Math.pow(s,this.ns);else{if((a=r*this.ns)<=0)return null;i=0}var n=this.ns*Th(t-this.long0);return e.x=this.k0*(i*Math.sin(n))+this.x0,e.y=this.k0*(this.rh-i*Math.cos(n))+this.y0,e},inverse:function(e){var t,r,s,i,a,n=(e.x-this.x0)/this.k0,o=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(n*n+o*o),r=1):(t=-Math.sqrt(n*n+o*o),r=-1);var l=0;if(0!==t&&(l=Math.atan2(r*n,r*o)),0!==t||this.ns>0){if(r=1/this.ns,s=Math.pow(t/(this.a*this.f0),r),-9999===(i=wh(this.e,s)))return null}else i=-Ul;return a=Th(l/this.ns+this.long0),e.x=a,e.y=i,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};var Gu={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,r,s,i,a,n,o,l=e.x,h=e.y,u=Th(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),s=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(s)),a=Math.asin(Math.cos(r)*Math.sin(s)/Math.cos(i)),n=this.n*a,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),e.y=o*Math.cos(n)/1,e.x=o*Math.sin(n)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,r,s,i,a,n,o,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),a=Math.sqrt(e.x*e.x+e.y*e.y),i=Math.atan2(e.y,e.x)/Math.sin(this.s0),s=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(s)-Math.sin(this.ad)*Math.cos(s)*Math.cos(i)),r=Math.asin(Math.cos(s)*Math.sin(i)/Math.cos(t)),e.x=this.long0-r/this.alfa,n=t,o=0;var h=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-e.y)<1e-10&&(o=1),n=e.y,h+=1}while(0===o&&h<15);return h>=15?null:e},names:["Krovak","krovak"]},Bu=function(e,t,r,s,i){return e*i-t*Math.sin(2*i)+r*Math.sin(4*i)-s*Math.sin(6*i)},Uu=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},ju=function(e){return.375*e*(1+.25*e*(1+.46875*e))},Vu=function(e){return.05859375*e*e*(1+.75*e)},Hu=function(e){return e*e*e*(35/3072)},Ju=function(e,t,r){var s=t*r;return e/Math.sqrt(1-s*s)},zu=function(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(r=e*t)*r)-.5/e*Math.log((1-r)/(1+r))):2*t};var Xu=.3333333333333333,Qu=.17222222222222222,Ku=.10257936507936508,Zu=.06388888888888888,$u=.0664021164021164,ec=.016415012942191543;var tc={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-Ul)0)switch(this.qp=Yu(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,r=[];return r[0]=e*Xu,t=e*e,r[0]+=t*Qu,r[1]=t*Zu,t*=e,r[0]+=t*Ku,r[1]+=t*$u,r[2]=t*ec,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Yu(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var t,r,s,i,a,n,o,l,h,u,c=e.x,d=e.y;if(c=Th(c-this.long0),this.sphere){if(a=Math.sin(d),u=Math.cos(d),s=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+u*s:1+this.sinph0*a+this.cosph0*u*s)<=Jl)return null;t=(r=Math.sqrt(2/r))*u*Math.sin(c),r*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*s}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(s=-s),Math.abs(d+this.lat0)=0?(t=(h=Math.sqrt(n))*i,r=s*(this.mode===this.S_POLE?h:-h)):t=r=0}}return e.x=this.a*t+this.x0,e.y=this.a*r+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,r,s,i,a,n,o,l,h,u,c=e.x/this.a,d=e.y/this.a;if(this.sphere){var p,m=0,f=0;if((r=.5*(p=Math.sqrt(c*c+d*d)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(f=Math.sin(r),m=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(p)<=Jl?0:Math.asin(d*f/p),c*=f,d=m*p;break;case this.OBLIQ:r=Math.abs(p)<=Jl?this.lat0:Math.asin(m*this.sinph0+d*f*this.cosph0/p),c*=f*this.cosph0,d=(m-Math.sin(r)*this.sinph0)*p;break;case this.N_POLE:d=-d,r=Ul-r;break;case this.S_POLE:r-=Ul}t=0!==d||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(c,d):0}else{if(o=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,d*=this.dd,(n=Math.sqrt(c*c+d*d))1&&(e=e>1?1:-1),Math.asin(e)};var sc={init:function(){Math.abs(this.lat1+this.lat2)Jl?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var s=Yu(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*s)/this.ns0,a=this.ns0*Th(t-this.long0),n=i*Math.sin(a)+this.x0,o=this.rh-i*Math.cos(a)+this.y0;return e.x=n,e.y=o,e},inverse:function(e){var t,r,s,i,a,n;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),s=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),s=-1),i=0,0!==t&&(i=Math.atan2(s*e.x,s*e.y)),s=t*this.ns0/this.a,this.sphere?n=Math.asin((this.c-s*s)/(2*this.ns0)):(r=(this.c-s*s)/this.ns0,n=this.phi1z(this.e3,r)),a=Th(i/this.ns0+this.long0),e.x=a,e.y=n,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var r,s,i,a,n,o=rc(.5*t);if(e0||Math.abs(a)<=Jl?(n=this.x0+1*this.a*r*Math.sin(s)/a,o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*i)/a):(n=this.x0+this.infinity_dist*r*Math.sin(s),o=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*r*i)),e.x=n,e.y=o,e},inverse:function(e){var t,r,s,i,a,n;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(i=Math.atan2(t,this.rc),r=Math.sin(i),s=Math.cos(i),n=rc(s*this.sin_p14+e.y*r*this.cos_p14/t),a=Math.atan2(e.x*r,t*this.cos_p14*s-e.y*this.sin_p14*r),a=Th(this.long0+a)):(n=this.phic0,a=0),e.x=a,e.y=n,e},names:["gnom"]},ac=function(e,t){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-r)<1e-6)return t<0?-1*Ul:Ul;for(var s,i,a,n,o=Math.asin(.5*t),l=0;l<30;l++)if(i=Math.sin(o),a=Math.cos(o),n=e*i,o+=s=Math.pow(1-n*n,2)/(2*a)*(t/(1-e*e)-i/(1-n*n)+.5/e*Math.log((1-n)/(1+n))),Math.abs(s)<=1e-10)return o;return NaN};var nc={init:function(){this.sphere||(this.k0=xh(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,r,s=e.x,i=e.y,a=Th(s-this.long0);if(this.sphere)t=this.x0+this.a*a*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var n=Yu(this.e,Math.sin(i));t=this.x0+this.a*this.k0*a,r=this.y0+this.a*n*.5/this.k0}return e.x=t,e.y=r,e},inverse:function(e){var t,r;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Th(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=ac(this.e,2*e.y*this.k0/this.a),t=Th(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e},names:["cea"]};var oc={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,r=e.y,s=Th(t-this.long0),i=zu(r-this.lat0);return e.x=this.x0+this.a*s*this.rc,e.y=this.y0+this.a*i,e},inverse:function(e){var t=e.x,r=e.y;return e.x=Th(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=zu(this.lat0+(r-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},lc=20;var hc={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Uu(this.es),this.e1=ju(this.es),this.e2=Vu(this.es),this.e3=Hu(this.es),this.ml0=this.a*Bu(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,r,s,i=e.x,a=e.y,n=Th(i-this.long0);if(s=n*Math.sin(a),this.sphere)Math.abs(a)<=Jl?(t=this.a*n,r=-1*this.a*this.lat0):(t=this.a*Math.sin(s)/Math.tan(a),r=this.a*(zu(a-this.lat0)+(1-Math.cos(s))/Math.tan(a)));else if(Math.abs(a)<=Jl)t=this.a*n,r=-1*this.ml0;else{var o=Ju(this.a,this.e,Math.sin(a))/Math.tan(a);t=o*Math.sin(s),r=this.a*Bu(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+o*(1-Math.cos(s))}return e.x=t+this.x0,e.y=r+this.y0,e},inverse:function(e){var t,r,s,i,a,n,o,l,h;if(s=e.x-this.x0,i=e.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=Jl)t=Th(s/this.a+this.long0),r=0;else{var u;for(n=this.lat0+i/this.a,o=s*s/this.a/this.a+n*n,l=n,a=lc;a;--a)if(l+=h=-1*(n*(l*(u=Math.tan(l))+1)-l-.5*(l*l+o)*u)/((l-n)/u-1),Math.abs(h)<=Jl){r=l;break}t=Th(this.long0+Math.asin(s*Math.tan(l)/this.a)/Math.sin(r))}else if(Math.abs(i+this.ml0)<=Jl)r=0,t=Th(this.long0+s/this.a);else{var c,d,p,m,f;for(n=(this.ml0+i)/this.a,o=s*s/this.a/this.a+n*n,l=n,a=lc;a;--a)if(f=this.e*Math.sin(l),c=Math.sqrt(1-f*f)*Math.tan(l),d=this.a*Bu(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=h=(n*(c*(m=d/this.a)+1)-m-.5*c*(m*m+o))/(this.es*Math.sin(2*l)*(m*m+o-2*n*m)/(4*c)+(n-m)*(c*p-2/Math.sin(2*l))-p),Math.abs(h)<=Jl){r=l;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=Th(this.long0+Math.asin(s*c/this.a)/Math.sin(r))}return e.x=t,e.y=r,e},names:["Polyconic","poly"]};var uc={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var t,r=e.x,s=e.y-this.lat0,i=r-this.long0,a=s/Bl*1e-5,n=i,o=1,l=0;for(t=1;t<=10;t++)o*=a,l+=this.A[t]*o;var h,u=l,c=n,d=1,p=0,m=0,f=0;for(t=1;t<=6;t++)h=p*u+d*c,d=d*u-p*c,p=h,m=m+this.B_re[t]*d-this.B_im[t]*p,f=f+this.B_im[t]*d+this.B_re[t]*p;return e.x=f*this.a+this.x0,e.y=m*this.a+this.y0,e},inverse:function(e){var t,r,s=e.x,i=e.y,a=s-this.x0,n=(i-this.y0)/this.a,o=a/this.a,l=1,h=0,u=0,c=0;for(t=1;t<=6;t++)r=h*n+l*o,l=l*n-h*o,h=r,u=u+this.C_re[t]*l-this.C_im[t]*h,c=c+this.C_im[t]*l+this.C_re[t]*h;for(var d=0;d.999999999999&&(r=.999999999999),t=Math.asin(r);var s=Th(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));s<-Math.PI&&(s=-Math.PI),s>Math.PI&&(s=Math.PI),r=(2*t+Math.sin(2*t))/Math.PI,Math.abs(r)>1&&(r=1);var i=Math.asin(r);return e.x=s,e.y=i,e},names:["Mollweide","moll"]};var fc={init:function(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var a=0;if(0!==r&&(a=Math.atan2(t*e.x,t*e.y)),this.sphere)return i=Th(this.long0+a/this.ns),s=zu(this.g-r/this.a),e.x=i,e.y=s,e;var n=this.g-r/this.a;return s=qu(n,this.e0,this.e1,this.e2,this.e3),i=Th(this.long0+a/this.ns),e.x=i,e.y=s,e},names:["Equidistant_Conic","eqdc"]};var yc={init:function(){this.R=this.a},forward:function(e){var t,r,s=e.x,i=e.y,a=Th(s-this.long0);Math.abs(i)<=Jl&&(t=this.x0+this.R*a,r=this.y0);var n=rc(2*Math.abs(i/Math.PI));(Math.abs(a)<=Jl||Math.abs(Math.abs(i)-Ul)<=Jl)&&(t=this.x0,r=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var o=.5*Math.abs(Math.PI/a-a/Math.PI),l=o*o,h=Math.sin(n),u=Math.cos(n),c=u/(h+u-1),d=c*c,p=c*(2/h-1),m=p*p,f=Math.PI*this.R*(o*(c-m)+Math.sqrt(l*(c-m)*(c-m)-(m+l)*(d-m)))/(m+l);a<0&&(f=-f),t=this.x0+f;var y=l+c;return f=Math.PI*this.R*(p*y-o*Math.sqrt((m+l)*(l+1)-y*y))/(m+l),r=i>=0?this.y0+f:this.y0-f,e.x=t,e.y=r,e},inverse:function(e){var t,r,s,i,a,n,o,l,h,u,c,d;return e.x-=this.x0,e.y-=this.y0,c=Math.PI*this.R,a=(s=e.x/c)*s+(i=e.y/c)*i,c=3*(i*i/(l=-2*(n=-Math.abs(i)*(1+a))+1+2*i*i+a*a)+(2*(o=n-2*i*i+s*s)*o*o/l/l/l-9*n*o/l/l)/27)/(h=(n-o*o/3/l)/l)/(u=2*Math.sqrt(-h/3)),Math.abs(c)>1&&(c=c>=0?1:-1),d=Math.acos(c)/3,r=e.y>=0?(-u*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI,t=Math.abs(s)2*Ul*this.a)return;return r=t/this.a,s=Math.sin(r),i=Math.cos(r),a=this.long0,Math.abs(t)<=Jl?n=this.lat0:(n=rc(i*this.sin_p12+e.y*s*this.cos_p12/t),o=Math.abs(this.lat0)-Ul,a=Math.abs(o)<=Jl?this.lat0>=0?Th(this.long0+Math.atan2(e.x,-e.y)):Th(this.long0-Math.atan2(-e.x,e.y)):Th(this.long0+Math.atan2(e.x*s,t*this.cos_p12*i-e.y*this.sin_p12*s))),e.x=a,e.y=n,e}return l=Uu(this.es),h=ju(this.es),u=Vu(this.es),c=Hu(this.es),Math.abs(this.sin_p12-1)<=Jl?(d=this.a*Bu(l,h,u,c,Ul),t=Math.sqrt(e.x*e.x+e.y*e.y),n=qu((d-t)/this.a,l,h,u,c),a=Th(this.long0+Math.atan2(e.x,-1*e.y)),e.x=a,e.y=n,e):Math.abs(this.sin_p12+1)<=Jl?(d=this.a*Bu(l,h,u,c,Ul),t=Math.sqrt(e.x*e.x+e.y*e.y),n=qu((t-d)/this.a,l,h,u,c),a=Th(this.long0+Math.atan2(e.x,e.y)),e.x=a,e.y=n,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),f=Math.atan2(e.x,e.y),p=Ju(this.a,this.e,this.sin_p12),y=Math.cos(f),v=-(g=this.e*this.cos_p12*y)*g/(1-this.es),S=3*this.es*(1-v)*this.sin_p12*this.cos_p12*y/(1-this.es),C=1-v*(x=(b=t/p)-v*(1+v)*Math.pow(b,3)/6-S*(1+3*v)*Math.pow(b,4)/24)*x/2-b*x*x*x/6,m=Math.asin(this.sin_p12*Math.cos(x)+this.cos_p12*Math.sin(x)*y),a=Th(this.long0+Math.asin(Math.sin(f)*Math.sin(x)/Math.cos(m))),T=Math.sin(m),n=Math.atan2((T-this.es*C*this.sin_p12)*Math.tan(m),T*(1-this.es)),e.x=a,e.y=n,e)},names:["Azimuthal_Equidistant","aeqd"]};var vc={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,r,s,i,a,n,o,l=e.x,h=e.y;return s=Th(l-this.long0),t=Math.sin(h),r=Math.cos(h),i=Math.cos(s),((a=this.sin_p14*t+this.cos_p14*r*i)>0||Math.abs(a)<=Jl)&&(n=1*this.a*r*Math.sin(s),o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*i)),e.x=n,e.y=o,e},inverse:function(e){var t,r,s,i,a,n,o;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),r=rc(t/this.a),s=Math.sin(r),i=Math.cos(r),n=this.long0,Math.abs(t)<=Jl?(o=this.lat0,e.x=n,e.y=o,e):(o=rc(i*this.sin_p14+e.y*s*this.cos_p14/t),a=Math.abs(this.lat0)-Ul,Math.abs(a)<=Jl?(n=this.lat0>=0?Th(this.long0+Math.atan2(e.x,-e.y)):Th(this.long0-Math.atan2(-e.x,e.y)),e.x=n,e.y=o,e):(n=Th(this.long0+Math.atan2(e.x*s,t*this.cos_p14*i-e.y*this.sin_p14*s)),e.x=n,e.y=o,e))},names:["ortho"]},Sc={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},bc={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function xc(e,t,r,s){var i;return eWl&&i<=Ul+Wl?(s.value=bc.AREA_1,i-=Ul):i>Ul+Wl||i<=-(Ul+Wl)?(s.value=bc.AREA_2,i=i>=0?i-Xl:i+Xl):(s.value=bc.AREA_3,i+=Ul)),i}function Cc(e,t){var r=e+t;return r<-Xl?r+=Yl:r>+Xl&&(r-=Yl),r}var Tc={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Ul-Wl/2?this.face=Sc.TOP:this.lat0<=-(Ul-Wl/2)?this.face=Sc.BOTTOM:Math.abs(this.long0)<=Wl?this.face=Sc.FRONT:Math.abs(this.long0)<=Ul+Wl?this.face=this.long0>0?Sc.RIGHT:Sc.LEFT:this.face=Sc.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var t,r,s,i,a,n,o={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,r=e.x,this.face===Sc.TOP)i=Ul-t,r>=Wl&&r<=Ul+Wl?(l.value=bc.AREA_0,s=r-Ul):r>Ul+Wl||r<=-(Ul+Wl)?(l.value=bc.AREA_1,s=r>0?r-Xl:r+Xl):r>-(Ul+Wl)&&r<=-Wl?(l.value=bc.AREA_2,s=r+Ul):(l.value=bc.AREA_3,s=r);else if(this.face===Sc.BOTTOM)i=Ul+t,r>=Wl&&r<=Ul+Wl?(l.value=bc.AREA_0,s=-r+Ul):r=-Wl?(l.value=bc.AREA_1,s=-r):r<-Wl&&r>=-(Ul+Wl)?(l.value=bc.AREA_2,s=-r-Ul):(l.value=bc.AREA_3,s=r>0?-r+Xl:-r-Xl);else{var h,u,c,d,p,m;this.face===Sc.RIGHT?r=Cc(r,+Ul):this.face===Sc.BACK?r=Cc(r,+Xl):this.face===Sc.LEFT&&(r=Cc(r,-Ul)),d=Math.sin(t),p=Math.cos(t),m=Math.sin(r),h=p*Math.cos(r),u=p*m,c=d,this.face===Sc.FRONT?s=xc(i=Math.acos(h),c,u,l):this.face===Sc.RIGHT?s=xc(i=Math.acos(u),c,-h,l):this.face===Sc.BACK?s=xc(i=Math.acos(-h),c,-u,l):this.face===Sc.LEFT?s=xc(i=Math.acos(-u),c,h,l):(i=s=0,l.value=bc.AREA_0)}return n=Math.atan(12/Xl*(s+Math.acos(Math.sin(s)*Math.cos(Wl))-Ul)),a=Math.sqrt((1-Math.cos(i))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(s))))),l.value===bc.AREA_1?n+=Ul:l.value===bc.AREA_2?n+=Xl:l.value===bc.AREA_3&&(n+=1.5*Xl),o.x=a*Math.cos(n),o.y=a*Math.sin(n),o.x=o.x*this.a+this.x0,o.y=o.y*this.a+this.y0,e.x=o.x,e.y=o.y,e},inverse:function(e){var t,r,s,i,a,n,o,l,h,u,c,d,p={lam:0,phi:0},m={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,r=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?m.value=bc.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(m.value=bc.AREA_1,t-=Ul):e.x<0&&-e.x>=Math.abs(e.y)?(m.value=bc.AREA_2,t=t<0?t+Xl:t-Xl):(m.value=bc.AREA_3,t+=Ul),h=Xl/12*Math.tan(t),a=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),n=Math.atan(a),(o=1-(s=Math.cos(t))*s*(i=Math.tan(r))*i*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?o=-1:o>1&&(o=1),this.face===Sc.TOP)l=Math.acos(o),p.phi=Ul-l,m.value===bc.AREA_0?p.lam=n+Ul:m.value===bc.AREA_1?p.lam=n<0?n+Xl:n-Xl:m.value===bc.AREA_2?p.lam=n-Ul:p.lam=n;else if(this.face===Sc.BOTTOM)l=Math.acos(o),p.phi=l-Ul,m.value===bc.AREA_0?p.lam=-n+Ul:m.value===bc.AREA_1?p.lam=-n:m.value===bc.AREA_2?p.lam=-n-Ul:p.lam=n<0?-n-Xl:-n+Xl;else{var f,y,g;h=(f=o)*f,y=(h+=(g=h>=1?0:Math.sqrt(1-h)*Math.sin(n))*g)>=1?0:Math.sqrt(1-h),m.value===bc.AREA_1?(h=y,y=-g,g=h):m.value===bc.AREA_2?(y=-y,g=-g):m.value===bc.AREA_3&&(h=y,y=g,g=-h),this.face===Sc.RIGHT?(h=f,f=-y,y=h):this.face===Sc.BACK?(f=-f,y=-y):this.face===Sc.LEFT&&(h=f,f=y,y=-h),p.phi=Math.acos(-g)-Ul,p.lam=Math.atan2(y,f),this.face===Sc.RIGHT?p.lam=Cc(p.lam,-Ul):this.face===Sc.BACK?p.lam=Cc(p.lam,-Xl):this.face===Sc.LEFT&&(p.lam=Cc(p.lam,+Ul))}return 0!==this.es&&(u=p.phi<0?1:0,c=Math.tan(p.phi),d=this.b/Math.sqrt(c*c+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),u&&(p.phi=-p.phi)),p.lam+=this.long0,e.x=p.lam,e.y=p.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},_c=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],wc=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Mc=.8487,Ec=1.3523,Ac=ql/5,Pc=1/Ac,Oc=18,Lc=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Ic=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};var Nc={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=Th(e.x-this.long0),r=Math.abs(e.y),s=Math.floor(r*Ac);s<0?s=0:s>=Oc&&(s=Oc-1),r=ql*(r-Pc*s);var i={x:Lc(_c[s],r)*t,y:Lc(wc[s],r)};return e.y<0&&(i.y=-i.y),i.x=i.x*this.a*Mc+this.x0,i.y=i.y*this.a*Ec+this.y0,i},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*Mc),y:Math.abs(e.y-this.y0)/(this.a*Ec)};if(t.y>=1)t.x/=_c[Oc][0],t.y=e.y<0?-Ul:Ul;else{var r=Math.floor(t.y*Oc);for(r<0?r=0:r>=Oc&&(r=Oc-1);;)if(wc[r][0]>t.y)--r;else{if(!(wc[r+1][0]<=t.y))break;++r}var s=wc[r],i=5*(t.y-s[0])/(wc[r+1][0]-s[0]);i=function(e,t,r,s){for(var i=t;s;--s){var a=e(i);if(i-=a,Math.abs(a)© SuperMap iServer with © SuperMap iClient",canvasFunction:s,logo:"4"===Wo.getOlVersion()?r.logo:null,projection:r.projection,ratio:r.ratio,resolutions:r.resolutions,state:r.state}),this.id=r.id?r.id:Se.createUniqueID("themeLayer_"),this.canvasFunctionInternal_=s,this.EVENT_TYPES=["loadstart","loadend","loadcancel","visibilitychanged","move","moveend","added","removed","tileloaded","beforefeaturesadded","featuresadded","featuresremoved"],this.features=[],this.TFEvents=r.TFEvents||[],this.map=r.map;var i=this.map.getSize();this.div=document.createElement("div"),this.map.getViewport().appendChild(this.div),this.div.style.width=i[0]+"px",this.div.style.height=i[1]+"px",this.setOpacity(r.opacity),this.levelRenderer=new Un,this.movingOffset=[0,0],this.renderer=this.levelRenderer.init(this.div),this.map.getViewport().removeChild(this.div),this.renderer.clear(),this.addTFEvents()}destroy(){this.EVENT_TYPES=null,this.isBaseLayer=null,this.TFEvents=null,this.destroyFeatures(),this.features=null,this.renderer&&this.renderer.dispose(),this.renderer=null,this.levelRenderer=null,this.movingOffset=null,this.currentMousePosition=null}destroyFeatures(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}setOpacity(e){if(e!==this.opacity){this.opacity=e;var t=this.div;Se.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.dispatchEvent({type:"changelayer",value:{layer:this,property:"opacity"}})}}addFeatures(e){}removeFeatures(e){if(e&&0!==e.length){if(e===this.features)return this.removeAllFeatures();Se.isArray(e)||(e=[e]);for(var t=[],r=e.length-1;r>=0;r--){var s=e[r],i=Se.indexOf(this.features,s);-1!==i?this.features.splice(i,1):t.push(s)}for(var a=[],n=0,o=this.features.length;n=r.left&&n.x<=r.right&&n.y>=r.top&&n.y<=r.bottom){s=!0;break}}return s}clearCache(){this.cache={},this.charts=[]}removeFeatures(e){this.clearCache(),super.removeFeatures(e)}removeAllFeatures(){this.clearCache(),super.removeAllFeatures()}redraw(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getView().calculateExtent()),!0)}clear(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}canvasFunctionInternal_(e,t,r,s,i){return Vc.prototype.canvasFunctionInternal_.apply(this,arguments)}}var Jc=r(50),zc=r.n(Jc); /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class qc extends zc.a{constructor(e){e.stroke?(e.stroke.color=e.stroke.getColor()||"#3388ff",e.stroke.width=e.stroke.getWidth()||1):e.stroke=new al.a({color:"#3388ff",width:1}),e.fill?e.fill.color=e.fill.getColor()||"#66ccff":e.fill=new sl.a({color:"#66ccff"}),super({angle:e.angle||60,stroke:e.stroke,fill:e.fill,radius:e.radius||10,rotation:e.rotation||0}),this.count_=e.count||3,this.strokeOpacity=e.strokeOpacity||1,this.fillOpacity=e.fillOpacity||1,this._canvas=this.getImage(),this._ctx=this._canvas.getContext("2d"),this._render()}_render(){var e=0,t=this.getAngle();if(this.spaceAngle=360/this.count_-this.getAngle(),!(this.spaceAngle<0)){this._ctx.translate(0,0),this._ctx.beginPath();for(var r=0;r!1,Kc=function(){let e=document.createElement("div"),t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"];for(let r=0;r-1&&(this._data=e),!this._renderLayer)return;this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();let t=this._getLayerState();t.data=this._data||[],this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)}drawGraphics(e){this._data=e||(this._data?this._data:[]),this._renderLayer||this._createInnerRender(),this._clearBuffer(),this._draw()}_initContainer(){this._canvas=this._createCanvas(this.width,this.height),this._layerContainer=this.container,this._wrapper=document.createElement("div"),this._wrapper.className="deck-wrapper",this._wrapper.style.position="absolute",this._wrapper.style.top="0",this._wrapper.style.left="0",this._wrapper.appendChild(this._canvas),this._layerContainer&&this._layerContainer.appendChild(this._wrapper)}_createCanvas(e,t){let r=document.createElement("canvas");return r.oncontextmenu=Qc,r.width=e,r.height=t,r.style.width=e+"px",r.style.height=t+"px",r}_createInnerRender(){let e=this,t=this._getLayerState(),{color:r,radius:s,opacity:i,highlightColor:a,radiusScale:n,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,outline:u}=t;s=this._pixelToMeter(s);let c={id:"scatter-plot",data:[],pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:r,opacity:i,radius:s,radiusScale:n,highlightColor:a,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,outline:u,getPosition(t){if(!t)return[0,0,0];let r=t.getGeometry(),s=r&&r.getCoordinates();return(s=e._project(s))&&[s[0],s[1],0]},getColor(t){let r=e._getLayerDefaultStyle(),s=t&&t.getStyle();return s&&s.getColor()||r.color},getRadius(t){let r=e._getLayerDefaultStyle(),s=t&&t.getStyle();return s&&s.getRadius()||r.radius},updateTriggers:{getColor:[r],getRadius:[s]}},d=this;this.onClick&&(c.onClick=function(){d._canvas.style.cursor="pointer",d.onClick.apply(d,arguments)}),this.onHover&&(c.onHover=function(){d._canvas.style.cursor="pointer",d.onHover.apply(d,arguments)}),e._renderLayer=new window.DeckGL.ScatterplotLayer(c)}_getLayerDefaultStyle(){let{color:e,opacity:t,radius:r,radiusScale:s,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:n,outline:o}=this._getLayerState();return{color:e,opacity:t,radius:r=this._pixelToMeter(r),radiusScale:s,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:n,outline:o}}_getLayerState(){let e=this.layer.getLayerState(),t=this.map.getView().getProjection().getCode(),r=go.transform([e.longitude,e.latitude],t,"EPSG:4326");return e.longitude=r[0],e.latitude=r[1],e.zoom=e.zoom-1,e}_draw(){this._refreshData();let e=this._getLayerState();e.data=this._data||[];let t={};for(let r in e)t[r]=e[r];this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._canvas,this.onBeforeRender&&(t.onBeforeRender=this.onBeforeRender.bind(this)),this.onAfterRender&&(t.onAfterRender=this.onAfterRender.bind(this)),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)}_refreshData(){let e=this._data||[],t=Wo.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(let e=0;e=0;t--){let o=n[t].getStyle();if(!o)return;if(o instanceof Wc)continue;let l=n[t].getGeometry().getCoordinates(),h=new Ko.a({image:o}).getImage(),u=!1;if(h instanceof qc&&1===h.getCount()){const e=180*h.getRotation()/Math.PI,t=Number.parseFloat(h.getAngle()),s=h.getRadius()*r;let a=null;if(t>355)a=new tl.a(l,s);else{const r=[];r.push(l);const i=t/8;for(let t=0;t<8;t++){const a=(e+t*i)/180*Math.PI;r.push([l[0]+s*Math.cos(a),l[1]-s*Math.sin(a)])}r.push(l),a=new sd.a([r])}a.intersectsCoordinate(this.map.getCoordinateFromPixel(i))&&(u=!0)}else{let t=[];t[0]=l[0]-h.getAnchor()[0]*r,t[2]=l[0]+h.getAnchor()[0]*r,t[1]=l[1]-h.getAnchor()[1]*r,t[3]=l[1]+h.getAnchor()[1]*r,td.containsCoordinate(t,e)&&(u=!0)}!0!==u||s&&s(n[t],a)}return};const t=this;e.onClick&&t.map.on("click",function(r){if(t.renderer instanceof Zc)return;const s=t.map.getFeaturesAtPixel(r.pixel)||[];for(let i=0;i-1){e.onClick(a,r),t.isHighLight&&t._highLight(a.getGeometry().getCoordinates(),new Ko.a({image:a.getStyle()}).getImage(),a,r.pixel);break}}})}setGraphics(e){this.graphics=this.graphics||[],this.graphics.length=0;let t=Wo.isArray(e)?[].concat(e):[e];this.graphics=[].concat(t),this.update()}addGraphics(e){this.graphics=this.graphics||[];let t=Wo.isArray(e)?[].concat(e):[e];this.graphics=this.graphics.concat(t),this.update()}getGraphicBy(e,t){let r=null;for(let s in this.graphics)if(this.graphics[s][e]===t){r=this.graphics[s];break}return r}getGraphicById(e){return this.getGraphicBy("id",e)}getGraphicsByAttribute(e,t){var r,s=[];for(let i in this.graphics)(r=this.graphics[i])&&r.attributes&&r.attributes[e]===t&&s.push(r);return s}removeGraphics(e=null){if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();Se.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--){let r=e[t],s=Se.indexOf(this.graphics,r);-1!==s&&this.graphics.splice(s,1)}this.update()}clear(){this.removeGraphics()}update(){this.renderer.update(this.graphics,this._getDefaultStyle())}_getDefaultStyle(){const e={};return this.color&&(e.fill=new sl.a({color:this.toRGBA(this.color)})),this.radius&&(e.radius=this.radius),this.outline&&(e.stroke=new sl.a({color:this.toRGBA(this.color),width:this.strokeWidth})),new tl.a(e)}toRGBA(e){return`rgba(${e[0]},${e[1]},${e[2]},${(e[3]||255)/255})`}setStyle(e){let t={color:this.color,radius:this.radius,opacity:this.opacity,highlightColor:this.highlightColor,radiusScale:this.radiusScale,radiusMinPixels:this.radiusMinPixels,radiusMaxPixels:this.radiusMaxPixels,strokeWidth:this.strokeWidth,outline:this.outline};Se.extend(this,Se.extend(t,e)),this.update()}getLayerState(){let e=this.map,t=e.getSize()[0],r=e.getSize()[1],s=e.getView(),i=s.getCenter(),a={longitude:i[0],latitude:i[1],zoom:s.getZoom(),maxZoom:s.getMaxZoom(),pitch:0,bearing:180*-s.getRotation()/Math.PI},n={};for(let e in a)n[e]=a[e];return n.width=t,n.height=r,n.color=this.color,n.radius=this.radius,n.opacity=this.opacity,n.highlightColor=this.highlightColor,n.radiusScale=this.radiusScale,n.radiusMinPixels=this.radiusMinPixels,n.radiusMaxPixels=this.radiusMaxPixels,n.strokeWidth=this.strokeWidth,n.outline=this.outline,n}_highLightClose(){this.selected=null,this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null),this.changed()}_highLight(e,t,r,s){if(r.getStyle()instanceof qc){this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null);var i=this.map.getPixelFromCoordinate([e[0],e[1]]);s=s||[0,0];var a=Math.atan2(s[1]-i[1],s[0]-i[0])/Math.PI*180;a=a>0?a:360+a;var n=(Math.ceil(a/(t.getAngle()+t.getSpaceAngle()))-1)*(t.getAngle()+t.getSpaceAngle()),o={stroke:new al.a({color:"#ff0000",width:1}),fill:new sl.a({color:"#0099ff"}),radius:t.getRadius(),angle:t.getAngle(),eAngle:n+t.getAngle(),sAngle:n,rotation:t.getRotation()};this.highLightStyle&&this.highLightStyle instanceof Wc&&(o.stroke=this.highLightStyle.getStroke(),o.fill=this.highLightStyle.getFill(),o.radius=this.highLightStyle.getRadius(),o.angle=this.highLightStyle.getAngle());var l=new ed(new Lo.a(e));l.setStyle(new Wc(o)),this.hitGraphicLayer=new ad.a({source:new ld({map:this.map,graphics:[l]})}),this.map.addLayer(this.hitGraphicLayer)}else this.selected=r,this.changed()}getGraphicsInExtent(e){var t=[];return e?(this.graphics.map(function(r){return td.containsExtent(e,r.getGeometry().getExtent())&&t.push(r),r}),t):(this.graphics.map(function(e){return t.push(e),e}),t)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class hd extends Vc{constructor(e,t){super(e,t),this.cache=t.cache||{},this.cacheFields=t.cacheFields||[],this.style=t.style||{},this.maxCacheCount=t.maxCacheCount||0,this.isCustomSetMaxCacheCount=void 0!==t.isCustomSetMaxCacheCount&&t.isCustomSetMaxCacheCount,this.nodesClipPixel=t.nodesClipPixel||2,this.isHoverAble=void 0!==t.isHoverAble&&t.isHoverAble,this.isMultiHover=void 0!==t.isMultiHover&&t.isMultiHover,this.isClickAble=void 0===t.isClickAble||t.isClickAble,this.highlightStyle=t.highlightStyle||null,this.isAllowFeatureStyle=void 0!==t.isAllowFeatureStyle&&t.isAllowFeatureStyle}destroy(){this.maxCacheCount=null,this.isCustomSetMaxCacheCount=null,this.nodesClipPixel=null,this.isHoverAble=null,this.isMultiHover=null,this.isClickAble=null,this.cache=null,this.cacheFields=null,this.style=null,this.highlightStyle=null,this.isAllowFeatureStyle=null}addFeatures(e){this.dispatchEvent({type:"beforefeaturesadded",value:{features:e}}),this.features=this.toiClientFeature(e),this.isCustomSetMaxCacheCount||(this.maxCacheCount=5*this.features.length),this.renderer&&this.changed()}removeFeatures(e){this.clearCache(),Vc.prototype.removeFeatures.apply(this,arguments)}removeAllFeatures(){this.clearCache(),Vc.prototype.removeAllFeatures.apply(this,arguments)}redrawThematicFeatures(e){var t=this.renderer.getHoverOne(),r=null;t&&t.refDataID&&(r=t.refDataID),this.renderer.clearAll();for(var s=this.features,i=this.cache,a=this.cacheFields,n=this.map.getView().getZoom(),o=this.maxCacheCount,l=0,h=s.length;lo){var m=a[0];a.splice(0,1),delete i[m]}}}}if(this.renderer.render(),r&&this.isHoverAble&&this.isMultiHover){var f=this.getShapesByFeatureID(r);this.renderer.updateHoverShapes(f)}}createThematicFeature(e){var t=Se.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=Se.copyAttributesWithClip(e.style));var r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=wn.transformStyle(this.highlightStyle);for(var s=new Pn(e,this,wn.transformStyle(t),r),i=0;i0&&0===this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),r=0,s=t.length;r=0&&p.x<=h.x&&p.y>=0&&p.y<=h.y){if(r.style.minZoomLevel>-1&&u<=r.style.minZoomLevel)continue;if(r.style.maxZoomLevel>-1&&u>r.style.maxZoomLevel)continue;var m=null;r.isStyleChange?(r.isStyleChange=null,m=this.calculateLabelBounds(r,p)):m=r.geometry.bsInfo.w&&r.geometry.bsInfo.h?this.calculateLabelBounds2(r,p):this.calculateLabelBounds(r,p);var f=new xe(0,h.y,h.x,0),y=m.length;if(this.isAvoid){var g=this.getAvoidInfo(f,m);if(g){if("left"===g.aspectW){r.style.labelXOffset+=g.offsetX;for(let e=0;e=i[l].start&&n=i[l].start&&no&&(o=r,l="top")}if(t.y>e.bottom){let r=Math.abs(t.y-e.bottom);r>o&&(o=r,l="bottom")}if(t.xn&&(n=r,h="left")}if(t.x>e.right){let r=Math.abs(t.x-e.right);r>n&&(n=r,h="right")}}}}isQuadrilateralOverLap(e,t){var r=e.length,s=t.length;if(5!==r||5!==s)return null;var i=!1;for(let s=0;se-s&&t.time© SuperMap iClient",canvasFunction:function(e,t,r,s,i){var a=s[0]/r,n=s[1]/r,o=this.map.getSize()[0],l=this.map.getSize()[1];this.layer||(this.layer=new yd(this.map,this.dataSet,this.mapvOptions,a,n,this));this.layer.pixelRatio=r,this.layer.offset=[(a-o)/2,(n-l)/2],this.rotate?this.rotate!==this.map.getView().getRotation()&&(this.layer.canvasLayer.resize(a,n),this.rotate=this.map.getView().getRotation()):this.rotate=this.map.getView().getRotation();var h=this.layer.canvasLayer.canvas;this.layer.isEnabledTime()||(this.layer.canvasLayer.resize(a,n),this.layer.canvasLayer.draw());this.context||(this.context=Wo.createCanvasContext2D(a,n));var u=this.context.canvas;this.context.clearRect(0,0,u.width,u.height),u.width=s[0],u.height=s[1],u.style.width=s[0]+"px",u.style.height=s[1]+"px",this.context.drawImage(h,0,0),(this.resolution!==t||JSON.stringify(this.extent)!==JSON.stringify(e))&&(this.resolution=t,this.extent=e);return this.context.canvas},logo:"4"===Wo.getOlVersion()?t.logo:null,projection:t.projection,ratio:t.ratio,resolutions:t.resolutions,state:t.state}),this.map=e.map,this.dataSet=e.dataSet,this.mapvOptions=e.mapvOptions}addData(e,t){this.layer.addData(e,t)}getData(){return this.layer&&(this.dataSet=this.layer.getData()),this.dataSet}removeData(e){this.layer&&this.layer.removeData(e)}clearData(){this.layer.clearData()}update(e){this.layer.update(e),this.changed()}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class vd extends hd{constructor(e,t){super(e,t),this.style=t.style,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle,this.themeField=t.themeField,this.styleGroups=t.styleGroups}destroy(){this.style=null,this.themeField=null,this.styleGroups=null,hd.prototype.destroy.apply(this,arguments)}createThematicFeature(e){var t=this.getStyleByData(e),r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=wn.transformStyle(this.highlightStyle);for(var s=new Pn(e,this,wn.transformStyle(t),r),i=0;i0&&r.attributes){var s=this.themeField,i=r.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(s===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h=a[h].start&&o© turfjs with © SuperMap iClient",features:t.features,format:t.format,extent:t.extent,logo:"4"===Wo.getOlVersion()?t.logo:null,projection:t.projection,wrapX:t.wrapX}),this.turfMap={"Measurement.along":["line","distance","units"],"Measurement.area":["geojson"],"Measurement.bbox":["geojson"],"Measurement.bboxPolygon":["bbox"],"Measurement.bearing":["start","end","final"],"Measurement.center":["geojson","properties"],"Measurement.centerOfMass":["geojson","properties"],"Measurement.centroid":["geojson","properties"],"Measurement.destination":["origin","distance","bearing","units"],"Measurement.distance":["from","to","units"],"Measurement.envelope":["geojson"],"Measurement.length":["geojson","units"],"Measurement.midpoint":["point1","point2"],"Measurement.pointOnFeature":["geojson"],"Measurement.polygonTangents":["point","polygon"],"Measurement.rhumbBearing":["start","end","final"],"Measurement.rhumbDestination":["origin","distance","bearing","units"],"Measurement.rhumbDistance":["from","to","units"],"Measurement.square":["bbox"],"Measurement.greatCircle":["start","end","properties","npoints","offset"],"CoordinateMutation.cleanCoords":["geojson","mutate"],"CoordinateMutation.flip":["geojson","mutate"],"CoordinateMutation.rewind":["geojson","reverse","mutate"],"CoordinateMutation.round":["num","precision"],"CoordinateMutation.truncate":["geojson","precision","coordinates","mutate"],"Transformation.bboxClip":["feature","bbox"],"Transformation.bezierSpline":["line","resolution","sharpness"],"Transformation.buffer":["geojson","radius","units","steps"],"Transformation.circle":["center","radius","steps","units","properties"],"Transformation.clone":["geojson"],"Transformation.concave":["points","maxEdge","units"],"Transformation.convex":["geojson","concavity"],"Transformation.difference":["polygon1","polygon2"],"Transformation.dissolve":["featureCollection","propertyName"],"Transformation.intersect":["poly1","poly2"],"Transformation.lineOffset":["geojson","distance","units"],"Transformation.simplify":["feature","tolerance","highQuality"],"Transformation.tesselate":["poly"],"Transformation.transformRotate":["geojson","angle","pivot","mutate"],"Transformation.transformTranslate":["geojson","distance","direction","units","zTranslation","mutate"],"Transformation.transformScale":["geojson","factor","origin","mutate"],"Transformation.union":["A"],"Transformation.voronoi":["points","bbox"],"featureConversion.combine":["fc"],"featureConversion.explode":["geojson"],"featureConversion.flatten":["geojson"],"featureConversion.lineStringToPolygon":["lines","properties","autoComplete","orderCoords"],"featureConversion.polygonize":["geojson"],"featureConversion.polygonToLineString":["polygon","properties"],"Misc.kinks":["featureIn"],"Misc.lineArc":["center","radius","bearing1","bearing2","steps","units"],"Misc.lineChunk":["geojson","segmentLength","units","reverse"],"Misc.lineIntersect":["line1","line2"],"Misc.lineOverlap":["line1","line2"],"Misc.lineSegment":["geojson"],"Misc.lineSlice":["startPt","stopPt","line"],"Misc.lineSliceAlong":["line","startDist","stopDist","units"],"Misc.lineSplit":["line","splitter"],"Misc.mask":["polygon","mask"],"Misc.pointOnLine":["lines","pt","units"],"Misc.sector":["center","radius","bearing1","bearing2","steps","units"],"Misc.shortestPath":["start","end","obstacles","units","resolution"],"Misc.unkinkPolygon":["geojson"],"Helper.featureCollection":["features","bbox","id"],"Helper.feature":["geometry","properties","bbox","id"],"Helper.geometryCollection":["geometries","properties","bbox","id"],"Helper.lineString":["coordinates","properties","bbox","id"],"Helper.multiLineString":["coordinates","properties","bbox","id"],"Helper.multiPoint":["coordinates","properties","bbox","id"],"Helper.multiPolygon":["coordinates","properties","bbox","id"],"Helper.point":["coordinates","properties","bbox","id"],"Helper.polygon":["coordinates","properties","bbox","id"],"Data.sample":["featurecollection","num"],"Interpolation.interpolate":["points","cellSize","gridType","property","units","weight"],"Interpolation.isobands":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.isolines":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.planepoint":["point","triangle"],"Interpolation.tin":["points","z"],"Joins.pointsWithinPolygon":["points","polygons"],"Joins.tag":["points","polygons","field","outField","mask","properties"],"Grids.hexGrid":["bbox","cellSide","units","triangles"],"Grids.pointGrid":["bbox","cellSide","units","mask","properties"],"Grids.squareGrid":["bbox","cellSide","units","mask","properties"],"Grids.triangleGrid":["bbox","cellSide","units","mask","properties"],"Classification.nearestPoint":["targetPoint","points"],"Aggregation.collect":["polygons","points","inProperty","outProperty"],"Aggregation.clustersDbscan":["points","maxDistance","units","minPoints","mutate"],"Aggregation.clustersKmeans":["points","numberOfClusters","mutate"],"Meta.coordAll":["geojson"],"Meta.coordEach":["geojson","callback","excludeWrapCoord"],"Meta.coordReduce":["geojson","callback","initialValue","excludeWrapCoord"],"Meta.featureEach":["geojson","callback"],"Meta.featureReduce":["geojson","callback","initialValue"],"Meta.flattenEach":["geojson","callback"],"Meta.flattenReduce":["geojson","callback","initialValue"],"Meta.getCoord":["coord"],"Meta.getCoords":["coords"],"Meta.getGeom":["geojson"],"Meta.getGeomType":["geojson","name"],"Meta.geomEach":["geojson","callback"],"Meta.geomReduce":["geojson","callback","initialValue"],"Meta.propEach":["geojson","callback"],"Meta.propReduce":["geojson","callback","initialValue"],"Meta.segmentEach":["geojson","callback"],"Meta.segmentReduce":["geojson","callback","initialValue"],"Meta.getCluster":["geojson","filter"],"Meta.clusterEach":["geojson","property","callback"],"Meta.clusterReduce":["geojson","property","callback","initialValue"],"Assertions.collectionOf":["featureCollection","type","name"],"Assertions.containsNumber":["coordinates"],"Assertions.geojsonType":["value","type","name"],"Assertions.featureOf":["feature","type","name"],"Booleans.booleanClockwise":["line"],"Booleans.booleanContains":["feature1","feature2"],"Booleans.booleanCrosses":["feature1","feature2"],"Booleans.booleanDisjoint":["feature1","feature2"],"Booleans.booleanEqual":["feature1","feature2"],"Booleans.booleanOverlap":["feature1","feature2"],"Booleans.booleanParallel":["feature1","feature2"],"Booleans.booleanPointInPolygon":["point","polygon","ignoreBoundary"],"Booleans.booleanPointOnLine":["point","linestring","ignoreEndVertices"],"UnitConversion.bearingToAngle":["bearing"],"UnitConversion.convertArea":["area","originalUnit","finalUnit"],"UnitConversion.convertLength":["length","originalUnit","finalUnit"],"UnitConversion.degreesToradians":["degrees"],"UnitConversion.lengthToRadians":["distance","units"],"UnitConversion.lengthToDegrees":["distance","units"],"UnitConversion.radiansToLength":["radians","units"],"UnitConversion.radiansToDegrees":["radians"],"UnitConversion.toMercator":["geojson","mutate"],"UnitConversion.toWgs84":["geojson","mutate"]},this.turfOptionMap={"Measurement.along":["line","distance",{units:""}],"Measurement.bboxPolygon":["bbox",{properties:"",id:""}],"Measurement.bearing":["start","end",{final:""}],"Measurement.center":["geojson",{properties:""}],"Measurement.destination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.distance":["from","to",{units:""}],"Measurement.length":["geojson",{units:""}],"Measurement.rhumbBearing":["start","end",{final:""}],"Measurement.rhumbDestination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.rhumbDistance":["from","to",{units:""}],"Measurement.greatCircle":["start","end",{properties:"",npoints:"",offset:""}],"CoordinateMutation.cleanCoords":["geojson",{mutate:""}],"CoordinateMutation.flip":["geojson",{mutate:""}],"CoordinateMutation.rewind":["geojson",{mutate:"",reverse:""}],"CoordinateMutation.truncate":["geojson",{precision:"",coordinates:"",mutate:""}],"Transformation.bezierSpline":["line",{resolution:"",sharpness:""}],"Transformation.buffer":["geojson","radius",{units:"",steps:""}],"Transformation.circle":["center","radius",{units:"",steps:"",properties:""}],"Transformation.concave":["points",{maxEdge:"",units:""}],"Transformation.convex":["geojson",{concavity:""}],"Transformation.dissolve":["featureCollection",{propertyName:""}],"Transformation.lineOffset":["geojson","distance",{units:""}],"Transformation.simplify":["geojson",{tolerance:"",highQuality:""}],"Transformation.transformRotate":["geojson","angle",{pivot:"",mutate:""}],"Transformation.transformTranslate":["geojson","distance","direction",{units:"",zTranslation:"",mutate:""}],"Transformation.transformScale":["geojson","factor",{origin:"",mutate:""}],"Transformation.voronoi":["points",{bbox:""}],"featureConversion.lineStringToPolygon":["lines",{properties:"",autoComplete:"",orderCoords:""}],"featureConversion.polygonToLineString":["polygon",{properties:""}],"Misc.lineArc":["center","radius","bearing1","bearing2",{steps:"",units:""}],"Misc.lineChunk":["geojson","segmentLength",{units:"",reverse:""}],"Misc.lineOverlap":["line1","line2",{tolerance:""}],"Misc.lineSliceAlong":["line","startDist","stopDist",{units:""}],"Misc.pointOnLine":["lines","pt",{units:""}],"Misc.sector":["center","radius","bearing1","bearing2",{units:"",steps:"",properties:""}],"Misc.shortestPath":["start","end",{obstacles:"",units:"",resolution:""}],"Helper.feature":["geometry","properties",{bbox:"",id:""}],"Helper.geometryCollection":["geometries","properties",{bbox:"",id:""}],"Helper.lineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiLineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPoint":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPolygon":["coordinates","properties",{bbox:"",id:""}],"Helper.point":["coordinates","properties",{bbox:"",id:""}],"Helper.polygon":["coordinates","properties",{bbox:"",id:""}],"Interpolation.interpolate":["points","cellSize",{gridType:"",property:"",units:"",weight:""}],"Interpolation.isobands":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Interpolation.isolines":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Grids.hexGrid":["bbox","cellSide",{units:"",triangles:"",properties:"",mask:""}],"Grids.pointGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.squareGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.triangleGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Aggregation.clustersDbscan":["points","maxDistance",{units:"",minPoints:"",mutate:""}],"Aggregation.clustersKmeans":["points",{numberOfClusters:"",mutate:""}],"Booleans.booleanPointInPolygon":["point","polygon",{ignoreBoundary:""}],"Booleans.booleanPointOnLine":["point","linestring",{ignoreEndVertices:""}],"UnitConversion.toMercator":["geojson",{mutate:""}],"UnitConversion.toWgs84":["geojson",{mutate:""}]}}process(e,t,r,s){var i;try{i=bd[e.split(".")[1]].apply(this,this.parse(e,t))}catch(r){i=bd[e.split(".")[1]].apply(this,this.parseOption(e,t))}var a=null;try{a=(new No.a).readFeatures(i)}catch(e){return void(r&&r(i))}(s=null==s||s)&&this.addFeatures(a),r&&r(i)}parse(e,t){if("Transformation.union"===e)return t.A;var r=[],s=this.turfMap[e];return s&&s.map(function(e){return r.push(t[e]),t[e]}),r}parseOption(e,t){var r=[];return this.turfOptionMap[e].map(function(e){if(e instanceof Object){var s=e;Object.keys(s).forEach(function(e){s[e]=t[e]}),r.push(s)}else r.push(t[e]);return t}),r}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Cd extends hd{constructor(e,t){super(e,t),this.themeField=t.themeField,this.style=t.style,this.styleGroups=t.styleGroups,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle}destroy(){this.style=null,this.themeField=null,this.styleGroups=null,hd.prototype.destroy.apply(this,arguments)}createThematicFeature(e){var t=this.getStyleByData(e),r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=wn.transformStyle(this.highlightStyle);for(var s=new Pn(e,this,wn.transformStyle(t),r),i=0;i0&&r.attributes){var s=this.themeField,i=r.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(s===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h© SuperMap iServer with © SuperMap iClient",["4","5"].indexOf(Wo.getOlVersion())<0&&(e.tileSize=e.format instanceof Ed.a&&e.style?512:256),super({attributions:e.attributions,cacheSize:e.cacheSize,format:e.format||new No.a,logo:"4"===Wo.getOlVersion()?e.logo:null,overlaps:e.overlaps,projection:e.projection,state:e.format instanceof Ed.a&&e.style&&"[object String]"==Object.prototype.toString.call(e.style)?"loading":e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.format instanceof Ed.a&&e.style?function(e){return e?a._tileUrl.replace(t,e[0].toString()).replace(r,e[1].toString()).replace(s,function(){var t=["4","5"].indexOf(Wo.getOlVersion())>-1?-e[2]-1:e[2];return t.toString()}).replace(i,function(){var t=e[0],r=a.tileGrid.getFullTileRange(t),s=r.getHeight()+e[2];return s.toString()}):void 0}:function(e,t,r){a.tileGrid||(a.tileGrid=a.getTileGridForProjection(r));var s=e[0],i=e[1],n=["4","5"].indexOf(Wo.getOlVersion())>-1?-e[2]-1:e[2],o=Tl.toSize(a.tileGrid.getTileSize(s,a.tmpSize)),l="";if("ZXY"===a.tileType)l="&width="+o[0]+"&height="+o[1]+"&x="+i+"&y="+n+"&z="+s;else if("ViewBounds"===a.tileType){var h=a.tileGrid.getTileCoordExtent(e);l="&width="+o[0]+"&height="+o[1]+"&viewBounds="+h[0]+","+h[1]+","+h[2]+","+h[3]}else{var u=a.tileGrid.getOrigin(s),c=a.tileGrid.getResolution(s),d=r.getUnits()||"degrees";"degrees"===d&&(d=f.DEGREE),"m"===d&&(d=f.METER);var p=Wo.resolutionToScale(c,96,d);l="&x="+i+"&y="+n+"&width="+o[0]+"&height="+o[1]+"&scale="+p+"&origin={'x':"+u[0]+",'y':"+u[1]+"}"}return a._tileUrl+encodeURI(l)},tileLoadFunction:e.format instanceof Ed.a?function(e,t){const r=e.getFormat(),s=e.onLoad.bind(e),i=e.onError.bind(e);e.setLoader(function(e,n,o){const l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(e,n,o):t,!0),"arraybuffer"==r.getType()&&(l.responseType="arraybuffer"),l.withCredentials=a.withCredentials,l.onload=function(){if(!l.status||l.status>=200&&l.status<300){const t=r.getType();let a=void 0;"json"===t||"text"===t?a=l.responseText:"xml"===t?(a=l.responseXML)||(a=(new DOMParser).parseFromString(l.responseText,"application/xml")):"arraybuffer"===t&&(a=l.response),a?["4","5"].indexOf(Wo.getOlVersion())>-1?s.call(this,r.readFeatures(a,{featureProjection:o}),r.readProjection(a),r.getLastExtent()):s.call(this,r.readFeatures(a,{extent:e,featureProjection:o}),r.readProjection(a)):i.call(this)}else i.call(this)}.bind(this),l.onerror=function(){i.call(this)}.bind(this),l.send()})}:function(e,t){var r=new RegExp("(^|\\?|&)width=([^&]*)(\\s|&|$)"),s=new RegExp("(^|\\?|&)height=([^&]*)(\\s|&|$)"),i=Number(t.match(r)[2]),a=Number(t.match(s)[2]);e.setLoader(function(r,s,n){tt.get(t).then(function(t){if(e.getFormat()instanceof No.a)return t.json()}).then(function(t){var s=[];if(e.getFormat()instanceof No.a){t.recordsets.map(function(e){return e.features.map(function(e){for(var t=[],r=0,s=0;s-1?(e.setExtent([0,0,i,a]),e.setProjection(o),s=e.getFormat().readFeatures(Wo.toGeoJSON(s))):s=e.getFormat().readFeatures(Wo.toGeoJSON(s),{extent:r,dataProjection:o,featureProjection:n}),e.setFeatures(s)}})})},wrapX:void 0!==e.wrapX&&e.wrapX,tileSize:e.tileSize||null,zDirection:["4","5"].indexOf(Wo.getOlVersion())>-1?null:0});var a=this;a.withCredentials=e.withCredentials,a._tileType=e.tileType||"ScaleXY",this.vectorTileStyles=new Td,e.format instanceof Ed.a&&e.style?"[object String]"==Object.prototype.toString.call(e.style)?tt.get(e.style,null,{withCredentials:e.withCredentials}).then(e=>e.json()).then(t=>{this._fillByStyleJSON(t,e.source),this.setState("ready")}):this._fillByStyleJSON(e.style,e.source):this._fillByRestMapOptions(e.url,e)}_fillByStyleJSON(e,t){if(t||(t=Object.keys(e.sources)[0]),e.sources&&e.sources[t]&&(this._tileUrl=e.sources[t].tiles[0]),e.metadata&&e.metadata.indexbounds){const t=e.metadata.indexbounds;var r=Math.max(t[2]-t[0],t[3]-t[1]);const s=[];for(let e=0;e<30;e++)s.push(r/512/Math.pow(2,e));this.tileGrid=new xl.a({extent:e.metadata.indexbounds,resolutions:s,tileSize:[512,512]})}}_fillByRestMapOptions(e,t){this._tileUrl=Se.urlPathAppend(t.url,"tileFeature.json"),t.format instanceof Ed.a&&(this._tileUrl=Se.urlPathAppend(t.url,"tileFeature.mvt")),t.serverType=t.serverType||l.ISERVER,this._tileUrl=function(e,t){var r,s,i=e;switch(t){case l.IPORTAL:s=rt.getToken(e),(r=s?new Re(s,"token"):null)||(s=rt.getKey(e),r=s?new Re(s,"key"):null);break;case l.ONLINE:s=rt.getKey(e),r=s?new Re(s,"key"):null;break;default:s=rt.getToken(e),r=s?new Re(s,"token"):null}r&&(i=Se.urlAppend(i,r.getUrlParameters()));return i}(this._tileUrl,t.serverType);var r=!0;void 0!==t.returnAttributes&&(r=t.returnAttributes);var s={};s.returnAttributes=r,void 0!==t._cache&&(s._cache=t._cache),void 0!==t.layersID&&(s.layersID=t.layersID),void 0!==t.layerNames&&(s.layerNames=t.layerNames),void 0!==t.expands&&(s.expands=t.expands),void 0!==t.compressTolerance&&(s.compressTolerance=t.compressTolerance),void 0!==t.coordinateType&&(s.coordinateType=t.coordinateType),void 0!==t.returnCutEdges&&(s.returnCutEdges=t.returnCutEdges),this._tileUrl=Se.urlAppend(this._tileUrl,Se.getParameterString(s))}static optionsFromMapJSON(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var s=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],i=function(){var e,r=s[2]-s[0],i=s[3]-s[1],a=r>=i?r:i;e=a===r?a/t.viewer.width:a/t.viewer.height;var n=[],o=f.METER;t.coordUnit===f.DEGREE&&(o=f.DEGREE);if(t.visibleScales.length>0){var l=function(e){var t=e.visibleScales;if(!t)return null;var r=e.viewBounds,s=e.coordUnit,i=e.viewer,a=e.scale,n=e.datumAxis;r=new xe(r.left,r.bottom,r.right,r.top),i=new ce(i.rightBottom.x,i.rightBottom.y),s=s.toLowerCase(),n=n||6378137;var o=s,l=Se.calculateDpi(r,i,a,o,n),h=function(e){if(null===e)return;var t,r;r=e.length,t=[r];for(var s=0;s© SuperMap iServer with © SuperMap iClient",canvasFunction:s,logo:"4"===Wo.getOlVersion()?r.logo:null,projection:r.projection,ratio:r.ratio,resolutions:r.resolutions,state:r.state}),this.canvasFunctionInternal_=s,this.features=[],this.name=e,!r.map)throw new Error("options.map is not found.");this.map=r.map,this.id=r.id?r.id:Se.createUniqueID("HeatMapSource_"),this.opacity=r.opacity?r.opacity:1,this.colors=r.colors?r.colors:["blue","cyan","lime","yellow","red"],this.useGeoUnit=!!r.useGeoUnit&&r.useGeoUnit,this.radius=r.radius?r.radius:50,this.featureWeight=r.featureWeight?r.featureWeight:null,this.maxWeight=null,this.minWeight=null,this.maxWidth=null,this.maxHeight=null,this.rootCanvas=document.createElement("canvas");var i=this.map.getSize();this.rootCanvas.width=this.maxWidth=parseInt(i[0]),this.rootCanvas.height=this.maxHeight=parseInt(i[1]),Se.modifyDOMElement(this.rootCanvas,null,null,null,null,null,null,this.opacity),this.canvasContext=this.rootCanvas.getContext("2d")}addFeatures(e){this.features=this.toiClientFeature(e),this.changed()}setOpacity(e){if(e!==this.opacity){this.opacity=e;var t=this.rootCanvas;Se.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.changed()}}updateHeatPoints(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}convertFastToPixelPoints(e){var t,r,s,i,a,n,o=[];this.useRadius=this.useGeoUnit?parseInt(this.radius/e):this.radius;for(var l=0;l0&&this.maxWidth>0))return!1;var r=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var s=0;s1?(h=d,c=new t.geom.MultiPolygon(null)):c=new t.geom.Polygon(null)}else c=u===t.geom.GeometryType.POINT?new t.geom.Point(null):u===t.geom.GeometryType.LINE_STRING?new t.geom.LineString(null):u===t.geom.GeometryType.POLYGON?new t.geom.Polygon(null):u===t.geom.GeometryType.MULTI_POINT?new t.geom.MultiPoint(null):u===t.geom.GeometryType.MULTI_LINE_STRING?new t.geom.MultiLineString(null):null;if(c){c.setFlatCoordinates(t.geom.GeometryLayout.XY,l,h),i=new this.featureClass_,this.geometryName_&&i.setGeometryName(this.geometryName_);var v=t.format.Feature.transformWithOptions(c,!1,this.adaptOptions(s));i.setGeometry(v),i.setId(n),i.setProperties(o)}}return i},t.geom.flat.textpath.lineString=function(e,r,s,i,a,n,o,l){for(var h=[],u=Math.atan2(e[s-i+1]-e[r+1],e[s-i]-e[r]),c=u<-.785||u>2.356,d=u<-.785&&u>-2.356||u>.785&&u<2.356,p=a.length,m=e[r],f=e[r+1],y=e[r+=i],g=e[r+1],v=0,S=Math.sqrt(Math.pow(y-m,2)+Math.pow(g-f,2));r=19968&&L<=40907,N=n(E=c?O+E:E+O)-A;for(A+=N;r1?G:G<0||G>1?k:k1?G:G<0||G>1?k:k0?-Math.PI:Math.PI),I&&d&&(H+=H>0?-Math.PI/2:Math.PI/2),void 0!==C){var J=H-C;if(J+=J>Math.PI?-2*Math.PI:J<-Math.PI?2*Math.PI:0,I===T?Math.abs(J)>l:Math.abs(J)>l+Math.PI/2)return null}C!=H||d?(A=N,b=[B,U,N/2,H,E=O],c?h.unshift(b):h.push(b),C=H,T=I):(c&&(b[0]=B,b[1]=U,b[2]=N/2),b[4]=E),w=j,M=V,o+=N}return h},t.layer.VectorTile.prototype.setFastRender=function(e){return this.fastRender=e},t.renderer.canvas.VectorTileLayer.prototype.postCompose=function(e,r,s){var i,a,n=this.getLayer(),o=n.getDeclutter()?{}:null,l=n.getSource(),h=n.getRenderMode(),u=t.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS[h],c=r.pixelRatio,d=r.viewState.rotation,p=r.size;d&&(i=Math.round(c*p[0]/2),a=Math.round(c*p[1]/2),t.render.canvas.rotateAtOffset(e,-d,i,a)),o&&this.declutterTree_.clear();for(var m=this.renderedTiles,f=l.getTileGridForProjection(r.viewState.projection),y=[],g=[],v=m.length-1;v>=0;--v){var S=m[v];if(S.getState()!=t.TileState.ABORT)for(var b=S.tileCoord,x=f.getTileCoordExtent(b)[0]-f.getTileCoordExtent(S.wrappedTileCoord)[0],C=void 0,T=0,_=S.tileKeys.length;T<_;++T){var w=S.getTile(S.tileKeys[T]);if(w.getState()!=t.TileState.ERROR){var M=w.getReplayGroup(n,b.toString());if(h==t.layer.VectorTileRenderType.VECTOR||M&&M.hasReplays(u)){C||(C=this.getTransform(r,x));var E=w.tileCoord[0],A=M.getClipCoords(C);e.save(),e.globalAlpha=s.opacity;for(var P=0,O=y.length;P{Dd()(this.selectedObjects,t=>e.id===t.id&&e.sourceLayer===t.sourceLayer)})}clearSelectedObjects(){this.selectedObjects=[]}updateStyles(e){"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]);const t={};e.forEach(e=>{t[e.id]=e});let r=0;for(const s in this._mbStyle.layers){const i=this._mbStyle.layers[s];if(r>=e.length)break;if(!t[i.id])continue;const a=JSON.parse(JSON.stringify(t[i.id]));a.paint&&(a.paint=Object.assign({},i.paint,a.paint)),a.layout&&(a.layout=Object.assign({},i.layout,a.layout)),Object.assign(i,a),r++}this._createStyleFunction()}setStyle(e){this.layersBySourceLayer={},this._loadStyle(e)}_loadStyle(e){"[object Object]"==Object.prototype.toString.call(e)?(this._mbStyle=e,this._resolve()):tt.get(e,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(e=>{this._mbStyle=e,this._resolve()})}_resolve(){if(this.source||(this.source=Object.keys(this._mbStyle.sources)[0]),this._mbStyle.sprite){const e=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"";this._mbStyle.sprite=this._mbStyle.sprite.replace("@2x","");const t=this._toSpriteUrl(this._mbStyle.sprite,this.path,e+".json");tt.get(t,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(t=>{this._spriteData=t,this._spriteImageUrl=this._toSpriteUrl(this._mbStyle.sprite,this.path,e+".png"),this._spriteImage=null;const r=new Image;r.crossOrigin=this.withCredentials?"use-credentials":"anonymous",r.onload=(()=>{this._spriteImage=r,this._initStyleFunction()}),r.onerror=(()=>{this._spriteImage=null,this._initStyleFunction()}),r.src=this._spriteImageUrl})}else this._initStyleFunction()}_initStyleFunction(){if(!this.resolutions&&this._mbStyle.metadata&&this._mbStyle.metadata.indexbounds){const t=this._mbStyle.metadata.indexbounds;var e=Math.max(t[2]-t[0],t[3]-t[1]);const r=[];for(let t=0;t<30;t++)r.push(e/512/Math.pow(2,t));this.resolutions=r}this._createStyleFunction(),this.dispatchEvent("styleloaded")}_createStyleFunction(){this.map&&window.olms.applyBackground(this.map,this._mbStyle),this.featureStyleFuntion=this._getStyleFunction()}_getStyleFunction(){return this.fun=window.olms.stylefunction({setStyle:function(){},set:function(){},changed:function(){}},this._mbStyle,this.source,this.resolutions,this._spriteData,"",this._spriteImage),(e,t)=>{const r=this.fun(e,t);if(this.selectedObjects.length>0&&this.selectedObjects.find(t=>t.id===e.getId()&&t.sourceLayer===e.get("layer"))){const s=r&&r[0]?r[0].getZIndex():99999;let i=this.selectedStyle(e,t);Array.isArray(i)||(i=[i]);for(let t=0;t2?s[2]:""):e+r}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Gd extends a{constructor(e,t){super(e,t)}code(e,t){var r=this;new Tt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).code(Se.urlPathAppend(r.url,"geocoding"),e)}decode(e,t){var r=this;new Tt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).decode(Se.urlPathAppend(r.url,"geodecoding"),e)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Bd extends a{constructor(e,t){super(e,t)}queryChart(e,t,r){var s=this,i=s._processParams(e),a=s._processFormat(r);new Zt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:a}).processAsync(i)}getChartFeatureInfo(e){var t=this,r=Se.urlPathAppend(t.url,"chartFeatureInfoSpecs");new Yt(r,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}_processParams(e){if(!e)return{};e.returnContent=null==e.returnContent||e.returnContent,e.filter&&(e.chartQueryFilterParameters=Wo.isArray(e.filter)?e.filter:[e.filter]),e.bounds&&(e.bounds=new xe(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3]))}_processFormat(e){return e||o.GEOJSON}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Ud extends a{constructor(e,t){super(e,t)}getFields(e,t){var r=this;new fs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},datasource:e.datasource,dataset:e.dataset}).processAsync()}getFieldStatisticsInfo(e,t){var r=this,s=e.fieldName,i=e.statisticMode;i&&!Wo.isArray(i)&&(i=[i]),r.currentStatisticResult={fieldName:s},r._statisticsCallback=t,i.forEach(t=>{r.currentStatisticResult[t]=null,r._fieldStatisticRequest(e.datasource,e.dataset,s,t)})}_fieldStatisticRequest(e,t,r,s){var i=this;new Rr(i.url,{eventListeners:{scope:i,processCompleted:i._processCompleted,processFailed:i._statisticsCallback},crossOrigin:i.options.crossOrigin,headers:i.options.headers,datasource:e,dataset:t,field:r,statisticMode:s}).processAsync()}_processCompleted(e){var t=this,r=!0,s=e.result;for(var i in this.currentStatisticResult&&null==t.currentStatisticResult[s.mode]&&(this.currentStatisticResult[s.mode]=s.result),t.currentStatisticResult)if(null==t.currentStatisticResult[i]){r=!1;break}r&&t._statisticsCallback({result:t.currentStatisticResult})}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class jd extends a{constructor(e,t){super(e,t)}getGridCellInfos(e,t){if(!e)return null;var r=this;new gs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}}class Vd extends a{constructor(e,t){super(e,t),this.headers=!0,this.crossOrigin=!0,this.withCredentials=!0,this.proxy=!0}getTools(e){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:e,processFailed:e}}).getTools()}getTool(e,t){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getTool(e)}execute(e,t,r,s){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).execute(e,t,r)}submitJob(e,t,r,s){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).submitJob(e,t,r)}waitForJobCompletion(e,t,r,s){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).waitForJobCompletion(e,t,r)}getJobInfo(e,t,r){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).getJobInfo(e,t)}cancelJob(e,t,r){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).cancelJob(e,t)}getJobs(e,t){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getJobs(e)}getResults(e,t,r,s){new es(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).getResults(e,t,r)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Hd extends a{constructor(e,t){super(e,t)}getLayersInfo(e){var t=this;new Xs(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{processCompleted:e,processFailed:e}}).processAsync()}setLayerInfo(e,t){if(e){var r=this,s=e.resourceID,i=e.tempLayerName,a=e.layerInfo;if(s&&i){var n=Se.urlPathAppend(r.url,"tempLayersSet/"+s+"/"+i);new Ii(n,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(a)}}}setLayersInfo(e,t){if(e){var r=this,s=e.resourceID,i=!!e.isTempLayers&&e.isTempLayers,a=e.layersInfo;if((!i||s)&&a)new Ri(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},resourceID:s,isTempLayers:i}).processAsync(a)}}setLayerStatus(e,t){if(e){var r=this;new Di(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(e)}}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Jd extends a{constructor(e,t){super(e,t)}measureDistance(e,t){this.measure(e,"DISTANCE",t)}measureArea(e,t){this.measure(e,"AREA",t)}measure(e,t,r){var s=this;new pi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,measureMode:t,eventListeners:{scope:s,processCompleted:r,processFailed:r}}).processAsync(s._processParam(e))}_processParam(e){return e&&e.geometry&&(e.geometry=Wo.toSuperMapGeometry(JSON.parse((new No.a).writeGeometry(e.geometry)))),e}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class zd extends a{constructor(e,t){super(e,t)}sinksFacilityAnalyst(e,t){var r=this;new br(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}sourcesFacilityAnalyst(e,t){var r=this;new Cr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}traceUpFacilityAnalyst(e,t){var r=this;new Ar(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}traceDownFacilityAnalyst(e,t){var r=this;new Mr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}upstreamFacilityAnalyst(e,t){var r=this;new Or(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class qd extends a{constructor(e,t){super(e,t)}burstPipelineAnalyst(e,t){var r=this;new Wt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}computeWeightMatrix(e,t){var r=this;new ir(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(r._processParams(e))}findClosestFacilities(e,t,r){var s=this;new Dr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}streamFacilityAnalyst(e,t,r){var s=this;new _r(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findLocation(e,t,r){var s=this;new Gr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findPath(e,t,r){var s=this;new Vr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findTSPPaths(e,t,r){var s=this;new qr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findMTSPPaths(e,t,r){var s=this;new Ur(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}findServiceAreas(e,t,r){var s=this;new Jr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}updateEdgeWeight(e,t){var r=this;new fa(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var r=this;new ga(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};if(e.centers&&Wo.isArray(e.centers)&&e.centers.map(function(t,r){return e.centers[r]=t instanceof Lo.a?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.centers[r]}),e.nodes&&Wo.isArray(e.nodes)&&e.nodes.map(function(t,r){return e.nodes[r]=t instanceof Lo.a?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.nodes[r]}),e.event&&e.event instanceof Lo.a&&(e.event={x:e.event.getCoordinates()[0],y:e.event.getCoordinates()[1]}),e.facilities&&Wo.isArray(e.facilities)&&e.facilities.map(function(t,r){return e.facilities[r]=t instanceof Lo.a?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.facilities[r]}),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Wo.isArray(t)?t.map(function(t,r){return e.parameter.barrierPoints[r]=t instanceof Lo.a?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.parameter.barrierPoints[r]}):e.parameter.barrierPoints=[t instanceof Lo.a?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t]}return e}_processFormat(e){return e||o.GEOJSON}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Wd extends a{constructor(e,t){super(e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}}getKernelDensityJobs(e,t){var r=this,s=r._processFormat(t);new si(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getKernelDensityJobs()}getKernelDensityJob(e,t,r){var s=this,i=s._processFormat(r);new si(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getKernelDensityJob(e)}addKernelDensityJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new si(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.kernelDensityJobs[e.id]=e.state}},format:n}).addKernelDensityJob(a,r)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var r=this,s=r._processFormat(t);new Ji(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,r){var s=this,i=s._processFormat(r);new Ji(s.url,{proxy:s.options.proxy,crossOrigin:s.options.crossOrigin,headers:s.options.headers,withCredentials:s.options.withCredentials,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Ji(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryMeshJobs[e.id]=e.state}},format:n}).addSummaryMeshJob(a,r)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var r=this,s=r._processFormat(t);new Gi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getQueryJobs()}getQueryJob(e,t,r){var s=this,i=s._processFormat(r);new Gi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getQueryJob(e)}addQueryJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Gi(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.queryJobs[e.id]=e.state}},format:n}).addQueryJob(a,r)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var r=this,s=r._processFormat(t);new qi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,r){var s=this,i=s._processFormat(r);new qi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new qi(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryRegionJobs[e.id]=e.state}},format:n}).addSummaryRegionJob(a,r)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var r=this,s=r._processFormat(t);new Sa(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getVectorClipJobs()}getVectorClipJob(e,t,r){var s=this,i=s._processFormat(r);new Sa(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getVectorClipJob(e)}addVectorClipJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Sa(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.vectorClipJobs[e.id]=e.state}},format:n}).addVectorClipJob(a,r)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var r=this,s=r._processFormat(t);new yi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,r){var s=this,i=s._processFormat(r);new yi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new yi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.overlayGeoJobs[e.id]=e.state}},format:n}).addOverlayGeoJob(a,r)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var r=this,s=r._processFormat(t);new Jt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getBuffersJobs()}getBuffersJob(e,t,r){var s=this,i=s._processFormat(r);new Jt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getBuffersJob(e)}addBuffersJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Jt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.buffersJobs[e.id]=e.state}},format:n}).addBuffersJob(a,r)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var r=this,s=r._processFormat(t);new la(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,r){var s=this,i=s._processFormat(r);new la(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new la(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.topologyValidatorJobs[e.id]=e.state}},format:n}).addTopologyValidatorJob(a,r)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var r=this,s=r._processFormat(t);new Vi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:e,processFailed:e},format:s}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,r){var s=this,i=s._processFormat(r);new Vi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:i}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,r,s){var i=this,a=i._processParams(e),n=i._processFormat(s);new Vi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryAttributesJobs[e.id]=e.state}},format:n}).addSummaryAttributesJob(a,r)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||o.GEOJSON}_processParams(e){return e?(e.bounds&&(e.bounds=Wo.toSuperMapBounds(e.bounds)),e.query&&(e.query=Wo.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=Wo.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=Wo.toProcessingParam(e.geometryClip)),e):{}}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Yd extends a{constructor(e,t){super(e,t)}getAreaSolarRadiationResult(e,t,r){var s=this;new At(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}bufferAnalysis(e,t,r){var s=this;new Bt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}densityAnalysis(e,t,r){var s=this;new fr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}generateSpatialData(e,t,r){var s=this;new Yr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}geoRelationAnalysis(e,t,r){var s=this;new rs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}interpolationAnalysis(e,t,r){var s=this;new ti(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}mathExpressionAnalysis(e,t,r){var s=this;new ci(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}overlayAnalysis(e,t,r){var s=this;new mi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}routeCalculateMeasure(e,t,r){var s=this;new Ei(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}routeLocate(e,t,r){var s=this;new Pi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}surfaceAnalysis(e,t,r){var s=this;new Yi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}terrainCurvatureCalculate(e,t,r){var s=this;new Qi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(e)}thiessenAnalysis(e,t,r){var s=this;new ia(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}).processAsync(s._processParams(e))}geometrybatchAnalysis(e,t,r){for(var s=this,i=new aa(s.url,{serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(r)}),a=[],n=0;n{r&&("MIGRATION"!==t?("DATAFLOW_POINT_TRACK"!==t&&"DATAFLOW_HEAT"!==t||(i&&e.removeLayer(i),a&&a.unSubscribe()),s&&e.removeLayer(s),e.removeLayer(r)):r.remove())}),this.layers=[]}_clear(){this.scales=[],this.resolutionArray=[],this.resolutions={},this.layerAdded=0,this._removeBaseLayer(),this._removeLayers()}refresh(){this._clear(),this.createWebmap()}createMap(e){let t,r,s;e&&(s=e.interactions,t=e.overlays,r=e.controls),this.map=new pl.a({interactions:s,overlays:t,controls:r,target:this.target}),e&&this.registerMapEvent({mapClickCallback:e.mapClickCallback})}registerMapEvent(e){this.map.on("click",function(t){e.mapClickCallback&&e.mapClickCallback(t)})}createWebmap(e){let t;if(e)t=e;else{let e=this.server.split("");"/"!==e[e.length-1]&&(this.server+="/"),t=this.server+"web/maps/"+this.mapId+"/map";let r="getUrlResource.json?url=";if(this.excludePortalProxyUrl&&this.server.indexOf(r)>-1){let e=this.server.split(r);e.length>1&&(t=e[0]+r+this.server+"web/maps/"+this.mapId+"/map.json")}}this.getMapInfo(t)}getMapInfo(e){let t=this,r=e;-1===e.indexOf(".json")&&(r=`${e}.json`),tt.get(t.getRequestUrl(r),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t.getMapInfoSuccess(e)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)})}async getMapInfoSuccess(e){let t=this;if(!1===e.succeed)return void(t.errorCallback&&t.errorCallback(e.error,"getMapFaild",t.map));let r=await t.handleCRS(e.projection,e.baseLayer.url);if(t.mapParams={title:e.title,description:e.description},"BrowseMap"===r.action)t.createSpecLayer(e);else{if("OpenMap"!==r.action)return void(t.errorCallback&&t.errorCallback({type:"Not support CS",errorMsg:`Not support CS: ${e.projection}`},"getMapFaild",t.map));t.baseProjection=r.newCrs||e.projection,t.webMapVersion=e.version,t.baseLayer=e.baseLayer,e.baseLayer&&"MAPBOXSTYLE"===e.baseLayer.layerType?t.addMVTMapLayer(e,e.baseLayer,0).then(()=>{t.createView(e),e.layers&&0!==e.layers.length?t.addLayers(e):t.sendMapToUser(0)}):(await t.addBaseMap(e),e.layers&&0!==e.layers.length?t.addLayers(e):t.sendMapToUser(0))}}async handleCRS(e,t){let r=this,s={},i=e,a="OpenMap";return"EPSG:-1"===e?await tt.get(r.getRequestUrl(`${t}/prjCoordSys.wkt`),null,{withCredentials:r.withCredentials,withoutFormatSuffix:!0}).then(function(e){return e.text()}).then(async function(e){if(-1!==e.indexOf(""))throw"ERROR";r.addProjctionFromWKT(e,"EPSG:-1"),s={action:a,newCrs:i}}).catch(function(){s={action:a="BrowseMap",newCrs:i}}):(0===e.indexOf("EPSG")&&e.split(":")[1]<=0?a="BrowseMap":"EPSG:910111"===e||"EPSG:910112"===e?i="EPSG:3857":"EPSG:910101"===e||"EPSG:910102"===e?i="EPSG:4326":0!==e.indexOf("EPSG")&&(r.addProjctionFromWKT(i),i=r.getEpsgInfoFromWKT(e)),s={action:a,newCrs:i}),s}getScales(e){let t,r,s=[],i={},a=[],n=e.coordUnit||go.get(e.projection).getUnits();if(n||(n="EPSG:3857"===this.baseProjection?"m":"degree"),e.visibleScales&&e.visibleScales.length>0)e.visibleScales.forEach(e=>{let r=1/e;t=this.getResFromScale(r,n),e=`1:${r.toLocaleString()}`,i[this.formatScale(e)]=t,a.push(t),s.push(e)},this);else if("WMTS"===e.layerType)e.scales.forEach(e=>{t=this.getResFromScale(e,n,90.7),e=`1:${e.toLocaleString()}`,i[this.formatScale(e)]=t,a.push(t),s.push(e)},this);else{let{minZoom:o=0,maxZoom:l=22}=e,h=this.map.getView();for(let e=o;e<=l;e++)if(t=h.getResolutionForZoom(e),r=this.getScaleFromRes(t,n),-1===s.indexOf(r)){s.push(r);let e=r.replace(/,/g,"");i[e]=t,a.push(t)}}this.scales=s,this.resolutions=i,this.resolutionArray=a}getResFromScale(e,t="DEGREE",r=96){return.0254*e/r/gp[t.toUpperCase()]}getScaleFromRes(e,t="DEGREE",r=96){let s;return"1:"+(s=e*r*gp[t.toUpperCase()]/.0254).toLocaleString()}formatScale(e){return e.replace(/,/g,"")}createSpecLayer(e){let t=this,r=e.baseLayer,s=r.url,i=r.layerType,a=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],n=new go.Projection({extent:a,units:"m",code:"EPSG:0"});go.addProjection(n);let o={center:e.center,level:0};t.baseProjection=n;let l={center:o.center?[o.center.x,o.center.y]:[0,0],zoom:0,projection:n};["4","5"].indexOf(Wo.getOlVersion())<0&&(l.multiWorld=!0);let h,u=new rp.a(l);t.map.setView(u),t.mapParams&&(t.mapParams.extent=a,t.mapParams.projection=e.projection),s&&s.indexOf("?token=")>-1&&(t.credentialKey="token",t.credentialValue=e.baseLayer.credential=s.split("?token=")[1],s=s.split("?token=")[0]),"TILE"===i?tt.get(t.getRequestUrl(`${s}.json`),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){r.originResult=e;let i="IPORTAL",a=r.credential,n="Token",o=r.url;(r.url.indexOf("www.supermapol.com")>-1||r.url.indexOf("itest.supermapol.com")>-1)&&(n="Key",o=[o],i="ONLINE"),a&&rt[`register${n}`](o,a);let l={serverType:i,url:s,tileGrid:Rl.optionsFromMapJSON(s,e).tileGrid};s&&!t.isSameDomain(s)&&(l.tileProxy=t.server+"apps/viewer/getUrlResource.png?url="),h=new Rl(l),t.addSpecToMap(h)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):"WMS"===i?(h=t.createWMSSource(r),t.addSpecToMap(h)):"WMTS"===i?tt.get(t.getRequestUrl(s,!0),null,{withCredentials:this.withCredentials}).then(function(e){return e.text()}).then(function(s){r.extent=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],r.scales=t.getWMTSScales(r.tileMatrixSet,s),r.dpi=vp.iServerWMTS,h=t.createWMTSSource(r),t.addSpecToMap(h)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):t.errorCallback&&t.errorCallback({type:"Not support CS",errorMsg:`Not support CS: ${i}`},"getMapFaild",t.map),u&&u.fit(a)}addSpecToMap(e){let t=new np.Tile({source:e,zIndex:0});this.map.addLayer(t),this.sendMapToUser(0)}getWMTSScales(e,t){let r=(new lp.a).read(t).Contents.TileMatrixSet,s=[];for(let t=0;tthis.createMVTLayer(e).then(e=>{let r=Wo.newGuid(8);t.name&&e.setProperties({name:t.name,layerID:r,layerType:"VECTOR_TILE"}),t.visibleScale&&this.setVisibleScales(e,t.visibleScale),t.layer=e,t.layerID=r,this.map.addLayer(e)}))}createView(e){let t,r=e.center,s=void 0!==e.level?e.level:1,i=e.maxZoom||22,a=this.baseProjection,n=[];for(let e in r)n.push(r[e]);0===n.length&&(n=[0,0]),this.baseLayerExtent=t=e.baseLayer&&e.baseLayer.extent,this.mapParams&&(this.mapParams.extent=t,this.mapParams.projection=a),!Object(td.containsCoordinate)(t,n)&&(n=Object(td.getCenter)(t));let o,l=e.baseLayer;if(l.visibleScales&&l.visibleScales.length>0||l.scales&&l.scales.length>0)this.getScales(l);else if(e.baseLayer&&["TILE","VECTOR_TILE"].indexOf(e.baseLayer.layerType)>-1&&t&&4===t.length){let e=(t[2]-t[0])/512,r=(t[3]-t[1])/512;o=Math.max(e,r)}let h={};if("WMTS"===l.layerType?l.scales&&l.scales.length>0?h={zoom:s,center:n,projection:a,resolutions:this.resolutionArray,maxZoom:i}:(h={zoom:s,center:n,projection:a,maxZoom:i},this.getScales(l)):this.resolutionArray&&this.resolutionArray.length>0?h={zoom:s,center:n,projection:a,resolutions:this.resolutionArray,maxZoom:i}:(h={zoom:s,center:n,projection:a,maxResolution:o,minResolution:void 0,maxZoom:i},this.getScales(l)),["4","5"].indexOf(Wo.getOlVersion())<0&&(h.multiWorld=!0,h.showFullExtent=!0,h.enableRotation=!1,h.constrainResolution=!0),this.map.setView(new rp.a(h)),e.visibleExtent){const t=this.map.getView(),r=t.getResolutionForExtent(e.visibleExtent,this.map.getSize());t.setResolution(r),t.setCenter(Object(td.getCenter)(e.visibleExtent))}}createBaseLayer(e,t,r,s,i){let a,n=this;s&&(n=s);let o=e.layerType;switch((o.indexOf("TIANDITU_VEC")>-1||o.indexOf("TIANDITU_IMG")>-1||o.indexOf("TIANDITU_TER")>-1)&&(o=o.substr(0,12)),o){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":a=this.createTiandituSource(o,e.projection);break;case"BAIDU":a=this.createBaiduSource();break;case"BING":a=this.createBingSource(e,e.projection);break;case"WMS":a=this.createWMSSource(e);break;case"WMTS":a=n.createWMTSSource(e);break;case"TILE":case"SUPERMAP_REST":a=n.createDynamicTiledSource(e,i);break;case"CLOUD":case"CLOUD_BLACK":case"OSM":case"JAPAN_ORT":case"JAPAN_RELIEF":case"JAPAN_PALE":case"JAPAN_STD":case"GOOGLE_CN":case"GOOGLE":a=this.createXYZSource(e)}var l=new np.Tile({source:a,zIndex:e.zIndex||1,visible:e.visible}),h=Wo.newGuid(8);e.name&&l.setProperties({name:e.name,layerID:h}),void 0!==e.visible&&null!==e.visible||(e.visible=!0),l.setVisible(e.visible),e.opacity&&l.setOpacity(e.opacity),t&&l.setZIndex(t),e.layer=l,e.layerID=h;let u,c,{visibleScale:d,autoUpdateTime:p}=e;return d&&(c=this.resolutions[d.minScale],u=this.resolutions[d.maxScale],c>1?l.setMaxResolution(Math.ceil(c)):l.setMaxResolution(1.1*c),l.setMinResolution(u)),p&&!e.autoUpdateInterval&&(e.autoUpdateInterval=setInterval(()=>{n.updateTileToMap(e,t)},p)),r&&(l.setZIndex(0),n.map.addLayer(l)),l}updateTileToMap(e,t){this.map.removeLayer(e.layer),this.map.addLayer(this.createBaseLayer(e,t))}getInternetMapInfo(e){const t=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],r=[-180,-90,180,90],s=[-20037508.34,-20037508.34,20037508.34,20037508.34],i=[12555667.53929,1281852.98656,17525908.86651,7484870.70596],a=[-19741117.14519,-10003921.36848,19981677.71404,19660983.56089];switch(e.units="m",e.layerType){case"BAIDU":e.iServerUrl="https://map.baidu.com/",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=t;break;case"CLOUD":e.url="http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"CLOUD_BLACK":e.url="http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"tencent":e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"TIANDITU_VEC_3857":case"TIANDITU_IMG_3857":case"TIANDITU_TER_3857":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:3857",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=t,"TIANDITU_TER_3857"===e.layerType&&(e.maxZoom=14);break;case"TIANDITU_VEC_4326":case"TIANDITU_IMG_4326":case"TIANDITU_TER_4326":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:4326",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=r,"TIANDITU_TER_4326"===e.layerType&&(e.maxZoom=14);break;case"OSM":e.url="http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=s,e.iserverUrl="https://www.openstreetmap.org";break;case"GOOGLE":e.url="https://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=22,e.level=1,e.extent=s,e.iserverUrl="https://www.google.cn/maps";break;case"JAPAN_STD":e.url="https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=0,e.extent=s;break;case"JAPAN_PALE":e.url="https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=19,e.level=2,e.extent=s;break;case"JAPAN_RELIEF":e.url="https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=5,e.maxZoom=14,e.level=5,e.extent=i;break;case"JAPAN_ORT":e.url="https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=12,e.level=2,e.extent=a}}createDynamicTiledSource(e,t){let r="IPORTAL",s=e.credential?e.credential.token:void 0,i="Token",a=e.url;(e.url.indexOf("www.supermapol.com")>-1||e.url.indexOf("itest.supermapol.com")>-1)&&(i="Key",a=[a],r="ONLINE"),s&&rt[`register${i}`](a,s);let n={transparent:!0,url:e.url,wrapX:!1,serverType:r,format:e.format};if(t||"EPSG:-1"===this.baseProjection||(n.prjCoordSys={epsgCode:this.baseProjection.split(":")[1]}),e.visibleScales&&e.visibleScales.length>0){let t=[];for(let r in e.visibleScales){let s=Wo.scaleToResolution(e.visibleScales[r],vp.default,e.coordUnit);t.push(s)}e.visibleResolutions=t;let r=new xl.a({extent:e.extent,resolutions:t});n.tileGrid=r}else{n.extent=this.baseLayerExtent;let t=new xl.a({extent:e.extent,resolutions:this.getResolutionsFromBounds(e.extent)});n.tileGrid=t}e.url&&!this.isSameDomain(e.url)&&(n.tileProxy=this.server+"apps/viewer/getUrlResource.png?url=");let o=new Rl(n);return rt[`register${i}`](e.url),o}getResolutionsFromBounds(e){let t=[],r=Math.abs(e[0]-e[2])/512;for(let e=0;e<22;e++)0!==e?(r/=2,t[e]=r):t[e]=r;return t}createTiandituSource(e,t,r){let s={layerType:e.split("_")[1].toLowerCase(),isLabel:r||!1,projection:t,url:`https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?tk=${this.tiandituKey}`};return new Nl(s)}createBaiduSource(){return new Cl}createBingSource(e,t){return new up.XYZ({wrapX:!1,projection:t,crossOrigin:"anonymous",tileUrlFunction:function(e){let[t,r,s]=[...e];s=s>0?s-1:-s-1;let i="";for(let e=t;e>0;e--){let t=0,a=1<!1===e.succeed?e:{units:e.coordUnit&&e.coordUnit.toLowerCase(),coordUnit:e.coordUnit,visibleScales:e.visibleScales,extent:[e.bounds.left,e.bounds.bottom,e.bounds.right,e.bounds.top],projection:`EPSG:${e.prjCoordSys.epsgCode}`,format:"png"}).catch(e=>({succeed:!1,error:e}))}getTileInfo(e,t,r){let s=this,i={withCredentials:this.withCredentials,withoutFormatSuffix:!0};return e.url.indexOf("?token=")>-1&&(s.credentialKey="token",s.credentialValue=e.credential=e.url.split("?token=")[1],e.url=e.url.split("?token=")[0]),tt.get(s.getRequestUrl(`${e.url}.json`),null,i).then(function(e){return e.json()}).then(function(i){if(i&&i.code&&200!==i.code)throw i;i.visibleScales&&(e.visibleScales=i.visibleScales,e.coordUnit=i.coordUnit),e.maxZoom=i.maxZoom,e.maxZoom=i.minZoom,e.format="png",r?t&&t(r,null,!0,s):t&&t(e)}).catch(function(e){s.errorCallback&&s.errorCallback(e,"getTileInfo",s.map)})}getWMTSUrl(e,t){let r="?";return e.indexOf("?")>-1&&(r="&"),e+=t?r+"SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities":r+"/1.0.0/WMTSCapabilities.xml",this.getRequestUrl(e,!0)}getWmtsInfo(e,t){let r=this,s={withCredentials:r.withCredentials,withoutFormatSuffix:!0};const i=!e.requestEncoding||"KVP"===e.requestEncoding;return tt.get(r.getWMTSUrl(e.url,i),null,s).then(function(e){return e.text()}).then(function(s){let a=(new lp.a).read(s);if(r.isValidResponse(a)){let s,o,l,h=a.Contents,u=h.TileMatrixSet,c=h.Layer,d="default";for(let t=0;t{e.isDefault&&(d=e.Identifier)});let p=[],m=[];for(let t=0;t-1?[s[1],s[0]]:s;break}let f,y=e.name;f=n?go.transformExtent(n,"EPSG:4326",r.baseProjection):go.get(r.baseProjection).getExtent(),e.tileUrl=r.getTileUrl(a.OperationsMetadata.GetTile.DCP.HTTP.Get,s,l,i),e.extent=f,e.name=y,e.orginEpsgCode=e.projection,e.overLayer=!0,e.scales=p,e.style=d,e.title=y,e.unit="m",e.layerFormat=l,e.matrixIds=m,t&&t(e)}}).catch(function(e){r.errorCallback&&r.errorCallback(e,"getWmtsFaild",r.map)})}getTileUrl(e,t,r,s){let i;if(s)e.forEach(e=>{"KVP"===e.Constraint[0].AllowedValues.Value[0].toUpperCase()&&(i=e.href)});else{const e=t.ResourceURL.filter(e=>e.format===r);i=e[0].template}return i}createWMTSSource(e){let t=e.extent||go.get(e.projection).getExtent(),r=go.get(this.baseProjection).getUnits();return new up.WMTS({url:e.tileUrl||e.url,layer:e.layer,format:e.layerFormat,style:e.style,matrixSet:e.tileMatrixSet,requestEncoding:e.requestEncoding||"KVP",tileGrid:this.getWMTSTileGrid(t,e.scales,r,e.dpi,e.origin,e.matrixIds),tileLoadFunction:function(e,t){e.getImage().src=t}})}getWMTSTileGrid(e,t,r,s,i,a){let n=this.getReslutionsFromScales(t,s||vp.iServerWMTS,r);return new Il.a({origin:i,extent:e,resolutions:n.res,matrixIds:a||n.matrixIds})}getReslutionsFromScales(e,t,r,s){r=r&&r.toLowerCase()||"degrees",t=t||vp.iServerWMTS,s=s||6370997;let i=[],a=[];if(Wo.isArray(e))e&&e.forEach(function(e,n){e>1&&(a.push(n),i.push(this.getResolutionFromScale(e,t,r,s)))},this);else{let n=e.TileMatrix;n&&n.forEach(function(e){a.push(e.Identifier),i.push(this.getResolutionFromScale(e.ScaleDenominator,t,r,s))},this)}return{res:i,matrixIds:a}}getResolutionFromScale(e,t=vp.default,r,s){let i;return e=(e=+e)>1?1/e:e,i="degrees"===r||"dd"===r||"degree"===r?254/t/e/(2*Math.PI*s/360)/1e4:254/t/e/1e4}isValidResponse(e){let t=["Contents","OperationsMetadata"],r=!0;for(let s=0;s0&&(this.layers=t,t.forEach(function(t,a){let n=a+1,o=t.dataSource,l=o&&"SAMPLE_DATA"===o.type&&!!o.name;if("MAPBOXSTYLE"===t.layerType)r.addMVTMapLayer(e,t,n).then(()=>{r.layerAdded++,r.sendMapToUser(i)});else if(o&&o.serverId||"MARKER"===t.layerType||"HOSTED_TILE"===t.layerType||l){let e=t.dataSource,a=e?e.serverId:t.serverId;if(!a&&!l)return r.addLayer(t,null,n),r.layerAdded++,void r.sendMapToUser(i);if("MARKER"===t.layerType||e&&(!e.accessType||"DIRECT"===e.accessType)||l){let o=l?`${r.server}apps/dataviz/libs/sample-datas/${e.name}.json`:`${r.server}web/datas/${a}/content.json?pageSize=9999999¤tPage=1`;o=r.getRequestUrl(o),tt.get(o,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(async function(e){if(!1===e.succeed)return r.layerAdded++,r.sendMapToUser(i),void(r.errorCallback&&r.errorCallback(e.error,"getLayerFaild",r.map));if(e&&e.type){if("JSON"===e.type||"GEOJSON"===e.type)e.content=e.content.type?e.content:JSON.parse(e.content),s=r.geojsonToFeature(e.content,t);else if("EXCEL"===e.type||"CSV"===e.type)if(t.dataSource&&t.dataSource.administrativeInfo){e.content.rows.unshift(e.content.colTitles);let{divisionType:i,divisionField:a}=t.dataSource.administrativeInfo,n=r.excelData2FeatureByDivision(e.content,i,a);s=r._parseGeoJsonData2Feature({allDatas:{features:n.features},fileCode:t.projection})}else s=await r.excelData2Feature(e.content,t);else if("SHP"===e.type){let i=JSON.parse(e.content);e.content=i.layers[0],s=r.geojsonToFeature(e.content,t)}r.addLayer(t,s,n),r.layerAdded++,r.sendMapToUser(i)}}).catch(function(e){r.layerAdded++,r.sendMapToUser(i),r.errorCallback&&r.errorCallback(e,"getLayerFaild",r.map)})}else{let s="HOSTED_TILE"===t.layerType,a=e?e.serverId:t.serverId;r.checkUploadToRelationship(a).then(function(e){if(e&&e.length>0){let o=e[0].name,l=e[0].type.toUpperCase();r.getDataService(a,o).then(function(e){let a=e.dataItemServices;if(0===a.length)return r.layerAdded++,r.sendMapToUser(i),void(r.errorCallback&&r.errorCallback(null,"getLayerFaild",r.map));if(s){let e=r.getService(a,"RESTDATA");r.isMvt(e.address,o).then(e=>{r.getServiceInfoFromLayer(n,i,t,a,o,l,e)}).catch(()=>{r.getServiceInfoFromLayer(n,i,t,a,o,l)})}else r.getServiceInfoFromLayer(n,i,t,a,o,l)})}else r.layerAdded++,r.sendMapToUser(i),r.errorCallback&&r.errorCallback(null,"getLayerFaild",r.map)}).catch(function(e){r.layerAdded++,r.sendMapToUser(i),r.errorCallback&&r.errorCallback(e,"getLayerFaild",r.map)})}}else o&&"USER_DATA"===o.type?r.addGeojsonFromUrl(t,i,n,!1):"TILE"===t.layerType?r.getTileLayerExtent(t,function(e){r.map.addLayer(r.createBaseLayer(e,n)),r.layerAdded++,r.sendMapToUser(i)},function(e){r.layerAdded++,r.sendMapToUser(i),r.errorCallback&&r.errorCallback(e,"getLayerFaild",r.map)}):"SUPERMAP_REST"===t.layerType||"WMS"===t.layerType||"WMTS"===t.layerType?"WMTS"===t.layerType?r.getWmtsInfo(t,function(e){r.map.addLayer(r.createBaseLayer(e,n)),r.layerAdded++,r.sendMapToUser(i)}):(t.projection=r.baseProjection,r.map.addLayer(r.createBaseLayer(t,n)),r.layerAdded++,r.sendMapToUser(i)):o&&"REST_DATA"===o.type?r.getFeaturesFromRestData(t,n,i):o&&"REST_MAP"===o.type&&o.url?Wo.queryFeatureBySQL(o.url,o.layerName,"smid=1",null,null,function(e){var s=e&&e.result.recordsets,a=s&&s[0],o=a.fields;if(a&&o){let e=[];for(var l in o){var h=o[l];0===h.indexOf("Sm")&&"SmID"!==h||e.push(h)}r.getFeatures(e,t,function(e){r.addLayer(t,e,n),r.layerAdded++,r.sendMapToUser(i)},function(e){r.layerAdded++,r.errorCallback&&r.errorCallback(e,"getFeatureFaild",r.map)})}},function(e){r.errorCallback&&r.errorCallback(e,"getFeatureFaild",r.map)}):"DATAFLOW_POINT_TRACK"!==t.layerType&&"DATAFLOW_HEAT"!==t.layerType||r.getDataflowInfo(t,function(){r.addLayer(t,s,n),r.layerAdded++,r.sendMapToUser(i)},function(e){r.layerAdded++,r.errorCallback&&r.errorCallback(e,"getFeatureFaild",r.map)})},this))}addGeojsonFromUrl(e,t,r,s=this.withCredentials){let{dataSource:i}=e,{url:a}=i,n=this;tt.get(a,null,{withCredentials:s,withoutFormatSuffix:!0}).then(function(e){return e.json()}).then(async function(s){if(s&&!1!==s.succeed){var i;if("CSV"===s.type||"EXCEL"===s.type)if(e.dataSource&&e.dataSource.administrativeInfo){s.content.rows.unshift(s.content.colTitles);let{divisionType:t,divisionField:r}=e.dataSource.administrativeInfo,a=n.excelData2FeatureByDivision(s.content,t,r);i=n._parseGeoJsonData2Feature({allDatas:{features:a.features},fileCode:e.projection})}else i=await n.excelData2Feature(s.content,e);else{var a=s.content?JSON.parse(s.content):s;i=n.geojsonToFeature(a,e)}t?(n.addLayer(e,i,r),n.layerAdded++,n.sendMapToUser(t)):(n.map.removeLayer(e.layer),e.labelLayer&&n.map.removeLayer(e.labelLayer),n.addLayer(e,i,r))}else t?n.errorCallback&&n.errorCallback(s.error,"autoUpdateFaild",n.map):(n.layerAdded++,n.sendMapToUser(t),n.errorCallback&&n.errorCallback(s.error,"getLayerFaild",n.map))}).catch(function(e){n.layerAdded++,n.sendMapToUser(t),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)})}getServiceInfoFromLayer(e,t,r,s,i,a,n){let o=this,l=n?!n.isMvt:"HOSTED_TILE"===r.layerType,h=!1;s.forEach(function(s){if(!h)if(s&&l&&"RESTMAP"===s.serviceType)h=!0,o.getTileLayerInfo(s.address).then(function(s){s.forEach(function(s){let i=s.bounds;r.layerType="TILE",r.orginEpsgCode=o.baseProjection,r.units=s.coordUnit&&s.coordUnit.toLowerCase(),r.extent=[i.left,i.bottom,i.right,i.top],r.visibleScales=s.visibleScales,r.url=s.url,r.sourceType="TILE",o.map.addLayer(o.createBaseLayer(r,e)),o.layerAdded++,o.sendMapToUser(t)})});else if(s&&!l&&"RESTDATA"===s.serviceType)if(h=!0,n&&n.isMvt){let s=n.bounds;r=Object.assign(r,{layerType:"VECTOR_TILE",epsgCode:n.epsgCode,projection:`EPSG:${n.epsgCode}`,bounds:s,extent:[s.left,s.bottom,s.right,s.top],name:r.name,url:n.url,visible:r.visible,featureType:a,serverId:r.serverId.toString()}),o.map.addLayer(o.addVectorTileLayer(r,e,"RESTDATA")),o.layerAdded++,o.sendMapToUser(t)}else h=!0,o.getDatasources(s.address).then(function(a){r.dataSource.dataSourceName=a+":"+i,r.dataSource.url=`${s.address}/data`,o.getFeaturesFromRestData(r,e,t)})}),h||(o.layerAdded++,o.sendMapToUser(t),o.errorCallback&&o.errorCallback(null,"getLayerFaild",o.map))}getDataflowInfo(e,t,r){let s,i=e.url,a=this.getRequestUrl(`${i}.json`,!1);e.credential&&e.credential.token&&(a+=`?token=${s=e.credential.token}`),tt.get(a,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(r){e.featureType="POINT",r&&r.featureMetaData&&(e.featureType=r.featureMetaData.featureType.toUpperCase()),e.wsUrl=r.urls[0].url,t()}).catch(function(){r()})}getFeaturesFromRestData(e,t,r){let s=this,i=e.dataSource,a=e.dataSource.url,n=i.dataSourceName||e.name,o=s.formatUrlWithCredential(a),l={};this.excludePortalProxyUrl||Se.isInTheSameDomain(o)||(l.proxy=this.getProxy()),Wo.getFeatureBySQL(o,[n],l,function(i){let a=s.parseGeoJsonData2Feature({allDatas:{features:i.result.features.features},fileCode:e.projection,featureProjection:s.baseProjection});s.addLayer(e,a,t),s.layerAdded++,s.sendMapToUser(r)},function(e){s.layerAdded++,s.sendMapToUser(r),s.errorCallback&&s.errorCallback(e,"getFeatureFaild",s.map)})}getFeatures(e,t,r,s){var i=this,a=t.dataSource,n=t.projection;Wo.queryFeatureBySQL(a.url,a.layerName,null,e,null,function(e){var t=e.result.recordsets[0].features.features,s=i.parseGeoJsonData2Feature({allDatas:{features:t},fileCode:n,featureProjection:i.baseProjection},"JSON");r(s)},function(e){s(e)})}sendMapToUser(e){this.layerAdded===e&&this.successCallback&&this.successCallback(this.map,this.mapParams,this.layers,this.baseLayer)}async excelData2Feature(e,t){let r=e.rows,s=e.colTitles;for(let e in s)Wo.isString(s[e])&&(s[e]=Wo.trim(s[e]));let i=t.projection,a=t.dataSource,n=this.baseProjection,o=[],l=Wo.trim(t.xyField&&t.xyField.xField||t.from&&t.from.xField),h=Wo.trim(t.xyField&&t.xyField.yField||t.from&&t.from.yField),u=s.indexOf(l),c=s.indexOf(h);if("MIGRATION"===t.layerType)try{if("PORTAL_DATA"===a.type){const{dataMetaInfo:e}=await tt.get(`${this.server}web/datas/${a.serverId}.json`,null,{withCredentials:!0}).then(e=>e.json());t.xyField={xField:e.xField,yField:e.yField},e.xIndex?(u=e.xIndex,c=e.yIndex):(u=s.indexOf(e.xField),c=s.indexOf(e.yField))}else if("SAMPLE_DATA"===a.type){const e=ep.find(e=>e.id===a.name)||{};l=e.xField,h=e.yField,t.xyField={xField:l,yField:h},u=s.findIndex(e=>e===l),c=s.findIndex(e=>e===h)}}catch(e){console.error(e)}for(let e=0,t=r.length;e-1){a[r+"_1"]=t[e]}else a[r]=t[e]}let r=new qo.a({geometry:e,attributes:a});o.push(r)}}return Promise.resolve(o)}excelData2FeatureByDivision(e,t,r){let s,i=this;if("Province"===t?s=window.ProvinceData:"City"===t?s=window.MunicipalData:"GB-T_2260"===t&&(s=window.AdministrativeArea),s){return i.changeExcel2Geojson(s.features,e.rows,t,r)}}_parseGeoJsonData2Feature(e){let t=e.allDatas.features,r=[];for(let s=0,i=t.length;se===s);return n.forEach(t=>{let s=e.find(e=>"GB-T_2260"===r?e.properties.GB===t[o]:Wo.isMatchAdministrativeName(e.properties.Name,t[o]));if(s){let e=window.cloneDeep(s);e.properties={},t.forEach((t,r)=>{let s=a[r].trim();e.properties[s]=t}),i.features.push(e)}}),i}geojsonToFeature(e,t){let r=e.features,s=[];for(let e=0,i=r.length;e-1||a._smiportal_imgLinkUrl.indexOf("https://")>-1?r=a._smiportal_imgLinkUrl:void 0!==a._smiportal_imgLinkUrl&&null!==a._smiportal_imgLinkUrl&&""!==a._smiportal_imgLinkUrl&&(r=`${Wo.getIPortalUrl()}resources/markerIcon/${a._smiportal_imgLinkUrl}`),o={dataViz_description:a._smiportal_description,dataViz_imgUrl:r,dataViz_title:a._smiportal_title,dataViz_url:a._smiportal_otherLinkUrl},s.anchor=[.5,1],s.src=s.externalGraphic,l=s,h=Object.assign({},{attributes:o},{useStyle:l}),delete a._smiportal_description,delete a._smiportal_imgLinkUrl,delete a._smiportal_title,delete a._smiportal_otherLinkUrl}else h={attributes:i};a.setProperties(h),s.push(a)}return s}parseGeoJsonData2Feature(e){let t=e.allDatas.features,r=[];for(let s=0,i=t.length;s{i.updateFeaturesToMap(e,r,!0)},n)}}e.layer=s,e.layerID=a,e.labelStyle&&e.labelStyle.labelField&&"DATAFLOW_POINT_TRACK"!==e.layerType&&(t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,this.addLabelLayer(e,t))}updateFeaturesToMap(e,t){let r=this,s=e.dataSource,i=e.dataSource.url,a=s.dataSourceName||e.name;if("USER_DATA"===s.type||"DIRECT"===s.accessType)r.addGeojsonFromUrl(e,null,t);else{let s=r.formatUrlWithCredential(i),n={};this.excludePortalProxyUrl||Se.isInTheSameDomain(s)||(n.proxy=this.getProxy()),Wo.getFeatureBySQL(s,[a],n,function(s){let i=r.parseGeoJsonData2Feature({allDatas:{features:s.result.features.features},fileCode:e.projection,featureProjection:r.baseProjection});r.map.removeLayer(e.layer),e.labelLayer&&r.map.removeLayer(e.labelLayer),r.addLayer(e,i,t)},function(e){r.errorCallback&&r.errorCallback(e,"autoUpdateFaild",r.map)})}}addVectorTileLayer(e,t,r){let s;"RESTDATA"===r&&(s=this.createDataVectorTileLayer(e));let i=Wo.newGuid(8);return s&&(e.name&&s.setProperties({name:e.name,layerID:i}),void 0!=e.opacity&&s.setOpacity(e.opacity),s.setVisible(e.visible),s.setZIndex(t)),e.layer=s,e.layerID=i,s}createDataVectorTileLayer(e){var t=new Ed.a({featureClass:qo.a});Ed.a.prototype.readProjection=function(){return new go.Projection({code:"",units:ap.a.TILE_PIXELS})};let r=e.featureType,s=cl.toOpenLayersStyle(this.getDataVectorTileStyle(r),r);return new np.VectorTile({source:new Od({url:e.url,projection:e.projection,tileType:"ScaleXY",format:t}),style:s})}getDataVectorTileStyle(e){let t={radius:8,fillColor:"#EE4D5A",fillOpacity:.9,strokeColor:"#ffffff",strokeWidth:1,strokeOpacity:1,lineDash:"solid",type:"BASIC_POINT"};return["LINE","LINESTRING","MULTILINESTRING"].indexOf(e)>-1?(t.strokeColor="#4CC8A3",t.strokeWidth=2):["REGION","POLYGON","MULTIPOLYGON"].indexOf(e)>-1&&(t.fillColor="#826DBA"),t}getFiterFeatures(e,t){let r="select * from json where ("+this.parseFilterCondition(e)+")",s=[];for(let e=0;e0&&s.push(i)}return s}parseFilterCondition(e){return e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=").replace(/\(?[^\(]+?\s*in\s*\([^\)]+?\)\)?/gi,e=>{const t=e.match(/([^(]+?)\s*in\s*\(([^)]+?)\)/i);return 3===t.length?`(${t[2].split(",").map(e=>`${t[1]} == ${e.trim()}`).join(" || ")})`:e})}createGraphicLayer(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;let r=this.getGraphicsFromFeatures(t,e.style,e.featureType),s=new ld({graphics:r,render:"canvas",map:this.map,isHighLight:!1});return new np.Image({source:s})}getGraphicsFromFeatures(e,t,r){let s=cl.getOpenlayersStyle(t,r).getImage(),i=[];for(let t in e){let r=new ed(e[t].getGeometry());r.setStyle(s),r.setProperties({attributes:e[t].get("attributes")}),i.push(r)}return i}createSymbolLayer(e,t){let r=cl.getSymbolStyle(e.style);return new np.Vector({style:r,source:new up.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"})}addLabelLayer(e,t){let r=e.labelStyle,s=this.getLabelStyle(r,e),i=e.labelLayer=new np.Vector({declutter:!0,styleOL:s,labelField:r.labelField,source:new up.Vector({features:t,wrapX:!1})});i.setStyle(e=>{let t=r.labelField,s=e.get("attributes")[t.trim()]+"";if("undefined"===s)return null;let a=i.get("styleOL"),n=a.getText();return n&&n.setText&&n.setText(s),a}),this.map.addLayer(i),i.setVisible(e.visible),i.setZIndex(1e3);const{visibleScale:a}=e;return a&&this.setVisibleScales(i,a),i}setVisibleScales(e,t){let r=this.resolutions[t.minScale],s=this.resolutions[t.maxScale];r>1?e.setMaxResolution(Math.ceil(r)):e.setMaxResolution(1.1*r),e.setMinResolution(s)}getLabelStyle(e,t){let r=t.style||t.pointStyle;const{radius:s=0,strokeWidth:i=0}=r,a=-(s+i),{fontSize:n="14px",fontFamily:o,fill:l,backgroundFill:h,offsetX:u=0,offsetY:c=a,placement:d="point",textBaseline:p="bottom",textAlign:m="center",outlineColor:f="#000000",outlineWidth:y=0}=e,g={font:`${n} ${o}`,placement:d,textBaseline:p,fill:new sl.a({color:l}),backgroundFill:new sl.a({color:h}),padding:[3,3,3,3],offsetX:"POINT"===t.featureType?u:0,offsetY:"POINT"===t.featureType?c:0,overflow:!0,maxAngle:0};return"POINT"===t.featureType&&(g.textAlign=m),y>0&&(g.stroke=new al.a({color:f,width:y})),new Ko.a({text:new ol.a(g)})}createVectorLayer(e,t){const{featureType:r,style:s}=e;let i;if("LINE"===r&&Wo.isArray(s)){const[e,t]=s;i="solid"===t.lineDash?cl.getRoadPath(t,e):cl.getPathway(t,e)}else i=cl.toOpenLayersStyle(e.style,e.featureType);return new np.Vector({style:i,source:new up.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})})}createHeatLayer(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;let r={source:new up.Vector({features:t,wrapX:!1})},s=e.themeSetting;r.gradient=s.colors.slice(),r.radius=parseInt(s.radius);let i=s.customSettings;for(let e in i)r.gradient[e]=i[e];return s.weight&&this.changeWeight(t,s.weight),new np.Heatmap(r)}changeWeight(e,t){let r=this;this.fieldMaxValue={},this.getMaxValue(e,t);let s=this.fieldMaxValue[t];e.forEach(function(e){let i=e.get("attributes");try{let a=i[t];e.set("weight",a/s)}catch(e){r.errorCallback&&r.errorCallback(e)}})}getMaxValue(e,t){let r,s=[],i=this,a=t;this.fieldMaxValue[a]||(e.forEach(function(e){r=e.get("attributes");try{s.push(parseFloat(r[a]))}catch(e){i.errorCallback&&i.errorCallback(e)}}),this.fieldMaxValue[a]=Qa.getArrayStatistic(s,"Maximum"))}createUniqueLayer(e,t){let r=this.createUniqueSource(e,t),s=new np.Vector({styleSource:r,source:new up.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})});return s.setStyle(e=>{let t=s.get("styleSource"),r=t.themeField,i=e.get("attributes")[r];return t.styleGroups.find(e=>e.value===i).olStyle}),s}createUniqueSource(e,t){let r=this.getUniqueStyleGroup(e,t);return{map:this.map,style:e.style,isHoverAble:e.isHoverAble,highlightStyle:e.highlightStyle,themeField:e.themeSetting.themeField,styleGroups:r}}getUniqueStyleGroup(e,t){let r=e.featureType,s=e.style,i=e.themeSetting,a=i.themeField,n=i.colors,o=[],l=i.customSettings;for(let e in t){let r=t[e].get("attributes")[a],s=!1;for(let e in o)if(o[e]===r){s=!0;break}s||o.push(r)}let h=n;h=Xa.getGradientColors(h,o.length);let u=[];return o.forEach(function(e,t){let i="1.0"===this.webMapVersion?t:e,a=h[i];i in l&&(a=l[i]),"LINE"===r?s.strokeColor=a:s.fillColor=a;let n=cl.toOpenLayersStyle(s,r);u.push({olStyle:n,color:a,value:e})},this),u}createRangeLayer(e,t){let r=this.createRangeSource(e,t),s=new np.Vector({styleSource:r,source:new up.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})});return s.setStyle(e=>{let t=s.get("styleSource");if(t){let r=t.themeField,s=Number(e.get("attributes")[r.trim()]),i=t.styleGroups;for(let e=0;e=i[e].start&&s<=i[e].end)return i[e].olStyle}else if(s>i[e].start&&s<=i[e].end)return i[e].olStyle}}),s}createRangeSource(e,t){let r=this.getRangeStyleGroup(e,t);return!!r&&{style:e.style,themeField:e.themeSetting.themeField,styleGroups:r}}getRangeStyleGroup(e,t){let r,s,i=e.featureType,a=e.themeSetting,n=e.style,o=a.segmentCount,l=a.segmentMethod,h=a.colors,u=a.customSettings,c=a.themeField,d=[],p=o,m=l,f=this;t.forEach(function(e){r=e.get("attributes");try{if(r){let e=r[c.trim()];void 0!==e&&null!==e&&Wo.isNumber(e)&&d.push(parseFloat(e))}else e.get(c)&&Wo.isNumber(e.get(c))&&e.get(c)&&d.push(parseFloat(e.get(c)))}catch(e){f.errorCallback&&f.errorCallback(e)}});try{s=Qa.getArraySegments(d,m,p)}catch(e){f.errorCallback&&f.errorCallback(e)}if(s){let e=p;r&&s[0]===s[r.length-1]&&(e=1,s.length=2);for(let e in s){let t=s[e];t=0===Number(e)?Math.floor(100*t)/100:Math.ceil(100*t)/100+.1,s[e]=Number(t.toFixed(2))}let t=h;t=Xa.getGradientColors(t,e,"RANGE");for(let t=0;t0&&c.addDataflowFeature(i,e.identifyField,{dataflowSource:l,featureCache:t,labelSource:a,labelFeatureCache:r,pathSource:o,pathFeatureCache:s,maxPointCount:e.maxPointCount})}else c.addDataflowFeature(i,e.identifyField,{dataflowSource:l,featureCache:t,labelSource:a,labelFeatureCache:r,pathSource:o,pathFeatureCache:s,maxPointCount:e.maxPointCount})}}({},{},{})),this.setFeatureStyle(h,e.directionField,s.type),h}addDataflowFeature(e,t,r){r.dataflowSource&&this.addFeatureFromDataflowService(r.dataflowSource,e,t,r.featureCache),r.labelSource&&this.addFeatureFromDataflowService(r.labelSource,e,t,r.labelFeatureCache),r.pathSource&&this.addPathFeature(r.pathSource,e,t,r.pathFeatureCache,r.maxPointCount)}addPathFeature(e,t,r,s,i){let a=[];var n=t.get(r);s[n]?((a=s[n].getGeometry().getCoordinates()).push(t.getGeometry().getCoordinates()),i&&a.length>i&&a.splice(0,a.length-i),s[n].getGeometry().setCoordinates(a)):(a.push(t.getGeometry().getCoordinates()),s[n]=new qo.a({geometry:new hp.LineString(a)}),e.addFeature(s[n]))}setFeatureStyle(e,t,r){let s=e.get("styleOL");e.setStyle(e=>{let i,a;if((i=void 0!==t&&"未设置"!==t&&"None"!==t?e.get("attributes")[t]:0)>360||i<0)return null;a="SYMBOL_POINT"===r?s.getText():s.getImage();let n=Math.PI*i/180;return a&&a.setRotation(n),s})}createDataflowHeatLayer(e){let t={source:this.createDataflowHeatSource(e)};if(t.gradient=e.themeSetting.colors.slice(),t.radius=parseInt(e.themeSetting.radius),e.themeSetting.customSettings){let r=e.themeSetting.customSettings;for(let e in r)t.gradient[e]=r[e]}return new np.Heatmap(t)}createDataflowHeatSource(e){let t=this,r=new up.Vector({wrapX:!1});return this.createDataflowService(e,function(s){return function(i){if(e.filterCondition){let a="select * from json where ("+t.parseFilterCondition(e.filterCondition)+")",n=window.jsonsql.query(a,{attributes:i.get("attributes")});n&&n.length>0&&t.addDataflowFeature(i,e.identifyField,{dataflowSource:r,featureCache:s})}else t.addDataflowFeature(i,e.identifyField,{dataflowSource:r,featureCache:s});e.themeSetting.weight&&t.changeWeight(r.getFeatures(),e.themeSetting.weight)}}({})),r}addFeatureFromDataflowService(e,t,r,s){var i=t.get(r);void 0!==i&&s[i]?(s[i].setGeometry(t.getGeometry()),s[i].setProperties(t.getProperties()),e.changed()):(e.addFeature(t),s[i]=t)}createDataflowService(e,t){let r=this,s=new kc(e.wsUrl).initSubscribe();s.on("messageSucceeded",function(e){let s=JSON.parse(e.value.data),i=fp.readFeature(s,{dataProjection:"EPSG:4326",featureProjection:r.baseProjection||"EPSG:4326"});i.setProperties({attributes:s.properties}),t(i)}),e.dataflowService=s}setEachFeatureDefaultStyle(e){let t=this;(e=Wo.isArray(e)||e instanceof mp.a?e:[e]).forEach(function(e){let r=e.getGeometry().getType().toUpperCase(),s=e.getProperties().useStyle;if(s){"POINT"===r&&s.text&&(r="TEXT");let i=t.setFeatureInfo(e);e.setProperties({useStyle:s,attributes:i}),"POINT"===r&&s.src&&-1===s.src.indexOf("http://")&&-1===s.src.indexOf("https://")&&(s.src=t.server+s.src)}else s=cl.getMarkerDefaultStyle(r,t.server);e.setStyle(cl.toOpenLayersStyle(s,r))},this)}setFeatureInfo(e){let t=e.get("attributes"),r=Object.assign({dataViz_title:"",dataViz_description:"",dataViz_imgUrl:"",dataViz_url:""},t),s=e.getProperties();for(let e in r)s[e]&&(r[e]=s[e],delete s[e]);return r}createRankSymbolLayer(e,t){let r=this.createRankStyleSource(e,t,e.featureType),s=new np.Vector({styleSource:r,source:new up.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"});return s.setStyle(e=>{let t=s.get("styleSource"),r=t.parameters.themeSetting.themeField,i=Number(e.get("attributes")[r]),a=t.styleGroups;for(let e=0,r=a.length;e=a[e].start&&i{let r=t.get("attributes")[e];null!=r&&Wo.isNumber(r)&&i.push(Number(r))});try{a=Qa.getArraySegments(i,l,h)}catch(e){console.error(e)}for(let e=0;e0&&r>0&&`EPSG:${e.substring(t,r).split(",")[1].substr(1)}`}}createMigrationLayer(e,t){window.EChartsLayer.prototype.getContainer||(window.EChartsLayer.prototype.getContainer=function(){return this.$container}),window.EChartsLayer.prototype.setVisible||(window.EChartsLayer.prototype.setVisible=function(e){if(e){let e=this.get("options");e&&(this.setChartOptions(e),this.unset("options"))}else{let e=this.getChartOptions();this.set("options",e),this.clear(),this.setChartOptions({})}}),window.EChartsLayer.prototype.setZIndex||(window.EChartsLayer.prototype.setZIndex=function(e){let t=this.getContainer();t&&(t.style.zIndex=e)}),window.EChartsLayer.prototype.setCursor||(window.EChartsLayer.prototype.setCursor=function(e="default"){let t=this.getContainer();t&&"default"===e&&t.classList.add("cursor-default")});let r=Wo.getFeatureProperties(t),s=this.createLinesData(e,r),i=this.createPointsData(s,e,r),a=this.createOptions(e,s,i),n=new window.EChartsLayer(a,{hideOnMoving:!1,hideOnZooming:!1,forcedPrecomposeRerender:!0});return n.type="ECHARTS",n}createOptions(e,t,r){let s,i=this.createLineSeries(e,t);if(r&&r.length){let t=this.createPointSeries(e,r);s=i.concat(t)}else s=i.slice();return{series:s}}createLineSeries(e,t){let r=e.lineSetting,s=e.animationSetting,i=[{name:"line-series",type:"lines",zlevel:1,silent:!0,effect:{show:s.show,constantSpeed:s.constantSpeed,trailLength:0,symbol:s.symbol,symbolSize:s.symbolSize},lineStyle:{normal:{color:r.color,type:r.type,width:r.width,opacity:r.opacity,curveness:r.curveness}},data:t}];return t.length>yp&&(i[0].blendMode="lighter"),i}createPointSeries(e,t){let r=e.lineSetting,s=e.animationSetting,i=e.labelSetting,a=[{name:"point-series",coordinateSystem:"geo",zlevel:2,silent:!0,label:{normal:{show:i.show,position:"right",formatter:"{b}",color:i.color,fontFamily:i.fontFamily}},itemStyle:{normal:{color:r.color||i.color}},data:t}];return s.show?(a[0].type="effectScatter",a[0].rippleEffect={brushType:"stroke"}):a[0].type="scatter",a}createPointsData(e,t,r){let s=[],i=t.labelSetting;if(!i.show||!e.length)return s;let a=[],n=[];return e.forEach((e,t)=>{let s=e.coords,o=s[0],l=s[1],h=r[t][i.from],u=r[t][i.to];!a.find(e=>e.value[0]===o[0]&&e.value[1]===o[1])&&a.push({name:h,value:o}),!n.find(e=>e.value[0]===l[0]&&e.value[1]===l[1])&&n.push({name:u,value:l})}),s=a.concat(n)}createLinesData(e,t){let r=[];if(t&&t.length){let s,i,a=e.from,n=e.to;if("XY_FIELD"===a.type&&a.xField&&a.yField&&n.xField&&n.yField)t.forEach(e=>{let t=e[a.xField],o=e[a.yField],l=e[n.xField],h=e[n.yField];t&&o&&l&&h&&(s=[e[a.xField],e[a.yField]],i=[e[n.xField],e[n.yField]],r.push({coords:[s,i]}))});else if("PLACE_FIELD"===a.type&&a.field&&n.field){const e=Zd.concat($d);t.forEach(t=>{let o=t[a.field],l=t[n.field];s=e.find(e=>Wo.isMatchAdministrativeName(e.name,o)),i=e.find(e=>Wo.isMatchAdministrativeName(e.name,l)),s&&i&&r.push({coords:[s.coord,i.coord]})})}}return r}getService(e,t){return e.filter(e=>e&&e.serviceType===t)[0]}isMvt(e,t){let r=this;return this.getDatasetsInfo(e,t).then(e=>e.epsgCode==r.baseProjection.split("EPSG:")[1]?tt.get(r.getRequestUrl(`${e.url}/tilefeature.mvt`),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(t){return e.isMvt=t.error&&400===t.error.code,e}).catch(()=>e):e)}getDatasetsInfo(e,t){let r=this;return r.getDatasources(e).then(function(s){let i=`${e}/data/datasources/${s}/datasets/${t}.json`;return tt.get(r.getRequestUrl(i),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(e){return{epsgCode:e.datasetInfo.prjCoordSys.epsgCode,bounds:e.datasetInfo.bounds,url:i}})})}isRestMapMapboxStyle(e){let t=e.dataSource,r=e.layerType;return!(!(t&&"EXTERNAL"===t.type&&t.url.indexOf("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY")>-1)||"MAPBOXSTYLE"!==r&&"VECTOR_TILE"!==r)}getMapboxStyleLayerInfo(e,t){let r=this;return new Promise((s,i)=>r.getMapLayerExtent(t).then(t=>r.getMapboxStyle(e,t).then(e=>{Object.assign(t,e),s(t)}).catch(e=>{i(e)})).catch(e=>{i(e)}))}getMapLayerExtent(e){let t=e.dataSource.url;this.isRestMapMapboxStyle(e)&&(t=t.replace("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY","")),t=this.getRequestUrl(t+".json");let r,s,i=e.credential;return i&&(t=`${t}?${s=Object.keys(i)[0]}=${r=i[s]}`),tt.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(t=>(e.visibleScales=t.visibleScales,e.coordUnit=t.coordUnit,e.scale=t.scale,e.epsgCode=t.prjCoordSys.epsgCode,e.bounds=t.bounds,e)).catch(e=>e)}getMapboxStyle(e,t){let r=this,s=t.url||t.dataSource.url,i=s;i.indexOf("/restjsr/")>-1&&(i=`${i}/style.json`),i=this.getRequestUrl(i);let a,n,o=t.credential;return o&&(n=Object.keys(o)[0],a=o[n],i=`${i}?${n}=${a}`),tt.get(i,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(i=>{r._matchStyleObject(i);let o=t.bounds;if(a){i.sprite=`${i.sprite}?${n}=${a}`;let e=i.sources;Object.keys(e).forEach(function(e){i.sources[e].tiles.forEach(function(t,r){i.sources[e].tiles[r]=`${t}?${n}=${a}`})})}let l={url:s,sourceType:"VECTOR_TILE",layerType:"VECTOR_TILE",styles:i,extent:o&&[o.left,o.bottom,o.right,o.top],bounds:t.bounds,projection:"EPSG:"+t.epsgCode,epsgCode:t.epsgCode,name:t.name};return Object.assign(t,l),t.zIndex>0&&r.modifyMapboxstyleLayer(e,t),t}).catch(e=>e)}modifyMapboxstyleLayer(e,t){let r=this;if(e.layers&&0===e.layers.length)return;let s=t.styles.layers;if(!s)return;s=s.filter(e=>"background"!==e.type),t.styles.layers=s;let i=e.layers.filter(e=>"VECTOR_TILE"===e.layerType&&e.zIndex!==t.zIndex).map(e=>e.styles&&e.styles.layers);!i||i&&0===i.length||i.forEach(e=>{s.forEach(t=>{r.renameLayerId(e,t)})})}renameLayerId(e,t){if(e.find(e=>e.id===t.id)){const r=t.id.match(/(.+)\((\w)\)$/);r?t.id=`${r[1]}(${+r[2]+1})`:t.id+="(1)",e.find(e=>e.id===t.id)&&this.renameLayerId(e,t)}}_matchStyleObject(e){let{sprite:t,glyphs:r}=e;t&&"object"==typeof t&&(e.sprite=Object.values(t)[0]),r&&"object"==typeof r&&(e.glyphs=Object.values(r)[0])}isIportalProxyServiceUrl(e){if(this.serviceProxy&&this.serviceProxy.enable&&e){let t="";return this.serviceProxy.proxyServerRootUrl?t=`${this.serviceProxy.proxyServerRootUrl}/`:this.serviceProxy.rootUrlPostfix?t=`${this.serviceProxy.port}/${this.serviceProxy.rootUrlPostfix}/`:this.serviceProxy.rootUrlPostfix||(t=`${this.serviceProxy.port}/`),80!==this.serviceProxy.port?e.indexOf(t)>=0:e.indexOf(t)>=0||e.indexOf(t.replace(":80",""))>=0}return!1}getStyleResolutions(e,t=0,r=22){let s=[];let i=Math.abs(e.left-e.right)/512;for(let e=t;e<=r;e++)0!==e?(i/=2,s[e]=i):s[e]=i;return s}createVisibleResolution(e,t,r,s){let i=[];if(e&&e.length>0)i=e.map(e=>{let t=1/e;return this.getResFromScale(t,s)});else{let e=this.getEnvelope(t,r);i=this.getStyleResolutions(e)}return i}getEnvelope(e,t){let r={};return e&&4===e.length?(r.left=e[0],r.bottom=e[1],r.right=e[2],r.top=e[3]):r=t,r}createMVTLayer(e){let t=e.styles;const r=t&&t.metadata&&t.metadata.indexbounds,s=this.createVisibleResolution(e.visibleScales,r,e.bounds,e.coordUnit),i=this.getEnvelope(r,e.bounds),a=this.getStyleResolutions(i);let n=this.isIportalProxyServiceUrl(t.sprite),o=new kd({style:t,source:t.name,resolutions:a,map:this.map,withCredentials:n});return new Promise(r=>{o.on("styleloaded",function(){let i=s[s.length-1],a=s[0],l=new np.VectorTile({declutter:!0,source:new Od({style:t,withCredentials:n,projection:e.projection,format:new Ed.a({featureClass:dp.a}),wrapX:!1}),style:o.featureStyleFuntion,visible:e.visible,zIndex:e.zIndex,opacity:e.opacity,minResolution:i,maxResolution:a>1?Math.ceil(a):1.1*a});r(l)})})}isSameDomain(e){let t=e.split("://")[1],r=t.indexOf("/"),s=t.substring(0,r),i=document.location.toString().split("://")[1],a=i.indexOf("/"),n=i.substring(0,a);if(s.indexOf(":")>-1||""!==window.location.port)return s===n;{let e=s.split("."),t=n.split(".");return e[1]===t[1]&&e[2]===t[2]}}isIE(){return!!(window.ActiveXObject||"ActiveXObject"in window)}isFirefox(){return navigator.userAgent.indexOf("Firefox")>-1}isChrome(){return navigator.userAgent.indexOf("Chrome")>-1}getFirefoxVersion(){return+navigator.userAgent.toLowerCase().match(/firefox\/([\d.]+)/)[1]}getChromeVersion(){return+navigator.userAgent.toLowerCase().match(/chrome\/([\d.]+)/)[1]}} /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/if(window&&window.ol){let e=window.ol;e.supermap=window.ol.supermap||{},e.supermap.control=window.ol.supermap.control||{},e.supermap.control.ChangeTileVersion=mo,e.supermap.control.Logo=xo,e.supermap.control.ScaleLine=bo,e.supermap.StyleUtils=cl,e.supermap.Util=Wo,e.source.BaiduMap=Cl,e.source.ImageSuperMapRest=wl,e.source.SuperMapCloud=Al,e.source.Tianditu=Nl,e.source.TileSuperMapRest=Rl,e.supermap.WebMap=Sp,e.style.CloverShape=qc,e.Graphic=ed,e.style.HitCloverShape=Wc,e.source.GeoFeature=hd,e.source.Theme=Vc,e.supermap.ThemeFeature=Bc,e.supermap.MapboxStyles=kd,e.supermap.VectorTileStyles=Td,e.source.DataFlow=Gc,e.source.Graph=Hc,e.source.Graphic=ld,e.source.HeatMap=Ld,e.source.Label=ud,e.source.Mapv=gd,e.source.Range=vd,e.source.RankSymbol=Sd,e.source.Turf=xd,e.source.Unique=Cd,e.source.VectorTileSuperMapRest=Od,e.supermap.AddressMatchService=Gd,e.supermap.ChartService=Bd,e.supermap.DataFlowService=kc,e.supermap.FeatureService=Fo,e.supermap.FieldService=Ud,e.supermap.GridCellInfosService=jd,e.supermap.GeoprocessingService=Vd,e.supermap.LayerInfoService=Hd,e.supermap.MapService=uo,e.supermap.MeasureService=Jd,e.supermap.NetworkAnalyst3DService=zd,e.supermap.NetworkAnalystService=qd,e.supermap.ProcessingService=Wd,e.supermap.QueryService=Ro,e.supermap.ServiceBase=a,e.supermap.SpatialAnalystService=Yd,e.supermap.ThemeService=Xd,e.supermap.TrafficTransferAnalystService=Qd,e.supermap.WebPrintingJobService=Kd}},function(e,t){},,function(e,t){}]);