https://www.ufcgym.com/_next/static/chunks/pages/locations/[code]/join/join-test-142746801852059b.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3136],{1332:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/locations/[code]/join/join-test",function(){return n(2039)}])},8756:function(e,t,n){"use strict";var o=n(6042),r=n(9815),a=n(5893),i=n(1163),s=n(7536),l=n(4466),c=n(7709),u=n(8725),d=n(2706),m=function(){return(0,a.jsx)("div",{className:"mt-48 inline-block size-24 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status",children:(0,a.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})},f=function(e){var t,n=e.location,o=e.promoCode;return(null==n?void 0:null===(t=n.joinPage)||void 0===t?void 0:t.promoMessage)?(0,a.jsx)("div",{className:"-mt-4 mb-8 text-xl text-center md:text-2xl",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:n.joinPage.promoMessage}})}):(null==n?void 0:n.code)==="san-jose"?null:"july25"===o||"July25"===o||"JULY25"===o?(0,a.jsx)("div",{className:"-mt-4 mb-8 text-xl text-center md:text-2xl",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"mb-4 font-urw-din-condensed text-[32px] font-bold leading-[1.2] text-ufc-red lg:mb-0 lg:text-[40px]",children:"GET YOUR FIRST & LAST MONTH FREE!"}),(0,a.jsxs)("p",{children:[(0,a.jsx)("b",{children:"Pay only $1 enrollment."}),(0,a.jsx)("br",{}),"Don't miss outâoffer ends August 5th."]})]})}):(null==n?void 0:n.owner)==="CORP"||(null==n?void 0:n.owner)==="MSA"?(0,a.jsx)(u.Z,{location:n,variant:"join"}):null},p=function(e){var t=e.location,n=e.promoCode,r=(0,s.cI)(),l=r.register,c=r.handleSubmit,u=r.reset,m=(0,i.useRouter)(),p=function(e){var n=e.promoCode;u(),m.push({pathname:"/locations/".concat(t.code,"/").concat((0,d.Yv)(m)),query:{promoCode:n.trim()}})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f,{location:t,promoCode:n}),(0,a.jsx)("div",{className:"text-center",children:"Got a Promo Code? Enter it here:"}),(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bg-transparent",children:(0,a.jsx)("form",{onSubmit:c(p),children:(0,a.jsxs)("div",{className:"relative text-gray-600 focus-within:text-gray-400",children:[(0,a.jsx)("span",{className:"flex absolute inset-y-0 left-0 items-center pl-2",children:(0,a.jsx)("button",{type:"submit",className:"p-1 focus:shadow-outline focus:outline-none",children:(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",className:"size-6",children:(0,a.jsx)("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})}),(0,a.jsx)("input",(0,o.Z)({name:"promoCode",type:"search",className:"py-2 pl-10 text-black bg-gray-100 focus:bg-gray-100 focus:text-gray-900 focus:outline-none",placeholder:"Search..."},l("promoCode",{})))]})})})]})},h=function(e){var t=e.thePromoCode;return"PRESALE"===e.location.status?(0,a.jsx)("div",{className:"mt-16 text-4xl font-bold text-center font-urw-din-condensed",children:"Coming Soon!"}):(0,a.jsxs)("div",{className:"mt-48 text-2xl",children:["No online offers ",t&&'with Promo Code "'.concat(t,'"')," at this location."]})},x=function(e){var t=e.location,n=e.typeCheck,o=e.thePromoCode,i=e.showPromoCodeForm,s=e.offers,u=e.onClickOffer;return(0,a.jsxs)("div",{className:"pt-10 md:pt-14",children:[(0,a.jsxs)(l.Z,{title:"Experience the Train Different Lifestyle",titleStyle:"font-bold",extra:"max-w-[592px] my-5",color:n?"black":"text-ufc-blue",children:["Join us at the"," ",(0,a.jsxs)("span",{className:"font-bold",children:[(null==t?void 0:t.name)===(null==t?void 0:t.city)?null==t?void 0:t.name:"".concat(t.name," ").concat(null==t?void 0:t.city),", ",null==t?void 0:t.state]})," ","gym and unlock the benefits of MMA-inspired fitness.*"]}),(void 0===i||i)&&(0,a.jsx)(p,{location:t,promoCode:o}),"PRESALE"===t.status&&(0,a.jsx)("div",{className:"mt-16 text-4xl font-bold text-center font-urw-din-condensed",children:"Presale Specials"}),(0,a.jsxs)("div",{className:"mt-8 flex min-h-[480px] flex-wrap justify-center",children:[!s&&(0,a.jsx)(m,{}),s&&s.offers&&Array.isArray(s.offers)&&s.offers.length>0&&s.offers.sort(function(e,t){return(0,c.y5)(e.name)-(0,c.y5)(t.name)}).map(function(e){return(0,a.jsx)(c.ZP,{location:t,typeCheck:n,offer:e,onClick:u},e.info.planId)}),s&&s.offers&&Array.isArray(s.offers)&&0===s.offers.length&&(0,a.jsx)(h,{thePromoCode:o,location:t})]}),s&&s.offers&&Array.isArray(s.offers)&&s.offers.length>0&&(0,a.jsxs)("div",{className:"mb-8 text-sm text-center max-w-3xl mx-auto",children:["*"," ",function(){var e=(0,r.Z)(new Set(s.offers.map(function(e){return{fee:null==e?void 0:e.enhancementFee,date:Math.floor((new Date(null==e?void 0:e.enhancementFeeDate).getTime()-new Date().getTime())/864e5)+1}}
1).filter(Boolean)));if(1===e.length)return 0===e[0].fee||"0"===e[0].fee?"":"$".concat(e[0].fee," annual assessment fee charged ").concat(e[0].date," days after enrollment. ");if(!(e.length>1))return"";var t,n,o,a,i=(t=Math).min.apply(t,(0,r.Z)(e.map(function(e){return e.fee}))),l=(n=Math).max.apply(n,(0,r.Z)(e.map(function(e){return e.fee}))),c=(o=Math).min.apply(o,(0,r.Z)(e.map(function(e){return e.date}))),u=(a=Math).max.apply(a,(0,r.Z)(e.map(function(e){return e.date})));return console.log(c,u),"$".concat(i).concat(i!==l?"-$".concat(l):""," annual assessment fee charged ").concat(c==u?u:c>0?c+"-"+u:"0-"+u," days after enrollment. ")}(),"summer74"===o||"summer99"===o?"":(null==t?void 0:t.owner)=="CORP"||(null==t?void 0:t.owner)=="MSA"?"All memberships require a minimum 3-month commitment. ":"","Amenities vary by location. Some memberships may display amenities not available at your selected home gym."]})]})};t.Z=x},2039:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return F},default:function(){return T}});var o=n(5893),r=n(7294),a=n(2962),i=n(2130),s=n(7568),l=n(4924),c=n(6042),u=n(9396),d=n(7582),m=n(1163),f=n(7536),p=n(8100),h=n(7066),x=n(259),v=n(1954),b=n(3509),y=n(5631),g=n(8756),w=n(6788),j=n(1215),N=n(7547),C=n(2914),S=n(2706),Z=n(8665),k=function(e,t,n){return h.Z.post(e,{clubSlug:t,promoCode:n}).then(function(e){return e.data})},P=function(e){var t=e.location,n=e.showPromoCodeForm,a=e.promoCode,P=(0,i.mr)().leadSource,F=(0,f.cI)(),T=(F.register,F.setValue),_=F.watch,E=(0,r.useState)(1),M=E[0],A=E[1],I=(0,r.useState)(C.Rt),L=I[0],R=I[1],U=(0,r.useState)(void 0),O=U[0],Y=U[1],D=(0,r.useState)(!1),G=D[0],q=D[1],z=(0,r.useState)({loading:!1,message:null}),J=z[0],$=z[1],B=(0,m.useRouter)(),H=(void 0===a?null:a)||B.query.promoCode,X=_("location"),V=(void 0===t?null:t)||(X?y.find(function(e){return e.code===X}):null),W=(null==V?void 0:V.type)=="SIGNATURE"||(null==V?void 0:V.type)=="UFCGYM",K=(0,p.ZP)((null==V?void 0:V.code)?["https://ufcgym-fitcms.netlify.app/.netlify/functions/offers-abc",V.code,H]:null,k),Q=K.data;K.error;var ee=(0,x.xX)().executeRecaptcha,et=(0,r.useState)({}),en=et[0],eo=et[1];(0,r.useEffect)(function(){!V&&M>1&&A(1)},[V,M]),(0,r.useEffect)(function(){V||eo({1:!0})},[V]),(0,r.useEffect)(function(){M>1&&eo(function(e){for(var t=(0,l.Z)({},M,!0),n=1;n<M;n++)t[n]=!1;return t})},[M]);var er=function(e){(1===e||M>=e)&&eo(function(t){if(t[e])return(0,u.Z)((0,c.Z)({},t),(0,l.Z)({},e,!1));for(var n=(0,l.Z)({},e,!0),o=1;o<=5;o++)o!==e&&(n[o]=!1);return n})};(0,r.useEffect)(function(){if(!ee){console.log("Execute recaptcha not yet available");return}},[ee]);var ea,ei,es=function(e){Y(e),A(3),eo(function(e){return(0,u.Z)((0,c.Z)({},e),{3:!0})}),window.scrollTo(0,0)},el=(ea=(0,s.Z)(function(e){var t,n,o,r,a,i,s;return(0,d.__generator)(this,function(r){switch(r.label){case 0:if(!ee)return console.log("Execute recaptcha not yet available"),[2];return[4,ee("prospect_form")];case 1:if(t=r.sent(),G)return[3,5];r.label=2;case 2:return r.trys.push([2,4,,5]),n=(0,u.Z)((0,c.Z)({},L),{offer:{clubSlug:null==V?void 0:V.code,offerInfo:O.info,totalDueToday:O.totalDueToday},member:{firstName:e.firstName,lastName:e.lastName,email:e.email,phone:e.phone.replace(/\D/g,"")}}),(o=(0,C.E)(n,P)).token=t,[4,h.Z.post("/api/prospect",o)];case 3:return a=r.sent().data.lead.id,R((0,u.Z)((0,c.Z)({},n),{leadId:a})),q(!0),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"join_info",pageUrl:window.location.href,club:V.code}),[3,5];case 4:return i=r.sent(),console.error("onSubmitMemberInfoForm Error",i),s="Something went wrong while submitting your information. Please try again, or contact your local club for help.",i.response?(console.error("onSubmitMemberInfoForm server response:",i.response.status,i.response.data),400===i.response.status?s="Please double-check your information and try again.":i.response.status>=500&&(s="We're having trouble on our end right now. Please try again in a moment, or contact your local club for help.")):i.request&&(s="Unable to reach our servers. Please check your internet connection and try again."),$({loading:!1,message:s}),A(3),[2];case 5:return A(4),eo(function(e){return(0,u.Z)((0,c.Z)({},e),{4:!0})}),window.scrollTo(0,0),[2]}})}),function(e){return ea.apply(this,arguments)}),ec=function(e){var t=(0,u.Z)((0,c.Z)({},L),{member:(0,u.Z)((0,c.Z)({},L.member),{street:null==e?void 0:e.street,city:null==e?void 0:e.city,state:null==e?void 0:e.state,postalCode:null==e?void 0:e.postalCode,gender:null==e?void 0:e.gender,birthdate:null==e?void 0:e.b
1irthdate}),billing:{accountNumber:null==e?void 0:e.accountNumber,expiresMonth:+(null==e?void 0:e.expiresMonth),expiresYear:+(null==e?void 0:e.expiresYear),cvvCode:null==e?void 0:e.cvvCode},bankAccount:{accountNumber:null==e?void 0:e.bankAccountNumber,routingNumber:null==e?void 0:e.bankRoutingNumber,accountType:null==e?void 0:e.bankAccountType}});R(t),A(5),eo(function(e){return(0,u.Z)((0,c.Z)({},e),{5:!0})}),window.scrollTo(0,0)},eu=(ei=(0,s.Z)(function(e){var t,n,o,r,a,i,s,l,c,u;return(0,d.__generator)(this,function(e){switch(e.label){case 0:if(!ee)return console.log("Execute recaptcha not yet available"),[2];return[4,ee("contact_form")];case 1:t=e.sent(),$({loading:!0,message:"Please wait..."}),e.label=2;case 2:return e.trys.push([2,4,,5]),(n=(0,C.gc)(L,P)).token=t,o=(null==V?void 0:V.code)==="chicago-morgan-park"?"/api/membership-with-ach":"/api/membership",[4,h.Z.post(o,n)];case 3:return a=(r=e.sent()).data,(null==r?void 0:r.status)===200?(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"join_confirmation",pageUrl:window.location.href,club:V.code}),i=null==a?void 0:a.externalId,(0,Z.f)(null==V?void 0:V.id,i),(null==V?void 0:V.code)&&B.push((0,S.tk)({location:V,memberId:i,offerName:null==O?void 0:O.name,joinPath:(0,S.Yv)(B)})).then(function(){return window.scrollTo(0,0)})):$({loading:!1,message:"ERROR: ".concat(null==r?void 0:r.status," ").concat((null==r?void 0:null===(s=r.data)||void 0===s?void 0:s.message)||"Unknown error")}),[3,5];case 4:return l=e.sent(),console.error("onSubmitReviewForm Error",l),c="Unable to complete your membership purchase. Please call the club.",$({loading:!1,message:c=l.response?(null===(u=l.response.data)||void 0===u?void 0:u.message)||c:l.request?"Unable to connect to the server. Please check your internet connection.":"An unexpected error occurred. Please call the club."}),[3,5];case 5:return[2]}})}),function(e){return ei.apply(this,arguments)}),ed=function(){V&&(eo({1:!1,2:!0}),A(2),window.scrollTo(0,0))},em=[{id:1,name:"location",status:1===M?"active":V?"completed":"todo",content:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.Z,{setValue:T}),V&&(0,o.jsx)("div",{className:"mt-6 flex justify-center",children:(0,o.jsx)("button",{type:"button",onClick:ed,className:"px-8 py-3 font-urw-din-condensed text-lg font-bold uppercase tracking-wider text-white transition-colors ".concat((null==V?void 0:V.type)==="UFCFIT"?"bg-ufc-blue hover:bg-blue-700":"bg-ufc-red hover:bg-red-700"),children:"Continue"})})]})},{id:2,name:"membership",status:2===M?"active":M>2?"completed":"todo",content:V?(0,o.jsx)(g.Z,{setStep:A,step:M,location:V,typeCheck:W,thePromoCode:H,showPromoCodeForm:void 0===n||n,offers:Q,onClickOffer:function(e){return es(e)}}):null},{id:3,name:"info",status:3===M?"active":M>3?"completed":"todo",content:(0,o.jsx)(w.Z,{setStep:A,step:M,cart:L,selectedOffer:O,hasSubmittedCartLead:G,purchaseStatus:J,onSubmitMemberInfoForm:function(e){return el(e)}})},{id:4,name:"billing",status:4===M?"active":M>4?"completed":"todo",content:(0,o.jsx)(j.Z,{setStep:A,previousStep:3,cart:L,selectedOffer:O,onSubmitPaymentForm:ec,location:V,showACHInfo:(null==V?void 0:V.code)==="chicago-morgan-park"})},{id:5,name:"review",status:5===M?"active":M>5?"completed":"todo",content:(0,o.jsx)(N.Z,{setStep:A,previousStep:4,step:M,cart:L,location:V,selectedOffer:O,purchaseStatus:J,onSubmitReviewForm:eu})},],ef=(null==V?void 0:V.type)==="UFCFIT",ep=ef?"border-ufc-blue":"border-ufc-red",eh=ef?"text-ufc-blue":"text-ufc-red";return(0,o.jsx)("nav",{className:"px-5 py-10 sm:px-10 md:py-14 lg:py-[72px]",children:(0,o.jsx)("div",{className:"mx-auto max-w-[1400px]",children:(0,o.jsx)("div",{className:"space-y-4",children:em.map(function(e){var t=en[e.id]||!1,n=1===e.id||M>=e.id,r=M>e.id,a=M===e.id,i=1===e.id&&V&&!t?e.name+": "+((null==V?void 0:V.type)==="UFCFIT"?"UFC FIT":"UFC GYM")+" "+V.name:e.name;return e.id>1&&!V?null:(0,o.jsxs)("div",{className:"border-2 ".concat(a?ep:r?ep:"border-gray-200"," bg-white rounded-lg overflow-hidden"),children:[(0,o.jsxs)("button",{type:"button",onClick:function(){return er(e.id)},disabled:!n,className:"flex w-full items-center justify-between px-6 py-4 text-left transition-colors ".concat(n?"cursor-pointer hover:bg-gray-50":"cursor-not-allowed opacity-50"),children:[(0,o.jsxs)("div",{className:"flex items-center gap-4",children:[(0,o.jsxs)("span",{className:"font-urw-din-condensed text-[18px] font-bold uppercase leading-tight tracking-[1px] ".concat(a||r?eh:"text-gray-500"),children:["Step ",e.id]}),(0,o.jsx)("span",{className:"text-base font-bold capitalize sm:text-lg",children:i})]}),(0,o.jsx)(v.JO,{icon:t?"ph:minus-circle":"ph:plus-circle",width:"24",height:"24",className:a||r?eh:"text-gray-400"})]}),t&&(0,o.jsx)("div",{className:"border-t-2 border-gray-200 p-6",children:e.content})]},e.id)})})})})},F=!0,T=function(e){var t=e.location,n=(0,i.TL)();return(0,r.useEffect)(function(){n({type:"SET_LOCATION",payload:t})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.PB,{title:"Gym Memberships | Train Different | UFC GYM/FIT",description:"UFC GYM/FIT offers gym memberships for individuals, couples and even families. Learn more about our ".concat(t.name," gym membership options, here.")}),(0,o.jsx)("div",{className:"",children:(0,o.jsx)(P,{location:t})})]})}}},function(e){e.O(0,[7536,7066,8837,8100,3265,8725,5115,9774,2888,179],function(){return e(e.s=1332)}),_N_E=e.O()}]);
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.