@treasuredata/tdx 0.4.0 → 0.4.2

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.
Files changed (112) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-api-client.js +1 -1
  5. package/dist/client/http-client.js +1 -1
  6. package/dist/client/llm-api-client.d.ts +129 -1
  7. package/dist/client/llm-api-client.d.ts.map +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/llm-api-client.js.map +1 -1
  10. package/dist/client/rate-limiter.js +1 -1
  11. package/dist/client/td-api-client.js +1 -1
  12. package/dist/client/trino-api-client.js +1 -1
  13. package/dist/client/workflow-client.js +1 -1
  14. package/dist/commands/activations.js +1 -1
  15. package/dist/commands/api-command.js +1 -1
  16. package/dist/commands/auth-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/context-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/llm-command.d.ts +18 -0
  25. package/dist/commands/llm-command.d.ts.map +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/llm-command.js.map +1 -1
  28. package/dist/commands/llm-proxy.js +1 -1
  29. package/dist/commands/parent-segment-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/segment-command.d.ts +9 -6
  33. package/dist/commands/segment-command.d.ts.map +1 -1
  34. package/dist/commands/segment-command.js +1 -1
  35. package/dist/commands/segment-command.js.map +1 -1
  36. package/dist/commands/segment-create-command.js +1 -1
  37. package/dist/commands/segment-fields-command.d.ts +3 -1
  38. package/dist/commands/segment-fields-command.d.ts.map +1 -1
  39. package/dist/commands/segment-fields-command.js +1 -1
  40. package/dist/commands/segment-fields-command.js.map +1 -1
  41. package/dist/commands/segment-pwd-command.js +1 -1
  42. package/dist/commands/segment-update-command.js +1 -1
  43. package/dist/commands/segment-use-command.js +1 -1
  44. package/dist/commands/segments.js +1 -1
  45. package/dist/commands/show.js +1 -1
  46. package/dist/commands/tables.js +1 -1
  47. package/dist/commands/use-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/config.js +1 -1
  51. package/dist/core/credential-cache.js +1 -1
  52. package/dist/core/global-context.js +1 -1
  53. package/dist/core/keychain.d.ts +19 -0
  54. package/dist/core/keychain.d.ts.map +1 -1
  55. package/dist/core/keychain.js +1 -1
  56. package/dist/core/keychain.js.map +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/proxy/anthropic-adapter.js +1 -1
  62. package/dist/proxy/server.js +1 -1
  63. package/dist/proxy/session-cache.js +1 -1
  64. package/dist/sdk/api.js +1 -1
  65. package/dist/sdk/errors.js +1 -1
  66. package/dist/sdk/index.js +1 -1
  67. package/dist/sdk/job.js +1 -1
  68. package/dist/sdk/llm.d.ts +90 -1
  69. package/dist/sdk/llm.d.ts.map +1 -1
  70. package/dist/sdk/llm.js +1 -1
  71. package/dist/sdk/llm.js.map +1 -1
  72. package/dist/sdk/query.js +1 -1
  73. package/dist/sdk/segment.js +1 -1
  74. package/dist/sdk/workflow.js +1 -1
  75. package/dist/types/endpoints.js +1 -1
  76. package/dist/types/index.d.ts +1 -1
  77. package/dist/types/index.d.ts.map +1 -1
  78. package/dist/types/index.js +1 -1
  79. package/dist/types/llm.d.ts +241 -0
  80. package/dist/types/llm.d.ts.map +1 -1
  81. package/dist/utils/agent-ref-parser.js +1 -1
  82. package/dist/utils/chat-cache.js +1 -1
  83. package/dist/utils/colors.js +1 -1
  84. package/dist/utils/command-output.d.ts.map +1 -1
  85. package/dist/utils/command-output.js +1 -1
  86. package/dist/utils/command-output.js.map +1 -1
  87. package/dist/utils/constants.js +1 -1
  88. package/dist/utils/file-permissions.js +1 -1
  89. package/dist/utils/format-detector.js +1 -1
  90. package/dist/utils/formatters.js +1 -1
  91. package/dist/utils/json-loader.js +1 -1
  92. package/dist/utils/llm-backup-utils.d.ts +37 -0
  93. package/dist/utils/llm-backup-utils.d.ts.map +1 -0
  94. package/dist/utils/llm-backup-utils.js +1 -0
  95. package/dist/utils/llm-backup-utils.js.map +1 -0
  96. package/dist/utils/model-aliases.js +1 -1
  97. package/dist/utils/option-validation.js +1 -1
  98. package/dist/utils/port.js +1 -1
  99. package/dist/utils/process.js +1 -1
  100. package/dist/utils/prompt.js +1 -1
  101. package/dist/utils/segment-path-parser.js +1 -1
  102. package/dist/utils/segment-ref-parser.js +1 -1
  103. package/dist/utils/spinner.js +1 -1
  104. package/dist/utils/sql-parser.js +1 -1
  105. package/dist/utils/sse-parser.js +1 -1
  106. package/dist/utils/string-utils.js +1 -1
  107. package/dist/utils/table-ref-parser.js +1 -1
  108. package/dist/utils/tdx-logger.js +1 -1
  109. package/dist/utils/tree-formatter.js +1 -1
  110. package/dist/utils/version-check.js +1 -1
  111. package/dist/utils/workflow-utils.js +1 -1
  112. package/package.json +1 -1
@@ -1 +1 @@
1
- function a70_0x3b18(){const _0x2e1c85=['forEach','boolean','replace','name','toLowerCase','length','object','data','type','4515CFlQZH','startsWith','11768yJSGrG','substring','slice','test','12vDrMqT','stdout','1yyCyPq','875338hOWgYT','floor','true','min','string','push','1763399TumZhY','pow','jsonl','130eJSZNI','columns','159723FSqzhp','3013045UeieaH','toFixed','log','map','stringify','reduce','timestamp','toISOString','join','array','repeat','row','table','max','date','No\x20rows\x20returned','long','1701456EZgFqh','3657144AsxzSn','tsv','\x20shown)','json','padEnd','4nKBzeg','number','0\x20B','\x20rows\x20('];a70_0x3b18=function(){return _0x2e1c85;};return a70_0x3b18();}(function(_0x2d4a00,_0x464d24){const _0x5dcba2=a70_0x5eca,_0x26441c=_0x2d4a00();while(!![]){try{const _0x3b4d59=parseInt(_0x5dcba2(0x1ff))/0x1*(-parseInt(_0x5dcba2(0x200))/0x2)+parseInt(_0x5dcba2(0x21d))/0x3*(parseInt(_0x5dcba2(0x223))/0x4)+-parseInt(_0x5dcba2(0x20c))/0x5+parseInt(_0x5dcba2(0x21e))/0x6+-parseInt(_0x5dcba2(0x1f7))/0x7*(-parseInt(_0x5dcba2(0x1f9))/0x8)+-parseInt(_0x5dcba2(0x20b))/0x9*(parseInt(_0x5dcba2(0x209))/0xa)+parseInt(_0x5dcba2(0x206))/0xb*(-parseInt(_0x5dcba2(0x1fd))/0xc);if(_0x3b4d59===_0x464d24)break;else _0x26441c['push'](_0x26441c['shift']());}catch(_0x4f4ced){_0x26441c['push'](_0x26441c['shift']());}}}(a70_0x3b18,0xa979d));function a70_0x5eca(_0x469a42,_0x200b57){const _0x3b18b2=a70_0x3b18();return a70_0x5eca=function(_0x5eca0c,_0xcf99c1){_0x5eca0c=_0x5eca0c-0x1ee;let _0x4d0afc=_0x3b18b2[_0x5eca0c];return _0x4d0afc;},a70_0x5eca(_0x469a42,_0x200b57);}import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x1e01d2=a70_0x5eca;return process[_0x1e01d2(0x1fe)]['columns']||Infinity;}export function formatAsTable(_0x47449a,_0x14bbbc=DEFAULT_MAX_DISPLAY_ROWS,_0x5e8b62=![],_0x570f22={}){const _0x2796f8=a70_0x5eca;if(_0x47449a[_0x2796f8(0x1f5)][_0x2796f8(0x1f3)]===0x0)return _0x2796f8(0x21b);const _0x15c682=_0x47449a[_0x2796f8(0x20a)][_0x2796f8(0x20f)](_0x2f7a67=>_0x2f7a67['name']),_0x4fe6cc=_0x47449a['columns'][_0x2796f8(0x20f)](_0x22e23b=>simplifyType(_0x22e23b[_0x2796f8(0x1f6)])),_0x3b34e8=_0x47449a[_0x2796f8(0x1f5)][_0x2796f8(0x1fb)](0x0,_0x14bbbc),_0x144475=_0x47449a[_0x2796f8(0x1f5)][_0x2796f8(0x1f3)],_0x55e681=_0x144475>_0x14bbbc,_0x3c0c22=[],_0x2fb862=getTerminalWidth(),_0x1e4a21=_0x2fb862!==Infinity,_0x1d42e6=0x32;let _0x82200c=_0x15c682[_0x2796f8(0x20f)]((_0x489a9a,_0x3530cd)=>{const _0x3d758b=_0x2796f8,_0x300384=stringWidth(_0x4fe6cc[_0x3530cd]),_0x3e2267=Math[_0x3d758b(0x219)](..._0x3b34e8[_0x3d758b(0x20f)](_0x2d85ff=>{const _0x3e7d7f=_0x2d85ff[_0x489a9a];return stringWidth(formatValue(_0x3e7d7f));})),_0xc0157f=Math[_0x3d758b(0x219)](stringWidth(_0x489a9a),_0x300384,_0x3e2267);return _0x5e8b62?_0xc0157f:Math[_0x3d758b(0x203)](_0xc0157f,_0x1d42e6);});if(_0x1e4a21&&!_0x5e8b62&&_0x15c682[_0x2796f8(0x1f3)]>0x0){const _0x102dc3=_0x1d7ea1=>{let _0x260faa=0x1;for(const _0x503772 of _0x1d7ea1){_0x260faa+=_0x503772+0x3;}return _0x260faa+0x1;};let _0x34fd15=_0x102dc3(_0x82200c);if(_0x34fd15>_0x2fb862){const _0x7aa2c5=0x3;for(let _0xa68420=_0x82200c[_0x2796f8(0x1f3)]-0x1;_0xa68420>=0x0;_0xa68420--){_0x34fd15=_0x102dc3(_0x82200c);if(_0x34fd15<=_0x2fb862)break;const _0x29253e=_0x82200c[_0xa68420],_0x1ae338=_0x34fd15-_0x2fb862,_0x170de8=_0x29253e-_0x7aa2c5,_0x56f04d=Math[_0x2796f8(0x203)](_0x1ae338,_0x170de8);_0x56f04d>0x0&&(_0x82200c[_0xa68420]=_0x29253e-_0x56f04d);}}}const _0x441d80=_0x15c682,_0x17f873=_0x4fe6cc,_0x225584=_0x82200c,_0x299de5=_0x82200c;_0x3c0c22[_0x2796f8(0x205)](colorBorder('┌'+_0x299de5['map'](_0x564060=>'─'['repeat'](_0x564060+0x2))['join']('┬')+'┐',_0x570f22));const _0x4b9e9f=_0x441d80[_0x2796f8(0x20f)]((_0x239c63,_0x7e7498)=>centerAlign(_0x239c63,_0x225584[_0x7e7498]));_0x3c0c22['push'](colorBorder('│',_0x570f22)+'\x20'+_0x4b9e9f[_0x2796f8(0x214)]('\x20'+colorBorder('│',_0x570f22)+'\x20')+'\x20'+colorBorder('│',_0x570f22));const _0x4e2817=_0x17f873[_0x2796f8(0x20f)]((_0x168636,_0x3d63df)=>colorType(centerAlign(_0x168636,_0x225584[_0x3d63df]),_0x570f22));_0x3c0c22['push'](colorBorder('│',_0x570f22)+'\x20'+_0x4e2817[_0x2796f8(0x214)]('\x20'+colorBorder('│',_0x570f22)+'\x20')+'\x20'+colorBorder('│',_0x570f22)),_0x3c0c22[_0x2796f8(0x205)](colorBorder('├'+_0x299de5[_0x2796f8(0x20f)](_0x5015bf=>'─'[_0x2796f8(0x216)](_0x5015bf+0x2))['join']('┼')+'┤',_0x570f22));const _0x4ef3fb=(_0x9782de,_0xd2a37d)=>{const _0x3a785a=_0x2796f8,_0x37ecb0=stringWidth(_0x9782de);if(_0x37ecb0<=_0xd2a37d)return _0x9782de;let _0xd038c0=_0x9782de;while(stringWidth(_0xd038c0+'…')>_0xd2a37d&&_0xd038c0[_0x3a785a(0x1f3)]>0x0){_0xd038c0=_0xd038c0[_0x3a785a(0x1fb)](0x0,-0x1);}return _0xd038c0+'…';};_0x3b34e8[_0x2796f8(0x1ee)](_0x33be0e=>{const _0x10512a=_0x2796f8,_0x51c58e=_0x15c682['map']((_0x3c0619,_0x2d0509)=>{const _0x192140=a70_0x5eca,_0x1ac7d8=_0x33be0e[_0x3c0619],_0x4b3d14=formatValue(_0x1ac7d8),_0x3a0918=_0x225584[_0x2d0509],_0x19e413=_0x4ef3fb(_0x4b3d14,_0x3a0918),_0x42a019=typeof _0x1ac7d8==='number'||typeof _0x1ac7d8==='string'&&/^-?\d+$/[_0x192140(0x1fc)](_0x1ac7d8);return _0x42a019?padStart(_0x19e413,_0x3a0918):padEnd(_0x19e413,_0x3a0918);});_0x3c0c22[_0x10512a(0x205)](colorBorder('│',_0x570f22)+'\x20'+_0x51c58e['join']('\x20'+colorBorder('│',_0x570f22)+'\x20')+'\x20'+colorBorder('│',_0x570f22));});const _0x40143e=_0x299de5[_0x2796f8(0x211)]((_0x516c8c,_0x13497f)=>_0x516c8c+_0x13497f+0x3,-0x1);_0x3c0c22[_0x2796f8(0x205)](colorBorder('├'+_0x299de5[_0x2796f8(0x20f)](_0x491f7d=>'─'['repeat'](_0x491f7d+0x2))[_0x2796f8(0x214)]('┴')+'┤',_0x570f22));let _0x3c3ed9;_0x55e681?_0x3c3ed9=_0x144475+_0x2796f8(0x226)+_0x14bbbc+_0x2796f8(0x220):_0x3c3ed9=_0x144475+'\x20row'+(_0x144475===0x1?'':'s');const _0x1730c8=_0x3c3ed9[_0x2796f8(0x222)](_0x40143e-0x2);return _0x3c0c22[_0x2796f8(0x205)](colorBorder('│',_0x570f22)+'\x20'+_0x1730c8+'\x20'+colorBorder('│',_0x570f22)),_0x3c0c22[_0x2796f8(0x205)](colorBorder('└'+'─'['repeat'](_0x40143e)+'┘',_0x570f22)),_0x3c0c22[_0x2796f8(0x214)]('\x0a');}function simplifyType(_0x355ae0){const _0x238941=a70_0x5eca,_0x250d9b={'varchar':_0x238941(0x204),'bigint':_0x238941(0x21c),'integer':'int','double':'double','boolean':'bool','date':_0x238941(0x21a),'timestamp':_0x238941(0x212),'array':_0x238941(0x215),'map':_0x238941(0x20f),'row':_0x238941(0x217)},_0xdeed2=_0x355ae0[_0x238941(0x1f2)]();for(const [_0x2aa0e6,_0x1cb459]of Object['entries'](_0x250d9b)){if(_0xdeed2[_0x238941(0x1f8)](_0x2aa0e6))return _0x1cb459;}return _0x355ae0[_0x238941(0x1f3)]>0xa?_0x355ae0[_0x238941(0x1fa)](0x0,0xa):_0x355ae0;}export function formatAsJSON(_0x41ccaf,_0x123d65={}){const _0x6bc618=a70_0x5eca;if(_0x41ccaf[_0x6bc618(0x1f5)]['length']===0x0)return'[]';if(shouldUseColor(_0x123d65))return colorizeJSON(_0x41ccaf[_0x6bc618(0x1f5)],_0x123d65);const _0x12de91=_0x41ccaf['data'][_0x6bc618(0x20f)](_0x31072e=>'\x20\x20'+JSON[_0x6bc618(0x210)](_0x31072e));return'[\x0a'+_0x12de91[_0x6bc618(0x214)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x5e32e7,_0x2fb802={}){const _0x572677=a70_0x5eca;if(_0x5e32e7[_0x572677(0x1f5)][_0x572677(0x1f3)]===0x0)return'';if(shouldUseColor(_0x2fb802))return _0x5e32e7['data'][_0x572677(0x20f)](_0x4fe985=>colorizeJSONCompact(_0x4fe985,_0x2fb802))[_0x572677(0x214)]('\x0a');return _0x5e32e7[_0x572677(0x1f5)]['map'](_0x157d6a=>JSON[_0x572677(0x210)](_0x157d6a))[_0x572677(0x214)]('\x0a');}export function formatAsTSV(_0x2b2ba6){const _0x1da33a=a70_0x5eca;if(_0x2b2ba6[_0x1da33a(0x1f5)][_0x1da33a(0x1f3)]===0x0)return'';const _0x9da18b=[],_0x330c73=_0x2b2ba6['columns'][_0x1da33a(0x20f)](_0x6d631f=>_0x6d631f[_0x1da33a(0x1f1)]);return _0x9da18b[_0x1da33a(0x205)](_0x330c73[_0x1da33a(0x214)]('\x09')),_0x2b2ba6[_0x1da33a(0x1f5)]['forEach'](_0x4b7ff6=>{const _0x52b46e=_0x1da33a,_0x65d878=_0x330c73[_0x52b46e(0x20f)](_0x176472=>{const _0x5c9c16=_0x4b7ff6[_0x176472];return formatValueForTSV(_0x5c9c16);});_0x9da18b[_0x52b46e(0x205)](_0x65d878[_0x52b46e(0x214)]('\x09'));}),_0x9da18b[_0x1da33a(0x214)]('\x0a');}function formatValue(_0x28613){const _0x3f997b=a70_0x5eca;if(_0x28613===null||_0x28613===undefined)return'';if(typeof _0x28613===_0x3f997b(0x204)){const _0x5326cc=_0x28613['replace'](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x3f997b(0x1f0)](/\t/g,'\x5ct');return _0x5326cc;}if(typeof _0x28613===_0x3f997b(0x224))return String(_0x28613);if(typeof _0x28613===_0x3f997b(0x1ef))return _0x28613?_0x3f997b(0x202):'false';if(_0x28613 instanceof Date)return _0x28613['toISOString']();if(typeof _0x28613===_0x3f997b(0x1f4))return JSON[_0x3f997b(0x210)](_0x28613);return String(_0x28613);}function formatValueForTSV(_0x4fe27a){const _0x15d4b3=a70_0x5eca;if(_0x4fe27a===null||_0x4fe27a===undefined)return'';if(typeof _0x4fe27a===_0x15d4b3(0x204))return _0x4fe27a['replace'](/\t/g,'\x5ct')[_0x15d4b3(0x1f0)](/\n/g,'\x5cn');if(typeof _0x4fe27a==='number'||typeof _0x4fe27a===_0x15d4b3(0x1ef))return String(_0x4fe27a);if(_0x4fe27a instanceof Date)return _0x4fe27a[_0x15d4b3(0x213)]();if(typeof _0x4fe27a===_0x15d4b3(0x1f4))return JSON[_0x15d4b3(0x210)](_0x4fe27a);return String(_0x4fe27a);}export function formatQueryResult(_0x2122b7,_0x1ff1d0){const _0x4d6059=a70_0x5eca;switch(_0x1ff1d0){case _0x4d6059(0x218):return formatAsTable(_0x2122b7);case _0x4d6059(0x221):return formatAsJSON(_0x2122b7);case _0x4d6059(0x208):return formatAsJSONL(_0x2122b7);case _0x4d6059(0x21f):return formatAsTSV(_0x2122b7);default:return formatAsJSON(_0x2122b7);}}export function formatBytes(_0x6f5acf){const _0x2fb483=a70_0x5eca;if(_0x6f5acf===0x0)return _0x2fb483(0x225);const _0x4a0edd=['B','KB','MB','GB','TB'],_0xba730b=0x400,_0x4d9a17=Math[_0x2fb483(0x201)](Math[_0x2fb483(0x20e)](_0x6f5acf)/Math[_0x2fb483(0x20e)](_0xba730b)),_0x6e7e66=_0x6f5acf/Math['pow'](_0xba730b,_0x4d9a17),_0x27ae1b=_0x6e7e66>=0xa?0x1:0x2;return _0x6e7e66[_0x2fb483(0x20d)](_0x27ae1b)+'\x20'+_0x4a0edd[_0x4d9a17];}export function formatRows(_0x561cd2){const _0x18eff2=a70_0x5eca;if(_0x561cd2==null)return'-';if(_0x561cd2===0x0)return'0';if(_0x561cd2<0x3e8)return _0x561cd2['toString']();const _0x36603e=['','K','M','B','T'],_0x520e56=0x3e8,_0xc26d2f=Math[_0x18eff2(0x201)](Math[_0x18eff2(0x20e)](_0x561cd2)/Math[_0x18eff2(0x20e)](_0x520e56)),_0x16b40f=_0x561cd2/Math[_0x18eff2(0x207)](_0x520e56,_0xc26d2f),_0x1d7a47=_0x16b40f>=0xa?0x1:0x2;return''+_0x16b40f['toFixed'](_0x1d7a47)+_0x36603e[_0xc26d2f];}
1
+ (function(_0x14a7c7,_0x1b2657){const _0x2ebdff=a70_0x97ac,_0x3591e7=_0x14a7c7();while(!![]){try{const _0x166cd1=parseInt(_0x2ebdff(0x17d))/0x1+parseInt(_0x2ebdff(0x16c))/0x2+-parseInt(_0x2ebdff(0x194))/0x3+parseInt(_0x2ebdff(0x193))/0x4*(-parseInt(_0x2ebdff(0x195))/0x5)+-parseInt(_0x2ebdff(0x18f))/0x6+-parseInt(_0x2ebdff(0x184))/0x7+parseInt(_0x2ebdff(0x187))/0x8;if(_0x166cd1===_0x1b2657)break;else _0x3591e7['push'](_0x3591e7['shift']());}catch(_0xcd5d55){_0x3591e7['push'](_0x3591e7['shift']());}}}(a70_0x6adf,0xd732e));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x26fa4a=a70_0x97ac;return process[_0x26fa4a(0x17f)][_0x26fa4a(0x175)]||Infinity;}export function formatAsTable(_0xd0730,_0x499e7e=DEFAULT_MAX_DISPLAY_ROWS,_0x157311=![],_0x7a717e={}){const _0x4ee681=a70_0x97ac;if(_0xd0730[_0x4ee681(0x18a)][_0x4ee681(0x168)]===0x0)return _0x4ee681(0x196);const _0x2f58fd=_0xd0730['columns'][_0x4ee681(0x16a)](_0x86a962=>_0x86a962[_0x4ee681(0x16b)]),_0x496975=_0xd0730[_0x4ee681(0x175)]['map'](_0x1be525=>simplifyType(_0x1be525[_0x4ee681(0x170)])),_0x1a8855=_0xd0730[_0x4ee681(0x18a)]['slice'](0x0,_0x499e7e),_0x1d9057=_0xd0730[_0x4ee681(0x18a)][_0x4ee681(0x168)],_0x12d346=_0x1d9057>_0x499e7e,_0x23ff2c=[],_0x2e99c7=getTerminalWidth(),_0x5245b2=_0x2e99c7!==Infinity,_0x349aec=0x32;let _0x237c1e=_0x2f58fd[_0x4ee681(0x16a)]((_0x16ab42,_0x17145c)=>{const _0x442b82=_0x4ee681,_0xd144f1=stringWidth(_0x496975[_0x17145c]),_0x4e7f2c=Math['max'](..._0x1a8855[_0x442b82(0x16a)](_0x57bec9=>{const _0x255c0c=_0x57bec9[_0x16ab42];return stringWidth(formatValue(_0x255c0c));})),_0x4e95eb=Math['max'](stringWidth(_0x16ab42),_0xd144f1,_0x4e7f2c);return _0x157311?_0x4e95eb:Math[_0x442b82(0x166)](_0x4e95eb,_0x349aec);});if(_0x5245b2&&!_0x157311&&_0x2f58fd[_0x4ee681(0x168)]>0x0){const _0x58d682=_0x4f53b9=>{let _0x323fa3=0x1;for(const _0x185377 of _0x4f53b9){_0x323fa3+=_0x185377+0x3;}return _0x323fa3+0x1;};let _0x417de6=_0x58d682(_0x237c1e);if(_0x417de6>_0x2e99c7){const _0x340aec=0x3;for(let _0x4f690f=_0x237c1e[_0x4ee681(0x168)]-0x1;_0x4f690f>=0x0;_0x4f690f--){_0x417de6=_0x58d682(_0x237c1e);if(_0x417de6<=_0x2e99c7)break;const _0x1f2f41=_0x237c1e[_0x4f690f],_0x2233ff=_0x417de6-_0x2e99c7,_0x5b92d6=_0x1f2f41-_0x340aec,_0x40ba83=Math[_0x4ee681(0x166)](_0x2233ff,_0x5b92d6);_0x40ba83>0x0&&(_0x237c1e[_0x4f690f]=_0x1f2f41-_0x40ba83);}}}const _0x2970f2=_0x2f58fd,_0x281415=_0x496975,_0x35bd0c=_0x237c1e,_0x5831b7=_0x237c1e;_0x23ff2c[_0x4ee681(0x192)](colorBorder('┌'+_0x5831b7['map'](_0x2bc3b0=>'─'[_0x4ee681(0x165)](_0x2bc3b0+0x2))['join']('┬')+'┐',_0x7a717e));const _0x20ca57=_0x2970f2[_0x4ee681(0x16a)]((_0x3b4fec,_0x2f22cc)=>centerAlign(_0x3b4fec,_0x35bd0c[_0x2f22cc]));_0x23ff2c[_0x4ee681(0x192)](colorBorder('│',_0x7a717e)+'\x20'+_0x20ca57[_0x4ee681(0x173)]('\x20'+colorBorder('│',_0x7a717e)+'\x20')+'\x20'+colorBorder('│',_0x7a717e));const _0x1f2a0e=_0x281415[_0x4ee681(0x16a)]((_0x2a1d3e,_0x31ba61)=>colorType(centerAlign(_0x2a1d3e,_0x35bd0c[_0x31ba61]),_0x7a717e));_0x23ff2c[_0x4ee681(0x192)](colorBorder('│',_0x7a717e)+'\x20'+_0x1f2a0e[_0x4ee681(0x173)]('\x20'+colorBorder('│',_0x7a717e)+'\x20')+'\x20'+colorBorder('│',_0x7a717e)),_0x23ff2c[_0x4ee681(0x192)](colorBorder('├'+_0x5831b7[_0x4ee681(0x16a)](_0x4fc4f9=>'─'['repeat'](_0x4fc4f9+0x2))[_0x4ee681(0x173)]('┼')+'┤',_0x7a717e));const _0x477f5f=(_0x337961,_0x490393)=>{const _0x4279d6=_0x4ee681,_0x2e3159=stringWidth(_0x337961);if(_0x2e3159<=_0x490393)return _0x337961;let _0x46b2f1=_0x337961;while(stringWidth(_0x46b2f1+'…')>_0x490393&&_0x46b2f1['length']>0x0){_0x46b2f1=_0x46b2f1[_0x4279d6(0x16f)](0x0,-0x1);}return _0x46b2f1+'…';};_0x1a8855['forEach'](_0x2f478b=>{const _0x275a7d=_0x4ee681,_0x1acb4b=_0x2f58fd['map']((_0x25c044,_0x7d792c)=>{const _0x5b9985=a70_0x97ac,_0x2b8e03=_0x2f478b[_0x25c044],_0x4de9e7=formatValue(_0x2b8e03),_0x4f607c=_0x35bd0c[_0x7d792c],_0x8d4e4d=_0x477f5f(_0x4de9e7,_0x4f607c),_0x4912fd=typeof _0x2b8e03===_0x5b9985(0x16d)||typeof _0x2b8e03===_0x5b9985(0x17c)&&/^-?\d+$/[_0x5b9985(0x169)](_0x2b8e03);return _0x4912fd?padStart(_0x8d4e4d,_0x4f607c):padEnd(_0x8d4e4d,_0x4f607c);});_0x23ff2c[_0x275a7d(0x192)](colorBorder('│',_0x7a717e)+'\x20'+_0x1acb4b[_0x275a7d(0x173)]('\x20'+colorBorder('│',_0x7a717e)+'\x20')+'\x20'+colorBorder('│',_0x7a717e));});const _0x593bf1=_0x5831b7[_0x4ee681(0x177)]((_0x21149e,_0x4a9f6c)=>_0x21149e+_0x4a9f6c+0x3,-0x1);_0x23ff2c[_0x4ee681(0x192)](colorBorder('├'+_0x5831b7[_0x4ee681(0x16a)](_0x2107f6=>'─'[_0x4ee681(0x165)](_0x2107f6+0x2))[_0x4ee681(0x173)]('┴')+'┤',_0x7a717e));let _0x105e4f;_0x12d346?_0x105e4f=_0x1d9057+_0x4ee681(0x174)+_0x499e7e+_0x4ee681(0x17b):_0x105e4f=_0x1d9057+'\x20row'+(_0x1d9057===0x1?'':'s');const _0x52caad=_0x105e4f[_0x4ee681(0x182)](_0x593bf1-0x2);return _0x23ff2c['push'](colorBorder('│',_0x7a717e)+'\x20'+_0x52caad+'\x20'+colorBorder('│',_0x7a717e)),_0x23ff2c['push'](colorBorder('└'+'─'[_0x4ee681(0x165)](_0x593bf1)+'┘',_0x7a717e)),_0x23ff2c[_0x4ee681(0x173)]('\x0a');}function simplifyType(_0x8620bc){const _0x313752=a70_0x97ac,_0x4d046={'varchar':_0x313752(0x17c),'bigint':_0x313752(0x189),'integer':_0x313752(0x179),'double':_0x313752(0x18b),'boolean':_0x313752(0x180),'date':_0x313752(0x18e),'timestamp':_0x313752(0x163),'array':'array','map':'map','row':_0x313752(0x186)},_0x392d3c=_0x8620bc[_0x313752(0x164)]();for(const [_0x258fdc,_0xa2fc52]of Object[_0x313752(0x167)](_0x4d046)){if(_0x392d3c[_0x313752(0x178)](_0x258fdc))return _0xa2fc52;}return _0x8620bc[_0x313752(0x168)]>0xa?_0x8620bc[_0x313752(0x190)](0x0,0xa):_0x8620bc;}export function formatAsJSON(_0x249bf0,_0x6e40c9={}){const _0x427a92=a70_0x97ac;if(_0x249bf0['data'][_0x427a92(0x168)]===0x0)return'[]';if(shouldUseColor(_0x6e40c9))return colorizeJSON(_0x249bf0[_0x427a92(0x18a)],_0x6e40c9);const _0x172f34=_0x249bf0[_0x427a92(0x18a)][_0x427a92(0x16a)](_0x29a477=>'\x20\x20'+JSON[_0x427a92(0x183)](_0x29a477));return'[\x0a'+_0x172f34[_0x427a92(0x173)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x695683,_0x3b3c7d={}){const _0x4cde82=a70_0x97ac;if(_0x695683['data'][_0x4cde82(0x168)]===0x0)return'';if(shouldUseColor(_0x3b3c7d))return _0x695683[_0x4cde82(0x18a)][_0x4cde82(0x16a)](_0x2bca9c=>colorizeJSONCompact(_0x2bca9c,_0x3b3c7d))[_0x4cde82(0x173)]('\x0a');return _0x695683[_0x4cde82(0x18a)][_0x4cde82(0x16a)](_0x53fc3e=>JSON[_0x4cde82(0x183)](_0x53fc3e))[_0x4cde82(0x173)]('\x0a');}function a70_0x97ac(_0x18c01b,_0x29f4c2){const _0x6adfe3=a70_0x6adf();return a70_0x97ac=function(_0x97ac42,_0x18fdac){_0x97ac42=_0x97ac42-0x163;let _0x28796f=_0x6adfe3[_0x97ac42];return _0x28796f;},a70_0x97ac(_0x18c01b,_0x29f4c2);}export function formatAsTSV(_0xde835f){const _0x995bfe=a70_0x97ac;if(_0xde835f[_0x995bfe(0x18a)]['length']===0x0)return'';const _0x5a40a6=[],_0x452b4b=_0xde835f[_0x995bfe(0x175)][_0x995bfe(0x16a)](_0x1aad38=>_0x1aad38[_0x995bfe(0x16b)]);return _0x5a40a6[_0x995bfe(0x192)](_0x452b4b['join']('\x09')),_0xde835f[_0x995bfe(0x18a)]['forEach'](_0x5a0d9f=>{const _0x18e9df=_0x995bfe,_0x344336=_0x452b4b[_0x18e9df(0x16a)](_0x2638ba=>{const _0x115f2b=_0x5a0d9f[_0x2638ba];return formatValueForTSV(_0x115f2b);});_0x5a40a6[_0x18e9df(0x192)](_0x344336[_0x18e9df(0x173)]('\x09'));}),_0x5a40a6[_0x995bfe(0x173)]('\x0a');}function formatValue(_0x1e0cdf){const _0xe04b45=a70_0x97ac;if(_0x1e0cdf===null||_0x1e0cdf===undefined)return'';if(typeof _0x1e0cdf===_0xe04b45(0x17c)){const _0x3c3836=_0x1e0cdf[_0xe04b45(0x16e)](/\n/g,'\x5cn')[_0xe04b45(0x16e)](/\r/g,'\x5cr')[_0xe04b45(0x16e)](/\t/g,'\x5ct');return _0x3c3836;}if(typeof _0x1e0cdf===_0xe04b45(0x16d))return String(_0x1e0cdf);if(typeof _0x1e0cdf===_0xe04b45(0x18d))return _0x1e0cdf?_0xe04b45(0x188):'false';if(_0x1e0cdf instanceof Date)return _0x1e0cdf['toISOString']();if(typeof _0x1e0cdf===_0xe04b45(0x171))return JSON[_0xe04b45(0x183)](_0x1e0cdf);return String(_0x1e0cdf);}function formatValueForTSV(_0x5e779c){const _0x596a15=a70_0x97ac;if(_0x5e779c===null||_0x5e779c===undefined)return'';if(typeof _0x5e779c===_0x596a15(0x17c))return _0x5e779c['replace'](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x5e779c==='number'||typeof _0x5e779c==='boolean')return String(_0x5e779c);if(_0x5e779c instanceof Date)return _0x5e779c[_0x596a15(0x176)]();if(typeof _0x5e779c===_0x596a15(0x171))return JSON['stringify'](_0x5e779c);return String(_0x5e779c);}export function formatQueryResult(_0x43ac51,_0x505f64){const _0x45b109=a70_0x97ac;switch(_0x505f64){case _0x45b109(0x185):return formatAsTable(_0x43ac51);case _0x45b109(0x17e):return formatAsJSON(_0x43ac51);case'jsonl':return formatAsJSONL(_0x43ac51);case'tsv':return formatAsTSV(_0x43ac51);default:return formatAsJSON(_0x43ac51);}}export function formatBytes(_0x1b00f3){const _0x2b55cc=a70_0x97ac;if(_0x1b00f3===0x0)return _0x2b55cc(0x18c);const _0x2e8699=['B','KB','MB','GB','TB'],_0x4b56d1=0x400,_0x224388=Math[_0x2b55cc(0x172)](Math[_0x2b55cc(0x17a)](_0x1b00f3)/Math[_0x2b55cc(0x17a)](_0x4b56d1)),_0x531b50=_0x1b00f3/Math[_0x2b55cc(0x191)](_0x4b56d1,_0x224388),_0x173527=_0x531b50>=0xa?0x1:0x2;return _0x531b50[_0x2b55cc(0x181)](_0x173527)+'\x20'+_0x2e8699[_0x224388];}function a70_0x6adf(){const _0x57ce95=['2941773sogAHd','6830eQmUjU','No\x20rows\x20returned','timestamp','toLowerCase','repeat','min','entries','length','test','map','name','2800830AVOcEE','number','replace','slice','type','object','floor','join','\x20rows\x20(','columns','toISOString','reduce','startsWith','int','log','\x20shown)','string','1139718iHSjoY','json','stdout','bool','toFixed','padEnd','stringify','1783950CkAshR','table','row','9656024aFktZQ','true','long','data','double','0\x20B','boolean','date','2585358YtKYQU','substring','pow','push','3512MVEfOT'];a70_0x6adf=function(){return _0x57ce95;};return a70_0x6adf();}export function formatRows(_0x1c1241){const _0x38a2b8=a70_0x97ac;if(_0x1c1241==null)return'-';if(_0x1c1241===0x0)return'0';if(_0x1c1241<0x3e8)return _0x1c1241['toString']();const _0x388a4a=['','K','M','B','T'],_0x41ceb8=0x3e8,_0x4f5d87=Math['floor'](Math[_0x38a2b8(0x17a)](_0x1c1241)/Math[_0x38a2b8(0x17a)](_0x41ceb8)),_0xaedd5=_0x1c1241/Math[_0x38a2b8(0x191)](_0x41ceb8,_0x4f5d87),_0x33c1ad=_0xaedd5>=0xa?0x1:0x2;return''+_0xaedd5['toFixed'](_0x33c1ad)+_0x388a4a[_0x4f5d87];}
@@ -1 +1 @@
1
- function a71_0x128d(){const _0x1557d6=['5351cQhdNd','28gYLIKT','code','Failed\x20to\x20load\x20JSON:\x20','Permission\x20denied\x20reading\x20file:\x20','File\x20not\x20found:\x20','52AcqsIn','2479990HmOwVK','5283084eSfCam','INTERNAL','1206608agTSYJ','2254359AmFOFP','INVALID_ARGUMENT','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','message','\x27:\x20','88945QnDBQH','ENOENT','Invalid\x20JSON\x20string:\x20','1955940xoIXTc','63FeNgtb','parse','utf-8'];a71_0x128d=function(){return _0x1557d6;};return a71_0x128d();}(function(_0x21c3cf,_0x43907c){const _0x561278=a71_0x32c3,_0x6d629d=_0x21c3cf();while(!![]){try{const _0x1fdf23=-parseInt(_0x561278(0x1bd))/0x1*(-parseInt(_0x561278(0x1c3))/0x2)+-parseInt(_0x561278(0x1c8))/0x3+parseInt(_0x561278(0x1be))/0x4*(parseInt(_0x561278(0x1cd))/0x5)+-parseInt(_0x561278(0x1c5))/0x6+parseInt(_0x561278(0x1b9))/0x7+-parseInt(_0x561278(0x1c7))/0x8+-parseInt(_0x561278(0x1ba))/0x9*(-parseInt(_0x561278(0x1c4))/0xa);if(_0x1fdf23===_0x43907c)break;else _0x6d629d['push'](_0x6d629d['shift']());}catch(_0x24a990){_0x6d629d['push'](_0x6d629d['shift']());}}}(a71_0x128d,0x7928d));function a71_0x32c3(_0x3d0be7,_0x12ac29){const _0x128dd0=a71_0x128d();return a71_0x32c3=function(_0x32c396,_0x451755){_0x32c396=_0x32c396-0x1b8;let _0x1db680=_0x128dd0[_0x32c396];return _0x1db680;},a71_0x32c3(_0x3d0be7,_0x12ac29);}import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x111a55,_0x6fb591){const _0x4285e1=a71_0x32c3;try{if(_0x6fb591){const _0x544569=await readFile(_0x111a55,_0x4285e1(0x1bc));try{return JSON[_0x4285e1(0x1bb)](_0x544569);}catch(_0x44ba84){throw new SDKError(ErrorCode[_0x4285e1(0x1c9)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x111a55+_0x4285e1(0x1cc)+(_0x44ba84 instanceof Error?_0x44ba84[_0x4285e1(0x1cb)]:String(_0x44ba84)));}}else try{return JSON['parse'](_0x111a55);}catch(_0x5ce7af){throw new SDKError(ErrorCode[_0x4285e1(0x1c9)],_0x4285e1(0x1b8)+(_0x5ce7af instanceof Error?_0x5ce7af[_0x4285e1(0x1cb)]:String(_0x5ce7af)));}}catch(_0x2e1562){if(_0x2e1562 instanceof SDKError)throw _0x2e1562;if(_0x2e1562 instanceof Error&&_0x4285e1(0x1bf)in _0x2e1562){const _0x4d735d=_0x2e1562;if(_0x4d735d['code']===_0x4285e1(0x1ce))throw new SDKError(ErrorCode['NOT_FOUND'],_0x4285e1(0x1c2)+_0x111a55);else{if(_0x4d735d[_0x4285e1(0x1bf)]==='EACCES')throw new SDKError(ErrorCode['PERMISSION_DENIED'],_0x4285e1(0x1c1)+_0x111a55);}}throw new SDKError(ErrorCode[_0x4285e1(0x1c6)],_0x4285e1(0x1c0)+(_0x2e1562 instanceof Error?_0x2e1562[_0x4285e1(0x1cb)]:String(_0x2e1562)));}}export async function loadJSONFromOptions(_0x5d6c07,_0x3176d9){const _0x73ca0b=a71_0x32c3;if(_0x5d6c07&&_0x3176d9)throw new SDKError(ErrorCode[_0x73ca0b(0x1c9)],_0x73ca0b(0x1ca));if(_0x5d6c07)return await loadJSON(_0x5d6c07,![]);if(_0x3176d9)return await loadJSON(_0x3176d9,!![]);return undefined;}
1
+ (function(_0x4fc453,_0x271885){const _0x3868ef=a71_0x538d,_0xc6aab4=_0x4fc453();while(!![]){try{const _0x37f80f=parseInt(_0x3868ef(0x10b))/0x1+-parseInt(_0x3868ef(0x11e))/0x2*(parseInt(_0x3868ef(0x10d))/0x3)+-parseInt(_0x3868ef(0x113))/0x4*(parseInt(_0x3868ef(0x104))/0x5)+parseInt(_0x3868ef(0x116))/0x6+parseInt(_0x3868ef(0x105))/0x7*(parseInt(_0x3868ef(0x118))/0x8)+-parseInt(_0x3868ef(0x11c))/0x9+-parseInt(_0x3868ef(0x11a))/0xa*(-parseInt(_0x3868ef(0x115))/0xb);if(_0x37f80f===_0x271885)break;else _0xc6aab4['push'](_0xc6aab4['shift']());}catch(_0x41a48e){_0xc6aab4['push'](_0xc6aab4['shift']());}}}(a71_0x4878,0xdca98));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a71_0x4878(){const _0x39e8d8=['1305086SDecrM','10JyncDH','231zIPGCE','Invalid\x20JSON\x20string:\x20','File\x20not\x20found:\x20','code','INTERNAL','Permission\x20denied\x20reading\x20file:\x20','1037537fEbCmC','PERMISSION_DENIED','3LTwLDY','EACCES','parse','Invalid\x20JSON\x20in\x20file\x20\x27','NOT_FOUND','\x27:\x20','1215024onTmZE','utf-8','11vZYRmG','6442440RjsNlQ','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','168088USSupW','INVALID_ARGUMENT','299260bmzqEe','message','6036111ISQKwB','ENOENT'];a71_0x4878=function(){return _0x39e8d8;};return a71_0x4878();}export async function loadJSON(_0x2f9caf,_0x216ce4){const _0x4cdc49=a71_0x538d;try{if(_0x216ce4){const _0x11068e=await readFile(_0x2f9caf,_0x4cdc49(0x114));try{return JSON[_0x4cdc49(0x10f)](_0x11068e);}catch(_0x374a91){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4cdc49(0x110)+_0x2f9caf+_0x4cdc49(0x112)+(_0x374a91 instanceof Error?_0x374a91[_0x4cdc49(0x11b)]:String(_0x374a91)));}}else try{return JSON[_0x4cdc49(0x10f)](_0x2f9caf);}catch(_0x27e970){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4cdc49(0x106)+(_0x27e970 instanceof Error?_0x27e970['message']:String(_0x27e970)));}}catch(_0x534f4d){if(_0x534f4d instanceof SDKError)throw _0x534f4d;if(_0x534f4d instanceof Error&&_0x4cdc49(0x108)in _0x534f4d){const _0x44d04c=_0x534f4d;if(_0x44d04c[_0x4cdc49(0x108)]===_0x4cdc49(0x11d))throw new SDKError(ErrorCode[_0x4cdc49(0x111)],_0x4cdc49(0x107)+_0x2f9caf);else{if(_0x44d04c[_0x4cdc49(0x108)]===_0x4cdc49(0x10e))throw new SDKError(ErrorCode[_0x4cdc49(0x10c)],_0x4cdc49(0x10a)+_0x2f9caf);}}throw new SDKError(ErrorCode[_0x4cdc49(0x109)],'Failed\x20to\x20load\x20JSON:\x20'+(_0x534f4d instanceof Error?_0x534f4d[_0x4cdc49(0x11b)]:String(_0x534f4d)));}}function a71_0x538d(_0x468694,_0x40bebf){const _0x4878df=a71_0x4878();return a71_0x538d=function(_0x538d19,_0x40c6bc){_0x538d19=_0x538d19-0x104;let _0x450849=_0x4878df[_0x538d19];return _0x450849;},a71_0x538d(_0x468694,_0x40bebf);}export async function loadJSONFromOptions(_0x598b7b,_0x1280d4){const _0x4a038b=a71_0x538d;if(_0x598b7b&&_0x1280d4)throw new SDKError(ErrorCode[_0x4a038b(0x119)],_0x4a038b(0x117));if(_0x598b7b)return await loadJSON(_0x598b7b,![]);if(_0x1280d4)return await loadJSON(_0x1280d4,!![]);return undefined;}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Utility functions for LLM project backup/restore operations
3
+ */
4
+ import type { AgentFull, AgentTool, AgentVariable } from '../types/index.js';
5
+ /**
6
+ * Check if an agent can be created (all its agent dependencies exist in agentMap)
7
+ *
8
+ * @param agent - Agent to check
9
+ * @param agentMap - Map of old agent IDs to new agent IDs
10
+ * @returns true if all agent dependencies are satisfied
11
+ */
12
+ export declare function canCreateAgent(agent: AgentFull, agentMap: Map<string, string>): boolean;
13
+ /**
14
+ * Remap IDs in agent tools from old IDs to new IDs
15
+ *
16
+ * @param tools - Array of agent tools
17
+ * @param kbMap - Map of old KB IDs to new KB IDs
18
+ * @param agentMap - Map of old agent IDs to new agent IDs
19
+ * @returns Tools with remapped IDs
20
+ */
21
+ export declare function remapToolIds(tools: AgentTool[], kbMap: Map<string, string>, agentMap: Map<string, string>): AgentTool[];
22
+ /**
23
+ * Remap IDs in agent variables from old IDs to new IDs
24
+ *
25
+ * @param variables - Array of agent variables
26
+ * @param kbMap - Map of old KB IDs to new KB IDs
27
+ * @returns Variables with remapped IDs
28
+ */
29
+ export declare function remapVariableIds(variables: AgentVariable[], kbMap: Map<string, string>): AgentVariable[];
30
+ /**
31
+ * Validate backup metadata version
32
+ *
33
+ * @param version - Version string from backup metadata
34
+ * @returns true if version is supported
35
+ */
36
+ export declare function isSupportedBackupVersion(version: string): boolean;
37
+ //# sourceMappingURL=llm-backup-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-backup-utils.d.ts","sourceRoot":"","sources":["../../src/utils/llm-backup-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAOvF;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,EAAE,EAClB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,SAAS,EAAE,CAUb;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,aAAa,EAAE,EAC1B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACzB,aAAa,EAAE,CAKjB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEjE"}
@@ -0,0 +1 @@
1
+ (function(_0x3dfe30,_0x1d3b49){const _0x21cf52=a72_0x62ea,_0x396e5f=_0x3dfe30();while(!![]){try{const _0x4fc523=parseInt(_0x21cf52(0xda))/0x1+-parseInt(_0x21cf52(0xde))/0x2+parseInt(_0x21cf52(0xdd))/0x3+-parseInt(_0x21cf52(0xe4))/0x4*(-parseInt(_0x21cf52(0xdc))/0x5)+parseInt(_0x21cf52(0xdf))/0x6+parseInt(_0x21cf52(0xe2))/0x7*(-parseInt(_0x21cf52(0xd8))/0x8)+-parseInt(_0x21cf52(0xd7))/0x9;if(_0x4fc523===_0x1d3b49)break;else _0x396e5f['push'](_0x396e5f['shift']());}catch(_0x65325f){_0x396e5f['push'](_0x396e5f['shift']());}}}(a72_0x2647,0xaeadc));function a72_0x62ea(_0x158b5c,_0xd4752b){const _0x2647fe=a72_0x2647();return a72_0x62ea=function(_0x62ea7d,_0x579f77){_0x62ea7d=_0x62ea7d-0xd6;let _0x1c4241=_0x2647fe[_0x62ea7d];return _0x1c4241;},a72_0x62ea(_0x158b5c,_0xd4752b);}function a72_0x2647(){const _0x3d5a77=['1.0','2931430tvARBk','2070069ZfadfY','1458836afzeCD','4221636AwhPqd','has','attributes','721987bahzMs','targetKnowledgeBaseId','4bYgIlJ','get','5605884OJYSPl','40QwbpVa','targetAgentId','603568ZgyLYI'];a72_0x2647=function(){return _0x3d5a77;};return a72_0x2647();}export function canCreateAgent(_0xf7104d,_0x7352f){const _0x29b83a=a72_0x62ea;for(const _0x95125a of _0xf7104d[_0x29b83a(0xe1)]['tools']){if(_0x95125a[_0x29b83a(0xd9)]&&!_0x7352f[_0x29b83a(0xe0)](_0x95125a[_0x29b83a(0xd9)]))return![];}return!![];}export function remapToolIds(_0x19fd3d,_0x1153a3,_0x4a73db){const _0x347a98=a72_0x62ea;return _0x19fd3d['map'](_0x55b85f=>({..._0x55b85f,'targetKnowledgeBaseId':_0x55b85f[_0x347a98(0xe3)]?_0x1153a3[_0x347a98(0xd6)](_0x55b85f[_0x347a98(0xe3)])||_0x55b85f[_0x347a98(0xe3)]:undefined,'targetAgentId':_0x55b85f[_0x347a98(0xd9)]?_0x4a73db['get'](_0x55b85f['targetAgentId'])||_0x55b85f[_0x347a98(0xd9)]:undefined}));}export function remapVariableIds(_0x10277b,_0xffdfff){const _0x479cf3=a72_0x62ea;return _0x10277b['map'](_0x55d298=>({..._0x55d298,'targetKnowledgeBaseId':_0xffdfff[_0x479cf3(0xd6)](_0x55d298[_0x479cf3(0xe3)])||_0x55d298['targetKnowledgeBaseId']}));}export function isSupportedBackupVersion(_0x404228){const _0x22e514=a72_0x62ea;return _0x404228===_0x22e514(0xdb);}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-backup-utils.js","sourceRoot":"","sources":["../../src/utils/llm-backup-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,KAAgB,EAAE,QAA6B;IAC5E,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QAC1C,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;YAC5D,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAkB,EAClB,KAA0B,EAC1B,QAA6B;IAE7B,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxB,GAAG,IAAI;QACP,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;YAC/C,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,IAAI,CAAC,qBAAqB;YACrE,CAAC,CAAC,SAAS;QACb,aAAa,EAAE,IAAI,CAAC,aAAa;YAC/B,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,aAAa;YACxD,CAAC,CAAC,SAAS;KACd,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAA0B,EAC1B,KAA0B;IAE1B,OAAO,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAChC,GAAG,QAAQ;QACX,qBAAqB,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,QAAQ,CAAC,qBAAqB;KACnG,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAe;IACtD,OAAO,OAAO,KAAK,KAAK,CAAC;AAC3B,CAAC"}
@@ -1 +1 @@
1
- function a72_0x11f1(_0x45ad67,_0x516407){const _0x23d7f6=a72_0x23d7();return a72_0x11f1=function(_0x11f182,_0x3fe8a6){_0x11f182=_0x11f182-0x139;let _0xcd3c03=_0x23d7f6[_0x11f182];return _0xcd3c03;},a72_0x11f1(_0x45ad67,_0x516407);}(function(_0xef8956,_0x45f600){const _0x52ce10=a72_0x11f1,_0x2be8a8=_0xef8956();while(!![]){try{const _0x448aab=parseInt(_0x52ce10(0x13f))/0x1+-parseInt(_0x52ce10(0x141))/0x2*(-parseInt(_0x52ce10(0x13c))/0x3)+-parseInt(_0x52ce10(0x142))/0x4+-parseInt(_0x52ce10(0x140))/0x5+-parseInt(_0x52ce10(0x13e))/0x6+parseInt(_0x52ce10(0x13b))/0x7+-parseInt(_0x52ce10(0x13a))/0x8*(-parseInt(_0x52ce10(0x139))/0x9);if(_0x448aab===_0x45f600)break;else _0x2be8a8['push'](_0x2be8a8['shift']());}catch(_0x28f0df){_0x2be8a8['push'](_0x2be8a8['shift']());}}}(a72_0x23d7,0x91a4d));const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':'claude-4.5-sonnet'};function a72_0x23d7(){const _0x4ab580=['1246833MVPzdb','32KfdLyQ','4107131TJjqso','3rIEwNx','match','5684322QdQiYQ','1113280KRNvVy','2056255tjdpxG','1269638lljiHM','3735140kpwOOa'];a72_0x23d7=function(){return _0x4ab580;};return a72_0x23d7();}export function extractModelAlias(_0x4ebe9f){const _0x8e7ae1=a72_0x11f1,_0x5bad19=_0x4ebe9f[_0x8e7ae1(0x13d)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x5bad19)return _0x5bad19[0x1]['toLowerCase']();return _0x4ebe9f;}export function resolveModelAlias(_0x4d7649){return MODEL_ALIASES[_0x4d7649['toLowerCase']()]||_0x4d7649;}export function getModelAliases(){return{...MODEL_ALIASES};}
1
+ const a73_0x52226d=a73_0x4161;(function(_0x231092,_0x50987c){const _0x309fb6=a73_0x4161,_0x53f44c=_0x231092();while(!![]){try{const _0x462055=parseInt(_0x309fb6(0x1a2))/0x1+parseInt(_0x309fb6(0x197))/0x2*(parseInt(_0x309fb6(0x1a4))/0x3)+-parseInt(_0x309fb6(0x19c))/0x4+-parseInt(_0x309fb6(0x1a1))/0x5*(parseInt(_0x309fb6(0x19a))/0x6)+parseInt(_0x309fb6(0x19b))/0x7*(-parseInt(_0x309fb6(0x1a3))/0x8)+parseInt(_0x309fb6(0x19e))/0x9+-parseInt(_0x309fb6(0x19d))/0xa*(-parseInt(_0x309fb6(0x198))/0xb);if(_0x462055===_0x50987c)break;else _0x53f44c['push'](_0x53f44c['shift']());}catch(_0x172399){_0x53f44c['push'](_0x53f44c['shift']());}}}(a73_0x298d,0xd6312));const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':a73_0x52226d(0x19f)};export function extractModelAlias(_0x452ad7){const _0x1fbef7=a73_0x52226d,_0xf3ae46=_0x452ad7[_0x1fbef7(0x199)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0xf3ae46)return _0xf3ae46[0x1][_0x1fbef7(0x1a0)]();return _0x452ad7;}function a73_0x298d(){const _0x4c9361=['toLowerCase','835QoZjbh','1234130Hxjqjq','140672FElsMd','530598XioIdW','2TSIqvz','22sLUuye','match','59610zviLAU','70APonYe','3882852Qupcwm','5194450qOoKyj','11098278magEmx','claude-4.5-sonnet'];a73_0x298d=function(){return _0x4c9361;};return a73_0x298d();}export function resolveModelAlias(_0x58de27){const _0x573173=a73_0x52226d;return MODEL_ALIASES[_0x58de27[_0x573173(0x1a0)]()]||_0x58de27;}function a73_0x4161(_0x548227,_0x374862){const _0x298dcc=a73_0x298d();return a73_0x4161=function(_0x41617c,_0xf804e9){_0x41617c=_0x41617c-0x197;let _0x4d14ab=_0x298dcc[_0x41617c];return _0x4d14ab;},a73_0x4161(_0x548227,_0x374862);}export function getModelAliases(){return{...MODEL_ALIASES};}
@@ -1 +1 @@
1
- function a73_0xc3f9(){const _0x4af8f1=['Invalid\x20limit\x20value:\x20','2007408jITWXE','.\x20Must\x20be\x20an\x20integer.','2591343zYlNxH','30oVQWYD','1550312RNorgq','Invalid\x20timeout\x20value:\x20','41555yZlmFA','14ldVnvC','354588peXsaH','.\x20Must\x20be\x20a\x20positive\x20number.','.\x20Must\x20be\x20a\x20number.','20046356uzCbDL','isInteger','number','18sOZnsh','398847PuwukF','14vvcGLn'];a73_0xc3f9=function(){return _0x4af8f1;};return a73_0xc3f9();}function a73_0xa5c6(_0x5614a9,_0x5d1014){const _0xc3f9cd=a73_0xc3f9();return a73_0xa5c6=function(_0xa5c6ae,_0x4b84b2){_0xa5c6ae=_0xa5c6ae-0xf4;let _0x5c031c=_0xc3f9cd[_0xa5c6ae];return _0x5c031c;},a73_0xa5c6(_0x5614a9,_0x5d1014);}(function(_0x328626,_0x30d2e0){const _0x5a067b=a73_0xa5c6,_0x1e2bd9=_0x328626();while(!![]){try{const _0x306254=-parseInt(_0x5a067b(0xf9))/0x1+-parseInt(_0x5a067b(0x101))/0x2*(parseInt(_0x5a067b(0x100))/0x3)+-parseInt(_0x5a067b(0x103))/0x4+parseInt(_0x5a067b(0xf7))/0x5*(parseInt(_0x5a067b(0xff))/0x6)+parseInt(_0x5a067b(0xf8))/0x7*(-parseInt(_0x5a067b(0xf5))/0x8)+-parseInt(_0x5a067b(0x105))/0x9*(-parseInt(_0x5a067b(0xf4))/0xa)+parseInt(_0x5a067b(0xfc))/0xb;if(_0x306254===_0x30d2e0)break;else _0x1e2bd9['push'](_0x1e2bd9['shift']());}catch(_0x20f16b){_0x1e2bd9['push'](_0x1e2bd9['shift']());}}}(a73_0xc3f9,0x82f81));export function validateLimitOption(_0x353988){const _0x3ae0b6=a73_0xa5c6;if(!Number[_0x3ae0b6(0xfd)](_0x353988))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x353988+_0x3ae0b6(0x104)};if(_0x353988<=0x0)return{'isValid':![],'error':_0x3ae0b6(0x102)+_0x353988+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x353988};}export function validateTimeoutOption(_0x582d7d,_0x2df502=0x1e){const _0x19ba25=a73_0xa5c6;if(_0x582d7d===undefined)return{'isValid':!![],'value':_0x2df502};const _0x414672=typeof _0x582d7d===_0x19ba25(0xfe)?_0x582d7d:parseFloat(_0x582d7d);if(isNaN(_0x414672))return{'isValid':![],'error':_0x19ba25(0xf6)+_0x582d7d+_0x19ba25(0xfb)};if(_0x414672<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x414672+_0x19ba25(0xfa)};return{'isValid':!![],'value':_0x414672};}
1
+ (function(_0x16436a,_0xb8eba2){const _0x2320cb=a74_0x38b7,_0x527d87=_0x16436a();while(!![]){try{const _0x58e9b7=-parseInt(_0x2320cb(0x14f))/0x1+-parseInt(_0x2320cb(0x151))/0x2*(parseInt(_0x2320cb(0x153))/0x3)+parseInt(_0x2320cb(0x155))/0x4*(parseInt(_0x2320cb(0x156))/0x5)+parseInt(_0x2320cb(0x15a))/0x6+-parseInt(_0x2320cb(0x159))/0x7*(parseInt(_0x2320cb(0x157))/0x8)+-parseInt(_0x2320cb(0x150))/0x9+parseInt(_0x2320cb(0x14e))/0xa;if(_0x58e9b7===_0xb8eba2)break;else _0x527d87['push'](_0x527d87['shift']());}catch(_0x12733f){_0x527d87['push'](_0x527d87['shift']());}}}(a74_0x2869,0x1c4a9));function a74_0x2869(){const _0x194408=['number','124988rVFfes','5epHxAE','520NDRyGH','Invalid\x20limit\x20value:\x20','23618zXpmzr','976266DpWgXG','Invalid\x20timeout\x20value:\x20','isInteger','.\x20Must\x20be\x20an\x20integer.','5382290hywhJw','214082AlIzpX','1298061mnpvLE','5158oMxQRk','.\x20Must\x20be\x20a\x20positive\x20integer.','45LmZTYR'];a74_0x2869=function(){return _0x194408;};return a74_0x2869();}function a74_0x38b7(_0x36055d,_0x36fd05){const _0x2869b7=a74_0x2869();return a74_0x38b7=function(_0x38b708,_0x2a92a9){_0x38b708=_0x38b708-0x14d;let _0x190e05=_0x2869b7[_0x38b708];return _0x190e05;},a74_0x38b7(_0x36055d,_0x36fd05);}export function validateLimitOption(_0x7533e1){const _0xd3e72c=a74_0x38b7;if(!Number[_0xd3e72c(0x15c)](_0x7533e1))return{'isValid':![],'error':_0xd3e72c(0x158)+_0x7533e1+_0xd3e72c(0x14d)};if(_0x7533e1<=0x0)return{'isValid':![],'error':_0xd3e72c(0x158)+_0x7533e1+_0xd3e72c(0x152)};return{'isValid':!![],'value':_0x7533e1};}export function validateTimeoutOption(_0x34e6ec,_0x2753e6=0x1e){const _0x1d510a=a74_0x38b7;if(_0x34e6ec===undefined)return{'isValid':!![],'value':_0x2753e6};const _0xc5aef0=typeof _0x34e6ec===_0x1d510a(0x154)?_0x34e6ec:parseFloat(_0x34e6ec);if(isNaN(_0xc5aef0))return{'isValid':![],'error':_0x1d510a(0x15b)+_0x34e6ec+'.\x20Must\x20be\x20a\x20number.'};if(_0xc5aef0<=0x0)return{'isValid':![],'error':_0x1d510a(0x15b)+_0xc5aef0+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0xc5aef0};}
@@ -1 +1 @@
1
- function a74_0x1eb8(){const _0x50eba9=['133680zXNams','listening','\x20and\x20','close','17TxWdMN','20205126LLmYDc','999425AhTgBM','56EphNSc','listen','13374FSCAgs','No\x20available\x20port\x20found\x20between\x20','4616688gOPVhr','error','2113220XwmNDL','4276974tEkmnt','code','0.0.0.0'];a74_0x1eb8=function(){return _0x50eba9;};return a74_0x1eb8();}(function(_0xfc830b,_0x17821e){const _0x21d28f=a74_0x56b5,_0x5ebdee=_0xfc830b();while(!![]){try{const _0x41b939=-parseInt(_0x21d28f(0xba))/0x1*(parseInt(_0x21d28f(0xae))/0x2)+parseInt(_0x21d28f(0xb6))/0x3*(-parseInt(_0x21d28f(0xbd))/0x4)+parseInt(_0x21d28f(0xb2))/0x5+-parseInt(_0x21d28f(0xb3))/0x6+-parseInt(_0x21d28f(0xbc))/0x7+-parseInt(_0x21d28f(0xb0))/0x8+parseInt(_0x21d28f(0xbb))/0x9;if(_0x41b939===_0x17821e)break;else _0x5ebdee['push'](_0x5ebdee['shift']());}catch(_0x55cbb9){_0x5ebdee['push'](_0x5ebdee['shift']());}}}(a74_0x1eb8,0x79729));import{createServer}from'node:net';export async function isPortAvailable(_0x16df79){return new Promise(_0x564e37=>{const _0x48369a=a74_0x56b5,_0x3ac8c5=createServer();_0x3ac8c5['once'](_0x48369a(0xb1),_0x117348=>{const _0x2f6a0f=_0x48369a;_0x117348[_0x2f6a0f(0xb4)]==='EADDRINUSE'?_0x564e37(![]):_0x564e37(![]);}),_0x3ac8c5['once'](_0x48369a(0xb7),()=>{const _0x1c7c2f=_0x48369a;_0x3ac8c5[_0x1c7c2f(0xb9)](),_0x564e37(!![]);}),_0x3ac8c5[_0x48369a(0xbe)](_0x16df79,_0x48369a(0xb5));});}function a74_0x56b5(_0x303313,_0x1ba6b2){const _0x1eb8c1=a74_0x1eb8();return a74_0x56b5=function(_0x56b51d,_0x1693be){_0x56b51d=_0x56b51d-0xae;let _0x5090d3=_0x1eb8c1[_0x56b51d];return _0x5090d3;},a74_0x56b5(_0x303313,_0x1ba6b2);}export async function findAvailablePort(_0x1b91a5=0xfa0,_0x3d3c39=0x64){const _0x4f01d1=a74_0x56b5;for(let _0x3d1b17=0x0;_0x3d1b17<_0x3d3c39;_0x3d1b17++){const _0x58d753=_0x1b91a5+_0x3d1b17;if(await isPortAvailable(_0x58d753))return _0x58d753;}throw new Error(_0x4f01d1(0xaf)+_0x1b91a5+_0x4f01d1(0xb8)+(_0x1b91a5+_0x3d3c39-0x1));}
1
+ (function(_0xbdb528,_0x5629ff){const _0x194540=a75_0x1bef,_0x35e764=_0xbdb528();while(!![]){try{const _0x3e650b=-parseInt(_0x194540(0xb0))/0x1*(-parseInt(_0x194540(0xae))/0x2)+parseInt(_0x194540(0xb9))/0x3+-parseInt(_0x194540(0xb8))/0x4*(parseInt(_0x194540(0xb2))/0x5)+parseInt(_0x194540(0xad))/0x6+parseInt(_0x194540(0xba))/0x7*(parseInt(_0x194540(0xb6))/0x8)+parseInt(_0x194540(0xaf))/0x9+parseInt(_0x194540(0xb5))/0xa*(-parseInt(_0x194540(0xbb))/0xb);if(_0x3e650b===_0x5629ff)break;else _0x35e764['push'](_0x35e764['shift']());}catch(_0x5bd041){_0x35e764['push'](_0x35e764['shift']());}}}(a75_0x4a31,0xabe2c));import{createServer}from'node:net';function a75_0x1bef(_0x3961b9,_0xa287bf){const _0x4a318c=a75_0x4a31();return a75_0x1bef=function(_0x1befa9,_0xb26128){_0x1befa9=_0x1befa9-0xad;let _0x2d89bd=_0x4a318c[_0x1befa9];return _0x2d89bd;},a75_0x1bef(_0x3961b9,_0xa287bf);}export async function isPortAvailable(_0x2036ae){return new Promise(_0x2a245d=>{const _0x35a32e=a75_0x1bef,_0x4d5be0=createServer();_0x4d5be0[_0x35a32e(0xbc)]('error',_0x3cddc0=>{const _0x41aab3=_0x35a32e;_0x3cddc0[_0x41aab3(0xb1)]===_0x41aab3(0xb7)?_0x2a245d(![]):_0x2a245d(![]);}),_0x4d5be0[_0x35a32e(0xbc)]('listening',()=>{const _0x305cca=_0x35a32e;_0x4d5be0[_0x305cca(0xb4)](),_0x2a245d(!![]);}),_0x4d5be0[_0x35a32e(0xb3)](_0x2036ae,_0x35a32e(0xbd));});}function a75_0x4a31(){const _0x11cb01=['21AGPiDT','11LJMWXi','once','0.0.0.0','5124384wyqHhn','2156502rcwale','4032711ErOAAO','1fcpUCB','code','5276835iWFMQJ','listen','close','17217680BjlTgl','412312ZjkoHS','EADDRINUSE','4uTZuAa','2838504thayEy'];a75_0x4a31=function(){return _0x11cb01;};return a75_0x4a31();}export async function findAvailablePort(_0x3ea17f=0xfa0,_0x3517dd=0x64){for(let _0x1e2099=0x0;_0x1e2099<_0x3517dd;_0x1e2099++){const _0x5b6bf4=_0x3ea17f+_0x1e2099;if(await isPortAvailable(_0x5b6bf4))return _0x5b6bf4;}throw new Error('No\x20available\x20port\x20found\x20between\x20'+_0x3ea17f+'\x20and\x20'+(_0x3ea17f+_0x3517dd-0x1));}
@@ -1 +1 @@
1
- const a75_0x599233=a75_0xff67;(function(_0x49d7bf,_0x362a5a){const _0x21469e=a75_0xff67,_0x4e26e6=_0x49d7bf();while(!![]){try{const _0x29c916=parseInt(_0x21469e(0x148))/0x1*(-parseInt(_0x21469e(0x149))/0x2)+-parseInt(_0x21469e(0x153))/0x3*(parseInt(_0x21469e(0x151))/0x4)+parseInt(_0x21469e(0x147))/0x5+-parseInt(_0x21469e(0x133))/0x6+parseInt(_0x21469e(0x128))/0x7+parseInt(_0x21469e(0x12b))/0x8*(-parseInt(_0x21469e(0x155))/0x9)+-parseInt(_0x21469e(0x12e))/0xa*(-parseInt(_0x21469e(0x138))/0xb);if(_0x29c916===_0x362a5a)break;else _0x4e26e6['push'](_0x4e26e6['shift']());}catch(_0x3366b9){_0x4e26e6['push'](_0x4e26e6['shift']());}}}(a75_0x361a,0x6c212));function a75_0x361a(){const _0x317b82=['3359320wkWnoF','comm','utf-8','kill','ppid','3796860wJzYPb','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','error','fish','tcsh','44vCkPzb','has','env','win32','trim','platform','\x20on\x20Windows:','elvish','zsh','powershell','DEBUG','code','pid','bash',')\x20spawned\x20by\x20','1450380qRNrFZ','1PpwbdX','715982AZroSI',',\x20continuing\x20up','Found\x20ephemeral\x20shell\x20','pop','xonsh','replace','split','ps\x20-p\x20','36inEHCA','cursor','45219vUUonq','length','112977wZATCJ',',\x20using\x20fallback','1306284cEEAse','pwsh','ksh','160IKOvxZ','\x20on\x20POSIX:','join'];a75_0x361a=function(){return _0x317b82;};return a75_0x361a();}import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a75_0x599233(0x145),a75_0x599233(0x140),'sh',a75_0x599233(0x136),a75_0x599233(0x12a),a75_0x599233(0x137),'csh','dash',a75_0x599233(0x129),a75_0x599233(0x141),'nu','ion',a75_0x599233(0x13f),a75_0x599233(0x14d)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude',a75_0x599233(0x143),a75_0x599233(0x152)]);function getProcessInfoWindows(_0x4a8014){const _0x44500d=a75_0x599233;try{const _0x245f6e=execSync('wmic\x20process\x20where\x20ProcessId='+_0x4a8014+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':'utf-8','windowsHide':!![]})[_0x44500d(0x13c)](),_0x4e6bbf=_0x245f6e['split']('\x0a')['filter'](_0xb3275c=>_0xb3275c['trim']());if(_0x4e6bbf[_0x44500d(0x154)]<0x2)return null;const _0x2afd98=_0x4e6bbf[_0x4e6bbf[_0x44500d(0x154)]-0x1][_0x44500d(0x14f)](',');if(_0x2afd98[_0x44500d(0x154)]<0x3)return null;const _0x494ee4=_0x2afd98[0x1]?.[_0x44500d(0x13c)]()||'',_0x1bb0c8=parseInt(_0x2afd98[0x2]?.[_0x44500d(0x13c)]()||'0',0xa);if(isNaN(_0x1bb0c8)||!_0x494ee4)return null;return{'pid':_0x4a8014,'ppid':_0x1bb0c8,'comm':_0x494ee4[_0x44500d(0x14e)](/\.exe$/i,'')};}catch(_0xcd0dd6){return process[_0x44500d(0x13a)]['DEBUG']&&console[_0x44500d(0x135)](_0x44500d(0x134)+_0x4a8014+_0x44500d(0x13e),_0xcd0dd6),null;}}function getProcessInfoPosix(_0x1578fb){const _0x469369=a75_0x599233;try{const _0x6697db=execSync(_0x469369(0x150)+_0x1578fb+'\x20-o\x20ppid=,comm=',{'encoding':_0x469369(0x130)})[_0x469369(0x13c)](),[_0x2a3716,..._0x204db6]=_0x6697db[_0x469369(0x14f)](/\s+/),_0x3025c0=parseInt(_0x2a3716,0xa),_0x13ce51=_0x204db6[_0x469369(0x12d)]('\x20');if(isNaN(_0x3025c0))return null;return{'pid':_0x1578fb,'ppid':_0x3025c0,'comm':_0x13ce51};}catch(_0x19e870){return process[_0x469369(0x13a)][_0x469369(0x142)]&&console['error']('Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20'+_0x1578fb+_0x469369(0x12c),_0x19e870),null;}}function getProcessInfo(_0x19574c){const _0x584229=a75_0x599233;if(process[_0x584229(0x13d)]===_0x584229(0x13b))return getProcessInfoWindows(_0x19574c);return getProcessInfoPosix(_0x19574c);}function getBasename(_0x55a9b0){const _0x5bc7a2=a75_0x599233;return _0x55a9b0[_0x5bc7a2(0x14e)](/^-/,'')[_0x5bc7a2(0x14f)]('/')[_0x5bc7a2(0x14c)]()?.['toLowerCase']()||'';}function isShell(_0x4c1434){return SHELL_NAMES['has'](getBasename(_0x4c1434));}function isEphemeralShellSpawner(_0xaacc9c){const _0x300b82=a75_0x599233;return EPHEMERAL_SHELL_SPAWNERS[_0x300b82(0x139)](getBasename(_0xaacc9c));}let cachedShellPID;function findShellPID(){const _0xa3e372=a75_0x599233;let _0x45d936=process['ppid'];const _0x42975b=0xa;let _0x1856d4=0x0;while(_0x1856d4<_0x42975b){const _0x38a0cf=getProcessInfo(_0x45d936);if(!_0x38a0cf){process[_0xa3e372(0x13a)][_0xa3e372(0x142)]&&console[_0xa3e372(0x135)]('Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20'+_0x45d936+_0xa3e372(0x156));break;}if(isShell(_0x38a0cf[_0xa3e372(0x12f)])){const _0x5bb637=getProcessInfo(_0x38a0cf[_0xa3e372(0x132)]);if(_0x5bb637&&isEphemeralShellSpawner(_0x5bb637[_0xa3e372(0x12f)])){process[_0xa3e372(0x13a)]['DEBUG']&&console['error'](_0xa3e372(0x14b)+_0x38a0cf[_0xa3e372(0x144)]+'\x20('+_0x38a0cf[_0xa3e372(0x12f)]+_0xa3e372(0x146)+_0x5bb637['comm']+_0xa3e372(0x14a));_0x45d936=_0x38a0cf[_0xa3e372(0x132)],_0x1856d4++;continue;}return _0x38a0cf['pid'];}if(_0x38a0cf[_0xa3e372(0x132)]===0x0||_0x38a0cf[_0xa3e372(0x132)]===0x1){if(isShell(_0x38a0cf[_0xa3e372(0x12f)]))return _0x38a0cf['pid'];break;}_0x45d936=_0x38a0cf[_0xa3e372(0x132)],_0x1856d4++;}return process[_0xa3e372(0x13a)][_0xa3e372(0x142)]&&console[_0xa3e372(0x135)]('No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid'),process[_0xa3e372(0x132)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}function a75_0xff67(_0x28b8dd,_0x2bd4d5){const _0x361aa6=a75_0x361a();return a75_0xff67=function(_0xff675b,_0x2b89dd){_0xff675b=_0xff675b-0x128;let _0x486ba5=_0x361aa6[_0xff675b];return _0x486ba5;},a75_0xff67(_0x28b8dd,_0x2bd4d5);}export function isProcessRunning(_0x277aa9){const _0x4141df=a75_0x599233;try{return process[_0x4141df(0x131)](_0x277aa9,0x0),!![];}catch{return![];}}
1
+ const a76_0x44b785=a76_0x45db;(function(_0x27b92c,_0x7425ad){const _0x5e6046=a76_0x45db,_0x174ade=_0x27b92c();while(!![]){try{const _0x3b8647=-parseInt(_0x5e6046(0x16a))/0x1*(parseInt(_0x5e6046(0x157))/0x2)+parseInt(_0x5e6046(0x163))/0x3+parseInt(_0x5e6046(0x16c))/0x4*(parseInt(_0x5e6046(0x156))/0x5)+parseInt(_0x5e6046(0x16f))/0x6*(parseInt(_0x5e6046(0x170))/0x7)+parseInt(_0x5e6046(0x141))/0x8*(-parseInt(_0x5e6046(0x15a))/0x9)+parseInt(_0x5e6046(0x160))/0xa*(parseInt(_0x5e6046(0x143))/0xb)+parseInt(_0x5e6046(0x144))/0xc;if(_0x3b8647===_0x7425ad)break;else _0x174ade['push'](_0x174ade['shift']());}catch(_0x464a7c){_0x174ade['push'](_0x174ade['shift']());}}}(a76_0x57aa,0x4ea2e));import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a76_0x44b785(0x158),'zsh','sh',a76_0x44b785(0x15f),a76_0x44b785(0x142),'tcsh',a76_0x44b785(0x148),a76_0x44b785(0x164),a76_0x44b785(0x145),a76_0x44b785(0x167),'nu',a76_0x44b785(0x14a),a76_0x44b785(0x171),a76_0x44b785(0x147)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude',a76_0x44b785(0x13f),a76_0x44b785(0x140)]);function getProcessInfoWindows(_0x54ea72){const _0x33108e=a76_0x44b785;try{const _0x1724ae=execSync(_0x33108e(0x169)+_0x54ea72+_0x33108e(0x15c),{'encoding':_0x33108e(0x14d),'windowsHide':!![]})['trim'](),_0x3e9c19=_0x1724ae[_0x33108e(0x161)]('\x0a')[_0x33108e(0x162)](_0x52552b=>_0x52552b[_0x33108e(0x153)]());if(_0x3e9c19['length']<0x2)return null;const _0x18f916=_0x3e9c19[_0x3e9c19[_0x33108e(0x152)]-0x1][_0x33108e(0x161)](',');if(_0x18f916[_0x33108e(0x152)]<0x3)return null;const _0x53b9b7=_0x18f916[0x1]?.[_0x33108e(0x153)]()||'',_0x3dee17=parseInt(_0x18f916[0x2]?.[_0x33108e(0x153)]()||'0',0xa);if(isNaN(_0x3dee17)||!_0x53b9b7)return null;return{'pid':_0x54ea72,'ppid':_0x3dee17,'comm':_0x53b9b7[_0x33108e(0x150)](/\.exe$/i,'')};}catch(_0x34b782){return process[_0x33108e(0x168)]['DEBUG']&&console[_0x33108e(0x165)](_0x33108e(0x14b)+_0x54ea72+_0x33108e(0x166),_0x34b782),null;}}function getProcessInfoPosix(_0x27b8af){const _0x4c9ccb=a76_0x44b785;try{const _0x2c29e8=execSync('ps\x20-p\x20'+_0x27b8af+_0x4c9ccb(0x16d),{'encoding':'utf-8'})[_0x4c9ccb(0x153)](),[_0x3d4c2f,..._0x667c54]=_0x2c29e8[_0x4c9ccb(0x161)](/\s+/),_0x443de0=parseInt(_0x3d4c2f,0xa),_0x44e504=_0x667c54['join']('\x20');if(isNaN(_0x443de0))return null;return{'pid':_0x27b8af,'ppid':_0x443de0,'comm':_0x44e504};}catch(_0x479fcd){return process[_0x4c9ccb(0x168)][_0x4c9ccb(0x16b)]&&console[_0x4c9ccb(0x165)]('Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20'+_0x27b8af+_0x4c9ccb(0x14f),_0x479fcd),null;}}function getProcessInfo(_0x2cfe61){const _0x295dc2=a76_0x44b785;if(process[_0x295dc2(0x146)]===_0x295dc2(0x15e))return getProcessInfoWindows(_0x2cfe61);return getProcessInfoPosix(_0x2cfe61);}function a76_0x45db(_0x4bdbf3,_0x2623f4){const _0x57aaee=a76_0x57aa();return a76_0x45db=function(_0x45dbb3,_0x3c1547){_0x45dbb3=_0x45dbb3-0x13f;let _0x2da13e=_0x57aaee[_0x45dbb3];return _0x2da13e;},a76_0x45db(_0x4bdbf3,_0x2623f4);}function getBasename(_0x21bd36){const _0x301075=a76_0x44b785;return _0x21bd36[_0x301075(0x150)](/^-/,'')[_0x301075(0x161)]('/')[_0x301075(0x14c)]()?.[_0x301075(0x154)]()||'';}function isShell(_0x486408){const _0x379d76=a76_0x44b785;return SHELL_NAMES[_0x379d76(0x149)](getBasename(_0x486408));}function isEphemeralShellSpawner(_0x201dc6){const _0x1b2241=a76_0x44b785;return EPHEMERAL_SHELL_SPAWNERS[_0x1b2241(0x149)](getBasename(_0x201dc6));}let cachedShellPID;function findShellPID(){const _0xf64602=a76_0x44b785;let _0x477abb=process[_0xf64602(0x14e)];const _0x576618=0xa;let _0x4360b3=0x0;while(_0x4360b3<_0x576618){const _0x4fcf6b=getProcessInfo(_0x477abb);if(!_0x4fcf6b){process[_0xf64602(0x168)]['DEBUG']&&console[_0xf64602(0x165)]('Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20'+_0x477abb+',\x20using\x20fallback');break;}if(isShell(_0x4fcf6b[_0xf64602(0x159)])){const _0x6b7f8e=getProcessInfo(_0x4fcf6b[_0xf64602(0x14e)]);if(_0x6b7f8e&&isEphemeralShellSpawner(_0x6b7f8e[_0xf64602(0x159)])){process[_0xf64602(0x168)][_0xf64602(0x16b)]&&console[_0xf64602(0x165)]('Found\x20ephemeral\x20shell\x20'+_0x4fcf6b[_0xf64602(0x15d)]+'\x20('+_0x4fcf6b[_0xf64602(0x159)]+_0xf64602(0x151)+_0x6b7f8e[_0xf64602(0x159)]+_0xf64602(0x155));_0x477abb=_0x4fcf6b[_0xf64602(0x14e)],_0x4360b3++;continue;}return _0x4fcf6b[_0xf64602(0x15d)];}if(_0x4fcf6b[_0xf64602(0x14e)]===0x0||_0x4fcf6b[_0xf64602(0x14e)]===0x1){if(isShell(_0x4fcf6b['comm']))return _0x4fcf6b[_0xf64602(0x15d)];break;}_0x477abb=_0x4fcf6b[_0xf64602(0x14e)],_0x4360b3++;}return process[_0xf64602(0x168)][_0xf64602(0x16b)]&&console['error'](_0xf64602(0x16e)),process[_0xf64602(0x14e)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}function a76_0x57aa(){const _0xa17256=['No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','756384tJjJTL','14kwYlKJ','elvish','code','cursor','16FqENLw','ksh','1030062eHYpBs','2154600XjkRoG','pwsh','platform','xonsh','csh','has','ion','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','pop','utf-8','ppid','\x20on\x20POSIX:','replace',')\x20spawned\x20by\x20','length','trim','toLowerCase',',\x20continuing\x20up','5ZrTlgw','302atLSKp','bash','comm','2376036LDYBWK','kill','\x20get\x20ParentProcessId,Name\x20/format:csv','pid','win32','fish','10HKysbm','split','filter','1530765LgCpNu','dash','error','\x20on\x20Windows:','powershell','env','wmic\x20process\x20where\x20ProcessId=','1437GoLFmm','DEBUG','126056ewcAxd','\x20-o\x20ppid=,comm='];a76_0x57aa=function(){return _0xa17256;};return a76_0x57aa();}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x2c6f43){const _0x48441c=a76_0x44b785;try{return process[_0x48441c(0x15b)](_0x2c6f43,0x0),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x31c625,_0x93475b){const _0x5564bf=a76_0x2dc7,_0x1f2285=_0x31c625();while(!![]){try{const _0x3470c8=-parseInt(_0x5564bf(0x1a8))/0x1+parseInt(_0x5564bf(0x1b0))/0x2*(parseInt(_0x5564bf(0x1b6))/0x3)+-parseInt(_0x5564bf(0x1b1))/0x4+parseInt(_0x5564bf(0x1ab))/0x5+parseInt(_0x5564bf(0x1b4))/0x6+parseInt(_0x5564bf(0x1ac))/0x7+-parseInt(_0x5564bf(0x1b2))/0x8;if(_0x3470c8===_0x93475b)break;else _0x1f2285['push'](_0x1f2285['shift']());}catch(_0x5dcee1){_0x1f2285['push'](_0x1f2285['shift']());}}}(a76_0x3d88,0xa3dce));import*as a76_0x24719b from'readline';function a76_0x3d88(){const _0x50f941=['toLowerCase','stdin','1435618FcEIQL','3337044EJqbMK','9022600nSbnSN','stdout','454632FOzrRo','createInterface','3wyakwz','255938mZWIqv','close','question','4869115nxGziL','7852614UHVXas','\x20(y/N):\x20'];a76_0x3d88=function(){return _0x50f941;};return a76_0x3d88();}function a76_0x2dc7(_0x3bdd53,_0x502a4a){const _0x3d883f=a76_0x3d88();return a76_0x2dc7=function(_0x2dc78e,_0x48cd42){_0x2dc78e=_0x2dc78e-0x1a8;let _0x9b5a9=_0x3d883f[_0x2dc78e];return _0x9b5a9;},a76_0x2dc7(_0x3bdd53,_0x502a4a);}export async function confirm(_0x4c196d){const _0x3319ba=a76_0x2dc7,_0x37dddc=a76_0x24719b[_0x3319ba(0x1b5)]({'input':process[_0x3319ba(0x1af)],'output':process[_0x3319ba(0x1b3)]});return new Promise(_0x165366=>{const _0x586d5a=_0x3319ba;_0x37dddc[_0x586d5a(0x1aa)](_0x4c196d+_0x586d5a(0x1ad),_0x46a626=>{const _0x3a76ae=_0x586d5a;_0x37dddc[_0x3a76ae(0x1a9)](),_0x165366(_0x46a626[_0x3a76ae(0x1ae)]()==='y'||_0x46a626[_0x3a76ae(0x1ae)]()==='yes');});});}
1
+ (function(_0x374d1c,_0xee2f57){const _0x58b17d=a77_0x4c59,_0x9e152=_0x374d1c();while(!![]){try{const _0x49d654=-parseInt(_0x58b17d(0x78))/0x1*(-parseInt(_0x58b17d(0x7a))/0x2)+parseInt(_0x58b17d(0x77))/0x3+parseInt(_0x58b17d(0x7b))/0x4+-parseInt(_0x58b17d(0x80))/0x5+-parseInt(_0x58b17d(0x7d))/0x6*(-parseInt(_0x58b17d(0x7c))/0x7)+-parseInt(_0x58b17d(0x7f))/0x8*(-parseInt(_0x58b17d(0x7e))/0x9)+-parseInt(_0x58b17d(0x82))/0xa;if(_0x49d654===_0xee2f57)break;else _0x9e152['push'](_0x9e152['shift']());}catch(_0xbe653e){_0x9e152['push'](_0x9e152['shift']());}}}(a77_0x5a83,0x81a81));function a77_0x4c59(_0x9d4902,_0x4961e1){const _0x5a83b9=a77_0x5a83();return a77_0x4c59=function(_0x4c5977,_0x1151e8){_0x4c5977=_0x4c5977-0x76;let _0x1b69f3=_0x5a83b9[_0x4c5977];return _0x1b69f3;},a77_0x4c59(_0x9d4902,_0x4961e1);}import*as a77_0x167b45 from'readline';function a77_0x5a83(){const _0x14786c=['toLowerCase','24280ElWMfp','1747948edMBzU','4968187puQwYS','6MKgmNc','11403NvTkOv','464FUBiZz','2831720kwiAuo','yes','6779710gqsGCS','createInterface','close','stdout','1556262BMdckN','3UvBHIv'];a77_0x5a83=function(){return _0x14786c;};return a77_0x5a83();}export async function confirm(_0x3b41d8){const _0x10dad7=a77_0x4c59,_0x5ec6fa=a77_0x167b45[_0x10dad7(0x83)]({'input':process['stdin'],'output':process[_0x10dad7(0x76)]});return new Promise(_0xbf9155=>{_0x5ec6fa['question'](_0x3b41d8+'\x20(y/N):\x20',_0x596708=>{const _0x5b4422=a77_0x4c59;_0x5ec6fa[_0x5b4422(0x84)](),_0xbf9155(_0x596708[_0x5b4422(0x79)]()==='y'||_0x596708[_0x5b4422(0x79)]()===_0x5b4422(0x81));});});}
@@ -1 +1 @@
1
- function a77_0x2c0a(){const _0x5172a7=['227112FwIYbc','826284rBBRCH','Path\x20attempts\x20to\x20navigate\x20above\x20root','9woVkkv','2836248FuVLaY','trim','Relative\x20path\x20cannot\x20be\x20empty','pop','2075535LKWoXG','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','isAbsolute','join','Cannot\x20navigate\x20above\x20root','2994817rkddYE','11900330jVxEEi','split','Cannot\x20split\x20empty\x20path','1NuhvGH','test','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','push','startsWith','slice','Path\x20cannot\x20be\x20empty','80gvyeZX','length','filter','segments','raw','substring','3600984WyfpSd'];a77_0x2c0a=function(){return _0x5172a7;};return a77_0x2c0a();}(function(_0x751553,_0x363025){const _0x52df50=a77_0x4dfe,_0x54b4d4=_0x751553();while(!![]){try{const _0x259991=parseInt(_0x52df50(0x84))/0x1*(parseInt(_0x52df50(0x74))/0x2)+parseInt(_0x52df50(0x73))/0x3*(parseInt(_0x52df50(0x8b))/0x4)+-parseInt(_0x52df50(0x7b))/0x5+parseInt(_0x52df50(0x72))/0x6+-parseInt(_0x52df50(0x80))/0x7+-parseInt(_0x52df50(0x77))/0x8*(-parseInt(_0x52df50(0x76))/0x9)+-parseInt(_0x52df50(0x81))/0xa;if(_0x259991===_0x363025)break;else _0x54b4d4['push'](_0x54b4d4['shift']());}catch(_0x3b605c){_0x54b4d4['push'](_0x54b4d4['shift']());}}}(a77_0x2c0a,0xcf432));export function parsePath(_0x5265a1){const _0x51977c=a77_0x4dfe;if(!_0x5265a1||_0x5265a1[_0x51977c(0x78)]()==='')throw new Error(_0x51977c(0x8a));const _0x6a33a3=_0x5265a1['trim']();if(_0x6a33a3==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x5265a1};const _0x591f1c=_0x6a33a3[_0x51977c(0x88)]('/')?_0x6a33a3[_0x51977c(0x71)](0x1):_0x6a33a3,_0x3a408e=_0x591f1c[_0x51977c(0x82)]('/')[_0x51977c(0x6e)](_0x4338ae=>_0x4338ae!=='');if(_0x3a408e[_0x51977c(0x6d)]===0x0)throw new Error(_0x51977c(0x7c));const _0x36358f=_0x6a33a3[_0x51977c(0x88)]('/')||!isRelativePathSegment(_0x3a408e[0x0]);for(const _0x1c889b of _0x3a408e){validatePathSegment(_0x1c889b);}return{'segments':_0x3a408e,'isAbsolute':_0x36358f,'raw':_0x5265a1};}function isRelativePathSegment(_0x296757){return _0x296757==='.'||_0x296757==='..';}function validatePathSegment(_0x283454){const _0x50b9aa=a77_0x4dfe;if(_0x283454==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x283454==='.'||_0x283454==='..')return;if(/[\x00-\x1F\x7F]/[_0x50b9aa(0x85)](_0x283454))throw new Error('Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20'+_0x283454);if(_0x283454!==_0x283454[_0x50b9aa(0x78)]()){}}export function validatePath(_0x4777f4){const _0x4fb3ed=a77_0x4dfe;if(_0x4777f4['segments'][_0x4fb3ed(0x6d)]===0x0&&!_0x4777f4[_0x4fb3ed(0x7d)])throw new Error(_0x4fb3ed(0x79));if(_0x4777f4[_0x4fb3ed(0x7d)]){if(_0x4777f4[_0x4fb3ed(0x6f)][0x0]==='..')throw new Error(_0x4fb3ed(0x86));let _0x314e4b=0x0;for(const _0x42126c of _0x4777f4[_0x4fb3ed(0x6f)]){if(_0x42126c==='..'){if(_0x314e4b===0x0)throw new Error(_0x4fb3ed(0x75));_0x314e4b--;}else _0x42126c!=='.'&&_0x314e4b++;}}}export function joinPaths(_0x28b407,_0x18f9f4){const _0x3918d4=a77_0x4dfe;if(!_0x28b407||_0x28b407==='/')return _0x18f9f4;if(!_0x18f9f4||_0x18f9f4==='.')return _0x28b407;if(_0x18f9f4[_0x3918d4(0x88)]('/'))return _0x18f9f4;const _0x160e67=parsePath(_0x28b407),_0x526fc0=parsePath(_0x18f9f4),_0x4826a4=[..._0x160e67[_0x3918d4(0x6f)]];for(const _0x18ac88 of _0x526fc0[_0x3918d4(0x6f)]){if(_0x18ac88==='.')continue;else{if(_0x18ac88==='..'){if(_0x4826a4[_0x3918d4(0x6d)]===0x0)throw new Error(_0x3918d4(0x7f));_0x4826a4[_0x3918d4(0x7a)]();}else _0x4826a4['push'](_0x18ac88);}}const _0x116d05=_0x4826a4[_0x3918d4(0x7e)]('/');return _0x160e67[_0x3918d4(0x70)]['startsWith']('/')?'/'+_0x116d05:_0x116d05;}export function normalizePath(_0xb7f52){const _0x1e96b2=a77_0x4dfe,_0x5238d7=parsePath(_0xb7f52),_0x186905=[];for(const _0x36b9c6 of _0x5238d7[_0x1e96b2(0x6f)]){if(_0x36b9c6==='.')continue;else{if(_0x36b9c6==='..'){if(_0x186905['length']===0x0){if(_0x5238d7['isAbsolute'])throw new Error(_0x1e96b2(0x7f));_0x186905['push']('..');}else _0x186905[_0x186905[_0x1e96b2(0x6d)]-0x1]==='..'?_0x186905[_0x1e96b2(0x87)]('..'):_0x186905[_0x1e96b2(0x7a)]();}else _0x186905['push'](_0x36b9c6);}}if(_0x186905['length']===0x0)return _0x5238d7[_0x1e96b2(0x7d)]?'/':'.';const _0x138fc0=_0x186905[_0x1e96b2(0x7e)]('/');return _0x5238d7[_0x1e96b2(0x70)]['startsWith']('/')?'/'+_0x138fc0:_0x138fc0;}function a77_0x4dfe(_0x2ba0c2,_0x23928e){const _0x2c0a9a=a77_0x2c0a();return a77_0x4dfe=function(_0x4dfe17,_0x2aa530){_0x4dfe17=_0x4dfe17-0x6d;let _0x64e30e=_0x2c0a9a[_0x4dfe17];return _0x64e30e;},a77_0x4dfe(_0x2ba0c2,_0x23928e);}export function getParentPath(_0xfff121){const _0x167c8d=a77_0x4dfe,_0x4dc168=parsePath(_0xfff121);if(_0x4dc168[_0x167c8d(0x6f)]['length']<=0x1)return'/';const _0x364e32=_0x4dc168[_0x167c8d(0x6f)][_0x167c8d(0x89)](0x0,-0x1)[_0x167c8d(0x7e)]('/');return _0x4dc168[_0x167c8d(0x70)]['startsWith']('/')?'/'+_0x364e32:_0x364e32;}export function getBaseName(_0x330f16){const _0x5d1f13=a77_0x4dfe,_0x3d6bc5=parsePath(_0x330f16);return _0x3d6bc5[_0x5d1f13(0x6f)][_0x3d6bc5['segments'][_0x5d1f13(0x6d)]-0x1]||'';}export function isChildPath(_0x1a3ac6,_0x12d5eb){const _0x512b43=a77_0x4dfe,_0x1cbbe4=parsePath(_0x1a3ac6),_0xa5ea05=parsePath(_0x12d5eb);if(_0x1cbbe4['segments'][_0x512b43(0x6d)]<=_0xa5ea05[_0x512b43(0x6f)][_0x512b43(0x6d)])return![];for(let _0x1af36e=0x0;_0x1af36e<_0xa5ea05[_0x512b43(0x6f)]['length'];_0x1af36e++){if(_0x1cbbe4[_0x512b43(0x6f)][_0x1af36e]!==_0xa5ea05[_0x512b43(0x6f)][_0x1af36e])return![];}return!![];}export function splitPath(_0x53dff0){const _0x3facbb=a77_0x4dfe,_0x490a59=parsePath(_0x53dff0);if(_0x490a59[_0x3facbb(0x6f)][_0x3facbb(0x6d)]===0x0)throw new Error(_0x3facbb(0x83));if(_0x490a59[_0x3facbb(0x6f)][_0x3facbb(0x6d)]===0x1)return{'parent':_0x490a59[_0x3facbb(0x6f)][0x0]};return{'parent':_0x490a59[_0x3facbb(0x6f)][0x0],'child':_0x490a59[_0x3facbb(0x6f)][_0x3facbb(0x89)](0x1)[_0x3facbb(0x7e)]('/')};}
1
+ (function(_0x1c0a54,_0x7f1e37){const _0x48fd08=a78_0x4b0b,_0x2856d5=_0x1c0a54();while(!![]){try{const _0x47cc7c=parseInt(_0x48fd08(0xaa))/0x1+parseInt(_0x48fd08(0xc0))/0x2*(parseInt(_0x48fd08(0xa8))/0x3)+parseInt(_0x48fd08(0xb0))/0x4+-parseInt(_0x48fd08(0xbb))/0x5+-parseInt(_0x48fd08(0xb4))/0x6+-parseInt(_0x48fd08(0xa6))/0x7+parseInt(_0x48fd08(0xb2))/0x8;if(_0x47cc7c===_0x7f1e37)break;else _0x2856d5['push'](_0x2856d5['shift']());}catch(_0x12f9bf){_0x2856d5['push'](_0x2856d5['shift']());}}}(a78_0x4b91,0xd476c));export function parsePath(_0x819e3b){const _0x357770=a78_0x4b0b;if(!_0x819e3b||_0x819e3b[_0x357770(0xb3)]()==='')throw new Error(_0x357770(0xbf));const _0x34c04a=_0x819e3b[_0x357770(0xb3)]();if(_0x34c04a==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x819e3b};const _0x1c2388=_0x34c04a[_0x357770(0xa7)]('/')?_0x34c04a['substring'](0x1):_0x34c04a,_0x573ddf=_0x1c2388[_0x357770(0xad)]('/')[_0x357770(0xbe)](_0x3737b2=>_0x3737b2!=='');if(_0x573ddf[_0x357770(0xae)]===0x0)throw new Error(_0x357770(0xb1));const _0x1c0ee3=_0x34c04a['startsWith']('/')||!isRelativePathSegment(_0x573ddf[0x0]);for(const _0x4e9a48 of _0x573ddf){validatePathSegment(_0x4e9a48);}return{'segments':_0x573ddf,'isAbsolute':_0x1c0ee3,'raw':_0x819e3b};}function isRelativePathSegment(_0x4cf508){return _0x4cf508==='.'||_0x4cf508==='..';}function validatePathSegment(_0x125e83){const _0x3c2daa=a78_0x4b0b;if(_0x125e83==='')throw new Error(_0x3c2daa(0xba));if(_0x125e83==='.'||_0x125e83==='..')return;if(/[\x00-\x1F\x7F]/[_0x3c2daa(0xbc)](_0x125e83))throw new Error(_0x3c2daa(0xb9)+_0x125e83);if(_0x125e83!==_0x125e83[_0x3c2daa(0xb3)]()){}}export function validatePath(_0x2f85c1){const _0x2b3f2a=a78_0x4b0b;if(_0x2f85c1[_0x2b3f2a(0xb8)]['length']===0x0&&!_0x2f85c1[_0x2b3f2a(0xb6)])throw new Error(_0x2b3f2a(0xab));if(_0x2f85c1[_0x2b3f2a(0xb6)]){if(_0x2f85c1['segments'][0x0]==='..')throw new Error(_0x2b3f2a(0xb5));let _0x167758=0x0;for(const _0x577399 of _0x2f85c1[_0x2b3f2a(0xb8)]){if(_0x577399==='..'){if(_0x167758===0x0)throw new Error(_0x2b3f2a(0xbd));_0x167758--;}else _0x577399!=='.'&&_0x167758++;}}}export function joinPaths(_0x471269,_0x185ab1){const _0x341a2f=a78_0x4b0b;if(!_0x471269||_0x471269==='/')return _0x185ab1;if(!_0x185ab1||_0x185ab1==='.')return _0x471269;if(_0x185ab1['startsWith']('/'))return _0x185ab1;const _0x9dab30=parsePath(_0x471269),_0x3bbbb5=parsePath(_0x185ab1),_0x1ea9de=[..._0x9dab30['segments']];for(const _0x1a4945 of _0x3bbbb5[_0x341a2f(0xb8)]){if(_0x1a4945==='.')continue;else{if(_0x1a4945==='..'){if(_0x1ea9de['length']===0x0)throw new Error(_0x341a2f(0xc1));_0x1ea9de['pop']();}else _0x1ea9de[_0x341a2f(0xaf)](_0x1a4945);}}const _0x58167f=_0x1ea9de[_0x341a2f(0xac)]('/');return _0x9dab30[_0x341a2f(0xa9)][_0x341a2f(0xa7)]('/')?'/'+_0x58167f:_0x58167f;}function a78_0x4b91(){const _0x5ceedf=['push','5272108YcgapR','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','2185376axxxJX','trim','5968038DuRhxF','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','isAbsolute','pop','segments','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','Path\x20segment\x20cannot\x20be\x20empty','5857125dUNkqd','test','Path\x20attempts\x20to\x20navigate\x20above\x20root','filter','Path\x20cannot\x20be\x20empty','2jZIyRI','Cannot\x20navigate\x20above\x20root','3033219sOrLyz','startsWith','1124511GkoFgK','raw','1503631HjSmtd','Relative\x20path\x20cannot\x20be\x20empty','join','split','length'];a78_0x4b91=function(){return _0x5ceedf;};return a78_0x4b91();}export function normalizePath(_0x1ea9c9){const _0x55328d=a78_0x4b0b,_0x59ee13=parsePath(_0x1ea9c9),_0xd6af96=[];for(const _0x585b0a of _0x59ee13['segments']){if(_0x585b0a==='.')continue;else{if(_0x585b0a==='..'){if(_0xd6af96[_0x55328d(0xae)]===0x0){if(_0x59ee13[_0x55328d(0xb6)])throw new Error(_0x55328d(0xc1));_0xd6af96['push']('..');}else _0xd6af96[_0xd6af96['length']-0x1]==='..'?_0xd6af96[_0x55328d(0xaf)]('..'):_0xd6af96[_0x55328d(0xb7)]();}else _0xd6af96[_0x55328d(0xaf)](_0x585b0a);}}if(_0xd6af96[_0x55328d(0xae)]===0x0)return _0x59ee13['isAbsolute']?'/':'.';const _0x2d11b1=_0xd6af96['join']('/');return _0x59ee13['raw']['startsWith']('/')?'/'+_0x2d11b1:_0x2d11b1;}export function getParentPath(_0x364735){const _0x166a80=a78_0x4b0b,_0x58c40b=parsePath(_0x364735);if(_0x58c40b[_0x166a80(0xb8)][_0x166a80(0xae)]<=0x1)return'/';const _0x59dbee=_0x58c40b[_0x166a80(0xb8)]['slice'](0x0,-0x1)['join']('/');return _0x58c40b[_0x166a80(0xa9)][_0x166a80(0xa7)]('/')?'/'+_0x59dbee:_0x59dbee;}function a78_0x4b0b(_0x100450,_0x103b5c){const _0x4b9107=a78_0x4b91();return a78_0x4b0b=function(_0x4b0b81,_0x47fe87){_0x4b0b81=_0x4b0b81-0xa6;let _0x1a7f61=_0x4b9107[_0x4b0b81];return _0x1a7f61;},a78_0x4b0b(_0x100450,_0x103b5c);}export function getBaseName(_0x674aab){const _0x21a45c=a78_0x4b0b,_0x4043e6=parsePath(_0x674aab);return _0x4043e6['segments'][_0x4043e6[_0x21a45c(0xb8)][_0x21a45c(0xae)]-0x1]||'';}export function isChildPath(_0x216ffa,_0x515fa4){const _0x5679ad=a78_0x4b0b,_0x126d66=parsePath(_0x216ffa),_0x4d75c2=parsePath(_0x515fa4);if(_0x126d66[_0x5679ad(0xb8)][_0x5679ad(0xae)]<=_0x4d75c2['segments'][_0x5679ad(0xae)])return![];for(let _0x45c6ed=0x0;_0x45c6ed<_0x4d75c2[_0x5679ad(0xb8)][_0x5679ad(0xae)];_0x45c6ed++){if(_0x126d66['segments'][_0x45c6ed]!==_0x4d75c2['segments'][_0x45c6ed])return![];}return!![];}export function splitPath(_0xdaf03c){const _0x1d8265=a78_0x4b0b,_0x391bd9=parsePath(_0xdaf03c);if(_0x391bd9[_0x1d8265(0xb8)][_0x1d8265(0xae)]===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x391bd9[_0x1d8265(0xb8)][_0x1d8265(0xae)]===0x1)return{'parent':_0x391bd9[_0x1d8265(0xb8)][0x0]};return{'parent':_0x391bd9[_0x1d8265(0xb8)][0x0],'child':_0x391bd9[_0x1d8265(0xb8)]['slice'](0x1)[_0x1d8265(0xac)]('/')};}
@@ -1 +1 @@
1
- (function(_0x3ac379,_0x34f17a){const _0x52ec91=a78_0x1163,_0x39a9ba=_0x3ac379();while(!![]){try{const _0x10f07f=parseInt(_0x52ec91(0x125))/0x1*(-parseInt(_0x52ec91(0x124))/0x2)+parseInt(_0x52ec91(0x11c))/0x3+-parseInt(_0x52ec91(0x11b))/0x4*(-parseInt(_0x52ec91(0x120))/0x5)+-parseInt(_0x52ec91(0x11e))/0x6*(-parseInt(_0x52ec91(0x11d))/0x7)+parseInt(_0x52ec91(0x123))/0x8+-parseInt(_0x52ec91(0x11f))/0x9+-parseInt(_0x52ec91(0x128))/0xa;if(_0x10f07f===_0x34f17a)break;else _0x39a9ba['push'](_0x39a9ba['shift']());}catch(_0x5a8760){_0x39a9ba['push'](_0x39a9ba['shift']());}}}(a78_0x3820,0x8a918));export function parseSegmentRef(_0x316c69){const _0x2903e9=a78_0x1163,_0x5149c1=_0x316c69[_0x2903e9(0x122)]('/');if(_0x5149c1===-0x1)return{'parentId':_0x316c69};if(_0x5149c1===0x0)throw new Error(_0x2903e9(0x127)+_0x316c69+_0x2903e9(0x121));const _0x312d68=_0x316c69[_0x2903e9(0x126)](0x0,_0x5149c1),_0x20a895=_0x316c69[_0x2903e9(0x126)](_0x5149c1+0x1);if(_0x20a895==='')throw new Error(_0x2903e9(0x127)+_0x316c69+_0x2903e9(0x129));return{'parentId':_0x312d68,'childId':_0x20a895};}function a78_0x1163(_0x3f7a5a,_0xb7f83d){const _0x3820b1=a78_0x3820();return a78_0x1163=function(_0x1163a4,_0x49d804){_0x1163a4=_0x1163a4-0x11b;let _0x2e560e=_0x3820b1[_0x1163a4];return _0x2e560e;},a78_0x1163(_0x3f7a5a,_0xb7f83d);}function a78_0x3820(){const _0x2fc36e=['93591cvyfDF','substring','Invalid\x20segment\x20reference\x20format:\x20','21574520aswcuD','.\x20Child\x20name\x20cannot\x20be\x20empty','1628sTPqGN','3387573OAQjFK','13811ZzCRvT','1572rximXC','199863SPPFQS','11225LsXpRB','.\x20Parent\x20name\x20cannot\x20be\x20empty','indexOf','8237776WKgCKo','18nUsJLa'];a78_0x3820=function(){return _0x2fc36e;};return a78_0x3820();}
1
+ function a79_0x396e(_0x1169d9,_0x2ae096){const _0x4461ba=a79_0x4461();return a79_0x396e=function(_0x396ece,_0x4a0038){_0x396ece=_0x396ece-0x1ec;let _0x264b39=_0x4461ba[_0x396ece];return _0x264b39;},a79_0x396e(_0x1169d9,_0x2ae096);}function a79_0x4461(){const _0x24f4fa=['indexOf','358174oQOdZz','490315qrosKB','10732GfsNtJ','8fbbSGe','2828705YlbhvD','609512xESHbL','Invalid\x20segment\x20reference\x20format:\x20','704385TyYlYf','3519462GaDDJL','171yomjYe','substring'];a79_0x4461=function(){return _0x24f4fa;};return a79_0x4461();}(function(_0x895126,_0x277831){const _0x9c51e2=a79_0x396e,_0x252bd1=_0x895126();while(!![]){try{const _0x202993=-parseInt(_0x9c51e2(0x1ee))/0x1+-parseInt(_0x9c51e2(0x1f3))/0x2+parseInt(_0x9c51e2(0x1f7))/0x3*(-parseInt(_0x9c51e2(0x1f0))/0x4)+parseInt(_0x9c51e2(0x1f2))/0x5+parseInt(_0x9c51e2(0x1f6))/0x6+parseInt(_0x9c51e2(0x1ef))/0x7*(parseInt(_0x9c51e2(0x1f1))/0x8)+-parseInt(_0x9c51e2(0x1f5))/0x9;if(_0x202993===_0x277831)break;else _0x252bd1['push'](_0x252bd1['shift']());}catch(_0x59fdf9){_0x252bd1['push'](_0x252bd1['shift']());}}}(a79_0x4461,0x5022d));export function parseSegmentRef(_0x45aa06){const _0x4a27a5=a79_0x396e,_0x231408=_0x45aa06[_0x4a27a5(0x1ed)]('/');if(_0x231408===-0x1)return{'parentId':_0x45aa06};if(_0x231408===0x0)throw new Error(_0x4a27a5(0x1f4)+_0x45aa06+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x1cec1b=_0x45aa06['substring'](0x0,_0x231408),_0x324175=_0x45aa06[_0x4a27a5(0x1ec)](_0x231408+0x1);if(_0x324175==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x45aa06+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x1cec1b,'childId':_0x324175};}
@@ -1 +1 @@
1
- (function(_0x1ffad5,_0x6591e0){const _0x3acef7=a79_0x1386,_0x2f0d40=_0x1ffad5();while(!![]){try{const _0x520179=parseInt(_0x3acef7(0x9f))/0x1*(parseInt(_0x3acef7(0x9e))/0x2)+parseInt(_0x3acef7(0xb2))/0x3*(-parseInt(_0x3acef7(0xa5))/0x4)+-parseInt(_0x3acef7(0xaf))/0x5+parseInt(_0x3acef7(0xa3))/0x6+-parseInt(_0x3acef7(0xa1))/0x7+parseInt(_0x3acef7(0x9c))/0x8*(parseInt(_0x3acef7(0xa9))/0x9)+parseInt(_0x3acef7(0xa7))/0xa;if(_0x520179===_0x6591e0)break;else _0x2f0d40['push'](_0x2f0d40['shift']());}catch(_0x2b9188){_0x2f0d40['push'](_0x2f0d40['shift']());}}}(a79_0x13e3,0x3c959));import a79_0x3d57da from'ora';function a79_0x1386(_0x42e5c9,_0x2f57c0){const _0x13e3c6=a79_0x13e3();return a79_0x1386=function(_0x1386cf,_0xc9619a){_0x1386cf=_0x1386cf-0x9c;let _0x3083d8=_0x13e3c6[_0x1386cf];return _0x3083d8;},a79_0x1386(_0x42e5c9,_0x2f57c0);}export function createCommandSpinner(_0x5a3a54,_0x13c681={}){const _0xdf4a7c=a79_0x1386,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x13c681;return a79_0x3d57da({'text':_0x5a3a54,'color':'cyan','isEnabled':forceEnabled||process['stdout'][_0xdf4a7c(0xaa)]&&!verbose});}export async function withSpinner(_0x17a428,_0x4bf6ec,_0x4cd296={}){const _0x2ac5b7=a79_0x1386,_0x3774ca=_0x4cd296[_0x2ac5b7(0x9d)]??(()=>Date[_0x2ac5b7(0xac)]()),_0x3cf5b9=createCommandSpinner(_0x17a428,_0x4cd296);_0x3cf5b9[_0x2ac5b7(0xa2)]();const _0x482456=_0x3774ca();try{const _0x910a09=await _0x4bf6ec(),_0x444ff8=_0x3774ca()-_0x482456;return _0x3cf5b9['stop'](),{'data':_0x910a09,'elapsedMs':_0x444ff8};}catch(_0x1f24b9){_0x3cf5b9['stop']();throw _0x1f24b9;}}export async function withQuerySpinner(_0x20b570,_0x2ddfdd,_0x5dbd3a={}){const _0x5e1164=a79_0x1386,_0x559779=_0x5dbd3a[_0x5e1164(0x9d)]??(()=>Date[_0x5e1164(0xac)]()),_0x3f62cb=_0x5dbd3a['intervalFactory']??setInterval,_0x2700a5=createCommandSpinner(_0x20b570,_0x5dbd3a);_0x2700a5[_0x5e1164(0xa2)]();const _0x4f0b1f=_0x559779(),_0xc65755=_0x20b570[_0x5e1164(0xb0)](_0x5e1164(0xa0),''),_0xabaa90={},_0x103830=()=>{const _0xaa1ddc=_0x5e1164;if(!_0x2700a5['isSpinning'])return;const _0x51eb01=_0x559779()-_0x4f0b1f,_0x49aee2=formatElapsed(_0x51eb01),_0x55186e=_0xabaa90[_0xaa1ddc(0xab)]??_0xc65755,_0x127573=_0xabaa90['jobId']?_0xaa1ddc(0xa6)+_0xabaa90[_0xaa1ddc(0xa8)]+']':'',_0x5cf510=_0xabaa90[_0xaa1ddc(0xad)]?'\x20'+_0xabaa90[_0xaa1ddc(0xad)]:'';_0x2700a5[_0xaa1ddc(0xa4)]=_0x55186e+'\x20'+_0x49aee2+_0x5cf510+_0x127573;},_0x51ac53=_0x3f62cb(()=>{_0x103830();},0x3e8),_0x3f9e42={'setPhase':_0x4539d3=>{_0xabaa90['phase']=_0x4539d3,_0x103830();},'setJobId':_0x1f1fb2=>{const _0x9d5cac=_0x5e1164;_0xabaa90[_0x9d5cac(0xa8)]=_0x1f1fb2,_0x103830();},'setExtra':_0x9f580e=>{_0xabaa90['extra']=_0x9f580e,_0x103830();}};_0x103830();try{const _0x19235f=await _0x2ddfdd(_0x3f9e42),_0xc91cc=_0x559779()-_0x4f0b1f;return{'data':_0x19235f,'elapsedMs':_0xc91cc};}finally{clearInterval(_0x51ac53),_0x2700a5[_0x5e1164(0xae)]();}}function a79_0x13e3(){const _0x1dbd2c=['...','2971388hoGdUw','start','555354LIlWCC','text','70676LArSSO','\x20[Job\x20ID:\x20','4334740jZJswc','jobId','1989lOrKKS','isTTY','phase','now','extra','stop','151205ZJmRZQ','replace','toFixed','51uqJNgN','floor','15992WAWqty','clock','70878cUlHbk','1pPsAln'];a79_0x13e3=function(){return _0x1dbd2c;};return a79_0x13e3();}export function formatElapsed(_0x37295e){const _0x599e17=a79_0x1386,_0x3ddc97=Math[_0x599e17(0xb3)](_0x37295e/0x3e8);if(_0x3ddc97<0x3c)return(_0x37295e/0x3e8)[_0x599e17(0xb1)](0x1)+'s';const _0x390bf3=Math[_0x599e17(0xb3)](_0x3ddc97/0x3c),_0x112182=_0x3ddc97%0x3c;if(_0x390bf3<0x3c)return _0x390bf3+'m\x20'+_0x112182+'s';const _0x227a87=Math[_0x599e17(0xb3)](_0x390bf3/0x3c),_0x362446=_0x390bf3%0x3c;return _0x227a87+'h\x20'+_0x362446+'m';}
1
+ function a80_0x25eb(){const _0x559371=['30908532JRrhhE','8113023AOiXPU','3682205msOOaV','21701mTTUTu','10PKwNkY','stdout','toFixed','stop','floor','6366ZlVwZe','39XjAaXI','isSpinning','extra','202596GxEOIJ','jobId','cyan','replace','phase','clock','2723kvThfI','now','text','...','2yXwlRh','start','8tkeJOF','9666866afiNcq'];a80_0x25eb=function(){return _0x559371;};return a80_0x25eb();}(function(_0x67fcaf,_0x20d26c){const _0x34742a=a80_0xfac7,_0x1a960c=_0x67fcaf();while(!![]){try{const _0x359160=-parseInt(_0x34742a(0x15a))/0x1*(-parseInt(_0x34742a(0x16e))/0x2)+parseInt(_0x34742a(0x161))/0x3*(-parseInt(_0x34742a(0x164))/0x4)+-parseInt(_0x34742a(0x174))/0x5+parseInt(_0x34742a(0x160))/0x6*(-parseInt(_0x34742a(0x16a))/0x7)+-parseInt(_0x34742a(0x170))/0x8*(-parseInt(_0x34742a(0x173))/0x9)+-parseInt(_0x34742a(0x15b))/0xa*(parseInt(_0x34742a(0x171))/0xb)+parseInt(_0x34742a(0x172))/0xc;if(_0x359160===_0x20d26c)break;else _0x1a960c['push'](_0x1a960c['shift']());}catch(_0x443bcf){_0x1a960c['push'](_0x1a960c['shift']());}}}(a80_0x25eb,0xc659e));import a80_0x453331 from'ora';function a80_0xfac7(_0x1973cd,_0x53171f){const _0x25eb14=a80_0x25eb();return a80_0xfac7=function(_0xfac7df,_0x123115){_0xfac7df=_0xfac7df-0x15a;let _0x4385a8=_0x25eb14[_0xfac7df];return _0x4385a8;},a80_0xfac7(_0x1973cd,_0x53171f);}export function createCommandSpinner(_0x496b16,_0x1786cb={}){const _0x44b188=a80_0xfac7,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x1786cb;return a80_0x453331({'text':_0x496b16,'color':_0x44b188(0x166),'isEnabled':forceEnabled||process[_0x44b188(0x15c)]['isTTY']&&!verbose});}export async function withSpinner(_0x187029,_0x121962,_0x179b3d={}){const _0x3265aa=a80_0xfac7,_0x29aa53=_0x179b3d[_0x3265aa(0x169)]??(()=>Date[_0x3265aa(0x16b)]()),_0x3b8b26=createCommandSpinner(_0x187029,_0x179b3d);_0x3b8b26['start']();const _0x292036=_0x29aa53();try{const _0x54d63c=await _0x121962(),_0xcc2fe=_0x29aa53()-_0x292036;return _0x3b8b26['stop'](),{'data':_0x54d63c,'elapsedMs':_0xcc2fe};}catch(_0x2b7e1c){_0x3b8b26['stop']();throw _0x2b7e1c;}}export async function withQuerySpinner(_0x1e30f9,_0x34701d,_0x5a2a5e={}){const _0x24f1ec=a80_0xfac7,_0x210de7=_0x5a2a5e[_0x24f1ec(0x169)]??(()=>Date[_0x24f1ec(0x16b)]()),_0x4ef7b0=_0x5a2a5e['intervalFactory']??setInterval,_0x3f12fd=createCommandSpinner(_0x1e30f9,_0x5a2a5e);_0x3f12fd[_0x24f1ec(0x16f)]();const _0x5997c5=_0x210de7(),_0x25b88d=_0x1e30f9[_0x24f1ec(0x167)](_0x24f1ec(0x16d),''),_0x43cde6={},_0x594b5c=()=>{const _0x259469=_0x24f1ec;if(!_0x3f12fd[_0x259469(0x162)])return;const _0xa9b1a4=_0x210de7()-_0x5997c5,_0x3e0de4=formatElapsed(_0xa9b1a4),_0x5ccf8d=_0x43cde6['phase']??_0x25b88d,_0x2a2af2=_0x43cde6['jobId']?'\x20[Job\x20ID:\x20'+_0x43cde6[_0x259469(0x165)]+']':'',_0x593c97=_0x43cde6[_0x259469(0x163)]?'\x20'+_0x43cde6[_0x259469(0x163)]:'';_0x3f12fd[_0x259469(0x16c)]=_0x5ccf8d+'\x20'+_0x3e0de4+_0x593c97+_0x2a2af2;},_0xe02163=_0x4ef7b0(()=>{_0x594b5c();},0x3e8),_0x3a7c54={'setPhase':_0x76a222=>{const _0x1c896b=_0x24f1ec;_0x43cde6[_0x1c896b(0x168)]=_0x76a222,_0x594b5c();},'setJobId':_0x36a2f2=>{const _0x187afc=_0x24f1ec;_0x43cde6[_0x187afc(0x165)]=_0x36a2f2,_0x594b5c();},'setExtra':_0x11665e=>{_0x43cde6['extra']=_0x11665e,_0x594b5c();}};_0x594b5c();try{const _0x100833=await _0x34701d(_0x3a7c54),_0x4130a5=_0x210de7()-_0x5997c5;return{'data':_0x100833,'elapsedMs':_0x4130a5};}finally{clearInterval(_0xe02163),_0x3f12fd[_0x24f1ec(0x15e)]();}}export function formatElapsed(_0x4b518d){const _0x455c6a=a80_0xfac7,_0x1a898d=Math[_0x455c6a(0x15f)](_0x4b518d/0x3e8);if(_0x1a898d<0x3c)return(_0x4b518d/0x3e8)[_0x455c6a(0x15d)](0x1)+'s';const _0x4bd4bb=Math['floor'](_0x1a898d/0x3c),_0x862639=_0x1a898d%0x3c;if(_0x4bd4bb<0x3c)return _0x4bd4bb+'m\x20'+_0x862639+'s';const _0x495e18=Math['floor'](_0x4bd4bb/0x3c),_0x20de18=_0x4bd4bb%0x3c;return _0x495e18+'h\x20'+_0x20de18+'m';}
@@ -1 +1 @@
1
- (function(_0x381bac,_0x2928ff){const _0xa26083=a80_0x24ba,_0x1394a6=_0x381bac();while(!![]){try{const _0x5117bd=-parseInt(_0xa26083(0xd0))/0x1*(-parseInt(_0xa26083(0xd9))/0x2)+parseInt(_0xa26083(0xd2))/0x3+parseInt(_0xa26083(0xdc))/0x4*(parseInt(_0xa26083(0xe0))/0x5)+-parseInt(_0xa26083(0xdf))/0x6*(parseInt(_0xa26083(0xc8))/0x7)+-parseInt(_0xa26083(0xdd))/0x8*(parseInt(_0xa26083(0xd5))/0x9)+parseInt(_0xa26083(0xc7))/0xa+-parseInt(_0xa26083(0xd7))/0xb*(parseInt(_0xa26083(0xdb))/0xc);if(_0x5117bd===_0x2928ff)break;else _0x1394a6['push'](_0x1394a6['shift']());}catch(_0x4a1858){_0x1394a6['push'](_0x1394a6['shift']());}}}(a80_0x8f10,0xe60c9));import{readFileSync}from'fs';export function stripSqlComments(_0x4e0eb0){const _0x338c1e=a80_0x24ba;let _0x32ef4a=_0x4e0eb0[_0x338c1e(0xd6)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x32ef4a=_0x32ef4a['replace'](/--.*$/gm,''),_0x32ef4a[_0x338c1e(0xde)]();}function isEscaped(_0x255acf,_0x5f0c83){let _0x23ab27=0x0;for(let _0xa2a2c3=_0x5f0c83-0x1;_0xa2a2c3>=0x0&&_0x255acf[_0xa2a2c3]==='\x5c';_0xa2a2c3--){_0x23ab27++;}return _0x23ab27%0x2===0x1;}export function splitSqlStatements(_0x1b2aad){const _0x4b0c48=a80_0x24ba,_0x2bac13=stripSqlComments(_0x1b2aad);if(!_0x2bac13)throw new Error(_0x4b0c48(0xd8));const _0x2018e8=[];let _0x52acd8='',_0x5d2583=![],_0xbab4de=![],_0x16be62=![];for(let _0x1f6c05=0x0;_0x1f6c05<_0x1b2aad['length'];_0x1f6c05++){const _0x1400e4=_0x1b2aad[_0x1f6c05];if(_0x1400e4==='\x27'&&!isEscaped(_0x1b2aad,_0x1f6c05)&&!_0xbab4de&&!_0x16be62)_0x5d2583=!_0x5d2583;else{if(_0x1400e4==='\x22'&&!isEscaped(_0x1b2aad,_0x1f6c05)&&!_0x5d2583&&!_0x16be62)_0xbab4de=!_0xbab4de;else _0x1400e4==='`'&&!isEscaped(_0x1b2aad,_0x1f6c05)&&!_0x5d2583&&!_0xbab4de&&(_0x16be62=!_0x16be62);}if(_0x1400e4===';'&&!_0x5d2583&&!_0xbab4de&&!_0x16be62){const _0x313403=_0x52acd8['trim']();_0x313403&&_0x2018e8[_0x4b0c48(0xcb)](_0x313403),_0x52acd8='';}else _0x52acd8+=_0x1400e4;}const _0x290f68=_0x52acd8[_0x4b0c48(0xde)]();_0x290f68&&_0x2018e8[_0x4b0c48(0xcb)](_0x290f68);const _0x122cfa=_0x2018e8[_0x4b0c48(0xcf)](_0x6414f2=>_0x6414f2['trim']())['filter'](_0x352c45=>{const _0x55e11f=stripSqlComments(_0x352c45);return _0x55e11f['length']>0x0;});if(_0x122cfa[_0x4b0c48(0xd3)]===0x0)throw new Error(_0x4b0c48(0xd8));return _0x122cfa;}export function readFileContent(_0x58e23d){const _0x1e797d=a80_0x24ba;try{return readFileSync(_0x58e23d,_0x1e797d(0xca));}catch(_0x6e40be){const _0x8c14d7=_0x6e40be[_0x1e797d(0xda)];if(_0x8c14d7==='ENOENT')throw new Error(_0x1e797d(0xc9)+_0x58e23d+_0x1e797d(0xd1));else{if(_0x8c14d7===_0x1e797d(0xc6))throw new Error(_0x1e797d(0xce)+_0x58e23d+'\x27');else throw new Error(_0x1e797d(0xcc)+_0x58e23d+_0x1e797d(0xd4)+_0x6e40be['message']);}}}export function readSqlStatementsFromFile(_0x580d9c){const _0x1ab7b9=a80_0x24ba,_0x468105=readFileContent(_0x580d9c);try{return splitSqlStatements(_0x468105);}catch(_0x223ca5){throw new Error(_0x1ab7b9(0xc9)+_0x580d9c+'\x27\x20'+_0x223ca5['message'][_0x1ab7b9(0xcd)]());}}function a80_0x24ba(_0x2967f1,_0x186741){const _0x8f10f6=a80_0x8f10();return a80_0x24ba=function(_0x24ba71,_0x5b8ada){_0x24ba71=_0x24ba71-0xc6;let _0x38ebf0=_0x8f10f6[_0x24ba71];return _0x38ebf0;},a80_0x24ba(_0x2967f1,_0x186741);}function a80_0x8f10(){const _0x121cad=['8lOrYzw','trim','7164feNXxX','2881665sZfHTZ','EACCES','18202610XXdCsK','7567ProFTw','File\x20\x27','utf-8','push','Error\x20reading\x20file\x20\x27','toLowerCase','Permission\x20denied\x20reading\x20file\x20\x27','map','1049QwYCPK','\x27\x20not\x20found','89118WttjQr','length','\x27:\x20','5242122nkqGcF','replace','55WukJez','Content\x20contains\x20no\x20SQL\x20statements','1756nvthHh','code','4042884kUxxoY','12pwsHSc'];a80_0x8f10=function(){return _0x121cad;};return a80_0x8f10();}
1
+ (function(_0x46ea01,_0x42bccf){const _0x6a37e3=a81_0x4b88,_0x263d95=_0x46ea01();while(!![]){try{const _0x35cf8f=parseInt(_0x6a37e3(0x129))/0x1+parseInt(_0x6a37e3(0x12b))/0x2*(-parseInt(_0x6a37e3(0x12c))/0x3)+-parseInt(_0x6a37e3(0x119))/0x4*(parseInt(_0x6a37e3(0x11d))/0x5)+parseInt(_0x6a37e3(0x125))/0x6*(parseInt(_0x6a37e3(0x124))/0x7)+parseInt(_0x6a37e3(0x11e))/0x8*(parseInt(_0x6a37e3(0x11f))/0x9)+-parseInt(_0x6a37e3(0x116))/0xa*(-parseInt(_0x6a37e3(0x126))/0xb)+-parseInt(_0x6a37e3(0x130))/0xc*(parseInt(_0x6a37e3(0x122))/0xd);if(_0x35cf8f===_0x42bccf)break;else _0x263d95['push'](_0x263d95['shift']());}catch(_0x2fecef){_0x263d95['push'](_0x263d95['shift']());}}}(a81_0x43b9,0x72d8f));import{readFileSync}from'fs';export function stripSqlComments(_0x2bbd07){const _0x53fd3c=a81_0x4b88;let _0x4e5a4f=_0x2bbd07[_0x53fd3c(0x131)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x4e5a4f=_0x4e5a4f['replace'](/--.*$/gm,''),_0x4e5a4f[_0x53fd3c(0x11b)]();}function isEscaped(_0xe68f36,_0x9a98b){let _0x5d2f53=0x0;for(let _0x48d3e6=_0x9a98b-0x1;_0x48d3e6>=0x0&&_0xe68f36[_0x48d3e6]==='\x5c';_0x48d3e6--){_0x5d2f53++;}return _0x5d2f53%0x2===0x1;}export function splitSqlStatements(_0x540f10){const _0x56bfe8=a81_0x4b88,_0x202680=stripSqlComments(_0x540f10);if(!_0x202680)throw new Error(_0x56bfe8(0x123));const _0x5ef2ab=[];let _0x93f1f1='',_0xe0f95e=![],_0x55aee2=![],_0x188c9b=![];for(let _0x212c6f=0x0;_0x212c6f<_0x540f10[_0x56bfe8(0x11a)];_0x212c6f++){const _0x1f1ccd=_0x540f10[_0x212c6f];if(_0x1f1ccd==='\x27'&&!isEscaped(_0x540f10,_0x212c6f)&&!_0x55aee2&&!_0x188c9b)_0xe0f95e=!_0xe0f95e;else{if(_0x1f1ccd==='\x22'&&!isEscaped(_0x540f10,_0x212c6f)&&!_0xe0f95e&&!_0x188c9b)_0x55aee2=!_0x55aee2;else _0x1f1ccd==='`'&&!isEscaped(_0x540f10,_0x212c6f)&&!_0xe0f95e&&!_0x55aee2&&(_0x188c9b=!_0x188c9b);}if(_0x1f1ccd===';'&&!_0xe0f95e&&!_0x55aee2&&!_0x188c9b){const _0x1a20cc=_0x93f1f1[_0x56bfe8(0x11b)]();_0x1a20cc&&_0x5ef2ab[_0x56bfe8(0x12d)](_0x1a20cc),_0x93f1f1='';}else _0x93f1f1+=_0x1f1ccd;}const _0x2d3b76=_0x93f1f1['trim']();_0x2d3b76&&_0x5ef2ab[_0x56bfe8(0x12d)](_0x2d3b76);const _0x2ae4cc=_0x5ef2ab[_0x56bfe8(0x127)](_0x429080=>_0x429080[_0x56bfe8(0x11b)]())[_0x56bfe8(0x120)](_0x77cc3d=>{const _0x2a73ea=stripSqlComments(_0x77cc3d);return _0x2a73ea['length']>0x0;});if(_0x2ae4cc[_0x56bfe8(0x11a)]===0x0)throw new Error(_0x56bfe8(0x123));return _0x2ae4cc;}function a81_0x4b88(_0x4f607a,_0x4b779a){const _0x43b985=a81_0x43b9();return a81_0x4b88=function(_0x4b888b,_0x607255){_0x4b888b=_0x4b888b-0x116;let _0x238151=_0x43b985[_0x4b888b];return _0x238151;},a81_0x4b88(_0x4f607a,_0x4b779a);}export function readFileContent(_0x2a5472){const _0x587a25=a81_0x4b88;try{return readFileSync(_0x2a5472,_0x587a25(0x117));}catch(_0x33bb53){const _0x3c9689=_0x33bb53[_0x587a25(0x128)];if(_0x3c9689===_0x587a25(0x12f))throw new Error(_0x587a25(0x121)+_0x2a5472+_0x587a25(0x11c));else{if(_0x3c9689===_0x587a25(0x118))throw new Error(_0x587a25(0x133)+_0x2a5472+'\x27');else throw new Error(_0x587a25(0x132)+_0x2a5472+_0x587a25(0x12a)+_0x33bb53[_0x587a25(0x12e)]);}}}function a81_0x43b9(){const _0x105f21=['\x27:\x20','18346sgEkXM','84PTbZwR','push','message','ENOENT','636VthJjQ','replace','Error\x20reading\x20file\x20\x27','Permission\x20denied\x20reading\x20file\x20\x27','2041240pKVghS','utf-8','EACCES','388iHiEFp','length','trim','\x27\x20not\x20found','11535MTSwJu','2515272NJCwqS','9TiclAZ','filter','File\x20\x27','52585YbTvzr','Content\x20contains\x20no\x20SQL\x20statements','7YvmzIt','1033926lTQVpk','11GOmnPi','map','code','474569gGpXyQ'];a81_0x43b9=function(){return _0x105f21;};return a81_0x43b9();}export function readSqlStatementsFromFile(_0x39fb6e){const _0x1cd769=a81_0x4b88,_0x52af04=readFileContent(_0x39fb6e);try{return splitSqlStatements(_0x52af04);}catch(_0x112741){throw new Error(_0x1cd769(0x121)+_0x39fb6e+'\x27\x20'+_0x112741[_0x1cd769(0x12e)]['toLowerCase']());}}
@@ -1 +1 @@
1
- function a81_0x30b2(_0x5bf7e3,_0x4078fc){const _0x3e3d4f=a81_0x3e3d();return a81_0x30b2=function(_0x30b2ec,_0x33fec0){_0x30b2ec=_0x30b2ec-0x10d;let _0x3c31ae=_0x3e3d4f[_0x30b2ec];return _0x3c31ae;},a81_0x30b2(_0x5bf7e3,_0x4078fc);}(function(_0x2c4df7,_0x315835){const _0x3df361=a81_0x30b2,_0x36096f=_0x2c4df7();while(!![]){try{const _0x513d77=parseInt(_0x3df361(0x120))/0x1*(-parseInt(_0x3df361(0x111))/0x2)+parseInt(_0x3df361(0x11f))/0x3+parseInt(_0x3df361(0x115))/0x4+-parseInt(_0x3df361(0x112))/0x5+-parseInt(_0x3df361(0x113))/0x6+-parseInt(_0x3df361(0x110))/0x7*(-parseInt(_0x3df361(0x10e))/0x8)+parseInt(_0x3df361(0x11c))/0x9;if(_0x513d77===_0x315835)break;else _0x36096f['push'](_0x36096f['shift']());}catch(_0xfa3f3f){_0x36096f['push'](_0x36096f['shift']());}}}(a81_0x3e3d,0x9507b));export async function*parseSSEStream(_0x67694,_0x31d2db){const _0x144d8b=a81_0x30b2;if(!_0x67694[_0x144d8b(0x11a)])throw new Error(_0x144d8b(0x10d));const _0x2f05fe=_0x67694[_0x144d8b(0x11a)]['getReader'](),_0x3e118d=new TextDecoder();let _0x2053c2='',_0x5a2ed9={};try{while(!![]){const {done:_0x17a5e7,value:_0x2b1fcb}=await _0x2f05fe[_0x144d8b(0x11e)]();if(_0x17a5e7){if(_0x5a2ed9[_0x144d8b(0x11b)]){_0x31d2db?.[_0x144d8b(0x11d)](_0x144d8b(0x117)+_0x5a2ed9['data']);const _0x4a2094=parseSSEData(_0x5a2ed9[_0x144d8b(0x11b)]);yield _0x4a2094;}break;}_0x2053c2+=_0x3e118d[_0x144d8b(0x123)](_0x2b1fcb,{'stream':!![]});const _0xb16024=_0x2053c2[_0x144d8b(0x116)]('\x0a');_0x2053c2=_0xb16024['pop']()||'';for(const _0x75bd97 of _0xb16024){if(_0x75bd97[_0x144d8b(0x118)]()===''){if(_0x5a2ed9[_0x144d8b(0x11b)]){_0x31d2db?.[_0x144d8b(0x11d)](_0x144d8b(0x117)+_0x5a2ed9[_0x144d8b(0x11b)]);const _0x115f45=parseSSEData(_0x5a2ed9['data']);yield _0x115f45,_0x5a2ed9={};}continue;}if(_0x75bd97['startsWith'](':'))continue;const _0x388ba3=_0x75bd97['indexOf'](':');if(_0x388ba3===-0x1)continue;const _0x26b89e=_0x75bd97[_0x144d8b(0x10f)](0x0,_0x388ba3);let _0x4c9996=_0x75bd97[_0x144d8b(0x10f)](_0x388ba3+0x1);_0x4c9996[_0x144d8b(0x122)]('\x20')&&(_0x4c9996=_0x4c9996[_0x144d8b(0x10f)](0x1));switch(_0x26b89e){case _0x144d8b(0x121):_0x5a2ed9[_0x144d8b(0x121)]=_0x4c9996;break;case _0x144d8b(0x11b):_0x5a2ed9['data']=_0x5a2ed9[_0x144d8b(0x11b)]?_0x5a2ed9[_0x144d8b(0x11b)]+'\x0a'+_0x4c9996:_0x4c9996;break;case'id':_0x5a2ed9['id']=_0x4c9996;break;}}}}finally{_0x2f05fe[_0x144d8b(0x119)]();}}function parseSSEData(_0x1ac211){const _0x51e71e=a81_0x30b2;try{return JSON[_0x51e71e(0x114)](_0x1ac211);}catch(_0x3194a2){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x1ac211,{'cause':_0x3194a2});}}function a81_0x3e3d(){const _0x373569=['split','[LLM\x20API\x20SSE]\x20','trim','releaseLock','body','data','2298483UuhoZM','debug','read','2443938mvHdDl','777817haEoTc','event','startsWith','decode','Response\x20body\x20is\x20null','168ykjXVi','slice','375263XGstiU','2TwsWxo','5069030CvARCi','989202DgJcVs','parse','1484380ZACfIN'];a81_0x3e3d=function(){return _0x373569;};return a81_0x3e3d();}
1
+ (function(_0x64362d,_0x3b9397){const _0x59ba1c=a82_0x20b8,_0x1dbe2a=_0x64362d();while(!![]){try{const _0x3fc9a3=parseInt(_0x59ba1c(0x109))/0x1*(-parseInt(_0x59ba1c(0x110))/0x2)+-parseInt(_0x59ba1c(0x10a))/0x3*(-parseInt(_0x59ba1c(0x11e))/0x4)+-parseInt(_0x59ba1c(0x120))/0x5*(-parseInt(_0x59ba1c(0x11a))/0x6)+parseInt(_0x59ba1c(0x113))/0x7+parseInt(_0x59ba1c(0x111))/0x8+parseInt(_0x59ba1c(0x108))/0x9*(-parseInt(_0x59ba1c(0x114))/0xa)+-parseInt(_0x59ba1c(0x116))/0xb;if(_0x3fc9a3===_0x3b9397)break;else _0x1dbe2a['push'](_0x1dbe2a['shift']());}catch(_0x114a88){_0x1dbe2a['push'](_0x1dbe2a['shift']());}}}(a82_0x24f7,0x386ec));export async function*parseSSEStream(_0x1ae24b,_0x15f5bc){const _0x51dfe1=a82_0x20b8;if(!_0x1ae24b[_0x51dfe1(0x10b)])throw new Error(_0x51dfe1(0x122));const _0x33845e=_0x1ae24b[_0x51dfe1(0x10b)]['getReader'](),_0x302108=new TextDecoder();let _0x11ff18='',_0x375832={};try{while(!![]){const {done:_0x1fa08d,value:_0x292d86}=await _0x33845e[_0x51dfe1(0x118)]();if(_0x1fa08d){if(_0x375832['data']){_0x15f5bc?.[_0x51dfe1(0x11c)]('[LLM\x20API\x20SSE]\x20'+_0x375832[_0x51dfe1(0x11f)]);const _0x5c0ba9=parseSSEData(_0x375832['data']);yield _0x5c0ba9;}break;}_0x11ff18+=_0x302108[_0x51dfe1(0x10e)](_0x292d86,{'stream':!![]});const _0xf14009=_0x11ff18[_0x51dfe1(0x11d)]('\x0a');_0x11ff18=_0xf14009[_0x51dfe1(0x121)]()||'';for(const _0x41dade of _0xf14009){if(_0x41dade[_0x51dfe1(0x10c)]()===''){if(_0x375832['data']){_0x15f5bc?.[_0x51dfe1(0x11c)](_0x51dfe1(0x117)+_0x375832[_0x51dfe1(0x11f)]);const _0x4e8ba8=parseSSEData(_0x375832['data']);yield _0x4e8ba8,_0x375832={};}continue;}if(_0x41dade[_0x51dfe1(0x10d)](':'))continue;const _0x51fbcb=_0x41dade[_0x51dfe1(0x112)](':');if(_0x51fbcb===-0x1)continue;const _0x4aad24=_0x41dade[_0x51dfe1(0x115)](0x0,_0x51fbcb);let _0x4db709=_0x41dade[_0x51dfe1(0x115)](_0x51fbcb+0x1);_0x4db709[_0x51dfe1(0x10d)]('\x20')&&(_0x4db709=_0x4db709[_0x51dfe1(0x115)](0x1));switch(_0x4aad24){case _0x51dfe1(0x123):_0x375832[_0x51dfe1(0x123)]=_0x4db709;break;case _0x51dfe1(0x11f):_0x375832[_0x51dfe1(0x11f)]=_0x375832[_0x51dfe1(0x11f)]?_0x375832[_0x51dfe1(0x11f)]+'\x0a'+_0x4db709:_0x4db709;break;case'id':_0x375832['id']=_0x4db709;break;}}}}finally{_0x33845e[_0x51dfe1(0x119)]();}}function a82_0x20b8(_0x3d3f3c,_0x5ba6aa){const _0x24f707=a82_0x24f7();return a82_0x20b8=function(_0x20b832,_0x54bf70){_0x20b832=_0x20b832-0x108;let _0x58be7e=_0x24f707[_0x20b832];return _0x58be7e;},a82_0x20b8(_0x3d3f3c,_0x5ba6aa);}function a82_0x24f7(){const _0x407661=['25bSoSTP','pop','Response\x20body\x20is\x20null','event','9HVseyI','73588WUqJtk','32100kBmEla','body','trim','startsWith','decode','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','2OvvXqc','273672vvTVIP','indexOf','566804YCfyHX','3741770fhHMmX','slice','1595253GTimpn','[LLM\x20API\x20SSE]\x20','read','releaseLock','401106OksWWW','parse','debug','split','140lasUEU','data'];a82_0x24f7=function(){return _0x407661;};return a82_0x24f7();}function parseSSEData(_0x342374){const _0x3cfe9a=a82_0x20b8;try{return JSON[_0x3cfe9a(0x11b)](_0x342374);}catch(_0x4d78d6){throw new Error(_0x3cfe9a(0x10f)+_0x342374,{'cause':_0x4d78d6});}}
@@ -1 +1 @@
1
- (function(_0x2ea8cb,_0x1d4876){const _0x5e38ec=a82_0x2b99,_0x15c814=_0x2ea8cb();while(!![]){try{const _0x525ceb=parseInt(_0x5e38ec(0x106))/0x1*(parseInt(_0x5e38ec(0x104))/0x2)+-parseInt(_0x5e38ec(0x107))/0x3*(parseInt(_0x5e38ec(0x101))/0x4)+parseInt(_0x5e38ec(0xfe))/0x5+-parseInt(_0x5e38ec(0x10e))/0x6*(parseInt(_0x5e38ec(0x10a))/0x7)+parseInt(_0x5e38ec(0x102))/0x8+-parseInt(_0x5e38ec(0x10f))/0x9+parseInt(_0x5e38ec(0x10b))/0xa*(-parseInt(_0x5e38ec(0x105))/0xb);if(_0x525ceb===_0x1d4876)break;else _0x15c814['push'](_0x15c814['shift']());}catch(_0x4a2b08){_0x15c814['push'](_0x15c814['shift']());}}}(a82_0x1928,0x41ea0));import a82_0x6c8c16 from'string-width';export function stringWidth(_0x50e1d6){return a82_0x6c8c16(_0x50e1d6);}export function padEnd(_0x7227b3,_0x3a4ca8){const _0x1cf31d=a82_0x2b99,_0x2b4a66=stringWidth(_0x7227b3);if(_0x2b4a66>=_0x3a4ca8)return _0x7227b3;return _0x7227b3+'\x20'[_0x1cf31d(0x108)](_0x3a4ca8-_0x2b4a66);}export function padStart(_0x198c59,_0x4f5bad){const _0x3e92a6=a82_0x2b99,_0x57f653=stringWidth(_0x198c59);if(_0x57f653>=_0x4f5bad)return _0x198c59;return'\x20'[_0x3e92a6(0x108)](_0x4f5bad-_0x57f653)+_0x198c59;}export function centerAlign(_0x5a92c1,_0x329e0f){const _0x4a56bc=a82_0x2b99,_0x3de1c8=stringWidth(_0x5a92c1);if(_0x3de1c8>_0x329e0f){if(_0x329e0f<=0x1)return'…'[_0x4a56bc(0xfd)](0x0,_0x329e0f);let _0x44f884=_0x5a92c1;while(stringWidth(_0x44f884+'…')>_0x329e0f){_0x44f884=_0x44f884['slice'](0x0,-0x1);}return _0x44f884+'…';}if(_0x3de1c8===_0x329e0f)return _0x5a92c1;const _0x23960a=_0x329e0f-_0x3de1c8,_0x16d9d3=Math[_0x4a56bc(0x110)](_0x23960a/0x2),_0x2ed19a=_0x23960a-_0x16d9d3;return'\x20'[_0x4a56bc(0x108)](_0x16d9d3)+_0x5a92c1+'\x20'[_0x4a56bc(0x108)](_0x2ed19a);}export function escapeStringLiteral(_0x1acc94){const _0x520f0b=a82_0x2b99;if(!_0x1acc94||_0x1acc94['trim']()[_0x520f0b(0x10d)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x1d2c17=_0x1acc94[_0x520f0b(0xfb)](/'/g,'\x27\x27');return'\x27'+_0x1d2c17+'\x27';}export function globToLike(_0x5b903f){const _0x57dc96=a82_0x2b99;let _0x571fbb=_0x5b903f[_0x57dc96(0xfb)](/\\/g,'\x5c\x5c')[_0x57dc96(0xfb)](/%/g,'\x5c%')[_0x57dc96(0xfb)](/_/g,'\x5c_');return _0x571fbb=_0x571fbb[_0x57dc96(0xfb)](/\*/g,'%')[_0x57dc96(0xfb)](/\?/g,'_'),_0x571fbb;}function a82_0x1928(){const _0x4eba4d=['17977uMzdVs','31461ohRRPA','repeat','trim','5201mtWqFd','10MEDEbw','\x5c$&','length','2358dRrQQm','2540115yustlI','floor','replace','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','substring','1956190mCnJpI','toString','USER','4ThuyQo','3505544ZJslsW','test','14rUPvhV','1106215GGIefV'];a82_0x1928=function(){return _0x4eba4d;};return a82_0x1928();}export function buildLikePattern(_0x1ffa2e){const _0x4746ce=a82_0x2b99;if(!_0x1ffa2e||_0x1ffa2e[_0x4746ce(0x109)]()[_0x4746ce(0x10d)]===0x0)throw new Error(_0x4746ce(0xfc));const _0x2656e5=globToLike(_0x1ffa2e),_0x31803d=_0x2656e5[_0x4746ce(0xfb)](/'/g,'\x27\x27');return'\x27'+_0x31803d+'\x27';}export function matchGlobPattern(_0x21fcb5,_0x55094c){const _0x57c9c6=a82_0x2b99,_0x40e2ac=_0x55094c[_0x57c9c6(0xfb)](/[.+^${}()|[\]\\]/g,_0x57c9c6(0x10c))[_0x57c9c6(0xfb)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x53d787=new RegExp('^'+_0x40e2ac+'$');return _0x53d787[_0x57c9c6(0x103)](_0x21fcb5);}export function getSanitizedUsername(){const _0x2eb599=a82_0x2b99,_0x466597=process['env'][_0x2eb599(0x100)]||process['env']['USERNAME']||'unknown';return _0x466597[_0x2eb599(0xfb)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}function a82_0x2b99(_0x45d962,_0x1312a7){const _0x1928b4=a82_0x1928();return a82_0x2b99=function(_0x2b99f7,_0x1d8e7e){_0x2b99f7=_0x2b99f7-0xfb;let _0x299fe7=_0x1928b4[_0x2b99f7];return _0x299fe7;},a82_0x2b99(_0x45d962,_0x1312a7);}export function generateRandomHex(){const _0x7f91f2=a82_0x2b99,_0x3f12ca=Math[_0x7f91f2(0x110)](Math['random']()*0xfffff);return _0x3f12ca[_0x7f91f2(0xff)](0x10)['padStart'](0x5,'0');}
1
+ (function(_0x16eb5d,_0x3dac0f){const _0x3d64ce=a83_0x19a7,_0x220933=_0x16eb5d();while(!![]){try{const _0x356905=parseInt(_0x3d64ce(0xff))/0x1*(parseInt(_0x3d64ce(0xf7))/0x2)+parseInt(_0x3d64ce(0xfe))/0x3+-parseInt(_0x3d64ce(0xed))/0x4+parseInt(_0x3d64ce(0x104))/0x5*(-parseInt(_0x3d64ce(0xfb))/0x6)+parseInt(_0x3d64ce(0x100))/0x7*(parseInt(_0x3d64ce(0xef))/0x8)+-parseInt(_0x3d64ce(0xeb))/0x9*(parseInt(_0x3d64ce(0xfa))/0xa)+parseInt(_0x3d64ce(0xf3))/0xb*(parseInt(_0x3d64ce(0xf1))/0xc);if(_0x356905===_0x3dac0f)break;else _0x220933['push'](_0x220933['shift']());}catch(_0x3f75b0){_0x220933['push'](_0x220933['shift']());}}}(a83_0x47dd,0x52252));import a83_0x7b3c34 from'string-width';export function stringWidth(_0x5d8da9){return a83_0x7b3c34(_0x5d8da9);}export function padEnd(_0x418796,_0x59df00){const _0x5ccd16=a83_0x19a7,_0x3212e4=stringWidth(_0x418796);if(_0x3212e4>=_0x59df00)return _0x418796;return _0x418796+'\x20'[_0x5ccd16(0xf5)](_0x59df00-_0x3212e4);}export function padStart(_0x4dae8f,_0x744be6){const _0x50cef1=a83_0x19a7,_0x3d97b9=stringWidth(_0x4dae8f);if(_0x3d97b9>=_0x744be6)return _0x4dae8f;return'\x20'[_0x50cef1(0xf5)](_0x744be6-_0x3d97b9)+_0x4dae8f;}export function centerAlign(_0x303554,_0xb089e8){const _0x1a90de=a83_0x19a7,_0x412665=stringWidth(_0x303554);if(_0x412665>_0xb089e8){if(_0xb089e8<=0x1)return'…'[_0x1a90de(0xf0)](0x0,_0xb089e8);let _0xe80dfc=_0x303554;while(stringWidth(_0xe80dfc+'…')>_0xb089e8){_0xe80dfc=_0xe80dfc[_0x1a90de(0xf4)](0x0,-0x1);}return _0xe80dfc+'…';}if(_0x412665===_0xb089e8)return _0x303554;const _0x4d5b7c=_0xb089e8-_0x412665,_0x15fa58=Math[_0x1a90de(0xfc)](_0x4d5b7c/0x2),_0x329e29=_0x4d5b7c-_0x15fa58;return'\x20'['repeat'](_0x15fa58)+_0x303554+'\x20'[_0x1a90de(0xf5)](_0x329e29);}export function escapeStringLiteral(_0x161494){const _0x47d858=a83_0x19a7;if(!_0x161494||_0x161494['trim']()['length']===0x0)throw new Error(_0x47d858(0xec));const _0x4cab2=_0x161494['replace'](/'/g,'\x27\x27');return'\x27'+_0x4cab2+'\x27';}function a83_0x19a7(_0x1c4ed3,_0x3dd3a0){const _0x47ddc7=a83_0x47dd();return a83_0x19a7=function(_0x19a79d,_0x57e1ea){_0x19a79d=_0x19a79d-0xea;let _0x57f94d=_0x47ddc7[_0x19a79d];return _0x57f94d;},a83_0x19a7(_0x1c4ed3,_0x3dd3a0);}function a83_0x47dd(){const _0x4ce2bc=['\x5c$&','3224386SEMZfQ','slice','repeat','length','30242Embbko','random','toString','10PhBhSf','42SaVOYU','floor','padStart','1672023fjvVEm','21OMqsid','84287aUmQQX','toLowerCase','USERNAME','test','257395WTigYn','replace','5324031BCwmtV','Cannot\x20escape\x20empty\x20string\x20literal','1878556dAsDFL','env','392UKkMAP','substring','12ESeFlY'];a83_0x47dd=function(){return _0x4ce2bc;};return a83_0x47dd();}export function globToLike(_0x11160e){const _0x5a8195=a83_0x19a7;let _0x57c347=_0x11160e[_0x5a8195(0xea)](/\\/g,'\x5c\x5c')[_0x5a8195(0xea)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x57c347=_0x57c347[_0x5a8195(0xea)](/\*/g,'%')[_0x5a8195(0xea)](/\?/g,'_'),_0x57c347;}export function buildLikePattern(_0x592a70){const _0x544f07=a83_0x19a7;if(!_0x592a70||_0x592a70['trim']()[_0x544f07(0xf6)]===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x3bd8bd=globToLike(_0x592a70),_0x29d431=_0x3bd8bd[_0x544f07(0xea)](/'/g,'\x27\x27');return'\x27'+_0x29d431+'\x27';}export function matchGlobPattern(_0x93e1b3,_0xae46fe){const _0x4188c4=a83_0x19a7,_0x94348e=_0xae46fe['replace'](/[.+^${}()|[\]\\]/g,_0x4188c4(0xf2))[_0x4188c4(0xea)](/\*/g,'.*')[_0x4188c4(0xea)](/\?/g,'.'),_0x551c38=new RegExp('^'+_0x94348e+'$');return _0x551c38[_0x4188c4(0x103)](_0x93e1b3);}export function getSanitizedUsername(){const _0x14f314=a83_0x19a7,_0x6f3cf3=process[_0x14f314(0xee)]['USER']||process[_0x14f314(0xee)][_0x14f314(0x102)]||'unknown';return _0x6f3cf3['replace'](/[^a-zA-Z0-9]/g,'')[_0x14f314(0x101)]();}export function generateRandomHex(){const _0x34fdfd=a83_0x19a7,_0x4ce7d0=Math[_0x34fdfd(0xfc)](Math[_0x34fdfd(0xf8)]()*0xfffff);return _0x4ce7d0[_0x34fdfd(0xf9)](0x10)[_0x34fdfd(0xfd)](0x5,'0');}
@@ -1 +1 @@
1
- function a83_0xe3c1(){const _0x386482=['Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','split','catalog','database','2ICundt','18246ydPKfy','join','10735FplZcH','3794076dttvPe','6911980aTpbSS','push','includes','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','28yCWdNY','14GIeQag','512418ypvkXu','trim','2887848TDdZIg','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','table','length','541495Mcplrg'];a83_0xe3c1=function(){return _0x386482;};return a83_0xe3c1();}function a83_0x43d4(_0x18a1d1,_0xd1f005){const _0xe3c13=a83_0xe3c1();return a83_0x43d4=function(_0x43d45c,_0x490fa8){_0x43d45c=_0x43d45c-0x1d5;let _0x1dab97=_0xe3c13[_0x43d45c];return _0x1dab97;},a83_0x43d4(_0x18a1d1,_0xd1f005);}(function(_0x1b4dce,_0xa4f252){const _0x6afa6e=a83_0x43d4,_0x4cd250=_0x1b4dce();while(!![]){try{const _0x48d140=parseInt(_0x6afa6e(0x1ec))/0x1*(parseInt(_0x6afa6e(0x1e9))/0x2)+parseInt(_0x6afa6e(0x1ea))/0x3*(-parseInt(_0x6afa6e(0x1d8))/0x4)+-parseInt(_0x6afa6e(0x1e3))/0x5+-parseInt(_0x6afa6e(0x1da))/0x6*(parseInt(_0x6afa6e(0x1d9))/0x7)+-parseInt(_0x6afa6e(0x1dc))/0x8+parseInt(_0x6afa6e(0x1ed))/0x9+parseInt(_0x6afa6e(0x1ee))/0xa;if(_0x48d140===_0xa4f252)break;else _0x4cd250['push'](_0x4cd250['shift']());}catch(_0x5c96a0){_0x4cd250['push'](_0x4cd250['shift']());}}}(a83_0xe3c1,0x6ba05));function hasWildcard(_0x20105b){const _0x446dfa=a83_0x43d4;return _0x20105b[_0x446dfa(0x1d6)]('*')||_0x20105b[_0x446dfa(0x1d6)]('?');}export function parseTableReference(_0x2c3632){const _0x5a4d6e=a83_0x43d4;if(!_0x2c3632||_0x2c3632[_0x5a4d6e(0x1db)]()[_0x5a4d6e(0x1e2)]===0x0)throw new Error(_0x5a4d6e(0x1e0));const _0x27cabd=_0x2c3632[_0x5a4d6e(0x1db)](),_0x1d3898={'original':_0x27cabd},_0x50a91f=_0x27cabd[_0x5a4d6e(0x1e6)]('.');if(_0x50a91f[_0x5a4d6e(0x1e2)]===0x1){const _0x2d881d=_0x50a91f[0x0];if(!_0x2d881d)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x1d3898[_0x5a4d6e(0x1e1)]=_0x2d881d;}else{if(_0x50a91f['length']===0x2){const [_0x153b44,_0x4d3b9e]=_0x50a91f;if(!_0x153b44)throw new Error(_0x5a4d6e(0x1e5));if(!_0x4d3b9e)throw new Error(_0x5a4d6e(0x1df));_0x1d3898[_0x5a4d6e(0x1e8)]=_0x153b44,_0x1d3898[_0x5a4d6e(0x1e1)]=_0x4d3b9e;}else{if(_0x50a91f[_0x5a4d6e(0x1e2)]===0x3){const [_0x18c498,_0x20e029,_0x390ca9]=_0x50a91f;if(!_0x18c498||!_0x20e029||!_0x390ca9)throw new Error(_0x5a4d6e(0x1de));_0x1d3898[_0x5a4d6e(0x1e7)]=_0x18c498,_0x1d3898['database']=_0x20e029,_0x1d3898[_0x5a4d6e(0x1e1)]=_0x390ca9;}else throw new Error(_0x5a4d6e(0x1dd));}}return _0x1d3898;}export function formatTableReference(_0x66518d){const _0x20a641=a83_0x43d4,_0x411b52=[];return _0x66518d[_0x20a641(0x1e7)]&&_0x411b52['push'](_0x66518d['catalog']),_0x66518d[_0x20a641(0x1e8)]&&_0x411b52[_0x20a641(0x1d5)](_0x66518d[_0x20a641(0x1e8)]),_0x66518d[_0x20a641(0x1e1)]&&_0x411b52['push'](_0x66518d[_0x20a641(0x1e1)]),_0x411b52[_0x20a641(0x1eb)]('.');}export function validateTableListReference(_0x40c407){return undefined;}export function validateTableDescribeReference(_0x1c70e0){const _0x29e6d3=a83_0x43d4;if(!_0x1c70e0[_0x29e6d3(0x1e1)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x1c70e0['database']&&hasWildcard(_0x1c70e0['database']))return _0x29e6d3(0x1e4);if(hasWildcard(_0x1c70e0[_0x29e6d3(0x1e1)]))return _0x29e6d3(0x1d7);return undefined;}
1
+ (function(_0x4177e6,_0x349dd2){const _0x5865a0=a84_0x577a,_0x1239fc=_0x4177e6();while(!![]){try{const _0x56c305=parseInt(_0x5865a0(0x106))/0x1*(-parseInt(_0x5865a0(0x10e))/0x2)+parseInt(_0x5865a0(0xfa))/0x3*(-parseInt(_0x5865a0(0x10a))/0x4)+parseInt(_0x5865a0(0x107))/0x5*(-parseInt(_0x5865a0(0x102))/0x6)+-parseInt(_0x5865a0(0x10b))/0x7*(parseInt(_0x5865a0(0x101))/0x8)+parseInt(_0x5865a0(0xf9))/0x9+parseInt(_0x5865a0(0x100))/0xa+-parseInt(_0x5865a0(0x113))/0xb*(-parseInt(_0x5865a0(0xfb))/0xc);if(_0x56c305===_0x349dd2)break;else _0x1239fc['push'](_0x1239fc['shift']());}catch(_0x422fe4){_0x1239fc['push'](_0x1239fc['shift']());}}}(a84_0x389d,0xc6a51));function hasWildcard(_0x3a7a3f){const _0x37825a=a84_0x577a;return _0x3a7a3f[_0x37825a(0xfe)]('*')||_0x3a7a3f[_0x37825a(0xfe)]('?');}export function parseTableReference(_0x59ba21){const _0x16a4a8=a84_0x577a;if(!_0x59ba21||_0x59ba21[_0x16a4a8(0xfd)]()['length']===0x0)throw new Error(_0x16a4a8(0x112));const _0x5adfc6=_0x59ba21[_0x16a4a8(0xfd)](),_0x1b7ca2={'original':_0x5adfc6},_0x2c0a67=_0x5adfc6[_0x16a4a8(0x10f)]('.');if(_0x2c0a67[_0x16a4a8(0x110)]===0x1){const _0x2845ff=_0x2c0a67[0x0];if(!_0x2845ff)throw new Error(_0x16a4a8(0x108));_0x1b7ca2[_0x16a4a8(0xfc)]=_0x2845ff;}else{if(_0x2c0a67['length']===0x2){const [_0x231a9d,_0x53287c]=_0x2c0a67;if(!_0x231a9d)throw new Error(_0x16a4a8(0x10c));if(!_0x53287c)throw new Error(_0x16a4a8(0x103));_0x1b7ca2['database']=_0x231a9d,_0x1b7ca2[_0x16a4a8(0xfc)]=_0x53287c;}else{if(_0x2c0a67[_0x16a4a8(0x110)]===0x3){const [_0x529ea0,_0x5197c7,_0x3e65e9]=_0x2c0a67;if(!_0x529ea0||!_0x5197c7||!_0x3e65e9)throw new Error(_0x16a4a8(0x111));_0x1b7ca2['catalog']=_0x529ea0,_0x1b7ca2['database']=_0x5197c7,_0x1b7ca2['table']=_0x3e65e9;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x1b7ca2;}export function formatTableReference(_0x594d3a){const _0x2e0836=a84_0x577a,_0x37ee43=[];return _0x594d3a['catalog']&&_0x37ee43[_0x2e0836(0xff)](_0x594d3a[_0x2e0836(0x109)]),_0x594d3a['database']&&_0x37ee43['push'](_0x594d3a['database']),_0x594d3a['table']&&_0x37ee43['push'](_0x594d3a[_0x2e0836(0xfc)]),_0x37ee43[_0x2e0836(0x10d)]('.');}export function validateTableListReference(_0x1e1e5a){return undefined;}function a84_0x577a(_0x41e309,_0x4b68de){const _0x389d9f=a84_0x389d();return a84_0x577a=function(_0x577a79,_0x5c9f33){_0x577a79=_0x577a79-0xf9;let _0x52d996=_0x389d9f[_0x577a79];return _0x52d996;},a84_0x577a(_0x41e309,_0x4b68de);}function a84_0x389d(){const _0x38725c=['join','4oyjvCo','split','length','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','44Kgnomv','7120593RAzSXU','4429389XOfMEh','8625792eBKsBe','table','trim','includes','push','12110980KAFkTA','8fVxHcg','5239482zlfHCy','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','database','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','420323yDaRWy','5zOStDB','Pattern\x20cannot\x20be\x20just\x20a\x20dot','catalog','4KTHXbX','6114738fNVUIc','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)'];a84_0x389d=function(){return _0x38725c;};return a84_0x389d();}export function validateTableDescribeReference(_0x36d4e9){const _0x4a32d6=a84_0x577a;if(!_0x36d4e9['table'])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x36d4e9[_0x4a32d6(0x104)]&&hasWildcard(_0x36d4e9[_0x4a32d6(0x104)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation';if(hasWildcard(_0x36d4e9['table']))return _0x4a32d6(0x105);return undefined;}
@@ -1 +1 @@
1
- const a84_0x3322e1=a84_0x3418;function a84_0x153e(){const _0x5bef48=['INFO','.gz','abs','warn','error','cyan','padStart','740628ZjfimP','tdx','logs','209306Fplhyk','tdx.log','write','46660SyKmKu','test','getDate','getHours','3294PNRBDH','getMonth','.cache','floor','string','getMilliseconds','toString','split','DEBUG','info','getMinutes','logStream','stack','3566778ABsdnA','3101aRSlPp','fileOnly','ERROR','name','red','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','363994tmUWrE','TRACE','logLevel','logDir','getLogPath','12Zgovqi','WARN','774715lSugGc','filter','rotateOldLogs','cause','join','includes','12440xLwRTQ','trace','message','getTimezoneOffset','Warning:\x20Failed\x20to\x20compress\x20','.log','debug','toISOString','map'];a84_0x153e=function(){return _0x5bef48;};return a84_0x153e();}(function(_0x55ef4a,_0xd3591f){const _0x1126cf=a84_0x3418,_0x33eb9e=_0x55ef4a();while(!![]){try{const _0x36ae5c=-parseInt(_0x1126cf(0x141))/0x1+-parseInt(_0x1126cf(0x161))/0x2+-parseInt(_0x1126cf(0x15e))/0x3+parseInt(_0x1126cf(0x146))/0x4*(-parseInt(_0x1126cf(0x148))/0x5)+parseInt(_0x1126cf(0x13a))/0x6+parseInt(_0x1126cf(0x13b))/0x7*(-parseInt(_0x1126cf(0x14e))/0x8)+parseInt(_0x1126cf(0x168))/0x9*(parseInt(_0x1126cf(0x164))/0xa);if(_0x36ae5c===_0xd3591f)break;else _0x33eb9e['push'](_0x33eb9e['shift']());}catch(_0x3ddc8b){_0x33eb9e['push'](_0x33eb9e['shift']());}}}(a84_0x153e,0x69b6a));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';function a84_0x3418(_0x610ef1,_0x1d1a3b){const _0x153e67=a84_0x153e();return a84_0x3418=function(_0x34184a,_0x169953){_0x34184a=_0x34184a-0x130;let _0x54e6d4=_0x153e67[_0x34184a];return _0x54e6d4;},a84_0x3418(_0x610ef1,_0x1d1a3b);}import{pipeline}from'stream/promises';import a84_0x20f525 from'chalk';function safeStringify(_0x21b79c){const _0x329294=a84_0x3418;if(typeof _0x21b79c===_0x329294(0x131))return _0x21b79c;if(_0x21b79c instanceof Error)return _0x21b79c[_0x329294(0x139)]||_0x21b79c[_0x329294(0x13e)]+':\x20'+_0x21b79c[_0x329294(0x150)];try{return JSON['stringify'](_0x21b79c,(_0x4b5ddc,_0x1fb5a1)=>{const _0x2363d6=_0x329294;if(_0x1fb5a1 instanceof Error)return{'name':_0x1fb5a1['name'],'message':_0x1fb5a1[_0x2363d6(0x150)],'stack':_0x1fb5a1[_0x2363d6(0x139)],'cause':_0x1fb5a1[_0x2363d6(0x14b)]};return _0x1fb5a1;});}catch{return String(_0x21b79c);}}function getTimezoneOffset(){const _0x39d6e1=a84_0x3418,_0x5796ad=-new Date()[_0x39d6e1(0x151)](),_0x5a676b=Math[_0x39d6e1(0x130)](Math[_0x39d6e1(0x159)](_0x5796ad)/0x3c),_0x4b3dce=Math[_0x39d6e1(0x159)](_0x5796ad)%0x3c,_0x2bd091=_0x5796ad>=0x0?'+':'-';return''+_0x2bd091+_0x5a676b[_0x39d6e1(0x133)]()[_0x39d6e1(0x15d)](0x2,'0')+_0x4b3dce[_0x39d6e1(0x133)]()[_0x39d6e1(0x15d)](0x2,'0');}function formatTimestamp(){const _0x2b1097=a84_0x3418,_0x5248e8=new Date(),_0x9b4498=_0x5248e8['getFullYear'](),_0x2b63c7=(_0x5248e8[_0x2b1097(0x169)]()+0x1)[_0x2b1097(0x133)]()[_0x2b1097(0x15d)](0x2,'0'),_0x6cfa70=_0x5248e8[_0x2b1097(0x166)]()['toString']()['padStart'](0x2,'0'),_0x4216ee=_0x5248e8[_0x2b1097(0x167)]()[_0x2b1097(0x133)]()[_0x2b1097(0x15d)](0x2,'0'),_0x5db25a=_0x5248e8[_0x2b1097(0x137)]()[_0x2b1097(0x133)]()[_0x2b1097(0x15d)](0x2,'0'),_0x43be5a=_0x5248e8['getSeconds']()[_0x2b1097(0x133)]()['padStart'](0x2,'0'),_0x6a6faa=_0x5248e8[_0x2b1097(0x132)]()[_0x2b1097(0x133)]()[_0x2b1097(0x15d)](0x3,'0'),_0x22b7c5=getTimezoneOffset();return _0x9b4498+'-'+_0x2b63c7+'-'+_0x6cfa70+'\x20'+_0x4216ee+':'+_0x5db25a+':'+_0x43be5a+'.'+_0x6a6faa+_0x22b7c5;}function formatColoredLogEntry(_0x320968,_0x24db6d){const _0x1c579b=a84_0x3418,_0x4455f9=formatTimestamp(),_0x4263fb=_0x24db6d[_0x1c579b(0x156)](safeStringify)[_0x1c579b(0x14c)]('\x20'),_0x390b44=a84_0x20f525['gray'](_0x4455f9);let _0x5e9212;switch(_0x320968){case _0x1c579b(0x136):_0x5e9212=a84_0x20f525[_0x1c579b(0x15c)]('['+_0x320968+']\x20');break;case'warn':_0x5e9212=a84_0x20f525['yellow']('['+_0x320968+']\x20');break;case _0x1c579b(0x15b):_0x5e9212=a84_0x20f525[_0x1c579b(0x13f)]('['+_0x320968+']');break;case _0x1c579b(0x154):_0x5e9212=a84_0x20f525['gray']('['+_0x320968+']');break;default:_0x5e9212='['+_0x320968+']';}return _0x390b44+'\x20'+_0x5e9212+'\x20'+_0x4263fb;}export var LogLevel;(function(_0x49261b){const _0x23c85e=a84_0x3418;_0x49261b[_0x49261b[_0x23c85e(0x142)]=-0x2]=_0x23c85e(0x142),_0x49261b[_0x49261b['DEBUG']=-0x1]=_0x23c85e(0x135),_0x49261b[_0x49261b[_0x23c85e(0x157)]=0x0]=_0x23c85e(0x157),_0x49261b[_0x49261b[_0x23c85e(0x147)]=0x1]=_0x23c85e(0x147),_0x49261b[_0x49261b[_0x23c85e(0x13d)]=0x2]=_0x23c85e(0x13d);}(LogLevel||(LogLevel={})));export class TDXLogger{[a84_0x3322e1(0x138)];[a84_0x3322e1(0x144)];[a84_0x3322e1(0x143)];[a84_0x3322e1(0x13c)];constructor(_0xb48ae8=LogLevel['INFO'],_0x4f27c9=![]){const _0x4a2a90=a84_0x3322e1;this[_0x4a2a90(0x144)]=join(homedir(),_0x4a2a90(0x16a),_0x4a2a90(0x15f),_0x4a2a90(0x160)),this[_0x4a2a90(0x143)]=_0xb48ae8,this[_0x4a2a90(0x13c)]=_0x4f27c9;}async['init'](){const _0x8eb0eb=a84_0x3322e1;try{await mkdir(this['logDir'],{'recursive':!![]}),await this[_0x8eb0eb(0x14a)]();const _0x60b636=join(this[_0x8eb0eb(0x144)],_0x8eb0eb(0x162));this[_0x8eb0eb(0x138)]=createWriteStream(_0x60b636,{'flags':'a'}),this[_0x8eb0eb(0x138)]['on']('error',_0x5f2983=>{const _0x5d4560=_0x8eb0eb;console[_0x5d4560(0x15b)]('Warning:\x20Error\x20writing\x20to\x20tdx.log:',_0x5f2983[_0x5d4560(0x150)]);});}catch(_0x21f657){console[_0x8eb0eb(0x15b)](_0x8eb0eb(0x140),_0x21f657);}}async[a84_0x3322e1(0x14a)](){const _0x32fcb6=a84_0x3322e1;try{const _0x28730a=await readdir(this['logDir']),_0x48f398=new Date()[_0x32fcb6(0x155)]()[_0x32fcb6(0x134)]('T')[0x0];if(_0x28730a[_0x32fcb6(0x14d)](_0x32fcb6(0x162))){const _0x23c7c9=join(this[_0x32fcb6(0x144)],_0x32fcb6(0x162)),_0x26bb03=await stat(_0x23c7c9),_0x8878b1=new Date(_0x26bb03['mtime'])[_0x32fcb6(0x155)]()[_0x32fcb6(0x134)]('T')[0x0];if(_0x8878b1<_0x48f398){const _0x62a0f0=join(this[_0x32fcb6(0x144)],'tdx-'+_0x8878b1+_0x32fcb6(0x153));await rename(_0x23c7c9,_0x62a0f0);}}const _0x3d90c8=await readdir(this[_0x32fcb6(0x144)]),_0x48f824=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x5b8521=_0x3d90c8[_0x32fcb6(0x149)](_0x58f59c=>_0x48f824[_0x32fcb6(0x165)](_0x58f59c));for(const _0x1517d9 of _0x5b8521){const _0x167c2a=join(this[_0x32fcb6(0x144)],_0x1517d9),_0x54addb=join(this['logDir'],_0x1517d9+_0x32fcb6(0x158));try{await pipeline(createReadStream(_0x167c2a),createGzip(),createWriteStream(_0x54addb)),await unlink(_0x167c2a);}catch(_0x440c2b){console[_0x32fcb6(0x15b)](_0x32fcb6(0x152)+_0x1517d9+':',_0x440c2b);}}}catch{}}[a84_0x3322e1(0x154)](..._0x48878d){const _0x5ac085=a84_0x3322e1;if(this[_0x5ac085(0x143)]>LogLevel[_0x5ac085(0x135)])return;const _0xdb3825=formatColoredLogEntry(_0x5ac085(0x154),_0x48878d);this[_0x5ac085(0x138)]?.['write'](_0xdb3825+'\x0a');}[a84_0x3322e1(0x14f)](..._0x5ebd45){const _0x34f332=a84_0x3322e1;if(this[_0x34f332(0x143)]>LogLevel[_0x34f332(0x142)])return;const _0x33ebe3=formatColoredLogEntry(_0x34f332(0x14f),_0x5ebd45);this['logStream']?.[_0x34f332(0x163)](_0x33ebe3+'\x0a');}[a84_0x3322e1(0x136)](..._0x30a2c5){const _0x2b04d5=a84_0x3322e1;if(this[_0x2b04d5(0x143)]>LogLevel[_0x2b04d5(0x157)])return;const _0x9a98bc=formatColoredLogEntry(_0x2b04d5(0x136),_0x30a2c5);!this[_0x2b04d5(0x13c)]&&console['log'](_0x9a98bc),this['logStream']?.[_0x2b04d5(0x163)](_0x9a98bc+'\x0a');}[a84_0x3322e1(0x15a)](..._0x38a320){const _0x3826f8=a84_0x3322e1;if(this[_0x3826f8(0x143)]>LogLevel[_0x3826f8(0x147)])return;const _0x4e0b45=formatColoredLogEntry(_0x3826f8(0x15a),_0x38a320);!this[_0x3826f8(0x13c)]&&console[_0x3826f8(0x15b)](_0x4e0b45),this['logStream']?.['write'](_0x4e0b45+'\x0a');}['error'](..._0x3939a5){const _0x45eb0d=a84_0x3322e1,_0x2e8b0d=formatColoredLogEntry(_0x45eb0d(0x15b),_0x3939a5);!this['fileOnly']&&console[_0x45eb0d(0x15b)](_0x2e8b0d),this[_0x45eb0d(0x138)]?.[_0x45eb0d(0x163)](_0x2e8b0d+'\x0a');}async['close'](){const _0x338b84=a84_0x3322e1;return this[_0x338b84(0x136)]('Proxy\x20session\x20ended'),new Promise(_0x1292bd=>{const _0x74c8f2=_0x338b84;this[_0x74c8f2(0x138)]?this[_0x74c8f2(0x138)]['end'](()=>{_0x1292bd();}):_0x1292bd();});}[a84_0x3322e1(0x145)](){const _0x42b0c3=a84_0x3322e1;return join(this[_0x42b0c3(0x144)],_0x42b0c3(0x162));}}
1
+ const a85_0x18f50d=a85_0x416b;function a85_0x416b(_0x3c660e,_0x5406e4){const _0x3f04a6=a85_0x3f04();return a85_0x416b=function(_0x416b8f,_0x4504c0){_0x416b8f=_0x416b8f-0x120;let _0x150b93=_0x3f04a6[_0x416b8f];return _0x150b93;},a85_0x416b(_0x3c660e,_0x5406e4);}(function(_0x45aa88,_0x230cd6){const _0x1f5736=a85_0x416b,_0x42fc5f=_0x45aa88();while(!![]){try{const _0x231828=parseInt(_0x1f5736(0x139))/0x1*(-parseInt(_0x1f5736(0x159))/0x2)+-parseInt(_0x1f5736(0x12e))/0x3+-parseInt(_0x1f5736(0x148))/0x4+parseInt(_0x1f5736(0x150))/0x5+-parseInt(_0x1f5736(0x14d))/0x6+-parseInt(_0x1f5736(0x143))/0x7*(-parseInt(_0x1f5736(0x137))/0x8)+parseInt(_0x1f5736(0x127))/0x9*(parseInt(_0x1f5736(0x142))/0xa);if(_0x231828===_0x230cd6)break;else _0x42fc5f['push'](_0x42fc5f['shift']());}catch(_0x357cfa){_0x42fc5f['push'](_0x42fc5f['shift']());}}}(a85_0x3f04,0x94a79));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';function a85_0x3f04(){const _0x4f6222=['getHours','debug','toISOString','stack','640602aPMNtY','trace','DEBUG','rotateOldLogs','end','tdx','.log','write','tdx.log','3087ClXHjA','name','join','error','logStream','split','gray','340812SwUsrT','getLogPath','WARN','getMilliseconds','mtime','abs','Proxy\x20session\x20ended','getTimezoneOffset','info','2200RdtOBb','.cache','2IIRjxV','warn','yellow','fileOnly','getMonth','includes','logDir','logLevel','getMinutes','14730OmcCYO','26740CZXmSJ','getDate','map','.gz','Warning:\x20Error\x20writing\x20to\x20tdx.log:','261952jBpDcd','test','cyan','red','toString','2571840BFXbMd','INFO','Warning:\x20Failed\x20to\x20compress\x20','1507420cQktiX','message','padStart','TRACE','close'];a85_0x3f04=function(){return _0x4f6222;};return a85_0x3f04();}import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a85_0x39e15d from'chalk';function safeStringify(_0x4fb058){const _0x208fea=a85_0x416b;if(typeof _0x4fb058==='string')return _0x4fb058;if(_0x4fb058 instanceof Error)return _0x4fb058['stack']||_0x4fb058[_0x208fea(0x128)]+':\x20'+_0x4fb058[_0x208fea(0x151)];try{return JSON['stringify'](_0x4fb058,(_0x408cdd,_0x3be709)=>{const _0x1b0f56=_0x208fea;if(_0x3be709 instanceof Error)return{'name':_0x3be709['name'],'message':_0x3be709['message'],'stack':_0x3be709[_0x1b0f56(0x158)],'cause':_0x3be709['cause']};return _0x3be709;});}catch{return String(_0x4fb058);}}function getTimezoneOffset(){const _0x51a687=a85_0x416b,_0x548315=-new Date()[_0x51a687(0x135)](),_0x4dbd10=Math['floor'](Math[_0x51a687(0x133)](_0x548315)/0x3c),_0x47df64=Math[_0x51a687(0x133)](_0x548315)%0x3c,_0x53bd1c=_0x548315>=0x0?'+':'-';return''+_0x53bd1c+_0x4dbd10[_0x51a687(0x14c)]()[_0x51a687(0x152)](0x2,'0')+_0x47df64['toString']()['padStart'](0x2,'0');}function formatTimestamp(){const _0x1fa4af=a85_0x416b,_0x17aaf5=new Date(),_0x1bdb1d=_0x17aaf5['getFullYear'](),_0x21fcb8=(_0x17aaf5[_0x1fa4af(0x13d)]()+0x1)['toString']()[_0x1fa4af(0x152)](0x2,'0'),_0x1a5397=_0x17aaf5[_0x1fa4af(0x144)]()[_0x1fa4af(0x14c)]()[_0x1fa4af(0x152)](0x2,'0'),_0xd6cdd0=_0x17aaf5[_0x1fa4af(0x155)]()[_0x1fa4af(0x14c)]()[_0x1fa4af(0x152)](0x2,'0'),_0x2b80b0=_0x17aaf5[_0x1fa4af(0x141)]()[_0x1fa4af(0x14c)]()[_0x1fa4af(0x152)](0x2,'0'),_0x43861e=_0x17aaf5['getSeconds']()[_0x1fa4af(0x14c)]()[_0x1fa4af(0x152)](0x2,'0'),_0x42b724=_0x17aaf5[_0x1fa4af(0x131)]()[_0x1fa4af(0x14c)]()[_0x1fa4af(0x152)](0x3,'0'),_0x2ec497=getTimezoneOffset();return _0x1bdb1d+'-'+_0x21fcb8+'-'+_0x1a5397+'\x20'+_0xd6cdd0+':'+_0x2b80b0+':'+_0x43861e+'.'+_0x42b724+_0x2ec497;}function formatColoredLogEntry(_0x1e2fce,_0x39b807){const _0x33a6ca=a85_0x416b,_0x38ab60=formatTimestamp(),_0x4f9920=_0x39b807[_0x33a6ca(0x145)](safeStringify)[_0x33a6ca(0x129)]('\x20'),_0x1227a7=a85_0x39e15d[_0x33a6ca(0x12d)](_0x38ab60);let _0x52d7e0;switch(_0x1e2fce){case _0x33a6ca(0x136):_0x52d7e0=a85_0x39e15d[_0x33a6ca(0x14a)]('['+_0x1e2fce+']\x20');break;case'warn':_0x52d7e0=a85_0x39e15d[_0x33a6ca(0x13b)]('['+_0x1e2fce+']\x20');break;case _0x33a6ca(0x12a):_0x52d7e0=a85_0x39e15d[_0x33a6ca(0x14b)]('['+_0x1e2fce+']');break;case'debug':_0x52d7e0=a85_0x39e15d[_0x33a6ca(0x12d)]('['+_0x1e2fce+']');break;default:_0x52d7e0='['+_0x1e2fce+']';}return _0x1227a7+'\x20'+_0x52d7e0+'\x20'+_0x4f9920;}export var LogLevel;(function(_0x3eb2bb){const _0x5f1bea=a85_0x416b;_0x3eb2bb[_0x3eb2bb[_0x5f1bea(0x153)]=-0x2]='TRACE',_0x3eb2bb[_0x3eb2bb[_0x5f1bea(0x120)]=-0x1]=_0x5f1bea(0x120),_0x3eb2bb[_0x3eb2bb['INFO']=0x0]=_0x5f1bea(0x14e),_0x3eb2bb[_0x3eb2bb[_0x5f1bea(0x130)]=0x1]=_0x5f1bea(0x130),_0x3eb2bb[_0x3eb2bb['ERROR']=0x2]='ERROR';}(LogLevel||(LogLevel={})));export class TDXLogger{[a85_0x18f50d(0x12b)];[a85_0x18f50d(0x13f)];[a85_0x18f50d(0x140)];['fileOnly'];constructor(_0x3c3df5=LogLevel['INFO'],_0xb3f03b=![]){const _0x4be9f5=a85_0x18f50d;this[_0x4be9f5(0x13f)]=join(homedir(),_0x4be9f5(0x138),_0x4be9f5(0x123),'logs'),this[_0x4be9f5(0x140)]=_0x3c3df5,this[_0x4be9f5(0x13c)]=_0xb3f03b;}async['init'](){const _0x646f7=a85_0x18f50d;try{await mkdir(this[_0x646f7(0x13f)],{'recursive':!![]}),await this[_0x646f7(0x121)]();const _0x5fe296=join(this[_0x646f7(0x13f)],_0x646f7(0x126));this[_0x646f7(0x12b)]=createWriteStream(_0x5fe296,{'flags':'a'}),this[_0x646f7(0x12b)]['on'](_0x646f7(0x12a),_0x4ad734=>{const _0x34016c=_0x646f7;console[_0x34016c(0x12a)](_0x34016c(0x147),_0x4ad734[_0x34016c(0x151)]);});}catch(_0x54002e){console['error']('Warning:\x20Failed\x20to\x20initialize\x20log\x20files:',_0x54002e);}}async[a85_0x18f50d(0x121)](){const _0x487a56=a85_0x18f50d;try{const _0x5db427=await readdir(this[_0x487a56(0x13f)]),_0x451dd0=new Date()[_0x487a56(0x157)]()['split']('T')[0x0];if(_0x5db427[_0x487a56(0x13e)](_0x487a56(0x126))){const _0x4b0fac=join(this[_0x487a56(0x13f)],'tdx.log'),_0x54e98e=await stat(_0x4b0fac),_0x5d6de1=new Date(_0x54e98e[_0x487a56(0x132)])[_0x487a56(0x157)]()[_0x487a56(0x12c)]('T')[0x0];if(_0x5d6de1<_0x451dd0){const _0x5493bc=join(this[_0x487a56(0x13f)],'tdx-'+_0x5d6de1+_0x487a56(0x124));await rename(_0x4b0fac,_0x5493bc);}}const _0x2ba507=await readdir(this[_0x487a56(0x13f)]),_0x1e8df3=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x2c2795=_0x2ba507['filter'](_0x3297c2=>_0x1e8df3[_0x487a56(0x149)](_0x3297c2));for(const _0x2aa9e2 of _0x2c2795){const _0x3e5811=join(this['logDir'],_0x2aa9e2),_0x8bb4df=join(this[_0x487a56(0x13f)],_0x2aa9e2+_0x487a56(0x146));try{await pipeline(createReadStream(_0x3e5811),createGzip(),createWriteStream(_0x8bb4df)),await unlink(_0x3e5811);}catch(_0x4fc62f){console[_0x487a56(0x12a)](_0x487a56(0x14f)+_0x2aa9e2+':',_0x4fc62f);}}}catch{}}[a85_0x18f50d(0x156)](..._0x1a8eda){const _0x51d88a=a85_0x18f50d;if(this[_0x51d88a(0x140)]>LogLevel[_0x51d88a(0x120)])return;const _0x298d95=formatColoredLogEntry(_0x51d88a(0x156),_0x1a8eda);this[_0x51d88a(0x12b)]?.['write'](_0x298d95+'\x0a');}[a85_0x18f50d(0x15a)](..._0x5b6b92){const _0x21b349=a85_0x18f50d;if(this[_0x21b349(0x140)]>LogLevel[_0x21b349(0x153)])return;const _0x493182=formatColoredLogEntry(_0x21b349(0x15a),_0x5b6b92);this[_0x21b349(0x12b)]?.['write'](_0x493182+'\x0a');}[a85_0x18f50d(0x136)](..._0xf067b4){const _0x37618e=a85_0x18f50d;if(this[_0x37618e(0x140)]>LogLevel[_0x37618e(0x14e)])return;const _0x311fe7=formatColoredLogEntry(_0x37618e(0x136),_0xf067b4);!this[_0x37618e(0x13c)]&&console['log'](_0x311fe7),this[_0x37618e(0x12b)]?.[_0x37618e(0x125)](_0x311fe7+'\x0a');}[a85_0x18f50d(0x13a)](..._0x4d68af){const _0x20f384=a85_0x18f50d;if(this[_0x20f384(0x140)]>LogLevel['WARN'])return;const _0x46235a=formatColoredLogEntry(_0x20f384(0x13a),_0x4d68af);!this['fileOnly']&&console[_0x20f384(0x12a)](_0x46235a),this[_0x20f384(0x12b)]?.['write'](_0x46235a+'\x0a');}[a85_0x18f50d(0x12a)](..._0x24e540){const _0x540129=a85_0x18f50d,_0x4d907c=formatColoredLogEntry('error',_0x24e540);!this[_0x540129(0x13c)]&&console[_0x540129(0x12a)](_0x4d907c),this[_0x540129(0x12b)]?.[_0x540129(0x125)](_0x4d907c+'\x0a');}async[a85_0x18f50d(0x154)](){const _0x5f5b15=a85_0x18f50d;return this['info'](_0x5f5b15(0x134)),new Promise(_0x209f18=>{const _0x3fbf33=_0x5f5b15;this[_0x3fbf33(0x12b)]?this['logStream'][_0x3fbf33(0x122)](()=>{_0x209f18();}):_0x209f18();});}[a85_0x18f50d(0x12f)](){const _0x418d20=a85_0x18f50d;return join(this[_0x418d20(0x13f)],_0x418d20(0x126));}}