{"version":3,"file":"CryptText.C2_ShXgM.mjs","names":["React.useState","React.useRef"],"sources":["https:/framerusercontent.com/modules/1nyeYHMCVshj7VJFNcd8/H1548QdfsmMRXjMBGWaE/s2s3jgApW.js","https:/framerusercontent.com/modules/pIifevPUnyqfLkCp8NRU/kgiSbK2Sk2BxH8PfZAll/CryptText.js"],"sourcesContent":["// Generated by Framer (3df86f7)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOM;Riforma LL TT Regular\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Riforma LL TT Regular\",source:\"custom\",uiFamilyName:\"Riforma LL TT Regular\",url:\"https://framerusercontent.com/assets/1OdTkSG17osheCgt2gYNOVQyGIc.woff2\"}]}];export const css=[\".framer-etu0b .framer-styles-preset-m3mape:not(.rich-text-wrapper), .framer-etu0b .framer-styles-preset-m3mape.rich-text-wrapper h2 { --framer-font-family: \\\"Riforma LL TT Regular\\\", \\\"Riforma LL TT Regular Placeholder\\\", sans-serif; --framer-font-open-type-features: 'cv01' on, 'cv09' on, 'cv11' on, 'cv05' on; --framer-font-size: 32px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: 0em; --framer-line-height: 1.4em; --framer-paragraph-spacing: 40px; --framer-text-alignment: left; --framer-text-color: var(--token-b358dc79-acf8-4289-8a1c-2772f6ee7933, #000000); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }\",\"@media (max-width: 1199px) and (min-width: 810px) { .framer-etu0b .framer-styles-preset-m3mape:not(.rich-text-wrapper), .framer-etu0b .framer-styles-preset-m3mape.rich-text-wrapper h2 { --framer-font-family: \\\"Riforma LL TT Regular\\\", \\\"Riforma LL TT Regular Placeholder\\\", sans-serif; --framer-font-open-type-features: 'cv01' on, 'cv09' on, 'cv11' on, 'cv05' on; --framer-font-size: 28px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: 0em; --framer-line-height: 1.4em; --framer-paragraph-spacing: 40px; --framer-text-alignment: left; --framer-text-color: var(--token-b358dc79-acf8-4289-8a1c-2772f6ee7933, #000000); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\",\"@media (max-width: 809px) and (min-width: 0px) { .framer-etu0b .framer-styles-preset-m3mape:not(.rich-text-wrapper), .framer-etu0b .framer-styles-preset-m3mape.rich-text-wrapper h2 { --framer-font-family: \\\"Riforma LL TT Regular\\\", \\\"Riforma LL TT Regular Placeholder\\\", sans-serif; --framer-font-open-type-features: 'cv01' on, 'cv09' on, 'cv11' on, 'cv05' on; --framer-font-size: 24px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: 0em; --framer-line-height: 1.4em; --framer-paragraph-spacing: 40px; --framer-text-alignment: left; --framer-text-color: var(--token-b358dc79-acf8-4289-8a1c-2772f6ee7933, #000000); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\"];export const className=\"framer-etu0b\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const symbols=\"!+-$_?*x\";/**\n * @framerDisableUnlink\n */export default function ScrambleText({text,font,color,duration,loop,delay,scramblePercentage,scrambleSpeed,animationTrigger,globalDelay,isNoWhiteSpace}){const[scrambledText,setScrambledText]=React.useState(text);const containerRef=React.useRef(null);React.useEffect(()=>{let intervalId;let timeoutId;let loopTimeoutId;const cleanup=()=>{clearInterval(intervalId);clearTimeout(timeoutId);clearTimeout(loopTimeoutId);};const scramble=()=>text.split(\"\").map(char=>Math.random()<scramblePercentage/100?symbols[Math.floor(Math.random()*symbols.length)]:char).join(\"\");const startScramblingEffect=()=>{cleanup();intervalId=setInterval(()=>{setScrambledText(scramble());},scrambleSpeed);timeoutId=setTimeout(()=>{clearInterval(intervalId);setScrambledText(text);if(loop){loopTimeoutId=setTimeout(startScramblingEffect,delay*1e3);}},duration*1e3);};if(animationTrigger===\"onAppear\"){timeoutId=setTimeout(startScramblingEffect,globalDelay*1e3);}else if(animationTrigger===\"inView\"&&containerRef.current){const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){timeoutId=setTimeout(()=>{startScramblingEffect();if(containerRef.current){observer.unobserve(containerRef.current);}},globalDelay*1e3);}});},{threshold:.1});observer.observe(containerRef.current);return()=>{cleanup();observer.disconnect();};}return cleanup;},[text,duration,loop,delay,scramblePercentage,scrambleSpeed,animationTrigger,globalDelay]);React.useEffect(()=>{setScrambledText(text);},[text]);return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"relative\",display:\"inline-block\",whiteSpace:isNoWhiteSpace?\"nowrap\":\"normal\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{...font,display:\"block\",visibility:\"hidden\",whiteSpace:isNoWhiteSpace?\"nowrap\":\"normal\"},children:text}),/*#__PURE__*/_jsx(\"span\",{style:{...font,color:color,position:\"absolute\",top:0,left:0,whiteSpace:isNoWhiteSpace?\"nowrap\":\"normal\"},children:scrambledText})]});}addPropertyControls(ScrambleText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Scramble Me!\",displayTextArea:true},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.5,min:.1,max:10,step:.1,unit:\"s\"},scrambleSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:50,min:10,max:100,step:1,unit:\"ms\"},scramblePercentage:{type:ControlType.Number,title:\"Intensity\",defaultValue:50,min:0,max:100,step:1,unit:\"%\"},animationTrigger:{type:ControlType.SegmentedEnum,title:\"Trigger\",options:[\"onAppear\",\"inView\"],optionTitles:[\"On Appear\",\"In View\"],defaultValue:\"onAppear\"},globalDelay:{type:ControlType.Number,title:\"Trigger Delay\",defaultValue:0,min:0,max:10,step:.1,unit:\"s\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false},isNoWhiteSpace:{type:ControlType.Boolean,title:\"No Wrap\",defaultValue:false},delay:{type:ControlType.Number,title:\"Loop Delay\",defaultValue:2,min:.1,max:10,step:.1,unit:\"s\",hidden:({loop})=>!loop,description:\"v1.0\\n🚀 [Kuartz Studio](https://kuartz.studio)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrambleText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CryptText.map"],"mappings":"+TAC8B,GAAU,UAAU,CAAC,+BAA+B,CAAC,CAAc,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,cAAc,wBAAwB,OAAO,SAAS,aAAa,wBAAwB,IAAI,yEAAyE,CAAC,CAAC,CAAC,CAAc,EAAI,CAAC,swBAA0wB,4zBAAg0B,yzBAA6zB,CAAc,EAAU,kBCC9tF,SAAwB,EAAa,CAAC,OAAK,OAAK,QAAM,WAAS,OAAK,QAAM,qBAAmB,gBAAc,mBAAiB,cAAY,kBAAgB,CAAC,GAAK,CAAC,EAAc,GAAkBA,EAAe,EAAK,CAAO,EAAaC,EAAa,KAAK,CAAiuC,OAAhuC,MAAoB,CAAC,IAAI,EAAe,EAAc,EAAoB,MAAY,CAAC,cAAc,EAAW,CAAC,aAAa,EAAU,CAAC,aAAa,EAAc,EAAS,MAAa,EAAK,MAAM,GAAG,CA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