console.warn("THREE.OrbitControls: As part of the transition to ES6 Modules, the files in 'examples/js' were deprecated in May 2020 (r117) and will be deleted in December 2020 (r124). You can find more information about developing using ES6 Modules in https://threejs.org/docs/#manual/en/introduction/Installation."),THREE.OrbitControls=function(a,b){function c(){return 2*Math.PI/60/60*O.autoRotateSpeed}function d(){return Math.pow(.95,O.zoomSpeed)}function e(a){W.theta-=a}function f(a){W.phi-=a}function g(a){O.object.isPerspectiveCamera?X/=a:O.object.isOrthographicCamera?(O.object.zoom=Math.max(O.minZoom,Math.min(O.maxZoom,O.object.zoom*a)),O.object.updateProjectionMatrix(),Z=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),O.enableZoom=!1)}function h(a){O.object.isPerspectiveCamera?X*=a:O.object.isOrthographicCamera?(O.object.zoom=Math.max(O.minZoom,Math.min(O.maxZoom,O.object.zoom/a)),O.object.updateProjectionMatrix(),Z=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),O.enableZoom=!1)}function i(a){$.set(a.clientX,a.clientY)}function j(a){ea.set(a.clientX,a.clientY)}function k(a){ba.set(a.clientX,a.clientY)}function l(a){_.set(a.clientX,a.clientY),aa.subVectors(_,$).multiplyScalar(O.rotateSpeed);var b=O.domElement;e(2*Math.PI*aa.x/b.clientHeight),f(2*Math.PI*aa.y/b.clientHeight),$.copy(_),O.update()}function m(a){fa.set(a.clientX,a.clientY),ga.subVectors(fa,ea),ga.y>0?g(d()):ga.y<0&&h(d()),ea.copy(fa),O.update()}function n(a){ca.set(a.clientX,a.clientY),da.subVectors(ca,ba).multiplyScalar(O.panSpeed),ja(da.x,da.y),ba.copy(ca),O.update()}function o(){}function p(a){a.deltaY<0?h(d()):a.deltaY>0&&g(d()),O.update()}function q(a){var b=!1;switch(a.keyCode){case O.keys.UP:ja(0,O.keyPanSpeed),b=!0;break;case O.keys.BOTTOM:ja(0,-O.keyPanSpeed),b=!0;break;case O.keys.LEFT:ja(O.keyPanSpeed,0),b=!0;break;case O.keys.RIGHT:ja(-O.keyPanSpeed,0),b=!0}b&&(a.preventDefault(),O.update())}function r(a){if(1==a.touches.length)$.set(a.touches[0].pageX,a.touches[0].pageY);else{var b=.5*(a.touches[0].pageX+a.touches[1].pageX),c=.5*(a.touches[0].pageY+a.touches[1].pageY);$.set(b,c)}}function s(a){if(1==a.touches.length)ba.set(a.touches[0].pageX,a.touches[0].pageY);else{var b=.5*(a.touches[0].pageX+a.touches[1].pageX),c=.5*(a.touches[0].pageY+a.touches[1].pageY);ba.set(b,c)}}function t(a){var b=a.touches[0].pageX-a.touches[1].pageX,c=a.touches[0].pageY-a.touches[1].pageY,d=Math.sqrt(b*b+c*c);ea.set(0,d)}function u(a){O.enableZoom&&t(a),O.enablePan&&s(a)}function v(a){O.enableZoom&&t(a),O.enableRotate&&r(a)}function w(a){if(1==a.touches.length)_.set(a.touches[0].pageX,a.touches[0].pageY);else{var b=.5*(a.touches[0].pageX+a.touches[1].pageX),c=.5*(a.touches[0].pageY+a.touches[1].pageY);_.set(b,c)}aa.subVectors(_,$).multiplyScalar(O.rotateSpeed);var d=O.domElement;e(2*Math.PI*aa.x/d.clientHeight),f(2*Math.PI*aa.y/d.clientHeight),$.copy(_)}function x(a){if(1==a.touches.length)ca.set(a.touches[0].pageX,a.touches[0].pageY);else{var b=.5*(a.touches[0].pageX+a.touches[1].pageX),c=.5*(a.touches[0].pageY+a.touches[1].pageY);ca.set(b,c)}da.subVectors(ca,ba).multiplyScalar(O.panSpeed),ja(da.x,da.y),ba.copy(ca)}function y(a){var b=a.touches[0].pageX-a.touches[1].pageX,c=a.touches[0].pageY-a.touches[1].pageY,d=Math.sqrt(b*b+c*c);fa.set(0,d),ga.set(0,Math.pow(fa.y/ea.y,O.zoomSpeed)),g(ga.y),ea.copy(fa)}function z(a){O.enableZoom&&y(a),O.enablePan&&x(a)}function A(a){O.enableZoom&&y(a),O.enableRotate&&w(a)}function B(){}function C(a){if(O.enabled!==!1)switch(a.pointerType){case"mouse":case"pen":F(a)}}function D(a){if(O.enabled!==!1)switch(a.pointerType){case"mouse":case"pen":G(a)}}function E(a){if(O.enabled!==!1)switch(a.pointerType){case"mouse":case"pen":H(a)}}function F(a){a.preventDefault(),O.domElement.focus?O.domElement.focus():window.focus();var b;switch(a.button){case 0:b=O.mouseButtons.LEFT;break;case 1:b=O.mouseButtons.MIDDLE;break;case 2:b=O.mouseButtons.RIGHT;break;default:b=-1}switch(b){case THREE.MOUSE.DOLLY:if(O.enableZoom===!1)return;j(a),T=S.DOLLY;break;case THREE.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(O.enablePan===!1)return;k(a),T=S.PAN}else{if(O.enableRotate===!1)return;i(a),T=S.ROTATE}break;case THREE.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(O.enableRotate===!1)return;i(a),T=S.ROTATE}else{if(O.enablePan===!1)return;k(a),T=S.PAN}break;default:T=S.NONE}T!==S.NONE&&(O.domElement.ownerDocument.addEventListener("pointermove",D,!1),O.domElement.ownerDocument.addEventListener("pointerup",E,!1),O.dispatchEvent(Q))}function G(a){if(O.enabled!==!1)switch(a.preventDefault(),T){case S.ROTATE:if(O.enableRotate===!1)return;l(a);break;case S.DOLLY:if(O.enableZoom===!1)return;m(a);break;case S.PAN:if(O.enablePan===!1)return;n(a)}}function H(a){O.enabled!==!1&&(o(a),O.domElement.ownerDocument.removeEventListener("pointermove",D,!1),O.domElement.ownerDocument.removeEventListener("pointerup",E,!1),O.dispatchEvent(R),T=S.NONE)}function I(a){O.enabled===!1||O.enableZoom===!1||T!==S.NONE&&T!==S.ROTATE||(a.preventDefault(),a.stopPropagation(),O.dispatchEvent(Q),p(a),O.dispatchEvent(R))}function J(a){O.enabled!==!1&&O.enableKeys!==!1&&O.enablePan!==!1&&q(a)}function K(a){if(O.enabled!==!1){switch(a.preventDefault(),a.touches.length){case 1:switch(O.touches.ONE){case THREE.TOUCH.ROTATE:if(O.enableRotate===!1)return;r(a),T=S.TOUCH_ROTATE;break;case THREE.TOUCH.PAN:if(O.enablePan===!1)return;s(a),T=S.TOUCH_PAN;break;default:T=S.NONE}break;case 2:switch(O.touches.TWO){case THREE.TOUCH.DOLLY_PAN:if(O.enableZoom===!1&&O.enablePan===!1)return;u(a),T=S.TOUCH_DOLLY_PAN;break;case THREE.TOUCH.DOLLY_ROTATE:if(O.enableZoom===!1&&O.enableRotate===!1)return;v(a),T=S.TOUCH_DOLLY_ROTATE;break;default:T=S.NONE}break;default:T=S.NONE}T!==S.NONE&&O.dispatchEvent(Q)}}function L(a){if(O.enabled!==!1)switch(a.preventDefault(),a.stopPropagation(),T){case S.TOUCH_ROTATE:if(O.enableRotate===!1)return;w(a),O.update();break;case S.TOUCH_PAN:if(O.enablePan===!1)return;x(a),O.update();break;case S.TOUCH_DOLLY_PAN:if(O.enableZoom===!1&&O.enablePan===!1)return;z(a),O.update();break;case S.TOUCH_DOLLY_ROTATE:if(O.enableZoom===!1&&O.enableRotate===!1)return;A(a),O.update();break;default:T=S.NONE}}function M(a){O.enabled!==!1&&(B(a),O.dispatchEvent(R),T=S.NONE)}function N(a){O.enabled!==!1&&a.preventDefault()}void 0===b&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),b===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=a,this.domElement=b,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-(1/0),this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:THREE.MOUSE.ROTATE,MIDDLE:THREE.MOUSE.DOLLY,RIGHT:THREE.MOUSE.PAN},this.touches={ONE:THREE.TOUCH.ROTATE,TWO:THREE.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return V.phi},this.getAzimuthalAngle=function(){return V.theta},this.saveState=function(){O.target0.copy(O.target),O.position0.copy(O.object.position),O.zoom0=O.object.zoom},this.reset=function(){O.target.copy(O.target0),O.object.position.copy(O.position0),O.object.zoom=O.zoom0,O.object.updateProjectionMatrix(),O.dispatchEvent(P),O.update(),T=S.NONE},this.update=function(){var b=new THREE.Vector3,d=(new THREE.Quaternion).setFromUnitVectors(a.up,new THREE.Vector3(0,1,0)),f=d.clone().inverse(),g=new THREE.Vector3,h=new THREE.Quaternion,i=2*Math.PI;return function(){var a=O.object.position;b.copy(a).sub(O.target),b.applyQuaternion(d),V.setFromVector3(b),O.autoRotate&&T===S.NONE&&e(c()),O.enableDamping?(V.theta+=W.theta*O.dampingFactor,V.phi+=W.phi*O.dampingFactor):(V.theta+=W.theta,V.phi+=W.phi);var j=O.minAzimuthAngle,k=O.maxAzimuthAngle;return isFinite(j)&&isFinite(k)&&(j<-Math.PI?j+=i:j>Math.PI&&(j-=i),k<-Math.PI?k+=i:k>Math.PI&&(k-=i),k>j?V.theta=Math.max(j,Math.min(k,V.theta)):V.theta=V.theta>(j+k)/2?Math.max(j,V.theta):Math.min(k,V.theta)),V.phi=Math.max(O.minPolarAngle,Math.min(O.maxPolarAngle,V.phi)),V.makeSafe(),V.radius*=X,V.radius=Math.max(O.minDistance,Math.min(O.maxDistance,V.radius)),O.enableDamping===!0?O.target.addScaledVector(Y,O.dampingFactor):O.target.add(Y),b.setFromSpherical(V),b.applyQuaternion(f),a.copy(O.target).add(b),O.object.lookAt(O.target),O.enableDamping===!0?(W.theta*=1-O.dampingFactor,W.phi*=1-O.dampingFactor,Y.multiplyScalar(1-O.dampingFactor)):(W.set(0,0,0),Y.set(0,0,0)),X=1,Z||g.distanceToSquared(O.object.position)>U||8*(1-h.dot(O.object.quaternion))>U?(O.dispatchEvent(P),g.copy(O.object.position),h.copy(O.object.quaternion),Z=!1,!0):!1}}(),this.dispose=function(){O.domElement.removeEventListener("contextmenu",N,!1),O.domElement.removeEventListener("pointerdown",C,!1),O.domElement.removeEventListener("wheel",I,!1),O.domElement.removeEventListener("touchstart",K,!1),O.domElement.removeEventListener("touchend",M,!1),O.domElement.removeEventListener("touchmove",L,!1),O.domElement.ownerDocument.removeEventListener("pointermove",D,!1),O.domElement.ownerDocument.removeEventListener("pointerup",E,!1),O.domElement.removeEventListener("keydown",J,!1)};var O=this,P={type:"change"},Q={type:"start"},R={type:"end"},S={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},T=S.NONE,U=1e-6,V=new THREE.Spherical,W=new THREE.Spherical,X=1,Y=new THREE.Vector3,Z=!1,$=new THREE.Vector2,_=new THREE.Vector2,aa=new THREE.Vector2,ba=new THREE.Vector2,ca=new THREE.Vector2,da=new THREE.Vector2,ea=new THREE.Vector2,fa=new THREE.Vector2,ga=new THREE.Vector2,ha=function(){var a=new THREE.Vector3;return function(b,c){a.setFromMatrixColumn(c,0),a.multiplyScalar(-b),Y.add(a)}}(),ia=function(){var a=new THREE.Vector3;return function(b,c){O.screenSpacePanning===!0?a.setFromMatrixColumn(c,1):(a.setFromMatrixColumn(c,0),a.crossVectors(O.object.up,a)),a.multiplyScalar(b),Y.add(a)}}(),ja=function(){var a=new THREE.Vector3;return function(b,c){var d=O.domElement;if(O.object.isPerspectiveCamera){var e=O.object.position;a.copy(e).sub(O.target);var f=a.length();f*=Math.tan(O.object.fov/2*Math.PI/180),ha(2*b*f/d.clientHeight,O.object.matrix),ia(2*c*f/d.clientHeight,O.object.matrix)}else O.object.isOrthographicCamera?(ha(b*(O.object.right-O.object.left)/O.object.zoom/d.clientWidth,O.object.matrix),ia(c*(O.object.top-O.object.bottom)/O.object.zoom/d.clientHeight,O.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),O.enablePan=!1)}}();O.domElement.addEventListener("contextmenu",N,!1),O.domElement.addEventListener("pointerdown",C,!1),O.domElement.addEventListener("wheel",I,!1),O.domElement.addEventListener("touchstart",K,!1),O.domElement.addEventListener("touchend",M,!1),O.domElement.addEventListener("touchmove",L,!1),O.domElement.addEventListener("keydown",J,!1),-1===O.domElement.tabIndex&&(O.domElement.tabIndex=0),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,THREE.MapControls=function(a,b){THREE.OrbitControls.call(this,a,b),this.screenSpacePanning=!1,this.mouseButtons.LEFT=THREE.MOUSE.PAN,this.mouseButtons.RIGHT=THREE.MOUSE.ROTATE,this.touches.ONE=THREE.TOUCH.PAN,this.touches.TWO=THREE.TOUCH.DOLLY_ROTATE},THREE.MapControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.MapControls.prototype.constructor=THREE.MapControls;