PageSourceSearch

https://www.mwcbarcelona.com/build/assets/MapsPeopleApp-CF6aRo-S.js

js mwcbarcelona.com collected 2026-10-01 08:55:34 UTC 15,513 bytes, 2 lines download raw bytes

1import{j as t}from"./jsx-runtime-De-xxnn8.js";import{d as D}from"./index-eGMM-z1J.js";import{r as o}from"./react-D3AUmzDp.js";import{j as O}from"./app-D0n4DI5A.js";import{f as T}from"./api-DoJkHvRD.js";import"./vendor-DeLyGtsp.js";import"./sendbird-CW8ws8M9.js";import"./dev-CYQ1UptD.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"d00ef78d2efe895700fa19003848d1bfb72b1681"};var r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="4b923431-4def-41ef-9180-25bcf8123cb9",e._sentryDebugIdIdentifier="sentry-dbid-4b923431-4def-41ef-9180-25bcf8123cb9")}catch(a){}})();function W({type:e,selectPOIs:r}){const a=s=>{switch(s.toLowerCase()){case"conference and programs":return"fa-users";case"exhibitor services":return"fa-circle-info";case"facilities":return"fa-buildings";case"food":return"fa-fork-knife";case"networking areas":return"fa-handshake-angle";case"registration and access":case"access":return"fa-sharp fa-signs-post";case"transport":return"fa-train-subway";case"locations":return"fa-map-pin";case"wayfinding":return"fa-sign-hanging";case"networking badge reprinting station":return"fa-id-badge";case"meeting areas":return"fa-street-view";default:return null}};return t.jsx("li",{className:"my-0 border border-gray-300 border-t-0 border-l-0 border-r-0 mx-auto sm:max-w-md leading-8",children:t.jsxs("a",{"data-id":e.id,className:"cursor-pointer py-2 text-center hover:bg-secondary hover:text-white px-6 sm:px-5 flex items-center",onClick:()=>r(e),children:[t.jsx("i",{className:"fa-light ".concat(a(e.description)," mr-2 w-5")}),t.jsx("span",{className:"text-left",children:e.description})]})})}function Y({item:e,selectResult:r}){const a=s=>s.properties.fields.originid?s.properties.building+" - "+s.properties.fields.originid.value:s.properties.building;return t.jsx("li",{className:"my-0 border border-gray-300 border-t-0 border-l-0 border-r-0 mx-auto sm:max-w-md",children:t.jsx("button",{className:"cursor-pointer block py-2 hover:bg-secondary hover:text-white px-6 pr-4 w-full","data-id":e.properties.externalId,onClick:()=>{const[s,h]=e.properties.anchor.coordinates;return r({lng:s,lat:h},e.properties.floor)},children:t.jsxs("div",{className:"flex gap-2 items-center",children:[t.jsx("div",{className:"name grow text-left",children:e.properties.name}),a(e)&&t.jsx("div",{className:"location px-3 py-2 text-xs text-center no-underline bg-gray-100 text-black border border-gray-300 rounded-full",children:a(e)})]})})},e.id)}function $(e){return e=e.replace("Hall ",""),e=e.replace(" – 4YFN & Partner Theatres",""),e.includes("Entrance")||e.includes("Square")||e.includes("Walkway")||e.includes("Village")?t.jsx("span",{className:"text-[0.65rem] font-bold leading-[0.85rem]",children:e}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs font-medium",children:"Hall"}),t.jsx("span",{className:"text-[2rem] font-bold leading-[2rem]",children:e})]})}function G({venue:e,navigateToLocation:r,onClose:a}){const s=()=>{r(String(e.id)),a()};return e.name==="Hall 8.1 - 4YFN"?t.jsx("button",{className:"cursor-pointer hover:bg-secondary rounded-full flex flex-col size-16 bg-dark text-center justify-center items-center","data-id":e.code,onClick:s,children:t.jsx("img",{src:"https://event-assets.gsma.com/Logos/logo-4yfn-2024.png",className:"w-auto h-auto p-4",alt:"4YFN"})}):t.jsx("button",{className:"cursor-pointer hover:bg-secondary hover:text-white rounded-full bg-dark text-white flex flex-col size-16 text-center justify-center items-center","data-id":e.code,onClick:s,children:$(e.name)})}const Z="The venue map is temporarily unavailable. Please try again later.",F=e=>e instanceof Error?e.message:typeof e=="string"?e:"Unknown map error",J=e=>{const r=F(e).toLowerCase(),a=e instanceof Error?(e.stack||"").toLowerCase():"",s="".concat(r," ").concat(a),h=s.includes("app.mapsindoors.com")||s.includes("/mapsindoors/")||s.includes("micommon")||s.includes(".wasm"),d=s.includes("failed to fetch")||s.includes("networkerror")||s.includes("load failed")||s.includes("fetching of the wasm failed")||s.includes("wasm streaming compile failed");return h&&d},H=e=>{const r=F(e).toLowerCase();return r.includes("failed to fetch")||r.includes("network request failed")||r.includes("networkerror")||r.includes("load failed")||r.includes("unable to reach any of the backend servers")},K=e=>{var a;const r=(a=e==null?void 0:e.mapView)==null?void 0:a.MapboxView;return typeof r=="function"?r:null},P=e=>typeof e=="object"&&typeof(e==null?void 0:e.FullscreenControl)=="function",Q=e=>{var a;const r=(a=e==null?void 0:e.services)==null?void 0:a.LocationsService;return typeof(r==null?void 0:r.getLocations)=="function"?r:null},X=D(e=>{O({event:"map_search",customSearchInput:e})},2e3),ee=({selectedPoi:e,setSelectedPoi:r,onClose:a})=>{var d,u;
1const[s,h]=o.useState("");return o.useEffect(()=>{const p=async()=>{var y,g,k,b,M,v;if(typeof((g=(y=e==null?void 0:e.properties)==null?void 0:y.fields)==null?void 0:g.exhibitorsid)>"u")return"";const w=await T("/exhibitor.json",[(M=(b=(k=e==null?void 0:e.properties)==null?void 0:k.fields)==null?void 0:b.exhibitorsid)==null?void 0:M.value]),N=(v=Object.values(w)[0])!=null?v:"";h((N==null?void 0:N.url)||"")};s.length||p()},[e]),((u=(d=e.properties.fields)==null?void 0:d.exhibitorsid)==null?void 0:u.value)>0?t.jsx("div",{className:"absolute inset-0 bg-gray-600/75 overflow-hidden shadow-inner-lg",onClick:()=>r(null),children:t.jsxs("div",{"data-id":e.properties.fields.exhibitorsid.value,className:"map-bubble map-bubble-in absolute w-full max-w-md mx-auto p-6 sm:pb-6 sm:p-8 bg-white text-black rounded-lg shadow-lg",onClick:p=>p.stopPropagation(),children:[t.jsx("button",{className:"absolute py-1 px-2 sm:py-2 sm:px-4 font-bold mt-2 mr-2 top-0 right-0 z-10 text-black text-2xl focus:outline-hidden",title:"close",onClick:a,children:"×"}),e.properties.fields.logourl?t.jsxs("div",{className:"header flex mx-auto gap-4 items-center relative",children:[t.jsx("img",{src:e.properties.fields.logourl.value,width:"80",className:"logo",alt:e.properties.name}),t.jsx("h5",{className:"title text-1xl leading-6 pr-2",children:e.properties.name})]}):t.jsx("h5",{className:"title text-1xl leading-6 pr-2",children:e.properties.name}),t.jsxs("p",{className:"text-sm font-bold my-4",children:[e.properties.building,e.properties.externalId?" - "+e.properties.externalId:""]}),e.properties.description&&t.jsx("div",{className:"content relative",children:t.jsx("div",{className:"scroller overflow-y-auto pb-8",children:t.jsx("p",{className:"text-sm",children:e.properties.description})})}),s?t.jsx("p",{className:"text-center mt-4",children:t.jsxs("a",{className:"group text-secondaryDark font-semibold","data-id":e.properties.fields.exhibitorsid.value,href:s,children:[t.jsx("span",{className:"underline group-hover:no-underline mr-2",children:"View Exhibitor"}),t.jsx("i",{className:"fa fa-solid fa-arrow-right"})]})}):""]})}):""},te=({map:e,mapsIndoors:r,searchTerm:a,setSearchTerm:s,poiTypes:h,searchResults:d,setSearchResults:u,onClose:p,venueHalls:w,navigateToLocation:N})=>{const[y,g]=o.useState(!1),[k,b]=o.useState(""),[M,v]=o.useState(!1),[S,L]=o.useState([]),V=n=>{(H(n)?console.warn:console.error)("MapsIndoors search request failed:",F(n)),u([]),b("Map search is temporarily unavailable."),g(!0)},C=(n,i="0")=>{r.setFloor(i),e.setZoom(21),e.setCenter(n),g(!1),p()},R=n=>{n.id==="MA"?(S.length?v(!0):b("No results found."),g(!0)):window.mapsindoors.services.LocationsService.getLocations({q:n.description,fields:"categories"}).then(i=>(i.length?(u(i),b("")):b("No results found."),g(!0),i)).catch(i=>{V(i)})};o.useEffect(()=>{const n=async()=>{const i=await T("/locations.json?filter_meetingEligible=true&array=1");i!=null&&i.length&&L(i)};S.length||n()},[S]);const j=()=>{const n=document.querySelector("input#map-search"),i=n.value;i?(s(i),window.mapsindoors.services.LocationsService.getLocations({q:i}).then(l=>(l.length?(u(l),X(n.value)):(u([]),b("No results found.")),g(!0),l)).catch(l=>{V(l)})):(g(!1),s(""),u([]))},B=n=>{n.stopPropagation()};return t.jsx("div",{className:"absolute inset-0 bg-gray-600/75 overflow-hidden shadow-inner-lg",onClick:p,children:t.jsxs("div",{className:"absolute w-full max-w-md mx-auto left-0 top-0 bottom-0 bg-white text-black slide-out-menu",children:[t.jsx("button",{className:"absolute py-1 px-2 sm:py-2 sm:px-4 font-bold mt-2 mr-2 top-0 right-0 z-10 text-black text-3xl focus:outline-hidden",title:"close",onClick:p,children:"×"}),t.jsx("div",{className:"drawer absolute inset-0 bg-white text-black pt-6",onClick:B,children:t.jsxs("div",{className:"sm:block sm:p-0",children:[t.jsx("h1",{className:"text-lg font-bold mb-4 px-4",children:"Search"}),t.jsxs("div",{className:"flex mx-auto gap-2 items-center px-4 relative",children:[t.jsx("i",{className:"absolute left-0 ml-8 text-gray-500 fa fa-search"}),t.jsx("input",{autoFocus:!0,className:"border border-gray-400 pl-10 pr-4 py-2 w-full focus:outline-hidden focu
1s:border-secondary",id:"map-search",onInput:()=>j(),placeholder:"Search",required:!0,type:"search",value:a})]}),y&&t.jsx("div",{className:"mt-4 py-2 bg-cream",children:t.jsx("a",{onClick:()=>{g(!1),v(!1),u([]),s("")},className:"pl-4 cursor-pointer block",children:"← Back"})}),t.jsx("div",{className:"content map-search overflow-y-auto ".concat(y?"":"mt-4"),children:t.jsx("div",{className:"text-left",children:t.jsx("ul",{id:"search-results",className:d.length?"results-list":"list",children:M?S.map(n=>t.jsx("li",{className:"my-0 border border-gray-300 border-t-0 border-l-0 border-r-0 mx-auto sm:max-w-md",children:t.jsx("button",{className:"cursor-pointer block py-2 hover:bg-secondary hover:text-white px-6 pr-4 w-full","data-id":n.id,onClick:()=>{N(String(n.id)),p()},children:t.jsx("div",{className:"flex gap-2 items-center",children:t.jsx("div",{className:"name grow text-left",children:n.description})})})},n.id)):d.length?d.map(n=>t.jsx(Y,{item:n,selectResult:C},n.id)):k.length&&y?t.jsx("li",{className:"my-4 text-center",children:k}):h.length?t.jsxs(t.Fragment,{children:[t.jsx("h2",{className:"text-lg font-bold px-4 mt-2",children:"Points of Interest"}),h.map(n=>t.jsx(W,{type:n,selectPOIs:R},n.id)),w.length&&t.jsxs("div",{className:"px-4 mt-6",children:[t.jsx("h2",{className:"text-lg font-bold mb-4",children:"Venue Halls"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(n=>t.jsx(G,{venue:n,navigateToLocation:N,onClose:p},n.id))})]})]}):t.jsx("p",{className:"px-4",children:"No results found."})})})})]})})]})})};function se(e){return Object.values(e).sort((a,s)=>{const h=/^Hall\s*(\d+(?:\.\d+)?)/i,d=a.name.match(h),u=s.name.match(h);if(d&&u){const p=parseFloat(d[1]),w=parseFloat(u[1]);return p!==w?p-w:a.name.localeCompare(s.name)}return d?-1:u?1:a.name.localeCompare(s.name)})}const pe=({mapboxApiKey:e=null})=>{const r={lat:41.355,lng:2.132},a=o.useRef(null),[s,h]=o.useState(null),[d,u]=o.useState(null),[p,w]=o.useState(!1),[N,y]=o.useState([]),[g,k]=o.useState([]),[b,M]=o.useState(null),[v,S]=o.useState([]),[L,V]=o.useState([]),[C,R]=o.useState(""),j=o.useCallback((l,c)=>{console.warn("MapsIndoors is temporarily unavailable:",F(c)),R(m=>m||l)},[]);o.useEffect(()=>{const l=c=>{J(c.reason)&&(c.preventDefault(),j("sdk-availability",c.reason))};return window.addEventListener("unhandledrejection",l,!0),()=>{window.removeEventListener("unhandledrejection",l,!0)}},[j]),o.useEffect(()=>{const l=async()=>{const m=await T("/location-type.json?keys=description,id&array=1"),x=Q(window.mapsindoors);if(!x){j("services-not-ready",new Error("MapsIndoors LocationsService is not ready"));return}try{const f=await Promise.all(m.map(I=>x.getLocations({q:I.description,fields:"categories"}).then(A=>A.length?I:null)));S([...f.filter(Boolean),{id:"MA",description:"Meeting Areas"}])}catch(f){j("service",f)}},c=async()=>{T("/buildings.json?keys=id,name,code").then(m=>{V(se(m))})};!v.length&&!C&&l(),L.length||c()},[C,j,v.length,L.length]);const B=(l,c=s,m=d)=>{!l||!c||!m||window.mapsindoors.services.LocationsService.getLocationsByExternalId(l).then(x=>{if(x.length===0)return null;const f=x[0];return m.setFloor(f.properties.floor),setTimeout(()=>{c.setZoom(19);const[I,A]=f.properties.anchor.coordinates;c.setCenter({lat:A,lng:I})},100),f}).catch(x=>((H(x)?console.warn:console.error)("Failed to navigate to map location:",F(x)),null))};o.useEffect(()=>{if(a.current&&!s){const l={accessToken:e||"",element:document.getElementById("map"),center:r,zoom:15.7,maxZoom:21,streetViewControl:!1,mapsIndoorsTransitionLevel:1,LabelOptions:{clickable:!0,style:{align:"center",color:"#fff",fontFamily:"Arial, Helvetica, sans-serif",fontSize:"12px",fontWeight:500,strokeStyle:"#444",strokeWeight:1,shadowBlur:1,shadowColor:"#000"}},bearing:62.7},c=K(window.mapsindoors);if(!c||!P(window.mapboxgl)){const E=window.setTimeout(()=>{j(c?"mapbox-not-ready":"map-view-not-ready",new Error(c?"Mapbox GL is not ready":"MapsIndoors MapboxView is not ready"))},0);return()=>window.clearTimeout(E)}const m=new c(l),x=new window.mapsindoors.MapsIndoors({mapView:m}),f=m.getMap(),I=document.getElementById("search-btn");f.addControl({onAdd:function(){return I},onRemove:function(){}},"top-left"),f.addControl(new window.mapboxgl.FullscreenControl,"top-right");for(let E of document.getElementsByClassName("mapboxgl-ctrl-fullscreen"))E.style.height="40px",E.style.width="40px";const A=document.getElementById("floor-selector");new window.mapsindoors.FloorSelector(A,x),f.addControl({onAdd:()=>A,onRemove:function(){}},"top-right");const U=document.getElementById("re-center");f.addControl({onAdd:()=>U,onRemove:function(){}},"top-right"),x.addListener("click",E=>{if(E.properties.externalId){const[_,z]=E.properties.anchor.coordinates;m.setCenter({lat:z,lng:_}),M(E)}});const q=new URLSearchParams(window.location.search).get("locationId");f.on("load",()=>{h(m),u(x),q&&B(q,m,x)})}},[a,s,j]);const n=()=>{s.setCenter(r)};function i(){y(""),k([]),w(!0)}return t.jsxs(t.Fragment,{children:[t.jsx("div",{id:"map",className:C?"hidden":"",style:{width:"100%",height:"1000px"},ref:a}),C?t.jsxs("div",{className:"min-h-80 flex flex-col items-center justify-center bg-cream px-6 text-center","data-map-u
1navailable-reason":C,role:"status",children:[t.jsx("h2",{className:"mb-2 text-xl font-bold",children:"Venue map unavailable"}),t.jsx("p",{children:Z})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{id:"floor-selector",style:{width:"2.5rem",clear:"both",float:"right"}}),t.jsx("button",{id:"re-center",title:"Center Map",className:"bg-white pointer-events-auto! float-right clear-both",style:{width:"40px",height:"40px",borderWidth:"0px",borderRadius:"2px",boxShadow:"rgba(0, 0, 0, 0.3) 0px 1px 2px 0px",marginRight:"10px"},onClick:()=>n(),children:t.jsx("i",{className:"fa fa-circle-dot fa-2x"})}),t.jsx("button",{id:"search-btn",title:"Search",className:"bg-white pointer-events-auto! float-left clear-both",style:{width:"40px",height:"40px",borderWidth:"0px",borderRadius:"2px",boxShadow:"rgba(0, 0, 0, 0.3) 0px 1px 2px 0px",margin:"10px",display:p?"none":""},onClick:()=>i(),children:t.jsx("i",{className:"fa fa-magnifying-glass fa-2x"})}),p&&t.jsx(te,{onClose:()=>w(!1),map:s,mapsIndoors:d,searchTerm:N,setSearchTerm:y,poiTypes:v,searchResults:g,setSearchResults:k,venueHalls:L,navigateToLocation:B}),b&&t.jsx(ee,{onClose:()=>M(!1),selectedPoi:b,setSelectedPoi:M})]})]})};export{pe as default};
2//# sourceMappingURL=MapsPeopleApp-CF6aRo-S.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.