{"version":3,"file":"ResourceCard.DRKALfJA.mjs","names":["_Fragment","useRef","useState"],"sources":["https:/framerusercontent.com/modules/uWEa9VV3iwcJ1LZVj1ky/4jamZAP4twqfixflI05d/ResourceCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget,Link}from\"framer\";export function withFourLineTitle(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`.rc-four-lines{height:auto!important;min-height:0!important;max-height:none!important}.rc-four-lines :is(h1,h2,h3,h4,h5,h6,p){height:4lh!important;min-height:4lh!important;max-height:4lh!important;overflow:hidden!important;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:4}`}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,className:[props.className||\"\",\"rc-four-lines\"].join(\" \")})]}));}function selectedResource(){if(typeof window===\"undefined\")return{title:\"\",file:\"\"};const q=new URLSearchParams(window.location.search);let saved={title:\"\",file:\"\"};try{saved=JSON.parse(sessionStorage.getItem(\"labincube-resource\")||\"{}\");}catch{}let file=q.get(\"file\")||saved.file||\"\";try{const u=new URL(file);if(u.protocol!==\"https:\"||u.hostname!==\"framerusercontent.com\")file=\"\";}catch{file=\"\";}return{title:(q.get(\"resource\")||saved.title||\"\").slice(0,600),file};}/** @framerSupportedLayoutWidth any *//** @framerSupportedLayoutHeight auto */export default function ResourceDownload({file,title,style,font}){if(!file)return null;const href=\"/resources/download?\"+new URLSearchParams({resource:title||\"Resource\",file}).toString();return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`.framer-UalSk:hover .resource-download,.framer-SSPg9:hover .resource-download{color:#fff!important}`}),/*#__PURE__*/_jsx(Link,{href:\"/resources/download\",children:/*#__PURE__*/_jsxs(\"a\",{className:\"resource-download\",onClickCapture:()=>{try{sessionStorage.setItem(\"labincube-resource\",JSON.stringify({title:title||\"Resource\",file}));}catch{}},style:{...style,display:\"flex\",alignItems:\"center\",gap:6,color:\"inherit\",fontFamily:'\"Switzer\", \"Switzer Placeholder\", sans-serif',fontSize:14,fontWeight:500,lineHeight:\"20px\",...font,textDecoration:\"none\",width:\"100%\",minWidth:0},\"aria-label\":title?\"Request PDF: \"+title:\"Request PDF\",children:[/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.5\",style:{flexShrink:0},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M14 2H6v20h12V6zM14 2v5h5M9 12h6M12 10v7m-3-3 3 3 3-3\"})}),/*#__PURE__*/_jsx(\"span\",{children:\"Download PDF\"}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",children:\"↗\"})]})})]});}addPropertyControls(ResourceDownload,{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontFamily:\"Switzer\",fontSize:\"14px\",fontWeight:500,lineHeight:\"20px\"}},file:{type:ControlType.File,title:\"Download File\",allowedFileTypes:[\"pdf\"]},title:{type:ControlType.String,title:\"Resource Title\",defaultValue:\"\"}});// Framer Form owns transport, pending/error states, and the Success transition.\n// This override only carries resource metadata and validates the selected resource.\nexport function withResourceRequestForm(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const root=useRef(null);const[resource,setResource]=useState({title:\"\",file:\"\"});const[notice,setNotice]=useState(\"\");useEffect(()=>{setResource(selectedResource());},[]);const syncFields=form=>{const fields={inquiryType:\"resource-download\",ResourceTitle:resource.title,ResourceFile:resource.file,SourcePage:window.location.pathname};Object.entries(fields).forEach(([name,value])=>{let input=Array.from(form.elements).find(element=>element instanceof HTMLInputElement&&element.name===name);if(!input){input=document.createElement(\"input\");input.type=\"hidden\";input.name=name;input.dataset.resourceMetadata=\"true\";form.appendChild(input);}if(input.value!==value)input.value=value;});};useEffect(()=>{const container=root.current;if(!container)return;const sync=()=>{const form=container.querySelector(\"form\");if(form)syncFields(form);};sync();const observer=new MutationObserver(sync);observer.observe(container,{childList:true,subtree:true});return()=>{observer.disconnect();container.querySelectorAll('[data-resource-metadata=\"true\"]').forEach(input=>input.remove());};},[resource]);const canvas=RenderTarget.current()===RenderTarget.canvas;return /*#__PURE__*/_jsxs(\"div\",{ref:root,style:{...props.style,width:\"100%\",height:\"auto\",minWidth:0,fontFamily:\"inherit\",color:\"inherit\"},onSubmitCapture:event=>{const form=event.target;if(!(form instanceof HTMLFormElement))return;if(!form.reportValidity()||!resource.file||!resource.title){event.preventDefault();event.stopPropagation();setNotice(!resource.file||!resource.title?\"Please select a resource from the resources list first.\":\"Please complete all required fields.\");return;}const data=new FormData(form);if([\"Name\",\"Company\",\"Email\"].some(name=>!String(data.get(name)||\"\").trim())){event.preventDefault();event.stopPropagation();setNotice(\"Please complete all required fields.\");return;}syncFields(form);setNotice(\"\");// Do not intercept valid submissions: Send to → Webhook is the only destination.\n},children:[/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:28,overflowWrap:\"anywhere\"},children:[/*#__PURE__*/_jsx(\"p\",{className:\"framer-text framer-styles-preset-1u7rb1z\",\"data-styles-preset\":\"uS16Jm_dl\",style:{margin:\"0 0 8px\"},children:\"SELECTED RESOURCE\"}),/*#__PURE__*/_jsx(\"h1\",{className:\"framer-text framer-styles-preset-6jco5a\",\"data-styles-preset\":\"u6ih0FRHj\",style:{margin:0,\"--framer-text-color\":\"var(--token-f95bcf34-0309-40a1-bdd6-4b6f3d8e4d06, rgb(26, 26, 26))\"},children:resource.title||(canvas?\"Selected resource title\":\"Select a resource to download\")}),!resource.title&&!canvas&&/*#__PURE__*/_jsx(Link,{href:\"/resources/resources\",children:/*#__PURE__*/_jsx(\"a\",{style:{display:\"inline-block\",marginTop:12,color:\"inherit\",fontSize:14},children:\"Browse resources →\"})})]}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,width:\"100%\",height:\"auto\"}}),notice&&/*#__PURE__*/_jsx(\"p\",{role:\"status\",style:{fontSize:14,lineHeight:1.5,margin:\"16px 0 0\"},children:notice})]});});}/** @framerSupportedLayoutWidth any *//** @framerSupportedLayoutHeight auto */export function ResourceRequestComplete({style,font}){const[resource,setResource]=useState({title:\"\",file:\"\"});useEffect(()=>{setResource(selectedResource());},[]);const ready=Boolean(resource.file&&resource.title);return /*#__PURE__*/_jsxs(\"section\",{style:{...style,width:\"100%\",height:\"auto\",fontFamily:'\"Inter Display\", sans-serif',...font,color:\"#1e2844\",padding:\"28px 0\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{fontSize:12,letterSpacing:1,margin:\"0 0 16px\"},children:\"THANK YOU\"}),/*#__PURE__*/_jsx(\"h2\",{style:{fontSize:26,lineHeight:1.3,margin:\"0 0 16px\"},children:\"Your resource is ready.\"}),/*#__PURE__*/_jsxs(\"p\",{style:{fontSize:14,lineHeight:1.6,margin:\"0 0 28px\",color:\"#666\"},children:[\"Thank you for your interest in LABINCUBE.\",/*#__PURE__*/_jsx(\"br\",{}),\"Use the button below to download your PDF.\"]}),ready?/*#__PURE__*/_jsx(\"a\",{href:resource.file,target:\"_blank\",rel:\"noopener noreferrer\",download:true,style:{display:\"inline-block\",border:0,background:\"#1e2844\",color:\"white\",padding:\"16px 28px\",fontSize:14,fontFamily:\"inherit\",textDecoration:\"none\"},children:\"Download PDF ↓\"}):/*#__PURE__*/_jsx(Link,{href:\"/resources/resources\",children:/*#__PURE__*/_jsx(\"a\",{style:{color:\"inherit\",fontSize:14},children:\"Browse resources →\"})}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:12,lineHeight:1.5,color:\"#888\",marginTop:16},children:ready?resource.title:\"Select a resource from the resources list to download your PDF.\"})]});}addPropertyControls(ResourceRequestComplete,{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontFamily:\"Inter Display\",fontSize:\"14px\",fontWeight:400,lineHeight:\"1.6em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"withFourLineTitle\":{\"type\":\"reactHoc\",\"name\":\"withFourLineTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withResourceRequestForm\":{\"type\":\"reactHoc\",\"name\":\"withResourceRequestForm\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ResourceRequestComplete\":{\"type\":\"reactComponent\",\"name\":\"ResourceRequestComplete\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"\",\"framerSupportedLayoutWidth\":\"\",\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"ResourceDownload\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ResourceCard.map"],"mappings":"yOAA6M,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAmB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,gTAAgT,CAAC,EAAe,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,UAAU,CAAC,EAAM,WAAW,GAAG,eAAe,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,SAAS,GAAkB,CAAC,GAAU,IAAS,OAAY,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,EAAE,IAAM,EAAE,IAAI,gBAAgB,EAAO,SAAS,MAAM,EAAM,EAAM,CAAC,MAAM,GAAG,KAAK,EAAE,EAAE,GAAG,CAAC,EAAM,KAAK,MAAM,eAAe,QAAQ,oBAAoB,GAAG,IAAI,CAAE,MAAM,CAAC,CAAC,IAAI,EAAK,EAAE,IAAI,MAAM,GAAG,EAAM,MAAM,GAAG,GAAG,CAAC,IAAM,EAAE,IAAI,IAAI,CAAI,GAAK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