PageSourceSearch

https://sorare.com/assets/index-CKnm-TIv.js

js sorare.com collected 2026-10-02 02:28:42 UTC 26,482 bytes, 11 lines download raw bytes

1import{aK as k,bU as j,bD as p}from"./vendor-DC5tXEj4.js";import{a as W,B as H,E as G,d as V}from"./index-DVd5g8YC.js";import{h as q,C as Q}from"./index-DiwQy4ZV.js";import{C as $}from"./index-BlRvkdRK.js";import{S as J}from"./index-CKkm2lxn.js";import{l as tt,b5 as M,a4 as R,aT as O,az as U,aQ as Z,b4 as A,aE as et,au as it,a6 as st,be as ot,bo as I,bk as X}from"./events-5a94e5eb.esm-CgWYB76g.js";import{i as nt,a as at}from"./index-6vc_46wA.js";import"./index-CeJ24_jo.js";import"./useFindMaterial-CIXP7BlD.js";import"./GLTFLoader-DLpJAEQz.js";import"./with-selector-BmbQ0ihJ.js";try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="da4b7351-190b-4e40-9d70-77d245b6eeff",e._sentryDebugIdIdentifier="sentry-dbid-da4b7351-190b-4e40-9d70-77d245b6eeff")})()}catch{}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(t){for(var i=1;i<arguments.length;i++){var s=arguments[i];if(s!=null)for(var o in s)s.hasOwnProperty(o)&&(t[o]=s[o])}return t})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:sorare-vite-application":!0})}catch{}})();const K={type:"change"},N={type:"start"},B={type:"end"},L=new et,F=new it,ht=Math.cos(70*st.DEG2RAD),c=new M,_=2*Math.PI,h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},z=1e-6;class rt extends tt{constructor(t,i=null){super(t,i),this.state=h.NONE,this.target=new M,this.cursor=new M,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:R.ROTATE,MIDDLE:R.DOLLY,RIGHT:R.PAN},this.touches={ONE:O.ROTATE,TWO:O.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new M,this._lastQuaternion=new U,this._lastTargetPosition=new M,this._quat=new U().setFromUnitVectors(t.up,new M(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Z,this._sphericalDelta=new Z,this._scale=1,this._panOffset=new M,this._rotateStart=new A,this._rotateEnd=new A,this._rotateDelta=new A,this._panStart=new A,this._panEnd=new A,this._panDelta=new A,this._dollyStart=new A,this._dollyEnd=new A,this._dollyDelta=new A,this._dollyDirection=new M,this._mouse=new A,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=ct.bind(this),this._onPointerDown=lt.bind(this),this._onPointerUp=ut.bind(this),this._onContextMenu=bt.bind(this),this._onMouseWheel=pt.bind(this),this._onKeyDown=_t.bind(this),this._onTouchStart=ft.bind(this),this._onTouchMove=gt.bind(this),this._onMouseDown=dt.bind(this),this._onMouseMove=mt.bind(this),this._interceptControlDown=yt.bind(this),this._interceptControlUp=Et.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),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.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.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(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}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(K),this.update(),this.state=h.NONE}update(t=null){const i=this.object.position;c.copy(i).sub(this.target),c.applyQuaternion(this._quat),this._spherical.setFromVector3(c),this.autoRotate&&this.state===h.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),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 s=this.minAzimuthAngle,o=this.maxAzimuthAngle;
vendor: 15,388 bytes, line 1
1isFinite(s)&&isFinite(o)&&(s<-Math.PI?s+=_:s>Math.PI&&(s-=_),o<-Math.PI?o+=_:o>Math.PI&&(o-=_),s<=o?this._spherical.theta=Math.max(s,Math.min(o,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(s+o)/2?Math.max(s,this._spherical.theta):Math.min(o,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 a=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const r=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),a=r!=this._spherical.radius}if(c.setFromSpherical(this._spherical),c.applyQuaternion(this._quatInverse),i.copy(this.target).add(c),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 r=null;if(this.object.isPerspectiveCamera){const l=c.length();r=this._clampDistance(l*this._scale);const u=l-r;this.object.position.addScaledVector(this._dollyDirection,u),this.object.updateMatrixWorld(),a=!!u}else if(this.object.isOrthographicCamera){const l=new M(this._mouse.x,this._mouse.y,0);l.unproject(this.object);const u=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),a=u!==this.object.zoom;const d=new M(this._mouse.x,this._mouse.y,0);d.unproject(this.object),this.object.position.sub(d).add(l),this.object.updateMatrixWorld(),r=c.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;r!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position):(L.origin.copy(this.object.position),L.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(L.direction))<ht?this.object.lookAt(this.target):(F.setFromNormalAndCoplanarPoint(this.object.up,this.target),L.intersectPlane(F,this.target))))}else if(this.object.isOrthographicCamera){const r=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),r!==this.object.zoom&&(this.object.updateProjectionMatrix(),a=!0)}return this._scale=1,this._performCursorZoom=!1,a||this._lastPosition.distanceToSquared(this.object.position)>z||8*(1-this._lastQuaternion.dot(this.object.quaternion))>z||this._lastTargetPosition.distanceToSquared(this.target)>z?(this.dispatchEvent(K),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?_/60*this.autoRotateSpeed*t:_/60/60*this.autoRotateSpeed}_getZoomScale(t){const i=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*i)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,i){c.setFromMatrixColumn(i,0),c.multiplyScalar(-t),this._panOffset.add(c)}_panUp(t,i){this.screenSpacePanning===!0?c.setFromMatrixColumn(i,1):(c.setFromMatrixColumn(i,0),c.crossVectors(this.object.up,c)),c.multiplyScalar(t),this._panOffset.add(c)}_pan(t,i){const s=this.domElement;if(this.object.isPerspectiveCamera){const o=this.object.position;c.copy(o).sub(this.target);let a=c.length();a*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*a/s.clientHeight,this.object.matrix),this._panUp(2*i*a/s.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/s.clientWidth,this.object.matrix),this._panUp(i*(this.object.top-this.object.bottom)/this.object.zoom/s.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,i){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const s=this.domElement.getBoundingClientRect(),o=t-s.left,a=i-s.top,r=s.width,l=s.height;this._mouse.x=o/r*2-1,this._mouse.y=-(a/l)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const i=this.domElement;this._rotateLeft(_*this._rotateDelta.x/i.clientHeight),this._rotateUp(_*this._rotateDelta.y/i.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.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(t){this._panEnd.set(t.clientX,t.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(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let i=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(_*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),i=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-_*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),i=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(_*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),i=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-_*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),i=!0;break}i&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),o=.5*(t.pageY+i.y);this._rotateStart.set(s,o)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),o=.5*(t.pageY+i.y);this._panStart.set(s,o)}}_handleTouchStartDolly(t){const i=this._getSecondPointerPosition(t),s=t.pageX-i.x,o=t.pageY-i.y,a=Math.sqrt(s*s+o*o);this._dollyStart.set(0,a)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const s=this._getSecondPointerPosition(t),o=.5*(t.pageX+s.x),a=.5*(t.pageY+s.y);this._rotateEnd.set(o,a)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const i=this.domElement;this._rotateLeft(_*this._rotateDelta.x/i.clientHeight),this._rotateUp(_*this._rotateDelta.y/i.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),o=.5*(t.pageY+i.y);this._panEnd.set(s,o)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const i=this._getSecondPointerPosition(t),s=t.pageX-i.x,o=t.pageY-i.y,a=Math.sqrt(s*s+o*o);this._dollyEnd.set(0,a),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 r=(t.pageX+i.x)*.5,l=(t.pageY+i.y)*.5;this._updateZoomParameters(r,l)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let i=0;i<this._pointers.length;i++)if(this._pointers[i]==t.pointerId){this._pointers.splice(i,1);return}}_isTrackingPointer(t){for(let i=0;i<this._pointers.length;i++)if(this._pointers[i]==t.pointerId)return!0;return!1}_trackPointer(t){let i=this._pointerPositions[t.pointerId];i===void 0&&(i=new A,this._pointerPositions[t.pointerId]=i),i.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const i=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[i]}_customWheelEvent(t){const i=t.deltaMode,s={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(i){case 1:s.deltaY*=16;break;case 2:s.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(s.deltaY*=10),s}}function lt(e){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(e.pointerId),this.domElement.ownerDocument.addEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(e)&&(this._addPointer(e),e.pointerType==="touch"?this._onTouchStart(e):this._onMouseDown(e)))}function ct(e){this.enabled!==!1&&(e.pointerType==="touch"?this._onTouchMove(e):this._onMouseMove(e))}function ut(e){switch(this._removePointer(e),this._pointers.length){case 0:this.domElement.releasePointerCapture(e.pointerId),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(B),this.state=h.NONE;break;case 1:const t=this._pointers[0],i=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:i.x,pageY:i.y});break}}function dt(e){let t;switch(e.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case R.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(e),this.state=h.DOLLY;break;case R.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(e),this.state=h.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(e),this.state=h.ROTATE}break;case R.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(e),this.state=h.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(e),this.state=h.PAN}break;default:this.state=h.NONE}this.state!==h.NONE&&this.dispatchEvent(N)}function mt(e){switch(this.state){case h.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(e);break;case h.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(e);break;case h.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(e);break}}function pt(e){this.enabled===!1||this.enableZoom===!1||this.state!==h.NONE||(e.preventDefault(),this.dispatchEvent(N),this._handleMouseWheel(this._customWheelEvent(e)),this.dispatchEvent(B))}function _t(e){this.enabled!==!1&&this._handleKeyDown(e)}function ft(e){switch(this._trackPointer(e),this._pointers.length){case 1:switch(this.touches.ONE){case O.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(e),this.state=h.TOUCH_ROTATE;break;case O.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(e),this.state=h.TOUCH_PAN;break;default:this.state=h.NONE}break;case 2:switch(this.touches.TWO){case O.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(e),this.state=h.TOUCH_DOLLY_PAN;break;case O.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(e),this.state=h.TOUCH_DOLLY_ROTATE;break;default:this.state=h.NONE}break;default:this.state=h.NONE}this.state!==h.NONE&&this.dispatchEvent(N)}function gt(e){switch(this._trackPointer(e),this.state){case h.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(e),this.update();break;case h.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(e),this.update();break;case h.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(e),this.update();break;case h.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(e),this.update();break;default:this.state=h.NONE}}function bt(e){this.enabled!==!1&&e.preventDefault()}function yt(e){e.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Et(e){e.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}ot({OrbitControls:rt});const x={minAzimuthAngle:-1/0,maxAzimuthAngle:1/0,minPolarAngle:Math.PI/8,maxPolarAngle:Math.PI-Math.PI/8};function Pt(e,t){let i=e.getAzimuthalAngle(),s=e.getPolarAngle()-Math.PI/2;Math.abs(t-i)<.001&&(i=t),Math.abs(s)<.001&&(s=0),i===t&&s===0?e.interacting=void 0:(e.minAzimuthAngle=t+.95*(i-t),e.maxAzimuthAngle=e.minAzimuthAngle,e.minPolarAngle=Math.PI/2+.95*s,e.maxPolarAngle=e.minPolarAngle)}const At=e=>{const t=k.c(18),{children:i,lockOnFaces:s,startOnBack:o}=e,a=s===void 0?!1:s,r=o?3.5:.5,{camera:l,gl:u}=I(),{domElement:d}=u,n=j.useRef(null);let m;t[0]!==r||t[1]!==a?(m=C=>{const g=n.current;if(!g)return;const v=a?Math.round(g.getAzimuthalAngle()/Math.PI)*Math.PI:0;if(typeof g?.interacting>"u"){const Y=C.clock.getElapsedTime();Y>=r&&(g.minAzimuthAngle=v+Math.sin((Y-r)*3/4)/2,g.maxAzimuthAngle=g.minAzimuthAngle)}else g.interacting||(C.clock.elapsedTime=0,Pt(g,v));
1g.update()},t[0]=r,t[1]=a,t[2]=m):m=t[2],X(m);let T,b;t[3]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{const C=n.current,g=()=>{C?.interacting&&(C.interacting=!1)};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g)}},b=[],t[3]=T,t[4]=b):(T=t[3],b=t[4]),j.useEffect(T,b);let w,y;t[5]!==o?(w=()=>{o&&(n.current.enableDamping=!1,n.current.minAzimuthAngle=Math.PI,n.current.maxAzimuthAngle=Math.PI,n.current.update(),n.current.minAzimuthAngle=x.minAzimuthAngle,n.current.maxAzimuthAngle=x.maxAzimuthAngle,n.current.update(),setTimeout(()=>{n.current.enableDamping=!0,n.current.minAzimuthAngle=0,n.current.maxAzimuthAngle=0,n.current.update(),n.current.minAzimuthAngle=x.minAzimuthAngle,n.current.maxAzimuthAngle=x.maxAzimuthAngle},2e3))},y=[o],t[5]=o,t[6]=w,t[7]=y):(w=t[6],y=t[7]),j.useEffect(w,y);let E;t[8]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{n.current&&(n.current.minAzimuthAngle=x.minAzimuthAngle,n.current.maxAzimuthAngle=x.maxAzimuthAngle,n.current.minPolarAngle=x.minPolarAngle,n.current.maxPolarAngle=x.maxPolarAngle,n.current.interacting=!0)},t[8]=E):E=t[8];let f;t[9]!==l||t[10]!==d?(f=[l,d],t[9]=l,t[10]=d,t[11]=f):f=t[11];const D=!o;let P;t[12]!==D||t[13]!==f?(P=p.jsx("orbitControls",{ref:n,args:f,enableZoom:!1,enableDamping:D,enablePan:!1,...x}),t[12]=D,t[13]=f,t[14]=P):P=t[14];let S;return t[15]!==i||t[16]!==P?(S=p.jsxs("mesh",{onPointerDown:E,children:[i,P]}),t[15]=i,t[16]=P,t[17]=S):S=t[17],S};class Dt extends G{constructor(){super("GlowAlphaEffect",`void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
2        // Max channel, not luminance, so a saturated glow gets alpha regardless of hue.
3        float glow = max(inputColor.r, max(inputColor.g, inputColor.b));
4        // Asymptotic, never clamps flat: the halo fades as a gradient, not an edge.
5        // inputColor.a is sharp scene coverage (bloom adds RGB only).
6        float a = max(inputColor.a, 1.0 - exp(-glow * 1.5));
7        outputColor = vec4(inputColor.rgb, a);
8      }`,{blendFunction:H.SRC})}}const Mt=()=>{const e=k.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Dt,e[0]=t):t=e[0];const i=t;let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx("primitive",{object:i,dispose:null}),e[1]=s):s=e[1],s},Tt=`vec4 blend(const in vec4 dst, const in vec4 src, const in float opacity) {
9  return mix(dst, vec4(dst.rgb + src.rgb, dst.a), opacity);
10}`,wt=e=>nt(e)?(Array.isArray(e.material)?e.material:[e.material]).some(i=>at(i)&&i.emissiveIntensity>1):!1,St=e=>{const t=[];return e.traverse(i=>{wt(i)&&t.push(i)}),t},xt=15,Ot=()=>{const e=k.c(8),t=I(Ct),i=I(jt);let s,o;if(e[0]!==i||e[1]!==t){o=new W(t,i,{blendFunction:H.ADD,intensity:10,mipmapBlur:!0,radius:.2,luminanceThreshold:5,luminanceSmoothing:.4}),o.blendMode.getShaderCode=kt;const{luminanceMaterial:n}=o,m=/luminance\(texel\.rgb\)/;if(!m.test(n.fragmentShader))throw new Error("GlowBloom: postprocessing LuminanceMaterial shader changed; the max-channel patch no longer applies");n.fragmentShader=n.fragmentShader.replace(m,"max(texel.r, max(texel.g, texel.b))"),n.needsUpdate=!0,e[0]=i,e[1]=t,e[2]=o}else o=e[2];s=o;const a=s,r=j.useRef(0),l=j.useRef("");let u;e[3]!==a||e[4]!==t?(u=()=>{if(r.current=r.current+1,r.current%xt!==0)return;const n=St(t),m=n.map(Lt).sort().join(",");m!==l.current&&(l.current=m,a.selection.set(n))},e[3]=a,e[4]=t,e[5]=u):u=e[5],X(u);let d;return e[6]!==a?(d=p.jsx("primitive",{object:a,dispose:null}),e[6]=a,e[7]=d):d=e[7],d},Rt=()=>{const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=p.jsxs(p.Fragment,{children:[p.jsx(Ot,{}),p.jsx(Mt,{})]}),e[0]=t):t=e[0],t};function Ct(e){return e.scene}function jt(e){return e.camera}function kt(){return Tt}function Lt(e){return e.uuid}const Bt=e=>{const t=k.c(25),{card3d:i,zoom:s,loadedCallback:o,startOnBack:a,children:r,onContextRestored:l,onContextLost:u,fallback:d}=e,n=s===void 0?5.3:s;let m,T;t[0]===Symbol.for("react.memo_cache_sentinel")?(m={scroll:!1,offsetSize:!0},T=[0,0,1],t[0]=m,t[1]=T):(m=t[0],T=t[1]);let b;t[2]!==n?(b={position:T,zoom:n},t[2]=n,t[3]=b):b=t[3];let w;t[4]===Symbol.for("react.memo_cache_sentinel")?(w={alpha:!0,premultipliedAlpha:!1},t[4]=w):w=t[4];let y;t[5]!==i?(y=p.jsx($,{card:i}),t[5]=i,t[6]=y):y=t[6];let E;t[7]!==i?(E=q(i),t[7]=i,t[8]=E):E=t[8];let f;t[9]!==i||t[10]!==r?(f=p.jsx("group",{scale:.213,children:p.jsx(Q,{card:i,children:r})}
10),t[9]=i,t[10]=r,t[11]=f):f=t[11];let D;t[12]!==a||t[13]!==E||t[14]!==f?(D=p.jsx(At,{lockOnFaces:E,startOnBack:a,children:f}),t[12]=a,t[13]=E,t[14]=f,t[15]=D):D=t[15];let P;t[16]===Symbol.for("react.memo_cache_sentinel")?(P=p.jsx(V,{children:p.jsx(Rt,{})}),t[16]=P):P=t[16];let S;return t[17]!==d||t[18]!==o||t[19]!==u||t[20]!==l||t[21]!==b||t[22]!==y||t[23]!==D?(S=p.jsxs(J,{resize:m,camera:b,onCreated:o,onContextLost:u,onContextRestored:l,fallback:d,gl:w,children:[y,D,P]}),t[17]=d,t[18]=o,t[19]=u,t[20]=l,t[21]=b,t[22]=y,t[23]=D,t[24]=S):S=t[24],S};export{Bt as ShowcaseCard};
11//# sourceMappingURL=index-CKnm-TIv.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.