@treasuredata/tdx 0.8.10 → 0.8.12

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 (147) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/client/cdp-api-client.d.ts +10 -1
  8. package/dist/client/cdp-api-client.d.ts.map +1 -1
  9. package/dist/client/cdp-api-client.js +1 -1
  10. package/dist/client/cdp-api-client.js.map +1 -1
  11. package/dist/client/engage-api-client.js +1 -1
  12. package/dist/client/http-client.js +1 -1
  13. package/dist/client/llm-api-client.js +1 -1
  14. package/dist/client/rate-limiter.js +1 -1
  15. package/dist/client/td-api-client.js +1 -1
  16. package/dist/client/trino-api-client.js +1 -1
  17. package/dist/client/workflow-client.js +1 -1
  18. package/dist/commands/activations.js +1 -1
  19. package/dist/commands/api-command.js +1 -1
  20. package/dist/commands/auth-command.js +1 -1
  21. package/dist/commands/chat-command.js +1 -1
  22. package/dist/commands/claude-command.d.ts +23 -0
  23. package/dist/commands/claude-command.d.ts.map +1 -1
  24. package/dist/commands/claude-command.js +1 -1
  25. package/dist/commands/claude-command.js.map +1 -1
  26. package/dist/commands/claude-statusline-command.js +1 -1
  27. package/dist/commands/claude-usage-command.js +1 -1
  28. package/dist/commands/command.js +1 -1
  29. package/dist/commands/connection-command.js +1 -1
  30. package/dist/commands/context-command.js +1 -1
  31. package/dist/commands/databases.js +1 -1
  32. package/dist/commands/describe.js +1 -1
  33. package/dist/commands/engage-command.js +1 -1
  34. package/dist/commands/job-command.js +1 -1
  35. package/dist/commands/journey-command.d.ts +12 -0
  36. package/dist/commands/journey-command.d.ts.map +1 -1
  37. package/dist/commands/journey-command.js +1 -1
  38. package/dist/commands/journey-command.js.map +1 -1
  39. package/dist/commands/llm-command.js +1 -1
  40. package/dist/commands/llm-proxy.js +1 -1
  41. package/dist/commands/parent-segment-command.js +1 -1
  42. package/dist/commands/profiles-command.js +1 -1
  43. package/dist/commands/query-command.js +1 -1
  44. package/dist/commands/segment-command.js +1 -1
  45. package/dist/commands/segment-create-command.js +1 -1
  46. package/dist/commands/segment-fields-command.js +1 -1
  47. package/dist/commands/segment-pull-command.js +1 -1
  48. package/dist/commands/segment-push-command.d.ts.map +1 -1
  49. package/dist/commands/segment-push-command.js +1 -1
  50. package/dist/commands/segment-push-command.js.map +1 -1
  51. package/dist/commands/segment-update-command.js +1 -1
  52. package/dist/commands/segment-use-command.js +1 -1
  53. package/dist/commands/segments.d.ts.map +1 -1
  54. package/dist/commands/segments.js +1 -1
  55. package/dist/commands/segments.js.map +1 -1
  56. package/dist/commands/show.js +1 -1
  57. package/dist/commands/tables.js +1 -1
  58. package/dist/commands/use-command.js +1 -1
  59. package/dist/commands/user-command.js +1 -1
  60. package/dist/commands/workflow-command.js +1 -1
  61. package/dist/core/auth.js +1 -1
  62. package/dist/core/config.js +1 -1
  63. package/dist/core/connection-cache.js +1 -1
  64. package/dist/core/credential-cache.js +1 -1
  65. package/dist/core/global-context.js +1 -1
  66. package/dist/core/keychain.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/index.js +1 -1
  72. package/dist/proxy/anthropic-adapter.js +1 -1
  73. package/dist/proxy/claude-usage-tracker.js +1 -1
  74. package/dist/proxy/context-signature.js +1 -1
  75. package/dist/proxy/conversation-utils.js +1 -1
  76. package/dist/proxy/server.js +1 -1
  77. package/dist/proxy/session-cache.js +1 -1
  78. package/dist/sdk/api.js +1 -1
  79. package/dist/sdk/connection.js +1 -1
  80. package/dist/sdk/engage.js +1 -1
  81. package/dist/sdk/errors.d.ts +2 -0
  82. package/dist/sdk/errors.d.ts.map +1 -1
  83. package/dist/sdk/errors.js +1 -1
  84. package/dist/sdk/errors.js.map +1 -1
  85. package/dist/sdk/index.js +1 -1
  86. package/dist/sdk/job.js +1 -1
  87. package/dist/sdk/journey.d.ts +15 -1
  88. package/dist/sdk/journey.d.ts.map +1 -1
  89. package/dist/sdk/journey.js +1 -1
  90. package/dist/sdk/journey.js.map +1 -1
  91. package/dist/sdk/llm.js +1 -1
  92. package/dist/sdk/query.js +1 -1
  93. package/dist/sdk/segment/child-segment-yaml.d.ts +5 -1
  94. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  95. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  96. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  97. package/dist/sdk/segment/journey-yaml.d.ts +18 -1
  98. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  99. package/dist/sdk/segment/journey-yaml.js +1 -1
  100. package/dist/sdk/segment/journey-yaml.js.map +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.js +1 -1
  104. package/dist/sdk/user.js +1 -1
  105. package/dist/sdk/workflow.js +1 -1
  106. package/dist/types/cdp.d.ts +37 -0
  107. package/dist/types/cdp.d.ts.map +1 -1
  108. package/dist/types/endpoints.js +1 -1
  109. package/dist/types/index.d.ts +1 -1
  110. package/dist/types/index.d.ts.map +1 -1
  111. package/dist/types/index.js +1 -1
  112. package/dist/utils/agent-ref-parser.js +1 -1
  113. package/dist/utils/async.js +1 -1
  114. package/dist/utils/chat-cache.js +1 -1
  115. package/dist/utils/colors.js +1 -1
  116. package/dist/utils/command-output.js +1 -1
  117. package/dist/utils/constants.js +1 -1
  118. package/dist/utils/diff.js +1 -1
  119. package/dist/utils/fields-display.js +1 -1
  120. package/dist/utils/file-permissions.js +1 -1
  121. package/dist/utils/format-detector.js +1 -1
  122. package/dist/utils/formatters.js +1 -1
  123. package/dist/utils/journey-utils.js +1 -1
  124. package/dist/utils/json-loader.js +1 -1
  125. package/dist/utils/llm-backup-utils.js +1 -1
  126. package/dist/utils/model-aliases.js +1 -1
  127. package/dist/utils/model-factors.js +1 -1
  128. package/dist/utils/option-validation.js +1 -1
  129. package/dist/utils/port.js +1 -1
  130. package/dist/utils/process.js +1 -1
  131. package/dist/utils/prompt.js +1 -1
  132. package/dist/utils/segment-path-parser.js +1 -1
  133. package/dist/utils/segment-ref-parser.js +1 -1
  134. package/dist/utils/spinner.js +1 -1
  135. package/dist/utils/sql-parser.js +1 -1
  136. package/dist/utils/sse-parser.js +1 -1
  137. package/dist/utils/string-utils.js +1 -1
  138. package/dist/utils/table-ref-parser.js +1 -1
  139. package/dist/utils/tdx-config.js +1 -1
  140. package/dist/utils/tdx-logger.js +1 -1
  141. package/dist/utils/tree-formatter.d.ts +2 -0
  142. package/dist/utils/tree-formatter.d.ts.map +1 -1
  143. package/dist/utils/tree-formatter.js +1 -1
  144. package/dist/utils/tree-formatter.js.map +1 -1
  145. package/dist/utils/version-check.js +1 -1
  146. package/dist/utils/workflow-utils.js +1 -1
  147. package/package.json +1 -1
@@ -1 +1 @@
1
- function a100_0x1cc0(){const _0x40a7c2=['INVALID_ARGUMENT','NOT_FOUND','Failed\x20to\x20load\x20JSON:\x20','1583466yZOMVO','Invalid\x20JSON\x20string:\x20','\x27:\x20','1446651vItWUF','code','4jPTwhA','852368UysWOM','1uHZuaF','434049vQLCXz','INTERNAL','Permission\x20denied\x20reading\x20file:\x20','message','utf-8','Invalid\x20JSON\x20in\x20file\x20\x27','35954490LiOPsf','parse','63qtQBgw','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','ENOENT','PERMISSION_DENIED','4107126lIWNlQ','8532225TljQsQ','File\x20not\x20found:\x20'];a100_0x1cc0=function(){return _0x40a7c2;};return a100_0x1cc0();}(function(_0x14d029,_0x45eb74){const _0x2dec79=a100_0x5665,_0x3cbfc3=_0x14d029();while(!![]){try{const _0x5240e=-parseInt(_0x2dec79(0xd5))/0x1*(-parseInt(_0x2dec79(0xe8))/0x2)+parseInt(_0x2dec79(0xd1))/0x3+-parseInt(_0x2dec79(0xd3))/0x4*(-parseInt(_0x2dec79(0xe3))/0x5)+parseInt(_0x2dec79(0xe2))/0x6+parseInt(_0x2dec79(0xd6))/0x7+parseInt(_0x2dec79(0xd4))/0x8*(parseInt(_0x2dec79(0xde))/0x9)+-parseInt(_0x2dec79(0xdc))/0xa;if(_0x5240e===_0x45eb74)break;else _0x3cbfc3['push'](_0x3cbfc3['shift']());}catch(_0x2d509f){_0x3cbfc3['push'](_0x3cbfc3['shift']());}}}(a100_0x1cc0,0xd62f0));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a100_0x5665(_0xdf6588,_0x1201a5){_0xdf6588=_0xdf6588-0xcf;const _0x1cc050=a100_0x1cc0();let _0x56651d=_0x1cc050[_0xdf6588];return _0x56651d;}export async function loadJSON(_0x1a6a88,_0x14ff23){const _0x33451d=a100_0x5665;try{if(_0x14ff23){const _0x2a1100=await readFile(_0x1a6a88,_0x33451d(0xda));try{return JSON['parse'](_0x2a1100);}catch(_0x2b0067){throw new SDKError(ErrorCode[_0x33451d(0xe5)],_0x33451d(0xdb)+_0x1a6a88+_0x33451d(0xd0)+(_0x2b0067 instanceof Error?_0x2b0067[_0x33451d(0xd9)]:String(_0x2b0067)));}}else try{return JSON[_0x33451d(0xdd)](_0x1a6a88);}catch(_0x41dcc7){throw new SDKError(ErrorCode[_0x33451d(0xe5)],_0x33451d(0xcf)+(_0x41dcc7 instanceof Error?_0x41dcc7[_0x33451d(0xd9)]:String(_0x41dcc7)));}}catch(_0xfc00db){if(_0xfc00db instanceof SDKError)throw _0xfc00db;if(_0xfc00db instanceof Error&&_0x33451d(0xd2)in _0xfc00db){const _0xb76425=_0xfc00db;if(_0xb76425[_0x33451d(0xd2)]===_0x33451d(0xe0))throw new SDKError(ErrorCode[_0x33451d(0xe6)],_0x33451d(0xe4)+_0x1a6a88);else{if(_0xb76425[_0x33451d(0xd2)]==='EACCES')throw new SDKError(ErrorCode[_0x33451d(0xe1)],_0x33451d(0xd8)+_0x1a6a88);}}throw new SDKError(ErrorCode[_0x33451d(0xd7)],_0x33451d(0xe7)+(_0xfc00db instanceof Error?_0xfc00db[_0x33451d(0xd9)]:String(_0xfc00db)));}}export async function loadJSONFromOptions(_0x32b12c,_0x1d3702){const _0x1393bd=a100_0x5665;if(_0x32b12c&&_0x1d3702)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1393bd(0xdf));if(_0x32b12c)return await loadJSON(_0x32b12c,![]);if(_0x1d3702)return await loadJSON(_0x1d3702,!![]);return undefined;}
1
+ function a100_0xe161(_0x2069eb,_0x2de062){_0x2069eb=_0x2069eb-0x11d;const _0x4df4de=a100_0x4df4();let _0xe16157=_0x4df4de[_0x2069eb];return _0xe16157;}function a100_0x4df4(){const _0x605503=['utf-8','parse','Permission\x20denied\x20reading\x20file:\x20','PERMISSION_DENIED','File\x20not\x20found:\x20','10591944BUhVNX','INVALID_ARGUMENT','code','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','NOT_FOUND','2451974YQBpfK','268824wCmkBD','66ePNtad','ENOENT','298LEappZ','Invalid\x20JSON\x20string:\x20','20iWvbyi','message','8872nSpHJn','8236308ehCqVE','45KDDQkE','1452NnbzGJ','3340wpxWoG','EACCES','Failed\x20to\x20load\x20JSON:\x20','Invalid\x20JSON\x20in\x20file\x20\x27','INTERNAL','3349908WtnHga'];a100_0x4df4=function(){return _0x605503;};return a100_0x4df4();}(function(_0x46ddf7,_0xc4ec72){const _0x48cbdc=a100_0xe161,_0x222765=_0x46ddf7();while(!![]){try{const _0x24e722=parseInt(_0x48cbdc(0x12f))/0x1*(parseInt(_0x48cbdc(0x137))/0x2)+parseInt(_0x48cbdc(0x136))/0x3*(-parseInt(_0x48cbdc(0x133))/0x4)+parseInt(_0x48cbdc(0x135))/0x5*(-parseInt(_0x48cbdc(0x12c))/0x6)+-parseInt(_0x48cbdc(0x12b))/0x7+-parseInt(_0x48cbdc(0x126))/0x8+parseInt(_0x48cbdc(0x120))/0x9*(-parseInt(_0x48cbdc(0x131))/0xa)+parseInt(_0x48cbdc(0x12d))/0xb*(parseInt(_0x48cbdc(0x134))/0xc);if(_0x24e722===_0xc4ec72)break;else _0x222765['push'](_0x222765['shift']());}catch(_0x43c8fd){_0x222765['push'](_0x222765['shift']());}}}(a100_0x4df4,0xafdef));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x4e7168,_0x397790){const _0x110881=a100_0xe161;try{if(_0x397790){const _0x145349=await readFile(_0x4e7168,_0x110881(0x121));try{return JSON['parse'](_0x145349);}catch(_0x1bd1df){throw new SDKError(ErrorCode[_0x110881(0x127)],_0x110881(0x11e)+_0x4e7168+'\x27:\x20'+(_0x1bd1df instanceof Error?_0x1bd1df[_0x110881(0x132)]:String(_0x1bd1df)));}}else try{return JSON[_0x110881(0x122)](_0x4e7168);}catch(_0x33eec0){throw new SDKError(ErrorCode[_0x110881(0x127)],_0x110881(0x130)+(_0x33eec0 instanceof Error?_0x33eec0[_0x110881(0x132)]:String(_0x33eec0)));}}catch(_0xe6a7e3){if(_0xe6a7e3 instanceof SDKError)throw _0xe6a7e3;if(_0xe6a7e3 instanceof Error&&'code'in _0xe6a7e3){const _0x434b7d=_0xe6a7e3;if(_0x434b7d['code']===_0x110881(0x12e))throw new SDKError(ErrorCode[_0x110881(0x12a)],_0x110881(0x125)+_0x4e7168);else{if(_0x434b7d[_0x110881(0x128)]===_0x110881(0x138))throw new SDKError(ErrorCode[_0x110881(0x124)],_0x110881(0x123)+_0x4e7168);}}throw new SDKError(ErrorCode[_0x110881(0x11f)],_0x110881(0x11d)+(_0xe6a7e3 instanceof Error?_0xe6a7e3[_0x110881(0x132)]:String(_0xe6a7e3)));}}export async function loadJSONFromOptions(_0x3c79a8,_0x6c1390){const _0x426f8a=a100_0xe161;if(_0x3c79a8&&_0x6c1390)throw new SDKError(ErrorCode[_0x426f8a(0x127)],_0x426f8a(0x129));if(_0x3c79a8)return await loadJSON(_0x3c79a8,![]);if(_0x6c1390)return await loadJSON(_0x6c1390,!![]);return undefined;}
@@ -1 +1 @@
1
- (function(_0x129935,_0x35a45d){const _0x259273=a101_0x115a,_0x543c56=_0x129935();while(!![]){try{const _0x554bdd=-parseInt(_0x259273(0x15d))/0x1*(parseInt(_0x259273(0x15a))/0x2)+parseInt(_0x259273(0x154))/0x3+parseInt(_0x259273(0x156))/0x4*(-parseInt(_0x259273(0x153))/0x5)+-parseInt(_0x259273(0x163))/0x6+parseInt(_0x259273(0x160))/0x7+-parseInt(_0x259273(0x161))/0x8*(parseInt(_0x259273(0x15c))/0x9)+parseInt(_0x259273(0x159))/0xa*(parseInt(_0x259273(0x162))/0xb);if(_0x554bdd===_0x35a45d)break;else _0x543c56['push'](_0x543c56['shift']());}catch(_0x5f0fd7){_0x543c56['push'](_0x543c56['shift']());}}}(a101_0x452f,0x97334));export function canCreateAgent(_0x3e3a95,_0x428cae){const _0x27206b=a101_0x115a;for(const _0x20fc96 of _0x3e3a95[_0x27206b(0x157)]['tools']){if(_0x20fc96['targetAgentId']&&!_0x428cae[_0x27206b(0x155)](_0x20fc96['targetAgentId']))return![];}return!![];}function a101_0x452f(){const _0x49dcd8=['7605896oDPmkS','9135214DIMKJe','357042IpyXhW','targetAgentId','1355050ATnweR','2460918UPFyhW','has','4fHrlYc','attributes','targetKnowledgeBaseId','10kymDzC','1881246qYtMvz','1.0','9MzJyzZ','1zEjcxK','map','get','8332891jvMiRx'];a101_0x452f=function(){return _0x49dcd8;};return a101_0x452f();}export function remapToolIds(_0x3a3cda,_0x1aa8e8,_0x528e0a){const _0x198d05=a101_0x115a;return _0x3a3cda[_0x198d05(0x15e)](_0x148e58=>({..._0x148e58,'targetKnowledgeBaseId':_0x148e58[_0x198d05(0x158)]?_0x1aa8e8[_0x198d05(0x15f)](_0x148e58[_0x198d05(0x158)])||_0x148e58['targetKnowledgeBaseId']:undefined,'targetAgentId':_0x148e58['targetAgentId']?_0x528e0a[_0x198d05(0x15f)](_0x148e58[_0x198d05(0x152)])||_0x148e58[_0x198d05(0x152)]:undefined}));}function a101_0x115a(_0x5188b6,_0x1e581d){_0x5188b6=_0x5188b6-0x152;const _0x452fc2=a101_0x452f();let _0x115ad2=_0x452fc2[_0x5188b6];return _0x115ad2;}export function remapVariableIds(_0x50b4f5,_0x18bc2c){const _0x538767=a101_0x115a;return _0x50b4f5[_0x538767(0x15e)](_0x58b679=>({..._0x58b679,'targetKnowledgeBaseId':_0x18bc2c[_0x538767(0x15f)](_0x58b679[_0x538767(0x158)])||_0x58b679[_0x538767(0x158)]}));}export function isSupportedBackupVersion(_0x4d478a){const _0x217c30=a101_0x115a;return _0x4d478a===_0x217c30(0x15b);}
1
+ (function(_0x4abed5,_0x3c6b1d){const _0xc41ddf=a101_0x713c,_0x2c4975=_0x4abed5();while(!![]){try{const _0x3ecfaf=parseInt(_0xc41ddf(0xca))/0x1+parseInt(_0xc41ddf(0xc8))/0x2*(parseInt(_0xc41ddf(0xc7))/0x3)+parseInt(_0xc41ddf(0xd5))/0x4*(-parseInt(_0xc41ddf(0xcf))/0x5)+parseInt(_0xc41ddf(0xcb))/0x6+-parseInt(_0xc41ddf(0xc9))/0x7+-parseInt(_0xc41ddf(0xcc))/0x8*(-parseInt(_0xc41ddf(0xce))/0x9)+parseInt(_0xc41ddf(0xd3))/0xa*(parseInt(_0xc41ddf(0xd6))/0xb);if(_0x3ecfaf===_0x3c6b1d)break;else _0x2c4975['push'](_0x2c4975['shift']());}catch(_0x4bde0e){_0x2c4975['push'](_0x2c4975['shift']());}}}(a101_0x20d7,0x871be));function a101_0x20d7(){const _0x50760e=['targetAgentId','70YJEMDY','get','4PWaLWG','678161UrBWvF','map','1.0','4479idSsMU','590ePinEE','5997271dQJEwv','570489AZwMcj','2603706xIPaob','1398448kosTjQ','tools','27fBQtnR','4953455fEsrKi','attributes','targetKnowledgeBaseId'];a101_0x20d7=function(){return _0x50760e;};return a101_0x20d7();}function a101_0x713c(_0x41d6bd,_0x1eee93){_0x41d6bd=_0x41d6bd-0xc6;const _0x20d736=a101_0x20d7();let _0x713cba=_0x20d736[_0x41d6bd];return _0x713cba;}export function canCreateAgent(_0x38d449,_0x5c5887){const _0xc315fa=a101_0x713c;for(const _0x4b8dcf of _0x38d449[_0xc315fa(0xd0)][_0xc315fa(0xcd)]){if(_0x4b8dcf[_0xc315fa(0xd2)]&&!_0x5c5887['has'](_0x4b8dcf[_0xc315fa(0xd2)]))return![];}return!![];}export function remapToolIds(_0x5e80c3,_0x14fb77,_0x39bf26){const _0x17833d=a101_0x713c;return _0x5e80c3[_0x17833d(0xd7)](_0x4168a8=>({..._0x4168a8,'targetKnowledgeBaseId':_0x4168a8[_0x17833d(0xd1)]?_0x14fb77[_0x17833d(0xd4)](_0x4168a8['targetKnowledgeBaseId'])||_0x4168a8['targetKnowledgeBaseId']:undefined,'targetAgentId':_0x4168a8['targetAgentId']?_0x39bf26[_0x17833d(0xd4)](_0x4168a8[_0x17833d(0xd2)])||_0x4168a8[_0x17833d(0xd2)]:undefined}));}export function remapVariableIds(_0xf3cb4f,_0x45a203){const _0x4ecad3=a101_0x713c;return _0xf3cb4f[_0x4ecad3(0xd7)](_0xf98f7e=>({..._0xf98f7e,'targetKnowledgeBaseId':_0x45a203['get'](_0xf98f7e[_0x4ecad3(0xd1)])||_0xf98f7e[_0x4ecad3(0xd1)]}));}export function isSupportedBackupVersion(_0x87e11d){const _0x54b73c=a101_0x713c;return _0x87e11d===_0x54b73c(0xc6);}
@@ -1 +1 @@
1
- const a102_0x43ef3a=a102_0xb40e;function a102_0x241b(){const _0x24c2dc=['3036144uMueLu','259BUCizh','40023PPCtEG','1604Fkdcdf','claude-4.5-sonnet','200PKdfoh','574524hCFGLO','66000fqFtMM','toLowerCase','14nZCaqu','22472285TMuHUk','855956nLABab','25SKlYtG','match'];a102_0x241b=function(){return _0x24c2dc;};return a102_0x241b();}(function(_0x11cb44,_0x3b1c9d){const _0x181563=a102_0xb40e,_0x2a99e2=_0x11cb44();while(!![]){try{const _0x2dd8f8=parseInt(_0x181563(0x131))/0x1*(parseInt(_0x181563(0x133))/0x2)+parseInt(_0x181563(0x136))/0x3+parseInt(_0x181563(0x12d))/0x4*(-parseInt(_0x181563(0x12e))/0x5)+parseInt(_0x181563(0x137))/0x6+parseInt(_0x181563(0x12b))/0x7*(-parseInt(_0x181563(0x130))/0x8)+parseInt(_0x181563(0x132))/0x9*(-parseInt(_0x181563(0x135))/0xa)+parseInt(_0x181563(0x12c))/0xb;if(_0x2dd8f8===_0x3b1c9d)break;else _0x2a99e2['push'](_0x2a99e2['shift']());}catch(_0x3a3a2f){_0x2a99e2['push'](_0x2a99e2['shift']());}}}(a102_0x241b,0x82ac8));function a102_0xb40e(_0x3e9ea5,_0x13714e){_0x3e9ea5=_0x3e9ea5-0x12a;const _0x241b3b=a102_0x241b();let _0xb40e69=_0x241b3b[_0x3e9ea5];return _0xb40e69;}const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':a102_0x43ef3a(0x134)};export function extractModelAlias(_0xff402f){const _0x32d164=a102_0x43ef3a,_0x46d891=_0xff402f[_0x32d164(0x12f)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x46d891)return _0x46d891[0x1][_0x32d164(0x12a)]();return _0xff402f;}export function resolveModelAlias(_0x2c767c){const _0x3f7911=a102_0x43ef3a;return MODEL_ALIASES[_0x2c767c[_0x3f7911(0x12a)]()]||_0x2c767c;}export function getModelAliases(){return{...MODEL_ALIASES};}
1
+ const a102_0x139b6e=a102_0xc0fb;(function(_0x598f9d,_0x321011){const _0x497c7c=a102_0xc0fb,_0x1669fd=_0x598f9d();while(!![]){try{const _0x27d71c=-parseInt(_0x497c7c(0xfb))/0x1*(-parseInt(_0x497c7c(0xf8))/0x2)+-parseInt(_0x497c7c(0xf5))/0x3+parseInt(_0x497c7c(0x103))/0x4*(parseInt(_0x497c7c(0xff))/0x5)+parseInt(_0x497c7c(0x102))/0x6*(-parseInt(_0x497c7c(0xf7))/0x7)+-parseInt(_0x497c7c(0x100))/0x8*(parseInt(_0x497c7c(0xfc))/0x9)+-parseInt(_0x497c7c(0xf6))/0xa+parseInt(_0x497c7c(0xf9))/0xb*(parseInt(_0x497c7c(0x101))/0xc);if(_0x27d71c===_0x321011)break;else _0x1669fd['push'](_0x1669fd['shift']());}catch(_0x9d7c13){_0x1669fd['push'](_0x1669fd['shift']());}}}(a102_0x2c89,0x46e77));function a102_0x2c89(){const _0x38a3ee=['32qPUsuU','12oyMwhk','2609862pUlVBA','1157096YIYcPR','995841xGGnZp','4211950eyIkCJ','7hQjyCN','10454DQiVaA','13928739XLuOVR','claude-4.5-sonnet','21DfInqp','420183glbghB','match','toLowerCase','5GjFoVX'];a102_0x2c89=function(){return _0x38a3ee;};return a102_0x2c89();}function a102_0xc0fb(_0xc9dbc4,_0x117238){_0xc9dbc4=_0xc9dbc4-0xf5;const _0x2c89d9=a102_0x2c89();let _0xc0fb2a=_0x2c89d9[_0xc9dbc4];return _0xc0fb2a;}const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':a102_0x139b6e(0xfa)};export function extractModelAlias(_0x4cf133){const _0xc688d9=a102_0x139b6e,_0x190483=_0x4cf133[_0xc688d9(0xfd)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x190483)return _0x190483[0x1][_0xc688d9(0xfe)]();return _0x4cf133;}export function resolveModelAlias(_0x1c69f7){return MODEL_ALIASES[_0x1c69f7['toLowerCase']()]||_0x1c69f7;}export function getModelAliases(){return{...MODEL_ALIASES};}
@@ -1 +1 @@
1
- (function(_0x57e00,_0x5be2b2){const _0xf1feaa=a103_0x4490,_0x251cfa=_0x57e00();while(!![]){try{const _0x4ad106=-parseInt(_0xf1feaa(0x10f))/0x1+-parseInt(_0xf1feaa(0x10d))/0x2*(parseInt(_0xf1feaa(0x11b))/0x3)+-parseInt(_0xf1feaa(0x109))/0x4+-parseInt(_0xf1feaa(0x110))/0x5*(parseInt(_0xf1feaa(0x116))/0x6)+parseInt(_0xf1feaa(0x114))/0x7*(parseInt(_0xf1feaa(0x119))/0x8)+-parseInt(_0xf1feaa(0x113))/0x9+parseInt(_0xf1feaa(0x115))/0xa;if(_0x4ad106===_0x5be2b2)break;else _0x251cfa['push'](_0x251cfa['shift']());}catch(_0x47f6cc){_0x251cfa['push'](_0x251cfa['shift']());}}}(a103_0x3e23,0x466b3));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};function a103_0x4490(_0x3fdad5,_0x609fcc){_0x3fdad5=_0x3fdad5-0x106;const _0x3e23c8=a103_0x3e23();let _0x4490e8=_0x3e23c8[_0x3fdad5];return _0x4490e8;}export function getModelFactor(_0x3a293c){const _0x50d418=a103_0x4490,_0x43397d=_0x3a293c[_0x50d418(0x112)]();if(MODEL_FACTORS[_0x43397d])return MODEL_FACTORS[_0x43397d];if(_0x43397d[_0x50d418(0x10e)](_0x50d418(0x10a)))return MODEL_FACTORS['sonnet'];if(_0x43397d[_0x50d418(0x10e)](_0x50d418(0x11d)))return MODEL_FACTORS[_0x50d418(0x11d)];if(_0x43397d[_0x50d418(0x10e)]('opus'))return MODEL_FACTORS[_0x50d418(0x11a)];return MODEL_FACTORS[_0x50d418(0x10a)];}export function getContextLimit(_0x5b0af2){const _0x20198c=a103_0x4490,_0x408e6d=_0x5b0af2[_0x20198c(0x112)]();if(_0x408e6d[_0x20198c(0x10e)](_0x20198c(0x10a)))return CONTEXT_LIMITS[_0x20198c(0x10a)];if(_0x408e6d['includes'](_0x20198c(0x11d)))return CONTEXT_LIMITS[_0x20198c(0x11d)];if(_0x408e6d[_0x20198c(0x10e)](_0x20198c(0x11a)))return CONTEXT_LIMITS[_0x20198c(0x11a)];return CONTEXT_LIMITS[_0x20198c(0x117)];}export function calculateChatUnit(_0x28af1e,_0x2a1843,_0x37dc45){return(_0x28af1e+_0x2a1843)/0x1388*_0x37dc45;}export function calculateCredits(_0x209766){return _0x209766/0x2904;}function a103_0x3e23(){const _0x4239f=['1029DGMkCe','13912770TeGxzK','102ACHIUO','default','Sonnet\x204','27480dqZoRc','opus','3HmpibM','Haiku\x204','haiku','4.5','toLocaleString','Haiku\x204.5','4-5','Opus\x204.5','1317708UaaHOm','sonnet','Claude','round','816934uFTOgX','includes','512944wfjxWs','255lVyqsI','en-US','toLowerCase','3204738rOnAPc'];a103_0x3e23=function(){return _0x4239f;};return a103_0x3e23();}export function getModelDisplayName(_0x5785f0){const _0x13dea4=a103_0x4490,_0x196d76=_0x5785f0[_0x13dea4(0x112)]();if(_0x196d76[_0x13dea4(0x10e)]('sonnet')){if(_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x107))||_0x196d76['includes'](_0x13dea4(0x11e)))return'Sonnet\x204.5';return _0x13dea4(0x118);}if(_0x196d76['includes'](_0x13dea4(0x11d))){if(_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x107))||_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x11e)))return _0x13dea4(0x106);return _0x13dea4(0x11c);}if(_0x196d76['includes']('opus')){if(_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x107))||_0x196d76[_0x13dea4(0x10e)]('4.5'))return _0x13dea4(0x108);return'Opus\x204';}return _0x13dea4(0x10b);}export function formatTokenCount(_0x17187a){const _0x3185d8=a103_0x4490;return _0x17187a[_0x3185d8(0x11f)](_0x3185d8(0x111));}export function calculateContextPercentage(_0x31a47c,_0x59d2a2){const _0x3a2571=a103_0x4490,_0x3377b2=getContextLimit(_0x59d2a2);return Math[_0x3a2571(0x10c)](_0x31a47c/_0x3377b2*0x64);}
1
+ (function(_0x102168,_0x123e3d){const _0x1253e8=a103_0x3bd5,_0x12f4e5=_0x102168();while(!![]){try{const _0x5c5e8a=-parseInt(_0x1253e8(0x113))/0x1*(-parseInt(_0x1253e8(0x117))/0x2)+-parseInt(_0x1253e8(0x11f))/0x3*(parseInt(_0x1253e8(0x11b))/0x4)+parseInt(_0x1253e8(0x11d))/0x5*(-parseInt(_0x1253e8(0x10f))/0x6)+-parseInt(_0x1253e8(0x125))/0x7*(-parseInt(_0x1253e8(0x10e))/0x8)+parseInt(_0x1253e8(0x126))/0x9+parseInt(_0x1253e8(0x123))/0xa*(-parseInt(_0x1253e8(0x111))/0xb)+parseInt(_0x1253e8(0x11c))/0xc;if(_0x5c5e8a===_0x123e3d)break;else _0x12f4e5['push'](_0x12f4e5['shift']());}catch(_0x36d30d){_0x12f4e5['push'](_0x12f4e5['shift']());}}}(a103_0x33a4,0xa77f2));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x48b563){const _0x4ea1d2=a103_0x3bd5,_0x85dc72=_0x48b563[_0x4ea1d2(0x128)]();if(MODEL_FACTORS[_0x85dc72])return MODEL_FACTORS[_0x85dc72];if(_0x85dc72[_0x4ea1d2(0x115)](_0x4ea1d2(0x116)))return MODEL_FACTORS[_0x4ea1d2(0x116)];if(_0x85dc72[_0x4ea1d2(0x115)](_0x4ea1d2(0x121)))return MODEL_FACTORS['haiku'];if(_0x85dc72[_0x4ea1d2(0x115)](_0x4ea1d2(0x118)))return MODEL_FACTORS[_0x4ea1d2(0x118)];return MODEL_FACTORS['sonnet'];}function a103_0x33a4(){const _0x1d3e89=['567416dtMZnh','10916004REzccu','20065JjeJBY','Sonnet\x204.5','12zoYoyA','Haiku\x204.5','haiku','Sonnet\x204','2610TfOlKG','Haiku\x204','5281087zuNrld','5961843QoxncM','round','toLowerCase','Opus\x204.5','Opus\x204','8yIBSma','1410MFAcKR','Claude','16357fjEMMG','en-US','1iHsqDj','4.5','includes','sonnet','516218utzHWY','opus','4-5','default'];a103_0x33a4=function(){return _0x1d3e89;};return a103_0x33a4();}export function getContextLimit(_0x54d6e1){const _0x19e889=a103_0x3bd5,_0x53797e=_0x54d6e1[_0x19e889(0x128)]();if(_0x53797e[_0x19e889(0x115)](_0x19e889(0x116)))return CONTEXT_LIMITS[_0x19e889(0x116)];if(_0x53797e[_0x19e889(0x115)](_0x19e889(0x121)))return CONTEXT_LIMITS[_0x19e889(0x121)];if(_0x53797e[_0x19e889(0x115)](_0x19e889(0x118)))return CONTEXT_LIMITS[_0x19e889(0x118)];return CONTEXT_LIMITS[_0x19e889(0x11a)];}export function calculateChatUnit(_0x2b8c37,_0x436a1d,_0x220333){return(_0x2b8c37+_0x436a1d)/0x1388*_0x220333;}export function calculateCredits(_0x1e3009){return _0x1e3009/0x2904;}export function getModelDisplayName(_0x2b3a02){const _0x5b0a83=a103_0x3bd5,_0x55c02e=_0x2b3a02[_0x5b0a83(0x128)]();if(_0x55c02e['includes']('sonnet')){if(_0x55c02e['includes']('4-5')||_0x55c02e[_0x5b0a83(0x115)](_0x5b0a83(0x114)))return _0x5b0a83(0x11e);return _0x5b0a83(0x122);}if(_0x55c02e[_0x5b0a83(0x115)](_0x5b0a83(0x121))){if(_0x55c02e[_0x5b0a83(0x115)]('4-5')||_0x55c02e[_0x5b0a83(0x115)](_0x5b0a83(0x114)))return _0x5b0a83(0x120);return _0x5b0a83(0x124);}if(_0x55c02e['includes'](_0x5b0a83(0x118))){if(_0x55c02e[_0x5b0a83(0x115)](_0x5b0a83(0x119))||_0x55c02e[_0x5b0a83(0x115)](_0x5b0a83(0x114)))return _0x5b0a83(0x129);return _0x5b0a83(0x10d);}return _0x5b0a83(0x110);}export function formatTokenCount(_0x21a0d5){const _0x2c76e4=a103_0x3bd5;return _0x21a0d5['toLocaleString'](_0x2c76e4(0x112));}function a103_0x3bd5(_0x230607,_0x349893){_0x230607=_0x230607-0x10d;const _0x33a45b=a103_0x33a4();let _0x3bd547=_0x33a45b[_0x230607];return _0x3bd547;}export function calculateContextPercentage(_0x5f366d,_0xd3035b){const _0xdba13c=a103_0x3bd5,_0x43c851=getContextLimit(_0xd3035b);return Math[_0xdba13c(0x127)](_0x5f366d/_0x43c851*0x64);}
@@ -1 +1 @@
1
- function a104_0x2250(_0x5c902d,_0x232c62){_0x5c902d=_0x5c902d-0x1bd;const _0x353336=a104_0x3533();let _0x225019=_0x353336[_0x5c902d];return _0x225019;}function a104_0x3533(){const _0xc6091f=['number','25380640hUexyC','76657ugmDFA','Invalid\x20limit\x20value:\x20','.\x20Must\x20be\x20a\x20number.','5547339pQcasF','9307120CHQbdZ','3RSiSan','822lMeXkZ','285770ljrfTa','.\x20Must\x20be\x20a\x20positive\x20number.','Invalid\x20timeout\x20value:\x20','4083ivYCfs','4754225rSjYjp','1580yGULhj'];a104_0x3533=function(){return _0xc6091f;};return a104_0x3533();}(function(_0x59b993,_0x343a6e){const _0xf4aef0=a104_0x2250,_0x4af053=_0x59b993();while(!![]){try{const _0x503810=-parseInt(_0xf4aef0(0x1c9))/0x1*(-parseInt(_0xf4aef0(0x1cb))/0x2)+parseInt(_0xf4aef0(0x1bf))/0x3*(parseInt(_0xf4aef0(0x1c1))/0x4)+-parseInt(_0xf4aef0(0x1c0))/0x5+parseInt(_0xf4aef0(0x1ca))/0x6*(parseInt(_0xf4aef0(0x1c4))/0x7)+parseInt(_0xf4aef0(0x1c8))/0x8+parseInt(_0xf4aef0(0x1c7))/0x9+-parseInt(_0xf4aef0(0x1c3))/0xa;if(_0x503810===_0x343a6e)break;else _0x4af053['push'](_0x4af053['shift']());}catch(_0x556307){_0x4af053['push'](_0x4af053['shift']());}}}(a104_0x3533,0xb8e8d));export function validateLimitOption(_0x2019d7){const _0x4ba37b=a104_0x2250;if(!Number['isInteger'](_0x2019d7))return{'isValid':![],'error':_0x4ba37b(0x1c5)+_0x2019d7+'.\x20Must\x20be\x20an\x20integer.'};if(_0x2019d7<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x2019d7+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x2019d7};}export function validateTimeoutOption(_0x4a2557,_0x3ec544=0x1e){const _0x45b0c8=a104_0x2250;if(_0x4a2557===undefined)return{'isValid':!![],'value':_0x3ec544};const _0x38d5dc=typeof _0x4a2557===_0x45b0c8(0x1c2)?_0x4a2557:parseFloat(_0x4a2557);if(isNaN(_0x38d5dc))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x4a2557+_0x45b0c8(0x1c6)};if(_0x38d5dc<=0x0)return{'isValid':![],'error':_0x45b0c8(0x1be)+_0x38d5dc+_0x45b0c8(0x1bd)};return{'isValid':!![],'value':_0x38d5dc};}
1
+ function a104_0xbfb8(_0x43e973,_0x1e1b85){_0x43e973=_0x43e973-0x181;const _0x58549e=a104_0x5854();let _0xbfb835=_0x58549e[_0x43e973];return _0xbfb835;}(function(_0x3fbc22,_0x3b91a3){const _0x517ff8=a104_0xbfb8,_0x18e055=_0x3fbc22();while(!![]){try{const _0x4b2c2b=parseInt(_0x517ff8(0x187))/0x1+parseInt(_0x517ff8(0x18b))/0x2*(parseInt(_0x517ff8(0x188))/0x3)+-parseInt(_0x517ff8(0x184))/0x4*(-parseInt(_0x517ff8(0x183))/0x5)+parseInt(_0x517ff8(0x185))/0x6+parseInt(_0x517ff8(0x189))/0x7+-parseInt(_0x517ff8(0x18e))/0x8+-parseInt(_0x517ff8(0x18c))/0x9;if(_0x4b2c2b===_0x3b91a3)break;else _0x18e055['push'](_0x18e055['shift']());}catch(_0x47568f){_0x18e055['push'](_0x18e055['shift']());}}}(a104_0x5854,0xaa85c));export function validateLimitOption(_0x50e48b){const _0x2743ad=a104_0xbfb8;if(!Number['isInteger'](_0x50e48b))return{'isValid':![],'error':_0x2743ad(0x181)+_0x50e48b+'.\x20Must\x20be\x20an\x20integer.'};if(_0x50e48b<=0x0)return{'isValid':![],'error':_0x2743ad(0x181)+_0x50e48b+_0x2743ad(0x182)};return{'isValid':!![],'value':_0x50e48b};}export function validateTimeoutOption(_0x4adc42,_0x233193=0x1e){const _0x43bbd0=a104_0xbfb8;if(_0x4adc42===undefined)return{'isValid':!![],'value':_0x233193};const _0x18553e=typeof _0x4adc42===_0x43bbd0(0x186)?_0x4adc42:parseFloat(_0x4adc42);if(isNaN(_0x18553e))return{'isValid':![],'error':_0x43bbd0(0x18a)+_0x4adc42+_0x43bbd0(0x18d)};if(_0x18553e<=0x0)return{'isValid':![],'error':_0x43bbd0(0x18a)+_0x18553e+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x18553e};}function a104_0x5854(){const _0x23bb03=['.\x20Must\x20be\x20a\x20number.','9802760wuBTsx','Invalid\x20limit\x20value:\x20','.\x20Must\x20be\x20a\x20positive\x20integer.','305SeRVsk','20312jkHfHM','3594840fLEYkD','number','167024plpsWO','3469152MYtGmQ','5644499XWyHdY','Invalid\x20timeout\x20value:\x20','2OzYLbl','10033722ojtNlW'];a104_0x5854=function(){return _0x23bb03;};return a104_0x5854();}
@@ -1 +1 @@
1
- (function(_0x441fd2,_0x26f9e6){const _0x4a41b6=a105_0xced4,_0x3cca3e=_0x441fd2();while(!![]){try{const _0x4abb84=parseInt(_0x4a41b6(0x168))/0x1*(-parseInt(_0x4a41b6(0x16f))/0x2)+parseInt(_0x4a41b6(0x163))/0x3*(parseInt(_0x4a41b6(0x16c))/0x4)+-parseInt(_0x4a41b6(0x164))/0x5*(-parseInt(_0x4a41b6(0x165))/0x6)+parseInt(_0x4a41b6(0x16b))/0x7+parseInt(_0x4a41b6(0x160))/0x8*(parseInt(_0x4a41b6(0x16e))/0x9)+parseInt(_0x4a41b6(0x161))/0xa+-parseInt(_0x4a41b6(0x170))/0xb;if(_0x4abb84===_0x26f9e6)break;else _0x3cca3e['push'](_0x3cca3e['shift']());}catch(_0x1c0c59){_0x3cca3e['push'](_0x3cca3e['shift']());}}}(a105_0x3254,0xc38f3));import{createServer}from'node:net';function a105_0xced4(_0x1a1bde,_0x1135f0){_0x1a1bde=_0x1a1bde-0x160;const _0x325441=a105_0x3254();let _0xced416=_0x325441[_0x1a1bde];return _0xced416;}function a105_0x3254(){const _0xbb6922=['code','45GAWvpQ','2Apihhu','36080858HnAhNJ','1948160frjdWP','2302010vQUzuu','listening','143457VHcbAV','835jlptBV','43158JnxHUe','once','No\x20available\x20port\x20found\x20between\x20','716872mPAOUi','error','listen','7678377IQEArc','88UwKmtJ'];a105_0x3254=function(){return _0xbb6922;};return a105_0x3254();}export async function isPortAvailable(_0x281ed4){return new Promise(_0x26a07f=>{const _0x34cd21=a105_0xced4,_0xdc4347=createServer();_0xdc4347[_0x34cd21(0x166)](_0x34cd21(0x169),_0x28c7c2=>{const _0x306697=_0x34cd21;_0x28c7c2[_0x306697(0x16d)]==='EADDRINUSE'?_0x26a07f(![]):_0x26a07f(![]);}),_0xdc4347[_0x34cd21(0x166)](_0x34cd21(0x162),()=>{_0xdc4347['close'](),_0x26a07f(!![]);}),_0xdc4347[_0x34cd21(0x16a)](_0x281ed4,'0.0.0.0');});}export async function findAvailablePort(_0x22b1f2=0xfa0,_0xb1bbcb=0x64){const _0x31c48b=a105_0xced4;for(let _0x43753d=0x0;_0x43753d<_0xb1bbcb;_0x43753d++){const _0x2f50ce=_0x22b1f2+_0x43753d;if(await isPortAvailable(_0x2f50ce))return _0x2f50ce;}throw new Error(_0x31c48b(0x167)+_0x22b1f2+'\x20and\x20'+(_0x22b1f2+_0xb1bbcb-0x1));}
1
+ function a105_0x7abc(_0x318855,_0x574881){_0x318855=_0x318855-0xfe;const _0x58930c=a105_0x5893();let _0x7abc30=_0x58930c[_0x318855];return _0x7abc30;}(function(_0x48cbba,_0x4fbc77){const _0x29a9bb=a105_0x7abc,_0xed8cfb=_0x48cbba();while(!![]){try{const _0x24d50c=parseInt(_0x29a9bb(0x10f))/0x1+-parseInt(_0x29a9bb(0x102))/0x2*(parseInt(_0x29a9bb(0x10b))/0x3)+parseInt(_0x29a9bb(0x10d))/0x4*(parseInt(_0x29a9bb(0x10c))/0x5)+-parseInt(_0x29a9bb(0x106))/0x6*(-parseInt(_0x29a9bb(0xff))/0x7)+parseInt(_0x29a9bb(0x108))/0x8*(-parseInt(_0x29a9bb(0x110))/0x9)+parseInt(_0x29a9bb(0x107))/0xa+-parseInt(_0x29a9bb(0x10e))/0xb*(-parseInt(_0x29a9bb(0xfe))/0xc);if(_0x24d50c===_0x4fbc77)break;else _0xed8cfb['push'](_0xed8cfb['shift']());}catch(_0x69aee6){_0xed8cfb['push'](_0xed8cfb['shift']());}}}(a105_0x5893,0xc5b05));import{createServer}from'node:net';export async function isPortAvailable(_0x2d4dcf){return new Promise(_0x235b2c=>{const _0x44c754=a105_0x7abc,_0x200c73=createServer();_0x200c73[_0x44c754(0x103)]('error',_0x4b950f=>{const _0x510fb5=_0x44c754;_0x4b950f['code']===_0x510fb5(0x109)?_0x235b2c(![]):_0x235b2c(![]);}),_0x200c73[_0x44c754(0x103)](_0x44c754(0x10a),()=>{const _0x27f6cb=_0x44c754;_0x200c73[_0x27f6cb(0x104)](),_0x235b2c(!![]);}),_0x200c73[_0x44c754(0x105)](_0x2d4dcf,_0x44c754(0x101));});}function a105_0x5893(){const _0x15cd9b=['0.0.0.0','3240jdJQCe','once','close','listen','6YvUWxn','6118610jtwCYw','48cULhZl','EADDRINUSE','listening','2913mosevM','3406295HKmXAh','4WWPuQO','11mOxfhS','163488QaqbPC','2361591iPZvLZ','24627624sGQeoD','3137659DxPgcd','No\x20available\x20port\x20found\x20between\x20'];a105_0x5893=function(){return _0x15cd9b;};return a105_0x5893();}export async function findAvailablePort(_0x208215=0xfa0,_0x2ab700=0x64){const _0x57cf80=a105_0x7abc;for(let _0x4b8280=0x0;_0x4b8280<_0x2ab700;_0x4b8280++){const _0x38eccc=_0x208215+_0x4b8280;if(await isPortAvailable(_0x38eccc))return _0x38eccc;}throw new Error(_0x57cf80(0x100)+_0x208215+'\x20and\x20'+(_0x208215+_0x2ab700-0x1));}
@@ -1 +1 @@
1
- const a106_0x26980e=a106_0x3cca;(function(_0x26b992,_0x550b27){const _0xb01564=a106_0x3cca,_0x1deaca=_0x26b992();while(!![]){try{const _0x7c938a=-parseInt(_0xb01564(0x178))/0x1*(-parseInt(_0xb01564(0x18c))/0x2)+parseInt(_0xb01564(0x19f))/0x3+-parseInt(_0xb01564(0x195))/0x4*(parseInt(_0xb01564(0x191))/0x5)+-parseInt(_0xb01564(0x18b))/0x6+-parseInt(_0xb01564(0x17c))/0x7+-parseInt(_0xb01564(0x192))/0x8+parseInt(_0xb01564(0x1a1))/0x9*(parseInt(_0xb01564(0x194))/0xa);if(_0x7c938a===_0x550b27)break;else _0x1deaca['push'](_0x1deaca['shift']());}catch(_0x3012e0){_0x1deaca['push'](_0x1deaca['shift']());}}}(a106_0x48fe,0x39dd2));function a106_0x48fe(){const _0x173f6c=['\x20-o\x20ppid=,comm=','189756LuWrXB','pid','1703943hTEzpZ','xdg-open','2UtJjyh','ps\x20-p\x20','length','isInteger','2662366zDNPlY','pwsh','platform','csh','tcsh','replace','fish','has','wmic\x20process\x20where\x20ProcessId=','ksh','darwin','trim','ignore','pop','xonsh','2359788SSWVZK','383576ZyZNUb','comm','elvish','ppid','ion','5ftMEUV','2620184yTIicG','kill','50zjfOgq','221176NMVqrf','\x20get\x20ParentProcessId,Name\x20/format:csv','pipe','filter','claude','start','win32','split','bash'];a106_0x48fe=function(){return _0x173f6c;};return a106_0x48fe();}function a106_0x3cca(_0x46a820,_0xed874a){_0x46a820=_0x46a820-0x178;const _0x48fed7=a106_0x48fe();let _0x3ccac6=_0x48fed7[_0x46a820];return _0x3ccac6;}import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a106_0x26980e(0x19d),'zsh','sh',a106_0x26980e(0x182),a106_0x26980e(0x185),a106_0x26980e(0x180),a106_0x26980e(0x17f),'dash',a106_0x26980e(0x17d),'powershell','nu',a106_0x26980e(0x190),a106_0x26980e(0x18e),a106_0x26980e(0x18a)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a106_0x26980e(0x199),'code','cursor']);function getProcessInfoWindows(_0x3fb9c4){const _0x3d3f4f=a106_0x26980e;try{if(!Number[_0x3d3f4f(0x17b)](_0x3fb9c4)||_0x3fb9c4<=0x0)return null;const _0x19e7f0=execSync(_0x3d3f4f(0x184)+_0x3fb9c4+_0x3d3f4f(0x196),{'encoding':'utf-8','windowsHide':!![]})[_0x3d3f4f(0x187)](),_0x1277cc=_0x19e7f0[_0x3d3f4f(0x19c)]('\x0a')[_0x3d3f4f(0x198)](_0x3fa126=>_0x3fa126[_0x3d3f4f(0x187)]());if(_0x1277cc[_0x3d3f4f(0x17a)]<0x2)return null;const _0x10d7b8=_0x1277cc[_0x1277cc[_0x3d3f4f(0x17a)]-0x1][_0x3d3f4f(0x19c)](',');if(_0x10d7b8[_0x3d3f4f(0x17a)]<0x3)return null;const _0x48c708=_0x10d7b8[0x1]?.[_0x3d3f4f(0x187)]()||'',_0xc05f77=parseInt(_0x10d7b8[0x2]?.[_0x3d3f4f(0x187)]()||'0',0xa);if(isNaN(_0xc05f77)||!_0x48c708)return null;return{'pid':_0x3fb9c4,'ppid':_0xc05f77,'comm':_0x48c708[_0x3d3f4f(0x181)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x1668ae){const _0x40f86b=a106_0x26980e;try{const _0x5db4cb=0x400000;if(!Number['isInteger'](_0x1668ae)||_0x1668ae<=0x0||_0x1668ae>_0x5db4cb)return null;const _0x39f85a=execSync(_0x40f86b(0x179)+_0x1668ae+_0x40f86b(0x19e),{'encoding':'utf-8','stdio':_0x40f86b(0x197)})[_0x40f86b(0x187)](),[_0x2a752a,..._0x2e0e6f]=_0x39f85a['split'](/\s+/),_0x398900=parseInt(_0x2a752a,0xa),_0x2ba11c=_0x2e0e6f['join']('\x20');if(isNaN(_0x398900))return null;return{'pid':_0x1668ae,'ppid':_0x398900,'comm':_0x2ba11c};}catch{return null;}}function getProcessInfo(_0x1383d6){const _0x6744bd=a106_0x26980e;if(process[_0x6744bd(0x17e)]===_0x6744bd(0x19b))return getProcessInfoWindows(_0x1383d6);return getProcessInfoPosix(_0x1383d6);}function getBasename(_0x42eb40){const _0x426b08=a106_0x26980e;return _0x42eb40[_0x426b08(0x181)](/^-/,'')[_0x426b08(0x19c)]('/')[_0x426b08(0x189)]()?.['toLowerCase']()||'';}function isShell(_0x240091){const _0x9c0de2=a106_0x26980e;return SHELL_NAMES[_0x9c0de2(0x183)](getBasename(_0x240091));}function isEphemeralShellSpawner(_0x5735db){const _0x58ecee=a106_0x26980e;return EPHEMERAL_SHELL_SPAWNERS[_0x58ecee(0x183)](getBasename(_0x5735db));}let cachedShellPID;function findShellPID(){const _0x4ca8ad=a106_0x26980e;if(process['ppid']===undefined)return process[_0x4ca8ad(0x1a0)];let _0x510a9=process[_0x4ca8ad(0x18f)];const _0x1299ac=0xa;let _0x537818=0x0;while(_0x537818<_0x1299ac){const _0x331fca=getProcessInfo(_0x510a9);if(!_0x331fca)break;if(isShell(_0x331fca[_0x4ca8ad(0x18d)])){const _0x12587b=getProcessInfo(_0x331fca[_0x4ca8ad(0x18f)]);if(_0x12587b&&isEphemeralShellSpawner(_0x12587b[_0x4ca8ad(0x18d)])){_0x510a9=_0x331fca[_0x4ca8ad(0x18f)],_0x537818++;continue;}return _0x331fca[_0x4ca8ad(0x1a0)];}if(_0x331fca[_0x4ca8ad(0x18f)]===0x0||_0x331fca['ppid']===0x1){if(isShell(_0x331fca[_0x4ca8ad(0x18d)]))return _0x331fca[_0x4ca8ad(0x1a0)];break;}_0x510a9=_0x331fca['ppid'],_0x537818++;}return process[_0x4ca8ad(0x18f)]!==undefined?process[_0x4ca8ad(0x18f)]:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x58856d){const _0x39c27d=a106_0x26980e;if(!Number[_0x39c27d(0x17b)](_0x58856d)||_0x58856d<=0x0)return![];try{return process[_0x39c27d(0x193)](_0x58856d,0x0),!![];}catch{return![];}}export function openBrowser(_0x1c0f6c){const _0x30976e=a106_0x26980e,_0x12a019=process[_0x30976e(0x17e)],_0x382007=_0x12a019===_0x30976e(0x186)?'open':_0x12a019===_0x30976e(0x19b)?_0x30976e(0x19a):_0x30976e(0x1a2);spawn(_0x382007,[_0x1c0f6c],{'detached':!![],'stdio':_0x30976e(0x188)})['unref']();}
1
+ const a106_0x168495=a106_0x23d8;(function(_0x13362e,_0x462059){const _0x289e1c=a106_0x23d8,_0x74f95d=_0x13362e();while(!![]){try{const _0x1ec199=-parseInt(_0x289e1c(0x19b))/0x1*(parseInt(_0x289e1c(0x1a4))/0x2)+-parseInt(_0x289e1c(0x188))/0x3*(-parseInt(_0x289e1c(0x195))/0x4)+-parseInt(_0x289e1c(0x1ac))/0x5*(-parseInt(_0x289e1c(0x1ae))/0x6)+parseInt(_0x289e1c(0x19e))/0x7+-parseInt(_0x289e1c(0x18f))/0x8+-parseInt(_0x289e1c(0x190))/0x9*(-parseInt(_0x289e1c(0x18e))/0xa)+-parseInt(_0x289e1c(0x189))/0xb*(parseInt(_0x289e1c(0x185))/0xc);if(_0x1ec199===_0x462059)break;else _0x74f95d['push'](_0x74f95d['shift']());}catch(_0x48f350){_0x74f95d['push'](_0x74f95d['shift']());}}}(a106_0x1a92,0x76301));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a106_0x168495(0x192),'zsh','sh','fish',a106_0x168495(0x19f),a106_0x168495(0x193),'csh',a106_0x168495(0x198),'pwsh',a106_0x168495(0x1a0),'nu',a106_0x168495(0x18b),a106_0x168495(0x1aa),a106_0x168495(0x183)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a106_0x168495(0x194),a106_0x168495(0x1ab),a106_0x168495(0x1a2)]);function getProcessInfoWindows(_0x7c0541){const _0x201d5b=a106_0x168495;try{if(!Number[_0x201d5b(0x1a3)](_0x7c0541)||_0x7c0541<=0x0)return null;const _0x12d913=execSync(_0x201d5b(0x19d)+_0x7c0541+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':'utf-8','windowsHide':!![]})['trim'](),_0x396d54=_0x12d913['split']('\x0a')[_0x201d5b(0x186)](_0x5274e6=>_0x5274e6['trim']());if(_0x396d54['length']<0x2)return null;const _0x3d356d=_0x396d54[_0x396d54[_0x201d5b(0x196)]-0x1][_0x201d5b(0x1b0)](',');if(_0x3d356d[_0x201d5b(0x196)]<0x3)return null;const _0x4bb738=_0x3d356d[0x1]?.[_0x201d5b(0x18a)]()||'',_0x3d2504=parseInt(_0x3d356d[0x2]?.[_0x201d5b(0x18a)]()||'0',0xa);if(isNaN(_0x3d2504)||!_0x4bb738)return null;return{'pid':_0x7c0541,'ppid':_0x3d2504,'comm':_0x4bb738[_0x201d5b(0x1a6)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x1d94ac){const _0x7ef106=a106_0x168495;try{const _0xd63a52=0x400000;if(!Number[_0x7ef106(0x1a3)](_0x1d94ac)||_0x1d94ac<=0x0||_0x1d94ac>_0xd63a52)return null;const _0x2c2517=execSync(_0x7ef106(0x187)+_0x1d94ac+'\x20-o\x20ppid=,comm=',{'encoding':_0x7ef106(0x199),'stdio':_0x7ef106(0x1a7)})['trim'](),[_0x485cf2,..._0xd3c6e9]=_0x2c2517['split'](/\s+/),_0x375567=parseInt(_0x485cf2,0xa),_0x225919=_0xd3c6e9[_0x7ef106(0x1a9)]('\x20');if(isNaN(_0x375567))return null;return{'pid':_0x1d94ac,'ppid':_0x375567,'comm':_0x225919};}catch{return null;}}function a106_0x1a92(){const _0x3fbf9b=['win32','6EsIpON','pid','split','xonsh','ignore','353604GRMxYV','filter','ps\x20-p\x20','1527qQikqE','231lfwwtQ','trim','ion','pop','start','10ckKLLJ','1313128FyCfxW','6937209NqtBlP','has','bash','tcsh','claude','1936LwunmB','length','comm','dash','utf-8','platform','257306gPwyPo','xdg-open','wmic\x20process\x20where\x20ProcessId=','1098118MiZkCJ','ksh','powershell','open','cursor','isInteger','6pTJwzf','darwin','replace','pipe','ppid','join','elvish','code','4324660MUtelI'];a106_0x1a92=function(){return _0x3fbf9b;};return a106_0x1a92();}function getProcessInfo(_0x301b86){const _0x3ee921=a106_0x168495;if(process[_0x3ee921(0x19a)]===_0x3ee921(0x1ad))return getProcessInfoWindows(_0x301b86);return getProcessInfoPosix(_0x301b86);}function getBasename(_0x4d5b0c){const _0x5184c7=a106_0x168495;return _0x4d5b0c[_0x5184c7(0x1a6)](/^-/,'')[_0x5184c7(0x1b0)]('/')[_0x5184c7(0x18c)]()?.['toLowerCase']()||'';}function isShell(_0x4101cc){const _0x4f448f=a106_0x168495;return SHELL_NAMES[_0x4f448f(0x191)](getBasename(_0x4101cc));}function isEphemeralShellSpawner(_0x7aedff){const _0x514b2f=a106_0x168495;return EPHEMERAL_SHELL_SPAWNERS[_0x514b2f(0x191)](getBasename(_0x7aedff));}let cachedShellPID;function findShellPID(){const _0x406213=a106_0x168495;if(process[_0x406213(0x1a8)]===undefined)return process[_0x406213(0x1af)];let _0x2c40d7=process[_0x406213(0x1a8)];const _0x72b1fe=0xa;let _0x23221b=0x0;while(_0x23221b<_0x72b1fe){const _0xa4ac16=getProcessInfo(_0x2c40d7);if(!_0xa4ac16)break;if(isShell(_0xa4ac16[_0x406213(0x197)])){const _0x5b05f9=getProcessInfo(_0xa4ac16['ppid']);if(_0x5b05f9&&isEphemeralShellSpawner(_0x5b05f9[_0x406213(0x197)])){_0x2c40d7=_0xa4ac16['ppid'],_0x23221b++;continue;}return _0xa4ac16['pid'];}if(_0xa4ac16[_0x406213(0x1a8)]===0x0||_0xa4ac16['ppid']===0x1){if(isShell(_0xa4ac16['comm']))return _0xa4ac16['pid'];break;}_0x2c40d7=_0xa4ac16[_0x406213(0x1a8)],_0x23221b++;}return process[_0x406213(0x1a8)]!==undefined?process[_0x406213(0x1a8)]:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}function a106_0x23d8(_0x415e48,_0x5b81ed){_0x415e48=_0x415e48-0x183;const _0x1a920c=a106_0x1a92();let _0x23d850=_0x1a920c[_0x415e48];return _0x23d850;}export function isProcessRunning(_0x209924){const _0x1ec470=a106_0x168495;if(!Number[_0x1ec470(0x1a3)](_0x209924)||_0x209924<=0x0)return![];try{return process['kill'](_0x209924,0x0),!![];}catch{return![];}}export function openBrowser(_0xda2c06){const _0x2d6365=a106_0x168495,_0x408a09=process[_0x2d6365(0x19a)],_0x51f641=_0x408a09===_0x2d6365(0x1a5)?_0x2d6365(0x1a1):_0x408a09===_0x2d6365(0x1ad)?_0x2d6365(0x18d):_0x2d6365(0x19c);spawn(_0x51f641,[_0xda2c06],{'detached':!![],'stdio':_0x2d6365(0x184)})['unref']();}
@@ -1 +1 @@
1
- (function(_0x148e9c,_0x1a4e26){const _0x2f1ef8=a107_0x5e2e,_0x2bee82=_0x148e9c();while(!![]){try{const _0x21cf11=-parseInt(_0x2f1ef8(0x187))/0x1+-parseInt(_0x2f1ef8(0x176))/0x2*(-parseInt(_0x2f1ef8(0x178))/0x3)+-parseInt(_0x2f1ef8(0x173))/0x4*(-parseInt(_0x2f1ef8(0x17e))/0x5)+parseInt(_0x2f1ef8(0x180))/0x6*(parseInt(_0x2f1ef8(0x183))/0x7)+-parseInt(_0x2f1ef8(0x18d))/0x8*(parseInt(_0x2f1ef8(0x181))/0x9)+-parseInt(_0x2f1ef8(0x179))/0xa+-parseInt(_0x2f1ef8(0x172))/0xb;if(_0x21cf11===_0x1a4e26)break;else _0x2bee82['push'](_0x2bee82['shift']());}catch(_0x19c159){_0x2bee82['push'](_0x2bee82['shift']());}}}(a107_0x400b,0x748d2));import*as a107_0x3c09af from'readline';export async function confirm(_0x5c900c){const _0x4644d=a107_0x5e2e,_0x751d2=a107_0x3c09af[_0x4644d(0x177)]({'input':process['stdin'],'output':process['stdout']});return new Promise(_0xe6636a=>{const _0x272dcf=_0x4644d;_0x751d2[_0x272dcf(0x186)](_0x5c900c+_0x272dcf(0x17a),_0x86f3a2=>{const _0x4e2929=_0x272dcf;_0x751d2[_0x4e2929(0x189)](),_0xe6636a(_0x86f3a2[_0x4e2929(0x188)]()==='y'||_0x86f3a2[_0x4e2929(0x188)]()===_0x4e2929(0x185));});});}function a107_0x5e2e(_0x15ce64,_0x476f7a){_0x15ce64=_0x15ce64-0x171;const _0x400b64=a107_0x400b();let _0x5e2ec8=_0x400b64[_0x15ce64];return _0x5e2ec8;}function a107_0x400b(){const _0x461a61=['exit','removeListener','195302vQbiWU','createInterface','27FFdyiL','4041540dRkobY','\x20(y/N):\x20','isTTY','pause','setEncoding','1125WPuhwB','stdin','1572nTWeNW','45OCjOwX','resume','8134uBpSgV','write','yes','question','209397EtzUMS','toLowerCase','close','setRawMode','data','stderr','277960irqeRJ','\x20[y/N]\x20','1978438EMqHbj','4644SbVjbG'];a107_0x400b=function(){return _0x461a61;};return a107_0x400b();}export async function confirmKey(_0x53fa1c){const _0x3f75b3=a107_0x5e2e;if(!process[_0x3f75b3(0x17f)][_0x3f75b3(0x17b)])return![];return process[_0x3f75b3(0x18c)][_0x3f75b3(0x184)](_0x53fa1c+_0x3f75b3(0x171)),new Promise(_0x3773e7=>{const _0x2c306b=_0x3f75b3,_0xe707aa=process[_0x2c306b(0x17f)];_0xe707aa[_0x2c306b(0x18a)](!![]),_0xe707aa[_0x2c306b(0x182)](),_0xe707aa[_0x2c306b(0x17d)]('utf8');const _0x5ef5d6=_0xbfc045=>{const _0x3d3386=_0x2c306b;_0xe707aa[_0x3d3386(0x18a)](![]),_0xe707aa[_0x3d3386(0x17c)](),_0xe707aa[_0x3d3386(0x175)](_0x3d3386(0x18b),_0x5ef5d6);if(_0xbfc045==='\x1b'){process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('\x0a'),_0x3773e7(![]);return;}_0xbfc045==='\x03'&&(process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('\x0a'),process[_0x3d3386(0x174)](0x82));if(_0xbfc045[_0x3d3386(0x188)]()==='y'){process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('y\x0a'),_0x3773e7(!![]);return;}process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('\x0a'),_0x3773e7(![]);};_0xe707aa['on'](_0x2c306b(0x18b),_0x5ef5d6);});}
1
+ (function(_0x1d5702,_0x5ed892){const _0x52908e=a107_0x3b3f,_0x1b4ec0=_0x1d5702();while(!![]){try{const _0x301eb9=parseInt(_0x52908e(0x1a9))/0x1*(parseInt(_0x52908e(0x1ab))/0x2)+parseInt(_0x52908e(0x199))/0x3+parseInt(_0x52908e(0x1b2))/0x4+-parseInt(_0x52908e(0x1ad))/0x5+-parseInt(_0x52908e(0x1b4))/0x6*(-parseInt(_0x52908e(0x1aa))/0x7)+-parseInt(_0x52908e(0x19b))/0x8*(parseInt(_0x52908e(0x1af))/0x9)+parseInt(_0x52908e(0x1a2))/0xa;if(_0x301eb9===_0x5ed892)break;else _0x1b4ec0['push'](_0x1b4ec0['shift']());}catch(_0x16f894){_0x1b4ec0['push'](_0x1b4ec0['shift']());}}}(a107_0x4a7c,0xbdb91));import*as a107_0x17ead9 from'readline';function a107_0x4a7c(){const _0x501f6c=['7581530PWdRLk','createInterface','resume','utf8','write','\x20[y/N]\x20','question','1oBPQrH','6515327goGfLY','276914NUnJPk','exit','7090515PvzTwm','stdin','27nynyzv','toLowerCase','pause','3335516dfFedR','close','6TGLRsJ','1630167GGZzTL','data','2691816tdslte','stdout','isTTY','setEncoding','\x20(y/N):\x20','stderr','yes'];a107_0x4a7c=function(){return _0x501f6c;};return a107_0x4a7c();}export async function confirm(_0x2af184){const _0x503eb7=a107_0x3b3f,_0x89f9bb=a107_0x17ead9[_0x503eb7(0x1a3)]({'input':process['stdin'],'output':process[_0x503eb7(0x19c)]});return new Promise(_0x26e577=>{const _0x4803a9=_0x503eb7;_0x89f9bb[_0x4803a9(0x1a8)](_0x2af184+_0x4803a9(0x19f),_0x2985fd=>{const _0x55b8f9=_0x4803a9;_0x89f9bb[_0x55b8f9(0x1b3)](),_0x26e577(_0x2985fd[_0x55b8f9(0x1b0)]()==='y'||_0x2985fd[_0x55b8f9(0x1b0)]()===_0x55b8f9(0x1a1));});});}function a107_0x3b3f(_0x53cd21,_0x46cedf){_0x53cd21=_0x53cd21-0x199;const _0x4a7c44=a107_0x4a7c();let _0x3b3fda=_0x4a7c44[_0x53cd21];return _0x3b3fda;}export async function confirmKey(_0x2b34e9){const _0x5a3369=a107_0x3b3f;if(!process[_0x5a3369(0x1ae)][_0x5a3369(0x19d)])return![];return process['stderr']['write'](_0x2b34e9+_0x5a3369(0x1a7)),new Promise(_0xe1405d=>{const _0x2d7a5c=_0x5a3369,_0x4e63b0=process[_0x2d7a5c(0x1ae)];_0x4e63b0['setRawMode'](!![]),_0x4e63b0[_0x2d7a5c(0x1a4)](),_0x4e63b0[_0x2d7a5c(0x19e)](_0x2d7a5c(0x1a5));const _0x170e94=_0xba96e3=>{const _0x1c89c3=_0x2d7a5c;_0x4e63b0['setRawMode'](![]),_0x4e63b0[_0x1c89c3(0x1b1)](),_0x4e63b0['removeListener'](_0x1c89c3(0x19a),_0x170e94);if(_0xba96e3==='\x1b'){process[_0x1c89c3(0x1a0)]['write']('\x0a'),_0xe1405d(![]);return;}_0xba96e3==='\x03'&&(process[_0x1c89c3(0x1a0)][_0x1c89c3(0x1a6)]('\x0a'),process[_0x1c89c3(0x1ac)](0x82));if(_0xba96e3[_0x1c89c3(0x1b0)]()==='y'){process['stderr'][_0x1c89c3(0x1a6)]('y\x0a'),_0xe1405d(!![]);return;}process[_0x1c89c3(0x1a0)][_0x1c89c3(0x1a6)]('\x0a'),_0xe1405d(![]);};_0x4e63b0['on'](_0x2d7a5c(0x19a),_0x170e94);});}
@@ -1 +1 @@
1
- (function(_0x1ae79a,_0x38a3cb){const _0x161d13=a108_0x3696,_0x160250=_0x1ae79a();while(!![]){try{const _0x3fa72d=parseInt(_0x161d13(0x13c))/0x1+-parseInt(_0x161d13(0x14e))/0x2*(-parseInt(_0x161d13(0x145))/0x3)+parseInt(_0x161d13(0x13e))/0x4+-parseInt(_0x161d13(0x146))/0x5*(parseInt(_0x161d13(0x144))/0x6)+-parseInt(_0x161d13(0x14f))/0x7*(-parseInt(_0x161d13(0x13d))/0x8)+-parseInt(_0x161d13(0x14d))/0x9*(parseInt(_0x161d13(0x15d))/0xa)+parseInt(_0x161d13(0x159))/0xb;if(_0x3fa72d===_0x38a3cb)break;else _0x160250['push'](_0x160250['shift']());}catch(_0x5e5c0d){_0x160250['push'](_0x160250['shift']());}}}(a108_0x2209,0xcf63b));import{existsSync,readFileSync}from'fs';import a108_0x409135 from'path';import{parse as a108_0x39ae5f}from'yaml';export function parsePath(_0x106215){const _0xe6362e=a108_0x3696;if(!_0x106215||_0x106215[_0xe6362e(0x153)]()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x2e6676=_0x106215[_0xe6362e(0x153)]();if(_0x2e6676==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x106215};const _0x34a50b=_0x2e6676[_0xe6362e(0x14b)]('/')?_0x2e6676[_0xe6362e(0x154)](0x1):_0x2e6676,_0x1fe4fd=_0x34a50b['split']('/')[_0xe6362e(0x152)](_0x265a3b=>_0x265a3b!=='');if(_0x1fe4fd['length']===0x0)throw new Error(_0xe6362e(0x13a));const _0xadc58f=_0x2e6676['startsWith']('/')||!isRelativePathSegment(_0x1fe4fd[0x0]);for(const _0x57311f of _0x1fe4fd){validatePathSegment(_0x57311f);}return{'segments':_0x1fe4fd,'isAbsolute':_0xadc58f,'raw':_0x106215};}function a108_0x3696(_0x305adb,_0x589cb0){_0x305adb=_0x305adb-0x137;const _0x2209b6=a108_0x2209();let _0x36962f=_0x2209b6[_0x305adb];return _0x36962f;}function a108_0x2209(){const _0x46fa29=['test','11105127ouYhjn','name','resolve','journey','100jayKFg','.yml','segment','replace','parent_segment','Cannot\x20navigate\x20above\x20root','utf-8','slice','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','endsWith','335313qvmwkL','136SMBBYb','3006536coEABZ','No\x20tdx.json\x20found\x20for\x20file:\x20','dirname','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','Cannot\x20split\x20empty\x20path','relative','3972MDViCq','2040753FjGaTW','5205oivmYt','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','root','parse','isAbsolute','startsWith','tdx.json','1350288Ftscyb','2suSVnX','107954YUfxQa','push','join','filter','trim','substring','length','raw','segments'];a108_0x2209=function(){return _0x46fa29;};return a108_0x2209();}function isRelativePathSegment(_0x177359){return _0x177359==='.'||_0x177359==='..';}function validatePathSegment(_0x1bce02){const _0x2ae2b1=a108_0x3696;if(_0x1bce02==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x1bce02==='.'||_0x1bce02==='..')return;if(/[\x00-\x1F\x7F]/[_0x2ae2b1(0x158)](_0x1bce02))throw new Error('Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20'+_0x1bce02);if(_0x1bce02!==_0x1bce02[_0x2ae2b1(0x153)]()){}}export function validatePath(_0x4634dd){const _0x4e973f=a108_0x3696;if(_0x4634dd[_0x4e973f(0x157)][_0x4e973f(0x155)]===0x0&&!_0x4634dd[_0x4e973f(0x14a)])throw new Error('Relative\x20path\x20cannot\x20be\x20empty');if(_0x4634dd[_0x4e973f(0x14a)]){if(_0x4634dd[_0x4e973f(0x157)][0x0]==='..')throw new Error(_0x4e973f(0x147));let _0x1a6bd0=0x0;for(const _0x37e386 of _0x4634dd[_0x4e973f(0x157)]){if(_0x37e386==='..'){if(_0x1a6bd0===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0x1a6bd0--;}else _0x37e386!=='.'&&_0x1a6bd0++;}}}export function joinPaths(_0x179407,_0x51fb02){const _0x3543f0=a108_0x3696;if(!_0x179407||_0x179407==='/')return _0x51fb02;if(!_0x51fb02||_0x51fb02==='.')return _0x179407;if(_0x51fb02[_0x3543f0(0x14b)]('/'))return _0x51fb02;const _0x258085=parsePath(_0x179407),_0x5ca592=parsePath(_0x51fb02),_0x8589f3=[..._0x258085[_0x3543f0(0x157)]];for(const _0x8faf9 of _0x5ca592[_0x3543f0(0x157)]){if(_0x8faf9==='.')continue;else{if(_0x8faf9==='..'){if(_0x8589f3[_0x3543f0(0x155)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x8589f3['pop']();}else _0x8589f3[_0x3543f0(0x150)](_0x8faf9);}}const _0x2ac5cd=_0x8589f3[_0x3543f0(0x151)]('/');return _0x258085['raw'][_0x3543f0(0x14b)]('/')?'/'+_0x2ac5cd:_0x2ac5cd;}export function normalizePath(_0x116b28){const _0x44d84a=a108_0x3696,_0x16fcb3=parsePath(_0x116b28),_0x28259c=[];for(const _0x24a339 of _0x16fcb3['segments']){if(_0x24a339==='.')continue;else{if(_0x24a339==='..'){if(_0x28259c[_0x44d84a(0x155)]===0x0){if(_0x16fcb3[_0x44d84a(0x14a)])throw new Error(_0x44d84a(0x137));_0x28259c['push']('..');}else _0x28259c[_0x28259c['length']-0x1]==='..'?_0x28259c['push']('..'):_0x28259c['pop']();}else _0x28259c[_0x44d84a(0x150)](_0x24a339);}}if(_0x28259c[_0x44d84a(0x155)]===0x0)return _0x16fcb3[_0x44d84a(0x14a)]?'/':'.';const _0x1018c8=_0x28259c[_0x44d84a(0x151)]('/');return _0x16fcb3[_0x44d84a(0x156)][_0x44d84a(0x14b)]('/')?'/'+_0x1018c8:_0x1018c8;}export function getParentPath(_0x5dd925){const _0x402c46=a108_0x3696,_0x298ced=parsePath(_0x5dd925);if(_0x298ced[_0x402c46(0x157)][_0x402c46(0x155)]<=0x1)return'/';const _0x3b089b=_0x298ced[_0x402c46(0x157)][_0x402c46(0x139)](0x0,-0x1)[_0x402c46(0x151)]('/');return _0x298ced[_0x402c46(0x156)][_0x402c46(0x14b)]('/')?'/'+_0x3b089b:_0x3b089b;}export function getBaseName(_0x165d80){const _0x560f81=a108_0x3696,_0x51e644=parsePath(_0x165d80);return _0x51e644[_0x560f81(0x157)][_0x51e644[_0x560f81(0x157)]['length']-0x1]||'';}export function isChildPath(_0x4c3076,_0x23bb86){const _0x5b4791=a108_0x3696,_0x507d4=parsePath(_0x4c3076),_0x42c381=parsePath(_0x23bb86);if(_0x507d4[_0x5b4791(0x157)]['length']<=_0x42c381['segments'][_0x5b4791(0x155)])return![];for(let _0x594ad9=0x0;_0x594ad9<_0x42c381[_0x5b4791(0x157)][_0x5b4791(0x155)];_0x594ad9++){if(_0x507d4[_0x5b4791(0x157)][_0x594ad9]!==_0x42c381['segments'][_0x594ad9])return![];}return!![];}export function splitPath(_0x48b9b1){const _0x454077=a108_0x3696,_0x1edecb=parsePath(_0x48b9b1);if(_0x1edecb[_0x454077(0x157)][_0x454077(0x155)]===0x0)throw new Error(_0x454077(0x142));if(_0x1edecb[_0x454077(0x157)][_0x454077(0x155)]===0x1)return{'parent':_0x1edecb[_0x454077(0x157)][0x0]};return{'parent':_0x1edecb['segments'][0x0],'child':_0x1edecb['segments'][_0x454077(0x139)](0x1)[_0x454077(0x151)]('/')};}export function isYamlFilePath(_0x290304){const _0x1ea461=a108_0x3696;return _0x290304[_0x1ea461(0x13b)](_0x1ea461(0x15e))||_0x290304['endsWith']('.yaml');}export function resolveYamlFilePath(_0x4114a0){const _0x4fd6df=a108_0x3696,_0x2875d5=a108_0x409135[_0x4fd6df(0x15b)](_0x4114a0);if(!existsSync(_0x2875d5))throw new Error('File\x20not\x20found:\x20'+_0x4114a0);let _0x3b6277=a108_0x409135[_0x4fd6df(0x140)](_0x2875d5),_0x2cbbca=null,_0x23c7ac=null;const _0x357c2d=a108_0x409135[_0x4fd6df(0x149)](_0x3b6277)[_0x4fd6df(0x148)];while(_0x3b6277!==_0x357c2d){const _0x564034=a108_0x409135['join'](_0x3b6277,_0x4fd6df(0x14c));if(existsSync(_0x564034)){_0x2cbbca=_0x564034,_0x23c7ac=_0x3b6277;break;}_0x3b6277=a108_0x409135[_0x4fd6df(0x140)](_0x3b6277);}if(!_0x2cbbca||!_0x23c7ac)throw new Error(_0x4fd6df(0x13f)+_0x4114a0);const _0x467f92=readFileSync(_0x2cbbca,'utf-8'),_0x54f7f6=JSON['parse'](_0x467f92),_0x84275=_0x54f7f6[_0x4fd6df(0x161)];if(!_0x84275)throw new Error(_0x4fd6df(0x141));const _0x318931=readFileSync(_0x2875d5,_0x4fd6df(0x138)),_0x4f8aff=a108_0x39ae5f(_0x318931),_0x3ed385=_0x4f8aff[_0x4fd6df(0x15a)];if(!_0x3ed385)throw new Error('Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20'+_0x4114a0);const _0x21f594=_0x4f8aff['type']===_0x4fd6df(0x15c)?_0x4fd6df(0x15c):_0x4fd6df(0x15f),_0x17aa3c=a108_0x409135[_0x4fd6df(0x143)](_0x23c7ac,_0x2875d5),_0x37ace9=a108_0x409135[_0x4fd6df(0x140)](_0x17aa3c),_0x41a15e=_0x37ace9==='.'?'':_0x37ace9[_0x4fd6df(0x160)](/\\/g,'/'),_0x349a3d=_0x41a15e?_0x84275+'/'+_0x41a15e+'/'+_0x3ed385:_0x84275+'/'+_0x3ed385;return{'parentSegment':_0x84275,'segmentName':_0x3ed385,'folderPath':_0x41a15e,'fullPath':_0x349a3d,'resourceType':_0x21f594};}
1
+ (function(_0x17a6cb,_0x1252a8){const _0xa6cdb3=a108_0x5cbd,_0x2aaaa1=_0x17a6cb();while(!![]){try{const _0x2a8dd3=parseInt(_0xa6cdb3(0x141))/0x1*(parseInt(_0xa6cdb3(0x14e))/0x2)+-parseInt(_0xa6cdb3(0x146))/0x3+-parseInt(_0xa6cdb3(0x148))/0x4+-parseInt(_0xa6cdb3(0x16a))/0x5+parseInt(_0xa6cdb3(0x144))/0x6*(-parseInt(_0xa6cdb3(0x150))/0x7)+parseInt(_0xa6cdb3(0x15d))/0x8*(parseInt(_0xa6cdb3(0x159))/0x9)+parseInt(_0xa6cdb3(0x161))/0xa;if(_0x2a8dd3===_0x1252a8)break;else _0x2aaaa1['push'](_0x2aaaa1['shift']());}catch(_0xafa3d){_0x2aaaa1['push'](_0x2aaaa1['shift']());}}}(a108_0x4e1a,0x8cf58));import{existsSync,readFileSync}from'fs';import a108_0x40176a from'path';import{parse as a108_0x54681e}from'yaml';function a108_0x4e1a(){const _0x5a6ad9=['Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','parse','1312MeZQUp','segments','type','push','10812750gzuSSa','join','raw','substring','endsWith','relative','utf-8','root','startsWith','537040rGrjXN','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','Cannot\x20split\x20empty\x20path','70YFXppx','.yml','slice','4779864UffXrH','filter','202341jNfhHU','dirname','3477560flqnAE','segment','length','parent_segment','trim','isAbsolute','7822FwVCOc','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','7QTqZvQ','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','split','Path\x20segment\x20cannot\x20be\x20empty','pop','Cannot\x20navigate\x20above\x20root','Path\x20cannot\x20be\x20empty','Relative\x20path\x20cannot\x20be\x20empty','.yaml','58347FGthbz','tdx.json'];a108_0x4e1a=function(){return _0x5a6ad9;};return a108_0x4e1a();}function a108_0x5cbd(_0x4374d5,_0x1f2844){_0x4374d5=_0x4374d5-0x141;const _0x4e1a01=a108_0x4e1a();let _0x5cbdfd=_0x4e1a01[_0x4374d5];return _0x5cbdfd;}export function parsePath(_0x28abe8){const _0x3cf181=a108_0x5cbd;if(!_0x28abe8||_0x28abe8[_0x3cf181(0x14c)]()==='')throw new Error(_0x3cf181(0x156));const _0x1437bf=_0x28abe8['trim']();if(_0x1437bf==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x28abe8};const _0x20cb75=_0x1437bf[_0x3cf181(0x169)]('/')?_0x1437bf[_0x3cf181(0x164)](0x1):_0x1437bf,_0x4edd6e=_0x20cb75[_0x3cf181(0x152)]('/')[_0x3cf181(0x145)](_0x578b2e=>_0x578b2e!=='');if(_0x4edd6e[_0x3cf181(0x14a)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x4995e1=_0x1437bf[_0x3cf181(0x169)]('/')||!isRelativePathSegment(_0x4edd6e[0x0]);for(const _0x2a548c of _0x4edd6e){validatePathSegment(_0x2a548c);}return{'segments':_0x4edd6e,'isAbsolute':_0x4995e1,'raw':_0x28abe8};}function isRelativePathSegment(_0x42ff98){return _0x42ff98==='.'||_0x42ff98==='..';}function validatePathSegment(_0x2d460b){const _0x11d475=a108_0x5cbd;if(_0x2d460b==='')throw new Error(_0x11d475(0x153));if(_0x2d460b==='.'||_0x2d460b==='..')return;if(/[\x00-\x1F\x7F]/['test'](_0x2d460b))throw new Error(_0x11d475(0x14f)+_0x2d460b);if(_0x2d460b!==_0x2d460b[_0x11d475(0x14c)]()){}}export function validatePath(_0x176468){const _0x13f636=a108_0x5cbd;if(_0x176468[_0x13f636(0x15e)][_0x13f636(0x14a)]===0x0&&!_0x176468[_0x13f636(0x14d)])throw new Error(_0x13f636(0x157));if(_0x176468[_0x13f636(0x14d)]){if(_0x176468[_0x13f636(0x15e)][0x0]==='..')throw new Error(_0x13f636(0x15b));let _0x3d6a26=0x0;for(const _0x3f5f7f of _0x176468[_0x13f636(0x15e)]){if(_0x3f5f7f==='..'){if(_0x3d6a26===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0x3d6a26--;}else _0x3f5f7f!=='.'&&_0x3d6a26++;}}}export function joinPaths(_0x57709c,_0x481c66){const _0x45a955=a108_0x5cbd;if(!_0x57709c||_0x57709c==='/')return _0x481c66;if(!_0x481c66||_0x481c66==='.')return _0x57709c;if(_0x481c66[_0x45a955(0x169)]('/'))return _0x481c66;const _0x3069b5=parsePath(_0x57709c),_0x302e2d=parsePath(_0x481c66),_0x46b17f=[..._0x3069b5[_0x45a955(0x15e)]];for(const _0x3b5249 of _0x302e2d[_0x45a955(0x15e)]){if(_0x3b5249==='.')continue;else{if(_0x3b5249==='..'){if(_0x46b17f[_0x45a955(0x14a)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x46b17f[_0x45a955(0x154)]();}else _0x46b17f[_0x45a955(0x160)](_0x3b5249);}}const _0x141c32=_0x46b17f[_0x45a955(0x162)]('/');return _0x3069b5[_0x45a955(0x163)][_0x45a955(0x169)]('/')?'/'+_0x141c32:_0x141c32;}export function normalizePath(_0x129872){const _0x1edeb3=a108_0x5cbd,_0x138e14=parsePath(_0x129872),_0x5cf8d0=[];for(const _0x5270ee of _0x138e14[_0x1edeb3(0x15e)]){if(_0x5270ee==='.')continue;else{if(_0x5270ee==='..'){if(_0x5cf8d0['length']===0x0){if(_0x138e14['isAbsolute'])throw new Error(_0x1edeb3(0x155));_0x5cf8d0['push']('..');}else _0x5cf8d0[_0x5cf8d0[_0x1edeb3(0x14a)]-0x1]==='..'?_0x5cf8d0[_0x1edeb3(0x160)]('..'):_0x5cf8d0[_0x1edeb3(0x154)]();}else _0x5cf8d0[_0x1edeb3(0x160)](_0x5270ee);}}if(_0x5cf8d0[_0x1edeb3(0x14a)]===0x0)return _0x138e14[_0x1edeb3(0x14d)]?'/':'.';const _0x68f117=_0x5cf8d0['join']('/');return _0x138e14[_0x1edeb3(0x163)][_0x1edeb3(0x169)]('/')?'/'+_0x68f117:_0x68f117;}export function getParentPath(_0xe633cc){const _0x505e86=a108_0x5cbd,_0xced6a4=parsePath(_0xe633cc);if(_0xced6a4[_0x505e86(0x15e)][_0x505e86(0x14a)]<=0x1)return'/';const _0x3d4be4=_0xced6a4[_0x505e86(0x15e)][_0x505e86(0x143)](0x0,-0x1)['join']('/');return _0xced6a4[_0x505e86(0x163)][_0x505e86(0x169)]('/')?'/'+_0x3d4be4:_0x3d4be4;}export function getBaseName(_0x476859){const _0x4dec41=a108_0x5cbd,_0x11d529=parsePath(_0x476859);return _0x11d529[_0x4dec41(0x15e)][_0x11d529[_0x4dec41(0x15e)][_0x4dec41(0x14a)]-0x1]||'';}export function isChildPath(_0x107d60,_0x1279dd){const _0x23d9ae=a108_0x5cbd,_0x38cd42=parsePath(_0x107d60),_0x4b79a1=parsePath(_0x1279dd);if(_0x38cd42[_0x23d9ae(0x15e)][_0x23d9ae(0x14a)]<=_0x4b79a1[_0x23d9ae(0x15e)][_0x23d9ae(0x14a)])return![];for(let _0x409809=0x0;_0x409809<_0x4b79a1['segments'][_0x23d9ae(0x14a)];_0x409809++){if(_0x38cd42[_0x23d9ae(0x15e)][_0x409809]!==_0x4b79a1[_0x23d9ae(0x15e)][_0x409809])return![];}return!![];}export function splitPath(_0x3e4917){const _0xb61552=a108_0x5cbd,_0x17c6cd=parsePath(_0x3e4917);if(_0x17c6cd[_0xb61552(0x15e)]['length']===0x0)throw new Error(_0xb61552(0x16c));if(_0x17c6cd[_0xb61552(0x15e)]['length']===0x1)return{'parent':_0x17c6cd[_0xb61552(0x15e)][0x0]};return{'parent':_0x17c6cd[_0xb61552(0x15e)][0x0],'child':_0x17c6cd[_0xb61552(0x15e)][_0xb61552(0x143)](0x1)[_0xb61552(0x162)]('/')};}export function isYamlFilePath(_0x5c799b){const _0x3a1a1b=a108_0x5cbd;return _0x5c799b[_0x3a1a1b(0x165)](_0x3a1a1b(0x142))||_0x5c799b[_0x3a1a1b(0x165)](_0x3a1a1b(0x158));}export function resolveYamlFilePath(_0x4881ce){const _0x397644=a108_0x5cbd,_0x3da5b1=a108_0x40176a['resolve'](_0x4881ce);if(!existsSync(_0x3da5b1))throw new Error('File\x20not\x20found:\x20'+_0x4881ce);let _0x243680=a108_0x40176a[_0x397644(0x147)](_0x3da5b1),_0x59ef0c=null,_0x18765e=null;const _0x559699=a108_0x40176a['parse'](_0x243680)[_0x397644(0x168)];while(_0x243680!==_0x559699){const _0x470cd9=a108_0x40176a[_0x397644(0x162)](_0x243680,_0x397644(0x15a));if(existsSync(_0x470cd9)){_0x59ef0c=_0x470cd9,_0x18765e=_0x243680;break;}_0x243680=a108_0x40176a[_0x397644(0x147)](_0x243680);}if(!_0x59ef0c||!_0x18765e)throw new Error('No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x4881ce);const _0x1df1b7=readFileSync(_0x59ef0c,_0x397644(0x167)),_0x258e02=JSON[_0x397644(0x15c)](_0x1df1b7),_0x3b8722=_0x258e02[_0x397644(0x14b)];if(!_0x3b8722)throw new Error(_0x397644(0x16b));const _0x418767=readFileSync(_0x3da5b1,_0x397644(0x167)),_0x2af04f=a108_0x54681e(_0x418767),_0x973820=_0x2af04f['name'];if(!_0x973820)throw new Error(_0x397644(0x151)+_0x4881ce);const _0x1510d8=_0x2af04f[_0x397644(0x15f)]==='journey'?'journey':_0x397644(0x149),_0x20e415=a108_0x40176a[_0x397644(0x166)](_0x18765e,_0x3da5b1),_0x206cf5=a108_0x40176a[_0x397644(0x147)](_0x20e415),_0xef5c56=_0x206cf5==='.'?'':_0x206cf5['replace'](/\\/g,'/'),_0x2943ee=_0xef5c56?_0x3b8722+'/'+_0xef5c56+'/'+_0x973820:_0x3b8722+'/'+_0x973820;return{'parentSegment':_0x3b8722,'segmentName':_0x973820,'folderPath':_0xef5c56,'fullPath':_0x2943ee,'resourceType':_0x1510d8};}
@@ -1 +1 @@
1
- function a109_0x2ab7(){const _0x259405=['24600fpoQch','substring','10rhRNAj','195390lvlYhl','indexOf','5391360RggnsB','130179jcYiTK','Invalid\x20segment\x20reference\x20format:\x20','376CNncrQ','.\x20Child\x20name\x20cannot\x20be\x20empty','1912190sAWBhe','12VXxCFG','.\x20Parent\x20name\x20cannot\x20be\x20empty','24264lAHFUA','73085HbYiaS'];a109_0x2ab7=function(){return _0x259405;};return a109_0x2ab7();}function a109_0xe6b5(_0x3e92aa,_0x21cb97){_0x3e92aa=_0x3e92aa-0x109;const _0x2ab7c1=a109_0x2ab7();let _0xe6b599=_0x2ab7c1[_0x3e92aa];return _0xe6b599;}(function(_0x496e33,_0x4ba81f){const _0x46fa45=a109_0xe6b5,_0x29f33b=_0x496e33();while(!![]){try{const _0x31a02d=parseInt(_0x46fa45(0x110))/0x1+parseInt(_0x46fa45(0x112))/0x2*(-parseInt(_0x46fa45(0x116))/0x3)+parseInt(_0x46fa45(0x10c))/0x4*(parseInt(_0x46fa45(0x10f))/0x5)+-parseInt(_0x46fa45(0x113))/0x6+-parseInt(_0x46fa45(0x10b))/0x7+parseInt(_0x46fa45(0x109))/0x8*(parseInt(_0x46fa45(0x10e))/0x9)+parseInt(_0x46fa45(0x115))/0xa;if(_0x31a02d===_0x4ba81f)break;else _0x29f33b['push'](_0x29f33b['shift']());}catch(_0xe21720){_0x29f33b['push'](_0x29f33b['shift']());}}}(a109_0x2ab7,0x33a8f));export function parseSegmentRef(_0xbf2b0e){const _0x297382=a109_0xe6b5,_0x532b91=_0xbf2b0e[_0x297382(0x114)]('/');if(_0x532b91===-0x1)return{'parentId':_0xbf2b0e};if(_0x532b91===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0xbf2b0e+_0x297382(0x10d));const _0x31a4f1=_0xbf2b0e[_0x297382(0x111)](0x0,_0x532b91),_0x50c399=_0xbf2b0e[_0x297382(0x111)](_0x532b91+0x1);if(_0x50c399==='')throw new Error(_0x297382(0x117)+_0xbf2b0e+_0x297382(0x10a));return{'parentId':_0x31a4f1,'childId':_0x50c399};}
1
+ (function(_0x16ebb2,_0x143c59){const _0x678533=a109_0x2ad1,_0x299720=_0x16ebb2();while(!![]){try{const _0x3620f0=parseInt(_0x678533(0x19d))/0x1+-parseInt(_0x678533(0x19b))/0x2+parseInt(_0x678533(0x1a1))/0x3*(parseInt(_0x678533(0x19f))/0x4)+parseInt(_0x678533(0x1a7))/0x5+parseInt(_0x678533(0x1a6))/0x6*(-parseInt(_0x678533(0x1a5))/0x7)+-parseInt(_0x678533(0x1a0))/0x8*(parseInt(_0x678533(0x1a3))/0x9)+-parseInt(_0x678533(0x19c))/0xa*(-parseInt(_0x678533(0x1a2))/0xb);if(_0x3620f0===_0x143c59)break;else _0x299720['push'](_0x299720['shift']());}catch(_0x297dac){_0x299720['push'](_0x299720['shift']());}}}(a109_0x2d24,0xad98b));function a109_0x2ad1(_0x435f3b,_0x429c7b){_0x435f3b=_0x435f3b-0x19b;const _0x2d24ba=a109_0x2d24();let _0x2ad186=_0x2d24ba[_0x435f3b];return _0x2ad186;}export function parseSegmentRef(_0xc9c1d6){const _0x58f9a8=a109_0x2ad1,_0x4a406b=_0xc9c1d6[_0x58f9a8(0x1a9)]('/');if(_0x4a406b===-0x1)return{'parentId':_0xc9c1d6};if(_0x4a406b===0x0)throw new Error(_0x58f9a8(0x1a8)+_0xc9c1d6+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x5e1e8d=_0xc9c1d6['substring'](0x0,_0x4a406b),_0x1e5a52=_0xc9c1d6[_0x58f9a8(0x19e)](_0x4a406b+0x1);if(_0x1e5a52==='')throw new Error(_0x58f9a8(0x1a8)+_0xc9c1d6+_0x58f9a8(0x1a4));return{'parentId':_0x5e1e8d,'childId':_0x1e5a52};}function a109_0x2d24(){const _0x4d8c54=['31603cpLpct','43371FaEiod','.\x20Child\x20name\x20cannot\x20be\x20empty','152887DQInws','48kiXmDv','2978015HaGFXT','Invalid\x20segment\x20reference\x20format:\x20','indexOf','1413376ZeAksU','1690UUmeXE','967526dRFGgy','substring','16xbUJMn','1704tcwkLe','427686ppuKvF'];a109_0x2d24=function(){return _0x4d8c54;};return a109_0x2d24();}
@@ -1 +1 @@
1
- function a110_0x1773(){const _0x14149e=['text','jobId','2955316osOwRU','intervalFactory','2lTBnzw','1303460toENyd','phase','extra','\x20[Job\x20ID:\x20','9cvHsTv','clock','3431712cktZCl','2382jUmobH','stop','3716493TbiHBG','replace','toFixed','floor','start','3671540qofsml','27020TeCJHe','now','58831yOsTkU','isSpinning'];a110_0x1773=function(){return _0x14149e;};return a110_0x1773();}(function(_0x3cfee9,_0xb5ed23){const _0x144650=a110_0xda60,_0xb77633=_0x3cfee9();while(!![]){try{const _0x474506=-parseInt(_0x144650(0x194))/0x1*(-parseInt(_0x144650(0x182))/0x2)+-parseInt(_0x144650(0x18c))/0x3+parseInt(_0x144650(0x180))/0x4+-parseInt(_0x144650(0x183))/0x5+-parseInt(_0x144650(0x18a))/0x6*(-parseInt(_0x144650(0x192))/0x7)+-parseInt(_0x144650(0x189))/0x8+parseInt(_0x144650(0x187))/0x9*(parseInt(_0x144650(0x191))/0xa);if(_0x474506===_0xb5ed23)break;else _0xb77633['push'](_0xb77633['shift']());}catch(_0x2a2e70){_0xb77633['push'](_0xb77633['shift']());}}}(a110_0x1773,0xbbaeb));import a110_0x496363 from'ora';export function createCommandSpinner(_0x29e4bd,_0x26344b={}){const {verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x26344b;return a110_0x496363({'text':_0x29e4bd,'color':'cyan','isEnabled':forceEnabled||process['stdout']['isTTY']&&!verbose});}export async function withSpinner(_0x241a38,_0x95cbc8,_0x3ef1ad={}){const _0x3e5835=a110_0xda60,_0x176e7b=_0x3ef1ad[_0x3e5835(0x188)]??(()=>Date[_0x3e5835(0x193)]()),_0x3dff30=createCommandSpinner(_0x241a38,_0x3ef1ad);_0x3dff30[_0x3e5835(0x190)]();const _0x27d955=_0x176e7b();try{const _0x12c272=await _0x95cbc8(),_0x316b0d=_0x176e7b()-_0x27d955;return _0x3dff30[_0x3e5835(0x18b)](),{'data':_0x12c272,'elapsedMs':_0x316b0d};}catch(_0x4ab3ec){_0x3dff30[_0x3e5835(0x18b)]();throw _0x4ab3ec;}}function a110_0xda60(_0xe3c8f9,_0x1f64a6){_0xe3c8f9=_0xe3c8f9-0x180;const _0x177372=a110_0x1773();let _0xda6028=_0x177372[_0xe3c8f9];return _0xda6028;}export async function withQuerySpinner(_0x3e31b5,_0x3bd41b,_0x2a66f9={}){const _0x1071e3=a110_0xda60,_0x56409d=_0x2a66f9[_0x1071e3(0x188)]??(()=>Date[_0x1071e3(0x193)]()),_0xb093cb=_0x2a66f9[_0x1071e3(0x181)]??setInterval,_0x26ba70=createCommandSpinner(_0x3e31b5,_0x2a66f9);_0x26ba70[_0x1071e3(0x190)]();const _0x587e49=_0x56409d(),_0x290ed9=_0x3e31b5[_0x1071e3(0x18d)]('...',''),_0xed59d5={},_0x2827d5=()=>{const _0x43d4cb=_0x1071e3;if(!_0x26ba70[_0x43d4cb(0x195)])return;const _0x588242=_0x56409d()-_0x587e49,_0x4e7f77=formatElapsed(_0x588242),_0x7b96f8=_0xed59d5[_0x43d4cb(0x184)]??_0x290ed9,_0x23a1ad=_0xed59d5[_0x43d4cb(0x197)]?_0x43d4cb(0x186)+_0xed59d5[_0x43d4cb(0x197)]+']':'',_0x48f6f8=_0xed59d5['extra']?'\x20'+_0xed59d5[_0x43d4cb(0x185)]:'';_0x26ba70[_0x43d4cb(0x196)]=_0x7b96f8+'\x20'+_0x4e7f77+_0x48f6f8+_0x23a1ad;},_0x504184=_0xb093cb(()=>{_0x2827d5();},0x3e8),_0x32a945={'setPhase':_0xe5a36a=>{const _0x1eba86=_0x1071e3;_0xed59d5[_0x1eba86(0x184)]=_0xe5a36a,_0x2827d5();},'setJobId':_0x1d1a51=>{const _0x4e698d=_0x1071e3;_0xed59d5[_0x4e698d(0x197)]=_0x1d1a51,_0x2827d5();},'setExtra':_0x2d9818=>{const _0x5a7dcf=_0x1071e3;_0xed59d5[_0x5a7dcf(0x185)]=_0x2d9818,_0x2827d5();}};_0x2827d5();try{const _0x29a8bb=await _0x3bd41b(_0x32a945),_0x5c1941=_0x56409d()-_0x587e49;return{'data':_0x29a8bb,'elapsedMs':_0x5c1941};}finally{clearInterval(_0x504184),_0x26ba70[_0x1071e3(0x18b)]();}}export function formatElapsed(_0x43983f){const _0x47673f=a110_0xda60,_0x113275=Math[_0x47673f(0x18f)](_0x43983f/0x3e8);if(_0x113275<0x3c)return(_0x43983f/0x3e8)[_0x47673f(0x18e)](0x1)+'s';const _0x5b25ee=Math[_0x47673f(0x18f)](_0x113275/0x3c),_0x3a3591=_0x113275%0x3c;if(_0x5b25ee<0x3c)return _0x5b25ee+'m\x20'+_0x3a3591+'s';const _0x475387=Math[_0x47673f(0x18f)](_0x5b25ee/0x3c),_0x493422=_0x5b25ee%0x3c;return _0x475387+'h\x20'+_0x493422+'m';}
1
+ (function(_0xc512b,_0x7dd84){const _0x4b85d7=a110_0x18a4,_0x5603a4=_0xc512b();while(!![]){try{const _0x18d316=parseInt(_0x4b85d7(0x19d))/0x1+-parseInt(_0x4b85d7(0x1a8))/0x2+-parseInt(_0x4b85d7(0x1aa))/0x3*(parseInt(_0x4b85d7(0x19b))/0x4)+parseInt(_0x4b85d7(0x196))/0x5+-parseInt(_0x4b85d7(0x1a9))/0x6*(-parseInt(_0x4b85d7(0x19f))/0x7)+parseInt(_0x4b85d7(0x19c))/0x8+-parseInt(_0x4b85d7(0x195))/0x9*(-parseInt(_0x4b85d7(0x1a7))/0xa);if(_0x18d316===_0x7dd84)break;else _0x5603a4['push'](_0x5603a4['shift']());}catch(_0x38bda9){_0x5603a4['push'](_0x5603a4['shift']());}}}(a110_0xe581,0x8335b));function a110_0xe581(){const _0x3eb5ed=['1187600LHQzur','now','intervalFactory','stop','\x20[Job\x20ID:\x20','8mbtVUr','2669520skaSXd','557682oASdVl','start','39186eOvEFb','jobId','clock','extra','stdout','text','isTTY','replace','230HZsAjG','1937610oZaJeX','222azncHb','697833FbtXNk','phase','cyan','248652VIWKyV'];a110_0xe581=function(){return _0x3eb5ed;};return a110_0xe581();}function a110_0x18a4(_0x98192d,_0x598868){_0x98192d=_0x98192d-0x193;const _0xe581c2=a110_0xe581();let _0x18a4d7=_0xe581c2[_0x98192d];return _0x18a4d7;}import a110_0x56d740 from'ora';export function createCommandSpinner(_0x524430,_0xd80aaf={}){const _0x17829c=a110_0x18a4,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0xd80aaf;return a110_0x56d740({'text':_0x524430,'color':_0x17829c(0x194),'isEnabled':forceEnabled||process[_0x17829c(0x1a3)][_0x17829c(0x1a5)]&&!verbose});}export async function withSpinner(_0x45ace4,_0x511be4,_0x20e244={}){const _0x298a5d=a110_0x18a4,_0xdea02d=_0x20e244[_0x298a5d(0x1a1)]??(()=>Date[_0x298a5d(0x197)]()),_0x53fff=createCommandSpinner(_0x45ace4,_0x20e244);_0x53fff[_0x298a5d(0x19e)]();const _0xef55c0=_0xdea02d();try{const _0x2a3ade=await _0x511be4(),_0x405c7a=_0xdea02d()-_0xef55c0;return _0x53fff['stop'](),{'data':_0x2a3ade,'elapsedMs':_0x405c7a};}catch(_0x2a8995){_0x53fff[_0x298a5d(0x199)]();throw _0x2a8995;}}export async function withQuerySpinner(_0x541597,_0x31db42,_0x539fbe={}){const _0x97527c=a110_0x18a4,_0x54d653=_0x539fbe[_0x97527c(0x1a1)]??(()=>Date['now']()),_0x4b9273=_0x539fbe[_0x97527c(0x198)]??setInterval,_0x109ed3=createCommandSpinner(_0x541597,_0x539fbe);_0x109ed3[_0x97527c(0x19e)]();const _0x33ac8f=_0x54d653(),_0xf31e5d=_0x541597[_0x97527c(0x1a6)]('...',''),_0x1ea56b={},_0x24b048=()=>{const _0x660854=_0x97527c;if(!_0x109ed3['isSpinning'])return;const _0x3c10d1=_0x54d653()-_0x33ac8f,_0xf71385=formatElapsed(_0x3c10d1),_0x569969=_0x1ea56b[_0x660854(0x193)]??_0xf31e5d,_0x38a3be=_0x1ea56b[_0x660854(0x1a0)]?_0x660854(0x19a)+_0x1ea56b[_0x660854(0x1a0)]+']':'',_0x4e3c43=_0x1ea56b['extra']?'\x20'+_0x1ea56b[_0x660854(0x1a2)]:'';_0x109ed3[_0x660854(0x1a4)]=_0x569969+'\x20'+_0xf71385+_0x4e3c43+_0x38a3be;},_0x3d3fef=_0x4b9273(()=>{_0x24b048();},0x3e8),_0x5c00d6={'setPhase':_0xed03a6=>{const _0x475c79=_0x97527c;_0x1ea56b[_0x475c79(0x193)]=_0xed03a6,_0x24b048();},'setJobId':_0x3c76f8=>{const _0x39d50f=_0x97527c;_0x1ea56b[_0x39d50f(0x1a0)]=_0x3c76f8,_0x24b048();},'setExtra':_0x30cfec=>{const _0x523b07=_0x97527c;_0x1ea56b[_0x523b07(0x1a2)]=_0x30cfec,_0x24b048();}};_0x24b048();try{const _0x30e642=await _0x31db42(_0x5c00d6),_0x2f4375=_0x54d653()-_0x33ac8f;return{'data':_0x30e642,'elapsedMs':_0x2f4375};}finally{clearInterval(_0x3d3fef),_0x109ed3[_0x97527c(0x199)]();}}export function formatElapsed(_0x592134){const _0x136ff6=Math['floor'](_0x592134/0x3e8);if(_0x136ff6<0x3c)return(_0x592134/0x3e8)['toFixed'](0x1)+'s';const _0x34d4f8=Math['floor'](_0x136ff6/0x3c),_0x5da9e8=_0x136ff6%0x3c;if(_0x34d4f8<0x3c)return _0x34d4f8+'m\x20'+_0x5da9e8+'s';const _0x5ea1e4=Math['floor'](_0x34d4f8/0x3c),_0x137f35=_0x34d4f8%0x3c;return _0x5ea1e4+'h\x20'+_0x137f35+'m';}
@@ -1 +1 @@
1
- (function(_0x2c9fa0,_0x1105b4){const _0x298f2c=a111_0x41b7,_0x1656ea=_0x2c9fa0();while(!![]){try{const _0xf90db7=parseInt(_0x298f2c(0x6e))/0x1+parseInt(_0x298f2c(0x68))/0x2*(parseInt(_0x298f2c(0x85))/0x3)+parseInt(_0x298f2c(0x86))/0x4*(-parseInt(_0x298f2c(0x77))/0x5)+parseInt(_0x298f2c(0x69))/0x6*(-parseInt(_0x298f2c(0x7f))/0x7)+-parseInt(_0x298f2c(0x7e))/0x8+-parseInt(_0x298f2c(0x71))/0x9*(parseInt(_0x298f2c(0x79))/0xa)+parseInt(_0x298f2c(0x6b))/0xb;if(_0xf90db7===_0x1105b4)break;else _0x1656ea['push'](_0x1656ea['shift']());}catch(_0xeb3974){_0x1656ea['push'](_0x1656ea['shift']());}}}(a111_0x413f,0x74cb3));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x10700b){const _0x5ddf37=a111_0x41b7;let _0x5cbfd0=_0x10700b[_0x5ddf37(0x7a)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x5cbfd0=_0x5cbfd0[_0x5ddf37(0x7a)](/--.*$/gm,''),_0x5cbfd0[_0x5ddf37(0x87)]();}function isEscaped(_0x443bcc,_0x52b619){let _0x548242=0x0;for(let _0x670851=_0x52b619-0x1;_0x670851>=0x0&&_0x443bcc[_0x670851]==='\x5c';_0x670851--){_0x548242++;}return _0x548242%0x2===0x1;}export function splitSqlStatements(_0x3690a5){const _0x93a0f7=a111_0x41b7,_0x30f280=stripSqlComments(_0x3690a5);if(!_0x30f280)throw new Error(_0x93a0f7(0x7b));const _0x3336ec=[];let _0x17612c='',_0xa7711f=![],_0x478d4a=![],_0x46c332=![];for(let _0x4de486=0x0;_0x4de486<_0x3690a5[_0x93a0f7(0x83)];_0x4de486++){const _0x4ee9a0=_0x3690a5[_0x4de486];if(_0x4ee9a0==='\x27'&&!isEscaped(_0x3690a5,_0x4de486)&&!_0x478d4a&&!_0x46c332)_0xa7711f=!_0xa7711f;else{if(_0x4ee9a0==='\x22'&&!isEscaped(_0x3690a5,_0x4de486)&&!_0xa7711f&&!_0x46c332)_0x478d4a=!_0x478d4a;else _0x4ee9a0==='`'&&!isEscaped(_0x3690a5,_0x4de486)&&!_0xa7711f&&!_0x478d4a&&(_0x46c332=!_0x46c332);}if(_0x4ee9a0===';'&&!_0xa7711f&&!_0x478d4a&&!_0x46c332){const _0x3eb4b9=_0x17612c['trim']();_0x3eb4b9&&_0x3336ec[_0x93a0f7(0x7d)](_0x3eb4b9),_0x17612c='';}else _0x17612c+=_0x4ee9a0;}const _0x15cfd5=_0x17612c[_0x93a0f7(0x87)]();_0x15cfd5&&_0x3336ec[_0x93a0f7(0x7d)](_0x15cfd5);const _0x2ac238=_0x3336ec[_0x93a0f7(0x72)](_0x3025a9=>_0x3025a9[_0x93a0f7(0x87)]())[_0x93a0f7(0x75)](_0x413a39=>{const _0x44450c=_0x93a0f7,_0x3d1866=stripSqlComments(_0x413a39);return _0x3d1866[_0x44450c(0x83)]>0x0;});if(_0x2ac238[_0x93a0f7(0x83)]===0x0)throw new Error(_0x93a0f7(0x7b));return _0x2ac238;}export function readFileContent(_0x171700){const _0xb2a909=a111_0x41b7;try{return readFileSync(_0x171700,'utf-8');}catch(_0x1aeb9f){const _0x16fba8=_0x1aeb9f[_0xb2a909(0x84)];if(_0x16fba8==='ENOENT')throw new Error('File\x20\x27'+_0x171700+_0xb2a909(0x80));else{if(_0x16fba8==='EACCES')throw new Error(_0xb2a909(0x8a)+_0x171700+'\x27');else throw new Error(_0xb2a909(0x88)+_0x171700+_0xb2a909(0x6d)+_0x1aeb9f[_0xb2a909(0x73)]);}}}export function readSqlStatementsFromFile(_0x53097d){const _0x29e44d=a111_0x41b7,_0x10568e=readFileContent(_0x53097d);try{return splitSqlStatements(_0x10568e);}catch(_0x4f984e){throw new Error(_0x29e44d(0x78)+_0x53097d+'\x27\x20'+_0x4f984e[_0x29e44d(0x73)][_0x29e44d(0x74)]());}}export async function readStdinContent(){const _0x4e01b5=a111_0x41b7;if(process[_0x4e01b5(0x6c)][_0x4e01b5(0x6f)])throw new Error(_0x4e01b5(0x82));return new Promise((_0x326000,_0x51efd9)=>{const _0x49676e=_0x4e01b5,_0x33a1a2=[],_0x2e3c9b=createInterface({'input':process[_0x49676e(0x6c)],'terminal':![]});_0x2e3c9b['on'](_0x49676e(0x89),_0x26a9f4=>{const _0x5d3e9a=_0x49676e;_0x33a1a2[_0x5d3e9a(0x7d)](_0x26a9f4);}),_0x2e3c9b['on']('close',()=>{const _0x49ffda=_0x49676e;_0x326000(_0x33a1a2[_0x49ffda(0x81)]('\x0a'));}),_0x2e3c9b['on'](_0x49676e(0x6a),_0x532004=>{const _0x810a18=_0x49676e;_0x2e3c9b['close'](),_0x51efd9(new Error(_0x810a18(0x7c)+_0x532004[_0x810a18(0x73)]));});});}function a111_0x413f(){const _0x929d63=['stdin','\x27:\x20','99371YxUqCP','isTTY','test','306JgFznN','map','message','toLowerCase','filter','stdin\x20','55dpQCXC','File\x20\x27','275390GnebrN','replace','Content\x20contains\x20no\x20SQL\x20statements','Error\x20reading\x20from\x20stdin:\x20','push','5601536bkUHia','439061gBOwZy','\x27\x20not\x20found','join','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','length','code','2661OwnMCy','124028wfxipI','trim','Error\x20reading\x20file\x20\x27','line','Permission\x20denied\x20reading\x20file\x20\x27','980hyXzdS','66eXKwUO','error','28731274ljkbcB'];a111_0x413f=function(){return _0x929d63;};return a111_0x413f();}function a111_0x41b7(_0x1d188f,_0x274949){_0x1d188f=_0x1d188f-0x68;const _0x413f2a=a111_0x413f();let _0x41b789=_0x413f2a[_0x1d188f];return _0x41b789;}export async function readSqlStatementsFromStdin(){const _0x12b314=a111_0x41b7,_0x13bb32=await readStdinContent();try{return splitSqlStatements(_0x13bb32);}catch(_0x4b1379){throw new Error(_0x12b314(0x76)+_0x4b1379[_0x12b314(0x73)][_0x12b314(0x74)]());}}export function isSqlFilePath(_0x281e9d){const _0x2b0af5=a111_0x41b7;return/\w\.sql$/[_0x2b0af5(0x70)](_0x281e9d);}
1
+ (function(_0x495adf,_0x54e644){const _0x1f0f50=a111_0x31bf,_0x473b6c=_0x495adf();while(!![]){try{const _0x2b30a6=parseInt(_0x1f0f50(0x12c))/0x1*(-parseInt(_0x1f0f50(0x129))/0x2)+-parseInt(_0x1f0f50(0x13a))/0x3*(parseInt(_0x1f0f50(0x11c))/0x4)+-parseInt(_0x1f0f50(0x11a))/0x5*(-parseInt(_0x1f0f50(0x12f))/0x6)+-parseInt(_0x1f0f50(0x128))/0x7*(parseInt(_0x1f0f50(0x127))/0x8)+-parseInt(_0x1f0f50(0x119))/0x9+-parseInt(_0x1f0f50(0x121))/0xa*(parseInt(_0x1f0f50(0x13b))/0xb)+parseInt(_0x1f0f50(0x120))/0xc*(parseInt(_0x1f0f50(0x124))/0xd);if(_0x2b30a6===_0x54e644)break;else _0x473b6c['push'](_0x473b6c['shift']());}catch(_0x4ee3a8){_0x473b6c['push'](_0x473b6c['shift']());}}}(a111_0x3cfe,0x8ea7a));import{readFileSync}from'fs';function a111_0x31bf(_0x151bcf,_0x5c00bf){_0x151bcf=_0x151bcf-0x119;const _0x3cfec0=a111_0x3cfe();let _0x31bfc7=_0x3cfec0[_0x151bcf];return _0x31bfc7;}import{createInterface}from'readline';export function stripSqlComments(_0x46560d){const _0x4ace1a=a111_0x31bf;let _0x506e8e=_0x46560d[_0x4ace1a(0x11f)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x506e8e=_0x506e8e[_0x4ace1a(0x11f)](/--.*$/gm,''),_0x506e8e['trim']();}function isEscaped(_0x30c0d8,_0x2fe95e){let _0x27472c=0x0;for(let _0x3e08cd=_0x2fe95e-0x1;_0x3e08cd>=0x0&&_0x30c0d8[_0x3e08cd]==='\x5c';_0x3e08cd--){_0x27472c++;}return _0x27472c%0x2===0x1;}export function splitSqlStatements(_0x2c1d2a){const _0x385817=a111_0x31bf,_0x708c69=stripSqlComments(_0x2c1d2a);if(!_0x708c69)throw new Error(_0x385817(0x11e));const _0x2bf024=[];let _0x4daf31='',_0x56209d=![],_0x53c593=![],_0x10de0f=![];for(let _0x2e5a07=0x0;_0x2e5a07<_0x2c1d2a[_0x385817(0x132)];_0x2e5a07++){const _0x24e254=_0x2c1d2a[_0x2e5a07];if(_0x24e254==='\x27'&&!isEscaped(_0x2c1d2a,_0x2e5a07)&&!_0x53c593&&!_0x10de0f)_0x56209d=!_0x56209d;else{if(_0x24e254==='\x22'&&!isEscaped(_0x2c1d2a,_0x2e5a07)&&!_0x56209d&&!_0x10de0f)_0x53c593=!_0x53c593;else _0x24e254==='`'&&!isEscaped(_0x2c1d2a,_0x2e5a07)&&!_0x56209d&&!_0x53c593&&(_0x10de0f=!_0x10de0f);}if(_0x24e254===';'&&!_0x56209d&&!_0x53c593&&!_0x10de0f){const _0x238d7c=_0x4daf31[_0x385817(0x136)]();_0x238d7c&&_0x2bf024[_0x385817(0x122)](_0x238d7c),_0x4daf31='';}else _0x4daf31+=_0x24e254;}const _0xdef815=_0x4daf31[_0x385817(0x136)]();_0xdef815&&_0x2bf024[_0x385817(0x122)](_0xdef815);const _0x1ec272=_0x2bf024['map'](_0x2ce35a=>_0x2ce35a[_0x385817(0x136)]())[_0x385817(0x12a)](_0x5744c3=>{const _0x47fc54=stripSqlComments(_0x5744c3);return _0x47fc54['length']>0x0;});if(_0x1ec272[_0x385817(0x132)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x1ec272;}export function readFileContent(_0x10bf4f){const _0x5c086f=a111_0x31bf;try{return readFileSync(_0x10bf4f,_0x5c086f(0x138));}catch(_0x476d22){const _0x13265c=_0x476d22[_0x5c086f(0x137)];if(_0x13265c===_0x5c086f(0x139))throw new Error('File\x20\x27'+_0x10bf4f+_0x5c086f(0x126));else{if(_0x13265c===_0x5c086f(0x12b))throw new Error(_0x5c086f(0x12d)+_0x10bf4f+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x10bf4f+'\x27:\x20'+_0x476d22['message']);}}}function a111_0x3cfe(){const _0x573b31=['238332lWrMNu','filter','EACCES','8oeILSV','Permission\x20denied\x20reading\x20file\x20\x27','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','2304pdruPQ','isTTY','test','length','stdin','stdin\x20','File\x20\x27','trim','code','utf-8','ENOENT','897QXDnTY','22ljEnyq','join','1757340bVwYXi','10090vIgulY','Error\x20reading\x20from\x20stdin:\x20','3228deZlTM','toLowerCase','Content\x20contains\x20no\x20SQL\x20statements','replace','12199704QQYoUj','2522530KExhGl','push','close','26ZDbtoo','message','\x27\x20not\x20found','40vCNDsH','461293VwJFMR'];a111_0x3cfe=function(){return _0x573b31;};return a111_0x3cfe();}export function readSqlStatementsFromFile(_0x2ed3e8){const _0x4e1286=a111_0x31bf,_0x43520=readFileContent(_0x2ed3e8);try{return splitSqlStatements(_0x43520);}catch(_0x2c8c88){throw new Error(_0x4e1286(0x135)+_0x2ed3e8+'\x27\x20'+_0x2c8c88['message']['toLowerCase']());}}export async function readStdinContent(){const _0x2307e2=a111_0x31bf;if(process[_0x2307e2(0x133)][_0x2307e2(0x130)])throw new Error(_0x2307e2(0x12e));return new Promise((_0x4ebd3f,_0x2451c6)=>{const _0x337fb5=_0x2307e2,_0xdb3300=[],_0x5c093b=createInterface({'input':process['stdin'],'terminal':![]});_0x5c093b['on']('line',_0xacc2d8=>{const _0x33e56b=a111_0x31bf;_0xdb3300[_0x33e56b(0x122)](_0xacc2d8);}),_0x5c093b['on'](_0x337fb5(0x123),()=>{const _0x1863cb=_0x337fb5;_0x4ebd3f(_0xdb3300[_0x1863cb(0x13c)]('\x0a'));}),_0x5c093b['on']('error',_0x3d47e7=>{const _0xb5f6af=_0x337fb5;_0x5c093b[_0xb5f6af(0x123)](),_0x2451c6(new Error(_0xb5f6af(0x11b)+_0x3d47e7['message']));});});}export async function readSqlStatementsFromStdin(){const _0x4eb079=a111_0x31bf,_0x262799=await readStdinContent();try{return splitSqlStatements(_0x262799);}catch(_0x311920){throw new Error(_0x4eb079(0x134)+_0x311920[_0x4eb079(0x125)][_0x4eb079(0x11d)]());}}export function isSqlFilePath(_0x18a83d){const _0x59030d=a111_0x31bf;return/\w\.sql$/[_0x59030d(0x131)](_0x18a83d);}
@@ -1 +1 @@
1
- (function(_0x25f262,_0x4cb7f6){const _0x2b85b4=a112_0x5ea2,_0x5c0c45=_0x25f262();while(!![]){try{const _0x2a9f97=-parseInt(_0x2b85b4(0xf7))/0x1+-parseInt(_0x2b85b4(0xff))/0x2+-parseInt(_0x2b85b4(0x102))/0x3*(-parseInt(_0x2b85b4(0xfd))/0x4)+parseInt(_0x2b85b4(0xfb))/0x5+-parseInt(_0x2b85b4(0xf8))/0x6+parseInt(_0x2b85b4(0xf3))/0x7*(parseInt(_0x2b85b4(0xea))/0x8)+-parseInt(_0x2b85b4(0xf9))/0x9*(-parseInt(_0x2b85b4(0xe9))/0xa);if(_0x2a9f97===_0x4cb7f6)break;else _0x5c0c45['push'](_0x5c0c45['shift']());}catch(_0x3519c0){_0x5c0c45['push'](_0x5c0c45['shift']());}}}(a112_0x51d7,0x2bb0d));export async function*parseSSEStream(_0x2a8697,_0x176806){const _0x29732c=a112_0x5ea2;if(!_0x2a8697[_0x29732c(0xeb)])throw new Error(_0x29732c(0xfc));const _0x496b3a=_0x2a8697[_0x29732c(0xeb)][_0x29732c(0xf1)](),_0x3d7496=new TextDecoder();let _0x374076='',_0xb47d9a={};try{while(!![]){const {done:_0x4f4496,value:_0x28202a}=await _0x496b3a[_0x29732c(0xe7)]();if(_0x4f4496){if(_0xb47d9a['data']){_0x176806?.[_0x29732c(0x101)](_0x29732c(0xf2)+_0xb47d9a[_0x29732c(0xee)]);const _0x3bf406=parseSSEData(_0xb47d9a[_0x29732c(0xee)]);yield _0x3bf406;}break;}_0x374076+=_0x3d7496[_0x29732c(0xf5)](_0x28202a,{'stream':!![]});const _0x1f04d4=_0x374076[_0x29732c(0xed)]('\x0a');_0x374076=_0x1f04d4[_0x29732c(0x100)]()||'';for(const _0xf6ed81 of _0x1f04d4){if(_0xf6ed81[_0x29732c(0xf6)]()===''){if(_0xb47d9a[_0x29732c(0xee)]){_0x176806?.['debug'](_0x29732c(0xf2)+_0xb47d9a[_0x29732c(0xee)]);const _0x30b6e5=parseSSEData(_0xb47d9a['data']);yield _0x30b6e5,_0xb47d9a={};}continue;}if(_0xf6ed81[_0x29732c(0xe8)](':'))continue;const _0x5c4ce3=_0xf6ed81[_0x29732c(0xf0)](':');if(_0x5c4ce3===-0x1)continue;const _0x790fd2=_0xf6ed81[_0x29732c(0xf4)](0x0,_0x5c4ce3);let _0x5949ff=_0xf6ed81[_0x29732c(0xf4)](_0x5c4ce3+0x1);_0x5949ff[_0x29732c(0xe8)]('\x20')&&(_0x5949ff=_0x5949ff['slice'](0x1));switch(_0x790fd2){case _0x29732c(0xfa):_0xb47d9a['event']=_0x5949ff;break;case _0x29732c(0xee):_0xb47d9a[_0x29732c(0xee)]=_0xb47d9a[_0x29732c(0xee)]?_0xb47d9a['data']+'\x0a'+_0x5949ff:_0x5949ff;break;case'id':_0xb47d9a['id']=_0x5949ff;break;}}}}finally{_0x496b3a[_0x29732c(0xfe)]();}}function a112_0x51d7(){const _0x31b924=['event','936355XudGir','Response\x20body\x20is\x20null','214724WazRmE','releaseLock','647622jlCoSJ','pop','debug','6rsPRVo','read','startsWith','10BnvrUQ','1286504RJymaN','body','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','split','data','parse','indexOf','getReader','[LLM\x20API\x20SSE]\x20','7rURlQu','slice','decode','trim','190297ghKqOm','979320qZEqfv','3607551cRvRxW'];a112_0x51d7=function(){return _0x31b924;};return a112_0x51d7();}function a112_0x5ea2(_0x293585,_0x369b55){_0x293585=_0x293585-0xe7;const _0x51d7c6=a112_0x51d7();let _0x5ea2b2=_0x51d7c6[_0x293585];return _0x5ea2b2;}function parseSSEData(_0x335fa9){const _0x15cfdd=a112_0x5ea2;try{return JSON[_0x15cfdd(0xef)](_0x335fa9);}catch(_0x4f3942){throw new Error(_0x15cfdd(0xec)+_0x335fa9,{'cause':_0x4f3942});}}
1
+ function a112_0x510e(){const _0xdd1aa5=['1332458TkPiro','startsWith','indexOf','split','body','getReader','2uydEpr','parse','4927824mKHvPo','27OhZacG','slice','3462XkXwcr','data','read','4940971pswlPf','20764570czmXhn','[LLM\x20API\x20SSE]\x20','11881692cYmIzq','pop','debug','2535DaQQbZ','trim','event','719756ROpfPY'];a112_0x510e=function(){return _0xdd1aa5;};return a112_0x510e();}(function(_0x4b6dd2,_0x3f11df){const _0x47dc2f=a112_0x4429,_0x14511d=_0x4b6dd2();while(!![]){try{const _0x146534=parseInt(_0x47dc2f(0x1a3))/0x1*(parseInt(_0x47dc2f(0x19d))/0x2)+-parseInt(_0x47dc2f(0x1a6))/0x3*(parseInt(_0x47dc2f(0x19c))/0x4)+-parseInt(_0x47dc2f(0x1b1))/0x5*(-parseInt(_0x47dc2f(0x1a8))/0x6)+parseInt(_0x47dc2f(0x1ab))/0x7+-parseInt(_0x47dc2f(0x1a5))/0x8+-parseInt(_0x47dc2f(0x1ae))/0x9+parseInt(_0x47dc2f(0x1ac))/0xa;if(_0x146534===_0x3f11df)break;else _0x14511d['push'](_0x14511d['shift']());}catch(_0x554d81){_0x14511d['push'](_0x14511d['shift']());}}}(a112_0x510e,0xcfeea));export async function*parseSSEStream(_0x265887,_0x13d213){const _0x306f6c=a112_0x4429;if(!_0x265887[_0x306f6c(0x1a1)])throw new Error('Response\x20body\x20is\x20null');const _0x54be79=_0x265887[_0x306f6c(0x1a1)][_0x306f6c(0x1a2)](),_0x4bcd66=new TextDecoder();let _0x4434f3='',_0xbf4dd8={};try{while(!![]){const {done:_0x3b6fd8,value:_0x4044b0}=await _0x54be79[_0x306f6c(0x1aa)]();if(_0x3b6fd8){if(_0xbf4dd8[_0x306f6c(0x1a9)]){_0x13d213?.[_0x306f6c(0x1b0)]('[LLM\x20API\x20SSE]\x20'+_0xbf4dd8[_0x306f6c(0x1a9)]);const _0x14c6e4=parseSSEData(_0xbf4dd8[_0x306f6c(0x1a9)]);yield _0x14c6e4;}break;}_0x4434f3+=_0x4bcd66['decode'](_0x4044b0,{'stream':!![]});const _0x267c91=_0x4434f3[_0x306f6c(0x1a0)]('\x0a');_0x4434f3=_0x267c91[_0x306f6c(0x1af)]()||'';for(const _0xfd2289 of _0x267c91){if(_0xfd2289[_0x306f6c(0x1b2)]()===''){if(_0xbf4dd8['data']){_0x13d213?.[_0x306f6c(0x1b0)](_0x306f6c(0x1ad)+_0xbf4dd8[_0x306f6c(0x1a9)]);const _0xadf9c3=parseSSEData(_0xbf4dd8[_0x306f6c(0x1a9)]);yield _0xadf9c3,_0xbf4dd8={};}continue;}if(_0xfd2289['startsWith'](':'))continue;const _0x2bc35b=_0xfd2289[_0x306f6c(0x19f)](':');if(_0x2bc35b===-0x1)continue;const _0x437aa6=_0xfd2289[_0x306f6c(0x1a7)](0x0,_0x2bc35b);let _0x3809f0=_0xfd2289['slice'](_0x2bc35b+0x1);_0x3809f0[_0x306f6c(0x19e)]('\x20')&&(_0x3809f0=_0x3809f0['slice'](0x1));switch(_0x437aa6){case _0x306f6c(0x19b):_0xbf4dd8[_0x306f6c(0x19b)]=_0x3809f0;break;case _0x306f6c(0x1a9):_0xbf4dd8[_0x306f6c(0x1a9)]=_0xbf4dd8[_0x306f6c(0x1a9)]?_0xbf4dd8[_0x306f6c(0x1a9)]+'\x0a'+_0x3809f0:_0x3809f0;break;case'id':_0xbf4dd8['id']=_0x3809f0;break;}}}}finally{_0x54be79['releaseLock']();}}function a112_0x4429(_0x354733,_0x3701c3){_0x354733=_0x354733-0x19b;const _0x510e09=a112_0x510e();let _0x44299e=_0x510e09[_0x354733];return _0x44299e;}function parseSSEData(_0x4be2f0){const _0x2caf46=a112_0x4429;try{return JSON[_0x2caf46(0x1a4)](_0x4be2f0);}catch(_0x168810){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x4be2f0,{'cause':_0x168810});}}
@@ -1 +1 @@
1
- (function(_0x126ec7,_0x2b133b){const _0x2b63b1=a113_0x43d9,_0x3a8f78=_0x126ec7();while(!![]){try{const _0x9198d5=-parseInt(_0x2b63b1(0x116))/0x1+-parseInt(_0x2b63b1(0x122))/0x2*(-parseInt(_0x2b63b1(0x124))/0x3)+-parseInt(_0x2b63b1(0x118))/0x4+parseInt(_0x2b63b1(0x121))/0x5*(parseInt(_0x2b63b1(0x11a))/0x6)+-parseInt(_0x2b63b1(0x11d))/0x7+parseInt(_0x2b63b1(0x11c))/0x8+parseInt(_0x2b63b1(0x119))/0x9*(parseInt(_0x2b63b1(0x111))/0xa);if(_0x9198d5===_0x2b133b)break;else _0x3a8f78['push'](_0x3a8f78['shift']());}catch(_0xeb4d27){_0x3a8f78['push'](_0x3a8f78['shift']());}}}(a113_0x1062,0x701be));import a113_0x4fb5fb from'string-width';export function stringWidth(_0x1bd924){return a113_0x4fb5fb(_0x1bd924);}export function padEnd(_0x3cc871,_0x308b8d){const _0x2f05ef=stringWidth(_0x3cc871);if(_0x2f05ef>=_0x308b8d)return _0x3cc871;return _0x3cc871+'\x20'['repeat'](_0x308b8d-_0x2f05ef);}export function padStart(_0x11a9fa,_0x452f39){const _0x6ee00d=a113_0x43d9,_0x178150=stringWidth(_0x11a9fa);if(_0x178150>=_0x452f39)return _0x11a9fa;return'\x20'[_0x6ee00d(0x10e)](_0x452f39-_0x178150)+_0x11a9fa;}export function centerAlign(_0x62454f,_0x3d7f5c){const _0x357343=a113_0x43d9,_0x50ed02=stringWidth(_0x62454f);if(_0x50ed02>_0x3d7f5c){if(_0x3d7f5c<=0x1)return'…'[_0x357343(0x110)](0x0,_0x3d7f5c);let _0x3519a7=_0x62454f;while(stringWidth(_0x3519a7+'…')>_0x3d7f5c){_0x3519a7=_0x3519a7[_0x357343(0x120)](0x0,-0x1);}return _0x3519a7+'…';}if(_0x50ed02===_0x3d7f5c)return _0x62454f;const _0x592a1f=_0x3d7f5c-_0x50ed02,_0x338893=Math[_0x357343(0x123)](_0x592a1f/0x2),_0x466c52=_0x592a1f-_0x338893;return'\x20'[_0x357343(0x10e)](_0x338893)+_0x62454f+'\x20'[_0x357343(0x10e)](_0x466c52);}export function escapeStringLiteral(_0x55b070){const _0x279604=a113_0x43d9;if(!_0x55b070||_0x55b070[_0x279604(0x127)]()['length']===0x0)throw new Error(_0x279604(0x11e));const _0x57bf3b=_0x55b070[_0x279604(0x117)](/'/g,'\x27\x27');return'\x27'+_0x57bf3b+'\x27';}export function globToLike(_0x2c89e1){const _0xa857c2=a113_0x43d9;let _0x798835=_0x2c89e1[_0xa857c2(0x117)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0xa857c2(0x117)](/_/g,'\x5c_');return _0x798835=_0x798835[_0xa857c2(0x117)](/\*/g,'%')[_0xa857c2(0x117)](/\?/g,'_'),_0x798835;}function a113_0x1062(){const _0xdc1b16=['597654QEwotv','floor','3kxmPFd','toLowerCase','padStart','trim','USERNAME','repeat','env','substring','1730270xbAzVo','random','toString','USER','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','151796ShvlRx','replace','3328980BOVPjF','63rCJjpQ','6nJPLlH','length','2926904MUiiae','5881463PtVAeI','Cannot\x20escape\x20empty\x20string\x20literal','\x5c$&','slice','2037845ffoEEW'];a113_0x1062=function(){return _0xdc1b16;};return a113_0x1062();}export function buildLikePattern(_0x2f3f3d){const _0x330011=a113_0x43d9;if(!_0x2f3f3d||_0x2f3f3d[_0x330011(0x127)]()[_0x330011(0x11b)]===0x0)throw new Error(_0x330011(0x115));const _0x563ed2=globToLike(_0x2f3f3d),_0x4e27a=_0x563ed2[_0x330011(0x117)](/'/g,'\x27\x27');return'\x27'+_0x4e27a+'\x27';}export function matchGlobPattern(_0xdc3301,_0x269121){const _0xb8b02f=a113_0x43d9,_0xad4140=_0x269121[_0xb8b02f(0x117)](/[.+^${}()|[\]\\]/g,_0xb8b02f(0x11f))[_0xb8b02f(0x117)](/\*/g,'.*')[_0xb8b02f(0x117)](/\?/g,'.'),_0x217e17=new RegExp('^'+_0xad4140+'$');return _0x217e17['test'](_0xdc3301);}export function getSanitizedUsername(){const _0x4d4296=a113_0x43d9,_0x35587e=process[_0x4d4296(0x10f)][_0x4d4296(0x114)]||process[_0x4d4296(0x10f)][_0x4d4296(0x128)]||'unknown';return _0x35587e['replace'](/[^a-zA-Z0-9]/g,'')[_0x4d4296(0x125)]();}export function generateRandomHex(){const _0x499bed=a113_0x43d9,_0x1c650b=Math[_0x499bed(0x123)](Math[_0x499bed(0x112)]()*0xfffff);return _0x1c650b[_0x499bed(0x113)](0x10)[_0x499bed(0x126)](0x5,'0');}function a113_0x43d9(_0x259e91,_0x11747a){_0x259e91=_0x259e91-0x10e;const _0x10620e=a113_0x1062();let _0x43d962=_0x10620e[_0x259e91];return _0x43d962;}export function sanitizeFileName(_0x5f091c){const _0xdaaf7=a113_0x43d9;return _0x5f091c[_0xdaaf7(0x125)]()[_0xdaaf7(0x117)](/[/\\:*?"<>|]/g,'-')[_0xdaaf7(0x117)](/\s+/g,'-')['replace'](/-+/g,'-')[_0xdaaf7(0x117)](/^-|-$/g,'');}
1
+ (function(_0x4c0ac5,_0x4ae63a){const _0x2fa3ce=a113_0x27fc,_0x37cedc=_0x4c0ac5();while(!![]){try{const _0x4103df=-parseInt(_0x2fa3ce(0x1e5))/0x1*(-parseInt(_0x2fa3ce(0x1dc))/0x2)+-parseInt(_0x2fa3ce(0x1dd))/0x3*(-parseInt(_0x2fa3ce(0x1d4))/0x4)+parseInt(_0x2fa3ce(0x1df))/0x5*(-parseInt(_0x2fa3ce(0x1e9))/0x6)+parseInt(_0x2fa3ce(0x1d8))/0x7+parseInt(_0x2fa3ce(0x1d7))/0x8*(-parseInt(_0x2fa3ce(0x1e6))/0x9)+-parseInt(_0x2fa3ce(0x1d1))/0xa+parseInt(_0x2fa3ce(0x1e0))/0xb*(-parseInt(_0x2fa3ce(0x1d5))/0xc);if(_0x4103df===_0x4ae63a)break;else _0x37cedc['push'](_0x37cedc['shift']());}catch(_0x5702ff){_0x37cedc['push'](_0x37cedc['shift']());}}}(a113_0x2dd0,0x802ac));import a113_0xb49ff7 from'string-width';export function stringWidth(_0x330cee){return a113_0xb49ff7(_0x330cee);}export function padEnd(_0x5ce9a8,_0x64ba6d){const _0x189b9f=a113_0x27fc,_0x1b59ef=stringWidth(_0x5ce9a8);if(_0x1b59ef>=_0x64ba6d)return _0x5ce9a8;return _0x5ce9a8+'\x20'[_0x189b9f(0x1e3)](_0x64ba6d-_0x1b59ef);}export function padStart(_0x247001,_0x42b9db){const _0x552f3e=a113_0x27fc,_0x1fee30=stringWidth(_0x247001);if(_0x1fee30>=_0x42b9db)return _0x247001;return'\x20'[_0x552f3e(0x1e3)](_0x42b9db-_0x1fee30)+_0x247001;}function a113_0x2dd0(){const _0x2caba4=['unknown','padStart','substring','1107810jaRWeM','slice','USERNAME','4fewzUx','357960DMGQEM','trim','8kxMCfh','4850314xZGVEd','test','toString','floor','2iVILAs','2875623HiPito','length','56080WKaDLu','275lljovA','Cannot\x20escape\x20empty\x20string\x20literal','toLowerCase','repeat','env','189182RDEZBc','3627378FbsqOB','replace','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','30DZUfaI'];a113_0x2dd0=function(){return _0x2caba4;};return a113_0x2dd0();}export function centerAlign(_0xb3ebbc,_0x4e0473){const _0x4d8aab=a113_0x27fc,_0x8eb266=stringWidth(_0xb3ebbc);if(_0x8eb266>_0x4e0473){if(_0x4e0473<=0x1)return'…'[_0x4d8aab(0x1d0)](0x0,_0x4e0473);let _0x36bbc1=_0xb3ebbc;while(stringWidth(_0x36bbc1+'…')>_0x4e0473){_0x36bbc1=_0x36bbc1[_0x4d8aab(0x1d2)](0x0,-0x1);}return _0x36bbc1+'…';}if(_0x8eb266===_0x4e0473)return _0xb3ebbc;const _0x1be30d=_0x4e0473-_0x8eb266,_0x53cead=Math['floor'](_0x1be30d/0x2),_0x2be5b2=_0x1be30d-_0x53cead;return'\x20'[_0x4d8aab(0x1e3)](_0x53cead)+_0xb3ebbc+'\x20'[_0x4d8aab(0x1e3)](_0x2be5b2);}export function escapeStringLiteral(_0x4dfb69){const _0x13e11b=a113_0x27fc;if(!_0x4dfb69||_0x4dfb69[_0x13e11b(0x1d6)]()[_0x13e11b(0x1de)]===0x0)throw new Error(_0x13e11b(0x1e1));const _0x2bf204=_0x4dfb69['replace'](/'/g,'\x27\x27');return'\x27'+_0x2bf204+'\x27';}function a113_0x27fc(_0x3fabb8,_0x5efb8d){_0x3fabb8=_0x3fabb8-0x1d0;const _0x2dd04e=a113_0x2dd0();let _0x27fc4e=_0x2dd04e[_0x3fabb8];return _0x27fc4e;}export function globToLike(_0x435cc2){const _0x153ade=a113_0x27fc;let _0x2f472c=_0x435cc2['replace'](/\\/g,'\x5c\x5c')[_0x153ade(0x1e7)](/%/g,'\x5c%')[_0x153ade(0x1e7)](/_/g,'\x5c_');return _0x2f472c=_0x2f472c[_0x153ade(0x1e7)](/\*/g,'%')[_0x153ade(0x1e7)](/\?/g,'_'),_0x2f472c;}export function buildLikePattern(_0x7be6bc){const _0x2d152e=a113_0x27fc;if(!_0x7be6bc||_0x7be6bc[_0x2d152e(0x1d6)]()[_0x2d152e(0x1de)]===0x0)throw new Error(_0x2d152e(0x1e8));const _0x524a3b=globToLike(_0x7be6bc),_0x5f4c92=_0x524a3b['replace'](/'/g,'\x27\x27');return'\x27'+_0x5f4c92+'\x27';}export function matchGlobPattern(_0x4aae52,_0x24c53c){const _0x4a3218=a113_0x27fc,_0x428f06=_0x24c53c[_0x4a3218(0x1e7)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x4a3218(0x1e7)](/\*/g,'.*')[_0x4a3218(0x1e7)](/\?/g,'.'),_0x1e888e=new RegExp('^'+_0x428f06+'$');return _0x1e888e[_0x4a3218(0x1d9)](_0x4aae52);}export function getSanitizedUsername(){const _0xbad70b=a113_0x27fc,_0x43c3e5=process[_0xbad70b(0x1e4)]['USER']||process[_0xbad70b(0x1e4)][_0xbad70b(0x1d3)]||_0xbad70b(0x1ea);return _0x43c3e5[_0xbad70b(0x1e7)](/[^a-zA-Z0-9]/g,'')[_0xbad70b(0x1e2)]();}export function generateRandomHex(){const _0x7fe63=a113_0x27fc,_0x3eea82=Math[_0x7fe63(0x1db)](Math['random']()*0xfffff);return _0x3eea82[_0x7fe63(0x1da)](0x10)[_0x7fe63(0x1eb)](0x5,'0');}export function sanitizeFileName(_0x3dbffc){const _0x52ea3c=a113_0x27fc;return _0x3dbffc[_0x52ea3c(0x1e2)]()[_0x52ea3c(0x1e7)](/[/\\:*?"<>|]/g,'-')[_0x52ea3c(0x1e7)](/\s+/g,'-')[_0x52ea3c(0x1e7)](/-+/g,'-')['replace'](/^-|-$/g,'');}
@@ -1 +1 @@
1
- (function(_0x20e25f,_0x58e2aa){const _0x4a2300=a114_0x5d26,_0x18109c=_0x20e25f();while(!![]){try{const _0x30afd2=parseInt(_0x4a2300(0xc8))/0x1+-parseInt(_0x4a2300(0xc2))/0x2+parseInt(_0x4a2300(0xca))/0x3+-parseInt(_0x4a2300(0xbe))/0x4*(-parseInt(_0x4a2300(0xc1))/0x5)+-parseInt(_0x4a2300(0xbf))/0x6+parseInt(_0x4a2300(0xbc))/0x7*(-parseInt(_0x4a2300(0xb7))/0x8)+parseInt(_0x4a2300(0xb9))/0x9;if(_0x30afd2===_0x58e2aa)break;else _0x18109c['push'](_0x18109c['shift']());}catch(_0x3925ec){_0x18109c['push'](_0x18109c['shift']());}}}(a114_0x2f78,0x34f02));function hasWildcard(_0xcc1ac3){const _0x2dcaf5=a114_0x5d26;return _0xcc1ac3['includes']('*')||_0xcc1ac3[_0x2dcaf5(0xbd)]('?');}export function parseTableReference(_0x20be02){const _0x3e1a65=a114_0x5d26;if(!_0x20be02||_0x20be02[_0x3e1a65(0xb5)]()[_0x3e1a65(0xb8)]===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x4239f6=_0x20be02[_0x3e1a65(0xb5)](),_0x31c83d={'original':_0x4239f6},_0x3aeda5=_0x4239f6[_0x3e1a65(0xcb)]('.');if(_0x3aeda5[_0x3e1a65(0xb8)]===0x1){const _0x3c20fd=_0x3aeda5[0x0];if(!_0x3c20fd)throw new Error(_0x3e1a65(0xb4));_0x31c83d['table']=_0x3c20fd;}else{if(_0x3aeda5['length']===0x2){const [_0x31482a,_0x13fc70]=_0x3aeda5;if(!_0x31482a)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x13fc70)throw new Error(_0x3e1a65(0xc9));_0x31c83d[_0x3e1a65(0xc7)]=_0x31482a,_0x31c83d[_0x3e1a65(0xc5)]=_0x13fc70;}else{if(_0x3aeda5[_0x3e1a65(0xb8)]===0x3){const [_0xdbdc71,_0x3f26df,_0x3b58be]=_0x3aeda5;if(!_0xdbdc71||!_0x3f26df||!_0x3b58be)throw new Error(_0x3e1a65(0xbb));_0x31c83d[_0x3e1a65(0xc6)]=_0xdbdc71,_0x31c83d[_0x3e1a65(0xc7)]=_0x3f26df,_0x31c83d[_0x3e1a65(0xc5)]=_0x3b58be;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x31c83d;}function a114_0x2f78(){const _0x5b196f=['trim','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','104Rhhcst','length','3114558nBWHsw','join','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','209783FkXbZS','includes','3408hHCzps','2147796sUYDbe','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','2170lEuslM','786334YXklro','push','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','table','catalog','database','242093EiKTZK','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','1198923jfakVt','split','Pattern\x20cannot\x20be\x20just\x20a\x20dot'];a114_0x2f78=function(){return _0x5b196f;};return a114_0x2f78();}export function formatTableReference(_0x470840){const _0x57300e=a114_0x5d26,_0x1141df=[];return _0x470840['catalog']&&_0x1141df[_0x57300e(0xc3)](_0x470840['catalog']),_0x470840['database']&&_0x1141df['push'](_0x470840['database']),_0x470840[_0x57300e(0xc5)]&&_0x1141df[_0x57300e(0xc3)](_0x470840[_0x57300e(0xc5)]),_0x1141df[_0x57300e(0xba)]('.');}function a114_0x5d26(_0x973e26,_0x4b5299){_0x973e26=_0x973e26-0xb4;const _0x2f78b4=a114_0x2f78();let _0x5d26e9=_0x2f78b4[_0x973e26];return _0x5d26e9;}export function validateTableListReference(_0x1cd421){return undefined;}export function validateTableDescribeReference(_0x345e25){const _0x1ec35a=a114_0x5d26;if(!_0x345e25[_0x1ec35a(0xc5)])return _0x1ec35a(0xb6);if(_0x345e25[_0x1ec35a(0xc7)]&&hasWildcard(_0x345e25['database']))return _0x1ec35a(0xc0);if(hasWildcard(_0x345e25[_0x1ec35a(0xc5)]))return _0x1ec35a(0xc4);return undefined;}
1
+ (function(_0xdd1031,_0xdf3c12){const _0x3aba07=a114_0x5b72,_0xaba8b0=_0xdd1031();while(!![]){try{const _0x36e508=-parseInt(_0x3aba07(0x1f4))/0x1+-parseInt(_0x3aba07(0x205))/0x2+parseInt(_0x3aba07(0x1ff))/0x3*(parseInt(_0x3aba07(0x1fd))/0x4)+-parseInt(_0x3aba07(0x1fb))/0x5+parseInt(_0x3aba07(0x1fa))/0x6+parseInt(_0x3aba07(0x202))/0x7+parseInt(_0x3aba07(0x1f6))/0x8;if(_0x36e508===_0xdf3c12)break;else _0xaba8b0['push'](_0xaba8b0['shift']());}catch(_0x8a9649){_0xaba8b0['push'](_0xaba8b0['shift']());}}}(a114_0x1a70,0xb2302));function hasWildcard(_0xb8de96){return _0xb8de96['includes']('*')||_0xb8de96['includes']('?');}export function parseTableReference(_0x23567d){const _0x377833=a114_0x5b72;if(!_0x23567d||_0x23567d[_0x377833(0x1f3)]()[_0x377833(0x1f7)]===0x0)throw new Error(_0x377833(0x1fc));const _0x12ffe3=_0x23567d[_0x377833(0x1f3)](),_0xbe013f={'original':_0x12ffe3},_0x17871d=_0x12ffe3[_0x377833(0x204)]('.');if(_0x17871d[_0x377833(0x1f7)]===0x1){const _0x4645fe=_0x17871d[0x0];if(!_0x4645fe)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0xbe013f[_0x377833(0x1fe)]=_0x4645fe;}else{if(_0x17871d[_0x377833(0x1f7)]===0x2){const [_0x1b20af,_0x4fb7d1]=_0x17871d;if(!_0x1b20af)throw new Error(_0x377833(0x1f5));if(!_0x4fb7d1)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0xbe013f[_0x377833(0x201)]=_0x1b20af,_0xbe013f[_0x377833(0x1fe)]=_0x4fb7d1;}else{if(_0x17871d['length']===0x3){const [_0x223252,_0x5307f6,_0x105eab]=_0x17871d;if(!_0x223252||!_0x5307f6||!_0x105eab)throw new Error(_0x377833(0x1f9));_0xbe013f[_0x377833(0x203)]=_0x223252,_0xbe013f[_0x377833(0x201)]=_0x5307f6,_0xbe013f[_0x377833(0x1fe)]=_0x105eab;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0xbe013f;}function a114_0x1a70(){const _0xecee5d=['1870434LgJtUW','trim','838016WEytxX','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','16930328BCSiID','length','push','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','882372aimTSg','1525085oSiRBw','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','20SsIAZD','table','153087pzKtOv','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','database','2027270tnrIun','catalog','split'];a114_0x1a70=function(){return _0xecee5d;};return a114_0x1a70();}export function formatTableReference(_0x5123b2){const _0x35d9c9=a114_0x5b72,_0x3286b0=[];return _0x5123b2[_0x35d9c9(0x203)]&&_0x3286b0['push'](_0x5123b2['catalog']),_0x5123b2[_0x35d9c9(0x201)]&&_0x3286b0['push'](_0x5123b2['database']),_0x5123b2[_0x35d9c9(0x1fe)]&&_0x3286b0[_0x35d9c9(0x1f8)](_0x5123b2['table']),_0x3286b0['join']('.');}export function validateTableListReference(_0x111757){return undefined;}function a114_0x5b72(_0x5e42dd,_0x2567ca){_0x5e42dd=_0x5e42dd-0x1f3;const _0x1a70e3=a114_0x1a70();let _0x5b720c=_0x1a70e3[_0x5e42dd];return _0x5b720c;}export function validateTableDescribeReference(_0x3c877e){const _0x4d2858=a114_0x5b72;if(!_0x3c877e[_0x4d2858(0x1fe)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x3c877e[_0x4d2858(0x201)]&&hasWildcard(_0x3c877e['database']))return _0x4d2858(0x200);if(hasWildcard(_0x3c877e['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
@@ -1 +1 @@
1
- const a115_0x426594=a115_0x2297;(function(_0xab8d41,_0x214bd5){const _0x994582=a115_0x2297,_0x41404b=_0xab8d41();while(!![]){try{const _0x24688b=parseInt(_0x994582(0xaa))/0x1*(parseInt(_0x994582(0xbd))/0x2)+-parseInt(_0x994582(0xae))/0x3*(parseInt(_0x994582(0xa5))/0x4)+-parseInt(_0x994582(0xba))/0x5+-parseInt(_0x994582(0xbc))/0x6*(parseInt(_0x994582(0xbb))/0x7)+-parseInt(_0x994582(0xb7))/0x8+-parseInt(_0x994582(0xb3))/0x9*(parseInt(_0x994582(0xb8))/0xa)+parseInt(_0x994582(0xa7))/0xb;if(_0x24688b===_0x214bd5)break;else _0x41404b['push'](_0x41404b['shift']());}catch(_0x1c4a33){_0x41404b['push'](_0x41404b['shift']());}}}(a115_0x8fad,0xc8a32));import{existsSync,readFileSync}from'fs';function a115_0x2297(_0xd71ad9,_0x5c8d56){_0xd71ad9=_0xd71ad9-0xa1;const _0x8fad82=a115_0x8fad();let _0x22970f=_0x8fad82[_0xd71ad9];return _0x22970f;}function a115_0x8fad(){const _0xbb45e2=['Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','3AeWmAj','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','resolve','parent_segment','join','1995705VZlYUV','Invalid\x20tdx.json:\x20expected\x20object','stringify','cwd','12169376TFhKVx','30pLCcTx','relative','6958515JcDcNH','28fgiDUp','1721814pduvdD','3076OhpcTH','Invalid\x20JSON\x20in\x20','startsWith','object','string','4756132iWqTCe','parse','66559691WPVFrz','root','tdx.json','446zpZoyC','dirname','replace'];a115_0x8fad=function(){return _0xbb45e2;};return a115_0x8fad();}import a115_0x15a3e8 from'path';const TDX_CONFIG_FILE=a115_0x426594(0xa9),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x2d76aa=process[a115_0x426594(0xb6)]()){const _0x219002=a115_0x426594;let _0x532083=a115_0x15a3e8[_0x219002(0xb0)](_0x2d76aa);const _0x43123c=a115_0x15a3e8['parse'](_0x532083)[_0x219002(0xa8)];while(_0x532083!==_0x43123c){const _0x11babf=a115_0x15a3e8['join'](_0x532083,TDX_CONFIG_FILE);if(existsSync(_0x11babf))return _0x11babf;_0x532083=a115_0x15a3e8[_0x219002(0xab)](_0x532083);}return null;}export function loadTdxConfig(_0x42746c){const _0x252e3f=a115_0x426594,_0x2058ed=readFileSync(_0x42746c,'utf-8');let _0xe1bede;try{_0xe1bede=JSON[_0x252e3f(0xa6)](_0x2058ed);}catch{throw new Error(_0x252e3f(0xa1)+_0x42746c);}if(!_0xe1bede||typeof _0xe1bede!==_0x252e3f(0xa3))throw new Error(_0x252e3f(0xb4));const _0x1a34f4=_0xe1bede;if(!_0x1a34f4['parent_segment']||typeof _0x1a34f4[_0x252e3f(0xb1)]!==_0x252e3f(0xa4))throw new Error(_0x252e3f(0xad));return{'parent_segment':_0x1a34f4['parent_segment']};}export function findTdxConfig(_0x457bef=process[a115_0x426594(0xb6)]()){const _0x3fb762=a115_0x426594,_0x1d5b79=findTdxConfigPath(_0x457bef);if(!_0x1d5b79)throw new Error(_0x3fb762(0xaf));const _0x35cf41=loadTdxConfig(_0x1d5b79),_0x259fea=a115_0x15a3e8[_0x3fb762(0xab)](_0x1d5b79);return{'config':_0x35cf41,'configPath':_0x1d5b79,'configDir':_0x259fea};}export function getSegmentRootDir(_0x229833,_0x29151b=process[a115_0x426594(0xb6)]()){return a115_0x15a3e8['join'](_0x29151b,SEGMENTS_DIR,_0x229833);}export function getTdxConfigPath(_0xe51cb3,_0x1b3004=process[a115_0x426594(0xb6)]()){return a115_0x15a3e8['join'](getSegmentRootDir(_0xe51cb3,_0x1b3004),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x4d875f,_0xbb51e8){const _0x166ccf=a115_0x426594,_0x2604fc=a115_0x15a3e8[_0x166ccf(0xb0)](_0x4d875f),_0x1556ea=a115_0x15a3e8[_0x166ccf(0xb9)](_0xbb51e8,_0x2604fc);if(_0x1556ea[_0x166ccf(0xa2)]('..'))return'';return _0x1556ea;}export function localPathToTdFolderPath(_0x47790d){const _0x594863=a115_0x426594,_0x266504=a115_0x15a3e8['dirname'](_0x47790d);if(_0x266504==='.'||_0x266504==='')return'';return _0x266504[_0x594863(0xac)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x5f0d83,_0x3c2e30){const _0x14f060=a115_0x426594;if(!_0x5f0d83)return _0x3c2e30;return a115_0x15a3e8[_0x14f060(0xb2)](_0x3c2e30,_0x5f0d83);}export function createTdxConfigContent(_0x4b4bff){const _0x219f5b=a115_0x426594,_0x2e5816={'parent_segment':_0x4b4bff};return JSON[_0x219f5b(0xb5)](_0x2e5816,null,0x2)+'\x0a';}
1
+ const a115_0x42b4a5=a115_0x1544;(function(_0x18e1a0,_0x1acbed){const _0x1f5021=a115_0x1544,_0x494153=_0x18e1a0();while(!![]){try{const _0x773231=parseInt(_0x1f5021(0xcd))/0x1+-parseInt(_0x1f5021(0xc9))/0x2+parseInt(_0x1f5021(0xb7))/0x3*(-parseInt(_0x1f5021(0xd1))/0x4)+-parseInt(_0x1f5021(0xc8))/0x5+parseInt(_0x1f5021(0xbe))/0x6*(parseInt(_0x1f5021(0xb8))/0x7)+-parseInt(_0x1f5021(0xc5))/0x8+-parseInt(_0x1f5021(0xbd))/0x9*(-parseInt(_0x1f5021(0xce))/0xa);if(_0x773231===_0x1acbed)break;else _0x494153['push'](_0x494153['shift']());}catch(_0x4a660b){_0x494153['push'](_0x494153['shift']());}}}(a115_0x2531,0x54178));function a115_0x2531(){const _0x141a94=['2762672ShpiCq','relative','Invalid\x20JSON\x20in\x20','3172060bZYIaj','726450JbkilL','root','parent_segment','join','250771wuXRPl','687710wxiAXJ','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','object','195508Egmchz','27CZvpfi','7dIttgJ','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','replace','cwd','Invalid\x20tdx.json:\x20expected\x20object','198xUpXmP','2181426McHgfT','stringify','resolve','utf-8','dirname','segments','string'];a115_0x2531=function(){return _0x141a94;};return a115_0x2531();}import{existsSync,readFileSync}from'fs';import a115_0x5d53bf from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a115_0x42b4a5(0xc3);export function findTdxConfigPath(_0x1fae39=process[a115_0x42b4a5(0xbb)]()){const _0x2ad2e5=a115_0x42b4a5;let _0x38ec27=a115_0x5d53bf[_0x2ad2e5(0xc0)](_0x1fae39);const _0x263fff=a115_0x5d53bf['parse'](_0x38ec27)[_0x2ad2e5(0xca)];while(_0x38ec27!==_0x263fff){const _0x589c37=a115_0x5d53bf[_0x2ad2e5(0xcc)](_0x38ec27,TDX_CONFIG_FILE);if(existsSync(_0x589c37))return _0x589c37;_0x38ec27=a115_0x5d53bf[_0x2ad2e5(0xc2)](_0x38ec27);}return null;}export function loadTdxConfig(_0x24b491){const _0x254f32=a115_0x42b4a5,_0x308d52=readFileSync(_0x24b491,_0x254f32(0xc1));let _0x39400b;try{_0x39400b=JSON['parse'](_0x308d52);}catch{throw new Error(_0x254f32(0xc7)+_0x24b491);}if(!_0x39400b||typeof _0x39400b!==_0x254f32(0xd0))throw new Error(_0x254f32(0xbc));const _0x5be9ed=_0x39400b;if(!_0x5be9ed[_0x254f32(0xcb)]||typeof _0x5be9ed[_0x254f32(0xcb)]!==_0x254f32(0xc4))throw new Error(_0x254f32(0xcf));return{'parent_segment':_0x5be9ed[_0x254f32(0xcb)]};}function a115_0x1544(_0x31e620,_0x91298){_0x31e620=_0x31e620-0xb7;const _0x2531a5=a115_0x2531();let _0x154444=_0x2531a5[_0x31e620];return _0x154444;}export function findTdxConfig(_0x4dce4d=process['cwd']()){const _0x5d3f23=a115_0x42b4a5,_0x171a16=findTdxConfigPath(_0x4dce4d);if(!_0x171a16)throw new Error(_0x5d3f23(0xb9));const _0x3fc71a=loadTdxConfig(_0x171a16),_0x22eca2=a115_0x5d53bf['dirname'](_0x171a16);return{'config':_0x3fc71a,'configPath':_0x171a16,'configDir':_0x22eca2};}export function getSegmentRootDir(_0x93ac2b,_0x2c94aa=process['cwd']()){const _0xf36abd=a115_0x42b4a5;return a115_0x5d53bf[_0xf36abd(0xcc)](_0x2c94aa,SEGMENTS_DIR,_0x93ac2b);}export function getTdxConfigPath(_0xd1cedc,_0x2d8f58=process[a115_0x42b4a5(0xbb)]()){return a115_0x5d53bf['join'](getSegmentRootDir(_0xd1cedc,_0x2d8f58),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x44c995,_0x4770c8){const _0x37a66d=a115_0x42b4a5,_0x249a00=a115_0x5d53bf[_0x37a66d(0xc0)](_0x44c995),_0x497af1=a115_0x5d53bf[_0x37a66d(0xc6)](_0x4770c8,_0x249a00);if(_0x497af1['startsWith']('..'))return'';return _0x497af1;}export function localPathToTdFolderPath(_0x679f28){const _0x2982ef=a115_0x42b4a5,_0x2a720d=a115_0x5d53bf[_0x2982ef(0xc2)](_0x679f28);if(_0x2a720d==='.'||_0x2a720d==='')return'';return _0x2a720d[_0x2982ef(0xba)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0xbf8bf9,_0x42bc99){const _0x50a20e=a115_0x42b4a5;if(!_0xbf8bf9)return _0x42bc99;return a115_0x5d53bf[_0x50a20e(0xcc)](_0x42bc99,_0xbf8bf9);}export function createTdxConfigContent(_0x30fc38){const _0x5641a1=a115_0x42b4a5,_0xe0c34a={'parent_segment':_0x30fc38};return JSON[_0x5641a1(0xbf)](_0xe0c34a,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a116_0x49afb2=a116_0x4cd4;(function(_0x155441,_0x1f7a8d){const _0x3b4ca8=a116_0x4cd4,_0x49ac62=_0x155441();while(!![]){try{const _0x31ebfe=parseInt(_0x3b4ca8(0xdc))/0x1+parseInt(_0x3b4ca8(0xb7))/0x2*(-parseInt(_0x3b4ca8(0xea))/0x3)+-parseInt(_0x3b4ca8(0xb8))/0x4+parseInt(_0x3b4ca8(0xc7))/0x5+parseInt(_0x3b4ca8(0xef))/0x6*(parseInt(_0x3b4ca8(0xe3))/0x7)+parseInt(_0x3b4ca8(0xe0))/0x8+-parseInt(_0x3b4ca8(0xe6))/0x9;if(_0x31ebfe===_0x1f7a8d)break;else _0x49ac62['push'](_0x49ac62['shift']());}catch(_0x135987){_0x49ac62['push'](_0x49ac62['shift']());}}}(a116_0x59c4,0xc404d));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';import{pipeline}from'stream/promises';import a116_0x5c397b from'chalk';function a116_0x59c4(){const _0x39f1f4=['gray','red','abs','padStart','split','mtime','name','Warning:\x20Error\x20writing\x20to\x20tdx.log:','test','ERROR','1425953CKQsoW','getMinutes','getSeconds','tdx','9748912BNWggC','stack','cyan','654773NiNBgY','filter','getDate','8163414znlIgu','fileOnly','end','cause','51qiFzhw','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','trace','Warning:\x20Failed\x20to\x20compress\x20','WARN','6ULxqcV','tdx.log','write','error','logStream','init','81976OevRHd','6349676tJqmLS','TRACE','toISOString','.gz','INFO','warn','yellow','includes','close','message','map','DEBUG','logDir','floor','getMilliseconds','6280240MLUFGx','debug','log','info','rotateOldLogs','stringify','getHours','.log','toString','getMonth','logLevel'];a116_0x59c4=function(){return _0x39f1f4;};return a116_0x59c4();}function safeStringify(_0x4ae7c4){const _0xbb6547=a116_0x4cd4;if(typeof _0x4ae7c4==='string')return _0x4ae7c4;if(_0x4ae7c4 instanceof Error)return _0x4ae7c4[_0xbb6547(0xe1)]||_0x4ae7c4['name']+':\x20'+_0x4ae7c4[_0xbb6547(0xc1)];try{return JSON[_0xbb6547(0xcc)](_0x4ae7c4,(_0x4fc975,_0x37fe4a)=>{const _0x59560e=_0xbb6547;if(_0x37fe4a instanceof Error)return{'name':_0x37fe4a[_0x59560e(0xd8)],'message':_0x37fe4a[_0x59560e(0xc1)],'stack':_0x37fe4a[_0x59560e(0xe1)],'cause':_0x37fe4a[_0x59560e(0xe9)]};return _0x37fe4a;});}catch{return String(_0x4ae7c4);}}function getTimezoneOffset(){const _0x578943=a116_0x4cd4,_0x1183d2=-new Date()['getTimezoneOffset'](),_0x399212=Math[_0x578943(0xc5)](Math[_0x578943(0xd4)](_0x1183d2)/0x3c),_0x5201c3=Math[_0x578943(0xd4)](_0x1183d2)%0x3c,_0x518f4a=_0x1183d2>=0x0?'+':'-';return''+_0x518f4a+_0x399212['toString']()['padStart'](0x2,'0')+_0x5201c3[_0x578943(0xcf)]()[_0x578943(0xd5)](0x2,'0');}function formatTimestamp(){const _0xa1e9a4=a116_0x4cd4,_0x233eb4=new Date(),_0x3dc848=_0x233eb4['getFullYear'](),_0x155154=(_0x233eb4[_0xa1e9a4(0xd0)]()+0x1)[_0xa1e9a4(0xcf)]()['padStart'](0x2,'0'),_0xff3be4=_0x233eb4[_0xa1e9a4(0xe5)]()['toString']()[_0xa1e9a4(0xd5)](0x2,'0'),_0x4cbc48=_0x233eb4[_0xa1e9a4(0xcd)]()[_0xa1e9a4(0xcf)]()['padStart'](0x2,'0'),_0x20878a=_0x233eb4[_0xa1e9a4(0xdd)]()[_0xa1e9a4(0xcf)]()[_0xa1e9a4(0xd5)](0x2,'0'),_0x454767=_0x233eb4[_0xa1e9a4(0xde)]()[_0xa1e9a4(0xcf)]()[_0xa1e9a4(0xd5)](0x2,'0'),_0x57d550=_0x233eb4[_0xa1e9a4(0xc6)]()[_0xa1e9a4(0xcf)]()[_0xa1e9a4(0xd5)](0x3,'0'),_0x2e2f64=getTimezoneOffset();return _0x3dc848+'-'+_0x155154+'-'+_0xff3be4+'\x20'+_0x4cbc48+':'+_0x20878a+':'+_0x454767+'.'+_0x57d550+_0x2e2f64;}function formatColoredLogEntry(_0x33ed82,_0x1bb2d1){const _0x1bbf0b=a116_0x4cd4,_0x5e063c=formatTimestamp(),_0x4f2ca9=_0x1bb2d1[_0x1bbf0b(0xc2)](safeStringify)['join']('\x20'),_0x3bd76d=a116_0x5c397b[_0x1bbf0b(0xd2)](_0x5e063c);let _0x31be67;switch(_0x33ed82){case _0x1bbf0b(0xca):_0x31be67=a116_0x5c397b[_0x1bbf0b(0xe2)]('['+_0x33ed82+']\x20');break;case _0x1bbf0b(0xbd):_0x31be67=a116_0x5c397b[_0x1bbf0b(0xbe)]('['+_0x33ed82+']\x20');break;case _0x1bbf0b(0xf2):_0x31be67=a116_0x5c397b[_0x1bbf0b(0xd3)]('['+_0x33ed82+']');break;case _0x1bbf0b(0xc8):_0x31be67=a116_0x5c397b[_0x1bbf0b(0xd2)]('['+_0x33ed82+']');break;default:_0x31be67='['+_0x33ed82+']';}return _0x3bd76d+'\x20'+_0x31be67+'\x20'+_0x4f2ca9;}export var LogLevel;function a116_0x4cd4(_0x3b75b3,_0x15cd5b){_0x3b75b3=_0x3b75b3-0xb7;const _0x59c44b=a116_0x59c4();let _0x4cd434=_0x59c44b[_0x3b75b3];return _0x4cd434;}(function(_0x336337){const _0x32ddab=a116_0x4cd4;_0x336337[_0x336337[_0x32ddab(0xb9)]=-0x2]=_0x32ddab(0xb9),_0x336337[_0x336337[_0x32ddab(0xc3)]=-0x1]=_0x32ddab(0xc3),_0x336337[_0x336337[_0x32ddab(0xbc)]=0x0]='INFO',_0x336337[_0x336337[_0x32ddab(0xee)]=0x1]='WARN',_0x336337[_0x336337[_0x32ddab(0xdb)]=0x2]=_0x32ddab(0xdb);}(LogLevel||(LogLevel={})));export class TDXLogger{[a116_0x49afb2(0xf3)];[a116_0x49afb2(0xc4)];[a116_0x49afb2(0xd1)];[a116_0x49afb2(0xe7)];constructor(_0x4a7a5e=LogLevel[a116_0x49afb2(0xbc)],_0xb685fd=![]){const _0x3d070c=a116_0x49afb2;this['logDir']=join(homedir(),'.cache',_0x3d070c(0xdf),'logs'),this[_0x3d070c(0xd1)]=_0x4a7a5e,this[_0x3d070c(0xe7)]=_0xb685fd;}async[a116_0x49afb2(0xf4)](){const _0x4b9381=a116_0x49afb2;try{await mkdir(this[_0x4b9381(0xc4)],{'recursive':!![]}),await this['rotateOldLogs']();const _0x373c91=join(this[_0x4b9381(0xc4)],'tdx.log');this[_0x4b9381(0xf3)]=createWriteStream(_0x373c91,{'flags':'a'}),this[_0x4b9381(0xf3)]['on'](_0x4b9381(0xf2),_0xc7011e=>{const _0xc10687=_0x4b9381;console['error'](_0xc10687(0xd9),_0xc7011e[_0xc10687(0xc1)]);});}catch(_0x5c0fa0){console['error'](_0x4b9381(0xeb),_0x5c0fa0);}}async[a116_0x49afb2(0xcb)](){const _0x41313e=a116_0x49afb2;try{const _0x587b93=await readdir(this[_0x41313e(0xc4)]),_0x18e1ac=new Date()[_0x41313e(0xba)]()[_0x41313e(0xd6)]('T')[0x0];if(_0x587b93[_0x41313e(0xbf)](_0x41313e(0xf0))){const _0x4f80d9=join(this[_0x41313e(0xc4)],_0x41313e(0xf0)),_0x44aa72=await stat(_0x4f80d9),_0x27738f=new Date(_0x44aa72[_0x41313e(0xd7)])[_0x41313e(0xba)]()['split']('T')[0x0];if(_0x27738f<_0x18e1ac){const _0x1f5a51=join(this[_0x41313e(0xc4)],'tdx-'+_0x27738f+_0x41313e(0xce));await rename(_0x4f80d9,_0x1f5a51);}}const _0x3a3b47=await readdir(this[_0x41313e(0xc4)]),_0x525661=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x4ed448=_0x3a3b47[_0x41313e(0xe4)](_0x3150a2=>_0x525661[_0x41313e(0xda)](_0x3150a2));for(const _0x709cdb of _0x4ed448){const _0x57f692=join(this[_0x41313e(0xc4)],_0x709cdb),_0x49a236=join(this['logDir'],_0x709cdb+_0x41313e(0xbb));try{await pipeline(createReadStream(_0x57f692),createGzip(),createWriteStream(_0x49a236)),await unlink(_0x57f692);}catch(_0x3d9a79){console[_0x41313e(0xf2)](_0x41313e(0xed)+_0x709cdb+':',_0x3d9a79);}}}catch{}}[a116_0x49afb2(0xc8)](..._0x15824d){const _0x724d3f=a116_0x49afb2;if(this['logLevel']>LogLevel[_0x724d3f(0xc3)])return;const _0x25c2c8=formatColoredLogEntry(_0x724d3f(0xc8),_0x15824d);this[_0x724d3f(0xf3)]?.['write'](_0x25c2c8+'\x0a');}[a116_0x49afb2(0xec)](..._0x285624){const _0x49c134=a116_0x49afb2;if(this[_0x49c134(0xd1)]>LogLevel['TRACE'])return;const _0x1c469d=formatColoredLogEntry(_0x49c134(0xec),_0x285624);this[_0x49c134(0xf3)]?.[_0x49c134(0xf1)](_0x1c469d+'\x0a');}[a116_0x49afb2(0xca)](..._0x54e095){const _0x5d681e=a116_0x49afb2;if(this[_0x5d681e(0xd1)]>LogLevel[_0x5d681e(0xbc)])return;const _0x17415b=formatColoredLogEntry(_0x5d681e(0xca),_0x54e095);!this['fileOnly']&&console[_0x5d681e(0xc9)](_0x17415b),this[_0x5d681e(0xf3)]?.[_0x5d681e(0xf1)](_0x17415b+'\x0a');}['warn'](..._0x244566){const _0xa0fceb=a116_0x49afb2;if(this[_0xa0fceb(0xd1)]>LogLevel['WARN'])return;const _0x1c2b8b=formatColoredLogEntry(_0xa0fceb(0xbd),_0x244566);!this[_0xa0fceb(0xe7)]&&console['error'](_0x1c2b8b),this[_0xa0fceb(0xf3)]?.['write'](_0x1c2b8b+'\x0a');}[a116_0x49afb2(0xf2)](..._0x2c0401){const _0x4afa18=a116_0x49afb2,_0x316041=formatColoredLogEntry('error',_0x2c0401);!this[_0x4afa18(0xe7)]&&console['error'](_0x316041),this[_0x4afa18(0xf3)]?.[_0x4afa18(0xf1)](_0x316041+'\x0a');}async[a116_0x49afb2(0xc0)](){const _0x3d10be=a116_0x49afb2;return this[_0x3d10be(0xca)]('Proxy\x20session\x20ended'),new Promise(_0x298030=>{const _0x49c868=_0x3d10be;this[_0x49c868(0xf3)]?this[_0x49c868(0xf3)][_0x49c868(0xe8)](()=>{_0x298030();}):_0x298030();});}['getLogPath'](){const _0x486112=a116_0x49afb2;return join(this[_0x486112(0xc4)],_0x486112(0xf0));}}
1
+ const a116_0xdbb544=a116_0x34c3;(function(_0x25adda,_0x178171){const _0x3d5e34=a116_0x34c3,_0x2b2986=_0x25adda();while(!![]){try{const _0x39ae54=-parseInt(_0x3d5e34(0x1f3))/0x1+parseInt(_0x3d5e34(0x1e9))/0x2+-parseInt(_0x3d5e34(0x1c8))/0x3+parseInt(_0x3d5e34(0x1f9))/0x4+parseInt(_0x3d5e34(0x1d7))/0x5*(-parseInt(_0x3d5e34(0x1fc))/0x6)+-parseInt(_0x3d5e34(0x1f4))/0x7*(parseInt(_0x3d5e34(0x1ea))/0x8)+parseInt(_0x3d5e34(0x1e3))/0x9;if(_0x39ae54===_0x178171)break;else _0x2b2986['push'](_0x2b2986['shift']());}catch(_0x42b9c2){_0x2b2986['push'](_0x2b2986['shift']());}}}(a116_0x43b2,0x480c9));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';function a116_0x43b2(){const _0x2927e2=['.log','ERROR','message','364237uOtyfZ','161SvTlBS','DEBUG','getDate','debug','stringify','1668368OjQXBH','TRACE','tdx.log','322254PHVldj','getMonth','WARN','padStart','gray','error','991161vQarOM','.cache','toISOString','tdx','red','end','fileOnly','cyan','map','floor','getLogPath','logStream','trace','close','toString','5gpYhan','info','write','includes','join','stack','rotateOldLogs','logLevel','.gz','init','cause','getTimezoneOffset','4170024QCgCIT','name','logDir','Warning:\x20Failed\x20to\x20compress\x20','getSeconds','warn','834658eBEujF','88456TuEOYg','getHours','test','Warning:\x20Error\x20writing\x20to\x20tdx.log:','INFO','split'];a116_0x43b2=function(){return _0x2927e2;};return a116_0x43b2();}import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';function a116_0x34c3(_0xa7f2e6,_0x284a64){_0xa7f2e6=_0xa7f2e6-0x1c3;const _0x43b241=a116_0x43b2();let _0x34c30d=_0x43b241[_0xa7f2e6];return _0x34c30d;}import{pipeline}from'stream/promises';import a116_0x134e01 from'chalk';function safeStringify(_0x1b06aa){const _0x534c9d=a116_0x34c3;if(typeof _0x1b06aa==='string')return _0x1b06aa;if(_0x1b06aa instanceof Error)return _0x1b06aa[_0x534c9d(0x1dc)]||_0x1b06aa[_0x534c9d(0x1e4)]+':\x20'+_0x1b06aa['message'];try{return JSON[_0x534c9d(0x1f8)](_0x1b06aa,(_0x4974c2,_0x32df98)=>{const _0x55cafd=_0x534c9d;if(_0x32df98 instanceof Error)return{'name':_0x32df98[_0x55cafd(0x1e4)],'message':_0x32df98[_0x55cafd(0x1f2)],'stack':_0x32df98[_0x55cafd(0x1dc)],'cause':_0x32df98[_0x55cafd(0x1e1)]};return _0x32df98;});}catch{return String(_0x1b06aa);}}function getTimezoneOffset(){const _0x136664=a116_0x34c3,_0x2b926a=-new Date()[_0x136664(0x1e2)](),_0x4ad34d=Math[_0x136664(0x1d1)](Math['abs'](_0x2b926a)/0x3c),_0x1b7d50=Math['abs'](_0x2b926a)%0x3c,_0x19d55e=_0x2b926a>=0x0?'+':'-';return''+_0x19d55e+_0x4ad34d[_0x136664(0x1d6)]()[_0x136664(0x1c5)](0x2,'0')+_0x1b7d50[_0x136664(0x1d6)]()['padStart'](0x2,'0');}function formatTimestamp(){const _0x370df4=a116_0x34c3,_0x5e6f6d=new Date(),_0x3ed9dd=_0x5e6f6d['getFullYear'](),_0xe2f6fd=(_0x5e6f6d[_0x370df4(0x1c3)]()+0x1)[_0x370df4(0x1d6)]()[_0x370df4(0x1c5)](0x2,'0'),_0x1e8f43=_0x5e6f6d[_0x370df4(0x1f6)]()[_0x370df4(0x1d6)]()[_0x370df4(0x1c5)](0x2,'0'),_0x39153d=_0x5e6f6d[_0x370df4(0x1eb)]()['toString']()[_0x370df4(0x1c5)](0x2,'0'),_0x3c81d0=_0x5e6f6d['getMinutes']()['toString']()[_0x370df4(0x1c5)](0x2,'0'),_0x41288f=_0x5e6f6d[_0x370df4(0x1e7)]()['toString']()[_0x370df4(0x1c5)](0x2,'0'),_0x4d4d36=_0x5e6f6d['getMilliseconds']()['toString']()[_0x370df4(0x1c5)](0x3,'0'),_0x545bed=getTimezoneOffset();return _0x3ed9dd+'-'+_0xe2f6fd+'-'+_0x1e8f43+'\x20'+_0x39153d+':'+_0x3c81d0+':'+_0x41288f+'.'+_0x4d4d36+_0x545bed;}function formatColoredLogEntry(_0x5af3a6,_0x5c300a){const _0x3351fb=a116_0x34c3,_0x275eb9=formatTimestamp(),_0x2afdcf=_0x5c300a[_0x3351fb(0x1d0)](safeStringify)[_0x3351fb(0x1db)]('\x20'),_0x149eb5=a116_0x134e01['gray'](_0x275eb9);let _0x2d3dec;switch(_0x5af3a6){case'info':_0x2d3dec=a116_0x134e01[_0x3351fb(0x1cf)]('['+_0x5af3a6+']\x20');break;case'warn':_0x2d3dec=a116_0x134e01['yellow']('['+_0x5af3a6+']\x20');break;case _0x3351fb(0x1c7):_0x2d3dec=a116_0x134e01[_0x3351fb(0x1cc)]('['+_0x5af3a6+']');break;case _0x3351fb(0x1f7):_0x2d3dec=a116_0x134e01[_0x3351fb(0x1c6)]('['+_0x5af3a6+']');break;default:_0x2d3dec='['+_0x5af3a6+']';}return _0x149eb5+'\x20'+_0x2d3dec+'\x20'+_0x2afdcf;}export var LogLevel;(function(_0x49a5ce){const _0x321b10=a116_0x34c3;_0x49a5ce[_0x49a5ce['TRACE']=-0x2]=_0x321b10(0x1fa),_0x49a5ce[_0x49a5ce[_0x321b10(0x1f5)]=-0x1]=_0x321b10(0x1f5),_0x49a5ce[_0x49a5ce[_0x321b10(0x1ee)]=0x0]='INFO',_0x49a5ce[_0x49a5ce[_0x321b10(0x1c4)]=0x1]=_0x321b10(0x1c4),_0x49a5ce[_0x49a5ce[_0x321b10(0x1f1)]=0x2]=_0x321b10(0x1f1);}(LogLevel||(LogLevel={})));export class TDXLogger{[a116_0xdbb544(0x1d3)];['logDir'];[a116_0xdbb544(0x1de)];[a116_0xdbb544(0x1ce)];constructor(_0x29fb6f=LogLevel[a116_0xdbb544(0x1ee)],_0x4410af=![]){const _0x3c0db0=a116_0xdbb544;this[_0x3c0db0(0x1e5)]=join(homedir(),_0x3c0db0(0x1c9),_0x3c0db0(0x1cb),'logs'),this[_0x3c0db0(0x1de)]=_0x29fb6f,this[_0x3c0db0(0x1ce)]=_0x4410af;}async[a116_0xdbb544(0x1e0)](){const _0x34e13e=a116_0xdbb544;try{await mkdir(this['logDir'],{'recursive':!![]}),await this[_0x34e13e(0x1dd)]();const _0x6acb94=join(this[_0x34e13e(0x1e5)],_0x34e13e(0x1fb));this[_0x34e13e(0x1d3)]=createWriteStream(_0x6acb94,{'flags':'a'}),this[_0x34e13e(0x1d3)]['on']('error',_0x38987c=>{const _0x1e83ce=_0x34e13e;console[_0x1e83ce(0x1c7)](_0x1e83ce(0x1ed),_0x38987c[_0x1e83ce(0x1f2)]);});}catch(_0x496b84){console['error']('Warning:\x20Failed\x20to\x20initialize\x20log\x20files:',_0x496b84);}}async[a116_0xdbb544(0x1dd)](){const _0x10e831=a116_0xdbb544;try{const _0x39b709=await readdir(this['logDir']),_0x284eb9=new Date()[_0x10e831(0x1ca)]()[_0x10e831(0x1ef)]('T')[0x0];if(_0x39b709[_0x10e831(0x1da)]('tdx.log')){const _0x4c8556=join(this['logDir'],_0x10e831(0x1fb)),_0x487ece=await stat(_0x4c8556),_0x5230e6=new Date(_0x487ece['mtime'])[_0x10e831(0x1ca)]()[_0x10e831(0x1ef)]('T')[0x0];if(_0x5230e6<_0x284eb9){const _0x3481ef=join(this[_0x10e831(0x1e5)],'tdx-'+_0x5230e6+_0x10e831(0x1f0));await rename(_0x4c8556,_0x3481ef);}}const _0x26c019=await readdir(this[_0x10e831(0x1e5)]),_0x143850=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x4406ae=_0x26c019['filter'](_0x31361d=>_0x143850[_0x10e831(0x1ec)](_0x31361d));for(const _0x14ae06 of _0x4406ae){const _0x5acdc9=join(this['logDir'],_0x14ae06),_0x14a203=join(this[_0x10e831(0x1e5)],_0x14ae06+_0x10e831(0x1df));try{await pipeline(createReadStream(_0x5acdc9),createGzip(),createWriteStream(_0x14a203)),await unlink(_0x5acdc9);}catch(_0x1beaf8){console['error'](_0x10e831(0x1e6)+_0x14ae06+':',_0x1beaf8);}}}catch{}}['debug'](..._0x166c5c){const _0x1a9b5c=a116_0xdbb544;if(this['logLevel']>LogLevel['DEBUG'])return;const _0x212079=formatColoredLogEntry('debug',_0x166c5c);this[_0x1a9b5c(0x1d3)]?.['write'](_0x212079+'\x0a');}['trace'](..._0x2ee359){const _0x3067e9=a116_0xdbb544;if(this[_0x3067e9(0x1de)]>LogLevel['TRACE'])return;const _0x3fce6c=formatColoredLogEntry(_0x3067e9(0x1d4),_0x2ee359);this[_0x3067e9(0x1d3)]?.[_0x3067e9(0x1d9)](_0x3fce6c+'\x0a');}['info'](..._0x4888bd){const _0x53e6d4=a116_0xdbb544;if(this[_0x53e6d4(0x1de)]>LogLevel[_0x53e6d4(0x1ee)])return;const _0x4a77ef=formatColoredLogEntry(_0x53e6d4(0x1d8),_0x4888bd);!this[_0x53e6d4(0x1ce)]&&console['log'](_0x4a77ef),this[_0x53e6d4(0x1d3)]?.[_0x53e6d4(0x1d9)](_0x4a77ef+'\x0a');}['warn'](..._0x5ad2f3){const _0x460f75=a116_0xdbb544;if(this[_0x460f75(0x1de)]>LogLevel[_0x460f75(0x1c4)])return;const _0x2781ea=formatColoredLogEntry(_0x460f75(0x1e8),_0x5ad2f3);!this['fileOnly']&&console['error'](_0x2781ea),this['logStream']?.[_0x460f75(0x1d9)](_0x2781ea+'\x0a');}[a116_0xdbb544(0x1c7)](..._0x384267){const _0x267118=a116_0xdbb544,_0x542b08=formatColoredLogEntry(_0x267118(0x1c7),_0x384267);!this[_0x267118(0x1ce)]&&console[_0x267118(0x1c7)](_0x542b08),this['logStream']?.[_0x267118(0x1d9)](_0x542b08+'\x0a');}async[a116_0xdbb544(0x1d5)](){const _0x43a1e6=a116_0xdbb544;return this[_0x43a1e6(0x1d8)]('Proxy\x20session\x20ended'),new Promise(_0x25a0f7=>{const _0x2a4d5e=_0x43a1e6;this[_0x2a4d5e(0x1d3)]?this[_0x2a4d5e(0x1d3)][_0x2a4d5e(0x1cd)](()=>{_0x25a0f7();}):_0x25a0f7();});}[a116_0xdbb544(0x1d2)](){const _0x599349=a116_0xdbb544;return join(this[_0x599349(0x1e5)],_0x599349(0x1fb));}}