chbim-plugins 0.0.26 → 0.0.27

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.
@@ -2570,7 +2570,7 @@ void main() {
2570
2570
  `},Pn={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),o;for(o in n)e[o]=n[o]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var o=t[i][n];o&&(o.isColor||o.isMatrix3||o.isMatrix4||o.isVector2||o.isVector3||o.isVector4||o.isTexture)?e[i][n]=o.clone():Array.isArray(o)?e[i][n]=o.slice():e[i][n]=o}}return e}},Pr={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};Object.assign(A.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=pi.euclideanModulo(e,1),i=pi.clamp(i,0,1),n=pi.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(l){l!==void 0&&1>parseFloat(l)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var o=parseInt(i[2],10)/100,s=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,o,s)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(n===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(i=Pr[t],i!==void 0?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,e){return e===void 0&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.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){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,o=Math.max(e,i,n),s=Math.min(e,i,n),l,h=(s+o)/2;if(s===o)s=l=0;else{var c=o-s;switch(s=.5>=h?c/(o+s):c/(2-o-s),o){case e:l=(i-n)/c+(i<n?6:0);break;case i:l=(n-e)/c+2;break;case n:l=(e-i)/c+4}l/=6}return t.h=l,t.s=s,t.l=h,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.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,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(i,n){this.getHSL(t),i.getHSL(e),i=pi.lerp(t.h,e.h,n);var o=pi.lerp(t.s,e.s,n);return n=pi.lerp(t.l,e.l,n),this.setHSL(i,o,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var qe={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new P},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new p(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new A(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new P}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new p(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new P}}},Wr={basic:{uniforms:Pn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.fog]),vertexShader:bi.meshbasic_vert,fragmentShader:bi.meshbasic_frag},lambert:{uniforms:Pn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.fog,qe.lights,{emissive:{value:new A(0)}}]),vertexShader:bi.meshlambert_vert,fragmentShader:bi.meshlambert_frag},phong:{uniforms:Pn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.gradientmap,qe.fog,qe.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:bi.meshphong_vert,fragmentShader:bi.meshphong_frag},standard:{uniforms:Pn.merge([qe.common,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.roughnessmap,qe.metalnessmap,qe.fog,qe.lights,{emissive:{value:new A(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},matcap:{uniforms:Pn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,{matcap:{value:null}}]),vertexShader:bi.meshmatcap_vert,fragmentShader:bi.meshmatcap_frag},points:{uniforms:Pn.merge([qe.points,qe.fog]),vertexShader:bi.points_vert,fragmentShader:bi.points_frag},dashed:{uniforms:Pn.merge([qe.common,qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:bi.linedashed_vert,fragmentShader:bi.linedashed_frag},depth:{uniforms:Pn.merge([qe.common,qe.displacementmap]),vertexShader:bi.depth_vert,fragmentShader:bi.depth_frag},normal:{uniforms:Pn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,{opacity:{value:1}}]),vertexShader:bi.normal_vert,fragmentShader:bi.normal_frag},sprite:{uniforms:Pn.merge([qe.sprite,qe.fog]),vertexShader:bi.sprite_vert,fragmentShader:bi.sprite_frag},background:{uniforms:{uvTransform:{value:new P},t2D:{value:null}},vertexShader:bi.background_vert,fragmentShader:bi.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:bi.cube_vert,fragmentShader:bi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:bi.equirect_vert,fragmentShader:bi.equirect_frag},distanceRGBA:{uniforms:Pn.merge([qe.common,qe.displacementmap,{referencePosition:{value:new m},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:bi.distanceRGBA_vert,fragmentShader:bi.distanceRGBA_frag},shadow:{uniforms:Pn.merge([qe.lights,qe.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:bi.shadow_vert,fragmentShader:bi.shadow_frag}};Wr.physical={uniforms:Pn.merge([Wr.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},Object.assign(M.prototype,{clone:function(){return new this.constructor().copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),x.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),x.DefaultOrder="XYZ",Object.defineProperties(x.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(x.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,i){var n=pi.clamp,o=t.elements;t=o[0];var s=o[4],l=o[8],h=o[1],c=o[5],f=o[9],v=o[2],y=o[6];return o=o[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(-f,o),this._z=Math.atan2(-s,t)):(this._x=Math.atan2(y,c),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(f,-1,1)),.99999>Math.abs(f)?(this._y=Math.atan2(l,o),this._z=Math.atan2(h,c)):(this._y=Math.atan2(-v,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(y,-1,1)),.99999>Math.abs(y)?(this._y=Math.atan2(-v,o),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(h,t))):e==="ZYX"?(this._y=Math.asin(-n(v,-1,1)),.99999>Math.abs(v)?(this._x=Math.atan2(y,o),this._z=Math.atan2(h,t)):(this._x=0,this._z=Math.atan2(-s,c))):e==="YZX"?(this._z=Math.asin(n(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-f,c),this._y=Math.atan2(-v,t)):(this._x=0,this._y=Math.atan2(l,o))):e==="XZY"?(this._z=Math.asin(-n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(y,c),this._y=Math.atan2(l,t)):(this._x=Math.atan2(-f,o),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new J;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new G;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new m(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(F.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=this.mask|1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return(this.mask&t.mask)!==0}});var fh=0;z.DefaultUp=new m(0,1,0),z.DefaultMatrixAutoUpdate=!0,z.prototype=Object.assign(Object.create($.prototype),{constructor:z,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new G;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new G;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new m(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new m(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new m(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new m;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new m(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new m(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new m(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new J;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new G,e=new J,i=new m,n=new m;return function(o,s,l){o.isVector3?i.copy(o):i.set(o,s,l),o=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),o&&(e.extractRotation(o.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var o=this.children[i].getObjectByProperty(t,e);if(o!==void 0)return o}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new m),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new m,e=new m;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new G),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new m,e=new G;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new m),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new m),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0)for(t=this.children,e=0,i=t.length;e<i;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(v,y){return v[y.uuid]===void 0&&(v[y.uuid]=y.toJSON(t)),y.uuid}function i(v){var y=[],S;for(S in v){var C=v[S];delete C.metadata,y.push(C)}return y}var n=t===void 0||typeof t=="string",o={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},o.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var s={};if(s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){s.geometry=e(t.geometries,this.geometry);var l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0)if(l=l.shapes,Array.isArray(l))for(var h=0,c=l.length;h<c;h++)e(t.shapes,l[h]);else e(t.shapes,l)}if(this.material!==void 0)if(Array.isArray(this.material)){for(l=[],h=0,c=this.material.length;h<c;h++)l.push(e(t.materials,this.material[h]));s.material=l}else s.material=e(t.materials,this.material);if(0<this.children.length)for(s.children=[],h=0;h<this.children.length;h++)s.children.push(this.children[h].toJSON(t).object);if(n){n=i(t.geometries),h=i(t.materials),c=i(t.textures);var f=i(t.images);l=i(t.shapes),0<n.length&&(o.geometries=n),0<h.length&&(o.materials=h),0<c.length&&(o.textures=c),0<f.length&&(o.images=f),0<l.length&&(o.shapes=l)}return o.object=s,o},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var ph=0;W.prototype=Object.assign(Object.create($.prototype),{constructor:W,isGeometry:!0,applyMatrix:function(t){for(var e=new P().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var o=0,s=t.vertexNormals.length;o<s;o++)t.vertexNormals[o].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new J;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new J;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new J;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new J;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new J;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(N,j,et,_t){var mt=h===void 0?[]:[i.colors[N].clone(),i.colors[j].clone(),i.colors[et].clone()],bt=l===void 0?[]:[new m().fromArray(l,3*N),new m().fromArray(l,3*j),new m().fromArray(l,3*et)];_t=new M(N,j,et,bt,mt,_t),i.faces.push(_t),c!==void 0&&i.faceVertexUvs[0].push([new p().fromArray(c,2*N),new p().fromArray(c,2*j),new p().fromArray(c,2*et)]),f!==void 0&&i.faceVertexUvs[1].push([new p().fromArray(f,2*N),new p().fromArray(f,2*j),new p().fromArray(f,2*et)])}var i=this,n=t.index!==null?t.index.array:void 0,o=t.attributes,s=o.position.array,l=o.normal!==void 0?o.normal.array:void 0,h=o.color!==void 0?o.color.array:void 0,c=o.uv!==void 0?o.uv.array:void 0,f=o.uv2!==void 0?o.uv2.array:void 0;f!==void 0&&(this.faceVertexUvs[1]=[]);for(var v=o=0;o<s.length;o+=3,v+=2)i.vertices.push(new m().fromArray(s,o)),h!==void 0&&i.colors.push(new A().fromArray(h,o));var y=t.groups;if(0<y.length)for(o=0;o<y.length;o++){s=y[o];var S=s.start,C=s.count;for(v=S,S+=C;v<S;v+=3)n!==void 0?e(n[v],n[v+1],n[v+2],s.materialIndex):e(v,v+1,v+2,s.materialIndex)}else if(n!==void 0)for(o=0;o<n.length;o+=3)e(n[o],n[o+1],n[o+2]);else for(o=0;o<s.length/3;o+=3)e(o,o+1,o+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new m;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius;e=e===0?1:1/e;var i=new J;return i.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var t=new m,e=new m,i=0,n=this.faces.length;i<n;i++){var o=this.faces[i],s=this.vertices[o.a],l=this.vertices[o.b];t.subVectors(this.vertices[o.c],l),e.subVectors(s,l),t.cross(e),t.normalize(),o.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new m;if(t){var o=new m,s=new m;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var l=this.vertices[e.a],h=this.vertices[e.b],c=this.vertices[e.c];o.subVectors(c,h),s.subVectors(l,h),o.cross(s),i[e.a].add(o),i[e.b].add(o),i[e.c].add(o)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],l=e.vertexNormals,l.length===3?(l[0].copy(i[e.a]),l[1].copy(i[e.b]),l[2].copy(i[e.c])):(l[0]=i[e.a].clone(),l[1]=i[e.b].clone(),l[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var o=0;for(t=n.vertexNormals.length;o<t;o++)n.__originalVertexNormals[o]?n.__originalVertexNormals[o].copy(n.vertexNormals[o]):n.__originalVertexNormals[o]=n.vertexNormals[o].clone()}var s=new W;for(s.faces=this.faces,o=0,t=this.morphTargets.length;o<t;o++){if(!this.morphNormals[o]){this.morphNormals[o]={},this.morphNormals[o].faceNormals=[],this.morphNormals[o].vertexNormals=[],n=this.morphNormals[o].faceNormals;var l=this.morphNormals[o].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var h=new m,c={a:new m,b:new m,c:new m};n.push(h),l.push(c)}}for(l=this.morphNormals[o],s.vertices=this.morphTargets[o].vertices,s.computeFaceNormals(),s.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],h=l.faceNormals[i],c=l.vertexNormals[i],h.copy(n.normal),c.a.copy(n.vertexNormals[0]),c.b.copy(n.vertexNormals[1]),c.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new K),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new B),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,o=this.vertices.length,s=this.vertices,l=t.vertices,h=this.faces,c=t.faces,f=this.faceVertexUvs[0],v=t.faceVertexUvs[0],y=this.colors,S=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new P().getNormalMatrix(e)),t=0;for(var C=l.length;t<C;t++){var N=l[t].clone();e!==void 0&&N.applyMatrix4(e),s.push(N)}for(t=0,C=S.length;t<C;t++)y.push(S[t].clone());for(t=0,C=c.length;t<C;t++){l=c[t];var j=l.vertexNormals;for(S=l.vertexColors,y=new M(l.a+o,l.b+o,l.c+o),y.normal.copy(l.normal),n!==void 0&&y.normal.applyMatrix3(n).normalize(),e=0,s=j.length;e<s;e++)N=j[e].clone(),n!==void 0&&N.applyMatrix3(n).normalize(),y.vertexNormals.push(N);for(y.color.copy(l.color),e=0,s=S.length;e<s;e++)N=S[e],y.vertexColors.push(N.clone());y.materialIndex=l.materialIndex+i,h.push(y)}for(t=0,C=v.length;t<C;t++)if(i=v[t],n=[],i!==void 0){for(e=0,s=i.length;e<s;e++)n.push(i[e].clone());f.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t={},e=[],i=[],n=Math.pow(10,4),o,s=0;for(o=this.vertices.length;s<o;s++){var l=this.vertices[s];l=Math.round(l.x*n)+"_"+Math.round(l.y*n)+"_"+Math.round(l.z*n),t[l]===void 0?(t[l]=s,e.push(this.vertices[s]),i[s]=e.length-1):i[s]=i[t[l]]}for(t=[],s=0,o=this.faces.length;s<o;s++)for(n=this.faces[s],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],l=0;3>l;l++)if(n[l]===n[(l+1)%3]){t.push(s);break}for(s=t.length-1;0<=s;s--)for(n=t[s],this.faces.splice(n,1),i=0,o=this.faceVertexUvs.length;i<o;i++)this.faceVertexUvs[i].splice(n,1);return s=this.vertices.length-e.length,this.vertices=e,s},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new m(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(c,f){return c.materialIndex-f.materialIndex});var n=this.faceVertexUvs[0],o=this.faceVertexUvs[1],s,l;for(n&&n.length===e&&(s=[]),o&&o.length===e&&(l=[]),i=0;i<e;i++){var h=t[i]._id;s&&s.push(n[h]),l&&l.push(o[h])}s&&(this.faceVertexUvs[0]=s),l&&(this.faceVertexUvs[1]=l)},toJSON:function(){function t(Vt,V,it){return it?Vt|1<<V:Vt&~(1<<V)}function e(Vt){var V=Vt.x.toString()+Vt.y.toString()+Vt.z.toString();return f[V]!==void 0||(f[V]=c.length/3,c.push(Vt.x,Vt.y,Vt.z)),f[V]}function i(Vt){var V=Vt.r.toString()+Vt.g.toString()+Vt.b.toString();return y[V]!==void 0||(y[V]=v.length,v.push(Vt.getHex())),y[V]}function n(Vt){var V=Vt.x.toString()+Vt.y.toString();return C[V]!==void 0||(C[V]=S.length/2,S.push(Vt.x,Vt.y)),C[V]}var o={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.parameters!==void 0){var s=this.parameters,l;for(l in s)s[l]!==void 0&&(o[l]=s[l]);return o}for(s=[],l=0;l<this.vertices.length;l++){var h=this.vertices[l];s.push(h.x,h.y,h.z)}h=[];var c=[],f={},v=[],y={},S=[],C={};for(l=0;l<this.faces.length;l++){var N=this.faces[l],j=this.faceVertexUvs[0][l]!==void 0,et=0<N.normal.length(),_t=0<N.vertexNormals.length,mt=N.color.r!==1||N.color.g!==1||N.color.b!==1,bt=0<N.vertexColors.length,xt=0;xt=t(xt,0,0),xt=t(xt,1,!0),xt=t(xt,2,!1),xt=t(xt,3,j),xt=t(xt,4,et),xt=t(xt,5,_t),xt=t(xt,6,mt),xt=t(xt,7,bt),h.push(xt),h.push(N.a,N.b,N.c),h.push(N.materialIndex),j&&(j=this.faceVertexUvs[0][l],h.push(n(j[0]),n(j[1]),n(j[2]))),et&&h.push(e(N.normal)),_t&&(et=N.vertexNormals,h.push(e(et[0]),e(et[1]),e(et[2]))),mt&&h.push(i(N.color)),bt&&(N=N.vertexColors,h.push(i(N[0]),i(N[1]),i(N[2])))}return o.data={},o.data.vertices=s,o.data.normals=c,0<v.length&&(o.data.colors=v),0<S.length&&(o.data.uvs=[S]),o.data.faces=h,o},clone:function(){return new W().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var o=t.vertices,s=0;for(e=o.length;s<e;s++)this.vertices.push(o[s].clone());for(o=t.colors,s=0,e=o.length;s<e;s++)this.colors.push(o[s].clone());for(o=t.faces,s=0,e=o.length;s<e;s++)this.faces.push(o[s].clone());for(s=0,e=t.faceVertexUvs.length;s<e;s++){var l=t.faceVertexUvs[s];for(this.faceVertexUvs[s]===void 0&&(this.faceVertexUvs[s]=[]),o=0,i=l.length;o<i;o++){var h=l[o],c=[],f=0;for(n=h.length;f<n;f++)c.push(h[f].clone());this.faceVertexUvs[s].push(c)}}for(f=t.morphTargets,s=0,e=f.length;s<e;s++){if(n={},n.name=f[s].name,f[s].vertices!==void 0)for(n.vertices=[],o=0,i=f[s].vertices.length;o<i;o++)n.vertices.push(f[s].vertices[o].clone());if(f[s].normals!==void 0)for(n.normals=[],o=0,i=f[s].normals.length;o<i;o++)n.normals.push(f[s].normals[o].clone());this.morphTargets.push(n)}for(f=t.morphNormals,s=0,e=f.length;s<e;s++){if(n={},f[s].vertexNormals!==void 0)for(n.vertexNormals=[],o=0,i=f[s].vertexNormals.length;o<i;o++)l=f[s].vertexNormals[o],h={},h.a=l.a.clone(),h.b=l.b.clone(),h.c=l.c.clone(),n.vertexNormals.push(h);if(f[s].faceNormals!==void 0)for(n.faceNormals=[],o=0,i=f[s].faceNormals.length;o<i;o++)n.faceNormals.push(f[s].faceNormals[o].clone());this.morphNormals.push(n)}for(o=t.skinWeights,s=0,e=o.length;s<e;s++)this.skinWeights.push(o[s].clone());for(o=t.skinIndices,s=0,e=o.length;s<e;s++)this.skinIndices.push(o[s].clone());for(o=t.lineDistances,s=0,e=o.length;s<e;s++)this.lineDistances.push(o[s]);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(ht.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(ht.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,o=this.itemSize;n<o;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),s=new A),e[i++]=s.r,e[i++]=s.g,e[i++]=s.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),s=new p),e[i++]=s.x,e[i++]=s.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),s=new m),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var s=t[n];s===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),s=new E),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z,e[i++]=s.w}return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,o){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=o,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),ft.prototype=Object.create(ht.prototype),ft.prototype.constructor=ft,gt.prototype=Object.create(ht.prototype),gt.prototype.constructor=gt,Nt.prototype=Object.create(ht.prototype),Nt.prototype.constructor=Nt,lt.prototype=Object.create(ht.prototype),lt.prototype.constructor=lt,Et.prototype=Object.create(ht.prototype),Et.prototype.constructor=Et,D.prototype=Object.create(ht.prototype),D.prototype.constructor=D,zt.prototype=Object.create(ht.prototype),zt.prototype.constructor=zt,Pt.prototype=Object.create(ht.prototype),Pt.prototype.constructor=Pt,Rt.prototype=Object.create(ht.prototype),Rt.prototype.constructor=Rt,Object.assign(ge.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var o=t[n];if(o.materialIndex!==i){i=o.materialIndex,s!==void 0&&(s.count=3*n-s.start,e.push(s));var s={start:3*n,materialIndex:i}}}s!==void 0&&(s.count=3*n-s.start,e.push(s)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,o=n[0]&&0<n[0].length,s=n[1]&&0<n[1].length,l=t.morphTargets,h=l.length;if(0<h){for(var c=[],f=0;f<h;f++)c[f]={name:l[f].name,data:[]};this.morphTargets.position=c}var v=t.morphNormals,y=v.length;if(0<y){var S=[];for(f=0;f<y;f++)S[f]={name:v[f].name,data:[]};this.morphTargets.normal=S}var C=t.skinIndices,N=t.skinWeights,j=C.length===i.length,et=N.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),f=0;f<e.length;f++){var _t=e[f];this.vertices.push(i[_t.a],i[_t.b],i[_t.c]);var mt=_t.vertexNormals;for(mt.length===3?this.normals.push(mt[0],mt[1],mt[2]):(mt=_t.normal,this.normals.push(mt,mt,mt)),mt=_t.vertexColors,mt.length===3?this.colors.push(mt[0],mt[1],mt[2]):(mt=_t.color,this.colors.push(mt,mt,mt)),o===!0&&(mt=n[0][f],mt!==void 0?this.uvs.push(mt[0],mt[1],mt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",f),this.uvs.push(new p,new p,new p))),s===!0&&(mt=n[1][f],mt!==void 0?this.uvs2.push(mt[0],mt[1],mt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",f),this.uvs2.push(new p,new p,new p))),mt=0;mt<h;mt++){var bt=l[mt].vertices;c[mt].data.push(bt[_t.a],bt[_t.b],bt[_t.c])}for(mt=0;mt<y;mt++)bt=v[mt].vertexNormals[f],S[mt].data.push(bt.a,bt.b,bt.c);j&&this.skinIndices.push(C[_t.a],C[_t.b],C[_t.c]),et&&this.skinWeights.push(N[_t.a],N[_t.b],N[_t.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var dh=1;Ft.prototype=Object.assign(Object.create($.prototype),{constructor:Ft,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<ue(t)?zt:Et)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new ht(e,i)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:i!==void 0?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;return e!==void 0&&(t.applyToBufferAttribute(e),e.needsUpdate=!0),e=this.attributes.normal,e!==void 0&&(new P().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new J;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new J;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new J;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new J;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new J;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new z;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new m;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){t=new Pt(3*e.vertices.length,3);var i=new Pt(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new Pt(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i];e.push(o.x,o.y,o.z||0)}return this.addAttribute("position",new Pt(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new ge().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new ht(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new ht(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new ht(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new ht(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new ht(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],o=0,s=n.length;o<s;o++){var l=n[o],h=new Pt(3*l.data.length,3);h.name=l.name,e.push(h.copyVector3sArray(l.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new Pt(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new Pt(4*t.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(t.skinWeights))),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new K);var t=this.attributes.position;t!==void 0?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new K,e=new m;return function(){this.boundingSphere===null&&(this.boundingSphere=new B);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var o=0,s=0,l=i.count;s<l;s++)e.x=i.getX(s),e.y=i.getY(s),e.z=i.getZ(s),o=Math.max(o,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new ht(new Float32Array(i.length),3));else for(var n=e.normal.array,o=0,s=n.length;o<s;o++)n[o]=0;n=e.normal.array;var l=new m,h=new m,c=new m,f=new m,v=new m;if(t){var y=t.array;for(o=0,s=t.count;o<s;o+=3){t=3*y[o+0];var S=3*y[o+1],C=3*y[o+2];l.fromArray(i,t),h.fromArray(i,S),c.fromArray(i,C),f.subVectors(c,h),v.subVectors(l,h),f.cross(v),n[t]+=f.x,n[t+1]+=f.y,n[t+2]+=f.z,n[S]+=f.x,n[S+1]+=f.y,n[S+2]+=f.z,n[C]+=f.x,n[C+1]+=f.y,n[C+2]+=f.z}}else for(o=0,s=i.length;o<s;o+=9)l.fromArray(i,o),h.fromArray(i,o+3),c.fromArray(i,o+6),f.subVectors(c,h),v.subVectors(l,h),f.cross(v),n[o]=f.x,n[o+1]=f.y,n[o+2]=f.z,n[o+3]=f.x,n[o+4]=f.y,n[o+5]=f.z,n[o+6]=f.x,n[o+7]=f.y,n[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var o=i[n].array,s=t.attributes[n],l=s.array,h=0;for(s=s.itemSize*e;h<l.length;h++,s++)o[s]=l[h]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new m;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Ft,e=this.index.array,i=this.attributes,n;for(n in i){var o=i[n],s=o.array,l=o.itemSize,h=new s.constructor(e.length*l),c=0;o=0;for(var f=e.length;o<f;o++)for(var v=e[o]*l,y=0;y<l;y++)h[c++]=s[v++];t.addAttribute(n,new ht(h,l))}for(e=this.groups,o=0,f=e.length;o<f;o++)i=e[o],t.addGroup(i.start,i.count,i.materialIndex);return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(o in e)e[o]!==void 0&&(t[o]=e[o]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(o in i){var n=i[o];e=Array.prototype.slice.call(n.array),t.data.attributes[o]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var o=this.groups;return 0<o.length&&(t.data.groups=JSON.parse(JSON.stringify(o))),o=this.boundingSphere,o!==null&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t},clone:function(){return new Ft().copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var i=t.index;i!==null&&this.setIndex(i.clone()),i=t.attributes;for(l in i)this.addAttribute(l,i[l].clone());var n=t.morphAttributes;for(l in n){var o=[],s=n[l];for(i=0,e=s.length;i<e;i++)o.push(s[i].clone());this.morphAttributes[l]=o}var l=t.groups;for(i=0,e=l.length;i<e;i++)n=l[i],this.addGroup(n.start,n.count,n.materialIndex);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Dt.prototype=Object.create(W.prototype),Dt.prototype.constructor=Dt,kt.prototype=Object.create(Ft.prototype),kt.prototype.constructor=kt,Fe.prototype=Object.create(W.prototype),Fe.prototype.constructor=Fe,xe.prototype=Object.create(Ft.prototype),xe.prototype.constructor=xe;var Vl=0;Zt.prototype=Object.assign(Object.create($.prototype),{constructor:Zt,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(o){var s=[],l;for(l in o){var h=o[l];delete h.metadata,s.push(h)}return s}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearCoat!==void 0&&(n.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,this.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),n},clone:function(){return new this.constructor().copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var o=0;o!==n;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),ti.prototype=Object.create(Zt.prototype),ti.prototype.constructor=ti,ti.prototype.isShaderMaterial=!0,ti.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Pn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},ti.prototype.toJSON=function(t){var e=Zt.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(ki.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),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,e){return e===void 0&&(console.warn("THREE.Ray: .at() target is now required"),e=new m),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new m;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new m),e.subVectors(t,this.origin),t=e.dot(this.direction),0>t?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new m;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new m,e=new m,i=new m;return function(n,o,s,l){t.copy(n).add(o).multiplyScalar(.5),e.copy(o).sub(n).normalize(),i.copy(this.origin).sub(t);var h=.5*n.distanceTo(o),c=-this.direction.dot(e),f=i.dot(this.direction),v=-i.dot(e),y=i.lengthSq(),S=Math.abs(1-c*c);if(0<S){n=c*v-f,o=c*f-v;var C=h*S;0<=n?o>=-C?o<=C?(h=1/S,n*=h,o*=h,c=n*(n+c*o+2*f)+o*(c*n+o+2*v)+y):(o=h,n=Math.max(0,-(c*o+f)),c=-n*n+o*(o+2*v)+y):(o=-h,n=Math.max(0,-(c*o+f)),c=-n*n+o*(o+2*v)+y):o<=-C?(n=Math.max(0,-(-c*h+f)),o=0<n?-h:Math.min(Math.max(-h,-v),h),c=-n*n+o*(o+2*v)+y):o<=C?(n=0,o=Math.min(Math.max(-h,-v),h),c=o*(o+2*v)+y):(n=Math.max(0,-(c*h+f)),o=0<n?h:Math.min(Math.max(-h,-v),h),c=-n*n+o*(o+2*v)+y)}else o=0<c?-h:h,n=Math.max(0,-(c*o+f)),c=-n*n+o*(o+2*v)+y;return s&&s.copy(this.direction).multiplyScalar(n).add(this.origin),l&&l.copy(e).multiplyScalar(o).add(t),c}}(),intersectSphere:function(){var t=new m;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),o=t.dot(t)-n*n;return e=e.radius*e.radius,o>e?null:(e=Math.sqrt(e-o),o=n-e,n+=e,0>o&&0>n?null:0>o?this.at(n,i):this.at(o,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,o=1/this.direction.z,s=this.origin;if(0<=i){var l=(t.min.x-s.x)*i;i*=t.max.x-s.x}else l=(t.max.x-s.x)*i,i*=t.min.x-s.x;if(0<=n){var h=(t.min.y-s.y)*n;n*=t.max.y-s.y}else h=(t.max.y-s.y)*n,n*=t.min.y-s.y;return l>n||h>i||((h>l||l!==l)&&(l=h),(n<i||i!==i)&&(i=n),0<=o?(h=(t.min.z-s.z)*o,t=(t.max.z-s.z)*o):(h=(t.max.z-s.z)*o,t=(t.min.z-s.z)*o),l>t||h>i)?null:((h>l||l!==l)&&(l=h),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=l?l:i,e))},intersectsBox:function(){var t=new m;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new m,e=new m,i=new m,n=new m;return function(o,s,l,h,c){if(e.subVectors(s,o),i.subVectors(l,o),n.crossVectors(e,i),s=this.direction.dot(n),0<s){if(h)return null;h=1}else if(0>s)h=-1,s=-s;else return null;return t.subVectors(this.origin,o),o=h*this.direction.dot(i.crossVectors(t,i)),0>o||(l=h*this.direction.dot(e.cross(t)),0>l||o+l>s)?null:(o=-h*t.dot(n),0>o?null:this.at(o/s,c))}}(),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(Ie,{getNormal:function(){var t=new m;return function(e,i,n,o){return o===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),o=new m),o.subVectors(n,i),t.subVectors(e,i),o.cross(t),e=o.lengthSq(),0<e?o.multiplyScalar(1/Math.sqrt(e)):o.set(0,0,0)}}(),getBarycoord:function(){var t=new m,e=new m,i=new m;return function(n,o,s,l,h){t.subVectors(l,o),e.subVectors(s,o),i.subVectors(n,o),n=t.dot(t),o=t.dot(e),s=t.dot(i);var c=e.dot(e);l=e.dot(i);var f=n*c-o*o;return h===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),h=new m),f===0?h.set(-2,-1,-1):(f=1/f,c=(c*s-o*l)*f,n=(n*l-o*s)*f,h.set(1-c-n,n,c))}}(),containsPoint:function(){var t=new m;return function(e,i,n,o){return Ie.getBarycoord(e,i,n,o,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new m;return function(e,i,n,o,s,l,h,c){return this.getBarycoord(e,i,n,o,t),c.set(0,0),c.addScaledVector(s,t.x),c.addScaledVector(l,t.y),c.addScaledVector(h,t.z),c}}()}),Object.assign(Ie.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new m,e=new m;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new m),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Ie.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new m),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Ie.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ie.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,o){return Ie.getUV(t,this.a,this.b,this.c,e,i,n,o)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new m,e=new m,i=new m,n=new m,o=new m,s=new m;return function(l,h){h===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),h=new m);var c=this.a,f=this.b,v=this.c;t.subVectors(f,c),e.subVectors(v,c),n.subVectors(l,c);var y=t.dot(n),S=e.dot(n);if(0>=y&&0>=S)return h.copy(c);o.subVectors(l,f);var C=t.dot(o),N=e.dot(o);if(0<=C&&N<=C)return h.copy(f);var j=y*N-C*S;if(0>=j&&0<=y&&0>=C)return f=y/(y-C),h.copy(c).addScaledVector(t,f);s.subVectors(l,v),l=t.dot(s);var et=e.dot(s);return 0<=et&&l<=et?h.copy(v):(y=l*S-y*et,0>=y&&0<=S&&0>=et?(j=S/(S-et),h.copy(c).addScaledVector(e,j)):(S=C*et-l*N,0>=S&&0<=N-C&&0<=l-et?(i.subVectors(v,f),j=(N-C)/(N-C+(l-et)),h.copy(f).addScaledVector(i,j)):(v=1/(S+y+j),f=y*v,j*=v,h.copy(c).addScaledVector(t,f).addScaledVector(e,j))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ge.prototype=Object.create(Zt.prototype),Ge.prototype.constructor=Ge,Ge.prototype.isMeshBasicMaterial=!0,Ge.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},di.prototype=Object.assign(Object.create(z.prototype),{constructor:di,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return z.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(et,_t,mt,bt,xt,Vt,V,it){return(_t.side===1?bt.intersectTriangle(V,Vt,xt,!0,it):bt.intersectTriangle(xt,Vt,V,_t.side!==2,it))===null?null:(j.copy(it),j.applyMatrix4(et.matrixWorld),_t=mt.ray.origin.distanceTo(j),_t<mt.near||_t>mt.far?null:{distance:_t,point:j.clone(),object:et})}function e(et,_t,mt,bt,xt,Vt,V,it,It){return s.fromBufferAttribute(xt,V),l.fromBufferAttribute(xt,it),h.fromBufferAttribute(xt,It),(et=t(et,_t,mt,bt,s,l,h,N))&&(Vt&&(y.fromBufferAttribute(Vt,V),S.fromBufferAttribute(Vt,it),C.fromBufferAttribute(Vt,It),et.uv=Ie.getUV(N,s,l,h,y,S,C,new p)),Vt=new M(V,it,It),Ie.getNormal(s,l,h,Vt.normal),et.face=Vt),et}var i=new J,n=new ki,o=new B,s=new m,l=new m,h=new m,c=new m,f=new m,v=new m,y=new p,S=new p,C=new p,N=new m,j=new m;return function(et,_t){var mt=this.geometry,bt=this.material,xt=this.matrixWorld;if(bt!==void 0&&(mt.boundingSphere===null&&mt.computeBoundingSphere(),o.copy(mt.boundingSphere),o.applyMatrix4(xt),et.ray.intersectsSphere(o)!==!1&&(i.getInverse(xt),n.copy(et.ray).applyMatrix4(i),mt.boundingBox===null||n.intersectsBox(mt.boundingBox)!==!1))){if(mt.isBufferGeometry){var Vt=mt.index,V=mt.attributes.position,it=mt.attributes.uv,It=mt.groups;mt=mt.drawRange;var ee;if(Vt!==null)if(Array.isArray(bt)){var $t=0;for(ee=It.length;$t<ee;$t++){var qt=It[$t],Te=bt[qt.materialIndex];xt=Math.max(qt.start,mt.start);var pe=Math.min(qt.start+qt.count,mt.start+mt.count);for(qt=xt;qt<pe;qt+=3){xt=Vt.getX(qt);var Oe=Vt.getX(qt+1),be=Vt.getX(qt+2);(xt=e(this,Te,et,n,V,it,xt,Oe,be))&&(xt.faceIndex=Math.floor(qt/3),_t.push(xt))}}}else for(xt=Math.max(0,mt.start),pe=Math.min(Vt.count,mt.start+mt.count),$t=xt,ee=pe;$t<ee;$t+=3)xt=Vt.getX($t),Oe=Vt.getX($t+1),be=Vt.getX($t+2),(xt=e(this,bt,et,n,V,it,xt,Oe,be))&&(xt.faceIndex=Math.floor($t/3),_t.push(xt));else if(V!==void 0)if(Array.isArray(bt))for($t=0,ee=It.length;$t<ee;$t++)for(qt=It[$t],Te=bt[qt.materialIndex],xt=Math.max(qt.start,mt.start),pe=Math.min(qt.start+qt.count,mt.start+mt.count),qt=xt;qt<pe;qt+=3)xt=qt,Oe=qt+1,be=qt+2,(xt=e(this,Te,et,n,V,it,xt,Oe,be))&&(xt.faceIndex=Math.floor(qt/3),_t.push(xt));else for(xt=Math.max(0,mt.start),pe=Math.min(V.count,mt.start+mt.count),$t=xt,ee=pe;$t<ee;$t+=3)xt=$t,Oe=$t+1,be=$t+2,(xt=e(this,bt,et,n,V,it,xt,Oe,be))&&(xt.faceIndex=Math.floor($t/3),_t.push(xt))}else if(mt.isGeometry){for(V=Array.isArray(bt),it=mt.vertices,It=mt.faces,xt=mt.faceVertexUvs[0],0<xt.length&&(Vt=xt),qt=0,pe=It.length;qt<pe;qt++)if(Oe=It[qt],xt=V?bt[Oe.materialIndex]:bt,xt!==void 0){if($t=it[Oe.a],ee=it[Oe.b],Te=it[Oe.c],xt.morphTargets===!0){be=mt.morphTargets;var se=this.morphTargetInfluences;s.set(0,0,0),l.set(0,0,0),h.set(0,0,0);for(var je=0,Ke=be.length;je<Ke;je++){var fi=se[je];if(fi!==0){var xn=be[je].vertices;s.addScaledVector(c.subVectors(xn[Oe.a],$t),fi),l.addScaledVector(f.subVectors(xn[Oe.b],ee),fi),h.addScaledVector(v.subVectors(xn[Oe.c],Te),fi)}}s.add($t),l.add(ee),h.add(Te),$t=s,ee=l,Te=h}(xt=t(this,xt,et,n,$t,ee,Te,N))&&(Vt&&Vt[qt]&&(be=Vt[qt],y.copy(be[0]),S.copy(be[1]),C.copy(be[2]),xt.uv=Ie.getUV(N,$t,ee,Te,y,S,C,new p)),xt.face=Oe,xt.faceIndex=qt,_t.push(xt))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),w.prototype=Object.create(O.prototype),w.prototype.constructor=w,w.prototype.isCubeTexture=!0,Object.defineProperty(w.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),X.prototype=Object.create(O.prototype),X.prototype.constructor=X,X.prototype.isDataTexture3D=!0;var ml=new O,mh=new X,jl=new w,Va=[],Bs=[],ga=new Float32Array(16),Wl=new Float32Array(9),gl=new Float32Array(4);cs.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),vt(e,t)},js.prototype.setValue=function(t,e,i){for(var n=this.seq,o=0,s=n.length;o!==s;++o){var l=n[o];l.setValue(t,e[l.id],i)}};var vl=/([\w\d_]+)(\])?(\[|\.)?/g;Dr.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},Dr.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},Dr.upload=function(t,e,i,n){for(var o=0,s=e.length;o!==s;++o){var l=e[o],h=i[l.id];h.needsUpdate!==!1&&l.setValue(t,h.value,n)}},Dr.seqWithValue=function(t,e){for(var i=[],n=0,o=t.length;n!==o;++n){var s=t[n];s.id in e&&i.push(s)}return i};var ao=0,yl=0;oe.prototype=Object.create(Zt.prototype),oe.prototype.constructor=oe,oe.prototype.isMeshDepthMaterial=!0,oe.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},te.prototype=Object.create(Zt.prototype),te.prototype.constructor=te,te.prototype.isMeshDistanceMaterial=!0,te.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},ci.prototype=Object.assign(Object.create(z.prototype),{constructor:ci,isGroup:!0}),Be.prototype=Object.assign(Object.create(z.prototype),{constructor:Be,isCamera:!0,copy:function(t,e){return z.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new m),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){z.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),ye.prototype=Object.assign(Object.create(Be.prototype),{constructor:ye,isPerspectiveCamera:!0,copy:function(t,e){return Be.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*pi.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*pi.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*pi.RAD2DEG*Math.atan(Math.tan(.5*pi.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,o,s){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*pi.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,o=-.5*n,s=this.view;if(this.view!==null&&this.view.enabled){var l=s.fullWidth,h=s.fullHeight;o+=s.offsetX*n/l,e-=s.offsetY*i/h,n*=s.width/l,i*=s.height/h}s=this.filmOffset,s!==0&&(o+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),ke.prototype=Object.assign(Object.create(ye.prototype),{constructor:ke,isArrayCamera:!0});var Ao=new m,sr=new m;Le.prototype.isFogExp2=!0,Le.prototype.clone=function(){return new Le(this.color,this.density)},Le.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},vn.prototype.isFog=!0,vn.prototype.clone=function(){return new vn(this.color,this.near,this.far)},vn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},zn.prototype=Object.assign(Object.create(z.prototype),{constructor:zn,copy:function(t,e){return z.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=z.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(Oi.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Oi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,o=this.stride;n<o;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},clone:function(){return new this.constructor().copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(Di.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Di.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,o){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=o,this}}),Fi.prototype=Object.create(Zt.prototype),Fi.prototype.constructor=Fi,Fi.prototype.isSpriteMaterial=!0,Fi.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Ns;Qi.prototype=Object.assign(Object.create(z.prototype),{constructor:Qi,isSprite:!0,raycast:function(){function t(C,N,j,et,_t,mt){o.subVectors(C,j).addScalar(.5).multiply(et),_t!==void 0?(s.x=mt*o.x-_t*o.y,s.y=_t*o.x+mt*o.y):s.copy(o),C.copy(N),C.x+=s.x,C.y+=s.y,C.applyMatrix4(l)}var e=new m,i=new m,n=new m,o=new p,s=new p,l=new J,h=new m,c=new m,f=new m,v=new p,y=new p,S=new p;return function(C,N){i.setFromMatrixScale(this.matrixWorld),l.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var j=this.material.rotation;if(j!==0)var et=Math.cos(j),_t=Math.sin(j);j=this.center,t(h.set(-.5,-.5,0),n,j,i,_t,et),t(c.set(.5,-.5,0),n,j,i,_t,et),t(f.set(.5,.5,0),n,j,i,_t,et),v.set(0,0),y.set(1,0),S.set(1,1);var mt=C.ray.intersectTriangle(h,c,f,!1,e);mt===null&&(t(c.set(-.5,.5,0),n,j,i,_t,et),y.set(0,1),mt=C.ray.intersectTriangle(h,f,c,!1,e),mt===null)||(_t=C.ray.origin.distanceTo(e),_t<C.near||_t>C.far||N.push({distance:_t,point:e.clone(),uv:Ie.getUV(e,h,c,f,v,y,S,new p),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return z.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),tn.prototype=Object.assign(Object.create(z.prototype),{constructor:tn,copy:function(t){z.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new m;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new m,e=new m;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var o=1,s=n.length;o<s&&i>=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;o<s;o++)n[o].object.visible=!1}}}(),toJSON:function(t){t=z.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var o=e[i];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),Object.assign(sn.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new J;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i=0;for(e=this.bones.length;i<e;i++)(t=this.bones[i])&&t.matrixWorld.getInverse(this.boneInverses[i]);for(i=0,e=this.bones.length;i<e;i++)(t=this.bones[i])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new J,e=new J;return function(){for(var i=this.bones,n=this.boneInverses,o=this.boneMatrices,s=this.boneTexture,l=0,h=i.length;l<h;l++)t.multiplyMatrices(i[l]?i[l].matrixWorld:e,n[l]),t.toArray(o,16*l);s!==void 0&&(s.needsUpdate=!0)}}(),clone:function(){return new sn(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),an.prototype=Object.assign(Object.create(z.prototype),{constructor:an,isBone:!0}),Ui.prototype=Object.assign(Object.create(di.prototype),{constructor:Ui,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],o=new an;t.push(o),o.name=n.name,o.position.fromArray(n.pos),o.quaternion.fromArray(n.rotq),n.scl!==void 0&&o.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new E;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){di.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),zi.prototype=Object.create(Zt.prototype),zi.prototype.constructor=zi,zi.prototype.isLineBasicMaterial=!0,zi.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Vi.prototype=Object.assign(Object.create(z.prototype),{constructor:Vi,isLine:!0,computeLineDistances:function(){var t=new m,e=new m;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[0],s=1,l=n.count;s<l;s++)t.fromBufferAttribute(n,s-1),e.fromBufferAttribute(n,s),o[s]=o[s-1],o[s]+=t.distanceTo(e);i.addAttribute("lineDistance",new Pt(o,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,o[0]=0,s=1,l=n.length;s<l;s++)o[s]=o[s-1],o[s]+=n[s-1].distanceTo(n[s]);return this}}(),raycast:function(){var t=new J,e=new ki,i=new B;return function(n,o){var s=n.linePrecision,l=this.geometry,h=this.matrixWorld;if(l.boundingSphere===null&&l.computeBoundingSphere(),i.copy(l.boundingSphere),i.applyMatrix4(h),i.radius+=s,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),s/=(this.scale.x+this.scale.y+this.scale.z)/3,s*=s;var c=new m,f=new m;h=new m;var v=new m,y=this&&this.isLineSegments?2:1;if(l.isBufferGeometry){var S=l.index,C=l.attributes.position.array;if(S!==null){S=S.array,l=0;for(var N=S.length-1;l<N;l+=y){var j=S[l+1];c.fromArray(C,3*S[l]),f.fromArray(C,3*j),j=e.distanceSqToSegment(c,f,v,h),j>s||(v.applyMatrix4(this.matrixWorld),j=n.ray.origin.distanceTo(v),j<n.near||j>n.far||o.push({distance:j,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}else for(l=0,N=C.length/3-1;l<N;l+=y)c.fromArray(C,3*l),f.fromArray(C,3*l+3),j=e.distanceSqToSegment(c,f,v,h),j>s||(v.applyMatrix4(this.matrixWorld),j=n.ray.origin.distanceTo(v),j<n.near||j>n.far||o.push({distance:j,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}else if(l.isGeometry)for(c=l.vertices,f=c.length,l=0;l<f-1;l+=y)j=e.distanceSqToSegment(c[l],c[l+1],v,h),j>s||(v.applyMatrix4(this.matrixWorld),j=n.ray.origin.distanceTo(v),j<n.near||j>n.far||o.push({distance:j,point:h.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return z.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),gi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:gi,isLineSegments:!0,computeLineDistances:function(){var t=new m,e=new m;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[],s=0,l=n.count;s<l;s+=2)t.fromBufferAttribute(n,s),e.fromBufferAttribute(n,s+1),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);i.addAttribute("lineDistance",new Pt(o,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,o=i.lineDistances,s=0,l=n.length;s<l;s+=2)t.copy(n[s]),e.copy(n[s+1]),o[s]=s===0?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);return this}}()}),Br.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Br,isLineLoop:!0}),Ln.prototype=Object.create(Zt.prototype),Ln.prototype.constructor=Ln,Ln.prototype.isPointsMaterial=!0,Ln.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},ds.prototype=Object.assign(Object.create(z.prototype),{constructor:ds,isPoints:!0,raycast:function(){var t=new J,e=new ki,i=new B;return function(n,o){function s(et,_t){var mt=e.distanceSqToPoint(et);mt<v&&(e.closestPointToPoint(et,y),y.applyMatrix4(c),et=n.ray.origin.distanceTo(y),et<n.near||et>n.far||o.push({distance:et,distanceToRay:Math.sqrt(mt),point:y.clone(),index:_t,face:null,object:l}))}var l=this,h=this.geometry,c=this.matrixWorld,f=n.params.Points.threshold;if(h.boundingSphere===null&&h.computeBoundingSphere(),i.copy(h.boundingSphere),i.applyMatrix4(c),i.radius+=f,n.ray.intersectsSphere(i)!==!1){t.getInverse(c),e.copy(n.ray).applyMatrix4(t),f/=(this.scale.x+this.scale.y+this.scale.z)/3;var v=f*f;f=new m;var y=new m;if(h.isBufferGeometry){var S=h.index;if(h=h.attributes.position.array,S!==null){var C=S.array;S=0;for(var N=C.length;S<N;S++){var j=C[S];f.fromArray(h,3*j),s(f,j)}}else for(S=0,C=h.length/3;S<C;S++)f.fromArray(h,3*S),s(f,S)}else for(f=h.vertices,S=0,C=f.length;S<C;S++)s(f[S],S)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),nl.prototype=Object.assign(Object.create(O.prototype),{constructor:nl,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),po.prototype=Object.create(O.prototype),po.prototype.constructor=po,po.prototype.isCompressedTexture=!0,Xs.prototype=Object.create(O.prototype),Xs.prototype.constructor=Xs,Xs.prototype.isCanvasTexture=!0,qs.prototype=Object.create(O.prototype),qs.prototype.constructor=qs,qs.prototype.isDepthTexture=!0,ms.prototype=Object.create(Ft.prototype),ms.prototype.constructor=ms,Ys.prototype=Object.create(W.prototype),Ys.prototype.constructor=Ys,gs.prototype=Object.create(Ft.prototype),gs.prototype.constructor=gs,ji.prototype=Object.create(W.prototype),ji.prototype.constructor=ji,xi.prototype=Object.create(Ft.prototype),xi.prototype.constructor=xi,Zs.prototype=Object.create(W.prototype),Zs.prototype.constructor=Zs,vs.prototype=Object.create(xi.prototype),vs.prototype.constructor=vs,Js.prototype=Object.create(W.prototype),Js.prototype.constructor=Js,Do.prototype=Object.create(xi.prototype),Do.prototype.constructor=Do,$s.prototype=Object.create(W.prototype),$s.prototype.constructor=$s,ys.prototype=Object.create(xi.prototype),ys.prototype.constructor=ys,_s.prototype=Object.create(W.prototype),_s.prototype.constructor=_s,xs.prototype=Object.create(xi.prototype),xs.prototype.constructor=xs,un.prototype=Object.create(W.prototype),un.prototype.constructor=un,mo.prototype=Object.create(Ft.prototype),mo.prototype.constructor=mo,Sr.prototype=Object.create(W.prototype),Sr.prototype.constructor=Sr,zo.prototype=Object.create(Ft.prototype),zo.prototype.constructor=zo,Bo.prototype=Object.create(W.prototype),Bo.prototype.constructor=Bo,Rn.prototype=Object.create(Ft.prototype),Rn.prototype.constructor=Rn;var Xl={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,o=n?e[0]*i:t.length,s=rl(t,0,o,i,!0),l=[];if(!s)return l;var h;if(n){var c=i;n=[];var f,v=0;for(f=e.length;v<f;v++){var y=e[v]*c,S=v<f-1?e[v+1]*c:t.length;y=rl(t,y,S,c,!1),y===y.next&&(y.steiner=!0),n.push(nr(y))}for(n.sort(Il),v=0;v<n.length;v++)e=n[v],c=s,(c=Ol(e,c))&&(e=Ks(c,e),ws(e,e.next)),s=ws(s,s.next)}if(t.length>80*i){var C=h=t[0],N=n=t[1];for(c=i;c<o;c+=i)v=t[c],e=t[c+1],v<C&&(C=v),e<N&&(N=e),v>h&&(h=v),e>n&&(n=e);h=Math.max(h-C,n-N),h=h!==0?1/h:0}return Ts(s,l,i,C,N,h),l}},Xr={area:function(t){for(var e=t.length,i=0,n=e-1,o=0;o<e;n=o++)i+=t[n].x*t[o].y-t[o].x*t[n].y;return .5*i},isClockWise:function(t){return 0>Xr.area(t)},triangulateShape:function(t,e){var i=[],n=[],o=[];Oa(t),Dl(i,t);var s=t.length;for(e.forEach(Oa),t=0;t<e.length;t++)n.push(s),s+=e[t].length,Dl(i,e[t]);for(e=Xl.triangulate(i,n),t=0;t<e.length;t+=3)o.push(e.slice(t,t+3));return o}};Qr.prototype=Object.create(W.prototype),Qr.prototype.constructor=Qr,Qr.prototype.toJSON=function(){var t=W.prototype.toJSON.call(this);return zl(this.parameters.shapes,this.parameters.options,t)},kr.prototype=Object.create(Ft.prototype),kr.prototype.constructor=kr,kr.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return zl(this.parameters.shapes,this.parameters.options,t)};var va={generateTopUV:function(t,e,i,n,o){t=e[3*n],n=e[3*n+1];var s=e[3*o];return o=e[3*o+1],[new p(e[3*i],e[3*i+1]),new p(t,n),new p(s,o)]},generateSideWallUV:function(t,e,i,n,o,s){t=e[3*i];var l=e[3*i+1];i=e[3*i+2];var h=e[3*n],c=e[3*n+1];n=e[3*n+2];var f=e[3*o],v=e[3*o+1];o=e[3*o+2];var y=e[3*s],S=e[3*s+1];return e=e[3*s+2],.01>Math.abs(l-c)?[new p(t,1-i),new p(h,1-n),new p(f,1-o),new p(y,1-e)]:[new p(l,1-i),new p(c,1-n),new p(v,1-o),new p(S,1-e)]}};Qs.prototype=Object.create(W.prototype),Qs.prototype.constructor=Qs,ko.prototype=Object.create(kr.prototype),ko.prototype.constructor=ko,go.prototype=Object.create(W.prototype),go.prototype.constructor=go,fr.prototype=Object.create(Ft.prototype),fr.prototype.constructor=fr,ta.prototype=Object.create(W.prototype),ta.prototype.constructor=ta,Uo.prototype=Object.create(Ft.prototype),Uo.prototype.constructor=Uo,Ms.prototype=Object.create(W.prototype),Ms.prototype.constructor=Ms,vo.prototype=Object.create(Ft.prototype),vo.prototype.constructor=vo,to.prototype=Object.create(W.prototype),to.prototype.constructor=to,to.prototype.toJSON=function(){var t=W.prototype.toJSON.call(this);return Bl(this.parameters.shapes,t)},yo.prototype=Object.create(Ft.prototype),yo.prototype.constructor=yo,yo.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Bl(this.parameters.shapes,t)},_o.prototype=Object.create(Ft.prototype),_o.prototype.constructor=_o,eo.prototype=Object.create(W.prototype),eo.prototype.constructor=eo,io.prototype=Object.create(Ft.prototype),io.prototype.constructor=io,Ss.prototype=Object.create(eo.prototype),Ss.prototype.constructor=Ss,In.prototype=Object.create(io.prototype),In.prototype.constructor=In,Fo.prototype=Object.create(W.prototype),Fo.prototype.constructor=Fo,Ur.prototype=Object.create(Ft.prototype),Ur.prototype.constructor=Ur;var fn=Object.freeze({WireframeGeometry:ms,ParametricGeometry:Ys,ParametricBufferGeometry:gs,TetrahedronGeometry:Zs,TetrahedronBufferGeometry:vs,OctahedronGeometry:Js,OctahedronBufferGeometry:Do,IcosahedronGeometry:$s,IcosahedronBufferGeometry:ys,DodecahedronGeometry:_s,DodecahedronBufferGeometry:xs,PolyhedronGeometry:ji,PolyhedronBufferGeometry:xi,TubeGeometry:un,TubeBufferGeometry:mo,TorusKnotGeometry:Sr,TorusKnotBufferGeometry:zo,TorusGeometry:Bo,TorusBufferGeometry:Rn,TextGeometry:Qs,TextBufferGeometry:ko,SphereGeometry:go,SphereBufferGeometry:fr,RingGeometry:ta,RingBufferGeometry:Uo,PlaneGeometry:Fe,PlaneBufferGeometry:xe,LatheGeometry:Ms,LatheBufferGeometry:vo,ShapeGeometry:to,ShapeBufferGeometry:yo,ExtrudeGeometry:Qr,ExtrudeBufferGeometry:kr,EdgesGeometry:_o,ConeGeometry:Ss,ConeBufferGeometry:In,CylinderGeometry:eo,CylinderBufferGeometry:io,CircleGeometry:Fo,CircleBufferGeometry:Ur,BoxGeometry:Dt,BoxBufferGeometry:kt});xo.prototype=Object.create(Zt.prototype),xo.prototype.constructor=xo,xo.prototype.isShadowMaterial=!0,xo.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this},Go.prototype=Object.create(ti.prototype),Go.prototype.constructor=Go,Go.prototype.isRawShaderMaterial=!0,Fr.prototype=Object.create(Zt.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isMeshStandardMaterial=!0,Fr.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ho.prototype=Object.create(Fr.prototype),Ho.prototype.constructor=Ho,Ho.prototype.isMeshPhysicalMaterial=!0,Ho.prototype.copy=function(t){return Fr.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Er.prototype=Object.create(Zt.prototype),Er.prototype.constructor=Er,Er.prototype.isMeshPhongMaterial=!0,Er.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Vo.prototype=Object.create(Er.prototype),Vo.prototype.constructor=Vo,Vo.prototype.isMeshToonMaterial=!0,Vo.prototype.copy=function(t){return Er.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},jo.prototype=Object.create(Zt.prototype),jo.prototype.constructor=jo,jo.prototype.isMeshNormalMaterial=!0,jo.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},pr.prototype=Object.create(Zt.prototype),pr.prototype.constructor=pr,pr.prototype.isMeshLambertMaterial=!0,pr.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Wo.prototype=Object.create(Zt.prototype),Wo.prototype.constructor=Wo,Wo.prototype.isMeshMatcapMaterial=!0,Wo.prototype.copy=function(t){return Zt.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Xo.prototype=Object.create(zi.prototype),Xo.prototype.constructor=Xo,Xo.prototype.isLineDashedMaterial=!0,Xo.prototype.copy=function(t){return zi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var ql=Object.freeze({ShadowMaterial:xo,SpriteMaterial:Fi,RawShaderMaterial:Go,ShaderMaterial:ti,PointsMaterial:Ln,MeshPhysicalMaterial:Ho,MeshStandardMaterial:Fr,MeshPhongMaterial:Er,MeshToonMaterial:Vo,MeshNormalMaterial:jo,MeshLambertMaterial:pr,MeshDepthMaterial:oe,MeshDistanceMaterial:te,MeshBasicMaterial:Ge,MeshMatcapMaterial:Wo,LineDashedMaterial:Xo,LineBasicMaterial:zi,Material:Zt}),Nn={arraySlice:function(t,e,i){return Nn.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(o,s){return t[o]-t[s]}),i},sortedArray:function(t,e,i){for(var n=t.length,o=new t.constructor(n),s=0,l=0;l!==n;++s)for(var h=i[s]*e,c=0;c!==e;++c)o[l++]=t[h+c];return o},flattenJSON:function(t,e,i,n){for(var o=1,s=t[0];s!==void 0&&s[n]===void 0;)s=t[o++];if(s!==void 0){var l=s[n];if(l!==void 0)if(Array.isArray(l))do l=s[n],l!==void 0&&(e.push(s.time),i.push.apply(i,l)),s=t[o++];while(s!==void 0);else if(l.toArray!==void 0)do l=s[n],l!==void 0&&(e.push(s.time),l.toArray(i,i.length)),s=t[o++];while(s!==void 0);else do l=s[n],l!==void 0&&(e.push(s.time),i.push(l)),s=t[o++];while(s!==void 0)}}};Object.assign(Fn.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],o=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var s=i+2;;){if(n===void 0){if(t<o)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,o)}if(i===s)break;if(o=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=o)break t;for(s=e[1],t<s&&(i=2,o=s),s=i-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===s)break;if(n=o,o=e[--i-1],t>=o)break e}n=i,i=0}for(;i<n;)o=i+n>>>1,t<e[o]?n=o:i=o+1;if(n=e[i],o=e[i-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,o,t)}this._cachedIndex=i,this.intervalChanged_(i,o,n)}return this.interpolate_(i,o,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var o=0;o!==n;++o)e[o]=i[t+o];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Fn.prototype,{beforeStart_:Fn.prototype.copySampleValue_,afterEnd_:Fn.prototype.copySampleValue_}),ea.prototype=Object.assign(Object.create(Fn.prototype),{constructor:ea,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,o=t-2,s=t+1,l=n[o],h=n[s];if(l===void 0)switch(this.getSettings_().endingStart){case 2401:o=t,l=2*e-i;break;case 2402:o=n.length-2,l=e+n[o]-n[o+1];break;default:o=t,l=i}if(h===void 0)switch(this.getSettings_().endingEnd){case 2401:s=t,h=2*i-e;break;case 2402:s=1,h=i+n[1]-n[0];break;default:s=t-1,h=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-l),this._weightNext=t/(h-i),this._offsetPrev=o*n,this._offsetNext=s*n},interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l,c=this._offsetPrev,f=this._offsetNext,v=this._weightPrev,y=this._weightNext,S=(i-e)/(n-e);for(i=S*S,n=i*S,e=-v*n+2*v*i-v*S,v=(1+v)*n+(-1.5-2*v)*i+(-.5+v)*S+1,S=(-1-y)*n+(1.5+y)*i+.5*S,y=y*n-y*i,i=0;i!==l;++i)o[i]=e*s[c+i]+v*s[h+i]+S*s[t+i]+y*s[f+i];return o}}),dr.prototype=Object.assign(Object.create(Fn.prototype),{constructor:dr,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;t*=l;var h=t-l;for(e=(i-e)/(n-e),i=1-e,n=0;n!==l;++n)o[n]=s[h+n]*i+s[t+n]*e;return o}}),qo.prototype=Object.assign(Object.create(Fn.prototype),{constructor:qo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(On,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Nn.convertArray(t.times,Array),values:Nn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(On.prototype,{constructor:On,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new qo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new dr(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new ea(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,o=0,s=n-1;o!==n&&i[o]<t;)++o;for(;s!==-1&&i[s]>e;)--s;return++s,(o!==0||s!==n)&&(o>=s&&(s=Math.max(s,1),o=s-1),t=this.getValueSize(),this.times=Nn.arraySlice(i,o,s),this.values=Nn.arraySlice(this.values,o*t,s*t)),this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,s=0;s!==n;s++){var l=i[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,o),t=!1;break}o=l}if(e!==void 0&&Nn.isTypedArray(e)){for(s=0,i=e.length;s!==i;++s)if(n=e[s],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,o=1,s=t.length-1,l=1;l<s;++l){var h=!1,c=t[l];if(c!==t[l+1]&&(l!==1||c!==c[0]))if(n)h=!0;else{var f=l*i,v=f-i,y=f+i;for(c=0;c!==i;++c){var S=e[f+c];if(S!==e[v+c]||S!==e[y+c]){h=!0;break}}}if(h){if(l!==o)for(t[o]=t[l],h=l*i,f=o*i,c=0;c!==i;++c)e[f+c]=e[h+c];++o}}if(0<s){for(t[o]=t[s],h=s*i,f=o*i,c=0;c!==i;++c)e[f+c]=e[h+c];++o}return o!==t.length&&(this.times=Nn.arraySlice(t,0,o),this.values=Nn.arraySlice(e,0,o*i)),this}}),Da.prototype=Object.assign(Object.create(On.prototype),{constructor:Da,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),za.prototype=Object.assign(Object.create(On.prototype),{constructor:za,ValueTypeName:"color"}),br.prototype=Object.assign(Object.create(On.prototype),{constructor:br,ValueTypeName:"number"}),qn.prototype=Object.assign(Object.create(Fn.prototype),{constructor:qn,interpolate_:function(t,e,i,n){var o=this.resultBuffer,s=this.sampleValues,l=this.valueSize;for(t*=l,e=(i-e)/(n-e),i=t+l;t!==i;t+=4)G.slerpFlat(o,0,s,t-l,s,t,e);return o}}),Es.prototype=Object.assign(Object.create(On.prototype),{constructor:Es,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new qn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Ba.prototype=Object.assign(Object.create(On.prototype),{constructor:Ba,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),bs.prototype=Object.assign(Object.create(On.prototype),{constructor:bs,ValueTypeName:"vector"}),Object.assign(rr,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),o=0,s=i.length;o!==s;++o)e.push(ch(i[o]).scale(n));return new rr(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,o=i.length;n!==o;++n)e.push(On.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var o=e.length,s=[],l=0;l<o;l++){var h=[],c=[];h.push((l+o-1)%o,l,(l+1)%o),c.push(0,1,0);var f=Nn.getKeyframeOrder(h);h=Nn.sortedArray(h,1,f),c=Nn.sortedArray(c,1,f),n||h[0]!==0||(h.push(o),c.push(c[0])),s.push(new br(".morphTargetInfluences["+e[l].name+"]",h,c).scale(1/i))}return new rr(t,-1,s)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},o=/^([\w-]*?)([\d]+)$/,s=0,l=t.length;s<l;s++){var h=t[s],c=h.name.match(o);if(c&&1<c.length){var f=c[1];(c=n[f])||(n[f]=c=[]),c.push(h)}}t=[];for(f in n)t.push(rr.CreateFromMorphTargetSequence(f,n[f],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(j,et,_t,mt,bt){if(_t.length!==0){var xt=[],Vt=[];Nn.flattenJSON(_t,xt,Vt,mt),xt.length!==0&&bt.push(new j(et,xt,Vt))}},n=[],o=t.name||"default",s=t.length||-1,l=t.fps||30;t=t.hierarchy||[];for(var h=0;h<t.length;h++){var c=t[h].keys;if(c&&c.length!==0)if(c[0].morphTargets){s={};for(var f=0;f<c.length;f++)if(c[f].morphTargets)for(var v=0;v<c[f].morphTargets.length;v++)s[c[f].morphTargets[v]]=-1;for(var y in s){var S=[],C=[];for(v=0;v!==c[f].morphTargets.length;++v){var N=c[f];S.push(N.time),C.push(N.morphTarget===y?1:0)}n.push(new br(".morphTargetInfluence["+y+"]",S,C))}s=s.length*(l||1)}else f=".bones["+e[h].name+"]",i(bs,f+".position",c,"pos",n),i(Es,f+".quaternion",c,"rot",n),i(bs,f+".scale",c,"scl",n)}return n.length===0?null:new rr(o,s,n)}}),Object.assign(rr.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}});var qr={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Vn=new wo,vr={};Object.assign(At.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=qr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;if(vr[t]!==void 0)vr[t].push({onLoad:e,onProgress:i,onError:n});else{var l=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(l){i=l[1];var h=!!l[2];l=l[3],l=decodeURIComponent(l),h&&(l=atob(l));try{var c=(this.responseType||"").toLowerCase();switch(c){case"arraybuffer":case"blob":var f=new Uint8Array(l.length);for(h=0;h<l.length;h++)f[h]=l.charCodeAt(h);var v=c==="blob"?new Blob([f.buffer],{type:i}):f.buffer;break;case"document":v=new DOMParser().parseFromString(l,i);break;case"json":v=JSON.parse(l);break;default:v=l}setTimeout(function(){e&&e(v),o.manager.itemEnd(t)},0)}catch(S){setTimeout(function(){n&&n(S),o.manager.itemError(t),o.manager.itemEnd(t)},0)}}else{vr[t]=[],vr[t].push({onLoad:e,onProgress:i,onError:n});var y=new XMLHttpRequest;y.open("GET",t,!0),y.addEventListener("load",function(S){var C=this.response;qr.add(t,C);var N=vr[t];if(delete vr[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var j=0,et=N.length;j<et;j++){var _t=N[j];_t.onLoad&&_t.onLoad(C)}}else{for(j=0,et=N.length;j<et;j++)_t=N[j],_t.onError&&_t.onError(S);o.manager.itemError(t)}o.manager.itemEnd(t)},!1),y.addEventListener("progress",function(S){for(var C=vr[t],N=0,j=C.length;N<j;N++){var et=C[N];et.onProgress&&et.onProgress(S)}},!1),y.addEventListener("error",function(S){var C=vr[t];delete vr[t];for(var N=0,j=C.length;N<j;N++){var et=C[N];et.onError&&et.onError(S)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),y.addEventListener("abort",function(S){var C=vr[t];delete vr[t];for(var N=0,j=C.length;N<j;N++){var et=C[N];et.onError&&et.onError(S)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),this.responseType!==void 0&&(y.responseType=this.responseType),this.withCredentials!==void 0&&(y.withCredentials=this.withCredentials),y.overrideMimeType&&y.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(h in this.requestHeader)y.setRequestHeader(h,this.requestHeader[h]);y.send(null)}return o.manager.itemStart(t),y}},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Qt.prototype,{load:function(t,e,i,n){var o=this,s=new At(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var o=rr.parse(t[n]);i.push(o)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(Yt.prototype,{load:function(t,e,i,n){function o(S){c.load(t[S],function(C){C=s._parser(C,!0),l[S]={width:C.width,height:C.height,format:C.format,mipmaps:C.mipmaps},f+=1,f===6&&(C.mipmapCount===1&&(h.minFilter=1006),h.format=C.format,h.needsUpdate=!0,e&&e(h))},i,n)}var s=this,l=[],h=new po;h.image=l;var c=new At(this.manager);if(c.setPath(this.path),c.setResponseType("arraybuffer"),Array.isArray(t))for(var f=0,v=0,y=t.length;v<y;++v)o(v);else c.load(t,function(S){if(S=s._parser(S,!0),S.isCubemap)for(var C=S.mipmaps.length/S.mipmapCount,N=0;N<C;N++){l[N]={mipmaps:[]};for(var j=0;j<S.mipmapCount;j++)l[N].mipmaps.push(S.mipmaps[N*S.mipmapCount+j]),l[N].format=S.format,l[N].width=S.width,l[N].height=S.height}else h.image.width=S.width,h.image.height=S.height,h.mipmaps=S.mipmaps;S.mipmapCount===1&&(h.minFilter=1006),h.format=S.format,h.needsUpdate=!0,e&&e(h)},i,n);return h},setPath:function(t){return this.path=t,this}}),Object.assign(Ue.prototype,{load:function(t,e,i,n){var o=this,s=new H,l=new At(this.manager);return l.setResponseType("arraybuffer"),l.setPath(this.path),l.load(t,function(h){(h=o._parser(h))&&(h.image!==void 0?s.image=h.image:h.data!==void 0&&(s.image.width=h.width,s.image.height=h.height,s.image.data=h.data),s.wrapS=h.wrapS!==void 0?h.wrapS:1001,s.wrapT=h.wrapT!==void 0?h.wrapT:1001,s.magFilter=h.magFilter!==void 0?h.magFilter:1006,s.minFilter=h.minFilter!==void 0?h.minFilter:1008,s.anisotropy=h.anisotropy!==void 0?h.anisotropy:1,h.format!==void 0&&(s.format=h.format),h.type!==void 0&&(s.type=h.type),h.mipmaps!==void 0&&(s.mipmaps=h.mipmaps),h.mipmapCount===1&&(s.minFilter=1006),s.needsUpdate=!0,e&&e(s,h))},i,n),s},setPath:function(t){return this.path=t,this}}),Object.assign(ai.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),qr.add(t,this),e&&e(this),l.manager.itemEnd(t)}function s(f){c.removeEventListener("load",o,!1),c.removeEventListener("error",s,!1),n&&n(f),l.manager.itemError(t),l.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var l=this,h=qr.get(t);if(h!==void 0)return l.manager.itemStart(t),setTimeout(function(){e&&e(h),l.manager.itemEnd(t)},0),h;var c=document.createElementNS("http://www.w3.org/1999/xhtml","img");return c.addEventListener("load",o,!1),c.addEventListener("error",s,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(c.crossOrigin=this.crossOrigin),l.manager.itemStart(t),c.src=t,c},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Bi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(c){l.load(t[c],function(f){s.images[c]=f,h++,h===6&&(s.needsUpdate=!0,e&&e(s))},void 0,n)}var s=new w,l=new ai(this.manager);l.setCrossOrigin(this.crossOrigin),l.setPath(this.path);var h=0;for(i=0;i<t.length;++i)o(i);return s},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(ln.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=new O,s=new ai(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,function(l){o.image=l,l=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,o.format=l?1022:1023,o.needsUpdate=!0,e!==void 0&&e(o)},i,n),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ee.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,o=0;for(e.push(0),n=1;n<=t;n++){var s=this.getPoint(n/t);o+=s.distanceTo(i),e.push(o),i=s}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var o=0,s=n-1,l;o<=s;)if(t=Math.floor(o+(s-o)/2),l=i[t]-e,0>l)o=t+1;else if(0<l)s=t-1;else{s=t;break}return t=s,i[t]===e?t/(n-1):(o=i[t],(t+(e-o)/(i[t+1]-o))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new m,n=[],o=[],s=[],l=new m,h=new J,c;for(c=0;c<=t;c++){var f=c/t;n[c]=this.getTangentAt(f),n[c].normalize()}o[0]=new m,s[0]=new m,c=Number.MAX_VALUE,f=Math.abs(n[0].x);var v=Math.abs(n[0].y),y=Math.abs(n[0].z);for(f<=c&&(c=f,i.set(1,0,0)),v<=c&&(c=v,i.set(0,1,0)),y<=c&&i.set(0,0,1),l.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],l),s[0].crossVectors(n[0],o[0]),c=1;c<=t;c++)o[c]=o[c-1].clone(),s[c]=s[c-1].clone(),l.crossVectors(n[c-1],n[c]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(pi.clamp(n[c-1].dot(n[c]),-1,1)),o[c].applyMatrix4(h.makeRotationAxis(l,i))),s[c].crossVectors(n[c],o[c]);if(e===!0)for(i=Math.acos(pi.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<n[0].dot(l.crossVectors(o[0],o[t]))&&(i=-i),c=1;c<=t;c++)o[c].applyMatrix4(h.makeRotationAxis(n[c],i*c)),s[c].crossVectors(n[c],o[c]);return{tangents:n,normals:o,binormals:s}},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Gn.prototype=Object.create(Ee.prototype),Gn.prototype.constructor=Gn,Gn.prototype.isEllipseCurve=!0,Gn.prototype.getPoint=function(t,e){e=e||new p;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,o=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=o?0:i),this.aClockwise!==!0||o||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var s=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),o=t-this.aX,s-=this.aY,t=o*i-s*n+this.aX,s=o*n+s*i+this.aY),e.set(t,s)},Gn.prototype.copy=function(t){return Ee.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},Gn.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Gn.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.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},As.prototype=Object.create(Gn.prototype),As.prototype.constructor=As,As.prototype.isArcCurve=!0;var _n=new m,ya=new Yn,ja=new Yn,yr=new Yn;Sn.prototype=Object.create(Ee.prototype),Sn.prototype.constructor=Sn,Sn.prototype.isCatmullRomCurve3=!0,Sn.prototype.getPoint=function(t,e){e=e||new m;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var o=Math.floor(t);if(t-=o,this.closed?o+=0<o?0:(Math.floor(Math.abs(o)/n)+1)*n:t===0&&o===n-1&&(o=n-2,t=1),this.closed||0<o)var s=i[(o-1)%n];else _n.subVectors(i[0],i[1]).add(i[0]),s=_n;var l=i[o%n],h=i[(o+1)%n];if(this.closed||o+2<n?i=i[(o+2)%n]:(_n.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=_n),this.curveType==="centripetal"||this.curveType==="chordal"){var c=this.curveType==="chordal"?.5:.25;n=Math.pow(s.distanceToSquared(l),c),o=Math.pow(l.distanceToSquared(h),c),c=Math.pow(h.distanceToSquared(i),c),1e-4>o&&(o=1),1e-4>n&&(n=o),1e-4>c&&(c=o),ya.initNonuniformCatmullRom(s.x,l.x,h.x,i.x,n,o,c),ja.initNonuniformCatmullRom(s.y,l.y,h.y,i.y,n,o,c),yr.initNonuniformCatmullRom(s.z,l.z,h.z,i.z,n,o,c)}else this.curveType==="catmullrom"&&(ya.initCatmullRom(s.x,l.x,h.x,i.x,this.tension),ja.initCatmullRom(s.y,l.y,h.y,i.y,this.tension),yr.initCatmullRom(s.z,l.z,h.z,i.z,this.tension));return e.set(ya.calc(t),ja.calc(t),yr.calc(t)),e},Sn.prototype.copy=function(t){Ee.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Sn.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Sn.prototype.fromJSON=function(t){Ee.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new m().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Zn.prototype=Object.create(Ee.prototype),Zn.prototype.constructor=Zn,Zn.prototype.isCubicBezierCurve=!0,Zn.prototype.getPoint=function(t,e){e=e||new p;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(To(t,i.x,n.x,o.x,s.x),To(t,i.y,n.y,o.y,s.y)),e},Zn.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Zn.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Zn.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ti.prototype=Object.create(Ee.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isCubicBezierCurve3=!0,Ti.prototype.getPoint=function(t,e){e=e||new m;var i=this.v0,n=this.v1,o=this.v2,s=this.v3;return e.set(To(t,i.x,n.x,o.x,s.x),To(t,i.y,n.y,o.y,s.y),To(t,i.z,n.z,o.z,s.z)),e},Ti.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ti.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ti.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Jn.prototype=Object.create(Ee.prototype),Jn.prototype.constructor=Jn,Jn.prototype.isLineCurve=!0,Jn.prototype.getPoint=function(t,e){return e=e||new p,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Jn.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Jn.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Jn.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Jn.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Jn.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},mr.prototype=Object.create(Ee.prototype),mr.prototype.constructor=mr,mr.prototype.isLineCurve3=!0,mr.prototype.getPoint=function(t,e){return e=e||new m,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},mr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},mr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},mr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},mr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$n.prototype=Object.create(Ee.prototype),$n.prototype.constructor=$n,$n.prototype.isQuadraticBezierCurve=!0,$n.prototype.getPoint=function(t,e){e=e||new p;var i=this.v0,n=this.v1,o=this.v2;return e.set(Gr(t,i.x,n.x,o.x),Gr(t,i.y,n.y,o.y)),e},$n.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$n.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$n.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Hr.prototype=Object.create(Ee.prototype),Hr.prototype.constructor=Hr,Hr.prototype.isQuadraticBezierCurve3=!0,Hr.prototype.getPoint=function(t,e){e=e||new m;var i=this.v0,n=this.v1,o=this.v2;return e.set(Gr(t,i.x,n.x,o.x),Gr(t,i.y,n.y,o.y),Gr(t,i.z,n.z,o.z)),e},Hr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Hr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Hr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ar.prototype=Object.create(Ee.prototype),Ar.prototype.constructor=Ar,Ar.prototype.isSplineCurve=!0,Ar.prototype.getPoint=function(t,e){e=e||new p;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var o=i[t===0?t:t-1],s=i[t],l=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Nl(n,o.x,s.x,l.x,i.x),Nl(n,o.y,s.y,l.y,i.y)),e},Ar.prototype.copy=function(t){Ee.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},Ar.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},Ar.prototype.fromJSON=function(t){Ee.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new p().fromArray(n))}return this};var Wa=Object.freeze({ArcCurve:As,CatmullRomCurve3:Sn,CubicBezierCurve:Zn,CubicBezierCurve3:Ti,EllipseCurve:Gn,LineCurve:Jn,LineCurve3:mr,QuadraticBezierCurve:$n,QuadraticBezierCurve3:Hr,SplineCurve:Ar});no.prototype=Object.assign(Object.create(Ee.prototype),{constructor:no,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Jn(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,o=this.curves;n<o.length;n++){var s=o[n];s=s.getPoints(s&&s.isEllipseCurve?2*t:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?t*s.points.length:t);for(var l=0;l<s.length;l++){var h=s[l];i&&i.equals(h)||(e.push(h),i=h)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){Ee.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ee.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){Ee.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new Wa[n.type]().fromJSON(n))}return this}}),Kn.prototype=Object.assign(Object.create(no.prototype),{constructor:Kn,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new Jn(this.currentPoint.clone(),new p(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new $n(this.currentPoint.clone(),new p(t,e),new p(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,o,s){t=new Zn(this.currentPoint.clone(),new p(t,e),new p(i,n),new p(o,s)),this.curves.push(t),this.currentPoint.set(o,s)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Ar(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,o,s){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s)},absarc:function(t,e,i,n,o,s){this.absellipse(t,e,i,i,n,o,s)},ellipse:function(t,e,i,n,o,s,l,h){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,s,l,h)},absellipse:function(t,e,i,n,o,s,l,h){t=new Gn(t,e,i,n,o,s,l,h),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return no.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=no.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return no.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Hn.prototype=Object.assign(Object.create(Kn.prototype),{constructor:Hn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Kn.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=Kn.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){Kn.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new Kn().fromJSON(n))}return this}}),$i.prototype=Object.assign(Object.create(z.prototype),{constructor:$i,isLight:!0,copy:function(t){return z.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}),ia.prototype=Object.assign(Object.create($i.prototype),{constructor:ia,isHemisphereLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Vr.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return new this.constructor().copy(this)},toJSON:function(){var t={};return this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),na.prototype=Object.assign(Object.create(Vr.prototype),{constructor:na,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*pi.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),ra.prototype=Object.assign(Object.create($i.prototype),{constructor:ra,isSpotLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Yo.prototype=Object.assign(Object.create($i.prototype),{constructor:Yo,isPointLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Ps.prototype=Object.assign(Object.create(Be.prototype),{constructor:Ps,isOrthographicCamera:!0,copy:function(t,e){return Be.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,o=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var s=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,o+=this.view.offsetX/i*s,i=o+this.view.width/i*s,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(o,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=z.prototype.toJSON.call(this,t),t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}),Mo.prototype=Object.assign(Object.create(Vr.prototype),{constructor:Mo}),jr.prototype=Object.assign(Object.create($i.prototype),{constructor:jr,isDirectionalLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Zo.prototype=Object.assign(Object.create($i.prototype),{constructor:Zo,isAmbientLight:!0}),Na.prototype=Object.assign(Object.create($i.prototype),{constructor:Na,isRectAreaLight:!0,copy:function(t){return $i.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=$i.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ka.prototype,{load:function(t,e,i,n){var o=this,s=new At(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){function e(l){return i[l]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",l),i[l]}var i=this.textures,n=new ql[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var o in t.uniforms){var s=t.uniforms[o];switch(n.uniforms[o]={},s.type){case"t":n.uniforms[o].value=e(s.value);break;case"c":n.uniforms[o].value=new A().setHex(s.value);break;case"v2":n.uniforms[o].value=new p().fromArray(s.value);break;case"v3":n.uniforms[o].value=new m().fromArray(s.value);break;case"v4":n.uniforms[o].value=new E().fromArray(s.value);break;case"m4":n.uniforms[o].value=new J().fromArray(s.value);break;default:n.uniforms[o].value=s.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(o=t.normalScale,Array.isArray(o)===!1&&(o=[o,o]),n.normalScale=new p().fromArray(o)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var es={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(sl.prototype,{load:function(t,e,i,n){var o=this,s=new At(o.manager);s.setPath(o.path),s.load(t,function(l){e(o.parse(JSON.parse(l)))},i,n)},parse:function(t){var e=new Ft,i=t.data.index;i!==void 0&&(i=new Po[i.type](i.array),e.setIndex(new ht(i,1)));var n=t.data.attributes;for(s in n){var o=n[s];i=new Po[o.type](o.array),e.addAttribute(s,new ht(i,o.itemSize,o.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(s!==void 0)for(i=0,n=s.length;i!==n;++i)o=s[i],e.addGroup(o.start,o.count,o.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(s=new m,t.center!==void 0&&s.fromArray(t.center),e.boundingSphere=new B(s,t.radius)),e},setPath:function(t){return this.path=t,this}});var Po={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};ro.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var o=e[i+1];if(e[i].test(t))return o}return null}},Object.assign(ro.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],o=0;o<t.length;++o)n[o]=this.createMaterial(t[o],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new A,i=new ln,n=new ka;return function(o,s,l){function h(S,C,N,j,et){S=s+S;var _t=ro.Handlers.get(S);return _t!==null?S=_t.load(S):(i.setCrossOrigin(l),S=i.load(S)),C!==void 0&&(S.repeat.fromArray(C),C[0]!==1&&(S.wrapS=1e3),C[1]!==1&&(S.wrapT=1e3)),N!==void 0&&S.offset.fromArray(N),j!==void 0&&(j[0]==="repeat"&&(S.wrapS=1e3),j[0]==="mirror"&&(S.wrapS=1002),j[1]==="repeat"&&(S.wrapT=1e3),j[1]==="mirror"&&(S.wrapT=1002)),et!==void 0&&(S.anisotropy=et),C=pi.generateUUID(),c[C]=S,C}var c={},f={uuid:pi.generateUUID(),type:"MeshLambertMaterial"},v;for(v in o){var y=o[v];switch(v){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":f.name=y;break;case"blending":f.blending=t[y];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",v,"is no longer supported.");break;case"colorDiffuse":f.color=e.fromArray(y).getHex();break;case"colorSpecular":f.specular=e.fromArray(y).getHex();break;case"colorEmissive":f.emissive=e.fromArray(y).getHex();break;case"specularCoef":f.shininess=y;break;case"shading":y.toLowerCase()==="basic"&&(f.type="MeshBasicMaterial"),y.toLowerCase()==="phong"&&(f.type="MeshPhongMaterial"),y.toLowerCase()==="standard"&&(f.type="MeshStandardMaterial");break;case"mapDiffuse":f.map=h(y,o.mapDiffuseRepeat,o.mapDiffuseOffset,o.mapDiffuseWrap,o.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":f.emissiveMap=h(y,o.mapEmissiveRepeat,o.mapEmissiveOffset,o.mapEmissiveWrap,o.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":f.lightMap=h(y,o.mapLightRepeat,o.mapLightOffset,o.mapLightWrap,o.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":f.aoMap=h(y,o.mapAORepeat,o.mapAOOffset,o.mapAOWrap,o.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":f.bumpMap=h(y,o.mapBumpRepeat,o.mapBumpOffset,o.mapBumpWrap,o.mapBumpAnisotropy);break;case"mapBumpScale":f.bumpScale=y;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":f.normalMap=h(y,o.mapNormalRepeat,o.mapNormalOffset,o.mapNormalWrap,o.mapNormalAnisotropy);break;case"mapNormalFactor":f.normalScale=y;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":f.specularMap=h(y,o.mapSpecularRepeat,o.mapSpecularOffset,o.mapSpecularWrap,o.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":f.metalnessMap=h(y,o.mapMetalnessRepeat,o.mapMetalnessOffset,o.mapMetalnessWrap,o.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":f.roughnessMap=h(y,o.mapRoughnessRepeat,o.mapRoughnessOffset,o.mapRoughnessWrap,o.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":f.alphaMap=h(y,o.mapAlphaRepeat,o.mapAlphaOffset,o.mapAlphaWrap,o.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":f.side=1;break;case"doubleSided":f.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),f.opacity=y;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":f[v]=y;break;case"vertexColors":y===!0&&(f.vertexColors=2),y==="face"&&(f.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",v,y)}}return f.type==="MeshBasicMaterial"&&delete f.emissive,f.type!=="MeshPhongMaterial"&&delete f.specular,1>f.opacity&&(f.transparent=!0),n.setTextures(c),n.parse(f)}}()}),Object.assign(Jo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?es.extractUrlBase(t):this.path,l=new At(this.manager);l.setPath(this.path),l.setWithCredentials(this.withCredentials),l.load(t,function(h){h=JSON.parse(h);var c=h.metadata;if(c!==void 0&&(c=c.type,c!==void 0&&c.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}h=o.parse(h,s),e(h.geometry,h.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new W,n=t,o,s,l,h=n.faces,c=n.vertices,f=n.normals,v=n.colors,y=n.scale,S=0;if(n.uvs!==void 0){for(o=0;o<n.uvs.length;o++)n.uvs[o].length&&S++;for(o=0;o<S;o++)i.faceVertexUvs[o]=[]}var C=0;for(l=c.length;C<l;)o=new m,o.x=c[C++]*y,o.y=c[C++]*y,o.z=c[C++]*y,i.vertices.push(o);for(C=0,l=h.length;C<l;){c=h[C++];var N=c&1,j=c&2;o=c&8;var et=c&16,_t=c&32;if(y=c&64,c&=128,N){N=new M,N.a=h[C],N.b=h[C+1],N.c=h[C+3];var mt=new M;if(mt.a=h[C+1],mt.b=h[C+2],mt.c=h[C+3],C+=4,j&&(j=h[C++],N.materialIndex=j,mt.materialIndex=j),j=i.faces.length,o)for(o=0;o<S;o++){var bt=n.uvs[o];for(i.faceVertexUvs[o][j]=[],i.faceVertexUvs[o][j+1]=[],s=0;4>s;s++){var xt=h[C++],Vt=bt[2*xt];xt=bt[2*xt+1],Vt=new p(Vt,xt),s!==2&&i.faceVertexUvs[o][j].push(Vt),s!==0&&i.faceVertexUvs[o][j+1].push(Vt)}}if(et&&(et=3*h[C++],N.normal.set(f[et++],f[et++],f[et]),mt.normal.copy(N.normal)),_t)for(o=0;4>o;o++)et=3*h[C++],_t=new m(f[et++],f[et++],f[et]),o!==2&&N.vertexNormals.push(_t),o!==0&&mt.vertexNormals.push(_t);if(y&&(y=h[C++],y=v[y],N.color.setHex(y),mt.color.setHex(y)),c)for(o=0;4>o;o++)y=h[C++],y=v[y],o!==2&&N.vertexColors.push(new A(y)),o!==0&&mt.vertexColors.push(new A(y));i.faces.push(N),i.faces.push(mt)}else{if(N=new M,N.a=h[C++],N.b=h[C++],N.c=h[C++],j&&(j=h[C++],N.materialIndex=j),j=i.faces.length,o)for(o=0;o<S;o++)for(bt=n.uvs[o],i.faceVertexUvs[o][j]=[],s=0;3>s;s++)xt=h[C++],Vt=bt[2*xt],xt=bt[2*xt+1],Vt=new p(Vt,xt),i.faceVertexUvs[o][j].push(Vt);if(et&&(et=3*h[C++],N.normal.set(f[et++],f[et++],f[et])),_t)for(o=0;3>o;o++)et=3*h[C++],_t=new m(f[et++],f[et++],f[et]),N.vertexNormals.push(_t);if(y&&(y=h[C++],N.color.setHex(v[y])),c)for(o=0;3>o;o++)y=h[C++],N.vertexColors.push(new A(v[y]));i.faces.push(N)}}if(n=t,C=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(l=0,h=n.skinWeights.length;l<h;l+=C)i.skinWeights.push(new E(n.skinWeights[l],1<C?n.skinWeights[l+1]:0,2<C?n.skinWeights[l+2]:0,3<C?n.skinWeights[l+3]:0));if(n.skinIndices)for(l=0,h=n.skinIndices.length;l<h;l+=C)i.skinIndices.push(new E(n.skinIndices[l],1<C?n.skinIndices[l+1]:0,2<C?n.skinIndices[l+2]:0,3<C?n.skinIndices[l+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),l=t,h=l.scale,l.morphTargets!==void 0)for(n=0,C=l.morphTargets.length;n<C;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=l.morphTargets[n].name,i.morphTargets[n].vertices=[],f=i.morphTargets[n].vertices,v=l.morphTargets[n].vertices,S=0,c=v.length;S<c;S+=3)y=new m,y.x=v[S]*h,y.y=v[S+1]*h,y.z=v[S+2]*h,f.push(y);if(l.morphColors!==void 0&&0<l.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),h=i.faces,l=l.morphColors[0].colors,n=0,C=h.length;n<C;n++)h[n].color.fromArray(l,3*n);for(l=t,n=[],C=[],l.animation!==void 0&&C.push(l.animation),l.animations!==void 0&&(l.animations.length?C=C.concat(l.animations):C.push(l.animations)),l=0;l<C.length;l++)(h=rr.parseAnimation(C[l],i.bones))&&n.push(h);return i.morphTargets&&(C=rr.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(C)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=ro.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(oa.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,s=this.path===void 0?es.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s,s=new At(o.manager),s.setPath(this.path),s.load(t,function(l){var h=null;try{h=JSON.parse(l)}catch(c){n!==void 0&&n(c),console.error("THREE:ObjectLoader: Can't parse "+t+".",c.message);return}l=h.metadata,l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):o.parse(h,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(o)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var o=this.parseObject(t.object,i,n);return t.animations&&(o.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(o),o},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var o=new Hn().fromJSON(t[i]);e[o.uuid]=o}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new Jo,o=new sl,s=0,l=t.length;s<l;s++){var h=t[s];switch(h.type){case"PlaneGeometry":case"PlaneBufferGeometry":var c=new fn[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":c=new fn[h.type](h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":c=new fn[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":c=new fn[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":c=new fn[h.type](h.radius,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":c=new fn[h.type](h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":c=new fn[h.type](h.radius,h.detail);break;case"RingGeometry":case"RingBufferGeometry":c=new fn[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":c=new fn[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":c=new fn[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case"LatheGeometry":case"LatheBufferGeometry":c=new fn[h.type](h.points,h.segments,h.phiStart,h.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":c=new fn[h.type](h.vertices,h.indices,h.radius,h.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":c=[];for(var f=0,v=h.shapes.length;f<v;f++){var y=e[h.shapes[f]];c.push(y)}c=new fn[h.type](c,h.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(c=[],f=0,v=h.shapes.length;f<v;f++)y=e[h.shapes[f]],c.push(y);f=h.options.extrudePath,f!==void 0&&(h.options.extrudePath=new Wa[f.type]().fromJSON(f)),c=new fn[h.type](c,h.options);break;case"BufferGeometry":c=o.parse(h);break;case"Geometry":c=n.parse(h,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+h.type+'"');continue}c.uuid=h.uuid,h.name!==void 0&&(c.name=h.name),c.isBufferGeometry===!0&&h.userData!==void 0&&(c.userData=h.userData),i[h.uuid]=c}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var o=new ka;o.setTextures(e),e=0;for(var s=t.length;e<s;e++){var l=t[e];if(l.type==="MultiMaterial"){for(var h=[],c=0;c<l.materials.length;c++){var f=l.materials[c];i[f.uuid]===void 0&&(i[f.uuid]=o.parse(f)),h.push(i[f.uuid])}n[l.uuid]=h}else n[l.uuid]=o.parse(l),i[l.uuid]=n[l.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=rr.parse(n);n.uuid!==void 0&&(o.uuid=n.uuid),e.push(o)}return e},parseImages:function(t,e){function i(S){return n.manager.itemStart(S),s.load(S,function(){n.manager.itemEnd(S)},void 0,function(){n.manager.itemError(S),n.manager.itemEnd(S)})}var n=this,o={};if(t!==void 0&&0<t.length){e=new wo(e);var s=new ai(e);s.setCrossOrigin(this.crossOrigin),e=0;for(var l=t.length;e<l;e++){var h=t[e],c=h.url;if(Array.isArray(c)){o[h.uuid]=[];for(var f=0,v=c.length;f<v;f++){var y=c[f];y=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(y)?y:n.resourcePath+y,o[h.uuid].push(i(y))}}else y=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?h.url:n.resourcePath+h.url,o[h.uuid]=i(y)}}return o},parseTextures:function(t,e){function i(c,f){return typeof c=="number"?c:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",c),f[c])}var n={};if(t!==void 0)for(var o=0,s=t.length;o<s;o++){var l=t[o];l.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',l.uuid),e[l.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",l.image);var h=Array.isArray(e[l.image])?new w(e[l.image]):new O(e[l.image]);h.needsUpdate=!0,h.uuid=l.uuid,l.name!==void 0&&(h.name=l.name),l.mapping!==void 0&&(h.mapping=i(l.mapping,Yl)),l.offset!==void 0&&h.offset.fromArray(l.offset),l.repeat!==void 0&&h.repeat.fromArray(l.repeat),l.center!==void 0&&h.center.fromArray(l.center),l.rotation!==void 0&&(h.rotation=l.rotation),l.wrap!==void 0&&(h.wrapS=i(l.wrap[0],kn),h.wrapT=i(l.wrap[1],kn)),l.format!==void 0&&(h.format=l.format),l.minFilter!==void 0&&(h.minFilter=i(l.minFilter,Xa)),l.magFilter!==void 0&&(h.magFilter=i(l.magFilter,Xa)),l.anisotropy!==void 0&&(h.anisotropy=l.anisotropy),l.flipY!==void 0&&(h.flipY=l.flipY),n[l.uuid]=h}return n},parseObject:function(t,e,i){function n(f){return e[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",f),e[f]}function o(f){if(f!==void 0){if(Array.isArray(f)){for(var v=[],y=0,S=f.length;y<S;y++){var C=f[y];i[C]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",C),v.push(i[C])}return v}return i[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",f),i[f]}}switch(t.type){case"Scene":var s=new zn;t.background!==void 0&&Number.isInteger(t.background)&&(s.background=new A(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?s.fog=new vn(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(s.fog=new Le(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":s=new ye(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(s.focus=t.focus),t.zoom!==void 0&&(s.zoom=t.zoom),t.filmGauge!==void 0&&(s.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(s.filmOffset=t.filmOffset),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"OrthographicCamera":s=new Ps(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(s.zoom=t.zoom),t.view!==void 0&&(s.view=Object.assign({},t.view));break;case"AmbientLight":s=new Zo(t.color,t.intensity);break;case"DirectionalLight":s=new jr(t.color,t.intensity);break;case"PointLight":s=new Yo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":s=new Na(t.color,t.intensity,t.width,t.height);break;case"SpotLight":s=new ra(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":s=new ia(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":s=n(t.geometry);var l=o(t.material);s=s.bones&&0<s.bones.length?new Ui(s,l):new di(s,l);break;case"LOD":s=new tn;break;case"Line":s=new Vi(n(t.geometry),o(t.material),t.mode);break;case"LineLoop":s=new Br(n(t.geometry),o(t.material));break;case"LineSegments":s=new gi(n(t.geometry),o(t.material));break;case"PointCloud":case"Points":s=new ds(n(t.geometry),o(t.material));break;case"Sprite":s=new Qi(o(t.material));break;case"Group":s=new ci;break;default:s=new z}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){l=t.children;for(var h=0;h<l.length;h++)s.add(this.parseObject(l[h],e,i))}if(t.type==="LOD")for(t=t.levels,l=0;l<t.length;l++){h=t[l];var c=s.getObjectByProperty("uuid",h.object);c!==void 0&&s.addLevel(c,h.distance)}return s}});var Yl={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},kn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Xa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};al.prototype={constructor:al,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var o=this,s=qr.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;fetch(t).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,o.options)}).then(function(l){qr.add(t,l),e&&e(l),o.manager.itemEnd(t)}).catch(function(l){n&&n(l),o.manager.itemError(t),o.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ua.prototype,{moveTo:function(t,e){this.currentPath=new Kn,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,o,s){this.currentPath.bezierCurveTo(t,e,i,n,o,s)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(et){for(var _t=[],mt=0,bt=et.length;mt<bt;mt++){var xt=et[mt],Vt=new Hn;Vt.curves=xt.curves,_t.push(Vt)}return _t}function n(et,_t){for(var mt=_t.length,bt=!1,xt=mt-1,Vt=0;Vt<mt;xt=Vt++){var V=_t[xt],it=_t[Vt],It=it.x-V.x,ee=it.y-V.y;if(Math.abs(ee)>Number.EPSILON){if(0>ee&&(V=_t[Vt],It=-It,it=_t[xt],ee=-ee),!(et.y<V.y||et.y>it.y))if(et.y===V.y){if(et.x===V.x)return!0}else{if(xt=ee*(et.x-V.x)-It*(et.y-V.y),xt===0)return!0;0>xt||(bt=!bt)}}else if(et.y===V.y&&(it.x<=et.x&&et.x<=V.x||V.x<=et.x&&et.x<=it.x))return!0}return bt}var o=Xr.isClockWise,s=this.subPaths;if(s.length===0)return[];if(e===!0)return i(s);if(e=[],s.length===1){var l=s[0],h=new Hn;return h.curves=l.curves,e.push(h),e}var c=!o(s[0].getPoints());c=t?!c:c,h=[];var f=[],v=[],y=0;f[y]=void 0,v[y]=[];for(var S=0,C=s.length;S<C;S++){l=s[S];var N=l.getPoints(),j=o(N);(j=t?!j:j)?(!c&&f[y]&&y++,f[y]={s:new Hn,p:N},f[y].s.curves=l.curves,c&&y++,v[y]=[]):v[y].push({h:l,p:N[0]})}if(!f[0])return i(s);if(1<f.length){for(S=!1,t=[],o=0,s=f.length;o<s;o++)h[o]=[];for(o=0,s=f.length;o<s;o++)for(l=v[o],j=0;j<l.length;j++){for(c=l[j],y=!0,N=0;N<f.length;N++)n(c.p,f[N].p)&&(o!==N&&t.push({froms:o,tos:N,hole:j}),y?(y=!1,h[N].push(c)):S=!0);y&&h[o].push(c)}0<t.length&&(S||(v=h))}for(S=0,o=f.length;S<o;S++)for(h=f[S].s,e.push(h),t=v[S],s=0,l=t.length;s<l;s++)h.holes.push(t[s].h);return e}}),Object.assign(ll.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var o=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var s=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var l=0,h=0,c=0;c<o.length;c++){var f=o[c];if(f===`
2571
2571
  `)l=0,h-=s;else{var v=n,y=l,S=h;if(f=e.glyphs[f]||e.glyphs["?"]){var C=new Ua;if(f.o)for(var N=f._cachedOutline||(f._cachedOutline=f.o.split(" ")),j=0,et=N.length;j<et;)switch(N[j++]){case"m":var _t=N[j++]*v+y,mt=N[j++]*v+S;C.moveTo(_t,mt);break;case"l":_t=N[j++]*v+y,mt=N[j++]*v+S,C.lineTo(_t,mt);break;case"q":var bt=N[j++]*v+y,xt=N[j++]*v+S,Vt=N[j++]*v+y,V=N[j++]*v+S;C.quadraticCurveTo(Vt,V,bt,xt);break;case"b":bt=N[j++]*v+y,xt=N[j++]*v+S,Vt=N[j++]*v+y,V=N[j++]*v+S,_t=N[j++]*v+y,mt=N[j++]*v+S,C.bezierCurveTo(Vt,V,_t,mt,bt,xt)}v={offsetX:f.ha*v,path:C}}else v=void 0;l+=v.offsetX,t.push(v.path)}}for(e=0,o=t.length;e<o;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(kl.prototype,{load:function(t,e,i,n){var o=this,s=new At(this.manager);s.setPath(this.path),s.load(t,function(l){try{var h=JSON.parse(l)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),h=JSON.parse(l.substring(65,l.length-2))}l=o.parse(h),e&&e(l)},i,n)},parse:function(t){return new ll(t)},setPath:function(t){return this.path=t,this}});var qa,_l={getContext:function(){return qa===void 0&&(qa=new(window.AudioContext||window.webkitAudioContext)),qa},setContext:function(t){qa=t}};Object.assign(cn.prototype,{load:function(t,e,i,n){var o=new At(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(s){s=s.slice(0),_l.getContext().decodeAudioData(s,function(l){e(l)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(Dn.prototype,{update:function(){var t,e,i,n,o,s,l,h,c=new J,f=new J;return function(v){if(t!==this||e!==v.focus||i!==v.fov||n!==v.aspect*this.aspect||o!==v.near||s!==v.far||l!==v.zoom||h!==this.eyeSep){t=this,e=v.focus,i=v.fov,n=v.aspect*this.aspect,o=v.near,s=v.far,l=v.zoom;var y=v.projectionMatrix.clone();h=this.eyeSep/2;var S=h*o/e,C=o*Math.tan(pi.DEG2RAD*i*.5)/l;f.elements[12]=-h,c.elements[12]=h;var N=-C*n+S,j=C*n+S;y.elements[0]=2*o/(j-N),y.elements[8]=(j+N)/(j-N),this.cameraL.projectionMatrix.copy(y),N=-C*n-S,j=C*n-S,y.elements[0]=2*o/(j-N),y.elements[8]=(j+N)/(j-N),this.cameraR.projectionMatrix.copy(y)}this.cameraL.matrixWorld.copy(v.matrixWorld).multiply(f),this.cameraR.matrixWorld.copy(v.matrixWorld).multiply(c)}}()}),sa.prototype=Object.create(z.prototype),sa.prototype.constructor=sa,Object.assign(hl.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Fa.prototype=Object.assign(Object.create(z.prototype),{constructor:Fa,getInput:function(){return this.gain},removeFilter:function(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new m,e=new G,i=new m,n=new m,o=new hl;return function(s){z.prototype.updateMatrixWorld.call(this,s),s=this.context.listener;var l=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),s.positionX){var h=this.context.currentTime+this.timeDelta;s.positionX.linearRampToValueAtTime(t.x,h),s.positionY.linearRampToValueAtTime(t.y,h),s.positionZ.linearRampToValueAtTime(t.z,h),s.forwardX.linearRampToValueAtTime(n.x,h),s.forwardY.linearRampToValueAtTime(n.y,h),s.forwardZ.linearRampToValueAtTime(n.z,h),s.upX.linearRampToValueAtTime(l.x,h),s.upY.linearRampToValueAtTime(l.y,h),s.upZ.linearRampToValueAtTime(l.z,h)}else s.setPosition(t.x,t.y,t.z),s.setOrientation(n.x,n.y,n.z,l.x,l.y,l.z)}}()}),Cs.prototype=Object.assign(Object.create(z.prototype),{constructor:Cs,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),aa.prototype=Object.assign(Object.create(Cs.prototype),{constructor:aa,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new m,e=new G,i=new m,n=new m;return function(o){if(z.prototype.updateMatrixWorld.call(this,o),o=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),o.positionX){var s=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(t.x,s),o.positionY.linearRampToValueAtTime(t.y,s),o.positionZ.linearRampToValueAtTime(t.z,s),o.orientationX.linearRampToValueAtTime(n.x,s),o.orientationY.linearRampToValueAtTime(n.y,s),o.orientationZ.linearRampToValueAtTime(n.z,s)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z)}}()}),Object.assign($o.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(la.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var o=this.cumulativeWeight;if(o===0){for(o=0;o!==n;++o)i[t+o]=i[o];o=e}else o+=e,this._mixBufferRegion(i,t,0,e/o,n);this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,o=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var s=e+e;n!==s;++n)if(i[n]!==i[n+e]){o.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,o){if(.5<=n)for(n=0;n!==o;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){G.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,o){for(var s=1-n,l=0;l!==o;++l){var h=e+l;t[h]=t[h]*s+t[i+l]*n}}}),Object.assign(Ko.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,o=i.length;n!==o;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(yn,{Composite:Ko,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new yn.Composite(t,e,i):new yn(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),o=new RegExp("^"+e+t+i+n+"$"),s=["material","materials","bones"];return function(l){var h=o.exec(l);if(!h)throw Error("PropertyBinding: Cannot parse trackName: "+l);h={nodeName:h[2],objectName:h[3],objectIndex:h[4],propertyName:h[5],propertyIndex:h[6]};var c=h.nodeName&&h.nodeName.lastIndexOf(".");if(c!==void 0&&c!==-1){var f=h.nodeName.substring(c+1);s.indexOf(f)!==-1&&(h.nodeName=h.nodeName.substring(0,c),h.objectName=f)}if(h.propertyName===null||h.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+l);return h}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(o){for(var s=0;s<o.length;s++){var l=o[s];if(l.name===e||l.uuid===e||(l=n(l.children)))return l}return null};if(t=n(t.children))return t}return null}}),Object.assign(yn.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,o=e.propertyIndex;if(t||(this.node=t=yn.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var s=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===s){s=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(s!==void 0){if(t[s]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[s]}}if(s=t[n],s===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,o!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===o){o=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===o){o=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=o}else s.fromArray!==void 0&&s.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(i=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(yn.prototype,{_getValue_unbound:yn.prototype.getValue,_setValue_unbound:yn.prototype.setValue}),Object.assign(Ls.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._paths,s=this._parsedPaths,l=this._bindings,h=l.length,c=void 0,f=0,v=arguments.length;f!==v;++f){var y=arguments[f],S=y.uuid,C=n[S];if(C===void 0){C=e++,n[S]=C,t.push(y),S=0;for(var N=h;S!==N;++S)l[S].push(new yn(y,o[S],s[S]))}else if(C<i){c=t[C];var j=--i;for(N=t[j],n[N.uuid]=C,t[C]=N,n[S]=j,t[j]=y,S=0,N=h;S!==N;++S){var et=l[S],_t=et[C];et[C]=et[j],_t===void 0&&(_t=new yn(y,o[S],s[S])),et[j]=_t}}else t[C]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,o=n.length,s=0,l=arguments.length;s!==l;++s){var h=arguments[s],c=h.uuid,f=i[c];if(f!==void 0&&f>=e){var v=e++,y=t[v];for(i[y.uuid]=f,t[f]=y,i[c]=v,t[v]=h,h=0,c=o;h!==c;++h){y=n[h];var S=y[f];y[f]=y[v],y[v]=S}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,s=o.length,l=0,h=arguments.length;l!==h;++l){var c=arguments[l].uuid,f=n[c];if(f!==void 0)if(delete n[c],f<i){c=--i;var v=t[c],y=--e,S=t[y];for(n[v.uuid]=f,t[f]=v,n[S.uuid]=c,t[c]=S,t.pop(),v=0,S=s;v!==S;++v){var C=o[v],N=C[y];C[f]=C[c],C[c]=N,C.pop()}}else for(y=--e,S=t[y],n[S.uuid]=f,t[f]=S,t.pop(),v=0,S=s;v!==S;++v)C=o[v],C[f]=C[y],C.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],o=this._bindings;if(n!==void 0)return o[n];var s=this._paths,l=this._parsedPaths,h=this._objects,c=this.nCachedObjects_,f=Array(h.length);for(n=o.length,i[t]=n,s.push(t),l.push(e),o.push(f),i=c,n=h.length;i!==n;++i)f[i]=new yn(h[i],t,e);return f},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,o=this._parsedPaths,s=this._bindings,l=s.length-1,h=s[l];e[t[l]]=i,s[i]=h,s.pop(),o[i]=o[l],o.pop(),n[i]=n[l],n.pop()}}}),Object.assign(ha.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,o=i/n;t.warp(1,n/i,e),this.warp(o,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,o=n.time,s=this._timeScaleInterpolant,l=this.timeScale;return s===null&&(this._timeScaleInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,n[1]=o+i,s[0]=t/l,s[1]=e/l,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var o=this._startTime;if(o!==null){if(e=(t-o)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,o=this._propertyBindings;for(var s=0,l=e.length;s!==l;++s)e[s].evaluate(i),o[s].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,o=this._loopCount,s=n===2202;if(t===0)return o===-1?e:s&&(o&1)===1?i-e:e;if(n===2200)t:{if(o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(o===-1&&(0<=t?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,o+=Math.abs(n);var l=this.repetitions-o;0>=l?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(l===1?(t=0>t,this._setEndings(t,!t,s)):this._setEndings(!1,!1,s),this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(s&&(o&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,o=n.time,s=this._weightInterpolant;return s===null&&(this._weightInterpolant=s=n._lendControlInterpolant()),n=s.parameterPositions,s=s.sampleValues,n[0]=o,s[0]=e,n[1]=o+t,s[1]=i,this}}),So.prototype=Object.assign(Object.create($.prototype),{constructor:So,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,s=t._propertyBindings;t=t._interpolants;var l=i.uuid,h=this._bindingsByRootAndName,c=h[l];for(c===void 0&&(c={},h[l]=c),h=0;h!==o;++h){var f=n[h],v=f.name,y=c[v];if(y===void 0){if(y=s[h],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,v));continue}y=new la(yn.create(i,v,e&&e._propertyBindings[h].binding.parsedPath),f.ValueTypeName,f.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,v)}s[h]=y,t[h].resultBuffer=y.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var o=e[i];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,o=this._actionsByClip,s=o[e];s===void 0?(s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=s):(e=s.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),s.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var o=n.knownActions,s=o[o.length-1],l=t._byClipCacheIndex;s._byClipCacheIndex=l,o[l]=s,o.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],o.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,o=n[e],s=this._bindings;o===void 0&&(o={},n[e]=o),o[i]=t,t._cacheIndex=s.length,s.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var o=this._bindingsByRootAndName,s=o[n],l=e[e.length-1];t=t._cacheIndex,l._cacheIndex=t,e[t]=l,e.pop(),delete s[i];t:{for(var h in s)break t;delete o[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,o=e[n];t._cacheIndex=n,e[n]=t,o._cacheIndex=i,e[i]=o},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new dr(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,o=e[n];t.__cacheIndex=n,e[n]=t,o.__cacheIndex=i,e[i]=o},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?rr.findByName(i,t):t,t=i!==null?i.uuid:t;var o=this._actionsByClip[t],s=null;if(o!==void 0){if(s=o.actionByRoot[n],s!==void 0)return s;s=o.knownActions[0],i===null&&(i=s._clip)}return i===null?null:(e=new ha(this,i,e),this._bindAction(e,s),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?rr.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,o=this._nActiveBindings=this._nActiveActions=0;o!==e;++o)t[o].reset();for(o=0;o!==n;++o)i[o].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,o=Math.sign(t),s=this._accuIndex^=1,l=0;l!==i;++l)e[l]._update(n,t,o,s);for(t=this._bindings,e=this._nActiveBindings,l=0;l!==e;++l)t[l].apply(s);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var o=0,s=n.length;o!==s;++o){var l=n[o];this._deactivateAction(l);var h=l._cacheIndex,c=e[e.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,c._cacheIndex=h,e[h]=c,e.pop(),this._removeInactiveBindingsForAction(l)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var o in n)t=n[o],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),Ga.prototype.clone=function(){return new Ga(this.value.clone===void 0?this.value:this.value.clone())},ul.prototype=Object.assign(Object.create(Ft.prototype),{constructor:ul,isInstancedBufferGeometry:!0,copy:function(t){return Ft.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),cl.prototype=Object.assign(Object.create(Oi.prototype),{constructor:cl,isInstancedInterleavedBuffer:!0,copy:function(t){return Oi.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),fl.prototype=Object.assign(Object.create(ht.prototype),{constructor:fl,isInstancedBufferAttribute:!0,copy:function(t){return ht.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ul.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){return i=i||[],Qo(t,this,i,e),i.sort(ua),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,o=t.length;n<o;n++)Qo(t[n],this,i,e);return i.sort(ua),i}}),Object.assign(pl.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos(pi.clamp(e/this.radius,-1,1))),this}}),Object.assign(Q.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(Eo.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new p;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return t===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new p),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new p),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new p),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new p),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new p;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Rs.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return t===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new m),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return t===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),t=new m),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return e===void 0&&(console.warn("THREE.Line3: .at() target is now required"),e=new m),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new m,e=new m;return function(i,n){return t.subVectors(i,this.start),e.subVectors(this.end,this.start),i=e.dot(e),i=e.dot(t)/i,n&&(i=pi.clamp(i,0,1)),i}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new m),this.delta(i).multiplyScalar(t).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Bn.prototype=Object.create(z.prototype),Bn.prototype.constructor=Bn,Bn.prototype.isImmediateRenderObject=!0,_i.prototype=Object.create(gi.prototype),_i.prototype.constructor=_i,_i.prototype.update=function(){var t=new m,e=new m,i=new P;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,s=this.geometry.attributes.position,l=this.object.geometry;if(l&&l.isGeometry)for(var h=l.vertices,c=l.faces,f=l=0,v=c.length;f<v;f++)for(var y=c[f],S=0,C=y.vertexNormals.length;S<C;S++){var N=y.vertexNormals[S];t.copy(h[y[n[S]]]).applyMatrix4(o),e.copy(N).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1}else if(l&&l.isBufferGeometry)for(n=l.attributes.position,h=l.attributes.normal,S=l=0,C=n.count;S<C;S++)t.set(n.getX(S),n.getY(S),n.getZ(S)).applyMatrix4(o),e.set(h.getX(S),h.getY(S),h.getZ(S)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(l,t.x,t.y,t.z),l+=1,s.setXYZ(l,e.x,e.y,e.z),l+=1;s.needsUpdate=!0}}(),Is.prototype=Object.create(z.prototype),Is.prototype.constructor=Is,Is.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Is.prototype.update=function(){var t=new m,e=new m;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Os.prototype=Object.create(gi.prototype),Os.prototype.constructor=Os,Os.prototype.updateMatrixWorld=function(){var t=new m,e=new J,i=new J;return function(n){var o=this.bones,s=this.geometry,l=s.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var h=0,c=0;h<o.length;h++){var f=o[h];f.parent&&f.parent.isBone&&(e.multiplyMatrices(i,f.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(i,f.parent.matrixWorld),t.setFromMatrixPosition(e),l.setXYZ(c+1,t.x,t.y,t.z),c+=2)}s.getAttribute("position").needsUpdate=!0,z.prototype.updateMatrixWorld.call(this,n)}}(),gr.prototype=Object.create(di.prototype),gr.prototype.constructor=gr,gr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},gr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Ds.prototype=Object.create(z.prototype),Ds.prototype.constructor=Ds,Ds.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ds.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},zs.prototype=Object.create(z.prototype),zs.prototype.constructor=zs,zs.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},zs.prototype.update=function(){var t=new m,e=new A,i=new A;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var o=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var s=0,l=o.count;s<l;s++){var h=s<l/2?e:i;o.setXYZ(s,h.r,h.g,h.b)}o.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),ca.prototype=Object.create(gi.prototype),ca.prototype.constructor=ca,Ha.prototype=Object.create(gi.prototype),Ha.prototype.constructor=Ha,fa.prototype=Object.create(gi.prototype),fa.prototype.constructor=fa,fa.prototype.update=function(){var t=new m,e=new m,i=new P;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry,l=s.vertices;s=s.faces;for(var h=0,c=0,f=s.length;c<f;c++){var v=s[c],y=v.normal;t.copy(l[v.a]).add(l[v.b]).add(l[v.c]).divideScalar(3).applyMatrix4(n),e.copy(y).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(h,t.x,t.y,t.z),h+=1,o.setXYZ(h,e.x,e.y,e.z),h+=1}o.needsUpdate=!0}}(),Qn.prototype=Object.create(z.prototype),Qn.prototype.constructor=Qn,Qn.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Qn.prototype.update=function(){var t=new m,e=new m,i=new m;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(i),this.targetLine.scale.z=i.length()}}(),pa.prototype=Object.create(gi.prototype),pa.prototype.constructor=pa,pa.prototype.update=function(){function t(s,l,h,c){if(n.set(l,h,c).unproject(o),s=i[s],s!==void 0)for(l=e.getAttribute("position"),h=0,c=s.length;h<c;h++)l.setXYZ(s[h],n.x,n.y,n.z)}var e,i,n=new m,o=new Be;return function(){e=this.geometry,i=this.pointMap,o.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),oo.prototype=Object.create(gi.prototype),oo.prototype.constructor=oo,oo.prototype.update=function(){var t=new K;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,o=n.array;o[0]=i.x,o[1]=i.y,o[2]=i.z,o[3]=e.x,o[4]=i.y,o[5]=i.z,o[6]=e.x,o[7]=e.y,o[8]=i.z,o[9]=i.x,o[10]=e.y,o[11]=i.z,o[12]=i.x,o[13]=i.y,o[14]=e.z,o[15]=e.x,o[16]=i.y,o[17]=e.z,o[18]=e.x,o[19]=e.y,o[20]=e.z,o[21]=i.x,o[22]=e.y,o[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),oo.prototype.setFromObject=function(t){return this.object=t,this.update(),this},oo.prototype.copy=function(t){return gi.prototype.copy.call(this,t),this.object=t.object,this},oo.prototype.clone=function(){return new this.constructor().copy(this)},da.prototype=Object.create(gi.prototype),da.prototype.constructor=da,da.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),z.prototype.updateMatrixWorld.call(this,t))},ma.prototype=Object.create(Vi.prototype),ma.prototype.constructor=ma,ma.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),z.prototype.updateMatrixWorld.call(this,t)};var Ya,_a;so.prototype=Object.create(z.prototype),so.prototype.constructor=so,so.prototype.setDirection=function(){var t=new m,e;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),so.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},so.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},so.prototype.copy=function(t){return z.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},so.prototype.clone=function(){return new this.constructor().copy(this)},or.prototype=Object.create(gi.prototype),or.prototype.constructor=or,Ee.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ee.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(no.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new W,i=0,n=t.length;i<n;i++){var o=t[i];e.vertices.push(new m(o.x,o.y,o.z||0))}return e}}),Object.assign(Kn.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Gl.prototype=Object.create(Sn.prototype),Hl.prototype=Object.create(Sn.prototype),dl.prototype=Object.create(Sn.prototype),Object.assign(dl.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),ca.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Os.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(ro.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),es.extractUrlBase(t)}}),Object.assign(Jo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(oa.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Eo.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(K.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Rs.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(pi,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),pi.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),pi.ceilPowerOfTwo(t)}}),Object.assign(P.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(J.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return t===void 0&&(t=new m),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,o,s){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,o,s)}}),q.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},G.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(ki.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Ie.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(Ie,{barycoordFromPoint:function(t,e,i,n,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ie.getBarycoord(t,e,i,n,o)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ie.getNormal(t,e,i,n)}}),Object.assign(Hn.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Qr(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new to(this,t)}}),Object.assign(p.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(m.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(E.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(W.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(z.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(z.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(tn.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(sn.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ee.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),ye.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties($i.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(ht.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Ft.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){i!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Ft.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(kr.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Ga.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Zt.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new A}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===1}}}),Object.defineProperties(Er.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(ti.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(_e.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(_e.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(ve.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(U.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(mi.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Cs.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new cn().load(t,function(i){e.setBuffer(i)}),this},$o.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},sa.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},bo.crossOrigin=void 0,bo.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new ln;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},bo.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new Bi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},bo.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},bo.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},T.WebGLRenderTargetCube=Y,T.WebGLRenderTarget=U,T.WebGLRenderer=_e,T.ShaderLib=Wr,T.UniformsLib=qe,T.UniformsUtils=Pn,T.ShaderChunk=bi,T.FogExp2=Le,T.Fog=vn,T.Scene=zn,T.Sprite=Qi,T.LOD=tn,T.SkinnedMesh=Ui,T.Skeleton=sn,T.Bone=an,T.Mesh=di,T.LineSegments=gi,T.LineLoop=Br,T.Line=Vi,T.Points=ds,T.Group=ci,T.VideoTexture=nl,T.DataTexture=H,T.DataTexture3D=X,T.CompressedTexture=po,T.CubeTexture=w,T.CanvasTexture=Xs,T.DepthTexture=qs,T.Texture=O,T.AnimationLoader=Qt,T.CompressedTextureLoader=Yt,T.DataTextureLoader=Ue,T.CubeTextureLoader=Bi,T.TextureLoader=ln,T.ObjectLoader=oa,T.MaterialLoader=ka,T.BufferGeometryLoader=sl,T.DefaultLoadingManager=Vn,T.LoadingManager=wo,T.JSONLoader=Jo,T.ImageLoader=ai,T.ImageBitmapLoader=al,T.FontLoader=kl,T.FileLoader=At,T.Loader=ro,T.LoaderUtils=es,T.Cache=qr,T.AudioLoader=cn,T.SpotLightShadow=na,T.SpotLight=ra,T.PointLight=Yo,T.RectAreaLight=Na,T.HemisphereLight=ia,T.DirectionalLightShadow=Mo,T.DirectionalLight=jr,T.AmbientLight=Zo,T.LightShadow=Vr,T.Light=$i,T.StereoCamera=Dn,T.PerspectiveCamera=ye,T.OrthographicCamera=Ps,T.CubeCamera=sa,T.ArrayCamera=ke,T.Camera=Be,T.AudioListener=Fa,T.PositionalAudio=aa,T.AudioContext=_l,T.AudioAnalyser=$o,T.Audio=Cs,T.VectorKeyframeTrack=bs,T.StringKeyframeTrack=Ba,T.QuaternionKeyframeTrack=Es,T.NumberKeyframeTrack=br,T.ColorKeyframeTrack=za,T.BooleanKeyframeTrack=Da,T.PropertyMixer=la,T.PropertyBinding=yn,T.KeyframeTrack=On,T.AnimationUtils=Nn,T.AnimationObjectGroup=Ls,T.AnimationMixer=So,T.AnimationClip=rr,T.Uniform=Ga,T.InstancedBufferGeometry=ul,T.BufferGeometry=Ft,T.Geometry=W,T.InterleavedBufferAttribute=Di,T.InstancedInterleavedBuffer=cl,T.InterleavedBuffer=Oi,T.InstancedBufferAttribute=fl,T.Face3=M,T.Object3D=z,T.Raycaster=Ul,T.Layers=F,T.EventDispatcher=$,T.Clock=hl,T.QuaternionLinearInterpolant=qn,T.LinearInterpolant=dr,T.DiscreteInterpolant=qo,T.CubicInterpolant=ea,T.Interpolant=Fn,T.Triangle=Ie,T.Math=pi,T.Spherical=pl,T.Cylindrical=Q,T.Plane=q,T.Frustum=b,T.Sphere=B,T.Ray=ki,T.Matrix4=J,T.Matrix3=P,T.Box3=K,T.Box2=Eo,T.Line3=Rs,T.Euler=x,T.Vector4=E,T.Vector3=m,T.Vector2=p,T.Quaternion=G,T.Color=A,T.ImmediateRenderObject=Bn,T.VertexNormalsHelper=_i,T.SpotLightHelper=Is,T.SkeletonHelper=Os,T.PointLightHelper=gr,T.RectAreaLightHelper=Ds,T.HemisphereLightHelper=zs,T.GridHelper=ca,T.PolarGridHelper=Ha,T.FaceNormalsHelper=fa,T.DirectionalLightHelper=Qn,T.CameraHelper=pa,T.BoxHelper=oo,T.Box3Helper=da,T.PlaneHelper=ma,T.ArrowHelper=so,T.AxesHelper=or,T.Shape=Hn,T.Path=Kn,T.ShapePath=Ua,T.Font=ll,T.CurvePath=no,T.Curve=Ee,T.ImageUtils=bo,T.ShapeUtils=Xr,T.WebGLUtils=He,T.WireframeGeometry=ms,T.ParametricGeometry=Ys,T.ParametricBufferGeometry=gs,T.TetrahedronGeometry=Zs,T.TetrahedronBufferGeometry=vs,T.OctahedronGeometry=Js,T.OctahedronBufferGeometry=Do,T.IcosahedronGeometry=$s,T.IcosahedronBufferGeometry=ys,T.DodecahedronGeometry=_s,T.DodecahedronBufferGeometry=xs,T.PolyhedronGeometry=ji,T.PolyhedronBufferGeometry=xi,T.TubeGeometry=un,T.TubeBufferGeometry=mo,T.TorusKnotGeometry=Sr,T.TorusKnotBufferGeometry=zo,T.TorusGeometry=Bo,T.TorusBufferGeometry=Rn,T.TextGeometry=Qs,T.TextBufferGeometry=ko,T.SphereGeometry=go,T.SphereBufferGeometry=fr,T.RingGeometry=ta,T.RingBufferGeometry=Uo,T.PlaneGeometry=Fe,T.PlaneBufferGeometry=xe,T.LatheGeometry=Ms,T.LatheBufferGeometry=vo,T.ShapeGeometry=to,T.ShapeBufferGeometry=yo,T.ExtrudeGeometry=Qr,T.ExtrudeBufferGeometry=kr,T.EdgesGeometry=_o,T.ConeGeometry=Ss,T.ConeBufferGeometry=In,T.CylinderGeometry=eo,T.CylinderBufferGeometry=io,T.CircleGeometry=Fo,T.CircleBufferGeometry=Ur,T.BoxGeometry=Dt,T.BoxBufferGeometry=kt,T.ShadowMaterial=xo,T.SpriteMaterial=Fi,T.RawShaderMaterial=Go,T.ShaderMaterial=ti,T.PointsMaterial=Ln,T.MeshPhysicalMaterial=Ho,T.MeshStandardMaterial=Fr,T.MeshPhongMaterial=Er,T.MeshToonMaterial=Vo,T.MeshNormalMaterial=jo,T.MeshLambertMaterial=pr,T.MeshDepthMaterial=oe,T.MeshDistanceMaterial=te,T.MeshBasicMaterial=Ge,T.MeshMatcapMaterial=Wo,T.LineDashedMaterial=Xo,T.LineBasicMaterial=zi,T.Material=Zt,T.Float64BufferAttribute=Rt,T.Float32BufferAttribute=Pt,T.Uint32BufferAttribute=zt,T.Int32BufferAttribute=D,T.Uint16BufferAttribute=Et,T.Int16BufferAttribute=lt,T.Uint8ClampedBufferAttribute=Nt,T.Uint8BufferAttribute=gt,T.Int8BufferAttribute=ft,T.BufferAttribute=ht,T.ArcCurve=As,T.CatmullRomCurve3=Sn,T.CubicBezierCurve=Zn,T.CubicBezierCurve3=Ti,T.EllipseCurve=Gn,T.LineCurve=Jn,T.LineCurve3=mr,T.QuadraticBezierCurve=$n,T.QuadraticBezierCurve3=Hr,T.SplineCurve=Ar,T.REVISION="98",T.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},T.CullFaceNone=0,T.CullFaceBack=1,T.CullFaceFront=2,T.CullFaceFrontBack=3,T.FrontFaceDirectionCW=0,T.FrontFaceDirectionCCW=1,T.BasicShadowMap=0,T.PCFShadowMap=1,T.PCFSoftShadowMap=2,T.FrontSide=0,T.BackSide=1,T.DoubleSide=2,T.FlatShading=1,T.SmoothShading=2,T.NoColors=0,T.FaceColors=1,T.VertexColors=2,T.NoBlending=0,T.NormalBlending=1,T.AdditiveBlending=2,T.SubtractiveBlending=3,T.MultiplyBlending=4,T.CustomBlending=5,T.AddEquation=100,T.SubtractEquation=101,T.ReverseSubtractEquation=102,T.MinEquation=103,T.MaxEquation=104,T.ZeroFactor=200,T.OneFactor=201,T.SrcColorFactor=202,T.OneMinusSrcColorFactor=203,T.SrcAlphaFactor=204,T.OneMinusSrcAlphaFactor=205,T.DstAlphaFactor=206,T.OneMinusDstAlphaFactor=207,T.DstColorFactor=208,T.OneMinusDstColorFactor=209,T.SrcAlphaSaturateFactor=210,T.NeverDepth=0,T.AlwaysDepth=1,T.LessDepth=2,T.LessEqualDepth=3,T.EqualDepth=4,T.GreaterEqualDepth=5,T.GreaterDepth=6,T.NotEqualDepth=7,T.MultiplyOperation=0,T.MixOperation=1,T.AddOperation=2,T.NoToneMapping=0,T.LinearToneMapping=1,T.ReinhardToneMapping=2,T.Uncharted2ToneMapping=3,T.CineonToneMapping=4,T.UVMapping=300,T.CubeReflectionMapping=301,T.CubeRefractionMapping=302,T.EquirectangularReflectionMapping=303,T.EquirectangularRefractionMapping=304,T.SphericalReflectionMapping=305,T.CubeUVReflectionMapping=306,T.CubeUVRefractionMapping=307,T.RepeatWrapping=1e3,T.ClampToEdgeWrapping=1001,T.MirroredRepeatWrapping=1002,T.NearestFilter=1003,T.NearestMipMapNearestFilter=1004,T.NearestMipMapLinearFilter=1005,T.LinearFilter=1006,T.LinearMipMapNearestFilter=1007,T.LinearMipMapLinearFilter=1008,T.UnsignedByteType=1009,T.ByteType=1010,T.ShortType=1011,T.UnsignedShortType=1012,T.IntType=1013,T.UnsignedIntType=1014,T.FloatType=1015,T.HalfFloatType=1016,T.UnsignedShort4444Type=1017,T.UnsignedShort5551Type=1018,T.UnsignedShort565Type=1019,T.UnsignedInt248Type=1020,T.AlphaFormat=1021,T.RGBFormat=1022,T.RGBAFormat=1023,T.LuminanceFormat=1024,T.LuminanceAlphaFormat=1025,T.RGBEFormat=1023,T.DepthFormat=1026,T.DepthStencilFormat=1027,T.RedFormat=1028,T.RGB_S3TC_DXT1_Format=33776,T.RGBA_S3TC_DXT1_Format=33777,T.RGBA_S3TC_DXT3_Format=33778,T.RGBA_S3TC_DXT5_Format=33779,T.RGB_PVRTC_4BPPV1_Format=35840,T.RGB_PVRTC_2BPPV1_Format=35841,T.RGBA_PVRTC_4BPPV1_Format=35842,T.RGBA_PVRTC_2BPPV1_Format=35843,T.RGB_ETC1_Format=36196,T.RGBA_ASTC_4x4_Format=37808,T.RGBA_ASTC_5x4_Format=37809,T.RGBA_ASTC_5x5_Format=37810,T.RGBA_ASTC_6x5_Format=37811,T.RGBA_ASTC_6x6_Format=37812,T.RGBA_ASTC_8x5_Format=37813,T.RGBA_ASTC_8x6_Format=37814,T.RGBA_ASTC_8x8_Format=37815,T.RGBA_ASTC_10x5_Format=37816,T.RGBA_ASTC_10x6_Format=37817,T.RGBA_ASTC_10x8_Format=37818,T.RGBA_ASTC_10x10_Format=37819,T.RGBA_ASTC_12x10_Format=37820,T.RGBA_ASTC_12x12_Format=37821,T.LoopOnce=2200,T.LoopRepeat=2201,T.LoopPingPong=2202,T.InterpolateDiscrete=2300,T.InterpolateLinear=2301,T.InterpolateSmooth=2302,T.ZeroCurvatureEnding=2400,T.ZeroSlopeEnding=2401,T.WrapAroundEnding=2402,T.TrianglesDrawMode=0,T.TriangleStripDrawMode=1,T.TriangleFanDrawMode=2,T.LinearEncoding=3e3,T.sRGBEncoding=3001,T.GammaEncoding=3007,T.RGBEEncoding=3002,T.LogLuvEncoding=3003,T.RGBM7Encoding=3004,T.RGBM16Encoding=3005,T.RGBDEncoding=3006,T.BasicDepthPacking=3200,T.RGBADepthPacking=3201,T.TangentSpaceNormalMap=0,T.ObjectSpaceNormalMap=1,T.CubeGeometry=Dt,T.Face4=function(t,e,i,n,o,s,l){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new M(t,e,i,o,s,l)},T.LineStrip=0,T.LinePieces=1,T.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},T.MultiMaterial=function(t){return t===void 0&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t},T.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ds(t,e)},T.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Qi(t)},T.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ds(t,e)},T.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Ln(t)},T.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Ln(t)},T.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Ln(t)},T.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new m(t,e,i)},T.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new ht(t,e).setDynamic(!0)},T.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new ft(t,e)},T.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new gt(t,e)},T.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Nt(t,e)},T.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new lt(t,e)},T.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Et(t,e)},T.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new D(t,e)},T.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new zt(t,e)},T.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Pt(t,e)},T.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Rt(t,e)},T.ClosedSplineCurve3=Gl,T.SplineCurve3=Hl,T.Spline=dl,T.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new or(t)},T.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new oo(t,e)},T.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new gi(new _o(t.geometry),new zi({color:e!==void 0?e:16777215}))},T.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new gi(new ms(t.geometry),new zi({color:e!==void 0?e:16777215}))},T.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new At(t)},T.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ue(t)},T.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},T.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},T.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},T.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},T.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(T,"__esModule",{value:!0})}),THREE.Sky=function(){var T=THREE.Sky.SkyShader,$=new THREE.ShaderMaterial({fragmentShader:T.fragmentShader,vertexShader:T.vertexShader,uniforms:THREE.UniformsUtils.clone(T.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),$)},THREE.Sky.prototype=Object.create(THREE.Mesh.prototype),THREE.Sky.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new THREE.Vector3}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {"," zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );"," return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {"," float c = ( 0.2 * T ) * 10E-18;"," return 0.434 * c * MieConst;","}","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"," gl_Position.z = gl_Position.w;"," vSunDirection = normalize( sunPosition );"," vSunE = sunIntensity( dot( vSunDirection, up ) );"," vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );"," float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );"," vBetaR = totalRayleigh * rayleighCoefficient;"," vBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join(`
2572
2572
  `),fragmentShader:["varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","uniform float luminance;","uniform float mieDirectionalG;","const vec3 cameraPos = vec3( 0.0, 1.0, 0.0 );","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float THREE_OVER_SIXTEENPI = 0.05968310365946075;","const float ONE_OVER_FOURPI = 0.07957747154594767;","float rayleighPhase( float cosTheta ) {"," return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );","}","float hgPhase( float cosTheta, float g ) {"," float g2 = pow( g, 2.0 );"," float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );"," return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );","}","const float A = 0.15;","const float B = 0.50;","const float C = 0.10;","const float D = 0.20;","const float E = 0.02;","const float F = 0.30;","const float whiteScale = 1.0748724675633854;","vec3 Uncharted2Tonemap( vec3 x ) {"," return ( ( x * ( A * x + C * B ) + D * E ) / ( x * ( A * x + B ) + D * F ) ) - E / F;","}","void main() {"," float zenithAngle = acos( max( 0.0, dot( up, normalize( vWorldPosition - cameraPos ) ) ) );"," float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );"," float sR = rayleighZenithLength * inverse;"," float sM = mieZenithLength * inverse;"," vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );"," float cosTheta = dot( normalize( vWorldPosition - cameraPos ), vSunDirection );"," float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );"," vec3 betaRTheta = vBetaR * rPhase;"," float mPhase = hgPhase( cosTheta, mieDirectionalG );"," vec3 betaMTheta = vBetaM * mPhase;"," vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );"," Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );"," vec3 direction = normalize( vWorldPosition - cameraPos );"," float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2]"," float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2]"," vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );"," vec3 L0 = vec3( 0.1 ) * Fex;"," float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );"," L0 += ( vSunE * 19000.0 * Fex ) * sundisk;"," vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );"," vec3 curr = Uncharted2Tonemap( ( log2( 2.0 / pow( luminance, 4.0 ) ) ) * texColor );"," vec3 color = curr * whiteScale;"," vec3 retColor = pow( color, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );"," gl_FragColor = vec4( retColor, 1.0 );","}"].join(`
2573
- `)},function(T){typeof module>"u"?window.charming=T:module.exports=T}(function(T,$){$=$||{};var p=$.tagName||"span",J=$.classPrefix!=null?$.classPrefix:"char",G=1,m=function(P){for(var O=P.parentNode,E=P.nodeValue,U=E.length,Y=-1;++Y<U;){var H=document.createElement(p);J&&(H.className=J+G,G++),H.appendChild(document.createTextNode(E[Y])),O.insertBefore(H,P)}O.removeChild(P)};return function P(O){for(var E=[].slice.call(O.childNodes),U=E.length,Y=-1;++Y<U;)P(E[Y]);O.nodeType===Node.TEXT_NODE&&m(O)}(T),T});class lc{constructor($,p=[]){mars3d?(this.map=$,this.tilesetLayer,this.modelArr=p,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel($){this.modelArr.push($)}add($,p){const J=new Map([["click",mars3d.EventType.click]]);return new Promise((G,m)=>{let P,O,E,U,Y,H,K,B,q;if(typeof $!="object"){let A=this.query($);A||m("缺少树结构");let{id:d,bimModelExcavationDetails:g,bimModel:M}=A;P=d,O=M.modelType,E=M.tender,U=M.releasedDistance,Y=M.modelName,H=M.isDynamicReleased,K={bimModelExcavationDetails:g},B=A.url,q=M.modelColor}else P=$.modelId,O=$.modelType,E=$.tender,U=$.releasedDistance,Y=$.modelTitle,H=$.permission,K=$.customize,B=$.url,q=$.color;let b=this.map.getLayer($,"modelId");if(b)return G(b),!1;if(B.indexOf("tileset.json")<0)return console.error("链接不完整",Y),G({tite:"【模型】"+Y+"数据地址有误",type:"error",id:P,url:B}),!1;new Cesium.Resource({url:B}).fetchJson().then(d=>{let g=null,M={enabled:!0,precise:!1},x=[];q&&(g={color:{conditions:[["true","rgba(255, 255, 0, 1)"]]}}),window.bimClip&&window.bimClip.activeObj[P]&&(Object.keys(window.bimClip.activeObj[P]).forEach(F=>{let{item:z}=window.bimClip.activeObj[P][F],{bimModelExcavationDetails:W}=z,{excavationDetails:ht}=W;x.push({positions:JSON.parse(ht).excavationDetails,id:Number(F)})}),x.length>0&&(M.area=x)),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:P,modelType:O,tender:E,releasedDistance:U,modelTitle:Y,permission:H,customize:K,url:encodeURI(B),flat:{precise:!1},skipLevelOfDetail:!0,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:g,clip:M,cacheBytes:1073741824*2,maximumCacheOverflowBytes:2147483648*2}),this.tilesetLayer.bindPopup(F=>{if(F.graphic){const z=F.graphic.attr;let W=null,ht=null;return JSON.stringify(z)!=="{}"?(z.name&&(W=z.name.lastIndexOf("@")),W&&W>-1&&(ht=z.name.slice(0,W)),z.name?`&nbsp;&nbsp;<span>${ht||z.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${Y}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${Y}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${Y}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(F=>{console.log("加载完成",this.tilesetLayer,F),G(F);let{modelId:z}=F.options;F.clip.options.area.forEach(W=>{window.bimClip.activeObj[z][W.id].id==null&&(window.bimClip.activeObj[z][W.id].id=W.id)})}).catch(F=>{G()}),this.tilesetLayer.on("click",F=>{F.layer.style==null&&F.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),p&&Object.keys(p).forEach(F=>{this.tilesetLayer.on(J.get(F),z=>{p[F](z)})}),O==0&&this.bimObliquePhotographyId.push(P),this.map.addLayer(this.tilesetLayer)}).catch(d=>{console.error("数据加载失败",Y),G({tite:"【模型】"+Y+"数据加载失败",type:"error",id:P,url:B})})})}remove($){this.map.getLayer($,"modelId")&&(this.map.getLayer($,"modelId").closeHighlight(),this.map.removeLayer(this.map.getLayer($,"modelId")))}selected($,p=!0){return new Promise((J,G)=>{let m=this.map.getLayer($,"modelId");m?(p&&m.flyTo(),m.style==null&&m.openHighlight({color:"rgba(255,0,0,1)"},!0),J(m)):this.add($).then(P=>{P&&(p&&P.flyTo(),P.style==null&&P.openHighlight({color:"rgba(255,0,0,1)"},!0),J(P))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query($){return this.modelArr.length==0?!1:this.modelArr.find(p=>p.id==$)}postEditDate($){this.editDate={id:$}}editColor($,p,J="true"){let G=this.map.getLayer($,"modelId");if(this.postEditDate($),p)G.style={color:{conditions:[[J,p]]}};else{let m=this.query($).modelColor;m?G.style={color:{conditions:[[J,m]]}}:G.style=null}}editOpacity($,p){this.map.getLayer($,"modelId").opacity=p}addClip($){return new Promise((p,J)=>{window.bimClip?p(bimClip.clipModelAdd($)):J("挖洞工具未初始化")})}removeClip($){window.bimClip?window.bimClip.clipModelremoveClip($):console.log("挖洞工具未初始化")}}const Pl=T=>Object.prototype.toString.call(T)==="[object Object]";function Cl(){const T=Array.from(arguments);if(T.length<2)return T[0];let $=T[0];return T.shift(),T.forEach(p=>{if(Pl(p)){Pl($)||($={});for(let J in p)$[J]&&Pl(p[J])?$[J]=Cl($[J],p[J]):$[J]=p[J]}else p instanceof Array&&($ instanceof Array||($=[]),p.forEach((J,G)=>{Pl(J)?$[G]=Cl($[G]):$[G]=J}))}),$}let Qa={};const Wh=(T,$,p)=>{Qa={};let{vectorStyle:J,difference:G}=T;if(J){let{divType:m}=J,P="";if(m){let{theme_color:O,title:E,font_color:U,content:Y,scaleByDistance:H,scaleByDistance_far:K,scaleByDistance_farValue:B,scaleByDistance_near:q,scaleByDistance_nearValue:b,distanceDisplayCondition:A,distanceDisplayCondition_far:d,distanceDisplayCondition_near:g,clampToGround:M,divStyle:x}=J,{theme_color2:F,theme_color3:z}=x;switch(m){case"1":P=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${O};--theme-font-color1:${U};">
2573
+ `)},function(T){typeof module>"u"?window.charming=T:module.exports=T}(function(T,$){$=$||{};var p=$.tagName||"span",J=$.classPrefix!=null?$.classPrefix:"char",G=1,m=function(P){for(var O=P.parentNode,E=P.nodeValue,U=E.length,Y=-1;++Y<U;){var H=document.createElement(p);J&&(H.className=J+G,G++),H.appendChild(document.createTextNode(E[Y])),O.insertBefore(H,P)}O.removeChild(P)};return function P(O){for(var E=[].slice.call(O.childNodes),U=E.length,Y=-1;++Y<U;)P(E[Y]);O.nodeType===Node.TEXT_NODE&&m(O)}(T),T});class lc{constructor($,p=[]){mars3d?(this.map=$,this.tilesetLayer,this.modelArr=p,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel($){this.modelArr.push($)}add($,p){const J=new Map([["click",mars3d.EventType.click]]);return new Promise((G,m)=>{let P,O,E,U,Y,H,K,B,q;if(typeof $!="object"){let A=this.query($);A||m("缺少树结构");let{id:d,bimModelExcavationDetails:g,bimModel:M}=A;P=d,O=M.modelType,E=M.tender,U=M.releasedDistance,Y=M.modelName,H=M.isDynamicReleased,K={bimModelExcavationDetails:g},B=A.url,q=M.modelColor}else P=$.modelId,O=$.modelType,E=$.tender,U=$.releasedDistance,Y=$.modelTitle,H=$.permission,K=$.customize,B=$.url,q=$.color;let b=this.map.getLayer($,"modelId");if(b)return G(b),!1;if(B.indexOf("tileset.json")<0)return console.error("链接不完整",Y),G({tite:"【模型】"+Y+"数据地址有误",type:"error",id:P,url:B}),!1;new Cesium.Resource({url:B}).fetchJson().then(d=>{let g=null,M={enabled:!0,precise:!1},x=[];q&&(g={color:{conditions:[["true",q]]}}),window.bimClip&&window.bimClip.activeObj[P]&&(Object.keys(window.bimClip.activeObj[P]).forEach(F=>{let{item:z}=window.bimClip.activeObj[P][F],{bimModelExcavationDetails:W}=z,{excavationDetails:ht}=W;x.push({positions:JSON.parse(ht).excavationDetails,id:Number(F)})}),x.length>0&&(M.area=x)),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:P,modelType:O,tender:E,releasedDistance:U,modelTitle:Y,permission:H,customize:K,url:encodeURI(B),flat:{precise:!1},skipLevelOfDetail:!0,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:g,clip:M,cacheBytes:1073741824*2,maximumCacheOverflowBytes:2147483648*2}),this.tilesetLayer.bindPopup(F=>{if(F.graphic){const z=F.graphic.attr;let W=null,ht=null;return JSON.stringify(z)!=="{}"?(z.name&&(W=z.name.lastIndexOf("@")),W&&W>-1&&(ht=z.name.slice(0,W)),z.name?`&nbsp;&nbsp;<span>${ht||z.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${Y}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${Y}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${Y}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(F=>{console.log("加载完成",this.tilesetLayer,F),G(F);let{modelId:z}=F.options;F.clip.options.area.forEach(W=>{window.bimClip.activeObj[z][W.id].id==null&&(window.bimClip.activeObj[z][W.id].id=W.id)})}).catch(F=>{G()}),this.tilesetLayer.on("click",F=>{F.layer.style==null&&map.bimMapEdit=="0"&&F.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),p&&Object.keys(p).forEach(F=>{this.tilesetLayer.on(J.get(F),z=>{p[F](z)})}),O==0&&this.bimObliquePhotographyId.push(P),this.map.addLayer(this.tilesetLayer)}).catch(d=>{console.error("数据加载失败",Y),G({tite:"【模型】"+Y+"数据加载失败",type:"error",id:P,url:B})})})}remove($){this.map.getLayer($,"modelId")&&(this.map.getLayer($,"modelId").closeHighlight(),this.map.removeLayer(this.map.getLayer($,"modelId")))}selected($,p=!0){return new Promise((J,G)=>{let m=this.map.getLayer($,"modelId");m?(p&&m.flyTo(),m.style==null&&map.bimMapEdit=="0"&&m.openHighlight({color:"rgba(255,0,0,1)"},!0),J(m)):this.add($).then(P=>{P&&(p&&P.flyTo(),P.style==null&&map.bimMapEdit=="0"&&P.openHighlight({color:"rgba(255,0,0,1)"},!0),J(P))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query($){return this.modelArr.length==0?!1:this.modelArr.find(p=>p.id==$)}postEditDate($){this.editDate={id:$}}editColor($,p,J="true"){let G=this.map.getLayer($,"modelId");if(this.postEditDate($),p)G.style={color:{conditions:[[J,p]]}};else{let m=this.query($).modelColor;m?G.style={color:{conditions:[[J,m]]}}:G.style=null}}editOpacity($,p){this.map.getLayer($,"modelId").opacity=p}addClip($){return new Promise((p,J)=>{window.bimClip?p(bimClip.clipModelAdd($)):J("挖洞工具未初始化")})}removeClip($){window.bimClip?window.bimClip.clipModelremoveClip($):console.log("挖洞工具未初始化")}}const Pl=T=>Object.prototype.toString.call(T)==="[object Object]";function Cl(){const T=Array.from(arguments);if(T.length<2)return T[0];let $=T[0];return T.shift(),T.forEach(p=>{if(Pl(p)){Pl($)||($={});for(let J in p)$[J]&&Pl(p[J])?$[J]=Cl($[J],p[J]):$[J]=p[J]}else p instanceof Array&&($ instanceof Array||($=[]),p.forEach((J,G)=>{Pl(J)?$[G]=Cl($[G]):$[G]=J}))}),$}let Qa={};const Wh=(T,$,p)=>{Qa={};let{vectorStyle:J,difference:G}=T;if(J){let{divType:m}=J,P="";if(m){let{theme_color:O,title:E,font_color:U,content:Y,scaleByDistance:H,scaleByDistance_far:K,scaleByDistance_farValue:B,scaleByDistance_near:q,scaleByDistance_nearValue:b,distanceDisplayCondition:A,distanceDisplayCondition_far:d,distanceDisplayCondition_near:g,clampToGround:M,divStyle:x}=J,{theme_color2:F,theme_color3:z}=x;switch(m){case"1":P=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${O};--theme-font-color1:${U};">
2574
2574
  <div class="title">${E}</div>
2575
2575
  </div >`;break;case"2":P=`<div class="entity-div-style entity-div-style2" style="--theme-color1:${O};--theme-font-color1:${U};">
2576
2576
  <div class="title">${E}</div>
@@ -2634,7 +2634,7 @@ function print() { __p += __j.call(arguments, '') }
2634
2634
  `)+fe+`return __p
2635
2635
  }`;var Mi=Fu(function(){return Bi(at,Je+"return "+fe).apply(p,yt)});if(Mi.source=fe,Ch(Mi))throw Mi;return Mi}function am(r){return qi(r).toLowerCase()}function lm(r){return qi(r).toUpperCase()}function hm(r,a,u){if(r=qi(r),r&&(u||a===p))return Ss(r);if(!r||!(a=Ye(a)))return r;var _=qn(r),k=qn(a),at=xo(_,k),yt=Go(_,k)+1;return dn(_,at,yt).join("")}function um(r,a,u){if(r=qi(r),r&&(u||a===p))return r.slice(0,Es(r)+1);if(!r||!(a=Ye(a)))return r;var _=qn(r),k=Go(_,qn(a))+1;return dn(_,0,k).join("")}function cm(r,a,u){if(r=qi(r),r&&(u||a===p))return r.replace(Or,"");if(!r||!(a=Ye(a)))return r;var _=qn(r),k=xo(_,qn(a));return dn(_,k).join("")}function fm(r,a){var u=gt,_=Nt;if(mn(a)){var k="separator"in a?a.separator:k;u="length"in a?wi(a.length):u,_="omission"in a?Ye(a.omission):_}r=qi(r);var at=r.length;if(pr(r)){var yt=qn(r);at=yt.length}if(u>=at)return r;var St=u-br(_);if(St<1)return _;var Bt=yt?dn(yt,0,St).join(""):r.slice(0,St);if(k===p)return Bt+_;if(yt&&(St+=Bt.length-St),Lh(k)){if(r.slice(St).search(k)){var re,ae=Bt;for(k.global||(k=Gn(k.source,qi(Aa.exec(k))+"g")),k.lastIndex=0;re=k.exec(ae);)var fe=re.index;Bt=Bt.slice(0,fe===p?St:fe)}}else if(r.indexOf(Ye(k),St)!=St){var ze=Bt.lastIndexOf(k);ze>-1&&(Bt=Bt.slice(0,ze))}return Bt+_}function pm(r){return r=qi(r),r&&fo.test(r)?r.replace(Kr,Ba):r}var dm=De(function(r,a,u){return r+(u?" ":"")+a.toUpperCase()}),Oh=Me("toUpperCase");function Uu(r,a,u){return r=qi(r),a=u?p:a,a===p?Wo(r)?uh(r):Qs(r):r.match(a)||[]}var Fu=se(function(r,a){try{return nr(r,p,a)}catch(u){return Ch(u)?u:new ai(u)}}),mm=rs(function(r,a){return Yi(a,function(u){u=Lo(u),ao(r,u,Ah(r[u],r))}),r});function gm(r){var a=r==null?0:r.length,u=si();return r=a?Xi(r,function(_){if(typeof _[1]!="function")throw new Yn(P);return[u(_[0]),_[1]]}):[],se(function(_){for(var k=-1;++k<a;){var at=r[k];if(nr(at[0],this,_))return nr(at[1],this,_)}})}function vm(r){return Ns(sr(r,H))}function Dh(r){return function(){return r}}function ym(r,a){return r==null||r!==r?a:r}var _m=Li(),xm=Li(!0);function wr(r){return r}function zh(r){return C(typeof r=="function"?r:sr(r,H))}function wm(r){return mt(sr(r,H))}function Tm(r,a){return bt(r,sr(a,H))}var Mm=se(function(r,a){return function(u){return e(u,r,a)}}),Sm=se(function(r,a){return function(u){return e(r,u,a)}});function Bh(r,a,u){var _=Un(a),k=es(a,_);u==null&&!(mn(a)&&(k.length||!_.length))&&(u=a,a=r,r=this,k=es(a,Un(a)));var at=!(mn(u)&&"chain"in u)||!!u.chain,yt=ss(r);return Yi(k,function(St){var Bt=a[St];r[St]=Bt,yt&&(r.prototype[St]=function(){var re=this.__chain__;if(at||re){var ae=r(this.__wrapped__),fe=ae.__actions__=jn(this.__actions__);return fe.push({func:Bt,args:arguments,thisArg:r}),ae.__chain__=re,ae}return Bt.apply(r,Nr([this.value()],arguments))})}),r}function Em(){return un._===this&&(un._=Ar),this}function Nh(){}function bm(r){return r=wi(r),se(function(a){return V(a,r)})}var Am=Cn(Xi),Pm=Cn(ol),Cm=Cn(Qr);function Gu(r){return wh(r)?vo(Lo(r)):$t(r)}function Lm(r){return function(a){return r==null?p:Po(r,a)}}var Rm=Ml(),Im=Ml(!0);function kh(){return[]}function Uh(){return!1}function Om(){return{}}function Dm(){return""}function zm(){return!0}function Bm(r,a){if(r=wi(r),r<1||r>ge)return[];var u=Dt,_=Dn(r,Dt);a=si(a),r-=Dt;for(var k=eo(_,a);++u<r;)a(u);return k}function Nm(r){return vi(r)?Xi(r,Lo):Cr(r)?[r]:jn(au(qi(r)))}function km(r){var a=++Jn;return qi(r)+a}var Um=ar(function(r,a){return r+a},0),Fm=Za("ceil"),Gm=ar(function(r,a){return r/a},1),Hm=Za("floor");function Vm(r){return r&&r.length?qr(r,wr,Xa):p}function jm(r,a){return r&&r.length?qr(r,si(a,2),Xa):p}function Wm(r){return Ms(r,wr)}function Xm(r,a){return Ms(r,si(a,2))}function qm(r){return r&&r.length?qr(r,wr,et):p}function Ym(r,a){return r&&r.length?qr(r,si(a,2),et):p}var Zm=ar(function(r,a){return r*a},1),Jm=Za("round"),$m=ar(function(r,a){return r-a},0);function Km(r){return r&&r.length?_o(r,wr):0}function Qm(r,a){return r&&r.length?_o(r,si(a,2)):0}return Q.after=wp,Q.ary=yu,Q.assign=ld,Q.assignIn=Iu,Q.assignInWith=ah,Q.assignWith=hd,Q.at=ud,Q.before=_u,Q.bind=Ah,Q.bindAll=mm,Q.bindKey=xu,Q.castArray=Op,Q.chain=mu,Q.chunk=Gc,Q.compact=Hc,Q.concat=Vc,Q.cond=gm,Q.conforms=vm,Q.constant=Dh,Q.countBy=Kf,Q.create=cd,Q.curry=wu,Q.curryRight=Tu,Q.debounce=Mu,Q.defaults=fd,Q.defaultsDeep=pd,Q.defer=Tp,Q.delay=Mp,Q.difference=jc,Q.differenceBy=Wc,Q.differenceWith=Xc,Q.drop=qc,Q.dropRight=Yc,Q.dropRightWhile=Zc,Q.dropWhile=Jc,Q.fill=$c,Q.filter=tp,Q.flatMap=np,Q.flatMapDeep=rp,Q.flatMapDepth=op,Q.flatten=cu,Q.flattenDeep=Kc,Q.flattenDepth=Qc,Q.flip=Sp,Q.flow=_m,Q.flowRight=xm,Q.fromPairs=tf,Q.functions=xd,Q.functionsIn=wd,Q.groupBy=sp,Q.initial=nf,Q.intersection=rf,Q.intersectionBy=of,Q.intersectionWith=sf,Q.invert=Md,Q.invertBy=Sd,Q.invokeMap=lp,Q.iteratee=zh,Q.keyBy=hp,Q.keys=Un,Q.keysIn=xr,Q.map=eh,Q.mapKeys=bd,Q.mapValues=Ad,Q.matches=wm,Q.matchesProperty=Tm,Q.memoize=nh,Q.merge=Pd,Q.mergeWith=Ou,Q.method=Mm,Q.methodOf=Sm,Q.mixin=Bh,Q.negate=rh,Q.nthArg=bm,Q.omit=Cd,Q.omitBy=Ld,Q.once=Ep,Q.orderBy=up,Q.over=Am,Q.overArgs=bp,Q.overEvery=Pm,Q.overSome=Cm,Q.partial=Ph,Q.partialRight=Su,Q.partition=cp,Q.pick=Rd,Q.pickBy=Du,Q.property=Gu,Q.propertyOf=Lm,Q.pull=uf,Q.pullAll=pu,Q.pullAllBy=cf,Q.pullAllWith=ff,Q.pullAt=pf,Q.range=Rm,Q.rangeRight=Im,Q.rearg=Ap,Q.reject=dp,Q.remove=df,Q.rest=Pp,Q.reverse=Eh,Q.sampleSize=gp,Q.set=Od,Q.setWith=Dd,Q.shuffle=vp,Q.slice=mf,Q.sortBy=xp,Q.sortedUniq=Tf,Q.sortedUniqBy=Mf,Q.split=nm,Q.spread=Cp,Q.tail=Sf,Q.take=Ef,Q.takeRight=bf,Q.takeRightWhile=Af,Q.takeWhile=Pf,Q.tap=Vf,Q.throttle=Lp,Q.thru=th,Q.toArray=Cu,Q.toPairs=zu,Q.toPairsIn=Bu,Q.toPath=Nm,Q.toPlainObject=Ru,Q.transform=zd,Q.unary=Rp,Q.union=Cf,Q.unionBy=Lf,Q.unionWith=Rf,Q.uniq=If,Q.uniqBy=Of,Q.uniqWith=Df,Q.unset=Bd,Q.unzip=bh,Q.unzipWith=du,Q.update=Nd,Q.updateWith=kd,Q.values=Ka,Q.valuesIn=Ud,Q.without=zf,Q.words=Uu,Q.wrap=Ip,Q.xor=Bf,Q.xorBy=Nf,Q.xorWith=kf,Q.zip=Uf,Q.zipObject=Ff,Q.zipObjectDeep=Gf,Q.zipWith=Hf,Q.entries=zu,Q.entriesIn=Bu,Q.extend=Iu,Q.extendWith=ah,Bh(Q,Q),Q.add=Um,Q.attempt=Fu,Q.camelCase=Vd,Q.capitalize=Nu,Q.ceil=Fm,Q.clamp=Fd,Q.clone=Dp,Q.cloneDeep=Bp,Q.cloneDeepWith=Np,Q.cloneWith=zp,Q.conformsTo=kp,Q.deburr=ku,Q.defaultTo=ym,Q.divide=Gm,Q.endsWith=jd,Q.eq=uo,Q.escape=Wd,Q.escapeRegExp=Xd,Q.every=Qf,Q.find=ep,Q.findIndex=hu,Q.findKey=dd,Q.findLast=ip,Q.findLastIndex=uu,Q.findLastKey=md,Q.floor=Hm,Q.forEach=gu,Q.forEachRight=vu,Q.forIn=gd,Q.forInRight=vd,Q.forOwn=yd,Q.forOwnRight=_d,Q.get=Rh,Q.gt=Up,Q.gte=Fp,Q.has=Td,Q.hasIn=Ih,Q.head=fu,Q.identity=wr,Q.includes=ap,Q.indexOf=ef,Q.inRange=Gd,Q.invoke=Ed,Q.isArguments=Ma,Q.isArray=vi,Q.isArrayBuffer=Gp,Q.isArrayLike=_r,Q.isArrayLikeObject=bn,Q.isBoolean=Hp,Q.isBuffer=Hs,Q.isDate=Vp,Q.isElement=jp,Q.isEmpty=Wp,Q.isEqual=Xp,Q.isEqualWith=qp,Q.isError=Ch,Q.isFinite=Yp,Q.isFunction=ss,Q.isInteger=Eu,Q.isLength=oh,Q.isMap=bu,Q.isMatch=Zp,Q.isMatchWith=Jp,Q.isNaN=$p,Q.isNative=Kp,Q.isNil=td,Q.isNull=Qp,Q.isNumber=Au,Q.isObject=mn,Q.isObjectLike=Mn,Q.isPlainObject=Al,Q.isRegExp=Lh,Q.isSafeInteger=ed,Q.isSet=Pu,Q.isString=sh,Q.isSymbol=Cr,Q.isTypedArray=$a,Q.isUndefined=id,Q.isWeakMap=nd,Q.isWeakSet=rd,Q.join=af,Q.kebabCase=qd,Q.last=Jr,Q.lastIndexOf=lf,Q.lowerCase=Yd,Q.lowerFirst=Zd,Q.lt=od,Q.lte=sd,Q.max=Vm,Q.maxBy=jm,Q.mean=Wm,Q.meanBy=Xm,Q.min=qm,Q.minBy=Ym,Q.stubArray=kh,Q.stubFalse=Uh,Q.stubObject=Om,Q.stubString=Dm,Q.stubTrue=zm,Q.multiply=Zm,Q.nth=hf,Q.noConflict=Em,Q.noop=Nh,Q.now=ih,Q.pad=Jd,Q.padEnd=$d,Q.padStart=Kd,Q.parseInt=Qd,Q.random=Hd,Q.reduce=fp,Q.reduceRight=pp,Q.repeat=tm,Q.replace=em,Q.result=Id,Q.round=Jm,Q.runInContext=At,Q.sample=mp,Q.size=yp,Q.snakeCase=im,Q.some=_p,Q.sortedIndex=gf,Q.sortedIndexBy=vf,Q.sortedIndexOf=yf,Q.sortedLastIndex=_f,Q.sortedLastIndexBy=xf,Q.sortedLastIndexOf=wf,Q.startCase=rm,Q.startsWith=om,Q.subtract=$m,Q.sum=Km,Q.sumBy=Qm,Q.template=sm,Q.times=Bm,Q.toFinite=as,Q.toInteger=wi,Q.toLength=Lu,Q.toLower=am,Q.toNumber=$r,Q.toSafeInteger=ad,Q.toString=qi,Q.toUpper=lm,Q.trim=hm,Q.trimEnd=um,Q.trimStart=cm,Q.truncate=fm,Q.unescape=pm,Q.uniqueId=km,Q.upperCase=dm,Q.upperFirst=Oh,Q.each=gu,Q.eachRight=vu,Q.first=fu,Bh(Q,function(){var r={};return yr(Q,function(a,u){Ti.call(Q.prototype,u)||(r[u]=a)}),r}(),{chain:!1}),Q.VERSION=J,Yi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){Q[r].placeholder=Q}),Yi(["drop","take"],function(r,a){_i.prototype[r]=function(u){u=u===p?1:cn(wi(u),0);var _=this.__filtered__&&!a?new _i(this):this.clone();return _.__filtered__?_.__takeCount__=Dn(u,_.__takeCount__):_.__views__.push({size:Dn(u,Dt),type:r+(_.__dir__<0?"Right":"")}),_},_i.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Yi(["filter","map","takeWhile"],function(r,a){var u=a+1,_=u==D||u==Pt;_i.prototype[r]=function(k){var at=this.clone();return at.__iteratees__.push({iteratee:si(k,3),type:u}),at.__filtered__=at.__filtered__||_,at}}),Yi(["head","last"],function(r,a){var u="take"+(a?"Right":"");_i.prototype[r]=function(){return this[u](1).value()[0]}}),Yi(["initial","tail"],function(r,a){var u="drop"+(a?"":"Right");_i.prototype[r]=function(){return this.__filtered__?new _i(this):this[u](1)}}),_i.prototype.compact=function(){return this.filter(wr)},_i.prototype.find=function(r){return this.filter(r).head()},_i.prototype.findLast=function(r){return this.reverse().find(r)},_i.prototype.invokeMap=se(function(r,a){return typeof r=="function"?new _i(this):this.map(function(u){return e(u,r,a)})}),_i.prototype.reject=function(r){return this.filter(rh(si(r)))},_i.prototype.slice=function(r,a){r=wi(r);var u=this;return u.__filtered__&&(r>0||a<0)?new _i(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),a!==p&&(a=wi(a),u=a<0?u.dropRight(-a):u.take(a-r)),u)},_i.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},_i.prototype.toArray=function(){return this.take(Dt)},yr(_i.prototype,function(r,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),_=/^(?:head|last)$/.test(a),k=Q[_?"take"+(a=="last"?"Right":""):a],at=_||/^find/.test(a);k&&(Q.prototype[a]=function(){var yt=this.__wrapped__,St=_?[1]:arguments,Bt=yt instanceof _i,re=St[0],ae=Bt||vi(yt),fe=function(Ci){var Ni=k.apply(Q,Nr([Ci],St));return _&&ze?Ni[0]:Ni};ae&&u&&typeof re=="function"&&re.length!=1&&(Bt=ae=!1);var ze=this.__chain__,Je=!!this.__actions__.length,hi=at&&!ze,Mi=Bt&&!Je;if(!at&&ae){yt=Mi?yt:new _i(this);var ui=r.apply(yt,St);return ui.__actions__.push({func:th,args:[fe],thisArg:p}),new Bn(ui,ze)}return hi&&Mi?r.apply(this,St):(ui=this.thru(fe),hi?_?ui.value()[0]:ui.value():ui)})}),Yi(["pop","push","shift","sort","splice","unshift"],function(r){var a=Sn[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",_=/^(?:pop|shift)$/.test(r);Q.prototype[r]=function(){var k=arguments;if(_&&!this.__chain__){var at=this.value();return a.apply(vi(at)?at:[],k)}return this[u](function(yt){return a.apply(vi(yt)?yt:[],k)})}}),yr(_i.prototype,function(r,a){var u=Q[a];if(u){var _=u.name+"";Ti.call(So,_)||(So[_]=[]),So[_].push({name:a,func:u})}}),So[Zi(p,d).name]=[{name:"wrapper",func:p}],_i.prototype.clone=Is,_i.prototype.reverse=Fl,_i.prototype.value=Os,Q.prototype.at=jf,Q.prototype.chain=Wf,Q.prototype.commit=Xf,Q.prototype.next=qf,Q.prototype.plant=Zf,Q.prototype.reverse=Jf,Q.prototype.toJSON=Q.prototype.valueOf=Q.prototype.value=$f,Q.prototype.first=Q.prototype.head,Mo&&(Q.prototype[Mo]=Yf),Q},wo=ch();Sr?((Sr.exports=wo)._=wo,mo._=wo):un._=wo}).call(ur)}(Ll,Ll.exports);var hc=Ll.exports;const hh=lh(hc);class uc{constructor($,p=[]){Fh(this,"simplifyFunc",$=>{try{$=turf.simplify($,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return $});mars3d?(this.map=$,this.vectorArr=p,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""}):console.error("未引入指定插件")}remove($){this.map.removeLayer(this.map.getLayer($,"vectorId")),window.dynamicMasking.remove($)}add($,p){return new Promise((J,G)=>{let m;if(typeof $!="object"){let H=this.map.getLayer($,"vectorId");if(H)return J(H);m=this.query($)}else{let H=this.map.getLayer($.id,"vectorId");if(H)return J(H);m=$}let{value:P,url:O,id:E,title:U}=m;new Cesium.Resource({url:O}).fetchJson().then(H=>{let{id:K,title:B,shpInfo:q}=m,{attributes:b,geometryType:A,geometryCount:d,pointCount:g}=q,{width:M,materialType:x,materialOptions:F,clampToGround:z,distanceDisplayCondition:W,distanceDisplayCondition_near:ht,distanceDisplayCondition_far:ft,zIndex:gt,label:Nt,fill:lt,diffHeight:Et,outline:D,outlineStyle:zt,color:Pt,pixelSize:Rt,outlineColor:ge,outlineWidth:ue}=JSON.parse(b),Ft;switch(console.log("geometryType",A),Nt.color=Cesium.Color.fromCssColorString(Nt.color).withAlpha(0),Nt.outlineColor=Cesium.Color.fromCssColorString(Nt.outlineColor).withAlpha(.001),Nt.backgroundColor=Cesium.Color.fromCssColorString(Nt.backgroundColor).withAlpha(.001),Nt.background=!1,Nt.outline=!1,Nt.show=!1,A){case"LineString":case"MultiLineString":Nt.backgroundPadding=5,Ft=new mars3d.layer.GeoJsonLayer({data:H,vectorId:K,format:g>1e4?this.simplifyFunc:null,symbol:{type:"polylineC",styleOptions:{width:M,clampToGround:z,distanceDisplayCondition:W,distanceDisplayCondition_far:ft,distanceDisplayCondition_near:ht,materialType:x,materialOptions:F,label:Nt}},popup:`&nbsp;&nbsp; ${B} &nbsp;&nbsp;`,hasZIndex:!0,zIndex:gt});break;case"Polygon":case"MultiPolygon":console.log("attributes",x,F),x=="PolyGrass"&&(F={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Ft=new mars3d.layer.GeoJsonLayer({data:H,vectorId:K,format:g>1e4?this.simplifyFunc:null,symbol:{type:"polygon",styleOptions:{fill:lt,diffHeight:Et,clampToGround:z,materialType:x,materialOptions:F,distanceDisplayCondition:W,distanceDisplayCondition_far:ft,distanceDisplayCondition_near:ht,outlineStyle:zt,outline:D,label:Nt}},popup:`&nbsp;&nbsp; ${B} &nbsp;&nbsp;`});break;case"Point":case"MultiPoint":console.log(JSON.parse(b)),Ft=new mars3d.layer.GeoJsonLayer({data:H,vectorId:K,format:g>1e4?this.simplifyFunc:null,symbol:{type:"pointP",styleOptions:{color:Pt,pixelSize:Rt,outline:D,outlineColor:ge,outlineWidth:ue,visibleDepth:!1,label:Nt}}});break}window.map.addLayer(Ft),Ft.bindPopup(kt=>{console.log("event",kt)});let Dt=hh.debounce(kt=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(kt,JSON.parse(b))},500);Ft.readyPromise.then(kt=>{Dt(kt),J(kt)}).catch(kt=>{console.error("测试shp矢量加载失败",kt),J({tite:"【矢量】"+modelTitle+"加载失败",type:"error",id:modelId,url:O})})}).catch(H=>{console.error("数据有误",H),J({tite:"【矢量】"+modelTitle+"数据有误",type:"error",id:modelId,url:O})})})}updateData($){this.vectorArr=$}processingKML($){let p,J=2e3,G=!0,{kmlInfo:m}=$,{fill:P,areaColor:O,areaSideColor:E,transparency:U,isAreaSideColor:Y,minDistinct:H,textDistinct:K,textSize:B,textColor:q,fontStyle:b,outLine:A,sideColor:d,backGround:g,backGroundColor:M,clampToGround:x}=m;console.log("minDistinct",H);let F={fill:P,color:O,opacity:U||.5,outline:Y,outlineColor:E,outlineWidth:2,clampToGround:x,distanceDisplayCondition:!0,distanceDisplayCondition_far:K||1e6,distanceDisplayCondition_near:H||0,classificationType:p,opacity:String(U)},z={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:q||"#ffffff",font_family:b||"黑体",outline:A||!0,outlineColor:d||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:K||1e6,distanceDisplayCondition_near:H||0,background:g||!1,backgroundColor:M||"",visibleDepth:G,clampToGround:x||!1,disableDepthTestDistance:J};return{...F,label:z}}selected($){this.map.getLayer($,"vectorId").flyTo()}query($){return this.vectorArr.length==0?!1:this.vectorArr.find(p=>p.id==$)}editVector($,p,J){let G=this.map.getLayer($,"vectorId"),m=Wh(p,J);console.log("编辑数据",m),G&&(G.eachGraphic(P=>{P.label.show===!1&&(delete P.label.outline,delete P.label.background,delete P.label.outlineColor,delete P.label.backgroundColor),P.setStyle({...m})}),dynamicMasking.modify($,m))}nationalBoundaries(){let $="./gis/nationalBoundaries.json",p=new mars3d.layer.GeoJsonLayer({name:"国界",url:$,format:J=>{try{J=turf.simplify(J,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(G){console.error(G)}return J},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(p)}}class cc{constructor($,p=[]){mars3d?(this.map=$,this.terrainProviderArr=p,this.terrainProviderId="",this.events={},this.map.on(mars3d.EventType.terrainLoadError,J=>{console.error("地形服务加载失败",J),this.hide()}),this.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(J=>{this.map.viewer.scene.globe.tilesLoaded&&this.emit("load",J)})):console.error("未引入指定插件")}add($){let{url:p,id:J}=$;if(this.terrainProviderId==J&&this.map.terrainProvider._layers)return!1;this.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:J,type:"xyz",url:p,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=J}show(){this.map.hasTerrain=!0}hide(){this.map.hasTerrain=!1}on($,p){$=="load"?this.events[$]?this.events[$].push(p):this.events[$]=[p]:console.log("未开放自定义")}emit($,...p){this.events[$]!=null&&this.events[$].forEach(J=>J(...p))}off($,p){this.events[$]=this.events[$].filter(J=>J!==p)}once($,p){const J=()=>{p(),this.off($,J)};this.on($,J)}addClip($){return new Promise((p,J)=>{window.bimClip?p(bimClip.clipGisAdd($)):J("挖洞工具未初始化")})}}class fc{constructor($,p=[]){mars3d?(this.map=$,this.elevationImageArr=p,this.elevationImageLayer,this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1}):console.error("未引入指定插件")}pushVector($){this.elevationImageArr.push($)}add($,p){let J;if(typeof $!="object"?J=$:J=$.imageXyzId,this.map.getLayer(J,"imageXyzId"))return!1;const{layerOpacity:G,layerBrightness:m,layerContrast:P,layerHue:O,layerSaturation:E,layerGamma:U,surfaceOpacity:Y}=this.exposureEnvironmentSettings();return new Promise((H,K)=>{let B,q,b,A,d;if(typeof $!="object"){let g=this.query($);g||K("缺少树结构");let{gisInfo:M}=g;B=M.id,b=M.order,q=g.url,A=M.minLevel,d=M.maxLevel}else B=$.imageXyzId,q=$.url,b=$.zIndex,A=$.minimumLevel,d=$.maximumLevel;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:B,type:"xyz",url:q,hasZIndex:!0,zIndex:b.toString(),brightness:m,opacity:G,saturation:E,contrast:P,hue:O,gamma:U,alpha:Y,show:!0,minimumLevel:A||0,maximumLevel:d||15}),this.elevationImageLayer.on(mars3d.EventType.load,g=>{H(g)}),this.map.addLayer(this.elevationImageLayer),p&&Object.keys(p).forEach(g=>{this.elevationImageLayer.on(fnType.get(g),M=>{p[g](M)})})})}remove($){console.log($),this.map.removeLayer(this.map.getLayer($,"imageXyzId"))}query($){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(p=>p.id==$)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class pc{constructor($,p,...J){Fh(this,"manualFreed",hh.debounce(()=>{let{lng:$,lat:p,alt:J,pitch:G}=this.map.getCameraView(),m;this.modelArray.forEach(P=>{m=P.releasedDistance?P.releasedDistance:1e4,this.disTance([$,p,J],[P.center._lng,P.center._lat,P.center._alt],this.calculateDistance(G,m))?this.map.getLayer(P.id,"modelId")&&this.emit("leave",P):this.map.getLayer(P.id,"modelId")||this.emit("enter",P)})},200));mars3d?($&&$!=null&&(this.modelArray=$),this.showModelArray=[],p&&p!=null&&(this.map=p),this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on($,p){$=="enter"||$=="leave"?this.events[$]?this.events[$].push(p):this.events[$]=[p]:console.log("未开放自定义")}emit($,...p){this.events[$]!=null&&this.events[$].forEach(J=>J(...p))}off($,p){this.events[$]=this.events[$].filter(J=>J!==p)}once($,p){const J=()=>{p(),this.off($,J)};this.on($,J)}say($){return this[$]}add($,p){this[$].push(p)}remove($,p){this[$]=this[$].filter(function(J){return J!==p})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails($,p,J,G=[],m={}){let P,O,E;switch(P=this.modelArray.find(U=>U.modelId==$).customize.bimModelExcavationDetails,E=P.find((U,Y)=>{if(U.id==p)return O=Y,U}),J){case"delete":P.splice(O,1);break;case"update":E.excavationDetails=G;break;case"add":P.push(m);break;case"edit":E.excavationDetails=m.excavationDetails,E.kId=m.kId;break}return P}resourceRelease(){this.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:$}=this.map.getCameraView();$<2e4&&(this.freed=hh.throttle(()=>{let{lng:p,lat:J,alt:G,pitch:m}=this.map.getCameraView();this.modelArray&&this.modelArray.forEach(P=>{let O=P.bimModel.releasedDistance?P.bimModel.releasedDistance:1e4;P.center&&this.disTance([p,J,G],[P.center._lng,P.center._lat,P.center._alt],this.calculateDistance(m,O))?this.map.getLayer(P.id,"modelId")&&this.emit("leave",P):this.showModelArray.indexOf(P.id)>=0&&!this.map.getLayer(P.id,"modelId")&&this.emit("enter",P)})},2e3),this.freed())}findPnodeId($,p,J="id"){let G;if($){for(var m=0;m<$.length;m++){let P=$[m];if(P[J]==p)return G=P,G;if(P.children&&P.children.length>0&&(G=this.findPnodeId(P.children,p,J),G))return G}return G}}disTance($,p,J){let G,m,P;return G=Cesium.Cartesian3.fromDegrees(...$),m=Cesium.Cartesian3.fromDegrees(...p),P=Cesium.Cartesian3.distance(G,m),P>J}calculateDistance($,p){let J=($+180)%360-180;J=Math.max(-90,Math.min(J,90));let G=(p-p/5)*(Math.abs(J)/90)+p/5;return Math.round(G)}}class dc{constructor($,p=[],J){mars3d?(this.map=$,this.entityArr=p,this.entityLayer=$.getLayer("bimEntity","entityId"),this.entityItem=null,this.events={}):console.error("未引入指定插件")}on($,p){$=="change"?this.events[$]?this.events[$].push(p):this.events[$]=[p]:console.log("未开放自定义")}emit($,...p){this.events[$]!=null&&this.events[$].forEach(J=>J(...p))}off($,p){this.events[$]=this.events[$].filter(J=>J!==p)}once($,p){const J=()=>{p(),this.off($,J)};this.on($,J)}add($,p){return new Promise((J,G)=>{var m;if(this.entityLayer){let P,O,E;if(typeof $!="object"?(P=this.entityLayer.getGraphicByAttr($,"entityId"),O=this.query($),E=JSON.parse(O.bimPlanPainting.graphic),E.attr=E.attr||{},E.attr.entityId=E.attr.entityId||$):(P=this.entityLayer.getGraphicByAttr($.id,"entityId"),E=JSON.parse(JSON.stringify($)),E.attr=E.attr||{},E.attr.entityId=E.attr.entityId||p,E.attr==null?E.attr={entityId:$}:((m=E.attr)==null?void 0:m.entityId)==null&&p&&(E.attr.entityId=p)),P)return J();console.log(E),this.entityLayer.addGraphic(E),J(E)}else J(),console.error("未初始化标绘实例图层")})}query($){return this.entityArr.length==0?!1:this.entityArr.find(p=>p.id==$)}queryEntity($){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr($,"entityId")}selected($){let p=this.entityLayer.getGraphicByAttr($,"entityId");p._point&&p._point._alt>0?p.flyTo({radius:p._point._alt+500}):p.flyTo()}remove($){this.entityLayer.getGraphicByAttr($,"entityId")&&(this.entityLayer.getGraphicByAttr($,"entityId").remove(),this.entityItem&&this.entityItem.options.attr.entityId==$&&(this.entityItem=null))}removeEntityItem(){this.entityItem=null}updateData($){this.entityArr=$}startDrawGraphic($){let{type:p,style:J}=$;if(p=="div"){let{title:G,divType:m,theme_color:P,font_color:O,scaleByDistance:E,scaleByDistance_far:U,scaleByDistance_farValue:Y,scaleByDistance_near:H,scaleByDistance_nearValue:K,distanceDisplayCondition:B,distanceDisplayCondition_far:q,distanceDisplayCondition_near:b,clampToGround:A}=J,d={type:"div",style:{pointerEvents:!0,scaleByDistance:E,scaleByDistance_far:U,scaleByDistance_farValue:Y,scaleByDistance_near:H,scaleByDistance_nearValue:K,distanceDisplayCondition:B,distanceDisplayCondition_far:q,distanceDisplayCondition_near:b,clampToGround:A,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(m){case"1":d.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${P};--theme-font-color1:${O};">
2636
2636
  <div class="title">${G}</div>
2637
- </div>`,d.style.horizontalOrigin=Cesium.HorizontalOrigin.CENTER;break}this.entityLayer.startDraw(d).then(g=>{setTimeout(()=>{this.entityItem=g,this.entityLayer.startEditing(g)},500)})}else console.log($),this.entityLayer.startDraw($).then(G=>{setTimeout(()=>{this.entityItem=G,this.entityLayer.startEditing(G)},500)})}stopDraw(){this.entityLayer&&this.entityLayer.stopDraw(),this.entityItem&&(this.entityItem.stopEditing(),this.entityItem.remove(),this.entityItem=null)}updateEntityItem($){let p=this.entityLayer.getGraphicByAttr($,"entityId");p&&(this.entityItem=p)}edit($,p,J,G){let m=Wh(p,J);p.vectorStyle&&this.entityItem&&(console.log("edit",p.vectorStyle.divType,this.entityItem),p.vectorStyle.divType==5?this.entityItem.setStyle({...m,horizontalOrigin:Cesium.HorizontalOrigin.LEFT}):(console.log("newStyle",m),this.entityItem.setStyle({...m})))}enableDragging($=!0){$?this.entityLayer.startEditing(this.entityItem):(this.entityLayer.stopDraw(),this.entityItem&&this.entityItem.stopEditing())}addRightMenu(){this.entityLayer.bindContextMenu([{text:"编辑对象",callback:$=>{this.emit("change",$)}}])}removeRightMenu(){this.entityLayer.hasContextMenu()&&this.entityLayer.unbindContextMenu()}processDivData($){let p={"--theme-color1":"theme_color","--theme-font-color1":"font_color","--theme-color2":"theme_color2","--theme-color3":"theme_color3"},J={title:"",theme_color:"",font_color:"",content:"",divType:"",divStyle:{}};const G=document.createElement("div");G.innerHTML=$;const m=G.querySelector(".entity-div-style");return console.log("解耦",m),Object.keys(p).forEach(P=>{P=="--theme-color2"||P=="--theme-color3"?J.divStyle[p[P]]=m.style.getPropertyValue(P)||"#fff":J[p[P]]=m.style.getPropertyValue(P)}),J.title=m.querySelector(".title")?m.querySelector(".title").innerText:"标题",J.content=m.querySelector(".content")?m.querySelector(".content").innerText:"内容",J.divType=m.classList[1]?m.classList[1].replace("entity-div-style",""):"",J}updateHtml($,p){let{theme_color:J,font_color:G,title:m,content:P,divStyle:O}=p,{theme_color2:E,theme_color3:U}=O,Y="";switch($){case"1":Y=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${J};--theme-font-color1:${G};">
2637
+ </div>`,d.style.horizontalOrigin=Cesium.HorizontalOrigin.CENTER;break}this.entityLayer.startDraw(d).then(g=>{setTimeout(()=>{this.entityItem=g,this.entityLayer.startEditing(g)},500)})}else console.log($),this.entityLayer.startDraw($).then(G=>{setTimeout(()=>{this.entityItem=G,this.entityLayer.startEditing(G)},500)})}stopDraw($=!0){this.entityLayer&&this.entityLayer.stopDraw(),$&&this.entityItem&&(this.entityItem.stopEditing(),this.entityItem.remove(),this.entityItem=null)}updateEntityItem($){let p=this.entityLayer.getGraphicByAttr($,"entityId");p&&(this.entityItem=p)}edit($,p,J,G){let m=Wh(p,J);p.vectorStyle&&this.entityItem&&(console.log("edit",p.vectorStyle.divType,this.entityItem),p.vectorStyle.divType==5?this.entityItem.setStyle({...m,horizontalOrigin:Cesium.HorizontalOrigin.LEFT}):(console.log("newStyle",m),this.entityItem.setStyle({...m})))}enableDragging($=!0){$?this.entityLayer.startEditing(this.entityItem):(this.entityLayer.stopDraw(),this.entityItem&&this.entityItem.stopEditing())}addRightMenu(){this.entityLayer.bindContextMenu([{text:"编辑对象",callback:$=>{this.emit("change",$)}}])}removeRightMenu(){this.entityLayer.hasContextMenu()&&this.entityLayer.unbindContextMenu()}processDivData($){let p={"--theme-color1":"theme_color","--theme-font-color1":"font_color","--theme-color2":"theme_color2","--theme-color3":"theme_color3"},J={title:"",theme_color:"",font_color:"",content:"",divType:"",divStyle:{}};const G=document.createElement("div");G.innerHTML=$;const m=G.querySelector(".entity-div-style");return console.log("解耦",m),Object.keys(p).forEach(P=>{P=="--theme-color2"||P=="--theme-color3"?J.divStyle[p[P]]=m.style.getPropertyValue(P)||"#fff":J[p[P]]=m.style.getPropertyValue(P)}),J.title=m.querySelector(".title")?m.querySelector(".title").innerText:"标题",J.content=m.querySelector(".content")?m.querySelector(".content").innerText:"内容",J.divType=m.classList[1]?m.classList[1].replace("entity-div-style",""):"",J}updateHtml($,p){let{theme_color:J,font_color:G,title:m,content:P,divStyle:O}=p,{theme_color2:E,theme_color3:U}=O,Y="";switch($){case"1":Y=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${J};--theme-font-color1:${G};">
2638
2638
  <div class="title">${m}</div>
2639
2639
  </div>`;break;case"2":Y=`<div class="entity-div-style entity-div-style2" style="--theme-color1:${J};--theme-font-color1:${G};">
2640
2640
  <div class="title">${m}</div>