zhitong.yu
2024-03-15 ebd89b9ffa8980ac944a7e79ecc64c01637d4f17
1
2
/**Released Version v3.0.9,BUILD 168,Time 1650511519656. Fengmap Javascript SDK , see: https://www.fengmap.com for details**/
!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.fengmap=i():t.fengmap=i()}(this,function(){return n=[function(t,i,n){"use strict";n.r(i);for(var h=[],s=0;s<256;s++)h[s]=(s<16?"0":"")+s.toString(16);var p={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t=4294967295*Math.random()|0,i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,s=4294967295*Math.random()|0;return(h[255&t]+h[t>>8&255]+h[t>>16&255]+h[t>>24&255]+"-"+h[255&i]+h[i>>8&255]+"-"+h[i>>16&15|64]+h[i>>24&255]+"-"+h[63&n|128]+h[n>>8&255]+"-"+h[n>>16&255]+h[n>>24&255]+h[255&s]+h[s>>8&255]+h[s>>16&255]+h[s>>24&255]).toUpperCase()},clamp:function(t,i,n){return Math.max(i,Math.min(n,t))},euclideanModulo:function(t,i){return(t%i+i)%i},mapLinear:function(t,i,n,s,h){return s+(t-i)*(h-s)/(n-i)},lerp:function(t,i,n){return(1-n)*t+n*i},smoothstep:function(t,i,n){return t<=i?0:n<=t?1:(t=(t-i)/(n-i))*t*(3-2*t)},smootherstep:function(t,i,n){return t<=i?0:n<=t?1:(t=(t-i)/(n-i))*t*t*(t*(6*t-15)+10)},randInt:function(t,i){return t+Math.floor(Math.random()*(i-t+1))},randFloat:function(t,i){return t+Math.random()*(i-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*p.DEG2RAD},radToDeg:function(t){return t*p.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,i,n,s,h){var e=Math.cos,r=Math.sin,o=e(n/2),u=r(n/2),a=e((i+s)/2),c=r((i+s)/2),f=e((i-s)/2),n=r((i-s)/2),e=e((s-i)/2),i=r((s-i)/2);"XYX"===h?t.set(o*c,u*f,u*n,o*a):"YZY"===h?t.set(u*n,o*c,u*f,o*a):"ZXZ"===h?t.set(u*f,u*n,o*c,o*a):"XZX"===h?t.set(o*c,u*i,u*e,o*a):"YXY"===h?t.set(u*e,o*c,u*i,o*a):"ZYZ"===h?t.set(u*i,u*e,o*c,o*a):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function e(t,i,n,s){this.e=t||0,this.u=i||0,this.a=n||0,this.f=void 0!==s?s:1}Object.assign(e,{slerp:function(t,i,n,s){return n.copy(t).slerp(i,s)},slerpFlat:function(t,i,n,s,h,e,r){var o=n[s+0],u=n[s+1],a=n[s+2],c=n[s+3],f=h[e+0],l=h[e+1],d=h[e+2],p=h[e+3];c===p&&o===f&&u===l&&a===d||(n=1-r,h=0<=(s=o*f+u*l+a*d+c*p)?1:-1,(e=1-s*s)>Number.EPSILON&&(e=Math.sqrt(e),s=Math.atan2(e,s*h),n=Math.sin(n*s)/e,r=Math.sin(r*s)/e),o=o*n+f*(h=r*h),u=u*n+l*h,a=a*n+d*h,c=c*n+p*h,n===1-r&&(o*=r=1/Math.sqrt(o*o+u*u+a*a+c*c),u*=r,a*=r,c*=r)),t[i]=o,t[i+1]=u,t[i+2]=a,t[i+3]=c}}),Object.defineProperties(e.prototype,{x:{get:function(){return this.e},set:function(t){this.e=t,this.v()}},y:{get:function(){return this.u},set:function(t){this.u=t,this.v()}},z:{get:function(){return this.a},set:function(t){this.a=t,this.v()}},w:{get:function(){return this.f},set:function(t){this.f=t,this.v()}}}),Object.assign(e.prototype,{isQuaternion:!0,set:function(t,i,n,s){return this.e=t,this.u=i,this.a=n,this.f=s,this.v(),this},clone:function(){return new this.constructor(this.e,this.u,this.a,this.f)},copy:function(t){return this.e=t.x,this.u=t.y,this.a=t.z,this.f=t.w,this.v(),this},setFromEuler:function(t,i){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t.e,s=t.u,h=t.a,e=t.order,r=Math.cos,o=Math.sin,u=r(n/2),t=r(s/2),r=r(h/2),n=o(n/2),s=o(s/2),h=o(h/2);return"XYZ"===e?(this.e=n*t*r+u*s*h,this.u=u*s*r-n*t*h,this.a=u*t*h+n*s*r,this.f=u*t*r-n*s*h):"YXZ"===e?(this.e=n*t*r+u*s*h,this.u=u*s*r-n*t*h,this.a=u*t*h-n*s*r,this.f=u*t*r+n*s*h):"ZXY"===e?(this.e=n*t*r-u*s*h,this.u=u*s*r+n*t*h,this.a=u*t*h+n*s*r,this.f=u*t*r-n*s*h):"ZYX"===e?(this.e=n*t*r-u*s*h,this.u=u*s*r+n*t*h,this.a=u*t*h-n*s*r,this.f=u*t*r+n*s*h):"YZX"===e?(this.e=n*t*r+u*s*h,this.u=u*s*r+n*t*h,this.a=u*t*h-n*s*r,this.f=u*t*r-n*s*h):"XZY"===e&&(this.e=n*t*r-u*s*h,this.u=u*s*r-n*t*h,this.a=u*t*h+n*s*r,this.f=u*t*r+n*s*h),!1!==i&&this.v(),this},setFromAxisAngle:function(t,i){var n=i/2,i=Math.sin(n);return this.e=t.x*i,this.u=t.y*i,this.a=t.z*i,this.f=Math.cos(n),this.v(),this},setFromRotationMatrix:function(t){var i,n=t.elements,s=n[0],h=n[4],e=n[8],r=n[1],o=n[5],u=n[9],a=n[2],c=n[6],t=n[10],n=s+o+t;return 0<n?(i=.5/Math.sqrt(n+1),this.f=.25/i,this.e=(c-u)*i,this.u=(e-a)*i,this.a=(r-h)*i):o<s&&t<s?(i=2*Math.sqrt(1+s-o-t),this.f=(c-u)/i,this.e=.25*i,this.u=(h+r)/i,this.a=(e+a)/i):t<o?(i=2*Math.sqrt(1+o-s-t),this.f=(e-a)/i,this.e=(h+r)/i,this.u=.25*i,this.a=(u+c)/i):(i=2*Math.sqrt(1+t-s-o),this.f=(r-h)/i,this.e=(e+a)/i,this.u=(u+c)/i,this.a=.25*i),this.v(),this},setFromUnitVectors:function(t,i){var n=t.dot(i)+1;return n<1e-6?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this.e=-t.y,this.u=t.x,this.a=0):(this.e=0,this.u=-t.z,this.a=t.y)):(this.e=t.y*i.z-t.z*i.y,this.u=t.z*i.x-t.x*i.z,this.a=t.x*i.y-t.y*i.x),this.f=n,this.normalize()},angleTo:function(t){return 2*Math.acos(Math.abs(p.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,i){var n=this.angleTo(t);if(0===n)return this;n=Math.min(1,i/n);return this.slerp(t,n),this},inverse:function(){return this.conjugate()},conjugate:function(){return this.e*=-1,this.u*=-1,this.a*=-1,this.v(),this},dot:function(t){return this.e*t.e+this.u*t.u+this.a*t.a+this.f*t.f},lengthSq:function(){return this.e*this.e+this.u*this.u+this.a*this.a+this.f*this.f},length:function(){return Math.sqrt(this.e*this.e+this.u*this.u+this.a*this.a+this.f*this.f)},normalize:function(){var t=this.length();return 0===t?(this.e=0,this.u=0,this.a=0,this.f=1):(this.e=this.e*(t=1/t),this.u=this.u*t,this.a=this.a*t,this.f=this.f*t),this.v(),this},multiply:function(t,i){return void 0!==i?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,i)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,i){var n=t.e,s=t.u,h=t.a,e=t.f,r=i.e,o=i.u,t=i.a,i=i.f;return this.e=n*i+e*r+s*t-h*o,this.u=s*i+e*o+h*r-n*t,this.a=h*i+e*t+n*o-s*r,this.f=e*i-n*r-s*o-h*t,this.v(),this},slerp:function(t,i){if(0===i)return this;if(1===i)return this.copy(t);var n=this.e,s=this.u,h=this.a,e=this.f,r=e*t.f+n*t.e+s*t.u+h*t.a;if(r<0?(this.f=-t.f,this.e=-t.e,this.u=-t.u,this.a=-t.a,r=-r):this.copy(t),1<=r)return this.f=e,this.e=n,this.u=s,this.a=h,this;t=1-r*r;if(t<=Number.EPSILON){var o=1-i;return this.f=o*e+i*this.f,this.e=o*n+i*this.e,this.u=o*s+i*this.u,this.a=o*h+i*this.a,this.normalize(),this.v(),this}o=Math.sqrt(t),t=Math.atan2(o,r),r=Math.sin((1-i)*t)/o,o=Math.sin(i*t)/o;return this.f=e*r+this.f*o,this.e=n*r+this.e*o,this.u=s*r+this.u*o,this.a=h*r+this.a*o,this.v(),this},equals:function(t){return t.e===this.e&&t.u===this.u&&t.a===this.a&&t.f===this.f},fromArray:function(t,i){return this.e=t[i=void 0===i?0:i],this.u=t[i+1],this.a=t[i+2],this.f=t[i+3],this.v(),this},toArray:function(t,i){return(t=void 0===t?[]:t)[i=void 0===i?0:i]=this.e,t[i+1]=this.u,t[i+2]=this.a,t[i+3]=this.f,t},fromBufferAttribute:function(t,i){return this.e=t.getX(i),this.u=t.getY(i),this.a=t.getZ(i),this.f=t.getW(i),this},M:function(t){return this.v=t,this},v:function(){}});var r=new v,o=new e;function v(t,i,n){this.x=t||0,this.y=i||0,this.z=n||0}Object.assign(v.prototype,{isVector3:!0,set:function(t,i,n){return this.x=t,this.y=i,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,i)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this},addScaledVector:function(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this},sub:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,i)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this},multiply:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,i)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,i){return this.x=t.x*i.x,this.y=t.y*i.y,this.z=t.z*i.z,this},applyEuler:function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(o.setFromEuler(t))},applyAxisAngle:function(t,i){return this.applyQuaternion(o.setFromAxisAngle(t,i))},applyMatrix3:function(t){var i=this.x,n=this.y,s=this.z,t=t.elements;return this.x=t[0]*i+t[3]*n+t[6]*s,this.y=t[1]*i+t[4]*n+t[7]*s,this.z=t[2]*i+t[5]*n+t[8]*s,this},applyNormalMatrix:function(t){return this.applyMatrix3(t).normalize()},applyMatrix4:function(t){var i=this.x,n=this.y,s=this.z,h=t.elements,t=1/(h[3]*i+h[7]*n+h[11]*s+h[15]);return this.x=(h[0]*i+h[4]*n+h[8]*s+h[12])*t,this.y=(h[1]*i+h[5]*n+h[9]*s+h[13])*t,this.z=(h[2]*i+h[6]*n+h[10]*s+h[14])*t,this},applyQuaternion:function(t){var i=this.x,n=this.y,s=this.z,h=t.x,e=t.y,r=t.z,o=t.w,u=o*i+e*s-r*n,a=o*n+r*i-h*s,t=o*s+h*n-e*i,s=-h*i-e*n-r*s;return this.x=u*o+s*-h+a*-r-t*-e,this.y=a*o+s*-e+t*-h-u*-r,this.z=t*o+s*-r+u*-e-a*-h,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)},transformDirection:function(t){var i=this.x,n=this.y,s=this.z,t=t.elements;return this.x=t[0]*i+t[4]*n+t[8]*s,this.y=t[1]*i+t[5]*n+t[9]*s,this.z=t[2]*i+t[6]*n+t[10]*s,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this},clampScalar:function(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this},clampLength:function(t,i){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(i,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this},lerpVectors:function(t,i,n){return this.subVectors(i,t).multiplyScalar(n).add(t)},cross:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,i)):this.crossVectors(this,t)},crossVectors:function(t,i){var n=t.x,s=t.y,h=t.z,e=i.x,t=i.y,i=i.z;return this.x=s*i-h*t,this.y=h*e-n*i,this.z=n*t-s*e,this},projectOnVector:function(t){var i=t.lengthSq();if(0===i)return this.set(0,0,0);i=t.dot(this)/i;return this.copy(t).multiplyScalar(i)},projectOnPlane:function(t){return r.copy(this).projectOnVector(t),this.sub(r)},reflect:function(t){return this.sub(r.copy(t).multiplyScalar(2*this.dot(t)))},angleTo:function(t){var i=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===i)return Math.PI/2;i=this.dot(t)/i;return Math.acos(p.clamp(i,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var i=this.x-t.x,n=this.y-t.y,t=this.z-t.z;return i*i+n*n+t*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)},setFromSphericalCoords:function(t,i,n){var s=Math.sin(i)*t;return this.x=s*Math.sin(n),this.y=Math.cos(i)*t,this.z=s*Math.cos(n),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,i,n){return this.x=t*Math.sin(i),this.y=n,this.z=t*Math.cos(i),this},setFromMatrixPosition:function(t){t=t.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(t){var i=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),t=this.setFromMatrixColumn(t,2).length();return this.x=i,this.y=n,this.z=t,this},setFromMatrixColumn:function(t,i){return this.fromArray(t.elements,4*i)},setFromMatrix3Column:function(t,i){return this.fromArray(t.elements,3*i)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,i){return this.x=t[i=void 0===i?0:i],this.y=t[i+1],this.z=t[i+2],this},toArray:function(t,i){return(t=void 0===t?[]:t)[i=void 0===i?0:i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t},fromBufferAttribute:function(t,i,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this}});var u=new v,a=new m,c=new v(0,0,0),f=new v(1,1,1),l=new v,d=new v,y=new v;function m(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function M(){this.type="Curve",this.arcLengthDivisions=200}function A(t,i){this.x=t||0,this.y=i||0}function g(t,i,n,s,h,e,r,o){M.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=i||0,this.xRadius=n||1,this.yRadius=s||1,this.aStartAngle=h||0,this.aEndAngle=e||2*Math.PI,this.aClockwise=r||!1,this.aRotation=o||0}Object.assign(m.prototype,{isMatrix4:!0,set:function(t,i,n,s,h,e,r,o,u,a,c,f,l,d,p,v){var y=this.elements;return y[0]=t,y[4]=i,y[8]=n,y[12]=s,y[1]=h,y[5]=e,y[9]=r,y[13]=o,y[2]=u,y[6]=a,y[10]=c,y[14]=f,y[3]=l,y[7]=d,y[11]=p,y[15]=v,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new m).fromArray(this.elements)},copy:function(t){var i=this.elements,t=t.elements;return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],this},copyPosition:function(t){var i=this.elements,t=t.elements;return i[12]=t[12],i[13]=t[13],i[14]=t[14],this},extractBasis:function(t,i,n){return t.setFromMatrixColumn(this,0),i.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,i,n){return this.set(t.x,i.x,n.x,0,t.y,i.y,n.y,0,t.z,i.z,n.z,0,0,0,0,1),this},extractRotation:function(t){var i=this.elements,n=t.elements,s=1/u.setFromMatrixColumn(t,0).length(),h=1/u.setFromMatrixColumn(t,1).length(),t=1/u.setFromMatrixColumn(t,2).length();return i[0]=n[0]*s,i[1]=n[1]*s,i[2]=n[2]*s,i[3]=0,i[4]=n[4]*h,i[5]=n[5]*h,i[6]=n[6]*h,i[7]=0,i[8]=n[8]*t,i[9]=n[9]*t,i[10]=n[10]*t,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this},makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var i,n,s,h,e,r,o,u,a,c,f,l,d=this.elements,p=t.x,v=t.y,y=t.z,m=Math.cos(p),M=Math.sin(p),A=Math.cos(v),p=Math.sin(v),v=Math.cos(y),y=Math.sin(y);return"XYZ"===t.order?(e=m*v,r=m*y,o=M*v,u=M*y,d[0]=A*v,d[4]=-A*y,d[8]=p,d[1]=r+o*p,d[5]=e-u*p,d[9]=-M*A,d[2]=u-e*p,d[6]=o+r*p,d[10]=m*A):"YXZ"===t.order?(n=A*y,s=p*v,d[0]=(i=A*v)+(h=p*y)*M,d[4]=s*M-n,d[8]=m*p,d[1]=m*y,d[5]=m*v,d[9]=-M,d[2]=n*M-s,d[6]=h+i*M,d[10]=m*A):"ZXY"===t.order?(n=A*y,s=p*v,d[0]=(i=A*v)-(h=p*y)*M,d[4]=-m*y,d[8]=s+n*M,d[1]=n+s*M,d[5]=m*v,d[9]=h-i*M,d[2]=-m*p,d[6]=M,d[10]=m*A):"ZYX"===t.order?(e=m*v,r=m*y,o=M*v,u=M*y,d[0]=A*v,d[4]=o*p-r,d[8]=e*p+u,d[1]=A*y,d[5]=u*p+e,d[9]=r*p-o,d[2]=-p,d[6]=M*A,d[10]=m*A):"YZX"===t.order?(a=m*A,c=m*p,f=M*A,l=M*p,d[0]=A*v,d[4]=l-a*y,d[8]=f*y+c,d[1]=y,d[5]=m*v,d[9]=-M*v,d[2]=-p*v,d[6]=c*y+f,d[10]=a-l*y):"XZY"===t.order&&(a=m*A,c=m*p,f=M*A,l=M*p,d[0]=A*v,d[4]=-y,d[8]=p*v,d[1]=a*y+l,d[5]=m*v,d[9]=c*y-f,d[2]=f*y-c,d[6]=M*v,d[10]=l*y+a),d[3]=0,d[7]=0,d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,this},makeRotationFromQuaternion:function(t){return this.compose(c,t,f)},lookAt:function(t,i,n){var s=this.elements;return y.subVectors(t,i),0===y.lengthSq()&&(y.z=1),y.normalize(),l.crossVectors(n,y),0===l.lengthSq()&&(1===Math.abs(n.z)?y.x+=1e-4:y.z+=1e-4,y.normalize(),l.crossVectors(n,y)),l.normalize(),d.crossVectors(y,l),s[0]=l.x,s[4]=d.x,s[8]=y.x,s[1]=l.y,s[5]=d.y,s[9]=y.y,s[2]=l.z,s[6]=d.z,s[10]=y.z,this},multiply:function(t,i){return void 0!==i?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,i)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,i){var n=t.elements,s=i.elements,h=this.elements,e=n[0],r=n[4],o=n[8],u=n[12],a=n[1],c=n[5],f=n[9],l=n[13],d=n[2],p=n[6],v=n[10],y=n[14],m=n[3],M=n[7],A=n[11],g=n[15],b=s[0],w=s[4],E=s[8],R=s[12],k=s[1],S=s[5],T=s[9],x=s[13],j=s[2],O=s[6],B=s[10],V=s[14],t=s[3],i=s[7],n=s[11],s=s[15];return h[0]=e*b+r*k+o*j+u*t,h[4]=e*w+r*S+o*O+u*i,h[8]=e*E+r*T+o*B+u*n,h[12]=e*R+r*x+o*V+u*s,h[1]=a*b+c*k+f*j+l*t,h[5]=a*w+c*S+f*O+l*i,h[9]=a*E+c*T+f*B+l*n,h[13]=a*R+c*x+f*V+l*s,h[2]=d*b+p*k+v*j+y*t,h[6]=d*w+p*S+v*O+y*i,h[10]=d*E+p*T+v*B+y*n,h[14]=d*R+p*x+v*V+y*s,h[3]=m*b+M*k+A*j+g*t,h[7]=m*w+M*S+A*O+g*i,h[11]=m*E+M*T+A*B+g*n,h[15]=m*R+M*x+A*V+g*s,this},multiplyScalar:function(t){var i=this.elements;return i[0]*=t,i[4]*=t,i[8]*=t,i[12]*=t,i[1]*=t,i[5]*=t,i[9]*=t,i[13]*=t,i[2]*=t,i[6]*=t,i[10]*=t,i[14]*=t,i[3]*=t,i[7]*=t,i[11]*=t,i[15]*=t,this},determinant:function(){var t=this.elements,i=t[0],n=t[4],s=t[8],h=t[12],e=t[1],r=t[5],o=t[9],u=t[13],a=t[2],c=t[6],f=t[10],l=t[14];return t[3]*(+h*o*c-s*u*c-h*r*f+n*u*f+s*r*l-n*o*l)+t[7]*(+i*o*l-i*u*f+h*e*f-s*e*l+s*u*a-h*o*a)+t[11]*(+i*u*c-i*r*l-h*e*c+n*e*l+h*r*a-n*u*a)+t[15]*(-s*r*a-i*o*c+i*r*f+s*e*c-n*e*f+n*o*a)},transpose:function(){var t=this.elements,i=t[1];return t[1]=t[4],t[4]=i,i=t[2],t[2]=t[8],t[8]=i,i=t[6],t[6]=t[9],t[9]=i,i=t[3],t[3]=t[12],t[12]=i,i=t[7],t[7]=t[13],t[13]=i,i=t[11],t[11]=t[14],t[14]=i,this},setPosition:function(t,i,n){var s=this.elements;return t.isVector3?(s[12]=t.x,s[13]=t.y,s[14]=t.z):(s[12]=t,s[13]=i,s[14]=n),this},getInverse:function(t,i){void 0!==i&&console.warn("THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.");var n=this.elements,s=t.elements,h=s[0],e=s[1],r=s[2],o=s[3],u=s[4],a=s[5],c=s[6],f=s[7],l=s[8],d=s[9],p=s[10],v=s[11],y=s[12],m=s[13],M=s[14],A=s[15],g=d*M*f-m*p*f+m*c*v-a*M*v-d*c*A+a*p*A,b=y*p*f-l*M*f-y*c*v+u*M*v+l*c*A-u*p*A,i=l*m*f-y*d*f+y*a*v-u*m*v-l*a*A+u*d*A,t=y*d*c-l*m*c-y*a*p+u*m*p+l*a*M-u*d*M,s=h*g+e*b+r*i+o*t;if(0==s)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);s=1/s;return n[0]=g*s,n[1]=(m*p*o-d*M*o-m*r*v+e*M*v+d*r*A-e*p*A)*s,n[2]=(a*M*o-m*c*o+m*r*f-e*M*f-a*r*A+e*c*A)*s,n[3]=(d*c*o-a*p*o-d*r*f+e*p*f+a*r*v-e*c*v)*s,n[4]=b*s,n[5]=(l*M*o-y*p*o+y*r*v-h*M*v-l*r*A+h*p*A)*s,n[6]=(y*c*o-u*M*o-y*r*f+h*M*f+u*r*A-h*c*A)*s,n[7]=(u*p*o-l*c*o+l*r*f-h*p*f-u*r*v+h*c*v)*s,n[8]=i*s,n[9]=(y*d*o-l*m*o-y*e*v+h*m*v+l*e*A-h*d*A)*s,n[10]=(u*m*o-y*a*o+y*e*f-h*m*f-u*e*A+h*a*A)*s,n[11]=(l*a*o-u*d*o-l*e*f+h*d*f+u*e*v-h*a*v)*s,n[12]=t*s,n[13]=(l*m*r-y*d*r+y*e*p-h*m*p-l*e*M+h*d*M)*s,n[14]=(y*a*r-u*m*r-y*e*c+h*m*c+u*e*M-h*a*M)*s,n[15]=(u*d*r-l*a*r+l*e*c-h*d*c-u*e*p+h*a*p)*s,this},scale:function(t){var i=this.elements,n=t.x,s=t.y,t=t.z;return i[0]*=n,i[4]*=s,i[8]*=t,i[1]*=n,i[5]*=s,i[9]*=t,i[2]*=n,i[6]*=s,i[10]*=t,i[3]*=n,i[7]*=s,i[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements,i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(i,n,t))},makeTranslation:function(t,i,n){return this.set(1,0,0,t,0,1,0,i,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var i=Math.cos(t),t=Math.sin(t);return this.set(1,0,0,0,0,i,-t,0,0,t,i,0,0,0,0,1),this},makeRotationY:function(t){var i=Math.cos(t),t=Math.sin(t);return this.set(i,0,t,0,0,1,0,0,-t,0,i,0,0,0,0,1),this},makeRotationZ:function(t){var i=Math.cos(t),t=Math.sin(t);return this.set(i,-t,0,0,t,i,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,i){var n=Math.cos(i),s=Math.sin(i),h=1-n,e=t.x,r=t.y,o=t.z,i=h*e,t=h*r;return this.set(i*e+n,i*r-s*o,i*o+s*r,0,i*r+s*o,t*r+n,t*o-s*e,0,i*o-s*r,t*o+s*e,h*o*o+n,0,0,0,0,1),this},makeScale:function(t,i,n){return this.set(t,0,0,0,0,i,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,i,n){return this.set(1,i,n,0,t,1,n,0,t,i,1,0,0,0,0,1),this},compose:function(t,i,n){var s=this.elements,h=i.e,e=i.u,r=i.a,o=i.f,u=h+h,a=e+e,c=r+r,f=h*u,l=h*a,d=h*c,i=e*a,h=e*c,e=r*c,r=o*u,u=o*a,a=o*c,o=n.x,c=n.y,n=n.z;return s[0]=(1-(i+e))*o,s[1]=(l+a)*o,s[2]=(d-u)*o,s[3]=0,s[4]=(l-a)*c,s[5]=(1-(f+e))*c,s[6]=(h+r)*c,s[7]=0,s[8]=(d+u)*n,s[9]=(h-r)*n,s[10]=(1-(f+i))*n,s[11]=0,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=1,this},decompose:function(t,i,n){var s=this.elements,h=u.set(s[0],s[1],s[2]).length(),e=u.set(s[4],s[5],s[6]).length(),r=u.set(s[8],s[9],s[10]).length();this.determinant()<0&&(h=-h),t.x=s[12],t.y=s[13],t.z=s[14],a.copy(this);var o=1/h,t=1/e,s=1/r;return a.elements[0]*=o,a.elements[1]*=o,a.elements[2]*=o,a.elements[4]*=t,a.elements[5]*=t,a.elements[6]*=t,a.elements[8]*=s,a.elements[9]*=s,a.elements[10]*=s,i.setFromRotationMatrix(a),n.x=h,n.y=e,n.z=r,this},makePerspective:function(t,i,n,s,h,e){void 0===e&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var r=this.elements,o=2*h/(n-s),u=(i+t)/(i-t),n=(n+s)/(n-s),s=-(e+h)/(e-h),e=-2*e*h/(e-h);return r[0]=2*h/(i-t),r[4]=0,r[8]=u,r[12]=0,r[1]=0,r[5]=o,r[9]=n,r[13]=0,r[2]=0,r[6]=0,r[10]=s,r[14]=e,r[3]=0,r[7]=0,r[11]=-1,r[15]=0,this},makeOrthographic:function(t,i,n,s,h,e){var r=this.elements,o=1/(i-t),u=1/(n-s),a=1/(e-h),t=(i+t)*o,s=(n+s)*u,h=(e+h)*a;return r[0]=2*o,r[4]=0,r[8]=0,r[12]=-t,r[1]=0,r[5]=2*u,r[9]=0,r[13]=-s,r[2]=0,r[6]=0,r[10]=-2*a,r[14]=-h,r[3]=0,r[7]=0,r[11]=0,r[15]=1,this},equals:function(t){for(var i=this.elements,n=t.elements,s=0;s<16;s++)if(i[s]!==n[s])return!1;return!0},fromArray:function(t,i){void 0===i&&(i=0);for(var n=0;n<16;n++)this.elements[n]=t[n+i];return this},toArray:function(t,i){var n=this.elements;return(t=void 0===t?[]:t)[i=void 0===i?0:i]=n[0],t[i+1]=n[1],t[i+2]=n[2],t[i+3]=n[3],t[i+4]=n[4],t[i+5]=n[5],t[i+6]=n[6],t[i+7]=n[7],t[i+8]=n[8],t[i+9]=n[9],t[i+10]=n[10],t[i+11]=n[11],t[i+12]=n[12],t[i+13]=n[13],t[i+14]=n[14],t[i+15]=n[15],t}}),Object.assign(M.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,i){t=this.getUtoTmapping(t);return this.getPoint(t,i)},getPoints:function(t){void 0===t&&(t=5);for(var i=[],n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getSpacedPoints:function(t){void 0===t&&(t=5);for(var i=[],n=0;n<=t;n++)i.push(this.getPointAt(n/t));return i},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var i,n,s=[],h=this.getPoint(0),e=0;for(s.push(0),n=1;n<=t;n++)e+=(i=this.getPoint(n/t)).distanceTo(h),s.push(e),h=i;return this.cacheArcLengths=s},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,i){for(var n,s=this.getLengths(),h=0,e=s.length,r=i||t*s[e-1],o=0,u=e-1;o<=u;)if((n=s[h=Math.floor(o+(u-o)/2)]-r)<0)o=h+1;else{if(!(0<n)){u=h;break}u=h-1}if(s[h=u]===r)return h/(e-1);t=s[h];return(h+(r-t)/(s[h+1]-t))/(e-1)},getTangent:function(t){var i=t-1e-4,t=t+1e-4;1<t&&(t=1);i=this.getPoint(i=i<0?0:i);return this.getPoint(t).clone().sub(i).normalize()},getTangentAt:function(t){t=this.getUtoTmapping(t);return this.getTangent(t)},computeFrenetFrames:function(t,i){for(var n,s=new v,h=[],e=[],r=[],o=new v,u=new m,a=0;a<=t;a++)h[a]=this.getTangentAt(a/t),h[a].normalize();e[0]=new v,r[0]=new v;var c=Number.MAX_VALUE,f=Math.abs(h[0].x),l=Math.abs(h[0].y),d=Math.abs(h[0].z);for(f<=c&&(c=f,s.set(1,0,0)),l<=c&&(c=l,s.set(0,1,0)),d<=c&&s.set(0,0,1),o.crossVectors(h[0],s).normalize(),e[0].crossVectors(h[0],o),r[0].crossVectors(h[0],e[0]),a=1;a<=t;a++)e[a]=e[a-1].clone(),r[a]=r[a-1].clone(),o.crossVectors(h[a-1],h[a]),o.length()>Number.EPSILON&&(o.normalize(),n=Math.acos(p.clamp(h[a-1].dot(h[a]),-1,1)),e[a].applyMatrix4(u.makeRotationAxis(o,n))),r[a].crossVectors(h[a],e[a]);if(!0===i)for(n=Math.acos(p.clamp(e[0].dot(e[t]),-1,1)),n/=t,0<h[0].dot(o.crossVectors(e[0],e[t]))&&(n=-n),a=1;a<=t;a++)e[a].applyMatrix4(u.makeRotationAxis(h[a],n*a)),r[a].crossVectors(h[a],e[a]);return{tangents:h,normals:e,binormals:r}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Object.defineProperties(A.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(A.prototype,{isVector2:!0,set:function(t,i){return this.x=t,this.y=i,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,i){return void 0!==i?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,i)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this},addScaledVector:function(t,i){return this.x+=t.x*i,this.y+=t.y*i,this},sub:function(t,i){return void 0!==i?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,i)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var i=this.x,n=this.y,t=t.elements;return this.x=t[0]*i+t[3]*n+t[6],this.y=t[1]*i+t[4]*n+t[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this},clampScalar:function(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this},clampLength:function(t,i){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(i,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){return Math.atan2(-this.y,-this.x)+Math.PI},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var i=this.x-t.x,t=this.y-t.y;return i*i+t*t},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this},lerpVectors:function(t,i,n){return this.subVectors(i,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,i){return this.x=t[i=void 0===i?0:i],this.y=t[i+1],this},toArray:function(t,i){return(t=void 0===t?[]:t)[i=void 0===i?0:i]=this.x,t[i+1]=this.y,t},fromBufferAttribute:function(t,i,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(i),this.y=t.getY(i),this},rotateAround:function(t,i){var n=Math.cos(i),s=Math.sin(i),h=this.x-t.x,i=this.y-t.y;return this.x=h*n-i*s+t.x,this.y=h*s+i*n+t.y,this}}),((g.prototype=Object.create(M.prototype)).constructor=g).prototype.isEllipseCurve=!0,g.prototype.getPoint=function(t,i){for(var n=i||new A,s=2*Math.PI,h=this.aEndAngle-this.aStartAngle,e=Math.abs(h)<Number.EPSILON;h<0;)h+=s;for(;s<h;)h-=s;h<Number.EPSILON&&(h=e?0:s),!0!==this.aClockwise||e||(h===s?h=-s:h-=s);var r=this.aStartAngle+t*h,o=this.aX+this.xRadius*Math.cos(r),u=this.aY+this.yRadius*Math.sin(r);return 0!==this.aRotation&&(i=Math.cos(this.aRotation),e=Math.sin(this.aRotation),o=(t=o-this.aX)*i-(r=u-this.aY)*e+this.aX,u=t*e+r*i+this.aY),n.set(o,u)},g.prototype.copy=function(t){return M.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this};var b={FULL:0,DOTTED:2,DOT_DASH:4,CENTER:8,DASH:16,DOUBLE_DOT_DASH:32,TRI_DOT_DASH:64,FMARROW:128,ARROW:256},w=new v,E=new v,R=new v,k=new v,S=new v,T=new v,x=new v;function j(t,i){this.origin=void 0!==t?t:new v,this.direction=void 0!==i?i:new v(0,0,-1)}function O(){this.mask=1}function B(t,i,n,s){this.ray=new j(t,i),this.near=n||0,this.far=s||1/0,this.camera=null,this.layers=new O,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function V(t,i){return t.distance-i.distance}function I(t,i,n,s){if(t.layers.test(i.layers)&&t.raycast(i,n),!0===s)for(var h=t.children,e=0,r=h.length;e<r;e++)I(h[e],i,n,!0)}Object.assign(j.prototype,{set:function(t,i){return this.origin.copy(t),this.direction.copy(i),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,i){return void 0===i&&(console.warn("THREE.Ray: .at() target is now required"),i=new v),i.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(t){return this.origin.copy(this.at(t,w)),this},closestPointToPoint:function(t,i){void 0===i&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),i=new v),i.subVectors(t,this.origin);t=i.dot(this.direction);return t<0?i.copy(this.origin):i.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(t){var i=w.subVectors(t,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(t):(w.copy(this.direction).multiplyScalar(i).add(this.origin),w.distanceToSquared(t))},distanceSqToSegment:function(t,i,n,s){E.copy(t).add(i).multiplyScalar(.5),R.copy(i).sub(t).normalize(),k.copy(this.origin).sub(E);var h,e,r=.5*t.distanceTo(i),o=-this.direction.dot(R),u=k.dot(this.direction),a=-k.dot(R),c=k.lengthSq(),t=Math.abs(1-o*o);return c=0<t?(e=o*u-a,i=r*t,0<=(h=o*a-u)?-i<=e?e<=i?(h*=t=1/t)*(h+o*(e*=t)+2*u)+e*(o*h+e+2*a)+c:(e=r,-(h=Math.max(0,-(o*e+u)))*h+e*(e+2*a)+c):(e=-r,-(h=Math.max(0,-(o*e+u)))*h+e*(e+2*a)+c):e<=-i?-(h=Math.max(0,-(-o*r+u)))*h+(e=0<h?-r:Math.min(Math.max(-r,-a),r))*(e+2*a)+c:e<=i?(h=0,(e=Math.min(Math.max(-r,-a),r))*(e+2*a)+c):-(h=Math.max(0,-(o*r+u)))*h+(e=0<h?r:Math.min(Math.max(-r,-a),r))*(e+2*a)+c):(e=0<o?-r:r,-(h=Math.max(0,-(o*e+u)))*h+e*(e+2*a)+c),n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),s&&s.copy(R).multiplyScalar(e).add(E),c},intersectSphere:function(t,i){w.subVectors(t.center,this.origin);var n=w.dot(this.direction),s=w.dot(w)-n*n,t=t.radius*t.radius;if(t<s)return null;t=Math.sqrt(t-s),s=n-t,t=n+t;return s<0&&t<0?null:s<0?this.at(t,i):this.at(s,i)},intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var i=t.normal.dot(this.direction);if(0===i)return 0===t.distanceToPoint(this.origin)?0:null;i=-(this.origin.dot(t.normal)+t.constant)/i;return 0<=i?i:null},intersectPlane:function(t,i){t=this.distanceToPlane(t);return null===t?null:this.at(t,i)},intersectsPlane:function(t){var i=t.distanceToPoint(this.origin);return 0===i||t.normal.dot(this.direction)*i<0},intersectBox:function(t,i){var n,s,h,e=1/this.direction.x,r=1/this.direction.y,o=1/this.direction.z,u=this.origin,e=0<=e?(n=(t.min.x-u.x)*e,(t.max.x-u.x)*e):(n=(t.max.x-u.x)*e,(t.min.x-u.x)*e),r=0<=r?(s=(t.min.y-u.y)*r,(t.max.y-u.y)*r):(s=(t.max.y-u.y)*r,(t.min.y-u.y)*r);return r<n||e<s?null:((n<s||n!=n)&&(n=s),(r<e||e!=e)&&(e=r),(o=0<=o?(h=(t.min.z-u.z)*o,(t.max.z-u.z)*o):(h=(t.max.z-u.z)*o,(t.min.z-u.z)*o))<n||e<h?null:((n<h||n!=n)&&(n=h),(e=o<e||e!=e?o:e)<0?null:this.at(0<=n?n:e,i)))},intersectsBox:function(t){return null!==this.intersectBox(t,w)},intersectTriangle:function(t,i,n,s,h){S.subVectors(i,t),T.subVectors(n,t),x.crossVectors(S,T);n=this.direction.dot(x);if(0<n){if(s)return null;e=1}else{if(!(n<0))return null;e=-1,n=-n}k.subVectors(this.origin,t);s=e*this.direction.dot(T.crossVectors(k,T));if(s<0)return null;t=e*this.direction.dot(S.cross(k));if(t<0)return null;if(n<s+t)return null;var e=-e*k.dot(x);return e<0?null:this.at(e/n,h)},applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(O.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},enableAll:function(){this.mask=-1},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},disableAll:function(){this.mask=0},test:function(t){return 0!=(this.mask&t.mask)}}),Object.assign(B.prototype,{set:function(t,i){this.ray.set(t,i)},setFromCamera:function(t,i){i&&i.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(i.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(i).sub(this.ray.origin).normalize(),this.camera=i):i&&i.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(i.near+i.far)/(i.near-i.far)).unproject(i),this.ray.direction.set(0,0,-1).transformDirection(i.matrixWorld),this.camera=i):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,i,n){n=n||[];return I(t,this,n,i),n.sort(V),n},intersectObjects:function(t,i,n){var s=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),s;for(var h=0,e=t.length;h<e;h++)I(t[h],this,s,i);return s.sort(V),s}});var C=function t(){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.A={}};Object.assign(C.prototype,{R:function(t,i){this.k(t,i)||(void 0===this.A[t]&&(this.A[t]=[]),this.A[t].push(i))},k:function(t,i){return i?void 0!==this.A[t]&&-1!==this.A[t].indexOf(i):void 0!==this.A[t]&&0<this.A[t].length},S:function(t,i){void 0===this.A[t]||-1!==(i=this.A[t].indexOf(i))&&this.A[t].splice(i,1)},T:function(t){if(void 0!==this.A[t.type])for(var i=this.A[t.type].slice(0),n=0,s=i.length;n<s;n++)i[n].call(this,t)}});var Y=C;function L(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var D=function(){function i(t){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,i),this.j=t,this.O="none",this.currentobj=null,this.B={url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5QoOAiAd1TTTFgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABfElEQVRYw81XO26EMBB9poAIrBwh2hPgMt1WS7cSN+AonAXtIahSpfLWVNtFewXLkG7SeCVIbH5rBZ40jYGZ8fjxPMOwDAcARwAnAO8A3sz6HcAVwAeATwBf8IgIQAGgA0AzrTPfRM8GPy8I6rLz2l1fPAR/2GVJNV4B3DwGf9jN+J7cuTM4Y4yEEFSWJUkpSWtNWmuSUlJZliSEIMbYVBKjlXCWPcsyUkrRFJRSlGXZ1HHMJ1wYhlRVFS1FVVUUhuFsYkau4FJKWgsp5VgSg6MobC+t2bmtEo4Ein4Cne3MfcHBia4vr3/YPodwc6GUcv0dh8Bo+wBpmoJz7k3LOedI09T26BiYi2WAPM/hGw6fJ9iE5xnmj/0RNmFihgwv/bS01ojj2GsF2rZFkiS/l78DbIzANBMDNE3jPZDD5z0wncwAdV17T8Dh82pVQSGEdxIKIZxquKkQ7UKKd3EZbX4db96Q7KIl20VTunlbvovBZBej2b8Np2zr8fwHFGE/6k/Mu0oAAAAASUVORK5CYII=",size:32,height:1,collision:!1},this.V={width:5,type:b.FULL,color:"#FF0000",height:3},this.I={color:"#FF0000",borderWidth:3,borderColor:"#0000FF",opacity:.5,height:3},this.C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5QocCDgHXcqo9wAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAEQ0lEQVRYw71XTWhcVRg9584kVGzHZKYlTFpsJ/PeKBaKMjN05aYIKgguupASqaKCC1cFVxaSaQW7dSW4KRFBEETEje5qtWK1SdP409L0zZgpJrEtvqY/qebNe/e46KSZDMkkmSR9mwdz35zv3O8737nfJdbxuG7xdQp7EfCj8au//NkORqzd4Lls8S0SgzR8UTHbm0qlr/r+9ORDIZDLFt6B4SDJXQBAci/AbHeyd8L3p6qbSsB1C++SLJHc0fg7yQyFbFd37z83b05d3hQCrls8SrBEcutS6yR3k8wnU713fH9qbEMJuG7hPYIDAAyAGsl447qk6wDmACQIPJVMpWd8f/r3lXDjqwne07PvUQmXBfUbKQS5U8AAyZ568LNW0RGJAalOyRgTRbN1srYVNtsR4Z49hSc6O3iKZBoArPTjzMzsCzduXLy7VizTDgGSAqCGXdDaqK3NmI0S6PYVSrgmAq6bP+S6+cKyzGI2WlxbsRWDbds6D7hu/vCqCOScwquAGaSNpZcDrNXCCEDYWJQoeowtSpYizIDrFl9rScBxiv0gBwn2yWhZwI4OGy4ioNZilhAA2G2AweZMxBvs9RVQA6RxJNQAPJ3LFW8jVCeoTruo77mjqYUTgD3oOIXbS6dZ++9LlRnKDDhOMfS8c589aEPHKRw0xDHS7G0wlrsADSBTz5RpSmuzEYUrdE584Vt7EVZHx8sjXzGXzb8sY44bch8e4mOlc5I9akA+u1xwafG7YWXdBAxZNOBLcYvwpLEdvTQ8tCiE1Q8wGJMQSYoEhhRrov6jkAD1Jsnk/Dkg4AsCNUgEDAFRBAGQQo6GzzWV7DsLfFnXQD5rYAZoeHh+h7I6Mu4Nf7gU+76+/ONxY07RsK9O9ufQ2ucrlZFbS33vOMV+Q3xCMvYguFTyvOHTBgA8b6Q8VwsGZe3QfHrZIs9RZAIRwarTfb+rVK/9mcja4543fHqRD1SrYxNBGJUEDa0IaMyaRGCpCKBk7RgjfVAuj5xa0ogmJkarsVhUkrVDUYtTlPxXBKM1HF5WUhnCifHK8DctrfjSpdFqENpSLDTfLgcYBGEIaG61BKRoGrTHx8vDn69qIJmYGG05WG7ZsjUEtGoNeN75cwDOtj0RAUAms79nYUfBNjIeNQnzkXQ6XwMAa2sEgGvXfp2dX17XROQ4ToLsehvgGw1/dObtVcI9wf5kAAokYI3A74Hax1eujE2ueyj1fX8ukeiZjMXMk4Y8QHI7SbMgMnSQ6AOZIZERUJEw5Hmjv23YVDwz8/etVGJXBUZZktkmVwPJusfbr62N3i+Xz5/Z8HuBPzN5rTvZe5VAhuSehjabD/4pYEued2F0025Gvj9VTXalrwvMk9y+cHbYoaAWliqVC96m3w39m9NXUqn0HYDPkOiywslaGB2rVi9U14rV9u3Y96fHkqmd92T1x1ygE9Xq+b/awfkfmzntCAO/rwcAAAAASUVORK5CYII=",this.Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5QoOAiAd1TTTFgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABfElEQVRYw81XO26EMBB9poAIrBwh2hPgMt1WS7cSN+AonAXtIahSpfLWVNtFewXLkG7SeCVIbH5rBZ40jYGZ8fjxPMOwDAcARwAnAO8A3sz6HcAVwAeATwBf8IgIQAGgA0AzrTPfRM8GPy8I6rLz2l1fPAR/2GVJNV4B3DwGf9jN+J7cuTM4Y4yEEFSWJUkpSWtNWmuSUlJZliSEIMbYVBKjlXCWPcsyUkrRFJRSlGXZ1HHMJ1wYhlRVFS1FVVUUhuFsYkau4FJKWgsp5VgSg6MobC+t2bmtEo4Ein4Cne3MfcHBia4vr3/YPodwc6GUcv0dh8Bo+wBpmoJz7k3LOedI09T26BiYi2WAPM/hGw6fJ9iE5xnmj/0RNmFihgwv/bS01ojj2GsF2rZFkiS/l78DbIzANBMDNE3jPZDD5z0wncwAdV17T8Dh82pVQSGEdxIKIZxquKkQ7UKKd3EZbX4db96Q7KIl20VTunlbvovBZBej2b8Np2zr8fwHFGE/6k/Mu0oAAAAASUVORK5CYII=",this.objectArray=[],this.L=[],this.D=[],this.F=[],this.H=[],this.P=null,this.X=null,this.U=null,this.G=null,this.Z=void 0,this.N=this.j.getContainer().childNodes[0],this.Q=this.Q.bind(this),this._=this._.bind(this),this.q=new B,this.K=new Y,this.J()}var t,n,s;return t=i,(n=[{key:"editUrl",get:function(){return this.Y},set:function(t){this.Y=t}},{key:"centerUrl",get:function(){return this.C},set:function(t){this.C=t}},{key:"PointStyle",get:function(){return this.B},set:function(t){this.B=t}},{key:"operate",get:function(){return this.Z},set:function(t){this.Z=t;for(var i=0;i<this.F.length;i++)this.F[i].visible=!1,"move"===t?"center"===this.F[i].W&&(this.F[i].visible=!0):"center"!==this.F[i].W&&(this.F[i].visible=!0)}},{key:"LineStyle",get:function(){return this.V},set:function(t){this.V=t}},{key:"PolygonStyle",get:function(){return this.I},set:function(t){this.I=t}},{key:"DrawTool",get:function(){return this.O},set:function(t){if(this.O=t,"edit"!==this.O){for(var i=0;i<this.F.length;i++)this.F[i].remove();this.F.length=0,this.X=null,this.P=null}}},{key:"edit",value:function(t,i){if("none"===this.DrawTool||"edit"===this.DrawTool){if(!t||!t.shapetype){for(var n=0;n<this.F.length;n++)this.F[n].remove();return this.F.length=0,void(this.X=null)}if(!(0<this.F.length)&&(i||null==this.X||this.X.id!==t.id)&&(!t.opetype||"no"===t.opetype.type)){for(var s=0;s<this.F.length;s++)this.F[s].remove();this.F.length=0,this.P=null,this.X=t,i||(this.G=t.id),t.type===fengmap.FMType.POLYGON_MARKER?(this.$(t),this.DrawTool="edit"):t.type===fengmap.FMType.LINE_MARKER?(this.tt(t),this.DrawTool="edit"):t.type===fengmap.FMType.IMAGE_MARKER&&(this.DrawTool="edit",this.U={x:this.X.x,y:this.X.y})}}}},{key:"on",value:function(t,i){this.K.R(t,i)}},{key:"dispose",value:function(){this.N.removeEventListener("mousedown",this.Q,!1),this.N.removeEventListener("mousemove",this._,!1)}},{key:"createMarkerByInfo",value:function(t){if("circle"===t.shapetype||"ellipse"===t.shapetype||"rect"===t.shapetype||"polygon"===t.shapetype){var i=new fengmap.FMPolygonMarkerEdit(t),n=this.j.getFloor(t.level);return i.addTo(n),i.mapEdit=this,t.id&&(i.id=t.id),i}if("line"===t.shapetype){var s=new fengmap.FMSegment;s.points=[];for(var h=0;h<t.points.length;h++)s.points.push({x:t.points[h].x,y:t.points[h].y,z:t.points[h].z});s.level=t.level,t.segments=[s];var e=new fengmap.FMLineMarkerEdit(t);return e.addTo(this.j),e.mapEdit=this,t.id&&(e.id=t.id),e}i=this.j.getFloor(t.level),e=new fengmap.FMImageMarkerEdit(t);return e.addTo(i),e.mapEdit=this,t.id&&(e.id=t.id),e}}])&&L(t.prototype,n),s&&L(t,s),i}();Object.assign(D.prototype,{J:function(){this.N.addEventListener("mousedown",this.Q,!1),this.N.addEventListener("mousemove",this._,!1)},it:function(t,i){if(("none"===this.DrawTool||"edit"===this.DrawTool)&&t&&(i||null==this.X||this.X.id!==t.id)&&(!t.opetype||"no"===t.opetype.type)){for(var n=0;n<this.F.length;n++)this.F[n].remove();this.F.length=0,this.P=null,this.X=t,i||(this.G=t.id),t.type===fengmap.FMType.POLYGON_MARKER?(this.$(t),this.DrawTool="edit"):t.type===fengmap.FMType.LINE_MARKER?(this.tt(t),this.DrawTool="edit"):t.type===fengmap.FMType.IMAGE_MARKER&&(this.DrawTool="edit",this.U={x:this.X.x,y:this.X.y})}},nt:function(t,i){var n=new A;n.x=t/this.N.getBoundingClientRect().width*2-1,n.y=2*-(i/this.N.getBoundingClientRect().height)+1;for(var s=[],h=0;h<this.F.length;h++)this.F[h].opetype.node.visible&&s.push(this.F[h].opetype.node);this.q.setFromCamera(n,this.j.camera);n=this.q.intersectObjects(s,!0);return 0<n.length?n[0].object:null},Q:function(t){if("none"!==this.DrawTool){if(2===t.button)return"edit"!==this.DrawTool?this.st():(null!==this.P||null!==this.X&&"point"===this.X.shapetype)&&this.ht(),void(this.P=null);var i=t.clientX-this.N.getBoundingClientRect().left,n=t.clientY-this.N.getBoundingClientRect().top;if("edit"===this.DrawTool){if(null===this.P){if(null===this.X)return;"point"!==this.X.shapetype?null!==(s=this.nt(i,n))&&(this.P=s.mapNode):this.U={x:this.X.x,y:this.X.y,iscomplete:!0}}else{if(null===this.X)return;if("center"!==this.P.opetype.type){if("ellipse"===this.X.shapetype||"circle"===this.X.shapetype)this.U=this.et(this.X.points);else if("rect"===this.X.shapetype){this.U=this.X.points;t=this.rt("center");t.visible=!0,void 0!==this.Z&&"edit"===this.Z&&(t.visible=!1);var s=this.rt("point",!0);t.position.x=(s[0].position.x+s[1].position.x)/2,t.position.z=(s[0].position.z+s[1].position.z)/2,this.H.length=0,this.H.push({x:Math.abs(s[0].position.x-s[1].position.x)/2,y:Math.abs(s[0].position.z-s[1].position.z)/2})}else if("polygon"===this.X.shapetype){this.U=this.X.points;for(var h=this.et(this.U).center,e=this.H.length=0;e<this.U.length;e++)this.H.push({x:this.U[e].x-h.x,y:this.U[e].y-h.y});var r=this.rt("center");r.position.x=h.x-this.j.getX(),r.position.z=this.j.getY()-h.y}else if("line"===this.X.shapetype){this.U=this.X.points;for(var o=this.et(this.U).center,u=this.H.length=0;u<this.U.length;u++)this.H.push({x:this.U[u].x-o.x,y:this.U[u].y-o.y});r=this.rt("center");r.position.x=o.x-this.j.getX(),r.position.z=this.j.getY()-o.y}}else this.it(this.X,!0);this.P=null}return this.X.id=this.G,void this.K.T({type:"editend",info:this.X.info,object:this.X})}n=fengmap.FMUtil.coordsScreenToMap(this.j,{x:i,y:n});"point"===this.DrawTool?(this.ot(n),this.K.T({type:"drawend",info:this.currentobj.info,object:this.currentobj}),this.currentobj=null):"line"===this.DrawTool?this.L.push(n):"circle"===this.DrawTool?0===this.D.length?this.D.push(n):(this.ut(n),this.K.T({type:"drawend",info:this.currentobj.info,object:this.currentobj}),this.D.length=0,this.currentobj=null):"rect"===this.DrawTool?0===this.D.length?this.D.push(n):(this.ct(n),this.K.T({type:"drawend",info:this.currentobj.info,object:this.currentobj}),this.D.length=0,this.currentobj=null):"polygon"===this.DrawTool?this.D.push(n):"ellipse"===this.DrawTool&&(0===this.D.length?this.D.push(n):(this.ft(n),this.K.T({type:"drawend",info:this.currentobj.info,object:this.currentobj}),this.D.length=0,this.currentobj=null))}},_:function(t){if("none"!==this.DrawTool){if(null!==this.X&&"point"===this.X.shapetype&&this.U.iscomplete)return this.U=null,void(this.X=null);var i=t.clientX-this.N.getBoundingClientRect().left,t=t.clientY-this.N.getBoundingClientRect().top,t=fengmap.FMUtil.coordsScreenToMap(this.j,{x:i,y:t});if("edit"===this.DrawTool)return null!==this.X&&"point"===this.X.shapetype?(this.X.moveTo({animate:!1,x:t.x,y:t.y}),void this.K.T({type:"drawing",info:this.X.info,object:this.X})):void(null!==this.X&&null!==this.P&&(this.lt(t),this.X.id=this.G,this.K.T({type:"drawing",info:this.X.info,object:this.X})));"line"===this.DrawTool?this.dt(t):"circle"===this.DrawTool?this.ut(t):"rect"===this.DrawTool?this.ct(t):"polygon"===this.DrawTool?this.pt(t):"ellipse"===this.DrawTool&&this.ft(t),null!==this.currentobj&&this.K.T({type:"drawing",info:this.currentobj.info,object:this.currentobj})}},lt:function(t){if(null!==this.P){var i,n,s=this;if("ellipse"!==this.X.shapetype?(this.P.opetype.node.position.x=t.x-this.j.getX(),this.P.opetype.node.position.z=this.j.getY()-t.y):"xradius"===this.P.opetype.type?this.P.opetype.node.position.x=t.x-this.j.getX():("yradius"===this.P.opetype.type||(this.P.opetype.node.position.x=t.x-this.j.getX()),this.P.opetype.node.position.z=this.j.getY()-t.y),"circle"===this.X.shapetype)"yradius"===this.P.opetype.type?(i=E("center"),this.D.length=0,this.D.push({x:this.j.getX()+i.position.x,y:this.j.getY()-i.position.z}),this.ut(t,!0)):(E("yradius").visible=!1,this.D.length=0,this.D.push({x:t.x,y:t.y}),this.ut({x:t.x,y:t.y+this.U.yradius},!0));else if("ellipse"===this.X.shapetype)this.D.length=0,"yradius"===this.P.opetype.type||"xradius"===this.P.opetype.type?(n=E("center"),i={x:this.j.getX()+n.position.x,y:this.j.getY()-n.position.z},n=null,n="yradius"===this.P.opetype.type?this.vt(i,this.U.xradius,Math.abs(i.y-t.y)):this.vt(i,Math.abs(i.x-t.x),this.U.yradius),this.ft(n,!0)):(E("xradius").visible=!1,E("yradius").visible=!1,r=this.vt(t,this.U.xradius,this.U.yradius),this.ft(r,!0));else if("rect"===this.X.shapetype)if("center"===this.P.opetype.type){for(var h=E("point",!0),e=0;e<h.length;e++)h[e].visible=!1;this.D.length=0,this.D.push({x:t.x+this.H[0].x,y:t.y-this.H[0].y}),this.ct({x:t.x-this.H[0].x,y:t.y+this.H[0].y},!0)}else{var r=E("center"),r=E("point",r.visible=!1,this.P.opetype.node.uuid);null!==r&&(this.D.length=0,this.D.push({x:this.j.getX()+r.position.x,y:this.j.getY()-r.position.z}),this.ct(t,!0))}else if("polygon"===this.X.shapetype)if("center"===this.P.opetype.type){for(var o=this.rt("point",!0),u=0;u<o.length;u++)o[u].visible=!1;for(var a=this.P.opetype.node.position.x,c=this.P.opetype.node.position.z,f=[],l=0;l<this.H.length;l++)f.push({x:a+this.H[l].x,y:c-this.H[l].y});this.pt(f,!0)}else{for(var d=this.rt("point",!0),p=[],v=0;v<d.length;v++)p.push({x:d[v].position.x,y:d[v].position.z});this.pt(p,!0)}else if("line"===this.X.shapetype){var y=this.rt("point",!0),m=[];if("center"===this.P.opetype.type){for(var M=0;M<y.length;M++)y[M].visible=!1;for(var A=this.P.opetype.node.position.x,g=this.P.opetype.node.position.z,b=0;b<this.H.length;b++)m.push({x:A+this.H[b].x,y:g-this.H[b].y});this.dt(m,!0)}else{for(var w=0;w<y.length;w++)m.push({x:y[w].position.x,y:y[w].position.z});this.dt(m,!0)}}}function E(t,i,n){return s.rt(t,i,n)}},rt:function(t,i,n){var s=this,h=null;i&&(h=[]);for(var e=0;e<s.F.length;e++)if(s.F[e].opetype.type===t)if(i)(!n||s.F[e].opetype.node.uuid!==n)&&h.push(s.F[e].opetype.node);else{if(!n){h=s.F[e].opetype.node;break}if(s.F[e].opetype.node.uuid!==n){h=s.F[e].opetype.node;break}}return h},st:function(){var t;"line"===this.DrawTool?this.dt():"circle"===this.DrawTool?this.ut():"rect"===this.DrawTool?this.ct():"polygon"===this.DrawTool?this.pt():"ellipse"===this.DrawTool&&this.ft(),"line"!==this.DrawTool&&"polygon"!==this.DrawTool||(t=!0,"line"===this.DrawTool?this.L.length<2&&(t=!1):"polygon"===this.DrawTool&&this.D.length<3&&(t=!1),t&&this.K.T({type:"drawend",info:this.currentobj.info,object:this.currentobj}),"line"===this.DrawTool&&(this.L.length=0,this.currentobj=null),"polygon"===this.DrawTool&&(this.D.length=0,this.currentobj=null))},ht:function(){if("circle"===this.X.shapetype)this.D.length=0,this.D.push({x:this.U.center.x,y:this.U.center.y}),this.ut({x:this.U.center.x,y:this.U.center.y+this.U.yradius},!0);else if("ellipse"===this.X.shapetype){this.D.length=0;var t=this.vt({x:this.U.center.x,y:this.U.center.y},this.U.xradius,this.U.yradius);this.ft(t,!0)}else if("rect"===this.X.shapetype)this.ct(),this.it(this.X);else if("polygon"===this.X.shapetype){for(var i=[],n=0;n<this.U.length;n++)i.push({x:this.U[n].x-this.j.getX(),y:this.j.getY()-this.U[n].y});this.pt(i,!0)}else if("line"===this.X.shapetype){for(var s=[],h=0;h<this.U.length;h++)s.push({x:this.U[h].x-this.j.getX(),y:this.j.getY()-this.U[h].y});this.dt(s,!0)}else if("point"===this.X.shapetype)return this.X.moveTo({animate:!1,x:this.U.x,y:this.U.y}),this.K.T({type:"editend",info:this.X.info,object:this.X}),void(this.X=null);this.X.id=this.G,this.K.T({type:"editend",info:this.X.info,object:this.X}),this.it(this.X,!0)},ot:function(t){var i,n={},s=this.PointStyle;for(i in s)n[i]=s[i];n.x=t.x,n.y=t.y;var h=this.j.getFloor(this.j.getLevel()),t=new fengmap.FMImageMarkerEdit(n);t.addTo(h),(t.mapEdit=this).currentobj=t},dt:function(t,i){var n=new fengmap.FMSegment;n.points=[];var s,h={},e=this.LineStyle;for(s in e)h[s]=e[s];if(void 0===h.height&&(h.height=3),i){null!==this.X&&this.X.remove();for(var r=0;r<t.length;r++)n.points.push({x:this.j.getX()+t[r].x,y:this.j.getY()-t[r].y,z:h.height})}else{if(0===this.L.length)return;if(null!==this.currentobj&&(this.currentobj.remove(),!t&&1===this.L.length))return;for(var o=0;o<this.L.length;o++)n.points.push({x:this.L[o].x,y:this.L[o].y,z:h.height});t&&n.points.push({x:t.x,y:t.y,z:h.height})}n.level=this.j.getLevel(),h.segments=[n];var u=new fengmap.FMLineMarkerEdit(h);u.addTo(this.j),u.mapEdit=this,i?this.X=u:this.currentobj=u},ut:function(t,i){if(0!==this.D.length){if(i)null!==this.X&&this.X.remove();else if(null!==this.currentobj&&(this.currentobj.remove(),!t))return this.D.length=0,void(this.currentobj=null);var n,s=this.D[0],s=Math.sqrt((s.x-t.x)*(s.x-t.x)+(s.y-t.y)*(s.y-t.y)),h=this.PolygonStyle,e={};for(n in h)e[n]=h[n];e.points=fengmap.FMCalculator.circleBuilder(s,this.D[0],32),e.shapetype="circle";t=new fengmap.FMPolygonMarkerEdit(e),s=this.j.getFloor(this.j.getLevel());t.addTo(s),t.mapEdit=this,i?this.X=t:this.currentobj=t}},ct:function(t,i){var n=[];if(t||i){if(0===this.D.length)return;if(i)null!==this.X&&this.X.remove();else if(null!==this.currentobj&&(this.currentobj.remove(),!t))return this.D.length=0,void(this.currentobj=null);var s=this.D[0],n=[s,{x:t.x,y:s.y},t,{x:s.x,y:t.y}]}else if("edit"===mapdraw.DrawTool)n=this.U,null!==this.X&&this.X.remove();else if(null!==this.currentobj)return this.currentobj.remove(),this.D.length=0,void(this.currentobj=null);var h,e=this.PolygonStyle,r={};for(h in e)r[h]=e[h];r.points=n,r.shapetype="rect";s=new fengmap.FMPolygonMarkerEdit(r),n=this.j.getFloor(this.j.getLevel());s.addTo(n),s.mapEdit=this,!t&&!i||i?this.X=s:this.currentobj=s},pt:function(t,i){var n=[];if(i){null!==this.X&&this.X.remove();for(var s=0;s<t.length;s++)n.push({x:this.j.getX()+t[s].x,y:this.j.getY()-t[s].y})}else{if(0===this.D.length)return;null!==this.currentobj&&this.currentobj.remove();for(var h=0;h<this.D.length;h++)n.push({x:this.D[h].x,y:this.D[h].y});if(t)n.push({x:t.x,y:t.y});else if(2===n.length)return}var e,r=this.PolygonStyle,o={};for(e in r)o[e]=r[e];o.points=n;var u=new fengmap.FMPolygonMarkerEdit(o),a=this.j.getFloor(this.j.getLevel());u.addTo(a),u.mapEdit=this,i?this.X=u:this.currentobj=u},ft:function(t,i){var n=null;if(i)null!==this.X&&this.X.remove(),n=t;else{if(0===this.D.length)return;if(null!==this.currentobj&&this.currentobj.remove(),!t)return this.D.length=0,void(this.currentobj=null);var s=this.D[0],h=Math.abs(t.x-s.x),e=Math.abs(t.y-s.y),n=e<h?this.vt(s,h,h/2):this.vt(s,e/2,e)}for(var r=[],o=0;o<n.length;o++)r.push({x:n[o].x,y:n[o].y});var u,a=this.PolygonStyle,c={};for(u in a)c[u]=a[u];c.points=r,c.shapetype="ellipse";s=new fengmap.FMPolygonMarkerEdit(c),e=this.j.getFloor(this.j.getLevel());s.addTo(e),s.mapEdit=this,i?this.X=s:this.currentobj=s},vt:function(t,i,n){return new g(t.x,t.y,i,n,0,2*Math.PI,!1,0).getPoints(32)},tt:function(t){var i=[];this.U=t.points;for(var n=this.et(t.points).center,s=this.H.length=0;s<t.points.length;s++)i.push(t.points[s]),this.H.push({x:t.points[s].x-n.x,y:t.points[s].y-n.y});i.push({x:n.x,y:n.y,optype:"center"}),this.yt(i,t)},$:function(t){var i,n=this,s=[];if("polygon"===t.shapetype){this.U=t.points;for(var h=this.et(t.points).center,e=this.H.length=0;e<t.points.length;e++)s.push(t.points[e]),this.H.push({x:t.points[e].x-h.x,y:t.points[e].y-h.y});s.push({x:h.x,y:h.y,optype:"center"})}else"rect"===t.shapetype?(this.U=t.points,s.push(t.points[0]),s.push(t.points[2]),s.push({x:(t.points[0].x+t.points[2].x)/2,y:(t.points[0].y+t.points[2].y)/2,optype:"center"}),this.H.length=0,this.H.push({x:Math.abs(t.points[0].x-t.points[2].x)/2,y:Math.abs(t.points[0].y-t.points[2].y)/2})):"circle"!==t.shapetype&&"ellipse"!==t.shapetype||(i=this.et(t.points),this.U=i,s.push({x:i.center.x,y:i.center.y,optype:"center"}),s.push({x:i.center.x,y:i.center.y+i.yradius,optype:"yradius"}),"ellipse"===t.shapetype&&s.push({x:i.center.x+i.xradius,y:i.center.y,optype:"xradius"}));n.yt(s,t)},yt:function(t,i){for(var n=this,s=n.j.getFloor(n.j.getLevel()),h=0;h<t.length;h++){var e=(e=t[h].optype)||"point",r=n.editUrl;"center"===e&&(r=n.centerUrl);r=new fengmap.FMImageMarkerEdit({url:r,size:16,height:i.height+1,x:t[h].x,y:t[h].y,collision:!1,opetype:e});r.addTo(s),void 0!==this.Z&&("move"===this.Z?"center"!==e&&(r.visible=!1):"edit"===this.Z&&"center"===e&&(r.visible=!1)),n.F.push(r)}},et:function(t){for(var i=null,n=null,s=null,h=null,e=0;e<t.length;e++)0===e?(i=t[e].x,n=t[e].y,s=t[e].x,h=t[e].y):(i>t[e].x&&(i=t[e].x),n>t[e].y&&(n=t[e].y),s<t[e].x&&(s=t[e].x),h<t[e].y&&(h=t[e].y));return{center:{x:(i+s)/2,y:(n+h)/2},xradius:Math.abs(s-i)/2,yradius:Math.abs(h-n)/2}}});var F=D,H={NONE:0,EXTRUDE_MARKER:2,IMAGE_MARKER:8,LOCATION_MARKER:16,POLYGON_MARKER:32,TEXT_MARKER:64,LINE_MARKER:128,HEAT_MAP_MARKER:512,EXTENT:1024,EXTERNAL_MODEL:2048,MODEL:4096,FACILITY:8192,LABEL:16384,DYNAMIC_MODEL_MARKER:32768,DOM_MARKER:65536,EXTENT_LAYER:1<<20,EXTERNAL_MODEL_LAYER:1<<21,MODEL_LAYER:1<<22,FACILITY_LAYER:1<<23,LABEL_LAYER:1<<24,MARKER_GROUP:1<<25};function P(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var X=function(){function i(t){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,i),this.j=t,this.N=this.j.getContainer(),this.mt={border:"border:2px solid #0000FF",backgroundColor:null,opacity:null},this.Mt=[H.MODEL,H.FACILITY,H.LABEL,H.EXTENT,H.EXTERNAL_MODEL],this.At=0,this.gt=!1,this.Q=this.Q.bind(this),this._=this._.bind(this),this.bt=this.bt.bind(this),this.wt=null,this.Et=null,this.K=new Y,this.Rt=new fengmap.FMSearchAnalyser({map:this.j}),this.J()}var t,n,s;return t=i,(n=[{key:"dispose",value:function(){document.removeEventListener("mousedown",this.Q,!1),document.removeEventListener("mousemove",this._,!1),document.removeEventListener("mouseup",this.bt,!1),this.Rt.dispose()}},{key:"boxStyle",get:function(){return this.mt},set:function(t){this.mt=t}},{key:"enable",get:function(){return this.gt},set:function(t){this.gt=t}},{key:"mouseKey",get:function(){return 0===this.At?"left":"right"},set:function(t){this.At="left"===t?0:2}},{key:"types",get:function(){return this.Mt},set:function(t){this.Mt=t}},{key:"on",value:function(t,i){this.K.R(t,i)}}])&&P(t.prototype,n),s&&P(t,s),i}();Object.assign(X.prototype,{J:function(){document.addEventListener("mousedown",this.Q,!1),document.addEventListener("mousemove",this._,!1),document.addEventListener("mouseup",this.bt,!1)},Q:function(t){var i;this.gt&&t.button===this.At&&(i=t.clientX,t=t.clientY,this.Et={x:i,y:t},this.kt(!1),this.wt=document.createElement("div"),this.wt.style.cssText="position:absolute;top:"+t+"px;left:"+i+"px;width:0px;height:0px;"+this.mt.border+";",this.N.appendChild(this.wt),this.mt.backgroundColor&&(this.wt.style.backgroundColor=this.mt.backgroundColor),void 0!==this.mt.opacity&&null!==this.mt.opacity&&(this.wt.style.opacity=this.mt.opacity))},_:function(t){var i;this.gt&&null!==this.Et&&(i=t.clientX,t=t.clientY,i<this.Et.x&&(this.wt.style.left=i+"px"),t<this.Et.y&&(this.wt.style.top=t+"px"),this.wt.style.width=Math.abs(i-this.Et.x)+"px",this.wt.style.height=Math.abs(t-this.Et.y)+"px")},bt:function(t){var n=this,i=this;if(this.gt&&null!==this.wt&&t.button===this.At){this.kt(!0);for(var s=this.St(),h=this.j.getLevel(),e=[],r=0;r<this.Mt.length;r++)!function(i){var t=new fengmap.FMSearchRequest;t.levels=[h],t.type=n.Mt[i],t.addCondition({polygon:s}),n.Rt.query(t,function(t){e.push({type:n.Mt[i],children:t})})}(r);this.Et=null,this.wt.parentNode&&this.wt.parentNode.removeChild(this.wt),this.wt=null,function t(){i.Mt.length>e.length?setTimeout(t(),20):i.K.T({type:"boxselected",targets:e,coords:s})}()}},Tt:function(t){for(var i=this.j.getFloor(this.j.getLevel()).getNodes(),s=this.Mt,n=[],h=0;h<i.length;h++)if(function(t){for(var i=!1,n=0;n<s.length;n++)if(t===s[n]){i=!0;break}return i}(i[h].type)){for(var e=i[h].children,r=[],o=0;o<e.length;o++){var u=e[o].x,a=e[o].y;u&&a&&fengmap.FMCalculator.isContain(t,{x:u,y:a})&&(i[h].type!==H.LABEL_LAYER&&i[h].type!==H.FACILITY_LAYER||e[o].name&&""!==e[o].name||e[o].eName&&""!==e[o].eName)&&r.push(e[o])}0<r.length&&n.push({type:i[h].type,children:r})}return n},kt:function(t){var i=this.j.getInteracations();i.enableDrag=t,i.enableRotate=t,i.enableTilt=t,i.enableZoom=t},St:function(){var t=[],i=this.wt.getBoundingClientRect(),n=this.N.getBoundingClientRect().left,s=this.N.getBoundingClientRect().top;t.push({x:i.left-n,y:i.top-s}),t.push({x:i.right-n,y:i.top-s}),t.push({x:i.right-n,y:i.bottom-s}),t.push({x:i.left-n,y:i.bottom-s});for(var h=[],e=0;e<t.length;e++){var r=fengmap.FMUtil.coordsScreenToMap(this.j,t[e]);h.push(r)}return h}});var U=X,G={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Z={h:0,s:0,l:0},N={h:0,s:0,l:0};function Q(t,i,n){return void 0===i&&void 0===n?this.set(t):this.setRGB(t,i,n)}function _(t,i,n){return n<0&&(n+=1),1<n&&--n,n<1/6?t+6*(i-t)*n:n<.5?i:n<2/3?t+6*(i-t)*(2/3-n):t}function z(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function q(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}function K(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}Object.assign(Q.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,i,n){return this.r=t,this.g=i,this.b=n,this},setHSL:function(t,i,n){return t=p.euclideanModulo(t,1),i=p.clamp(i,0,1),n=p.clamp(n,0,1),0===i?this.r=this.g=this.b=n:(this.r=_(i=2*n-(n=n<=.5?n*(1+i):n+i-n*i),n,t+1/3),this.g=_(i,n,t),this.b=_(i,n,t-1/3)),this},setStyle:function(i){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+i+" will be ignored.")}if(u=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(i)){var n,s=u[1],h=u[2];switch(s){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(h))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,t(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(h))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,t(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(h)){var e=parseFloat(n[1])/360,r=parseInt(n[2],10)/100,o=parseInt(n[3],10)/100;return t(n[5]),this.setHSL(e,r,o)}}}else if(u=/^\#([A-Fa-f0-9]+)$/.exec(i)){var s=u[1],u=s.length;if(3===u)return this.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,this}return i&&0<i.length?this.setColorName(i):this},setColorName:function(t){var i=G[t];return void 0!==i?this.setHex(i):console.warn("THREE.Color: Unknown color "+t),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,i){return void 0===i&&(i=2),this.r=Math.pow(t.r,i),this.g=Math.pow(t.g,i),this.b=Math.pow(t.b,i),this},copyLinearToGamma:function(t,i){i=0<(i=void 0===i?2:i)?1/i:1;return this.r=Math.pow(t.r,i),this.g=Math.pow(t.g,i),this.b=Math.pow(t.b,i),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(t){return this.r=z(t.r),this.g=z(t.g),this.b=z(t.b),this},copyLinearToSRGB:function(t){return this.r=q(t.r),this.g=q(t.g),this.b=q(t.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var i,n=this.r,s=this.g,h=this.b,e=Math.max(n,s,h),r=Math.min(n,s,h),o=(r+e)/2;if(r===e)a=i=0;else{var u=e-r,a=o<=.5?u/(e+r):u/(2-e-r);switch(e){case n:i=(s-h)/u+(s<h?6:0);break;case s:i=(h-n)/u+2;break;case h:i=(n-s)/u+4}i/=6}return t.h=i,t.s=a,t.l=o,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(t,i,n){return this.getHSL(Z),Z.h+=t,Z.s+=i,Z.l+=n,this.setHSL(Z.h,Z.s,Z.l),this},add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,i){return this.r=t.r+i.r,this.g=t.g+i.g,this.b=t.b+i.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,i){return this.r+=(t.r-this.r)*i,this.g+=(t.g-this.g)*i,this.b+=(t.b-this.b)*i,this},lerpHSL:function(t,i){this.getHSL(Z),t.getHSL(N);var n=p.lerp(Z.h,N.h,i),t=p.lerp(Z.s,N.s,i),i=p.lerp(Z.l,N.l,i);return this.setHSL(n,t,i),this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,i){return this.r=t[i=void 0===i?0:i],this.g=t[i+1],this.b=t[i+2],this},toArray:function(t,i){return(t=void 0===t?[]:t)[i=void 0===i?0:i]=this.r,t[i+1]=this.g,t[i+2]=this.b,t}}),Q.NAMES=G;var J=function(){function t(){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t)}var i,n,s;return i=t,s=[{key:"round",value:function(t){return 0<t.toFixed(2)?Math.ceil(t.toFixed(2)):Math.floor(t.toFixed(2))}},{key:"generateUUID",value:function(){for(var t=[],i=0;i<256;i++)t[i]=(i<16?"0":"")+i.toString(16);var n=4294967295*Math.random()|0,s=4294967295*Math.random()|0,h=4294967295*Math.random()|0,e=4294967295*Math.random()|0,e=t[255&n]+t[n>>8&255]+t[n>>16&255]+t[n>>24&255]+"-"+t[255&s]+t[s>>8&255]+"-"+t[s>>16&15|64]+t[s>>24&255]+"-"+t[63&h|128]+t[h>>8&255]+"-"+t[h>>16&255]+t[h>>24&255]+t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255];return t.length=0,e.toUpperCase()}},{key:"findNearNthPowerOfTwo",value:function(t){t-=1;return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,(t|=t>>16)<0?1:1+t}},{key:"toRgba",value:function(t){if(void 0===t)return t;if("number"==typeof t)return"rgba("+parseInt(255*new Q(t).r)+","+parseInt(255*new Q(t).g)+","+parseInt(255*new Q(t).b)+",1)";var i=t.split(",");return 3<=i.length?"rgba("+parseInt(i[0])+","+parseInt(i[1])+","+parseInt(i[2])+",1)":t}},{key:"toColor",value:function(t){if("number"==typeof t)return t;var i=t.split(",");return 3<=i.length?parseInt(i[0])<<16|parseInt(i[1])<<8|parseInt(i[2]):(console.error("color format error",t),0)}}],(n=null)&&K(i.prototype,n),s&&K(i,s),t}();function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function tt(t,i,n){return(tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,i,n){t=function(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&null!==(t=st(t)););return t}(t,i);if(t){i=Object.getOwnPropertyDescriptor(t,i);return i.get?i.get.call(n):i.value}})(t,i,n||t)}function it(t,i){return(it=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,i)}function nt(n){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,i=st(n);return function(t,i){{if(i&&("object"===W(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,s?(t=st(this).constructor,Reflect.construct(i,arguments,t)):i.apply(this,arguments))}}function st(t){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n=function(){!function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),i&&it(t,i)}(h,fengmap.FMImageMarker);var t,i,n,s=nt(h);function h(t){var i;return function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,h),(i=s.call(this,t)).xt=t,i.id=""+J.generateUUID(),i.jt="point",i.W="no",t.opetype&&(i.W=t.opetype,i.jt="no"),i.mapEdit=null,i}return t=h,(i=[{key:"info",get:function(){return this.xt.id=this.id,this.xt.x=this.e,this.xt.y=this.u,this.xt.height=this.Ot,this.xt.shapetype=this.shapetype,this.xt.level=this.level,this.xt}},{key:"opetype",get:function(){if(this.W)return{node:this.getRenderNode(),type:this.W}}},{key:"shapetype",get:function(){return this.jt}},{key:"deleteMarker",value:function(){tt(st(h.prototype),"remove",this).call(this)}}])&&$(t.prototype,i),n&&$(t,n),h}();function ht(t){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function et(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function rt(t,i,n){return(rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,i,n){t=function(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&null!==(t=at(t)););return t}(t,i);if(t){i=Object.getOwnPropertyDescriptor(t,i);return i.get?i.get.call(n):i.value}})(t,i,n||t)}function ot(t,i){return(ot=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,i)}function ut(n){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,i=at(n);return function(t,i){{if(i&&("object"===ht(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,s?(t=at(this).constructor,Reflect.construct(i,arguments,t)):i.apply(this,arguments))}}function at(t){return(at=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}C=function(){!function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),i&&ot(t,i)}(h,fengmap.FMPolygonMarker);var t,i,n,s=ut(h);function h(t){var i;return function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,h),(i=s.call(this,t)).xt=t,i.jt="polygon",i.id=""+J.generateUUID(),t.shapetype&&(i.jt=t.shapetype),i.mapEdit=null,i}return t=h,(i=[{key:"info",get:function(){return this.xt.id=this.id,this.xt.shapetype=this.shapetype,this.xt.level=this.level,this.xt}},{key:"shapetype",get:function(){return this.jt}},{key:"deleteMarker",value:function(){if(rt(at(h.prototype),"remove",this).call(this),null!==this.mapEdit&&this.mapEdit.X&&this.mapEdit.X.id===this.id){for(var t=0;t<this.mapEdit.F.length;t++)this.mapEdit.F[t].remove();this.mapEdit.F.length=0}}}])&&et(t.prototype,i),n&&et(t,n),h}();function ct(t){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ft(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function lt(t,i,n){return(lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,i,n){t=function(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&null!==(t=vt(t)););return t}(t,i);if(t){i=Object.getOwnPropertyDescriptor(t,i);return i.get?i.get.call(n):i.value}})(t,i,n||t)}function dt(t,i){return(dt=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,i)}function pt(n){var s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,i=vt(n);return function(t,i){{if(i&&("object"===ct(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,s?(t=vt(this).constructor,Reflect.construct(i,arguments,t)):i.apply(this,arguments))}}function vt(t){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}D=function(){!function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),i&&dt(t,i)}(h,fengmap.FMLineMarker);var t,i,n,s=pt(h);function h(t){var i;return function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,h),(i=s.call(this,t)).jt="line",i.xt=t,i.id=""+J.generateUUID(),i.mapEdit=null,i}return t=h,(i=[{key:"info",get:function(){return this.xt.id=this.id,this.xt.points=this.points,this.xt.shapetype=this.shapetype,this.xt.level=this.segments[0].level,this.xt}},{key:"points",get:function(){return 0===this.segments.length?[]:this.segments[0].points}},{key:"shapetype",get:function(){return this.jt}},{key:"deleteMarker",value:function(){if(lt(vt(h.prototype),"remove",this).call(this),null!==this.mapEdit&&this.mapEdit.X&&this.mapEdit.X.id===this.id){for(var t=0;t<this.mapEdit.F.length;t++)this.mapEdit.F[t].remove();this.mapEdit.F.length=0}}}])&&ft(t.prototype,i),n&&ft(t,n),h}(),X=window.fengmap||{};X.FMMapEditor=F,X.FMBoxSelectTool=U,X.FMImageMarkerEdit=n,X.FMPolygonMarkerEdit=C,X.FMLineMarkerEdit=D;i.default=X}],s={},h.m=n,h.c=s,h.d=function(t,i,n){h.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:n})},h.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"Bt",{value:!0})},h.t=function(i,t){if(1&t&&(i=h(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.Bt)return i;var n=Object.create(null);if(h.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var s in i)h.d(n,s,function(t){return i[t]}.bind(null,s));return n},h.n=function(t){var i=t&&t.Bt?function(){return t.default}:function(){return t};return h.d(i,"a",i),i},h.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},h.p="",h(h.s=0).default;function h(t){if(s[t])return s[t].exports;var i=s[t]={i:t,l:!1,exports:{}};return n[t].call(i.exports,i,i.exports,h),i.l=!0,i.exports}var n,s});