1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9350],{3958:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cb",function(){return t(49266)}])},73884:function(n,e,t){"use strict";t.d(e,{I:function(){return i}});var r=t(42551),o=void 0,i=function(){return u().getCurrentUser()};function u(){return o?new r.AM(o):{getCurrentUser:function(){return null},getUserPoolId:function(){return""},getUserPoolName:function(){return""},getClientId:function(){return""},signUp:function(){}}}var c=u();e.Z=c},19506:function(n,e,t){"use strict";var r=t(73884),o=function(){var n=r.Z.getCurrentUser();return new Promise(function(e){null==n||n.getSession(function(n,t){if(n){e(null);return}e(t)})})};e.Z=o},66429:function(n,e,t){"use strict";var r=t(73884),o=function(){var n=r.Z.getCurrentUser();return n?new Promise(function(e){n.signOut(function(){localStorage.removeItem("remember"),e(!0)})}):null};e.Z=o},52507:function(n,e,t){"use strict";t.d(e,{$d:function(){return r},Ab:function(){return h},rz:function(){return _},lZ:function(){return f}});
1var r,o,i=t(47568),u=t(20414),c=t(42551),s=t(9669),l=t(73884),a=t(25238);(o=r||(r={})).GOOGLE="Google",o.FB="Facebook";var d,f=function(n,e,t){return Object.values(r).includes(n)?"".concat("","/oauth2/authorize?identity_provider=").concat(n)+"&redirect_uri=".concat(t,"&response_type=").concat("CODE")+"&client_id=".concat(l.Z.getClientId(),"&scope=").concat(e):null},_=(d=(0,i.Z)(function(n,e){var t,r,o;return(0,u.__generator)(this,function(o){switch(o.label){case 0:(t=new URLSearchParams).append("grant_type","authorization_code"),t.append("code",n),t.append("client_id",l.Z.getClientId()),t.append("redirect_uri",e),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,a.ZP.post("".concat("","/oauth2/token"),t)];case 2:if(!(null==(r=o.sent())?void 0:r.data))return[2,null];return[2,r.data];case 3:var i,u;if(i=o.sent(),null!=(u=s.AxiosError)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?!!u[Symbol.hasInstance](i):i instanceof u)return[2,null];return[3,4];case 4:return[2,null]}})}),function(n,e){return d.apply(this,arguments)}),h=function(n){if(!(null==n?void 0:n.id_token)&&!(null==n?void 0:n.access_token)&&!(null==n?void 0:n.refresh_token))return null;var e=n.id_token.split(".")[1],t=e?JSON.parse(atob(e)):"",r=null==t?void 0:t["cognito:username"];if(!r)return null;var o=new c.xk({IdToken:n.id_token}),i=new c.ZA({AccessToken:n.access_token}),u=new c.bR({RefreshToken:n.refresh_token}),s=new c.MZ({AccessToken:i,RefreshToken:u,IdToken:o});new c.ws({Username:r,Pool:l.Z}).setSignInUserSession(s)}},1918:function(n,e,t){"use strict";t.d(e,{E:function(){return r}});var r=function(n){return n.length>150?"An error occurred":n.includes("PreSignUp failed with error")?n.split("PreSignUp failed with error ")[1]:n.includes("PostConfirmation failed with error")?n.split("PostConfirmation failed with error ")[1]:n}},72516:function(n,e,t){"use strict";var r=t(26042),o=t(69396),i=t(99534),u=t(85893),c=t(74881),s=t.n(c),l=function(n){var e=n.children,t=(0,i.Z)(n,["children"]);return(0,u.jsx)("button",(0,o.Z)((0,r.Z)({},t),{className:"".concat(s().button," ").concat(t.className||""),children:e}))};e.Z=l},12333:function(n,e,t){"use strict";t.d(e,{Z:function(){return s}});
1var r=t(85893),o=t(628),i=t(61045),u=t.n(i),c=function(n){var e=n.size,t=void 0===e?21:e;return(0,r.jsx)("svg",{width:t,height:t,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M20.0342 0.488239C19.7795 0.234745 19.3707 0.22158 19.1001 0.458151L10.4883 7.98464C10.2999 8.14933 10.0187 8.14933 9.83026 7.98464L1.36869 0.589379C1.09801 0.352808 0.689304 0.365973 0.434523 0.619467C0.179788 0.872961 0.166559 1.27972 0.404311 1.54909L7.84283 9.97745C8.00966 10.1665 8.00966 10.4501 7.84283 10.6392L0.438229 19.029C0.200523 19.2984 0.213753 19.7052 0.468487 19.9587C0.723222 20.2122 1.13197 20.2253 1.40266 19.9887L9.83026 12.6232C10.0187 12.4585 10.2999 12.4585 10.4883 12.6232L19.0661 20.12C19.3368 20.3565 19.7455 20.3434 20.0003 20.0899C20.255 19.8364 20.2682 19.4296 20.0305 19.1603L12.5101 10.6392C12.3433 10.4501 12.3433 10.1665 12.5101 9.97745L20.0644 1.41786C20.3022 1.14849 20.289 0.741733 20.0342 0.488239Z",fill:"#757575"})})},s=function(n){var e=n.children,t=n.isOpen,i=n.withCloseButton,s=n.onOutsideClick,l=n.width;return(0,r.jsx)(o.Z,{isOpen:t,onOutsideClick:s,children:(0,r.jsx)("div",{className:u().modal,style:{maxWidth:l},children:(0,r.jsxs)(r.Fragment,{children:[void 0!==i&&i&&(0,r.jsx)("div",{className:u().closeButton,onClick:s,children:(0,r.jsx)(c,{size:18})}),e]})})})}},19987:function(n,e,t){"use strict";var r=t(85893),o=t(72516),i=t(12333),u=t(21326),c=t.n(u),s=function(n){var e=n.children,t=n.isOpen,u=n.onOutsideClick,s=n.onCloseClick;return(0,r.jsx)(i.Z,{isOpen:t,onOutsideClick:u,children:(0,r.jsxs)("div",{className:c().content,children:[e,(0,r.jsx)("div",{className:c().buttonContainer,children:(0,r.jsx)(o.Z,{onClick:s,children:"Close"})})]})})};e.Z=s},628:function(n,e,t){"use strict";var r=t(85893),o=t(86704),i=t(67294),u=t(73935),c=t(67440),s=t.n(c),l=function(n){var e=n.isOpen,t=n.children,c=n.onOutsideClick,l=function(n){c&&n.target===d.current&&c()},a=(0,i.useRef)(null),d=(0,i.useRef)(null),f=(0,i.useState)(!1),_=f[0],h=f[1];return(0,i.useEffect)(function(){a.current=document.querySelector("#".concat(o.Jt)),h(!0)},[]),(0,i.useEffect)(function(){return e&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="unset"}},[e]),e&&a.current&&_?(0,u.createPortal)((0,r.jsx)("div",{ref:d,className:s().overlay,onClick:l,children:t}),a.current):null};e.Z=l},86704:function(n,e,t){"use strict";t.d(e,{Jt:function(){return r},qz:function(){return o}}),t(83454);var r="modalContainer",o=!1},49266:function(n,e,t){"use strict";t.r(e);var r=t(47568),o=t(828),i=t(20414),u=t(85893),c=t(52507),s=t(1918),l=t(11163),a=t(25238),d=t(67294),f=t(19987),_=function(n,e){var t=n.match(RegExp(e+"=([^&]*)"));return(null==t?void 0:t[1])?t[1].includes("#")?t[1].split("#")[0]:t[1]:""},h=function(){var n,e=(0,l.useRouter)(),t=(0,d.useState)(null),h=t[0],p=t[1],v=(0,d.useState)(""),g=v[0],w=v[1],C=e.asPath,m=_(C,"code"),k=_(C,"login"),b=_(C,"signup"),Z=new URLSearchParams(e.asPath).get("error_description");(0,d.useEffect)(function(){if(!k&&!b){e.push("/");return}if(m)y(m).catch();else if(Z){if(!Z.includes("Preventing creation of duplicate account")){w((0,s.E)(Z));return}var n=Z.split(" ").find(function(n){return n.toLowerCase().includes("google")||n.toLowerCase().includes("facebook")});if(n){var t=(0,o.Z)(n.split("_"),1)[0],r=(0,c.lZ)("google"===t.toLowerCase()?c.$d.GOOGLE:c.$d.FB,"email openid profile","".concat((0,a.uP)(),"/cb?login=true"));r&&(window.location.href=r)}}},[]),(0,d.useEffect)(function(){h&&((0,c.Ab)(h),e.push(k?"/":"welcome"))},[h]);var y=(0,d.useCallback)((n=(0,r.Z)(function(n){var e;return(0,i.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,c.rz)(n,k?"".concat((0,a.uP)(),"/cb?login=true"):"".concat((0,a.uP)(),"/cb?signup=true"))];case 1:return(e=t.sent())&&p(e),[2]}})}),function(e){return n.apply(this,arguments)}),[]),x=function(){w(""),e.push("/")};return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(f.Z,{isOpen:!!g,onOutsideClick:x,onCloseClick:x,children:(0,u.jsx)("span",{children:g})})})};e.default=h},25238:function(n,e,t){"use strict";t.d(e,{JW:function(){return p},ZP:function(){return w},uP:function(){return g},pK:function(){return _},ER:function(){return h}});
1var r,o,i=t(47568),u=t(20414),c=t(9669),s=t.n(c),l=t(19506),a=t(73884),d=(r=(0,i.Z)(function(){var n,e,t;return(0,u.__generator)(this,function(r){switch(r.label){case 0:return n=a.Z.getCurrentUser(),[4,(0,l.Z)()];case 1:if(e=r.sent(),!n||!e)return[2,!1];return t=e.getRefreshToken(),[2,new Promise(function(e){n.refreshSession(t,function(n){if(n){e(!1);return}e(!0)})})]}})}),function(){return r.apply(this,arguments)}),f=t(66429),_="https://search.ferraribeverlyhills.com",h="ZywjtHW0ZKmjCflhxkVz",p="https://strapi.ferraribeverlyhills.com/api",v=s().create();v.interceptors.request.use(function(n){return(0,l.Z)().then(function(e){var t,r=null!==(t=null==e?void 0:e.getIdToken().getJwtToken())&&void 0!==t?t:"";n.headers={Authorization:r?"Bearer ".concat(r):""}}),n}),v.interceptors.response.use(function(n){return n},(o=(0,i.Z)(function(n){var e,t,r,o;return(0,u.__generator)(this,function(o){switch(o.label){case 0:if(t=n.config,r=null,r=localStorage.getItem("remember"),(null===(e=n.response)||void 0===e?void 0:e.status)!==401)return[3,2];if(!r||t._retry)return[2,(0,f.Z)()];return t._retry=!0,[4,d()];case 1:if(o.sent())return[2,v(t)];o.label=2;case 2:throw n}})}),function(n){return o.apply(this,arguments)}));var g=function(){return window.location.origin?window.location.origin:""},w=v},74881:function(n){n.exports={button:"SkinlessButton_button__mdFHJ"}},61045:function(n){n.exports={modal:"CenteredModal_modal__Gj6I8",fadeIn:"CenteredModal_fadeIn__3byV_",closeButton:"CenteredModal_closeButton__h8t2A",growDown:"CenteredModal_growDown__DbAxW",sweep:"CenteredModal_sweep__rRBdH","slide-in-right":"CenteredModal_slide-in-right__tO1H8",slideInLeft:"CenteredModal_slideInLeft__axzvg",slideUp:"CenteredModal_slideUp__4eqQN"}},21326:function(n){n.exports={content:"MessageModal_content__Gsif6",buttonContainer:"MessageModal_buttonContainer__579XC"}},67440:function(n){n.exports={overlay:"ModalOverlay_overlay__J8isq",fadeIn:"ModalOverlay_fadeIn__kxPeG",growDown:"ModalOverlay_growDown__lGBXW",sweep:"ModalOverlay_sweep__mQQAT","slide-in-right":"ModalOverlay_slide-in-right__u6I87",slideInLeft:"Mod
1alOverlay_slideInLeft__pMro4",slideUp:"ModalOverlay_slideUp__jypjL"}},11163:function(n,e,t){n.exports=t(90387)},56249:function(){}},function(n){n.O(0,[9439,9774,2888,179],function(){return n(n.s=3958)}),_N_E=n.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.