1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3075],{46546:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-plan/location-transfer-confirm",function(){return t(46783)}])},68114:function(n,e,t){"use strict";t.d(e,{Z:function(){return components_ErrorModal}});var r=t(85893),o=t(36824),i=t(60369),c=t(82729),a=t(85444);function _templateObject(){var n=(0,c._)(["\n height: 100%;\n padding: 45px 15px 32px 15px;\n min-width: 280px;\n\n @media (",") {\n max-width: 480px;\n }\n"]);return _templateObject=function(){return n},n}function _templateObject1(){var n=(0,c._)(["\n font-style: normal;\n font-family: ",";\n font-weight: 400;\n font-size: 24px;\n line-height: 29px;\n text-align: center;\n color: ",";\n"]);return _templateObject1=function(){return n},n}function _templateObject2(){var n=(0,c._)(["\n margin-top: 8px;\n font-style: normal;\n font-weight: 900;\n font-size: 16px;\n line-height: 19px;\n text-align: center;\n color:",";\n text-transform: uppercase;\n"]);return _templateObject2=function(){return n},n}function _templateObject3(){var n=(0,c._)(["\n margin-top: 0;\n font-style: normal;\n font-family: ",";\n font-weight: 400;\n font-size: 32px;\n line-height: 44px;\n text-align: center;\n"]);return _templateObject3=function(){return n},n}function _templateObject4(){var n=(0,c._)(["\n margin-top: 8px;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n text-align: center;\n color:",";\n"]);return _templateObject4=function(){return n},n}function _templateObject5(){var n=(0,c._)(["\n text-align: center;\n"]);return _templateObject5=function(){return n},n}function _templateObject6(){var n=(0,c._)(["\n svg {\n width: 100px;\n height: 100px;\n }\n"]);return _templateObject6=function(){return n},n}function _templateObject7(){var n=(0,c._)(["\n margin-top: 8px;\n font-style: normal;\n font-weight: 400;\n line-height: 19px;\n color: ",";\n text-align: center;\n font-size: 18px;\n\n ul > li {\n margin-bottom: 10px;\n list-style: none;\n }\n\n li > ul > li {\n font-size: 14px;\n color: ",";\n margin-bottom: 5px;\n margin-left: 20px;\n }\n"]);return _templateObject7=function(){return n},n}var s=a.ZP.div.withConfig({displayName:"styles__Container",componentId:"sc-5e9228c-0"})(_templateObject(),function(n){return n.theme.sizes.medium}),l=a.ZP.h1.withConfig({displayName:"styles__Title",componentId:"sc-5e9228c-1"})(_templateObject1(),function(n){return n.theme.fonts.highlight},function(n){return n.theme.colors.text}),u=a.ZP.p.withConfig({displayName:"styles__Text",componentId:"sc-5e9228c-2"})(_templateObject2(),function(n){return n.theme.colors.gray}),p=a.ZP.p.withConfig({displayName:"styles__DefaultText",componentId:"sc-5e9228c-3"})(_templateObject3(),function(n){return n.theme.fonts.highlight}),f=a.ZP.p.withConfig({displayName:"styles__Description",componentId:"sc-5e9228c-4"})(_templateObject4(),function(n){return n.theme.colors.gray}),m=a.ZP.div.withConfig({displayName:"styles__Icon",componentId:"sc-5e9228c-5"})(_templateObject5()),d=a.ZP.div.withConfig({displayName:"styles__CustomErrorIcon",componentId:"sc-5e9228c-6"})(_templateObject6()),h=a.ZP.div.withConfig({displayName:"styles__ErrorsList",componentId:"sc-5e9228c-7"})(_templateObject7(),function(n){return n.theme.colors.red},function(n){return n.theme.colors.gray}),components_ErrorModal=function(n){var e,t=n.isShowing,c=n.title,_=n.text,g=n.description,v=n.onClose,x=n.CustomCloseIcon,j=n.CustomErrorIcon,b=n.errorsList,y=(0,i.mM)(),O=null==y?void 0:null===(e=y.state)||void 0===e?void 0:e.translate,w=(0,a.Fg)();return(0,r.jsx)(o.Z,{showing:t,onClose:v,CustomCloseIcon:x,closeIconColor:w.colors.text.includes("#fff")?"white":"black",children:(0,r.jsxs)(s,{children:[(0,r.jsx)(l,{children:c}),(0,r.jsx)(m,{children:j?(0,r.jsx)(d,{children:(0,r.jsx)(j,{})}):(0,r.jsx)("img",{src:"/icons/icon-error.svg"})}),(0,r.jsx)(u,{children:_}),(0,r.jsx)(p,{children:O["Ocorreu um problema!"]}),""!==g&&(0,r.jsx)(f,{children:g||"".concat(O["Devido a uma falha sist\xeamica n\xe3o foi possiv\xe9l concluir"]," ").concat(c,".\n ").concat(O["Por favor, tente novamente em alguns minutos"],".")}),(null==b?void 0:b.length)>0&&(0,r.jsx)(h,{children:b.map(function(n){var e;return(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:null==n?void 0:n.label}),(0,r.jsx)("li",{children:(0,r.jsx)("ul",{children:null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.map(function(n){return/translation missing/.test(n)?"":(0,r.jsx)("li",{children:"- ".concat(n)})})})})]})})})]})})}},58893:function(n,e,t){"use strict";var r=t(82729);
1function _templateObject(){var n=(0,r._)(["\n color: ",";\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n"]);return _templateObject=function(){return n},n}var o=t(85444).ZP.div.withConfig({displayName:"Text",componentId:"sc-f7aa00e2-0"})(_templateObject(),function(n){return n.theme.colors.text});e.Z=o},87854:function(n,e,t){"use strict";var r=t(82729);function _templateObject(){var n=(0,r._)(["\n font-family: ",";\n font-weight: 900;\n margin: 0 0 20px;\n font-size: 1.8em;\n color: ",";\n\n @media (",") {\n font-size: 2.6em;\n }\n"]);return _templateObject=function(){return n},n}var o=t(85444).ZP.h2.withConfig({displayName:"Title",componentId:"sc-8064d52-0"})(_templateObject(),function(n){return n.theme.fonts.highlight},function(n){return n.theme.colors.text},function(n){return n.theme.sizes.medium});e.Z=o},46783:function(n,e,t){"use strict";t.r(e),t.d(e,{__N_SSP:function(){return L},default:function(){return location_transfer_confirm}});var r=t(85893),o=t(67294),i=t(91546),c=t(87854),a=t(82729),s=t(85444),l=t(58893),u=t(75026),p=t(41664),f=t.n(p);function _templateObject(){var n=(0,a._)(["\n margin-top: 20px;\n display: flex;\n flex-direction: column-reverse;\n\n "," {\n margin-bottom: 20px;\n }\n\n @media (",") {\n flex-direction: row;\n justify-content: space-between;\n\n "," {\n padding-left: 50px;\n padding-right: 50px;\n }\n }\n"]);return _templateObject=function(){return n},n}function _templateObject1(){var n=(0,a._)(["\n list-style: none;\n margin-bottom: 4rem;\n\n @media (",") {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n }\n"]);return _templateObject1=function(){return n},n}function _templateObject2(){var n=(0,a._)(["\n &:not(:first-child) {\n margin-top: 20px;\n }\n\n & b + p {\n margin-top: 5px;\n }\n\n @media (",") {\n &:nth-child(1),\n &:nth-child(2) {\n margin-top: 0;\n }\n }\n"]);return _templateObject2=function(){return n},n}function _templateObject3(){var n=(0,a._)(["\n color: ",";\n font-style: normal;\n font-family: ",";\n font-weight: 900;\n font-size: 12px;\n line-height: 14px;\n text-transform: uppercase;\n"]);return _templateObject3=function(){return n},n}function _templateObject4(){var n=(0,a._)(["\n font-family: ",";\n font-size: 24px;\n"]);return _templateObject4=function(){return n},n}function _templateObject5(){var n=(0,a._)(["\n display:block;\n"]);return _templateObject5=function(){return n},n}var m=s.ZP.div.withConfig({displayName:"styles__Buttons",componentId:"sc-17de95fe-0"})(_templateObject(),u.Z,function(n){return n.theme.sizes.medium},u.Z),d=s.ZP.ul.withConfig({displayName:"styles__PlanInfoContainer",componentId:"sc-17de95fe-1"})(_templateObject1(),function(n){return n.theme.sizes.medium}),h=s.ZP.li.withConfig({displayName:"styles__PlanInfoItem",componentId:"sc-17de95fe-2"})(_templateObject2(),function(n){return n.theme.sizes.medium}),_=s.ZP.h4.withConfig({displayName:"styles__PlanInfoItemTitle",componentId:"sc-17de95fe-3"})(_templateObject3(),function(n){return n.theme.colors.gray},function(n){return n.theme.fonts.highlight}),g=(0,s.ZP)(l.Z).withConfig({displayName:"styles__TextStyled",componentId:"sc-17de95fe-4"})(_templateObject4(),function(n){return n.theme.fonts.highlight});(0,s.ZP)(f()).withConfig({displayName:"styles__LinkStyled",componentId:"sc-17de95fe-5"})(_templateObject5());var v=t(9008),x=t.n(v),j=t(11010),b=t(91309),y=t(97582),O=t(60369),w=t(37419),C=t(11163),P=t(11672),I=t(15904),T=t(7575),Z=t(1543),useLocationTransferConfirm=function(){var n,e,t,r,i,c,a,s,l,u=(0,C.useRouter)(),p=(0,O.mM)(),f=null==p?void 0:null===(e=p.state)||void 0===e?void 0:e.translate,m=(0,w.Z)(p),d=null==p?void 0:null===(r=p.state)||void 0===r?void 0:null===(t=r.user)||void 0===t?void 0:t.personal,h=d.single_access_token,_=d.country_locale,g=null==p?void 0:null===(s=p.state)||void 0===s?void 0:null===(a=s.user)||void 0===a?void 0:null===(c=a.purchase)||void 0===c?void 0:null===(i=c.plan)||void 0===i?void 0:i.id,v=(0,b._)((0,o.useState)(null),2),x=v[0],k=v[1],N=(0,b._)((0,o.useState)(null),2),L=N[0],z=N[1],E=(0,b._)((0,o.useState)({open:!1,message:null}),2),S=E[0],M=E[1],F="locationTransfer",A=p.gaMetrics,J=(n=(0,j._)(function(){var n,e,t;return(0,y.Jh)(this,function(r){switch(r.label){case 0:return e=JSON.parse(sessionStorage.getItem(F)),[4,(0,Z.n)({singleAccessToken:h,locale:_,location_id:e.location_id})];case 1:if(!(null==(t=r.sent())?void 0:null===(n=t.data)||void 0===n?void 0:n.success))return[3,3];return[4,m.updateUserData()];case 2:return r.sent(),sessionStorage.removeItem(F),u.push("/my-plan/location-transfer-success"),A.clickEvents.locationTransfer({success:!0}),[3,4];case 3:M({open:!0,message:f["N\xe3o foi poss\xedvel realizar a troca de unidades"]}),A.clickEvents.locationTransfer({success:!1}),r.label=4;case 4:return[2]}})}),function(){return n.apply(this,arguments)});return(0,o.useEffect)(function(){_&&k((0,T.OH)(parseFloat(null==p?void 0:null===(t=p.state)||void 0===t?void 0:null===(e=t.user)||void 0===e?void 0:null===(n=e.purchase)||void 0===n?void 0:n.membership_price),_));var n,e,t,r,o=JSON.parse(sessionStorage.getItem(F));null!==o?(r=(0,j._)(function(){var n,e;return(0,y.Jh)(this,function(t){switch(t.label){case 0:return[4,(0,P.z)({id:o.location_id})];case 1:n=t.sent();try{e=(0,I.M)(g,null==n?void 0:n.data),null!=e&&z((0,T.OH)(e,_))}catch(n){console.error(n)}return[2]}})}),function(){return r.apply(this,arguments)})():u.push("/my-plan/location-transfer")},[null==p?void 0:null===(l=p.state)||void 0===l?void 0:l.user]),{t:f,confirmTransfer:J,currentPrice:x,newPrice:L,goBack:function(){u.push("/my-plan/location-transfer")},openErrorModal:S,setOpenErrorModal:M}},k=t(68114),LocationTransferConfirm=function(){var n=useLocationTransferConfirm(),e=n.t,t=n.confirmTransfer,o=n.currentPrice,i=n.newPrice,a=n.goBack,s=n.setOpenErrorModal,l=n.openErrorModal;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x(),{children:(0,r.jsxs)("title",{children:[e["Smart Fit"]," - ",e["Espa\xe7o do Cliente"]," -"," ",e["Transferir unidade"]]})}),(0,r.jsx)(c.Z,{children:e["Transferir Unidade"]}),(0,r.jsxs)(d,{children:[(0,r.jsxs)(h,{children:[(0,r.jsx)(_,{children:e["Pre\xe7o atual"]}),(0,r.jsx)(g,{children:o})]}),(0,r.jsxs)(h,{children:[(0,r.jsx)(_,{children:e["Novo pre\xe7o"]}),(0,r.jsx)(g,{children:i})]})]}),(0,r.jsxs)(m,{children:[(0,r.jsx)(u.Z,{type:"button",variant:"tertiary",onClick:function(){a()},children:e.Voltar}),(0,r.jsx)(u.Z,{variant:"primary",type:"button",onClick:function(){return t()},children:e.Confirmar})]}),(0,r.jsx)(function(){return l.open?(0,r.jsx)(k.Z,{isShowing:!0,title:"",text:"",description:l.message,onClose:function(){return s({open:!1,message:null})}}):(0,r.jsx)(r.Fragment,{})},{})]})},N=t(14376),L=!0,location_transfer_confirm=function(){var n=(0,o.useRef)(null);return(0,r.jsx)(i.Z,{footerRef:n,children:(0,r.jsx)(N.default,{children:(0,r.jsx)(LocationTransferConfirm,{})})})}},11672:function(n,e,t){"use strict";t.d(e,{o:function(){return getCheckoutLocationPlans},z:function(){return getLocationPrices}});var r=t(11010),o=t(97582),i=t(48303);function getLocationPrices(n){return _getLocationPrices.apply(this,arguments)}function _getLocationPrices(){return(_getLocationPrices=(0,r._)(function(n){var e;return(0,o.Jh)(this,function(t){switch(t.label){case 0:e=n.id,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,(0,i.U2)("/api/v1/location-prices/".concat(e),{})];case 2:return[2,t.sent()];case 3:return console.error("An unexpected error happened:",t.sent()),[2];case 4:return[2]}})})).apply(this,arguments)}function getCheckoutLocationPlans(n){return _getCheckoutLocationPlans.apply(this,arguments)}function _getCheckoutLocationPlans(){return(_getCheckoutLocationPlans=(0,r._)(function(n){var e,t;return(0,o.Jh)(this,function(r){switch(r.label){case 0:e=n.id,t=n.code,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,i.U2)("/api/v1/checkout-location-prices/".concat(e),{params:{code:t}}).then(function(n){return null==n?void 0:n.data}).catch(function(n){var e;return null==n?void 0:null===(e=n.response)||void 0===e?void 0:e.data})];case 2:return[2,r.sent()];case 3:return console.error("An unexpected error happened:",r.sent()),[2];case 4:return[2]}})})).apply(this,arguments)}},1543:function(n,e,t){"use strict";t.d(e,{n:function(){return putLocationTransfer}});var r=t(11010),o=t(47702),i=t(97582),c=t(48303);function putLocationTransfer(n){return _putLocationTransfer.apply(this,arguments)}function _putLocationTransfer(){return(_putLocationTransfer=(0,r._)(function(n){var e,t,r;return(0,i.Jh)(this,function(i){switch(i.label){case 0:e=n.singleAccessToken,t=(0,o._)(n,["singleAccessToken"]),i.label=1;case 1:return i.trys.push([1,3,,4]),r={transfer:{to_location_id:t.location_id,kind:"smart_cs"},locale:t.locale,singleAccessToken:e},[4,(0,c.gz)("/api/v1/user/".concat(e,"/location-transfer"),{body:r}).then(function(n){return n}).catch(function(n){return n.response.data})];case 2:return[2,i.sent()];case 3:return console.error("An unexpected error happened:",i.sent()),[2];case 4:return[2]}})})).apply(this,arguments)}},15904:function(n,e,t){"use strict";t.d(e,{M:function(){return getPlanPriceFromLocationData}});var r={1:"smart_membership",2:"black_membership",136:"black_sin_permanencia_membership",150:"fit_membership"};function getPlanPriceFromLocationData(n,e){var t,o,i=r[String(n)];return i&&e&&parseFloat(null!==(o=null===(t=e[i])||void 0===t?void 0:t.price)&&void 0!==o?o:"")||null}},9008:function(n,e,t){n.exports=t(79201)}},function(n){n.O(0,[5445,9402,1546,3926,4376,9774,2888,179],function(){return n(n.s=46546)}),_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.