PageSourceSearch

https://changelly.com/web-assets/_next/static/chunks/4869-3b3bbc448510951f.js

js changelly.com collected 2026-09-24 08:47:37 UTC 138,765 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="95440ebf-22c7-4077-9480-e10f74f0a73a",e._sentryDebugIdIdentifier="sentry-dbid-95440ebf-22c7-4077-9480-e10f74f0a73a")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4869],{633:function(e,t,r){"use strict";var n,a=r(58872);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}t.Z=function(e){return a.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),n||(n=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 12c0 6.1 4.9 11 11 11s11-4.9 11-11S18.1 1 12 1 1 5.9 1 12m20 0c0 5-4 9-9 9s-9-4-9-9 4-9 9-9 9 4 9 9m-10 4c-.3 0-.5-.1-.7-.3l-3-3c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.2 2.2 4.3-5.2c.4-.4 1-.5 1.4-.1s.5 1 .1 1.4l-5 6c-.1.3-.4.4-.7.4",clipRule:"evenodd"})))}},40173:function(e,t,r){"use strict";var n,a=r(58872);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}t.Z=function(e){return a.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),n||(n=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M18.207 15.207a1 1 0 0 1-1.414 0L12 10.414l-4.793 4.793a1 1 0 0 1-1.414-1.414l5.5-5.5a1 1 0 0 1 1.414 0l5.5 5.5a1 1 0 0 1 0 1.414",clipRule:"evenodd"})))}},91732:function(e,t,r){"use strict";var n,a=r(58872);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}t.Z=function(e){return a.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),n||(n=a.createElement("path",{fill:"currentColor",d:"M12 23C5.9 23 1 18.1 1 12S5.9 1 12 1s11 4.9 11 11-4.9 11-11 11m0-20c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9m4.9 11.4c.2-.5 0-1.1-.4-1.3L13 11.4V6c0-.6-.4-1-1-1s-1 .4-1 1v6q0 .6.6.9l4 2c.1.1.2.1.4.1q.6 0 .9-.6"})))}},8380:function(e,t,r){"use strict";var n,a=r(58872);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}t.Z=function(e){return a.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),n||(n=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 23C5.9 23 1 18.1 1 12S5.9 1 12 1s11 4.9 11 11-4.9 11-11 11m0-2c5 0 9-4 9-9s-4-9-9-9-9 4-9 9 4 9 9 9m-3.387-4.277L12 13.336l3.387 3.387a.945.945 0 1 0 1.336-1.336L13.336 12l3.387-3.387a.945.945 0 0 0-1.336-1.336L12 10.664 8.613 7.277a.945.945 0 1 0-1.336 1.336L10.664 12l-3.387 3.387a.945.945 0 1 0 1.336 1.336",clipRule:"evenodd"})))}},10186:function(e,t,r){"use strict";var n,a=r(58872);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}t.Z=function(e){return a.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n||(n=a.createElement("path",{fill:"currentColor",d:"M12 6.733h-.467v-1.6c0-.933-.333-1.8-1-2.466-.666-.667-1.533-1-2.466-1S6.2 2 5.533 2.667c-.666.666-1 1.533-1 2.466v1.6H4c-1 0-1.8.8-1.8 1.8v4c0 1 .8 1.8 1.8 1.8h8c1 0 1.8-.8 1.8-1.8v-4c0-.933-.8-1.8-1.8-1.8m-6.2-1.6c0-.6.2-1.133.667-1.533.8-.8 2.266-.8 3.066 0 .4.4.667 1 .667 1.533v1.6H5.8zm6.667 7.467c0 .267-.2.466-.467.466H4a.456.456 0 0 1-.467-.466v-4c0-.267.2-.467.467-.467h8c.267 0 .467.2.467.467z"})))}},74718:function(e,t,r){"use strict";r.d(t,{U:function(){return u}});var n=r(18103),a=r(26066);let i=()=>(a.Z.get("_ga")||"").replace(/^GA([0-9]+)\.([0-9]+)\./,""),s=e=>{if("undefined"!=typeof document){let t=document.location.hostname,r=t.match(/\./);a.Z.set("_ga","GA1.1.".concat(e),{expires:365,domain:"".concat(r?".":"").concat(t)})}},o=()=>"".concat(Date.now(),".").concat(Math.random().toString().split(".")[1]),l=function(){let{autoCreate:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let{ga:e}=window;return e.getAll()[0].get("clientId")}catch(n){if(!e)return"";let t=i();if(t)return t;let r=o();return s(r),r}};var c=r(43392);let u=()=>{let e=l(),t=c.K.get()||"",r=c.K.getAffiseParams(),a=(0,n.Zw)()||"",i={isSsr:!0,
1clientId:"",refId:t,affiseData:r,deviceId:a,deviceInfo:{userAgent:"ssr",language:"ssr",languages:["ssr"],platform:"ssr",screenSize:{width:0,height:0}}};{let{navigator:n,innerWidth:s,innerHeight:o}=window,{userAgent:l,language:c,platform:u}=n;i={isSsr:!1,clientId:e,refId:t,affiseData:r,deviceId:a,deviceInfo:{userAgent:l,language:c,languages:n.languages,platform:u,screenSize:{width:s,height:o}}}}return i}},37398:function(e,t,r){"use strict";r.d(t,{AuthGate:function(){return u}});var n=r(27573),a=r(7653),i=r(4455),s=r(32289),o=r(88002);let l=["/beta/auth"],c=["/beta/auth-modal"],u=e=>{let{children:t}=e,r=(0,o.qL)(),u=(0,s.t)(),d=(0,s.j)(),m=!!r.data,f=r.error,p=(null==f?void 0:f.data.code)!=="UNAUTHORIZED"&&!!f,h=(0,a.useCallback)(e=>u.replace(e),[u]);return(0,n.jsx)(i.nm,{loading:r.isLoading,error:p,isAuthed:m,loader:(0,n.jsx)("div",{children:"Loading..."}),pathname:d,guestOnlyRoutes:l,publicRoutes:c,onGuestRedirect:h,onAuthenticatedRedirect:h,loginRoute:"/beta/auth",authenticatedFallbackRoute:"/",errorFallback:(0,n.jsx)("div",{children:"Error occurred"}),children:t})}},79117:function(e,t,r){"use strict";r.d(t,{useCaptcha:function(){return l}});var n=r(39089),a=r(37289),i=r(99163);let s=(0,i.Xw)(e=>({event:i.gC,event_name:"processing_show_captcha",type:e}));var o=r(76997);let l=e=>{let{name:t,skip:r,type:i}=e,{theme:l}=(0,n.F)();return(0,a.Z1)({skip:r,actionName:t,siteKey:o.B,preloadScript:!0,checkbox:{siteKey:o.g,onShow:()=>s(i),theme:"night"===l?"dark":"light"}})}},76997:function(e,t,r){"use strict";r.d(t,{B:function(){return a},g:function(){return n}});let n="6LdewY8sAAAAAICK7x8dK8BGFJwXD3MHc2imxUvp",a="6Lcva44sAAAAAF4sBIYRijqqxnLtzRzyvxwct7iJ"},94918:function(e,t,r){"use strict";r.d(t,{$:function(){return o}});var n=r(41170),a=r(50236);let i=e=>403===e.status&&"Failed to validate captcha"===e.message,s=e=>400===e.status&&(0,a.K)(e.errors)&&("x-recaptcha-response"in e.errors||"x-recaptcha-version"in e.errors),o=e=>(0,n.k0)(e)&&(i(e)||s(e))},53219:function(e,t,r){"use strict";r.d(t,{InitWidget:function(){return o}});var n=r(7653),a=r(81695),i=r(4901),s=r(99663);let o=()=>{let e=(0,a.useParams)(),t=(0,a.useSearchParams)(),r=(0,i.TL)();return(0,n.useEffect)(()=>{let n=null==e?void 0:e.id,a=null==t?void 0:t.get("signature");n&&"string"==typeof n&&r((0,s.S)({widgetId:n,appType:"widget",signature:a}))},[r,e,t]),null}},40910:function(e,t,r){"use strict";r.d(t,{BuyDeposit:function(){return G}});var n=r(27573),a=r(7653),i=r(81695),s=r(20975),o=r(67403),l=r(79117),c=r(52034),u=r(54870),d=r(84451),m=r(39158),f=r(92486),p=r(33861),h=r(4901),v=r(52850),g=r(61405),x=r(46432),b=r(40168);let y=b.W.F2C,w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,f.j)(e)&&"0"!==e?(0,p.$U)(e):"0"},_=()=>{let e=(0,h.TL)(),[t,r]=(0,a.useState)(null),n=(0,a.useMemo)(()=>{let{fromAmountValue:e,toCurrencyTicker:t,fromCurrencyTicker:r}=(0,x.t)();return{fromAmountValue:w(e),fromCurrencyTicker:r,toCurrencyTicker:t}},[]),[i,{error:s}]=(0,v.Sy)(),{currentData:o}=(0,v.dq)({flow:y});return(0,a.useEffect)(()=>{o&&(async()=>{let{fromCurrencyId:t,toCurrencyId:r,fromAmountValue:a}=await i({flow:y,to:n.toCurrencyTicker,version:"v2"}).unwrap(),s=o.currenciesMap[n.fromCurrencyTicker]||o.currenciesMap[t||""]||o.currenciesMap[o.fromIds.at(0)||""],l=o.currenciesMap[r||""];if(!l)throw Error("Could not find toCurrency info");e((0,g.T1)({flow:y,type:"from",value:n.fromAmountValue||a})),e((0,g.NW)({flow:y,type:"from",currency:s})),e((0,g.NW)({flow:y,type:"to",currency:l}))})().catch(e=>{r(e),console.error(e)})},[e,i,n,o,r]),{error:t||s}};var C=r(71513),j=r(75640),k=r(24981),N=r(40607),T=r(86113),A=r(48905),I=r(33580),E=r(36373),F=r(71264),S=r(399),W=r(50236),P=r(94918);let M=e=>(0,W.K)(e)&&"status"in e&&400===e.status&&"errors"in e&&(0,W.K)(e.errors);function R(e){return(0,W.K)(e)&&"message"in e&&"string"==typeof e.message}let O=e=>{let t=null,r=!1;return(M(e)?(t=Object.entries(e.errors).join("\n"),r=!0):(0,P.$)(e)?(t=null,r=!1):R(e)&&(t=e.message),t)?{message:t,isFatalError:r}:null};var Z=r(59578),L=r(95962),U=r(51495);let D=e=>{let{currencyTicker:t}=e,[r,{isFetching:n}]=(0,Z.NR)(),i=U.E[b.W.F2C],{status:s,extraId:o,address:l}=(0,h.CG)(e=>e.walletAddress[i]);
1return(0,L.useSavePartnerAddressSearchParams)({fieldId:i}),(0,a.useEffect)(()=>{t&&l&&r({fieldId:i,address:l,extraId:o||"",currency:t})},[t,o,i,r,l]),{invalidAddress:"address-invalid"===s,invalidExtraId:"extra-id-invalid"===s,validateAddressPending:n}},H=()=>{let{header:e}=(0,N.useFiatStepsConfig)(),t=(0,s.bU)(),{CheckboxCaptcha:r,...a}=(0,l.useCaptcha)({name:"create_f2c_transaction_widget_captcha",skip:!1,type:"widget"}),{createFiatTransaction:i,handleBuyFlow:c,createTransactionError:f}=(0,T.l)({isAnonymous:!0,...a}),{isAmountEditable:p}=(0,A.J)(),{flow:h}=(0,j.useFiatProcessingFlow)(),{pending:v,setup:g}=(0,m.Z)(h),{error:x}=_(),{invalidAddress:b,invalidExtraId:y,validateAddressPending:w}=D({currencyTicker:null==g?void 0:g.to.ticker});(0,I.q)();let F=O(f);if(x||b||y||F){let e="",t=!1;return R(x)&&(e=x.message),b&&(e='Wallet address is invalid, check "address" and "to" params.'),y&&(e="Extra ID is invalid"),F&&(e=F.message,t=!F.isFatalError),(0,n.jsx)(d.WidgetError,{message:e,hasReload:t})}return v||w?(0,n.jsx)(k.Z,{}):(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-4",children:[(0,n.jsx)(C.default,{header:e}),(0,n.jsxs)(o.S,{tags:{scope:"deposit-widget-f2c"},children:[(0,n.jsx)(E.Z,{...g,toIsDisable:!0,readonlyFromInput:!p,onNextStep:()=>i({handleResponse:c,urlSearchParams:{lang:t}})}),(0,n.jsx)(u.jl,{}),(0,n.jsx)(r,{})]})]})},G=e=>{let{config:t}=e,r=(0,i.useSearchParams)(),a=null==r?void 0:r.get("transaction_id");return(0,n.jsx)(F.WidgetContextConfigProvider,{config:(0,S.R)(t),children:(0,n.jsx)(j.FiatProcessingFlowProvider,{flow:b.W.F2C,children:a?(0,n.jsx)(c.default,{id:a}):(0,n.jsx)(H,{})})})}},52034:function(e,t,r){"use strict";r.r(t);var n=r(27573),a=r(7653),i=r(41170),s=r(67403),o=r(84451),l=r(18625),c=r(85150),u=r(11080),d=r(86873),m=r(12215),f=r(71513),p=r(75640),h=r(33515),v=r(40168),g=r(40607),x=r(64134),b=r(24981);let y=[400,404],w=e=>{let{id:t}=e,{data:r,error:p,isLoading:w,isFetching:_}=(0,u.k)(t,v.W.F2C),{header:C}=(0,g.useFiatStepsConfig)(),{type:j}=(0,h.useWidgetConfig)("features"),{setCurrentStep:k}=(0,m.useStepper)(),N=null!=r&&!!r.status&&d.uh.includes(null==r?void 0:r.status);if((0,a.useEffect)(()=>{k("make-payment")},[k]),(0,i.k0)(p)){let e=y.includes(p.status);if("deposit"===j)return(0,n.jsx)(o.WidgetError,{message:e?"Transaction not found.":"An unexpected error occurred."});let t=e?l.NotFoundError:c.UnexpectedError;return(0,n.jsx)(t,{flow:v.W.F2C,className:"flex-1 flex flex-col justify-between !mb-0"})}return w||!r?(0,n.jsx)("div",{className:"relative h-full flex-grow",children:(0,n.jsx)(b.Z,{})}):(0,n.jsxs)(n.Fragment,{children:[N?(0,n.jsx)(f.default,{hasBack:!1,header:C}):null,(0,n.jsx)(s.S,{tags:{scope:"new-processing-f2c"},children:(0,n.jsx)(x.G,{isFetching:_,transaction:r})})]})};t.default=e=>{let{id:t}=e;return(0,n.jsx)(p.FiatProcessingFlowProvider,{flow:v.W.F2C,children:(0,n.jsx)(w,{id:t})})}},60281:function(e,t,r){"use strict";r.r(t),r.d(t,{BuyResolver:function(){return u}});var n=r(27573),a=r(64070),i=r(81695),s=r(24981),o=r(97410);let l=(0,a.default)(()=>Promise.all([r.e(8861),r.e(4818),r.e(6844)]).then(r.bind(r,76844)),{loadableGenerated:{webpack:()=>[76844]},ssr:!1,loading:()=>(0,n.jsx)(s.Z,{})}),c=(0,a.default)(()=>Promise.resolve().then(r.bind(r,52034)),{loadableGenerated:{webpack:()=>[52034]},ssr:!1,loading:()=>(0,n.jsx)(s.Z,{})}),u=()=>{let{resolveRender:e}=(0,o.s)(),t=(0,i.useSearchParams)(),r=null==t?void 0:t.get("transaction_id");return e?(0,n.jsx)(n.Fragment,{children:r?(0,n.jsx)(c,{id:r}):(0,n.jsx)(l,{})}):(0,n.jsx)(s.Z,{})}},58654:function(e,t,r){"use strict";r.d(t,{ExchangeResolver:function(){return p}});var n=r(27573),a=r(7653),i=r(64070),s=r(81695),o=r(70089),l=r(24981),c=r(48381),u=r(97410),d=r(40168);let m=(0,i.default)(()=>Promise.all([r.e(239),r.e(8861),r.e(7359)]).then(r.bind(r,7359)),{loadableGenerated:{webpack:()=>[7359]},ssr:!1,loading:()=>(0,n.jsx)(l.Z,{flow:d.W.C2C})}),f=(0,i.default)(()=>Promise.all([r.e(3219),r.e(8131)]).then(r.bind(r,86247)),{loadableGenerated:{webpack:()=>[86247]},ssr:!1,loading:()=>(0,n.jsx)(c.Z,{})}),p=()=>{var e;let{resolveRender:t}
1=(0,u.s)(),r=(null===(e=(0,s.useSearchParams)())||void 0===e?void 0:e.get("transaction_id"))||"";return((0,a.useEffect)(()=>(r&&(0,o.YA)("c2cTransactionID",r),()=>(0,o.YA)("c2cTransactionID",void 0)),[r]),r)?t?(0,n.jsx)(f,{id:r}):(0,n.jsx)(c.Z,{}):t?(0,n.jsx)(m,{}):(0,n.jsx)(l.Z,{flow:d.W.C2C})}},79926:function(e,t,r){"use strict";r.r(t),r.d(t,{SellResolver:function(){return u}});var n=r(27573),a=r(64070),i=r(81695),s=r(24981),o=r(97410);let l=(0,a.default)(()=>r.e(3159).then(r.bind(r,13159)),{loadableGenerated:{webpack:()=>[13159]},ssr:!1,loading:()=>(0,n.jsx)(s.Z,{})}),c=(0,a.default)(()=>Promise.all([r.e(8861),r.e(4818),r.e(2849)]).then(r.bind(r,52849)),{loadableGenerated:{webpack:()=>[52849]},ssr:!1,loading:()=>(0,n.jsx)(s.Z,{})}),u=()=>{var e;let{resolveRender:t}=(0,o.s)(),r=(null===(e=(0,i.useSearchParams)())||void 0===e?void 0:e.get("transaction_id"))||"";return t?r?(0,n.jsx)(l,{id:r}):(0,n.jsx)(c,{}):(0,n.jsx)(s.Z,{})}},54870:function(e,t,r){"use strict";r.d(t,{dg:function(){return u},jl:function(){return d}});var n=r(27573),a=r(7653),i=r(20975),s=r(33515),o=r(35320);let l=e=>{let{href:t,dataTnav:r,children:a}=e;return t?(0,n.jsx)(o.r,{className:"border-b border-b-content-link font-semi-bold text-content-link whitespace-nowrap",href:t,target:"_blank",rel:"noreferrer","data-tnav":r,children:a}):a},c=()=>{let{termsOfUseUrl:e,amlKycUrl:t,privacyPolicyUrl:r}=(0,s.useWidgetConfig)("urls");return(0,a.useMemo)(()=>({termsLink:t=>(0,n.jsx)(l,{href:e,dataTnav:"tou-link",children:t}),privacyLink:e=>(0,n.jsx)(l,{href:r,dataTnav:"pp-link",children:e}),kycAmlLink:e=>(0,n.jsx)(l,{href:t,dataTnav:"kyc-link",children:e})}),[e,t,r])},u=()=>{let e=(0,i.T_)("processing"),t=c();return(0,n.jsx)("p",{className:"text-p2","data-tnav":"terms-of-use-info",children:e.rich("agreement",t)})},d=()=>{let e=(0,i.T_)("processing"),t=c();return(0,n.jsx)("div",{className:"h-full flex items-center justify-center",children:(0,n.jsx)("p",{className:"caption-xs text-content-secondary text-center","data-tnav":"terms-of-use-text",children:e.rich("agreement-under-button",t)})})}},95552:function(e,t,r){"use strict";r.d(t,{e:function(){return i}});var n=r(74718),a=r(22155);let i=a.a.injectEndpoints({endpoints:e=>({exchangeTransaction:e.query({query:e=>({url:(0,a.J)("/v2/c2c/transactions/".concat(e),"bff"),method:"GET"}),transformErrorResponse:e=>null==e?void 0:e.data}),createTransaction:e.query({query:e=>{let{rateType:t,recaptchaVersion:r,recaptchaResponse:i,...s}=e,{clientId:o,...l}=(0,n.U)(),c={...s,metadata:l,user:{clientId:o},applyBonusPoints:"applyBonusPoints"in s?s.applyBonusPoints:void 0};return{url:(0,a.J)("/v1/c2c/".concat(t,"/create-transaction"),"bff"),body:c,method:"POST",headers:{...r&&i?{"x-recaptcha-version":r,"x-recaptcha-response":i}:{}}}},transformResponse:(e,t)=>{var r;let n=(null===(r=t.response)||void 0===r?void 0:r.headers.get("x-set-access-token"))||void 0;return{...e,aid:n}},transformErrorResponse:e=>null==e?void 0:e.data})})})},59217:function(e,t,r){"use strict";r.d(t,{useTransaction:function(){return o}});var n=r(7653),a=r(59081),i=r(95552);let s=[...a.hY,...a.Ns],o=function(e){let{polling:t,skip:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[a,o]=(0,n.useState)(0),l=r||!e,{data:c,isFetching:u,isError:d,error:m,isLoading:f,refetch:p,status:h}=i.e.useExchangeTransactionQuery(e,{skip:l,refetchOnFocus:!0});return(0,n.useEffect)(()=>{let e;return!l&&a>0&&(e=setInterval(()=>{try{"hidden"===document.visibilityState||document.hidden||p()}catch(e){}},a)),()=>clearInterval(e)},[l,p,a]),(0,n.useEffect)(()=>{t&&(null==c?void 0:c.status)&&s.includes(c.status)?o(1e4):o(0)},[null==c?void 0:c.status,t]),{transaction:c,isLoading:f,isFetching:u,isError:d,error:m,status:h}}},59081:function(e,t,r){"use strict";var n,a,i,s;r.d(t,{LN:function(){return n},N0:function(){return c},Ns:function(){return l},Pj:function(){return f},Q0:function(){return m},ew:function(){return a},hY:function(){return o},lc:function(){return p},px:function(){return u},rF:function(){return d}}),(i=n||(n={})).Waiting="waiting",i.Confirming="confirming",i.Exchanging="exchanging",i.Sending="sending",i.Finished="finished",i.Failed="failed",i.Refunded="refunded",i.Hold="hold",i.Overdue="overdue",i.Expired="expired";let o=["waiting"],l=["confirming","exchanging","sending"],c=["finished","refunded"],u=["overdue","expired","failed"],d=e=>e&&l.includes(e),m=e=>e&&[...c,...u].includes(e),f=e=>"hold"===e,p=e=>e&&o.includes(e);(s=a||(a={})).Earned="earned",s.Spent="spent"},25719:function(e,t,r){"use strict";r.d(t,{M5:function(){return u},Yv:function(){return c},aQ:function(){return l},h7:function(){return d},hH:function(){return s},ki:function(){return f},ru:function(){return m},sP:function(){return i},sy:function(){return o}});var n=r(99163),a=r(40168);let i=(0,n.Xw)(e=>{let{txType:t,currencyFrom:r,currencyTo:i,amountTo:s,amountFrom:o,provider:l,rateType:c,promoCode:u,estimationId:d,network:m,responseTime:f,networkFee:p,exchangeFee:h,authBonusCrypto:v,authBonusUsd:g}=e,x={event:n.gC,event_name:"processing_estimate",tx_type:t,currency_from:r,currency_to:i,amount_from:o,amount_to:s,applied_promocode:u||"",estimationId:d,response_time:f,network_fee:p,exchange_fee:h,auth_bonus_usd:g,auth_bonus_crypto:v};return c&&t===a.W.C2C&&(x.rate_type=c),t===a.W.F2C&&(x.provider=l),m&&(x.network=m),x}),s=(0,n.Xw)(e=>{let{txType:t,currencyFrom:r,currencyTo:i,amountTo:s,amountFrom:o,provider:l,rateType:c,error:u,network:d}=e,m={event:n.gC,event_name:"processing_estimate_error",tx_type:t,currency_from:r,currency_to:i,amount_from:o,amount_to:s};return c&&t===a.W.C2C&&(m.rate_type=c),t===a.W.F2C&&(m.provider=l),u&&(m.error=u),d&&(m.network=d),m}),o=(0,n.Xw)(e=>{let{txType:t,setAmount:r,setAmountType:i,currencyFrom:s,currencyTo:o,rateType:l,type:c,eventType:u,network:d}=e,m={event:n.gC,event_name:"from"===u?"processing_change_currency_from":"processing_change_currency_to",tx_type:t,set_amount:r,set_amount_type:i,currency_from:s,currency_to:o,type:"recent"===c?"new":c};return l&&t===a.W.C2C&&(m.rate_type=l),d&&(m.network=d),m}),l=(0,n.Xw)(e=>{let{txType:t,setAmount:r,setAmountType:a,currencyFrom:i,currencyTo:s,rateType:o,network:l}=e,c={event:n.gC,event_name:"processing_reverse_currencies",tx_type:t,set_amount:r,set_amount_type:a,currency_from:i,currency_to:s,rate_type:o||null};return l&&(c.network=l),c}),c=(0,n.Xw)(e=>{let{txType:t,setAmount:r,setAmountType:i,currencyFrom:s,currencyTo:o,rateType:l,network:c}=e,u={event:n.gC,event_name:"processing_change_amount",tx_type:t,set_amount:r,set_amount_type:i,currency_from:s,currency_to:o,network:c};return l&&t===a.W.C2C&&(u.rate_type=l),c&&(u.network=c),u}),u=(0,n.Xw)(e=>{let{txType:t,setAmount:r,setAmountType:i,currencyFrom:s,currencyTo:o,rateType:l,network:c}=e,u={event:n.gC,event_name:"processing_click_limits_warning",tx_type:t,set_amount:r,set_amount_type:i,currency_from:s,currency_to:o};return l&&t===a.W.C2C&&(u.rate_type=l),c&&(u.network=c),u}),d=(0,n.Xw)(e=>{let{type:t,txType:r,customValue:a}=e;return{event:n.gC,event_name:"processing_currency_not_found",tx_type:r,type:t,custom_value:a}}),m=(0,n.Xw)(e=>{let{type:t,customValue:r}=e;return{event:n.gC,event_name:"processing_search_currency",type:t,custom_value:r}}),f=(e,t,r)=>{var n,a;let{toAmountValue:o,fromAmountValue:l,error:c,flow:u}=t,{selectedCurrency:d}=e,m=null==d?void 0:null===(n=d.from)||void 0===n?void 0:n.ticker,f=null==d?void 0:null===(a=d.to)||void 0===a?void 0:a.ticker;if(m&&f){let e={currencyFrom:m,currencyTo:f,amountFrom:l,amountTo:o,txType:u,...r};c?s({...e,error:null==c?void 0:c.message}):i(e)}}},52850:function(e,t,r){"use strict";r.d(t,{Gi:function(){return u},Sy:function(){return d},dq:function(){return m},xP:function(){return f}});var n=r(95863),a=r(94625),i=r(40168),s=r(22155),o=r(25794);let l=(e,t)=>
1{let{flow:r}=t,{fromAmountValue:n,toAmountValue:a,fromCurrencyId:i,toCurrencyId:s}=o.m[r],{defaultAmount:l,defaultCurrencyFrom:c,defaultCurrencyTo:u}=e||{};return{fromCurrencyId:c||i,toCurrencyId:u||s,fromAmountValue:l||n,toAmountValue:a,flow:r}},c=(e,t)=>{let{flow:r}=t,{map:a,from:s,to:o}=e,l={};Object.values(a).forEach(e=>{let{fullName:t,ticker:r,extraIdName:a,coin:i,network:s,blockchainPrecision:o}=e,{url:c}=(0,n.XX)(r),u={id:r,ticker:r,fullName:t,currencyIconUrl:c,coin:i,extraIdName:a||void 0,blockchainPrecision:o,network:"fiat"!==s.toLowerCase()?s:void 0};l[r]=u});let c=r===i.W.F2C?[]:[{tagId:"stable",tagCaption:"Stables"},{tagId:"gainers",tagCaption:"Gainers"},{tagId:"losers",tagCaption:"Losers"},{tagId:"recent",tagCaption:"New"}].filter(e=>{var t,r;let{tagId:n}=e;return n in s.tags&&(null===(r=s.tags[n])||void 0===r?void 0:null===(t=r.ids)||void 0===t?void 0:t.length)}).map(e=>{let{tagId:t,tagCaption:r}=e;return{tagId:t,ids:s.tags[t].ids,tagCaption:r}}),u=r===i.W.F2C?[]:[{tagId:"stable",tagCaption:"Stables"},{tagId:"gainers",tagCaption:"Gainers"},{tagId:"losers",tagCaption:"Losers"},{tagId:"recent",tagCaption:"New"}].filter(e=>{var t,r;let{tagId:n}=e;return n in o.tags&&(null===(r=o.tags[n])||void 0===r?void 0:null===(t=r.ids)||void 0===t?void 0:t.length)}).map(e=>{let{tagId:t,tagCaption:r}=e;return{tagId:t,ids:o.tags[t].ids,tagCaption:r}});return{currenciesMap:l,fromCurrencies:[{ids:s.ids,tagId:"all",tagCaption:"All"}].concat(c),toCurrencies:[{ids:o.ids,tagId:"all",tagCaption:"All"}].concat(u),fromIds:s.ids,toIds:o.ids}},{useConfigQuery:u,useLazyConfigQuery:d,useCurrenciesQuery:m,useAvailablePairsQuery:f}=s.a.injectEndpoints({endpoints:e=>({availablePairs:e.query({queryFn:async(e,t,r,n)=>{let{from:i,to:o,txType:l,flow:c}=e,{getState:u}=t,d=u(),m=(0,a.Q)(d),f=await n({url:(0,s.J)("".concat(m,"/").concat(c,"/available-pairs"),"bff"),params:{from:i,to:o,txType:l},method:"GET"});return f.error?{error:f.error}:f.data?{data:f.data}:{error:{status:"PARSING_ERROR",error:"No data in response"}}},keepUnusedDataFor:1/0}),config:e.query({queryFn:async(e,t,r,n)=>{let{getState:i}=t,{flow:o,to:c,from:u}=e,d=i(),m=(0,a.Q)(d),f=await n({url:(0,s.J)("".concat(m,"/").concat(o,"/config"),"bff"),body:{to:c,from:u},method:"POST"});return f.error?{error:f.error}:f.data?{data:l(f.data,e)}:{error:{status:"PARSING_ERROR",error:"No data in response"}}},keepUnusedDataFor:1/0}),currencies:e.query({queryFn:async(e,t,r,n)=>{let{getState:i}=t,{flow:o,query:l}=e,u=i(),d=(0,a.Q)(u),m=await n({url:(0,s.J)("".concat(d,"/").concat(o,"/currencies"),"bff"),params:l,method:"GET"});return m.error?{error:m.error}:m.data?{data:c(m.data,e)}:{error:{status:"PARSING_ERROR",error:"No data in response"}}},keepUnusedDataFor:1/0})})})},98737:function(e,t,r){"use strict";r.d(t,{S:function(){return c},d:function(){return u}});var n=r(70089),a=r(26066),i=r(85495);let s="last_transaction_params";var o=r(40168);let l=()=>{try{let e=a.Z.get(s);return e?JSON.parse(e):null}catch(e){return(0,n.Tb)(e),null}},c=e=>{let t={fromCurrencyTicker:"",toCurrencyTicker:"",fromAmountValue:""};try{let r=l();if(!r||!(e in r))return t;{let t=r[e];return{toCurrencyTicker:(null==t?void 0:t.to)||"",fromCurrencyTicker:(null==t?void 0:t.from)||"",fromAmountValue:(null==t?void 0:t.amount)||""}}}catch(e){return(0,n.Tb)(e),t}},u=(e,t)=>{try{let r=l()||{[o.W.C2C]:{from:"",to:"",amount:""},[o.W.F2C]:{from:"",to:"",amount:""},[o.W.C2F]:{from:"",to:"",amount:""}};r[e]=t;let n=JSON.stringify(r);a.Z.set(s,n,{path:"/",expires:1/144,domain:(0,i.ZE)("COOKIE_DOMAIN")})}catch(e){(0,n.Tb)(e)}}},46432:function(e,t,r){"use strict";r.d(t,{t:function(){return i}});var n=r(70089),a=r(82718);let i=()=>{try{let e=new URLSearchParams(window.location.search),t=e.get(a.d.FROM),r=e.get(a.d.TO),n=e.get(a.d.AMOUNT);return{fromCurrencyTicker:t||"",toCurrencyTicker:r||"",fromAmountValue:n||""}}catch(e){return(0,n.Tb)(e),{fromCurrencyTicker:"",toCurrencyTicker:"",fromAmountValue:""}}}},84164:function(e,t,r){"use strict";r.d(t,{c:function(){return o},f:function(){return l}});var n=r(70089),a=r(3196),i=r(25794);let s={from:[],to:[]},o=e=>{var t,r;let{from:n,to:a}=i.X[e],s=(null===(t=localStorage.getItem(n))||void 0===t?void 0:t.split(","))||[],o=(null===(r=localStorage.getItem(a))||void 0===r?void 0:r.split(","))||[];return{from:s.slice(0,5),to:o.slice(0,5)}},l=e=>{try{if((0,a.s)())return s;let t=o(e);return{from:t.from,to:t.to}}catch(e){return(0,n.Tb)(e),s}}},64881:function(e,t,r){"use strict";r.d(t,{I:function(){return l}});
1var n=r(70089),a=r(25794),i=r(40168),s=r(84164);let o=(e,t)=>{let r=e.filter(e=>e!==t);return r.unshift(t),r.splice(5),r},l=(e,t)=>{try{let r=a.X[e],n=(0,s.c)(e);if(e===i.W.C2C){let e=n.from.filter(e=>e!==t.from&&e!==t.to);e.splice(3),localStorage.setItem(r.from,[t.from,t.to,...e].join(","))}else{let e;for(e in r){let a=r[e],i=o(n[e],t[e]);localStorage.setItem(a,i.join(","))}}}catch(e){(0,n.Tb)(e)}}},25794:function(e,t,r){"use strict";r.d(t,{X:function(){return s},m:function(){return a}});var n=r(40168);let a={[n.W.C2C]:{fromCurrencyId:"btc",toCurrencyId:"eth",fromAmountValue:"0.1",toAmountValue:""},[n.W.F2C]:{fromCurrencyId:"usd",toCurrencyId:"btc",fromAmountValue:"100",toAmountValue:""},[n.W.C2F]:{fromCurrencyId:"btc",toCurrencyId:"usd",fromAmountValue:"0.1",toAmountValue:""}},i="recent_ticker_crypto",s={[n.W.C2C]:{from:i,to:i},[n.W.F2C]:{from:"recent_ticker_fiat",to:"recent_ticker_cryptobuy"},[n.W.C2F]:{from:"C2F_RECENT_FROM",to:"C2F_RECENT_TO"}}},61405:function(e,t,r){"use strict";r.d(t,{FJ:function(){return m},Iv:function(){return p},T1:function(){return f},NW:function(){return h},Rh:function(){return g},E:function(){return b},wv:function(){return x},KS:function(){return v}});var n=r(33007),a=r(92486);let i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.replace(",",".");if(!(0,a.j)(t))return{integer:"",decimal:""};let[r="",n=""]=t.split(".");return{integer:r,decimal:n}},s=(e,t)=>{let{integer:r,decimal:n}=i(e);return n.length>t?"".concat(r,".").concat(n.slice(0,t)):e};var o=r(40168);let l={fromAmountValue:"",toAmountValue:"",active:null,fromDisabled:!1,toDisabled:!0,selectedCurrency:{from:null,to:null},features:{blockchainPrecision:!1}},c={[o.W.C2C]:l,[o.W.F2C]:l,[o.W.C2F]:l,dex:l},u={from:"fromAmountValue",to:"toAmountValue"},d=(0,n.oM)({name:"calculator",initialState:c,reducers:{setAmount(e,t){let{type:r,value:n,flow:i,setActive:o=!0}=t.payload,l=e[i],c=(0,a.j)(n),u=n;if(c){if(l.features.blockchainPrecision){let{blockchainPrecision:e}=l.selectedCurrency[r]||{};u=e?s(n,e):n}switch(o&&(l.active=r),r){case"from":l.fromAmountValue=u;break;case"to":l.toAmountValue=u}}},setCurrency(e,t){let{flow:r,type:n,currency:a}=t.payload,i=e[r];if(i.selectedCurrency[n]=a,i.features.blockchainPrecision&&(null==a?void 0:a.blockchainPrecision)){let e=i[u[n]];i[u[n]]=s(e,a.blockchainPrecision)}},switchCurrencies(e,t){let r=e[t.payload],{from:n,to:a}=r.selectedCurrency;if(r.selectedCurrency.from=a,r.selectedCurrency.to=n,r.features.blockchainPrecision){let e=r.active||"from",t=r.selectedCurrency[e];if(null==t?void 0:t.blockchainPrecision){let n=r[u[e]];r[u[e]]=s(n,t.blockchainPrecision)}}},setDefault(e,t){e[t.payload]=l},setToDisabled(e,t){let{flow:r,isToDisabled:n}=t.payload;e[r].toDisabled=n},setActive(e,t){let{flow:r,active:n}=t.payload;e[r].active=n},setFutureFlag(e,t){let{feature:r,isEnabled:n,flow:a}=t.payload;e[a].features[r]=n}}}),{reducer:m}=d,{setAmount:f,setActive:p,setCurrency:h,switchCurrencies:v,setDefault:g,setToDisabled:x,setFutureFlag:b}=d.actions},63265:function(e,t,r){"use strict";
1var n=r(27573),a=r(25789);t.Z=e=>{let{children:t,handleButtonClick:r,isOpen:i}=e;return(0,n.jsx)(a.Z,{className:"top-0 bg-bg-elevated sm:top-auto sm:bg-transparent",isOpen:i,onClose:r,children:(0,n.jsx)("div",{className:"w-full h-full sm:w-[500px] sm:h-[640px] sm:rounded-12 overflow-hidden",children:t})})}},5602:function(e,t,r){"use strict";r.d(t,{p:function(){return s}});var n=r(4901),a=r(52850),i=r(40168);let s=(e,t)=>{let{selectedCurrency:r}=(0,n.CG)(t=>t.calculator[e]),{from:s,to:o}=r,{data:l}=(0,a.xP)({from:null==s?void 0:s.id,to:void 0,txType:t,flow:e},{skip:!(null==s?void 0:s.id)||e===i.W.C2F}),{data:c}=(0,a.xP)({from:void 0,to:null==o?void 0:o.id,txType:t,flow:e},{skip:!(null==o?void 0:o.id)||e===i.W.F2C});return{fromDisabledIds:null==c?void 0:c.unsupported,toDisabledIds:null==l?void 0:l.unsupported,fromEnabledIds:null==c?void 0:c.supported,toEnabledIds:null==l?void 0:l.supported}}},13206:function(e,t,r){"use strict";r.d(t,{U:function(){return a}});var n=r(52850);let a=(e,t)=>{let{currentData:r,isSuccess:a}=(0,n.dq)({flow:t});return{currency:null==r?void 0:r.currenciesMap[e],isSuccess:a}}},34898:function(e,t,r){"use strict";r.d(t,{A:function(){return i}});var n=r(4901),a=r(13206);let i=e=>{var t,r;let{from:i,to:s}=(0,n.CG)(t=>t.calculator[e].selectedCurrency),{currency:o,isSuccess:l}=(0,a.U)(null!==(t=null==i?void 0:i.id)&&void 0!==t?t:"",e),{currency:c}=(0,a.U)(null!==(r=null==s?void 0:s.id)&&void 0!==r?r:"",e);return{fromCurrency:o,toCurrency:c,isSuccess:l}}},873:function(e,t,r){"use strict";r.d(t,{$:function(){return u}});var n=r(27573),a=r(45254),i=r.n(a),s=r(60336),o=r(2104),l=r(95863),c=r(14792);let u=e=>{let{amount:t="",currency:r,isApproximateValue:a=!1,className:u,typographyClassName:d="text-p2 font-semi-bold ",hideIcon:m}=e;if(Number.isNaN(parseFloat(t))||!r)return(0,n.jsx)("span",{className:d,children:"..."});let{coin:f,network:p,fullName:h}=r,{url:v}=(0,l.XX)(f);return(0,n.jsxs)("div",{className:i()("flex gap-1 items-center max-w-full",d,u),children:[v&&!m?(0,n.jsx)(s.Xw,{className:"!size-4",src:v,alt:null!=h?h:""}):null,(0,n.jsx)(c.Z,{dataTnav:"amount",amount:"".concat(a?"~ ":"").concat(t)}),(0,n.jsx)("div",{"data-tnav":"coin",children:f.toUpperCase()}),p?(0,n.jsx)(o.Z,{blockchain:p}):null]})}},64371:function(e,t,r){"use strict";r.d(t,{jh:function(){return d},sD:function(){return c},wK:function(){return u},zk:function(){return l}});var n=r(33007),a=r(40168);let i={selectedOfferId:void 0,previousSelectedOfferId:void 0,transactions:[]},s={currentFlow:a.W.F2C,[a.W.F2C]:{...i},[a.W.C2F]:{...i}},o=(0,n.oM)({name:"fiatProcessing",initialState:s,reducers:{setFiatCurrentFlow(e,t){e.currentFlow=t.payload},selectFiatOffer(e,t){let{currentFlow:r}=e,n=e[r].selectedOfferId;t.payload!==n&&(e[r].previousSelectedOfferId=n),e[r].selectedOfferId=t.payload},saveTransaction(e,t){let{currentFlow:r}=e;e[r].transactions.push(t.payload)}}}),{reducer:l}=o,{setFiatCurrentFlow:c,selectFiatOffer:u,saveTransaction:d}=o.actions},1122:function(e,t,r){"use strict";r.d(t,{i:function(){return o}});var n=r(27573),a=r(45254),i=r.n(a),s=r(50294);let o=e=>{let{img:t,title:r,text:a,footer:o,className:l,useNextImage:c=!0}=e,u={width:145,height:145,className:"rounded-24 mb-6 mx-auto size-[117px] lg:size-[145px]",src:t.src,"data-tnav":"error-image"};return(0,n.jsxs)("div",{className:i()("my-6 lg:my-5",l),"data-tnav":"error-screen",children:[(0,n.jsxs)("div",{className:"pt-10 lg:pt-8 pb-8 lg:pb-12 mb-5 text-center",children:[c?(0,n.jsx)(s.default,{...u,alt:t.alt}):(0,n.jsx)("img",{...u,alt:t.alt}),(0,n.jsx)("h5",{className:"heading-5 mb-2","data-tnav":"error-message",children:r}),(0,n.jsx)("p",{className:"text-m text-content-secondary","data-tnav":"error-description",children:a})]}),o||null]})}},18625:function(e,t,r){"use strict";r.d(t,{NotFoundError:function(){return f}});
1var n=r(27573),a=r(7653),i=r(81695),s=r(70089),o=r(20975),l=r(22996),c=r(33515),u=r(40168),d=r(64426),m=r(1122);let f=e=>{var t;let{flow:r,className:f}=e,p=(0,o.T_)("processing"),h=(0,i.useRouter)(),v=null===(t=(0,c.useWidgetConfig)("flows")[r])||void 0===t?void 0:t.newTransactionPath;return(0,a.useEffect)(()=>{(0,s.uT)("[".concat(r.toUpperCase(),"] Not found error in processing rendered"))},[]),(0,n.jsx)(m.i,{className:f,img:{src:(0,d.w)("/processing/cat-in-shock.png"),alt:"cat in shock"},title:p("errors.not-found-error.title"),footer:(0,n.jsx)("div",{className:"flex flex-col gap-3",children:(0,n.jsx)(l.Z,{variant:"primary",fluid:!0,onClick:()=>{let e=v||r===u.W.F2C?"/buy-crypto":"/sell-crypto";return h.push(e)},children:p("create-new-transaction")})})})}},85150:function(e,t,r){"use strict";r.d(t,{UnexpectedError:function(){return d}});var n=r(27573),a=r(7653),i=r(81695),s=r(70089),o=r(20975),l=r(22996),c=r(64426),u=r(1122);let d=e=>{let{flow:t,className:r}=e,d=(0,o.T_)("processing"),m=(0,i.useRouter)();return(0,a.useEffect)(()=>{(0,s.uT)("[".concat(t.toUpperCase(),"] Unexpected error in processing rendered"))},[]),(0,n.jsx)(u.i,{img:{src:(0,c.w)("/processing/cat-is-sad.png"),alt:"cat is sad"},title:d("errors.unexpected-error.title"),text:d("errors.unexpected-error.text"),className:r,footer
1:(0,n.jsx)("div",{className:"flex flex-col gap-3",children:(0,n.jsx)(l.Z,{variant:"primary",fluid:!0,onClick:m.refresh,children:d("try-again")})})})}},84451:function(e,t,r){"use strict";r.d(t,{WidgetError:function(){return d}});var n=r(27573),a=r(7653),i=r(70089),s=r(20975),o=r(22996),l=r(85495),c=r(64426),u=r(1122);let d=e=>{let{className:t,message:r,hasReload:d}=e,m=(0,s.T_)("processing"),f=(0,l.EK)("BRAND_NAME");(0,a.useEffect)(()=>{(0,i.Tb)(Error(r)),console.error("[".concat(f.toUpperCase()," WIDGET]:"),r)},[r]);let p=(0,a.useCallback)(()=>location.reload(),[]);return(0,n.jsx)(u.i,{img:{src:(0,c.w)("/processing/under-construction.png"),alt:"unrelated image"},title:m("errors.unexpected-error.title"),text:m("errors.unexpected-error.text"),className:t,useNextImage:!1,footer:d?(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(o.Z,{variant:"secondary",onClick:p,children:m("try-again")})}):null})}},69061:function(e,t,r){"use strict";var n=r(27573),a=r(45254),i=r.n(a),s=r(39089),o=r(62897),l=r(47452);t.Z=e=>{let{method:t,methodName:r,className:a,imgClassName:c,alt:u,...d}=e,{theme:m="day"}=(0,s.F)();if(!t)return(0,n.jsx)("div",{});let f=(0,o.k)("/".concat("night"===m?"payment-methods-night":"payment-methods","/").concat(t,".png"));return(0,n.jsx)("div",{className:i()(a,"relative m-0.5"),children:(0,n.jsx)(l.s,{fallback:r||t,src:f,alt:u||t,"data-component":"payment-method-logo",className:i()(c,"h-full"),...d})})}},99663:function(e,t,r){"use strict";r.d(t,{S:function(){return i},v:function(){return a}});let n=(0,r(33007).oM)({name:"processing-config",initialState:{appType:"web"},reducers:{initAppState:(e,t)=>t.payload}}),{reducer:a}=n,{initAppState:i}=n.actions},39158:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(7653),a=r(4901),i=r(52850),s=r(27573),o=r(3458),l=r(20975),c=r(89382),u=r(63265),d=r(98737),m=e=>{var t,r;let i=(0,l.T_)("processing"),[m,f]=(0,n.useState)(!1),{fromAmountValue:p,selectedCurrency:h,toAmountValue:v,active:g}=(0,a.CG)(t=>t.calculator[e]),x=(0,n.useCallback)((0,c.y1)((t,r,n)=>{(0,d.d)(e,{from:t,to:r,amount:n})},500),[e]);return(0,n.useEffect)(()=>{var e,t;let r=null==h?void 0:null===(e=h.from)||void 0===e?void 0:e.ticker,n=null==h?void 0:null===(t=h.to)||void 0===t?void 0:t.ticker;r&&n&&p&&x(r,n,p)},[x,p,null==h?void 0:null===(t=h.from)||void 0===t?void 0:t.ticker,null==h?void 0:null===(r=h.to)||void 0===r?void 0:r.ticker]),{fromAmountValue:p,toAmountValue:v,selectedCurrency:h,active:g,currencyListTitle:"Select a currency",currencyListSearchPlaceholder:"Search currency",minAmountLabel:"Min is",maxAmountLabel:"Max is",renderCurrencyList:e=>m?(0,o.createPortal)((0,s.jsx)(u.Z,{isOpen:m,handleButtonClick:()=>f(!1),children:e}),document.body,"CurrencyList"):null,currencyListEmptyCaption:i("empty-list"),onClickCurrency:()=>f(!0),currencyListOnClose:()=>f(!1)}},f=r(84164),p=r(61405),h=e=>{let t=(0,a.TL)(),{currentData:r}=(0,i.dq)({flow:e}),{fromAmountValue:s,selectedCurrency:o,toAmountValue:l,...c}=m(e),u=(0,n.useMemo)(()=>(0,f.f)(e),[e]),{from:d,to:h}=o;return((0,n.useEffect)(()=>()=>{t((0,p.Rh)(e))},[t,e]),d&&h&&r)?{pending:!1,setup:{...c,...r,from:d,to:h,fromAmountValue:s,toAmountValue:l,fromAmountIsPending:!0,toAmountIsPending:!0,fromRecentIds:u.from,toRecentIds:u.to}}:{pending:!0,setup:null}}},86900:function(e,t,r){"use strict";r.d(t,{PB:function(){return s},Pf:function(){return i},tn:function(){return a}});var n=r(99163);let a=(0,n.Xw)({event:n.gC,event_name:"processing_promocode_expand_field"}),i=(0,n.Xw)(e=>({event:n.gC,event_name:"processing_promocode_applied",applied_promocode:e})),s=(0,n.Xw)(e=>({event:n.gC,event_name:"processing_promocode_error",error:e}))},39937:function(e,t,r){"use strict";r.d(t,{p:function(){return n}});let n="promo-code-modal"},8127:function(e,t,r){"use strict";r.d(t,{D5:function(){return l},H8:function(){return c},Zj:function(){return s},_K:function(){return o}});var n=r(33007);let a={value:void 0,applied:!1,strategies:{isZeroFee:!1}},i=(0,n.oM)({name:"promoCode",initialState:a,reducers:{setPromoCode(e,t){e.value=t.payload,e.applied=!0},setStrategies(e,t){e.strategies={...e.strategies,...t.payload}},resetPromoCodeState:()=>a}}),{setPromoCode:s,resetPromoCodeState:o,setStrategies:l}=i.actions,c=i.reducer},25175:function(e,t,r){"use strict";r.d(t,{eW:function(){return s},rF:function(){return i},re:function(){return o}});var n=r(86873),a=r(9260);let i=e=>e&&n.uh.includes(e),s=e=>e&&n.N0.includes(e),o=e=>e&&e===a.G.Failed},59578:function(e,t,r){"use strict";r.d(t,{NR:function(){return o},is:function(){return i},uK:function(){return s}});var n=r(94625),a=r(22155);let i=a.a.injectEndpoints({endpoints:e=>({recentAddresses:e.query({query:e=>({url:(0,a.J)("/v2/wallets/user-wallet","bff"),params:{currency:e},method:"GET"}
1),keepUnusedDataFor:1/0}),validateAddress:e.query({queryFn:async(e,t,r,i)=>{let{address:s,extraId:o,currency:l}=e,{getState:c}=t,u=c(),d=(0,n.Q)(u,{web:"v1",widget:"v1"}),m=await i({url:(0,a.J)("".concat(d,"/wallets/validate-address"),"bff"),params:{address:s,extraId:o,currency:l},method:"GET"});return m.error?{error:m.error}:m.data?{data:m.data}:{error:{status:"PARSING_ERROR",error:"No data in response"}}},keepUnusedDataFor:1/0})})}),{useRecentAddressesQuery:s,useLazyValidateAddressQuery:o}=i},95962:function(e,t,r){"use strict";r.r(t),r.d(t,{useSavePartnerAddressSearchParams:function(){return o}});var n=r(7653),a=r(81695),i=r(4901),s=r(48144);let o=e=>{let{fieldId:t}=e,r=(0,i.TL)(),o=(0,a.useSearchParams)(),l=null==o?void 0:o.get("address"),c=null==o?void 0:o.get("extra_id"),{extraId:u,address:d}=(0,i.CG)(e=>e.walletAddress[t]);(0,n.useEffect)(()=>{l&&!d&&r((0,s.qj)({fieldId:t,address:l})),c&&!u&&r((0,s.Mz)({fieldId:t,extraId:c}))},[r,c,t,u,d,o,l])}},8253:function(e,t,r){"use strict";var n,a;r.d(t,{r:function(){return n}}),(a=n||(n={})).C2F_REFUND="C2F_REFUND",a.C2C_REFUND="C2C_REFUND",a.C2C_DESTINATION="C2C_DESTINATION",a.F2C_DESTINATION="F2C_DESTINATION"},48144:function(e,t,r){"use strict";r.d(t,{MT:function(){return p},Mz:function(){return d},Ww:function(){return u},hj:function(){return m},oA:function(){return f},qj:function(){return c}});var n=r(33007),a=r(59578),i=r(8253);let s={status:"initial",address:"",extraId:"",isExtraIdRequired:!1},o={[i.r.C2F_REFUND]:{...s},[i.r.C2C_DESTINATION]:{...s},[i.r.C2C_REFUND]:{...s},[i.r.F2C_DESTINATION]:{...s}},l=(0,n.oM)({name:"wallet-address",initialState:o,reducers:{setAddress(e,t){let{fieldId:r,address:n}=t.payload;e[r].address=n,e[r].status=n?"validating":"initial"},setExtraId(e,t){let{fieldId:r,extraId:n}=t.payload;e[r].extraId=n,e[r].status=e[r].address&&n?"validating":"initial"},setExtraIdRequired(e,t){let{fieldId:r,isExtraIdRequired:n}=t.payload;e[r].isExtraIdRequired=n,n||(e[r].extraId="")},setCloseModalOnValidate(e,t){let{fieldId:r,closeModalOnValidate:n}=t.payload;e[r].closeModalOnValidate=n},resetState(e,t){let{fieldId:r}=t.payload;e[r]={...s}}},extraReducers:e=>
1{e.addMatcher(a.is.endpoints.validateAddress.matchPending,(e,t)=>{let{fieldId:r}=t.meta.arg.originalArgs;r&&(e[r].status="validating")}),e.addMatcher(a.is.endpoints.validateAddress.matchFulfilled,(e,t)=>{let{fieldId:r}=t.meta.arg.originalArgs;r&&(e[r].status="fulfilled")}),e.addMatcher(a.is.endpoints.validateAddress.matchRejected,(e,t)=>{let{fieldId:r}=t.meta.arg.originalArgs;if(r){var n;let{status:a,data:i}=null!==(n=null==t?void 0:t.payload)&&void 0!==n?n:{};422===a&&(null==i?void 0:i.code)==="UNPROCESSABLE_ENTITY"?(null==i?void 0:i.message)==="invalid_address"?e[r].status="address-invalid":(null==i?void 0:i.message)==="invalid_extra_id"&&(e[r].status="extra-id-invalid"):e[r].status="initial"}})}}),{setAddress:c,setExtraIdRequired:u,setExtraId:d,setCloseModalOnValidate:m,resetState:f}=l.actions,p=l.reducer},10822:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return f}});var n=r(27573),a=r(7653),i=r(20975),s=r(15068),o=r(67403),l=r(15891),c=r(35320);let u=["exchange","buy","sell","dex"],d=["exchange","buy"],m=["buy","sell"];var f=(0,o.P)(e=>{let{translation:t,activeId:r,href:o}=e,f=(0,i.bU)(),p=(0,a.useMemo)(()=>u.map(e=>({id:e,title:t[e],href:o[e],tNav:"navigation-item-".concat(e)})),[t,o]),h=(0,a.useMemo)(()=>(0,l.Bv)(f)?p.filter(e=>{let{id:t}=e;return d.includes(t)}):(0,l.z7)(f)?p.filter(e=>{let{id:t}=e;return m.includes(t)}):p,[f,p]);return(0,n.jsx)(s.ZP,{list:h,dataTnav:"navigation",activeTabIndex:h.findIndex(e=>{let{id:t}=e;return t===r}),tabAs:c.r})})},90402:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var n,a=r(27573),i=r(20975),s=r(58872);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var l=function(e){return s.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none"},e),n||(n=s.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M23.5 18a2 2 0 0 1-2 2h-18a2 2 0 0 1-2-2v-3.112L2 14.6A3 3 0 0 0 3.5 12 3 3 0 0 0 2 9.4l-.5-.288V6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v3.112L23 9.4a3 3 0 0 0-1.5 2.6c0 1.084.579 2.066 1.5 2.6l.5.288zm-4-6c0-1.6.759-3.07 2-4V6h-6a1 1 0 1 1-2 0h-10v2c1.241.93 2 2.4 2 4s-.759 3.07-2 4v2h10a1 1 0 1 1 2 0h6v-2c-1.241-.93-2-2.4-2-4m-5 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2m1-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-1-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})))},c=r(39937),u=r(86900),d=r(70173),m=()=>{let e=(0,i.T_)("promo-code"),{open:t}=(0,d.useModalHandlers)(c.p);return(0,a.jsxs)("div",{className:"inline-flex gap-3 items-center text-p2 font-semi-bold cursor-pointer text-transparent bg-clip-text bg-gradient-greenDay",onClick:()=>{(0,u.tn)({}),t()},"data-tnav":"promocode-button",children:[(0,a.jsx)(l,{className:"text-[#019DE0]"})," ",e("button-text")]})}},94306:function(e,t,r){"use strict";r.d(t,{Z:function(){return v}});var n=r(27573),a=r(20975),i=r(39937),s=r(1022),o=r(7653),l=r(59673),c=r(22996),u=r(86900),d=r(70173),m=r(22155);let{useLazyValidateQuery:f}=m.a.injectEndpoints({endpoints:e=>({validate:e.query({query(e){let{flow:t,...r}=e;return{url:(0,m.J)("/v1/".concat(t,"/promo-codes/validate"),"bff"),method:"GET",params:r}}})})}),p=e=>{let[t,r]=(0,o.useState)(null),[n,{data:a,isFetching:i,isError:s}]=f();return(0,o.useEffect)(()=>{s&&r(!1),a&&r(a.valid)},[a,s]),{isValid:t,resetValidation:()=>r(null),validate:t=>n({code:t,flow:e}),isFetching:i}};var h=e=>{let{onSubmit:t,flow:r}=e,s=(0,a.T_)("promo-code.form"),{isValid:m,validate:f,resetValidation:h,isFetching:v}=p(r),{close:g}=(0,d.useModalHandlers)(i.p),[x,b]=(0,o.useState)("");(0,o.useEffect)(()=>{m&&(g(),null==t||t(x),(0,u.Pf)(x),b(""),h())},[m]);let y=0===x.trim().length||!1===m,w=m||null===m?null:s("invalid-promo-code-error");return(0,o.useEffect)(()=>{w&&(0,u.PB)("This promo code is invalid")},[w]),(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),f(e.currentTarget.elements.code.value)},children:[(0,n.jsx)(l.default,{inputSize:"large",type:"text",name:"code",label:s("label"),rootClassName:"mb-6",onChangeText:e=>{"string"==typeof e&&(h(),b(e))},value:x,error:w,isLoading:v,disabled:v,"data-tnav":"promocode-input",errorTnav:"promocode-input-error"}),(0,n.jsx)(c.Z,{type:"submit",fluid:!0,disabled:y,isLoading:v,"data-tnav":"promocode-apply-button",children:s("submit-btn")})]})},v=e=>{let t=(0,a.T_)("promo-code");return(0,n.jsx)(s.ModalWithBackdrop,{id:i.p,title:t("modal-title"),dataTnav:"promocode-modal",children:()=>(0,n.jsx)(h,{...e})})}},71294:function(e,t,r){"use strict";r.d(t,{PS:function(){return o},wJ:function(){return i}});var n=r(26066),a=r(74539);let i=()=>n.Z.set(a.iI,"1",a.by),s=()=>n.Z.remove(a.iI,a.by),o=e=>
1{"1"===n.Z.get(a.iI)&&(e(),s())}},74539:function(e,t,r){"use strict";r.d(t,{by:function(){return i},iI:function(){return a},wq:function(){return s}});var n=r(85495);let a="OPEN_IFRAME_MODAL",i={domain:(0,n.ZE)("COOKIE_DOMAIN"),expires:1},s={allow:"accelerometer;autoplay;camera;encrypted-media;gyroscope;clipboard-read;clipboard-write *;payment *;microphone"}},52614:function(e,t,r){"use strict";r.d(t,{RateExperienceWithModal:function(){return x}});var n=r(27573),a=r(7653),i=r(45254),s=r.n(i),o=r(20975);function l(e){let t=(0,a.useRef)();return(0,a.useEffect)(()=>{t.current=e},[e]),t.current}var c=r(58555),u=r(70173),d=r(1022),m=r(90076),f=r(33494),p=r(9683),h=r(40035),v=r(31195);let g="rate-experience-modal",x=e=>{let{transactionId:t,flow:r,onOpenModal:i,onCloseModal:x,onFormSubmit:b,onClickRateCallback:y,className:w}=e,_=(0,o.T_)("transaction-feedback"),[C,j]=(0,a.useState)(!1),{open:k}=(0,u.useModalHandlers)(g),{data:N}=(0,c.zD)({transactionIds:t,flow:r}),{rating:T,setRating:A,setTag:I,cleanTags:E,selectedTags:F,comment:S,setComment:W,sendFeedback:P,isSuccessRequest:M,isDisabled:R,isLoading:O,isError:Z}=(0,f.P)({flow:r,transactionId:t,clickRateCallback:e=>{y&&"function"==typeof y&&y(e),k()}}),L=(0,a.useMemo)(()=>(5===T?m.e:m.r).map(e=>_("tags.".concat(e))),[_,T]),U=l(T),D=l(L);(0,a.useEffect)(()=>{D&&D.length!==L.length&&U!==T&&F.length>0&&E()},[T,U,F,E,D,L.length]);let{title:H,text:G}=(0,a.useMemo)(()=>5===T?{title:_("we-happy"),text:_("what-did-you-like")}:4===T?{title:_("we-did"),text:_("anything-improve")}:3===T?{title:_("average"),text:_("what-improve")}:2===T?{title:_("sorry-to-hear"),text:_("what-improve")}:1===T?{title:_("no-way"),text:_("what-improve")}:{title:_("rate-experience"),text:_("what-improve")},[T,_]),V=()=>{b&&"function"==typeof b&&b(),P({rate:T})};return(0,n.jsxs)(n.Fragment,{children:[(null==N?void 0:N.isAvailable)&&!C?(0,n.jsx)("div",{className:s()("w-full flex flex-col gap-6",w),"data-tnav":"feedback-form",children:(0,n.jsx)("div",{className:"w-full border border-border-static rounded-8 p-4","data-tnav":"rate-window",children:(0,n.jsx)(h.i,{controlled:!0,rating:T,handleClick:A,className:"text-center",title:_("rate-experience")})})}):null,(0,n.jsx)(d.ModalWithBackdrop,{id:g,title:_("rate-experience"),onClose:()=>{x&&"function"==typeof x&&x(),M&&j(!0)},onOpen:i,dataTnav:"feedback-modal",children:()=>(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(h.i,{controlled:!O,className:"mb-4",rating:T,handleClick:A,title:H}),(0,n.jsx)(p.q,{setTag:I,selectedTags:F,tagsList:L,comment:S,setComment:W,isSuccess:M,isError:Z,isLoading:O,isDisabled:R||O,onSubmit:V,translations:{text:G,submit:_("submit"),cancel:_("change-rate"),placeholder:_("write-comment"),serverError:_("server-error")},className:"px-1"}),(0,n.jsx)(v.i,{title:_("thank-you"),text:_("we-appreciate"),className:s()("top-0 bottom-0 !max-w-full right-0 left-0 bg-bg-elevated",{absolute:M,hidden:!M})})]})})]})}},90843:function(e,t,r){"use strict";r.d(t,{o:function(){return s}});var n=r(27573),a=r(45254),i=r.n(a);let s=e=>{let{className:t,children:r}=e;return(0,n.jsx)("div",{className:i()(t,"flex flex-col gap-4 pt-4 flex-1 justify-between"),children:r})}},34044:function(e,t,r){"use strict";r.d(t,{StepScrollContainer:function(){return d}});var n=r(27573),a=r(7653),i=r(45254),s=r.n(i),o=r(54721),l=r(40684),c=r(75037),u=r(79860);let d=e=>
1{let{children:t,className:r,footer:i,forceScroll:d=!1}=e,[m,f]=(0,a.useState)(!0),p=(0,l.a)("(max-width: ".concat(c._V,")")),h=!d&&p,[v,g]=(0,a.useState)(d),x=(0,a.useRef)(null),{isAppeared:b,className:y}=(0,o.aM)(!m&&v,300,{presenceClassName:"transition-opacity",offClassName:"opacity-0",onClassName:"opacity-10"}),w=(0,a.useCallback)(e=>{h||f(0===e.target.scrollTop)},[f,h]);return(0,a.useEffect)(()=>{if(h)g(!1);else{let e=x.current;e&&g(e.scrollHeight>e.clientHeight)}},[h]),(0,n.jsxs)("div",{className:s()(r,"flex flex-col -mx-4 relative",d?"max-h-0":"sm:max-h-[calc(100vh-20.5rem)]",u.r),children:[b?(0,n.jsx)("div",{className:s()("absolute h-2 bg-gradient-to-b from-base-black to-40% to-transparent -left-2 -right-2 top-0",y)}):null,(0,n.jsx)("div",{ref:x,onScroll:w,className:s()("h-full overflow-y-auto","scrollbar scrollbar-track-transparent scrollbar-thumb-border-static scrollbar-w-1 scrollbar-thumb-rounded-full","px-4 pb-6"),children:t}),i?(0,n.jsxs)("div",{className:"px-4 relative",children:[(0,n.jsx)("div",{className:"absolute top-0 left-0 right-0 h-4 -translate-y-full bg-gradient-to-t from-bg-elevated to-transparent"}),i]}):null]})}},42042:function(e,t,r){"use strict";r.d(t,{t:function(){return _}});var n=r(27573),a=r(7653),i=r(14512),s=r(26066),o=r(25789),l=r(85495),c=r(99163);let u=(0,c.Xw)({event:c.gC,event_name:"processing_survey_action_click"}),d=(0,c.Xw)({event:c.gC,event_name:"processing_survey_modal_open"}),m=(0,c.Xw)({event:c.gC,event_name:"processing_survey_modal_close"}),f=(0,c.Xw)({event:c.gC,event_name:"processing_survey_monkey_ready"}),p=e=>{let{container:t,sdkId:r,scriptSrc:n,onReady:a}=e;if(!t||document.getElementById(r))return;let i=document.createElement("script");i.src=n,i.id=r,i.async=!0,i.onload=a,t.appendChild(i)},h="survey_monkey_modal",v="disabled";var g=r(32141),x=r(20975),b=r(50294),y={src:"/web-assets/_next/static/media/banner-monkey-img.7500854c.png",height:240,width:240,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAV1BMVEVMaXHLk2mIOh2yfV2/YTW8akudTCThsoenYD2cQheWRx3al2A8EgZyKQ/RiVujUCSpWCifQyO6dD/DgEb///++XyzbvKCvcUqyYjPLez7NlG6tTyTIg01085MiAAAAGXRSTlMA/iL9ORH5TVb+Zvw9/idGtfPZuQv91pDFNCnN1QAAAAlwSFlzAAAsSwAALEsBpT2WqQAAAEBJREFUeJwVyEcSgCAQAMERBJZkTqD/f6e1t64GZtwIMPl9WxShne+qFQbbuwDHlbO9db4YvYB7Wqw1AUZSKYYfTXwCPG1qyB4AAAAASUVORK5CYII=",blurWidth:8,blurHeight:8};let w=e=>{let{onClick:t}=e,r=(0,x.T_)("processing");return(0,n.jsxs)("div",{className:"flex gap-2 cursor-pointer items-center group",onClick:t,"data-tnav":"survey-banner",children:[(0,n.jsx)("div",{className:"w-16 h-16 shrink-0",children:(0,n.jsx)(b.default,{src:y,alt:"Survey monkey",width:64,height:64,className:"bg-feedback-neutral-surface rounded-10"})}),(0,n.jsxs)("div",{className:"flex-1 ml-1",children:[(0,n.jsx)("div",{className:"text-m text-content-primary font-semi-bold",children:r("survey-banner.title")}),(0,n.jsx)("div",{className:"text-s text-content-secondary",children:r("survey-banner.description")})]}),(0,n.jsx)("div",{className:"bg-button-secondary group-hover:bg-button-secondary-hover size-10 shrink-0 rounded-full flex items-center justify-center",children:(0,n.jsx)(g.Q,{size:24,className:"text-interactive-accent"})})]})},_=()=>{let e=s.Z.get(h),t=(0,a.useRef)(null),[r,c]=(0,a.useState)(e===v),[g,x]=(0,a.useState)(!1),b=(0,a.useCallback)(()=>{m(),x(!1),s.Z.set(h,v,{domain:(0,l.ZE)("COOKIE_DOMAIN")}),c(!0)},[]),y=(0,a.useCallback)(()=>{u(),x(!0),d()},[]);return((0,a.useEffect)(()=>{g&&p({container:t.current,sdkId:"smcx-sdk",scriptSrc:"https://widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd9WQ3UcqmOrK2hM1lRCqSPz36D9J_2FB1D8pZfGFSIGKFZ.js",onReady:()=>{f()}})},[g]),r)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{onClick:y}),(0,n.jsx)(o.Z,{overlayClassName:"bg-bg-overlay",isOpen:g,className:"sm:!w-[756px] sm:max-w-[80vw] max-h-[80vh]",onClose:b,children:(0,n.jsx)("div",{className:"w-full max-h-[80vh] overflow-y-auto","data-tnav":"survey-modal",children:(0,n.jsx)("div",{ref:t,className:"w-full h-full overflow-hidden bg-bg-elevated rounded-t-24 sm:rounded-b-24",children:(0,n.jsx)(i.b,{size:24,onClick:b,className:"text-base-white hover:text-content-tertiary absolute top-2 sm:top-5 right-2 sm:right-5 cursor-pointer z-20"})})})})]})}},92735:function(e,t,r){"use strict";r.d(t,{cn:function(){return m},j7:function(){return f}});var n=r(27573),a=r(7653),i=r(20975),s=r(873),o=r(69061),l=r(25175),c=r(40168),u=r(11581);let d={fullName:"",coin:"",ticker:""},m=e=>({id:e.transactionId,amountFrom:e.payinAmount||"",currencyFrom:e.currencyFrom,amountTo:e.payoutAmount||"",currencyTo:e.currencyTo,rate:e.rate,status:e.status,paymentMethodData:e.paymentMethodData}),f=(e,t)=>{let r=(0,i.T_)("processing"),m=(0,i.T_)("calculator.common"),f=!e.status||(0,l.rF)(e.status)?"float":"fixed",p=(0,a.useMemo)(()=>
1[{label:m("you-send"),renderValue:()=>(0,n.jsx)(s.$,{amount:e.amountFrom,currency:e.currencyFrom||d,typographyClassName:"text-m font-semi-bold"})},{label:r("transaction-fields.rate"),renderValue:()=>{var t,r;return(0,n.jsx)(u.Z,{rate:e.rate,currencyFrom:null===(t=e.currencyFrom)||void 0===t?void 0:t.coin,currencyTo:null===(r=e.currencyTo)||void 0===r?void 0:r.coin,rateType:f})}},{label:r(t===c.W.F2C?"transaction-fields.payin-method":"transaction-fields.payout-method"),renderValue:()=>(0,n.jsx)(o.Z,{methodName:e.paymentMethodData.name,className:"h-[22px] basis-20",imgClassName:"object-left object-contain",method:e.paymentMethodData.code,alt:e.paymentMethodData.name||""})},{label:m("you-get"),renderValue:()=>(0,n.jsx)(s.$,{isApproximateValue:"float"===f,amount:e.amountTo,currency:e.currencyTo||d,typographyClassName:"text-m font-semi-bold"})}],[r,m,e,f]);return{id:e.id,paymentInfo:p}}},45937:function(e,t,r){"use strict";r.d(t,{Z:function(){return b}});var n=r(27573),a=r(45254),i=r.n(a),s=r(20975),o=r(3689),l=r(30234),c=r(36214),u=r(45053);let d=()=>(0,n.jsx)(c.Z,{height:"20px",width:"200px"}),m=e=>{let{label:t,children:r,isPending:a}=e,s=(0,u.Sl)(t.toLowerCase()),o="tx-details-".concat(s,"-title"),l="tx-details-".concat(s,"-value");return null==r||""===r?null:(0,n.jsxs)("div",{className:"flex justify-between items-center rounded-12 px-3 border border-border-static h-12 gap-1",children:[(0,n.jsx)("label",{"data-tnav":o,className:i()("flex-shrink-0 whitespace-nowrap min-w-0 caption-m text-content-secondary"),children:t}),(0,n.jsx)("div",{className:"overflow-hidden","data-tnav":l,children:a?(0,n.jsx)(d,{}):r})]})},f=()=>(0,n.jsx)(c.Z,{height:"20px",width:"200px"}),p=e=>{let{title:t,children:r,isPending:a}=e,s=(0,u.Sl)(t.toLowerCase()),o="tx-details-".concat(s,"-title"),l="tx-details-".concat(s,"-value");return null==r||""==r?null:(0,n.jsxs)("div",{className:"flex justify-between items-center h-5",children:[(0,n.jsx)("label",{"data-tnav":o,className:i()("text-s text-content-secondary"),children:t}),(0,n.jsx)("div",{className:"caption-s text-content-primary","data-tnav":l,children:a?(0,n.jsx)(f,{}):r})]})},h=e=>{let{title:t,children:r,isPending:a}=e;return null==r||""==r?null:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:i()("absolute size-[9px] bg-bg-elevated","border border-border-static rounded-full","-left-[17px] top-1/2 -translate-y-1/2")}),(0,n.jsx)(p,{title:t,isPending:a,children:r})]})},v=e=>{let{fields:t,isPending:r,isStaled:a}=e;if(!t.length)return null;let[s,...o]=t,l=o.slice(0,-1),c=o.at(-1);return(0,n.jsxs)("div",{className:i()(a&&"opacity-50"),children:[(0,n.jsx)(m,{label:s.label,isPending:r,children:s.renderValue()}),l.length?(0,n.jsx)("div",{className:"flex flex-col gap-3 ml-4 p-3 border-l border-border-static",children:l.map((e,t)=>(0,n.jsx)(h,{isPending:r,title:e.label,children:e.renderValue()},t))}):null,c?(0,n.jsx)(m,{label:c.label,isPending:r,children:c.renderValue()}):null]})},g=e=>null!=e||"string"==typeof e&&""!=e,x=e=>{let{className:t,details:r}=e,a=r.map(e=>{let{label:t,renderValue:r}=e,a=r();return a?(0,n.jsx)(p,{title:t,children:a},t):null}).filter(g);return a.length?(0,n.jsx)("div",{className:t,children:a}):null};var b=e=>{let{id:t,paymentInfo:r=[],otherDetails:a=[],isPending:c=!1,isStaled:u=!1,children:d}=e,f=(0,s.T_)("processing.transaction-fields");return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[t?(0,n.jsx)(m,{label:f("transaction-id"),children:(0,n.jsx)(o.Z,{text:t,variant:"inline",className:"!p-0",iconClassname:"text-icon-active",tooltipContent:(0,n.jsx)(l.e,{})})}):null,(0,n.jsx)(v,{fields:r,isPending:c,isStaled:u}),(0,n.jsx)(x,{className:i()("flex flex-col gap-3 px-3",u&&"opacity-50"),details:a}),d]})}},40780:function(e,t,r){"use strict";r.d(t,{B:function(){return a}});var n=r(4901);let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{isEnabled:r=!0}=t,a=(0,n.CG)(t=>r?t.walletAddress[e].status:"fulfilled");return(0,n.CG)(t=>{if(!r)return!0;let{isExtraIdRequired:n,extraId:a}=t.walletAddress[e];return!n||!!a})?a:"extra-id-needed"}},25768:function(e,t,r){"use strict";r.d(t,{f:function(){return i}});var n=r(7653),a=r(81695);let i=(e,t)=>
1{let r=(0,a.useSearchParams)(),[i,s]=(0,n.useState)([]);(0,n.useEffect)(()=>{s(e.map(e=>{let t={};for(let n of e)t[n.apiKey]=(null==r?void 0:r.get(n.apiKey))||"";return t}))},[e,r]);let o=(0,n.useMemo)(()=>i[t],[t,i]),l=(0,n.useCallback)((e,r)=>{s(n=>n.map((n,a)=>a===t?{...n,[e]:r}:n))},[t]);return{values:(0,n.useMemo)(()=>i.reduce((e,t)=>({...e,...t}),{}),[i]),valuesOnCurrentPage:o,onChange:l}}},31636:function(e,t,r){"use strict";r.d(t,{N:function(){return a},t:function(){return i}});var n=r(99163);let a=(0,n.Xw)({event:n.gC,event_name:"processing_brla_click_cpf_field"}),i=(0,n.Xw)({event:n.gC,event_name:"processing_brla_enter_correct_cpf"})},60573:function(e,t,r){"use strict";r.d(t,{$o:function(){return u},ET:function(){return m},Im:function(){return i},LZ:function(){return s},MW:function(){return c},_k:function(){return o},hp:function(){return l},ru:function(){return d}});var n=r(99163),a=r(40168);let i=e=>"fixed"===e?"fix":"float",s=(0,n.Xw)(e=>({event:n.gC,event_name:"processing_change_rate_type",rate_type:e})),o=(0,n.Xw)({event:n.gC,event_name:"processing_show_available_providers"}),l=(0,n.Xw)(e=>({event:n.gC,event_name:"processing_filter_payment_method",type:e})),c=(0,n.Xw)(e=>{let{txType:t,currencyFrom:r="",currencyTo:a="",amountFrom:i="",amountTo:s="",providerKey:o="",index:l=0}=e;return{event:n.gC,event_name:"processing_choose_provider",tx_type:t,currency_from:r,currency_to:a,amount_from:i,amount_to:s,provider:o,type:l}}),u=(0,n.Xw)(function(){let{txType:e,provider:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={event:n.gC,event_name:"funnel_submit_calculator"};return e===a.W.F2C?{...r,tx_type:e,provider:t}:r}),d=e=>{let{extraIdName:t,isRequired:r,extraId:n}=e;return n?"memo_given":t&&!r?"memo_ignored":"no_memo"},m=(0,n.Xw)(e=>{let{txType:t,currencyFrom:r,currencyTo:i,amountFrom:s,amountTo:o,rateType:l,transactionId:c,provider:u,promoCode:d,recipientMemoStatus:m,refundMemoStatus:f,networkFee:p,exchangeFee:h,status:v,bonusAcurred:g,bonusRedempt:x}=e,b={event:n.gC,event_name:"funnel_create_transaction",tx_type:t,amount_from:s,amount_to:o,currency_from:r,currency_to:i,transaction_id:c,applied_promocode:d||""};if(t===a.W.C2C)return{...b,rate_type:l,network_fee:p,exchange_fee:h,bonus_acurred:g,bonus_redempt:x,memo_status:[m?"recipient:".concat(m):void 0,f?"refund:".concat(f):void 0].filter(Boolean).join(" ")};if(t===a.W.F2C||t===a.W.C2F){let e={provider:u};return v&&(e.tx_status=v),{...b,...e}}return b})},71264:function(e,t,r){"use strict";r.d(t,{WidgetContextConfigProvider:function(){return s}});var n=r(27573),a=r(44537),i=r(39418);let s=e=>{let{children:t,config:r=a.H}=e;return(0,n.jsx)(i.z,{value:r,children:t})}},399:function(e,t,r){"use strict";r.d(t,{R:function(){return s}});var n=r(76002),a=r.n(n),i=r(44537);let s=e=>a()(i.H,e)},34002:function(e,t,r){"use strict";r.d(t,{f:function(){return c}});var n=r(20975),a=r(40168),i=r(33515);let s={[a.W.C2C]:"exchange",[a.W.C2F]:"sell",[a.W.F2C]:"buy"},o={...s,[a.W.C2F]:"withdraw",[a.W.F2C]:"deposit"},l=(e,t)=>"exchange-buy-sell"===t?"".concat(s[e],"-button-title"):"exchange-deposit-withdraw"===t?"".concat(o[e],"-button-title"):"next-step",c=(e,t)=>{let r=(0,n.T_)("processing"),{buttonText:a}=(0,i.useWidgetConfig)("layout");return r(l(e,a),{ticker:(t||"").toUpperCase()})}},44761:function(e,t,r){"use strict";r.d(t,{N:function(){return a},W:function(){return n}});let n=["exchange","buy","sell"],a=e=>n.includes(e)},84526:function(e,t,r){"use strict";r.d(t,{j:function(){return s}});var n=r(81695),a=r(44761),i=r(32289);let s=()=>{let e=(0,i.t)(),t=(0,n.useSearchParams)();return r=>{let{transactionId:n,urlSearchParams:i={}}=r,s=new URLSearchParams(i),o=t.get("flow");(0,a.N)(o)&&s.set("flow",o),s.set("transaction_id",n),e.push("?".concat(s))}}},99353:function(e,t,r){"use strict";r.d(t,{a:function(){return o}});var n=r(27573),a=r(45254),i=r.n(a),s=r(36214);function o(e){let{className:t}=e;return(0,n.jsxs)("div",{className:i()("flex justify-between items-center h-10",t),children:[(0,n.jsx)(s.Z,{width:"calc(100% - 132px)",height:"32px"}),(0,n.jsx)(s.Z,{width:"120px",height:"32px"})]})}},30234:function(e,t,r){"use strict";r.d(t,{e:function(){return i}});var n=r(27573),a=r(20975);let i=()=>{let e=(0,a.T_)("general@common");return(0,n.jsx)("span",{children:e("copied-to-clipboard")})}},79860:function(e,t,r){"use strict";r.d(t,{r:function(){return n}});
1let n="min-h-[var(--min-widget-height,_421px)] md:min-h-[var(--min-widget-height,_445px)]"},14792:function(e,t,r){"use strict";var n=r(27573),a=r(45254),i=r.n(a);t.Z=e=>{let{currencyCode:t="",amount:r="0",className:a,dataTnav:s}=e;return(0,n.jsxs)("div",{className:i()(a,"flex gap-0.5 truncate"),"data-tnav":s,children:[(0,n.jsx)("div",{className:"truncate",children:r}),(0,n.jsx)("div",{children:t.toUpperCase()})]})}},11581:function(e,t,r){"use strict";var n=r(27573),a=r(14792);t.Z=e=>{let{rateType:t,rate:r,currencyFrom:i,currencyTo:s}=e;if("0"!==r)return(0,n.jsxs)("div",{className:"min-w-0 max-w-full flex gap-1",children:[(0,n.jsx)(a.Z,{amount:"1",currencyCode:i}),(0,n.jsx)("span",{children:"fixed"===t?"=":"~"}),(0,n.jsx)(a.Z,{amount:r,currencyCode:s})]})}},82114:function(e,t,r){"use strict";r.d(t,{ModalFullscreen:function(){return g}});var n=r(27573),a=r(3458),i=r(45254),s=r.n(i),o=r(54721),l=r(15531),c=r(40684),u=r(75037),d=r(1022),m=r(70173),f=r(19698),p=r(66481),h=r(39945);let v=e=>(0,o.aM)(e,200,{presenceClassName:"transition-transform transform-gpu",offClassName:"translate-y-full",onClassName:"translate-y-0"}),g=e=>{let{id:t,onClose:r,onOpen:i,children:o,title:g,dataTnav:x,bodyClassName:b,footer:y,offsetTop:w}=e,_=(0,p.useModalState)(t,{onOpen:i,onClose:r}),{close:C}=(0,m.useModalHandlers)(t),j=(0,f.B)(),{isAppeared:k,className:N}=v(_),T=(0,c.a)("(min-width: ".concat(u._V,")"));if(!j||!_&&!k)return null;let A=T?d.C:d.x,I=T?h.M:0,E="number"==typeof w?w:I;return(0,a.createPortal)((0,n.jsx)(A,{children:(0,n.jsx)(l.Z,{closeClickHandler:C,title:g,variant:"spacious",size:"auto",rounded:!1,headerDivider:!1,className:s()("absolute z-10 bottom-0 w-full left-0",N),dataTnav:x,footer:y,bodyClassName:b,style:{maxHeight:"calc(100% - ".concat(E,"px)"),top:E},children:"function"==typeof o?o({isOpen:_,close:C}):o})}),j,t)}},9272:function(e,t,r){"use strict";r.d(t,{F:function(){return s}});var n=r(27573),a=r(45254),i=r.n(a);let s=e=>{let{icon:t=null,title:r,description:a,additionalContent:s=null,className:o}=e;return(0,n.jsxs)("div",{className:i()(o,"flex flex-col gap-4 mb-4"),children:[(0,n.jsxs)("header",{children:[(0,n.jsxs)("h5",{className:"flex items-center gap-2 sm:gap-1 heading-5",children:[t,(0,n.jsx)("span",{children:r})]}),a?(0,n.jsx)("p",{className:"caption-m text-content-secondary",children:a}):null]}),s]})}},76257:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(27573),a=r(36214);let i=()=>(0,n.jsxs)("div",{className:"flex flex-col gap-0 sm:gap-2 sm:pt-2.5 pt-1.5 pb-1.5",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center h-10",children:[(0,n.jsx)(a.Z,{height:"24px",width:"30%"}),(0,n.jsx)(a.Z,{height:"24px",width:"24px",variant:"circle"})]}),(0,n.jsx)(a.Z,{height:"4px"})]})},48381:function(e,t,r){"use strict";var n=r(27573),a=r(36214),i=r(76257);t.Z=()=>(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-5",children:[(0,n.jsx)(i.K,{}),(0,n.jsx)(a.Z,{width:"100%",height:"44px"}),(0,n.jsx)(a.Z,{width:"100%",height:"160px"})]})},24981:function(e,t,r){"use strict";r.d(t,{R:function(){return v},Z:function(){return g}});var n=r(27573),a=r(45254),i=r.n(a),s=r(22996),o=r(76257),l=r(36214),c=r(40168),u=r(99353),d=r(52412),m=r.n(d),f=e=>{let{className:t,withFooter:r,flow:a}=e;return(0,n.jsx)("div",{className:i()(m().wrapper,t),"data-tnav":"calculator-form",children:(0,n.jsxs)("div",{className:m().root,children:[(0,n.jsx)("div",{className:m().inputWrapper,children:(0,n.jsxs)("div",{className:"bg-bg-default p-4 rounded-8",children:[(0,n.jsx)(l.Z,{width:"15%",height:"16px",className:i()(m().label,"xs:mb-1.5")}),(0,n.jsxs)("div",{className:m().inputWithLogo,children:[(0,n.jsx)(l.Z,{variant:"circle",width:"38px",className:m().logoSkeleton}),(0,n.jsxs)("div",{className:m().currencyInputWrp,children:[(0,n.jsxs)("div",{className:m().tickerAmountWrp,children:[(0,n.jsx)(l.Z,{width:"25%",height:"24px"}),(0,n.jsx)(l.Z,{width:"40%",height:"24px"})]}),(0,n.jsx)(l.Z,{width:"35%",height:"24px"})]})]})]})}),(0,n.jsxs)("div",{className:m().inputWrapper,children:[(0,n.jsxs)("div",{className:i()(m().inputRoot,"bg-bg-default p-4 rounded-8"),children:[(0,n.jsx)(l.Z,{width:"15%",height:"16px",className:i()(m().label,"xs:mb-1.5")}),(0,n.jsxs)("div",{className:m().inputWithLogo,children:[(0,n.jsx)(l.Z,{variant:"circle",width:"36px",className:m().logoSkeleton}),(0,n.jsxs)("div",{className:m().currencyInputWrp,children:[(0,n.jsxs)("div",{className:m().tickerAmountWrp,children:[(0,n.jsx)(l.Z,{width:"25%",height:"24px"}),(0,n.jsx)(l.Z,{width:"40%",height:"24px"})]}),(0,n.jsx)(l.Z,{width:"35%",height:"24px"})]})]}
1),r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("hr",{className:"my-4 -mx-4 text-bg-secondary"}),(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)(l.Z,{width:"40%",height:"18px"}),(0,n.jsx)(l.Z,{width:"20%",className:"!h-6 sm:!h-8 !rounded-24"})]})]}):null]}),a===c.W.C2C?(0,n.jsx)(u.a,{className:"mt-4"}):null]})]})})},p=r(33089),h=r.n(p);let v=e=>{let{animation:t=!0,flow:r}=e;return(0,n.jsxs)("div",{className:i()("flex flex-1 flex-col gap-5",{[h().animateNone]:!t}),children:[(0,n.jsx)("div",{}),(0,n.jsx)(f,{flow:r}),(0,n.jsx)(s.Z,{fluid:!0,disabled:!0,title:"Loading...",children:" "})]})};var g=e=>{let{animation:t=!0,flow:r}=e;return(0,n.jsxs)("div",{className:i()("flex flex-1 flex-col gap-5",{[h().animateNone]:!t}),children:[(0,n.jsx)(o.K,{}),(0,n.jsx)(f,{withFooter:!0,flow:r}),(0,n.jsx)(s.Z,{fluid:!0,disabled:!0,title:"Loading...",children:" "})]})}},94006:function(e,t,r){"use strict";var n=r(27573),a=r(7653),i=r(64070),s=r(24981),o=r(97410);let l=(0,i.default)(()=>Promise.resolve().then(r.bind(r,81378)),{loadableGenerated:{webpack:()=>[81378]},ssr:!1,loading:()=>(0,n.jsx)(s.R,{})});t.default=e=>{let{translations:t,errorMessages:r}=e,[i,c]=(0,a.useState)(!1),{resolveRender:u}=(0,o.s)();return((0,a.useEffect)(()=>{u&&c(!0)},[u]),i)?(0,n.jsx)(l,{translations:t,errorMessages:r}):(0,n.jsx)(s.R,{})}},81378:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return T}});var n=r(27573),a=r(3458),i=r(3629),s=r(63265),o=r(24981),l=r(7653),c=r(4901),u=r(61405),d=r(22155);let m=e=>{let{map:t,from:r,to:n}=e,a={};Object.values(t).forEach(e=>{let{fullName:t,ticker:r,coin:n,network:i,blockchainPrecision:s,iconUrl:o,key:l}=e;a[l]={id:l,currencyIconUrl:o,extraIdName:void 0,ticker:r,fullName:t,coin:n,blockchainPrecision:s,network:i}});let i=Object.values(r.tags).map(e=>{let{key:t,name:r,ids:n,iconUrl:a}=e;return{tagId:t,ids:n,iconUrl:a||void 0,tagCaption:"string"==typeof r?r.charAt(0).toUpperCase()+r.slice(1):r}}),s=Object.values(n.tags).map(e=>{let{key:t,name:r,ids:n,iconUrl:a}=e;return{tagId:t,ids:n,iconUrl:a||void 0,tagCaption:"string"==typeof r?r.charAt(0).toUpperCase()+r.slice(1):r}});return{currenciesMap:a,fromCurrencies:[{ids:r.ids,tagId:"all",tagCaption:"All"}].concat(i),toCurrencies:[{ids:n.ids,tagId:"all",tagCaption:"All"}].concat(s),fromIds:r.ids,toIds:n.ids}},{useDexConfigQuery:f,useDexEstimateQuery:p,useDexCurrenciesQuery:h}=d.a.injectEndpoints({endpoints:e=>({dexConfig:e.query({query:()=>({url:(0,d.J)("/v1/defi/config","bff"),method:"GET"}),transformResponse:e=>{let{defaultCurrencyFrom:t,defaultCurrencyTo:r,defaultAmount:n}=e;return{fromCurrencyId:t,toCurrencyId:r,fromAmountValue:n,toAmountValue:"",flow:"dex"}}}),dexEstimate:e.query({query:e=>{let{fromCurrencyTicker:t,toCurrencyTicker:r,fromAmountValue:n}=e;return{url:(0,d.J)("/v1/defi/estimate","bff"),body:{from:t,to:r,amountFrom:n,amountTo:void 0},method:"POST"}},transformResponse:e=>({fromAmountValue:e.amountFrom,toAmountValue:e.amountToFinal,processingUrl:e.processingUrl}),keepUnusedDataFor:0}),dexCurrencies:e.query({query:()=>({url:(0,d.J)("/v1/defi/currencies","bff"),method:"GET"}),keepUnusedDataFor:0,transformResponse:m})})}),v=()=>{let e=(0,c.TL)(),[t,r]=(0,l.useState)(!1),{currentData:n,isFetching:a}=f(),{currentData:i,isFetching:s}=h();return(0,l.useEffect)(()=>{let{fromAmountValue:t,fromCurrencyId:r,toCurrencyId:a}=n||{};if(i&&t&&r&&a){let n=i.currenciesMap[r],s=i.currenciesMap[a];e((0,u.T1)({flow:"dex",type:"from",value:t})),e((0,u.NW)({flow:"dex",type:"from",currency:n})),e((0,u.NW)({flow:"dex",type:"to",currency:s}))}},[n,a,i,s,e]),(0,l.useEffect)(()=>()=>{e((0,u.Rh)("dex"))},[e]),{config:n,currencies:i,configIsFetching:a,currenciesIsFetching:s,currenciesIsOpen:t,setCurrenciesIsOpen:r}};var g=r(89382),x=r(25719),b=r(99163);let y=(0,b.Xw)({event:b.gC,event_name:"funnel_submit_calculator"}),w=(0,b.Xw)(e=>{let{type:t,customValue:r}=e;return{event:b.gC,event_name:"processing_filter_network",type:t,custom_value:r}}),_=()=>{let e=(0,c.TL)(),{fromAmountValue:t,selectedCurrency:r}=(0,c.CG)(e=>e.calculator.dex),{from:n,to:a}=r,i=(0,g.y1)(x.Yv,500),s=(0,l.useCallback)(()=>{(null==n?void 0:n.ticker)&&(null==a?void 0:a.ticker)&&(e((0,u.KS)("dex")),x.aQ({txType:"dex",setAmount:t,setAmountType:"from",currencyFrom:a.ticker,currencyTo:n.ticker}))},[e,null==n?void 0:n.ticker,t,null==a?void 0:a.ticker]),o=(0,l.useCallback)(t=>{if((null==n?void 0:n.ticker)&&(null==a?void 0:a.ticker)){if(0===t.length){e((0,u.T1)({type:"from",value:"",flow:"dex"}));return}e((0,u.T1)({type:"from",value:t,flow:"dex"})),i({eventType:"from",txType:"dex",setAmount:t,setAmountType:"from",currencyFrom:n.ticker,currencyTo:a.ticker})}},[i,e,null==n?void 0:n.ticker,null==a?void 0:a.ticker]),d=(0,l.useCallback)((r,n)=>{let{id:i}=r;if(null==a?void 0:a.id){if(i===a.id){s({fromCurrencyId:i,toCurrencyId:a.id});return}e((0,u.NW)({type:"from",currency:r,flow:"dex"})),x.sy({type:n,eventType:"from",setAmount:t,setAmountType:"from",txType:"dex",currencyFrom:i,currencyTo:a.id})}},[null==a?void 0:a.id,e,t,s]),m=(0,l.useCallback)((r,a)=>{let{id:i}=r;if(null==n?void 0:n.id){if(n.id===i){s({fromCurrencyId:i,toCurrencyId:n.id});return}e((0,u.NW)({type:"to",currency:r,flow:"dex"})),x.sy({type:a,setAmount:t,setAmountType:"from",eventType:"to",txType:"dex",currencyFrom:n.id,currencyTo:i})}},[null==n?void 0:n.id,e,t,s]),f=(0,l.useCallback)(e=>{(null==n?void 0:n.id)&&(null==a?void 0:a.id)&&x.M5({txType:"dex",setAmount:e,setAmountType:"from",currencyFrom:n.id,currencyTo:a.id,eventType:"from"})},[null==n?void 0:n.id,null==a?void 0:a.id]),p=(0,g.y1)(e=>{let{searchValue:t,searchResult:r,type:n}=e;t.length>0&&(x.ru({customValue:t,type:n}),0===r.length&&x.h7({type:n,customValue:t,txType:"dex"}))},1e3);return{currencyListTagOnClick:(0,l.useCallback)((e,t)=>{w({type:t,customValue:e})},[]),fromOnChangeAmount:o,fromOnSelectCurrency:d,toOnSelectCurrency:m,onSelectLimitsAmount:f,onSearchItems:p,onSwitchCurrencies:s}},C=()=>{let{fromAmountValue:e,toAmountValue:t,selectedCurrency:r}=(0,c.CG)(e=>e.calculator.dex),{from:n,to:a}=r;return{fromAmountValue:e,fromCurrencyId:(null==n?void 0:n.id)||"",toCurrencyId:(null==a?void 0:a.id)||"",toAmountValue:t}},j=()=>{var e;let{fromAmountValue:t,fromCurrencyId:r,toCurrencyId:n}=C(),[a,{isPending:i}]=(0,g.Nr)(t,500),s=Number(a)>0&&!!r&&!!n,o=(0,c.CG)(e=>e.calculator.dex),{currentData:u,isFetching:d,isError:m,error:f,isUninitialized:h}=p({fromAmountValue:a,toAmountValue:null,fromCurrencyTicker:r,toCurrencyTicker:n},{skip:!s||i(),pollingInterval:3e4,skipPollingIfUnfocused:!0}),v=m||void 0!==u&&!u.toAmountValue,b=null==f?void 0:null===(e=f.data)||void 0===e?void 0:e.code;return(0,l.useEffect)(()=>{u&&(0,x.ki)(o,{...u,flow:"dex"},{})},[u]),{currentData:u,isFetching:d,isUninitialized:h,isValidParams:s,isError:v,errCode:b}};var k=r(22996);let N=e=>{let{children:t,url:r,isPending:a}=e;return a||!r?(0,n.jsx)(k.Z,{fluid:!0,"data-tnav":"exchange-action-button",disabled:!0,children:t}):(0,n.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",children:(0,n.jsx)(k.Z,{fluid:!0,onClick:y,"data-tnav":"exchange-action-button",children:t})})};var T=e=>{let{translations:t,errorMessages:r}=e,{currencies:l,currenciesIsFetching:c,config:u,configIsFetching:d,currenciesIsOpen:m,setCurrenciesIsOpen:f}=v(),p=_(),{isUninitialized:h,isFetching:g,isValidParams:x,isError:b,currentData:y,errCode:w}=j(),{fromAmountValue:k,fromCurrencyId:T,toCurrencyId:A}=C(),I={INTERNAL:r.error,UNAVAILABLE:r.unavailable,GATEWAY_TIMEOUT:r.timeout,UNPROCESSABLE_ENTITY:r.currency,DEFI_UNSUPPORTED_EXCHANGE_PAIR:r.currency,DEFI_LOW_LIMITS_ERROR:r.smallAmount,DEFI_HIGH_LIMIT
1S_ERROR:r.bigAmount,DEFI_QUOTE_UNAVAILABLE:"The requested pair cannot be quoted"},E=w in I?I[w]:I.INTERNAL,F=["DEFI_UNSUPPORTED_EXCHANGE_PAIR","DEFI_LOW_LIMITS_ERROR","DEFI_HIGH_LIMITS_ERROR","UNPROCESSABLE_ENTITY","DEFI_QUOTE_UNAVAILABLE"].includes(w)?"warning":"error";return!c&&!d&&T&&A&&u&&l?(0,n.jsxs)("div",{className:"flex flex-col gap-4 mt-6",children:[(0,n.jsx)(i.Z,{...p,...l,unsupportedPairsText:t.common.cannotSwapped,fromAmountValue:k||"",toAmountValue:(null==y?void 0:y.toAmountValue)||"",toAmountIsPending:!!x&&(g||h),fromCurrencyId:T,toCurrencyId:A,equalMode:"approximate",fromLabel:t.common.youSend,toLabel:t.common.youGet,minAmountLabel:t.common.minAmountLabel,maxAmountLabel:t.common.maxAmountLabel,alerts:b?[{status:F,value:E}]:void 0,currencyListTitle:t.common.currencyListTitle,currencyListSearchPlaceholder:t.common.currencyListSearchPlaceholder,currencyListOnClose:()=>f(!1),onClickCurrency:()=>f(!0),renderCurrencyList:e=>m?(0,a.createPortal)((0,n.jsx)(s.Z,{isOpen:m,handleButtonClick:()=>f(!1),children:e}),document.body,"CurrencyList"):null}),(0,n.jsx)(N,{url:null==y?void 0:y.processingUrl,isPending:h||g||b,children:t.dex.button})]}):(0,n.jsx)(o.R,{})}},51495:function(e,t,r){"use strict";r.d(t,{E:function(){return i}});var n=r(8253),a=r(40168);let i={[a.W.C2F]:n.r.C2F_REFUND,[a.W.F2C]:n.r.F2C_DESTINATION}},33580:function(e,t,r){"use strict";r.d(t,{q:function(){return N},i:function(){return k}});var n=r(7653),a=r(70089),i=r(26066),s=r(89382),o=r(78712),l=r(18103),c=r(4901),u=r(61405),d=r(64371),m=r(74718);let f={greatPick:"Great pick",new:"New",optimal:"Optimal",bestOffer:"Best offer"},p=e=>e in f?f[e]:e;var h=r(94625),v=r(40168),g=r(22155);let x=(e,t)=>{let{clientId:r,...n}=(0,m.U)(),{fromCurrencyTicker:a,toCurrencyTicker:i,fromAmountValue:s,toAmountValue:o,promocode:l}=e;return{from:a,to:i,amountFrom:""===s?null:s,amountTo:""===o?null:o,source:"widget"===t?void 0:v.t.Web,user:{clientId:r},metadata:n,promocode:l}},b=g.a.injectEndpoints({endpoints:e=>({fiatEstimate:e.query({queryFn:async(e,t,r,n)=>{let{version:i="v1",flow:s,...o}=e,{getState:l}=t,c=l(),u=(0,h.Q)(c,{web:i,widget:"v1"}),d=await n({url:(0,g.J)("".concat(u,"/").concat(s,"/estimate/"),"bff"),body:x(o,c.processingConfig.appType),method:"POST"});return d.error?{error:d.error}:d.data?{data:function(e){try{return{...e,offers:e.offers.map(e=>({...e,labels:e.labels?e.labels.map(e=>"string"==typeof e?{value:p(e),variant:"primary"}:e):null}))}}catch(t){throw(0,a.Tb)(t,{level:"fatal",extra:e}),t}}(d.data)}:{error:{status:"PARSING_ERROR",error:"No data in response"}}},keepUnusedDataFor:0})})});var y=r(75640),w=r(83627);let _=e=>{if(e&&e.length)return e.reduce((e,t)=>(t.labels&&t.labels.forEach(r=>{e[r.value]=t.key}),e),{})},C=["limits"],j=e=>{if(!e)return;let t=e.find(e=>e.labels&&e.labels.length);return t?t:e.find(e=>!e.error)||e[0]},k=function(){var e,t,r,u,d,m;let{analytics:f}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{flow:p}=(0,y.useFiatProcessingFlow)(),h=(0,c.CG)(e=>e.fiatProcessing[p].selectedOfferId),g=(0,c.CG)(e=>e.fiatProcessing[p].previousSelectedOfferId),x=(0,c.CG)(e=>e.calculator[p].fromAmountValue),k=(0,c.CG)(e=>e.calculator[p].toAmountValue),N=(0,c.CG)(e=>{var t;return(null===(t=e.calculator[p].selectedCurrency.from)||void 0===t?void 0:t.ticker)||""}),T=(0,c.CG)(e=>{var t;return(null===(t=e.calculator[p].selectedCurrency.to)||void 0===t?void 0:t.ticker)||""}),[A]=(0,s.Nr)(x,500),I=!!A&&!!N&&!!T,E=(0,c.CG)(e=>e.promoCode.value),F=p===v.W.F2C&&"widget_ct"!==(0,l.C3)(),{currentData:S,isFetching:W,error:P,isError:M,isSuccess:R,startedTimeStamp:O=0,fulfilledTimeStamp:Z=0,refetch:L}=b.useFiatEstimateQuery({flow:p,version:F&&"new"===i.Z.get(o.uT)?"v2":"v1",fromAmountValue:A,fromCurrencyTicker:N,toCurrencyTicker:T,promocode:E},{skip:!I,pollingInterval:3e4,skipPollingIfUnfocused:!0}),U=(0,n.useMemo)(()=>!M&&S?S:void 0,[M,S]),D=(0,n.useMemo)(()=>{var e;return(null==U?void 0:null===(e=U.offers)||void 0===e?void 0:e.find(e=>!!h&&h===e.key))||j(null==U?void 0:U.offers)},[U,h]),H=(0,n.useMemo)(()=>(null==U?void 0:U.offers)?U.offers.filter(e=>{let{error:t}=e;return!t||C.includes(t.type)}):[],[null==U?void 0:U.offers]),G=(0,n.useMemo)(()=>H.filter(e=>{var t;return!!(null===(t=e.labels)||void 0===t?void 0:t.length)}),[H]),V=null==D?void 0:null===(t=D.error)||void 0===t?void 0:null===(e=t.details)||void 0===e?void 0:e.min,q=null==D?void 0:null===(u=D.error)||void 0===u?void 0:null===(r=u.details)||void 0===r?void 0:r.max,X=null==D?void 0:null===(m=D.error)||void 0===m?void 0:null===(d=m.details)||void 0===d?void 0:d.reason,B=M&&"object"==typeof P&&("code"in P||"message"in P)?{type:P.code||"",message:P.message||""}:void 0,z=!R||W||(null==U?void 0:U.offers.length)?void 0:{type:"error",message:""},K=(null==D?void 0:D.error)||B||z||null,J=(0,n.useMemo)(()=>Z-O,[Z,O]);return(0,n.useEffect)(()=>
1{if(f){if(K)return(0,w.il)({txType:p,amountFrom:x,amountTo:k,currencyFrom:N,currencyTo:T,selectedProvider:null==D?void 0:D.key,error:K.type});if(U&&D){if((0,w.n2)({txType:p,estimationId:U.estimationId,amountFrom:x,amountTo:D.amount||"",currencyFrom:N,currencyTo:T,selectedProvider:null==D?void 0:D.key,availableProviders:U.offers.filter(e=>!e.error).map(e=>e.key||""),providersLabels:_(U.offers),responseTime:J,promocode:E}),p===v.W.F2C){let e=i.Z.get(o.uT);(0,a.mG)({abVariant:"smart-routing-".concat(e)})}(0,a.uT)("new processing: ".concat(p," offers ready"))}}},[null==U?void 0:U.lastUpdate]),{currentOffer:D,refetch:L,previousOffer:H.find(e=>e.key===g),selectedOfferId:(null==D?void 0:D.key)||h,isPending:W,offers:(null==U?void 0:U.offers)||[],displayedOffers:H,promoOffers:G,paymentMethods:(null==U?void 0:U.paymentMethods)||[],limits:{minAmount:V,maxAmount:q,reason:X},error:K}},N=()=>{let e=(0,c.TL)(),{flow:t}=(0,y.useFiatProcessingFlow)(),{currentOffer:r}=k();(0,n.useEffect)(()=>{e((0,d.sD)(t))},[]),(0,n.useEffect)(()=>{(null==r?void 0:r.amount)?e((0,u.T1)({flow:t,type:"to",value:null==r?void 0:r.amount})):e((0,u.T1)({type:"to",value:"",flow:t}))},[e,null==r?void 0:r.amount,t])}},18388:function(e,t,r){"use strict";r.d(t,{p:function(){return i}});var n=r(4901),a=r(75640);let i=()=>{let{flow:e}=(0,a.useFiatProcessingFlow)();return{fromAmount:(0,n.CG)(t=>t.calculator[e].fromAmountValue),toAmount:(0,n.CG)(t=>t.calculator[e].toAmountValue)}}},48905:function(e,t,r){"use strict";r.d(t,{J:function(){return i}});var n=r(75640),a=r(33515);let i=()=>{let{flow:e}=(0,n.useFiatProcessingFlow)();return(0,a.useWidgetConfig)("flows")[e]||{}}},36373:function(e,t,r){"use strict";r.d(t,{Z:function(){return es}});var n,a,i=r(27573),s=r(7653),o=r(70089),l=r(20975),c=r(22996),u=r(3629),d=r(72741),m=r(4901),f=r(5602),p=r(64371),h=r(12215),v=r(60573),g=r(75640),x=r(34002),b=r(70173),y=r(48905),w=r(28272),_=r(8127),C=r(90402),j=r(94306),k=r(40168);let N=()=>{let e=(0,l.T_)("promo-code"),t=(0,m.TL)(),{applied:r}=(0,m.CG)(e=>e.promoCode);return(0,i.jsxs)("div",{className:"min-h-7 mx-auto",children:[r?(0,i.jsxs)("div",{className:"flex gap-2 items-center font-semi-bold text-p2","data-tnav":"promocode-applied-message",children:[(0,i.jsx)(w.Z,{className:"text-feedback-success-contrast size-4"}),(0,i.jsx)("span",{children:e("applied")})]}):(0,i.jsx)(C.Z,{}),(0,i.jsx)(j.Z,{onSubmit:e=>{t((0,_.Zj)(e))},flow:k.W.F2C})]})};var T=e=>{let{messages:t={},error:r}=e;if(!r)return;let n={status:"error",value:t.error||"Something went wrong! Try again later."};try{let e=(null==r?void 0:r.type)||void 0;if(e&&["limits"].includes(e))return;if(e&&e in t)return[{status:"error",value:t[e]}];if(e||(null==r?void 0:r.message))return[n];return}catch(e){return(0,o.Tb)(e),[n]}},A=r(89382),I=r(25719),E=r(61405),F=r(48144),S=r(51495);let W=()=>{let e=(0,m.TL)(),{flow:t}=(0,g.useFiatProcessingFlow)(),{fromAmountValue:r,selectedCurrency:n,toAmountValue:a}=(0,m.CG)(e=>e.calculator[t]),{from:i,to:o}=n,l=(0,A.y1)(I.Yv,500),c=(0,s.useCallback)(r=>{if((null==i?void 0:i.ticker)&&(null==o?void 0:o.ticker)){if(0===r.length){e((0,E.T1)({type:"from",value:"",flow:t}));return}e((0,E.T1)({type:"from",value:r,flow:t})),l({eventType:"from",txType:t,setAmount:r,setAmountType:"from",currencyFrom:i.ticker,currencyTo:o.ticker})}},[l,e,t,null==i?void 0:i.ticker,null==o?void 0:o.ticker]),u=(0,s.useCallback)((n,a)=>{let{ticker:s}=n;(null==o?void 0:o.ticker)&&(e((0,E.NW)({type:"from",currency:n,flow:t})),s!==(null==i?void 0:i.ticker)&&e((0,F.oA)({fieldId:S.E[t]})),I.sy({type:a,eventType:"from",setAmount:r,setAmountType:"from",txType:t,currencyFrom:s,currencyTo:o.ticker}))},[null==o?void 0:o.ticker,null==i?void 0:i.ticker,e,t,r,a]);return{fromOnChangeAmount:c,fromOnSelectCurrency:u,toOnSelectCurrency:(0,s.useCallback)((n,a)=>
1{if(!(null==i?void 0:i.ticker))return;let{ticker:s}=n;s!==(null==o?void 0:o.ticker)&&e((0,F.oA)({fieldId:S.E[t]})),e((0,E.NW)({type:"to",currency:n,flow:t})),I.sy({type:a,setAmount:r,setAmountType:"from",eventType:"to",txType:t,currencyFrom:i.ticker,currencyTo:s})},[null==i?void 0:i.ticker,e,t,r]),onSelectLimitsAmount:(0,s.useCallback)(e=>{(null==i?void 0:i.ticker)&&(null==o?void 0:o.ticker)&&I.M5({txType:t,setAmount:e,setAmountType:"from",currencyFrom:i.ticker,currencyTo:o.ticker,eventType:"from"})},[t,null==i?void 0:i.ticker,null==o?void 0:o.ticker]),onSearchItems:(0,A.y1)(e=>{let{searchValue:r,searchResult:n,type:a}=e;0===n.length&&r.length>0&&I.h7({type:a,customValue:r,txType:t})},1e3)}};var P=r(33580),M=r(18388);let R={[k.W.C2F]:"offers-modal-c2f",[k.W.F2C]:"offers-modal-f2c"};var O=r(33515),Z=r(82114),L=r(45254),U=r.n(L),D=r(36214),H=r(22924),G=r(17848),V=r(54721),q=r(13276),X=r(69061);let B=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.Z,{height:"24px",width:"80px"}),(0,i.jsx)("span",{className:"hidden sm:block",children:"/"}),(0,i.jsx)(D.Z,{height:"24px",width:"80px"}),(0,i.jsx)(D.Z,{height:"16px",width:"50px",className:"block ml-auto"})]}),z=e=>{let{className:t,labels:r}=e;if(!Array.isArray(r)||!(null==r?void 0:r.length))return null;let n={primary:"bg-offer-card-bg text-offer-card-text",secondary:"bg-feedback-neutral-surface-hover text-content-primary",ternary:"bg-content-primary text-bg-elevated"};return(0,i.jsx)("div",{className:U()("flex gap-2",t),"data-tnav":"offer-label",children:r.map(e=>{let t="string"==typeof e?e:e.value,r="string"!=typeof e&&e.variant in n?n[e.variant]:n.primary;return t?(0,i.jsx)(H.Z,{theme:G.r.Custom,className:U()("uppercase",r),children:t},t):null})})};var K=e=>{let{method:t,providerName:r,providerCode:n,methodName:a,onClick:s,tNav:o,labels:l=[],inlineLabels:c=!1,amount:u,errMessage:d,active:m,pending:f}=e,p=t&&u,{isAppeared:h,className:v}=(0,V.Yz)(!!m,200,{enterClassName:"transition-transform will-change-transform transform-gpu",enterFromClassName:"scale-x-0",enterToClassName:"scale-x-100",leaveClassName:"scale-x-0"}),g="absolute -inset-px rounded-8",x=c&&!!l&&l.length<2;return(0,i.jsxs)("div",{className:"relative rounded-8 m-0.5",children:[(0,i.jsx)("div",{className:U()("bg-border-static",g)}),h?(0,i.jsx)("div",{className:U()("bg-gradient-greenDay",g,v)}):null,(0,i.jsxs)("div",{"data-tnav":"".concat(o," ").concat(n," ").concat(t),onClick:p||m?s:void 0,className:U()("relative flex items-center rounded-[7px] p-4 gap-3 h-12 bg-bg-elevated",{"cursor-pointer":!m,"!cursor-not-allowed":!p}),children:[f?(0,i.jsx)(B,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:U()("flex gap-1 items-center",{"opacity-60":!p}),children:[(0,i.jsx)(q.default,{providerCode:n,className:"size-6 hidden xs:block",variant:"icon"}),(0,i.jsx)("span",{className:"text-content-primary font-semi-bold text-p3 capitalize",children:r})]}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"hidden sm:block",children:"/"}),(0,i.jsx)(X.Z,{method:t,methodName:a,className:"h-6 basis-[80px] font-semi-bold text-p3 flex items-center justify-start whitespace-nowrap",imgClassName:"object-left object-contain",alt:t,"data-tnav":"fiat-payment-method ".concat(t)})]}):null,(0,i.jsx)("div",{className:"justify-self-end text-p2 font-semi-bold text-content-primary ml-auto text-right","data-tnav":"amount",children:x?(0,i.jsx)(z,{labels:l}):u||d})]}),x?null:(0,i.jsx)(z,{className:"absolute right-0 -top-3 mr-4",labels:l})]})]})};let J=e=>{let{offers:t,onSelect:r,selectedOfferId:n}=e,a=(0,l.T_)("processing");return(0,i.jsx)("ul",{className:"flex flex-col gap-4 py-4",children:t.map((e,t)=>{var s,o;let l;let c=!!e.key&&e.key===n,u=null==e?void 0:null===(o=e.error)||void 0===o?void 0:null===(s=o.details)||void 0===s?void 0:s.reason;return"min"===u&&(l=a("select-pair.small-amount")),"max"===u&&(l=a("select-pair.big-amount")),(0,i.jsx)("li",{children:(0,i.jsx)(K,{active:c,tNav:"fiat-provider-card",labels:e.labels,providerCode:e.provider.code,providerName:e.provider.name,method:e.method,methodName:e.methodName,amount:e.amount,onClick:()=>r(e,t),errMessage:l})},e.key||"".concat(e.provider.code,"-").concat(t))})})};var Y=r(48223);let Q=e=>{let{paymentMethods:t,selectedMethodsIds:r,onSelect:n,onDeselect:a,className:s}=e;if(t.length<2)return null;let o=t.slice().sort((e,t)=>
1e.methodName.localeCompare(t.methodName));return(0,i.jsx)("div",{className:U()("flex gap-2 flex-wrap",s),children:o.map(e=>{let{method:t,methodName:s}=e,o=r.includes(t);return(0,i.jsx)(Y.Z,{selected:o,onClick:()=>o?a(t):n(t),"data-tnav":"payment-method",children:s},t)})})},$=e=>{let{onSelect:t}=e,{flow:r}=(0,g.useFiatProcessingFlow)(),{paymentMethods:n,displayedOffers:a,selectedOfferId:o,isPending:c}=(0,P.i)(),u=(0,l.T_)("processing"),[d,m]=(0,s.useState)([]),{headerHeight:f}=(0,O.useWidgetConfig)("layout");(0,s.useEffect)(()=>{if(c)return;let e=n.map(e=>{let{method:t}=e;return t});d.some(t=>!e.includes(t))&&m([])},[c,d,n]);let p=e=>{(0,v.hp)(e),m([...d,e])},h=e=>{m(d.filter(t=>t!==e))},x=(0,s.useMemo)(()=>0===d.length?a:a.filter(e=>d.some(t=>e.method===t)),[a,d]);return(0,i.jsx)(Z.ModalFullscreen,{id:R[r],offsetTop:f,title:u("select-pair.choose-offer"),footer:(0,i.jsx)("div",{}),onOpen:v._k,bodyClassName:"!overflow-y-scroll h-full",dataTnav:"choose-offer-form",children:()=>(0,i.jsxs)("div",{children:[(0,i.jsx)(Q,{className:"sticky top-0 pb-3 bg-bg-elevated z-10",paymentMethods:n,selectedMethodsIds:d,onSelect:p,onDeselect:h}),(0,i.jsx)(J,{selectedOfferId:o,offers:x,onSelect:t})]})})};var ee=r(58872);function et(){return(et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var er=function(e){return ee.createElement("svg",et({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n||(n=ee.createElement("path",{fill:"currentColor",d:"M8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2m0 1a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1"})),a||(a=ee.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M0 8a8 8 0 1 0 16 0A8 8 0 0 0 0 8m14 0A6 6 0 1 1 2 8a6 6 0 0 1 12 0",clipRule:"evenodd"})))};let en=()=>{let e=(0,l.T_)("processing.select-pair");return(0,i.jsxs)("div",{"data-tnav":"amount-warning",className:"sm:pl-1 h-8 flex gap-2 items-center",children:[(0,i.jsx)(er,{className:"size-4 text-feedback-neutral-contrast"}),(0,i.jsx)("p",{className:"text-p3",children:e("enter-amount")})]})};var ea=r(72291);let ei=e=>{let{onSelect:t}=e,r=(0,l.T_)("fiat-processing.select-pair"),{flow:n}=(0,g.useFiatProcessingFlow)(),{currentOffer:a,promoOffers:o,displayedOffers:c,previousOffer:u,isPending:d}=(0,P.i)(),{open:m}=(0,b.useModalHandlers)(R[n]),{fromAmount:f,toAmount:p}=(0,M.p)(),h=!!f&&!d,v=(0,s.useMemo)(()=>{let[e,...t]=o.slice(0,2);return[t.findIndex(e=>(null==a?void 0:a.key)===(null==e?void 0:e.key))>=0?null!=u?u:e:a,...t].filter(e=>!(null==e?void 0:e.error))},[o,a,u]),x=!!p&&v.length>0;return(0,i.jsxs)("div",{className:"flex flex-col gap-5 sm:gap-6","data-tnav":"offer-info",children:[(0,i.jsxs)("div",{className:"flex justify-between",children:[(0,i.jsx)("span",{className:"text-p3 text-content-secondary",children:r(h&&!x?"no-available-offers":"pay-with")}),(0,i.jsxs)("div",{className:U()("flex gap-1 items-center text-p3 text-content-secondary font-semi-bold border-b border-b-solid",{"cursor-pointer hover:text-content-secondary":h&&x,"!text-content-secondary":!x}),onClick:h&&x?m:void 0,"data-tnav":"change-offer-button",children:[r("view-all-offers"),(0,i.jsx)(ea.Z,{className:"size-4 rotate-180"})]})]}),h?null:(0,i.jsx)(K,{tNav:"pending",pending:!0}),h&&x?(0,i.jsx)("div",{className:"flex flex-col gap-4",children:v.map(e=>e?(0,i.jsx)(K,{providerCode:e.provider.code,providerName:e.provider.name,method:e.method,methodName:e.methodName,amount:e.amount,labels:e.labels,inlineLabels:1===v.length,active:e.key===(null==a?void 0:a.key),onClick:()=>t(e,c.findIndex(t=>t.key===e.key)),tNav:"featured-offer"},e.key):null)}):null]})};var es=e=>{let t=(0,m.TL)(),{goToNextStep:r}=(0,h.useStepper)(),{flow:n}=(0,g.useFiatProcessingFlow)(),a=(0,l.T_)("errors"),w=(0,l.T_)("calculator"),_={paymentMethod:a("estimation.paymentMethod"),country:a("estimation.country"),state:a("estimation.state"),currency:a("estimation.currency"),unavailable:a("estimation.unavailable"),timeout:a("estimation.timeout"),error:a("estimation.error")},{fromOnChangeAmount:C,...j}=W(),{from:A,to:I,disabledNextButton:E,readonlyFromInput:F,children:S,...O}=e,{isPending:Z,currentOffer:L,limits:U,error:D}=(0,P.i)({analytics:!0}),H=T({messages:_,error:D}),{close:G}=(0,b.useModalHandlers)(R[n]),{fromAmount:V}=(0,M.p)(),q=!L||!!L.error||!O.toAmountValue||E,{hasOfferSelect:X,hasPromocode:B}=(0,y.J)(),z=(0,x.f)(n,n===k.W.F2C?I.ticker:A.ticker),K=(0,f.p)(n),J=(e,r)=>{e.key&&((0,v.MW)({txType:n,currencyFrom:A.ticker,currencyTo:I.ticker,amountFrom:V,amountTo:e.amount,providerKey:e.key,index:r}),t((0,p.wK)(e.key)),G())},[Y,Q]=(0,d.z)(async()=>{var a;if(null==L?void 0:L.key){if(t((0,p.wK)(L.key)),(0,v.$o)({txType:n,provider:null===(a=L.provider)||void 0===a?void 0:a.code}),e.onNextStep)return e.onNextStep();r()}});return(0,s.useEffect)(()=>{(null==A?void 0:A.ticker)&&(null==I?void 0:I.ticker)&&(0,o.uT)("new processing: ".concat(n," calculator ready"))},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.Z,{...O,...j,...K,fromOnChangeAmount:F?void 0:C,equalMode:"approximate",minAmount:U.minAmount,maxAmount:U.maxAmount,forceMinError:"min"===U.reason,forceMaxError:"max"===U.reason,fromCurrencyId:A.id,toCurrencyId:I.id,fromAmountIsPending:!1,toAmountIsPending:Z,fromLabel:w("common.you-sen
1d"),toLabel:w("common.you-get"),toChildren:X?L||V?(null==H?void 0:H.length)?null:(0,i.jsx)(ei,{onSelect:J}):(0,i.jsx)(en,{}):null,alerts:H,minAmountLabel:w("common.min-is"),maxAmountLabel:w("common.max-is"),currencyListTitle:w("common.currency-list-title"),currencyListSearchPlaceholder:w("common.currency-list-search-placeholder"),unsupportedPairsText:w("common.cannot-swapped")}),S,(0,i.jsx)(c.Z,{onClick:Y,isLoading:Q,"data-tnav":"next-step-button",fluid:!0,className:"mt-auto",disabled:q,children:z}),(0,i.jsx)($,{onSelect:J}),B?(0,i.jsx)(N,{}):null]})}},86113:function(e,t,r){"use strict";r.d(t,{l:function(){return E}});var n=r(70089),a=r(4901),i=r(64881),s=r(34898),o=r(64371);let l=e=>{let{provider:t,providerIframe:r}=e,{supportedModes:n=[]}=t;return 1===n.length?n[0]:r&&n.includes("iframe")?"iframe":"redirect"};var c=r(48905),u=r(32289),d=r(31636);let m=()=>{let e=(0,u.t)();return{build:t=>{let{flow:r,additionalData:a,provider:i}=t;return{onBeforeExchange:()=>{(0,n.uT)("[".concat(r.toUpperCase()," TX] provider without redirect"),"info")},onAfterExchange:()=>{a&&"cpfCode"in a&&(0,d.t)()},onError:()=>{},applyRouting:t=>{if("kyc"===t.status){let r=new URLSearchParams({...a,providerId:i.id||"",providerCode:i.code||""});e.push("/kyc/buy/".concat(t.transactionId,"?").concat(r))}else e.push("/transaction/buy/".concat(t.transactionId))}}}}};var f=r(84526),p=r(71294);let h=()=>{let e=(0,f.j)();return{build:t=>{let{flow:r}=t;return{onBeforeExchange:()=>{(0,n.uT)("[".concat(r.toUpperCase()," TX] provider without redirect"),"info")},onAfterExchange:e=>{e.transactionId&&(0,p.wJ)()},onError:()=>{},applyRouting:(t,r)=>{let{urlSearchParams:n}=r;return e({transactionId:t.transactionId,urlSearchParams:n})}}}}};var v=r(7653);let g=()=>{let e=(0,f.j)(),t=(0,v.useRef)(null),r=(0,v.useRef)(null),a=e=>{r.current=window.open("","_blank"),t.current=t=>{r.current&&(t?(r.current.location.href=t,(0,n.uT)("[".concat(e.toUpperCase()," TX] page has been opened"),"info")):(r.current.close(),(0,n.uT)("[".concat(e.toUpperCase()," TX] page opening failed"),"error")))}};return{build:n=>{let{flow:i}=n;return{onBeforeExchange:()=>{a(i)},onAfterExchange:n=>{if(n){var a;null===(a=t.current)||void 0===a||a.call(t,n.url),e({transactionId:n.transactionId})}r.current=null,t.current=null},onError:()=>{var e;null===(e=r.current)||void 0===e||e.close(),r.current=null,t.current=null},applyRouting:(t,r)=>{let{urlSearchParams:n}=r;return e({transactionId:t.transactionId,urlSearchParams:n})}}}}},x=()=>{let{providerIframe:e}=(0,c.J)(),{build:t}=g(),{build:r}=h(),{build:n}=m(),a=e=>"headless"===e?n:"iframe"===e?r:t;return{resolve:t=>{let{provider:r,...n}=t,i=l({...t,providerIframe:e}),s=a(i);return{providerMode:i,...s({provider:r,...n})}}}};var b=r(60573),y=r(75640),w=r(40168),_=r(18388),C=r(50236);let j=e=>{if(Object.keys(e).length>0){let t={};for(let r in e){let n=e[r];n&&(t[r]=n.toString())}return t}},k=e=>{if((null==e?void 0:e.code)==="VALIDATION"&&"errors"in e&&(0,C.K)(e.errors)){let t={};for(let r in e.errors){let[n,a]=N(r);"additionalData"===n&&(t[a]=e.errors[r])}return t}},N=e=>e.replace("api/","").split(".");var T=r(25768);let A=(e,t)=>{let r=(0,v.useMemo)(()=>[e||[]],[e]),{onChange:n,valuesOnCurrentPage:a}=(0,T.f)(r,0),[i,s]=(0,v.useState)();(0,v.useEffect)(()=>{s(k(t))},[t]);let o=(0,v.useCallback)((e,t)=>{s(t=>({...t,[e]:void 0})),n(e,t)},[n]),l=(0,v.useMemo)(()=>Object.keys(i||{}).length>0,[i]),c=(0,v.useMemo)(()=>{let e=!0;if(a){for(let t in a)if(!a[t]){e=!1;break}}return e},[a]);return{values:a,onChange:o,errors:i,hasValidationError:l,isEmptyValue:c}};var I=r(40686);let E=e=>{var t;let{isAnonymous:r,executeRecaptcha:l,downgradeCaptcha:c}=e,{flow:u}=(0,y.useFiatProcessingFlow)(),{fromAmount:d,toAmount:m}=(0,_.p)(),{fromCurrency:f,toCurrency:p}=(0,s.A)(u),{getExchange:h,currentOffer:v,exchangeError:g,isError:C}=(0,I.h)(),k=A(null==v?void 0:null===(t=v.additionalData)||void 0===t?void 0:t.fields,g),N=(0,a.CG)(e=>e.promoCode.value),T=(0,a.TL)(),{resolve:E}=x();return{createFiatTransaction:async e=>{let{handleResponse:t,urlSearchParams:a}=e;if(!v)return;(0,n.uT)("[".concat(u.toUpperCase()," TX] init"),"info");let s=u===w.W.F2C?"buy":"sell",d=j(k.values),{providerMode:m,onBeforeExchange:g,onAfterExchange:x,onError:b,applyRouting:y}
1=E({flow:u,additionalData:d,provider:v.provider});try{var _,C;g();let e=await h(d,{providerMode:m,...r?{executeRecaptcha:l,downgradeCaptcha:c}:{}});if(!e){b();return}f&&p&&(0,i.I)(u,{from:f.ticker,to:p.ticker}),x(e),e.url&&e.transactionId&&(null===(_=v.provider)||void 0===_?void 0:_.code)&&(null===(C=v.provider)||void 0===C?void 0:C.name)&&T((0,o.jh)({url:e.url,id:e.transactionId,providerCode:v.provider.code,providerName:v.provider.name})),null==t||t({res:e}),y(e,{urlSearchParams:a})}catch(e){b(),(0,n.mG)({scope:"".concat(s,"-go-to-provider")}),(0,n.Tb)(e),(0,n.uT)("[".concat(u.toUpperCase()," TX] internal error"),"error")}},createTransactionError:g,handleBuyFlow:e=>{let{res:t}=e;(0,b.ET)({txType:w.W.F2C,amountFrom:d,amountTo:m,currencyFrom:(null==f?void 0:f.ticker)||"",currencyTo:(null==p?void 0:p.ticker)||"",provider:null==v?void 0:v.key,promoCode:N,status:t.status,transactionId:t.faTransactionId}),(0,n.uT)("[F2C TX] success","info")},handleSellFlow:e=>{let{res:t}=e;(0,b.ET)({txType:w.W.C2F,amountFrom:d,amountTo:m,currencyFrom:(null==f?void 0:f.ticker)||"",currencyTo:(null==p?void 0:p.ticker)||"",provider:null==v?void 0:v.key,transactionId:t.faTransactionId}),(0,n.uT)("[C2F TX] success","info")},additionalDataForm:k,isError:C}}},40686:function(e,t,r){"use strict";r.d(t,{h:function(){return x}});var n=r(70089),a=r(20975),i=r(39089),s=r(4901),o=r(74718),l=r(94918),c=r(34898),u=r(41170),d=r(94625),m=r(22155);let{useLazyFiatExchangeQuery:f}=m.a.injectEndpoints({endpoints:e=>({fiatExchange:e.query({queryFn:async(e,t,r,n)=>{let{flow:a,recaptchaResponse:i,recaptchaVersion:s,userContext:o,...l}=e,{getState:c}=t,f=c(),p=(0,d.Q)(f,{web:"v1",widget:"v1"}),{appType:h,signature:v}=f.processingConfig,g={};s&&i&&(g["x-recaptcha-version"]=s,g["x-recaptcha-response"]=i),"widget"===h&&v&&(g["x-widget-signature"]=v,delete l.providerMode);let x=btoa(String.fromCharCode(...new TextEncoder().encode(JSON.stringify(o))));"web"===h&&(g["x-user-context"]=x);let b=await n({url:(0,m.J)("".concat(p,"/").concat(a,"/exchange"),"bff"),body:l,method:"POST",headers:g});return b.error&&"data"in b.error&&(0,u.k0)(b.error.data)?{error:b.error.data}:b.data?{data:b.data}:{error:{status:"PARSING_ERROR",error:"No data in response"}}},keepUnusedDataFor:0})})});var p=r(40780),h=r(75640),v=r(51495),g=r(33580);let x=()=>{let{flow:e}=(0,h.useFiatProcessingFlow)(),[t,{isFetching:r,currentData:u,error:d}]=f(),m=v.E[e],x=(0,p.B)(m),b=(0,a.bU)(),{theme:y}=(0,i.F)(),w=(0,s.CG)(e=>e.walletAddress[m].address),_=(0,s.CG)(e=>e.walletAddress[m].extraId),C=(0,s.CG)(t=>t.calculator[e].fromAmountValue),j=(0,s.CG)(t=>t.calculator[e].toAmountValue),k=(0,s.CG)(e=>e.promoCode.value),{currentOffer:N,error:T,refetch:A}=(0,g.i)(),I=!!T,{fromCurrency:E,toCurrency:F}=(0,c.A)(e),S=null==u?void 0:u.url,W=null==E?void 0:E.ticker,P=null==F?void 0:F.ticker,M=!!W&&!!P,R=!!N&&!!N.method&&!I,O="fulfilled"===x&&M&&R,Z=async function(r){let{executeRecaptcha:a,downgradeCaptcha:i,providerMode:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{providerMode:"redirect"};if(!O){(0,n.uT)("[".concat(e.toUpperCase()," TX] validation failed"),{level:"error"});return}try{var c;let{affiseData:n,clientId:i,refId:l,deviceId:u}=(0,o.U)(),d={};return a&&(d=await a()),await t({flow:e,from:W,to:P,amount:C,outAmount:j,address:w,extraId:_,paymentMethod:N.method,analyticsPayload:{gaClientId:i,refId:l||"",source:"web",deviceId:u,affiseData:n},userContext:{theme:"day"===y?"light":"dark",language:b},provider:(null===(c=N.provider)||void 0===c?void 0:c.code)||"",promocode:k,additionalData:r,providerMode:s,...d,...N.offerId?{offerId:N.offerId}:{}}).unwrap()}catch(t){(0,l.$)(t)?((0,n.uT)("[".concat(e.toUpperCase()," TX] captcha failed"),{level:"warning"}),null==i||i()):((0,n.Tb)(t),(0,n.uT)("[".concat(e.toUpperCase()," TX] request failed"),{level:"error"}))}};return{url:S,currentOffer:N,getExchange:Z,refetchOffers:A,isValid:O,isFetching:r,isError:!!d&&!(0,l.$)(d),isOfferWithError:I,exchangeError:d}}},64134:function(e,t,r){"use strict";r.d(t,{G:function(){return eu}});var n=r(27573),a=r(7653),i=r(70089),s=r(45254),o=r.n(s),l=r(25175),c=r(9260),u=r(42042),d=r
1(75640),m=r(33515),f=r(20975),p=r(22996),h=r(12215),v=r(48905),g=r(32289),x=r(99163);let b=(0,x.Xw)({event:x.gC,event_name:"tx_click_new_transaction"}),y=(0,x.Xw)({event:x.gC,event_name:"tx_click_contact_support"}),w=(0,x.Xw)({event:x.gC,event_name:"tx_click_open_modal",type:"transaction-details"}),_=e=>{let{variant:t="primary"}=e,r=(0,g.t)(),i=(0,g.j)(),s=(0,f.T_)("transaction"),{setCurrentStep:o}=(0,h.useStepper)(),{newTransactionPath:l}=(0,v.J)(),c=(0,a.useCallback)(()=>{o("select-pair"),r.replace(null!=l?l:i),b()},[i,r,l,o]);return(0,n.jsx)(p.Z,{variant:t,fluid:!0,onClick:c,children:s("new-transaction")})};var C=r(8380),j=r(633),k=r(91732),N=r(83895),T=r(52614),A=r(90843),I=r(9272),E=r(83627);let F=e=>{var t,r;let{transaction:n,providerIframe:a}=e,i=null!==(r=null===(t=n.provider)||void 0===t?void 0:t.supportedModes)&&void 0!==r?r:["redirect"],s=n.providerMode;return s&&i.includes(s)&&(a||"iframe"!==s)?s:"redirect"},S=e=>{let{transaction:t}=e,r=(0,g.t)();return(0,a.useEffect)(()=>{r.push("/transaction/buy/"+t.transactionId)},[r,t.transactionId]),null};var W=r(25789),P=r(15531),M=r(71294),R=r(74539);let O=e=>{let{redirectUrl:t,providerName:r="Provider"}=e,[i,s]=(0,a.useState)(!1),o=(0,f.T_)("transaction"),l=()=>s(!0),c=()=>s(!1);return(0,a.useEffect)(()=>{i||(0,M.PS)(l)},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.Z,{onClick:l,size:"m",fluid:!0,variant:"primary",children:o("actions.proceed-to-provider")}),(0,n.jsx)(W.Z,{isOpen:i,onClose:c,overlayClassName:"!bg-bg-overlay !opacity-100 backdrop-blur-lg",children:(0,n.jsx)(P.Z,{title:r,headerDivider:!1,closeClickHandler:c,titleClassName:"text-content-secondary lg:px-2",dataTnav:"provider-popup",className:"h-[calc(100vh-64px)] w-full sm:w-[500px] lg:h-[800px] lg:w-[764px] max-h-[95vh] rounded-t-24 rounded-b-none sm:rounded-b-24 overflow-hidden",children:(0,n.jsx)("div",{className:"h-full bg-bg-elevated py-3 px-4 lg:px-6 lg:pb-5",children:(0,n.jsx)("iframe",{...R.wq,src:t,className:"w-full h-full border-0 rounded-16 overflow-y-scroll"})})})})]})};var Z=r(35320);let L=(0,x.Xw)(e=>{let{providerName:t}=e;return{event:x.gC,event_name:"tx_click_processed_to_provider",providerName:t}}),U=e=>{let{redirectUrl:t,providerName:r}=e,a=(0,f.T_)("transaction");return(0,n.jsx)(Z.r,{className:"w-full",href:t,target:"_blank",rel:"referrer noreferrer","data-tnav":"provider-link",children:(0,n.jsx)(p.Z,{size:"m",fluid:!0,variant:"primary","data-tnav":"proceed-to-provider-button",onClick:()=>L({providerName:r||""}),children:a("actions.proceed-to-provider")})})},D=e=>{var t,r;let{transaction:a}=e,{providerIframe:i}=(0,v.J)(),s=F({transaction:a,providerIframe:i});return"iframe"===s&&a.redirectUrl?(0,n.jsx)(O,{redirectUrl:a.redirectUrl,providerName:null===(t=a.provider)||void 0===t?void 0:t.name}):"headless"===s?(0,n.jsx)(S,{transaction:a}):"redirect"===s&&a.redirectUrl?(0,n.jsx)(U,{redirectUrl:a.redirectUrl,providerName:null===(r=a.provider)||void 0===r?void 0:r.name}):null};var H=r(65469);let G=e=>{let t=(0,f.T_)("transaction");return(0,n.jsx)(Z.r,{className:"block w-full",href:"mailto:".concat((0,H.u)()),children:(0,n.jsx)(p.Z,{fluid:!0,className:"whitespace-nowrap text-nowrap",...e,onClick:()=>y(),children:t("contact-support")})})},V=e=>{let{transaction:t,variant:r,className:a}=e;return(0,n.jsx)("div",{className:a,children:"support"===r?(0,n.jsx)(G,{variant:"primary",size:"m"}):"new-transaction"===r?(0,n.jsx)(_,{}):"provider"===r?(0,n.jsx)(D,{transaction:t}):void 0})},q="p-1 size-6 box-content",X={icon:(0,n.jsx)(C.Z,{className:o()(q,"text-feedback-error-contrast")}),title:"failed-title",description:"failed-description",notification:null,buttonVariant:null},B={[c.G.Complete]:()=>({icon:(0,n.jsx)(j.Z,{className:o()(q,"text-feedback-success-contrast")}),title:"complete-title",description:"complete-description",notification:null,buttonVariant:null}),[c.G.Failed]:()=>X,[c.G.Expired]:()=>({icon:(0,n.jsx)(k.Z,{className:o()(q,"text-feedback-warning-contrast")}),title:"expired-title",description:"expired-description-not-complied",notification:null,buttonVariant:"new-transaction"}),[c.G.Hold]:()=>({icon:null,title:"hold-title",description:"hold-description",notification:null,buttonVariant:"provider"})},z=e=>{let{transaction:t}=e,{transactionId:r,status:s}=t,o=(0,f.T_)("transaction.status"),{flow:l}=(0,d.useFiatProcessingFlow)(),{title:c,description:u,icon:m,notification:p,buttonVariant:h}=(0,a.useMemo)(()=>{var e,t;return null!==(t=null===(e=B[s])||void 0===e?void 0:e.call(B))&&void 0!==t?t:{title:void 0,description:void 0,icon:null,notification:null,buttonVariant:null}},[s]);(0,a.useEffect)(()=>
1{(0,i.uT)("[".concat(l.toUpperCase()," TX] finish result opened with ").concat(t.status," status"),"info")},[]);let v=(0,a.useMemo)(()=>(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[p?(0,n.jsx)(N.Z,{status:"info",children:o(p)}):void 0,h?(0,n.jsx)(V,{className:"mb-3",transaction:t,variant:h}):null]}),[p,o,h,t]);return(0,n.jsx)(A.o,{className:"pt-2.5 flex flex-col flex-grow items-start justify-between gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col items-start justify-center w-full",children:[c&&u?(0,n.jsx)(I.F,{icon:m,title:o(c),className:"w-full",description:o(u),additionalContent:v}):null,(0,n.jsx)(T.RateExperienceWithModal,{flow:l,transactionId:r,onCloseModal:E.Bj,onOpenModal:E.on,onFormSubmit:E.sQ,onClickRateCallback:e=>(0,E.hO)({type:e})})]})})};var K=r(40168),J=r(873),Y=r(13276),Q=r(69061);let $=e=>{let{transaction:t,className:r}=e,i=(0,f.T_)("transaction"),s=(0,f.T_)("calculator.common"),o=(0,a.useMemo)(()=>[{label:i("details.provider"),content:t.provider?(0,n.jsx)(Y.default,{className:"h-6",providerCode:t.provider.providerCode,providerName:t.provider.name}):null},{label:i("details.payment-method"),content:t.paymentMethodData?(0,n.jsx)(Q.Z,{alt:t.paymentMethodData.code,method:t.paymentMethodData.code,"data-tnav":"fiat-payment-method ".concat(t.paymentMethodData.code),className:"h-6 basis-[80px] font-semi-bold text-p3 flex items-center justify-start whitespace-nowrap",imgClassName:"object-left object-contain"}):null},{label:s("you-send"),content:t.payinAmount&&t.currencyFrom?(0,n.jsx)(J.$,{className:"flex-wrap",amount:t.payinAmount,currency:t.currencyFrom}):null},{label:s("you-get"),content:t.payoutAmount&&t.currencyTo?(0,n.jsx)(J.$,{className:"flex-wrap",amount:t.payoutAmount,currency:t.currencyTo,isApproximateValue:!0}):null}],[i,t.provider,t.paymentMethodData,t.payinAmount,t.currencyFrom,t.payoutAmount,t.currencyTo,s]);return(0,n.jsx)("div",{className:r,"data-tnav":"transaction-info",children:o.map(e=>{let{label:t,content:r}=e;return r?(0,n.jsxs)("div",{className:"flex flex-col items-start gap-1","data-tnav":t,children:[(0,n.jsx)("div",{className:"text-s text-content-tertiary",children:t}),(0,n.jsx)("div",{className:"text-m text-content-primary font-semi-bold w-full min-w-0",children:r})]},t):null})})},ee=e=>{let{transaction:t}=e,r=(0,f.T_)("transaction"),{flow:s}=(0,d.useFiatProcessingFlow)();(0,a.useEffect)(()=>{(0,i.uT)("[".concat(s.toUpperCase()," TX] pending status opened ").concat(t.redirectUrl?"":"without redirect url"),"info")},[]);let l=s===K.W.C2F?"grid-cols-[auto_minmax(100px,auto)]":"grid-cols-[minmax(100px,auto)_auto]";return(0,n.jsxs)("div",{className:"flex flex-col items-start justify-start gap-4 pt-4",children:[(0,n.jsxs)("div",{className:"flex flex-col items-start",children:[(0,n.jsx)("div",{className:"text-m font-semi-bold text-content-primary","data-tnav":"transaction-status",children:r("status.pending-title")}),(0,n.jsx)("p",{className:"text-s text-content-secondary","data-tnav":"status-description",children:r("status.pending-fiat-description")})]}),(0,n.jsxs)("div",{className:"rounded-12 border border-border-static p-4 flex flex-col gap-4 w-full mb-7",children:[(0,n.jsx)($,{transaction:t,className:o()("grid gap-2 sm:gap-y-2 sm:gap-x-3",l)}),(0,n.jsx)(D,{transaction:t})]})]})};var et=r(45937),er=r(92735),en=r(70173),ea=r(1022);let ei=e=>!!(e.payoutAmount&&e.payoutCurrency&&e.payinCurrency);var es=r(40173);let eo=e=>{let{onClick:t,children:r,className:a}=e;return(0,n.jsxs)("button",{onClick:t,"data-tnav":"tx-details-button",className:o()("cursor-pointer w-full flex gap-2 items-center justify-between",a),children:[(0,n.jsx)("span",{className:"text-p2 font-semi-bold text-nowrap",children:r}),(0,n.jsx)(es.Z,{className:"rotate-180 text-icon-default"})]})},el="f2c-transaction-details-modal",ec=e=>{let{transaction:t,isFetching:r}=e,i=(0,f.T_)("processing"),{flow:s}=(0,d.useFiatProcessingFlow)(),{hasTransactionDetails:o}=(0,v.J)(),{open:l}=(0,en.useModalHandlers)(el),u=(0,a.useMemo)(()=>(0,er.cn)(t),[t]),m=(0,er.j7)(u,s),p=(0,a.useCallback)(()=>{w(),l()},[l]);if(!o)return null;let h=!t.status||[c.G.Failed,c.G.Expired].includes(t.status);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eo,{onClick:p,className:"flex-grow rounded-8 border border-[#D3D5DE] px-4 py-3",children:i("transaction-detail
1s")}),ei(t)?(0,n.jsx)(ea.ModalWithBackdrop,{dataTnav:"tx-details-modal",title:i("transaction-details"),id:el,children:()=>(0,n.jsx)(et.Z,{isPending:r,isStaled:h,...m})}):null]})},eu=e=>{let{transaction:t,isFetching:r}=e,{flow:s}=(0,d.useFiatProcessingFlow)(),{type:f,surveyBanner:p}=(0,m.useWidgetConfig)("features");if((0,a.useEffect)(()=>{(0,i.uT)("[".concat(s.toUpperCase()," TX] transaction opened with ").concat(t?"with ".concat(t.status):"with possible errors"," status"),"info")},[]),!t)return null;let h=(0,l.rF)(t.status),v=(0,l.eW)(t.status),g=(0,l.re)(t.status),x=p&&"product"===f&&(t.status===c.G.Pending||t.status===c.G.Hold);return(0,n.jsxs)("div",{className:o()("flex flex-col items-stretch",{"min-h-[552px]":!h}),children:[h?(0,n.jsx)(ee,{transaction:t}):(0,n.jsx)(z,{transaction:t}),(0,n.jsxs)("footer",{className:"w-full flex flex-col gap-3 lg:gap-4",children:[x?(0,n.jsx)(u.t,{}):null,(0,n.jsx)(ec,{transaction:t,isFetching:r}),("deposit"===f&&!h||"product"===f)&&(h||v||g)?(0,n.jsx)(_,{variant:h||g?"secondary":"primary"}):null]})]})}},65469:function(e,t,r){"use strict";r.d(t,{u:function(){return a}});var n=r(85495);let a=()=>{let e=(0,n.EK)("BRAND_SLUG");return"support@".concat(e,".com")}},3196:function(e,t,r){"use strict";r.d(t,{s:function(){return n}});let n=()=>!1},64426:function(e,t,r){"use strict";r.d(t,{w:function(){return a}});let n=(0,r(85495).ZE)("ASSET_PREFIX"),a=e=>"".concat(n).concat(e)},15068:function(e,t,r){"use strict";var n=r(27573),a=r(7653),i=r(45254),s=r.n(i);let o=e=>{let{title:t,dataTnav:r,onClick:a,activeTabIndex:i,tabIndex:o,as:l="div",tabTheme:c,...u}=e,{tabClassName:d,activeClassName:m,inactiveClassName:f}=c||{};return(0,n.jsxs)(l,{...u,"data-tnav":r,onClick:a,className:s()(d||"inline-flex items-center justify-center transition-none relative cursor-pointer text-center content-center w-full h-12 lg:h-14",d||{"rounded-bl-12":i+1===o,"rounded-br-12":i-1===o},i===o?m||"bg-bg-elevated text-content-primary subtitle-s rounded-t-12 z-[0]":f||"bg-button-secondary text-content-secondary hover:bg-button-secondary-hover caption-s hover:rounded-12 z-[1]"),children:[t,i!==o||d?null:(0,n.jsx)("div",{className:"absolute bottom-0 h-4 -inset-x-2 bg-bg-elevated"})]})};t.ZP=e=>{let{tabAs:t,handleChangeTab:r,list:i,activeTabIndex:s,dataTnav:l,tabTheme:c}=e,{containerClassname:u}=c||{};return(0,n.jsx)("div",{className:u||"flex w-full bg-button-secondary overflow-hidden","data-tnav":l,children:i.map((e,n)=>{let{id:i,title:l,tNav:u,...d}=e;return(0,a.createElement)(o,{...d,tabTheme:c,dataTnav:u,key:i,as:t,id:i,title:l,tabIndex:n,activeTabIndex:s,onClick:()=>{null==r||r(i)}})})})}},3629:function(e,t,r){"use strict";r.d(t,{Z:function(){return F}});var n,a=r(27573),i=r(7653),s=r(45254),o=r.n(s),l=r(83895),c=r(58872);function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var d=function(e){return c.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:6,height:12,fill:"none",viewBox:"0 0 6 12"},e),n||(n=c.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 .25a.75.75 0 0 1 .559.25l1.998 2.22a.75.75 0 0 1-1.114 1.004l-.693-.77V11a.75.75 0 0 1-1.5 0V2.954l-.693.77A.75.75 0 0 1 .443 2.72L2.44.502A.75.75 0 0 1 3 .25",clipRule:"evenodd"})))},m=r(10186),f=r(60336),p=r(13175),h=r(36214),v=r(33861),g=r(76657),x=r(89371),b=r.n(x);let y={info:"text-border-default",warning:"font-semi-bold text-content-secondary",error:"font-semi-bold text-feedback-error-dark"},w=e=>{let t,r,n,a,{amountValue:i=0,minAmount:s=0,maxAmount:o=Number.MAX_SAFE_INTEGER,minAmountLabel:l,maxAmountLabel:c,forceMinError:u=!1,forceMaxError:d=!1,limitsLabelOnClick:m}=e,f=Number(i),p=u||0!==s&&f<s,h=d||0!==o&&f>o;return p?(r=s,t=l||"Min is"):h&&(r=o,t=c||"Max is"),"number"==typeof r&&(n="".concat((0,v.pJ)(r)),a=e=>{e.stopPropagation(),m&&m(String(r))}),{isMin:p,isMax:h,amountMinMax:r,labelMinMax:t,labelOnClick:a,formattedAmountMinMax:n}},_=e=>{let{pending:t,children:r,type:n="info",onClick:i,...s}=e;return t?null:r?(0,a.jsx)("p",{...s,onClick:i,className:o()(y[n],"text-p3 text-right grow shrink whitespace-nowrap",i?"cursor-pointer":"cursor-default"),children:r}):null},C=e=>{let t,{pending:r,readonly:n,value:s,amountEqual:l,isFocus:c,setFocus:u,onChange:d,formatting:f,...p}=e,v=(0,i.useRef)(null),x=n||!d;if((0,i.useEffect)(()=>{v.current&&!0===c&&!x&&v.current.focus()},[v.current,c,x]),r)return(0,a.jsx)(h.Z,{width:"116px",height:"24px"});if(f&&void 0!==s){let e=(0,g.C)({amount:s,equal:l});t=""===e?void 0:e}else if(""===s)t=s;else{let e=l?({exact:"",approximate:"~"})[l]:"";t=("number"!=typeof s||isNaN(s))&&"string"!=typeof s?void 0:"".concat(e," ").concat(s)}if(void 0===t)return(0,a.jsx)("span",{className:o()(b().tickerText,"text-border-default cursor-not-allowed"),children:"..."});let y=o()(b().tickerText,"".concat(d?"cursor-text":"cursor-not-allowed"," text-content-primary"));return(0,a.jsxs)(a.Fragment,{children:[x?(0,i.createElement)("input",{...p,className:o()(b().amount,y),defaultValue:t,type:"text",readOnly:!0,"data-tnav":"input-amount",ke
1y:t,ref:v}):(0,a.jsx)("input",{...p,className:o()(b().amount,y),onChange:d,value:s,type:"text","aria-invalid":"false",maxLength:26,inputMode:"decimal",onFocus:e=>{e.preventDefault(),u(!0)},onBlur:()=>{u(!1)},"data-tnav":"input-amount",ref:v}),"exact"===l?(0,a.jsx)(m.Z,{"data-tnav":"fixed-rate-icon",className:"text-content-link size-6 !ml-1"}):null]})};var j=e=>{let{label:t,readonly:r,amountValue:n,amountLabel:s,amountEqual:l,amountPending:c,currencyLogoUrl:u,currencyFullName:d,currencyNetwork:m,currencyOnClick:h,currencyPending:v,currencyTicker:g,currencyVisibleTicker:x,minAmount:y,maxAmount:j,minAmountLabel:k,maxAmountLabel:N,onChange:T,formatting:A,limitsLabelOnClick:I,forceMinError:E,forceMaxError:F,children:S,...W}=e,[P,M]=(0,i.useState)(!1),{isMin:R,isMax:O,labelMinMax:Z,labelOnClick:L,formattedAmountMinMax:U}=w({amountValue:n,minAmount:y,maxAmount:j,currencyTicker:g,minAmountLabel:k,maxAmountLabel:N,forceMinError:E,forceMaxError:F,limitsLabelOnClick:I}),D=!r&&(R||O);return(0,a.jsxs)("div",{className:o()(b().wrapper,{[b().focused]:P,[b().readonly]:r||!T}),children:[(0,a.jsx)("span",{className:b().border}),(0,a.jsxs)("div",{className:o()(b().root,"relative rounded-8 bg-bg-default"),...W,onClick:()=>{T&&!P&&M(!0)},children:[(0,a.jsx)("p",{className:"text-content-secondary text-p3 mb-2","data-tnav":"input-amount-main-label",children:t}),(0,a.jsxs)("div",{className:b().inputWithLogo,children:[(0,a.jsx)(f.Xw,{src:u,alt:"".concat(g," logo"),className:b().logo,pending:v,onClick:h}),(0,a.jsxs)("div",{className:b().currencyInputWrp,children:[(0,a.jsxs)("div",{className:b().tickerAmountWrp,children:[(0,a.jsx)(f.IE,{visibleTicker:x,ticker:g,className:b().ticker,classNameText:b().tickerText,onClick:h,pending:v}),(0,a.jsx)(C,{value:n,isFocus:P,setFocus:M,readonly:!P,amountEqual:l,pending:c,placeholder:t,onChange:T,formatting:A})]}),(0,a.jsxs)("div",{className:b().labelWrp,children:[(0,a.jsx)(f.zZ,{fullName:d,network:(0,p.b)({ticker:g,network:m})?m:void 0,fullNameClassName:b().fullName,pending:v}),D?(0,a.jsxs)(_,{type:P?"warning":"error",onClick:L,pending:c,"data-tnav":"input-amount-label-".concat(P?"warning":"error"),children:[Z,"\xa0",(0,a.jsxs)("span",{className:"underline",children:[U,(0,a.jsxs)("span",{className:b().mobileHidden,children:["\xa0",(null==x?void 0:x.toUpperCase())||g.toUpperCase()]})]})]}):(0,a.jsx)(_,{type:"info",pending:c,"data-tnav":"input-amount-label",children:s})]})]})]}),(0,i.isValidElement)(S)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("hr",{className:b().footerHr}),S]}):null]}),(0,a.jsx)("div",{className:b().hoverBg})]})},k=r(86587),N=r.n(k),T=r(92486);let A=e=>{let t=e.replace(",",".");return T.j(t)?t:void 0};var I=e=>{let{fromAmountValue:t,toAmountValue:r,minAmount:n,maxAmount:a,minAmountTo:s,maxAmountTo:o,fromOnChangeAmount:l,toOnChangeAmount:c,onSelectLimitsAmount:u}=e,d=(0,i.useCallback)((e,t)=>{let r="from"===e?l:c,n=A(t);void 0!==n&&r&&r(n)},[l,c]),m=(0,i.useCallback)(e=>t=>{let{value:r}=t.target;d(e,r)},[d]),f=(0,i.useCallback)(e=>{d("from",e),u&&u("from",e)},[u,d]),p=(0,i.useCallback)(e=>{d("to",e),u&&u("to",e)},[u,d]);return{fromAmount:t,toAmount:r,minAmount:Number(n),maxAmount:Number(a),minAmountTo:Number(s),maxAmountTo:Number(o),fromOnChangeAmount:l?m("from"):void 0,toOnChangeAmount:c?m("to"):void 0,onSelectLimitsAmount:u,onSelectLimitsAmountHandlerFrom:f,onSelectLimitsAmountHandlerTo:p}},E=e=>{let t;let{currenciesMap:n,currenciesImgUrlTemplate:a,fromAmountIsPending:s,toAmountIsPending:o,onSwitchCurrencies:l,fromCurrencies:c,toCurrencies:u,onClickCurrency:d,fromDisabledIds:m,fromEnabledIds:f,toDisabledIds:p,toEnabledIds:h}=e,[v,g]=(0,i.useState)(null),{fromCurrencyId:x,toCurrencyId:b,fromOnSelectCurrency:y,toOnSelectCurrency:w,fromRecentIds:_,toRecentIds:C}=e,j=n[x],k=n[b],N=(0,i.useRef)(null),T=(0,i.useMemo)(()=>!c.find(e=>{let{ids:t}=e;return t.includes(b)})||!u.find(e=>{let{ids:t}=e;return t.includes(x)})||!l,[c,x,l,u,b]),A=(0,i.useMemo)(()=>c.flatMap(e=>e.ids).length>1,[c]),I=(0,i.useMemo)(()=>u.flatMap(e=>e.ids).length>1,[u]),E=(0,i.useMemo)(()=>{let e=[],t="",r="";return"from"===v&&(e=c,t=x,r=b),"to"===v&&(e=u,t=b,r=x),{items:e.length?e:[{tagId:"all",tagCaption:"All",ids:[]}],selectedCurrencyId:t,selectedCurrencyOppositeId:r}},[v,c,x,u,b]),F=(0,i.useCallback)(async()=>
1{if(null===N.current){let e=await Promise.all([r.e(239),r.e(1576),r.e(7881),r.e(697)]).then(r.bind(r,50697));N.current=e.default}},[]);(0,i.useLayoutEffect)(()=>{F()},[F]);let S=(0,i.useCallback)(()=>{void 0===l||T||s||o||l({fromCurrencyId:b,toCurrencyId:x})},[l,T,s,o,b,x]),W=(0,i.useCallback)(async e=>{("from"===e&&c.length||"to"===e&&u.length)&&(await F(),g(e),d&&d(e))},[F,c.length,d,u.length]),P=(0,i.useCallback)((e,t)=>{let r;"from"===v&&(r=y),"to"===v&&(r=w),r&&r(e,t),g(null)},[v,y,w]);"from"===v&&(t=_),"to"===v&&(t=C);let M=[],R=[];return"from"===v&&m&&(M=m),"to"===v&&p&&(M=p),"from"===v&&f&&(R=f),"to"===v&&h&&(R=h),a&&(j.currencyIconUrl=a.replace("{ticker}",j.ticker),k.currencyIconUrl=a.replace("{ticker}",k.ticker)),{fromCurrencyInfo:j,toCurrencyInfo:k,onSwitchCurrenciesCallback:S,onClickCurrencyCallback:W,onSelectCurrencies:P,recentIds:t,activeList:v,switchDisabled:T,CurrencyList:N.current,disabledIds:M,enabledIds:R,isFromListEnabled:A,isToListEnabled:I,...E}},F=e=>{let{fromAmountIsPending:t,fromAmountLabel:r,minAmountLabel:n,maxAmountLabel:s,toAmountIsPending:c,toAmountLabel:u,toLabel:m,toIsDisable:f,fromLabel:p,currenciesMap:h,alerts:v,renderCurrencyList:g,currencyListTitle:x,currencyListSearchPlaceholder:b,currencyListOnClose:y,currencyListTagOnClick:w,equalMode:_,formatting:C,forceMinError:k,forceMaxError:T,forceMinErrorTo:A,forceMaxErrorTo:F,className:S,style:W,onSearchItems:P,unsupportedPairsText:M,fromChildren:R,fromIsDisable:O,toChildren:Z,currencyListEmptyCaption:L,isBridgePairSelected:U,bridgePairSelectedLabel:D}=e,{fromCurrencyInfo:H,onSwitchCurrenciesCallback:G,toCurrencyInfo:V,items:q,recentIds:X,onClickCurrencyCallback:B,onSelectCurrencies:z,selectedCurrencyId:K,CurrencyList:J,activeList:Y,switchDisabled:Q,selectedCurrencyOppositeId:$,disabledIds:ee,enabledIds:et,isFromListEnabled:er,isToListEnabled:en}=E(e),{fromAmount:ea,minAmount:ei,maxAmount:es,minAmountTo:eo,maxAmountTo:el,toAmount:ec,fromOnChangeAmount:eu,toOnChangeAmount:ed,onSelectLimitsAmountHandlerFrom:em,onSelectLimitsAmountHandlerTo:ef}=I(e),ep=(0,i.useMemo)(()=>{var e,t,r;return"".concat(M," ").concat("from"===Y?null==V?void 0:null===(e=V.coin)||void 0===e?void 0:e.toUpperCase():null!==(r=null===(t=H.coin)||void 0===t?void 0:t.toUpperCase())&&void 0!==r?r:"")},[h,M,Y,V,H]);return(0,a.jsxs)("div",{className:o()(N().wrapper,S),style:W,"data-tnav":"calculator-form",children:[(0,a.jsxs)("div",{className:N().root,children:[(0,a.jsx)(j,{label:p,currencyTicker:H.ticker,currencyVisibleTicker:H.coin,currencyFullName:H.fullName,currencyLogoUrl:H.currencyIconUrl,currencyNetwork:H.network,amountValue:ea,amountLabel:r,minAmount:ei,maxAmount:es,minAmountLabel:n,maxAmountLabel:s,currencyPending:!1,amountPending:t,"data-tnav":"input-amount-from",currencyOnClick:er&&!O?e=>{e.stopPropagation(),B("from")}:void 0,onChange:eu,limitsLabelOnClick:em,formatting:C,forceMinError:k,forceMaxError:T,children:R}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(j,{label:m,currencyTicker:V.ticker,currencyVisibleTicker:V.coin,currencyFullName:V.fullName,currencyNetwork:V.network,currencyLogoUrl:V.currencyIconUrl,amountValue:ec,amountLabel:u,minAmount:eo,maxAmount:el,minAmountLabel:n,maxAmountLabel:s,currencyPending:!1,amountPending:c,currencyOnClick:en&&!f?e=>{e.stopPropagation(),B("to")}:void 0,onChange:ed,amountEqual:_,limitsLabelOnClick:ef,formatting:C,forceMinError:A,forceMaxError:F,"data-tnav":"input-amount-to",children:Z}),Q?null:(0,a.jsxs)("button",{onClick:G,className:N().switch,"data-tnav":"calculator-switch-btn","aria-label":"switch currency",children:[(0,a.jsx)(d,{className:N().iconUp}),(0,a.jsx)(d,{className:N().iconDown})]})]}),null!==Y&&null!==J&&void 0!==q?g((0,a.jsx)(J,{type:Y,onSearchItems:P,map:h,items:q,selectedCurrencyId:K,recentIds:X,enabledIds:et,disabledIds:ee,searchPlaceholder:b,emptyListCaption:L,tagOnClick:w,currencyOnClick:z,closeClickHandler:y,backClickHandler:y,title:x,selectedCurrencyOppositeId:$,unsupportedPairsText:ep})):null,U&&D?(0,a.jsx)("div",{className:"absolute top-1/2 left-3 xs:left-4 bg-bg-elevated caption-xs text-feedback-neutral-contrast border rounded-20 border-base-blue -translate-y-1/2 px-2 py-1 !mt-0",children:D}):null]}),v?(0,a.jsx)("div",{className:N().alerts,children:v.map(e=>{let{status:t,value:r}=e;return(0,a.jsx)(l.Z,{status:t,dataTnav:"alert",children:r},r)})}):null]})}},92486:function(e,t,r){"use strict";function n(e){return!!/^\d*\.?\d*$/.test(e)&&Number(e)<=Number.MAX_SAFE_INTEGER}r.d(t,{j:function(){return n}})},78712:function(e,t,r){"use strict";r.d(t,{VE:function(){return u},uT:function(){return m},Tm:function(){return h},My:function(){return p}});var n=r(7653),a=r(81695),i=r(26066),s=r(85495),o=r(18103);let l=(e,t)=>
1Math.floor(Math.random()*(t-e+1))+e,c=(e,t)=>{let{cookieName:r,variants:n,cookieExpiresInDays:a=30}=t,i=n.reduce((e,t)=>e+t.weight,0);if(i>100)throw Error('Total weight for A/B test "'.concat(r,'" exceeds 100% (').concat(i,"%). Check your configuration."));let o={secure:!0,sameSite:"None",domain:(0,s.ZE)("COOKIE_DOMAIN"),expires:new Date(Date.now()+864e5*a)},c=e.get(r),u=n.map(e=>e.name);if(!c||!u.includes(c)){let t=l(0,99),a=0,i=n[0].name;for(let e of n)if(t<(a+=e.weight)){i=e.name;break}e.set(r,i,o)}},u="ab_lead_magnet",d=e=>c(e,{cookieName:u,cookieExpiresInDays:30,variants:[{name:"default",weight:50},{name:"new",weight:50}]}),m="SmartRouting3_1_ABvariant",f=e=>c(e,{cookieName:m,cookieExpiresInDays:90,variants:[{name:"new",weight:80},{name:"default",weight:20}]}),p=()=>{let e=(0,a.usePathname)();(0,n.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=(0,s.ZE)("COOKIE_DOMAIN");(0,o.kX)(e,{cookieDomain:t}),d(i.Z),f(i.Z)},[e])},h=e=>{let[t,r]=(0,n.useState)("default"),[a,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let t=i.Z.get(e),n="new"===t;(n||"default"===t)&&r(n?"new":"default"),s(!0)},[]),{variant:t,isReady:a}}},15891:function(e,t,r){"use strict";r.d(t,{$b:function(){return u},Bv:function(){return o},z7:function(){return l}});let n=e=>(e||"").toLowerCase(),a=["en-gb"],i=["tr"],s=["pt-br"],o=e=>a.includes(n(e)),l=e=>i.includes(n(e)),c=e=>s.includes(n(e)),u=e=>{let t=n(e),r=[];return o(t)&&r.push("fca-en-gb"),l(t)&&r.push("tr-locale"),c(t)&&r.push("pt-br-locale"),r}},52412:function(e){e.exports={wrapper:"Skeleton_wrapper__WlCRF",root:"Skeleton_root__cl7rA",switch:"Skeleton_switch__5hWcz","input-wrapper":"Skeleton_input-wrapper__K8wyt",inputWrapper:"Skeleton_input-wrapper__K8wyt","input-with-logo":"Skeleton_input-with-logo__SfgoR",inputWithLogo:"Skeleton_input-with-logo__SfgoR","logo-skeleton":"Skeleton_logo-skeleton__JN39F",logoSkeleton:"Skeleton_logo-skeleton__JN39F","currency-input-wrp":"Skeleton_currency-input-wrp__wiAjp",currencyInputWrp:"Skeleton_currency-input-wrp__wiAjp","ticker-amount-wrp":"Skeleton_ticker-amount-wrp__4V1L7",tickerAmountWrp:"Skeleton_ticker-amount-wrp__4V1L7","label-wrp":"Skeleton_label-wrp__qe3V5",labelWrp:"Skeleton_label-wrp__qe3V5"}},33089:function(e){e.exports={"animate-none":"WidgetSkeleton_animate-none__xEcE9",animateNone:"WidgetSkeleton_animate-none__xEcE9"}},89371:function(e){e.exports={root:"CurrencyAmountInput_root__Yd4Uk","footer-hr":"CurrencyAmountInput_footer-hr__FiGPG",footerHr:"CurrencyAmountInput_footer-hr__FiGPG",focused:"CurrencyAmountInput_focused__XH35e",wrapper:"CurrencyAmountInput_wrapper__r7pj0",readonly:"CurrencyAmountInput_readonly__yrYGA",border:"CurrencyAmountInput_border__PUypv","scale-move":"CurrencyAmountInput_scale-move__3n44S",scaleMove:"CurrencyAmountInput_scale-move__3n44S","input-with-logo":"CurrencyAmountInput_input-with-logo__RmtJY",inputWithLogo:"CurrencyAmountInput_input-with-logo__RmtJY","currency-input-wrp":"CurrencyAmountInput_currency-input-wrp__o9iIl",currencyInputWrp:"CurrencyAmountInput_currency-input-wrp__o9iIl","ticker-text":"CurrencyAmountInput_ticker-text__F8zKa",tickerText:"CurrencyAmountInput_ticker-text__F8zKa","ticker-amount-wrp":"CurrencyAmountInput_ticker-amount-wrp___zMWo",tickerAmountWrp:"CurrencyAmountInput_ticker-amount-wrp___zMWo","label-wrp":"CurrencyAmountInput_label-wrp__Bh4ew",labelWrp:"CurrencyAmountInput_label-wrp__Bh4ew",logo:"CurrencyAmountInput_logo__W968X","logo-skeleton":"CurrencyAmountInput_logo-skeleton__qQLa6 CurrencyAmountInput_logo__W968X",logoSkeleton:"CurrencyAmountInput_logo-skeleton__qQLa6 CurrencyAmountInput_logo__W968X",ticker:"CurrencyAmountInput_ticker__JOguU",amount:"CurrencyAmountInput_amount__L46MZ","mobile-hidden":"CurrencyAmountInput_mobile-hidden__1CmYL",mobileHidden:"CurrencyAmountInput_mobile-hidden__1CmYL","amount-label":"CurrencyAmountInput_amount-label__ejJrm",amountLabel:"CurrencyAmountInput_amount-label__ejJrm"}},86587:function(e){e.exports={wrapper:"Form_wrapper__Ascg_",root:"Form_root__g17x4",switch:"Form_switch__5IFGn","icon-up":"Form_icon-up__Dc7S3",iconUp:"Form_icon-up__Dc7S3","icon-down":"Form_icon-down__MaHEb",iconDown:"Form_icon-down__MaHEb",rate:"Form_rate__tVDnk",alerts:"Form_alerts__c0bhX"}},61337:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/android.a00ff8f7.svg",height:24,width:24,blurWidth:0,blurHeight:0}},63180:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/apple.de64d93b.svg",height:24,width:24,blurWidth:0,blurHeight:0}},97647:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/arrow-down-up.563fef5a.svg",height:16,width:16,blurWidth:0,blurHeight:0}},7311:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/arrow-down.b4f71338.svg",height:16,width:16,blurWidth:0,blurHeight:0}},47989:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/arrow-left.fa7e7cec.svg",height:24,width:24,blurWidth:0,blurHeight:0}},36039:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/arrow-top-right.25845ad1.svg",height:24,width:25,blurWidth:0,blurHeight:0}},48002:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/arrow-up.944ac752.svg",height:12,width:6,blurWidth:0,blurHeight:0}},42747:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/arrow.cb68a1df.svg",height:16,width:16,blurWidth:0,blurHeight:0}},95071:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/back-arrow.b58a4874.svg",height:24,width:24,blurWidth:0,blurHeight:0}},84128:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/back.a4bdad26.svg",height:24,width:24,blurWidth:0,blurHeight:0}},18295:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/calendar-blank.99f7bc71.svg",height:24,width:24,blurWidth:0,blurHeight:0}},75812:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/calendar.54554752.svg",height:24,width:24,blurWidth:0,blurHeight:0}},24109:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/card.2e2e2e01.svg",height:20,width:20,blurWidth:0,blurHeight:0}},87716:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/check-mark.e5f2b13f.svg",height:24,width:24,blurWidth:0,blurHeight:0}},66723:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/check-outline.b59dae52.svg",height:24,width:24,blurWidth:0,blurHeight:0}},31590:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/chevron-left.e6de709a.svg",height:24,width:24,blurWidth:0,blurHeight:0}},32903:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/chevron-right.fb1b33b6.svg",height:24,width:24,blurWidth:0,blurHeight:0}},5150:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/chevron-small-right.0fb7ae64.svg",height:16,width:16,blurWidth:0,blurHeight:0}},31937:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/chevron-top_1_16px.b999cb0b.svg",height:24,width:24,blurWidth:0,blurHeight:0}}
1,4746:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/chevron.7b2d2239.svg",height:16,width:16,blurWidth:0,blurHeight:0}},27620:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/clock-24px.00435e1b.svg",height:24,width:24,blurWidth:0,blurHeight:0}},71232:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/clock.6815be8a.svg",height:16,width:16,blurWidth:0,blurHeight:0}},39139:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/close-outline.b4e9a38d.svg",height:24,width:24,blurWidth:0,blurHeight:0}},15720:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/close.35d39828.svg",height:24,width:24,blurWidth:0,blurHeight:0}},25369:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/confirming.d377d036.svg",height:16,width:16,blurWidth:0,blurHeight:0}},99574:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/copy.4a6acd85.svg",height:24,width:25,blurWidth:0,blurHeight:0}},25484:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/copy_16.442dbbfb.svg",height:16,width:16,blurWidth:0,blurHeight:0}},72176:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/email.4c6c2181.svg",height:28,width:28,blurWidth:0,blurHeight:0}},38281:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/error.519fb69a.svg",height:16,width:16,blurWidth:0,blurHeight:0}},93362:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/exchanging.ba1ac6ad.svg",height:16,width:16,blurWidth:0,blurHeight:0}},91038:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/external-link-16px.ed37e2ec.svg",height:16,width:16,blurWidth:0,blurHeight:0}},58950:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/external-link.e7162b6c.svg",height:36,width:36,blurWidth:0,blurHeight:0}},39681:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/from-coin.9cc6f65b.svg",height:21,width:21,blurWidth:0,blurHeight:0}},18040:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/geo-tag.8e66815b.svg",height:24,width:25,blurWidth:0,blurHeight:0}},68945:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/global.7c922de0.svg",height:20,width:20,blurWidth:0,blurHeight:0}},57454:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/hand-withdraw.dbf2eeaa.svg",height:24,width:24,blurWidth:0,blurHeight:0}},31847:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/info.6f1649a3.svg",height:16,width:16,blurWidth:0,blurHeight:0}},60799:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/key.9eebd1a9.svg",height:24,width:24,blurWidth:0,blurHeight:0}},13843:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/layout.24f4b4f4.svg",height:24,width:24,blurWidth:0,blurHeight:0}},51005:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/linkedin-outline.d67d0315.svg",height:24,width:24,blurWidth:0,blurHeight:0}},39315:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/lock.7d3ed897.svg",height:16,width:16,blurWidth:0,blurHeight:0}},90757:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/menu.29722ffe.svg",height:24,width:24,blurWidth:0,blurHeight:0}},93482:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/minus.a242ca8b.svg",height:24,width:24,blurWidth:0,blurHeight:0}},70518:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/moon.abad34e6.svg",height:12,width:12,blurWidth:0,blurHeight:0}},34976:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/person.db532e73.svg",height:24,width:24,blurWidth:0,blurHeight:0}},34220:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/plus.49d7cc8e.svg",height:24,width:24,blurWidth:0,blurHeight:0}},14316:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/qr-code-scan.6c9df336.svg",height:24,width:24,blurWidth:0,blurHeight:0}},38588:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/question.178f577c.svg",height:24,width:24,blurWidth:0,blurHeight:0}},26136:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/quote.90d26f72.svg",height:42,width:42,blurWidth:0,blurHeight:0}},37397:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/refresh-left.3e070017.svg",height:24,width:24,blurWidth:0,blurHeight:0}},76555:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/reject.54e0b7ba.svg",height:24,width:24,blurWidth:0,blurHeight:0}},49240:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/search.1c3b3f12.svg",height:24,width:24,blurWidth:0,blurHeight:0}},89432:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/sending.530e98f8.svg",height:16,width:16,blurWidth:0,blurHeight:0}},56297:function(e,t,r){"use strict";
1r.r(t),t.default={src:"/web-assets/_next/static/media/settings.cda286b1.svg",height:32,width:32,blurWidth:0,blurHeight:0}},6806:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/sign-out.8c9e1529.svg",height:24,width:24,blurWidth:0,blurHeight:0}},18145:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/squares-four.f85fac1b.svg",height:24,width:24,blurWidth:0,blurHeight:0}},86353:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/star.3ea4085f.svg",height:13,width:14,blurWidth:0,blurHeight:0}},57922:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/success.514227f9.svg",height:24,width:24,blurWidth:0,blurHeight:0}},80086:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/sun.a786a99e.svg",height:12,width:12,blurWidth:0,blurHeight:0}},89500:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/swap.f4fac3c3.svg",height:16,width:16,blurWidth:0,blurHeight:0}},96686:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/ticket.c8be5eb1.svg",height:24,width:25,blurWidth:0,blurHeight:0}},71376:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/to-coin.efd53c6f.svg",height:21,width:21,blurWidth:0,blurHeight:0}},72068:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/tooltip_v2.651ad257.svg",height:24,width:24,blurWidth:0,blurHeight:0}},47273:function(e,t,r){"use strict";r.r(t),t.default={src:"/web-assets/_next/static/media/warning.fb2c7571.svg",height:16,width:16,blurWidth:0,blurHeight:0}}}]);

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.