trakk-js
Version:
Automatic Documentation Generation - Real-Time Code Execution Flow - Testing / Debugging - Onboarding - for Front-End Applications
1 lines • 14.9 kB
JavaScript
function _0xa2c0(){const _0x201bc5=['sendBeacon','eULJu','join','DWeUu','GET','NZxYA','BEZTa','nnvos','replace','rBqLQ','toString','open','jquery\x20ajax','trim','KTAvx','axios','50IofRnT','jgTZz','DrNbd','qbFAS','name','6CgGVER','IWSCh','Error\x20logging\x20request:','dyGdF','prototype','FgOxr','YoJhr','_url','done','kWMmu','closed','responseType','responseText','UbDEx','1696937iIlMkP','toLowerCase','object','1564580oSoJlu','btqdc','7ZQVQwU','HlVNu','cFEqA','now','RUAva','aNCce','rIbOS','getTime','includes','data','close','application/json','jQuery','DNHEX','Fake\x20Request','ynFUo','addEventListener','method','QrvfP','NlbmO','split','KgtYM','yCKPi','fetch','length','request','send','42397IsOWRT','type','6064928nBQqXM','xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx','Tjqcm','OekzK','bGvvu','EQcdm','floor','error','message','IEpGZ','XirLv','1234278toiCdX','clone','websocket','_method','OkTfp','url','load','WebSocket','json','24BhjwbA','plnXV','GPIkq','getAllResponseHeaders','test','999785JyGxqg','rmjld','catch','beacon\x20sent','get','beacon','ajax','GlXTe','{TRAKK_FUNCTION_NAME_PLACEHOLDER}','XMLHttpRequest','328851RymFiL','uWsKg','entries','apply','VRiIq','opened','WRfrf','message\x20received','CqRge','LaeKm','AKCGa','content-type','blob','response','wquGW','parse','status','headers','12RsjBZj','{TRAKKLIST_ARRAY_NAME_PLACEHOLDER}','then'];_0xa2c0=function(){return _0x201bc5;};return _0xa2c0();}const _0x344a5d=_0x459c;(function(_0x1778d6,_0x368d48){const _0xb531f1=_0x459c,_0xbba685=_0x1778d6();while(!![]){try{const _0x41ffad=parseInt(_0xb531f1(0x149))/0x1*(-parseInt(_0xb531f1(0x11b))/0x2)+parseInt(_0xb531f1(0x156))/0x3+-parseInt(_0xb531f1(0x12c))/0x4+-parseInt(_0xb531f1(0x164))/0x5*(parseInt(_0xb531f1(0x180))/0x6)+parseInt(_0xb531f1(0x12e))/0x7*(parseInt(_0xb531f1(0x14b))/0x8)+-parseInt(_0xb531f1(0x16e))/0x9*(-parseInt(_0xb531f1(0x116))/0xa)+-parseInt(_0xb531f1(0x129))/0xb*(-parseInt(_0xb531f1(0x15f))/0xc);if(_0x41ffad===_0x368d48)break;else _0xbba685['push'](_0xbba685['shift']());}catch(_0x251eb1){_0xbba685['push'](_0xbba685['shift']());}}}(_0xa2c0,0xb5479));function _0x459c(_0x480605,_0x1bca2c){const _0xa2c00=_0xa2c0();return _0x459c=function(_0x459cc7,_0x42ba0e){_0x459cc7=_0x459cc7-0x116;let _0x3447a2=_0xa2c00[_0x459cc7];return _0x3447a2;},_0x459c(_0x480605,_0x1bca2c);}try{function generateUUID(){const _0x28cc48=_0x459c,_0x4db9f9={'ynFUo':function(_0x52a59a,_0x305d43){return _0x52a59a*_0x305d43;},'dyGdF':function(_0x8fc1d6,_0x4989a5){return _0x8fc1d6>_0x4989a5;},'YoJhr':function(_0x43cbf8,_0x49eecd){return _0x43cbf8|_0x49eecd;},'uWsKg':function(_0x35f77d,_0x41c5de){return _0x35f77d%_0x41c5de;},'RUAva':function(_0x4c3096,_0x536339){return _0x4c3096+_0x536339;},'DWeUu':function(_0x349e21,_0x61875c){return _0x349e21/_0x61875c;},'aNCce':function(_0x5792e2,_0xe9e744){return _0x5792e2|_0xe9e744;},'XirLv':function(_0x149248,_0x169781){return _0x149248===_0x169781;},'HlVNu':function(_0x3436c2,_0x5d2758){return _0x3436c2|_0x5d2758;},'UbDEx':_0x28cc48(0x14c)};let _0x3bbec5=new Date()[_0x28cc48(0x135)](),_0x3e2b19=performance&&performance['now']&&performance['now']()*0x3e8||0x0;return _0x4db9f9[_0x28cc48(0x128)][_0x28cc48(0x18b)](/[xy]/g,function(_0xa941d5){const _0x44ada0=_0x28cc48;let _0xfcc87c=_0x4db9f9[_0x44ada0(0x13d)](Math['random'](),0x10);return _0x4db9f9[_0x44ada0(0x11e)](_0x3bbec5,0x0)?(_0xfcc87c=_0x4db9f9[_0x44ada0(0x121)](_0x4db9f9[_0x44ada0(0x16f)](_0x4db9f9[_0x44ada0(0x132)](_0x3bbec5,_0xfcc87c),0x10),0x0),_0x3bbec5=Math[_0x44ada0(0x151)](_0x4db9f9[_0x44ada0(0x186)](_0x3bbec5,0x10))):(_0xfcc87c=_0x4db9f9[_0x44ada0(0x133)]((_0x3e2b19+_0xfcc87c)%0x10,0x0),_0x3e2b19=Math[_0x44ada0(0x151)](_0x3e2b19/0x10)),(_0x4db9f9[_0x44ada0(0x155)](_0xa941d5,'x')?_0xfcc87c:_0x4db9f9[_0x44ada0(0x12f)](_0xfcc87c&0x3,0x8))[_0x44ada0(0x18d)](0x10);});}const windowId='trakkjs-request-listeners-{API_KEY_PLACEHOLDER}';if(!window[windowId]){window[windowId]={};const windowTrakkListArrayName=_0x344a5d(0x181),windowTrakkFunctionName=_0x344a5d(0x16c);window[windowTrakkListArrayName]=window[windowTrakkListArrayName]||[];const maxWaitForPretenderTimeout=0x5*0x3e8;function formatResponse(_0x400a4f){const _0x371ac8=_0x344a5d,_0x2fa5aa={'plnXV':function(_0x323ebb,_0x393633){return _0x323ebb===_0x393633;},'kWMmu':'string','GlXTe':function(_0xe08dd8,_0x136205){return _0xe08dd8===_0x136205;},'NZxYA':_0x371ac8(0x12b)};if(_0x400a4f instanceof Blob)return _0x400a4f;else{if(_0x2fa5aa[_0x371ac8(0x160)](typeof _0x400a4f,_0x2fa5aa[_0x371ac8(0x124)]))try{return JSON[_0x371ac8(0x17d)](_0x400a4f);}catch(_0xff3515){return _0x400a4f;}else return _0x400a4f&&_0x2fa5aa[_0x371ac8(0x16b)](typeof _0x400a4f,_0x2fa5aa[_0x371ac8(0x188)])?_0x400a4f:_0x400a4f;}}function logRequest(_0xe4e896){const _0x50d76b=_0x344a5d,_0x24763a={'CZtxy':_0x50d76b(0x147),'KTAvx':function(_0x2238c9){return _0x2238c9();},'eULJu':_0x50d76b(0x11d)};try{let _0x13521a=_0xe4e896[_0x50d76b(0x15b)]?.['toLowerCase']?.()[_0x50d76b(0x190)]?.()||null;if(/local-trakk-js-api/[_0x50d76b(0x163)](_0x13521a))return;if(/https:\/\/trakkjs\.com/[_0x50d76b(0x163)](_0x13521a))return;if(/https:\/\/trakkjs\.com/[_0x50d76b(0x163)](_0x13521a))return;let _0x19604f=new Date()['getTime'](),_0x228c3b=_0xe4e896[_0x50d76b(0x13f)]?.[_0x50d76b(0x12a)]?.()[_0x50d76b(0x190)]?.()||null,_0x5a87e4=_0xe4e896['type']?.[_0x50d76b(0x12a)]?.()[_0x50d76b(0x190)]?.()||null,_0x954a38=undefined;if(_0x13521a?.['length']){let _0x4b8858=_0x13521a;try{let [_0x116f28,_0x580a41]=_0x13521a['split']('?');if(_0x116f28[_0x50d76b(0x146)]&&_0x580a41['length']){let _0x38c660=_0x580a41[_0x50d76b(0x142)]('&')['filter'](_0x360a9a=>{const _0x484eba=_0x50d76b;return!/^ts?=.+/[_0x484eba(0x163)](_0x360a9a);})[_0x50d76b(0x185)]('&');_0x4b8858=_0x116f28+'?'+_0x38c660;}}catch(_0x5f49d6){}if(_0x228c3b?.[_0x50d76b(0x146)]&&_0x5a87e4?.[_0x50d76b(0x146)])_0x954a38=_0x4b8858+'-'+_0x5a87e4+'-'+_0x228c3b;else _0x5a87e4?.[_0x50d76b(0x146)]&&(_0x954a38=_0x4b8858+'-'+_0x5a87e4);}window[windowTrakkFunctionName]({'request':_0xe4e896,'type':_0x24763a['CZtxy'],'uuid':_0x954a38||_0x24763a[_0x50d76b(0x191)](generateUUID),'timestamp':_0x19604f});}catch(_0x5c8072){console[_0x50d76b(0x152)](_0x24763a[_0x50d76b(0x184)],_0x5c8072);}}function monitorXHR(){const _0x1df1a9=_0x344a5d,_0x19bc70={'VRiIq':_0x1df1a9(0x15c),'EQcdm':'blob','IEpGZ':function(_0x1ab47f,_0x52a2d1){return _0x1ab47f(_0x52a2d1);},'DrNbd':'XHR'};if(window[_0x1df1a9(0x16d)]){const _0x3ceb5a={'construct'(_0x253913,_0x38e2b3){const _0x14715d=_0x1df1a9,_0x5a5f34={'OekzK':_0x19bc70[_0x14715d(0x150)],'bGvvu':function(_0x8d04b4,_0x2b1e36){const _0x242c3d=_0x14715d;return _0x19bc70[_0x242c3d(0x154)](_0x8d04b4,_0x2b1e36);},'CqRge':_0x19bc70[_0x14715d(0x118)]},_0x5c2582=new _0x253913(..._0x38e2b3),_0x3d120d=_0x5c2582['open'],_0x27aec4=_0x5c2582[_0x14715d(0x148)];return _0x5c2582['open']=function(_0x3e5453,_0x4182fd){const _0x55156c=_0x14715d;return this[_0x55156c(0x122)]=_0x4182fd,this[_0x55156c(0x159)]=_0x3e5453,_0x3d120d['apply'](this,arguments);},_0x5c2582[_0x14715d(0x148)]=function(_0x5df764){const _0xa42d90=_0x14715d;return this[_0xa42d90(0x13e)](_0x19bc70[_0xa42d90(0x172)],function(){const _0x4d45f7=_0xa42d90;let _0x505ae1=this[_0x4d45f7(0x126)],_0x2569b2;switch(_0x505ae1){case _0x5a5f34[_0x4d45f7(0x14e)]:_0x2569b2=this['response'];break;default:_0x2569b2=formatResponse(this['responseText']);break;}_0x5a5f34[_0x4d45f7(0x14f)](logRequest,{'type':_0x5a5f34[_0x4d45f7(0x176)],'method':this[_0x4d45f7(0x159)],'url':this[_0x4d45f7(0x122)],'status':this[_0x4d45f7(0x17e)],'response':_0x2569b2,'headers':this['getAllResponseHeaders']()});}),_0x27aec4[_0xa42d90(0x171)](this,arguments);},_0x5c2582;}};window['XMLHttpRequest']=new Proxy(window['XMLHttpRequest'],_0x3ceb5a);}}function monitorFetch(){const _0x30ca9d=_0x344a5d,_0x456b56={'Tjqcm':'content-type','omjPS':_0x30ca9d(0x139),'QrvfP':'Fetch\x20request\x20error:','KCIBt':_0x30ca9d(0x187),'jgTZz':function(_0x569f56,..._0x446a2e){return _0x569f56(..._0x446a2e);}},_0x465777=window['fetch'];_0x465777&&(window[_0x30ca9d(0x145)]=function(..._0x1e096f){const _0x5f2749=_0x30ca9d,_0x163262={'qbFAS':_0x456b56[_0x5f2749(0x140)]},[_0x1f1a01,_0x474e82]=_0x1e096f,_0x49b7bf=_0x474e82&&_0x474e82[_0x5f2749(0x13f)]||_0x456b56['KCIBt'];return _0x456b56[_0x5f2749(0x117)](_0x465777,..._0x1e096f)[_0x5f2749(0x182)](_0x518786=>{const _0xf30722=_0x5f2749,_0xd0882=_0x518786[_0xf30722(0x157)]();let _0x7ecd85;if(_0x518786[_0xf30722(0x17f)][_0xf30722(0x168)](_0x456b56[_0xf30722(0x14d)])?.[_0xf30722(0x136)](_0x456b56['omjPS']))_0x7ecd85=_0xd0882[_0xf30722(0x15e)]();else _0x518786[_0xf30722(0x17f)][_0xf30722(0x168)](_0xf30722(0x179))?.['includes'](_0xf30722(0x17a))?_0x7ecd85=_0xd0882[_0xf30722(0x17a)]():_0x7ecd85=_0xd0882['text']();return _0x7ecd85[_0xf30722(0x182)](_0x148ecf=>{const _0x3a829e=_0xf30722;return logRequest({'type':'fetch','method':_0x49b7bf,'url':_0x1f1a01,'status':_0x518786[_0x3a829e(0x17e)],'response':formatResponse(_0x148ecf),'headers':[..._0x518786[_0x3a829e(0x17f)][_0x3a829e(0x170)]()]}),_0x518786;});})[_0x5f2749(0x166)](_0x5f514f=>{const _0x272146=_0x5f2749;console[_0x272146(0x152)](_0x163262[_0x272146(0x119)],_0x5f514f);throw _0x5f514f;});});}function monitorWebSocket(){const _0x2b972c=_0x344a5d,_0x3d3738={'NlbmO':function(_0xed261b,_0x530adf){return _0xed261b(_0x530adf);},'yCKPi':_0x2b972c(0x158),'btqdc':_0x2b972c(0x173),'rBqLQ':function(_0x54ad92,_0x3fcbe2){return _0x54ad92(_0x3fcbe2);},'LaeKm':_0x2b972c(0x175),'AKCGa':_0x2b972c(0x153),'nnvos':'open','rmjld':_0x2b972c(0x138),'OkTfp':'error'};if(window['WebSocket']){const _0x4d248c={'construct'(_0x4de854,_0x2201e8){const _0x1735ce=_0x2b972c,_0x30404d={'rvDVQ':function(_0x5ea811,_0x247bfd){const _0x4bd000=_0x459c;return _0x3d3738[_0x4bd000(0x18c)](_0x5ea811,_0x247bfd);},'WRfrf':_0x3d3738[_0x1735ce(0x177)]},_0x13010b=new _0x4de854(..._0x2201e8),_0xac688d=_0x2201e8[0x0];return _0x13010b[_0x1735ce(0x13e)](_0x3d3738[_0x1735ce(0x178)],function(_0x15fa15){const _0x6da907=_0x1735ce;_0x30404d['rvDVQ'](logRequest,{'type':'websocket','url':_0xac688d,'data':_0x15fa15[_0x6da907(0x137)],'status':_0x30404d[_0x6da907(0x174)]});}),_0x13010b[_0x1735ce(0x13e)](_0x3d3738[_0x1735ce(0x18a)],function(_0x5947b7){const _0x4c37c1=_0x1735ce;_0x3d3738[_0x4c37c1(0x141)](logRequest,{'type':_0x3d3738['yCKPi'],'connection':_0x3d3738[_0x4c37c1(0x12d)],'url':_0xac688d});}),_0x13010b[_0x1735ce(0x13e)](_0x3d3738[_0x1735ce(0x165)],function(_0x4db909){const _0x3fb91b=_0x1735ce;logRequest({'type':_0x3d3738[_0x3fb91b(0x144)],'connection':_0x3fb91b(0x125),'url':_0xac688d});}),_0x13010b[_0x1735ce(0x13e)](_0x3d3738[_0x1735ce(0x15a)],function(_0x1f7984){const _0x45dc53=_0x1735ce;_0x3d3738[_0x45dc53(0x18c)](logRequest,{'type':_0x3d3738['yCKPi'],'error':_0x1f7984[_0x45dc53(0x152)],'url':_0xac688d});}),_0x13010b;}};window[_0x2b972c(0x15d)]=new Proxy(window['WebSocket'],_0x4d248c);}}function monitorSendBeacon(){const _0x339ae7=_0x344a5d,_0x392cd4={'wquGW':_0x339ae7(0x167)},_0x1091fa=navigator[_0x339ae7(0x183)];_0x1091fa&&(navigator[_0x339ae7(0x183)]=function(_0x241763,_0x60cd0f){const _0x4878c8=_0x339ae7;return logRequest({'type':_0x4878c8(0x169),'url':_0x241763,'data':_0x60cd0f,'status':_0x392cd4[_0x4878c8(0x17c)]}),_0x1091fa[_0x4878c8(0x171)](this,arguments);});}function monitorJQueryAjax(){const _0x295ac3=_0x344a5d,_0x5d61a7={'DNHEX':function(_0x5eab85,_0x4f2da1){return _0x5eab85(_0x4f2da1);},'LjjWj':_0x295ac3(0x187)},_0x6f1375=window[_0x295ac3(0x13a)]?window[_0x295ac3(0x13a)][_0x295ac3(0x16a)]:window['$']?window['$'][_0x295ac3(0x16a)]:null;if(_0x6f1375){function _0xda62b6(..._0x4cdda){const _0x4fdf21=_0x295ac3,_0x373779=_0x4cdda[0x0],_0x509c21=_0x373779[_0x4fdf21(0x14a)]||_0x5d61a7['LjjWj'],_0x3180ec=_0x373779[_0x4fdf21(0x15b)],_0x41532a=_0x373779['data'],_0x513b4d=_0x6f1375['apply'](this,_0x4cdda);return _0x513b4d[_0x4fdf21(0x123)](function(_0x9e5b91){const _0x4b8063=_0x4fdf21;_0x5d61a7[_0x4b8063(0x13b)](logRequest,{'type':_0x4b8063(0x18f),'method':_0x509c21,'url':_0x3180ec,'status':_0x513b4d['status'],'response':formatResponse(_0x9e5b91),'headers':_0x513b4d[_0x4b8063(0x162)](),'data':_0x41532a});}),_0x513b4d;}window[_0x295ac3(0x13a)][_0x295ac3(0x16a)]?window['jQuery']['ajax']=_0xda62b6:window['$']['ajax']=_0xda62b6;}}function monitorAxios(){const _0x20f312=_0x344a5d,_0x5cbe6a={'rIbOS':'axios','cFEqA':_0x20f312(0x187)};if(window[_0x20f312(0x192)]){const _0x5dc665=window[_0x20f312(0x192)]['request'];window[_0x20f312(0x192)][_0x20f312(0x147)]=function(_0x419418){const _0x3b58e3=_0x20f312,_0x7c9d90=_0x419418[_0x3b58e3(0x13f)]||_0x5cbe6a[_0x3b58e3(0x130)],_0x543acd=_0x419418[_0x3b58e3(0x15b)],_0x3f3eae=_0x419418[_0x3b58e3(0x137)];return _0x5dc665['apply'](this,arguments)[_0x3b58e3(0x182)](_0x13c76b=>{const _0x4b0759=_0x3b58e3;return logRequest({'type':_0x5cbe6a[_0x4b0759(0x134)],'method':_0x7c9d90,'url':_0x543acd,'status':_0x13c76b[_0x4b0759(0x17e)],'response':formatResponse(_0x13c76b[_0x4b0759(0x137)]),'headers':_0x13c76b[_0x4b0759(0x17f)],'data':_0x3f3eae}),_0x13c76b;});};}}function detectPretender(){const _0x38c8cd=_0x344a5d,_0x5222e5={'Vedtm':_0x38c8cd(0x17a),'rtjIq':_0x38c8cd(0x13c),'rwnVD':'load','GPIkq':function(_0x149297,_0x4ff31d){return _0x149297(_0x4ff31d);}};function _0x4fff54(_0x4676cc,_0x23f4fd=0x64){const _0x4e1c0e=_0x38c8cd;_0x23f4fd<=maxWaitForPretenderTimeout&&(/fakerequest/i['test'](window?.['XMLHttpRequest']?.[_0x4e1c0e(0x11a)]||'')?_0x4676cc():setTimeout(()=>{_0x23f4fd+=0x64,_0x4fff54(_0x4676cc,_0x23f4fd);},_0x23f4fd));}_0x5222e5[_0x38c8cd(0x161)](_0x4fff54,()=>{const _0x473aa5=_0x38c8cd,_0x47735a={'IWSCh':_0x5222e5['Vedtm'],'KgtYM':_0x5222e5['rtjIq'],'gpXTw':_0x5222e5['rwnVD']},_0x11f22e=window['XMLHttpRequest'][_0x473aa5(0x11f)],_0xd5c05f=_0x11f22e[_0x473aa5(0x18e)],_0x3d9a61=_0x11f22e['send'];_0x11f22e['open']=function(_0x463292,_0x45f79c){const _0x36f8cd=_0x473aa5;return this[_0x36f8cd(0x122)]=_0x45f79c,this[_0x36f8cd(0x159)]=_0x463292,_0xd5c05f[_0x36f8cd(0x171)](this,arguments);},_0x11f22e['send']=function(_0x3ed020){const _0x483d43=_0x473aa5,_0x1b0777={'BEZTa':_0x47735a[_0x483d43(0x11c)],'FgOxr':function(_0x4d1a88,_0x5400c4){return _0x4d1a88(_0x5400c4);},'bvkVw':_0x47735a[_0x483d43(0x143)]},_0x3ece72=Date[_0x483d43(0x131)]();return this[_0x483d43(0x13e)](_0x47735a['gpXTw'],function(){const _0x57e6c0=_0x483d43,_0x268ba1=Date[_0x57e6c0(0x131)]()-_0x3ece72;let _0x243f5=this[_0x57e6c0(0x126)],_0x3e8ebf;switch(_0x243f5){case _0x1b0777[_0x57e6c0(0x189)]:_0x3e8ebf=this[_0x57e6c0(0x17b)];break;default:_0x3e8ebf=formatResponse(this[_0x57e6c0(0x127)]);break;}_0x1b0777[_0x57e6c0(0x120)](logRequest,{'type':_0x1b0777['bvkVw'],'method':this[_0x57e6c0(0x159)],'url':this['_url'],'status':this[_0x57e6c0(0x17e)],'response':_0x3e8ebf,'headers':this[_0x57e6c0(0x162)](),'duration':_0x268ba1});}),_0x3d9a61[_0x483d43(0x171)](this,arguments);};});}monitorXHR(),monitorFetch(),monitorWebSocket(),monitorSendBeacon(),monitorJQueryAjax(),monitorAxios(),detectPretender();}}catch(_0x1f3395){}