(self["webpackChunkexchange"]=self["webpackChunkexchange"]||[]).push([[9351],{11393:function(e,t,n){n(37467),n(44732),n(79577),n(26280),n(27913),n(47801),n(64979),n(14603),n(47566),n(98721),function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var r;function o(e){return["image/png","image/jpeg","image/gif"].some((t=>t===e))}n.r(t),n.d(t,"canvastoDataURL",(function(){return i})),n.d(t,"canvastoFile",(function(){return c})),n.d(t,"dataURLtoFile",(function(){return s})),n.d(t,"dataURLtoImage",(function(){return l})),n.d(t,"downloadFile",(function(){return h})),n.d(t,"filetoDataURL",(function(){return d})),n.d(t,"imagetoCanvas",(function(){return m})),n.d(t,"urltoBlob",(function(){return g})),n.d(t,"urltoImage",(function(){return p})),n.d(t,"compress",(function(){return w})),n.d(t,"compressAccurately",(function(){return b})),n.d(t,"EImageType",(function(){return r})),function(e){e.PNG="image/png",e.JPEG="image/jpeg",e.GIF="image/gif"}(r||(r={}));var a=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}u((r=r.apply(e,t||[])).next())}))};function i(e,t=.92,n=r.JPEG){return a(this,void 0,void 0,(function*(){return o(n)||(n=r.JPEG),e.toDataURL(n,t)}))}function c(e,t=.92,n=r.JPEG){return new Promise((r=>e.toBlob((e=>r(e)),n,t)))}var u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}u((r=r.apply(e,t||[])).next())}))};function s(e,t){return u(this,void 0,void 0,(function*(){const n=e.split(",");let r=n[0].match(/:(.*?);/)[1];const a=atob(n[1]);let i=a.length;const c=new Uint8Array(i);for(;i--;)c[i]=a.charCodeAt(i);return o(t)&&(r=t),new Blob([c],{type:r})}))}function l(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error("dataURLtoImage(): dataURL is illegal")),r.src=e}))}function h(e,t){const n=document.createElement("a");n.href=window.URL.createObjectURL(e),n.download=t||Date.now().toString(36),document.body.appendChild(n);const r=document.createEvent("MouseEvents");r.initEvent("click",!1,!1),n.dispatchEvent(r),document.body.removeChild(n)}function d(e){return new Promise((t=>{const n=new FileReader;n.onloadend=e=>t(e.target.result),n.readAsDataURL(e)}))}var f=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}u((r=r.apply(e,t||[])).next())}))};function m(e,t={}){return f(this,void 0,void 0,(function*(){const n=Object.assign({},t),r=document.createElement("canvas"),o=r.getContext("2d");let a,i;for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=Number(n[e]));if(n.scale){const t=n.scale>0&&n.scale<10?n.scale:1;i=e.width*t,a=e.height*t}else i=n.width||n.height*e.width/e.height||e.width,a=n.height||n.width*e.height/e.width||e.height;switch([5,6,7,8].some((e=>e===n.orientation))?(r.height=i,r.width=a):(r.height=a,r.width=i),n.orientation){case 3:o.rotate(180*Math.PI/180),o.drawImage(e,-r.width,-r.height,r.width,r.height);break;case 6:o.rotate(90*Math.PI/180),o.drawImage(e,0,-r.width,r.height,r.width);break;case 8:o.rotate(270*Math.PI/180),o.drawImage(e,-r.height,0,r.height,r.width);break;case 2:o.translate(r.width,0),o.scale(-1,1),o.drawImage(e,0,0,r.width,r.height);break;case 4:o.translate(r.width,0),o.scale(-1,1),o.rotate(180*Math.PI/180),o.drawImage(e,-r.width,-r.height,r.width,r.height);break;case 5:o.translate(r.width,0),o.scale(-1,1),o.rotate(90*Math.PI/180),o.drawImage(e,0,-r.width,r.height,r.width);break;case 7:o.translate(r.width,0),o.scale(-1,1),o.rotate(270*Math.PI/180),o.drawImage(e,-r.height,0,r.height,r.width);break;default:o.drawImage(e,0,0,r.width,r.height)}return r}))}function g(e){return fetch(e).then((e=>e.blob()))}function p(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error("urltoImage(): Image failed to load, please check the image URL")),r.src=e}))}var y=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}u((r=r.apply(e,t||[])).next())}))};function w(e,t={}){return y(this,void 0,void 0,(function*(){if(!(e instanceof Blob))throw new Error("compress(): First arg must be a Blob object or a File object.");if("object"!=typeof t&&(t=Object.assign({quality:t})),t.quality=Number(t.quality),Number.isNaN(t.quality))return e;const n=yield d(e);let a=n.split(",")[0].match(/:(.*?);/)[1],c=r.JPEG;o(t.type)&&(c=t.type,a=t.type);const u=yield l(n),h=yield m(u,Object.assign({},t)),f=yield i(h,t.quality,c),g=yield s(f,a);return g.size>e.size?e:g}))}function b(e,t={}){return y(this,void 0,void 0,(function*(){if(!(e instanceof Blob))throw new Error("compressAccurately(): First arg must be a Blob object or a File object.");if("object"!=typeof t&&(t=Object.assign({size:t})),t.size=Number(t.size),Number.isNaN(t.size))return e;if(1024*t.size>e.size)return e;t.accuracy=Number(t.accuracy),(!t.accuracy||t.accuracy<.8||t.accuracy>.99)&&(t.accuracy=.95);const n=t.size*(2-t.accuracy)*1024,a=1024*t.size,c=t.size*t.accuracy*1024,u=yield d(e);let h=u.split(",")[0].match(/:(.*?);/)[1],f=r.JPEG;o(t.type)&&(f=t.type,h=t.type);const g=yield l(u),p=yield m(g,Object.assign({},t));let y,w=.5;const b=[null,null];for(let e=1;e<=7;e++){y=yield i(p,w,f);const t=.75*y.length;if(7===e){(nt)&&(y=[y,...b].filter((e=>e)).sort(((e,t)=>Math.abs(.75*e.length-a)-Math.abs(.75*t.length-a)))[0]);break}if(nt))break;b[0]=y,w+=Math.pow(.5,e+1)}}const v=yield s(y,h);return v.size>e.size?e:v}))}}])}))},76334:function(e,t,n){e.exports=n(11393)},49351:function(e,t,n){"use strict";n.d(t,{Jp:function(){return m},KE:function(){return s},Ku:function(){return b},V:function(){return w},Vg:function(){return p},cE:function(){return y},gV:function(){return d},it:function(){return g},qh:function(){return h},sM:function(){return l},xs:function(){return f}});var r=n(63793),o=n(50788),a=n.n(o),i=n(76334),c=n(34642),u=n(2183);const s=(e,t)=>{const{timestamp:n,signature:r}=(0,u.C)();let o=.6;return e.file.size>524288&&(o=.2),new Promise(((u,s)=>{(0,i.compress)(e.file,o).then((e=>{const o=new FormData;o.append("file",e),a().post(`${c.C1}public/uploadimg!execute.action`,o,{timeout:15e3,headers:{"Content-Type":"multipart/form-data",tissuePaper:n,sign:r},onDownloadProgress:e=>{e.lengthComputeable&&t((e.loaded/e.total*100).toFixed(2))}}).then((e=>{const{code:t,data:n}=e.data;t/1===0&&u(n)})).catch((e=>{s(e)}))}))}))},l=e=>(0,r.A)({url:"/api/kyc!apply.action",method:"GET",loading:!0,duration:0,params:{nationality:e.countryName,idname:e.idname||"id/passpost",idnumber:e.idnumber,name:e.name,idimg_1:e.frontFile.length&&e.frontFile[0].resURL||"",idimg_2:e.reverseFile.length&&e.reverseFile[0].resURL||"",idimg_3:e.fileList.length&&e.fileList[0].resURL||""}}),h=()=>(0,r.A)({url:"/api/kyc!get.action",method:"GET"}),d=e=>(0,r.A)({url:"/api/wallet!getAll.action",loading:!1,method:"GET",params:{cancelToken:e}}),f=()=>(0,r.A)({url:"/api/exchangeapplyorder!view.action",method:"GET"}),m=e=>(0,r.A)({url:"/api/exchangeapplyorder!buy_and_sell.action",method:"GET",loading:!0,params:{volume:e.volume,symbol:e.symbol.toLowerCase(),symbol_to:e.symbol_to.toLowerCase(),session_token:e.session_token}}),g=e=>(0,r.A)({url:"/api/exchangeapplyorder!buy_and_sell_fee.action",method:"GET",params:{symbol:e.symbol.toLowerCase(),symbol_to:e.symbol_to.toLowerCase(),volume:e.volume||1}}),p=e=>(0,r.A)({url:"/api/exchangeapplyorder!list.action",method:"GET",params:{page_no:e}}),y=e=>(0,r.A)({url:"api/rechargeBlockchain!get.action",method:"get",params:{order_no:e}}),w=e=>(0,r.A)({url:"api/withdraw!get.action",method:"get",params:{order_no:e}}),b=(e="exchange",t=1,n="")=>(0,r.A)({url:"api/moneylog!list.action",method:"get",params:{category:e,page_no:t,contentType:n}})},14603:function(e,t,n){"use strict";var r=n(36840),o=n(79504),a=n(655),i=n(22812),c=URLSearchParams,u=c.prototype,s=o(u.append),l=o(u["delete"]),h=o(u.forEach),d=o([].push),f=new c("a=1&a=2&b=3");f["delete"]("a",1),f["delete"]("b",void 0),f+""!=="a=2"&&r(u,"delete",(function(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&void 0===n)return l(this,e);var r=[];h(this,(function(e,t){d(r,{key:t,value:e})})),i(t,1);var o,c=a(e),u=a(n),f=0,m=0,g=!1,p=r.length;while(f