1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1220],{1198:(e,t,a)=>{"use strict";a.d(t,{s:()=>r});let r=(0,a(72881).w)({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"})},9337:(e,t,a)=>{"use strict";a.d(t,{e:()=>o});var r=a(17187),s=a(25258),n=a(76176);let o=({noBg:e,...t})=>{let a=(0,s.dU)("white","gray.700");return(0,r.jsx)(n.a,{bg:e?void 0:a,py:{base:8,sm:8},px:{base:4,md:8,sm:4},width:{base:"100%"},maxW:"100%",boxShadow:"rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.03) 0px 12px 16px 0px, rgba(0, 0, 0, 0.04) 0px 1px 2px 0px",rounded:{base:"none",md:"lg"},...t,overflow:"hidden"})}},35587:(e,t,a)=>{"use strict";a.d(t,{A:()=>B});var r=a(17187),s=a(1198),n=a(38948),o=a(76176),i=a(18806),l=a(97072),c=a(64470),d=a(4496),u=a(53456),h=a(84578),p=a(5776),x=a(50443),m=a(9337),g=a(89569),f=a(53417),b=a(45023),w=a(18543),_=a(89338),y=a(68023),j=a(99496),v=a(85042),E=a(25926),k=a(3631),S=a(67994),F=a(17747),A=a(9264),C=a(23902);let z=(0,p.i7)` 2 from { 3 opacity: 0; 4 transform: translateY(20px); 5 } 6 to { 7 opacity: 1; 8 transform: translateY(0); 9 } 10`,D={æ¿èªæ¸ã¿:{bg:"#E6F7EF",color:"#00A063"},確èªå¾ ã¡:{bg:"#FFF6E5",color:"#B8860B"},å¦çä¸:{bg:"#EDF1F7",color:"#5A6B8C"},å¦èª:{bg:"#FDECEC",color:"#D64545"},æå¦:{bg:"#FDECEC",color:"#D64545"},å¦çã¨ã©ã¼:{bg:"#FDECEC",color:"#D64545"},ãã£ã³ã»ã«:{bg:"#EDF1F7",color:"#5A6B8C"}},L={bg:"#EDF1F7",color:"#5A6B8C"},W=e=>{let t=(0,k.D$)(e);return t?t.toLocaleString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"Asia/Tokyo"}):""},B=({isStandalone:e=!1})=>{let t=(0,y.Jd)(),a=t?.uid,{resources:p}=(0,_.r)(),B=p.users_new_withdraw_page,U=p.users_withdraw_history_page,{success:Z,error:H,warning:R}=(0,w.S)(),{userInfo:$,loading:N,error:M,withdrawSummary:T,withdrawNew:I,withdrawCheck:J,withdrawHistory:O,getAllWithdrawHistory:q,checkApprovedBrokerAccount:Y,fetchApprovedBrokerAccounts:G,checkWithdraw24hLimit:P,withdrawSetting:V,fetchInfoMaintenance:K}=(0,f.S)(a),Q=Math.max(0,(0,E.dV)($?.balance_usd)),X=!a||!N&&(!$||!!M),[ee,et]=(0,x.useState)(!1),[ea,er]=(0,x.useState)(!1),[es,en]=(0,x.useState)(!1),[eo,ei]=(0,x.useState)(!0),[el,ec]=(0,x.useState)(""),[ed,eu]=(0,x.useState)(""),[eh,ep]=(0,x.useState)(""),[ex,em]=(0,x.useState)(null),[eg,ef]=(0,x.useState)(null),eb=(0,F.MC)(V,B),{cancelWithdrawApi:ew,createdWithdrawApi:e_,exchangeRate:ey,exchangeRateError:ej,fetchExchangeRate:ev}=(0,b.G)(),[eE,ek]=(0,x.useState)(null),[eS,eF]=(0,x.useState)(!1);(0,x.useEffect)(()=>{ev()},[ev]),(0,x.useEffect)(()=>{a&&(et(!1),ei(!0),O(a,g.bZ,!0))},[a,O]),(0,x.useEffect)(()=>{K()},[K]);let eA=(0,x.useCallback)(async(e=!1)=>{if(a&&!ea){er(!0);try{let t=await O(a,g.Zm,e,ex,eg);ei(t.length===g.Zm)}finally{er(!1)}}},[ea,eg,ex,a,O]),eC=(0,x.useCallback)(async()=>{ee||(et(!0),ei(!0),await eA(!0))},[ee,eA]),ez=(0,x.useCallback)(async e=>{if(!ee||!eo||ea)return;let t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight>120||await eA(!1)},[eo,ea,ee,eA]),eD=(0,x.useCallback)(async()=>{if(!a)return;if(!el){em(null),ef(null),ei((await O(a,g.Zm,!0)).length===g.Zm);return}if("custom"===el){if(!ed||!eh)return;let e=new Date(ed),t=new Date(eh);if(Number.isNaN(e.getTime())||Number.isNaN(t.getTime()))return;e.setHours(0,0,0,0),t.setHours(23,59,59,999),em(e),ef(t),ei((await O(a,g.Zm,!0,e,t)).length===g.Zm);return}let e=(0,j.dF)(el);e.setHours(0,0,0,0);let t=new Date;t.setHours(23,59,59,999),em(e),ef(t),ei((await O(a,g.Zm,!0,e,t)).length===g.Zm)},[eh,ed,el,a,O]),eL=(0,x.useCallback)(e=>(0,F.Or)(e,U),[U]),eW=(0,x.useMemo)(()=>({æ¿èªæ¸ã¿:U?.status_approved,確èªå¾ ã¡:U?.status_awaiting_confirmation,å¦çä¸:U?.status_processing,å¦èª:U?.status_rejected,æå¦:U?.status_rejected,å¦çã¨ã©ã¼:U?.status_processing_error,ãã£ã³ã»ã«:U?.status_canceled}),[U]),eB=(0,x.useCallback)(e=>e?eW[e]??e:"",[eW]),eU=(0,x.useCallback)(async e=>{if(a&&!es){en(!0);try{let t=await q(a,ex,eg);if(0===t.length)return void H(U.no_target_data,{duration:9e3});let r=t.map(e=>({request_date:W(e.created_at),completion_date:W(e.completed_at),amount_usd:e.amount_usd||0,method:eL(e.method),status:eB(e.status)||"-"}));await (0,v.r)(e,"csv",r,B.withdraw_history,[{header:U.withdrawal_request_date,key:"request_date"},{header:U.withdrawal_completion_date,key:"completion_date"},{header:U.amount,key:"amount_usd"},{header:U.payee,key:"method"},{header:U.status,key:"status"}]),t.length>=f.J&&R(B.csv_download_truncated.replace("{count}",String(f.J)),{duration:9e3})}catch(e){console.error("Failed to export withdraw history csv:",e),H(B.csv_download_failed,{duration:9e3})}finally{en(!1)}}},[q,eL,eB,es,B,eg,ex,H,R,a,U]),eZ=(0,x.useCallback)(async()=>{a&&await O(a,ee?g.Zm:g.bZ,!0,ex,eg)},[a,ee,ex,eg,O]),eH=I?.[0]?.method,eR=(0,x.useCallback)(()=>{ek(null)},[]),e$=(0,x.useCallback)(async()=>
10{if(eE&&!eS){eF(!0);try{await ew(eE),Z(B.cancel_withdraw_success,{duration:9e3}),ek(null),await eZ()}catch{H(B.cancel_withdraw_failed,{duration:9e3}),ek(null),await eZ().catch(e=>{console.error("Failed to refetch withdraw history after cancel failure:",e)})}finally{eF(!1)}}},[eE,ew,eZ,eS,B,H,Z]);return(0,r.jsxs)(m.e,{noBg:!0,py:e?0:{base:4,md:6},px:{base:0,md:0},children:[(0,r.jsxs)(o.a,{bg:"#F2F4F7",borderRadius:{base:"none",md:"24px"},p:{base:3,md:4},minH:e?"100dvh":"auto",maxW:e?"container.sm":"100%",mx:e?"auto":"unset",children:[eb.length>0&&(0,r.jsxs)(o.a,{mb:3,p:{base:3,md:3},bg:"#FFF8E7",borderRadius:"12px",border:"1px solid #F5C518",animation:`${z} 480ms ease-out`,children:[(0,r.jsx)(i.E,{fontSize:{base:"14px",md:"12px"},fontWeight:"700",color:"#B45309",mb:1,children:B.maintenance_banner_title}),(0,r.jsx)(l.s,{gap:2,flexWrap:"wrap",children:eb.map(e=>(0,r.jsx)(i.E,{fontSize:{base:"13px",md:"11px"},color:"#92400E",fontWeight:"600",children:B.maintenance_banner_method_label.replace("{method}",e.displayName)},e.id))})]}),(0,r.jsxs)(c.x,{templateColumns:e?"1fr":{base:"1fr",lg:"2fr 1.2fr"},gap:3,children:[(0,r.jsx)(C.A,{uid:a,userInfo:$,userLoading:N,userError:M,isUserUnavailable:X,availableBalance:Q,withdrawSetting:V,withdrawCheck:J,checkApprovedBrokerAccount:Y,fetchApprovedBrokerAccounts:G,checkWithdraw24hLimit:P,createdWithdrawApi:e_,lastUsedMethod:eH,exchangeRate:ey,exchangeRateError:ej,onSubmitSuccess:eZ}),!e&&(0,r.jsxs)(o.a,{bg:"white",borderRadius:"14px",border:"1px solid #DFE3EA",p:4,children:[(0,r.jsx)(i.E,{fontSize:"12px",fontWeight:"700",color:"#4A5568",mb:4,children:B.your_stats}),(0,r.jsxs)(l.s,{direction:"column",gap:3,children:[(0,r.jsxs)(l.s,{justify:"space-between",align:"center",pb:2,borderBottom:"1px solid #EEF1F5",children:[(0,r.jsx)(i.E,{fontSize:"12px",color:"#7A8497",children:B.monthly_cp_total}),(0,r.jsx)(i.E,{fontSize:"12px",fontWeight:"700",children:(0,E.vv)(T.monthlyWithdraw)})]}),(0,r.jsxs)(l.s,{justify:"space-between",align:"center",pb:2,borderBottom:"1px solid #EEF1F5",children:[(0,r.jsx)(i.E,{fontSize:"12px",color:"#7A8497",children:B.total_received_amount}),(0,r.jsx)(i.E,{fontSize:"12px",fontWeight:"700",children:(0,E.vv)(T.totalReceivedAmount)})]}),(0,r.jsxs)(l.s,{justify:"space-between",align:"center",children:[(0,r.jsx)(i.E,{fontSize:"12px",color:"#7A8497",children:B.withdraw_count}),(0,r.jsxs)(i.E,{fontSize:"12px",fontWeight:"700",children:[T.totalWithdrawCount,B.count_suffix]})]})]})]})]}),!e&&(0,r.jsxs)(o.a,{mt:3,bg:"white",borderRadius:"14px",border:"1px solid #DFE3EA",p:{base:4,md:6},animation:`${z} 480ms ease-out`,children:[(0,r.jsxs)(l.s,{mb:3,gap:2,align:{base:"stretch",md:"center"},justify:"space-between",direction:{base:"column",md:"row"},children:[(0,r.jsx)(i.E,{fontSize:"12px",fontWeight:"700",color:"#6F7A8C",lineHeight:"1",children:ee?B.withdraw_history:B.recent_withdrawals}),(0,r.jsxs)(l.s,{gap:2,align:"center",w:{base:"100%",md:"auto"},direction:{base:"column",md:"row"},children:[ee&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.l,{value:el,placeholder:U.all_periods,onChange:e=>{ec(e.target.value)},h:"34px",fontSize:"12px",w:{base:"100%",md:"150px"},bg:"#FCFDFE",children:[(0,r.jsx)("option",{value:"today",children:U.today}),(0,r.jsx)("option",{value:"week",children:U.one_week}),(0,r.jsx)("option",{value:"month",children:U.one_month}),(0,r.jsx)("option",{value:"threeMonth",children:U.three_months}),(0,r.jsx)("option",{value:"year",children:U.one_year}),(0,r.jsx)("option",{value:"custom",children:U.custom})]}),"custom"===el&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.p,{type:"date",size:"sm",value:ed,onChange:e=>{eu(e.target.value)},w:{base:"100%",md:"170px"}}),(0,r.jsx)(i.E,{fontSize:"12px",color:"#6F7A8C",minW:{base:"100%",md:"auto"},textAlign:"center",children:U.from}),(0,r.jsx)(u.p,{type:"date",size:"sm",value:eh,onChange:e=>{ep(e.target.value)},w:{base:"100%",md:"170px"}})]}),(0,r.jsx)(h.$,{size:"sm",h:"34px",minW:{base:"100%",md:"72px"},onClick:eD,children:U.search})]}),(0,r.jsx)(h.$,{size:"sm",h:"34px",minW:{base:"100%",md:"auto"},variant:"outline",bg:"transparent",leftIcon:(0,r.jsx)(s.s,{}),isLoading:es,isDisabled:!a||es,onClick:eU,children:B.csv_download})]})]}),(0,r.jsxs)(l.s,{direction:"column",maxH:ee?{base:"360px",md:"480px"}:void 0,overflowY:ee?"auto":"visible",onScroll:ez,children:[I.map((e,t)=>(0,r.jsxs)(l.s,{justify:"space-between",align:"center",py:3,borderBottom:t<I.length-1?"1px solid #E6EAF1":"none",bg:"transparent",transition:"background-color 80ms linear",_hover:{bg:"#F7F8FA"},animation:`${z} 480ms ease-out`,style:{animationDelay:`${80*t}ms`,animationFillMode:"both"},children:[(0,r.jsxs)(o.a,{children:[(0,r.jsx)(i.E,{fontSize:"12px",fontWeight:"500",color:"#3A3F47",lineHeight:"1.05",children:eL(e.method)}),(0,r.jsx)(i.E,{mt:1,fontSize:"10px",color:"#738099",lineHeight:"1.1",children:(0,k.m0)(e.completed_at||e.created_at,{fallback:B.withdraw_date_fallback,template:B.withdraw_date_format})})]}),(0,r.jsxs)(l.s,{align:"center",gap:3,children:[(e.source??"withdraw")==="withdraw"&&!!e.id&&"確èªå¾
ã¡"===e.status&&(0,r.jsx)(h.$,{size:"sm",h:"32px",px:3,fontSize:"12px",bg:"black",color:"white",border:"1px solid black",_hover:{bg:"white",color:"black"},_active:{bg:"white",color:"black"},leftIcon:(0,r.jsx)(n.U,{boxSize:"9px"}),iconSpacing:1.5,isDisabled:eS,onClick:()=>
10ek(e.id??null),children:B.cancel_withdraw}),(0,r.jsxs)(o.a,{textAlign:"right",children:[(0,r.jsx)(i.E,{fontSize:"16px",fontWeight:"700",color:"#3A3F47",lineHeight:"1",children:(0,E.vv)(e.amount_usd||0)}),(0,r.jsxs)(l.s,{mt:1,justify:"flex-end",align:"center",gap:1,children:[(!e.status||"æ¿èªæ¸ã¿"===e.status)&&(0,r.jsx)(i.E,{fontSize:"11px",color:"#00A063",lineHeight:"1.1",children:(0,S.Le)(e.created_at,e.completed_at,{measuring:B.transfer_speed_measuring,seconds:B.transfer_speed_seconds,minutes:B.transfer_speed_minutes})}),e.status&&(0,r.jsx)(i.E,{px:1.5,py:.5,borderRadius:"6px",bg:(D[e.status]??L).bg,fontSize:"10px",fontWeight:"700",color:(D[e.status]??L).color,lineHeight:"1.1",children:eB(e.status)})]})]})]})]},`${e.source||"withdraw"}:${e.id||e.completed_at?.seconds||t}`)),0===I.length&&(0,r.jsx)(i.E,{py:3,fontSize:"12px",color:"#738099",children:B.no_withdraw_history}),ee&&ea&&(0,r.jsx)(i.E,{py:3,fontSize:"12px",color:"#738099",textAlign:"center",children:B.loading}),ee&&!eo&&I.length>0&&(0,r.jsx)(i.E,{py:3,fontSize:"12px",color:"#9AA3B2",textAlign:"center",children:B.all_history_loaded})]}),!ee&&(0,r.jsx)(i.E,{mt:6,textAlign:"right",fontSize:"11px",color:"#6F7A8C",lineHeight:"1",cursor:a?"pointer":"default",_hover:a?{textDecoration:"underline",color:"#3A3F47"}:void 0,onClick:()=>{eC()},children:B.view_all_history})]})]}),(0,r.jsx)(A.t,{isOpen:null!==eE,isSubmitting:eS,onClose:eR,onConfirm:()=>{e$()},resources:B})]})}},35596:(e,t,a)=>{e.exports=a(19183)},59091:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var r=a(28075),s=a.n(r),n=a(67042),o=a(75527),i=a.n(o);async function l(e){var t,a;let r,o,{format:l,rows:c,title:d,columns:u,encoding:h="utf8-bom",formatTimestamps:p=!0}=e,x=new(s()).Workbook;x.addWorksheet("sheet1");let m=x.getWorksheet("sheet1");if(!m)throw Error("Worksheet 'sheet1' not found");m.columns=u;let g=new Set;if(p){let e=["created_at","updated_at","transacted_at","expire_start_at","expire_end_at","approved_at","tweeted_at","entry_at"];u.forEach(t=>{"string"==typeof t.key&&e.includes(t.key)&&g.add(t.key)})}let f=c.map(e=>{let t={...e};return p&&g.forEach(e=>{let a=t[e];if(a&&"Invalid Date"!==a){if("object"==typeof a&&"function"==typeof a.toDate){let r=a.toDate().getTime();t[e]=(0,n.eA)(r)}else if("object"==typeof a&&"seconds"in a){let r=1e3*a.seconds;t[e]=(0,n.eA)(r)}else if("string"==typeof a){let r=new Date(a);isNaN(r.getTime())?t[e]="":t[e]=(0,n.eA)(r.getTime())}}else t[e]=""}),t});u.forEach(e=>{if("string"==typeof e.key&&e.key.includes(".")){let t=e.key;f.forEach(e=>{let a=t.split(".").reduce((e,t)=>e&&e[t],e);e[t]=a})}}),m.addRows(f);let b="xlsx"===l?await x.xlsx.writeBuffer():await x.csv.writeBuffer();t="csv"===l?function(e,t){let a;if("utf8-bom"===t){let t=new Uint8Array([239,187,191]),r=new Uint8Array(t.length+e.byteLength);r.set(t),r.set(new Uint8Array(e),t.length),a=new Blob([r],{type:"text/csv;charset=utf-8"})}else if("sjis"===t){let t=i().convert(new Uint8Array(e),{to:"SJIS",from:"UTF8"});a=new Blob([new Uint8Array(t)],{type:"text/csv"})}else throw Error(`Unsupported encoding: ${t}`);return a}(new Uint8Array(b),h):new Blob([b],{type:"application/octet-binary"}),a=`${d}.${l}`,r=window.URL.createObjectURL(t),(o=document.createElement("a")).href=r,o.download=a,o.click(),o.remove(),window.URL.revokeObjectURL(r)}},67994:(e,t,a)=>{"use strict";a.d(t,{Le:()=>s,at:()=>r});let r=(e,t)=>{let a=e[t];return"string"==typeof a?a:""},s=(e,t,a)=>{let r=a?.measuring??"â¡ Measuring transfer speed",s=a?.seconds??"â¡ {seconds}s to arrive",n=a?.minutes??"â¡ {minutes}m {seconds}s to arrive";if(!e?.seconds||!t?.seconds)return r;let o=Math.max(0,t.seconds-e.seconds);if(o<60)return s.replace("{seconds}",String(o));let i=Math.floor(o/60);return n.replace("{minutes}",String(i)).replace("{seconds}",String(o%60))}},85042:(e,t,a)=>{"use strict";a.d(t,{r:()=>s});var r=a(59091);let s=async(e,t,a,s,n,o,i)=>{e.preventDefault(),await (0,r.Z)({format:t,rows:a,title:s,columns:n,encoding:"utf8-bom"})}}}]);
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.