{"version":3,"file":"AudienceFloater.B4aidO2f.mjs","names":["useState","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","init_jsx_runtime","c","p","ce","window","addPropertyControls","init_framer_DKgW_P28","ControlType","useIsStaticRenderer","AudienceFloater","props","isStatic","phone","setPhone","show","setShow","update","isPhone","y","nearEnd","font","color","textColor","seg","merchantLink","merchantLabel","lenderLink","lenderLabel","init_AudienceFloater"],"sources":["https:/framerusercontent.com/modules/RQIwHBXLily8fcmagZd2/jAUHXPAXK3GZ8z2VTG7J/AudienceFloater.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useState}from\"react\";/**\n * Floating \"For Merchants\" / \"For Lenders\" shortcuts.\n * Slim vertical tab on the right edge (slightly smaller on phones, sitting above the sticky CTA).\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AudienceFloater(props){const{merchantLabel=\"For Merchants\",merchantLink=\"https://partner.getshopse.com/partner/#/auth/signup\",lenderLabel=\"For Lenders\",lenderLink=\"./lenderpage-v1\",color=\"#2F6BFF\",textColor=\"#FFFFFF\"}=props;const isStatic=useIsStaticRenderer();const[phone,setPhone]=useState(false);const[show,setShow]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const update=()=>{const isPhone=window.innerWidth<768;setPhone(isPhone);const y=window.scrollY;const nearEnd=window.innerHeight+y>=document.documentElement.scrollHeight-700;setShow(y>120&&!nearEnd);};update();window.addEventListener(\"scroll\",update,{passive:true});window.addEventListener(\"resize\",update);return()=>{window.removeEventListener(\"scroll\",update);window.removeEventListener(\"resize\",update);};},[]);const font='Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif';if(isStatic){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:color,color:textColor,fontFamily:font,fontSize:12,borderRadius:12},children:\"Audience floater\"});}// not shown on phones: it covers content and competes with the sticky button\nif(phone)return null;const seg={display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:phone?\"14px 0\":\"18px 0\",width:phone?32:40,writingMode:\"vertical-rl\",transform:\"rotate(180deg)\",fontFamily:font,fontSize:phone?12:13,fontWeight:600,letterSpacing:\"0.02em\",color:textColor,textDecoration:\"none\",whiteSpace:\"nowrap\"};return /*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":\"Shortcuts for merchants and lenders\",style:{position:\"fixed\",right:0,top:phone?\"42%\":\"50%\",zIndex:90,display:\"flex\",flexDirection:\"column\",background:color,borderRadius:\"14px 0 0 14px\",boxShadow:\"0 8px 28px rgba(18,18,21,0.18)\",overflow:\"hidden\",transform:`translateY(-50%) translateX(${show?0:100}%)`,opacity:show?1:0,pointerEvents:show?\"auto\":\"none\",transition:\"transform .35s ease, opacity .35s ease\"},children:[/*#__PURE__*/_jsx(\"a\",{href:merchantLink,style:seg,target:\"_blank\",rel:\"noopener\",children:merchantLabel}),/*#__PURE__*/_jsx(\"div\",{style:{height:1,background:\"rgba(255,255,255,0.35)\",margin:\"0 8px\"}}),/*#__PURE__*/_jsx(\"a\",{href:lenderLink,style:seg,children:lenderLabel})]});}addPropertyControls(AudienceFloater,{merchantLabel:{type:ControlType.String,title:\"Merchants label\",defaultValue:\"For Merchants\"},merchantLink:{type:ControlType.String,title:\"Merchants link\",defaultValue:\"https://partner.getshopse.com/partner/#/auth/signup\"},lenderLabel:{type:ControlType.String,title:\"Lenders label\",defaultValue:\"For Lenders\"},lenderLink:{type:ControlType.String,title:\"Lenders link\",defaultValue:\"./lenderpage-v1\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#2F6BFF\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AudienceFloater\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AudienceFloater.map"],"mappings":"A,8MAMG,SAAwBc,EAAgB,EAAM,CAAC,GAAK,CAAC,gBAAc,gBAAgB,eAAa,sDAAsD,cAAY,cAAc,aAAW,kBAAkB,QAAM,UAAU,YAAU,WAAWC,EAAYC,EAASH,EAAoB,EAAO,CAACI,EAAMC,GAAUlB,EAAS,EAAK,EAAO,CAACmB,EAAKC,GAASpB,EAAS,EAAK,EAAEQ,MAAc,CAAC,GAAUC,IAAS,OAAY,OAAO,IAAMY,MAAW,CAAC,IAAMC,EAAQb,EAAO,WAAW,IAAIS,EAASI,CAAO,EAAE,IAAMC,EAAEd,EAAO,QAAce,EAAQf,EAAO,YAAYc,GAAG,SAAS,gBAAgB,aAAa,IAAIH,EAAQG,EAAE,KAAK,CAACC,CAAO,CAAE,EAA4G,OAA1GH,EAAO,EAAEZ,EAAO,iBAAiB,SAASY,EAAO,CAAC,QAAQ,EAAI,CAAC,EAAEZ,EAAO,iBAAiB,SAASY,CAAM,MAAY,CAACZ,EAAO,oBAAoB,SAASY,CAAM,EAAEZ,EAAO,oBAAoB,SAASY,CAAM,CAAE,CAAE,EAAE,CAAC,CAAC,EAAE,IAAMI,EAAK,mEAAmE,GAAGT,EAAU,MAAoB,gBAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,WAAWU,EAAM,MAAMC,EAAU,WAAWF,EAAK,SAAS,GAAG,aAAa,EAAE,EAAE,SAAS,kBAAkB,CAAC,EAC9nC,GAAGR,EAAM,OAAO,KAAK,IAAMW,EAAI,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,QAAQX,EAAM,SAAS,SAAS,MAAMA,EAAM,GAAG,GAAG,YAAY,cAAc,UAAU,iBAA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