1"use strict";(self.webpackChunkus_profile_ui=self.webpackChunkus_profile_ui||[]).push([[9673],{"41Ri":(n,e,t)=>{t.d(e,{default:()=>cn});var i=t("ttNT"),o=t("gzvg"),r=t.n(o),a=t("V+06"),s=t("DTvD"),c=t("Vmuf"),l=t("LynG"),d=t("bE42"),u=t("CIqp"),h=t("uPPg"),p=t.n(h),x=t("fytf"),g=t("tUWk"),f=t("FO+u"),m=t("v3PM"),v=t("zr7H"),b=t.n(v);function w(){var n=(0,m.Z)(["\n min-width: 300px;\n margin: 0;\n padding: 40px;\n background: #fff;\n border-radius: 4px;\n height: auto;\n box-shadow: 0 10px 40px 0 rgb(0 0 0 / 6%);\n"]);return w=function(){return n},n}var j=b()(u.GridRow)(w()),y=function(n){var e=n.onOpen,t=n.imageUrl;return(0,a.jsxs)(j,{gutter:"18px",children:[(0,a.jsx)(u.GridRow,{gutter:"8px",children:(0,a.jsxs)(u.GridCol,{children:[(0,a.jsx)(u.Text,{as:"h3",children:"What is an Anti-Phishing Code?"}),(0,a.jsx)(u.Text,{children:"An Anti-Phishing Code is a code that helps to prevent phishing attempts from fake Binance.US websites or email addresses."})]})}),(0,a.jsx)(u.GridRow,{gutter:"8px",children:(0,a.jsxs)(u.GridCol,{children:[(0,a.jsx)(u.Text,{as:"h3",children:"How does it work?"}),(0,a.jsx)(u.Text,{children:"Once you've set your unique Anti-Phishing Code, it will be included in all genuine Binance.US emails."})]})}),(0,a.jsx)(u.Box,{width:"100%",height:"133px",children:(0,a.jsx)(u.Image,{src:t})}),(0,a.jsx)(u.GridRow,{children:(0,a.jsx)(u.GridCol,{children:(0,a.jsx)(u.Button,{sz:"l",marginTop:"11px",onClick:e,children:"Create Anti-Phishing Code"})})})]})};function C(){var n=(0,m.Z)(["\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 0 24px 40px;\n -webkit-overflow-scrolling: touch;\n\n @media (max-width: ","px) {\n padding-bottom: calc(","px + env(safe-area-inset-bottom, 0px));\n\n input {\n font-size: ","px;\n }\n }\n\n .code-header {\n color: ",";\n font-size: 14px;\n font-weight: normal;\n margin-bottom: 8px;\n }\n\n .old-code-header {\n margin-top: 24px;\n }\n\n .new-code-header {\n padding-top: 10px;\n }\n\n .old-code {\n background: ",";\n font-size: 18px;\n font-weight: bold;\n height: 40px;\n margin-bottom: 12px;\n padding-top: 10px;\n text-align: center;\n }\n"]);return C=function(){return n},n}function T(){var n=(0,m.Z)(["\n scroll-margin-bottom: calc(","px + env(safe-area-inset-bottom, 0px));\n"]);return T=function(){return n},n}function k(){var n=(0,m.Z)(["\n margin-top: 16px;\n width: 100%;\n"]);return k=function(){return n},n}var A=b().div(C(),767,96,16,(function(n){return n.theme.colors.t.secondary}),(function(n){return n.theme.colors.bg3})),P=b().div(T(),96),S=b()(u.Button)(k()),F=32,B="resize",N="scroll";function z(n){var e=n.bodyRef,t=n.actionRef,i=(0,s.useState)(),o=i[0],r=i[1],a=(0,s.useCallback)((function(){globalThis.requestAnimationFrame((function(){var n;null===(n=t.current)||void 0===n||n.scrollIntoView({behavior:"auto",block:"nearest"})}))}),[t]);return(0,s.useEffect)((function(){var n=globalThis.visualViewport,t=function(){var t,i,o=null!==(i=null===n||void 0===n?void 0:n.height)&&void 0!==i?i:globalThis.innerHeight;r(function(n){return Math.max(0,Math.floor(n-F))}(o)),(null===(t=e.current)||void 0===t?void 0:t.contains(globalThis.document.activeElement))&&a()};return t(),function(n,e,t){return e.addEventListener(B,t),null===n||void 0===n||n.addEventListener(B,t),null===n||void 0===n||n.addEventListener(N,t),function(){e.removeEventListener(B,t),null===n||void 0===n||n.removeEventListener(B,t),null===n||void 0===n||n.removeEventListener(N,t)}}(n,globalThis,t)}),[e,a]),{bodyStyle:void 0===o?{}:{maxHeight:"".concat(o,"px")},keepActionVisible:a}}function L(n){var e,t=n.title,i=n.currentCode,o=n.input,r=n.submitLabel,c=n.onClose,l=n.handleInput,d=n.onRequestTwoFa,h=(0,s.useRef)(null),p=(0,s.useRef)(null),g=z({bodyRef:h,actionRef:p}),f=g.bodyStyle,m=g.keepActionVisible,v=!(e=o)||e.length>20||e.length<4||!/^[A-Za-z0-9]+$/.test(e);return(0,a.jsx)(x.Modal,{visible:!0,title:t,closeFn:c,children:(0,a.jsxs)(A,{ref:h,style:f,onFocus:m,"data-testid":"anti-phishing-modal-body",children:[void 0!==i&&(0,a.jsxs)(u.Flex,{flexDirection:"column",children:[(0,a.jsx)(u.Text,{as:"h2",className:"code-header old-code-header",children:"Old Anti-Phishing Code"}),(0,a.jsx)(u.Box,{className:"old-code",children:i})]}),(0,a.jsxs)(u.Flex,{flexDirection:"column",paddingBottom:"10px",children:[(0,a.jsx)(u.Text,{as:"h2",className:"code-header new-code-header",children:void 0===i?"Anti-phishing Code":"New Anti-Phishing Code"}),(0,a.jsx)(x.TextField,{variant:"outlineLarge",value:o,onChange:function(n){return l(n.currentTarget.value)},error:v,errorText:"Please enter 4-20 non-special characters"})]}),(0,a.jsx)(P,{ref:p,"data-testid":"anti-phishing-modal-action",children:(0,a.jsx)(S,{sz:"l",disabled:v,onClick:d,children:r})})]})})}var R=function(n){var e=n.onClose,t=n.input,i=n.handleInput,o=n.onRequestTwoFa;return(0,a.jsx)(L,{title:"Create Anti-Phishing Code",input:t,submitLabel:"Submit",onClose:e,handleInput:i,onRequestTwoFa:o})};function G(){var n=(0,m.Z)(["\n width: 100%;\n"]);return G=function(){return n},n}function E(){var n=(0,m.Z)(["\n margin: 0;\n padding: 40px;\n background: #fff;\n border-radius: 4px;\n flex-direction: column;\n height: auto;\n box-shadow: 0 10px 40px 0 rgb(0 0 0 / 6%);\n\n .old-header {\n font-size: 14px;\n color: #848e9c;\n font-weight: normal;\n }\n\n .old-code {\n font-size: 18px;\n font-weight: bold;\n background: rgba(234, 236, 239, 0.3);\n margin-bottom: 12px;\n height: 40px;\n text-align: center;\n padding-top: 10px;\n }\n"]);return E=function(){return n},n}
1var O=b()(u.Button)(G()),Z=b()(u.GridRow)(E()),I=function(n){var e=n.code,t=n.onOpen;return(0,a.jsxs)(Z,{gutter:"32px",children:[(0,a.jsx)(u.GridRow,{gutter:"0",children:(0,a.jsxs)(u.GridCol,{children:[(0,a.jsx)(u.Box,{className:"title-border"}),(0,a.jsx)(u.GridRow,{gutter:"8px",children:(0,a.jsxs)(u.GridCol,{children:[(0,a.jsx)(u.Text,{as:"h2",className:"old-header",children:"Old Anti-Phishing Code"}),(0,a.jsx)(u.Box,{className:"old-code",children:e})]})})]})}),(0,a.jsx)(u.GridRow,{gutter:"0",children:(0,a.jsx)(u.GridCol,{children:(0,a.jsx)(O,{sz:"l",onClick:t,children:"Change Code"})})})]})},M=function(n){var e=n.code,t=n.input,i=n.onClose,o=n.handleInput,r=n.onRequestTwoFa;return(0,a.jsx)(L,{title:"Modify Anti-Phishing Code",currentCode:e,input:t,submitLabel:"Confirm Changes",onClose:i,handleInput:o,onRequestTwoFa:r})};function U(){var n=(0,m.Z)(["\n max-width: 450px;\n height: 433px;\n overflow: hidden;\n position: relative;\n margin: auto;\n\n .warning-box {\n margin: auto;\n margin-top: 24px;\n width: 90%;\n display: flex;\n flex-direction: row;\n background: rgba(242, 48, 81, 0.06);\n color: #f23051;\n padding: 12px 20px;\n margin-bottom: 40px;\n\n .warning-security-icon {\n padding-right: 16px;\n }\n }\n\n .info-container {\n width: 90%;\n margin: auto;\n .sub-title-one {\n font-size: 16px;\n margin-bottom: 8px;\n }\n\n .sub-title-two {\n font-size: 16px;\n padding-top: 10px;\n margin-bottom: 8px;\n }\n\n .description-one {\n font-size: 12px;\n margin-bottom: 12px;\n }\n\n .description-two {\n font-size: 12px;\n margin-bottom: 8px;\n }\n }\n"]);return U=function(){return n},n}var q=b().div(U()),D=function(n){var e=n.imageUrl;return(0,a.jsxs)(q,{children:[(0,a.jsxs)(u.Box,{className:"warning-box",children:[(0,a.jsx)(u.Box,{className:"warning-security-icon",children:(0,a.jsx)(p(),{name:"Security",className:"warning-icon",color:"#f23051"})}),(0,a.jsx)(u.Text,{as:"p",children:"Binance.US recommends you change your Anti-Phishing Code from time to time in order to improve your account security."})]}),(0,a.jsx)(u.Box,{className:"info-container",children:(0,a.jsxs)(u.Flex,{flexDirection:"column",children:[(0,a.jsxs)(u.Flex,{flexDirection:"column",children:[(0,a.jsx)(u.Text,{as:"h3",className:"sub-title-one",children:"What is an Anti-Phishing Code?"}),(0,a.jsx)(u.Text,{className:"description-one",fontSize:"20px",children:"An Anti-Phishing Code is a code that helps to prevent phishing attempts from fake Binance.US websites or email addresses."})]}),(0,a.jsxs)(u.Flex,{flexDirection:"column",children:[(0,a.jsx)(u.Text,{as:"h3",className:"sub-title-two",children:"How does it work?"}),(0,a.jsx)(u.Text,{className:"description-two",children:"Once you've set your unique Anti-Phishing Code, it will be included in all genuine Binance.US emails."}),(0,a.jsx)(u.Image,{src:e})]})]})})]})},V=120,H="anti-phishing-two-fa-modal",W="anti-phishing-two-fa-keyboard-open",_="--anti-phishing-two-fa-viewport-height",Q="--anti-phishing-two-fa-viewport-left",X="--anti-phishing-two-fa-viewport-top",Y="--anti-phishing-two-fa-viewport-width";function J(n){n.classList.remove(W),n.style.removeProperty(_),n.style.removeProperty(Q),n.style.removeProperty(X),n.style.removeProperty(Y)}function K(n){(0,s.useEffect)((function(){var e="twoFa"===n,t=globalThis.visualViewport,i=globalThis.document.documentElement;if(e&&t){var o,r=function(){void 0!==o&&globalThis.cancelAnimationFrame(o),o=globalThis.requestAnimationFrame((function(){var n=Math.max(globalThis.innerHeight,i.clientHeight);!function(n,e,t){var i=Math.max(0,t-e.height);n.style.setProperty(_,"".concat(e.height,"px")),n.style.setProperty(Q,"".concat(e.offsetLeft,"px")),n.style.setProperty(X,"".concat(e.offsetTop,"px")),n.style.setProperty(Y,"".concat(e.width,"px")),n.classList.toggle(W,i>=V)}(i,t,n)}))};return r(),globalThis.addEventListener("resize",r),t.addEventListener("resize",r),t.addEventListener("scroll",r),function(){void 0!==o&&globalThis.cancelAnimationFrame(o),globalThis.removeEventListener("resize",r),t.removeEventListener("resize",r),t.removeEventListener("scroll",r),J(i)}}J(i)}),[n])}function $(){var n=(0,m.Z)(["\n ."," .modal-contianer {\n box-sizing: border-box;\n height: ","px !important;\n max-height: calc(100vh - ","px) !important;\n overflow: hidden;\n }\n\n @supports (height: 100dvh) {\n ."," .modal-contianer {\n height: min(\n ","px,\n calc(100dvh - ","px)\n ) !important;\n max-height: calc(100dvh - ","px) !important;\n }\n }\n\n ."," .modal-body {\n height: 100% !important;\n overflow-y: auto;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n }\n\n html."," ."," {\n top: var(",", 0px) !important;\n right: auto !important;\n bottom: auto !important;\n left: var(",", 0px) !important;\n width: var(",", 100vw) !important;\n height: var(",", 100dvh) !important;\n }\n\n html."," ."," .modal-contianer {\n height: min(\n ","px,\n calc(var(",", 100dvh) - ","px)\n ) !important;\n max-height: calc(\n var(",", 100dvh) - ","px\n ) !important;\n }\n"]);return $=function(){return n},n}function nn(){var n=(0,m.Z)(["\n min-width: unset;\n "]);return nn=function(){return n},n}function en(){var n=(0,m.Z)(["\n width: 100%;\n padding: 68px 0;\n "]);return en=function(){return n},n}function tn(){var n=(0,m.Z)(["\n width: 100vw;\n padding: 0;\n "]);return tn=function(){return n},n}function on(){var n=(0,m.Z)(["\n .container {\n position: relative;\n display: flex;
1\n align-items: center;\n justify-content: center;\n min-width: 400px;\n\n ","\n\n .content {\n width: 500px;\n padding: 68px 30px;\n\n ","\n\n .title {\n margin-bottom: 35px;\n font-size: 34px;\n line-height: 50px;\n text-align: center;\n }\n\n .warning-text {\n display: flex;\n flex-direction: row;\n background: rgba(220, 169, 10, 0.06);\n color: rgb(220, 169, 10);\n padding: 12px 20px;\n margin-bottom: 40px;\n }\n\n .icon-bg {\n padding-right: 16px;\n }\n\n .warning-icon {\n color: rgb(220, 169, 10);\n }\n\n .tool-tip {\n display: flex;\n flex-direction: row;\n margin-top: 36px;\n background-color: transparent;\n height: 40px;\n justify-content: flex-end;\n\n .bn-tooltip-box {\n ","\n }\n }\n\n .icon-tip {\n // override hardcoded max-width on tool-tip\n > div {\n max-width: 450px;\n }\n }\n }\n }\n"]);return on=function(){return n},n}var rn=(0,v.createGlobalStyle)($(),H,520,32,H,520,32,32,H,W,H,X,Q,Y,_,W,H,520,_,32,_,32),an=b()(u.Box)(on(),(function(n){return n.theme.setBreakCss([(0,v.css)(nn())])}),(function(n){return n.theme.setBreakCss([(0,v.css)(en())])}),(function(n){return n.theme.setBreakCss([(0,v.css)(tn())])})),sn="https://static.binance.us/static/images/anti-phishing-code/code001.jpg";const cn=function(){var n=function(){F("code")},e=function(){F("closed")},t=function(){F("twoFa")},o=function(){F("code")},h=(0,c.f)(),m=h.antiCode,v=h.isAntiCodeCorrect,b=(0,l.useUserModel)().userInfo,w=b.mobileSecurity,j=b.gauth,C=b.mobileNo,T=(0,s.useState)(m),k=T[0],A=T[1],P=(0,s.useState)("closed"),S=P[0],F=P[1],B=(0,s.useState)(""),N=B[0],z=B[1],L=(0,s.useState)(!1),G=L[0],E=L[1],O=(0,s.useState)(!1),Z=O[0],U=O[1],q=(0,s.useState)(!1),V=q[0],W=q[1],_=!!k;K(S);var Q={locale:{title:"SMS",label:"Code",desc:"A SMS with a 6-digit code was sent to your phone number ".concat(C),voice:void 0,footer:void 0},onSendSms:g.X},X={locale:{title:"Secure your Account",risk:"Please enable a two-factor authentication (2FA) method to create an Anti-Phishing Code.",skip:"Cancel",confirm:"Go to Security Settings"},onSkip:o},Y={locale:{title:"Authenticator",icon:"computer",desc:"Input the 6-digit code in your Google Authenticator app",label:"Code",error:"You have entered an incorrect 2FA verification code.",loading:"Loading",footer:void 0}},J=function(){var n=(0,i.Z)(r().mark((function n(t){var i,a;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={operationType:null===t||void 0===t?void 0:t.type.toLowerCase(),verifyCode:null===t||void 0===t?void 0:t.code},n.prev=1,n.next=4,(0,f.gJ)({antiPhishingCode:N,authType:i.operationType,code:i.verifyCode});case 4:n.sent.success?(a=N.slice(0,2).concat("**"),A(a),e(),z(""),E(!0),U(!0)):(W(!0),U(!1),o()),n.next=12;break;case 8:n.prev=8,n.t0=n.catch(1),e(),z(""),E(!0),U(!1),d.kg.error(n.t0);case 12:case"end":return n.stop()}}),n,null,[[1,8]])})));return function(e){return n.apply(this,arguments)}}();return(0,s.useEffect)((function(){v||(0,f.SK)({}).then((function(n){var e=n.data;return A(e||"")})).catch((function(n){return d.kg.error("client fetch anti-code error",n.message)}))}),[v]),(0,a.jsxs)(an,{children:[(0,a.jsx)(rn,{}),(0,a.jsx)(u.Box,{className:"container",children:(0,a.jsxs)(u.Box,{className:"content",children:[(0,a.jsx)(u.Text,{as:"h2",className:"title",children:"Anti-Phishing Code"}),(0,a.jsxs)(u.Box,{className:"warning-text",children:[(0,a.jsx)(u.Box,{className:"icon-bg",children:(0,a.jsx)(p(),{name:"Security",className:"warning-icon",color:"#f0b90b"})}),(0,a.jsx)(u.Text,{as:"p",children:"Do not disclose Password, Google Authentication codes and SMS to anyone, including Binance.US support."})]}),_?(0,a.jsx)(I,{code:k,onOpen:n}):(0,a.jsx)(y,{onOpen:n,imageUrl:sn}),(0,a.jsxs)(u.Box,{className:"tool-tip",children:[(0,a.jsx)(u.Text,{mt:"3px",color:"#434036",children:"How Does It Work\xa0"}),(0,a.jsx)(x.Tooltip,{tip:(0,a.jsx)(D,{imageUrl:sn}),placement:"top-start",className:"icon-tip",children:(0,a.jsx)(p(),{name:"Question",color:"#f0b90b"})})]})]})}),"code"===S&&_&&(0,a.jsx)(M,{code:k,input:N,onClose:e,handleInput:z,onRequestTwoFa:t}),"code"===S&&!_&&(0,a.jsx)(R,{input:N,onClose:e,handleInput:z,onRequestTwoFa:t}),(0,a.jsx)(x.TwoFaModal,{className:H,visible:"twoFa"===S,mobile:w&&Q,google:j&&Y,enable:X,onOk:J,onCancel:function(){o()},autoFocus:!0}),G&&(0,a.jsx)(x.AlertV2,{topOfPage:!0,closable:!0,variant:Z?"success":"error",mb:"xs",onClose:function(){E(!1),U(!1)},children:Z?"Anti-Phishing Code successfully changed":"Anti-Phishing Code change failed"}),V&&(0,a.jsx)(x.AlertV2,{topOfPage:!0,closable:!0,variant:"error",mb:"xs",onClose:function(){W(!1),U(!1)},children:"You have entered an incorrect 2FA verification code."})]})}},tUWk:(n,e,t)=>{t.d(e,{X:()=>o});var i=t("0+Qk"),o=function(n){return(0,i.v_)("/gateway/profile/protect/v1/sett
1ing/user/send-mobile-verify-code",n)}},v3PM:(n,e,t)=>{function i(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}t.d(e,{Z:()=>i})}}]);
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.