PageSourceSearch

https://discovery-next.svc.sympla.com.br/_next/static/chunks/9998.8f50c063b63fd0dc.js

js sympla.com.br collected 2026-10-01 08:19:37 UTC 26,076 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9998],{6848:(e,a,t)=>{t.d(a,{A:()=>s});function s(e){var a;let{category:t,label:s,action:r="click"}=e;(null==(a=window)?void 0:a.dataLayer)&&window.dataLayer.push({stckEventCategory:t,stckEventLabel:s,stckEventAction:r,event:"stck"})}},10513:(e,a,t)=>{t.d(a,{e:()=>n});var s=t(74445),r=t(19710),l=t(34622);function n(){let[e,a]=(0,s.useState)([]),t="lastSearchesStorage",n=(0,s.useMemo)(()=>(0,r.L)({key:t,limit:5}),[]);async function c(){if(n.data)try{let e=localStorage.getItem(t);if(!e)return;let a=JSON.parse(e),s=(null==a?void 0:a.items)||[];if(s.length>5){let e=s[s.length-1];n.data.removeItem(e.id)}}catch(e){(0,l.browserLogger)().error({message:"Erro ao limpar localStorage de Buscas Recentes",data:String(e)})}}async function i(){try{if(n.data){let e=n.data.getAll(),t=await Promise.resolve(e);if(Array.isArray(t)&&t.length>0){let e=t.map(e=>e.label||e.id).slice(0,5);a(e)}else a([])}}catch(e){(0,l.browserLogger)().error({message:"Erro ao atualizar pesquisas recentes no localStorage",data:String(e)})}}async function o(e){try{n.data&&(n.data.removeItem(e),await c(),await i())}catch(e){(0,l.browserLogger)().error({message:"Erro ao remover pesquisa recente do localStorage",data:String(e)})}}return(0,s.useEffect)(()=>{i()},[]),{lastSearches:e,updateLastSearches:function(e){if(e&&n.data)try{n.data.addItem({id:e,label:e}),Promise.resolve().then(()=>{c().then(i)})}catch(e){(0,l.browserLogger)().error({message:"Erro ao adicionar pesquisa recente no localStorage",data:String(e)})}},removeLastSearch:o}}},10935:(e,a,t)=>{t.d(a,{A:()=>n});var s,r=t(74445);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var s in t)({}).hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(null,arguments)}let n=e=>r.createElement("svg",l({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=r.createElement("path",{d:"m14 14-2.9-2.9M7.333 4a3.333 3.333 0 0 1 3.334 3.333m2 0A5.333 5.333 0 1 1 2 7.333a5.333 5.333 0 0 1 10.667 0Z",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})))},23547:(e,a,t)=>{t.r(a),t.d(a,{default:()=>eh});var s,r=t(59673),l=t(27523),n=t(10935),c=t(44410),i=t(36512),o=t(74445),u=t(19519),d=t(95649),h=t(72094),m=t(18891);let v=[{label:"Festas & Shows",icon:"https://images.sympla.com.br/67e555878c37e.svg",link:"/eventos/show-musica-festa"},{label:"Stand-up Comedy",icon:"https://images.sympla.com.br/67e555e377ae6.svg",link:"/eventos/stand-up-comedy"},{label:"Esportes",icon:"https://images.sympla.com.br/67e55611529e2.svg",link:"/eventos/esportivo"}];var g=t(79047);async function _(){try{let{data:e}=await g.JI.get("/search/collection");return e}catch(e){return console.error("Erro ao buscar cole\xe7\xf5es pelo browserApi:",e),{matrices:[]}}}var f=t(88872);async function p(){try{var e,a,t;let s=await _();return(null==s||null==(t=s.matrices)||null==(a=t.filter(e=>(null==e?void 0:e.highlighted)&&""!==e.highlighted.trim()))||null==(e=a.map(e=>{var a,t;return{label:null==e?void 0:e.label,icon:(null==e||null==(a=e.images)?void 0:a.icon)||(null==e||null==(t=e.images)?void 0:t.banner)||m.__,link:(0,f.y)({param:null==e?void 0:e.slug,routeType:m.fk.COLLECTION,item:(0,i._)((0,c._)({},e),{urn:""}),userLocation:null}),highlighted:null==e?void 0:e.highlighted}}))?void 0:e.sort((e,a)=>Number(a.highlighted)-Number(e.highlighted)))||[]}catch(e){return[]}}var j=t(26848),x=t(68551),b=t(51450),k=t(3420);function y(e){let{isMobileVariant:a=!1}=e;return(0,r.jsx)("div",{className:"".concat("kjouy54"," ").concat("kjouy53"," ").concat(a?"kjouy57":"")})}function N(e){let{collection:a}=e;return(0,r.jsxs)("a",{href:(0,x.H_)()+a.link,className:"".concat(m.g9.COLLECTION_CARD," ").concat("kjouy55"),"data-bannerid":a.link,"data-name":a.label,onClick:()=>{(0,k.K)(b.sK.search_recommended_clicked,{search_recommendation_collections_clicked:a.label,transport:b.o9.sendBeacon})},children:[(0,r.jsx)(h.default,{src:a.icon,alt:a.label,width:24,height:24}),a.label]},a.link)}t(54817),t(16046);let C=function(e){let{isMobileVariant:a=!1}=e,[t,s]=(0,o.useState)([]),[l,n]=(0,o.useState)(!0);(0,o.useEffect)(()=>{(async()=>{try{let e=await p();s(e.length?e:v)}catch(e){s(v)}finally{n(!1)}})()},[]);let c=(0,o.useMemo)(()=>Array.from({length:5}).map((e,t)=>(0,r.jsx)(y,{isMobileVariant:a}
1,"skeleton-".concat(t))),[a]),i=(0,o.useMemo)(()=>t.map(e=>a?(0,r.jsx)(j.DQ,{isLoading:!1,images:{icon:e.icon},label:e.label,href:(0,x.H_)()+e.link,onClick:()=>{(0,k.K)(b.sK.search_recommended_clicked,{search_recommendation_collections_clicked:e.label,transport:b.o9.sendBeacon})}},e.link):(0,r.jsx)(N,{collection:e},e.link)),[a,t]),u=a?"Cole\xe7\xf5es em alta":"Explore as cole\xe7\xf5es";return(0,r.jsxs)("div",{className:"kjouy50",children:[(0,r.jsx)("h3",{className:"kjouy56",children:u}),(0,r.jsx)("div",{className:"kjouy51",children:l?c:i})]})};var w=t(17063),E=t(82474),I=t.n(E);function L(){return(L=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var s in t)({}).hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(null,arguments)}let S=e=>o.createElement("svg",L({viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=o.createElement("path",{d:"M15.333 5.333a.667.667 0 0 1-1.333 0V2.276L9.893 6.384c-.125.124-.246.246-.357.34a1.348 1.348 0 0 1-.457.268 1.334 1.334 0 0 1-.824 0 1.348 1.348 0 0 1-.458-.268c-.11-.094-.232-.216-.356-.34L5.616 4.56a5.56 5.56 0 0 0-.276-.267l-.007-.005-.006.005a5.56 5.56 0 0 0-.276.267L1.805 7.805a.667.667 0 1 1-.943-.943l3.245-3.246c.125-.124.246-.246.357-.34.116-.099.264-.205.457-.268.235-.076.485-.085.723-.028l.101.028.137.054c.129.062.234.14.321.214.11.094.232.216.356.34L8.384 5.44l.168.166c.044.043.078.075.108.1l.007.005.006-.004c.06-.05.136-.127.276-.267l4.108-4.108H10A.667.667 0 0 1 10 0h4.667c.368 0 .666.298.666.667v4.666Z"})));var q=t(40430),A=t(84639),M=t(84359),D=t(83172);async function T(e){var a,t;let{data:s}=await g.JI.get("/search/popular-searches",{params:{limit:e.hitsPerPage||5}});return null!=(t=null==(a=s.results)?void 0:a[0])?t:{}}function R(e){let{hit:a,hasMossColor:t,onClose:s,onTrackAnalytics:l,onTrackAlgoliaEvent:n}=e,c=null==a?void 0:a.query,i=null===q.A||void 0===q.A?void 0:q.A.selectedLocation,u="".concat("_12a765e6"," ").concat(t?"_12a765e7":""),d="".concat("_12a765e4"," ").concat(t?"_12a765e5":""),h=(0,o.useCallback)(()=>{l&&l({query:c}),n&&a.__position&&n(a.__position),s&&s()},[c,s,l,n,a.__position]);return(0,r.jsxs)(I(),{href:(0,f.y)({param:"?s=".concat(c),routeType:"search-bar-default-filter",userLocation:i}),prefetch:!1,className:"_12a765e0",onClick:h,children:[(0,r.jsx)(S,{width:16,height:16,className:d,"aria-hidden":"true"}),(0,r.jsx)("p",{className:u,children:"".concat(c.charAt(0).toUpperCase()).concat(c.substring(1))})]})}function K(e){let{hasMossColor:a,onClose:t}=e,{items:s,totalHits:l,isLoading:n,handleTrackAnalyticsClick:u,handleSendAlgoliaEvent:d}=function(){let{hitsPerPage:e=5,onClose:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.useMemo)(()=>({hitsPerPage:e}),[e]),{data:s,isLoading:r,isFetching:l,isError:n,error:u}=(0,A.I)({queryKey:["popular-searches",t],queryFn:()=>T(t)}),d=(0,o.useMemo)(()=>{let e=(null==s?void 0:s.queryID)||"",a=null==s?void 0:s.hits;return a&&Array.isArray(a)?a.map((a,t)=>{var s,r;return(0,i._)((0,c._)({},a),{__position:null!=(s=a.__position)?s:t+1,__queryID:null!=(r=a.__queryID)?r:e})}):[]},[s]),h=(0,o.useMemo)(()=>{var e;return null!=(e=null==s?void 0:s.nbHits)?e:d.length},[s,d.length]),m=(0,o.useRef)(null),v=(0,o.useCallback)(e=>{let{query:a}=e;(0,k.K)(b.sK.search_recommended_clicked,{search_recommendation_popular_searchs_clicked:a})},[]),g=(0,o.useCallback)((e,a)=>{let t=e.__queryID,s=e.objectID;t&&s&&(0,M.Ay)("clickedObjectIDsAfterSearch",{index:D.kM,eventName:"Hit Clicked",queryID:t,objectIDs:[s],positions:[a]})},[]),_=(0,o.useCallback)(()=>{if(!d.length)return;let e=d.map(e=>e.objectID),a=e.join(",");m.current!==a&&(m.current=a,e.length&&(0,M.Ay)("viewedObjectIDs",{index:D.kM,eventName:"Hits Viewed",objectIDs:e}))},[d]),f=(0,o.useCallback)(e=>{v({query:e.query}),e.__position&&g(e,e.__position),null==a||a()},[g,v,a]);return(0,o.useEffect)(()=>{d.length>0&&h>0&&_()},[d,h,_]),{items:d,totalHits:h,isLoading:r,isFetching:l,isError:n,error:u,handleTrackAnalyticsClick:v,handleSendAlgoliaEvent:g,handleTrackImpression:_,handleClickSearch:f}}({hitsPerPage:5,onClose:t});return n||!l?null:(0,r.jsxs)("div",{className:"_12a765e1","data-testid":"search-algolia-dropdown-suggestions",children:[(0,r.jsx)("h3",{className:"_12a765e2",children:"Pesquisas populares"}),(0,r.jsx)("ul",{className:"_12a765e3",children:s.map(e=>(0,r.jsx)("li",{style:{listStyle:"none"},children:(0,r.jsx)(R,{hit:e,hasMossColor:a,onClose:t,onTrackAnalytics:u,onTrackAlgoliaEvent:a=>d(e,a)})},e.objectID))})]})}function O(e){let{hasMossColor:a,onClose:t}=e;return(0,r.jsx)(K,{hasMossColor:a,onClose:t})}t(38369);var P=t(10513);t(59740);let B=function(e){let{hasMossColor:a,onClose:t,setInputValue:s}=e,{updateLastSearches:n,lastSearches:c,removeLastSearch:i}=(0,P.e)(),u=q.A.selectedLocation,d="".concat("shrxq90"," ").concat(a?"shrxq91":""),h="".concat("shrxq92"," ").concat(a?"shrxq93":""),m=(0,o.useCallback)(e=>{n(e),(0,k.K)(b.sK.search_recommended_clicked,{search_recommendation_recents_searchs_clicked:e,transport:b.o9.sendBeacon}),s&&s(e),t&&t()},[s,t]),v=null==c?void 0:c.map(e=>(0,r.jsxs)("li",{className:"shrxq96",children:[(0,r.jsx)(I(),{onClick:()=>m(e),className:d,href:((e,a)=>{let t=(0,x.P6)({s:e});return(0,f.y)({param:t,routeType:"search-bar-default-filter",userLocation:a})})(e,u),prefetch:!1,children:e}),(0,r.jsx)(l.b,{width:16,height:16,className:h,onClick:()=>{i(e)}})]},e));return c&&c.length>0&&(0,r.jsxs)("div",{className:"shrxq94",children:[(0,r.jsx)("h3",{className:"shrxq97",children:"Busca recente"}),(0,r.jsx)("ul",{className:"shrxq95",children:v})]})};var F=t(20001);function V(e,a){if(!(null==e?void 0:e.length))return;let t=e.find(e=>e.startsWith("".concat(a,":")));if(t)return t.slice(a.length+1).trim()||void 0}async function H(e){let a=function(e){let a=new URLSearchParams;return a.append("q",e.q),a.append("limit",String(e.limit)),a.append("page",String(e.page)),a.append("user_token",e.user_token),a.append("platform",e.platform),a.append("subplatform",e.subplatform),a.append("page_name",e.page_name),e.feature.forEach(e
1=>a.append("feature",e)),a.toString()}(e),{data:t}=await g.JI.get("/search/autocomplete?".concat(a));return t}t(95811);var U="_1jetuv7f",$="_1jetuv7b";function J(){return(0,r.jsxs)("div",{className:"_1jetuv7c",children:[(0,r.jsx)("div",{className:"".concat("_1jetuv7d"," ").concat($)}),(0,r.jsxs)("div",{className:"_1jetuv7e",children:[(0,r.jsx)("div",{className:"".concat(U," ").concat($)}),(0,r.jsx)("div",{className:"".concat(U," ").concat($)}),(0,r.jsx)("div",{className:"".concat("_1jetuv7g"," ").concat($)})]})]})}function W(e){let{userTokenAlgolia:a,hitsLimit:t,query:s,isNavbarCollapsed:n,hasMossColor:u,isMobile:d,onClose:h,onStateChange:v,onErrorStateChange:g,labelTagsAnalytics:_=[],pageTag:p}=e,{hasHits:j,items:x,isLoading:y,handleSeeAllClick:N,handleTrackAnalyticsClick:C,handleSendAlgoliaEvent:E,seeAllHref:L,skeletonItems:S}=function(e){let{userTokenAlgolia:a,hitsLimit:t,query:s,onClose:r,onStateChange:l,onErrorStateChange:n,labelTagsAnalytics:u=[],pageTag:d}=e,{items:h,totalHits:v,isError:g,isLoading:_,retrySearchResults:p,handleTrackAnalyticsClick:j,handleSendAlgoliaEvent:x}=function(e){let{query:a,hitsLimit:t,userTokenAlgolia:s,analyticsTags:r}=e,l=(0,o.useRef)(""),n=(0,o.useMemo)(()=>a.trim(),[a]),u=(0,o.useMemo)(()=>{var e,a,l,c;return{q:n,limit:t,page:1,user_token:null!=s?s:"",platform:null!=(e=V(r,"platform"))?e:"",subplatform:null!=(a=V(r,"subplatform"))?a:"",page_name:null!=(l=V(r,"page"))?l:"",feature:null!=(c=function(e,a){if(!(null==e?void 0:e.length))return;let t=e.filter(e=>e.startsWith("".concat(a,":"))).map(e=>e.slice(a.length+1).trim()).filter(Boolean);return t.length?t:void 0}(r,"feature"))?c:[]}},[r,t,n,s]),{data:d,isLoading:h,isFetching:m,isError:v,refetch:g}=(0,A.I)({queryKey:["search-events-dropdown",u],queryFn:()=>H(u),enabled:!!n}),_=(0,o.useMemo)(()=>{if(!n)return[];let e=(null==d?void 0:d.queryID)||"",a=null==d?void 0:d.hits;return a&&Array.isArray(a)?a.map((a,t)=>{var s,r;return(0,i._)((0,c._)({},a),{__position:null!=(s=a.__position)?s:t+1,__queryID:null!=(r=a.__queryID)?r:e})}):[]},[d,n]),f=(0,o.useMemo)(()=>{var e;return n?null!=(e=null==d?void 0:d.nbHits)?e:_.length:0},[d,_.length,n]);(0,o.useEffect)(()=>{var e,a;let t=_.map(e=>e.objectID).filter(e=>!!e);if(!t.length){l.current="";return}let s=null!=(a=null==(e=_[0])?void 0:e.__queryID)?a:"",r="".concat(n,":").concat(s,":").concat(t.join(","));l.current!==r&&(l.current=r,(0,w.Rl)({index:D.oq,objectIDs:t}))},[_,n]);let p=(0,o.useCallback)(e=>{let{eventName:a,eventId:t,eventCategory:s,position:r}=e;(0,k.K)(b.sK.search_recommended_event_clicked,{event_id:t,event_name:a,event_rank:r,search_recommendation_source_term:n,event_category:s})},[n]);return{items:_,totalHits:f,isError:v,isLoading:!!n&&(h||m),retrySearchResults:g,handleTrackAnalyticsClick:p,handleSendAlgoliaEvent:(0,o.useCallback)((e,a)=>{(0,w.yV)({index:D.oq,queryID:e.__queryID,objectID:e.objectID,position:a})},[])}}({query:s,hitsLimit:t,userTokenAlgolia:a,analyticsTags:(0,o.useMemo)(()=>(0,w.q7)({pageTag:d,featureTags:[D.tL.search,D.tL.searchBar],otherTags:u}),[u,d])}),y=v>0;(0,o.useEffect)(()=>
1{l(y,_)},[y,_,l]),(0,o.useEffect)(()=>{null==n||n(g,p)},[g,n,p]);let N=(0,o.useCallback)(()=>{(0,k.K)(b.sK.rail_view_more_clicked,{item_rail_title:b.MN.recommendedEvents,transport:b.o9.sendBeacon}),r()},[r]);return{handleSeeAllClick:N,handleSendAlgoliaEvent:x,handleTrackAnalyticsClick:j,hasHits:y,isError:g,isLoading:_,items:h,retrySearchResults:p,seeAllHref:(0,o.useMemo)(()=>(0,f.y)({param:"?s=".concat(encodeURIComponent(s)),routeType:"search-bar-default-filter",userLocation:m.nb}),[s]),skeletonItems:(0,o.useMemo)(()=>Array.from({length:t||6}),[t]),totalHits:v}}({query:s,hitsLimit:t,userTokenAlgolia:a,onClose:h,onStateChange:v,onErrorStateChange:g,labelTagsAnalytics:_,pageTag:p});return y||j?(0,r.jsxs)("div",{"data-testid":"search-algolia-dropdown-events",className:"_1jetuv79",children:[(0,r.jsxs)("div",{className:"_1jetuv71",children:[(0,r.jsx)("h3",{className:"_1jetuv72",children:"Eventos"}),(0,r.jsxs)("div",{className:"_1jetuv76",children:[(0,r.jsx)(I(),{href:L,prefetch:!1,className:["_1jetuv74",u?"_1jetuv75":void 0].filter(Boolean).join(" "),onClick:N,children:"Ver tudo"}),n&&!d&&(0,r.jsx)(l.b,{width:20,height:20,onClick:()=>h(),className:"".concat("_1jetuv77"," ").concat(u?"_1jetuv78":"")})]})]}),(0,r.jsxs)("div",{className:"_1jetuv73",children:[y&&(0,r.jsx)("div",{className:"_1jetuv7h",children:S.map((e,a)=>(0,r.jsx)("div",{className:"_1jetuv7i",children:(0,r.jsx)(J,{})},a))}),(0,r.jsx)("div",{className:y?"_1jetuv7j":"",children:(0,r.jsx)("ul",{className:"_1jetuv70",children:x.map((e,a)=>(0,r.jsx)("li",{children:(0,r.jsx)(F.V,{hit:e,handleTrackAnalyticsClick:C,sendAlgoliaEvent:()=>{var t,s;return E(e,null!=(s=null!=(t=e.order)?t:e.__position)?s:a+1)}})},"".concat(e.objectID,"-").concat(a)))})})]})]}):null}t(38324);var z="_1ejghfr8",Q="_1ejghfr5",Z="_1ejghfr1";async function X(e){let{data:a}=await g.JI.get("/home/highlights",{params:e});return a}function G(){return(0,r.jsxs)("div",{className:"_1ejghfr2",children:[(0,r.jsx)("div",{className:"".concat("_1ejghfr3"," ").concat(Z)}),(0,r.jsxs)("div",{className:"_1ejghfr4",children:[(0,r.jsx)("div",{className:"".concat(Q," ").concat(Z)}),(0,r.jsx)("div",{className:"".concat(Q," ").concat(Z)}),(0,r.jsx)("div",{className:"".concat("_1ejghfr6"," ").concat(Z)})]})]})}function Y(e){let{hitsLimit:a,items:t,isLoading:s,onHitClick:n,onClose:c,isNavbarCollapsed:i,hasMossColor:o}=e,u=(0,x.Fr)(),d=t.length>0;if(!s&&!d)return null;let h=Array.from({length:a});return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"_1ejghfr9",children:[(0,r.jsx)("h3",{className:"_1ejghfra",children:"Eventos em destaque"}),(0,r.jsxs)("div",{className:"_1ejghfrd",children:[(0,r.jsx)(I(),{href:(0,f.y)({param:"?s=",routeType:"search-bar-default-filter",userLocation:m.nb}),prefetch:!1,className:"".concat("_1ejghfrb"," ").concat(o&&"_1ejghfrc"," "),onClick:()=>{(0,k.K)(b.sK.rail_view_more_clicked,{item_rail_title:b.MN.trendingEvents,transport:b.o9.sendBeacon}),c()},children:"Ver tudo"}),i&&!u&&(0,r.jsx)(l.b,{width:20,height:20,onClick:()=>c(),className:"".concat("_1ejghfre"," ").concat(o?"_1ejghfrf":"")})]})]}),(0,r.jsx)("div",{className:"_1ejghfr7",children:s?h.map((e,a)=>(0,r.jsx)("div",{className:z,children:(0,r.jsx)(G,{})},a)):t.map((e,a)=>(0,r.jsx)("div",{className:z,children:(0,r.jsx)(F.V,{hit:e,layoutCard:u?"default":"lateral-on-mobile",sendAlgoliaEvent:()=>n(e,a)})},e.objectID))})]})}function ee(e){let{hitsLimit:a,onClose:t,isNavbarCollapsed:s,hasMossColor:l,pageTag:n}=e,{items:u,isLoading:d,handleHitClickEvent:h}=function(e,a){var t,s;let r=(0,o.useRef)(""),l=(0,o.useMemo)(()=>({limit:e,platform:"web",subplatform:(0,w.qj)(),page:a,feature:"search_bar",subfeature:"trending_events"}),[e,a]),{data:n,isLoading:u}=(0,A.I)({queryKey:["trending-events",l],queryFn:()=>X(l)}),d=null==n||null==(s=n.results)||null==(t=s[0])?void 0:t.queryID,h=(0,o.useMemo)(()=>{var e,a;let t=null==n||null==(a=n.results)||null==(e=a[0])?void 0:e.hits;return t&&Array.isArray(t)?t.map((e,a)=>{var t,s;return(0,i._)((0,c._)({},e),{__position:null!=(t=e.__position)?t:a+1,__queryID:null!=(s=e.__queryID)?s:d})}):[]},[n,d]);return(0,o.useEffect)(()=>{let e=h.map(e=>e.objectID).filter(e=>!!e);if(!e.length){r.current="";return}let a="".concat(null!=d?d:"",":").concat(e.join(","));r.current!==a&&(r.current=a,(0,w.Rl)({index:D.lz,objectIDs:e}))},[h,d]),{items:h,isLoading:u,handleHitClickEvent:(0,o.useCallback)((e,a)=>{var t;let s=null!=(t=e.__position)?t:a+1;(0,w.yV)({index:D.lz,queryID:e.__queryID,objectID:e.objectID,position:s})},[])}}(a,n);return(0,r.jsx)("div",{"data-testid":"search-algolia-dropdown-trending",children:(0,r.jsx)(Y,{hitsLimit:a,items:u,isLoading:d,onHitClick:h,onClose:t,isNavbarCollapsed:s,hasMossColor:l})})}var ea=t(55728);t(87080);var et="_90kt4rj",es="_90kt4ri",er="_90kt4rd",el=t(53648),en=t(19909);let ec=function(e){var a,t;let s,{onClickInside:n,onClose:h,handleSearch:m,inputValue:v,handleTextChange:g,inputRef:_,formRef:f,
1isNavbarCollapsed:p,handleClickOutside:j,setInputValue:y,hasMossColor:N}=e,[E,I]=(0,o.useState)(v),[L,S]=(0,o.useState)({hasHits:!0,isLoading:!0,isError:!1,retrySearchResults:async()=>void 0}),A=((0,u.useSearchParams)()||new URLSearchParams).get("category")||null,M=(0,u.usePathname)()||"/",T=(0,x.Fr)(),R=null!=(t=null==(a=q.A.selectedLocation)?void 0:a.city)?t:void 0,K=((null==E?void 0:E.trim().length)||0)>=D.Ar;(0,o.useEffect)(()=>{let e=setTimeout(()=>{I(v)},500);return()=>{clearTimeout(e)}},[v]),(0,o.useEffect)(()=>{K&&(0,k.K)(b.sK.search_submitted,{search_term:E,search_location_set:R,search_filter_applied:void 0})},[E,K,R]);let P=K?E:"",F=(0,o.useCallback)((e,a)=>{S(t=>(0,i._)((0,c._)({},t),{hasHits:e,isLoading:a}))},[]),V=(0,o.useCallback)((e,a)=>{S(t=>(0,i._)((0,c._)({},t),{isError:e,retrySearchResults:a}))},[]),H=K&&!L.isError&&!L.isLoading&&!L.hasHits,U=K&&L.isError,$=!K||H||U,J=T?5:6,z=A&&Object.values(D.I5).includes(A)?A:void 0,Q=(0,w.EW)(M,z),Z=(0,r.jsxs)("div",{className:"_90kt4rc","data-testid":"search-fixed-suggestions",children:[(0,r.jsx)(C,{}),(0,r.jsx)(O,{hasMossColor:N,onClose:h}),(0,r.jsx)(B,{hasMossColor:N,onClose:h,setInputValue:y})]}),X=K?(0,r.jsx)("div",{className:"algolia-wrapper","data-testid":"search-algolia-results",children:(0,r.jsx)(W,{query:P,isMobile:T,userTokenAlgolia:w.SZ,hitsLimit:J,isNavbarCollapsed:p,hasMossColor:N,onClose:h,onStateChange:F,onErrorStateChange:V,pageTag:Q})}):null,G=(0,r.jsx)("div",{className:"_90kt4rk","data-testid":"trending-fallback",children:(0,r.jsx)(ee,{hitsLimit:6,isNavbarCollapsed:p,hasMossColor:N,onClose:h,pageTag:Q})});s=T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"".concat(er," algolia-event-list-wrapper"),children:X}),Z,G]}):(0,r.jsxs)(r.Fragment,{children:[Z,(0,r.jsxs)("div",{className:"".concat(er," algolia-event-list-wrapper"),children:[X,$&&G]})]});let Y="".concat("_90kt4r6"," ").concat(N?"_90kt4r7":"");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"_90kt4r1","data-testid":"search-algolia-dropdown-items",onClick:n,children:(0,r.jsxs)("div",{className:"_90kt4r3",children:[(!p||T)&&(0,r.jsxs)("div",{className:"_90kt4r4",children:[(0,r.jsxs)("div",{className:"_90kt4r5",children:[(0,r.jsx)("div",{className:"".concat("_90kt4ra"," ").concat(N&&"_90kt4rb"),children:(0,r.jsx)(el.$nd,{icon:(0,r.jsx)(l.A,{width:16,height:16}),onClick:h,children:"Voltar"})}),(0,r.jsxs)("form",{ref:f,onSubmit:m,className:Y,role:"presentation","data-testid":"search-algolia-form",children:[(0,r.jsx)(en.cWE,{width:24,height:24}),(0,r.jsx)("input",{ref:_,className:"_90kt4r8",placeholder:"Buscar experi\xeancias",type:"text",autoFocus:!T,onChange:g,value:v,"data-testid":"search-algolia-input"}),v&&(0,r.jsx)("div",{className:et,children:(0,r.jsx)(l.b,{width:20,height:20,"aria-label":"Limpar busca",className:"_90kt4rg",onClick:()=>y("")})})]})]}),(0,r.jsx)("div",{className:et,children:(0,r.jsxs)(el.$nd,{onClick:h,className:"_90kt4rh","aria-label":"Fechar",children:[(0,r.jsx)("span",{children:"Fechar"}),(0,r.jsx)(l.b,{width:16,height:16})]})})]}),(0,r.jsxs)("div",{className:"_90kt4rf",children:[U&&(0,r.jsxs)("div",{className:es,"data-testid":"search-trending-error",children:[(0,r.jsx)(d.A,{title:"N\xe3o foi poss\xedvel carregar os resultados",subtitle:"Tente novamente para buscar eventos relacionados ao seu termo.",hasMargin:!0}),(0,r.jsx)(el.$nd,{onClick:()=>{L.retrySearchResults()},"data-testid":"search-trending-error-retry",children:"Tentar novamente"})]}),H&&(0,r.jsx)("div",{className:es,"data-testid":"search-trending-no-results",children:(0,r.jsx)(d.A,{title:ea.$.NO_RESULTS.title,subtitle:ea.$.NO_RESULTS.subtitle,hasMargin:!0})}),(0,r.jsx)("div",{className:"".concat("_90kt4re"),children:s})]})]})}),(0,r.jsx)("div",{className:"_90kt4r0",onClick:j})]})};var ei=t(78297),eo=t(14944),eu=t.n(eo);let ed="#pesquisar",eh=function(e){let{isNavbarCollapsed:a=!1,isDark:t=!1,hasMossColor:s=!1}=e,{clearIconClassName:c,formRef:i,handleClearInput:d,handleClickInside:h,handleClickOutside:v,handleCloseDropdown:g,handleFocus:_,handleKeyDown:p,handleSearch:j,handleTextChange:y,inputRef:N,inputValue:C,isDropdownOpen:w,isMobile:E,searchFormClassName:I,searchIconClassName:L,searchInputClassName:S,setInputValue:A,wrapperClassName:M}=function(e){var a,t;let{isNavbarCollapsed:s=!1,isDark:r=!1,hasMossColor:l=!1}=e,[n,c]=(0,o.useState)(""),[i,d]=(0,o.useState)(!1),h=(0,o.useRef)(null),v=(0,o.useRef)(null),[g,_]=(0,o.useState)(!1),p=((0,u.useSearchParams)()||new URLSearchParams).get("s"),j=null!=(t=null==(a=q.A.selectedLocation)?void 0:a.city)?t:void 0;(0,o.useEffect)(()=>{let e=()=>_((0,x.Fr)()),a=window.matchMedia("(max-width: 640px)");return e(),a.addEventListener("change",e),()=>a.removeEventListener("change",e)},[]),(0,o.useEffect)(()=>{let e=()=>{d(window.location.hash===ed)};return e(),window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),(0,o.useEffect)(()=>
1{if(i&&v.current&&!g){let e=setTimeout(()=>{var e;null==(e=v.current)||e.focus()},50);return()=>clearTimeout(e)}},[i,g]),(0,o.useEffect)(()=>(i?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[i]),(0,o.useEffect)(()=>{c(p||"")},[p]);let y=(0,o.useCallback)(()=>{i||(d(!0),window.history.pushState(null,"",ed))},[i]),N=(0,o.useCallback)(()=>{if(i){d(!1);{let e=window.location.pathname+window.location.search;window.history.pushState(null,"",e)}}},[i]),C=(0,o.useCallback)(()=>{window.location.href=(0,f.y)({param:"?s=".concat(encodeURIComponent(n)),routeType:"search-bar-default-filter",userLocation:m.nb})},[n]),w=(0,o.useCallback)(e=>{e.preventDefault(),C()},[C]),E=(0,o.useCallback)(e=>{c(e.target.value)},[]),I=(0,o.useCallback)(e=>{"Enter"===e.key&&n.trim().length>0?C():e.key&&!i&&y()},[C,n,i,y]),L=(0,o.useCallback)(e=>{e.stopPropagation()},[]),S=(0,o.useCallback)(()=>{N()},[N]),A=(0,o.useCallback)(()=>{N()},[N]),M=(0,o.useCallback)(e=>{i||(y(),(0,k.K)(b.sK.search_started,{search_page_name:document.title,is_bar_empty:!n.length,search_current_pre_filled_term:n||e.target.placeholder,search_location_set:j}))},[n,i,y,j]),D=(0,o.useCallback)(()=>{var e;c(""),null==(e=v.current)||e.focus()},[]),T=eu()(ei.sf,{[ei.$P]:s}),R=eu()(ei.rm,{[ei.I5]:s,[ei.NR]:r,[ei.RM]:l}),K=eu()(ei.qc,{[ei.mQ]:r,[ei.BX]:s}),O=eu()(ei.Rt,{[ei.lx]:r});return{clearIconClassName:eu()(ei.AQ,{[ei.LX]:s,[ei.Gd]:l}),formRef:h,handleClearInput:D,handleClickInside:L,handleClickOutside:S,handleCloseDropdown:A,handleFocus:M,handleKeyDown:I,handleSearch:w,handleTextChange:E,inputRef:v,inputValue:n,isDropdownOpen:i,isMobile:g,searchFormClassName:R,searchIconClassName:K,searchInputClassName:O,setInputValue:c,wrapperClassName:T}}({hasMossColor:s,isDark:t,isNavbarCollapsed:a});return(0,r.jsxs)("div",{className:M,"data-testid":"search-algolia-wrapper",children:[(0,r.jsxs)("form",{ref:i,className:I,onSubmit:j,role:"presentation","data-testid":"search-algolia-form",children:[(0,r.jsx)(n.A,{width:24,height:24,className:L}),(0,r.jsx)("input",{ref:N,id:"search-experiences",className:S,placeholder:"Buscar experi\xeancias",type:"text",onChange:y,value:C,onKeyDown:p,"data-testid":"search-algolia-input",onFocus:_,readOnly:E,inputMode:E?"none":void 0}),C&&(0,r.jsx)("div",{className:ei.k2,children:(0,r.jsx)(l.b,{className:c,onClick:d})})]}),w&&(0,r.jsx)(ec,{onClickInside:h,setInputValue:A,handleTextChange:y,inputValue:C,inputRef:N,onClose:g,formRef:i,hasMossColor:s,handleSearch:j,isNavbarCollapsed:a,handleClickOutside:v})]})}}}]);
2//# sourceMappingURL=9998.8f50c063b63fd0dc.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.