trimprompt 1.0.47 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/hooks/claude-hook.js +1 -1
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/postinstall.js +18 -12
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x2cfff2=a0_0x2139;(function(_0x98177f,_0x305c2b){const _0x1c9a05=a0_0x2139,_0x24ca70=_0x98177f();while(!![]){try{const _0x385103=parseInt(_0x1c9a05(0x121))/0x1+-parseInt(_0x1c9a05(0x110))/0x2*(parseInt(_0x1c9a05(0x132))/0x3)+parseInt(_0x1c9a05(0x12a))/0x4*(-parseInt(_0x1c9a05(0x130))/0x5)+parseInt(_0x1c9a05(0x12e))/0x6+parseInt(_0x1c9a05(0x11f))/0x7+parseInt(_0x1c9a05(0x108))/0x8*(-parseInt(_0x1c9a05(0x115))/0x9)+parseInt(_0x1c9a05(0x104))/0xa*(parseInt(_0x1c9a05(0x112))/0xb);if(_0x385103===_0x305c2b)break;else _0x24ca70['push'](_0x24ca70['shift']());}catch(_0x102a8b){_0x24ca70['push'](_0x24ca70['shift']());}}}(a0_0x5132,0x7e7c0));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x2cfff2(0x120)]=stripAnsi,exports[a0_0x2cfff2(0x11a)]=collapseDuplicates,exports[a0_0x2cfff2(0x125)]=collapseWhitespace,exports[a0_0x2cfff2(0x127)]=stripComments,exports[a0_0x2cfff2(0x116)]=smartCrushJson,exports[a0_0x2cfff2(0x128)]=softTruncate;function stripAnsi(_0x55f139){const _0x22378e=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x55f139['replace'](_0x22378e,'');}function collapseDuplicates(_0xebc775){const _0xec069e=a0_0x2cfff2,_0x5a7895=_0xebc775[_0xec069e(0x107)]('\x0a');if(_0x5a7895[_0xec069e(0x102)]<=0x1)return _0xebc775;const _0x24a759=[];let _0x35e200=_0x5a7895[0x0],_0x41c369=0x1;for(let _0x3279a3=0x1;_0x3279a3<_0x5a7895[_0xec069e(0x102)];_0x3279a3++){const _0x31ca94=_0x5a7895[_0x3279a3];_0x31ca94===_0x35e200&&_0x31ca94[_0xec069e(0x11b)]()['length']>0x0?_0x41c369++:(_0x41c369>0x1?_0x24a759[_0xec069e(0x11d)](_0x35e200+_0xec069e(0x126)+_0x41c369+']'):_0x24a759['push'](_0x35e200),_0x35e200=_0x31ca94,_0x41c369=0x1);}return _0x41c369>0x1?_0x24a759['push'](_0x35e200+_0xec069e(0x126)+_0x41c369+']'):_0x24a759[_0xec069e(0x11d)](_0x35e200),_0x24a759[_0xec069e(0x124)]('\x0a');}function collapseWhitespace(_0x5136d6){const _0x4c4a2a=a0_0x2cfff2;let _0x4d7c7d=_0x5136d6[_0x4c4a2a(0x105)](/[ \t]+$/gm,'');return _0x4d7c7d=_0x4d7c7d[_0x4c4a2a(0x105)](/\n{4,}/g,_0x4c4a2a(0x117)),_0x4d7c7d;}function a0_0x2139(_0x1bc9a9,_0x4ad073){_0x1bc9a9=_0x1bc9a9-0x102;const _0x5132fe=a0_0x5132();let _0x2139b4=_0x5132fe[_0x1bc9a9];return _0x2139b4;}function a0_0x5132(){const _0x4608c9=['\x20[x','stripComments','softTruncate','\x20key\x20fields)','548PogbyP','parse','dev','integrity','3836598MZebkS','\x20items,\x20','20255YALFjo','isArray','3YRTJiN','repository','length','object','340imuYIe','replace','engines','split','24eNMsYi','bugs','substring','\x20characters\x20of\x20output]\x20...\x0a','includes','funding','resolved','\x20fields,\x20showing\x20','1369412NwWTtm','slice','222310fNYPzV','signature','checksum','2733543kDBHPN','smartCrushJson','\x0a\x0a\x0a','\x20more\x20rows','test','collapseDuplicates','trim','toLowerCase','push','startsWith','4677498VRSXjs','stripAnsi','674167EXeENF','min','filter','join','collapseWhitespace'];a0_0x5132=function(){return _0x4608c9;};return a0_0x5132();}function stripComments(_0x45e674,_0x515101){const _0x2e64fa=a0_0x2cfff2;if(!_0x515101)return _0x45e674;const _0x3b3ab6=_0x45e674[_0x2e64fa(0x107)]('\x0a');if(_0x3b3ab6[_0x2e64fa(0x102)]<=0x96)return _0x45e674;const _0x317558={'.ts':/^\s*\/\//,'.js':/^\s*\/\//,'.tsx':/^\s*\/\//,'.jsx':/^\s*\/\//,'.py':/^\s*#(?!!)/,'.rb':/^\s*#(?!!)/,'.sh':/^\s*#(?!!)/,'.go':/^\s*\/\//,'.rs':/^\s*\/\//,'.java':/^\s*\/\//,'.c':/^\s*\/\//,'.cpp':/^\s*\/\//,'.cs':/^\s*\/\//,'.swift':/^\s*\/\//,'.kt':/^\s*\/\//,'.yaml':/^\s*#(?!!)/,'.yml':/^\s*#(?!!)/},_0x22998e=_0x317558[_0x515101[_0x2e64fa(0x11c)]()];if(!_0x22998e)return _0x45e674;const _0x40be50=_0x3b3ab6[_0x2e64fa(0x123)](_0x18f623=>!_0x22998e[_0x2e64fa(0x119)](_0x18f623));return _0x40be50[_0x2e64fa(0x124)]('\x0a');}function smartCrushJson(_0x3e4b52){const _0x4e196a=a0_0x2cfff2;try{const _0x4ee205=_0x3e4b52[_0x4e196a(0x11b)]();if(!_0x4ee205[_0x4e196a(0x11e)]('['))return null;const _0x211911=JSON[_0x4e196a(0x12b)](_0x4ee205);if(!Array[_0x4e196a(0x131)](_0x211911)||_0x211911[_0x4e196a(0x102)]<0x3)return null;if(typeof _0x211911[0x0]!==_0x4e196a(0x103)||_0x211911[0x0]===null)return null;const _0x2b669f=Object['keys'](_0x211911[0x0]);if(_0x2b669f[_0x4e196a(0x102)]===0x0)return null;const _0x15a473=_0x2b669f[_0x4e196a(0x123)](_0x5a1981=>{const _0x49a4f3=_0x4e196a,_0x767f14=_0x5a1981[_0x49a4f3(0x11c)]();return!_0x767f14[_0x49a4f3(0x10c)](_0x49a4f3(0x10e))&&!_0x767f14[_0x49a4f3(0x10c)](_0x49a4f3(0x12d))&&!_0x767f14['includes']('sha')&&!_0x767f14[_0x49a4f3(0x10c)]('hash')&&!_0x767f14[_0x49a4f3(0x10c)](_0x49a4f3(0x114))&&!_0x767f14[_0x49a4f3(0x10c)](_0x49a4f3(0x113))&&!_0x767f14[_0x49a4f3(0x10c)](_0x49a4f3(0x12c))&&_0x767f14!==_0x49a4f3(0x10d)&&_0x767f14!==_0x49a4f3(0x106)&&_0x767f14!==_0x49a4f3(0x109)&&_0x767f14!==_0x49a4f3(0x133);})[_0x4e196a(0x111)](0x0,0x6);if(_0x15a473[_0x4e196a(0x102)]===0x0)return null;const _0x151da7=[];_0x151da7[_0x4e196a(0x11d)](_0x15a473[_0x4e196a(0x124)]('|'));const _0xa599b9=0x1e;for(let _0x98ad80=0x0;_0x98ad80<Math[_0x4e196a(0x122)](_0x211911['length'],_0xa599b9);_0x98ad80++){const _0x4e7707=_0x15a473['map'](_0x101724=>{const _0xb67c8d=_0x4e196a,_0x3611a9=_0x211911[_0x98ad80][_0x101724];if(_0x3611a9===null||_0x3611a9===undefined)return'';if(typeof _0x3611a9===_0xb67c8d(0x103))return JSON['stringify'](_0x3611a9)[_0xb67c8d(0x10a)](0x0,0x28);return String(_0x3611a9)['substring'](0x0,0x3c);});_0x151da7[_0x4e196a(0x11d)](_0x4e7707[_0x4e196a(0x124)]('|'));}_0x211911[_0x4e196a(0x102)]>_0xa599b9&&_0x151da7[_0x4e196a(0x11d)]('...\x20+'+(_0x211911[_0x4e196a(0x102)]-_0xa599b9)+_0x4e196a(0x118));_0x151da7[_0x4e196a(0x11d)]('\x0a('+_0x211911[_0x4e196a(0x102)]+_0x4e196a(0x12f)+_0x2b669f[_0x4e196a(0x102)]+_0x4e196a(0x10f)+_0x15a473['length']+_0x4e196a(0x129));const _0x51ccd9=_0x151da7[_0x4e196a(0x124)]('\x0a');if(_0x51ccd9[_0x4e196a(0x102)]<_0x4ee205[_0x4e196a(0x102)])return _0x51ccd9;return null;}catch{return null;}}function softTruncate(_0x16487c,_0x201859=0x4e20){const _0x551329=a0_0x2cfff2;if(_0x16487c[_0x551329(0x102)]<=_0x201859)return _0x16487c;const _0x3f19da=_0x16487c[_0x551329(0x107)]('\x0a');if(_0x3f19da['length']<=0xc8)return _0x16487c;const _0x3fad7e=0x32,_0x274c99=0x96,_0x12bff2=_0x3f19da[_0x551329(0x111)](0x0,_0x3fad7e),_0x59552f=_0x3f19da[_0x551329(0x111)](_0x3f19da[_0x551329(0x102)]-_0x274c99),_0x4cb34c=_0x16487c[_0x551329(0x102)]-(_0x12bff2[_0x551329(0x124)]('\x0a')[_0x551329(0x102)]+_0x59552f[_0x551329(0x124)]('\x0a')[_0x551329(0x102)]);return[..._0x12bff2,'\x0a...\x20[TrimPrompt:\x20Truncated\x20'+_0x4cb34c+_0x551329(0x10b),..._0x59552f]['join']('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4c9636=a0_0x2402;(function(_0xb95ff7,_0x4050d9){const _0x4cbdac=a0_0x2402,_0x1dfb6f=_0xb95ff7();while(!![]){try{const _0x221b0f=parseInt(_0x4cbdac(0x175))/0x1+-parseInt(_0x4cbdac(0x15a))/0x2+parseInt(_0x4cbdac(0x159))/0x3*(-parseInt(_0x4cbdac(0x156))/0x4)+-parseInt(_0x4cbdac(0x148))/0x5+-parseInt(_0x4cbdac(0x144))/0x6*(-parseInt(_0x4cbdac(0x174))/0x7)+-parseInt(_0x4cbdac(0x152))/0x8*(-parseInt(_0x4cbdac(0x15f))/0x9)+parseInt(_0x4cbdac(0x14c))/0xa;if(_0x221b0f===_0x4050d9)break;else _0x1dfb6f['push'](_0x1dfb6f['shift']());}catch(_0x4af641){_0x1dfb6f['push'](_0x1dfb6f['shift']());}}}(a0_0x5288,0xb5326));function a0_0x5288(){const _0x59ed2a=['map','basename','diff\x20--git','2151835hSOyue','__esModule','No\x20modifications','[file]\x20','17282180rRnJRg','prototype','startsWith','+++','\x20\x20??\x20','push','8pAPtrh','Clean\x20working\x20tree','entries','---END---','76DCajzn','create','trim','225267oOuluf','1661096JtNHwd','\x20(+','slice','filterGitStatus','*\x20Branch:\x20','8608527nkwHDa','filter','call','/\x20(','split','dirname','__setModuleDefault','substring','unknown_file','defineProperty','\x0aChanges:','\x20untracked\x20files)','\x20\x20...\x20+','join','get','\x20lines\x20of\x20description)','__importStar','---','filterGitLog','getOwnPropertyNames','length','115073faFAzn','465604FmIwTx','filterGitDiff','hasOwnProperty','\x20\x20...\x20(+','\x0aUntracked\x20files:','replace','102ocDMpm'];a0_0x5288=function(){return _0x59ed2a;};return a0_0x5288();}function a0_0x2402(_0x3de264,_0x3a4277){_0x3de264=_0x3de264-0x140;const _0x5288b0=a0_0x5288();let _0x2402bf=_0x5288b0[_0x3de264];return _0x2402bf;}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x3716ca,_0x21ea31,_0x467af5,_0x5eb567){const _0x328cca=a0_0x2402;if(_0x5eb567===undefined)_0x5eb567=_0x467af5;var _0x3f5d15=Object['getOwnPropertyDescriptor'](_0x21ea31,_0x467af5);(!_0x3f5d15||(_0x328cca(0x16d)in _0x3f5d15?!_0x21ea31['__esModule']:_0x3f5d15['writable']||_0x3f5d15['configurable']))&&(_0x3f5d15={'enumerable':!![],'get':function(){return _0x21ea31[_0x467af5];}}),Object[_0x328cca(0x168)](_0x3716ca,_0x5eb567,_0x3f5d15);}:function(_0x562425,_0x1366c0,_0x50c3ee,_0x59cd56){if(_0x59cd56===undefined)_0x59cd56=_0x50c3ee;_0x562425[_0x59cd56]=_0x1366c0[_0x50c3ee];}),__setModuleDefault=this&&this[a0_0x4c9636(0x165)]||(Object[a0_0x4c9636(0x157)]?function(_0x24baf6,_0x5c1346){const _0x3a8b6d=a0_0x4c9636;Object[_0x3a8b6d(0x168)](_0x24baf6,'default',{'enumerable':!![],'value':_0x5c1346});}:function(_0x5c94e1,_0x555107){_0x5c94e1['default']=_0x555107;}),__importStar=this&&this[a0_0x4c9636(0x16f)]||(function(){var _0x444b10=function(_0x4a9ca4){const _0x1ccb82=a0_0x2402;return _0x444b10=Object[_0x1ccb82(0x172)]||function(_0x2c536c){const _0x17c4cd=_0x1ccb82;var _0x3cc9ff=[];for(var _0x106e98 in _0x2c536c)if(Object[_0x17c4cd(0x14d)][_0x17c4cd(0x140)][_0x17c4cd(0x161)](_0x2c536c,_0x106e98))_0x3cc9ff[_0x3cc9ff[_0x17c4cd(0x173)]]=_0x106e98;return _0x3cc9ff;},_0x444b10(_0x4a9ca4);};return function(_0x3b3fb3){const _0xe3ad70=a0_0x2402;if(_0x3b3fb3&&_0x3b3fb3[_0xe3ad70(0x149)])return _0x3b3fb3;var _0x36a194={};if(_0x3b3fb3!=null){for(var _0x468ecc=_0x444b10(_0x3b3fb3),_0x4b531b=0x0;_0x4b531b<_0x468ecc['length'];_0x4b531b++)if(_0x468ecc[_0x4b531b]!=='default')__createBinding(_0x36a194,_0x3b3fb3,_0x468ecc[_0x4b531b]);}return __setModuleDefault(_0x36a194,_0x3b3fb3),_0x36a194;};}());Object[a0_0x4c9636(0x168)](exports,a0_0x4c9636(0x149),{'value':!![]}),exports[a0_0x4c9636(0x15d)]=filterGitStatus,exports[a0_0x4c9636(0x171)]=filterGitLog,exports[a0_0x4c9636(0x176)]=filterGitDiff;const path=__importStar(require('path'));function filterGitStatus(_0x300db1){const _0x1748c7=a0_0x4c9636,_0x458567=_0x300db1['split']('\x0a')['map'](_0x521a22=>_0x521a22[_0x1748c7(0x158)]())['filter'](_0x1a2f61=>_0x1a2f61[_0x1748c7(0x173)]>0x0);if(_0x458567[_0x1748c7(0x173)]===0x0)return _0x1748c7(0x153);const _0x347e64=[],_0x3eab88=[],_0x4193d0=[];for(const _0x4f3cad of _0x458567){if(_0x4f3cad[_0x1748c7(0x14e)]('##')){const _0x46fd88=_0x4f3cad[_0x1748c7(0x143)](/^##\s*/,'');_0x347e64['push'](_0x1748c7(0x15e)+_0x46fd88);}else _0x4f3cad[_0x1748c7(0x14e)]('??')?_0x3eab88['push'](_0x4f3cad[_0x1748c7(0x166)](0x3)[_0x1748c7(0x158)]()):_0x4193d0[_0x1748c7(0x151)](_0x4f3cad);}_0x4193d0[_0x1748c7(0x173)]>0x0&&(_0x347e64['push'](_0x1748c7(0x169)),_0x347e64[_0x1748c7(0x151)](..._0x4193d0[_0x1748c7(0x145)](_0x6248f8=>'\x20\x20'+_0x6248f8)));if(_0x3eab88[_0x1748c7(0x173)]>0x0){_0x347e64[_0x1748c7(0x151)](_0x1748c7(0x142));const _0x5297bd={},_0x40a3a9=[];for(const _0x456a88 of _0x3eab88){const _0xd60f5d=path[_0x1748c7(0x164)](_0x456a88);_0xd60f5d==='.'||_0xd60f5d===''?_0x40a3a9[_0x1748c7(0x151)](_0x456a88):(!_0x5297bd[_0xd60f5d]&&(_0x5297bd[_0xd60f5d]=[]),_0x5297bd[_0xd60f5d][_0x1748c7(0x151)](path[_0x1748c7(0x146)](_0x456a88)));}for(const [_0x32e9c2,_0x2f8658]of Object[_0x1748c7(0x154)](_0x5297bd)){if(_0x2f8658['length']>0x5)_0x347e64['push'](_0x1748c7(0x150)+_0x32e9c2+_0x1748c7(0x162)+_0x2f8658[_0x1748c7(0x173)]+_0x1748c7(0x16a));else for(const _0x3764da of _0x2f8658){_0x347e64[_0x1748c7(0x151)](_0x1748c7(0x150)+path[_0x1748c7(0x16c)](_0x32e9c2,_0x3764da));}}for(const _0x522f47 of _0x40a3a9){_0x347e64[_0x1748c7(0x151)](_0x1748c7(0x150)+_0x522f47);}}return _0x347e64['join']('\x0a');}function filterGitLog(_0x3e693b){const _0x3f0b21=a0_0x4c9636,_0x30562a=_0x3e693b[_0x3f0b21(0x163)](_0x3f0b21(0x155))['map'](_0x112ebc=>_0x112ebc['trim']())[_0x3f0b21(0x160)](_0x4c252d=>_0x4c252d[_0x3f0b21(0x173)]>0x0);if(_0x30562a['length']===0x0)return _0x3e693b;const _0x1d6412=[];for(const _0xde4443 of _0x30562a){const _0x59065a=_0xde4443[_0x3f0b21(0x163)]('\x0a'),_0x35cbca=_0x59065a[0x0]||'',_0x3c6843=_0x59065a[_0x3f0b21(0x15c)](0x1)[_0x3f0b21(0x145)](_0x4c1f04=>_0x4c1f04[_0x3f0b21(0x158)]())[_0x3f0b21(0x160)](_0x5c80a6=>_0x5c80a6['length']>0x0);_0x1d6412[_0x3f0b21(0x151)]('-\x20'+_0x35cbca),_0x3c6843[_0x3f0b21(0x173)]>0x0&&(_0x1d6412[_0x3f0b21(0x151)]('\x20\x20'+_0x3c6843[0x0]),_0x3c6843['length']>0x1&&_0x1d6412['push'](_0x3f0b21(0x141)+(_0x3c6843['length']-0x1)+_0x3f0b21(0x16e)));}return _0x1d6412[_0x3f0b21(0x16c)]('\x0a');}function filterGitDiff(_0x4c86c1){const _0x159680=a0_0x4c9636,_0x2a25fb=_0x4c86c1[_0x159680(0x163)]('\x0a'),_0x31e476=[];let _0x4e1e2b='',_0x3bf668=0x0,_0x457abf=0x0,_0x2d8d5a=[];const _0x46c7ce=()=>{const _0x3e6c20=_0x159680;if(_0x4e1e2b&&(_0x3bf668>0x0||_0x457abf>0x0)){_0x31e476[_0x3e6c20(0x151)](_0x3e6c20(0x14b)+_0x4e1e2b+_0x3e6c20(0x15b)+_0x3bf668+'\x20-'+_0x457abf+')');const _0x311264=0xa,_0x1857f8=_0x2d8d5a[_0x3e6c20(0x15c)](0x0,_0x311264);for(const _0x15f248 of _0x1857f8){_0x31e476[_0x3e6c20(0x151)]('\x20\x20'+_0x15f248);}const _0x5c20b1=_0x3bf668+_0x457abf-_0x311264;_0x5c20b1>0x0&&_0x31e476[_0x3e6c20(0x151)](_0x3e6c20(0x16b)+_0x5c20b1+'\x20more\x20modifications');}_0x3bf668=0x0,_0x457abf=0x0,_0x2d8d5a=[];};for(const _0x457946 of _0x2a25fb){if(_0x457946[_0x159680(0x14e)](_0x159680(0x147))){_0x46c7ce();const _0x262307=_0x457946['match'](/\sb\/(.+)$/);_0x4e1e2b=_0x262307?_0x262307[0x1]:_0x159680(0x167);}else{if(_0x457946[_0x159680(0x14e)]('+')&&!_0x457946['startsWith'](_0x159680(0x14f)))_0x3bf668++,_0x2d8d5a['push'](_0x457946);else _0x457946[_0x159680(0x14e)]('-')&&!_0x457946['startsWith'](_0x159680(0x170))&&(_0x457abf++,_0x2d8d5a[_0x159680(0x151)](_0x457946));}}_0x46c7ce();const _0x4bfd3b=_0x31e476['join']('\x0a');return _0x4bfd3b['length']>0x0?_0x4bfd3b:_0x159680(0x14a);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x4ada(_0xa9a087,_0x151c62){_0xa9a087=_0xa9a087-0x86;const _0x4e1a28=a0_0x4e1a();let _0x4ada10=_0x4e1a28[_0xa9a087];return _0x4ada10;}const a0_0x2cb70e=a0_0x4ada;(function(_0x4a2e48,_0x572d3b){const _0x23ae06=a0_0x4ada,_0x3ebec8=_0x4a2e48();while(!![]){try{const _0x23767f=parseInt(_0x23ae06(0xa6))/0x1+-parseInt(_0x23ae06(0x95))/0x2+parseInt(_0x23ae06(0x9c))/0x3+-parseInt(_0x23ae06(0xa5))/0x4+-parseInt(_0x23ae06(0xa0))/0x5+parseInt(_0x23ae06(0x9b))/0x6+-parseInt(_0x23ae06(0x9a))/0x7*(-parseInt(_0x23ae06(0xab))/0x8);if(_0x23767f===_0x572d3b)break;else _0x3ebec8['push'](_0x3ebec8['shift']());}catch(_0x4b3834){_0x3ebec8['push'](_0x3ebec8['shift']());}}}(a0_0x4e1a,0xbe13d));function a0_0x4e1a(){const _0x100848=['3294705upRuWA','Go\x20test:\x20','PASS','slice','2727040woCzlL','includes','join','===\x20RUN','trim','4508660pKUUtZ','260861EHERlb','Go\x20test:\x20all\x20tests\x20passed','filterGoTest','---\x20SKIP:','Go\x20vet:\x20','2904MDhozf','push','\x20more\x20issues','length','\x20more\x20failures','FAIL','\x0aFailures:','\x20\x20...\x20+','\x20skipped','\x20failed,\x20','lines','\x20more\x20lines','match','\x20\x20\x20\x20','startsWith','no\x20test\x20files','split','name','2521590eHJqqZ','\x20issues\x20found','Go\x20vet:\x20no\x20issues\x20found','\x20passed,\x20','__esModule','31199bSVVmh','4409628lypeDU'];a0_0x4e1a=function(){return _0x100848;};return a0_0x4e1a();}Object['defineProperty'](exports,a0_0x2cb70e(0x99),{'value':!![]}),exports[a0_0x2cb70e(0xa8)]=filterGoTest,exports['filterGoVet']=filterGoVet;function filterGoTest(_0x4c956b){const _0x2342f4=a0_0x2cb70e,_0x195ee2=_0x4c956b[_0x2342f4(0x93)]('\x0a');let _0x522774=0x0,_0x86868b=0x0,_0x2fafba=0x0;const _0x1d7ea7=[],_0x147352=[];let _0x59a49a=null;for(const _0x896ac3 of _0x195ee2){const _0x474874=_0x896ac3[_0x2342f4(0xa4)](),_0x4175c7=_0x474874[_0x2342f4(0x8f)](/^ok\s+\S+\s+[\d.]+s/);if(_0x4175c7){_0x147352[_0x2342f4(0xac)](_0x474874);continue;}const _0x53e508=_0x474874[_0x2342f4(0x8f)](/^FAIL\s+\S+/);if(_0x53e508){_0x147352[_0x2342f4(0xac)](_0x474874);continue;}const _0x5ad69=_0x474874['match'](/^--- PASS:/);if(_0x5ad69){_0x522774++;continue;}const _0x5ea841=_0x474874[_0x2342f4(0x8f)](/^--- FAIL:\s+(\S+)/);if(_0x5ea841){if(_0x59a49a)_0x1d7ea7[_0x2342f4(0xac)](_0x59a49a);_0x59a49a={'name':_0x5ea841[0x1],'lines':[]},_0x86868b++;continue;}if(_0x474874[_0x2342f4(0x91)](_0x2342f4(0xa9))){_0x2fafba++;continue;}_0x59a49a&&_0x474874['length']>0x0&&!_0x474874['startsWith']('===\x20RUN')&&_0x59a49a[_0x2342f4(0x8d)][_0x2342f4(0xac)](_0x896ac3),_0x474874[_0x2342f4(0x91)](_0x2342f4(0xa3))&&(_0x59a49a&&(_0x1d7ea7[_0x2342f4(0xac)](_0x59a49a),_0x59a49a=null));}if(_0x59a49a)_0x1d7ea7[_0x2342f4(0xac)](_0x59a49a);if(_0x522774===0x0&&_0x86868b===0x0&&_0x2fafba===0x0){if(_0x4c956b[_0x2342f4(0xa1)](_0x2342f4(0x9e))&&!_0x4c956b[_0x2342f4(0xa1)](_0x2342f4(0x88)))return _0x2342f4(0xa7);if(_0x4c956b['includes'](_0x2342f4(0x92)))return'Go\x20test:\x20no\x20test\x20files';return _0x4c956b;}if(_0x86868b===0x0){const _0x1613ce=[_0x2342f4(0x9d)+_0x522774+'\x20passed'];if(_0x2fafba>0x0)_0x1613ce[_0x2342f4(0xac)](_0x2fafba+_0x2342f4(0x8b));return _0x1613ce[_0x2342f4(0xa2)](',\x20');}const _0x13c93f=[_0x2342f4(0x9d)+_0x522774+_0x2342f4(0x98)+_0x86868b+_0x2342f4(0x8c)+_0x2fafba+_0x2342f4(0x8b)];if(_0x1d7ea7[_0x2342f4(0x86)]>0x0){_0x13c93f['push'](_0x2342f4(0x89));const _0x11b690=0x3;for(let _0x325cf8=0x0;_0x325cf8<Math['min'](_0x1d7ea7[_0x2342f4(0x86)],_0x11b690);_0x325cf8++){const _0x437e84=_0x1d7ea7[_0x325cf8];_0x13c93f[_0x2342f4(0xac)]('\x20\x20'+(_0x325cf8+0x1)+'.\x20'+_0x437e84[_0x2342f4(0x94)]);for(const _0x575118 of _0x437e84[_0x2342f4(0x8d)][_0x2342f4(0x9f)](0x0,0x5)){_0x13c93f[_0x2342f4(0xac)](_0x2342f4(0x90)+_0x575118[_0x2342f4(0xa4)]());}_0x437e84[_0x2342f4(0x8d)][_0x2342f4(0x86)]>0x5&&_0x13c93f['push']('\x20\x20\x20\x20...\x20+'+(_0x437e84[_0x2342f4(0x8d)][_0x2342f4(0x86)]-0x5)+_0x2342f4(0x8e));}_0x1d7ea7[_0x2342f4(0x86)]>_0x11b690&&_0x13c93f[_0x2342f4(0xac)](_0x2342f4(0x8a)+(_0x1d7ea7[_0x2342f4(0x86)]-_0x11b690)+_0x2342f4(0x87));}return _0x13c93f['join']('\x0a');}function filterGoVet(_0x14c2a3){const _0x4ce619=a0_0x2cb70e,_0xe6d04a=_0x14c2a3[_0x4ce619(0x93)]('\x0a')['filter'](_0x4c5745=>_0x4c5745[_0x4ce619(0xa4)]()['length']>0x0);if(_0xe6d04a[_0x4ce619(0x86)]===0x0)return _0x4ce619(0x97);if(_0xe6d04a[_0x4ce619(0x86)]<=0x14)return _0x14c2a3['trim']();const _0x3dd676=[_0x4ce619(0xaa)+_0xe6d04a[_0x4ce619(0x86)]+_0x4ce619(0x96)];return _0x3dd676[_0x4ce619(0xac)](..._0xe6d04a['slice'](0x0,0xa)),_0xe6d04a[_0x4ce619(0x86)]>0xa&&_0x3dd676[_0x4ce619(0xac)]('...\x20+'+(_0xe6d04a[_0x4ce619(0x86)]-0xa)+_0x4ce619(0xad)),_0x3dd676['join']('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x978ce5=a0_0x3f8c;(function(_0x55c4b6,_0x525665){const _0x4e08ba=a0_0x3f8c,_0x514f2f=_0x55c4b6();while(!![]){try{const _0x14423e=parseInt(_0x4e08ba(0xf0))/0x1+parseInt(_0x4e08ba(0xe8))/0x2+-parseInt(_0x4e08ba(0x12e))/0x3*(parseInt(_0x4e08ba(0xfa))/0x4)+parseInt(_0x4e08ba(0x121))/0x5+-parseInt(_0x4e08ba(0x12a))/0x6+-parseInt(_0x4e08ba(0xdf))/0x7+-parseInt(_0x4e08ba(0x147))/0x8*(-parseInt(_0x4e08ba(0x142))/0x9);if(_0x14423e===_0x525665)break;else _0x514f2f['push'](_0x514f2f['shift']());}catch(_0x1f8ba4){_0x514f2f['push'](_0x514f2f['shift']());}}}(a0_0x8923,0x27646));function a0_0x3f8c(_0x2a584a,_0x20a5cd){_0x2a584a=_0x2a584a-0xdd;const _0x89233c=a0_0x8923();let _0x3f8c52=_0x89233c[_0x2a584a];return _0x3f8c52;}Object['defineProperty'](exports,a0_0x978ce5(0xf1),{'value':!![]}),exports[a0_0x978ce5(0x13e)]=exports[a0_0x978ce5(0x101)]=void 0x0,exports[a0_0x978ce5(0xde)]=compressOutput,exports['rewriteCommand']=rewriteCommand;const generic_1=require(a0_0x978ce5(0x120)),git_1=require(a0_0x978ce5(0x11a)),python_1=require(a0_0x978ce5(0x11d)),js_1=require('./js'),shell_1=require(a0_0x978ce5(0xed)),rust_1=require(a0_0x978ce5(0x10e)),go_1=require(a0_0x978ce5(0xe9)),devops_1=require(a0_0x978ce5(0x10d)),redactor_1=require(a0_0x978ce5(0xeb)),tracker_1=require('../tracker');exports[a0_0x978ce5(0x101)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x978ce5(0x13e)]=[];function isFeatureEnabled(_0x4dbd49){const _0x5b5016=a0_0x978ce5;try{const _0x37e987=tracker_1[_0x5b5016(0x10f)][_0x5b5016(0x127)](),_0x5f876a=_0x37e987['features_enabled'];if(!_0x5f876a||_0x5f876a[_0x4dbd49]===undefined)return!![];return _0x5f876a[_0x4dbd49]!==![];}catch{return!![];}}function compressOutput(_0x4140b3,_0x2065eb,_0x59a807,_0x5819f4=!![]){const _0x616ef8=a0_0x978ce5,_0x587eb5=_0x4140b3[_0x616ef8(0x136)]();let _0xcb95e=_0x2065eb;_0x59a807[_0x616ef8(0x136)]()[_0x616ef8(0x138)]>0x0&&(_0xcb95e=_0x2065eb+'\x0a'+_0x59a807);let _0x528394=isFeatureEnabled(_0x616ef8(0x11e))?(0x0,generic_1[_0x616ef8(0x11c)])(_0xcb95e):_0xcb95e;const _0x164af3=[];if(_0x528394[_0x616ef8(0x138)]<_0xcb95e[_0x616ef8(0x138)])_0x164af3[_0x616ef8(0x125)](_0x616ef8(0x11e));const _0x1edfaf=(_0x23329e,_0x3fae27)=>{const _0x4e2bcd=_0x616ef8;return _0x164af3[_0x4e2bcd(0x125)](_0x23329e),exports[_0x4e2bcd(0x13e)]=_0x164af3,_0x3fae27;};if(_0x5819f4&&isFeatureEnabled('redact')){const _0x59dd36=redactor_1[_0x616ef8(0x13b)][_0x616ef8(0x10b)](_0x528394);_0x528394=_0x59dd36[_0x616ef8(0x140)],exports['lastRedactAudit']={'secretsFound':_0x59dd36[_0x616ef8(0x119)],'secretTypes':_0x59dd36[_0x616ef8(0x126)]};if(_0x59dd36['secretsFound']>0x0)_0x164af3[_0x616ef8(0x125)]('redact');}else exports[_0x616ef8(0x101)]={'secretsFound':0x0,'secretTypes':[]};const _0x4c0735=_0x587eb5[_0x616ef8(0x113)](),_0x19c46a=isFeatureEnabled(_0x616ef8(0x13c));try{if(_0x19c46a){if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x14b))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x12d)))return _0x1edfaf('filter',(0x0,git_1[_0x616ef8(0x134)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x131))||_0x4c0735['includes'](_0x616ef8(0xe2)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,git_1['filterGitLog'])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x146))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0xe7))||_0x4c0735['includes'](_0x616ef8(0x130)))return _0x1edfaf('filter',(0x0,git_1[_0x616ef8(0xfc)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x12f))||_0x4c0735[_0x616ef8(0xe0)](/python3?\s+-m\s+pytest/))return _0x1edfaf('filter',(0x0,python_1[_0x616ef8(0x11b)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x112))||_0x4c0735['includes'](_0x616ef8(0xe3)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,python_1[_0x616ef8(0x104)])(_0x528394));if(_0x4c0735['includes'](_0x616ef8(0x12b))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x143)))return _0x1edfaf('filter',(0x0,devops_1[_0x616ef8(0xf9)])(_0x528394));if(_0x4c0735['includes'](_0x616ef8(0xf2))||_0x4c0735[_0x616ef8(0x14d)]('npm\x20i\x20')||_0x4c0735['endsWith'](_0x616ef8(0x107))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x122))||_0x4c0735['includes'](_0x616ef8(0x105)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,js_1[_0x616ef8(0x144)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x132))||_0x4c0735[_0x616ef8(0x14d)]('vitest'))return _0x1edfaf('filter',(0x0,js_1[_0x616ef8(0x117)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)]('npm\x20test')||_0x4c0735['includes']('pnpm\x20test')||_0x4c0735['includes'](_0x616ef8(0xee))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x108)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,js_1[_0x616ef8(0x117)])(_0x528394));if(_0x4c0735['includes']('cargo\x20test'))return _0x1edfaf(_0x616ef8(0x13c),(0x0,rust_1[_0x616ef8(0x149)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x14c))||_0x4c0735['includes'](_0x616ef8(0xdd))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0xfb)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,rust_1[_0x616ef8(0x145)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)]('go\x20test'))return _0x1edfaf(_0x616ef8(0x13c),(0x0,go_1[_0x616ef8(0x102)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x124)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,go_1['filterGoVet'])(_0x528394));if(_0x4c0735[_0x616ef8(0xe0)](/docker\s+ps/))return _0x1edfaf('filter',(0x0,devops_1[_0x616ef8(0xf4)])(_0x528394));if(_0x4c0735[_0x616ef8(0xe0)](/docker\s+images/))return _0x1edfaf(_0x616ef8(0x13c),(0x0,devops_1[_0x616ef8(0x148)])(_0x528394));if(_0x4c0735['match'](/docker\s+logs/))return _0x1edfaf(_0x616ef8(0x13c),(0x0,devops_1['filterDockerLogs'])(_0x528394));if(_0x4c0735['includes'](_0x616ef8(0xea))){const _0x4d3492=_0x4c0735[_0x616ef8(0xe0)](/kubectl\s+(get|logs|describe|apply)/),_0xca8aca=_0x4d3492?_0x4d3492[0x1]:_0x616ef8(0x129);return _0x1edfaf('filter',(0x0,devops_1[_0x616ef8(0x103)])(_0x528394,_0xca8aca));}if(_0x4c0735[_0x616ef8(0xe0)](/^(ls|dir)(\s|$)/)||_0x4c0735[_0x616ef8(0x14d)]('\x20ls\x20')||_0x4c0735[_0x616ef8(0x12c)](_0x616ef8(0xe5)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,shell_1['filterLs'])(_0x528394));if(_0x4c0735[_0x616ef8(0xe0)](/^tree(\s|$)/)||_0x4c0735['includes'](_0x616ef8(0x100))||_0x4c0735[_0x616ef8(0x12c)](_0x616ef8(0xf8)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,shell_1[_0x616ef8(0xe6)])(_0x528394));if(_0x4c0735['match'](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x204df1=(0x0,shell_1['filterCat'])(_0x528394,_0x587eb5);if(_0x204df1[_0x616ef8(0x14d)](_0x616ef8(0x13f)))_0x164af3['push'](_0x616ef8(0x123));else{if(_0x204df1[_0x616ef8(0x14d)]('[binary')||_0x204df1[_0x616ef8(0x14d)]('[minified\x20file]'))_0x164af3['push'](_0x616ef8(0x106));else{if(_0x204df1[_0x616ef8(0x14d)](_0x616ef8(0x13a)))_0x164af3[_0x616ef8(0x125)](_0x616ef8(0xf5));else{if(_0x204df1[_0x616ef8(0x14d)]('|\x20')&&_0x204df1[_0x616ef8(0x14d)](_0x616ef8(0x14a))&&_0x204df1[_0x616ef8(0x138)]<_0x528394[_0x616ef8(0x138)]*0.5)_0x164af3[_0x616ef8(0x125)](_0x616ef8(0xe1));else{if(_0x204df1['includes'](_0x616ef8(0xec)))_0x164af3['push'](_0x616ef8(0x13c));}}}}if(_0x204df1[_0x616ef8(0x138)]<_0x528394[_0x616ef8(0x138)]&&!_0x164af3['some'](_0x260739=>_0x260739!==_0x616ef8(0x11e)&&_0x260739!==_0x616ef8(0x116)))_0x164af3[_0x616ef8(0x125)](_0x616ef8(0x13c));return exports[_0x616ef8(0x13e)]=_0x164af3,_0x204df1;}if(_0x4c0735[_0x616ef8(0xe0)](/^find(\s|$)/))return _0x1edfaf('filter',(0x0,shell_1[_0x616ef8(0xfe)])(_0x528394));if(_0x4c0735['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x1edfaf(_0x616ef8(0x13c),(0x0,shell_1[_0x616ef8(0xf7)])(_0x528394));}}catch(_0xccf632){}return isFeatureEnabled('whitespace')&&(_0x528394=(0x0,generic_1['collapseWhitespace'])(_0x528394),_0x164af3[_0x616ef8(0x125)](_0x616ef8(0x139))),_0x528394=(0x0,generic_1['collapseDuplicates'])(_0x528394),_0x528394=(0x0,generic_1[_0x616ef8(0x11f)])(_0x528394,0x4e20),exports[_0x616ef8(0x13e)]=_0x164af3,_0x528394;}function a0_0x8923(){const _0x4507df=['[lock\x20file]','text','trim\x20grep','4025772FDwzRe','ruff\x20','filterNpmInstall','filterCargoBuild','git\x20diff','8QubydE','filterDockerImages','filterCargoTest','---','git\x20status','cargo\x20build','includes','cargo\x20check','compressOutput','2141951MBoPbV','match','json_crusher','yadm\x20log','pip3\x20install','trim\x20pip','\x20ls','filterTree','git\x20show','132448EGazhY','./go','kubectl','../redactor','lines\x20truncated','./shell','yarn\x20test','trim\x20pnpm','240150NqMzQy','__esModule','npm\x20install','trim\x20gh','filterDockerPs','skeleton','trim\x20cargo','filterGrep','\x20tree','filterRuff','12hJIqdx','cargo\x20clippy','filterGitDiff','trim\x20git','filterFind','trim\x20pytest','\x20tree\x20','lastRedactAudit','filterGoTest','filterKubectl','filterPipInstall','yarn\x20install','binary','npm\x20i','npm\x20run\x20test','trim\x20tree','trim\x20glab','redactWithAudit','trim\x20docker','./devops','./rust','tracker','trim\x20','trim\x20find','pip\x20install','toLowerCase','trim\x20ruff','test','redact','filterJestVitest','trim\x20read','secretsFound','./git','filterPytest','stripAnsi','./python','ansi_strip','softTruncate','./generic','528740ZCdImy','pnpm\x20install','lock','go\x20vet','push','secretTypes','getConfig','trim\x20go','get','1671024dnRyhQ','ruff\x20check','endsWith','yadm\x20status','113583Bavhky','pytest','yadm\x20diff','git\x20log','jest','trim\x20npm','filterGitStatus','trim\x20kubectl','trim','pattern','length','whitespace','[code\x20skeleton]','redactor','filter','trim\x20ls','lastFeatures'];a0_0x8923=function(){return _0x4507df;};return a0_0x8923();}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x978ce5(0xfd)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x978ce5(0xf3)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x978ce5(0x10a)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x978ce5(0xf6)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x978ce5(0xef)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x978ce5(0x133)},{'pattern':/^npx\s+/,'prefix':'trim\x20npx'},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x978ce5(0x118)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x978ce5(0x141)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x978ce5(0x13d)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x978ce5(0x109)},{'pattern':/^find\s+/,'prefix':a0_0x978ce5(0x111)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x978ce5(0x10c)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x978ce5(0x135)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x978ce5(0xff)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x978ce5(0x114)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x978ce5(0xe4)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x978ce5(0x128)}];function rewriteCommand(_0x44823b){const _0x5c871f=a0_0x978ce5,_0x95657d=_0x44823b[_0x5c871f(0x136)]();if(_0x95657d['startsWith'](_0x5c871f(0x110)))return _0x95657d;for(const _0x348eed of REWRITE_RULES){if(_0x348eed[_0x5c871f(0x137)][_0x5c871f(0x115)](_0x95657d))return'trim\x20'+_0x95657d;}return _0x95657d;}
|
|
1
|
+
'use strict';const a0_0x22314e=a0_0x3509;(function(_0xa74e73,_0x5bb294){const _0x484b98=a0_0x3509,_0x5bb8c8=_0xa74e73();while(!![]){try{const _0x1129bf=-parseInt(_0x484b98(0xf7))/0x1*(parseInt(_0x484b98(0xf9))/0x2)+-parseInt(_0x484b98(0xef))/0x3+parseInt(_0x484b98(0x124))/0x4+parseInt(_0x484b98(0xf0))/0x5+parseInt(_0x484b98(0x12c))/0x6+-parseInt(_0x484b98(0x125))/0x7*(-parseInt(_0x484b98(0xeb))/0x8)+-parseInt(_0x484b98(0x126))/0x9*(parseInt(_0x484b98(0x11e))/0xa);if(_0x1129bf===_0x5bb294)break;else _0x5bb8c8['push'](_0x5bb8c8['shift']());}catch(_0x5e9df5){_0x5bb8c8['push'](_0x5bb8c8['shift']());}}}(a0_0x4f9a,0x1e8bf));Object['defineProperty'](exports,a0_0x22314e(0xfc),{'value':!![]}),exports[a0_0x22314e(0x113)]=exports[a0_0x22314e(0x132)]=void 0x0,exports['compressOutput']=compressOutput,exports[a0_0x22314e(0x146)]=rewriteCommand;const generic_1=require('./generic'),git_1=require('./git'),python_1=require('./python'),js_1=require(a0_0x22314e(0x13c)),shell_1=require(a0_0x22314e(0x13d)),rust_1=require('./rust'),go_1=require(a0_0x22314e(0x12b)),devops_1=require(a0_0x22314e(0x135)),redactor_1=require(a0_0x22314e(0x133)),tracker_1=require(a0_0x22314e(0x10a));exports[a0_0x22314e(0x132)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x22314e(0x113)]=[];function a0_0x3509(_0x463ee4,_0x55badf){_0x463ee4=_0x463ee4-0xdf;const _0x4f9ae3=a0_0x4f9a();let _0x35093d=_0x4f9ae3[_0x463ee4];return _0x35093d;}function a0_0x4f9a(){const _0x61471f=['./shell','filterGitDiff','getConfig','yadm\x20log','redact','startsWith','ansi_strip','trim','trim\x20docker','rewriteCommand','npm\x20test','yarn\x20install','features_enabled','npm\x20install','some','collapseDuplicates','trim\x20cargo','[code\x20skeleton]','trim\x20pnpm','filterNpmInstall','trim\x20ls','filterDockerPs','tracker','trim\x20glab','928giGVtZ','trim\x20kubectl','get','npm\x20i','280005NcaasT','591775vpuKXJ','go\x20test','endsWith','trim\x20ruff','redactWithAudit','match','test','1vnBiQS','toLowerCase','256730yohLde','vitest','pip3\x20install','__esModule','filterLs','pip\x20install','yarn\x20test','filter','includes','filterGrep','\x20tree\x20','length','push','filterGoTest','ruff\x20','trim\x20pytest','text','../tracker','filterGoVet','npm\x20run\x20test','lock','yadm\x20status','trim\x20gh','redactor','\x20ls','trim\x20grep','lastFeatures','git\x20diff','cargo\x20build','[minified\x20file]','cargo\x20test','whitespace','trim\x20git','filterJestVitest','json_crusher','pnpm\x20test','filterRuff','50rVCSPk','skeleton','trim\x20read','filterCargoTest','trim\x20pip','secretsFound','839800sRDbzy','8561AtaLlG','665208tsvcMV','lines\x20truncated','filterTree','filterDockerLogs','filterGitLog','./go','1477236pAcOwz','softTruncate','trim\x20go','filterDockerImages','collapseWhitespace','filterFind','lastRedactAudit','../redactor','binary','./devops','cargo\x20clippy','trim\x20npx','---','filterCat','secretTypes','\x20tree','./js'];a0_0x4f9a=function(){return _0x61471f;};return a0_0x4f9a();}function isFeatureEnabled(_0x24c968){const _0x56730b=a0_0x22314e;try{const _0xa0d49b=tracker_1[_0x56730b(0xe9)][_0x56730b(0x13f)](),_0x20c94a=_0xa0d49b[_0x56730b(0xdf)];if(!_0x20c94a||_0x20c94a[_0x24c968]===undefined)return!![];return _0x20c94a[_0x24c968]!==![];}catch{return!![];}}function compressOutput(_0x5e7bf3,_0x5700b6,_0x12800a,_0x211491=!![]){const _0x4d2b16=a0_0x22314e,_0x31463c=_0x5e7bf3['trim']();let _0x382766=_0x5700b6;_0x12800a[_0x4d2b16(0x144)]()[_0x4d2b16(0x104)]>0x0&&(_0x382766=_0x5700b6+'\x0a'+_0x12800a);let _0x4efbc5=isFeatureEnabled('ansi_strip')?(0x0,generic_1['stripAnsi'])(_0x382766):_0x382766;const _0x554b28=[];if(_0x4efbc5['length']<_0x382766[_0x4d2b16(0x104)])_0x554b28[_0x4d2b16(0x105)](_0x4d2b16(0x143));const _0x42d0ed=(_0x475109,_0xf7f92b)=>{const _0x392dd4=_0x4d2b16;return _0x554b28[_0x392dd4(0x105)](_0x475109),exports[_0x392dd4(0x113)]=_0x554b28,_0xf7f92b;};if(_0x211491&&isFeatureEnabled(_0x4d2b16(0x141))){const _0x39a04a=redactor_1[_0x4d2b16(0x110)][_0x4d2b16(0xf4)](_0x4efbc5);_0x4efbc5=_0x39a04a[_0x4d2b16(0x109)],exports[_0x4d2b16(0x132)]={'secretsFound':_0x39a04a['secretsFound'],'secretTypes':_0x39a04a[_0x4d2b16(0x13a)]};if(_0x39a04a[_0x4d2b16(0x123)]>0x0)_0x554b28[_0x4d2b16(0x105)](_0x4d2b16(0x141));}else exports[_0x4d2b16(0x132)]={'secretsFound':0x0,'secretTypes':[]};const _0x4889e8=_0x31463c[_0x4d2b16(0xf8)](),_0x399852=isFeatureEnabled(_0x4d2b16(0x100));try{if(_0x399852){if(_0x4889e8['includes']('git\x20status')||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x10e)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,git_1['filterGitStatus'])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)]('git\x20log')||_0x4889e8['includes'](_0x4d2b16(0x140)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,git_1[_0x4d2b16(0x12a)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x114))||_0x4889e8['includes']('git\x20show')||_0x4889e8[_0x4d2b16(0x101)]('yadm\x20diff'))return _0x42d0ed(_0x4d2b16(0x100),(0x0,git_1[_0x4d2b16(0x13e)])(_0x4efbc5));if(_0x4889e8['includes']('pytest')||_0x4889e8[_0x4d2b16(0xf5)](/python3?\s+-m\s+pytest/))return _0x42d0ed(_0x4d2b16(0x100),(0x0,python_1['filterPytest'])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0xfe))||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0xfb)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,python_1['filterPipInstall'])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)]('ruff\x20check')||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x107)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,devops_1[_0x4d2b16(0x11d)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0xe0))||_0x4889e8[_0x4d2b16(0x101)]('npm\x20i\x20')||_0x4889e8[_0x4d2b16(0xf2)](_0x4d2b16(0xee))||_0x4889e8[_0x4d2b16(0x101)]('pnpm\x20install')||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x148)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,js_1[_0x4d2b16(0xe6)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)]('jest')||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0xfa)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,js_1[_0x4d2b16(0x11a)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x147))||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x11c))||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0xff))||_0x4889e8['includes'](_0x4d2b16(0x10c)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,js_1[_0x4d2b16(0x11a)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x117)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,rust_1[_0x4d2b16(0x121)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x115))||_0x4889e8[_0x4d2b16(0x101)]('cargo\x20check')||_0x4889e8['includes'](_0x4d2b16(0x136)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,rust_1['filterCargoBuild'])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0xf1)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,go_1[_0x4d2b16(0x106)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0x101)]('go\x20vet'))return _0x42d0ed('filter',(0x0,go_1[_0x4d2b16(0x10b)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0xf5)](/docker\s+ps/))return _0x42d0ed(_0x4d2b16(0x100),(0x0,devops_1[_0x4d2b16(0xe8)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0xf5)](/docker\s+images/))return _0x42d0ed(_0x4d2b16(0x100),(0x0,devops_1[_0x4d2b16(0x12f)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0xf5)](/docker\s+logs/))return _0x42d0ed(_0x4d2b16(0x100),(0x0,devops_1[_0x4d2b16(0x129)])(_0x4efbc5));if(_0x4889e8['includes']('kubectl')){const _0x4d97b8=_0x4889e8['match'](/kubectl\s+(get|logs|describe|apply)/),_0x3c58c1=_0x4d97b8?_0x4d97b8[0x1]:_0x4d2b16(0xed);return _0x42d0ed(_0x4d2b16(0x100),(0x0,devops_1['filterKubectl'])(_0x4efbc5,_0x3c58c1));}if(_0x4889e8[_0x4d2b16(0xf5)](/^(ls|dir)(\s|$)/)||_0x4889e8['includes']('\x20ls\x20')||_0x4889e8[_0x4d2b16(0xf2)](_0x4d2b16(0x111)))return _0x42d0ed(_0x4d2b16(0x100),(0x0,shell_1[_0x4d2b16(0xfd)])(_0x4efbc5));if(_0x4889e8['match'](/^tree(\s|$)/)||_0x4889e8[_0x4d2b16(0x101)](_0x4d2b16(0x103))||_0x4889e8['endsWith'](_0x4d2b16(0x13b)))return _0x42d0ed('filter',(0x0,shell_1[_0x4d2b16(0x128)])(_0x4efbc5));if(_0x4889e8['match'](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x4b2600=(0x0,shell_1[_0x4d2b16(0x139)])(_0x4efbc5,_0x31463c);if(_0x4b2600[_0x4d2b16(0x101)]('[lock\x20file]'))_0x554b28['push'](_0x4d2b16(0x10d));else{if(_0x4b2600[_0x4d2b16(0x101)]('[binary')||_0x4b2600[_0x4d2b16(0x101)](_0x4d2b16(0x116)))_0x554b28[_0x4d2b16(0x105)](_0x4d2b16(0x134));else{if(_0x4b2600['includes'](_0x4d2b16(0xe4)))_0x554b28['push'](_0x4d2b16(0x11f));else{if(_0x4b2600[_0x4d2b16(0x101)]('|\x20')&&_0x4b2600['includes'](_0x4d2b16(0x138))&&_0x4b2600[_0x4d2b16(0x104)]<_0x4efbc5[_0x4d2b16(0x104)]*0.5)_0x554b28['push'](_0x4d2b16(0x11b));else{if(_0x4b2600[_0x4d2b16(0x101)](_0x4d2b16(0x127)))_0x554b28[_0x4d2b16(0x105)](_0x4d2b16(0x100));}}}}if(_0x4b2600[_0x4d2b16(0x104)]<_0x4efbc5[_0x4d2b16(0x104)]&&!_0x554b28[_0x4d2b16(0xe1)](_0x4ecc2b=>_0x4ecc2b!=='ansi_strip'&&_0x4ecc2b!==_0x4d2b16(0x141)))_0x554b28[_0x4d2b16(0x105)]('filter');return exports[_0x4d2b16(0x113)]=_0x554b28,_0x4b2600;}if(_0x4889e8[_0x4d2b16(0xf5)](/^find(\s|$)/))return _0x42d0ed(_0x4d2b16(0x100),(0x0,shell_1[_0x4d2b16(0x131)])(_0x4efbc5));if(_0x4889e8[_0x4d2b16(0xf5)](/^(grep|rg|ripgrep)(\s|$)/))return _0x42d0ed(_0x4d2b16(0x100),(0x0,shell_1[_0x4d2b16(0x102)])(_0x4efbc5));}}catch(_0x2fbdef){}return isFeatureEnabled(_0x4d2b16(0x118))&&(_0x4efbc5=(0x0,generic_1[_0x4d2b16(0x130)])(_0x4efbc5),_0x554b28[_0x4d2b16(0x105)](_0x4d2b16(0x118))),_0x4efbc5=(0x0,generic_1[_0x4d2b16(0xe2)])(_0x4efbc5),_0x4efbc5=(0x0,generic_1[_0x4d2b16(0x12d)])(_0x4efbc5,0x4e20),exports[_0x4d2b16(0x113)]=_0x554b28,_0x4efbc5;}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x22314e(0x119)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x22314e(0x10f)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x22314e(0xea)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x22314e(0xe3)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x22314e(0xe5)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':'trim\x20npm'},{'pattern':/^npx\s+/,'prefix':a0_0x22314e(0x137)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x22314e(0x120)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x22314e(0x112)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x22314e(0xe7)},{'pattern':/^tree(\s|$)/,'prefix':'trim\x20tree'},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x22314e(0x145)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x22314e(0xec)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x22314e(0x108)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x22314e(0xf3)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x22314e(0x122)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x22314e(0x12e)}];function rewriteCommand(_0x429ae3){const _0x501a8b=a0_0x22314e,_0x5bcb18=_0x429ae3[_0x501a8b(0x144)]();if(_0x5bcb18[_0x501a8b(0x142)]('trim\x20'))return _0x5bcb18;for(const _0x9e3a75 of REWRITE_RULES){if(_0x9e3a75['pattern'][_0x501a8b(0xf6)](_0x5bcb18))return'trim\x20'+_0x5bcb18;}return _0x5bcb18;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0xf7b6fd=a0_0x212f;(function(_0x2c7e83,_0x148051){const _0x4108a1=a0_0x212f,_0x381209=_0x2c7e83();while(!![]){try{const _0x2b283b=-parseInt(_0x4108a1(0x157))/0x1+-parseInt(_0x4108a1(0x15d))/0x2*(-parseInt(_0x4108a1(0x146))/0x3)+parseInt(_0x4108a1(0x154))/0x4*(parseInt(_0x4108a1(0x15e))/0x5)+parseInt(_0x4108a1(0x159))/0x6+parseInt(_0x4108a1(0x14f))/0x7+-parseInt(_0x4108a1(0x14b))/0x8+parseInt(_0x4108a1(0x162))/0x9*(-parseInt(_0x4108a1(0x167))/0xa);if(_0x2b283b===_0x148051)break;else _0x381209['push'](_0x381209['shift']());}catch(_0x91f59b){_0x381209['push'](_0x381209['shift']());}}}(a0_0x460d,0x4aec2));function a0_0x460d(){const _0x37156d=['1663731NxnYpD','PASS','defineProperty','\x20passed,\x20','trim','4178240loHcgU','added\x20','Test\x20Runner:\x20','\x20\x20...\x20(','1055110hcpZbQ','\x20total)','found\x20','FAIL\x20\x20','startsWith','11212jufpNo','\x20failed\x20(','Test\x20Suites:','91645OaxnEr','match','1923960fRmdUV','audited\x20','filterNpmInstall','split','2HsXMPH','335WcAneL','Tests:','all','push','155097cWEDlK','filterJestVitest','\x20passed','\x0aFailures:','FAIL','170uLlWZR','join','Test\x20Files:','includes','length','__esModule','NPM:\x20Packages\x20verified/installed\x20successfully'];a0_0x460d=function(){return _0x37156d;};return a0_0x460d();}function a0_0x212f(_0x21d5f3,_0xd27dc5){_0x21d5f3=_0x21d5f3-0x140;const _0x460dc4=a0_0x460d();let _0x212f2e=_0x460dc4[_0x21d5f3];return _0x212f2e;}Object[a0_0xf7b6fd(0x148)](exports,a0_0xf7b6fd(0x144),{'value':!![]}),exports[a0_0xf7b6fd(0x15b)]=filterNpmInstall,exports[a0_0xf7b6fd(0x163)]=filterJestVitest;function filterNpmInstall(_0x509e0e){const _0x5619bc=a0_0xf7b6fd,_0x1726ba=_0x509e0e['replace'](/\r/g,'\x0a'),_0x1f761c=_0x1726ba[_0x5619bc(0x15c)]('\x0a'),_0x113c99=[];for(const _0x3896e3 of _0x1f761c){const _0x55b753=_0x3896e3['trim']();(_0x55b753['includes'](_0x5619bc(0x14c))||_0x55b753[_0x5619bc(0x142)]('removed\x20')||_0x55b753[_0x5619bc(0x142)](_0x5619bc(0x15a))||_0x55b753[_0x5619bc(0x142)]('up\x20to\x20date')||_0x55b753[_0x5619bc(0x142)](_0x5619bc(0x151)))&&(!_0x55b753[_0x5619bc(0x142)]('%')&&!_0x55b753[_0x5619bc(0x153)]('⠋')&&!_0x55b753[_0x5619bc(0x153)]('⠙')&&_0x113c99[_0x5619bc(0x161)](_0x55b753));}const _0x525069=_0x113c99[_0x5619bc(0x140)]('\x0a')[_0x5619bc(0x14a)]();return _0x525069[_0x5619bc(0x143)]>0x0?_0x525069:_0x5619bc(0x145);}function filterJestVitest(_0x3dc891){const _0x4dbe8b=a0_0xf7b6fd,_0xfe2c2a=_0x3dc891[_0x4dbe8b(0x15c)]('\x0a');let _0xd3acbd=0x0,_0x5482e8=0x0,_0xe34fa=0x0;const _0x1b291f=[];let _0xb3b38=![];for(const _0x15870 of _0xfe2c2a){const _0x595fc7=_0x15870[_0x4dbe8b(0x14a)]();if(_0x595fc7[_0x4dbe8b(0x153)](_0x4dbe8b(0x15f))||_0x595fc7[_0x4dbe8b(0x142)](_0x4dbe8b(0x141))){const _0x340a6e=_0x595fc7['match'](/(\d+)\s+passed/),_0x261bb4=_0x595fc7[_0x4dbe8b(0x158)](/(\d+)\s+failed/),_0x17c5c8=_0x595fc7[_0x4dbe8b(0x158)](/(\d+)\s+total/);if(_0x340a6e)_0xd3acbd=parseInt(_0x340a6e[0x1]);if(_0x261bb4)_0x5482e8=parseInt(_0x261bb4[0x1]);if(_0x17c5c8)_0xe34fa=parseInt(_0x17c5c8[0x1]);continue;}(_0x595fc7[_0x4dbe8b(0x153)]('❯')||_0x595fc7[_0x4dbe8b(0x153)]('●')||_0x595fc7[_0x4dbe8b(0x153)](_0x4dbe8b(0x152)))&&(_0xb3b38=!![]),_0xb3b38&&(_0x595fc7[_0x4dbe8b(0x143)]>0x0&&!_0x595fc7['startsWith'](_0x4dbe8b(0x156))&&!_0x595fc7['startsWith'](_0x4dbe8b(0x15f))&&_0x1b291f[_0x4dbe8b(0x161)](_0x15870));}if(_0xe34fa===0x0&&_0xd3acbd===0x0&&_0x5482e8===0x0){if(_0x3dc891[_0x4dbe8b(0x142)](_0x4dbe8b(0x147))&&!_0x3dc891[_0x4dbe8b(0x142)](_0x4dbe8b(0x166))){const _0x5a07e7=_0x3dc891[_0x4dbe8b(0x158)](/(\d+)\s+passed/),_0x3fd6b5=_0x5a07e7?_0x5a07e7[0x1]:_0x4dbe8b(0x160);return _0x4dbe8b(0x14d)+_0x3fd6b5+_0x4dbe8b(0x164);}return _0x3dc891;}if(_0x5482e8===0x0&&_0xd3acbd>0x0)return'Test\x20Runner:\x20'+_0xd3acbd+_0x4dbe8b(0x164);const _0x4520e7=[_0x4dbe8b(0x14d)+_0xd3acbd+_0x4dbe8b(0x149)+_0x5482e8+_0x4dbe8b(0x155)+_0xe34fa+_0x4dbe8b(0x150)];if(_0x1b291f[_0x4dbe8b(0x143)]>0x0){_0x4520e7[_0x4dbe8b(0x161)](_0x4dbe8b(0x165));const _0x3b845d=0x19,_0x3928f9=_0x1b291f['slice'](0x0,_0x3b845d);for(const _0x419dac of _0x3928f9){_0x4520e7[_0x4dbe8b(0x161)]('\x20\x20'+_0x419dac);}_0x1b291f[_0x4dbe8b(0x143)]>_0x3b845d&&_0x4520e7[_0x4dbe8b(0x161)](_0x4dbe8b(0x14e)+(_0x1b291f[_0x4dbe8b(0x143)]-_0x3b845d)+'\x20lines\x20of\x20trace\x20details\x20truncated)');}return _0x4520e7[_0x4dbe8b(0x140)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x51ee96=a0_0x2114;(function(_0x2d5c62,_0xfcda03){const _0x4aa128=a0_0x2114,_0x58a307=_0x2d5c62();while(!![]){try{const _0x5ae5f9=-parseInt(_0x4aa128(0x18f))/0x1+-parseInt(_0x4aa128(0x18e))/0x2+-parseInt(_0x4aa128(0x1b5))/0x3*(parseInt(_0x4aa128(0x1ac))/0x4)+-parseInt(_0x4aa128(0x19c))/0x5+-parseInt(_0x4aa128(0x198))/0x6*(parseInt(_0x4aa128(0x1a1))/0x7)+-parseInt(_0x4aa128(0x18d))/0x8+-parseInt(_0x4aa128(0x191))/0x9*(-parseInt(_0x4aa128(0x193))/0xa);if(_0x5ae5f9===_0xfcda03)break;else _0x58a307['push'](_0x58a307['shift']());}catch(_0x5a41c8){_0x58a307['push'](_0x58a307['shift']());}}}(a0_0xcbe2,0xa63a4));Object[a0_0x51ee96(0x194)](exports,a0_0x51ee96(0x1a3),{'value':!![]}),exports[a0_0x51ee96(0x1b6)]=filterPytest,exports[a0_0x51ee96(0x1b0)]=filterPipInstall;function filterPytest(_0x3916f8){const _0x2e22b8=a0_0x51ee96,_0x82b00e=_0x3916f8[_0x2e22b8(0x1b3)]('\x0a');let _0x5b4b92=0x0,_0x2ae8f9=0x0,_0x1bd0f9=0x0,_0x4b3aee=0x0,_0x1ac747=0x0;const _0x45f7e4=[];let _0x18a86a=[],_0x318dc8=![];for(const _0x34edb2 of _0x82b00e){const _0xa857bf=_0x34edb2[_0x2e22b8(0x192)]();if(_0xa857bf['startsWith'](_0x2e22b8(0x197))||_0xa857bf[_0x2e22b8(0x19a)](_0x2e22b8(0x18c))){_0x318dc8=!![];continue;}else(_0xa857bf['startsWith'](_0x2e22b8(0x1aa))||_0xa857bf[_0x2e22b8(0x19a)](_0x2e22b8(0x1a8))&&_0xa857bf[_0x2e22b8(0x19b)](_0x2e22b8(0x1ad)))&&(_0x318dc8=![],_0x18a86a[_0x2e22b8(0x1a0)]>0x0&&(_0x45f7e4[_0x2e22b8(0x1a9)](_0x18a86a),_0x18a86a=[]));if(_0x318dc8){if(_0xa857bf[_0x2e22b8(0x19a)](_0x2e22b8(0x19d)))_0x18a86a[_0x2e22b8(0x1a0)]>0x0&&(_0x45f7e4[_0x2e22b8(0x1a9)](_0x18a86a),_0x18a86a=[]),_0x18a86a['push'](_0xa857bf);else _0xa857bf[_0x2e22b8(0x1a0)]>0x0&&_0x18a86a['push'](_0x34edb2);continue;}if(_0xa857bf['startsWith'](_0x2e22b8(0x1a8))&&_0xa857bf[_0x2e22b8(0x19b)]('\x20in\x20')){const _0x429860=_0xa857bf[_0x2e22b8(0x1a7)](/(\d+)\s+passed/),_0x161f3b=_0xa857bf[_0x2e22b8(0x1a7)](/(\d+)\s+failed/),_0x5742f1=_0xa857bf[_0x2e22b8(0x1a7)](/(\d+)\s+skipped/),_0x3b7bdf=_0xa857bf[_0x2e22b8(0x1a7)](/(\d+)\s+xfailed/),_0x447c9e=_0xa857bf['match'](/(\d+)\s+xpassed/);if(_0x429860)_0x5b4b92=parseInt(_0x429860[0x1]);if(_0x161f3b)_0x2ae8f9=parseInt(_0x161f3b[0x1]);if(_0x5742f1)_0x1bd0f9=parseInt(_0x5742f1[0x1]);if(_0x3b7bdf)_0x4b3aee=parseInt(_0x3b7bdf[0x1]);if(_0x447c9e)_0x1ac747=parseInt(_0x447c9e[0x1]);}}_0x18a86a[_0x2e22b8(0x1a0)]>0x0&&_0x45f7e4[_0x2e22b8(0x1a9)](_0x18a86a);if(_0x5b4b92===0x0&&_0x2ae8f9===0x0&&_0x1bd0f9===0x0&&_0x4b3aee===0x0&&_0x1ac747===0x0){if(_0x3916f8[_0x2e22b8(0x19b)](_0x2e22b8(0x1ad))&&!_0x3916f8[_0x2e22b8(0x19b)](_0x2e22b8(0x1a2)))return _0x2e22b8(0x1ab);return _0x3916f8;}if(_0x2ae8f9===0x0&&_0x5b4b92>0x0&&_0x1bd0f9===0x0&&_0x4b3aee===0x0&&_0x1ac747===0x0)return _0x2e22b8(0x1af)+_0x5b4b92+'\x20passed';const _0x347877=[];_0x347877[_0x2e22b8(0x1a9)](_0x2e22b8(0x1af)+_0x5b4b92+'\x20passed');if(_0x2ae8f9>0x0)_0x347877[_0x2e22b8(0x1a9)](_0x2ae8f9+_0x2e22b8(0x19e));if(_0x1bd0f9>0x0)_0x347877[_0x2e22b8(0x1a9)](_0x1bd0f9+'\x20skipped');if(_0x4b3aee>0x0)_0x347877['push'](_0x4b3aee+'\x20xfailed');if(_0x1ac747>0x0)_0x347877[_0x2e22b8(0x1a9)](_0x1ac747+_0x2e22b8(0x1a4));const _0x30c28e=[_0x347877[_0x2e22b8(0x199)](',\x20')];if(_0x45f7e4[_0x2e22b8(0x1a0)]>0x0){_0x30c28e[_0x2e22b8(0x1a9)](_0x2e22b8(0x18b));const _0x452601=0x3,_0x386138=_0x45f7e4[_0x2e22b8(0x1b2)](0x0,_0x452601);for(let _0x3d5b39=0x0;_0x3d5b39<_0x386138[_0x2e22b8(0x1a0)];_0x3d5b39++){const _0x36992c=_0x386138[_0x3d5b39],_0x2e6cf4=_0x36992c[0x0]['replace'](/_/g,'')[_0x2e22b8(0x192)]();_0x30c28e[_0x2e22b8(0x1a9)]('\x20\x20'+(_0x3d5b39+0x1)+_0x2e22b8(0x195)+_0x2e6cf4);const _0x317aa4=_0x36992c[_0x2e22b8(0x1b2)](0x1),_0xf84d37=_0x317aa4[_0x2e22b8(0x19f)](_0x140404=>{const _0x3167c4=_0x2e22b8,_0x4ab58f=_0x140404[_0x3167c4(0x192)]();return _0x4ab58f['startsWith']('>')||_0x4ab58f[_0x3167c4(0x19a)]('E\x20\x20\x20')||_0x4ab58f[_0x3167c4(0x19b)](_0x3167c4(0x1b1))||_0x4ab58f[_0x3167c4(0x19b)](_0x3167c4(0x1b7));});for(const _0x2dcd2b of _0xf84d37['slice'](0x0,0x8)){_0x30c28e[_0x2e22b8(0x1a9)](_0x2e22b8(0x1b4)+_0x2dcd2b);}_0xf84d37[_0x2e22b8(0x1a0)]>0x8&&_0x30c28e[_0x2e22b8(0x1a9)](_0x2e22b8(0x1ae)+(_0xf84d37[_0x2e22b8(0x1a0)]-0x8)+'\x20lines\x20of\x20stacktrace\x20truncated)');}_0x45f7e4[_0x2e22b8(0x1a0)]>_0x452601&&_0x30c28e[_0x2e22b8(0x1a9)](_0x2e22b8(0x190)+(_0x45f7e4[_0x2e22b8(0x1a0)]-_0x452601)+_0x2e22b8(0x1a5));}return _0x30c28e[_0x2e22b8(0x199)]('\x0a');}function filterPipInstall(_0x39a307){const _0x4af395=a0_0x51ee96,_0x1592d4=_0x39a307[_0x4af395(0x1b3)]('\x0a'),_0x310b54=[];for(const _0x58f637 of _0x1592d4){const _0x3ffdb4=_0x58f637[_0x4af395(0x192)]();_0x3ffdb4[_0x4af395(0x19a)](_0x4af395(0x196))&&_0x310b54[_0x4af395(0x1a9)](_0x3ffdb4);}if(_0x310b54[_0x4af395(0x1a0)]>0x0)return _0x310b54['join']('\x0a');return _0x1592d4[_0x4af395(0x19f)](_0x45d3ca=>{const _0x195e2b=_0x4af395,_0x3ccd2f=_0x45d3ca[_0x195e2b(0x192)]();return!_0x3ccd2f[_0x195e2b(0x19a)](_0x195e2b(0x1a6))&&!_0x3ccd2f['startsWith']('Downloading')&&!_0x3ccd2f[_0x195e2b(0x19b)]('Using\x20cached')&&!_0x3ccd2f[_0x195e2b(0x19a)]('Requirement\x20already\x20satisfied');})[_0x4af395(0x199)]('\x0a')[_0x4af395(0x192)]();}function a0_0x2114(_0x37ff98,_0x5c48){_0x37ff98=_0x37ff98-0x18b;const _0xcbe22e=a0_0xcbe2();let _0x211477=_0xcbe22e[_0x37ff98];return _0x211477;}function a0_0xcbe2(){const _0x2fb344=['===','push','===\x20short\x20test\x20summary\x20info\x20===','Pytest:\x20All\x20tests\x20passed','12aDxTNP','passed','\x20\x20\x20\x20...\x20(','Pytest:\x20','filterPipInstall','.py:','slice','split','\x20\x20\x20\x20','540789KdoEie','filterPytest','AssertionError:','\x0aFailures:','===\x20ERRORS\x20===','9168784VTfIOx','941040uWCHgy','140961NNQVPQ','\x20\x20...\x20+','9PjclMg','trim','47753950kbxwUj','defineProperty','.\x20[FAIL]\x20','Successfully\x20installed','===\x20FAILURES\x20===','24OMYtTX','join','startsWith','includes','5545355AbjEMz','___','\x20failed','filter','length','1202404oHWshr','failed','__esModule','\x20xpassed\x20(warning!)','\x20more\x20failures\x20truncated','Collecting','match'];a0_0xcbe2=function(){return _0x2fb344;};return a0_0xcbe2();}
|
package/filters/rust.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x231130=a0_0x5680;(function(_0x4b6ad2,_0x3f1304){const _0xd65f1a=a0_0x5680,_0x3782f9=_0x4b6ad2();while(!![]){try{const _0x320b13=-parseInt(_0xd65f1a(0x186))/0x1+-parseInt(_0xd65f1a(0x162))/0x2*(-parseInt(_0xd65f1a(0x16d))/0x3)+parseInt(_0xd65f1a(0x15d))/0x4*(parseInt(_0xd65f1a(0x160))/0x5)+parseInt(_0xd65f1a(0x16f))/0x6+parseInt(_0xd65f1a(0x16b))/0x7+-parseInt(_0xd65f1a(0x167))/0x8+-parseInt(_0xd65f1a(0x161))/0x9*(-parseInt(_0xd65f1a(0x17c))/0xa);if(_0x320b13===_0x3f1304)break;else _0x3782f9['push'](_0x3782f9['shift']());}catch(_0x1d964e){_0x3782f9['push'](_0x3782f9['shift']());}}}(a0_0x41c9,0x8044d));Object[a0_0x231130(0x187)](exports,'__esModule',{'value':!![]}),exports[a0_0x231130(0x180)]=filterCargoTest,exports['filterCargoBuild']=filterCargoBuild;function filterCargoTest(_0x2b3972){const _0x5cd59c=a0_0x231130,_0x4ee7f9=_0x2b3972[_0x5cd59c(0x188)]('\x0a');let _0x26b4e1=0x0,_0x291feb=0x0,_0x43845d=0x0,_0x182054=0x0;const _0x86458b=[];let _0x4d5f4e=![],_0x2093fb=[];for(const _0x4f1111 of _0x4ee7f9){const _0x4492ef=_0x4f1111[_0x5cd59c(0x176)](),_0x5100a2=_0x4492ef[_0x5cd59c(0x178)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x5100a2){_0x26b4e1+=parseInt(_0x5100a2[0x2]),_0x291feb+=parseInt(_0x5100a2[0x3]),_0x43845d+=parseInt(_0x5100a2[0x4]),_0x182054+=parseInt(_0x5100a2[0x5]);continue;}if(_0x4492ef===_0x5cd59c(0x15b)||_0x4492ef===_0x5cd59c(0x164)){_0x4d5f4e=!![];continue;}if(_0x4d5f4e){if(_0x4492ef['startsWith'](_0x5cd59c(0x159))&&_0x4492ef[_0x5cd59c(0x174)](_0x5cd59c(0x16e))){if(_0x2093fb[_0x5cd59c(0x17d)]>0x0)_0x86458b[_0x5cd59c(0x173)](_0x2093fb['join']('\x0a'));_0x2093fb=[_0x4492ef[_0x5cd59c(0x170)](/^-+\s*/,'')[_0x5cd59c(0x170)](/\s*-+$/,'')];}else{if(_0x4492ef==='failures:'||_0x4492ef[_0x5cd59c(0x165)]('test\x20result:')){if(_0x2093fb[_0x5cd59c(0x17d)]>0x0)_0x86458b[_0x5cd59c(0x173)](_0x2093fb[_0x5cd59c(0x175)]('\x0a'));_0x2093fb=[],_0x4d5f4e=![];}else _0x4492ef[_0x5cd59c(0x17d)]>0x0&&_0x2093fb[_0x5cd59c(0x173)](_0x4f1111);}}}if(_0x2093fb[_0x5cd59c(0x17d)]>0x0)_0x86458b[_0x5cd59c(0x173)](_0x2093fb[_0x5cd59c(0x175)]('\x0a'));if(_0x26b4e1===0x0&&_0x291feb===0x0&&_0x43845d===0x0){if(_0x2b3972[_0x5cd59c(0x17f)]('test\x20result:\x20ok'))return _0x5cd59c(0x163);return _0x2b3972;}if(_0x291feb===0x0){const _0x2cd220=[_0x5cd59c(0x17b)+_0x26b4e1+_0x5cd59c(0x15e)];if(_0x43845d>0x0)_0x2cd220[_0x5cd59c(0x173)](_0x43845d+'\x20ignored');return _0x2cd220['join'](',\x20');}const _0xdf74c2=[_0x5cd59c(0x17b)+_0x26b4e1+_0x5cd59c(0x158)+_0x291feb+'\x20failed,\x20'+_0x43845d+'\x20ignored'];if(_0x86458b[_0x5cd59c(0x17d)]>0x0){_0xdf74c2['push']('\x0aFailures:');const _0x28b961=0x3;for(let _0x5ccb2a=0x0;_0x5ccb2a<Math[_0x5cd59c(0x17a)](_0x86458b[_0x5cd59c(0x17d)],_0x28b961);_0x5ccb2a++){const _0x90fa3c=_0x86458b[_0x5ccb2a][_0x5cd59c(0x188)]('\x0a');_0xdf74c2[_0x5cd59c(0x173)]('\x20\x20'+(_0x5ccb2a+0x1)+'.\x20'+_0x90fa3c[0x0]);const _0x47752a=_0x90fa3c[_0x5cd59c(0x181)](0x1),_0x41ba60=_0x47752a[_0x5cd59c(0x177)](_0x394fdd=>_0x394fdd['trim']()[_0x5cd59c(0x165)](_0x5cd59c(0x179))||_0x394fdd[_0x5cd59c(0x17f)](_0x5cd59c(0x15f))||_0x394fdd[_0x5cd59c(0x17f)]('assert')||_0x394fdd[_0x5cd59c(0x17f)](_0x5cd59c(0x171))||_0x394fdd[_0x5cd59c(0x17f)](_0x5cd59c(0x15a)));for(const _0x33f23f of _0x41ba60[_0x5cd59c(0x181)](0x0,0x5)){_0xdf74c2[_0x5cd59c(0x173)](_0x5cd59c(0x172)+_0x33f23f[_0x5cd59c(0x176)]());}}_0x86458b[_0x5cd59c(0x17d)]>_0x28b961&&_0xdf74c2['push']('\x20\x20...\x20+'+(_0x86458b[_0x5cd59c(0x17d)]-_0x28b961)+_0x5cd59c(0x15c));}return _0xdf74c2[_0x5cd59c(0x175)]('\x0a');}function a0_0x5680(_0x5c8130,_0x189bdf){_0x5c8130=_0x5c8130-0x157;const _0x41c93c=a0_0x41c9();let _0x56809f=_0x41c93c[_0x5c8130];return _0x56809f;}function a0_0x41c9(){const _0x4ab3d2=['warning[','289338eJFgjf','\x0aWarnings:','1759551UdlHlI','\x20----','4708830IydRjv','replace','left:','\x20\x20\x20\x20','push','endsWith','join','trim','filter','match','thread','min','Cargo\x20test:\x20','370RUfaPO','length','\x20crates\x20successfully','includes','filterCargoTest','slice','error[','error:','\x20warnings','warning:','968832hXDcHC','defineProperty','split','\x20more\x20errors','\x20crates,\x20','\x20passed,\x20','----\x20','right:','failures:','\x20more\x20failures','4NtXdYs','\x20passed','panicked','674095lLpydJ','137817MTgKXK','2fQjTfx','Cargo\x20test:\x20all\x20tests\x20passed','----\x20failures\x20----','startsWith','Compiling\x20','4958680KnxUNm','\x20\x20...\x20+','Cargo:\x20compiled\x20'];a0_0x41c9=function(){return _0x4ab3d2;};return a0_0x41c9();}function filterCargoBuild(_0x283ccd){const _0x10e9ed=a0_0x231130,_0x439259=_0x283ccd[_0x10e9ed(0x188)]('\x0a'),_0x37e4f8=[],_0xc92747=[];let _0xc46d06=0x0;for(const _0x24b597 of _0x439259){const _0x143a38=_0x24b597[_0x10e9ed(0x176)]();if(_0x143a38[_0x10e9ed(0x165)](_0x10e9ed(0x166)))_0xc46d06++;else{if(_0x143a38[_0x10e9ed(0x165)](_0x10e9ed(0x16a))||_0x143a38[_0x10e9ed(0x165)](_0x10e9ed(0x185)))_0x37e4f8['push'](_0x143a38);else{if(_0x143a38[_0x10e9ed(0x165)](_0x10e9ed(0x182))||_0x143a38[_0x10e9ed(0x165)](_0x10e9ed(0x183)))_0xc92747[_0x10e9ed(0x173)](_0x143a38);}}}if(_0xc92747['length']===0x0&&_0x37e4f8[_0x10e9ed(0x17d)]===0x0)return _0xc46d06>0x0?_0x10e9ed(0x169)+_0xc46d06+_0x10e9ed(0x17e):_0x283ccd[_0x10e9ed(0x176)]();const _0x2935a4=[];if(_0xc92747[_0x10e9ed(0x17d)]>0x0){_0x2935a4['push']('Cargo:\x20'+_0xc92747[_0x10e9ed(0x17d)]+'\x20errors,\x20'+_0x37e4f8[_0x10e9ed(0x17d)]+_0x10e9ed(0x184)),_0x2935a4[_0x10e9ed(0x173)]('\x0aErrors:');for(const _0x5a0ecb of _0xc92747['slice'](0x0,0x5))_0x2935a4['push']('\x20\x20'+_0x5a0ecb);if(_0xc92747[_0x10e9ed(0x17d)]>0x5)_0x2935a4[_0x10e9ed(0x173)](_0x10e9ed(0x168)+(_0xc92747['length']-0x5)+_0x10e9ed(0x189));}else _0x2935a4[_0x10e9ed(0x173)](_0x10e9ed(0x169)+_0xc46d06+_0x10e9ed(0x157)+_0x37e4f8[_0x10e9ed(0x17d)]+_0x10e9ed(0x184));if(_0x37e4f8[_0x10e9ed(0x17d)]>0x0&&_0x37e4f8['length']<=0x5){_0x2935a4[_0x10e9ed(0x173)](_0x10e9ed(0x16c));for(const _0x214161 of _0x37e4f8)_0x2935a4[_0x10e9ed(0x173)]('\x20\x20'+_0x214161);}else _0x37e4f8[_0x10e9ed(0x17d)]>0x5&&_0x2935a4[_0x10e9ed(0x173)]('\x0a('+_0x37e4f8[_0x10e9ed(0x17d)]+'\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)');return _0x2935a4[_0x10e9ed(0x175)]('\x0a');}
|
package/filters/shell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x2ee26c=a0_0x4f5a;(function(_0x2cf8c4,_0x1ff88c){const _0x108b4d=a0_0x4f5a,_0x5b183e=_0x2cf8c4();while(!![]){try{const _0x48eae4=parseInt(_0x108b4d(0x15b))/0x1*(-parseInt(_0x108b4d(0xf0))/0x2)+-parseInt(_0x108b4d(0x154))/0x3+parseInt(_0x108b4d(0x160))/0x4+parseInt(_0x108b4d(0x16b))/0x5+-parseInt(_0x108b4d(0x14b))/0x6+parseInt(_0x108b4d(0x150))/0x7*(-parseInt(_0x108b4d(0x113))/0x8)+parseInt(_0x108b4d(0x105))/0x9;if(_0x48eae4===_0x1ff88c)break;else _0x5b183e['push'](_0x5b183e['shift']());}catch(_0x3a6980){_0x5b183e['push'](_0x5b183e['shift']());}}}(a0_0x1c12,0xb9081));var __createBinding=this&&this[a0_0x2ee26c(0x131)]||(Object['create']?function(_0x5e8bb9,_0x419a7c,_0x4f2516,_0x229f91){const _0x52a795=a0_0x2ee26c;if(_0x229f91===undefined)_0x229f91=_0x4f2516;var _0x595354=Object['getOwnPropertyDescriptor'](_0x419a7c,_0x4f2516);(!_0x595354||(_0x52a795(0x110)in _0x595354?!_0x419a7c[_0x52a795(0x162)]:_0x595354['writable']||_0x595354[_0x52a795(0x15e)]))&&(_0x595354={'enumerable':!![],'get':function(){return _0x419a7c[_0x4f2516];}}),Object[_0x52a795(0x11c)](_0x5e8bb9,_0x229f91,_0x595354);}:function(_0x52320f,_0x4b4bd0,_0x4539c5,_0x5a0954){if(_0x5a0954===undefined)_0x5a0954=_0x4539c5;_0x52320f[_0x5a0954]=_0x4b4bd0[_0x4539c5];}),__setModuleDefault=this&&this[a0_0x2ee26c(0x124)]||(Object[a0_0x2ee26c(0x16f)]?function(_0x88d381,_0x858101){const _0x55900c=a0_0x2ee26c;Object[_0x55900c(0x11c)](_0x88d381,_0x55900c(0x142),{'enumerable':!![],'value':_0x858101});}:function(_0x50e815,_0x451378){const _0x1dc109=a0_0x2ee26c;_0x50e815[_0x1dc109(0x142)]=_0x451378;}),__importStar=this&&this[a0_0x2ee26c(0x123)]||(function(){var _0x5b8adb=function(_0x2570b8){const _0x36e1e9=a0_0x4f5a;return _0x5b8adb=Object[_0x36e1e9(0x129)]||function(_0x3474f0){const _0xcbbe4d=_0x36e1e9;var _0xe87823=[];for(var _0x278179 in _0x3474f0)if(Object[_0xcbbe4d(0x17b)][_0xcbbe4d(0x153)][_0xcbbe4d(0x11b)](_0x3474f0,_0x278179))_0xe87823[_0xe87823[_0xcbbe4d(0x166)]]=_0x278179;return _0xe87823;},_0x5b8adb(_0x2570b8);};return function(_0x484892){const _0x275df9=a0_0x4f5a;if(_0x484892&&_0x484892[_0x275df9(0x162)])return _0x484892;var _0x355ad1={};if(_0x484892!=null){for(var _0x47817a=_0x5b8adb(_0x484892),_0x224333=0x0;_0x224333<_0x47817a[_0x275df9(0x166)];_0x224333++)if(_0x47817a[_0x224333]!==_0x275df9(0x142))__createBinding(_0x355ad1,_0x484892,_0x47817a[_0x224333]);}return __setModuleDefault(_0x355ad1,_0x484892),_0x355ad1;};}());Object[a0_0x2ee26c(0x11c)](exports,a0_0x2ee26c(0x162),{'value':!![]}),exports[a0_0x2ee26c(0x13a)]=filterLs,exports['filterTree']=filterTree,exports['filterCat']=filterCat,exports[a0_0x2ee26c(0xf6)]=filterGrep,exports['filterFind']=filterFind;const path=__importStar(require('path')),generic_1=require(a0_0x2ee26c(0x135)),tracker_1=require('../tracker');function isFeatureEnabled(_0x19e1fd){const _0x535561=a0_0x2ee26c;try{const _0x545992=tracker_1[_0x535561(0xee)][_0x535561(0x169)](),_0x328885=_0x545992[_0x535561(0x171)];if(!_0x328885||_0x328885[_0x19e1fd]===undefined)return!![];return _0x328885[_0x19e1fd]!==![];}catch{return!![];}}const LOCK_FILES=['package-lock.json',a0_0x2ee26c(0x107),a0_0x2ee26c(0x132),a0_0x2ee26c(0x144),a0_0x2ee26c(0xeb),a0_0x2ee26c(0x174),a0_0x2ee26c(0x127),a0_0x2ee26c(0x15d),a0_0x2ee26c(0x13f)],BINARY_EXTENSIONS=[a0_0x2ee26c(0xf3),'.min.css',a0_0x2ee26c(0x11e),a0_0x2ee26c(0x143),a0_0x2ee26c(0x10e),a0_0x2ee26c(0x114),a0_0x2ee26c(0x16c),a0_0x2ee26c(0xf5),a0_0x2ee26c(0x101),'.bmp',a0_0x2ee26c(0x103),a0_0x2ee26c(0x100),'.pdf',a0_0x2ee26c(0x102),a0_0x2ee26c(0xfb),a0_0x2ee26c(0x108),a0_0x2ee26c(0x14e),'.bz2',a0_0x2ee26c(0x178),'.rar',a0_0x2ee26c(0x177),a0_0x2ee26c(0x11d),a0_0x2ee26c(0x12d),'.dylib',a0_0x2ee26c(0x179),'.dat','.sqlite',a0_0x2ee26c(0xf8),'.sqlite3',a0_0x2ee26c(0x112),a0_0x2ee26c(0x14a),'.ttf',a0_0x2ee26c(0x10f),'.otf',a0_0x2ee26c(0x175),a0_0x2ee26c(0x13b),a0_0x2ee26c(0x15a),a0_0x2ee26c(0x159),a0_0x2ee26c(0x165),a0_0x2ee26c(0x134),a0_0x2ee26c(0x128),a0_0x2ee26c(0xef),a0_0x2ee26c(0x130),'.o',a0_0x2ee26c(0x14f)];function extractFilename(_0x2c6f2d){const _0x4176f7=a0_0x2ee26c,_0x4a0ca6=_0x2c6f2d['trim']()[_0x4176f7(0x115)](/\s+/);for(let _0x35ff11=0x1;_0x35ff11<_0x4a0ca6[_0x4176f7(0x166)];_0x35ff11++){if(!_0x4a0ca6[_0x35ff11]['startsWith']('-'))return _0x4a0ca6[_0x35ff11];}return null;}function filterLockFile(_0x13cab2,_0x4f43ae){const _0x3d14ef=a0_0x2ee26c;try{const _0x69ccd2=path[_0x3d14ef(0x16e)](_0x4f43ae)[_0x3d14ef(0xfc)]();if(!LOCK_FILES[_0x3d14ef(0x173)](_0xf0aa08=>_0x69ccd2===_0xf0aa08[_0x3d14ef(0xfc)]()))return null;const _0xa280cd=_0x13cab2[_0x3d14ef(0x166)];let _0x1035e8=0x0;if(_0x69ccd2===_0x3d14ef(0x141))try{const _0xf21a49=JSON[_0x3d14ef(0x109)](_0x13cab2);_0x1035e8=Object[_0x3d14ef(0x176)](_0xf21a49[_0x3d14ef(0x148)]||_0xf21a49[_0x3d14ef(0x12e)]||{})['length'];}catch{_0x1035e8=(_0x13cab2[_0x3d14ef(0x17a)](/"resolved":/g)||[])[_0x3d14ef(0x166)];}else{if(_0x69ccd2==='yarn.lock')_0x1035e8=(_0x13cab2[_0x3d14ef(0x17a)](/^"?[^#\s][^:]*:$/gm)||[])[_0x3d14ef(0x166)];else{if(_0x69ccd2===_0x3d14ef(0x10a)||_0x69ccd2===_0x3d14ef(0x174))_0x1035e8=(_0x13cab2[_0x3d14ef(0x17a)](/\[\[package\]\]/g)||[])['length'];else{if(_0x69ccd2==='go.sum')_0x1035e8=Math[_0x3d14ef(0x164)](_0x13cab2[_0x3d14ef(0x115)]('\x0a')[_0x3d14ef(0xf1)](_0x17c72f=>_0x17c72f['trim']())[_0x3d14ef(0x166)]/0x2);else{if(_0x69ccd2==='composer.lock')try{_0x1035e8=JSON[_0x3d14ef(0x109)](_0x13cab2)[_0x3d14ef(0x148)]?.[_0x3d14ef(0x166)]||0x0;}catch{}else _0x69ccd2===_0x3d14ef(0x132)?_0x1035e8=(_0x13cab2['match'](/^\s{2}['"@a-z]/gm)||[])[_0x3d14ef(0x166)]:_0x1035e8=_0x13cab2[_0x3d14ef(0x115)]('\x0a')[_0x3d14ef(0xf1)](_0x371105=>_0x371105[_0x3d14ef(0x10d)]())[_0x3d14ef(0x166)];}}}}return _0x3d14ef(0x122)+path[_0x3d14ef(0x16e)](_0x4f43ae)+':\x20'+_0x1035e8+_0x3d14ef(0x170)+_0xa280cd[_0x3d14ef(0x12c)]()+_0x3d14ef(0x16d);}catch{return null;}}function filterBinaryOrMinified(_0x5b0d49,_0x328246){const _0x273ec5=a0_0x2ee26c;try{if(_0x328246){const _0x48333f=_0x328246['toLowerCase']();for(const _0x281d3f of BINARY_EXTENSIONS){if(_0x48333f[_0x273ec5(0x118)](_0x281d3f))return _0x273ec5(0x138)+path[_0x273ec5(0x16e)](_0x328246)+',\x20'+_0x5b0d49[_0x273ec5(0x166)][_0x273ec5(0x12c)]()+_0x273ec5(0x17e)+_0x281d3f+_0x273ec5(0x146);}}const _0x2d3dd5=_0x5b0d49[_0x273ec5(0xec)](0x0,0x3e8);let _0x5de70d=0x0;for(let _0x55fadb=0x0;_0x55fadb<_0x2d3dd5['length'];_0x55fadb++){if(_0x2d3dd5['charCodeAt'](_0x55fadb)===0x0)_0x5de70d++;}if(_0x5de70d>0x0)return _0x273ec5(0x13c)+_0x5b0d49['length'][_0x273ec5(0x12c)]()+_0x273ec5(0xed);let _0x7d18cb=0x0;for(let _0xa727d2=0x0;_0xa727d2<_0x2d3dd5[_0x273ec5(0x166)];_0xa727d2++){const _0x3a556b=_0x2d3dd5['charCodeAt'](_0xa727d2);if(_0x3a556b<0x20&&_0x3a556b!==0xa&&_0x3a556b!==0xd&&_0x3a556b!==0x9)_0x7d18cb++;}if(_0x2d3dd5[_0x273ec5(0x166)]>0x64&&_0x7d18cb>_0x2d3dd5['length']*0.1)return'[binary\x20file]\x20'+_0x5b0d49[_0x273ec5(0x166)][_0x273ec5(0x12c)]()+_0x273ec5(0x12f);const _0x910322=_0x5b0d49[_0x273ec5(0x115)]('\x0a');if(_0x910322[_0x273ec5(0x166)]<=0x3&&_0x5b0d49['length']>0x1388)return _0x273ec5(0x119)+_0x5b0d49[_0x273ec5(0x166)][_0x273ec5(0x12c)]()+_0x273ec5(0x155)+_0x910322[_0x273ec5(0x166)]+_0x273ec5(0x11f);return null;}catch{return null;}}function filterJsonMinify(_0x304baf){const _0x273a5f=a0_0x2ee26c;try{const _0x499be3=_0x304baf[_0x273a5f(0x10d)]();if(!_0x499be3[_0x273a5f(0x17d)]('{')&&!_0x499be3[_0x273a5f(0x17d)]('['))return null;const _0x164169=_0x499be3[_0x273a5f(0x115)]('\x0a');if(_0x164169[_0x273a5f(0x166)]<=0x14)return null;const _0x21e740=JSON[_0x273a5f(0x109)](_0x499be3),_0x9ecf66=JSON[_0x273a5f(0x121)](_0x21e740);if(_0x9ecf66[_0x273a5f(0x166)]<_0x499be3['length'])return _0x9ecf66;return null;}catch{return null;}}function filterLs(_0x4bc56b){const _0x71033b=a0_0x2ee26c,_0x2c5e39=_0x4bc56b[_0x71033b(0x115)]('\x0a')['filter'](_0x3f927e=>_0x3f927e[_0x71033b(0x10d)]()[_0x71033b(0x166)]>0x0);if(_0x2c5e39[_0x71033b(0x166)]===0x0)return _0x71033b(0x106);if(_0x2c5e39[_0x71033b(0x166)]<=0x1e)return _0x4bc56b[_0x71033b(0x10d)]();const _0x1211fe=[],_0xdc9621=[];for(const _0x54212f of _0x2c5e39){const _0x1eea6b=_0x54212f[_0x71033b(0x10d)]();if(_0x1eea6b[_0x71033b(0x17d)]('total\x20')||_0x1eea6b[_0x71033b(0x17d)]('d')&&_0x1eea6b[_0x71033b(0xfa)]('..'))continue;_0x1eea6b[_0x71033b(0x118)]('/')||_0x1eea6b[_0x71033b(0x17d)]('d')&&_0x1eea6b['includes']('\x20')?_0x1211fe[_0x71033b(0x172)](_0x1eea6b):_0xdc9621[_0x71033b(0x172)](_0x1eea6b);}const _0x503e67=[];return _0x1211fe[_0x71033b(0x166)]>0x0&&(_0x1211fe[_0x71033b(0x166)]<=0xf?_0x503e67[_0x71033b(0x172)](..._0x1211fe):(_0x503e67[_0x71033b(0x172)](..._0x1211fe[_0x71033b(0x15f)](0x0,0xa)),_0x503e67[_0x71033b(0x172)](_0x71033b(0x116)+(_0x1211fe[_0x71033b(0x166)]-0xa)+'\x20more\x20directories'))),_0xdc9621['length']>0x0&&(_0xdc9621[_0x71033b(0x166)]<=0x14?_0x503e67[_0x71033b(0x172)](..._0xdc9621):(_0x503e67[_0x71033b(0x172)](..._0xdc9621['slice'](0x0,0xf)),_0x503e67[_0x71033b(0x172)]('...\x20+'+(_0xdc9621['length']-0xf)+'\x20more\x20files'))),_0x503e67[_0x71033b(0x172)]('\x0a('+_0x1211fe[_0x71033b(0x166)]+_0x71033b(0x16a)+_0xdc9621[_0x71033b(0x166)]+_0x71033b(0x17c)),_0x503e67['join']('\x0a');}function filterTree(_0x3cf8b5){const _0x6d9e09=a0_0x2ee26c,_0x52b94b=_0x3cf8b5[_0x6d9e09(0x115)]('\x0a');if(_0x52b94b[_0x6d9e09(0x166)]<=0x32)return _0x3cf8b5[_0x6d9e09(0x10d)]();const _0x3b65d0=[];let _0x46247d=0x0,_0x3010cf=0x0,_0x1ccbc0=0x0;for(const _0x1d37b7 of _0x52b94b){const _0x4368d7=_0x1d37b7[_0x6d9e09(0x17a)](/(\d+)\s+director/),_0x3433c9=_0x1d37b7[_0x6d9e09(0x17a)](/(\d+)\s+file/);if(_0x4368d7)_0x1ccbc0=parseInt(_0x4368d7[0x1]);if(_0x3433c9)_0x3010cf=parseInt(_0x3433c9[0x1]);const _0x42cbcb=(_0x1d37b7[_0x6d9e09(0x17a)](/^[│├└\s─]+/)||[''])[0x0][_0x6d9e09(0x166)];_0x42cbcb<=0x4&&(_0x3b65d0[_0x6d9e09(0x172)](_0x1d37b7),_0x46247d++);}return _0x52b94b['length']>_0x3b65d0['length']&&_0x3b65d0['push'](_0x6d9e09(0xf7)+_0x1ccbc0+_0x6d9e09(0x16a)+_0x3010cf+_0x6d9e09(0x156)),_0x3b65d0['join']('\x0a');}function filterCat(_0x444a66,_0x821c04=''){const _0x172486=a0_0x2ee26c,_0x22706b=extractFilename(_0x821c04);try{if(_0x22706b&&isFeatureEnabled('lock')){const _0x229fcd=filterLockFile(_0x444a66,_0x22706b);if(_0x229fcd)return _0x229fcd;}if(isFeatureEnabled(_0x172486(0x145))){const _0x58b16c=filterBinaryOrMinified(_0x444a66,_0x22706b);if(_0x58b16c)return _0x58b16c;}if(isFeatureEnabled(_0x172486(0x14d))){const _0x44fcbc=(0x0,generic_1['smartCrushJson'])(_0x444a66);if(_0x44fcbc)return _0x44fcbc;}const _0x562cd8=filterJsonMinify(_0x444a66);if(_0x562cd8)return _0x562cd8;if(_0x22706b&&isFeatureEnabled(_0x172486(0x15c))){const _0x551824=path[_0x172486(0xff)](_0x22706b)[_0x172486(0xfc)](),_0x36f17c=['.ts',_0x172486(0x126),_0x172486(0x163),_0x172486(0x11a),'.py','.go',_0x172486(0x133),_0x172486(0x157),'.c',_0x172486(0x152),'.cs','.rb',_0x172486(0xf2),'.kt'];if(_0x36f17c[_0x172486(0xfa)](_0x551824)){const _0x560bb0=_0x444a66[_0x172486(0x115)]('\x0a');if(_0x560bb0[_0x172486(0x166)]>0x64){const _0x367073=[];_0x367073[_0x172486(0x172)](_0x172486(0x117)+path[_0x172486(0x16e)](_0x22706b)+'\x20('+_0x560bb0[_0x172486(0x166)]+'\x20lines)'),_0x367073[_0x172486(0x172)]('');for(const _0x4448a0 of _0x560bb0){const _0x1cabff=_0x4448a0['trim']();if(_0x1cabff[_0x172486(0x17d)](_0x172486(0x137))||_0x1cabff[_0x172486(0x17d)](_0x172486(0xf9))||_0x1cabff[_0x172486(0x17d)](_0x172486(0x13e))||_0x1cabff['match'](/=\s*require\(/)||_0x1cabff[_0x172486(0x17d)](_0x172486(0x125))||_0x1cabff['startsWith'](_0x172486(0x14c))||_0x1cabff[_0x172486(0x17d)](_0x172486(0x151)))_0x367073[_0x172486(0x172)](_0x4448a0);else{if(_0x1cabff['match'](/^(export\s+)?(async\s+)?function\s+/)||_0x1cabff['match'](/^(export\s+)?(default\s+)?class\s+/)||_0x1cabff[_0x172486(0x17a)](/^(export\s+)?(type|interface|enum)\s+/)||_0x1cabff[_0x172486(0x17a)](/^(async\s+)?def\s+/)||_0x1cabff['match'](/^func\s+/)||_0x1cabff[_0x172486(0x17a)](/^type\s+\w+\s+(struct|interface)/)||_0x1cabff['match'](/^(pub\s+)?(async\s+)?fn\s+/)||_0x1cabff['match'](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x1cabff[_0x172486(0x17a)](/^(public|private|protected|static)\s+/))_0x367073['push'](_0x4448a0);else{if(_0x1cabff[_0x172486(0x17d)](_0x172486(0x167))&&!_0x1cabff[_0x172486(0xfa)]('=>')&&_0x1cabff['length']<0x78)_0x367073['push'](_0x4448a0);else _0x1cabff['startsWith']('@')&&!_0x1cabff[_0x172486(0x17d)]('@param')&&!_0x1cabff[_0x172486(0x17d)]('@return')&&_0x367073['push'](_0x4448a0);}}}_0x367073[_0x172486(0x172)](''),_0x367073['push']('('+_0x560bb0['length']+_0x172486(0x12a)+(_0x367073[_0x172486(0x166)]-0x2)+_0x172486(0x120));const _0x435f7c=_0x367073[_0x172486(0xfe)]('\x0a');if(_0x435f7c['length']<_0x444a66['length'])return _0x435f7c;}}}}catch{}let _0x23ac9d=(0x0,generic_1['collapseWhitespace'])(_0x444a66);if(_0x22706b){const _0x8a8cb1=path[_0x172486(0xff)](_0x22706b)[_0x172486(0xfc)]();_0x23ac9d=(0x0,generic_1['stripComments'])(_0x23ac9d,_0x8a8cb1);}const _0x38b02c=_0x23ac9d[_0x172486(0x115)]('\x0a');if(_0x38b02c[_0x172486(0x166)]<=0x64)return _0x23ac9d;const _0x33bb25=[];return _0x33bb25[_0x172486(0x172)](..._0x38b02c[_0x172486(0x15f)](0x0,0x32)),_0x33bb25['push'](_0x172486(0x12b)+(_0x38b02c['length']-0x50)+_0x172486(0x136)),_0x33bb25[_0x172486(0x172)](..._0x38b02c[_0x172486(0x15f)](-0x1e)),_0x33bb25[_0x172486(0x172)]('\x0a('+_0x38b02c[_0x172486(0x166)]+_0x172486(0xfd)),_0x33bb25[_0x172486(0xfe)]('\x0a');}function a0_0x1c12(){const _0xc437ba=['length','export\x20','dirname','getConfig','\x20directories,\x20','4859425avGBIF','.jpeg','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','basename','create','\x20dependencies,\x20','features_enabled','push','some','poetry.lock','.mp3','keys','.exe','.7z','.bin','match','prototype','\x20files)','startsWith','\x20chars,\x20type:\x20','go.sum','substring','\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)','tracker','.pyo','2vWWiLe','filter','.swift','.min.js','entries','.gif','filterGrep','\x0a...\x20(','.db','from\x20','includes','.tar.gz','toLowerCase','\x20lines\x20total)','join','extname','.svg','.ico','.zip','.webp','\x20files\x20found\x20across\x20','9903924icjjBA','Empty\x20directory','yarn.lock','.tgz','parse','cargo.lock','\x20\x20...\x20+','\x20more\x20directories','trim','.png','.eot','get','No\x20files\x20found','.woff','56DAGVtG','.jpg','split','...\x20+','[code\x20skeleton]\x20','endsWith','[minified\x20file]\x20','.jsx','call','defineProperty','.dll','.map','\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)','\x20structural\x20lines\x20shown)','stringify','[lock\x20file]\x20','__importStar','__setModuleDefault','#include\x20','.js','composer.lock','.pyc','getOwnPropertyNames','\x20lines\x20total,\x20','\x0a...\x20[','toLocaleString','.so','dependencies','\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)','.class','__createBinding','pnpm-lock.yaml','.rs','.webm','./generic','\x20lines\x20truncated]\x20...\x0a','import\x20','[binary/minified\x20file]\x20',':\x20...\x20(','filterLs','.mp4','[binary\x20file]\x20','\x20more\x20files\x20with\x20matches','require(','bun.lockb','indexOf','package-lock.json','default','.wasm','Cargo.lock','binary','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','/\x20(','packages','No\x20matches\x20found','.woff2','5276370ZlLJzR','use\x20','json_crusher','.gz','.obj','638904bsrZNt','package\x20','.cpp','hasOwnProperty','2918076WPDXLZ','\x20chars\x20across\x20','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','.java','\x20matches\x20in\x20this\x20file)','.avi','.wav','122489GtOzAb','skeleton','Gemfile.lock','configurable','slice','5196192famTDU','\x20directories','__esModule','.tsx','floor','.mov'];a0_0x1c12=function(){return _0xc437ba;};return a0_0x1c12();}function filterGrep(_0x59099d){const _0x4ac22d=a0_0x2ee26c,_0x292825=_0x59099d[_0x4ac22d(0x115)]('\x0a')[_0x4ac22d(0xf1)](_0x3d515c=>_0x3d515c[_0x4ac22d(0x10d)]()[_0x4ac22d(0x166)]>0x0);if(_0x292825[_0x4ac22d(0x166)]===0x0)return _0x4ac22d(0x149);if(_0x292825[_0x4ac22d(0x166)]<=0x32)return _0x59099d[_0x4ac22d(0x10d)]();const _0x5806f1={},_0x48be11=[];for(const _0x5e5fe5 of _0x292825){const _0x4a9c98=_0x5e5fe5[_0x4ac22d(0x140)](':');if(_0x4a9c98>0x0&&_0x4a9c98<0xc8){const _0x15b01d=_0x5e5fe5[_0x4ac22d(0xec)](0x0,_0x4a9c98);if(_0x15b01d[_0x4ac22d(0xfa)]('/')||_0x15b01d[_0x4ac22d(0xfa)]('\x5c')||_0x15b01d[_0x4ac22d(0xfa)]('.')){if(!_0x5806f1[_0x15b01d])_0x5806f1[_0x15b01d]=[];_0x5806f1[_0x15b01d][_0x4ac22d(0x172)](_0x5e5fe5[_0x4ac22d(0xec)](_0x4a9c98+0x1)[_0x4ac22d(0x10d)]());continue;}}_0x48be11[_0x4ac22d(0x172)](_0x5e5fe5);}const _0x3c8f15=[],_0x17b07f=Object[_0x4ac22d(0x176)](_0x5806f1);if(_0x17b07f['length']>0x0){const _0x3a2de0=0x14,_0x5efdbf=_0x17b07f['slice'](0x0,_0x3a2de0);for(const _0x2de96d of _0x5efdbf){const _0x5441ee=_0x5806f1[_0x2de96d];if(_0x5441ee['length']<=0x3)for(const _0x8dbd7 of _0x5441ee){_0x3c8f15[_0x4ac22d(0x172)](_0x2de96d+':\x20'+_0x8dbd7);}else _0x3c8f15[_0x4ac22d(0x172)](_0x2de96d+':\x20'+_0x5441ee[0x0]),_0x3c8f15[_0x4ac22d(0x172)](_0x2de96d+_0x4ac22d(0x139)+_0x5441ee[_0x4ac22d(0x166)]+_0x4ac22d(0x158));}_0x17b07f[_0x4ac22d(0x166)]>_0x3a2de0&&_0x3c8f15[_0x4ac22d(0x172)]('...\x20+'+(_0x17b07f[_0x4ac22d(0x166)]-_0x3a2de0)+_0x4ac22d(0x13d));}if(_0x48be11[_0x4ac22d(0x166)]>0x0){const _0x156ac9=0x1e;_0x3c8f15[_0x4ac22d(0x172)](..._0x48be11[_0x4ac22d(0x15f)](0x0,_0x156ac9)),_0x48be11[_0x4ac22d(0x166)]>_0x156ac9&&_0x3c8f15[_0x4ac22d(0x172)](_0x4ac22d(0x116)+(_0x48be11['length']-_0x156ac9)+'\x20more\x20matches');}const _0x5c8684=_0x292825[_0x4ac22d(0x166)];return _0x3c8f15['push']('\x0a('+_0x5c8684+'\x20matches\x20across\x20'+(_0x17b07f[_0x4ac22d(0x166)]||'?')+_0x4ac22d(0x17c)),_0x3c8f15[_0x4ac22d(0xfe)]('\x0a');}function a0_0x4f5a(_0x307747,_0x15a1b3){_0x307747=_0x307747-0xeb;const _0x1c1201=a0_0x1c12();let _0x4f5ad4=_0x1c1201[_0x307747];return _0x4f5ad4;}function filterFind(_0x439d0f){const _0x5ea1d0=a0_0x2ee26c,_0x14a41=_0x439d0f[_0x5ea1d0(0x115)]('\x0a')['filter'](_0x1f9fbf=>_0x1f9fbf['trim']()[_0x5ea1d0(0x166)]>0x0);if(_0x14a41[_0x5ea1d0(0x166)]===0x0)return _0x5ea1d0(0x111);if(_0x14a41[_0x5ea1d0(0x166)]<=0x32)return _0x439d0f['trim']();const _0x21480e={};for(const _0x416b94 of _0x14a41){const _0x5c3696=path[_0x5ea1d0(0x168)](_0x416b94['trim']())||'.';_0x21480e[_0x5c3696]=(_0x21480e[_0x5c3696]||0x0)+0x1;}const _0x407b3f=Object[_0x5ea1d0(0xf4)](_0x21480e)['sort']((_0x43dc7b,_0x140ce7)=>_0x140ce7[0x1]-_0x43dc7b[0x1]),_0x550071=[_0x14a41['length']+_0x5ea1d0(0x104)+_0x407b3f[_0x5ea1d0(0x166)]+_0x5ea1d0(0x161),''],_0xe706d=0x1e;for(const [_0x18bf54,_0x537ce6]of _0x407b3f[_0x5ea1d0(0x15f)](0x0,_0xe706d)){_0x550071[_0x5ea1d0(0x172)]('\x20\x20'+_0x18bf54+_0x5ea1d0(0x147)+_0x537ce6+_0x5ea1d0(0x17c));}return _0x407b3f[_0x5ea1d0(0x166)]>_0xe706d&&_0x550071['push'](_0x5ea1d0(0x10b)+(_0x407b3f['length']-_0xe706d)+_0x5ea1d0(0x10c)),_0x550071[_0x5ea1d0(0xfe)]('\x0a');}
|
|
1
|
+
'use strict';const a0_0x231881=a0_0x40be;function a0_0xe33e(){const _0x1848b7=[':\x20...\x20(','substring','\x0a...\x20(','3352fIQSfQ','\x20chars,\x20type:\x20','\x20lines)','#include\x20','.sqlite','entries','extname','.tar.gz','[lock\x20file]\x20','package-lock.json','No\x20files\x20found','.pdf','indexOf','create','.jpg','.bz2','getConfig','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','match','yarn.lock','\x20lines\x20total,\x20','length','\x20files)','bun.lockb','.js','.png','.rar','basename','.cpp','push','collapseWhitespace','No\x20matches\x20found','900322ToeDxS','.ttf','Gemfile.lock','\x20directories','.rs','filterCat','composer.lock','smartCrushJson','filter','pnpm-lock.yaml','\x20more\x20files','.zip','.swift','getOwnPropertyDescriptor','[code\x20skeleton]\x20','writable','\x20more\x20directories','3hDaWAd','poetry.lock','.7z','\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)','package\x20','1492110JRrGUp','181337bsHrMO','slice','.sqlite3','.cs','.webp','from\x20','.woff2','.wasm','toLocaleString','.map','.mov','.kt','startsWith','packages','[minified\x20file]\x20','Empty\x20directory','99REbQAL','keys','require(','getOwnPropertyNames','93156fufWyC','defineProperty','.min.js','default','.go','../tracker','stringify','.bmp','floor','@return','\x20lines\x20truncated]\x20...\x0a','trim','.dat','...\x20+','join','filterFind','\x20lines\x20total)','__esModule','get','\x20files\x20found\x20across\x20','.class','__createBinding','697653yfzlvP','@param','dirname','charCodeAt','dependencies','.rb','.db','.svg','2886QxRxpG','.wav','1020gACYNO','total\x20','.min.css','parse','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','.jpeg','.java','go.sum','prototype','.avi','filterTree','[binary\x20file]\x20','tracker','.otf','endsWith','16290oCbvrd','[binary/minified\x20file]\x20','.tsx','\x20chars\x20across\x20','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','\x20dependencies,\x20','includes','.bin','.eot','toLowerCase','path','sort','\x20matches\x20across\x20','skeleton','split','hasOwnProperty','.ts','.exe','import\x20','\x20\x20...\x20+','\x20more\x20files\x20with\x20matches','.mp3','stripComments','use\x20','.webm','.obj','\x20directories,\x20','configurable','60AoLCAD','.so','export\x20','./generic','9289vcKKsw'];a0_0xe33e=function(){return _0x1848b7;};return a0_0xe33e();}(function(_0x162fb5,_0x3e4e20){const _0x1f6564=a0_0x40be,_0x27abff=_0x162fb5();while(!![]){try{const _0x592be9=parseInt(_0x1f6564(0x14f))/0x1*(-parseInt(_0x1f6564(0x13e))/0x2)+-parseInt(_0x1f6564(0x17f))/0x3+parseInt(_0x1f6564(0x169))/0x4*(-parseInt(_0x1f6564(0x116))/0x5)+parseInt(_0x1f6564(0x187))/0x6*(-parseInt(_0x1f6564(0x11a))/0x7)+parseInt(_0x1f6564(0x11e))/0x8*(parseInt(_0x1f6564(0xfa))/0x9)+-parseInt(_0x1f6564(0x154))/0xa*(-parseInt(_0x1f6564(0x165))/0xb)+-parseInt(_0x1f6564(0x189))/0xc*(-parseInt(_0x1f6564(0x155))/0xd);if(_0x592be9===_0x3e4e20)break;else _0x27abff['push'](_0x27abff['shift']());}catch(_0x4c0897){_0x27abff['push'](_0x27abff['shift']());}}}(a0_0xe33e,0xbfef5));var __createBinding=this&&this[a0_0x231881(0x17e)]||(Object[a0_0x231881(0x12b)]?function(_0x44bce6,_0x2fb879,_0x2c318e,_0x5c6c71){const _0x5ea32b=a0_0x231881;if(_0x5c6c71===undefined)_0x5c6c71=_0x2c318e;var _0x423fa5=Object[_0x5ea32b(0x14b)](_0x2fb879,_0x2c318e);(!_0x423fa5||(_0x5ea32b(0x17b)in _0x423fa5?!_0x2fb879['__esModule']:_0x423fa5[_0x5ea32b(0x14d)]||_0x423fa5[_0x5ea32b(0x115)]))&&(_0x423fa5={'enumerable':!![],'get':function(){return _0x2fb879[_0x2c318e];}}),Object[_0x5ea32b(0x16a)](_0x44bce6,_0x5c6c71,_0x423fa5);}:function(_0x3a8fae,_0x3f75,_0x295ab3,_0x54a336){if(_0x54a336===undefined)_0x54a336=_0x295ab3;_0x3a8fae[_0x54a336]=_0x3f75[_0x295ab3];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x50ccea,_0x127f22){const _0x41dffc=a0_0x231881;Object[_0x41dffc(0x16a)](_0x50ccea,_0x41dffc(0x16c),{'enumerable':!![],'value':_0x127f22});}:function(_0x2acef5,_0x3edee7){const _0xf0df1e=a0_0x231881;_0x2acef5[_0xf0df1e(0x16c)]=_0x3edee7;}),__importStar=this&&this['__importStar']||(function(){var _0x10a932=function(_0x34a771){const _0x59395a=a0_0x40be;return _0x10a932=Object[_0x59395a(0x168)]||function(_0x4e1f54){const _0x2aae6b=_0x59395a;var _0x817b2d=[];for(var _0x5d28da in _0x4e1f54)if(Object[_0x2aae6b(0x191)][_0x2aae6b(0x109)]['call'](_0x4e1f54,_0x5d28da))_0x817b2d[_0x817b2d[_0x2aae6b(0x133)]]=_0x5d28da;return _0x817b2d;},_0x10a932(_0x34a771);};return function(_0x3c81ca){const _0x46a037=a0_0x40be;if(_0x3c81ca&&_0x3c81ca[_0x46a037(0x17a)])return _0x3c81ca;var _0x153d81={};if(_0x3c81ca!=null){for(var _0x19d836=_0x10a932(_0x3c81ca),_0x1af62a=0x0;_0x1af62a<_0x19d836[_0x46a037(0x133)];_0x1af62a++)if(_0x19d836[_0x1af62a]!==_0x46a037(0x16c))__createBinding(_0x153d81,_0x3c81ca,_0x19d836[_0x1af62a]);}return __setModuleDefault(_0x153d81,_0x3c81ca),_0x153d81;};}());Object[a0_0x231881(0x16a)](exports,a0_0x231881(0x17a),{'value':!![]}),exports['filterLs']=filterLs,exports[a0_0x231881(0x193)]=filterTree,exports[a0_0x231881(0x143)]=filterCat,exports['filterGrep']=filterGrep,exports[a0_0x231881(0x178)]=filterFind;const path=__importStar(require(a0_0x231881(0x104))),generic_1=require(a0_0x231881(0x119)),tracker_1=require(a0_0x231881(0x16e));function isFeatureEnabled(_0x5b0b28){const _0x2086ee=a0_0x231881;try{const _0x549b8f=tracker_1[_0x2086ee(0xf7)][_0x2086ee(0x12e)](),_0x2054bd=_0x549b8f['features_enabled'];if(!_0x2054bd||_0x2054bd[_0x5b0b28]===undefined)return!![];return _0x2054bd[_0x5b0b28]!==![];}catch{return!![];}}const LOCK_FILES=['package-lock.json','yarn.lock','pnpm-lock.yaml','Cargo.lock','go.sum','poetry.lock','composer.lock',a0_0x231881(0x140),a0_0x231881(0x135)],BINARY_EXTENSIONS=[a0_0x231881(0x16b),a0_0x231881(0x18b),a0_0x231881(0x15e),a0_0x231881(0x15c),a0_0x231881(0x137),a0_0x231881(0x12c),a0_0x231881(0x18e),'.gif','.ico',a0_0x231881(0x170),a0_0x231881(0x159),a0_0x231881(0x186),a0_0x231881(0x129),a0_0x231881(0x149),a0_0x231881(0x125),'.tgz','.gz',a0_0x231881(0x12d),a0_0x231881(0x151),a0_0x231881(0x138),a0_0x231881(0x10b),'.dll',a0_0x231881(0x117),'.dylib',a0_0x231881(0x101),a0_0x231881(0x175),a0_0x231881(0x122),a0_0x231881(0x185),a0_0x231881(0x157),'.woff',a0_0x231881(0x15b),a0_0x231881(0x13f),a0_0x231881(0x102),a0_0x231881(0xf8),a0_0x231881(0x10f),'.mp4',a0_0x231881(0x188),a0_0x231881(0x192),a0_0x231881(0x15f),a0_0x231881(0x112),'.pyc','.pyo',a0_0x231881(0x17d),'.o',a0_0x231881(0x113)];function extractFilename(_0x1361f8){const _0x423818=a0_0x231881,_0x4d3de1=_0x1361f8[_0x423818(0x174)]()[_0x423818(0x108)](/\s+/);for(let _0x2b1c89=0x1;_0x2b1c89<_0x4d3de1[_0x423818(0x133)];_0x2b1c89++){if(!_0x4d3de1[_0x2b1c89][_0x423818(0x161)]('-'))return _0x4d3de1[_0x2b1c89];}return null;}function filterLockFile(_0x590306,_0x1d3346){const _0x211206=a0_0x231881;try{const _0x1290d0=path[_0x211206(0x139)](_0x1d3346)[_0x211206(0x103)]();if(!LOCK_FILES['some'](_0x3b5a70=>_0x1290d0===_0x3b5a70[_0x211206(0x103)]()))return null;const _0x429b45=_0x590306[_0x211206(0x133)];let _0x3d76d9=0x0;if(_0x1290d0===_0x211206(0x127))try{const _0x3887ba=JSON[_0x211206(0x18c)](_0x590306);_0x3d76d9=Object['keys'](_0x3887ba[_0x211206(0x162)]||_0x3887ba[_0x211206(0x183)]||{})[_0x211206(0x133)];}catch{_0x3d76d9=(_0x590306[_0x211206(0x130)](/"resolved":/g)||[])['length'];}else{if(_0x1290d0===_0x211206(0x131))_0x3d76d9=(_0x590306[_0x211206(0x130)](/^"?[^#\s][^:]*:$/gm)||[])[_0x211206(0x133)];else{if(_0x1290d0==='cargo.lock'||_0x1290d0===_0x211206(0x150))_0x3d76d9=(_0x590306['match'](/\[\[package\]\]/g)||[])['length'];else{if(_0x1290d0===_0x211206(0x190))_0x3d76d9=Math[_0x211206(0x171)](_0x590306[_0x211206(0x108)]('\x0a')[_0x211206(0x146)](_0x430db0=>_0x430db0[_0x211206(0x174)]())[_0x211206(0x133)]/0x2);else{if(_0x1290d0===_0x211206(0x144))try{_0x3d76d9=JSON[_0x211206(0x18c)](_0x590306)[_0x211206(0x162)]?.[_0x211206(0x133)]||0x0;}catch{}else _0x1290d0===_0x211206(0x147)?_0x3d76d9=(_0x590306['match'](/^\s{2}['"@a-z]/gm)||[])[_0x211206(0x133)]:_0x3d76d9=_0x590306[_0x211206(0x108)]('\x0a')['filter'](_0x161684=>_0x161684[_0x211206(0x174)]())[_0x211206(0x133)];}}}}return _0x211206(0x126)+path[_0x211206(0x139)](_0x1d3346)+':\x20'+_0x3d76d9+_0x211206(0xff)+_0x429b45[_0x211206(0x15d)]()+_0x211206(0x12f);}catch{return null;}}function filterBinaryOrMinified(_0x2298da,_0x4fc494){const _0x2d62c0=a0_0x231881;try{if(_0x4fc494){const _0x3d2165=_0x4fc494['toLowerCase']();for(const _0x1999f7 of BINARY_EXTENSIONS){if(_0x3d2165['endsWith'](_0x1999f7))return _0x2d62c0(0xfb)+path[_0x2d62c0(0x139)](_0x4fc494)+',\x20'+_0x2298da['length'][_0x2d62c0(0x15d)]()+_0x2d62c0(0x11f)+_0x1999f7+_0x2d62c0(0xfe);}}const _0x4de991=_0x2298da[_0x2d62c0(0x11c)](0x0,0x3e8);let _0x528865=0x0;for(let _0x10594c=0x0;_0x10594c<_0x4de991[_0x2d62c0(0x133)];_0x10594c++){if(_0x4de991['charCodeAt'](_0x10594c)===0x0)_0x528865++;}if(_0x528865>0x0)return _0x2d62c0(0x194)+_0x2298da['length'][_0x2d62c0(0x15d)]()+_0x2d62c0(0x152);let _0x582010=0x0;for(let _0x4da3cd=0x0;_0x4da3cd<_0x4de991[_0x2d62c0(0x133)];_0x4da3cd++){const _0x39f944=_0x4de991[_0x2d62c0(0x182)](_0x4da3cd);if(_0x39f944<0x20&&_0x39f944!==0xa&&_0x39f944!==0xd&&_0x39f944!==0x9)_0x582010++;}if(_0x4de991[_0x2d62c0(0x133)]>0x64&&_0x582010>_0x4de991['length']*0.1)return'[binary\x20file]\x20'+_0x2298da[_0x2d62c0(0x133)][_0x2d62c0(0x15d)]()+'\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)';const _0x49ebea=_0x2298da[_0x2d62c0(0x108)]('\x0a');if(_0x49ebea[_0x2d62c0(0x133)]<=0x3&&_0x2298da[_0x2d62c0(0x133)]>0x1388)return _0x2d62c0(0x163)+_0x2298da[_0x2d62c0(0x133)][_0x2d62c0(0x15d)]()+_0x2d62c0(0xfd)+_0x49ebea[_0x2d62c0(0x133)]+'\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)';return null;}catch{return null;}}function filterJsonMinify(_0xbbc4f7){const _0x5eef38=a0_0x231881;try{const _0x169de2=_0xbbc4f7[_0x5eef38(0x174)]();if(!_0x169de2[_0x5eef38(0x161)]('{')&&!_0x169de2[_0x5eef38(0x161)]('['))return null;const _0x58c98e=_0x169de2[_0x5eef38(0x108)]('\x0a');if(_0x58c98e['length']<=0x14)return null;const _0x53ee46=JSON['parse'](_0x169de2),_0x5b9f20=JSON[_0x5eef38(0x16f)](_0x53ee46);if(_0x5b9f20[_0x5eef38(0x133)]<_0x169de2['length'])return _0x5b9f20;return null;}catch{return null;}}function filterLs(_0x126ac8){const _0x54f92e=a0_0x231881,_0x384468=_0x126ac8[_0x54f92e(0x108)]('\x0a')['filter'](_0x40ed6e=>_0x40ed6e[_0x54f92e(0x174)]()['length']>0x0);if(_0x384468[_0x54f92e(0x133)]===0x0)return _0x54f92e(0x164);if(_0x384468['length']<=0x1e)return _0x126ac8['trim']();const _0x530e45=[],_0x5e1b3f=[];for(const _0x575160 of _0x384468){const _0x585b97=_0x575160[_0x54f92e(0x174)]();if(_0x585b97[_0x54f92e(0x161)](_0x54f92e(0x18a))||_0x585b97[_0x54f92e(0x161)]('d')&&_0x585b97[_0x54f92e(0x100)]('..'))continue;_0x585b97[_0x54f92e(0xf9)]('/')||_0x585b97[_0x54f92e(0x161)]('d')&&_0x585b97[_0x54f92e(0x100)]('\x20')?_0x530e45[_0x54f92e(0x13b)](_0x585b97):_0x5e1b3f[_0x54f92e(0x13b)](_0x585b97);}const _0x1ef934=[];return _0x530e45[_0x54f92e(0x133)]>0x0&&(_0x530e45[_0x54f92e(0x133)]<=0xf?_0x1ef934['push'](..._0x530e45):(_0x1ef934[_0x54f92e(0x13b)](..._0x530e45[_0x54f92e(0x156)](0x0,0xa)),_0x1ef934['push'](_0x54f92e(0x176)+(_0x530e45[_0x54f92e(0x133)]-0xa)+_0x54f92e(0x14e)))),_0x5e1b3f[_0x54f92e(0x133)]>0x0&&(_0x5e1b3f[_0x54f92e(0x133)]<=0x14?_0x1ef934[_0x54f92e(0x13b)](..._0x5e1b3f):(_0x1ef934[_0x54f92e(0x13b)](..._0x5e1b3f[_0x54f92e(0x156)](0x0,0xf)),_0x1ef934[_0x54f92e(0x13b)](_0x54f92e(0x176)+(_0x5e1b3f['length']-0xf)+_0x54f92e(0x148)))),_0x1ef934['push']('\x0a('+_0x530e45[_0x54f92e(0x133)]+_0x54f92e(0x114)+_0x5e1b3f[_0x54f92e(0x133)]+_0x54f92e(0x134)),_0x1ef934['join']('\x0a');}function filterTree(_0x4d729a){const _0x355583=a0_0x231881,_0x35b6d9=_0x4d729a[_0x355583(0x108)]('\x0a');if(_0x35b6d9[_0x355583(0x133)]<=0x32)return _0x4d729a[_0x355583(0x174)]();const _0x33f3cf=[];let _0x311029=0x0,_0x564618=0x0,_0x364da7=0x0;for(const _0x42bb4b of _0x35b6d9){const _0x394abc=_0x42bb4b[_0x355583(0x130)](/(\d+)\s+director/),_0x250988=_0x42bb4b[_0x355583(0x130)](/(\d+)\s+file/);if(_0x394abc)_0x364da7=parseInt(_0x394abc[0x1]);if(_0x250988)_0x564618=parseInt(_0x250988[0x1]);const _0x30991b=(_0x42bb4b[_0x355583(0x130)](/^[│├└\s─]+/)||[''])[0x0]['length'];_0x30991b<=0x4&&(_0x33f3cf[_0x355583(0x13b)](_0x42bb4b),_0x311029++);}return _0x35b6d9[_0x355583(0x133)]>_0x33f3cf[_0x355583(0x133)]&&_0x33f3cf[_0x355583(0x13b)](_0x355583(0x11d)+_0x364da7+'\x20directories,\x20'+_0x564618+_0x355583(0x18d)),_0x33f3cf[_0x355583(0x177)]('\x0a');}function filterCat(_0x27e6af,_0x418308=''){const _0x3a237e=a0_0x231881,_0xa2ea12=extractFilename(_0x418308);try{if(_0xa2ea12&&isFeatureEnabled('lock')){const _0x4fd78e=filterLockFile(_0x27e6af,_0xa2ea12);if(_0x4fd78e)return _0x4fd78e;}if(isFeatureEnabled('binary')){const _0x434099=filterBinaryOrMinified(_0x27e6af,_0xa2ea12);if(_0x434099)return _0x434099;}if(isFeatureEnabled('json_crusher')){const _0x5902d1=(0x0,generic_1[_0x3a237e(0x145)])(_0x27e6af);if(_0x5902d1)return _0x5902d1;}const _0x3b625a=filterJsonMinify(_0x27e6af);if(_0x3b625a)return _0x3b625a;if(_0xa2ea12&&isFeatureEnabled(_0x3a237e(0x107))){const _0x1d5db2=path[_0x3a237e(0x124)](_0xa2ea12)['toLowerCase'](),_0x4e0709=[_0x3a237e(0x10a),_0x3a237e(0x136),_0x3a237e(0xfc),'.jsx','.py',_0x3a237e(0x16d),_0x3a237e(0x142),_0x3a237e(0x18f),'.c',_0x3a237e(0x13a),_0x3a237e(0x158),_0x3a237e(0x184),_0x3a237e(0x14a),_0x3a237e(0x160)];if(_0x4e0709['includes'](_0x1d5db2)){const _0xa3e64=_0x27e6af[_0x3a237e(0x108)]('\x0a');if(_0xa3e64[_0x3a237e(0x133)]>0x64){const _0x224dab=[];_0x224dab['push'](_0x3a237e(0x14c)+path[_0x3a237e(0x139)](_0xa2ea12)+'\x20('+_0xa3e64['length']+_0x3a237e(0x120)),_0x224dab[_0x3a237e(0x13b)]('');for(const _0x5e865d of _0xa3e64){const _0x23e264=_0x5e865d[_0x3a237e(0x174)]();if(_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x10c))||_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x15a))||_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x167))||_0x23e264['match'](/=\s*require\(/)||_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x121))||_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x111))||_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x153)))_0x224dab[_0x3a237e(0x13b)](_0x5e865d);else{if(_0x23e264[_0x3a237e(0x130)](/^(export\s+)?(async\s+)?function\s+/)||_0x23e264[_0x3a237e(0x130)](/^(export\s+)?(default\s+)?class\s+/)||_0x23e264[_0x3a237e(0x130)](/^(export\s+)?(type|interface|enum)\s+/)||_0x23e264['match'](/^(async\s+)?def\s+/)||_0x23e264[_0x3a237e(0x130)](/^func\s+/)||_0x23e264[_0x3a237e(0x130)](/^type\s+\w+\s+(struct|interface)/)||_0x23e264[_0x3a237e(0x130)](/^(pub\s+)?(async\s+)?fn\s+/)||_0x23e264['match'](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x23e264[_0x3a237e(0x130)](/^(public|private|protected|static)\s+/))_0x224dab[_0x3a237e(0x13b)](_0x5e865d);else{if(_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x118))&&!_0x23e264['includes']('=>')&&_0x23e264['length']<0x78)_0x224dab[_0x3a237e(0x13b)](_0x5e865d);else _0x23e264[_0x3a237e(0x161)]('@')&&!_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x180))&&!_0x23e264[_0x3a237e(0x161)](_0x3a237e(0x172))&&_0x224dab[_0x3a237e(0x13b)](_0x5e865d);}}}_0x224dab['push'](''),_0x224dab['push']('('+_0xa3e64[_0x3a237e(0x133)]+_0x3a237e(0x132)+(_0x224dab[_0x3a237e(0x133)]-0x2)+'\x20structural\x20lines\x20shown)');const _0x4b0c89=_0x224dab[_0x3a237e(0x177)]('\x0a');if(_0x4b0c89[_0x3a237e(0x133)]<_0x27e6af[_0x3a237e(0x133)])return _0x4b0c89;}}}}catch{}let _0x4f5343=(0x0,generic_1[_0x3a237e(0x13c)])(_0x27e6af);if(_0xa2ea12){const _0x38fb32=path[_0x3a237e(0x124)](_0xa2ea12)[_0x3a237e(0x103)]();_0x4f5343=(0x0,generic_1[_0x3a237e(0x110)])(_0x4f5343,_0x38fb32);}const _0x37d64a=_0x4f5343[_0x3a237e(0x108)]('\x0a');if(_0x37d64a[_0x3a237e(0x133)]<=0x64)return _0x4f5343;const _0x4f7ec1=[];return _0x4f7ec1[_0x3a237e(0x13b)](..._0x37d64a[_0x3a237e(0x156)](0x0,0x32)),_0x4f7ec1[_0x3a237e(0x13b)]('\x0a...\x20['+(_0x37d64a[_0x3a237e(0x133)]-0x50)+_0x3a237e(0x173)),_0x4f7ec1[_0x3a237e(0x13b)](..._0x37d64a['slice'](-0x1e)),_0x4f7ec1[_0x3a237e(0x13b)]('\x0a('+_0x37d64a['length']+_0x3a237e(0x179)),_0x4f7ec1[_0x3a237e(0x177)]('\x0a');}function filterGrep(_0x60339){const _0x486de1=a0_0x231881,_0x35db28=_0x60339[_0x486de1(0x108)]('\x0a')[_0x486de1(0x146)](_0x3b2498=>_0x3b2498[_0x486de1(0x174)]()['length']>0x0);if(_0x35db28['length']===0x0)return _0x486de1(0x13d);if(_0x35db28[_0x486de1(0x133)]<=0x32)return _0x60339[_0x486de1(0x174)]();const _0x1ccf0f={},_0x57509b=[];for(const _0x133a40 of _0x35db28){const _0x4be13e=_0x133a40[_0x486de1(0x12a)](':');if(_0x4be13e>0x0&&_0x4be13e<0xc8){const _0x324190=_0x133a40[_0x486de1(0x11c)](0x0,_0x4be13e);if(_0x324190['includes']('/')||_0x324190[_0x486de1(0x100)]('\x5c')||_0x324190['includes']('.')){if(!_0x1ccf0f[_0x324190])_0x1ccf0f[_0x324190]=[];_0x1ccf0f[_0x324190][_0x486de1(0x13b)](_0x133a40[_0x486de1(0x11c)](_0x4be13e+0x1)[_0x486de1(0x174)]());continue;}}_0x57509b[_0x486de1(0x13b)](_0x133a40);}const _0x3f2687=[],_0xf41232=Object[_0x486de1(0x166)](_0x1ccf0f);if(_0xf41232[_0x486de1(0x133)]>0x0){const _0x1e87b1=0x14,_0x5b8b03=_0xf41232[_0x486de1(0x156)](0x0,_0x1e87b1);for(const _0x589cab of _0x5b8b03){const _0x1c2b8c=_0x1ccf0f[_0x589cab];if(_0x1c2b8c[_0x486de1(0x133)]<=0x3)for(const _0x40af14 of _0x1c2b8c){_0x3f2687[_0x486de1(0x13b)](_0x589cab+':\x20'+_0x40af14);}else _0x3f2687[_0x486de1(0x13b)](_0x589cab+':\x20'+_0x1c2b8c[0x0]),_0x3f2687[_0x486de1(0x13b)](_0x589cab+_0x486de1(0x11b)+_0x1c2b8c[_0x486de1(0x133)]+'\x20matches\x20in\x20this\x20file)');}_0xf41232[_0x486de1(0x133)]>_0x1e87b1&&_0x3f2687[_0x486de1(0x13b)](_0x486de1(0x176)+(_0xf41232[_0x486de1(0x133)]-_0x1e87b1)+_0x486de1(0x10e));}if(_0x57509b[_0x486de1(0x133)]>0x0){const _0x3ab657=0x1e;_0x3f2687[_0x486de1(0x13b)](..._0x57509b[_0x486de1(0x156)](0x0,_0x3ab657)),_0x57509b[_0x486de1(0x133)]>_0x3ab657&&_0x3f2687[_0x486de1(0x13b)](_0x486de1(0x176)+(_0x57509b[_0x486de1(0x133)]-_0x3ab657)+'\x20more\x20matches');}const _0x4d17e0=_0x35db28[_0x486de1(0x133)];return _0x3f2687['push']('\x0a('+_0x4d17e0+_0x486de1(0x106)+(_0xf41232['length']||'?')+_0x486de1(0x134)),_0x3f2687[_0x486de1(0x177)]('\x0a');}function a0_0x40be(_0x3e64e3,_0x15116d){_0x3e64e3=_0x3e64e3-0xf7;const _0xe33ee0=a0_0xe33e();let _0x40be2e=_0xe33ee0[_0x3e64e3];return _0x40be2e;}function filterFind(_0x5a7355){const _0x1c8296=a0_0x231881,_0x25e06b=_0x5a7355[_0x1c8296(0x108)]('\x0a')[_0x1c8296(0x146)](_0x587ea3=>_0x587ea3[_0x1c8296(0x174)]()[_0x1c8296(0x133)]>0x0);if(_0x25e06b[_0x1c8296(0x133)]===0x0)return _0x1c8296(0x128);if(_0x25e06b['length']<=0x32)return _0x5a7355[_0x1c8296(0x174)]();const _0xed0f3f={};for(const _0x2eaed2 of _0x25e06b){const _0x12bf3c=path[_0x1c8296(0x181)](_0x2eaed2[_0x1c8296(0x174)]())||'.';_0xed0f3f[_0x12bf3c]=(_0xed0f3f[_0x12bf3c]||0x0)+0x1;}const _0x786ff0=Object[_0x1c8296(0x123)](_0xed0f3f)[_0x1c8296(0x105)]((_0x306d60,_0x1e7acc)=>_0x1e7acc[0x1]-_0x306d60[0x1]),_0xa22780=[_0x25e06b[_0x1c8296(0x133)]+_0x1c8296(0x17c)+_0x786ff0[_0x1c8296(0x133)]+_0x1c8296(0x141),''],_0x460793=0x1e;for(const [_0x318700,_0x59e4ed]of _0x786ff0[_0x1c8296(0x156)](0x0,_0x460793)){_0xa22780['push']('\x20\x20'+_0x318700+'/\x20('+_0x59e4ed+_0x1c8296(0x134));}return _0x786ff0[_0x1c8296(0x133)]>_0x460793&&_0xa22780['push'](_0x1c8296(0x10d)+(_0x786ff0['length']-_0x460793)+_0x1c8296(0x14e)),_0xa22780[_0x1c8296(0x177)]('\x0a');}
|
package/hooks/claude-hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var a0_0x16077d=a0_0x247d;(function(_0x5d8c31,_0x1f03c6){var _0x125218=a0_0x247d,_0x2dec9f=_0x5d8c31();while(!![]){try{var _0x4eb144=parseInt(_0x125218(0x152))/0x1*(-parseInt(_0x125218(0x14a))/0x2)+-parseInt(_0x125218(0x14b))/0x3+-parseInt(_0x125218(0x139))/0x4+-parseInt(_0x125218(0x138))/0x5+-parseInt(_0x125218(0x14e))/0x6*(-parseInt(_0x125218(0x146))/0x7)+-parseInt(_0x125218(0x147))/0x8+parseInt(_0x125218(0x154))/0x9*(parseInt(_0x125218(0x142))/0xa);if(_0x4eb144===_0x1f03c6)break;else _0x2dec9f['push'](_0x2dec9f['shift']());}catch(_0x290bb8){_0x2dec9f['push'](_0x2dec9f['shift']());}}}(a0_0x3a77,0x723f5));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x34b124,_0x3de6e2,_0x4e7fba,_0x4bcb6c){var _0x24ef41=a0_0x247d;if(_0x4bcb6c===undefined)_0x4bcb6c=_0x4e7fba;var _0x3f9d95=Object[_0x24ef41(0x136)](_0x3de6e2,_0x4e7fba);(!_0x3f9d95||(_0x24ef41(0x140)in _0x3f9d95?!_0x3de6e2[_0x24ef41(0x14f)]:_0x3f9d95[_0x24ef41(0x14d)]||_0x3f9d95['configurable']))&&(_0x3f9d95={'enumerable':!![],'get':function(){return _0x3de6e2[_0x4e7fba];}}),Object[_0x24ef41(0x145)](_0x34b124,_0x4bcb6c,_0x3f9d95);}:function(_0x5c244e,_0x19700b,_0x434278,_0x5a3633){if(_0x5a3633===undefined)_0x5a3633=_0x434278;_0x5c244e[_0x5a3633]=_0x19700b[_0x434278];}),__setModuleDefault=this&&this[a0_0x16077d(0x14c)]||(Object[a0_0x16077d(0x149)]?function(_0x2f104a,_0x1f1753){var _0x166a56=a0_0x16077d;Object[_0x166a56(0x145)](_0x2f104a,_0x166a56(0x13f),{'enumerable':!![],'value':_0x1f1753});}:function(_0x4d6e0b,_0x4fa465){_0x4d6e0b['default']=_0x4fa465;}),__importStar=this&&this['__importStar']||(function(){var _0x10a0bd=function(_0x54bb01){var _0x47119a=a0_0x247d;return _0x10a0bd=Object[_0x47119a(0x137)]||function(_0x548439){var _0x56239c=_0x47119a,_0x4f28bd=[];for(var _0xecc10 in _0x548439)if(Object[_0x56239c(0x13a)]['hasOwnProperty'][_0x56239c(0x144)](_0x548439,_0xecc10))_0x4f28bd[_0x4f28bd[_0x56239c(0x13d)]]=_0xecc10;return _0x4f28bd;},_0x10a0bd(_0x54bb01);};return function(_0x563f00){var _0x4aa902=a0_0x247d;if(_0x563f00&&_0x563f00[_0x4aa902(0x14f)])return _0x563f00;var _0x29b2da={};if(_0x563f00!=null){for(var _0x5f033f=_0x10a0bd(_0x563f00),_0x425b36=0x0;_0x425b36<_0x5f033f['length'];_0x425b36++)if(_0x5f033f[_0x425b36]!=='default')__createBinding(_0x29b2da,_0x563f00,_0x5f033f[_0x425b36]);}return __setModuleDefault(_0x29b2da,_0x563f00),_0x29b2da;};}());function a0_0x247d(_0x4e9b98,_0x5ac640){_0x4e9b98=_0x4e9b98-0x135;var _0x3a7708=a0_0x3a77();var _0x247dbf=_0x3a7708[_0x4e9b98];return _0x247dbf;}function a0_0x3a77(){var _0x134aa7=['writeFileSync','default','get','join','30DvgBDv','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20baseDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(baseDir,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20rawTokens\x20=\x20Math.ceil(contentStr.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20\x5c`trim\x20retrieve\x20${chunkId}\x5c``;\x0a\x20\x20\x20\x20\x20\x20const\x20compressedTokens\x20=\x20Math.ceil(replacement.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20const\x20savedTokens\x20=\x20Math.max(0,\x20rawTokens\x20-\x20compressedTokens);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20chunk_id:\x20chunkId,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_tokens:\x20rawTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20compressed_tokens:\x20compressedTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20last_accessed_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20summary:\x20`Summary:\x20Tool\x20result\x20offloaded\x20(${rawTokens}\x20tokens).`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_payload:\x20contentStr\x0a\x20\x20\x20\x20\x20\x20},\x20null,\x202));\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Update\x20sessions_state.json\x20with\x20hook\x20savings\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20statePath\x20=\x20path.join(baseDir,\x20\x27sessions_state.json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20state\x20=\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(statePath))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20state\x20=\x20JSON.parse(fs.readFileSync(statePath,\x20\x27utf8\x27))\x20||\x20{};\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Find\x20latest\x20session\x20file\x20for\x20\x27claude\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20claudeDirs\x20=\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27projects\x27),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27history\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20];\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestFullPath\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestTime\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20dir\x20of\x20claudeDirs)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(dir))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20scanDir\x20=\x20(currentDir,\x20depth\x20=\x200)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(depth\x20>\x206)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entries\x20=\x20fs.readdirSync(currentDir,\x20{\x20withFileTypes:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20entry\x20of\x20entries)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20full\x20=\x20path.join(currentDir,\x20entry.name);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.isDirectory())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(full,\x20depth\x20+\x201);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(entry.isFile()\x20&&\x20!entry.name.startsWith(\x27.\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.name.endsWith(\x27.jsonl\x27)\x20||\x20entry.name.endsWith(\x27.json1\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20stat\x20=\x20fs.statSync(full);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(stat.mtimeMs\x20>\x20latestTime)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestTime\x20=\x20stat.mtimeMs;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestFullPath\x20=\x20full;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(dir);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(latestFullPath)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20state[latestFullPath]\x20||\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20prevHook\x20=\x20existing.hookSavedTokens\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20newHook\x20=\x20prevHook\x20+\x20savedTokens;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalOfficial\x20=\x20existing.officialCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalAuto\x20=\x20existing.autoCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20state[latestFullPath]\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20lineCount:\x20existing.lineCount\x20||\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20activeSavedTokens:\x20finalOfficial\x20+\x20finalAuto\x20+\x20newHook,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sideCacheSaved:\x20existing.sideCacheSaved\x20||\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20officialCompactSaved:\x20finalOfficial,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoCompactSaved:\x20finalAuto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hookSavedTokens:\x20newHook\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fs.writeFileSync(statePath,\x20JSON.stringify(state,\x20null,\x202),\x20\x27utf8\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a','call','defineProperty','2286452BwthOQ','1750936BniRuG','post_tool_use.js','create','285586iClRdu','1317924WKuvOL','__setModuleDefault','writable','6GROluC','__esModule','homedir','installClaudeHooks','1daLJmY','.claude','5400252oPfFuM','mkdirSync','getOwnPropertyDescriptor','getOwnPropertyNames','2670665HDtwvK','1294648KoAKSd','prototype','path','utf8','length'];a0_0x3a77=function(){return _0x134aa7;};return a0_0x3a77();}Object['defineProperty'](exports,a0_0x16077d(0x14f),{'value':!![]}),exports[a0_0x16077d(0x151)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x16077d(0x13b))),os=__importStar(require('os'));function installClaudeHooks(){var _0x4bfdee=a0_0x16077d;try{const _0x4e6773=path[_0x4bfdee(0x141)](os[_0x4bfdee(0x150)](),_0x4bfdee(0x153),'hooks');!fs['existsSync'](_0x4e6773)&&fs[_0x4bfdee(0x135)](_0x4e6773,{'recursive':!![]});const _0x56da73=path[_0x4bfdee(0x141)](_0x4e6773,_0x4bfdee(0x148)),_0x578321=_0x4bfdee(0x143);fs[_0x4bfdee(0x13e)](_0x56da73,_0x578321,_0x4bfdee(0x13c));}catch(_0x202f26){}}
|
|
1
|
+
'use strict';function a0_0x48ed(){var _0x42ca24=['45XQQJWM','join','getOwnPropertyNames','__importStar','9CRPmTZ','homedir','defineProperty','3144160ireqQB','get','installClaudeHooks','__createBinding','400952OWGCBv','162057EwigaV','939984FkqxGg','default','create','__esModule','286162pFhKLo','447858jRwWmf','length','hasOwnProperty','post_tool_use.js','.claude','hooks','prototype','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20baseDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(baseDir,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20rawTokens\x20=\x20Math.ceil(contentStr.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20\x5c`trim\x20retrieve\x20${chunkId}\x5c``;\x0a\x20\x20\x20\x20\x20\x20const\x20compressedTokens\x20=\x20Math.ceil(replacement.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20const\x20savedTokens\x20=\x20Math.max(0,\x20rawTokens\x20-\x20compressedTokens);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20chunk_id:\x20chunkId,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_tokens:\x20rawTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20compressed_tokens:\x20compressedTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20last_accessed_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20summary:\x20`Summary:\x20Tool\x20result\x20offloaded\x20(${rawTokens}\x20tokens).`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_payload:\x20contentStr\x0a\x20\x20\x20\x20\x20\x20},\x20null,\x202));\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Update\x20sessions_state.json\x20with\x20hook\x20savings\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20statePath\x20=\x20path.join(baseDir,\x20\x27sessions_state.json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20state\x20=\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(statePath))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20state\x20=\x20JSON.parse(fs.readFileSync(statePath,\x20\x27utf8\x27))\x20||\x20{};\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Find\x20latest\x20session\x20file\x20for\x20\x27claude\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20claudeDirs\x20=\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27projects\x27),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27history\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20];\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestFullPath\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestTime\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20dir\x20of\x20claudeDirs)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(dir))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20scanDir\x20=\x20(currentDir,\x20depth\x20=\x200)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(depth\x20>\x206)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entries\x20=\x20fs.readdirSync(currentDir,\x20{\x20withFileTypes:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20entry\x20of\x20entries)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20full\x20=\x20path.join(currentDir,\x20entry.name);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.isDirectory())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(full,\x20depth\x20+\x201);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(entry.isFile()\x20&&\x20!entry.name.startsWith(\x27.\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.name.endsWith(\x27.jsonl\x27)\x20||\x20entry.name.endsWith(\x27.json1\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20stat\x20=\x20fs.statSync(full);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(stat.mtimeMs\x20>\x20latestTime)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestTime\x20=\x20stat.mtimeMs;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestFullPath\x20=\x20full;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(dir);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(latestFullPath)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20state[latestFullPath]\x20||\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20prevHook\x20=\x20existing.hookSavedTokens\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20newHook\x20=\x20prevHook\x20+\x20savedTokens;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalOfficial\x20=\x20existing.officialCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalAuto\x20=\x20existing.autoCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20state[latestFullPath]\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20lineCount:\x20existing.lineCount\x20||\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20activeSavedTokens:\x20finalOfficial\x20+\x20finalAuto\x20+\x20newHook,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sideCacheSaved:\x20existing.sideCacheSaved\x20||\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20officialCompactSaved:\x20finalOfficial,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoCompactSaved:\x20finalAuto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hookSavedTokens:\x20newHook\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fs.writeFileSync(statePath,\x20JSON.stringify(state,\x20null,\x202),\x20\x27utf8\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a','call','writable','16968410IdhmxZ','8fgfttm','existsSync'];a0_0x48ed=function(){return _0x42ca24;};return a0_0x48ed();}var a0_0x53eab7=a0_0xe9ea;(function(_0x55b2bc,_0x4ef852){var _0x4ea64e=a0_0xe9ea,_0x11a04c=_0x55b2bc();while(!![]){try{var _0xf83a60=parseInt(_0x4ea64e(0xe8))/0x1*(-parseInt(_0x4ea64e(0xd5))/0x2)+parseInt(_0x4ea64e(0xe4))/0x3+-parseInt(_0x4ea64e(0xde))/0x4+-parseInt(_0x4ea64e(0xd7))/0x5*(-parseInt(_0x4ea64e(0xe9))/0x6)+parseInt(_0x4ea64e(0xe3))/0x7+parseInt(_0x4ea64e(0xe2))/0x8*(-parseInt(_0x4ea64e(0xdb))/0x9)+parseInt(_0x4ea64e(0xd4))/0xa;if(_0xf83a60===_0x4ef852)break;else _0x11a04c['push'](_0x11a04c['shift']());}catch(_0x7a4b9f){_0x11a04c['push'](_0x11a04c['shift']());}}}(a0_0x48ed,0xb0d4c));var __createBinding=this&&this[a0_0x53eab7(0xe1)]||(Object['create']?function(_0x308459,_0x22a28a,_0x26bc75,_0x111852){var _0x13d24a=a0_0x53eab7;if(_0x111852===undefined)_0x111852=_0x26bc75;var _0x411fa6=Object['getOwnPropertyDescriptor'](_0x22a28a,_0x26bc75);(!_0x411fa6||(_0x13d24a(0xdf)in _0x411fa6?!_0x22a28a[_0x13d24a(0xe7)]:_0x411fa6[_0x13d24a(0xd3)]||_0x411fa6['configurable']))&&(_0x411fa6={'enumerable':!![],'get':function(){return _0x22a28a[_0x26bc75];}}),Object[_0x13d24a(0xdd)](_0x308459,_0x111852,_0x411fa6);}:function(_0x547164,_0x388382,_0x3ba9f9,_0x4454c6){if(_0x4454c6===undefined)_0x4454c6=_0x3ba9f9;_0x547164[_0x4454c6]=_0x388382[_0x3ba9f9];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x53eab7(0xe6)]?function(_0x1211d0,_0x117163){var _0x267295=a0_0x53eab7;Object[_0x267295(0xdd)](_0x1211d0,_0x267295(0xe5),{'enumerable':!![],'value':_0x117163});}:function(_0x572fec,_0x2d5554){var _0x3acae2=a0_0x53eab7;_0x572fec[_0x3acae2(0xe5)]=_0x2d5554;}),__importStar=this&&this[a0_0x53eab7(0xda)]||(function(){var _0x446a5a=function(_0x405840){var _0x4de99c=a0_0xe9ea;return _0x446a5a=Object[_0x4de99c(0xd9)]||function(_0x35d56b){var _0x5d011e=_0x4de99c,_0x345dc6=[];for(var _0x4909a6 in _0x35d56b)if(Object[_0x5d011e(0xd0)][_0x5d011e(0xeb)][_0x5d011e(0xd2)](_0x35d56b,_0x4909a6))_0x345dc6[_0x345dc6['length']]=_0x4909a6;return _0x345dc6;},_0x446a5a(_0x405840);};return function(_0x175da8){var _0x3ec802=a0_0xe9ea;if(_0x175da8&&_0x175da8['__esModule'])return _0x175da8;var _0x27cb45={};if(_0x175da8!=null){for(var _0x29babc=_0x446a5a(_0x175da8),_0x1ebd70=0x0;_0x1ebd70<_0x29babc[_0x3ec802(0xea)];_0x1ebd70++)if(_0x29babc[_0x1ebd70]!==_0x3ec802(0xe5))__createBinding(_0x27cb45,_0x175da8,_0x29babc[_0x1ebd70]);}return __setModuleDefault(_0x27cb45,_0x175da8),_0x27cb45;};}());Object[a0_0x53eab7(0xdd)](exports,a0_0x53eab7(0xe7),{'value':!![]}),exports[a0_0x53eab7(0xe0)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os'));function a0_0xe9ea(_0x1b669e,_0xdee5b5){_0x1b669e=_0x1b669e-0xce;var _0x48ed22=a0_0x48ed();var _0xe9ea89=_0x48ed22[_0x1b669e];return _0xe9ea89;}function installClaudeHooks(){var _0x36b97b=a0_0x53eab7;try{const _0x24f770=path[_0x36b97b(0xd8)](os[_0x36b97b(0xdc)](),_0x36b97b(0xce),_0x36b97b(0xcf));!fs[_0x36b97b(0xd6)](_0x24f770)&&fs['mkdirSync'](_0x24f770,{'recursive':!![]});const _0x395041=path[_0x36b97b(0xd8)](_0x24f770,_0x36b97b(0xec)),_0x5ac4b2=_0x36b97b(0xd1);fs['writeFileSync'](_0x395041,_0x5ac4b2,'utf8');}catch(_0x1e46ce){}}
|