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 3.9 kB
'use strict';var a9_0x2c0cd2=a9_0x7a07;(function(_0x3d5de7,_0x362384){var _0x25018=a9_0x7a07,_0x126304=_0x3d5de7();while(!![]){try{var _0x318361=parseInt(_0x25018(0x196))/0x1+-parseInt(_0x25018(0x188))/0x2+-parseInt(_0x25018(0x17f))/0x3*(-parseInt(_0x25018(0x17d))/0x4)+-parseInt(_0x25018(0x17b))/0x5+parseInt(_0x25018(0x17a))/0x6+parseInt(_0x25018(0x190))/0x7+parseInt(_0x25018(0x19b))/0x8*(-parseInt(_0x25018(0x18c))/0x9);if(_0x318361===_0x362384)break;else _0x126304['push'](_0x126304['shift']());}catch(_0x5b6282){_0x126304['push'](_0x126304['shift']());}}}(a9_0x1112,0x852f4));function a9_0x7a07(_0xf8d892,_0x21941c){var _0x11126c=a9_0x1112();return a9_0x7a07=function(_0x7a076b,_0x25ab89){_0x7a076b=_0x7a076b-0x17a;var _0x48e4d1=_0x11126c[_0x7a076b];return _0x48e4d1;},a9_0x7a07(_0xf8d892,_0x21941c);}function a9_0x1112(){var _0x4c3f8f=['MobileSocketClient','lookup','socket','setMaxListeners','closed','ready','agent','port','131840uKpNEQ','config','data','connect','9bbiZTA','end','close','message','4340651IrBJXG','drain','isOpen','open','emit','error','1006472oxnKjL','url','isClosed','readyState','hostname','3520296jbHCfC','2294430lLtktA','5015905SSAptE','There\x20are\x20not\x20support\x20for\x20proxy\x20agent\x20for\x20mobile\x20connection','91384esuWDK','isClosing','6EZRbEK'];a9_0x1112=function(){return _0x4c3f8f;};return a9_0x1112();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MobileSocketClient']=void 0x0;const net_1=require('net'),abstract_socket_client_1=require('./abstract-socket-client');class MobileSocketClient extends abstract_socket_client_1['AbstractSocketClient']{constructor(){var _0x4ad3f1=a9_0x7a07;super(...arguments),this[_0x4ad3f1(0x182)]=null;}get[a9_0x2c0cd2(0x192)](){var _0x2cc4c7=a9_0x2c0cd2,_0xe406ae;return((_0xe406ae=this[_0x2cc4c7(0x182)])===null||_0xe406ae===void 0x0?void 0x0:_0xe406ae[_0x2cc4c7(0x199)])===_0x2cc4c7(0x193);}get[a9_0x2c0cd2(0x198)](){var _0x319752=a9_0x2c0cd2,_0x40d7ee;return this[_0x319752(0x182)]===null||((_0x40d7ee=this[_0x319752(0x182)])===null||_0x40d7ee===void 0x0?void 0x0:_0x40d7ee[_0x319752(0x199)])===_0x319752(0x184);}get[a9_0x2c0cd2(0x17e)](){var _0x5c69f4=a9_0x2c0cd2,_0x2189a1;return this['socket']===null||((_0x2189a1=this[_0x5c69f4(0x182)])===null||_0x2189a1===void 0x0?void 0x0:_0x2189a1[_0x5c69f4(0x199)])==='closed';}get['isConnecting'](){var _0x25fe2f=a9_0x2c0cd2,_0xaf3c54;return((_0xaf3c54=this[_0x25fe2f(0x182)])===null||_0xaf3c54===void 0x0?void 0x0:_0xaf3c54['readyState'])==='opening';}async[a9_0x2c0cd2(0x18b)](){var _0x89158b=a9_0x2c0cd2,_0x3e6963;if(this[_0x89158b(0x182)])return;if(this[_0x89158b(0x189)][_0x89158b(0x186)])throw new Error(_0x89158b(0x17c));else this[_0x89158b(0x182)]=(0x0,net_1['connect'])({'host':this[_0x89158b(0x197)][_0x89158b(0x19a)],'port':Number(this[_0x89158b(0x197)][_0x89158b(0x187)])||0x1bb});this[_0x89158b(0x182)][_0x89158b(0x183)](0x0);const _0x5268ca=[_0x89158b(0x18e),_0x89158b(0x18b),_0x89158b(0x18a),_0x89158b(0x191),_0x89158b(0x18d),_0x89158b(0x195),_0x89158b(0x181),_0x89158b(0x185),'timeout'];for(const _0x5c9f54 of _0x5268ca){(_0x3e6963=this['socket'])===null||_0x3e6963===void 0x0?void 0x0:_0x3e6963['on'](_0x5c9f54,(..._0x32c91c)=>this[_0x89158b(0x194)](_0x5c9f54,..._0x32c91c));}this[_0x89158b(0x182)]['on'](_0x89158b(0x18a),(..._0x5d7f04)=>this[_0x89158b(0x194)](_0x89158b(0x18f),..._0x5d7f04)),this['socket']['on'](_0x89158b(0x185),(..._0x2fc89b)=>this[_0x89158b(0x194)]('open',..._0x2fc89b));}async[a9_0x2c0cd2(0x18e)](){var _0x33bbf2=a9_0x2c0cd2;if(!this[_0x33bbf2(0x182)])return;return new Promise(_0x4f8fce=>{var _0x5a535a=_0x33bbf2;this['socket'][_0x5a535a(0x18d)](_0x4f8fce),this[_0x5a535a(0x182)]=null;});}['send'](_0x1c1fcc,_0x2fd02f){var _0x236691=a9_0x2c0cd2;if(this[_0x236691(0x182)]===null)return![];return this[_0x236691(0x182)]['write'](_0x1c1fcc,undefined,_0x2fd02f);}}exports[a9_0x2c0cd2(0x180)]=MobileSocketClient;