vis-core 0.30.0-beta.15 → 0.30.0-beta.16

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/index.d.ts CHANGED
@@ -8,4 +8,4 @@ export * as animationUtils from './utils/animation';
8
8
  export declare const access: {
9
9
  token: string;
10
10
  };
11
- export declare const VERSION = "0.30.0-beta.15";
11
+ export declare const VERSION = "0.30.0-beta.16";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(".-translate-x-1\\/2,.-translate-y-1\\/2,.transform{--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1 }.shadow{--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.ring{--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.invert,.filter{--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: }.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.whitespace-nowrap{white-space:nowrap}.text-center{text-align:center}.text-sm{font-size:14px;line-height:20px}.leading-\\[1\\]{line-height:1}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-opacity-80{--tw-text-opacity: .8 }.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- "use strict";var Un=Object.defineProperty,Bn=Object.defineProperties;var Dn=Object.getOwnPropertyDescriptors;var An=Object.getOwnPropertySymbols,On=Object.getPrototypeOf,Jn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Qn=Reflect.get;var Rn=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),$n=v=>{throw TypeError(v)},xn=Math.pow,Fn=(v,e,r)=>e in v?Un(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,$0=(v,e)=>{for(var r in e||(e={}))Jn.call(e,r)&&Fn(v,r,e[r]);if(An)for(var r of An(e))jn.call(e,r)&&Fn(v,r,e[r]);return v},Ji=(v,e)=>Bn(v,Dn(e));var v0=(v,e,r)=>Fn(v,typeof e!="symbol"?e+"":e,r);var Ln=(v,e,r)=>Qn(On(v),r,e);var K0=(v,e,r)=>new Promise((o,V)=>{var O=fe=>{try{le(r.next(fe))}catch(Se){V(Se)}},j=fe=>{try{le(r.throw(fe))}catch(Se){V(Se)}},le=fe=>fe.done?o(fe.value):Promise.resolve(fe.value).then(O,j);le((r=r.apply(v,e)).next())}),qn=function(v,e){this[0]=v,this[1]=e};var Kn=v=>{var e=v[Rn("asyncIterator")],r=!1,o,V={};return e==null?(e=v[Rn("iterator")](),o=O=>V[O]=j=>e[O](j)):(e=e.call(v),o=O=>V[O]=j=>{if(r){if(r=!1,O==="throw")throw j;return j}return r=!0,{done:!1,value:new qn(new Promise(le=>{var fe=e[O](j);fe instanceof Object||$n("Object expected"),le(fe)}),1)}}),V[Rn("iterator")]=()=>V,o("next"),"throw"in e?o("throw"):V.throw=O=>{throw O},"return"in e&&o("return"),V},kn=(v,e,r)=>(e=v[Rn("asyncIterator")])?e.call(v):(v=v[Rn("iterator")](),e={},r=(o,V)=>(V=v[o])&&(e[o]=O=>new Promise((j,le,fe)=>(O=V.call(v,O),fe=O.done,Promise.resolve(O.value).then(Se=>j({value:Se,done:fe}),le)))),r("next"),r("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsrsasign=require("jsrsasign"),CryptoJS=require("crypto-js"),esusLite=require("esus-lite"),events=require("events"),world$1=require("geojson-cn/json/0.json"),json100000Lite=require("geojson-cn/json-lite/100000.json"),json100000=require("geojson-cn/json/100000.json"),adcodeAll=require("geojson-cn/json-lite/all.json"),turf=require("@turf/turf"),geojsonCn=require("geojson-cn");Array.prototype.at||(Array.prototype.at=function(v){return v<0&&(v=this.length+v),this[v]});const version="0.30.0-beta.15",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,r]=this.token.split(":::"),o=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),V=CryptoJS.enc.Base64.parse(e),O=CryptoJS.enc.Base64.parse(r),j=CryptoJS.lib.WordArray.create(V.words.slice(0,4)),le=CryptoJS.lib.WordArray.create(V.words.slice(4)),fe=jsrsasign.KJUR.crypto.Util.hashHex(V.toString(),"sha256"),Se=o.verifyWithMessageHashPSS(fe,jsrsasign.b64tohex(v),"sha256",32);if(!Se)return this.token=void 0,"";const Re=CryptoJS.AES.decrypt({ciphertext:le},O,{iv:j,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),Pe=JSON.parse(Re),Ne=Date.now();return!Pe.s||Pe.s>Ne?(this.token=void 0,""):Pe.e&&Pe.e<Ne?(this.token=void 0,""):(Pe.isValid=Se,Pe)}};var Easing=Object.freeze({Linear:Object.freeze({None:function(v){return v},In:function(v){return v},Out:function(v){return v},InOut:function(v){return v}}),Quadratic:Object.freeze({In:function(v){return v*v},Out:function(v){return v*(2-v)},InOut:function(v){return(v*=2)<1?.5*v*v:-.5*(--v*(v-2)-1)}}),Cubic:Object.freeze({In:function(v){return v*v*v},Out:function(v){return--v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v:.5*((v-=2)*v*v+2)}}),Quartic:Object.freeze({In:function(v){return v*v*v*v},Out:function(v){return 1- --v*v*v*v},InOut:function(v){return(v*=2)<1?.5*v*v*v*v:-.5*((v-=2)*v*v*v-2)}}),Quintic:Object.freeze({In:function(v){return v*v*v*v*v},Out:function(v){return--v*v*v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v*v*v:.5*((v-=2)*v*v*v*v+2)}}),Sinusoidal:Object.freeze({In:function(v){return 1-Math.sin((1-v)*Math.PI/2)},Out:function(v){return Math.sin(v*Math.PI/2)},InOut:function(v){return .5*(1-Math.sin(Math.PI*(.5-v)))}}),Exponential:Object.freeze({In:function(v){return v===0?0:Math.pow(1024,v-1)},Out:function(v){return v===1?1:1-Math.pow(2,-10*v)},InOut:function(v){return v===0?0:v===1?1:(v*=2)<1?.5*Math.pow(1024,v-1):.5*(-Math.pow(2,-10*(v-1))+2)}}),Circular:Object.freeze({In:function(v){return 1-Math.sqrt(1-v*v)},Out:function(v){return Math.sqrt(1- --v*v)},InOut:function(v){return(v*=2)<1?-.5*(Math.sqrt(1-v*v)-1):.5*(Math.sqrt(1-(v-=2)*v)+1)}}),Elastic:Object.freeze({In:function(v){return v===0?0:v===1?1:-Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI)},Out:function(v){return v===0?0:v===1?1:Math.pow(2,-10*v)*Math.sin((v-.1)*5*Math.PI)+1},InOut:function(v){return v===0?0:v===1?1:(v*=2,v<1?-.5*Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI):.5*Math.pow(2,-10*(v-1))*Math.sin((v-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(v){var e=1.70158;return v===1?1:v*v*((e+1)*v-e)},Out:function(v){var e=1.70158;return v===0?0:--v*v*((e+1)*v+e)+1},InOut:function(v){var e=2.5949095;return(v*=2)<1?.5*(v*v*((e+1)*v-e)):.5*((v-=2)*v*((e+1)*v+e)+2)}}),Bounce:Object.freeze({In:function(v){return 1-Easing.Bounce.Out(1-v)},Out:function(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375},InOut:function(v){return v<.5?Easing.Bounce.In(v*2)*.5:Easing.Bounce.Out(v*2-1)*.5+.5}}),generatePow:function(v){return v===void 0&&(v=4),v=v<Number.EPSILON?Number.EPSILON:v,v=v>1e4?1e4:v,{In:function(e){return Math.pow(e,v)},Out:function(e){return 1-Math.pow(1-e,v)},InOut:function(e){return e<.5?Math.pow(e*2,v)/2:(1-Math.pow(2-e*2,v))/2+.5}}}}),now=function(){return performance.now()},Group$1=function(){function v(){this._tweens={},this._tweensAddedDuringUpdate={}}return v.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},v.prototype.removeAll=function(){this._tweens={}},v.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},v.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},v.prototype.update=function(e,r){e===void 0&&(e=now()),r===void 0&&(r=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var V=0;V<o.length;V++){var O=this._tweens[o[V]],j=!r;O&&O.update(e,j)===!1&&!r&&delete this._tweens[o[V]]}o=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),O=Interpolation.Utils.Linear;return e<0?O(v[0],v[1],o):e>1?O(v[r],v[r-1],r-o):O(v[V],v[V+1>r?r:V+1],o-V)},Bezier:function(v,e){for(var r=0,o=v.length-1,V=Math.pow,O=Interpolation.Utils.Bernstein,j=0;j<=o;j++)r+=V(1-e,o-j)*V(e,j)*v[j]*O(o,j);return r},CatmullRom:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),O=Interpolation.Utils.CatmullRom;return v[0]===v[r]?(e<0&&(V=Math.floor(o=r*(1+e))),O(v[(V-1+r)%r],v[V],v[(V+1)%r],v[(V+2)%r],o-V)):e<0?v[0]-(O(v[0],v[0],v[1],v[1],-o)-v[0]):e>1?v[r]-(O(v[r],v[r],v[r-1],v[r-1],o-r)-v[r]):O(v[V?V-1:0],v[V],v[r<V+1?r:V+1],v[r<V+2?r:V+2],o-V)},Utils:{Linear:function(v,e,r){return(e-v)*r+v},Bernstein:function(v,e){var r=Interpolation.Utils.Factorial;return r(v)/r(e)/r(v-e)},Factorial:function(){var v=[1];return function(e){var r=1;if(v[e])return v[e];for(var o=e;o>1;o--)r*=o;return v[e]=r,r}}(),CatmullRom:function(v,e,r,o,V){var O=(r-v)*.5,j=(o-e)*.5,le=V*V,fe=V*le;return(2*e-2*r+O+j)*fe+(-3*e+3*r-2*O-j)*le+O*V+e}}},Sequence=function(){function v(){}return v.nextId=function(){return v._nextId++},v._nextId=0,v}(),mainGroup=new Group$1,Tween=function(){function v(e,r){r===void 0&&(r=mainGroup),this._object=e,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Easing.Linear.None,this._interpolationFunction=Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Sequence.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return v.prototype.getId=function(){return this._id},v.prototype.isPlaying=function(){return this._isPlaying},v.prototype.isPaused=function(){return this._isPaused},v.prototype.getDuration=function(){return this._duration},v.prototype.to=function(e,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},v.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},v.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},v.prototype.start=function(e,r){if(e===void 0&&(e=now()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var V={};for(var O in this._valuesEnd)V[O]=this._valuesEnd[O];this._valuesEnd=V}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,r,o,V,O){for(var j in o){var le=e[j],fe=Array.isArray(le),Se=fe?"array":typeof le,Ce=!fe&&Array.isArray(o[j]);if(!(Se==="undefined"||Se==="function")){if(Ce){var Re=o[j];if(Re.length===0)continue;for(var Pe=[le],Ne=0,Fe=Re.length;Ne<Fe;Ne+=1){var Gt=this._handleRelativeValue(le,Re[Ne]);if(isNaN(Gt)){Ce=!1,console.warn("Found invalid interpolation list. Skipping.");break}Pe.push(Gt)}Ce&&(o[j]=Pe)}if((Se==="object"||fe)&&le&&!Ce){r[j]=fe?[]:{};var xt=le;for(var ze in xt)r[j][ze]=xt[ze];V[j]=fe?[]:{};var Re=o[j];if(!this._isDynamic){var ke={};for(var ze in Re)ke[ze]=Re[ze];o[j]=Re=ke}this._setupProperties(xt,r[j],Re,V[j],O)}else(typeof r[j]=="undefined"||O)&&(r[j]=le),fe||(r[j]*=1),Ce?V[j]=o[j].slice().reverse():V[j]=r[j]||0}}},v.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},v.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},v.prototype.pause=function(e){return e===void 0&&(e=now()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},v.prototype.resume=function(e){return e===void 0&&(e=now()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},v.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},v.prototype.group=function(e){return e===void 0&&(e=mainGroup),this._group=e,this},v.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},v.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},v.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},v.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},v.prototype.easing=function(e){return e===void 0&&(e=Easing.Linear.None),this._easingFunction=e,this},v.prototype.interpolation=function(e){return e===void 0&&(e=Interpolation.Linear),this._interpolationFunction=e,this},v.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},v.prototype.onStart=function(e){return this._onStartCallback=e,this},v.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},v.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},v.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},v.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},v.prototype.onStop=function(e){return this._onStopCallback=e,this},v.prototype.update=function(e,r){var o;if(e===void 0&&(e=now()),r===void 0&&(r=!0),this._isPaused)return!0;var V=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>V)return!1;r&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var O=e-this._startTime,j=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),le=this._duration+this._repeat*j,fe=this._calculateElapsedPortion(O,j,le),Se=this._easingFunction(fe),Ce=this._calculateCompletionStatus(O,j);if(Ce==="repeat"&&this._processRepetition(O,j),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,Se),Ce==="about-to-repeat"&&this._processRepetition(O,j),this._onUpdateCallback&&this._onUpdateCallback(this._object,fe),Ce==="repeat"||Ce==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Ce==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var Re=0,Pe=this._chainedTweens.length;Re<Pe;Re++)this._chainedTweens[Re].start(this._startTime+this._duration,!1)}return Ce!=="completed"},v.prototype._calculateElapsedPortion=function(e,r,o){if(this._duration===0||e>o)return 1;var V=e%r,O=Math.min(V/this._duration,1);return O===0&&e!==0&&e%this._duration===0?1:O},v.prototype._calculateCompletionStatus=function(e,r){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,r){var o=Math.min(Math.trunc((e-this._duration)/r)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=o);for(var V in this._valuesStartRepeat){var O=this._valuesEnd[V];!this._yoyo&&typeof O=="string"&&(this._valuesStartRepeat[V]=this._valuesStartRepeat[V]+parseFloat(O)),this._yoyo&&this._swapEndStartRepeatValues(V),this._valuesStart[V]=this._valuesStartRepeat[V]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=r*o},v.prototype._updateProperties=function(e,r,o,V){for(var O in o)if(r[O]!==void 0){var j=r[O]||0,le=o[O],fe=Array.isArray(e[O]),Se=Array.isArray(le),Ce=!fe&&Se;Ce?e[O]=this._interpolationFunction(le,V):typeof le=="object"&&le?this._updateProperties(e[O],j,le,V):(le=this._handleRelativeValue(j,le),typeof le=="number"&&(e[O]=j+(le-j)*V))}},v.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},v.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],o=this._valuesEnd[e];typeof o=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(o):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},v}(),VERSION$1="23.1.2",nextId=Sequence.nextId,TWEEN=mainGroup,getAll=TWEEN.getAll.bind(TWEEN),removeAll=TWEEN.removeAll.bind(TWEEN),add=TWEEN.add.bind(TWEEN),remove=TWEEN.remove.bind(TWEEN),update=TWEEN.update.bind(TWEEN),exports$1={Easing,Group:Group$1,Interpolation,now,Sequence,nextId,Tween,VERSION:VERSION$1,getAll,removeAll,add,remove,update};const tween_esm=Object.freeze(Object.defineProperty({__proto__:null,Easing,Group:Group$1,Interpolation,Sequence,Tween,VERSION:VERSION$1,add,default:exports$1,getAll,nextId,now,remove,removeAll,update},Symbol.toStringTag,{value:"Module"}));/**
2
+ "use strict";var Un=Object.defineProperty,Bn=Object.defineProperties;var Dn=Object.getOwnPropertyDescriptors;var An=Object.getOwnPropertySymbols,On=Object.getPrototypeOf,Jn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Qn=Reflect.get;var Rn=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),$n=v=>{throw TypeError(v)},xn=Math.pow,Fn=(v,e,r)=>e in v?Un(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,$0=(v,e)=>{for(var r in e||(e={}))Jn.call(e,r)&&Fn(v,r,e[r]);if(An)for(var r of An(e))jn.call(e,r)&&Fn(v,r,e[r]);return v},Ji=(v,e)=>Bn(v,Dn(e));var v0=(v,e,r)=>Fn(v,typeof e!="symbol"?e+"":e,r);var Ln=(v,e,r)=>Qn(On(v),r,e);var K0=(v,e,r)=>new Promise((o,V)=>{var O=fe=>{try{le(r.next(fe))}catch(Se){V(Se)}},j=fe=>{try{le(r.throw(fe))}catch(Se){V(Se)}},le=fe=>fe.done?o(fe.value):Promise.resolve(fe.value).then(O,j);le((r=r.apply(v,e)).next())}),qn=function(v,e){this[0]=v,this[1]=e};var Kn=v=>{var e=v[Rn("asyncIterator")],r=!1,o,V={};return e==null?(e=v[Rn("iterator")](),o=O=>V[O]=j=>e[O](j)):(e=e.call(v),o=O=>V[O]=j=>{if(r){if(r=!1,O==="throw")throw j;return j}return r=!0,{done:!1,value:new qn(new Promise(le=>{var fe=e[O](j);fe instanceof Object||$n("Object expected"),le(fe)}),1)}}),V[Rn("iterator")]=()=>V,o("next"),"throw"in e?o("throw"):V.throw=O=>{throw O},"return"in e&&o("return"),V},kn=(v,e,r)=>(e=v[Rn("asyncIterator")])?e.call(v):(v=v[Rn("iterator")](),e={},r=(o,V)=>(V=v[o])&&(e[o]=O=>new Promise((j,le,fe)=>(O=V.call(v,O),fe=O.done,Promise.resolve(O.value).then(Se=>j({value:Se,done:fe}),le)))),r("next"),r("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsrsasign=require("jsrsasign"),CryptoJS=require("crypto-js"),esusLite=require("esus-lite"),events=require("events"),world$1=require("geojson-cn/json/0.json"),json100000Lite=require("geojson-cn/json-lite/100000.json"),json100000=require("geojson-cn/json/100000.json"),adcodeAll=require("geojson-cn/json-lite/all.json"),turf=require("@turf/turf"),geojsonCn=require("geojson-cn");Array.prototype.at||(Array.prototype.at=function(v){return v<0&&(v=this.length+v),this[v]});const version="0.30.0-beta.16",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,r]=this.token.split(":::"),o=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),V=CryptoJS.enc.Base64.parse(e),O=CryptoJS.enc.Base64.parse(r),j=CryptoJS.lib.WordArray.create(V.words.slice(0,4)),le=CryptoJS.lib.WordArray.create(V.words.slice(4)),fe=jsrsasign.KJUR.crypto.Util.hashHex(V.toString(),"sha256"),Se=o.verifyWithMessageHashPSS(fe,jsrsasign.b64tohex(v),"sha256",32);if(!Se)return this.token=void 0,"";const Re=CryptoJS.AES.decrypt({ciphertext:le},O,{iv:j,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),Pe=JSON.parse(Re),Ne=Date.now();return!Pe.s||Pe.s>Ne?(this.token=void 0,""):Pe.e&&Pe.e<Ne?(this.token=void 0,""):(Pe.isValid=Se,Pe)}};var Easing=Object.freeze({Linear:Object.freeze({None:function(v){return v},In:function(v){return v},Out:function(v){return v},InOut:function(v){return v}}),Quadratic:Object.freeze({In:function(v){return v*v},Out:function(v){return v*(2-v)},InOut:function(v){return(v*=2)<1?.5*v*v:-.5*(--v*(v-2)-1)}}),Cubic:Object.freeze({In:function(v){return v*v*v},Out:function(v){return--v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v:.5*((v-=2)*v*v+2)}}),Quartic:Object.freeze({In:function(v){return v*v*v*v},Out:function(v){return 1- --v*v*v*v},InOut:function(v){return(v*=2)<1?.5*v*v*v*v:-.5*((v-=2)*v*v*v-2)}}),Quintic:Object.freeze({In:function(v){return v*v*v*v*v},Out:function(v){return--v*v*v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v*v*v:.5*((v-=2)*v*v*v*v+2)}}),Sinusoidal:Object.freeze({In:function(v){return 1-Math.sin((1-v)*Math.PI/2)},Out:function(v){return Math.sin(v*Math.PI/2)},InOut:function(v){return .5*(1-Math.sin(Math.PI*(.5-v)))}}),Exponential:Object.freeze({In:function(v){return v===0?0:Math.pow(1024,v-1)},Out:function(v){return v===1?1:1-Math.pow(2,-10*v)},InOut:function(v){return v===0?0:v===1?1:(v*=2)<1?.5*Math.pow(1024,v-1):.5*(-Math.pow(2,-10*(v-1))+2)}}),Circular:Object.freeze({In:function(v){return 1-Math.sqrt(1-v*v)},Out:function(v){return Math.sqrt(1- --v*v)},InOut:function(v){return(v*=2)<1?-.5*(Math.sqrt(1-v*v)-1):.5*(Math.sqrt(1-(v-=2)*v)+1)}}),Elastic:Object.freeze({In:function(v){return v===0?0:v===1?1:-Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI)},Out:function(v){return v===0?0:v===1?1:Math.pow(2,-10*v)*Math.sin((v-.1)*5*Math.PI)+1},InOut:function(v){return v===0?0:v===1?1:(v*=2,v<1?-.5*Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI):.5*Math.pow(2,-10*(v-1))*Math.sin((v-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(v){var e=1.70158;return v===1?1:v*v*((e+1)*v-e)},Out:function(v){var e=1.70158;return v===0?0:--v*v*((e+1)*v+e)+1},InOut:function(v){var e=2.5949095;return(v*=2)<1?.5*(v*v*((e+1)*v-e)):.5*((v-=2)*v*((e+1)*v+e)+2)}}),Bounce:Object.freeze({In:function(v){return 1-Easing.Bounce.Out(1-v)},Out:function(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375},InOut:function(v){return v<.5?Easing.Bounce.In(v*2)*.5:Easing.Bounce.Out(v*2-1)*.5+.5}}),generatePow:function(v){return v===void 0&&(v=4),v=v<Number.EPSILON?Number.EPSILON:v,v=v>1e4?1e4:v,{In:function(e){return Math.pow(e,v)},Out:function(e){return 1-Math.pow(1-e,v)},InOut:function(e){return e<.5?Math.pow(e*2,v)/2:(1-Math.pow(2-e*2,v))/2+.5}}}}),now=function(){return performance.now()},Group$1=function(){function v(){this._tweens={},this._tweensAddedDuringUpdate={}}return v.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},v.prototype.removeAll=function(){this._tweens={}},v.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},v.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},v.prototype.update=function(e,r){e===void 0&&(e=now()),r===void 0&&(r=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var V=0;V<o.length;V++){var O=this._tweens[o[V]],j=!r;O&&O.update(e,j)===!1&&!r&&delete this._tweens[o[V]]}o=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),O=Interpolation.Utils.Linear;return e<0?O(v[0],v[1],o):e>1?O(v[r],v[r-1],r-o):O(v[V],v[V+1>r?r:V+1],o-V)},Bezier:function(v,e){for(var r=0,o=v.length-1,V=Math.pow,O=Interpolation.Utils.Bernstein,j=0;j<=o;j++)r+=V(1-e,o-j)*V(e,j)*v[j]*O(o,j);return r},CatmullRom:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),O=Interpolation.Utils.CatmullRom;return v[0]===v[r]?(e<0&&(V=Math.floor(o=r*(1+e))),O(v[(V-1+r)%r],v[V],v[(V+1)%r],v[(V+2)%r],o-V)):e<0?v[0]-(O(v[0],v[0],v[1],v[1],-o)-v[0]):e>1?v[r]-(O(v[r],v[r],v[r-1],v[r-1],o-r)-v[r]):O(v[V?V-1:0],v[V],v[r<V+1?r:V+1],v[r<V+2?r:V+2],o-V)},Utils:{Linear:function(v,e,r){return(e-v)*r+v},Bernstein:function(v,e){var r=Interpolation.Utils.Factorial;return r(v)/r(e)/r(v-e)},Factorial:function(){var v=[1];return function(e){var r=1;if(v[e])return v[e];for(var o=e;o>1;o--)r*=o;return v[e]=r,r}}(),CatmullRom:function(v,e,r,o,V){var O=(r-v)*.5,j=(o-e)*.5,le=V*V,fe=V*le;return(2*e-2*r+O+j)*fe+(-3*e+3*r-2*O-j)*le+O*V+e}}},Sequence=function(){function v(){}return v.nextId=function(){return v._nextId++},v._nextId=0,v}(),mainGroup=new Group$1,Tween=function(){function v(e,r){r===void 0&&(r=mainGroup),this._object=e,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Easing.Linear.None,this._interpolationFunction=Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Sequence.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return v.prototype.getId=function(){return this._id},v.prototype.isPlaying=function(){return this._isPlaying},v.prototype.isPaused=function(){return this._isPaused},v.prototype.getDuration=function(){return this._duration},v.prototype.to=function(e,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},v.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},v.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},v.prototype.start=function(e,r){if(e===void 0&&(e=now()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var V={};for(var O in this._valuesEnd)V[O]=this._valuesEnd[O];this._valuesEnd=V}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,r,o,V,O){for(var j in o){var le=e[j],fe=Array.isArray(le),Se=fe?"array":typeof le,Ce=!fe&&Array.isArray(o[j]);if(!(Se==="undefined"||Se==="function")){if(Ce){var Re=o[j];if(Re.length===0)continue;for(var Pe=[le],Ne=0,Fe=Re.length;Ne<Fe;Ne+=1){var Gt=this._handleRelativeValue(le,Re[Ne]);if(isNaN(Gt)){Ce=!1,console.warn("Found invalid interpolation list. Skipping.");break}Pe.push(Gt)}Ce&&(o[j]=Pe)}if((Se==="object"||fe)&&le&&!Ce){r[j]=fe?[]:{};var xt=le;for(var ze in xt)r[j][ze]=xt[ze];V[j]=fe?[]:{};var Re=o[j];if(!this._isDynamic){var ke={};for(var ze in Re)ke[ze]=Re[ze];o[j]=Re=ke}this._setupProperties(xt,r[j],Re,V[j],O)}else(typeof r[j]=="undefined"||O)&&(r[j]=le),fe||(r[j]*=1),Ce?V[j]=o[j].slice().reverse():V[j]=r[j]||0}}},v.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},v.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},v.prototype.pause=function(e){return e===void 0&&(e=now()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},v.prototype.resume=function(e){return e===void 0&&(e=now()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},v.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},v.prototype.group=function(e){return e===void 0&&(e=mainGroup),this._group=e,this},v.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},v.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},v.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},v.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},v.prototype.easing=function(e){return e===void 0&&(e=Easing.Linear.None),this._easingFunction=e,this},v.prototype.interpolation=function(e){return e===void 0&&(e=Interpolation.Linear),this._interpolationFunction=e,this},v.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},v.prototype.onStart=function(e){return this._onStartCallback=e,this},v.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},v.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},v.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},v.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},v.prototype.onStop=function(e){return this._onStopCallback=e,this},v.prototype.update=function(e,r){var o;if(e===void 0&&(e=now()),r===void 0&&(r=!0),this._isPaused)return!0;var V=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>V)return!1;r&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var O=e-this._startTime,j=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),le=this._duration+this._repeat*j,fe=this._calculateElapsedPortion(O,j,le),Se=this._easingFunction(fe),Ce=this._calculateCompletionStatus(O,j);if(Ce==="repeat"&&this._processRepetition(O,j),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,Se),Ce==="about-to-repeat"&&this._processRepetition(O,j),this._onUpdateCallback&&this._onUpdateCallback(this._object,fe),Ce==="repeat"||Ce==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Ce==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var Re=0,Pe=this._chainedTweens.length;Re<Pe;Re++)this._chainedTweens[Re].start(this._startTime+this._duration,!1)}return Ce!=="completed"},v.prototype._calculateElapsedPortion=function(e,r,o){if(this._duration===0||e>o)return 1;var V=e%r,O=Math.min(V/this._duration,1);return O===0&&e!==0&&e%this._duration===0?1:O},v.prototype._calculateCompletionStatus=function(e,r){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,r){var o=Math.min(Math.trunc((e-this._duration)/r)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=o);for(var V in this._valuesStartRepeat){var O=this._valuesEnd[V];!this._yoyo&&typeof O=="string"&&(this._valuesStartRepeat[V]=this._valuesStartRepeat[V]+parseFloat(O)),this._yoyo&&this._swapEndStartRepeatValues(V),this._valuesStart[V]=this._valuesStartRepeat[V]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=r*o},v.prototype._updateProperties=function(e,r,o,V){for(var O in o)if(r[O]!==void 0){var j=r[O]||0,le=o[O],fe=Array.isArray(e[O]),Se=Array.isArray(le),Ce=!fe&&Se;Ce?e[O]=this._interpolationFunction(le,V):typeof le=="object"&&le?this._updateProperties(e[O],j,le,V):(le=this._handleRelativeValue(j,le),typeof le=="number"&&(e[O]=j+(le-j)*V))}},v.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},v.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],o=this._valuesEnd[e];typeof o=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(o):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},v}(),VERSION$1="23.1.2",nextId=Sequence.nextId,TWEEN=mainGroup,getAll=TWEEN.getAll.bind(TWEEN),removeAll=TWEEN.removeAll.bind(TWEEN),add=TWEEN.add.bind(TWEEN),remove=TWEEN.remove.bind(TWEEN),update=TWEEN.update.bind(TWEEN),exports$1={Easing,Group:Group$1,Interpolation,now,Sequence,nextId,Tween,VERSION:VERSION$1,getAll,removeAll,add,remove,update};const tween_esm=Object.freeze(Object.defineProperty({__proto__:null,Easing,Group:Group$1,Interpolation,Sequence,Tween,VERSION:VERSION$1,add,default:exports$1,getAll,nextId,now,remove,removeAll,update},Symbol.toStringTag,{value:"Module"}));/**
3
3
  * @license
4
4
  * Copyright 2010-2025 Three.js Authors
5
5
  * SPDX-License-Identifier: MIT
@@ -5363,4 +5363,4 @@ version 0.8.2
5363
5363
  <div class="text-white text-opacity-80 text-center leading-[1] text-sm whitespace-nowrap">
5364
5364
  ${v}
5365
5365
  </div>
5366
- `,e},worldPacificCentre=v=>{v.loaderAdd=function(){const e=this.loader;e.add(["/image/map/jianbian.webp"]),e.add(["/image/map/hp2.webp","/image/map/fx2.webp"])},v.initMaterial=function(){return K0(this,null,function*(){const e=this.loader,r=this.mList,o=(()=>{const V=e.getAsset("/image/map/hp2.webp");V.center.set(.5,.5),V.repeat.set(.97,1.01);const O=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp2.webp"),normalMap:e.getAsset("/image/map/fx2.webp"),normalScale:new Vector2(2,1)}),j=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:O,sideMat:j,lineMat:le,extrudeLineMat:v.options.extrudeLine?fe:null}})();r.addMultiple("plane",o)})}},world=v=>{if(v.options.lineOffset=.02,delete v.extendsOptions.handleBackKeepCamvasState,v.extendsOptions.extrudeLine=()=>v.options.extrudeLine,v.extendsOptions.worldPacificCentre=()=>v.options.worldPacificCentre,v.options.worldPacificCentre){worldPacificCentre(v);return}v.initMaterial=function(){return K0(this,null,function*(){const e=this.mList,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:"#0d2425"}),V=new MeshBasicMaterial({name:"侧面",color:"#0d2425"}),O=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),j=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:O,extrudeLineMat:v.options.extrudeLine?j:null}})();e.addMultiple("plane",r)})}},china=v=>{v.options.lineOffset=.005,v.loaderAdd=function(){return K0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp","/image/map/hp.webp","/image/map/shuchu2.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return K0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp.webp"),normalMap:e.getAsset("/image/map/shuchu2.webp")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),O=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),j=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:O,extrudeLineMat:j}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},base$1=v=>{v.loaderAdd=function(){return K0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return K0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:new Color$1("#0d2425")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),O=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),j=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:O,extrudeLineMat:j}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},cityOnMap=v=>{v.extendsOptions={mapDepth:v.options.mapDepth,parentBg:v.options.parentBg,continentsBg:v.options.continentsBg,continentsBgDepth:v.options.continentsBgDepth,mergeSide:v.options.mergeSide,handleBackKeepCamvasState:v.options.handleBackKeepCamvasState,mapBoundary:v.options.mapBoundary,showBuilding:v.options.showBuilding,showRoad:v.options.showRoad,showGrassland:v.options.showGrassland,showRiver:v.options.showRiver,buildingSideGradient:v.options.buildingSideGradient,buildingHasSide:v.options.buildingHasSide,setWaterMaterial:v.options.setWaterMaterial,showCityOnMapInnerLine:v.options.showCityOnMapInnerLine},v.options.parentBg&&(v.extendsOptions.parentBgDepth=()=>v.options.parentBgDepth),v.loaderAdd=function(){this.loader.add(["/image/map2/side.png"])},v.initMaterial=function(){return K0(this,null,function*(){const r=this.loader,o=(()=>{const V=new MeshBasicMaterial({name:"板块顶面",color:"#094253"}),O=new MeshBasicMaterial({name:"板块侧面",map:r.getAsset("/image/map2/side.png"),side:DoubleSide}),j=new kt({name:"板块边框",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1}),le=new kt({name:"板块内线",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1});return{topMat:V,sideMat:O,lineMat:le,extrudeLineMat:j}})();this.mList.addMultiple("plane",o),this.initMaterialBg()})};const e=v.init.bind(v);v.init=function(){return K0(this,null,function*(){yield e(),yield this.initCityOnMap(this.mapInfo.adcode)})}},base=v=>{if(v.initMaterialBg=function(){return K0(this,null,function*(){const e=this.getRoomEnvMap();if(this.options.parentBg){if(this.options.adcode!==1e5){const o=(()=>{const V=new MeshStandardMaterial({name:"父级顶面",color:"#031529",emissive:"#010f1f",envMap:e}),O=new MeshBasicMaterial({name:"父级侧面",color:"#064d73",side:DoubleSide}),j=new kt({name:"父级板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:V,sideMat:O,lineMat:j}})();this.mList.addMultiple("parentPlane",o)}const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",color:"#031529",emissive:"#010f1f",envMap:e}),V=new MeshBasicMaterial({name:"世界侧面",color:"#064d73",side:DoubleSide}),O=new kt({name:"世界板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("worldPlane",r)}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#235278"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),O=new kt({name:"大洲板块线",color:new Color$1("#1488e0"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("continents",r)}})},v.options.style==="map2CityOnMap"){cityOnMap(v);return}v.loaderAdd=function(){return K0(this,null,function*(){this.loaderAddBg()})},v.initMaterial=function(){return K0(this,null,function*(){const e=(()=>{const r=new MeshBasicMaterial({name:"板块顶面",color:new Color$1("#064773")}),o=new MeshBasicMaterial({name:"板块侧面",color:new Color$1("#064d73"),side:DoubleSide}),V=new kt({name:"板块线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1}),O=new kt({name:"板块边框线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1});return{topMat:r,sideMat:o,lineMat:V,extrudeLineMat:O}})();this.mList.addMultiple("plane",e),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.initMaterialBg()})}},getAdcodeShowLevel=(v,e=!0)=>{if(v===0)return"world";if(v===1e5)return"country";if(/^\d{6}$/.test(`${v}`)){const{level:r,parent:o}=findAdcodeInfo(v),V=o&&findAdcodeInfo(o).level;return r==="district"&&V==="province"&&e?"city":r}else if(continentsType.find(r=>r.adcode===v))return"continent"},Mn=class Mn extends Base{constructor(){super(...arguments);v0(this,"leadObjs",objs);v0(this,"mapHistory",[]);v0(this,"activePlaneMap",null);v0(this,"isAnimating",!1);v0(this,"parentBg",[]);v0(this,"continentsBg");v0(this,"group");v0(this,"projection");v0(this,"pcenter",[104,37.5]);v0(this,"pscale",5e4/1e3);v0(this,"meters");v0(this,"cityVis",null);v0(this,"extendsOptions",{mapDepth:()=>this.getOptionsDepth(this.options.adcode),equirectangular:()=>this.options.projectionType==="equirectangular",mapBoundary:()=>this.options.mapBoundary,mergeSide:()=>this.options.mergeSide});v0(this,"initSettingsObj",{label:!1,labelLite:!1,shadowMap:!1});v0(this,"caId");v0(this,"shadowMapLight");v0(this,"planeShadow")}get mapObj(){return this.mapHistory[this.mapHistory.length-1]}get map(){var r;return(r=this.mapObj)==null?void 0:r.map}get mapInfo(){var r;return(r=this.mapObj)==null?void 0:r.mapInfo}get mapArea(){var r;return(r=this.map)==null?void 0:r.areaArr}get mapLine(){var r;return(r=this.map)==null?void 0:r.lineArr}get adcodes(){return this.mapHistory.map(r=>r.mapInfo.adcode)}setOptions(r){r.continentType;const o=$0($0({0:worldExclATAJson,1e5:chinaJson},continentsJson),r==null?void 0:r.geojsonMap);let V=$0({0:worldExclATALiteJson,1e5:chinaLiteJson},continentsLiteJson);Object.keys(o).forEach(O=>{O!=="100000"&&/^\d{6}$/.test(O)&&o[+O].features.forEach(le=>{const fe=le.properties.adcode;V[fe]={type:"FeatureCollection",features:[le]}})}),V=$0($0({},V),r==null?void 0:r.extrudeLineGeojsonMap),super.setOptions(Ji($0({parentBg:!1,continents:"",continentsBg:!1,continentsBgDepth:0,parentBgDepth:0,topSegments:0,clickHandleDrillDown:!1,drillDownSecondLevelMats:!1,drillDownFirstLevelUseBgMats:!1,drillDownThirdLevelMats:!1,clickOusideBack:!0,mapDepth:[1,.4,.2],mapPadding:[100,100,100,100],plateInCenter:!0,drillDownPlateInCenter:!0,drillDownHideParent:!1,showOneLevel:!1,drillDownRestrictions:"district",showDistrict:!0,showLabel:!1,lineWidth:.6,lineOffset:0,extrudeLineWidth:1.8,extrudeLine:!0,equirectangular:!1,winkel3:!1,projectionType:"mercator",polarAngle:r.style==="map2CityOnMap"?Math.PI/180*60:Math.PI/180*120,azimuthAngle:0,handleBackKeepCamvasState:!1,worldPacificCentre:!1,mapBoundary:!0,mergeSide:!1,bottomPlane:!1,bottomPlaneWater:!1,showBuilding:!0,buildingSideGradient:!1,buildingHasSide:!0,showRoad:!0,cacheCity:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,showCityOnMapInnerLine:!1,nearbyCities:!1,citySSAO:!1},r),{geojsonMap:o,extrudeLineGeojsonMap:V})),this.options.equirectangular&&(this.options.projectionType="equirectangular"),this.options.winkel3&&(this.options.projectionType="winkel3"),this.options.adcode===0?this.extendsOptions.winkel3=()=>this.options.winkel3:(this.getAdcodeShowLevel(this.options.adcode)==="province"||this.getAdcodeShowLevel(this.options.adcode)==="country")&&(this.extendsOptions.clickHandleDrillDown=()=>this.options.clickHandleDrillDown,this.options.clickHandleDrillDown&&(this.extendsOptions.mapDepth=()=>Array.isArray(this.options.mapDepth)?this.options.mapDepth:new Array(3).fill(this.options.mapDepth),this.extendsOptions.drillDownFirstLevelUseBgMats=()=>this.options.drillDownFirstLevelUseBgMats,this.extendsOptions.drillDownSecondLevelMats=()=>this.options.drillDownSecondLevelMats,this.extendsOptions.drillDownThirdLevelMats=()=>this.options.drillDownThirdLevelMats,this.extendsOptions.drillDownPlateInCenter=()=>this.options.drillDownPlateInCenter,this.extendsOptions.clickOusideBack=()=>this.options.clickOusideBack,this.extendsOptions.handleBackKeepCamvasState=()=>this.options.handleBackKeepCamvasState,this.extendsOptions.showOneLevel=()=>this.options.showOneLevel,this.extendsOptions.showDistrict=()=>this.options.showDistrict,this.options.parentBg&&(this.extendsOptions.drillDownHideParent=()=>this.options.drillDownHideParent)),this.extendsOptions.parentBg=()=>this.options.parentBg,this.options.parentBg&&(this.extendsOptions.parentBgDepth=()=>this.options.parentBgDepth,this.options.adcode===1e5&&(this.extendsOptions.worldPacificCentre=()=>this.options.worldPacificCentre)),this.extendsOptions.continentsBg=()=>this.options.continentsBg,this.options.continentsBg&&(this.extendsOptions.continentsBgDepth=()=>this.options.continentsBgDepth)),this.options.adcode===0?world(this):this.options.style==="map2Base"||this.options.style==="map2CityOnMap"?base(this):this.options.adcode===1e5?china(this):base$1(this)}handleSetting(r,o){return K0(this,null,function*(){return yield Ln(Mn.prototype,this,"handleSetting").call(this,r,o),r==="label"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.labelLite=!1,yield this.settings.labelLite,this.options.showLabel=!0,yield this.drawLabels()):r==="labelLite"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.label=!1,yield this.settings.label,this.options.showLabel="lite",yield this.drawLabels()):r==="shadowMap"&&(o===!1?this.shadowMapDisabled():yield this.shadowMapEnabled()),o})}init(){return K0(this,null,function*(){const{adcode:r}=this.options;this.options.center&&(this.pcenter=this.options.center),this.options.worldPacificCentre&&r===1e5&&(this.pcenter=[this.pcenter[0]-160,this.pcenter[1]]),this.projection=f({center:this.pcenter,scale:this.pscale,projectionType:this.options.projectionType,rotate:this.options.worldPacificCentre?[-160,0]:void 0}),this.meters=this.projection([1*1141e-8+this.pcenter[0],0])[0],yield this.initPencil(),console.time(`vis-core:time.${this.visName}-loader`),this.loaderAdd(),console.timeEnd(`vis-core:time.${this.visName}-loader`),yield this.loader.loadAll(),this.group=yield this.lead.draw("Group",{key:"map"+r}),this.group.object3d.name="地图",yield this.initMaterial(),yield this.initVis(r),this.options.clickHandleDrillDown&&(this.lead.handlePick(()=>this.mapArea||[],"down",({baseObject:o,mouseEvent:V})=>{(this.playing||V.metaKey||V.ctrlKey)&&this.handleClick(o)}),this.options.clickOusideBack&&this.lead.handlePick(()=>this.map?[this.map]:[],"downOutside",({mouseEvent:o})=>{(this.playing||o.metaKey||o.ctrlKey)&&this.handleClick()})),yield Promise.all(this.lead.objectsPromise)})}initCityVis(r,o=!1){return K0(this,null,function*(){var le;(le=this.options.fixCity)!=null&&le[r]&&(r=this.options.fixCity[r]);const V=this.options.center,O=this.options.jsonNameObj[r],j=new City({container:this.container,editor:!1});return j.setOptions({container:this.container,center:V,grey:o,adcode:r,cacheKey:this.options.cacheCity?`${this.options.adcode}-${r}`:void 0,jsonName:O,showBuilding:this.options.showBuilding,buildingSideGradient:this.options.buildingSideGradient,buildingHasSide:this.options.buildingHasSide,showRoad:this.options.showRoad,showGrassland:this.options.showGrassland,showRiver:this.options.showRiver,setWaterMaterial:this.options.setWaterMaterial,ssao:this.options.citySSAO,pencil2:this.pencil}),yield j.init(),this.cityVis=j,this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.emit("initCityVis",r),j})}initCityOnMap(r){return K0(this,null,function*(){const o=yield this.initCityVis(r),V=this.mapObj.depth+1e-5;if(o.group.position.z=this.mapObj.z+V,o.outAreaGroup.position.z=-this.mapObj.depth/o.multiplyScalar,this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix(),this.options.nearbyCities&&this.getAdcodeShowLevel(r)==="district"){const O=findAdcodeInfo(r).parent;if(this.getAdcodeShowLevel(O)==="city"){const j=findAdcodeInfo(O).c;for(const le of j)(this.options.nearbyCities==="full"||le!==r)&&(yield this.initCityVis(le,!0))}return}})}initVisBg(){return K0(this,null,function*(){let r=1e3,o=1e3;const V=new Vector3(0,0,0);if(this.options.parentBg){const O={projection:{center:this.pcenter,scale:this.pscale,rotate:[0,0],projectionType:this.options.projectionType},areaGroup:!1,depth:this.options.parentBgDepth},j=this.options.adcode!==1e5;if(j){const Ne=this.mList.getMultiple("parentPlane"),Fe=findAdcodeInfo(this.options.adcode).parent,Gt=findAdcodeInfo(Fe),xt=Gt.b,{res:ze}=yield this.getGeojson(Fe),ke=yield this.lead.draw("PlaneMap",$0({key:"bg-100000",geojson:ze,bbox:xt,materialOptions:$0({},Ne)},O),this.group);ke.object3d.name=Gt.name,ke.lineArr.forEach(bt=>{bt.object3d.name="线",this.lead.updateBaseObjectKey(bt,{type:"100000line"}),this.initBaseObjectUserData(bt)}),ke.areaArr.forEach(bt=>{bt.object3d.name="板块",this.lead.updateBaseObjectKey(bt,{type:"100000area"})}),ke.position.z=-this.options.parentBgDepth,this.parentBg.push(ke)}const le=this.mList.getMultiple("worldPlane"),fe=this.options.geojsonMap[0],Se=findAdcodeInfo(0).b,Ce=yield this.lead.draw("PlaneMap",Ji($0({key:"bg-0",geojson:Ji($0({},fe),{features:[...fe.features.filter(Ne=>j?Ne.properties.iso_a3!=="CHN":!0)]}),bbox:Se,materialOptions:$0({},le)},O),{projection:Ji($0({},O.projection),{rotate:this.options.worldPacificCentre?[-160,0]:void 0})}),this.group);Ce.object3d.name="世界",Ce.lineArr.forEach(Ne=>{Ne.object3d.name="线",this.lead.updateBaseObjectKey(Ne,{type:"worldline"}),this.initBaseObjectUserData(Ne)}),Ce.areaArr.forEach(Ne=>{Ne.object3d.name="板块",this.lead.updateBaseObjectKey(Ne,{type:"worldarea"})}),Ce.position.z=-this.options.parentBgDepth,this.parentBg.push(Ce);const{center:Re,size:Pe}=Ce.getSize();r=Pe.x,o=Pe.y,V.set(Re.x,Re.y,0)}if(this.options.continentsBg){if(this.continentsBg=yield this.lead.draw("ContinentsBg",{depth:this.options.continentsBgDepth,scale:this.pscale},this.group),this.options.style!=="map2CityOnMap"&&this.options.style!=="map2Base"){const O=this.getLocationPosition([104,37.5]);this.continentsBg.position.set(...O)}this.continentsBg.position.z=.1}if(this.options.bottomPlane){const O=yield this.lead.draw("CityPlane",{width:r,height:o,color:"#0f1e57"},this.group);O.object3d.name="地图底面",this.lead.updateBaseObjectKey(O,{type:"map-plane"}),this.options.bottomPlaneWater&&O.addWater(),O.position.copy(V),O.position.z-=.1}})}initVis(r){return K0(this,null,function*(){var o;if(yield this.setAdcode({adcodes:[r],duration:0}),this.options.style!=="map2Base"&&this.options.style!=="map2CityOnMap"){const V=yield this.lead.draw("Light",{type:"SpotLight",color:this.options.adcode===0?"#82d9f2":"#c1e6dd",intensity:3,distance:0,angle:this.options.continentsBg?1:.5,penumbra:1,decay:0}),O=this.pencil.cameraPositon,j=this.pencil.cameraTarget;V==null||V.spotLight.position.copy(O),V==null||V.spotLight.target.position.copy(j)}if(this.options.mapBoundary){const V=new Box3().setFromObject((o=this.map)==null?void 0:o.object3d);this.pencil.controls.setBoundary(V)}yield this.initVisBg()})}loaderAddBg(){this.options.bottomPlaneWater&&this.loader.add(["/image/water/normalMap0.jpg","/image/water/normalMap1.jpg"],{})}initMaterialBg(){return K0(this,null,function*(){if(this.options.parentBg){const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",emissive:"#081417",color:"#000000"}),V=new MeshBasicMaterial({name:"世界侧面",color:"#051714",side:DoubleSide}),O=new kt({name:"世界线",color:new Color$1("#50766E"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("worldPlane",r),this.options.adcode!==1e5&&(this.mList.copyMultiple("worldPlane","parentPlane"),Object.values(this.mList.getMultiple("parentPlane")).forEach(o=>{o.name=o.name.replace("世界","父级")}))}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#154532"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),O=new kt({name:"大洲板块线",color:new Color$1("#09e6c1"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("continents",r)}})}consoleMousePostion(){this.addListener(this.container,"click",r=>{var O,j;const o=this.unproject(r,this.mapObj.z+this.mapObj.depth),V=(j=(O=this.projection).invert)==null?void 0:j.call(O,[o.x,-o.y]);console.log("consoleMousePostion.postion",o),console.log("consoleMousePostion.lnglat",V)})}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const O=this.map.areaArr.find(j=>j.userData[r]===o);if(O){const j=O.object3d;let le=this.mList.get("plane#topMat");V!=="origin"&&(le=j.material[0].clone(),V.color&&le.color.set(V.color),V.emissive&&(le.emissive.set(V.emissive),le.emissiveIntensity=V.emissiveIntensity||1)),j.material[0]=le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const O=this.map.lineArr.find(j=>j.userData[r]===o);if(O){const j=O.object3d;let le=this.mList.get("plane#lineMat");V!=="origin"&&(le=j.material.clone(),V.color&&le.color.set(V.color),V.width&&(le.lineWidth=V.width)),j.material=le}}addAreaPlaneByProperty(r,o,V){return K0(this,null,function*(){if(!this.map)return;const j=this.map.options.geojson.features.find(le=>le.properties&&le.properties[r]===o);if(j){let le=V.material,fe=V.sideMaterial;if(y(V.sideMaterial)&&(fe=new MeshBasicMaterial($0({},V.sideMaterial))),y(V.material)&&(le=new MeshBasicMaterial($0({},V.material))),V.area){const Re=this.objectByUuid(V.area);Re&&([le,fe]=Re.material)}let Se=V.lineMaterial;if(y(V.lineMaterial)&&(Se=new kt($0({},V.lineMaterial))),V.line){const Re=this.objectByUuid(V.line);Re&&(Se=Re.material)}const Ce=yield this.lead.draw("PlaneMap",{geojson:{type:"FeatureCollection",features:[j]},depth:V.depth||0,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:{topMat:le,lineMat:Se,sideMat:fe},areaGroup:!1},this.group);if(Ce.position.z=this.mapObj.z+this.mapObj.depth+.01,V.lineBloom&&Ce.lineArr.forEach(Re=>{Re.enableBloom()}),V.area){Ce.position.z=0;const Re=this.baseObjectByUuid(V.area);Ce.areaArr.forEach(Pe=>{Re!=null&&Re.isBloom&&Pe.enableBloom(),Pe.scale.z=Re.scale.z,Pe.position.z=Re.position.z})}if(V.line){const Re=this.baseObjectByUuid(V.line);Ce.lineArr.forEach(Pe=>{Re!=null&&Re.isBloom&&Pe.enableBloom(),Pe.position.z=Re.position.z})}return Ce}})}showAction(){return K0(this,null,function*(){Ln(Mn.prototype,this,"showAction").call(this),this.useSaveCamera(`map-${this.options.adcode}`);const r=this.lead.group;if(this.mapHistory[0]){const{stop:o,start:V}=sinusoidalInOut({onUpdate:O=>{if(!this.mapHistory[0]){o();return}r.position.z=-this.mapHistory[0].depth*(1-O)}});yield V(),this.saveCamvasState("controls",0)}})}hide(){return K0(this,null,function*(){if(!this.showState)return;const r=this.lead.group;yield sinusoidalInOut({onUpdate:o=>{r.position.z=-this.mapHistory[0].depth*o}}).start(),setTimeout(()=>{Ln(Mn.prototype,this,"hide").call(this)})})}shadowMapEnabled(){return K0(this,null,function*(){if(this.pencil.scene.userData.shadowMapEnabled)return;this.pencil.scene.userData.shadowMapEnabled=!0;const r=yield this.lead.draw("Light",{type:"SpotLight",color:"#c1e6dd",intensity:1,distance:0,angle:.5,penumbra:1,decay:0});this.lead.updateBaseObjectKey(r,{type:"ShadowSpotLight"}),this.shadowMapLight=r,r.object3d.position.set(.281,32.487,43.077),r.object3d.castShadow=!0;const o=yield this.lead.draw("PlaneShadow");this.planeShadow=o})}shadowMapDisabled(){this.pencil.scene.userData.shadowMapEnabled&&(this.pencil.scene.userData.shadowMapEnabled=!1,this.shadowMapLight&&(this.shadowMapLight.erase(),this.shadowMapLight=void 0),this.planeShadow&&(this.planeShadow.erase(),this.planeShadow=void 0))}getOptionsDepth(r){const o=this.getAdcodeShowLevel(r);let V=this.options.mapDepth;Array.isArray(V)||(V=new Array(3).fill(V));let O;return o==="country"?O=V[0]:o==="province"?O=V[1]:O=V[2],O}getDepth(r,o){let V=this.getOptionsDepth(r);if(this.options.depthReference){const O=this.options.depthReference,j=findAdcodeInfo(r).b;V=V*this.getReferenceScale(O,j)}else if(this.mapHistory.length){const O=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b,j=this.getReferenceScale(O,o);V=V*j}return V}getReferenceScale(r,o){const V=Math.abs(o[3]-o[1])/Math.abs(r[3]-r[1]),O=Math.abs(o[2]-o[0])/Math.abs(r[2]-r[0]);return Math.max(V,O)}getAdcodeShowLevel(r,o=!0){var V;return(V=this.options.fixCity)!=null&&V[r]&&(r=this.options.fixCity[r]),getAdcodeShowLevel(r,o)}handleClick(r){const{drillDownRestrictions:o}=this.options;this.isAnimating||(r&&r.userData.adcode?this.getAdcodeShowLevel(r.userData.adcode,!1)!==o?this.showMap({adcode:r.userData.adcode}):this.emit("drilldownRestrictions",r.userData.adcode):!r&&this.mapHistory.length>1&&this.showMap({adcode:this.adcodes.at(-2)}))}beforeShowMap(r){return!0}getAdcodes(r){var O;const o=[];let V=r;for(;V&&(o.unshift(V),V!==this.options.adcode);)V=(O=findAdcodeInfo(V))==null?void 0:O.parent;return o}showMap(O){return K0(this,arguments,function*({adcode:r,adcodes:o,duration:V=1e3}){const j=o||this.getAdcodes(r);(yield this.beforeShowMap(j))!==!1&&(this.emit("beforeDrillDown",[...j]),yield this.setAdcode({adcodes:j,duration:V}),this.emit("afterDrillDown",[...j]))})}drawLabels(){return K0(this,null,function*(){var V;const r=this.options.showLabel;if(!((V=this.mapArea)!=null&&V.length)||!r)return;let o=this.lead.getObject("Group",{key:"mapLabel"});o||(o=yield this.lead.draw("Group",{key:"mapLabel"},this.group),o.object3d.name="地图标签组",yield Promise.all(this.mapArea.map(O=>K0(this,null,function*(){let{name:j,adcode:le,centroid:fe}=O.userData;const{DistrictID:Se,DistName:Ce,iso_a2:Re,center:Pe}=O.userData;if(le=le||Re||Se,fe=fe||Pe,j=j||Ce,!fe)return;const Ne=this.getLocationPosition(fe);if(this.lead.getObject("Node",{key:`mapLabel-${le}`})||!Ne)return;const[Fe,Gt,xt]=Ne;let ze=j;r==="lite"&&ze&&(ze=j.replace(/自治州|地区|自治区|省|市|壮族|特别行政区|回族|维吾尔/g,""));const ke=ze&&getLabelElement(ze),bt=ze!=null&&ze.startsWith("澳门")?-1:0;yield this.lead.draw("Node",{position:new Vector3(Fe,Gt+bt,xt),children:ke,key:`$p:-${this.options.adcode===0?j:le}`},o)}))))})}eraseLabels(){const r=this.lead.getObject("Group",{key:"mapLabel"});r==null||r.erase()}geAdcodePosition(r){var V;const o=(V=this.mapArea)==null?void 0:V.find(O=>O.userData.adcode===r);if(o){const{centroid:O,center:j}=o.userData;return this.getLocationPosition(O||j)}}getLocationPosition(r){const[o,V]=r,[O,j]=this.projection([o,V]);return[O,-j,this.mapObj?this.mapObj.z+this.mapObj.depth:0]}setObjectOnMap(r,o,V=0){const O=this.getLocationPosition(o);r.position.set(O[0],O[1],O[2]+V)}setObjectOnMapAreaByProperty(r,o,V,O=0){var le;const j=(le=this.mapArea)==null?void 0:le.find(fe=>fe.userData[o]===V);if(j){const{centroid:fe,center:Se}=j.userData,Ce=this.getLocationPosition(fe||Se);r.position.set(Ce[0],Ce[1],Ce[2]+O)}}getAdcodeScreenPosition(r){const o=this.geAdcodePosition(r);if(o){const[V,O,j]=o,le=new Vector3(V,O,j);le.project(this.pencil.camera);const{width:fe,height:Se}=this.pencil.getSize(),Ce=(le.x*.5+.5)*fe,Re=(le.y*-.5+.5)*Se;return{x:Ce,y:Re}}}booleanPointInCn(r){return chinaLiteJson.features[0].geometry.coordinates.some(o=>turf.booleanPointInPolygon(turf.point(r),turf.polygon(o)))}booleanPointInMap(r,o){var j,le;const V=o!=null?o:(j=this.mapInfo)==null?void 0:j.adcode;if(!V)return!1;const O=(le=this.options.extrudeLineGeojsonMap)==null?void 0:le[V];return O?O.features.some(fe=>{const Se=fe.geometry.coordinates;return fe.geometry.type==="Polygon"?Se.some(Ce=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Ce]))):fe.geometry.type==="MultiPolygon"?Se.some(Ce=>Ce.some(Re=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Re])))):!1}):!1}getGeojson(r,o=!1){return K0(this,null,function*(){var V,O,j,le;return o?this.options.extrudeLine?(j=this.options.extrudeLineGeojsonMap)!=null&&j[r]?{res:(le=this.options.extrudeLineGeojsonMap)==null?void 0:le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`):{res:void 0}:(V=this.options.geojsonMap)!=null&&V[r]?{res:(O=this.options.geojsonMap)==null?void 0:O[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json/${r}.json`)})}handleDrillDown(le){return K0(this,arguments,function*({adcode:r,duration:o,handleLook:V,saveBackCamvasState:O,extrudelineBloom:j}){var fe,Se,Ce,Re,Pe;if(typeof r!="undefined"&&!this.isAnimating){const Ne=(fe=this.map)==null?void 0:fe.findGroup(r,!0),Fe=findAdcodeInfo(+r);if(this.isAnimating||!Fe)return;this.isAnimating=!0;const{name:Gt}=Fe;let{res:xt}=yield this.getGeojson(r),{res:ze}=yield this.getGeojson(r,!0);if(!this.options.showDistrict&&this.getAdcodeShowLevel(r)==="city"&&(xt=ze,ze=void 0),[xt,ze].filter(Boolean).forEach(bt=>{if(!bt.features[0].properties.adcode&&/^\d{6}$/.test(`${r}`)){const Xt=findAdcodeInfo(r);bt.features[0].properties=Ji($0($0({},bt.features[0].properties),Xt),{center:[Xt.lng,Xt.lat]})}}),xt){const bt=this.options.plateInCenter&&(this.mapHistory.length<1||this.options.drillDownPlateInCenter);if((Se=this.options.fixGeojson)!=null&&Se[r]){const Yt=(Ce=this.options.fixGeojson)==null?void 0:Ce[r];if(Yt.startsWith("-")){const n0=+Yt.slice(1);xt.features=xt.features.filter(d0=>d0.properties.adcode!==n0)}}let Xt=findAdcodeInfo(r).b;const Zt=[...Xt];this.mapHistory.length===1&&!this.options.drillDownSecondLevelMats?Xt=findAdcodeInfo(this.mapInfo.adcode).b:this.mapHistory.length===2&&!this.options.drillDownThirdLevelMats&&(this.options.drillDownSecondLevelMats?Xt=findAdcodeInfo(this.mapInfo.adcode).b:Xt=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b),this.eraseLabels(),this.map&&(this.options.drillDownHideParent&&this.parentBg.forEach(Yt=>{Yt.hide()}),this.options.showOneLevel?this.map.hide():this.map.deactive(),O&&this.saveCamvasState("userControls",-1));const Vt=this.mapHistory.length,Wt=Vt-1,It=this.getDepth(r,Zt),Pt=(Re=this.mapHistory[Wt])==null?void 0:Re.depth,Nt=Vt===0||this.options.showOneLevel?0:this.mapHistory[Wt].z+Pt,Ft=Vt===0||this.options.showOneLevel?0:Nt-It,qt=turf.center(xt).geometry.coordinates,[i0,s0]=this.projection(qt),e0=yield this.drawPlaneMap({geojson:xt,extrudeLineGeojson:ze,depth:It,bbox:Xt,adcode:r,extrudelineBloom:j});Ne==null||Ne.hide(),e0.position.setZ(Ft);const Kt=e0.position.z,Ht=()=>K0(this,null,function*(){yield sinusoidalInOut({onUpdate:Yt=>{Nt!==Kt&&(e0.position.z=Kt+(Nt-Kt)*Yt)}}).start({duration:o})});if(bt)if(this.fixNear(r),e0.position.z=Nt,V){const Yt=(Pe=this.mapHistory.at(-1))==null?void 0:Pe.controls;yield this.fitTo(e0,{z:Nt+It,adcode:r,enableTransition:o!==0,polarAngle:Yt==null?void 0:Yt.polarAngle,azimuthAngle:Yt==null?void 0:Yt.azimuthAngle,handleStart:()=>K0(this,null,function*(){e0.position.z=Kt,yield Ht()})})}else this.options.showOneLevel&&e0.hide();else yield Ht();this.mapHistory.push({map:e0,mapInfo:Fe,z:Nt,depth:It,cX:i0,cY:-s0}),V&&this.drawLabels(),this.saveCamvasState("controls",-1)}else console.log(`${Gt}的地图数据不存在`);this.event.emit("handleDrillDown",{adcode:r,z:this.mapObj.z+this.mapObj.depth})}this.isAnimating=!1})}saveCamvasState(r,o){const V=this.mapHistory.at(o);V&&(V[r]={lookAt:[...this.pencil.cameraPositon.toArray(),...this.pencil.cameraTarget.toArray()],polarAngle:this.pencil.controls.polarAngle,azimuthAngle:this.pencil.controls.azimuthAngle})}fixNear(r){const o=this.getAdcodeShowLevel(r),V=this.pencil.options;r===0?(this.pencil.camera.near=1,this.pencil.camera.far=1e3,this.pencil.camera.updateProjectionMatrix()):(o==="country"||o==="province")&&this.pencil.camera.near!==V.camera.near*10?(this.pencil.camera.near=V.camera.near*10,this.pencil.camera.updateProjectionMatrix()):(o==="city"||o==="district")&&this.pencil.camera.near!==V.camera.near&&(this.pencil.camera.near=V.camera.near,this.pencil.camera.updateProjectionMatrix())}fitTo(Se){return K0(this,arguments,function*(r,{polarAngle:o,azimuthAngle:V,z:O,handleStart:j,adcode:le,enableTransition:fe=!0}={}){if(!(r!=null&&r.object3d))return;if(le&&(yield this.useSaveCamera(`map-${le}`,fe))){j&&(yield j());return}const Ce=this.options.mapPadding,{height:Re,width:Pe}=this.pencil.getSize();Re<Ce[0]+Ce[2]+50&&(Ce[0]=0,Ce[2]=0),Pe<Ce[1]+Ce[3]+50&&(Ce[1]=0,Ce[3]=0);const Ne=o!=null?o:this.options.polarAngle,Fe=V!=null?V:this.options.azimuthAngle,Gt=this.pencil.cameraPositon.toArray(),xt=this.pencil.cameraTarget.toArray();yield this.paddingInCssPixel(r,Ce[0],Ce[1],Ce[2],Ce[3],!1);let ze;O&&(ze=this.pencil.cameraTarget.toArray(),yield this.pencil.controls.setTarget(ze[0],ze[1],O,!1)),yield this.pencil.controls.rotateTo(Fe,Ne,!1),ze=this.pencil.cameraTarget.toArray();const ke=this.pencil.cameraPositon.toArray();yield this.lookAt(...Gt,...xt),yield Promise.all([this.lookAt(...ke,...ze,fe),j==null?void 0:j()].filter(Boolean))})}drawPlaneMap(fe){return K0(this,arguments,function*({geojson:r,extrudeLineGeojson:o,bbox:V,depth:O,extrudelineBloom:j,adcode:le}){var Gt;const Se=[this.mList.getMultiple("plane"),this.mList.getMultiple("secondPlane"),this.mList.getMultiple("thirdPlane")];let Ce=this.mapHistory.length,Re=null;for(;Re===null;)Re=Se[Ce],Ce--;const Pe=this.mList.getMultiple("bgPlane"),Ne=$0($0({},Re),Pe?{bgTopMat:Pe.topMat,bgSideMat:Pe.sideMat,bgLineMat:Pe.lineMat,bgExtrudeLineMat:Pe.extrudeLineMat}:{}),Fe=yield this.lead.draw("PlaneMap",{key:`${le}`,geojson:r,extrudeLineGeojson:o,depth:O,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:Ne,bbox:V,topSegments:this.options.topSegments,lineOffset:this.options.lineOffset,mergeSide:this.options.mergeSide},this.group);return Fe.object3d.name=((Gt=findAdcodeInfo(le))==null?void 0:Gt.name)||`${le}`,this.options.style==="map2CityOnMap"&&!this.options.showCityOnMapInnerLine&&(Re.lineMat.colorWrite=!1,Fe.lineArr.forEach(xt=>{xt.userData.selectHide=!0})),Fe.extrudelineArr&&Fe.extrudelineArr.forEach(xt=>{xt.object3d.name="板块边线",this.lead.updateBaseObjectKey(xt,{type:"extrudeLine",key:this.mapHistory.length?"$p:":void 0}),this.initBaseObjectUserData(xt),j&&(xt.object3d.userData.bloom=!0)}),Fe.lineArr&&Fe.lineArr.forEach(xt=>{this.initBaseObjectUserData(xt)}),Fe})}handleBack(){return K0(this,arguments,function*({duration:r=1e3,handleLookBack:o=!0,keepOne:V=!0}={}){if(this.isAnimating||(V?this.mapHistory.length<=1:this.mapHistory.length===0))return;this.isAnimating=!0;const O=this.mapHistory.pop();if(!this.options.drillDownPlateInCenter){const j=O.map.position.z,le=this.mapObj?this.mapObj.z+(this.mapObj.depth-O.depth):0;yield sinusoidalInOut({onUpdate:fe=>{O.map.position.z=j+(le-j)*fe}}).start({duration:r})}if(this.lead.eraseWithoutMaterial(O.map),this.eraseLabels(),this.mapObj){const{map:j}=this.mapObj,le=j==null?void 0:j.findGroup(O.mapInfo.adcode,!0);le&&le.show(),j&&o&&(this.options.showOneLevel?j.show():j.active(),this.options.drillDownHideParent&&this.parentBg.forEach(fe=>{fe.show()}),yield this.handleLookBack(r),this.drawLabels())}this.emit("handleBack",{adcodes:this.adcodes}),this.isAnimating=!1})}handleLookBack(r){return K0(this,null,function*(){const{userControls:o,controls:V}=this.mapObj;yield this.pencil.controls.setLookAt(...o?o.lookAt:V.lookAt,r!==0)})}compareLocations(r,o){const V=r.filter(fe=>fe),O=o.filter(fe=>fe),j=[];let le=0;for(let fe=0;fe<Math.min(V.length,O.length)&&V[fe]===O[fe];fe++)le++;for(let fe=le;fe<V.length;fe++)j.push(-1);for(let fe=le;fe<O.length;fe++)j.push(O[fe]);return j}setAdcode(V){return K0(this,arguments,function*({adcodes:r,duration:o}){var j,le,fe;const{adcodes:O}=this;if(!(JSON.stringify(r)===JSON.stringify(O)||this.isAnimating))if(JSON.stringify(r)===JSON.stringify([0]))try{yield this.handleDrillDown({adcode:0,duration:o,handleLook:!0})}catch(Ne){console.error(Ne)}else{const{continent:Ne,country:Fe,province:Gt,city:xt,district:ze}=r.reduce((Nt,Ft)=>{const qt=this.getAdcodeShowLevel(Ft);return Nt[qt]=Ft,Nt},{}),{continent:ke,country:bt,province:Xt,city:Zt,district:Vt}=O.reduce((Nt,Ft)=>{const qt=this.getAdcodeShowLevel(Ft);return Nt[qt]=Ft,Nt},{}),Wt=Ne||ke,It=(fe=(le=(j=this.map)==null?void 0:j.extrudelineArr)==null?void 0:le[0])==null?void 0:fe.object3d.userData.bloom,Pt=this.compareLocations([ke,bt,Xt,Zt,Vt],[Ne,Fe,Gt,xt,ze]);try{for(var Se=kn(Pt.entries()),Ce,Re,Pe;Ce=!(Re=yield Se.next()).done;Ce=!1){const[Nt,Ft]=Re.value;const qt=Nt===Pt.length-1?o:0,i0=Nt===Pt.length-1;Ft===-1?yield this.handleBack({duration:qt,handleLookBack:i0,keepOne:!Wt}):yield this.handleDrillDown({adcode:Ft,duration:qt,handleLook:i0,saveBackCamvasState:Pt.includes(-1)?!1:this.options.handleBackKeepCamvasState,extrudelineBloom:It})}}catch(Re){Pe=[Re]}finally{try{Ce&&(Re=Se.return)&&(yield Re.call(Se))}finally{if(Pe)throw Pe[0]}}}})}setPadding(r,o=!1,V=!1){this.options.mapPadding=[...r],o&&this.fitTo(this.map,{enableTransition:V})}findAdcodeInfo(r){return findAdcodeInfo(r)}dispose(){var r,o,V;(r=this.cityVis)==null||r.dispose(),(o=this.map)==null||o.dispose(),this.parentBg.forEach(O=>{O.dispose()}),this.parentBg.length=0,(V=this.continentsBg)==null||V.dispose(),this.continentsBg=void 0,this.mapHistory.length=0,super.dispose()}};v0(Mn,"VisName","map"),v0(Mn,"getAdcodeShowLevel",getAdcodeShowLevel);let index=Mn;const access={set token(v){accessToken.token=v}},VERSION=version;exports.Base=Base;exports.City=City$1;exports.Earth=index$1;exports.Map=index;exports.THREE=THREE;exports.TWEEN=tween_esm;exports.VERSION=VERSION;exports.access=access;exports.animationUtils=animation;exports.getCityConfig=getCityConfig;exports.getMapConfig=getMapConfig;exports.removeCameraHistory=removeCameraHistory;
5366
+ `,e},worldPacificCentre=v=>{v.loaderAdd=function(){const e=this.loader;e.add(["/image/map/jianbian.webp"]),e.add(["/image/map/hp2.webp","/image/map/fx2.webp"])},v.initMaterial=function(){return K0(this,null,function*(){const e=this.loader,r=this.mList,o=(()=>{const V=e.getAsset("/image/map/hp2.webp");V.center.set(.5,.5),V.repeat.set(.97,1.01);const O=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp2.webp"),normalMap:e.getAsset("/image/map/fx2.webp"),normalScale:new Vector2(2,1)}),j=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:O,sideMat:j,lineMat:le,extrudeLineMat:v.options.extrudeLine?fe:null}})();r.addMultiple("plane",o)})}},world=v=>{if(v.options.lineOffset=.02,delete v.extendsOptions.handleBackKeepCamvasState,v.extendsOptions.extrudeLine=()=>v.options.extrudeLine,v.extendsOptions.worldPacificCentre=()=>v.options.worldPacificCentre,v.options.worldPacificCentre){worldPacificCentre(v);return}v.initMaterial=function(){return K0(this,null,function*(){const e=this.mList,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:"#0d2425"}),V=new MeshBasicMaterial({name:"侧面",color:"#0d2425"}),O=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),j=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:O,extrudeLineMat:v.options.extrudeLine?j:null}})();e.addMultiple("plane",r)})}},china=v=>{v.options.lineOffset=.005,v.loaderAdd=function(){return K0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp","/image/map/hp.webp","/image/map/shuchu2.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return K0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp.webp"),normalMap:e.getAsset("/image/map/shuchu2.webp")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),O=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),j=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:O,extrudeLineMat:j}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},base$1=v=>{v.loaderAdd=function(){return K0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return K0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:new Color$1("#0d2425")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),O=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),j=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:O,extrudeLineMat:j}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},cityOnMap=v=>{v.extendsOptions={mapDepth:v.options.mapDepth,parentBg:v.options.parentBg,continentsBg:v.options.continentsBg,continentsBgDepth:v.options.continentsBgDepth,mergeSide:v.options.mergeSide,handleBackKeepCamvasState:v.options.handleBackKeepCamvasState,mapBoundary:v.options.mapBoundary,showBuilding:v.options.showBuilding,showRoad:v.options.showRoad,showGrassland:v.options.showGrassland,showRiver:v.options.showRiver,buildingSideGradient:v.options.buildingSideGradient,buildingHasSide:v.options.buildingHasSide,setWaterMaterial:v.options.setWaterMaterial,showCityOnMapInnerLine:v.options.showCityOnMapInnerLine},v.options.parentBg&&(v.extendsOptions.parentBgDepth=()=>v.options.parentBgDepth),v.loaderAdd=function(){this.loader.add(["/image/map2/side.png"])},v.initMaterial=function(){return K0(this,null,function*(){const r=this.loader,o=(()=>{const V=new MeshBasicMaterial({name:"板块顶面",color:"#094253"}),O=new MeshBasicMaterial({name:"板块侧面",map:r.getAsset("/image/map2/side.png"),side:DoubleSide}),j=new kt({name:"板块边框",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1}),le=new kt({name:"板块内线",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1});return{topMat:V,sideMat:O,lineMat:le,extrudeLineMat:j}})();this.mList.addMultiple("plane",o),this.initMaterialBg()})};const e=v.init.bind(v);v.init=function(){return K0(this,null,function*(){yield e(),yield this.initCityOnMap(this.mapInfo.adcode)})}},base=v=>{if(v.initMaterialBg=function(){return K0(this,null,function*(){const e=this.getRoomEnvMap();if(this.options.parentBg){if(this.options.adcode!==1e5){const o=(()=>{const V=new MeshStandardMaterial({name:"父级顶面",color:"#031529",emissive:"#010f1f",envMap:e}),O=new MeshBasicMaterial({name:"父级侧面",color:"#064d73",side:DoubleSide}),j=new kt({name:"父级板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:V,sideMat:O,lineMat:j}})();this.mList.addMultiple("parentPlane",o)}const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",color:"#031529",emissive:"#010f1f",envMap:e}),V=new MeshBasicMaterial({name:"世界侧面",color:"#064d73",side:DoubleSide}),O=new kt({name:"世界板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("worldPlane",r)}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#235278"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),O=new kt({name:"大洲板块线",color:new Color$1("#1488e0"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("continents",r)}})},v.options.style==="map2CityOnMap"){cityOnMap(v);return}v.loaderAdd=function(){return K0(this,null,function*(){this.loaderAddBg()})},v.initMaterial=function(){return K0(this,null,function*(){const e=(()=>{const r=new MeshBasicMaterial({name:"板块顶面",color:new Color$1("#064773")}),o=new MeshBasicMaterial({name:"板块侧面",color:new Color$1("#064d73"),side:DoubleSide}),V=new kt({name:"板块线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1}),O=new kt({name:"板块边框线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1});return{topMat:r,sideMat:o,lineMat:V,extrudeLineMat:O}})();this.mList.addMultiple("plane",e),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.initMaterialBg()})}},getAdcodeShowLevel=(v,e=!0)=>{if(v===0)return"world";if(v===1e5)return"country";if(/^\d{6}$/.test(`${v}`)){const{level:r,parent:o}=findAdcodeInfo(v),V=o&&findAdcodeInfo(o).level;return r==="district"&&V==="province"&&e?"city":r}else if(continentsType.find(r=>r.adcode===v))return"continent"},Mn=class Mn extends Base{constructor(){super(...arguments);v0(this,"leadObjs",objs);v0(this,"mapHistory",[]);v0(this,"activePlaneMap",null);v0(this,"isAnimating",!1);v0(this,"parentBg",[]);v0(this,"continentsBg");v0(this,"group");v0(this,"projection");v0(this,"pcenter",[104,37.5]);v0(this,"pscale",5e4/1e3);v0(this,"meters");v0(this,"cityVis",null);v0(this,"extendsOptions",{mapDepth:()=>this.getOptionsDepth(this.options.adcode),equirectangular:()=>this.options.projectionType==="equirectangular",mapBoundary:()=>this.options.mapBoundary,mergeSide:()=>this.options.mergeSide});v0(this,"initSettingsObj",{label:!1,labelLite:!1,shadowMap:!1});v0(this,"caId");v0(this,"shadowMapLight");v0(this,"planeShadow")}get mapObj(){return this.mapHistory[this.mapHistory.length-1]}get map(){var r;return(r=this.mapObj)==null?void 0:r.map}get mapInfo(){var r;return(r=this.mapObj)==null?void 0:r.mapInfo}get mapArea(){var r;return(r=this.map)==null?void 0:r.areaArr}get mapLine(){var r;return(r=this.map)==null?void 0:r.lineArr}get adcodes(){return this.mapHistory.map(r=>r.mapInfo.adcode)}setOptions(r){r.continentType;const o=$0($0({0:worldExclATAJson,1e5:chinaJson},continentsJson),r==null?void 0:r.geojsonMap);let V=$0({0:worldExclATALiteJson,1e5:chinaLiteJson},continentsLiteJson);Object.keys(o).forEach(O=>{O!=="100000"&&/^\d{6}$/.test(O)&&o[+O].features.forEach(le=>{const fe=le.properties.adcode;V[fe]={type:"FeatureCollection",features:[le]}})}),V=$0($0({},V),r==null?void 0:r.extrudeLineGeojsonMap),super.setOptions(Ji($0({parentBg:!1,continents:"",continentsBg:!1,continentsBgDepth:0,parentBgDepth:0,topSegments:0,clickHandleDrillDown:!1,drillDownSecondLevelMats:!1,drillDownFirstLevelUseBgMats:!1,drillDownThirdLevelMats:!1,clickOusideBack:!0,mapDepth:[1,.4,.2],mapPadding:[100,100,100,100],plateInCenter:!0,drillDownPlateInCenter:!0,drillDownHideParent:!1,showOneLevel:!1,drillDownRestrictions:"district",showDistrict:!0,showLabel:!1,lineWidth:.6,lineOffset:0,extrudeLineWidth:1.8,extrudeLine:!0,equirectangular:!1,winkel3:!1,projectionType:"mercator",polarAngle:r.style==="map2CityOnMap"?Math.PI/180*60:Math.PI/180*120,azimuthAngle:0,handleBackKeepCamvasState:!1,worldPacificCentre:!1,mapBoundary:!0,mergeSide:!1,bottomPlane:!1,bottomPlaneWater:!1,showBuilding:!0,buildingSideGradient:!1,buildingHasSide:!0,showRoad:!0,cacheCity:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,showCityOnMapInnerLine:!1,nearbyCities:!1,citySSAO:!1},r),{geojsonMap:o,extrudeLineGeojsonMap:V})),this.options.equirectangular&&(this.options.projectionType="equirectangular"),this.options.winkel3&&(this.options.projectionType="winkel3"),this.options.adcode===0?this.extendsOptions.winkel3=()=>this.options.winkel3:(this.getAdcodeShowLevel(this.options.adcode)==="province"||this.getAdcodeShowLevel(this.options.adcode)==="country")&&(this.extendsOptions.clickHandleDrillDown=()=>this.options.clickHandleDrillDown,this.options.clickHandleDrillDown&&(this.extendsOptions.mapDepth=()=>Array.isArray(this.options.mapDepth)?this.options.mapDepth:new Array(3).fill(this.options.mapDepth),this.extendsOptions.drillDownFirstLevelUseBgMats=()=>this.options.drillDownFirstLevelUseBgMats,this.extendsOptions.drillDownSecondLevelMats=()=>this.options.drillDownSecondLevelMats,this.extendsOptions.drillDownThirdLevelMats=()=>this.options.drillDownThirdLevelMats,this.extendsOptions.drillDownPlateInCenter=()=>this.options.drillDownPlateInCenter,this.extendsOptions.clickOusideBack=()=>this.options.clickOusideBack,this.extendsOptions.handleBackKeepCamvasState=()=>this.options.handleBackKeepCamvasState,this.extendsOptions.showOneLevel=()=>this.options.showOneLevel,this.extendsOptions.showDistrict=()=>this.options.showDistrict,this.options.parentBg&&(this.extendsOptions.drillDownHideParent=()=>this.options.drillDownHideParent)),this.extendsOptions.parentBg=()=>this.options.parentBg,this.options.parentBg&&(this.extendsOptions.parentBgDepth=()=>this.options.parentBgDepth,this.options.adcode===1e5&&(this.extendsOptions.worldPacificCentre=()=>this.options.worldPacificCentre)),this.extendsOptions.continentsBg=()=>this.options.continentsBg,this.options.continentsBg&&(this.extendsOptions.continentsBgDepth=()=>this.options.continentsBgDepth)),this.options.adcode===0?world(this):this.options.style==="map2Base"||this.options.style==="map2CityOnMap"?base(this):this.options.adcode===1e5?china(this):base$1(this)}handleSetting(r,o){return K0(this,null,function*(){return yield Ln(Mn.prototype,this,"handleSetting").call(this,r,o),r==="label"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.labelLite=!1,yield this.settings.labelLite,this.options.showLabel=!0,yield this.drawLabels()):r==="labelLite"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.label=!1,yield this.settings.label,this.options.showLabel="lite",yield this.drawLabels()):r==="shadowMap"&&(o===!1?this.shadowMapDisabled():yield this.shadowMapEnabled()),o})}init(){return K0(this,null,function*(){const{adcode:r}=this.options;this.options.center&&(this.pcenter=this.options.center),this.options.worldPacificCentre&&r===1e5&&(this.pcenter=[this.pcenter[0]-160,this.pcenter[1]]),this.projection=f({center:this.pcenter,scale:this.pscale,projectionType:this.options.projectionType,rotate:this.options.worldPacificCentre?[-160,0]:void 0}),this.meters=this.projection([1*1141e-8+this.pcenter[0],0])[0],yield this.initPencil(),console.time(`vis-core:time.${this.visName}-loader`),this.loaderAdd(),console.timeEnd(`vis-core:time.${this.visName}-loader`),yield this.loader.loadAll(),this.group=yield this.lead.draw("Group",{key:"map"+r}),this.group.object3d.name="地图",yield this.initMaterial(),yield this.initVis(r),this.options.clickHandleDrillDown&&(this.lead.handlePick(()=>this.mapArea||[],"down",({baseObject:o,mouseEvent:V})=>{(this.playing||V.metaKey||V.ctrlKey)&&this.handleClick(o)}),this.options.clickOusideBack&&this.lead.handlePick(()=>this.map?[this.map]:[],"downOutside",({mouseEvent:o})=>{(this.playing||o.metaKey||o.ctrlKey)&&this.handleClick()})),yield Promise.all(this.lead.objectsPromise)})}initCityVis(r,o=!1){return K0(this,null,function*(){var le;(le=this.options.fixCity)!=null&&le[r]&&(r=this.options.fixCity[r]);const V=this.options.center,O=this.options.jsonNameObj[r],j=new City({container:this.container,editor:!1});return j.setOptions({container:this.container,center:V,grey:o,adcode:r,cacheKey:this.options.cacheCity?`${this.options.adcode}-${r}`:void 0,jsonName:O,showBuilding:this.options.showBuilding,buildingSideGradient:this.options.buildingSideGradient,buildingHasSide:this.options.buildingHasSide,showRoad:this.options.showRoad,showGrassland:this.options.showGrassland,showRiver:this.options.showRiver,setWaterMaterial:this.options.setWaterMaterial,ssao:this.options.citySSAO,pencil2:this.pencil}),yield j.init(),this.cityVis=j,this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.emit("initCityVis",r),j})}initCityOnMap(r){return K0(this,null,function*(){const o=yield this.initCityVis(r),V=this.mapObj.depth+1e-5;if(o.group.position.z=this.mapObj.z+V,o.outAreaGroup.position.z=-this.mapObj.depth/o.multiplyScalar,this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix(),this.options.nearbyCities&&this.getAdcodeShowLevel(r)==="district"){const O=findAdcodeInfo(r).parent;if(this.getAdcodeShowLevel(O)==="city"){const j=findAdcodeInfo(O).c;for(const le of j)(this.options.nearbyCities==="full"||le!==r)&&(yield this.initCityVis(le,!0))}return}})}initVisBg(){return K0(this,null,function*(){let r=1e3,o=1e3;const V=new Vector3(0,0,0);if(this.options.parentBg){const O={projection:{center:this.pcenter,scale:this.pscale,rotate:[0,0],projectionType:this.options.projectionType},areaGroup:!1,depth:this.options.parentBgDepth},j=this.options.adcode!==1e5;if(j){const Ne=this.mList.getMultiple("parentPlane"),Fe=findAdcodeInfo(this.options.adcode).parent,Gt=findAdcodeInfo(Fe),xt=Gt.b,{res:ze}=yield this.getGeojson(Fe),ke=yield this.lead.draw("PlaneMap",$0({key:"bg-100000",geojson:ze,bbox:xt,materialOptions:$0({},Ne)},O),this.group);ke.object3d.name=Gt.name,ke.lineArr.forEach(bt=>{bt.object3d.name="线",this.lead.updateBaseObjectKey(bt,{type:"100000line"}),this.initBaseObjectUserData(bt)}),ke.areaArr.forEach(bt=>{bt.object3d.name="板块",this.lead.updateBaseObjectKey(bt,{type:"100000area"})}),ke.position.z=-this.options.parentBgDepth,this.parentBg.push(ke)}const le=this.mList.getMultiple("worldPlane"),fe=this.options.geojsonMap[0],Se=findAdcodeInfo(0).b,Ce=yield this.lead.draw("PlaneMap",Ji($0({key:"bg-0",geojson:Ji($0({},fe),{features:[...fe.features.filter(Ne=>j?Ne.properties.iso_a3!=="CHN":!0)]}),bbox:Se,materialOptions:$0({},le)},O),{projection:Ji($0({},O.projection),{rotate:this.options.worldPacificCentre?[-160,0]:void 0})}),this.group);Ce.object3d.name="世界",Ce.lineArr.forEach(Ne=>{Ne.object3d.name="线",this.lead.updateBaseObjectKey(Ne,{type:"worldline"}),this.initBaseObjectUserData(Ne)}),Ce.areaArr.forEach(Ne=>{Ne.object3d.name="板块",this.lead.updateBaseObjectKey(Ne,{type:"worldarea"})}),Ce.position.z=-this.options.parentBgDepth,this.parentBg.push(Ce);const{center:Re,size:Pe}=Ce.getSize();r=Pe.x,o=Pe.y,V.set(Re.x,Re.y,0)}if(this.options.continentsBg){if(this.continentsBg=yield this.lead.draw("ContinentsBg",{depth:this.options.continentsBgDepth,scale:this.pscale},this.group),this.options.style!=="map2CityOnMap"&&this.options.style!=="map2Base"){const O=this.getLocationPosition([104,37.5]);this.continentsBg.position.set(...O)}this.continentsBg.position.z=.1}if(this.options.bottomPlane){const O=yield this.lead.draw("CityPlane",{width:r,height:o,color:"#0f1e57"},this.group);O.object3d.name="地图底面",this.lead.updateBaseObjectKey(O,{type:"map-plane"}),this.options.bottomPlaneWater&&O.addWater(),O.position.copy(V),O.position.z-=.1}})}initVis(r){return K0(this,null,function*(){var o;if(yield this.setAdcode({adcodes:[r],duration:0}),this.options.style!=="map2Base"&&this.options.style!=="map2CityOnMap"){const V=yield this.lead.draw("Light",{type:"SpotLight",color:this.options.adcode===0?"#82d9f2":"#c1e6dd",intensity:3,distance:0,angle:this.options.continentsBg?1:.5,penumbra:1,decay:0}),O=this.pencil.cameraPositon,j=this.pencil.cameraTarget;V==null||V.spotLight.position.copy(O),V==null||V.spotLight.target.position.copy(j)}if(this.options.mapBoundary){const V=new Box3().setFromObject((o=this.map)==null?void 0:o.object3d);this.pencil.controls.setBoundary(V)}yield this.initVisBg()})}loaderAddBg(){this.options.bottomPlaneWater&&this.loader.add(["/image/water/normalMap0.jpg","/image/water/normalMap1.jpg"],{})}initMaterialBg(){return K0(this,null,function*(){if(this.options.parentBg){const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",emissive:"#081417",color:"#000000"}),V=new MeshBasicMaterial({name:"世界侧面",color:"#051714",side:DoubleSide}),O=new kt({name:"世界线",color:new Color$1("#50766E"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("worldPlane",r),this.options.adcode!==1e5&&(this.mList.copyMultiple("worldPlane","parentPlane"),Object.values(this.mList.getMultiple("parentPlane")).forEach(o=>{o.name=o.name.replace("世界","父级")}))}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#154532"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),O=new kt({name:"大洲板块线",color:new Color$1("#09e6c1"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:O}})();this.mList.addMultiple("continents",r)}})}consoleMousePostion(){this.addListener(this.container,"click",r=>{var O,j;const o=this.unproject(r,this.mapObj.z+this.mapObj.depth),V=(j=(O=this.projection).invert)==null?void 0:j.call(O,[o.x,-o.y]);console.log("consoleMousePostion.postion",o),console.log("consoleMousePostion.lnglat",V)})}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const O=this.map.areaArr.find(j=>j.userData[r]===o);if(O){const j=O.object3d;let le=this.mList.get("plane#topMat");V!=="origin"&&(le=j.material[0].clone(),V.color&&le.color.set(V.color),V.emissive&&(le.emissive.set(V.emissive),le.emissiveIntensity=V.emissiveIntensity||1)),j.material[0]=le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const O=this.map.lineArr.find(j=>j.userData[r]===o);if(O){const j=O.object3d;let le=this.mList.get("plane#lineMat");V!=="origin"&&(le=j.material.clone(),V.color&&le.color.set(V.color),V.width&&(le.lineWidth=V.width)),j.material=le}}addAreaPlaneByProperty(r,o,V){return K0(this,null,function*(){if(!this.map)return;const j=this.map.options.geojson.features.find(le=>le.properties&&le.properties[r]===o);if(j){let le=V.material,fe=V.sideMaterial;if(y(V.sideMaterial)&&(fe=new MeshBasicMaterial($0({},V.sideMaterial))),y(V.material)&&(le=new MeshBasicMaterial($0({},V.material))),V.area){const Re=this.objectByUuid(V.area);Re&&([le,fe]=Re.material)}let Se=V.lineMaterial;if(y(V.lineMaterial)&&(Se=new kt($0({},V.lineMaterial))),V.line){const Re=this.objectByUuid(V.line);Re&&(Se=Re.material)}const Ce=yield this.lead.draw("PlaneMap",{geojson:{type:"FeatureCollection",features:[j]},depth:V.depth||0,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:{topMat:le,lineMat:Se,sideMat:fe},areaGroup:!1},this.group);if(Ce.position.z=this.mapObj.z+this.mapObj.depth+.01,V.lineBloom&&Ce.lineArr.forEach(Re=>{Re.enableBloom()}),V.area){Ce.position.z=0;const Re=this.baseObjectByUuid(V.area);Ce.areaArr.forEach(Pe=>{Re!=null&&Re.isBloom&&Pe.enableBloom(),Pe.scale.z=Re.scale.z,Pe.position.z=Re.position.z})}if(V.line){const Re=this.baseObjectByUuid(V.line);Ce.lineArr.forEach(Pe=>{Re!=null&&Re.isBloom&&Pe.enableBloom(),Pe.position.z=Re.position.z})}return Ce}})}showAction(){return K0(this,null,function*(){Ln(Mn.prototype,this,"showAction").call(this),this.useSaveCamera(`map-${this.options.adcode}`);const r=this.lead.group;if(this.mapHistory[0]){const{stop:o,start:V}=sinusoidalInOut({onUpdate:O=>{if(!this.mapHistory[0]){o();return}r.position.z=-this.mapHistory[0].depth*(1-O)}});yield V(),this.saveCamvasState("controls",0)}})}hide(){return K0(this,null,function*(){if(!this.showState)return;const r=this.lead.group;yield sinusoidalInOut({onUpdate:o=>{r.position.z=-this.mapHistory[0].depth*o}}).start(),setTimeout(()=>{Ln(Mn.prototype,this,"hide").call(this)})})}shadowMapEnabled(){return K0(this,null,function*(){if(this.pencil.scene.userData.shadowMapEnabled)return;this.pencil.scene.userData.shadowMapEnabled=!0;const r=yield this.lead.draw("Light",{type:"SpotLight",color:"#c1e6dd",intensity:1,distance:0,angle:.5,penumbra:1,decay:0});this.lead.updateBaseObjectKey(r,{type:"ShadowSpotLight"}),this.shadowMapLight=r,r.object3d.position.set(.281,32.487,43.077),r.object3d.castShadow=!0;const o=yield this.lead.draw("PlaneShadow");this.planeShadow=o})}shadowMapDisabled(){this.pencil.scene.userData.shadowMapEnabled&&(this.pencil.scene.userData.shadowMapEnabled=!1,this.shadowMapLight&&(this.shadowMapLight.erase(),this.shadowMapLight=void 0),this.planeShadow&&(this.planeShadow.erase(),this.planeShadow=void 0))}getOptionsDepth(r){const o=this.getAdcodeShowLevel(r);let V=this.options.mapDepth;Array.isArray(V)||(V=new Array(3).fill(V));let O;return o==="country"?O=V[0]:o==="province"?O=V[1]:O=V[2],O}getDepth(r,o){let V=this.getOptionsDepth(r);if(this.options.depthReference){const O=this.options.depthReference,j=findAdcodeInfo(r).b;V=V*this.getReferenceScale(O,j)}else if(this.mapHistory.length){const O=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b,j=this.getReferenceScale(O,o);V=V*j}return V}getReferenceScale(r,o){const V=Math.abs(o[3]-o[1])/Math.abs(r[3]-r[1]),O=Math.abs(o[2]-o[0])/Math.abs(r[2]-r[0]);return Math.max(V,O)}getAdcodeShowLevel(r,o=!0){var V;return(V=this.options.fixCity)!=null&&V[r]&&(r=this.options.fixCity[r]),getAdcodeShowLevel(r,o)}handleClick(r){const{drillDownRestrictions:o}=this.options;this.isAnimating||(r&&r.userData.adcode?this.getAdcodeShowLevel(r.userData.adcode,!1)!==o?this.showMap({adcode:r.userData.adcode}):this.emit("drilldownRestrictions",r.userData.adcode):!r&&this.mapHistory.length>1&&this.showMap({adcode:this.adcodes.at(-2)}))}beforeShowMap(r){return!0}getAdcodes(r){var O;const o=[];let V=r;for(;V&&(o.unshift(V),V!==this.options.adcode);)V=(O=findAdcodeInfo(V))==null?void 0:O.parent;return o}showMap(O){return K0(this,arguments,function*({adcode:r,adcodes:o,duration:V=1e3}){const j=o||this.getAdcodes(r);(yield this.beforeShowMap(j))!==!1&&(this.emit("beforeDrillDown",[...j]),yield this.setAdcode({adcodes:j,duration:V}),this.emit("afterDrillDown",[...j]))})}drawLabels(){return K0(this,null,function*(){var V;const r=this.options.showLabel;if(!((V=this.mapArea)!=null&&V.length)||!r)return;let o=this.lead.getObject("Group",{key:"mapLabel"});o||(o=yield this.lead.draw("Group",{key:"mapLabel"},this.group),o.object3d.name="地图标签组",yield Promise.all(this.mapArea.map(O=>K0(this,null,function*(){let{name:j,adcode:le,centroid:fe}=O.userData;const{DistrictID:Se,DistName:Ce,iso_a2:Re,center:Pe}=O.userData;if(le=le||Re||Se,fe=fe||Pe,j=j||Ce,!fe)return;const Ne=this.getLocationPosition(fe);if(this.lead.getObject("Node",{key:`mapLabel-${le}`})||!Ne)return;const[Fe,Gt,xt]=Ne;let ze=j;r==="lite"&&ze&&(ze=j.replace(/自治州|地区|自治区|省|市|壮族|特别行政区|回族|维吾尔/g,""));const ke=ze&&getLabelElement(ze),bt=ze!=null&&ze.startsWith("澳门")?-1:0;yield this.lead.draw("Node",{position:new Vector3(Fe,Gt+bt,xt),children:ke,key:`$p:-${this.options.adcode===0?j:le}`},o)}))))})}eraseLabels(){const r=this.lead.getObject("Group",{key:"mapLabel"});r==null||r.erase()}geAdcodePosition(r){var V;const o=(V=this.mapArea)==null?void 0:V.find(O=>O.userData.adcode===r);if(o){const{centroid:O,center:j}=o.userData;return this.getLocationPosition(O||j)}}getLocationPosition(r){const[o,V]=r,[O,j]=this.projection([o,V]);return[O,-j,this.mapObj?this.mapObj.z+this.mapObj.depth:0]}setObjectOnMap(r,o,V=0){const O=this.getLocationPosition(o);r.position.set(O[0],O[1],O[2]+V)}setObjectOnMapAreaByProperty(r,o,V,O=0){var le;const j=(le=this.mapArea)==null?void 0:le.find(fe=>fe.userData[o]===V);if(j){const{centroid:fe,center:Se}=j.userData,Ce=this.getLocationPosition(fe||Se);r.position.set(Ce[0],Ce[1],Ce[2]+O)}}getAdcodeScreenPosition(r){const o=this.geAdcodePosition(r);if(o){const[V,O,j]=o,le=new Vector3(V,O,j);le.project(this.pencil.camera);const{width:fe,height:Se}=this.pencil.getSize(),Ce=(le.x*.5+.5)*fe,Re=(le.y*-.5+.5)*Se;return{x:Ce,y:Re}}}booleanPointInCn(r){return chinaLiteJson.features[0].geometry.coordinates.some(o=>turf.booleanPointInPolygon(turf.point(r),turf.polygon(o)))}booleanPointInMap(r,o){var le,fe;const V=o!=null?o:(le=this.mapInfo)==null?void 0:le.adcode;if(!V)return!1;const O=findAdcodeInfo(V);if(O!=null&&O.b){const[Se,Ce,Re,Pe]=O.b,[Ne,Fe]=r;if(Ne<Se||Ne>Re||Fe<Ce||Fe>Pe)return!1}const j=(fe=this.options.extrudeLineGeojsonMap)==null?void 0:fe[V];return j?j.features.some(Se=>{const Ce=Se.geometry.coordinates;return Se.geometry.type==="Polygon"?Ce.some(Re=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Re]))):Se.geometry.type==="MultiPolygon"?Ce.some(Re=>Re.some(Pe=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Pe])))):!1}):!1}getGeojson(r,o=!1){return K0(this,null,function*(){var V,O,j,le;return o?this.options.extrudeLine?(j=this.options.extrudeLineGeojsonMap)!=null&&j[r]?{res:(le=this.options.extrudeLineGeojsonMap)==null?void 0:le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`):{res:void 0}:(V=this.options.geojsonMap)!=null&&V[r]?{res:(O=this.options.geojsonMap)==null?void 0:O[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json/${r}.json`)})}handleDrillDown(le){return K0(this,arguments,function*({adcode:r,duration:o,handleLook:V,saveBackCamvasState:O,extrudelineBloom:j}){var fe,Se,Ce,Re,Pe;if(typeof r!="undefined"&&!this.isAnimating){const Ne=(fe=this.map)==null?void 0:fe.findGroup(r,!0),Fe=findAdcodeInfo(+r);if(this.isAnimating||!Fe)return;this.isAnimating=!0;const{name:Gt}=Fe;let{res:xt}=yield this.getGeojson(r),{res:ze}=yield this.getGeojson(r,!0);if(!this.options.showDistrict&&this.getAdcodeShowLevel(r)==="city"&&(xt=ze,ze=void 0),[xt,ze].filter(Boolean).forEach(bt=>{if(!bt.features[0].properties.adcode&&/^\d{6}$/.test(`${r}`)){const Xt=findAdcodeInfo(r);bt.features[0].properties=Ji($0($0({},bt.features[0].properties),Xt),{center:[Xt.lng,Xt.lat]})}}),xt){const bt=this.options.plateInCenter&&(this.mapHistory.length<1||this.options.drillDownPlateInCenter);if((Se=this.options.fixGeojson)!=null&&Se[r]){const Yt=(Ce=this.options.fixGeojson)==null?void 0:Ce[r];if(Yt.startsWith("-")){const n0=+Yt.slice(1);xt.features=xt.features.filter(d0=>d0.properties.adcode!==n0)}}let Xt=findAdcodeInfo(r).b;const Zt=[...Xt];this.mapHistory.length===1&&!this.options.drillDownSecondLevelMats?Xt=findAdcodeInfo(this.mapInfo.adcode).b:this.mapHistory.length===2&&!this.options.drillDownThirdLevelMats&&(this.options.drillDownSecondLevelMats?Xt=findAdcodeInfo(this.mapInfo.adcode).b:Xt=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b),this.eraseLabels(),this.map&&(this.options.drillDownHideParent&&this.parentBg.forEach(Yt=>{Yt.hide()}),this.options.showOneLevel?this.map.hide():this.map.deactive(),O&&this.saveCamvasState("userControls",-1));const Vt=this.mapHistory.length,Wt=Vt-1,It=this.getDepth(r,Zt),Pt=(Re=this.mapHistory[Wt])==null?void 0:Re.depth,Nt=Vt===0||this.options.showOneLevel?0:this.mapHistory[Wt].z+Pt,Ft=Vt===0||this.options.showOneLevel?0:Nt-It,qt=turf.center(xt).geometry.coordinates,[i0,s0]=this.projection(qt),e0=yield this.drawPlaneMap({geojson:xt,extrudeLineGeojson:ze,depth:It,bbox:Xt,adcode:r,extrudelineBloom:j});Ne==null||Ne.hide(),e0.position.setZ(Ft);const Kt=e0.position.z,Ht=()=>K0(this,null,function*(){yield sinusoidalInOut({onUpdate:Yt=>{Nt!==Kt&&(e0.position.z=Kt+(Nt-Kt)*Yt)}}).start({duration:o})});if(bt)if(this.fixNear(r),e0.position.z=Nt,V){const Yt=(Pe=this.mapHistory.at(-1))==null?void 0:Pe.controls;yield this.fitTo(e0,{z:Nt+It,adcode:r,enableTransition:o!==0,polarAngle:Yt==null?void 0:Yt.polarAngle,azimuthAngle:Yt==null?void 0:Yt.azimuthAngle,handleStart:()=>K0(this,null,function*(){e0.position.z=Kt,yield Ht()})})}else this.options.showOneLevel&&e0.hide();else yield Ht();this.mapHistory.push({map:e0,mapInfo:Fe,z:Nt,depth:It,cX:i0,cY:-s0}),V&&this.drawLabels(),this.saveCamvasState("controls",-1)}else console.log(`${Gt}的地图数据不存在`);this.event.emit("handleDrillDown",{adcode:r,z:this.mapObj.z+this.mapObj.depth})}this.isAnimating=!1})}saveCamvasState(r,o){const V=this.mapHistory.at(o);V&&(V[r]={lookAt:[...this.pencil.cameraPositon.toArray(),...this.pencil.cameraTarget.toArray()],polarAngle:this.pencil.controls.polarAngle,azimuthAngle:this.pencil.controls.azimuthAngle})}fixNear(r){const o=this.getAdcodeShowLevel(r),V=this.pencil.options;r===0?(this.pencil.camera.near=1,this.pencil.camera.far=1e3,this.pencil.camera.updateProjectionMatrix()):(o==="country"||o==="province")&&this.pencil.camera.near!==V.camera.near*10?(this.pencil.camera.near=V.camera.near*10,this.pencil.camera.updateProjectionMatrix()):(o==="city"||o==="district")&&this.pencil.camera.near!==V.camera.near&&(this.pencil.camera.near=V.camera.near,this.pencil.camera.updateProjectionMatrix())}fitTo(Se){return K0(this,arguments,function*(r,{polarAngle:o,azimuthAngle:V,z:O,handleStart:j,adcode:le,enableTransition:fe=!0}={}){if(!(r!=null&&r.object3d))return;if(le&&(yield this.useSaveCamera(`map-${le}`,fe))){j&&(yield j());return}const Ce=this.options.mapPadding,{height:Re,width:Pe}=this.pencil.getSize();Re<Ce[0]+Ce[2]+50&&(Ce[0]=0,Ce[2]=0),Pe<Ce[1]+Ce[3]+50&&(Ce[1]=0,Ce[3]=0);const Ne=o!=null?o:this.options.polarAngle,Fe=V!=null?V:this.options.azimuthAngle,Gt=this.pencil.cameraPositon.toArray(),xt=this.pencil.cameraTarget.toArray();yield this.paddingInCssPixel(r,Ce[0],Ce[1],Ce[2],Ce[3],!1);let ze;O&&(ze=this.pencil.cameraTarget.toArray(),yield this.pencil.controls.setTarget(ze[0],ze[1],O,!1)),yield this.pencil.controls.rotateTo(Fe,Ne,!1),ze=this.pencil.cameraTarget.toArray();const ke=this.pencil.cameraPositon.toArray();yield this.lookAt(...Gt,...xt),yield Promise.all([this.lookAt(...ke,...ze,fe),j==null?void 0:j()].filter(Boolean))})}drawPlaneMap(fe){return K0(this,arguments,function*({geojson:r,extrudeLineGeojson:o,bbox:V,depth:O,extrudelineBloom:j,adcode:le}){var Gt;const Se=[this.mList.getMultiple("plane"),this.mList.getMultiple("secondPlane"),this.mList.getMultiple("thirdPlane")];let Ce=this.mapHistory.length,Re=null;for(;Re===null;)Re=Se[Ce],Ce--;const Pe=this.mList.getMultiple("bgPlane"),Ne=$0($0({},Re),Pe?{bgTopMat:Pe.topMat,bgSideMat:Pe.sideMat,bgLineMat:Pe.lineMat,bgExtrudeLineMat:Pe.extrudeLineMat}:{}),Fe=yield this.lead.draw("PlaneMap",{key:`${le}`,geojson:r,extrudeLineGeojson:o,depth:O,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:Ne,bbox:V,topSegments:this.options.topSegments,lineOffset:this.options.lineOffset,mergeSide:this.options.mergeSide},this.group);return Fe.object3d.name=((Gt=findAdcodeInfo(le))==null?void 0:Gt.name)||`${le}`,this.options.style==="map2CityOnMap"&&!this.options.showCityOnMapInnerLine&&(Re.lineMat.colorWrite=!1,Fe.lineArr.forEach(xt=>{xt.userData.selectHide=!0})),Fe.extrudelineArr&&Fe.extrudelineArr.forEach(xt=>{xt.object3d.name="板块边线",this.lead.updateBaseObjectKey(xt,{type:"extrudeLine",key:this.mapHistory.length?"$p:":void 0}),this.initBaseObjectUserData(xt),j&&(xt.object3d.userData.bloom=!0)}),Fe.lineArr&&Fe.lineArr.forEach(xt=>{this.initBaseObjectUserData(xt)}),Fe})}handleBack(){return K0(this,arguments,function*({duration:r=1e3,handleLookBack:o=!0,keepOne:V=!0}={}){if(this.isAnimating||(V?this.mapHistory.length<=1:this.mapHistory.length===0))return;this.isAnimating=!0;const O=this.mapHistory.pop();if(!this.options.drillDownPlateInCenter){const j=O.map.position.z,le=this.mapObj?this.mapObj.z+(this.mapObj.depth-O.depth):0;yield sinusoidalInOut({onUpdate:fe=>{O.map.position.z=j+(le-j)*fe}}).start({duration:r})}if(this.lead.eraseWithoutMaterial(O.map),this.eraseLabels(),this.mapObj){const{map:j}=this.mapObj,le=j==null?void 0:j.findGroup(O.mapInfo.adcode,!0);le&&le.show(),j&&o&&(this.options.showOneLevel?j.show():j.active(),this.options.drillDownHideParent&&this.parentBg.forEach(fe=>{fe.show()}),yield this.handleLookBack(r),this.drawLabels())}this.emit("handleBack",{adcodes:this.adcodes}),this.isAnimating=!1})}handleLookBack(r){return K0(this,null,function*(){const{userControls:o,controls:V}=this.mapObj;yield this.pencil.controls.setLookAt(...o?o.lookAt:V.lookAt,r!==0)})}compareLocations(r,o){const V=r.filter(fe=>fe),O=o.filter(fe=>fe),j=[];let le=0;for(let fe=0;fe<Math.min(V.length,O.length)&&V[fe]===O[fe];fe++)le++;for(let fe=le;fe<V.length;fe++)j.push(-1);for(let fe=le;fe<O.length;fe++)j.push(O[fe]);return j}setAdcode(V){return K0(this,arguments,function*({adcodes:r,duration:o}){var j,le,fe;const{adcodes:O}=this;if(!(JSON.stringify(r)===JSON.stringify(O)||this.isAnimating))if(JSON.stringify(r)===JSON.stringify([0]))try{yield this.handleDrillDown({adcode:0,duration:o,handleLook:!0})}catch(Ne){console.error(Ne)}else{const{continent:Ne,country:Fe,province:Gt,city:xt,district:ze}=r.reduce((Nt,Ft)=>{const qt=this.getAdcodeShowLevel(Ft);return Nt[qt]=Ft,Nt},{}),{continent:ke,country:bt,province:Xt,city:Zt,district:Vt}=O.reduce((Nt,Ft)=>{const qt=this.getAdcodeShowLevel(Ft);return Nt[qt]=Ft,Nt},{}),Wt=Ne||ke,It=(fe=(le=(j=this.map)==null?void 0:j.extrudelineArr)==null?void 0:le[0])==null?void 0:fe.object3d.userData.bloom,Pt=this.compareLocations([ke,bt,Xt,Zt,Vt],[Ne,Fe,Gt,xt,ze]);try{for(var Se=kn(Pt.entries()),Ce,Re,Pe;Ce=!(Re=yield Se.next()).done;Ce=!1){const[Nt,Ft]=Re.value;const qt=Nt===Pt.length-1?o:0,i0=Nt===Pt.length-1;Ft===-1?yield this.handleBack({duration:qt,handleLookBack:i0,keepOne:!Wt}):yield this.handleDrillDown({adcode:Ft,duration:qt,handleLook:i0,saveBackCamvasState:Pt.includes(-1)?!1:this.options.handleBackKeepCamvasState,extrudelineBloom:It})}}catch(Re){Pe=[Re]}finally{try{Ce&&(Re=Se.return)&&(yield Re.call(Se))}finally{if(Pe)throw Pe[0]}}}})}setPadding(r,o=!1,V=!1){this.options.mapPadding=[...r],o&&this.fitTo(this.map,{enableTransition:V})}findAdcodeInfo(r){return findAdcodeInfo(r)}dispose(){var r,o,V;(r=this.cityVis)==null||r.dispose(),(o=this.map)==null||o.dispose(),this.parentBg.forEach(O=>{O.dispose()}),this.parentBg.length=0,(V=this.continentsBg)==null||V.dispose(),this.continentsBg=void 0,this.mapHistory.length=0,super.dispose()}};v0(Mn,"VisName","map"),v0(Mn,"getAdcodeShowLevel",getAdcodeShowLevel);let index=Mn;const access={set token(v){accessToken.token=v}},VERSION=version;exports.Base=Base;exports.City=City$1;exports.Earth=index$1;exports.Map=index;exports.THREE=THREE;exports.TWEEN=tween_esm;exports.VERSION=VERSION;exports.access=access;exports.animationUtils=animation;exports.getCityConfig=getCityConfig;exports.getMapConfig=getMapConfig;exports.removeCameraHistory=removeCameraHistory;
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
63
63
  Array.prototype.at || (Array.prototype.at = function(v) {
64
64
  return v < 0 && (v = this.length + v), this[v];
65
65
  });
66
- const version = "0.30.0-beta.15", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
66
+ const version = "0.30.0-beta.16", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
67
67
  token: void 0,
68
68
  getInfo() {
69
69
  if (!this.token)
@@ -144786,14 +144786,20 @@ const getLabelElement = (v) => {
144786
144786
  * @returns 是否在板块内
144787
144787
  */
144788
144788
  booleanPointInMap(r, o) {
144789
- var j, le;
144790
- const V = o != null ? o : (j = this.mapInfo) == null ? void 0 : j.adcode;
144789
+ var le, fe;
144790
+ const V = o != null ? o : (le = this.mapInfo) == null ? void 0 : le.adcode;
144791
144791
  if (!V)
144792
144792
  return !1;
144793
- const O = (le = this.options.extrudeLineGeojsonMap) == null ? void 0 : le[V];
144794
- return O ? O.features.some((fe) => {
144795
- const Se = fe.geometry.coordinates;
144796
- return fe.geometry.type === "Polygon" ? Se.some((Ce) => booleanPointInPolygon$1(point(r), polygon([Ce]))) : fe.geometry.type === "MultiPolygon" ? Se.some((Ce) => Ce.some((Re) => booleanPointInPolygon$1(point(r), polygon([Re])))) : !1;
144793
+ const O = findAdcodeInfo(V);
144794
+ if (O != null && O.b) {
144795
+ const [Se, Ce, Re, Pe] = O.b, [Ne, Fe] = r;
144796
+ if (Ne < Se || Ne > Re || Fe < Ce || Fe > Pe)
144797
+ return !1;
144798
+ }
144799
+ const j = (fe = this.options.extrudeLineGeojsonMap) == null ? void 0 : fe[V];
144800
+ return j ? j.features.some((Se) => {
144801
+ const Ce = Se.geometry.coordinates;
144802
+ return Se.geometry.type === "Polygon" ? Ce.some((Re) => booleanPointInPolygon$1(point(r), polygon([Re]))) : Se.geometry.type === "MultiPolygon" ? Ce.some((Re) => Re.some((Pe) => booleanPointInPolygon$1(point(r), polygon([Pe])))) : !1;
144797
144803
  }) : !1;
144798
144804
  }
144799
144805
  getGeojson(r, o = !1) {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.30.0-beta.15";
1
+ declare const _default: "0.30.0-beta.16";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.30.0-beta.15",
3
+ "version": "0.30.0-beta.16",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",