1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[42],{42:function(e,t,n){n.r(t),n.d(t,{PeriodFormSection:function(){return b}});var o=n(40872),r=n(26042),i=n(69396),a=n(828),d=n(36305),l=n(35944),c=n(65582),u=n(86886),s=n(96486),m=n(67294),f=n(81913),v=n(23418),p=n(34039),h=n(581),g=n(16023),C=n(83319),Z=n(91864),w=n(29611),b=function(e){var t=(0,o.Z)({},e),n=(0,Z.Fb)(),b=n.selectedNeighborhood,x=n.selectedPeriod,S=n.selection,y=n.brandContext,L=n.selectedDegree,P=n.selectedModality,E=n.offerMap,F=n.selectedCourse,N=n.selectedEnroll,_=n.handleHideOrShowNeighborhood,k=y.periods,B=y.brandName,D=(0,a.Z)((0,m.useState)(null),2),q=D[0],z=D[1],H=(0,m.useRef)();(0,p.m)({elementRef:H,trigger:N,name:"PeriodFormSection"});var I=function(e,n){t.onSelectPeriod(e),z(n)};(0,m.useEffect)(function(){if(z(x),x){var e,n,o,r={event:"selecao_curso",brand:null==B?void 0:B.toLowerCase(),name:null==F?void 0:F.name.toLowerCase(),category2:null===(e=(0,h.zK)(null==L?void 0:L.param))||void 0===e?void 0:e.toLowerCase(),category3:null==P?void 0:P.toLowerCase(),state:null===(n=t.selectedState)||void 0===n?void 0:n.toLowerCase(),city:null===(o=t.selectedCity)||void 0===o?void 0:o.toLowerCase(),neighborhood:void 0,variant:null==N?void 0:N.toLowerCase(),turn:null==x?void 0:x.toLowerCase(),itemId:null==F?void 0:F.code};g.I.subscriptionFunnelEvent(r)}},[x]);var M=function(){if(!(null==E?void 0:E.size)||!E.has(b)&&!_())return[];var e=[],t=_()?Array.from(E.values()):E.get(b),n=(0,C.yT)((0,d.Z)(t));e=(0,w.ww)(null==L?void 0:L.param)?(0,s.uniq)(n.map(function(e){return e.shiftName})):(0,s.uniq)(n.filter(function(e){return e.entryForm===N}).map(function(e){return e.shiftName}));var o=[];return e.forEach(function(e){k[e]&&o.push((0,i.Z)((0,r.Z)({},k[e]),{label:e}))}),o.sort(function(e,t){return e.id-t.id})};return(0,m.useEffect)(function(){var e=M();t.handleSelectedFirstComponentDefault(e,function(){return I(e[0].label,e[0].name)})},[M]),(0,l.tZ)(c.Z,{ref:H,maxWidth:"xl","data-section":"section_selecao-turno","data-testid":"period-form-section",sx:{px:{xs:"1.5rem",md:"2rem",lg:"5.5rem"},paddingBottom:{xs:"2.5rem",md:"3rem"},paddingTop:"0"},children:(0,l.BX)(u.ZP,{container:!0,children:[(0,l.tZ)(u.ZP,{item:!0,sx:{paddingBottom:{xs:"1rem"}},"data-testid":"title-period-form",children:(0,l.tZ)(f.D,{variant:"h3",children:(0,l.tZ)(l.HY,{children:S.periodSelectionFlow.title})})}),(0,l.tZ)(u.ZP,{container:!0,rowSpacing:"0.5rem",columnSpacing:"1.5rem","data-testid":"period-button-group",children:M().map(function(e){return(0,l.tZ)(u.ZP,{item:!0,xs:12,sm:12,md:3,lg:3,"data-testid":e.tag,children:(0,l.tZ)(v.O,{"data-element":e.tag,active:!!(q&&q.toUpperCase()===e.name.toUpperCase()),onClick:function(){return I(e.label,e.name)},children:e.name})},e.id)})})]})})}}}]);
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.