@treasuredata/tdx 0.14.8 → 0.14.9

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 (144) hide show
  1. package/README.md +21 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/commands/activations.js +1 -1
  7. package/dist/commands/agent-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/llm-proxy.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/segment-command.js +1 -1
  29. package/dist/commands/segment-create-command.js +1 -1
  30. package/dist/commands/segment-fields-command.js +1 -1
  31. package/dist/commands/segment-pull-command.js +1 -1
  32. package/dist/commands/segment-push-command.js +1 -1
  33. package/dist/commands/segment-update-command.js +1 -1
  34. package/dist/commands/segment-use-command.js +1 -1
  35. package/dist/commands/segment-validate-command.js +1 -1
  36. package/dist/commands/segments.js +1 -1
  37. package/dist/commands/show.js +1 -1
  38. package/dist/commands/tables.js +1 -1
  39. package/dist/commands/unset-command.js +1 -1
  40. package/dist/commands/use-command.js +1 -1
  41. package/dist/commands/user-command.js +1 -1
  42. package/dist/commands/workflow-command.js +1 -1
  43. package/dist/core/auth.js +1 -1
  44. package/dist/core/command-output.js +1 -1
  45. package/dist/core/config.js +1 -1
  46. package/dist/core/connection-cache.js +1 -1
  47. package/dist/core/constants.js +1 -1
  48. package/dist/core/credential-cache.js +1 -1
  49. package/dist/core/global-context.js +1 -1
  50. package/dist/core/keychain.js +1 -1
  51. package/dist/core/profile.js +1 -1
  52. package/dist/core/project-config.js +1 -1
  53. package/dist/core/session.js +1 -1
  54. package/dist/core/user-cache.js +1 -1
  55. package/dist/core/version.js +1 -1
  56. package/dist/index.js +1 -1
  57. package/dist/proxy/anthropic-adapter.js +1 -1
  58. package/dist/proxy/claude-usage-tracker.js +1 -1
  59. package/dist/proxy/context-signature.js +1 -1
  60. package/dist/proxy/conversation-utils.js +1 -1
  61. package/dist/proxy/passthrough-server.js +1 -1
  62. package/dist/proxy/server.js +1 -1
  63. package/dist/proxy/session-cache.js +1 -1
  64. package/dist/proxy/sse-usage-parser.js +1 -1
  65. package/dist/sdk/agent/agent-config.js +1 -1
  66. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  67. package/dist/sdk/agent/agent-yaml.js +1 -1
  68. package/dist/sdk/api.js +1 -1
  69. package/dist/sdk/client/cdp-api-client.js +1 -1
  70. package/dist/sdk/client/endpoints.js +1 -1
  71. package/dist/sdk/client/engage-api-client.js +1 -1
  72. package/dist/sdk/client/http-client.js +1 -1
  73. package/dist/sdk/client/llm-api-client.js +1 -1
  74. package/dist/sdk/client/rate-limiter.js +1 -1
  75. package/dist/sdk/client/td-api-client.js +1 -1
  76. package/dist/sdk/client/trino-api-client.d.ts.map +1 -1
  77. package/dist/sdk/client/trino-api-client.js +1 -1
  78. package/dist/sdk/client/trino-api-client.js.map +1 -1
  79. package/dist/sdk/client/workflow-client.js +1 -1
  80. package/dist/sdk/connection-validator.js +1 -1
  81. package/dist/sdk/connection.js +1 -1
  82. package/dist/sdk/engage.js +1 -1
  83. package/dist/sdk/errors.js +1 -1
  84. package/dist/sdk/index.js +1 -1
  85. package/dist/sdk/io/index.js +1 -1
  86. package/dist/sdk/io/node-filesystem.js +1 -1
  87. package/dist/sdk/job.js +1 -1
  88. package/dist/sdk/journey.js +1 -1
  89. package/dist/sdk/llm/chat-cache.js +1 -1
  90. package/dist/sdk/llm/index.js +1 -1
  91. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  92. package/dist/sdk/llm/model-aliases.js +1 -1
  93. package/dist/sdk/llm/model-factors.js +1 -1
  94. package/dist/sdk/query/index.js +1 -1
  95. package/dist/sdk/query/sql-parser.js +1 -1
  96. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  97. package/dist/sdk/segment/fields-display.js +1 -1
  98. package/dist/sdk/segment/file-discovery.js +1 -1
  99. package/dist/sdk/segment/journey-utils.js +1 -1
  100. package/dist/sdk/segment/journey-yaml.js +1 -1
  101. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  102. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  103. package/dist/sdk/segment/pull-workflow.js +1 -1
  104. package/dist/sdk/segment/push-workflow.js +1 -1
  105. package/dist/sdk/segment/resolution-context.js +1 -1
  106. package/dist/sdk/segment/segment-path-parser.js +1 -1
  107. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  108. package/dist/sdk/segment/target-resolution.js +1 -1
  109. package/dist/sdk/segment/tdx-config.js +1 -1
  110. package/dist/sdk/segment/validate-files.js +1 -1
  111. package/dist/sdk/segment/yaml-validator.js +1 -1
  112. package/dist/sdk/segment.js +1 -1
  113. package/dist/sdk/types/index.js +1 -1
  114. package/dist/sdk/types/progress.js +1 -1
  115. package/dist/sdk/user.js +1 -1
  116. package/dist/sdk/util/format-detector.js +1 -1
  117. package/dist/sdk/util/formatters.js +1 -1
  118. package/dist/sdk/util/index.js +1 -1
  119. package/dist/sdk/util/tree-formatter.js +1 -1
  120. package/dist/sdk/workflow/clone-workflow.js +1 -1
  121. package/dist/sdk/workflow/index.js +1 -1
  122. package/dist/sdk/workflow/pull-workflow.js +1 -1
  123. package/dist/sdk/workflow/push-workflow.js +1 -1
  124. package/dist/sdk/workflow/tdx-config.js +1 -1
  125. package/dist/sdk/workflow/workflow-utils.js +1 -1
  126. package/dist/utils/async.js +1 -1
  127. package/dist/utils/colors.d.ts +2 -1
  128. package/dist/utils/colors.d.ts.map +1 -1
  129. package/dist/utils/colors.js +1 -1
  130. package/dist/utils/colors.js.map +1 -1
  131. package/dist/utils/diff.js +1 -1
  132. package/dist/utils/file-permissions.js +1 -1
  133. package/dist/utils/json-loader.js +1 -1
  134. package/dist/utils/option-validation.js +1 -1
  135. package/dist/utils/port.js +1 -1
  136. package/dist/utils/process.js +1 -1
  137. package/dist/utils/prompt.js +1 -1
  138. package/dist/utils/spinner.js +1 -1
  139. package/dist/utils/sse-parser.js +1 -1
  140. package/dist/utils/string-utils.js +1 -1
  141. package/dist/utils/table-ref-parser.js +1 -1
  142. package/dist/utils/tdx-logger.js +1 -1
  143. package/dist/utils/version-check.js +1 -1
  144. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x27ad56,_0x4c7296){const _0x2a1cf3=a139_0x150a,_0x38dc6c=_0x27ad56();while(!![]){try{const _0x4945d7=parseInt(_0x2a1cf3(0x10e))/0x1*(parseInt(_0x2a1cf3(0x127))/0x2)+-parseInt(_0x2a1cf3(0x119))/0x3*(-parseInt(_0x2a1cf3(0x113))/0x4)+parseInt(_0x2a1cf3(0x12b))/0x5*(parseInt(_0x2a1cf3(0x126))/0x6)+parseInt(_0x2a1cf3(0x12c))/0x7*(-parseInt(_0x2a1cf3(0x11f))/0x8)+-parseInt(_0x2a1cf3(0x123))/0x9*(parseInt(_0x2a1cf3(0x12a))/0xa)+parseInt(_0x2a1cf3(0x10c))/0xb+-parseInt(_0x2a1cf3(0x129))/0xc;if(_0x4945d7===_0x4c7296)break;else _0x38dc6c['push'](_0x38dc6c['shift']());}catch(_0x432498){_0x38dc6c['push'](_0x38dc6c['shift']());}}}(a139_0x48ec,0x7d7d2));import a139_0xa286df from'chalk';function a139_0x48ec(){const _0x402513=['fill','split','new','454683lFlJPd','old','push','forEach','content','padStart','8VhbJap','map','cyan','unshift','3662874zfjRBo','type','add','5812698NKJTrE','5398nZiTzr','unchanged','8558640BpNGcO','20SwHsTw','5gwCmTf','1136261kQoPCE','max','has','\x20+\x20','some','added','red','length','5027055xLoxmc','removed','232XsnBEw','repeat','min','dim','\x20-\x20','4FQczpE','\x20\x20...','green'];a139_0x48ec=function(){return _0x402513;};return a139_0x48ec();}export function generateDiff(_0x177fd9,_0x1c2764){const _0x397c24=a139_0x150a,_0x4728d0=_0x177fd9[_0x397c24(0x117)]('\x0a'),_0x4cd415=_0x1c2764[_0x397c24(0x117)]('\x0a'),_0x55121b=[],_0x2611a6=computeLCS(_0x4728d0,_0x4cd415);let _0x167f16=0x0,_0x4c5c55=0x0,_0x4ff162=0x0;while(_0x167f16<_0x4728d0[_0x397c24(0x10b)]||_0x4c5c55<_0x4cd415['length']){if(_0x4ff162<_0x2611a6[_0x397c24(0x10b)]&&_0x167f16<_0x4728d0[_0x397c24(0x10b)]&&_0x4728d0[_0x167f16]===_0x2611a6[_0x4ff162])_0x4c5c55<_0x4cd415[_0x397c24(0x10b)]&&_0x4cd415[_0x4c5c55]===_0x2611a6[_0x4ff162]?(_0x55121b[_0x397c24(0x11b)]({'type':_0x397c24(0x128),'content':_0x4728d0[_0x167f16]}),_0x167f16++,_0x4c5c55++,_0x4ff162++):(_0x55121b[_0x397c24(0x11b)]({'type':_0x397c24(0x109),'content':_0x4cd415[_0x4c5c55]}),_0x4c5c55++);else{if(_0x4ff162<_0x2611a6[_0x397c24(0x10b)]&&_0x4c5c55<_0x4cd415[_0x397c24(0x10b)]&&_0x4cd415[_0x4c5c55]===_0x2611a6[_0x4ff162])_0x55121b['push']({'type':_0x397c24(0x10d),'content':_0x4728d0[_0x167f16]}),_0x167f16++;else{if(_0x167f16<_0x4728d0['length']&&(_0x4ff162>=_0x2611a6['length']||_0x4728d0[_0x167f16]!==_0x2611a6[_0x4ff162]))_0x55121b[_0x397c24(0x11b)]({'type':_0x397c24(0x10d),'content':_0x4728d0[_0x167f16]}),_0x167f16++;else _0x4c5c55<_0x4cd415[_0x397c24(0x10b)]&&(_0x55121b[_0x397c24(0x11b)]({'type':_0x397c24(0x109),'content':_0x4cd415[_0x4c5c55]}),_0x4c5c55++);}}}return _0x55121b;}function a139_0x150a(_0x28622e,_0x8f7bbe){_0x28622e=_0x28622e-0x108;const _0x48ec60=a139_0x48ec();let _0x150a49=_0x48ec60[_0x28622e];return _0x150a49;}function computeLCS(_0x2b3708,_0xb556ff){const _0x1d5cf9=a139_0x150a,_0x4e5bdd=_0x2b3708[_0x1d5cf9(0x10b)],_0x41eb31=_0xb556ff[_0x1d5cf9(0x10b)],_0x352f8c=Array(_0x4e5bdd+0x1)['fill'](null)[_0x1d5cf9(0x120)](()=>Array(_0x41eb31+0x1)[_0x1d5cf9(0x116)](0x0));for(let _0x565d1e=0x1;_0x565d1e<=_0x4e5bdd;_0x565d1e++){for(let _0x2f2588=0x1;_0x2f2588<=_0x41eb31;_0x2f2588++){_0x2b3708[_0x565d1e-0x1]===_0xb556ff[_0x2f2588-0x1]?_0x352f8c[_0x565d1e][_0x2f2588]=_0x352f8c[_0x565d1e-0x1][_0x2f2588-0x1]+0x1:_0x352f8c[_0x565d1e][_0x2f2588]=Math[_0x1d5cf9(0x12d)](_0x352f8c[_0x565d1e-0x1][_0x2f2588],_0x352f8c[_0x565d1e][_0x2f2588-0x1]);}}const _0x47cbfc=[];let _0x58760d=_0x4e5bdd,_0x28b2fe=_0x41eb31;while(_0x58760d>0x0&&_0x28b2fe>0x0){if(_0x2b3708[_0x58760d-0x1]===_0xb556ff[_0x28b2fe-0x1])_0x47cbfc[_0x1d5cf9(0x122)](_0x2b3708[_0x58760d-0x1]),_0x58760d--,_0x28b2fe--;else _0x352f8c[_0x58760d-0x1][_0x28b2fe]>_0x352f8c[_0x58760d][_0x28b2fe-0x1]?_0x58760d--:_0x28b2fe--;}return _0x47cbfc;}export function formatDiffWithColors(_0x3d61a1,_0x5c5071=0x3){const _0x55ebbe=a139_0x150a,_0x2edcfb=new Set();_0x3d61a1[_0x55ebbe(0x11c)]((_0x1fbe5a,_0x362330)=>{const _0x392efb=_0x55ebbe;_0x1fbe5a['type']!==_0x392efb(0x128)&&_0x2edcfb[_0x392efb(0x125)](_0x362330);});if(_0x2edcfb['size']===0x0)return'';const _0x4a5bd1=new Set();for(const _0x3ebee7 of _0x2edcfb){for(let _0x2db354=Math[_0x55ebbe(0x12d)](0x0,_0x3ebee7-_0x5c5071);_0x2db354<=Math[_0x55ebbe(0x110)](_0x3d61a1['length']-0x1,_0x3ebee7+_0x5c5071);_0x2db354++){_0x4a5bd1[_0x55ebbe(0x125)](_0x2db354);}}const _0x45973f=[];let _0x31a5c2=-0x1;const _0x5e36e3=_0x3d61a1['length'],_0x54ddde=Math['max'](0x3,String(_0x5e36e3)[_0x55ebbe(0x10b)]),_0x28b4ec=[];let _0x52006f=0x0,_0x4cbdf4=0x0;for(const _0x241140 of _0x3d61a1){if(_0x241140[_0x55ebbe(0x124)]===_0x55ebbe(0x10d))_0x52006f++,_0x28b4ec['push']({'old':_0x52006f,'new':0x0});else _0x241140[_0x55ebbe(0x124)]==='added'?(_0x4cbdf4++,_0x28b4ec[_0x55ebbe(0x11b)]({'old':0x0,'new':_0x4cbdf4})):(_0x52006f++,_0x4cbdf4++,_0x28b4ec[_0x55ebbe(0x11b)]({'old':_0x52006f,'new':_0x4cbdf4}));}for(let _0xcb3cf1=0x0;_0xcb3cf1<_0x3d61a1[_0x55ebbe(0x10b)];_0xcb3cf1++){if(!_0x4a5bd1[_0x55ebbe(0x12e)](_0xcb3cf1))continue;_0x31a5c2!==-0x1&&_0xcb3cf1>_0x31a5c2+0x1&&_0x45973f['push'](a139_0xa286df[_0x55ebbe(0x121)](_0x55ebbe(0x114)));_0x31a5c2=_0xcb3cf1;const _0xc63705=_0x3d61a1[_0xcb3cf1],_0x785c97=_0x28b4ec[_0xcb3cf1],_0x24e77f=_0x785c97[_0x55ebbe(0x11a)]>0x0?String(_0x785c97['old'])[_0x55ebbe(0x11e)](_0x54ddde):'\x20'[_0x55ebbe(0x10f)](_0x54ddde),_0x467835=_0x785c97[_0x55ebbe(0x118)]>0x0?String(_0x785c97[_0x55ebbe(0x118)])[_0x55ebbe(0x11e)](_0x54ddde):'\x20'[_0x55ebbe(0x10f)](_0x54ddde);switch(_0xc63705[_0x55ebbe(0x124)]){case _0x55ebbe(0x10d):_0x45973f[_0x55ebbe(0x11b)](a139_0xa286df[_0x55ebbe(0x10a)](_0x24e77f+'\x20'+_0x467835+_0x55ebbe(0x112)+_0xc63705['content']));break;case _0x55ebbe(0x109):_0x45973f['push'](a139_0xa286df[_0x55ebbe(0x115)](_0x24e77f+'\x20'+_0x467835+_0x55ebbe(0x12f)+_0xc63705[_0x55ebbe(0x11d)]));break;default:_0x45973f['push'](a139_0xa286df[_0x55ebbe(0x111)](_0x24e77f+'\x20'+_0x467835+'\x20\x20\x20'+_0xc63705[_0x55ebbe(0x11d)]));break;}}return _0x45973f['join']('\x0a');}export function hasChanges(_0x3a19e9){const _0x2fa67d=a139_0x150a;return _0x3a19e9[_0x2fa67d(0x108)](_0x49478c=>_0x49478c[_0x2fa67d(0x124)]!==_0x2fa67d(0x128));}
1
+ function a139_0x55c0(_0xd015ea,_0x3be79c){_0xd015ea=_0xd015ea-0xa4;const _0x4f0d43=a139_0x4f0d();let _0x55c0cf=_0x4f0d43[_0xd015ea];return _0x55c0cf;}function a139_0x4f0d(){const _0x127130=['max','old','\x20\x20...','\x20\x20\x20','padStart','4165800Czemnf','6052977YxFHge','push','7RMQDcE','fill','length','1142160LbfKDP','some','removed','3733855NlCKpF','cyan','10201504HTRgdR','split','2962WvvCdd','2633262WlUzgm','added','20woUaKr','\x20+\x20','size','dim','add','type','content','633tdDeGV','red','repeat','unchanged','\x20-\x20'];a139_0x4f0d=function(){return _0x127130;};return a139_0x4f0d();}(function(_0x1c115c,_0x26ab31){const _0x1cf19f=a139_0x55c0,_0xa8445=_0x1c115c();while(!![]){try{const _0x48c4d3=parseInt(_0x1cf19f(0xbf))/0x1+-parseInt(_0x1cf19f(0xa5))/0x2*(parseInt(_0x1cf19f(0xaf))/0x3)+parseInt(_0x1cf19f(0xb9))/0x4+-parseInt(_0x1cf19f(0xc2))/0x5+-parseInt(_0x1cf19f(0xa6))/0x6*(parseInt(_0x1cf19f(0xbc))/0x7)+-parseInt(_0x1cf19f(0xc4))/0x8+-parseInt(_0x1cf19f(0xba))/0x9*(-parseInt(_0x1cf19f(0xa8))/0xa);if(_0x48c4d3===_0x26ab31)break;else _0xa8445['push'](_0xa8445['shift']());}catch(_0xdfbdb7){_0xa8445['push'](_0xa8445['shift']());}}}(a139_0x4f0d,0xb86bd));import a139_0x57124b from'chalk';export function generateDiff(_0x517ddc,_0x1c20b0){const _0x3c4882=a139_0x55c0,_0x2eed93=_0x517ddc[_0x3c4882(0xa4)]('\x0a'),_0x156bdd=_0x1c20b0[_0x3c4882(0xa4)]('\x0a'),_0x2dfa28=[],_0x477d46=computeLCS(_0x2eed93,_0x156bdd);let _0xf1ba5e=0x0,_0xdacb9a=0x0,_0x14320f=0x0;while(_0xf1ba5e<_0x2eed93[_0x3c4882(0xbe)]||_0xdacb9a<_0x156bdd[_0x3c4882(0xbe)]){if(_0x14320f<_0x477d46[_0x3c4882(0xbe)]&&_0xf1ba5e<_0x2eed93[_0x3c4882(0xbe)]&&_0x2eed93[_0xf1ba5e]===_0x477d46[_0x14320f])_0xdacb9a<_0x156bdd[_0x3c4882(0xbe)]&&_0x156bdd[_0xdacb9a]===_0x477d46[_0x14320f]?(_0x2dfa28['push']({'type':_0x3c4882(0xb2),'content':_0x2eed93[_0xf1ba5e]}),_0xf1ba5e++,_0xdacb9a++,_0x14320f++):(_0x2dfa28['push']({'type':'added','content':_0x156bdd[_0xdacb9a]}),_0xdacb9a++);else{if(_0x14320f<_0x477d46[_0x3c4882(0xbe)]&&_0xdacb9a<_0x156bdd[_0x3c4882(0xbe)]&&_0x156bdd[_0xdacb9a]===_0x477d46[_0x14320f])_0x2dfa28[_0x3c4882(0xbb)]({'type':_0x3c4882(0xc1),'content':_0x2eed93[_0xf1ba5e]}),_0xf1ba5e++;else{if(_0xf1ba5e<_0x2eed93[_0x3c4882(0xbe)]&&(_0x14320f>=_0x477d46['length']||_0x2eed93[_0xf1ba5e]!==_0x477d46[_0x14320f]))_0x2dfa28[_0x3c4882(0xbb)]({'type':_0x3c4882(0xc1),'content':_0x2eed93[_0xf1ba5e]}),_0xf1ba5e++;else _0xdacb9a<_0x156bdd['length']&&(_0x2dfa28[_0x3c4882(0xbb)]({'type':_0x3c4882(0xa7),'content':_0x156bdd[_0xdacb9a]}),_0xdacb9a++);}}}return _0x2dfa28;}function computeLCS(_0xd4a2e4,_0x344b3e){const _0x38cb73=a139_0x55c0,_0x510eff=_0xd4a2e4['length'],_0x19143a=_0x344b3e[_0x38cb73(0xbe)],_0x50646d=Array(_0x510eff+0x1)[_0x38cb73(0xbd)](null)['map'](()=>Array(_0x19143a+0x1)[_0x38cb73(0xbd)](0x0));for(let _0x55527b=0x1;_0x55527b<=_0x510eff;_0x55527b++){for(let _0x28bbed=0x1;_0x28bbed<=_0x19143a;_0x28bbed++){_0xd4a2e4[_0x55527b-0x1]===_0x344b3e[_0x28bbed-0x1]?_0x50646d[_0x55527b][_0x28bbed]=_0x50646d[_0x55527b-0x1][_0x28bbed-0x1]+0x1:_0x50646d[_0x55527b][_0x28bbed]=Math['max'](_0x50646d[_0x55527b-0x1][_0x28bbed],_0x50646d[_0x55527b][_0x28bbed-0x1]);}}const _0x404118=[];let _0x3c9e16=_0x510eff,_0x9334a2=_0x19143a;while(_0x3c9e16>0x0&&_0x9334a2>0x0){if(_0xd4a2e4[_0x3c9e16-0x1]===_0x344b3e[_0x9334a2-0x1])_0x404118['unshift'](_0xd4a2e4[_0x3c9e16-0x1]),_0x3c9e16--,_0x9334a2--;else _0x50646d[_0x3c9e16-0x1][_0x9334a2]>_0x50646d[_0x3c9e16][_0x9334a2-0x1]?_0x3c9e16--:_0x9334a2--;}return _0x404118;}export function formatDiffWithColors(_0xaf45f,_0x252f96=0x3){const _0x2f5f57=a139_0x55c0,_0x5e1e5=new Set();_0xaf45f['forEach']((_0x17657d,_0x129015)=>{const _0x49c38b=a139_0x55c0;_0x17657d['type']!==_0x49c38b(0xb2)&&_0x5e1e5[_0x49c38b(0xac)](_0x129015);});if(_0x5e1e5[_0x2f5f57(0xaa)]===0x0)return'';const _0x482757=new Set();for(const _0x30f88e of _0x5e1e5){for(let _0x1e16c4=Math[_0x2f5f57(0xb4)](0x0,_0x30f88e-_0x252f96);_0x1e16c4<=Math['min'](_0xaf45f['length']-0x1,_0x30f88e+_0x252f96);_0x1e16c4++){_0x482757[_0x2f5f57(0xac)](_0x1e16c4);}}const _0xbda722=[];let _0x35fff8=-0x1;const _0x3f6144=_0xaf45f[_0x2f5f57(0xbe)],_0x560390=Math[_0x2f5f57(0xb4)](0x3,String(_0x3f6144)[_0x2f5f57(0xbe)]),_0x442fcd=[];let _0x5c9642=0x0,_0x2b8141=0x0;for(const _0x35bd75 of _0xaf45f){if(_0x35bd75[_0x2f5f57(0xad)]==='removed')_0x5c9642++,_0x442fcd[_0x2f5f57(0xbb)]({'old':_0x5c9642,'new':0x0});else _0x35bd75[_0x2f5f57(0xad)]===_0x2f5f57(0xa7)?(_0x2b8141++,_0x442fcd[_0x2f5f57(0xbb)]({'old':0x0,'new':_0x2b8141})):(_0x5c9642++,_0x2b8141++,_0x442fcd[_0x2f5f57(0xbb)]({'old':_0x5c9642,'new':_0x2b8141}));}for(let _0x5d3786=0x0;_0x5d3786<_0xaf45f[_0x2f5f57(0xbe)];_0x5d3786++){if(!_0x482757['has'](_0x5d3786))continue;_0x35fff8!==-0x1&&_0x5d3786>_0x35fff8+0x1&&_0xbda722[_0x2f5f57(0xbb)](a139_0x57124b[_0x2f5f57(0xc3)](_0x2f5f57(0xb6)));_0x35fff8=_0x5d3786;const _0x165bd9=_0xaf45f[_0x5d3786],_0x3a5d60=_0x442fcd[_0x5d3786],_0x41ee3e=_0x3a5d60['old']>0x0?String(_0x3a5d60[_0x2f5f57(0xb5)])[_0x2f5f57(0xb8)](_0x560390):'\x20'[_0x2f5f57(0xb1)](_0x560390),_0x1a8c34=_0x3a5d60['new']>0x0?String(_0x3a5d60['new'])[_0x2f5f57(0xb8)](_0x560390):'\x20'[_0x2f5f57(0xb1)](_0x560390);switch(_0x165bd9[_0x2f5f57(0xad)]){case _0x2f5f57(0xc1):_0xbda722[_0x2f5f57(0xbb)](a139_0x57124b[_0x2f5f57(0xb0)](_0x41ee3e+'\x20'+_0x1a8c34+_0x2f5f57(0xb3)+_0x165bd9[_0x2f5f57(0xae)]));break;case _0x2f5f57(0xa7):_0xbda722['push'](a139_0x57124b['green'](_0x41ee3e+'\x20'+_0x1a8c34+_0x2f5f57(0xa9)+_0x165bd9['content']));break;default:_0xbda722[_0x2f5f57(0xbb)](a139_0x57124b[_0x2f5f57(0xab)](_0x41ee3e+'\x20'+_0x1a8c34+_0x2f5f57(0xb7)+_0x165bd9[_0x2f5f57(0xae)]));break;}}return _0xbda722['join']('\x0a');}export function hasChanges(_0x176de3){const _0x4c23ec=a139_0x55c0;return _0x176de3[_0x4c23ec(0xc0)](_0x100e50=>_0x100e50[_0x4c23ec(0xad)]!==_0x4c23ec(0xb2));}
@@ -1 +1 @@
1
- function a140_0x12f6(){const _0x4c3768=['31312FuGXTW','mode','\x20has\x20insecure\x20permissions\x20(','559746nOXSRS','existsSync','warn','2dwMFXn','169530BUIftP','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','writeFileSync','chmodSync','5077536rxEFPW','toString','10eDEHVF','1373826RCsptN','1782VHQdTS','mkdirSync','4323634mqEmWl','859373zzIcOF',').\x20'];a140_0x12f6=function(){return _0x4c3768;};return a140_0x12f6();}(function(_0x571b95,_0x5c43ab){const _0x1605e9=a140_0x1ace,_0x772a3d=_0x571b95();while(!![]){try{const _0x4a336e=-parseInt(_0x1605e9(0x171))/0x1*(parseInt(_0x1605e9(0x165))/0x2)+-parseInt(_0x1605e9(0x16d))/0x3+-parseInt(_0x1605e9(0x173))/0x4+parseInt(_0x1605e9(0x16c))/0x5*(parseInt(_0x1605e9(0x162))/0x6)+-parseInt(_0x1605e9(0x170))/0x7+-parseInt(_0x1605e9(0x16a))/0x8+-parseInt(_0x1605e9(0x16e))/0x9*(-parseInt(_0x1605e9(0x166))/0xa);if(_0x4a336e===_0x5c43ab)break;else _0x772a3d['push'](_0x772a3d['shift']());}catch(_0x480d95){_0x772a3d['push'](_0x772a3d['shift']());}}}(a140_0x12f6,0xebc93));import*as a140_0x4f382e from'node:fs';import*as a140_0x330af4 from'node:path';export function setSecureFilePermissions(_0x1e07f8){const _0x15057f=a140_0x1ace;try{a140_0x4f382e[_0x15057f(0x169)](_0x1e07f8,0x180);}catch{console[_0x15057f(0x164)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x1e07f8);}}export function setSecureDirectoryPermissions(_0xa7b34e){const _0x4581a4=a140_0x1ace;try{a140_0x4f382e[_0x4581a4(0x169)](_0xa7b34e,0x1c0);}catch{console[_0x4581a4(0x164)](_0x4581a4(0x167)+_0xa7b34e);}}function a140_0x1ace(_0x422f63,_0x5618cf){_0x422f63=_0x422f63-0x162;const _0x12f6e3=a140_0x12f6();let _0x1ace31=_0x12f6e3[_0x422f63];return _0x1ace31;}export function createSecureDirectory(_0x8494a2){const _0x29c05e=a140_0x1ace;!a140_0x4f382e[_0x29c05e(0x163)](_0x8494a2)&&(a140_0x4f382e[_0x29c05e(0x16f)](_0x8494a2,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x8494a2));}export function validateSecureFilePermissions(_0x7216f3){const _0x2fdc1e=a140_0x1ace;try{const _0x2c848c=a140_0x4f382e['statSync'](_0x7216f3),_0x3bb6d1=_0x2c848c[_0x2fdc1e(0x174)]&0x1ff,_0x3ca6e1=(_0x3bb6d1&0x3f)!==0x0;if(_0x3ca6e1)return console['warn']('Warning:\x20'+_0x7216f3+_0x2fdc1e(0x175)+_0x3bb6d1[_0x2fdc1e(0x16b)](0x8)+_0x2fdc1e(0x172)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x486b5e,_0x55c870){const _0x557177=a140_0x1ace,_0x1c4c40=a140_0x330af4['dirname'](_0x486b5e);createSecureDirectory(_0x1c4c40),a140_0x4f382e[_0x557177(0x168)](_0x486b5e,_0x55c870,{'mode':0x180}),setSecureFilePermissions(_0x486b5e);}
1
+ (function(_0x2cb57b,_0x222acc){const _0x3f9d95=a140_0x2384,_0x206318=_0x2cb57b();while(!![]){try{const _0x1407d4=-parseInt(_0x3f9d95(0x9b))/0x1*(-parseInt(_0x3f9d95(0xab))/0x2)+-parseInt(_0x3f9d95(0xa0))/0x3*(-parseInt(_0x3f9d95(0xa7))/0x4)+-parseInt(_0x3f9d95(0xa3))/0x5*(parseInt(_0x3f9d95(0xa9))/0x6)+parseInt(_0x3f9d95(0x9a))/0x7+parseInt(_0x3f9d95(0x9f))/0x8*(-parseInt(_0x3f9d95(0x9d))/0x9)+parseInt(_0x3f9d95(0xa2))/0xa+-parseInt(_0x3f9d95(0x9c))/0xb;if(_0x1407d4===_0x222acc)break;else _0x206318['push'](_0x206318['shift']());}catch(_0x24c6fb){_0x206318['push'](_0x206318['shift']());}}}(a140_0x27ea,0x327ad));import*as a140_0x241efa from'node:fs';import*as a140_0xd55114 from'node:path';export function setSecureFilePermissions(_0x21beb6){const _0x236d84=a140_0x2384;try{a140_0x241efa[_0x236d84(0x98)](_0x21beb6,0x180);}catch{console[_0x236d84(0x99)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x21beb6);}}function a140_0x27ea(){const _0x25fb82=['writeFileSync','chmodSync','warn','1112643YABoHa','7wksYpZ','1357642ropWRS','716949YaYrAy','Should\x20be\x200600\x20or\x20more\x20restrictive.','40gQBkUb','77163mhUpsc',').\x20','2240080bRjjDQ','180Owyeib','toString','existsSync','Warning:\x20','52ucUeSj','statSync','55542ZsRFJE','dirname','98404hOZOkS','mkdirSync'];a140_0x27ea=function(){return _0x25fb82;};return a140_0x27ea();}export function setSecureDirectoryPermissions(_0x1a976b){const _0x5f3bd2=a140_0x2384;try{a140_0x241efa[_0x5f3bd2(0x98)](_0x1a976b,0x1c0);}catch{console[_0x5f3bd2(0x99)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x1a976b);}}export function createSecureDirectory(_0x42412b){const _0x4312ec=a140_0x2384;!a140_0x241efa[_0x4312ec(0xa5)](_0x42412b)&&(a140_0x241efa[_0x4312ec(0xac)](_0x42412b,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x42412b));}export function validateSecureFilePermissions(_0x1e04b2){const _0x515314=a140_0x2384;try{const _0x1465ba=a140_0x241efa[_0x515314(0xa8)](_0x1e04b2),_0x406d83=_0x1465ba['mode']&0x1ff,_0x257f37=(_0x406d83&0x3f)!==0x0;if(_0x257f37)return console[_0x515314(0x99)](_0x515314(0xa6)+_0x1e04b2+'\x20has\x20insecure\x20permissions\x20('+_0x406d83[_0x515314(0xa4)](0x8)+_0x515314(0xa1)+_0x515314(0x9e)),![];return!![];}catch{return!![];}}function a140_0x2384(_0x5b697c,_0xbc3d95){_0x5b697c=_0x5b697c-0x98;const _0x27eacb=a140_0x27ea();let _0x2384a6=_0x27eacb[_0x5b697c];return _0x2384a6;}export function writeSecureFile(_0x41ea94,_0x19e5bd){const _0x80976=a140_0x2384,_0x618e4f=a140_0xd55114[_0x80976(0xaa)](_0x41ea94);createSecureDirectory(_0x618e4f),a140_0x241efa[_0x80976(0xad)](_0x41ea94,_0x19e5bd,{'mode':0x180}),setSecureFilePermissions(_0x41ea94);}
@@ -1 +1 @@
1
- (function(_0x71c309,_0x11f24f){const _0x2b2c0d=a141_0x46f1,_0x53ccc3=_0x71c309();while(!![]){try{const _0x93f50a=parseInt(_0x2b2c0d(0x12f))/0x1+parseInt(_0x2b2c0d(0x12d))/0x2*(parseInt(_0x2b2c0d(0x13d))/0x3)+parseInt(_0x2b2c0d(0x135))/0x4+-parseInt(_0x2b2c0d(0x130))/0x5+-parseInt(_0x2b2c0d(0x136))/0x6*(parseInt(_0x2b2c0d(0x141))/0x7)+parseInt(_0x2b2c0d(0x137))/0x8*(parseInt(_0x2b2c0d(0x13a))/0x9)+parseInt(_0x2b2c0d(0x140))/0xa;if(_0x93f50a===_0x11f24f)break;else _0x53ccc3['push'](_0x53ccc3['shift']());}catch(_0x2d2bd2){_0x53ccc3['push'](_0x53ccc3['shift']());}}}(a141_0x2f1f,0xd5899));import{readFile}from'fs/promises';function a141_0x46f1(_0x39bb07,_0x24408b){_0x39bb07=_0x39bb07-0x12a;const _0x2f1ffe=a141_0x2f1f();let _0x46f17d=_0x2f1ffe[_0x39bb07];return _0x46f17d;}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x24ee2c,_0x2b4b9e){const _0x476f2c=a141_0x46f1;try{if(_0x2b4b9e){const _0x1e72c2=await readFile(_0x24ee2c,'utf-8');try{return JSON['parse'](_0x1e72c2);}catch(_0x38492c){throw new SDKError(ErrorCode[_0x476f2c(0x139)],_0x476f2c(0x132)+_0x24ee2c+_0x476f2c(0x13e)+(_0x38492c instanceof Error?_0x38492c[_0x476f2c(0x12b)]:String(_0x38492c)));}}else try{return JSON[_0x476f2c(0x12c)](_0x24ee2c);}catch(_0x192d66){throw new SDKError(ErrorCode[_0x476f2c(0x139)],_0x476f2c(0x131)+(_0x192d66 instanceof Error?_0x192d66[_0x476f2c(0x12b)]:String(_0x192d66)));}}catch(_0x407fb2){if(_0x407fb2 instanceof SDKError)throw _0x407fb2;if(_0x407fb2 instanceof Error&&'code'in _0x407fb2){const _0x5f2c55=_0x407fb2;if(_0x5f2c55[_0x476f2c(0x13c)]==='ENOENT')throw new SDKError(ErrorCode[_0x476f2c(0x12a)],_0x476f2c(0x13f)+_0x24ee2c);else{if(_0x5f2c55[_0x476f2c(0x13c)]==='EACCES')throw new SDKError(ErrorCode[_0x476f2c(0x12e)],_0x476f2c(0x134)+_0x24ee2c);}}throw new SDKError(ErrorCode[_0x476f2c(0x133)],_0x476f2c(0x13b)+(_0x407fb2 instanceof Error?_0x407fb2['message']:String(_0x407fb2)));}}export async function loadJSONFromOptions(_0x45dfbd,_0xbf34d7){const _0x1f96ab=a141_0x46f1;if(_0x45dfbd&&_0xbf34d7)throw new SDKError(ErrorCode[_0x1f96ab(0x139)],_0x1f96ab(0x138));if(_0x45dfbd)return await loadJSON(_0x45dfbd,![]);if(_0xbf34d7)return await loadJSON(_0xbf34d7,!![]);return undefined;}function a141_0x2f1f(){const _0x4b4318=['message','parse','1047636kTTpLg','PERMISSION_DENIED','301797xPlCKB','4640035wOgkhf','Invalid\x20JSON\x20string:\x20','Invalid\x20JSON\x20in\x20file\x20\x27','INTERNAL','Permission\x20denied\x20reading\x20file:\x20','2640032fCxDxC','6AvrnOh','40Fgusnu','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','INVALID_ARGUMENT','2225871bnlpno','Failed\x20to\x20load\x20JSON:\x20','code','6VYcIgk','\x27:\x20','File\x20not\x20found:\x20','800150aMawub','10663765iswxWk','NOT_FOUND'];a141_0x2f1f=function(){return _0x4b4318;};return a141_0x2f1f();}
1
+ function a141_0x1a29(_0x331b05,_0x242076){_0x331b05=_0x331b05-0x1c7;const _0x4148a8=a141_0x4148();let _0x1a294a=_0x4148a8[_0x331b05];return _0x1a294a;}(function(_0x2b9fe0,_0x3b9449){const _0x30dbc1=a141_0x1a29,_0x43b0e2=_0x2b9fe0();while(!![]){try{const _0x29a759=parseInt(_0x30dbc1(0x1cd))/0x1*(parseInt(_0x30dbc1(0x1cb))/0x2)+parseInt(_0x30dbc1(0x1dc))/0x3*(parseInt(_0x30dbc1(0x1d2))/0x4)+parseInt(_0x30dbc1(0x1d9))/0x5+-parseInt(_0x30dbc1(0x1cf))/0x6+parseInt(_0x30dbc1(0x1d5))/0x7+-parseInt(_0x30dbc1(0x1c8))/0x8+parseInt(_0x30dbc1(0x1da))/0x9;if(_0x29a759===_0x3b9449)break;else _0x43b0e2['push'](_0x43b0e2['shift']());}catch(_0x56556b){_0x43b0e2['push'](_0x43b0e2['shift']());}}}(a141_0x4148,0xd50ce));import{readFile}from'fs/promises';function a141_0x4148(){const _0x393a2b=['parse','3hjqPgE','code','13348432fLXkjv','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','\x27:\x20','1330BCGvYG','NOT_FOUND','1377BZegkD','Failed\x20to\x20load\x20JSON:\x20','8947320SHGJrm','Permission\x20denied\x20reading\x20file:\x20','Invalid\x20JSON\x20in\x20file\x20\x27','4829644zdGbfD','INTERNAL','PERMISSION_DENIED','2251088ODBMAs','utf-8','EACCES','INVALID_ARGUMENT','3873305sLNAFD','7317603UwPmZU'];a141_0x4148=function(){return _0x393a2b;};return a141_0x4148();}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x1acb23,_0x4e8f77){const _0x3c6e80=a141_0x1a29;try{if(_0x4e8f77){const _0x5b3aa8=await readFile(_0x1acb23,_0x3c6e80(0x1d6));try{return JSON[_0x3c6e80(0x1db)](_0x5b3aa8);}catch(_0x58b9d6){throw new SDKError(ErrorCode[_0x3c6e80(0x1d8)],_0x3c6e80(0x1d1)+_0x1acb23+_0x3c6e80(0x1ca)+(_0x58b9d6 instanceof Error?_0x58b9d6['message']:String(_0x58b9d6)));}}else try{return JSON[_0x3c6e80(0x1db)](_0x1acb23);}catch(_0x463ef8){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20JSON\x20string:\x20'+(_0x463ef8 instanceof Error?_0x463ef8['message']:String(_0x463ef8)));}}catch(_0x130f9f){if(_0x130f9f instanceof SDKError)throw _0x130f9f;if(_0x130f9f instanceof Error&&_0x3c6e80(0x1c7)in _0x130f9f){const _0x2e0719=_0x130f9f;if(_0x2e0719[_0x3c6e80(0x1c7)]==='ENOENT')throw new SDKError(ErrorCode[_0x3c6e80(0x1cc)],'File\x20not\x20found:\x20'+_0x1acb23);else{if(_0x2e0719['code']===_0x3c6e80(0x1d7))throw new SDKError(ErrorCode[_0x3c6e80(0x1d4)],_0x3c6e80(0x1d0)+_0x1acb23);}}throw new SDKError(ErrorCode[_0x3c6e80(0x1d3)],_0x3c6e80(0x1ce)+(_0x130f9f instanceof Error?_0x130f9f['message']:String(_0x130f9f)));}}export async function loadJSONFromOptions(_0x16c434,_0x58b9b3){const _0x24b550=a141_0x1a29;if(_0x16c434&&_0x58b9b3)throw new SDKError(ErrorCode[_0x24b550(0x1d8)],_0x24b550(0x1c9));if(_0x16c434)return await loadJSON(_0x16c434,![]);if(_0x58b9b3)return await loadJSON(_0x58b9b3,!![]);return undefined;}
@@ -1 +1 @@
1
- function a142_0x5f5a(_0xf442a1,_0x117e2b){_0xf442a1=_0xf442a1-0x6a;const _0x410f73=a142_0x410f();let _0x5f5a77=_0x410f73[_0xf442a1];return _0x5f5a77;}(function(_0x13049a,_0x108788){const _0x3907b0=a142_0x5f5a,_0x2877e1=_0x13049a();while(!![]){try{const _0xe003e6=parseInt(_0x3907b0(0x78))/0x1*(parseInt(_0x3907b0(0x71))/0x2)+parseInt(_0x3907b0(0x70))/0x3*(parseInt(_0x3907b0(0x79))/0x4)+-parseInt(_0x3907b0(0x77))/0x5*(-parseInt(_0x3907b0(0x76))/0x6)+-parseInt(_0x3907b0(0x6f))/0x7+parseInt(_0x3907b0(0x6b))/0x8*(parseInt(_0x3907b0(0x74))/0x9)+parseInt(_0x3907b0(0x6c))/0xa+-parseInt(_0x3907b0(0x6d))/0xb*(parseInt(_0x3907b0(0x73))/0xc);if(_0xe003e6===_0x108788)break;else _0x2877e1['push'](_0x2877e1['shift']());}catch(_0x2e9461){_0x2877e1['push'](_0x2877e1['shift']());}}}(a142_0x410f,0x7fb9b));export function validateLimitOption(_0x9097ea){const _0x4b4f82=a142_0x5f5a;if(!Number[_0x4b4f82(0x6a)](_0x9097ea))return{'isValid':![],'error':_0x4b4f82(0x6e)+_0x9097ea+'.\x20Must\x20be\x20an\x20integer.'};if(_0x9097ea<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x9097ea+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x9097ea};}export function validateTimeoutOption(_0xf572ce,_0x2f86fd=0x1e){const _0x2cb849=a142_0x5f5a;if(_0xf572ce===undefined)return{'isValid':!![],'value':_0x2f86fd};const _0xd69606=typeof _0xf572ce==='number'?_0xf572ce:parseFloat(_0xf572ce);if(isNaN(_0xd69606))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0xf572ce+'.\x20Must\x20be\x20a\x20number.'};if(_0xd69606<=0x0)return{'isValid':![],'error':_0x2cb849(0x72)+_0xd69606+_0x2cb849(0x75)};return{'isValid':!![],'value':_0xd69606};}function a142_0x410f(){const _0x5a7ce9=['8580yMrXMT','150ABDHto','271663BbtDAH','4Ajhlrs','isInteger','3291128VmlugF','5542930oXfTQB','2662286ckhtEz','Invalid\x20limit\x20value:\x20','6384938xEXlJS','376239uupbcF','4JopTqb','Invalid\x20timeout\x20value:\x20','12pdfWDj','9sXEdwQ','.\x20Must\x20be\x20a\x20positive\x20number.'];a142_0x410f=function(){return _0x5a7ce9;};return a142_0x410f();}
1
+ function a142_0x109a(_0x514a44,_0x10d1d8){_0x514a44=_0x514a44-0xe0;const _0x2c33ce=a142_0x2c33();let _0x109a2a=_0x2c33ce[_0x514a44];return _0x109a2a;}(function(_0x12177f,_0x88db70){const _0x1e20cb=a142_0x109a,_0x5d2810=_0x12177f();while(!![]){try{const _0x183a55=parseInt(_0x1e20cb(0xe2))/0x1*(-parseInt(_0x1e20cb(0xe1))/0x2)+-parseInt(_0x1e20cb(0xe4))/0x3*(parseInt(_0x1e20cb(0xf0))/0x4)+-parseInt(_0x1e20cb(0xee))/0x5+-parseInt(_0x1e20cb(0xe3))/0x6+-parseInt(_0x1e20cb(0xed))/0x7+parseInt(_0x1e20cb(0xe6))/0x8*(parseInt(_0x1e20cb(0xe0))/0x9)+-parseInt(_0x1e20cb(0xef))/0xa*(-parseInt(_0x1e20cb(0xe9))/0xb);if(_0x183a55===_0x88db70)break;else _0x5d2810['push'](_0x5d2810['shift']());}catch(_0x3a4183){_0x5d2810['push'](_0x5d2810['shift']());}}}(a142_0x2c33,0x8c10a));export function validateLimitOption(_0x24ac8e){const _0x185030=a142_0x109a;if(!Number[_0x185030(0xe7)](_0x24ac8e))return{'isValid':![],'error':_0x185030(0xea)+_0x24ac8e+_0x185030(0xe8)};if(_0x24ac8e<=0x0)return{'isValid':![],'error':_0x185030(0xea)+_0x24ac8e+_0x185030(0xec)};return{'isValid':!![],'value':_0x24ac8e};}export function validateTimeoutOption(_0x58b5d3,_0xbfd410=0x1e){const _0x44cb61=a142_0x109a;if(_0x58b5d3===undefined)return{'isValid':!![],'value':_0xbfd410};const _0x344264=typeof _0x58b5d3===_0x44cb61(0xeb)?_0x58b5d3:parseFloat(_0x58b5d3);if(isNaN(_0x344264))return{'isValid':![],'error':_0x44cb61(0xe5)+_0x58b5d3+'.\x20Must\x20be\x20a\x20number.'};if(_0x344264<=0x0)return{'isValid':![],'error':_0x44cb61(0xe5)+_0x344264+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x344264};}function a142_0x2c33(){const _0x2414d0=['3FSksJK','Invalid\x20timeout\x20value:\x20','2312IGXJUi','isInteger','.\x20Must\x20be\x20an\x20integer.','962797RnkXST','Invalid\x20limit\x20value:\x20','number','.\x20Must\x20be\x20a\x20positive\x20integer.','5232108gMvUOX','3656795KajCtX','400JIgoIO','2043676vvMQDw','4887mxoCNn','685766xJZaBS','3DGGDrg','395580gtasNd'];a142_0x2c33=function(){return _0x2414d0;};return a142_0x2c33();}
@@ -1 +1 @@
1
- function a143_0x4a78(){const _0x22539e=['140IPjwna','244744MpxFCl','1476423TXWsln','0.0.0.0','42888ogVHtI','EADDRINUSE','code','once','listening','3665776mpchJa','5192052ZoiBOo','44tVciwb','No\x20available\x20port\x20found\x20between\x20','error','2209955aQNTHy','2090604NuaYQT'];a143_0x4a78=function(){return _0x22539e;};return a143_0x4a78();}(function(_0x442ca0,_0xb9c520){const _0x205d57=a143_0x4961,_0x8ac71e=_0x442ca0();while(!![]){try{const _0x573209=-parseInt(_0x205d57(0x7c))/0x1*(parseInt(_0x205d57(0x83))/0x2)+-parseInt(_0x205d57(0x77))/0x3+parseInt(_0x205d57(0x81))/0x4+-parseInt(_0x205d57(0x86))/0x5+parseInt(_0x205d57(0x82))/0x6+-parseInt(_0x205d57(0x78))/0x7*(-parseInt(_0x205d57(0x79))/0x8)+parseInt(_0x205d57(0x7a))/0x9;if(_0x573209===_0xb9c520)break;else _0x8ac71e['push'](_0x8ac71e['shift']());}catch(_0x1c75c6){_0x8ac71e['push'](_0x8ac71e['shift']());}}}(a143_0x4a78,0x740a2));function a143_0x4961(_0x511c6d,_0x565ff8){_0x511c6d=_0x511c6d-0x77;const _0x4a7820=a143_0x4a78();let _0x496103=_0x4a7820[_0x511c6d];return _0x496103;}import{createServer}from'node:net';export async function isPortAvailable(_0x5a601f){return new Promise(_0xf72ff8=>{const _0x255fe0=a143_0x4961,_0x2b9fb9=createServer();_0x2b9fb9[_0x255fe0(0x7f)](_0x255fe0(0x85),_0x142753=>{const _0x5d2ef5=_0x255fe0;_0x142753[_0x5d2ef5(0x7e)]===_0x5d2ef5(0x7d)?_0xf72ff8(![]):_0xf72ff8(![]);}),_0x2b9fb9[_0x255fe0(0x7f)](_0x255fe0(0x80),()=>{_0x2b9fb9['close'](),_0xf72ff8(!![]);}),_0x2b9fb9['listen'](_0x5a601f,_0x255fe0(0x7b));});}export async function findAvailablePort(_0x2e1d9e=0xfa0,_0xda0925=0x64){const _0x489ac0=a143_0x4961;for(let _0x52f11f=0x0;_0x52f11f<_0xda0925;_0x52f11f++){const _0x1d1602=_0x2e1d9e+_0x52f11f;if(await isPortAvailable(_0x1d1602))return _0x1d1602;}throw new Error(_0x489ac0(0x84)+_0x2e1d9e+'\x20and\x20'+(_0x2e1d9e+_0xda0925-0x1));}
1
+ (function(_0x4f41f5,_0x1f6e03){const _0xadef62=a143_0x5ab5,_0x1769f6=_0x4f41f5();while(!![]){try{const _0x29cd52=parseInt(_0xadef62(0x12d))/0x1*(parseInt(_0xadef62(0x127))/0x2)+-parseInt(_0xadef62(0x125))/0x3+-parseInt(_0xadef62(0x124))/0x4+-parseInt(_0xadef62(0x11e))/0x5+parseInt(_0xadef62(0x123))/0x6*(parseInt(_0xadef62(0x120))/0x7)+-parseInt(_0xadef62(0x12a))/0x8+-parseInt(_0xadef62(0x122))/0x9*(-parseInt(_0xadef62(0x126))/0xa);if(_0x29cd52===_0x1f6e03)break;else _0x1769f6['push'](_0x1769f6['shift']());}catch(_0x16f8d4){_0x1769f6['push'](_0x1769f6['shift']());}}}(a143_0x3cdf,0x58777));import{createServer}from'node:net';function a143_0x3cdf(){const _0x599ad5=['once','listening','6195YQzZHd','31490BMGNSw','EADDRINUSE','134491TZNLFB','code','5256135CsIsoE','6wqxpTD','2670880VzCtQN','1740927fpOzhR','30XCxhFt','74WXBaLO','\x20and\x20','0.0.0.0','3070296RDJTpd'];a143_0x3cdf=function(){return _0x599ad5;};return a143_0x3cdf();}function a143_0x5ab5(_0x5d987f,_0x4ffee5){_0x5d987f=_0x5d987f-0x11e;const _0x3cdf2d=a143_0x3cdf();let _0x5ab5ed=_0x3cdf2d[_0x5d987f];return _0x5ab5ed;}export async function isPortAvailable(_0x7a6b68){return new Promise(_0x22f6df=>{const _0x4e62d1=a143_0x5ab5,_0x7bfaef=createServer();_0x7bfaef[_0x4e62d1(0x12b)]('error',_0x338197=>{const _0x36e465=_0x4e62d1;_0x338197[_0x36e465(0x121)]===_0x36e465(0x11f)?_0x22f6df(![]):_0x22f6df(![]);}),_0x7bfaef[_0x4e62d1(0x12b)](_0x4e62d1(0x12c),()=>{_0x7bfaef['close'](),_0x22f6df(!![]);}),_0x7bfaef['listen'](_0x7a6b68,_0x4e62d1(0x129));});}export async function findAvailablePort(_0x2526a0=0xfa0,_0x37f9ed=0x64){const _0x3ecc1a=a143_0x5ab5;for(let _0x5b5d56=0x0;_0x5b5d56<_0x37f9ed;_0x5b5d56++){const _0x439b9e=_0x2526a0+_0x5b5d56;if(await isPortAvailable(_0x439b9e))return _0x439b9e;}throw new Error('No\x20available\x20port\x20found\x20between\x20'+_0x2526a0+_0x3ecc1a(0x128)+(_0x2526a0+_0x37f9ed-0x1));}
@@ -1 +1 @@
1
- const a144_0x4396d2=a144_0x4bec;(function(_0x41191b,_0x41a063){const _0x953afc=a144_0x4bec,_0x5e8c46=_0x41191b();while(!![]){try{const _0x41c7f0=-parseInt(_0x953afc(0x1ed))/0x1+-parseInt(_0x953afc(0x202))/0x2*(-parseInt(_0x953afc(0x21e))/0x3)+-parseInt(_0x953afc(0x213))/0x4+parseInt(_0x953afc(0x1fb))/0x5*(parseInt(_0x953afc(0x209))/0x6)+parseInt(_0x953afc(0x21c))/0x7*(-parseInt(_0x953afc(0x1fd))/0x8)+-parseInt(_0x953afc(0x1f5))/0x9*(parseInt(_0x953afc(0x1f0))/0xa)+-parseInt(_0x953afc(0x20b))/0xb*(-parseInt(_0x953afc(0x225))/0xc);if(_0x41c7f0===_0x41a063)break;else _0x5e8c46['push'](_0x5e8c46['shift']());}catch(_0x5ebb69){_0x5e8c46['push'](_0x5e8c46['shift']());}}}(a144_0x543b,0x452f6));import{execSync,spawn}from'node:child_process';function a144_0x4bec(_0x2a8bd4,_0x22b326){_0x2a8bd4=_0x2a8bd4-0x1ed;const _0x543b1b=a144_0x543b();let _0x4bece9=_0x543b1b[_0x2a8bd4];return _0x4bece9;}const SHELL_NAMES=new Set([a144_0x4396d2(0x21a),a144_0x4396d2(0x201),'sh','fish',a144_0x4396d2(0x1f7),a144_0x4396d2(0x20a),a144_0x4396d2(0x1fe),'dash',a144_0x4396d2(0x208),a144_0x4396d2(0x21f),'nu','ion',a144_0x4396d2(0x20e),a144_0x4396d2(0x1f8)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude',a144_0x4396d2(0x1f4),a144_0x4396d2(0x20c)]);function getProcessInfoWindows(_0x81d1b6){const _0x3b7bd4=a144_0x4396d2;try{if(!Number[_0x3b7bd4(0x1fc)](_0x81d1b6)||_0x81d1b6<=0x0)return null;const _0x181b6f=_0x3b7bd4(0x207)+_0x81d1b6+_0x3b7bd4(0x1f3),_0x4eef2d=execSync('powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22'+_0x181b6f+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':[_0x3b7bd4(0x217),_0x3b7bd4(0x217),_0x3b7bd4(0x217)]})[_0x3b7bd4(0x1ef)]();if(!_0x4eef2d)return null;const [_0x35459c,..._0x40941b]=_0x4eef2d[_0x3b7bd4(0x223)](','),_0x4cd401=parseInt(_0x35459c,0xa),_0x4d9ba8=_0x40941b[_0x3b7bd4(0x21b)](',')[_0x3b7bd4(0x1ef)]();if(isNaN(_0x4cd401)||!_0x4d9ba8)return null;return{'pid':_0x81d1b6,'ppid':_0x4cd401,'comm':_0x4d9ba8['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x1492c2){const _0x365531=a144_0x4396d2;try{const _0x442dcb=0x400000;if(!Number['isInteger'](_0x1492c2)||_0x1492c2<=0x0||_0x1492c2>_0x442dcb)return null;const _0x2e977d=execSync(_0x365531(0x212)+_0x1492c2+'\x20-o\x20ppid=,comm=',{'encoding':'utf-8','stdio':_0x365531(0x217)})[_0x365531(0x1ef)](),[_0x484846,..._0x14c4ac]=_0x2e977d['split'](/\s+/),_0x246ef7=parseInt(_0x484846,0xa),_0x13cc09=_0x14c4ac[_0x365531(0x21b)]('\x20');if(isNaN(_0x246ef7))return null;return{'pid':_0x1492c2,'ppid':_0x246ef7,'comm':_0x13cc09};}catch{return null;}}function getProcessInfo(_0x1c90c8){const _0x29a3f8=a144_0x4396d2;if(process[_0x29a3f8(0x214)]==='win32')return getProcessInfoWindows(_0x1c90c8);return getProcessInfoPosix(_0x1c90c8);}function getBasename(_0x111dee){const _0x5ea946=a144_0x4396d2;return _0x111dee[_0x5ea946(0x1f1)](/^-/,'')[_0x5ea946(0x223)]('/')[_0x5ea946(0x20f)]()?.[_0x5ea946(0x215)]()||'';}function isShell(_0x3f860d){const _0x2d6aad=a144_0x4396d2;return SHELL_NAMES[_0x2d6aad(0x200)](getBasename(_0x3f860d));}function isEphemeralShellSpawner(_0x24553f){const _0x3e00da=a144_0x4396d2;return EPHEMERAL_SHELL_SPAWNERS[_0x3e00da(0x200)](getBasename(_0x24553f));}let cachedShellPID;function findShellPID(){const _0x3fc24c=a144_0x4396d2;if(process[_0x3fc24c(0x220)]===undefined)return process[_0x3fc24c(0x21d)];let _0x1e9e63=process['ppid'];const _0x447d6e=0xa;let _0x3a8ec4=0x0;while(_0x3a8ec4<_0x447d6e){const _0x2a7a9f=getProcessInfo(_0x1e9e63);if(!_0x2a7a9f)break;if(isShell(_0x2a7a9f[_0x3fc24c(0x1ee)])){const _0xb2c94c=getProcessInfo(_0x2a7a9f['ppid']);if(_0xb2c94c&&isEphemeralShellSpawner(_0xb2c94c['comm'])){_0x1e9e63=_0x2a7a9f[_0x3fc24c(0x220)],_0x3a8ec4++;continue;}return _0x2a7a9f[_0x3fc24c(0x21d)];}if(_0x2a7a9f[_0x3fc24c(0x220)]===0x0||_0x2a7a9f[_0x3fc24c(0x220)]===0x1){if(isShell(_0x2a7a9f[_0x3fc24c(0x1ee)]))return _0x2a7a9f['pid'];break;}_0x1e9e63=_0x2a7a9f['ppid'],_0x3a8ec4++;}return process[_0x3fc24c(0x220)]!==undefined?process['ppid']:process[_0x3fc24c(0x21d)];}function a144_0x543b(){const _0xf744=['comm','trim','169010aWlkIc','replace','data','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','code','207onaFzT','xdg-open','ksh','xonsh','exit','href','114575qqknlO','isInteger','224miXQKI','csh','open','has','zsh','565496KWuERo','ignore','darwin','kill','test','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','pwsh','6moZcSF','tcsh','13367211FhBLJN','cursor','toString','elvish','pop','start','Unsupported\x20protocol:\x20','ps\x20-p\x20','1370184YFhxOH','platform','toLowerCase','win32','pipe','protocol','stderr','bash','join','39802oppSUe','pid','3qbfUjZ','powershell','ppid','map','unref','split','cmd.exe','12KSNXzm','347005jSYynf'];a144_0x543b=function(){return _0xf744;};return a144_0x543b();}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x4dfc5f){const _0x3c089e=a144_0x4396d2;if(!Number[_0x3c089e(0x1fc)](_0x4dfc5f)||_0x4dfc5f<=0x0)return![];try{return process[_0x3c089e(0x205)](_0x4dfc5f,0x0),!![];}catch{return![];}}export function openBrowser(_0xe7ce93){const _0x34ab9d=a144_0x4396d2;let _0xff94a2;try{_0xff94a2=new URL(_0xe7ce93);}catch{throw new Error('Invalid\x20URL:\x20'+_0xe7ce93);}if(_0xff94a2[_0x34ab9d(0x218)]!=='http:'&&_0xff94a2['protocol']!=='https:')throw new Error(_0x34ab9d(0x211)+_0xff94a2['protocol']);const _0x272d12=_0xff94a2[_0x34ab9d(0x1fa)],_0x3a6b98=process[_0x34ab9d(0x214)];if(_0x3a6b98==='win32')spawn(_0x34ab9d(0x224),['/c',_0x34ab9d(0x210),'',_0x272d12],{'detached':!![],'stdio':_0x34ab9d(0x203)})[_0x34ab9d(0x222)]();else{const _0x5b1de5=_0x3a6b98===_0x34ab9d(0x204)?_0x34ab9d(0x1ff):_0x34ab9d(0x1f6);spawn(_0x5b1de5,[_0x272d12],{'detached':!![],'stdio':_0x34ab9d(0x203)})['unref']();}}export function isWindows(){const _0x59f4c7=a144_0x4396d2;return process['platform']===_0x59f4c7(0x216);}export function getCrossSpawnOptions(_0x2b0ce8){return{..._0x2b0ce8??{},'shell':isWindows()};}export function escapeWindowsArg(_0x26bcff){const _0xb8822=a144_0x4396d2;if(!/[ \t"&|<>^%!`\r\n]/[_0xb8822(0x206)](_0x26bcff))return _0x26bcff;const _0x2b7ccb=_0x26bcff['replace'](/"/g,'\x22\x22');return'\x22'+_0x2b7ccb+'\x22';}export function crossSpawn(_0x1ae3d6,_0xf757aa,_0x4811c1){const _0x119f77=a144_0x4396d2;if(isWindows()){const _0x3f37f7=escapeWindowsArg(_0x1ae3d6),_0x2f1a27=_0xf757aa[_0x119f77(0x221)](escapeWindowsArg),_0x4a70c4=[_0x3f37f7,..._0x2f1a27]['join']('\x20');return spawn(_0x4a70c4,[],{..._0x4811c1,'shell':!![]});}return spawn(_0x1ae3d6,_0xf757aa,{..._0x4811c1,'shell':![]});}export function findExecutable(_0xf91898,_0x27d6fe=0x1388){return new Promise(_0x493d07=>{const _0x34ff77=a144_0x4bec,_0xfea5a0=isWindows()?'where.exe':'which';let _0x2451a1=![];const _0x272134=crossSpawn(_0xfea5a0,[_0xf91898],{'stdio':_0x34ff77(0x217)}),_0x4d3e3f=setTimeout(()=>{!_0x2451a1&&(_0x2451a1=!![],_0x272134['kill'](),_0x493d07(null));},_0x27d6fe);let _0x5e9e71='';_0x272134['stdout']?.['on'](_0x34ff77(0x1f2),_0x473c1e=>{const _0x4e2e27=_0x34ff77;_0x5e9e71+=_0x473c1e[_0x4e2e27(0x20d)]();}),_0x272134[_0x34ff77(0x219)]?.['on'](_0x34ff77(0x1f2),()=>{}),_0x272134['on'](_0x34ff77(0x1f9),_0x994828=>{const _0x10b2c1=_0x34ff77;if(_0x2451a1)return;_0x2451a1=!![],clearTimeout(_0x4d3e3f);if(_0x994828===0x0&&_0x5e9e71[_0x10b2c1(0x1ef)]()){const _0x4b8f6c=_0x5e9e71[_0x10b2c1(0x1ef)]()[_0x10b2c1(0x223)](/\r?\n/)[0x0];_0x493d07(_0x4b8f6c);}else _0x493d07(null);}),_0x272134['on']('error',()=>{if(_0x2451a1)return;_0x2451a1=!![],clearTimeout(_0x4d3e3f),_0x493d07(null);});});}
1
+ function a144_0x21ec(){const _0x283dd4=['10791GZzCuK','stderr','comm','platform','747mFrWre','has','where.exe','https:','pipe','exit','zsh','code','\x20-o\x20ppid=,comm=','utf-8','isInteger','xdg-open','unref','href','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','stdout','241510cnyITk','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','toLowerCase','320pumEHR','pid','tcsh','open','ps\x20-p\x20','ppid','308ffwSPf','error','elvish','ignore','split','cmd.exe','8465FwXvKq','574MdTJmK','fish','cursor','map','ion','trim','protocol','Invalid\x20URL:\x20','powershell','1991858rJfcNq','ksh','join','win32','Unsupported\x20protocol:\x20','darwin','7614UhSUtm','csh','replace','http:','start','407106klYtxL','1722hDWbyr','data','bash','claude'];a144_0x21ec=function(){return _0x283dd4;};return a144_0x21ec();}const a144_0x2a732e=a144_0x5e66;(function(_0x2825dd,_0xe45160){const _0x40f1f1=a144_0x5e66,_0x67b528=_0x2825dd();while(!![]){try{const _0x503773=parseInt(_0x40f1f1(0x143))/0x1*(parseInt(_0x40f1f1(0x126))/0x2)+parseInt(_0x40f1f1(0x13a))/0x3+parseInt(_0x40f1f1(0x11f))/0x4*(-parseInt(_0x40f1f1(0x125))/0x5)+parseInt(_0x40f1f1(0x135))/0x6*(-parseInt(_0x40f1f1(0x13b))/0x7)+-parseInt(_0x40f1f1(0x119))/0x8*(-parseInt(_0x40f1f1(0x13f))/0x9)+parseInt(_0x40f1f1(0x116))/0xa+parseInt(_0x40f1f1(0x12f))/0xb;if(_0x503773===_0xe45160)break;else _0x67b528['push'](_0x67b528['shift']());}catch(_0x95200d){_0x67b528['push'](_0x67b528['shift']());}}}(a144_0x21ec,0x273e9));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a144_0x2a732e(0x13d),a144_0x2a732e(0x149),'sh',a144_0x2a732e(0x127),a144_0x2a732e(0x130),a144_0x2a732e(0x11b),a144_0x2a732e(0x136),'dash','pwsh',a144_0x2a732e(0x12e),'nu',a144_0x2a732e(0x12a),a144_0x2a732e(0x121),'xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set([a144_0x2a732e(0x13e),a144_0x2a732e(0x10d),a144_0x2a732e(0x128)]);function getProcessInfoWindows(_0xe3d803){const _0x516fd6=a144_0x2a732e;try{if(!Number[_0x516fd6(0x110)](_0xe3d803)||_0xe3d803<=0x0)return null;const _0x4d712e='Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId='+_0xe3d803+_0x516fd6(0x117),_0x5402e8=execSync(_0x516fd6(0x114)+_0x4d712e+'\x22',{'encoding':_0x516fd6(0x10f),'windowsHide':!![],'stdio':[_0x516fd6(0x147),_0x516fd6(0x147),'pipe']})[_0x516fd6(0x12b)]();if(!_0x5402e8)return null;const [_0x37c06d,..._0x26cd5b]=_0x5402e8[_0x516fd6(0x123)](','),_0x24074f=parseInt(_0x37c06d,0xa),_0x575d84=_0x26cd5b[_0x516fd6(0x131)](',')[_0x516fd6(0x12b)]();if(isNaN(_0x24074f)||!_0x575d84)return null;return{'pid':_0xe3d803,'ppid':_0x24074f,'comm':_0x575d84[_0x516fd6(0x137)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x534a77){const _0x3151bf=a144_0x2a732e;try{const _0x520fb1=0x400000;if(!Number[_0x3151bf(0x110)](_0x534a77)||_0x534a77<=0x0||_0x534a77>_0x520fb1)return null;const _0x252509=execSync(_0x3151bf(0x11d)+_0x534a77+_0x3151bf(0x10e),{'encoding':_0x3151bf(0x10f),'stdio':_0x3151bf(0x147)})[_0x3151bf(0x12b)](),[_0x188f2e,..._0x4d78a1]=_0x252509['split'](/\s+/),_0x4e61b4=parseInt(_0x188f2e,0xa),_0x23c46e=_0x4d78a1[_0x3151bf(0x131)]('\x20');if(isNaN(_0x4e61b4))return null;return{'pid':_0x534a77,'ppid':_0x4e61b4,'comm':_0x23c46e};}catch{return null;}}function getProcessInfo(_0x11d608){const _0x1632b7=a144_0x2a732e;if(process[_0x1632b7(0x142)]==='win32')return getProcessInfoWindows(_0x11d608);return getProcessInfoPosix(_0x11d608);}function a144_0x5e66(_0x277f02,_0x301c17){_0x277f02=_0x277f02-0x10d;const _0x21ec36=a144_0x21ec();let _0x5e6633=_0x21ec36[_0x277f02];return _0x5e6633;}function getBasename(_0x4dac7a){const _0x5368e3=a144_0x2a732e;return _0x4dac7a[_0x5368e3(0x137)](/^-/,'')[_0x5368e3(0x123)]('/')['pop']()?.[_0x5368e3(0x118)]()||'';}function isShell(_0x3a0bdc){return SHELL_NAMES['has'](getBasename(_0x3a0bdc));}function isEphemeralShellSpawner(_0xa85e13){const _0x385bee=a144_0x2a732e;return EPHEMERAL_SHELL_SPAWNERS[_0x385bee(0x144)](getBasename(_0xa85e13));}let cachedShellPID;function findShellPID(){const _0x220c25=a144_0x2a732e;if(process[_0x220c25(0x11e)]===undefined)return process['pid'];let _0x2a8818=process[_0x220c25(0x11e)];const _0x3c6eba=0xa;let _0x571d09=0x0;while(_0x571d09<_0x3c6eba){const _0x55bcd9=getProcessInfo(_0x2a8818);if(!_0x55bcd9)break;if(isShell(_0x55bcd9[_0x220c25(0x141)])){const _0x3a2fe7=getProcessInfo(_0x55bcd9['ppid']);if(_0x3a2fe7&&isEphemeralShellSpawner(_0x3a2fe7[_0x220c25(0x141)])){_0x2a8818=_0x55bcd9[_0x220c25(0x11e)],_0x571d09++;continue;}return _0x55bcd9[_0x220c25(0x11a)];}if(_0x55bcd9[_0x220c25(0x11e)]===0x0||_0x55bcd9[_0x220c25(0x11e)]===0x1){if(isShell(_0x55bcd9[_0x220c25(0x141)]))return _0x55bcd9[_0x220c25(0x11a)];break;}_0x2a8818=_0x55bcd9[_0x220c25(0x11e)],_0x571d09++;}return process['ppid']!==undefined?process[_0x220c25(0x11e)]:process[_0x220c25(0x11a)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x199a24){if(!Number['isInteger'](_0x199a24)||_0x199a24<=0x0)return![];try{return process['kill'](_0x199a24,0x0),!![];}catch{return![];}}export function openBrowser(_0x237859){const _0x18154c=a144_0x2a732e;let _0x168e4d;try{_0x168e4d=new URL(_0x237859);}catch{throw new Error(_0x18154c(0x12d)+_0x237859);}if(_0x168e4d[_0x18154c(0x12c)]!==_0x18154c(0x138)&&_0x168e4d[_0x18154c(0x12c)]!==_0x18154c(0x146))throw new Error(_0x18154c(0x133)+_0x168e4d[_0x18154c(0x12c)]);const _0x4b0660=_0x168e4d[_0x18154c(0x113)],_0x52bdc8=process[_0x18154c(0x142)];if(_0x52bdc8==='win32')spawn(_0x18154c(0x124),['/c',_0x18154c(0x139),'',_0x4b0660],{'detached':!![],'stdio':_0x18154c(0x122)})['unref']();else{const _0x2f87ac=_0x52bdc8===_0x18154c(0x134)?_0x18154c(0x11c):_0x18154c(0x111);spawn(_0x2f87ac,[_0x4b0660],{'detached':!![],'stdio':'ignore'})[_0x18154c(0x112)]();}}export function isWindows(){const _0x551648=a144_0x2a732e;return process[_0x551648(0x142)]===_0x551648(0x132);}export function getCrossSpawnOptions(_0x202ba3){return{..._0x202ba3??{},'shell':isWindows()};}export function escapeWindowsArg(_0x55e85c){if(!/[ \t"&|<>^%!`\r\n]/['test'](_0x55e85c))return _0x55e85c;const _0x264b01=_0x55e85c['replace'](/"/g,'\x22\x22');return'\x22'+_0x264b01+'\x22';}export function crossSpawn(_0x1f9df3,_0xf3319b,_0x56ee3b){const _0x1d615c=a144_0x2a732e;if(isWindows()){const _0x121dea=escapeWindowsArg(_0x1f9df3),_0x1bc268=_0xf3319b[_0x1d615c(0x129)](escapeWindowsArg),_0xa0c828=[_0x121dea,..._0x1bc268][_0x1d615c(0x131)]('\x20');return spawn(_0xa0c828,[],{..._0x56ee3b,'shell':!![]});}return spawn(_0x1f9df3,_0xf3319b,{..._0x56ee3b,'shell':![]});}export function findExecutable(_0x40d158,_0x49a61e=0x1388){return new Promise(_0xe0baa5=>{const _0x487d28=a144_0x5e66,_0x2c72df=isWindows()?_0x487d28(0x145):'which';let _0x3ac09b=![];const _0x57d49b=crossSpawn(_0x2c72df,[_0x40d158],{'stdio':'pipe'}),_0x4a6b4d=setTimeout(()=>{!_0x3ac09b&&(_0x3ac09b=!![],_0x57d49b['kill'](),_0xe0baa5(null));},_0x49a61e);let _0x10a436='';_0x57d49b[_0x487d28(0x115)]?.['on'](_0x487d28(0x13c),_0x5eda4a=>{_0x10a436+=_0x5eda4a['toString']();}),_0x57d49b[_0x487d28(0x140)]?.['on'](_0x487d28(0x13c),()=>{}),_0x57d49b['on'](_0x487d28(0x148),_0x2b4818=>{const _0x1858ce=_0x487d28;if(_0x3ac09b)return;_0x3ac09b=!![],clearTimeout(_0x4a6b4d);if(_0x2b4818===0x0&&_0x10a436['trim']()){const _0x54d9cf=_0x10a436[_0x1858ce(0x12b)]()[_0x1858ce(0x123)](/\r?\n/)[0x0];_0xe0baa5(_0x54d9cf);}else _0xe0baa5(null);}),_0x57d49b['on'](_0x487d28(0x120),()=>{if(_0x3ac09b)return;_0x3ac09b=!![],clearTimeout(_0x4a6b4d),_0xe0baa5(null);});});}
@@ -1 +1 @@
1
- function a145_0x1c53(_0x28d81d,_0x5280a2){_0x28d81d=_0x28d81d-0xec;const _0x4a00c1=a145_0x4a00();let _0x1c5316=_0x4a00c1[_0x28d81d];return _0x1c5316;}(function(_0x1403ac,_0x4e5165){const _0x50064c=a145_0x1c53,_0x5b81fd=_0x1403ac();while(!![]){try{const _0x30b570=-parseInt(_0x50064c(0xed))/0x1+-parseInt(_0x50064c(0xfc))/0x2*(-parseInt(_0x50064c(0xfa))/0x3)+parseInt(_0x50064c(0xec))/0x4*(parseInt(_0x50064c(0xff))/0x5)+-parseInt(_0x50064c(0xf9))/0x6+parseInt(_0x50064c(0xf1))/0x7*(-parseInt(_0x50064c(0xf8))/0x8)+-parseInt(_0x50064c(0x102))/0x9+parseInt(_0x50064c(0xef))/0xa;if(_0x30b570===_0x4e5165)break;else _0x5b81fd['push'](_0x5b81fd['shift']());}catch(_0x19a78c){_0x5b81fd['push'](_0x5b81fd['shift']());}}}(a145_0x4a00,0x87bd7));import*as a145_0x1e6a21 from'readline';export async function confirm(_0x5f3882){const _0x390660=a145_0x1c53,_0x1a9b76=a145_0x1e6a21['createInterface']({'input':process['stdin'],'output':process[_0x390660(0xfe)]});return new Promise(_0x129c7f=>{const _0x5d54d7=_0x390660;_0x1a9b76[_0x5d54d7(0xf2)](_0x5f3882+_0x5d54d7(0x103),_0x41f722=>{const _0x38ec62=_0x5d54d7;_0x1a9b76['close'](),_0x129c7f(_0x41f722[_0x38ec62(0xfb)]()==='y'||_0x41f722[_0x38ec62(0xfb)]()===_0x38ec62(0xfd));});});}export async function confirmKey(_0x49dd85){const _0x220a0a=a145_0x1c53;if(!process[_0x220a0a(0xf3)]['isTTY'])return![];return process['stderr'][_0x220a0a(0xf0)](_0x49dd85+_0x220a0a(0xf7)),new Promise(_0x395fe3=>{const _0x1aa3e3=_0x220a0a,_0x41f7ff=process[_0x1aa3e3(0xf3)];_0x41f7ff['setRawMode'](!![]),_0x41f7ff[_0x1aa3e3(0x104)](),_0x41f7ff[_0x1aa3e3(0xee)](_0x1aa3e3(0xf6));const _0x4b3c19=_0x1b8701=>{const _0x115a59=_0x1aa3e3;_0x41f7ff[_0x115a59(0x100)](![]),_0x41f7ff['pause'](),_0x41f7ff['removeListener'](_0x115a59(0xf4),_0x4b3c19);if(_0x1b8701==='\x1b'){process[_0x115a59(0xf5)][_0x115a59(0xf0)]('\x0a'),_0x395fe3(![]);return;}_0x1b8701==='\x03'&&(process[_0x115a59(0xf5)][_0x115a59(0xf0)]('\x0a'),process[_0x115a59(0x101)](0x82));if(_0x1b8701[_0x115a59(0xfb)]()==='y'){process[_0x115a59(0xf5)][_0x115a59(0xf0)]('y\x0a'),_0x395fe3(!![]);return;}process[_0x115a59(0xf5)][_0x115a59(0xf0)]('\x0a'),_0x395fe3(![]);};_0x41f7ff['on'](_0x1aa3e3(0xf4),_0x4b3c19);});}function a145_0x4a00(){const _0x50073e=['utf8','\x20[y/N]\x20','8eaZsIS','6276756VlNihA','757698lAgLDO','toLowerCase','6tltYBf','yes','stdout','62095BYiFqD','setRawMode','exit','7557939qNFmid','\x20(y/N):\x20','resume','20lApAbQ','565204PmyLbX','setEncoding','22096300HLYYrn','write','156317MlMyfA','question','stdin','data','stderr'];a145_0x4a00=function(){return _0x50073e;};return a145_0x4a00();}
1
+ (function(_0x1075ca,_0x2eaa64){const _0x495125=a145_0x122a,_0x5105b8=_0x1075ca();while(!![]){try{const _0x45affe=-parseInt(_0x495125(0x1be))/0x1*(parseInt(_0x495125(0x1c0))/0x2)+parseInt(_0x495125(0x1bf))/0x3+parseInt(_0x495125(0x1c2))/0x4*(parseInt(_0x495125(0x1c8))/0x5)+parseInt(_0x495125(0x1cc))/0x6+-parseInt(_0x495125(0x1c7))/0x7+parseInt(_0x495125(0x1bb))/0x8*(parseInt(_0x495125(0x1b9))/0x9)+parseInt(_0x495125(0x1c6))/0xa*(parseInt(_0x495125(0x1b8))/0xb);if(_0x45affe===_0x2eaa64)break;else _0x5105b8['push'](_0x5105b8['shift']());}catch(_0x5bc9ae){_0x5105b8['push'](_0x5105b8['shift']());}}}(a145_0x18ed,0xebf93));import*as a145_0x282e3c from'readline';export async function confirm(_0x3ceb2a){const _0x41006f=a145_0x122a,_0x283f1f=a145_0x282e3c[_0x41006f(0x1c5)]({'input':process[_0x41006f(0x1c9)],'output':process[_0x41006f(0x1b6)]});return new Promise(_0x19bf13=>{const _0x1b9b71=_0x41006f;_0x283f1f[_0x1b9b71(0x1ca)](_0x3ceb2a+_0x1b9b71(0x1c3),_0x513915=>{const _0x5dfbf6=_0x1b9b71;_0x283f1f[_0x5dfbf6(0x1b7)](),_0x19bf13(_0x513915[_0x5dfbf6(0x1ba)]()==='y'||_0x513915[_0x5dfbf6(0x1ba)]()===_0x5dfbf6(0x1bd));});});}function a145_0x18ed(){const _0x190e18=['11440919FwLPYb','75815XFdSNA','stdin','question','isTTY','10741092fbhDZN','utf8','data','stderr','write','setRawMode','stdout','close','424127iviHLP','441kCSrKi','toLowerCase','155000FfdoOl','pause','yes','89lgudPg','1789851lfIbqQ','29090MAmBVJ','exit','56zDNGQp','\x20(y/N):\x20','setEncoding','createInterface','90TjFhlo'];a145_0x18ed=function(){return _0x190e18;};return a145_0x18ed();}function a145_0x122a(_0x206a03,_0x3d65b9){_0x206a03=_0x206a03-0x1b2;const _0x18ed11=a145_0x18ed();let _0x122af6=_0x18ed11[_0x206a03];return _0x122af6;}export async function confirmKey(_0x5cc40b){const _0x5cce51=a145_0x122a;if(!process[_0x5cce51(0x1c9)][_0x5cce51(0x1cb)])return![];return process[_0x5cce51(0x1b3)][_0x5cce51(0x1b4)](_0x5cc40b+'\x20[y/N]\x20'),new Promise(_0x555dea=>{const _0x1cfeb4=_0x5cce51,_0x5878e4=process[_0x1cfeb4(0x1c9)];_0x5878e4[_0x1cfeb4(0x1b5)](!![]),_0x5878e4['resume'](),_0x5878e4[_0x1cfeb4(0x1c4)](_0x1cfeb4(0x1cd));const _0x1a92b8=_0x5918db=>{const _0x11702f=_0x1cfeb4;_0x5878e4[_0x11702f(0x1b5)](![]),_0x5878e4[_0x11702f(0x1bc)](),_0x5878e4['removeListener']('data',_0x1a92b8);if(_0x5918db==='\x1b'){process[_0x11702f(0x1b3)][_0x11702f(0x1b4)]('\x0a'),_0x555dea(![]);return;}_0x5918db==='\x03'&&(process[_0x11702f(0x1b3)][_0x11702f(0x1b4)]('\x0a'),process[_0x11702f(0x1c1)](0x82));if(_0x5918db[_0x11702f(0x1ba)]()==='y'){process[_0x11702f(0x1b3)]['write']('y\x0a'),_0x555dea(!![]);return;}process[_0x11702f(0x1b3)][_0x11702f(0x1b4)]('\x0a'),_0x555dea(![]);};_0x5878e4['on'](_0x1cfeb4(0x1b2),_0x1a92b8);});}
@@ -1 +1 @@
1
- (function(_0x5827fd,_0x5e70a8){const _0x869871=a146_0x16fc,_0x2729df=_0x5827fd();while(!![]){try{const _0x13b29f=parseInt(_0x869871(0x124))/0x1+-parseInt(_0x869871(0x11d))/0x2*(parseInt(_0x869871(0x123))/0x3)+-parseInt(_0x869871(0x11f))/0x4+-parseInt(_0x869871(0x116))/0x5+-parseInt(_0x869871(0x115))/0x6+parseInt(_0x869871(0x122))/0x7+-parseInt(_0x869871(0x120))/0x8*(-parseInt(_0x869871(0x12b))/0x9);if(_0x13b29f===_0x5e70a8)break;else _0x2729df['push'](_0x2729df['shift']());}catch(_0x338256){_0x2729df['push'](_0x2729df['shift']());}}}(a146_0x251b,0x9aee1));import a146_0x32e4a0 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x1814f8,_0x523316={}){const _0x153ee5=a146_0x16fc,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x523316;return a146_0x32e4a0({'text':_0x1814f8,'color':_0x153ee5(0x128),'stream':process[_0x153ee5(0x117)],'isEnabled':forceEnabled||process[_0x153ee5(0x117)][_0x153ee5(0x12e)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x414808,_0x5c31cd,_0x13a6e7={}){const _0x4b3398=a146_0x16fc,_0x27d7ed=_0x13a6e7[_0x4b3398(0x125)]??(()=>Date[_0x4b3398(0x114)]()),_0x19f580=createCommandSpinner(_0x414808,_0x13a6e7);_0x19f580['start']();const _0x557029=_0x27d7ed();try{const _0x50efda=await _0x5c31cd(),_0x18a2e7=_0x27d7ed()-_0x557029;return _0x19f580[_0x4b3398(0x12d)](),{'data':_0x50efda,'elapsedMs':_0x18a2e7};}catch(_0x4b8968){_0x19f580[_0x4b3398(0x12d)]();throw _0x4b8968;}}export async function withProgressSpinner(_0x998606,_0x5beeb6,_0x484865={}){const _0x8e3542=a146_0x16fc,_0x27e3ec=_0x484865['clock']??(()=>Date[_0x8e3542(0x114)]()),_0x94198a=_0x484865[_0x8e3542(0x129)]??setInterval,_0x5585e5=createCommandSpinner(_0x998606,_0x484865);_0x5585e5['start']();const _0x3757a9=_0x27e3ec(),_0x1a168a=_0x998606[_0x8e3542(0x118)](_0x8e3542(0x11e),'')[_0x8e3542(0x12c)]()||'Processing',_0x4a13bb={};let _0x541be4=_0x998606;const _0x8dfd9a=()=>{const _0x3e7085=_0x8e3542;if(!_0x5585e5[_0x3e7085(0x119)])return;const _0x5f4f06=_0x27e3ec()-_0x3757a9,_0x1e5ad4=formatElapsed(_0x5f4f06),_0x5872f2=_0x4a13bb['phase']?.['trim']()||_0x1a168a,_0x525862=_0x4a13bb[_0x3e7085(0x11b)]?_0x3e7085(0x127)+_0x4a13bb[_0x3e7085(0x11b)]+']':'',_0x344ab4=_0x4a13bb[_0x3e7085(0x126)]?'\x20'+_0x4a13bb['extra']:'',_0x4702c9=_0x5872f2+'\x20'+_0x1e5ad4+_0x344ab4+_0x525862;_0x4702c9!==_0x541be4&&_0x4702c9[_0x3e7085(0x12c)]()&&(_0x5585e5[_0x3e7085(0x11a)]=_0x4702c9,_0x541be4=_0x4702c9);},_0x9e9e74=_0x94198a(()=>{_0x8dfd9a();},0x3e8),_0x28fd9d={'setPhase':_0x2fe772=>{const _0x51e2b9=_0x8e3542;_0x4a13bb[_0x51e2b9(0x11c)]=_0x2fe772;const _0x40e64b=_0x2fe772?.['trim']()||_0x1a168a,_0x1ab2f5=_0x27e3ec()-_0x3757a9,_0x4b2313=formatElapsed(_0x1ab2f5),_0x5bd8f3=_0x4a13bb['jobId']?_0x51e2b9(0x127)+_0x4a13bb['jobId']+']':'',_0xc00bef=_0x4a13bb[_0x51e2b9(0x126)]?'\x20'+_0x4a13bb[_0x51e2b9(0x126)]:'',_0x413f55=_0x40e64b+'\x20'+_0x4b2313+_0xc00bef+_0x5bd8f3;_0x5585e5[_0x51e2b9(0x119)]&&_0x413f55['trim']()&&(_0x5585e5[_0x51e2b9(0x11a)]=_0x413f55,_0x541be4=_0x413f55);},'setJobId':_0x81a86=>{const _0x33d485=_0x8e3542;_0x4a13bb[_0x33d485(0x11b)]=_0x81a86,_0x8dfd9a();},'setExtra':_0x16822a=>{_0x4a13bb['extra']=_0x16822a,_0x8dfd9a();}};_0x8dfd9a();try{const _0x5c0769=await _0x5beeb6(_0x28fd9d),_0xe9b71b=_0x27e3ec()-_0x3757a9;return{'data':_0x5c0769,'elapsedMs':_0xe9b71b};}finally{clearInterval(_0x9e9e74),_0x5585e5[_0x8e3542(0x12d)]();}}export function formatElapsed(_0x28e6e6){const _0x356368=a146_0x16fc,_0x3a7f30=Math[_0x356368(0x12a)](_0x28e6e6/0x3e8);if(_0x3a7f30<0x3c)return(_0x28e6e6/0x3e8)[_0x356368(0x121)](0x1)+'s';const _0x3aa4e1=Math[_0x356368(0x12a)](_0x3a7f30/0x3c),_0x1d7b2a=_0x3a7f30%0x3c;if(_0x3aa4e1<0x3c)return _0x3aa4e1+'m\x20'+_0x1d7b2a+'s';const _0x33be5d=Math['floor'](_0x3aa4e1/0x3c),_0x522aff=_0x3aa4e1%0x3c;return _0x33be5d+'h\x20'+_0x522aff+'m';}function a146_0x16fc(_0x49d28c,_0x274b13){_0x49d28c=_0x49d28c-0x114;const _0x251b4b=a146_0x251b();let _0x16fc80=_0x251b4b[_0x49d28c];return _0x16fc80;}function a146_0x251b(){const _0x4120fc=['8498903aDaDgD','500067NVCxCv','234544LnwWbM','clock','extra','\x20[Job\x20ID:\x20','cyan','intervalFactory','floor','387dIqtwa','trim','stop','isTTY','now','3932880ggbkgF','3088670rHXUKY','stderr','replace','isSpinning','text','jobId','phase','2czuNrP','...','2483848zNrSAY','231960XQBZVJ','toFixed'];a146_0x251b=function(){return _0x4120fc;};return a146_0x251b();}
1
+ (function(_0x4e100d,_0x5e85f1){const _0x18ee43=a146_0x43b1,_0x381b77=_0x4e100d();while(!![]){try{const _0x3b51e1=-parseInt(_0x18ee43(0xf7))/0x1+parseInt(_0x18ee43(0x100))/0x2*(parseInt(_0x18ee43(0xff))/0x3)+-parseInt(_0x18ee43(0xf6))/0x4*(parseInt(_0x18ee43(0xf9))/0x5)+-parseInt(_0x18ee43(0x10c))/0x6+-parseInt(_0x18ee43(0x110))/0x7*(parseInt(_0x18ee43(0x111))/0x8)+-parseInt(_0x18ee43(0x106))/0x9+-parseInt(_0x18ee43(0x112))/0xa*(-parseInt(_0x18ee43(0x10a))/0xb);if(_0x3b51e1===_0x5e85f1)break;else _0x381b77['push'](_0x381b77['shift']());}catch(_0x477a5c){_0x381b77['push'](_0x381b77['shift']());}}}(a146_0x5598,0xd6bc0));import a146_0x3b4679 from'ora';function a146_0x5598(){const _0x57a854=['stop','now','isTTY','8369667dUmDuv','isSpinning','text','intervalFactory','11brYFFR','stderr','2440416BBvKbH','\x20[Job\x20ID:\x20','phase','trim','7nhyPJb','10716552ImTrNI','25468600coGKoh','8kdeWQc','525191DjHYYe','start','440215ENcTLC','...','toFixed','clock','jobId','extra','1710237WgHoEf','6PsesXE','floor','cyan'];a146_0x5598=function(){return _0x57a854;};return a146_0x5598();}import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x32e4c4,_0x35c4dc={}){const _0x2834f5=a146_0x43b1,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x35c4dc;return a146_0x3b4679({'text':_0x32e4c4,'color':_0x2834f5(0x102),'stream':process[_0x2834f5(0x10b)],'isEnabled':forceEnabled||process[_0x2834f5(0x10b)][_0x2834f5(0x105)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}function a146_0x43b1(_0x1ad9e1,_0x56d344){_0x1ad9e1=_0x1ad9e1-0xf6;const _0x55983e=a146_0x5598();let _0x43b119=_0x55983e[_0x1ad9e1];return _0x43b119;}export async function withSpinner(_0x3f59f7,_0x1ba667,_0x57c53e={}){const _0x390b4c=a146_0x43b1,_0x2c94ec=_0x57c53e[_0x390b4c(0xfc)]??(()=>Date[_0x390b4c(0x104)]()),_0x47984f=createCommandSpinner(_0x3f59f7,_0x57c53e);_0x47984f[_0x390b4c(0xf8)]();const _0x5ea3ed=_0x2c94ec();try{const _0x3be7ce=await _0x1ba667(),_0x228661=_0x2c94ec()-_0x5ea3ed;return _0x47984f[_0x390b4c(0x103)](),{'data':_0x3be7ce,'elapsedMs':_0x228661};}catch(_0x80b683){_0x47984f[_0x390b4c(0x103)]();throw _0x80b683;}}export async function withProgressSpinner(_0x1a29b6,_0x20cf2,_0x52c0e8={}){const _0x13309b=a146_0x43b1,_0x48e3b9=_0x52c0e8[_0x13309b(0xfc)]??(()=>Date[_0x13309b(0x104)]()),_0x51f933=_0x52c0e8[_0x13309b(0x109)]??setInterval,_0x969bcb=createCommandSpinner(_0x1a29b6,_0x52c0e8);_0x969bcb[_0x13309b(0xf8)]();const _0xa75a9d=_0x48e3b9(),_0x605c07=_0x1a29b6['replace'](_0x13309b(0xfa),'')['trim']()||'Processing',_0x424ce5={};let _0x4e52c9=_0x1a29b6;const _0x53d31f=()=>{const _0x1ca858=_0x13309b;if(!_0x969bcb['isSpinning'])return;const _0x30fe66=_0x48e3b9()-_0xa75a9d,_0x1bfcf2=formatElapsed(_0x30fe66),_0x4a4f08=_0x424ce5[_0x1ca858(0x10e)]?.[_0x1ca858(0x10f)]()||_0x605c07,_0x38bfc9=_0x424ce5[_0x1ca858(0xfd)]?_0x1ca858(0x10d)+_0x424ce5[_0x1ca858(0xfd)]+']':'',_0x32c6da=_0x424ce5[_0x1ca858(0xfe)]?'\x20'+_0x424ce5[_0x1ca858(0xfe)]:'',_0xde7a6c=_0x4a4f08+'\x20'+_0x1bfcf2+_0x32c6da+_0x38bfc9;_0xde7a6c!==_0x4e52c9&&_0xde7a6c[_0x1ca858(0x10f)]()&&(_0x969bcb['text']=_0xde7a6c,_0x4e52c9=_0xde7a6c);},_0xc5fe00=_0x51f933(()=>{_0x53d31f();},0x3e8),_0x23ac19={'setPhase':_0x1a51f2=>{const _0x575380=_0x13309b;_0x424ce5[_0x575380(0x10e)]=_0x1a51f2;const _0x20903f=_0x1a51f2?.[_0x575380(0x10f)]()||_0x605c07,_0x1bd905=_0x48e3b9()-_0xa75a9d,_0x3682ac=formatElapsed(_0x1bd905),_0x38b347=_0x424ce5[_0x575380(0xfd)]?'\x20[Job\x20ID:\x20'+_0x424ce5[_0x575380(0xfd)]+']':'',_0x3f7e48=_0x424ce5[_0x575380(0xfe)]?'\x20'+_0x424ce5[_0x575380(0xfe)]:'',_0x92fe2c=_0x20903f+'\x20'+_0x3682ac+_0x3f7e48+_0x38b347;_0x969bcb[_0x575380(0x107)]&&_0x92fe2c[_0x575380(0x10f)]()&&(_0x969bcb[_0x575380(0x108)]=_0x92fe2c,_0x4e52c9=_0x92fe2c);},'setJobId':_0x101b28=>{const _0x8076e1=_0x13309b;_0x424ce5[_0x8076e1(0xfd)]=_0x101b28,_0x53d31f();},'setExtra':_0x73a03f=>{const _0x3f1ece=_0x13309b;_0x424ce5[_0x3f1ece(0xfe)]=_0x73a03f,_0x53d31f();}};_0x53d31f();try{const _0x4b8b26=await _0x20cf2(_0x23ac19),_0x24f8a9=_0x48e3b9()-_0xa75a9d;return{'data':_0x4b8b26,'elapsedMs':_0x24f8a9};}finally{clearInterval(_0xc5fe00),_0x969bcb[_0x13309b(0x103)]();}}export function formatElapsed(_0x520b57){const _0x57dfe8=a146_0x43b1,_0x5737a4=Math['floor'](_0x520b57/0x3e8);if(_0x5737a4<0x3c)return(_0x520b57/0x3e8)[_0x57dfe8(0xfb)](0x1)+'s';const _0x139ecd=Math[_0x57dfe8(0x101)](_0x5737a4/0x3c),_0x446ae4=_0x5737a4%0x3c;if(_0x139ecd<0x3c)return _0x139ecd+'m\x20'+_0x446ae4+'s';const _0x153d06=Math[_0x57dfe8(0x101)](_0x139ecd/0x3c),_0xa4b5f2=_0x139ecd%0x3c;return _0x153d06+'h\x20'+_0xa4b5f2+'m';}
@@ -1 +1 @@
1
- function a147_0x5375(_0x1f8e60,_0x121103){_0x1f8e60=_0x1f8e60-0x111;const _0x3379dd=a147_0x3379();let _0x53759f=_0x3379dd[_0x1f8e60];return _0x53759f;}(function(_0x5a9975,_0x38e2bd){const _0x543564=a147_0x5375,_0x1c0164=_0x5a9975();while(!![]){try{const _0x404033=parseInt(_0x543564(0x124))/0x1+-parseInt(_0x543564(0x128))/0x2+parseInt(_0x543564(0x117))/0x3*(-parseInt(_0x543564(0x115))/0x4)+parseInt(_0x543564(0x126))/0x5*(parseInt(_0x543564(0x118))/0x6)+-parseInt(_0x543564(0x11f))/0x7+parseInt(_0x543564(0x111))/0x8*(-parseInt(_0x543564(0x122))/0x9)+-parseInt(_0x543564(0x113))/0xa*(-parseInt(_0x543564(0x112))/0xb);if(_0x404033===_0x38e2bd)break;else _0x1c0164['push'](_0x1c0164['shift']());}catch(_0x3fb77b){_0x1c0164['push'](_0x1c0164['shift']());}}}(a147_0x3379,0xe1624));export async function*parseSSEStream(_0x7896d4,_0x3e1f0e){const _0x7b352a=a147_0x5375;if(!_0x7896d4[_0x7b352a(0x121)])throw new Error(_0x7b352a(0x11d));const _0x383456=_0x7896d4[_0x7b352a(0x121)][_0x7b352a(0x119)](),_0x36e804=new TextDecoder();let _0x579b14='',_0x750ab0={};try{while(!![]){const {done:_0x2b0d70,value:_0x385abe}=await _0x383456[_0x7b352a(0x127)]();if(_0x2b0d70){if(_0x750ab0['data']){_0x3e1f0e?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x750ab0[_0x7b352a(0x123)]);const _0x4cae52=parseSSEData(_0x750ab0[_0x7b352a(0x123)]);yield _0x4cae52;}break;}_0x579b14+=_0x36e804[_0x7b352a(0x11c)](_0x385abe,{'stream':!![]});const _0x2b8864=_0x579b14[_0x7b352a(0x11e)]('\x0a');_0x579b14=_0x2b8864[_0x7b352a(0x11b)]()||'';for(const _0x2cf60c of _0x2b8864){if(_0x2cf60c[_0x7b352a(0x114)]()===''){if(_0x750ab0['data']){_0x3e1f0e?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x750ab0[_0x7b352a(0x123)]);const _0x259608=parseSSEData(_0x750ab0[_0x7b352a(0x123)]);yield _0x259608,_0x750ab0={};}continue;}if(_0x2cf60c[_0x7b352a(0x11a)](':'))continue;const _0x27b31f=_0x2cf60c['indexOf'](':');if(_0x27b31f===-0x1)continue;const _0x1a0d00=_0x2cf60c['slice'](0x0,_0x27b31f);let _0x2849d9=_0x2cf60c[_0x7b352a(0x120)](_0x27b31f+0x1);_0x2849d9[_0x7b352a(0x11a)]('\x20')&&(_0x2849d9=_0x2849d9[_0x7b352a(0x120)](0x1));switch(_0x1a0d00){case _0x7b352a(0x125):_0x750ab0['event']=_0x2849d9;break;case _0x7b352a(0x123):_0x750ab0[_0x7b352a(0x123)]=_0x750ab0[_0x7b352a(0x123)]?_0x750ab0[_0x7b352a(0x123)]+'\x0a'+_0x2849d9:_0x2849d9;break;case'id':_0x750ab0['id']=_0x2849d9;break;}}}}finally{_0x383456[_0x7b352a(0x116)]();}}function parseSSEData(_0x33850e){try{return JSON['parse'](_0x33850e);}catch(_0x5426fa){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x33850e,{'cause':_0x5426fa});}}function a147_0x3379(){const _0x56ff33=['369200MdzekN','4152egRGDY','20595509XWqcgf','10GXBvnK','trim','903068FCVFcP','releaseLock','24PsFrmV','102294mnufpk','getReader','startsWith','pop','decode','Response\x20body\x20is\x20null','split','10732302moKbNO','slice','body','5679LjTtFl','data','1299658STbmcj','event','470xBXXDE','read'];a147_0x3379=function(){return _0x56ff33;};return a147_0x3379();}
1
+ function a147_0x439c(_0x3f7b87,_0x106395){_0x3f7b87=_0x3f7b87-0xc0;const _0x203454=a147_0x2034();let _0x439c9d=_0x203454[_0x3f7b87];return _0x439c9d;}function a147_0x2034(){const _0x138f78=['1474662VGsmbM','[LLM\x20API\x20SSE]\x20','releaseLock','2888865nNxHSj','decode','pop','506064pykIry','data','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','read','getReader','debug','973370xKBRsu','startsWith','12IOAbOc','body','event','trim','Response\x20body\x20is\x20null','142288NseRRj','1DyMVYF','518304mfYuTz','parse','2799464XByZvl','slice','split','indexOf'];a147_0x2034=function(){return _0x138f78;};return a147_0x2034();}(function(_0x36efd3,_0x4f5b31){const _0x42e161=a147_0x439c,_0x2f18b7=_0x36efd3();while(!![]){try{const _0x1bf9fe=parseInt(_0x42e161(0xd8))/0x1*(-parseInt(_0x42e161(0xd9))/0x2)+parseInt(_0x42e161(0xd2))/0x3*(-parseInt(_0x42e161(0xd7))/0x4)+-parseInt(_0x42e161(0xd0))/0x5+-parseInt(_0x42e161(0xca))/0x6+parseInt(_0x42e161(0xc4))/0x7+parseInt(_0x42e161(0xc0))/0x8+parseInt(_0x42e161(0xc7))/0x9;if(_0x1bf9fe===_0x4f5b31)break;else _0x2f18b7['push'](_0x2f18b7['shift']());}catch(_0x3a4a50){_0x2f18b7['push'](_0x2f18b7['shift']());}}}(a147_0x2034,0x311a6));export async function*parseSSEStream(_0x3a2feb,_0x289c31){const _0x1a3d10=a147_0x439c;if(!_0x3a2feb[_0x1a3d10(0xd3)])throw new Error(_0x1a3d10(0xd6));const _0x124f5c=_0x3a2feb['body'][_0x1a3d10(0xce)](),_0x241ad6=new TextDecoder();let _0x4b9b08='',_0xa42d81={};try{while(!![]){const {done:_0x1ef218,value:_0x4456d6}=await _0x124f5c[_0x1a3d10(0xcd)]();if(_0x1ef218){if(_0xa42d81[_0x1a3d10(0xcb)]){_0x289c31?.[_0x1a3d10(0xcf)](_0x1a3d10(0xc5)+_0xa42d81['data']);const _0x78ae8c=parseSSEData(_0xa42d81[_0x1a3d10(0xcb)]);yield _0x78ae8c;}break;}_0x4b9b08+=_0x241ad6[_0x1a3d10(0xc8)](_0x4456d6,{'stream':!![]});const _0x1d55ed=_0x4b9b08[_0x1a3d10(0xc2)]('\x0a');_0x4b9b08=_0x1d55ed[_0x1a3d10(0xc9)]()||'';for(const _0x5c4170 of _0x1d55ed){if(_0x5c4170[_0x1a3d10(0xd5)]()===''){if(_0xa42d81[_0x1a3d10(0xcb)]){_0x289c31?.['debug'](_0x1a3d10(0xc5)+_0xa42d81[_0x1a3d10(0xcb)]);const _0x3033a1=parseSSEData(_0xa42d81[_0x1a3d10(0xcb)]);yield _0x3033a1,_0xa42d81={};}continue;}if(_0x5c4170['startsWith'](':'))continue;const _0x54f670=_0x5c4170[_0x1a3d10(0xc3)](':');if(_0x54f670===-0x1)continue;const _0x25808f=_0x5c4170[_0x1a3d10(0xc1)](0x0,_0x54f670);let _0x4d6052=_0x5c4170[_0x1a3d10(0xc1)](_0x54f670+0x1);_0x4d6052[_0x1a3d10(0xd1)]('\x20')&&(_0x4d6052=_0x4d6052[_0x1a3d10(0xc1)](0x1));switch(_0x25808f){case _0x1a3d10(0xd4):_0xa42d81['event']=_0x4d6052;break;case _0x1a3d10(0xcb):_0xa42d81['data']=_0xa42d81[_0x1a3d10(0xcb)]?_0xa42d81['data']+'\x0a'+_0x4d6052:_0x4d6052;break;case'id':_0xa42d81['id']=_0x4d6052;break;}}}}finally{_0x124f5c[_0x1a3d10(0xc6)]();}}function parseSSEData(_0x522284){const _0x1a165a=a147_0x439c;try{return JSON[_0x1a165a(0xda)](_0x522284);}catch(_0xd76c39){throw new Error(_0x1a165a(0xcc)+_0x522284,{'cause':_0xd76c39});}}
@@ -1 +1 @@
1
- (function(_0x53ffb4,_0x866db8){const _0x267bb3=a148_0x2665,_0x26bdf5=_0x53ffb4();while(!![]){try{const _0x2ae80e=-parseInt(_0x267bb3(0x1bc))/0x1*(parseInt(_0x267bb3(0x1bd))/0x2)+parseInt(_0x267bb3(0x1c2))/0x3*(parseInt(_0x267bb3(0x1c8))/0x4)+-parseInt(_0x267bb3(0x1b4))/0x5*(-parseInt(_0x267bb3(0x1bb))/0x6)+-parseInt(_0x267bb3(0x1c1))/0x7+parseInt(_0x267bb3(0x1b2))/0x8*(-parseInt(_0x267bb3(0x1b6))/0x9)+parseInt(_0x267bb3(0x1b3))/0xa+parseInt(_0x267bb3(0x1ae))/0xb;if(_0x2ae80e===_0x866db8)break;else _0x26bdf5['push'](_0x26bdf5['shift']());}catch(_0x226ede){_0x26bdf5['push'](_0x26bdf5['shift']());}}}(a148_0x339f,0x4c916));import a148_0x495d0e from'string-width';export function stringWidth(_0x2af8d9){return a148_0x495d0e(_0x2af8d9);}function a148_0x2665(_0xd4a581,_0x2fabc2){_0xd4a581=_0xd4a581-0x1ad;const _0x339ff2=a148_0x339f();let _0x26652b=_0x339ff2[_0xd4a581];return _0x26652b;}export function padEnd(_0xb806a2,_0x5b2fa4){const _0x51406e=a148_0x2665,_0x34bc5b=stringWidth(_0xb806a2);if(_0x34bc5b>=_0x5b2fa4)return _0xb806a2;return _0xb806a2+'\x20'[_0x51406e(0x1c6)](_0x5b2fa4-_0x34bc5b);}function a148_0x339f(){const _0x28d759=['length','217308FTQAWd','28Gnfcjg','1838WaWTiu','unknown','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','toLowerCase','3629577GcoZgZ','9KjIyfF','floor','\x5c$&','toString','repeat','USERNAME','704356CYkqXX','USER','722722ZrpsJZ','replace','padStart','Cannot\x20escape\x20empty\x20string\x20literal','493016eTJXgX','2784960QWbecI','15mNrFFS','slice','18lzMnmD','substring','random','trim'];a148_0x339f=function(){return _0x28d759;};return a148_0x339f();}export function padStart(_0xdbcf36,_0x233a2c){const _0x357dad=a148_0x2665,_0x41ed8f=stringWidth(_0xdbcf36);if(_0x41ed8f>=_0x233a2c)return _0xdbcf36;return'\x20'[_0x357dad(0x1c6)](_0x233a2c-_0x41ed8f)+_0xdbcf36;}export function centerAlign(_0x3c9ede,_0x2811fb){const _0x187ab2=a148_0x2665,_0xebe9c8=stringWidth(_0x3c9ede);if(_0xebe9c8>_0x2811fb){if(_0x2811fb<=0x1)return'…'[_0x187ab2(0x1b7)](0x0,_0x2811fb);let _0x2fd64d=_0x3c9ede;while(stringWidth(_0x2fd64d+'…')>_0x2811fb){_0x2fd64d=_0x2fd64d[_0x187ab2(0x1b5)](0x0,-0x1);}return _0x2fd64d+'…';}if(_0xebe9c8===_0x2811fb)return _0x3c9ede;const _0x227609=_0x2811fb-_0xebe9c8,_0x42115d=Math[_0x187ab2(0x1c3)](_0x227609/0x2),_0x2edb1a=_0x227609-_0x42115d;return'\x20'['repeat'](_0x42115d)+_0x3c9ede+'\x20'['repeat'](_0x2edb1a);}export function escapeStringLiteral(_0x397089){const _0x92f0df=a148_0x2665;if(!_0x397089||_0x397089[_0x92f0df(0x1b9)]()['length']===0x0)throw new Error(_0x92f0df(0x1b1));const _0x1bfd2f=_0x397089[_0x92f0df(0x1af)](/'/g,'\x27\x27');return'\x27'+_0x1bfd2f+'\x27';}export function globToLike(_0x232bdd){const _0x473df8=a148_0x2665;let _0x58af97=_0x232bdd[_0x473df8(0x1af)](/\\/g,'\x5c\x5c')[_0x473df8(0x1af)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x58af97=_0x58af97[_0x473df8(0x1af)](/\*/g,'%')[_0x473df8(0x1af)](/\?/g,'_'),_0x58af97;}export function buildLikePattern(_0x55f63b){const _0x5b849b=a148_0x2665;if(!_0x55f63b||_0x55f63b['trim']()[_0x5b849b(0x1ba)]===0x0)throw new Error(_0x5b849b(0x1bf));const _0xbb16e8=globToLike(_0x55f63b),_0x360fce=_0xbb16e8[_0x5b849b(0x1af)](/'/g,'\x27\x27');return'\x27'+_0x360fce+'\x27';}export function matchGlobPattern(_0x46b928,_0x87a96b){const _0x5d959c=a148_0x2665,_0x24002f=_0x87a96b[_0x5d959c(0x1af)](/[.+^${}()|[\]\\]/g,_0x5d959c(0x1c4))['replace'](/\*/g,'.*')[_0x5d959c(0x1af)](/\?/g,'.'),_0x228e17=new RegExp('^'+_0x24002f+'$');return _0x228e17['test'](_0x46b928);}export function getSanitizedUsername(){const _0x414d9c=a148_0x2665,_0x295af7=process['env'][_0x414d9c(0x1ad)]||process['env'][_0x414d9c(0x1c7)]||_0x414d9c(0x1be);return _0x295af7[_0x414d9c(0x1af)](/[^a-zA-Z0-9]/g,'')[_0x414d9c(0x1c0)]();}export function generateRandomHex(){const _0x4b7b01=a148_0x2665,_0x144953=Math[_0x4b7b01(0x1c3)](Math[_0x4b7b01(0x1b8)]()*0xfffff);return _0x144953[_0x4b7b01(0x1c5)](0x10)[_0x4b7b01(0x1b0)](0x5,'0');}export function sanitizeFileName(_0x4f2888){const _0x47f27e=a148_0x2665;return _0x4f2888[_0x47f27e(0x1c0)]()[_0x47f27e(0x1af)](/[/\\:*?"<>|]/g,'-')[_0x47f27e(0x1af)](/\s+/g,'-')['replace'](/-+/g,'-')['replace'](/^-|-$/g,'');}
1
+ (function(_0x433616,_0x32f1da){const _0x1597fe=a148_0x4445,_0x3d5dc9=_0x433616();while(!![]){try{const _0x2299fe=-parseInt(_0x1597fe(0x85))/0x1*(-parseInt(_0x1597fe(0x8a))/0x2)+parseInt(_0x1597fe(0x8b))/0x3+parseInt(_0x1597fe(0x8d))/0x4+-parseInt(_0x1597fe(0x8c))/0x5*(parseInt(_0x1597fe(0x7e))/0x6)+-parseInt(_0x1597fe(0x7d))/0x7+parseInt(_0x1597fe(0x86))/0x8+-parseInt(_0x1597fe(0x84))/0x9;if(_0x2299fe===_0x32f1da)break;else _0x3d5dc9['push'](_0x3d5dc9['shift']());}catch(_0x587b01){_0x3d5dc9['push'](_0x3d5dc9['shift']());}}}(a148_0x1daf,0x35f22));import a148_0x3b9bb6 from'string-width';export function stringWidth(_0x4123c3){return a148_0x3b9bb6(_0x4123c3);}export function padEnd(_0x56db6e,_0x2fbcbc){const _0x3f9f12=stringWidth(_0x56db6e);if(_0x3f9f12>=_0x2fbcbc)return _0x56db6e;return _0x56db6e+'\x20'['repeat'](_0x2fbcbc-_0x3f9f12);}export function padStart(_0x5cc3d6,_0x1b01a7){const _0x493c=a148_0x4445,_0x2495d8=stringWidth(_0x5cc3d6);if(_0x2495d8>=_0x1b01a7)return _0x5cc3d6;return'\x20'[_0x493c(0x78)](_0x1b01a7-_0x2495d8)+_0x5cc3d6;}export function centerAlign(_0x35ff80,_0x23d5f6){const _0x2457ae=a148_0x4445,_0x6e43c8=stringWidth(_0x35ff80);if(_0x6e43c8>_0x23d5f6){if(_0x23d5f6<=0x1)return'…'[_0x2457ae(0x79)](0x0,_0x23d5f6);let _0x433fce=_0x35ff80;while(stringWidth(_0x433fce+'…')>_0x23d5f6){_0x433fce=_0x433fce[_0x2457ae(0x89)](0x0,-0x1);}return _0x433fce+'…';}if(_0x6e43c8===_0x23d5f6)return _0x35ff80;const _0x5a6d64=_0x23d5f6-_0x6e43c8,_0x1bdc5a=Math[_0x2457ae(0x7c)](_0x5a6d64/0x2),_0x4c9bca=_0x5a6d64-_0x1bdc5a;return'\x20'[_0x2457ae(0x78)](_0x1bdc5a)+_0x35ff80+'\x20'[_0x2457ae(0x78)](_0x4c9bca);}export function escapeStringLiteral(_0x180ed4){const _0x5c1043=a148_0x4445;if(!_0x180ed4||_0x180ed4['trim']()[_0x5c1043(0x7a)]===0x0)throw new Error(_0x5c1043(0x87));const _0x4ce143=_0x180ed4[_0x5c1043(0x88)](/'/g,'\x27\x27');return'\x27'+_0x4ce143+'\x27';}function a148_0x4445(_0x3b1f0b,_0x499fff){_0x3b1f0b=_0x3b1f0b-0x78;const _0x1daf1a=a148_0x1daf();let _0x444506=_0x1daf1a[_0x3b1f0b];return _0x444506;}export function globToLike(_0x81b007){const _0x53bba9=a148_0x4445;let _0x55b934=_0x81b007[_0x53bba9(0x88)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0x53bba9(0x88)](/_/g,'\x5c_');return _0x55b934=_0x55b934[_0x53bba9(0x88)](/\*/g,'%')[_0x53bba9(0x88)](/\?/g,'_'),_0x55b934;}export function buildLikePattern(_0x21b746){const _0x33ee45=a148_0x4445;if(!_0x21b746||_0x21b746[_0x33ee45(0x80)]()[_0x33ee45(0x7a)]===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x198042=globToLike(_0x21b746),_0x51565f=_0x198042[_0x33ee45(0x88)](/'/g,'\x27\x27');return'\x27'+_0x51565f+'\x27';}export function matchGlobPattern(_0x21cd80,_0x445abd){const _0x440a6d=a148_0x4445,_0x534e1f=_0x445abd[_0x440a6d(0x88)](/[.+^${}()|[\]\\]/g,_0x440a6d(0x7f))[_0x440a6d(0x88)](/\*/g,'.*')[_0x440a6d(0x88)](/\?/g,'.'),_0xe8e011=new RegExp('^'+_0x534e1f+'$');return _0xe8e011[_0x440a6d(0x82)](_0x21cd80);}export function getSanitizedUsername(){const _0x57ee43=a148_0x4445,_0x5ab66d=process[_0x57ee43(0x83)]['USER']||process['env']['USERNAME']||_0x57ee43(0x7b);return _0x5ab66d['replace'](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}function a148_0x1daf(){const _0x4eedd3=['2rxJvRX','774216LtAMBv','51995hRKjey','1584136TEJwzn','repeat','substring','length','unknown','floor','2517998VauNJb','42JnZnxr','\x5c$&','trim','padStart','test','env','1934397Sjyaak','164343HkTFEi','399624VpgwyR','Cannot\x20escape\x20empty\x20string\x20literal','replace','slice'];a148_0x1daf=function(){return _0x4eedd3;};return a148_0x1daf();}export function generateRandomHex(){const _0x15d550=a148_0x4445,_0x3471f8=Math[_0x15d550(0x7c)](Math['random']()*0xfffff);return _0x3471f8['toString'](0x10)[_0x15d550(0x81)](0x5,'0');}export function sanitizeFileName(_0x595cc1){const _0x926cb2=a148_0x4445;return _0x595cc1['toLowerCase']()[_0x926cb2(0x88)](/[/\\:*?"<>|]/g,'-')[_0x926cb2(0x88)](/\s+/g,'-')['replace'](/-+/g,'-')['replace'](/^-|-$/g,'');}
@@ -1 +1 @@
1
- (function(_0x4a93ab,_0x57c38e){const _0x3700e3=a149_0x4a72,_0xab9658=_0x4a93ab();while(!![]){try{const _0x4b5de3=parseInt(_0x3700e3(0xad))/0x1+-parseInt(_0x3700e3(0xac))/0x2+-parseInt(_0x3700e3(0xb3))/0x3*(-parseInt(_0x3700e3(0x9e))/0x4)+-parseInt(_0x3700e3(0xab))/0x5*(-parseInt(_0x3700e3(0xa1))/0x6)+-parseInt(_0x3700e3(0xa0))/0x7+parseInt(_0x3700e3(0xa9))/0x8+-parseInt(_0x3700e3(0xb2))/0x9;if(_0x4b5de3===_0x57c38e)break;else _0xab9658['push'](_0xab9658['shift']());}catch(_0x24513b){_0xab9658['push'](_0xab9658['shift']());}}}(a149_0x22db,0xef4cd));function a149_0x4a72(_0x10775c,_0x411fb9){_0x10775c=_0x10775c-0x9d;const _0x22db97=a149_0x22db();let _0x4a7276=_0x22db97[_0x10775c];return _0x4a7276;}function hasWildcard(_0x482fa1){const _0xf8f2ee=a149_0x4a72;return _0x482fa1[_0xf8f2ee(0xa5)]('*')||_0x482fa1[_0xf8f2ee(0xa5)]('?');}export function parseTableReference(_0x387671){const _0x1fec8f=a149_0x4a72;if(!_0x387671||_0x387671[_0x1fec8f(0xa2)]()['length']===0x0)throw new Error(_0x1fec8f(0xae));const _0x1e6603=_0x387671['trim'](),_0x1270b1={'original':_0x1e6603},_0x2f593b=_0x1e6603[_0x1fec8f(0xb0)]('.');if(_0x2f593b['length']===0x1){const _0x3d1d8e=_0x2f593b[0x0];if(!_0x3d1d8e)throw new Error(_0x1fec8f(0xaf));_0x1270b1[_0x1fec8f(0xb1)]=_0x3d1d8e;}else{if(_0x2f593b['length']===0x2){const [_0x40a622,_0x361e07]=_0x2f593b;if(!_0x40a622)throw new Error(_0x1fec8f(0xa4));if(!_0x361e07)throw new Error(_0x1fec8f(0xb4));_0x1270b1['database']=_0x40a622,_0x1270b1[_0x1fec8f(0xb1)]=_0x361e07;}else{if(_0x2f593b[_0x1fec8f(0x9f)]===0x3){const [_0x3de5b0,_0x44131f,_0xbe7af6]=_0x2f593b;if(!_0x3de5b0||!_0x44131f||!_0xbe7af6)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x1270b1['catalog']=_0x3de5b0,_0x1270b1[_0x1fec8f(0xa3)]=_0x44131f,_0x1270b1[_0x1fec8f(0xb1)]=_0xbe7af6;}else throw new Error(_0x1fec8f(0xa6));}}return _0x1270b1;}function a149_0x22db(){const _0x319ac=['table','2415402VDYHGE','2262873jlXBna','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','4AEzbbP','length','3870755UizYBI','4590624YSvmNg','trim','database','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','includes','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','push','join','1059432fHDVBj','catalog','10ZvSqva','2663030WmQnxD','716103KSRZPm','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Pattern\x20cannot\x20be\x20just\x20a\x20dot','split'];a149_0x22db=function(){return _0x319ac;};return a149_0x22db();}export function formatTableReference(_0x25b0ed){const _0xe423e6=a149_0x4a72,_0x560a84=[];return _0x25b0ed['catalog']&&_0x560a84[_0xe423e6(0xa7)](_0x25b0ed[_0xe423e6(0xaa)]),_0x25b0ed['database']&&_0x560a84[_0xe423e6(0xa7)](_0x25b0ed[_0xe423e6(0xa3)]),_0x25b0ed[_0xe423e6(0xb1)]&&_0x560a84[_0xe423e6(0xa7)](_0x25b0ed['table']),_0x560a84[_0xe423e6(0xa8)]('.');}export function validateTableListReference(_0x322ad8){return undefined;}export function validateTableDescribeReference(_0x389eef){const _0x193619=a149_0x4a72;if(!_0x389eef[_0x193619(0xb1)])return _0x193619(0xb5);if(_0x389eef[_0x193619(0xa3)]&&hasWildcard(_0x389eef[_0x193619(0xa3)]))return _0x193619(0x9d);if(hasWildcard(_0x389eef[_0x193619(0xb1)]))return _0x193619(0xb6);return undefined;}
1
+ function a149_0x27d2(){const _0x2be019=['Table\x20name\x20is\x20required\x20for\x20describe\x20operation','2855375rOGGCp','push','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','trim','split','939470icUYZi','database','224797BfAlsk','1842456euJkMo','catalog','2473404JTTPHP','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','3140097fxqSjv','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Pattern\x20cannot\x20be\x20just\x20a\x20dot','join','table','length','includes','11410049UsjOSM'];a149_0x27d2=function(){return _0x2be019;};return a149_0x27d2();}(function(_0x357bcb,_0x325004){const _0x46c614=a149_0x1c7b,_0x3dde8c=_0x357bcb();while(!![]){try{const _0xedfc38=parseInt(_0x46c614(0xbb))/0x1+-parseInt(_0x46c614(0xb9))/0x2+parseInt(_0x46c614(0xc0))/0x3+parseInt(_0x46c614(0xbe))/0x4+parseInt(_0x46c614(0xca))/0x5+parseInt(_0x46c614(0xbc))/0x6+-parseInt(_0x46c614(0xc8))/0x7;if(_0xedfc38===_0x325004)break;else _0x3dde8c['push'](_0x3dde8c['shift']());}catch(_0x5d5c5b){_0x3dde8c['push'](_0x3dde8c['shift']());}}}(a149_0x27d2,0xa3260));function a149_0x1c7b(_0x1631b4,_0x4d8cec){_0x1631b4=_0x1631b4-0xb8;const _0x27d2d6=a149_0x27d2();let _0x1c7b20=_0x27d2d6[_0x1631b4];return _0x1c7b20;}function hasWildcard(_0x523665){const _0x36b430=a149_0x1c7b;return _0x523665[_0x36b430(0xc7)]('*')||_0x523665[_0x36b430(0xc7)]('?');}export function parseTableReference(_0x294e58){const _0x3e80ad=a149_0x1c7b;if(!_0x294e58||_0x294e58[_0x3e80ad(0xcd)]()[_0x3e80ad(0xc6)]===0x0)throw new Error(_0x3e80ad(0xcc));const _0x42ebe6=_0x294e58[_0x3e80ad(0xcd)](),_0x25447a={'original':_0x42ebe6},_0x617570=_0x42ebe6[_0x3e80ad(0xb8)]('.');if(_0x617570['length']===0x1){const _0x19d695=_0x617570[0x0];if(!_0x19d695)throw new Error(_0x3e80ad(0xc3));_0x25447a[_0x3e80ad(0xc5)]=_0x19d695;}else{if(_0x617570['length']===0x2){const [_0x6aa598,_0x153bd3]=_0x617570;if(!_0x6aa598)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x153bd3)throw new Error(_0x3e80ad(0xc2));_0x25447a[_0x3e80ad(0xba)]=_0x6aa598,_0x25447a['table']=_0x153bd3;}else{if(_0x617570[_0x3e80ad(0xc6)]===0x3){const [_0x246523,_0x2931c8,_0x2514a7]=_0x617570;if(!_0x246523||!_0x2931c8||!_0x2514a7)throw new Error(_0x3e80ad(0xbf));_0x25447a['catalog']=_0x246523,_0x25447a[_0x3e80ad(0xba)]=_0x2931c8,_0x25447a[_0x3e80ad(0xc5)]=_0x2514a7;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x25447a;}export function formatTableReference(_0x59df44){const _0x3e966f=a149_0x1c7b,_0x2dd80e=[];return _0x59df44['catalog']&&_0x2dd80e[_0x3e966f(0xcb)](_0x59df44[_0x3e966f(0xbd)]),_0x59df44[_0x3e966f(0xba)]&&_0x2dd80e[_0x3e966f(0xcb)](_0x59df44[_0x3e966f(0xba)]),_0x59df44[_0x3e966f(0xc5)]&&_0x2dd80e[_0x3e966f(0xcb)](_0x59df44[_0x3e966f(0xc5)]),_0x2dd80e[_0x3e966f(0xc4)]('.');}export function validateTableListReference(_0x2a6168){return undefined;}export function validateTableDescribeReference(_0x25ca8c){const _0x1819d0=a149_0x1c7b;if(!_0x25ca8c[_0x1819d0(0xc5)])return _0x1819d0(0xc9);if(_0x25ca8c['database']&&hasWildcard(_0x25ca8c[_0x1819d0(0xba)]))return _0x1819d0(0xc1);if(hasWildcard(_0x25ca8c['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
@@ -1 +1 @@
1
- function a150_0x50cb(_0x265611,_0x308519){_0x265611=_0x265611-0xde;const _0xf761f0=a150_0xf761();let _0x50cb87=_0xf761f0[_0x265611];return _0x50cb87;}const a150_0x4cf6ea=a150_0x50cb;(function(_0x2bc57b,_0x35fdf9){const _0x480d9a=a150_0x50cb,_0x17eef5=_0x2bc57b();while(!![]){try{const _0x54acf8=-parseInt(_0x480d9a(0x101))/0x1*(-parseInt(_0x480d9a(0xf2))/0x2)+parseInt(_0x480d9a(0xe6))/0x3*(-parseInt(_0x480d9a(0x10b))/0x4)+-parseInt(_0x480d9a(0x11a))/0x5*(-parseInt(_0x480d9a(0xfe))/0x6)+parseInt(_0x480d9a(0x109))/0x7*(parseInt(_0x480d9a(0xf3))/0x8)+-parseInt(_0x480d9a(0x112))/0x9*(-parseInt(_0x480d9a(0x105))/0xa)+-parseInt(_0x480d9a(0xe7))/0xb*(-parseInt(_0x480d9a(0x10e))/0xc)+-parseInt(_0x480d9a(0x115))/0xd*(parseInt(_0x480d9a(0xec))/0xe);if(_0x54acf8===_0x35fdf9)break;else _0x17eef5['push'](_0x17eef5['shift']());}catch(_0x4cc741){_0x17eef5['push'](_0x17eef5['shift']());}}}(a150_0xf761,0x45e28));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 a150_0xf761(){const _0x289488=['test','2562YvOCCD','message','.gz','.cache','getFullYear','toString','1098OKprVs','56TpGgIh','map','init','getMonth','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','tdx-','name','Proxy\x20session\x20ended','padStart','ERROR','getSeconds','2746608HVZvuh','getTimezoneOffset','tdx.log','115Oenavn','fileOnly','stringify','stack','1290uWwtXL','info','yellow','gray','69741nQBAjB','DEBUG','424068FYAsQi','close','toISOString','12dJNjlg','error','string','logs','7344qAwkkK','split','write','61906RUILQJ','Warning:\x20Error\x20writing\x20to\x20tdx.log:','getHours','abs','WARN','5OomTXq','logLevel','debug','end','getMilliseconds','logDir','getMinutes','logStream','cyan','getDate','TRACE','3iAZXbe','6245833CCrQol','warn','log','INFO'];a150_0xf761=function(){return _0x289488;};return a150_0xf761();}import{pipeline}from'stream/promises';import a150_0xc566b9 from'chalk';function safeStringify(_0x7c2425){const _0x2cd734=a150_0x50cb;if(typeof _0x7c2425===_0x2cd734(0x110))return _0x7c2425;if(_0x7c2425 instanceof Error)return _0x7c2425[_0x2cd734(0x104)]||_0x7c2425[_0x2cd734(0xf9)]+':\x20'+_0x7c2425[_0x2cd734(0xed)];try{return JSON[_0x2cd734(0x103)](_0x7c2425,(_0x207ff6,_0xe441a5)=>{const _0x52f11c=_0x2cd734;if(_0xe441a5 instanceof Error)return{'name':_0xe441a5[_0x52f11c(0xf9)],'message':_0xe441a5[_0x52f11c(0xed)],'stack':_0xe441a5[_0x52f11c(0x104)],'cause':_0xe441a5['cause']};return _0xe441a5;});}catch{return String(_0x7c2425);}}function getTimezoneOffset(){const _0x386a03=a150_0x50cb,_0x1c4bf5=-new Date()[_0x386a03(0xff)](),_0x5ad305=Math['floor'](Math[_0x386a03(0x118)](_0x1c4bf5)/0x3c),_0x5c7215=Math[_0x386a03(0x118)](_0x1c4bf5)%0x3c,_0x1b4b89=_0x1c4bf5>=0x0?'+':'-';return''+_0x1b4b89+_0x5ad305['toString']()[_0x386a03(0xfb)](0x2,'0')+_0x5c7215[_0x386a03(0xf1)]()[_0x386a03(0xfb)](0x2,'0');}function formatTimestamp(){const _0xaede9f=a150_0x50cb,_0x408435=new Date(),_0x3d66f5=_0x408435[_0xaede9f(0xf0)](),_0x24df6c=(_0x408435[_0xaede9f(0xf6)]()+0x1)[_0xaede9f(0xf1)]()[_0xaede9f(0xfb)](0x2,'0'),_0x66d375=_0x408435[_0xaede9f(0xe4)]()[_0xaede9f(0xf1)]()[_0xaede9f(0xfb)](0x2,'0'),_0x1b74ac=_0x408435[_0xaede9f(0x117)]()[_0xaede9f(0xf1)]()[_0xaede9f(0xfb)](0x2,'0'),_0x542cff=_0x408435[_0xaede9f(0xe1)]()['toString']()[_0xaede9f(0xfb)](0x2,'0'),_0x4a8129=_0x408435[_0xaede9f(0xfd)]()[_0xaede9f(0xf1)]()['padStart'](0x2,'0'),_0x1b1710=_0x408435[_0xaede9f(0xdf)]()[_0xaede9f(0xf1)]()['padStart'](0x3,'0'),_0x23b55b=getTimezoneOffset();return _0x3d66f5+'-'+_0x24df6c+'-'+_0x66d375+'\x20'+_0x1b74ac+':'+_0x542cff+':'+_0x4a8129+'.'+_0x1b1710+_0x23b55b;}function formatColoredLogEntry(_0x4967c4,_0x23b828){const _0x4ab5e2=a150_0x50cb,_0x138e08=formatTimestamp(),_0x505d48=_0x23b828[_0x4ab5e2(0xf4)](safeStringify)['join']('\x20'),_0x2ade57=a150_0xc566b9['gray'](_0x138e08);let _0x1d963e;switch(_0x4967c4){case'info':_0x1d963e=a150_0xc566b9[_0x4ab5e2(0xe3)]('['+_0x4967c4+']\x20');break;case _0x4ab5e2(0xe8):_0x1d963e=a150_0xc566b9[_0x4ab5e2(0x107)]('['+_0x4967c4+']\x20');break;case _0x4ab5e2(0x10f):_0x1d963e=a150_0xc566b9['red']('['+_0x4967c4+']');break;case _0x4ab5e2(0x11c):_0x1d963e=a150_0xc566b9[_0x4ab5e2(0x108)]('['+_0x4967c4+']');break;default:_0x1d963e='['+_0x4967c4+']';}return _0x2ade57+'\x20'+_0x1d963e+'\x20'+_0x505d48;}export var LogLevel;(function(_0x1a77f7){const _0x1ac335=a150_0x50cb;_0x1a77f7[_0x1a77f7[_0x1ac335(0xe5)]=-0x2]=_0x1ac335(0xe5),_0x1a77f7[_0x1a77f7[_0x1ac335(0x10a)]=-0x1]=_0x1ac335(0x10a),_0x1a77f7[_0x1a77f7[_0x1ac335(0xea)]=0x0]=_0x1ac335(0xea),_0x1a77f7[_0x1a77f7[_0x1ac335(0x119)]=0x1]=_0x1ac335(0x119),_0x1a77f7[_0x1a77f7[_0x1ac335(0xfc)]=0x2]='ERROR';}(LogLevel||(LogLevel={})));export class TDXLogger{['logStream'];['logDir'];['logLevel'];[a150_0x4cf6ea(0x102)];constructor(_0x381bbc=LogLevel['INFO'],_0x381468=![]){const _0x4266df=a150_0x4cf6ea;this[_0x4266df(0xe0)]=join(homedir(),_0x4266df(0xef),'tdx',_0x4266df(0x111)),this[_0x4266df(0x11b)]=_0x381bbc,this['fileOnly']=_0x381468;}async[a150_0x4cf6ea(0xf5)](){const _0x7e3e32=a150_0x4cf6ea;try{await mkdir(this[_0x7e3e32(0xe0)],{'recursive':!![]}),await this['rotateOldLogs']();const _0x48a4b9=join(this[_0x7e3e32(0xe0)],_0x7e3e32(0x100));this[_0x7e3e32(0xe2)]=createWriteStream(_0x48a4b9,{'flags':'a'}),this[_0x7e3e32(0xe2)]['on'](_0x7e3e32(0x10f),_0x40336f=>{const _0x285fe6=_0x7e3e32;console[_0x285fe6(0x10f)](_0x285fe6(0x116),_0x40336f['message']);});}catch(_0x2b0e94){console[_0x7e3e32(0x10f)](_0x7e3e32(0xf7),_0x2b0e94);}}async['rotateOldLogs'](){const _0x8f1186=a150_0x4cf6ea;try{const _0x198393=await readdir(this[_0x8f1186(0xe0)]),_0x8634d3=new Date()[_0x8f1186(0x10d)]()[_0x8f1186(0x113)]('T')[0x0];if(_0x198393['includes'](_0x8f1186(0x100))){const _0x326904=join(this[_0x8f1186(0xe0)],'tdx.log'),_0x323cf6=await stat(_0x326904),_0x21bda7=new Date(_0x323cf6['mtime'])[_0x8f1186(0x10d)]()[_0x8f1186(0x113)]('T')[0x0];if(_0x21bda7<_0x8634d3){const _0x1f051f=join(this[_0x8f1186(0xe0)],_0x8f1186(0xf8)+_0x21bda7+'.log');await rename(_0x326904,_0x1f051f);}}const _0x5da604=await readdir(this[_0x8f1186(0xe0)]),_0x570d69=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x2db966=_0x5da604['filter'](_0x2e4516=>_0x570d69[_0x8f1186(0xeb)](_0x2e4516));for(const _0xc60031 of _0x2db966){const _0x2f0346=join(this[_0x8f1186(0xe0)],_0xc60031),_0x164ff9=join(this[_0x8f1186(0xe0)],_0xc60031+_0x8f1186(0xee));try{await pipeline(createReadStream(_0x2f0346),createGzip(),createWriteStream(_0x164ff9)),await unlink(_0x2f0346);}catch(_0x399f2d){console[_0x8f1186(0x10f)]('Warning:\x20Failed\x20to\x20compress\x20'+_0xc60031+':',_0x399f2d);}}}catch{}}['debug'](..._0x163849){const _0x59027c=a150_0x4cf6ea;if(this['logLevel']>LogLevel[_0x59027c(0x10a)])return;const _0x1f3e48=formatColoredLogEntry(_0x59027c(0x11c),_0x163849);this[_0x59027c(0xe2)]?.['write'](_0x1f3e48+'\x0a');}['trace'](..._0xa621a5){const _0x3a6583=a150_0x4cf6ea;if(this[_0x3a6583(0x11b)]>LogLevel[_0x3a6583(0xe5)])return;const _0x2f622d=formatColoredLogEntry('trace',_0xa621a5);this[_0x3a6583(0xe2)]?.['write'](_0x2f622d+'\x0a');}[a150_0x4cf6ea(0x106)](..._0x5982e7){const _0x1162dd=a150_0x4cf6ea;if(this[_0x1162dd(0x11b)]>LogLevel[_0x1162dd(0xea)])return;const _0x201e4a=formatColoredLogEntry(_0x1162dd(0x106),_0x5982e7);!this[_0x1162dd(0x102)]&&console[_0x1162dd(0xe9)](_0x201e4a),this[_0x1162dd(0xe2)]?.[_0x1162dd(0x114)](_0x201e4a+'\x0a');}[a150_0x4cf6ea(0xe8)](..._0x2858e6){const _0x4158a2=a150_0x4cf6ea;if(this[_0x4158a2(0x11b)]>LogLevel['WARN'])return;const _0xa165ac=formatColoredLogEntry(_0x4158a2(0xe8),_0x2858e6);!this[_0x4158a2(0x102)]&&console['error'](_0xa165ac),this[_0x4158a2(0xe2)]?.['write'](_0xa165ac+'\x0a');}[a150_0x4cf6ea(0x10f)](..._0x3ade78){const _0x2dac9a=a150_0x4cf6ea,_0x487270=formatColoredLogEntry(_0x2dac9a(0x10f),_0x3ade78);!this[_0x2dac9a(0x102)]&&console[_0x2dac9a(0x10f)](_0x487270),this[_0x2dac9a(0xe2)]?.[_0x2dac9a(0x114)](_0x487270+'\x0a');}async[a150_0x4cf6ea(0x10c)](){const _0x53a8ef=a150_0x4cf6ea;return this[_0x53a8ef(0x106)](_0x53a8ef(0xfa)),new Promise(_0x9dc044=>{const _0x2397c3=_0x53a8ef;this[_0x2397c3(0xe2)]?this[_0x2397c3(0xe2)][_0x2397c3(0xde)](()=>{_0x9dc044();}):_0x9dc044();});}['getLogPath'](){const _0x4ce320=a150_0x4cf6ea;return join(this[_0x4ce320(0xe0)],'tdx.log');}}
1
+ const a150_0x3d6c88=a150_0x15e5;(function(_0x58f1d6,_0x2a487d){const _0x3bf40b=a150_0x15e5,_0x5627b4=_0x58f1d6();while(!![]){try{const _0x4ff0ea=parseInt(_0x3bf40b(0x197))/0x1+parseInt(_0x3bf40b(0x1a1))/0x2*(parseInt(_0x3bf40b(0x1a7))/0x3)+parseInt(_0x3bf40b(0x1cf))/0x4*(-parseInt(_0x3bf40b(0x19e))/0x5)+parseInt(_0x3bf40b(0x1b0))/0x6*(parseInt(_0x3bf40b(0x19c))/0x7)+parseInt(_0x3bf40b(0x1b9))/0x8*(parseInt(_0x3bf40b(0x1b7))/0x9)+parseInt(_0x3bf40b(0x1b6))/0xa+parseInt(_0x3bf40b(0x1a3))/0xb*(-parseInt(_0x3bf40b(0x1aa))/0xc);if(_0x4ff0ea===_0x2a487d)break;else _0x5627b4['push'](_0x5627b4['shift']());}catch(_0x264b32){_0x5627b4['push'](_0x5627b4['shift']());}}}(a150_0x3c47,0x518e5));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';function a150_0x15e5(_0x2f8153,_0x22b65f){_0x2f8153=_0x2f8153-0x192;const _0x3c4780=a150_0x3c47();let _0x15e5b8=_0x3c4780[_0x2f8153];return _0x15e5b8;}import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a150_0x5b90fe from'chalk';function safeStringify(_0x19237b){const _0x3091d4=a150_0x15e5;if(typeof _0x19237b===_0x3091d4(0x1b8))return _0x19237b;if(_0x19237b instanceof Error)return _0x19237b[_0x3091d4(0x1a8)]||_0x19237b[_0x3091d4(0x198)]+':\x20'+_0x19237b[_0x3091d4(0x192)];try{return JSON[_0x3091d4(0x1b1)](_0x19237b,(_0x3626b0,_0x196f5d)=>{const _0x595e30=_0x3091d4;if(_0x196f5d instanceof Error)return{'name':_0x196f5d[_0x595e30(0x198)],'message':_0x196f5d['message'],'stack':_0x196f5d['stack'],'cause':_0x196f5d['cause']};return _0x196f5d;});}catch{return String(_0x19237b);}}function getTimezoneOffset(){const _0x50a090=a150_0x15e5,_0x13e5dd=-new Date()['getTimezoneOffset'](),_0x50d800=Math[_0x50a090(0x1ae)](Math[_0x50a090(0x199)](_0x13e5dd)/0x3c),_0x4ced31=Math[_0x50a090(0x199)](_0x13e5dd)%0x3c,_0x20fa9a=_0x13e5dd>=0x0?'+':'-';return''+_0x20fa9a+_0x50d800[_0x50a090(0x19f)]()[_0x50a090(0x1ca)](0x2,'0')+_0x4ced31[_0x50a090(0x19f)]()[_0x50a090(0x1ca)](0x2,'0');}function formatTimestamp(){const _0x13c11b=a150_0x15e5,_0x20ebf8=new Date(),_0x161855=_0x20ebf8[_0x13c11b(0x1ad)](),_0x8d49e2=(_0x20ebf8[_0x13c11b(0x1c1)]()+0x1)[_0x13c11b(0x19f)]()['padStart'](0x2,'0'),_0xb98e90=_0x20ebf8['getDate']()[_0x13c11b(0x19f)]()['padStart'](0x2,'0'),_0x526877=_0x20ebf8[_0x13c11b(0x1bc)]()[_0x13c11b(0x19f)]()[_0x13c11b(0x1ca)](0x2,'0'),_0x85e5b9=_0x20ebf8[_0x13c11b(0x1b4)]()['toString']()[_0x13c11b(0x1ca)](0x2,'0'),_0x2b2d05=_0x20ebf8[_0x13c11b(0x1b2)]()[_0x13c11b(0x19f)]()[_0x13c11b(0x1ca)](0x2,'0'),_0x1e19e5=_0x20ebf8[_0x13c11b(0x1cc)]()[_0x13c11b(0x19f)]()['padStart'](0x3,'0'),_0x1141ce=getTimezoneOffset();return _0x161855+'-'+_0x8d49e2+'-'+_0xb98e90+'\x20'+_0x526877+':'+_0x85e5b9+':'+_0x2b2d05+'.'+_0x1e19e5+_0x1141ce;}function formatColoredLogEntry(_0x1fdbd3,_0xcdb705){const _0x554474=a150_0x15e5,_0x355aa6=formatTimestamp(),_0x258e78=_0xcdb705[_0x554474(0x1a5)](safeStringify)['join']('\x20'),_0x32bb47=a150_0x5b90fe[_0x554474(0x1cd)](_0x355aa6);let _0x23951c;switch(_0x1fdbd3){case _0x554474(0x1c9):_0x23951c=a150_0x5b90fe[_0x554474(0x1be)]('['+_0x1fdbd3+']\x20');break;case _0x554474(0x1d2):_0x23951c=a150_0x5b90fe[_0x554474(0x1c2)]('['+_0x1fdbd3+']\x20');break;case _0x554474(0x1cb):_0x23951c=a150_0x5b90fe[_0x554474(0x1c0)]('['+_0x1fdbd3+']');break;case _0x554474(0x1a0):_0x23951c=a150_0x5b90fe[_0x554474(0x1cd)]('['+_0x1fdbd3+']');break;default:_0x23951c='['+_0x1fdbd3+']';}return _0x32bb47+'\x20'+_0x23951c+'\x20'+_0x258e78;}export var LogLevel;(function(_0x1d749d){const _0x55c0c6=a150_0x15e5;_0x1d749d[_0x1d749d['TRACE']=-0x2]='TRACE',_0x1d749d[_0x1d749d[_0x55c0c6(0x19b)]=-0x1]=_0x55c0c6(0x19b),_0x1d749d[_0x1d749d[_0x55c0c6(0x1bf)]=0x0]=_0x55c0c6(0x1bf),_0x1d749d[_0x1d749d[_0x55c0c6(0x196)]=0x1]=_0x55c0c6(0x196),_0x1d749d[_0x1d749d[_0x55c0c6(0x1a9)]=0x2]=_0x55c0c6(0x1a9);}(LogLevel||(LogLevel={})));export class TDXLogger{[a150_0x3d6c88(0x1a4)];['logDir'];['logLevel'];[a150_0x3d6c88(0x1c3)];constructor(_0x2d7397=LogLevel[a150_0x3d6c88(0x1bf)],_0x355a9d=![]){const _0xae10ca=a150_0x3d6c88;this[_0xae10ca(0x1ba)]=join(homedir(),_0xae10ca(0x1b5),_0xae10ca(0x1ac),_0xae10ca(0x195)),this[_0xae10ca(0x1c8)]=_0x2d7397,this['fileOnly']=_0x355a9d;}async[a150_0x3d6c88(0x19d)](){const _0x41c976=a150_0x3d6c88;try{await mkdir(this[_0x41c976(0x1ba)],{'recursive':!![]}),await this['rotateOldLogs']();const _0x3fe04d=join(this[_0x41c976(0x1ba)],_0x41c976(0x1a6));this[_0x41c976(0x1a4)]=createWriteStream(_0x3fe04d,{'flags':'a'}),this['logStream']['on'](_0x41c976(0x1cb),_0x24b771=>{const _0x3bdd30=_0x41c976;console[_0x3bdd30(0x1cb)](_0x3bdd30(0x193),_0x24b771['message']);});}catch(_0x109ddb){console[_0x41c976(0x1cb)](_0x41c976(0x1af),_0x109ddb);}}async[a150_0x3d6c88(0x1d0)](){const _0x4358aa=a150_0x3d6c88;try{const _0x404e6c=await readdir(this[_0x4358aa(0x1ba)]),_0x9af08=new Date()['toISOString']()['split']('T')[0x0];if(_0x404e6c['includes'](_0x4358aa(0x1a6))){const _0x32ef2f=join(this[_0x4358aa(0x1ba)],'tdx.log'),_0x4c03d2=await stat(_0x32ef2f),_0x302aa8=new Date(_0x4c03d2[_0x4358aa(0x1bb)])['toISOString']()['split']('T')[0x0];if(_0x302aa8<_0x9af08){const _0x1da3d6=join(this[_0x4358aa(0x1ba)],_0x4358aa(0x1c4)+_0x302aa8+_0x4358aa(0x1c6));await rename(_0x32ef2f,_0x1da3d6);}}const _0xc0b2a6=await readdir(this[_0x4358aa(0x1ba)]),_0x1f6911=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x26d0ff=_0xc0b2a6[_0x4358aa(0x1c7)](_0x5968e1=>_0x1f6911[_0x4358aa(0x1a2)](_0x5968e1));for(const _0x2dbe66 of _0x26d0ff){const _0x1685f1=join(this[_0x4358aa(0x1ba)],_0x2dbe66),_0x1c7e62=join(this[_0x4358aa(0x1ba)],_0x2dbe66+_0x4358aa(0x194));try{await pipeline(createReadStream(_0x1685f1),createGzip(),createWriteStream(_0x1c7e62)),await unlink(_0x1685f1);}catch(_0x37abad){console[_0x4358aa(0x1cb)](_0x4358aa(0x1b3)+_0x2dbe66+':',_0x37abad);}}}catch{}}[a150_0x3d6c88(0x1a0)](..._0x783091){const _0x44b2e1=a150_0x3d6c88;if(this[_0x44b2e1(0x1c8)]>LogLevel[_0x44b2e1(0x19b)])return;const _0x2124b8=formatColoredLogEntry(_0x44b2e1(0x1a0),_0x783091);this[_0x44b2e1(0x1a4)]?.[_0x44b2e1(0x1ce)](_0x2124b8+'\x0a');}[a150_0x3d6c88(0x1d1)](..._0x3af392){const _0x19d0df=a150_0x3d6c88;if(this[_0x19d0df(0x1c8)]>LogLevel[_0x19d0df(0x1c5)])return;const _0x8725c4=formatColoredLogEntry(_0x19d0df(0x1d1),_0x3af392);this[_0x19d0df(0x1a4)]?.['write'](_0x8725c4+'\x0a');}[a150_0x3d6c88(0x1c9)](..._0x2b0bdc){const _0x58a9d2=a150_0x3d6c88;if(this[_0x58a9d2(0x1c8)]>LogLevel['INFO'])return;const _0x370332=formatColoredLogEntry(_0x58a9d2(0x1c9),_0x2b0bdc);!this['fileOnly']&&console[_0x58a9d2(0x1bd)](_0x370332),this[_0x58a9d2(0x1a4)]?.['write'](_0x370332+'\x0a');}[a150_0x3d6c88(0x1d2)](..._0x4f5c8b){const _0x143eae=a150_0x3d6c88;if(this[_0x143eae(0x1c8)]>LogLevel[_0x143eae(0x196)])return;const _0x2ee7a6=formatColoredLogEntry(_0x143eae(0x1d2),_0x4f5c8b);!this[_0x143eae(0x1c3)]&&console[_0x143eae(0x1cb)](_0x2ee7a6),this[_0x143eae(0x1a4)]?.[_0x143eae(0x1ce)](_0x2ee7a6+'\x0a');}[a150_0x3d6c88(0x1cb)](..._0x3f3a45){const _0x43e795=a150_0x3d6c88,_0x52661b=formatColoredLogEntry(_0x43e795(0x1cb),_0x3f3a45);!this[_0x43e795(0x1c3)]&&console[_0x43e795(0x1cb)](_0x52661b),this[_0x43e795(0x1a4)]?.[_0x43e795(0x1ce)](_0x52661b+'\x0a');}async['close'](){const _0x2ac5ea=a150_0x3d6c88;return this[_0x2ac5ea(0x1c9)]('Proxy\x20session\x20ended'),new Promise(_0x53c54e=>{const _0x129b68=_0x2ac5ea;this[_0x129b68(0x1a4)]?this[_0x129b68(0x1a4)][_0x129b68(0x1ab)](()=>{_0x53c54e();}):_0x53c54e();});}[a150_0x3d6c88(0x19a)](){const _0x328dc1=a150_0x3d6c88;return join(this[_0x328dc1(0x1ba)],_0x328dc1(0x1a6));}}function a150_0x3c47(){const _0x4fc354=['getLogPath','DEBUG','3882053XwykCC','init','1550275VgDLAb','toString','debug','1102478YcAZnW','test','858IhskOl','logStream','map','tdx.log','3FSeTmL','stack','ERROR','191676WlwjBn','end','tdx','getFullYear','floor','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','6RdfOPX','stringify','getSeconds','Warning:\x20Failed\x20to\x20compress\x20','getMinutes','.cache','1058780CGsnes','9YmmXgp','string','1097328yLJgQJ','logDir','mtime','getHours','log','cyan','INFO','red','getMonth','yellow','fileOnly','tdx-','TRACE','.log','filter','logLevel','info','padStart','error','getMilliseconds','gray','write','4FgGqcc','rotateOldLogs','trace','warn','message','Warning:\x20Error\x20writing\x20to\x20tdx.log:','.gz','logs','WARN','541140eQcgJU','name','abs'];a150_0x3c47=function(){return _0x4fc354;};return a150_0x3c47();}
@@ -1 +1 @@
1
- const a151_0x700526=a151_0x221d;(function(_0x669753,_0x48a035){const _0x39a18d=a151_0x221d,_0x3eb7bb=_0x669753();while(!![]){try{const _0x220378=-parseInt(_0x39a18d(0x1c6))/0x1*(parseInt(_0x39a18d(0x1e3))/0x2)+-parseInt(_0x39a18d(0x1d9))/0x3*(-parseInt(_0x39a18d(0x1d6))/0x4)+parseInt(_0x39a18d(0x1e0))/0x5*(parseInt(_0x39a18d(0x1c2))/0x6)+parseInt(_0x39a18d(0x1d4))/0x7*(parseInt(_0x39a18d(0x1d3))/0x8)+parseInt(_0x39a18d(0x1da))/0x9*(parseInt(_0x39a18d(0x1cc))/0xa)+parseInt(_0x39a18d(0x1cb))/0xb*(-parseInt(_0x39a18d(0x1e7))/0xc)+-parseInt(_0x39a18d(0x1e4))/0xd;if(_0x220378===_0x48a035)break;else _0x3eb7bb['push'](_0x3eb7bb['shift']());}catch(_0xa66601){_0x3eb7bb['push'](_0x3eb7bb['shift']());}}}(a151_0x2088,0x1fbe1));function a151_0x2088(){const _0x26e148=['https://registry.npmjs.org/@treasuredata/tdx/latest','9hiteLG','9OBlaLt','green','write','HTTP\x20','Run:','stringify','5yCvOds','dim','version','10930IMWggM','2511496kBJDct','last_version_check','Update\x20available:','1700760cDoUcI','end','stderr','\x0aRun:\x20','destroy','yellow','1201866arTDZh','utf-8','cyan','getTime','45GKKVQG','gray','Request\x20timeout','updateAvailable','isTTY','11jLdtiD','1598110UBXBLY','env','error','toISOString','statusCode','latestVersion','currentVersion','685704RszacY','21UgvWpg','npm\x20install\x20-g\x20@treasuredata/tdx@latest','124804GvlPlQ','parse'];a151_0x2088=function(){return _0x26e148;};return a151_0x2088();}import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a151_0x537668 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a151_0x700526(0x1d8),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x1ac90b=a151_0x700526,_0x465acb=getCacheDir();return join(_0x465acb,_0x1ac90b(0x1e5));}function readCache(){const _0x5b65ac=a151_0x700526;try{const _0x4a1b10=getCacheFilePath(),_0x4adfb4=readFileSync(_0x4a1b10,_0x5b65ac(0x1c3));return JSON['parse'](_0x4adfb4);}catch{return null;}}function writeCache(_0x1ac42f){const _0x28bc47=a151_0x700526;try{const _0x369341=getCacheDir();mkdirSync(_0x369341,{'recursive':!![]});const _0x4a4f78={'lastCheck':new Date()[_0x28bc47(0x1cf)](),'latestVersion':_0x1ac42f},_0x246c6b=getCacheFilePath();writeFileSync(_0x246c6b,JSON[_0x28bc47(0x1df)](_0x4a4f78,null,0x2),_0x28bc47(0x1c3));}catch{}}function isCacheValid(_0x259556){const _0x41e61a=a151_0x700526;if(!_0x259556)return![];const _0x4ac1eb=new Date(_0x259556['lastCheck'])[_0x41e61a(0x1c5)](),_0x20c295=Date['now']();return _0x20c295-_0x4ac1eb<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x2e1b46,_0x31afb4)=>{const _0xa6e07b=a151_0x221d,_0x45e6a8=get(NPM_REGISTRY_URL,_0x596a10=>{const _0x29e2f2=a151_0x221d;if(_0x596a10[_0x29e2f2(0x1d0)]!==0xc8){clearTimeout(_0x42d65d),_0x31afb4(new Error(_0x29e2f2(0x1dd)+_0x596a10[_0x29e2f2(0x1d0)]));return;}let _0x130cad='';_0x596a10['on']('data',_0xcd9730=>{_0x130cad+=_0xcd9730;}),_0x596a10['on'](_0x29e2f2(0x1e8),()=>{const _0x2dc374=_0x29e2f2;clearTimeout(_0x42d65d);try{const _0x5b17f9=JSON[_0x2dc374(0x1d7)](_0x130cad);if(!valid(_0x5b17f9[_0x2dc374(0x1e2)])){_0x31afb4(new Error('Invalid\x20version\x20format'));return;}_0x2e1b46(_0x5b17f9[_0x2dc374(0x1e2)]);}catch(_0x1234f4){_0x31afb4(_0x1234f4);}});})['on'](_0xa6e07b(0x1ce),_0x5b872f=>{clearTimeout(_0x42d65d),_0x31afb4(_0x5b872f);}),_0x42d65d=setTimeout(()=>{const _0x1723a7=_0xa6e07b;_0x45e6a8[_0x1723a7(0x1eb)](),_0x31afb4(new Error(_0x1723a7(0x1c8)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x293d48){const _0x1652ca=a151_0x700526;try{const _0x2a88ae=readCache();if(isCacheValid(_0x2a88ae)){const _0x5a06f6=gt(_0x2a88ae[_0x1652ca(0x1d1)],_0x293d48);return{'updateAvailable':_0x5a06f6,'currentVersion':_0x293d48,'latestVersion':_0x2a88ae[_0x1652ca(0x1d1)]};}const _0x29fe95=await fetchLatestVersion();writeCache(_0x29fe95);const _0x4b06b0=gt(_0x29fe95,_0x293d48);return{'updateAvailable':_0x4b06b0,'currentVersion':_0x293d48,'latestVersion':_0x29fe95};}catch{return null;}}function a151_0x221d(_0x21e605,_0x365db6){_0x21e605=_0x21e605-0x1c1;const _0x20884d=a151_0x2088();let _0x221d2a=_0x20884d[_0x21e605];return _0x221d2a;}export function displayUpdateNotification(_0x3be569){const _0x176189=a151_0x700526;if(!_0x3be569[_0x176189(0x1c9)])return;const _0x22a1f8=process['stderr'][_0x176189(0x1ca)]&&!process[_0x176189(0x1cd)]['NO_COLOR'],_0x40360e=_0x22a1f8?a151_0x537668[_0x176189(0x1c7)]('→'):'→',_0x1ad9fe=_0x22a1f8?a151_0x537668[_0x176189(0x1e1)](_0x3be569[_0x176189(0x1d2)]):_0x3be569['currentVersion'],_0x36c27b=_0x22a1f8?a151_0x537668[_0x176189(0x1db)](_0x3be569[_0x176189(0x1d1)]):_0x3be569[_0x176189(0x1d1)],_0x541411=_0x22a1f8?a151_0x537668[_0x176189(0x1c4)](_0x176189(0x1d5)):_0x176189(0x1d5),_0x3ec5e8=_0x22a1f8?'\x0a'+a151_0x537668[_0x176189(0x1c1)](_0x176189(0x1e6))+'\x20'+_0x1ad9fe+'\x20'+_0x40360e+'\x20'+_0x36c27b+'\x0a'+a151_0x537668['dim'](_0x176189(0x1de))+'\x20'+_0x541411+'\x0a':'\x0aUpdate\x20available:\x20'+_0x1ad9fe+'\x20'+_0x40360e+'\x20'+_0x36c27b+_0x176189(0x1ea)+_0x541411+'\x0a';process[_0x176189(0x1e9)][_0x176189(0x1dc)](_0x3ec5e8);}
1
+ (function(_0x4b1832,_0x10928a){const _0x51774f=a151_0x48fb,_0xc45f0=_0x4b1832();while(!![]){try{const _0x43ee89=-parseInt(_0x51774f(0xb4))/0x1*(parseInt(_0x51774f(0x9a))/0x2)+-parseInt(_0x51774f(0xa2))/0x3+parseInt(_0x51774f(0xb9))/0x4+-parseInt(_0x51774f(0xa7))/0x5*(-parseInt(_0x51774f(0x9d))/0x6)+-parseInt(_0x51774f(0xad))/0x7+-parseInt(_0x51774f(0xa8))/0x8+parseInt(_0x51774f(0xbc))/0x9;if(_0x43ee89===_0x10928a)break;else _0xc45f0['push'](_0xc45f0['shift']());}catch(_0x5ee511){_0xc45f0['push'](_0xc45f0['shift']());}}}(a151_0x396e,0x6fa23));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a151_0x1303f0 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL='https://registry.npmjs.org/@treasuredata/tdx/latest',TIMEOUT_MS=0x7d0;function a151_0x48fb(_0x784d9b,_0x3ec8fe){_0x784d9b=_0x784d9b-0x9a;const _0x396e4a=a151_0x396e();let _0x48fb4b=_0x396e4a[_0x784d9b];return _0x48fb4b;}function getCacheFilePath(){const _0x2640be=a151_0x48fb,_0x5ca2cd=getCacheDir();return join(_0x5ca2cd,_0x2640be(0xbb));}function a151_0x396e(){const _0x328f71=['lastCheck','isTTY','now','updateAvailable','364936rmWicp','yellow','last_version_check','42237GFPqQI','Run:','HTTP\x20','stringify','106gxhkAO','env','version','150nXYYBJ','NO_COLOR','write','statusCode','data','356334GMmLcJ','parse','toISOString','Update\x20available:','currentVersion','138955tYtojb','563040fKSrGJ','\x0aUpdate\x20available:\x20','Invalid\x20version\x20format','npm\x20install\x20-g\x20@treasuredata/tdx@latest','\x0aRun:\x20','632002ZNpuaR','utf-8','dim','latestVersion','stderr','gray','cyan','1019DBJBRo'];a151_0x396e=function(){return _0x328f71;};return a151_0x396e();}function readCache(){const _0x524948=a151_0x48fb;try{const _0x1d0894=getCacheFilePath(),_0x49331a=readFileSync(_0x1d0894,_0x524948(0xae));return JSON['parse'](_0x49331a);}catch{return null;}}function writeCache(_0x4d13d3){const _0x316bb6=a151_0x48fb;try{const _0x69db92=getCacheDir();mkdirSync(_0x69db92,{'recursive':!![]});const _0x23030c={'lastCheck':new Date()[_0x316bb6(0xa4)](),'latestVersion':_0x4d13d3},_0x3ec2dd=getCacheFilePath();writeFileSync(_0x3ec2dd,JSON[_0x316bb6(0xbf)](_0x23030c,null,0x2),_0x316bb6(0xae));}catch{}}function isCacheValid(_0x446504){const _0x5bdd69=a151_0x48fb;if(!_0x446504)return![];const _0x581344=new Date(_0x446504[_0x5bdd69(0xb5)])['getTime'](),_0x33e8d5=Date[_0x5bdd69(0xb7)]();return _0x33e8d5-_0x581344<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x5e0ab7,_0x1257ad)=>{const _0x18d089=get(NPM_REGISTRY_URL,_0x112122=>{const _0x2815dd=a151_0x48fb;if(_0x112122[_0x2815dd(0xa0)]!==0xc8){clearTimeout(_0x1225a8),_0x1257ad(new Error(_0x2815dd(0xbe)+_0x112122[_0x2815dd(0xa0)]));return;}let _0x2ab32c='';_0x112122['on'](_0x2815dd(0xa1),_0x23cecf=>{_0x2ab32c+=_0x23cecf;}),_0x112122['on']('end',()=>{const _0x5f3117=_0x2815dd;clearTimeout(_0x1225a8);try{const _0x60a156=JSON[_0x5f3117(0xa3)](_0x2ab32c);if(!valid(_0x60a156['version'])){_0x1257ad(new Error(_0x5f3117(0xaa)));return;}_0x5e0ab7(_0x60a156[_0x5f3117(0x9c)]);}catch(_0x15231c){_0x1257ad(_0x15231c);}});})['on']('error',_0x523d04=>{clearTimeout(_0x1225a8),_0x1257ad(_0x523d04);}),_0x1225a8=setTimeout(()=>{_0x18d089['destroy'](),_0x1257ad(new Error('Request\x20timeout'));},TIMEOUT_MS);});}export async function checkForUpdate(_0x2d287b){const _0x211f86=a151_0x48fb;try{const _0x4d7080=readCache();if(isCacheValid(_0x4d7080)){const _0x1fd44c=gt(_0x4d7080[_0x211f86(0xb0)],_0x2d287b);return{'updateAvailable':_0x1fd44c,'currentVersion':_0x2d287b,'latestVersion':_0x4d7080[_0x211f86(0xb0)]};}const _0x8bf0c8=await fetchLatestVersion();writeCache(_0x8bf0c8);const _0x2496fb=gt(_0x8bf0c8,_0x2d287b);return{'updateAvailable':_0x2496fb,'currentVersion':_0x2d287b,'latestVersion':_0x8bf0c8};}catch{return null;}}export function displayUpdateNotification(_0x1a3f18){const _0x422429=a151_0x48fb;if(!_0x1a3f18[_0x422429(0xb8)])return;const _0x309165=process[_0x422429(0xb1)][_0x422429(0xb6)]&&!process[_0x422429(0x9b)][_0x422429(0x9e)],_0x301892=_0x309165?a151_0x1303f0[_0x422429(0xb2)]('→'):'→',_0x3a26f5=_0x309165?a151_0x1303f0[_0x422429(0xaf)](_0x1a3f18[_0x422429(0xa6)]):_0x1a3f18[_0x422429(0xa6)],_0x1dff9e=_0x309165?a151_0x1303f0['green'](_0x1a3f18['latestVersion']):_0x1a3f18['latestVersion'],_0x2e9fce=_0x309165?a151_0x1303f0[_0x422429(0xb3)](_0x422429(0xab)):_0x422429(0xab),_0x50f72b=_0x309165?'\x0a'+a151_0x1303f0[_0x422429(0xba)](_0x422429(0xa5))+'\x20'+_0x3a26f5+'\x20'+_0x301892+'\x20'+_0x1dff9e+'\x0a'+a151_0x1303f0[_0x422429(0xaf)](_0x422429(0xbd))+'\x20'+_0x2e9fce+'\x0a':_0x422429(0xa9)+_0x3a26f5+'\x20'+_0x301892+'\x20'+_0x1dff9e+_0x422429(0xac)+_0x2e9fce+'\x0a';process[_0x422429(0xb1)][_0x422429(0x9f)](_0x50f72b);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "0.14.8",
3
+ "version": "0.14.9",
4
4
  "description": "AI-native CLI for Treasure Data - optimized for both human engineers and AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {