{"version":3,"file":"DiscPlayer.DgWCwflq.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/it7Stvn8Rp8NFRClknQ3/9J4IIe3zXk0UYKowkuBH/DiscPlayer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{motion,useAnimation}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function DiscPlayer(props){const{audioFile=\"https://framerusercontent.com/assets/8w3IUatLX9a5JVJ6XPCVuHi94.mp3\",backgroundColor=\"#FFFFFF\",discColor=\"#333333\",discImage,needleDotColor=\"#FF5588\",style}=props;const isStatic=useIsStaticRenderer();const audioRef=useRef(null);const discControls=useAnimation();const needleControls=useAnimation();useEffect(()=>{if(isStatic)return;if(!audioRef.current){audioRef.current=new Audio(audioFile);}else{audioRef.current.src=audioFile;}audioRef.current.loop=true;audioRef.current.muted=true;audioRef.current.volume=0;audioRef.current.play().catch(()=>{// Si el navegador bloquea autoplay, el disco seguirá girando igualmente\n});needleControls.start({rotate:0,transition:{duration:1.2,ease:[.32,.72,0,1]}});discControls.start({rotate:360,transition:{duration:3,ease:\"linear\",repeat:Infinity}});return()=>{if(audioRef.current){audioRef.current.pause();audioRef.current.src=\"\";}};},[audioFile,isStatic,discControls,needleControls]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",backgroundColor,borderRadius:24,overflow:\"hidden\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",padding:24,...style},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"80%\",aspectRatio:\"1\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:[/*#__PURE__*/_jsxs(motion.div,{animate:discControls,initial:{rotate:0},style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:\"50%\",backgroundColor:discColor,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundImage:discImage?`url(${discImage.src})`:\"none\",backgroundSize:\"cover\",backgroundPosition:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"30%\",height:\"30%\",borderRadius:\"50%\",background:`radial-gradient(circle, #888888 0%, ${discColor} 70%)`,boxShadow:\"inset 0 0 10px rgba(0, 0, 0, 0.5)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",borderRadius:\"50%\",background:\"linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, transparent 100%)\",pointerEvents:\"none\"}}),Array.from({length:8},(_,i)=>/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"50%\",left:\"50%\",width:`${85-i*10}%`,height:`${85-i*10}%`,transform:\"translate(-50%, -50%)\",borderRadius:\"50%\",border:\"1px solid rgba(0, 0, 0, 0.2)\"}},i))]}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"10%\",right:\"-5%\",width:\"35%\",height:\"10%\",transformOrigin:\"right center\",zIndex:10},children:/*#__PURE__*/_jsxs(motion.div,{animate:needleControls,initial:{rotate:15},style:{position:\"relative\",width:\"100%\",height:\"100%\",transformOrigin:\"right center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",right:0,top:\"50%\",transform:\"translateY(-50%)\",width:20,height:20,borderRadius:\"50%\",backgroundColor:\"#888\",boxShadow:\"0 2px 4px rgba(0, 0, 0, 0.3)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",right:10,top:\"50%\",transform:\"translateY(-50%)\",width:\"90%\",height:4,backgroundColor:\"#888\",boxShadow:\"0 2px 4px rgba(0, 0, 0, 0.2)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:-5,top:\"50%\",transform:\"translateY(-50%)\",width:12,height:12,borderRadius:\"50%\",backgroundColor:needleDotColor}})]})})]})});}addPropertyControls(DiscPlayer,{audioFile:{type:ControlType.File,title:\"Audio File\",allowedFileTypes:[\"mp3\",\"wav\",\"ogg\"]},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},discColor:{type:ControlType.Color,title:\"Disc Color\",defaultValue:\"#333333\"},needleDotColor:{type:ControlType.Color,title:\"Needle Dot Color\",defaultValue:\"#3680ce\"},discImage:{type:ControlType.ResponsiveImage,title:\"Disc Image\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DiscPlayer\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"300\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DiscPlayer.map"],"mappings":"mPAMG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,YAAU,qEAAqE,kBAAgB,UAAU,YAAU,UAAU,YAAU,iBAAe,UAAU,SAAO,EAAY,EAAS,GAAqB,CAAO,EAASA,EAAO,KAAK,CAAO,EAAa,GAAc,CAAO,EAAe,GAAc,CACtD,OADuD,MAAc,CAAI,MACjN,OADqO,EAAS,QAAqD,EAAS,QAAQ,IAAI,EAAjE,EAAS,QAAQ,IAAI,MAAM,EAAU,CAAuC,EAAS,QAAQ,KAAK,GAAK,EAAS,QAAQ,MAAM,GAAK,EAAS,QAAQ,OAAO,EAAE,EAAS,QAAQ,MAAM,CAAC,UAAU,GAC5lB,CAAC,EAAe,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAa,MAAM,CAAC,OAAO,IAAI,WAAW,CAAC,SAAS,EAAE,KAAK,SAAS,OAAO,IAA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