gralobe 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gralobe.js +200 -203
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +3 -3
- package/dist/gralobe.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/gralobe.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ae,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],A):(ae=typeof globalThis<"u"?globalThis:ae||self,A(ae.Gralobe={},ae.THREE))})(this,(function(ae,A){"use strict";function Or(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const D=Or(A),Hi={type:"change"},Kt={type:"start"},Zi={type:"end"},Tt=new A.Ray,Ki=new A.Plane,Rr=Math.cos(70*A.MathUtils.DEG2RAD),Z=new A.Vector3,J=2*Math.PI,L={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Xt=1e-6;class Ir extends A.Controls{constructor(e,t=null){super(e,t),this.state=L.NONE,this.target=new A.Vector3,this.cursor=new A.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=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.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:A.MOUSE.ROTATE,MIDDLE:A.MOUSE.DOLLY,RIGHT:A.MOUSE.PAN},this.touches={ONE:A.TOUCH.ROTATE,TWO:A.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new A.Vector3,this._lastQuaternion=new A.Quaternion,this._lastTargetPosition=new A.Vector3,this._quat=new A.Quaternion().setFromUnitVectors(e.up,new A.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new A.Spherical,this._sphericalDelta=new A.Spherical,this._scale=1,this._panOffset=new A.Vector3,this._rotateStart=new A.Vector2,this._rotateEnd=new A.Vector2,this._rotateDelta=new A.Vector2,this._panStart=new A.Vector2,this._panEnd=new A.Vector2,this._panDelta=new A.Vector2,this._dollyStart=new A.Vector2,this._dollyEnd=new A.Vector2,this._dollyDelta=new A.Vector2,this._dollyDirection=new A.Vector3,this._mouse=new A.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=kr.bind(this),this._onPointerDown=Lr.bind(this),this._onPointerUp=Ur.bind(this),this._onContextMenu=Gr.bind(this),this._onMouseWheel=Nr.bind(this),this._onKeyDown=$r.bind(this),this._onTouchStart=Br.bind(this),this._onTouchMove=Vr.bind(this),this._onMouseDown=Fr.bind(this),this._onMouseMove=zr.bind(this),this._interceptControlDown=jr.bind(this),this._interceptControlUp=Yr.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Hi),this.update(),this.state=L.NONE}update(e=null){const t=this.object.position;Z.copy(t).sub(this.target),Z.applyQuaternion(this._quat),this._spherical.setFromVector3(Z),this.autoRotate&&this.state===L.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(i)&&isFinite(n)&&(i<-Math.PI?i+=J:i>Math.PI&&(i-=J),n<-Math.PI?n+=J:n>Math.PI&&(n-=J),i<=n?this._spherical.theta=Math.max(i,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(i+n)/2?Math.max(i,this._spherical.theta):Math.min(n,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const s=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=s!=this._spherical.radius}if(Z.setFromSpherical(this._spherical),Z.applyQuaternion(this._quatInverse),t.copy(this.target).add(Z),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let s=null;if(this.object.isPerspectiveCamera){const o=Z.length();s=this._clampDistance(o*this._scale);const l=o-s;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const o=new A.Vector3(this._mouse.x,this._mouse.y,0);o.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=l!==this.object.zoom;const c=new A.Vector3(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),s=Z.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;s!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position):(Tt.origin.copy(this.object.position),Tt.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(Tt.direction))<Rr?this.object.lookAt(this.target):(Ki.setFromNormalAndCoplanarPoint(this.object.up,this.target),Tt.intersectPlane(Ki,this.target))))}else if(this.object.isOrthographicCamera){const s=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),s!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>Xt||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Xt||this._lastTargetPosition.distanceToSquared(this.target)>Xt?(this.dispatchEvent(Hi),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?J/60*this.autoRotateSpeed*e:J/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){Z.setFromMatrixColumn(t,0),Z.multiplyScalar(-e),this._panOffset.add(Z)}_panUp(e,t){this.screenSpacePanning===!0?Z.setFromMatrixColumn(t,1):(Z.setFromMatrixColumn(t,0),Z.crossVectors(this.object.up,Z)),Z.multiplyScalar(e),this._panOffset.add(Z)}_pan(e,t){const i=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;Z.copy(n).sub(this.target);let r=Z.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/i.clientHeight,this.object.matrix),this._panUp(2*t*r/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const i=this.domElement.getBoundingClientRect(),n=e-i.left,r=t-i.top,s=i.width,o=i.height;this._mouse.x=n/s*2-1,this._mouse.y=-(r/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(J*this._rotateDelta.x/t.clientHeight),this._rotateUp(J*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);this._rotateStart.set(i,n)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);this._panStart.set(i,n)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),i=e.pageX-t.x,n=e.pageY-t.y,r=Math.sqrt(i*i+n*n);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const i=this._getSecondPointerPosition(e),n=.5*(e.pageX+i.x),r=.5*(e.pageY+i.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(J*this._rotateDelta.x/t.clientHeight),this._rotateUp(J*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);this._panEnd.set(i,n)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),i=e.pageX-t.x,n=e.pageY-t.y,r=Math.sqrt(i*i+n*n);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const s=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(s,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new A.Vector2,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,i={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}}function Lr(a){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(a.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(a)&&(this._addPointer(a),a.pointerType==="touch"?this._onTouchStart(a):this._onMouseDown(a)))}function kr(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function Ur(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(Zi),this.state=L.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function Fr(a){let e;switch(a.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case A.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=L.DOLLY;break;case A.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=L.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=L.ROTATE}break;case A.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=L.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=L.PAN}break;default:this.state=L.NONE}this.state!==L.NONE&&this.dispatchEvent(Kt)}function zr(a){switch(this.state){case L.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case L.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case L.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function Nr(a){this.enabled===!1||this.enableZoom===!1||this.state!==L.NONE||(a.preventDefault(),this.dispatchEvent(Kt),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(Zi))}function $r(a){this.enabled!==!1&&this._handleKeyDown(a)}function Br(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case A.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=L.TOUCH_ROTATE;break;case A.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=L.TOUCH_PAN;break;default:this.state=L.NONE}break;case 2:switch(this.touches.TWO){case A.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=L.TOUCH_DOLLY_PAN;break;case A.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=L.TOUCH_DOLLY_ROTATE;break;default:this.state=L.NONE}break;default:this.state=L.NONE}this.state!==L.NONE&&this.dispatchEvent(Kt)}function Vr(a){switch(this._trackPointer(a),this.state){case L.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case L.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case L.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case L.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=L.NONE}}function Gr(a){this.enabled!==!1&&a.preventDefault()}function jr(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Yr(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ee(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Xi(a,e){a.prototype=Object.create(e.prototype),a.prototype.constructor=a,a.__proto__=e}var oe={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},We={duration:.5,overwrite:!1,delay:0},Wt,X,z,pe=1e8,k=1/pe,qt=Math.PI*2,Hr=qt/4,Zr=0,Wi=Math.sqrt,Kr=Math.cos,Xr=Math.sin,K=function(e){return typeof e=="string"},V=function(e){return typeof e=="function"},we=function(e){return typeof e=="number"},Qt=function(e){return typeof e>"u"},_e=function(e){return typeof e=="object"},ee=function(e){return e!==!1},Jt=function(){return typeof window<"u"},Dt=function(e){return V(e)||K(e)},qi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},W=Array.isArray,ei=/(?:-?\.?\d|\.)+/gi,Qi=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,qe=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ti=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Ji=/[+-]=-?[.\d]+/,en=/[^,'"\[\]\s]+/gi,Wr=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,$,ye,ii,ni,le={},Mt={},tn,nn=function(e){return(Mt=Je(e,le))&&ne},ri=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ht=function(e,t){return!t&&console.warn(e)},rn=function(e,t){return e&&(le[e]=t)&&Mt&&(Mt[e]=t)||le},ct=function(){return 0},qr={suppressEvents:!0,isStart:!0,kill:!1},Ot={suppressEvents:!0,kill:!1},Qr={suppressEvents:!0},si={},Se=[],ai={},sn,he={},oi={},an=30,Rt=[],li="",hi=function(e){var t=e[0],i,n;if(_e(t)||V(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(n=Rt.length;n--&&!Rt[n].targetTest(t););i=Rt[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new kn(e[n],i)))||e.splice(n,1);return e},Ue=function(e){return e._gsap||hi(me(e))[0]._gsap},on=function(e,t,i){return(i=e[t])&&V(i)?e[t]():Qt(i)&&e.getAttribute&&e.getAttribute(t)||i},te=function(e,t){return(e=e.split(",")).forEach(t)||e},j=function(e){return Math.round(e*1e5)/1e5||0},Y=function(e){return Math.round(e*1e7)/1e7||0},Qe=function(e,t){var i=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+n:i==="-"?e-n:i==="*"?e*n:e/n},Jr=function(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++n<i;);return n<i},It=function(){var e=Se.length,t=Se.slice(0),i,n;for(ai={},Se.length=0,i=0;i<e;i++)n=t[i],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},ci=function(e){return!!(e._initted||e._startAt||e.add)},ln=function(e,t,i,n){Se.length&&!X&&It(),e.render(t,i,!!(X&&t<0&&ci(e))),Se.length&&!X&&It()},hn=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(en).length<2?t:K(e)?e.trim():e},cn=function(e){return e},ce=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},es=function(e){return function(t,i){for(var n in i)n in t||n==="duration"&&e||n==="ease"||(t[n]=i[n])}},Je=function(e,t){for(var i in t)e[i]=t[i];return e},un=function a(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=_e(t[i])?a(e[i]||(e[i]={}),t[i]):t[i]);return e},Lt=function(e,t){var i={},n;for(n in e)n in t||(i[n]=e[n]);return i},ut=function(e){var t=e.parent||$,i=e.keyframes?es(W(e.keyframes)):ce;if(ee(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},ts=function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0},dn=function(e,t,i,n,r){var s=e[n],o;if(r)for(o=t[r];s&&s[r]>o;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=s,t.parent=t._dp=e,t},kt=function(e,t,i,n){i===void 0&&(i="_first"),n===void 0&&(n="_last");var r=t._prev,s=t._next;r?r._next=s:e[i]===t&&(e[i]=s),s?s._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null},Te=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Fe=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},is=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},ui=function(e,t,i,n){return e._startAt&&(X?e._startAt.revert(Ot):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},ns=function a(e){return!e||e._ts&&a(e.parent)},pn=function(e){return e._repeat?et(e._tTime,e=e.duration()+e._rDelay)*e:0},et=function(e,t){var i=Math.floor(e=Y(e/t));return e&&i===e?i-1:i},Ut=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Ft=function(e){return e._end=Y(e._start+(e._tDur/Math.abs(e._ts||e._rts||k)||0))},zt=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Y(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Ft(e),i._dirty||Fe(i,e)),e},fn=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=Ut(e.rawTime(),t),(!t._dur||pt(0,t.totalDuration(),i)-t._tTime>k)&&t.render(i,!0)),Fe(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-k}},xe=function(e,t,i,n){return t.parent&&Te(t),t._start=Y((we(i)?i:i||e!==$?fe(e,i,t):e._time)+t._delay),t._end=Y(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),dn(e,t,"_first","_last",e._sort?"_start":0),di(t)||(e._recent=t),n||fn(e,t),e._ts<0&&zt(e,e._tTime),e},mn=function(e,t){return(le.ScrollTrigger||ri("scrollTrigger",t))&&le.ScrollTrigger.create(t,e)},gn=function(e,t,i,n,r){if(vi(e,t,r),!e._initted)return 1;if(!i&&e._pt&&!X&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&sn!==de.frame)return Se.push(e),e._lazy=[r,n],1},rs=function a(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||a(t))},di=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},ss=function(e,t,i,n){var r=e.ratio,s=t<0||!t&&(!e._start&&rs(e)&&!(!e._initted&&di(e))||(e._ts<0||e._dp._ts<0)&&!di(e))?0:1,o=e._rDelay,l=0,c,h,u;if(o&&e._repeat&&(l=pt(0,e._tDur,t),h=et(l,o),e._yoyo&&h&1&&(s=1-s),h!==et(e._tTime,o)&&(r=1-s,e.vars.repeatRefresh&&e._initted&&e.invalidate())),s!==r||X||n||e._zTime===k||!t&&e._zTime){if(!e._initted&&gn(e,t,n,i,l))return;for(u=e._zTime,e._zTime=t||(i?k:0),i||(i=t&&!u),e.ratio=s,e._from&&(s=1-s),e._time=0,e._tTime=l,c=e._pt;c;)c.r(s,c.d),c=c._next;t<0&&ui(e,t,i,!0),e._onUpdate&&!i&&ue(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&ue(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===s&&(s&&Te(e,1),!i&&!X&&(ue(e,s?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},as=function(e,t,i){var n;if(i>t)for(n=e._first;n&&n._start<=i;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},tt=function(e,t,i,n){var r=e._repeat,s=Y(t)||0,o=e._tTime/e._tDur;return o&&!n&&(e._time*=s/e._dur),e._dur=s,e._tDur=r?r<0?1e10:Y(s*(r+1)+e._rDelay*r):s,o>0&&!n&&zt(e,e._tTime=e._tDur*o),e.parent&&Ft(e),i||Fe(e.parent,e),e},_n=function(e){return e instanceof Q?Fe(e):tt(e,e._dur)},os={_start:0,endTime:ct,totalDuration:ct},fe=function a(e,t,i){var n=e.labels,r=e._recent||os,s=e.duration()>=pe?r.endTime(!1):e._dur,o,l,c;return K(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),c=t.substr(-1)==="%",o=t.indexOf("="),l==="<"||l===">"?(o>=0&&(t=t.replace(/=/,"")),(l==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(o<0?r:i).totalDuration()/100:1)):o<0?(t in n||(n[t]=s),n[t]):(l=parseFloat(t.charAt(o-1)+t.substr(o+1)),c&&i&&(l=l/100*(W(i)?i[0]:i).totalDuration()),o>1?a(e,t.substr(0,o-1),i)+l:s+l)):t==null?s:+t},dt=function(e,t,i){var n=we(t[1]),r=(n?2:1)+(e<2?0:1),s=t[r],o,l;if(n&&(s.duration=t[1]),s.parent=i,e){for(o=s,l=i;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=ee(l.vars.inherit)&&l.parent;s.immediateRender=ee(o.immediateRender),e<2?s.runBackwards=1:s.startAt=t[r-1]}return new H(t[0],s,t[r+1])},De=function(e,t){return e||e===0?t(e):t},pt=function(e,t,i){return i<e?e:i>t?t:i},q=function(e,t){return!K(e)||!(t=Wr.exec(e))?"":t[1]},ls=function(e,t,i){return De(i,function(n){return pt(e,t,n)})},pi=[].slice,yn=function(e,t){return e&&_e(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&_e(e[0]))&&!e.nodeType&&e!==ye},hs=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(n){var r;return K(n)&&!t||yn(n,1)?(r=i).push.apply(r,me(n)):i.push(n)})||i},me=function(e,t,i){return z&&!t&&z.selector?z.selector(e):K(e)&&!i&&(ii||!nt())?pi.call((t||ni).querySelectorAll(e),0):W(e)?hs(e,i):yn(e)?pi.call(e,0):e?[e]:[]},fi=function(e){return e=me(e)[0]||ht("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return me(t,i.querySelectorAll?i:i===e?ht("Invalid scope")||ni.createElement("div"):e)}},xn=function(e){return e.sort(function(){return .5-Math.random()})},bn=function(e){if(V(e))return e;var t=_e(e)?e:{each:e},i=ze(t.ease),n=t.from||0,r=parseFloat(t.base)||0,s={},o=n>0&&n<1,l=isNaN(n)||o,c=t.axis,h=n,u=n;return K(n)?h=u={center:.5,edges:.5,end:1}[n]||0:!o&&l&&(h=n[0],u=n[1]),function(p,m,f){var d=(f||t).length,g=s[d],_,y,x,v,b,C,E,P,w;if(!g){if(w=t.grid==="auto"?0:(t.grid||[1,pe])[1],!w){for(E=-pe;E<(E=f[w++].getBoundingClientRect().left)&&w<d;);w<d&&w--}for(g=s[d]=[],_=l?Math.min(w,d)*h-.5:n%w,y=w===pe?0:l?d*u/w-.5:n/w|0,E=0,P=pe,C=0;C<d;C++)x=C%w-_,v=y-(C/w|0),g[C]=b=c?Math.abs(c==="y"?v:x):Wi(x*x+v*v),b>E&&(E=b),b<P&&(P=b);n==="random"&&xn(g),g.max=E-P,g.min=P,g.v=d=(parseFloat(t.amount)||parseFloat(t.each)*(w>d?d-1:c?c==="y"?d/w:w:Math.max(w,d/w))||0)*(n==="edges"?-1:1),g.b=d<0?r-d:r,g.u=q(t.amount||t.each)||0,i=i&&d<0?Rn(i):i}return d=(g[p]-g.min)/g.max||0,Y(g.b+(i?i(d):d)*g.v)+g.u}},mi=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var n=Y(Math.round(parseFloat(i)/e)*e*t);return(n-n%1)/t+(we(i)?0:q(i))}},vn=function(e,t){var i=W(e),n,r;return!i&&_e(e)&&(n=i=e.radius||pe,e.values?(e=me(e.values),(r=!we(e[0]))&&(n*=n)):e=mi(e.increment)),De(t,i?V(e)?function(s){return r=e(s),Math.abs(r-s)<=n?r:s}:function(s){for(var o=parseFloat(r?s.x:s),l=parseFloat(r?s.y:0),c=pe,h=0,u=e.length,p,m;u--;)r?(p=e[u].x-o,m=e[u].y-l,p=p*p+m*m):p=Math.abs(e[u]-o),p<c&&(c=p,h=u);return h=!n||c<=n?e[h]:s,r||h===s||we(s)?h:h+q(s)}:mi(e))},En=function(e,t,i,n){return De(W(e)?!t:i===!0?!!(i=0):!n,function(){return W(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*n)/n})},cs=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(n){return t.reduce(function(r,s){return s(r)},n)}},us=function(e,t){return function(i){return e(parseFloat(i))+(t||q(i))}},ds=function(e,t,i){return Cn(e,t,0,1,i)},wn=function(e,t,i){return De(i,function(n){return e[~~t(n)]})},ps=function a(e,t,i){var n=t-e;return W(e)?wn(e,a(0,e.length),t):De(i,function(r){return(n+(r-e)%n)%n+e})},fs=function a(e,t,i){var n=t-e,r=n*2;return W(e)?wn(e,a(0,e.length-1),t):De(i,function(s){return s=(r+(s-e)%r)%r||0,e+(s>n?r-s:s)})},ft=function(e){for(var t=0,i="",n,r,s,o;~(n=e.indexOf("random(",t));)s=e.indexOf(")",n),o=e.charAt(n+7)==="[",r=e.substr(n+7,s-n-7).match(o?en:ei),i+=e.substr(t,n-t)+En(o?r:+r[0],o?0:+r[1],+r[2]||1e-5),t=s+1;return i+e.substr(t,e.length-t)},Cn=function(e,t,i,n,r){var s=t-e,o=n-i;return De(r,function(l){return i+((l-e)/s*o||0)})},ms=function a(e,t,i,n){var r=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!r){var s=K(e),o={},l,c,h,u,p;if(i===!0&&(n=1)&&(i=null),s)e={p:e},t={p:t};else if(W(e)&&!W(t)){for(h=[],u=e.length,p=u-2,c=1;c<u;c++)h.push(a(e[c-1],e[c]));u--,r=function(f){f*=u;var d=Math.min(p,~~f);return h[d](f-d)},i=t}else n||(e=Je(W(e)?[]:{},e));if(!h){for(l in t)xi.call(o,e,l,"get",t[l]);r=function(f){return Ci(f,o)||(s?e.p:e)}}}return De(i,r)},Pn=function(e,t,i){var n=e.labels,r=pe,s,o,l;for(s in n)o=n[s]-t,o<0==!!i&&o&&r>(o=Math.abs(o))&&(l=s,r=o);return l},ue=function(e,t,i){var n=e.vars,r=n[t],s=z,o=e._ctx,l,c,h;if(r)return l=n[t+"Params"],c=n.callbackScope||e,i&&Se.length&&It(),o&&(z=o),h=l?r.apply(c,l):r.call(c),z=s,h},mt=function(e){return Te(e),e.scrollTrigger&&e.scrollTrigger.kill(!!X),e.progress()<1&&ue(e,"onInterrupt"),e},it,An=[],Sn=function(e){if(e)if(e=!e.name&&e.default||e,Jt()||e.headless){var t=e.name,i=V(e),n=t&&!i&&e.init?function(){this._props=[]}:e,r={init:ct,render:Ci,add:xi,kill:Os,modifier:Ms,rawVars:0},s={targetTest:0,get:0,getSetter:wi,aliases:{},register:0};if(nt(),e!==n){if(he[t])return;ce(n,ce(Lt(e,r),s)),Je(n.prototype,Je(r,Lt(e,s))),he[n.prop=t]=n,e.targetTest&&(Rt.push(n),si[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}rn(t,n),e.register&&e.register(ne,n,ie)}else An.push(e)},U=255,gt={aqua:[0,U,U],lime:[0,U,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,U],navy:[0,0,128],white:[U,U,U],olive:[128,128,0],yellow:[U,U,0],orange:[U,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[U,0,0],pink:[U,192,203],cyan:[0,U,U],transparent:[U,U,U,0]},gi=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*U+.5|0},Tn=function(e,t,i){var n=e?we(e)?[e>>16,e>>8&U,e&U]:0:gt.black,r,s,o,l,c,h,u,p,m,f;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),gt[e])n=gt[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),s=e.charAt(2),o=e.charAt(3),e="#"+r+r+s+s+o+o+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&U,n&U,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&U,e&U]}else if(e.substr(0,3)==="hsl"){if(n=f=e.match(ei),!t)l=+n[0]%360/360,c=+n[1]/100,h=+n[2]/100,s=h<=.5?h*(c+1):h+c-h*c,r=h*2-s,n.length>3&&(n[3]*=1),n[0]=gi(l+1/3,r,s),n[1]=gi(l,r,s),n[2]=gi(l-1/3,r,s);else if(~e.indexOf("="))return n=e.match(Qi),i&&n.length<4&&(n[3]=1),n}else n=e.match(ei)||gt.transparent;n=n.map(Number)}return t&&!f&&(r=n[0]/U,s=n[1]/U,o=n[2]/U,u=Math.max(r,s,o),p=Math.min(r,s,o),h=(u+p)/2,u===p?l=c=0:(m=u-p,c=h>.5?m/(2-u-p):m/(u+p),l=u===r?(s-o)/m+(s<o?6:0):u===s?(o-r)/m+2:(r-s)/m+4,l*=60),n[0]=~~(l+.5),n[1]=~~(c*100+.5),n[2]=~~(h*100+.5)),i&&n.length<4&&(n[3]=1),n},Dn=function(e){var t=[],i=[],n=-1;return e.split(Me).forEach(function(r){var s=r.match(qe)||[];t.push.apply(t,s),i.push(n+=s.length+1)}),t.c=i,t},Mn=function(e,t,i){var n="",r=(e+n).match(Me),s=t?"hsla(":"rgba(",o=0,l,c,h,u;if(!r)return e;if(r=r.map(function(p){return(p=Tn(p,t,1))&&s+(t?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),i&&(h=Dn(e),l=i.c,l.join(n)!==h.c.join(n)))for(c=e.replace(Me,"1").split(qe),u=c.length-1;o<u;o++)n+=c[o]+(~l.indexOf(o)?r.shift()||s+"0,0,0,0)":(h.length?h:r.length?r:i).shift());if(!c)for(c=e.split(Me),u=c.length-1;o<u;o++)n+=c[o]+r[o];return n+c[u]},Me=(function(){var a="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in gt)a+="|"+e+"\\b";return new RegExp(a+")","gi")})(),gs=/hsl[a]?\(/,On=function(e){var t=e.join(" "),i;if(Me.lastIndex=0,Me.test(t))return i=gs.test(t),e[1]=Mn(e[1],i),e[0]=Mn(e[0],i,Dn(e[1])),!0},_t,de=(function(){var a=Date.now,e=500,t=33,i=a(),n=i,r=1e3/240,s=r,o=[],l,c,h,u,p,m,f=function d(g){var _=a()-n,y=g===!0,x,v,b,C;if((_>e||_<0)&&(i+=_-t),n+=_,b=n-i,x=b-s,(x>0||y)&&(C=++u.frame,p=b-u.time*1e3,u.time=b=b/1e3,s+=x+(x>=r?4:r-x),v=1),y||(l=c(d)),v)for(m=0;m<o.length;m++)o[m](b,p,C,g)};return u={time:0,frame:0,tick:function(){f(!0)},deltaRatio:function(g){return p/(1e3/(g||60))},wake:function(){tn&&(!ii&&Jt()&&(ye=ii=window,ni=ye.document||{},le.gsap=ne,(ye.gsapVersions||(ye.gsapVersions=[])).push(ne.version),nn(Mt||ye.GreenSockGlobals||!ye.gsap&&ye||{}),An.forEach(Sn)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&u.sleep(),c=h||function(g){return setTimeout(g,s-u.time*1e3+1|0)},_t=1,f(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),_t=0,c=ct},lagSmoothing:function(g,_){e=g||1/0,t=Math.min(_||33,e)},fps:function(g){r=1e3/(g||240),s=u.time*1e3+r},add:function(g,_,y){var x=_?function(v,b,C,E){g(v,b,C,E),u.remove(x)}:g;return u.remove(g),o[y?"unshift":"push"](x),nt(),x},remove:function(g,_){~(_=o.indexOf(g))&&o.splice(_,1)&&m>=_&&m--},_listeners:o},u})(),nt=function(){return!_t&&de.wake()},M={},_s=/^[\d.\-M][\d.\-,\s]/,ys=/["']/g,xs=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),n=i[0],r=1,s=i.length,o,l,c;r<s;r++)l=i[r],o=r!==s-1?l.lastIndexOf(","):l.length,c=l.substr(0,o),t[n]=isNaN(c)?c.replace(ys,"").trim():+c,n=l.substr(o+1).trim();return t},bs=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<i?e.indexOf(")",i+1):i)},vs=function(e){var t=(e+"").split("("),i=M[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[xs(t[1])]:bs(e).split(",").map(hn)):M._CE&&_s.test(e)?M._CE("",e):i},Rn=function(e){return function(t){return 1-e(1-t)}},In=function a(e,t){for(var i=e._first,n;i;)i instanceof Q?a(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?a(i.timeline,t):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=t)),i=i._next},ze=function(e,t){return e&&(V(e)?e:M[e]||vs(e))||t},Ne=function(e,t,i,n){i===void 0&&(i=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var r={easeIn:t,easeOut:i,easeInOut:n},s;return te(e,function(o){M[o]=le[o]=r,M[s=o.toLowerCase()]=i;for(var l in r)M[s+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=M[o+"."+l]=r[l]}),r},Ln=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},_i=function a(e,t,i){var n=t>=1?t:1,r=(i||(e?.3:.45))/(t<1?t:1),s=r/qt*(Math.asin(1/n)||0),o=function(h){return h===1?1:n*Math.pow(2,-10*h)*Xr((h-s)*r)+1},l=e==="out"?o:e==="in"?function(c){return 1-o(1-c)}:Ln(o);return r=qt/r,l.config=function(c,h){return a(e,c,h)},l},yi=function a(e,t){t===void 0&&(t=1.70158);var i=function(s){return s?--s*s*((t+1)*s+t)+1:0},n=e==="out"?i:e==="in"?function(r){return 1-i(1-r)}:Ln(i);return n.config=function(r){return a(e,r)},n};te("Linear,Quad,Cubic,Quart,Quint,Strong",function(a,e){var t=e<5?e+1:e;Ne(a+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})}),M.Linear.easeNone=M.none=M.Linear.easeIn,Ne("Elastic",_i("in"),_i("out"),_i()),(function(a,e){var t=1/e,i=2*t,n=2.5*t,r=function(o){return o<t?a*o*o:o<i?a*Math.pow(o-1.5/e,2)+.75:o<n?a*(o-=2.25/e)*o+.9375:a*Math.pow(o-2.625/e,2)+.984375};Ne("Bounce",function(s){return 1-r(1-s)},r)})(7.5625,2.75),Ne("Expo",function(a){return Math.pow(2,10*(a-1))*a+a*a*a*a*a*a*(1-a)}),Ne("Circ",function(a){return-(Wi(1-a*a)-1)}),Ne("Sine",function(a){return a===1?1:-Kr(a*Hr)+1}),Ne("Back",yi("in"),yi("out"),yi()),M.SteppedEase=M.steps=le.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,n=e+(t?0:1),r=t?1:0,s=1-k;return function(o){return((n*pt(0,s,o)|0)+r)*i}}},We.ease=M["quad.out"],te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(a){return li+=a+","+a+"Params,"});var kn=function(e,t){this.id=Zr++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:on,this.set=t?t.getSetter:wi},yt=(function(){function a(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,tt(this,+t.duration,1,1),this.data=t.data,z&&(this._ctx=z,z.data.push(this)),_t||de.wake()}var e=a.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,tt(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,n){if(nt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(zt(this,i),!r._dp||r.parent||fn(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&xe(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===k||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),ln(this,i,n)),this},e.time=function(i,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+pn(this))%(this._dur+this._rDelay)||(i?this._dur:0),n):this._time},e.totalProgress=function(i,n){return arguments.length?this.totalTime(this.totalDuration()*i,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+pn(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,n){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,n):this._repeat?et(this._tTime,r)+1:1},e.timeScale=function(i,n){if(!arguments.length)return this._rts===-k?0:this._rts;if(this._rts===i)return this;var r=this.parent&&this._ts?Ut(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-k?0:this._rts,this.totalTime(pt(-Math.abs(this._delay),this.totalDuration(),r),n!==!1),Ft(this),is(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(nt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==k&&(this._tTime-=k)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&xe(n,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(ee(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var n=this.parent||this._dp;return n?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ut(n.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=Qr);var n=X;return X=i,ci(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),X=n,this},e.globalTime=function(i){for(var n=this,r=arguments.length?i:n.rawTime();n;)r=n._start+r/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(i):r},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,_n(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var n=this._time;return this._rDelay=i,_n(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,n){return this.totalTime(fe(this,i),ee(n))},e.restart=function(i,n){return this.play().totalTime(i?-this._delay:0,ee(n)),this._dur||(this._zTime=-k),this},e.play=function(i,n){return i!=null&&this.seek(i,n),this.reversed(!1).paused(!1)},e.reverse=function(i,n){return i!=null&&this.seek(i||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(i,n){return i!=null&&this.seek(i,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-k:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-k,this},e.isActive=function(){var i=this.parent||this._dp,n=this._start,r;return!!(!i||this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=n&&r<this.endTime(!0)-k)},e.eventCallback=function(i,n,r){var s=this.vars;return arguments.length>1?(n?(s[i]=n,r&&(s[i+"Params"]=r),i==="onUpdate"&&(this._onUpdate=n)):delete s[i],this):s[i]},e.then=function(i){var n=this;return new Promise(function(r){var s=V(i)?i:cn,o=function(){var c=n.then;n.then=null,V(s)&&(s=s(n))&&(s.then||s===n)&&(n.then=c),r(s),n.then=c};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?o():n._prom=o})},e.kill=function(){mt(this)},a})();ce(yt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-k,_prom:0,_ps:!1,_rts:1});var Q=(function(a){Xi(e,a);function e(i,n){var r;return i===void 0&&(i={}),r=a.call(this,i)||this,r.labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=ee(i.sortChildren),$&&xe(i.parent||$,Ee(r),n),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&mn(Ee(r),i.scrollTrigger),r}var t=e.prototype;return t.to=function(n,r,s){return dt(0,arguments,this),this},t.from=function(n,r,s){return dt(1,arguments,this),this},t.fromTo=function(n,r,s,o){return dt(2,arguments,this),this},t.set=function(n,r,s){return r.duration=0,r.parent=this,ut(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new H(n,r,fe(this,s),1),this},t.call=function(n,r,s){return xe(this,H.delayedCall(0,n,r),s)},t.staggerTo=function(n,r,s,o,l,c,h){return s.duration=r,s.stagger=s.stagger||o,s.onComplete=c,s.onCompleteParams=h,s.parent=this,new H(n,s,fe(this,l)),this},t.staggerFrom=function(n,r,s,o,l,c,h){return s.runBackwards=1,ut(s).immediateRender=ee(s.immediateRender),this.staggerTo(n,r,s,o,l,c,h)},t.staggerFromTo=function(n,r,s,o,l,c,h,u){return o.startAt=s,ut(o).immediateRender=ee(o.immediateRender),this.staggerTo(n,r,o,l,c,h,u)},t.render=function(n,r,s){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=n<=0?0:Y(n),u=this._zTime<0!=n<0&&(this._initted||!c),p,m,f,d,g,_,y,x,v,b,C,E;if(this!==$&&h>l&&n>=0&&(h=l),h!==this._tTime||s||u){if(o!==this._time&&c&&(h+=this._time-o,n+=this._time-o),p=h,v=this._start,x=this._ts,_=!x,u&&(c||(o=this._zTime),(n||!r)&&(this._zTime=n)),this._repeat){if(C=this._yoyo,g=c+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(g*100+n,r,s);if(p=Y(h%g),h===l?(d=this._repeat,p=c):(b=Y(h/g),d=~~b,d&&d===b&&(p=c,d--),p>c&&(p=c)),b=et(this._tTime,g),!o&&this._tTime&&b!==d&&this._tTime-b*g-this._dur<=0&&(b=d),C&&d&1&&(p=c-p,E=1),d!==b&&!this._lock){var P=C&&b&1,w=P===(C&&d&1);if(d<b&&(P=!P),o=P?0:h%c?c:h,this._lock=1,this.render(o||(E?0:Y(d*g)),r,!c)._lock=0,this._tTime=h,!r&&this.parent&&ue(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1),o&&o!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,w&&(this._lock=2,o=P?c:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;In(this,E)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(y=as(this,Y(o),Y(p)),y&&(h-=p-(p=y._start))),this._tTime=h,this._time=p,this._act=!x,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,o=0),!o&&h&&!r&&!b&&(ue(this,"onStart"),this._tTime!==h))return this;if(p>=o&&n>=0)for(m=this._first;m;){if(f=m._next,(m._act||p>=m._start)&&m._ts&&y!==m){if(m.parent!==this)return this.render(n,r,s);if(m.render(m._ts>0?(p-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(p-m._start)*m._ts,r,s),p!==this._time||!this._ts&&!_){y=0,f&&(h+=this._zTime=-k);break}}m=f}else{m=this._last;for(var T=n<0?n:p;m;){if(f=m._prev,(m._act||T<=m._end)&&m._ts&&y!==m){if(m.parent!==this)return this.render(n,r,s);if(m.render(m._ts>0?(T-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(T-m._start)*m._ts,r,s||X&&ci(m)),p!==this._time||!this._ts&&!_){y=0,f&&(h+=this._zTime=T?-k:k);break}}m=f}}if(y&&!r&&(this.pause(),y.render(p>=o?0:-k)._zTime=p>=o?1:-1,this._ts))return this._start=v,Ft(this),this.render(n,r,s);this._onUpdate&&!r&&ue(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&o)&&(v===this._start||Math.abs(x)!==Math.abs(this._ts))&&(this._lock||((n||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&Te(this,1),!r&&!(n<0&&!o)&&(h||o||!l)&&(ue(this,h===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,r){var s=this;if(we(r)||(r=fe(this,r,n)),!(n instanceof yt)){if(W(n))return n.forEach(function(o){return s.add(o,r)}),this;if(K(n))return this.addLabel(n,r);if(V(n))n=H.delayedCall(0,n);else return this}return this!==n?xe(this,n,r):this},t.getChildren=function(n,r,s,o){n===void 0&&(n=!0),r===void 0&&(r=!0),s===void 0&&(s=!0),o===void 0&&(o=-pe);for(var l=[],c=this._first;c;)c._start>=o&&(c instanceof H?r&&l.push(c):(s&&l.push(c),n&&l.push.apply(l,c.getChildren(!0,r,s)))),c=c._next;return l},t.getById=function(n){for(var r=this.getChildren(1,1,1),s=r.length;s--;)if(r[s].vars.id===n)return r[s]},t.remove=function(n){return K(n)?this.removeLabel(n):V(n)?this.killTweensOf(n):(n.parent===this&&kt(this,n),n===this._recent&&(this._recent=this._last),Fe(this))},t.totalTime=function(n,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Y(de.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),a.prototype.totalTime.call(this,n,r),this._forcing=0,this):this._tTime},t.addLabel=function(n,r){return this.labels[n]=fe(this,r),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,r,s){var o=H.delayedCall(0,r||ct,s);return o.data="isPause",this._hasPause=1,xe(this,o,fe(this,n))},t.removePause=function(n){var r=this._first;for(n=fe(this,n);r;)r._start===n&&r.data==="isPause"&&Te(r),r=r._next},t.killTweensOf=function(n,r,s){for(var o=this.getTweensOf(n,s),l=o.length;l--;)Oe!==o[l]&&o[l].kill(n,r);return this},t.getTweensOf=function(n,r){for(var s=[],o=me(n),l=this._first,c=we(r),h;l;)l instanceof H?Jr(l._targets,o)&&(c?(!Oe||l._initted&&l._ts)&&l.globalTime(0)<=r&&l.globalTime(l.totalDuration())>r:!r||l.isActive())&&s.push(l):(h=l.getTweensOf(o,r)).length&&s.push.apply(s,h),l=l._next;return s},t.tweenTo=function(n,r){r=r||{};var s=this,o=fe(s,n),l=r,c=l.startAt,h=l.onStart,u=l.onStartParams,p=l.immediateRender,m,f=H.to(s,ce({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:r.duration||Math.abs((o-(c&&"time"in c?c.time:s._time))/s.timeScale())||k,onStart:function(){if(s.pause(),!m){var g=r.duration||Math.abs((o-(c&&"time"in c?c.time:s._time))/s.timeScale());f._dur!==g&&tt(f,g,0,1).render(f._time,!0,!0),m=1}h&&h.apply(f,u||[])}},r));return p?f.render(0):f},t.tweenFromTo=function(n,r,s){return this.tweenTo(r,ce({startAt:{time:fe(this,n)}},s))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Pn(this,fe(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Pn(this,fe(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+k)},t.shiftChildren=function(n,r,s){s===void 0&&(s=0);for(var o=this._first,l=this.labels,c;o;)o._start>=s&&(o._start+=n,o._end+=n),o=o._next;if(r)for(c in l)l[c]>=s&&(l[c]+=n);return Fe(this)},t.invalidate=function(n){var r=this._first;for(this._lock=0;r;)r.invalidate(n),r=r._next;return a.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var r=this._first,s;r;)s=r._next,this.remove(r),r=s;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),Fe(this)},t.totalDuration=function(n){var r=0,s=this,o=s._last,l=pe,c,h,u;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-n:n));if(s._dirty){for(u=s.parent;o;)c=o._prev,o._dirty&&o.totalDuration(),h=o._start,h>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,xe(s,o,h-o._delay,1)._lock=0):l=h,h<0&&o._ts&&(r-=h,(!u&&!s._dp||u&&u.smoothChildTiming)&&(s._start+=h/s._ts,s._time-=h,s._tTime-=h),s.shiftChildren(-h,!1,-1/0),l=0),o._end>r&&o._ts&&(r=o._end),o=c;tt(s,s===$&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(n){if($._ts&&(ln($,Ut(n,$)),sn=de.frame),de.frame>=an){an+=oe.autoSleep||120;var r=$._first;if((!r||!r._ts)&&oe.autoSleep&&de._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||de.sleep()}}},e})(yt);ce(Q.prototype,{_lock:0,_hasPause:0,_forcing:0});var Es=function(e,t,i,n,r,s,o){var l=new ie(this._pt,e,t,0,1,Bn,null,r),c=0,h=0,u,p,m,f,d,g,_,y;for(l.b=i,l.e=n,i+="",n+="",(_=~n.indexOf("random("))&&(n=ft(n)),s&&(y=[i,n],s(y,e,t),i=y[0],n=y[1]),p=i.match(ti)||[];u=ti.exec(n);)f=u[0],d=n.substring(c,u.index),m?m=(m+1)%5:d.substr(-5)==="rgba("&&(m=1),f!==p[h++]&&(g=parseFloat(p[h-1])||0,l._pt={_next:l._pt,p:d||h===1?d:",",s:g,c:f.charAt(1)==="="?Qe(g,f)-g:parseFloat(f)-g,m:m&&m<4?Math.round:0},c=ti.lastIndex);return l.c=c<n.length?n.substring(c,n.length):"",l.fp=o,(Ji.test(n)||_)&&(l.e=0),this._pt=l,l},xi=function(e,t,i,n,r,s,o,l,c,h){V(n)&&(n=n(r||0,e,s));var u=e[t],p=i!=="get"?i:V(u)?c?e[t.indexOf("set")||!V(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():u,m=V(u)?c?Ss:Nn:Ei,f;if(K(n)&&(~n.indexOf("random(")&&(n=ft(n)),n.charAt(1)==="="&&(f=Qe(p,n)+(q(p)||0),(f||f===0)&&(n=f))),!h||p!==n||bi)return!isNaN(p*n)&&n!==""?(f=new ie(this._pt,e,t,+p||0,n-(p||0),typeof u=="boolean"?Ds:$n,0,m),c&&(f.fp=c),o&&f.modifier(o,this,e),this._pt=f):(!u&&!(t in e)&&ri(t,n),Es.call(this,e,t,p,n,m,l||oe.stringFilter,c))},ws=function(e,t,i,n,r){if(V(e)&&(e=xt(e,r,t,i,n)),!_e(e)||e.style&&e.nodeType||W(e)||qi(e))return K(e)?xt(e,r,t,i,n):e;var s={},o;for(o in e)s[o]=xt(e[o],r,t,i,n);return s},Un=function(e,t,i,n,r,s){var o,l,c,h;if(he[e]&&(o=new he[e]).init(r,o.rawVars?t[e]:ws(t[e],n,r,s,i),i,n,s)!==!1&&(i._pt=l=new ie(i._pt,r,e,0,1,o.render,o,0,o.priority),i!==it))for(c=i._ptLookup[i._targets.indexOf(r)],h=o._props.length;h--;)c[o._props[h]]=l;return o},Oe,bi,vi=function a(e,t,i){var n=e.vars,r=n.ease,s=n.startAt,o=n.immediateRender,l=n.lazy,c=n.onUpdate,h=n.runBackwards,u=n.yoyoEase,p=n.keyframes,m=n.autoRevert,f=e._dur,d=e._startAt,g=e._targets,_=e.parent,y=_&&_.data==="nested"?_.vars.targets:g,x=e._overwrite==="auto"&&!Wt,v=e.timeline,b,C,E,P,w,T,O,S,R,I,G,N,F;if(v&&(!p||!r)&&(r="none"),e._ease=ze(r,We.ease),e._yEase=u?Rn(ze(u===!0?r:u,We.ease)):0,u&&e._yoyo&&!e._repeat&&(u=e._yEase,e._yEase=e._ease,e._ease=u),e._from=!v&&!!n.runBackwards,!v||p&&!n.stagger){if(S=g[0]?Ue(g[0]).harness:0,N=S&&n[S.prop],b=Lt(n,si),d&&(d._zTime<0&&d.progress(1),t<0&&h&&o&&!m?d.render(-1,!0):d.revert(h&&f?Ot:qr),d._lazy=0),s){if(Te(e._startAt=H.set(g,ce({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!d&&ee(l),startAt:null,delay:0,onUpdate:c&&function(){return ue(e,"onUpdate")},stagger:0},s))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(X||!o&&!m)&&e._startAt.revert(Ot),o&&f&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(h&&f&&!d){if(t&&(o=!1),E=ce({overwrite:!1,data:"isFromStart",lazy:o&&!d&&ee(l),immediateRender:o,stagger:0,parent:_},b),N&&(E[S.prop]=N),Te(e._startAt=H.set(g,E)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(X?e._startAt.revert(Ot):e._startAt.render(-1,!0)),e._zTime=t,!o)a(e._startAt,k,k);else if(!t)return}for(e._pt=e._ptCache=0,l=f&&ee(l)||l&&!f,C=0;C<g.length;C++){if(w=g[C],O=w._gsap||hi(g)[C]._gsap,e._ptLookup[C]=I={},ai[O.id]&&Se.length&&It(),G=y===g?C:y.indexOf(w),S&&(R=new S).init(w,N||b,e,G,y)!==!1&&(e._pt=P=new ie(e._pt,w,R.name,0,1,R.render,R,0,R.priority),R._props.forEach(function(se){I[se]=P}),R.priority&&(T=1)),!S||N)for(E in b)he[E]&&(R=Un(E,b,e,G,w,y))?R.priority&&(T=1):I[E]=P=xi.call(e,w,E,"get",b[E],G,y,0,n.stringFilter);e._op&&e._op[C]&&e.kill(w,e._op[C]),x&&e._pt&&(Oe=e,$.killTweensOf(w,I,e.globalTime(t)),F=!e.parent,Oe=0),e._pt&&l&&(ai[O.id]=1)}T&&Vn(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!F,p&&t<=0&&v.render(pe,!0,!0)},Cs=function(e,t,i,n,r,s,o,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],h,u,p,m;if(!c)for(c=e._ptCache[t]=[],p=e._ptLookup,m=e._targets.length;m--;){if(h=p[m][t],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==t&&h.fp!==t;)h=h._next;if(!h)return bi=1,e.vars[t]="+=0",vi(e,o),bi=0,l?ht(t+" not eligible for reset"):1;c.push(h)}for(m=c.length;m--;)u=c[m],h=u._pt||u,h.s=(n||n===0)&&!r?n:h.s+(n||0)+s*h.c,h.c=i-h.s,u.e&&(u.e=j(i)+q(u.e)),u.b&&(u.b=h.s+q(u.b))},Ps=function(e,t){var i=e[0]?Ue(e[0]).harness:0,n=i&&i.aliases,r,s,o,l;if(!n)return t;r=Je({},t);for(s in n)if(s in r)for(l=n[s].split(","),o=l.length;o--;)r[l[o]]=r[s];return r},As=function(e,t,i,n){var r=t.ease||n||"power1.inOut",s,o;if(W(t))o=i[e]||(i[e]=[]),t.forEach(function(l,c){return o.push({t:c/(t.length-1)*100,v:l,e:r})});else for(s in t)o=i[s]||(i[s]=[]),s==="ease"||o.push({t:parseFloat(e),v:t[s],e:r})},xt=function(e,t,i,n,r){return V(e)?e.call(t,i,n,r):K(e)&&~e.indexOf("random(")?ft(e):e},Fn=li+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",zn={};te(Fn+",id,stagger,delay,duration,paused,scrollTrigger",function(a){return zn[a]=1});var H=(function(a){Xi(e,a);function e(i,n,r,s){var o;typeof n=="number"&&(r.duration=n,n=r,r=null),o=a.call(this,s?n:ut(n))||this;var l=o.vars,c=l.duration,h=l.delay,u=l.immediateRender,p=l.stagger,m=l.overwrite,f=l.keyframes,d=l.defaults,g=l.scrollTrigger,_=l.yoyoEase,y=n.parent||$,x=(W(i)||qi(i)?we(i[0]):"length"in n)?[i]:me(i),v,b,C,E,P,w,T,O;if(o._targets=x.length?hi(x):ht("GSAP target "+i+" not found. https://gsap.com",!oe.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=m,f||p||Dt(c)||Dt(h)){if(n=o.vars,v=o.timeline=new Q({data:"nested",defaults:d||{},targets:y&&y.data==="nested"?y.vars.targets:x}),v.kill(),v.parent=v._dp=Ee(o),v._start=0,p||Dt(c)||Dt(h)){if(E=x.length,T=p&&bn(p),_e(p))for(P in p)~Fn.indexOf(P)&&(O||(O={}),O[P]=p[P]);for(b=0;b<E;b++)C=Lt(n,zn),C.stagger=0,_&&(C.yoyoEase=_),O&&Je(C,O),w=x[b],C.duration=+xt(c,Ee(o),b,w,x),C.delay=(+xt(h,Ee(o),b,w,x)||0)-o._delay,!p&&E===1&&C.delay&&(o._delay=h=C.delay,o._start+=h,C.delay=0),v.to(w,C,T?T(b,w,x):0),v._ease=M.none;v.duration()?c=h=0:o.timeline=0}else if(f){ut(ce(v.vars.defaults,{ease:"none"})),v._ease=ze(f.ease||n.ease||"none");var S=0,R,I,G;if(W(f))f.forEach(function(N){return v.to(x,N,">")}),v.duration();else{C={};for(P in f)P==="ease"||P==="easeEach"||As(P,f[P],C,f.easeEach);for(P in C)for(R=C[P].sort(function(N,F){return N.t-F.t}),S=0,b=0;b<R.length;b++)I=R[b],G={ease:I.e,duration:(I.t-(b?R[b-1].t:0))/100*c},G[P]=I.v,v.to(x,G,S),S+=G.duration;v.duration()<c&&v.to({},{duration:c-v.duration()})}}c||o.duration(c=v.duration())}else o.timeline=0;return m===!0&&!Wt&&(Oe=Ee(o),$.killTweensOf(x),Oe=0),xe(y,Ee(o),r),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(u||!c&&!f&&o._start===Y(y._time)&&ee(u)&&ns(Ee(o))&&y.data!=="nested")&&(o._tTime=-k,o.render(Math.max(0,-h)||0)),g&&mn(Ee(o),g),o}var t=e.prototype;return t.render=function(n,r,s){var o=this._time,l=this._tDur,c=this._dur,h=n<0,u=n>l-k&&!h?l:n<k?0:n,p,m,f,d,g,_,y,x,v;if(!c)ss(this,n,r,s);else if(u!==this._tTime||!n||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(p=u,x=this.timeline,this._repeat){if(d=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(d*100+n,r,s);if(p=Y(u%d),u===l?(f=this._repeat,p=c):(g=Y(u/d),f=~~g,f&&f===g?(p=c,f--):p>c&&(p=c)),_=this._yoyo&&f&1,_&&(v=this._yEase,p=c-p),g=et(this._tTime,d),p===o&&!s&&this._initted&&f===g)return this._tTime=u,this;f!==g&&(x&&this._yEase&&In(x,_),this.vars.repeatRefresh&&!_&&!this._lock&&p!==d&&this._initted&&(this._lock=s=1,this.render(Y(d*f),!0).invalidate()._lock=0))}if(!this._initted){if(gn(this,h?n:p,s,r,u))return this._tTime=0,this;if(o!==this._time&&!(s&&this.vars.repeatRefresh&&f!==g))return this;if(c!==this._dur)return this.render(n,r,s)}if(this._tTime=u,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=y=(v||this._ease)(p/c),this._from&&(this.ratio=y=1-y),!o&&u&&!r&&!g&&(ue(this,"onStart"),this._tTime!==u))return this;for(m=this._pt;m;)m.r(y,m.d),m=m._next;x&&x.render(n<0?n:x._dur*x._ease(p/this._dur),r,s)||this._startAt&&(this._zTime=n),this._onUpdate&&!r&&(h&&ui(this,n,r,s),ue(this,"onUpdate")),this._repeat&&f!==g&&this.vars.onRepeat&&!r&&this.parent&&ue(this,"onRepeat"),(u===this._tDur||!u)&&this._tTime===u&&(h&&!this._onUpdate&&ui(this,n,!0,!0),(n||!c)&&(u===this._tDur&&this._ts>0||!u&&this._ts<0)&&Te(this,1),!r&&!(h&&!o)&&(u||o||_)&&(ue(this,u===l?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),a.prototype.invalidate.call(this,n)},t.resetTo=function(n,r,s,o,l){_t||de.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||vi(this,c),h=this._ease(c/this._dur),Cs(this,n,r,s,o,h,c,l)?this.resetTo(n,r,s,o,1):(zt(this,0),this.parent||dn(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,r){if(r===void 0&&(r="all"),!n&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?mt(this):this.scrollTrigger&&this.scrollTrigger.kill(!!X),this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(n,r,Oe&&Oe.vars.overwrite!==!0)._first||mt(this),this.parent&&s!==this.timeline.totalDuration()&&tt(this,this._dur*this.timeline._tDur/s,0,1),this}var o=this._targets,l=n?me(n):o,c=this._ptLookup,h=this._pt,u,p,m,f,d,g,_;if((!r||r==="all")&&ts(o,l))return r==="all"&&(this._pt=0),mt(this);for(u=this._op=this._op||[],r!=="all"&&(K(r)&&(d={},te(r,function(y){return d[y]=1}),r=d),r=Ps(o,r)),_=o.length;_--;)if(~l.indexOf(o[_])){p=c[_],r==="all"?(u[_]=r,f=p,m={}):(m=u[_]=u[_]||{},f=r);for(d in f)g=p&&p[d],g&&((!("kill"in g.d)||g.d.kill(d)===!0)&&kt(this,g,"_pt"),delete p[d]),m!=="all"&&(m[d]=1)}return this._initted&&!this._pt&&h&&mt(this),this},e.to=function(n,r){return new e(n,r,arguments[2])},e.from=function(n,r){return dt(1,arguments)},e.delayedCall=function(n,r,s,o){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:r,onReverseComplete:r,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:o})},e.fromTo=function(n,r,s){return dt(2,arguments)},e.set=function(n,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(n,r)},e.killTweensOf=function(n,r,s){return $.killTweensOf(n,r,s)},e})(yt);ce(H.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),te("staggerTo,staggerFrom,staggerFromTo",function(a){H[a]=function(){var e=new Q,t=pi.call(arguments,0);return t.splice(a==="staggerFromTo"?5:4,0,0),e[a].apply(e,t)}});var Ei=function(e,t,i){return e[t]=i},Nn=function(e,t,i){return e[t](i)},Ss=function(e,t,i,n){return e[t](n.fp,i)},Ts=function(e,t,i){return e.setAttribute(t,i)},wi=function(e,t){return V(e[t])?Nn:Qt(e[t])&&e.setAttribute?Ts:Ei},$n=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},Ds=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Bn=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},Ci=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},Ms=function(e,t,i,n){for(var r=this._pt,s;r;)s=r._next,r.p===n&&r.modifier(e,t,i),r=s},Os=function(e){for(var t=this._pt,i,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?kt(this,t,"_pt"):t.dep||(i=1),t=n;return!i},Rs=function(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)},Vn=function(e){for(var t=e._pt,i,n,r,s;t;){for(i=t._next,n=r;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:s)?t._prev._next=t:r=t,(t._next=n)?n._prev=t:s=t,t=i}e._pt=r},ie=(function(){function a(t,i,n,r,s,o,l,c,h){this.t=i,this.s=r,this.c=s,this.p=n,this.r=o||$n,this.d=l||this,this.set=c||Ei,this.pr=h||0,this._next=t,t&&(t._prev=this)}var e=a.prototype;return e.modifier=function(i,n,r){this.mSet=this.mSet||this.set,this.set=Rs,this.m=i,this.mt=r,this.tween=n},a})();te(li+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(a){return si[a]=1}),le.TweenMax=le.TweenLite=H,le.TimelineLite=le.TimelineMax=Q,$=new Q({sortChildren:!1,defaults:We,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),oe.stringFilter=On;var $e=[],Nt={},Is=[],Gn=0,Ls=0,Pi=function(e){return(Nt[e]||Is).map(function(t){return t()})},Ai=function(){var e=Date.now(),t=[];e-Gn>2&&(Pi("matchMediaInit"),$e.forEach(function(i){var n=i.queries,r=i.conditions,s,o,l,c;for(o in n)s=ye.matchMedia(n[o]).matches,s&&(l=1),s!==r[o]&&(r[o]=s,c=1);c&&(i.revert(),l&&t.push(i))}),Pi("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(n){return i.add(null,n)})}),Gn=e,Pi("matchMedia"))},jn=(function(){function a(t,i){this.selector=i&&fi(i),this.data=[],this._r=[],this.isReverted=!1,this.id=Ls++,t&&this.add(t)}var e=a.prototype;return e.add=function(i,n,r){V(i)&&(r=n,n=i,i=V);var s=this,o=function(){var c=z,h=s.selector,u;return c&&c!==s&&c.data.push(s),r&&(s.selector=fi(r)),z=s,u=n.apply(s,arguments),V(u)&&s._r.push(u),z=c,s.selector=h,s.isReverted=!1,u};return s.last=o,i===V?o(s,function(l){return s.add(null,l)}):i?s[i]=o:o},e.ignore=function(i){var n=z;z=null,i(this),z=n},e.getTweens=function(){var i=[];return this.data.forEach(function(n){return n instanceof a?i.push.apply(i,n.getTweens()):n instanceof H&&!(n.parent&&n.parent.data==="nested")&&i.push(n)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,n){var r=this;if(i?(function(){for(var o=r.getTweens(),l=r.data.length,c;l--;)c=r.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(h){return o.splice(o.indexOf(h),1)}));for(o.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,u){return u.g-h.g||-1/0}).forEach(function(h){return h.t.revert(i)}),l=r.data.length;l--;)c=r.data[l],c instanceof Q?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof H)&&c.revert&&c.revert(i);r._r.forEach(function(h){return h(i,r)}),r.isReverted=!0})():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),n)for(var s=$e.length;s--;)$e[s].id===this.id&&$e.splice(s,1)},e.revert=function(i){this.kill(i||{})},a})(),ks=(function(){function a(t){this.contexts=[],this.scope=t,z&&z.data.push(this)}var e=a.prototype;return e.add=function(i,n,r){_e(i)||(i={matches:i});var s=new jn(0,r||this.scope),o=s.conditions={},l,c,h;z&&!s.selector&&(s.selector=z.selector),this.contexts.push(s),n=s.add("onMatch",n),s.queries=i;for(c in i)c==="all"?h=1:(l=ye.matchMedia(i[c]),l&&($e.indexOf(s)<0&&$e.push(s),(o[c]=l.matches)&&(h=1),l.addListener?l.addListener(Ai):l.addEventListener("change",Ai)));return h&&n(s,function(u){return s.add(null,u)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(n){return n.kill(i,!0)})},a})(),$t={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(n){return Sn(n)})},timeline:function(e){return new Q(e)},getTweensOf:function(e,t){return $.getTweensOf(e,t)},getProperty:function(e,t,i,n){K(e)&&(e=me(e)[0]);var r=Ue(e||{}).get,s=i?cn:hn;return i==="native"&&(i=""),e&&(t?s((he[t]&&he[t].get||r)(e,t,i,n)):function(o,l,c){return s((he[o]&&he[o].get||r)(e,o,l,c))})},quickSetter:function(e,t,i){if(e=me(e),e.length>1){var n=e.map(function(h){return ne.quickSetter(h,t,i)}),r=n.length;return function(h){for(var u=r;u--;)n[u](h)}}e=e[0]||{};var s=he[t],o=Ue(e),l=o.harness&&(o.harness.aliases||{})[t]||t,c=s?function(h){var u=new s;it._pt=0,u.init(e,i?h+i:h,it,0,[e]),u.render(1,u),it._pt&&Ci(1,it)}:o.set(e,l);return s?c:function(h){return c(e,l,i?h+i:h,o,1)}},quickTo:function(e,t,i){var n,r=ne.to(e,ce((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),i||{})),s=function(l,c,h){return r.resetTo(t,l,c,h)};return s.tween=r,s},isTweening:function(e){return $.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=ze(e.ease,We.ease)),un(We,e||{})},config:function(e){return un(oe,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,n=e.plugins,r=e.defaults,s=e.extendTimeline;(n||"").split(",").forEach(function(o){return o&&!he[o]&&!le[o]&&ht(t+" effect requires "+o+" plugin.")}),oi[t]=function(o,l,c){return i(me(o),ce(l||{},r),c)},s&&(Q.prototype[t]=function(o,l,c){return this.add(oi[t](o,_e(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){M[e]=ze(t)},parseEase:function(e,t){return arguments.length?ze(e,t):M},getById:function(e){return $.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Q(e),n,r;for(i.smoothChildTiming=ee(e.smoothChildTiming),$.remove(i),i._dp=0,i._time=i._tTime=$._time,n=$._first;n;)r=n._next,(t||!(!n._dur&&n instanceof H&&n.vars.onComplete===n._targets[0]))&&xe(i,n,n._start-n._delay),n=r;return xe($,i,0),i},context:function(e,t){return e?new jn(e,t):z},matchMedia:function(e){return new ks(e)},matchMediaRefresh:function(){return $e.forEach(function(e){var t=e.conditions,i,n;for(n in t)t[n]&&(t[n]=!1,i=1);i&&e.revert()})||Ai()},addEventListener:function(e,t){var i=Nt[e]||(Nt[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=Nt[e],n=i&&i.indexOf(t);n>=0&&i.splice(n,1)},utils:{wrap:ps,wrapYoyo:fs,distribute:bn,random:En,snap:vn,normalize:ds,getUnit:q,clamp:ls,splitColor:Tn,toArray:me,selector:fi,mapRange:Cn,pipe:cs,unitize:us,interpolate:ms,shuffle:xn},install:nn,effects:oi,ticker:de,updateRoot:Q.updateRoot,plugins:he,globalTimeline:$,core:{PropTween:ie,globals:rn,Tween:H,Timeline:Q,Animation:yt,getCache:Ue,_removeLinkedListItem:kt,reverting:function(){return X},context:function(e){return e&&z&&(z.data.push(e),e._ctx=z),z},suppressOverwrites:function(e){return Wt=e}}};te("to,from,fromTo,delayedCall,set,killTweensOf",function(a){return $t[a]=H[a]}),de.add(Q.updateRoot),it=$t.to({},{duration:0});var Us=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Fs=function(e,t){var i=e._targets,n,r,s;for(n in t)for(r=i.length;r--;)s=e._ptLookup[r][n],s&&(s=s.d)&&(s._pt&&(s=Us(s,n)),s&&s.modifier&&s.modifier(t[n],e,i[r],n))},Si=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,r,s){s._onInit=function(o){var l,c;if(K(r)&&(l={},te(r,function(h){return l[h]=1}),r=l),t){l={};for(c in r)l[c]=t(r[c]);r=l}Fs(o,r)}}}},ne=$t.registerPlugin({name:"attr",init:function(e,t,i,n,r){var s,o,l;this.tween=i;for(s in t)l=e.getAttribute(s)||"",o=this.add(e,"setAttribute",(l||0)+"",t[s],n,r,0,0,s),o.op=s,o.b=l,this._props.push(s)},render:function(e,t){for(var i=t._pt;i;)X?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},Si("roundProps",mi),Si("modifiers"),Si("snap",vn))||$t;H.version=Q.version=ne.version="3.13.0",tn=1,Jt()&&nt(),M.Power0,M.Power1,M.Power2,M.Power3,M.Power4,M.Linear,M.Quad,M.Cubic,M.Quart,M.Quint,M.Strong,M.Elastic,M.Back,M.SteppedEase,M.Bounce,M.Sine,M.Expo,M.Circ;var Yn,Re,rt,Ti,Be,Hn,Di,zs=function(){return typeof window<"u"},Ce={},Ve=180/Math.PI,st=Math.PI/180,at=Math.atan2,Zn=1e8,Mi=/([A-Z])/g,Ns=/(left|right|width|margin|padding|x)/i,$s=/[\s,\(]\S/,be={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Oi=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Bs=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Vs=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Gs=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},Kn=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Xn=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},js=function(e,t,i){return e.style[t]=i},Ys=function(e,t,i){return e.style.setProperty(t,i)},Hs=function(e,t,i){return e._gsap[t]=i},Zs=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},Ks=function(e,t,i,n,r){var s=e._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},Xs=function(e,t,i,n,r){var s=e._gsap;s[t]=i,s.renderTransform(r,s)},B="transform",re=B+"Origin",Ws=function a(e,t){var i=this,n=this.target,r=n.style,s=n._gsap;if(e in Ce&&r){if(this.tfm=this.tfm||{},e!=="transform")e=be[e]||e,~e.indexOf(",")?e.split(",").forEach(function(o){return i.tfm[o]=Pe(n,o)}):this.tfm[e]=s.x?s[e]:Pe(n,e),e===re&&(this.tfm.zOrigin=s.zOrigin);else return be.transform.split(",").forEach(function(o){return a.call(i,o,t)});if(this.props.indexOf(B)>=0)return;s.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(re,t,"")),e=B}(r||t)&&this.props.push(e,t,r[e])},Wn=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},qs=function(){var e=this.props,t=this.target,i=t.style,n=t._gsap,r,s;for(r=0;r<e.length;r+=3)e[r+1]?e[r+1]===2?t[e[r]](e[r+2]):t[e[r]]=e[r+2]:e[r+2]?i[e[r]]=e[r+2]:i.removeProperty(e[r].substr(0,2)==="--"?e[r]:e[r].replace(Mi,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)n[s]=this.tfm[s];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),r=Di(),(!r||!r.isStart)&&!i[B]&&(Wn(i),n.zOrigin&&i[re]&&(i[re]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},qn=function(e,t){var i={target:e,props:[],revert:qs,save:Ws};return e._gsap||ne.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return i.save(n)}),i},Qn,Ri=function(e,t){var i=Re.createElementNS?Re.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Re.createElement(e);return i&&i.style?i:Re.createElement(e)},ge=function a(e,t,i){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Mi,"-$1").toLowerCase())||n.getPropertyValue(t)||!i&&a(e,ot(t)||t,1)||""},Jn="O,Moz,ms,Ms,Webkit".split(","),ot=function(e,t,i){var n=t||Be,r=n.style,s=5;if(e in r&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);s--&&!(Jn[s]+e in r););return s<0?null:(s===3?"ms":s>=0?Jn[s]:"")+e},Ii=function(){zs()&&window.document&&(Yn=window,Re=Yn.document,rt=Re.documentElement,Be=Ri("div")||{style:{}},Ri("div"),B=ot(B),re=B+"Origin",Be.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Qn=!!ot("perspective"),Di=ne.core.reverting,Ti=1)},er=function(e){var t=e.ownerSVGElement,i=Ri("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),r;n.style.display="block",i.appendChild(n),rt.appendChild(i);try{r=n.getBBox()}catch{}return i.removeChild(n),rt.removeChild(i),r},tr=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},ir=function(e){var t,i;try{t=e.getBBox()}catch{t=er(e),i=1}return t&&(t.width||t.height)||i||(t=er(e)),t&&!t.width&&!t.x&&!t.y?{x:+tr(e,["x","cx","x1"])||0,y:+tr(e,["y","cy","y1"])||0,width:0,height:0}:t},nr=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&ir(e))},Ge=function(e,t){if(t){var i=e.style,n;t in Ce&&t!==re&&(t=B),i.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(n==="--"?t:t.replace(Mi,"-$1").toLowerCase())):i.removeAttribute(t)}},Ie=function(e,t,i,n,r,s){var o=new ie(e._pt,t,i,0,1,s?Xn:Kn);return e._pt=o,o.b=n,o.e=r,e._props.push(i),o},rr={deg:1,rad:1,turn:1},Qs={grid:1,flex:1},Le=function a(e,t,i,n){var r=parseFloat(i)||0,s=(i+"").trim().substr((r+"").length)||"px",o=Be.style,l=Ns.test(t),c=e.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),u=100,p=n==="px",m=n==="%",f,d,g,_;if(n===s||!r||rr[n]||rr[s])return r;if(s!=="px"&&!p&&(r=a(e,t,i,"px")),_=e.getCTM&&nr(e),(m||s==="%")&&(Ce[t]||~t.indexOf("adius")))return f=_?e.getBBox()[l?"width":"height"]:e[h],j(m?r/f*u:r/100*f);if(o[l?"width":"height"]=u+(p?s:n),d=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!c?e:e.parentNode,_&&(d=(e.ownerSVGElement||{}).parentNode),(!d||d===Re||!d.appendChild)&&(d=Re.body),g=d._gsap,g&&m&&g.width&&l&&g.time===de.time&&!g.uncache)return j(r/g.width*u);if(m&&(t==="height"||t==="width")){var y=e.style[t];e.style[t]=u+n,f=e[h],y?e.style[t]=y:Ge(e,t)}else(m||s==="%")&&!Qs[ge(d,"display")]&&(o.position=ge(e,"position")),d===e&&(o.position="static"),d.appendChild(Be),f=Be[h],d.removeChild(Be),o.position="absolute";return l&&m&&(g=Ue(d),g.time=de.time,g.width=d[h]),j(p?f*r/u:f&&r?u/f*r:0)},Pe=function(e,t,i,n){var r;return Ti||Ii(),t in be&&t!=="transform"&&(t=be[t],~t.indexOf(",")&&(t=t.split(",")[0])),Ce[t]&&t!=="transform"?(r=vt(e,n),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:Vt(ge(e,re))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||n||~(r+"").indexOf("calc("))&&(r=Bt[t]&&Bt[t](e,t,i)||ge(e,t)||on(e,t)||(t==="opacity"?1:0))),i&&!~(r+"").trim().indexOf(" ")?Le(e,t,r,i)+i:r},Js=function(e,t,i,n){if(!i||i==="none"){var r=ot(t,e,1),s=r&&ge(e,r,1);s&&s!==i?(t=r,i=s):t==="borderColor"&&(i=ge(e,"borderTopColor"))}var o=new ie(this._pt,e.style,t,0,1,Bn),l=0,c=0,h,u,p,m,f,d,g,_,y,x,v,b;if(o.b=i,o.e=n,i+="",n+="",n.substring(0,6)==="var(--"&&(n=ge(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(d=e.style[t],e.style[t]=n,n=ge(e,t)||n,d?e.style[t]=d:Ge(e,t)),h=[i,n],On(h),i=h[0],n=h[1],p=i.match(qe)||[],b=n.match(qe)||[],b.length){for(;u=qe.exec(n);)g=u[0],y=n.substring(l,u.index),f?f=(f+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(f=1),g!==(d=p[c++]||"")&&(m=parseFloat(d)||0,v=d.substr((m+"").length),g.charAt(1)==="="&&(g=Qe(m,g)+v),_=parseFloat(g),x=g.substr((_+"").length),l=qe.lastIndex-x.length,x||(x=x||oe.units[t]||v,l===n.length&&(n+=x,o.e+=x)),v!==x&&(m=Le(e,t,d,x)||0),o._pt={_next:o._pt,p:y||c===1?y:",",s:m,c:_-m,m:f&&f<4||t==="zIndex"?Math.round:0});o.c=l<n.length?n.substring(l,n.length):""}else o.r=t==="display"&&n==="none"?Xn:Kn;return Ji.test(n)&&(o.e=0),this._pt=o,o},sr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},ea=function(e){var t=e.split(" "),i=t[0],n=t[1]||"50%";return(i==="top"||i==="bottom"||n==="left"||n==="right")&&(e=i,i=n,n=e),t[0]=sr[i]||i,t[1]=sr[n]||n,t.join(" ")},ta=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,n=i.style,r=t.u,s=i._gsap,o,l,c;if(r==="all"||r===!0)n.cssText="",l=1;else for(r=r.split(","),c=r.length;--c>-1;)o=r[c],Ce[o]&&(l=1,o=o==="transformOrigin"?re:B),Ge(i,o);l&&(Ge(i,B),s&&(s.svg&&i.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",vt(i,1),s.uncache=1,Wn(n)))}},Bt={clearProps:function(e,t,i,n,r){if(r.data!=="isFromStart"){var s=e._pt=new ie(e._pt,t,i,0,0,ta);return s.u=n,s.pr=-10,s.tween=r,e._props.push(i),1}}},bt=[1,0,0,1,0,0],ar={},or=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},lr=function(e){var t=ge(e,B);return or(t)?bt:t.substr(7).match(Qi).map(j)},Li=function(e,t){var i=e._gsap||Ue(e),n=e.style,r=lr(e),s,o,l,c;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,r=[l.a,l.b,l.c,l.d,l.e,l.f],r.join(",")==="1,0,0,1,0,0"?bt:r):(r===bt&&!e.offsetParent&&e!==rt&&!i.svg&&(l=n.display,n.display="block",s=e.parentNode,(!s||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,rt.appendChild(e)),r=lr(e),l?n.display=l:Ge(e,"display"),c&&(o?s.insertBefore(e,o):s?s.appendChild(e):rt.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},ki=function(e,t,i,n,r,s){var o=e._gsap,l=r||Li(e,!0),c=o.xOrigin||0,h=o.yOrigin||0,u=o.xOffset||0,p=o.yOffset||0,m=l[0],f=l[1],d=l[2],g=l[3],_=l[4],y=l[5],x=t.split(" "),v=parseFloat(x[0])||0,b=parseFloat(x[1])||0,C,E,P,w;i?l!==bt&&(E=m*g-f*d)&&(P=v*(g/E)+b*(-d/E)+(d*y-g*_)/E,w=v*(-f/E)+b*(m/E)-(m*y-f*_)/E,v=P,b=w):(C=ir(e),v=C.x+(~x[0].indexOf("%")?v/100*C.width:v),b=C.y+(~(x[1]||x[0]).indexOf("%")?b/100*C.height:b)),n||n!==!1&&o.smooth?(_=v-c,y=b-h,o.xOffset=u+(_*m+y*d)-_,o.yOffset=p+(_*f+y*g)-y):o.xOffset=o.yOffset=0,o.xOrigin=v,o.yOrigin=b,o.smooth=!!n,o.origin=t,o.originIsAbsolute=!!i,e.style[re]="0px 0px",s&&(Ie(s,o,"xOrigin",c,v),Ie(s,o,"yOrigin",h,b),Ie(s,o,"xOffset",u,o.xOffset),Ie(s,o,"yOffset",p,o.yOffset)),e.setAttribute("data-svg-origin",v+" "+b)},vt=function(e,t){var i=e._gsap||new kn(e);if("x"in i&&!t&&!i.uncache)return i;var n=e.style,r=i.scaleX<0,s="px",o="deg",l=getComputedStyle(e),c=ge(e,re)||"0",h,u,p,m,f,d,g,_,y,x,v,b,C,E,P,w,T,O,S,R,I,G,N,F,se,Pt,At,St,Ke,Mr,Ae,Xe;return h=u=p=d=g=_=y=x=v=0,m=f=1,i.svg=!!(e.getCTM&&nr(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[B]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[B]!=="none"?l[B]:"")),n.scale=n.rotate=n.translate="none"),E=Li(e,i.svg),i.svg&&(i.uncache?(se=e.getBBox(),c=i.xOrigin-se.x+"px "+(i.yOrigin-se.y)+"px",F=""):F=!t&&e.getAttribute("data-svg-origin"),ki(e,F||c,!!F||i.originIsAbsolute,i.smooth!==!1,E)),b=i.xOrigin||0,C=i.yOrigin||0,E!==bt&&(O=E[0],S=E[1],R=E[2],I=E[3],h=G=E[4],u=N=E[5],E.length===6?(m=Math.sqrt(O*O+S*S),f=Math.sqrt(I*I+R*R),d=O||S?at(S,O)*Ve:0,y=R||I?at(R,I)*Ve+d:0,y&&(f*=Math.abs(Math.cos(y*st))),i.svg&&(h-=b-(b*O+C*R),u-=C-(b*S+C*I))):(Xe=E[6],Mr=E[7],At=E[8],St=E[9],Ke=E[10],Ae=E[11],h=E[12],u=E[13],p=E[14],P=at(Xe,Ke),g=P*Ve,P&&(w=Math.cos(-P),T=Math.sin(-P),F=G*w+At*T,se=N*w+St*T,Pt=Xe*w+Ke*T,At=G*-T+At*w,St=N*-T+St*w,Ke=Xe*-T+Ke*w,Ae=Mr*-T+Ae*w,G=F,N=se,Xe=Pt),P=at(-R,Ke),_=P*Ve,P&&(w=Math.cos(-P),T=Math.sin(-P),F=O*w-At*T,se=S*w-St*T,Pt=R*w-Ke*T,Ae=I*T+Ae*w,O=F,S=se,R=Pt),P=at(S,O),d=P*Ve,P&&(w=Math.cos(P),T=Math.sin(P),F=O*w+S*T,se=G*w+N*T,S=S*w-O*T,N=N*w-G*T,O=F,G=se),g&&Math.abs(g)+Math.abs(d)>359.9&&(g=d=0,_=180-_),m=j(Math.sqrt(O*O+S*S+R*R)),f=j(Math.sqrt(N*N+Xe*Xe)),P=at(G,N),y=Math.abs(P)>2e-4?P*Ve:0,v=Ae?1/(Ae<0?-Ae:Ae):0),i.svg&&(F=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!or(ge(e,B)),F&&e.setAttribute("transform",F))),Math.abs(y)>90&&Math.abs(y)<270&&(r?(m*=-1,y+=d<=0?180:-180,d+=d<=0?180:-180):(f*=-1,y+=y<=0?180:-180)),t=t||i.uncache,i.x=h-((i.xPercent=h&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+s,i.y=u-((i.yPercent=u&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+s,i.z=p+s,i.scaleX=j(m),i.scaleY=j(f),i.rotation=j(d)+o,i.rotationX=j(g)+o,i.rotationY=j(_)+o,i.skewX=y+o,i.skewY=x+o,i.transformPerspective=v+s,(i.zOrigin=parseFloat(c.split(" ")[2])||!t&&i.zOrigin||0)&&(n[re]=Vt(c)),i.xOffset=i.yOffset=0,i.force3D=oe.force3D,i.renderTransform=i.svg?na:Qn?hr:ia,i.uncache=0,i},Vt=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ui=function(e,t,i){var n=q(t);return j(parseFloat(t)+parseFloat(Le(e,"x",i+"px",n)))+n},ia=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,hr(e,t)},je="0deg",Et="0px",Ye=") ",hr=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,s=i.x,o=i.y,l=i.z,c=i.rotation,h=i.rotationY,u=i.rotationX,p=i.skewX,m=i.skewY,f=i.scaleX,d=i.scaleY,g=i.transformPerspective,_=i.force3D,y=i.target,x=i.zOrigin,v="",b=_==="auto"&&e&&e!==1||_===!0;if(x&&(u!==je||h!==je)){var C=parseFloat(h)*st,E=Math.sin(C),P=Math.cos(C),w;C=parseFloat(u)*st,w=Math.cos(C),s=Ui(y,s,E*w*-x),o=Ui(y,o,-Math.sin(C)*-x),l=Ui(y,l,P*w*-x+x)}g!==Et&&(v+="perspective("+g+Ye),(n||r)&&(v+="translate("+n+"%, "+r+"%) "),(b||s!==Et||o!==Et||l!==Et)&&(v+=l!==Et||b?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+Ye),c!==je&&(v+="rotate("+c+Ye),h!==je&&(v+="rotateY("+h+Ye),u!==je&&(v+="rotateX("+u+Ye),(p!==je||m!==je)&&(v+="skew("+p+", "+m+Ye),(f!==1||d!==1)&&(v+="scale("+f+", "+d+Ye),y.style[B]=v||"translate(0, 0)"},na=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,s=i.x,o=i.y,l=i.rotation,c=i.skewX,h=i.skewY,u=i.scaleX,p=i.scaleY,m=i.target,f=i.xOrigin,d=i.yOrigin,g=i.xOffset,_=i.yOffset,y=i.forceCSS,x=parseFloat(s),v=parseFloat(o),b,C,E,P,w;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=st,c*=st,b=Math.cos(l)*u,C=Math.sin(l)*u,E=Math.sin(l-c)*-p,P=Math.cos(l-c)*p,c&&(h*=st,w=Math.tan(c-h),w=Math.sqrt(1+w*w),E*=w,P*=w,h&&(w=Math.tan(h),w=Math.sqrt(1+w*w),b*=w,C*=w)),b=j(b),C=j(C),E=j(E),P=j(P)):(b=u,P=p,C=E=0),(x&&!~(s+"").indexOf("px")||v&&!~(o+"").indexOf("px"))&&(x=Le(m,"x",s,"px"),v=Le(m,"y",o,"px")),(f||d||g||_)&&(x=j(x+f-(f*b+d*E)+g),v=j(v+d-(f*C+d*P)+_)),(n||r)&&(w=m.getBBox(),x=j(x+n/100*w.width),v=j(v+r/100*w.height)),w="matrix("+b+","+C+","+E+","+P+","+x+","+v+")",m.setAttribute("transform",w),y&&(m.style[B]=w)},ra=function(e,t,i,n,r){var s=360,o=K(r),l=parseFloat(r)*(o&&~r.indexOf("rad")?Ve:1),c=l-n,h=n+c+"deg",u,p;return o&&(u=r.split("_")[1],u==="short"&&(c%=s,c!==c%(s/2)&&(c+=c<0?s:-s)),u==="cw"&&c<0?c=(c+s*Zn)%s-~~(c/s)*s:u==="ccw"&&c>0&&(c=(c-s*Zn)%s-~~(c/s)*s)),e._pt=p=new ie(e._pt,t,i,n,c,Bs),p.e=h,p.u="deg",e._props.push(i),p},cr=function(e,t){for(var i in t)e[i]=t[i];return e},sa=function(e,t,i){var n=cr({},i._gsap),r="perspective,force3D,transformOrigin,svgOrigin",s=i.style,o,l,c,h,u,p,m,f;n.svg?(c=i.getAttribute("transform"),i.setAttribute("transform",""),s[B]=t,o=vt(i,1),Ge(i,B),i.setAttribute("transform",c)):(c=getComputedStyle(i)[B],s[B]=t,o=vt(i,1),s[B]=c);for(l in Ce)c=n[l],h=o[l],c!==h&&r.indexOf(l)<0&&(m=q(c),f=q(h),u=m!==f?Le(i,l,c,f):parseFloat(c),p=parseFloat(h),e._pt=new ie(e._pt,o,l,u,p-u,Oi),e._pt.u=f||0,e._props.push(l));cr(o,n)};te("padding,margin,Width,Radius",function(a,e){var t="Top",i="Right",n="Bottom",r="Left",s=(e<3?[t,i,n,r]:[t+r,t+i,n+i,n+r]).map(function(o){return e<2?a+o:"border"+o+a});Bt[e>1?"border"+a:a]=function(o,l,c,h,u){var p,m;if(arguments.length<4)return p=s.map(function(f){return Pe(o,f,c)}),m=p.join(" "),m.split(p[0]).length===5?p[0]:m;p=(h+"").split(" "),m={},s.forEach(function(f,d){return m[f]=p[d]=p[d]||p[(d-1)/2|0]}),o.init(l,m,u)}});var ur={name:"css",register:Ii,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,r){var s=this._props,o=e.style,l=i.vars.startAt,c,h,u,p,m,f,d,g,_,y,x,v,b,C,E,P;Ti||Ii(),this.styles=this.styles||qn(e),P=this.styles.props,this.tween=i;for(d in t)if(d!=="autoRound"&&(h=t[d],!(he[d]&&Un(d,t,i,n,e,r)))){if(m=typeof h,f=Bt[d],m==="function"&&(h=h.call(i,n,e,r),m=typeof h),m==="string"&&~h.indexOf("random(")&&(h=ft(h)),f)f(this,e,d,h,i)&&(E=1);else if(d.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(d)+"").trim(),h+="",Me.lastIndex=0,Me.test(c)||(g=q(c),_=q(h)),_?g!==_&&(c=Le(e,d,c,_)+_):g&&(h+=g),this.add(o,"setProperty",c,h,n,r,0,0,d),s.push(d),P.push(d,0,o[d]);else if(m!=="undefined"){if(l&&d in l?(c=typeof l[d]=="function"?l[d].call(i,n,e,r):l[d],K(c)&&~c.indexOf("random(")&&(c=ft(c)),q(c+"")||c==="auto"||(c+=oe.units[d]||q(Pe(e,d))||""),(c+"").charAt(1)==="="&&(c=Pe(e,d))):c=Pe(e,d),p=parseFloat(c),y=m==="string"&&h.charAt(1)==="="&&h.substr(0,2),y&&(h=h.substr(2)),u=parseFloat(h),d in be&&(d==="autoAlpha"&&(p===1&&Pe(e,"visibility")==="hidden"&&u&&(p=0),P.push("visibility",0,o.visibility),Ie(this,o,"visibility",p?"inherit":"hidden",u?"inherit":"hidden",!u)),d!=="scale"&&d!=="transform"&&(d=be[d],~d.indexOf(",")&&(d=d.split(",")[0]))),x=d in Ce,x){if(this.styles.save(d),m==="string"&&h.substring(0,6)==="var(--"&&(h=ge(e,h.substring(4,h.indexOf(")"))),u=parseFloat(h)),v||(b=e._gsap,b.renderTransform&&!t.parseTransform||vt(e,t.parseTransform),C=t.smoothOrigin!==!1&&b.smooth,v=this._pt=new ie(this._pt,o,B,0,1,b.renderTransform,b,0,-1),v.dep=1),d==="scale")this._pt=new ie(this._pt,b,"scaleY",b.scaleY,(y?Qe(b.scaleY,y+u):u)-b.scaleY||0,Oi),this._pt.u=0,s.push("scaleY",d),d+="X";else if(d==="transformOrigin"){P.push(re,0,o[re]),h=ea(h),b.svg?ki(e,h,0,C,0,this):(_=parseFloat(h.split(" ")[2])||0,_!==b.zOrigin&&Ie(this,b,"zOrigin",b.zOrigin,_),Ie(this,o,d,Vt(c),Vt(h)));continue}else if(d==="svgOrigin"){ki(e,h,1,C,0,this);continue}else if(d in ar){ra(this,b,d,p,y?Qe(p,y+h):h);continue}else if(d==="smoothOrigin"){Ie(this,b,"smooth",b.smooth,h);continue}else if(d==="force3D"){b[d]=h;continue}else if(d==="transform"){sa(this,h,e);continue}}else d in o||(d=ot(d)||d);if(x||(u||u===0)&&(p||p===0)&&!$s.test(h)&&d in o)g=(c+"").substr((p+"").length),u||(u=0),_=q(h)||(d in oe.units?oe.units[d]:g),g!==_&&(p=Le(e,d,c,_)),this._pt=new ie(this._pt,x?b:o,d,p,(y?Qe(p,y+u):u)-p,!x&&(_==="px"||d==="zIndex")&&t.autoRound!==!1?Gs:Oi),this._pt.u=_||0,g!==_&&_!=="%"&&(this._pt.b=c,this._pt.r=Vs);else if(d in o)Js.call(this,e,d,c,y?y+h:h);else if(d in e)this.add(e,d,c||e[d],y?y+h:h,n,r);else if(d!=="parseTransform"){ri(d,h);continue}x||(d in o?P.push(d,0,o[d]):typeof e[d]=="function"?P.push(d,2,e[d]()):P.push(d,1,c||e[d])),s.push(d)}}E&&Vn(this)},render:function(e,t){if(t.tween._time||!Di())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:Pe,aliases:be,getSetter:function(e,t,i){var n=be[t];return n&&n.indexOf(",")<0&&(t=n),t in Ce&&t!==re&&(e._gsap.x||Pe(e,"x"))?i&&Hn===i?t==="scale"?Zs:Hs:(Hn=i||{})&&(t==="scale"?Ks:Xs):e.style&&!Qt(e.style[t])?js:~t.indexOf("-")?Ys:wi(e,t)},core:{_removeProperty:Ge,_getMatrix:Li}};ne.utils.checkPrefix=ot,ne.core.getStyleSaver=qn,(function(a,e,t,i){var n=te(a+","+e+","+t,function(r){Ce[r]=1});te(e,function(r){oe.units[r]="deg",ar[r]=1}),be[n[13]]=a+","+e,te(i,function(r){var s=r.split(":");be[s[1]]=n[s[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"),te("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(a){oe.units[a]="px"}),ne.registerPlugin(ur);var wt=ne.registerPlugin(ur)||ne;wt.core.Tween;class ve{constructor(e,t,i,n,r="div"){this.parent=e,this.object=t,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("lil-controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("lil-name"),ve.nextNameID=ve.nextNameID||0,this.$name.id=`lil-gui-name-${++ve.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("lil-widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",s=>s.stopPropagation()),this.domElement.addEventListener("keyup",s=>s.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("lil-disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class aa extends ve{constructor(e,t,i){super(e,t,i,"lil-boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function Fi(a){let e,t;return(e=a.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=a.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=a.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),t?"#"+t:!1}const oa={isPrimitive:!0,match:a=>typeof a=="string",fromHexString:Fi,toHexString:Fi},Ct={isPrimitive:!0,match:a=>typeof a=="number",fromHexString:a=>parseInt(a.substring(1),16),toHexString:a=>"#"+a.toString(16).padStart(6,0)},la=[oa,Ct,{isPrimitive:!1,match:a=>Array.isArray(a)||ArrayBuffer.isView(a),fromHexString(a,e,t=1){const i=Ct.fromHexString(a);e[0]=(i>>16&255)/255*t,e[1]=(i>>8&255)/255*t,e[2]=(i&255)/255*t},toHexString([a,e,t],i=1){i=255/i;const n=a*i<<16^e*i<<8^t*i<<0;return Ct.toHexString(n)}},{isPrimitive:!1,match:a=>Object(a)===a,fromHexString(a,e,t=1){const i=Ct.fromHexString(a);e.r=(i>>16&255)/255*t,e.g=(i>>8&255)/255*t,e.b=(i&255)/255*t},toHexString({r:a,g:e,b:t},i=1){i=255/i;const n=a*i<<16^e*i<<8^t*i<<0;return Ct.toHexString(n)}}];function ha(a){return la.find(e=>e.match(a))}class ca extends ve{constructor(e,t,i,n){super(e,t,i,"lil-color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("lil-display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=ha(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const r=Fi(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class zi extends ve{constructor(e,t,i){super(e,t,i,"lil-function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class ua extends ve{constructor(e,t,i,n,r,s){super(e,t,i,"lil-number"),this._initInput(),this.min(n),this.max(r);const o=s!==void 0;this.step(o?s:this._getImplicitStep(),o),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=t*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=()=>{let y=parseFloat(this.$input.value);isNaN(y)||(this._stepExplicit&&(y=this._snap(y)),this.setValue(this._clamp(y)))},i=y=>{const x=parseFloat(this.$input.value);isNaN(x)||(this._snapClampSetValue(x+y),this.$input.value=this.getValue())},n=y=>{y.key==="Enter"&&this.$input.blur(),y.code==="ArrowUp"&&(y.preventDefault(),i(this._step*this._arrowKeyMultiplier(y))),y.code==="ArrowDown"&&(y.preventDefault(),i(this._step*this._arrowKeyMultiplier(y)*-1))},r=y=>{this._inputFocused&&(y.preventDefault(),i(this._step*this._normalizeMouseWheel(y)))};let s=!1,o,l,c,h,u;const p=5,m=y=>{o=y.clientX,l=c=y.clientY,s=!0,h=this.getValue(),u=0,window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)},f=y=>{if(s){const x=y.clientX-o,v=y.clientY-l;Math.abs(v)>p?(y.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(x)>p&&d()}if(!s){const x=y.clientY-c;u-=x*this._step*this._arrowKeyMultiplier(y),h+u>this._max?u=this._max-h:h+u<this._min&&(u=this._min-h),this._snapClampSetValue(h+u)}c=y.clientY},d=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)},g=()=>{this._inputFocused=!0},_=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",t),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",m),this.$input.addEventListener("focus",g),this.$input.addEventListener("blur",_)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("lil-slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("lil-fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("lil-has-slider");const e=(_,y,x,v,b)=>(_-y)/(x-y)*(b-v)+v,t=_=>{const y=this.$slider.getBoundingClientRect();let x=e(_,y.left,y.right,this._min,this._max);this._snapClampSetValue(x)},i=_=>{this._setDraggingStyle(!0),t(_.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)},n=_=>{t(_.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)};let s=!1,o,l;const c=_=>{_.preventDefault(),this._setDraggingStyle(!0),t(_.touches[0].clientX),s=!1},h=_=>{_.touches.length>1||(this._hasScrollBar?(o=_.touches[0].clientX,l=_.touches[0].clientY,s=!0):c(_),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",p))},u=_=>{if(s){const y=_.touches[0].clientX-o,x=_.touches[0].clientY-l;Math.abs(y)>Math.abs(x)?c(_):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p))}else _.preventDefault(),t(_.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p)},m=this._callOnFinishChange.bind(this),f=400;let d;const g=_=>{if(Math.abs(_.deltaX)<Math.abs(_.deltaY)&&this._hasScrollBar)return;_.preventDefault();const x=this._normalizeMouseWheel(_)*this._step;this._snapClampSetValue(this.getValue()+x),this.$input.value=this.getValue(),clearTimeout(d),d=setTimeout(m,f)};this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",g,{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("lil-active",e),document.body.classList.toggle("lil-dragging",e),document.body.classList.toggle(`lil-${t}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:i}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,i=-e.wheelDelta/120,i*=this._stepExplicit?1:10),t+-i}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){let t=0;return this._hasMin?t=this._min:this._hasMax&&(t=this._max),e-=t,e=Math.round(e/this._step)*this._step,e+=t,e=parseFloat(e.toPrecision(15)),e}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class da extends ve{constructor(e,t,i,n){super(e,t,i,"lil-option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("lil-display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("lil-focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("lil-focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(t=>{const i=document.createElement("option");i.textContent=t,this.$select.appendChild(i)}),this.updateDisplay(),this}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.textContent=t===-1?e:this._names[t],this}}class pa extends ve{constructor(e,t,i){super(e,t,i,"lil-string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}var fa=`.lil-gui {
|
|
1
|
+
(function(ae,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],A):(ae=typeof globalThis<"u"?globalThis:ae||self,A(ae.Gralobe={},ae.THREE))})(this,(function(ae,A){"use strict";function Or(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const D=Or(A),Hi={type:"change"},Kt={type:"start"},Zi={type:"end"},Tt=new A.Ray,Ki=new A.Plane,Rr=Math.cos(70*A.MathUtils.DEG2RAD),Z=new A.Vector3,J=2*Math.PI,L={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Wt=1e-6;class Ir extends A.Controls{constructor(e,t=null){super(e,t),this.state=L.NONE,this.target=new A.Vector3,this.cursor=new A.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=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.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:A.MOUSE.ROTATE,MIDDLE:A.MOUSE.DOLLY,RIGHT:A.MOUSE.PAN},this.touches={ONE:A.TOUCH.ROTATE,TWO:A.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new A.Vector3,this._lastQuaternion=new A.Quaternion,this._lastTargetPosition=new A.Vector3,this._quat=new A.Quaternion().setFromUnitVectors(e.up,new A.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new A.Spherical,this._sphericalDelta=new A.Spherical,this._scale=1,this._panOffset=new A.Vector3,this._rotateStart=new A.Vector2,this._rotateEnd=new A.Vector2,this._rotateDelta=new A.Vector2,this._panStart=new A.Vector2,this._panEnd=new A.Vector2,this._panDelta=new A.Vector2,this._dollyStart=new A.Vector2,this._dollyEnd=new A.Vector2,this._dollyDelta=new A.Vector2,this._dollyDirection=new A.Vector3,this._mouse=new A.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=kr.bind(this),this._onPointerDown=Lr.bind(this),this._onPointerUp=Ur.bind(this),this._onContextMenu=Gr.bind(this),this._onMouseWheel=Nr.bind(this),this._onKeyDown=$r.bind(this),this._onTouchStart=Br.bind(this),this._onTouchMove=Vr.bind(this),this._onMouseDown=Fr.bind(this),this._onMouseMove=zr.bind(this),this._interceptControlDown=jr.bind(this),this._interceptControlUp=Yr.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Hi),this.update(),this.state=L.NONE}update(e=null){const t=this.object.position;Z.copy(t).sub(this.target),Z.applyQuaternion(this._quat),this._spherical.setFromVector3(Z),this.autoRotate&&this.state===L.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(i)&&isFinite(n)&&(i<-Math.PI?i+=J:i>Math.PI&&(i-=J),n<-Math.PI?n+=J:n>Math.PI&&(n-=J),i<=n?this._spherical.theta=Math.max(i,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(i+n)/2?Math.max(i,this._spherical.theta):Math.min(n,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const s=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=s!=this._spherical.radius}if(Z.setFromSpherical(this._spherical),Z.applyQuaternion(this._quatInverse),t.copy(this.target).add(Z),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let s=null;if(this.object.isPerspectiveCamera){const o=Z.length();s=this._clampDistance(o*this._scale);const l=o-s;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const o=new A.Vector3(this._mouse.x,this._mouse.y,0);o.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=l!==this.object.zoom;const c=new A.Vector3(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),s=Z.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;s!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position):(Tt.origin.copy(this.object.position),Tt.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(Tt.direction))<Rr?this.object.lookAt(this.target):(Ki.setFromNormalAndCoplanarPoint(this.object.up,this.target),Tt.intersectPlane(Ki,this.target))))}else if(this.object.isOrthographicCamera){const s=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),s!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>Wt||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Wt||this._lastTargetPosition.distanceToSquared(this.target)>Wt?(this.dispatchEvent(Hi),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?J/60*this.autoRotateSpeed*e:J/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){Z.setFromMatrixColumn(t,0),Z.multiplyScalar(-e),this._panOffset.add(Z)}_panUp(e,t){this.screenSpacePanning===!0?Z.setFromMatrixColumn(t,1):(Z.setFromMatrixColumn(t,0),Z.crossVectors(this.object.up,Z)),Z.multiplyScalar(e),this._panOffset.add(Z)}_pan(e,t){const i=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;Z.copy(n).sub(this.target);let r=Z.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/i.clientHeight,this.object.matrix),this._panUp(2*t*r/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const i=this.domElement.getBoundingClientRect(),n=e-i.left,r=t-i.top,s=i.width,o=i.height;this._mouse.x=n/s*2-1,this._mouse.y=-(r/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(J*this._rotateDelta.x/t.clientHeight),this._rotateUp(J*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-J*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);this._rotateStart.set(i,n)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);this._panStart.set(i,n)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),i=e.pageX-t.x,n=e.pageY-t.y,r=Math.sqrt(i*i+n*n);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const i=this._getSecondPointerPosition(e),n=.5*(e.pageX+i.x),r=.5*(e.pageY+i.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(J*this._rotateDelta.x/t.clientHeight),this._rotateUp(J*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);this._panEnd.set(i,n)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),i=e.pageX-t.x,n=e.pageY-t.y,r=Math.sqrt(i*i+n*n);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const s=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(s,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new A.Vector2,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,i={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}}function Lr(a){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(a.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(a)&&(this._addPointer(a),a.pointerType==="touch"?this._onTouchStart(a):this._onMouseDown(a)))}function kr(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function Ur(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(Zi),this.state=L.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function Fr(a){let e;switch(a.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case A.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=L.DOLLY;break;case A.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=L.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=L.ROTATE}break;case A.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=L.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=L.PAN}break;default:this.state=L.NONE}this.state!==L.NONE&&this.dispatchEvent(Kt)}function zr(a){switch(this.state){case L.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case L.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case L.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function Nr(a){this.enabled===!1||this.enableZoom===!1||this.state!==L.NONE||(a.preventDefault(),this.dispatchEvent(Kt),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(Zi))}function $r(a){this.enabled!==!1&&this._handleKeyDown(a)}function Br(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case A.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=L.TOUCH_ROTATE;break;case A.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=L.TOUCH_PAN;break;default:this.state=L.NONE}break;case 2:switch(this.touches.TWO){case A.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=L.TOUCH_DOLLY_PAN;break;case A.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=L.TOUCH_DOLLY_ROTATE;break;default:this.state=L.NONE}break;default:this.state=L.NONE}this.state!==L.NONE&&this.dispatchEvent(Kt)}function Vr(a){switch(this._trackPointer(a),this.state){case L.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case L.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case L.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case L.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=L.NONE}}function Gr(a){this.enabled!==!1&&a.preventDefault()}function jr(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Yr(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ee(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Wi(a,e){a.prototype=Object.create(e.prototype),a.prototype.constructor=a,a.__proto__=e}var oe={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Xe={duration:.5,overwrite:!1,delay:0},Xt,W,z,pe=1e8,k=1/pe,qt=Math.PI*2,Hr=qt/4,Zr=0,Xi=Math.sqrt,Kr=Math.cos,Wr=Math.sin,K=function(e){return typeof e=="string"},V=function(e){return typeof e=="function"},we=function(e){return typeof e=="number"},Qt=function(e){return typeof e>"u"},_e=function(e){return typeof e=="object"},ee=function(e){return e!==!1},Jt=function(){return typeof window<"u"},Dt=function(e){return V(e)||K(e)},qi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},X=Array.isArray,ei=/(?:-?\.?\d|\.)+/gi,Qi=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,qe=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ti=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Ji=/[+-]=-?[.\d]+/,en=/[^,'"\[\]\s]+/gi,Xr=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,$,ye,ii,ni,le={},Mt={},tn,nn=function(e){return(Mt=Je(e,le))&&ne},ri=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ht=function(e,t){return!t&&console.warn(e)},rn=function(e,t){return e&&(le[e]=t)&&Mt&&(Mt[e]=t)||le},ct=function(){return 0},qr={suppressEvents:!0,isStart:!0,kill:!1},Ot={suppressEvents:!0,kill:!1},Qr={suppressEvents:!0},si={},Se=[],ai={},sn,he={},oi={},an=30,Rt=[],li="",hi=function(e){var t=e[0],i,n;if(_e(t)||V(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(n=Rt.length;n--&&!Rt[n].targetTest(t););i=Rt[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new kn(e[n],i)))||e.splice(n,1);return e},Ue=function(e){return e._gsap||hi(me(e))[0]._gsap},on=function(e,t,i){return(i=e[t])&&V(i)?e[t]():Qt(i)&&e.getAttribute&&e.getAttribute(t)||i},te=function(e,t){return(e=e.split(",")).forEach(t)||e},j=function(e){return Math.round(e*1e5)/1e5||0},Y=function(e){return Math.round(e*1e7)/1e7||0},Qe=function(e,t){var i=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+n:i==="-"?e-n:i==="*"?e*n:e/n},Jr=function(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++n<i;);return n<i},It=function(){var e=Se.length,t=Se.slice(0),i,n;for(ai={},Se.length=0,i=0;i<e;i++)n=t[i],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},ci=function(e){return!!(e._initted||e._startAt||e.add)},ln=function(e,t,i,n){Se.length&&!W&&It(),e.render(t,i,!!(W&&t<0&&ci(e))),Se.length&&!W&&It()},hn=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(en).length<2?t:K(e)?e.trim():e},cn=function(e){return e},ce=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},es=function(e){return function(t,i){for(var n in i)n in t||n==="duration"&&e||n==="ease"||(t[n]=i[n])}},Je=function(e,t){for(var i in t)e[i]=t[i];return e},un=function a(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=_e(t[i])?a(e[i]||(e[i]={}),t[i]):t[i]);return e},Lt=function(e,t){var i={},n;for(n in e)n in t||(i[n]=e[n]);return i},ut=function(e){var t=e.parent||$,i=e.keyframes?es(X(e.keyframes)):ce;if(ee(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},ts=function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0},dn=function(e,t,i,n,r){var s=e[n],o;if(r)for(o=t[r];s&&s[r]>o;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=s,t.parent=t._dp=e,t},kt=function(e,t,i,n){i===void 0&&(i="_first"),n===void 0&&(n="_last");var r=t._prev,s=t._next;r?r._next=s:e[i]===t&&(e[i]=s),s?s._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null},Te=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Fe=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},is=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},ui=function(e,t,i,n){return e._startAt&&(W?e._startAt.revert(Ot):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},ns=function a(e){return!e||e._ts&&a(e.parent)},pn=function(e){return e._repeat?et(e._tTime,e=e.duration()+e._rDelay)*e:0},et=function(e,t){var i=Math.floor(e=Y(e/t));return e&&i===e?i-1:i},Ut=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Ft=function(e){return e._end=Y(e._start+(e._tDur/Math.abs(e._ts||e._rts||k)||0))},zt=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Y(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Ft(e),i._dirty||Fe(i,e)),e},fn=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=Ut(e.rawTime(),t),(!t._dur||pt(0,t.totalDuration(),i)-t._tTime>k)&&t.render(i,!0)),Fe(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-k}},xe=function(e,t,i,n){return t.parent&&Te(t),t._start=Y((we(i)?i:i||e!==$?fe(e,i,t):e._time)+t._delay),t._end=Y(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),dn(e,t,"_first","_last",e._sort?"_start":0),di(t)||(e._recent=t),n||fn(e,t),e._ts<0&&zt(e,e._tTime),e},mn=function(e,t){return(le.ScrollTrigger||ri("scrollTrigger",t))&&le.ScrollTrigger.create(t,e)},gn=function(e,t,i,n,r){if(vi(e,t,r),!e._initted)return 1;if(!i&&e._pt&&!W&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&sn!==de.frame)return Se.push(e),e._lazy=[r,n],1},rs=function a(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||a(t))},di=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},ss=function(e,t,i,n){var r=e.ratio,s=t<0||!t&&(!e._start&&rs(e)&&!(!e._initted&&di(e))||(e._ts<0||e._dp._ts<0)&&!di(e))?0:1,o=e._rDelay,l=0,c,h,u;if(o&&e._repeat&&(l=pt(0,e._tDur,t),h=et(l,o),e._yoyo&&h&1&&(s=1-s),h!==et(e._tTime,o)&&(r=1-s,e.vars.repeatRefresh&&e._initted&&e.invalidate())),s!==r||W||n||e._zTime===k||!t&&e._zTime){if(!e._initted&&gn(e,t,n,i,l))return;for(u=e._zTime,e._zTime=t||(i?k:0),i||(i=t&&!u),e.ratio=s,e._from&&(s=1-s),e._time=0,e._tTime=l,c=e._pt;c;)c.r(s,c.d),c=c._next;t<0&&ui(e,t,i,!0),e._onUpdate&&!i&&ue(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&ue(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===s&&(s&&Te(e,1),!i&&!W&&(ue(e,s?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},as=function(e,t,i){var n;if(i>t)for(n=e._first;n&&n._start<=i;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},tt=function(e,t,i,n){var r=e._repeat,s=Y(t)||0,o=e._tTime/e._tDur;return o&&!n&&(e._time*=s/e._dur),e._dur=s,e._tDur=r?r<0?1e10:Y(s*(r+1)+e._rDelay*r):s,o>0&&!n&&zt(e,e._tTime=e._tDur*o),e.parent&&Ft(e),i||Fe(e.parent,e),e},_n=function(e){return e instanceof Q?Fe(e):tt(e,e._dur)},os={_start:0,endTime:ct,totalDuration:ct},fe=function a(e,t,i){var n=e.labels,r=e._recent||os,s=e.duration()>=pe?r.endTime(!1):e._dur,o,l,c;return K(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),c=t.substr(-1)==="%",o=t.indexOf("="),l==="<"||l===">"?(o>=0&&(t=t.replace(/=/,"")),(l==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(o<0?r:i).totalDuration()/100:1)):o<0?(t in n||(n[t]=s),n[t]):(l=parseFloat(t.charAt(o-1)+t.substr(o+1)),c&&i&&(l=l/100*(X(i)?i[0]:i).totalDuration()),o>1?a(e,t.substr(0,o-1),i)+l:s+l)):t==null?s:+t},dt=function(e,t,i){var n=we(t[1]),r=(n?2:1)+(e<2?0:1),s=t[r],o,l;if(n&&(s.duration=t[1]),s.parent=i,e){for(o=s,l=i;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=ee(l.vars.inherit)&&l.parent;s.immediateRender=ee(o.immediateRender),e<2?s.runBackwards=1:s.startAt=t[r-1]}return new H(t[0],s,t[r+1])},De=function(e,t){return e||e===0?t(e):t},pt=function(e,t,i){return i<e?e:i>t?t:i},q=function(e,t){return!K(e)||!(t=Xr.exec(e))?"":t[1]},ls=function(e,t,i){return De(i,function(n){return pt(e,t,n)})},pi=[].slice,yn=function(e,t){return e&&_e(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&_e(e[0]))&&!e.nodeType&&e!==ye},hs=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(n){var r;return K(n)&&!t||yn(n,1)?(r=i).push.apply(r,me(n)):i.push(n)})||i},me=function(e,t,i){return z&&!t&&z.selector?z.selector(e):K(e)&&!i&&(ii||!nt())?pi.call((t||ni).querySelectorAll(e),0):X(e)?hs(e,i):yn(e)?pi.call(e,0):e?[e]:[]},fi=function(e){return e=me(e)[0]||ht("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return me(t,i.querySelectorAll?i:i===e?ht("Invalid scope")||ni.createElement("div"):e)}},xn=function(e){return e.sort(function(){return .5-Math.random()})},bn=function(e){if(V(e))return e;var t=_e(e)?e:{each:e},i=ze(t.ease),n=t.from||0,r=parseFloat(t.base)||0,s={},o=n>0&&n<1,l=isNaN(n)||o,c=t.axis,h=n,u=n;return K(n)?h=u={center:.5,edges:.5,end:1}[n]||0:!o&&l&&(h=n[0],u=n[1]),function(p,m,f){var d=(f||t).length,g=s[d],_,y,x,v,b,C,E,P,w;if(!g){if(w=t.grid==="auto"?0:(t.grid||[1,pe])[1],!w){for(E=-pe;E<(E=f[w++].getBoundingClientRect().left)&&w<d;);w<d&&w--}for(g=s[d]=[],_=l?Math.min(w,d)*h-.5:n%w,y=w===pe?0:l?d*u/w-.5:n/w|0,E=0,P=pe,C=0;C<d;C++)x=C%w-_,v=y-(C/w|0),g[C]=b=c?Math.abs(c==="y"?v:x):Xi(x*x+v*v),b>E&&(E=b),b<P&&(P=b);n==="random"&&xn(g),g.max=E-P,g.min=P,g.v=d=(parseFloat(t.amount)||parseFloat(t.each)*(w>d?d-1:c?c==="y"?d/w:w:Math.max(w,d/w))||0)*(n==="edges"?-1:1),g.b=d<0?r-d:r,g.u=q(t.amount||t.each)||0,i=i&&d<0?Rn(i):i}return d=(g[p]-g.min)/g.max||0,Y(g.b+(i?i(d):d)*g.v)+g.u}},mi=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var n=Y(Math.round(parseFloat(i)/e)*e*t);return(n-n%1)/t+(we(i)?0:q(i))}},vn=function(e,t){var i=X(e),n,r;return!i&&_e(e)&&(n=i=e.radius||pe,e.values?(e=me(e.values),(r=!we(e[0]))&&(n*=n)):e=mi(e.increment)),De(t,i?V(e)?function(s){return r=e(s),Math.abs(r-s)<=n?r:s}:function(s){for(var o=parseFloat(r?s.x:s),l=parseFloat(r?s.y:0),c=pe,h=0,u=e.length,p,m;u--;)r?(p=e[u].x-o,m=e[u].y-l,p=p*p+m*m):p=Math.abs(e[u]-o),p<c&&(c=p,h=u);return h=!n||c<=n?e[h]:s,r||h===s||we(s)?h:h+q(s)}:mi(e))},En=function(e,t,i,n){return De(X(e)?!t:i===!0?!!(i=0):!n,function(){return X(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*n)/n})},cs=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(n){return t.reduce(function(r,s){return s(r)},n)}},us=function(e,t){return function(i){return e(parseFloat(i))+(t||q(i))}},ds=function(e,t,i){return Cn(e,t,0,1,i)},wn=function(e,t,i){return De(i,function(n){return e[~~t(n)]})},ps=function a(e,t,i){var n=t-e;return X(e)?wn(e,a(0,e.length),t):De(i,function(r){return(n+(r-e)%n)%n+e})},fs=function a(e,t,i){var n=t-e,r=n*2;return X(e)?wn(e,a(0,e.length-1),t):De(i,function(s){return s=(r+(s-e)%r)%r||0,e+(s>n?r-s:s)})},ft=function(e){for(var t=0,i="",n,r,s,o;~(n=e.indexOf("random(",t));)s=e.indexOf(")",n),o=e.charAt(n+7)==="[",r=e.substr(n+7,s-n-7).match(o?en:ei),i+=e.substr(t,n-t)+En(o?r:+r[0],o?0:+r[1],+r[2]||1e-5),t=s+1;return i+e.substr(t,e.length-t)},Cn=function(e,t,i,n,r){var s=t-e,o=n-i;return De(r,function(l){return i+((l-e)/s*o||0)})},ms=function a(e,t,i,n){var r=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!r){var s=K(e),o={},l,c,h,u,p;if(i===!0&&(n=1)&&(i=null),s)e={p:e},t={p:t};else if(X(e)&&!X(t)){for(h=[],u=e.length,p=u-2,c=1;c<u;c++)h.push(a(e[c-1],e[c]));u--,r=function(f){f*=u;var d=Math.min(p,~~f);return h[d](f-d)},i=t}else n||(e=Je(X(e)?[]:{},e));if(!h){for(l in t)xi.call(o,e,l,"get",t[l]);r=function(f){return Ci(f,o)||(s?e.p:e)}}}return De(i,r)},Pn=function(e,t,i){var n=e.labels,r=pe,s,o,l;for(s in n)o=n[s]-t,o<0==!!i&&o&&r>(o=Math.abs(o))&&(l=s,r=o);return l},ue=function(e,t,i){var n=e.vars,r=n[t],s=z,o=e._ctx,l,c,h;if(r)return l=n[t+"Params"],c=n.callbackScope||e,i&&Se.length&&It(),o&&(z=o),h=l?r.apply(c,l):r.call(c),z=s,h},mt=function(e){return Te(e),e.scrollTrigger&&e.scrollTrigger.kill(!!W),e.progress()<1&&ue(e,"onInterrupt"),e},it,An=[],Sn=function(e){if(e)if(e=!e.name&&e.default||e,Jt()||e.headless){var t=e.name,i=V(e),n=t&&!i&&e.init?function(){this._props=[]}:e,r={init:ct,render:Ci,add:xi,kill:Os,modifier:Ms,rawVars:0},s={targetTest:0,get:0,getSetter:wi,aliases:{},register:0};if(nt(),e!==n){if(he[t])return;ce(n,ce(Lt(e,r),s)),Je(n.prototype,Je(r,Lt(e,s))),he[n.prop=t]=n,e.targetTest&&(Rt.push(n),si[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}rn(t,n),e.register&&e.register(ne,n,ie)}else An.push(e)},U=255,gt={aqua:[0,U,U],lime:[0,U,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,U],navy:[0,0,128],white:[U,U,U],olive:[128,128,0],yellow:[U,U,0],orange:[U,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[U,0,0],pink:[U,192,203],cyan:[0,U,U],transparent:[U,U,U,0]},gi=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*U+.5|0},Tn=function(e,t,i){var n=e?we(e)?[e>>16,e>>8&U,e&U]:0:gt.black,r,s,o,l,c,h,u,p,m,f;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),gt[e])n=gt[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),s=e.charAt(2),o=e.charAt(3),e="#"+r+r+s+s+o+o+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&U,n&U,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&U,e&U]}else if(e.substr(0,3)==="hsl"){if(n=f=e.match(ei),!t)l=+n[0]%360/360,c=+n[1]/100,h=+n[2]/100,s=h<=.5?h*(c+1):h+c-h*c,r=h*2-s,n.length>3&&(n[3]*=1),n[0]=gi(l+1/3,r,s),n[1]=gi(l,r,s),n[2]=gi(l-1/3,r,s);else if(~e.indexOf("="))return n=e.match(Qi),i&&n.length<4&&(n[3]=1),n}else n=e.match(ei)||gt.transparent;n=n.map(Number)}return t&&!f&&(r=n[0]/U,s=n[1]/U,o=n[2]/U,u=Math.max(r,s,o),p=Math.min(r,s,o),h=(u+p)/2,u===p?l=c=0:(m=u-p,c=h>.5?m/(2-u-p):m/(u+p),l=u===r?(s-o)/m+(s<o?6:0):u===s?(o-r)/m+2:(r-s)/m+4,l*=60),n[0]=~~(l+.5),n[1]=~~(c*100+.5),n[2]=~~(h*100+.5)),i&&n.length<4&&(n[3]=1),n},Dn=function(e){var t=[],i=[],n=-1;return e.split(Me).forEach(function(r){var s=r.match(qe)||[];t.push.apply(t,s),i.push(n+=s.length+1)}),t.c=i,t},Mn=function(e,t,i){var n="",r=(e+n).match(Me),s=t?"hsla(":"rgba(",o=0,l,c,h,u;if(!r)return e;if(r=r.map(function(p){return(p=Tn(p,t,1))&&s+(t?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),i&&(h=Dn(e),l=i.c,l.join(n)!==h.c.join(n)))for(c=e.replace(Me,"1").split(qe),u=c.length-1;o<u;o++)n+=c[o]+(~l.indexOf(o)?r.shift()||s+"0,0,0,0)":(h.length?h:r.length?r:i).shift());if(!c)for(c=e.split(Me),u=c.length-1;o<u;o++)n+=c[o]+r[o];return n+c[u]},Me=(function(){var a="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in gt)a+="|"+e+"\\b";return new RegExp(a+")","gi")})(),gs=/hsl[a]?\(/,On=function(e){var t=e.join(" "),i;if(Me.lastIndex=0,Me.test(t))return i=gs.test(t),e[1]=Mn(e[1],i),e[0]=Mn(e[0],i,Dn(e[1])),!0},_t,de=(function(){var a=Date.now,e=500,t=33,i=a(),n=i,r=1e3/240,s=r,o=[],l,c,h,u,p,m,f=function d(g){var _=a()-n,y=g===!0,x,v,b,C;if((_>e||_<0)&&(i+=_-t),n+=_,b=n-i,x=b-s,(x>0||y)&&(C=++u.frame,p=b-u.time*1e3,u.time=b=b/1e3,s+=x+(x>=r?4:r-x),v=1),y||(l=c(d)),v)for(m=0;m<o.length;m++)o[m](b,p,C,g)};return u={time:0,frame:0,tick:function(){f(!0)},deltaRatio:function(g){return p/(1e3/(g||60))},wake:function(){tn&&(!ii&&Jt()&&(ye=ii=window,ni=ye.document||{},le.gsap=ne,(ye.gsapVersions||(ye.gsapVersions=[])).push(ne.version),nn(Mt||ye.GreenSockGlobals||!ye.gsap&&ye||{}),An.forEach(Sn)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&u.sleep(),c=h||function(g){return setTimeout(g,s-u.time*1e3+1|0)},_t=1,f(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),_t=0,c=ct},lagSmoothing:function(g,_){e=g||1/0,t=Math.min(_||33,e)},fps:function(g){r=1e3/(g||240),s=u.time*1e3+r},add:function(g,_,y){var x=_?function(v,b,C,E){g(v,b,C,E),u.remove(x)}:g;return u.remove(g),o[y?"unshift":"push"](x),nt(),x},remove:function(g,_){~(_=o.indexOf(g))&&o.splice(_,1)&&m>=_&&m--},_listeners:o},u})(),nt=function(){return!_t&&de.wake()},M={},_s=/^[\d.\-M][\d.\-,\s]/,ys=/["']/g,xs=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),n=i[0],r=1,s=i.length,o,l,c;r<s;r++)l=i[r],o=r!==s-1?l.lastIndexOf(","):l.length,c=l.substr(0,o),t[n]=isNaN(c)?c.replace(ys,"").trim():+c,n=l.substr(o+1).trim();return t},bs=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<i?e.indexOf(")",i+1):i)},vs=function(e){var t=(e+"").split("("),i=M[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[xs(t[1])]:bs(e).split(",").map(hn)):M._CE&&_s.test(e)?M._CE("",e):i},Rn=function(e){return function(t){return 1-e(1-t)}},In=function a(e,t){for(var i=e._first,n;i;)i instanceof Q?a(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?a(i.timeline,t):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=t)),i=i._next},ze=function(e,t){return e&&(V(e)?e:M[e]||vs(e))||t},Ne=function(e,t,i,n){i===void 0&&(i=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var r={easeIn:t,easeOut:i,easeInOut:n},s;return te(e,function(o){M[o]=le[o]=r,M[s=o.toLowerCase()]=i;for(var l in r)M[s+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=M[o+"."+l]=r[l]}),r},Ln=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},_i=function a(e,t,i){var n=t>=1?t:1,r=(i||(e?.3:.45))/(t<1?t:1),s=r/qt*(Math.asin(1/n)||0),o=function(h){return h===1?1:n*Math.pow(2,-10*h)*Wr((h-s)*r)+1},l=e==="out"?o:e==="in"?function(c){return 1-o(1-c)}:Ln(o);return r=qt/r,l.config=function(c,h){return a(e,c,h)},l},yi=function a(e,t){t===void 0&&(t=1.70158);var i=function(s){return s?--s*s*((t+1)*s+t)+1:0},n=e==="out"?i:e==="in"?function(r){return 1-i(1-r)}:Ln(i);return n.config=function(r){return a(e,r)},n};te("Linear,Quad,Cubic,Quart,Quint,Strong",function(a,e){var t=e<5?e+1:e;Ne(a+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})}),M.Linear.easeNone=M.none=M.Linear.easeIn,Ne("Elastic",_i("in"),_i("out"),_i()),(function(a,e){var t=1/e,i=2*t,n=2.5*t,r=function(o){return o<t?a*o*o:o<i?a*Math.pow(o-1.5/e,2)+.75:o<n?a*(o-=2.25/e)*o+.9375:a*Math.pow(o-2.625/e,2)+.984375};Ne("Bounce",function(s){return 1-r(1-s)},r)})(7.5625,2.75),Ne("Expo",function(a){return Math.pow(2,10*(a-1))*a+a*a*a*a*a*a*(1-a)}),Ne("Circ",function(a){return-(Xi(1-a*a)-1)}),Ne("Sine",function(a){return a===1?1:-Kr(a*Hr)+1}),Ne("Back",yi("in"),yi("out"),yi()),M.SteppedEase=M.steps=le.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,n=e+(t?0:1),r=t?1:0,s=1-k;return function(o){return((n*pt(0,s,o)|0)+r)*i}}},Xe.ease=M["quad.out"],te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(a){return li+=a+","+a+"Params,"});var kn=function(e,t){this.id=Zr++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:on,this.set=t?t.getSetter:wi},yt=(function(){function a(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,tt(this,+t.duration,1,1),this.data=t.data,z&&(this._ctx=z,z.data.push(this)),_t||de.wake()}var e=a.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,tt(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,n){if(nt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(zt(this,i),!r._dp||r.parent||fn(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&xe(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===k||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),ln(this,i,n)),this},e.time=function(i,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+pn(this))%(this._dur+this._rDelay)||(i?this._dur:0),n):this._time},e.totalProgress=function(i,n){return arguments.length?this.totalTime(this.totalDuration()*i,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+pn(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,n){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,n):this._repeat?et(this._tTime,r)+1:1},e.timeScale=function(i,n){if(!arguments.length)return this._rts===-k?0:this._rts;if(this._rts===i)return this;var r=this.parent&&this._ts?Ut(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-k?0:this._rts,this.totalTime(pt(-Math.abs(this._delay),this.totalDuration(),r),n!==!1),Ft(this),is(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(nt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==k&&(this._tTime-=k)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&xe(n,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(ee(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var n=this.parent||this._dp;return n?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ut(n.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=Qr);var n=W;return W=i,ci(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),W=n,this},e.globalTime=function(i){for(var n=this,r=arguments.length?i:n.rawTime();n;)r=n._start+r/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(i):r},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,_n(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var n=this._time;return this._rDelay=i,_n(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,n){return this.totalTime(fe(this,i),ee(n))},e.restart=function(i,n){return this.play().totalTime(i?-this._delay:0,ee(n)),this._dur||(this._zTime=-k),this},e.play=function(i,n){return i!=null&&this.seek(i,n),this.reversed(!1).paused(!1)},e.reverse=function(i,n){return i!=null&&this.seek(i||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(i,n){return i!=null&&this.seek(i,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-k:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-k,this},e.isActive=function(){var i=this.parent||this._dp,n=this._start,r;return!!(!i||this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=n&&r<this.endTime(!0)-k)},e.eventCallback=function(i,n,r){var s=this.vars;return arguments.length>1?(n?(s[i]=n,r&&(s[i+"Params"]=r),i==="onUpdate"&&(this._onUpdate=n)):delete s[i],this):s[i]},e.then=function(i){var n=this;return new Promise(function(r){var s=V(i)?i:cn,o=function(){var c=n.then;n.then=null,V(s)&&(s=s(n))&&(s.then||s===n)&&(n.then=c),r(s),n.then=c};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?o():n._prom=o})},e.kill=function(){mt(this)},a})();ce(yt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-k,_prom:0,_ps:!1,_rts:1});var Q=(function(a){Wi(e,a);function e(i,n){var r;return i===void 0&&(i={}),r=a.call(this,i)||this,r.labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=ee(i.sortChildren),$&&xe(i.parent||$,Ee(r),n),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&mn(Ee(r),i.scrollTrigger),r}var t=e.prototype;return t.to=function(n,r,s){return dt(0,arguments,this),this},t.from=function(n,r,s){return dt(1,arguments,this),this},t.fromTo=function(n,r,s,o){return dt(2,arguments,this),this},t.set=function(n,r,s){return r.duration=0,r.parent=this,ut(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new H(n,r,fe(this,s),1),this},t.call=function(n,r,s){return xe(this,H.delayedCall(0,n,r),s)},t.staggerTo=function(n,r,s,o,l,c,h){return s.duration=r,s.stagger=s.stagger||o,s.onComplete=c,s.onCompleteParams=h,s.parent=this,new H(n,s,fe(this,l)),this},t.staggerFrom=function(n,r,s,o,l,c,h){return s.runBackwards=1,ut(s).immediateRender=ee(s.immediateRender),this.staggerTo(n,r,s,o,l,c,h)},t.staggerFromTo=function(n,r,s,o,l,c,h,u){return o.startAt=s,ut(o).immediateRender=ee(o.immediateRender),this.staggerTo(n,r,o,l,c,h,u)},t.render=function(n,r,s){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=n<=0?0:Y(n),u=this._zTime<0!=n<0&&(this._initted||!c),p,m,f,d,g,_,y,x,v,b,C,E;if(this!==$&&h>l&&n>=0&&(h=l),h!==this._tTime||s||u){if(o!==this._time&&c&&(h+=this._time-o,n+=this._time-o),p=h,v=this._start,x=this._ts,_=!x,u&&(c||(o=this._zTime),(n||!r)&&(this._zTime=n)),this._repeat){if(C=this._yoyo,g=c+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(g*100+n,r,s);if(p=Y(h%g),h===l?(d=this._repeat,p=c):(b=Y(h/g),d=~~b,d&&d===b&&(p=c,d--),p>c&&(p=c)),b=et(this._tTime,g),!o&&this._tTime&&b!==d&&this._tTime-b*g-this._dur<=0&&(b=d),C&&d&1&&(p=c-p,E=1),d!==b&&!this._lock){var P=C&&b&1,w=P===(C&&d&1);if(d<b&&(P=!P),o=P?0:h%c?c:h,this._lock=1,this.render(o||(E?0:Y(d*g)),r,!c)._lock=0,this._tTime=h,!r&&this.parent&&ue(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1),o&&o!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,w&&(this._lock=2,o=P?c:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;In(this,E)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(y=as(this,Y(o),Y(p)),y&&(h-=p-(p=y._start))),this._tTime=h,this._time=p,this._act=!x,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,o=0),!o&&h&&!r&&!b&&(ue(this,"onStart"),this._tTime!==h))return this;if(p>=o&&n>=0)for(m=this._first;m;){if(f=m._next,(m._act||p>=m._start)&&m._ts&&y!==m){if(m.parent!==this)return this.render(n,r,s);if(m.render(m._ts>0?(p-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(p-m._start)*m._ts,r,s),p!==this._time||!this._ts&&!_){y=0,f&&(h+=this._zTime=-k);break}}m=f}else{m=this._last;for(var T=n<0?n:p;m;){if(f=m._prev,(m._act||T<=m._end)&&m._ts&&y!==m){if(m.parent!==this)return this.render(n,r,s);if(m.render(m._ts>0?(T-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(T-m._start)*m._ts,r,s||W&&ci(m)),p!==this._time||!this._ts&&!_){y=0,f&&(h+=this._zTime=T?-k:k);break}}m=f}}if(y&&!r&&(this.pause(),y.render(p>=o?0:-k)._zTime=p>=o?1:-1,this._ts))return this._start=v,Ft(this),this.render(n,r,s);this._onUpdate&&!r&&ue(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&o)&&(v===this._start||Math.abs(x)!==Math.abs(this._ts))&&(this._lock||((n||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&Te(this,1),!r&&!(n<0&&!o)&&(h||o||!l)&&(ue(this,h===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,r){var s=this;if(we(r)||(r=fe(this,r,n)),!(n instanceof yt)){if(X(n))return n.forEach(function(o){return s.add(o,r)}),this;if(K(n))return this.addLabel(n,r);if(V(n))n=H.delayedCall(0,n);else return this}return this!==n?xe(this,n,r):this},t.getChildren=function(n,r,s,o){n===void 0&&(n=!0),r===void 0&&(r=!0),s===void 0&&(s=!0),o===void 0&&(o=-pe);for(var l=[],c=this._first;c;)c._start>=o&&(c instanceof H?r&&l.push(c):(s&&l.push(c),n&&l.push.apply(l,c.getChildren(!0,r,s)))),c=c._next;return l},t.getById=function(n){for(var r=this.getChildren(1,1,1),s=r.length;s--;)if(r[s].vars.id===n)return r[s]},t.remove=function(n){return K(n)?this.removeLabel(n):V(n)?this.killTweensOf(n):(n.parent===this&&kt(this,n),n===this._recent&&(this._recent=this._last),Fe(this))},t.totalTime=function(n,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Y(de.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),a.prototype.totalTime.call(this,n,r),this._forcing=0,this):this._tTime},t.addLabel=function(n,r){return this.labels[n]=fe(this,r),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,r,s){var o=H.delayedCall(0,r||ct,s);return o.data="isPause",this._hasPause=1,xe(this,o,fe(this,n))},t.removePause=function(n){var r=this._first;for(n=fe(this,n);r;)r._start===n&&r.data==="isPause"&&Te(r),r=r._next},t.killTweensOf=function(n,r,s){for(var o=this.getTweensOf(n,s),l=o.length;l--;)Oe!==o[l]&&o[l].kill(n,r);return this},t.getTweensOf=function(n,r){for(var s=[],o=me(n),l=this._first,c=we(r),h;l;)l instanceof H?Jr(l._targets,o)&&(c?(!Oe||l._initted&&l._ts)&&l.globalTime(0)<=r&&l.globalTime(l.totalDuration())>r:!r||l.isActive())&&s.push(l):(h=l.getTweensOf(o,r)).length&&s.push.apply(s,h),l=l._next;return s},t.tweenTo=function(n,r){r=r||{};var s=this,o=fe(s,n),l=r,c=l.startAt,h=l.onStart,u=l.onStartParams,p=l.immediateRender,m,f=H.to(s,ce({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:r.duration||Math.abs((o-(c&&"time"in c?c.time:s._time))/s.timeScale())||k,onStart:function(){if(s.pause(),!m){var g=r.duration||Math.abs((o-(c&&"time"in c?c.time:s._time))/s.timeScale());f._dur!==g&&tt(f,g,0,1).render(f._time,!0,!0),m=1}h&&h.apply(f,u||[])}},r));return p?f.render(0):f},t.tweenFromTo=function(n,r,s){return this.tweenTo(r,ce({startAt:{time:fe(this,n)}},s))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Pn(this,fe(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Pn(this,fe(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+k)},t.shiftChildren=function(n,r,s){s===void 0&&(s=0);for(var o=this._first,l=this.labels,c;o;)o._start>=s&&(o._start+=n,o._end+=n),o=o._next;if(r)for(c in l)l[c]>=s&&(l[c]+=n);return Fe(this)},t.invalidate=function(n){var r=this._first;for(this._lock=0;r;)r.invalidate(n),r=r._next;return a.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var r=this._first,s;r;)s=r._next,this.remove(r),r=s;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),Fe(this)},t.totalDuration=function(n){var r=0,s=this,o=s._last,l=pe,c,h,u;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-n:n));if(s._dirty){for(u=s.parent;o;)c=o._prev,o._dirty&&o.totalDuration(),h=o._start,h>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,xe(s,o,h-o._delay,1)._lock=0):l=h,h<0&&o._ts&&(r-=h,(!u&&!s._dp||u&&u.smoothChildTiming)&&(s._start+=h/s._ts,s._time-=h,s._tTime-=h),s.shiftChildren(-h,!1,-1/0),l=0),o._end>r&&o._ts&&(r=o._end),o=c;tt(s,s===$&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(n){if($._ts&&(ln($,Ut(n,$)),sn=de.frame),de.frame>=an){an+=oe.autoSleep||120;var r=$._first;if((!r||!r._ts)&&oe.autoSleep&&de._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||de.sleep()}}},e})(yt);ce(Q.prototype,{_lock:0,_hasPause:0,_forcing:0});var Es=function(e,t,i,n,r,s,o){var l=new ie(this._pt,e,t,0,1,Bn,null,r),c=0,h=0,u,p,m,f,d,g,_,y;for(l.b=i,l.e=n,i+="",n+="",(_=~n.indexOf("random("))&&(n=ft(n)),s&&(y=[i,n],s(y,e,t),i=y[0],n=y[1]),p=i.match(ti)||[];u=ti.exec(n);)f=u[0],d=n.substring(c,u.index),m?m=(m+1)%5:d.substr(-5)==="rgba("&&(m=1),f!==p[h++]&&(g=parseFloat(p[h-1])||0,l._pt={_next:l._pt,p:d||h===1?d:",",s:g,c:f.charAt(1)==="="?Qe(g,f)-g:parseFloat(f)-g,m:m&&m<4?Math.round:0},c=ti.lastIndex);return l.c=c<n.length?n.substring(c,n.length):"",l.fp=o,(Ji.test(n)||_)&&(l.e=0),this._pt=l,l},xi=function(e,t,i,n,r,s,o,l,c,h){V(n)&&(n=n(r||0,e,s));var u=e[t],p=i!=="get"?i:V(u)?c?e[t.indexOf("set")||!V(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():u,m=V(u)?c?Ss:Nn:Ei,f;if(K(n)&&(~n.indexOf("random(")&&(n=ft(n)),n.charAt(1)==="="&&(f=Qe(p,n)+(q(p)||0),(f||f===0)&&(n=f))),!h||p!==n||bi)return!isNaN(p*n)&&n!==""?(f=new ie(this._pt,e,t,+p||0,n-(p||0),typeof u=="boolean"?Ds:$n,0,m),c&&(f.fp=c),o&&f.modifier(o,this,e),this._pt=f):(!u&&!(t in e)&&ri(t,n),Es.call(this,e,t,p,n,m,l||oe.stringFilter,c))},ws=function(e,t,i,n,r){if(V(e)&&(e=xt(e,r,t,i,n)),!_e(e)||e.style&&e.nodeType||X(e)||qi(e))return K(e)?xt(e,r,t,i,n):e;var s={},o;for(o in e)s[o]=xt(e[o],r,t,i,n);return s},Un=function(e,t,i,n,r,s){var o,l,c,h;if(he[e]&&(o=new he[e]).init(r,o.rawVars?t[e]:ws(t[e],n,r,s,i),i,n,s)!==!1&&(i._pt=l=new ie(i._pt,r,e,0,1,o.render,o,0,o.priority),i!==it))for(c=i._ptLookup[i._targets.indexOf(r)],h=o._props.length;h--;)c[o._props[h]]=l;return o},Oe,bi,vi=function a(e,t,i){var n=e.vars,r=n.ease,s=n.startAt,o=n.immediateRender,l=n.lazy,c=n.onUpdate,h=n.runBackwards,u=n.yoyoEase,p=n.keyframes,m=n.autoRevert,f=e._dur,d=e._startAt,g=e._targets,_=e.parent,y=_&&_.data==="nested"?_.vars.targets:g,x=e._overwrite==="auto"&&!Xt,v=e.timeline,b,C,E,P,w,T,O,S,R,I,G,N,F;if(v&&(!p||!r)&&(r="none"),e._ease=ze(r,Xe.ease),e._yEase=u?Rn(ze(u===!0?r:u,Xe.ease)):0,u&&e._yoyo&&!e._repeat&&(u=e._yEase,e._yEase=e._ease,e._ease=u),e._from=!v&&!!n.runBackwards,!v||p&&!n.stagger){if(S=g[0]?Ue(g[0]).harness:0,N=S&&n[S.prop],b=Lt(n,si),d&&(d._zTime<0&&d.progress(1),t<0&&h&&o&&!m?d.render(-1,!0):d.revert(h&&f?Ot:qr),d._lazy=0),s){if(Te(e._startAt=H.set(g,ce({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!d&&ee(l),startAt:null,delay:0,onUpdate:c&&function(){return ue(e,"onUpdate")},stagger:0},s))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(W||!o&&!m)&&e._startAt.revert(Ot),o&&f&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(h&&f&&!d){if(t&&(o=!1),E=ce({overwrite:!1,data:"isFromStart",lazy:o&&!d&&ee(l),immediateRender:o,stagger:0,parent:_},b),N&&(E[S.prop]=N),Te(e._startAt=H.set(g,E)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(W?e._startAt.revert(Ot):e._startAt.render(-1,!0)),e._zTime=t,!o)a(e._startAt,k,k);else if(!t)return}for(e._pt=e._ptCache=0,l=f&&ee(l)||l&&!f,C=0;C<g.length;C++){if(w=g[C],O=w._gsap||hi(g)[C]._gsap,e._ptLookup[C]=I={},ai[O.id]&&Se.length&&It(),G=y===g?C:y.indexOf(w),S&&(R=new S).init(w,N||b,e,G,y)!==!1&&(e._pt=P=new ie(e._pt,w,R.name,0,1,R.render,R,0,R.priority),R._props.forEach(function(se){I[se]=P}),R.priority&&(T=1)),!S||N)for(E in b)he[E]&&(R=Un(E,b,e,G,w,y))?R.priority&&(T=1):I[E]=P=xi.call(e,w,E,"get",b[E],G,y,0,n.stringFilter);e._op&&e._op[C]&&e.kill(w,e._op[C]),x&&e._pt&&(Oe=e,$.killTweensOf(w,I,e.globalTime(t)),F=!e.parent,Oe=0),e._pt&&l&&(ai[O.id]=1)}T&&Vn(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!F,p&&t<=0&&v.render(pe,!0,!0)},Cs=function(e,t,i,n,r,s,o,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],h,u,p,m;if(!c)for(c=e._ptCache[t]=[],p=e._ptLookup,m=e._targets.length;m--;){if(h=p[m][t],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==t&&h.fp!==t;)h=h._next;if(!h)return bi=1,e.vars[t]="+=0",vi(e,o),bi=0,l?ht(t+" not eligible for reset"):1;c.push(h)}for(m=c.length;m--;)u=c[m],h=u._pt||u,h.s=(n||n===0)&&!r?n:h.s+(n||0)+s*h.c,h.c=i-h.s,u.e&&(u.e=j(i)+q(u.e)),u.b&&(u.b=h.s+q(u.b))},Ps=function(e,t){var i=e[0]?Ue(e[0]).harness:0,n=i&&i.aliases,r,s,o,l;if(!n)return t;r=Je({},t);for(s in n)if(s in r)for(l=n[s].split(","),o=l.length;o--;)r[l[o]]=r[s];return r},As=function(e,t,i,n){var r=t.ease||n||"power1.inOut",s,o;if(X(t))o=i[e]||(i[e]=[]),t.forEach(function(l,c){return o.push({t:c/(t.length-1)*100,v:l,e:r})});else for(s in t)o=i[s]||(i[s]=[]),s==="ease"||o.push({t:parseFloat(e),v:t[s],e:r})},xt=function(e,t,i,n,r){return V(e)?e.call(t,i,n,r):K(e)&&~e.indexOf("random(")?ft(e):e},Fn=li+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",zn={};te(Fn+",id,stagger,delay,duration,paused,scrollTrigger",function(a){return zn[a]=1});var H=(function(a){Wi(e,a);function e(i,n,r,s){var o;typeof n=="number"&&(r.duration=n,n=r,r=null),o=a.call(this,s?n:ut(n))||this;var l=o.vars,c=l.duration,h=l.delay,u=l.immediateRender,p=l.stagger,m=l.overwrite,f=l.keyframes,d=l.defaults,g=l.scrollTrigger,_=l.yoyoEase,y=n.parent||$,x=(X(i)||qi(i)?we(i[0]):"length"in n)?[i]:me(i),v,b,C,E,P,w,T,O;if(o._targets=x.length?hi(x):ht("GSAP target "+i+" not found. https://gsap.com",!oe.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=m,f||p||Dt(c)||Dt(h)){if(n=o.vars,v=o.timeline=new Q({data:"nested",defaults:d||{},targets:y&&y.data==="nested"?y.vars.targets:x}),v.kill(),v.parent=v._dp=Ee(o),v._start=0,p||Dt(c)||Dt(h)){if(E=x.length,T=p&&bn(p),_e(p))for(P in p)~Fn.indexOf(P)&&(O||(O={}),O[P]=p[P]);for(b=0;b<E;b++)C=Lt(n,zn),C.stagger=0,_&&(C.yoyoEase=_),O&&Je(C,O),w=x[b],C.duration=+xt(c,Ee(o),b,w,x),C.delay=(+xt(h,Ee(o),b,w,x)||0)-o._delay,!p&&E===1&&C.delay&&(o._delay=h=C.delay,o._start+=h,C.delay=0),v.to(w,C,T?T(b,w,x):0),v._ease=M.none;v.duration()?c=h=0:o.timeline=0}else if(f){ut(ce(v.vars.defaults,{ease:"none"})),v._ease=ze(f.ease||n.ease||"none");var S=0,R,I,G;if(X(f))f.forEach(function(N){return v.to(x,N,">")}),v.duration();else{C={};for(P in f)P==="ease"||P==="easeEach"||As(P,f[P],C,f.easeEach);for(P in C)for(R=C[P].sort(function(N,F){return N.t-F.t}),S=0,b=0;b<R.length;b++)I=R[b],G={ease:I.e,duration:(I.t-(b?R[b-1].t:0))/100*c},G[P]=I.v,v.to(x,G,S),S+=G.duration;v.duration()<c&&v.to({},{duration:c-v.duration()})}}c||o.duration(c=v.duration())}else o.timeline=0;return m===!0&&!Xt&&(Oe=Ee(o),$.killTweensOf(x),Oe=0),xe(y,Ee(o),r),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(u||!c&&!f&&o._start===Y(y._time)&&ee(u)&&ns(Ee(o))&&y.data!=="nested")&&(o._tTime=-k,o.render(Math.max(0,-h)||0)),g&&mn(Ee(o),g),o}var t=e.prototype;return t.render=function(n,r,s){var o=this._time,l=this._tDur,c=this._dur,h=n<0,u=n>l-k&&!h?l:n<k?0:n,p,m,f,d,g,_,y,x,v;if(!c)ss(this,n,r,s);else if(u!==this._tTime||!n||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(p=u,x=this.timeline,this._repeat){if(d=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(d*100+n,r,s);if(p=Y(u%d),u===l?(f=this._repeat,p=c):(g=Y(u/d),f=~~g,f&&f===g?(p=c,f--):p>c&&(p=c)),_=this._yoyo&&f&1,_&&(v=this._yEase,p=c-p),g=et(this._tTime,d),p===o&&!s&&this._initted&&f===g)return this._tTime=u,this;f!==g&&(x&&this._yEase&&In(x,_),this.vars.repeatRefresh&&!_&&!this._lock&&p!==d&&this._initted&&(this._lock=s=1,this.render(Y(d*f),!0).invalidate()._lock=0))}if(!this._initted){if(gn(this,h?n:p,s,r,u))return this._tTime=0,this;if(o!==this._time&&!(s&&this.vars.repeatRefresh&&f!==g))return this;if(c!==this._dur)return this.render(n,r,s)}if(this._tTime=u,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=y=(v||this._ease)(p/c),this._from&&(this.ratio=y=1-y),!o&&u&&!r&&!g&&(ue(this,"onStart"),this._tTime!==u))return this;for(m=this._pt;m;)m.r(y,m.d),m=m._next;x&&x.render(n<0?n:x._dur*x._ease(p/this._dur),r,s)||this._startAt&&(this._zTime=n),this._onUpdate&&!r&&(h&&ui(this,n,r,s),ue(this,"onUpdate")),this._repeat&&f!==g&&this.vars.onRepeat&&!r&&this.parent&&ue(this,"onRepeat"),(u===this._tDur||!u)&&this._tTime===u&&(h&&!this._onUpdate&&ui(this,n,!0,!0),(n||!c)&&(u===this._tDur&&this._ts>0||!u&&this._ts<0)&&Te(this,1),!r&&!(h&&!o)&&(u||o||_)&&(ue(this,u===l?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),a.prototype.invalidate.call(this,n)},t.resetTo=function(n,r,s,o,l){_t||de.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||vi(this,c),h=this._ease(c/this._dur),Cs(this,n,r,s,o,h,c,l)?this.resetTo(n,r,s,o,1):(zt(this,0),this.parent||dn(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,r){if(r===void 0&&(r="all"),!n&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?mt(this):this.scrollTrigger&&this.scrollTrigger.kill(!!W),this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(n,r,Oe&&Oe.vars.overwrite!==!0)._first||mt(this),this.parent&&s!==this.timeline.totalDuration()&&tt(this,this._dur*this.timeline._tDur/s,0,1),this}var o=this._targets,l=n?me(n):o,c=this._ptLookup,h=this._pt,u,p,m,f,d,g,_;if((!r||r==="all")&&ts(o,l))return r==="all"&&(this._pt=0),mt(this);for(u=this._op=this._op||[],r!=="all"&&(K(r)&&(d={},te(r,function(y){return d[y]=1}),r=d),r=Ps(o,r)),_=o.length;_--;)if(~l.indexOf(o[_])){p=c[_],r==="all"?(u[_]=r,f=p,m={}):(m=u[_]=u[_]||{},f=r);for(d in f)g=p&&p[d],g&&((!("kill"in g.d)||g.d.kill(d)===!0)&&kt(this,g,"_pt"),delete p[d]),m!=="all"&&(m[d]=1)}return this._initted&&!this._pt&&h&&mt(this),this},e.to=function(n,r){return new e(n,r,arguments[2])},e.from=function(n,r){return dt(1,arguments)},e.delayedCall=function(n,r,s,o){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:r,onReverseComplete:r,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:o})},e.fromTo=function(n,r,s){return dt(2,arguments)},e.set=function(n,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(n,r)},e.killTweensOf=function(n,r,s){return $.killTweensOf(n,r,s)},e})(yt);ce(H.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),te("staggerTo,staggerFrom,staggerFromTo",function(a){H[a]=function(){var e=new Q,t=pi.call(arguments,0);return t.splice(a==="staggerFromTo"?5:4,0,0),e[a].apply(e,t)}});var Ei=function(e,t,i){return e[t]=i},Nn=function(e,t,i){return e[t](i)},Ss=function(e,t,i,n){return e[t](n.fp,i)},Ts=function(e,t,i){return e.setAttribute(t,i)},wi=function(e,t){return V(e[t])?Nn:Qt(e[t])&&e.setAttribute?Ts:Ei},$n=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},Ds=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Bn=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},Ci=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},Ms=function(e,t,i,n){for(var r=this._pt,s;r;)s=r._next,r.p===n&&r.modifier(e,t,i),r=s},Os=function(e){for(var t=this._pt,i,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?kt(this,t,"_pt"):t.dep||(i=1),t=n;return!i},Rs=function(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)},Vn=function(e){for(var t=e._pt,i,n,r,s;t;){for(i=t._next,n=r;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:s)?t._prev._next=t:r=t,(t._next=n)?n._prev=t:s=t,t=i}e._pt=r},ie=(function(){function a(t,i,n,r,s,o,l,c,h){this.t=i,this.s=r,this.c=s,this.p=n,this.r=o||$n,this.d=l||this,this.set=c||Ei,this.pr=h||0,this._next=t,t&&(t._prev=this)}var e=a.prototype;return e.modifier=function(i,n,r){this.mSet=this.mSet||this.set,this.set=Rs,this.m=i,this.mt=r,this.tween=n},a})();te(li+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(a){return si[a]=1}),le.TweenMax=le.TweenLite=H,le.TimelineLite=le.TimelineMax=Q,$=new Q({sortChildren:!1,defaults:Xe,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),oe.stringFilter=On;var $e=[],Nt={},Is=[],Gn=0,Ls=0,Pi=function(e){return(Nt[e]||Is).map(function(t){return t()})},Ai=function(){var e=Date.now(),t=[];e-Gn>2&&(Pi("matchMediaInit"),$e.forEach(function(i){var n=i.queries,r=i.conditions,s,o,l,c;for(o in n)s=ye.matchMedia(n[o]).matches,s&&(l=1),s!==r[o]&&(r[o]=s,c=1);c&&(i.revert(),l&&t.push(i))}),Pi("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(n){return i.add(null,n)})}),Gn=e,Pi("matchMedia"))},jn=(function(){function a(t,i){this.selector=i&&fi(i),this.data=[],this._r=[],this.isReverted=!1,this.id=Ls++,t&&this.add(t)}var e=a.prototype;return e.add=function(i,n,r){V(i)&&(r=n,n=i,i=V);var s=this,o=function(){var c=z,h=s.selector,u;return c&&c!==s&&c.data.push(s),r&&(s.selector=fi(r)),z=s,u=n.apply(s,arguments),V(u)&&s._r.push(u),z=c,s.selector=h,s.isReverted=!1,u};return s.last=o,i===V?o(s,function(l){return s.add(null,l)}):i?s[i]=o:o},e.ignore=function(i){var n=z;z=null,i(this),z=n},e.getTweens=function(){var i=[];return this.data.forEach(function(n){return n instanceof a?i.push.apply(i,n.getTweens()):n instanceof H&&!(n.parent&&n.parent.data==="nested")&&i.push(n)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,n){var r=this;if(i?(function(){for(var o=r.getTweens(),l=r.data.length,c;l--;)c=r.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(h){return o.splice(o.indexOf(h),1)}));for(o.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,u){return u.g-h.g||-1/0}).forEach(function(h){return h.t.revert(i)}),l=r.data.length;l--;)c=r.data[l],c instanceof Q?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof H)&&c.revert&&c.revert(i);r._r.forEach(function(h){return h(i,r)}),r.isReverted=!0})():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),n)for(var s=$e.length;s--;)$e[s].id===this.id&&$e.splice(s,1)},e.revert=function(i){this.kill(i||{})},a})(),ks=(function(){function a(t){this.contexts=[],this.scope=t,z&&z.data.push(this)}var e=a.prototype;return e.add=function(i,n,r){_e(i)||(i={matches:i});var s=new jn(0,r||this.scope),o=s.conditions={},l,c,h;z&&!s.selector&&(s.selector=z.selector),this.contexts.push(s),n=s.add("onMatch",n),s.queries=i;for(c in i)c==="all"?h=1:(l=ye.matchMedia(i[c]),l&&($e.indexOf(s)<0&&$e.push(s),(o[c]=l.matches)&&(h=1),l.addListener?l.addListener(Ai):l.addEventListener("change",Ai)));return h&&n(s,function(u){return s.add(null,u)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(n){return n.kill(i,!0)})},a})(),$t={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(n){return Sn(n)})},timeline:function(e){return new Q(e)},getTweensOf:function(e,t){return $.getTweensOf(e,t)},getProperty:function(e,t,i,n){K(e)&&(e=me(e)[0]);var r=Ue(e||{}).get,s=i?cn:hn;return i==="native"&&(i=""),e&&(t?s((he[t]&&he[t].get||r)(e,t,i,n)):function(o,l,c){return s((he[o]&&he[o].get||r)(e,o,l,c))})},quickSetter:function(e,t,i){if(e=me(e),e.length>1){var n=e.map(function(h){return ne.quickSetter(h,t,i)}),r=n.length;return function(h){for(var u=r;u--;)n[u](h)}}e=e[0]||{};var s=he[t],o=Ue(e),l=o.harness&&(o.harness.aliases||{})[t]||t,c=s?function(h){var u=new s;it._pt=0,u.init(e,i?h+i:h,it,0,[e]),u.render(1,u),it._pt&&Ci(1,it)}:o.set(e,l);return s?c:function(h){return c(e,l,i?h+i:h,o,1)}},quickTo:function(e,t,i){var n,r=ne.to(e,ce((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),i||{})),s=function(l,c,h){return r.resetTo(t,l,c,h)};return s.tween=r,s},isTweening:function(e){return $.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=ze(e.ease,Xe.ease)),un(Xe,e||{})},config:function(e){return un(oe,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,n=e.plugins,r=e.defaults,s=e.extendTimeline;(n||"").split(",").forEach(function(o){return o&&!he[o]&&!le[o]&&ht(t+" effect requires "+o+" plugin.")}),oi[t]=function(o,l,c){return i(me(o),ce(l||{},r),c)},s&&(Q.prototype[t]=function(o,l,c){return this.add(oi[t](o,_e(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){M[e]=ze(t)},parseEase:function(e,t){return arguments.length?ze(e,t):M},getById:function(e){return $.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Q(e),n,r;for(i.smoothChildTiming=ee(e.smoothChildTiming),$.remove(i),i._dp=0,i._time=i._tTime=$._time,n=$._first;n;)r=n._next,(t||!(!n._dur&&n instanceof H&&n.vars.onComplete===n._targets[0]))&&xe(i,n,n._start-n._delay),n=r;return xe($,i,0),i},context:function(e,t){return e?new jn(e,t):z},matchMedia:function(e){return new ks(e)},matchMediaRefresh:function(){return $e.forEach(function(e){var t=e.conditions,i,n;for(n in t)t[n]&&(t[n]=!1,i=1);i&&e.revert()})||Ai()},addEventListener:function(e,t){var i=Nt[e]||(Nt[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=Nt[e],n=i&&i.indexOf(t);n>=0&&i.splice(n,1)},utils:{wrap:ps,wrapYoyo:fs,distribute:bn,random:En,snap:vn,normalize:ds,getUnit:q,clamp:ls,splitColor:Tn,toArray:me,selector:fi,mapRange:Cn,pipe:cs,unitize:us,interpolate:ms,shuffle:xn},install:nn,effects:oi,ticker:de,updateRoot:Q.updateRoot,plugins:he,globalTimeline:$,core:{PropTween:ie,globals:rn,Tween:H,Timeline:Q,Animation:yt,getCache:Ue,_removeLinkedListItem:kt,reverting:function(){return W},context:function(e){return e&&z&&(z.data.push(e),e._ctx=z),z},suppressOverwrites:function(e){return Xt=e}}};te("to,from,fromTo,delayedCall,set,killTweensOf",function(a){return $t[a]=H[a]}),de.add(Q.updateRoot),it=$t.to({},{duration:0});var Us=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Fs=function(e,t){var i=e._targets,n,r,s;for(n in t)for(r=i.length;r--;)s=e._ptLookup[r][n],s&&(s=s.d)&&(s._pt&&(s=Us(s,n)),s&&s.modifier&&s.modifier(t[n],e,i[r],n))},Si=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,r,s){s._onInit=function(o){var l,c;if(K(r)&&(l={},te(r,function(h){return l[h]=1}),r=l),t){l={};for(c in r)l[c]=t(r[c]);r=l}Fs(o,r)}}}},ne=$t.registerPlugin({name:"attr",init:function(e,t,i,n,r){var s,o,l;this.tween=i;for(s in t)l=e.getAttribute(s)||"",o=this.add(e,"setAttribute",(l||0)+"",t[s],n,r,0,0,s),o.op=s,o.b=l,this._props.push(s)},render:function(e,t){for(var i=t._pt;i;)W?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},Si("roundProps",mi),Si("modifiers"),Si("snap",vn))||$t;H.version=Q.version=ne.version="3.13.0",tn=1,Jt()&&nt(),M.Power0,M.Power1,M.Power2,M.Power3,M.Power4,M.Linear,M.Quad,M.Cubic,M.Quart,M.Quint,M.Strong,M.Elastic,M.Back,M.SteppedEase,M.Bounce,M.Sine,M.Expo,M.Circ;var Yn,Re,rt,Ti,Be,Hn,Di,zs=function(){return typeof window<"u"},Ce={},Ve=180/Math.PI,st=Math.PI/180,at=Math.atan2,Zn=1e8,Mi=/([A-Z])/g,Ns=/(left|right|width|margin|padding|x)/i,$s=/[\s,\(]\S/,be={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Oi=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Bs=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Vs=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Gs=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},Kn=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Wn=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},js=function(e,t,i){return e.style[t]=i},Ys=function(e,t,i){return e.style.setProperty(t,i)},Hs=function(e,t,i){return e._gsap[t]=i},Zs=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},Ks=function(e,t,i,n,r){var s=e._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},Ws=function(e,t,i,n,r){var s=e._gsap;s[t]=i,s.renderTransform(r,s)},B="transform",re=B+"Origin",Xs=function a(e,t){var i=this,n=this.target,r=n.style,s=n._gsap;if(e in Ce&&r){if(this.tfm=this.tfm||{},e!=="transform")e=be[e]||e,~e.indexOf(",")?e.split(",").forEach(function(o){return i.tfm[o]=Pe(n,o)}):this.tfm[e]=s.x?s[e]:Pe(n,e),e===re&&(this.tfm.zOrigin=s.zOrigin);else return be.transform.split(",").forEach(function(o){return a.call(i,o,t)});if(this.props.indexOf(B)>=0)return;s.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(re,t,"")),e=B}(r||t)&&this.props.push(e,t,r[e])},Xn=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},qs=function(){var e=this.props,t=this.target,i=t.style,n=t._gsap,r,s;for(r=0;r<e.length;r+=3)e[r+1]?e[r+1]===2?t[e[r]](e[r+2]):t[e[r]]=e[r+2]:e[r+2]?i[e[r]]=e[r+2]:i.removeProperty(e[r].substr(0,2)==="--"?e[r]:e[r].replace(Mi,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)n[s]=this.tfm[s];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),r=Di(),(!r||!r.isStart)&&!i[B]&&(Xn(i),n.zOrigin&&i[re]&&(i[re]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},qn=function(e,t){var i={target:e,props:[],revert:qs,save:Xs};return e._gsap||ne.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return i.save(n)}),i},Qn,Ri=function(e,t){var i=Re.createElementNS?Re.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Re.createElement(e);return i&&i.style?i:Re.createElement(e)},ge=function a(e,t,i){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Mi,"-$1").toLowerCase())||n.getPropertyValue(t)||!i&&a(e,ot(t)||t,1)||""},Jn="O,Moz,ms,Ms,Webkit".split(","),ot=function(e,t,i){var n=t||Be,r=n.style,s=5;if(e in r&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);s--&&!(Jn[s]+e in r););return s<0?null:(s===3?"ms":s>=0?Jn[s]:"")+e},Ii=function(){zs()&&window.document&&(Yn=window,Re=Yn.document,rt=Re.documentElement,Be=Ri("div")||{style:{}},Ri("div"),B=ot(B),re=B+"Origin",Be.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Qn=!!ot("perspective"),Di=ne.core.reverting,Ti=1)},er=function(e){var t=e.ownerSVGElement,i=Ri("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),r;n.style.display="block",i.appendChild(n),rt.appendChild(i);try{r=n.getBBox()}catch{}return i.removeChild(n),rt.removeChild(i),r},tr=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},ir=function(e){var t,i;try{t=e.getBBox()}catch{t=er(e),i=1}return t&&(t.width||t.height)||i||(t=er(e)),t&&!t.width&&!t.x&&!t.y?{x:+tr(e,["x","cx","x1"])||0,y:+tr(e,["y","cy","y1"])||0,width:0,height:0}:t},nr=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&ir(e))},Ge=function(e,t){if(t){var i=e.style,n;t in Ce&&t!==re&&(t=B),i.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(n==="--"?t:t.replace(Mi,"-$1").toLowerCase())):i.removeAttribute(t)}},Ie=function(e,t,i,n,r,s){var o=new ie(e._pt,t,i,0,1,s?Wn:Kn);return e._pt=o,o.b=n,o.e=r,e._props.push(i),o},rr={deg:1,rad:1,turn:1},Qs={grid:1,flex:1},Le=function a(e,t,i,n){var r=parseFloat(i)||0,s=(i+"").trim().substr((r+"").length)||"px",o=Be.style,l=Ns.test(t),c=e.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),u=100,p=n==="px",m=n==="%",f,d,g,_;if(n===s||!r||rr[n]||rr[s])return r;if(s!=="px"&&!p&&(r=a(e,t,i,"px")),_=e.getCTM&&nr(e),(m||s==="%")&&(Ce[t]||~t.indexOf("adius")))return f=_?e.getBBox()[l?"width":"height"]:e[h],j(m?r/f*u:r/100*f);if(o[l?"width":"height"]=u+(p?s:n),d=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!c?e:e.parentNode,_&&(d=(e.ownerSVGElement||{}).parentNode),(!d||d===Re||!d.appendChild)&&(d=Re.body),g=d._gsap,g&&m&&g.width&&l&&g.time===de.time&&!g.uncache)return j(r/g.width*u);if(m&&(t==="height"||t==="width")){var y=e.style[t];e.style[t]=u+n,f=e[h],y?e.style[t]=y:Ge(e,t)}else(m||s==="%")&&!Qs[ge(d,"display")]&&(o.position=ge(e,"position")),d===e&&(o.position="static"),d.appendChild(Be),f=Be[h],d.removeChild(Be),o.position="absolute";return l&&m&&(g=Ue(d),g.time=de.time,g.width=d[h]),j(p?f*r/u:f&&r?u/f*r:0)},Pe=function(e,t,i,n){var r;return Ti||Ii(),t in be&&t!=="transform"&&(t=be[t],~t.indexOf(",")&&(t=t.split(",")[0])),Ce[t]&&t!=="transform"?(r=vt(e,n),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:Vt(ge(e,re))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||n||~(r+"").indexOf("calc("))&&(r=Bt[t]&&Bt[t](e,t,i)||ge(e,t)||on(e,t)||(t==="opacity"?1:0))),i&&!~(r+"").trim().indexOf(" ")?Le(e,t,r,i)+i:r},Js=function(e,t,i,n){if(!i||i==="none"){var r=ot(t,e,1),s=r&&ge(e,r,1);s&&s!==i?(t=r,i=s):t==="borderColor"&&(i=ge(e,"borderTopColor"))}var o=new ie(this._pt,e.style,t,0,1,Bn),l=0,c=0,h,u,p,m,f,d,g,_,y,x,v,b;if(o.b=i,o.e=n,i+="",n+="",n.substring(0,6)==="var(--"&&(n=ge(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(d=e.style[t],e.style[t]=n,n=ge(e,t)||n,d?e.style[t]=d:Ge(e,t)),h=[i,n],On(h),i=h[0],n=h[1],p=i.match(qe)||[],b=n.match(qe)||[],b.length){for(;u=qe.exec(n);)g=u[0],y=n.substring(l,u.index),f?f=(f+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(f=1),g!==(d=p[c++]||"")&&(m=parseFloat(d)||0,v=d.substr((m+"").length),g.charAt(1)==="="&&(g=Qe(m,g)+v),_=parseFloat(g),x=g.substr((_+"").length),l=qe.lastIndex-x.length,x||(x=x||oe.units[t]||v,l===n.length&&(n+=x,o.e+=x)),v!==x&&(m=Le(e,t,d,x)||0),o._pt={_next:o._pt,p:y||c===1?y:",",s:m,c:_-m,m:f&&f<4||t==="zIndex"?Math.round:0});o.c=l<n.length?n.substring(l,n.length):""}else o.r=t==="display"&&n==="none"?Wn:Kn;return Ji.test(n)&&(o.e=0),this._pt=o,o},sr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},ea=function(e){var t=e.split(" "),i=t[0],n=t[1]||"50%";return(i==="top"||i==="bottom"||n==="left"||n==="right")&&(e=i,i=n,n=e),t[0]=sr[i]||i,t[1]=sr[n]||n,t.join(" ")},ta=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,n=i.style,r=t.u,s=i._gsap,o,l,c;if(r==="all"||r===!0)n.cssText="",l=1;else for(r=r.split(","),c=r.length;--c>-1;)o=r[c],Ce[o]&&(l=1,o=o==="transformOrigin"?re:B),Ge(i,o);l&&(Ge(i,B),s&&(s.svg&&i.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",vt(i,1),s.uncache=1,Xn(n)))}},Bt={clearProps:function(e,t,i,n,r){if(r.data!=="isFromStart"){var s=e._pt=new ie(e._pt,t,i,0,0,ta);return s.u=n,s.pr=-10,s.tween=r,e._props.push(i),1}}},bt=[1,0,0,1,0,0],ar={},or=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},lr=function(e){var t=ge(e,B);return or(t)?bt:t.substr(7).match(Qi).map(j)},Li=function(e,t){var i=e._gsap||Ue(e),n=e.style,r=lr(e),s,o,l,c;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,r=[l.a,l.b,l.c,l.d,l.e,l.f],r.join(",")==="1,0,0,1,0,0"?bt:r):(r===bt&&!e.offsetParent&&e!==rt&&!i.svg&&(l=n.display,n.display="block",s=e.parentNode,(!s||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,rt.appendChild(e)),r=lr(e),l?n.display=l:Ge(e,"display"),c&&(o?s.insertBefore(e,o):s?s.appendChild(e):rt.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},ki=function(e,t,i,n,r,s){var o=e._gsap,l=r||Li(e,!0),c=o.xOrigin||0,h=o.yOrigin||0,u=o.xOffset||0,p=o.yOffset||0,m=l[0],f=l[1],d=l[2],g=l[3],_=l[4],y=l[5],x=t.split(" "),v=parseFloat(x[0])||0,b=parseFloat(x[1])||0,C,E,P,w;i?l!==bt&&(E=m*g-f*d)&&(P=v*(g/E)+b*(-d/E)+(d*y-g*_)/E,w=v*(-f/E)+b*(m/E)-(m*y-f*_)/E,v=P,b=w):(C=ir(e),v=C.x+(~x[0].indexOf("%")?v/100*C.width:v),b=C.y+(~(x[1]||x[0]).indexOf("%")?b/100*C.height:b)),n||n!==!1&&o.smooth?(_=v-c,y=b-h,o.xOffset=u+(_*m+y*d)-_,o.yOffset=p+(_*f+y*g)-y):o.xOffset=o.yOffset=0,o.xOrigin=v,o.yOrigin=b,o.smooth=!!n,o.origin=t,o.originIsAbsolute=!!i,e.style[re]="0px 0px",s&&(Ie(s,o,"xOrigin",c,v),Ie(s,o,"yOrigin",h,b),Ie(s,o,"xOffset",u,o.xOffset),Ie(s,o,"yOffset",p,o.yOffset)),e.setAttribute("data-svg-origin",v+" "+b)},vt=function(e,t){var i=e._gsap||new kn(e);if("x"in i&&!t&&!i.uncache)return i;var n=e.style,r=i.scaleX<0,s="px",o="deg",l=getComputedStyle(e),c=ge(e,re)||"0",h,u,p,m,f,d,g,_,y,x,v,b,C,E,P,w,T,O,S,R,I,G,N,F,se,Pt,At,St,Ke,Mr,Ae,We;return h=u=p=d=g=_=y=x=v=0,m=f=1,i.svg=!!(e.getCTM&&nr(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[B]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[B]!=="none"?l[B]:"")),n.scale=n.rotate=n.translate="none"),E=Li(e,i.svg),i.svg&&(i.uncache?(se=e.getBBox(),c=i.xOrigin-se.x+"px "+(i.yOrigin-se.y)+"px",F=""):F=!t&&e.getAttribute("data-svg-origin"),ki(e,F||c,!!F||i.originIsAbsolute,i.smooth!==!1,E)),b=i.xOrigin||0,C=i.yOrigin||0,E!==bt&&(O=E[0],S=E[1],R=E[2],I=E[3],h=G=E[4],u=N=E[5],E.length===6?(m=Math.sqrt(O*O+S*S),f=Math.sqrt(I*I+R*R),d=O||S?at(S,O)*Ve:0,y=R||I?at(R,I)*Ve+d:0,y&&(f*=Math.abs(Math.cos(y*st))),i.svg&&(h-=b-(b*O+C*R),u-=C-(b*S+C*I))):(We=E[6],Mr=E[7],At=E[8],St=E[9],Ke=E[10],Ae=E[11],h=E[12],u=E[13],p=E[14],P=at(We,Ke),g=P*Ve,P&&(w=Math.cos(-P),T=Math.sin(-P),F=G*w+At*T,se=N*w+St*T,Pt=We*w+Ke*T,At=G*-T+At*w,St=N*-T+St*w,Ke=We*-T+Ke*w,Ae=Mr*-T+Ae*w,G=F,N=se,We=Pt),P=at(-R,Ke),_=P*Ve,P&&(w=Math.cos(-P),T=Math.sin(-P),F=O*w-At*T,se=S*w-St*T,Pt=R*w-Ke*T,Ae=I*T+Ae*w,O=F,S=se,R=Pt),P=at(S,O),d=P*Ve,P&&(w=Math.cos(P),T=Math.sin(P),F=O*w+S*T,se=G*w+N*T,S=S*w-O*T,N=N*w-G*T,O=F,G=se),g&&Math.abs(g)+Math.abs(d)>359.9&&(g=d=0,_=180-_),m=j(Math.sqrt(O*O+S*S+R*R)),f=j(Math.sqrt(N*N+We*We)),P=at(G,N),y=Math.abs(P)>2e-4?P*Ve:0,v=Ae?1/(Ae<0?-Ae:Ae):0),i.svg&&(F=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!or(ge(e,B)),F&&e.setAttribute("transform",F))),Math.abs(y)>90&&Math.abs(y)<270&&(r?(m*=-1,y+=d<=0?180:-180,d+=d<=0?180:-180):(f*=-1,y+=y<=0?180:-180)),t=t||i.uncache,i.x=h-((i.xPercent=h&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+s,i.y=u-((i.yPercent=u&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+s,i.z=p+s,i.scaleX=j(m),i.scaleY=j(f),i.rotation=j(d)+o,i.rotationX=j(g)+o,i.rotationY=j(_)+o,i.skewX=y+o,i.skewY=x+o,i.transformPerspective=v+s,(i.zOrigin=parseFloat(c.split(" ")[2])||!t&&i.zOrigin||0)&&(n[re]=Vt(c)),i.xOffset=i.yOffset=0,i.force3D=oe.force3D,i.renderTransform=i.svg?na:Qn?hr:ia,i.uncache=0,i},Vt=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ui=function(e,t,i){var n=q(t);return j(parseFloat(t)+parseFloat(Le(e,"x",i+"px",n)))+n},ia=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,hr(e,t)},je="0deg",Et="0px",Ye=") ",hr=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,s=i.x,o=i.y,l=i.z,c=i.rotation,h=i.rotationY,u=i.rotationX,p=i.skewX,m=i.skewY,f=i.scaleX,d=i.scaleY,g=i.transformPerspective,_=i.force3D,y=i.target,x=i.zOrigin,v="",b=_==="auto"&&e&&e!==1||_===!0;if(x&&(u!==je||h!==je)){var C=parseFloat(h)*st,E=Math.sin(C),P=Math.cos(C),w;C=parseFloat(u)*st,w=Math.cos(C),s=Ui(y,s,E*w*-x),o=Ui(y,o,-Math.sin(C)*-x),l=Ui(y,l,P*w*-x+x)}g!==Et&&(v+="perspective("+g+Ye),(n||r)&&(v+="translate("+n+"%, "+r+"%) "),(b||s!==Et||o!==Et||l!==Et)&&(v+=l!==Et||b?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+Ye),c!==je&&(v+="rotate("+c+Ye),h!==je&&(v+="rotateY("+h+Ye),u!==je&&(v+="rotateX("+u+Ye),(p!==je||m!==je)&&(v+="skew("+p+", "+m+Ye),(f!==1||d!==1)&&(v+="scale("+f+", "+d+Ye),y.style[B]=v||"translate(0, 0)"},na=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,s=i.x,o=i.y,l=i.rotation,c=i.skewX,h=i.skewY,u=i.scaleX,p=i.scaleY,m=i.target,f=i.xOrigin,d=i.yOrigin,g=i.xOffset,_=i.yOffset,y=i.forceCSS,x=parseFloat(s),v=parseFloat(o),b,C,E,P,w;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=st,c*=st,b=Math.cos(l)*u,C=Math.sin(l)*u,E=Math.sin(l-c)*-p,P=Math.cos(l-c)*p,c&&(h*=st,w=Math.tan(c-h),w=Math.sqrt(1+w*w),E*=w,P*=w,h&&(w=Math.tan(h),w=Math.sqrt(1+w*w),b*=w,C*=w)),b=j(b),C=j(C),E=j(E),P=j(P)):(b=u,P=p,C=E=0),(x&&!~(s+"").indexOf("px")||v&&!~(o+"").indexOf("px"))&&(x=Le(m,"x",s,"px"),v=Le(m,"y",o,"px")),(f||d||g||_)&&(x=j(x+f-(f*b+d*E)+g),v=j(v+d-(f*C+d*P)+_)),(n||r)&&(w=m.getBBox(),x=j(x+n/100*w.width),v=j(v+r/100*w.height)),w="matrix("+b+","+C+","+E+","+P+","+x+","+v+")",m.setAttribute("transform",w),y&&(m.style[B]=w)},ra=function(e,t,i,n,r){var s=360,o=K(r),l=parseFloat(r)*(o&&~r.indexOf("rad")?Ve:1),c=l-n,h=n+c+"deg",u,p;return o&&(u=r.split("_")[1],u==="short"&&(c%=s,c!==c%(s/2)&&(c+=c<0?s:-s)),u==="cw"&&c<0?c=(c+s*Zn)%s-~~(c/s)*s:u==="ccw"&&c>0&&(c=(c-s*Zn)%s-~~(c/s)*s)),e._pt=p=new ie(e._pt,t,i,n,c,Bs),p.e=h,p.u="deg",e._props.push(i),p},cr=function(e,t){for(var i in t)e[i]=t[i];return e},sa=function(e,t,i){var n=cr({},i._gsap),r="perspective,force3D,transformOrigin,svgOrigin",s=i.style,o,l,c,h,u,p,m,f;n.svg?(c=i.getAttribute("transform"),i.setAttribute("transform",""),s[B]=t,o=vt(i,1),Ge(i,B),i.setAttribute("transform",c)):(c=getComputedStyle(i)[B],s[B]=t,o=vt(i,1),s[B]=c);for(l in Ce)c=n[l],h=o[l],c!==h&&r.indexOf(l)<0&&(m=q(c),f=q(h),u=m!==f?Le(i,l,c,f):parseFloat(c),p=parseFloat(h),e._pt=new ie(e._pt,o,l,u,p-u,Oi),e._pt.u=f||0,e._props.push(l));cr(o,n)};te("padding,margin,Width,Radius",function(a,e){var t="Top",i="Right",n="Bottom",r="Left",s=(e<3?[t,i,n,r]:[t+r,t+i,n+i,n+r]).map(function(o){return e<2?a+o:"border"+o+a});Bt[e>1?"border"+a:a]=function(o,l,c,h,u){var p,m;if(arguments.length<4)return p=s.map(function(f){return Pe(o,f,c)}),m=p.join(" "),m.split(p[0]).length===5?p[0]:m;p=(h+"").split(" "),m={},s.forEach(function(f,d){return m[f]=p[d]=p[d]||p[(d-1)/2|0]}),o.init(l,m,u)}});var ur={name:"css",register:Ii,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,r){var s=this._props,o=e.style,l=i.vars.startAt,c,h,u,p,m,f,d,g,_,y,x,v,b,C,E,P;Ti||Ii(),this.styles=this.styles||qn(e),P=this.styles.props,this.tween=i;for(d in t)if(d!=="autoRound"&&(h=t[d],!(he[d]&&Un(d,t,i,n,e,r)))){if(m=typeof h,f=Bt[d],m==="function"&&(h=h.call(i,n,e,r),m=typeof h),m==="string"&&~h.indexOf("random(")&&(h=ft(h)),f)f(this,e,d,h,i)&&(E=1);else if(d.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(d)+"").trim(),h+="",Me.lastIndex=0,Me.test(c)||(g=q(c),_=q(h)),_?g!==_&&(c=Le(e,d,c,_)+_):g&&(h+=g),this.add(o,"setProperty",c,h,n,r,0,0,d),s.push(d),P.push(d,0,o[d]);else if(m!=="undefined"){if(l&&d in l?(c=typeof l[d]=="function"?l[d].call(i,n,e,r):l[d],K(c)&&~c.indexOf("random(")&&(c=ft(c)),q(c+"")||c==="auto"||(c+=oe.units[d]||q(Pe(e,d))||""),(c+"").charAt(1)==="="&&(c=Pe(e,d))):c=Pe(e,d),p=parseFloat(c),y=m==="string"&&h.charAt(1)==="="&&h.substr(0,2),y&&(h=h.substr(2)),u=parseFloat(h),d in be&&(d==="autoAlpha"&&(p===1&&Pe(e,"visibility")==="hidden"&&u&&(p=0),P.push("visibility",0,o.visibility),Ie(this,o,"visibility",p?"inherit":"hidden",u?"inherit":"hidden",!u)),d!=="scale"&&d!=="transform"&&(d=be[d],~d.indexOf(",")&&(d=d.split(",")[0]))),x=d in Ce,x){if(this.styles.save(d),m==="string"&&h.substring(0,6)==="var(--"&&(h=ge(e,h.substring(4,h.indexOf(")"))),u=parseFloat(h)),v||(b=e._gsap,b.renderTransform&&!t.parseTransform||vt(e,t.parseTransform),C=t.smoothOrigin!==!1&&b.smooth,v=this._pt=new ie(this._pt,o,B,0,1,b.renderTransform,b,0,-1),v.dep=1),d==="scale")this._pt=new ie(this._pt,b,"scaleY",b.scaleY,(y?Qe(b.scaleY,y+u):u)-b.scaleY||0,Oi),this._pt.u=0,s.push("scaleY",d),d+="X";else if(d==="transformOrigin"){P.push(re,0,o[re]),h=ea(h),b.svg?ki(e,h,0,C,0,this):(_=parseFloat(h.split(" ")[2])||0,_!==b.zOrigin&&Ie(this,b,"zOrigin",b.zOrigin,_),Ie(this,o,d,Vt(c),Vt(h)));continue}else if(d==="svgOrigin"){ki(e,h,1,C,0,this);continue}else if(d in ar){ra(this,b,d,p,y?Qe(p,y+h):h);continue}else if(d==="smoothOrigin"){Ie(this,b,"smooth",b.smooth,h);continue}else if(d==="force3D"){b[d]=h;continue}else if(d==="transform"){sa(this,h,e);continue}}else d in o||(d=ot(d)||d);if(x||(u||u===0)&&(p||p===0)&&!$s.test(h)&&d in o)g=(c+"").substr((p+"").length),u||(u=0),_=q(h)||(d in oe.units?oe.units[d]:g),g!==_&&(p=Le(e,d,c,_)),this._pt=new ie(this._pt,x?b:o,d,p,(y?Qe(p,y+u):u)-p,!x&&(_==="px"||d==="zIndex")&&t.autoRound!==!1?Gs:Oi),this._pt.u=_||0,g!==_&&_!=="%"&&(this._pt.b=c,this._pt.r=Vs);else if(d in o)Js.call(this,e,d,c,y?y+h:h);else if(d in e)this.add(e,d,c||e[d],y?y+h:h,n,r);else if(d!=="parseTransform"){ri(d,h);continue}x||(d in o?P.push(d,0,o[d]):typeof e[d]=="function"?P.push(d,2,e[d]()):P.push(d,1,c||e[d])),s.push(d)}}E&&Vn(this)},render:function(e,t){if(t.tween._time||!Di())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:Pe,aliases:be,getSetter:function(e,t,i){var n=be[t];return n&&n.indexOf(",")<0&&(t=n),t in Ce&&t!==re&&(e._gsap.x||Pe(e,"x"))?i&&Hn===i?t==="scale"?Zs:Hs:(Hn=i||{})&&(t==="scale"?Ks:Ws):e.style&&!Qt(e.style[t])?js:~t.indexOf("-")?Ys:wi(e,t)},core:{_removeProperty:Ge,_getMatrix:Li}};ne.utils.checkPrefix=ot,ne.core.getStyleSaver=qn,(function(a,e,t,i){var n=te(a+","+e+","+t,function(r){Ce[r]=1});te(e,function(r){oe.units[r]="deg",ar[r]=1}),be[n[13]]=a+","+e,te(i,function(r){var s=r.split(":");be[s[1]]=n[s[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"),te("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(a){oe.units[a]="px"}),ne.registerPlugin(ur);var wt=ne.registerPlugin(ur)||ne;wt.core.Tween;class ve{constructor(e,t,i,n,r="div"){this.parent=e,this.object=t,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("lil-controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("lil-name"),ve.nextNameID=ve.nextNameID||0,this.$name.id=`lil-gui-name-${++ve.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("lil-widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",s=>s.stopPropagation()),this.domElement.addEventListener("keyup",s=>s.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("lil-disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class aa extends ve{constructor(e,t,i){super(e,t,i,"lil-boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function Fi(a){let e,t;return(e=a.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=a.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=a.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),t?"#"+t:!1}const oa={isPrimitive:!0,match:a=>typeof a=="string",fromHexString:Fi,toHexString:Fi},Ct={isPrimitive:!0,match:a=>typeof a=="number",fromHexString:a=>parseInt(a.substring(1),16),toHexString:a=>"#"+a.toString(16).padStart(6,0)},la=[oa,Ct,{isPrimitive:!1,match:a=>Array.isArray(a)||ArrayBuffer.isView(a),fromHexString(a,e,t=1){const i=Ct.fromHexString(a);e[0]=(i>>16&255)/255*t,e[1]=(i>>8&255)/255*t,e[2]=(i&255)/255*t},toHexString([a,e,t],i=1){i=255/i;const n=a*i<<16^e*i<<8^t*i<<0;return Ct.toHexString(n)}},{isPrimitive:!1,match:a=>Object(a)===a,fromHexString(a,e,t=1){const i=Ct.fromHexString(a);e.r=(i>>16&255)/255*t,e.g=(i>>8&255)/255*t,e.b=(i&255)/255*t},toHexString({r:a,g:e,b:t},i=1){i=255/i;const n=a*i<<16^e*i<<8^t*i<<0;return Ct.toHexString(n)}}];function ha(a){return la.find(e=>e.match(a))}class ca extends ve{constructor(e,t,i,n){super(e,t,i,"lil-color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("lil-display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=ha(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const r=Fi(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class zi extends ve{constructor(e,t,i){super(e,t,i,"lil-function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class ua extends ve{constructor(e,t,i,n,r,s){super(e,t,i,"lil-number"),this._initInput(),this.min(n),this.max(r);const o=s!==void 0;this.step(o?s:this._getImplicitStep(),o),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=t*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=()=>{let y=parseFloat(this.$input.value);isNaN(y)||(this._stepExplicit&&(y=this._snap(y)),this.setValue(this._clamp(y)))},i=y=>{const x=parseFloat(this.$input.value);isNaN(x)||(this._snapClampSetValue(x+y),this.$input.value=this.getValue())},n=y=>{y.key==="Enter"&&this.$input.blur(),y.code==="ArrowUp"&&(y.preventDefault(),i(this._step*this._arrowKeyMultiplier(y))),y.code==="ArrowDown"&&(y.preventDefault(),i(this._step*this._arrowKeyMultiplier(y)*-1))},r=y=>{this._inputFocused&&(y.preventDefault(),i(this._step*this._normalizeMouseWheel(y)))};let s=!1,o,l,c,h,u;const p=5,m=y=>{o=y.clientX,l=c=y.clientY,s=!0,h=this.getValue(),u=0,window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)},f=y=>{if(s){const x=y.clientX-o,v=y.clientY-l;Math.abs(v)>p?(y.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(x)>p&&d()}if(!s){const x=y.clientY-c;u-=x*this._step*this._arrowKeyMultiplier(y),h+u>this._max?u=this._max-h:h+u<this._min&&(u=this._min-h),this._snapClampSetValue(h+u)}c=y.clientY},d=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)},g=()=>{this._inputFocused=!0},_=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",t),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",m),this.$input.addEventListener("focus",g),this.$input.addEventListener("blur",_)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("lil-slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("lil-fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("lil-has-slider");const e=(_,y,x,v,b)=>(_-y)/(x-y)*(b-v)+v,t=_=>{const y=this.$slider.getBoundingClientRect();let x=e(_,y.left,y.right,this._min,this._max);this._snapClampSetValue(x)},i=_=>{this._setDraggingStyle(!0),t(_.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)},n=_=>{t(_.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)};let s=!1,o,l;const c=_=>{_.preventDefault(),this._setDraggingStyle(!0),t(_.touches[0].clientX),s=!1},h=_=>{_.touches.length>1||(this._hasScrollBar?(o=_.touches[0].clientX,l=_.touches[0].clientY,s=!0):c(_),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",p))},u=_=>{if(s){const y=_.touches[0].clientX-o,x=_.touches[0].clientY-l;Math.abs(y)>Math.abs(x)?c(_):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p))}else _.preventDefault(),t(_.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p)},m=this._callOnFinishChange.bind(this),f=400;let d;const g=_=>{if(Math.abs(_.deltaX)<Math.abs(_.deltaY)&&this._hasScrollBar)return;_.preventDefault();const x=this._normalizeMouseWheel(_)*this._step;this._snapClampSetValue(this.getValue()+x),this.$input.value=this.getValue(),clearTimeout(d),d=setTimeout(m,f)};this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",g,{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("lil-active",e),document.body.classList.toggle("lil-dragging",e),document.body.classList.toggle(`lil-${t}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:i}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,i=-e.wheelDelta/120,i*=this._stepExplicit?1:10),t+-i}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){let t=0;return this._hasMin?t=this._min:this._hasMax&&(t=this._max),e-=t,e=Math.round(e/this._step)*this._step,e+=t,e=parseFloat(e.toPrecision(15)),e}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class da extends ve{constructor(e,t,i,n){super(e,t,i,"lil-option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("lil-display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("lil-focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("lil-focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(t=>{const i=document.createElement("option");i.textContent=t,this.$select.appendChild(i)}),this.updateDisplay(),this}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.textContent=t===-1?e:this._names[t],this}}class pa extends ve{constructor(e,t,i){super(e,t,i,"lil-string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}var fa=`.lil-gui {
|
|
2
2
|
font-family: var(--font-family);
|
|
3
3
|
font-size: var(--font-size);
|
|
4
4
|
line-height: 1;
|
|
@@ -538,7 +538,7 @@
|
|
|
538
538
|
<span class="gralobe-legend-max" data-testid="legend-max"></span>
|
|
539
539
|
</div>
|
|
540
540
|
<div class="gralobe-legend-description" data-testid="legend-description"></div>
|
|
541
|
-
`,e.appendChild(this.element),this.updateSize(),this.resizeObserver=new ResizeObserver(()=>this.updateSize()),this.resizeObserver.observe(e)}getSizeClass(e,t){const i=Math.min(e,t);return i<200?"xs":i<300?"sm":i<450?"md":"lg"}updateSize(){const e=this.parentContainer.clientWidth,t=this.parentContainer.clientHeight,i=this.getSizeClass(e,t);this.element.classList.remove("size-xs","size-sm","size-md","size-lg"),this.element.classList.add(`size-${i}`)}show(e){const t=this.element.querySelector(".gralobe-legend-title"),i=this.element.querySelector(".gralobe-legend-gradient"),n=this.element.querySelector(".gralobe-legend-min"),r=this.element.querySelector(".gralobe-legend-max"),s=this.element.querySelector(".gralobe-legend-description");t.textContent=e.name,s.textContent=e.description;const[o,l,c]=e.colorScale;i.style.background=`linear-gradient(to right, ${o}, ${l}, ${c})`;const h=e.format??Vi(e.unit);n.textContent=h(e.domain[0]),r.textContent=h(e.domain[1]),this.element.classList.add("visible"),this.visible=!0}hide(){this.element.classList.remove("visible"),this.visible=!1}isVisible(){return this.visible}getElement(){return this.element}dispose(){this.resizeObserver?.disconnect(),this.element.remove()}}var Ta={trailer:59};function gr(a=256){let e=0,t=new Uint8Array(a);return{get buffer(){return t.buffer},reset(){e=0},bytesView(){return t.subarray(0,e)},bytes(){return t.slice(0,e)},writeByte(n){i(e+1),t[e]=n,e++},writeBytes(n,r=0,s=n.length){i(e+s);for(let o=0;o<s;o++)t[e++]=n[o+r]},writeBytesView(n,r=0,s=n.byteLength){i(e+s),t.set(n.subarray(r,r+s),e),e+=s}};function i(n){var r=t.length;if(r>=n)return;var s=1024*1024;n=Math.max(n,r*(r<s?2:1.125)>>>0),r!=0&&(n=Math.max(n,256));let o=t;t=new Uint8Array(n),e>0&&t.set(o.subarray(0,e),0)}}var Gi=12,_r=5003,Da=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function Ma(a,e,t,i,n=gr(512),r=new Uint8Array(256),s=new Int32Array(_r),o=new Int32Array(_r)){let l=s.length,c=Math.max(2,i);r.fill(0),o.fill(0),s.fill(-1);let h=0,u=0,p=c+1,m=p,f=!1,d=m,g=(1<<d)-1,_=1<<p-1,y=_+1,x=_+2,v=0,b=t[0],C=0;for(let w=l;w<65536;w*=2)++C;C=8-C,n.writeByte(c),P(_);let E=t.length;for(let w=1;w<E;w++)e:{let T=t[w],O=(T<<Gi)+b,S=T<<C^b;if(s[S]===O){b=o[S];break e}let R=S===0?1:l-S;for(;s[S]>=0;)if(S-=R,S<0&&(S+=l),s[S]===O){b=o[S];break e}P(b),b=T,x<1<<Gi?(o[S]=x++,s[S]=O):(s.fill(-1),x=_+2,f=!0,P(_))}return P(b),P(y),n.writeByte(0),n.bytesView();function P(w){for(h&=Da[u],u>0?h|=w<<u:h=w,u+=d;u>=8;)r[v++]=h&255,v>=254&&(n.writeByte(v),n.writeBytesView(r,0,v),v=0),h>>=8,u-=8;if((x>g||f)&&(f?(d=m,g=(1<<d)-1,f=!1):(++d,g=d===Gi?1<<d:(1<<d)-1)),w==y){for(;u>0;)r[v++]=h&255,v>=254&&(n.writeByte(v),n.writeBytesView(r,0,v),v=0),h>>=8,u-=8;v>0&&(n.writeByte(v),n.writeBytesView(r,0,v),v=0)}}}var Oa=Ma;function yr(a,e,t){return a<<8&63488|e<<2&992|t>>3}function xr(a,e,t,i){return a>>4|e&240|(t&240)<<4|(i&240)<<8}function br(a,e,t){return a>>4<<8|e&240|t>>4}function Yt(a,e,t){return a<e?e:a>t?t:a}function Ht(a){return a*a}function vr(a,e,t){var i=0,n=1e100;let r=a[e],s=r.cnt;r.ac;let o=r.rc,l=r.gc,c=r.bc;for(var h=r.fw;h!=0;h=a[h].fw){let p=a[h],m=p.cnt,f=s*m/(s+m);if(!(f>=n)){var u=0;u+=f*Ht(p.rc-o),!(u>=n)&&(u+=f*Ht(p.gc-l),!(u>=n)&&(u+=f*Ht(p.bc-c),!(u>=n)&&(n=u,i=h)))}}r.err=n,r.nn=i}function ji(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function Ra(a,e){let t=e==="rgb444"?4096:65536,i=new Array(t),n=a.length;if(e==="rgba4444")for(let r=0;r<n;++r){let s=a[r],o=s>>24&255,l=s>>16&255,c=s>>8&255,h=s&255,u=xr(h,c,l,o),p=u in i?i[u]:i[u]=ji();p.rc+=h,p.gc+=c,p.bc+=l,p.ac+=o,p.cnt++}else if(e==="rgb444")for(let r=0;r<n;++r){let s=a[r],o=s>>16&255,l=s>>8&255,c=s&255,h=br(c,l,o),u=h in i?i[h]:i[h]=ji();u.rc+=c,u.gc+=l,u.bc+=o,u.cnt++}else for(let r=0;r<n;++r){let s=a[r],o=s>>16&255,l=s>>8&255,c=s&255,h=yr(c,l,o),u=h in i?i[h]:i[h]=ji();u.rc+=c,u.gc+=l,u.bc+=o,u.cnt++}return i}function Ia(a,e,t={}){let{format:i="rgb565",clearAlpha:n=!0,clearAlphaColor:r=0,clearAlphaThreshold:s=0,oneBitAlpha:o=!1}=t;if(!a||!a.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(a instanceof Uint8Array)&&!(a instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let l=new Uint32Array(a.buffer),c=t.useSqrt!==!1,h=i==="rgba4444",u=Ra(l,i),p=u.length,m=p-1,f=new Uint32Array(p+1);for(var d=0,g=0;g<p;++g){let I=u[g];if(I!=null){var _=1/I.cnt;h&&(I.ac*=_),I.rc*=_,I.gc*=_,I.bc*=_,u[d++]=I}}Ht(e)/d<.022&&(c=!1);for(var g=0;g<d-1;++g)u[g].fw=g+1,u[g+1].bk=g,c&&(u[g].cnt=Math.sqrt(u[g].cnt));c&&(u[g].cnt=Math.sqrt(u[g].cnt));var y,x,v;for(g=0;g<d;++g){vr(u,g);var b=u[g].err;for(x=++f[0];x>1&&(v=x>>1,!(u[y=f[v]].err<=b));x=v)f[x]=y;f[x]=g}var C=d-e;for(g=0;g<C;){for(var E;;){var P=f[1];if(E=u[P],E.tm>=E.mtm&&u[E.nn].mtm<=E.tm)break;E.mtm==m?P=f[1]=f[f[0]--]:(vr(u,P),E.tm=g);var b=u[P].err;for(x=1;(v=x+x)<=f[0]&&(v<f[0]&&u[f[v]].err>u[f[v+1]].err&&v++,!(b<=u[y=f[v]].err));x=v)f[x]=y;f[x]=P}var w=u[E.nn],T=E.cnt,O=w.cnt,_=1/(T+O);h&&(E.ac=_*(T*E.ac+O*w.ac)),E.rc=_*(T*E.rc+O*w.rc),E.gc=_*(T*E.gc+O*w.gc),E.bc=_*(T*E.bc+O*w.bc),E.cnt+=w.cnt,E.mtm=++g,u[w.bk].fw=w.fw,u[w.fw].bk=w.bk,w.mtm=m}let S=[];var R=0;for(g=0;;++R){let I=Yt(Math.round(u[g].rc),0,255),G=Yt(Math.round(u[g].gc),0,255),N=Yt(Math.round(u[g].bc),0,255),F=255;h&&(F=Yt(Math.round(u[g].ac),0,255),o&&(F=F<=(typeof o=="number"?o:127)?0:255),n&&F<=s&&(I=G=N=r,F=0));let se=h?[I,G,N,F]:[I,G,N];if(La(S,se)||S.push(se),(g=u[g].fw)==0)break}return S}function La(a,e){for(let t=0;t<a.length;t++){let i=a[t],n=i[0]===e[0]&&i[1]===e[1]&&i[2]===e[2],r=i.length>=4&&e.length>=4?i[3]===e[3]:!0;if(n&&r)return!0}return!1}function ka(a,e,t="rgb565"){if(!a||!a.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(a instanceof Uint8Array)&&!(a instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(e.length>256)throw new Error("applyPalette() only works with 256 colors or less");let i=new Uint32Array(a.buffer),n=i.length,r=t==="rgb444"?4096:65536,s=new Uint8Array(n),o=new Array(r);if(t==="rgba4444")for(let l=0;l<n;l++){let c=i[l],h=c>>24&255,u=c>>16&255,p=c>>8&255,m=c&255,f=xr(m,p,u,h),d=f in o?o[f]:o[f]=Ua(m,p,u,h,e);s[l]=d}else{let l=t==="rgb444"?br:yr;for(let c=0;c<n;c++){let h=i[c],u=h>>16&255,p=h>>8&255,m=h&255,f=l(m,p,u),d=f in o?o[f]:o[f]=Fa(m,p,u,e);s[c]=d}}return s}function Ua(a,e,t,i,n){let r=0,s=1e100;for(let o=0;o<n.length;o++){let l=n[o],c=l[3],h=He(c-i);if(h>s)continue;let u=l[0];if(h+=He(u-a),h>s)continue;let p=l[1];if(h+=He(p-e),h>s)continue;let m=l[2];h+=He(m-t),!(h>s)&&(s=h,r=o)}return r}function Fa(a,e,t,i){let n=0,r=1e100;for(let s=0;s<i.length;s++){let o=i[s],l=o[0],c=He(l-a);if(c>r)continue;let h=o[1];if(c+=He(h-e),c>r)continue;let u=o[2];c+=He(u-t),!(c>r)&&(r=c,n=s)}return n}function He(a){return a*a}function za(a={}){let{initialCapacity:e=4096,auto:t=!0}=a,i=gr(e),n=5003,r=new Uint8Array(256),s=new Int32Array(n),o=new Int32Array(n),l=!1;return{reset(){i.reset(),l=!1},finish(){i.writeByte(Ta.trailer)},bytes(){return i.bytes()},bytesView(){return i.bytesView()},get buffer(){return i.buffer},get stream(){return i},writeHeader:c,writeFrame(h,u,p,m={}){let{transparent:f=!1,transparentIndex:d=0,delay:g=0,palette:_=null,repeat:y=0,colorDepth:x=8,dispose:v=-1}=m,b=!1;if(t?l||(b=!0,c(),l=!0):b=!!m.first,u=Math.max(0,Math.floor(u)),p=Math.max(0,Math.floor(p)),b){if(!_)throw new Error("First frame must include a { palette } option");$a(i,u,p,_,x),Er(i,_),y>=0&&Ba(i,y)}let C=Math.round(g/10);Na(i,v,C,f,d);let E=!!_&&!b;Va(i,u,p,E?_:null),E&&Er(i,_),Ga(i,h,u,p,x,r,s,o)}};function c(){wr(i,"GIF89a")}}function Na(a,e,t,i,n){a.writeByte(33),a.writeByte(249),a.writeByte(4),n<0&&(n=0,i=!1);var r,s;i?(r=1,s=2):(r=0,s=0),e>=0&&(s=e&7),s<<=2,a.writeByte(0|s|0|r),ke(a,t),a.writeByte(n||0),a.writeByte(0)}function $a(a,e,t,i,n=8){let r=1,s=0,o=Yi(i.length)-1,l=r<<7|n-1<<4|s<<3|o;ke(a,e),ke(a,t),a.writeBytes([l,0,0])}function Ba(a,e){a.writeByte(33),a.writeByte(255),a.writeByte(11),wr(a,"NETSCAPE2.0"),a.writeByte(3),a.writeByte(1),ke(a,e),a.writeByte(0)}function Er(a,e){let t=1<<Yi(e.length);for(let i=0;i<t;i++){let n=[0,0,0];i<e.length&&(n=e[i]),a.writeByte(n[0]),a.writeByte(n[1]),a.writeByte(n[2])}}function Va(a,e,t,i){if(a.writeByte(44),ke(a,0),ke(a,0),ke(a,e),ke(a,t),i){let n=0,r=0,s=Yi(i.length)-1;a.writeByte(128|n|r|0|s)}else a.writeByte(0)}function Ga(a,e,t,i,n=8,r,s,o){Oa(t,i,e,n,a,r,s,o)}function ke(a,e){a.writeByte(e&255),a.writeByte(e>>8&255)}function wr(a,e){for(var t=0;t<e.length;t++)a.writeByte(e.charCodeAt(t))}function Yi(a){return Math.max(Math.ceil(Math.log2(a)),1)}class ja{renderer;scene;camera;isRecording=!1;frames=[];mediaRecorder=null;recordedChunks=[];captureCanvas;captureCtx;compositeCanvas;compositeCtx;gifWidth=480;gifHeight=270;legendElement=null;countryLabels=null;constructor(e,t,i){this.renderer=e,this.scene=t,this.camera=i,this.captureCanvas=document.createElement("canvas"),this.captureCtx=this.captureCanvas.getContext("2d",{willReadFrequently:!0}),this.compositeCanvas=document.createElement("canvas"),this.compositeCtx=this.compositeCanvas.getContext("2d")}setLegendElement(e){this.legendElement=e}setCountryLabels(e){this.countryLabels=e}drawCountryLabelsOnCanvas(e,t,i){if(this.countryLabels)try{this.countryLabels.getVisibleLabelsForCanvas(this.camera,t,i).forEach(r=>{e.save(),e.globalAlpha=r.opacity,e.font="bold 12px Arial, sans-serif",e.textAlign="center",e.textBaseline="middle",e.strokeStyle="rgba(0, 0, 0, 0.8)",e.lineWidth=3,e.strokeText(r.text,r.x,r.y),e.fillStyle="#ffffff",e.fillText(r.text,r.x,r.y),e.restore()})}catch(n){console.warn("Failed to draw country labels:",n)}}drawOverlaysOnCanvas(e,t,i){this.drawCountryLabelsOnCanvas(e,t,i),this.drawLegendOnCanvas(e,t,i)}drawLegendOnCanvas(e,t,i){try{if(!this.legendElement||!this.legendElement.classList.contains("visible"))return;const n=this.legendElement,r=n.querySelector(".legend-title"),s=n.querySelector(".legend-gradient"),o=n.querySelector(".legend-min"),l=n.querySelector(".legend-max"),c=n.querySelector(".legend-description");if(!r||!s)return;const h=280,u=100,p=20,m=t-h-p,f=i-u-p,d=12;e.fillStyle="rgba(0, 10, 20, 0.9)",e.strokeStyle="rgba(100, 170, 255, 0.5)",e.lineWidth=2,e.beginPath(),e.roundRect?e.roundRect(m,f,h,u,d):e.rect(m,f,h,u),e.fill(),e.stroke(),e.fillStyle="#44aaff",e.font="bold 18px Arial, sans-serif",e.fillText(r.textContent||"",m+16,f+28);const g=m+16,_=f+40,y=h-32,x=20,v=s.style.background||"";let b=[];const C=v.match(/rgba?\([^)]+\)/g);if(C&&C.length>=2)b=C;else{const E=v.match(/#[0-9a-fA-F]{3,8}/g);E&&E.length>=2&&(b=E)}if(b.length>=2){const E=e.createLinearGradient(g,0,g+y,0);E.addColorStop(0,b[0]),b.length>=3?(E.addColorStop(.5,b[1]),E.addColorStop(1,b[2])):E.addColorStop(1,b[1]),e.fillStyle=E,e.beginPath(),e.roundRect?e.roundRect(g,_,y,x,4):e.rect(g,_,y,x),e.fill()}else{const E=e.createLinearGradient(g,0,g+y,0);E.addColorStop(0,"#cc6600"),E.addColorStop(.5,"#ffaa44"),E.addColorStop(1,"#ffeecc"),e.fillStyle=E,e.beginPath(),e.roundRect?e.roundRect(g,_,y,x,4):e.rect(g,_,y,x),e.fill(),console.log("Legend gradient style:",v)}if(e.fillStyle="#cccccc",e.font="14px Arial, sans-serif",o&&e.fillText(o.textContent||"",g,f+78),l){const E=l.textContent||"",P=e.measureText(E).width;e.fillText(E,g+y-P,f+78)}c&&c.textContent&&(e.fillStyle="#888888",e.font="italic 12px Arial, sans-serif",e.fillText(c.textContent,g,f+95))}catch(n){console.warn("Failed to draw legend on canvas:",n)}}screenshot(e={}){const{width:t=1920,height:i=1080}=e,n=this.renderer.domElement.width,r=this.renderer.domElement.height;this.renderer.setSize(t,i),this.camera.aspect=t/i,this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera),this.compositeCanvas.width=t,this.compositeCanvas.height=i,this.compositeCtx.drawImage(this.renderer.domElement,0,0),this.drawOverlaysOnCanvas(this.compositeCtx,t,i);const s=this.compositeCanvas.toDataURL("image/png");this.renderer.setSize(n,r),this.camera.aspect=n/r,this.camera.updateProjectionMatrix(),this.downloadFile(s,`globe-${Date.now()}.png`)}startVideoRecording(e={}){return new Promise(t=>{if(this.isRecording){t();return}const i=this.renderer.domElement;this.compositeCanvas.width=i.width,this.compositeCanvas.height=i.height,this.compositeCtx.drawImage(i,0,0),this.drawOverlaysOnCanvas(this.compositeCtx,this.compositeCanvas.width,this.compositeCanvas.height);const n=this.compositeCanvas.captureStream(60),r=[{mime:"video/mp4;codecs=avc1",ext:"mp4"},{mime:"video/mp4",ext:"mp4"},{mime:"video/webm;codecs=h264",ext:"webm"},{mime:"video/webm;codecs=vp9",ext:"webm"},{mime:"video/webm;codecs=vp8",ext:"webm"},{mime:"video/webm",ext:"webm"}];let s="video/webm",o="webm";for(const{mime:c,ext:h}of r)if(MediaRecorder.isTypeSupported(c)){s=c,o=h,console.log(`Video recording using: ${c}`);break}this.mediaRecorder=new MediaRecorder(n,{mimeType:s,videoBitsPerSecond:8e6}),this.recordedChunks=[];const l=o;this.mediaRecorder.ondataavailable=c=>{c.data.size>0&&this.recordedChunks.push(c.data)},this.mediaRecorder.onstop=()=>{const c=s.split(";")[0],h=new Blob(this.recordedChunks,{type:c}),u=URL.createObjectURL(h);this.downloadFile(u,`globe-${Date.now()}.${l}`),URL.revokeObjectURL(u)},this.mediaRecorder.onstart=()=>{this.isRecording=!0,setTimeout(()=>t(),50)},this.mediaRecorder.start(100)})}updateVideoFrame(){if(!this.isRecording||!this.mediaRecorder)return;const e=this.compositeCanvas.width,t=this.compositeCanvas.height;this.compositeCtx.drawImage(this.renderer.domElement,0,0,e,t),this.drawOverlaysOnCanvas(this.compositeCtx,e,t)}stopVideoRecording(){!this.isRecording||!this.mediaRecorder||(this.mediaRecorder.stop(),this.isRecording=!1)}startGifCapture(e={}){if(this.isRecording)return;this.frames=[],this.isRecording=!0;const{width:t=480,height:i=270}=e;this.gifWidth=t,this.gifHeight=i,this.captureCanvas.width=t,this.captureCanvas.height=i}captureGifFrame(){if(!this.isRecording)return;const e=this.renderer.domElement,t=this.gifWidth,i=this.gifHeight;this.captureCtx.drawImage(e,0,0,t,i),this.drawOverlaysOnCanvas(this.captureCtx,t,i);const n=this.captureCtx.getImageData(0,0,t,i);this.frames.push({data:new Uint8ClampedArray(n.data),width:t,height:i})}async stopGifCapture(e={}){if(!this.isRecording)return;if(this.isRecording=!1,this.frames.length===0){console.warn("No frames captured for GIF");return}const{fps:t=20,filename:i}=e,n=Math.round(1e3/t);console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);try{const r=this.frames[0],s=r.width,o=r.height,l=Ia(r.data,256),c=za();for(let f=0;f<this.frames.length;f++){const d=this.frames[f],g=ka(d.data,l);c.writeFrame(g,s,o,{palette:f===0?l:void 0,delay:n,repeat:f===0?0:void 0}),f%10===0&&await new Promise(_=>setTimeout(_,0))}c.finish();const h=c.bytes(),u=new Blob([h],{type:"image/gif"}),p=URL.createObjectURL(u),m=i||`globe-${Date.now()}.gif`;this.downloadFile(p,m),setTimeout(()=>URL.revokeObjectURL(p),1e3),console.log(`GIF saved: ${m} (${this.frames.length} frames, ${(u.size/1024).toFixed(1)}KB)`)}catch(r){console.error("Failed to generate GIF:",r)}this.frames=[]}getIsRecording(){return this.isRecording}getFrameCount(){return this.frames.length}downloadFile(e,t){const i=document.createElement("a");i.href=e,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}}class Ya extends A.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new A.Vector2(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element&&t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const lt=new A.Vector3,Cr=new A.Matrix4,Pr=new A.Matrix4,Ar=new A.Vector3,Sr=new A.Vector3;class Ha{constructor(e={}){const t=this;let i,n,r,s;const o={objects:new WeakMap},l=e.element!==void 0?e.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.sortObjects=!0,this.getSize=function(){return{width:i,height:n}},this.render=function(f,d){f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),d.parent===null&&d.matrixWorldAutoUpdate===!0&&d.updateMatrixWorld(),Cr.copy(d.matrixWorldInverse),Pr.multiplyMatrices(d.projectionMatrix,Cr),h(f,f,d),this.sortObjects&&m(f)},this.setSize=function(f,d){i=f,n=d,r=i/2,s=n/2,l.style.width=f+"px",l.style.height=d+"px"};function c(f){f.isCSS2DObject&&(f.element.style.display="none");for(let d=0,g=f.children.length;d<g;d++)c(f.children[d])}function h(f,d,g){if(f.visible===!1){c(f);return}if(f.isCSS2DObject){lt.setFromMatrixPosition(f.matrixWorld),lt.applyMatrix4(Pr);const _=lt.z>=-1&<.z<=1&&f.layers.test(g.layers)===!0,y=f.element;y.style.display=_===!0?"":"none",_===!0&&(f.onBeforeRender(t,d,g),y.style.transform="translate("+-100*f.center.x+"%,"+-100*f.center.y+"%)translate("+(lt.x*r+r)+"px,"+(-lt.y*s+s)+"px)",y.parentNode!==l&&l.appendChild(y),f.onAfterRender(t,d,g));const x={distanceToCameraSquared:u(g,f)};o.objects.set(f,x)}for(let _=0,y=f.children.length;_<y;_++)h(f.children[_],d,g)}function u(f,d){return Ar.setFromMatrixPosition(f.matrixWorld),Sr.setFromMatrixPosition(d.matrixWorld),Ar.distanceToSquared(Sr)}function p(f){const d=[];return f.traverseVisible(function(g){g.isCSS2DObject&&d.push(g)}),d}function m(f){const d=p(f).sort(function(_,y){if(_.renderOrder!==y.renderOrder)return y.renderOrder-_.renderOrder;const x=o.objects.get(_).distanceToCameraSquared,v=o.objects.get(y).distanceToCameraSquared;return x-v}),g=d.length;for(let _=0,y=d.length;_<y;_++)d[_].element.style.zIndex=g-_}}}const Za={CN:[35,105],IN:[22,78],US:[39,-98],ID:[-2,118],PK:[30,70],BR:[-10,-55],NG:[9,8],BD:[24,90],RU:[60,100],MX:[23,-102],JP:[36,138],ET:[9,38.5],PH:[12,122],EG:[27,30],VN:[16,108],DE:[51,10],TR:[39,35],IR:[32,53],TH:[15,101],GB:[54,-2],FR:[46,2],IT:[42.5,12.5],ZA:[-29,24],TZ:[-6,35],KE:[0,38],KR:[36,128],CO:[4,-72],ES:[40,-4],AR:[-34,-64],UG:[1,32],DZ:[28,3],UA:[49,32],IQ:[33,44],PL:[52,20],CA:[56,-106],MA:[32,-5],SA:[24,45],PE:[-10,-76],AU:[-25,134],MY:[4,109.5],GH:[8,-1],NP:[28,84],VE:[7,-66],MG:[-19,47],CM:[6,12],NL:[52.5,5.5],CL:[-34,-71],SE:[62,15],NO:[64,10],SG:[1.3,103.8],NZ:[-42,174],IE:[53,-8],IL:[31,35],AE:[24,54],CH:[47,8],AT:[47.5,14.5],PT:[39.5,-8],GR:[39,22],CZ:[49.8,15.5],BE:[50.8,4],HU:[47,20],FI:[64,26],DK:[56,10],IS:[65,-18],CD:[-3,22],SD:[16,30],AO:[-12.5,18.5],MZ:[-18,35],CI:[7.5,-5.5],NE:[17,10],BF:[12,-1.5],ML:[17,-4],SN:[14.5,-14.5],ZM:[-15,28],ZW:[-19,29.5],RW:[-2,30],AF:[33,65],MM:[21,96],KP:[40,127],MN:[46,105],LK:[7.8,80.8],KZ:[48,67],UZ:[41,64],CU:[22,-79.5],EC:[-1.5,-78.5],GT:[15.5,-90.3],BO:[-17,-65],HN:[15,-86.5],PY:[-23,-58],UY:[-33,-56],CR:[10,-84],PA:[9,-80]},Ka=new Set(["CN","IN","US","BR","RU","JP","DE","GB","FR","AU","CA","MX","ID","SA","ZA","EG","NG","AR","IT","ES","KR","TR","PL","NL","CH","SE","NO","PK","BD","VN"]),Xa=new Set(["CN","IN","US","BR","RU","AU","CA"]),Wa=new Set(["RU","CA","US","CN","BR","AU"]),qa=new Set(["IN","AR","KZ","DZ","CD","SA","MX","ID","SD","LY","IR","MN","PE","TD","NE","AO","ML","ZA","CO","ET","BO","MR","EG","TZ","NG","VE","PK","TR","CL","MM"]),Qa=new Set(["AF","UA","MG","MZ","FR","ES","TH","CM","PG","JP","DE","VN","MY","CI","PL","IT","PH","EC","BF","NZ","GB","GH","RO","LA","GY","OM","BY","KH","SN","UG","NO","SE","FI","MR","ZM","ZW","NP","MA","IQ","BD"]);class Ja{labelRenderer;labels=[];labelGroup;currentStyle="none";sphereRadius;currentMorph=0;globe=null;camera=null;constructor(e,t){this.sphereRadius=t,this.labelRenderer=new Ha;const i=e.clientWidth||800,n=e.clientHeight||600;this.labelRenderer.setSize(i,n),this.labelRenderer.domElement.style.position="absolute",this.labelRenderer.domElement.style.top="0",this.labelRenderer.domElement.style.left="0",this.labelRenderer.domElement.style.pointerEvents="none",e.appendChild(this.labelRenderer.domElement),this.labelGroup=new D.Group,this.injectStyles(),this.createLabels()}injectStyles(){const e=document.createElement("style");e.textContent=`
|
|
541
|
+
`,e.appendChild(this.element),this.updateSize(),this.resizeObserver=new ResizeObserver(()=>this.updateSize()),this.resizeObserver.observe(e)}getSizeClass(e,t){const i=Math.min(e,t);return i<200?"xs":i<300?"sm":i<450?"md":"lg"}updateSize(){const e=this.parentContainer.clientWidth,t=this.parentContainer.clientHeight,i=this.getSizeClass(e,t);this.element.classList.remove("size-xs","size-sm","size-md","size-lg"),this.element.classList.add(`size-${i}`)}show(e){const t=this.element.querySelector(".gralobe-legend-title"),i=this.element.querySelector(".gralobe-legend-gradient"),n=this.element.querySelector(".gralobe-legend-min"),r=this.element.querySelector(".gralobe-legend-max"),s=this.element.querySelector(".gralobe-legend-description");t.textContent=e.name,s.textContent=e.description;const[o,l,c]=e.colorScale;i.style.background=`linear-gradient(to right, ${o}, ${l}, ${c})`;const h=e.format??Vi(e.unit);n.textContent=h(e.domain[0]),r.textContent=h(e.domain[1]),this.element.classList.add("visible"),this.visible=!0}hide(){this.element.classList.remove("visible"),this.visible=!1}isVisible(){return this.visible}getElement(){return this.element}dispose(){this.resizeObserver?.disconnect(),this.element.remove()}}var Ta={trailer:59};function gr(a=256){let e=0,t=new Uint8Array(a);return{get buffer(){return t.buffer},reset(){e=0},bytesView(){return t.subarray(0,e)},bytes(){return t.slice(0,e)},writeByte(n){i(e+1),t[e]=n,e++},writeBytes(n,r=0,s=n.length){i(e+s);for(let o=0;o<s;o++)t[e++]=n[o+r]},writeBytesView(n,r=0,s=n.byteLength){i(e+s),t.set(n.subarray(r,r+s),e),e+=s}};function i(n){var r=t.length;if(r>=n)return;var s=1024*1024;n=Math.max(n,r*(r<s?2:1.125)>>>0),r!=0&&(n=Math.max(n,256));let o=t;t=new Uint8Array(n),e>0&&t.set(o.subarray(0,e),0)}}var Gi=12,_r=5003,Da=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function Ma(a,e,t,i,n=gr(512),r=new Uint8Array(256),s=new Int32Array(_r),o=new Int32Array(_r)){let l=s.length,c=Math.max(2,i);r.fill(0),o.fill(0),s.fill(-1);let h=0,u=0,p=c+1,m=p,f=!1,d=m,g=(1<<d)-1,_=1<<p-1,y=_+1,x=_+2,v=0,b=t[0],C=0;for(let w=l;w<65536;w*=2)++C;C=8-C,n.writeByte(c),P(_);let E=t.length;for(let w=1;w<E;w++)e:{let T=t[w],O=(T<<Gi)+b,S=T<<C^b;if(s[S]===O){b=o[S];break e}let R=S===0?1:l-S;for(;s[S]>=0;)if(S-=R,S<0&&(S+=l),s[S]===O){b=o[S];break e}P(b),b=T,x<1<<Gi?(o[S]=x++,s[S]=O):(s.fill(-1),x=_+2,f=!0,P(_))}return P(b),P(y),n.writeByte(0),n.bytesView();function P(w){for(h&=Da[u],u>0?h|=w<<u:h=w,u+=d;u>=8;)r[v++]=h&255,v>=254&&(n.writeByte(v),n.writeBytesView(r,0,v),v=0),h>>=8,u-=8;if((x>g||f)&&(f?(d=m,g=(1<<d)-1,f=!1):(++d,g=d===Gi?1<<d:(1<<d)-1)),w==y){for(;u>0;)r[v++]=h&255,v>=254&&(n.writeByte(v),n.writeBytesView(r,0,v),v=0),h>>=8,u-=8;v>0&&(n.writeByte(v),n.writeBytesView(r,0,v),v=0)}}}var Oa=Ma;function yr(a,e,t){return a<<8&63488|e<<2&992|t>>3}function xr(a,e,t,i){return a>>4|e&240|(t&240)<<4|(i&240)<<8}function br(a,e,t){return a>>4<<8|e&240|t>>4}function Yt(a,e,t){return a<e?e:a>t?t:a}function Ht(a){return a*a}function vr(a,e,t){var i=0,n=1e100;let r=a[e],s=r.cnt;r.ac;let o=r.rc,l=r.gc,c=r.bc;for(var h=r.fw;h!=0;h=a[h].fw){let p=a[h],m=p.cnt,f=s*m/(s+m);if(!(f>=n)){var u=0;u+=f*Ht(p.rc-o),!(u>=n)&&(u+=f*Ht(p.gc-l),!(u>=n)&&(u+=f*Ht(p.bc-c),!(u>=n)&&(n=u,i=h)))}}r.err=n,r.nn=i}function ji(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function Ra(a,e){let t=e==="rgb444"?4096:65536,i=new Array(t),n=a.length;if(e==="rgba4444")for(let r=0;r<n;++r){let s=a[r],o=s>>24&255,l=s>>16&255,c=s>>8&255,h=s&255,u=xr(h,c,l,o),p=u in i?i[u]:i[u]=ji();p.rc+=h,p.gc+=c,p.bc+=l,p.ac+=o,p.cnt++}else if(e==="rgb444")for(let r=0;r<n;++r){let s=a[r],o=s>>16&255,l=s>>8&255,c=s&255,h=br(c,l,o),u=h in i?i[h]:i[h]=ji();u.rc+=c,u.gc+=l,u.bc+=o,u.cnt++}else for(let r=0;r<n;++r){let s=a[r],o=s>>16&255,l=s>>8&255,c=s&255,h=yr(c,l,o),u=h in i?i[h]:i[h]=ji();u.rc+=c,u.gc+=l,u.bc+=o,u.cnt++}return i}function Ia(a,e,t={}){let{format:i="rgb565",clearAlpha:n=!0,clearAlphaColor:r=0,clearAlphaThreshold:s=0,oneBitAlpha:o=!1}=t;if(!a||!a.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(a instanceof Uint8Array)&&!(a instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let l=new Uint32Array(a.buffer),c=t.useSqrt!==!1,h=i==="rgba4444",u=Ra(l,i),p=u.length,m=p-1,f=new Uint32Array(p+1);for(var d=0,g=0;g<p;++g){let I=u[g];if(I!=null){var _=1/I.cnt;h&&(I.ac*=_),I.rc*=_,I.gc*=_,I.bc*=_,u[d++]=I}}Ht(e)/d<.022&&(c=!1);for(var g=0;g<d-1;++g)u[g].fw=g+1,u[g+1].bk=g,c&&(u[g].cnt=Math.sqrt(u[g].cnt));c&&(u[g].cnt=Math.sqrt(u[g].cnt));var y,x,v;for(g=0;g<d;++g){vr(u,g);var b=u[g].err;for(x=++f[0];x>1&&(v=x>>1,!(u[y=f[v]].err<=b));x=v)f[x]=y;f[x]=g}var C=d-e;for(g=0;g<C;){for(var E;;){var P=f[1];if(E=u[P],E.tm>=E.mtm&&u[E.nn].mtm<=E.tm)break;E.mtm==m?P=f[1]=f[f[0]--]:(vr(u,P),E.tm=g);var b=u[P].err;for(x=1;(v=x+x)<=f[0]&&(v<f[0]&&u[f[v]].err>u[f[v+1]].err&&v++,!(b<=u[y=f[v]].err));x=v)f[x]=y;f[x]=P}var w=u[E.nn],T=E.cnt,O=w.cnt,_=1/(T+O);h&&(E.ac=_*(T*E.ac+O*w.ac)),E.rc=_*(T*E.rc+O*w.rc),E.gc=_*(T*E.gc+O*w.gc),E.bc=_*(T*E.bc+O*w.bc),E.cnt+=w.cnt,E.mtm=++g,u[w.bk].fw=w.fw,u[w.fw].bk=w.bk,w.mtm=m}let S=[];var R=0;for(g=0;;++R){let I=Yt(Math.round(u[g].rc),0,255),G=Yt(Math.round(u[g].gc),0,255),N=Yt(Math.round(u[g].bc),0,255),F=255;h&&(F=Yt(Math.round(u[g].ac),0,255),o&&(F=F<=(typeof o=="number"?o:127)?0:255),n&&F<=s&&(I=G=N=r,F=0));let se=h?[I,G,N,F]:[I,G,N];if(La(S,se)||S.push(se),(g=u[g].fw)==0)break}return S}function La(a,e){for(let t=0;t<a.length;t++){let i=a[t],n=i[0]===e[0]&&i[1]===e[1]&&i[2]===e[2],r=i.length>=4&&e.length>=4?i[3]===e[3]:!0;if(n&&r)return!0}return!1}function ka(a,e,t="rgb565"){if(!a||!a.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(a instanceof Uint8Array)&&!(a instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(e.length>256)throw new Error("applyPalette() only works with 256 colors or less");let i=new Uint32Array(a.buffer),n=i.length,r=t==="rgb444"?4096:65536,s=new Uint8Array(n),o=new Array(r);if(t==="rgba4444")for(let l=0;l<n;l++){let c=i[l],h=c>>24&255,u=c>>16&255,p=c>>8&255,m=c&255,f=xr(m,p,u,h),d=f in o?o[f]:o[f]=Ua(m,p,u,h,e);s[l]=d}else{let l=t==="rgb444"?br:yr;for(let c=0;c<n;c++){let h=i[c],u=h>>16&255,p=h>>8&255,m=h&255,f=l(m,p,u),d=f in o?o[f]:o[f]=Fa(m,p,u,e);s[c]=d}}return s}function Ua(a,e,t,i,n){let r=0,s=1e100;for(let o=0;o<n.length;o++){let l=n[o],c=l[3],h=He(c-i);if(h>s)continue;let u=l[0];if(h+=He(u-a),h>s)continue;let p=l[1];if(h+=He(p-e),h>s)continue;let m=l[2];h+=He(m-t),!(h>s)&&(s=h,r=o)}return r}function Fa(a,e,t,i){let n=0,r=1e100;for(let s=0;s<i.length;s++){let o=i[s],l=o[0],c=He(l-a);if(c>r)continue;let h=o[1];if(c+=He(h-e),c>r)continue;let u=o[2];c+=He(u-t),!(c>r)&&(r=c,n=s)}return n}function He(a){return a*a}function za(a={}){let{initialCapacity:e=4096,auto:t=!0}=a,i=gr(e),n=5003,r=new Uint8Array(256),s=new Int32Array(n),o=new Int32Array(n),l=!1;return{reset(){i.reset(),l=!1},finish(){i.writeByte(Ta.trailer)},bytes(){return i.bytes()},bytesView(){return i.bytesView()},get buffer(){return i.buffer},get stream(){return i},writeHeader:c,writeFrame(h,u,p,m={}){let{transparent:f=!1,transparentIndex:d=0,delay:g=0,palette:_=null,repeat:y=0,colorDepth:x=8,dispose:v=-1}=m,b=!1;if(t?l||(b=!0,c(),l=!0):b=!!m.first,u=Math.max(0,Math.floor(u)),p=Math.max(0,Math.floor(p)),b){if(!_)throw new Error("First frame must include a { palette } option");$a(i,u,p,_,x),Er(i,_),y>=0&&Ba(i,y)}let C=Math.round(g/10);Na(i,v,C,f,d);let E=!!_&&!b;Va(i,u,p,E?_:null),E&&Er(i,_),Ga(i,h,u,p,x,r,s,o)}};function c(){wr(i,"GIF89a")}}function Na(a,e,t,i,n){a.writeByte(33),a.writeByte(249),a.writeByte(4),n<0&&(n=0,i=!1);var r,s;i?(r=1,s=2):(r=0,s=0),e>=0&&(s=e&7),s<<=2,a.writeByte(0|s|0|r),ke(a,t),a.writeByte(n||0),a.writeByte(0)}function $a(a,e,t,i,n=8){let r=1,s=0,o=Yi(i.length)-1,l=r<<7|n-1<<4|s<<3|o;ke(a,e),ke(a,t),a.writeBytes([l,0,0])}function Ba(a,e){a.writeByte(33),a.writeByte(255),a.writeByte(11),wr(a,"NETSCAPE2.0"),a.writeByte(3),a.writeByte(1),ke(a,e),a.writeByte(0)}function Er(a,e){let t=1<<Yi(e.length);for(let i=0;i<t;i++){let n=[0,0,0];i<e.length&&(n=e[i]),a.writeByte(n[0]),a.writeByte(n[1]),a.writeByte(n[2])}}function Va(a,e,t,i){if(a.writeByte(44),ke(a,0),ke(a,0),ke(a,e),ke(a,t),i){let n=0,r=0,s=Yi(i.length)-1;a.writeByte(128|n|r|0|s)}else a.writeByte(0)}function Ga(a,e,t,i,n=8,r,s,o){Oa(t,i,e,n,a,r,s,o)}function ke(a,e){a.writeByte(e&255),a.writeByte(e>>8&255)}function wr(a,e){for(var t=0;t<e.length;t++)a.writeByte(e.charCodeAt(t))}function Yi(a){return Math.max(Math.ceil(Math.log2(a)),1)}class ja{renderer;scene;camera;isRecording=!1;frames=[];mediaRecorder=null;recordedChunks=[];captureCanvas;captureCtx;compositeCanvas;compositeCtx;gifWidth=480;gifHeight=270;legendElement=null;countryLabels=null;constructor(e,t,i){this.renderer=e,this.scene=t,this.camera=i,this.captureCanvas=document.createElement("canvas"),this.captureCtx=this.captureCanvas.getContext("2d",{willReadFrequently:!0}),this.compositeCanvas=document.createElement("canvas"),this.compositeCtx=this.compositeCanvas.getContext("2d")}setLegendElement(e){this.legendElement=e}setCountryLabels(e){this.countryLabels=e}drawCountryLabelsOnCanvas(e,t,i){if(this.countryLabels)try{this.countryLabels.getVisibleLabelsForCanvas(this.camera,t,i).forEach(r=>{e.save(),e.globalAlpha=r.opacity,e.font="bold 12px Arial, sans-serif",e.textAlign="center",e.textBaseline="middle",e.strokeStyle="rgba(0, 0, 0, 0.8)",e.lineWidth=3,e.strokeText(r.text,r.x,r.y),e.fillStyle="#ffffff",e.fillText(r.text,r.x,r.y),e.restore()})}catch(n){console.warn("Failed to draw country labels:",n)}}drawOverlaysOnCanvas(e,t,i){this.drawCountryLabelsOnCanvas(e,t,i),this.drawLegendOnCanvas(e,t,i)}drawLegendOnCanvas(e,t,i){try{if(!this.legendElement||!this.legendElement.classList.contains("visible"))return;const n=this.legendElement,r=n.querySelector(".legend-title"),s=n.querySelector(".legend-gradient"),o=n.querySelector(".legend-min"),l=n.querySelector(".legend-max"),c=n.querySelector(".legend-description");if(!r||!s)return;const h=280,u=100,p=20,m=t-h-p,f=i-u-p,d=12;e.fillStyle="rgba(0, 10, 20, 0.9)",e.strokeStyle="rgba(100, 170, 255, 0.5)",e.lineWidth=2,e.beginPath(),e.roundRect?e.roundRect(m,f,h,u,d):e.rect(m,f,h,u),e.fill(),e.stroke(),e.fillStyle="#44aaff",e.font="bold 18px Arial, sans-serif",e.fillText(r.textContent||"",m+16,f+28);const g=m+16,_=f+40,y=h-32,x=20,v=s.style.background||"";let b=[];const C=v.match(/rgba?\([^)]+\)/g);if(C&&C.length>=2)b=C;else{const E=v.match(/#[0-9a-fA-F]{3,8}/g);E&&E.length>=2&&(b=E)}if(b.length>=2){const E=e.createLinearGradient(g,0,g+y,0);E.addColorStop(0,b[0]),b.length>=3?(E.addColorStop(.5,b[1]),E.addColorStop(1,b[2])):E.addColorStop(1,b[1]),e.fillStyle=E,e.beginPath(),e.roundRect?e.roundRect(g,_,y,x,4):e.rect(g,_,y,x),e.fill()}else{const E=e.createLinearGradient(g,0,g+y,0);E.addColorStop(0,"#cc6600"),E.addColorStop(.5,"#ffaa44"),E.addColorStop(1,"#ffeecc"),e.fillStyle=E,e.beginPath(),e.roundRect?e.roundRect(g,_,y,x,4):e.rect(g,_,y,x),e.fill(),console.log("Legend gradient style:",v)}if(e.fillStyle="#cccccc",e.font="14px Arial, sans-serif",o&&e.fillText(o.textContent||"",g,f+78),l){const E=l.textContent||"",P=e.measureText(E).width;e.fillText(E,g+y-P,f+78)}c&&c.textContent&&(e.fillStyle="#888888",e.font="italic 12px Arial, sans-serif",e.fillText(c.textContent,g,f+95))}catch(n){console.warn("Failed to draw legend on canvas:",n)}}screenshot(e={}){const{width:t=1920,height:i=1080}=e,n=this.renderer.domElement.width,r=this.renderer.domElement.height;this.renderer.setSize(t,i),this.camera.aspect=t/i,this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera),this.compositeCanvas.width=t,this.compositeCanvas.height=i,this.compositeCtx.drawImage(this.renderer.domElement,0,0),this.drawOverlaysOnCanvas(this.compositeCtx,t,i);const s=this.compositeCanvas.toDataURL("image/png");this.renderer.setSize(n,r),this.camera.aspect=n/r,this.camera.updateProjectionMatrix(),this.downloadFile(s,`globe-${Date.now()}.png`)}startVideoRecording(e={}){return new Promise(t=>{if(this.isRecording){t();return}const i=this.renderer.domElement;this.compositeCanvas.width=i.width,this.compositeCanvas.height=i.height,this.compositeCtx.drawImage(i,0,0),this.drawOverlaysOnCanvas(this.compositeCtx,this.compositeCanvas.width,this.compositeCanvas.height);const n=this.compositeCanvas.captureStream(60),r=[{mime:"video/mp4;codecs=avc1",ext:"mp4"},{mime:"video/mp4",ext:"mp4"},{mime:"video/webm;codecs=h264",ext:"webm"},{mime:"video/webm;codecs=vp9",ext:"webm"},{mime:"video/webm;codecs=vp8",ext:"webm"},{mime:"video/webm",ext:"webm"}];let s="video/webm",o="webm";for(const{mime:c,ext:h}of r)if(MediaRecorder.isTypeSupported(c)){s=c,o=h,console.log(`Video recording using: ${c}`);break}this.mediaRecorder=new MediaRecorder(n,{mimeType:s,videoBitsPerSecond:8e6}),this.recordedChunks=[];const l=o;this.mediaRecorder.ondataavailable=c=>{c.data.size>0&&this.recordedChunks.push(c.data)},this.mediaRecorder.onstop=()=>{const c=s.split(";")[0],h=new Blob(this.recordedChunks,{type:c}),u=URL.createObjectURL(h);this.downloadFile(u,`globe-${Date.now()}.${l}`),URL.revokeObjectURL(u)},this.mediaRecorder.onstart=()=>{this.isRecording=!0,setTimeout(()=>t(),50)},this.mediaRecorder.start(100)})}updateVideoFrame(){if(!this.isRecording||!this.mediaRecorder)return;const e=this.compositeCanvas.width,t=this.compositeCanvas.height;this.compositeCtx.drawImage(this.renderer.domElement,0,0,e,t),this.drawOverlaysOnCanvas(this.compositeCtx,e,t)}stopVideoRecording(){!this.isRecording||!this.mediaRecorder||(this.mediaRecorder.stop(),this.isRecording=!1)}startGifCapture(e={}){if(this.isRecording)return;this.frames=[],this.isRecording=!0;const{width:t=480,height:i=270}=e;this.gifWidth=t,this.gifHeight=i,this.captureCanvas.width=t,this.captureCanvas.height=i}captureGifFrame(){if(!this.isRecording)return;const e=this.renderer.domElement,t=this.gifWidth,i=this.gifHeight;this.captureCtx.drawImage(e,0,0,t,i),this.drawOverlaysOnCanvas(this.captureCtx,t,i);const n=this.captureCtx.getImageData(0,0,t,i);this.frames.push({data:new Uint8ClampedArray(n.data),width:t,height:i})}async stopGifCapture(e={}){if(!this.isRecording)return;if(this.isRecording=!1,this.frames.length===0){console.warn("No frames captured for GIF");return}const{fps:t=20,filename:i}=e,n=Math.round(1e3/t);console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);try{const r=this.frames[0],s=r.width,o=r.height,l=Ia(r.data,256),c=za();for(let f=0;f<this.frames.length;f++){const d=this.frames[f],g=ka(d.data,l);c.writeFrame(g,s,o,{palette:f===0?l:void 0,delay:n,repeat:f===0?0:void 0}),f%10===0&&await new Promise(_=>setTimeout(_,0))}c.finish();const h=c.bytes(),u=new Blob([h],{type:"image/gif"}),p=URL.createObjectURL(u),m=i||`globe-${Date.now()}.gif`;this.downloadFile(p,m),setTimeout(()=>URL.revokeObjectURL(p),1e3),console.log(`GIF saved: ${m} (${this.frames.length} frames, ${(u.size/1024).toFixed(1)}KB)`)}catch(r){console.error("Failed to generate GIF:",r)}this.frames=[]}getIsRecording(){return this.isRecording}getFrameCount(){return this.frames.length}downloadFile(e,t){const i=document.createElement("a");i.href=e,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}}class Ya extends A.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new A.Vector2(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element&&t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const lt=new A.Vector3,Cr=new A.Matrix4,Pr=new A.Matrix4,Ar=new A.Vector3,Sr=new A.Vector3;class Ha{constructor(e={}){const t=this;let i,n,r,s;const o={objects:new WeakMap},l=e.element!==void 0?e.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.sortObjects=!0,this.getSize=function(){return{width:i,height:n}},this.render=function(f,d){f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),d.parent===null&&d.matrixWorldAutoUpdate===!0&&d.updateMatrixWorld(),Cr.copy(d.matrixWorldInverse),Pr.multiplyMatrices(d.projectionMatrix,Cr),h(f,f,d),this.sortObjects&&m(f)},this.setSize=function(f,d){i=f,n=d,r=i/2,s=n/2,l.style.width=f+"px",l.style.height=d+"px"};function c(f){f.isCSS2DObject&&(f.element.style.display="none");for(let d=0,g=f.children.length;d<g;d++)c(f.children[d])}function h(f,d,g){if(f.visible===!1){c(f);return}if(f.isCSS2DObject){lt.setFromMatrixPosition(f.matrixWorld),lt.applyMatrix4(Pr);const _=lt.z>=-1&<.z<=1&&f.layers.test(g.layers)===!0,y=f.element;y.style.display=_===!0?"":"none",_===!0&&(f.onBeforeRender(t,d,g),y.style.transform="translate("+-100*f.center.x+"%,"+-100*f.center.y+"%)translate("+(lt.x*r+r)+"px,"+(-lt.y*s+s)+"px)",y.parentNode!==l&&l.appendChild(y),f.onAfterRender(t,d,g));const x={distanceToCameraSquared:u(g,f)};o.objects.set(f,x)}for(let _=0,y=f.children.length;_<y;_++)h(f.children[_],d,g)}function u(f,d){return Ar.setFromMatrixPosition(f.matrixWorld),Sr.setFromMatrixPosition(d.matrixWorld),Ar.distanceToSquared(Sr)}function p(f){const d=[];return f.traverseVisible(function(g){g.isCSS2DObject&&d.push(g)}),d}function m(f){const d=p(f).sort(function(_,y){if(_.renderOrder!==y.renderOrder)return y.renderOrder-_.renderOrder;const x=o.objects.get(_).distanceToCameraSquared,v=o.objects.get(y).distanceToCameraSquared;return x-v}),g=d.length;for(let _=0,y=d.length;_<y;_++)d[_].element.style.zIndex=g-_}}}const Za={CN:[35,105],IN:[22,78],US:[39,-98],ID:[-2,118],PK:[30,70],BR:[-10,-55],NG:[9,8],BD:[24,90],RU:[60,100],MX:[23,-102],JP:[36,138],ET:[9,38.5],PH:[12,122],EG:[27,30],VN:[16,108],DE:[51,10],TR:[39,35],IR:[32,53],TH:[15,101],GB:[54,-2],FR:[46,2],IT:[42.5,12.5],ZA:[-29,24],TZ:[-6,35],KE:[0,38],KR:[36,128],CO:[4,-72],ES:[40,-4],AR:[-34,-64],UG:[1,32],DZ:[28,3],UA:[49,32],IQ:[33,44],PL:[52,20],CA:[56,-106],MA:[32,-5],SA:[24,45],PE:[-10,-76],AU:[-25,134],MY:[4,109.5],GH:[8,-1],NP:[28,84],VE:[7,-66],MG:[-19,47],CM:[6,12],NL:[52.5,5.5],CL:[-34,-71],SE:[62,15],NO:[64,10],SG:[1.3,103.8],NZ:[-42,174],IE:[53,-8],IL:[31,35],AE:[24,54],CH:[47,8],AT:[47.5,14.5],PT:[39.5,-8],GR:[39,22],CZ:[49.8,15.5],BE:[50.8,4],HU:[47,20],FI:[64,26],DK:[56,10],IS:[65,-18],CD:[-3,22],SD:[16,30],AO:[-12.5,18.5],MZ:[-18,35],CI:[7.5,-5.5],NE:[17,10],BF:[12,-1.5],ML:[17,-4],SN:[14.5,-14.5],ZM:[-15,28],ZW:[-19,29.5],RW:[-2,30],AF:[33,65],MM:[21,96],KP:[40,127],MN:[46,105],LK:[7.8,80.8],KZ:[48,67],UZ:[41,64],CU:[22,-79.5],EC:[-1.5,-78.5],GT:[15.5,-90.3],BO:[-17,-65],HN:[15,-86.5],PY:[-23,-58],UY:[-33,-56],CR:[10,-84],PA:[9,-80]},Ka=new Set(["CN","IN","US","BR","RU","JP","DE","GB","FR","AU","CA","MX","ID","SA","ZA","EG","NG","AR","IT","ES","KR","TR","PL","NL","CH","SE","NO","PK","BD","VN"]),Wa=new Set(["CN","IN","US","BR","RU","AU","CA"]),Xa=new Set(["RU","CA","US","CN","BR","AU"]),qa=new Set(["IN","AR","KZ","DZ","CD","SA","MX","ID","SD","LY","IR","MN","PE","TD","NE","AO","ML","ZA","CO","ET","BO","MR","EG","TZ","NG","VE","PK","TR","CL","MM"]),Qa=new Set(["AF","UA","MG","MZ","FR","ES","TH","CM","PG","JP","DE","VN","MY","CI","PL","IT","PH","EC","BF","NZ","GB","GH","RO","LA","GY","OM","BY","KH","SN","UG","NO","SE","FI","MR","ZM","ZW","NP","MA","IQ","BD"]);class Ja{labelRenderer;labels=[];labelGroup;currentStyle="none";sphereRadius;currentMorph=0;globe=null;camera=null;constructor(e,t){this.sphereRadius=t,this.labelRenderer=new Ha;const i=e.clientWidth||800,n=e.clientHeight||600;this.labelRenderer.setSize(i,n),this.labelRenderer.domElement.style.position="absolute",this.labelRenderer.domElement.style.top="0",this.labelRenderer.domElement.style.left="0",this.labelRenderer.domElement.style.pointerEvents="none",e.appendChild(this.labelRenderer.domElement),this.labelGroup=new D.Group,this.injectStyles(),this.createLabels()}injectStyles(){const e=document.createElement("style");e.textContent=`
|
|
542
542
|
.country-label {
|
|
543
543
|
font-family: system-ui, -apple-system, sans-serif;
|
|
544
544
|
font-weight: 500;
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
font-size: 5px;
|
|
624
624
|
color: rgba(255, 255, 255, 0.6);
|
|
625
625
|
}
|
|
626
|
-
`,document.head.appendChild(e)}getSizeCategory(e){return
|
|
626
|
+
`,document.head.appendChild(e)}getSizeCategory(e){return Xa.has(e)?"large":qa.has(e)?"medium":Qa.has(e)?"small":"tiny"}createLabels(){$i.forEach(e=>{const t=Za[e.code];if(!t)return;const[i,n]=t,r=this.getSizeCategory(e.code),s=document.createElement("div");s.className=`country-label hidden size-${r}`,s.textContent=e.name;const o=new Ya(s),l={element:s,object:o,country:e,lat:i,lon:n,sizeCategory:r};this.labelGroup.add(o),this.labels.push(l),this.updateLabelPosition(o,l,this.currentMorph)})}localPos=new D.Vector3;worldPos=new D.Vector3;cameraDirection=new D.Vector3;labelNormal=new D.Vector3;updateLabelPosition(e,t,i){const{lat:n,lon:r,element:s}=t,o=(r+180)/360,l=(n+90)/180,c=(o-.5)*2*Math.PI,h=(l-.5)*Math.PI,u=this.sphereRadius+.3,p=u*Math.cos(h)*Math.sin(c),m=u*Math.sin(h),f=u*Math.cos(h)*Math.cos(c),d=2*Math.PI*this.sphereRadius,g=Math.PI*this.sphereRadius,_=(o-.5)*d,y=(l-.5)*g,x=.3,v=i*i*(3-2*i);if(this.localPos.set(_+v*(p-_),y+v*(m-y),x+v*(f-x)),this.globe)if(this.worldPos.copy(this.localPos),this.worldPos.applyMatrix4(this.globe.matrixWorld),e.position.copy(this.worldPos),this.camera&&v>.5){this.cameraDirection.copy(this.camera.position).normalize(),this.labelNormal.set(p,m,f).normalize(),this.labelNormal.applyMatrix4(this.globe.matrixWorld).normalize();const b=this.labelNormal.dot(this.cameraDirection);s.style.opacity=b>.15?"":"0"}else s.style.opacity="";else e.position.copy(this.localPos),s.style.opacity=""}getGroup(){return this.labelGroup}setStyle(e){this.currentStyle=e,this.labels.forEach(t=>{const i=t.country.code;let n=!1;switch(e){case"none":n=!1;break;case"minimal":n=Wa.has(i);break;case"major":n=Ka.has(i);break;case"all":case"capitals":n=!0;break}t.element.classList.toggle("hidden",!n)}),this.labelRenderer.domElement.className=`label-style-${e}`}setMorph(e){this.currentMorph=e}setGlobe(e){this.globe=e}setCamera(e){this.camera=e}update(){this.currentStyle!=="none"&&this.labels.forEach(e=>{this.updateLabelPosition(e.object,e,this.currentMorph)})}render(e,t){this.currentStyle!=="none"&&this.labelRenderer.render(e,t)}resize(e,t){this.labelRenderer.setSize(e,t)}getStyle(){return this.currentStyle}getVisibleLabelsForCanvas(e,t,i){if(this.currentStyle==="none")return[];const n=[],r=new D.Vector3;return this.labels.forEach(s=>{const o=s.element.style.opacity,l=o===""?1:parseFloat(o)||0;if(l<.1||s.element.classList.contains("hidden"))return;s.object.getWorldPosition(r),r.project(e);const c=(r.x*.5+.5)*t,h=(-r.y*.5+.5)*i;c>=0&&c<=t&&h>=0&&h<=i&&r.z<1&&n.push({text:s.country.name,x:c,y:h,opacity:l})}),n}dispose(){this.labels.forEach(e=>{this.labelGroup.remove(e.object),e.element.remove()}),this.labels=[],this.labelRenderer.domElement.remove()}}const Zt={lifeExpectancy:{id:"lifeExpectancy",name:"Life Expectancy",unit:"years",description:"Average life expectancy at birth",colorScale:["#feedde","#fdbe85","#d94701"],domain:[55,85],format:a=>`${a.toFixed(1)} years`},humanDevIndex:{id:"humanDevIndex",name:"Human Development Index",unit:"",description:"UN composite index of life expectancy, education, and income",colorScale:["#fee5d9","#fcae91","#cb181d"],domain:[.4,1],format:a=>a.toFixed(3)},gdpPerCapita:{id:"gdpPerCapita",name:"GDP per Capita (PPP)",unit:"$",description:"Purchasing power parity adjusted GDP per person",colorScale:["#edf8e9","#74c476","#006d2c"],domain:[1e3,8e4],format:a=>`$${(a/1e3).toFixed(1)}k`},co2Emissions:{id:"co2Emissions",name:"CO₂ Emissions",unit:"t/capita",description:"Carbon dioxide emissions per capita",colorScale:["#f7fbff","#6baed6","#08306b"],domain:[0,20],format:a=>`${a.toFixed(1)}t`},renewableEnergy:{id:"renewableEnergy",name:"Renewable Energy",unit:"%",description:"Share of renewable energy in total energy consumption",colorScale:["#f7fcf5","#74c476","#00441b"],domain:[0,100],format:a=>`${a.toFixed(0)}%`},internetUsers:{id:"internetUsers",name:"Internet Penetration",unit:"%",description:"Percentage of population using the internet",colorScale:["#f2f0f7","#9e9ac8","#54278f"],domain:[0,100],format:a=>`${a.toFixed(0)}%`},urbanPopulation:{id:"urbanPopulation",name:"Urbanization",unit:"%",description:"Percentage of population living in urban areas",colorScale:["#fff5eb","#fd8d3c","#7f2704"],domain:[15,100],format:a=>`${a.toFixed(0)}%`},healthExpenditure:{id:"healthExpenditure",name:"Health Spending",unit:"% GDP",description:"Total health expenditure as percentage of GDP",colorScale:["#fff5f0","#fb6a4a","#99000d"],domain:[2,18],format:a=>`${a.toFixed(1)}%`},forestArea:{id:"forestArea",name:"Forest Coverage",unit:"%",description:"Forest area as percentage of total land area",colorScale:["#f7fcf5","#41ab5d","#00441b"],domain:[0,75],format:a=>`${a.toFixed(0)}%`},population:{id:"population",name:"Population",unit:"millions",description:"Total population",colorScale:["#fff7bc","#fec44f","#d95f0e"],domain:[1,1500],format:a=>`${a.toFixed(0)}M`},accessElectricity:{id:"accessElectricity",name:"Electricity Access",unit:"%",description:"Percentage of population with access to electricity",colorScale:["#ffeda0","#feb24c","#f03b20"],domain:[20,100],format:a=>`${a.toFixed(0)}%`},educationExpenditure:{id:"educationExpenditure",name:"Education Spending",unit:"% GDP",description:"Government expenditure on education as percentage of GDP",colorScale:["#edf8fb","#7bccc4","#0868ac"],domain:[1,10],format:a=>`${a.toFixed(1)}%`}};Zt.lifeExpectancy;const Ze=50,eo=`
|
|
627
627
|
uniform float uMorph;
|
|
628
628
|
uniform float uTime;
|
|
629
629
|
uniform float uParchment;
|