UNPKG

superchats

Version:

SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp

1 lines 8.55 kB
'use strict';const a46_0x4203b8=a46_0x3890;(function(_0xcec382,_0x473d36){const _0x1f3d32=a46_0x3890,_0x1c2e13=_0xcec382();while(!![]){try{const _0x544c19=parseInt(_0x1f3d32(0x205))/0x1+parseInt(_0x1f3d32(0x1ef))/0x2+-parseInt(_0x1f3d32(0x1f2))/0x3*(parseInt(_0x1f3d32(0x1eb))/0x4)+parseInt(_0x1f3d32(0x211))/0x5+parseInt(_0x1f3d32(0x221))/0x6+-parseInt(_0x1f3d32(0x1f8))/0x7*(parseInt(_0x1f3d32(0x216))/0x8)+parseInt(_0x1f3d32(0x200))/0x9*(-parseInt(_0x1f3d32(0x208))/0xa);if(_0x544c19===_0x473d36)break;else _0x1c2e13['push'](_0x1c2e13['shift']());}catch(_0x23d98d){_0x1c2e13['push'](_0x1c2e13['shift']());}}}(a46_0x2fe4,0xf2072));var __createBinding=this&&this['__createBinding']||(Object[a46_0x4203b8(0x1ed)]?function(_0x2a9c82,_0x441980,_0x3492c8,_0x2d78aa){const _0x3dc8b4=a46_0x4203b8;if(_0x2d78aa===undefined)_0x2d78aa=_0x3492c8;var _0x87b80e=Object[_0x3dc8b4(0x1fd)](_0x441980,_0x3492c8);(!_0x87b80e||('get'in _0x87b80e?!_0x441980['__esModule']:_0x87b80e[_0x3dc8b4(0x1f6)]||_0x87b80e['configurable']))&&(_0x87b80e={'enumerable':!![],'get':function(){return _0x441980[_0x3492c8];}}),Object['defineProperty'](_0x2a9c82,_0x2d78aa,_0x87b80e);}:function(_0x433779,_0x53c84e,_0x58953e,_0x40eec0){if(_0x40eec0===undefined)_0x40eec0=_0x58953e;_0x433779[_0x40eec0]=_0x53c84e[_0x58953e];}),__setModuleDefault=this&&this[a46_0x4203b8(0x212)]||(Object['create']?function(_0x565330,_0x2fe7e9){const _0x4c8aed=a46_0x4203b8;Object[_0x4c8aed(0x20f)](_0x565330,_0x4c8aed(0x1fe),{'enumerable':!![],'value':_0x2fe7e9});}:function(_0x390b6f,_0x327c73){const _0x29eae1=a46_0x4203b8;_0x390b6f[_0x29eae1(0x1fe)]=_0x327c73;}),__importStar=this&&this[a46_0x4203b8(0x1f7)]||function(_0x99e30c){const _0x24fe7b=a46_0x4203b8;if(_0x99e30c&&_0x99e30c[_0x24fe7b(0x1ea)])return _0x99e30c;var _0x21036f={};if(_0x99e30c!=null){for(var _0x3d39b6 in _0x99e30c)if(_0x3d39b6!==_0x24fe7b(0x1fe)&&Object[_0x24fe7b(0x1fc)][_0x24fe7b(0x1ee)][_0x24fe7b(0x1e7)](_0x99e30c,_0x3d39b6))__createBinding(_0x21036f,_0x99e30c,_0x3d39b6);}return __setModuleDefault(_0x21036f,_0x99e30c),_0x21036f;};Object[a46_0x4203b8(0x20f)](exports,'__esModule',{'value':!![]}),exports['calculateMAC']=exports[a46_0x4203b8(0x1f9)]=exports[a46_0x4203b8(0x202)]=exports['setCurve']=exports[a46_0x4203b8(0x207)]=exports['crypto']=exports[a46_0x4203b8(0x209)]=void 0x0;const Internal=__importStar(require('.')),util=__importStar(require(a46_0x4203b8(0x1f3))),webcrypto=(globalThis===null||globalThis===void 0x0?void 0x0:globalThis[a46_0x4203b8(0x214)])||require(a46_0x4203b8(0x204));class Crypto{constructor(_0x22a2a1){const _0x5eb91a=a46_0x4203b8;this['_curve']=new Internal['AsyncCurve'](),this[_0x5eb91a(0x203)]=_0x22a2a1||webcrypto;}set['webcrypto'](_0x487c6b){const _0x16eeaa=a46_0x4203b8;this[_0x16eeaa(0x203)]=_0x487c6b;}set[a46_0x4203b8(0x21f)](_0xf7b3ba){const _0x5d31cf=a46_0x4203b8;this['_curve'][_0x5d31cf(0x21f)]=_0xf7b3ba;}['getRandomBytes'](_0x10ccf1){const _0x1c92f6=a46_0x4203b8,_0x486441=new Uint8Array(_0x10ccf1);return this['_webcrypto'][_0x1c92f6(0x1f4)](_0x486441),util[_0x1c92f6(0x1e6)](_0x486441);}async[a46_0x4203b8(0x210)](_0x1576a4,_0x2b55cf,_0x1d47b2){const _0x559a0c=a46_0x4203b8,_0x447546=await this['_webcrypto'][_0x559a0c(0x218)][_0x559a0c(0x21d)](_0x559a0c(0x1ff),_0x1576a4,{'name':_0x559a0c(0x21a)},![],[_0x559a0c(0x210)]);return this[_0x559a0c(0x203)]['subtle'][_0x559a0c(0x210)]({'name':'AES-CBC','iv':new Uint8Array(_0x1d47b2)},_0x447546,_0x2b55cf);}async[a46_0x4203b8(0x1f0)](_0x152684,_0x4494cc,_0xac897){const _0x4f0d2d=a46_0x4203b8,_0x1d5028=await this[_0x4f0d2d(0x203)][_0x4f0d2d(0x218)][_0x4f0d2d(0x21d)](_0x4f0d2d(0x1ff),_0x152684,{'name':'AES-CBC'},![],['decrypt']);return this['_webcrypto'][_0x4f0d2d(0x218)][_0x4f0d2d(0x1f0)]({'name':'AES-CBC','iv':new Uint8Array(_0xac897)},_0x1d5028,_0x4494cc);}async[a46_0x4203b8(0x220)](_0x550020,_0x8db82a){const _0x3515b5=a46_0x4203b8,_0x373a07=await this[_0x3515b5(0x203)][_0x3515b5(0x218)][_0x3515b5(0x21d)]('raw',_0x550020,{'name':_0x3515b5(0x20a),'hash':{'name':_0x3515b5(0x217)}},![],[_0x3515b5(0x220)]);try{return this[_0x3515b5(0x203)][_0x3515b5(0x218)][_0x3515b5(0x220)]({'name':_0x3515b5(0x20a),'hash':'SHA-256'},_0x373a07,_0x8db82a);}catch(_0x5b9d86){throw _0x5b9d86;}}async[a46_0x4203b8(0x1f5)](_0x32c181){const _0xeb9329=a46_0x4203b8;return this['_webcrypto'][_0xeb9329(0x218)][_0xeb9329(0x21c)]({'name':'SHA-512'},_0x32c181);}async['HKDF'](_0x28a09c,_0x12a976,_0x272245){const _0x4d8edd=a46_0x4203b8;if(typeof _0x272245===_0x4d8edd(0x20b))throw new Error(_0x4d8edd(0x1e5));const _0x56e496=await Internal[_0x4d8edd(0x214)][_0x4d8edd(0x220)](_0x12a976,_0x28a09c),_0x57378f=new ArrayBuffer(_0x272245[_0x4d8edd(0x1e9)]+0x1+0x20),_0x30f0ab=new Uint8Array(_0x57378f);_0x30f0ab['set'](new Uint8Array(_0x272245),0x20),_0x30f0ab[_0x30f0ab[_0x4d8edd(0x1fa)]-0x1]=0x1;const _0x3f533b=await Internal[_0x4d8edd(0x214)]['sign'](_0x56e496,_0x57378f[_0x4d8edd(0x219)](0x20));_0x30f0ab['set'](new Uint8Array(_0x3f533b)),_0x30f0ab[_0x30f0ab[_0x4d8edd(0x1fa)]-0x1]=0x2;const _0x4e6cd2=await Internal[_0x4d8edd(0x214)]['sign'](_0x56e496,_0x57378f);_0x30f0ab[_0x4d8edd(0x1f1)](new Uint8Array(_0x4e6cd2)),_0x30f0ab[_0x30f0ab[_0x4d8edd(0x1fa)]-0x1]=0x3;const _0x3c10fe=await Internal[_0x4d8edd(0x214)][_0x4d8edd(0x220)](_0x56e496,_0x57378f);return[_0x3f533b,_0x4e6cd2,_0x3c10fe];}['createKeyPair'](_0x534b7c){const _0x51bad2=a46_0x4203b8;return!_0x534b7c&&(_0x534b7c=this[_0x51bad2(0x21e)](0x20)),this[_0x51bad2(0x213)][_0x51bad2(0x206)](_0x534b7c);}['ECDHE'](_0x553d8c,_0x52ed50){const _0x5ebd97=a46_0x4203b8;return this[_0x5ebd97(0x213)][_0x5ebd97(0x20e)](_0x553d8c,_0x52ed50);}[a46_0x4203b8(0x21b)](_0x25cdcf,_0x303106){const _0x47a91c=a46_0x4203b8;return this[_0x47a91c(0x213)][_0x47a91c(0x21b)](_0x25cdcf,_0x303106);}['Ed25519Verify'](_0xbc2664,_0x2e52b8,_0x4f2a26){const _0x1baab4=a46_0x4203b8;return this[_0x1baab4(0x213)][_0x1baab4(0x20c)](_0xbc2664,_0x2e52b8,_0x4f2a26);}}exports['Crypto']=Crypto,exports['crypto']=new Crypto();function setWebCrypto(_0x3b9319){exports['crypto']['webcrypto']=_0x3b9319;}exports['setWebCrypto']=setWebCrypto;function setCurve(_0x378e54){const _0x26cf59=a46_0x4203b8;exports[_0x26cf59(0x214)]['curve']=_0x378e54;}exports['setCurve']=setCurve;function HKDF(_0xc99f1e,_0x363b3c,_0x411f0e){const _0x5129db=a46_0x4203b8;if(_0x363b3c[_0x5129db(0x1e9)]!=0x20)throw new Error(_0x5129db(0x1e8));const _0x340444=util[_0x5129db(0x20d)](_0x411f0e);if(!_0x340444)throw new Error(_0x5129db(0x1fb));return exports[_0x5129db(0x214)][_0x5129db(0x202)](_0xc99f1e,_0x363b3c,_0x340444);}exports[a46_0x4203b8(0x202)]=HKDF;async function verifyMAC(_0x4ad527,_0x305d46,_0x8c47ad,_0xae1a77){const _0x1e655b=a46_0x4203b8,_0xf538af=await exports[_0x1e655b(0x214)][_0x1e655b(0x220)](_0x305d46,_0x4ad527);if(_0x8c47ad[_0x1e655b(0x1e9)]!=_0xae1a77||_0xf538af[_0x1e655b(0x1e9)]<_0xae1a77)throw new Error(_0x1e655b(0x215));const _0x1823e1=new Uint8Array(_0xf538af),_0x14497b=new Uint8Array(_0x8c47ad);let _0x59add1=0x0;for(let _0x499d59=0x0;_0x499d59<_0x8c47ad['byteLength'];++_0x499d59){_0x59add1=_0x59add1|_0x1823e1[_0x499d59]^_0x14497b[_0x499d59];}if(_0x59add1!==0x0)throw new Error(_0x1e655b(0x1ec));}exports[a46_0x4203b8(0x1f9)]=verifyMAC;function calculateMAC(_0x3c8430,_0x5d7b83){const _0x131a81=a46_0x4203b8;return exports[_0x131a81(0x214)][_0x131a81(0x220)](_0x3c8430,_0x5d7b83);}exports[a46_0x4203b8(0x201)]=calculateMAC;function a46_0x3890(_0x38e5d0,_0x45f9df){const _0x2fe45f=a46_0x2fe4();return a46_0x3890=function(_0x3890a2,_0x1a80c2){_0x3890a2=_0x3890a2-0x1e5;let _0x2d5c0c=_0x2fe45f[_0x3890a2];return _0x2d5c0c;},a46_0x3890(_0x38e5d0,_0x45f9df);}function a46_0x2fe4(){const _0x4cba36=['../helpers','getRandomValues','hash','writable','__importStar','7JxYywR','verifyMAC','length','Invalid\x20HKDF\x20info','prototype','getOwnPropertyDescriptor','default','raw','1662399NYrHPi','calculateMAC','HKDF','_webcrypto','../../lib/msrcrypto','1541606bvWtVI','createKeyPair','setWebCrypto','100JJyOff','Crypto','HMAC','string','Ed25519Verify','binaryStringToArrayBuffer','ECDHE','defineProperty','encrypt','7177545gYVjbC','__setModuleDefault','_curve','crypto','Bad\x20MAC\x20length','6988720mgfryb','SHA-256','subtle','slice','AES-CBC','Ed25519Sign','digest','importKey','getRandomBytes','curve','sign','6630234WPrjVG','HKDF\x20info\x20was\x20a\x20string','uint8ArrayToArrayBuffer','call','Got\x20salt\x20of\x20incorrect\x20length','byteLength','__esModule','1272odRkjM','Bad\x20MAC','create','hasOwnProperty','3030628gqHOsX','decrypt','set','17787DzhnBK'];a46_0x2fe4=function(){return _0x4cba36;};return a46_0x2fe4();}