{"version":3,"file":"FAQAccessibility.DVsMlCS6.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/s5RY2H2Ea3cFYxjJWXRC/4A1gNFCrOxYqhxidkeYJ/FAQAccessibility.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";// Accessibility override for the FAQ accordion (Card/FAQ).\n// Marks the tappable frame as a button and keeps aria-expanded in sync\n// with the variant name (\"... Opened\" vs \"... Closed\").\nexport function withFaqAccessibility(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const localRef=useRef(null);useEffect(()=>{const el=localRef.current;if(!el)return;const sync=()=>{const name=el.getAttribute(\"data-framer-name\")||\"\";el.setAttribute(\"role\",\"button\");el.setAttribute(\"aria-expanded\",/open/i.test(name)?\"true\":\"false\");};sync();const observer=new MutationObserver(sync);observer.observe(el,{attributes:true,attributeFilter:[\"data-framer-name\",\"class\"]});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:node=>{localRef.current=node;if(typeof forwardedRef===\"function\")forwardedRef(node);else if(forwardedRef)forwardedRef.current=node;}});});}// Marks a tappable frame as a button so its aria-label is valid (used on the mobile Menu toggle).\nexport function withButtonRole(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsx(Component,{...props,ref:ref,role:\"button\"}));}// Keeps the collapsed mobile menu out of the tab order: while the Topbar is in its\n// \"Closed\" variant the nav links are clipped from view, so mark them inert.\nexport function withClosedMenuInert(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const localRef=useRef(null);useEffect(()=>{const el=localRef.current;if(!el)return;let root=el.parentElement;while(root&&!/(closed|opened|desktop|tablet|phone)/i.test(root.getAttribute(\"data-framer-name\")||\"\")){root=root.parentElement;}if(!root)return;const sync=()=>{const closed=/closed/i.test(root.getAttribute(\"data-framer-name\")||\"\");if(closed)el.setAttribute(\"inert\",\"\");else el.removeAttribute(\"inert\");};sync();const observer=new MutationObserver(sync);observer.observe(root,{attributes:true,attributeFilter:[\"data-framer-name\"]});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:node=>{localRef.current=node;if(typeof forwardedRef===\"function\")forwardedRef(node);else if(forwardedRef)forwardedRef.current=node;}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withClosedMenuInert\":{\"type\":\"reactHoc\",\"name\":\"withClosedMenuInert\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFaqAccessibility\":{\"type\":\"reactHoc\",\"name\":\"withFaqAccessibility\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withButtonRole\":{\"type\":\"reactHoc\",\"name\":\"withButtonRole\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQAccessibility.map"],"mappings":"gIAGA,SAAgB,EAAqB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAe,CAAC,IAAM,EAASA,EAAO,IAAI,EAA6Y,OAA3Y,MAAc,CAAC,IAAM,EAAG,EAAS,QAAQ,GAAG,CAAC,EAAG,OAAO,IAAM,MAAS,CAAC,IAAM,EAAK,EAAG,aAAa,kBAAkB,GAAG,GAAG,EAAG,aAAa,OAAO,QAAQ,EAAE,EAAG,aAAa,gBAAgB,QAAQ,KAAK,CAAI,EAAE,OAAO,OAAO,CAAE,EAAE,EAAK,EAAE,IAAM,EAAS,IAAI,iBAAiB,CAAI,EAAsF,OAApF,EAAS,QAAQ,EAAG,CAAC,WAAW,GAAK,gBAAgB,CAAC,mBAAmB,OAAO,CAAC,CAAC,MAAY,EAAS,WAAW,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,GAAM,CAAC,EAAS,QAAQ,EAAQ,OAAO,GAAe,WAAW,EAAa,CAAI,EAAU,IAAa,EAAa,QAAQ,EAAK,CAAC,CAAC,CAAE,CAAC,CAAE,CACxsB,SAAgB,EAAe,EAAU,CA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