1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{83236:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return n(91237)}])},16412:function(e,r,n){"use strict";n.d(r,{Z:function(){return s}});var t=n(85893),o=n(9008),a=n.n(o);function s(){return(0,t.jsxs)(a(),{children:[(0,t.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/favicon/apple-touch-icon.png"}),(0,t.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon/favicon-32x32.png"}),(0,t.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon/favicon-16x16.png"}),(0,t.jsx)("link",{rel:"manifest",href:"/favicon/site.webmanifest"}),(0,t.jsx)("link",{rel:"mask-icon",href:"/favicon/safari-pinned-tab.svg",color:"#000000"}),(0,t.jsx)("meta",{name:"msapplication-TileColor",content:"#000000"}),(0,t.jsx)("meta",{name:"theme-color",content:"#000000"})]})}},61370:function(e,r,n){"use strict";n.d(r,{Z:function(){return o}});var t=n(85893);function o(e){let{color:r="var(--brand-orange)",width:n=70,title:o="Fireship",...a}=e;return(0,t.jsxs)("svg",{...a,xmlns:"http://www.w3.org/2000/svg",width:n,viewBox:"0 0 300 301",children:[(0,t.jsx)("title",{children:o}),(0,t.jsx)("path",{d:"M115.44.64c-.53-.45-1.74-.43-2.75-.64-.53.78-1.21,1.4-1.38,2.08-.4,1.72-.69,3.47-.85,5.23-3.9,39.25-18.51,75.68-46.94,109.02-15.77,18.49-31.47,37.39-43.07,57.48-28.8,49.84-3.17,100.74,59.65,122.99,2.07.73,4.39,1.06,9.57,2.27-21.31-19.27-32.28-38.85-28.58-62.02,3.52-22.1,14.7-41.82,31.64-59.8,1.25,2.5,1.32,4.68,1.24,6.86-.83,19.72,5.7,37.12,25.86,50.86,9.32,6.35,17.69,13.54,26.12,20.61,8.56,7.2,11.04,15.85,8.61,25.28-1.17,4.58-2.88,9.09-4.73,14.74,14.35-1.42,27.62-3.4,36.53-11.33,8.52-7.57,14.82-16.55,23.91-27.01.64,8.85,1.88,15.74,1.4,22.56-.51,7.09-2.7,14.12-4.16,21.18,43.61-6.57,82.08-49.36,83.77-93.13,1.24-31.94-25.94-78.72-48.76-83.26,1.28,3,2.47,5.84,3.75,8.64,7.92,17.44,10.24,35.12,5.23,53.37-5.01,18.15-30.43,38.52-52.85,41.09.76-1.82,1.08-3.52,2.12-4.91,24.15-32.54,24.45-66.6,10.72-101.36C193.12,74.99,157.88,36.14,115.44.64Z",fill:r})]})}},73742:function(e,r,n){"use strict";n.d(r,{Z:function(){return c}});var t=n(67294),o=n(11163),a=n(97836),s=n(75501),i=n(33811);function c(e){let{productId:r,quantity:n,s:c,pppEnabled:l=!0}=e,u=(0,o.useRouter)(),d=(0,s.Z)(),p=u.query.s||u.query.from||u.query.utm_source||c||null,[f,h]=t.useState(p);t.useEffect(()=>{null===p&&h((0,i.Z)())},[p]);let m="".concat(a.FH,"api/checkout?product_id=").concat(r);if(n&&(m+="&quantity=".concat(n)),f&&(m+="&source=".concat(f)),(null==d?void 0:d.loading)===!1){var x,g;"ppp"===d.best&&l&&(m+="&code=".concat(null===(x=d.ppp)||void 0===x?void 0:x.code)),"url"===d.best&&(m+="&code=".concat(null===(g=d.url)||void 0===g?void 0:g.code))}return m}},75501:function(e,r,n){"use strict";n.d(r,{Z:function(){return i}});var t=n(10777);let o=async()=>{let e=await fetch("https://fireship.dev/api/ppp");if(!e.ok)throw Error("There was an error fetching the PPP discount.");return e.json()};var a=n(11163);let s=async e=>{let r=await fetch("/api/get-promotion-code",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({code:e})});if(!r.ok)throw Error("There was an error fetching the PPP discount.");let n=await r.json();if(200!==n.status)throw Error("There was an error fetching the PPP discount.");return n.data};function i(){let{discount:e,loading:r}=function(){let{isLoading:e,data:r}=(0,t.a)({queryKey:["ppp"],queryFn:o});return e?{loading:!0,discount:null}:r&&0!==Object.keys(r).length?{loading:!1,discount:{type:"ppp",code:r.code,percentOff:r.percentOff,countryCode:r.countryCode,country:r.country}}:{loading:!1,discount:null}}(),{discount:n,loading:i}=function(){let e=(0,a.useRouter)().query.code,{isLoading:r,data:n}=(0,t.a)({queryKey:["url-discount",e],queryFn:async()=>e?s(e):null});return r?{loading:!0,discount:null}:n?{loading:!1,discount:{type:"url",code:e,percentOff:n.percentOff,...n.limitTo&&{limitTo:n.limitTo}}}:{loading:!1,discount:null}}();if(r||i)return{ppp:null,url:null,best:null,loading:!0};let c=null;return e&&!n&&(c="ppp"),n&&!e&&(c="url"),e&&n&&(c=e.percentOff>n.percentOff?"ppp":"url"),{ppp:e,url:n,best:c,loading:!1}}},91237:function(e,r,n){"use strict";n.r(r),n.d(r,{__N_SSP:function(){return g},default:function(){return y}});var t=n(85893),o=n(67294),a=n(9008),s=n.n(a),i=n(28115),c=n(61370),l=n(86501),u=n(17166),d=n(41664),p=n.n(d),f=n(16412),h=n(95711),m=n(73742),x=n(11163),g=!0;function y(){let{login:e}=(0,i.Z)(),r=(0,m.Z)({productId:"subscription"}),n=(0,x.useRouter)(),a=n.query.from||"/c",[d,g]=o.useState(""),[y,b]=o.useState(""),[v,w]=o.useState(!1),j=o.useRef(!1);o.useEffect(()=>{"true"!==n.query.session_expired||j.current||(j.current=!0,l.ZP.error("You've been logged out because your account was accessed from another location.",{duration:1e4}),n.replace("/login",void 0,{shallow:!0}))},[n.query.session_expired]);let k=async r=>{if(r.preventDefault(),!d)return l.ZP.error("An email is required, obviously");if(!y)return l.ZP.error("A password is required, obviously");w(!0);try{let r=await e(d,y);if(w(!1),r.error)throw b(""),r.error;location.assign(a)}catch(e){"auth/user-not-found"===e.code?l.ZP.error("Weâre not finding that email in our system."):"auth/wrong-password"===e.code?l.ZP.error("That password is incorrect."):"auth/network-request-failed"===e.code?l.ZP.error("A network error occurred. Check your connection"):"auth/too-many-requests"===e.code?l.ZP.error("You've attempted to login too many times and our Auth provider is upset. Try again in a bit."):l.ZP.error(e.message)}};return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(s(),{children:(0,t.jsx)("title",{children:"Login to Fireship"})}),(0,t.jsx)(f.Z,{}),(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"max-w-md w-full space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Z,{className:"mx-auto h-12 w-auto"}),(0,t.jsx)("h2",{className:"mt-6 font-display text-center text-3xl",children:"Sign in to your account"}),(0,t.jsxs)("p",{className:"mt-2 text-center",children:["Or start a"," ",(0,t.jsx)("a",{href:r,className:"font-semibold text-brand-purple dark:text-brand-yellow hover:underline",children:"subscription"})]})]}),(0,t.jsxs)("form",{className:"mt-8",onSubmit:k,children:[(0,t.jsxs)("div",{className:"rounded-md shadow-sm -space-y-px",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"email-address",className:"sr-only",children:"Email address"}),(0,t.jsx)("input",{id:"email-address",name:"email",type:"email",autoComplete:"off",value:d,onChange:e=>g(e.target.value),className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-brand-charcoal/10 dar
1k:border-brand-coal placeholder-gray-300 bg-brand-white dark:bg-brand-charcoal rounded-t-md focus:outline-none focus:ring-0 focus:z-10 focus:border-brand-purple dark:focus:border-brand-coal sm:text-sm",placeholder:"Email address"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"password",className:"sr-only",children:"Password"}),(0,t.jsx)("input",{value:y,onChange:e=>b(e.target.value),id:"password",name:"password",type:"password",autoComplete:"off",className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-brand-charcoal/10 dark:border-brand-coal placeholder-gray-300 bg-brand-white dark:bg-brand-charcoal rounded-b-md focus:outline-none focus:ring-0 focus:border-brand-purple dark:focus:border-brand-coal sm:text-sm",placeholder:"Password"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-end pt-2 pb-6",children:(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(p(),{href:"/reset",className:"opacity-80 hover:opacity-100",children:"forgot your password?"})})}),(0,t.jsx)("div",{children:(0,t.jsxs)("button",{disabled:""===d||""===y||!0===v,type:"submit",className:"group relative w-full flex justify-center py-2 px-4 rounded-md font-black bg-gray-100 dark:bg-brand-charcoal focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue disabled:text-gray-300",children:[(0,t.jsx)("span",{className:"absolute left-0 inset-y-0 flex items-center pl-3",children:!0===v?(0,t.jsx)(h.$ge,{className:"h-4 w-4 group-disabled:text-gray-300","aria-hidden":"true"}):(0,t.jsx)(h.z0y,{className:"h-4 w-4 group-disabled:text-gray-300","aria-hidden":"true"})}),!0===v?(0,t.jsx)(u.H_P,{className:"h-6 w-6 text-gray-300 animate-spin mx-auto"}):"Sign in"]})})]})]})})]})}},33811:function(e,r,n){"use strict";n.d(r,{Z:function(){return a}});var t=n(58971),o=n.n(t);function a(){return o().get("uidotdev_src")}}},function(e){e.O(0,[2013,2876,7765,2888,9774,179],function(){return e(e.s=83236)}),_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.