"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6872,5809],{36872:function(e,r,n){n.r(r),n.d(r,{default:function(){return j}});var t=n(41120),a=(n(67294),n(35809)),i=n(92809),o=n(99956),s=n(43832),c=n(22318),f=n(282),u=n(27361),l=n.n(u),m=n(68751),d=n(11163),p=n(10861),h=n(58885),g=n(85893),x=(0,t.Z)((function(e){var r;return{affirmContainer:function(r){return{maxWidth:l()(e,"breakpoints.values.lg","1224px"),padding:r.isHome?e.spacing(0,.5):e.spacing(4,.5)}},affirmInnerContainer:function(r){return{background:"DARK"===r.affirmTheme?l()(e,"palette.promo.darkBackground"):l()(e,"palette.promo.lightBackground"),width:"100%","& p":{color:"DARK"===r.affirmTheme?l()(e,"palette.text.secondary"):l()(e,"palette.text.primary"),"& a":{color:"inherit",textTransform:"capitalize","&:hover":{color:"inherit"}}},"& .MuiButton-containedPrimary":{backgroundColor:l()(e,"palette.secondary.main"),color:"#ffffff",padding:e.spacing(1.375,3),borderRadius:e.spacing(.5),"&:hover":{backgroundColor:"#5200d8"}},"& .MuiButton-containedSecondary":{backgroundColor:l()(e,"palette.background.default"),padding:e.spacing(1.375,3),borderRadius:e.spacing(.5),"&:hover":{backgroundColor:l()(e,"palette.background.hover")}}}},affirmSpacing:(r={},(0,i.Z)(r,e.breakpoints.up("md"),{padding:e.spacing(3,8,1,8),display:"flex",justifyContent:"space-between",alignItems:"center"}),(0,i.Z)(r,e.breakpoints.down("md"),{padding:e.spacing(3,3,1,3)}),(0,i.Z)(r,e.breakpoints.down("sm"),{padding:e.spacing(3),"& p":{paddingBottom:e.spacing(1)},textAlign:"center"}),r),affirmHeader:{fontSize:"2.8rem"},homeBg:function(r){return{backgroundColor:r.isHome?l()(e,"palette.promo.lightBackground"):e.palette.background.default}}}}));function y(e){var r=(0,h.Oc)().prismicConfig,n=(0,d.useRouter)(),t=(0,p.Qc)(n.asPath,!0).pathname,a=l()(e,"children"),i=e.isHome,u=x({affirmTheme:l()(e,"affirmColorTheme","DARK"),isHome:i});return(0,g.jsx)(o.Z,{className:u.homeBg,children:(0,g.jsx)(s.Z,{className:u.affirmContainer,children:(0,g.jsx)("div",{className:u.affirmInnerContainer,children:(0,g.jsxs)(o.Z,{className:u.affirmSpacing,children:[(0,g.jsxs)(o.Z,{children:[(0,g.jsx)(c.Z,{color:"DARK"===e.affirmColorTheme?"textSecondary":"textPrimary",variant:"h4",className:u.affirmHeader,children:"Study Now, Pay Later."}),a]}),(0,g.jsx)(f.Z,{variant:"contained",color:"DARK"===e.affirmColorTheme?"secondary":"primary",href:"https://www.affirm.com/apps/prequal/?public_api_key=".concat(r.affirm_public_key,"&use_best_terms=true&use_promo=true&referring_url=").concat(r.root).concat(t.trim().slice(1)),children:m.Z.asText(r.affirm_link)})]})})})})}var v=n(52829),b=(0,t.Z)((function(){return{affirmImg:function(e){return{width:"50px",height:"20px",marginBottom:"DARK"===e.affirmTheme?"-1px":""}}}}));function j(e){var r=b({affirmTheme:l()(e,"affirmColorTheme","DARK")}),n=e.isHome;return e.affirmPromoBanner?(0,g.jsx)(a.default,{children:(0,g.jsx)(v.Z,{pageType:"homepage",Img:r.affirmImg})}):(0,g.jsx)(y,{affirmColorTheme:e.affirmColorTheme,isHome:n,children:(0,g.jsx)(v.Z,{pageType:"homepage",Img:r.affirmImg,affirmColorTheme:e.affirmColorTheme})})}},52829:function(e,r,n){n.d(r,{Z:function(){return g}});var t=n(67294),a=n(69135),i=n(27361),o=n.n(i),s=n(40590),c=n(68751),f=n(58885),u=n(8920),l=n(10861),m=n(11163),d=n(96486),p=n(82872),h=n(85893);function g(e){var r=e.affirmColorTheme,n=e.affirmEligible,i=e.affirmPromoMessage,g=e.classes,x=e.pageType,y=e.Img,v=e.product,b=e.bundles,j=(0,f.Oc)(),k=j.config,Y=j.query,w=j.prismicConfig,M=j.country,D=(0,a.useAmp)(),T=(0,u.Z)(),S="dark"===o()(T,"palette.type"),Z=o()(k,"affirm.logoPath")&&!D&&S?o()(k,"affirm.logoPath"):"DARK"===r?"/static/images/affirm_white_logo-solid_bg.svg":"/static/images/affirm_logo.svg",N="affirm logo",C=(0,m.useRouter)(),A=(0,l.Qc)(C.asPath,!0).path,O=function(e,r,n){return n||(n=o()(e,"affirm")),r&&r.classIds&&r.classIds.length>0&&(r=Object.values({key:{catalog:r}})),r&&r.length>0&&e&&n?(0,d.reduce)(r,(function(r,t){var a=t.catalog;if(!(a&&a.affirm&&a.affirm.ala&&a.affirm.link))return n;var i=e&&e.affirm&&parseInt((0,p.Zx)(e),10),o=a&&a.affirm&&parseInt((0,p.Zx)(a),10),s=i+o,c=a.affirm.ala.replace(o,s),f=a.affirm.link.replace(a.promoPrice,e.promoPrice+a.promoPrice);return i&&{ala:c,link:f}}),n):n}(v,b,i),R=O&&o()(O,"ala",void 0),_=O&&decodeURIComponent(o()(O,"link",void 0)),I=O&&_?_.indexOf("kaptest")>-1?_&&_.replace("https://www.kaptest.com","https://www.kaptest.com".concat(A)):_&&_.replace("https://www.manhattanprep.com","https://www.manhattanprep.com".concat(A)):void 0;return(0,t.useEffect)((function(){window&&window.affirm&&window.affirm.ui&&window.affirm.ui.ready()&&M&&"US"===M&&window.affirm.ui.refresh()})),(0,h.jsx)(h.Fragment,{children:M&&"US"===M&&(0,h.jsx)(h.Fragment,{children:Y&&"1"===Y.automation?(0,h.jsx)("span",{}):"product"===x||"landing"===x?n&&O&&(0,h.jsx)("span",{className:g,children:(0,h.jsx)("p",{children:(0,h.jsx)("a",{href:"".concat(I),children:R})})}):"product-detail"===x?n&&O&&(0,h.jsx)("span",{className:g,children:(0,h.jsxs)("p",{children:[(0,h.jsxs)("a",{href:"".concat(I),children:[R," with "]}),(0,h.jsx)(s.$V,{noLazy:!0,src:{url:Z,alt:N,dimensions:{width:50,height:20}},className:y,ariaLabel:N}),". ",(0,h.jsx)("a",{href:"/affirm",children:"Learn more"})]})}):(0,h.jsx)("span",{className:g,children:(0,h.jsxs)("p",{children:[c.Z.asText(w.affirm),(0,h.jsx)(s.$V,{noLazy:!0,src:{url:Z,alt:N,dimensions:{width:50,height:20}},className:y,ariaLabel:N}),". ",(0,h.jsx)("a",{href:"/affirm",children:"Learn More"})]})})})})}},74831:function(e,r,n){n.d(r,{of:function(){return t},dB:function(){return a},I7:function(){return i},FD:function(){return o},rf:function(){return s},NJ:function(){return c},AP:function(){return f},at:function(){return u},a6:function(){return l},t1:function(){return m}});var t=1,a="startDate",i="endDate",o="testDate",s="distance",c=5,f=3,u=1040075751,l={name:"Online",distance:-1,id:1},m={all:{defaultValue:s,options:[{label:"Sort by Distance",value:s},{label:"Sort by Start Date",value:a},{label:"Sort by End Date",value:i}]},o:{defaultValue:a,options:[{label:"Sort by Start Date",value:a},{label:"Sort by End Date",value:i}]},ip:{defaultValue:s,options:[{label:"Sort by Distance",value:s},{label:"Sort by Start Date",value:a},{label:"Sort by End Date",value:i}]}}},82872:function(e,r,n){n.d(r,{XH:function(){return t},ap:function(){return i},df:function(){return o},Zx:function(){return s}});n(74831);var t=function(e){var r=e.reduce((function(e,r){var n=r.facility,t=e[n.id];return t?t.classes.push(r):e[n.id]={facility:n,classes:[r]},e}),{});return Object.keys(r).reduce((function(e,n){return e.push(r[n]),e}),[]).sort((function(e,r){return e.facility.distance-r.facility.distance}))},a=["January","February","March","April","May","June","July","August","September","October","November","December"],i=function(e,r){return e.reduce((function(e,n){var t=0===e.length?0:e.length-1,i=new Date(n[r]),o=i.getMonth(),s=a[o],c=i.getFullYear();return e[t]&&e[t].month===s?e[t].classes.push(n):e.push({month:s,year:c,classes:[n]}),e}),[])},o=function(e,r){return e.sort((function(e,n){return Date.parse(e[r])-Date.parse(n[r])>=0?1:-1}))},s=function(e){return e&&e.affirm&&e.affirm.ala?e.affirm.ala.split("$").pop().split("/")[0]:0}},24216:function(e,r,n){n.d(r,{eR:function(){return u},mc:function(){return l},v1:function(){return m},gb:function(){return d},vc:function(){return p},an:function(){return h},gl:function(){return g},Dz:function(){return x},ZG:function(){return y},C9:function(){return v},RR:function(){return b},Kh:function(){return j},cQ:function(){return k},NN:function(){return Y}});var t=n(30381),a=n.n(t),i=n(27361),o=n.n(i),s=(n(67294),n(22318)),c=n(99956),f=n(85893);function u(e){var r,n,t,i,s=e.daysOfWeek?e.daysOfWeek.split(",").map((function(e){return a()(e,"ddd").format("dddd")+"s "})):"";return r=p(e.startDate,"YYYY-MM-DD","MMMM D, YYYY"),n=p(e.endDate,"YYYY-MM-DD","MMMM D, YYYY"),{days:s,startDate:r,startDay:p(e.startDate,"YYYY-MM-DD","dddd"),endDate:n,dateRange:r+(n&&n!==r?" - "+n:""),timeRange:((t=o()(e,"courseSessions[0].startTime")?p(e.courseSessions[0].startTime,"kk:mm:ss","h:mm A"):p(o()(e,"startTime",""),"kk:mm:ss","h:mm A"))&&t)+((i=o()(e,"courseSessions[0].endTime")?p(e.courseSessions[0].endTime,"kk:mm:ss","h:mm A"):p(o()(e,"endTime",""),"kk:mm:ss","h:mm A"))&&" - "+i)}}function l(e,r){if(!e||!e.dayTime)return null;var n=o()(e,"liveOnlineClass",!1),t={},a={Sun:1,Mon:2,Tue:3,Wed:4,Thu:5,Fri:6,Sat:7};if(e.dayTime){if(Object.keys(e.dayTime).sort((function(e,r){return a[e]-a[r]})).forEach((function(r){return t[r]=e.dayTime[r]})),Object.keys(t).length<5){var i=e.deliveryType;return Object.keys(t).map((function(e,a){return(0,f.jsxs)("div",{children:[t[e]&&t[e][0]&&!t[e][0].timesVary&&(0,f.jsxs)("div",{children:[(0,f.jsxs)("span",{className:"dayOfWeek",children:[e,"kaptest"===r?":":" "]}),p(t[e][0].startTime,"h:mm","h:mm")," ",p(t[e][0].endTime,"h:mm","A")===p(t[e][0].startTime,"h:mm","A")?"":p(t[e][0].startTime,"h:mm","A")," ","- ",p(t[e][0].endTime,"h:mm","h:mm A")," ",i&&11===i||n?"ET":""]},a),t[e]&&t[e][0]&&t[e][0].timesVary&&(0,f.jsxs)("div",{children:[(0,f.jsx)("span",{className:"dayOfWeek",children:e})," Times vary"]},a)]},"01"+a)}))}var s,c="";return Object.keys(t).forEach((function(e){c+=e,t[e].length,s="Times vary"})),(0,f.jsxs)("div",{children:[(0,f.jsxs)("span",{className:"dayOfWeek",children:[c.substr(0,3)," - ",c.substr(c.length-3,c.length)]}),(0,f.jsx)("br",{}),s]})}}var m=function(e,r,n,t){var a=e&&p(e,n||"MMM-D-YYYY","D"),i=e&&p(e,n||"MMM-D-YYYY","MMM"),o=r&&p(r,n||"MMM-D-YYYY","D"),u=r&&p(r,n||"MMM-D-YYYY","MMM"),l=e&&p(e,n||"MMM-D-YYYY","YYYY"),m=r&&p(r,n||"MMM-D-YYYY","YYYY");return y(e,r,n)?(0,f.jsxs)(s.Z,{variant:"body1",component:"div",children:[i," ",a]}):void 0===t?(0,f.jsxs)(s.Z,{variant:"body1",component:"div",children:[i," ",a," - ",u," ",o]}):t?t?(0,f.jsxs)(s.Z,{variant:"body1",component:"div",children:[i," ",a," - ",u," ",o]}):void 0:(0,f.jsxs)(s.Z,{variant:"body1",component:"div",children:[(0,f.jsxs)(c.Z,{whiteSpace:"nowrap",children:[i," ",a," ",l," -"]}),(0,f.jsxs)(c.Z,{whiteSpace:"nowrap",children:[u," ",o," ",m]})]})};function d(e,r){return r?a()(e,r):a()(e)}function p(e,r,n){return a()(e,r||n).format(n)}function h(e,r,n){if(e){var t=e.substr(e.length-4).includes("5")?5:4;return r?a()(e,r).subtract(t,"h").format(n):a()(e).subtract(t,"h").format(n)}}function g(e,r){return a()(e).startOf(r)}function x(e,r,n){return a()(e).endOf(r).format(n)}function y(e,r,n){var t=n?a()(e,n):a()(e),i=n?a()(r,n):a()(r);return a()(t).isSame(i)}function v(e,r){var n=a()().startOf("day");return r?a()(e,r).endOf("day").isSameOrAfter(n):a()(e).endOf("day").isSameOrAfter(n)}function b(e,r,n){return a()(e).isBefore(r,n)}function j(e,r,n){return a()(e).isBetween(r,n)}function k(){return a()()}function Y(e){return a()(e)}},35809:function(e,r,n){n.r(r),n.d(r,{default:function(){return h}});var t=n(43832),a=n(99956),i=n(22318),o=n(41120),s=n(27361),c=n.n(s),f=n(67294),u=n(68751),l=n(24216),m=n(85893);function d(e){var r=c()(e,"start",void 0),n=c()(e,"end",void 0);if(void 0===r||!r||void 0===n)return null;if(!(0,l.Kh)((0,l.cQ)(),(0,l.NN)(r),(0,l.NN)(n)))return null;var t=function(){var e=(0,l.NN)(n)-+(0,l.cQ)(),r={};return e>0&&(r={d:Math.floor(e/864e5),h:Math.floor(e/36e5%24),m:Math.floor(e/1e3/60%60),s:Math.floor(e/1e3%60)}),r},a=(0,f.useState)(t()),i=a[0],o=a[1];(0,f.useEffect)((function(){setTimeout((function(){o(t())}),1e3)}));var s=[];return Object.keys(i).forEach((function(e,r){i[e]&&s.push((0,m.jsx)("span",{children:!("d"===e&&0===i[e])&&(0,m.jsxs)(m.Fragment,{children:[i[e],e," "]})},r))})),(0,m.jsxs)(m.Fragment,{children:["Offer ends in ",s.length&&s]})}var p=(0,o.Z)((function(e){return{root:{background:c()(e,"palette.promo.background"),"& a":{color:c()(e,"palette.promo.text")}},container:{maxWidth:c()(e,"breakpoints.values.xl","1224px"),padding:e.spacing(0,.5,0,.5)},wrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:e.spacing(7)},promoBox:function(r){return{display:"flex",padding:e.spacing(1,1.5),textAlign:r.textAlign,alignItems:"center",flexGrow:1,"& p:last-child":{marginBottom:0}}},promoText:{width:"100%","& p":{color:c()(e,"palette.promo.text"),display:"inline",fontFamily:c()(e,"palette.promo.fontFamily","inherit"),fontSize:e.typography.body2.fontSize},"& p:last-child":{marginBottom:0}},close:{width:e.spacing(8),display:"flex",justifyContent:"flex-end",alignItems:"center"}}}));function h(e){var r=(0,f.useState)(!0),n=r[0],o=(r[1],p({textAlign:c()(e,"data.primary.alignment","center")})),s=c()(e,"data.primary.text"),h=c()(e,"data.primary.start_counter",void 0),g=c()(e,"data.primary.end_counter",void 0),x=c()(e,"children"),y=(0,l.RR)(new Date,g);return(0,m.jsx)(m.Fragment,{children:(y&&n||x)&&(0,m.jsx)("div",{className:o.root,children:(0,m.jsx)(t.Z,{className:o.container,children:(0,m.jsx)(a.Z,{className:o.wrapper,children:(0,m.jsx)(a.Z,{className:o.promoBox,children:(0,m.jsxs)(a.Z,{className:o.promoText,children:[s&&(0,m.jsx)(u.Z,{render:s}),h&&g&&(0,m.jsxs)(i.Z,{variant:"body1",children:[" ",(0,m.jsx)(d,{start:h,end:g})]}),x&&(0,m.jsx)(m.Fragment,{children:x})]})})})})})})}}}]);