{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/bdosPwM78DFIkcTx6w1l/LB9pzaFhgGPcBU9JZBAG/CustomerReferralUpgradeOverride.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{ReferralStateStore}from\"https://framerusercontent.com/modules/vSuhNNIjl3bZxxOcOO8z/0WGfmiwCEhDp9uZwwHaB/ReferralStateStore.js\";import{ServerFuncs}from\"https://framerusercontent.com/modules/iXjxGQ7PR74Is1fLgOh4/DVJl1xlkbU4SiKbzSP2w/ServerFunc.js\";export function withTextOverflow(Component){return props=>{var _props_children_props_children_props,_props_children_props_children,_props_children_props,_props_children;const style=(_props_children=props.children)===null||_props_children===void 0?void 0:(_props_children_props=_props_children.props)===null||_props_children_props===void 0?void 0:(_props_children_props_children=_props_children_props.children)===null||_props_children_props_children===void 0?void 0:(_props_children_props_children_props=_props_children_props_children.props)===null||_props_children_props_children_props===void 0?void 0:_props_children_props_children_props.style;if(style){props.children.props.children.props.style={...style,textOverflow:\"ellipsis\",whiteSpace:\"nowrap\",overflow:\"hidden\",paddingRight:\"50px\"};}return /*#__PURE__*/_jsx(Component,{...props});};}export function forThis(Component){return props=>{const{referralStateStore}=ReferralStateStore.useStore();return referralStateStore.isTenantPaid&&/*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRefferUserInfo(Component){return props=>{const[userInfo,setUserInfo]=useState({});useEffect(()=>{const link_suffix=getReferrCode();const domain=ServerFuncs.getDomain();(async()=>{try{const response=await fetch(`https://${domain}/lark/global-market/v1/referral/ambassador_info?link_suffix=${link_suffix}`);const{data,code}=await response.json();if(code!==0){console.log(\"get user info error\");return;}const info={username:data.display_name.value,userAvatar:data.avatar_url};setUserInfo(info);}catch{console.log(\"get user info error\");}})();},[]);return /*#__PURE__*/_jsx(Component,{...props,referrUserName:userInfo===null||userInfo===void 0?void 0:userInfo.username,referrUserAvatar:userInfo===null||userInfo===void 0?void 0:userInfo.userAvatar});};}function getReferrCode(){const path=window.location.pathname;const parts=path.split(\"/\");const referrCode=parts[parts.length-1];return referrCode;}\nexport const __FramerMetadata__ = {\"exports\":{\"withTextOverflow\":{\"type\":\"reactHoc\",\"name\":\"withTextOverflow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRefferUserInfo\":{\"type\":\"reactHoc\",\"name\":\"withRefferUserInfo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"forThis\":{\"type\":\"reactHoc\",\"name\":\"forThis\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomerReferralUpgradeOverride.map"],
  "mappings": "kLAAqV,SAASA,EAAiBC,EAAU,CAAC,OAAOC,GAAO,CAAC,IAAIC,EAAqCC,EAA+BC,EAAsBC,EAAgB,IAAMC,GAAOD,EAAgBJ,EAAM,YAAY,MAAMI,IAAkB,SAAeD,EAAsBC,EAAgB,SAAS,MAAMD,IAAwB,SAAeD,EAA+BC,EAAsB,YAAY,MAAMD,IAAiC,SAAeD,EAAqCC,EAA+B,SAAS,MAAMD,IAAuC,OAArV,OAAmWA,EAAqC,MAAM,OAAGI,IAAOL,EAAM,SAAS,MAAM,SAAS,MAAM,MAAM,CAAC,GAAGK,EAAM,aAAa,WAAW,WAAW,SAAS,SAAS,SAAS,aAAa,MAAM,GAAuBC,EAAKP,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE,CAAQ,SAASO,EAAQR,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAAC,mBAAAQ,CAAkB,EAAEC,EAAmB,SAAS,EAAE,OAAOD,EAAmB,cAA2BF,EAAKP,EAAU,CAAC,GAAGC,EAAM,WAAW,CAAC,MAAM,IAAI,CAAC,CAAC,CAAE,CAAE,CAAQ,SAASU,EAAmBX,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACW,EAASC,CAAW,EAAEC,EAAS,CAAC,CAAC,EAAE,OAAAC,EAAU,IAAI,CAAC,IAAMC,EAAYC,EAAc,EAAQC,EAAOC,EAAY,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,IAAMC,EAAS,MAAM,MAAM,WAAWF,gEAAqEF,GAAa,EAAO,CAAC,KAAAK,EAAK,KAAAC,CAAI,EAAE,MAAMF,EAAS,KAAK,EAAE,GAAGE,IAAO,EAAE,CAAC,QAAQ,IAAI,qBAAqB,EAAE,OAAQ,IAAMC,EAAK,CAAC,SAASF,EAAK,aAAa,MAAM,WAAWA,EAAK,UAAU,EAAER,EAAYU,CAAI,CAAE,MAAC,CAAM,QAAQ,IAAI,qBAAqB,CAAE,CAAC,GAAG,CAAE,EAAE,CAAC,CAAC,EAAsBhB,EAAKP,EAAU,CAAC,GAAGC,EAAM,eAAyDW,GAAS,SAAS,iBAA2DA,GAAS,UAAU,CAAC,CAAE,CAAE,CAAC,SAASK,GAAe,CAAqC,IAAMO,EAA/BC,EAAO,SAAS,SAA0B,MAAM,GAAG,EAAyC,OAAtBD,EAAMA,EAAM,OAAO,CAAC,CAAoB",
  "names": ["withTextOverflow", "Component", "props", "_props_children_props_children_props", "_props_children_props_children", "_props_children_props", "_props_children", "style", "p", "forThis", "referralStateStore", "ReferralStateStore", "withRefferUserInfo", "userInfo", "setUserInfo", "ye", "ue", "link_suffix", "getReferrCode", "domain", "ServerFuncs", "response", "data", "code", "info", "parts", "window"]
}
