binance-fiat-widget
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(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=9)}([function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){(function(r){var o;!function(r){"use strict";function i(e){var t=e&&e.Promise||r.Promise,n=e&&e.XMLHttpRequest||r.XMLHttpRequest,o=r;return function(){var e=Object.create(o,{fetch:{value:void 0,writable:!0}});return function(e){if(!e.fetch){var r="URLSearchParams"in e,o="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,s="ArrayBuffer"in e;if(s)var p=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=function(e){return e&&DataView.prototype.isPrototypeOf(e)},c=ArrayBuffer.isView||function(e){return e&&p.indexOf(Object.prototype.toString.call(e))>-1};g.prototype.append=function(e,t){e=h(e),t=f(t);var n=this.map[e];this.map[e]=n?n+","+t:t},g.prototype.delete=function(e){delete this.map[h(e)]},g.prototype.get=function(e){return e=h(e),this.has(e)?this.map[e]:null},g.prototype.has=function(e){return this.map.hasOwnProperty(h(e))},g.prototype.set=function(e,t){this.map[h(e)]=f(t)},g.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},g.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),b(e)},g.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),b(e)},g.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),b(e)},o&&(g.prototype[Symbol.iterator]=g.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},m.call(C.prototype),m.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var l=[301,302,303,307,308];T.redirect=function(e,t){if(-1===l.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},e.Headers=g,e.Request=C,e.Response=T,e.fetch=function(e,r){return new t((function(t,o){var a=new C(e,r),s=new n;s.onload=function(){var e,n,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",n=new g,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var t=e.split(":"),r=t.shift().trim();if(r){var o=t.join(":").trim();n.append(r,o)}})),n)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;t(new T(o,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),s.send(void 0===a._bodyInit?null:a._bodyInit)}))},e.fetch.polyfill=!0}function h(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function b(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function g(e){this.map={},e instanceof g?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function y(e){if(e.bodyUsed)return t.reject(new TypeError("Already read"));e.bodyUsed=!0}function x(e){return new t((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=x(t);return t.readAsArrayBuffer(e),n}function w(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(i&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(a&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(r&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(s&&i&&u(e))this._bodyArrayBuffer=w(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!s||!ArrayBuffer.prototype.isPrototypeOf(e)&&!c(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=w(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return t.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return t.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return t.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||t.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,n,r,o=y(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,n=new FileReader,r=x(n),n.readAsText(e),r;if(this._bodyArrayBuffer)return t.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return t.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}function C(e,t){var n,r,o=(t=t||{}).body;if(e instanceof C){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new g(e.headers)),this.method=e.method,this.mode=e.mode,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new g(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),d.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function S(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function T(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new g(t.headers),this.url=t.url||"",this._initBody(e)}}(void 0!==e?e:this),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response}}()}void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}("undefined"!=typeof self?self:void 0!==r?r:this)}).call(this,n(4))},function(e,t,n){var r,o,i,a,s;r=n(5),o=n(0).utf8,i=n(6),a=n(0).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var n=r.bytesToWords(e),p=8*e.length,u=1732584193,c=-271733879,d=-1732584194,l=271733878,h=0;h<n.length;h++)n[h]=16711935&(n[h]<<8|n[h]>>>24)|4278255360&(n[h]<<24|n[h]>>>8);n[p>>>5]|=128<<p%32,n[14+(p+64>>>9<<4)]=p;var f=s._ff,b=s._gg,g=s._hh,y=s._ii;for(h=0;h<n.length;h+=16){var x=u,v=c,w=d,m=l;u=f(u,c,d,l,n[h+0],7,-680876936),l=f(l,u,c,d,n[h+1],12,-389564586),d=f(d,l,u,c,n[h+2],17,606105819),c=f(c,d,l,u,n[h+3],22,-1044525330),u=f(u,c,d,l,n[h+4],7,-176418897),l=f(l,u,c,d,n[h+5],12,1200080426),d=f(d,l,u,c,n[h+6],17,-1473231341),c=f(c,d,l,u,n[h+7],22,-45705983),u=f(u,c,d,l,n[h+8],7,1770035416),l=f(l,u,c,d,n[h+9],12,-1958414417),d=f(d,l,u,c,n[h+10],17,-42063),c=f(c,d,l,u,n[h+11],22,-1990404162),u=f(u,c,d,l,n[h+12],7,1804603682),l=f(l,u,c,d,n[h+13],12,-40341101),d=f(d,l,u,c,n[h+14],17,-1502002290),u=b(u,c=f(c,d,l,u,n[h+15],22,1236535329),d,l,n[h+1],5,-165796510),l=b(l,u,c,d,n[h+6],9,-1069501632),d=b(d,l,u,c,n[h+11],14,643717713),c=b(c,d,l,u,n[h+0],20,-373897302),u=b(u,c,d,l,n[h+5],5,-701558691),l=b(l,u,c,d,n[h+10],9,38016083),d=b(d,l,u,c,n[h+15],14,-660478335),c=b(c,d,l,u,n[h+4],20,-405537848),u=b(u,c,d,l,n[h+9],5,568446438),l=b(l,u,c,d,n[h+14],9,-1019803690),d=b(d,l,u,c,n[h+3],14,-187363961),c=b(c,d,l,u,n[h+8],20,1163531501),u=b(u,c,d,l,n[h+13],5,-1444681467),l=b(l,u,c,d,n[h+2],9,-51403784),d=b(d,l,u,c,n[h+7],14,1735328473),u=g(u,c=b(c,d,l,u,n[h+12],20,-1926607734),d,l,n[h+5],4,-378558),l=g(l,u,c,d,n[h+8],11,-2022574463),d=g(d,l,u,c,n[h+11],16,1839030562),c=g(c,d,l,u,n[h+14],23,-35309556),u=g(u,c,d,l,n[h+1],4,-1530992060),l=g(l,u,c,d,n[h+4],11,1272893353),d=g(d,l,u,c,n[h+7],16,-155497632),c=g(c,d,l,u,n[h+10],23,-1094730640),u=g(u,c,d,l,n[h+13],4,681279174),l=g(l,u,c,d,n[h+0],11,-358537222),d=g(d,l,u,c,n[h+3],16,-722521979),c=g(c,d,l,u,n[h+6],23,76029189),u=g(u,c,d,l,n[h+9],4,-640364487),l=g(l,u,c,d,n[h+12],11,-421815835),d=g(d,l,u,c,n[h+15],16,530742520),u=y(u,c=g(c,d,l,u,n[h+2],23,-995338651),d,l,n[h+0],6,-198630844),l=y(l,u,c,d,n[h+7],10,1126891415),d=y(d,l,u,c,n[h+14],15,-1416354905),c=y(c,d,l,u,n[h+5],21,-57434055),u=y(u,c,d,l,n[h+12],6,1700485571),l=y(l,u,c,d,n[h+3],10,-1894986606),d=y(d,l,u,c,n[h+10],15,-1051523),c=y(c,d,l,u,n[h+1],21,-2054922799),u=y(u,c,d,l,n[h+8],6,1873313359),l=y(l,u,c,d,n[h+15],10,-30611744),d=y(d,l,u,c,n[h+6],15,-1560198380),c=y(c,d,l,u,n[h+13],21,1309151649),u=y(u,c,d,l,n[h+4],6,-145523070),l=y(l,u,c,d,n[h+11],10,-1120210379),d=y(d,l,u,c,n[h+2],15,718787259),c=y(c,d,l,u,n[h+9],21,-343485551),u=u+x>>>0,c=c+v>>>0,d=d+w>>>0,l=l+m>>>0}return r.endian([u,c,d,l])})._ff=function(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._gg=function(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._hh=function(e,t,n,r,o,i,a){var s=e+(t^n^r)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._ii=function(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}},function(e,t,n){var r=n(7),o=n(8);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],r=0;r<e.length;r+=3)for(var o=e[r]<<16|e[r+1]<<8|e[r+2],i=0;i<4;i++)8*r+6*i<=8*e.length?t.push(n.charAt(o>>>6*(3-i)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,o=0;r<e.length;o=++r%4)0!=o&&t.push((n.indexOf(e.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|n.indexOf(e.charAt(r))>>>6-2*o);return t}},e.exports=r},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.binanceFiatWidget=e():t.binanceFiatWidget=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e){var n={utf8:{stringToBytes:function(t){return n.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(n.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=n},function(t,e,n){(function(r){var o;!function(r){"use strict";function i(t){var e=t&&t.Promise||r.Promise,n=t&&t.XMLHttpRequest||r.XMLHttpRequest,o=r;return function(){var t=Object.create(o,{fetch:{value:void 0,writable:!0}});return function(t){if(!t.fetch){var r="URLSearchParams"in t,o="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var p=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=function(t){return t&&DataView.prototype.isPrototypeOf(t)},c=ArrayBuffer.isView||function(t){return t&&p.indexOf(Object.prototype.toString.call(t))>-1};g.prototype.append=function(t,e){t=h(t),e=f(e);var n=this.map[t];this.map[t]=n?n+","+e:e},g.prototype.delete=function(t){delete this.map[h(t)]},g.prototype.get=function(t){return t=h(t),this.has(t)?this.map[t]:null},g.prototype.has=function(t){return this.map.hasOwnProperty(h(t))},g.prototype.set=function(t,e){this.map[h(t)]=f(e)},g.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},g.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),b(t)},g.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),b(t)},g.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),b(t)},o&&(g.prototype[Symbol.iterator]=g.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},m.call(C.prototype),m.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},T.error=function(){var t=new T(null,{status:0,statusText:""});return t.type="error",t};var l=[301,302,303,307,308];T.redirect=function(t,e){if(-1===l.indexOf(e))throw new RangeError("Invalid status code");return new T(null,{status:e,headers:{location:t}})},t.Headers=g,t.Request=C,t.Response=T,t.fetch=function(t,r){return new e((function(e,o){var a=new C(t,r),s=new n;s.onload=function(){var t,n,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",n=new g,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),r=e.shift().trim();if(r){var o=e.join(":").trim();n.append(r,o)}})),n)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;e(new T(o,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),s.send(void 0===a._bodyInit?null:a._bodyInit)}))},t.fetch.polyfill=!0}function h(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function b(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function g(t){this.map={},t instanceof g?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function y(t){if(t.bodyUsed)return e.reject(new TypeError("Already read"));t.bodyUsed=!0}function x(t){return new e((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function v(t){var e=new FileReader,n=x(e);return e.readAsArrayBuffer(t),n}function w(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(i&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(a&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(r&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(s&&i&&u(t))this._bodyArrayBuffer=w(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!s||!ArrayBuffer.prototype.isPrototypeOf(t)&&!c(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=w(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=y(this);if(t)return t;if(this._bodyBlob)return e.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return e.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return e.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||e.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var t,n,r,o=y(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,n=new FileReader,r=x(n),n.readAsText(t),r;if(this._bodyArrayBuffer)return e.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return e.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}function C(t,e){var n,r,o=(e=e||{}).body;if(t instanceof C){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new g(t.headers)),this.method=t.method,this.mode=t.mode,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new g(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),d.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function S(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function T(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new g(e.headers),this.url=e.url||"",this._initBody(t)}}(void 0!==t?t:this),{fetch:t.fetch,Headers:t.Headers,Request:t.Request,Response:t.Response}}()}void 0===(o=function(){return i}.call(e,n,e,t))||(t.exports=o)}("undefined"!=typeof self?self:void 0!==r?r:this)}).call(this,n(4))},function(t,e,n){var r,o,i,a,s;r=n(5),o=n(0).utf8,i=n(6),a=n(0).bin,(s=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?a.stringToBytes(t):o.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var n=r.bytesToWords(t),p=8*t.length,u=1732584193,c=-271733879,d=-1732584194,l=271733878,h=0;h<n.length;h++)n[h]=16711935&(n[h]<<8|n[h]>>>24)|4278255360&(n[h]<<24|n[h]>>>8);n[p>>>5]|=128<<p%32,n[14+(p+64>>>9<<4)]=p;var f=s._ff,b=s._gg,g=s._hh,y=s._ii;for(h=0;h<n.length;h+=16){var x=u,v=c,w=d,m=l;u=f(u,c,d,l,n[h+0],7,-680876936),l=f(l,u,c,d,n[h+1],12,-389564586),d=f(d,l,u,c,n[h+2],17,606105819),c=f(c,d,l,u,n[h+3],22,-1044525330),u=f(u,c,d,l,n[h+4],7,-176418897),l=f(l,u,c,d,n[h+5],12,1200080426),d=f(d,l,u,c,n[h+6],17,-1473231341),c=f(c,d,l,u,n[h+7],22,-45705983),u=f(u,c,d,l,n[h+8],7,1770035416),l=f(l,u,c,d,n[h+9],12,-1958414417),d=f(d,l,u,c,n[h+10],17,-42063),c=f(c,d,l,u,n[h+11],22,-1990404162),u=f(u,c,d,l,n[h+12],7,1804603682),l=f(l,u,c,d,n[h+13],12,-40341101),d=f(d,l,u,c,n[h+14],17,-1502002290),u=b(u,c=f(c,d,l,u,n[h+15],22,1236535329),d,l,n[h+1],5,-165796510),l=b(l,u,c,d,n[h+6],9,-1069501632),d=b(d,l,u,c,n[h+11],14,643717713),c=b(c,d,l,u,n[h+0],20,-373897302),u=b(u,c,d,l,n[h+5],5,-701558691),l=b(l,u,c,d,n[h+10],9,38016083),d=b(d,l,u,c,n[h+15],14,-660478335),c=b(c,d,l,u,n[h+4],20,-405537848),u=b(u,c,d,l,n[h+9],5,568446438),l=b(l,u,c,d,n[h+14],9,-1019803690),d=b(d,l,u,c,n[h+3],14,-187363961),c=b(c,d,l,u,n[h+8],20,1163531501),u=b(u,c,d,l,n[h+13],5,-1444681467),l=b(l,u,c,d,n[h+2],9,-51403784),d=b(d,l,u,c,n[h+7],14,1735328473),u=g(u,c=b(c,d,l,u,n[h+12],20,-1926607734),d,l,n[h+5],4,-378558),l=g(l,u,c,d,n[h+8],11,-2022574463),d=g(d,l,u,c,n[h+11],16,1839030562),c=g(c,d,l,u,n[h+14],23,-35309556),u=g(u,c,d,l,n[h+1],4,-1530992060),l=g(l,u,c,d,n[h+4],11,1272893353),d=g(d,l,u,c,n[h+7],16,-155497632),c=g(c,d,l,u,n[h+10],23,-1094730640),u=g(u,c,d,l,n[h+13],4,681279174),l=g(l,u,c,d,n[h+0],11,-358537222),d=g(d,l,u,c,n[h+3],16,-722521979),c=g(c,d,l,u,n[h+6],23,76029189),u=g(u,c,d,l,n[h+9],4,-640364487),l=g(l,u,c,d,n[h+12],11,-421815835),d=g(d,l,u,c,n[h+15],16,530742520),u=y(u,c=g(c,d,l,u,n[h+2],23,-995338651),d,l,n[h+0],6,-198630844),l=y(l,u,c,d,n[h+7],10,1126891415),d=y(d,l,u,c,n[h+14],15,-1416354905),c=y(c,d,l,u,n[h+5],21,-57434055),u=y(u,c,d,l,n[h+12],6,1700485571),l=y(l,u,c,d,n[h+3],10,-1894986606),d=y(d,l,u,c,n[h+10],15,-1051523),c=y(c,d,l,u,n[h+1],21,-2054922799),u=y(u,c,d,l,n[h+8],6,1873313359),l=y(l,u,c,d,n[h+15],10,-30611744),d=y(d,l,u,c,n[h+6],15,-1560198380),c=y(c,d,l,u,n[h+13],21,1309151649),u=y(u,c,d,l,n[h+4],6,-145523070),l=y(l,u,c,d,n[h+11],10,-1120210379),d=y(d,l,u,c,n[h+2],15,718787259),c=y(c,d,l,u,n[h+9],21,-343485551),u=u+x>>>0,c=c+v>>>0,d=d+w>>>0,l=l+m>>>0}return r.endian([u,c,d,l])})._ff=function(t,e,n,r,o,i,a){var s=t+(e&n|~e&r)+(o>>>0)+a;return(s<<i|s>>>32-i)+e},s._gg=function(t,e,n,r,o,i,a){var s=t+(e&r|n&~r)+(o>>>0)+a;return(s<<i|s>>>32-i)+e},s._hh=function(t,e,n,r,o,i,a){var s=t+(e^n^r)+(o>>>0)+a;return(s<<i|s>>>32-i)+e},s._ii=function(t,e,n,r,o,i,a){var s=t+(n^(e|~r))+(o>>>0)+a;return(s<<i|s>>>32-i)+e},s._blocksize=16,s._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var n=r.wordsToBytes(s(t,e));return e&&e.asBytes?n:e&&e.asString?a.bytesToString(n):r.bytesToHex(n)}},function(t,e,n){var r=n(7),o=n(8);t.exports=function(t,e,n){var i=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var s=0;s<16;++s)e[i+s]=a[s];return e||o(a)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var o=t[r]<<16|t[r+1]<<8|t[r+2],i=0;i<4;i++)8*r+6*i<=8*t.length?e.push(n.charAt(o>>>6*(3-i)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,o=0;r<t.length;o=++r%4)0!=o&&e.push((n.indexOf(t.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|n.indexOf(t.charAt(r))>>>6-2*o);return e}},t.exports=r},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)} | ||
/*! | ||
@@ -8,2 +8,2 @@ * Determine if an object is a Buffer | ||
*/ | ||
e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";n.r(t);var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{p(r.next(e))}catch(e){i(e)}}function s(e){try{p(r.throw(e))}catch(e){i(e)}}function p(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}p((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var a=function(){return document.createElement("div")},s=function(){return document.createElement("input")};function p(e,t){Object.keys(t).map((function(n){e.style[n]=t[n]}))}var u={dark:{bg:"#0B0E11",activeTabColor:"#F0B90B",tabBorder:"#848E9C",labelColor:"#FFFFFF",poweredBy:"#D8D8D8",placeholder:"#FFFFFF",inputBg:"#333333",inputBorder:"#333",coinColor:"#fff",breakColor:"#fff",boxShadow:"0px 6px 20px rgba(0, 0, 0, 0.08)",buySubmitColor:"#212833",arrowIconColor:"#fff",dropDownbg:"#EAECEF"},light:{bg:"FFFFFF",activeTabColor:"#F0B90B",tabBorder:"rgba(132, 142, 156, 0.2)",labelColor:"#848E9C",poweredBy:"#848E9C",placeholder:"#848E9C",inputBg:"#ffffff",inputBorder:"rgba(132, 142, 156, 0.2)",coinColor:"#212833",breakColor:"#333",boxShadow:"0px 0px 4px rgba(0, 0, 0, 0.08), 0px 0px 4px rgba(0, 0, 0, 0.08)",buySubmitColor:"#212833",arrowIconColor:"#212833",dropDownbg:"#EAECEF"}},c="https://www.binance.com",d=n(1),l=n.n(d),h=n(2),f=n.n(h),b=n(3),g=n.n(b),y=l()().fetch,x=console.log,v=["/api","/exchange-api/v1/public","/gateway-api/v1/public","/info-api/v1/public"],w=["/gateway-api/v1/public/authcenter/login","/gateway-api/v1/public/authcenter/auth"],m=function(e,t){return y(function(e){return"undefined"!=typeof window&&v.find((function(t){return e.startsWith(t)}))&&!w.find((function(t){return e.startsWith(t)}))?"https://i18n.bnbstatic.com"+e:e}(e),t)},C=function(e,t,n){return void 0===t&&(t=!1),o(void 0,void 0,void 0,(function(){var a,s,p,u,c,d,l,h;return i(this,(function(b){switch(b.label){case 0:n=n||{},a=g()(),s=function(e,t){var n={method:"GET",mode:"cors",headers:t.omitHeader?{}:{clienttype:"web",lang:"en","X-UI-REQUEST-TRACE":e,"Content-Type":"application/json"}};return t&&t.headers&&Object.keys(t.headers).forEach((function(e){n.headers[e]=t.headers[e]})),n}(a,r(r({},function(){if("undefined"==typeof window)return{};var e=window.document.cookie.match(/cr00=([a-z0-9-]+)/i);return e&&e.length?{headers:{csrftoken:f()(e[1]||"")}}:{}}()),n)),b.label=1;case 1:return b.trys.push([1,5,,6]),p=Date.now(),[4,m(e,s)];case 2:return u=b.sent(),c=Date.now(),d=c-p,[4,(y=u,o(void 0,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(y.status>=200&&y.status<300)return[2,y];if(401===y.status)return[2,y];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,y.json()];case 2:throw e=n.sent(),new Error(e.message);case 3:throw n.sent(),(t=new Error(y.statusText||String(y.status))).name=String(y.status),t.response=y,t;case 4:return[2]}}))})))];case 3:return b.sent(),[4,u.json()];case 4:return l=b.sent(),t&&x("\n Request url: {"+e+"},\n duration time is "+d+",\n "+(d>500?"more than 500ms, ":"")),[2,l];case 5:throw h=b.sent(),x("\n BAD REQUEST:\n Request url: {"+e+"},\n parse ERROR is "+JSON.stringify(h)),h;case 6:return[2]}var y}))}))},S=function(e){var t=e.locale;return o(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,C("https://i18n.bnbstatic.com/i18n/api/v1/"+("out/web2.0/"+t))];case 1:return e=n.sent(),[2,["exchange-home-wantSpend","exchange-home-wantBuy","exchange-home-SearchFiat","exchange-home-SearchCrypto","exchange-home-fiatTitle","exchange-home-cryptoTitle","exchange-buySell-buyType","exchange-home-wantSpend","exchange-home-enterAmount","exchange-home-wantBuy","exchange-buySell-buyType","exchange-buySell-sellType","exchange-creditcard-poweredBy","exchange-home-wantSpend"].reduce((function(t,n){return t[n]=e[n],t}),{})]}}))}))},T=function(e,t){return void 0===e&&(e="en"),void 0===t&&(t="https://www.binance.com"),o(void 0,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:n=[],o.label=1;case 1:return o.trys.push([1,3,,4]),[4,C(t+"/gateway-api/v1/public/fiat-channel-gateway/get-selector?lang="+e,!1,{headers:{lang:e}})];case 2:return r=o.sent(),n=r.data||[],[3,4];case 3:return o.sent(),n=[],[3,4];case 4:return[2,n]}}))}))},B=function(e){var t=e.locale,n=void 0===t?"en":t,r=e.api_host;return o(void 0,void 0,void 0,(function(){var e,t;return i(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,S({locale:n})];case 1:return e=o.sent(),[4,T(n,r)];case 2:return t=o.sent(),[2,{i18n:e,coinList:t}];case 3:return o.sent(),[2,{i18n:{},coinList:[]}];case 4:return[2]}}))}))},L=function(e,t,n){return void 0===t&&(t={}),t[e]||n||e},E=(Object.freeze({en:"en-us",cn:"zh-cn",tw:"zh-tw",kr:"ko",ru:"ru",vn:"vi",it:"it",es:"es",de:"de",fr:"fr"}),{space:{container:{padding:"24px 16px 24px 16px"},head:{btnSpace:"8px"},input1:{mt:"16px",rightWidth:"64px",pl:"8px",pr:"9px",coinMl:"4px",height:26,space:"4px"},input2:{mt:"24px",pl:"8px",pr:"9px",height:"26px"},buySubmit:{mt:"24px"},logo:{mt:"16px",logoSpace:"4px",height:"16px"},dropDown:{height:"162px",pl:"8px"}},size:{fontSize:"12px",coinFontSize:"14px",tabBtn:{width:"40px",height:"20px"},buySubmit:{height:"24px"}}}),A=function(){var e;return null===(e=window)||void 0===e?void 0:e.matchMedia("(max-width: 767px)").matches},H=function(){var e,t,n;return!!((null===(t=null===(e=window)||void 0===e?void 0:e.navigator)||void 0===t?void 0:t.userAgent)&&/(iPhone|iPad|iPod|iOS)/i.test(null===(n=window)||void 0===n?void 0:n.navigator.userAgent))};var _="en",F=200,R="light",k="",j="https://www.binance.com";t.default=function(e,t){var n,d,l,h,f,b,g,y,x,v=!1,w=!1,m=F,C=_,S=R,T=k,M=j;t&&(m=(null===(n=t)||void 0===n?void 0:n.width)||m,C=(null===(d=t)||void 0===d?void 0:d.locale)||C,S=(null===(l=t)||void 0===l?void 0:l.theme)||S,T=(null===(h=t)||void 0===h?void 0:h.ref)||T,M=(null===(f=t)||void 0===f?void 0:f.api_host)||M),m<200&&(m=200),m>500&&(m=500);var z={subSelector:[],assetCode:""},I={assetCode:""},O=null;O="string"==typeof e?document.querySelector(e):e;var V=u[S],D=function(e){var t=E;return e<=300?(t.space={container:{padding:"24px 16px 24px 16px"},head:{btnSpace:"8px"},input1:{mt:"16px",rightWidth:"64px",pl:"8px",pr:"9px",coinMl:"4px",height:26,space:"4px"},input2:{mt:"24px",pl:"8px",pr:"9px",height:"26px"},buySubmit:{mt:"24px"},logo:{mt:"16px",logoSpace:"4px",height:"16px"},dropDown:{height:"162px",pl:"8px"}},t.size={fontSize:"12px",coinFontSize:"14px",tabBtn:{width:"40px",height:"20px"},buySubmit:{height:"24px"}}):e>300&&e<=450?(t.space={container:{padding:"32px 16px 32px 16px"},head:{btnSpace:"16px"},input1:{mt:"24px",rightWidth:"79px",pl:"16px",pr:"16px",coinMl:"8px",height:40,space:"4px"},input2:{mt:"32px",pl:"16px",pr:"16px",height:"40px"},buySubmit:{mt:"32px"},logo:{mt:"24px",logoSpace:"8px",height:"18px"},dropDown:{height:"235px",pl:"16px"}},t.size={fontSize:"14px",coinFontSize:"14px",tabBtn:{width:"56px",height:"32px"},buySubmit:{height:"40px"}}):(t.space={container:{padding:"32px 24px 32px 24px"},head:{btnSpace:"16px"},input1:{mt:"24px",rightWidth:"84px",pl:"16px",pr:"21px",coinMl:"8px",height:40,space:"4px"},input2:{mt:"32px",pl:"16px",pr:"21px",height:"40px"},buySubmit:{mt:"32px"},logo:{mt:"24px",logoSpace:"8px",height:"18px"},dropDown:{height:"235px",pl:"16px"}},t.size={fontSize:"14px",coinFontSize:"14px",tabBtn:{width:"56px",height:"32px"},buySubmit:{height:"40px"}}),t}(m),U=D.size,P=D.space,W=document.createElement("style"),Z=function(){var e=a();return e.id="binance-fiat-widget",window.addEventListener("click",(function(e){v&&xe(e),w&&ve(e)}),!0),p(e,{width:m+"px",borderRadius:"4px",background:V.bg,padding:P.container.padding,display:"flex",flexDirection:"column",boxSizing:"border-box",boxShadow:V.boxShadow}),e}(),q=function(){var e=a();return p(e,{display:"flex"}),e}(),N=function(){var e=a(),t=a(),n={color:V.labelColor,border:"1px solid "+V.tabBorder,borderRadius:"16px",minWidth:U.tabBtn.width,height:U.tabBtn.height,fontSize:U.fontSize,lineHeight:U.tabBtn.height,cursor:"pointer",fontWeight:500};return p(e,r(r({},n),{marginRight:P.head.btnSpace,borderColor:V.activeTabColor,color:V.activeTabColor})),p(t,n),t.onclick=function(){window.open(c+"/"+C+"/buy-sell-crypto?type=SELL")},{tab1:e,tab2:t}}(),G=N.tab1,X=N.tab2,Y=function(){var e=a(),t=a();return p(e,{marginTop:P.input1.mt,position:"relative"}),p(t,{marginTop:P.input2.mt,cursor:"pointer"}),{input1:e,input2:t}}(),J=Y.input1,Q=Y.input2,K=function(){var e=a(),t=a(),n={color:V.labelColor,fontSize:U.fontSize,display:"flex",flexDirection:"column",textAlign:"left"};return p(e,n),p(t,n),{input1Label:e,input2Label:t}}(),$=K.input1Label,ee=K.input2Label,te=function(){var e=a(),t=s(),n=me(!0),o=me();o.addEventListener("click",(function(e){return xe(e)}),!0),n.addEventListener("click",(function(e){return ve(e)}),!0),t.onkeypress=function(e){(46!=e.keyCode&&e.keyCode<48||e.keyCode>57)&&(e.returnValue=!1)},e.appendChild(t),e.appendChild(o),p(e,{display:"flex",alignItems:"center",justifyContent:"center"});var i={width:"calc(100% - "+P.input1.pl+" - "+P.input1.rightWidth+")",height:P.input1.height+"px",border:"1px solid "+V.inputBorder,backgroundColor:V.inputBg,borderRadius:"3px",marginTop:P.input1.space,paddingLeft:P.input1.pl};return p(t,r(r({},i),{borderTopRightRadius:0,borderBottomRightRadius:0,borderRight:"0 none",color:V.coinColor,fontWeight:500})),p(o,{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderleft:"0 none",color:V.coinColor,fontSize:U.coinFontSize,height:P.input1.height+"px",lineHeight:P.input1.height+"px",textAlign:"left"}),p(n,r(r({},i),{width:"calc(100% - "+P.input1.pl+")",color:V.coinColor,fontSize:U.coinFontSize,height:P.input1.height+"px",lineHeight:P.input1.height+"px",textAlign:"left"})),t.className="binance-fiat-widget-input-focus\n binance-fiat-widget-input-active\n binance-fiat-widget-input-palceholder",W.innerText+="\n .binance-fiat-widget-input-focus:focus {\n outline: none;\n }\n .binance-fiat-widget-input-focus:active {\n outline: none;\n }\n .binance-fiat-widget-input-palceholder {\n padding: 0;\n color: "+V.placeholder+";\n font-size: "+U.fontSize+";\n }\n .binance-fiat-widget-input-coin-palceholder {\n padding: 0;\n color: #848E9C;\n font-size: 12px;\n }\n ",{input1Input:e,input2Input:n,select:o}}(),ne=te.input1Input,re=te.input2Input,oe=te.select,ie=function(){var e=a();return p(e,{cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",outline:"none",fontWeight:500,fontSize:U.fontSize,lineHeight:U.buySubmit.height,backgroundColor:"#F0B90B",height:U.buySubmit.height,borderRadius:"4px",marginTop:P.buySubmit.mt}),e.onclick=Ce,e}(),ae=function(){var e=a();return p(e,{marginTop:P.logo.mt,display:"flex",justifyContent:"center"}),e}(),se=function(){var e=a();return p(e,{fontSize:U.fontSize,marginRight:P.logo.logoSpace,color:V.poweredBy,height:P.logo.height,lineHeight:P.logo.height}),e}(),pe=function(){var e=a();return p(e,{height:P.logo.height,lineHeight:P.logo.height,display:"flex",alignItems:"center"}),e.innerHTML='<svg width="70" height="14" viewBox="0 0 70 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M3.1582 7L1.58594 8.57227L0 7L1.58594 5.41406L3.1582 7ZM7 3.1582L9.70703 5.86523L11.293 4.2793L7 0L2.70703 4.29297L4.29297 5.87891L7 3.1582ZM12.4141 5.41406L10.8418 7L12.4277 8.58594L14.0137 7L12.4141 5.41406ZM7 10.8418L4.29297 8.12109L2.70703 9.70703L7 14L11.293 9.70703L9.70703 8.12109L7 10.8418ZM7 8.57227L8.58594 6.98633L7 5.41406L5.41406 7L7 8.57227ZM23.6797 8.73633V8.70898C23.6797 7.68359 23.1328 7.16406 22.2441 6.82227C22.791 6.52148 23.2559 6.0293 23.2559 5.16797V5.14062C23.2559 3.9375 22.2852 3.1582 20.7266 3.1582H17.1582V10.8281H20.8086C22.5449 10.8418 23.6797 10.1309 23.6797 8.73633ZM21.5742 5.45508C21.5742 6.0293 21.1094 6.26172 20.3574 6.26172H18.7988V4.63477H20.4668C21.1777 4.63477 21.5742 4.92188 21.5742 5.42773V5.45508ZM21.998 8.51758C21.998 9.0918 21.5469 9.35156 20.8086 9.35156H18.7988V7.66992H20.7539C21.6152 7.66992 21.998 7.98438 21.998 8.50391V8.51758ZM27.2207 10.8418V3.1582H25.5254V10.8281H27.2207V10.8418ZM36.2988 10.8418V3.1582H34.6309V7.88867L31.0352 3.1582H29.4766V10.8281H31.1445V5.96094L34.8633 10.8418H36.2988ZM45.6504 10.8418L42.3555 3.11719H40.7969L37.502 10.8418H39.2383L39.9355 9.11914H43.1758L43.873 10.8418H45.6504ZM42.5742 7.62891H40.5371L41.5625 5.14062L42.5742 7.62891ZM53.7031 10.8418V3.1582H52.0352V7.88867L48.4395 3.1582H46.8809V10.8281H48.5488V5.96094L52.2676 10.8418H53.7031ZM62.4121 9.59766L61.332 8.51758C60.7305 9.06445 60.1973 9.41992 59.3086 9.41992C57.9961 9.41992 57.0801 8.32617 57.0801 7.01367V6.97266C57.0801 5.66016 58.0098 4.58008 59.3086 4.58008C60.0742 4.58008 60.6758 4.9082 61.2773 5.44141L62.3574 4.19727C61.6465 3.5 60.7852 3.00781 59.3359 3.00781C56.9844 3.00781 55.3301 4.79883 55.3301 6.97266V7C55.3301 9.20117 57.0117 10.9512 59.2676 10.9512C60.7441 10.9648 61.6191 10.4453 62.4121 9.59766ZM69.6172 10.8418V9.33789H65.4473V7.72461H69.0703V6.2207H65.4473V4.66211H69.5625V3.1582H63.7793V10.8281H69.6172V10.8418Z" fill="#F0B90B" />\n </svg>',e}();ae.appendChild(se),ae.appendChild(pe);var ue=function(){var e=a(),t=a(),n=a(),r=a(),o=a(),i=s();return p(n,{display:"flex",padding:"4px",justifyContent:"flex-end"}),p(r,{height:"calc(100% - 100px)",overflowY:"auto"}),p(t,{cursor:"poniter"}),p(o,{color:"#212833",fontWeight:500,fontSize:"16px",lineHeight:"30px"}),i.className="binance-fiat-widget-input-focus binance-fiat-widget-input-active binance-fiat-widget-input-coin-palceholder",p(i,{marginTop:"8px",border:"0 none",height:"16px",lineHeight:"16px"}),t.onclick=function(){p(e,{display:"none"})},t.innerHTML='\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.4 8L16 14.6L14.6 16L8 9.4L1.4 16L0 14.6L6.6 8L0 1.4L1.4 0L8 6.6L14.6 0L16 1.4L9.4 8Z" fill="#848E9C"/>\n </svg>\n ',e.id="binance-fiat-widget-modal",n.appendChild(t),e.appendChild(n),e.appendChild(o),e.appendChild(i),e.appendChild(r),e.addEventListener("changeList",(function(t){var n=t.data.data.list,o=t.data.clickCb,i=t.data.data.current;r.innerHTML="",n.forEach((function(t){var n=a(),s=a();p(n,{borderBottom:"1px solid #EAECEF",height:"43px",lineHeight:"43px"}),p(s,{fontSize:"14px"}),n.onclick=function(t){o&&o(t.target.innerHTML),p(e,{display:"none"})},i===t.assetCode&&p(s,{color:"#F0B90B"}),n.appendChild(s),s.innerHTML=t.assetCode,r.appendChild(n)}))})),p(e,{display:"none",position:"fixed",top:0,left:0,width:"calc(100% - 32px)",height:"calc(100% - "+(H()?"74px":"24px")+")",background:"#fff",padding:"16px 16px 0 16px",paddingBottom:H()?"74px":"24px",overflowY:"hidden"}),{modal:e,modalTitle:o,coinInput:i,modalTrigger:function(t,n){var r=document.createEvent("HTMLEvents");r.initEvent("changeList",!1,!0),r.data={data:t,clickCb:n},e.dispatchEvent(r)}}}(),ce=ue.modal,de=ue.modalTitle,le=ue.coinInput,he=ue.modalTrigger;function fe(e,t,n,r){var o=oe.children[1];o.innerHTML="",e.forEach((function(e){var t=we(e.assetCode);e.assetCode===n&&p(t,{color:"#F0B90B"}),o.appendChild(t)}));var i=re.children[1];i.innerHTML="",t.forEach((function(e){var t=we(e.assetCode);e.assetCode===r&&p(t,{color:"#F0B90B"}),i.appendChild(t)}))}function be(e){oe.children[2].innerHTML=e.assetCode}function ge(e){var t=(e||{assetCode:""}).assetCode;ie.innerText=L("exchange-buySell-buyType",y)+" "+t,re.children[2].innerHTML=t}function ye(e,t){return e.find((function(e){return e.assetCode===t}))}function xe(e){var t=e.target.className;if(A())return p(ce,{display:"block"}),void he({list:g,current:z.assetCode},(function(e){be(z=ye(g,e)),ge(z.subSelector[0]),fe(g,z.subSelector,z.assetCode,I.assetCode)}));if(/binance-fiat-widget-dropdown-item/.test(t)){var n=e.target.innerText;be(z=ye(g,n)),ge(z.subSelector[0]),fe(g,z.subSelector,z.assetCode,I.assetCode)}v=!v,p(oe.children[0],{borderWidth:v?"0 4px 5px 4px":"5px 4px 0 4px",borderColor:v?"transparent transparent "+V.arrowIconColor+" transparent":V.arrowIconColor+" transparent transparent transparent"}),p(oe.children[1],{display:v?"block":"none"}),e.stopPropagation()}function ve(e){var t=e.target.className;if(A())return p(ce,{display:"block"}),void he({list:z.subSelector,current:I.assetCode},(function(e){ge(I=ye(z.subSelector,e)),fe(g,z.subSelector,z.assetCode,I.assetCode)}));if(/binance-fiat-widget-dropdown-item/.test(t)){var n=e.target.innerText;ge(I=ye(z.subSelector,n)),fe(g,z.subSelector,z.assetCode,I.assetCode)}w=!w,p(re.children[0],{borderWidth:w?"0 4px 5px 4px":"5px 4px 0 4px",borderColor:w?"transparent transparent "+V.arrowIconColor+" transparent":V.arrowIconColor+" transparent transparent transparent"}),p(re.children[1],{display:w?"block":"none"}),e.stopPropagation()}function we(e){var t=a();return t.innerText=e,p(t,{fontSize:U.fontSize,color:V.buySubmitColor,textAlign:"left",paddingLeft:P.dropDown.pl,height:"40px",lineHeight:"40px"}),t.className+="binance-fiat-widget-dropdown-item",W.innerText+="\n .binance-fiat-widget-dropdown-item:hover {\n background: #EAECEF;\n font-weight: 500;\n }\n ",t}function me(e){var t,n=a(),r=a(),o=(p(t=document.createElement("i"),{width:0,height:0,borderWidth:v?"0 4px 5px 4px":"5px 4px 0 4px",borderStyle:"solid",borderColor:v?"transparent transparent "+V.arrowIconColor+" transparent":V.arrowIconColor+" transparent transparent transparent",borderRadius:"2px",position:"absolute",right:"12px",top:(P.input1.height-5)/2+"px"}),t),i=function(){var e=a();return p(e,{width:"calc("+P.input1.rightWidth+" + "+P.input1.coinMl+")",height:P.dropDown.height,background:"#fff",boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.1)",borderRadius:"4px",position:"absolute",zIndex:9,top:P.input1.height+4+"px",right:0,overflowY:"auto",display:"none",fontWeight:"normal"}),e}();return p(n,{width:P.input1.rightWidth,height:P.input1.height+"px",border:"1px solid "+V.inputBorder,backgroundColor:V.inputBg,borderRadius:"3px",borderLeft:"0 none",paddingLeft:P.input1.coinMl,marginTop:P.input1.space,position:"relative",cursor:"pointer",fontWeight:500}),e||(n.className="binance-fiat-widget-select-before "+("dark"===S?"binance-fiat-widget-select-dark":"binance-fiat-widget-select-light"),W.innerText+="\n .binance-fiat-widget-select-before:before {\n content: '';\n height: 16px;\n display: inline-block;\n position: absolute;\n left: -1px;\n width: 1px;\n opacity: 0.2;\n top: "+(P.input1.height-16)/2+"px;\n }\n .binance-fiat-widget-select-dark:before {\n background: "+u.dark.breakColor+";\n }\n .binance-fiat-widget-select-light:before {\n background: "+u.light.breakColor+";\n }\n "),n.appendChild(o),n.appendChild(i),n.appendChild(r),n}function Ce(){if(z&&z.assetCode&&I&&I.assetCode){if("CNY"===z.assetCode)window.open("https://c2c.binance.com/");else{var e=ne.children[0].value,t=c+"/"+C+"/buy-sell-crypto?fiat="+z.assetCode+"&crypto="+I.assetCode+"&amount="+e;T&&(t+="&ref="+T),window.open(t)}}}null===(b=document.querySelector("body"))||void 0===b||b.appendChild(ce),q.appendChild(G),q.appendChild(X),J.appendChild($),J.appendChild(ne),Q.appendChild(ee),Q.appendChild(re),Z.appendChild(W),Z.appendChild(q),Z.appendChild(J),Z.appendChild(Q),Z.appendChild(ie),Z.appendChild(ae),function(e){o(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,B({locale:C,api_host:M})];case 1:return t=i.sent(),n=t.i18n,r=t.coinList,y=n,x=r,o=function(e){return L(e,y)},G.innerText=o("exchange-buySell-buyType"),X.innerText=o("exchange-buySell-sellType"),$.innerText=o("exchange-home-wantSpend"),ee.innerText=o("exchange-home-wantBuy"),ne.children[0].placeholder=o("exchange-home-enterAmount"),se.innerText=o("exchange-creditcard-poweredBy"),de.innerText=o("exchange-home-wantSpend"),le.placeholder=o("exchange-home-SearchCrypto"),g=x.buySelector,be(z=g[0]),I=z.subSelector[0],fe(g,z.subSelector,z.assetCode,I.assetCode),ge(I),e&&e(),[2]}}))}))}((function(){var e;null===(e=O)||void 0===e||e.append(Z)}))}}]).default})); | ||
t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);t.exports=function(){return n(r),r}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0,o=n;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]]].join("")}},function(t,e,n){"use strict";n.r(e);var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{p(r.next(t))}catch(t){i(t)}}function s(t){try{p(r.throw(t))}catch(t){i(t)}}function p(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}p((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var a=function(){return document.createElement("div")},s=function(){return document.createElement("input")};function p(t,e){Object.keys(e).map((function(n){t.style[n]=e[n]}))}var u={dark:{bg:"#0B0E11",activeTabColor:"#F0B90B",tabBorder:"#848E9C",labelColor:"#FFFFFF",poweredBy:"#D8D8D8",placeholder:"#FFFFFF",inputBg:"#333333",inputBorder:"#333",coinColor:"#fff",breakColor:"#fff",boxShadow:"0px 6px 20px rgba(0, 0, 0, 0.08)",buySubmitColor:"#212833",arrowIconColor:"#fff",dropDownbg:"#EAECEF"},light:{bg:"FFFFFF",activeTabColor:"#F0B90B",tabBorder:"rgba(132, 142, 156, 0.2)",labelColor:"#848E9C",poweredBy:"#848E9C",placeholder:"#848E9C",inputBg:"#ffffff",inputBorder:"rgba(132, 142, 156, 0.2)",coinColor:"#212833",breakColor:"#333",boxShadow:"0px 0px 4px rgba(0, 0, 0, 0.08), 0px 0px 4px rgba(0, 0, 0, 0.08)",buySubmitColor:"#212833",arrowIconColor:"#212833",dropDownbg:"#EAECEF"}},c="https://www.binance.com",d=n(1),l=n.n(d),h=n(2),f=n.n(h),b=n(3),g=n.n(b),y=l()().fetch,x=console.log,v=["/api","/exchange-api/v1/public","/gateway-api/v1/public","/info-api/v1/public"],w=["/gateway-api/v1/public/authcenter/login","/gateway-api/v1/public/authcenter/auth"],m=function(t,e){return y(function(t){return"undefined"!=typeof window&&v.find((function(e){return t.startsWith(e)}))&&!w.find((function(e){return t.startsWith(e)}))?"https://i18n.bnbstatic.com"+t:t}(t),e)},C=function(t,e,n){return void 0===e&&(e=!1),o(void 0,void 0,void 0,(function(){var a,s,p,u,c,d,l,h;return i(this,(function(b){switch(b.label){case 0:n=n||{},a=g()(),s=function(t,e){var n={method:"GET",mode:"cors",headers:e.omitHeader?{}:{clienttype:"web",lang:"en","X-UI-REQUEST-TRACE":t,"Content-Type":"application/json"}};return e&&e.headers&&Object.keys(e.headers).forEach((function(t){n.headers[t]=e.headers[t]})),n}(a,r(r({},function(){if("undefined"==typeof window)return{};var t=window.document.cookie.match(/cr00=([a-z0-9-]+)/i);return t&&t.length?{headers:{csrftoken:f()(t[1]||"")}}:{}}()),n)),b.label=1;case 1:return b.trys.push([1,5,,6]),p=Date.now(),[4,m(t,s)];case 2:return u=b.sent(),c=Date.now(),d=c-p,[4,(y=u,o(void 0,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:if(y.status>=200&&y.status<300)return[2,y];if(401===y.status)return[2,y];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,y.json()];case 2:throw t=n.sent(),new Error(t.message);case 3:throw n.sent(),(e=new Error(y.statusText||String(y.status))).name=String(y.status),e.response=y,e;case 4:return[2]}}))})))];case 3:return b.sent(),[4,u.json()];case 4:return l=b.sent(),e&&x("\n Request url: {"+t+"},\n duration time is "+d+",\n "+(d>500?"more than 500ms, ":"")),[2,l];case 5:throw h=b.sent(),x("\n BAD REQUEST:\n Request url: {"+t+"},\n parse ERROR is "+JSON.stringify(h)),h;case 6:return[2]}var y}))}))},S=function(t){var e=t.locale;return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,C("https://i18n.bnbstatic.com/i18n/api/v1/"+("out/web2.0/"+e))];case 1:return t=n.sent(),[2,["exchange-home-wantSpend","exchange-home-wantBuy","exchange-home-SearchFiat","exchange-home-SearchCrypto","exchange-home-fiatTitle","exchange-home-cryptoTitle","exchange-buySell-buyType","exchange-home-wantSpend","exchange-home-enterAmount","exchange-home-wantBuy","exchange-buySell-buyType","exchange-buySell-sellType","exchange-creditcard-poweredBy","exchange-home-wantSpend"].reduce((function(e,n){return e[n]=t[n],e}),{})]}}))}))},T=function(t,e){return void 0===t&&(t="en"),void 0===e&&(e="https://www.binance.com"),o(void 0,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:n=[],o.label=1;case 1:return o.trys.push([1,3,,4]),[4,C(e+"/gateway-api/v1/public/fiat-channel-gateway/get-selector?lang="+t,!1,{headers:{lang:t}})];case 2:return r=o.sent(),n=r.data||[],[3,4];case 3:return o.sent(),n=[],[3,4];case 4:return[2,n]}}))}))},B=function(t){var e=t.locale,n=void 0===e?"en":e,r=t.api_host;return o(void 0,void 0,void 0,(function(){var t,e;return i(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,S({locale:n})];case 1:return t=o.sent(),[4,T(n,r)];case 2:return e=o.sent(),[2,{i18n:t,coinList:e}];case 3:return o.sent(),[2,{i18n:{},coinList:[]}];case 4:return[2]}}))}))},L=function(t,e,n){return void 0===e&&(e={}),e[t]||n||t},E=(Object.freeze({en:"en-us",cn:"zh-cn",tw:"zh-tw",kr:"ko",ru:"ru",vn:"vi",it:"it",es:"es",de:"de",fr:"fr"}),{space:{container:{padding:"24px 16px 24px 16px"},head:{btnSpace:"8px"},input1:{mt:"16px",rightWidth:"64px",pl:"8px",pr:"9px",coinMl:"4px",height:26,space:"4px"},input2:{mt:"24px",pl:"8px",pr:"9px",height:"26px"},buySubmit:{mt:"24px"},logo:{mt:"16px",logoSpace:"4px",height:"16px"},dropDown:{height:"162px",pl:"8px"}},size:{fontSize:"12px",coinFontSize:"14px",tabBtn:{width:"40px",height:"20px"},buySubmit:{height:"24px"}}}),A=function(){var t;return null===(t=window)||void 0===t?void 0:t.matchMedia("(max-width: 767px)").matches},H=function(){var t,e,n;return!!((null===(e=null===(t=window)||void 0===t?void 0:t.navigator)||void 0===e?void 0:e.userAgent)&&/(iPhone|iPad|iPod|iOS)/i.test(null===(n=window)||void 0===n?void 0:n.navigator.userAgent))};var _="en",F=200,R="light",k="",j="https://www.binance.com";e.default=function(t,e){var n,d,l,h,f,b,g,y,x,v=!1,w=!1,m=F,C=_,S=R,T=k,z=j;e&&(m=(null===(n=e)||void 0===n?void 0:n.width)||m,C=(null===(d=e)||void 0===d?void 0:d.locale)||C,S=(null===(l=e)||void 0===l?void 0:l.theme)||S,T=(null===(h=e)||void 0===h?void 0:h.ref)||T,z=(null===(f=e)||void 0===f?void 0:f.api_host)||z),m<200&&(m=200),m>500&&(m=500);var M={subSelector:[],assetCode:""},I={assetCode:""},O=null;O="string"==typeof t?document.querySelector(t):t;var V=u[S],D=function(t){var e=E;return t<=300?(e.space={container:{padding:"24px 16px 24px 16px"},head:{btnSpace:"8px"},input1:{mt:"16px",rightWidth:"64px",pl:"8px",pr:"9px",coinMl:"4px",height:26,space:"4px"},input2:{mt:"24px",pl:"8px",pr:"9px",height:"26px"},buySubmit:{mt:"24px"},logo:{mt:"16px",logoSpace:"4px",height:"16px"},dropDown:{height:"162px",pl:"8px"}},e.size={fontSize:"12px",coinFontSize:"14px",tabBtn:{width:"40px",height:"20px"},buySubmit:{height:"24px"}}):t>300&&t<=450?(e.space={container:{padding:"32px 16px 32px 16px"},head:{btnSpace:"16px"},input1:{mt:"24px",rightWidth:"79px",pl:"16px",pr:"16px",coinMl:"8px",height:40,space:"4px"},input2:{mt:"32px",pl:"16px",pr:"16px",height:"40px"},buySubmit:{mt:"32px"},logo:{mt:"24px",logoSpace:"8px",height:"18px"},dropDown:{height:"235px",pl:"16px"}},e.size={fontSize:"14px",coinFontSize:"14px",tabBtn:{width:"56px",height:"32px"},buySubmit:{height:"40px"}}):(e.space={container:{padding:"32px 24px 32px 24px"},head:{btnSpace:"16px"},input1:{mt:"24px",rightWidth:"84px",pl:"16px",pr:"21px",coinMl:"8px",height:40,space:"4px"},input2:{mt:"32px",pl:"16px",pr:"21px",height:"40px"},buySubmit:{mt:"32px"},logo:{mt:"24px",logoSpace:"8px",height:"18px"},dropDown:{height:"235px",pl:"16px"}},e.size={fontSize:"14px",coinFontSize:"14px",tabBtn:{width:"56px",height:"32px"},buySubmit:{height:"40px"}}),e}(m),U=D.size,P=D.space,W=document.createElement("style"),Z=function(){var t=a();return t.id="binance-fiat-widget",window.addEventListener("click",(function(t){v&&xt(t),w&&vt(t)}),!0),p(t,{width:m+"px",borderRadius:"4px",background:V.bg,padding:P.container.padding,display:"flex",flexDirection:"column",boxSizing:"border-box",boxShadow:V.boxShadow}),t}(),q=function(){var t=a();return p(t,{display:"flex"}),t}(),N=function(){var t=a(),e=a(),n={color:V.labelColor,border:"1px solid "+V.tabBorder,borderRadius:"16px",minWidth:U.tabBtn.width,height:U.tabBtn.height,fontSize:U.fontSize,lineHeight:U.tabBtn.height,cursor:"pointer",fontWeight:500,textAlign:"center"};return p(t,r(r({},n),{marginRight:P.head.btnSpace,borderColor:V.activeTabColor,color:V.activeTabColor})),p(e,n),e.onclick=function(){window.open(c+"/"+C+"/buy-sell-crypto?type=SELL")},{tab1:t,tab2:e}}(),G=N.tab1,X=N.tab2,Y=function(){var t=a(),e=a();return p(t,{marginTop:P.input1.mt,position:"relative"}),p(e,{marginTop:P.input2.mt,cursor:"pointer"}),{input1:t,input2:e}}(),J=Y.input1,Q=Y.input2,K=function(){var t=a(),e=a(),n={color:V.labelColor,fontSize:U.fontSize,display:"flex",flexDirection:"column",textAlign:"left"};return p(t,n),p(e,n),{input1Label:t,input2Label:e}}(),$=K.input1Label,tt=K.input2Label,et=function(){var t=a(),e=s(),n=mt(!0),o=mt();o.addEventListener("click",(function(t){return xt(t)}),!0),n.addEventListener("click",(function(t){return vt(t)}),!0),e.onkeypress=function(t){(46!=t.keyCode&&t.keyCode<48||t.keyCode>57)&&(t.returnValue=!1)},t.appendChild(e),t.appendChild(o),p(t,{display:"flex",alignItems:"center",justifyContent:"center"});var i={width:"calc(100% - "+P.input1.pl+" - "+P.input1.rightWidth+")",height:P.input1.height+"px",border:"1px solid "+V.inputBorder,backgroundColor:V.inputBg,borderRadius:"3px",marginTop:P.input1.space,paddingLeft:P.input1.pl};return p(e,r(r({},i),{borderTopRightRadius:0,borderBottomRightRadius:0,borderRight:"0 none",color:V.coinColor,fontWeight:500})),p(o,{boxSizing:"border-box",borderTopLeftRadius:0,borderBottomLeftRadius:0,borderleft:"0 none",color:V.coinColor,fontSize:U.coinFontSize,height:P.input1.height+"px",lineHeight:P.input1.height+"px",textAlign:"left"}),p(n,r(r({},i),{width:"calc(100% - "+P.input1.pl+")",color:V.coinColor,fontSize:U.coinFontSize,height:P.input1.height+"px",lineHeight:P.input1.height+"px",textAlign:"left"})),e.className="binance-fiat-widget-input-focus\n binance-fiat-widget-input-active\n binance-fiat-widget-input-palceholder",W.innerText+="\n .binance-fiat-widget-input-focus:focus {\n outline: none;\n }\n .binance-fiat-widget-input-focus:active {\n outline: none;\n }\n .binance-fiat-widget-input-palceholder {\n padding: 0;\n color: "+V.placeholder+";\n font-size: "+U.fontSize+";\n }\n .binance-fiat-widget-input-coin-palceholder {\n padding: 0;\n color: #848E9C;\n font-size: 12px;\n }\n ",{input1Input:t,input2Input:n,select:o}}(),nt=et.input1Input,rt=et.input2Input,ot=et.select,it=function(){var t=a();return p(t,{cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",outline:"none",fontWeight:500,fontSize:U.fontSize,lineHeight:U.buySubmit.height,backgroundColor:"#F0B90B",height:U.buySubmit.height,borderRadius:"4px",marginTop:P.buySubmit.mt}),t.onclick=Ct,t}(),at=function(){var t=a();return p(t,{marginTop:P.logo.mt,display:"flex",justifyContent:"center"}),t}(),st=function(){var t=a();return p(t,{fontSize:U.fontSize,marginRight:P.logo.logoSpace,color:V.poweredBy,height:P.logo.height,lineHeight:P.logo.height}),t}(),pt=function(){var t=a();return p(t,{height:P.logo.height,lineHeight:P.logo.height,display:"flex",alignItems:"center"}),t.innerHTML='<svg width="70" height="14" viewBox="0 0 70 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M3.1582 7L1.58594 8.57227L0 7L1.58594 5.41406L3.1582 7ZM7 3.1582L9.70703 5.86523L11.293 4.2793L7 0L2.70703 4.29297L4.29297 5.87891L7 3.1582ZM12.4141 5.41406L10.8418 7L12.4277 8.58594L14.0137 7L12.4141 5.41406ZM7 10.8418L4.29297 8.12109L2.70703 9.70703L7 14L11.293 9.70703L9.70703 8.12109L7 10.8418ZM7 8.57227L8.58594 6.98633L7 5.41406L5.41406 7L7 8.57227ZM23.6797 8.73633V8.70898C23.6797 7.68359 23.1328 7.16406 22.2441 6.82227C22.791 6.52148 23.2559 6.0293 23.2559 5.16797V5.14062C23.2559 3.9375 22.2852 3.1582 20.7266 3.1582H17.1582V10.8281H20.8086C22.5449 10.8418 23.6797 10.1309 23.6797 8.73633ZM21.5742 5.45508C21.5742 6.0293 21.1094 6.26172 20.3574 6.26172H18.7988V4.63477H20.4668C21.1777 4.63477 21.5742 4.92188 21.5742 5.42773V5.45508ZM21.998 8.51758C21.998 9.0918 21.5469 9.35156 20.8086 9.35156H18.7988V7.66992H20.7539C21.6152 7.66992 21.998 7.98438 21.998 8.50391V8.51758ZM27.2207 10.8418V3.1582H25.5254V10.8281H27.2207V10.8418ZM36.2988 10.8418V3.1582H34.6309V7.88867L31.0352 3.1582H29.4766V10.8281H31.1445V5.96094L34.8633 10.8418H36.2988ZM45.6504 10.8418L42.3555 3.11719H40.7969L37.502 10.8418H39.2383L39.9355 9.11914H43.1758L43.873 10.8418H45.6504ZM42.5742 7.62891H40.5371L41.5625 5.14062L42.5742 7.62891ZM53.7031 10.8418V3.1582H52.0352V7.88867L48.4395 3.1582H46.8809V10.8281H48.5488V5.96094L52.2676 10.8418H53.7031ZM62.4121 9.59766L61.332 8.51758C60.7305 9.06445 60.1973 9.41992 59.3086 9.41992C57.9961 9.41992 57.0801 8.32617 57.0801 7.01367V6.97266C57.0801 5.66016 58.0098 4.58008 59.3086 4.58008C60.0742 4.58008 60.6758 4.9082 61.2773 5.44141L62.3574 4.19727C61.6465 3.5 60.7852 3.00781 59.3359 3.00781C56.9844 3.00781 55.3301 4.79883 55.3301 6.97266V7C55.3301 9.20117 57.0117 10.9512 59.2676 10.9512C60.7441 10.9648 61.6191 10.4453 62.4121 9.59766ZM69.6172 10.8418V9.33789H65.4473V7.72461H69.0703V6.2207H65.4473V4.66211H69.5625V3.1582H63.7793V10.8281H69.6172V10.8418Z" fill="#F0B90B" />\n </svg>',t}();at.appendChild(st),at.appendChild(pt);var ut=function(){var t=a(),e=a(),n=a(),r=a(),o=a(),i=s();return p(n,{display:"flex",padding:"4px",justifyContent:"flex-end"}),p(r,{height:"calc(100% - 100px)",overflowY:"auto"}),p(e,{cursor:"poniter"}),p(o,{color:"#212833",fontWeight:500,fontSize:"16px",lineHeight:"30px"}),i.className="binance-fiat-widget-input-focus binance-fiat-widget-input-active binance-fiat-widget-input-coin-palceholder",p(i,{marginTop:"8px",border:"0 none",height:"16px",lineHeight:"16px"}),e.onclick=function(){p(t,{display:"none"})},e.innerHTML='\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.4 8L16 14.6L14.6 16L8 9.4L1.4 16L0 14.6L6.6 8L0 1.4L1.4 0L8 6.6L14.6 0L16 1.4L9.4 8Z" fill="#848E9C"/>\n </svg>\n ',t.id="binance-fiat-widget-modal",n.appendChild(e),t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(r),t.addEventListener("changeList",(function(e){var n=e.data.data.list,o=e.data.clickCb,i=e.data.data.current;r.innerHTML="",n.forEach((function(e){var n=a(),s=a();p(n,{borderBottom:"1px solid #EAECEF",height:"43px",lineHeight:"43px"}),p(s,{fontSize:"14px"}),n.onclick=function(e){o&&o(e.target.innerHTML),p(t,{display:"none"})},i===e.assetCode&&p(s,{color:"#F0B90B"}),n.appendChild(s),s.innerHTML=e.assetCode,r.appendChild(n)}))})),p(t,{display:"none",position:"fixed",top:0,left:0,width:"calc(100% - 32px)",height:"calc(100% - "+(H()?"74px":"24px")+")",background:"#fff",padding:"16px 16px 0 16px",paddingBottom:H()?"74px":"24px",overflowY:"hidden"}),{modal:t,modalTitle:o,coinInput:i,modalTrigger:function(e,n){var r=document.createEvent("HTMLEvents");r.initEvent("changeList",!1,!0),r.data={data:e,clickCb:n},t.dispatchEvent(r)}}}(),ct=ut.modal,dt=ut.modalTitle,lt=ut.coinInput,ht=ut.modalTrigger;function ft(t,e,n,r){var o=ot.children[1];o.innerHTML="",t.forEach((function(t){var e=wt(t.assetCode);t.assetCode===n&&p(e,{color:"#F0B90B"}),o.appendChild(e)}));var i=rt.children[1];i.innerHTML="",e.forEach((function(t){var e=wt(t.assetCode);t.assetCode===r&&p(e,{color:"#F0B90B"}),i.appendChild(e)}))}function bt(t){ot.children[2].innerHTML=t.assetCode}function gt(t){var e=(t||{assetCode:""}).assetCode;it.innerText=L("exchange-buySell-buyType",y)+" "+e,rt.children[2].innerHTML=e}function yt(t,e){return t.find((function(t){return t.assetCode===e}))}function xt(t){var e=t.target.className;if(A())return p(ct,{display:"block"}),void ht({list:g,current:M.assetCode},(function(t){bt(M=yt(g,t)),gt(M.subSelector[0]),ft(g,M.subSelector,M.assetCode,I.assetCode)}));if(/binance-fiat-widget-dropdown-item/.test(e)){var n=t.target.innerText;bt(M=yt(g,n)),gt(M.subSelector[0]),ft(g,M.subSelector,M.assetCode,I.assetCode)}v=!v,p(ot.children[0],{borderWidth:v?"0 4px 5px 4px":"5px 4px 0 4px",borderColor:v?"transparent transparent "+V.arrowIconColor+" transparent":V.arrowIconColor+" transparent transparent transparent"}),p(ot.children[1],{display:v?"block":"none"}),t.stopPropagation()}function vt(t){var e=t.target.className;if(A())return p(ct,{display:"block"}),void ht({list:M.subSelector,current:I.assetCode},(function(t){gt(I=yt(M.subSelector,t)),ft(g,M.subSelector,M.assetCode,I.assetCode)}));if(/binance-fiat-widget-dropdown-item/.test(e)){var n=t.target.innerText;gt(I=yt(M.subSelector,n)),ft(g,M.subSelector,M.assetCode,I.assetCode)}w=!w,p(rt.children[0],{borderWidth:w?"0 4px 5px 4px":"5px 4px 0 4px",borderColor:w?"transparent transparent "+V.arrowIconColor+" transparent":V.arrowIconColor+" transparent transparent transparent"}),p(rt.children[1],{display:w?"block":"none"}),t.stopPropagation()}function wt(t){var e=a();return e.innerText=t,p(e,{fontSize:U.fontSize,color:V.buySubmitColor,textAlign:"left",paddingLeft:P.dropDown.pl,height:"40px",lineHeight:"40px"}),e.className+="binance-fiat-widget-dropdown-item",W.innerText+="\n .binance-fiat-widget-dropdown-item:hover {\n background: #EAECEF;\n font-weight: 500;\n }\n ",e}function mt(t){var e,n=a(),r=a(),o=(p(e=document.createElement("i"),{width:0,height:0,borderWidth:v?"0 4px 5px 4px":"5px 4px 0 4px",borderStyle:"solid",borderColor:v?"transparent transparent "+V.arrowIconColor+" transparent":V.arrowIconColor+" transparent transparent transparent",borderRadius:"2px",position:"absolute",right:"12px",top:(P.input1.height-5)/2+"px"}),e),i=function(){var t=a();return p(t,{width:"calc("+P.input1.rightWidth+" + "+P.input1.coinMl+")",height:P.dropDown.height,background:"#fff",boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.1)",borderRadius:"4px",position:"absolute",zIndex:9,top:P.input1.height+4+"px",right:0,overflowY:"auto",display:"none",fontWeight:"normal"}),t}();return p(n,{width:P.input1.rightWidth,height:P.input1.height+"px",border:"1px solid "+V.inputBorder,backgroundColor:V.inputBg,borderRadius:"3px",borderLeft:"0 none",paddingLeft:P.input1.coinMl,marginTop:P.input1.space,position:"relative",cursor:"pointer",fontWeight:500}),t||(n.className="binance-fiat-widget-select-before "+("dark"===S?"binance-fiat-widget-select-dark":"binance-fiat-widget-select-light"),W.innerText+="\n .binance-fiat-widget-select-before:before {\n content: '';\n height: 16px;\n display: inline-block;\n position: absolute;\n left: -1px;\n width: 1px;\n opacity: 0.2;\n top: "+(P.input1.height-16)/2+"px;\n }\n .binance-fiat-widget-select-dark:before {\n background: "+u.dark.breakColor+";\n }\n .binance-fiat-widget-select-light:before {\n background: "+u.light.breakColor+";\n }\n "),n.appendChild(o),n.appendChild(i),n.appendChild(r),n}function Ct(){if(M&&M.assetCode&&I&&I.assetCode){if("CNY"===M.assetCode)window.open("https://c2c.binance.com/");else{var t=nt.children[0].value,e=c+"/"+C+"/buy-sell-crypto?fiat="+M.assetCode+"&crypto="+I.assetCode+"&amount="+t;T&&(e+="&ref="+T),window.open(e)}}}null===(b=document.querySelector("body"))||void 0===b||b.appendChild(ct),q.appendChild(G),q.appendChild(X),J.appendChild($),J.appendChild(nt),Q.appendChild(tt),Q.appendChild(rt),Z.appendChild(W),Z.appendChild(q),Z.appendChild(J),Z.appendChild(Q),Z.appendChild(it),Z.appendChild(at),function(t){o(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,B({locale:C,api_host:z})];case 1:return e=i.sent(),n=e.i18n,r=e.coinList,y=n,x=r,o=function(t){return L(t,y)},G.innerText=o("exchange-buySell-buyType"),X.innerText=o("exchange-buySell-sellType"),$.innerText=o("exchange-home-wantSpend"),tt.innerText=o("exchange-home-wantBuy"),nt.children[0].placeholder=o("exchange-home-enterAmount"),st.innerText=o("exchange-creditcard-poweredBy"),dt.innerText=o("exchange-home-wantSpend"),lt.placeholder=o("exchange-home-SearchCrypto"),g=x.buySelector,bt(M=g[0]),I=M.subSelector[0],ft(g,M.subSelector,M.assetCode,I.assetCode),gt(I),t&&t(),[2]}}))}))}((function(){var t;null===(t=O)||void 0===t||t.append(Z)}))}}]).default})); |
{ | ||
"name": "binance-fiat-widget", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
44488