{"version":3,"file":"RotatingText.yUN_DAfR.mjs","names":["useState","useId","__esmMin","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ie","useReducedMotion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_DcxuU94H","useIsStaticRenderer","ControlType","RotatingText","props","isStaticRenderer","prefersReducedMotion","isHovered","setIsHovered","animationName","finalRotation","rotation","direction","shouldAnimate","animate","safeDuration","duration","keyframes","style","horizontalMap","horizontalAlignment","verticalMap","verticalAlignment","pauseOnHover","ariaLabel","wrap","backgroundFill","clip","originMap","origin","font","text","init_RotatingText"],"sources":["https:/framerusercontent.com/modules/lJlvT3MNaEmksgKmhoXH/pSb6oSkmUz1HyEaVONyI/RotatingText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useId,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useReducedMotion}from\"framer-motion\";const horizontalMap={left:\"flex-start\",center:\"center\",right:\"flex-end\"};const verticalMap={top:\"flex-start\",center:\"center\",bottom:\"flex-end\"};const originMap={\"top-left\":\"0% 0%\",\"top-center\":\"50% 0%\",\"top-right\":\"100% 0%\",\"center-left\":\"0% 50%\",center:\"50% 50%\",\"center-right\":\"100% 50%\",\"bottom-left\":\"0% 100%\",\"bottom-center\":\"50% 100%\",\"bottom-right\":\"100% 100%\"};/**\n * @framerIntrinsicWidth 320\n * @framerIntrinsicHeight 120\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function RotatingText(props){const{text=\"ROTATING TEXT\",color=\"#FFFFFF\",backgroundFill=\"rgba(0, 0, 0, 0)\",padding=\"0px\",borderRadius=\"0px\",font={},rotation=-8,animate=false,duration=8,direction=\"clockwise\",pauseOnHover=true,origin=\"center\",horizontalAlignment=\"center\",verticalAlignment=\"center\",wrap=false,clip=false,ariaLabel=\"\",style}=props;const isStaticRenderer=useIsStaticRenderer();const prefersReducedMotion=useReducedMotion();const[isHovered,setIsHovered]=useState(false);const instanceId=useId().replace(/[^a-zA-Z0-9_-]/g,\"\");const animationName=`rotatingText_${instanceId}`;const directionMultiplier=direction===\"clockwise\"?1:-1;const finalRotation=rotation+360*directionMultiplier;const shouldAnimate=animate&&!isStaticRenderer&&!prefersReducedMotion;const safeDuration=Math.max(.1,duration);const keyframes=`\n        @keyframes ${animationName} {\n            from { transform: rotate(${rotation}deg); }\n            to { transform: rotate(${finalRotation}deg); }\n        }\n    `;return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:horizontalMap[horizontalAlignment],alignItems:verticalMap[verticalAlignment],overflow:\"visible\",boxSizing:\"border-box\"},onMouseEnter:()=>pauseOnHover&&setIsHovered(true),onMouseLeave:()=>pauseOnHover&&setIsHovered(false),\"aria-label\":ariaLabel||undefined,children:[shouldAnimate&&/*#__PURE__*/_jsx(\"style\",{children:keyframes}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",display:\"inline-flex\",width:wrap?\"100%\":\"max-content\",maxWidth:wrap?\"100%\":\"none\",flexShrink:0,backgroundColor:backgroundFill,padding,borderRadius,overflow:clip?\"hidden\":\"visible\",boxSizing:\"border-box\",transform:`rotate(${rotation}deg)`,transformOrigin:originMap[origin],animation:shouldAnimate?`${animationName} ${safeDuration}s linear infinite`:\"none\",animationPlayState:shouldAnimate&&pauseOnHover&&isHovered?\"paused\":\"running\",willChange:shouldAnimate?\"transform\":\"auto\",backfaceVisibility:\"hidden\"},children:/*#__PURE__*/_jsx(\"span\",{style:{...font,display:\"block\",width:wrap?\"100%\":\"max-content\",minWidth:wrap?0:\"max-content\",margin:0,color,textAlign:horizontalAlignment,whiteSpace:wrap?\"pre-wrap\":\"pre\",overflowWrap:wrap?\"anywhere\":\"normal\",WebkitFontSmoothing:\"antialiased\",textRendering:\"geometricPrecision\"},children:text})})]});}RotatingText.displayName=\"Rotating Text\";addPropertyControls(RotatingText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"ROTATING TEXT\",displayTextArea:true},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",displayTextAlignment:false,defaultValue:{variant:\"Bold\",fontSize:\"48px\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF\"},backgroundFill:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(0, 0, 0, 0)\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"0px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"0px\"},rotation:{type:ControlType.Number,title:\"Rotation\",defaultValue:-8,min:-360,max:360,step:1,unit:\"deg\",displayStepper:true},origin:{type:ControlType.Enum,title:\"Origin\",defaultValue:\"center\",options:[\"top-left\",\"top-center\",\"top-right\",\"center-left\",\"center\",\"center-right\",\"bottom-left\",\"bottom-center\",\"bottom-right\"],optionTitles:[\"Top Left\",\"Top Center\",\"Top Right\",\"Center Left\",\"Center\",\"Center Right\",\"Bottom Left\",\"Bottom Center\",\"Bottom Right\"]},horizontalAlignment:{type:ControlType.Enum,title:\"Align\",defaultValue:\"center\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true},verticalAlignment:{type:ControlType.Enum,title:\"Vertical\",defaultValue:\"center\",options:[\"top\",\"center\",\"bottom\"],optionTitles:[\"Top\",\"Middle\",\"Bottom\"],displaySegmentedControl:true},wrap:{type:ControlType.Boolean,title:\"Wrap\",defaultValue:false},clip:{type:ControlType.Boolean,title:\"Clip\",defaultValue:false},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:false},direction:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"clockwise\",options:[\"clockwise\",\"counterclockwise\"],optionTitles:[\"Clockwise\",\"Counter\"],displaySegmentedControl:true,hidden:({animate})=>!animate},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:8,min:.5,max:30,step:.5,unit:\"s\",hidden:({animate})=>!animate},pauseOnHover:{type:ControlType.Boolean,title:\"Hover Pause\",defaultValue:true,hidden:({animate})=>!animate},ariaLabel:{type:ControlType.String,title:\"ARIA Label\",defaultValue:\"\",placeholder:\"Optional accessible label\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"120\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"320\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RotatingText.map"],"mappings":"A,iPAKG,SAAwBe,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,gBAAgB,QAAM,UAAU,iBAAe,mBAAmB,UAAQ,MAAM,eAAa,MAAM,OAAK,CAAC,EAAE,WAAS,GAAG,UAAQ,GAAM,WAAS,EAAE,YAAU,YAAY,eAAa,GAAK,SAAO,SAAS,sBAAoB,SAAS,oBAAkB,SAAS,OAAK,GAAM,OAAK,GAAM,YAAU,GAAG,SAAOC,EAAYC,EAAiBJ,EAAoB,EAAQK,EAAqBT,EAAiB,EAAO,CAACU,EAAUC,GAAcpB,EAAS,EAAK,EAA+DqB,EAAc,gBAA1DpB,EAAM,CAAC,CAAC,QAAQ,kBAAkB,EAAiD,IAAiEqB,EAAcC,EAAS,KAA1DC,IAAY,YAAY,EAAE,IAA8DC,EAAcC,GAAS,CAACT,GAAkB,CAACC,EAA2BS,EAAa,KAAK,IAAI,GAAGC,CAAQ,EAAQC,EAAU;qBACjzBR,EAAc;uCACIE,EAAS;qCACXD,EAAc;;MAE7C,MAAoB,gBAAM,MAAM,CAAC,MAAM,CAAC,GAAGQ,EAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,eAAeC,EAAcC,GA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