PageSourceSearch

https://www.bitopro.com/ns/_next/static/chunks/1701.44483da2ac4d3f15.js

js bitopro.com collected 2026-10-02 04:08:33 UTC 6,913 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1701],{15526:(t,e,r)=>{r.d(e,{n:()=>h});var n=r(14232),s=r(15154),i=r(55640),a=r(68941),o=r(29382);class u extends o.Q{constructor(t,e){super(),this.client=t,this.setOptions(e),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;let r=this.options;this.options=this.client.defaultMutationOptions(t),(0,s.f8)(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(e=this.currentMutation)||e.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;null==(t=this.currentMutation)||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();let e={listeners:!0};"success"===t.type?e.onSuccess=!0:"error"===t.type&&(e.onError=!0),this.notify(e)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,e){return this.mutateOptions=e,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==t?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let t=this.currentMutation?this.currentMutation.state:(0,i.$)(),e="loading"===t.status,r={...t,isLoading:e,isPending:e,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(t){a.j.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var e,r,n,s,i,a,o,u;t.onSuccess?(null==(e=(r=this.mutateOptions).onSuccess)||e.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(n=(s=this.mutateOptions).onSettled)||n.call(s,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):t.onError&&(null==(i=(a=this.mutateOptions).onError)||i.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(o=(u=this.mutateOptions).onSettled)||o.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)})})}}var l=r(15379),c=r(85461),d=r(7192);function h(t,e,r){let i=(0,s.GR)(t,e,r),o=(0,c.jE)({context:i.context}),[h]=n.useState(()=>new u(o,i));n.useEffect(()=>{h.setOptions(i)},[h,i]);let m=(0,l.r)(n.useCallback(t=>h.subscribe(a.j.batchCalls(t)),[h]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),g=n.useCallback((t,e)=>{h.mutate(t,e).catch(p)},[h]);if(m.error&&(0,d.G)(h.options.useErrorBoundary,[m.error]))throw m.error;return{...m,mutate:g,mutateAsync:m.mutate}}function p(){}},56049:(t,e,r)=>{r.d(e,{Fv:()=>o,PP:()=>i,_Q:()=>s,di:()=>a});var n=r(9550);let s="".concat(n.zC.V5,"/margin/provisioning/borrow"),i="".concat(n.zC.V5,"/margin/borrow"),a="".concat(n.zC.V5,"/margin/repay"),o="".concat(n.zC.V5,"/margin/transfer")},56943:(t,e,r)=>{r.d(e,{$A:()=>u,F3:()=>a,IU:()=>h,MG:()=>l,Qx:()=>c,W6:()=>d,aC:()=>o,pq:()=>p});var n=r(9550),s=r(64121),i=r(56049);let a=()=>(0,s.Fu)({method:"GET",pathname:i._Q}),o=()=>(0,s.Fu)({method:"POST",pathname:"".concat(n.zC.V5,"/margin/enable"),json:{}}),u=t=>{let{currency:e,amount:r,fromBalanceKind:i,toBalanceKind:a}=t;return(0,s.Fu)({method:"POST",pathname:"".concat(n.zC.V5,"/margin/transfer"),json:{currency:e,amount:r,fromBalanceKind:i,toBalanceKind:a}})},l=t=>{let{borrowAmount:e,currency:r}=t;return(0,s.Fu)({method:"GET",pathname:i.PP,query:{currency:r,borrowAmount:e}})},c=t=>{let{borrowAmount:e,currency:r}=t;return(0,s.Fu)({method:"POST",pathname:i.PP,json:{borrowAmount:e,currency:r}})},d=t=>{let{repayAmount:e,currency:r}=t;return(0,s.Fu)({method:"GET",pathname:i.di,query:{currency:r,repayAmount:e}})},h=t=>{let{repayAmount:e,currency:r}=t;return(0,s.Fu)({method:"POST",pathname:i.di,json:{currency:r,repayAmount:e}})},p=t=>{let{amount:e,currency:r,fromBalanceKind:n,toBalanceKind:a}=t;return(0,s.Fu)({method:"GET",pathname:i.Fv,query:{currency:r,amount:e,fromBalanceKind:String(n),toBalanceKind:String(a)}})}},67730:(t,e,r)=>{r.r(e),r.d(e,{TestingModalFooter:()=>M});
1var n=r(37876),s=r(15526),i=r(84572),a=r(56943),o=r(64570),u=r(37934),l=r(81398),c=r(97591),d=r(48230),h=r.n(d),p=r(72391),m=r(78431);let g=p.default.button.withConfig({componentId:"sc-a29abdbe-0"})(["display:flex;justify-content:center;align-items:center;margin-right:3px;padding:1.7px;width:17px;height:17px;border-radius:3px;border:",";background-color:",";cursor:pointer;&:hover{border:1px solid ",";}.check{color:#fff;}"],t=>{let{isActive:e}=t;return e?"none":"1px solid #CBD2E9"},t=>{let{theme:e,isActive:r}=t;return r?e.colors.brand.default.default:"initial"},t=>{let{theme:e,isActive:r}=t;return r?"none":e.colors.brand.default.default}),b=p.default.div.withConfig({componentId:"sc-a29abdbe-1"})(["display:flex;align-items:center;gap:3px;"]),f=p.default.span.withConfig({componentId:"sc-a29abdbe-2"})(["color:",";",";line-height:1;cursor:pointer;"],t=>{let{theme:e}=t;return e.colors.textV2.default.default},t=>{let{theme:e}=t;return m.I[e.lang].desktop.text.sm}),v=p.default.div.withConfig({componentId:"sc-a29abdbe-3"})(["display:flex;align-items:center;margin-left:auto;gap:16px;"]),x=(0,p.default)(h()).withConfig({componentId:"sc-a29abdbe-4"})(["color:",";text-underline-offset:5px;",";"],t=>{let{theme:e}=t;return e.colors.brand.default.default},t=>{let{theme:e}=t;return m.I[e.lang].desktop.text.l}),M=t=>{let{isOpenTrustTradingAllowedButtonDisabled:e,setPage:r,isAgreementRead:d,switchIsAgreementRead:h,onEnableMarginBorrowAccountSuccess:p}=t,{t:m}=(0,i.Bd)(),M=(0,c.v)({type:"error"}),{mutate:C,isLoading:R}=(0,s.n)({mutationFn:a.aC,meta:{errorMessage:m("error.something_went_wrong"),showErrorToast:M},onSuccess:p});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(b,{onClick:h,children:[(0,n.jsx)(g,{isActive:d,type:"button",children:d&&(0,n.jsx)(u.J,{size:12,className:"check"})}),(0,n.jsxs)(f,{"data-testid":"margin.testingModalFooter.agreementText",children:[m("margin.testingModalFooter.agreementText"),(0,n.jsx)(x,{"data-testid":"margin.testingModalFooter.termsOfService",href:l.bA,onClick:t=>t.stopPropagation(),target:"_blank",rel:"noopener noreferrer",children:m("margin.testingModalFooter.termsOfService")}),m("margin.testingModalFooter.andKnowTheRisk")]})]}),(0,n.jsxs)(v,{children:[(0,n.jsx)(o.$,{"data-testid":"margin.testingModalFooter.prevStep",size:"lg",variant:"secondary",radius:"round",onClick:()=>r(t=>t-1),children:m("margin.testingModalFooter.prevStep")}),(0,n.jsx)(o.$,{"data-testid":"margin.testingModalFooter.enableMarginTrading",size:"lg",variant:"primary",radius:"round",disabled:e,isLoading:R,onClick:()=>C(),children:m("margin.testingModalFooter.enableMarginTrading")})]})]})}}}]);

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.