1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1654,2330],{71654:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return Z}});var n=r(59499),s=r(50029),a=r(64687),o=r.n(a),i=r(67294),c=r(36808),l=r.n(c),m=r(76832),u=r(57646),_=r(72710),g=r(93967),d=r.n(g),p=r(30318),h=r(85893),k=r(17247),f=function(){var e=(0,i.useContext)(k.Z)||{},t=e.setText,r=e.setError,n=e.setShouldShow;return{showToast:function(e){r(""),t(e),n(!0)},showErrorToast:function(e){r(e),n(!0)}}},y=r(87383),v=r(4730),b=r(61245),x=["mutate"];function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,b.Z)("/api/v2/mobile_devices",null,j({keysToRevalidate:["/api/v2/session"]},e));return j({mutate:t.mutate},(0,v.Z)(t,x))},w=r(49111),O=r(72596),E=r(15649),T=r(56689),C=r(39118),N=r.n(C);r(29758);var Z=function(e){var t,r=e.fromThanksPage,a=e.fromAddressModal,c=(0,i.useContext)(O.Z)||{},g=c.smsMarketingOptIn,k=c.setSmsMarketingOptIn,v=c.setMarketingPhoneNumber,b=c.isSignedIn,x=c.userPhoneNumber,P=(0,i.useState)(x||""),j=P[0],C=P[1],Z=(0,i.useState)(!1),M=Z[0],A=Z[1],I=(0,y.Z)().data,U=(0,w.Z)().data,R=null!=U?U:{},F=R.user,D=R.visitor,G=f(),K=G.showToast,B=G.showErrorToast,H=r?T.ZP.Attentive.SMS_CAPTURED_THANKS_PAGE:T.ZP.Attentive.SMS_CAPTURED_CHECKOUT_PAGE,V=S({onCompleted:function(){K("Successfully subscribed!"),l().set(E.Z.SMS_MARKETING_OPTED_IN,r?M:g),(0,p.s0)(H),M&&(0,p.s0)(T.ZP.User.SMS_MARKETING_OPT_IN,{phone_number:j})},onError:function(e){B(e.message)}}),Y=V.mutate,z=V.isValidating,L=(t=(0,s.Z)(o().mark(function e(t){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,Y({e164Number:j,userId:(null==F?void 0:F.id)||(null==D?void 0:D.userId),marketingEnabled:M});case 3:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)});return(0,h.jsxs)("div",{className:d()(N()["sms-marketing"],(0,n.Z)({},N()["sms-marketing--no-padding"],r||!b||a)),children:[(b&&!a||r)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("h1",{className:N()["sms-marketing__header"],children:["Get Text Updates About Everlane"," ",!r&&(0,h.jsx)("span",{className:N()["sms-marketing__header--optional"],children:"(Optional)"})]}),(0,h.jsx)("p",{className:N()["sms-marketing__text"],children:"Sign up for text notifications to get early access on product launches, exclusive offers, and more."}),(0,h.jsx)(_.ZP,{country:"US",countries:["US","GB","CA"],className:N()["sms-marketing__phone-input"],defaultCountry:"US",placeholder:r?"Phone Number*":"Phone Number",value:x,addInternationalOption:!1,onChange:function(e){e&&!r?v(e):e&&C(e)}})]}),r&&(0,h.jsx)(u.Z,{className:N()["sms-marketing__button"],variant:"primary",width:"full",onClick:L,disabled:!(0,_.yf)(j)||z,children:z?"Submittingâ¦":"Sign Up For Texts"}),(0,h.jsx)(m.XZ,{name:"sms-marketing",label:"I'd also like to receive text notifications to get early access on product launches, exclusive offers, and more",checkMarkClassName:d()(N()["sms-marketing__checkmark"],(0,n.Z)({},N()["sms-marketing__checkmark--checked"],g||M)),labelClassName:N()["sms-marketing__label"],onClick:function(){r?A(!M):k(!g)},value:"".concat(g)}),(0,h.jsxs)("p",{className:N()["sms-marketing__terms-of-service"],children:["By checking this box, ",function(e){var t="https://www.everlane.com/privacy";switch(e){case"CA":return(0,h.jsxs)(h.Fragment,{children:["you agree to receive recurring automated promotional and personalized marketing text messages (e.g. cart reminders) from Everlane at the cell number used when signing up. Consent is not a condition of any purchase. Reply HELP for help. You can withdraw your consent at any time by texting STOP. Msg frequency varies. Std Msg & data rates may apply. View"," ",(0,h.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://attnl.tv/t/pLx",children:"Terms"})," ","&"," ",(0,h.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:t,children:"Privacy."}),"Contact Everlane at 2170 Folsom Street San Francisco, California 94110 + [email protected]."]});case"GB":return(0,h.jsxs)(h.Fragment,{children:["you agree to re
1ceive marketing text messages from Everlane UK. We may use information collected about you on our site to suggest other products and offers. You can unsubscribe at any time by replying STOP to our text. View"," ",(0,h.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://attnl.tv/t/80B",children:"Terms"})," ","&"," ",(0,h.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:t,children:"Privacy."})]});default:return(0,h.jsxs)(h.Fragment,{children:["you agree to receive recurring automated promotional and personalized marketing text messages (e.g. cart reminders) from Everlane at the cell number used when signing up. Consent is not a condition of any purchase. Reply HELP for help and STOP to cancel. Msg frequency varies. Msg & data rates may apply. View"," ",(0,h.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://attnl.tv/t/Pwi",children:"Terms"})," ","&"," ",(0,h.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://attnl.tv/p/Pwi",children:"Privacy."})]})}}(null==I?void 0:I.countryCode)]})]})}},39118:function(e){e.exports={"sms-marketing":"styles_sms-marketing__i_cWm","sms-marketing--no-padding":"styles_sms-marketing--no-padding__UmApl","sms-marketing__checkmark":"styles_sms-marketing__checkmark__Az44M","sms-marketing__checkmark--checked":"styles_sms-marketing__checkmark--checked__UR8r_","sms-marketing__header":"styles_sms-marketing__header__OB9F3","sms-marketing__header--optional":"styles_sms-marketing__header--optional__T02RC","sms-marketing__text":"styles_sms-marketing__text__lJQjF","sms-marketing__label":"styles_sms-marketing__label__o3H1K","sms-marketing__terms-of-service":"styles_sms-marketing__terms-of-service__rX0KI","sms-marketing__phone-input":"styles_sms-marketing__phone-input__er8Yj","sms-marketing__button":"styles_sms-marketing__button__IRRYl"}}}]); 2//# sourceMappingURL=1654.fc222fdf4978a0ef.js.map
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.