PageSourceSearch

https://www.4yfn.com/build/assets/RecommendedForYouApp-CBrnK0TL.js

js 4yfn.com collected 2026-10-02 17:09:07 UTC 9,677 bytes, 2 lines download raw bytes

1import{j as l}from"./jsx-runtime-De-xxnn8.js";import{r as w}from"./react-D3AUmzDp.js";import{z as j,N as I,i as g,a as $,F as b,t as R,m as F,X as U}from"./app-D0n4DI5A.js";import{f as Y}from"./api-DoJkHvRD.js";import{E as C}from"./ErrorBoundary-CTW3kzcB.js";import{a as L}from"./hooks-DIS5Mpb8.js";import{a as B,g as H}from"./api-Bsq--Yvv.js";import{c as x}from"./index-BnpjehdN.js";import"./sendbird-CW8ws8M9.js";import"./vendor-DeLyGtsp.js";import"./dev-CYQ1UptD.js";import"./api-BS71LmV2.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"d00ef78d2efe895700fa19003848d1bfb72b1681"};var t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="7d1b1999-a9ee-4c3b-bc35-8bb8b1a5dfcc",s._sentryDebugIdIdentifier="sentry-dbid-7d1b1999-a9ee-4c3b-bc35-8bb8b1a5dfcc")}catch(a){}})();const M=({recommendation:s,handleClick:t,style:a})=>{var u,h;const r=j((s==null?void 0:s.photoUrl)||"/images/Placeholder.png");return l.jsxs("div",{onClick:t,className:x("recommendation p-2 hover:bg-cream cursor-pointer mx-2 group",{"rounded-lg":g()}),"data-href":"".concat(I.OTHER_DETAILS,"/").concat(s==null?void 0:s.userId),"data-id":s==null?void 0:s.userId,"data-type":s==null?void 0:s.dataType,"data-title":"".concat(s==null?void 0:s.firstName," ").concat(s==null?void 0:s.lastName),children:[l.jsx("div",{className:"relative w-full bg-white recommendedForYouImg",children:l.jsx("img",{className:x("object-cover w-full border-2",{"rounded-lg":g()}),src:r,alt:"".concat(s==null?void 0:s.firstName," ").concat(s==null?void 0:s.lastName,"'s Profile image"),onError:e=>{e.currentTarget.src=j("/images/Placeholder.png",300)}})}),l.jsx("h5",{className:"pt-3 uppercase text-secondary font-medium text-sm",children:s==null?void 0:s.dataType}),l.jsxs("div",{className:x({"group-hover:text-black":a==="dark"}),children:[l.jsxs("h4",{className:"font-black text-lg",children:[s==null?void 0:s.firstName," ",s==null?void 0:s.lastName]}),s.jobTitle&&l.jsxs("p",{children:[(u=s.jobTitle)==null?void 0:u.substring(0,35),((h=s.jobTitle)==null?void 0:h.length)>=35&&"..."]}),s.companyName&&l.jsx("p",{children:l.jsxs("strong",{children:[s.companyName.substring(0,35),s.companyName.length>=35&&"..."]})})]})]})},K=({recommendation:s,handleClick:t,style:a})=>{const r=j((s==null?void 0:s.logoUrl)||"/images/".concat($()?"4yfn":"mwc","-exhibitors-placeholder.png"));return l.jsxs("div",{onClick:t,className:x("recommendation p-2 hover:bg-cream cursor-pointer mx-2 group",{"rounded-lg":g()}),"data-href":s==null?void 0:s.url,"data-id":s==null?void 0:s.externalId,"data-type":s==null?void 0:s.dataType,"data-title":s==null?void 0:s.name,children:[l.jsx("div",{className:x("relative w-full bg-white p-1 recommendedForYouImg border-2",{"rounded-lg":g()}),children:l.jsx("img",{className:"object-contain",src:r,alt:"".concat(s==null?void 0:s.name,"'s Exhibitor image"),onError:u=>{u.currentTarget.src=j("/images/Placeholder.png",300)}})}),l.jsx("h5",{className:"pt-3 uppercase text-secondary font-medium text-sm",children:s==null?void 0:s.dataType}),s.name&&l.jsxs("h4",{className:x("font-black text-lg",{"group-hover:text-black":a==="dark"}),children:[s.name.substring(0,35),s.name.length>=35&&"..."]}),(s==null?void 0:s.stands[0])&&l.jsx("p",{className:"text-gray-600 text-sm",children:s==null?void 0:s.stands[0]})]})},X=({recommendation:s,handleClick:t,style:a})=>l.jsxs("div",{onClick:t,className:x("recommendation p-2 hover:bg-cream cursor-pointer mx-2 group",{"rounded-lg":g()}),"data-href":s==null?void 0:s.url,"data-id":s==null?void 0:s.externalId,"data-type":s==null?void 0:s.dataType,"data-title":s==null?void 0:s.title,children:[l.jsx("div",{className:x("relative w-full bg-dark border-2 pb-full overflow-hidden",{"rounded-lg":g()}),style:{paddingBottom:"100%"},children:l.jsxs("div",{className:"absolute calendarPosition",children:[l.jsx("div",{className:"rounded-gradient-borders mx-auto w-[90%]! h-[90%]! md:w-[80%]! md:h-[80%]! xl:w-full! xl:h-full! mb-2 lg:mb-0 xl:mb-3 flex! justify-center items-center",children:l.jsx("div",{className:"calendarWrapper p-0!",children:l.jsxs("div",{className:"calendarBox w-12.5! lg:w-15! date text-black text-center bg-white w-full rounded-lg py-1 font-black uppercase",children:[l.jsx("div",{className:"text-1xl lg:text-2xl",children:l.jsx("p",{children:s==null?void 0:s.dayShort.slice(4)})}),l.jsx("div",{children:l.jsx("p",{children:s==null?void 0:s.dayShort.slice(0,3)})})]})})}),l.jsxs("div",{className:"text-white text-center calTime  text-sm md:text-base",children:[s==null?void 0:s.startsAt," - ",s==null?void 0:s.endAt]})]})}),l.jsx("h5",{className:"pt-3 uppercase text-secondary font-medium text-sm",children:s==null?void 0:s.dataType}),s.title&&l.jsxs("h4",{className:x("font-black text-lg",{"group-hover:text-black":a==="dark"}),children:[s.title.substring(0,35),s.title.length>=35&&"..."]}),(s==null?void 0:s.room)&&l.jsx("p",{className:"text-gray-600 uppercase",children:s==null?void 0:s.room})]}),W=({recommendation:s,handleClick:t,style:a})=>{var u,h;const r=j((s==null?void 0:s.thumbnailUrl)||"/images/Placeholder.png");return l.jsxs("div",{onClick:t,className:x("recommendation p-2 hover:bg-cream cursor-pointer mx-2 group",{"rounded-lg":g()}),"data-href":s==null?void 0:s.url,"data-id":s==null?void 0:s.externalId,"data-type":s==null?void 0:s.dataType,"data-title":s==null?void 0:s.title,children:[l.jsx("div",{className:"relative w-full recommendedForYouImg",children:l.jsx("img",{className:x("object-cover w-full border-2",{"rounded-lg":g()}),src:r,alt:"".concat(s==null?void 0:s.title,"'s Profile image"),onError:e=>{e.currentTarget.src=j("/images/Placeholder.png",300)}})}),l.jsx("h5",{className:"pt-3 uppercase text-secondary font-medium text-sm",children:s==null?void 0:s.dataType}),l.jsxs("div",{className:x({"group-hover:text-black":a==="dark"}),children:[s.title?l.jsxs("h4",{className:"font-black text-lg",children:[s.title.substring(0,35),s.title.length>=35&&"..."]}
1):null,s.subtitle&&l.jsxs("p",{children:[(u=s.subtitle)==null?void 0:u.substring(0,35),((h=s.subtitle)==null?void 0:h.length)>=35&&"..."]}),s.companyName&&l.jsx("p",{children:l.jsxs("strong",{children:[s.companyName.substring(0,35),s.companyName.length>=35&&"..."]})})]})]})},q=({recommendation:s,style:t})=>{let a=r=>{r.preventDefault(),(s==null?void 0:s.dataType)==="attendee"?window.location="".concat(I.OTHER_DETAILS,"/").concat(s==null?void 0:s.userId,"?recommended=true"):window.location="".concat(s==null?void 0:s.url,"?recommended=true")};if((s==null?void 0:s.dataType)===b.SESSION)return l.jsx(X,{recommendation:s,handleClick:a,style:t});if((s==null?void 0:s.dataType)===b.EXHIBITOR)return l.jsx(K,{recommendation:s,handleClick:a,style:t});if((s==null?void 0:s.dataType)===b.SPEAKER)return l.jsx(W,{recommendation:s,handleClick:a,style:t});if((s==null?void 0:s.dataType)===b.ATTENDEE)return l.jsx(M,{recommendation:s,handleClick:a,style:t})};function E(s){const t=s.slice();for(let a=t.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[t[a],t[r]]=[t[r],t[a]]}return t}const T=async(s,t,a)=>{if(!(t!=null&&t.length))return[];try{const r=t.sort((h,e)=>h-e).join(","),u=await Y(s,r);return Object.values(u).map(h=>({...h,dataType:a}))}catch(r){return console.error("Error fetching ".concat(a,"s:"),r),[]}},z=async(s,t)=>{var a,r;try{const u=await F(U,"POST",s);return((r=(a=u==null?void 0:u.responseData)==null?void 0:a.result)!=null?r:[]).map(e=>({...e,dataType:"attendee"})).slice(0,t)}catch(u){return console.error("Error fetching attendees:",u),[]}},V=(s,t)=>{const a=Object.values(s).flat(),r=[];for(const e of Object.values(s))if(e.length){const p=E(e)[0];r.push(p)}const u=E(a.filter(e=>!r.includes(e))),h=t-r.length;return E([...r,...u.slice(0,h)])},G=({loadingSkeleton:s,heading:t,style:a})=>{const[r,u]=w.useState(!0),[h,e]=w.useState(null),[p]=L(),N=!!(p!=null&&p.networkingEnabled),c=parseInt(void 0,10)||6,i=Math.ceil(c/(N?4:3));return w.useEffect(()=>{(async()=>{u(!0),e(null);try{const f=N?await B():await H();if(!f||Object.keys(f).length===0){console.warn("No recommendations found or API not accessible."),e([]);return}const{sessionRecommendations:d=[],exhibitorRecommendations:S=[],speakerRecommendations:P=[],profileRecommendations:k=[]}=f,y={attendee:[],session:[],exhibitor:[],speaker:[]};N&&k.length>0&&(y.attendee=await z(k,i));const[A,O,D]=await Promise.all([T("/session.json",d,b.SESSION),T("/exhibitor.json",S,b.EXHIBITOR),T("/speaker.json",P,b.SPEAKER)]);y.session=A,y.exhibitor=O,y.speaker=D;const _=V(y,c);e(_)}catch(f){console.error("Unexpected error:",f),e([])}finally{u(!1)}})()},[p==null?void 0:p.networkingEnabled]),l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-auto mb-2 md:mb-0",children:l.jsx("div",{className:"sm:p-4 text-center xl:p-6",children:l.jsx("h3",{className:"text-1xl md:text-2xl lg:text-3xl leading-none",children:l.jsx("span",{id:"latest-mwc-barcelona-news",className:"block font-black",children:t||(N?R("myMwcTranslations.recommendedForYouHeading","Recommended For You"):R("myMwcTranslations.recommendedHeading","Recommended"))})})})}),l.jsx("ul",{className:"flex flex-wrap justify-center my-4",children:r||h===null?l.jsx("li",{className:"w-full text-center",dangerouslySetInnerHTML:{__html:s}}):h.length===0?l.jsx("li",{className:"w-full text-center",children:"Error fetching recommendations. Please try again later."}):h.map((v,f)=>l.jsx("li",{className:"w-1/2 sm:w-1/3 lg:w-1/6",children:l.jsx(q,{recommendation:v,style:a})},f))})]})},es=s=>l.jsx(C,{children:l.jsx(G,{...s})});export{es as default};
2//# sourceMappingURL=RecommendedForYouApp-CBrnK0TL.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.