chbim-plugins 0.0.159 → 0.0.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/chbim-plugins.js CHANGED
@@ -20389,7 +20389,8 @@ class v1 {
20389
20389
  let K = null;
20390
20390
  L && (K = {
20391
20391
  color: { conditions: [["true", L]] }
20392
- }), this.tilesetLayer = new mars3d.layer.TilesetLayer({
20392
+ }), console.log(_), this.tilesetLayer = new mars3d.layer.TilesetLayer({
20393
+ // position: { lng: 117.096906, lat: 31.851564, alt: 10 },
20393
20394
  modelId: _,
20394
20395
  modelType: S,
20395
20396
  tender: b,
@@ -20412,11 +20413,39 @@ class v1 {
20412
20413
  maximumScreenSpaceError: C,
20413
20414
  cacheBytes: 1073741824,
20414
20415
  // 1024MB = 1024*1024*1024
20415
- maximumCacheOverflowBytes: R
20416
+ maximumCacheOverflowBytes: R,
20416
20417
  // 2048MB = 2048*1024*1024
20418
+ environmentMapManager: {
20419
+ enabled: !1
20420
+ }
20417
20421
  // classificationType: Cesium.ClassificationType.BOTH,
20418
20422
  // customShader: new Cesium.CustomShader({
20419
- // lightingModel: Cesium.LightingModel.UNLIT,
20423
+ // lightingModel: Cesium.LightingModel.PBR, // 使用PBR材质
20424
+ // uniforms: {
20425
+ // metallic: {
20426
+ // type: Cesium.UniformType.FLOAT,
20427
+ // value: 0.8, // 设置金属度
20428
+ // },
20429
+ // },
20430
+ // fragmentShaderText: `
20431
+ // void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
20432
+ // material.metallic = metallic; // 应用金属度
20433
+ // }
20434
+ // `,
20435
+ // }),
20436
+ // customShader: new Cesium.CustomShader({
20437
+ // lightingModel: Cesium.LightingModel.UNLIT, // 更改为 UNLIT
20438
+ // fragmentShaderText: `
20439
+ // void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
20440
+ // // material.diffuse += vec3(0.1, 0.1, 0.1); // 增加你自定义的效果
20441
+ // }
20442
+ // `,
20443
+ // fragmentShaderText: `
20444
+ // void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
20445
+ // {
20446
+ // material.diffuse = vec3(0.0, 0.0, 1.0);
20447
+ // material.diffuse.g = -fsInput.attributes.positionEC.z / 1.0e4;
20448
+ // } `,
20420
20449
  // }),
20421
20450
  }), this.tilesetLayer.bindPopup((Z) => {
20422
20451
  if (Z.graphic) {
@@ -20426,9 +20455,10 @@ class v1 {
20426
20455
  } else
20427
20456
  return `&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`;
20428
20457
  }), this.tilesetLayer.readyPromise.then((Z) => {
20429
- if (Z.layer.environmentMapManager.enabled = !1, (c == null ? void 0 : c.light) == !1) {
20458
+ if (Z.layer.environmentMapManager.enabled = !1, console.log("模型加载完成", Z), (c == null ? void 0 : c.light) == !1) {
20430
20459
  const ct = new Cesium.CustomShader({
20431
20460
  lightingModel: Cesium.LightingModel.UNLIT
20461
+ // 我需要自然光的效果
20432
20462
  });
20433
20463
  Z.layer.customShader = ct;
20434
20464
  }
@@ -30803,7 +30833,7 @@ const E1 = () => {
30803
30833
  let c = a[s].mockData, f = a[s - 1].mockData.item;
30804
30834
  const u = /* @__PURE__ */ new Map();
30805
30835
  f.forEach((m) => {
30806
- m.type != "rotatePoint" && m.type != "viewpoint" && m.type != "roaming" && m.type != "splitScreen" && m.type != "planClip" && m.type != "editor" ? u.set(`${m.screenplayId}-${m.type}`, m) : a[s].mockData.previousPage.push(m);
30836
+ m.type != "rotatePoint" && m.type != "viewpoint" && m.type != "roaming" && m.type != "splitScreen" && m.type != "planClip" && m.type != "editor" && m.type != "gltf" ? u.set(`${m.screenplayId}-${m.type}`, m) : a[s].mockData.previousPage.push(m);
30807
30837
  }), c.nextPage.forEach((m) => {
30808
30838
  const g = `${m.screenplayId}-${m.type}`;
30809
30839
  let _ = {
@@ -2570,7 +2570,7 @@ void main() {
2570
2570
  `},Bn={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}},Qr={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(L.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=di.euclideanModulo(e,1),i=di.clamp(i,0,1),n=di.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(d){d!==void 0&&1>parseFloat(d)&&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,l=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,o,l)}}}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=Qr[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),l=Math.min(e,i,n),d,p=(l+o)/2;if(l===o)l=d=0;else{var y=o-l;switch(l=.5>=p?y/(o+l):y/(2-o-l),o){case e:d=(i-n)/y+(i<n?6:0);break;case i:d=(n-e)/y+2;break;case n:d=(e-i)/y+4}d/=6}return t.h=d,t.s=l,t.l=p,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=di.lerp(t.h,e.h,n);var o=di.lerp(t.s,e.s,n);return n=di.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 L(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new m},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 s(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 L(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 L(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new m}},sprite:{diffuse:{value:new L(15658734)},opacity:{value:1},center:{value:new s(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new m}}},wo={basic:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.fog]),vertexShader:Ci.meshbasic_vert,fragmentShader:Ci.meshbasic_frag},lambert:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.fog,qe.lights,{emissive:{value:new L(0)}}]),vertexShader:Ci.meshlambert_vert,fragmentShader:Ci.meshlambert_frag},phong:{uniforms:Bn.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 L(0)},specular:{value:new L(1118481)},shininess:{value:30}}]),vertexShader:Ci.meshphong_vert,fragmentShader:Ci.meshphong_frag},standard:{uniforms:Bn.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 L(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Ci.meshphysical_vert,fragmentShader:Ci.meshphysical_frag},matcap:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,{matcap:{value:null}}]),vertexShader:Ci.meshmatcap_vert,fragmentShader:Ci.meshmatcap_frag},points:{uniforms:Bn.merge([qe.points,qe.fog]),vertexShader:Ci.points_vert,fragmentShader:Ci.points_frag},dashed:{uniforms:Bn.merge([qe.common,qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ci.linedashed_vert,fragmentShader:Ci.linedashed_frag},depth:{uniforms:Bn.merge([qe.common,qe.displacementmap]),vertexShader:Ci.depth_vert,fragmentShader:Ci.depth_frag},normal:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,{opacity:{value:1}}]),vertexShader:Ci.normal_vert,fragmentShader:Ci.normal_frag},sprite:{uniforms:Bn.merge([qe.sprite,qe.fog]),vertexShader:Ci.sprite_vert,fragmentShader:Ci.sprite_frag},background:{uniforms:{uvTransform:{value:new m},t2D:{value:null}},vertexShader:Ci.background_vert,fragmentShader:Ci.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ci.cube_vert,fragmentShader:Ci.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ci.equirect_vert,fragmentShader:Ci.equirect_frag},distanceRGBA:{uniforms:Bn.merge([qe.common,qe.displacementmap,{referencePosition:{value:new u},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ci.distanceRGBA_vert,fragmentShader:Ci.distanceRGBA_frag},shadow:{uniforms:Bn.merge([qe.lights,qe.fog,{color:{value:new L(0)},opacity:{value:1}}]),vertexShader:Ci.shadow_vert,fragmentShader:Ci.shadow_frag}};wo.physical={uniforms:Bn.merge([wo.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Ci.meshphysical_vert,fragmentShader:Ci.meshphysical_frag},Object.assign(R.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}}),C.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),C.DefaultOrder="XYZ",Object.defineProperties(C.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(C.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=di.clamp,o=t.elements;t=o[0];var l=o[4],d=o[8],p=o[1],y=o[5],w=o[9],A=o[2],P=o[6];return o=o[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(d,-1,1)),.99999>Math.abs(d)?(this._x=Math.atan2(-w,o),this._z=Math.atan2(-l,t)):(this._x=Math.atan2(P,y),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(w,-1,1)),.99999>Math.abs(w)?(this._y=Math.atan2(d,o),this._z=Math.atan2(p,y)):(this._y=Math.atan2(-A,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(P,-1,1)),.99999>Math.abs(P)?(this._y=Math.atan2(-A,o),this._z=Math.atan2(-l,y)):(this._y=0,this._z=Math.atan2(p,t))):e==="ZYX"?(this._y=Math.asin(-n(A,-1,1)),.99999>Math.abs(A)?(this._x=Math.atan2(P,o),this._z=Math.atan2(p,t)):(this._x=0,this._z=Math.atan2(-l,y))):e==="YZX"?(this._z=Math.asin(n(p,-1,1)),.99999>Math.abs(p)?(this._x=Math.atan2(-w,y),this._y=Math.atan2(-A,t)):(this._x=0,this._y=Math.atan2(d,o))):e==="XZY"?(this._z=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(P,y),this._y=Math.atan2(d,t)):(this._x=Math.atan2(-w,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 c;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 f;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 u(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(U.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 qc=0;N.DefaultUp=new u(0,1,0),N.DefaultMatrixAutoUpdate=!0,N.prototype=Object.assign(Object.create(a.prototype),{constructor:N,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 f;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new f;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new u(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new u(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new u(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new u;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new u(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new u(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new u(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new c;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new f,e=new c,i=new u,n=new u;return function(o,l,d){o.isVector3?i.copy(o):i.set(o,l,d),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 u),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new u,e=new u;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new f),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new u,e=new f;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new u),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 u),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(A,P){return A[P.uuid]===void 0&&(A[P.uuid]=P.toJSON(t)),P.uuid}function i(A){var P=[],B;for(B in A){var H=A[B];delete H.metadata,P.push(H)}return P}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 l={};if(l.uuid=this.uuid,l.type=this.type,this.name!==""&&(l.name=this.name),this.castShadow===!0&&(l.castShadow=!0),this.receiveShadow===!0&&(l.receiveShadow=!0),this.visible===!1&&(l.visible=!1),this.frustumCulled===!1&&(l.frustumCulled=!1),this.renderOrder!==0&&(l.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(l.userData=this.userData),l.layers=this.layers.mask,l.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(l.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){l.geometry=e(t.geometries,this.geometry);var d=this.geometry.parameters;if(d!==void 0&&d.shapes!==void 0)if(d=d.shapes,Array.isArray(d))for(var p=0,y=d.length;p<y;p++)e(t.shapes,d[p]);else e(t.shapes,d)}if(this.material!==void 0)if(Array.isArray(this.material)){for(d=[],p=0,y=this.material.length;p<y;p++)d.push(e(t.materials,this.material[p]));l.material=d}else l.material=e(t.materials,this.material);if(0<this.children.length)for(l.children=[],p=0;p<this.children.length;p++)l.children.push(this.children[p].toJSON(t).object);if(n){n=i(t.geometries),p=i(t.materials),y=i(t.textures);var w=i(t.images);d=i(t.shapes),0<n.length&&(o.geometries=n),0<p.length&&(o.materials=p),0<y.length&&(o.textures=y),0<w.length&&(o.images=w),0<d.length&&(o.shapes=d)}return o.object=l,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 Yc=0;X.prototype=Object.assign(Object.create(a.prototype),{constructor:X,isGeometry:!0,applyMatrix:function(t){for(var e=new m().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,l=t.vertexNormals.length;o<l;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 c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(q,$,rt,xt){var gt=p===void 0?[]:[i.colors[q].clone(),i.colors[$].clone(),i.colors[rt].clone()],Ct=d===void 0?[]:[new u().fromArray(d,3*q),new u().fromArray(d,3*$),new u().fromArray(d,3*rt)];xt=new R(q,$,rt,Ct,gt,xt),i.faces.push(xt),y!==void 0&&i.faceVertexUvs[0].push([new s().fromArray(y,2*q),new s().fromArray(y,2*$),new s().fromArray(y,2*rt)]),w!==void 0&&i.faceVertexUvs[1].push([new s().fromArray(w,2*q),new s().fromArray(w,2*$),new s().fromArray(w,2*rt)])}var i=this,n=t.index!==null?t.index.array:void 0,o=t.attributes,l=o.position.array,d=o.normal!==void 0?o.normal.array:void 0,p=o.color!==void 0?o.color.array:void 0,y=o.uv!==void 0?o.uv.array:void 0,w=o.uv2!==void 0?o.uv2.array:void 0;w!==void 0&&(this.faceVertexUvs[1]=[]);for(var A=o=0;o<l.length;o+=3,A+=2)i.vertices.push(new u().fromArray(l,o)),p!==void 0&&i.colors.push(new L().fromArray(p,o));var P=t.groups;if(0<P.length)for(o=0;o<P.length;o++){l=P[o];var B=l.start,H=l.count;for(A=B,B+=H;A<B;A+=3)n!==void 0?e(n[A],n[A+1],n[A+2],l.materialIndex):e(A,A+1,A+2,l.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<l.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 u;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 c;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 u,e=new u,i=0,n=this.faces.length;i<n;i++){var o=this.faces[i],l=this.vertices[o.a],d=this.vertices[o.b];t.subVectors(this.vertices[o.c],d),e.subVectors(l,d),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 u;if(t){var o=new u,l=new u;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var d=this.vertices[e.a],p=this.vertices[e.b],y=this.vertices[e.c];o.subVectors(y,p),l.subVectors(d,p),o.cross(l),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],d=e.vertexNormals,d.length===3?(d[0].copy(i[e.a]),d[1].copy(i[e.b]),d[2].copy(i[e.c])):(d[0]=i[e.a].clone(),d[1]=i[e.b].clone(),d[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 l=new X;for(l.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 d=this.morphNormals[o].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var p=new u,y={a:new u,b:new u,c:new u};n.push(p),d.push(y)}}for(d=this.morphNormals[o],l.vertices=this.morphTargets[o].vertices,l.computeFaceNormals(),l.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],p=d.faceNormals[i],y=d.vertexNormals[i],p.copy(n.normal),y.a.copy(n.vertexNormals[0]),y.b.copy(n.vertexNormals[1]),y.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 D),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,o=this.vertices.length,l=this.vertices,d=t.vertices,p=this.faces,y=t.faces,w=this.faceVertexUvs[0],A=t.faceVertexUvs[0],P=this.colors,B=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new m().getNormalMatrix(e)),t=0;for(var H=d.length;t<H;t++){var q=d[t].clone();e!==void 0&&q.applyMatrix4(e),l.push(q)}for(t=0,H=B.length;t<H;t++)P.push(B[t].clone());for(t=0,H=y.length;t<H;t++){d=y[t];var $=d.vertexNormals;for(B=d.vertexColors,P=new R(d.a+o,d.b+o,d.c+o),P.normal.copy(d.normal),n!==void 0&&P.normal.applyMatrix3(n).normalize(),e=0,l=$.length;e<l;e++)q=$[e].clone(),n!==void 0&&q.applyMatrix3(n).normalize(),P.vertexNormals.push(q);for(P.color.copy(d.color),e=0,l=B.length;e<l;e++)q=B[e],P.vertexColors.push(q.clone());P.materialIndex=d.materialIndex+i,p.push(P)}for(t=0,H=A.length;t<H;t++)if(i=A[t],n=[],i!==void 0){for(e=0,l=i.length;e<l;e++)n.push(i[e].clone());w.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,l=0;for(o=this.vertices.length;l<o;l++){var d=this.vertices[l];d=Math.round(d.x*n)+"_"+Math.round(d.y*n)+"_"+Math.round(d.z*n),t[d]===void 0?(t[d]=l,e.push(this.vertices[l]),i[l]=e.length-1):i[l]=i[t[d]]}for(t=[],l=0,o=this.faces.length;l<o;l++)for(n=this.faces[l],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],d=0;3>d;d++)if(n[d]===n[(d+1)%3]){t.push(l);break}for(l=t.length-1;0<=l;l--)for(n=t[l],this.faces.splice(n,1),i=0,o=this.faceVertexUvs.length;i<o;i++)this.faceVertexUvs[i].splice(n,1);return l=this.vertices.length-e.length,this.vertices=e,l},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new u(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(y,w){return y.materialIndex-w.materialIndex});var n=this.faceVertexUvs[0],o=this.faceVertexUvs[1],l,d;for(n&&n.length===e&&(l=[]),o&&o.length===e&&(d=[]),i=0;i<e;i++){var p=t[i]._id;l&&l.push(n[p]),d&&d.push(o[p])}l&&(this.faceVertexUvs[0]=l),d&&(this.faceVertexUvs[1]=d)},toJSON:function(){function t(Vt,J,ot){return ot?Vt|1<<J:Vt&~(1<<J)}function e(Vt){var J=Vt.x.toString()+Vt.y.toString()+Vt.z.toString();return w[J]!==void 0||(w[J]=y.length/3,y.push(Vt.x,Vt.y,Vt.z)),w[J]}function i(Vt){var J=Vt.r.toString()+Vt.g.toString()+Vt.b.toString();return P[J]!==void 0||(P[J]=A.length,A.push(Vt.getHex())),P[J]}function n(Vt){var J=Vt.x.toString()+Vt.y.toString();return H[J]!==void 0||(H[J]=B.length/2,B.push(Vt.x,Vt.y)),H[J]}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 l=this.parameters,d;for(d in l)l[d]!==void 0&&(o[d]=l[d]);return o}for(l=[],d=0;d<this.vertices.length;d++){var p=this.vertices[d];l.push(p.x,p.y,p.z)}p=[];var y=[],w={},A=[],P={},B=[],H={};for(d=0;d<this.faces.length;d++){var q=this.faces[d],$=this.faceVertexUvs[0][d]!==void 0,rt=0<q.normal.length(),xt=0<q.vertexNormals.length,gt=q.color.r!==1||q.color.g!==1||q.color.b!==1,Ct=0<q.vertexColors.length,wt=0;wt=t(wt,0,0),wt=t(wt,1,!0),wt=t(wt,2,!1),wt=t(wt,3,$),wt=t(wt,4,rt),wt=t(wt,5,xt),wt=t(wt,6,gt),wt=t(wt,7,Ct),p.push(wt),p.push(q.a,q.b,q.c),p.push(q.materialIndex),$&&($=this.faceVertexUvs[0][d],p.push(n($[0]),n($[1]),n($[2]))),rt&&p.push(e(q.normal)),xt&&(rt=q.vertexNormals,p.push(e(rt[0]),e(rt[1]),e(rt[2]))),gt&&p.push(i(q.color)),Ct&&(q=q.vertexColors,p.push(i(q[0]),i(q[1]),i(q[2])))}return o.data={},o.data.vertices=l,o.data.normals=y,0<A.length&&(o.data.colors=A),0<B.length&&(o.data.uvs=[B]),o.data.faces=p,o},clone:function(){return new X().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,l=0;for(e=o.length;l<e;l++)this.vertices.push(o[l].clone());for(o=t.colors,l=0,e=o.length;l<e;l++)this.colors.push(o[l].clone());for(o=t.faces,l=0,e=o.length;l<e;l++)this.faces.push(o[l].clone());for(l=0,e=t.faceVertexUvs.length;l<e;l++){var d=t.faceVertexUvs[l];for(this.faceVertexUvs[l]===void 0&&(this.faceVertexUvs[l]=[]),o=0,i=d.length;o<i;o++){var p=d[o],y=[],w=0;for(n=p.length;w<n;w++)y.push(p[w].clone());this.faceVertexUvs[l].push(y)}}for(w=t.morphTargets,l=0,e=w.length;l<e;l++){if(n={},n.name=w[l].name,w[l].vertices!==void 0)for(n.vertices=[],o=0,i=w[l].vertices.length;o<i;o++)n.vertices.push(w[l].vertices[o].clone());if(w[l].normals!==void 0)for(n.normals=[],o=0,i=w[l].normals.length;o<i;o++)n.normals.push(w[l].normals[o].clone());this.morphTargets.push(n)}for(w=t.morphNormals,l=0,e=w.length;l<e;l++){if(n={},w[l].vertexNormals!==void 0)for(n.vertexNormals=[],o=0,i=w[l].vertexNormals.length;o<i;o++)d=w[l].vertexNormals[o],p={},p.a=d.a.clone(),p.b=d.b.clone(),p.c=d.c.clone(),n.vertexNormals.push(p);if(w[l].faceNormals!==void 0)for(n.faceNormals=[],o=0,i=w[l].faceNormals.length;o<i;o++)n.faceNormals.push(w[l].faceNormals[o].clone());this.morphNormals.push(n)}for(o=t.skinWeights,l=0,e=o.length;l<e;l++)this.skinWeights.push(o[l].clone());for(o=t.skinIndices,l=0,e=o.length;l<e;l++)this.skinIndices.push(o[l].clone());for(o=t.lineDistances,l=0,e=o.length;l<e;l++)this.lineDistances.push(o[l]);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.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(K.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(K.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 l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),l=new L),e[i++]=l.r,e[i++]=l.g,e[i++]=l.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),l=new s),e[i++]=l.x,e[i++]=l.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),l=new u),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,o=t.length;n<o;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),l=new _),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z,e[i++]=l.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)}}),Z.prototype=Object.create(K.prototype),Z.prototype.constructor=Z,ct.prototype=Object.create(K.prototype),ct.prototype.constructor=ct,Rt.prototype=Object.create(K.prototype),Rt.prototype.constructor=Rt,tt.prototype=Object.create(K.prototype),tt.prototype.constructor=tt,_t.prototype=Object.create(K.prototype),_t.prototype.constructor=_t,G.prototype=Object.create(K.prototype),G.prototype.constructor=G,Pt.prototype=Object.create(K.prototype),Pt.prototype.constructor=Pt,Et.prototype=Object.create(K.prototype),Et.prototype.constructor=Et,At.prototype=Object.create(K.prototype),At.prototype.constructor=At,Object.assign(ce.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,l!==void 0&&(l.count=3*n-l.start,e.push(l));var l={start:3*n,materialIndex:i}}}l!==void 0&&(l.count=3*n-l.start,e.push(l)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,o=n[0]&&0<n[0].length,l=n[1]&&0<n[1].length,d=t.morphTargets,p=d.length;if(0<p){for(var y=[],w=0;w<p;w++)y[w]={name:d[w].name,data:[]};this.morphTargets.position=y}var A=t.morphNormals,P=A.length;if(0<P){var B=[];for(w=0;w<P;w++)B[w]={name:A[w].name,data:[]};this.morphTargets.normal=B}var H=t.skinIndices,q=t.skinWeights,$=H.length===i.length,rt=q.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),w=0;w<e.length;w++){var xt=e[w];this.vertices.push(i[xt.a],i[xt.b],i[xt.c]);var gt=xt.vertexNormals;for(gt.length===3?this.normals.push(gt[0],gt[1],gt[2]):(gt=xt.normal,this.normals.push(gt,gt,gt)),gt=xt.vertexColors,gt.length===3?this.colors.push(gt[0],gt[1],gt[2]):(gt=xt.color,this.colors.push(gt,gt,gt)),o===!0&&(gt=n[0][w],gt!==void 0?this.uvs.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",w),this.uvs.push(new s,new s,new s))),l===!0&&(gt=n[1][w],gt!==void 0?this.uvs2.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",w),this.uvs2.push(new s,new s,new s))),gt=0;gt<p;gt++){var Ct=d[gt].vertices;y[gt].data.push(Ct[xt.a],Ct[xt.b],Ct[xt.c])}for(gt=0;gt<P;gt++)Ct=A[gt].vertexNormals[w],B[gt].data.push(Ct.a,Ct.b,Ct.c);$&&this.skinIndices.push(H[xt.a],H[xt.b],H[xt.c]),rt&&this.skinWeights.push(q[xt.a],q[xt.b],q[xt.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 Zc=1;Ft.prototype=Object.assign(Object.create(a.prototype),{constructor:Ft,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<re(t)?Pt:_t)(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 K(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 m().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new u;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 Et(3*e.vertices.length,3);var i=new Et(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 Et(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 Et(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 ce().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new K(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new K(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new K(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new K(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new K(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],o=0,l=n.length;o<l;o++){var d=n[o],p=new Et(3*d.data.length,3);p.name=d.name,e.push(p.copyVector3sArray(d.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new Et(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new Et(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 u;return function(){this.boundingSphere===null&&(this.boundingSphere=new D);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var o=0,l=0,d=i.count;l<d;l++)e.x=i.getX(l),e.y=i.getY(l),e.z=i.getZ(l),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 K(new Float32Array(i.length),3));else for(var n=e.normal.array,o=0,l=n.length;o<l;o++)n[o]=0;n=e.normal.array;var d=new u,p=new u,y=new u,w=new u,A=new u;if(t){var P=t.array;for(o=0,l=t.count;o<l;o+=3){t=3*P[o+0];var B=3*P[o+1],H=3*P[o+2];d.fromArray(i,t),p.fromArray(i,B),y.fromArray(i,H),w.subVectors(y,p),A.subVectors(d,p),w.cross(A),n[t]+=w.x,n[t+1]+=w.y,n[t+2]+=w.z,n[B]+=w.x,n[B+1]+=w.y,n[B+2]+=w.z,n[H]+=w.x,n[H+1]+=w.y,n[H+2]+=w.z}}else for(o=0,l=i.length;o<l;o+=9)d.fromArray(i,o),p.fromArray(i,o+3),y.fromArray(i,o+6),w.subVectors(y,p),A.subVectors(d,p),w.cross(A),n[o]=w.x,n[o+1]=w.y,n[o+2]=w.z,n[o+3]=w.x,n[o+4]=w.y,n[o+5]=w.z,n[o+6]=w.x,n[o+7]=w.y,n[o+8]=w.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,l=t.attributes[n],d=l.array,p=0;for(l=l.itemSize*e;p<d.length;p++,l++)o[l]=d[p]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new u;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],l=o.array,d=o.itemSize,p=new l.constructor(e.length*d),y=0;o=0;for(var w=e.length;o<w;o++)for(var A=e[o]*d,P=0;P<d;P++)p[y++]=l[A++];t.addAttribute(n,new K(p,d))}for(e=this.groups,o=0,w=e.length;o<w;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(d in i)this.addAttribute(d,i[d].clone());var n=t.morphAttributes;for(d in n){var o=[],l=n[d];for(i=0,e=l.length;i<e;i++)o.push(l[i].clone());this.morphAttributes[d]=o}var d=t.groups;for(i=0,e=d.length;i<e;i++)n=d[i],this.addGroup(n.start,n.count,n.materialIndex);return d=t.boundingBox,d!==null&&(this.boundingBox=d.clone()),d=t.boundingSphere,d!==null&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),It.prototype=Object.create(X.prototype),It.prototype.constructor=It,Nt.prototype=Object.create(Ft.prototype),Nt.prototype.constructor=Nt,Pe.prototype=Object.create(X.prototype),Pe.prototype.constructor=Pe,pe.prototype=Object.create(Ft.prototype),pe.prototype.constructor=pe;var zu=0;Wt.prototype=Object.assign(Object.create(a.prototype),{constructor:Wt,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 l=[],d;for(d in o){var p=o[d];delete p.metadata,l.push(p)}return l}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"})}}),$e.prototype=Object.create(Wt.prototype),$e.prototype.constructor=$e,$e.prototype.isShaderMaterial=!0,$e.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Bn.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},$e.prototype.toJSON=function(t){var e=Wt.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(Si.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 u),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 u;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 u),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 u;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 u,e=new u,i=new u;return function(n,o,l,d){t.copy(n).add(o).multiplyScalar(.5),e.copy(o).sub(n).normalize(),i.copy(this.origin).sub(t);var p=.5*n.distanceTo(o),y=-this.direction.dot(e),w=i.dot(this.direction),A=-i.dot(e),P=i.lengthSq(),B=Math.abs(1-y*y);if(0<B){n=y*A-w,o=y*w-A;var H=p*B;0<=n?o>=-H?o<=H?(p=1/B,n*=p,o*=p,y=n*(n+y*o+2*w)+o*(y*n+o+2*A)+P):(o=p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P):(o=-p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P):o<=-H?(n=Math.max(0,-(-y*p+w)),o=0<n?-p:Math.min(Math.max(-p,-A),p),y=-n*n+o*(o+2*A)+P):o<=H?(n=0,o=Math.min(Math.max(-p,-A),p),y=o*(o+2*A)+P):(n=Math.max(0,-(y*p+w)),o=0<n?p:Math.min(Math.max(-p,-A),p),y=-n*n+o*(o+2*A)+P)}else o=0<y?-p:p,n=Math.max(0,-(y*o+w)),y=-n*n+o*(o+2*A)+P;return l&&l.copy(this.direction).multiplyScalar(n).add(this.origin),d&&d.copy(e).multiplyScalar(o).add(t),y}}(),intersectSphere:function(){var t=new u;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,l=this.origin;if(0<=i){var d=(t.min.x-l.x)*i;i*=t.max.x-l.x}else d=(t.max.x-l.x)*i,i*=t.min.x-l.x;if(0<=n){var p=(t.min.y-l.y)*n;n*=t.max.y-l.y}else p=(t.max.y-l.y)*n,n*=t.min.y-l.y;return d>n||p>i||((p>d||d!==d)&&(d=p),(n<i||i!==i)&&(i=n),0<=o?(p=(t.min.z-l.z)*o,t=(t.max.z-l.z)*o):(p=(t.max.z-l.z)*o,t=(t.min.z-l.z)*o),d>t||p>i)?null:((p>d||d!==d)&&(d=p),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=d?d:i,e))},intersectsBox:function(){var t=new u;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new u,e=new u,i=new u,n=new u;return function(o,l,d,p,y){if(e.subVectors(l,o),i.subVectors(d,o),n.crossVectors(e,i),l=this.direction.dot(n),0<l){if(p)return null;p=1}else if(0>l)p=-1,l=-l;else return null;return t.subVectors(this.origin,o),o=p*this.direction.dot(i.crossVectors(t,i)),0>o||(d=p*this.direction.dot(e.cross(t)),0>d||o+d>l)?null:(o=-p*t.dot(n),0>o?null:this.at(o/l,y))}}(),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(Oe,{getNormal:function(){var t=new u;return function(e,i,n,o){return o===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),o=new u),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 u,e=new u,i=new u;return function(n,o,l,d,p){t.subVectors(d,o),e.subVectors(l,o),i.subVectors(n,o),n=t.dot(t),o=t.dot(e),l=t.dot(i);var y=e.dot(e);d=e.dot(i);var w=n*y-o*o;return p===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),p=new u),w===0?p.set(-2,-1,-1):(w=1/w,y=(y*l-o*d)*w,n=(n*d-o*l)*w,p.set(1-y-n,n,y))}}(),containsPoint:function(){var t=new u;return function(e,i,n,o){return Oe.getBarycoord(e,i,n,o,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new u;return function(e,i,n,o,l,d,p,y){return this.getBarycoord(e,i,n,o,t),y.set(0,0),y.addScaledVector(l,t.x),y.addScaledVector(d,t.y),y.addScaledVector(p,t.z),y}}()}),Object.assign(Oe.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 u,e=new u;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 u),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Oe.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 u),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Oe.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Oe.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,o){return Oe.getUV(t,this.a,this.b,this.c,e,i,n,o)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new u,e=new u,i=new u,n=new u,o=new u,l=new u;return function(d,p){p===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),p=new u);var y=this.a,w=this.b,A=this.c;t.subVectors(w,y),e.subVectors(A,y),n.subVectors(d,y);var P=t.dot(n),B=e.dot(n);if(0>=P&&0>=B)return p.copy(y);o.subVectors(d,w);var H=t.dot(o),q=e.dot(o);if(0<=H&&q<=H)return p.copy(w);var $=P*q-H*B;if(0>=$&&0<=P&&0>=H)return w=P/(P-H),p.copy(y).addScaledVector(t,w);l.subVectors(d,A),d=t.dot(l);var rt=e.dot(l);return 0<=rt&&d<=rt?p.copy(A):(P=d*B-P*rt,0>=P&&0<=B&&0>=rt?($=B/(B-rt),p.copy(y).addScaledVector(e,$)):(B=H*rt-d*q,0>=B&&0<=q-H&&0<=d-rt?(i.subVectors(A,w),$=(q-H)/(q-H+(d-rt)),p.copy(w).addScaledVector(i,$)):(A=1/(B+P+$),w=P*A,$*=A,p.copy(y).addScaledVector(t,w).addScaledVector(e,$))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ge.prototype=Object.create(Wt.prototype),Ge.prototype.constructor=Ge,Ge.prototype.isMeshBasicMaterial=!0,Ge.prototype.copy=function(t){return Wt.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},pi.prototype=Object.assign(Object.create(N.prototype),{constructor:pi,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return N.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(rt,xt,gt,Ct,wt,Vt,J,ot){return(xt.side===1?Ct.intersectTriangle(J,Vt,wt,!0,ot):Ct.intersectTriangle(wt,Vt,J,xt.side!==2,ot))===null?null:($.copy(ot),$.applyMatrix4(rt.matrixWorld),xt=gt.ray.origin.distanceTo($),xt<gt.near||xt>gt.far?null:{distance:xt,point:$.clone(),object:rt})}function e(rt,xt,gt,Ct,wt,Vt,J,ot,zt){return l.fromBufferAttribute(wt,J),d.fromBufferAttribute(wt,ot),p.fromBufferAttribute(wt,zt),(rt=t(rt,xt,gt,Ct,l,d,p,q))&&(Vt&&(P.fromBufferAttribute(Vt,J),B.fromBufferAttribute(Vt,ot),H.fromBufferAttribute(Vt,zt),rt.uv=Oe.getUV(q,l,d,p,P,B,H,new s)),Vt=new R(J,ot,zt),Oe.getNormal(l,d,p,Vt.normal),rt.face=Vt),rt}var i=new c,n=new Si,o=new D,l=new u,d=new u,p=new u,y=new u,w=new u,A=new u,P=new s,B=new s,H=new s,q=new u,$=new u;return function(rt,xt){var gt=this.geometry,Ct=this.material,wt=this.matrixWorld;if(Ct!==void 0&&(gt.boundingSphere===null&&gt.computeBoundingSphere(),o.copy(gt.boundingSphere),o.applyMatrix4(wt),rt.ray.intersectsSphere(o)!==!1&&(i.getInverse(wt),n.copy(rt.ray).applyMatrix4(i),gt.boundingBox===null||n.intersectsBox(gt.boundingBox)!==!1))){if(gt.isBufferGeometry){var Vt=gt.index,J=gt.attributes.position,ot=gt.attributes.uv,zt=gt.groups;gt=gt.drawRange;var ee;if(Vt!==null)if(Array.isArray(Ct)){var $t=0;for(ee=zt.length;$t<ee;$t++){var Yt=zt[$t],Te=Ct[Yt.materialIndex];wt=Math.max(Yt.start,gt.start);var me=Math.min(Yt.start+Yt.count,gt.start+gt.count);for(Yt=wt;Yt<me;Yt+=3){wt=Vt.getX(Yt);var De=Vt.getX(Yt+1),be=Vt.getX(Yt+2);(wt=e(this,Te,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor(Yt/3),xt.push(wt))}}}else for(wt=Math.max(0,gt.start),me=Math.min(Vt.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=Vt.getX($t),De=Vt.getX($t+1),be=Vt.getX($t+2),(wt=e(this,Ct,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt));else if(J!==void 0)if(Array.isArray(Ct))for($t=0,ee=zt.length;$t<ee;$t++)for(Yt=zt[$t],Te=Ct[Yt.materialIndex],wt=Math.max(Yt.start,gt.start),me=Math.min(Yt.start+Yt.count,gt.start+gt.count),Yt=wt;Yt<me;Yt+=3)wt=Yt,De=Yt+1,be=Yt+2,(wt=e(this,Te,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor(Yt/3),xt.push(wt));else for(wt=Math.max(0,gt.start),me=Math.min(J.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=$t,De=$t+1,be=$t+2,(wt=e(this,Ct,rt,n,J,ot,wt,De,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt))}else if(gt.isGeometry){for(J=Array.isArray(Ct),ot=gt.vertices,zt=gt.faces,wt=gt.faceVertexUvs[0],0<wt.length&&(Vt=wt),Yt=0,me=zt.length;Yt<me;Yt++)if(De=zt[Yt],wt=J?Ct[De.materialIndex]:Ct,wt!==void 0){if($t=ot[De.a],ee=ot[De.b],Te=ot[De.c],wt.morphTargets===!0){be=gt.morphTargets;var ae=this.morphTargetInfluences;l.set(0,0,0),d.set(0,0,0),p.set(0,0,0);for(var We=0,Qe=be.length;We<Qe;We++){var fi=ae[We];if(fi!==0){var Cn=be[We].vertices;l.addScaledVector(y.subVectors(Cn[De.a],$t),fi),d.addScaledVector(w.subVectors(Cn[De.b],ee),fi),p.addScaledVector(A.subVectors(Cn[De.c],Te),fi)}}l.add($t),d.add(ee),p.add(Te),$t=l,ee=d,Te=p}(wt=t(this,wt,rt,n,$t,ee,Te,q))&&(Vt&&Vt[Yt]&&(be=Vt[Yt],P.copy(be[0]),B.copy(be[1]),H.copy(be[2]),wt.uv=Oe.getUV(q,$t,ee,Te,P,B,H,new s)),wt.face=De,wt.faceIndex=Yt,xt.push(wt))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),z.prototype=Object.create(g.prototype),z.prototype.constructor=z,z.prototype.isCubeTexture=!0,Object.defineProperty(z.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),Q.prototype=Object.create(g.prototype),Q.prototype.constructor=Q,Q.prototype.isDataTexture3D=!0;var qh=new g,Jc=new Q,ku=new z,ah=[],La=[],Tl=new Float32Array(16),Bu=new Float32Array(9),Yh=new Float32Array(4);oa.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),vt(e,t)},Ja.prototype.setValue=function(t,e,i){for(var n=this.seq,o=0,l=n.length;o!==l;++o){var d=n[o];d.setValue(t,e[d.id],i)}};var Zh=/([\w\d_]+)(\])?(\[|\.)?/g;ho.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},ho.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},ho.upload=function(t,e,i,n){for(var o=0,l=e.length;o!==l;++o){var d=e[o],p=i[d.id];p.needsUpdate!==!1&&d.setValue(t,p.value,n)}},ho.seqWithValue=function(t,e){for(var i=[],n=0,o=t.length;n!==o;++n){var l=t[n];l.id in e&&i.push(l)}return i};var Bo=0,Jh=0;se.prototype=Object.create(Wt.prototype),se.prototype.constructor=se,se.prototype.isMeshDepthMaterial=!0,se.prototype.copy=function(t){return Wt.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(Wt.prototype),te.prototype.constructor=te,te.prototype.isMeshDistanceMaterial=!0,te.prototype.copy=function(t){return Wt.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(N.prototype),{constructor:ci,isGroup:!0}),Be.prototype=Object.assign(Object.create(N.prototype),{constructor:Be,isCamera:!0,copy:function(t,e){return N.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 u),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){N.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),_e.prototype=Object.assign(Object.create(Be.prototype),{constructor:_e,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*di.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*di.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*di.RAD2DEG*Math.atan(Math.tan(.5*di.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,l){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=l,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*di.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,o=-.5*n,l=this.view;if(this.view!==null&&this.view.enabled){var d=l.fullWidth,p=l.fullHeight;o+=l.offsetX*n/d,e-=l.offsetY*i/p,n*=l.width/d,i*=l.height/p}l=this.filmOffset,l!==0&&(o+=t*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=N.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}}),Fe.prototype=Object.assign(Object.create(_e.prototype),{constructor:Fe,isArrayCamera:!0});var as=new u,wr=new u;Re.prototype.isFogExp2=!0,Re.prototype.clone=function(){return new Re(this.color,this.density)},Re.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Sn.prototype.isFog=!0,Sn.prototype.clone=function(){return new Sn(this.color,this.near,this.far)},Sn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Xn.prototype=Object.assign(Object.create(N.prototype),{constructor:Xn,copy:function(t,e){return N.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=N.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(ki.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(ki.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(Bi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Bi.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}}),Hi.prototype=Object.create(Wt.prototype),Hi.prototype.constructor=Hi,Hi.prototype.isSpriteMaterial=!0,Hi.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Ra;nn.prototype=Object.assign(Object.create(N.prototype),{constructor:nn,isSprite:!0,raycast:function(){function t(H,q,$,rt,xt,gt){o.subVectors(H,$).addScalar(.5).multiply(rt),xt!==void 0?(l.x=gt*o.x-xt*o.y,l.y=xt*o.x+gt*o.y):l.copy(o),H.copy(q),H.x+=l.x,H.y+=l.y,H.applyMatrix4(d)}var e=new u,i=new u,n=new u,o=new s,l=new s,d=new c,p=new u,y=new u,w=new u,A=new s,P=new s,B=new s;return function(H,q){i.setFromMatrixScale(this.matrixWorld),d.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var $=this.material.rotation;if($!==0)var rt=Math.cos($),xt=Math.sin($);$=this.center,t(p.set(-.5,-.5,0),n,$,i,xt,rt),t(y.set(.5,-.5,0),n,$,i,xt,rt),t(w.set(.5,.5,0),n,$,i,xt,rt),A.set(0,0),P.set(1,0),B.set(1,1);var gt=H.ray.intersectTriangle(p,y,w,!1,e);gt===null&&(t(y.set(-.5,.5,0),n,$,i,xt,rt),P.set(0,1),gt=H.ray.intersectTriangle(p,w,y,!1,e),gt===null)||(xt=H.ray.origin.distanceTo(e),xt<H.near||xt>H.far||q.push({distance:xt,point:e.clone(),uv:Oe.getUV(e,p,y,w,A,P,B,new s),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return N.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),rn.prototype=Object.assign(Object.create(N.prototype),{constructor:rn,copy:function(t){N.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 u;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 u,e=new u;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,l=n.length;o<l&&i>=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;o<l;o++)n[o].object.visible=!1}}}(),toJSON:function(t){t=N.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(un.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new c;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 c,e=new c;return function(){for(var i=this.bones,n=this.boneInverses,o=this.boneMatrices,l=this.boneTexture,d=0,p=i.length;d<p;d++)t.multiplyMatrices(i[d]?i[d].matrixWorld:e,n[d]),t.toArray(o,16*d);l!==void 0&&(l.needsUpdate=!0)}}(),clone:function(){return new un(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}}}),cn.prototype=Object.assign(Object.create(N.prototype),{constructor:cn,isBone:!0}),Gi.prototype=Object.assign(Object.create(pi.prototype),{constructor:Gi,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 cn;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 _;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){pi.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)}}),Ni.prototype=Object.create(Wt.prototype),Ni.prototype.constructor=Ni,Ni.prototype.isLineBasicMaterial=!0,Ni.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},ji.prototype=Object.assign(Object.create(N.prototype),{constructor:ji,isLine:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[0],l=1,d=n.count;l<d;l++)t.fromBufferAttribute(n,l-1),e.fromBufferAttribute(n,l),o[l]=o[l-1],o[l]+=t.distanceTo(e);i.addAttribute("lineDistance",new Et(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,l=1,d=n.length;l<d;l++)o[l]=o[l-1],o[l]+=n[l-1].distanceTo(n[l]);return this}}(),raycast:function(){var t=new c,e=new Si,i=new D;return function(n,o){var l=n.linePrecision,d=this.geometry,p=this.matrixWorld;if(d.boundingSphere===null&&d.computeBoundingSphere(),i.copy(d.boundingSphere),i.applyMatrix4(p),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(p),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3,l*=l;var y=new u,w=new u;p=new u;var A=new u,P=this&&this.isLineSegments?2:1;if(d.isBufferGeometry){var B=d.index,H=d.attributes.position.array;if(B!==null){B=B.array,d=0;for(var q=B.length-1;d<q;d+=P){var $=B[d+1];y.fromArray(H,3*B[d]),w.fromArray(H,3*$),$=e.distanceSqToSegment(y,w,A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}}else for(d=0,q=H.length/3-1;d<q;d+=P)y.fromArray(H,3*d),w.fromArray(H,3*d+3),$=e.distanceSqToSegment(y,w,A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}else if(d.isGeometry)for(y=d.vertices,w=y.length,d=0;d<w-1;d+=P)$=e.distanceSqToSegment(y[d],y[d+1],A,p),$>l||(A.applyMatrix4(this.matrixWorld),$=n.ray.origin.distanceTo(A),$<n.near||$>n.far||o.push({distance:$,point:p.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return N.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(ji.prototype),{constructor:gi,isLineSegments:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,o=[],l=0,d=n.count;l<d;l+=2)t.fromBufferAttribute(n,l),e.fromBufferAttribute(n,l+1),o[l]=l===0?0:o[l-1],o[l+1]=o[l]+t.distanceTo(e);i.addAttribute("lineDistance",new Et(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,l=0,d=n.length;l<d;l+=2)t.copy(n[l]),e.copy(n[l+1]),o[l]=l===0?0:o[l-1],o[l+1]=o[l]+t.distanceTo(e);return this}}()}),co.prototype=Object.assign(Object.create(ji.prototype),{constructor:co,isLineLoop:!0}),Fn.prototype=Object.create(Wt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.isPointsMaterial=!0,Fn.prototype.copy=function(t){return Wt.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},la.prototype=Object.assign(Object.create(N.prototype),{constructor:la,isPoints:!0,raycast:function(){var t=new c,e=new Si,i=new D;return function(n,o){function l(rt,xt){var gt=e.distanceSqToPoint(rt);gt<A&&(e.closestPointToPoint(rt,P),P.applyMatrix4(y),rt=n.ray.origin.distanceTo(P),rt<n.near||rt>n.far||o.push({distance:rt,distanceToRay:Math.sqrt(gt),point:P.clone(),index:xt,face:null,object:d}))}var d=this,p=this.geometry,y=this.matrixWorld,w=n.params.Points.threshold;if(p.boundingSphere===null&&p.computeBoundingSphere(),i.copy(p.boundingSphere),i.applyMatrix4(y),i.radius+=w,n.ray.intersectsSphere(i)!==!1){t.getInverse(y),e.copy(n.ray).applyMatrix4(t),w/=(this.scale.x+this.scale.y+this.scale.z)/3;var A=w*w;w=new u;var P=new u;if(p.isBufferGeometry){var B=p.index;if(p=p.attributes.position.array,B!==null){var H=B.array;B=0;for(var q=H.length;B<q;B++){var $=H[B];w.fromArray(p,3*$),l(w,$)}}else for(B=0,H=p.length/3;B<H;B++)w.fromArray(p,3*B),l(w,B)}else for(w=p.vertices,B=0,H=w.length;B<H;B++)l(w[B],B)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),zh.prototype=Object.assign(Object.create(g.prototype),{constructor:zh,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Yo.prototype=Object.create(g.prototype),Yo.prototype.constructor=Yo,Yo.prototype.isCompressedTexture=!0,Ka.prototype=Object.create(g.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isCanvasTexture=!0,Qa.prototype=Object.create(g.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isDepthTexture=!0,ha.prototype=Object.create(Ft.prototype),ha.prototype.constructor=ha,tl.prototype=Object.create(X.prototype),tl.prototype.constructor=tl,ua.prototype=Object.create(Ft.prototype),ua.prototype.constructor=ua,Xi.prototype=Object.create(X.prototype),Xi.prototype.constructor=Xi,xi.prototype=Object.create(Ft.prototype),xi.prototype.constructor=xi,el.prototype=Object.create(X.prototype),el.prototype.constructor=el,ca.prototype=Object.create(xi.prototype),ca.prototype.constructor=ca,il.prototype=Object.create(X.prototype),il.prototype.constructor=il,_s.prototype=Object.create(xi.prototype),_s.prototype.constructor=_s,nl.prototype=Object.create(X.prototype),nl.prototype.constructor=nl,fa.prototype=Object.create(xi.prototype),fa.prototype.constructor=fa,da.prototype=Object.create(X.prototype),da.prototype.constructor=da,pa.prototype=Object.create(xi.prototype),pa.prototype.constructor=pa,gn.prototype=Object.create(X.prototype),gn.prototype.constructor=gn,Zo.prototype=Object.create(Ft.prototype),Zo.prototype.constructor=Zo,Zr.prototype=Object.create(X.prototype),Zr.prototype.constructor=Zr,xs.prototype=Object.create(Ft.prototype),xs.prototype.constructor=xs,ws.prototype=Object.create(X.prototype),ws.prototype.constructor=ws,Un.prototype=Object.create(Ft.prototype),Un.prototype.constructor=Un;var Nu={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,o=n?e[0]*i:t.length,l=kh(t,0,o,i,!0),d=[];if(!l)return d;var p;if(n){var y=i;n=[];var w,A=0;for(w=e.length;A<w;A++){var P=e[A]*y,B=A<w-1?e[A+1]*y:t.length;P=kh(t,P,B,y,!1),P===P.next&&(P.steiner=!0),n.push(yr(P))}for(n.sort(Su),A=0;A<n.length;A++)e=n[A],y=l,(y=Eu(e,y))&&(e=rl(y,e),ma(e,e.next)),l=ma(l,l.next)}if(t.length>80*i){var H=p=t[0],q=n=t[1];for(y=i;y<o;y+=i)A=t[y],e=t[y+1],A<H&&(H=A),e<q&&(q=e),A>p&&(p=A),e>n&&(n=e);p=Math.max(p-H,n-q),p=p!==0?1/p:0}return ga(l,d,i,H,q,p),d}},To={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>To.area(t)},triangulateShape:function(t,e){var i=[],n=[],o=[];$l(t),bu(i,t);var l=t.length;for(e.forEach($l),t=0;t<e.length;t++)n.push(l),l+=e[t].length,bu(i,e[t]);for(e=Nu.triangulate(i,n),t=0;t<e.length;t+=3)o.push(e.slice(t,t+3));return o}};Po.prototype=Object.create(X.prototype),Po.prototype.constructor=Po,Po.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Cu(this.parameters.shapes,this.parameters.options,t)},po.prototype=Object.create(Ft.prototype),po.prototype.constructor=po,po.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Cu(this.parameters.shapes,this.parameters.options,t)};var Ml={generateTopUV:function(t,e,i,n,o){t=e[3*n],n=e[3*n+1];var l=e[3*o];return o=e[3*o+1],[new s(e[3*i],e[3*i+1]),new s(t,n),new s(l,o)]},generateSideWallUV:function(t,e,i,n,o,l){t=e[3*i];var d=e[3*i+1];i=e[3*i+2];var p=e[3*n],y=e[3*n+1];n=e[3*n+2];var w=e[3*o],A=e[3*o+1];o=e[3*o+2];var P=e[3*l],B=e[3*l+1];return e=e[3*l+2],.01>Math.abs(d-y)?[new s(t,1-i),new s(p,1-n),new s(w,1-o),new s(P,1-e)]:[new s(d,1-i),new s(y,1-n),new s(A,1-o),new s(B,1-e)]}};ol.prototype=Object.create(X.prototype),ol.prototype.constructor=ol,Ms.prototype=Object.create(po.prototype),Ms.prototype.constructor=Ms,Jo.prototype=Object.create(X.prototype),Jo.prototype.constructor=Jo,Or.prototype=Object.create(Ft.prototype),Or.prototype.constructor=Or,sl.prototype=Object.create(X.prototype),sl.prototype.constructor=sl,Ss.prototype=Object.create(Ft.prototype),Ss.prototype.constructor=Ss,va.prototype=Object.create(X.prototype),va.prototype.constructor=va,$o.prototype=Object.create(Ft.prototype),$o.prototype.constructor=$o,Lo.prototype=Object.create(X.prototype),Lo.prototype.constructor=Lo,Lo.prototype.toJSON=function(){var t=X.prototype.toJSON.call(this);return Au(this.parameters.shapes,t)},Ko.prototype=Object.create(Ft.prototype),Ko.prototype.constructor=Ko,Ko.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Au(this.parameters.shapes,t)},Qo.prototype=Object.create(Ft.prototype),Qo.prototype.constructor=Qo,Ro.prototype=Object.create(X.prototype),Ro.prototype.constructor=Ro,Oo.prototype=Object.create(Ft.prototype),Oo.prototype.constructor=Oo,ya.prototype=Object.create(Ro.prototype),ya.prototype.constructor=ya,Gn.prototype=Object.create(Oo.prototype),Gn.prototype.constructor=Gn,Es.prototype=Object.create(X.prototype),Es.prototype.constructor=Es,mo.prototype=Object.create(Ft.prototype),mo.prototype.constructor=mo;var yn=Object.freeze({WireframeGeometry:ha,ParametricGeometry:tl,ParametricBufferGeometry:ua,TetrahedronGeometry:el,TetrahedronBufferGeometry:ca,OctahedronGeometry:il,OctahedronBufferGeometry:_s,IcosahedronGeometry:nl,IcosahedronBufferGeometry:fa,DodecahedronGeometry:da,DodecahedronBufferGeometry:pa,PolyhedronGeometry:Xi,PolyhedronBufferGeometry:xi,TubeGeometry:gn,TubeBufferGeometry:Zo,TorusKnotGeometry:Zr,TorusKnotBufferGeometry:xs,TorusGeometry:ws,TorusBufferGeometry:Un,TextGeometry:ol,TextBufferGeometry:Ms,SphereGeometry:Jo,SphereBufferGeometry:Or,RingGeometry:sl,RingBufferGeometry:Ss,PlaneGeometry:Pe,PlaneBufferGeometry:pe,LatheGeometry:va,LatheBufferGeometry:$o,ShapeGeometry:Lo,ShapeBufferGeometry:Ko,ExtrudeGeometry:Po,ExtrudeBufferGeometry:po,EdgesGeometry:Qo,ConeGeometry:ya,ConeBufferGeometry:Gn,CylinderGeometry:Ro,CylinderBufferGeometry:Oo,CircleGeometry:Es,CircleBufferGeometry:mo,BoxGeometry:It,BoxBufferGeometry:Nt});ts.prototype=Object.create(Wt.prototype),ts.prototype.constructor=ts,ts.prototype.isShadowMaterial=!0,ts.prototype.copy=function(t){return Wt.prototype.copy.call(this,t),this.color.copy(t.color),this},bs.prototype=Object.create($e.prototype),bs.prototype.constructor=bs,bs.prototype.isRawShaderMaterial=!0,go.prototype=Object.create(Wt.prototype),go.prototype.constructor=go,go.prototype.isMeshStandardMaterial=!0,go.prototype.copy=function(t){return Wt.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},Cs.prototype=Object.create(go.prototype),Cs.prototype.constructor=Cs,Cs.prototype.isMeshPhysicalMaterial=!0,Cs.prototype.copy=function(t){return go.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Jr.prototype=Object.create(Wt.prototype),Jr.prototype.constructor=Jr,Jr.prototype.isMeshPhongMaterial=!0,Jr.prototype.copy=function(t){return Wt.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},As.prototype=Object.create(Jr.prototype),As.prototype.constructor=As,As.prototype.isMeshToonMaterial=!0,As.prototype.copy=function(t){return Jr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ps.prototype=Object.create(Wt.prototype),Ps.prototype.constructor=Ps,Ps.prototype.isMeshNormalMaterial=!0,Ps.prototype.copy=function(t){return Wt.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},Ir.prototype=Object.create(Wt.prototype),Ir.prototype.constructor=Ir,Ir.prototype.isMeshLambertMaterial=!0,Ir.prototype.copy=function(t){return Wt.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},Ls.prototype=Object.create(Wt.prototype),Ls.prototype.constructor=Ls,Ls.prototype.isMeshMatcapMaterial=!0,Ls.prototype.copy=function(t){return Wt.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},Rs.prototype=Object.create(Ni.prototype),Rs.prototype.constructor=Rs,Rs.prototype.isLineDashedMaterial=!0,Rs.prototype.copy=function(t){return Ni.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Fu=Object.freeze({ShadowMaterial:ts,SpriteMaterial:Hi,RawShaderMaterial:bs,ShaderMaterial:$e,PointsMaterial:Fn,MeshPhysicalMaterial:Cs,MeshStandardMaterial:go,MeshPhongMaterial:Jr,MeshToonMaterial:As,MeshNormalMaterial:Ps,MeshLambertMaterial:Ir,MeshDepthMaterial:se,MeshDistanceMaterial:te,MeshBasicMaterial:Ge,MeshMatcapMaterial:Ls,LineDashedMaterial:Rs,LineBasicMaterial:Ni,Material:Wt}),Yn={arraySlice:function(t,e,i){return Yn.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,l){return t[o]-t[l]}),i},sortedArray:function(t,e,i){for(var n=t.length,o=new t.constructor(n),l=0,d=0;d!==n;++l)for(var p=i[l]*e,y=0;y!==e;++y)o[d++]=t[p+y];return o},flattenJSON:function(t,e,i,n){for(var o=1,l=t[0];l!==void 0&&l[n]===void 0;)l=t[o++];if(l!==void 0){var d=l[n];if(d!==void 0)if(Array.isArray(d))do d=l[n],d!==void 0&&(e.push(l.time),i.push.apply(i,d)),l=t[o++];while(l!==void 0);else if(d.toArray!==void 0)do d=l[n],d!==void 0&&(e.push(l.time),d.toArray(i,i.length)),l=t[o++];while(l!==void 0);else do d=l[n],d!==void 0&&(e.push(l.time),i.push(d)),l=t[o++];while(l!==void 0)}}};Object.assign($n.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 l=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===l)break;if(o=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=o)break t;for(l=e[1],t<l&&(i=2,o=l),l=i-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===l)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($n.prototype,{beforeStart_:$n.prototype.copySampleValue_,afterEnd_:$n.prototype.copySampleValue_}),al.prototype=Object.assign(Object.create($n.prototype),{constructor:al,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,o=t-2,l=t+1,d=n[o],p=n[l];if(d===void 0)switch(this.getSettings_().endingStart){case 2401:o=t,d=2*e-i;break;case 2402:o=n.length-2,d=e+n[o]-n[o+1];break;default:o=t,d=i}if(p===void 0)switch(this.getSettings_().endingEnd){case 2401:l=t,p=2*i-e;break;case 2402:l=1,p=i+n[1]-n[0];break;default:l=t-1,p=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-d),this._weightNext=t/(p-i),this._offsetPrev=o*n,this._offsetNext=l*n},interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,d=this.valueSize;t*=d;var p=t-d,y=this._offsetPrev,w=this._offsetNext,A=this._weightPrev,P=this._weightNext,B=(i-e)/(n-e);for(i=B*B,n=i*B,e=-A*n+2*A*i-A*B,A=(1+A)*n+(-1.5-2*A)*i+(-.5+A)*B+1,B=(-1-P)*n+(1.5+P)*i+.5*B,P=P*n-P*i,i=0;i!==d;++i)o[i]=e*l[y+i]+A*l[p+i]+B*l[t+i]+P*l[w+i];return o}}),Dr.prototype=Object.assign(Object.create($n.prototype),{constructor:Dr,interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,d=this.valueSize;t*=d;var p=t-d;for(e=(i-e)/(n-e),i=1-e,n=0;n!==d;++n)o[n]=l[p+n]*i+l[t+n]*e;return o}}),Os.prototype=Object.assign(Object.create($n.prototype),{constructor:Os,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(Hn,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Yn.convertArray(t.times,Array),values:Yn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(Hn.prototype,{constructor:Hn,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Os(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 al(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,l=n-1;o!==n&&i[o]<t;)++o;for(;l!==-1&&i[l]>e;)--l;return++l,(o!==0||l!==n)&&(o>=l&&(l=Math.max(l,1),o=l-1),t=this.getValueSize(),this.times=Yn.arraySlice(i,o,l),this.values=Yn.arraySlice(this.values,o*t,l*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,l=0;l!==n;l++){var d=i[l];if(typeof d=="number"&&isNaN(d)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,l,d),t=!1;break}if(o!==null&&o>d){console.error("THREE.KeyframeTrack: Out of order keys.",this,l,d,o),t=!1;break}o=d}if(e!==void 0&&Yn.isTypedArray(e)){for(l=0,i=e.length;l!==i;++l)if(n=e[l],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,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,l=t.length-1,d=1;d<l;++d){var p=!1,y=t[d];if(y!==t[d+1]&&(d!==1||y!==y[0]))if(n)p=!0;else{var w=d*i,A=w-i,P=w+i;for(y=0;y!==i;++y){var B=e[w+y];if(B!==e[A+y]||B!==e[P+y]){p=!0;break}}}if(p){if(d!==o)for(t[o]=t[d],p=d*i,w=o*i,y=0;y!==i;++y)e[w+y]=e[p+y];++o}}if(0<l){for(t[o]=t[l],p=l*i,w=o*i,y=0;y!==i;++y)e[w+y]=e[p+y];++o}return o!==t.length&&(this.times=Yn.arraySlice(t,0,o),this.values=Yn.arraySlice(e,0,o*i)),this}}),Kl.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Kl,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ql.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Ql,ValueTypeName:"color"}),$r.prototype=Object.assign(Object.create(Hn.prototype),{constructor:$r,ValueTypeName:"number"}),ar.prototype=Object.assign(Object.create($n.prototype),{constructor:ar,interpolate_:function(t,e,i,n){var o=this.resultBuffer,l=this.sampleValues,d=this.valueSize;for(t*=d,e=(i-e)/(n-e),i=t+d;t!==i;t+=4)f.slerpFlat(o,0,l,t-d,l,t,e);return o}}),_a.prototype=Object.assign(Object.create(Hn.prototype),{constructor:_a,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new ar(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),th.prototype=Object.assign(Object.create(Hn.prototype),{constructor:th,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),xa.prototype=Object.assign(Object.create(Hn.prototype),{constructor:xa,ValueTypeName:"vector"}),Object.assign(_r,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),o=0,l=i.length;o!==l;++o)e.push(Xc(i[o]).scale(n));return new _r(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(Hn.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var o=e.length,l=[],d=0;d<o;d++){var p=[],y=[];p.push((d+o-1)%o,d,(d+1)%o),y.push(0,1,0);var w=Yn.getKeyframeOrder(p);p=Yn.sortedArray(p,1,w),y=Yn.sortedArray(y,1,w),n||p[0]!==0||(p.push(o),y.push(y[0])),l.push(new $r(".morphTargetInfluences["+e[d].name+"]",p,y).scale(1/i))}return new _r(t,-1,l)},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]+)$/,l=0,d=t.length;l<d;l++){var p=t[l],y=p.name.match(o);if(y&&1<y.length){var w=y[1];(y=n[w])||(n[w]=y=[]),y.push(p)}}t=[];for(w in n)t.push(_r.CreateFromMorphTargetSequence(w,n[w],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function($,rt,xt,gt,Ct){if(xt.length!==0){var wt=[],Vt=[];Yn.flattenJSON(xt,wt,Vt,gt),wt.length!==0&&Ct.push(new $(rt,wt,Vt))}},n=[],o=t.name||"default",l=t.length||-1,d=t.fps||30;t=t.hierarchy||[];for(var p=0;p<t.length;p++){var y=t[p].keys;if(y&&y.length!==0)if(y[0].morphTargets){l={};for(var w=0;w<y.length;w++)if(y[w].morphTargets)for(var A=0;A<y[w].morphTargets.length;A++)l[y[w].morphTargets[A]]=-1;for(var P in l){var B=[],H=[];for(A=0;A!==y[w].morphTargets.length;++A){var q=y[w];B.push(q.time),H.push(q.morphTarget===P?1:0)}n.push(new $r(".morphTargetInfluence["+P+"]",B,H))}l=l.length*(d||1)}else w=".bones["+e[p].name+"]",i(xa,w+".position",y,"pos",n),i(_a,w+".quaternion",y,"rot",n),i(xa,w+".scale",y,"scl",n)}return n.length===0?null:new _r(o,l,n)}}),Object.assign(_r.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 Mo={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={}}},tr=new es,Br={};Object.assign(Lt.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,l=Mo.get(t);if(l!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l;if(Br[t]!==void 0)Br[t].push({onLoad:e,onProgress:i,onError:n});else{var d=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(d){i=d[1];var p=!!d[2];d=d[3],d=decodeURIComponent(d),p&&(d=atob(d));try{var y=(this.responseType||"").toLowerCase();switch(y){case"arraybuffer":case"blob":var w=new Uint8Array(d.length);for(p=0;p<d.length;p++)w[p]=d.charCodeAt(p);var A=y==="blob"?new Blob([w.buffer],{type:i}):w.buffer;break;case"document":A=new DOMParser().parseFromString(d,i);break;case"json":A=JSON.parse(d);break;default:A=d}setTimeout(function(){e&&e(A),o.manager.itemEnd(t)},0)}catch(B){setTimeout(function(){n&&n(B),o.manager.itemError(t),o.manager.itemEnd(t)},0)}}else{Br[t]=[],Br[t].push({onLoad:e,onProgress:i,onError:n});var P=new XMLHttpRequest;P.open("GET",t,!0),P.addEventListener("load",function(B){var H=this.response;Mo.add(t,H);var q=Br[t];if(delete Br[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var $=0,rt=q.length;$<rt;$++){var xt=q[$];xt.onLoad&&xt.onLoad(H)}}else{for($=0,rt=q.length;$<rt;$++)xt=q[$],xt.onError&&xt.onError(B);o.manager.itemError(t)}o.manager.itemEnd(t)},!1),P.addEventListener("progress",function(B){for(var H=Br[t],q=0,$=H.length;q<$;q++){var rt=H[q];rt.onProgress&&rt.onProgress(B)}},!1),P.addEventListener("error",function(B){var H=Br[t];delete Br[t];for(var q=0,$=H.length;q<$;q++){var rt=H[q];rt.onError&&rt.onError(B)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),P.addEventListener("abort",function(B){var H=Br[t];delete Br[t];for(var q=0,$=H.length;q<$;q++){var rt=H[q];rt.onError&&rt.onError(B)}o.manager.itemError(t),o.manager.itemEnd(t)},!1),this.responseType!==void 0&&(P.responseType=this.responseType),this.withCredentials!==void 0&&(P.withCredentials=this.withCredentials),P.overrideMimeType&&P.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(p in this.requestHeader)P.setRequestHeader(p,this.requestHeader[p]);P.send(null)}return o.manager.itemStart(t),P}},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,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(d){e(o.parse(JSON.parse(d)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var o=_r.parse(t[n]);i.push(o)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(Zt.prototype,{load:function(t,e,i,n){function o(B){y.load(t[B],function(H){H=l._parser(H,!0),d[B]={width:H.width,height:H.height,format:H.format,mipmaps:H.mipmaps},w+=1,w===6&&(H.mipmapCount===1&&(p.minFilter=1006),p.format=H.format,p.needsUpdate=!0,e&&e(p))},i,n)}var l=this,d=[],p=new Yo;p.image=d;var y=new Lt(this.manager);if(y.setPath(this.path),y.setResponseType("arraybuffer"),Array.isArray(t))for(var w=0,A=0,P=t.length;A<P;++A)o(A);else y.load(t,function(B){if(B=l._parser(B,!0),B.isCubemap)for(var H=B.mipmaps.length/B.mipmapCount,q=0;q<H;q++){d[q]={mipmaps:[]};for(var $=0;$<B.mipmapCount;$++)d[q].mipmaps.push(B.mipmaps[q*B.mipmapCount+$]),d[q].format=B.format,d[q].width=B.width,d[q].height=B.height}else p.image.width=B.width,p.image.height=B.height,p.mipmaps=B.mipmaps;B.mipmapCount===1&&(p.minFilter=1006),p.format=B.format,p.needsUpdate=!0,e&&e(p)},i,n);return p},setPath:function(t){return this.path=t,this}}),Object.assign(Ue.prototype,{load:function(t,e,i,n){var o=this,l=new I,d=new Lt(this.manager);return d.setResponseType("arraybuffer"),d.setPath(this.path),d.load(t,function(p){(p=o._parser(p))&&(p.image!==void 0?l.image=p.image:p.data!==void 0&&(l.image.width=p.width,l.image.height=p.height,l.image.data=p.data),l.wrapS=p.wrapS!==void 0?p.wrapS:1001,l.wrapT=p.wrapT!==void 0?p.wrapT:1001,l.magFilter=p.magFilter!==void 0?p.magFilter:1006,l.minFilter=p.minFilter!==void 0?p.minFilter:1008,l.anisotropy=p.anisotropy!==void 0?p.anisotropy:1,p.format!==void 0&&(l.format=p.format),p.type!==void 0&&(l.type=p.type),p.mipmaps!==void 0&&(l.mipmaps=p.mipmaps),p.mipmapCount===1&&(l.minFilter=1006),l.needsUpdate=!0,e&&e(l,p))},i,n),l},setPath:function(t){return this.path=t,this}}),Object.assign(ai.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(){y.removeEventListener("load",o,!1),y.removeEventListener("error",l,!1),Mo.add(t,this),e&&e(this),d.manager.itemEnd(t)}function l(w){y.removeEventListener("load",o,!1),y.removeEventListener("error",l,!1),n&&n(w),d.manager.itemError(t),d.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var d=this,p=Mo.get(t);if(p!==void 0)return d.manager.itemStart(t),setTimeout(function(){e&&e(p),d.manager.itemEnd(t)},0),p;var y=document.createElementNS("http://www.w3.org/1999/xhtml","img");return y.addEventListener("load",o,!1),y.addEventListener("error",l,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(y.crossOrigin=this.crossOrigin),d.manager.itemStart(t),y.src=t,y},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fi.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function o(y){d.load(t[y],function(w){l.images[y]=w,p++,p===6&&(l.needsUpdate=!0,e&&e(l))},void 0,n)}var l=new z,d=new ai(this.manager);d.setCrossOrigin(this.crossOrigin),d.setPath(this.path);var p=0;for(i=0;i<t.length;++i)o(i);return l},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(fn.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=new g,l=new ai(this.manager);return l.setCrossOrigin(this.crossOrigin),l.setPath(this.path),l.load(t,function(d){o.image=d,d=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,o.format=d?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 l=this.getPoint(n/t);o+=l.distanceTo(i),e.push(o),i=l}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,l=n-1,d;o<=l;)if(t=Math.floor(o+(l-o)/2),d=i[t]-e,0>d)o=t+1;else if(0<d)l=t-1;else{l=t;break}return t=l,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 u,n=[],o=[],l=[],d=new u,p=new c,y;for(y=0;y<=t;y++){var w=y/t;n[y]=this.getTangentAt(w),n[y].normalize()}o[0]=new u,l[0]=new u,y=Number.MAX_VALUE,w=Math.abs(n[0].x);var A=Math.abs(n[0].y),P=Math.abs(n[0].z);for(w<=y&&(y=w,i.set(1,0,0)),A<=y&&(y=A,i.set(0,1,0)),P<=y&&i.set(0,0,1),d.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],d),l[0].crossVectors(n[0],o[0]),y=1;y<=t;y++)o[y]=o[y-1].clone(),l[y]=l[y-1].clone(),d.crossVectors(n[y-1],n[y]),d.length()>Number.EPSILON&&(d.normalize(),i=Math.acos(di.clamp(n[y-1].dot(n[y]),-1,1)),o[y].applyMatrix4(p.makeRotationAxis(d,i))),l[y].crossVectors(n[y],o[y]);if(e===!0)for(i=Math.acos(di.clamp(o[0].dot(o[t]),-1,1)),i/=t,0<n[0].dot(d.crossVectors(o[0],o[t]))&&(i=-i),y=1;y<=t;y++)o[y].applyMatrix4(p.makeRotationAxis(n[y],i*y)),l[y].crossVectors(n[y],o[y]);return{tangents:n,normals:o,binormals:l}},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}}),Kn.prototype=Object.create(Ee.prototype),Kn.prototype.constructor=Kn,Kn.prototype.isEllipseCurve=!0,Kn.prototype.getPoint=function(t,e){e=e||new s;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 l=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,l-=this.aY,t=o*i-l*n+this.aX,l=o*n+l*i+this.aY),e.set(t,l)},Kn.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},Kn.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},Kn.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},wa.prototype=Object.create(Kn.prototype),wa.prototype.constructor=wa,wa.prototype.isArcCurve=!0;var bn=new u,Sl=new lr,lh=new lr,Nr=new lr;On.prototype=Object.create(Ee.prototype),On.prototype.constructor=On,On.prototype.isCatmullRomCurve3=!0,On.prototype.getPoint=function(t,e){e=e||new u;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 l=i[(o-1)%n];else bn.subVectors(i[0],i[1]).add(i[0]),l=bn;var d=i[o%n],p=i[(o+1)%n];if(this.closed||o+2<n?i=i[(o+2)%n]:(bn.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=bn),this.curveType==="centripetal"||this.curveType==="chordal"){var y=this.curveType==="chordal"?.5:.25;n=Math.pow(l.distanceToSquared(d),y),o=Math.pow(d.distanceToSquared(p),y),y=Math.pow(p.distanceToSquared(i),y),1e-4>o&&(o=1),1e-4>n&&(n=o),1e-4>y&&(y=o),Sl.initNonuniformCatmullRom(l.x,d.x,p.x,i.x,n,o,y),lh.initNonuniformCatmullRom(l.y,d.y,p.y,i.y,n,o,y),Nr.initNonuniformCatmullRom(l.z,d.z,p.z,i.z,n,o,y)}else this.curveType==="catmullrom"&&(Sl.initCatmullRom(l.x,d.x,p.x,i.x,this.tension),lh.initCatmullRom(l.y,d.y,p.y,i.y,this.tension),Nr.initCatmullRom(l.z,d.z,p.z,i.z,this.tension));return e.set(Sl.calc(t),lh.calc(t),Nr.calc(t)),e},On.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},On.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},On.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 u().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},hr.prototype=Object.create(Ee.prototype),hr.prototype.constructor=hr,hr.prototype.isCubicBezierCurve=!0,hr.prototype.getPoint=function(t,e){e=e||new s;var i=this.v0,n=this.v1,o=this.v2,l=this.v3;return e.set(is(t,i.x,n.x,o.x,l.x),is(t,i.y,n.y,o.y,l.y)),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.v3.copy(t.v3),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.v3=this.v3.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.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 u;var i=this.v0,n=this.v1,o=this.v2,l=this.v3;return e.set(is(t,i.x,n.x,o.x,l.x),is(t,i.y,n.y,o.y,l.y),is(t,i.z,n.z,o.z,l.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},ur.prototype=Object.create(Ee.prototype),ur.prototype.constructor=ur,ur.prototype.isLineCurve=!0,ur.prototype.getPoint=function(t,e){return e=e||new s,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},ur.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},ur.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},ur.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ur.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ur.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},zr.prototype=Object.create(Ee.prototype),zr.prototype.constructor=zr,zr.prototype.isLineCurve3=!0,zr.prototype.getPoint=function(t,e){return e=e||new u,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},zr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},cr.prototype=Object.create(Ee.prototype),cr.prototype.constructor=cr,cr.prototype.isQuadraticBezierCurve=!0,cr.prototype.getPoint=function(t,e){e=e||new s;var i=this.v0,n=this.v1,o=this.v2;return e.set(vo(t,i.x,n.x,o.x),vo(t,i.y,n.y,o.y)),e},cr.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},cr.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},cr.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},yo.prototype=Object.create(Ee.prototype),yo.prototype.constructor=yo,yo.prototype.isQuadraticBezierCurve3=!0,yo.prototype.getPoint=function(t,e){e=e||new u;var i=this.v0,n=this.v1,o=this.v2;return e.set(vo(t,i.x,n.x,o.x),vo(t,i.y,n.y,o.y),vo(t,i.z,n.z,o.z)),e},yo.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},yo.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},yo.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},Kr.prototype=Object.create(Ee.prototype),Kr.prototype.constructor=Kr,Kr.prototype.isSplineCurve=!0,Kr.prototype.getPoint=function(t,e){e=e||new s;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var o=i[t===0?t:t-1],l=i[t],d=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Pu(n,o.x,l.x,d.x,i.x),Pu(n,o.y,l.y,d.y,i.y)),e},Kr.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},Kr.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},Kr.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 s().fromArray(n))}return this};var hh=Object.freeze({ArcCurve:wa,CatmullRomCurve3:On,CubicBezierCurve:hr,CubicBezierCurve3:Ti,EllipseCurve:Kn,LineCurve:ur,LineCurve3:zr,QuadraticBezierCurve:cr,QuadraticBezierCurve3:yo,SplineCurve:Kr});Io.prototype=Object.assign(Object.create(Ee.prototype),{constructor:Io,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 ur(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 l=o[n];l=l.getPoints(l&&l.isEllipseCurve?2*t:l&&(l.isLineCurve||l.isLineCurve3)?1:l&&l.isSplineCurve?t*l.points.length:t);for(var d=0;d<l.length;d++){var p=l[d];i&&i.equals(p)||(e.push(p),i=p)}}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 hh[n.type]().fromJSON(n))}return this}}),fr.prototype=Object.assign(Object.create(Io.prototype),{constructor:fr,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 ur(this.currentPoint.clone(),new s(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new cr(this.currentPoint.clone(),new s(t,e),new s(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,o,l){t=new hr(this.currentPoint.clone(),new s(t,e),new s(i,n),new s(o,l)),this.curves.push(t),this.currentPoint.set(o,l)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Kr(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,o,l){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,l)},absarc:function(t,e,i,n,o,l){this.absellipse(t,e,i,i,n,o,l)},ellipse:function(t,e,i,n,o,l,d,p){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,o,l,d,p)},absellipse:function(t,e,i,n,o,l,d,p){t=new Kn(t,e,i,n,o,l,d,p),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 Io.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Io.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Io.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Qn.prototype=Object.assign(Object.create(fr.prototype),{constructor:Qn,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){fr.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=fr.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){fr.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 fr().fromJSON(n))}return this}}),tn.prototype=Object.assign(Object.create(N.prototype),{constructor:tn,isLight:!0,copy:function(t){return N.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=N.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}}),ll.prototype=Object.assign(Object.create(tn.prototype),{constructor:ll,isHemisphereLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(_o.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}}),hl.prototype=Object.assign(Object.create(_o.prototype),{constructor:hl,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*di.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())}}),ul.prototype=Object.assign(Object.create(tn.prototype),{constructor:ul,isSpotLight:!0,copy:function(t){return tn.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}}),Is.prototype=Object.assign(Object.create(tn.prototype),{constructor:Is,isPointLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Ta.prototype=Object.assign(Object.create(Be.prototype),{constructor:Ta,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,l){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=l,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 l=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,o+=this.view.offsetX/i*l,i=o+this.view.width/i*l,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=N.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}}),ns.prototype=Object.assign(Object.create(_o.prototype),{constructor:ns}),xo.prototype=Object.assign(Object.create(tn.prototype),{constructor:xo,isDirectionalLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Ds.prototype=Object.assign(Object.create(tn.prototype),{constructor:Ds,isAmbientLight:!0}),eh.prototype=Object.assign(Object.create(tn.prototype),{constructor:eh,isRectAreaLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=tn.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ih.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(d){e(o.parse(JSON.parse(d)))},i,n)},parse:function(t){function e(d){return i[d]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",d),i[d]}var i=this.textures,n=new Fu[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 l=t.uniforms[o];switch(n.uniforms[o]={},l.type){case"t":n.uniforms[o].value=e(l.value);break;case"c":n.uniforms[o].value=new L().setHex(l.value);break;case"v2":n.uniforms[o].value=new s().fromArray(l.value);break;case"v3":n.uniforms[o].value=new u().fromArray(l.value);break;case"v4":n.uniforms[o].value=new _().fromArray(l.value);break;case"m4":n.uniforms[o].value=new c().fromArray(l.value);break;default:n.uniforms[o].value=l.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 s().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 Us={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(Nh.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(o.manager);l.setPath(o.path),l.load(t,function(d){e(o.parse(JSON.parse(d)))},i,n)},parse:function(t){var e=new Ft,i=t.data.index;i!==void 0&&(i=new ls[i.type](i.array),e.setIndex(new K(i,1)));var n=t.data.attributes;for(l in n){var o=n[l];i=new ls[o.type](o.array),e.addAttribute(l,new K(i,o.itemSize,o.normalized))}var l=t.data.groups||t.data.drawcalls||t.data.offsets;if(l!==void 0)for(i=0,n=l.length;i!==n;++i)o=l[i],e.addGroup(o.start,o.count,o.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(l=new u,t.center!==void 0&&l.fromArray(t.center),e.boundingSphere=new D(l,t.radius)),e},setPath:function(t){return this.path=t,this}});var ls={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Do.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(Do.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 L,i=new fn,n=new ih;return function(o,l,d){function p(B,H,q,$,rt){B=l+B;var xt=Do.Handlers.get(B);return xt!==null?B=xt.load(B):(i.setCrossOrigin(d),B=i.load(B)),H!==void 0&&(B.repeat.fromArray(H),H[0]!==1&&(B.wrapS=1e3),H[1]!==1&&(B.wrapT=1e3)),q!==void 0&&B.offset.fromArray(q),$!==void 0&&($[0]==="repeat"&&(B.wrapS=1e3),$[0]==="mirror"&&(B.wrapS=1002),$[1]==="repeat"&&(B.wrapT=1e3),$[1]==="mirror"&&(B.wrapT=1002)),rt!==void 0&&(B.anisotropy=rt),H=di.generateUUID(),y[H]=B,H}var y={},w={uuid:di.generateUUID(),type:"MeshLambertMaterial"},A;for(A in o){var P=o[A];switch(A){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":w.name=P;break;case"blending":w.blending=t[P];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",A,"is no longer supported.");break;case"colorDiffuse":w.color=e.fromArray(P).getHex();break;case"colorSpecular":w.specular=e.fromArray(P).getHex();break;case"colorEmissive":w.emissive=e.fromArray(P).getHex();break;case"specularCoef":w.shininess=P;break;case"shading":P.toLowerCase()==="basic"&&(w.type="MeshBasicMaterial"),P.toLowerCase()==="phong"&&(w.type="MeshPhongMaterial"),P.toLowerCase()==="standard"&&(w.type="MeshStandardMaterial");break;case"mapDiffuse":w.map=p(P,o.mapDiffuseRepeat,o.mapDiffuseOffset,o.mapDiffuseWrap,o.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":w.emissiveMap=p(P,o.mapEmissiveRepeat,o.mapEmissiveOffset,o.mapEmissiveWrap,o.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":w.lightMap=p(P,o.mapLightRepeat,o.mapLightOffset,o.mapLightWrap,o.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":w.aoMap=p(P,o.mapAORepeat,o.mapAOOffset,o.mapAOWrap,o.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":w.bumpMap=p(P,o.mapBumpRepeat,o.mapBumpOffset,o.mapBumpWrap,o.mapBumpAnisotropy);break;case"mapBumpScale":w.bumpScale=P;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":w.normalMap=p(P,o.mapNormalRepeat,o.mapNormalOffset,o.mapNormalWrap,o.mapNormalAnisotropy);break;case"mapNormalFactor":w.normalScale=P;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":w.specularMap=p(P,o.mapSpecularRepeat,o.mapSpecularOffset,o.mapSpecularWrap,o.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":w.metalnessMap=p(P,o.mapMetalnessRepeat,o.mapMetalnessOffset,o.mapMetalnessWrap,o.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":w.roughnessMap=p(P,o.mapRoughnessRepeat,o.mapRoughnessOffset,o.mapRoughnessWrap,o.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":w.alphaMap=p(P,o.mapAlphaRepeat,o.mapAlphaOffset,o.mapAlphaWrap,o.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":w.side=1;break;case"doubleSided":w.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),w.opacity=P;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":w[A]=P;break;case"vertexColors":P===!0&&(w.vertexColors=2),P==="face"&&(w.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",A,P)}}return w.type==="MeshBasicMaterial"&&delete w.emissive,w.type!=="MeshPhongMaterial"&&delete w.specular,1>w.opacity&&(w.transparent=!0),n.setTextures(y),n.parse(w)}}()}),Object.assign(zs.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,l=this.path===void 0?Us.extractUrlBase(t):this.path,d=new Lt(this.manager);d.setPath(this.path),d.setWithCredentials(this.withCredentials),d.load(t,function(p){p=JSON.parse(p);var y=p.metadata;if(y!==void 0&&(y=y.type,y!==void 0&&y.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}p=o.parse(p,l),e(p.geometry,p.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 X,n=t,o,l,d,p=n.faces,y=n.vertices,w=n.normals,A=n.colors,P=n.scale,B=0;if(n.uvs!==void 0){for(o=0;o<n.uvs.length;o++)n.uvs[o].length&&B++;for(o=0;o<B;o++)i.faceVertexUvs[o]=[]}var H=0;for(d=y.length;H<d;)o=new u,o.x=y[H++]*P,o.y=y[H++]*P,o.z=y[H++]*P,i.vertices.push(o);for(H=0,d=p.length;H<d;){y=p[H++];var q=y&1,$=y&2;o=y&8;var rt=y&16,xt=y&32;if(P=y&64,y&=128,q){q=new R,q.a=p[H],q.b=p[H+1],q.c=p[H+3];var gt=new R;if(gt.a=p[H+1],gt.b=p[H+2],gt.c=p[H+3],H+=4,$&&($=p[H++],q.materialIndex=$,gt.materialIndex=$),$=i.faces.length,o)for(o=0;o<B;o++){var Ct=n.uvs[o];for(i.faceVertexUvs[o][$]=[],i.faceVertexUvs[o][$+1]=[],l=0;4>l;l++){var wt=p[H++],Vt=Ct[2*wt];wt=Ct[2*wt+1],Vt=new s(Vt,wt),l!==2&&i.faceVertexUvs[o][$].push(Vt),l!==0&&i.faceVertexUvs[o][$+1].push(Vt)}}if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt]),gt.normal.copy(q.normal)),xt)for(o=0;4>o;o++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),o!==2&&q.vertexNormals.push(xt),o!==0&&gt.vertexNormals.push(xt);if(P&&(P=p[H++],P=A[P],q.color.setHex(P),gt.color.setHex(P)),y)for(o=0;4>o;o++)P=p[H++],P=A[P],o!==2&&q.vertexColors.push(new L(P)),o!==0&&gt.vertexColors.push(new L(P));i.faces.push(q),i.faces.push(gt)}else{if(q=new R,q.a=p[H++],q.b=p[H++],q.c=p[H++],$&&($=p[H++],q.materialIndex=$),$=i.faces.length,o)for(o=0;o<B;o++)for(Ct=n.uvs[o],i.faceVertexUvs[o][$]=[],l=0;3>l;l++)wt=p[H++],Vt=Ct[2*wt],wt=Ct[2*wt+1],Vt=new s(Vt,wt),i.faceVertexUvs[o][$].push(Vt);if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt])),xt)for(o=0;3>o;o++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),q.vertexNormals.push(xt);if(P&&(P=p[H++],q.color.setHex(A[P])),y)for(o=0;3>o;o++)P=p[H++],q.vertexColors.push(new L(A[P]));i.faces.push(q)}}if(n=t,H=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(d=0,p=n.skinWeights.length;d<p;d+=H)i.skinWeights.push(new _(n.skinWeights[d],1<H?n.skinWeights[d+1]:0,2<H?n.skinWeights[d+2]:0,3<H?n.skinWeights[d+3]:0));if(n.skinIndices)for(d=0,p=n.skinIndices.length;d<p;d+=H)i.skinIndices.push(new _(n.skinIndices[d],1<H?n.skinIndices[d+1]:0,2<H?n.skinIndices[d+2]:0,3<H?n.skinIndices[d+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."),d=t,p=d.scale,d.morphTargets!==void 0)for(n=0,H=d.morphTargets.length;n<H;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=d.morphTargets[n].name,i.morphTargets[n].vertices=[],w=i.morphTargets[n].vertices,A=d.morphTargets[n].vertices,B=0,y=A.length;B<y;B+=3)P=new u,P.x=A[B]*p,P.y=A[B+1]*p,P.z=A[B+2]*p,w.push(P);if(d.morphColors!==void 0&&0<d.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),p=i.faces,d=d.morphColors[0].colors,n=0,H=p.length;n<H;n++)p[n].color.fromArray(d,3*n);for(d=t,n=[],H=[],d.animation!==void 0&&H.push(d.animation),d.animations!==void 0&&(d.animations.length?H=H.concat(d.animations):H.push(d.animations)),d=0;d<H.length;d++)(p=_r.parseAnimation(H[d],i.bones))&&n.push(p);return i.morphTargets&&(H=_r.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(H)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Do.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(cl.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var o=this,l=this.path===void 0?Us.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||l,l=new Lt(o.manager),l.setPath(this.path),l.load(t,function(d){var p=null;try{p=JSON.parse(d)}catch(y){n!==void 0&&n(y),console.error("THREE:ObjectLoader: Can't parse "+t+".",y.message);return}d=p.metadata,d===void 0||d.type===void 0||d.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):o.parse(p,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 Qn().fromJSON(t[i]);e[o.uuid]=o}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new zs,o=new Nh,l=0,d=t.length;l<d;l++){var p=t[l];switch(p.type){case"PlaneGeometry":case"PlaneBufferGeometry":var y=new yn[p.type](p.width,p.height,p.widthSegments,p.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":y=new yn[p.type](p.width,p.height,p.depth,p.widthSegments,p.heightSegments,p.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":y=new yn[p.type](p.radius,p.segments,p.thetaStart,p.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":y=new yn[p.type](p.radiusTop,p.radiusBottom,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":y=new yn[p.type](p.radius,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":y=new yn[p.type](p.radius,p.widthSegments,p.heightSegments,p.phiStart,p.phiLength,p.thetaStart,p.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":y=new yn[p.type](p.radius,p.detail);break;case"RingGeometry":case"RingBufferGeometry":y=new yn[p.type](p.innerRadius,p.outerRadius,p.thetaSegments,p.phiSegments,p.thetaStart,p.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":y=new yn[p.type](p.radius,p.tube,p.radialSegments,p.tubularSegments,p.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":y=new yn[p.type](p.radius,p.tube,p.tubularSegments,p.radialSegments,p.p,p.q);break;case"LatheGeometry":case"LatheBufferGeometry":y=new yn[p.type](p.points,p.segments,p.phiStart,p.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":y=new yn[p.type](p.vertices,p.indices,p.radius,p.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":y=[];for(var w=0,A=p.shapes.length;w<A;w++){var P=e[p.shapes[w]];y.push(P)}y=new yn[p.type](y,p.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(y=[],w=0,A=p.shapes.length;w<A;w++)P=e[p.shapes[w]],y.push(P);w=p.options.extrudePath,w!==void 0&&(p.options.extrudePath=new hh[w.type]().fromJSON(w)),y=new yn[p.type](y,p.options);break;case"BufferGeometry":y=o.parse(p);break;case"Geometry":y=n.parse(p,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+p.type+'"');continue}y.uuid=p.uuid,p.name!==void 0&&(y.name=p.name),y.isBufferGeometry===!0&&p.userData!==void 0&&(y.userData=p.userData),i[p.uuid]=y}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var o=new ih;o.setTextures(e),e=0;for(var l=t.length;e<l;e++){var d=t[e];if(d.type==="MultiMaterial"){for(var p=[],y=0;y<d.materials.length;y++){var w=d.materials[y];i[w.uuid]===void 0&&(i[w.uuid]=o.parse(w)),p.push(i[w.uuid])}n[d.uuid]=p}else n[d.uuid]=o.parse(d),i[d.uuid]=n[d.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=_r.parse(n);n.uuid!==void 0&&(o.uuid=n.uuid),e.push(o)}return e},parseImages:function(t,e){function i(B){return n.manager.itemStart(B),l.load(B,function(){n.manager.itemEnd(B)},void 0,function(){n.manager.itemError(B),n.manager.itemEnd(B)})}var n=this,o={};if(t!==void 0&&0<t.length){e=new es(e);var l=new ai(e);l.setCrossOrigin(this.crossOrigin),e=0;for(var d=t.length;e<d;e++){var p=t[e],y=p.url;if(Array.isArray(y)){o[p.uuid]=[];for(var w=0,A=y.length;w<A;w++){var P=y[w];P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(P)?P:n.resourcePath+P,o[p.uuid].push(i(P))}}else P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p.url)?p.url:n.resourcePath+p.url,o[p.uuid]=i(P)}}return o},parseTextures:function(t,e){function i(y,w){return typeof y=="number"?y:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",y),w[y])}var n={};if(t!==void 0)for(var o=0,l=t.length;o<l;o++){var d=t[o];d.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',d.uuid),e[d.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",d.image);var p=Array.isArray(e[d.image])?new z(e[d.image]):new g(e[d.image]);p.needsUpdate=!0,p.uuid=d.uuid,d.name!==void 0&&(p.name=d.name),d.mapping!==void 0&&(p.mapping=i(d.mapping,Uu)),d.offset!==void 0&&p.offset.fromArray(d.offset),d.repeat!==void 0&&p.repeat.fromArray(d.repeat),d.center!==void 0&&p.center.fromArray(d.center),d.rotation!==void 0&&(p.rotation=d.rotation),d.wrap!==void 0&&(p.wrapS=i(d.wrap[0],Zn),p.wrapT=i(d.wrap[1],Zn)),d.format!==void 0&&(p.format=d.format),d.minFilter!==void 0&&(p.minFilter=i(d.minFilter,uh)),d.magFilter!==void 0&&(p.magFilter=i(d.magFilter,uh)),d.anisotropy!==void 0&&(p.anisotropy=d.anisotropy),d.flipY!==void 0&&(p.flipY=d.flipY),n[d.uuid]=p}return n},parseObject:function(t,e,i){function n(w){return e[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",w),e[w]}function o(w){if(w!==void 0){if(Array.isArray(w)){for(var A=[],P=0,B=w.length;P<B;P++){var H=w[P];i[H]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",H),A.push(i[H])}return A}return i[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",w),i[w]}}switch(t.type){case"Scene":var l=new Xn;t.background!==void 0&&Number.isInteger(t.background)&&(l.background=new L(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?l.fog=new Sn(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(l.fog=new Re(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":l=new _e(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(l.focus=t.focus),t.zoom!==void 0&&(l.zoom=t.zoom),t.filmGauge!==void 0&&(l.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(l.filmOffset=t.filmOffset),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"OrthographicCamera":l=new Ta(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(l.zoom=t.zoom),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"AmbientLight":l=new Ds(t.color,t.intensity);break;case"DirectionalLight":l=new xo(t.color,t.intensity);break;case"PointLight":l=new Is(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":l=new eh(t.color,t.intensity,t.width,t.height);break;case"SpotLight":l=new ul(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":l=new ll(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":l=n(t.geometry);var d=o(t.material);l=l.bones&&0<l.bones.length?new Gi(l,d):new pi(l,d);break;case"LOD":l=new rn;break;case"Line":l=new ji(n(t.geometry),o(t.material),t.mode);break;case"LineLoop":l=new co(n(t.geometry),o(t.material));break;case"LineSegments":l=new gi(n(t.geometry),o(t.material));break;case"PointCloud":case"Points":l=new la(n(t.geometry),o(t.material));break;case"Sprite":l=new nn(o(t.material));break;case"Group":l=new ci;break;default:l=new N}if(l.uuid=t.uuid,t.name!==void 0&&(l.name=t.name),t.matrix!==void 0?(l.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(l.matrixAutoUpdate=t.matrixAutoUpdate),l.matrixAutoUpdate&&l.matrix.decompose(l.position,l.quaternion,l.scale)):(t.position!==void 0&&l.position.fromArray(t.position),t.rotation!==void 0&&l.rotation.fromArray(t.rotation),t.quaternion!==void 0&&l.quaternion.fromArray(t.quaternion),t.scale!==void 0&&l.scale.fromArray(t.scale)),t.castShadow!==void 0&&(l.castShadow=t.castShadow),t.receiveShadow!==void 0&&(l.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(l.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(l.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&l.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(l.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(l.visible=t.visible),t.frustumCulled!==void 0&&(l.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(l.renderOrder=t.renderOrder),t.userData!==void 0&&(l.userData=t.userData),t.layers!==void 0&&(l.layers.mask=t.layers),t.children!==void 0){d=t.children;for(var p=0;p<d.length;p++)l.add(this.parseObject(d[p],e,i))}if(t.type==="LOD")for(t=t.levels,d=0;d<t.length;d++){p=t[d];var y=l.getObjectByProperty("uuid",p.object);y!==void 0&&l.addLevel(y,p.distance)}return l}});var Uu={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Zn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},uh={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};Fh.prototype={constructor:Fh,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,l=Mo.get(t);if(l!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l;fetch(t).then(function(d){return d.blob()}).then(function(d){return createImageBitmap(d,o.options)}).then(function(d){Mo.add(t,d),e&&e(d),o.manager.itemEnd(t)}).catch(function(d){n&&n(d),o.manager.itemError(t),o.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(nh.prototype,{moveTo:function(t,e){this.currentPath=new fr,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,l){this.currentPath.bezierCurveTo(t,e,i,n,o,l)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(rt){for(var xt=[],gt=0,Ct=rt.length;gt<Ct;gt++){var wt=rt[gt],Vt=new Qn;Vt.curves=wt.curves,xt.push(Vt)}return xt}function n(rt,xt){for(var gt=xt.length,Ct=!1,wt=gt-1,Vt=0;Vt<gt;wt=Vt++){var J=xt[wt],ot=xt[Vt],zt=ot.x-J.x,ee=ot.y-J.y;if(Math.abs(ee)>Number.EPSILON){if(0>ee&&(J=xt[Vt],zt=-zt,ot=xt[wt],ee=-ee),!(rt.y<J.y||rt.y>ot.y))if(rt.y===J.y){if(rt.x===J.x)return!0}else{if(wt=ee*(rt.x-J.x)-zt*(rt.y-J.y),wt===0)return!0;0>wt||(Ct=!Ct)}}else if(rt.y===J.y&&(ot.x<=rt.x&&rt.x<=J.x||J.x<=rt.x&&rt.x<=ot.x))return!0}return Ct}var o=To.isClockWise,l=this.subPaths;if(l.length===0)return[];if(e===!0)return i(l);if(e=[],l.length===1){var d=l[0],p=new Qn;return p.curves=d.curves,e.push(p),e}var y=!o(l[0].getPoints());y=t?!y:y,p=[];var w=[],A=[],P=0;w[P]=void 0,A[P]=[];for(var B=0,H=l.length;B<H;B++){d=l[B];var q=d.getPoints(),$=o(q);($=t?!$:$)?(!y&&w[P]&&P++,w[P]={s:new Qn,p:q},w[P].s.curves=d.curves,y&&P++,A[P]=[]):A[P].push({h:d,p:q[0]})}if(!w[0])return i(l);if(1<w.length){for(B=!1,t=[],o=0,l=w.length;o<l;o++)p[o]=[];for(o=0,l=w.length;o<l;o++)for(d=A[o],$=0;$<d.length;$++){for(y=d[$],P=!0,q=0;q<w.length;q++)n(y.p,w[q].p)&&(o!==q&&t.push({froms:o,tos:q,hole:$}),P?(P=!1,p[q].push(y)):B=!0);P&&p[o].push(y)}0<t.length&&(B||(A=p))}for(B=0,o=w.length;B<o;B++)for(p=w[B].s,e.push(p),t=A[B],l=0,d=t.length;l<d;l++)p.holes.push(t[l].h);return e}}),Object.assign(Uh.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 l=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var d=0,p=0,y=0;y<o.length;y++){var w=o[y];if(w===`
2571
2571
  `)d=0,p-=l;else{var A=n,P=d,B=p;if(w=e.glyphs[w]||e.glyphs["?"]){var H=new nh;if(w.o)for(var q=w._cachedOutline||(w._cachedOutline=w.o.split(" ")),$=0,rt=q.length;$<rt;)switch(q[$++]){case"m":var xt=q[$++]*A+P,gt=q[$++]*A+B;H.moveTo(xt,gt);break;case"l":xt=q[$++]*A+P,gt=q[$++]*A+B,H.lineTo(xt,gt);break;case"q":var Ct=q[$++]*A+P,wt=q[$++]*A+B,Vt=q[$++]*A+P,J=q[$++]*A+B;H.quadraticCurveTo(Vt,J,Ct,wt);break;case"b":Ct=q[$++]*A+P,wt=q[$++]*A+B,Vt=q[$++]*A+P,J=q[$++]*A+B,xt=q[$++]*A+P,gt=q[$++]*A+B,H.bezierCurveTo(Vt,J,xt,gt,Ct,wt)}A={offsetX:w.ha*A,path:H}}else A=void 0;d+=A.offsetX,t.push(A.path)}}for(e=0,o=t.length;e<o;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(Lu.prototype,{load:function(t,e,i,n){var o=this,l=new Lt(this.manager);l.setPath(this.path),l.load(t,function(d){try{var p=JSON.parse(d)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),p=JSON.parse(d.substring(65,d.length-2))}d=o.parse(p),e&&e(d)},i,n)},parse:function(t){return new Uh(t)},setPath:function(t){return this.path=t,this}});var ch,$h={getContext:function(){return ch===void 0&&(ch=new(window.AudioContext||window.webkitAudioContext)),ch},setContext:function(t){ch=t}};Object.assign(vn.prototype,{load:function(t,e,i,n){var o=new Lt(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(t,function(l){l=l.slice(0),$h.getContext().decodeAudioData(l,function(d){e(d)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(Vn.prototype,{update:function(){var t,e,i,n,o,l,d,p,y=new c,w=new c;return function(A){if(t!==this||e!==A.focus||i!==A.fov||n!==A.aspect*this.aspect||o!==A.near||l!==A.far||d!==A.zoom||p!==this.eyeSep){t=this,e=A.focus,i=A.fov,n=A.aspect*this.aspect,o=A.near,l=A.far,d=A.zoom;var P=A.projectionMatrix.clone();p=this.eyeSep/2;var B=p*o/e,H=o*Math.tan(di.DEG2RAD*i*.5)/d;w.elements[12]=-p,y.elements[12]=p;var q=-H*n+B,$=H*n+B;P.elements[0]=2*o/($-q),P.elements[8]=($+q)/($-q),this.cameraL.projectionMatrix.copy(P),q=-H*n-B,$=H*n-B,P.elements[0]=2*o/($-q),P.elements[8]=($+q)/($-q),this.cameraR.projectionMatrix.copy(P)}this.cameraL.matrixWorld.copy(A.matrixWorld).multiply(w),this.cameraR.matrixWorld.copy(A.matrixWorld).multiply(y)}}()}),fl.prototype=Object.create(N.prototype),fl.prototype.constructor=fl,Object.assign(Gh.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}}),rh.prototype=Object.assign(Object.create(N.prototype),{constructor:rh,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 u,e=new f,i=new u,n=new u,o=new Gh;return function(l){N.prototype.updateMatrixWorld.call(this,l),l=this.context.listener;var d=this.up;if(this.timeDelta=o.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),l.positionX){var p=this.context.currentTime+this.timeDelta;l.positionX.linearRampToValueAtTime(t.x,p),l.positionY.linearRampToValueAtTime(t.y,p),l.positionZ.linearRampToValueAtTime(t.z,p),l.forwardX.linearRampToValueAtTime(n.x,p),l.forwardY.linearRampToValueAtTime(n.y,p),l.forwardZ.linearRampToValueAtTime(n.z,p),l.upX.linearRampToValueAtTime(d.x,p),l.upY.linearRampToValueAtTime(d.y,p),l.upZ.linearRampToValueAtTime(d.z,p)}else l.setPosition(t.x,t.y,t.z),l.setOrientation(n.x,n.y,n.z,d.x,d.y,d.z)}}()}),Ma.prototype=Object.assign(Object.create(N.prototype),{constructor:Ma,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}}),dl.prototype=Object.assign(Object.create(Ma.prototype),{constructor:dl,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 u,e=new f,i=new u,n=new u;return function(o){if(N.prototype.updateMatrixWorld.call(this,o),o=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),o.positionX){var l=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(t.x,l),o.positionY.linearRampToValueAtTime(t.y,l),o.positionZ.linearRampToValueAtTime(t.z,l),o.orientationX.linearRampToValueAtTime(n.x,l),o.orientationY.linearRampToValueAtTime(n.y,l),o.orientationZ.linearRampToValueAtTime(n.z,l)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(ks.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(pl.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 l=e+e;n!==l;++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){f.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,o){for(var l=1-n,d=0;d!==o;++d){var p=e+d;t[p]=t[p]*l+t[i+d]*n}}}),Object.assign(Bs.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(En,{Composite:Bs,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new En.Composite(t,e,i):new En(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+"$"),l=["material","materials","bones"];return function(d){var p=o.exec(d);if(!p)throw Error("PropertyBinding: Cannot parse trackName: "+d);p={nodeName:p[2],objectName:p[3],objectIndex:p[4],propertyName:p[5],propertyIndex:p[6]};var y=p.nodeName&&p.nodeName.lastIndexOf(".");if(y!==void 0&&y!==-1){var w=p.nodeName.substring(y+1);l.indexOf(w)!==-1&&(p.nodeName=p.nodeName.substring(0,y),p.objectName=w)}if(p.propertyName===null||p.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+d);return p}}(),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 l=0;l<o.length;l++){var d=o[l];if(d.name===e||d.uuid===e||(d=n(d.children)))return d}return null};if(t=n(t.children))return t}return null}}),Object.assign(En.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=En.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var l=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===l){l=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(l!==void 0){if(t[l]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[l]}}if(l=t[n],l===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=l,this.propertyIndex=o}else l.fromArray!==void 0&&l.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(i=this.BindingType.EntireArray,this.resolvedProperty=l):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(En.prototype,{_getValue_unbound:En.prototype.getValue,_setValue_unbound:En.prototype.setValue}),Object.assign(Sa.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._paths,l=this._parsedPaths,d=this._bindings,p=d.length,y=void 0,w=0,A=arguments.length;w!==A;++w){var P=arguments[w],B=P.uuid,H=n[B];if(H===void 0){H=e++,n[B]=H,t.push(P),B=0;for(var q=p;B!==q;++B)d[B].push(new En(P,o[B],l[B]))}else if(H<i){y=t[H];var $=--i;for(q=t[$],n[q.uuid]=H,t[H]=q,n[B]=$,t[$]=P,B=0,q=p;B!==q;++B){var rt=d[B],xt=rt[H];rt[H]=rt[$],xt===void 0&&(xt=new En(P,o[B],l[B])),rt[$]=xt}}else t[H]!==y&&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,l=0,d=arguments.length;l!==d;++l){var p=arguments[l],y=p.uuid,w=i[y];if(w!==void 0&&w>=e){var A=e++,P=t[A];for(i[P.uuid]=w,t[w]=P,i[y]=A,t[A]=p,p=0,y=o;p!==y;++p){P=n[p];var B=P[w];P[w]=P[A],P[A]=B}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,l=o.length,d=0,p=arguments.length;d!==p;++d){var y=arguments[d].uuid,w=n[y];if(w!==void 0)if(delete n[y],w<i){y=--i;var A=t[y],P=--e,B=t[P];for(n[A.uuid]=w,t[w]=A,n[B.uuid]=y,t[y]=B,t.pop(),A=0,B=l;A!==B;++A){var H=o[A],q=H[P];H[w]=H[y],H[y]=q,H.pop()}}else for(P=--e,B=t[P],n[B.uuid]=w,t[w]=B,t.pop(),A=0,B=l;A!==B;++A)H=o[A],H[w]=H[P],H.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 l=this._paths,d=this._parsedPaths,p=this._objects,y=this.nCachedObjects_,w=Array(p.length);for(n=o.length,i[t]=n,l.push(t),d.push(e),o.push(w),i=y,n=p.length;i!==n;++i)w[i]=new En(p[i],t,e);return w},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,o=this._parsedPaths,l=this._bindings,d=l.length-1,p=l[d];e[t[d]]=i,l[i]=p,l.pop(),o[i]=o[d],o.pop(),n[i]=n[d],n.pop()}}}),Object.assign(ml.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,l=this._timeScaleInterpolant,d=this.timeScale;return l===null&&(this._timeScaleInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=o,n[1]=o+i,l[0]=t/d,l[1]=e/d,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 l=0,d=e.length;l!==d;++l)e[l].evaluate(i),o[l].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,l=n===2202;if(t===0)return o===-1?e:l&&(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,l)):this._setEndings(this.repetitions===0,!0,l)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,o+=Math.abs(n);var d=this.repetitions-o;0>=d?(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})):(d===1?(t=0>t,this._setEndings(t,!t,l)):this._setEndings(!1,!1,l),this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(l&&(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,l=this._weightInterpolant;return l===null&&(this._weightInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=o,l[0]=e,n[1]=o+t,l[1]=i,this}}),rs.prototype=Object.assign(Object.create(a.prototype),{constructor:rs,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,l=t._propertyBindings;t=t._interpolants;var d=i.uuid,p=this._bindingsByRootAndName,y=p[d];for(y===void 0&&(y={},p[d]=y),p=0;p!==o;++p){var w=n[p],A=w.name,P=y[A];if(P===void 0){if(P=l[p],P!==void 0){P._cacheIndex===null&&(++P.referenceCount,this._addInactiveBinding(P,d,A));continue}P=new pl(En.create(i,A,e&&e._propertyBindings[p].binding.parsedPath),w.ValueTypeName,w.getValueSize()),++P.referenceCount,this._addInactiveBinding(P,d,A)}l[p]=P,t[p].resultBuffer=P.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,l=o[e];l===void 0?(l={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=l):(e=l.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),l.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,l=o[o.length-1],d=t._byClipCacheIndex;l._byClipCacheIndex=d,o[d]=l,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],l=this._bindings;o===void 0&&(o={},n[e]=o),o[i]=t,t._cacheIndex=l.length,l.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var o=this._bindingsByRootAndName,l=o[n],d=e[e.length-1];t=t._cacheIndex,d._cacheIndex=t,e[t]=d,e.pop(),delete l[i];t:{for(var p in l)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"?_r.findByName(i,t):t,t=i!==null?i.uuid:t;var o=this._actionsByClip[t],l=null;if(o!==void 0){if(l=o.actionByRoot[n],l!==void 0)return l;l=o.knownActions[0],i===null&&(i=l._clip)}return i===null?null:(e=new ml(this,i,e),this._bindAction(e,l),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?_r.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),l=this._accuIndex^=1,d=0;d!==i;++d)e[d]._update(n,t,o,l);for(t=this._bindings,e=this._nActiveBindings,d=0;d!==e;++d)t[d].apply(l);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,l=n.length;o!==l;++o){var d=n[o];this._deactivateAction(d);var p=d._cacheIndex,y=e[e.length-1];d._cacheIndex=null,d._byClipCacheIndex=null,y._cacheIndex=p,e[p]=y,e.pop(),this._removeInactiveBindingsForAction(d)}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))}}),oh.prototype.clone=function(){return new oh(this.value.clone===void 0?this.value:this.value.clone())},Hh.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Hh,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)}}),Vh.prototype=Object.assign(Object.create(ki.prototype),{constructor:Vh,isInstancedInterleavedBuffer:!0,copy:function(t){return ki.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Wh.prototype=Object.assign(Object.create(K.prototype),{constructor:Wh,isInstancedBufferAttribute:!0,copy:function(t){return K.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Ru.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||[],Ns(t,this,i,e),i.sort(gl),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++)Ns(t[n],this,i,e);return i.sort(gl),i}}),Object.assign(jh.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(di.clamp(e/this.radius,-1,1))),this}}),Object.assign(it.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(os.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 s;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 s),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 s),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 s),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 s),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new s;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(Ea.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 u),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 u),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 u),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new u,e=new u;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=di.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 u),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)}}),qn.prototype=Object.create(N.prototype),qn.prototype.constructor=qn,qn.prototype.isImmediateRenderObject=!0,_i.prototype=Object.create(gi.prototype),_i.prototype.constructor=_i,_i.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,l=this.geometry.attributes.position,d=this.object.geometry;if(d&&d.isGeometry)for(var p=d.vertices,y=d.faces,w=d=0,A=y.length;w<A;w++)for(var P=y[w],B=0,H=P.vertexNormals.length;B<H;B++){var q=P.vertexNormals[B];t.copy(p[P[n[B]]]).applyMatrix4(o),e.copy(q).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(d,t.x,t.y,t.z),d+=1,l.setXYZ(d,e.x,e.y,e.z),d+=1}else if(d&&d.isBufferGeometry)for(n=d.attributes.position,p=d.attributes.normal,B=d=0,H=n.count;B<H;B++)t.set(n.getX(B),n.getY(B),n.getZ(B)).applyMatrix4(o),e.set(p.getX(B),p.getY(B),p.getZ(B)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(d,t.x,t.y,t.z),d+=1,l.setXYZ(d,e.x,e.y,e.z),d+=1;l.needsUpdate=!0}}(),ba.prototype=Object.create(N.prototype),ba.prototype.constructor=ba,ba.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},ba.prototype.update=function(){var t=new u,e=new u;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)}}(),Ca.prototype=Object.create(gi.prototype),Ca.prototype.constructor=Ca,Ca.prototype.updateMatrixWorld=function(){var t=new u,e=new c,i=new c;return function(n){var o=this.bones,l=this.geometry,d=l.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var p=0,y=0;p<o.length;p++){var w=o[p];w.parent&&w.parent.isBone&&(e.multiplyMatrices(i,w.matrixWorld),t.setFromMatrixPosition(e),d.setXYZ(y,t.x,t.y,t.z),e.multiplyMatrices(i,w.parent.matrixWorld),t.setFromMatrixPosition(e),d.setXYZ(y+1,t.x,t.y,t.z),y+=2)}l.getAttribute("position").needsUpdate=!0,N.prototype.updateMatrixWorld.call(this,n)}}(),kr.prototype=Object.create(pi.prototype),kr.prototype.constructor=kr,kr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},kr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Aa.prototype=Object.create(N.prototype),Aa.prototype.constructor=Aa,Aa.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Aa.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)},Pa.prototype=Object.create(N.prototype),Pa.prototype.constructor=Pa,Pa.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Pa.prototype.update=function(){var t=new u,e=new L,i=new L;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 l=0,d=o.count;l<d;l++){var p=l<d/2?e:i;o.setXYZ(l,p.r,p.g,p.b)}o.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),vl.prototype=Object.create(gi.prototype),vl.prototype.constructor=vl,sh.prototype=Object.create(gi.prototype),sh.prototype.constructor=sh,yl.prototype=Object.create(gi.prototype),yl.prototype.constructor=yl,yl.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,o=this.geometry.attributes.position,l=this.object.geometry,d=l.vertices;l=l.faces;for(var p=0,y=0,w=l.length;y<w;y++){var A=l[y],P=A.normal;t.copy(d[A.a]).add(d[A.b]).add(d[A.c]).divideScalar(3).applyMatrix4(n),e.copy(P).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(p,t.x,t.y,t.z),p+=1,o.setXYZ(p,e.x,e.y,e.z),p+=1}o.needsUpdate=!0}}(),dr.prototype=Object.create(N.prototype),dr.prototype.constructor=dr,dr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},dr.prototype.update=function(){var t=new u,e=new u,i=new u;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()}}(),_l.prototype=Object.create(gi.prototype),_l.prototype.constructor=_l,_l.prototype.update=function(){function t(l,d,p,y){if(n.set(d,p,y).unproject(o),l=i[l],l!==void 0)for(d=e.getAttribute("position"),p=0,y=l.length;p<y;p++)d.setXYZ(l[p],n.x,n.y,n.z)}var e,i,n=new u,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}}(),zo.prototype=Object.create(gi.prototype),zo.prototype.constructor=zo,zo.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()}}}(),zo.prototype.setFromObject=function(t){return this.object=t,this.update(),this},zo.prototype.copy=function(t){return gi.prototype.copy.call(this,t),this.object=t.object,this},zo.prototype.clone=function(){return new this.constructor().copy(this)},xl.prototype=Object.create(gi.prototype),xl.prototype.constructor=xl,xl.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),N.prototype.updateMatrixWorld.call(this,t))},wl.prototype=Object.create(ji.prototype),wl.prototype.constructor=wl,wl.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),N.prototype.updateMatrixWorld.call(this,t)};var fh,El;ko.prototype=Object.create(N.prototype),ko.prototype.constructor=ko,ko.prototype.setDirection=function(){var t=new u,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))}}(),ko.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()},ko.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},ko.prototype.copy=function(t){return N.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},ko.prototype.clone=function(){return new this.constructor().copy(this)},xr.prototype=Object.create(gi.prototype),xr.prototype.constructor=xr,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(Io.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 X,i=0,n=t.length;i<n;i++){var o=t[i];e.vertices.push(new u(o.x,o.y,o.z||0))}return e}}),Object.assign(fr.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Iu.prototype=Object.create(On.prototype),Du.prototype=Object.create(On.prototype),Xh.prototype=Object.create(On.prototype),Object.assign(Xh.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.")}}),vl.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ca.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Do.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Us.extractUrlBase(t)}}),Object.assign(zs.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(cl.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(os.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)}}),Ea.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(di,{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()."),di.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),di.ceilPowerOfTwo(t)}}),Object.assign(m.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(c.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 u),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,l){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,l)}}),F.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},f.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(Si.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(Oe.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(Oe,{barycoordFromPoint:function(t,e,i,n,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Oe.getBarycoord(t,e,i,n,o)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Oe.getNormal(t,e,i,n)}}),Object.assign(Qn.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 Po(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Lo(this,t)}}),Object.assign(s.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(u.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(_.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(X.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(N.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(N.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(rn.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(un.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}}),_e.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(tn.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(K.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(po.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(oh.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(Wt.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 L}},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(Jr.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($e.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(xe.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(xe.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(ye.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(S.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.")}}}),Ma.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vn().load(t,function(i){e.setBuffer(i)}),this},ks.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},fl.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},ss.crossOrigin=void 0,ss.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new fn;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},ss.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new Fi;return o.setCrossOrigin(this.crossOrigin),t=o.load(t,i,void 0,n),e&&(t.mapping=e),t},ss.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},ss.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},x.WebGLRenderTargetCube=b,x.WebGLRenderTarget=S,x.WebGLRenderer=xe,x.ShaderLib=wo,x.UniformsLib=qe,x.UniformsUtils=Bn,x.ShaderChunk=Ci,x.FogExp2=Re,x.Fog=Sn,x.Scene=Xn,x.Sprite=nn,x.LOD=rn,x.SkinnedMesh=Gi,x.Skeleton=un,x.Bone=cn,x.Mesh=pi,x.LineSegments=gi,x.LineLoop=co,x.Line=ji,x.Points=la,x.Group=ci,x.VideoTexture=zh,x.DataTexture=I,x.DataTexture3D=Q,x.CompressedTexture=Yo,x.CubeTexture=z,x.CanvasTexture=Ka,x.DepthTexture=Qa,x.Texture=g,x.AnimationLoader=Qt,x.CompressedTextureLoader=Zt,x.DataTextureLoader=Ue,x.CubeTextureLoader=Fi,x.TextureLoader=fn,x.ObjectLoader=cl,x.MaterialLoader=ih,x.BufferGeometryLoader=Nh,x.DefaultLoadingManager=tr,x.LoadingManager=es,x.JSONLoader=zs,x.ImageLoader=ai,x.ImageBitmapLoader=Fh,x.FontLoader=Lu,x.FileLoader=Lt,x.Loader=Do,x.LoaderUtils=Us,x.Cache=Mo,x.AudioLoader=vn,x.SpotLightShadow=hl,x.SpotLight=ul,x.PointLight=Is,x.RectAreaLight=eh,x.HemisphereLight=ll,x.DirectionalLightShadow=ns,x.DirectionalLight=xo,x.AmbientLight=Ds,x.LightShadow=_o,x.Light=tn,x.StereoCamera=Vn,x.PerspectiveCamera=_e,x.OrthographicCamera=Ta,x.CubeCamera=fl,x.ArrayCamera=Fe,x.Camera=Be,x.AudioListener=rh,x.PositionalAudio=dl,x.AudioContext=$h,x.AudioAnalyser=ks,x.Audio=Ma,x.VectorKeyframeTrack=xa,x.StringKeyframeTrack=th,x.QuaternionKeyframeTrack=_a,x.NumberKeyframeTrack=$r,x.ColorKeyframeTrack=Ql,x.BooleanKeyframeTrack=Kl,x.PropertyMixer=pl,x.PropertyBinding=En,x.KeyframeTrack=Hn,x.AnimationUtils=Yn,x.AnimationObjectGroup=Sa,x.AnimationMixer=rs,x.AnimationClip=_r,x.Uniform=oh,x.InstancedBufferGeometry=Hh,x.BufferGeometry=Ft,x.Geometry=X,x.InterleavedBufferAttribute=Bi,x.InstancedInterleavedBuffer=Vh,x.InterleavedBuffer=ki,x.InstancedBufferAttribute=Wh,x.Face3=R,x.Object3D=N,x.Raycaster=Ru,x.Layers=U,x.EventDispatcher=a,x.Clock=Gh,x.QuaternionLinearInterpolant=ar,x.LinearInterpolant=Dr,x.DiscreteInterpolant=Os,x.CubicInterpolant=al,x.Interpolant=$n,x.Triangle=Oe,x.Math=di,x.Spherical=jh,x.Cylindrical=it,x.Plane=F,x.Frustum=E,x.Sphere=D,x.Ray=Si,x.Matrix4=c,x.Matrix3=m,x.Box3=k,x.Box2=os,x.Line3=Ea,x.Euler=C,x.Vector4=_,x.Vector3=u,x.Vector2=s,x.Quaternion=f,x.Color=L,x.ImmediateRenderObject=qn,x.VertexNormalsHelper=_i,x.SpotLightHelper=ba,x.SkeletonHelper=Ca,x.PointLightHelper=kr,x.RectAreaLightHelper=Aa,x.HemisphereLightHelper=Pa,x.GridHelper=vl,x.PolarGridHelper=sh,x.FaceNormalsHelper=yl,x.DirectionalLightHelper=dr,x.CameraHelper=_l,x.BoxHelper=zo,x.Box3Helper=xl,x.PlaneHelper=wl,x.ArrowHelper=ko,x.AxesHelper=xr,x.Shape=Qn,x.Path=fr,x.ShapePath=nh,x.Font=Uh,x.CurvePath=Io,x.Curve=Ee,x.ImageUtils=ss,x.ShapeUtils=To,x.WebGLUtils=He,x.WireframeGeometry=ha,x.ParametricGeometry=tl,x.ParametricBufferGeometry=ua,x.TetrahedronGeometry=el,x.TetrahedronBufferGeometry=ca,x.OctahedronGeometry=il,x.OctahedronBufferGeometry=_s,x.IcosahedronGeometry=nl,x.IcosahedronBufferGeometry=fa,x.DodecahedronGeometry=da,x.DodecahedronBufferGeometry=pa,x.PolyhedronGeometry=Xi,x.PolyhedronBufferGeometry=xi,x.TubeGeometry=gn,x.TubeBufferGeometry=Zo,x.TorusKnotGeometry=Zr,x.TorusKnotBufferGeometry=xs,x.TorusGeometry=ws,x.TorusBufferGeometry=Un,x.TextGeometry=ol,x.TextBufferGeometry=Ms,x.SphereGeometry=Jo,x.SphereBufferGeometry=Or,x.RingGeometry=sl,x.RingBufferGeometry=Ss,x.PlaneGeometry=Pe,x.PlaneBufferGeometry=pe,x.LatheGeometry=va,x.LatheBufferGeometry=$o,x.ShapeGeometry=Lo,x.ShapeBufferGeometry=Ko,x.ExtrudeGeometry=Po,x.ExtrudeBufferGeometry=po,x.EdgesGeometry=Qo,x.ConeGeometry=ya,x.ConeBufferGeometry=Gn,x.CylinderGeometry=Ro,x.CylinderBufferGeometry=Oo,x.CircleGeometry=Es,x.CircleBufferGeometry=mo,x.BoxGeometry=It,x.BoxBufferGeometry=Nt,x.ShadowMaterial=ts,x.SpriteMaterial=Hi,x.RawShaderMaterial=bs,x.ShaderMaterial=$e,x.PointsMaterial=Fn,x.MeshPhysicalMaterial=Cs,x.MeshStandardMaterial=go,x.MeshPhongMaterial=Jr,x.MeshToonMaterial=As,x.MeshNormalMaterial=Ps,x.MeshLambertMaterial=Ir,x.MeshDepthMaterial=se,x.MeshDistanceMaterial=te,x.MeshBasicMaterial=Ge,x.MeshMatcapMaterial=Ls,x.LineDashedMaterial=Rs,x.LineBasicMaterial=Ni,x.Material=Wt,x.Float64BufferAttribute=At,x.Float32BufferAttribute=Et,x.Uint32BufferAttribute=Pt,x.Int32BufferAttribute=G,x.Uint16BufferAttribute=_t,x.Int16BufferAttribute=tt,x.Uint8ClampedBufferAttribute=Rt,x.Uint8BufferAttribute=ct,x.Int8BufferAttribute=Z,x.BufferAttribute=K,x.ArcCurve=wa,x.CatmullRomCurve3=On,x.CubicBezierCurve=hr,x.CubicBezierCurve3=Ti,x.EllipseCurve=Kn,x.LineCurve=ur,x.LineCurve3=zr,x.QuadraticBezierCurve=cr,x.QuadraticBezierCurve3=yo,x.SplineCurve=Kr,x.REVISION="98",x.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},x.CullFaceNone=0,x.CullFaceBack=1,x.CullFaceFront=2,x.CullFaceFrontBack=3,x.FrontFaceDirectionCW=0,x.FrontFaceDirectionCCW=1,x.BasicShadowMap=0,x.PCFShadowMap=1,x.PCFSoftShadowMap=2,x.FrontSide=0,x.BackSide=1,x.DoubleSide=2,x.FlatShading=1,x.SmoothShading=2,x.NoColors=0,x.FaceColors=1,x.VertexColors=2,x.NoBlending=0,x.NormalBlending=1,x.AdditiveBlending=2,x.SubtractiveBlending=3,x.MultiplyBlending=4,x.CustomBlending=5,x.AddEquation=100,x.SubtractEquation=101,x.ReverseSubtractEquation=102,x.MinEquation=103,x.MaxEquation=104,x.ZeroFactor=200,x.OneFactor=201,x.SrcColorFactor=202,x.OneMinusSrcColorFactor=203,x.SrcAlphaFactor=204,x.OneMinusSrcAlphaFactor=205,x.DstAlphaFactor=206,x.OneMinusDstAlphaFactor=207,x.DstColorFactor=208,x.OneMinusDstColorFactor=209,x.SrcAlphaSaturateFactor=210,x.NeverDepth=0,x.AlwaysDepth=1,x.LessDepth=2,x.LessEqualDepth=3,x.EqualDepth=4,x.GreaterEqualDepth=5,x.GreaterDepth=6,x.NotEqualDepth=7,x.MultiplyOperation=0,x.MixOperation=1,x.AddOperation=2,x.NoToneMapping=0,x.LinearToneMapping=1,x.ReinhardToneMapping=2,x.Uncharted2ToneMapping=3,x.CineonToneMapping=4,x.UVMapping=300,x.CubeReflectionMapping=301,x.CubeRefractionMapping=302,x.EquirectangularReflectionMapping=303,x.EquirectangularRefractionMapping=304,x.SphericalReflectionMapping=305,x.CubeUVReflectionMapping=306,x.CubeUVRefractionMapping=307,x.RepeatWrapping=1e3,x.ClampToEdgeWrapping=1001,x.MirroredRepeatWrapping=1002,x.NearestFilter=1003,x.NearestMipMapNearestFilter=1004,x.NearestMipMapLinearFilter=1005,x.LinearFilter=1006,x.LinearMipMapNearestFilter=1007,x.LinearMipMapLinearFilter=1008,x.UnsignedByteType=1009,x.ByteType=1010,x.ShortType=1011,x.UnsignedShortType=1012,x.IntType=1013,x.UnsignedIntType=1014,x.FloatType=1015,x.HalfFloatType=1016,x.UnsignedShort4444Type=1017,x.UnsignedShort5551Type=1018,x.UnsignedShort565Type=1019,x.UnsignedInt248Type=1020,x.AlphaFormat=1021,x.RGBFormat=1022,x.RGBAFormat=1023,x.LuminanceFormat=1024,x.LuminanceAlphaFormat=1025,x.RGBEFormat=1023,x.DepthFormat=1026,x.DepthStencilFormat=1027,x.RedFormat=1028,x.RGB_S3TC_DXT1_Format=33776,x.RGBA_S3TC_DXT1_Format=33777,x.RGBA_S3TC_DXT3_Format=33778,x.RGBA_S3TC_DXT5_Format=33779,x.RGB_PVRTC_4BPPV1_Format=35840,x.RGB_PVRTC_2BPPV1_Format=35841,x.RGBA_PVRTC_4BPPV1_Format=35842,x.RGBA_PVRTC_2BPPV1_Format=35843,x.RGB_ETC1_Format=36196,x.RGBA_ASTC_4x4_Format=37808,x.RGBA_ASTC_5x4_Format=37809,x.RGBA_ASTC_5x5_Format=37810,x.RGBA_ASTC_6x5_Format=37811,x.RGBA_ASTC_6x6_Format=37812,x.RGBA_ASTC_8x5_Format=37813,x.RGBA_ASTC_8x6_Format=37814,x.RGBA_ASTC_8x8_Format=37815,x.RGBA_ASTC_10x5_Format=37816,x.RGBA_ASTC_10x6_Format=37817,x.RGBA_ASTC_10x8_Format=37818,x.RGBA_ASTC_10x10_Format=37819,x.RGBA_ASTC_12x10_Format=37820,x.RGBA_ASTC_12x12_Format=37821,x.LoopOnce=2200,x.LoopRepeat=2201,x.LoopPingPong=2202,x.InterpolateDiscrete=2300,x.InterpolateLinear=2301,x.InterpolateSmooth=2302,x.ZeroCurvatureEnding=2400,x.ZeroSlopeEnding=2401,x.WrapAroundEnding=2402,x.TrianglesDrawMode=0,x.TriangleStripDrawMode=1,x.TriangleFanDrawMode=2,x.LinearEncoding=3e3,x.sRGBEncoding=3001,x.GammaEncoding=3007,x.RGBEEncoding=3002,x.LogLuvEncoding=3003,x.RGBM7Encoding=3004,x.RGBM16Encoding=3005,x.RGBDEncoding=3006,x.BasicDepthPacking=3200,x.RGBADepthPacking=3201,x.TangentSpaceNormalMap=0,x.ObjectSpaceNormalMap=1,x.CubeGeometry=It,x.Face4=function(t,e,i,n,o,l,d){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new R(t,e,i,o,l,d)},x.LineStrip=0,x.LinePieces=1,x.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},x.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},x.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new la(t,e)},x.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new nn(t)},x.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new la(t,e)},x.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new u(t,e,i)},x.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new K(t,e).setDynamic(!0)},x.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Z(t,e)},x.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ct(t,e)},x.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Rt(t,e)},x.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new tt(t,e)},x.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new _t(t,e)},x.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new G(t,e)},x.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Pt(t,e)},x.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Et(t,e)},x.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new At(t,e)},x.ClosedSplineCurve3=Iu,x.SplineCurve3=Du,x.Spline=Xh,x.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new xr(t)},x.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new zo(t,e)},x.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new gi(new Qo(t.geometry),new Ni({color:e!==void 0?e:16777215}))},x.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new gi(new ha(t.geometry),new Ni({color:e!==void 0?e:16777215}))},x.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Lt(t)},x.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ue(t)},x.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()}},x.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().")}},x.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},x.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")}},x.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(x,"__esModule",{value:!0})}),THREE.Sky=function(){var x=THREE.Sky.SkyShader,a=new THREE.ShaderMaterial({fragmentShader:x.fragmentShader,vertexShader:x.vertexShader,uniforms:THREE.UniformsUtils.clone(x.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),a)},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(x){typeof module>"u"?window.charming=x:module.exports=x}(function(x,a){a=a||{};var s=a.tagName||"span",c=a.classPrefix!=null?a.classPrefix:"char",f=1,u=function(m){for(var g=m.parentNode,_=m.nodeValue,S=_.length,b=-1;++b<S;){var I=document.createElement(s);c&&(I.className=c+f,f++),I.appendChild(document.createTextNode(_[b])),g.insertBefore(I,m)}g.removeChild(m)};return function m(g){for(var _=[].slice.call(g.childNodes),S=_.length,b=-1;++b<S;)m(_[b]);g.nodeType===Node.TEXT_NODE&&u(g)}(x),x});class sm{constructor(a=[]){mars3d?(this.tilesetLayer,this.modelArr=a,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(a){this.modelArr.push(a)}add(a,s,c){let f=c==null?void 0:c.isClone;const u=new Map([["click",mars3d.EventType.click],["initialTilesLoaded",mars3d.EventType.initialTilesLoaded]]);return new Promise((m,g)=>{let _,S,b,I,k,D,F,E,L,T={enabled:!0,precise:!1,czm:!1},M={enabled:!0,precise:!1,czm:!1};if(typeof a!="object"){let N=this.query(a);N||g("缺少树结构");let{id:X,bimModelExcavationDetails:K,bimModel:Z}=N;_=X,S=Z.modelType,b=Z.tender,I=Z.releasedDistance,k=Z.modelName,D=Z.isDynamicReleased,F={bimModelExcavationDetails:K},E=N.url,L=Z.modelColor,T.maxCanvasSize=Z.gridResolution||4080}else _=a.modelId,S=a.modelType,b=a.tender,I=a.releasedDistance,k=a.modelTitle,D=a.permission,F=a.customize,E=a.url,L=a.color,T.maxCanvasSize=a.maxCanvasSize||4080;let R=2147483648,C=16;if(c){if(c.color&&(L=c.color),c.clip&&(T.area=c.clip.handleDataList),c.flat&&(M.area=c.flat.handleDataList),c.maxCanvasSize&&(T.maxCanvasSize=c.maxCanvasSize||4080),c.cacheSpaceMultiplier){let N=N*c.cacheSpaceMultiplier}c.maximumScreenSpaceError&&S==0&&(C=c.maximumScreenSpaceError)}let U;if(f?window.mapClone&&(U=window.mapClone.mapEx.getLayer(a,"modelId")):U=window.map.getLayer(a,"modelId"),U){if(c.color&&this.editColor(a,c.color,c),window.schemeEvnModify&&c.clip){let{modelId:N,handleDataList:X}=c.clip;X.forEach(K=>{let{id:Z,positions:ct}=K;window.schemeEvnModify.modelCutById(N,ct,Z)})}return m(U),!1}else{if(E.indexOf("tileset.json")<0)return console.error("链接不完整",k),m({tite:"【模型】「"+k+"」链接地址有误",type:"error",id:_,url:E}),!1;new Cesium.Resource({url:E}).fetchJson().then(X=>{let K=null;L&&(K={color:{conditions:[["true",L]]}}),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:_,modelType:S,tender:b,releasedDistance:I,modelTitle:k,permission:D,customize:F,url:encodeURI(E),skipLevelOfDetail:!1,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:K,clip:T,flat:M,maximumScreenSpaceError:C,cacheBytes:1073741824,maximumCacheOverflowBytes:R}),this.tilesetLayer.bindPopup(Z=>{if(Z.graphic){const ct=Z.graphic.attr;let Rt=null,tt=null;return JSON.stringify(ct)!=="{}"?(ct.name&&(Rt=ct.name.lastIndexOf("@")),Rt&&Rt>-1&&(tt=ct.name.slice(0,Rt)),ct.name?`&nbsp;&nbsp;<span>${tt||ct.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(Z=>{if(Z.layer.environmentMapManager.enabled=!1,(c==null?void 0:c.light)==!1){const ct=new Cesium.CustomShader({lightingModel:Cesium.LightingModel.UNLIT});Z.layer.customShader=ct}m(Z)}).catch(Z=>{console.log("加载失败",Z),m()}),this.tilesetLayer.on("click",Z=>{Z.layer.style==null&&map.bimMapEdit=="0"&&Z.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),s&&Object.keys(s).forEach(Z=>{this.tilesetLayer.on(u.get(Z),ct=>{s[Z](ct)})}),S==0&&this.bimObliquePhotographyId.push(_),f?window.mapClone&&window.mapClone.mapEx.addLayer(this.tilesetLayer):window.map.addLayer(this.tilesetLayer)}).catch(X=>{console.error("数据加载失败",k),m({tite:"【模型】「"+k+"」无法加载",type:"error",id:_,url:E})})}})}remove(a,s){let c=s==null?void 0:s.isClone;window.map.getLayer(a,"modelId")&&(c?(window.mapClone.mapEx.getLayer(a,"modelId").closeHighlight(),window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"modelId"))):(window.map.getLayer(a,"modelId").closeHighlight(),window.map.removeLayer(window.map.getLayer(a,"modelId"))))}selected(a,s,c,f=!0){return new Promise((u,m)=>{let g=window.map.getLayer(a,"modelId");g?(g.style==null&&map.bimMapEdit=="0"&&g.openHighlight({color:"rgba(255,0,0,1)"},!0),f?g.flyTo({complete:()=>{u(g)}}):u(g)):this.add(a,s,c).then(_=>{_&&(_.style==null&&map.bimMapEdit=="0"&&_.openHighlight({color:"rgba(255,0,0,1)"},!0),f?_.flyTo({complete:()=>{u(_)}}):u(_))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(a){return this.modelArr.length==0?!1:this.modelArr.find(s=>s.id==a)}queryModel(a,s){return(s==null?void 0:s.isClone)?window.mapClone.mapEx.getLayer(a,"modelId"):window.map.getLayer(a,"modelId")}postEditDate(a){this.editDate={id:a}}editColor(a,s,c,f="true"){let u,m=c==null?void 0:c.isClone;if(typeof a!="object"&&(m?u=window.mapClone.mapEx.getLayer(a,"modelId"):u=window.map.getLayer(a,"modelId")),u)if(s)u.style={color:{conditions:[[f,s]]}};else{let g=this.query(a).bimModel.modelColor;g?u.style={color:{conditions:[[f,g]]}}:u.style=null}}editOpacity(a,s){window.map.getLayer(a,"modelId").opacity=s}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipModelAdd(a)):c("挖洞工具未初始化")})}removeClip(a){window.bimClip?window.bimClip.clipModelremoveClip(a):console.log("挖洞工具未初始化")}}const su=x=>Object.prototype.toString.call(x)==="[object Object]";function au(){const x=Array.from(arguments);if(x.length<2)return x[0];let a=x[0];return x.shift(),x.forEach(s=>{if(su(s)){su(a)||(a={});for(let c in s)a[c]&&su(s[c])?a[c]=au(a[c],s[c]):a[c]=s[c]}else s instanceof Array&&(a instanceof Array||(a=[]),s.forEach((c,f)=>{su(c)?a[f]=au(a[f]):a[f]=c}))}),a}let vh={};const bf=(x,a,s)=>{vh={};let{vectorStyle:c,difference:f}=x;if(c){let{divType:u}=c,m="";if(u){let{theme_color:g,title:_,font_color:S,content:b,scaleByDistance:I,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R,divStyle:C,isMirror:U}=c,{theme_color2:N,theme_color3:X}=C;switch(u){case"1":m=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${g};--theme-font-color1:${S};">
2573
+ `)},function(x){typeof module>"u"?window.charming=x:module.exports=x}(function(x,a){a=a||{};var s=a.tagName||"span",c=a.classPrefix!=null?a.classPrefix:"char",f=1,u=function(m){for(var g=m.parentNode,_=m.nodeValue,S=_.length,b=-1;++b<S;){var I=document.createElement(s);c&&(I.className=c+f,f++),I.appendChild(document.createTextNode(_[b])),g.insertBefore(I,m)}g.removeChild(m)};return function m(g){for(var _=[].slice.call(g.childNodes),S=_.length,b=-1;++b<S;)m(_[b]);g.nodeType===Node.TEXT_NODE&&u(g)}(x),x});class sm{constructor(a=[]){mars3d?(this.tilesetLayer,this.modelArr=a,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(a){this.modelArr.push(a)}add(a,s,c){let f=c==null?void 0:c.isClone;const u=new Map([["click",mars3d.EventType.click],["initialTilesLoaded",mars3d.EventType.initialTilesLoaded]]);return new Promise((m,g)=>{let _,S,b,I,k,D,F,E,L,T={enabled:!0,precise:!1,czm:!1},M={enabled:!0,precise:!1,czm:!1};if(typeof a!="object"){let N=this.query(a);N||g("缺少树结构");let{id:X,bimModelExcavationDetails:K,bimModel:Z}=N;_=X,S=Z.modelType,b=Z.tender,I=Z.releasedDistance,k=Z.modelName,D=Z.isDynamicReleased,F={bimModelExcavationDetails:K},E=N.url,L=Z.modelColor,T.maxCanvasSize=Z.gridResolution||4080}else _=a.modelId,S=a.modelType,b=a.tender,I=a.releasedDistance,k=a.modelTitle,D=a.permission,F=a.customize,E=a.url,L=a.color,T.maxCanvasSize=a.maxCanvasSize||4080;let R=2147483648,C=16;if(c){if(c.color&&(L=c.color),c.clip&&(T.area=c.clip.handleDataList),c.flat&&(M.area=c.flat.handleDataList),c.maxCanvasSize&&(T.maxCanvasSize=c.maxCanvasSize||4080),c.cacheSpaceMultiplier){let N=N*c.cacheSpaceMultiplier}c.maximumScreenSpaceError&&S==0&&(C=c.maximumScreenSpaceError)}let U;if(f?window.mapClone&&(U=window.mapClone.mapEx.getLayer(a,"modelId")):U=window.map.getLayer(a,"modelId"),U){if(c.color&&this.editColor(a,c.color,c),window.schemeEvnModify&&c.clip){let{modelId:N,handleDataList:X}=c.clip;X.forEach(K=>{let{id:Z,positions:ct}=K;window.schemeEvnModify.modelCutById(N,ct,Z)})}return m(U),!1}else{if(E.indexOf("tileset.json")<0)return console.error("链接不完整",k),m({tite:"【模型】「"+k+"」链接地址有误",type:"error",id:_,url:E}),!1;new Cesium.Resource({url:E}).fetchJson().then(X=>{let K=null;L&&(K={color:{conditions:[["true",L]]}}),console.log(_),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:_,modelType:S,tender:b,releasedDistance:I,modelTitle:k,permission:D,customize:F,url:encodeURI(E),skipLevelOfDetail:!1,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:K,clip:T,flat:M,maximumScreenSpaceError:C,cacheBytes:1073741824,maximumCacheOverflowBytes:R,environmentMapManager:{enabled:!1}}),this.tilesetLayer.bindPopup(Z=>{if(Z.graphic){const ct=Z.graphic.attr;let Rt=null,tt=null;return JSON.stringify(ct)!=="{}"?(ct.name&&(Rt=ct.name.lastIndexOf("@")),Rt&&Rt>-1&&(tt=ct.name.slice(0,Rt)),ct.name?`&nbsp;&nbsp;<span>${tt||ct.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(Z=>{if(Z.layer.environmentMapManager.enabled=!1,console.log("模型加载完成",Z),(c==null?void 0:c.light)==!1){const ct=new Cesium.CustomShader({lightingModel:Cesium.LightingModel.UNLIT});Z.layer.customShader=ct}m(Z)}).catch(Z=>{console.log("加载失败",Z),m()}),this.tilesetLayer.on("click",Z=>{Z.layer.style==null&&map.bimMapEdit=="0"&&Z.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),s&&Object.keys(s).forEach(Z=>{this.tilesetLayer.on(u.get(Z),ct=>{s[Z](ct)})}),S==0&&this.bimObliquePhotographyId.push(_),f?window.mapClone&&window.mapClone.mapEx.addLayer(this.tilesetLayer):window.map.addLayer(this.tilesetLayer)}).catch(X=>{console.error("数据加载失败",k),m({tite:"【模型】「"+k+"」无法加载",type:"error",id:_,url:E})})}})}remove(a,s){let c=s==null?void 0:s.isClone;window.map.getLayer(a,"modelId")&&(c?(window.mapClone.mapEx.getLayer(a,"modelId").closeHighlight(),window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"modelId"))):(window.map.getLayer(a,"modelId").closeHighlight(),window.map.removeLayer(window.map.getLayer(a,"modelId"))))}selected(a,s,c,f=!0){return new Promise((u,m)=>{let g=window.map.getLayer(a,"modelId");g?(g.style==null&&map.bimMapEdit=="0"&&g.openHighlight({color:"rgba(255,0,0,1)"},!0),f?g.flyTo({complete:()=>{u(g)}}):u(g)):this.add(a,s,c).then(_=>{_&&(_.style==null&&map.bimMapEdit=="0"&&_.openHighlight({color:"rgba(255,0,0,1)"},!0),f?_.flyTo({complete:()=>{u(_)}}):u(_))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(a){return this.modelArr.length==0?!1:this.modelArr.find(s=>s.id==a)}queryModel(a,s){return(s==null?void 0:s.isClone)?window.mapClone.mapEx.getLayer(a,"modelId"):window.map.getLayer(a,"modelId")}postEditDate(a){this.editDate={id:a}}editColor(a,s,c,f="true"){let u,m=c==null?void 0:c.isClone;if(typeof a!="object"&&(m?u=window.mapClone.mapEx.getLayer(a,"modelId"):u=window.map.getLayer(a,"modelId")),u)if(s)u.style={color:{conditions:[[f,s]]}};else{let g=this.query(a).bimModel.modelColor;g?u.style={color:{conditions:[[f,g]]}}:u.style=null}}editOpacity(a,s){window.map.getLayer(a,"modelId").opacity=s}addClip(a){return new Promise((s,c)=>{window.bimClip?s(bimClip.clipModelAdd(a)):c("挖洞工具未初始化")})}removeClip(a){window.bimClip?window.bimClip.clipModelremoveClip(a):console.log("挖洞工具未初始化")}}const su=x=>Object.prototype.toString.call(x)==="[object Object]";function au(){const x=Array.from(arguments);if(x.length<2)return x[0];let a=x[0];return x.shift(),x.forEach(s=>{if(su(s)){su(a)||(a={});for(let c in s)a[c]&&su(s[c])?a[c]=au(a[c],s[c]):a[c]=s[c]}else s instanceof Array&&(a instanceof Array||(a=[]),s.forEach((c,f)=>{su(c)?a[f]=au(a[f]):a[f]=c}))}),a}let vh={};const bf=(x,a,s)=>{vh={};let{vectorStyle:c,difference:f}=x;if(c){let{divType:u}=c,m="";if(u){let{theme_color:g,title:_,font_color:S,content:b,scaleByDistance:I,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R,divStyle:C,isMirror:U}=c,{theme_color2:N,theme_color3:X}=C;switch(u){case"1":m=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${g};--theme-font-color1:${S};">
2574
2574
  <div class="title">${_}</div>
2575
2575
  </div >`;break;case"2":m=`<div class="entity-div-style entity-div-style2" style="--theme-color1:${g};--theme-font-color1:${S};">
2576
2576
  <div class="title">${_}</div>
@@ -2699,4 +2699,4 @@ function print() { __p += __j.call(arguments, '') }
2699
2699
  * Subject to the terms at https://gsap.com/standard-license or for
2700
2700
  * Club GSAP members, the agreement issued with that membership.
2701
2701
  * @author: Jack Doyle, jack@greensock.com
2702
- */var Sd,Qs,Nl,Ic,Wa,Ed,Dc,ug=function(){return typeof window<"u"},ds={},ja=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,bd=1e8,zc=/([A-Z])/g,cg=/(left|right|width|margin|padding|x)/i,fg=/[\s,\(]\S/,jo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},kc=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},dg=function(a,s){return s.set(s.t,s.p,a===1?s.e:Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},pg=function(a,s){return s.set(s.t,s.p,a?Math.round((s.s+s.c*a)*1e4)/1e4+s.u:s.b,s)},mg=function(a,s){var c=s.s+s.c*a;s.set(s.t,s.p,~~(c+(c<0?-.5:.5))+s.u,s)},Cd=function(a,s){return s.set(s.t,s.p,a?s.e:s.b,s)},Ad=function(a,s){return s.set(s.t,s.p,a!==1?s.b:s.e,s)},gg=function(a,s,c){return a.style[s]=c},vg=function(a,s,c){return a.style.setProperty(s,c)},yg=function(a,s,c){return a._gsap[s]=c},_g=function(a,s,c){return a._gsap.scaleX=a._gsap.scaleY=c},xg=function(a,s,c,f,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},wg=function(a,s,c,f,u){var m=a._gsap;m[s]=c,m.renderTransform(u,m)},pn="transform",Lr=pn+"Origin",Tg=function x(a,s){var c=this,f=this.target,u=f.style,m=f._gsap;if(a in ds&&u){if(this.tfm=this.tfm||{},a!=="transform")a=jo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=ps(f,g)}):this.tfm[a]=m.x?m[a]:ps(f,a),a===Lr&&(this.tfm.zOrigin=m.zOrigin);else return jo.transform.split(",").forEach(function(g){return x.call(c,g,s)});if(this.props.indexOf(pn)>=0)return;m.svg&&(this.svgo=f.getAttribute("data-svg-origin"),this.props.push(Lr,s,"")),a=pn}(u||s)&&this.props.push(a,s,u[a])},Pd=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Mg=function(){var a=this.props,s=this.target,c=s.style,f=s._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?s[a[u]]=a[u+2]:a[u+2]?c[a[u]]=a[u+2]:c.removeProperty(a[u].substr(0,2)==="--"?a[u]:a[u].replace(zc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)f[m]=this.tfm[m];f.svg&&(f.renderTransform(),s.setAttribute("data-svg-origin",this.svgo||"")),u=Dc(),(!u||!u.isStart)&&!c[pn]&&(Pd(c),f.zOrigin&&c[Lr]&&(c[Lr]+=" "+f.zOrigin+"px",f.zOrigin=0,f.renderTransform()),f.uncache=1)}},Ld=function(a,s){var c={target:a,props:[],revert:Mg,save:Tg};return a._gsap||Pr.core.getCache(a),s&&s.split(",").forEach(function(f){return c.save(f)}),c},Rd,Bc=function(a,s){var c=Qs.createElementNS?Qs.createElementNS((s||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):Qs.createElement(a);return c&&c.style?c:Qs.createElement(a)},Xo=function x(a,s,c){var f=getComputedStyle(a);return f[s]||f.getPropertyValue(s.replace(zc,"-$1").toLowerCase())||f.getPropertyValue(s)||!c&&x(a,Gl(s)||s,1)||""},Od="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,s,c){var f=s||Wa,u=f.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Od[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Od[m]:"")+a},Nc=function(){ug()&&window.document&&(Sd=window,Qs=Sd.document,Nl=Qs.documentElement,Wa=Bc("div")||{style:{}},Bc("div"),pn=Gl(pn),Lr=pn+"Origin",Wa.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Rd=!!Gl("perspective"),Dc=Pr.core.reverting,Ic=1)},Fc=function x(a){var s=Bc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),c=this.parentNode,f=this.nextSibling,u=this.style.cssText,m;if(Nl.appendChild(s),s.appendChild(this),this.style.display="block",a)try{m=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=x}catch{}else this._gsapBBox&&(m=this._gsapBBox());return c&&(f?c.insertBefore(this,f):c.appendChild(this)),Nl.removeChild(s),this.style.cssText=u,m},Id=function(a,s){for(var c=s.length;c--;)if(a.hasAttribute(s[c]))return a.getAttribute(s[c])},Dd=function(a){var s;try{s=a.getBBox()}catch{s=Fc.call(a,!0)}return s&&(s.width||s.height)||a.getBBox===Fc||(s=Fc.call(a,!0)),s&&!s.width&&!s.x&&!s.y?{x:+Id(a,["x","cx","x1"])||0,y:+Id(a,["y","cy","y1"])||0,width:0,height:0}:s},zd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&Dd(a))},Xa=function(a,s){if(s){var c=a.style,f;s in ds&&s!==Lr&&(s=pn),c.removeProperty?(f=s.substr(0,2),(f==="ms"||s.substr(0,6)==="webkit")&&(s="-"+s),c.removeProperty(f==="--"?s:s.replace(zc,"-$1").toLowerCase())):c.removeAttribute(s)}},ta=function(a,s,c,f,u,m){var g=new Ar(a._pt,s,c,0,1,m?Ad:Cd);return a._pt=g,g.b=f,g.e=u,a._props.push(c),g},kd={deg:1,rad:1,turn:1},Sg={grid:1,flex:1},ea=function x(a,s,c,f){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Wa.style,_=cg.test(s),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(_?"Width":"Height"),I=100,k=f==="px",D=f==="%",F,E,L,T;if(f===m||!u||kd[f]||kd[m])return u;if(m!=="px"&&!k&&(u=x(a,s,c,"px")),T=a.getCTM&&zd(a),(D||m==="%")&&(ds[s]||~s.indexOf("adius")))return F=T?a.getBBox()[_?"width":"height"]:a[b],Rn(D?u/F*I:u/100*F);if(g[_?"width":"height"]=I+(k?m:f),E=~s.indexOf("adius")||f==="em"&&a.appendChild&&!S?a:a.parentNode,T&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===Qs||!E.appendChild)&&(E=Qs.body),L=E._gsap,L&&D&&L.width&&_&&L.time===Xr.time&&!L.uncache)return Rn(u/L.width*I);if(D&&(s==="height"||s==="width")){var M=a.style[s];a.style[s]=I+f,F=a[b],M?a.style[s]=M:Xa(a,s)}else(D||m==="%")&&!Sg[Xo(E,"display")]&&(g.position=Xo(a,"position")),E===a&&(g.position="static"),E.appendChild(Wa),F=Wa[b],E.removeChild(Wa),g.position="absolute";return _&&D&&(L=Na(E),L.time=Xr.time,L.width=E[b]),Rn(k?F*u/I:F&&u?I/F*u:0)},ps=function(a,s,c,f){var u;return Ic||Nc(),s in jo&&s!=="transform"&&(s=jo[s],~s.indexOf(",")&&(s=s.split(",")[0])),ds[s]&&s!=="transform"?(u=Lh(a,f),u=s!=="transformOrigin"?u[s]:u.svg?u.origin:Mu(Xo(a,Lr))+" "+u.zOrigin+"px"):(u=a.style[s],(!u||u==="auto"||f||~(u+"").indexOf("calc("))&&(u=Tu[s]&&Tu[s](a,s,c)||Xo(a,s)||Uf(a,s)||(s==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?ea(a,s,u,c)+c:u},Eg=function(a,s,c,f){if(!c||c==="none"){var u=Gl(s,a,1),m=u&&Xo(a,u,1);m&&m!==c?(s=u,c=m):s==="borderColor"&&(c=Xo(a,"borderTopColor"))}var g=new Ar(this._pt,a.style,s,0,1,xd),_=0,S=0,b,I,k,D,F,E,L,T,M,R,C,U;if(g.b=c,g.e=f,c+="",f+="",f==="auto"&&(E=a.style[s],a.style[s]=f,f=Xo(a,s)||f,E?a.style[s]=E:Xa(a,s)),b=[c,f],ud(b),c=b[0],f=b[1],k=c.match(Ol)||[],U=f.match(Ol)||[],U.length){for(;I=Ol.exec(f);)L=I[0],M=f.substring(_,I.index),F?F=(F+1)%5:(M.substr(-5)==="rgba("||M.substr(-5)==="hsla(")&&(F=1),L!==(E=k[S++]||"")&&(D=parseFloat(E)||0,C=E.substr((D+"").length),L.charAt(1)==="="&&(L=Il(D,L)+C),T=parseFloat(L),R=L.substr((T+"").length),_=Ol.lastIndex-R.length,R||(R=R||Hr.units[s]||C,_===f.length&&(f+=R,g.e+=R)),C!==R&&(D=ea(a,s,E,R)||0),g._pt={_next:g._pt,p:M||S===1?M:",",s:D,c:T-D,m:F&&F<4||s==="zIndex"?Math.round:0});g.c=_<f.length?f.substring(_,f.length):""}else g.r=s==="display"&&f==="none"?Ad:Cd;return If.test(f)&&(g.e=0),this._pt=g,g},Bd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},bg=function(a){var s=a.split(" "),c=s[0],f=s[1]||"50%";return(c==="top"||c==="bottom"||f==="left"||f==="right")&&(a=c,c=f,f=a),s[0]=Bd[c]||c,s[1]=Bd[f]||f,s.join(" ")},Cg=function(a,s){if(s.tween&&s.tween._time===s.tween._dur){var c=s.t,f=c.style,u=s.u,m=c._gsap,g,_,S;if(u==="all"||u===!0)f.cssText="",_=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ds[g]&&(_=1,g=g==="transformOrigin"?Lr:pn),Xa(c,g);_&&(Xa(c,pn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Pd(f)))}},Tu={clearProps:function(a,s,c,f,u){if(u.data!=="isFromStart"){var m=a._pt=new Ar(a._pt,s,c,0,0,Cg);return m.u=f,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Nd={},Fd=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Ud=function(a){var s=Xo(a,pn);return Fd(s)?Ph:s.substr(7).match(Of).map(Rn)},Uc=function(a,s){var c=a._gsap||Na(a),f=a.style,u=Ud(a),m,g,_,S;return c.svg&&a.getAttribute("transform")?(_=a.transform.baseVal.consolidate().matrix,u=[_.a,_.b,_.c,_.d,_.e,_.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(_=f.display,f.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Ud(a),_?f.display=_:Xa(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),s&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Gc=function(a,s,c,f,u,m){var g=a._gsap,_=u||Uc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,I=g.xOffset||0,k=g.yOffset||0,D=_[0],F=_[1],E=_[2],L=_[3],T=_[4],M=_[5],R=s.split(" "),C=parseFloat(R[0])||0,U=parseFloat(R[1])||0,N,X,K,Z;c?_!==Ph&&(X=D*L-F*E)&&(K=C*(L/X)+U*(-E/X)+(E*M-L*T)/X,Z=C*(-F/X)+U*(D/X)-(D*M-F*T)/X,C=K,U=Z):(N=Dd(a),C=N.x+(~R[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(R[1]||R[0]).indexOf("%")?U/100*N.height:U)),f||f!==!1&&g.smooth?(T=C-S,M=U-b,g.xOffset=I+(T*D+M*E)-T,g.yOffset=k+(T*F+M*L)-M):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!f,g.origin=s,g.originIsAbsolute=!!c,a.style[Lr]="0px 0px",m&&(ta(m,g,"xOrigin",S,C),ta(m,g,"yOrigin",b,U),ta(m,g,"xOffset",I,g.xOffset),ta(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,s){var c=a._gsap||new pd(a);if("x"in c&&!s&&!c.uncache)return c;var f=a.style,u=c.scaleX<0,m="px",g="deg",_=getComputedStyle(a),S=Xo(a,Lr)||"0",b,I,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,tt,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=I=k=E=L=T=M=R=C=0,D=F=1,c.svg=!!(a.getCTM&&zd(a)),_.translate&&((_.translate!=="none"||_.scale!=="none"||_.rotate!=="none")&&(f[pn]=(_.translate!=="none"?"translate3d("+(_.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(_.rotate!=="none"?"rotate("+_.rotate+") ":"")+(_.scale!=="none"?"scale("+_.scale.split(" ").join(",")+") ":"")+(_[pn]!=="none"?_[pn]:"")),f.scale=f.rotate=f.translate="none"),X=Uc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!s&&a.getAttribute("data-svg-origin"),Gc(a,At||S,!!At||c.originIsAbsolute,c.smooth!==!1,X)),U=c.xOrigin||0,N=c.yOrigin||0,X!==Ph&&(Rt=X[0],tt=X[1],_t=X[2],G=X[3],b=Pt=X[4],I=Et=X[5],X.length===6?(D=Math.sqrt(Rt*Rt+tt*tt),F=Math.sqrt(G*G+_t*_t),E=Rt||tt?Ul(tt,Rt)*ja:0,M=_t||G?Ul(_t,G)*ja+E:0,M&&(F*=Math.abs(Math.cos(M*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),I-=N-(U*tt+N*G))):(Wt=X[6],Pe=X[7],Ft=X[8],It=X[9],Nt=X[10],pe=X[11],b=X[12],I=X[13],k=X[14],K=Ul(Wt,Nt),L=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Pt*Z+Ft*ct,ce=Et*Z+It*ct,re=Wt*Z+Nt*ct,Ft=Pt*-ct+Ft*Z,It=Et*-ct+It*Z,Nt=Wt*-ct+Nt*Z,pe=Pe*-ct+pe*Z,Pt=At,Et=ce,Wt=re),K=Ul(-_t,Nt),T=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Rt*Z-Ft*ct,ce=tt*Z-It*ct,re=_t*Z-Nt*ct,pe=G*ct+pe*Z,Rt=At,tt=ce,_t=re),K=Ul(tt,Rt),E=K*ja,K&&(Z=Math.cos(K),ct=Math.sin(K),At=Rt*Z+tt*ct,ce=Pt*Z+Et*ct,tt=tt*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),L&&Math.abs(L)+Math.abs(E)>359.9&&(L=E=0,T=180-T),D=Rn(Math.sqrt(Rt*Rt+tt*tt+_t*_t)),F=Rn(Math.sqrt(Et*Et+Wt*Wt)),K=Ul(Pt,Et),M=Math.abs(K)>2e-4?K*ja:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Fd(Xo(a,pn)),At&&a.setAttribute("transform",At))),Math.abs(M)>90&&Math.abs(M)<270&&(u?(D*=-1,M+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,M+=M<=0?180:-180)),s=s||c.uncache,c.x=b-((c.xPercent=b&&(!s&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=I-((c.yPercent=I&&(!s&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-I)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=Rn(D),c.scaleY=Rn(F),c.rotation=Rn(E)+g,c.rotationX=Rn(L)+g,c.rotationY=Rn(T)+g,c.skewX=M+g,c.skewY=R+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!s&&c.zOrigin||0)&&(f[Lr]=Mu(S)),c.xOffset=c.yOffset=0,c.force3D=Hr.force3D,c.renderTransform=c.svg?Pg:Rd?Gd:Ag,c.uncache=0,c},Mu=function(a){return(a=a.split(" "))[0]+" "+a[1]},Hc=function(a,s,c){var f=or(s);return Rn(parseFloat(s)+parseFloat(ea(a,"x",c+"px",f)))+f},Ag=function(a,s){s.z="0px",s.rotationY=s.rotationX="0deg",s.force3D=0,Gd(a,s)},qa="0deg",Rh="0px",Ya=") ",Gd=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.z,S=c.rotation,b=c.rotationY,I=c.rotationX,k=c.skewX,D=c.skewY,F=c.scaleX,E=c.scaleY,L=c.transformPerspective,T=c.force3D,M=c.target,R=c.zOrigin,C="",U=T==="auto"&&a&&a!==1||T===!0;if(R&&(I!==qa||b!==qa)){var N=parseFloat(b)*Fl,X=Math.sin(N),K=Math.cos(N),Z;N=parseFloat(I)*Fl,Z=Math.cos(N),m=Hc(M,m,X*Z*-R),g=Hc(M,g,-Math.sin(N)*-R),_=Hc(M,_,K*Z*-R+R)}L!==Rh&&(C+="perspective("+L+Ya),(f||u)&&(C+="translate("+f+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||_!==Rh)&&(C+=_!==Rh||U?"translate3d("+m+", "+g+", "+_+") ":"translate("+m+", "+g+Ya),S!==qa&&(C+="rotate("+S+Ya),b!==qa&&(C+="rotateY("+b+Ya),I!==qa&&(C+="rotateX("+I+Ya),(k!==qa||D!==qa)&&(C+="skew("+k+", "+D+Ya),(F!==1||E!==1)&&(C+="scale("+F+", "+E+Ya),M.style[pn]=C||"translate(0, 0)"},Pg=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.rotation,S=c.skewX,b=c.skewY,I=c.scaleX,k=c.scaleY,D=c.target,F=c.xOrigin,E=c.yOrigin,L=c.xOffset,T=c.yOffset,M=c.forceCSS,R=parseFloat(m),C=parseFloat(g),U,N,X,K,Z;_=parseFloat(_),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,_+=b),_||S?(_*=Fl,S*=Fl,U=Math.cos(_)*I,N=Math.sin(_)*I,X=Math.sin(_-S)*-k,K=Math.cos(_-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,K*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=Rn(U),N=Rn(N),X=Rn(X),K=Rn(K)):(U=I,K=k,N=X=0),(R&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(R=ea(D,"x",m,"px"),C=ea(D,"y",g,"px")),(F||E||L||T)&&(R=Rn(R+F-(F*U+E*X)+L),C=Rn(C+E-(F*N+E*K)+T)),(f||u)&&(Z=D.getBBox(),R=Rn(R+f/100*Z.width),C=Rn(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+K+","+R+","+C+")",D.setAttribute("transform",Z),M&&(D.style[pn]=Z)},Lg=function(a,s,c,f,u){var m=360,g=Wn(u),_=parseFloat(u)*(g&&~u.indexOf("rad")?ja:1),S=_-f,b=f+S+"deg",I,k;return g&&(I=u.split("_")[1],I==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),I==="cw"&&S<0?S=(S+m*bd)%m-~~(S/m)*m:I==="ccw"&&S>0&&(S=(S-m*bd)%m-~~(S/m)*m)),a._pt=k=new Ar(a._pt,s,c,f,S,dg),k.e=b,k.u="deg",a._props.push(c),k},Hd=function(a,s){for(var c in s)a[c]=s[c];return a},Rg=function(a,s,c){var f=Hd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,_,S,b,I,k,D,F;f.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[pn]=s,g=Lh(c,1),Xa(c,pn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[pn],m[pn]=s,g=Lh(c,1),m[pn]=S);for(_ in ds)S=f[_],b=g[_],S!==b&&u.indexOf(_)<0&&(D=or(S),F=or(b),I=D!==F?ea(c,_,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Ar(a._pt,g,_,I,k-I,kc),a._pt.u=F||0,a._props.push(_));Hd(g,f)};Cr("padding,margin,Width,Radius",function(x,a){var s="Top",c="Right",f="Bottom",u="Left",m=(a<3?[s,c,f,u]:[s+u,s+c,f+c,f+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,_,S,b,I){var k,D;if(arguments.length<4)return k=m.map(function(F){return ps(g,F,S)}),D=k.join(" "),D.split(k[0]).length===5?k[0]:D;k=(b+"").split(" "),D={},m.forEach(function(F,E){return D[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(_,D,I)}});var Vd={name:"css",register:Nc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,s,c,f,u){var m=this._props,g=a.style,_=c.vars.startAt,S,b,I,k,D,F,E,L,T,M,R,C,U,N,X,K;Ic||Nc(),this.styles=this.styles||Ld(a),K=this.styles.props,this.tween=c;for(E in s)if(E!=="autoRound"&&(b=s[E],!(Wr[E]&&md(E,s,c,f,a,u)))){if(D=typeof b,F=Tu[E],D==="function"&&(b=b.call(c,f,a,u),D=typeof b),D==="string"&&~b.indexOf("random(")&&(b=Mh(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",$s.lastIndex=0,$s.test(S)||(L=or(S),T=or(b)),T?L!==T&&(S=ea(a,E,S,T)+T):L&&(b+=L),this.add(g,"setProperty",S,b,f,u,0,0,E),m.push(E),K.push(E,0,g[E]);else if(D!=="undefined"){if(_&&E in _?(S=typeof _[E]=="function"?_[E].call(c,f,a,u):_[E],Wn(S)&&~S.indexOf("random(")&&(S=Mh(S)),or(S+"")||S==="auto"||(S+=Hr.units[E]||or(ps(a,E))||""),(S+"").charAt(1)==="="&&(S=ps(a,E))):S=ps(a,E),k=parseFloat(S),M=D==="string"&&b.charAt(1)==="="&&b.substr(0,2),M&&(b=b.substr(2)),I=parseFloat(b),E in jo&&(E==="autoAlpha"&&(k===1&&ps(a,"visibility")==="hidden"&&I&&(k=0),K.push("visibility",0,g.visibility),ta(this,g,"visibility",k?"inherit":"hidden",I?"inherit":"hidden",!I)),E!=="scale"&&E!=="transform"&&(E=jo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),R=E in ds,R){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!s.parseTransform||Lh(a,s.parseTransform),N=s.smoothOrigin!==!1&&U.smooth,C=this._pt=new Ar(this._pt,g,pn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Ar(this._pt,U,"scaleY",U.scaleY,(M?Il(U.scaleY,M+I):I)-U.scaleY||0,kc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){K.push(Lr,0,g[Lr]),b=bg(b),U.svg?Gc(a,b,0,N,0,this):(T=parseFloat(b.split(" ")[2])||0,T!==U.zOrigin&&ta(this,U,"zOrigin",U.zOrigin,T),ta(this,g,E,Mu(S),Mu(b)));continue}else if(E==="svgOrigin"){Gc(a,b,1,N,0,this);continue}else if(E in Nd){Lg(this,U,E,k,M?Il(k,M+b):b);continue}else if(E==="smoothOrigin"){ta(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Rg(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(R||(I||I===0)&&(k||k===0)&&!fg.test(b)&&E in g)L=(S+"").substr((k+"").length),I||(I=0),T=or(b)||(E in Hr.units?Hr.units[E]:L),L!==T&&(k=ea(a,E,S,T)),this._pt=new Ar(this._pt,R?U:g,E,k,(M?Il(k,M+I):I)-k,!R&&(T==="px"||E==="zIndex")&&s.autoRound!==!1?mg:kc),this._pt.u=T||0,L!==T&&T!=="%"&&(this._pt.b=S,this._pt.r=pg);else if(E in g)Eg.call(this,a,E,S,M?M+b:b);else if(E in a)this.add(a,E,S||a[E],M?M+b:b,f,u);else if(E!=="parseTransform"){uc(E,b);continue}R||(E in g?K.push(E,0,g[E]):K.push(E,1,S||a[E])),m.push(E)}}X&&wd(this)},render:function(a,s){if(s.tween._time||!Dc())for(var c=s._pt;c;)c.r(a,c.d),c=c._next;else s.styles.revert()},get:ps,aliases:jo,getSetter:function(a,s,c){var f=jo[s];return f&&f.indexOf(",")<0&&(s=f),s in ds&&s!==Lr&&(a._gsap.x||ps(a,"x"))?c&&Ed===c?s==="scale"?_g:yg:(Ed=c||{})&&(s==="scale"?xg:wg):a.style&&!rc(a.style[s])?gg:~s.indexOf("-")?vg:Ac(a,s)},core:{_removeProperty:Xa,_getMatrix:Uc}};Pr.utils.checkPrefix=Gl,Pr.core.getStyleSaver=Ld,function(x,a,s,c){var f=Cr(x+","+a+","+s,function(u){ds[u]=1});Cr(a,function(u){Hr.units[u]="deg",Nd[u]=1}),jo[f[13]]=x+","+a,Cr(c,function(u){var m=u.split(":");jo[m[1]]=f[m[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Cr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Hr.units[x]="px"}),Pr.registerPlugin(Vd);var Vc=Pr.registerPlugin(Vd)||Pr;Vc.core.Tween;class Og{constructor(a,s=!1){window.mars3d?(this.Cesium=window.mars3d.Cesium,this.DynamicMaskingArr=[],this.DynamicMaskingStyle=[],this.canvasClientWidth=a.viewer.canvas.clientWidth,this.canvasClientHeight=a.viewer.canvas.clientHeight,this.oldSet=new Set,this.tweenMap=new Map,this.isDynamicMasking=s):console.error("未引入指定插件")}add(a,s){let c=a.options.symbol.styleOptions.label.font_size,f=a.options.vectorId,u=Number(c)*1.4,m=Number(c)*1.8,g=a.options.symbol.styleOptions.label,{color:_,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(I=>{I.style.label&&this.DynamicMaskingArr.push({id:f,uid:I.id,position:I._getLablePosition(),label:I.name,width:I.name?u*I.name.length:0,height:m,color:_,outline:s.label.outline,outlineColor:S,background:s.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(s.label.color),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:s.label.outline,background:s.label.background,color:this.Cesium.Color.fromCssColorString(s.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(s=>s.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(s=>s.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,s){let{label:c}=s;if(c){let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_}=c;this.DynamicMaskingArr.forEach(S=>{S.id===a&&(f!=null&&(S.color=this.Cesium.Color.fromCssColorString(f),S.dynamicMaskingColor.color=this.Cesium.Color.fromCssColorString(f)),u!=null&&(S.outline=u),m!=null&&(S.outlineColor=this.Cesium.Color.fromCssColorString(m),S.dynamicMaskingColor.outlineColor=this.Cesium.Color.fromCssColorString(m)),g!=null&&(S.background=g),_!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(_),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(_)))})}}getBoundingRectangle(a){var s=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return s!==void 0?new this.Cesium.BoundingRectangle(s.x,s.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var s=0;s<this.DynamicMaskingArr.length;s++){let f=!1,u=this.DynamicMaskingArr[s],m,g,_;if(g=this.getBoundingRectangle(u),!(g.x<0||g.x>this.canvasClientWidth||g.y<0||g.y>this.canvasClientHeight))if(a.length===0){a.push(s);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],_=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,_)){f=!0;break}f||a.push(s)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let s={color:.001,outlineColor:.001,backgroundColor:.001},c={color:1,outlineColor:1,backgroundColor:1},f=this.getNonIntersectingRectangles(),u=new Set([...this.oldSet].filter(g=>!f.has(g))),m=new Set([...f].filter(g=>!this.oldSet.has(g)));for(let g of u)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}var a=Vc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var _=this.DynamicMaskingArr[g];_.backgroundColor.alpha=c.backgroundColor,_.color.alpha=c.color,_.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(_.id,"vectorId"))==null?void 0:S.getGraphicByAttr(_.uid))==null||b.setStyle({label:{show:!1,outline:!1,background:!1}})}});this.tweenMap.set(g,a)}for(let g of m)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}let _=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:I}=_.dynamicMaskingColor;var a=Vc.to(s,{duration:.8+Math.random(),color:b.alpha,outlineColor:I.alpha,backgroundColor:S.alpha,onUpdate:()=>{var D,F;_.backgroundColor.alpha=s.backgroundColor,_.color.alpha=s.color,_.outlineColor.alpha=s.outlineColor,(F=(D=window.map.getLayer(_.id,"vectorId"))==null?void 0:D.getGraphicByAttr(_.uid))==null||F.setStyle({label:{show:!0,outline:_.outline,background:_.background,color:_.color,outlineColor:_.outlineColor,backgroundColor:_.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=f}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(s=>{var c;if((c=s.options)!=null&&c.vectorId){let{color:f,outlineColor:u,backgroundColor:m}=s.options.symbol.styleOptions.label;s.eachGraphic(g=>{g.setStyle({label:{color:f.withAlpha(0),outlineColor:u.withAlpha(.001),backgroundColor:m.withAlpha(.001),show:!1,background:!1,outline:!1}})})}});else if(this.DynamicMaskingStyle.length>0){let s;this.DynamicMaskingStyle.forEach(c=>{let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_,vectorId:S}=c;s=window.map.getLayer(S,"vectorId"),s&&s.eachGraphic(b=>{b.setStyle({label:{color:f,outlineColor:m,backgroundColor:_,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const Ig=()=>{window.planClip.clearPlanClip(),window.schemeEvnModify.clearAllEvnModify(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},Dg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},zg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},kg=x=>{let a=[];if(x.forEach(s=>{let{id:c}=s,f={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};s.operate.forEach((u,m)=>{let g=Wc(u,f.mockData.nextPage);f.mockData.nextPage=g,f.mockData.item=g,f.mockData.previousPage=[]}),a.push(f)}),a.length>1)for(let s=1;s<a.length;s++){let c=a[s].mockData,f=a[s-1].mockData.item;const u=new Map;f.forEach(m=>{m.type!="rotatePoint"&&m.type!="viewpoint"&&m.type!="roaming"&&m.type!="splitScreen"&&m.type!="planClip"&&m.type!="editor"?u.set(`${m.screenplayId}-${m.type}`,m):a[s].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let _={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[s].mockData.previousPage.unshift(u.get(g)),_=m;else{let S={};Object.keys(m).forEach(b=>{if(b!="screenplayId"&&b!="type")if(u.get(g)[b])if(Object.keys(S).length==0&&(S={screenplayId:m.screenplayId,type:m.type}),b=="clip"||b=="flat"){_[b]=Wd(u.get(g)[b],m[b]);let I={screenplayId:m.screenplayId,type:m.type};I[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?I[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(I[b][k]="false")}),S={...I,...S}}else S[b]=u.get(g)[b],_[b]=m[b];else a[s].mockData.previousPage.some(I=>I.screenplayId===m.screenplayId)||(console.log("未找到操作"),S={...jd(m,b),...S}),_[b]=m[b]}),Object.keys(S).length>0&&a[s].mockData.previousPage.push(S)}u.set(g,_)}else{console.log("未找到操作");let S=jd(m);S&&a[s].mockData.previousPage.push(S),u.set(g,m)}}),a[s].mockData.item=Array.from(u.values())}return console.log("-----------最后输出-----------"),console.log(a),console.log("-----------最后输出-----------"),a},Wc=(x,a=null)=>{let{executionProperty:s,screenplayId:c,property:f,type:u,delay:m,delayTime:g}=x;if((f=="add"||f==!0)&&(f="true"),(f=="remove"||f==!1)&&(f="false"),u=="pit"){let S=window.schemeEvnModify.getModelModifyDataForInitModelById(c);if(S){let b={};b[c]=f,f=b,c=S.modelId,s=S.type}}let _;if(c==""||c=="map")if(c="map",u=="splitScreen"){let{splitScreenMode:S,splitScreenModePercentage:b}=JSON.parse(f);a.push({screenplayId:c,type:u,executionProperty:{splitScreenMode:S,splitScreenModePercentage:b,mapClone:[]}});let{mainScreen:I,secondaryScreen:k}=JSON.parse(x.property);I.forEach(F=>{Wc(F,a)});let D=a.find(F=>F.type=="splitScreen");k.forEach(F=>{Wc(F,D.executionProperty.mapClone)})}else _={screenplayId:c,type:u,executionProperty:f},(s=="clip"||s=="flat")&&(_[s]=f),m&&(_.delay=m),g&&(_.delayTime=g),a&&(u=="flight"?a.unshift(_):a.push(_));else _=a?a.find(S=>S.screenplayId==c):null,_?(s=="clip"||s=="flat"?_[s]?_[s]=Wd(_[s],f):(_[s]=f,_.type="model"):_[s]=f,m&&(_[s].delay=m),g&&(_[s].delayTime=g)):(_={screenplayId:c,type:u},m&&(_.delay=m),g&&(_.delayTime=g),s=="clip"||s=="flat"?(_[s]=f,_.type="model"):_[s]=f,a&&(u=="flight"?a.unshift(_):a.push(_)));return a||_},Wd=(x,a)=>{const s={...x};for(const c in a)a.hasOwnProperty(c)&&(s[c]=a[c]);return s},jd=(x,a="all")=>{let{type:s,show:c,screenplayId:f,overallStaining:u,clip:m,flat:g}=x,_={};if(a=="all")switch(s){case"model":case"shp":case"plot":c&&c=="true"&&(_={screenplayId:f,type:s,show:"false"}),c&&c=="false"&&console.error("map上没有添加此对象"),u&&(_={..._,screenplayId:f,type:s,overallStaining:"false"}),m&&(_={..._,screenplayId:f,type:s,clip:"false"}),g&&(_={..._,screenplayId:f,type:s,flat:"false"});break;case"terrain":_={screenplayId:f,type:s,executionProperty:"true"};break;case"pit":_={screenplayId:f,type:s,executionProperty:"false"};break;case"underground":_={screenplayId:f,type:s,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":_={screenplayId:f,type:s},_[a]="false";break}return Object.keys(_).length>0?_:null},Bg=(x,a)=>{const s={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(s[c]=x[c])}),s},Ng=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Fg=x=>{let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(s=>{let{executionProperty:c,screenplayId:f,property:u,type:m}=s;(c=="show"||c=="overallStaining")&&(a[f]||(a[f]={type:m}),a[f][u]=c)}),window.map.getLayers().forEach(s=>{if((s.type=="3dtiles"||s.type=="geojson"||s.type=="tileset")&&s.options.name!="国界"){let c=s.options.modelId||s.options.vectorId;a[c]?(window.bimModel.editColor(c),window.schemeEvnModify.clearAllModelModify({isClone:!1})):s.remove()}}),window.bimEntity.entityLayer.getGraphicsByAttr().forEach(s=>{s.remove()}),window.bimMapSetUp.undergroundVal(1),window.bimTerrainProvider.show(),window.bimTrafficSimulation.destruction(),window.bimRotatePoint.stop(),window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.planClip.clearPlanClip()};class Ug{constructor(a){Ba(this,"getPositions",a=>a.length>1&&(Array.isArray(a[0])||typeof a[0]=="object")?a:this.getPositions(a[0]));Ba(this,"terrainCutById",(a,s,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(f=>f.id==s))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:s});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(f=>f.id==s))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:s});break}});Ba(this,"clearTerrainCutById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone)return;this.terrainClipClone.removeArea(a);break;case!1:if(!this.terrainClip)return;this.terrainClip.removeArea(a);break}});Ba(this,"terrainFlattenById",(a,s,c,f)=>{switch(f==null?void 0:f.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone||this.terrainFlatClone.list.find(u=>u.id==c))return;this.terrainFlatClone.addArea(a.length>1?a:a[0],{id:c,height:s});break;case!1:if(!this.terrainFlat||this.terrainFlat.list.find(u=>u.id==c))return;this.terrainFlat.addArea(a.length>1?a:a[0],{id:c,height:s});break}});Ba(this,"clearTerrainFlattenById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone)return;this.terrainFlatClone.removeArea(a);break;case!1:if(!this.terrainFlat)return;this.terrainFlat.removeArea(a);break}});this.flattenedEvnModifyData=a,this.modelIdListByModify=[],this.modelIdListByModifyClone=[],this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null,this.createTerrainModifyInstance()}getDataFromFlattenedEvnModifyListById(a){const s=this.flattenedEvnModifyData.find(c=>c.id==a);return s||null}getModelFromMapById(a,s){let c;switch(s==null?void 0:s.isClone){case!0:c=window.mapClone?window.mapClone.mapEx.getLayers():[];break;case!1:c=window.map.getLayers();break}return c.find(u=>u.options.modelId==a)}updateFlattenedEvnModifyData(a){this.flattenedEvnModifyData=a}modelCutById(a,s,c,f){const u=bimModel.queryModel(a,f);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(s.length>1?s:s[0],{id:c}),f==null?void 0:f.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}modelFlattenById(a,s,c,f,u){const m=bimModel.queryModel(a,u);if(m&&!m.flat.list.find(g=>g.id==f))switch(m.flat.addArea(s.length>1?s:s[0],{height:c,id:f}),u==null?void 0:u.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}clearModelCutById(a,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.clip.removeArea(s),c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}clearModelFlattenById(a,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.flat.removeArea(s),c==null?void 0:c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}createTerrainModifyInstance(){if(window.map.thing.terrainClip)this.terrainClip=window.map.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({czm:!1,splitNum:30});window.map.addThing(a),this.terrainClip=a}if(window.map.thing.terrainFlat)this.terrainFlat=window.map.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.map.addThing(a),this.terrainFlat=a}}createTerrainModifyInstanceClone(){if(window.mapClone){if(window.mapClone.mapEx.thing.terrainClip)this.terrainClipClone=window.mapClone.mapEx.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainClipClone=a}if(window.mapClone.mapEx.thing.terrainFlat)this.terrainFlatClone=window.mapClone.mapEx.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainFlatClone=a}}}evnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}evnModifyByIdAndAddOptionsToStore(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}clearEvnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=c.bimEnvModifyData[g].id;u===0&&m===0?this.clearModelCutById(f,_,s):u===0&&m===1?this.clearModelFlattenById(f,_,s):u===1&&m===0?this.clearTerrainCutById(_,s):u===1&&m===1&&this.clearTerrainFlattenById(_,s)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModify=[];break}}clearAllTerrainModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:window.mapClone||(this.terrainClipClone=null,this.terrainFlatClone=null),this.terrainClipClone&&this.terrainClipClone.clear(),this.terrainFlatClone&&this.terrainFlatClone.clear();break;case!1:this.terrainClip&&this.terrainClip.clear(),this.terrainFlat&&this.terrainFlat.clear();break}}getModelModifyDataForInitModelById(a){const s=this.getDataFromFlattenedEvnModifyListById(a);if(!s)return;const{bimEnvModify:{embsId:c,dataType:f,modifyType:u}}=s;if(this.modelIdListByModify.push(c),f===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const S={positions:this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),id:s.bimEnvModifyData[g].id};m.area.push(S)}return m}else if(f===0&&u===1){const m={modelId:c,type:"flat",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),S={id:s.bimEnvModifyData[g].id,positions:_,height:JSON.parse(s.bimEnvModifyData[g].modifyData).depth};return m.area.push(S),m}}}clearAllEvnModify(){this.clearAllModelModify({isClone:!0}),this.clearAllModelModify({isClone:!1}),this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1})}destroyTerrainModifyInstance(){this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1}),this.terrainClip&&window.map.removeThing(this.terrainClip,!0),this.terrainFlat&&window.map.removeThing(this.terrainFlat,!0),this.terrainClipClone&&window.mapClone.mapEx.removeThing(this.terrainClipClone,!0),this.terrainFlatClone&&window.mapClone.mapEx.removeThing(this.terrainFlatClone,!0),this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null}}let Hl=null,ms=null,ia=null;class Gg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,s,c){ms=new mars3d.layer.GraphicLayer({isContinued:!0});var f=this;window.map.addLayer(ms),ms.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;console.log(m),s(m),setTimeout(()=>{f.startDrawGraphic()},500)}),ms.on(mars3d.EventType.editStop,function(u){console.log("停止编辑",u)}),ia=c,Hl=new mars3d.layer.GraphicLayer,window.map.addLayer(Hl),a&&(this.viewPoints=a.filter((u,m)=>{if(m%(ia.smooth*1)==0)return u})),this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a,s){const c=new mars3d.graphic.PolylinePrimitive({positions:a.map(f=>[f.lng,f.lat,f.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:s+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}});Hl.addGraphic(c)}addGraphicLayer(a){var s={};ia.Viewovalue==1?s={camera:{type:"dy",followedX:ia.followedX,followedZ:ia.followedZ},interpolation:!0,interpolationDegree:6,autoMiddleDynamicPosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:ia.Viewovalue==2?s={camera:{type:"gs",pitch:-30,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}}:s={camera:{type:"sd",followedZ:ia.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}},a=a.map(c=>[c.lng,c.lat,c.alt]),a.length,this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",speed:ia.speed,autoStop:!0,positions:a,offsetHeight:1.6,clockLoop:!0,...s}),Hl.addGraphic(this.fixedRoute)}addDemoGraphic(a,s){const c=new mars3d.graphic.BillboardEntity({position:new mars3d.LngLatPoint(a.lng,a.lat,a.alt),style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0}});ms.addGraphic(c)}startDrawGraphic(a){ms.startDraw({type:"billboard",style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,classificationType:Cesium.ClassificationType.TERRAIN}}).then(s=>{console.log(123)})}start(){console.log(this.fixedRoute),this.fixedRoute&&(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){this.fixedRoute&&this.fixedRoute.pause()}resume(){this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Hl,!0),window.map.removeLayer(ms,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!0}removeCameraRoute(){Hl.clear(),ms.clear()}removegraphicLayerpoint(){ms.clear()}}class Hg{constructor(a){window.mars3d&&(this.beginDate="",this.endDate="",this.trafficSimulationLayer,this.trafficSimulationArr=[],this.style={width:4,materialType:window.mars3d.MaterialType.LineFlow,materialOptions:{color:"#4ac2ff",image:a+"img/textures/line-arrow-right.png",repeat_x:20,repeat_y:1,speed:20},clampToGround:!1,allowDrillPick:!1},this.vehicleSum=100,this.automobileList=[{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/aodi1.gltf"},{url:a+"gltf/cart/kache3.gltf"},{url:a+"gltf/cart/bus2.gltf"},{url:a+"gltf/cart/jiaobanche.glb"}],this._czmlLayer,this._czmlLayerArr=[])}init(a){this.trafficSimulationLayer=new window.mars3d.layer.GraphicLayer({temporaryLayer:"trafficSimulation"}),window.map.addLayer(this.trafficSimulationLayer),window.map.bimMapEdit="1",a&&(this._czmlLayerArr=a)}addLine(a){let s=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:s},style:{...this.style}}).then(f=>{c({id:s,pointSet:f.coordinates,speed:45,interval:1})})})}initLine(a){let s;a.forEach(c=>{let{id:f}=c;s=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:f},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(s)})}positionLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.flyTo({scale:2})}deleteLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,s=!0){let c=this.queryTrafficSimulationLine(a);s?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}fallbackTrafficSimulationLine(a,s){let c=this.queryTrafficSimulationLine(a);c.positions=s,c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing()}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(s=>s.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let s=new Date,c=s.getDate();s.setDate(c+1),this.endDate=s.toISOString(),console.log(this.queryCzml(a)),this.queryCzml(a)?this.trafficSimulationArr=JSON.parse(this.queryCzml(a).route):this.trafficSimulationArr=[],this.processingData(a)}selected(){this._czmlLayer&&this._czmlLayer.flyTo()}destruction(){this.trafficSimulationLayer.clear(),this.trafficSimulationLayer.remove(),this._czmlLayer&&(this._czmlLayer.clear(),this._czmlLayer.remove()),this.style.materialOptions.color="#4ac2ff",window.map.bimMapEdit="0"}processingData(a){let s=[{version:"1.0",id:"document",clock:{interval:`${this.beginDate}/${this.endDate}`,currentTime:this.beginDate,multiplier:1},style:{distanceDisplayCondition:!0,distanceDisplayCondition_far:1e6,distanceDisplayCondition_near:0}}],c=[],f=JSON.parse(JSON.stringify(this.trafficSimulationArr)),u=0;f.forEach((g,_)=>{let S=0,b=0,{pointSet:I,interval:k,speed:D}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(I));E.forEach((T,M)=>{M>0&&(u=parseFloat((this.disTance(T,E[M-1].slice(1))/D).toFixed(2)),S+=u),M==0&&(S=b),T.unshift(S)}),b+=k,c=E.reduce((T,M)=>T.concat(M));let L={name:`${_}-${F}`,availability:`${this.beginDate}/${this.endDate}`,orientation:{velocityReference:"#position"},position:{epoch:this.beginDate,cartographicDegrees:c},style:{minimumPixelSize:100,distanceDisplayCondition:!0,distanceDisplayCondition_near:0,distanceDisplayCondition_far:1300,distanceDisplayPoint:{color:"#00ff00",pixelSize:8}},model:{show:!0,gltf:this.randomVehicle(),heightReference:window.Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,scale:.6,minimumPixelSize:100,maximumScale:1.5}};s.push(L)}});let m={name:"交通模拟",czmlId:a,data:s,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,s){let c,f,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),f=window.Cesium.Cartesian3.fromDegrees(...s),u=window.Cesium.Cartesian3.distance(c,f),u}randomVehicle(){let a=Math.round(Math.random()*(this.automobileList.length-1));return this.automobileList[a].url}}const Vg=[Tf,Ef],Wg={continuation:null,mapModali:null,install(x){if(Vg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Mf),s=document.createElement("div"),c=document.body;if(c.appendChild(s),this.loading=a.mount(s),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let f=oi.createApp(Sf),u=document.createElement("div");c.appendChild(u),this.mapModali=f.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=Ef,Pi.BimCutscenes=Mf,Pi.BimElevationImage=um,Pi.BimEntity=fm,Pi.BimModel=sm,Pi.BimModify=Ug,Pi.BimTerrainProvider=hm,Pi.BimTrafficSimulation=Hg,Pi.BimVector=lm,Pi.Bimroaming=Gg,Pi.Button=Tf,Pi.ChbimPlugins=Wg,Pi.DynamicMasking=Og,Pi.MapModali=Sf,Pi.PanoramicView=vm,Pi.ViewShed=cm,Pi.getSameKeyData=Bg,Pi.init=Ig,Pi.initMap=Fg,Pi.isValidRGBA=Ng,Pi.nextPage=zg,Pi.operateMapData=kg,Pi.previousPage=Dg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});
2702
+ */var Sd,Qs,Nl,Ic,Wa,Ed,Dc,ug=function(){return typeof window<"u"},ds={},ja=180/Math.PI,Fl=Math.PI/180,Ul=Math.atan2,bd=1e8,zc=/([A-Z])/g,cg=/(left|right|width|margin|padding|x)/i,fg=/[\s,\(]\S/,jo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},kc=function(a,s){return s.set(s.t,s.p,Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},dg=function(a,s){return s.set(s.t,s.p,a===1?s.e:Math.round((s.s+s.c*a)*1e4)/1e4+s.u,s)},pg=function(a,s){return s.set(s.t,s.p,a?Math.round((s.s+s.c*a)*1e4)/1e4+s.u:s.b,s)},mg=function(a,s){var c=s.s+s.c*a;s.set(s.t,s.p,~~(c+(c<0?-.5:.5))+s.u,s)},Cd=function(a,s){return s.set(s.t,s.p,a?s.e:s.b,s)},Ad=function(a,s){return s.set(s.t,s.p,a!==1?s.b:s.e,s)},gg=function(a,s,c){return a.style[s]=c},vg=function(a,s,c){return a.style.setProperty(s,c)},yg=function(a,s,c){return a._gsap[s]=c},_g=function(a,s,c){return a._gsap.scaleX=a._gsap.scaleY=c},xg=function(a,s,c,f,u){var m=a._gsap;m.scaleX=m.scaleY=c,m.renderTransform(u,m)},wg=function(a,s,c,f,u){var m=a._gsap;m[s]=c,m.renderTransform(u,m)},pn="transform",Lr=pn+"Origin",Tg=function x(a,s){var c=this,f=this.target,u=f.style,m=f._gsap;if(a in ds&&u){if(this.tfm=this.tfm||{},a!=="transform")a=jo[a]||a,~a.indexOf(",")?a.split(",").forEach(function(g){return c.tfm[g]=ps(f,g)}):this.tfm[a]=m.x?m[a]:ps(f,a),a===Lr&&(this.tfm.zOrigin=m.zOrigin);else return jo.transform.split(",").forEach(function(g){return x.call(c,g,s)});if(this.props.indexOf(pn)>=0)return;m.svg&&(this.svgo=f.getAttribute("data-svg-origin"),this.props.push(Lr,s,"")),a=pn}(u||s)&&this.props.push(a,s,u[a])},Pd=function(a){a.translate&&(a.removeProperty("translate"),a.removeProperty("scale"),a.removeProperty("rotate"))},Mg=function(){var a=this.props,s=this.target,c=s.style,f=s._gsap,u,m;for(u=0;u<a.length;u+=3)a[u+1]?s[a[u]]=a[u+2]:a[u+2]?c[a[u]]=a[u+2]:c.removeProperty(a[u].substr(0,2)==="--"?a[u]:a[u].replace(zc,"-$1").toLowerCase());if(this.tfm){for(m in this.tfm)f[m]=this.tfm[m];f.svg&&(f.renderTransform(),s.setAttribute("data-svg-origin",this.svgo||"")),u=Dc(),(!u||!u.isStart)&&!c[pn]&&(Pd(c),f.zOrigin&&c[Lr]&&(c[Lr]+=" "+f.zOrigin+"px",f.zOrigin=0,f.renderTransform()),f.uncache=1)}},Ld=function(a,s){var c={target:a,props:[],revert:Mg,save:Tg};return a._gsap||Pr.core.getCache(a),s&&s.split(",").forEach(function(f){return c.save(f)}),c},Rd,Bc=function(a,s){var c=Qs.createElementNS?Qs.createElementNS((s||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),a):Qs.createElement(a);return c&&c.style?c:Qs.createElement(a)},Xo=function x(a,s,c){var f=getComputedStyle(a);return f[s]||f.getPropertyValue(s.replace(zc,"-$1").toLowerCase())||f.getPropertyValue(s)||!c&&x(a,Gl(s)||s,1)||""},Od="O,Moz,ms,Ms,Webkit".split(","),Gl=function(a,s,c){var f=s||Wa,u=f.style,m=5;if(a in u&&!c)return a;for(a=a.charAt(0).toUpperCase()+a.substr(1);m--&&!(Od[m]+a in u););return m<0?null:(m===3?"ms":m>=0?Od[m]:"")+a},Nc=function(){ug()&&window.document&&(Sd=window,Qs=Sd.document,Nl=Qs.documentElement,Wa=Bc("div")||{style:{}},Bc("div"),pn=Gl(pn),Lr=pn+"Origin",Wa.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Rd=!!Gl("perspective"),Dc=Pr.core.reverting,Ic=1)},Fc=function x(a){var s=Bc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),c=this.parentNode,f=this.nextSibling,u=this.style.cssText,m;if(Nl.appendChild(s),s.appendChild(this),this.style.display="block",a)try{m=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=x}catch{}else this._gsapBBox&&(m=this._gsapBBox());return c&&(f?c.insertBefore(this,f):c.appendChild(this)),Nl.removeChild(s),this.style.cssText=u,m},Id=function(a,s){for(var c=s.length;c--;)if(a.hasAttribute(s[c]))return a.getAttribute(s[c])},Dd=function(a){var s;try{s=a.getBBox()}catch{s=Fc.call(a,!0)}return s&&(s.width||s.height)||a.getBBox===Fc||(s=Fc.call(a,!0)),s&&!s.width&&!s.x&&!s.y?{x:+Id(a,["x","cx","x1"])||0,y:+Id(a,["y","cy","y1"])||0,width:0,height:0}:s},zd=function(a){return!!(a.getCTM&&(!a.parentNode||a.ownerSVGElement)&&Dd(a))},Xa=function(a,s){if(s){var c=a.style,f;s in ds&&s!==Lr&&(s=pn),c.removeProperty?(f=s.substr(0,2),(f==="ms"||s.substr(0,6)==="webkit")&&(s="-"+s),c.removeProperty(f==="--"?s:s.replace(zc,"-$1").toLowerCase())):c.removeAttribute(s)}},ta=function(a,s,c,f,u,m){var g=new Ar(a._pt,s,c,0,1,m?Ad:Cd);return a._pt=g,g.b=f,g.e=u,a._props.push(c),g},kd={deg:1,rad:1,turn:1},Sg={grid:1,flex:1},ea=function x(a,s,c,f){var u=parseFloat(c)||0,m=(c+"").trim().substr((u+"").length)||"px",g=Wa.style,_=cg.test(s),S=a.tagName.toLowerCase()==="svg",b=(S?"client":"offset")+(_?"Width":"Height"),I=100,k=f==="px",D=f==="%",F,E,L,T;if(f===m||!u||kd[f]||kd[m])return u;if(m!=="px"&&!k&&(u=x(a,s,c,"px")),T=a.getCTM&&zd(a),(D||m==="%")&&(ds[s]||~s.indexOf("adius")))return F=T?a.getBBox()[_?"width":"height"]:a[b],Rn(D?u/F*I:u/100*F);if(g[_?"width":"height"]=I+(k?m:f),E=~s.indexOf("adius")||f==="em"&&a.appendChild&&!S?a:a.parentNode,T&&(E=(a.ownerSVGElement||{}).parentNode),(!E||E===Qs||!E.appendChild)&&(E=Qs.body),L=E._gsap,L&&D&&L.width&&_&&L.time===Xr.time&&!L.uncache)return Rn(u/L.width*I);if(D&&(s==="height"||s==="width")){var M=a.style[s];a.style[s]=I+f,F=a[b],M?a.style[s]=M:Xa(a,s)}else(D||m==="%")&&!Sg[Xo(E,"display")]&&(g.position=Xo(a,"position")),E===a&&(g.position="static"),E.appendChild(Wa),F=Wa[b],E.removeChild(Wa),g.position="absolute";return _&&D&&(L=Na(E),L.time=Xr.time,L.width=E[b]),Rn(k?F*u/I:F&&u?I/F*u:0)},ps=function(a,s,c,f){var u;return Ic||Nc(),s in jo&&s!=="transform"&&(s=jo[s],~s.indexOf(",")&&(s=s.split(",")[0])),ds[s]&&s!=="transform"?(u=Lh(a,f),u=s!=="transformOrigin"?u[s]:u.svg?u.origin:Mu(Xo(a,Lr))+" "+u.zOrigin+"px"):(u=a.style[s],(!u||u==="auto"||f||~(u+"").indexOf("calc("))&&(u=Tu[s]&&Tu[s](a,s,c)||Xo(a,s)||Uf(a,s)||(s==="opacity"?1:0))),c&&!~(u+"").trim().indexOf(" ")?ea(a,s,u,c)+c:u},Eg=function(a,s,c,f){if(!c||c==="none"){var u=Gl(s,a,1),m=u&&Xo(a,u,1);m&&m!==c?(s=u,c=m):s==="borderColor"&&(c=Xo(a,"borderTopColor"))}var g=new Ar(this._pt,a.style,s,0,1,xd),_=0,S=0,b,I,k,D,F,E,L,T,M,R,C,U;if(g.b=c,g.e=f,c+="",f+="",f==="auto"&&(E=a.style[s],a.style[s]=f,f=Xo(a,s)||f,E?a.style[s]=E:Xa(a,s)),b=[c,f],ud(b),c=b[0],f=b[1],k=c.match(Ol)||[],U=f.match(Ol)||[],U.length){for(;I=Ol.exec(f);)L=I[0],M=f.substring(_,I.index),F?F=(F+1)%5:(M.substr(-5)==="rgba("||M.substr(-5)==="hsla(")&&(F=1),L!==(E=k[S++]||"")&&(D=parseFloat(E)||0,C=E.substr((D+"").length),L.charAt(1)==="="&&(L=Il(D,L)+C),T=parseFloat(L),R=L.substr((T+"").length),_=Ol.lastIndex-R.length,R||(R=R||Hr.units[s]||C,_===f.length&&(f+=R,g.e+=R)),C!==R&&(D=ea(a,s,E,R)||0),g._pt={_next:g._pt,p:M||S===1?M:",",s:D,c:T-D,m:F&&F<4||s==="zIndex"?Math.round:0});g.c=_<f.length?f.substring(_,f.length):""}else g.r=s==="display"&&f==="none"?Ad:Cd;return If.test(f)&&(g.e=0),this._pt=g,g},Bd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},bg=function(a){var s=a.split(" "),c=s[0],f=s[1]||"50%";return(c==="top"||c==="bottom"||f==="left"||f==="right")&&(a=c,c=f,f=a),s[0]=Bd[c]||c,s[1]=Bd[f]||f,s.join(" ")},Cg=function(a,s){if(s.tween&&s.tween._time===s.tween._dur){var c=s.t,f=c.style,u=s.u,m=c._gsap,g,_,S;if(u==="all"||u===!0)f.cssText="",_=1;else for(u=u.split(","),S=u.length;--S>-1;)g=u[S],ds[g]&&(_=1,g=g==="transformOrigin"?Lr:pn),Xa(c,g);_&&(Xa(c,pn),m&&(m.svg&&c.removeAttribute("transform"),Lh(c,1),m.uncache=1,Pd(f)))}},Tu={clearProps:function(a,s,c,f,u){if(u.data!=="isFromStart"){var m=a._pt=new Ar(a._pt,s,c,0,0,Cg);return m.u=f,m.pr=-10,m.tween=u,a._props.push(c),1}}},Ph=[1,0,0,1,0,0],Nd={},Fd=function(a){return a==="matrix(1, 0, 0, 1, 0, 0)"||a==="none"||!a},Ud=function(a){var s=Xo(a,pn);return Fd(s)?Ph:s.substr(7).match(Of).map(Rn)},Uc=function(a,s){var c=a._gsap||Na(a),f=a.style,u=Ud(a),m,g,_,S;return c.svg&&a.getAttribute("transform")?(_=a.transform.baseVal.consolidate().matrix,u=[_.a,_.b,_.c,_.d,_.e,_.f],u.join(",")==="1,0,0,1,0,0"?Ph:u):(u===Ph&&!a.offsetParent&&a!==Nl&&!c.svg&&(_=f.display,f.display="block",m=a.parentNode,(!m||!a.offsetParent)&&(S=1,g=a.nextElementSibling,Nl.appendChild(a)),u=Ud(a),_?f.display=_:Xa(a,"display"),S&&(g?m.insertBefore(a,g):m?m.appendChild(a):Nl.removeChild(a))),s&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},Gc=function(a,s,c,f,u,m){var g=a._gsap,_=u||Uc(a,!0),S=g.xOrigin||0,b=g.yOrigin||0,I=g.xOffset||0,k=g.yOffset||0,D=_[0],F=_[1],E=_[2],L=_[3],T=_[4],M=_[5],R=s.split(" "),C=parseFloat(R[0])||0,U=parseFloat(R[1])||0,N,X,K,Z;c?_!==Ph&&(X=D*L-F*E)&&(K=C*(L/X)+U*(-E/X)+(E*M-L*T)/X,Z=C*(-F/X)+U*(D/X)-(D*M-F*T)/X,C=K,U=Z):(N=Dd(a),C=N.x+(~R[0].indexOf("%")?C/100*N.width:C),U=N.y+(~(R[1]||R[0]).indexOf("%")?U/100*N.height:U)),f||f!==!1&&g.smooth?(T=C-S,M=U-b,g.xOffset=I+(T*D+M*E)-T,g.yOffset=k+(T*F+M*L)-M):g.xOffset=g.yOffset=0,g.xOrigin=C,g.yOrigin=U,g.smooth=!!f,g.origin=s,g.originIsAbsolute=!!c,a.style[Lr]="0px 0px",m&&(ta(m,g,"xOrigin",S,C),ta(m,g,"yOrigin",b,U),ta(m,g,"xOffset",I,g.xOffset),ta(m,g,"yOffset",k,g.yOffset)),a.setAttribute("data-svg-origin",C+" "+U)},Lh=function(a,s){var c=a._gsap||new pd(a);if("x"in c&&!s&&!c.uncache)return c;var f=a.style,u=c.scaleX<0,m="px",g="deg",_=getComputedStyle(a),S=Xo(a,Lr)||"0",b,I,k,D,F,E,L,T,M,R,C,U,N,X,K,Z,ct,Rt,tt,_t,G,Pt,Et,At,ce,re,Ft,It,Nt,Pe,pe,Wt;return b=I=k=E=L=T=M=R=C=0,D=F=1,c.svg=!!(a.getCTM&&zd(a)),_.translate&&((_.translate!=="none"||_.scale!=="none"||_.rotate!=="none")&&(f[pn]=(_.translate!=="none"?"translate3d("+(_.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(_.rotate!=="none"?"rotate("+_.rotate+") ":"")+(_.scale!=="none"?"scale("+_.scale.split(" ").join(",")+") ":"")+(_[pn]!=="none"?_[pn]:"")),f.scale=f.rotate=f.translate="none"),X=Uc(a,c.svg),c.svg&&(c.uncache?(ce=a.getBBox(),S=c.xOrigin-ce.x+"px "+(c.yOrigin-ce.y)+"px",At=""):At=!s&&a.getAttribute("data-svg-origin"),Gc(a,At||S,!!At||c.originIsAbsolute,c.smooth!==!1,X)),U=c.xOrigin||0,N=c.yOrigin||0,X!==Ph&&(Rt=X[0],tt=X[1],_t=X[2],G=X[3],b=Pt=X[4],I=Et=X[5],X.length===6?(D=Math.sqrt(Rt*Rt+tt*tt),F=Math.sqrt(G*G+_t*_t),E=Rt||tt?Ul(tt,Rt)*ja:0,M=_t||G?Ul(_t,G)*ja+E:0,M&&(F*=Math.abs(Math.cos(M*Fl))),c.svg&&(b-=U-(U*Rt+N*_t),I-=N-(U*tt+N*G))):(Wt=X[6],Pe=X[7],Ft=X[8],It=X[9],Nt=X[10],pe=X[11],b=X[12],I=X[13],k=X[14],K=Ul(Wt,Nt),L=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Pt*Z+Ft*ct,ce=Et*Z+It*ct,re=Wt*Z+Nt*ct,Ft=Pt*-ct+Ft*Z,It=Et*-ct+It*Z,Nt=Wt*-ct+Nt*Z,pe=Pe*-ct+pe*Z,Pt=At,Et=ce,Wt=re),K=Ul(-_t,Nt),T=K*ja,K&&(Z=Math.cos(-K),ct=Math.sin(-K),At=Rt*Z-Ft*ct,ce=tt*Z-It*ct,re=_t*Z-Nt*ct,pe=G*ct+pe*Z,Rt=At,tt=ce,_t=re),K=Ul(tt,Rt),E=K*ja,K&&(Z=Math.cos(K),ct=Math.sin(K),At=Rt*Z+tt*ct,ce=Pt*Z+Et*ct,tt=tt*Z-Rt*ct,Et=Et*Z-Pt*ct,Rt=At,Pt=ce),L&&Math.abs(L)+Math.abs(E)>359.9&&(L=E=0,T=180-T),D=Rn(Math.sqrt(Rt*Rt+tt*tt+_t*_t)),F=Rn(Math.sqrt(Et*Et+Wt*Wt)),K=Ul(Pt,Et),M=Math.abs(K)>2e-4?K*ja:0,C=pe?1/(pe<0?-pe:pe):0),c.svg&&(At=a.getAttribute("transform"),c.forceCSS=a.setAttribute("transform","")||!Fd(Xo(a,pn)),At&&a.setAttribute("transform",At))),Math.abs(M)>90&&Math.abs(M)<270&&(u?(D*=-1,M+=E<=0?180:-180,E+=E<=0?180:-180):(F*=-1,M+=M<=0?180:-180)),s=s||c.uncache,c.x=b-((c.xPercent=b&&(!s&&c.xPercent||(Math.round(a.offsetWidth/2)===Math.round(-b)?-50:0)))?a.offsetWidth*c.xPercent/100:0)+m,c.y=I-((c.yPercent=I&&(!s&&c.yPercent||(Math.round(a.offsetHeight/2)===Math.round(-I)?-50:0)))?a.offsetHeight*c.yPercent/100:0)+m,c.z=k+m,c.scaleX=Rn(D),c.scaleY=Rn(F),c.rotation=Rn(E)+g,c.rotationX=Rn(L)+g,c.rotationY=Rn(T)+g,c.skewX=M+g,c.skewY=R+g,c.transformPerspective=C+m,(c.zOrigin=parseFloat(S.split(" ")[2])||!s&&c.zOrigin||0)&&(f[Lr]=Mu(S)),c.xOffset=c.yOffset=0,c.force3D=Hr.force3D,c.renderTransform=c.svg?Pg:Rd?Gd:Ag,c.uncache=0,c},Mu=function(a){return(a=a.split(" "))[0]+" "+a[1]},Hc=function(a,s,c){var f=or(s);return Rn(parseFloat(s)+parseFloat(ea(a,"x",c+"px",f)))+f},Ag=function(a,s){s.z="0px",s.rotationY=s.rotationX="0deg",s.force3D=0,Gd(a,s)},qa="0deg",Rh="0px",Ya=") ",Gd=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.z,S=c.rotation,b=c.rotationY,I=c.rotationX,k=c.skewX,D=c.skewY,F=c.scaleX,E=c.scaleY,L=c.transformPerspective,T=c.force3D,M=c.target,R=c.zOrigin,C="",U=T==="auto"&&a&&a!==1||T===!0;if(R&&(I!==qa||b!==qa)){var N=parseFloat(b)*Fl,X=Math.sin(N),K=Math.cos(N),Z;N=parseFloat(I)*Fl,Z=Math.cos(N),m=Hc(M,m,X*Z*-R),g=Hc(M,g,-Math.sin(N)*-R),_=Hc(M,_,K*Z*-R+R)}L!==Rh&&(C+="perspective("+L+Ya),(f||u)&&(C+="translate("+f+"%, "+u+"%) "),(U||m!==Rh||g!==Rh||_!==Rh)&&(C+=_!==Rh||U?"translate3d("+m+", "+g+", "+_+") ":"translate("+m+", "+g+Ya),S!==qa&&(C+="rotate("+S+Ya),b!==qa&&(C+="rotateY("+b+Ya),I!==qa&&(C+="rotateX("+I+Ya),(k!==qa||D!==qa)&&(C+="skew("+k+", "+D+Ya),(F!==1||E!==1)&&(C+="scale("+F+", "+E+Ya),M.style[pn]=C||"translate(0, 0)"},Pg=function(a,s){var c=s||this,f=c.xPercent,u=c.yPercent,m=c.x,g=c.y,_=c.rotation,S=c.skewX,b=c.skewY,I=c.scaleX,k=c.scaleY,D=c.target,F=c.xOrigin,E=c.yOrigin,L=c.xOffset,T=c.yOffset,M=c.forceCSS,R=parseFloat(m),C=parseFloat(g),U,N,X,K,Z;_=parseFloat(_),S=parseFloat(S),b=parseFloat(b),b&&(b=parseFloat(b),S+=b,_+=b),_||S?(_*=Fl,S*=Fl,U=Math.cos(_)*I,N=Math.sin(_)*I,X=Math.sin(_-S)*-k,K=Math.cos(_-S)*k,S&&(b*=Fl,Z=Math.tan(S-b),Z=Math.sqrt(1+Z*Z),X*=Z,K*=Z,b&&(Z=Math.tan(b),Z=Math.sqrt(1+Z*Z),U*=Z,N*=Z)),U=Rn(U),N=Rn(N),X=Rn(X),K=Rn(K)):(U=I,K=k,N=X=0),(R&&!~(m+"").indexOf("px")||C&&!~(g+"").indexOf("px"))&&(R=ea(D,"x",m,"px"),C=ea(D,"y",g,"px")),(F||E||L||T)&&(R=Rn(R+F-(F*U+E*X)+L),C=Rn(C+E-(F*N+E*K)+T)),(f||u)&&(Z=D.getBBox(),R=Rn(R+f/100*Z.width),C=Rn(C+u/100*Z.height)),Z="matrix("+U+","+N+","+X+","+K+","+R+","+C+")",D.setAttribute("transform",Z),M&&(D.style[pn]=Z)},Lg=function(a,s,c,f,u){var m=360,g=Wn(u),_=parseFloat(u)*(g&&~u.indexOf("rad")?ja:1),S=_-f,b=f+S+"deg",I,k;return g&&(I=u.split("_")[1],I==="short"&&(S%=m,S!==S%(m/2)&&(S+=S<0?m:-m)),I==="cw"&&S<0?S=(S+m*bd)%m-~~(S/m)*m:I==="ccw"&&S>0&&(S=(S-m*bd)%m-~~(S/m)*m)),a._pt=k=new Ar(a._pt,s,c,f,S,dg),k.e=b,k.u="deg",a._props.push(c),k},Hd=function(a,s){for(var c in s)a[c]=s[c];return a},Rg=function(a,s,c){var f=Hd({},c._gsap),u="perspective,force3D,transformOrigin,svgOrigin",m=c.style,g,_,S,b,I,k,D,F;f.svg?(S=c.getAttribute("transform"),c.setAttribute("transform",""),m[pn]=s,g=Lh(c,1),Xa(c,pn),c.setAttribute("transform",S)):(S=getComputedStyle(c)[pn],m[pn]=s,g=Lh(c,1),m[pn]=S);for(_ in ds)S=f[_],b=g[_],S!==b&&u.indexOf(_)<0&&(D=or(S),F=or(b),I=D!==F?ea(c,_,S,F):parseFloat(S),k=parseFloat(b),a._pt=new Ar(a._pt,g,_,I,k-I,kc),a._pt.u=F||0,a._props.push(_));Hd(g,f)};Cr("padding,margin,Width,Radius",function(x,a){var s="Top",c="Right",f="Bottom",u="Left",m=(a<3?[s,c,f,u]:[s+u,s+c,f+c,f+u]).map(function(g){return a<2?x+g:"border"+g+x});Tu[a>1?"border"+x:x]=function(g,_,S,b,I){var k,D;if(arguments.length<4)return k=m.map(function(F){return ps(g,F,S)}),D=k.join(" "),D.split(k[0]).length===5?k[0]:D;k=(b+"").split(" "),D={},m.forEach(function(F,E){return D[F]=k[E]=k[E]||k[(E-1)/2|0]}),g.init(_,D,I)}});var Vd={name:"css",register:Nc,targetTest:function(a){return a.style&&a.nodeType},init:function(a,s,c,f,u){var m=this._props,g=a.style,_=c.vars.startAt,S,b,I,k,D,F,E,L,T,M,R,C,U,N,X,K;Ic||Nc(),this.styles=this.styles||Ld(a),K=this.styles.props,this.tween=c;for(E in s)if(E!=="autoRound"&&(b=s[E],!(Wr[E]&&md(E,s,c,f,a,u)))){if(D=typeof b,F=Tu[E],D==="function"&&(b=b.call(c,f,a,u),D=typeof b),D==="string"&&~b.indexOf("random(")&&(b=Mh(b)),F)F(this,a,E,b,c)&&(X=1);else if(E.substr(0,2)==="--")S=(getComputedStyle(a).getPropertyValue(E)+"").trim(),b+="",$s.lastIndex=0,$s.test(S)||(L=or(S),T=or(b)),T?L!==T&&(S=ea(a,E,S,T)+T):L&&(b+=L),this.add(g,"setProperty",S,b,f,u,0,0,E),m.push(E),K.push(E,0,g[E]);else if(D!=="undefined"){if(_&&E in _?(S=typeof _[E]=="function"?_[E].call(c,f,a,u):_[E],Wn(S)&&~S.indexOf("random(")&&(S=Mh(S)),or(S+"")||S==="auto"||(S+=Hr.units[E]||or(ps(a,E))||""),(S+"").charAt(1)==="="&&(S=ps(a,E))):S=ps(a,E),k=parseFloat(S),M=D==="string"&&b.charAt(1)==="="&&b.substr(0,2),M&&(b=b.substr(2)),I=parseFloat(b),E in jo&&(E==="autoAlpha"&&(k===1&&ps(a,"visibility")==="hidden"&&I&&(k=0),K.push("visibility",0,g.visibility),ta(this,g,"visibility",k?"inherit":"hidden",I?"inherit":"hidden",!I)),E!=="scale"&&E!=="transform"&&(E=jo[E],~E.indexOf(",")&&(E=E.split(",")[0]))),R=E in ds,R){if(this.styles.save(E),C||(U=a._gsap,U.renderTransform&&!s.parseTransform||Lh(a,s.parseTransform),N=s.smoothOrigin!==!1&&U.smooth,C=this._pt=new Ar(this._pt,g,pn,0,1,U.renderTransform,U,0,-1),C.dep=1),E==="scale")this._pt=new Ar(this._pt,U,"scaleY",U.scaleY,(M?Il(U.scaleY,M+I):I)-U.scaleY||0,kc),this._pt.u=0,m.push("scaleY",E),E+="X";else if(E==="transformOrigin"){K.push(Lr,0,g[Lr]),b=bg(b),U.svg?Gc(a,b,0,N,0,this):(T=parseFloat(b.split(" ")[2])||0,T!==U.zOrigin&&ta(this,U,"zOrigin",U.zOrigin,T),ta(this,g,E,Mu(S),Mu(b)));continue}else if(E==="svgOrigin"){Gc(a,b,1,N,0,this);continue}else if(E in Nd){Lg(this,U,E,k,M?Il(k,M+b):b);continue}else if(E==="smoothOrigin"){ta(this,U,"smooth",U.smooth,b);continue}else if(E==="force3D"){U[E]=b;continue}else if(E==="transform"){Rg(this,b,a);continue}}else E in g||(E=Gl(E)||E);if(R||(I||I===0)&&(k||k===0)&&!fg.test(b)&&E in g)L=(S+"").substr((k+"").length),I||(I=0),T=or(b)||(E in Hr.units?Hr.units[E]:L),L!==T&&(k=ea(a,E,S,T)),this._pt=new Ar(this._pt,R?U:g,E,k,(M?Il(k,M+I):I)-k,!R&&(T==="px"||E==="zIndex")&&s.autoRound!==!1?mg:kc),this._pt.u=T||0,L!==T&&T!=="%"&&(this._pt.b=S,this._pt.r=pg);else if(E in g)Eg.call(this,a,E,S,M?M+b:b);else if(E in a)this.add(a,E,S||a[E],M?M+b:b,f,u);else if(E!=="parseTransform"){uc(E,b);continue}R||(E in g?K.push(E,0,g[E]):K.push(E,1,S||a[E])),m.push(E)}}X&&wd(this)},render:function(a,s){if(s.tween._time||!Dc())for(var c=s._pt;c;)c.r(a,c.d),c=c._next;else s.styles.revert()},get:ps,aliases:jo,getSetter:function(a,s,c){var f=jo[s];return f&&f.indexOf(",")<0&&(s=f),s in ds&&s!==Lr&&(a._gsap.x||ps(a,"x"))?c&&Ed===c?s==="scale"?_g:yg:(Ed=c||{})&&(s==="scale"?xg:wg):a.style&&!rc(a.style[s])?gg:~s.indexOf("-")?vg:Ac(a,s)},core:{_removeProperty:Xa,_getMatrix:Uc}};Pr.utils.checkPrefix=Gl,Pr.core.getStyleSaver=Ld,function(x,a,s,c){var f=Cr(x+","+a+","+s,function(u){ds[u]=1});Cr(a,function(u){Hr.units[u]="deg",Nd[u]=1}),jo[f[13]]=x+","+a,Cr(c,function(u){var m=u.split(":");jo[m[1]]=f[m[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Cr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(x){Hr.units[x]="px"}),Pr.registerPlugin(Vd);var Vc=Pr.registerPlugin(Vd)||Pr;Vc.core.Tween;class Og{constructor(a,s=!1){window.mars3d?(this.Cesium=window.mars3d.Cesium,this.DynamicMaskingArr=[],this.DynamicMaskingStyle=[],this.canvasClientWidth=a.viewer.canvas.clientWidth,this.canvasClientHeight=a.viewer.canvas.clientHeight,this.oldSet=new Set,this.tweenMap=new Map,this.isDynamicMasking=s):console.error("未引入指定插件")}add(a,s){let c=a.options.symbol.styleOptions.label.font_size,f=a.options.vectorId,u=Number(c)*1.4,m=Number(c)*1.8,g=a.options.symbol.styleOptions.label,{color:_,outlineColor:S,backgroundColor:b}=g;a.eachGraphic(I=>{I.style.label&&this.DynamicMaskingArr.push({id:f,uid:I.id,position:I._getLablePosition(),label:I.name,width:I.name?u*I.name.length:0,height:m,color:_,outline:s.label.outline,outlineColor:S,background:s.label.background,backgroundColor:b,dynamicMaskingColor:{backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),color:this.Cesium.Color.fromCssColorString(s.label.color),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}})}),this.DynamicMaskingStyle.push({vectorId:a.options.vectorId,outline:s.label.outline,background:s.label.background,color:this.Cesium.Color.fromCssColorString(s.label.color),backgroundColor:this.Cesium.Color.fromCssColorString(s.label.backgroundColor),outlineColor:this.Cesium.Color.fromCssColorString(s.label.outlineColor)}),this.oldSet=new Set,this.tweenMap=new Map}remove(a){this.DynamicMaskingArr=this.DynamicMaskingArr.filter(s=>s.id!==a),this.DynamicMaskingStyle=this.DynamicMaskingStyle.filter(s=>s.vectorId!==a),this.oldSet=new Set,this.tweenMap=new Map}modify(a,s){let{label:c}=s;if(c){let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_}=c;this.DynamicMaskingArr.forEach(S=>{S.id===a&&(f!=null&&(S.color=this.Cesium.Color.fromCssColorString(f),S.dynamicMaskingColor.color=this.Cesium.Color.fromCssColorString(f)),u!=null&&(S.outline=u),m!=null&&(S.outlineColor=this.Cesium.Color.fromCssColorString(m),S.dynamicMaskingColor.outlineColor=this.Cesium.Color.fromCssColorString(m)),g!=null&&(S.background=g),_!=null&&(S.backgroundColor=this.Cesium.Color.fromCssColorString(_),S.dynamicMaskingColor.backgroundColor=this.Cesium.Color.fromCssColorString(_)))})}}getBoundingRectangle(a){var s=this.Cesium.SceneTransforms.wgs84ToWindowCoordinates(window.map.viewer.scene,a.position);return s!==void 0?new this.Cesium.BoundingRectangle(s.x,s.y,a.width,a.height):new this.Cesium.BoundingRectangle(0,0,1,1)}getNonIntersectingRectangles(){let a=[];for(var s=0;s<this.DynamicMaskingArr.length;s++){let f=!1,u=this.DynamicMaskingArr[s],m,g,_;if(g=this.getBoundingRectangle(u),!(g.x<0||g.x>this.canvasClientWidth||g.y<0||g.y>this.canvasClientHeight))if(a.length===0){a.push(s);continue}else{for(var c=0;c<a.length;c++)if(m=this.DynamicMaskingArr[a[c]],_=this.getBoundingRectangle(m),this.Cesium.Intersect.OUTSIDE!==this.Cesium.BoundingRectangle.intersect(g,_)){f=!0;break}f||a.push(s)}}return new Set(a)}ifShow(){if(this.isDynamicMasking){let s={color:.001,outlineColor:.001,backgroundColor:.001},c={color:1,outlineColor:1,backgroundColor:1},f=this.getNonIntersectingRectangles(),u=new Set([...this.oldSet].filter(g=>!f.has(g))),m=new Set([...f].filter(g=>!this.oldSet.has(g)));for(let g of u)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}var a=Vc.to(c,{duration:.2,color:0,outlineColor:0,backgroundColor:0,onUpdate:()=>{var S,b;var _=this.DynamicMaskingArr[g];_.backgroundColor.alpha=c.backgroundColor,_.color.alpha=c.color,_.outlineColor.alpha=c.outlineColor,(b=(S=window.map.getLayer(_.id,"vectorId"))==null?void 0:S.getGraphicByAttr(_.uid))==null||b.setStyle({label:{show:!1,outline:!1,background:!1}})}});this.tweenMap.set(g,a)}for(let g of m)if(this.DynamicMaskingArr[g]){if(this.tweenMap.has(g)){var a=this.tweenMap.get(g);a.kill(),this.tweenMap.delete(g)}let _=this.DynamicMaskingArr[g],{backgroundColor:S,color:b,outlineColor:I}=_.dynamicMaskingColor;var a=Vc.to(s,{duration:.8+Math.random(),color:b.alpha,outlineColor:I.alpha,backgroundColor:S.alpha,onUpdate:()=>{var D,F;_.backgroundColor.alpha=s.backgroundColor,_.color.alpha=s.color,_.outlineColor.alpha=s.outlineColor,(F=(D=window.map.getLayer(_.id,"vectorId"))==null?void 0:D.getGraphicByAttr(_.uid))==null||F.setStyle({label:{show:!0,outline:_.outline,background:_.background,color:_.color,outlineColor:_.outlineColor,backgroundColor:_.backgroundColor}})}});this.tweenMap.set(g,a)}this.oldSet=f}}switchDynamicMasking(a){if(a)window.map.getLayers().forEach(s=>{var c;if((c=s.options)!=null&&c.vectorId){let{color:f,outlineColor:u,backgroundColor:m}=s.options.symbol.styleOptions.label;s.eachGraphic(g=>{g.setStyle({label:{color:f.withAlpha(0),outlineColor:u.withAlpha(.001),backgroundColor:m.withAlpha(.001),show:!1,background:!1,outline:!1}})})}});else if(this.DynamicMaskingStyle.length>0){let s;this.DynamicMaskingStyle.forEach(c=>{let{color:f,outline:u,outlineColor:m,background:g,backgroundColor:_,vectorId:S}=c;s=window.map.getLayer(S,"vectorId"),s&&s.eachGraphic(b=>{b.setStyle({label:{color:f,outlineColor:m,backgroundColor:_,show:!0,background:g,outline:u}})})})}this.isDynamicMasking=a,window.bimVector.switchDynamicMasking(a)}}const Ig=()=>{window.planClip.clearPlanClip(),window.schemeEvnModify.clearAllEvnModify(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},Dg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},zg=()=>{window.planClip.clearPlanClip(),window.bimRotatePoint.stop(),window.bimTrafficSimulation.destruction(),window.bimMapPTV&&window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.bimMapCompare.hide?window.bimMapCompare.hide():window.bimMapCompare.destroyControl(),window.updateEitor({content:""})},kg=x=>{let a=[];if(x.forEach(s=>{let{id:c}=s,f={id:c,mockData:{nextPage:[],item:[],previousPage:[]}};s.operate.forEach((u,m)=>{let g=Wc(u,f.mockData.nextPage);f.mockData.nextPage=g,f.mockData.item=g,f.mockData.previousPage=[]}),a.push(f)}),a.length>1)for(let s=1;s<a.length;s++){let c=a[s].mockData,f=a[s-1].mockData.item;const u=new Map;f.forEach(m=>{m.type!="rotatePoint"&&m.type!="viewpoint"&&m.type!="roaming"&&m.type!="splitScreen"&&m.type!="planClip"&&m.type!="editor"&&m.type!="gltf"?u.set(`${m.screenplayId}-${m.type}`,m):a[s].mockData.previousPage.push(m)}),c.nextPage.forEach(m=>{const g=`${m.screenplayId}-${m.type}`;let _={...u.get(g)};if(u.has(g)){if(m.type=="flight")a[s].mockData.previousPage.unshift(u.get(g)),_=m;else{let S={};Object.keys(m).forEach(b=>{if(b!="screenplayId"&&b!="type")if(u.get(g)[b])if(Object.keys(S).length==0&&(S={screenplayId:m.screenplayId,type:m.type}),b=="clip"||b=="flat"){_[b]=Wd(u.get(g)[b],m[b]);let I={screenplayId:m.screenplayId,type:m.type};I[b]={},Object.keys(m[b]).forEach(k=>{u.get(g)[b][k]?I[b][k]=u.get(g)[b][k]:m[b][k]=="true"&&(I[b][k]="false")}),S={...I,...S}}else S[b]=u.get(g)[b],_[b]=m[b];else a[s].mockData.previousPage.some(I=>I.screenplayId===m.screenplayId)||(console.log("未找到操作"),S={...jd(m,b),...S}),_[b]=m[b]}),Object.keys(S).length>0&&a[s].mockData.previousPage.push(S)}u.set(g,_)}else{console.log("未找到操作");let S=jd(m);S&&a[s].mockData.previousPage.push(S),u.set(g,m)}}),a[s].mockData.item=Array.from(u.values())}return console.log("-----------最后输出-----------"),console.log(a),console.log("-----------最后输出-----------"),a},Wc=(x,a=null)=>{let{executionProperty:s,screenplayId:c,property:f,type:u,delay:m,delayTime:g}=x;if((f=="add"||f==!0)&&(f="true"),(f=="remove"||f==!1)&&(f="false"),u=="pit"){let S=window.schemeEvnModify.getModelModifyDataForInitModelById(c);if(S){let b={};b[c]=f,f=b,c=S.modelId,s=S.type}}let _;if(c==""||c=="map")if(c="map",u=="splitScreen"){let{splitScreenMode:S,splitScreenModePercentage:b}=JSON.parse(f);a.push({screenplayId:c,type:u,executionProperty:{splitScreenMode:S,splitScreenModePercentage:b,mapClone:[]}});let{mainScreen:I,secondaryScreen:k}=JSON.parse(x.property);I.forEach(F=>{Wc(F,a)});let D=a.find(F=>F.type=="splitScreen");k.forEach(F=>{Wc(F,D.executionProperty.mapClone)})}else _={screenplayId:c,type:u,executionProperty:f},(s=="clip"||s=="flat")&&(_[s]=f),m&&(_.delay=m),g&&(_.delayTime=g),a&&(u=="flight"?a.unshift(_):a.push(_));else _=a?a.find(S=>S.screenplayId==c):null,_?(s=="clip"||s=="flat"?_[s]?_[s]=Wd(_[s],f):(_[s]=f,_.type="model"):_[s]=f,m&&(_[s].delay=m),g&&(_[s].delayTime=g)):(_={screenplayId:c,type:u},m&&(_.delay=m),g&&(_.delayTime=g),s=="clip"||s=="flat"?(_[s]=f,_.type="model"):_[s]=f,a&&(u=="flight"?a.unshift(_):a.push(_)));return a||_},Wd=(x,a)=>{const s={...x};for(const c in a)a.hasOwnProperty(c)&&(s[c]=a[c]);return s},jd=(x,a="all")=>{let{type:s,show:c,screenplayId:f,overallStaining:u,clip:m,flat:g}=x,_={};if(a=="all")switch(s){case"model":case"shp":case"plot":c&&c=="true"&&(_={screenplayId:f,type:s,show:"false"}),c&&c=="false"&&console.error("map上没有添加此对象"),u&&(_={..._,screenplayId:f,type:s,overallStaining:"false"}),m&&(_={..._,screenplayId:f,type:s,clip:"false"}),g&&(_={..._,screenplayId:f,type:s,flat:"false"});break;case"terrain":_={screenplayId:f,type:s,executionProperty:"true"};break;case"pit":_={screenplayId:f,type:s,executionProperty:"false"};break;case"underground":_={screenplayId:f,type:s,executionProperty:"1"};break}else switch(a){case"clip":case"flat":case"overallStaining":_={screenplayId:f,type:s},_[a]="false";break}return Object.keys(_).length>0?_:null},Bg=(x,a)=>{const s={};return Object.keys(a).forEach(c=>{x.hasOwnProperty(c)&&(s[c]=x[c])}),s},Ng=x=>/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(0|1|0\.\d+)\s*\)$/i.test(x),Fg=x=>{let a={};(x==null?void 0:x.length)>0&&x[0].operate.forEach(s=>{let{executionProperty:c,screenplayId:f,property:u,type:m}=s;(c=="show"||c=="overallStaining")&&(a[f]||(a[f]={type:m}),a[f][u]=c)}),window.map.getLayers().forEach(s=>{if((s.type=="3dtiles"||s.type=="geojson"||s.type=="tileset")&&s.options.name!="国界"){let c=s.options.modelId||s.options.vectorId;a[c]?(window.bimModel.editColor(c),window.schemeEvnModify.clearAllModelModify({isClone:!1})):s.remove()}}),window.bimEntity.entityLayer.getGraphicsByAttr().forEach(s=>{s.remove()}),window.bimMapSetUp.undergroundVal(1),window.bimTerrainProvider.show(),window.bimTrafficSimulation.destruction(),window.bimRotatePoint.stop(),window.bimMapPTV.destruction(),window.romStop(),window.complete(),window.planClip.clearPlanClip()};class Ug{constructor(a){Ba(this,"getPositions",a=>a.length>1&&(Array.isArray(a[0])||typeof a[0]=="object")?a:this.getPositions(a[0]));Ba(this,"terrainCutById",(a,s,c)=>{switch(c==null?void 0:c.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone||this.terrainClipClone.list.find(f=>f.id==s))return;this.terrainClipClone.addArea(a.length>1?a:a[0],{id:s});break;case!1:if(!this.terrainClip||this.terrainClip.list.find(f=>f.id==s))return;this.terrainClip.addArea(a.length>1?a:a[0],{id:s});break}});Ba(this,"clearTerrainCutById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainClipClone)return;this.terrainClipClone.removeArea(a);break;case!1:if(!this.terrainClip)return;this.terrainClip.removeArea(a);break}});Ba(this,"terrainFlattenById",(a,s,c,f)=>{switch(f==null?void 0:f.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone||this.terrainFlatClone.list.find(u=>u.id==c))return;this.terrainFlatClone.addArea(a.length>1?a:a[0],{id:c,height:s});break;case!1:if(!this.terrainFlat||this.terrainFlat.list.find(u=>u.id==c))return;this.terrainFlat.addArea(a.length>1?a:a[0],{id:c,height:s});break}});Ba(this,"clearTerrainFlattenById",(a,s)=>{switch(s==null?void 0:s.isClone){case!0:if(this.createTerrainModifyInstanceClone(),!this.terrainFlatClone)return;this.terrainFlatClone.removeArea(a);break;case!1:if(!this.terrainFlat)return;this.terrainFlat.removeArea(a);break}});this.flattenedEvnModifyData=a,this.modelIdListByModify=[],this.modelIdListByModifyClone=[],this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null,this.createTerrainModifyInstance()}getDataFromFlattenedEvnModifyListById(a){const s=this.flattenedEvnModifyData.find(c=>c.id==a);return s||null}getModelFromMapById(a,s){let c;switch(s==null?void 0:s.isClone){case!0:c=window.mapClone?window.mapClone.mapEx.getLayers():[];break;case!1:c=window.map.getLayers();break}return c.find(u=>u.options.modelId==a)}updateFlattenedEvnModifyData(a){this.flattenedEvnModifyData=a}modelCutById(a,s,c,f){const u=bimModel.queryModel(a,f);if(u&&!u.clip.list.find(m=>m.id==c))switch(u.clip.addArea(s.length>1?s:s[0],{id:c}),f==null?void 0:f.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}modelFlattenById(a,s,c,f,u){const m=bimModel.queryModel(a,u);if(m&&!m.flat.list.find(g=>g.id==f))switch(m.flat.addArea(s.length>1?s:s[0],{height:c,id:f}),u==null?void 0:u.isClone){case!0:this.modelIdListByModifyClone.push(a),this.modelIdListByModifyClone=[...new Set(this.modelIdListByModifyClone)];break;case!1:this.modelIdListByModify.push(a),this.modelIdListByModify=[...new Set(this.modelIdListByModify)];break}}clearModelCutById(a,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.clip.removeArea(s),c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}clearModelFlattenById(a,s,c){const f=bimModel.queryModel(a,c);if(f)switch(f.flat.removeArea(s),c==null?void 0:c.isClone){case!0:this.modelIdListByModifyClone=this.modelIdListByModifyClone.filter(u=>u!=a);break;case!1:this.modelIdListByModify=this.modelIdListByModify.filter(u=>u!=a);break}}createTerrainModifyInstance(){if(window.map.thing.terrainClip)this.terrainClip=window.map.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({czm:!1,splitNum:30});window.map.addThing(a),this.terrainClip=a}if(window.map.thing.terrainFlat)this.terrainFlat=window.map.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.map.addThing(a),this.terrainFlat=a}}createTerrainModifyInstanceClone(){if(window.mapClone){if(window.mapClone.mapEx.thing.terrainClip)this.terrainClipClone=window.mapClone.mapEx.thing.terrainClip;else{const a=new mars3d.thing.TerrainClip({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainClipClone=a}if(window.mapClone.mapEx.thing.terrainFlat)this.terrainFlatClone=window.mapClone.mapEx.thing.terrainFlat;else{const a=new mars3d.thing.TerrainFlat({splitNum:80});window.mapClone.mapEx.addThing(a),this.terrainFlatClone=a}}}evnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}evnModifyByIdAndAddOptionsToStore(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(c.bimEnvModifyData[g].modifyData).coordinates),S=JSON.parse(c.bimEnvModifyData[g].modifyData).depth,b=c.bimEnvModifyData[g].id;u===0&&m===0?this.modelCutById(f,_,b,s):u===0&&m===1?this.modelFlattenById(f,_,S,b,s):u===1&&m===0?this.terrainCutById(_,b,s):u===1&&m===1&&this.terrainFlattenById(_,S,b,s)}}clearEvnModifyById(a,s){s=arguments[1]||{isClone:!1};const c=this.getDataFromFlattenedEvnModifyListById(a);if(!c)return;const{bimEnvModify:{embsId:f,dataType:u,modifyType:m}}=c;for(let g=0;g<c.bimEnvModifyData.length;g++){const _=c.bimEnvModifyData[g].id;u===0&&m===0?this.clearModelCutById(f,_,s):u===0&&m===1?this.clearModelFlattenById(f,_,s):u===1&&m===0?this.clearTerrainCutById(_,s):u===1&&m===1&&this.clearTerrainFlattenById(_,s)}}clearAllModelModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:this.modelIdListByModifyClone.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModifyClone=[];break;case!1:this.modelIdListByModify.forEach(s=>{const c=bimModel.queryModel(s,a);c&&(c.clip.clear(),c.flat.clear())}),this.modelIdListByModify=[];break}}clearAllTerrainModify(a){switch(a||(a={isClone:!1}),a.isClone){case!0:window.mapClone||(this.terrainClipClone=null,this.terrainFlatClone=null),this.terrainClipClone&&this.terrainClipClone.clear(),this.terrainFlatClone&&this.terrainFlatClone.clear();break;case!1:this.terrainClip&&this.terrainClip.clear(),this.terrainFlat&&this.terrainFlat.clear();break}}getModelModifyDataForInitModelById(a){const s=this.getDataFromFlattenedEvnModifyListById(a);if(!s)return;const{bimEnvModify:{embsId:c,dataType:f,modifyType:u}}=s;if(this.modelIdListByModify.push(c),f===0&&u===0){const m={modelId:c,type:"clip",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const S={positions:this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),id:s.bimEnvModifyData[g].id};m.area.push(S)}return m}else if(f===0&&u===1){const m={modelId:c,type:"flat",area:[]};for(let g=0;g<s.bimEnvModifyData.length;g++){const _=this.getPositions(JSON.parse(s.bimEnvModifyData[g].modifyData).coordinates),S={id:s.bimEnvModifyData[g].id,positions:_,height:JSON.parse(s.bimEnvModifyData[g].modifyData).depth};return m.area.push(S),m}}}clearAllEvnModify(){this.clearAllModelModify({isClone:!0}),this.clearAllModelModify({isClone:!1}),this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1})}destroyTerrainModifyInstance(){this.clearAllTerrainModify({isClone:!0}),this.clearAllTerrainModify({isClone:!1}),this.terrainClip&&window.map.removeThing(this.terrainClip,!0),this.terrainFlat&&window.map.removeThing(this.terrainFlat,!0),this.terrainClipClone&&window.mapClone.mapEx.removeThing(this.terrainClipClone,!0),this.terrainFlatClone&&window.mapClone.mapEx.removeThing(this.terrainFlatClone,!0),this.terrainClip=null,this.terrainFlat=null,this.terrainClipClone=null,this.terrainFlatClone=null}}let Hl=null,ms=null,ia=null;class Gg{constructor(){mars3d&&(this.projectId=parseInt(window.sessionStorage.getItem("nowProjectId")),this.viewPoints=new Array,this.roaming=null)}init(a,s,c){ms=new mars3d.layer.GraphicLayer({isContinued:!0});var f=this;window.map.addLayer(ms),ms.on(mars3d.EventType.drawCreated,function(u){var m=u.graphic.point;console.log(m),s(m),setTimeout(()=>{f.startDrawGraphic()},500)}),ms.on(mars3d.EventType.editStop,function(u){console.log("停止编辑",u)}),ia=c,Hl=new mars3d.layer.GraphicLayer,window.map.addLayer(Hl),a&&(this.viewPoints=a.filter((u,m)=>{if(m%(ia.smooth*1)==0)return u})),this.addGraphicLayer(this.viewPoints)}addDemoGraphic1(a,s){const c=new mars3d.graphic.PolylinePrimitive({positions:a.map(f=>[f.lng,f.lat,f.alt+1e3]),style:{width:10,materialType:mars3d.MaterialType.LineFlow,materialOptions:{color:"red",image:s+"img/line/line-arrow-blue.png",speed:10,repeat:new Cesium.Cartesian2(5,1),mixt:!0}}});Hl.addGraphic(c)}addGraphicLayer(a){var s={};ia.Viewovalue==1?s={camera:{type:"dy",followedX:ia.followedX,followedZ:ia.followedZ},interpolation:!0,interpolationDegree:6,autoMiddleDynamicPosition:!0,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}:ia.Viewovalue==2?s={camera:{type:"gs",pitch:-30,radius:500},interpolation:!0,interpolationDegree:2,clockLoop:!0,path:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}}:s={camera:{type:"sd",followedZ:ia.followedZ},polyline:{width:3,color:Cesium.Color.fromCssColorString("#ff0000").withAlpha(.5)}},a=a.map(c=>[c.lng,c.lat,c.alt]),a.length,this.fixedRoute=new mars3d.graphic.FixedRoute({name:"贴地表表面漫游",speed:ia.speed,autoStop:!0,positions:a,offsetHeight:1.6,clockLoop:!0,...s}),Hl.addGraphic(this.fixedRoute)}addDemoGraphic(a,s){const c=new mars3d.graphic.BillboardEntity({position:new mars3d.LngLatPoint(a.lng,a.lat,a.alt),style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0}});ms.addGraphic(c)}startDrawGraphic(a){ms.startDraw({type:"billboard",style:{width:30,height:32,image:"/img/marker/markffd700.png",scale:1,scaleByDistance:!1,scaleByDistance_far:1e6,scaleByDistance_farValue:.1,scaleByDistance_near:1e3,scaleByDistance_nearValue:1,distanceDisplayCondition:!1,distanceDisplayCondition_far:2e6,distanceDisplayCondition_near:0,clampToGround:!1,visibleDepth:!1,drawShow:!0,classificationType:Cesium.ClassificationType.TERRAIN}}).then(s=>{console.log(123)})}start(){console.log(this.fixedRoute),this.fixedRoute&&(this.fixedRoute.start(),window.map.scene.screenSpaceCameraController.enableCollisionDetection=!1)}pause(){this.fixedRoute&&this.fixedRoute.pause()}resume(){this.fixedRoute&&this.fixedRoute.proceed()}stop(){this.fixedRoute&&this.fixedRoute.stop()}remove(){this.fixedRoute&&this.fixedRoute.stop(),window.map.removeThing(this.roaming,!0),window.map.removeLayer(Hl,!0),window.map.removeLayer(ms,!0),this.viewPoints=[],window.map.scene.screenSpaceCameraController.enableCollisionDetection=!0}removeCameraRoute(){Hl.clear(),ms.clear()}removegraphicLayerpoint(){ms.clear()}}class Hg{constructor(a){window.mars3d&&(this.beginDate="",this.endDate="",this.trafficSimulationLayer,this.trafficSimulationArr=[],this.style={width:4,materialType:window.mars3d.MaterialType.LineFlow,materialOptions:{color:"#4ac2ff",image:a+"img/textures/line-arrow-right.png",repeat_x:20,repeat_y:1,speed:20},clampToGround:!1,allowDrillPick:!1},this.vehicleSum=100,this.automobileList=[{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/suv.gltf"},{url:a+"gltf/cart/red_car.gltf"},{url:a+"gltf/cart/benchi3.gltf"},{url:a+"gltf/cart/aodi1.gltf"},{url:a+"gltf/cart/kache3.gltf"},{url:a+"gltf/cart/bus2.gltf"},{url:a+"gltf/cart/jiaobanche.glb"}],this._czmlLayer,this._czmlLayerArr=[])}init(a){this.trafficSimulationLayer=new window.mars3d.layer.GraphicLayer({temporaryLayer:"trafficSimulation"}),window.map.addLayer(this.trafficSimulationLayer),window.map.bimMapEdit="1",a&&(this._czmlLayerArr=a)}addLine(a){let s=a;return new Promise(c=>{this.trafficSimulationLayer.startDraw({type:"polylineP",attr:{trafficSimulationId:s},style:{...this.style}}).then(f=>{c({id:s,pointSet:f.coordinates,speed:45,interval:1})})})}initLine(a){let s;a.forEach(c=>{let{id:f}=c;s=new window.mars3d.graphic.PolylinePrimitive({positions:c.pointSet,attr:{trafficSimulationId:f},style:{...this.style}}),this.trafficSimulationLayer.addGraphic(s)})}positionLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.flyTo({scale:2})}deleteLine(a){let s=this.queryTrafficSimulationLine(a);s&&s.remove()}queryTrafficSimulationArr(){return this.trafficSimulationArr}queryTrafficSimulationLine(a){if(this.trafficSimulationLayer)return this.trafficSimulationLayer.getGraphicByAttr(a,"trafficSimulationId")}editTrafficSimulationLine(a,s=!0){let c=this.queryTrafficSimulationLine(a);s?(c.setStyle({materialOptions:{color:"#ff0000"}}),c.startEditing()):(c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing())}fallbackTrafficSimulationLine(a,s){let c=this.queryTrafficSimulationLine(a);c.positions=s,c.setStyle({materialOptions:{color:"#4ac2ff"}}),c.stopEditing()}queryCzml(a){return this._czmlLayerArr.length==0?!1:this._czmlLayerArr.find(s=>s.id==a)}start(a="add"){this.destruction(),this.beginDate=new Date().toISOString();let s=new Date,c=s.getDate();s.setDate(c+1),this.endDate=s.toISOString(),console.log(this.queryCzml(a)),this.queryCzml(a)?this.trafficSimulationArr=JSON.parse(this.queryCzml(a).route):this.trafficSimulationArr=[],this.processingData(a)}selected(){this._czmlLayer&&this._czmlLayer.flyTo()}destruction(){this.trafficSimulationLayer.clear(),this.trafficSimulationLayer.remove(),this._czmlLayer&&(this._czmlLayer.clear(),this._czmlLayer.remove()),this.style.materialOptions.color="#4ac2ff",window.map.bimMapEdit="0"}processingData(a){let s=[{version:"1.0",id:"document",clock:{interval:`${this.beginDate}/${this.endDate}`,currentTime:this.beginDate,multiplier:1},style:{distanceDisplayCondition:!0,distanceDisplayCondition_far:1e6,distanceDisplayCondition_near:0}}],c=[],f=JSON.parse(JSON.stringify(this.trafficSimulationArr)),u=0;f.forEach((g,_)=>{let S=0,b=0,{pointSet:I,interval:k,speed:D}=g;for(let F=1;F<=this.vehicleSum;F++){let E=JSON.parse(JSON.stringify(I));E.forEach((T,M)=>{M>0&&(u=parseFloat((this.disTance(T,E[M-1].slice(1))/D).toFixed(2)),S+=u),M==0&&(S=b),T.unshift(S)}),b+=k,c=E.reduce((T,M)=>T.concat(M));let L={name:`${_}-${F}`,availability:`${this.beginDate}/${this.endDate}`,orientation:{velocityReference:"#position"},position:{epoch:this.beginDate,cartographicDegrees:c},style:{minimumPixelSize:100,distanceDisplayCondition:!0,distanceDisplayCondition_near:0,distanceDisplayCondition_far:1300,distanceDisplayPoint:{color:"#00ff00",pixelSize:8}},model:{show:!0,gltf:this.randomVehicle(),heightReference:window.Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,scale:.6,minimumPixelSize:100,maximumScale:1.5}};s.push(L)}});let m={name:"交通模拟",czmlId:a,data:s,autoUpdateClock:!1};this._czmlLayer=new window.mars3d.layer.CzmlLayer(m),window.map.addLayer(this._czmlLayer)}disTance(a,s){let c,f,u;return c=window.Cesium.Cartesian3.fromDegrees(...a),f=window.Cesium.Cartesian3.fromDegrees(...s),u=window.Cesium.Cartesian3.distance(c,f),u}randomVehicle(){let a=Math.round(Math.random()*(this.automobileList.length-1));return this.automobileList[a].url}}const Vg=[Tf,Ef],Wg={continuation:null,mapModali:null,install(x){if(Vg.forEach((m,g)=>{x.component(m.name,m)}),this.continuation){x.config.globalProperties.$continuation=this.continuation;return}let a=oi.createApp(Mf),s=document.createElement("div"),c=document.body;if(c.appendChild(s),this.loading=a.mount(s),x.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){x.config.globalProperties.$mapModali=this.mapModali;return}let f=oi.createApp(Sf),u=document.createElement("div");c.appendChild(u),this.mapModali=f.mount(u),x.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Pi.BimBackgroundPlate=Ef,Pi.BimCutscenes=Mf,Pi.BimElevationImage=um,Pi.BimEntity=fm,Pi.BimModel=sm,Pi.BimModify=Ug,Pi.BimTerrainProvider=hm,Pi.BimTrafficSimulation=Hg,Pi.BimVector=lm,Pi.Bimroaming=Gg,Pi.Button=Tf,Pi.ChbimPlugins=Wg,Pi.DynamicMasking=Og,Pi.MapModali=Sf,Pi.PanoramicView=vm,Pi.ViewShed=cm,Pi.getSameKeyData=Bg,Pi.init=Ig,Pi.initMap=Fg,Pi.isValidRGBA=Ng,Pi.nextPage=zg,Pi.operateMapData=kg,Pi.previousPage=Dg,Object.defineProperty(Pi,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chbim-plugins",
3
3
  "private": false,
4
- "version": "0.0.159",
4
+ "version": "0.0.161",
5
5
  "description": "此插件和chbim云平台强绑定",
6
6
  "main": "chbim-plugins.js",
7
7
  "keywords": ["vue", "Cesium"],