{"version":3,"file":"shared-lib.y-eVPYvh.mjs","names":[],"sources":["https:/framerusercontent.com/modules/8P6sbRqbQOOXmEhGI8zW/4YeRBAgU1OcmwGRH0Dl9/Text.js"],"sourcesContent":["function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";export function truncate(Component){return props=>{const ref=useRef(null);useEffect(()=>{var ref1;const el=ref===null||ref===void 0?void 0:(ref1=ref.current)===null||ref1===void 0?void 0:ref1.querySelector(\".framer-text\");if(!el)return;el.style.overflow=\"hidden\";el.style.textOverflow=\"ellipsis\";el.style.whiteSpace=\"nowrap\";},[]);return /*#__PURE__*/ _jsx(Component,{...props,ref:ref});};}export function scramble(Component){return props=>{const ref=useRef(null);useEffect(()=>{var ref1;if(location.host.endsWith(\"framercanvas.com\")&&!location.search.startsWith(\"?target=preview-web\")){return;}const el=ref===null||ref===void 0?void 0:(ref1=ref.current)===null||ref1===void 0?void 0:ref1.querySelector(\".framer-text\");if(!el)return;const fn=new TextScramble(el);fn.setText(el.innerText);},[]);return /*#__PURE__*/ _jsx(Component,{...props,ref:ref});};}export function scrambleTruncate(Component){return props=>{const ref=useRef(null);useEffect(()=>{var ref1;const el=ref===null||ref===void 0?void 0:(ref1=ref.current)===null||ref1===void 0?void 0:ref1.querySelector(\".framer-text\");if(!el)return;el.style.overflow=\"hidden\";el.style.textOverflow=\"ellipsis\";el.style.whiteSpace=\"nowrap\";if(location.host.endsWith(\"framercanvas.com\")&&!location.search.startsWith(\"?target=preview-web\")){return;}const fn=new TextScramble(el);fn.setText(el.innerText);},[]);return /*#__PURE__*/ _jsx(Component,{...props,ref:ref});};}class TextScramble{constructor(el){_defineProperty(this,\"chars\",\"!-______+*0\");_defineProperty(this,\"setText\",newText=>{const oldText=this.el.innerText;const length=Math.max(oldText.length,newText.length);const promise=new Promise(resolve=>this.resolve=resolve);this.queue=[];for(let i=0;i<length;i++){const from=oldText[i]||\"\";const to=newText[i]||\"\";const start=Math.floor(Math.random()*25);const end=start+Math.floor(Math.random()*25);this.queue.push({from,to,start,end});}cancelAnimationFrame(this.frameRequest);this.frame=0;this.update();return promise;});_defineProperty(this,\"update\",()=>{let output=\"\";let complete=0;for(let i=0,n=this.queue.length;i<n;i++){const{from,to,start,end,char}=this.queue[i];if(this.frame>=end){complete++;output+=to;}else if(this.frame>=start){if(!char||Math.random()<.28){this.queue[i].char=this.randomChar();}output+=`<span>${this.queue[i].char}</span>`;}else{output+=from;}}this.el.innerHTML=output;if(complete===this.queue.length){this.resolve();}else{this.frameRequest=requestAnimationFrame(this.update);this.frame++;}});_defineProperty(this,\"randomChar\",()=>{return this.chars[Math.floor(Math.random()*this.chars.length)];});_defineProperty(this,\"frame\",0);_defineProperty(this,\"queue\",[]);this.el=el;}}\nexport const __FramerMetadata__ = {\"exports\":{\"scrambleTruncate\":{\"type\":\"reactHoc\",\"name\":\"scrambleTruncate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"scramble\":{\"type\":\"reactHoc\",\"name\":\"scramble\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"truncate\":{\"type\":\"reactHoc\",\"name\":\"truncate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text.map"],"mappings":"mKAAA,SAAS,EAAgB,EAAI,EAAI,EAAM,CAAmI,OAA/H,KAAO,EAAK,OAAO,eAAe,EAAI,EAAI,CAAO,QAAM,YAAW,EAAK,cAAa,EAAK,UAAS,CAAK,EAAC,CAAO,EAAI,GAAK,EAAc,CAAK,CAA+E,SAAgB,EAAS,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,IAAM,EAAI,EAAO,KAAK,CAAkQ,MAAjQ,GAAU,IAAI,CAAC,IAAI,EAAK,IAAM,EAAG,GAAM,SAAwB,GAAkD,CAA/C,EAAK,EAAI,UA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