{"version":3,"file":"ImageAltText.D0DO6IsK.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/dRwtQ0aOsEzRL5am9Hyp/N32Sdbr4fUWzBlKHf5jU/ImageAltText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";const altTextMap={// === Homepage ===\n\"XyTFuLT8r4J87nJdNqC6bCOkLY\":\"Step 1: Create your Linkie profile and pick your handle\",\"eQlZ4boQL7aoZDZfDHUnEP25nTc\":\"Step 2: Add link cards with social posts, videos, and embeds\",\"LPEmurPAgL7PBmS1DWjEZJsgnE\":\"Step 3: Share your Linkie everywhere and track results\",\"8kk2Jfhk443oRttQGbR9DUk07dg\":\"Sample Linkie profile preview\",\"i4GqXPNJuqm3wmjm5osUVWaZCw\":\"Sample Linkie profile with custom branding\",\"Uwopaj922tEK6cAdnIEl73xIpgU\":\"Sample Linkie profile with dark theme\",\"cNWMEaXdLrsUicCpJlnpcTUEDk\":\"Linkie editor screen showing card customization\",\"OtYm18zUoz7UWzhnFM562Kulhs\":\"Linkie editor screen showing layout options\",\"txT2NNyArqKjg3BxsmtDcg2g\":\"Linkie editor screen showing profile setup\",\"xFwBoUUDzORSbThuJaCFVOH3aQg\":\"Linkie editor screen showing analytics dashboard\",\"YP1TtQ5XP0KbrUJ2LfAxcJ8nlrI\":\"Linkie editor screen showing drag and drop interface\",// === /features/multi ===\n\"182IiugvaIt6LBLqR6wvnD2zCo\":\"Dashboard view for creating and organizing multiple Linkie profiles\",\"im3dSwG7nwhxmsFFbjvPknQUh0\":\"Interface for switching and updating content across different Linkie profiles\",\"XzgoTMR0OIIudZ4MoMKk4viMGec\":\"Unified analytics dashboard tracking performance across all Linkie pages\",\"tSqcZQSiOF5uRHoIm2LUlPRZc0\":\"Agency workspace managing multiple client Linkie pages\",\"ZnSv31eNI8rjEjBce3AVshJoLiM\":\"Brand with multiple locations using separate Linkie profiles\",\"Mi5nxHfbFHFfQnvFoZsEKw0Yo\":\"Creator managing multiple project pages with Linkie\",\"mH184eZzS5DtUiXPwPXss7YTvQ\":\"Team collaborating on shared Linkie link pages\",\"h8DML7CQJBlfuMNtds771g3cbY\":\"Lightning bolt icon representing speed\",\"aaXfdctOvIvwBMnC4gA5NyQbzfY\":\"Grid icon representing organization\",\"HC8QjIpLFyFGC0Or4c4prmLZl78\":\"Layers icon representing scalability\",\"t6lQs36ytbSmDVvlLj9oIQi7OU\":\"Shield icon representing control\",// === /features/drag-and-drop ===\n\"ZlCk0NPNRRsukR2qLtznY9rlQ\":\"Background decoration for drag and drop hero section\",\"9i7N6OK4wwyVASbLmFEjkjkDKE\":\"Linkie drag and drop editor interface preview\",\"xuEolS4RBFTaEmSoXFIustgawmM\":\"Linkie drag and drop editor mobile preview\",\"49cfBrzB93eMGqcMHmNpu1xHToI\":\"Profile setup screen showing photo, bio, and banner customization\",\"cnLFgWcLrlNrcKeQ0bAQ8FZwA\":\"Link card editor showing how to add clickable cards to your Linkie\",\"cMQwjPdaVyZUDx5MLAHilGfZY6M\":\"Social media posts embedded as link cards on a Linkie page\",\"WZCQXqN160sCyWXPTT1UOUIMzM\":\"Embedded content like videos and maps on a Linkie page\",\"oy6boutnGgfgLQWLShq2JfKda8\":\"Card customization showing images, text, and call-to-action options\",\"BINVwAyFrZj8N77qLBJvCTwKkl4\":\"Email signup button on a Linkie page for collecting subscribers\",\"A3U3eHAkPGO2CTq2zuAbJnDnI\":\"Light and dark mode toggle for Linkie page appearance\",\"nkn1NYJXVUVMVHPS1lzIOFhmo\":\"Live preview of Linkie page before publishing\",\"b2W7fKl7U8hy9np5cAD0ne7mwg\":\"Dashboard showing traffic sources and link click analytics\",\"bwnoeKQf146CWknoOnsI7pkbU8\":\"Layout builder icon for custom page design\",\"FXbx4nVh0Pesoyi6eelcqLFpt4\":\"Link card icon for adding customized cards\",\"BoL0F1jA2aucWGZ3qr2HUfIays\":\"Preview icon for checking page before sharing\",\"qoRjwoSbzftiaip8Yzef71x4nc\":\"Clock icon representing quick setup\",// === CTA background ===\n\"cFBx018Oywy3qup8m46C9xaCZ3E\":\"Gradient background for call-to-action section\"};function getAltForUrl(url){for(const[fragment,alt]of Object.entries(altTextMap)){if(url.includes(fragment)){return alt;}}return null;}function applyAltText(container){// 1. Handle <img> elements with empty or missing alt\nconst images=container.querySelectorAll(\"img\");for(const img of images){const src=img.getAttribute(\"src\")||\"\";const srcset=img.getAttribute(\"srcset\")||\"\";const combinedSrc=src+\" \"+srcset;if(img.getAttribute(\"alt\"))continue;// already has non-empty alt\nconst alt=getAltForUrl(combinedSrc);if(alt){img.setAttribute(\"alt\",alt);}}// 2. Handle elements with CSS background-image\nconst allElements=container.querySelectorAll(\"*\");const elements=[container,...Array.from(allElements)];for(const el of elements){if(!(el instanceof HTMLElement))continue;if(el.tagName===\"IMG\")continue;// already handled\nif(el.getAttribute(\"aria-label\"))continue;const style=window.getComputedStyle(el);const bgImage=style.backgroundImage||\"\";if(!bgImage||bgImage===\"none\")continue;const alt=getAltForUrl(bgImage);if(alt){el.setAttribute(\"role\",\"img\");el.setAttribute(\"aria-label\",alt);}}}export function withImageAltText(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current)return;const container=ref.current;// Initial pass after a short delay to let images load\nconst timer=setTimeout(()=>applyAltText(container),500);// Watch for dynamically loaded images\nconst observer=new MutationObserver(()=>{applyAltText(container);});observer.observe(container,{childList:true,subtree:true,attributes:true,attributeFilter:[\"style\",\"src\",\"srcset\"]});return()=>{clearTimeout(timer);observer.disconnect();};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withImageAltText\":{\"type\":\"reactHoc\",\"name\":\"withImageAltText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageAltText.map"],"mappings":"kIAIgF,SAAS,EAAa,EAAI,CAAC,IA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