earthsdk3 3.4.0-beta.22 → 3.4.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/earthsdk3.iife.js +7 -7
- package/dist/earthsdk3.js +778 -736
- package/dist/earthsdk3.umd.cjs +8 -8
- package/dist/types/ESObjectManager/SceneObjectsManager.d.ts +7 -0
- package/dist/types/ESObjectManager/SceneObjectsManager.d.ts.map +1 -1
- package/dist/types/ESObjectManager/index.d.ts +7 -0
- package/dist/types/ESObjectManager/index.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts +1 -0
- package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESSceneObject/index.d.ts +4 -0
- package/dist/types/ESObjects/base/ESSceneObject/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoJson/index.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeoJson/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/earthsdk3.iife.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var EarthSDK3=function(M,p){"use strict";var RM=Object.defineProperty;var FM=(M,p,Zo)=>p in M?RM(M,p,{enumerable:!0,configurable:!0,writable:!0,value:Zo}):M[p]=Zo;var g=(M,p,Zo)=>FM(M,typeof p!="symbol"?p+"":p,Zo);function Zo(){const n=navigator.userAgent;let t="Unknown";/Windows/.test(n)?t="Windows":/Macintosh/.test(n)?t="MacOS":/Linux/.test(n)?t="Linux":/Android/.test(n)?t="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const gy=Date.now();function Fg(n){const{os:t,arch:e}=Zo(),r={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-gy)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(r));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}M.copyright=void 0;try{const n="earthsdk3",t="3.4.0-beta.
|
|
1
|
+
var EarthSDK3=function(M,p){"use strict";var RM=Object.defineProperty;var FM=(M,p,Zo)=>p in M?RM(M,p,{enumerable:!0,configurable:!0,writable:!0,value:Zo}):M[p]=Zo;var g=(M,p,Zo)=>FM(M,typeof p!="symbol"?p+"":p,Zo);function Zo(){const n=navigator.userAgent;let t="Unknown";/Windows/.test(n)?t="Windows":/Macintosh/.test(n)?t="MacOS":/Linux/.test(n)?t="Linux":/Android/.test(n)?t="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const gy=Date.now();function Fg(n){const{os:t,arch:e}=Zo(),r={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-gy)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(r));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}M.copyright=void 0;try{const n="earthsdk3",t="3.4.0-beta.23",e="2025-09-12T03:50:09.000Z",r="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="feca93890b3042c1cb64b9d07335c6a13715edb1",a=((Date.now()-1757649009e3)/36e5).toFixed(1),u=`%c🌏 ${n}%c ${t}.${s.slice(0,8)}.${e} (距今${a}个小时)
|
|
2
2
|
%c${i?i+`
|
|
3
3
|
`:""}当前网站正在使用${n},此软件版权归${r}所有
|
|
4
|
-
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4
|
+
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","feca93890b3042c1cb64b9d07335c6a13715edb1")},get info(){return u},get date(){return"2025-09-12T03:50:09.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.23"},get name(){return"earthsdk3"},get commitId(){return"feca93890b3042c1cb64b9d07335c6a13715edb1"},print(){console.info(this.info,`
|
|
5
5
|
font-size: 18px;
|
|
6
6
|
font-weight: 1000;
|
|
7
7
|
line-height: 1;
|
|
@@ -20,7 +20,7 @@ var EarthSDK3=function(M,p){"use strict";var RM=Object.defineProperty;var FM=(M,
|
|
|
20
20
|
padding-left: 35px;
|
|
21
21
|
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[n]=M.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>Fg(M.copyright),6e4),setInterval(()=>Fg(M.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&M.copyright.print()}catch{console.warn("版本信息有误!")}function py(){return!0}function vy(){throw new Error("throwOnDestroyed")}function Gg(n){for(var t in n)typeof n[t]=="function"&&(n[t]=vy);n.isDestroyed=py}const fc=class fc{constructor(){g(this,"_memId",++fc._lastMemId);g(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(t){return this.disposers.push(t),t}d(t){return this.dispose(t)}disposeVar(t){return this.disposers.push(()=>t.destroy()),t}dv(t){return this.disposeVar(t)}tryDisposeVar(t){return this.disposers.push(()=>t.tryDestroy()),t}tdv(t){return this.tryDisposeVar(t)}autoDispose(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}ad(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const t=this._disposers,e=t.length;for(let r=e-1;r>=0;--r)t[r]();t.length=0,this._disposers=void 0}catch(t){console.error(`destroy get error! ${t}`)}return Gg(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};g(fc,"_lastMemId",-1);let st=fc,Ic;function kg(n){Ic=n}Object.defineProperties(st.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!Ic)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new Ic)}return this._toDestroyEvent}}});class Mc{constructor(t,e,r=!1){g(this,"_freeElements");g(this,"_usedElementsCount");g(this,"_usedElements");g(this,"_nextCreateID");g(this,"_scratchObjs");this._createDefaultFunc=t,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],r&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let t;return this._freeElements.length>0?t=this._freeElements.pop():t=this._createDefaultFunc&&this._createDefaultFunc()||{},t._cid=this._getCreateID(),t}create(){return this._create()}multiCreate(t){this._scratchObjs.length=0;for(let e=0;e<t;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(t){this._destroyFunc&&this._destroyFunc(t),t._cid=void 0}destroy(...t){const e=t.length;for(let r=0;r<e;++r)this._destroy(t[r])}}function my(){return{item:void 0,previous:void 0,next:void 0}}function yy(n){n.item=void 0,n.previous=void 0,n.next=void 0}const Vg=new Mc(my,yy,!0);function bc(n,t,e){const r=Vg.create();return r.item=n,r.previous=t,r.next=e,r}function Ug(n){if(!n)throw new Error("node is undefined!");Vg.destroy(n)}function Nc(n,t){t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=void 0,n.tail=t.previous):t.next?(t.next.previous=void 0,n.head=t.next):(n.head=void 0,n.tail=void 0),t.next=void 0,t.previous=void 0}class zg{constructor(t){g(this,"head");g(this,"tail");g(this,"_length");const{needLength:e}=t||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(t){typeof this._length=="number"&&(this._length=t)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let t=this.head;for(;t;)yield t,t=t.next}remove(t){if(!t)throw new Error("node is undefined!");Nc(this,t),this._decrementLength(),Ug(t)}getNode(t){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===t)return e;e=e.next}}moveAfter(t,e){if(t!==e){Nc(this,e);var r=t.next;t.next=e,this.tail===t?this.tail=e:r&&(r.previous=e),e.next=r,e.previous=t}}moveBefore(t,e){if(t!==e){Nc(this,e);var r=t.previous;t.previous=e,this.head===t?this.head=e:r&&(r.next=e),e.previous=r,e.next=t}}insertBefore(t,e){const r=bc(e,t.previous,t);return t.previous&&(t.previous.next=r),t.previous=r,this.head===t&&(this.head=r),this._incrementLength(),r}insertAfter(t,e){const r=bc(e,t,t.next);return t.next&&(t.next.previous=r),t.next=r,this.tail===t&&(this.tail=r),this._incrementLength(),r}_setFirstNode(t){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=bc(t,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(t){return this.tail?this.insertAfter(this.tail,t):this._setFirstNode(t)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const t=this.tail.item;return this.remove(this.tail),t}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const t=this.head.item;return this.remove(this.head),t}unshift(t){return this.head?this.insertBefore(this.head,t):this._setFirstNode(t)}removeAll(){let t=this.head;for(;t;){const e=t.next;Ug(t),t=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}const qg=new Set;function Wg(n,t=n){qg.has(t)||(qg.add(t),console.warn(n))}function _y(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function wy(n){n.func=void 0,n.scope=void 0,n._hasRemoved=!1,n._once=!1}const so=new Mc(_y,wy,!0);class xc{constructor(){g(this,"__dll");g(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new zg({needLength:!0}),this.__dll}_pushCurrentListener(t){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(t):this.__currentListenerStack=[this.__currentListenerStack,t]:this.__currentListenerStack=t}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(t){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(t)!==-1:this.__currentListenerStack===t:!1}do(...t){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const r=e.item;r._hasRemoved||(this._pushCurrentListener(r),r.func.call(r.scope,...t),this._popCurrentListener());const i=e.next;r._once&&!r._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let t=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){t=!1;break}e=e.next}return t}isHandlerValid(t){return!t.item._hasRemoved}nextHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(t,e)}moveBefore(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(t,e)}insertBefore(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=so.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertBefore(t,s)}insertAfter(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=so.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertAfter(t,s)}_clearHasRemoved(t){t.item._hasRemoved&&!this._hasCurrentListener(t.item)&&(so.destroy(t.item),this._dll.remove(t))}remove(t){if(!t.item||t.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(t.item)?t.item._hasRemoved=!0:(so.destroy(t.item),this._dll.remove(t))}removeAll(){if(this.__dll&&!this._dll.empty){let t=this._dll.head;for(;t;){const e=t.next;t.item._hasRemoved||this.remove(t),t=e}}}destroy(){if(!this.__dll)return;let t=this._dll.head;for(;t;){const e=t.next,r=t;this._hasCurrentListener(r.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${r.item.func.toString()}`)),so.destroy(r.item),this._dll.remove(r),t=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(t,e,r=!1){const i=so.create();return i.func=t,i.scope=e,i._once=r,this._dll.push(i)}pop(){const t=this.tail;if(!t)throw new Error("pop error!");this.remove(t)}shift(){const t=this.head;if(!t)throw new Error("shift error!");this.remove(t)}unshift(t,e,r=!1){const i=so.create();return i.func=t,i.scope=e,i._once=r,this._dll.unshift(i)}get tail(){let t=this._dll.tail;for(;t&&t.item._hasRemoved;)t=t.previous;return t}get head(){let t=this._dll.head;for(;t&&t.item._hasRemoved;)t=t.previous;return t}}class Tu{constructor(){g(this,"_listenerHandler");g(this,"_cid")}_reset(t,e){this._listenerHandler=t,this._cid=e}clone(t){return t=t??new Tu,t._reset(this._listenerHandler,this._cid),t}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const t=this._listenerHandler._cid;if(typeof t<"u"&&this._cid===t)return!0}return!1}}class Tc extends Tu{}let H=class extends st{constructor(){super(...arguments);g(this,"__pipe");g(this,"beforeCallback");g(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new xc,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!1):this._pipe.push(e,r,!1);return s=s??new Tc,s._reset(o,o._cid),s}disposableOn(e,r,i=!1,s){const o=this.on(e,r,i,s);return()=>{o.valid&&this.off(o)}}don(e,r,i=!1,s){return this.disposableOn(e,r,i,s)}disposableWeakOn(e,r,i=!1,s){const o=new st,a=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,r,i,s)),o.dispose(this.toDestroyEvent.disposableOn(a)),a}dwon(e,r,i=!1,s){return this.disposableWeakOn(e,r,i,s)}once(e,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!0):this._pipe.push(e,r,!0);return s=s??new Tc,s._reset(o,o._cid),s}disposableOnce(e,r,i=!1,s){const o=this.once(e,r,i,s);return()=>o.valid&&this.off(o)}donce(e,r,i=!1,s){const o=this.once(e,r,i,s);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(Wg("The event is destroying with listeners!"),this._pipe.removeAll())}};kg(H);function ta(n,t){return t=t??new Tu,t._reset(n,n._cid),t}class Ey{constructor(){g(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new xc,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...t){return this._pipe.do(...t)}isHandlerValid(t){return t.valid?this._pipe.isHandlerValid(t._listenerHandler):!1}moveAfter(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}moveBefore(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}insertBefore(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(t._listenerHandler,e,r,i);return ta(o,s)}insertAfter(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(t._listenerHandler,e,r,i);return ta(o,s)}remove(t){if(!t.valid)throw new Error("handler is not valid!");return this._pipe.remove(t._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(t,e,r=!1,i){const s=this._pipe.push(t,e,r);return ta(s,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(t,e,r=!1,i){const s=this._pipe.unshift(t,e,r);return ta(s,i)}getTail(t){const e=this._pipe.tail;if(e)return ta(e,t)}getHead(t){const e=this._pipe.head;if(e)return ta(e,t)}}function Sy(n,t,...e){const r=setInterval(n,t,...e);return()=>clearInterval(r)}function Cy(n,t,...e){const r=setTimeout(n,t,...e);return()=>clearTimeout(r)}function Py(n,...t){let e;const r=()=>{const i=performance.now();n(i,...t),e=requestAnimationFrame(r)};return r(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Hg(n,...t){let e;return e=requestAnimationFrame(()=>{const i=performance.now();n(i,...t)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Iy(n,...t){let e=!1,r;return new Promise((i,s)=>{r=s,i()}).then(()=>{!e&&n(...t)}).catch(i=>{console.error(i)}),()=>(e=!0)&&r&&(r("nextMicroTask cancelled!"),r=void 0)}class My extends H{constructor(e,r,...i){super();g(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(s=>this.dispose(s[r?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class Xg extends My{constructor(...t){super(Hg,!1,...t)}}function ea(n,t,e={time:"don",immediate:!1}){const r=new Xg(...Array.isArray(n)?n:[n]),i=r[e.time??"don"](t);return(e.immediate??!1)&&t(),()=>{i(),r.destroy()}}function by(n,t,e){typeof e>"u"&&(t.endsWith(".gltf")?e="model/gltf+json":t.endsWith(".bin")?e="application/octet-stream":t.endsWith(".glb")?e="model/gltf-binary":t.endsWith(".jpg")||t.endsWith(".jpeg")?e="image/jpeg":t.endsWith(".png")?e="image/png":t.endsWith(".glsl")?e="text/plain":t.endsWith(".json")?e="application/json":t.endsWith(".b3dm")||t.endsWith(".i3dm")||t.endsWith("pnts")||t.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${t}: MimeType无法确定!`));const r=new Blob([n],{type:e||""});let i=URL.createObjectURL(r);var s=document.createElement("a"),o=new MouseEvent("click");s.download=t,s.href=i,s.dispatchEvent(o),URL.revokeObjectURL(i)}function Ny(n,t){const e=document.createElement("a"),r=new MouseEvent("click");e.download=t||"下载",e.href=n,e.dispatchEvent(r)}const dc=class dc extends st{constructor(){super();g(this,"_set",new Set);g(this,"_toChangeEvent",this.disposeVar(new H));g(this,"_changedEvent",this.disposeVar(new H));g(this,"main");this.dispose(()=>{this._set.size!==0&&(dc.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...e){if(e.length==2&&typeof e[1]=="boolean")e[1]&&(this.main=e[0]);else for(let r of e)this._toChangeEvent.emit([],[r]),this._set.add(r),this._changedEvent.emit([],[r])}delete(...e){for(let r of e)this.main&&this.main==r&&(this.main=void 0),this._toChangeEvent.emit([r],[]),this._set.delete(r),this._changedEvent.emit([r],[])}disposableAdd(...e){return e.length==2&&typeof e[1]=="boolean"?(e[1]&&(this.main=e[0]),this.add(e[0]),()=>this.delete(e[0])):(this.add(...e),()=>this.delete(...e))}get size(){return this._set.size}clear(){const e=[...this._set];this._toChangeEvent.emit([],e),this._set.clear(),this._changedEvent.emit([],e)}values(){return this._set.values()}};g(dc,"warnOnDestroying",!0);let jl=dc;class xy extends st{constructor(){super(...arguments);g(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;return s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s,r}getEngineObjConstructor(e,r){const i=this.registerEngines[r];if(!i)return;let s=e.constructor,o=e.typeName,a=i.get(o);if(a)return a;if(e.components.main)return;const u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${r}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(e,r){const i=this.getEngineObjConstructor(e,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new oo(e,r);return s.createdEvent.emit(),s}}}class Ty extends st{constructor(){super(...arguments);g(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s}getEngineObjConstructor(e,r){const s=(this.registerEngines[r]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${r}中对应的实现类!`)}createEngineObject(e,r){const i=this.getEngineObjConstructor(e.typeName,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new oo(e,r);return s.createdEvent.emit(),s}}}const Hn=class Hn extends st{constructor(e,r,i=!1){super();g(this,"_createdEvent",this.dv(new H));g(this,"_id",++Hn._accumId);this._sceneObject=e,this._viewer=r;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};g(Hn,"context",new xy),g(Hn,"contextEditing",new Ty),g(Hn,"register",Hn.context.register.bind(Hn.context)),g(Hn,"registerEditing",Hn.contextEditing.register.bind(Hn.contextEditing)),g(Hn,"_accumId",-1);let oo=Hn;const gc=class gc extends st{constructor(e,r){super();g(this,"_id",++gc._accumId);this._name=e,this._description=r}get id(){return this._id}get name(){return this._name}get description(){return this._description}};g(gc,"_accumId",-1);let Ss=gc;class Ac extends Ss{constructor(t,e,r,i,s){super(t,e),this._withUndefined=r,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Ot extends Ac{constructor(t,e,r,i,s,o){const a=t instanceof p.ReactiveVariable?"未获取到属性名":t[1].toString();super(e??a,o??a,i??!1,s??!1,r),this._reactVar=t}get reactVar(){return this._reactVar}}class tt extends Ot{get type(){return"BooleanProperty"}}class Et extends Ot{get type(){return"StringProperty"}}class R extends Ot{get type(){return"NumberProperty"}}class Ay extends Ot{get type(){return"MaximumScreenSpaceErrorProperty"}}class Bg extends Ot{get type(){return"StringsProperty"}}class Oy extends Ot{get type(){return"NumbersProperty"}}class Dy extends Ot{get type(){return"BooleansProperty"}}class Ly extends Ot{get type(){return"String2Property"}}class Ry extends Ot{get type(){return"String3Property"}}class Fy extends Ot{get type(){return"String4Property"}}class Yg extends Ot{get type(){return"String2sProperty"}}class Gy extends Ot{get type(){return"String3sProperty"}}class ky extends Ot{get type(){return"String4sProperty"}}class We extends Ot{get type(){return"Number2Property"}}class pr extends Ot{get type(){return"Number3Property"}}class $n extends Ot{get type(){return"Number4Property"}}class Vy extends Ot{get type(){return"Number4WithUndefinedProperty"}}class Jg extends Ot{get type(){return"Number2sProperty"}}class Oc extends Ot{get type(){return"Number3sProperty"}}class Uy extends Ot{get type(){return"Number4sProperty"}}class zy extends Ot{get type(){return"Boolean2Property"}}class qy extends Ot{get type(){return"Boolean3Property"}}class Wy extends Ot{get type(){return"Boolean4Property"}}class Hy extends Ot{get type(){return"Boolean2sProperty"}}class Xy extends Ot{get type(){return"Boolean3sProperty"}}class By extends Ot{get type(){return"Boolean4sProperty"}}class Yy extends Ot{get type(){return"StringNumberProperty"}}class Jy extends Ot{get type(){return"StringNumbersProperty"}}class Gt extends $n{get type(){return"ColorProperty"}}class jy extends pr{get type(){return"ColorRgbProperty"}}class Qy extends R{get type(){return"DashPatternProperty"}}class Tt extends Ot{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class Ky extends Ot{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Cs extends Ot{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class jg extends Ot{constructor(t,e,r,i,s){super(t,e,i,!1,!1,s),this._paramTypes=r}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class mt extends Ss{constructor(e,r,i,s,o){const a=s??"Unnamed Function";super(a,o??a);g(this,"_paramsProperty");g(this,"_getValueFunc");this._func=r;const u=this.disposeVar(p.reactJson(i));this._paramsProperty=this.disposeVar(new jg(u,a+"_params",e,i));const[l]=p.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class vt extends Ss{constructor(t,e,r){const i=e??"分组";super(i,r??i),this._children=t}get type(){return"GroupProperty"}get children(){return this._children}}class ht extends Ot{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class Dc extends Ot{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class $y extends We{get type(){return"MinmaxProperty"}}class Zy extends $n{get type(){return"NearFarScalerProperty"}}class Qg extends Ac{constructor(t,e,r,i,s,o,a){const u=r??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=t,this._setJsonStringFunc=e}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class t_ extends We{get type(){return"NumberRangeProperty"}}class je extends Ot{constructor(t,e,r,i,s,o,a,u){super(t,i,s,o,a,u),this._step=e,this._minMax=r}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function e_(n,t){const[e,r,i]=p.getReactFuncs(n),[s,o,a]=p.getReactFuncs(t),u=p.react((e()??0)/(s()??3e3)),l=()=>{const c=u.value,h=s()??3e3,f=e()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||(h<=0?u.value=0:u.value=f/h)};return u.dispose(i.disposableOn(l)),u.dispose(a.disposableOn(l)),u.dispose(u.changed.disposableOn(()=>{const c=u.value,h=s()??3e3,f=e()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||r(c*h)})),u}class Ql extends Ss{constructor(e,r,i,s,o,a){super(s??"播放器",a??"播放器");g(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}g(Ql,"createPlayingRatio",e_);class ra extends pr{get type(){return"PositionProperty"}}class Kg extends Ot{get type(){return"PositionsProperty"}}class r_ extends Ot{get type(){return"PositionsSetPropety"}}class Lc extends pr{get type(){return"RotationProperty"}}class Au extends Et{get type(){return"UriProperty"}}class $g extends Ss{constructor(e,r,i,s,o,a){const u=s??"视角播放器";super(u,a??u);g(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class Zg extends Ot{get type(){return"DatesProperty"}}class ao extends Ot{get type(){return"DateProperty"}}var ct=(n=>(n.Place="place",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n))(ct||{}),tp=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(tp||{});class n_{constructor(t){this.childPickedInfo=t}}class i_{constructor(t,e,r,i,s,o){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=r,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class s_ extends st{constructor(e){super();g(this,"_sceneObjRefs",new Map);g(this,"_refs",{});g(this,"_refsChanged",this.dv(new H));const r=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const c=u.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(c,1),u.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
22
22
|
${u.map(c=>`${c.id} ${c.typeName}
|
|
23
|
-
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const l=this.getLastSceneObject(s);this._refs[s]=l,this._refsChanged.emit(l,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>r(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&r(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const r=this.getSceneObjects(e);if(r)return r[r.length-1]}getSceneObjects(e){const r=this._sceneObjRefs.get(e);if(!(!r||r.length===0))return r}}function ep(n,t){const[e,r,i]=p.getReactFuncs(n),s=p.react(void 0),o=()=>{const a=e()??t;s.value=a&&ft.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(ft.context.environmentVariablesChanged.don(o)),s}function rp(n){const t=/\${(.*?)\}/g;if(!t.test(n))return n;const e=n.replace(t,(r,i)=>{const s=ft.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return rp(e)}class o_ extends st{constructor(){super();g(this,"_esObjConstructors",new Map);g(this,"_sceneObjs",new Map);g(this,"_sceneObjCreatedEvent",new H);g(this,"_sceneObjToDestroyEvent",new H);g(this,"_refsManager",this.dv(new s_(this)));g(this,"_environmentVariables",window.ESSDK_ENV||{});g(this,"_environmentVariablesChanged",this.dv(new H))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,r,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,r),i&&p.setExtProp(r,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,r){if(!r||this._sceneObjs.has(r)){const s=p.createGuid();r&&console.warn(`已存在相同id的对象!id自动变更!${r} -> ${s} 请注意:id变更可能导致引用失效!`),r=s}if(!r)throw new Error("id不能为空!");const i=new e(r);return i.id!==r&&(console.warn(`sceneObj.id(${i.id}) !== id(${r}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,r){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,r)}else return this.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){const r=this.createSceneObject(e.type,e.id);return r&&(r.json=e),r}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const r=[];for(const i of this._sceneObjs.values())i.typeName===e&&r.push(i);return r}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const r=this._esObjConstructors.get(e);if(r)return r}getProps(e){const r=this._getSceneObjConstructor(e);if(!r){console.warn(`cannot get constructor from type: ${e}`);return}return p.getExtProp(r,"__sceneObjExtraInfo")}setProps(e,r){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=p.getExtProp(i,"__sceneObjExtraInfo");s||(s={},p.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,r)}getProp(e,r){const i=this.getProps(e);return i&&i[r]}setProp(e,r,i){this.setProps(e,{[r]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[r,i]of Object.entries(e))this.setEnv(r,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,r){if(this._environmentVariables[e]!==r){const i=this._environmentVariables[e];this._environmentVariables[e]=r,this._environmentVariablesChanged.emit(e,r,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return rp(e)}createEnvStrReact(e,r){return ep(e,r)}createEvnStrReact(e,r){return ep(e,r)}}const Mt=class Mt extends st{constructor(e){super();g(this,"_components",this.dv(new jl));g(this,"_viewerAttached",this.dv(new H));g(this,"_viewerDetached",this.dv(new H));g(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(r=>{r.actived&&(this.activeViewer=r),r.ad(r.activedChanged.don(i=>{i&&e.has(r)&&(this.activeViewer=r)})),e.add(r)})),this.d(this._viewerDetached.don(r=>{e.delete(r),this.activeViewer==r&&(this.activeViewer=void 0)})),e})());g(this,"_activeViewer",this.disposeVar(p.react(void 0)));g(this,"_createdEvent",this.dv(new H));g(this,"_flushEvent",this.dv(new H));g(this,"_id");g(this,"_updateFuncReact",this.dv(p.react(void 0)));g(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));g(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??p.createGuid(),this._initName();{const r=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};r(),this.d(this.execOnceFuncStrChanged.don(r))}{const r=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};r(),this.d(this.updateFuncStrChanged.don(r));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||p.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const r=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};r(),this.d(this.toDestroyFuncStrChanged.don(r)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,r,i){p.extendClassProps(r.prototype,r.createDefaultProps);const s=r.createDefaultProps();r.defaults&&(r.defaults={});for(const o of Object.keys(s))r.defaults[o]=s[o]instanceof p.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,r,i),e}static get envs(){return Mt.context.environmentVariables}static get $refs(){return Mt.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const r=new Map;this.d(()=>{r.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&r.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!r.has(i))return;const s=r.get(i);s&&(s.destroy(),r.delete(i))}))}createAttachedObject(e){const r=new Map,i=()=>{for(let[u,l]of r.entries())l.destroy();r.clear()},s=u=>{const l=e(u);l&&r.set(u,l)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!r.has(u))return;const l=r.get(u);l&&(l.destroy(),r.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(r=>new a_(r,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_innerSetJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new vt(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new vt(r[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new Et([this,"typeName"],"类型",void 0,!1,!0),new Et([this,"id"],"唯一标识",void 0,!1,!0),new Et([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new Et([this,"ref"],"ref",void 0,!0),new ht([this,"extras"],"extras",void 0,void 0,!0),new Qg(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};g(Mt,"context",new o_),g(Mt,"innerRegister",Mt.context.register.bind(Mt.context)),g(Mt,"defaults",{}),g(Mt,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),g(Mt,"type",Mt.register("ESSceneObject",Mt,{chsName:"场景类",tags:["ESObjects"],description:""})),g(Mt,"create",Mt.context.createSceneObject.bind(Mt.context)),g(Mt,"createFromClass",Mt.context.createSceneObjectFromClass.bind(Mt.context)),g(Mt,"createFromJson",Mt.context.createSceneObjectFromJson.bind(Mt.context)),g(Mt,"destroySceneObject",Mt.context.destroySceneObject.bind(Mt.context)),g(Mt,"getSceneObjById",Mt.context.getSceneObjectById.bind(Mt.context)),g(Mt,"getSceneObj",Mt.context.getSceneObject.bind(Mt.context)),g(Mt,"getEnv",Mt.context.getEnv.bind(Mt.context)),g(Mt,"setEnv",Mt.context.setEnv.bind(Mt.context)),g(Mt,"getStrFromEnv",Mt.context.getStrFromEnv.bind(Mt.context)),g(Mt,"getSceneObjectById",Mt.context.getSceneObjectById.bind(Mt.context)),g(Mt,"getSceneObject",Mt.context.getSceneObject.bind(Mt.context));let ft=Mt;class a_ extends st{constructor(t,e){super(),this.dv(new p.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const xe=class xe extends ft{constructor(e){super(e);g(this,"_editing",this.dv(p.react(!1)));g(this,"editingID");g(this,"editingBindMode","singlePoint");g(this,"_deprecated",[]);g(this,"_flyInEvent",this.dv(new H));g(this,"_flyToEvent",this.dv(new H));g(this,"_flyOverEvent",this.disposeVar(new H));g(this,"_pickedEvent",this.dv(new H));g(this,"_calcFlyToParamEvent",this.dv(new H));g(this,"_calcFlyInParamEvent",this.dv(new H));g(this,"useCalcFlyToParamInESObjectWithLocation",!1);ap(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let r=0;r<e.length;r++){const i=e[r];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach(l=>{a===l&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${u[l]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,xe._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,xe._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new tt([this,"show"],"是否显示",xe.defaults.show),new tt([this,"collision"],"开启碰撞",xe.defaults.collision),new tt([this,"allowPicking"],"允许拾取",xe.defaults.allowPicking),new mt([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new mt([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new mt([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new mt([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new vt([],"飞行定位","飞向参数"),new mt(["number"],r=>this.flyTo(r),[1],"飞向"),new ht([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new R([this,"flyToDistance"],"flyToDistance",void 0,!0),new R([this,"flyToHeading"],"flyToHeading",void 0,!0),new R([this,"flyToPitch"],"flyToPitch",void 0,!0),new R([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new R([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new R([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new vt([],"飞入参数"),new mt(["number"],r=>this.flyIn(r),[1],"飞入"),new ht([this,"flyInParam"],"flyInParam",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,pDelta:e}:void 0}};g(xe,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:p.reactJsonWithUndefined(void 0),flyInParam:p.reactJsonWithUndefined(void 0)})),g(xe,"type",xe.register("ESVisualObject",xe,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),g(xe,"supportEditingModes",[]),g(xe,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),g(xe,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),g(xe,"_lastFlyInId",0),g(xe,"_lastFlyToId",0);let ee=xe;class np extends st{constructor(){super();g(this,"_data",this.dv(p.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class ip extends st{constructor(){super(...arguments);g(this,"_dragStartEvent",this.dv(new H));g(this,"_dragOverEvent",this.dv(new H));g(this,"_dragLeaveEvent",this.dv(new H));g(this,"_dropEvent",this.dv(new H))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function u_(n,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function l_(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function Kl(n,t){p.getExtProp(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),p.setExtProp(n,"__treeItem",t)}function h_(n){return p.getExtProp(n,"__treeItem")}function c_(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const t=document.createElement("a");t.href=n;const e=t.href;return t.remove(),e}function Rc(n){if(typeof n!="string")return!1;try{const t=JSON.parse(n);return typeof t=="object"&&t!==null}catch{return!1}}function f_(n){try{return new DOMParser().parseFromString(n,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function d_(n){return n instanceof Function?n():n}function sp(n,t){for(let e of n)if(t.includes(e))return!0;return!1}function $i(n,t){const e=n,r=t;return e===void 0||e.length===0||r===void 0||r.length===0?!0:sp(e,r)}function g_(n){const t=setTimeout(()=>{n(),clearTimeout(t)})}function na(n){let t=n%360;return t=t<0?360+t:t,t}function op(n){return na(n+180)-180}function $l(n,t,e){let r=na(n),i=na(t);Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const s=r*(1-e)+i*e;return op(s)}function Fc(n,t,e,r){return r=r||[0,0,0],r[0]=$l(n[0],t[0],e),r[1]=$l(n[1],t[1],e),r[2]=$l(n[2],t[2],e),r}function ap(n,t,e="editing"){const r=new st;n.ad(r);const i=t.bind(n);return r.ad(new p.ObjResettingWithEvent(n.activeViewerChanged,()=>{const s=new st;let o=n.activeViewer;return o?(s.ad(n[`${e}Changed`].don(()=>{var a;n[`${e}`]?i():(a=(n.components.main??n).editingID)!=null&&a.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(n.id)&&a.type==="end"){const u=n.components.main??n;u.editingID&&a.editingID.includes(u.editingID)?n[`${e}`]=!1:n[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),s})),n[`${e}`]&&i(),r}class p_ extends st{constructor(e,r,i,s){super();g(this,"_sceneObjectId",this.dv(new p.SceneObjectWithId));this._id=e,this._startTimeStamp=r,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=p.clamp(u,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof Zn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const v_=`
|
|
23
|
+
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const l=this.getLastSceneObject(s);this._refs[s]=l,this._refsChanged.emit(l,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>r(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&r(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const r=this.getSceneObjects(e);if(r)return r[r.length-1]}getSceneObjects(e){const r=this._sceneObjRefs.get(e);if(!(!r||r.length===0))return r}}function ep(n,t){const[e,r,i]=p.getReactFuncs(n),s=p.react(void 0),o=()=>{const a=e()??t;s.value=a&&ft.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(ft.context.environmentVariablesChanged.don(o)),s}function rp(n){const t=/\${(.*?)\}/g;if(!t.test(n))return n;const e=n.replace(t,(r,i)=>{const s=ft.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return rp(e)}class o_ extends st{constructor(){super();g(this,"_esObjConstructors",new Map);g(this,"_sceneObjs",new Map);g(this,"_sceneObjCreatedEvent",new H);g(this,"_sceneObjToDestroyEvent",new H);g(this,"_refsManager",this.dv(new s_(this)));g(this,"_environmentVariables",window.ESSDK_ENV||{});g(this,"_environmentVariablesChanged",this.dv(new H))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,r,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,r),i&&p.setExtProp(r,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,r){if(!r||this._sceneObjs.has(r)){const s=p.createGuid();r&&console.warn(`已存在相同id的对象!id自动变更!${r} -> ${s} 请注意:id变更可能导致引用失效!`),r=s}if(!r)throw new Error("id不能为空!");const i=new e(r);return i.id!==r&&(console.warn(`sceneObj.id(${i.id}) !== id(${r}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,r){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,r)}else return this.createSceneObjectFromClass(e,r)}createSceneObjectFromUrl(e,r){let i;const s=e.toLowerCase();if(s.includes(".gltf")||s.includes(".glb")?i="ESGltfModel":s.includes("tileset.json")?i="ES3DTileset":s.includes("layer.json")||s.includes("ion://1")?i="ESTerrainLayer":s.includes(".jpg")||s.includes(".png")||s.includes(".jpeg")||s.includes(".webp")||s.includes("image/jpg")||s.includes("image/png")||s.includes("image/jpeg")||s.includes("image/webp")?i="ESImageLabel":(s.includes("/tilemapresource.xml")||s.includes("ion://")||s.includes("wms")||s.includes("wmts")||s.includes("{x}")||s.includes("{y}")||s.includes("{z}"))&&(i="ESImageryLayer"),!!i)return this.createSceneObjectFromJson({type:i,id:r,url:e})}createSceneObjectFromJson(e){const r=this.createSceneObject(e.type,e.id);return r&&(r.json=e),r}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const r=[];for(const i of this._sceneObjs.values())i.typeName===e&&r.push(i);return r}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const r=this._esObjConstructors.get(e);if(r)return r}getProps(e){const r=this._getSceneObjConstructor(e);if(!r){console.warn(`cannot get constructor from type: ${e}`);return}return p.getExtProp(r,"__sceneObjExtraInfo")}setProps(e,r){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=p.getExtProp(i,"__sceneObjExtraInfo");s||(s={},p.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,r)}getProp(e,r){const i=this.getProps(e);return i&&i[r]}setProp(e,r,i){this.setProps(e,{[r]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[r,i]of Object.entries(e))this.setEnv(r,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,r){if(this._environmentVariables[e]!==r){const i=this._environmentVariables[e];this._environmentVariables[e]=r,this._environmentVariablesChanged.emit(e,r,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return rp(e)}createEnvStrReact(e,r){return ep(e,r)}createEvnStrReact(e,r){return ep(e,r)}}const It=class It extends st{constructor(e){super();g(this,"_components",this.dv(new jl));g(this,"_viewerAttached",this.dv(new H));g(this,"_viewerDetached",this.dv(new H));g(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(r=>{r.actived&&(this.activeViewer=r),r.ad(r.activedChanged.don(i=>{i&&e.has(r)&&(this.activeViewer=r)})),e.add(r)})),this.d(this._viewerDetached.don(r=>{e.delete(r),this.activeViewer==r&&(this.activeViewer=void 0)})),e})());g(this,"_activeViewer",this.disposeVar(p.react(void 0)));g(this,"_createdEvent",this.dv(new H));g(this,"_flushEvent",this.dv(new H));g(this,"_id");g(this,"_updateFuncReact",this.dv(p.react(void 0)));g(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));g(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??p.createGuid(),this._initName();{const r=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};r(),this.d(this.execOnceFuncStrChanged.don(r))}{const r=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};r(),this.d(this.updateFuncStrChanged.don(r));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||p.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const r=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};r(),this.d(this.toDestroyFuncStrChanged.don(r)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,r,i){p.extendClassProps(r.prototype,r.createDefaultProps);const s=r.createDefaultProps();r.defaults&&(r.defaults={});for(const o of Object.keys(s))r.defaults[o]=s[o]instanceof p.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,r,i),e}static get envs(){return It.context.environmentVariables}static get $refs(){return It.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const r=new Map;this.d(()=>{r.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&r.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!r.has(i))return;const s=r.get(i);s&&(s.destroy(),r.delete(i))}))}createAttachedObject(e){const r=new Map,i=()=>{for(let[u,l]of r.entries())l.destroy();r.clear()},s=u=>{const l=e(u);l&&r.set(u,l)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!r.has(u))return;const l=r.get(u);l&&(l.destroy(),r.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(r=>new a_(r,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_innerSetJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new vt(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new vt(r[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new Et([this,"typeName"],"类型",void 0,!1,!0),new Et([this,"id"],"唯一标识",void 0,!1,!0),new Et([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new Et([this,"ref"],"ref",void 0,!0),new ht([this,"extras"],"extras",void 0,void 0,!0),new Qg(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};g(It,"context",new o_),g(It,"innerRegister",It.context.register.bind(It.context)),g(It,"defaults",{}),g(It,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),g(It,"type",It.register("ESSceneObject",It,{chsName:"场景类",tags:["ESObjects"],description:""})),g(It,"create",It.context.createSceneObject.bind(It.context)),g(It,"createFromUrl",It.context.createSceneObjectFromUrl.bind(It.context)),g(It,"createFromClass",It.context.createSceneObjectFromClass.bind(It.context)),g(It,"createFromJson",It.context.createSceneObjectFromJson.bind(It.context)),g(It,"destroySceneObject",It.context.destroySceneObject.bind(It.context)),g(It,"getSceneObjById",It.context.getSceneObjectById.bind(It.context)),g(It,"getSceneObj",It.context.getSceneObject.bind(It.context)),g(It,"getEnv",It.context.getEnv.bind(It.context)),g(It,"setEnv",It.context.setEnv.bind(It.context)),g(It,"getStrFromEnv",It.context.getStrFromEnv.bind(It.context)),g(It,"getSceneObjectById",It.context.getSceneObjectById.bind(It.context)),g(It,"getSceneObject",It.context.getSceneObject.bind(It.context));let ft=It;class a_ extends st{constructor(t,e){super(),this.dv(new p.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const xe=class xe extends ft{constructor(e){super(e);g(this,"_editing",this.dv(p.react(!1)));g(this,"editingID");g(this,"editingBindMode","singlePoint");g(this,"_deprecated",[]);g(this,"_flyInEvent",this.dv(new H));g(this,"_flyToEvent",this.dv(new H));g(this,"_flyOverEvent",this.disposeVar(new H));g(this,"_pickedEvent",this.dv(new H));g(this,"_calcFlyToParamEvent",this.dv(new H));g(this,"_calcFlyInParamEvent",this.dv(new H));g(this,"useCalcFlyToParamInESObjectWithLocation",!1);ap(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let r=0;r<e.length;r++){const i=e[r];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach(l=>{a===l&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${u[l]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,xe._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,xe._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new tt([this,"show"],"是否显示",xe.defaults.show),new tt([this,"collision"],"开启碰撞",xe.defaults.collision),new tt([this,"allowPicking"],"允许拾取",xe.defaults.allowPicking),new mt([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new mt([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new mt([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new mt([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new vt([],"飞行定位","飞向参数"),new mt(["number"],r=>this.flyTo(r),[1],"飞向"),new ht([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new R([this,"flyToDistance"],"flyToDistance",void 0,!0),new R([this,"flyToHeading"],"flyToHeading",void 0,!0),new R([this,"flyToPitch"],"flyToPitch",void 0,!0),new R([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new R([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new R([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new vt([],"飞入参数"),new mt(["number"],r=>this.flyIn(r),[1],"飞入"),new ht([this,"flyInParam"],"flyInParam",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??xe.defaultFlyToParam,pDelta:e}:void 0}};g(xe,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:p.reactJsonWithUndefined(void 0),flyInParam:p.reactJsonWithUndefined(void 0)})),g(xe,"type",xe.register("ESVisualObject",xe,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),g(xe,"supportEditingModes",[]),g(xe,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),g(xe,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),g(xe,"_lastFlyInId",0),g(xe,"_lastFlyToId",0);let ee=xe;class np extends st{constructor(){super();g(this,"_data",this.dv(p.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class ip extends st{constructor(){super(...arguments);g(this,"_dragStartEvent",this.dv(new H));g(this,"_dragOverEvent",this.dv(new H));g(this,"_dragLeaveEvent",this.dv(new H));g(this,"_dropEvent",this.dv(new H))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function u_(n,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function l_(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function Kl(n,t){p.getExtProp(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),p.setExtProp(n,"__treeItem",t)}function h_(n){return p.getExtProp(n,"__treeItem")}function c_(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const t=document.createElement("a");t.href=n;const e=t.href;return t.remove(),e}function Rc(n){if(typeof n!="string")return!1;try{const t=JSON.parse(n);return typeof t=="object"&&t!==null}catch{return!1}}function f_(n){try{return new DOMParser().parseFromString(n,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function d_(n){return n instanceof Function?n():n}function sp(n,t){for(let e of n)if(t.includes(e))return!0;return!1}function $i(n,t){const e=n,r=t;return e===void 0||e.length===0||r===void 0||r.length===0?!0:sp(e,r)}function g_(n){const t=setTimeout(()=>{n(),clearTimeout(t)})}function na(n){let t=n%360;return t=t<0?360+t:t,t}function op(n){return na(n+180)-180}function $l(n,t,e){let r=na(n),i=na(t);Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const s=r*(1-e)+i*e;return op(s)}function Fc(n,t,e,r){return r=r||[0,0,0],r[0]=$l(n[0],t[0],e),r[1]=$l(n[1],t[1],e),r[2]=$l(n[2],t[2],e),r}function ap(n,t,e="editing"){const r=new st;n.ad(r);const i=t.bind(n);return r.ad(new p.ObjResettingWithEvent(n.activeViewerChanged,()=>{const s=new st;let o=n.activeViewer;return o?(s.ad(n[`${e}Changed`].don(()=>{var a;n[`${e}`]?i():(a=(n.components.main??n).editingID)!=null&&a.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(n.id)&&a.type==="end"){const u=n.components.main??n;u.editingID&&a.editingID.includes(u.editingID)?n[`${e}`]=!1:n[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),s})),n[`${e}`]&&i(),r}class p_ extends st{constructor(e,r,i,s){super();g(this,"_sceneObjectId",this.dv(new p.SceneObjectWithId));this._id=e,this._startTimeStamp=r,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=p.clamp(u,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof Zn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const v_=`
|
|
24
24
|
用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
|
|
25
25
|
注意时间的单位是毫秒。
|
|
26
26
|
示例如下:
|
|
@@ -41,7 +41,7 @@ ${u.map(c=>`${c.id} ${c.typeName}
|
|
|
41
41
|
`,dr=class dr extends st{constructor(){super();g(this,"_ratio",this.dv(p.react(0)));g(this,"_subPlayers",this.dv(new p.ObservableArray));const e=this.dv(new p.Player);{const o=()=>{e.loop=this.loop??dr.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??dr.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??dr.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??dr.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??dr.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??dr.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??dr.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??dr.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??dr.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??dr.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const r=()=>{const o=this.duration??dr.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??dr.defaults.currentTime)/o)};r();const i=this.dv(p.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(r)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[u,l,c]=a;return new p_(u,l,c,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??dr.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};g(dr,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),g(dr,"channelsReadMe",v_);let Zn=dr;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:p.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((r,i)=>r===e[i]),t=>[...t])})})(Zn||(Zn={})),p.extendClassProps(Zn.prototype,Zn.createDefaultProps);class Gc extends st{constructor(e){super();g(this,"_sceneObject",this.dv(p.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const r=ft.getSceneObjById(this._id);r&&(this._sceneObject.value=r),this.d(ft.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(ft.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class m_ extends st{constructor(e,r){super();g(this,"_sofi");this._id=e,this._sofi=this.dv(new Gc(this._id));{const i=()=>{r.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class y_ extends st{constructor(){super();g(this,"_id",this.dv(p.react(void 0)));g(this,"_sceneObject",this.dv(p.react(void 0)));g(this,"_resetting",this.dv(new p.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new m_(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class __ extends st{constructor(t,e,r,i){super(),this.disposeVar(new p.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=t.sceneObject;if(o&&e){const a=e.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let u=p.pluckProperty(o,!1,...a);(!u||!(u instanceof H))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=p.pluckProperty(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof H?(s=u,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(s){const a=new st;return a.d(s.dwon(()=>r.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const up=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends st{constructor(e,r,i){super();g(this,"_doEvalEvent",this.dv(new H));const s=this._doEvalEvent,o=this.disposeVar(p.createNextAnimateFrameEvent(s)),a=e.map(([u,l])=>{const c=new Gc(u),h=l&&new __(c,l,s,r)||void 0;return[c,h]});this.d(()=>{a.forEach(([u,l])=>{l==null||l.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="Immediate"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="NextAnimateFrame"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:w_}=up;class Ou extends st{constructor(){super();g(this,"_evalFunc");g(this,"_forceExecute",new H);const e=this.dv(p.react(void 0)),r=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};r(),this.dispose(this.evalFuncStrChanged.disposableOn(r));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},s=this.disposeVar(new p.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new w_(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:p.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Ou||(Ou={})),p.extendClassProps(Ou.prototype,Ou.createDefaultProps);function E_(n){n("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),n("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),n("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");for(var t=1;t<=60;++t)n("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),n("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");n.WGS84=n["EPSG:4326"],n["EPSG:3785"]=n["EPSG:3857"],n.GOOGLE=n["EPSG:3857"],n["EPSG:900913"]=n["EPSG:3857"],n["EPSG:102113"]=n["EPSG:3857"]}var uo=1,lo=2,ia=3,S_=4,kc=5,lp=6378137,C_=6356752314e-3,hp=.0066943799901413165,Du=484813681109536e-20,J=Math.PI/2,P_=.16666666666666666,I_=.04722222222222222,M_=.022156084656084655,et=1e-10,ue=.017453292519943295,Pi=57.29577951308232,re=Math.PI/4,Lu=Math.PI*2,or=3.14159265359,Wr={};Wr.greenwich=0,Wr.lisbon=-9.131906111111,Wr.paris=2.337229166667,Wr.bogota=-74.080916666667,Wr.madrid=-3.687938888889,Wr.rome=12.452333333333,Wr.bern=7.439583333333,Wr.jakarta=106.807719444444,Wr.ferro=-17.666666666667,Wr.brussels=4.367975,Wr.stockholm=18.058277777778,Wr.athens=23.7163375,Wr.oslo=10.722916666667;const b_={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var cp=/[\s_\-\/\(\)]/g;function Ps(n,t){if(n[t])return n[t];for(var e=Object.keys(n),r=t.toLowerCase().replace(cp,""),i=-1,s,o;++i<e.length;)if(s=e[i],o=s.toLowerCase().replace(cp,""),o===r)return n[s]}function Vc(n){var t={},e=n.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,u){var l=u.split("=");return l.push(!0),a[l[0].toLowerCase()]=l[1],a},{}),r,i,s,o={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*ue},lat_1:function(a){t.lat1=a*ue},lat_2:function(a){t.lat2=a*ue},lat_ts:function(a){t.lat_ts=a*ue},lon_0:function(a){t.long0=a*ue},lon_1:function(a){t.long1=a*ue},lon_2:function(a){t.long2=a*ue},alpha:function(a){t.alpha=parseFloat(a)*ue},gamma:function(a){t.rectified_grid_angle=parseFloat(a)*ue},lonc:function(a){t.longc=a*ue},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r:function(a){t.a=t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(u){return parseFloat(u)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var u=Ps(b_,a);u&&(t.to_meter=u.to_meter)},from_greenwich:function(a){t.from_greenwich=a*ue},pm:function(a){var u=Ps(Wr,a);t.from_greenwich=(u||parseFloat(a))*ue},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var u="ewnsud";a.length===3&&u.indexOf(a.substr(0,1))!==-1&&u.indexOf(a.substr(1,1))!==-1&&u.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(r in e)i=e[r],r in o?(s=o[r],typeof s=="function"?s(i):t[s]=i):t[r]=i;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}class fp{static getId(t){const e=t.find(r=>Array.isArray(r)&&r[0]==="ID");return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const r=t[1],i=parseFloat(t[2])||null,s=t.find(a=>Array.isArray(a)&&a[0]==="ID"),o=s?{authority:s[1],code:parseInt(s[2],10)}:null;return{type:e,name:r,conversion_factor:i,id:o}}static convertAxis(t){const e=t[1]||"Unknown";let r;const i=e.match(/^\((.)\)$/);if(i){const l=i[1].toUpperCase();if(l==="E")r="east";else if(l==="N")r="north";else if(l==="U")r="up";else throw new Error(`Unknown axis abbreviation: ${l}`)}else r=t[2]?t[2].toLowerCase():"unknown";const s=t.find(l=>Array.isArray(l)&&l[0]==="ORDER"),o=s?parseInt(s[1],10):null,a=t.find(l=>Array.isArray(l)&&(l[0]==="LENGTHUNIT"||l[0]==="ANGLEUNIT"||l[0]==="SCALEUNIT")),u=this.convertUnit(a);return{name:e,direction:r,unit:u,order:o}}static extractAxes(t){return t.filter(e=>Array.isArray(e)&&e[0]==="AXIS").map(e=>this.convertAxis(e)).sort((e,r)=>(e.order||0)-(r.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")):null,e.conversion=t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")):null;const r=t.find(f=>Array.isArray(f)&&f[0]==="CS");r&&(e.coordinate_system={type:r[1],axis:this.extractAxes(t)});const i=t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT");if(i){const f=this.convertUnit(i);e.coordinate_system.unit=f}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(f=>Array.isArray(f)&&(f[0]==="DATUM"||f[0]==="ENSEMBLE"));if(s){const f=this.convert(s);s[0]==="ENSEMBLE"?e.datum_ensemble=f:e.datum=f;const d=t.find(v=>Array.isArray(v)&&v[0]==="PRIMEM");d&&d[1]!=="Greenwich"&&(f.prime_meridian={name:d[1],longitude:parseFloat(d[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(f=>Array.isArray(f)&&f[0]==="MEMBER").map(f=>({type:"DatumEnsembleMember",name:f[1],id:this.getId(f)}));const o=t.find(f=>Array.isArray(f)&&f[0]==="ENSEMBLEACCURACY");o&&(e.accuracy=parseFloat(o[1]));const a=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID");a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT")&&this.convert(t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT"),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&f[0]==="PARAMETER").map(f=>this.convert(f));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(f=>Array.isArray(f)&&(f[0]==="LENGTHUNIT"||f[0]==="ANGLEUNIT"||f[0]==="SCALEUNIT"))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const u=t.find(f=>Array.isArray(f)&&f[0]==="SOURCECRS");if(u){const f=u.find(d=>Array.isArray(d));e.source_crs=f?this.convert(f):null}const l=t.find(f=>Array.isArray(f)&&f[0]==="TARGETCRS");if(l){const f=l.find(d=>Array.isArray(d));e.target_crs=f?this.convert(f):null}const c=t.find(f=>Array.isArray(f)&&f[0]==="ABRIDGEDTRANSFORMATION");c?e.transformation=this.convert(c):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&(f[0]==="PARAMETER"||f[0]==="PARAMETERFILE")).map(f=>{if(f[0]==="PARAMETER")return this.convert(f);if(f[0]==="PARAMETERFILE")return{name:f[1],value:f[2],id:{authority:"EPSG",code:8656}}}),e.parameters.length===7){const f=e.parameters[6];f.name==="Scale difference"&&(f.value=Math.round((f.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const h=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(f=>{f.unit||(f.unit=h)}),h.conversion_factor&&h.conversion_factor!==1&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:h});break;default:e.keyword=t[0];break}return e}}class N_ extends fp{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&e.coordinate_system.subtype==="Cartesian"&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class x_ extends fp{static convert(t,e={}){super.convert(t,e);const r=t.find(s=>Array.isArray(s)&&s[0]==="CS");r&&(e.coordinate_system={subtype:r[1],axis:this.extractAxes(t)});const i=t.find(s=>Array.isArray(s)&&s[0]==="USAGE");if(i){const s=i.find(u=>Array.isArray(u)&&u[0]==="SCOPE"),o=i.find(u=>Array.isArray(u)&&u[0]==="AREA"),a=i.find(u=>Array.isArray(u)&&u[0]==="BBOX");e.usage={},s&&(e.usage.scope=s[1]),o&&(e.usage.area=o[1]),a&&(e.usage.bbox=a.slice(1))}return e}}function T_(n){return n.find(t=>Array.isArray(t)&&t[0]==="USAGE")?"2019":(n.find(t=>Array.isArray(t)&&t[0]==="CS")||n[0]==="BOUNDCRS"||n[0]==="PROJCRS"||n[0]==="GEOGCRS","2015")}function A_(n){return(T_(n)==="2019"?x_:N_).convert(n)}function O_(n){const t=n.toUpperCase();return t.includes("PROJCRS")||t.includes("GEOGCRS")||t.includes("BOUNDCRS")||t.includes("VERTCRS")||t.includes("LENGTHUNIT")||t.includes("ANGLEUNIT")||t.includes("SCALEUNIT")?"WKT2":(t.includes("PROJCS")||t.includes("GEOGCS")||t.includes("LOCAL_CS")||t.includes("VERT_CS")||t.includes("UNIT"),"WKT1")}var Ru=1,dp=2,gp=3,Zl=4,pp=5,Uc=-1,D_=/\s/,L_=/[A-Za-z]/,R_=/[A-Za-z84_]/,th=/[,\]]/,vp=/[\d\.E\-\+]/;function Zi(n){if(typeof n!="string")throw new Error("not a string");this.text=n.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Ru}Zi.prototype.readCharicter=function(){var n=this.text[this.place++];if(this.state!==Zl)for(;D_.test(n);){if(this.place>=this.text.length)return;n=this.text[this.place++]}switch(this.state){case Ru:return this.neutral(n);case dp:return this.keyword(n);case Zl:return this.quoted(n);case pp:return this.afterquote(n);case gp:return this.number(n);case Uc:return}},Zi.prototype.afterquote=function(n){if(n==='"'){this.word+='"',this.state=Zl;return}if(th.test(n)){this.word=this.word.trim(),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in afterquote yet, index '+this.place)},Zi.prototype.afterItem=function(n){if(n===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Ru;return}if(n==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Ru,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Uc);return}},Zi.prototype.number=function(n){if(vp.test(n)){this.word+=n;return}if(th.test(n)){this.word=parseFloat(this.word),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in number yet, index '+this.place)},Zi.prototype.quoted=function(n){if(n==='"'){this.state=pp;return}this.word+=n},Zi.prototype.keyword=function(n){if(R_.test(n)){this.word+=n;return}if(n==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=Ru;return}if(th.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in keyword yet, index '+this.place)},Zi.prototype.neutral=function(n){if(L_.test(n)){this.word=n,this.state=dp;return}if(n==='"'){this.word="",this.state=Zl;return}if(vp.test(n)){this.word=n,this.state=gp;return}if(th.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in neutral yet, index '+this.place)},Zi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Uc)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function F_(n){var t=new Zi(n);return t.output()}function zc(n,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var r=t?{}:n,i=e.reduce(function(s,o){return sa(o,s),s},r);t&&(n[t]=i)}function sa(n,t){if(!Array.isArray(n)){t[n]=!0;return}var e=n.shift();if(e==="PARAMETER"&&(e=n.shift()),n.length===1){if(Array.isArray(n[0])){t[e]={},sa(n[0],t[e]);return}t[e]=n[0];return}if(!n.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=n;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(n);return}Array.isArray(e)||(t[e]={});var r;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:n[0].toLowerCase(),convert:n[1]},n.length===3&&sa(n[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:n[0],a:n[1],rf:n[2]},n.length===4&&sa(n[3],t[e]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":n[0]=["name",n[0]],zc(t,e,n);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":n[0]=["name",n[0]],zc(t,e,n),t[e].type=e;return;default:for(r=-1;++r<n.length;)if(!Array.isArray(n[r]))return sa(n,t[e]);return zc(t,e,n)}}var G_=.017453292519943295;function ti(n){return n*G_}function mp(n){const t=(n.projName||"").toLowerCase().replace(/_/g," ");!n.long0&&n.longc&&(t==="albers conic equal area"||t==="lambert azimuthal equal area")&&(n.long0=n.longc),!n.lat_ts&&n.lat1&&(t==="stereographic south pole"||t==="polar stereographic (variant b)")?(n.lat0=ti(n.lat1>0?90:-90),n.lat_ts=n.lat1,delete n.lat1):!n.lat_ts&&n.lat0&&(t==="polar stereographic"||t==="polar stereographic (variant a)")&&(n.lat_ts=n.lat0,n.lat0=ti(n.lat0>0?90:-90),delete n.lat1)}function yp(n){let t={units:null,to_meter:void 0};return typeof n=="string"?(t.units=n.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.units==="meter"&&(t.to_meter=1)):n&&n.name&&(t.units=n.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.to_meter=n.conversion_factor),t}function _p(n){return typeof n=="object"?n.value*n.unit.conversion_factor:n}function wp(n,t){n.ellipsoid.radius?(t.a=n.ellipsoid.radius,t.rf=0):(t.a=_p(n.ellipsoid.semi_major_axis),n.ellipsoid.inverse_flattening!==void 0?t.rf=n.ellipsoid.inverse_flattening:n.ellipsoid.semi_major_axis!==void 0&&n.ellipsoid.semi_minor_axis!==void 0&&(t.rf=t.a/(t.a-_p(n.ellipsoid.semi_minor_axis))))}function eh(n,t={}){return!n||typeof n!="object"?n:n.type==="BoundCRS"?(eh(n.source_crs,t),n.transformation&&(n.transformation.method&&n.transformation.method.name==="NTv2"?t.nadgrids=n.transformation.parameters[0].value:t.datum_params=n.transformation.parameters.map(e=>e.value)),t):(Object.keys(n).forEach(e=>{const r=n[e];if(r!==null)switch(e){case"name":if(t.srsCode)break;t.name=r,t.srsCode=r;break;case"type":r==="GeographicCRS"?t.projName="longlat":r==="ProjectedCRS"&&n.conversion&&n.conversion.method&&(t.projName=n.conversion.method.name);break;case"datum":case"datum_ensemble":r.ellipsoid&&(t.ellps=r.ellipsoid.name,wp(r,t)),r.prime_meridian&&(t.from_greenwich=r.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":t.ellps=r.name,wp(r,t);break;case"prime_meridian":t.long0=(r.longitude||0)*Math.PI/180;break;case"coordinate_system":if(r.axis){if(t.axis=r.axis.map(i=>{const s=i.direction;if(s==="east")return"e";if(s==="north")return"n";if(s==="west")return"w";if(s==="south")return"s";throw new Error(`Unknown axis direction: ${s}`)}).join("")+"u",r.unit){const{units:i,to_meter:s}=yp(r.unit);t.units=i,t.to_meter=s}else if(r.axis[0]&&r.axis[0].unit){const{units:i,to_meter:s}=yp(r.axis[0].unit);t.units=i,t.to_meter=s}}break;case"id":r.authority&&r.code&&(t.title=r.authority+":"+r.code);break;case"conversion":r.method&&r.method.name&&(t.projName=r.method.name),r.parameters&&r.parameters.forEach(i=>{const s=i.name.toLowerCase().replace(/\s+/g,"_"),o=i.value;i.unit&&i.unit.conversion_factor?t[s]=o*i.unit.conversion_factor:i.unit==="degree"?t[s]=o*Math.PI/180:t[s]=o});break;case"unit":r.name&&(t.units=r.name.toLowerCase(),t.units==="metre"&&(t.units="meter")),r.conversion_factor&&(t.to_meter=r.conversion_factor);break;case"base_crs":eh(r,t),t.datumCode=r.id?r.id.authority+"_"+r.id.code:r.name;break}}),t.latitude_of_false_origin!==void 0&&(t.lat0=t.latitude_of_false_origin),t.longitude_of_false_origin!==void 0&&(t.long0=t.longitude_of_false_origin),t.latitude_of_standard_parallel!==void 0&&(t.lat0=t.latitude_of_standard_parallel,t.lat1=t.latitude_of_standard_parallel),t.latitude_of_1st_standard_parallel!==void 0&&(t.lat1=t.latitude_of_1st_standard_parallel),t.latitude_of_2nd_standard_parallel!==void 0&&(t.lat2=t.latitude_of_2nd_standard_parallel),t.latitude_of_projection_centre!==void 0&&(t.lat0=t.latitude_of_projection_centre),t.longitude_of_projection_centre!==void 0&&(t.longc=t.longitude_of_projection_centre),t.easting_at_false_origin!==void 0&&(t.x0=t.easting_at_false_origin),t.northing_at_false_origin!==void 0&&(t.y0=t.northing_at_false_origin),t.latitude_of_natural_origin!==void 0&&(t.lat0=t.latitude_of_natural_origin),t.longitude_of_natural_origin!==void 0&&(t.long0=t.longitude_of_natural_origin),t.longitude_of_origin!==void 0&&(t.long0=t.longitude_of_origin),t.false_easting!==void 0&&(t.x0=t.false_easting),t.easting_at_projection_centre&&(t.x0=t.easting_at_projection_centre),t.false_northing!==void 0&&(t.y0=t.false_northing),t.northing_at_projection_centre&&(t.y0=t.northing_at_projection_centre),t.standard_parallel_1!==void 0&&(t.lat1=t.standard_parallel_1),t.standard_parallel_2!==void 0&&(t.lat2=t.standard_parallel_2),t.scale_factor_at_natural_origin!==void 0&&(t.k0=t.scale_factor_at_natural_origin),t.scale_factor_at_projection_centre!==void 0&&(t.k0=t.scale_factor_at_projection_centre),t.scale_factor_on_pseudo_standard_parallel!==void 0&&(t.k0=t.scale_factor_on_pseudo_standard_parallel),t.azimuth!==void 0&&(t.alpha=t.azimuth),t.azimuth_at_projection_centre!==void 0&&(t.alpha=t.azimuth_at_projection_centre),t.angle_from_rectified_to_skew_grid&&(t.rectified_grid_angle=t.angle_from_rectified_to_skew_grid),mp(t),t)}var k_=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function V_(n,t){var e=t[0],r=t[1];!(e in n)&&r in n&&(n[e]=n[r],t.length===3&&(n[e]=t[2](n[e])))}function Ep(n){for(var t=Object.keys(n),e=0,r=t.length;e<r;++e){var i=t[e];k_.indexOf(i)!==-1&&U_(n[i]),typeof n[i]=="object"&&Ep(n[i])}}function U_(n){if(n.AUTHORITY){var t=Object.keys(n.AUTHORITY)[0];t&&t in n.AUTHORITY&&(n.title=t+":"+n.AUTHORITY[t])}if(n.type==="GEOGCS"?n.projName="longlat":n.type==="LOCAL_CS"?(n.projName="identity",n.local=!0):typeof n.PROJECTION=="object"?n.projName=Object.keys(n.PROJECTION)[0]:n.projName=n.PROJECTION,n.AXIS){for(var e="",r=0,i=n.AXIS.length;r<i;++r){var s=[n.AXIS[r][0].toLowerCase(),n.AXIS[r][1].toLowerCase()];s[0].indexOf("north")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="north"?e+="n":s[0].indexOf("south")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="south"?e+="s":s[0].indexOf("east")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="east"?e+="e":(s[0].indexOf("west")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(n.axis=e)}n.UNIT&&(n.units=n.UNIT.name.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.UNIT.convert&&(n.type==="GEOGCS"?n.DATUM&&n.DATUM.SPHEROID&&(n.to_meter=n.UNIT.convert*n.DATUM.SPHEROID.a):n.to_meter=n.UNIT.convert));var o=n.GEOGCS;n.type==="GEOGCS"&&(o=n),o&&(o.DATUM?n.datumCode=o.DATUM.name.toLowerCase():n.datumCode=o.name.toLowerCase(),n.datumCode.slice(0,2)==="d_"&&(n.datumCode=n.datumCode.slice(2)),n.datumCode==="new_zealand_1949"&&(n.datumCode="nzgd49"),(n.datumCode==="wgs_1984"||n.datumCode==="world_geodetic_system_1984")&&(n.PROJECTION==="Mercator_Auxiliary_Sphere"&&(n.sphere=!0),n.datumCode="wgs84"),n.datumCode==="belge_1972"&&(n.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(n.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),n.ellps.toLowerCase().slice(0,13)==="international"&&(n.ellps="intl"),n.a=o.DATUM.SPHEROID.a,n.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(n.datum_params=o.DATUM.TOWGS84),~n.datumCode.indexOf("osgb_1936")&&(n.datumCode="osgb36"),~n.datumCode.indexOf("osni_1952")&&(n.datumCode="osni52"),(~n.datumCode.indexOf("tm65")||~n.datumCode.indexOf("geodetic_datum_of_1965"))&&(n.datumCode="ire65"),n.datumCode==="ch1903+"&&(n.datumCode="ch1903"),~n.datumCode.indexOf("israel")&&(n.datumCode="isr93")),n.b&&!isFinite(n.b)&&(n.b=n.a),n.rectified_grid_angle&&(n.rectified_grid_angle=ti(n.rectified_grid_angle));function a(c){var h=n.to_meter||1;return c*h}var u=function(c){return V_(n,c)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",ti],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ti],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",ti],["lat0","latitude_of_origin",ti],["lat0","standard_parallel_1",ti],["lat1","standard_parallel_1",ti],["lat2","standard_parallel_2",ti],["azimuth","Azimuth"],["alpha","azimuth",ti],["srsCode","name"]];l.forEach(u),mp(n)}function qc(n){if(typeof n=="object")return eh(n);const t=O_(n);var e=F_(n);if(t==="WKT2"){const s=A_(e);return eh(s)}var r=e[0],i={};return sa(e,i),Ep(i),i[r]}function Ar(n){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Ar[n]=Vc(arguments[1]):Ar[n]=qc(arguments[1]):Ar[n]=e}else if(arguments.length===1){if(Array.isArray(n))return n.map(function(r){Array.isArray(r)?Ar.apply(t,r):Ar(r)});if(typeof n=="string"){if(n in Ar)return Ar[n]}else"EPSG"in n?Ar["EPSG:"+n.EPSG]=n:"ESRI"in n?Ar["ESRI:"+n.ESRI]=n:"IAU2000"in n?Ar["IAU2000:"+n.IAU2000]=n:console.log(n);return}}E_(Ar);function z_(n){return typeof n=="string"}function q_(n){return n in Ar}function W_(n){return n.indexOf("+")!==0&&n.indexOf("[")!==-1||typeof n=="object"&&!("srsCode"in n)}var H_=["3857","900913","3785","102113"];function X_(n){var t=Ps(n,"authority");if(t){var e=Ps(t,"epsg");return e&&H_.indexOf(e)>-1}}function B_(n){var t=Ps(n,"extension");if(t)return Ps(t,"proj4")}function Y_(n){return n[0]==="+"}function J_(n){if(z_(n)){if(q_(n))return Ar[n];if(W_(n)){var t=qc(n);if(X_(t))return Ar["EPSG:3857"];var e=B_(t);return e?Vc(e):t}if(Y_(n))return Vc(n)}else return n.projName?n:qc(n)}function Sp(n,t){n=n||{};var e,r;if(!t)return n;for(r in t)e=t[r],e!==void 0&&(n[r]=e);return n}function Ii(n,t,e){var r=n*t;return e/Math.sqrt(1-r*r)}function Fu(n){return n<0?-1:1}function ot(n){return Math.abs(n)<=or?n:n-Fu(n)*Lu}function ei(n,t,e){var r=n*e,i=.5*n;return r=Math.pow((1-r)/(1+r),i),Math.tan(.5*(J-t))/r}function Gu(n,t){for(var e=.5*n,r,i,s=J-2*Math.atan(t),o=0;o<=15;o++)if(r=n*Math.sin(s),i=J-2*Math.atan(t*Math.pow((1-r)/(1+r),e))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}function j_(){var n=this.b/this.a;this.es=1-n*n,"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=Ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Q_(n){var t=n.x,e=n.y;if(e*Pi>90&&e*Pi<-90&&t*Pi>180&&t*Pi<-180)return null;var r,i;if(Math.abs(Math.abs(e)-J)<=et)return null;if(this.sphere)r=this.x0+this.a*this.k0*ot(t-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(re+.5*e));else{var s=Math.sin(e),o=ei(this.e,e,s);r=this.x0+this.a*this.k0*ot(t-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return n.x=r,n.y=i,n}function K_(n){var t=n.x-this.x0,e=n.y-this.y0,r,i;if(this.sphere)i=J-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s=Math.exp(-e/(this.a*this.k0));if(i=Gu(this.e,s),i===-9999)return null}return r=ot(this.long0+t/(this.a*this.k0)),n.x=r,n.y=i,n}var $_=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const Z_={init:j_,forward:Q_,inverse:K_,names:$_};function t1(){}function Cp(n){return n}var e1=["longlat","identity"],r1=[Z_,{init:t1,forward:Cp,inverse:Cp,names:e1}],ho={},oa=[];function Pp(n,t){var e=oa.length;return n.names?(oa[e]=n,n.names.forEach(function(r){ho[r.toLowerCase()]=e}),this):(console.log(t),!0)}function Ip(n){return n.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function n1(n){if(!n)return!1;var t=n.toLowerCase();if(typeof ho[t]<"u"&&oa[ho[t]]||(t=Ip(t),t in ho&&oa[ho[t]]))return oa[ho[t]]}function i1(){r1.forEach(Pp)}const s1={start:i1,add:Pp,get:n1};var Mp={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:6377563396e-3,b:635625691e-2,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:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,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:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,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:63781575e-1,b:63567722e-1,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:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,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"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const o1=Mp.WGS84;function a1(n,t,e,r){var i=n*n,s=t*t,o=(i-s)/i,a=0;r?(n*=1-o*(P_+o*(I_+o*M_)),i=n*n,o=0):a=Math.sqrt(o);var u=(i-s)/s;return{es:o,e:a,ep2:u}}function u1(n,t,e,r,i){if(!n){var s=Ps(Mp,r);s||(s=o1),n=s.a,t=s.b,e=s.rf}return e&&!t&&(t=(1-1/e)*n),(e===0||Math.abs(n-t)<et)&&(i=!0,t=n),{a:n,b:t,rf:e,sphere:i}}var rh={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var l1 in rh){var Wc=rh[l1];Wc.datumName&&(rh[Wc.datumName]=Wc)}function h1(n,t,e,r,i,s,o){var a={};return n===void 0||n==="none"?a.datum_type=kc:a.datum_type=S_,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=uo),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=lo,a.datum_params[3]*=Du,a.datum_params[4]*=Du,a.datum_params[5]*=Du,a.datum_params[6]=a.datum_params[6]/1e6+1)),o&&(a.datum_type=ia,a.grids=o),a.a=e,a.b=r,a.es=i,a.ep2=s,a}var Hc={};function c1(n,t,e){return t instanceof ArrayBuffer?f1(n,t,e):{ready:d1(n,t)}}function f1(n,t,e){var r=!0;e!==void 0&&e.includeErrorFields===!1&&(r=!1);var i=new DataView(t),s=v1(i),o=m1(i,s),a=y1(i,o,s,r),u={header:o,subgrids:a};return Hc[n]=u,u}async function d1(n,t){for(var e=[],r=await t.getImageCount(),i=r-1;i>=0;i--){var s=await t.getImage(i),o=await s.readRasters(),a=o,u=[s.getWidth(),s.getHeight()],l=s.getBoundingBox().map(bp),c=[s.fileDirectory.ModelPixelScale[0],s.fileDirectory.ModelPixelScale[1]].map(bp),h=l[0]+(u[0]-1)*c[0],f=l[3]-(u[1]-1)*c[1],d=a[0],v=a[1],_=[];for(let y=u[1]-1;y>=0;y--)for(let w=u[0]-1;w>=0;w--){var E=y*u[0]+w;_.push([-Is(v[E]),Is(d[E])])}e.push({del:c,lim:u,ll:[-h,f],cvs:_})}var P={header:{nSubgrids:r},subgrids:e};return Hc[n]=P,P}function g1(n){if(n===void 0)return null;var t=n.split(",");return t.map(p1)}function p1(n){if(n.length===0)return null;var t=n[0]==="@";return t&&(n=n.slice(1)),n==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:n,mandatory:!t,grid:Hc[n]||null,isNull:!1}}function bp(n){return n*Math.PI/180}function Is(n){return n/3600*Math.PI/180}function v1(n){var t=n.getInt32(8,!1);return t===11?!1:(t=n.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function m1(n,t){return{nFields:n.getInt32(8,t),nSubgridFields:n.getInt32(24,t),nSubgrids:n.getInt32(40,t),shiftType:Xc(n,56,64).trim(),fromSemiMajorAxis:n.getFloat64(120,t),fromSemiMinorAxis:n.getFloat64(136,t),toSemiMajorAxis:n.getFloat64(152,t),toSemiMinorAxis:n.getFloat64(168,t)}}function Xc(n,t,e){return String.fromCharCode.apply(null,new Uint8Array(n.buffer.slice(t,e)))}function y1(n,t,e,r){for(var i=176,s=[],o=0;o<t.nSubgrids;o++){var a=w1(n,i,e),u=E1(n,i,a,e,r),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),c=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);s.push({ll:[Is(a.lowerLongitude),Is(a.lowerLatitude)],del:[Is(a.longitudeInterval),Is(a.latitudeInterval)],lim:[l,c],count:a.gridNodeCount,cvs:_1(u)});var h=16;r===!1&&(h=8),i+=176+a.gridNodeCount*h}return s}function _1(n){return n.map(function(t){return[Is(t.longitudeShift),Is(t.latitudeShift)]})}function w1(n,t,e){return{name:Xc(n,t+8,t+16).trim(),parent:Xc(n,t+24,t+24+8).trim(),lowerLatitude:n.getFloat64(t+72,e),upperLatitude:n.getFloat64(t+88,e),lowerLongitude:n.getFloat64(t+104,e),upperLongitude:n.getFloat64(t+120,e),latitudeInterval:n.getFloat64(t+136,e),longitudeInterval:n.getFloat64(t+152,e),gridNodeCount:n.getInt32(t+168,e)}}function E1(n,t,e,r,i){var s=t+176,o=16;i===!1&&(o=8);for(var a=[],u=0;u<e.gridNodeCount;u++){var l={latitudeShift:n.getFloat32(s+u*o,r),longitudeShift:n.getFloat32(s+u*o+4,r)};i!==!1&&(l.latitudeAccuracy=n.getFloat32(s+u*o+8,r),l.longitudeAccuracy=n.getFloat32(s+u*o+12,r)),a.push(l)}return a}function Mi(n,t){if(!(this instanceof Mi))return new Mi(n);t=t||function(l){if(l)throw l};var e=J_(n);if(typeof e!="object"){t("Could not parse to valid json: "+n);return}var r=Mi.projections.get(e.projName);if(!r){t("Could not get projection name from: "+n);return}if(e.datumCode&&e.datumCode!=="none"){var i=Ps(rh,e.datumCode);i&&(e.datum_params=e.datum_params||(i.towgs84?i.towgs84.split(","):null),e.ellps=i.ellipse,e.datumName=i.datumName?i.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var s=u1(e.a,e.b,e.rf,e.ellps,e.sphere),o=a1(s.a,s.b,s.rf,e.R_A),a=g1(e.nadgrids),u=e.datum||h1(e.datumCode,e.datum_params,s.a,s.b,o.es,o.ep2,a);Sp(this,e),Sp(this,r),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=u,this.init(),t(null,this)}Mi.projections=s1,Mi.projections.start();function S1(n,t){return n.datum_type!==t.datum_type||n.a!==t.a||Math.abs(n.es-t.es)>5e-11?!1:n.datum_type===uo?n.datum_params[0]===t.datum_params[0]&&n.datum_params[1]===t.datum_params[1]&&n.datum_params[2]===t.datum_params[2]:n.datum_type===lo?n.datum_params[0]===t.datum_params[0]&&n.datum_params[1]===t.datum_params[1]&&n.datum_params[2]===t.datum_params[2]&&n.datum_params[3]===t.datum_params[3]&&n.datum_params[4]===t.datum_params[4]&&n.datum_params[5]===t.datum_params[5]&&n.datum_params[6]===t.datum_params[6]:!0}function Np(n,t,e){var r=n.x,i=n.y,s=n.z?n.z:0,o,a,u,l;if(i<-J&&i>-1.001*J)i=-J;else if(i>J&&i<1.001*J)i=J;else{if(i<-J)return{x:-1/0,y:-1/0,z:n.z};if(i>J)return{x:1/0,y:1/0,z:n.z}}return r>Math.PI&&(r-=2*Math.PI),a=Math.sin(i),l=Math.cos(i),u=a*a,o=e/Math.sqrt(1-t*u),{x:(o+s)*l*Math.cos(r),y:(o+s)*l*Math.sin(r),z:(o*(1-t)+s)*a}}function xp(n,t,e,r){var i=1e-12,s=i*i,o=30,a,u,l,c,h,f,d,v,_,E,P,y,w,m=n.x,S=n.y,C=n.z?n.z:0,I,b,x;if(a=Math.sqrt(m*m+S*S),u=Math.sqrt(m*m+S*S+C*C),a/e<i){if(I=0,u/e<i)return b=J,x=-r,{x:n.x,y:n.y,z:n.z}}else I=Math.atan2(S,m);l=C/u,c=a/u,h=1/Math.sqrt(1-t*(2-t)*c*c),v=c*(1-t)*h,_=l*h,w=0;do w++,d=e/Math.sqrt(1-t*_*_),x=a*v+C*_-d*(1-t*_*_),f=t*d/(d+x),h=1/Math.sqrt(1-f*(2-f)*c*c),E=c*(1-f)*h,P=l*h,y=P*v-E*_,v=E,_=P;while(y*y>s&&w<o);return b=Math.atan(P/Math.abs(E)),{x:I,y:b,z:x}}function C1(n,t,e){if(t===uo)return{x:n.x+e[0],y:n.y+e[1],z:n.z+e[2]};if(t===lo){var r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],l=e[6];return{x:l*(n.x-u*n.y+a*n.z)+r,y:l*(u*n.x+n.y-o*n.z)+i,z:l*(-a*n.x+o*n.y+n.z)+s}}}function P1(n,t,e){if(t===uo)return{x:n.x-e[0],y:n.y-e[1],z:n.z-e[2]};if(t===lo){var r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],l=e[6],c=(n.x-r)/l,h=(n.y-i)/l,f=(n.z-s)/l;return{x:c+u*h-a*f,y:-u*c+h+o*f,z:a*c-o*h+f}}}function nh(n){return n===uo||n===lo}function I1(n,t,e){if(S1(n,t)||n.datum_type===kc||t.datum_type===kc)return e;var r=n.a,i=n.es;if(n.datum_type===ia){var s=Tp(n,!1,e);if(s!==0)return;r=lp,i=hp}var o=t.a,a=t.b,u=t.es;if(t.datum_type===ia&&(o=lp,a=C_,u=hp),i===u&&r===o&&!nh(n.datum_type)&&!nh(t.datum_type))return e;if(e=Np(e,i,r),nh(n.datum_type)&&(e=C1(e,n.datum_type,n.datum_params)),nh(t.datum_type)&&(e=P1(e,t.datum_type,t.datum_params)),e=xp(e,u,o,a),t.datum_type===ia){var l=Tp(t,!0,e);if(l!==0)return}return e}function Tp(n,t,e){if(n.grids===null||n.grids.length===0)return console.log("Grid shift grids not found"),-1;var r={x:-e.x,y:e.y},i={x:Number.NaN,y:Number.NaN},s=[];t:for(var o=0;o<n.grids.length;o++){var a=n.grids[o];if(s.push(a.name),a.isNull){i=r;break}if(a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}for(var u=a.grid.subgrids,l=0,c=u.length;l<c;l++){var h=u[l],f=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,d=h.ll[0]-f,v=h.ll[1]-f,_=h.ll[0]+(h.lim[0]-1)*h.del[0]+f,E=h.ll[1]+(h.lim[1]-1)*h.del[1]+f;if(!(v>r.y||d>r.x||E<r.y||_<r.x)&&(i=M1(r,t,h),!isNaN(i.x)))break t}}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-r.x*Pi+" "+r.y*Pi+" tried: '"+s+"'"),-1):(e.x=-i.x,e.y=i.y,0)}function M1(n,t,e){var r={x:Number.NaN,y:Number.NaN};if(isNaN(n.x))return r;var i={x:n.x,y:n.y};i.x-=e.ll[0],i.y-=e.ll[1],i.x=ot(i.x-Math.PI)+Math.PI;var s=Ap(i,e);if(t){if(isNaN(s.x))return r;s.x=i.x-s.x,s.y=i.y-s.y;var o=9,a=1e-12,u,l;do{if(l=Ap(s,e),isNaN(l.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}u={x:i.x-(l.x+s.x),y:i.y-(l.y+s.y)},s.x+=u.x,s.y+=u.y}while(o--&&Math.abs(u.x)>a&&Math.abs(u.y)>a);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),r;r.x=ot(s.x+e.ll[0]),r.y=s.y+e.ll[1]}else isNaN(s.x)||(r.x=n.x+s.x,r.y=n.y+s.y);return r}function Ap(n,t){var e={x:n.x/t.del[0],y:n.y/t.del[1]},r={x:Math.floor(e.x),y:Math.floor(e.y)},i={x:e.x-1*r.x,y:e.y-1*r.y},s={x:Number.NaN,y:Number.NaN},o;if(r.x<0||r.x>=t.lim[0]||r.y<0||r.y>=t.lim[1])return s;o=r.y*t.lim[0]+r.x;var a={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var u={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var l={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var c={x:t.cvs[o][0],y:t.cvs[o][1]},h=i.x*i.y,f=i.x*(1-i.y),d=(1-i.x)*(1-i.y),v=(1-i.x)*i.y;return s.x=d*a.x+f*u.x+v*c.x+h*l.x,s.y=d*a.y+f*u.y+v*c.y+h*l.y,s}function Op(n,t,e){var r=e.x,i=e.y,s=e.z||0,o,a,u,l={};for(u=0;u<3;u++)if(!(t&&u===2&&e.z===void 0))switch(u===0?(o=r,"ew".indexOf(n.axis[u])!==-1?a="x":a="y"):u===1?(o=i,"ns".indexOf(n.axis[u])!==-1?a="y":a="x"):(o=s,a="z"),n.axis[u]){case"e":l[a]=o;break;case"w":l[a]=-o;break;case"n":l[a]=o;break;case"s":l[a]=-o;break;case"u":e[a]!==void 0&&(l.z=o);break;case"d":e[a]!==void 0&&(l.z=-o);break;default:return null}return l}function Dp(n){var t={x:n[0],y:n[1]};return n.length>2&&(t.z=n[2]),n.length>3&&(t.m=n[3]),t}function b1(n){Lp(n.x),Lp(n.y)}function Lp(n){if(typeof Number.isFinite=="function"){if(Number.isFinite(n))return;throw new TypeError("coordinates must be finite numbers")}if(typeof n!="number"||n!==n||!isFinite(n))throw new TypeError("coordinates must be finite numbers")}function N1(n,t){return(n.datum.datum_type===uo||n.datum.datum_type===lo||n.datum.datum_type===ia)&&t.datumCode!=="WGS84"||(t.datum.datum_type===uo||t.datum.datum_type===lo||t.datum.datum_type===ia)&&n.datumCode!=="WGS84"}function ih(n,t,e,r){var i;Array.isArray(e)?e=Dp(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var s=e.z!==void 0;if(b1(e),n.datum&&t.datum&&N1(n,t)&&(i=new Mi("WGS84"),e=ih(n,i,e,r),n=i),r&&n.axis!=="enu"&&(e=Op(n,!1,e)),n.projName==="longlat")e={x:e.x*ue,y:e.y*ue,z:e.z||0};else if(n.to_meter&&(e={x:e.x*n.to_meter,y:e.y*n.to_meter,z:e.z||0}),e=n.inverse(e),!e)return;if(n.from_greenwich&&(e.x+=n.from_greenwich),e=I1(n.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*Pi,y:e.y*Pi,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),r&&t.axis!=="enu"?Op(t,!0,e):(e&&!s&&delete e.z,e)}var Rp=Mi("WGS84");function Bc(n,t,e,r){var i,s,o;return Array.isArray(e)?(i=ih(n,t,e,r)||{x:NaN,y:NaN},e.length>2?typeof n.name<"u"&&n.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(e.slice(3)):[i.x,i.y,e[2]].concat(e.slice(3)):[i.x,i.y].concat(e.slice(2)):[i.x,i.y]):(s=ih(n,t,e,r),o=Object.keys(e),o.length===2||o.forEach(function(a){if(typeof n.name<"u"&&n.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;s[a]=e[a]}),s)}function Fp(n){return n instanceof Mi?n:n.oProj?n.oProj:Mi(n)}function Hr(n,t,e){n=Fp(n);var r=!1,i;return typeof t>"u"?(t=n,n=Rp,r=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=n,n=Rp,r=!0),t=Fp(t),e?Bc(n,t,e):(i={forward:function(s,o){return Bc(n,t,s,o)},inverse:function(s,o){return Bc(t,n,s,o)}},r&&(i.oProj=t),i)}var Gp=6,kp="AJSAJS",Vp="AFAFAF",aa=65,Xr=73,En=79,ku=86,Vu=90;const x1={forward:Up,inverse:T1,toPoint:zp};function Up(n,t){return t=t||5,D1(A1({lat:n[1],lon:n[0]}),t)}function T1(n){var t=Jc(Hp(n.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function zp(n){var t=Jc(Hp(n.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Yc(n){return n*(Math.PI/180)}function qp(n){return 180*(n/Math.PI)}function A1(n){var t=n.lat,e=n.lon,r=6378137,i=.00669438,s=.9996,o,a,u,l,c,h,f,d=Yc(t),v=Yc(e),_,E;E=Math.floor((e+180)/6)+1,e===180&&(E=60),t>=56&&t<64&&e>=3&&e<12&&(E=32),t>=72&&t<84&&(e>=0&&e<9?E=31:e>=9&&e<21?E=33:e>=21&&e<33?E=35:e>=33&&e<42&&(E=37)),o=(E-1)*6-180+3,_=Yc(o),a=i/(1-i),u=r/Math.sqrt(1-i*Math.sin(d)*Math.sin(d)),l=Math.tan(d)*Math.tan(d),c=a*Math.cos(d)*Math.cos(d),h=Math.cos(d)*(v-_),f=r*((1-i/4-3*i*i/64-5*i*i*i/256)*d-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*d)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*d)-35*i*i*i/3072*Math.sin(6*d));var P=s*u*(h+(1-l+c)*h*h*h/6+(5-18*l+l*l+72*c-58*a)*h*h*h*h*h/120)+5e5,y=s*(f+u*Math.tan(d)*(h*h/2+(5-l+9*c+4*c*c)*h*h*h*h/24+(61-58*l+l*l+600*c-330*a)*h*h*h*h*h*h/720));return t<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(P),zoneNumber:E,zoneLetter:O1(t)}}function Jc(n){var t=n.northing,e=n.easting,r=n.zoneLetter,i=n.zoneNumber;if(i<0||i>60)return null;var s=.9996,o=6378137,a=.00669438,u,l=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),c,h,f,d,v,_,E,P,y,w=e-5e5,m=t;r<"N"&&(m-=1e7),E=(i-1)*6-180+3,u=a/(1-a),_=m/s,P=_/(o*(1-a/4-3*a*a/64-5*a*a*a/256)),y=P+(3*l/2-27*l*l*l/32)*Math.sin(2*P)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*P)+151*l*l*l/96*Math.sin(6*P),c=o/Math.sqrt(1-a*Math.sin(y)*Math.sin(y)),h=Math.tan(y)*Math.tan(y),f=u*Math.cos(y)*Math.cos(y),d=o*(1-a)/Math.pow(1-a*Math.sin(y)*Math.sin(y),1.5),v=w/(c*s);var S=y-c*Math.tan(y)/d*(v*v/2-(5+3*h+10*f-4*f*f-9*u)*v*v*v*v/24+(61+90*h+298*f+45*h*h-252*u-3*f*f)*v*v*v*v*v*v/720);S=qp(S);var C=(v-(1+2*h+f)*v*v*v/6+(5-2*f+28*h-3*f*f+8*u+24*h*h)*v*v*v*v*v/120)/Math.cos(y);C=E+qp(C);var I;if(n.accuracy){var b=Jc({northing:n.northing+n.accuracy,easting:n.easting+n.accuracy,zoneLetter:n.zoneLetter,zoneNumber:n.zoneNumber});I={top:b.lat,right:b.lon,bottom:S,left:C}}else I={lat:S,lon:C};return I}function O1(n){var t="Z";return 84>=n&&n>=72?t="X":72>n&&n>=64?t="W":64>n&&n>=56?t="V":56>n&&n>=48?t="U":48>n&&n>=40?t="T":40>n&&n>=32?t="S":32>n&&n>=24?t="R":24>n&&n>=16?t="Q":16>n&&n>=8?t="P":8>n&&n>=0?t="N":0>n&&n>=-8?t="M":-8>n&&n>=-16?t="L":-16>n&&n>=-24?t="K":-24>n&&n>=-32?t="J":-32>n&&n>=-40?t="H":-40>n&&n>=-48?t="G":-48>n&&n>=-56?t="F":-56>n&&n>=-64?t="E":-64>n&&n>=-72?t="D":-72>n&&n>=-80&&(t="C"),t}function D1(n,t){var e="00000"+n.easting,r="00000"+n.northing;return n.zoneNumber+n.zoneLetter+L1(n.easting,n.northing,n.zoneNumber)+e.substr(e.length-5,t)+r.substr(r.length-5,t)}function L1(n,t,e){var r=Wp(e),i=Math.floor(n/1e5),s=Math.floor(t/1e5)%20;return R1(i,s,r)}function Wp(n){var t=n%Gp;return t===0&&(t=Gp),t}function R1(n,t,e){var r=e-1,i=kp.charCodeAt(r),s=Vp.charCodeAt(r),o=i+n-1,a=s+t,u=!1;o>Vu&&(o=o-Vu+aa-1,u=!0),(o===Xr||i<Xr&&o>Xr||(o>Xr||i<Xr)&&u)&&o++,(o===En||i<En&&o>En||(o>En||i<En)&&u)&&(o++,o===Xr&&o++),o>Vu&&(o=o-Vu+aa-1),a>ku?(a=a-ku+aa-1,u=!0):u=!1,(a===Xr||s<Xr&&a>Xr||(a>Xr||s<Xr)&&u)&&a++,(a===En||s<En&&a>En||(a>En||s<En)&&u)&&(a++,a===Xr&&a++),a>ku&&(a=a-ku+aa-1);var l=String.fromCharCode(o)+String.fromCharCode(a);return l}function Hp(n){if(n&&n.length===0)throw"MGRSPoint coverting from nothing";for(var t=n.length,e=null,r="",i,s=0;!/[A-Z]/.test(i=n.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+n;r+=i,s++}var o=parseInt(r,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+n;var a=n.charAt(s++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+n;e=n.substring(s,s+=2);for(var u=Wp(o),l=F1(e.charAt(0),u),c=G1(e.charAt(1),u);c<k1(a);)c+=2e6;var h=t-s;if(h%2!==0)throw`MGRSPoint has to have an even number
|
|
42
42
|
of digits after the zone letter and two 100km letters - front
|
|
43
43
|
half for easting meters, second half for
|
|
44
|
-
northing meters`+n;var f=h/2,d=0,v=0,_,E,P,y,w;return f>0&&(_=1e5/Math.pow(10,f),E=n.substring(s,s+f),d=parseFloat(E)*_,P=n.substring(s+f),v=parseFloat(P)*_),y=d+l,w=v+c,{easting:y,northing:w,zoneLetter:a,zoneNumber:o,accuracy:_}}function F1(n,t){for(var e=kp.charCodeAt(t-1),r=1e5,i=!1;e!==n.charCodeAt(0);){if(e++,e===Xr&&e++,e===En&&e++,e>Vu){if(i)throw"Bad character: "+n;e=aa,i=!0}r+=1e5}return r}function G1(n,t){if(n>"V")throw"MGRSPoint given invalid Northing "+n;for(var e=Vp.charCodeAt(t-1),r=0,i=!1;e!==n.charCodeAt(0);){if(e++,e===Xr&&e++,e===En&&e++,e>ku){if(i)throw"Bad character: "+n;e=aa,i=!0}r+=1e5}return r}function k1(n){var t;switch(n){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: "+n}function ua(n,t,e){if(!(this instanceof ua))return new ua(n,t,e);if(Array.isArray(n))this.x=n[0],this.y=n[1],this.z=n[2]||0;else if(typeof n=="object")this.x=n.x,this.y=n.y,this.z=n.z||0;else if(typeof n=="string"&&typeof t>"u"){var r=n.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=n,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}ua.fromMGRS=function(n){return new ua(zp(n))},ua.prototype.toMGRS=function(n){return Up([this.x,this.y],n)};var V1=1,U1=.25,Xp=.046875,Bp=.01953125,Yp=.01068115234375,z1=.75,q1=.46875,W1=.013020833333333334,H1=.007120768229166667,X1=.3645833333333333,B1=.005696614583333333,Y1=.3076171875;function jc(n){var t=[];t[0]=V1-n*(U1+n*(Xp+n*(Bp+n*Yp))),t[1]=n*(z1-n*(Xp+n*(Bp+n*Yp)));var e=n*n;return t[2]=e*(q1-n*(W1+n*H1)),e*=n,t[3]=e*(X1-n*B1),t[4]=e*n*Y1,t}function la(n,t,e,r){return e*=t,t*=t,r[0]*n-e*(r[1]+t*(r[2]+t*(r[3]+t*r[4])))}var J1=20;function Qc(n,t,e){for(var r=1/(1-t),i=n,s=J1;s;--s){var o=Math.sin(i),a=1-t*o*o;if(a=(la(i,o,Math.cos(i),e)-n)*(a*Math.sqrt(a))*r,i-=a,Math.abs(a)<et)return i}return i}function j1(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=jc(this.es),this.ml0=la(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Q1(n){var t=n.x,e=n.y,r=ot(t-this.long0),i,s,o,a=Math.sin(e),u=Math.cos(e);if(this.es){var c=u*r,h=Math.pow(c,2),f=this.ep2*Math.pow(u,2),d=Math.pow(f,2),v=Math.abs(u)>et?Math.tan(e):0,_=Math.pow(v,2),E=Math.pow(_,2);i=1-this.es*Math.pow(a,2),c=c/Math.sqrt(i);var P=la(e,a,u,this.en);s=this.a*(this.k0*c*(1+h/6*(1-_+f+h/20*(5-18*_+E+14*f-58*_*f+h/42*(61+179*E-E*_-479*_)))))+this.x0,o=this.a*(this.k0*(P-this.ml0+a*r*c/2*(1+h/12*(5-_+9*f+4*d+h/30*(61+E-58*_+270*f-330*_*f+h/56*(1385+543*E-E*_-3111*_))))))+this.y0}else{var l=u*Math.sin(r);if(Math.abs(Math.abs(l)-1)<et)return 93;if(s=.5*this.a*this.k0*Math.log((1+l)/(1-l))+this.x0,o=u*Math.cos(r)/Math.sqrt(1-Math.pow(l,2)),l=Math.abs(o),l>=1){if(l-1>et)return 93;o=0}else o=Math.acos(o);e<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return n.x=s,n.y=o,n}function K1(n){var t,e,r,i,s=(n.x-this.x0)*(1/this.a),o=(n.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,e=Qc(t,this.es,this.en),Math.abs(e)<J){var h=Math.sin(e),f=Math.cos(e),d=Math.abs(f)>et?Math.tan(e):0,v=this.ep2*Math.pow(f,2),_=Math.pow(v,2),E=Math.pow(d,2),P=Math.pow(E,2);t=1-this.es*Math.pow(h,2);var y=s*Math.sqrt(t)/this.k0,w=Math.pow(y,2);t=t*d,r=e-t*w/(1-this.es)*.5*(1-w/12*(5+3*E-9*v*E+v-4*_-w/30*(61+90*E-252*v*E+45*P+46*v-w/56*(1385+3633*E+4095*P+1574*P*E)))),i=ot(this.long0+y*(1-w/6*(1+2*E+v-w/20*(5+28*E+24*P+8*v*E+6*v-w/42*(61+662*E+1320*P+720*P*E))))/f)}else r=J*Fu(o),i=0;else{var a=Math.exp(s/this.k0),u=.5*(a-1/a),l=this.lat0+o/this.k0,c=Math.cos(l);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(u,2))),r=Math.asin(t),o<0&&(r=-r),u===0&&c===0?i=0:i=ot(Math.atan2(u,c)+this.long0)}return n.x=i,n.y=r,n}var $1=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const sh={init:j1,forward:Q1,inverse:K1,names:$1};function Jp(n){var t=Math.exp(n);return t=(t-1/t)/2,t}function Br(n,t){n=Math.abs(n),t=Math.abs(t);var e=Math.max(n,t),r=Math.min(n,t)/(e||1);return e*Math.sqrt(1+Math.pow(r,2))}function Z1(n){var t=1+n,e=t-1;return e===0?n:n*Math.log(t)/e}function tw(n){var t=Math.abs(n);return t=Z1(t*(1+t/(Br(1,t)+1))),n<0?-t:t}function Kc(n,t){for(var e=2*Math.cos(2*t),r=n.length-1,i=n[r],s=0,o;--r>=0;)o=-s+e*i+n[r],s=i,i=o;return t+o*Math.sin(2*t)}function ew(n,t){for(var e=2*Math.cos(t),r=n.length-1,i=n[r],s=0,o;--r>=0;)o=-s+e*i+n[r],s=i,i=o;return Math.sin(t)*o}function rw(n){var t=Math.exp(n);return t=(t+1/t)/2,t}function jp(n,t,e){for(var r=Math.sin(t),i=Math.cos(t),s=Jp(e),o=rw(e),a=2*i*o,u=-2*r*s,l=n.length-1,c=n[l],h=0,f=0,d=0,v,_;--l>=0;)v=f,_=h,f=c,h=d,c=-v+a*f-u*h+n[l],d=-_+u*f+a*h;return a=r*o,u=i*s,[a*c-u*d,a*d+u*c]}function nw(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(sh.init.apply(this),this.forward=sh.forward,this.inverse=sh.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var n=this.es/(1+Math.sqrt(1-this.es)),t=n/(2-n),e=t;this.cgb[0]=t*(2+t*(-.6666666666666666+t*(-2+t*(2.577777777777778+t*(.5777777777777777+t*-4.228148148148148))))),this.cbg[0]=t*(-2+t*(.6666666666666666+t*(1.3333333333333333+t*(-1.8222222222222222+t*(.7111111111111111+t*.9824338624338624))))),e=e*t,this.cgb[1]=e*(2.3333333333333335+t*(-1.6+t*(-5.044444444444444+t*(8.584126984126984+t*2.458201058201058)))),this.cbg[1]=e*(1.6666666666666667+t*(-1.0666666666666667+t*(-1.4444444444444444+t*(2.86984126984127+t*-1.6105820105820106)))),e=e*t,this.cgb[2]=e*(3.7333333333333334+t*(-3.8857142857142857+t*(-12.019047619047619+t*26.03668430335097))),this.cbg[2]=e*(-1.7333333333333334+t*(1.619047619047619+t*(1.6+t*-4.474779541446208))),e=e*t,this.cgb[3]=e*(6.792063492063492+t*(-9.485714285714286+t*-28.188500881834216)),this.cbg[3]=e*(1.9634920634920634+t*(-2.4+t*-1.7518165784832451)),e=e*t,this.cgb[4]=e*(13.250793650793652+t*-23.22238255571589),this.cbg[4]=e*(-2.3301587301587303+t*3.5144460477793813),e=e*t,this.cgb[5]=e*27.011268237934903,this.cbg[5]=e*2.8496841430174764,e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(.25+e*(.015625+e/256))),this.utg[0]=t*(-.5+t*(.6666666666666666+t*(-.3854166666666667+t*(.002777777777777778+t*(.158203125+t*-.15905919312169312))))),this.gtu[0]=t*(.5+t*(-.6666666666666666+t*(.3125+t*(.22777777777777777+t*(-.4409722222222222+t*.20875661375661375))))),this.utg[1]=e*(-.020833333333333332+t*(-.06666666666666667+t*(.3034722222222222+t*(-.4380952380952381+t*.2890188388723545)))),this.gtu[1]=e*(.2708333333333333+t*(-.6+t*(.38680555555555557+t*(.44603174603174606+t*-1.0248393063822752)))),e=e*t,this.utg[2]=e*(-.035416666666666666+t*(.04404761904761905+t*(.046651785714285715+t*-.06138668430335097))),this.gtu[2]=e*(.25416666666666665+t*(-.7357142857142858+t*(.5603050595238095+t*.9237378747795415))),e=e*t,this.utg[3]=e*(-.02726314484126984+t*(.021825396825396824+t*.11439745921516754)),this.gtu[3]=e*(.30729786706349205+t*(-1.0654761904761905+t*.9096203979276896)),e=e*t,this.utg[4]=e*(-.02841641865079365+t*.027268468414301746),this.gtu[4]=e*(.4306671626984127+t*-1.713007555715889),e=e*t,this.utg[5]=e*-.03233083094085698,this.gtu[5]=e*.6650675310896665;var r=Kc(this.cbg,this.lat0);this.Zb=-this.Qn*(r+ew(this.gtu,2*r))}function iw(n){var t=ot(n.x-this.long0),e=n.y;e=Kc(this.cbg,e);var r=Math.sin(e),i=Math.cos(e),s=Math.sin(t),o=Math.cos(t);e=Math.atan2(r,o*i),t=Math.atan2(s*i,Br(r,i*o)),t=tw(Math.tan(t));var a=jp(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var u,l;return Math.abs(t)<=2.623395162778?(u=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*e+this.Zb)+this.y0):(u=1/0,l=1/0),n.x=u,n.y=l,n}function sw(n){var t=(n.x-this.x0)*(1/this.a),e=(n.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var r,i;if(Math.abs(t)<=2.623395162778){var s=jp(this.utg,2*e,2*t);e=e+s[0],t=t+s[1],t=Math.atan(Jp(t));var o=Math.sin(e),a=Math.cos(e),u=Math.sin(t),l=Math.cos(t);e=Math.atan2(o*l,Br(u,l*a)),t=Math.atan2(u,l*a),r=ot(t+this.long0),i=Kc(this.cgb,e)}else r=1/0,i=1/0;return n.x=r,n.y=i,n}var ow=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const oh={init:nw,forward:iw,inverse:sw,names:ow};function aw(n,t){if(n===void 0){if(n=Math.floor((ot(t)+Math.PI)*30/Math.PI)+1,n<0)return 0;if(n>60)return 60}return n}var uw="etmerc";function lw(){var n=aw(this.zone,this.long0);if(n===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(n)-183)*ue,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,oh.init.apply(this),this.forward=oh.forward,this.inverse=oh.inverse}var hw=["Universal Transverse Mercator System","utm"];const cw={init:lw,names:hw,dependsOn:uw};function $c(n,t){return Math.pow((1-n)/(1+n),t)}var fw=20;function dw(){var n=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*n*n),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(n/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+re)/(Math.pow(Math.tan(.5*this.lat0+re),this.C)*$c(this.e*n,this.ratexp))}function gw(n){var t=n.x,e=n.y;return n.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+re),this.C)*$c(this.e*Math.sin(e),this.ratexp))-J,n.x=this.C*t,n}function pw(n){for(var t=1e-14,e=n.x/this.C,r=n.y,i=Math.pow(Math.tan(.5*r+re)/this.K,1/this.C),s=fw;s>0&&(r=2*Math.atan(i*$c(this.e*Math.sin(n.y),-.5*this.e))-J,!(Math.abs(r-n.y)<t));--s)n.y=r;return s?(n.x=e,n.y=r,n):null}const Zc={init:dw,forward:gw,inverse:pw};function vw(){Zc.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"))}function mw(n){var t,e,r,i;return n.x=ot(n.x-this.long0),Zc.forward.apply(this,[n]),t=Math.sin(n.y),e=Math.cos(n.y),r=Math.cos(n.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*r),n.x=i*e*Math.sin(n.x),n.y=i*(this.cosc0*t-this.sinc0*e*r),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function yw(n){var t,e,r,i,s;if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,s=Br(n.x,n.y)){var o=2*Math.atan2(s,this.R2);t=Math.sin(o),e=Math.cos(o),i=Math.asin(e*this.sinc0+n.y*t*this.cosc0/s),r=Math.atan2(n.x*t,s*this.cosc0*e-n.y*this.sinc0*t)}else i=this.phic0,r=0;return n.x=r,n.y=i,Zc.inverse.apply(this,[n]),n.x=ot(n.x+this.long0),n}var _w=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const ww={init:vw,forward:mw,inverse:yw,names:_w};function Ew(n,t,e){return t*=e,Math.tan(.5*(J+n))*Math.pow((1-t)/(1+t),.5*e)}function Sw(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=et&&(this.k0=.5*(1+Fu(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=et&&(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)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=et&&Math.abs(Math.cos(this.lat_ts))>et&&(this.k0=.5*this.cons*Ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ei(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ii(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-J,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function Cw(n){var t=n.x,e=n.y,r=Math.sin(e),i=Math.cos(e),s,o,a,u,l,c,h=ot(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=et&&Math.abs(e+this.lat0)<=et?(n.x=NaN,n.y=NaN,n):this.sphere?(s=2*this.k0/(1+this.sinlat0*r+this.coslat0*i*Math.cos(h)),n.x=this.a*s*i*Math.sin(h)+this.x0,n.y=this.a*s*(this.coslat0*r-this.sinlat0*i*Math.cos(h))+this.y0,n):(o=2*Math.atan(this.ssfn_(e,r,this.e))-J,u=Math.cos(o),a=Math.sin(o),Math.abs(this.coslat0)<=et?(l=ei(this.e,e*this.con,this.con*r),c=2*this.a*this.k0*l/this.cons,n.x=this.x0+c*Math.sin(t-this.long0),n.y=this.y0-this.con*c*Math.cos(t-this.long0),n):(Math.abs(this.sinlat0)<et?(s=2*this.a*this.k0/(1+u*Math.cos(h)),n.y=s*a):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*u*Math.cos(h))),n.y=s*(this.cosX0*a-this.sinX0*u*Math.cos(h))+this.y0),n.x=s*u*Math.sin(h)+this.x0,n))}function Pw(n){n.x-=this.x0,n.y-=this.y0;var t,e,r,i,s,o=Math.sqrt(n.x*n.x+n.y*n.y);if(this.sphere){var a=2*Math.atan(o/(2*this.a*this.k0));return t=this.long0,e=this.lat0,o<=et?(n.x=t,n.y=e,n):(e=Math.asin(Math.cos(a)*this.sinlat0+n.y*Math.sin(a)*this.coslat0/o),Math.abs(this.coslat0)<et?this.lat0>0?t=ot(this.long0+Math.atan2(n.x,-1*n.y)):t=ot(this.long0+Math.atan2(n.x,n.y)):t=ot(this.long0+Math.atan2(n.x*Math.sin(a),o*this.coslat0*Math.cos(a)-n.y*this.sinlat0*Math.sin(a))),n.x=t,n.y=e,n)}else if(Math.abs(this.coslat0)<=et){if(o<=et)return e=this.lat0,t=this.long0,n.x=t,n.y=e,n;n.x*=this.con,n.y*=this.con,r=o*this.cons/(2*this.a*this.k0),e=this.con*Gu(this.e,r),t=this.con*ot(this.con*this.long0+Math.atan2(n.x,-1*n.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=et?s=this.X0:(s=Math.asin(Math.cos(i)*this.sinX0+n.y*Math.sin(i)*this.cosX0/o),t=ot(this.long0+Math.atan2(n.x*Math.sin(i),o*this.cosX0*Math.cos(i)-n.y*this.sinX0*Math.sin(i)))),e=-1*Gu(this.e,Math.tan(.5*(J+s)));return n.x=t,n.y=e,n}var Iw=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const Mw={init:Sw,forward:Cw,inverse:Pw,names:Iw,ssfn_:Ew};function bw(){var n=this.lat0;this.lambda0=this.long0;var t=Math.sin(n),e=this.a,r=this.rf,i=1/r,s=2*i-Math.pow(i,2),o=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(n),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),u=Math.log(Math.tan(Math.PI/4+n/2)),l=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*u+this.alpha*o/2*l}function Nw(n){var t=Math.log(Math.tan(Math.PI/4-n.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(n.y))/(1-this.e*Math.sin(n.y))),r=-this.alpha*(t+e)+this.K,i=2*(Math.atan(Math.exp(r))-Math.PI/4),s=this.alpha*(n.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return n.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,n.x=this.R*o+this.x0,n}function xw(n){for(var t=n.x-this.x0,e=n.y-this.y0,r=t/this.R,i=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(r)),o=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(i))),a=this.lambda0+o/this.alpha,u=0,l=s,c=-1e3,h=0;Math.abs(l-c)>1e-7;){if(++h>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(u))-Math.PI/2}return n.x=a,n.y=l,n}var Tw=["somerc"];const Aw={init:bw,forward:Nw,inverse:xw,names:Tw};var ha=1e-7;function Ow(n){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof n.projName=="object"?Object.keys(n.projName)[0]:n.projName;return"no_uoff"in n||"no_off"in n||t.indexOf(e)!==-1||t.indexOf(Ip(e))!==-1}function Dw(){var n,t,e,r,i,s,o,a,u,l,c=0,h,f=0,d=0,v=0,_=0,E=0,P=0;this.no_off=Ow(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),y&&(P=this.alpha),w&&(c=this.rectified_grid_angle),y||w)f=this.longc;else if(d=this.long1,_=this.lat1,v=this.long2,E=this.lat2,Math.abs(_-E)<=ha||(n=Math.abs(_))<=ha||Math.abs(n-J)<=ha||Math.abs(Math.abs(this.lat0)-J)<=ha||Math.abs(Math.abs(E)-J)<=ha)throw new Error;var m=1-this.es;t=Math.sqrt(m),Math.abs(this.lat0)>et?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),n=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/m),this.A=this.B*this.k0*t/n,r=this.B*t/(e*Math.sqrt(n)),i=r*r-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=r,this.E*=Math.pow(ei(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=r=i=1),y||w?(y?(h=Math.asin(Math.sin(P)/r),w||(c=P)):(h=c,P=Math.asin(r*Math.sin(h))),this.lam0=f-Math.asin(.5*(i-1/i)*Math.tan(h))/this.B):(s=Math.pow(ei(this.e,_,Math.sin(_)),this.B),o=Math.pow(ei(this.e,E,Math.sin(E)),this.B),i=this.E/s,u=(o-s)/(o+s),l=this.E*this.E,l=(l-o*s)/(l+o*s),n=d-v,n<-Math.pi?v-=Lu:n>Math.pi&&(v+=Lu),this.lam0=ot(.5*(d+v)-Math.atan(l*Math.tan(.5*this.B*(d-v))/u)/this.B),h=Math.atan(2*Math.sin(this.B*ot(d-this.lam0))/(i-1/i)),c=P=Math.asin(r*Math.sin(h))),this.singam=Math.sin(h),this.cosgam=Math.cos(h),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(r*r-1)/Math.cos(P))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*h,this.v_pole_n=this.ArB*Math.log(Math.tan(re-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(re+i))}function Lw(n){var t={},e,r,i,s,o,a,u,l;if(n.x=n.x-this.lam0,Math.abs(Math.abs(n.y)-J)>et){if(o=this.E/Math.pow(ei(this.e,n.y,Math.sin(n.y)),this.B),a=1/o,e=.5*(o-a),r=.5*(o+a),s=Math.sin(this.B*n.x),i=(e*this.singam-s*this.cosgam)/r,Math.abs(Math.abs(i)-1)<et)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),a=Math.cos(this.B*n.x),Math.abs(a)<ha?u=this.A*n.x:u=this.ArB*Math.atan2(e*this.cosgam+s*this.singam,a)}else l=n.y>0?this.v_pole_n:this.v_pole_s,u=this.ArB*n.y;return this.no_rot?(t.x=u,t.y=l):(u-=this.u_0,t.x=l*this.cosrot+u*this.sinrot,t.y=u*this.cosrot-l*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function Rw(n){var t,e,r,i,s,o,a,u={};if(n.x=(n.x-this.x0)*(1/this.a),n.y=(n.y-this.y0)*(1/this.a),this.no_rot?(e=n.y,t=n.x):(e=n.x*this.cosrot-n.y*this.sinrot,t=n.y*this.cosrot+n.x*this.sinrot+this.u_0),r=Math.exp(-this.BrA*e),i=.5*(r-1/r),s=.5*(r+1/r),o=Math.sin(this.BrA*t),a=(o*this.cosgam+i*this.singam)/s,Math.abs(Math.abs(a)-1)<et)u.x=0,u.y=a<0?-J:J;else{if(u.y=this.E/Math.sqrt((1+a)/(1-a)),u.y=Gu(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(i*this.cosgam-o*this.singam,Math.cos(this.BrA*t))}return u.x+=this.lam0,u}var Fw=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const Gw={init:Dw,forward:Lw,inverse:Rw,names:Fw};function kw(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<et)){var n=this.b/this.a;this.e=Math.sqrt(1-n*n);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),r=Ii(this.e,t,e),i=ei(this.e,this.lat1,t),s=Math.sin(this.lat2),o=Math.cos(this.lat2),a=Ii(this.e,s,o),u=ei(this.e,this.lat2,s),l=Math.abs(Math.abs(this.lat0)-J)<et?0:ei(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>et?this.ns=Math.log(r/a)/Math.log(i/u):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=r/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Vw(n){var t=n.x,e=n.y;Math.abs(2*Math.abs(e)-Math.PI)<=et&&(e=Fu(e)*(J-2*et));var r=Math.abs(Math.abs(e)-J),i,s;if(r>et)i=ei(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(i,this.ns);else{if(r=e*this.ns,r<=0)return null;s=0}var o=this.ns*ot(t-this.long0);return n.x=this.k0*(s*Math.sin(o))+this.x0,n.y=this.k0*(this.rh-s*Math.cos(o))+this.y0,n}function Uw(n){var t,e,r,i,s,o=(n.x-this.x0)/this.k0,a=this.rh-(n.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+a*a),e=1):(t=-Math.sqrt(o*o+a*a),e=-1);var u=0;if(t!==0&&(u=Math.atan2(e*o,e*a)),t!==0||this.ns>0){if(e=1/this.ns,r=Math.pow(t/(this.a*this.f0),e),i=Gu(this.e,r),i===-9999)return null}else i=-J;return s=ot(u/this.ns+this.long0),n.x=s,n.y=i,n}var zw=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const qw={init:kw,forward:Vw,inverse:Uw,names:zw};function Ww(){this.a=6377397155e-3,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}function Hw(n){var t,e,r,i,s,o,a,u=n.x,l=n.y,c=ot(u-this.long0);return t=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/t)-this.s45),r=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(r)),s=Math.asin(Math.cos(e)*Math.sin(r)/Math.cos(i)),o=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),n.y=a*Math.cos(o)/1,n.x=a*Math.sin(o)/1,this.czech||(n.y*=-1,n.x*=-1),n}function Xw(n){var t,e,r,i,s,o,a,u,l=n.x;n.x=n.y,n.y=l,this.czech||(n.y*=-1,n.x*=-1),o=Math.sqrt(n.x*n.x+n.y*n.y),s=Math.atan2(n.y,n.x),i=s/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),e=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(t)),n.x=this.long0-e/this.alfa,a=t,u=0;var c=0;do n.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(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-n.y)<1e-10&&(u=1),a=n.y,c+=1;while(u===0&&c<15);return c>=15?null:n}var Bw=["Krovak","krovak"];const Yw={init:Ww,forward:Hw,inverse:Xw,names:Bw};function Or(n,t,e,r,i){return n*i-t*Math.sin(2*i)+e*Math.sin(4*i)-r*Math.sin(6*i)}function Uu(n){return 1-.25*n*(1+n/16*(3+1.25*n))}function zu(n){return .375*n*(1+.25*n*(1+.46875*n))}function qu(n){return .05859375*n*n*(1+.75*n)}function Wu(n){return n*n*n*.011393229166666666}function tf(n,t,e){var r=t*e;return n/Math.sqrt(1-r*r)}function Ms(n){return Math.abs(n)<J?n:n-Fu(n)*Math.PI}function ah(n,t,e,r,i){var s,o;s=n/t;for(var a=0;a<15;a++)if(o=(n-(t*s-e*Math.sin(2*s)+r*Math.sin(4*s)-i*Math.sin(6*s)))/(t-2*e*Math.cos(2*s)+4*r*Math.cos(4*s)-6*i*Math.cos(6*s)),s+=o,Math.abs(o)<=1e-10)return s;return NaN}function Jw(){this.sphere||(this.e0=Uu(this.es),this.e1=zu(this.es),this.e2=qu(this.es),this.e3=Wu(this.es),this.ml0=this.a*Or(this.e0,this.e1,this.e2,this.e3,this.lat0))}function jw(n){var t,e,r=n.x,i=n.y;if(r=ot(r-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(r)),e=this.a*(Math.atan2(Math.tan(i),Math.cos(r))-this.lat0);else{var s=Math.sin(i),o=Math.cos(i),a=tf(this.a,this.e,s),u=Math.tan(i)*Math.tan(i),l=r*Math.cos(i),c=l*l,h=this.es*o*o/(1-this.es),f=this.a*Or(this.e0,this.e1,this.e2,this.e3,i);t=a*l*(1-c*u*(.16666666666666666-(8-u+8*h)*c/120)),e=f-this.ml0+a*s/o*c*(.5+(5-u+6*h)*c/24)}return n.x=t+this.x0,n.y=e+this.y0,n}function Qw(n){n.x-=this.x0,n.y-=this.y0;var t=n.x/this.a,e=n.y/this.a,r,i;if(this.sphere){var s=e+this.lat0;r=Math.asin(Math.sin(s)*Math.cos(t)),i=Math.atan2(Math.tan(t),Math.cos(s))}else{var o=this.ml0/this.a+e,a=ah(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-J)<=et)return n.x=this.long0,n.y=J,e<0&&(n.y*=-1),n;var u=tf(this.a,this.e,Math.sin(a)),l=u*u*u/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(a),2),h=t*this.a/u,f=h*h;r=a-u*Math.tan(a)/l*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-f*(c/3+(1+3*c)*c*f/15))/Math.cos(a)}return n.x=ot(i+this.long0),n.y=Ms(r),n}var Kw=["Cassini","Cassini_Soldner","cass"];const $w={init:Jw,forward:jw,inverse:Qw,names:Kw};function bs(n,t){var e;return n>1e-7?(e=n*t,(1-n*n)*(t/(1-e*e)-.5/n*Math.log((1-e)/(1+e)))):2*t}var Zw=1,tE=2,eE=3,rE=4;function nE(){var n=Math.abs(this.lat0);if(Math.abs(n-J)<et?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(n)<et?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=bs(this.e,1),this.mmf=.5/(1-this.es),this.apa=fE(this.es),this.mode){case this.N_POLE:this.dd=1;break;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),t=Math.sin(this.lat0),this.sinb1=bs(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function iE(n){var t,e,r,i,s,o,a,u,l,c,h=n.x,f=n.y;if(h=ot(h-this.long0),this.sphere){if(s=Math.sin(f),c=Math.cos(f),r=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*r:1+this.sinph0*s+this.cosph0*c*r,e<=et)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(h),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*c*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(f+this.lat0)<et)return null;e=re-f*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(h),e*=r}}else{switch(a=0,u=0,l=0,r=Math.cos(h),i=Math.sin(h),s=Math.sin(f),o=bs(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=o/this.qp,u=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:l=1+this.sinb1*a+this.cosb1*u*r;break;case this.EQUIT:l=1+u*r;break;case this.N_POLE:l=J+f,o=this.qp-o;break;case this.S_POLE:l=f-J,o=this.qp+o;break}if(Math.abs(l)<et)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),this.mode===this.OBLIQ?e=this.ymf*l*(this.cosb1*a-this.sinb1*u*r):e=(l=Math.sqrt(2/(1+u*r)))*a*this.ymf,t=this.xmf*l*u*i;break;case this.N_POLE:case this.S_POLE:o>=0?(t=(l=Math.sqrt(o))*i,e=r*(this.mode===this.S_POLE?l:-l)):t=e=0;break}}return n.x=this.a*t+this.x0,n.y=this.a*e+this.y0,n}function sE(n){n.x-=this.x0,n.y-=this.y0;var t=n.x/this.a,e=n.y/this.a,r,i,s,o,a,u,l;if(this.sphere){var c=0,h,f=0;if(h=Math.sqrt(t*t+e*e),i=h*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(i),c=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(h)<=et?0:Math.asin(e*f/h),t*=f,e=c*h;break;case this.OBLIQ:i=Math.abs(h)<=et?this.lat0:Math.asin(c*this.sinph0+e*f*this.cosph0/h),t*=f*this.cosph0,e=(c-Math.sin(i)*this.sinph0)*h;break;case this.N_POLE:e=-e,i=J-i;break;case this.S_POLE:i-=J;break}r=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,u=Math.sqrt(t*t+e*e),u<et)return n.x=this.long0,n.y=this.lat0,n;o=2*Math.asin(.5*u/this.rq),s=Math.cos(o),t*=o=Math.sin(o),this.mode===this.OBLIQ?(l=s*this.sinb1+e*o*this.cosb1/u,a=this.qp*l,e=u*this.cosb1*s-e*this.sinb1*o):(l=e*o/u,a=this.qp*l,e=u*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return n.x=this.long0,n.y=this.lat0,n;l=1-a/this.qp,this.mode===this.S_POLE&&(l=-l)}r=Math.atan2(t,e),i=dE(Math.asin(l),this.apa)}return n.x=ot(this.long0+r),n.y=i,n}var oE=.3333333333333333,aE=.17222222222222222,uE=.10257936507936508,lE=.06388888888888888,hE=.0664021164021164,cE=.016415012942191543;function fE(n){var t,e=[];return e[0]=n*oE,t=n*n,e[0]+=t*aE,e[1]=t*lE,t*=n,e[0]+=t*uE,e[1]+=t*hE,e[2]=t*cE,e}function dE(n,t){var e=n+n;return n+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var gE=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const pE={init:nE,forward:iE,inverse:sE,names:gE,S_POLE:Zw,N_POLE:tE,EQUIT:eE,OBLIQ:rE};function Ns(n){return Math.abs(n)>1&&(n=n>1?1:-1),Math.asin(n)}function vE(){Math.abs(this.lat1+this.lat2)<et||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Ii(this.e3,this.sin_po,this.cos_po),this.qs1=bs(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Ii(this.e3,this.sin_po,this.cos_po),this.qs2=bs(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=bs(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>et?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)}function mE(n){var t=n.x,e=n.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var r=bs(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,s=this.ns0*ot(t-this.long0),o=i*Math.sin(s)+this.x0,a=this.rh-i*Math.cos(s)+this.y0;return n.x=o,n.y=a,n}function yE(n){var t,e,r,i,s,o;return n.x-=this.x0,n.y=this.rh-n.y+this.y0,this.ns0>=0?(t=Math.sqrt(n.x*n.x+n.y*n.y),r=1):(t=-Math.sqrt(n.x*n.x+n.y*n.y),r=-1),i=0,t!==0&&(i=Math.atan2(r*n.x,r*n.y)),r=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-r*r)/(2*this.ns0)):(e=(this.c-r*r)/this.ns0,o=this.phi1z(this.e3,e)),s=ot(i/this.ns0+this.long0),n.x=s,n.y=o,n}function _E(n,t){var e,r,i,s,o,a=Ns(.5*t);if(n<et)return a;for(var u=n*n,l=1;l<=25;l++)if(e=Math.sin(a),r=Math.cos(a),i=n*e,s=1-i*i,o=.5*s*s/r*(t/(1-u)-e/s+.5/n*Math.log((1-i)/(1+i))),a=a+o,Math.abs(o)<=1e-7)return a;return null}var wE=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const EE={init:vE,forward:mE,inverse:yE,names:wE,phi1z:_E};function SE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function CE(n){var t,e,r,i,s,o,a,u,l=n.x,c=n.y;return r=ot(l-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(r),o=this.sin_p14*t+this.cos_p14*e*i,s=1,o>0||Math.abs(o)<=et?(a=this.x0+this.a*s*e*Math.sin(r)/o,u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)/o):(a=this.x0+this.infinity_dist*e*Math.sin(r),u=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*i)),n.x=a,n.y=u,n}function PE(n){var t,e,r,i,s,o;return n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,(t=Math.sqrt(n.x*n.x+n.y*n.y))?(i=Math.atan2(t,this.rc),e=Math.sin(i),r=Math.cos(i),o=Ns(r*this.sin_p14+n.y*e*this.cos_p14/t),s=Math.atan2(n.x*e,t*this.cos_p14*r-n.y*this.sin_p14*e),s=ot(this.long0+s)):(o=this.phic0,s=0),n.x=s,n.y=o,n}var IE=["gnom"];const ME={init:SE,forward:CE,inverse:PE,names:IE};function bE(n,t){var e=1-(1-n*n)/(2*n)*Math.log((1-n)/(1+n));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*J:J;for(var r=Math.asin(.5*t),i,s,o,a,u=0;u<30;u++)if(s=Math.sin(r),o=Math.cos(r),a=n*s,i=Math.pow(1-a*a,2)/(2*o)*(t/(1-n*n)-s/(1-a*a)+.5/n*Math.log((1-a)/(1+a))),r+=i,Math.abs(i)<=1e-10)return r;return NaN}function NE(){this.sphere||(this.k0=Ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function xE(n){var t=n.x,e=n.y,r,i,s=ot(t-this.long0);if(this.sphere)r=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var o=bs(this.e,Math.sin(e));r=this.x0+this.a*this.k0*s,i=this.y0+this.a*o*.5/this.k0}return n.x=r,n.y=i,n}function TE(n){n.x-=this.x0,n.y-=this.y0;var t,e;return this.sphere?(t=ot(this.long0+n.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(n.y/this.a*Math.cos(this.lat_ts))):(e=bE(this.e,2*n.y*this.k0/this.a),t=ot(this.long0+n.x/(this.a*this.k0))),n.x=t,n.y=e,n}var AE=["cea"];const OE={init:NE,forward:xE,inverse:TE,names:AE};function DE(){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)}function LE(n){var t=n.x,e=n.y,r=ot(t-this.long0),i=Ms(e-this.lat0);return n.x=this.x0+this.a*r*this.rc,n.y=this.y0+this.a*i,n}function RE(n){var t=n.x,e=n.y;return n.x=ot(this.long0+(t-this.x0)/(this.a*this.rc)),n.y=Ms(this.lat0+(e-this.y0)/this.a),n}var FE=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const GE={init:DE,forward:LE,inverse:RE,names:FE};var Qp=20;function kE(){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=zu(this.es),this.e2=qu(this.es),this.e3=Wu(this.es),this.ml0=this.a*Or(this.e0,this.e1,this.e2,this.e3,this.lat0)}function VE(n){var t=n.x,e=n.y,r,i,s,o=ot(t-this.long0);if(s=o*Math.sin(e),this.sphere)Math.abs(e)<=et?(r=this.a*o,i=-1*this.a*this.lat0):(r=this.a*Math.sin(s)/Math.tan(e),i=this.a*(Ms(e-this.lat0)+(1-Math.cos(s))/Math.tan(e)));else if(Math.abs(e)<=et)r=this.a*o,i=-1*this.ml0;else{var a=tf(this.a,this.e,Math.sin(e))/Math.tan(e);r=a*Math.sin(s),i=this.a*Or(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(s))}return n.x=r+this.x0,n.y=i+this.y0,n}function UE(n){var t,e,r,i,s,o,a,u,l;if(r=n.x-this.x0,i=n.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=et)t=ot(r/this.a+this.long0),e=0;else{o=this.lat0+i/this.a,a=r*r/this.a/this.a+o*o,u=o;var c;for(s=Qp;s;--s)if(c=Math.tan(u),l=-1*(o*(u*c+1)-u-.5*(u*u+a)*c)/((u-o)/c-1),u+=l,Math.abs(l)<=et){e=u;break}t=ot(this.long0+Math.asin(r*Math.tan(u)/this.a)/Math.sin(e))}else if(Math.abs(i+this.ml0)<=et)e=0,t=ot(this.long0+r/this.a);else{o=(this.ml0+i)/this.a,a=r*r/this.a/this.a+o*o,u=o;var h,f,d,v,_;for(s=Qp;s;--s)if(_=this.e*Math.sin(u),h=Math.sqrt(1-_*_)*Math.tan(u),f=this.a*Or(this.e0,this.e1,this.e2,this.e3,u),d=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),v=f/this.a,l=(o*(h*v+1)-v-.5*h*(v*v+a))/(this.es*Math.sin(2*u)*(v*v+a-2*o*v)/(4*h)+(o-v)*(h*d-2/Math.sin(2*u))-d),u-=l,Math.abs(l)<=et){e=u;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=ot(this.long0+Math.asin(r*h/this.a)/Math.sin(e))}return n.x=t,n.y=e,n}var zE=["Polyconic","American_Polyconic","poly"];const qE={init:kE,forward:VE,inverse:UE,names:zE};function WE(){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}function HE(n){var t,e=n.x,r=n.y,i=r-this.lat0,s=e-this.long0,o=i/Du*1e-5,a=s,u=1,l=0;for(t=1;t<=10;t++)u=u*o,l=l+this.A[t]*u;var c=l,h=a,f=1,d=0,v,_,E=0,P=0;for(t=1;t<=6;t++)v=f*c-d*h,_=d*c+f*h,f=v,d=_,E=E+this.B_re[t]*f-this.B_im[t]*d,P=P+this.B_im[t]*f+this.B_re[t]*d;return n.x=P*this.a+this.x0,n.y=E*this.a+this.y0,n}function XE(n){var t,e=n.x,r=n.y,i=e-this.x0,s=r-this.y0,o=s/this.a,a=i/this.a,u=1,l=0,c,h,f=0,d=0;for(t=1;t<=6;t++)c=u*o-l*a,h=l*o+u*a,u=c,l=h,f=f+this.C_re[t]*u-this.C_im[t]*l,d=d+this.C_im[t]*u+this.C_re[t]*l;for(var v=0;v<this.iterations;v++){var _=f,E=d,P,y,w=o,m=a;for(t=2;t<=6;t++)P=_*f-E*d,y=E*f+_*d,_=P,E=y,w=w+(t-1)*(this.B_re[t]*_-this.B_im[t]*E),m=m+(t-1)*(this.B_im[t]*_+this.B_re[t]*E);_=1,E=0;var S=this.B_re[1],C=this.B_im[1];for(t=2;t<=6;t++)P=_*f-E*d,y=E*f+_*d,_=P,E=y,S=S+t*(this.B_re[t]*_-this.B_im[t]*E),C=C+t*(this.B_im[t]*_+this.B_re[t]*E);var I=S*S+C*C;f=(w*S+m*C)/I,d=(m*S-w*C)/I}var b=f,x=d,A=1,N=0;for(t=1;t<=9;t++)A=A*b,N=N+this.D[t]*A;var T=this.lat0+N*Du*1e5,L=this.long0+x;return n.x=L,n.y=T,n}var BE=["New_Zealand_Map_Grid","nzmg"];const YE={init:WE,forward:HE,inverse:XE,names:BE};function JE(){}function jE(n){var t=n.x,e=n.y,r=ot(t-this.long0),i=this.x0+this.a*r,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return n.x=i,n.y=s,n}function QE(n){n.x-=this.x0,n.y-=this.y0;var t=ot(this.long0+n.x/this.a),e=2.5*(Math.atan(Math.exp(.8*n.y/this.a))-Math.PI/4);return n.x=t,n.y=e,n}var KE=["Miller_Cylindrical","mill"];const $E={init:JE,forward:jE,inverse:QE,names:KE};var ZE=20;function tS(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=jc(this.es)}function eS(n){var t,e,r=n.x,i=n.y;if(r=ot(r-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var s=this.n*Math.sin(i),o=ZE;o;--o){var a=(this.m*i+Math.sin(i)-s)/(this.m+Math.cos(i));if(i-=a,Math.abs(a)<et)break}t=this.a*this.C_x*r*(this.m+Math.cos(i)),e=this.a*this.C_y*i}else{var u=Math.sin(i),l=Math.cos(i);e=this.a*la(i,u,l,this.en),t=this.a*r*l/Math.sqrt(1-this.es*u*u)}return n.x=t,n.y=e,n}function rS(n){var t,e,r,i;return n.x-=this.x0,r=n.x/this.a,n.y-=this.y0,t=n.y/this.a,this.sphere?(t/=this.C_y,r=r/(this.C_x*(this.m+Math.cos(t))),this.m?t=Ns((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Ns(Math.sin(t)/this.n)),r=ot(r+this.long0),t=Ms(t)):(t=Qc(n.y/this.a,this.es,this.en),i=Math.abs(t),i<J?(i=Math.sin(t),e=this.long0+n.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(t)),r=ot(e)):i-et<J&&(r=this.long0)),n.x=r,n.y=t,n}var nS=["Sinusoidal","sinu"];const iS={init:tS,forward:eS,inverse:rS,names:nS};function sS(){}function oS(n){for(var t=n.x,e=n.y,r=ot(t-this.long0),i=e,s=Math.PI*Math.sin(e);;){var o=-(i+Math.sin(i)-s)/(1+Math.cos(i));if(i+=o,Math.abs(o)<et)break}i/=2,Math.PI/2-Math.abs(e)<et&&(r=0);var a=.900316316158*this.a*r*Math.cos(i)+this.x0,u=1.4142135623731*this.a*Math.sin(i)+this.y0;return n.x=a,n.y=u,n}function aS(n){var t,e;n.x-=this.x0,n.y-=this.y0,e=n.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var r=ot(this.long0+n.x/(.900316316158*this.a*Math.cos(t)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var i=Math.asin(e);return n.x=r,n.y=i,n}var uS=["Mollweide","moll"];const lS={init:sS,forward:oS,inverse:aS,names:uS};function hS(){Math.abs(this.lat1+this.lat2)<et||(this.lat2=this.lat2||this.lat1,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=zu(this.es),this.e2=qu(this.es),this.e3=Wu(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ii(this.e,this.sinphi,this.cosphi),this.ml1=Or(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<et?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ii(this.e,this.sinphi,this.cosphi),this.ml2=Or(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Or(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function cS(n){var t=n.x,e=n.y,r;if(this.sphere)r=this.a*(this.g-e);else{var i=Or(this.e0,this.e1,this.e2,this.e3,e);r=this.a*(this.g-i)}var s=this.ns*ot(t-this.long0),o=this.x0+r*Math.sin(s),a=this.y0+this.rh-r*Math.cos(s);return n.x=o,n.y=a,n}function fS(n){n.x-=this.x0,n.y=this.rh-n.y+this.y0;var t,e,r,i;this.ns>=0?(e=Math.sqrt(n.x*n.x+n.y*n.y),t=1):(e=-Math.sqrt(n.x*n.x+n.y*n.y),t=-1);var s=0;if(e!==0&&(s=Math.atan2(t*n.x,t*n.y)),this.sphere)return i=ot(this.long0+s/this.ns),r=Ms(this.g-e/this.a),n.x=i,n.y=r,n;var o=this.g-e/this.a;return r=ah(o,this.e0,this.e1,this.e2,this.e3),i=ot(this.long0+s/this.ns),n.x=i,n.y=r,n}var dS=["Equidistant_Conic","eqdc"];const gS={init:hS,forward:cS,inverse:fS,names:dS};function pS(){this.R=this.a}function vS(n){var t=n.x,e=n.y,r=ot(t-this.long0),i,s;Math.abs(e)<=et&&(i=this.x0+this.R*r,s=this.y0);var o=Ns(2*Math.abs(e/Math.PI));(Math.abs(r)<=et||Math.abs(Math.abs(e)-J)<=et)&&(i=this.x0,e>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*o):s=this.y0+Math.PI*this.R*-Math.tan(.5*o));var a=.5*Math.abs(Math.PI/r-r/Math.PI),u=a*a,l=Math.sin(o),c=Math.cos(o),h=c/(l+c-1),f=h*h,d=h*(2/l-1),v=d*d,_=Math.PI*this.R*(a*(h-v)+Math.sqrt(u*(h-v)*(h-v)-(v+u)*(f-v)))/(v+u);r<0&&(_=-_),i=this.x0+_;var E=u+h;return _=Math.PI*this.R*(d*E-a*Math.sqrt((v+u)*(u+1)-E*E))/(v+u),e>=0?s=this.y0+_:s=this.y0-_,n.x=i,n.y=s,n}function mS(n){var t,e,r,i,s,o,a,u,l,c,h,f,d;return n.x-=this.x0,n.y-=this.y0,h=Math.PI*this.R,r=n.x/h,i=n.y/h,s=r*r+i*i,o=-Math.abs(i)*(1+s),a=o-2*i*i+r*r,u=-2*o+1+2*i*i+s*s,d=i*i/u+(2*a*a*a/u/u/u-9*o*a/u/u)/27,l=(o-a*a/3/u)/u,c=2*Math.sqrt(-l/3),h=3*d/l/c,Math.abs(h)>1&&(h>=0?h=1:h=-1),f=Math.acos(h)/3,n.y>=0?e=(-c*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI:e=-(-c*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI,Math.abs(r)<et?t=this.long0:t=ot(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(r*r-i*i)+s*s))/2/r),n.x=t,n.y=e,n}var yS=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const _S={init:pS,forward:vS,inverse:mS,names:yS};function Kp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function wS(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var ef={exports:{}},$p;function ES(){return $p||($p=1,function(n){(function(t){var e={};e.Constants={},e.Math={},e.Accumulator={},function(r){r.WGS84={a:6378137,f:.0033528106647474805},r.version={major:2,minor:1,patch:1},r.version_string="2.1.1"}(e.Constants),function(r){r.digits=53,r.epsilon=Math.pow(.5,r.digits-1),r.degree=Math.PI/180,r.sq=function(i){return i*i},r.hypot=function(i,s){return Math.sqrt(i*i+s*s)},r.cbrt=Math.cbrt||function(i){var s=Math.pow(Math.abs(i),.3333333333333333);return i>0?s:i<0?-s:i},r.log1p=Math.log1p||function(i){var s=1+i,o=s-1;return o===0?i:i*Math.log(s)/o},r.atanh=Math.atanh||function(i){var s=Math.abs(i);return s=r.log1p(2*s/(1-s))/2,i>0?s:i<0?-s:i},r.copysign=function(i,s){return Math.abs(i)*(s<0||s===0&&1/s<0?-1:1)},r.sum=function(i,s){var o=i+s,a=o-s,u=o-a,l;return a-=i,u-=s,l=o&&0-(a+u),{s:o,t:l}},r.polyval=function(i,s,o,a){for(var u=i<0?0:s[o++];--i>=0;)u=u*a+s[o++];return u},r.AngRound=function(i){var s=.0625,o=Math.abs(i);return o=o<s?s-(s-o):o,r.copysign(o,i)},r.remainder=function(i,s){return i%=s,i<-s/2?i+s:i<s/2?i:i-s},r.AngNormalize=function(i){var s=r.remainder(i,360);return Math.abs(s)===180?r.copysign(180,i):s},r.LatFix=function(i){return Math.abs(i)>90?NaN:i},r.AngDiff=function(i,s){var o=r.sum(r.remainder(-i,360),r.remainder(s,360)),a,u;return o=r.sum(r.remainder(o.s,360),o.t),a=o.s,u=o.t,(a===0||Math.abs(a)===180)&&(a=r.copysign(a,u===0?s-i:-u)),{d:a,e:u}},r.sincosd=function(i){var s,o,a,u,l,c,h;switch(s=i%360,a=Math.round(s/90),s-=90*a,o=s*this.degree,u=Math.sin(o),l=Math.cos(o),Math.abs(s)===45?(l=Math.sqrt(.5),u=r.copysign(l,o)):Math.abs(s)===30&&(l=Math.sqrt(.75),u=r.copysign(.5,o)),a&3){case 0:c=u,h=l;break;case 1:c=l,h=-u;break;case 2:c=-u,h=-l;break;default:c=-l,h=u;break}return h+=0,c===0&&(c=r.copysign(c,i)),{s:c,c:h}},r.sincosde=function(i,s){var o,a,u,l,c,h,f;switch(o=i%360,u=Math.round(o/90),o=r.AngRound(o-90*u+s),a=o*this.degree,l=Math.sin(a),c=Math.cos(a),Math.abs(o)===45?(c=Math.sqrt(.5),l=r.copysign(c,a)):Math.abs(o)===30&&(c=Math.sqrt(.75),l=r.copysign(.5,a)),u&3){case 0:h=l,f=c;break;case 1:h=c,f=-l;break;case 2:h=-l,f=-c;break;default:h=-c,f=l;break}return f+=0,h===0&&(h=r.copysign(h,i+s)),{s:h,c:f}},r.atan2d=function(i,s){var o=0,a;switch(Math.abs(i)>Math.abs(s)&&([i,s]=[s,i],o=2),r.copysign(1,s)<0&&(s=-s,++o),a=Math.atan2(i,s)/this.degree,o){case 1:a=r.copysign(180,i)-a;break;case 2:a=90-a;break;case 3:a=-90+a;break}return a}}(e.Math),function(r,i){r.Accumulator=function(s){this.Set(s)},r.Accumulator.prototype.Set=function(s){s||(s=0),s.constructor===r.Accumulator?(this._s=s._s,this._t=s._t):(this._s=s,this._t=0)},r.Accumulator.prototype.Add=function(s){var o=i.sum(s,this._t),a=i.sum(o.s,this._s);o=o.t,this._s=a.s,this._t=a.t,this._s===0?this._s=o:this._t+=o},r.Accumulator.prototype.Sum=function(s){var o;return s?(o=new r.Accumulator(this),o.Add(s),o._s):this._s},r.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},r.Accumulator.prototype.Remainder=function(s){this._s=i.remainder(this._s,s),this.Add(0)}}(e.Accumulator,e.Math),e.Geodesic={},e.GeodesicLine={},e.PolygonArea={},function(r,i,s,o,a){var u=6,l=u,c=u,h=u,f=h,d,v,_=20,E=_+o.digits+10,P=o.epsilon,y=200*P,w=Math.sqrt(P),m=P,S=1e3*w,C=0,I=31,b=32640,x,A,N,T,L,U,K,Y,Z;r.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),r.nC1_=u,r.nC1p_=u,r.nC2_=u,r.nC3_=u,r.nC4_=u,d=r.nC3_*(r.nC3_-1)/2,v=r.nC4_*(r.nC4_+1)/2,r.CAP_C1=1,r.CAP_C1p=2,r.CAP_C2=4,r.CAP_C3=8,r.CAP_C4=16,r.NONE=0,r.ARC=64,r.LATITUDE=128|C,r.LONGITUDE=256|r.CAP_C3,r.AZIMUTH=512|C,r.DISTANCE=1024|r.CAP_C1,r.STANDARD=r.LATITUDE|r.LONGITUDE|r.AZIMUTH|r.DISTANCE,r.DISTANCE_IN=2048|r.CAP_C1|r.CAP_C1p,r.REDUCEDLENGTH=4096|r.CAP_C1|r.CAP_C2,r.GEODESICSCALE=8192|r.CAP_C1|r.CAP_C2,r.AREA=16384|r.CAP_C4,r.ALL=b|I,r.LONG_UNROLL=32768,r.OUT_MASK=b|r.LONG_UNROLL,r.SinCosSeries=function(G,W,k,V){var O=V.length,q=O-(G?1:0),X=2*(k-W)*(k+W),rt=q&1?V[--O]:0,lt=0;for(q=Math.floor(q/2);q--;)lt=X*rt-lt+V[--O],rt=X*lt-rt+V[--O];return G?2*W*k*rt:k*(rt-lt)},x=function(G,W){var k,V=o.sq(G),O=o.sq(W),q=(V+O-1)/6,X,rt,lt,nt,_t,it,Ct,It,Q,wt,bt;return O===0&&q<=0?k=0:(X=V*O/4,rt=o.sq(q),lt=q*rt,nt=X*(X+2*lt),_t=q,nt>=0?(it=X+lt,it+=it<0?-Math.sqrt(nt):Math.sqrt(nt),Ct=o.cbrt(it),_t+=Ct+(Ct!==0?rt/Ct:0)):(It=Math.atan2(Math.sqrt(-nt),-(X+lt)),_t+=2*q*Math.cos(It/3)),Q=Math.sqrt(o.sq(_t)+O),wt=_t<0?O/(Q-_t):_t+Q,bt=(wt-O)/(2*Q),k=wt/(Math.sqrt(wt+o.sq(bt))+bt)),k},A=[1,4,64,0,256],r.A1m1f=function(G){var W=Math.floor(l/2),k=o.polyval(W,A,0,o.sq(G))/A[W+1];return(k+G)/(1-G)},N=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],r.C1f=function(G,W){var k=o.sq(G),V=G,O=0,q,X;for(q=1;q<=r.nC1_;++q)X=Math.floor((r.nC1_-q)/2),W[q]=V*o.polyval(X,N,O,k)/N[O+X+1],O+=X+2,V*=G},T=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],r.C1pf=function(G,W){var k=o.sq(G),V=G,O=0,q,X;for(q=1;q<=r.nC1p_;++q)X=Math.floor((r.nC1p_-q)/2),W[q]=V*o.polyval(X,T,O,k)/T[O+X+1],O+=X+2,V*=G},L=[-11,-28,-192,0,256],r.A2m1f=function(G){var W=Math.floor(c/2),k=o.polyval(W,L,0,o.sq(G))/L[W+1];return(k-G)/(1+G)},U=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],r.C2f=function(G,W){var k=o.sq(G),V=G,O=0,q,X;for(q=1;q<=r.nC2_;++q)X=Math.floor((r.nC2_-q)/2),W[q]=V*o.polyval(X,U,O,k)/U[O+X+1],O+=X+2,V*=G},r.Geodesic=function(G,W){if(this.a=G,this.f=W,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/o.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(o.sq(this.a)+o.sq(this._b)*(this._e2===0?1:(this._e2>0?o.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*w/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(f),this._C3x=new Array(d),this._C4x=new Array(v),this.A3coeff(),this.C3coeff(),this.C4coeff()},K=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],r.Geodesic.prototype.A3coeff=function(){var G=0,W=0,k,V;for(k=h-1;k>=0;--k)V=Math.min(h-k-1,k),this._A3x[W++]=o.polyval(V,K,G,this._n)/K[G+V+1],G+=V+2},Y=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],r.Geodesic.prototype.C3coeff=function(){var G=0,W=0,k,V,O;for(k=1;k<r.nC3_;++k)for(V=r.nC3_-1;V>=k;--V)O=Math.min(r.nC3_-V-1,V),this._C3x[W++]=o.polyval(O,Y,G,this._n)/Y[G+O+1],G+=O+2},Z=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],r.Geodesic.prototype.C4coeff=function(){var G=0,W=0,k,V,O;for(k=0;k<r.nC4_;++k)for(V=r.nC4_-1;V>=k;--V)O=r.nC4_-V-1,this._C4x[W++]=o.polyval(O,Z,G,this._n)/Z[G+O+1],G+=O+2},r.Geodesic.prototype.A3f=function(G){return o.polyval(f-1,this._A3x,0,G)},r.Geodesic.prototype.C3f=function(G,W){var k=1,V=0,O,q;for(O=1;O<r.nC3_;++O)q=r.nC3_-O-1,k*=G,W[O]=k*o.polyval(q,this._C3x,V,G),V+=q+1},r.Geodesic.prototype.C4f=function(G,W){var k=1,V=0,O,q;for(O=0;O<r.nC4_;++O)q=r.nC4_-O-1,W[O]=k*o.polyval(q,this._C4x,V,G),V+=q+1,k*=G},r.Geodesic.prototype.Lengths=function(G,W,k,V,O,q,X,rt,lt,nt,_t,it,Ct){_t&=r.OUT_MASK;var It={},Q=0,wt=0,bt=0,Lt=0,Ht,Xt,Qt,de,qe;if(_t&(r.DISTANCE|r.REDUCEDLENGTH|r.GEODESICSCALE)&&(bt=r.A1m1f(G),r.C1f(G,it),_t&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(Lt=r.A2m1f(G),r.C2f(G,Ct),Q=bt-Lt,Lt=1+Lt),bt=1+bt),_t&r.DISTANCE)Ht=r.SinCosSeries(!0,q,X,it)-r.SinCosSeries(!0,k,V,it),It.s12b=bt*(W+Ht),_t&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(Xt=r.SinCosSeries(!0,q,X,Ct)-r.SinCosSeries(!0,k,V,Ct),wt=Q*W+(bt*Ht-Lt*Xt));else if(_t&(r.REDUCEDLENGTH|r.GEODESICSCALE)){for(Qt=1;Qt<=r.nC2_;++Qt)Ct[Qt]=bt*it[Qt]-Lt*Ct[Qt];wt=Q*W+(r.SinCosSeries(!0,q,X,Ct)-r.SinCosSeries(!0,k,V,Ct))}return _t&r.REDUCEDLENGTH&&(It.m0=Q,It.m12b=rt*(V*q)-O*(k*X)-V*X*wt),_t&r.GEODESICSCALE&&(de=V*X+k*q,qe=this._ep2*(lt-nt)*(lt+nt)/(O+rt),It.M12=de+(qe*q-X*wt)*k/O,It.M21=de-(qe*k-V*wt)*q/rt),It},r.Geodesic.prototype.InverseStart=function(G,W,k,V,O,q,X,rt,lt,nt,_t){var it={},Ct=V*W-O*G,It=O*W+V*G,Q,wt,bt,Lt,Ht,Xt,Qt,de,qe,Bt,Ft,Vt,ye,De,Kn,io,ql,Ki,Kt,nn,Tr,sn,wn;return it.sig12=-1,Q=V*W,Q+=O*G,wt=It>=0&&Ct<.5&&O*X<.5,wt?(Lt=o.sq(G+V),Lt/=Lt+o.sq(W+O),it.dnm=Math.sqrt(1+this._ep2*Lt),bt=X/(this._f1*it.dnm),Ht=Math.sin(bt),Xt=Math.cos(bt)):(Ht=rt,Xt=lt),it.salp1=O*Ht,it.calp1=Xt>=0?Ct+O*G*o.sq(Ht)/(1+Xt):Q-O*G*o.sq(Ht)/(1-Xt),de=o.hypot(it.salp1,it.calp1),qe=G*V+W*O*Xt,wt&&de<this._etol2?(it.salp2=W*Ht,it.calp2=Ct-W*V*(Xt>=0?o.sq(Ht)/(1+Xt):1-Xt),Qt=o.hypot(it.salp2,it.calp2),it.salp2/=Qt,it.calp2/=Qt,it.sig12=Math.atan2(de,qe)):Math.abs(this._n)>.1||qe>=0||de>=6*Math.abs(this._n)*Math.PI*o.sq(W)||(wn=Math.atan2(-rt,-lt),this.f>=0?(De=o.sq(G)*this._ep2,Kn=De/(2*(1+Math.sqrt(1+De))+De),Vt=this.f*W*this.A3f(Kn)*Math.PI,ye=Vt*W,Bt=wn/Vt,Ft=Q/ye):(io=O*W-V*G,ql=Math.atan2(Q,io),nn=this.Lengths(this._n,Math.PI+ql,G,-W,k,V,O,q,W,O,r.REDUCEDLENGTH,nt,_t),Ki=nn.m12b,Kt=nn.m0,Bt=-1+Ki/(W*O*Kt*Math.PI),ye=Bt<-.01?Q/Bt:-this.f*o.sq(W)*Math.PI,Vt=ye/W,Ft=X/Vt),Ft>-y&&Bt>-1-S?this.f>=0?(it.salp1=Math.min(1,-Bt),it.calp1=-Math.sqrt(1-o.sq(it.salp1))):(it.calp1=Math.max(Bt>-y?0:-1,Bt),it.salp1=Math.sqrt(1-o.sq(it.calp1))):(Tr=x(Bt,Ft),sn=Vt*(this.f>=0?-Bt*Tr/(1+Tr):-Ft*(1+Tr)/Tr),Ht=Math.sin(sn),Xt=-Math.cos(sn),it.salp1=O*Ht,it.calp1=Q-O*G*o.sq(Ht)/(1-Xt))),it.salp1<=0?(it.salp1=1,it.calp1=0):(Qt=o.hypot(it.salp1,it.calp1),it.salp1/=Qt,it.calp1/=Qt),it},r.Geodesic.prototype.Lambda12=function(G,W,k,V,O,q,X,rt,lt,nt,_t,it,Ct,It){var Q={},wt,bt,Lt,Ht,Xt,Qt,de,qe,Bt,Ft,Vt,ye,De;return G===0&&rt===0&&(rt=-r.tiny_),bt=X*W,Lt=o.hypot(rt,X*G),Q.ssig1=G,Ht=bt*G,Q.csig1=Xt=rt*W,wt=o.hypot(Q.ssig1,Q.csig1),Q.ssig1/=wt,Q.csig1/=wt,Q.salp2=O!==W?bt/O:X,Q.calp2=O!==W||Math.abs(V)!==-G?Math.sqrt(o.sq(rt*W)+(W<-G?(O-W)*(W+O):(G-V)*(G+V)))/O:Math.abs(rt),Q.ssig2=V,Qt=bt*V,Q.csig2=de=Q.calp2*O,wt=o.hypot(Q.ssig2,Q.csig2),Q.ssig2/=wt,Q.csig2/=wt,Q.sig12=Math.atan2(Math.max(0,Q.csig1*Q.ssig2-Q.ssig1*Q.csig2),Q.csig1*Q.csig2+Q.ssig1*Q.ssig2),qe=Math.max(0,Xt*Qt-Ht*de),Bt=Xt*de+Ht*Qt,Vt=Math.atan2(qe*nt-Bt*lt,Bt*nt+qe*lt),ye=o.sq(Lt)*this._ep2,Q.eps=ye/(2*(1+Math.sqrt(1+ye))+ye),this.C3f(Q.eps,It),Ft=r.SinCosSeries(!0,Q.ssig2,Q.csig2,It)-r.SinCosSeries(!0,Q.ssig1,Q.csig1,It),Q.domg12=-this.f*this.A3f(Q.eps)*bt*(Q.sig12+Ft),Q.lam12=Vt+Q.domg12,_t&&(Q.calp2===0?Q.dlam12=-2*this._f1*k/G:(De=this.Lengths(Q.eps,Q.sig12,Q.ssig1,Q.csig1,k,Q.ssig2,Q.csig2,q,W,O,r.REDUCEDLENGTH,it,Ct),Q.dlam12=De.m12b,Q.dlam12*=this._f1/(Q.calp2*O))),Q},r.Geodesic.prototype.Inverse=function(G,W,k,V,O){var q,X;return O||(O=r.STANDARD),O===r.LONG_UNROLL&&(O|=r.STANDARD),O&=r.OUT_MASK,q=this.InverseInt(G,W,k,V,O),X=q.vals,O&r.AZIMUTH&&(X.azi1=o.atan2d(q.salp1,q.calp1),X.azi2=o.atan2d(q.salp2,q.calp2)),X},r.Geodesic.prototype.InverseInt=function(G,W,k,V,O){var q={},X,rt,lt,nt,_t,it,Ct,It,Q,wt,bt,Lt,Ht,Xt,Qt,de,qe,Bt,Ft,Vt,ye,De,Kn,io,ql,Ki,Kt,nn,Tr,sn,wn,pc,vc,Nu,$o,Wl,Hl,Xl,Bl,mc,Ig,xu,Mg,yc,bg,Ng,xg,hy,Tg,_c,Ag,wc,cy,Ec,fy,dy,Yl,Sc,Jl,Og,Dg,Cc,Pc,Lg,Rg;if(q.lat1=G=o.LatFix(G),q.lat2=k=o.LatFix(k),G=o.AngRound(G),k=o.AngRound(k),X=o.AngDiff(W,V),rt=X.e,X=X.d,O&r.LONG_UNROLL?(q.lon1=W,q.lon2=W+X+rt):(q.lon1=o.AngNormalize(W),q.lon2=o.AngNormalize(V)),lt=o.copysign(1,X),X*=lt,rt*=lt,Qt=X*o.degree,nt=o.sincosde(X,rt),de=nt.s,qe=nt.c,rt=180-X-rt,_t=Math.abs(G)<Math.abs(k)||isNaN(k)?-1:1,_t<0&&(lt*=-1,[k,G]=[G,k]),it=o.copysign(1,-G),G*=it,k*=it,nt=o.sincosd(G),Ct=this._f1*nt.s,It=nt.c,nt=o.hypot(Ct,It),Ct/=nt,It/=nt,It=Math.max(r.tiny_,It),nt=o.sincosd(k),Q=this._f1*nt.s,wt=nt.c,nt=o.hypot(Q,wt),Q/=nt,wt/=nt,wt=Math.max(r.tiny_,wt),It<-Ct?wt===It&&(Q=o.copysign(Ct,Q)):Math.abs(Q)===-Ct&&(wt=It),Ht=Math.sqrt(1+this._ep2*o.sq(Ct)),Xt=Math.sqrt(1+this._ep2*o.sq(Q)),Kn=new Array(r.nC1_+1),io=new Array(r.nC2_+1),ql=new Array(r.nC3_),Ki=G===-90||de===0,Ki&&(Ft=qe,Vt=de,ye=1,De=0,nn=Ct,Tr=Ft*It,sn=Q,wn=ye*wt,Bt=Math.atan2(Math.max(0,Tr*sn-nn*wn),Tr*wn+nn*sn),Kt=this.Lengths(this._n,Bt,nn,Tr,Ht,sn,wn,Xt,It,wt,O|r.DISTANCE|r.REDUCEDLENGTH,Kn,io),bt=Kt.s12b,Lt=Kt.m12b,O&r.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Bt<1||Lt>=0?((Bt<3*r.tiny_||Bt<P&&(bt<0||Lt<0))&&(Bt=Lt=bt=0),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree):Ki=!1),Yl=2,!Ki&&Ct===0&&(this.f<=0||rt>=this.f*180))Ft=ye=0,Vt=De=1,bt=this.a*Qt,Bt=vc=Qt/this._f1,Lt=this._b*Math.sin(Bt),O&r.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt)),q.a12=X/this._f1;else if(!Ki)if(Kt=this.InverseStart(Ct,It,Ht,Q,wt,Xt,Qt,de,qe,Kn,io),Bt=Kt.sig12,Vt=Kt.salp1,Ft=Kt.calp1,Bt>=0)De=Kt.salp2,ye=Kt.calp2,Nu=Kt.dnm,bt=Bt*this._b*Nu,Lt=o.sq(Nu)*this._b*Math.sin(Bt/Nu),O&r.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt/Nu)),q.a12=Bt/o.degree,vc=Qt/(this._f1*Nu);else{for($o=0,Wl=r.tiny_,Hl=1,Xl=r.tiny_,Bl=-1,mc=!1,Ig=!1;Kt=this.Lambda12(Ct,It,Ht,Q,wt,Xt,Vt,Ft,de,qe,$o<_,Kn,io,ql),xu=Kt.lam12,De=Kt.salp2,ye=Kt.calp2,Bt=Kt.sig12,nn=Kt.ssig1,Tr=Kt.csig1,sn=Kt.ssig2,wn=Kt.csig2,pc=Kt.eps,Jl=Kt.domg12,Mg=Kt.dlam12,!(Ig||!(Math.abs(xu)>=(mc?8:1)*P)||$o==E);++$o){if(xu>0&&($o<_||Ft/Vt>Bl/Xl)?(Xl=Vt,Bl=Ft):xu<0&&($o<_||Ft/Vt<Hl/Wl)&&(Wl=Vt,Hl=Ft),$o<_&&Mg>0&&(yc=-xu/Mg,Math.abs(yc)<Math.PI&&(bg=Math.sin(yc),Ng=Math.cos(yc),xg=Vt*Ng+Ft*bg,xg>0))){Ft=Ft*Ng-Vt*bg,Vt=xg,nt=o.hypot(Vt,Ft),Vt/=nt,Ft/=nt,mc=Math.abs(xu)<=16*P;continue}Vt=(Wl+Xl)/2,Ft=(Hl+Bl)/2,nt=o.hypot(Vt,Ft),Vt/=nt,Ft/=nt,mc=!1,Ig=Math.abs(Wl-Vt)+(Hl-Ft)<m||Math.abs(Vt-Xl)+(Ft-Bl)<m}hy=O|(O&(r.REDUCEDLENGTH|r.GEODESICSCALE)?r.DISTANCE:r.NONE),Kt=this.Lengths(pc,Bt,nn,Tr,Ht,sn,wn,Xt,It,wt,hy,Kn,io),bt=Kt.s12b,Lt=Kt.m12b,O&r.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree,O&r.AREA&&(Lg=Math.sin(Jl),Rg=Math.cos(Jl),Yl=de*Rg-qe*Lg,Sc=qe*Rg+de*Lg)}return O&r.DISTANCE&&(q.s12=0+bt),O&r.REDUCEDLENGTH&&(q.m12=0+Lt),O&r.AREA&&(Tg=Vt*It,_c=o.hypot(Ft,Vt*Ct),_c!==0&&Tg!==0?(nn=Ct,Tr=Ft*It,sn=Q,wn=ye*wt,wc=o.sq(_c)*this._ep2,pc=wc/(2*(1+Math.sqrt(1+wc))+wc),cy=o.sq(this.a)*_c*Tg*this._e2,nt=o.hypot(nn,Tr),nn/=nt,Tr/=nt,nt=o.hypot(sn,wn),sn/=nt,wn/=nt,Ec=new Array(r.nC4_),this.C4f(pc,Ec),fy=r.SinCosSeries(!1,nn,Tr,Ec),dy=r.SinCosSeries(!1,sn,wn,Ec),q.S12=cy*(dy-fy)):q.S12=0,!Ki&&Yl==2&&(Yl=Math.sin(vc),Sc=Math.cos(vc)),!Ki&&Sc>-.7071&&Q-Ct<1.75?(Jl=1+Sc,Og=1+It,Dg=1+wt,Ag=2*Math.atan2(Yl*(Ct*Dg+Q*Og),Jl*(Ct*Q+Og*Dg))):(Cc=De*Ft-ye*Vt,Pc=ye*Ft+De*Vt,Cc===0&&Pc<0&&(Cc=r.tiny_*Ft,Pc=-1),Ag=Math.atan2(Cc,Pc)),q.S12+=this._c2*Ag,q.S12*=_t*lt*it,q.S12+=0),_t<0&&([De,Vt]=[Vt,De],[ye,Ft]=[Ft,ye],O&r.GEODESICSCALE&&([q.M21,q.M12]=[q.M12,q.M21])),Vt*=_t*lt,Ft*=_t*it,De*=_t*lt,ye*=_t*it,{vals:q,salp1:Vt,calp1:Ft,salp2:De,calp2:ye}},r.Geodesic.prototype.GenDirect=function(G,W,k,V,O,q){var X;return q?q===r.LONG_UNROLL&&(q|=r.STANDARD):q=r.STANDARD,V||(q|=r.DISTANCE_IN),X=new i.GeodesicLine(this,G,W,k,q),X.GenPosition(V,O,q)},r.Geodesic.prototype.Direct=function(G,W,k,V,O){return this.GenDirect(G,W,k,!1,V,O)},r.Geodesic.prototype.ArcDirect=function(G,W,k,V,O){return this.GenDirect(G,W,k,!0,V,O)},r.Geodesic.prototype.Line=function(G,W,k,V){return new i.GeodesicLine(this,G,W,k,V)},r.Geodesic.prototype.DirectLine=function(G,W,k,V,O){return this.GenDirectLine(G,W,k,!1,V,O)},r.Geodesic.prototype.ArcDirectLine=function(G,W,k,V,O){return this.GenDirectLine(G,W,k,!0,V,O)},r.Geodesic.prototype.GenDirectLine=function(G,W,k,V,O,q){var X;return q||(q=r.STANDARD|r.DISTANCE_IN),V||(q|=r.DISTANCE_IN),X=new i.GeodesicLine(this,G,W,k,q),X.GenSetDistance(V,O),X},r.Geodesic.prototype.InverseLine=function(G,W,k,V,O){var q,X,rt;return O||(O=r.STANDARD|r.DISTANCE_IN),q=this.InverseInt(G,W,k,V,r.ARC),rt=o.atan2d(q.salp1,q.calp1),O&(r.OUT_MASK&r.DISTANCE_IN)&&(O|=r.DISTANCE),X=new i.GeodesicLine(this,G,W,rt,O,q.salp1,q.calp1),X.SetArc(q.vals.a12),X},r.Geodesic.prototype.Polygon=function(G){return new s.PolygonArea(this,G)},r.WGS84=new r.Geodesic(a.WGS84.a,a.WGS84.f)}(e.Geodesic,e.GeodesicLine,e.PolygonArea,e.Math,e.Constants),function(r,i,s){i.GeodesicLine=function(o,a,u,l,c,h,f){var d,v,_,E,P,y;c||(c=r.STANDARD|r.DISTANCE_IN),this.a=o.a,this.f=o.f,this._b=o._b,this._c2=o._c2,this._f1=o._f1,this.caps=c|r.LATITUDE|r.AZIMUTH|r.LONG_UNROLL,this.lat1=s.LatFix(a),this.lon1=u,typeof h>"u"||typeof f>"u"?(this.azi1=s.AngNormalize(l),d=s.sincosd(s.AngRound(this.azi1)),this.salp1=d.s,this.calp1=d.c):(this.azi1=l,this.salp1=h,this.calp1=f),d=s.sincosd(s.AngRound(this.lat1)),_=this._f1*d.s,v=d.c,d=s.hypot(_,v),_/=d,v/=d,v=Math.max(r.tiny_,v),this._dn1=Math.sqrt(1+o._ep2*s.sq(_)),this._salp0=this.salp1*v,this._calp0=s.hypot(this.calp1,this.salp1*_),this._ssig1=_,this._somg1=this._salp0*_,this._csig1=this._comg1=_!==0||this.calp1!==0?v*this.calp1:1,d=s.hypot(this._ssig1,this._csig1),this._ssig1/=d,this._csig1/=d,this._k2=s.sq(this._calp0)*o._ep2,E=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&r.CAP_C1&&(this._A1m1=r.A1m1f(E),this._C1a=new Array(r.nC1_+1),r.C1f(E,this._C1a),this._B11=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),P=Math.sin(this._B11),y=Math.cos(this._B11),this._stau1=this._ssig1*y+this._csig1*P,this._ctau1=this._csig1*y-this._ssig1*P),this.caps&r.CAP_C1p&&(this._C1pa=new Array(r.nC1p_+1),r.C1pf(E,this._C1pa)),this.caps&r.CAP_C2&&(this._A2m1=r.A2m1f(E),this._C2a=new Array(r.nC2_+1),r.C2f(E,this._C2a),this._B21=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&r.CAP_C3&&(this._C3a=new Array(r.nC3_),o.C3f(E,this._C3a),this._A3c=-this.f*this._salp0*o.A3f(E),this._B31=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&r.CAP_C4&&(this._C4a=new Array(r.nC4_),o.C4f(E,this._C4a),this._A4=s.sq(this.a)*this._calp0*this._salp0*o._e2,this._B41=r.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},i.GeodesicLine.prototype.GenPosition=function(o,a,u){var l={},c,h,f,d,v,_,E,P,y,w,m,S,C,I,b,x,A,N,T,L,U,K,Y,Z,G,W,k,V,O;return u?u===r.LONG_UNROLL&&(u|=r.STANDARD):u=r.STANDARD,u&=this.caps&r.OUT_MASK,l.lat1=this.lat1,l.azi1=this.azi1,l.lon1=u&r.LONG_UNROLL?this.lon1:s.AngNormalize(this.lon1),o?l.a12=a:l.s12=a,o||this.caps&r.DISTANCE_IN&r.OUT_MASK?(d=0,v=0,o?(c=a*s.degree,W=s.sincosd(a),h=W.s,f=W.c):(P=a/(this._b*(1+this._A1m1)),y=Math.sin(P),w=Math.cos(P),d=-r.SinCosSeries(!0,this._stau1*w+this._ctau1*y,this._ctau1*w-this._stau1*y,this._C1pa),c=P-(d-this._B11),h=Math.sin(c),f=Math.cos(c),Math.abs(this.f)>.01&&(_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,d=r.SinCosSeries(!0,_,E,this._C1a),m=(1+this._A1m1)*(c+(d-this._B11))-a/this._b,c=c-m/Math.sqrt(1+this._k2*s.sq(_)),h=Math.sin(c),f=Math.cos(c))),_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,K=Math.sqrt(1+this._k2*s.sq(_)),u&(r.DISTANCE|r.REDUCEDLENGTH|r.GEODESICSCALE)&&((o||Math.abs(this.f)>.01)&&(d=r.SinCosSeries(!0,_,E,this._C1a)),v=(1+this._A1m1)*(d-this._B11)),x=this._calp0*_,A=s.hypot(this._salp0,this._calp0*E),A===0&&(A=E=r.tiny_),L=this._salp0,U=this._calp0*E,o&&u&r.DISTANCE&&(l.s12=this._b*((1+this._A1m1)*c+v)),u&r.LONGITUDE&&(N=this._salp0*_,T=E,b=s.copysign(1,this._salp0),S=u&r.LONG_UNROLL?b*(c-(Math.atan2(_,E)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(b*N,T)-Math.atan2(b*this._somg1,this._comg1))):Math.atan2(N*this._comg1-T*this._somg1,T*this._comg1+N*this._somg1),C=S+this._A3c*(c+(r.SinCosSeries(!0,_,E,this._C3a)-this._B31)),I=C/s.degree,l.lon2=u&r.LONG_UNROLL?this.lon1+I:s.AngNormalize(s.AngNormalize(this.lon1)+s.AngNormalize(I))),u&r.LATITUDE&&(l.lat2=s.atan2d(x,this._f1*A)),u&r.AZIMUTH&&(l.azi2=s.atan2d(L,U)),u&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(Y=r.SinCosSeries(!0,_,E,this._C2a),Z=(1+this._A2m1)*(Y-this._B21),G=(this._A1m1-this._A2m1)*c+(v-Z),u&r.REDUCEDLENGTH&&(l.m12=this._b*(K*(this._csig1*_)-this._dn1*(this._ssig1*E)-this._csig1*E*G)),u&r.GEODESICSCALE&&(W=this._k2*(_-this._ssig1)*(_+this._ssig1)/(this._dn1+K),l.M12=f+(W*_-E*G)*this._ssig1/this._dn1,l.M21=f-(W*this._ssig1-this._csig1*G)*_/K)),u&r.AREA&&(k=r.SinCosSeries(!1,_,E,this._C4a),this._calp0===0||this._salp0===0?(V=L*this.calp1-U*this.salp1,O=U*this.calp1+L*this.salp1):(V=this._calp0*this._salp0*(f<=0?this._csig1*(1-f)+h*this._ssig1:h*(this._csig1*h/(1+f)+this._ssig1)),O=s.sq(this._salp0)+s.sq(this._calp0)*this._csig1*E),l.S12=this._c2*Math.atan2(V,O)+this._A4*(k-this._B41)),o||(l.a12=c/s.degree),l):(l.a12=NaN,l)},i.GeodesicLine.prototype.Position=function(o,a){return this.GenPosition(!1,o,a)},i.GeodesicLine.prototype.ArcPosition=function(o,a){return this.GenPosition(!0,o,a)},i.GeodesicLine.prototype.GenSetDistance=function(o,a){o?this.SetArc(a):this.SetDistance(a)},i.GeodesicLine.prototype.SetDistance=function(o){var a;this.s13=o,a=this.GenPosition(!1,this.s13,r.ARC),this.a13=0+a.a12},i.GeodesicLine.prototype.SetArc=function(o){var a;this.a13=o,a=this.GenPosition(!0,this.a13,r.DISTANCE),this.s13=0+a.s12}}(e.Geodesic,e.GeodesicLine,e.Math),function(r,i,s,o){var a,u,l,c;a=function(h,f){var d=s.AngDiff(h,f).d;return h=s.AngNormalize(h),f=s.AngNormalize(f),d>0&&(h<0&&f>=0||h>0&&f===0)?1:d<0&&h>=0&&f<0?-1:0},u=function(h,f){return h=h%720,f=f%720,(0<=f&&f<360||f<-360?0:1)-(0<=h&&h<360||h<-360?0:1)},l=function(h,f,d,v,_){return h.Remainder(f),d&1&&h.Add((h.Sum()<0?1:-1)*f/2),v||h.Negate(),_?h.Sum()>f/2?h.Add(-f):h.Sum()<=-f/2&&h.Add(+f):h.Sum()>=f?h.Add(-f):h.Sum()<0&&h.Add(+f),0+h.Sum()},c=function(h,f,d,v,_){return h=s.remainder(h,f),d&1&&(h+=(h<0?1:-1)*f/2),v||(h*=-1),_?h>f/2?h-=f:h<=-f/2&&(h+=f):h>=f?h-=f:h<0&&(h+=f),0+h},r.PolygonArea=function(h,f){this._geod=h,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*h._c2,this.polyline=f||!1,this._mask=i.LATITUDE|i.LONGITUDE|i.DISTANCE|(this.polyline?i.NONE:i.AREA|i.LONG_UNROLL),this.polyline||(this._areasum=new o.Accumulator(0)),this._perimetersum=new o.Accumulator(0),this.Clear()},r.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},r.PolygonArea.prototype.AddPoint=function(h,f){var d;this.num===0?(this._lat0=this.lat=h,this._lon0=this.lon=f):(d=this._geod.Inverse(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(d.s12),this.polyline||(this._areasum.Add(d.S12),this._crossings+=a(this.lon,f)),this.lat=h,this.lon=f),++this.num},r.PolygonArea.prototype.AddEdge=function(h,f){var d;this.num&&(d=this._geod.Direct(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(f),this.polyline||(this._areasum.Add(d.S12),this._crossings+=u(this.lon,d.lon2)),this.lat=d.lat2,this.lon=d.lon2),++this.num},r.PolygonArea.prototype.Compute=function(h,f){var d={number:this.num},v,_;return this.num<2?(d.perimeter=0,this.polyline||(d.area=0),d):this.polyline?(d.perimeter=this._perimetersum.Sum(),d):(v=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),d.perimeter=this._perimetersum.Sum(v.s12),_=new o.Accumulator(this._areasum),_.Add(v.S12),d.area=l(_,this._area0,this._crossings+a(this.lon,this._lon0),h,f),d)},r.PolygonArea.prototype.TestPoint=function(h,f,d,v){var _={number:this.num+1},E,P,y,w;if(this.num===0)return _.perimeter=0,this.polyline||(_.area=0),_;for(_.perimeter=this._perimetersum.Sum(),P=this.polyline?0:this._areasum.Sum(),y=this._crossings,w=0;w<(this.polyline?1:2);++w)E=this._geod.Inverse(w===0?this.lat:h,w===0?this.lon:f,w!==0?this._lat0:h,w!==0?this._lon0:f,this._mask),_.perimeter+=E.s12,this.polyline||(P+=E.S12,y+=a(w===0?this.lon:f,w!==0?this._lon0:f));return this.polyline||(_.area=c(P,this._area0,y,d,v)),_},r.PolygonArea.prototype.TestEdge=function(h,f,d,v){var _={number:this.num?this.num+1:0},E,P,y;return this.num===0||(_.perimeter=this._perimetersum.Sum()+f,this.polyline)||(P=this._areasum.Sum(),y=this._crossings,E=this._geod.Direct(this.lat,this.lon,h,f,this._mask),P+=E.S12,y+=u(this.lon,E.lon2),y+=a(E.lon2,this._lon0),E=this._geod.Inverse(E.lat2,E.lon2,this._lat0,this._lon0,this._mask),_.perimeter+=E.s12,P+=E.S12,_.area=c(P,this._area0,y,d,v)),_}}(e.PolygonArea,e.Geodesic,e.Math,e.Accumulator),t(e)})(function(t){n.exports?n.exports=t:window.geodesic=t})}(ef)),ef.exports}var SS=ES();function CS(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new SS.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function PS(n){var t=n.x,e=n.y,r=Math.sin(n.y),i=Math.cos(n.y),s=ot(t-this.long0),o,a,u,l,c,h,f,d,v,_,E,P,y,w,m;return this.sphere?Math.abs(this.sin_p12-1)<=et?(n.x=this.x0+this.a*(J-e)*Math.sin(s),n.y=this.y0-this.a*(J-e)*Math.cos(s),n):Math.abs(this.sin_p12+1)<=et?(n.x=this.x0+this.a*(J+e)*Math.sin(s),n.y=this.y0+this.a*(J+e)*Math.cos(s),n):(v=this.sin_p12*r+this.cos_p12*i*Math.cos(s),f=Math.acos(v),d=f?f/Math.sin(f):1,n.x=this.x0+this.a*d*i*Math.sin(s),n.y=this.y0+this.a*d*(this.cos_p12*r-this.sin_p12*i*Math.cos(s)),n):(o=Uu(this.es),a=zu(this.es),u=qu(this.es),l=Wu(this.es),Math.abs(this.sin_p12-1)<=et?(c=this.a*Or(o,a,u,l,J),h=this.a*Or(o,a,u,l,e),n.x=this.x0+(c-h)*Math.sin(s),n.y=this.y0-(c-h)*Math.cos(s),n):Math.abs(this.sin_p12+1)<=et?(c=this.a*Or(o,a,u,l,J),h=this.a*Or(o,a,u,l,e),n.x=this.x0+(c+h)*Math.sin(s),n.y=this.y0+(c+h)*Math.cos(s),n):Math.abs(t)<et&&Math.abs(e-this.lat0)<et?(n.x=n.y=0,n):(_=this.lat0/ue,E=this.long0/ue,P=e/ue,y=t/ue,w=this.g.Inverse(_,E,P,y,this.g.AZIMUTH),m=w.azi1*ue,n.x=w.s12*Math.sin(m),n.y=w.s12*Math.cos(m),n))}function IS(n){n.x-=this.x0,n.y-=this.y0;var t,e,r,i,s,o,a,u,l,c,h,f,d,v,_,E,P,y;return this.sphere?(t=Math.sqrt(n.x*n.x+n.y*n.y),t>2*J*this.a?void 0:(e=t/this.a,r=Math.sin(e),i=Math.cos(e),s=this.long0,Math.abs(t)<=et?o=this.lat0:(o=Ns(i*this.sin_p12+n.y*r*this.cos_p12/t),a=Math.abs(this.lat0)-J,Math.abs(a)<=et?this.lat0>=0?s=ot(this.long0+Math.atan2(n.x,-n.y)):s=ot(this.long0-Math.atan2(-n.x,n.y)):s=ot(this.long0+Math.atan2(n.x*r,t*this.cos_p12*i-n.y*this.sin_p12*r))),n.x=s,n.y=o,n)):(u=Uu(this.es),l=zu(this.es),c=qu(this.es),h=Wu(this.es),Math.abs(this.sin_p12-1)<=et?(f=this.a*Or(u,l,c,h,J),t=Math.sqrt(n.x*n.x+n.y*n.y),d=f-t,o=ah(d/this.a,u,l,c,h),s=ot(this.long0+Math.atan2(n.x,-1*n.y)),n.x=s,n.y=o,n):Math.abs(this.sin_p12+1)<=et?(f=this.a*Or(u,l,c,h,J),t=Math.sqrt(n.x*n.x+n.y*n.y),d=t-f,o=ah(d/this.a,u,l,c,h),s=ot(this.long0+Math.atan2(n.x,n.y)),n.x=s,n.y=o,n):(v=this.lat0/ue,_=this.long0/ue,E=Math.atan2(n.x,n.y)/ue,P=Math.sqrt(n.x*n.x+n.y*n.y),y=this.g.Direct(v,_,E,P,this.g.STANDARD),n.x=y.lon2*ue,n.y=y.lat2*ue,n))}var MS=["Azimuthal_Equidistant","aeqd"];const bS={init:CS,forward:PS,inverse:IS,names:MS};function NS(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function xS(n){var t,e,r,i,s,o,a,u,l=n.x,c=n.y;return r=ot(l-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(r),o=this.sin_p14*t+this.cos_p14*e*i,s=1,(o>0||Math.abs(o)<=et)&&(a=this.a*s*e*Math.sin(r),u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)),n.x=a,n.y=u,n}function TS(n){var t,e,r,i,s,o,a;return n.x-=this.x0,n.y-=this.y0,t=Math.sqrt(n.x*n.x+n.y*n.y),e=Ns(t/this.a),r=Math.sin(e),i=Math.cos(e),o=this.long0,Math.abs(t)<=et?(a=this.lat0,n.x=o,n.y=a,n):(a=Ns(i*this.sin_p14+n.y*r*this.cos_p14/t),s=Math.abs(this.lat0)-J,Math.abs(s)<=et?(this.lat0>=0?o=ot(this.long0+Math.atan2(n.x,-n.y)):o=ot(this.long0-Math.atan2(-n.x,n.y)),n.x=o,n.y=a,n):(o=ot(this.long0+Math.atan2(n.x*r,t*this.cos_p14*i-n.y*this.sin_p14*r)),n.x=o,n.y=a,n))}var AS=["ortho"];const OS={init:NS,forward:xS,inverse:TS,names:AS};var Ce={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ne={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function DS(){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>=J-re/2?this.face=Ce.TOP:this.lat0<=-(J-re/2)?this.face=Ce.BOTTOM:Math.abs(this.long0)<=re?this.face=Ce.FRONT:Math.abs(this.long0)<=J+re?this.face=this.long0>0?Ce.RIGHT:Ce.LEFT:this.face=Ce.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function LS(n){var t={x:0,y:0},e,r,i,s,o,a,u={value:0};if(n.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(n.y)):e=n.y,r=n.x,this.face===Ce.TOP)s=J-e,r>=re&&r<=J+re?(u.value=ne.AREA_0,i=r-J):r>J+re||r<=-(J+re)?(u.value=ne.AREA_1,i=r>0?r-or:r+or):r>-(J+re)&&r<=-re?(u.value=ne.AREA_2,i=r+J):(u.value=ne.AREA_3,i=r);else if(this.face===Ce.BOTTOM)s=J+e,r>=re&&r<=J+re?(u.value=ne.AREA_0,i=-r+J):r<re&&r>=-re?(u.value=ne.AREA_1,i=-r):r<-re&&r>=-(J+re)?(u.value=ne.AREA_2,i=-r-J):(u.value=ne.AREA_3,i=r>0?-r+or:-r-or);else{var l,c,h,f,d,v,_;this.face===Ce.RIGHT?r=ca(r,+J):this.face===Ce.BACK?r=ca(r,3.14159265359):this.face===Ce.LEFT&&(r=ca(r,-J)),f=Math.sin(e),d=Math.cos(e),v=Math.sin(r),_=Math.cos(r),l=d*_,c=d*v,h=f,this.face===Ce.FRONT?(s=Math.acos(l),i=uh(s,h,c,u)):this.face===Ce.RIGHT?(s=Math.acos(c),i=uh(s,h,-l,u)):this.face===Ce.BACK?(s=Math.acos(-l),i=uh(s,h,-c,u)):this.face===Ce.LEFT?(s=Math.acos(-c),i=uh(s,h,l,u)):(s=i=0,u.value=ne.AREA_0)}return a=Math.atan(12/or*(i+Math.acos(Math.sin(i)*Math.cos(re))-J)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(i))))),u.value===ne.AREA_1?a+=J:u.value===ne.AREA_2?a+=or:u.value===ne.AREA_3&&(a+=1.5*or),t.x=o*Math.cos(a),t.y=o*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,n.x=t.x,n.y=t.y,n}function RS(n){var t={lam:0,phi:0},e,r,i,s,o,a,u,l,c,h={value:0};if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,r=Math.atan(Math.sqrt(n.x*n.x+n.y*n.y)),e=Math.atan2(n.y,n.x),n.x>=0&&n.x>=Math.abs(n.y)?h.value=ne.AREA_0:n.y>=0&&n.y>=Math.abs(n.x)?(h.value=ne.AREA_1,e-=J):n.x<0&&-n.x>=Math.abs(n.y)?(h.value=ne.AREA_2,e=e<0?e+or:e-or):(h.value=ne.AREA_3,e+=J),c=or/12*Math.tan(e),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),a=Math.atan(o),i=Math.cos(e),s=Math.tan(r),u=1-i*i*s*s*(1-Math.cos(Math.atan(1/Math.cos(a)))),u<-1?u=-1:u>1&&(u=1),this.face===Ce.TOP)l=Math.acos(u),t.phi=J-l,h.value===ne.AREA_0?t.lam=a+J:h.value===ne.AREA_1?t.lam=a<0?a+or:a-or:h.value===ne.AREA_2?t.lam=a-J:t.lam=a;else if(this.face===Ce.BOTTOM)l=Math.acos(u),t.phi=l-J,h.value===ne.AREA_0?t.lam=-a+J:h.value===ne.AREA_1?t.lam=-a:h.value===ne.AREA_2?t.lam=-a-J:t.lam=a<0?-a-or:-a+or;else{var f,d,v;f=u,c=f*f,c>=1?v=0:v=Math.sqrt(1-c)*Math.sin(a),c+=v*v,c>=1?d=0:d=Math.sqrt(1-c),h.value===ne.AREA_1?(c=d,d=-v,v=c):h.value===ne.AREA_2?(d=-d,v=-v):h.value===ne.AREA_3&&(c=d,d=v,v=-c),this.face===Ce.RIGHT?(c=f,f=-d,d=c):this.face===Ce.BACK?(f=-f,d=-d):this.face===Ce.LEFT&&(c=f,f=d,d=-c),t.phi=Math.acos(-v)-J,t.lam=Math.atan2(d,f),this.face===Ce.RIGHT?t.lam=ca(t.lam,-J):this.face===Ce.BACK?t.lam=ca(t.lam,-3.14159265359):this.face===Ce.LEFT&&(t.lam=ca(t.lam,+J))}if(this.es!==0){var _,E,P;_=t.phi<0?1:0,E=Math.tan(t.phi),P=this.b/Math.sqrt(E*E+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-P*P)/(this.one_minus_f*P)),_&&(t.phi=-t.phi)}return t.lam+=this.long0,n.x=t.lam,n.y=t.phi,n}function uh(n,t,e,r){var i;return n<et?(r.value=ne.AREA_0,i=0):(i=Math.atan2(t,e),Math.abs(i)<=re?r.value=ne.AREA_0:i>re&&i<=J+re?(r.value=ne.AREA_1,i-=J):i>J+re||i<=-(J+re)?(r.value=ne.AREA_2,i=i>=0?i-or:i+or):(r.value=ne.AREA_3,i+=J)),i}function ca(n,t){var e=n+t;return e<-3.14159265359?e+=Lu:e>3.14159265359&&(e-=Lu),e}var FS=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const GS={init:DS,forward:LS,inverse:RS,names:FS};var rf=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.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,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.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]],Hu=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Zp=.8487,t0=1.3523,e0=Pi/5,kS=1/e0,fa=18,lh=function(n,t){return n[0]+t*(n[1]+t*(n[2]+t*n[3]))},VS=function(n,t){return n[1]+t*(2*n[2]+t*3*n[3])};function US(n,t,e,r){for(var i=t;r;--r){var s=n(i);if(i-=s,Math.abs(s)<e)break}return i}function zS(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function qS(n){var t=ot(n.x-this.long0),e=Math.abs(n.y),r=Math.floor(e*e0);r<0?r=0:r>=fa&&(r=fa-1),e=Pi*(e-kS*r);var i={x:lh(rf[r],e)*t,y:lh(Hu[r],e)};return n.y<0&&(i.y=-i.y),i.x=i.x*this.a*Zp+this.x0,i.y=i.y*this.a*t0+this.y0,i}function WS(n){var t={x:(n.x-this.x0)/(this.a*Zp),y:Math.abs(n.y-this.y0)/(this.a*t0)};if(t.y>=1)t.x/=rf[fa][0],t.y=n.y<0?-J:J;else{var e=Math.floor(t.y*fa);for(e<0?e=0:e>=fa&&(e=fa-1);;)if(Hu[e][0]>t.y)--e;else if(Hu[e+1][0]<=t.y)++e;else break;var r=Hu[e],i=5*(t.y-r[0])/(Hu[e+1][0]-r[0]);i=US(function(s){return(lh(r,s)-t.y)/VS(r,s)},i,et,100),t.x/=lh(rf[e],i),t.y=(5*e+i)*ue,n.y<0&&(t.y=-t.y)}return t.x=ot(t.x+this.long0),t}var HS=["Robinson","robin"];const XS={init:zS,forward:qS,inverse:WS,names:HS};function BS(){this.name="geocent"}function YS(n){var t=Np(n,this.es,this.a);return t}function JS(n){var t=xp(n,this.es,this.a,this.b);return t}var jS=["Geocentric","geocentric","geocent","Geocent"];const QS={init:BS,forward:YS,inverse:JS,names:jS};var vr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Xu={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function KS(){if(Object.keys(Xu).forEach((function(e){if(typeof this[e]>"u")this[e]=Xu[e].def;else{if(Xu[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Xu[e].num&&(this[e]=parseFloat(this[e]))}Xu[e].degrees&&(this[e]=this[e]*ue)}).bind(this)),Math.abs(Math.abs(this.lat0)-J)<et?this.mode=this.lat0<0?vr.S_POLE:vr.N_POLE:Math.abs(this.lat0)<et?this.mode=vr.EQUIT:(this.mode=vr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var n=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(n),this.sw=Math.sin(n)}function $S(n){n.x-=this.long0;var t=Math.sin(n.y),e=Math.cos(n.y),r=Math.cos(n.x),i,s;switch(this.mode){case vr.OBLIQ:s=this.sinph0*t+this.cosph0*e*r;break;case vr.EQUIT:s=e*r;break;case vr.S_POLE:s=-t;break;case vr.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),i=s*e*Math.sin(n.x),this.mode){case vr.OBLIQ:s*=this.cosph0*t-this.sinph0*e*r;break;case vr.EQUIT:s*=t;break;case vr.N_POLE:s*=-(e*r);break;case vr.S_POLE:s*=e*r;break}var o,a;return o=s*this.cg+i*this.sg,a=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-s*this.sg)*this.cw*a,s=o*a,n.x=i*this.a,n.y=s*this.a,n}function ZS(n){n.x/=this.a,n.y/=this.a;var t={x:n.x,y:n.y},e,r,i;i=1/(this.pn1-n.y*this.sw),e=this.pn1*n.x*i,r=this.pn1*n.y*this.cw*i,n.x=e*this.cg+r*this.sg,n.y=r*this.cg-e*this.sg;var s=Br(n.x,n.y);if(Math.abs(s)<et)t.x=0,t.y=n.y;else{var o,a;switch(a=1-s*s*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/s+s/this.pn1),o=Math.sqrt(1-a*a),this.mode){case vr.OBLIQ:t.y=Math.asin(o*this.sinph0+n.y*a*this.cosph0/s),n.y=(o-this.sinph0*Math.sin(t.y))*s,n.x*=a*this.cosph0;break;case vr.EQUIT:t.y=Math.asin(n.y*a/s),n.y=o*s,n.x*=a;break;case vr.N_POLE:t.y=Math.asin(o),n.y=-n.y;break;case vr.S_POLE:t.y=-Math.asin(o);break}t.x=Math.atan2(n.x,n.y)}return n.x=t.x+this.long0,n.y=t.y,n}var tC=["Tilted_Perspective","tpers"];const eC={init:KS,forward:$S,inverse:ZS,names:tC};function rC(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var n=1-this.es,t=1/n;this.radius_p=Math.sqrt(n),this.radius_p2=n,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function nC(n){var t=n.x,e=n.y,r,i,s,o;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/Br(this.radius_p*Math.cos(e),Math.sin(e));if(i=a*Math.cos(t)*Math.cos(e),s=a*Math.sin(t)*Math.cos(e),o=a*Math.sin(e),(this.radius_g-i)*i-s*s-o*o*this.radius_p_inv2<0)return n.x=Number.NaN,n.y=Number.NaN,n;r=this.radius_g-i,this.flip_axis?(n.x=this.radius_g_1*Math.atan(s/Br(o,r)),n.y=this.radius_g_1*Math.atan(o/r)):(n.x=this.radius_g_1*Math.atan(s/r),n.y=this.radius_g_1*Math.atan(o/Br(s,r)))}else this.shape==="sphere"&&(r=Math.cos(e),i=Math.cos(t)*r,s=Math.sin(t)*r,o=Math.sin(e),r=this.radius_g-i,this.flip_axis?(n.x=this.radius_g_1*Math.atan(s/Br(o,r)),n.y=this.radius_g_1*Math.atan(o/r)):(n.x=this.radius_g_1*Math.atan(s/r),n.y=this.radius_g_1*Math.atan(o/Br(s,r))));return n.x=n.x*this.a,n.y=n.y*this.a,n}function iC(n){var t=-1,e=0,r=0,i,s,o,a;if(n.x=n.x/this.a,n.y=n.y/this.a,this.shape==="ellipse"){this.flip_axis?(r=Math.tan(n.y/this.radius_g_1),e=Math.tan(n.x/this.radius_g_1)*Br(1,r)):(e=Math.tan(n.x/this.radius_g_1),r=Math.tan(n.y/this.radius_g_1)*Br(1,e));var u=r/this.radius_p;if(i=e*e+u*u+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,r*=a,n.x=Math.atan2(e,t),n.y=Math.atan(r*Math.cos(n.x)/t),n.y=Math.atan(this.radius_p_inv2*Math.tan(n.y))}else if(this.shape==="sphere"){if(this.flip_axis?(r=Math.tan(n.y/this.radius_g_1),e=Math.tan(n.x/this.radius_g_1)*Math.sqrt(1+r*r)):(e=Math.tan(n.x/this.radius_g_1),r=Math.tan(n.y/this.radius_g_1)*Math.sqrt(1+e*e)),i=e*e+r*r+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,r*=a,n.x=Math.atan2(e,t),n.y=Math.atan(r*Math.cos(n.x)/t)}return n.x=n.x+this.long0,n}var sC=["Geostationary Satellite View","Geostationary_Satellite","geos"];const oC={init:rC,forward:nC,inverse:iC,names:sC};var Bu=1.340264,Yu=-.081106,Ju=893e-6,ju=.003796,hh=Math.sqrt(3)/2;function aC(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function uC(n){var t=ot(n.x-this.long0),e=n.y,r=Math.asin(hh*Math.sin(e)),i=r*r,s=i*i*i;return n.x=t*Math.cos(r)/(hh*(Bu+3*Yu*i+s*(7*Ju+9*ju*i))),n.y=r*(Bu+Yu*i+s*(Ju+ju*i)),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function lC(n){n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a;var t=1e-9,e=12,r=n.y,i,s,o,a,u,l;for(l=0;l<e&&(i=r*r,s=i*i*i,o=r*(Bu+Yu*i+s*(Ju+ju*i))-n.y,a=Bu+3*Yu*i+s*(7*Ju+9*ju*i),r-=u=o/a,!(Math.abs(u)<t));++l);return i=r*r,s=i*i*i,n.x=hh*n.x*(Bu+3*Yu*i+s*(7*Ju+9*ju*i))/Math.cos(r),n.y=Math.asin(Math.sin(r)/hh),n.x=ot(n.x+this.long0),n}var hC=["eqearth","Equal Earth","Equal_Earth"];const cC={init:aC,forward:uC,inverse:lC,names:hC};var Qu=1e-10;function fC(){var n;if(this.phi1=this.lat1,Math.abs(this.phi1)<Qu)throw new Error;this.es?(this.en=jc(this.es),this.m1=la(this.phi1,this.am1=Math.sin(this.phi1),n=Math.cos(this.phi1),this.en),this.am1=n/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=gC,this.forward=dC):(Math.abs(this.phi1)+Qu>=J?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=vC,this.forward=pC)}function dC(n){var t=ot(n.x-(this.long0||0)),e=n.y,r,i,s;return r=this.am1+this.m1-la(e,i=Math.sin(e),s=Math.cos(e),this.en),i=s*t/(r*Math.sqrt(1-this.es*i*i)),n.x=r*Math.sin(i),n.y=this.am1-r*Math.cos(i),n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function gC(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var t,e,r,i;if(e=Br(n.x,n.y=this.am1-n.y),i=Qc(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(i))<J)t=Math.sin(i),r=e*Math.atan2(n.x,n.y)*Math.sqrt(1-this.es*t*t)/Math.cos(i);else if(Math.abs(t-J)<=Qu)r=0;else throw new Error;return n.x=ot(r+(this.long0||0)),n.y=Ms(i),n}function pC(n){var t=ot(n.x-(this.long0||0)),e=n.y,r,i;return i=this.cphi1+this.phi1-e,Math.abs(i)>Qu?(n.x=i*Math.sin(r=t*Math.cos(e)/i),n.y=this.cphi1-i*Math.cos(r)):n.x=n.y=0,n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function vC(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var t,e,r=Br(n.x,n.y=this.cphi1-n.y);if(e=this.cphi1+this.phi1-r,Math.abs(e)>J)throw new Error;return Math.abs(Math.abs(e)-J)<=Qu?t=0:t=r*Math.atan2(n.x,n.y)/Math.cos(e),n.x=ot(t+(this.long0||0)),n.y=Ms(e),n}var mC=["bonne","Bonne (Werner lat_1=90)"];const yC={init:fC,names:mC};function _C(n){n.Proj.projections.add(sh),n.Proj.projections.add(oh),n.Proj.projections.add(cw),n.Proj.projections.add(ww),n.Proj.projections.add(Mw),n.Proj.projections.add(Aw),n.Proj.projections.add(Gw),n.Proj.projections.add(qw),n.Proj.projections.add(Yw),n.Proj.projections.add($w),n.Proj.projections.add(pE),n.Proj.projections.add(EE),n.Proj.projections.add(ME),n.Proj.projections.add(OE),n.Proj.projections.add(GE),n.Proj.projections.add(qE),n.Proj.projections.add(YE),n.Proj.projections.add($E),n.Proj.projections.add(iS),n.Proj.projections.add(lS),n.Proj.projections.add(gS),n.Proj.projections.add(_S),n.Proj.projections.add(bS),n.Proj.projections.add(OS),n.Proj.projections.add(GS),n.Proj.projections.add(XS),n.Proj.projections.add(QS),n.Proj.projections.add(eC),n.Proj.projections.add(oC),n.Proj.projections.add(cC),n.Proj.projections.add(yC)}Hr.defaultDatum="WGS84",Hr.Proj=Mi,Hr.WGS84=new Hr.Proj("WGS84"),Hr.Point=ua,Hr.toPoint=Dp,Hr.defs=Ar,Hr.nadgrid=c1,Hr.transform=ih,Hr.mgrs=x1,Hr.version="__VERSION__",_C(Hr);const r0=Hr("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function bi(n){return r0.forward(n)}function n0(n){return r0.inverse(n)}const i0=Hr("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function wC(n){const t=i0.forward([n[0],n[1]]);return[t[0],t[1],n[2]]}function EC(n){const t=i0.inverse([n[0],n[1]]);return[t[0],t[1],n[2]]}var ar=63710088e-1,s0={centimeters:ar*100,centimetres:ar*100,degrees:ar/111325,feet:ar*3.28084,inches:ar*39.37,kilometers:ar/1e3,kilometres:ar/1e3,meters:ar,metres:ar,miles:ar/1609.344,millimeters:ar*1e3,millimetres:ar*1e3,nauticalmiles:ar/1852,radians:1,yards:ar*1.0936};function Sn(n,t,e){e===void 0&&(e={});var r={type:"Feature"};return(e.id===0||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=t||{},r.geometry=n,r}function $t(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!o0(n[0])||!o0(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return Sn(r,t,e)}function ie(n,t,e){e===void 0&&(e={});for(var r=0,i=n;r<i.length;r++){var s=i[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:n};return Sn(a,t,e)}function Yr(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return Sn(r,t,e)}function on(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}function SC(n,t,e){e===void 0&&(e={});var r={type:"MultiLineString",coordinates:n};return Sn(r,t,e)}function nf(n,t,e){e===void 0&&(e={});var r={type:"MultiPolygon",coordinates:n};return Sn(r,t,e)}function sf(n,t){t===void 0&&(t="kilometers");var e=s0[t];if(!e)throw new Error(t+" units is invalid");return n*e}function of(n,t){t===void 0&&(t="kilometers");var e=s0[t];if(!e)throw new Error(t+" units is invalid");return n/e}function ch(n){var t=n%(2*Math.PI);return t*180/Math.PI}function mr(n){var t=n%360;return t*Math.PI/180}function af(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return sf(of(n,t),e)}function o0(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function da(n,t,e){if(n!==null)for(var r,i,s,o,a,u,l,c=0,h=0,f,d=n.type,v=d==="FeatureCollection",_=d==="Feature",E=v?n.features.length:1,P=0;P<E;P++){l=v?n.features[P].geometry:_?n.geometry:n,f=l?l.type==="GeometryCollection":!1,a=f?l.geometries.length:1;for(var y=0;y<a;y++){var w=0,m=0;if(o=f?l.geometries[y]:l,o!==null){u=o.coordinates;var S=o.type;switch(c=e&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(t(u,h,P,w,m)===!1)return!1;h++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],h,P,w,m)===!1)return!1;h++,S==="MultiPoint"&&w++}S==="LineString"&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-c;i++){if(t(u[r][i],h,P,w,m)===!1)return!1;h++}S==="MultiLineString"&&w++,S==="Polygon"&&m++}S==="Polygon"&&w++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(m=0,i=0;i<u[r].length;i++){for(s=0;s<u[r][i].length-c;s++){if(t(u[r][i][s],h,P,w,m)===!1)return!1;h++}m++}w++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(da(o.geometries[r],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ga(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function fh(n,t){var e,r,i,s,o,a,u,l,c,h,f=0,d=n.type==="FeatureCollection",v=n.type==="Feature",_=d?n.features.length:1;for(e=0;e<_;e++){for(a=d?n.features[e].geometry:v?n.geometry:n,l=d?n.features[e].properties:v?n.properties:{},c=d?n.features[e].bbox:v?n.bbox:void 0,h=d?n.features[e].id:v?n.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,f,l,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,f,l,c,h)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<s.geometries.length;r++)if(t(s.geometries[r],f,l,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function CC(n,t,e){var r=e;return fh(n,function(i,s,o,a,u){r=t(r,i,s,o,a,u)}),r}function co(n,t){fh(n,function(e,r,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(Sn(e,i,{bbox:s,id:o}),r,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l],h={type:u,coordinates:c};if(t(Sn(h,i),r,l)===!1)return!1}})}function a0(n,t){co(n,function(e,r,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,l=0,c=0;if(da(e,function(h,f,d,v,_){if(a===void 0||r>u||v>l||_>c){a=h,u=r,l=v,c=_,s=0;return}var E=Yr([a,h],e.properties);if(t(E,r,i,_,s)===!1)return!1;s++,a=h})===!1)return!1}}})}function PC(n,t,e){var r=e,i=!1;return a0(n,function(s,o,a,u,l){i===!1&&e===void 0?r=s:r=t(r,s,o,a,u,l),i=!0}),r}function Cn(n){var t=[1/0,1/0,-1/0,-1/0];return da(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}Cn.default=Cn;function Dr(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function fo(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function u0(n,t,e){if(!n)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!n.geometry||n.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+n.geometry.type)}function IC(n,t,e){if(!n)throw new Error("No featureCollection passed");if(!n||n.type!=="FeatureCollection")throw new Error("Invalid input to "+e+", FeatureCollection required");for(var r=0,i=n.features;r<i.length;r++){var s=i[r];if(!s||s.type!=="Feature"||!s.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!s.geometry||s.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+s.geometry.type)}}function yr(n){return n.type==="Feature"?n.geometry:n}function MC(n,t){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}var dh={exports:{}},gh={exports:{}},bC=gh.exports,l0;function h0(){return l0||(l0=1,function(n,t){(function(e,r){n.exports=r()})(bC,function(){function e(y,w,m,S,C){(function I(b,x,A,N,T){for(;N>A;){if(N-A>600){var L=N-A+1,U=x-A+1,K=Math.log(L),Y=.5*Math.exp(2*K/3),Z=.5*Math.sqrt(K*Y*(L-Y)/L)*(U-L/2<0?-1:1),G=Math.max(A,Math.floor(x-U*Y/L+Z)),W=Math.min(N,Math.floor(x+(L-U)*Y/L+Z));I(b,x,G,W,T)}var k=b[x],V=A,O=N;for(r(b,A,x),T(b[N],k)>0&&r(b,A,N);V<O;){for(r(b,V,O),V++,O--;T(b[V],k)<0;)V++;for(;T(b[O],k)>0;)O--}T(b[A],k)===0?r(b,A,O):r(b,++O,N),O<=x&&(A=O+1),x<=O&&(N=O-1)}})(y,w,m||0,S||y.length-1,C||i)}function r(y,w,m){var S=y[w];y[w]=y[m],y[m]=S}function i(y,w){return y<w?-1:y>w?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(y,w,m){if(!m)return w.indexOf(y);for(var S=0;S<w.length;S++)if(m(y,w[S]))return S;return-1}function a(y,w){u(y,0,y.children.length,w,y)}function u(y,w,m,S,C){C||(C=E(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var I=w;I<m;I++){var b=y.children[I];l(C,y.leaf?S(b):b)}return C}function l(y,w){return y.minX=Math.min(y.minX,w.minX),y.minY=Math.min(y.minY,w.minY),y.maxX=Math.max(y.maxX,w.maxX),y.maxY=Math.max(y.maxY,w.maxY),y}function c(y,w){return y.minX-w.minX}function h(y,w){return y.minY-w.minY}function f(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function d(y){return y.maxX-y.minX+(y.maxY-y.minY)}function v(y,w){return y.minX<=w.minX&&y.minY<=w.minY&&w.maxX<=y.maxX&&w.maxY<=y.maxY}function _(y,w){return w.minX<=y.maxX&&w.minY<=y.maxY&&w.maxX>=y.minX&&w.maxY>=y.minY}function E(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function P(y,w,m,S,C){for(var I=[w,m];I.length;)if(!((m=I.pop())-(w=I.pop())<=S)){var b=w+Math.ceil((m-w)/S/2)*S;e(y,b,w,m,C),I.push(w,b,b,m)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var w=this.data,m=[];if(!_(y,w))return m;for(var S=this.toBBox,C=[];w;){for(var I=0;I<w.children.length;I++){var b=w.children[I],x=w.leaf?S(b):b;_(y,x)&&(w.leaf?m.push(b):v(y,x)?this._all(b,m):C.push(b))}w=C.pop()}return m},s.prototype.collides=function(y){var w=this.data;if(!_(y,w))return!1;for(var m=[];w;){for(var S=0;S<w.children.length;S++){var C=w.children[S],I=w.leaf?this.toBBox(C):C;if(_(y,I)){if(w.leaf||v(y,I))return!0;m.push(C)}}w=m.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var w=0;w<y.length;w++)this.insert(y[w]);return this}var m=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===m.height)this._splitRoot(this.data,m);else{if(this.data.height<m.height){var S=this.data;this.data=m,m=S}this._insert(m,this.data.height-m.height-1,!0)}else this.data=m;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=E([]),this},s.prototype.remove=function(y,w){if(!y)return this;for(var m,S,C,I=this.data,b=this.toBBox(y),x=[],A=[];I||x.length;){if(I||(I=x.pop(),S=x[x.length-1],m=A.pop(),C=!0),I.leaf){var N=o(y,I.children,w);if(N!==-1)return I.children.splice(N,1),x.push(I),this._condense(x),this}C||I.leaf||!v(I,b)?S?(m++,I=S.children[m],C=!1):I=null:(x.push(I),A.push(m),m=0,S=I,I=I.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,w){return y.minX-w.minX},s.prototype.compareMinY=function(y,w){return y.minY-w.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,w){for(var m=[];y;)y.leaf?w.push.apply(w,y.children):m.push.apply(m,y.children),y=m.pop();return w},s.prototype._build=function(y,w,m,S){var C,I=m-w+1,b=this._maxEntries;if(I<=b)return a(C=E(y.slice(w,m+1)),this.toBBox),C;S||(S=Math.ceil(Math.log(I)/Math.log(b)),b=Math.ceil(I/Math.pow(b,S-1))),(C=E([])).leaf=!1,C.height=S;var x=Math.ceil(I/b),A=x*Math.ceil(Math.sqrt(b));P(y,w,m,A,this.compareMinX);for(var N=w;N<=m;N+=A){var T=Math.min(N+A-1,m);P(y,N,T,x,this.compareMinY);for(var L=N;L<=T;L+=x){var U=Math.min(L+x-1,T);C.children.push(this._build(y,L,U,S-1))}}return a(C,this.toBBox),C},s.prototype._chooseSubtree=function(y,w,m,S){for(;S.push(w),!w.leaf&&S.length-1!==m;){for(var C=1/0,I=1/0,b=void 0,x=0;x<w.children.length;x++){var A=w.children[x],N=f(A),T=(L=y,U=A,(Math.max(U.maxX,L.maxX)-Math.min(U.minX,L.minX))*(Math.max(U.maxY,L.maxY)-Math.min(U.minY,L.minY))-N);T<I?(I=T,C=N<C?N:C,b=A):T===I&&N<C&&(C=N,b=A)}w=b||w.children[0]}var L,U;return w},s.prototype._insert=function(y,w,m){var S=m?y:this.toBBox(y),C=[],I=this._chooseSubtree(S,this.data,w,C);for(I.children.push(y),l(I,S);w>=0&&C[w].children.length>this._maxEntries;)this._split(C,w),w--;this._adjustParentBBoxes(S,C,w)},s.prototype._split=function(y,w){var m=y[w],S=m.children.length,C=this._minEntries;this._chooseSplitAxis(m,C,S);var I=this._chooseSplitIndex(m,C,S),b=E(m.children.splice(I,m.children.length-I));b.height=m.height,b.leaf=m.leaf,a(m,this.toBBox),a(b,this.toBBox),w?y[w-1].children.push(b):this._splitRoot(m,b)},s.prototype._splitRoot=function(y,w){this.data=E([y,w]),this.data.height=y.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,w,m){for(var S,C,I,b,x,A,N,T=1/0,L=1/0,U=w;U<=m-w;U++){var K=u(y,0,U,this.toBBox),Y=u(y,U,m,this.toBBox),Z=(C=K,I=Y,b=void 0,x=void 0,A=void 0,N=void 0,b=Math.max(C.minX,I.minX),x=Math.max(C.minY,I.minY),A=Math.min(C.maxX,I.maxX),N=Math.min(C.maxY,I.maxY),Math.max(0,A-b)*Math.max(0,N-x)),G=f(K)+f(Y);Z<T?(T=Z,S=U,L=G<L?G:L):Z===T&&G<L&&(L=G,S=U)}return S||m-w},s.prototype._chooseSplitAxis=function(y,w,m){var S=y.leaf?this.compareMinX:c,C=y.leaf?this.compareMinY:h;this._allDistMargin(y,w,m,S)<this._allDistMargin(y,w,m,C)&&y.children.sort(S)},s.prototype._allDistMargin=function(y,w,m,S){y.children.sort(S);for(var C=this.toBBox,I=u(y,0,w,C),b=u(y,m-w,m,C),x=d(I)+d(b),A=w;A<m-w;A++){var N=y.children[A];l(I,y.leaf?C(N):N),x+=d(I)}for(var T=m-w-1;T>=w;T--){var L=y.children[T];l(b,y.leaf?C(L):L),x+=d(b)}return x},s.prototype._adjustParentBBoxes=function(y,w,m){for(var S=m;S>=0;S--)l(w[S],y)},s.prototype._condense=function(y){for(var w=y.length-1,m=void 0;w>=0;w--)y[w].children.length===0?w>0?(m=y[w-1].children).splice(m.indexOf(y[w]),1):this.clear():a(y[w],this.toBBox)},s})}(gh)),gh.exports}class NC{constructor(t=[],e=xC){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(r(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:r}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1,a=e[o];const u=o+1;if(u<this.length&&r(e[u],a)<0&&(o=u,a=e[u]),r(a,s)>=0)break;e[t]=a,t=o}e[t]=s}}function xC(n,t){return n<t?-1:n>t?1:0}const TC=wS(Object.freeze(Object.defineProperty({__proto__:null,default:NC},Symbol.toStringTag,{value:"Module"})));var Ku={exports:{}},uf,c0;function AC(){return c0||(c0=1,uf=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=(i-r)/2,l=0,c=u-1;l<u;c=l++){var h=e[r+l*2+0],f=e[r+l*2+1],d=e[r+c*2+0],v=e[r+c*2+1],_=f>o!=v>o&&s<(d-h)*(o-f)/(v-f)+h;_&&(a=!a)}return a}),uf}var lf,f0;function OC(){return f0||(f0=1,lf=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=i-r,l=0,c=u-1;l<u;c=l++){var h=e[l+r][0],f=e[l+r][1],d=e[c+r][0],v=e[c+r][1],_=f>o!=v>o&&s<(d-h)*(o-f)/(v-f)+h;_&&(a=!a)}return a}),lf}var d0;function DC(){if(d0)return Ku.exports;d0=1;var n=AC(),t=OC();return Ku.exports=function(r,i,s,o){return i.length>0&&Array.isArray(i[0])?t(r,i,s,o):n(r,i,s,o)},Ku.exports.nested=t,Ku.exports.flat=n,Ku.exports}var $u={exports:{}},LC=$u.exports,g0;function RC(){return g0||(g0=1,function(n,t){(function(e,r){r(t)})(LC,function(e){const i=33306690738754706e-32;function s(_,E,P,y,w){let m,S,C,I,b=E[0],x=y[0],A=0,N=0;x>b==x>-b?(m=b,b=E[++A]):(m=x,x=y[++N]);let T=0;if(A<_&&N<P)for(x>b==x>-b?(C=m-((S=b+m)-b),b=E[++A]):(C=m-((S=x+m)-x),x=y[++N]),m=S,C!==0&&(w[T++]=C);A<_&&N<P;)x>b==x>-b?(C=m-((S=m+b)-(I=S-m))+(b-I),b=E[++A]):(C=m-((S=m+x)-(I=S-m))+(x-I),x=y[++N]),m=S,C!==0&&(w[T++]=C);for(;A<_;)C=m-((S=m+b)-(I=S-m))+(b-I),b=E[++A],m=S,C!==0&&(w[T++]=C);for(;N<P;)C=m-((S=m+x)-(I=S-m))+(x-I),x=y[++N],m=S,C!==0&&(w[T++]=C);return m===0&&T!==0||(w[T++]=m),T}function o(_){return new Float64Array(_)}const a=33306690738754716e-32,u=22204460492503146e-32,l=11093356479670487e-47,c=o(4),h=o(8),f=o(12),d=o(16),v=o(4);e.orient2d=function(_,E,P,y,w,m){const S=(E-m)*(P-w),C=(_-w)*(y-m),I=S-C;if(S===0||C===0||S>0!=C>0)return I;const b=Math.abs(S+C);return Math.abs(I)>=a*b?I:-function(x,A,N,T,L,U,K){let Y,Z,G,W,k,V,O,q,X,rt,lt,nt,_t,it,Ct,It,Q,wt;const bt=x-L,Lt=N-L,Ht=A-U,Xt=T-U;k=(Ct=(q=bt-(O=(V=134217729*bt)-(V-bt)))*(rt=Xt-(X=(V=134217729*Xt)-(V-Xt)))-((it=bt*Xt)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Ht-(O=(V=134217729*Ht)-(V-Ht)))*(rt=Lt-(X=(V=134217729*Lt)-(V-Lt)))-((It=Ht*Lt)-O*X-q*X-O*rt))),c[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-It),c[1]=_t-(lt+k)+(k-It),k=(wt=nt+lt)-nt,c[2]=nt-(wt-k)+(lt-k),c[3]=wt;let Qt=function(Vt,ye){let De=ye[0];for(let Kn=1;Kn<Vt;Kn++)De+=ye[Kn];return De}(4,c),de=u*K;if(Qt>=de||-Qt>=de||(Y=x-(bt+(k=x-bt))+(k-L),G=N-(Lt+(k=N-Lt))+(k-L),Z=A-(Ht+(k=A-Ht))+(k-U),W=T-(Xt+(k=T-Xt))+(k-U),Y===0&&Z===0&&G===0&&W===0)||(de=l*K+i*Math.abs(Qt),(Qt+=bt*W+Xt*Y-(Ht*G+Lt*Z))>=de||-Qt>=de))return Qt;k=(Ct=(q=Y-(O=(V=134217729*Y)-(V-Y)))*(rt=Xt-(X=(V=134217729*Xt)-(V-Xt)))-((it=Y*Xt)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Z-(O=(V=134217729*Z)-(V-Z)))*(rt=Lt-(X=(V=134217729*Lt)-(V-Lt)))-((It=Z*Lt)-O*X-q*X-O*rt))),v[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-It),v[1]=_t-(lt+k)+(k-It),k=(wt=nt+lt)-nt,v[2]=nt-(wt-k)+(lt-k),v[3]=wt;const qe=s(4,c,4,v,h);k=(Ct=(q=bt-(O=(V=134217729*bt)-(V-bt)))*(rt=W-(X=(V=134217729*W)-(V-W)))-((it=bt*W)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Ht-(O=(V=134217729*Ht)-(V-Ht)))*(rt=G-(X=(V=134217729*G)-(V-G)))-((It=Ht*G)-O*X-q*X-O*rt))),v[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-It),v[1]=_t-(lt+k)+(k-It),k=(wt=nt+lt)-nt,v[2]=nt-(wt-k)+(lt-k),v[3]=wt;const Bt=s(qe,h,4,v,f);k=(Ct=(q=Y-(O=(V=134217729*Y)-(V-Y)))*(rt=W-(X=(V=134217729*W)-(V-W)))-((it=Y*W)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Z-(O=(V=134217729*Z)-(V-Z)))*(rt=G-(X=(V=134217729*G)-(V-G)))-((It=Z*G)-O*X-q*X-O*rt))),v[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-It),v[1]=_t-(lt+k)+(k-It),k=(wt=nt+lt)-nt,v[2]=nt-(wt-k)+(lt-k),v[3]=wt;const Ft=s(Bt,f,4,v,d);return d[Ft-1]}(_,E,P,y,w,m,b)},e.orient2dfast=function(_,E,P,y,w,m){return(E-m)*(P-w)-(_-w)*(y-m)},Object.defineProperty(e,"__esModule",{value:!0})})}($u,$u.exports)),$u.exports}var p0;function FC(){if(p0)return dh.exports;p0=1;var n=h0(),t=TC,e=DC(),r=RC().orient2d;t.default&&(t=t.default),dh.exports=i,dh.exports.default=i;function i(m,S,C){S=Math.max(0,S===void 0?2:S),C=C||0;var I=d(m),b=new n(16);b.toBBox=function(O){return{minX:O[0],minY:O[1],maxX:O[0],maxY:O[1]}},b.compareMinX=function(O,q){return O[0]-q[0]},b.compareMinY=function(O,q){return O[1]-q[1]},b.load(m);for(var x=[],A=0,N;A<I.length;A++){var T=I[A];b.remove(T),N=v(T,N),x.push(N)}var L=new n(16);for(A=0;A<x.length;A++)L.insert(f(x[A]));for(var U=S*S,K=C*C;x.length;){var Y=x.shift(),Z=Y.p,G=Y.next.p,W=_(Z,G);if(!(W<K)){var k=W/U;T=s(b,Y.prev.p,Z,G,Y.next.next.p,k,L),T&&Math.min(_(T,Z),_(T,G))<=k&&(x.push(Y),x.push(v(T,Y)),b.remove(T),L.remove(Y),L.insert(f(Y)),L.insert(f(Y.next)))}}Y=N;var V=[];do V.push(Y.p),Y=Y.next;while(Y!==N);return V.push(Y.p),V}function s(m,S,C,I,b,x,A){for(var N=new t([],o),T=m.data;T;){for(var L=0;L<T.children.length;L++){var U=T.children[L],K=T.leaf?E(U,C,I):a(C,I,U);K>x||N.push({node:U,dist:K})}for(;N.length&&!N.peek().node.children;){var Y=N.pop(),Z=Y.node,G=E(Z,S,C),W=E(Z,I,b);if(Y.dist<G&&Y.dist<W&&l(C,Z,A)&&l(I,Z,A))return Z}T=N.pop(),T&&(T=T.node)}return null}function o(m,S){return m.dist-S.dist}function a(m,S,C){if(u(m,C)||u(S,C))return 0;var I=P(m[0],m[1],S[0],S[1],C.minX,C.minY,C.maxX,C.minY);if(I===0)return 0;var b=P(m[0],m[1],S[0],S[1],C.minX,C.minY,C.minX,C.maxY);if(b===0)return 0;var x=P(m[0],m[1],S[0],S[1],C.maxX,C.minY,C.maxX,C.maxY);if(x===0)return 0;var A=P(m[0],m[1],S[0],S[1],C.minX,C.maxY,C.maxX,C.maxY);return A===0?0:Math.min(I,b,x,A)}function u(m,S){return m[0]>=S.minX&&m[0]<=S.maxX&&m[1]>=S.minY&&m[1]<=S.maxY}function l(m,S,C){for(var I=Math.min(m[0],S[0]),b=Math.min(m[1],S[1]),x=Math.max(m[0],S[0]),A=Math.max(m[1],S[1]),N=C.search({minX:I,minY:b,maxX:x,maxY:A}),T=0;T<N.length;T++)if(h(N[T].p,N[T].next.p,m,S))return!1;return!0}function c(m,S,C){return r(m[0],m[1],S[0],S[1],C[0],C[1])}function h(m,S,C,I){return m!==I&&S!==C&&c(m,S,C)>0!=c(m,S,I)>0&&c(C,I,m)>0!=c(C,I,S)>0}function f(m){var S=m.p,C=m.next.p;return m.minX=Math.min(S[0],C[0]),m.minY=Math.min(S[1],C[1]),m.maxX=Math.max(S[0],C[0]),m.maxY=Math.max(S[1],C[1]),m}function d(m){for(var S=m[0],C=m[0],I=m[0],b=m[0],x=0;x<m.length;x++){var A=m[x];A[0]<S[0]&&(S=A),A[0]>I[0]&&(I=A),A[1]<C[1]&&(C=A),A[1]>b[1]&&(b=A)}var N=[S,C,I,b],T=N.slice();for(x=0;x<m.length;x++)e(m[x],N)||T.push(m[x]);return w(T)}function v(m,S){var C={p:m,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return S?(C.next=S.next,C.prev=S,S.next.prev=C,S.next=C):(C.prev=C,C.next=C),C}function _(m,S){var C=m[0]-S[0],I=m[1]-S[1];return C*C+I*I}function E(m,S,C){var I=S[0],b=S[1],x=C[0]-I,A=C[1]-b;if(x!==0||A!==0){var N=((m[0]-I)*x+(m[1]-b)*A)/(x*x+A*A);N>1?(I=C[0],b=C[1]):N>0&&(I+=x*N,b+=A*N)}return x=m[0]-I,A=m[1]-b,x*x+A*A}function P(m,S,C,I,b,x,A,N){var T=C-m,L=I-S,U=A-b,K=N-x,Y=m-b,Z=S-x,G=T*T+L*L,W=T*U+L*K,k=U*U+K*K,V=T*Y+L*Z,O=U*Y+K*Z,q=G*k-W*W,X,rt,lt,nt,_t=q,it=q;q===0?(rt=0,_t=1,nt=O,it=k):(rt=W*O-k*V,nt=G*O-W*V,rt<0?(rt=0,nt=O,it=k):rt>_t&&(rt=_t,nt=O+W,it=k)),nt<0?(nt=0,-V<0?rt=0:-V>G?rt=_t:(rt=-V,_t=G)):nt>it&&(nt=it,-V+W<0?rt=0:-V+W>G?rt=_t:(rt=-V+W,_t=G)),X=rt===0?0:rt/_t,lt=nt===0?0:nt/it;var Ct=(1-X)*m+X*C,It=(1-X)*S+X*I,Q=(1-lt)*b+lt*A,wt=(1-lt)*x+lt*N,bt=Q-Ct,Lt=wt-It;return bt*bt+Lt*Lt}function y(m,S){return m[0]===S[0]?m[1]-S[1]:m[0]-S[0]}function w(m){m.sort(y);for(var S=[],C=0;C<m.length;C++){for(;S.length>=2&&c(S[S.length-2],S[S.length-1],m[C])<=0;)S.pop();S.push(m[C])}for(var I=[],b=m.length-1;b>=0;b--){for(;I.length>=2&&c(I[I.length-2],I[I.length-1],m[b])<=0;)I.pop();I.push(m[b])}return I.pop(),S.pop(),S.concat(I)}return dh.exports}var GC=FC();const kC=Kp(GC);function VC(n,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(da(n,function(i){e.push([i[0],i[1]])}),!e.length)return null;var r=kC(e,t.concavity);return r.length>3?ie([r]):null}function Qe(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=Dr(n),i=yr(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&UC(r,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,l=0;l<a.length&&!u;l++)if(v0(r,a[l][0],e.ignoreBoundary)){for(var c=!1,h=1;h<a[l].length&&!c;)v0(r,a[l][h],!e.ignoreBoundary)&&(c=!0),h++;c||(u=!0)}return u}function v0(n,t,e){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],l=t[s][1],c=n[1]*(o-u)+a*(u-n[0])+l*(n[0]-o)===0&&(o-n[0])*(u-n[0])<=0&&(a-n[1])*(l-n[1])<=0;if(c)return!e;var h=a>n[1]!=l>n[1]&&n[0]<(u-o)*(n[1]-a)/(l-a)+o;h&&(r=!r)}return r}function UC(n,t){return t[0]<=n[0]&&t[1]<=n[1]&&t[2]>=n[0]&&t[3]>=n[1]}function He(n,t,e){e===void 0&&(e={});var r=Dr(n),i=Dr(t),s=mr(i[1]-r[1]),o=mr(i[0]-r[0]),a=mr(r[1]),u=mr(i[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return sf(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),e.units)}function zC(n){if(!n)throw new Error("geojson is required");switch(n.type){case"Feature":return m0(n);case"FeatureCollection":return qC(n);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return hf(n);default:throw new Error("unknown GeoJSON type")}}function m0(n){var t={type:"Feature"};return Object.keys(n).forEach(function(e){switch(e){case"type":case"properties":case"geometry":return;default:t[e]=n[e]}}),t.properties=y0(n.properties),t.geometry=hf(n.geometry),t}function y0(n){var t={};return n&&Object.keys(n).forEach(function(e){var r=n[e];typeof r=="object"?r===null?t[e]=null:Array.isArray(r)?t[e]=r.map(function(i){return i}):t[e]=y0(r):t[e]=r}),t}function qC(n){var t={type:"FeatureCollection"};return Object.keys(n).forEach(function(e){switch(e){case"type":case"features":return;default:t[e]=n[e]}}),t.features=n.features.map(function(e){return m0(e)}),t}function hf(n){var t={type:n.type};return n.bbox&&(t.bbox=n.bbox),n.type==="GeometryCollection"?(t.geometries=n.geometries.map(function(e){return hf(e)}),t):(t.coordinates=_0(n.coordinates),t)}function _0(n){var t=n;return typeof t[0]!="object"?t.slice():t.map(function(e){return _0(e)})}function pa(n,t,e,r){r===void 0&&(r={});var i=Dr(n),s=mr(i[0]),o=mr(i[1]),a=mr(e),u=of(t,r.units),l=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(l)),h=ch(c),f=ch(l);return $t([h,f],r.properties)}function WC(n,t,e){e===void 0&&(e={});for(var r=e.steps||64,i=e.properties?e.properties:!Array.isArray(n)&&n.type==="Feature"&&n.properties?n.properties:{},s=[],o=0;o<r;o++)s.push(pa(n,t,o*-360/r,e).geometry.coordinates);return s.push(s[0]),ie([s],i)}function Zu(n,t,e){if(e===void 0&&(e={}),e.final===!0)return HC(n,t);var r=Dr(n),i=Dr(t),s=mr(r[0]),o=mr(i[0]),a=mr(r[1]),u=mr(i[1]),l=Math.sin(o-s)*Math.cos(u),c=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return ch(Math.atan2(l,c))}function HC(n,t){var e=Zu(t,n);return e=(e+180)%360,e}function XC(n,t){var e=He(n,t),r=Zu(n,t),i=pa(n,e/2,r);return i}function w0(n,t){t===void 0&&(t={});var e=Cn(n),r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return $t([r,i],t.properties,t)}function cf(n,t){t===void 0&&(t={});var e=0,r=0,i=0;return da(n,function(s){e+=s[0],r+=s[1],i++},!0),$t([e/i,r/i],t.properties)}function E0(n,t){switch(t===void 0&&(t={}),MC(n)){case"Point":return $t(Dr(n),t.properties);case"Polygon":var e=[];da(n,function(m){e.push(m)});var r=cf(n,{properties:t.properties}),i=r.geometry.coordinates,s=0,o=0,a=0,u,l,c,h,f,d,v,_,E=e.map(function(m){return[m[0]-i[0],m[1]-i[1]]});for(u=0;u<e.length-1;u++)l=E[u],h=l[0],d=l[1],c=E[u+1],f=c[0],v=c[1],_=h*v-f*d,a+=_,s+=(h+f)*_,o+=(d+v)*_;if(a===0)return r;var P=a*.5,y=1/(6*P);return $t([i[0]+y*s,i[1]+y*o],t.properties);default:var w=VC(n);return w?E0(w,{properties:t.properties}):cf(n,{properties:t.properties})}}function S0(n){if(!n)throw new Error("geojson is required");var t=[];return co(n,function(e){BC(e,t)}),on(t)}function BC(n,t){var e=[],r=n.geometry;if(r!==null){switch(r.type){case"Polygon":e=fo(r);break;case"LineString":e=[fo(r)]}e.forEach(function(i){var s=YC(i,n.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function YC(n,t){var e=[];return n.reduce(function(r,i){var s=Yr([r,i],t);return s.bbox=JC(r,i),e.push(s),i}),e}function JC(n,t){var e=n[0],r=n[1],i=t[0],s=t[1],o=e<i?e:i,a=r<s?r:s,u=e>i?e:i,l=r>s?r:s;return[o,a,u,l]}var ph={exports:{}},ff={},C0;function P0(){return C0||(C0=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=63710088e-1,n.factors={centimeters:n.earthRadius*100,centimetres:n.earthRadius*100,degrees:n.earthRadius/111325,feet:n.earthRadius*3.28084,inches:n.earthRadius*39.37,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:n.earthRadius*1e3,millimetres:n.earthRadius*1e3,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius*1.0936},n.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(N,T,L){L===void 0&&(L={});var U={type:"Feature"};return(L.id===0||L.id)&&(U.id=L.id),L.bbox&&(U.bbox=L.bbox),U.properties=T||{},U.geometry=N,U}n.feature=t;function e(N,T,L){switch(N){case"Point":return r(T).geometry;case"LineString":return a(T).geometry;case"Polygon":return s(T).geometry;case"MultiPoint":return h(T).geometry;case"MultiLineString":return c(T).geometry;case"MultiPolygon":return f(T).geometry;default:throw new Error(N+" is invalid")}}n.geometry=e;function r(N,T,L){if(L===void 0&&(L={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!I(N[0])||!I(N[1]))throw new Error("coordinates must contain numbers");var U={type:"Point",coordinates:N};return t(U,T,L)}n.point=r;function i(N,T,L){return L===void 0&&(L={}),l(N.map(function(U){return r(U,T)}),L)}n.points=i;function s(N,T,L){L===void 0&&(L={});for(var U=0,K=N;U<K.length;U++){var Y=K[U];if(Y.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var Z=0;Z<Y[Y.length-1].length;Z++)if(Y[Y.length-1][Z]!==Y[0][Z])throw new Error("First and last Position are not equivalent.")}var G={type:"Polygon",coordinates:N};return t(G,T,L)}n.polygon=s;function o(N,T,L){return L===void 0&&(L={}),l(N.map(function(U){return s(U,T)}),L)}n.polygons=o;function a(N,T,L){if(L===void 0&&(L={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var U={type:"LineString",coordinates:N};return t(U,T,L)}n.lineString=a;function u(N,T,L){return L===void 0&&(L={}),l(N.map(function(U){return a(U,T)}),L)}n.lineStrings=u;function l(N,T){T===void 0&&(T={});var L={type:"FeatureCollection"};return T.id&&(L.id=T.id),T.bbox&&(L.bbox=T.bbox),L.features=N,L}n.featureCollection=l;function c(N,T,L){L===void 0&&(L={});var U={type:"MultiLineString",coordinates:N};return t(U,T,L)}n.multiLineString=c;function h(N,T,L){L===void 0&&(L={});var U={type:"MultiPoint",coordinates:N};return t(U,T,L)}n.multiPoint=h;function f(N,T,L){L===void 0&&(L={});var U={type:"MultiPolygon",coordinates:N};return t(U,T,L)}n.multiPolygon=f;function d(N,T,L){L===void 0&&(L={});var U={type:"GeometryCollection",geometries:N};return t(U,T,L)}n.geometryCollection=d;function v(N,T){if(T===void 0&&(T=0),T&&!(T>=0))throw new Error("precision must be a positive number");var L=Math.pow(10,T||0);return Math.round(N*L)/L}n.round=v;function _(N,T){T===void 0&&(T="kilometers");var L=n.factors[T];if(!L)throw new Error(T+" units is invalid");return N*L}n.radiansToLength=_;function E(N,T){T===void 0&&(T="kilometers");var L=n.factors[T];if(!L)throw new Error(T+" units is invalid");return N/L}n.lengthToRadians=E;function P(N,T){return w(E(N,T))}n.lengthToDegrees=P;function y(N){var T=N%360;return T<0&&(T+=360),T}n.bearingToAzimuth=y;function w(N){var T=N%(2*Math.PI);return T*180/Math.PI}n.radiansToDegrees=w;function m(N){var T=N%360;return T*Math.PI/180}n.degreesToRadians=m;function S(N,T,L){if(T===void 0&&(T="kilometers"),L===void 0&&(L="kilometers"),!(N>=0))throw new Error("length must be a positive number");return _(E(N,T),L)}n.convertLength=S;function C(N,T,L){if(T===void 0&&(T="meters"),L===void 0&&(L="kilometers"),!(N>=0))throw new Error("area must be a positive number");var U=n.areaFactors[T];if(!U)throw new Error("invalid original units");var K=n.areaFactors[L];if(!K)throw new Error("invalid final units");return N/U*K}n.convertArea=C;function I(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}n.isNumber=I;function b(N){return!!N&&N.constructor===Object}n.isObject=b;function x(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(T){if(!I(T))throw new Error("bbox must only contain numbers")})}n.validateBBox=x;function A(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}n.validateId=A}(ff)),ff}var Le={},I0;function M0(){if(I0)return Le;I0=1,Object.defineProperty(Le,"__esModule",{value:!0});var n=P0();function t(y,w,m){if(y!==null)for(var S,C,I,b,x,A,N,T=0,L=0,U,K=y.type,Y=K==="FeatureCollection",Z=K==="Feature",G=Y?y.features.length:1,W=0;W<G;W++){N=Y?y.features[W].geometry:Z?y.geometry:y,U=N?N.type==="GeometryCollection":!1,x=U?N.geometries.length:1;for(var k=0;k<x;k++){var V=0,O=0;if(b=U?N.geometries[k]:N,b!==null){A=b.coordinates;var q=b.type;switch(T=m&&(q==="Polygon"||q==="MultiPolygon")?1:0,q){case null:break;case"Point":if(w(A,L,W,V,O)===!1)return!1;L++,V++;break;case"LineString":case"MultiPoint":for(S=0;S<A.length;S++){if(w(A[S],L,W,V,O)===!1)return!1;L++,q==="MultiPoint"&&V++}q==="LineString"&&V++;break;case"Polygon":case"MultiLineString":for(S=0;S<A.length;S++){for(C=0;C<A[S].length-T;C++){if(w(A[S][C],L,W,V,O)===!1)return!1;L++}q==="MultiLineString"&&V++,q==="Polygon"&&O++}q==="Polygon"&&V++;break;case"MultiPolygon":for(S=0;S<A.length;S++){for(O=0,C=0;C<A[S].length;C++){for(I=0;I<A[S][C].length-T;I++){if(w(A[S][C][I],L,W,V,O)===!1)return!1;L++}O++}V++}break;case"GeometryCollection":for(S=0;S<b.geometries.length;S++)if(t(b.geometries[S],w,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(y,w,m,S){var C=m;return t(y,function(I,b,x,A,N){b===0&&m===void 0?C=I:C=w(C,I,b,x,A,N)},S),C}function r(y,w){var m;switch(y.type){case"FeatureCollection":for(m=0;m<y.features.length&&w(y.features[m].properties,m)!==!1;m++);break;case"Feature":w(y.properties,0);break}}function i(y,w,m){var S=m;return r(y,function(C,I){I===0&&m===void 0?S=C:S=w(S,C,I)}),S}function s(y,w){if(y.type==="Feature")w(y,0);else if(y.type==="FeatureCollection")for(var m=0;m<y.features.length&&w(y.features[m],m)!==!1;m++);}function o(y,w,m){var S=m;return s(y,function(C,I){I===0&&m===void 0?S=C:S=w(S,C,I)}),S}function a(y){var w=[];return t(y,function(m){w.push(m)}),w}function u(y,w){var m,S,C,I,b,x,A,N,T,L,U=0,K=y.type==="FeatureCollection",Y=y.type==="Feature",Z=K?y.features.length:1;for(m=0;m<Z;m++){for(x=K?y.features[m].geometry:Y?y.geometry:y,N=K?y.features[m].properties:Y?y.properties:{},T=K?y.features[m].bbox:Y?y.bbox:void 0,L=K?y.features[m].id:Y?y.id:void 0,A=x?x.type==="GeometryCollection":!1,b=A?x.geometries.length:1,C=0;C<b;C++){if(I=A?x.geometries[C]:x,I===null){if(w(null,U,N,T,L)===!1)return!1;continue}switch(I.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(w(I,U,N,T,L)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<I.geometries.length;S++)if(w(I.geometries[S],U,N,T,L)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}U++}}function l(y,w,m){var S=m;return u(y,function(C,I,b,x,A){I===0&&m===void 0?S=C:S=w(S,C,I,b,x,A)}),S}function c(y,w){u(y,function(m,S,C,I,b){var x=m===null?null:m.type;switch(x){case null:case"Point":case"LineString":case"Polygon":return w(n.feature(m,C,{bbox:I,id:b}),S,0)===!1?!1:void 0}var A;switch(x){case"MultiPoint":A="Point";break;case"MultiLineString":A="LineString";break;case"MultiPolygon":A="Polygon";break}for(var N=0;N<m.coordinates.length;N++){var T=m.coordinates[N],L={type:A,coordinates:T};if(w(n.feature(L,C),S,N)===!1)return!1}})}function h(y,w,m){var S=m;return c(y,function(C,I,b){I===0&&b===0&&m===void 0?S=C:S=w(S,C,I,b)}),S}function f(y,w){c(y,function(m,S,C){var I=0;if(m.geometry){var b=m.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var x,A=0,N=0,T=0;if(t(m,function(L,U,K,Y,Z){if(x===void 0||S>A||Y>N||Z>T){x=L,A=S,N=Y,T=Z,I=0;return}var G=n.lineString([x,L],m.properties);if(w(G,S,C,Z,I)===!1)return!1;I++,x=L})===!1)return!1}}})}function d(y,w,m){var S=m,C=!1;return f(y,function(I,b,x,A,N){C===!1&&m===void 0?S=I:S=w(S,I,b,x,A,N),C=!0}),S}function v(y,w){if(!y)throw new Error("geojson is required");c(y,function(m,S,C){if(m.geometry!==null){var I=m.geometry.type,b=m.geometry.coordinates;switch(I){case"LineString":if(w(m,S,C,0,0)===!1)return!1;break;case"Polygon":for(var x=0;x<b.length;x++)if(w(n.lineString(b[x],m.properties),S,C,x)===!1)return!1;break}}})}function _(y,w,m){var S=m;return v(y,function(C,I,b,x){I===0&&m===void 0?S=C:S=w(S,C,I,b,x)}),S}function E(y,w){if(w=w||{},!n.isObject(w))throw new Error("options is invalid");var m=w.featureIndex||0,S=w.multiFeatureIndex||0,C=w.geometryIndex||0,I=w.segmentIndex||0,b=w.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":case"MultiPoint":return null;case"LineString":return I<0&&(I=A.length+I-1),n.lineString([A[I],A[I+1]],b,w);case"Polygon":return C<0&&(C=A.length+C),I<0&&(I=A[C].length+I-1),n.lineString([A[C][I],A[C][I+1]],b,w);case"MultiLineString":return S<0&&(S=A.length+S),I<0&&(I=A[S].length+I-1),n.lineString([A[S][I],A[S][I+1]],b,w);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),I<0&&(I=A[S][C].length-I-1),n.lineString([A[S][C][I],A[S][C][I+1]],b,w)}throw new Error("geojson is invalid")}function P(y,w){if(w=w||{},!n.isObject(w))throw new Error("options is invalid");var m=w.featureIndex||0,S=w.multiFeatureIndex||0,C=w.geometryIndex||0,I=w.coordIndex||0,b=w.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":return n.point(A,b,w);case"MultiPoint":return S<0&&(S=A.length+S),n.point(A[S],b,w);case"LineString":return I<0&&(I=A.length+I),n.point(A[I],b,w);case"Polygon":return C<0&&(C=A.length+C),I<0&&(I=A[C].length+I),n.point(A[C][I],b,w);case"MultiLineString":return S<0&&(S=A.length+S),I<0&&(I=A[S].length+I),n.point(A[S][I],b,w);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),I<0&&(I=A[S][C].length-I),n.point(A[S][C][I],b,w)}throw new Error("geojson is invalid")}return Le.coordAll=a,Le.coordEach=t,Le.coordReduce=e,Le.featureEach=s,Le.featureReduce=o,Le.findPoint=P,Le.findSegment=E,Le.flattenEach=c,Le.flattenReduce=h,Le.geomEach=u,Le.geomReduce=l,Le.lineEach=v,Le.lineReduce=_,Le.propEach=r,Le.propReduce=i,Le.segmentEach=f,Le.segmentReduce=d,Le}var vh={},b0;function jC(){if(b0)return vh;b0=1,Object.defineProperty(vh,"__esModule",{value:!0});var n=M0();function t(e){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,function(i){r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}return t.default=t,vh.default=t,vh}var N0;function QC(){if(N0)return ph.exports;N0=1;var n=h0(),t=P0(),e=M0(),r=jC().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new n(a);return u.insert=function(l){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.insert.call(this,l)},u.load=function(l){var c=[];return Array.isArray(l)?l.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}):i(l,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}),n.prototype.load.call(this,c)},u.remove=function(l,c){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.remove.call(this,l,c)},u.clear=function(){return n.prototype.clear.call(this)},u.search=function(l){var c=n.prototype.search.call(this,this.toBBox(l));return s(c)},u.collides=function(l){return n.prototype.collides.call(this,this.toBBox(l))},u.all=function(){var l=n.prototype.all.call(this);return s(l)},u.toJSON=function(){return n.prototype.toJSON.call(this)},u.fromJSON=function(l){return n.prototype.fromJSON.call(this,l)},u.toBBox=function(l){var c;if(l.bbox)c=l.bbox;else if(Array.isArray(l)&&l.length===4)c=l;else if(Array.isArray(l)&&l.length===6)c=[l[0],l[1],l[3],l[4]];else if(l.type==="Feature")c=r(l);else if(l.type==="FeatureCollection")c=r(l);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},u}return ph.exports=o,ph.exports.default=o,ph.exports}var KC=QC();const $C=Kp(KC);function tl(n,t){var e={},r=[];if(n.type==="LineString"&&(n=Sn(n)),t.type==="LineString"&&(t=Sn(t)),n.type==="Feature"&&t.type==="Feature"&&n.geometry!==null&&t.geometry!==null&&n.geometry.type==="LineString"&&t.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=x0(n,t);return i&&r.push(i),on(r)}var s=$C();return s.load(S0(t)),ga(S0(n),function(o){ga(s.search(o),function(a){var u=x0(o,a);if(u){var l=fo(u).join(",");e[l]||(e[l]=!0,r.push(u))}})}),on(r)}function x0(n,t){var e=fo(n),r=fo(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=r[0][0],l=r[0][1],c=r[1][0],h=r[1][1],f=(h-l)*(o-i)-(c-u)*(a-s),d=(c-u)*(s-l)-(h-l)*(i-u),v=(o-i)*(s-l)-(a-s)*(i-u);if(f===0)return null;var _=d/f,E=v/f;if(_>=0&&_<=1&&E>=0&&E<=1){var P=i+_*(o-i),y=s+_*(a-s);return $t([P,y])}return null}function ZC(n,t,e){e===void 0&&(e={});var r=$t([1/0,1/0],{dist:1/0}),i=0;return co(n,function(s){for(var o=fo(s),a=0;a<o.length-1;a++){var u=$t(o[a]);u.properties.dist=He(t,u,e);var l=$t(o[a+1]);l.properties.dist=He(t,l,e);var c=He(u,l,e),h=Math.max(u.properties.dist,l.properties.dist),f=Zu(u,l),d=pa(t,h,f+90,e),v=pa(t,h,f-90,e),_=tl(Yr([d.geometry.coordinates,v.geometry.coordinates]),Yr([u.geometry.coordinates,l.geometry.coordinates])),E=null;_.features.length>0&&(E=_.features[0],E.properties.dist=He(t,E,e),E.properties.location=i+He(u,E,e)),u.properties.dist<r.properties.dist&&(r=u,r.properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=a+1,r.properties.location=i+c),E&&E.properties.dist<r.properties.dist&&(r=E,r.properties.index=a),i+=c}}),r}function T0(n,t,e){e===void 0&&(e={});var r=Dr(n),i=Dr(t);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var s=tP(r,i),o=af(s,"meters",e.units);return o}function tP(n,t,e){e=e===void 0?ar:Number(e);var r=e,i=n[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-n[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?o/u:Math.cos(i),c=Math.sqrt(o*o+l*l*a*a),h=c*r;return h}function eP(n,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!n)throw new Error("pt is required");if(Array.isArray(n)?n=$t(n):n.type==="Point"?n=Sn(n):u0(n,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=Yr(t):t.type==="LineString"?t=Sn(t):u0(t,"LineString","line");var r=1/0,i=n.geometry.coordinates;return a0(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=rP(i,o,a,e);u<r&&(r=u)}),af(r,"degrees",e.units)}function rP(n,t,e,r){var i=[e[0]-t[0],e[1]-t[1]],s=[n[0]-t[0],n[1]-t[1]],o=A0(s,i);if(o<=0)return df(n,t,{method:r.method,units:"degrees"});var a=A0(i,i);if(a<=o)return df(n,e,{method:r.method,units:"degrees"});var u=o/a,l=[t[0]+u*i[0],t[1]+u*i[1]];return df(n,l,{method:r.method,units:"degrees"})}function A0(n,t){return n[0]*t[0]+n[1]*t[1]}function df(n,t,e){return e.method==="planar"?T0(n,t,e):He(n,t,e)}var O0=6378137;function nP(n){return CC(n,function(t,e){return t+iP(e)},0)}function iP(n){var t=0,e;switch(n.type){case"Polygon":return D0(n.coordinates);case"MultiPolygon":for(e=0;e<n.coordinates.length;e++)t+=D0(n.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function D0(n){var t=0;if(n&&n.length>0){t+=Math.abs(L0(n[0]));for(var e=1;e<n.length;e++)t-=Math.abs(L0(n[e]))}return t}function L0(n){var t,e,r,i,s,o,a,u=0,l=n.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,s=l-1,o=0):a===l-1?(i=l-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=n[i],e=n[s],r=n[o],u+=(gf(r[0])-gf(t[0]))*Math.sin(gf(e[1]));u=u*O0*O0/2}return u}function gf(n){return n*Math.PI/180}function pf(n,t,e){e===void 0&&(e={});for(var r=yr(n),i=r.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=Zu(i[o],i[o-1])-180,l=pa(i[o],a,u,e);return l}else return $t(i[o])}else s+=He(i[o],i[o+1],e);return $t(i[i.length-1])}function R0(n,t){return t===void 0&&(t={}),PC(n,function(e,r){var i=r.geometry.coordinates;return e+He(i[0],i[1],t)},0)}function ts(n,t,e){e===void 0&&(e={});for(var r=Dr(n),i=fo(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),sP(i[s],i[s+1],r,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function sP(n,t,e,r,i){var s=e[0],o=e[1],a=n[0],u=n[1],l=t[0],c=t[1],h=e[0]-a,f=e[1]-u,d=l-a,v=c-u,_=h*v-f*d;if(i!==null){if(Math.abs(_)>i)return!1}else if(_!==0)return!1;if(r){if(r==="start")return Math.abs(d)>=Math.abs(v)?d>0?a<s&&s<=l:l<=s&&s<a:v>0?u<o&&o<=c:c<=o&&o<u;if(r==="end")return Math.abs(d)>=Math.abs(v)?d>0?a<=s&&s<l:l<s&&s<=a:v>0?u<=o&&o<c:c<o&&o<=u;if(r==="both")return Math.abs(d)>=Math.abs(v)?d>0?a<s&&s<l:l<s&&s<a:v>0?u<o&&o<c:c<o&&o<u}else return Math.abs(d)>=Math.abs(v)?d>0?a<=s&&s<=l:l<=s&&s<=a:v>0?u<=o&&o<=c:c<=o&&o<=u;return!1}function F0(n,t){var e=yr(n),r=yr(t),i=e.type,s=r.type;switch(i){case"Point":switch(s){case"MultiPoint":return oP(e,r);case"LineString":return ts(e,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Qe(e,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return aP(e,r);case"LineString":return uP(e,r);case"Polygon":case"MultiPolygon":return lP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return hP(e,r);case"Polygon":case"MultiPolygon":return cP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return fP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function oP(n,t){var e,r=!1;for(e=0;e<t.coordinates.length;e++)if(k0(t.coordinates[e],n.coordinates)){r=!0;break}return r}function aP(n,t){for(var e=0;e<n.coordinates.length;e++){for(var r=!1,i=0;i<t.coordinates.length;i++)k0(n.coordinates[e],t.coordinates[i])&&(r=!0);if(!r)return!1}return!0}function uP(n,t){for(var e=!1,r=0;r<n.coordinates.length;r++){if(!ts(n.coordinates[r],t))return!1;e||(e=ts(n.coordinates[r],t,{ignoreEndVertices:!0}))}return e}function lP(n,t){for(var e=!0,r=!1,i=0;i<n.coordinates.length;i++){if(r=Qe(n.coordinates[1],t),!r){e=!1;break}r=Qe(n.coordinates[1],t,{ignoreBoundary:!0})}return e&&r}function hP(n,t){for(var e=0;e<n.coordinates.length;e++)if(!ts(n.coordinates[e],t))return!1;return!0}function cP(n,t){var e=Cn(t),r=Cn(n);if(!G0(e,r))return!1;for(var i=!1,s=0;s<n.coordinates.length-1;s++){if(!Qe(n.coordinates[s],t))return!1;if(i||(i=Qe(n.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=dP(n.coordinates[s],n.coordinates[s+1]);i=Qe(o,t,{ignoreBoundary:!0})}}return i}function fP(n,t){var e=Cn(n),r=Cn(t);if(!G0(r,e))return!1;for(var i=0;i<n.coordinates[0].length;i++)if(!Qe(n.coordinates[0][i],t))return!1;return!0}function G0(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function k0(n,t){return n[0]===t[0]&&n[1]===t[1]}function dP(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function gP(n,t,e){e===void 0&&(e={}),e.mask&&!e.units&&(e.units="kilometers");for(var r=[],i=n[0],s=n[1],o=n[2],a=n[3],u=t/He([i,s],[o,s],e),l=u*(o-i),c=t/He([i,s],[i,a],e),h=c*(a-s),f=o-i,d=a-s,v=Math.floor(f/l),_=Math.floor(d/h),E=(f-v*l)/2,P=(d-_*h)/2,y=i+E;y<=o;){for(var w=s+P;w<=a;){var m=$t([y,w],e.properties);e.mask?F0(m,e.mask)&&r.push(m):r.push(m),w+=h}y+=l}return on(r)}function vf(n,t){t===void 0&&(t={});var e=yr(n);switch(!t.properties&&n.type==="Feature"&&(t.properties=n.properties),e.type){case"Polygon":return pP(e,t);case"MultiPolygon":return vP(e,t);default:throw new Error("invalid poly")}}function pP(n,t){t===void 0&&(t={});var e=yr(n),r=e.coordinates,i=t.properties?t.properties:n.type==="Feature"?n.properties:{};return V0(r,i)}function vP(n,t){t===void 0&&(t={});var e=yr(n),r=e.coordinates,i=t.properties?t.properties:n.type==="Feature"?n.properties:{},s=[];return r.forEach(function(o){s.push(V0(o,i))}),on(s)}function V0(n,t){return n.length>1?SC(n,t):Yr(n[0],t)}function mP(n,t,e){e===void 0&&(e={});var r;e.final?r=U0(Dr(t),Dr(n)):r=U0(Dr(n),Dr(t));var i=r>180?-(360-r):r;return i}function U0(n,t){var e=mr(n[1]),r=mr(t[1]),i=mr(t[0]-n[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(ch(o)+360)%360}function yP(n,t,e,r){r===void 0&&(r={});var i=t<0,s=af(Math.abs(t),r.units,"meters");i&&(s=-Math.abs(s));var o=Dr(n),a=_P(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,$t(a,r.properties)}function _P(n,t,e,r){r=r===void 0?ar:Number(r);var i=t/r,s=n[0]*Math.PI/180,o=mr(n[1]),a=mr(e),u=i*Math.cos(a),l=o+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var c=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),h=Math.abs(c)>1e-11?u/c:Math.cos(o),f=i*Math.sin(a)/h,d=s+f;return[(d*180/Math.PI+540)%360-180,l*180/Math.PI]}function wP(n,t){var e=!0;return co(n,function(r){co(t,function(i){if(e===!1)return!1;e=EP(r.geometry,i.geometry)})}),e}function EP(n,t){switch(n.type){case"Point":switch(t.type){case"Point":return!IP(n.coordinates,t.coordinates);case"LineString":return!z0(t,n);case"Polygon":return!Qe(n,t)}break;case"LineString":switch(t.type){case"Point":return!z0(n,t);case"LineString":return!SP(n,t);case"Polygon":return!q0(t,n)}break;case"Polygon":switch(t.type){case"Point":return!Qe(t,n);case"LineString":return!q0(n,t);case"Polygon":return!CP(t,n)}}return!1}function z0(n,t){for(var e=0;e<n.coordinates.length-1;e++)if(PP(n.coordinates[e],n.coordinates[e+1],t.coordinates))return!0;return!1}function SP(n,t){var e=tl(n,t);return e.features.length>0}function q0(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(Qe(i,n))return!0}var s=tl(t,vf(n));return s.features.length>0}function CP(n,t){for(var e=0,r=n.coordinates[0];e<r.length;e++){var i=r[e];if(Qe(i,t))return!0}for(var s=0,o=t.coordinates[0];s<o.length;s++){var a=o[s];if(Qe(a,n))return!0}var u=tl(vf(n),vf(t));return u.features.length>0}function PP(n,t,e){var r=e[0]-n[0],i=e[1]-n[1],s=t[0]-n[0],o=t[1]-n[1],a=r*o-i*s;return a!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?n[0]<=e[0]&&e[0]<=t[0]:t[0]<=e[0]&&e[0]<=n[0]:o>0?n[1]<=e[1]&&e[1]<=t[1]:t[1]<=e[1]&&e[1]<=n[1]}function IP(n,t){return n[0]===t[0]&&n[1]===t[1]}function MP(n,t){var e=yr(n),r=yr(t),i=e.type,s=r.type,o=e.coordinates,a=r.coordinates;switch(i){case"Point":switch(s){case"Point":return mf(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return bP(e,r);case"MultiPoint":return NP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return ts(r,e,{ignoreEndVertices:!0});case"LineString":return AP(e,r);case"MultiPoint":return xP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return Qe(r,e,{ignoreBoundary:!0});case"LineString":return OP(e,r);case"Polygon":return DP(e,r);case"MultiPoint":return TP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function bP(n,t){var e,r=!1;for(e=0;e<n.coordinates.length;e++)if(mf(n.coordinates[e],t.coordinates)){r=!0;break}return r}function NP(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){for(var i=r[e],s=!1,o=0,a=n.coordinates;o<a.length;o++){var u=a[o];if(mf(i,u)){s=!0;break}}if(!s)return!1}return!0}function xP(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(ts(s,n,{ignoreEndVertices:!0})&&(e=!0),!ts(s,n))return!1}return!!e}function TP(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(!Qe(i,n,{ignoreBoundary:!0}))return!1}return!0}function AP(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(ts({type:"Point",coordinates:s},n,{ignoreEndVertices:!0})&&(e=!0),!ts({type:"Point",coordinates:s},n,{ignoreEndVertices:!1}))return!1}return e}function OP(n,t){var e=!1,r=0,i=Cn(n),s=Cn(t);if(!W0(i,s))return!1;for(r;r<t.coordinates.length-1;r++){var o=LP(t.coordinates[r],t.coordinates[r+1]);if(Qe({type:"Point",coordinates:o},n,{ignoreBoundary:!0})){e=!0;break}}return e}function DP(n,t){if(n.type==="Feature"&&n.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=Cn(n),r=Cn(t);if(!W0(e,r))return!1;for(var i=yr(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,l=a;u<l.length;u++){var c=l[u];if(!Qe(c,n))return!1}return!0}function W0(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function mf(n,t){return n[0]===t[0]&&n[1]===t[1]}function LP(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function RP(n,t){var e=!1;return co(n,function(r){co(t,function(i){if(e===!0)return!0;e=!wP(r.geometry,i.geometry)})}),e}/**
|
|
44
|
+
northing meters`+n;var f=h/2,d=0,v=0,_,E,P,y,w;return f>0&&(_=1e5/Math.pow(10,f),E=n.substring(s,s+f),d=parseFloat(E)*_,P=n.substring(s+f),v=parseFloat(P)*_),y=d+l,w=v+c,{easting:y,northing:w,zoneLetter:a,zoneNumber:o,accuracy:_}}function F1(n,t){for(var e=kp.charCodeAt(t-1),r=1e5,i=!1;e!==n.charCodeAt(0);){if(e++,e===Xr&&e++,e===En&&e++,e>Vu){if(i)throw"Bad character: "+n;e=aa,i=!0}r+=1e5}return r}function G1(n,t){if(n>"V")throw"MGRSPoint given invalid Northing "+n;for(var e=Vp.charCodeAt(t-1),r=0,i=!1;e!==n.charCodeAt(0);){if(e++,e===Xr&&e++,e===En&&e++,e>ku){if(i)throw"Bad character: "+n;e=aa,i=!0}r+=1e5}return r}function k1(n){var t;switch(n){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: "+n}function ua(n,t,e){if(!(this instanceof ua))return new ua(n,t,e);if(Array.isArray(n))this.x=n[0],this.y=n[1],this.z=n[2]||0;else if(typeof n=="object")this.x=n.x,this.y=n.y,this.z=n.z||0;else if(typeof n=="string"&&typeof t>"u"){var r=n.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=n,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}ua.fromMGRS=function(n){return new ua(zp(n))},ua.prototype.toMGRS=function(n){return Up([this.x,this.y],n)};var V1=1,U1=.25,Xp=.046875,Bp=.01953125,Yp=.01068115234375,z1=.75,q1=.46875,W1=.013020833333333334,H1=.007120768229166667,X1=.3645833333333333,B1=.005696614583333333,Y1=.3076171875;function jc(n){var t=[];t[0]=V1-n*(U1+n*(Xp+n*(Bp+n*Yp))),t[1]=n*(z1-n*(Xp+n*(Bp+n*Yp)));var e=n*n;return t[2]=e*(q1-n*(W1+n*H1)),e*=n,t[3]=e*(X1-n*B1),t[4]=e*n*Y1,t}function la(n,t,e,r){return e*=t,t*=t,r[0]*n-e*(r[1]+t*(r[2]+t*(r[3]+t*r[4])))}var J1=20;function Qc(n,t,e){for(var r=1/(1-t),i=n,s=J1;s;--s){var o=Math.sin(i),a=1-t*o*o;if(a=(la(i,o,Math.cos(i),e)-n)*(a*Math.sqrt(a))*r,i-=a,Math.abs(a)<et)return i}return i}function j1(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=jc(this.es),this.ml0=la(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Q1(n){var t=n.x,e=n.y,r=ot(t-this.long0),i,s,o,a=Math.sin(e),u=Math.cos(e);if(this.es){var c=u*r,h=Math.pow(c,2),f=this.ep2*Math.pow(u,2),d=Math.pow(f,2),v=Math.abs(u)>et?Math.tan(e):0,_=Math.pow(v,2),E=Math.pow(_,2);i=1-this.es*Math.pow(a,2),c=c/Math.sqrt(i);var P=la(e,a,u,this.en);s=this.a*(this.k0*c*(1+h/6*(1-_+f+h/20*(5-18*_+E+14*f-58*_*f+h/42*(61+179*E-E*_-479*_)))))+this.x0,o=this.a*(this.k0*(P-this.ml0+a*r*c/2*(1+h/12*(5-_+9*f+4*d+h/30*(61+E-58*_+270*f-330*_*f+h/56*(1385+543*E-E*_-3111*_))))))+this.y0}else{var l=u*Math.sin(r);if(Math.abs(Math.abs(l)-1)<et)return 93;if(s=.5*this.a*this.k0*Math.log((1+l)/(1-l))+this.x0,o=u*Math.cos(r)/Math.sqrt(1-Math.pow(l,2)),l=Math.abs(o),l>=1){if(l-1>et)return 93;o=0}else o=Math.acos(o);e<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return n.x=s,n.y=o,n}function K1(n){var t,e,r,i,s=(n.x-this.x0)*(1/this.a),o=(n.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,e=Qc(t,this.es,this.en),Math.abs(e)<J){var h=Math.sin(e),f=Math.cos(e),d=Math.abs(f)>et?Math.tan(e):0,v=this.ep2*Math.pow(f,2),_=Math.pow(v,2),E=Math.pow(d,2),P=Math.pow(E,2);t=1-this.es*Math.pow(h,2);var y=s*Math.sqrt(t)/this.k0,w=Math.pow(y,2);t=t*d,r=e-t*w/(1-this.es)*.5*(1-w/12*(5+3*E-9*v*E+v-4*_-w/30*(61+90*E-252*v*E+45*P+46*v-w/56*(1385+3633*E+4095*P+1574*P*E)))),i=ot(this.long0+y*(1-w/6*(1+2*E+v-w/20*(5+28*E+24*P+8*v*E+6*v-w/42*(61+662*E+1320*P+720*P*E))))/f)}else r=J*Fu(o),i=0;else{var a=Math.exp(s/this.k0),u=.5*(a-1/a),l=this.lat0+o/this.k0,c=Math.cos(l);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(u,2))),r=Math.asin(t),o<0&&(r=-r),u===0&&c===0?i=0:i=ot(Math.atan2(u,c)+this.long0)}return n.x=i,n.y=r,n}var $1=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const sh={init:j1,forward:Q1,inverse:K1,names:$1};function Jp(n){var t=Math.exp(n);return t=(t-1/t)/2,t}function Br(n,t){n=Math.abs(n),t=Math.abs(t);var e=Math.max(n,t),r=Math.min(n,t)/(e||1);return e*Math.sqrt(1+Math.pow(r,2))}function Z1(n){var t=1+n,e=t-1;return e===0?n:n*Math.log(t)/e}function tw(n){var t=Math.abs(n);return t=Z1(t*(1+t/(Br(1,t)+1))),n<0?-t:t}function Kc(n,t){for(var e=2*Math.cos(2*t),r=n.length-1,i=n[r],s=0,o;--r>=0;)o=-s+e*i+n[r],s=i,i=o;return t+o*Math.sin(2*t)}function ew(n,t){for(var e=2*Math.cos(t),r=n.length-1,i=n[r],s=0,o;--r>=0;)o=-s+e*i+n[r],s=i,i=o;return Math.sin(t)*o}function rw(n){var t=Math.exp(n);return t=(t+1/t)/2,t}function jp(n,t,e){for(var r=Math.sin(t),i=Math.cos(t),s=Jp(e),o=rw(e),a=2*i*o,u=-2*r*s,l=n.length-1,c=n[l],h=0,f=0,d=0,v,_;--l>=0;)v=f,_=h,f=c,h=d,c=-v+a*f-u*h+n[l],d=-_+u*f+a*h;return a=r*o,u=i*s,[a*c-u*d,a*d+u*c]}function nw(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(sh.init.apply(this),this.forward=sh.forward,this.inverse=sh.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var n=this.es/(1+Math.sqrt(1-this.es)),t=n/(2-n),e=t;this.cgb[0]=t*(2+t*(-.6666666666666666+t*(-2+t*(2.577777777777778+t*(.5777777777777777+t*-4.228148148148148))))),this.cbg[0]=t*(-2+t*(.6666666666666666+t*(1.3333333333333333+t*(-1.8222222222222222+t*(.7111111111111111+t*.9824338624338624))))),e=e*t,this.cgb[1]=e*(2.3333333333333335+t*(-1.6+t*(-5.044444444444444+t*(8.584126984126984+t*2.458201058201058)))),this.cbg[1]=e*(1.6666666666666667+t*(-1.0666666666666667+t*(-1.4444444444444444+t*(2.86984126984127+t*-1.6105820105820106)))),e=e*t,this.cgb[2]=e*(3.7333333333333334+t*(-3.8857142857142857+t*(-12.019047619047619+t*26.03668430335097))),this.cbg[2]=e*(-1.7333333333333334+t*(1.619047619047619+t*(1.6+t*-4.474779541446208))),e=e*t,this.cgb[3]=e*(6.792063492063492+t*(-9.485714285714286+t*-28.188500881834216)),this.cbg[3]=e*(1.9634920634920634+t*(-2.4+t*-1.7518165784832451)),e=e*t,this.cgb[4]=e*(13.250793650793652+t*-23.22238255571589),this.cbg[4]=e*(-2.3301587301587303+t*3.5144460477793813),e=e*t,this.cgb[5]=e*27.011268237934903,this.cbg[5]=e*2.8496841430174764,e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(.25+e*(.015625+e/256))),this.utg[0]=t*(-.5+t*(.6666666666666666+t*(-.3854166666666667+t*(.002777777777777778+t*(.158203125+t*-.15905919312169312))))),this.gtu[0]=t*(.5+t*(-.6666666666666666+t*(.3125+t*(.22777777777777777+t*(-.4409722222222222+t*.20875661375661375))))),this.utg[1]=e*(-.020833333333333332+t*(-.06666666666666667+t*(.3034722222222222+t*(-.4380952380952381+t*.2890188388723545)))),this.gtu[1]=e*(.2708333333333333+t*(-.6+t*(.38680555555555557+t*(.44603174603174606+t*-1.0248393063822752)))),e=e*t,this.utg[2]=e*(-.035416666666666666+t*(.04404761904761905+t*(.046651785714285715+t*-.06138668430335097))),this.gtu[2]=e*(.25416666666666665+t*(-.7357142857142858+t*(.5603050595238095+t*.9237378747795415))),e=e*t,this.utg[3]=e*(-.02726314484126984+t*(.021825396825396824+t*.11439745921516754)),this.gtu[3]=e*(.30729786706349205+t*(-1.0654761904761905+t*.9096203979276896)),e=e*t,this.utg[4]=e*(-.02841641865079365+t*.027268468414301746),this.gtu[4]=e*(.4306671626984127+t*-1.713007555715889),e=e*t,this.utg[5]=e*-.03233083094085698,this.gtu[5]=e*.6650675310896665;var r=Kc(this.cbg,this.lat0);this.Zb=-this.Qn*(r+ew(this.gtu,2*r))}function iw(n){var t=ot(n.x-this.long0),e=n.y;e=Kc(this.cbg,e);var r=Math.sin(e),i=Math.cos(e),s=Math.sin(t),o=Math.cos(t);e=Math.atan2(r,o*i),t=Math.atan2(s*i,Br(r,i*o)),t=tw(Math.tan(t));var a=jp(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var u,l;return Math.abs(t)<=2.623395162778?(u=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*e+this.Zb)+this.y0):(u=1/0,l=1/0),n.x=u,n.y=l,n}function sw(n){var t=(n.x-this.x0)*(1/this.a),e=(n.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var r,i;if(Math.abs(t)<=2.623395162778){var s=jp(this.utg,2*e,2*t);e=e+s[0],t=t+s[1],t=Math.atan(Jp(t));var o=Math.sin(e),a=Math.cos(e),u=Math.sin(t),l=Math.cos(t);e=Math.atan2(o*l,Br(u,l*a)),t=Math.atan2(u,l*a),r=ot(t+this.long0),i=Kc(this.cgb,e)}else r=1/0,i=1/0;return n.x=r,n.y=i,n}var ow=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const oh={init:nw,forward:iw,inverse:sw,names:ow};function aw(n,t){if(n===void 0){if(n=Math.floor((ot(t)+Math.PI)*30/Math.PI)+1,n<0)return 0;if(n>60)return 60}return n}var uw="etmerc";function lw(){var n=aw(this.zone,this.long0);if(n===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(n)-183)*ue,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,oh.init.apply(this),this.forward=oh.forward,this.inverse=oh.inverse}var hw=["Universal Transverse Mercator System","utm"];const cw={init:lw,names:hw,dependsOn:uw};function $c(n,t){return Math.pow((1-n)/(1+n),t)}var fw=20;function dw(){var n=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*n*n),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(n/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+re)/(Math.pow(Math.tan(.5*this.lat0+re),this.C)*$c(this.e*n,this.ratexp))}function gw(n){var t=n.x,e=n.y;return n.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+re),this.C)*$c(this.e*Math.sin(e),this.ratexp))-J,n.x=this.C*t,n}function pw(n){for(var t=1e-14,e=n.x/this.C,r=n.y,i=Math.pow(Math.tan(.5*r+re)/this.K,1/this.C),s=fw;s>0&&(r=2*Math.atan(i*$c(this.e*Math.sin(n.y),-.5*this.e))-J,!(Math.abs(r-n.y)<t));--s)n.y=r;return s?(n.x=e,n.y=r,n):null}const Zc={init:dw,forward:gw,inverse:pw};function vw(){Zc.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"))}function mw(n){var t,e,r,i;return n.x=ot(n.x-this.long0),Zc.forward.apply(this,[n]),t=Math.sin(n.y),e=Math.cos(n.y),r=Math.cos(n.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*r),n.x=i*e*Math.sin(n.x),n.y=i*(this.cosc0*t-this.sinc0*e*r),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function yw(n){var t,e,r,i,s;if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,s=Br(n.x,n.y)){var o=2*Math.atan2(s,this.R2);t=Math.sin(o),e=Math.cos(o),i=Math.asin(e*this.sinc0+n.y*t*this.cosc0/s),r=Math.atan2(n.x*t,s*this.cosc0*e-n.y*this.sinc0*t)}else i=this.phic0,r=0;return n.x=r,n.y=i,Zc.inverse.apply(this,[n]),n.x=ot(n.x+this.long0),n}var _w=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const ww={init:vw,forward:mw,inverse:yw,names:_w};function Ew(n,t,e){return t*=e,Math.tan(.5*(J+n))*Math.pow((1-t)/(1+t),.5*e)}function Sw(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=et&&(this.k0=.5*(1+Fu(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=et&&(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)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=et&&Math.abs(Math.cos(this.lat_ts))>et&&(this.k0=.5*this.cons*Ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ei(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ii(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-J,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function Cw(n){var t=n.x,e=n.y,r=Math.sin(e),i=Math.cos(e),s,o,a,u,l,c,h=ot(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=et&&Math.abs(e+this.lat0)<=et?(n.x=NaN,n.y=NaN,n):this.sphere?(s=2*this.k0/(1+this.sinlat0*r+this.coslat0*i*Math.cos(h)),n.x=this.a*s*i*Math.sin(h)+this.x0,n.y=this.a*s*(this.coslat0*r-this.sinlat0*i*Math.cos(h))+this.y0,n):(o=2*Math.atan(this.ssfn_(e,r,this.e))-J,u=Math.cos(o),a=Math.sin(o),Math.abs(this.coslat0)<=et?(l=ei(this.e,e*this.con,this.con*r),c=2*this.a*this.k0*l/this.cons,n.x=this.x0+c*Math.sin(t-this.long0),n.y=this.y0-this.con*c*Math.cos(t-this.long0),n):(Math.abs(this.sinlat0)<et?(s=2*this.a*this.k0/(1+u*Math.cos(h)),n.y=s*a):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*u*Math.cos(h))),n.y=s*(this.cosX0*a-this.sinX0*u*Math.cos(h))+this.y0),n.x=s*u*Math.sin(h)+this.x0,n))}function Pw(n){n.x-=this.x0,n.y-=this.y0;var t,e,r,i,s,o=Math.sqrt(n.x*n.x+n.y*n.y);if(this.sphere){var a=2*Math.atan(o/(2*this.a*this.k0));return t=this.long0,e=this.lat0,o<=et?(n.x=t,n.y=e,n):(e=Math.asin(Math.cos(a)*this.sinlat0+n.y*Math.sin(a)*this.coslat0/o),Math.abs(this.coslat0)<et?this.lat0>0?t=ot(this.long0+Math.atan2(n.x,-1*n.y)):t=ot(this.long0+Math.atan2(n.x,n.y)):t=ot(this.long0+Math.atan2(n.x*Math.sin(a),o*this.coslat0*Math.cos(a)-n.y*this.sinlat0*Math.sin(a))),n.x=t,n.y=e,n)}else if(Math.abs(this.coslat0)<=et){if(o<=et)return e=this.lat0,t=this.long0,n.x=t,n.y=e,n;n.x*=this.con,n.y*=this.con,r=o*this.cons/(2*this.a*this.k0),e=this.con*Gu(this.e,r),t=this.con*ot(this.con*this.long0+Math.atan2(n.x,-1*n.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=et?s=this.X0:(s=Math.asin(Math.cos(i)*this.sinX0+n.y*Math.sin(i)*this.cosX0/o),t=ot(this.long0+Math.atan2(n.x*Math.sin(i),o*this.cosX0*Math.cos(i)-n.y*this.sinX0*Math.sin(i)))),e=-1*Gu(this.e,Math.tan(.5*(J+s)));return n.x=t,n.y=e,n}var Iw=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const Mw={init:Sw,forward:Cw,inverse:Pw,names:Iw,ssfn_:Ew};function bw(){var n=this.lat0;this.lambda0=this.long0;var t=Math.sin(n),e=this.a,r=this.rf,i=1/r,s=2*i-Math.pow(i,2),o=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(n),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),u=Math.log(Math.tan(Math.PI/4+n/2)),l=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*u+this.alpha*o/2*l}function Nw(n){var t=Math.log(Math.tan(Math.PI/4-n.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(n.y))/(1-this.e*Math.sin(n.y))),r=-this.alpha*(t+e)+this.K,i=2*(Math.atan(Math.exp(r))-Math.PI/4),s=this.alpha*(n.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return n.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,n.x=this.R*o+this.x0,n}function xw(n){for(var t=n.x-this.x0,e=n.y-this.y0,r=t/this.R,i=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(r)),o=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(i))),a=this.lambda0+o/this.alpha,u=0,l=s,c=-1e3,h=0;Math.abs(l-c)>1e-7;){if(++h>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(u))-Math.PI/2}return n.x=a,n.y=l,n}var Tw=["somerc"];const Aw={init:bw,forward:Nw,inverse:xw,names:Tw};var ha=1e-7;function Ow(n){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof n.projName=="object"?Object.keys(n.projName)[0]:n.projName;return"no_uoff"in n||"no_off"in n||t.indexOf(e)!==-1||t.indexOf(Ip(e))!==-1}function Dw(){var n,t,e,r,i,s,o,a,u,l,c=0,h,f=0,d=0,v=0,_=0,E=0,P=0;this.no_off=Ow(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),y&&(P=this.alpha),w&&(c=this.rectified_grid_angle),y||w)f=this.longc;else if(d=this.long1,_=this.lat1,v=this.long2,E=this.lat2,Math.abs(_-E)<=ha||(n=Math.abs(_))<=ha||Math.abs(n-J)<=ha||Math.abs(Math.abs(this.lat0)-J)<=ha||Math.abs(Math.abs(E)-J)<=ha)throw new Error;var m=1-this.es;t=Math.sqrt(m),Math.abs(this.lat0)>et?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),n=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/m),this.A=this.B*this.k0*t/n,r=this.B*t/(e*Math.sqrt(n)),i=r*r-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=r,this.E*=Math.pow(ei(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=r=i=1),y||w?(y?(h=Math.asin(Math.sin(P)/r),w||(c=P)):(h=c,P=Math.asin(r*Math.sin(h))),this.lam0=f-Math.asin(.5*(i-1/i)*Math.tan(h))/this.B):(s=Math.pow(ei(this.e,_,Math.sin(_)),this.B),o=Math.pow(ei(this.e,E,Math.sin(E)),this.B),i=this.E/s,u=(o-s)/(o+s),l=this.E*this.E,l=(l-o*s)/(l+o*s),n=d-v,n<-Math.pi?v-=Lu:n>Math.pi&&(v+=Lu),this.lam0=ot(.5*(d+v)-Math.atan(l*Math.tan(.5*this.B*(d-v))/u)/this.B),h=Math.atan(2*Math.sin(this.B*ot(d-this.lam0))/(i-1/i)),c=P=Math.asin(r*Math.sin(h))),this.singam=Math.sin(h),this.cosgam=Math.cos(h),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(r*r-1)/Math.cos(P))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*h,this.v_pole_n=this.ArB*Math.log(Math.tan(re-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(re+i))}function Lw(n){var t={},e,r,i,s,o,a,u,l;if(n.x=n.x-this.lam0,Math.abs(Math.abs(n.y)-J)>et){if(o=this.E/Math.pow(ei(this.e,n.y,Math.sin(n.y)),this.B),a=1/o,e=.5*(o-a),r=.5*(o+a),s=Math.sin(this.B*n.x),i=(e*this.singam-s*this.cosgam)/r,Math.abs(Math.abs(i)-1)<et)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),a=Math.cos(this.B*n.x),Math.abs(a)<ha?u=this.A*n.x:u=this.ArB*Math.atan2(e*this.cosgam+s*this.singam,a)}else l=n.y>0?this.v_pole_n:this.v_pole_s,u=this.ArB*n.y;return this.no_rot?(t.x=u,t.y=l):(u-=this.u_0,t.x=l*this.cosrot+u*this.sinrot,t.y=u*this.cosrot-l*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function Rw(n){var t,e,r,i,s,o,a,u={};if(n.x=(n.x-this.x0)*(1/this.a),n.y=(n.y-this.y0)*(1/this.a),this.no_rot?(e=n.y,t=n.x):(e=n.x*this.cosrot-n.y*this.sinrot,t=n.y*this.cosrot+n.x*this.sinrot+this.u_0),r=Math.exp(-this.BrA*e),i=.5*(r-1/r),s=.5*(r+1/r),o=Math.sin(this.BrA*t),a=(o*this.cosgam+i*this.singam)/s,Math.abs(Math.abs(a)-1)<et)u.x=0,u.y=a<0?-J:J;else{if(u.y=this.E/Math.sqrt((1+a)/(1-a)),u.y=Gu(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(i*this.cosgam-o*this.singam,Math.cos(this.BrA*t))}return u.x+=this.lam0,u}var Fw=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const Gw={init:Dw,forward:Lw,inverse:Rw,names:Fw};function kw(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<et)){var n=this.b/this.a;this.e=Math.sqrt(1-n*n);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),r=Ii(this.e,t,e),i=ei(this.e,this.lat1,t),s=Math.sin(this.lat2),o=Math.cos(this.lat2),a=Ii(this.e,s,o),u=ei(this.e,this.lat2,s),l=Math.abs(Math.abs(this.lat0)-J)<et?0:ei(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>et?this.ns=Math.log(r/a)/Math.log(i/u):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=r/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Vw(n){var t=n.x,e=n.y;Math.abs(2*Math.abs(e)-Math.PI)<=et&&(e=Fu(e)*(J-2*et));var r=Math.abs(Math.abs(e)-J),i,s;if(r>et)i=ei(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(i,this.ns);else{if(r=e*this.ns,r<=0)return null;s=0}var o=this.ns*ot(t-this.long0);return n.x=this.k0*(s*Math.sin(o))+this.x0,n.y=this.k0*(this.rh-s*Math.cos(o))+this.y0,n}function Uw(n){var t,e,r,i,s,o=(n.x-this.x0)/this.k0,a=this.rh-(n.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+a*a),e=1):(t=-Math.sqrt(o*o+a*a),e=-1);var u=0;if(t!==0&&(u=Math.atan2(e*o,e*a)),t!==0||this.ns>0){if(e=1/this.ns,r=Math.pow(t/(this.a*this.f0),e),i=Gu(this.e,r),i===-9999)return null}else i=-J;return s=ot(u/this.ns+this.long0),n.x=s,n.y=i,n}var zw=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const qw={init:kw,forward:Vw,inverse:Uw,names:zw};function Ww(){this.a=6377397155e-3,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}function Hw(n){var t,e,r,i,s,o,a,u=n.x,l=n.y,c=ot(u-this.long0);return t=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/t)-this.s45),r=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(r)),s=Math.asin(Math.cos(e)*Math.sin(r)/Math.cos(i)),o=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),n.y=a*Math.cos(o)/1,n.x=a*Math.sin(o)/1,this.czech||(n.y*=-1,n.x*=-1),n}function Xw(n){var t,e,r,i,s,o,a,u,l=n.x;n.x=n.y,n.y=l,this.czech||(n.y*=-1,n.x*=-1),o=Math.sqrt(n.x*n.x+n.y*n.y),s=Math.atan2(n.y,n.x),i=s/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),e=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(t)),n.x=this.long0-e/this.alfa,a=t,u=0;var c=0;do n.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(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-n.y)<1e-10&&(u=1),a=n.y,c+=1;while(u===0&&c<15);return c>=15?null:n}var Bw=["Krovak","krovak"];const Yw={init:Ww,forward:Hw,inverse:Xw,names:Bw};function Or(n,t,e,r,i){return n*i-t*Math.sin(2*i)+e*Math.sin(4*i)-r*Math.sin(6*i)}function Uu(n){return 1-.25*n*(1+n/16*(3+1.25*n))}function zu(n){return .375*n*(1+.25*n*(1+.46875*n))}function qu(n){return .05859375*n*n*(1+.75*n)}function Wu(n){return n*n*n*.011393229166666666}function tf(n,t,e){var r=t*e;return n/Math.sqrt(1-r*r)}function Ms(n){return Math.abs(n)<J?n:n-Fu(n)*Math.PI}function ah(n,t,e,r,i){var s,o;s=n/t;for(var a=0;a<15;a++)if(o=(n-(t*s-e*Math.sin(2*s)+r*Math.sin(4*s)-i*Math.sin(6*s)))/(t-2*e*Math.cos(2*s)+4*r*Math.cos(4*s)-6*i*Math.cos(6*s)),s+=o,Math.abs(o)<=1e-10)return s;return NaN}function Jw(){this.sphere||(this.e0=Uu(this.es),this.e1=zu(this.es),this.e2=qu(this.es),this.e3=Wu(this.es),this.ml0=this.a*Or(this.e0,this.e1,this.e2,this.e3,this.lat0))}function jw(n){var t,e,r=n.x,i=n.y;if(r=ot(r-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(r)),e=this.a*(Math.atan2(Math.tan(i),Math.cos(r))-this.lat0);else{var s=Math.sin(i),o=Math.cos(i),a=tf(this.a,this.e,s),u=Math.tan(i)*Math.tan(i),l=r*Math.cos(i),c=l*l,h=this.es*o*o/(1-this.es),f=this.a*Or(this.e0,this.e1,this.e2,this.e3,i);t=a*l*(1-c*u*(.16666666666666666-(8-u+8*h)*c/120)),e=f-this.ml0+a*s/o*c*(.5+(5-u+6*h)*c/24)}return n.x=t+this.x0,n.y=e+this.y0,n}function Qw(n){n.x-=this.x0,n.y-=this.y0;var t=n.x/this.a,e=n.y/this.a,r,i;if(this.sphere){var s=e+this.lat0;r=Math.asin(Math.sin(s)*Math.cos(t)),i=Math.atan2(Math.tan(t),Math.cos(s))}else{var o=this.ml0/this.a+e,a=ah(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-J)<=et)return n.x=this.long0,n.y=J,e<0&&(n.y*=-1),n;var u=tf(this.a,this.e,Math.sin(a)),l=u*u*u/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(a),2),h=t*this.a/u,f=h*h;r=a-u*Math.tan(a)/l*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-f*(c/3+(1+3*c)*c*f/15))/Math.cos(a)}return n.x=ot(i+this.long0),n.y=Ms(r),n}var Kw=["Cassini","Cassini_Soldner","cass"];const $w={init:Jw,forward:jw,inverse:Qw,names:Kw};function bs(n,t){var e;return n>1e-7?(e=n*t,(1-n*n)*(t/(1-e*e)-.5/n*Math.log((1-e)/(1+e)))):2*t}var Zw=1,tE=2,eE=3,rE=4;function nE(){var n=Math.abs(this.lat0);if(Math.abs(n-J)<et?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(n)<et?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=bs(this.e,1),this.mmf=.5/(1-this.es),this.apa=fE(this.es),this.mode){case this.N_POLE:this.dd=1;break;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),t=Math.sin(this.lat0),this.sinb1=bs(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function iE(n){var t,e,r,i,s,o,a,u,l,c,h=n.x,f=n.y;if(h=ot(h-this.long0),this.sphere){if(s=Math.sin(f),c=Math.cos(f),r=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*r:1+this.sinph0*s+this.cosph0*c*r,e<=et)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(h),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*c*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(f+this.lat0)<et)return null;e=re-f*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(h),e*=r}}else{switch(a=0,u=0,l=0,r=Math.cos(h),i=Math.sin(h),s=Math.sin(f),o=bs(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=o/this.qp,u=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:l=1+this.sinb1*a+this.cosb1*u*r;break;case this.EQUIT:l=1+u*r;break;case this.N_POLE:l=J+f,o=this.qp-o;break;case this.S_POLE:l=f-J,o=this.qp+o;break}if(Math.abs(l)<et)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),this.mode===this.OBLIQ?e=this.ymf*l*(this.cosb1*a-this.sinb1*u*r):e=(l=Math.sqrt(2/(1+u*r)))*a*this.ymf,t=this.xmf*l*u*i;break;case this.N_POLE:case this.S_POLE:o>=0?(t=(l=Math.sqrt(o))*i,e=r*(this.mode===this.S_POLE?l:-l)):t=e=0;break}}return n.x=this.a*t+this.x0,n.y=this.a*e+this.y0,n}function sE(n){n.x-=this.x0,n.y-=this.y0;var t=n.x/this.a,e=n.y/this.a,r,i,s,o,a,u,l;if(this.sphere){var c=0,h,f=0;if(h=Math.sqrt(t*t+e*e),i=h*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(i),c=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(h)<=et?0:Math.asin(e*f/h),t*=f,e=c*h;break;case this.OBLIQ:i=Math.abs(h)<=et?this.lat0:Math.asin(c*this.sinph0+e*f*this.cosph0/h),t*=f*this.cosph0,e=(c-Math.sin(i)*this.sinph0)*h;break;case this.N_POLE:e=-e,i=J-i;break;case this.S_POLE:i-=J;break}r=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,u=Math.sqrt(t*t+e*e),u<et)return n.x=this.long0,n.y=this.lat0,n;o=2*Math.asin(.5*u/this.rq),s=Math.cos(o),t*=o=Math.sin(o),this.mode===this.OBLIQ?(l=s*this.sinb1+e*o*this.cosb1/u,a=this.qp*l,e=u*this.cosb1*s-e*this.sinb1*o):(l=e*o/u,a=this.qp*l,e=u*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return n.x=this.long0,n.y=this.lat0,n;l=1-a/this.qp,this.mode===this.S_POLE&&(l=-l)}r=Math.atan2(t,e),i=dE(Math.asin(l),this.apa)}return n.x=ot(this.long0+r),n.y=i,n}var oE=.3333333333333333,aE=.17222222222222222,uE=.10257936507936508,lE=.06388888888888888,hE=.0664021164021164,cE=.016415012942191543;function fE(n){var t,e=[];return e[0]=n*oE,t=n*n,e[0]+=t*aE,e[1]=t*lE,t*=n,e[0]+=t*uE,e[1]+=t*hE,e[2]=t*cE,e}function dE(n,t){var e=n+n;return n+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var gE=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const pE={init:nE,forward:iE,inverse:sE,names:gE,S_POLE:Zw,N_POLE:tE,EQUIT:eE,OBLIQ:rE};function Ns(n){return Math.abs(n)>1&&(n=n>1?1:-1),Math.asin(n)}function vE(){Math.abs(this.lat1+this.lat2)<et||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Ii(this.e3,this.sin_po,this.cos_po),this.qs1=bs(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Ii(this.e3,this.sin_po,this.cos_po),this.qs2=bs(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=bs(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>et?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)}function mE(n){var t=n.x,e=n.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var r=bs(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,s=this.ns0*ot(t-this.long0),o=i*Math.sin(s)+this.x0,a=this.rh-i*Math.cos(s)+this.y0;return n.x=o,n.y=a,n}function yE(n){var t,e,r,i,s,o;return n.x-=this.x0,n.y=this.rh-n.y+this.y0,this.ns0>=0?(t=Math.sqrt(n.x*n.x+n.y*n.y),r=1):(t=-Math.sqrt(n.x*n.x+n.y*n.y),r=-1),i=0,t!==0&&(i=Math.atan2(r*n.x,r*n.y)),r=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-r*r)/(2*this.ns0)):(e=(this.c-r*r)/this.ns0,o=this.phi1z(this.e3,e)),s=ot(i/this.ns0+this.long0),n.x=s,n.y=o,n}function _E(n,t){var e,r,i,s,o,a=Ns(.5*t);if(n<et)return a;for(var u=n*n,l=1;l<=25;l++)if(e=Math.sin(a),r=Math.cos(a),i=n*e,s=1-i*i,o=.5*s*s/r*(t/(1-u)-e/s+.5/n*Math.log((1-i)/(1+i))),a=a+o,Math.abs(o)<=1e-7)return a;return null}var wE=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const EE={init:vE,forward:mE,inverse:yE,names:wE,phi1z:_E};function SE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function CE(n){var t,e,r,i,s,o,a,u,l=n.x,c=n.y;return r=ot(l-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(r),o=this.sin_p14*t+this.cos_p14*e*i,s=1,o>0||Math.abs(o)<=et?(a=this.x0+this.a*s*e*Math.sin(r)/o,u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)/o):(a=this.x0+this.infinity_dist*e*Math.sin(r),u=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*i)),n.x=a,n.y=u,n}function PE(n){var t,e,r,i,s,o;return n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,(t=Math.sqrt(n.x*n.x+n.y*n.y))?(i=Math.atan2(t,this.rc),e=Math.sin(i),r=Math.cos(i),o=Ns(r*this.sin_p14+n.y*e*this.cos_p14/t),s=Math.atan2(n.x*e,t*this.cos_p14*r-n.y*this.sin_p14*e),s=ot(this.long0+s)):(o=this.phic0,s=0),n.x=s,n.y=o,n}var IE=["gnom"];const ME={init:SE,forward:CE,inverse:PE,names:IE};function bE(n,t){var e=1-(1-n*n)/(2*n)*Math.log((1-n)/(1+n));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*J:J;for(var r=Math.asin(.5*t),i,s,o,a,u=0;u<30;u++)if(s=Math.sin(r),o=Math.cos(r),a=n*s,i=Math.pow(1-a*a,2)/(2*o)*(t/(1-n*n)-s/(1-a*a)+.5/n*Math.log((1-a)/(1+a))),r+=i,Math.abs(i)<=1e-10)return r;return NaN}function NE(){this.sphere||(this.k0=Ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function xE(n){var t=n.x,e=n.y,r,i,s=ot(t-this.long0);if(this.sphere)r=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var o=bs(this.e,Math.sin(e));r=this.x0+this.a*this.k0*s,i=this.y0+this.a*o*.5/this.k0}return n.x=r,n.y=i,n}function TE(n){n.x-=this.x0,n.y-=this.y0;var t,e;return this.sphere?(t=ot(this.long0+n.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(n.y/this.a*Math.cos(this.lat_ts))):(e=bE(this.e,2*n.y*this.k0/this.a),t=ot(this.long0+n.x/(this.a*this.k0))),n.x=t,n.y=e,n}var AE=["cea"];const OE={init:NE,forward:xE,inverse:TE,names:AE};function DE(){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)}function LE(n){var t=n.x,e=n.y,r=ot(t-this.long0),i=Ms(e-this.lat0);return n.x=this.x0+this.a*r*this.rc,n.y=this.y0+this.a*i,n}function RE(n){var t=n.x,e=n.y;return n.x=ot(this.long0+(t-this.x0)/(this.a*this.rc)),n.y=Ms(this.lat0+(e-this.y0)/this.a),n}var FE=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const GE={init:DE,forward:LE,inverse:RE,names:FE};var Qp=20;function kE(){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=zu(this.es),this.e2=qu(this.es),this.e3=Wu(this.es),this.ml0=this.a*Or(this.e0,this.e1,this.e2,this.e3,this.lat0)}function VE(n){var t=n.x,e=n.y,r,i,s,o=ot(t-this.long0);if(s=o*Math.sin(e),this.sphere)Math.abs(e)<=et?(r=this.a*o,i=-1*this.a*this.lat0):(r=this.a*Math.sin(s)/Math.tan(e),i=this.a*(Ms(e-this.lat0)+(1-Math.cos(s))/Math.tan(e)));else if(Math.abs(e)<=et)r=this.a*o,i=-1*this.ml0;else{var a=tf(this.a,this.e,Math.sin(e))/Math.tan(e);r=a*Math.sin(s),i=this.a*Or(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(s))}return n.x=r+this.x0,n.y=i+this.y0,n}function UE(n){var t,e,r,i,s,o,a,u,l;if(r=n.x-this.x0,i=n.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=et)t=ot(r/this.a+this.long0),e=0;else{o=this.lat0+i/this.a,a=r*r/this.a/this.a+o*o,u=o;var c;for(s=Qp;s;--s)if(c=Math.tan(u),l=-1*(o*(u*c+1)-u-.5*(u*u+a)*c)/((u-o)/c-1),u+=l,Math.abs(l)<=et){e=u;break}t=ot(this.long0+Math.asin(r*Math.tan(u)/this.a)/Math.sin(e))}else if(Math.abs(i+this.ml0)<=et)e=0,t=ot(this.long0+r/this.a);else{o=(this.ml0+i)/this.a,a=r*r/this.a/this.a+o*o,u=o;var h,f,d,v,_;for(s=Qp;s;--s)if(_=this.e*Math.sin(u),h=Math.sqrt(1-_*_)*Math.tan(u),f=this.a*Or(this.e0,this.e1,this.e2,this.e3,u),d=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),v=f/this.a,l=(o*(h*v+1)-v-.5*h*(v*v+a))/(this.es*Math.sin(2*u)*(v*v+a-2*o*v)/(4*h)+(o-v)*(h*d-2/Math.sin(2*u))-d),u-=l,Math.abs(l)<=et){e=u;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=ot(this.long0+Math.asin(r*h/this.a)/Math.sin(e))}return n.x=t,n.y=e,n}var zE=["Polyconic","American_Polyconic","poly"];const qE={init:kE,forward:VE,inverse:UE,names:zE};function WE(){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}function HE(n){var t,e=n.x,r=n.y,i=r-this.lat0,s=e-this.long0,o=i/Du*1e-5,a=s,u=1,l=0;for(t=1;t<=10;t++)u=u*o,l=l+this.A[t]*u;var c=l,h=a,f=1,d=0,v,_,E=0,P=0;for(t=1;t<=6;t++)v=f*c-d*h,_=d*c+f*h,f=v,d=_,E=E+this.B_re[t]*f-this.B_im[t]*d,P=P+this.B_im[t]*f+this.B_re[t]*d;return n.x=P*this.a+this.x0,n.y=E*this.a+this.y0,n}function XE(n){var t,e=n.x,r=n.y,i=e-this.x0,s=r-this.y0,o=s/this.a,a=i/this.a,u=1,l=0,c,h,f=0,d=0;for(t=1;t<=6;t++)c=u*o-l*a,h=l*o+u*a,u=c,l=h,f=f+this.C_re[t]*u-this.C_im[t]*l,d=d+this.C_im[t]*u+this.C_re[t]*l;for(var v=0;v<this.iterations;v++){var _=f,E=d,P,y,w=o,m=a;for(t=2;t<=6;t++)P=_*f-E*d,y=E*f+_*d,_=P,E=y,w=w+(t-1)*(this.B_re[t]*_-this.B_im[t]*E),m=m+(t-1)*(this.B_im[t]*_+this.B_re[t]*E);_=1,E=0;var S=this.B_re[1],C=this.B_im[1];for(t=2;t<=6;t++)P=_*f-E*d,y=E*f+_*d,_=P,E=y,S=S+t*(this.B_re[t]*_-this.B_im[t]*E),C=C+t*(this.B_im[t]*_+this.B_re[t]*E);var I=S*S+C*C;f=(w*S+m*C)/I,d=(m*S-w*C)/I}var b=f,x=d,A=1,N=0;for(t=1;t<=9;t++)A=A*b,N=N+this.D[t]*A;var T=this.lat0+N*Du*1e5,L=this.long0+x;return n.x=L,n.y=T,n}var BE=["New_Zealand_Map_Grid","nzmg"];const YE={init:WE,forward:HE,inverse:XE,names:BE};function JE(){}function jE(n){var t=n.x,e=n.y,r=ot(t-this.long0),i=this.x0+this.a*r,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return n.x=i,n.y=s,n}function QE(n){n.x-=this.x0,n.y-=this.y0;var t=ot(this.long0+n.x/this.a),e=2.5*(Math.atan(Math.exp(.8*n.y/this.a))-Math.PI/4);return n.x=t,n.y=e,n}var KE=["Miller_Cylindrical","mill"];const $E={init:JE,forward:jE,inverse:QE,names:KE};var ZE=20;function tS(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=jc(this.es)}function eS(n){var t,e,r=n.x,i=n.y;if(r=ot(r-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var s=this.n*Math.sin(i),o=ZE;o;--o){var a=(this.m*i+Math.sin(i)-s)/(this.m+Math.cos(i));if(i-=a,Math.abs(a)<et)break}t=this.a*this.C_x*r*(this.m+Math.cos(i)),e=this.a*this.C_y*i}else{var u=Math.sin(i),l=Math.cos(i);e=this.a*la(i,u,l,this.en),t=this.a*r*l/Math.sqrt(1-this.es*u*u)}return n.x=t,n.y=e,n}function rS(n){var t,e,r,i;return n.x-=this.x0,r=n.x/this.a,n.y-=this.y0,t=n.y/this.a,this.sphere?(t/=this.C_y,r=r/(this.C_x*(this.m+Math.cos(t))),this.m?t=Ns((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Ns(Math.sin(t)/this.n)),r=ot(r+this.long0),t=Ms(t)):(t=Qc(n.y/this.a,this.es,this.en),i=Math.abs(t),i<J?(i=Math.sin(t),e=this.long0+n.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(t)),r=ot(e)):i-et<J&&(r=this.long0)),n.x=r,n.y=t,n}var nS=["Sinusoidal","sinu"];const iS={init:tS,forward:eS,inverse:rS,names:nS};function sS(){}function oS(n){for(var t=n.x,e=n.y,r=ot(t-this.long0),i=e,s=Math.PI*Math.sin(e);;){var o=-(i+Math.sin(i)-s)/(1+Math.cos(i));if(i+=o,Math.abs(o)<et)break}i/=2,Math.PI/2-Math.abs(e)<et&&(r=0);var a=.900316316158*this.a*r*Math.cos(i)+this.x0,u=1.4142135623731*this.a*Math.sin(i)+this.y0;return n.x=a,n.y=u,n}function aS(n){var t,e;n.x-=this.x0,n.y-=this.y0,e=n.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var r=ot(this.long0+n.x/(.900316316158*this.a*Math.cos(t)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var i=Math.asin(e);return n.x=r,n.y=i,n}var uS=["Mollweide","moll"];const lS={init:sS,forward:oS,inverse:aS,names:uS};function hS(){Math.abs(this.lat1+this.lat2)<et||(this.lat2=this.lat2||this.lat1,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=zu(this.es),this.e2=qu(this.es),this.e3=Wu(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ii(this.e,this.sinphi,this.cosphi),this.ml1=Or(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<et?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ii(this.e,this.sinphi,this.cosphi),this.ml2=Or(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Or(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function cS(n){var t=n.x,e=n.y,r;if(this.sphere)r=this.a*(this.g-e);else{var i=Or(this.e0,this.e1,this.e2,this.e3,e);r=this.a*(this.g-i)}var s=this.ns*ot(t-this.long0),o=this.x0+r*Math.sin(s),a=this.y0+this.rh-r*Math.cos(s);return n.x=o,n.y=a,n}function fS(n){n.x-=this.x0,n.y=this.rh-n.y+this.y0;var t,e,r,i;this.ns>=0?(e=Math.sqrt(n.x*n.x+n.y*n.y),t=1):(e=-Math.sqrt(n.x*n.x+n.y*n.y),t=-1);var s=0;if(e!==0&&(s=Math.atan2(t*n.x,t*n.y)),this.sphere)return i=ot(this.long0+s/this.ns),r=Ms(this.g-e/this.a),n.x=i,n.y=r,n;var o=this.g-e/this.a;return r=ah(o,this.e0,this.e1,this.e2,this.e3),i=ot(this.long0+s/this.ns),n.x=i,n.y=r,n}var dS=["Equidistant_Conic","eqdc"];const gS={init:hS,forward:cS,inverse:fS,names:dS};function pS(){this.R=this.a}function vS(n){var t=n.x,e=n.y,r=ot(t-this.long0),i,s;Math.abs(e)<=et&&(i=this.x0+this.R*r,s=this.y0);var o=Ns(2*Math.abs(e/Math.PI));(Math.abs(r)<=et||Math.abs(Math.abs(e)-J)<=et)&&(i=this.x0,e>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*o):s=this.y0+Math.PI*this.R*-Math.tan(.5*o));var a=.5*Math.abs(Math.PI/r-r/Math.PI),u=a*a,l=Math.sin(o),c=Math.cos(o),h=c/(l+c-1),f=h*h,d=h*(2/l-1),v=d*d,_=Math.PI*this.R*(a*(h-v)+Math.sqrt(u*(h-v)*(h-v)-(v+u)*(f-v)))/(v+u);r<0&&(_=-_),i=this.x0+_;var E=u+h;return _=Math.PI*this.R*(d*E-a*Math.sqrt((v+u)*(u+1)-E*E))/(v+u),e>=0?s=this.y0+_:s=this.y0-_,n.x=i,n.y=s,n}function mS(n){var t,e,r,i,s,o,a,u,l,c,h,f,d;return n.x-=this.x0,n.y-=this.y0,h=Math.PI*this.R,r=n.x/h,i=n.y/h,s=r*r+i*i,o=-Math.abs(i)*(1+s),a=o-2*i*i+r*r,u=-2*o+1+2*i*i+s*s,d=i*i/u+(2*a*a*a/u/u/u-9*o*a/u/u)/27,l=(o-a*a/3/u)/u,c=2*Math.sqrt(-l/3),h=3*d/l/c,Math.abs(h)>1&&(h>=0?h=1:h=-1),f=Math.acos(h)/3,n.y>=0?e=(-c*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI:e=-(-c*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI,Math.abs(r)<et?t=this.long0:t=ot(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(r*r-i*i)+s*s))/2/r),n.x=t,n.y=e,n}var yS=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const _S={init:pS,forward:vS,inverse:mS,names:yS};function Kp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function wS(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var ef={exports:{}},$p;function ES(){return $p||($p=1,function(n){(function(t){var e={};e.Constants={},e.Math={},e.Accumulator={},function(r){r.WGS84={a:6378137,f:.0033528106647474805},r.version={major:2,minor:1,patch:1},r.version_string="2.1.1"}(e.Constants),function(r){r.digits=53,r.epsilon=Math.pow(.5,r.digits-1),r.degree=Math.PI/180,r.sq=function(i){return i*i},r.hypot=function(i,s){return Math.sqrt(i*i+s*s)},r.cbrt=Math.cbrt||function(i){var s=Math.pow(Math.abs(i),.3333333333333333);return i>0?s:i<0?-s:i},r.log1p=Math.log1p||function(i){var s=1+i,o=s-1;return o===0?i:i*Math.log(s)/o},r.atanh=Math.atanh||function(i){var s=Math.abs(i);return s=r.log1p(2*s/(1-s))/2,i>0?s:i<0?-s:i},r.copysign=function(i,s){return Math.abs(i)*(s<0||s===0&&1/s<0?-1:1)},r.sum=function(i,s){var o=i+s,a=o-s,u=o-a,l;return a-=i,u-=s,l=o&&0-(a+u),{s:o,t:l}},r.polyval=function(i,s,o,a){for(var u=i<0?0:s[o++];--i>=0;)u=u*a+s[o++];return u},r.AngRound=function(i){var s=.0625,o=Math.abs(i);return o=o<s?s-(s-o):o,r.copysign(o,i)},r.remainder=function(i,s){return i%=s,i<-s/2?i+s:i<s/2?i:i-s},r.AngNormalize=function(i){var s=r.remainder(i,360);return Math.abs(s)===180?r.copysign(180,i):s},r.LatFix=function(i){return Math.abs(i)>90?NaN:i},r.AngDiff=function(i,s){var o=r.sum(r.remainder(-i,360),r.remainder(s,360)),a,u;return o=r.sum(r.remainder(o.s,360),o.t),a=o.s,u=o.t,(a===0||Math.abs(a)===180)&&(a=r.copysign(a,u===0?s-i:-u)),{d:a,e:u}},r.sincosd=function(i){var s,o,a,u,l,c,h;switch(s=i%360,a=Math.round(s/90),s-=90*a,o=s*this.degree,u=Math.sin(o),l=Math.cos(o),Math.abs(s)===45?(l=Math.sqrt(.5),u=r.copysign(l,o)):Math.abs(s)===30&&(l=Math.sqrt(.75),u=r.copysign(.5,o)),a&3){case 0:c=u,h=l;break;case 1:c=l,h=-u;break;case 2:c=-u,h=-l;break;default:c=-l,h=u;break}return h+=0,c===0&&(c=r.copysign(c,i)),{s:c,c:h}},r.sincosde=function(i,s){var o,a,u,l,c,h,f;switch(o=i%360,u=Math.round(o/90),o=r.AngRound(o-90*u+s),a=o*this.degree,l=Math.sin(a),c=Math.cos(a),Math.abs(o)===45?(c=Math.sqrt(.5),l=r.copysign(c,a)):Math.abs(o)===30&&(c=Math.sqrt(.75),l=r.copysign(.5,a)),u&3){case 0:h=l,f=c;break;case 1:h=c,f=-l;break;case 2:h=-l,f=-c;break;default:h=-c,f=l;break}return f+=0,h===0&&(h=r.copysign(h,i+s)),{s:h,c:f}},r.atan2d=function(i,s){var o=0,a;switch(Math.abs(i)>Math.abs(s)&&([i,s]=[s,i],o=2),r.copysign(1,s)<0&&(s=-s,++o),a=Math.atan2(i,s)/this.degree,o){case 1:a=r.copysign(180,i)-a;break;case 2:a=90-a;break;case 3:a=-90+a;break}return a}}(e.Math),function(r,i){r.Accumulator=function(s){this.Set(s)},r.Accumulator.prototype.Set=function(s){s||(s=0),s.constructor===r.Accumulator?(this._s=s._s,this._t=s._t):(this._s=s,this._t=0)},r.Accumulator.prototype.Add=function(s){var o=i.sum(s,this._t),a=i.sum(o.s,this._s);o=o.t,this._s=a.s,this._t=a.t,this._s===0?this._s=o:this._t+=o},r.Accumulator.prototype.Sum=function(s){var o;return s?(o=new r.Accumulator(this),o.Add(s),o._s):this._s},r.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},r.Accumulator.prototype.Remainder=function(s){this._s=i.remainder(this._s,s),this.Add(0)}}(e.Accumulator,e.Math),e.Geodesic={},e.GeodesicLine={},e.PolygonArea={},function(r,i,s,o,a){var u=6,l=u,c=u,h=u,f=h,d,v,_=20,E=_+o.digits+10,P=o.epsilon,y=200*P,w=Math.sqrt(P),m=P,S=1e3*w,C=0,I=31,b=32640,x,A,N,T,L,U,K,Y,Z;r.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),r.nC1_=u,r.nC1p_=u,r.nC2_=u,r.nC3_=u,r.nC4_=u,d=r.nC3_*(r.nC3_-1)/2,v=r.nC4_*(r.nC4_+1)/2,r.CAP_C1=1,r.CAP_C1p=2,r.CAP_C2=4,r.CAP_C3=8,r.CAP_C4=16,r.NONE=0,r.ARC=64,r.LATITUDE=128|C,r.LONGITUDE=256|r.CAP_C3,r.AZIMUTH=512|C,r.DISTANCE=1024|r.CAP_C1,r.STANDARD=r.LATITUDE|r.LONGITUDE|r.AZIMUTH|r.DISTANCE,r.DISTANCE_IN=2048|r.CAP_C1|r.CAP_C1p,r.REDUCEDLENGTH=4096|r.CAP_C1|r.CAP_C2,r.GEODESICSCALE=8192|r.CAP_C1|r.CAP_C2,r.AREA=16384|r.CAP_C4,r.ALL=b|I,r.LONG_UNROLL=32768,r.OUT_MASK=b|r.LONG_UNROLL,r.SinCosSeries=function(G,W,k,V){var O=V.length,q=O-(G?1:0),X=2*(k-W)*(k+W),rt=q&1?V[--O]:0,lt=0;for(q=Math.floor(q/2);q--;)lt=X*rt-lt+V[--O],rt=X*lt-rt+V[--O];return G?2*W*k*rt:k*(rt-lt)},x=function(G,W){var k,V=o.sq(G),O=o.sq(W),q=(V+O-1)/6,X,rt,lt,nt,_t,it,Ct,Mt,Q,wt,bt;return O===0&&q<=0?k=0:(X=V*O/4,rt=o.sq(q),lt=q*rt,nt=X*(X+2*lt),_t=q,nt>=0?(it=X+lt,it+=it<0?-Math.sqrt(nt):Math.sqrt(nt),Ct=o.cbrt(it),_t+=Ct+(Ct!==0?rt/Ct:0)):(Mt=Math.atan2(Math.sqrt(-nt),-(X+lt)),_t+=2*q*Math.cos(Mt/3)),Q=Math.sqrt(o.sq(_t)+O),wt=_t<0?O/(Q-_t):_t+Q,bt=(wt-O)/(2*Q),k=wt/(Math.sqrt(wt+o.sq(bt))+bt)),k},A=[1,4,64,0,256],r.A1m1f=function(G){var W=Math.floor(l/2),k=o.polyval(W,A,0,o.sq(G))/A[W+1];return(k+G)/(1-G)},N=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],r.C1f=function(G,W){var k=o.sq(G),V=G,O=0,q,X;for(q=1;q<=r.nC1_;++q)X=Math.floor((r.nC1_-q)/2),W[q]=V*o.polyval(X,N,O,k)/N[O+X+1],O+=X+2,V*=G},T=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],r.C1pf=function(G,W){var k=o.sq(G),V=G,O=0,q,X;for(q=1;q<=r.nC1p_;++q)X=Math.floor((r.nC1p_-q)/2),W[q]=V*o.polyval(X,T,O,k)/T[O+X+1],O+=X+2,V*=G},L=[-11,-28,-192,0,256],r.A2m1f=function(G){var W=Math.floor(c/2),k=o.polyval(W,L,0,o.sq(G))/L[W+1];return(k-G)/(1+G)},U=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],r.C2f=function(G,W){var k=o.sq(G),V=G,O=0,q,X;for(q=1;q<=r.nC2_;++q)X=Math.floor((r.nC2_-q)/2),W[q]=V*o.polyval(X,U,O,k)/U[O+X+1],O+=X+2,V*=G},r.Geodesic=function(G,W){if(this.a=G,this.f=W,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/o.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(o.sq(this.a)+o.sq(this._b)*(this._e2===0?1:(this._e2>0?o.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*w/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(f),this._C3x=new Array(d),this._C4x=new Array(v),this.A3coeff(),this.C3coeff(),this.C4coeff()},K=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],r.Geodesic.prototype.A3coeff=function(){var G=0,W=0,k,V;for(k=h-1;k>=0;--k)V=Math.min(h-k-1,k),this._A3x[W++]=o.polyval(V,K,G,this._n)/K[G+V+1],G+=V+2},Y=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],r.Geodesic.prototype.C3coeff=function(){var G=0,W=0,k,V,O;for(k=1;k<r.nC3_;++k)for(V=r.nC3_-1;V>=k;--V)O=Math.min(r.nC3_-V-1,V),this._C3x[W++]=o.polyval(O,Y,G,this._n)/Y[G+O+1],G+=O+2},Z=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],r.Geodesic.prototype.C4coeff=function(){var G=0,W=0,k,V,O;for(k=0;k<r.nC4_;++k)for(V=r.nC4_-1;V>=k;--V)O=r.nC4_-V-1,this._C4x[W++]=o.polyval(O,Z,G,this._n)/Z[G+O+1],G+=O+2},r.Geodesic.prototype.A3f=function(G){return o.polyval(f-1,this._A3x,0,G)},r.Geodesic.prototype.C3f=function(G,W){var k=1,V=0,O,q;for(O=1;O<r.nC3_;++O)q=r.nC3_-O-1,k*=G,W[O]=k*o.polyval(q,this._C3x,V,G),V+=q+1},r.Geodesic.prototype.C4f=function(G,W){var k=1,V=0,O,q;for(O=0;O<r.nC4_;++O)q=r.nC4_-O-1,W[O]=k*o.polyval(q,this._C4x,V,G),V+=q+1,k*=G},r.Geodesic.prototype.Lengths=function(G,W,k,V,O,q,X,rt,lt,nt,_t,it,Ct){_t&=r.OUT_MASK;var Mt={},Q=0,wt=0,bt=0,Lt=0,Ht,Xt,Qt,de,qe;if(_t&(r.DISTANCE|r.REDUCEDLENGTH|r.GEODESICSCALE)&&(bt=r.A1m1f(G),r.C1f(G,it),_t&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(Lt=r.A2m1f(G),r.C2f(G,Ct),Q=bt-Lt,Lt=1+Lt),bt=1+bt),_t&r.DISTANCE)Ht=r.SinCosSeries(!0,q,X,it)-r.SinCosSeries(!0,k,V,it),Mt.s12b=bt*(W+Ht),_t&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(Xt=r.SinCosSeries(!0,q,X,Ct)-r.SinCosSeries(!0,k,V,Ct),wt=Q*W+(bt*Ht-Lt*Xt));else if(_t&(r.REDUCEDLENGTH|r.GEODESICSCALE)){for(Qt=1;Qt<=r.nC2_;++Qt)Ct[Qt]=bt*it[Qt]-Lt*Ct[Qt];wt=Q*W+(r.SinCosSeries(!0,q,X,Ct)-r.SinCosSeries(!0,k,V,Ct))}return _t&r.REDUCEDLENGTH&&(Mt.m0=Q,Mt.m12b=rt*(V*q)-O*(k*X)-V*X*wt),_t&r.GEODESICSCALE&&(de=V*X+k*q,qe=this._ep2*(lt-nt)*(lt+nt)/(O+rt),Mt.M12=de+(qe*q-X*wt)*k/O,Mt.M21=de-(qe*k-V*wt)*q/rt),Mt},r.Geodesic.prototype.InverseStart=function(G,W,k,V,O,q,X,rt,lt,nt,_t){var it={},Ct=V*W-O*G,Mt=O*W+V*G,Q,wt,bt,Lt,Ht,Xt,Qt,de,qe,Bt,Ft,Vt,ye,De,Kn,io,ql,Ki,Kt,nn,Tr,sn,wn;return it.sig12=-1,Q=V*W,Q+=O*G,wt=Mt>=0&&Ct<.5&&O*X<.5,wt?(Lt=o.sq(G+V),Lt/=Lt+o.sq(W+O),it.dnm=Math.sqrt(1+this._ep2*Lt),bt=X/(this._f1*it.dnm),Ht=Math.sin(bt),Xt=Math.cos(bt)):(Ht=rt,Xt=lt),it.salp1=O*Ht,it.calp1=Xt>=0?Ct+O*G*o.sq(Ht)/(1+Xt):Q-O*G*o.sq(Ht)/(1-Xt),de=o.hypot(it.salp1,it.calp1),qe=G*V+W*O*Xt,wt&&de<this._etol2?(it.salp2=W*Ht,it.calp2=Ct-W*V*(Xt>=0?o.sq(Ht)/(1+Xt):1-Xt),Qt=o.hypot(it.salp2,it.calp2),it.salp2/=Qt,it.calp2/=Qt,it.sig12=Math.atan2(de,qe)):Math.abs(this._n)>.1||qe>=0||de>=6*Math.abs(this._n)*Math.PI*o.sq(W)||(wn=Math.atan2(-rt,-lt),this.f>=0?(De=o.sq(G)*this._ep2,Kn=De/(2*(1+Math.sqrt(1+De))+De),Vt=this.f*W*this.A3f(Kn)*Math.PI,ye=Vt*W,Bt=wn/Vt,Ft=Q/ye):(io=O*W-V*G,ql=Math.atan2(Q,io),nn=this.Lengths(this._n,Math.PI+ql,G,-W,k,V,O,q,W,O,r.REDUCEDLENGTH,nt,_t),Ki=nn.m12b,Kt=nn.m0,Bt=-1+Ki/(W*O*Kt*Math.PI),ye=Bt<-.01?Q/Bt:-this.f*o.sq(W)*Math.PI,Vt=ye/W,Ft=X/Vt),Ft>-y&&Bt>-1-S?this.f>=0?(it.salp1=Math.min(1,-Bt),it.calp1=-Math.sqrt(1-o.sq(it.salp1))):(it.calp1=Math.max(Bt>-y?0:-1,Bt),it.salp1=Math.sqrt(1-o.sq(it.calp1))):(Tr=x(Bt,Ft),sn=Vt*(this.f>=0?-Bt*Tr/(1+Tr):-Ft*(1+Tr)/Tr),Ht=Math.sin(sn),Xt=-Math.cos(sn),it.salp1=O*Ht,it.calp1=Q-O*G*o.sq(Ht)/(1-Xt))),it.salp1<=0?(it.salp1=1,it.calp1=0):(Qt=o.hypot(it.salp1,it.calp1),it.salp1/=Qt,it.calp1/=Qt),it},r.Geodesic.prototype.Lambda12=function(G,W,k,V,O,q,X,rt,lt,nt,_t,it,Ct,Mt){var Q={},wt,bt,Lt,Ht,Xt,Qt,de,qe,Bt,Ft,Vt,ye,De;return G===0&&rt===0&&(rt=-r.tiny_),bt=X*W,Lt=o.hypot(rt,X*G),Q.ssig1=G,Ht=bt*G,Q.csig1=Xt=rt*W,wt=o.hypot(Q.ssig1,Q.csig1),Q.ssig1/=wt,Q.csig1/=wt,Q.salp2=O!==W?bt/O:X,Q.calp2=O!==W||Math.abs(V)!==-G?Math.sqrt(o.sq(rt*W)+(W<-G?(O-W)*(W+O):(G-V)*(G+V)))/O:Math.abs(rt),Q.ssig2=V,Qt=bt*V,Q.csig2=de=Q.calp2*O,wt=o.hypot(Q.ssig2,Q.csig2),Q.ssig2/=wt,Q.csig2/=wt,Q.sig12=Math.atan2(Math.max(0,Q.csig1*Q.ssig2-Q.ssig1*Q.csig2),Q.csig1*Q.csig2+Q.ssig1*Q.ssig2),qe=Math.max(0,Xt*Qt-Ht*de),Bt=Xt*de+Ht*Qt,Vt=Math.atan2(qe*nt-Bt*lt,Bt*nt+qe*lt),ye=o.sq(Lt)*this._ep2,Q.eps=ye/(2*(1+Math.sqrt(1+ye))+ye),this.C3f(Q.eps,Mt),Ft=r.SinCosSeries(!0,Q.ssig2,Q.csig2,Mt)-r.SinCosSeries(!0,Q.ssig1,Q.csig1,Mt),Q.domg12=-this.f*this.A3f(Q.eps)*bt*(Q.sig12+Ft),Q.lam12=Vt+Q.domg12,_t&&(Q.calp2===0?Q.dlam12=-2*this._f1*k/G:(De=this.Lengths(Q.eps,Q.sig12,Q.ssig1,Q.csig1,k,Q.ssig2,Q.csig2,q,W,O,r.REDUCEDLENGTH,it,Ct),Q.dlam12=De.m12b,Q.dlam12*=this._f1/(Q.calp2*O))),Q},r.Geodesic.prototype.Inverse=function(G,W,k,V,O){var q,X;return O||(O=r.STANDARD),O===r.LONG_UNROLL&&(O|=r.STANDARD),O&=r.OUT_MASK,q=this.InverseInt(G,W,k,V,O),X=q.vals,O&r.AZIMUTH&&(X.azi1=o.atan2d(q.salp1,q.calp1),X.azi2=o.atan2d(q.salp2,q.calp2)),X},r.Geodesic.prototype.InverseInt=function(G,W,k,V,O){var q={},X,rt,lt,nt,_t,it,Ct,Mt,Q,wt,bt,Lt,Ht,Xt,Qt,de,qe,Bt,Ft,Vt,ye,De,Kn,io,ql,Ki,Kt,nn,Tr,sn,wn,pc,vc,Nu,$o,Wl,Hl,Xl,Bl,mc,Ig,xu,Mg,yc,bg,Ng,xg,hy,Tg,_c,Ag,wc,cy,Ec,fy,dy,Yl,Sc,Jl,Og,Dg,Cc,Pc,Lg,Rg;if(q.lat1=G=o.LatFix(G),q.lat2=k=o.LatFix(k),G=o.AngRound(G),k=o.AngRound(k),X=o.AngDiff(W,V),rt=X.e,X=X.d,O&r.LONG_UNROLL?(q.lon1=W,q.lon2=W+X+rt):(q.lon1=o.AngNormalize(W),q.lon2=o.AngNormalize(V)),lt=o.copysign(1,X),X*=lt,rt*=lt,Qt=X*o.degree,nt=o.sincosde(X,rt),de=nt.s,qe=nt.c,rt=180-X-rt,_t=Math.abs(G)<Math.abs(k)||isNaN(k)?-1:1,_t<0&&(lt*=-1,[k,G]=[G,k]),it=o.copysign(1,-G),G*=it,k*=it,nt=o.sincosd(G),Ct=this._f1*nt.s,Mt=nt.c,nt=o.hypot(Ct,Mt),Ct/=nt,Mt/=nt,Mt=Math.max(r.tiny_,Mt),nt=o.sincosd(k),Q=this._f1*nt.s,wt=nt.c,nt=o.hypot(Q,wt),Q/=nt,wt/=nt,wt=Math.max(r.tiny_,wt),Mt<-Ct?wt===Mt&&(Q=o.copysign(Ct,Q)):Math.abs(Q)===-Ct&&(wt=Mt),Ht=Math.sqrt(1+this._ep2*o.sq(Ct)),Xt=Math.sqrt(1+this._ep2*o.sq(Q)),Kn=new Array(r.nC1_+1),io=new Array(r.nC2_+1),ql=new Array(r.nC3_),Ki=G===-90||de===0,Ki&&(Ft=qe,Vt=de,ye=1,De=0,nn=Ct,Tr=Ft*Mt,sn=Q,wn=ye*wt,Bt=Math.atan2(Math.max(0,Tr*sn-nn*wn),Tr*wn+nn*sn),Kt=this.Lengths(this._n,Bt,nn,Tr,Ht,sn,wn,Xt,Mt,wt,O|r.DISTANCE|r.REDUCEDLENGTH,Kn,io),bt=Kt.s12b,Lt=Kt.m12b,O&r.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Bt<1||Lt>=0?((Bt<3*r.tiny_||Bt<P&&(bt<0||Lt<0))&&(Bt=Lt=bt=0),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree):Ki=!1),Yl=2,!Ki&&Ct===0&&(this.f<=0||rt>=this.f*180))Ft=ye=0,Vt=De=1,bt=this.a*Qt,Bt=vc=Qt/this._f1,Lt=this._b*Math.sin(Bt),O&r.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt)),q.a12=X/this._f1;else if(!Ki)if(Kt=this.InverseStart(Ct,Mt,Ht,Q,wt,Xt,Qt,de,qe,Kn,io),Bt=Kt.sig12,Vt=Kt.salp1,Ft=Kt.calp1,Bt>=0)De=Kt.salp2,ye=Kt.calp2,Nu=Kt.dnm,bt=Bt*this._b*Nu,Lt=o.sq(Nu)*this._b*Math.sin(Bt/Nu),O&r.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt/Nu)),q.a12=Bt/o.degree,vc=Qt/(this._f1*Nu);else{for($o=0,Wl=r.tiny_,Hl=1,Xl=r.tiny_,Bl=-1,mc=!1,Ig=!1;Kt=this.Lambda12(Ct,Mt,Ht,Q,wt,Xt,Vt,Ft,de,qe,$o<_,Kn,io,ql),xu=Kt.lam12,De=Kt.salp2,ye=Kt.calp2,Bt=Kt.sig12,nn=Kt.ssig1,Tr=Kt.csig1,sn=Kt.ssig2,wn=Kt.csig2,pc=Kt.eps,Jl=Kt.domg12,Mg=Kt.dlam12,!(Ig||!(Math.abs(xu)>=(mc?8:1)*P)||$o==E);++$o){if(xu>0&&($o<_||Ft/Vt>Bl/Xl)?(Xl=Vt,Bl=Ft):xu<0&&($o<_||Ft/Vt<Hl/Wl)&&(Wl=Vt,Hl=Ft),$o<_&&Mg>0&&(yc=-xu/Mg,Math.abs(yc)<Math.PI&&(bg=Math.sin(yc),Ng=Math.cos(yc),xg=Vt*Ng+Ft*bg,xg>0))){Ft=Ft*Ng-Vt*bg,Vt=xg,nt=o.hypot(Vt,Ft),Vt/=nt,Ft/=nt,mc=Math.abs(xu)<=16*P;continue}Vt=(Wl+Xl)/2,Ft=(Hl+Bl)/2,nt=o.hypot(Vt,Ft),Vt/=nt,Ft/=nt,mc=!1,Ig=Math.abs(Wl-Vt)+(Hl-Ft)<m||Math.abs(Vt-Xl)+(Ft-Bl)<m}hy=O|(O&(r.REDUCEDLENGTH|r.GEODESICSCALE)?r.DISTANCE:r.NONE),Kt=this.Lengths(pc,Bt,nn,Tr,Ht,sn,wn,Xt,Mt,wt,hy,Kn,io),bt=Kt.s12b,Lt=Kt.m12b,O&r.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree,O&r.AREA&&(Lg=Math.sin(Jl),Rg=Math.cos(Jl),Yl=de*Rg-qe*Lg,Sc=qe*Rg+de*Lg)}return O&r.DISTANCE&&(q.s12=0+bt),O&r.REDUCEDLENGTH&&(q.m12=0+Lt),O&r.AREA&&(Tg=Vt*Mt,_c=o.hypot(Ft,Vt*Ct),_c!==0&&Tg!==0?(nn=Ct,Tr=Ft*Mt,sn=Q,wn=ye*wt,wc=o.sq(_c)*this._ep2,pc=wc/(2*(1+Math.sqrt(1+wc))+wc),cy=o.sq(this.a)*_c*Tg*this._e2,nt=o.hypot(nn,Tr),nn/=nt,Tr/=nt,nt=o.hypot(sn,wn),sn/=nt,wn/=nt,Ec=new Array(r.nC4_),this.C4f(pc,Ec),fy=r.SinCosSeries(!1,nn,Tr,Ec),dy=r.SinCosSeries(!1,sn,wn,Ec),q.S12=cy*(dy-fy)):q.S12=0,!Ki&&Yl==2&&(Yl=Math.sin(vc),Sc=Math.cos(vc)),!Ki&&Sc>-.7071&&Q-Ct<1.75?(Jl=1+Sc,Og=1+Mt,Dg=1+wt,Ag=2*Math.atan2(Yl*(Ct*Dg+Q*Og),Jl*(Ct*Q+Og*Dg))):(Cc=De*Ft-ye*Vt,Pc=ye*Ft+De*Vt,Cc===0&&Pc<0&&(Cc=r.tiny_*Ft,Pc=-1),Ag=Math.atan2(Cc,Pc)),q.S12+=this._c2*Ag,q.S12*=_t*lt*it,q.S12+=0),_t<0&&([De,Vt]=[Vt,De],[ye,Ft]=[Ft,ye],O&r.GEODESICSCALE&&([q.M21,q.M12]=[q.M12,q.M21])),Vt*=_t*lt,Ft*=_t*it,De*=_t*lt,ye*=_t*it,{vals:q,salp1:Vt,calp1:Ft,salp2:De,calp2:ye}},r.Geodesic.prototype.GenDirect=function(G,W,k,V,O,q){var X;return q?q===r.LONG_UNROLL&&(q|=r.STANDARD):q=r.STANDARD,V||(q|=r.DISTANCE_IN),X=new i.GeodesicLine(this,G,W,k,q),X.GenPosition(V,O,q)},r.Geodesic.prototype.Direct=function(G,W,k,V,O){return this.GenDirect(G,W,k,!1,V,O)},r.Geodesic.prototype.ArcDirect=function(G,W,k,V,O){return this.GenDirect(G,W,k,!0,V,O)},r.Geodesic.prototype.Line=function(G,W,k,V){return new i.GeodesicLine(this,G,W,k,V)},r.Geodesic.prototype.DirectLine=function(G,W,k,V,O){return this.GenDirectLine(G,W,k,!1,V,O)},r.Geodesic.prototype.ArcDirectLine=function(G,W,k,V,O){return this.GenDirectLine(G,W,k,!0,V,O)},r.Geodesic.prototype.GenDirectLine=function(G,W,k,V,O,q){var X;return q||(q=r.STANDARD|r.DISTANCE_IN),V||(q|=r.DISTANCE_IN),X=new i.GeodesicLine(this,G,W,k,q),X.GenSetDistance(V,O),X},r.Geodesic.prototype.InverseLine=function(G,W,k,V,O){var q,X,rt;return O||(O=r.STANDARD|r.DISTANCE_IN),q=this.InverseInt(G,W,k,V,r.ARC),rt=o.atan2d(q.salp1,q.calp1),O&(r.OUT_MASK&r.DISTANCE_IN)&&(O|=r.DISTANCE),X=new i.GeodesicLine(this,G,W,rt,O,q.salp1,q.calp1),X.SetArc(q.vals.a12),X},r.Geodesic.prototype.Polygon=function(G){return new s.PolygonArea(this,G)},r.WGS84=new r.Geodesic(a.WGS84.a,a.WGS84.f)}(e.Geodesic,e.GeodesicLine,e.PolygonArea,e.Math,e.Constants),function(r,i,s){i.GeodesicLine=function(o,a,u,l,c,h,f){var d,v,_,E,P,y;c||(c=r.STANDARD|r.DISTANCE_IN),this.a=o.a,this.f=o.f,this._b=o._b,this._c2=o._c2,this._f1=o._f1,this.caps=c|r.LATITUDE|r.AZIMUTH|r.LONG_UNROLL,this.lat1=s.LatFix(a),this.lon1=u,typeof h>"u"||typeof f>"u"?(this.azi1=s.AngNormalize(l),d=s.sincosd(s.AngRound(this.azi1)),this.salp1=d.s,this.calp1=d.c):(this.azi1=l,this.salp1=h,this.calp1=f),d=s.sincosd(s.AngRound(this.lat1)),_=this._f1*d.s,v=d.c,d=s.hypot(_,v),_/=d,v/=d,v=Math.max(r.tiny_,v),this._dn1=Math.sqrt(1+o._ep2*s.sq(_)),this._salp0=this.salp1*v,this._calp0=s.hypot(this.calp1,this.salp1*_),this._ssig1=_,this._somg1=this._salp0*_,this._csig1=this._comg1=_!==0||this.calp1!==0?v*this.calp1:1,d=s.hypot(this._ssig1,this._csig1),this._ssig1/=d,this._csig1/=d,this._k2=s.sq(this._calp0)*o._ep2,E=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&r.CAP_C1&&(this._A1m1=r.A1m1f(E),this._C1a=new Array(r.nC1_+1),r.C1f(E,this._C1a),this._B11=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),P=Math.sin(this._B11),y=Math.cos(this._B11),this._stau1=this._ssig1*y+this._csig1*P,this._ctau1=this._csig1*y-this._ssig1*P),this.caps&r.CAP_C1p&&(this._C1pa=new Array(r.nC1p_+1),r.C1pf(E,this._C1pa)),this.caps&r.CAP_C2&&(this._A2m1=r.A2m1f(E),this._C2a=new Array(r.nC2_+1),r.C2f(E,this._C2a),this._B21=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&r.CAP_C3&&(this._C3a=new Array(r.nC3_),o.C3f(E,this._C3a),this._A3c=-this.f*this._salp0*o.A3f(E),this._B31=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&r.CAP_C4&&(this._C4a=new Array(r.nC4_),o.C4f(E,this._C4a),this._A4=s.sq(this.a)*this._calp0*this._salp0*o._e2,this._B41=r.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},i.GeodesicLine.prototype.GenPosition=function(o,a,u){var l={},c,h,f,d,v,_,E,P,y,w,m,S,C,I,b,x,A,N,T,L,U,K,Y,Z,G,W,k,V,O;return u?u===r.LONG_UNROLL&&(u|=r.STANDARD):u=r.STANDARD,u&=this.caps&r.OUT_MASK,l.lat1=this.lat1,l.azi1=this.azi1,l.lon1=u&r.LONG_UNROLL?this.lon1:s.AngNormalize(this.lon1),o?l.a12=a:l.s12=a,o||this.caps&r.DISTANCE_IN&r.OUT_MASK?(d=0,v=0,o?(c=a*s.degree,W=s.sincosd(a),h=W.s,f=W.c):(P=a/(this._b*(1+this._A1m1)),y=Math.sin(P),w=Math.cos(P),d=-r.SinCosSeries(!0,this._stau1*w+this._ctau1*y,this._ctau1*w-this._stau1*y,this._C1pa),c=P-(d-this._B11),h=Math.sin(c),f=Math.cos(c),Math.abs(this.f)>.01&&(_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,d=r.SinCosSeries(!0,_,E,this._C1a),m=(1+this._A1m1)*(c+(d-this._B11))-a/this._b,c=c-m/Math.sqrt(1+this._k2*s.sq(_)),h=Math.sin(c),f=Math.cos(c))),_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,K=Math.sqrt(1+this._k2*s.sq(_)),u&(r.DISTANCE|r.REDUCEDLENGTH|r.GEODESICSCALE)&&((o||Math.abs(this.f)>.01)&&(d=r.SinCosSeries(!0,_,E,this._C1a)),v=(1+this._A1m1)*(d-this._B11)),x=this._calp0*_,A=s.hypot(this._salp0,this._calp0*E),A===0&&(A=E=r.tiny_),L=this._salp0,U=this._calp0*E,o&&u&r.DISTANCE&&(l.s12=this._b*((1+this._A1m1)*c+v)),u&r.LONGITUDE&&(N=this._salp0*_,T=E,b=s.copysign(1,this._salp0),S=u&r.LONG_UNROLL?b*(c-(Math.atan2(_,E)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(b*N,T)-Math.atan2(b*this._somg1,this._comg1))):Math.atan2(N*this._comg1-T*this._somg1,T*this._comg1+N*this._somg1),C=S+this._A3c*(c+(r.SinCosSeries(!0,_,E,this._C3a)-this._B31)),I=C/s.degree,l.lon2=u&r.LONG_UNROLL?this.lon1+I:s.AngNormalize(s.AngNormalize(this.lon1)+s.AngNormalize(I))),u&r.LATITUDE&&(l.lat2=s.atan2d(x,this._f1*A)),u&r.AZIMUTH&&(l.azi2=s.atan2d(L,U)),u&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(Y=r.SinCosSeries(!0,_,E,this._C2a),Z=(1+this._A2m1)*(Y-this._B21),G=(this._A1m1-this._A2m1)*c+(v-Z),u&r.REDUCEDLENGTH&&(l.m12=this._b*(K*(this._csig1*_)-this._dn1*(this._ssig1*E)-this._csig1*E*G)),u&r.GEODESICSCALE&&(W=this._k2*(_-this._ssig1)*(_+this._ssig1)/(this._dn1+K),l.M12=f+(W*_-E*G)*this._ssig1/this._dn1,l.M21=f-(W*this._ssig1-this._csig1*G)*_/K)),u&r.AREA&&(k=r.SinCosSeries(!1,_,E,this._C4a),this._calp0===0||this._salp0===0?(V=L*this.calp1-U*this.salp1,O=U*this.calp1+L*this.salp1):(V=this._calp0*this._salp0*(f<=0?this._csig1*(1-f)+h*this._ssig1:h*(this._csig1*h/(1+f)+this._ssig1)),O=s.sq(this._salp0)+s.sq(this._calp0)*this._csig1*E),l.S12=this._c2*Math.atan2(V,O)+this._A4*(k-this._B41)),o||(l.a12=c/s.degree),l):(l.a12=NaN,l)},i.GeodesicLine.prototype.Position=function(o,a){return this.GenPosition(!1,o,a)},i.GeodesicLine.prototype.ArcPosition=function(o,a){return this.GenPosition(!0,o,a)},i.GeodesicLine.prototype.GenSetDistance=function(o,a){o?this.SetArc(a):this.SetDistance(a)},i.GeodesicLine.prototype.SetDistance=function(o){var a;this.s13=o,a=this.GenPosition(!1,this.s13,r.ARC),this.a13=0+a.a12},i.GeodesicLine.prototype.SetArc=function(o){var a;this.a13=o,a=this.GenPosition(!0,this.a13,r.DISTANCE),this.s13=0+a.s12}}(e.Geodesic,e.GeodesicLine,e.Math),function(r,i,s,o){var a,u,l,c;a=function(h,f){var d=s.AngDiff(h,f).d;return h=s.AngNormalize(h),f=s.AngNormalize(f),d>0&&(h<0&&f>=0||h>0&&f===0)?1:d<0&&h>=0&&f<0?-1:0},u=function(h,f){return h=h%720,f=f%720,(0<=f&&f<360||f<-360?0:1)-(0<=h&&h<360||h<-360?0:1)},l=function(h,f,d,v,_){return h.Remainder(f),d&1&&h.Add((h.Sum()<0?1:-1)*f/2),v||h.Negate(),_?h.Sum()>f/2?h.Add(-f):h.Sum()<=-f/2&&h.Add(+f):h.Sum()>=f?h.Add(-f):h.Sum()<0&&h.Add(+f),0+h.Sum()},c=function(h,f,d,v,_){return h=s.remainder(h,f),d&1&&(h+=(h<0?1:-1)*f/2),v||(h*=-1),_?h>f/2?h-=f:h<=-f/2&&(h+=f):h>=f?h-=f:h<0&&(h+=f),0+h},r.PolygonArea=function(h,f){this._geod=h,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*h._c2,this.polyline=f||!1,this._mask=i.LATITUDE|i.LONGITUDE|i.DISTANCE|(this.polyline?i.NONE:i.AREA|i.LONG_UNROLL),this.polyline||(this._areasum=new o.Accumulator(0)),this._perimetersum=new o.Accumulator(0),this.Clear()},r.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},r.PolygonArea.prototype.AddPoint=function(h,f){var d;this.num===0?(this._lat0=this.lat=h,this._lon0=this.lon=f):(d=this._geod.Inverse(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(d.s12),this.polyline||(this._areasum.Add(d.S12),this._crossings+=a(this.lon,f)),this.lat=h,this.lon=f),++this.num},r.PolygonArea.prototype.AddEdge=function(h,f){var d;this.num&&(d=this._geod.Direct(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(f),this.polyline||(this._areasum.Add(d.S12),this._crossings+=u(this.lon,d.lon2)),this.lat=d.lat2,this.lon=d.lon2),++this.num},r.PolygonArea.prototype.Compute=function(h,f){var d={number:this.num},v,_;return this.num<2?(d.perimeter=0,this.polyline||(d.area=0),d):this.polyline?(d.perimeter=this._perimetersum.Sum(),d):(v=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),d.perimeter=this._perimetersum.Sum(v.s12),_=new o.Accumulator(this._areasum),_.Add(v.S12),d.area=l(_,this._area0,this._crossings+a(this.lon,this._lon0),h,f),d)},r.PolygonArea.prototype.TestPoint=function(h,f,d,v){var _={number:this.num+1},E,P,y,w;if(this.num===0)return _.perimeter=0,this.polyline||(_.area=0),_;for(_.perimeter=this._perimetersum.Sum(),P=this.polyline?0:this._areasum.Sum(),y=this._crossings,w=0;w<(this.polyline?1:2);++w)E=this._geod.Inverse(w===0?this.lat:h,w===0?this.lon:f,w!==0?this._lat0:h,w!==0?this._lon0:f,this._mask),_.perimeter+=E.s12,this.polyline||(P+=E.S12,y+=a(w===0?this.lon:f,w!==0?this._lon0:f));return this.polyline||(_.area=c(P,this._area0,y,d,v)),_},r.PolygonArea.prototype.TestEdge=function(h,f,d,v){var _={number:this.num?this.num+1:0},E,P,y;return this.num===0||(_.perimeter=this._perimetersum.Sum()+f,this.polyline)||(P=this._areasum.Sum(),y=this._crossings,E=this._geod.Direct(this.lat,this.lon,h,f,this._mask),P+=E.S12,y+=u(this.lon,E.lon2),y+=a(E.lon2,this._lon0),E=this._geod.Inverse(E.lat2,E.lon2,this._lat0,this._lon0,this._mask),_.perimeter+=E.s12,P+=E.S12,_.area=c(P,this._area0,y,d,v)),_}}(e.PolygonArea,e.Geodesic,e.Math,e.Accumulator),t(e)})(function(t){n.exports?n.exports=t:window.geodesic=t})}(ef)),ef.exports}var SS=ES();function CS(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new SS.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function PS(n){var t=n.x,e=n.y,r=Math.sin(n.y),i=Math.cos(n.y),s=ot(t-this.long0),o,a,u,l,c,h,f,d,v,_,E,P,y,w,m;return this.sphere?Math.abs(this.sin_p12-1)<=et?(n.x=this.x0+this.a*(J-e)*Math.sin(s),n.y=this.y0-this.a*(J-e)*Math.cos(s),n):Math.abs(this.sin_p12+1)<=et?(n.x=this.x0+this.a*(J+e)*Math.sin(s),n.y=this.y0+this.a*(J+e)*Math.cos(s),n):(v=this.sin_p12*r+this.cos_p12*i*Math.cos(s),f=Math.acos(v),d=f?f/Math.sin(f):1,n.x=this.x0+this.a*d*i*Math.sin(s),n.y=this.y0+this.a*d*(this.cos_p12*r-this.sin_p12*i*Math.cos(s)),n):(o=Uu(this.es),a=zu(this.es),u=qu(this.es),l=Wu(this.es),Math.abs(this.sin_p12-1)<=et?(c=this.a*Or(o,a,u,l,J),h=this.a*Or(o,a,u,l,e),n.x=this.x0+(c-h)*Math.sin(s),n.y=this.y0-(c-h)*Math.cos(s),n):Math.abs(this.sin_p12+1)<=et?(c=this.a*Or(o,a,u,l,J),h=this.a*Or(o,a,u,l,e),n.x=this.x0+(c+h)*Math.sin(s),n.y=this.y0+(c+h)*Math.cos(s),n):Math.abs(t)<et&&Math.abs(e-this.lat0)<et?(n.x=n.y=0,n):(_=this.lat0/ue,E=this.long0/ue,P=e/ue,y=t/ue,w=this.g.Inverse(_,E,P,y,this.g.AZIMUTH),m=w.azi1*ue,n.x=w.s12*Math.sin(m),n.y=w.s12*Math.cos(m),n))}function IS(n){n.x-=this.x0,n.y-=this.y0;var t,e,r,i,s,o,a,u,l,c,h,f,d,v,_,E,P,y;return this.sphere?(t=Math.sqrt(n.x*n.x+n.y*n.y),t>2*J*this.a?void 0:(e=t/this.a,r=Math.sin(e),i=Math.cos(e),s=this.long0,Math.abs(t)<=et?o=this.lat0:(o=Ns(i*this.sin_p12+n.y*r*this.cos_p12/t),a=Math.abs(this.lat0)-J,Math.abs(a)<=et?this.lat0>=0?s=ot(this.long0+Math.atan2(n.x,-n.y)):s=ot(this.long0-Math.atan2(-n.x,n.y)):s=ot(this.long0+Math.atan2(n.x*r,t*this.cos_p12*i-n.y*this.sin_p12*r))),n.x=s,n.y=o,n)):(u=Uu(this.es),l=zu(this.es),c=qu(this.es),h=Wu(this.es),Math.abs(this.sin_p12-1)<=et?(f=this.a*Or(u,l,c,h,J),t=Math.sqrt(n.x*n.x+n.y*n.y),d=f-t,o=ah(d/this.a,u,l,c,h),s=ot(this.long0+Math.atan2(n.x,-1*n.y)),n.x=s,n.y=o,n):Math.abs(this.sin_p12+1)<=et?(f=this.a*Or(u,l,c,h,J),t=Math.sqrt(n.x*n.x+n.y*n.y),d=t-f,o=ah(d/this.a,u,l,c,h),s=ot(this.long0+Math.atan2(n.x,n.y)),n.x=s,n.y=o,n):(v=this.lat0/ue,_=this.long0/ue,E=Math.atan2(n.x,n.y)/ue,P=Math.sqrt(n.x*n.x+n.y*n.y),y=this.g.Direct(v,_,E,P,this.g.STANDARD),n.x=y.lon2*ue,n.y=y.lat2*ue,n))}var MS=["Azimuthal_Equidistant","aeqd"];const bS={init:CS,forward:PS,inverse:IS,names:MS};function NS(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function xS(n){var t,e,r,i,s,o,a,u,l=n.x,c=n.y;return r=ot(l-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(r),o=this.sin_p14*t+this.cos_p14*e*i,s=1,(o>0||Math.abs(o)<=et)&&(a=this.a*s*e*Math.sin(r),u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)),n.x=a,n.y=u,n}function TS(n){var t,e,r,i,s,o,a;return n.x-=this.x0,n.y-=this.y0,t=Math.sqrt(n.x*n.x+n.y*n.y),e=Ns(t/this.a),r=Math.sin(e),i=Math.cos(e),o=this.long0,Math.abs(t)<=et?(a=this.lat0,n.x=o,n.y=a,n):(a=Ns(i*this.sin_p14+n.y*r*this.cos_p14/t),s=Math.abs(this.lat0)-J,Math.abs(s)<=et?(this.lat0>=0?o=ot(this.long0+Math.atan2(n.x,-n.y)):o=ot(this.long0-Math.atan2(-n.x,n.y)),n.x=o,n.y=a,n):(o=ot(this.long0+Math.atan2(n.x*r,t*this.cos_p14*i-n.y*this.sin_p14*r)),n.x=o,n.y=a,n))}var AS=["ortho"];const OS={init:NS,forward:xS,inverse:TS,names:AS};var Ce={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ne={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function DS(){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>=J-re/2?this.face=Ce.TOP:this.lat0<=-(J-re/2)?this.face=Ce.BOTTOM:Math.abs(this.long0)<=re?this.face=Ce.FRONT:Math.abs(this.long0)<=J+re?this.face=this.long0>0?Ce.RIGHT:Ce.LEFT:this.face=Ce.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function LS(n){var t={x:0,y:0},e,r,i,s,o,a,u={value:0};if(n.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(n.y)):e=n.y,r=n.x,this.face===Ce.TOP)s=J-e,r>=re&&r<=J+re?(u.value=ne.AREA_0,i=r-J):r>J+re||r<=-(J+re)?(u.value=ne.AREA_1,i=r>0?r-or:r+or):r>-(J+re)&&r<=-re?(u.value=ne.AREA_2,i=r+J):(u.value=ne.AREA_3,i=r);else if(this.face===Ce.BOTTOM)s=J+e,r>=re&&r<=J+re?(u.value=ne.AREA_0,i=-r+J):r<re&&r>=-re?(u.value=ne.AREA_1,i=-r):r<-re&&r>=-(J+re)?(u.value=ne.AREA_2,i=-r-J):(u.value=ne.AREA_3,i=r>0?-r+or:-r-or);else{var l,c,h,f,d,v,_;this.face===Ce.RIGHT?r=ca(r,+J):this.face===Ce.BACK?r=ca(r,3.14159265359):this.face===Ce.LEFT&&(r=ca(r,-J)),f=Math.sin(e),d=Math.cos(e),v=Math.sin(r),_=Math.cos(r),l=d*_,c=d*v,h=f,this.face===Ce.FRONT?(s=Math.acos(l),i=uh(s,h,c,u)):this.face===Ce.RIGHT?(s=Math.acos(c),i=uh(s,h,-l,u)):this.face===Ce.BACK?(s=Math.acos(-l),i=uh(s,h,-c,u)):this.face===Ce.LEFT?(s=Math.acos(-c),i=uh(s,h,l,u)):(s=i=0,u.value=ne.AREA_0)}return a=Math.atan(12/or*(i+Math.acos(Math.sin(i)*Math.cos(re))-J)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(i))))),u.value===ne.AREA_1?a+=J:u.value===ne.AREA_2?a+=or:u.value===ne.AREA_3&&(a+=1.5*or),t.x=o*Math.cos(a),t.y=o*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,n.x=t.x,n.y=t.y,n}function RS(n){var t={lam:0,phi:0},e,r,i,s,o,a,u,l,c,h={value:0};if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,r=Math.atan(Math.sqrt(n.x*n.x+n.y*n.y)),e=Math.atan2(n.y,n.x),n.x>=0&&n.x>=Math.abs(n.y)?h.value=ne.AREA_0:n.y>=0&&n.y>=Math.abs(n.x)?(h.value=ne.AREA_1,e-=J):n.x<0&&-n.x>=Math.abs(n.y)?(h.value=ne.AREA_2,e=e<0?e+or:e-or):(h.value=ne.AREA_3,e+=J),c=or/12*Math.tan(e),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),a=Math.atan(o),i=Math.cos(e),s=Math.tan(r),u=1-i*i*s*s*(1-Math.cos(Math.atan(1/Math.cos(a)))),u<-1?u=-1:u>1&&(u=1),this.face===Ce.TOP)l=Math.acos(u),t.phi=J-l,h.value===ne.AREA_0?t.lam=a+J:h.value===ne.AREA_1?t.lam=a<0?a+or:a-or:h.value===ne.AREA_2?t.lam=a-J:t.lam=a;else if(this.face===Ce.BOTTOM)l=Math.acos(u),t.phi=l-J,h.value===ne.AREA_0?t.lam=-a+J:h.value===ne.AREA_1?t.lam=-a:h.value===ne.AREA_2?t.lam=-a-J:t.lam=a<0?-a-or:-a+or;else{var f,d,v;f=u,c=f*f,c>=1?v=0:v=Math.sqrt(1-c)*Math.sin(a),c+=v*v,c>=1?d=0:d=Math.sqrt(1-c),h.value===ne.AREA_1?(c=d,d=-v,v=c):h.value===ne.AREA_2?(d=-d,v=-v):h.value===ne.AREA_3&&(c=d,d=v,v=-c),this.face===Ce.RIGHT?(c=f,f=-d,d=c):this.face===Ce.BACK?(f=-f,d=-d):this.face===Ce.LEFT&&(c=f,f=d,d=-c),t.phi=Math.acos(-v)-J,t.lam=Math.atan2(d,f),this.face===Ce.RIGHT?t.lam=ca(t.lam,-J):this.face===Ce.BACK?t.lam=ca(t.lam,-3.14159265359):this.face===Ce.LEFT&&(t.lam=ca(t.lam,+J))}if(this.es!==0){var _,E,P;_=t.phi<0?1:0,E=Math.tan(t.phi),P=this.b/Math.sqrt(E*E+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-P*P)/(this.one_minus_f*P)),_&&(t.phi=-t.phi)}return t.lam+=this.long0,n.x=t.lam,n.y=t.phi,n}function uh(n,t,e,r){var i;return n<et?(r.value=ne.AREA_0,i=0):(i=Math.atan2(t,e),Math.abs(i)<=re?r.value=ne.AREA_0:i>re&&i<=J+re?(r.value=ne.AREA_1,i-=J):i>J+re||i<=-(J+re)?(r.value=ne.AREA_2,i=i>=0?i-or:i+or):(r.value=ne.AREA_3,i+=J)),i}function ca(n,t){var e=n+t;return e<-3.14159265359?e+=Lu:e>3.14159265359&&(e-=Lu),e}var FS=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const GS={init:DS,forward:LS,inverse:RS,names:FS};var rf=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.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,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.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]],Hu=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Zp=.8487,t0=1.3523,e0=Pi/5,kS=1/e0,fa=18,lh=function(n,t){return n[0]+t*(n[1]+t*(n[2]+t*n[3]))},VS=function(n,t){return n[1]+t*(2*n[2]+t*3*n[3])};function US(n,t,e,r){for(var i=t;r;--r){var s=n(i);if(i-=s,Math.abs(s)<e)break}return i}function zS(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function qS(n){var t=ot(n.x-this.long0),e=Math.abs(n.y),r=Math.floor(e*e0);r<0?r=0:r>=fa&&(r=fa-1),e=Pi*(e-kS*r);var i={x:lh(rf[r],e)*t,y:lh(Hu[r],e)};return n.y<0&&(i.y=-i.y),i.x=i.x*this.a*Zp+this.x0,i.y=i.y*this.a*t0+this.y0,i}function WS(n){var t={x:(n.x-this.x0)/(this.a*Zp),y:Math.abs(n.y-this.y0)/(this.a*t0)};if(t.y>=1)t.x/=rf[fa][0],t.y=n.y<0?-J:J;else{var e=Math.floor(t.y*fa);for(e<0?e=0:e>=fa&&(e=fa-1);;)if(Hu[e][0]>t.y)--e;else if(Hu[e+1][0]<=t.y)++e;else break;var r=Hu[e],i=5*(t.y-r[0])/(Hu[e+1][0]-r[0]);i=US(function(s){return(lh(r,s)-t.y)/VS(r,s)},i,et,100),t.x/=lh(rf[e],i),t.y=(5*e+i)*ue,n.y<0&&(t.y=-t.y)}return t.x=ot(t.x+this.long0),t}var HS=["Robinson","robin"];const XS={init:zS,forward:qS,inverse:WS,names:HS};function BS(){this.name="geocent"}function YS(n){var t=Np(n,this.es,this.a);return t}function JS(n){var t=xp(n,this.es,this.a,this.b);return t}var jS=["Geocentric","geocentric","geocent","Geocent"];const QS={init:BS,forward:YS,inverse:JS,names:jS};var vr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Xu={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function KS(){if(Object.keys(Xu).forEach((function(e){if(typeof this[e]>"u")this[e]=Xu[e].def;else{if(Xu[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Xu[e].num&&(this[e]=parseFloat(this[e]))}Xu[e].degrees&&(this[e]=this[e]*ue)}).bind(this)),Math.abs(Math.abs(this.lat0)-J)<et?this.mode=this.lat0<0?vr.S_POLE:vr.N_POLE:Math.abs(this.lat0)<et?this.mode=vr.EQUIT:(this.mode=vr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var n=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(n),this.sw=Math.sin(n)}function $S(n){n.x-=this.long0;var t=Math.sin(n.y),e=Math.cos(n.y),r=Math.cos(n.x),i,s;switch(this.mode){case vr.OBLIQ:s=this.sinph0*t+this.cosph0*e*r;break;case vr.EQUIT:s=e*r;break;case vr.S_POLE:s=-t;break;case vr.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),i=s*e*Math.sin(n.x),this.mode){case vr.OBLIQ:s*=this.cosph0*t-this.sinph0*e*r;break;case vr.EQUIT:s*=t;break;case vr.N_POLE:s*=-(e*r);break;case vr.S_POLE:s*=e*r;break}var o,a;return o=s*this.cg+i*this.sg,a=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-s*this.sg)*this.cw*a,s=o*a,n.x=i*this.a,n.y=s*this.a,n}function ZS(n){n.x/=this.a,n.y/=this.a;var t={x:n.x,y:n.y},e,r,i;i=1/(this.pn1-n.y*this.sw),e=this.pn1*n.x*i,r=this.pn1*n.y*this.cw*i,n.x=e*this.cg+r*this.sg,n.y=r*this.cg-e*this.sg;var s=Br(n.x,n.y);if(Math.abs(s)<et)t.x=0,t.y=n.y;else{var o,a;switch(a=1-s*s*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/s+s/this.pn1),o=Math.sqrt(1-a*a),this.mode){case vr.OBLIQ:t.y=Math.asin(o*this.sinph0+n.y*a*this.cosph0/s),n.y=(o-this.sinph0*Math.sin(t.y))*s,n.x*=a*this.cosph0;break;case vr.EQUIT:t.y=Math.asin(n.y*a/s),n.y=o*s,n.x*=a;break;case vr.N_POLE:t.y=Math.asin(o),n.y=-n.y;break;case vr.S_POLE:t.y=-Math.asin(o);break}t.x=Math.atan2(n.x,n.y)}return n.x=t.x+this.long0,n.y=t.y,n}var tC=["Tilted_Perspective","tpers"];const eC={init:KS,forward:$S,inverse:ZS,names:tC};function rC(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var n=1-this.es,t=1/n;this.radius_p=Math.sqrt(n),this.radius_p2=n,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function nC(n){var t=n.x,e=n.y,r,i,s,o;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/Br(this.radius_p*Math.cos(e),Math.sin(e));if(i=a*Math.cos(t)*Math.cos(e),s=a*Math.sin(t)*Math.cos(e),o=a*Math.sin(e),(this.radius_g-i)*i-s*s-o*o*this.radius_p_inv2<0)return n.x=Number.NaN,n.y=Number.NaN,n;r=this.radius_g-i,this.flip_axis?(n.x=this.radius_g_1*Math.atan(s/Br(o,r)),n.y=this.radius_g_1*Math.atan(o/r)):(n.x=this.radius_g_1*Math.atan(s/r),n.y=this.radius_g_1*Math.atan(o/Br(s,r)))}else this.shape==="sphere"&&(r=Math.cos(e),i=Math.cos(t)*r,s=Math.sin(t)*r,o=Math.sin(e),r=this.radius_g-i,this.flip_axis?(n.x=this.radius_g_1*Math.atan(s/Br(o,r)),n.y=this.radius_g_1*Math.atan(o/r)):(n.x=this.radius_g_1*Math.atan(s/r),n.y=this.radius_g_1*Math.atan(o/Br(s,r))));return n.x=n.x*this.a,n.y=n.y*this.a,n}function iC(n){var t=-1,e=0,r=0,i,s,o,a;if(n.x=n.x/this.a,n.y=n.y/this.a,this.shape==="ellipse"){this.flip_axis?(r=Math.tan(n.y/this.radius_g_1),e=Math.tan(n.x/this.radius_g_1)*Br(1,r)):(e=Math.tan(n.x/this.radius_g_1),r=Math.tan(n.y/this.radius_g_1)*Br(1,e));var u=r/this.radius_p;if(i=e*e+u*u+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,r*=a,n.x=Math.atan2(e,t),n.y=Math.atan(r*Math.cos(n.x)/t),n.y=Math.atan(this.radius_p_inv2*Math.tan(n.y))}else if(this.shape==="sphere"){if(this.flip_axis?(r=Math.tan(n.y/this.radius_g_1),e=Math.tan(n.x/this.radius_g_1)*Math.sqrt(1+r*r)):(e=Math.tan(n.x/this.radius_g_1),r=Math.tan(n.y/this.radius_g_1)*Math.sqrt(1+e*e)),i=e*e+r*r+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,r*=a,n.x=Math.atan2(e,t),n.y=Math.atan(r*Math.cos(n.x)/t)}return n.x=n.x+this.long0,n}var sC=["Geostationary Satellite View","Geostationary_Satellite","geos"];const oC={init:rC,forward:nC,inverse:iC,names:sC};var Bu=1.340264,Yu=-.081106,Ju=893e-6,ju=.003796,hh=Math.sqrt(3)/2;function aC(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function uC(n){var t=ot(n.x-this.long0),e=n.y,r=Math.asin(hh*Math.sin(e)),i=r*r,s=i*i*i;return n.x=t*Math.cos(r)/(hh*(Bu+3*Yu*i+s*(7*Ju+9*ju*i))),n.y=r*(Bu+Yu*i+s*(Ju+ju*i)),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function lC(n){n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a;var t=1e-9,e=12,r=n.y,i,s,o,a,u,l;for(l=0;l<e&&(i=r*r,s=i*i*i,o=r*(Bu+Yu*i+s*(Ju+ju*i))-n.y,a=Bu+3*Yu*i+s*(7*Ju+9*ju*i),r-=u=o/a,!(Math.abs(u)<t));++l);return i=r*r,s=i*i*i,n.x=hh*n.x*(Bu+3*Yu*i+s*(7*Ju+9*ju*i))/Math.cos(r),n.y=Math.asin(Math.sin(r)/hh),n.x=ot(n.x+this.long0),n}var hC=["eqearth","Equal Earth","Equal_Earth"];const cC={init:aC,forward:uC,inverse:lC,names:hC};var Qu=1e-10;function fC(){var n;if(this.phi1=this.lat1,Math.abs(this.phi1)<Qu)throw new Error;this.es?(this.en=jc(this.es),this.m1=la(this.phi1,this.am1=Math.sin(this.phi1),n=Math.cos(this.phi1),this.en),this.am1=n/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=gC,this.forward=dC):(Math.abs(this.phi1)+Qu>=J?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=vC,this.forward=pC)}function dC(n){var t=ot(n.x-(this.long0||0)),e=n.y,r,i,s;return r=this.am1+this.m1-la(e,i=Math.sin(e),s=Math.cos(e),this.en),i=s*t/(r*Math.sqrt(1-this.es*i*i)),n.x=r*Math.sin(i),n.y=this.am1-r*Math.cos(i),n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function gC(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var t,e,r,i;if(e=Br(n.x,n.y=this.am1-n.y),i=Qc(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(i))<J)t=Math.sin(i),r=e*Math.atan2(n.x,n.y)*Math.sqrt(1-this.es*t*t)/Math.cos(i);else if(Math.abs(t-J)<=Qu)r=0;else throw new Error;return n.x=ot(r+(this.long0||0)),n.y=Ms(i),n}function pC(n){var t=ot(n.x-(this.long0||0)),e=n.y,r,i;return i=this.cphi1+this.phi1-e,Math.abs(i)>Qu?(n.x=i*Math.sin(r=t*Math.cos(e)/i),n.y=this.cphi1-i*Math.cos(r)):n.x=n.y=0,n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function vC(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var t,e,r=Br(n.x,n.y=this.cphi1-n.y);if(e=this.cphi1+this.phi1-r,Math.abs(e)>J)throw new Error;return Math.abs(Math.abs(e)-J)<=Qu?t=0:t=r*Math.atan2(n.x,n.y)/Math.cos(e),n.x=ot(t+(this.long0||0)),n.y=Ms(e),n}var mC=["bonne","Bonne (Werner lat_1=90)"];const yC={init:fC,names:mC};function _C(n){n.Proj.projections.add(sh),n.Proj.projections.add(oh),n.Proj.projections.add(cw),n.Proj.projections.add(ww),n.Proj.projections.add(Mw),n.Proj.projections.add(Aw),n.Proj.projections.add(Gw),n.Proj.projections.add(qw),n.Proj.projections.add(Yw),n.Proj.projections.add($w),n.Proj.projections.add(pE),n.Proj.projections.add(EE),n.Proj.projections.add(ME),n.Proj.projections.add(OE),n.Proj.projections.add(GE),n.Proj.projections.add(qE),n.Proj.projections.add(YE),n.Proj.projections.add($E),n.Proj.projections.add(iS),n.Proj.projections.add(lS),n.Proj.projections.add(gS),n.Proj.projections.add(_S),n.Proj.projections.add(bS),n.Proj.projections.add(OS),n.Proj.projections.add(GS),n.Proj.projections.add(XS),n.Proj.projections.add(QS),n.Proj.projections.add(eC),n.Proj.projections.add(oC),n.Proj.projections.add(cC),n.Proj.projections.add(yC)}Hr.defaultDatum="WGS84",Hr.Proj=Mi,Hr.WGS84=new Hr.Proj("WGS84"),Hr.Point=ua,Hr.toPoint=Dp,Hr.defs=Ar,Hr.nadgrid=c1,Hr.transform=ih,Hr.mgrs=x1,Hr.version="__VERSION__",_C(Hr);const r0=Hr("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function bi(n){return r0.forward(n)}function n0(n){return r0.inverse(n)}const i0=Hr("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function wC(n){const t=i0.forward([n[0],n[1]]);return[t[0],t[1],n[2]]}function EC(n){const t=i0.inverse([n[0],n[1]]);return[t[0],t[1],n[2]]}var ar=63710088e-1,s0={centimeters:ar*100,centimetres:ar*100,degrees:ar/111325,feet:ar*3.28084,inches:ar*39.37,kilometers:ar/1e3,kilometres:ar/1e3,meters:ar,metres:ar,miles:ar/1609.344,millimeters:ar*1e3,millimetres:ar*1e3,nauticalmiles:ar/1852,radians:1,yards:ar*1.0936};function Sn(n,t,e){e===void 0&&(e={});var r={type:"Feature"};return(e.id===0||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=t||{},r.geometry=n,r}function $t(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!o0(n[0])||!o0(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return Sn(r,t,e)}function ie(n,t,e){e===void 0&&(e={});for(var r=0,i=n;r<i.length;r++){var s=i[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:n};return Sn(a,t,e)}function Yr(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return Sn(r,t,e)}function on(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}function SC(n,t,e){e===void 0&&(e={});var r={type:"MultiLineString",coordinates:n};return Sn(r,t,e)}function nf(n,t,e){e===void 0&&(e={});var r={type:"MultiPolygon",coordinates:n};return Sn(r,t,e)}function sf(n,t){t===void 0&&(t="kilometers");var e=s0[t];if(!e)throw new Error(t+" units is invalid");return n*e}function of(n,t){t===void 0&&(t="kilometers");var e=s0[t];if(!e)throw new Error(t+" units is invalid");return n/e}function ch(n){var t=n%(2*Math.PI);return t*180/Math.PI}function mr(n){var t=n%360;return t*Math.PI/180}function af(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return sf(of(n,t),e)}function o0(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function da(n,t,e){if(n!==null)for(var r,i,s,o,a,u,l,c=0,h=0,f,d=n.type,v=d==="FeatureCollection",_=d==="Feature",E=v?n.features.length:1,P=0;P<E;P++){l=v?n.features[P].geometry:_?n.geometry:n,f=l?l.type==="GeometryCollection":!1,a=f?l.geometries.length:1;for(var y=0;y<a;y++){var w=0,m=0;if(o=f?l.geometries[y]:l,o!==null){u=o.coordinates;var S=o.type;switch(c=e&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(t(u,h,P,w,m)===!1)return!1;h++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],h,P,w,m)===!1)return!1;h++,S==="MultiPoint"&&w++}S==="LineString"&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-c;i++){if(t(u[r][i],h,P,w,m)===!1)return!1;h++}S==="MultiLineString"&&w++,S==="Polygon"&&m++}S==="Polygon"&&w++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(m=0,i=0;i<u[r].length;i++){for(s=0;s<u[r][i].length-c;s++){if(t(u[r][i][s],h,P,w,m)===!1)return!1;h++}m++}w++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(da(o.geometries[r],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ga(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function fh(n,t){var e,r,i,s,o,a,u,l,c,h,f=0,d=n.type==="FeatureCollection",v=n.type==="Feature",_=d?n.features.length:1;for(e=0;e<_;e++){for(a=d?n.features[e].geometry:v?n.geometry:n,l=d?n.features[e].properties:v?n.properties:{},c=d?n.features[e].bbox:v?n.bbox:void 0,h=d?n.features[e].id:v?n.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,f,l,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,f,l,c,h)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<s.geometries.length;r++)if(t(s.geometries[r],f,l,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function CC(n,t,e){var r=e;return fh(n,function(i,s,o,a,u){r=t(r,i,s,o,a,u)}),r}function co(n,t){fh(n,function(e,r,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(Sn(e,i,{bbox:s,id:o}),r,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l],h={type:u,coordinates:c};if(t(Sn(h,i),r,l)===!1)return!1}})}function a0(n,t){co(n,function(e,r,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,l=0,c=0;if(da(e,function(h,f,d,v,_){if(a===void 0||r>u||v>l||_>c){a=h,u=r,l=v,c=_,s=0;return}var E=Yr([a,h],e.properties);if(t(E,r,i,_,s)===!1)return!1;s++,a=h})===!1)return!1}}})}function PC(n,t,e){var r=e,i=!1;return a0(n,function(s,o,a,u,l){i===!1&&e===void 0?r=s:r=t(r,s,o,a,u,l),i=!0}),r}function Cn(n){var t=[1/0,1/0,-1/0,-1/0];return da(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}Cn.default=Cn;function Dr(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function fo(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function u0(n,t,e){if(!n)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!n.geometry||n.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+n.geometry.type)}function IC(n,t,e){if(!n)throw new Error("No featureCollection passed");if(!n||n.type!=="FeatureCollection")throw new Error("Invalid input to "+e+", FeatureCollection required");for(var r=0,i=n.features;r<i.length;r++){var s=i[r];if(!s||s.type!=="Feature"||!s.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!s.geometry||s.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+s.geometry.type)}}function yr(n){return n.type==="Feature"?n.geometry:n}function MC(n,t){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}var dh={exports:{}},gh={exports:{}},bC=gh.exports,l0;function h0(){return l0||(l0=1,function(n,t){(function(e,r){n.exports=r()})(bC,function(){function e(y,w,m,S,C){(function I(b,x,A,N,T){for(;N>A;){if(N-A>600){var L=N-A+1,U=x-A+1,K=Math.log(L),Y=.5*Math.exp(2*K/3),Z=.5*Math.sqrt(K*Y*(L-Y)/L)*(U-L/2<0?-1:1),G=Math.max(A,Math.floor(x-U*Y/L+Z)),W=Math.min(N,Math.floor(x+(L-U)*Y/L+Z));I(b,x,G,W,T)}var k=b[x],V=A,O=N;for(r(b,A,x),T(b[N],k)>0&&r(b,A,N);V<O;){for(r(b,V,O),V++,O--;T(b[V],k)<0;)V++;for(;T(b[O],k)>0;)O--}T(b[A],k)===0?r(b,A,O):r(b,++O,N),O<=x&&(A=O+1),x<=O&&(N=O-1)}})(y,w,m||0,S||y.length-1,C||i)}function r(y,w,m){var S=y[w];y[w]=y[m],y[m]=S}function i(y,w){return y<w?-1:y>w?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(y,w,m){if(!m)return w.indexOf(y);for(var S=0;S<w.length;S++)if(m(y,w[S]))return S;return-1}function a(y,w){u(y,0,y.children.length,w,y)}function u(y,w,m,S,C){C||(C=E(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var I=w;I<m;I++){var b=y.children[I];l(C,y.leaf?S(b):b)}return C}function l(y,w){return y.minX=Math.min(y.minX,w.minX),y.minY=Math.min(y.minY,w.minY),y.maxX=Math.max(y.maxX,w.maxX),y.maxY=Math.max(y.maxY,w.maxY),y}function c(y,w){return y.minX-w.minX}function h(y,w){return y.minY-w.minY}function f(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function d(y){return y.maxX-y.minX+(y.maxY-y.minY)}function v(y,w){return y.minX<=w.minX&&y.minY<=w.minY&&w.maxX<=y.maxX&&w.maxY<=y.maxY}function _(y,w){return w.minX<=y.maxX&&w.minY<=y.maxY&&w.maxX>=y.minX&&w.maxY>=y.minY}function E(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function P(y,w,m,S,C){for(var I=[w,m];I.length;)if(!((m=I.pop())-(w=I.pop())<=S)){var b=w+Math.ceil((m-w)/S/2)*S;e(y,b,w,m,C),I.push(w,b,b,m)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var w=this.data,m=[];if(!_(y,w))return m;for(var S=this.toBBox,C=[];w;){for(var I=0;I<w.children.length;I++){var b=w.children[I],x=w.leaf?S(b):b;_(y,x)&&(w.leaf?m.push(b):v(y,x)?this._all(b,m):C.push(b))}w=C.pop()}return m},s.prototype.collides=function(y){var w=this.data;if(!_(y,w))return!1;for(var m=[];w;){for(var S=0;S<w.children.length;S++){var C=w.children[S],I=w.leaf?this.toBBox(C):C;if(_(y,I)){if(w.leaf||v(y,I))return!0;m.push(C)}}w=m.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var w=0;w<y.length;w++)this.insert(y[w]);return this}var m=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===m.height)this._splitRoot(this.data,m);else{if(this.data.height<m.height){var S=this.data;this.data=m,m=S}this._insert(m,this.data.height-m.height-1,!0)}else this.data=m;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=E([]),this},s.prototype.remove=function(y,w){if(!y)return this;for(var m,S,C,I=this.data,b=this.toBBox(y),x=[],A=[];I||x.length;){if(I||(I=x.pop(),S=x[x.length-1],m=A.pop(),C=!0),I.leaf){var N=o(y,I.children,w);if(N!==-1)return I.children.splice(N,1),x.push(I),this._condense(x),this}C||I.leaf||!v(I,b)?S?(m++,I=S.children[m],C=!1):I=null:(x.push(I),A.push(m),m=0,S=I,I=I.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,w){return y.minX-w.minX},s.prototype.compareMinY=function(y,w){return y.minY-w.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,w){for(var m=[];y;)y.leaf?w.push.apply(w,y.children):m.push.apply(m,y.children),y=m.pop();return w},s.prototype._build=function(y,w,m,S){var C,I=m-w+1,b=this._maxEntries;if(I<=b)return a(C=E(y.slice(w,m+1)),this.toBBox),C;S||(S=Math.ceil(Math.log(I)/Math.log(b)),b=Math.ceil(I/Math.pow(b,S-1))),(C=E([])).leaf=!1,C.height=S;var x=Math.ceil(I/b),A=x*Math.ceil(Math.sqrt(b));P(y,w,m,A,this.compareMinX);for(var N=w;N<=m;N+=A){var T=Math.min(N+A-1,m);P(y,N,T,x,this.compareMinY);for(var L=N;L<=T;L+=x){var U=Math.min(L+x-1,T);C.children.push(this._build(y,L,U,S-1))}}return a(C,this.toBBox),C},s.prototype._chooseSubtree=function(y,w,m,S){for(;S.push(w),!w.leaf&&S.length-1!==m;){for(var C=1/0,I=1/0,b=void 0,x=0;x<w.children.length;x++){var A=w.children[x],N=f(A),T=(L=y,U=A,(Math.max(U.maxX,L.maxX)-Math.min(U.minX,L.minX))*(Math.max(U.maxY,L.maxY)-Math.min(U.minY,L.minY))-N);T<I?(I=T,C=N<C?N:C,b=A):T===I&&N<C&&(C=N,b=A)}w=b||w.children[0]}var L,U;return w},s.prototype._insert=function(y,w,m){var S=m?y:this.toBBox(y),C=[],I=this._chooseSubtree(S,this.data,w,C);for(I.children.push(y),l(I,S);w>=0&&C[w].children.length>this._maxEntries;)this._split(C,w),w--;this._adjustParentBBoxes(S,C,w)},s.prototype._split=function(y,w){var m=y[w],S=m.children.length,C=this._minEntries;this._chooseSplitAxis(m,C,S);var I=this._chooseSplitIndex(m,C,S),b=E(m.children.splice(I,m.children.length-I));b.height=m.height,b.leaf=m.leaf,a(m,this.toBBox),a(b,this.toBBox),w?y[w-1].children.push(b):this._splitRoot(m,b)},s.prototype._splitRoot=function(y,w){this.data=E([y,w]),this.data.height=y.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,w,m){for(var S,C,I,b,x,A,N,T=1/0,L=1/0,U=w;U<=m-w;U++){var K=u(y,0,U,this.toBBox),Y=u(y,U,m,this.toBBox),Z=(C=K,I=Y,b=void 0,x=void 0,A=void 0,N=void 0,b=Math.max(C.minX,I.minX),x=Math.max(C.minY,I.minY),A=Math.min(C.maxX,I.maxX),N=Math.min(C.maxY,I.maxY),Math.max(0,A-b)*Math.max(0,N-x)),G=f(K)+f(Y);Z<T?(T=Z,S=U,L=G<L?G:L):Z===T&&G<L&&(L=G,S=U)}return S||m-w},s.prototype._chooseSplitAxis=function(y,w,m){var S=y.leaf?this.compareMinX:c,C=y.leaf?this.compareMinY:h;this._allDistMargin(y,w,m,S)<this._allDistMargin(y,w,m,C)&&y.children.sort(S)},s.prototype._allDistMargin=function(y,w,m,S){y.children.sort(S);for(var C=this.toBBox,I=u(y,0,w,C),b=u(y,m-w,m,C),x=d(I)+d(b),A=w;A<m-w;A++){var N=y.children[A];l(I,y.leaf?C(N):N),x+=d(I)}for(var T=m-w-1;T>=w;T--){var L=y.children[T];l(b,y.leaf?C(L):L),x+=d(b)}return x},s.prototype._adjustParentBBoxes=function(y,w,m){for(var S=m;S>=0;S--)l(w[S],y)},s.prototype._condense=function(y){for(var w=y.length-1,m=void 0;w>=0;w--)y[w].children.length===0?w>0?(m=y[w-1].children).splice(m.indexOf(y[w]),1):this.clear():a(y[w],this.toBBox)},s})}(gh)),gh.exports}class NC{constructor(t=[],e=xC){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(r(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:r}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1,a=e[o];const u=o+1;if(u<this.length&&r(e[u],a)<0&&(o=u,a=e[u]),r(a,s)>=0)break;e[t]=a,t=o}e[t]=s}}function xC(n,t){return n<t?-1:n>t?1:0}const TC=wS(Object.freeze(Object.defineProperty({__proto__:null,default:NC},Symbol.toStringTag,{value:"Module"})));var Ku={exports:{}},uf,c0;function AC(){return c0||(c0=1,uf=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=(i-r)/2,l=0,c=u-1;l<u;c=l++){var h=e[r+l*2+0],f=e[r+l*2+1],d=e[r+c*2+0],v=e[r+c*2+1],_=f>o!=v>o&&s<(d-h)*(o-f)/(v-f)+h;_&&(a=!a)}return a}),uf}var lf,f0;function OC(){return f0||(f0=1,lf=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=i-r,l=0,c=u-1;l<u;c=l++){var h=e[l+r][0],f=e[l+r][1],d=e[c+r][0],v=e[c+r][1],_=f>o!=v>o&&s<(d-h)*(o-f)/(v-f)+h;_&&(a=!a)}return a}),lf}var d0;function DC(){if(d0)return Ku.exports;d0=1;var n=AC(),t=OC();return Ku.exports=function(r,i,s,o){return i.length>0&&Array.isArray(i[0])?t(r,i,s,o):n(r,i,s,o)},Ku.exports.nested=t,Ku.exports.flat=n,Ku.exports}var $u={exports:{}},LC=$u.exports,g0;function RC(){return g0||(g0=1,function(n,t){(function(e,r){r(t)})(LC,function(e){const i=33306690738754706e-32;function s(_,E,P,y,w){let m,S,C,I,b=E[0],x=y[0],A=0,N=0;x>b==x>-b?(m=b,b=E[++A]):(m=x,x=y[++N]);let T=0;if(A<_&&N<P)for(x>b==x>-b?(C=m-((S=b+m)-b),b=E[++A]):(C=m-((S=x+m)-x),x=y[++N]),m=S,C!==0&&(w[T++]=C);A<_&&N<P;)x>b==x>-b?(C=m-((S=m+b)-(I=S-m))+(b-I),b=E[++A]):(C=m-((S=m+x)-(I=S-m))+(x-I),x=y[++N]),m=S,C!==0&&(w[T++]=C);for(;A<_;)C=m-((S=m+b)-(I=S-m))+(b-I),b=E[++A],m=S,C!==0&&(w[T++]=C);for(;N<P;)C=m-((S=m+x)-(I=S-m))+(x-I),x=y[++N],m=S,C!==0&&(w[T++]=C);return m===0&&T!==0||(w[T++]=m),T}function o(_){return new Float64Array(_)}const a=33306690738754716e-32,u=22204460492503146e-32,l=11093356479670487e-47,c=o(4),h=o(8),f=o(12),d=o(16),v=o(4);e.orient2d=function(_,E,P,y,w,m){const S=(E-m)*(P-w),C=(_-w)*(y-m),I=S-C;if(S===0||C===0||S>0!=C>0)return I;const b=Math.abs(S+C);return Math.abs(I)>=a*b?I:-function(x,A,N,T,L,U,K){let Y,Z,G,W,k,V,O,q,X,rt,lt,nt,_t,it,Ct,Mt,Q,wt;const bt=x-L,Lt=N-L,Ht=A-U,Xt=T-U;k=(Ct=(q=bt-(O=(V=134217729*bt)-(V-bt)))*(rt=Xt-(X=(V=134217729*Xt)-(V-Xt)))-((it=bt*Xt)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Ht-(O=(V=134217729*Ht)-(V-Ht)))*(rt=Lt-(X=(V=134217729*Lt)-(V-Lt)))-((Mt=Ht*Lt)-O*X-q*X-O*rt))),c[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-Mt),c[1]=_t-(lt+k)+(k-Mt),k=(wt=nt+lt)-nt,c[2]=nt-(wt-k)+(lt-k),c[3]=wt;let Qt=function(Vt,ye){let De=ye[0];for(let Kn=1;Kn<Vt;Kn++)De+=ye[Kn];return De}(4,c),de=u*K;if(Qt>=de||-Qt>=de||(Y=x-(bt+(k=x-bt))+(k-L),G=N-(Lt+(k=N-Lt))+(k-L),Z=A-(Ht+(k=A-Ht))+(k-U),W=T-(Xt+(k=T-Xt))+(k-U),Y===0&&Z===0&&G===0&&W===0)||(de=l*K+i*Math.abs(Qt),(Qt+=bt*W+Xt*Y-(Ht*G+Lt*Z))>=de||-Qt>=de))return Qt;k=(Ct=(q=Y-(O=(V=134217729*Y)-(V-Y)))*(rt=Xt-(X=(V=134217729*Xt)-(V-Xt)))-((it=Y*Xt)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Z-(O=(V=134217729*Z)-(V-Z)))*(rt=Lt-(X=(V=134217729*Lt)-(V-Lt)))-((Mt=Z*Lt)-O*X-q*X-O*rt))),v[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-Mt),v[1]=_t-(lt+k)+(k-Mt),k=(wt=nt+lt)-nt,v[2]=nt-(wt-k)+(lt-k),v[3]=wt;const qe=s(4,c,4,v,h);k=(Ct=(q=bt-(O=(V=134217729*bt)-(V-bt)))*(rt=W-(X=(V=134217729*W)-(V-W)))-((it=bt*W)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Ht-(O=(V=134217729*Ht)-(V-Ht)))*(rt=G-(X=(V=134217729*G)-(V-G)))-((Mt=Ht*G)-O*X-q*X-O*rt))),v[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-Mt),v[1]=_t-(lt+k)+(k-Mt),k=(wt=nt+lt)-nt,v[2]=nt-(wt-k)+(lt-k),v[3]=wt;const Bt=s(qe,h,4,v,f);k=(Ct=(q=Y-(O=(V=134217729*Y)-(V-Y)))*(rt=W-(X=(V=134217729*W)-(V-W)))-((it=Y*W)-O*X-q*X-O*rt))-(lt=Ct-(Q=(q=Z-(O=(V=134217729*Z)-(V-Z)))*(rt=G-(X=(V=134217729*G)-(V-G)))-((Mt=Z*G)-O*X-q*X-O*rt))),v[0]=Ct-(lt+k)+(k-Q),k=(_t=it-((nt=it+lt)-(k=nt-it))+(lt-k))-(lt=_t-Mt),v[1]=_t-(lt+k)+(k-Mt),k=(wt=nt+lt)-nt,v[2]=nt-(wt-k)+(lt-k),v[3]=wt;const Ft=s(Bt,f,4,v,d);return d[Ft-1]}(_,E,P,y,w,m,b)},e.orient2dfast=function(_,E,P,y,w,m){return(E-m)*(P-w)-(_-w)*(y-m)},Object.defineProperty(e,"__esModule",{value:!0})})}($u,$u.exports)),$u.exports}var p0;function FC(){if(p0)return dh.exports;p0=1;var n=h0(),t=TC,e=DC(),r=RC().orient2d;t.default&&(t=t.default),dh.exports=i,dh.exports.default=i;function i(m,S,C){S=Math.max(0,S===void 0?2:S),C=C||0;var I=d(m),b=new n(16);b.toBBox=function(O){return{minX:O[0],minY:O[1],maxX:O[0],maxY:O[1]}},b.compareMinX=function(O,q){return O[0]-q[0]},b.compareMinY=function(O,q){return O[1]-q[1]},b.load(m);for(var x=[],A=0,N;A<I.length;A++){var T=I[A];b.remove(T),N=v(T,N),x.push(N)}var L=new n(16);for(A=0;A<x.length;A++)L.insert(f(x[A]));for(var U=S*S,K=C*C;x.length;){var Y=x.shift(),Z=Y.p,G=Y.next.p,W=_(Z,G);if(!(W<K)){var k=W/U;T=s(b,Y.prev.p,Z,G,Y.next.next.p,k,L),T&&Math.min(_(T,Z),_(T,G))<=k&&(x.push(Y),x.push(v(T,Y)),b.remove(T),L.remove(Y),L.insert(f(Y)),L.insert(f(Y.next)))}}Y=N;var V=[];do V.push(Y.p),Y=Y.next;while(Y!==N);return V.push(Y.p),V}function s(m,S,C,I,b,x,A){for(var N=new t([],o),T=m.data;T;){for(var L=0;L<T.children.length;L++){var U=T.children[L],K=T.leaf?E(U,C,I):a(C,I,U);K>x||N.push({node:U,dist:K})}for(;N.length&&!N.peek().node.children;){var Y=N.pop(),Z=Y.node,G=E(Z,S,C),W=E(Z,I,b);if(Y.dist<G&&Y.dist<W&&l(C,Z,A)&&l(I,Z,A))return Z}T=N.pop(),T&&(T=T.node)}return null}function o(m,S){return m.dist-S.dist}function a(m,S,C){if(u(m,C)||u(S,C))return 0;var I=P(m[0],m[1],S[0],S[1],C.minX,C.minY,C.maxX,C.minY);if(I===0)return 0;var b=P(m[0],m[1],S[0],S[1],C.minX,C.minY,C.minX,C.maxY);if(b===0)return 0;var x=P(m[0],m[1],S[0],S[1],C.maxX,C.minY,C.maxX,C.maxY);if(x===0)return 0;var A=P(m[0],m[1],S[0],S[1],C.minX,C.maxY,C.maxX,C.maxY);return A===0?0:Math.min(I,b,x,A)}function u(m,S){return m[0]>=S.minX&&m[0]<=S.maxX&&m[1]>=S.minY&&m[1]<=S.maxY}function l(m,S,C){for(var I=Math.min(m[0],S[0]),b=Math.min(m[1],S[1]),x=Math.max(m[0],S[0]),A=Math.max(m[1],S[1]),N=C.search({minX:I,minY:b,maxX:x,maxY:A}),T=0;T<N.length;T++)if(h(N[T].p,N[T].next.p,m,S))return!1;return!0}function c(m,S,C){return r(m[0],m[1],S[0],S[1],C[0],C[1])}function h(m,S,C,I){return m!==I&&S!==C&&c(m,S,C)>0!=c(m,S,I)>0&&c(C,I,m)>0!=c(C,I,S)>0}function f(m){var S=m.p,C=m.next.p;return m.minX=Math.min(S[0],C[0]),m.minY=Math.min(S[1],C[1]),m.maxX=Math.max(S[0],C[0]),m.maxY=Math.max(S[1],C[1]),m}function d(m){for(var S=m[0],C=m[0],I=m[0],b=m[0],x=0;x<m.length;x++){var A=m[x];A[0]<S[0]&&(S=A),A[0]>I[0]&&(I=A),A[1]<C[1]&&(C=A),A[1]>b[1]&&(b=A)}var N=[S,C,I,b],T=N.slice();for(x=0;x<m.length;x++)e(m[x],N)||T.push(m[x]);return w(T)}function v(m,S){var C={p:m,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return S?(C.next=S.next,C.prev=S,S.next.prev=C,S.next=C):(C.prev=C,C.next=C),C}function _(m,S){var C=m[0]-S[0],I=m[1]-S[1];return C*C+I*I}function E(m,S,C){var I=S[0],b=S[1],x=C[0]-I,A=C[1]-b;if(x!==0||A!==0){var N=((m[0]-I)*x+(m[1]-b)*A)/(x*x+A*A);N>1?(I=C[0],b=C[1]):N>0&&(I+=x*N,b+=A*N)}return x=m[0]-I,A=m[1]-b,x*x+A*A}function P(m,S,C,I,b,x,A,N){var T=C-m,L=I-S,U=A-b,K=N-x,Y=m-b,Z=S-x,G=T*T+L*L,W=T*U+L*K,k=U*U+K*K,V=T*Y+L*Z,O=U*Y+K*Z,q=G*k-W*W,X,rt,lt,nt,_t=q,it=q;q===0?(rt=0,_t=1,nt=O,it=k):(rt=W*O-k*V,nt=G*O-W*V,rt<0?(rt=0,nt=O,it=k):rt>_t&&(rt=_t,nt=O+W,it=k)),nt<0?(nt=0,-V<0?rt=0:-V>G?rt=_t:(rt=-V,_t=G)):nt>it&&(nt=it,-V+W<0?rt=0:-V+W>G?rt=_t:(rt=-V+W,_t=G)),X=rt===0?0:rt/_t,lt=nt===0?0:nt/it;var Ct=(1-X)*m+X*C,Mt=(1-X)*S+X*I,Q=(1-lt)*b+lt*A,wt=(1-lt)*x+lt*N,bt=Q-Ct,Lt=wt-Mt;return bt*bt+Lt*Lt}function y(m,S){return m[0]===S[0]?m[1]-S[1]:m[0]-S[0]}function w(m){m.sort(y);for(var S=[],C=0;C<m.length;C++){for(;S.length>=2&&c(S[S.length-2],S[S.length-1],m[C])<=0;)S.pop();S.push(m[C])}for(var I=[],b=m.length-1;b>=0;b--){for(;I.length>=2&&c(I[I.length-2],I[I.length-1],m[b])<=0;)I.pop();I.push(m[b])}return I.pop(),S.pop(),S.concat(I)}return dh.exports}var GC=FC();const kC=Kp(GC);function VC(n,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(da(n,function(i){e.push([i[0],i[1]])}),!e.length)return null;var r=kC(e,t.concavity);return r.length>3?ie([r]):null}function Qe(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=Dr(n),i=yr(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&UC(r,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,l=0;l<a.length&&!u;l++)if(v0(r,a[l][0],e.ignoreBoundary)){for(var c=!1,h=1;h<a[l].length&&!c;)v0(r,a[l][h],!e.ignoreBoundary)&&(c=!0),h++;c||(u=!0)}return u}function v0(n,t,e){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],l=t[s][1],c=n[1]*(o-u)+a*(u-n[0])+l*(n[0]-o)===0&&(o-n[0])*(u-n[0])<=0&&(a-n[1])*(l-n[1])<=0;if(c)return!e;var h=a>n[1]!=l>n[1]&&n[0]<(u-o)*(n[1]-a)/(l-a)+o;h&&(r=!r)}return r}function UC(n,t){return t[0]<=n[0]&&t[1]<=n[1]&&t[2]>=n[0]&&t[3]>=n[1]}function He(n,t,e){e===void 0&&(e={});var r=Dr(n),i=Dr(t),s=mr(i[1]-r[1]),o=mr(i[0]-r[0]),a=mr(r[1]),u=mr(i[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return sf(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),e.units)}function zC(n){if(!n)throw new Error("geojson is required");switch(n.type){case"Feature":return m0(n);case"FeatureCollection":return qC(n);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return hf(n);default:throw new Error("unknown GeoJSON type")}}function m0(n){var t={type:"Feature"};return Object.keys(n).forEach(function(e){switch(e){case"type":case"properties":case"geometry":return;default:t[e]=n[e]}}),t.properties=y0(n.properties),t.geometry=hf(n.geometry),t}function y0(n){var t={};return n&&Object.keys(n).forEach(function(e){var r=n[e];typeof r=="object"?r===null?t[e]=null:Array.isArray(r)?t[e]=r.map(function(i){return i}):t[e]=y0(r):t[e]=r}),t}function qC(n){var t={type:"FeatureCollection"};return Object.keys(n).forEach(function(e){switch(e){case"type":case"features":return;default:t[e]=n[e]}}),t.features=n.features.map(function(e){return m0(e)}),t}function hf(n){var t={type:n.type};return n.bbox&&(t.bbox=n.bbox),n.type==="GeometryCollection"?(t.geometries=n.geometries.map(function(e){return hf(e)}),t):(t.coordinates=_0(n.coordinates),t)}function _0(n){var t=n;return typeof t[0]!="object"?t.slice():t.map(function(e){return _0(e)})}function pa(n,t,e,r){r===void 0&&(r={});var i=Dr(n),s=mr(i[0]),o=mr(i[1]),a=mr(e),u=of(t,r.units),l=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(l)),h=ch(c),f=ch(l);return $t([h,f],r.properties)}function WC(n,t,e){e===void 0&&(e={});for(var r=e.steps||64,i=e.properties?e.properties:!Array.isArray(n)&&n.type==="Feature"&&n.properties?n.properties:{},s=[],o=0;o<r;o++)s.push(pa(n,t,o*-360/r,e).geometry.coordinates);return s.push(s[0]),ie([s],i)}function Zu(n,t,e){if(e===void 0&&(e={}),e.final===!0)return HC(n,t);var r=Dr(n),i=Dr(t),s=mr(r[0]),o=mr(i[0]),a=mr(r[1]),u=mr(i[1]),l=Math.sin(o-s)*Math.cos(u),c=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return ch(Math.atan2(l,c))}function HC(n,t){var e=Zu(t,n);return e=(e+180)%360,e}function XC(n,t){var e=He(n,t),r=Zu(n,t),i=pa(n,e/2,r);return i}function w0(n,t){t===void 0&&(t={});var e=Cn(n),r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return $t([r,i],t.properties,t)}function cf(n,t){t===void 0&&(t={});var e=0,r=0,i=0;return da(n,function(s){e+=s[0],r+=s[1],i++},!0),$t([e/i,r/i],t.properties)}function E0(n,t){switch(t===void 0&&(t={}),MC(n)){case"Point":return $t(Dr(n),t.properties);case"Polygon":var e=[];da(n,function(m){e.push(m)});var r=cf(n,{properties:t.properties}),i=r.geometry.coordinates,s=0,o=0,a=0,u,l,c,h,f,d,v,_,E=e.map(function(m){return[m[0]-i[0],m[1]-i[1]]});for(u=0;u<e.length-1;u++)l=E[u],h=l[0],d=l[1],c=E[u+1],f=c[0],v=c[1],_=h*v-f*d,a+=_,s+=(h+f)*_,o+=(d+v)*_;if(a===0)return r;var P=a*.5,y=1/(6*P);return $t([i[0]+y*s,i[1]+y*o],t.properties);default:var w=VC(n);return w?E0(w,{properties:t.properties}):cf(n,{properties:t.properties})}}function S0(n){if(!n)throw new Error("geojson is required");var t=[];return co(n,function(e){BC(e,t)}),on(t)}function BC(n,t){var e=[],r=n.geometry;if(r!==null){switch(r.type){case"Polygon":e=fo(r);break;case"LineString":e=[fo(r)]}e.forEach(function(i){var s=YC(i,n.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function YC(n,t){var e=[];return n.reduce(function(r,i){var s=Yr([r,i],t);return s.bbox=JC(r,i),e.push(s),i}),e}function JC(n,t){var e=n[0],r=n[1],i=t[0],s=t[1],o=e<i?e:i,a=r<s?r:s,u=e>i?e:i,l=r>s?r:s;return[o,a,u,l]}var ph={exports:{}},ff={},C0;function P0(){return C0||(C0=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=63710088e-1,n.factors={centimeters:n.earthRadius*100,centimetres:n.earthRadius*100,degrees:n.earthRadius/111325,feet:n.earthRadius*3.28084,inches:n.earthRadius*39.37,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:n.earthRadius*1e3,millimetres:n.earthRadius*1e3,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius*1.0936},n.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(N,T,L){L===void 0&&(L={});var U={type:"Feature"};return(L.id===0||L.id)&&(U.id=L.id),L.bbox&&(U.bbox=L.bbox),U.properties=T||{},U.geometry=N,U}n.feature=t;function e(N,T,L){switch(N){case"Point":return r(T).geometry;case"LineString":return a(T).geometry;case"Polygon":return s(T).geometry;case"MultiPoint":return h(T).geometry;case"MultiLineString":return c(T).geometry;case"MultiPolygon":return f(T).geometry;default:throw new Error(N+" is invalid")}}n.geometry=e;function r(N,T,L){if(L===void 0&&(L={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!I(N[0])||!I(N[1]))throw new Error("coordinates must contain numbers");var U={type:"Point",coordinates:N};return t(U,T,L)}n.point=r;function i(N,T,L){return L===void 0&&(L={}),l(N.map(function(U){return r(U,T)}),L)}n.points=i;function s(N,T,L){L===void 0&&(L={});for(var U=0,K=N;U<K.length;U++){var Y=K[U];if(Y.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var Z=0;Z<Y[Y.length-1].length;Z++)if(Y[Y.length-1][Z]!==Y[0][Z])throw new Error("First and last Position are not equivalent.")}var G={type:"Polygon",coordinates:N};return t(G,T,L)}n.polygon=s;function o(N,T,L){return L===void 0&&(L={}),l(N.map(function(U){return s(U,T)}),L)}n.polygons=o;function a(N,T,L){if(L===void 0&&(L={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var U={type:"LineString",coordinates:N};return t(U,T,L)}n.lineString=a;function u(N,T,L){return L===void 0&&(L={}),l(N.map(function(U){return a(U,T)}),L)}n.lineStrings=u;function l(N,T){T===void 0&&(T={});var L={type:"FeatureCollection"};return T.id&&(L.id=T.id),T.bbox&&(L.bbox=T.bbox),L.features=N,L}n.featureCollection=l;function c(N,T,L){L===void 0&&(L={});var U={type:"MultiLineString",coordinates:N};return t(U,T,L)}n.multiLineString=c;function h(N,T,L){L===void 0&&(L={});var U={type:"MultiPoint",coordinates:N};return t(U,T,L)}n.multiPoint=h;function f(N,T,L){L===void 0&&(L={});var U={type:"MultiPolygon",coordinates:N};return t(U,T,L)}n.multiPolygon=f;function d(N,T,L){L===void 0&&(L={});var U={type:"GeometryCollection",geometries:N};return t(U,T,L)}n.geometryCollection=d;function v(N,T){if(T===void 0&&(T=0),T&&!(T>=0))throw new Error("precision must be a positive number");var L=Math.pow(10,T||0);return Math.round(N*L)/L}n.round=v;function _(N,T){T===void 0&&(T="kilometers");var L=n.factors[T];if(!L)throw new Error(T+" units is invalid");return N*L}n.radiansToLength=_;function E(N,T){T===void 0&&(T="kilometers");var L=n.factors[T];if(!L)throw new Error(T+" units is invalid");return N/L}n.lengthToRadians=E;function P(N,T){return w(E(N,T))}n.lengthToDegrees=P;function y(N){var T=N%360;return T<0&&(T+=360),T}n.bearingToAzimuth=y;function w(N){var T=N%(2*Math.PI);return T*180/Math.PI}n.radiansToDegrees=w;function m(N){var T=N%360;return T*Math.PI/180}n.degreesToRadians=m;function S(N,T,L){if(T===void 0&&(T="kilometers"),L===void 0&&(L="kilometers"),!(N>=0))throw new Error("length must be a positive number");return _(E(N,T),L)}n.convertLength=S;function C(N,T,L){if(T===void 0&&(T="meters"),L===void 0&&(L="kilometers"),!(N>=0))throw new Error("area must be a positive number");var U=n.areaFactors[T];if(!U)throw new Error("invalid original units");var K=n.areaFactors[L];if(!K)throw new Error("invalid final units");return N/U*K}n.convertArea=C;function I(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}n.isNumber=I;function b(N){return!!N&&N.constructor===Object}n.isObject=b;function x(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(T){if(!I(T))throw new Error("bbox must only contain numbers")})}n.validateBBox=x;function A(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}n.validateId=A}(ff)),ff}var Le={},I0;function M0(){if(I0)return Le;I0=1,Object.defineProperty(Le,"__esModule",{value:!0});var n=P0();function t(y,w,m){if(y!==null)for(var S,C,I,b,x,A,N,T=0,L=0,U,K=y.type,Y=K==="FeatureCollection",Z=K==="Feature",G=Y?y.features.length:1,W=0;W<G;W++){N=Y?y.features[W].geometry:Z?y.geometry:y,U=N?N.type==="GeometryCollection":!1,x=U?N.geometries.length:1;for(var k=0;k<x;k++){var V=0,O=0;if(b=U?N.geometries[k]:N,b!==null){A=b.coordinates;var q=b.type;switch(T=m&&(q==="Polygon"||q==="MultiPolygon")?1:0,q){case null:break;case"Point":if(w(A,L,W,V,O)===!1)return!1;L++,V++;break;case"LineString":case"MultiPoint":for(S=0;S<A.length;S++){if(w(A[S],L,W,V,O)===!1)return!1;L++,q==="MultiPoint"&&V++}q==="LineString"&&V++;break;case"Polygon":case"MultiLineString":for(S=0;S<A.length;S++){for(C=0;C<A[S].length-T;C++){if(w(A[S][C],L,W,V,O)===!1)return!1;L++}q==="MultiLineString"&&V++,q==="Polygon"&&O++}q==="Polygon"&&V++;break;case"MultiPolygon":for(S=0;S<A.length;S++){for(O=0,C=0;C<A[S].length;C++){for(I=0;I<A[S][C].length-T;I++){if(w(A[S][C][I],L,W,V,O)===!1)return!1;L++}O++}V++}break;case"GeometryCollection":for(S=0;S<b.geometries.length;S++)if(t(b.geometries[S],w,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(y,w,m,S){var C=m;return t(y,function(I,b,x,A,N){b===0&&m===void 0?C=I:C=w(C,I,b,x,A,N)},S),C}function r(y,w){var m;switch(y.type){case"FeatureCollection":for(m=0;m<y.features.length&&w(y.features[m].properties,m)!==!1;m++);break;case"Feature":w(y.properties,0);break}}function i(y,w,m){var S=m;return r(y,function(C,I){I===0&&m===void 0?S=C:S=w(S,C,I)}),S}function s(y,w){if(y.type==="Feature")w(y,0);else if(y.type==="FeatureCollection")for(var m=0;m<y.features.length&&w(y.features[m],m)!==!1;m++);}function o(y,w,m){var S=m;return s(y,function(C,I){I===0&&m===void 0?S=C:S=w(S,C,I)}),S}function a(y){var w=[];return t(y,function(m){w.push(m)}),w}function u(y,w){var m,S,C,I,b,x,A,N,T,L,U=0,K=y.type==="FeatureCollection",Y=y.type==="Feature",Z=K?y.features.length:1;for(m=0;m<Z;m++){for(x=K?y.features[m].geometry:Y?y.geometry:y,N=K?y.features[m].properties:Y?y.properties:{},T=K?y.features[m].bbox:Y?y.bbox:void 0,L=K?y.features[m].id:Y?y.id:void 0,A=x?x.type==="GeometryCollection":!1,b=A?x.geometries.length:1,C=0;C<b;C++){if(I=A?x.geometries[C]:x,I===null){if(w(null,U,N,T,L)===!1)return!1;continue}switch(I.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(w(I,U,N,T,L)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<I.geometries.length;S++)if(w(I.geometries[S],U,N,T,L)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}U++}}function l(y,w,m){var S=m;return u(y,function(C,I,b,x,A){I===0&&m===void 0?S=C:S=w(S,C,I,b,x,A)}),S}function c(y,w){u(y,function(m,S,C,I,b){var x=m===null?null:m.type;switch(x){case null:case"Point":case"LineString":case"Polygon":return w(n.feature(m,C,{bbox:I,id:b}),S,0)===!1?!1:void 0}var A;switch(x){case"MultiPoint":A="Point";break;case"MultiLineString":A="LineString";break;case"MultiPolygon":A="Polygon";break}for(var N=0;N<m.coordinates.length;N++){var T=m.coordinates[N],L={type:A,coordinates:T};if(w(n.feature(L,C),S,N)===!1)return!1}})}function h(y,w,m){var S=m;return c(y,function(C,I,b){I===0&&b===0&&m===void 0?S=C:S=w(S,C,I,b)}),S}function f(y,w){c(y,function(m,S,C){var I=0;if(m.geometry){var b=m.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var x,A=0,N=0,T=0;if(t(m,function(L,U,K,Y,Z){if(x===void 0||S>A||Y>N||Z>T){x=L,A=S,N=Y,T=Z,I=0;return}var G=n.lineString([x,L],m.properties);if(w(G,S,C,Z,I)===!1)return!1;I++,x=L})===!1)return!1}}})}function d(y,w,m){var S=m,C=!1;return f(y,function(I,b,x,A,N){C===!1&&m===void 0?S=I:S=w(S,I,b,x,A,N),C=!0}),S}function v(y,w){if(!y)throw new Error("geojson is required");c(y,function(m,S,C){if(m.geometry!==null){var I=m.geometry.type,b=m.geometry.coordinates;switch(I){case"LineString":if(w(m,S,C,0,0)===!1)return!1;break;case"Polygon":for(var x=0;x<b.length;x++)if(w(n.lineString(b[x],m.properties),S,C,x)===!1)return!1;break}}})}function _(y,w,m){var S=m;return v(y,function(C,I,b,x){I===0&&m===void 0?S=C:S=w(S,C,I,b,x)}),S}function E(y,w){if(w=w||{},!n.isObject(w))throw new Error("options is invalid");var m=w.featureIndex||0,S=w.multiFeatureIndex||0,C=w.geometryIndex||0,I=w.segmentIndex||0,b=w.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":case"MultiPoint":return null;case"LineString":return I<0&&(I=A.length+I-1),n.lineString([A[I],A[I+1]],b,w);case"Polygon":return C<0&&(C=A.length+C),I<0&&(I=A[C].length+I-1),n.lineString([A[C][I],A[C][I+1]],b,w);case"MultiLineString":return S<0&&(S=A.length+S),I<0&&(I=A[S].length+I-1),n.lineString([A[S][I],A[S][I+1]],b,w);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),I<0&&(I=A[S][C].length-I-1),n.lineString([A[S][C][I],A[S][C][I+1]],b,w)}throw new Error("geojson is invalid")}function P(y,w){if(w=w||{},!n.isObject(w))throw new Error("options is invalid");var m=w.featureIndex||0,S=w.multiFeatureIndex||0,C=w.geometryIndex||0,I=w.coordIndex||0,b=w.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":return n.point(A,b,w);case"MultiPoint":return S<0&&(S=A.length+S),n.point(A[S],b,w);case"LineString":return I<0&&(I=A.length+I),n.point(A[I],b,w);case"Polygon":return C<0&&(C=A.length+C),I<0&&(I=A[C].length+I),n.point(A[C][I],b,w);case"MultiLineString":return S<0&&(S=A.length+S),I<0&&(I=A[S].length+I),n.point(A[S][I],b,w);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),I<0&&(I=A[S][C].length-I),n.point(A[S][C][I],b,w)}throw new Error("geojson is invalid")}return Le.coordAll=a,Le.coordEach=t,Le.coordReduce=e,Le.featureEach=s,Le.featureReduce=o,Le.findPoint=P,Le.findSegment=E,Le.flattenEach=c,Le.flattenReduce=h,Le.geomEach=u,Le.geomReduce=l,Le.lineEach=v,Le.lineReduce=_,Le.propEach=r,Le.propReduce=i,Le.segmentEach=f,Le.segmentReduce=d,Le}var vh={},b0;function jC(){if(b0)return vh;b0=1,Object.defineProperty(vh,"__esModule",{value:!0});var n=M0();function t(e){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,function(i){r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}return t.default=t,vh.default=t,vh}var N0;function QC(){if(N0)return ph.exports;N0=1;var n=h0(),t=P0(),e=M0(),r=jC().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new n(a);return u.insert=function(l){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.insert.call(this,l)},u.load=function(l){var c=[];return Array.isArray(l)?l.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}):i(l,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}),n.prototype.load.call(this,c)},u.remove=function(l,c){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.remove.call(this,l,c)},u.clear=function(){return n.prototype.clear.call(this)},u.search=function(l){var c=n.prototype.search.call(this,this.toBBox(l));return s(c)},u.collides=function(l){return n.prototype.collides.call(this,this.toBBox(l))},u.all=function(){var l=n.prototype.all.call(this);return s(l)},u.toJSON=function(){return n.prototype.toJSON.call(this)},u.fromJSON=function(l){return n.prototype.fromJSON.call(this,l)},u.toBBox=function(l){var c;if(l.bbox)c=l.bbox;else if(Array.isArray(l)&&l.length===4)c=l;else if(Array.isArray(l)&&l.length===6)c=[l[0],l[1],l[3],l[4]];else if(l.type==="Feature")c=r(l);else if(l.type==="FeatureCollection")c=r(l);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},u}return ph.exports=o,ph.exports.default=o,ph.exports}var KC=QC();const $C=Kp(KC);function tl(n,t){var e={},r=[];if(n.type==="LineString"&&(n=Sn(n)),t.type==="LineString"&&(t=Sn(t)),n.type==="Feature"&&t.type==="Feature"&&n.geometry!==null&&t.geometry!==null&&n.geometry.type==="LineString"&&t.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=x0(n,t);return i&&r.push(i),on(r)}var s=$C();return s.load(S0(t)),ga(S0(n),function(o){ga(s.search(o),function(a){var u=x0(o,a);if(u){var l=fo(u).join(",");e[l]||(e[l]=!0,r.push(u))}})}),on(r)}function x0(n,t){var e=fo(n),r=fo(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=r[0][0],l=r[0][1],c=r[1][0],h=r[1][1],f=(h-l)*(o-i)-(c-u)*(a-s),d=(c-u)*(s-l)-(h-l)*(i-u),v=(o-i)*(s-l)-(a-s)*(i-u);if(f===0)return null;var _=d/f,E=v/f;if(_>=0&&_<=1&&E>=0&&E<=1){var P=i+_*(o-i),y=s+_*(a-s);return $t([P,y])}return null}function ZC(n,t,e){e===void 0&&(e={});var r=$t([1/0,1/0],{dist:1/0}),i=0;return co(n,function(s){for(var o=fo(s),a=0;a<o.length-1;a++){var u=$t(o[a]);u.properties.dist=He(t,u,e);var l=$t(o[a+1]);l.properties.dist=He(t,l,e);var c=He(u,l,e),h=Math.max(u.properties.dist,l.properties.dist),f=Zu(u,l),d=pa(t,h,f+90,e),v=pa(t,h,f-90,e),_=tl(Yr([d.geometry.coordinates,v.geometry.coordinates]),Yr([u.geometry.coordinates,l.geometry.coordinates])),E=null;_.features.length>0&&(E=_.features[0],E.properties.dist=He(t,E,e),E.properties.location=i+He(u,E,e)),u.properties.dist<r.properties.dist&&(r=u,r.properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=a+1,r.properties.location=i+c),E&&E.properties.dist<r.properties.dist&&(r=E,r.properties.index=a),i+=c}}),r}function T0(n,t,e){e===void 0&&(e={});var r=Dr(n),i=Dr(t);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var s=tP(r,i),o=af(s,"meters",e.units);return o}function tP(n,t,e){e=e===void 0?ar:Number(e);var r=e,i=n[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-n[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?o/u:Math.cos(i),c=Math.sqrt(o*o+l*l*a*a),h=c*r;return h}function eP(n,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!n)throw new Error("pt is required");if(Array.isArray(n)?n=$t(n):n.type==="Point"?n=Sn(n):u0(n,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=Yr(t):t.type==="LineString"?t=Sn(t):u0(t,"LineString","line");var r=1/0,i=n.geometry.coordinates;return a0(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=rP(i,o,a,e);u<r&&(r=u)}),af(r,"degrees",e.units)}function rP(n,t,e,r){var i=[e[0]-t[0],e[1]-t[1]],s=[n[0]-t[0],n[1]-t[1]],o=A0(s,i);if(o<=0)return df(n,t,{method:r.method,units:"degrees"});var a=A0(i,i);if(a<=o)return df(n,e,{method:r.method,units:"degrees"});var u=o/a,l=[t[0]+u*i[0],t[1]+u*i[1]];return df(n,l,{method:r.method,units:"degrees"})}function A0(n,t){return n[0]*t[0]+n[1]*t[1]}function df(n,t,e){return e.method==="planar"?T0(n,t,e):He(n,t,e)}var O0=6378137;function nP(n){return CC(n,function(t,e){return t+iP(e)},0)}function iP(n){var t=0,e;switch(n.type){case"Polygon":return D0(n.coordinates);case"MultiPolygon":for(e=0;e<n.coordinates.length;e++)t+=D0(n.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function D0(n){var t=0;if(n&&n.length>0){t+=Math.abs(L0(n[0]));for(var e=1;e<n.length;e++)t-=Math.abs(L0(n[e]))}return t}function L0(n){var t,e,r,i,s,o,a,u=0,l=n.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,s=l-1,o=0):a===l-1?(i=l-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=n[i],e=n[s],r=n[o],u+=(gf(r[0])-gf(t[0]))*Math.sin(gf(e[1]));u=u*O0*O0/2}return u}function gf(n){return n*Math.PI/180}function pf(n,t,e){e===void 0&&(e={});for(var r=yr(n),i=r.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=Zu(i[o],i[o-1])-180,l=pa(i[o],a,u,e);return l}else return $t(i[o])}else s+=He(i[o],i[o+1],e);return $t(i[i.length-1])}function R0(n,t){return t===void 0&&(t={}),PC(n,function(e,r){var i=r.geometry.coordinates;return e+He(i[0],i[1],t)},0)}function ts(n,t,e){e===void 0&&(e={});for(var r=Dr(n),i=fo(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),sP(i[s],i[s+1],r,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function sP(n,t,e,r,i){var s=e[0],o=e[1],a=n[0],u=n[1],l=t[0],c=t[1],h=e[0]-a,f=e[1]-u,d=l-a,v=c-u,_=h*v-f*d;if(i!==null){if(Math.abs(_)>i)return!1}else if(_!==0)return!1;if(r){if(r==="start")return Math.abs(d)>=Math.abs(v)?d>0?a<s&&s<=l:l<=s&&s<a:v>0?u<o&&o<=c:c<=o&&o<u;if(r==="end")return Math.abs(d)>=Math.abs(v)?d>0?a<=s&&s<l:l<s&&s<=a:v>0?u<=o&&o<c:c<o&&o<=u;if(r==="both")return Math.abs(d)>=Math.abs(v)?d>0?a<s&&s<l:l<s&&s<a:v>0?u<o&&o<c:c<o&&o<u}else return Math.abs(d)>=Math.abs(v)?d>0?a<=s&&s<=l:l<=s&&s<=a:v>0?u<=o&&o<=c:c<=o&&o<=u;return!1}function F0(n,t){var e=yr(n),r=yr(t),i=e.type,s=r.type;switch(i){case"Point":switch(s){case"MultiPoint":return oP(e,r);case"LineString":return ts(e,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Qe(e,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return aP(e,r);case"LineString":return uP(e,r);case"Polygon":case"MultiPolygon":return lP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return hP(e,r);case"Polygon":case"MultiPolygon":return cP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return fP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function oP(n,t){var e,r=!1;for(e=0;e<t.coordinates.length;e++)if(k0(t.coordinates[e],n.coordinates)){r=!0;break}return r}function aP(n,t){for(var e=0;e<n.coordinates.length;e++){for(var r=!1,i=0;i<t.coordinates.length;i++)k0(n.coordinates[e],t.coordinates[i])&&(r=!0);if(!r)return!1}return!0}function uP(n,t){for(var e=!1,r=0;r<n.coordinates.length;r++){if(!ts(n.coordinates[r],t))return!1;e||(e=ts(n.coordinates[r],t,{ignoreEndVertices:!0}))}return e}function lP(n,t){for(var e=!0,r=!1,i=0;i<n.coordinates.length;i++){if(r=Qe(n.coordinates[1],t),!r){e=!1;break}r=Qe(n.coordinates[1],t,{ignoreBoundary:!0})}return e&&r}function hP(n,t){for(var e=0;e<n.coordinates.length;e++)if(!ts(n.coordinates[e],t))return!1;return!0}function cP(n,t){var e=Cn(t),r=Cn(n);if(!G0(e,r))return!1;for(var i=!1,s=0;s<n.coordinates.length-1;s++){if(!Qe(n.coordinates[s],t))return!1;if(i||(i=Qe(n.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=dP(n.coordinates[s],n.coordinates[s+1]);i=Qe(o,t,{ignoreBoundary:!0})}}return i}function fP(n,t){var e=Cn(n),r=Cn(t);if(!G0(r,e))return!1;for(var i=0;i<n.coordinates[0].length;i++)if(!Qe(n.coordinates[0][i],t))return!1;return!0}function G0(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function k0(n,t){return n[0]===t[0]&&n[1]===t[1]}function dP(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function gP(n,t,e){e===void 0&&(e={}),e.mask&&!e.units&&(e.units="kilometers");for(var r=[],i=n[0],s=n[1],o=n[2],a=n[3],u=t/He([i,s],[o,s],e),l=u*(o-i),c=t/He([i,s],[i,a],e),h=c*(a-s),f=o-i,d=a-s,v=Math.floor(f/l),_=Math.floor(d/h),E=(f-v*l)/2,P=(d-_*h)/2,y=i+E;y<=o;){for(var w=s+P;w<=a;){var m=$t([y,w],e.properties);e.mask?F0(m,e.mask)&&r.push(m):r.push(m),w+=h}y+=l}return on(r)}function vf(n,t){t===void 0&&(t={});var e=yr(n);switch(!t.properties&&n.type==="Feature"&&(t.properties=n.properties),e.type){case"Polygon":return pP(e,t);case"MultiPolygon":return vP(e,t);default:throw new Error("invalid poly")}}function pP(n,t){t===void 0&&(t={});var e=yr(n),r=e.coordinates,i=t.properties?t.properties:n.type==="Feature"?n.properties:{};return V0(r,i)}function vP(n,t){t===void 0&&(t={});var e=yr(n),r=e.coordinates,i=t.properties?t.properties:n.type==="Feature"?n.properties:{},s=[];return r.forEach(function(o){s.push(V0(o,i))}),on(s)}function V0(n,t){return n.length>1?SC(n,t):Yr(n[0],t)}function mP(n,t,e){e===void 0&&(e={});var r;e.final?r=U0(Dr(t),Dr(n)):r=U0(Dr(n),Dr(t));var i=r>180?-(360-r):r;return i}function U0(n,t){var e=mr(n[1]),r=mr(t[1]),i=mr(t[0]-n[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(ch(o)+360)%360}function yP(n,t,e,r){r===void 0&&(r={});var i=t<0,s=af(Math.abs(t),r.units,"meters");i&&(s=-Math.abs(s));var o=Dr(n),a=_P(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,$t(a,r.properties)}function _P(n,t,e,r){r=r===void 0?ar:Number(r);var i=t/r,s=n[0]*Math.PI/180,o=mr(n[1]),a=mr(e),u=i*Math.cos(a),l=o+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var c=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),h=Math.abs(c)>1e-11?u/c:Math.cos(o),f=i*Math.sin(a)/h,d=s+f;return[(d*180/Math.PI+540)%360-180,l*180/Math.PI]}function wP(n,t){var e=!0;return co(n,function(r){co(t,function(i){if(e===!1)return!1;e=EP(r.geometry,i.geometry)})}),e}function EP(n,t){switch(n.type){case"Point":switch(t.type){case"Point":return!IP(n.coordinates,t.coordinates);case"LineString":return!z0(t,n);case"Polygon":return!Qe(n,t)}break;case"LineString":switch(t.type){case"Point":return!z0(n,t);case"LineString":return!SP(n,t);case"Polygon":return!q0(t,n)}break;case"Polygon":switch(t.type){case"Point":return!Qe(t,n);case"LineString":return!q0(n,t);case"Polygon":return!CP(t,n)}}return!1}function z0(n,t){for(var e=0;e<n.coordinates.length-1;e++)if(PP(n.coordinates[e],n.coordinates[e+1],t.coordinates))return!0;return!1}function SP(n,t){var e=tl(n,t);return e.features.length>0}function q0(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(Qe(i,n))return!0}var s=tl(t,vf(n));return s.features.length>0}function CP(n,t){for(var e=0,r=n.coordinates[0];e<r.length;e++){var i=r[e];if(Qe(i,t))return!0}for(var s=0,o=t.coordinates[0];s<o.length;s++){var a=o[s];if(Qe(a,n))return!0}var u=tl(vf(n),vf(t));return u.features.length>0}function PP(n,t,e){var r=e[0]-n[0],i=e[1]-n[1],s=t[0]-n[0],o=t[1]-n[1],a=r*o-i*s;return a!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?n[0]<=e[0]&&e[0]<=t[0]:t[0]<=e[0]&&e[0]<=n[0]:o>0?n[1]<=e[1]&&e[1]<=t[1]:t[1]<=e[1]&&e[1]<=n[1]}function IP(n,t){return n[0]===t[0]&&n[1]===t[1]}function MP(n,t){var e=yr(n),r=yr(t),i=e.type,s=r.type,o=e.coordinates,a=r.coordinates;switch(i){case"Point":switch(s){case"Point":return mf(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return bP(e,r);case"MultiPoint":return NP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return ts(r,e,{ignoreEndVertices:!0});case"LineString":return AP(e,r);case"MultiPoint":return xP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return Qe(r,e,{ignoreBoundary:!0});case"LineString":return OP(e,r);case"Polygon":return DP(e,r);case"MultiPoint":return TP(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function bP(n,t){var e,r=!1;for(e=0;e<n.coordinates.length;e++)if(mf(n.coordinates[e],t.coordinates)){r=!0;break}return r}function NP(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){for(var i=r[e],s=!1,o=0,a=n.coordinates;o<a.length;o++){var u=a[o];if(mf(i,u)){s=!0;break}}if(!s)return!1}return!0}function xP(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(ts(s,n,{ignoreEndVertices:!0})&&(e=!0),!ts(s,n))return!1}return!!e}function TP(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(!Qe(i,n,{ignoreBoundary:!0}))return!1}return!0}function AP(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(ts({type:"Point",coordinates:s},n,{ignoreEndVertices:!0})&&(e=!0),!ts({type:"Point",coordinates:s},n,{ignoreEndVertices:!1}))return!1}return e}function OP(n,t){var e=!1,r=0,i=Cn(n),s=Cn(t);if(!W0(i,s))return!1;for(r;r<t.coordinates.length-1;r++){var o=LP(t.coordinates[r],t.coordinates[r+1]);if(Qe({type:"Point",coordinates:o},n,{ignoreBoundary:!0})){e=!0;break}}return e}function DP(n,t){if(n.type==="Feature"&&n.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=Cn(n),r=Cn(t);if(!W0(e,r))return!1;for(var i=yr(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,l=a;u<l.length;u++){var c=l[u];if(!Qe(c,n))return!1}return!0}function W0(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function mf(n,t){return n[0]===t[0]&&n[1]===t[1]}function LP(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function RP(n,t){var e=!1;return co(n,function(r){co(t,function(i){if(e===!0)return!0;e=!wP(r.geometry,i.geometry)})}),e}/**
|
|
45
45
|
* splaytree v3.1.2
|
|
46
46
|
* Fast Splay tree for Node and browser
|
|
47
47
|
*
|
|
@@ -354,7 +354,7 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
354
354
|
\`\`\`
|
|
355
355
|
${zm}
|
|
356
356
|
\`\`\`
|
|
357
|
-
`,z2="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",kt=class kt extends ee{constructor(e){super(e);g(this,"_flyToFeatureEvent",this.dv(new H));g(this,"_flyToFeatureIndexEvent",this.dv(new H));g(this,"_features",this.disposeVar(p.reactJsonWithUndefined(void 0)));g(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:Rc(this.url)?this.features=JSON.parse(this.url):await fetch(ft.context.getStrFromEnv(this.url)).then(r=>r.json()).then(r=>{this.features=r}).catch(r=>{console.warn("ESEntityCluster数据加载失败",r)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new ht([this,"url"],"服务地址",kt.defaults.url),new R([this,"minFeatureVisibleDistance"],"要素最小可视距离",kt.defaults.minFeatureVisibleDistance),new R([this,"maxFeatureVisibleDistance"],"要素最大可视距离",kt.defaults.maxFeatureVisibleDistance),new Tt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new vt([],"点样式集合"),new tt([this,"textShow"],"是否显示",kt.defaults.textShow),new We([this,"textAnchor"],"锚点",kt.defaults.anchor),new Et([this,"textProperty"],"标注显示属性",kt.defaults.textStyle.textProperty),new Et([this,"textDefaultText"],"默认文本",kt.defaults.textStyle.defaultText),new Gt([this,"textColor"],"文本颜色",kt.defaults.textStyle.color),new Gt([this,"textBackgroundColor"],"文本背景颜色",kt.defaults.textStyle.backgroundColor),new Et([this,"textFontStyle"],"字体样式",kt.defaults.textStyle.fontStyle),new Et([this,"textFontWeight"],"字体粗细",kt.defaults.textStyle.fontWeight),new R([this,"textFontSize"],"字体大小",kt.defaults.textStyle.fontSize),new We([this,"textOffset"],"像素偏移",kt.defaults.textStyle.offset),new vt([],"点图片样式集合"),new tt([this,"imageShow"],"是否显示",kt.defaults.imageShow),new We([this,"imageAnchor"],"锚点",kt.defaults.imageStyle.anchor),new ht([this,"imageUrl"],"图片地址",kt.defaults.imageStyle.url),new We([this,"imageSize"],"图片大小",kt.defaults.imageStyle.size),new We([this,"imageOffset"],"像素偏移",kt.defaults.imageStyle.offset),new vt([],"线样式集合"),new tt([this,"stroked"],"是否显示",kt.defaults.stroked),new tt([this,"strokeGround"],"贴地",kt.defaults.strokeStyle.ground),new R([this,"strokeWidth"],"线宽",kt.defaults.strokeStyle.width),new Tt([this,"strokeWidthType"],kt.strokeStyleWidthTypes,"线宽类型"),new Gt([this,"strokeColor"],"线颜色",kt.defaults.strokeStyle.color),new Et([this,"strokeMaterial"],"线材质",kt.defaults.strokeStyle.material),new ht([this,"strokeMaterialParams"],"线材质参数",kt.defaults.strokeStyle.materialParams),new vt([],"面样式集合"),new tt([this,"filled"],"是否显示",kt.defaults.filled),new tt([this,"fillGround"],"贴地",kt.defaults.fillStyle.ground),new Gt([this,"fillColor"],"填充颜色",kt.defaults.fillStyle.color),new Et([this,"fillMaterial"],"填充材质",kt.defaults.fillStyle.material),new ht([this,"fillMaterialParams"],"填充材质参数",kt.defaults.fillStyle.materialParams)],more:[...e.more,new vt([],"标注文本样式"),new Et([this,"textFontFamily"],"字体",kt.defaults.textStyle.fontFamily),new vt([],"通用"),new Cs([this,"loadFuncStr"],"loadFnStr",zm,U2,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};g(kt,"createDefaultProps",()=>({...ee.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:z2,stroked:!0,strokeStyle:p.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:p.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:p.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:p.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),g(kt,"type",kt.register("ESGeoJson",kt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),g(kt,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]);let Dl=kt;const Xo=class Xo extends Rt{constructor(e){super(e);g(this,"editingBindMode","doublePoints");g(this,"_height",this.disposeVar(p.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};g(Xo,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(Xo,"type",Xo.register("ESHeightMeasurement",Xo,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),g(Xo,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let kd=Xo;const hu=class hu extends gs{constructor(e){super(e);g(this,"_area",this.dv(p.react(0)));g(this,"_perimeter",this.dv(p.react(0)));g(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,r){return ym([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new R([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new tt([this,"editing"],"是否编辑"),new ra([this,"position"],"三维坐标",[0,0,0],!0),new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(hu,"createDefaultProps",()=>({...gs.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),g(hu,"type",hu.register("ESLocalCircle",hu,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let Vd=hu;const cu=class cu extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Jg([this,"points"],"坐标",[])]}}};g(cu,"createDefaultProps",()=>({...gs.createDefaultProps(),points:id([]),filled:!0})),g(cu,"type",cu.register("ESLocalPolygon",cu,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Ll=cu;const fu=class fu extends Xa{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Oc([this,"points"],"本地位置数组")]}}};g(fu,"createDefaultProps",()=>({...Xa.createDefaultProps(),points:p.reactPositions(void 0),filled:!0})),g(fu,"type",fu.register("ESLocalPolygonZ",fu,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Ud=fu;const du=class du extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"width"],"宽度"),new R([this,"height"],"高度")]}}};g(du,"createDefaultProps",()=>({...gs.createDefaultProps(),width:5e5,height:3e5,filled:!0})),g(du,"type",du.register("ESLocalRectangle",du,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let zd=du;const ms=class ms extends Rt{constructor(e){super(e);g(this,"editingBindMode","lineString");g(this,"_distance",this.dv(p.react(0)));g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=xl(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"height"],"高度",10),new R([this,"width"],"宽度",10),new Tt([this,"materialMode"],ms.materialModes,"模式","purple")],coordinate:[...e.coordinate,new R([this,"distance"],"距离",0,!1,!0)]}}};g(ms,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(ms,"type",ms.register("ESPipeFence",ms,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),g(ms,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),g(ms,"supportEditingModes",[...Rt.supportEditingModes,ct.LineStringAppend,ct.LineStringInsert]);let ac=ms;const ys=class ys extends Wn{constructor(e){super(e);g(this,"_setLayerVisibleEvent",this.dv(new H));g(this,"_setLayerColorEvent",this.dv(new H))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESPipeserTileset"),new mt(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new mt(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new Tt([this,"colorMode"],ys.colorModes,"colorMode",ys.defaults.colorMode,!0)]}}};g(ys,"createDefaultProps",()=>({...Wn.createDefaultProps(),colorMode:"default"})),g(ys,"type",ys.register("ESPipeserTileset",ys,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),g(ys,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let qd=ys;const _s=class _s extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new R([this,"height"],"高度",10),new Tt([this,"materialMode"],_s.materialModes,"模式","danger")]}}};g(_s,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),g(_s,"type",_s.register("ESPolygonFence",_s,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),g(_s,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),g(_s,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let uc=_s;const to=class to extends Rt{constructor(e){super(e);g(this,"_deprecated",["ground"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());g(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new tt([this,"ground"],"是否贴地"),new tt([this,"outlineTranslucent"],"轮廓线半透明"),new R([this,"height"],"高度"),new R([this,"extrudedHeight"],"拉伸高度"),new $n([this,"rectangle"],"范围",to.defaults.rectangle,!0),new R([this,"stRotation"],"纹理旋转角度"),new R([this,"rotation"],"旋转角度"),new tt([this,"pointEditing"],"是否单点编辑")]}}};g(to,"createDefaultProps",()=>({...Rt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:p.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),g(to,"type",to.register("ESRectangle",to,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),g(to,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Wd=to;const gu=class gu extends oe{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ht([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};g(gu,"createDefaultProps",()=>({...oe.createDefaultProps(),innerRings:p.reactPositionsSet([])})),g(gu,"type",gu.register("ESPolygonWithHole",gu,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Hd=gu;const eo=class eo extends oe{constructor(e){super(e);g(this,"_startEvent",this.disposeVar(new H));g(this,"_stopEvent",this.dv(new H));g(this,"_surfaceArea",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"表面积测量","表面积测量"),new mt([],()=>this.start(),[],"开始计算"),new R([this,"interpolation"],"插值距离",eo.defaults.interpolation),new R([this,"offsetHeight"],"偏移高度",eo.defaults.offsetHeight)]}}};g(eo,"createDefaultProps",()=>({...oe.createDefaultProps(),interpolation:.5,offsetHeight:0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),g(eo,"type",eo.register("ESSurfaceAreaMeasurement",eo,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Xd=eo;const ro=class ro extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",ro.defaults.downloadProgress,!0,!0),new ht([this,"importOptions"],"导入参数",ro.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new ht([this,"url"],"路径")]}}};g(ro,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",importOptions:p.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),g(ro,"type",ro.register("ESDatasmithRuntimeModel",ro,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Bd=ro;const Nr=class Nr extends Ll{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Nr.defaults.waterType),new R([this,"frequency"],"频率",Nr.defaults.frequency),new je([this,"amplitude"],.01,[0,1],"振幅",Nr.defaults.amplitude),new je([this,"flowDirection"],1,[0,360],"流向",Nr.defaults.flowDirection),new je([this,"waveVelocity"],.01,[0,1],"波动频率",Nr.defaults.waveVelocity),new je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Nr.defaults.specularIntensity),new je([this,"murkiness"],.1,[0,10],"水体浑浊度",Nr.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",Nr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Nr.defaults.waterColor),new ht([this,"waterImage"],"水的图片",Nr.defaults.waterImage)]}}};g(Nr,"createDefaultProps",()=>({...Ll.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),g(Nr,"type",Nr.register("ESDynamicWater",Nr,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Yd=Nr;const xr=class xr extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",xr.defaults.waterType),new R([this,"frequency"],"频率",xr.defaults.frequency),new je([this,"amplitude"],.01,[0,1],"振幅",xr.defaults.amplitude),new je([this,"flowDirection"],1,[0,360],"流向",xr.defaults.flowDirection),new je([this,"waveVelocity"],.01,[0,1],"波动频率",xr.defaults.waveVelocity),new je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",xr.defaults.specularIntensity),new je([this,"murkiness"],.1,[0,10],"水体浑浊度",xr.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",xr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",xr.defaults.waterColor),new ht([this,"waterImage"],"水的图片",xr.defaults.waterImage)]}}};g(xr,"createDefaultProps",()=>({...oe.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),g(xr,"type",xr.register("ESGeoWater",xr,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Jd=xr;const Bo=class Bo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",Bo.defaults.downloadProgress,!0,!0),new Et([this,"levelName"],"levelName",""),new R([this,"levelLoadDistance"],"levelLoadDistance",1e3),new pr([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new ht([this,"url"],"url","")]}}};g(Bo,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:p.reactArray([0,0,0]),levelLoadDistance:1e3})),g(Bo,"type",Bo.register("ESLevelRuntimeModel",Bo,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let jd=Bo;const _n=class _n extends ps{constructor(e){super(e);g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"radius"],"半径",_n.defaults.radius),new R([this,"sides"],"圆边数",_n.defaults.sides),new R([this,"speed"],"材质速度",_n.defaults.speed),new Tt([this,"materialMode"],_n.materialModes,"材质模式",_n.defaults.materialMode),new ht([this,"materialImage"],"材质图片和重复度",_n.defaults.materialImage)]}}};g(_n,"createDefaultProps",()=>({...ps.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:p.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(_n,"type",_n.register("ESPipeline",_n,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),g(_n,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let Qd=_n;const Yi=class Yi extends Rt{constructor(e){super(e);g(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Gt([this,"visibleColor"],"可视区域颜色",Yi.defaults.visibleColor),new Gt([this,"invisibleColor"],"遮挡区域颜色",Yi.defaults.invisibleColor),new R([this,"heightOffset"],"视点高度偏移",Yi.defaults.heightOffset)]}}};g(Yi,"createDefaultProps",()=>({...Rt.createDefaultProps(),visibleColor:p.reactArray([0,1,0,1]),invisibleColor:p.reactArray([1,0,0,1]),heightOffset:0})),g(Yi,"type",Yi.register("ESVisibilityAnalysis",Yi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),g(Yi,"supportEditingModes",[...Rt.supportEditingModes,ct.VisibilityAppend,ct.VisibilityModify]);let Kd=Yi;const pu=class pu extends oe{constructor(e){super(e);g(this,"_startEvent",this.dv(new H));g(this,"_clearEvent",this.dv(new H));g(this,"_volume",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new R([this,"planeHeight"],"基准面高程",void 0,!0),new R([this,"gridWidth"],"采样间距 m"),new R([this,"cutVolume"],"挖方",0,!1,!0),new R([this,"fillVolume"],"填方",0,!1,!0),new R([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new R([this,"progress"],"计算进度",0,!1,!0),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清空分析结果"),new tt([this,"depthTest"],"是否开启深度检测")]}}};g(pu,"createDefaultProps",()=>({...oe.createDefaultProps(),planeHeight:p.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(pu,"type",pu.register("ESVolumeMeasurement",pu,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let $d=pu;const vu=class vu extends Oo{constructor(e){super(e);g(this,"_human",this.dv(new Oo));g(this,"_poi",this.dv(new Ol));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.bind([r,"scale"],[this,"scale"])),this.d(p.bind([i,"scale"],[this,"scale"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"animation"],[this,"animation"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.track([i,"name"],[this,"name"])),this.d(p.track([i,"mode"],[this,"poiMode"])),this.d(p.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(p.track([i,"screenRender"],[this,"screenRender"])),this.d(p.track([i,"size"],[this,"size"])),this.d(p.track([i,"anchor"],[this,"anchor"])),this.d(p.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(p.track([i,"renderMode"],[this,"renderMode"])),this.d(p.track([i,"rotationType"],[this,"rotationType"])),this.d(p.track([i,"zOrder"],[this,"zOrder"])),this.d(p.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.bind([r,"position"],[this,"position"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"poiMode"],Ol.modes,"poi模式","SquareH01"),new R([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};g(vu,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:p.reactJson({}),autoAnchor:!0,screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Oo.createDefaultProps()})),g(vu,"type",vu.register("ESHumanPoi",vu,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Zd=vu;const Ei=class Ei extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"depth"],"深度",Ei.defaults.depth),new R([this,"interpolation"],"插值",Ei.defaults.interpolation),new R([this,"opacity"],"透明度",Ei.defaults.opacity),new ht([this,"sideImage"],"侧面图片",Ei.defaults.sideImage),new ht([this,"bottomImage"],"底面图片",Ei.defaults.bottomImage)]}}};g(Ei,"createDefaultProps",()=>({...oe.createDefaultProps(),depth:100,sideImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),g(Ei,"type",Ei.register("ESPit",Ei,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Ya=Ei;const mu=class mu extends Ya{constructor(e){super(e);g(this,"_excavate",this.dv(new Al));g(this,"_pit",this.dv(new Ya));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:r,_pit:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.track([r,"points"],[this,"points"])),this.d(p.track([i,"pointed"],[this,"pointed"])),this.d(p.track([r,"pointed"],[this,"pointed"])),this.d(p.track([i,"pointStyle"],[this,"pointStyle"])),this.d(p.track([r,"pointStyle"],[this,"pointStyle"])),this.d(p.track([i,"stroked"],[this,"stroked"])),this.d(p.track([r,"stroked"],[this,"stroked"])),this.d(p.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([i,"filled"],[this,"filled"])),this.d(p.track([i,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"targetID"],[this,"targetID"])),this.d(p.track([i,"depth"],[this,"depth"])),this.d(p.track([i,"sideImage"],[this,"sideImage"])),this.d(p.track([i,"bottomImage"],[this,"bottomImage"])),this.d(p.track([i,"opacity"],[this,"opacity"])),this.d(p.track([i,"interpolation"],[this,"interpolation"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],Al.modes,"模式","in"),new Et([this,"targetID"],"瓦片图层","")]}}};g(mu,"createDefaultProps",()=>({...Ya.createDefaultProps(),mode:"in",targetID:""})),g(mu,"type",mu.register("ESHole",mu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let tg=mu;const eg={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},q2=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${eg.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},W2=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+eg.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},H2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},X2=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+eg.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},yu=class yu extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_ids",this.dv(p.reactJson([])));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));g(this,"_visJson",this.disposeVar(p.react({})));g(this,"_highlightInner3DtilesetEvent",this.dv(new H));g(this,"_removeHighlightInner3DtilesetEvent",this.dv(new H));g(this,"_tilesetServePort",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,r){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[r[0].value]=r[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}async getFeatureProperty(e){return await X2(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await q2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await W2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,r){var a,u,l;const i=await e.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await H2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ht([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};g(yu,"createDefaultProps",()=>({...Wn.createDefaultProps(),layerConfig:p.reactJsonWithUndefined([])})),g(yu,"type",yu.register("ESRtsTileset",yu,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let rg=yu;function B2(n){return typeof n=="number"&&!isNaN(n)}const _u=class _u extends Wn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation,offset:this.offset}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:B2(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};g(_u,"createDefaultProps",()=>({...Wn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:p.reactJson({}),changeMaterial:p.reactJsonWithUndefined(void 0),uiShowprops:p.reactJson({}),props:p.reactJson({})})),g(_u,"type",_u.register("ESRtsFeatureEditing",_u,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ng=_u;const Y2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},zl=class zl extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_tilesetServePort",this.dv(p.react("")));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await Y2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};g(zl,"type",zl.register("ESMsTileset",zl,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ig=zl;const qm={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
357
|
+
`,z2="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",kt=class kt extends ee{constructor(e){super(e);g(this,"_flyToFeatureEvent",this.dv(new H));g(this,"_flyToFeatureIndexEvent",this.dv(new H));g(this,"_features",this.disposeVar(p.reactJsonWithUndefined(void 0)));g(this,"pickedInfoType","FeatureCollection");g(this,"_fetchId",0);this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}if(typeof this.url=="object")this.features=this.url;else if(Rc(this.url))this.features=JSON.parse(this.url);else{const r=++this._fetchId;try{const s=await(await fetch(ft.context.getStrFromEnv(this.url))).json();r===this._fetchId&&(this.features=s)}catch(i){console.warn("ESEntityCluster数据加载失败",i)}}this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new ht([this,"url"],"服务地址",kt.defaults.url),new R([this,"minFeatureVisibleDistance"],"要素最小可视距离",kt.defaults.minFeatureVisibleDistance),new R([this,"maxFeatureVisibleDistance"],"要素最大可视距离",kt.defaults.maxFeatureVisibleDistance),new Tt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new vt([],"点样式集合"),new tt([this,"textShow"],"是否显示",kt.defaults.textShow),new We([this,"textAnchor"],"锚点",kt.defaults.anchor),new Et([this,"textProperty"],"标注显示属性",kt.defaults.textStyle.textProperty),new Et([this,"textDefaultText"],"默认文本",kt.defaults.textStyle.defaultText),new Gt([this,"textColor"],"文本颜色",kt.defaults.textStyle.color),new Gt([this,"textBackgroundColor"],"文本背景颜色",kt.defaults.textStyle.backgroundColor),new Et([this,"textFontStyle"],"字体样式",kt.defaults.textStyle.fontStyle),new Et([this,"textFontWeight"],"字体粗细",kt.defaults.textStyle.fontWeight),new R([this,"textFontSize"],"字体大小",kt.defaults.textStyle.fontSize),new We([this,"textOffset"],"像素偏移",kt.defaults.textStyle.offset),new vt([],"点图片样式集合"),new tt([this,"imageShow"],"是否显示",kt.defaults.imageShow),new We([this,"imageAnchor"],"锚点",kt.defaults.imageStyle.anchor),new ht([this,"imageUrl"],"图片地址",kt.defaults.imageStyle.url),new We([this,"imageSize"],"图片大小",kt.defaults.imageStyle.size),new We([this,"imageOffset"],"像素偏移",kt.defaults.imageStyle.offset),new vt([],"线样式集合"),new tt([this,"stroked"],"是否显示",kt.defaults.stroked),new tt([this,"strokeGround"],"贴地",kt.defaults.strokeStyle.ground),new R([this,"strokeWidth"],"线宽",kt.defaults.strokeStyle.width),new Tt([this,"strokeWidthType"],kt.strokeStyleWidthTypes,"线宽类型"),new Gt([this,"strokeColor"],"线颜色",kt.defaults.strokeStyle.color),new Et([this,"strokeMaterial"],"线材质",kt.defaults.strokeStyle.material),new ht([this,"strokeMaterialParams"],"线材质参数",kt.defaults.strokeStyle.materialParams),new vt([],"面样式集合"),new tt([this,"filled"],"是否显示",kt.defaults.filled),new tt([this,"fillGround"],"贴地",kt.defaults.fillStyle.ground),new Gt([this,"fillColor"],"填充颜色",kt.defaults.fillStyle.color),new Et([this,"fillMaterial"],"填充材质",kt.defaults.fillStyle.material),new ht([this,"fillMaterialParams"],"填充材质参数",kt.defaults.fillStyle.materialParams)],more:[...e.more,new vt([],"标注文本样式"),new Et([this,"textFontFamily"],"字体",kt.defaults.textStyle.fontFamily),new vt([],"通用"),new Cs([this,"loadFuncStr"],"loadFnStr",zm,U2,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};g(kt,"createDefaultProps",()=>({...ee.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:z2,stroked:!0,strokeStyle:p.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:p.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:p.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:p.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),g(kt,"type",kt.register("ESGeoJson",kt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),g(kt,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]);let Dl=kt;const Xo=class Xo extends Rt{constructor(e){super(e);g(this,"editingBindMode","doublePoints");g(this,"_height",this.disposeVar(p.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};g(Xo,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(Xo,"type",Xo.register("ESHeightMeasurement",Xo,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),g(Xo,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let kd=Xo;const hu=class hu extends gs{constructor(e){super(e);g(this,"_area",this.dv(p.react(0)));g(this,"_perimeter",this.dv(p.react(0)));g(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,r){return ym([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new R([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new tt([this,"editing"],"是否编辑"),new ra([this,"position"],"三维坐标",[0,0,0],!0),new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(hu,"createDefaultProps",()=>({...gs.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),g(hu,"type",hu.register("ESLocalCircle",hu,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let Vd=hu;const cu=class cu extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Jg([this,"points"],"坐标",[])]}}};g(cu,"createDefaultProps",()=>({...gs.createDefaultProps(),points:id([]),filled:!0})),g(cu,"type",cu.register("ESLocalPolygon",cu,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Ll=cu;const fu=class fu extends Xa{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Oc([this,"points"],"本地位置数组")]}}};g(fu,"createDefaultProps",()=>({...Xa.createDefaultProps(),points:p.reactPositions(void 0),filled:!0})),g(fu,"type",fu.register("ESLocalPolygonZ",fu,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Ud=fu;const du=class du extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"width"],"宽度"),new R([this,"height"],"高度")]}}};g(du,"createDefaultProps",()=>({...gs.createDefaultProps(),width:5e5,height:3e5,filled:!0})),g(du,"type",du.register("ESLocalRectangle",du,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let zd=du;const ms=class ms extends Rt{constructor(e){super(e);g(this,"editingBindMode","lineString");g(this,"_distance",this.dv(p.react(0)));g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=xl(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"height"],"高度",10),new R([this,"width"],"宽度",10),new Tt([this,"materialMode"],ms.materialModes,"模式","purple")],coordinate:[...e.coordinate,new R([this,"distance"],"距离",0,!1,!0)]}}};g(ms,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(ms,"type",ms.register("ESPipeFence",ms,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),g(ms,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),g(ms,"supportEditingModes",[...Rt.supportEditingModes,ct.LineStringAppend,ct.LineStringInsert]);let ac=ms;const ys=class ys extends Wn{constructor(e){super(e);g(this,"_setLayerVisibleEvent",this.dv(new H));g(this,"_setLayerColorEvent",this.dv(new H))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESPipeserTileset"),new mt(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new mt(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new Tt([this,"colorMode"],ys.colorModes,"colorMode",ys.defaults.colorMode,!0)]}}};g(ys,"createDefaultProps",()=>({...Wn.createDefaultProps(),colorMode:"default"})),g(ys,"type",ys.register("ESPipeserTileset",ys,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),g(ys,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let qd=ys;const _s=class _s extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new R([this,"height"],"高度",10),new Tt([this,"materialMode"],_s.materialModes,"模式","danger")]}}};g(_s,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),g(_s,"type",_s.register("ESPolygonFence",_s,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),g(_s,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),g(_s,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let uc=_s;const to=class to extends Rt{constructor(e){super(e);g(this,"_deprecated",["ground"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());g(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new tt([this,"ground"],"是否贴地"),new tt([this,"outlineTranslucent"],"轮廓线半透明"),new R([this,"height"],"高度"),new R([this,"extrudedHeight"],"拉伸高度"),new $n([this,"rectangle"],"范围",to.defaults.rectangle,!0),new R([this,"stRotation"],"纹理旋转角度"),new R([this,"rotation"],"旋转角度"),new tt([this,"pointEditing"],"是否单点编辑")]}}};g(to,"createDefaultProps",()=>({...Rt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:p.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),g(to,"type",to.register("ESRectangle",to,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),g(to,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Wd=to;const gu=class gu extends oe{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ht([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};g(gu,"createDefaultProps",()=>({...oe.createDefaultProps(),innerRings:p.reactPositionsSet([])})),g(gu,"type",gu.register("ESPolygonWithHole",gu,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Hd=gu;const eo=class eo extends oe{constructor(e){super(e);g(this,"_startEvent",this.disposeVar(new H));g(this,"_stopEvent",this.dv(new H));g(this,"_surfaceArea",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"表面积测量","表面积测量"),new mt([],()=>this.start(),[],"开始计算"),new R([this,"interpolation"],"插值距离",eo.defaults.interpolation),new R([this,"offsetHeight"],"偏移高度",eo.defaults.offsetHeight)]}}};g(eo,"createDefaultProps",()=>({...oe.createDefaultProps(),interpolation:.5,offsetHeight:0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),g(eo,"type",eo.register("ESSurfaceAreaMeasurement",eo,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Xd=eo;const ro=class ro extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",ro.defaults.downloadProgress,!0,!0),new ht([this,"importOptions"],"导入参数",ro.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new ht([this,"url"],"路径")]}}};g(ro,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",importOptions:p.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),g(ro,"type",ro.register("ESDatasmithRuntimeModel",ro,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Bd=ro;const Nr=class Nr extends Ll{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Nr.defaults.waterType),new R([this,"frequency"],"频率",Nr.defaults.frequency),new je([this,"amplitude"],.01,[0,1],"振幅",Nr.defaults.amplitude),new je([this,"flowDirection"],1,[0,360],"流向",Nr.defaults.flowDirection),new je([this,"waveVelocity"],.01,[0,1],"波动频率",Nr.defaults.waveVelocity),new je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Nr.defaults.specularIntensity),new je([this,"murkiness"],.1,[0,10],"水体浑浊度",Nr.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",Nr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Nr.defaults.waterColor),new ht([this,"waterImage"],"水的图片",Nr.defaults.waterImage)]}}};g(Nr,"createDefaultProps",()=>({...Ll.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),g(Nr,"type",Nr.register("ESDynamicWater",Nr,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Yd=Nr;const xr=class xr extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",xr.defaults.waterType),new R([this,"frequency"],"频率",xr.defaults.frequency),new je([this,"amplitude"],.01,[0,1],"振幅",xr.defaults.amplitude),new je([this,"flowDirection"],1,[0,360],"流向",xr.defaults.flowDirection),new je([this,"waveVelocity"],.01,[0,1],"波动频率",xr.defaults.waveVelocity),new je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",xr.defaults.specularIntensity),new je([this,"murkiness"],.1,[0,10],"水体浑浊度",xr.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",xr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",xr.defaults.waterColor),new ht([this,"waterImage"],"水的图片",xr.defaults.waterImage)]}}};g(xr,"createDefaultProps",()=>({...oe.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),g(xr,"type",xr.register("ESGeoWater",xr,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Jd=xr;const Bo=class Bo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",Bo.defaults.downloadProgress,!0,!0),new Et([this,"levelName"],"levelName",""),new R([this,"levelLoadDistance"],"levelLoadDistance",1e3),new pr([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new ht([this,"url"],"url","")]}}};g(Bo,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:p.reactArray([0,0,0]),levelLoadDistance:1e3})),g(Bo,"type",Bo.register("ESLevelRuntimeModel",Bo,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let jd=Bo;const _n=class _n extends ps{constructor(e){super(e);g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"radius"],"半径",_n.defaults.radius),new R([this,"sides"],"圆边数",_n.defaults.sides),new R([this,"speed"],"材质速度",_n.defaults.speed),new Tt([this,"materialMode"],_n.materialModes,"材质模式",_n.defaults.materialMode),new ht([this,"materialImage"],"材质图片和重复度",_n.defaults.materialImage)]}}};g(_n,"createDefaultProps",()=>({...ps.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:p.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(_n,"type",_n.register("ESPipeline",_n,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),g(_n,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let Qd=_n;const Yi=class Yi extends Rt{constructor(e){super(e);g(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Gt([this,"visibleColor"],"可视区域颜色",Yi.defaults.visibleColor),new Gt([this,"invisibleColor"],"遮挡区域颜色",Yi.defaults.invisibleColor),new R([this,"heightOffset"],"视点高度偏移",Yi.defaults.heightOffset)]}}};g(Yi,"createDefaultProps",()=>({...Rt.createDefaultProps(),visibleColor:p.reactArray([0,1,0,1]),invisibleColor:p.reactArray([1,0,0,1]),heightOffset:0})),g(Yi,"type",Yi.register("ESVisibilityAnalysis",Yi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),g(Yi,"supportEditingModes",[...Rt.supportEditingModes,ct.VisibilityAppend,ct.VisibilityModify]);let Kd=Yi;const pu=class pu extends oe{constructor(e){super(e);g(this,"_startEvent",this.dv(new H));g(this,"_clearEvent",this.dv(new H));g(this,"_volume",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new R([this,"planeHeight"],"基准面高程",void 0,!0),new R([this,"gridWidth"],"采样间距 m"),new R([this,"cutVolume"],"挖方",0,!1,!0),new R([this,"fillVolume"],"填方",0,!1,!0),new R([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new R([this,"progress"],"计算进度",0,!1,!0),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清空分析结果"),new tt([this,"depthTest"],"是否开启深度检测")]}}};g(pu,"createDefaultProps",()=>({...oe.createDefaultProps(),planeHeight:p.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(pu,"type",pu.register("ESVolumeMeasurement",pu,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let $d=pu;const vu=class vu extends Oo{constructor(e){super(e);g(this,"_human",this.dv(new Oo));g(this,"_poi",this.dv(new Ol));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.bind([r,"scale"],[this,"scale"])),this.d(p.bind([i,"scale"],[this,"scale"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"animation"],[this,"animation"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.track([i,"name"],[this,"name"])),this.d(p.track([i,"mode"],[this,"poiMode"])),this.d(p.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(p.track([i,"screenRender"],[this,"screenRender"])),this.d(p.track([i,"size"],[this,"size"])),this.d(p.track([i,"anchor"],[this,"anchor"])),this.d(p.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(p.track([i,"renderMode"],[this,"renderMode"])),this.d(p.track([i,"rotationType"],[this,"rotationType"])),this.d(p.track([i,"zOrder"],[this,"zOrder"])),this.d(p.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.bind([r,"position"],[this,"position"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"poiMode"],Ol.modes,"poi模式","SquareH01"),new R([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};g(vu,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:p.reactJson({}),autoAnchor:!0,screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Oo.createDefaultProps()})),g(vu,"type",vu.register("ESHumanPoi",vu,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Zd=vu;const Ei=class Ei extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"depth"],"深度",Ei.defaults.depth),new R([this,"interpolation"],"插值",Ei.defaults.interpolation),new R([this,"opacity"],"透明度",Ei.defaults.opacity),new ht([this,"sideImage"],"侧面图片",Ei.defaults.sideImage),new ht([this,"bottomImage"],"底面图片",Ei.defaults.bottomImage)]}}};g(Ei,"createDefaultProps",()=>({...oe.createDefaultProps(),depth:100,sideImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),g(Ei,"type",Ei.register("ESPit",Ei,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Ya=Ei;const mu=class mu extends Ya{constructor(e){super(e);g(this,"_excavate",this.dv(new Al));g(this,"_pit",this.dv(new Ya));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:r,_pit:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.track([r,"points"],[this,"points"])),this.d(p.track([i,"pointed"],[this,"pointed"])),this.d(p.track([r,"pointed"],[this,"pointed"])),this.d(p.track([i,"pointStyle"],[this,"pointStyle"])),this.d(p.track([r,"pointStyle"],[this,"pointStyle"])),this.d(p.track([i,"stroked"],[this,"stroked"])),this.d(p.track([r,"stroked"],[this,"stroked"])),this.d(p.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([i,"filled"],[this,"filled"])),this.d(p.track([i,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"targetID"],[this,"targetID"])),this.d(p.track([i,"depth"],[this,"depth"])),this.d(p.track([i,"sideImage"],[this,"sideImage"])),this.d(p.track([i,"bottomImage"],[this,"bottomImage"])),this.d(p.track([i,"opacity"],[this,"opacity"])),this.d(p.track([i,"interpolation"],[this,"interpolation"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],Al.modes,"模式","in"),new Et([this,"targetID"],"瓦片图层","")]}}};g(mu,"createDefaultProps",()=>({...Ya.createDefaultProps(),mode:"in",targetID:""})),g(mu,"type",mu.register("ESHole",mu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let tg=mu;const eg={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},q2=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${eg.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},W2=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+eg.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},H2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},X2=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+eg.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},yu=class yu extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_ids",this.dv(p.reactJson([])));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));g(this,"_visJson",this.disposeVar(p.react({})));g(this,"_highlightInner3DtilesetEvent",this.dv(new H));g(this,"_removeHighlightInner3DtilesetEvent",this.dv(new H));g(this,"_tilesetServePort",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,r){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[r[0].value]=r[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}async getFeatureProperty(e){return await X2(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await q2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await W2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,r){var a,u,l;const i=await e.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await H2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ht([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};g(yu,"createDefaultProps",()=>({...Wn.createDefaultProps(),layerConfig:p.reactJsonWithUndefined([])})),g(yu,"type",yu.register("ESRtsTileset",yu,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let rg=yu;function B2(n){return typeof n=="number"&&!isNaN(n)}const _u=class _u extends Wn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation,offset:this.offset}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:B2(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};g(_u,"createDefaultProps",()=>({...Wn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:p.reactJson({}),changeMaterial:p.reactJsonWithUndefined(void 0),uiShowprops:p.reactJson({}),props:p.reactJson({})})),g(_u,"type",_u.register("ESRtsFeatureEditing",_u,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ng=_u;const Y2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},zl=class zl extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_tilesetServePort",this.dv(p.react("")));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await Y2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};g(zl,"type",zl.register("ESMsTileset",zl,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ig=zl;const qm={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
358
358
|
## 参数类型为 ESPoiType[]
|
|
359
359
|
\`\`\`js
|
|
360
360
|
type Vector2D = [number, number]
|
|
@@ -487,7 +487,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
487
487
|
${Ym}
|
|
488
488
|
\`\`\`
|
|
489
489
|
|
|
490
|
-
`,Fl=Date.now();new Date(Fl).toISOString(),new Date(Fl+864e5).toISOString();const Ci=class Ci extends ft{constructor(e){super(e);g(this,"_flyToEvent",this.disposeVar(new H));g(this,"_resetClockEvent",this.disposeVar(new H))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new ht([this,"data"],Ci.defaults.data,eM,"数据",!0),new ht([this,"uri"],"路径","${earthsdk3-assets-script-dir}/assets/misc/simple.czml",void 0,!0),new tt([this,"clockEnabled"],"启用",!1),new R([this,"multiplier"],"倍速",Ci.defaults.multiplier),new tt([this,"autoResetClock"],"自动设置时钟",!0),new ao([this,"startTime"],"开始时间",Ci.defaults.startTime,!0),new ao([this,"stopTime"],"结束时间",Ci.defaults.stopTime,!0),new ao([this,"currentTime"],"当前时间",Ci.defaults.currentTime,!0),new Tt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new Tt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new tt([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new tt([this,"show"],"是否显示",!0),new tt([this,"collision"],"开启碰撞",!1),new tt([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new mt(["number"],r=>this.flyTo(r),[1e3],"飞入"),new mt([],()=>this.resetClock(),[],"重设时钟"),new Cs([this,"loadFuncStr"],"loadFnStr",Ym,rM,!0)]}}};g(Ci,"createDefaultProps",()=>({show:!0,uri:void 0,allowPicking:!1,data:p.reactJsonWithUndefined(tM),autoResetClock:!0,clockEnabled:!1,startTime:Fl,stopTime:Fl+864e5,currentTime:Fl,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...ft.createDefaultProps()})),g(Ci,"type",Ci.register("ESCzml",Ci,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let cg=Ci;const Pu=class Pu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new tt([this,"show"],"是否显示"),new R([this,"cssSize"],"尺寸"),new We([this,"cssPosition"],"位置"),new Au([this,"imgUrl"],"图片地址")]}}};g(Pu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),g(Pu,"type",Pu.register("ESNavigator",Pu,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let fg=Pu;const ji=class ji extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new tt([this,"show"],"是否显示",ji.defaults.show),new R([this,"height"],"高度",ji.defaults.height,!0),new R([this,"fontSize"],"文字大小",ji.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",ji.defaults.bgColor,!0)]}}};g(ji,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),g(ji,"type",ji.register("ESViewerStatusBar",ji,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let dg=ji;const Qi=class Qi extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new tt([this,"show"],"是否显示",Qi.defaults.show),new R([this,"height"],"高度",Qi.defaults.height,!0),new R([this,"fontSize"],"文字大小",Qi.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",Qi.defaults.bgColor,!0)]}}};g(Qi,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),g(Qi,"type",Qi.register("ESViewerStatusBarScale",Qi,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let gg=Qi;const Iu=class Iu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"url"],"路径","",!0),new R([this,"progress"],"进度",0,!1,!0)]}}};g(Iu,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",progress:0})),g(Iu,"type",Iu.register("ESGaussianSplatting",Iu,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let pg=Iu;const jo=class jo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"mesh"],"mesh地址",jo.defaults.mesh)]}}};g(jo,"createDefaultProps",()=>({...dt.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),g(jo,"type",jo.register("ESStaticMesh",jo,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let vg=jo;const Mu=class Mu extends Rt{constructor(e){super(e);g(this,"_startEvent",this.dv(new H));g(this,"_clearEvent",this.dv(new H));g(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Do),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(p.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清除分析"),new ht([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new ht([this,"depths"],"深度值",[],void 0,!1,!0),new R([this,"radius"],"半径",1e4,!0)]}}};g(Mu,"createDefaultProps",()=>({...Rt.createDefaultProps(),windowPositions:id([]),depths:p.reactArrayWithUndefined([]),radius:p.react(1e4)})),g(Mu,"type",Mu.register("ESSkylineAnalysis",Mu,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let mg=Mu;const ws=class ws extends ee{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new ht([this,"data"],"数据",[],void 0,!0),new ht([this,"gradient"],"渐变",ws.defaults.gradient,void 0,!0),new R([this,"radius"],"半径",ws.defaults.radius,void 0,!0),new R([this,"blur"],"模糊",ws.defaults.blur,!0),new tt([this,"is3D"],"is3D",!1,!0)]}}};g(ws,"createDefaultProps",()=>({...ee.createDefaultProps(),is3D:p.react(!1),data:p.reactPositions([]),gradient:p.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:p.react(10),blur:p.react(.85)})),g(ws,"type",ws.register("ESHeatMap",ws,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let lc=ws;const Qo=class Qo extends Rt{constructor(e){super(e);g(this,"editingBindMode","scatter")}};g(Qo,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!0})),g(Qo,"type",Qo.register("ESGeoPoints",Qo,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),g(Qo,"supportEditingModes",[...Rt.supportEditingModes,ct.ScatterAppend,ct.ScatterModify]);let Gl=Qo;const Jm=async(n,t=[],e)=>{const r=[];for(const i of t){const{coordinates:s}=i.geometry;for(const o of s){const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}}return r},jm=async(n,t=[],e)=>await Promise.all(t.map(async r=>{var u,l,c,h,f,d,v,_,E;const i=((u=r.geometry)==null?void 0:u.x)??((c=(l=r.geometry)==null?void 0:l.coordinates)==null?void 0:c[0]),s=((h=r.geometry)==null?void 0:h.y)??((d=(f=r.geometry)==null?void 0:f.coordinates)==null?void 0:d[1]);let a=((v=r.geometry)==null?void 0:v.z)??((E=(_=r.geometry)==null?void 0:_.coordinates)==null?void 0:E[2])??0;if(e)if(e.type==="absolute")a=e.height??a;else if(e.type==="relative"){const P=await n.getTerrainHeight([i,s])??0;a=(e.height??a)+P}else e.type==="terrain"&&(a=await n.getTerrainHeight([i,s])??0);return{...r,points:[i,s,a]}})),Qm=async(n,t=[],e)=>{const r=[];return await Promise.all(t.map(async i=>{const{coordinates:s}=i.geometry;await Promise.all(s.map(async o=>{const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}))})),r};function nM(n){const t=Yr(n),e=R0(t),r=pf(t,e/2);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function iM(n,t){const e=Yr(n),r=R0(e),i=Math.floor(r/t),s=[];if(s.push(n[0]),i<1)return[n[0]];for(let o=1;o<i;o+=1){const a=pf(e,r*(o/i));s.push([a.geometry.coordinates[0],a.geometry.coordinates[1],a.geometry.coordinates[2]||0])}return s}function sM(n){const t=[...n];JSON.stringify(n[0])!==JSON.stringify(n[n.length-1])&&t.push(n[0]);const e=ie([t]),r=w0(e);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function Km(n,t,e){const r=n.dv(new Ba);for(const i in e)i!=="type"&&(r[i]=e[i]);r.position=t,n.d(n.components.disposableAdd(r))}function yg(n,t,e,r){let i=r.textTemplate||r.symbol.text||"";const s=/{{(.*?)}}/;for(;s.test(i);){const c=i.match(s);if(c){const h=c[1].trim(),f=e[`${h}`]||"-";i=i.replace(c[0],f)}}let o=r.symbol;const{minVisibleDistance:a,maxVisibleDistance:u}=r;a&&u&&(o={...o,minVisibleDistance:a,maxVisibleDistance:u});const l={...o,text:i};Km(n,t,l)}function Qa(n,t){const e={width:null,height:null,color:null,opacity:null,rotation:null};return t.forEach(r=>{r.type==="size"?r.axis==="width"?e.width=n[r.field]||null:r.axis==="height"&&(e.height=n[r.field]||null):r.type==="color"?e.color=n[r.field]||null:r.type==="opacity"?e.opacity=n[r.field]||null:r.type==="rotation"&&(e.rotation=n[r.field]||null)}),e}function _g(n,t,e){const i={...t.symbol};if(e&&e.length>0){const s=Qa(n,e);for(let o in s)i[o]!==void 0&&s[o]!==null&&(i[o]=s[o])}return i}function wg(n,t,e){var l,c;const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o,defaultSymbol:a}=r;let u={...a};if(Array.isArray(s)){const f=s.map(d=>n[d]??"").join(o);u=((l=i.find(d=>d.value==f))==null?void 0:l.symbol)||a}else u=((c=i.find(h=>h.value==n[s]))==null?void 0:c.symbol)||a;if(e&&e.length>0){const h=Qa(n,e);for(let f in h)u[f]!==void 0&&h[f]!==null&&(u[f]=h[f])}return u}function Eg(n,t,e){const r=t,{classBreakInfos:i,field:s,defaultSymbol:o}=r;let a=o;const u=n[s];if(u===void 0||typeof u!="number")a=o;else{const l=i.find(c=>u<=c.maxValue&&u>=c.minValue);l?a=l.symbol:a=o}if(e&&e.length>0){const l=Qa(n,e);for(let c in l)a[c]!==void 0&&l[c]!==null&&(a[c]=l[c])}return a}function oM(n,t){function e(l,c,h,f){const d=S=>S*Math.PI/180,v=S=>S*180/Math.PI,_=d(l),E=d(h),P=d(f-c),y=Math.sin(P)*Math.cos(E),w=Math.cos(_)*Math.sin(E)-Math.sin(_)*Math.cos(E)*Math.cos(P),m=Math.atan2(y,w);return(v(m)+360)%360}function r(l,c,h,f,d){const _=I=>I*Math.PI/180,E=I=>I*180/Math.PI,P=f/6371e3,y=_(d),w=_(l),m=_(c),S=Math.asin(Math.sin(w)*Math.cos(P)+Math.cos(w)*Math.sin(P)*Math.cos(y)),C=m+Math.atan2(Math.sin(y)*Math.sin(P)*Math.cos(w),Math.cos(P)-Math.sin(w)*Math.sin(S));return{lat:E(S),lng:E(C),alt:h}}function i(l){const c=[];l.length>1&&c.push(e(l[0].lat,l[0].lng,l[1].lat,l[1].lng));for(let h=1;h<l.length-1;h++){const f=e(l[h-1].lat,l[h-1].lng,l[h].lat,l[h].lng),d=e(l[h].lat,l[h].lng,l[h+1].lat,l[h+1].lng);let v=(f+d)/2;Math.abs(f-d)>180&&(v=(v+180)%360),c.push(v)}return l.length>1&&c.push(e(l[l.length-2].lat,l[l.length-2].lng,l[l.length-1].lat,l[l.length-1].lng)),l.length===1&&c.push(0),c}if(!n||n.length<2)throw new Error("至少需要两个点才能生成路径");if(t<=0)throw new Error("宽度必须大于0");const s=t/2,o=i(n),a=[],u=[];for(let l=0;l<n.length;l++){const c=(o[l]+90)%360,h=(o[l]+270)%360,f=n[l].alt!==void 0?n[l].alt:0;a.push(r(n[l].lat,n[l].lng,f,s,c)),u.push(r(n[l].lat,n[l].lng,f,s,h))}return a.concat(u.reverse())}function aM(n,t,e,r){function i(_){return _*(Math.PI/180)}const s=6378137,o=i(n),a=i(t),u=i(e),l=i(r),c=u-o,h=l-a,f=Math.sin(c/2)**2+Math.cos(o)*Math.cos(u)*Math.sin(h/2)**2,d=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f));return s*d}const $m=(n,t,e)=>Array.isArray(t)?t.map(s=>n[s]??"").join(e):n[t]??"";function Zm(n,t){const r={...t.symbol};return{points:n.map(i=>i.points),symbol:r}}function ty(n,t){const e=t,{uniqueValueInfos:r,field:i,fieldDelimiter:s,defaultSymbol:o}=e,a=[],u=r.reduce((c,h)=>{const f=h.value.toString();return c[f]={points:[],value:h.value,symbol:h.symbol},c},{});for(let c=0;c<n.length;c++){const h=n[c],f=$m(h,i,s);if(f!==void 0&&f!==""){const d=u[f.toString()];d?d.points.push(h.points):a.push(h.points)}else a.push(h.points)}const l=[];for(let c in u){const{points:h,symbol:f}=u[c];h.length>0&&l.push({points:h,symbol:f})}return a.length>0&&l.push({points:a,symbol:o}),l}function ey(n,t){const e=t,{classBreakInfos:r,field:i,defaultSymbol:s}=e,o=[],a=r.map(l=>({...l,points:[]}));for(let l=0;l<n.length;l++){const c=n[l],h=c[i];if(h===void 0||typeof h!="number")o.push(c.points);else{const f=a.findIndex(d=>h<=d.maxValue&&h>=d.minValue);f!==-1?a[f].points.push(c.points):o.push(c.points)}}const u=[];return a.forEach(l=>{l.points.length>0&&u.push({points:l.points,symbol:l.symbol})}),o.length>0&&u.push({points:o,symbol:s}),u}function uM(n,t,e=[]){const i={...t.symbol},s=n.map(o=>{const a=Qa(o,e);return{position:o.points,rotation:a.rotation||i.rotation||[0,0,0],scale:i.scale||[1,1,1]}});return{url:i.url,locations:s}}function lM(n,t,e=[]){const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o}=r,a=r.defaultSymbol,u=[],l=i.reduce((h,f)=>{const d=f.value.toString();return h[d]={locations:[],value:f.value,symbol:f.symbol},h},{});for(let h=0;h<n.length;h++){const f=n[h],d=$m(f,s,o);if(d){const v=l[d.toString()];if(v){const _=Qa(f,e);v.locations.push({position:f.points,rotation:_.rotation||a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}const c=[];for(let h in l){const{locations:f,symbol:d}=l[h];f.length>0&&c.push({url:d.url,locations:f})}return u.length>0&&c.push({url:a.url,locations:u}),c}function hM(n,t,e=[]){const r=t,{classBreakInfos:i,field:s}=r,o=r.defaultSymbol,a=[],u=i.map(c=>({...c,locations:[]}));for(let c=0;c<n.length;c++){const h=n[c],f=h[s];if(f===void 0||typeof f!="number")a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const d=u.findIndex(v=>f<=v.maxValue&&f>=v.minValue);if(d!==-1){const v=Qa(h,e);u[d].locations.push({position:h.points,rotation:v.rotation||o.rotation||[0,0,0],scale:u[d].symbol.scale||[1,1,1]})}else a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const l=[];return u.forEach(c=>{c.locations.length>0&&l.push({url:c.symbol.url,locations:c.locations})}),a.length>0&&l.push({url:o.url,locations:a}),l}class cM extends st{constructor(e,r,i,s){super();g(this,"labelingInfo");this.sceneObject=e;const o=r;if(s&&p.forEach(o,a=>{this.renderLabel(a,s)}),i)if(i.type==="simple"){const{visualVariables:a}=i;if(i.symbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!");const u=Zm(o,i);this._simplePointAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!");const u=Zm(o,i);this._imageAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:u,locations:l}=uM(o,i,a);this._modelAllRender(u,l);return}for(let u=0;u<o.length;u++){const l=_g(o[u],i,a);this.render(o[u],l)}}else if(i.type==="unique-value"){const{visualVariables:a}=i;if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),ty(o,i).forEach(({points:f,symbol:d})=>{this._simplePointAllRender(f,d)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),ty(o,i).forEach(({points:f,symbol:d})=>{this._imageAllRender(f,d)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),lM(o,i,a).forEach(({url:f,locations:d})=>{this._modelAllRender(f,d)});return}for(let h=0;h<o.length;h++){const f=wg(o[h],i,a);this.render(o[h],f)}}else if(i.type==="class-breaks"){const{visualVariables:a}=i;if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),ey(o,i).forEach(({points:f,symbol:d})=>{this._simplePointAllRender(f,d)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),ey(o,i).forEach(({points:f,symbol:d})=>{this._imageAllRender(f,d)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),hM(o,i,a).forEach(({url:f,locations:d})=>{this._modelAllRender(f,d)});return}for(let h=0;h<o.length;h++){const f=Eg(o[h],i,a);this.render(o[h],f)}}else if(i.type==="heatmap"){const{field:a,fieldValueMax:u,fieldValueMin:l}=i;console.time();const c=o.map(h=>{const{points:f}=h;if(a&&typeof a=="string"){let d=h[a];typeof d=="number"&&(typeof u=="number"&&d>u&&(d=u),typeof l=="number"&&d<l&&(d=l),f[2]=d)}return f});this.renderHeatmap(c,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(e,r){const{points:i}=e;yg(this.sceneObject,i,e,r)}renderHeatmap(e,r){const{is3D:i,radius:s,blur:o,gradient:a}=r,u=this.dv(new lc);this.d(this.sceneObject.components.disposableAdd(u)),u.is3D=i,u.radius=s,u.blur=o,a&&(u.gradient={...a}),u.data=e}render(e,r){r.type==="simple-point"?this._simplePointRender(e,r):r.type==="ESImageLabel"?this._simpleImageRender(e,r):r.type==="ESGltfModel"?this._simpleModelRender(e,r):r.type==="ESTextLabel"?Km(this.sceneObject,e.points,r):r.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(e,r):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(e,r){const{points:i}=e,{size:s,color:o,outlineColor:a,outlineWidth:u}=r,l=this.dv(new Gl);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=a,l.pointOutlineWidth=u,l.pointSize=s,l.pointColor=o,l.allowPicking=(r==null?void 0:r.allowPicking)??!0,l.extras={selected:!1},l.points=[i]}_simplePointAllRender(e,r){const{size:i,color:s,outlineColor:o,outlineWidth:a}=r,u=this.dv(new Gl);this.d(this.sceneObject.components.disposableAdd(u)),u.pointed=!0,u.pointOutlineColor=o,u.pointOutlineWidth=a,u.pointSize=i,u.pointColor=s,u.allowPicking=(r==null?void 0:r.allowPicking)??!0,u.points=[...e]}_simpleImageRender(e,r){const{points:i}=e,{rotation:s,offset:o,size:a,url:u,screenRender:l,anchor:c,renderMode:h,rotationType:f}=r,d=this.dv(new nc),v=this.dv(new Ba);this.d(this.sceneObject.components.disposableAdd(d)),this.d(this.sceneObject.components.disposableAdd(v)),d.url=u,d.renderMode=h??0,s&&(d.rotation=s),o&&(d.offset=o),d.size=a||[32,32],c&&(d.anchor=c),f&&(d.rotationType=f),d.screenRender=l??!0,d.allowPicking=(r==null?void 0:r.allowPicking)??!0,d.extras={selected:!1},d.position=[...i],d.sizeByContent=!1,v.allowPicking=(r==null?void 0:r.allowPicking)??!0;const _=a?Math.max(...a)+10:Math.max(...d.size)+10;v.sizeByContent=!1,v.screenRender=!0,v.size=[_,_],v.borderRadius=[_,_,_,_],v.padding=[_/2,_/2,_/2,_/2],v.borderWidth=_/10,v.offset=[0,_/10+5],v.text="",v.backgroundColor=[0,0,0,0],v.borderColor=[0,0,0,0]}_imageAllRender(e,r){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e}}]},s=this.dv(new Dl);this.d(this.sceneObject.components.disposableAdd(s));const o=this.dv(new Ba);this.d(this.sceneObject.components.disposableAdd(o)),s.textDefaultText="";const{offset:a,size:u,url:l,anchor:c}=r;s.imageUrl=l,c&&(s.imageAnchor=c),a&&(s.imageOffset=a),s.imageSize=u||[32,32],s.url=i,s.allowPicking=(r==null?void 0:r.allowPicking)??!0,s.extras={selected:!1},o.allowPicking=!0;const h=u?Math.max(...u)+10:Math.max(...s.imageSize)+10;o.sizeByContent=!1,o.size=[h,h],o.borderRadius=[h,h,h,h],o.padding=[h/2,h/2,h/2,h/2],o.borderWidth=h/10,o.offset=[0,h/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(e,r){const{points:i}=e,{rotation:s,scale:o,url:a}=r,u=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(u)),u.url=a,s&&(u.rotation=s),o&&(u.scale=o),u.position=[...i]}_modelAllRender(e,r){const i=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(i)),i.url=e,i.instances=r}_simpleParticleRender(e,r){const{points:i}=e,s=this.dv(new ic);this.d(this.sceneObject.components.disposableAdd(s)),s.position=[...i],Object.keys(r).forEach(o=>{s[o]=r[o]})}}class fM extends st{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=_g(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=wg(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Eg(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}render(t,e){console.log("PolyLineLayer: render",t,e),e.type==="simple-line"?this._simpleLineRender(t,e):e.type==="ESPolygonFence"?this._esPolygonFenceRender(t,e):e.type==="ESPipeFence"?this._esPipeFenceRender(t,e):e.type==="ESPath"?this._esPathRender(t,e):e.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(t,e):e.type==="ESlineWall"?this._eslineWallRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ps);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.stroked=!0,i.strokeColor=e.color,i.strokeWidth=e.width||1,i.allowPicking=(e==null?void 0:e.allowPicking)??!0,i.extras={selected:!1}}_esPolygonFenceRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new uc);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.materialMode=e.materialMode}_esPipeFenceRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ac);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.width=e.width,i.materialMode=e.materialMode}_esPathRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ja),s=this.dv(new Ja);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(s)),i.points=[...r],i.speed=e.speed,i.strokeColor=e.color,i.materialMode=e.materialMode,i.strokeWidth=e.width||1,e!=null&&e.runModel){const a=e==null?void 0:e.runSpeed,u=e==null?void 0:e.modelSymbol;let l;switch(e==null?void 0:e.runModel){case"ESHuman":l=this.dv(new Oo);break;case"ESCar":l=this.dv(new tc);break;case"ESGltfModel":l=this.dv(new Js)}if(this.d(this.sceneObject.components.disposableAdd(l)),u)for(let h in u)l[h]=u[h];const c=[0];for(var o=0;o<r.length-1;o+=1){const h=r[o],f=r[o+1],d=aM(h[1],h[0],f[1],f[0]);c.push(c[o]+Math.ceil(d/a)*1e3)}i.timeStamps=c,e!=null&&e.runSpeed&&(i.currentPositionChanged.don(h=>{i.currentPosition&&(l.position=i.currentPosition,i.currentRotation&&(l.rotation=i.currentRotation))}),s.startTime=0,s.stopTime=c[c.length-1],s.playing=!0,s.loop=(e==null?void 0:e.runLoop)??!0,s.currentTimeChanged.don(h=>{i.path.currentTime=h}))}}_eslineInterpolationModelRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=(e==null?void 0:e.interpolationDistance)??0;if(!i)return;const s=iM(r,i/1e3),o=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(o)),o.url=e.url,o.instances=s.map(a=>({position:a,rotation:e.rotation,scale:e.scale}))}_eslineWallRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=e.height??0,s=e.width??0,o=e.extrudedHeight??0,a=r.map(c=>({lng:(c==null?void 0:c[0])??0,lat:(c==null?void 0:c[1])??0,alt:(c==null?void 0:c[2])??0})),u=oM(a,s).map(c=>[(c==null?void 0:c.lng)??0,(c==null?void 0:c.lat)??0,(c==null?void 0:c.alt)??0]),l=this.dv(new Do);this.d(this.sceneObject.components.disposableAdd(l)),l.height=i,l.extrudedHeight=o,l.filled=e.filled??!0,l.fillColor=e.fillColor,l.allowPicking=(e==null?void 0:e.allowPicking)??!0,l.extras={selected:!1},l.points=u}renderLabel(t,e){const{points:r}=t,i=nM(r);yg(this.sceneObject,i,t,e)}}function ry(n,t){try{JSON.stringify(n[n.length-1])!==JSON.stringify(n[0])&&n.push(n[0]);const e=on(n.map(u=>$t(u))),r=ie([n]);return i2(e,t,{gridType:"point",units:"meters"}).features.map(u=>u.geometry.coordinates)[0][0].filter(u=>Qe($t(u),r))}catch(e){return console.error(e),[]}}class dM extends st{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=_g(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=wg(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Eg(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(t,e){const{points:r}=t;console.log("PolygonLayer: renderLabel",r);const i=sM(r);yg(this.sceneObject,i,t,e)}render(t,e){e.type==="simple-fill"?this._simplePolygonRender(t,e):e.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(t,e):e.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(t,e):e.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:s,filled:o,ground:a}=e,{width:u,color:l,stroked:c}=s,h=this.dv(new oe);this.d(this.sceneObject.components.disposableAdd(h)),h.stroked=c??!1,h.strokeColor=l??[1,1,1,1],h.strokeWidth=u??1,h.filled=o??!0,h.fillGround=a??!1,h.fillColor=i??[1,1,1,1],h.allowPicking=(e==null?void 0:e.allowPicking)??!0,h.extras={selected:!1},h.points=[...r]}_esGeoExtrudedPolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:s,color:o}=e,a=this.dv(new Do);this.d(this.sceneObject.components.disposableAdd(a)),a.height=i,a.extrudedHeight=s,a.filled=!0,a.fillColor=o,a.allowPicking=(e==null?void 0:e.allowPicking)??!0,a.extras={selected:!1},a.points=[...r]}_polygonInterpolateESGltfModelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,url:o,rotation:a,scale:u}=e,l=ry(r,s??10),c=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(c)),c.url=o,c.instances=l.map(h=>({position:[...h,i??0],rotation:a??[0,0,0],scale:u??[1,1,1]}))}_polygonInterpolateESImageLabelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,offset:o,size:a,url:u,anchor:l}=e,h={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...ry(r,s??10).map(d=>[...d,i??0])]}}]},f=this.dv(new Dl);this.d(this.sceneObject.components.disposableAdd(f)),f.textDefaultText="",f.imageUrl=u,l&&(f.imageAnchor=l),o&&(f.imageOffset=o),a&&(f.imageSize=a),f.url=h}}class gM extends st{constructor(e,r){super();g(this,"_initEvent",this.dv(new H));const i=this,s=async()=>{try{const a=e.featureProps;if(!a)return;const{heightMode:u,features:l,layerType:c,url:h}=a;let f=[];if(!l&&h){let d=await fetch(h).then(v=>v.json());return d=(d==null?void 0:d.features)??d,c==="polylineVector"?f=await Jm(r,d,u):c==="polygonVector"?f=await Qm(r,d,u):c==="pointVector"&&(f=await jm(r,d,u)),f}else c==="polylineVector"?f=await Jm(r,l,u):c==="polygonVector"?f=await Qm(r,l,u):c==="pointVector"&&(f=await jm(r,l,u));return f}catch(a){console.error(a);return}},o=this.dv(p.createNextAnimateFrameEvent(this._initEvent,e.featurePropsChanged));i.dv(new p.ObjResettingWithEvent(o,()=>{if(!e.featureProps)return;const a=e.featureProps;let u;return(async()=>{const{layerType:c,renderer:h,labelingInfo:f}=a,d=await s();!d||d.length===0||(c==="pointVector"?u=new cM(e,d,h,f):c==="polylineVector"?u=new fM(e,d,h,f):c==="polygonVector"&&(u=new dM(e,d,h,f)),console.log("polygonVectorLayer","createLayer",u))})().catch(console.error),{destroy:()=>{var c;(c=u==null?void 0:u.destroy)==null||c.call(u),u=void 0}}}));{const a=(u,l=1)=>{const c=wm(u);if(!c)return;const{center:h,radius:f}=c;r.flyTo({distance:f*4,heading:0,pitch:-90,flyDuration:l??1,hDelta:0,pDelta:0},h)};i.d(e.flyToEvent.don(async u=>{const{featureProps:l}=e;if(!l)return;const c=await s();if(!c)return;let h=[];l.layerType==="polylineVector"?h=c.map(f=>f.points).flat():l.layerType==="polygonVector"?h=c.map(f=>f.points).flat():l.layerType==="pointVector"&&(h=c.map(f=>f.points)),h.length!==0&&a(h,u)}))}}init(){this._initEvent.emit()}}const bu=class bu extends ee{constructor(e){super(e);g(this,"featureLayerMap",new Map);const r=this;r.d(r.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),r.featureLayerMap.has(i.id))return;const s=new gM(r,i);s.init(),r.featureLayerMap.set(i.id,s)})),r.d(r.viewerDetached.don(i=>{var s;console.log("ESFeatureLayer","viewerDetached",i.id),r.featureLayerMap.has(i.id)&&((s=r.featureLayerMap.get(i.id))==null||s.destroy(),r.featureLayerMap.delete(i.id))})),r.d(()=>{for(const i of r.featureLayerMap.values())i.destroy();r.featureLayerMap.clear()}),r.d(ea(r.showChanged,()=>{for(const i of r.components.values())Reflect.has(i,"show")&&(i.show=r.show)},{immediate:!0}))}};g(bu,"createDefaultProps",()=>({...ee.createDefaultProps(),featureProps:p.reactJsonWithUndefined(void 0)})),g(bu,"type",bu.register("ESFeatureLayer",bu,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let Sg=bu;function ny(n){return typeof n=="string"?document.getElementById(n):n}function Cg(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(t),t}class iy extends st{constructor(e,r){super();g(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=r;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const l=i.get(u);l&&(l.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const c=this.createSceneObjectListeningFunc(u);c&&i.set(u,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class pM extends st{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class r extends st{constructor(s){super(),this._esPath=s,this.dv(new p.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends st{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new iy(e.sceneObjectsManager,i=>{if(i instanceof ja)return new r(i)}))}{const e=this._esObjectsManager;class r extends st{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new iy(e.sceneObjectsManager,i=>{if(i instanceof Ja)return new r(i)}))}}}class vM extends st{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...r])})})),this.d(e.path.currentRotationChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...r])})}))})}}class mM extends st{constructor(e){super();g(this,"_player");g(this,"_channels",this.dv(p.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new p.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const r=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=ft.getSceneObjById(s.pathId);if(!o||!(o instanceof ja))continue;const u=s.sceneObjectIds.map(l=>ft.getSceneObjById(l)).filter(l=>l!==void 0);u.length!==0&&r.push({path:o,sceneObjects:u})}if(r.length!==0)return new vM(r)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function hc(n){if(n.data){const{type:t,value:e}=n.data;if(t==="UITreeA"&&e instanceof Ir){const{sceneObject:r}=e;if(r)return r.id}}}function yM(n,t){const{property:e,customEventName:r,otherParams:i}=t,{dragstartDataMananger:s}=n;if(!(e instanceof ra)){if(!(e instanceof Kg)){if(e instanceof Et){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;hc(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const l=hc(s);l!==void 0&&a(l)}}else if(e instanceof Bg){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;hc(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,l=i[0].strinsPropDom,c=i[0].index;u.preventDefault();const h=hc(s);if(h!==void 0){l[c].firstChild.value=h;const f=new Event("input",{bubbles:!0,cancelable:!0});l[c].firstChild.dispatchEvent(f)}}}else if(e instanceof Yg){const[o,a]=p.getReactFuncs(e.reactVar)}}}}function sy(n,t,e,r){if(e)r.currentActiveEditing=[n,t];else if(r.currentActiveEditing){const[i,s]=r.currentActiveEditing;i===n&&s===t&&(e||(r.currentActiveEditing=void 0))}}const _M=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class wM extends st{constructor(t,e){super(),this._sceneObject=t;const r=this._sceneObject;for(let i of _M){const s=i+"Changed",o=r[s];if(o){{const a=r[i];sy(r,i,a,e)}this.dispose(o.disposableOn(a=>sy(r,i,a,e)))}}}get sceneObject(){return this._sceneObject}}class EM extends st{constructor(){super();g(this,"_currentActiveEditing",this.disposeVar(p.reactArrayWithUndefined(void 0)));g(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,r)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),r){const[i,s]=r;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),ft.context.sceneObjCreatedEvent.don(e=>{e.dv(new wM(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class SM extends st{constructor(){super();g(this,"_sceneObjects",new Set);g(this,"_sceneObjectsToChange",this.dv(new H));this.d(()=>{const e=p.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,r){const i=ft.context.createSceneObject(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,r){const i=ft.context.createSceneObjectFromClass(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const r=ft.context.createSceneObjectFromJson(e);return r&&this.addSceneObject(r),r}}function oy(n,t){return n.length===t.length&&n.every((e,r)=>e===t[r])}class CM extends st{constructor(t){super(),this._viewer=t,this.d(p.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class PM extends st{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const r=vi.createCommonProps(),i=[];Object.keys(r).forEach(u=>{const l=this._activeViewer[u+"Changed"];i.push(l)});const s=this.dv(p.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(r).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(p.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:c,rotation:h}=u;l&&oy(c,l.position)&&oy(h,l.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>a.cancel())}}const IM=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
490
|
+
`,Fl=Date.now();new Date(Fl).toISOString(),new Date(Fl+864e5).toISOString();const Ci=class Ci extends ft{constructor(e){super(e);g(this,"_flyToEvent",this.disposeVar(new H));g(this,"_resetClockEvent",this.disposeVar(new H))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new ht([this,"data"],Ci.defaults.data,eM,"数据",!0),new ht([this,"uri"],"路径","${earthsdk3-assets-script-dir}/assets/misc/simple.czml",void 0,!0),new tt([this,"clockEnabled"],"启用",!1),new R([this,"multiplier"],"倍速",Ci.defaults.multiplier),new tt([this,"autoResetClock"],"自动设置时钟",!0),new ao([this,"startTime"],"开始时间",Ci.defaults.startTime,!0),new ao([this,"stopTime"],"结束时间",Ci.defaults.stopTime,!0),new ao([this,"currentTime"],"当前时间",Ci.defaults.currentTime,!0),new Tt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new Tt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new tt([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new tt([this,"show"],"是否显示",!0),new tt([this,"collision"],"开启碰撞",!1),new tt([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new mt(["number"],r=>this.flyTo(r),[1e3],"飞入"),new mt([],()=>this.resetClock(),[],"重设时钟"),new Cs([this,"loadFuncStr"],"loadFnStr",Ym,rM,!0)]}}};g(Ci,"createDefaultProps",()=>({show:!0,uri:void 0,allowPicking:!1,data:p.reactJsonWithUndefined(tM),autoResetClock:!0,clockEnabled:!1,startTime:Fl,stopTime:Fl+864e5,currentTime:Fl,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...ft.createDefaultProps()})),g(Ci,"type",Ci.register("ESCzml",Ci,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let cg=Ci;const Pu=class Pu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new tt([this,"show"],"是否显示"),new R([this,"cssSize"],"尺寸"),new We([this,"cssPosition"],"位置"),new Au([this,"imgUrl"],"图片地址")]}}};g(Pu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),g(Pu,"type",Pu.register("ESNavigator",Pu,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let fg=Pu;const ji=class ji extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new tt([this,"show"],"是否显示",ji.defaults.show),new R([this,"height"],"高度",ji.defaults.height,!0),new R([this,"fontSize"],"文字大小",ji.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",ji.defaults.bgColor,!0)]}}};g(ji,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),g(ji,"type",ji.register("ESViewerStatusBar",ji,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let dg=ji;const Qi=class Qi extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new tt([this,"show"],"是否显示",Qi.defaults.show),new R([this,"height"],"高度",Qi.defaults.height,!0),new R([this,"fontSize"],"文字大小",Qi.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",Qi.defaults.bgColor,!0)]}}};g(Qi,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),g(Qi,"type",Qi.register("ESViewerStatusBarScale",Qi,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let gg=Qi;const Iu=class Iu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"url"],"路径","",!0),new R([this,"progress"],"进度",0,!1,!0)]}}};g(Iu,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",progress:0})),g(Iu,"type",Iu.register("ESGaussianSplatting",Iu,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let pg=Iu;const jo=class jo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"mesh"],"mesh地址",jo.defaults.mesh)]}}};g(jo,"createDefaultProps",()=>({...dt.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),g(jo,"type",jo.register("ESStaticMesh",jo,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let vg=jo;const Mu=class Mu extends Rt{constructor(e){super(e);g(this,"_startEvent",this.dv(new H));g(this,"_clearEvent",this.dv(new H));g(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Do),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(p.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清除分析"),new ht([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new ht([this,"depths"],"深度值",[],void 0,!1,!0),new R([this,"radius"],"半径",1e4,!0)]}}};g(Mu,"createDefaultProps",()=>({...Rt.createDefaultProps(),windowPositions:id([]),depths:p.reactArrayWithUndefined([]),radius:p.react(1e4)})),g(Mu,"type",Mu.register("ESSkylineAnalysis",Mu,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let mg=Mu;const ws=class ws extends ee{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new ht([this,"data"],"数据",[],void 0,!0),new ht([this,"gradient"],"渐变",ws.defaults.gradient,void 0,!0),new R([this,"radius"],"半径",ws.defaults.radius,void 0,!0),new R([this,"blur"],"模糊",ws.defaults.blur,!0),new tt([this,"is3D"],"is3D",!1,!0)]}}};g(ws,"createDefaultProps",()=>({...ee.createDefaultProps(),is3D:p.react(!1),data:p.reactPositions([]),gradient:p.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:p.react(10),blur:p.react(.85)})),g(ws,"type",ws.register("ESHeatMap",ws,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let lc=ws;const Qo=class Qo extends Rt{constructor(e){super(e);g(this,"editingBindMode","scatter")}};g(Qo,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!0})),g(Qo,"type",Qo.register("ESGeoPoints",Qo,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),g(Qo,"supportEditingModes",[...Rt.supportEditingModes,ct.ScatterAppend,ct.ScatterModify]);let Gl=Qo;const Jm=async(n,t=[],e)=>{const r=[];for(const i of t){const{coordinates:s}=i.geometry;for(const o of s){const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}}return r},jm=async(n,t=[],e)=>await Promise.all(t.map(async r=>{var u,l,c,h,f,d,v,_,E;const i=((u=r.geometry)==null?void 0:u.x)??((c=(l=r.geometry)==null?void 0:l.coordinates)==null?void 0:c[0]),s=((h=r.geometry)==null?void 0:h.y)??((d=(f=r.geometry)==null?void 0:f.coordinates)==null?void 0:d[1]);let a=((v=r.geometry)==null?void 0:v.z)??((E=(_=r.geometry)==null?void 0:_.coordinates)==null?void 0:E[2])??0;if(e)if(e.type==="absolute")a=e.height??a;else if(e.type==="relative"){const P=await n.getTerrainHeight([i,s])??0;a=(e.height??a)+P}else e.type==="terrain"&&(a=await n.getTerrainHeight([i,s])??0);return{...r,points:[i,s,a]}})),Qm=async(n,t=[],e)=>{const r=[];return await Promise.all(t.map(async i=>{const{coordinates:s}=i.geometry;await Promise.all(s.map(async o=>{const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}))})),r};function nM(n){const t=Yr(n),e=R0(t),r=pf(t,e/2);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function iM(n,t){const e=Yr(n),r=R0(e),i=Math.floor(r/t),s=[];if(s.push(n[0]),i<1)return[n[0]];for(let o=1;o<i;o+=1){const a=pf(e,r*(o/i));s.push([a.geometry.coordinates[0],a.geometry.coordinates[1],a.geometry.coordinates[2]||0])}return s}function sM(n){const t=[...n];JSON.stringify(n[0])!==JSON.stringify(n[n.length-1])&&t.push(n[0]);const e=ie([t]),r=w0(e);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function Km(n,t,e){const r=n.dv(new Ba);for(const i in e)i!=="type"&&(r[i]=e[i]);r.position=t,n.d(n.components.disposableAdd(r))}function yg(n,t,e,r){let i=r.textTemplate||r.symbol.text||"";const s=/{{(.*?)}}/;for(;s.test(i);){const c=i.match(s);if(c){const h=c[1].trim(),f=e[`${h}`]||"-";i=i.replace(c[0],f)}}let o=r.symbol;const{minVisibleDistance:a,maxVisibleDistance:u}=r;a&&u&&(o={...o,minVisibleDistance:a,maxVisibleDistance:u});const l={...o,text:i};Km(n,t,l)}function Qa(n,t){const e={width:null,height:null,color:null,opacity:null,rotation:null};return t.forEach(r=>{r.type==="size"?r.axis==="width"?e.width=n[r.field]||null:r.axis==="height"&&(e.height=n[r.field]||null):r.type==="color"?e.color=n[r.field]||null:r.type==="opacity"?e.opacity=n[r.field]||null:r.type==="rotation"&&(e.rotation=n[r.field]||null)}),e}function _g(n,t,e){const i={...t.symbol};if(e&&e.length>0){const s=Qa(n,e);for(let o in s)i[o]!==void 0&&s[o]!==null&&(i[o]=s[o])}return i}function wg(n,t,e){var l,c;const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o,defaultSymbol:a}=r;let u={...a};if(Array.isArray(s)){const f=s.map(d=>n[d]??"").join(o);u=((l=i.find(d=>d.value==f))==null?void 0:l.symbol)||a}else u=((c=i.find(h=>h.value==n[s]))==null?void 0:c.symbol)||a;if(e&&e.length>0){const h=Qa(n,e);for(let f in h)u[f]!==void 0&&h[f]!==null&&(u[f]=h[f])}return u}function Eg(n,t,e){const r=t,{classBreakInfos:i,field:s,defaultSymbol:o}=r;let a=o;const u=n[s];if(u===void 0||typeof u!="number")a=o;else{const l=i.find(c=>u<=c.maxValue&&u>=c.minValue);l?a=l.symbol:a=o}if(e&&e.length>0){const l=Qa(n,e);for(let c in l)a[c]!==void 0&&l[c]!==null&&(a[c]=l[c])}return a}function oM(n,t){function e(l,c,h,f){const d=S=>S*Math.PI/180,v=S=>S*180/Math.PI,_=d(l),E=d(h),P=d(f-c),y=Math.sin(P)*Math.cos(E),w=Math.cos(_)*Math.sin(E)-Math.sin(_)*Math.cos(E)*Math.cos(P),m=Math.atan2(y,w);return(v(m)+360)%360}function r(l,c,h,f,d){const _=I=>I*Math.PI/180,E=I=>I*180/Math.PI,P=f/6371e3,y=_(d),w=_(l),m=_(c),S=Math.asin(Math.sin(w)*Math.cos(P)+Math.cos(w)*Math.sin(P)*Math.cos(y)),C=m+Math.atan2(Math.sin(y)*Math.sin(P)*Math.cos(w),Math.cos(P)-Math.sin(w)*Math.sin(S));return{lat:E(S),lng:E(C),alt:h}}function i(l){const c=[];l.length>1&&c.push(e(l[0].lat,l[0].lng,l[1].lat,l[1].lng));for(let h=1;h<l.length-1;h++){const f=e(l[h-1].lat,l[h-1].lng,l[h].lat,l[h].lng),d=e(l[h].lat,l[h].lng,l[h+1].lat,l[h+1].lng);let v=(f+d)/2;Math.abs(f-d)>180&&(v=(v+180)%360),c.push(v)}return l.length>1&&c.push(e(l[l.length-2].lat,l[l.length-2].lng,l[l.length-1].lat,l[l.length-1].lng)),l.length===1&&c.push(0),c}if(!n||n.length<2)throw new Error("至少需要两个点才能生成路径");if(t<=0)throw new Error("宽度必须大于0");const s=t/2,o=i(n),a=[],u=[];for(let l=0;l<n.length;l++){const c=(o[l]+90)%360,h=(o[l]+270)%360,f=n[l].alt!==void 0?n[l].alt:0;a.push(r(n[l].lat,n[l].lng,f,s,c)),u.push(r(n[l].lat,n[l].lng,f,s,h))}return a.concat(u.reverse())}function aM(n,t,e,r){function i(_){return _*(Math.PI/180)}const s=6378137,o=i(n),a=i(t),u=i(e),l=i(r),c=u-o,h=l-a,f=Math.sin(c/2)**2+Math.cos(o)*Math.cos(u)*Math.sin(h/2)**2,d=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f));return s*d}const $m=(n,t,e)=>Array.isArray(t)?t.map(s=>n[s]??"").join(e):n[t]??"";function Zm(n,t){const r={...t.symbol};return{points:n.map(i=>i.points),symbol:r}}function ty(n,t){const e=t,{uniqueValueInfos:r,field:i,fieldDelimiter:s,defaultSymbol:o}=e,a=[],u=r.reduce((c,h)=>{const f=h.value.toString();return c[f]={points:[],value:h.value,symbol:h.symbol},c},{});for(let c=0;c<n.length;c++){const h=n[c],f=$m(h,i,s);if(f!==void 0&&f!==""){const d=u[f.toString()];d?d.points.push(h.points):a.push(h.points)}else a.push(h.points)}const l=[];for(let c in u){const{points:h,symbol:f}=u[c];h.length>0&&l.push({points:h,symbol:f})}return a.length>0&&l.push({points:a,symbol:o}),l}function ey(n,t){const e=t,{classBreakInfos:r,field:i,defaultSymbol:s}=e,o=[],a=r.map(l=>({...l,points:[]}));for(let l=0;l<n.length;l++){const c=n[l],h=c[i];if(h===void 0||typeof h!="number")o.push(c.points);else{const f=a.findIndex(d=>h<=d.maxValue&&h>=d.minValue);f!==-1?a[f].points.push(c.points):o.push(c.points)}}const u=[];return a.forEach(l=>{l.points.length>0&&u.push({points:l.points,symbol:l.symbol})}),o.length>0&&u.push({points:o,symbol:s}),u}function uM(n,t,e=[]){const i={...t.symbol},s=n.map(o=>{const a=Qa(o,e);return{position:o.points,rotation:a.rotation||i.rotation||[0,0,0],scale:i.scale||[1,1,1]}});return{url:i.url,locations:s}}function lM(n,t,e=[]){const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o}=r,a=r.defaultSymbol,u=[],l=i.reduce((h,f)=>{const d=f.value.toString();return h[d]={locations:[],value:f.value,symbol:f.symbol},h},{});for(let h=0;h<n.length;h++){const f=n[h],d=$m(f,s,o);if(d){const v=l[d.toString()];if(v){const _=Qa(f,e);v.locations.push({position:f.points,rotation:_.rotation||a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}const c=[];for(let h in l){const{locations:f,symbol:d}=l[h];f.length>0&&c.push({url:d.url,locations:f})}return u.length>0&&c.push({url:a.url,locations:u}),c}function hM(n,t,e=[]){const r=t,{classBreakInfos:i,field:s}=r,o=r.defaultSymbol,a=[],u=i.map(c=>({...c,locations:[]}));for(let c=0;c<n.length;c++){const h=n[c],f=h[s];if(f===void 0||typeof f!="number")a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const d=u.findIndex(v=>f<=v.maxValue&&f>=v.minValue);if(d!==-1){const v=Qa(h,e);u[d].locations.push({position:h.points,rotation:v.rotation||o.rotation||[0,0,0],scale:u[d].symbol.scale||[1,1,1]})}else a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const l=[];return u.forEach(c=>{c.locations.length>0&&l.push({url:c.symbol.url,locations:c.locations})}),a.length>0&&l.push({url:o.url,locations:a}),l}class cM extends st{constructor(e,r,i,s){super();g(this,"labelingInfo");this.sceneObject=e;const o=r;if(s&&p.forEach(o,a=>{this.renderLabel(a,s)}),i)if(i.type==="simple"){const{visualVariables:a}=i;if(i.symbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!");const u=Zm(o,i);this._simplePointAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!");const u=Zm(o,i);this._imageAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:u,locations:l}=uM(o,i,a);this._modelAllRender(u,l);return}for(let u=0;u<o.length;u++){const l=_g(o[u],i,a);this.render(o[u],l)}}else if(i.type==="unique-value"){const{visualVariables:a}=i;if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),ty(o,i).forEach(({points:f,symbol:d})=>{this._simplePointAllRender(f,d)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),ty(o,i).forEach(({points:f,symbol:d})=>{this._imageAllRender(f,d)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),lM(o,i,a).forEach(({url:f,locations:d})=>{this._modelAllRender(f,d)});return}for(let h=0;h<o.length;h++){const f=wg(o[h],i,a);this.render(o[h],f)}}else if(i.type==="class-breaks"){const{visualVariables:a}=i;if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),ey(o,i).forEach(({points:f,symbol:d})=>{this._simplePointAllRender(f,d)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),ey(o,i).forEach(({points:f,symbol:d})=>{this._imageAllRender(f,d)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),hM(o,i,a).forEach(({url:f,locations:d})=>{this._modelAllRender(f,d)});return}for(let h=0;h<o.length;h++){const f=Eg(o[h],i,a);this.render(o[h],f)}}else if(i.type==="heatmap"){const{field:a,fieldValueMax:u,fieldValueMin:l}=i;console.time();const c=o.map(h=>{const{points:f}=h;if(a&&typeof a=="string"){let d=h[a];typeof d=="number"&&(typeof u=="number"&&d>u&&(d=u),typeof l=="number"&&d<l&&(d=l),f[2]=d)}return f});this.renderHeatmap(c,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(e,r){const{points:i}=e;yg(this.sceneObject,i,e,r)}renderHeatmap(e,r){const{is3D:i,radius:s,blur:o,gradient:a}=r,u=this.dv(new lc);this.d(this.sceneObject.components.disposableAdd(u)),u.is3D=i,u.radius=s,u.blur=o,a&&(u.gradient={...a}),u.data=e}render(e,r){r.type==="simple-point"?this._simplePointRender(e,r):r.type==="ESImageLabel"?this._simpleImageRender(e,r):r.type==="ESGltfModel"?this._simpleModelRender(e,r):r.type==="ESTextLabel"?Km(this.sceneObject,e.points,r):r.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(e,r):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(e,r){const{points:i}=e,{size:s,color:o,outlineColor:a,outlineWidth:u}=r,l=this.dv(new Gl);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=a,l.pointOutlineWidth=u,l.pointSize=s,l.pointColor=o,l.allowPicking=(r==null?void 0:r.allowPicking)??!0,l.extras={selected:!1},l.points=[i]}_simplePointAllRender(e,r){const{size:i,color:s,outlineColor:o,outlineWidth:a}=r,u=this.dv(new Gl);this.d(this.sceneObject.components.disposableAdd(u)),u.pointed=!0,u.pointOutlineColor=o,u.pointOutlineWidth=a,u.pointSize=i,u.pointColor=s,u.allowPicking=(r==null?void 0:r.allowPicking)??!0,u.points=[...e]}_simpleImageRender(e,r){const{points:i}=e,{rotation:s,offset:o,size:a,url:u,screenRender:l,anchor:c,renderMode:h,rotationType:f}=r,d=this.dv(new nc),v=this.dv(new Ba);this.d(this.sceneObject.components.disposableAdd(d)),this.d(this.sceneObject.components.disposableAdd(v)),d.url=u,d.renderMode=h??0,s&&(d.rotation=s),o&&(d.offset=o),d.size=a||[32,32],c&&(d.anchor=c),f&&(d.rotationType=f),d.screenRender=l??!0,d.allowPicking=(r==null?void 0:r.allowPicking)??!0,d.extras={selected:!1},d.position=[...i],d.sizeByContent=!1,v.allowPicking=(r==null?void 0:r.allowPicking)??!0;const _=a?Math.max(...a)+10:Math.max(...d.size)+10;v.sizeByContent=!1,v.screenRender=!0,v.size=[_,_],v.borderRadius=[_,_,_,_],v.padding=[_/2,_/2,_/2,_/2],v.borderWidth=_/10,v.offset=[0,_/10+5],v.text="",v.backgroundColor=[0,0,0,0],v.borderColor=[0,0,0,0]}_imageAllRender(e,r){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e}}]},s=this.dv(new Dl);this.d(this.sceneObject.components.disposableAdd(s));const o=this.dv(new Ba);this.d(this.sceneObject.components.disposableAdd(o)),s.textDefaultText="";const{offset:a,size:u,url:l,anchor:c}=r;s.imageUrl=l,c&&(s.imageAnchor=c),a&&(s.imageOffset=a),s.imageSize=u||[32,32],s.url=i,s.allowPicking=(r==null?void 0:r.allowPicking)??!0,s.extras={selected:!1},o.allowPicking=!0;const h=u?Math.max(...u)+10:Math.max(...s.imageSize)+10;o.sizeByContent=!1,o.size=[h,h],o.borderRadius=[h,h,h,h],o.padding=[h/2,h/2,h/2,h/2],o.borderWidth=h/10,o.offset=[0,h/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(e,r){const{points:i}=e,{rotation:s,scale:o,url:a}=r,u=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(u)),u.url=a,s&&(u.rotation=s),o&&(u.scale=o),u.position=[...i]}_modelAllRender(e,r){const i=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(i)),i.url=e,i.instances=r}_simpleParticleRender(e,r){const{points:i}=e,s=this.dv(new ic);this.d(this.sceneObject.components.disposableAdd(s)),s.position=[...i],Object.keys(r).forEach(o=>{s[o]=r[o]})}}class fM extends st{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=_g(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=wg(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Eg(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}render(t,e){console.log("PolyLineLayer: render",t,e),e.type==="simple-line"?this._simpleLineRender(t,e):e.type==="ESPolygonFence"?this._esPolygonFenceRender(t,e):e.type==="ESPipeFence"?this._esPipeFenceRender(t,e):e.type==="ESPath"?this._esPathRender(t,e):e.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(t,e):e.type==="ESlineWall"?this._eslineWallRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ps);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.stroked=!0,i.strokeColor=e.color,i.strokeWidth=e.width||1,i.allowPicking=(e==null?void 0:e.allowPicking)??!0,i.extras={selected:!1}}_esPolygonFenceRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new uc);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.materialMode=e.materialMode}_esPipeFenceRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ac);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.width=e.width,i.materialMode=e.materialMode}_esPathRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ja),s=this.dv(new Ja);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(s)),i.points=[...r],i.speed=e.speed,i.strokeColor=e.color,i.materialMode=e.materialMode,i.strokeWidth=e.width||1,e!=null&&e.runModel){const a=e==null?void 0:e.runSpeed,u=e==null?void 0:e.modelSymbol;let l;switch(e==null?void 0:e.runModel){case"ESHuman":l=this.dv(new Oo);break;case"ESCar":l=this.dv(new tc);break;case"ESGltfModel":l=this.dv(new Js)}if(this.d(this.sceneObject.components.disposableAdd(l)),u)for(let h in u)l[h]=u[h];const c=[0];for(var o=0;o<r.length-1;o+=1){const h=r[o],f=r[o+1],d=aM(h[1],h[0],f[1],f[0]);c.push(c[o]+Math.ceil(d/a)*1e3)}i.timeStamps=c,e!=null&&e.runSpeed&&(i.currentPositionChanged.don(h=>{i.currentPosition&&(l.position=i.currentPosition,i.currentRotation&&(l.rotation=i.currentRotation))}),s.startTime=0,s.stopTime=c[c.length-1],s.playing=!0,s.loop=(e==null?void 0:e.runLoop)??!0,s.currentTimeChanged.don(h=>{i.path.currentTime=h}))}}_eslineInterpolationModelRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=(e==null?void 0:e.interpolationDistance)??0;if(!i)return;const s=iM(r,i/1e3),o=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(o)),o.url=e.url,o.instances=s.map(a=>({position:a,rotation:e.rotation,scale:e.scale}))}_eslineWallRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=e.height??0,s=e.width??0,o=e.extrudedHeight??0,a=r.map(c=>({lng:(c==null?void 0:c[0])??0,lat:(c==null?void 0:c[1])??0,alt:(c==null?void 0:c[2])??0})),u=oM(a,s).map(c=>[(c==null?void 0:c.lng)??0,(c==null?void 0:c.lat)??0,(c==null?void 0:c.alt)??0]),l=this.dv(new Do);this.d(this.sceneObject.components.disposableAdd(l)),l.height=i,l.extrudedHeight=o,l.filled=e.filled??!0,l.fillColor=e.fillColor,l.allowPicking=(e==null?void 0:e.allowPicking)??!0,l.extras={selected:!1},l.points=u}renderLabel(t,e){const{points:r}=t,i=nM(r);yg(this.sceneObject,i,t,e)}}function ry(n,t){try{JSON.stringify(n[n.length-1])!==JSON.stringify(n[0])&&n.push(n[0]);const e=on(n.map(u=>$t(u))),r=ie([n]);return i2(e,t,{gridType:"point",units:"meters"}).features.map(u=>u.geometry.coordinates)[0][0].filter(u=>Qe($t(u),r))}catch(e){return console.error(e),[]}}class dM extends st{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=_g(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=wg(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Eg(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(t,e){const{points:r}=t;console.log("PolygonLayer: renderLabel",r);const i=sM(r);yg(this.sceneObject,i,t,e)}render(t,e){e.type==="simple-fill"?this._simplePolygonRender(t,e):e.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(t,e):e.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(t,e):e.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:s,filled:o,ground:a}=e,{width:u,color:l,stroked:c}=s,h=this.dv(new oe);this.d(this.sceneObject.components.disposableAdd(h)),h.stroked=c??!1,h.strokeColor=l??[1,1,1,1],h.strokeWidth=u??1,h.filled=o??!0,h.fillGround=a??!1,h.fillColor=i??[1,1,1,1],h.allowPicking=(e==null?void 0:e.allowPicking)??!0,h.extras={selected:!1},h.points=[...r]}_esGeoExtrudedPolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:s,color:o}=e,a=this.dv(new Do);this.d(this.sceneObject.components.disposableAdd(a)),a.height=i,a.extrudedHeight=s,a.filled=!0,a.fillColor=o,a.allowPicking=(e==null?void 0:e.allowPicking)??!0,a.extras={selected:!1},a.points=[...r]}_polygonInterpolateESGltfModelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,url:o,rotation:a,scale:u}=e,l=ry(r,s??10),c=this.dv(new Js);this.d(this.sceneObject.components.disposableAdd(c)),c.url=o,c.instances=l.map(h=>({position:[...h,i??0],rotation:a??[0,0,0],scale:u??[1,1,1]}))}_polygonInterpolateESImageLabelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,offset:o,size:a,url:u,anchor:l}=e,h={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...ry(r,s??10).map(d=>[...d,i??0])]}}]},f=this.dv(new Dl);this.d(this.sceneObject.components.disposableAdd(f)),f.textDefaultText="",f.imageUrl=u,l&&(f.imageAnchor=l),o&&(f.imageOffset=o),a&&(f.imageSize=a),f.url=h}}class gM extends st{constructor(e,r){super();g(this,"_initEvent",this.dv(new H));const i=this,s=async()=>{try{const a=e.featureProps;if(!a)return;const{heightMode:u,features:l,layerType:c,url:h}=a;let f=[];if(!l&&h){let d=await fetch(h).then(v=>v.json());return d=(d==null?void 0:d.features)??d,c==="polylineVector"?f=await Jm(r,d,u):c==="polygonVector"?f=await Qm(r,d,u):c==="pointVector"&&(f=await jm(r,d,u)),f}else c==="polylineVector"?f=await Jm(r,l,u):c==="polygonVector"?f=await Qm(r,l,u):c==="pointVector"&&(f=await jm(r,l,u));return f}catch(a){console.error(a);return}},o=this.dv(p.createNextAnimateFrameEvent(this._initEvent,e.featurePropsChanged));i.dv(new p.ObjResettingWithEvent(o,()=>{if(!e.featureProps)return;const a=e.featureProps;let u;return(async()=>{const{layerType:c,renderer:h,labelingInfo:f}=a,d=await s();!d||d.length===0||(c==="pointVector"?u=new cM(e,d,h,f):c==="polylineVector"?u=new fM(e,d,h,f):c==="polygonVector"&&(u=new dM(e,d,h,f)),console.log("polygonVectorLayer","createLayer",u))})().catch(console.error),{destroy:()=>{var c;(c=u==null?void 0:u.destroy)==null||c.call(u),u=void 0}}}));{const a=(u,l=1)=>{const c=wm(u);if(!c)return;const{center:h,radius:f}=c;r.flyTo({distance:f*4,heading:0,pitch:-90,flyDuration:l??1,hDelta:0,pDelta:0},h)};i.d(e.flyToEvent.don(async u=>{const{featureProps:l}=e;if(!l)return;const c=await s();if(!c)return;let h=[];l.layerType==="polylineVector"?h=c.map(f=>f.points).flat():l.layerType==="polygonVector"?h=c.map(f=>f.points).flat():l.layerType==="pointVector"&&(h=c.map(f=>f.points)),h.length!==0&&a(h,u)}))}}init(){this._initEvent.emit()}}const bu=class bu extends ee{constructor(e){super(e);g(this,"featureLayerMap",new Map);const r=this;r.d(r.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),r.featureLayerMap.has(i.id))return;const s=new gM(r,i);s.init(),r.featureLayerMap.set(i.id,s)})),r.d(r.viewerDetached.don(i=>{var s;console.log("ESFeatureLayer","viewerDetached",i.id),r.featureLayerMap.has(i.id)&&((s=r.featureLayerMap.get(i.id))==null||s.destroy(),r.featureLayerMap.delete(i.id))})),r.d(()=>{for(const i of r.featureLayerMap.values())i.destroy();r.featureLayerMap.clear()}),r.d(ea(r.showChanged,()=>{for(const i of r.components.values())Reflect.has(i,"show")&&(i.show=r.show)},{immediate:!0}))}};g(bu,"createDefaultProps",()=>({...ee.createDefaultProps(),featureProps:p.reactJsonWithUndefined(void 0)})),g(bu,"type",bu.register("ESFeatureLayer",bu,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let Sg=bu;function ny(n){return typeof n=="string"?document.getElementById(n):n}function Cg(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(t),t}class iy extends st{constructor(e,r){super();g(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=r;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const l=i.get(u);l&&(l.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const c=this.createSceneObjectListeningFunc(u);c&&i.set(u,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class pM extends st{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class r extends st{constructor(s){super(),this._esPath=s,this.dv(new p.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends st{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new iy(e.sceneObjectsManager,i=>{if(i instanceof ja)return new r(i)}))}{const e=this._esObjectsManager;class r extends st{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new iy(e.sceneObjectsManager,i=>{if(i instanceof Ja)return new r(i)}))}}}class vM extends st{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...r])})})),this.d(e.path.currentRotationChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...r])})}))})}}class mM extends st{constructor(e){super();g(this,"_player");g(this,"_channels",this.dv(p.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new p.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const r=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=ft.getSceneObjById(s.pathId);if(!o||!(o instanceof ja))continue;const u=s.sceneObjectIds.map(l=>ft.getSceneObjById(l)).filter(l=>l!==void 0);u.length!==0&&r.push({path:o,sceneObjects:u})}if(r.length!==0)return new vM(r)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function hc(n){if(n.data){const{type:t,value:e}=n.data;if(t==="UITreeA"&&e instanceof Ir){const{sceneObject:r}=e;if(r)return r.id}}}function yM(n,t){const{property:e,customEventName:r,otherParams:i}=t,{dragstartDataMananger:s}=n;if(!(e instanceof ra)){if(!(e instanceof Kg)){if(e instanceof Et){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;hc(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const l=hc(s);l!==void 0&&a(l)}}else if(e instanceof Bg){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;hc(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,l=i[0].strinsPropDom,c=i[0].index;u.preventDefault();const h=hc(s);if(h!==void 0){l[c].firstChild.value=h;const f=new Event("input",{bubbles:!0,cancelable:!0});l[c].firstChild.dispatchEvent(f)}}}else if(e instanceof Yg){const[o,a]=p.getReactFuncs(e.reactVar)}}}}function sy(n,t,e,r){if(e)r.currentActiveEditing=[n,t];else if(r.currentActiveEditing){const[i,s]=r.currentActiveEditing;i===n&&s===t&&(e||(r.currentActiveEditing=void 0))}}const _M=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class wM extends st{constructor(t,e){super(),this._sceneObject=t;const r=this._sceneObject;for(let i of _M){const s=i+"Changed",o=r[s];if(o){{const a=r[i];sy(r,i,a,e)}this.dispose(o.disposableOn(a=>sy(r,i,a,e)))}}}get sceneObject(){return this._sceneObject}}class EM extends st{constructor(){super();g(this,"_currentActiveEditing",this.disposeVar(p.reactArrayWithUndefined(void 0)));g(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,r)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),r){const[i,s]=r;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),ft.context.sceneObjCreatedEvent.don(e=>{e.dv(new wM(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class SM extends st{constructor(){super();g(this,"_sceneObjects",new Set);g(this,"_sceneObjectsToChange",this.dv(new H));this.d(()=>{const e=p.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,r){const i=ft.context.createSceneObject(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromUrl(e,r){const i=ft.context.createSceneObjectFromUrl(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,r){const i=ft.context.createSceneObjectFromClass(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const r=ft.context.createSceneObjectFromJson(e);return r&&this.addSceneObject(r),r}}function oy(n,t){return n.length===t.length&&n.every((e,r)=>e===t[r])}class CM extends st{constructor(t){super(),this._viewer=t,this.d(p.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class PM extends st{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const r=vi.createCommonProps(),i=[];Object.keys(r).forEach(u=>{const l=this._activeViewer[u+"Changed"];i.push(l)});const s=this.dv(p.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(r).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(p.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:c,rotation:h}=u;l&&oy(c,l.position)&&oy(h,l.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>a.cancel())}}const IM=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
491
491
|
<animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
|
|
492
492
|
</circle><g></g></g></svg>
|
|
493
|
-
`,MM='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',bM='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Ko=class Ko extends st{constructor(t){super();const e=()=>{const r=this.dv(new rc);this.d(p.track([r,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{r.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),r.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(r),this.d(()=>t.delete(r)),r.instanceClass=class extends st{constructor(o,a,u){super();g(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const v=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};v(),this.d(a.showChanged.don(v))}let l,c,h,f,d;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",l=document.createElement("div"),this._div.appendChild(l),l.style.width="auto",l.style.position="absolute",l.style.left="50%",l.style.top="50%",l.style.transform="translate(-50%,-50%)",l.style.background="rgba(120, 120, 0, 0.7)",l.style.color="white",l.style.fontSize="10px",l.style.background="none",l.style.display="flex",l.style.justifyContent="center",l.style.alignItems="center",c=document.createElement("div"),l.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Ko.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),l.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",f=document.createElement("div"),h.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",d=document.createElement("div"),h.appendChild(d),d.style.fontWeight="400",d.style.textShadow="0 0 2px black";{const v=()=>{let E="Raw";u.status==="Raw"?E="初始状态":u.status==="Creating"?E="正在创建":u.status==="Created"?E="创建完成":u.status==="Error"?E="创建失败":u.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${u.status})`,d.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(c.innerHTML=Ko.defaultsSvg.loadingSvg),u.status==="Created"&&(c.innerHTML=Ko.defaultsSvg.successSvg),u.status==="Error"&&(c.innerHTML=Ko.defaultsSvg.warnSvg)};v();const _=this.dv(p.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(_.don(v))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};g(Ko,"defaultsSvg",{loadingSvg:IM,successSvg:MM,warnSvg:bM});let Pg=Ko;class NM extends st{constructor(t,e,r){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=r;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const c=o.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};a(),this.d(o.zIndexChanged.don(a));const u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function cc(n){let t=p.getExtProp(n,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",n.appendChild(t),p.setExtProp(n,"_relativeContainer",t)),t}class xM extends st{constructor(e,r){super();g(this,"_subContainer",document.createElement("div"));g(this,"_overlayContainer",document.createElement("div"));g(this,"_containerStyleController");this._container=e,this._viewer=r,this._containerStyleController=this.dv(new NM(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),cc(this._container).appendChild(i),this.d(()=>cc(this._container).removeChild(i)),cc(this._container).appendChild(s),this.d(()=>cc(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class TM extends st{constructor(){super(...arguments);g(this,"registerObjsMap",new Map)}register(e,r){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,r),e}getViewerConstructor(e){const r=this.registerObjsMap.get(e);if(!r){console.warn(`未找到${e}类!`);return}return r}createViewer(e){const r=e.type;console.log(e);const i=this.getViewerConstructor(r);if(!i)throw new Error(`没有找到类型为${r}的Viewer构造器!`);return new i(e)}}class ay extends st{constructor(t,e,r=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(p.DomElementEvent.create(e,"pointerdown")),o=this.dv(p.DomElementEvent.create(e,"pointermove")),a=this.dv(p.DomElementEvent.create(e,"pointerup")),u=this.dv(p.DomElementEvent.create(e,"pointerout")),l=this.dv(p.DomElementEvent.create(e,"pointerover")),c=this.dv(new p.PointerClick),h=this.dv(new p.PointerHover),f=()=>{const m=this._viewer.hoverTime*1e3;h.delayTime=m};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(m=>c.pointerDown(m))),this.d(o.don(m=>c.pointerMove(m))),this.d(a.don(m=>c.pointerUp(m))),this.d(u.don(m=>c.pointerOut(m))),this.d(s.don(m=>h.pointerDown(m))),this.d(o.don(m=>h.pointerMove(m))),this.d(a.don(m=>h.pointerUp(m))),this.d(u.don(m=>h.pointerOut(m)));const{x:d,y:v}=e.getBoundingClientRect(),_=i?d:0,E=i?v:0;this.d(h.hoverEvent.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.hoverEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(c.clickEvent.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.clickEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(c.dbclickEvent.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(s.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(a.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(o.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerMoveEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(l.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerOverEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(u.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerOutEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})}));const P=this.dv(p.DomElementEvent.create(e,"keydown"));this.d(P.don(m=>this._viewer.keyDownEvent.emit(m)));const y=this.dv(p.DomElementEvent.create(e,"keyup"));this.d(y.don(m=>this._viewer.keyUpEvent.emit(m)));const w=this.dv(p.DomElementEvent.create(e,"wheel"));this.d(w.don(m=>this._viewer.wheelEvent.emit(m)))}}class AM extends st{constructor(e){super();g(this,"viewer");const r=this.viewer=e;this.ad(new p.ObjResettingWithEvent(r.rollerShutterChanged,()=>{const i=r.container;if(!i||!r.rollerShutter)return;const s=new st;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const r=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",r)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",r)}),e}}class OM extends st{constructor(e){super();g(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new AM(e))}}const Es=class Es extends st{constructor(e){super();g(this,"_forceRecreateEvent",this.dv(new H));g(this,"_container",this.dv(p.react(void 0)));g(this,"_containerSize",this.dv(p.react(void 0)));g(this,"_editingEvent",this.disposeVar(new H));g(this,"_status",this.dv(p.react("Raw")));g(this,"_statusLog",this.dv(p.react("")));g(this,"_statusContainer",this.dv(new Pg(this)));g(this,"_useCustomInteraction",this.dv(p.react(!0)));g(this,"_resetInteractionEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));g(this,"_interactionResetting",this.dv(new p.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new ay(this,this.container)})));g(this,"_viewerChanged",this.dv(new H));g(this,"_cameraChanged",this.dv(new H));g(this,"_containerResetEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));g(this,"_containerResetting",this.dv(new p.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new xM(this.container,this)})));g(this,"_sceneObjectsMap",new Map);g(this,"_id");g(this,"_typeName");g(this,"_updateFuncReact",this.dv(p.react(void 0)));g(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));g(this,"_statusInfo",Es.defaults.statusInfo);g(this,"_navigationMode",this.dv(p.react("Map")));g(this,"_syncViewer",this.dv(p.react(void 0)));g(this,"_syncEventDon",this.dv(new p.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new PM(this,e)})));g(this,"_timeSyncdon",this.dv(new p.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new CM(this)})));g(this,"_hoverEvent",this.dv(new H));g(this,"_pointerOverEvent",this.dv(new H));g(this,"_pointerMoveEvent",this.dv(new H));g(this,"_pointerDownEvent",this.dv(new H));g(this,"_pointerUpEvent",this.dv(new H));g(this,"_pointerOutEvent",this.dv(new H));g(this,"_clickEvent",this.dv(new H));g(this,"_dblclickEvent",this.dv(new H));g(this,"_keyDownEvent",this.dv(new H));g(this,"_keyUpEvent",this.dv(new H));g(this,"_wheelEvent",this.dv(new H));g(this,"_actived",this.dv(p.react(!1)));this._id=e.id??p.createGuid();const r=ny(e.container);if(r)this._container.value=Cg(r),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{r&&(this.show??!0?r.style.display="block":r.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const l=oo.context.createEngineObject(a,this);l&&i.set(a,l)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||p.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new OM(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const r=document.getElementById(e);r&&r instanceof HTMLDivElement?this._container.value=Cg(r):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Cg(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let r of e)if(!this.has(r)){ft.context.addSceneObject(r);const i=oo.context.createEngineObject(r,this);i&&this._sceneObjectsMap.set(r,i),r.viewerAttached.emit(this)}}delete(...e){for(let r of e)if(this.has(r)){const i=this._sceneObjectsMap.get(r);i&&i.destroy(),ft.context.deleteSceneObject(r),this._sceneObjectsMap.delete(r),r.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return Es.createDefaultProps()}_getJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_setJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(r){console.warn(`时间格式不正确! value: ${e} error: ${r}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new vt(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new vt(r[s],s))}),i}};g(Es,"context",new TM),g(Es,"register",Es.context.register.bind(Es.context)),g(Es,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0]});let vi=Es;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:p.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:p.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:p.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:p.react(void 0),rollerShutter:!1,cameraMovableRegion:p.reactArrayWithUndefined(void 0)}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(vi||(vi={})),p.extendClassProps(vi.prototype,vi.createDefaultProps);function uy(n,t){const e=n._lastCameraInfo;if(e){const r=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),n._lastCameraInfo=void 0,r()})}}const DM=n=>{const t=vi.createCommonProps(),e={};try{Object.keys(t).forEach(r=>{e[r]=n[r]})}catch(r){console.warn(r)}return e},ly=(n,t)=>{const e=vi.createCommonProps();try{Object.keys(e).forEach(r=>{n[r]=t[r]})}catch(r){console.warn(r)}};class LM extends st{constructor(e){super();g(this,"_viewersChanged",this.disposeVar(new H));g(this,"_viewers",new Set);g(this,"_viewersToChange",this.dv(new H));this._sceneObjectsManager=e,this.d(()=>{for(const r of this._viewers)this.destroyViewer(r);this._viewers.clear()}),this.viewers.forEach(r=>{const i=this._sceneObjectsManager.sceneObjects;r.add(...i)}),this.d(()=>{const r=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...r)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((r,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{$i(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),r.forEach(o=>{$i(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,$i(o.devTags,s.devTags)),$i(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((r,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)$i(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),r.forEach(o=>{for(let a of s)$i(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,$i(o.devTags,u.devTags)),$i(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const r=vi.context.createViewer(e);return this._viewers.add(r),this._viewersChanged.emit([],[r]),r}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Qs extends st{constructor(...e){super();g(this,"_drgm",this.dv(new np));g(this,"_sobjm",this.dv(new SM));g(this,"_vrm",this.dv(new LM(this._sobjm)));g(this,"_sceneObjectEditingManager",this.disposeVar(new EM));g(this,"_activeViewer",this.dv(p.react(void 0)));g(this,"_syncOtherViewersToActived",this.dv(p.react(!1)));g(this,"_cmrvm",this.createSceneObjectFromClass(Zh));g(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));g(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});g(this,"_sceneTree",this.dv(new Tl("default",this.dragstartDataMananger,24,this)));g(this,"_propUiTreeManager",this.dv(new Ha(24)));g(this,"_sceneTreeMap",new Map);g(this,"_viewerCreatedEvent",this.dv(new H));g(this,"_lastCameraInfo");g(this,"_lastActiveViewerJson");g(this,"_syncEventDonFunc",this.d(ea([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(r=>{e?r.syncOtherViewer(this.activeViewer):r.syncOtherViewer(void 0)})})));g(this,"_player",this.createSceneObjectFromClass(Ja));g(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));g(this,"_esPlyarAndPathTime",this.dv(new pM(this)));g(this,"_pathAnimationManager",this.dv(new mM(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.values().forEach(r=>r.actived=r===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),r=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:r,name:i},a=this.sceneTree.json,u=this._cmrvm.views,l=[...this._vrm.viewers].map(f=>f.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:a,viewCollection:u,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(r=>{const i=e.viewers.find(s=>s.id===r.id);i&&(r.json=i)})}catch(r){console.error(`ESObjectsManager解析json数据时发生错误! error: ${r}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return yM(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,r=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Tl(e,this.dragstartDataMananger,r,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const r=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=r);const i=this.d(r.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(r),i())}));return r}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,r=!0,i=!0,s=!0){var l;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&r&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?DM(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(c=>c.id===o):[...this.getViewers()].find(c=>c.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),r&&uy(this,a),i&&this._lastActiveViewerJson&&(ly(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===ny(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),r&&uy(this,u),i&&this._lastActiveViewerJson&&(ly(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:r,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:r,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const r={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=r;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let r,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:l,app:c,token:h,viewSync:f,attributeSync:d,destroy:v,id:_}=e[0];r={type:"ESUeViewer",container:u,id:_,options:{uri:l,app:c,token:h}},i={viewSync:f??!0,attributeSync:d??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:l,esmsg:c,viewSync:h,attributeSync:f,id:d,destroy:v}=e[0];r={type:"ESUeViewer",container:u,id:d,options:{ws:l,esmsg:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:l,baseUrl:c,viewSync:h,attributeSync:f,id:d,destroy:v}=e[0];r={type:"ESUeViewer",container:u,id:d,options:{project:l,baseUrl:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:v??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(r={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(r={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(r={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!r)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(r,s,o,a)}createCesiumViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createOpenLayersViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createUeViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?r={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!r)throw new Error("参数错误");return this.createViewer(r)}createSceneObject(e,r){return this._sobjm.createSceneObject(e,r)}createSceneObjectFromClass(e,r){return this._sobjm.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const r=this._sobjm.deleteSceneObject(e);return e.destroy(),r}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let r of e)r!=this._player&&r!=this._cmrvm&&this.destroySceneObject(r)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}return g(Qs,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),g(Qs,"getEnv",ft.context.getEnv.bind(ft.context)),g(Qs,"setEnv",ft.context.setEnv.bind(ft.context)),(n=>{n.createDefaultProps=()=>({})})(Qs||(Qs={})),p.extendClassProps(Qs.prototype,Qs.createDefaultProps),M.BasePropTreeItem=ed,M.Boolean2Property=zy,M.Boolean2sProperty=Hy,M.Boolean3Property=qy,M.Boolean3sProperty=Xy,M.Boolean4Property=Wy,M.Boolean4sProperty=By,M.BooleanProperty=tt,M.BooleansProperty=Dy,M.ColorProperty=Gt,M.ColorRgbProperty=jy,M.DashPatternProperty=Qy,M.DateProperty=ao,M.DatesProperty=Zg,M.Destroyable=st,M.DoublyLinkedList=zg,M.DragStartDataManager=np,M.ES3DTileset=Wn,M.ESAlarm=ld,M.ESApertureEffect=hd,M.ESAreaMeasurement=cd,M.ESBlastParticleSystem=fd,M.ESBoxClipping=dd,M.ESCameraView=Kh,M.ESCameraViewCollection=Zh,M.ESCameraVisibleRange=gd,M.ESCar=tc,M.ESCityBasePoint=hg,M.ESClassification=ec,M.ESClippingPlane=pd,M.ESCustomDiv=rc,M.ESCzml=cg,M.ESDataMesh=vd,M.ESDatasmithRuntimeModel=Bd,M.ESDirectionMeasurement=Gd,M.ESDistanceMeasurement=md,M.ESDynamicWater=Yd,M.ESEntityCluster=ug,M.ESExcavate=Al,M.ESFeatureLayer=Sg,M.ESFireParticleSystem=yd,M.ESForestTileset=_d,M.ESGaussianSplatting=pg,M.ESGeoDiv=wd,M.ESGeoDivTextPoi=lg,M.ESGeoExtrudedPolygon=Do,M.ESGeoJson=Dl,M.ESGeoLineString=ps,M.ESGeoPoints=Gl,M.ESGeoPolygon=oe,M.ESGeoRectangle=Ed,M.ESGeoVector=Rt,M.ESGeoWater=Jd,M.ESGltfModel=Js,M.ESHeatMap=lc,M.ESHeightLimitAnalysis=ag,M.ESHeightMeasurement=kd,M.ESHole=tg,M.ESHuman=Oo,M.ESHumanPoi=Zd,M.ESImageLabel=nc,M.ESImageryLayer=Cd,M.ESJEditingMode=ct,M.ESJLonLatFormat=tp,M.ESJPickedResult=i_,M.ESLabel=yn,M.ESLevelRuntimeModel=jd,M.ESLocalCircle=Vd,M.ESLocalPolygon=Ll,M.ESLocalPolygonZ=Ud,M.ESLocalRectangle=zd,M.ESLocalSkyBox=Pd,M.ESLocalVector=Xa,M.ESLocalVector2D=gs,M.ESLocationMeasurement=Id,M.ESMsTileset=ig,M.ESNavigator=fg,M.ESObjectWithLocation=dt,M.ESObjectsManager=Qs,M.ESParticleSystemPrimitive=ic,M.ESPath=ja,M.ESPathImpl=js,M.ESPipeFence=ac,M.ESPipeline=Qd,M.ESPipeserTileset=qd,M.ESPit=Ya,M.ESPlayer=Ja,M.ESPoi2D=Ol,M.ESPoi3D=Md,M.ESPoiTileset=sg,M.ESPolygonFence=uc,M.ESPolygonFlattenedPlane=bd,M.ESPolygonWithHole=Hd,M.ESRectangle=Wd,M.ESRtsFeatureEditing=ng,M.ESRtsTileset=rg,M.ESScale=og,M.ESSceneObject=ft,M.ESSceneObjectWithId=y_,M.ESSeparateFoliage=Nd,M.ESSkylineAnalysis=mg,M.ESStaticMesh=vg,M.ESSubmergingAnalysis=xd,M.ESSunshineAnalysis=Td,M.ESSurfaceAreaMeasurement=Xd,M.ESTerrainLayer=Ad,M.ESTestObject=ud,M.ESTextLabel=Ba,M.ESUEWidget=Od,M.ESUnrealActor=Dd,M.ESVideoFusion=Ld,M.ESViewShed=Rd,M.ESViewer=vi,M.ESViewerStatusBar=dg,M.ESViewerStatusBarScale=gg,M.ESVisibilityAnalysis=Kd,M.ESVisualObject=ee,M.ESVolumeMeasurement=$d,M.ESWidget=Fd,M.EngineObject=oo,M.EnumProperty=Tt,M.EnumStringsProperty=Ky,M.EvalStringProperty=Cs,M.Event=H,M.EventListenerHandler=Tc,M.FunctionProperty=mt,M.GroupPropTreeItem=nd,M.GroupProperty=vt,M.JsonProperty=ht,M.LeafPropTreeItem=rd,M.ListenerPipe=xc,M.LongStringProperty=Dc,M.MaximumScreenSpaceErrorProperty=Ay,M.MinmaxProperty=$y,M.NearFarScalerProperty=Zy,M.NextAnimateFrameEvent=Xg,M.NonreactiveJsonStringProperty=Qg,M.Number2Property=We,M.Number2sProperty=Jg,M.Number3Property=pr,M.Number3sProperty=Oc,M.Number4Property=$n,M.Number4WithUndefinedProperty=Vy,M.Number4sProperty=Uy,M.NumberProperty=R,M.NumberRangeProperty=t_,M.NumberSliderProperty=je,M.NumbersProperty=Oy,M.ObjPool=Mc,M.ObservableSet=jl,M.ParamsProperty=jg,M.PickedInfo=n_,M.Player=Zn,M.PlayerProperty=Ql,M.PositionProperty=ra,M.PositionsProperty=Kg,M.PositionsSetPropety=r_,M.PropTree=Sm,M.PropUiTreeManager=Ha,M.Property=Ss,M.ReactVarProperty=Ot,M.RotationProperty=Lc,M.SceneObjectFromId=Gc,M.SceneTree=Tl,M.SceneTreeContextMenu=Nm,M.SceneTreeItem=Ir,M.SceneTreeItemDragDrop=bm,M.SmartListenerHandler=Tu,M.SmartListenerPipe=Ey,M.SmoothMoveController=M2,M.String2Property=Ly,M.String2sProperty=Yg,M.String3Property=Ry,M.String3sProperty=Gy,M.String4Property=Fy,M.String4sProperty=ky,M.StringNumberProperty=Yy,M.StringNumbersProperty=Jy,M.StringProperty=Et,M.StringsProperty=Bg,M.TreeItemDragDrop=ip,M.UriProperty=Au,M.ViewPlayerProperty=$g,M.ViewerCustomInteraction=ay,M.Watcher=Ou,M.WatcherTools=up,M.WithUndefinedProperty=Ac,M.addTreesCallFunc=Dm,M.animateFrame=Py,M.bindCustomEditing=ap,M.booleanPointInPolygon=s2,M.cartesianDistance=Em,M.clamp0_360=na,M.clampN180_180=op,M.createEventsCallFunc=ea,M.createPropTreeFromSceneObject=Cm,M.cutDownTreesCallFunc=Fm,M.defaultInitSceneObjectOnCreatingFunc=l_,M.defaultLight122FromEnvironmentMapManager=ad,M.defaultUpdateSceneObjectOnPickingFunc=u_,M.destroyObject=Gg,M.downloadLink=Ny,M.equalsN3=sd,M.geoAlong=o2,M.geoArea=$f,M.geoBuffer=vm,M.geoCenterOfMass=a2,M.geoDestination=fm,M.geoDifference=mm,M.geoDistance=Qh,M.geoHeading=Nl,M.geoIntersect=gm,M.geoLineIntersect=u2,M.geoNearestPointOnLine=h2,M.geoPointToLineDistance=c2,M.geoPolygonFromCircle=ym,M.geoPolygonOverlap=Zf,M.geoRhumbDestination=f2,M.geoRhumbDistance=dm,M.geoRhumbHeading=d2,M.geoUnion=pm,M.getDefaultValue=d_,M.getDistancesFromPositions=xl,M.getGeoBoundingSphereFromPositions=wm,M.getMidpoint=l2,M.getMinMaxCorner=_m,M.getSceneObjectTreeItem=h_,M.getXyzFromPostion=td,M.growthSimulationCallFunc=Gm,M.hasSameTags=sp,M.hasSameViewerTags=$i,M.inOrderRunning=g_,M.interval=Sy,M.isJSON=Rc,M.isXML=f_,M.lbhToWebMerc=wC,M.lbhToXyz=bi,M.lerpAngle=$l,M.lerpRotation=Fc,M.map=Pm,M.nextAnimateFrame=Hg,M.nextMicroTask=Iy,M.oneTimeWarning=Wg,M.optionsStr=L2,M.reactPosition2Ds=id,M.registerCreatedEventUpdate=g2,M.registerEventCtor=kg,M.registerEventUpdate=p2,M.removeAllTreesCallFunc=Lm,M.rpToap=c_,M.saveOnBrowser=by,M.setSceneObjectTreeItem=Kl,M.timeout=Cy,M.updateTreeParamsCallFunc=Rm,M.webMercToLbh=EC,M.xyzToLbh=n0,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({},xbsj_base);
|
|
493
|
+
`,MM='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',bM='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Ko=class Ko extends st{constructor(t){super();const e=()=>{const r=this.dv(new rc);this.d(p.track([r,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{r.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),r.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(r),this.d(()=>t.delete(r)),r.instanceClass=class extends st{constructor(o,a,u){super();g(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const v=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};v(),this.d(a.showChanged.don(v))}let l,c,h,f,d;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",l=document.createElement("div"),this._div.appendChild(l),l.style.width="auto",l.style.position="absolute",l.style.left="50%",l.style.top="50%",l.style.transform="translate(-50%,-50%)",l.style.background="rgba(120, 120, 0, 0.7)",l.style.color="white",l.style.fontSize="10px",l.style.background="none",l.style.display="flex",l.style.justifyContent="center",l.style.alignItems="center",c=document.createElement("div"),l.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Ko.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),l.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",f=document.createElement("div"),h.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",d=document.createElement("div"),h.appendChild(d),d.style.fontWeight="400",d.style.textShadow="0 0 2px black";{const v=()=>{let E="Raw";u.status==="Raw"?E="初始状态":u.status==="Creating"?E="正在创建":u.status==="Created"?E="创建完成":u.status==="Error"?E="创建失败":u.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${u.status})`,d.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(c.innerHTML=Ko.defaultsSvg.loadingSvg),u.status==="Created"&&(c.innerHTML=Ko.defaultsSvg.successSvg),u.status==="Error"&&(c.innerHTML=Ko.defaultsSvg.warnSvg)};v();const _=this.dv(p.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(_.don(v))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};g(Ko,"defaultsSvg",{loadingSvg:IM,successSvg:MM,warnSvg:bM});let Pg=Ko;class NM extends st{constructor(t,e,r){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=r;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const c=o.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};a(),this.d(o.zIndexChanged.don(a));const u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function cc(n){let t=p.getExtProp(n,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",n.appendChild(t),p.setExtProp(n,"_relativeContainer",t)),t}class xM extends st{constructor(e,r){super();g(this,"_subContainer",document.createElement("div"));g(this,"_overlayContainer",document.createElement("div"));g(this,"_containerStyleController");this._container=e,this._viewer=r,this._containerStyleController=this.dv(new NM(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),cc(this._container).appendChild(i),this.d(()=>cc(this._container).removeChild(i)),cc(this._container).appendChild(s),this.d(()=>cc(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class TM extends st{constructor(){super(...arguments);g(this,"registerObjsMap",new Map)}register(e,r){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,r),e}getViewerConstructor(e){const r=this.registerObjsMap.get(e);if(!r){console.warn(`未找到${e}类!`);return}return r}createViewer(e){const r=e.type;console.log(e);const i=this.getViewerConstructor(r);if(!i)throw new Error(`没有找到类型为${r}的Viewer构造器!`);return new i(e)}}class ay extends st{constructor(t,e,r=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(p.DomElementEvent.create(e,"pointerdown")),o=this.dv(p.DomElementEvent.create(e,"pointermove")),a=this.dv(p.DomElementEvent.create(e,"pointerup")),u=this.dv(p.DomElementEvent.create(e,"pointerout")),l=this.dv(p.DomElementEvent.create(e,"pointerover")),c=this.dv(new p.PointerClick),h=this.dv(new p.PointerHover),f=()=>{const m=this._viewer.hoverTime*1e3;h.delayTime=m};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(m=>c.pointerDown(m))),this.d(o.don(m=>c.pointerMove(m))),this.d(a.don(m=>c.pointerUp(m))),this.d(u.don(m=>c.pointerOut(m))),this.d(s.don(m=>h.pointerDown(m))),this.d(o.don(m=>h.pointerMove(m))),this.d(a.don(m=>h.pointerUp(m))),this.d(u.don(m=>h.pointerOut(m)));const{x:d,y:v}=e.getBoundingClientRect(),_=i?d:0,E=i?v:0;this.d(h.hoverEvent.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.hoverEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(c.clickEvent.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.clickEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(c.dbclickEvent.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(s.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(a.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(o.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerMoveEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(l.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerOverEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})})),this.d(u.don(m=>{const[S,C]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerOutEvent.emit({screenPosition:[S+_,C+E],pointerEvent:m})}));const P=this.dv(p.DomElementEvent.create(e,"keydown"));this.d(P.don(m=>this._viewer.keyDownEvent.emit(m)));const y=this.dv(p.DomElementEvent.create(e,"keyup"));this.d(y.don(m=>this._viewer.keyUpEvent.emit(m)));const w=this.dv(p.DomElementEvent.create(e,"wheel"));this.d(w.don(m=>this._viewer.wheelEvent.emit(m)))}}class AM extends st{constructor(e){super();g(this,"viewer");const r=this.viewer=e;this.ad(new p.ObjResettingWithEvent(r.rollerShutterChanged,()=>{const i=r.container;if(!i||!r.rollerShutter)return;const s=new st;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const r=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",r)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",r)}),e}}class OM extends st{constructor(e){super();g(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new AM(e))}}const Es=class Es extends st{constructor(e){super();g(this,"_forceRecreateEvent",this.dv(new H));g(this,"_container",this.dv(p.react(void 0)));g(this,"_containerSize",this.dv(p.react(void 0)));g(this,"_editingEvent",this.disposeVar(new H));g(this,"_status",this.dv(p.react("Raw")));g(this,"_statusLog",this.dv(p.react("")));g(this,"_statusContainer",this.dv(new Pg(this)));g(this,"_useCustomInteraction",this.dv(p.react(!0)));g(this,"_resetInteractionEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));g(this,"_interactionResetting",this.dv(new p.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new ay(this,this.container)})));g(this,"_viewerChanged",this.dv(new H));g(this,"_cameraChanged",this.dv(new H));g(this,"_containerResetEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));g(this,"_containerResetting",this.dv(new p.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new xM(this.container,this)})));g(this,"_sceneObjectsMap",new Map);g(this,"_id");g(this,"_typeName");g(this,"_updateFuncReact",this.dv(p.react(void 0)));g(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));g(this,"_statusInfo",Es.defaults.statusInfo);g(this,"_navigationMode",this.dv(p.react("Map")));g(this,"_syncViewer",this.dv(p.react(void 0)));g(this,"_syncEventDon",this.dv(new p.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new PM(this,e)})));g(this,"_timeSyncdon",this.dv(new p.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new CM(this)})));g(this,"_hoverEvent",this.dv(new H));g(this,"_pointerOverEvent",this.dv(new H));g(this,"_pointerMoveEvent",this.dv(new H));g(this,"_pointerDownEvent",this.dv(new H));g(this,"_pointerUpEvent",this.dv(new H));g(this,"_pointerOutEvent",this.dv(new H));g(this,"_clickEvent",this.dv(new H));g(this,"_dblclickEvent",this.dv(new H));g(this,"_keyDownEvent",this.dv(new H));g(this,"_keyUpEvent",this.dv(new H));g(this,"_wheelEvent",this.dv(new H));g(this,"_actived",this.dv(p.react(!1)));this._id=e.id??p.createGuid();const r=ny(e.container);if(r)this._container.value=Cg(r),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{r&&(this.show??!0?r.style.display="block":r.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const l=oo.context.createEngineObject(a,this);l&&i.set(a,l)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||p.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new OM(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const r=document.getElementById(e);r&&r instanceof HTMLDivElement?this._container.value=Cg(r):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Cg(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let r of e)if(!this.has(r)){ft.context.addSceneObject(r);const i=oo.context.createEngineObject(r,this);i&&this._sceneObjectsMap.set(r,i),r.viewerAttached.emit(this)}}delete(...e){for(let r of e)if(this.has(r)){const i=this._sceneObjectsMap.get(r);i&&i.destroy(),ft.context.deleteSceneObject(r),this._sceneObjectsMap.delete(r),r.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return Es.createDefaultProps()}_getJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_setJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(r){console.warn(`时间格式不正确! value: ${e} error: ${r}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new vt(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new vt(r[s],s))}),i}};g(Es,"context",new TM),g(Es,"register",Es.context.register.bind(Es.context)),g(Es,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0]});let vi=Es;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:p.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:p.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:p.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:p.react(void 0),rollerShutter:!1,cameraMovableRegion:p.reactArrayWithUndefined(void 0)}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(vi||(vi={})),p.extendClassProps(vi.prototype,vi.createDefaultProps);function uy(n,t){const e=n._lastCameraInfo;if(e){const r=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),n._lastCameraInfo=void 0,r()})}}const DM=n=>{const t=vi.createCommonProps(),e={};try{Object.keys(t).forEach(r=>{e[r]=n[r]})}catch(r){console.warn(r)}return e},ly=(n,t)=>{const e=vi.createCommonProps();try{Object.keys(e).forEach(r=>{n[r]=t[r]})}catch(r){console.warn(r)}};class LM extends st{constructor(e){super();g(this,"_viewersChanged",this.disposeVar(new H));g(this,"_viewers",new Set);g(this,"_viewersToChange",this.dv(new H));this._sceneObjectsManager=e,this.d(()=>{for(const r of this._viewers)this.destroyViewer(r);this._viewers.clear()}),this.viewers.forEach(r=>{const i=this._sceneObjectsManager.sceneObjects;r.add(...i)}),this.d(()=>{const r=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...r)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((r,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{$i(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),r.forEach(o=>{$i(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,$i(o.devTags,s.devTags)),$i(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((r,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)$i(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),r.forEach(o=>{for(let a of s)$i(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,$i(o.devTags,u.devTags)),$i(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const r=vi.context.createViewer(e);return this._viewers.add(r),this._viewersChanged.emit([],[r]),r}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Qs extends st{constructor(...e){super();g(this,"_drgm",this.dv(new np));g(this,"_sobjm",this.dv(new SM));g(this,"_vrm",this.dv(new LM(this._sobjm)));g(this,"_sceneObjectEditingManager",this.disposeVar(new EM));g(this,"_activeViewer",this.dv(p.react(void 0)));g(this,"_syncOtherViewersToActived",this.dv(p.react(!1)));g(this,"_cmrvm",this.createSceneObjectFromClass(Zh));g(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));g(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});g(this,"_sceneTree",this.dv(new Tl("default",this.dragstartDataMananger,24,this)));g(this,"_propUiTreeManager",this.dv(new Ha(24)));g(this,"_sceneTreeMap",new Map);g(this,"_viewerCreatedEvent",this.dv(new H));g(this,"_lastCameraInfo");g(this,"_lastActiveViewerJson");g(this,"_syncEventDonFunc",this.d(ea([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(r=>{e?r.syncOtherViewer(this.activeViewer):r.syncOtherViewer(void 0)})})));g(this,"_player",this.createSceneObjectFromClass(Ja));g(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));g(this,"_esPlyarAndPathTime",this.dv(new pM(this)));g(this,"_pathAnimationManager",this.dv(new mM(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.values().forEach(r=>r.actived=r===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),r=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:r,name:i},a=this.sceneTree.json,u=this._cmrvm.views,l=[...this._vrm.viewers].map(f=>f.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:a,viewCollection:u,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(r=>{const i=e.viewers.find(s=>s.id===r.id);i&&(r.json=i)})}catch(r){console.error(`ESObjectsManager解析json数据时发生错误! error: ${r}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return yM(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,r=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Tl(e,this.dragstartDataMananger,r,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const r=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=r);const i=this.d(r.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(r),i())}));return r}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,r=!0,i=!0,s=!0){var l;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&r&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?DM(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(c=>c.id===o):[...this.getViewers()].find(c=>c.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),r&&uy(this,a),i&&this._lastActiveViewerJson&&(ly(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===ny(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),r&&uy(this,u),i&&this._lastActiveViewerJson&&(ly(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:r,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:r,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const r={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=r;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let r,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:l,app:c,token:h,viewSync:f,attributeSync:d,destroy:v,id:_}=e[0];r={type:"ESUeViewer",container:u,id:_,options:{uri:l,app:c,token:h}},i={viewSync:f??!0,attributeSync:d??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:l,esmsg:c,viewSync:h,attributeSync:f,id:d,destroy:v}=e[0];r={type:"ESUeViewer",container:u,id:d,options:{ws:l,esmsg:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:l,baseUrl:c,viewSync:h,attributeSync:f,id:d,destroy:v}=e[0];r={type:"ESUeViewer",container:u,id:d,options:{project:l,baseUrl:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:v??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(r={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(r={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(r={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!r)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(r,s,o,a)}createCesiumViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createOpenLayersViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createUeViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?r={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!r)throw new Error("参数错误");return this.createViewer(r)}createSceneObject(e,r){return this._sobjm.createSceneObject(e,r)}createSceneObjectFromUrl(e,r){return this._sobjm.createSceneObjectFromUrl(e,r)}createSceneObjectFromClass(e,r){return this._sobjm.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const r=this._sobjm.deleteSceneObject(e);return e.destroy(),r}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let r of e)r!=this._player&&r!=this._cmrvm&&this.destroySceneObject(r)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}return g(Qs,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),g(Qs,"getEnv",ft.context.getEnv.bind(ft.context)),g(Qs,"setEnv",ft.context.setEnv.bind(ft.context)),(n=>{n.createDefaultProps=()=>({})})(Qs||(Qs={})),p.extendClassProps(Qs.prototype,Qs.createDefaultProps),M.BasePropTreeItem=ed,M.Boolean2Property=zy,M.Boolean2sProperty=Hy,M.Boolean3Property=qy,M.Boolean3sProperty=Xy,M.Boolean4Property=Wy,M.Boolean4sProperty=By,M.BooleanProperty=tt,M.BooleansProperty=Dy,M.ColorProperty=Gt,M.ColorRgbProperty=jy,M.DashPatternProperty=Qy,M.DateProperty=ao,M.DatesProperty=Zg,M.Destroyable=st,M.DoublyLinkedList=zg,M.DragStartDataManager=np,M.ES3DTileset=Wn,M.ESAlarm=ld,M.ESApertureEffect=hd,M.ESAreaMeasurement=cd,M.ESBlastParticleSystem=fd,M.ESBoxClipping=dd,M.ESCameraView=Kh,M.ESCameraViewCollection=Zh,M.ESCameraVisibleRange=gd,M.ESCar=tc,M.ESCityBasePoint=hg,M.ESClassification=ec,M.ESClippingPlane=pd,M.ESCustomDiv=rc,M.ESCzml=cg,M.ESDataMesh=vd,M.ESDatasmithRuntimeModel=Bd,M.ESDirectionMeasurement=Gd,M.ESDistanceMeasurement=md,M.ESDynamicWater=Yd,M.ESEntityCluster=ug,M.ESExcavate=Al,M.ESFeatureLayer=Sg,M.ESFireParticleSystem=yd,M.ESForestTileset=_d,M.ESGaussianSplatting=pg,M.ESGeoDiv=wd,M.ESGeoDivTextPoi=lg,M.ESGeoExtrudedPolygon=Do,M.ESGeoJson=Dl,M.ESGeoLineString=ps,M.ESGeoPoints=Gl,M.ESGeoPolygon=oe,M.ESGeoRectangle=Ed,M.ESGeoVector=Rt,M.ESGeoWater=Jd,M.ESGltfModel=Js,M.ESHeatMap=lc,M.ESHeightLimitAnalysis=ag,M.ESHeightMeasurement=kd,M.ESHole=tg,M.ESHuman=Oo,M.ESHumanPoi=Zd,M.ESImageLabel=nc,M.ESImageryLayer=Cd,M.ESJEditingMode=ct,M.ESJLonLatFormat=tp,M.ESJPickedResult=i_,M.ESLabel=yn,M.ESLevelRuntimeModel=jd,M.ESLocalCircle=Vd,M.ESLocalPolygon=Ll,M.ESLocalPolygonZ=Ud,M.ESLocalRectangle=zd,M.ESLocalSkyBox=Pd,M.ESLocalVector=Xa,M.ESLocalVector2D=gs,M.ESLocationMeasurement=Id,M.ESMsTileset=ig,M.ESNavigator=fg,M.ESObjectWithLocation=dt,M.ESObjectsManager=Qs,M.ESParticleSystemPrimitive=ic,M.ESPath=ja,M.ESPathImpl=js,M.ESPipeFence=ac,M.ESPipeline=Qd,M.ESPipeserTileset=qd,M.ESPit=Ya,M.ESPlayer=Ja,M.ESPoi2D=Ol,M.ESPoi3D=Md,M.ESPoiTileset=sg,M.ESPolygonFence=uc,M.ESPolygonFlattenedPlane=bd,M.ESPolygonWithHole=Hd,M.ESRectangle=Wd,M.ESRtsFeatureEditing=ng,M.ESRtsTileset=rg,M.ESScale=og,M.ESSceneObject=ft,M.ESSceneObjectWithId=y_,M.ESSeparateFoliage=Nd,M.ESSkylineAnalysis=mg,M.ESStaticMesh=vg,M.ESSubmergingAnalysis=xd,M.ESSunshineAnalysis=Td,M.ESSurfaceAreaMeasurement=Xd,M.ESTerrainLayer=Ad,M.ESTestObject=ud,M.ESTextLabel=Ba,M.ESUEWidget=Od,M.ESUnrealActor=Dd,M.ESVideoFusion=Ld,M.ESViewShed=Rd,M.ESViewer=vi,M.ESViewerStatusBar=dg,M.ESViewerStatusBarScale=gg,M.ESVisibilityAnalysis=Kd,M.ESVisualObject=ee,M.ESVolumeMeasurement=$d,M.ESWidget=Fd,M.EngineObject=oo,M.EnumProperty=Tt,M.EnumStringsProperty=Ky,M.EvalStringProperty=Cs,M.Event=H,M.EventListenerHandler=Tc,M.FunctionProperty=mt,M.GroupPropTreeItem=nd,M.GroupProperty=vt,M.JsonProperty=ht,M.LeafPropTreeItem=rd,M.ListenerPipe=xc,M.LongStringProperty=Dc,M.MaximumScreenSpaceErrorProperty=Ay,M.MinmaxProperty=$y,M.NearFarScalerProperty=Zy,M.NextAnimateFrameEvent=Xg,M.NonreactiveJsonStringProperty=Qg,M.Number2Property=We,M.Number2sProperty=Jg,M.Number3Property=pr,M.Number3sProperty=Oc,M.Number4Property=$n,M.Number4WithUndefinedProperty=Vy,M.Number4sProperty=Uy,M.NumberProperty=R,M.NumberRangeProperty=t_,M.NumberSliderProperty=je,M.NumbersProperty=Oy,M.ObjPool=Mc,M.ObservableSet=jl,M.ParamsProperty=jg,M.PickedInfo=n_,M.Player=Zn,M.PlayerProperty=Ql,M.PositionProperty=ra,M.PositionsProperty=Kg,M.PositionsSetPropety=r_,M.PropTree=Sm,M.PropUiTreeManager=Ha,M.Property=Ss,M.ReactVarProperty=Ot,M.RotationProperty=Lc,M.SceneObjectFromId=Gc,M.SceneTree=Tl,M.SceneTreeContextMenu=Nm,M.SceneTreeItem=Ir,M.SceneTreeItemDragDrop=bm,M.SmartListenerHandler=Tu,M.SmartListenerPipe=Ey,M.SmoothMoveController=M2,M.String2Property=Ly,M.String2sProperty=Yg,M.String3Property=Ry,M.String3sProperty=Gy,M.String4Property=Fy,M.String4sProperty=ky,M.StringNumberProperty=Yy,M.StringNumbersProperty=Jy,M.StringProperty=Et,M.StringsProperty=Bg,M.TreeItemDragDrop=ip,M.UriProperty=Au,M.ViewPlayerProperty=$g,M.ViewerCustomInteraction=ay,M.Watcher=Ou,M.WatcherTools=up,M.WithUndefinedProperty=Ac,M.addTreesCallFunc=Dm,M.animateFrame=Py,M.bindCustomEditing=ap,M.booleanPointInPolygon=s2,M.cartesianDistance=Em,M.clamp0_360=na,M.clampN180_180=op,M.createEventsCallFunc=ea,M.createPropTreeFromSceneObject=Cm,M.cutDownTreesCallFunc=Fm,M.defaultInitSceneObjectOnCreatingFunc=l_,M.defaultLight122FromEnvironmentMapManager=ad,M.defaultUpdateSceneObjectOnPickingFunc=u_,M.destroyObject=Gg,M.downloadLink=Ny,M.equalsN3=sd,M.geoAlong=o2,M.geoArea=$f,M.geoBuffer=vm,M.geoCenterOfMass=a2,M.geoDestination=fm,M.geoDifference=mm,M.geoDistance=Qh,M.geoHeading=Nl,M.geoIntersect=gm,M.geoLineIntersect=u2,M.geoNearestPointOnLine=h2,M.geoPointToLineDistance=c2,M.geoPolygonFromCircle=ym,M.geoPolygonOverlap=Zf,M.geoRhumbDestination=f2,M.geoRhumbDistance=dm,M.geoRhumbHeading=d2,M.geoUnion=pm,M.getDefaultValue=d_,M.getDistancesFromPositions=xl,M.getGeoBoundingSphereFromPositions=wm,M.getMidpoint=l2,M.getMinMaxCorner=_m,M.getSceneObjectTreeItem=h_,M.getXyzFromPostion=td,M.growthSimulationCallFunc=Gm,M.hasSameTags=sp,M.hasSameViewerTags=$i,M.inOrderRunning=g_,M.interval=Sy,M.isJSON=Rc,M.isXML=f_,M.lbhToWebMerc=wC,M.lbhToXyz=bi,M.lerpAngle=$l,M.lerpRotation=Fc,M.map=Pm,M.nextAnimateFrame=Hg,M.nextMicroTask=Iy,M.oneTimeWarning=Wg,M.optionsStr=L2,M.reactPosition2Ds=id,M.registerCreatedEventUpdate=g2,M.registerEventCtor=kg,M.registerEventUpdate=p2,M.removeAllTreesCallFunc=Lm,M.rpToap=c_,M.saveOnBrowser=by,M.setSceneObjectTreeItem=Kl,M.timeout=Cy,M.updateTreeParamsCallFunc=Rm,M.webMercToLbh=EC,M.xyzToLbh=n0,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({},xbsj_base);
|