{"version":3,"file":"CardFrame.5xg3-nAc.mjs","names":["React.useRef","__esmMin","init_npm_react_18_3_1","de","window","init_jsx_runtime","c","p","ce","init_ssg_sandbox_shims","addPropertyControls","RenderTarget","init_framer_BkYB2Gqq","ControlType","ensureStyle","STYLE_ID","s","CSS","prefersReduced","watch","io","e","entries","el","CardFrame","props","isCanvas","ref","ext","overshoot","hx","hoverExtend","L","d","delay","dur","duration","ta","LEAD","fa","TAIL","animated","play","host","nudge","nudgeLayer","t","vars","edgeColor","edgeOpacity","edgeHover","dashColor","dashOpacity","tint","style","EDGES","i","SEGS","styled","init_CardFrame"],"sources":["https:/framerusercontent.com/modules/G0RaAmooyMqEISGbknWX/ADrHsuvKDE7mudng7CgE/CardFrame.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// Drafted outline for a card or field: edges draw on when the frame first scrolls into view,\n// with dashed overshoot past the corners. Cheap by design: no React state, one shared\n// stylesheet, one shared IntersectionObserver, plain divs. Phase lives in data-phase (pre, draw, rest).\n// Hover (fine pointers): brighter edges, faint tint, longer marching dashes, optional nudge layer.\n// Canvas, reduced motion and Play off show the finished state.\nconst LEAD=.22;const TAIL=.32;const CSS=\".cf-t{position:absolute;inset:0;background:var(--tint);opacity:0;transition:opacity .4s ease}.cf-e{position:absolute;background:var(--ec);opacity:var(--eo);transition:opacity .4s ease}.cf-e0{top:0;left:0;right:0;height:1px;transform-origin:left center}.cf-e1{top:1px;right:0;bottom:1px;width:1px;transform-origin:center top}.cf-e2{bottom:0;left:0;right:0;height:1px;transform-origin:right center}.cf-e3{top:1px;left:0;bottom:1px;width:1px;transform-origin:center bottom}.cf[data-phase=pre] .cf-e0,.cf[data-phase=pre] .cf-e2{transform:scaleX(0)}.cf[data-phase=pre] .cf-e1,.cf[data-phase=pre] .cf-e3{transform:scaleY(0)}.cf[data-phase=draw] .cf-e{transition:transform var(--dur) cubic-bezier(.6,0,.3,1) calc(var(--d) + .176s),opacity .4s ease}.cf-d{position:absolute;opacity:0;background-image:linear-gradient(var(--g),var(--dc) 3px,transparent 3px);background-position:var(--p0);transition:clip-path .45s cubic-bezier(.22,1,.36,1)}.cf-s0,.cf-s1,.cf-s4,.cf-s5{width:var(--L);height:1px;background-size:5px 1px;background-repeat:repeat-x}.cf-s2,.cf-s3,.cf-s6,.cf-s7{width:1px;height:var(--L);background-size:1px 5px;background-repeat:repeat-y}.cf-s0{top:0;left:calc(var(--L)*-1);--g:270deg;--p0:100% 0;--p1:calc(100% - 5px) 0;transform-origin:left center;clip-path:inset(0 0 0 var(--hx))}.cf-s1{top:0;right:calc(var(--L)*-1);--g:90deg;--p0:0 0;--p1:5px 0;transform-origin:left center;clip-path:inset(0 var(--hx) 0 0)}.cf-s2{top:calc(var(--L)*-1);right:0;--g:0deg;--p0:0 100%;--p1:0 calc(100% - 5px);transform-origin:center top;clip-path:inset(var(--hx) 0 0 0)}.cf-s3{bottom:calc(var(--L)*-1);right:0;--g:180deg;--p0:0 0;--p1:0 5px;transform-origin:center top;clip-path:inset(0 0 var(--hx) 0)}.cf-s4{bottom:0;right:calc(var(--L)*-1);--g:90deg;--p0:0 0;--p1:5px 0;transform-origin:right center;clip-path:inset(0 var(--hx) 0 0)}.cf-s5{bottom:0;left:calc(var(--L)*-1);--g:270deg;--p0:100% 0;--p1:calc(100% - 5px) 0;transform-origin:right center;clip-path:inset(0 0 0 var(--hx))}.cf-s6{bottom:calc(var(--L)*-1);left:0;--g:180deg;--p0:0 0;--p1:0 5px;transform-origin:center bottom;clip-path:inset(0 0 var(--hx) 0)}.cf-s7{top:calc(var(--L)*-1);left:0;--g:0deg;--p0:0 100%;--p1:0 calc(100% - 5px);transform-origin:center bottom;clip-path:inset(var(--hx) 0 0 0)}.cf[data-phase=pre] .cf-s0,.cf[data-phase=pre] .cf-s1,.cf[data-phase=pre] .cf-s4,.cf[data-phase=pre] .cf-s5{transform:scaleX(0)}.cf[data-phase=pre] .cf-s2,.cf[data-phase=pre] .cf-s3,.cf[data-phase=pre] .cf-s6,.cf[data-phase=pre] .cf-s7{transform:scaleY(0)}.cf[data-phase=draw] .cf-d,.cf[data-phase=rest] .cf-d{opacity:var(--do)}.cf[data-phase=draw] .cf-d{opacity:var(--di);animation:cf-fade .6s ease var(--fa) forwards,cf-march 1.1s linear infinite;animation-play-state:running,paused}.cf[data-phase=rest] .cf-d{animation:cf-march 1.1s linear infinite paused}.cf[data-phase=draw] .cf-s0,.cf[data-phase=draw] .cf-s2,.cf[data-phase=draw] .cf-s4,.cf[data-phase=draw] .cf-s6{transition:transform .22s cubic-bezier(.5,0,.9,.6) var(--d),clip-path .45s cubic-bezier(.22,1,.36,1)}.cf[data-phase=draw] .cf-s1,.cf[data-phase=draw] .cf-s3,.cf[data-phase=draw] .cf-s5,.cf[data-phase=draw] .cf-s7{transition:transform .32s cubic-bezier(.22,1,.36,1) var(--ta),clip-path .45s cubic-bezier(.22,1,.36,1)}@keyframes cf-fade{from{opacity:var(--di)}to{opacity:var(--do)}}@keyframes cf-march{from{background-position:var(--p0)}to{background-position:var(--p1)}}.cf-nudge{transition:translate .5s cubic-bezier(.22,1,.36,1)}@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){[data-cf-host]:hover .cf-t{opacity:1}[data-cf-host]:hover .cf[data-phase=draw] .cf-e,[data-cf-host]:hover .cf[data-phase=rest] .cf-e{opacity:var(--eh)}[data-cf-host]:hover .cf[data-phase=draw] .cf-d,[data-cf-host]:hover .cf[data-phase=rest] .cf-d{clip-path:inset(0)}[data-cf-host]:hover .cf[data-phase=draw] .cf-d{animation-play-state:running,running}[data-cf-host]:hover .cf[data-phase=rest] .cf-d{animation-play-state:running}[data-cf-host]:hover .cf-nudge{translate:var(--cf-nudge,0px) 0px}}\";const STYLE_ID=\"cf-style\";let styled=false;function ensureStyle(){if(styled||typeof document===\"undefined\")return;if(!document.getElementById(STYLE_ID)){const s=document.createElement(\"style\");s.id=STYLE_ID;s.textContent=CSS;document.head.appendChild(s);}styled=true;}function prefersReduced(){return typeof window!==\"undefined\"&&typeof window.matchMedia===\"function\"&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;}// One observer for every instance on the page.\nlet io=null;function watch(el){if(typeof IntersectionObserver!==\"function\"){el.setAttribute(\"data-phase\",\"draw\");return;}if(!io){io=new IntersectionObserver(entries=>{for(const e of entries){if(!e.isIntersecting)continue;io&&io.unobserve(e.target);e.target.setAttribute(\"data-phase\",\"draw\");}});}io.observe(el);}const EDGES=[0,1,2,3];const SEGS=[0,1,2,3,4,5,6,7];/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 160\n */export default function CardFrame(props){const{edgeColor,edgeOpacity,edgeHover,dashColor,dashOpacity,overshoot,hoverExtend,tint,delay,duration,nudgeLayer,nudge,play,style}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=React.useRef(null);ensureStyle();const ext=Math.max(0,overshoot);const hx=Math.max(0,hoverExtend);const L=Math.max(1,ext+hx);const d=Math.max(0,delay);const dur=Math.max(.2,duration);const ta=d+LEAD*.8+dur-.05;const fa=ta+TAIL+.05;const animated=!isCanvas&&play;React.useEffect(()=>{const el=ref.current;if(!el)return;el.style.opacity=\"\";const host=el.parentElement&&el.parentElement.parentElement;if(host){host.setAttribute(\"data-cf-host\",\"\");if(!isCanvas&&nudge&&nudgeLayer){const t=host.querySelector('[data-framer-name=\"'+nudgeLayer+'\"]');if(t){t.classList.add(\"cf-nudge\");host.style.setProperty(\"--cf-nudge\",nudge+\"px\");}}}if(!animated||prefersReduced()){el.setAttribute(\"data-phase\",\"rest\");return;}el.setAttribute(\"data-phase\",\"pre\");watch(el);return()=>{if(io)io.unobserve(el);};},[animated,isCanvas,nudge,nudgeLayer]);const vars={\"--L\":L+\"px\",\"--hx\":hx+\"px\",\"--ec\":edgeColor,\"--eo\":String(edgeOpacity),\"--eh\":String(edgeHover),\"--dc\":dashColor,\"--do\":String(dashOpacity),\"--di\":String(Math.min(1,dashOpacity+.4)),\"--tint\":tint,\"--d\":d+\"s\",\"--dur\":dur+\"s\",\"--ta\":ta+\"s\",\"--fa\":fa+\"s\"};return /*#__PURE__*/_jsxs(\"div\",{ref:ref,className:\"cf\",\"aria-hidden\":\"true\",\"data-phase\":isCanvas||!play?\"rest\":undefined,style:{position:\"relative\",width:\"100%\",height:\"100%\",...style,...vars,pointerEvents:\"none\",overflow:\"visible\",opacity:animated?0:undefined},children:[/*#__PURE__*/_jsx(\"div\",{className:\"cf-t\"}),EDGES.map(i=>/*#__PURE__*/_jsx(\"div\",{className:\"cf-e cf-e\"+i},i)),SEGS.map(i=>/*#__PURE__*/_jsx(\"div\",{className:\"cf-d cf-s\"+i},i))]});}CardFrame.defaultProps={edgeColor:\"#93A7AB\",edgeOpacity:.55,edgeHover:1,dashColor:\"#93A7AB\",dashOpacity:.4,overshoot:10,hoverExtend:5,tint:\"rgba(238, 236, 231, 0.035)\",delay:0,duration:.75,nudgeLayer:\"Value\",nudge:4,play:true};addPropertyControls(CardFrame,{edgeColor:{type:ControlType.Color,title:\"Edge\",defaultValue:\"#93A7AB\"},edgeOpacity:{type:ControlType.Number,title:\"Edge Alpha\",defaultValue:.55,min:0,max:1,step:.05},edgeHover:{type:ControlType.Number,title:\"Hover Alpha\",defaultValue:1,min:0,max:1,step:.05},dashColor:{type:ControlType.Color,title:\"Overshoot\",defaultValue:\"#93A7AB\"},dashOpacity:{type:ControlType.Number,title:\"Dash Alpha\",defaultValue:.4,min:0,max:1,step:.05},overshoot:{type:ControlType.Number,title:\"Length\",defaultValue:10,min:0,max:40,step:1,unit:\"px\"},hoverExtend:{type:ControlType.Number,title:\"Hover Reach\",defaultValue:5,min:0,max:20,step:1,unit:\"px\"},tint:{type:ControlType.Color,title:\"Hover Tint\",defaultValue:\"rgba(238, 236, 231, 0.035)\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:3,step:.01,unit:\"s\"},duration:{type:ControlType.Number,title:\"Draw\",defaultValue:.75,min:.2,max:3,step:.05,unit:\"s\"},nudgeLayer:{type:ControlType.String,title:\"Nudge Layer\",defaultValue:\"Value\"},nudge:{type:ControlType.Number,title:\"Nudge\",defaultValue:4,min:0,max:16,step:1,unit:\"px\"},play:{type:ControlType.Boolean,title:\"Play\",defaultValue:true,enabledTitle:\"Animate\",disabledTitle:\"Static\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CardFrame\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"160\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"300\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CardFrame.map"],"mappings":"A,8MAKkhI,SAASc,GAAa,CAAC,GAAG,KAAQ,OAAO,SAAW,KAAmB,IAAG,CAAC,SAAS,eAAeC,CAAQ,EAAE,CAAC,IAAMC,EAAE,SAAS,cAAc,OAAO,EAAE,EAAE,GAAGD,EAAS,EAAE,YAAYE,EAAI,SAAS,KAAK,YAAYD,CAAC,CAAE,CAAC,EAAO,EAAR,CAAa,CAAC,SAASE,GAAgB,CAAC,OAAcd,IAAS,QAAa,OAAOA,EAAO,YAAa,YAAYA,EAAO,WAAW,kCAAkC,CAAC,CAAC,OAAQ,CAC14I,SAASe,EAAM,EAAG,CAAI,OAAO,sBAAuB,YAAyD,AAAQC,IAAG,IAAI,qBAAqB,GAAS,CAAC,IAAI,IAAMC,KAAKC,EAAaD,EAAE,iBAAwBD,GAAIA,EAAG,UAAUC,EAAE,MAAM,EAAEA,EAAE,OAAO,aAAa,aAAa,MAAM,EAAG,CAAC,EAAGD,EAAG,QAAQG,CAAE,GAAzOA,EAAG,aAAa,aAAa,MAAM,CAAwM,CAKpT,SAAwBC,EAAU,EAAM,CAAC,GAA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