{"version":3,"file":"shared-lib.CdVvJppB.mjs","names":["useRef","useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/Gy0Cqse55zY7qEPIDKC0/KuPIxnpLAy4qFCHGho95/ButtonInteractions.js","https:/framerusercontent.com/modules/8LdLM88ZIGzLi2UK24sI/XexBaNADGRSu2QEZycar/hr1s72EWs.js"],"sourcesContent":["// User request: Create a code override withSophisticatedButton in ButtonInteractions.tsx for existing canvas buttons, preserving all props/refs/handlers/styles/dimensions/typography/corners/links, with runtime DOM-aware hover/focus/reduced-motion behavior and no nested semantics.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useMemo,useRef,useState}from\"react\";import{useIsStaticRenderer}from\"framer\";const STYLE_ID=\"sophisticated-button-override-styles\";const CLASS_NAME=\"framer-sophisticated-button\";const DEFAULT_FOCUS_COLOR=\"#243d52\";const TRANSPARENT_HOVER_TINT=\"rgba(36, 61, 82, 0.08)\";function ensureScopedStyles(){if(typeof document===\"undefined\")return;if(document.getElementById(STYLE_ID))return;const style=document.createElement(\"style\");style.id=STYLE_ID;style.textContent=`\n.${CLASS_NAME} {\n  transition: background-color 225ms cubic-bezier(0, 0, 0.58, 1), scale 140ms ease-out;\n  transform-origin: center;\n}\n\n@media (hover: hover) and (pointer: fine) {\n  .${CLASS_NAME}[data-sb-disabled=\"false\"]:hover {\n    background-color: var(--sb-hover-bg, ${TRANSPARENT_HOVER_TINT}) !important;\n  }\n}\n\n.${CLASS_NAME}[data-sb-disabled=\"false\"][data-sb-pressed=\"true\"] {\n  scale: 0.98;\n}\n\n.${CLASS_NAME}[data-sb-disabled=\"false\"]:focus-visible {\n  outline: 2px solid var(--sb-focus-color, ${DEFAULT_FOCUS_COLOR});\n  outline-offset: 3px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .${CLASS_NAME} {\n    transition: background-color 225ms cubic-bezier(0, 0, 0.58, 1);\n  }\n  .${CLASS_NAME}[data-sb-pressed=\"true\"] {\n    scale: 1;\n  }\n}\n`;document.head.appendChild(style);}function mergeClassName(current,next){if(current&&next)return`${current} ${next}`;return current||next;}function parseRgba(input){const match=input.match(/rgba?\\(\\s*([0-9.]+)\\s*[,\\s]\\s*([0-9.]+)\\s*[,\\s]\\s*([0-9.]+)(?:\\s*[,/]\\s*([0-9.]+))?\\s*\\)/i);if(!match)return null;return{r:Number(match[1]),g:Number(match[2]),b:Number(match[3]),a:match[4]===undefined?1:Number(match[4])};}function clampChannel(value){return Math.max(0,Math.min(255,value));}function luminance(r,g,b){return(.2126*r+.7152*g+.0722*b)/255;}function hoverFromBackground(backgroundColor){const parsed=parseRgba(backgroundColor);if(!parsed||parsed.a===0)return TRANSPARENT_HOVER_TINT;const{r,g,b,a}=parsed;const isDark=luminance(r,g,b)<.45;const amount=isDark?.06:.05;const nextR=isDark?clampChannel(r+(255-r)*amount):clampChannel(r*(1-amount));const nextG=isDark?clampChannel(g+(255-g)*amount):clampChannel(g*(1-amount));const nextB=isDark?clampChannel(b+(255-b)*amount):clampChannel(b*(1-amount));return`rgba(${Math.round(nextR)}, ${Math.round(nextG)}, ${Math.round(nextB)}, ${a})`;}export function withSophisticatedButton(Component){return /*#__PURE__*/forwardRef(function WithSophisticatedButton(props,ref){const isStaticRenderer=useIsStaticRenderer();const localRef=useRef(null);const[isPressed,setIsPressed]=useState(false);const[hoverBg,setHoverBg]=useState(TRANSPARENT_HOVER_TINT);const[focusColor,setFocusColor]=useState(DEFAULT_FOCUS_COLOR);const isDisabled=Boolean(props.disabled||props[\"aria-disabled\"]===true||props[\"aria-disabled\"]===\"true\");useEffect(()=>{if(isStaticRenderer)return;ensureScopedStyles();},[isStaticRenderer]);useEffect(()=>{if(isStaticRenderer||typeof window===\"undefined\")return;const node=localRef.current;if(!node)return;const computed=window.getComputedStyle(node);const computedBackground=computed.backgroundColor||\"rgba(0,0,0,0)\";const computedBorder=computed.borderColor;const computedText=computed.color;const nextHoverBg=hoverFromBackground(computedBackground);const parsedBorder=parseRgba(computedBorder);const parsedText=parseRgba(computedText);const nextFocusColor=parsedBorder&&parsedBorder.a>0?computedBorder:parsedText&&parsedText.a>0?computedText:DEFAULT_FOCUS_COLOR;startTransition(()=>{setHoverBg(nextHoverBg);setFocusColor(nextFocusColor);});},[isStaticRenderer,props.style,props.className,props.background]);useEffect(()=>{if(isStaticRenderer||typeof window===\"undefined\"||!isPressed)return;const release=()=>{startTransition(()=>setIsPressed(false));};window.addEventListener(\"pointerup\",release);window.addEventListener(\"pointercancel\",release);window.addEventListener(\"blur\",release);return()=>{window.removeEventListener(\"pointerup\",release);window.removeEventListener(\"pointercancel\",release);window.removeEventListener(\"blur\",release);};},[isPressed,isStaticRenderer]);const setRefs=useCallback(node=>{localRef.current=node;if(typeof ref===\"function\"){ref(node);return;}if(ref&&\"current\"in ref){ref.current=node;}},[ref]);const handlePointerDown=useCallback(event=>{if(!isDisabled)startTransition(()=>setIsPressed(true));props.onPointerDown?.(event);},[isDisabled,props]);const handlePointerUp=useCallback(event=>{startTransition(()=>setIsPressed(false));props.onPointerUp?.(event);},[props]);const handlePointerCancel=useCallback(event=>{startTransition(()=>setIsPressed(false));props.onPointerCancel?.(event);},[props]);const handleKeyDown=useCallback(event=>{if(!isDisabled&&(event.key===\"Enter\"||event.key===\" \")){startTransition(()=>setIsPressed(true));}props.onKeyDown?.(event);},[isDisabled,props]);const handleKeyUp=useCallback(event=>{if(event.key===\"Enter\"||event.key===\" \"){startTransition(()=>setIsPressed(false));}props.onKeyUp?.(event);},[props]);const handleBlur=useCallback(event=>{startTransition(()=>setIsPressed(false));props.onBlur?.(event);},[props]);const mergedClassName=useMemo(()=>mergeClassName(props.className,CLASS_NAME),[props.className]);const mergedStyle=useMemo(()=>({...props.style,[\"--sb-hover-bg\"]:hoverBg,[\"--sb-focus-color\"]:focusColor}),[props.style,hoverBg,focusColor]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,className:mergedClassName,style:mergedStyle,\"data-sb-disabled\":isDisabled?\"true\":\"false\",\"data-sb-pressed\":isPressed?\"true\":\"false\",onPointerDown:handlePointerDown,onPointerUp:handlePointerUp,onPointerCancel:handlePointerCancel,onKeyDown:handleKeyDown,onKeyUp:handleKeyUp,onBlur:handleBlur});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSophisticatedButton\":{\"type\":\"reactHoc\",\"name\":\"withSophisticatedButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ButtonInteractions.map","// Generated by Framer (0da2bc6)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOMV2;Freight Disp Black\",\"CUSTOMV2;Freight Disp Black\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Freight Disp Black\",openType:true,source:\"custom\",style:\"normal\",uiFamilyName:\"Freight\",url:\"https://framerusercontent.com/assets/edQR8kDya8Dis9vPfxroqOtco.woff2\",weight:\"900\"}]}];export const css=[\".framer-LGD1J .framer-styles-preset-mujzp3:not(.rich-text-wrapper), .framer-LGD1J .framer-styles-preset-mujzp3.rich-text-wrapper h1 { --framer-font-family: \\\"Freight Disp Black\\\", \\\"Freight Disp Black Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Freight Disp Black\\\", \\\"Freight Disp Black Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 44px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 900; --framer-font-weight-bold: 900; --framer-letter-spacing: 0px; --framer-line-height: 0.95em; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: #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: 768px) { .framer-LGD1J .framer-styles-preset-mujzp3:not(.rich-text-wrapper), .framer-LGD1J .framer-styles-preset-mujzp3.rich-text-wrapper h1 { --framer-font-family: \\\"Freight Disp Black\\\", \\\"Freight Disp Black Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Freight Disp Black\\\", \\\"Freight Disp Black Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 44px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 900; --framer-font-weight-bold: 900; --framer-letter-spacing: 0px; --framer-line-height: 1.05em; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\",\"@media (max-width: 767px) and (min-width: 0px) { .framer-LGD1J .framer-styles-preset-mujzp3:not(.rich-text-wrapper), .framer-LGD1J .framer-styles-preset-mujzp3.rich-text-wrapper h1 { --framer-font-family: \\\"Freight Disp Black\\\", \\\"Freight Disp Black Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Freight Disp Black\\\", \\\"Freight Disp Black Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 32px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 900; --framer-font-weight-bold: 900; --framer-letter-spacing: 0px; --framer-line-height: 1.05em; --framer-paragraph-spacing: 0px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\"];export const className=\"framer-LGD1J\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\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