@treasuredata/tdx 0.26.3 → 0.26.4

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 (169) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/personalization.js +1 -1
  99. package/dist/sdk/query/index.js +1 -1
  100. package/dist/sdk/query/sql-parser.js +1 -1
  101. package/dist/sdk/realtime.js +1 -1
  102. package/dist/sdk/schedule.js +1 -1
  103. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  104. package/dist/sdk/segment/fields-display.js +1 -1
  105. package/dist/sdk/segment/file-discovery.js +1 -1
  106. package/dist/sdk/segment/journey-utils.js +1 -1
  107. package/dist/sdk/segment/journey-validator.js +1 -1
  108. package/dist/sdk/segment/journey-yaml.js +1 -1
  109. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  110. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  111. package/dist/sdk/segment/pull-workflow.js +1 -1
  112. package/dist/sdk/segment/push-recovery.js +1 -1
  113. package/dist/sdk/segment/push-workflow.js +1 -1
  114. package/dist/sdk/segment/resolution-context.js +1 -1
  115. package/dist/sdk/segment/segment-path-parser.js +1 -1
  116. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  117. package/dist/sdk/segment/target-resolution.js +1 -1
  118. package/dist/sdk/segment/tdx-config.js +1 -1
  119. package/dist/sdk/segment/validate-files.js +1 -1
  120. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  121. package/dist/sdk/segment/yaml-validator.js +1 -1
  122. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  123. package/dist/sdk/segment.js +1 -1
  124. package/dist/sdk/types/index.js +1 -1
  125. package/dist/sdk/types/progress.js +1 -1
  126. package/dist/sdk/user.js +1 -1
  127. package/dist/sdk/util/format-detector.js +1 -1
  128. package/dist/sdk/util/formatters.js +1 -1
  129. package/dist/sdk/util/index.js +1 -1
  130. package/dist/sdk/util/tree-formatter.js +1 -1
  131. package/dist/sdk/workflow/archive-validation.js +1 -1
  132. package/dist/sdk/workflow/clone-workflow.js +1 -1
  133. package/dist/sdk/workflow/index.js +1 -1
  134. package/dist/sdk/workflow/pull-workflow.js +1 -1
  135. package/dist/sdk/workflow/push-workflow.js +1 -1
  136. package/dist/sdk/workflow/tdx-config.js +1 -1
  137. package/dist/sdk/workflow/workflow-utils.js +1 -1
  138. package/dist/test-utils/command-runner.js +1 -1
  139. package/dist/test-utils/factories.js +1 -1
  140. package/dist/test-utils/fixtures.js +1 -1
  141. package/dist/test-utils/http-mock.js +1 -1
  142. package/dist/test-utils/index.js +1 -1
  143. package/dist/utils/async.js +1 -1
  144. package/dist/utils/colors.js +1 -1
  145. package/dist/utils/diff.js +1 -1
  146. package/dist/utils/file-permissions.js +1 -1
  147. package/dist/utils/global-cache.js +1 -1
  148. package/dist/utils/json-loader.js +1 -1
  149. package/dist/utils/local-cache.js +1 -1
  150. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  151. package/dist/utils/logger/formatters/index.js +1 -1
  152. package/dist/utils/logger/handlers/console-handler.js +1 -1
  153. package/dist/utils/logger/handlers/file-handler.js +1 -1
  154. package/dist/utils/logger/handlers/index.js +1 -1
  155. package/dist/utils/logger/handlers/null-handler.js +1 -1
  156. package/dist/utils/logger/index.js +1 -1
  157. package/dist/utils/logger/logger.js +1 -1
  158. package/dist/utils/logger/types.js +1 -1
  159. package/dist/utils/option-validation.js +1 -1
  160. package/dist/utils/port.js +1 -1
  161. package/dist/utils/process.js +1 -1
  162. package/dist/utils/prompt.js +1 -1
  163. package/dist/utils/spinner.js +1 -1
  164. package/dist/utils/sse-parser.js +1 -1
  165. package/dist/utils/string-utils.js +1 -1
  166. package/dist/utils/table-ref-parser.js +1 -1
  167. package/dist/utils/tdx-logger.js +1 -1
  168. package/dist/utils/version-check.js +1 -1
  169. package/package.json +1 -1
@@ -1 +1 @@
1
- const a42_0x45bdeb=a42_0x393c;(function(_0x57450f,_0x5a13b6){const _0x13c33c=a42_0x393c,_0x2652e1=_0x57450f();while(!![]){try{const _0x1b481b=-parseInt(_0x13c33c(0x199))/0x1*(-parseInt(_0x13c33c(0x215))/0x2)+-parseInt(_0x13c33c(0x21a))/0x3*(-parseInt(_0x13c33c(0x2bf))/0x4)+-parseInt(_0x13c33c(0x146))/0x5+parseInt(_0x13c33c(0x23c))/0x6*(parseInt(_0x13c33c(0x163))/0x7)+parseInt(_0x13c33c(0x190))/0x8+-parseInt(_0x13c33c(0x1e1))/0x9*(-parseInt(_0x13c33c(0x1e8))/0xa)+-parseInt(_0x13c33c(0x24c))/0xb;if(_0x1b481b===_0x5a13b6)break;else _0x2652e1['push'](_0x2652e1['shift']());}catch(_0x31fc16){_0x2652e1['push'](_0x2652e1['shift']());}}}(a42_0x2886,0x4d8e2));import a42_0x126119 from'chalk';import{existsSync}from'fs';import a42_0x273201 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';function a42_0x393c(_0x53d4df,_0x41eea3){_0x53d4df=_0x53d4df-0x13e;const _0x2886de=a42_0x2886();let _0x393cfa=_0x2886de[_0x53d4df];return _0x393cfa;}import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x430795 from'prompts';function getAttemptStatusDisplay(_0x1ad3fb){const _0x36b8ca=a42_0x393c;if(!_0x1ad3fb)return{'icon':'⏳','text':''};const {done:_0x57df98,success:_0x40aa2b,cancelRequested:_0x57bd77}=_0x1ad3fb;if(!_0x57df98)return _0x57bd77?{'icon':'🛑','text':a42_0x126119[_0x36b8ca(0x1ee)]('canceling')}:{'icon':'🔄','text':a42_0x126119[_0x36b8ca(0x2bd)](_0x36b8ca(0x2d7))};if(_0x40aa2b)return{'icon':'✅','text':a42_0x126119[_0x36b8ca(0x16e)]('success')};return{'icon':'❌','text':a42_0x126119[_0x36b8ca(0x2b4)](_0x36b8ca(0x26f))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x3a0c01,_0x1518fc,_0x237d86=0x0){return _0x3a0c01[_0x237d86]||_0x1518fc['workflowProject'];}[a42_0x45bdeb(0x143)](_0x156884,_0x449be2,_0x56bc27=0x0){const _0x35b4ae=a42_0x45bdeb,_0x47a601=this[_0x35b4ae(0x184)](_0x156884,_0x449be2,_0x56bc27);if(!_0x47a601)return console[_0x35b4ae(0x26f)](a42_0x126119[_0x35b4ae(0x2b4)](_0x35b4ae(0x1af)),_0x35b4ae(0x13e)),console['error'](a42_0x126119[_0x35b4ae(0x236)](_0x35b4ae(0x289))),null;return _0x47a601;}[a42_0x45bdeb(0x29e)](_0x43ae59,_0xf42e9a){const _0xd26ab4=a42_0x45bdeb;if(_0x43ae59[0x0]){const _0xef9aea=_0x43ae59[0x0]['split']('.');if(_0xef9aea[_0xd26ab4(0x252)]===0x1)return{'projectName':_0xef9aea[0x0],'workflowName':undefined};else return _0xef9aea[_0xd26ab4(0x252)]===0x2?{'projectName':_0xef9aea[0x0],'workflowName':_0xef9aea[0x1]}:(console[_0xd26ab4(0x26f)](a42_0x126119[_0xd26ab4(0x2b4)](_0xd26ab4(0x1af)),_0xd26ab4(0x22c)),null);}return{'projectName':_0xf42e9a[_0xd26ab4(0x1b9)],'workflowName':undefined};}[a42_0x45bdeb(0x2aa)](_0x30d08e,_0x190981,_0x3bb750=0x0){const _0x61a35f=a42_0x45bdeb;if(_0x30d08e[_0x3bb750])return _0x30d08e[_0x3bb750];if(_0x190981[_0x61a35f(0x1b9)]){const _0x48e5bf=a42_0x273201[_0x61a35f(0x2ae)](process[_0x61a35f(0x16a)](),'workflows',_0x190981[_0x61a35f(0x1b9)]);if(existsSync(a42_0x273201[_0x61a35f(0x2ae)](_0x48e5bf,_0x61a35f(0x24b))))return _0x48e5bf;}return undefined;}async[a42_0x45bdeb(0x20f)](_0x4cb899,_0x63a260,_0x12c71d){const _0x26b27c=a42_0x45bdeb;try{const _0x7eebda=await _0x4cb899[_0x26b27c(0x27d)][_0x26b27c(0x1bb)](_0x63a260,{'limit':0x1});if(_0x7eebda[_0x26b27c(0x252)]>0x0){const _0x3ba086=_0x7eebda[0x0]['id'],_0x215d7b=getWorkflowUrl(_0x12c71d,_0x3ba086);console[_0x26b27c(0x26f)]('\x20\x20Console:\x20'+a42_0x126119[_0x26b27c(0x1c4)](_0x215d7b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0x45bdeb(0x1c7);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x18d);async[a42_0x45bdeb(0x221)](_0x3c66e6){const _0x522cb5=a42_0x45bdeb,{options:_0x17a5a1,args:_0x106f27,tdx:_0x2731e2}=_0x3c66e6,_0x3bce45=_0x106f27[0x0],_0x274604=_0x17a5a1[_0x522cb5(0x23e)];if(_0x274604)return saveSessionContext({'workflow_project':undefined},_0x17a5a1[_0x522cb5(0x207)]),console['log'](a42_0x126119[_0x522cb5(0x16e)](_0x522cb5(0x24e))),0x0;if(!_0x3bce45)return console[_0x522cb5(0x26f)](a42_0x126119[_0x522cb5(0x2b4)](_0x522cb5(0x1af)),_0x522cb5(0x13e)),console[_0x522cb5(0x26f)](a42_0x126119[_0x522cb5(0x236)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x522cb5(0x26f)](a42_0x126119[_0x522cb5(0x236)](_0x522cb5(0x1d9))),0x1;const _0x199662=await withSpinner('Resolving\x20project\x20\x27'+_0x3bce45+_0x522cb5(0x18c),()=>_0x2731e2[_0x522cb5(0x27d)][_0x522cb5(0x1bc)](_0x3bce45),{'verbose':_0x17a5a1[_0x522cb5(0x1d1)]}),{name:_0x11b838}=_0x199662[_0x522cb5(0x1f2)];return saveSessionContext({'workflow_project':_0x11b838},_0x17a5a1['session']),console[_0x522cb5(0x2c2)](a42_0x126119[_0x522cb5(0x16e)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a42_0x126119[_0x522cb5(0x1c4)](_0x11b838))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a42_0x45bdeb(0x1b3);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x2a4);async['execute'](_0x2104cf){const _0xdbd8e=a42_0x45bdeb,{options:_0x27dad9,args:_0xdc3884,tdx:_0x3b3a25}=_0x2104cf,_0x3358c1=_0xdc3884[0x0];_0x27dad9['verbose']&&_0x3358c1&&console[_0xdbd8e(0x26f)](_0xdbd8e(0x25a)+_0x3358c1);const _0x5500c8=await withSpinner(_0xdbd8e(0x261),()=>_0x3b3a25[_0xdbd8e(0x27d)][_0xdbd8e(0x282)](_0x3358c1,{'limit':_0x27dad9[_0xdbd8e(0x27f)]}),{'verbose':_0x27dad9[_0xdbd8e(0x1d1)]});let _0x211b79=_0x5500c8[_0xdbd8e(0x1f2)];_0x211b79['sort']((_0x5d9c4c,_0x1cbf61)=>_0x5d9c4c['name'][_0xdbd8e(0x234)](_0x1cbf61['name']));const _0x57d77e=_0x27dad9[_0xdbd8e(0x27f)]||0x64,_0x4e7784=_0x211b79[_0xdbd8e(0x252)]>=_0x57d77e?a42_0x126119[_0xdbd8e(0x236)](_0xdbd8e(0x1ec)):'';console[_0xdbd8e(0x26f)](_0xdbd8e(0x1c8)+_0x211b79[_0xdbd8e(0x252)]+_0xdbd8e(0x239)+(_0x211b79[_0xdbd8e(0x252)]!==0x1?'s':'')+_0x4e7784);if(_0x27dad9[_0xdbd8e(0x219)]===_0xdbd8e(0x17a)||_0x27dad9[_0xdbd8e(0x219)]===_0xdbd8e(0x1c2)||_0x27dad9['format']===_0xdbd8e(0x22a))await handleSDKOutput(_0x211b79,_0x27dad9);else{if(_0x211b79[_0xdbd8e(0x252)]===0x0)_0x3358c1?console[_0xdbd8e(0x2c2)]('No\x20projects\x20match\x20pattern:\x20'+_0x3358c1):console[_0xdbd8e(0x2c2)](_0xdbd8e(0x271));else{const _0x269372=_0x211b79[_0xdbd8e(0x1b5)](_0x3f59fe=>{const _0x16e68d=_0xdbd8e,_0x179990=_0x3f59fe[_0x16e68d(0x1f3)]?.[_0x16e68d(0x15f)](_0x4e6c86=>_0x4e6c86['key']===_0x16e68d(0x2a7)),_0x187934=_0x179990?a42_0x126119['dim'](_0x16e68d(0x1f6)):'';return _0x16e68d(0x257)+_0x3f59fe[_0x16e68d(0x265)]+_0x187934;});await writeOutput(_0x269372[_0xdbd8e(0x2ae)]('\x0a'),_0x27dad9[_0xdbd8e(0x14a)],_0xdbd8e(0x2da));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1bf);['description']=a42_0x45bdeb(0x263);async['execute'](_0x1f408c){const _0x556bad=a42_0x45bdeb,{options:_0x16a10b,args:_0x31fe08,tdx:_0x333354}=_0x1f408c,_0x713aa7=this[_0x556bad(0x184)](_0x31fe08,_0x16a10b);_0x16a10b[_0x556bad(0x1d1)]&&_0x713aa7&&console[_0x556bad(0x26f)]('Project\x20filter:\x20'+_0x713aa7);const _0x37be0b=await withSpinner(_0x556bad(0x147),()=>_0x333354['workflow']['workflows'](_0x713aa7,{'limit':_0x16a10b[_0x556bad(0x27f)]}),{'verbose':_0x16a10b[_0x556bad(0x1d1)]});let _0x558fd1=_0x37be0b['data'];_0x558fd1[_0x556bad(0x21c)]((_0x36e472,_0x36bee9)=>{const _0x3fe77f=_0x556bad,_0x354883=_0x36e472[_0x3fe77f(0x265)][_0x3fe77f(0x234)](_0x36bee9['name']);if(_0x354883!==0x0)return _0x354883;return(_0x36e472[_0x3fe77f(0x2cc)]?.[_0x3fe77f(0x265)]||'')[_0x3fe77f(0x234)](_0x36bee9[_0x3fe77f(0x2cc)]?.['name']||'');});const _0x434c19=_0x16a10b[_0x556bad(0x27f)]||0x64,_0x16804c=_0x558fd1[_0x556bad(0x252)]>=_0x434c19?a42_0x126119[_0x556bad(0x236)](_0x556bad(0x1ec)):'';console[_0x556bad(0x26f)](_0x556bad(0x1c8)+_0x558fd1[_0x556bad(0x252)]+'\x20workflow'+(_0x558fd1['length']!==0x1?'s':'')+_0x16804c);if(_0x16a10b[_0x556bad(0x219)]===_0x556bad(0x17a)||_0x16a10b[_0x556bad(0x219)]===_0x556bad(0x1c2)||_0x16a10b[_0x556bad(0x219)]===_0x556bad(0x22a))await handleSDKOutput(_0x558fd1,_0x16a10b);else{if(_0x558fd1[_0x556bad(0x252)]===0x0)_0x713aa7?console[_0x556bad(0x2c2)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x713aa7):console[_0x556bad(0x2c2)]('No\x20workflows\x20found');else{const _0xd89016=_0x16a10b[_0x556bad(0x259)],_0x326aa0=_0x558fd1[_0x556bad(0x1b5)](_0xa32138=>{const _0x3fe41f=_0x556bad,_0x27ab10=a42_0x126119['dim']('#'+_0xa32138['id']),_0x1b184d=hyperlink(_0x27ab10,getWorkflowUrl(_0xd89016,_0xa32138['id'])),_0x59c834=_0xa32138[_0x3fe41f(0x2cc)]?.[_0x3fe41f(0x265)]?a42_0x126119['dim']('\x20('+_0xa32138[_0x3fe41f(0x2cc)][_0x3fe41f(0x265)]+')'):'';return'📋\x20'+_0x1b184d+'\x20'+_0xa32138['name']+_0x59c834;});await writeOutput(_0x326aa0[_0x556bad(0x2ae)]('\x0a'),_0x16a10b['output'],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x220);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x155);async[a42_0x45bdeb(0x221)](_0x5603ba){const _0x4e1d1e=a42_0x45bdeb,{options:_0x5a616e,args:_0x3a3b02,tdx:_0x212168}=_0x5603ba,_0x43ca8a=this[_0x4e1d1e(0x29e)](_0x3a3b02,_0x5a616e);if(!_0x43ca8a)return 0x1;const {projectName:_0x36c8db,workflowName:_0xa5ab74}=_0x43ca8a;if(_0x5a616e[_0x4e1d1e(0x1d1)]){if(_0x36c8db&&_0xa5ab74)console[_0x4e1d1e(0x26f)]('Filter:\x20'+_0x36c8db+'.'+_0xa5ab74);else _0x36c8db&&console[_0x4e1d1e(0x26f)](_0x4e1d1e(0x202)+_0x36c8db);const _0x2c13d2=_0x5a616e['status'];_0x2c13d2&&console[_0x4e1d1e(0x26f)]('Status:\x20'+_0x2c13d2);}let _0x4bad31=0x28;if(process[_0x4e1d1e(0x2d0)][_0x4e1d1e(0x270)]&&!_0x5a616e[_0x4e1d1e(0x14a)]&&!_0x5a616e['format']){const _0x86855d=process['stdout'][_0x4e1d1e(0x142)]||0x28;_0x4bad31=Math[_0x4e1d1e(0x170)](0x14,Math[_0x4e1d1e(0x1f9)](_0x86855d*0x2/0x3));}const _0x3ca863=_0x5a616e[_0x4e1d1e(0x27f)]||_0x4bad31,_0x35349e=await withSpinner(_0x4e1d1e(0x1a2),()=>_0x212168[_0x4e1d1e(0x27d)][_0x4e1d1e(0x248)]({'projectName':_0x36c8db,'workflowName':_0xa5ab74,'status':_0x5a616e[_0x4e1d1e(0x23d)],'fromTime':_0x5a616e['from'],'toTime':_0x5a616e['to'],'limit':_0x3ca863}),{'verbose':_0x5a616e['verbose']}),_0x250074=_0x35349e['data'];_0x250074[_0x4e1d1e(0x21c)]((_0x375043,_0x3f75e8)=>{const _0x125732=_0x4e1d1e,_0x554d53=_0x375043[_0x125732(0x2b5)]||'',_0x18e1ae=_0x3f75e8[_0x125732(0x2b5)]||'';return _0x18e1ae[_0x125732(0x234)](_0x554d53);});_0x250074[_0x4e1d1e(0x252)]>=_0x3ca863?console[_0x4e1d1e(0x26f)]('✔\x20Showing\x20'+_0x250074[_0x4e1d1e(0x252)]+_0x4e1d1e(0x290)+a42_0x126119[_0x4e1d1e(0x236)](_0x4e1d1e(0x2a8))):console[_0x4e1d1e(0x26f)]('✔\x20Found\x20'+_0x250074['length']+'\x20session'+(_0x250074[_0x4e1d1e(0x252)]!==0x1?'s':''));if(_0x5a616e[_0x4e1d1e(0x219)]===_0x4e1d1e(0x17a)||_0x5a616e[_0x4e1d1e(0x219)]===_0x4e1d1e(0x1c2)||_0x5a616e['format']==='table')await handleSDKOutput(_0x250074,_0x5a616e);else{if(!process[_0x4e1d1e(0x2d0)][_0x4e1d1e(0x270)]||_0x5a616e['output']){if(_0x250074[_0x4e1d1e(0x252)]===0x0){if(_0x36c8db&&_0xa5ab74)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x36c8db+'.'+_0xa5ab74);else _0x36c8db?console[_0x4e1d1e(0x2c2)](_0x4e1d1e(0x2ad)+_0x36c8db):console[_0x4e1d1e(0x2c2)]('No\x20sessions\x20found');}else{const _0x93aa54=_0x5a616e[_0x4e1d1e(0x259)],_0x3d54a9=this[_0x4e1d1e(0x192)](_0x250074,_0x93aa54);_0x5a616e[_0x4e1d1e(0x14a)]?await writeOutput(_0x3d54a9,_0x5a616e['output'],_0x4e1d1e(0x2da)):console['log'](_0x3d54a9);}!_0x36c8db&&(console[_0x4e1d1e(0x26f)](''),console[_0x4e1d1e(0x26f)](a42_0x126119['dim'](_0x4e1d1e(0x20b))),console[_0x4e1d1e(0x26f)](a42_0x126119[_0x4e1d1e(0x236)](_0x4e1d1e(0x204))+'or'+a42_0x126119[_0x4e1d1e(0x236)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x250074[_0x4e1d1e(0x252)]===0x0){if(_0x36c8db&&_0xa5ab74)console[_0x4e1d1e(0x2c2)](_0x4e1d1e(0x13f)+_0x36c8db+'.'+_0xa5ab74);else _0x36c8db?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x36c8db):console[_0x4e1d1e(0x2c2)](_0x4e1d1e(0x26d));}else await this[_0x4e1d1e(0x19f)](_0x250074,_0x5603ba,_0x36c8db);}}return 0x0;}[a42_0x45bdeb(0x192)](_0x3e9678,_0x62ca1c){const _0x3b1102=a42_0x45bdeb,_0x7b8584=[],_0x308f9e=new Map();let _0x5308c8=Infinity,_0x216f19=-Infinity;for(const _0x160870 of _0x3e9678){if(_0x160870[_0x3b1102(0x1f7)]?.[_0x3b1102(0x15d)]){const _0x3ff9a3=new Date(_0x160870[_0x3b1102(0x1f7)][_0x3b1102(0x15d)])[_0x3b1102(0x24d)](),_0x4112ec=_0x160870[_0x3b1102(0x1f7)][_0x3b1102(0x1db)]?new Date(_0x160870[_0x3b1102(0x1f7)][_0x3b1102(0x1db)])[_0x3b1102(0x24d)]():Date[_0x3b1102(0x1da)](),_0x216149=_0x160870[_0x3b1102(0x2cc)]?.[_0x3b1102(0x265)]||_0x3b1102(0x17e);!_0x308f9e[_0x3b1102(0x1cc)](_0x216149)&&_0x308f9e[_0x3b1102(0x1cb)](_0x216149,[]),_0x308f9e['get'](_0x216149)[_0x3b1102(0x2c9)]({'session':_0x160870,'startTime':_0x3ff9a3,'endTime':_0x4112ec,'duration':_0x4112ec-_0x3ff9a3}),_0x5308c8=Math[_0x3b1102(0x162)](_0x5308c8,_0x3ff9a3),_0x216f19=Math[_0x3b1102(0x170)](_0x216f19,_0x4112ec);}}if(_0x308f9e[_0x3b1102(0x29d)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x47c25f=process[_0x3b1102(0x2d0)][_0x3b1102(0x2d4)]||0x78,_0x103784=0x1e,_0x36c41f=0x32,_0x4d7540=0x4,_0x5d3056=Math['min'](_0x36c41f,Math['max'](_0x103784,Math[_0x3b1102(0x1f9)](_0x47c25f*0.3))),_0x28199=_0x47c25f-_0x5d3056-TIMELINE_CONFIG[_0x3b1102(0x1a6)]-0x3-_0x4d7540,_0x5d6abf=_0x216f19-_0x5308c8,_0x33d4b7=_0x5d6abf/_0x5d3056,_0x4a86ec=renderTimeAxis({'startTime':_0x5308c8,'endTime':_0x216f19,'durationMs':_0x5d6abf,'msPerChar':_0x33d4b7},_0x5d3056),_0xc3d835=[];for(const _0x704546 of _0x308f9e[_0x3b1102(0x22e)]()){_0xc3d835[_0x3b1102(0x2c9)](..._0x704546);}_0xc3d835[_0x3b1102(0x21c)]((_0xd779d5,_0x5e3316)=>_0x5e3316['startTime']-_0xd779d5[_0x3b1102(0x1eb)]);const _0x34e22e=new Date(_0x5308c8),_0x591bad=formatDate(_0x34e22e),_0x1aacd3=_0x4d7540+TIMELINE_CONFIG[_0x3b1102(0x28b)]+TIMELINE_CONFIG['ICON_SPACING']+_0x28199,_0x3be211='\x20'[_0x3b1102(0x154)](_0x1aacd3-_0x591bad[_0x3b1102(0x252)]),_0x351985=_0x3be211+a42_0x126119[_0x3b1102(0x236)](_0x591bad)+'\x20'+_0x4a86ec;_0x7b8584[_0x3b1102(0x2c9)](_0x351985);const _0x475cc8=0x16;let _0x13dd40=0x0;for(const _0x4efc2a of _0xc3d835){const _0x480390=_0x4efc2a[_0x3b1102(0x207)][_0x3b1102(0x2cc)]?.[_0x3b1102(0x265)]||'?',_0x36b636=Math['min'](stringWidth(_0x480390),_0x475cc8);_0x13dd40=Math[_0x3b1102(0x170)](_0x13dd40,_0x36b636);}for(const _0x55f464 of _0xc3d835){const {session:_0x464a50,startTime:_0x4b33c7,endTime:_0x4b595d,duration:_0x43ec5d}=_0x55f464,_0x332c90=_0x464a50[_0x3b1102(0x2cc)]?.['id'],_0x668bc5=_0x464a50['id'],_0x5c558f=_0x464a50['project']?.['name']||'?',_0x3fe9d5=_0x464a50[_0x3b1102(0x27d)]?.['name']||'?';let _0x1bcce8,_0x5d8a43;if(_0x464a50['lastAttempt']){const _0x13812f=_0x464a50['lastAttempt'];!_0x13812f[_0x3b1102(0x1ad)]?(_0x1bcce8=_0x13812f[_0x3b1102(0x1fa)]?'🛑':'🔄',_0x5d8a43=_0x13812f[_0x3b1102(0x1fa)]?a42_0x126119['yellow']:a42_0x126119[_0x3b1102(0x2bd)]):(_0x1bcce8=_0x13812f['success']?'✅':'❌',_0x5d8a43=_0x13812f[_0x3b1102(0x18f)]?a42_0x126119['green']:a42_0x126119[_0x3b1102(0x2b4)]);}else _0x1bcce8='⏳',_0x5d8a43=a42_0x126119[_0x3b1102(0x236)];const _0x2ef4bc='#'+_0x668bc5,_0x118ffe=_0x332c90?hyperlink(_0x2ef4bc,getWorkflowSessionUrl(_0x62ca1c,_0x332c90,_0x668bc5)):_0x2ef4bc;let _0x2a516a=_0x5c558f;stringWidth(_0x5c558f)>_0x475cc8&&(_0x2a516a=_0x5c558f[_0x3b1102(0x19e)](0x0,_0x475cc8-0x1)+'…');const _0xee6d=a42_0x126119[_0x3b1102(0x236)](_0x2a516a),_0x362951=stringWidth(_0x2a516a),_0x1e8e30='\x20'[_0x3b1102(0x154)](_0x13dd40-stringWidth(_0x2a516a)+0x2),_0x25050c='('+formatElapsed(_0x43ec5d)+')',_0x1d9837=stringWidth(_0x25050c),_0x594123=stringWidth(_0x2ef4bc),_0x524bd1=_0x594123+0x1+_0x362951+_0x1e8e30[_0x3b1102(0x252)],_0x26ce23=_0x28199-_0x524bd1-_0x1d9837-0x1-0x8;let _0x597095=_0x3fe9d5;stringWidth(_0x597095)>_0x26ce23&&(_0x597095=_0x597095[_0x3b1102(0x19e)](0x0,_0x26ce23-0x1)+'…');const _0x2f47f0=_0x118ffe+'\x20'+_0xee6d+_0x1e8e30+_0x597095,_0xa1bd5c=stringWidth(_0x2f47f0),_0x19a001=_0x28199-_0xa1bd5c-_0x1d9837,_0x2e3edb=_0x2f47f0+'\x20'[_0x3b1102(0x154)](Math[_0x3b1102(0x170)](0x1,_0x19a001))+a42_0x126119['dim'](_0x25050c),_0x3ea776=Math[_0x3b1102(0x1f9)]((_0x4b33c7-_0x5308c8)/_0x33d4b7),_0xd80103=Math[_0x3b1102(0x1f9)]((_0x4b595d-_0x5308c8)/_0x33d4b7),_0x290172=Math[_0x3b1102(0x170)](_0x3ea776+0x1,_0xd80103),_0xfcd86d=new Array(_0x5d3056)[_0x3b1102(0x19b)]('\x20');for(let _0x28b211=_0x3ea776;_0x28b211<Math[_0x3b1102(0x162)](_0x290172,_0x5d3056);_0x28b211++){_0xfcd86d[_0x28b211]='─';}const _0x517b1a=_0xfcd86d[_0x3b1102(0x1b5)](_0xfdd0de=>_0xfdd0de==='\x20'?'\x20':_0x5d8a43(_0xfdd0de))[_0x3b1102(0x2ae)]('');_0x7b8584[_0x3b1102(0x2c9)](_0x1bcce8+'\x20'+_0x2e3edb+'│'+_0x517b1a+'│');}return _0x7b8584[_0x3b1102(0x2ae)]('\x0a');}async[a42_0x45bdeb(0x19f)](_0x57ffc6,_0x4de64e,_0x1696a1){const _0x4a5b66=a42_0x45bdeb,{options:_0x14311c,tdx:_0x140e05}=_0x4de64e,_0x128052=_0x14311c['site'],{timelineRows:_0x97e83a,timeAxisHeader:_0x5cb821}=this[_0x4a5b66(0x29a)](_0x57ffc6,_0x128052),_0x465752=_0x97e83a[_0x4a5b66(0x2b9)](_0x330266=>_0x330266['attemptId']);if(_0x465752[_0x4a5b66(0x252)]===0x0){const _0xa8cee2=this[_0x4a5b66(0x192)](_0x57ffc6,_0x128052);console[_0x4a5b66(0x2c2)](_0xa8cee2);!_0x1696a1&&(console['error'](''),console[_0x4a5b66(0x26f)](a42_0x126119[_0x4a5b66(0x236)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x4a5b66(0x26f)](a42_0x126119[_0x4a5b66(0x236)](_0x4a5b66(0x204))+'or'+a42_0x126119['dim'](_0x4a5b66(0x2b8))));return;}_0x5cb821&&console[_0x4a5b66(0x2c2)](_0x5cb821);const _0x2bc06c=_0x97e83a[_0x4a5b66(0x2b9)](_0x4f6fe3=>_0x4f6fe3[_0x4a5b66(0x251)])[_0x4a5b66(0x1b5)](_0x23481f=>({'title':_0x23481f[_0x4a5b66(0x1cf)],'value':_0x23481f['attemptId']})),_0x2abb00=process[_0x4a5b66(0x2d0)][_0x4a5b66(0x142)]||0x3c,_0x18b6db=Math['max'](0x28,Math['floor'](_0x2abb00*0x2/0x3)),_0x43decb=await a42_0x430795({'type':'autocomplete','name':_0x4a5b66(0x251),'message':_0x4a5b66(0x1f1),'choices':_0x2bc06c,'initial':-0x1,'limit':_0x18b6db,'clearFirst':!![],'fallback':{'title':_0x4a5b66(0x25d),'value':null},'suggest':(_0x2b497b,_0x49c3e7)=>{const _0x5476ff=_0x4a5b66;if(!_0x2b497b)return Promise['resolve'](_0x49c3e7);const _0x4bef45=_0x49c3e7[_0x5476ff(0x2b9)](_0x379825=>{const _0x209e02=_0x5476ff,_0x478095=_0x379825;return _0x478095['title']['toLowerCase']()[_0x209e02(0x1a4)](_0x2b497b[_0x209e02(0x153)]());});return Promise[_0x5476ff(0x284)](_0x4bef45);}}),_0x26a7bf=()=>{const _0x7b9c6d=_0x4a5b66;process[_0x7b9c6d(0x2d0)][_0x7b9c6d(0x2d1)](_0x7b9c6d(0x1f5)),process[_0x7b9c6d(0x2d0)][_0x7b9c6d(0x2d1)]('\x1b[1A\x1b[2K'),process['stdout'][_0x7b9c6d(0x2d1)]('\x1b[1A\x1b[2K');},_0x1a2edf=_0x43decb&&_0x43decb[_0x4a5b66(0x251)]&&_0x43decb[_0x4a5b66(0x251)]!==null&&_0x43decb[_0x4a5b66(0x251)][_0x4a5b66(0x283)]()!=='';if(!_0x1a2edf){_0x26a7bf(),console['log'](a42_0x126119[_0x4a5b66(0x236)](_0x4a5b66(0x28e)));return;}_0x26a7bf();const _0x346ffb=_0x57ffc6['find'](_0x32538b=>_0x32538b['lastAttempt']?.['id']===_0x43decb['attemptId']);if(_0x346ffb){const _0x18a945=_0x346ffb[_0x4a5b66(0x2cc)]?.[_0x4a5b66(0x265)]||'?',_0x1257ac=_0x346ffb[_0x4a5b66(0x27d)]?.[_0x4a5b66(0x265)]||'?';console[_0x4a5b66(0x2c2)](_0x4a5b66(0x222)+a42_0x126119[_0x4a5b66(0x236)](_0x18a945)+',\x20Workflow:\x20'+a42_0x126119[_0x4a5b66(0x236)](_0x1257ac));}const _0x4cf976=new WorkflowTimelineCommand();await _0x4cf976[_0x4a5b66(0x221)]({'args':[],'options':{..._0x14311c,'attemptId':_0x43decb['attemptId']},'tdx':_0x140e05});}[a42_0x45bdeb(0x29a)](_0x2d252d,_0x4c89a5){const _0x98aa59=a42_0x45bdeb,_0x4723a8=new Map();for(const _0x549ad7 of _0x2d252d){_0x549ad7['id']&&_0x549ad7[_0x98aa59(0x1f7)]?.['id']&&_0x4723a8[_0x98aa59(0x1cb)](_0x549ad7['id'],_0x549ad7[_0x98aa59(0x1f7)]['id']);}const _0x4fc94d=[];let _0xaeb85f='';const _0x362d2c=this[_0x98aa59(0x192)](_0x2d252d,_0x4c89a5),_0x39a912=_0x362d2c['split']('\x0a');for(const _0x16a0e5 of _0x39a912){if(_0x16a0e5['startsWith']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x16a0e5[_0x98aa59(0x258)](/^\s+\d{4}-\d{2}-\d{2}/))_0xaeb85f=_0x16a0e5;else{if(_0x16a0e5[_0x98aa59(0x258)](/^[✅❌🔄🛑⏳]/)){const _0x5d586a=_0x16a0e5[_0x98aa59(0x258)](/#(\d+)/),_0x54a448=_0x5d586a?_0x5d586a[0x1]:null,_0x3da82e=_0x54a448?_0x4723a8['get'](_0x54a448)||null:null,_0xedf5e0=_0x2d252d[_0x98aa59(0x180)](_0xd4e779=>_0xd4e779['id']===_0x54a448),_0x23d83e=_0xedf5e0?.[_0x98aa59(0x2cc)]?.[_0x98aa59(0x265)]||'';_0x4fc94d[_0x98aa59(0x2c9)]({'displayLine':_0x16a0e5,'attemptId':_0x3da82e,'projectName':_0x23d83e});}}}return{'timelineRows':_0x4fc94d,'timeAxisHeader':_0xaeb85f};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]='workflow:attempts';[a42_0x45bdeb(0x17f)]='List\x20workflow\x20attempts';async[a42_0x45bdeb(0x221)](_0x33ef5b){const _0xaba72e=a42_0x45bdeb,{options:_0x271b3b,args:_0x55c3fb,tdx:_0x51730e}=_0x33ef5b,_0x285ae4=this[_0xaba72e(0x29e)](_0x55c3fb,_0x271b3b);if(!_0x285ae4)return 0x1;const {projectName:_0x5584ee,workflowName:_0x23db67}=_0x285ae4,_0x43b48a=_0x271b3b['includeRetried'];if(_0x271b3b['verbose']){if(_0x5584ee&&_0x23db67)console[_0xaba72e(0x26f)](_0xaba72e(0x2c6)+_0x5584ee+'.'+_0x23db67);else _0x5584ee&&console[_0xaba72e(0x26f)](_0xaba72e(0x202)+_0x5584ee);_0x43b48a&&console[_0xaba72e(0x26f)](_0xaba72e(0x152));}const _0x50cc47=await withSpinner(_0xaba72e(0x227),()=>_0x51730e['workflow']['attempts']({'projectName':_0x5584ee,'workflowName':_0x23db67,'includeRetried':_0x43b48a,'limit':_0x271b3b[_0xaba72e(0x27f)]}),{'verbose':_0x271b3b['verbose']}),_0x2a8353=_0x50cc47[_0xaba72e(0x1f2)],_0x11c4f6=_0x271b3b[_0xaba72e(0x27f)]||0x64,_0x1e4411=_0x2a8353[_0xaba72e(0x252)]>=_0x11c4f6?a42_0x126119[_0xaba72e(0x236)](_0xaba72e(0x1ec)):'';console[_0xaba72e(0x26f)](_0xaba72e(0x1c8)+_0x2a8353[_0xaba72e(0x252)]+_0xaba72e(0x1ca)+(_0x2a8353[_0xaba72e(0x252)]!==0x1?'s':'')+_0x1e4411);if(_0x271b3b[_0xaba72e(0x219)]===_0xaba72e(0x17a)||_0x271b3b[_0xaba72e(0x219)]===_0xaba72e(0x1c2)||_0x271b3b['format']==='table')await handleSDKOutput(_0x2a8353,_0x271b3b);else{if(_0x2a8353[_0xaba72e(0x252)]===0x0){if(_0x5584ee&&_0x23db67)console['log'](_0xaba72e(0x1d7)+_0x5584ee+'.'+_0x23db67);else _0x5584ee?console[_0xaba72e(0x2c2)](_0xaba72e(0x2a0)+_0x5584ee):console['log'](_0xaba72e(0x1c1));}else{const _0x4a4d69=_0x271b3b[_0xaba72e(0x259)],_0x3a6759=_0x2a8353[_0xaba72e(0x1b5)](_0x18456f=>{const _0x5a1b85=_0xaba72e,_0x528d30=a42_0x126119[_0x5a1b85(0x236)]('#'+_0x18456f['id']),_0xa3d2c3=_0x18456f[_0x5a1b85(0x2cc)]?.['id'],_0x2e1c50=_0x18456f[_0x5a1b85(0x26b)]||_0x18456f[_0x5a1b85(0x224)],_0x59061b=_0xa3d2c3&&_0x2e1c50?hyperlink(_0x528d30,getWorkflowAttemptUrl(_0x4a4d69,_0xa3d2c3,_0x2e1c50,_0x18456f['id'])):_0x528d30,{icon:_0x4f4167,text:_0x37694c}=getAttemptStatusDisplay(_0x18456f),_0x50c2b3=(_0x18456f[_0x5a1b85(0x2cc)]?.[_0x5a1b85(0x265)]||'?')+'.'+(_0x18456f[_0x5a1b85(0x27d)]?.['name']||'?'),_0x3f6563=_0x18456f['sessionTime']?a42_0x126119['dim'](_0x18456f[_0x5a1b85(0x2b5)]):'';return(_0x59061b+'\x20'+_0x4f4167+(_0x37694c?'\x20'+_0x37694c:'')+'\x20'+_0x50c2b3+'\x20'+_0x3f6563)[_0x5a1b85(0x2dd)]();});await writeOutput(_0x3a6759[_0xaba72e(0x2ae)]('\x0a'),_0x271b3b[_0xaba72e(0x14a)],_0xaba72e(0x2da));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x45bdeb(0x265)]='workflow:attempt';['description']=a42_0x45bdeb(0x241);async[a42_0x45bdeb(0x221)](_0x1a5a87){const _0x43dde5=a42_0x45bdeb,{options:_0x4086d8,args:_0x143546,tdx:_0x15cbdc}=_0x1a5a87,_0x503378=_0x143546[0x0];if(!_0x503378)return console[_0x43dde5(0x26f)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x4086d8[_0x43dde5(0x1d1)]&&console[_0x43dde5(0x26f)]('Attempt\x20ID:\x20'+_0x503378);const _0x51a88e=await withSpinner(_0x43dde5(0x299),()=>_0x15cbdc[_0x43dde5(0x27d)][_0x43dde5(0x157)](_0x503378),{'verbose':_0x4086d8['verbose']}),_0xb3e130=_0x51a88e[_0x43dde5(0x1f2)];let _0x2c365c;!_0xb3e130[_0x43dde5(0x1ad)]?_0x2c365c=_0xb3e130['cancelRequested']?_0x43dde5(0x2a6):'running':_0x2c365c=_0xb3e130[_0x43dde5(0x18f)]?_0x43dde5(0x18f):_0x43dde5(0x26f);let _0x15926b;if(_0xb3e130[_0x43dde5(0x15d)]&&_0xb3e130['finishedAt']){const _0x2eedae=new Date(_0xb3e130[_0x43dde5(0x15d)])[_0x43dde5(0x24d)](),_0x31d403=new Date(_0xb3e130[_0x43dde5(0x1db)])[_0x43dde5(0x24d)]();_0x15926b=Math['round']((_0x31d403-_0x2eedae)/0x3e8);}const _0x56ad46={'attempt_id':_0xb3e130['id'],'status':_0x2c365c,..._0xb3e130[_0x43dde5(0x209)]!==undefined&&{'index':_0xb3e130[_0x43dde5(0x209)]},..._0xb3e130['project']&&{'project':_0xb3e130[_0x43dde5(0x2cc)]['name']},..._0xb3e130['workflow']&&{'workflow':_0xb3e130['workflow']['name']},..._0xb3e130[_0x43dde5(0x224)]&&{'session_id':_0xb3e130['sessionId']},..._0xb3e130[_0x43dde5(0x2b5)]&&{'session_time':_0xb3e130['sessionTime']},..._0xb3e130[_0x43dde5(0x1e9)]&&{'retry_attempt':_0xb3e130[_0x43dde5(0x1e9)]},..._0x15926b!==undefined&&{'duration_sec':_0x15926b},..._0xb3e130[_0x43dde5(0x15d)]&&{'created_at':_0xb3e130[_0x43dde5(0x15d)]},..._0xb3e130[_0x43dde5(0x1db)]&&{'finished_at':_0xb3e130[_0x43dde5(0x1db)]},...Object[_0x43dde5(0x214)](_0xb3e130['params'])['length']>0x0&&{'params':_0xb3e130['params']}};return await handleSingleObjectOutput(_0x56ad46,_0x4086d8),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x45bdeb(0x265)]='workflow:tasks';[a42_0x45bdeb(0x17f)]='Show\x20tasks\x20for\x20an\x20attempt';async[a42_0x45bdeb(0x221)](_0x2b1c40){const _0x4e333a=a42_0x45bdeb,{options:_0x233994,args:_0x2b8c87,tdx:_0x2359a9}=_0x2b1c40,_0x44e750=_0x2b8c87[0x0];if(!_0x44e750)return console[_0x4e333a(0x26f)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x52899d=_0x233994[_0x4e333a(0x29c)];_0x233994[_0x4e333a(0x1d1)]&&(console['error'](_0x4e333a(0x182)+_0x44e750),_0x52899d&&console[_0x4e333a(0x26f)]('Including\x20subtasks:\x20yes'));const _0x21b4ff=await withSpinner(_0x4e333a(0x164),()=>_0x2359a9[_0x4e333a(0x27d)]['tasks'](_0x44e750,_0x52899d||![]),{'verbose':_0x233994[_0x4e333a(0x1d1)]}),_0x257717=_0x21b4ff[_0x4e333a(0x1f2)];return console['error']('✔\x20Found\x20'+_0x257717['length']+'\x20task'+(_0x257717[_0x4e333a(0x252)]!==0x1?'s':'')),await handleSDKOutput(_0x257717,_0x233994),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1bd);['description']=a42_0x45bdeb(0x2d9);async[a42_0x45bdeb(0x221)](_0x19cf3b){const _0x59e4f1=a42_0x45bdeb,{options:_0x834936,args:_0x35fcd6,tdx:_0x4ad7ce}=_0x19cf3b,_0x49ae73=_0x35fcd6[0x0];let _0x3cc4f3=_0x35fcd6[0x1];if(!_0x49ae73)return console[_0x59e4f1(0x26f)](_0x59e4f1(0x191)),0x1;_0x834936[_0x59e4f1(0x1d1)]&&(console[_0x59e4f1(0x26f)](_0x59e4f1(0x182)+_0x49ae73),_0x3cc4f3&&console[_0x59e4f1(0x26f)](_0x59e4f1(0x19c)+_0x3cc4f3));const _0x358da5=await withSpinner('Fetching\x20log\x20files...',()=>_0x4ad7ce[_0x59e4f1(0x27d)][_0x59e4f1(0x1a1)](_0x49ae73,_0x3cc4f3),{'verbose':_0x834936[_0x59e4f1(0x1d1)]}),_0x143a85=_0x358da5[_0x59e4f1(0x1f2)];if(_0x143a85[_0x59e4f1(0x252)]===0x0)return console[_0x59e4f1(0x26f)](_0x59e4f1(0x171)),0x0;if(!_0x3cc4f3&&(_0x834936[_0x59e4f1(0x17a)]||_0x834936[_0x59e4f1(0x219)]))return await handleSDKOutput(_0x143a85,_0x834936),0x0;if(!_0x3cc4f3){const _0x679686=_0x143a85['map'](_0x48733b=>({'title':_0x48733b[_0x59e4f1(0x2cf)]+'\x20('+formatBytes(_0x48733b[_0x59e4f1(0x2e1)])+')','value':_0x48733b[_0x59e4f1(0x2cf)]})),_0x335a78=await a42_0x430795({'type':_0x59e4f1(0x1b8),'name':_0x59e4f1(0x2a3),'message':_0x59e4f1(0x2c0),'choices':_0x679686});if(!_0x335a78[_0x59e4f1(0x2a3)])return console['error'](_0x59e4f1(0x28e)),0x0;_0x3cc4f3=_0x335a78[_0x59e4f1(0x2a3)];}const _0x552bec=await withSpinner(_0x59e4f1(0x200),()=>_0x4ad7ce[_0x59e4f1(0x27d)][_0x59e4f1(0x26e)](_0x49ae73,_0x3cc4f3),{'verbose':_0x834936['verbose']}),_0x39ea15=_0x552bec[_0x59e4f1(0x1f2)];return _0x39ea15?console['log'](_0x39ea15):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x185);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x169);async[a42_0x45bdeb(0x221)](_0xc77ac6){const _0x24db8e=a42_0x45bdeb,{options:_0x5f463d,args:_0xd06b2f,tdx:_0x48ecf7}=_0xc77ac6,_0xcdeb48=_0xd06b2f[0x0];if(!_0xcdeb48)return console[_0x24db8e(0x26f)](_0x24db8e(0x191)),0x1;const _0x85ddd=_0x5f463d['reason'];_0x5f463d['verbose']&&(console[_0x24db8e(0x26f)](_0x24db8e(0x182)+_0xcdeb48),_0x85ddd&&console['error']('Reason:\x20'+_0x85ddd));if(!_0x5f463d[_0x24db8e(0x1b0)]){if(!isInteractive())return console[_0x24db8e(0x26f)](a42_0x126119[_0x24db8e(0x2b4)](_0x24db8e(0x183)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x24db8e(0x26f)](a42_0x126119[_0x24db8e(0x236)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x7bc754=await confirmKey(_0x24db8e(0x1cd)+_0xcdeb48+'?');if(!_0x7bc754)return console[_0x24db8e(0x26f)](a42_0x126119['yellow'](_0x24db8e(0x28e))),0x1;}const _0x3dc66a=await withSpinner(_0x24db8e(0x1ab),()=>_0x48ecf7[_0x24db8e(0x27d)][_0x24db8e(0x1ce)](_0xcdeb48,_0x85ddd),{'verbose':_0x5f463d[_0x24db8e(0x1d1)]}),_0x2db556=_0x3dc66a['data'];return console[_0x24db8e(0x26f)]('✔\x20'+_0x2db556),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1d4);[a42_0x45bdeb(0x17f)]='Retry\x20a\x20session\x20or\x20attempt';async[a42_0x45bdeb(0x221)](_0x259809){const _0xeb2ccb=a42_0x45bdeb,{options:_0x1613f1,args:_0x553e78,tdx:_0x328d30}=_0x259809,_0x12002a=_0x553e78[0x0];if(!_0x12002a)return console['error'](_0xeb2ccb(0x20c)),console[_0xeb2ccb(0x26f)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x55bb1f=![],_0x4df09e=_0x12002a;if(_0x12002a[_0xeb2ccb(0x181)](_0xeb2ccb(0x21d)))_0x55bb1f=!![],_0x4df09e=_0x12002a[_0xeb2ccb(0x18e)](0x8);else{if(_0x12002a['startsWith'](_0xeb2ccb(0x1e6)))_0x55bb1f=![],_0x4df09e=_0x12002a[_0xeb2ccb(0x18e)](0x8);else return console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x243)),console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x15e)),0x1;}const _0x3f7834=_0x1613f1[_0xeb2ccb(0x1d8)],_0x30b574=_0x1613f1[_0xeb2ccb(0x14e)],_0x3a6e6c=_0x1613f1['params'],_0x5b2ab9=_0x1613f1[_0xeb2ccb(0x228)];_0x1613f1[_0xeb2ccb(0x1d1)]&&(console[_0xeb2ccb(0x26f)]('Target:\x20'+(_0x55bb1f?_0xeb2ccb(0x207):_0xeb2ccb(0x157))+'\x20'+_0x4df09e),_0x3f7834&&console[_0xeb2ccb(0x26f)]('From\x20task:\x20'+_0x3f7834),_0x30b574&&console['error'](_0xeb2ccb(0x26c)+_0x30b574),_0x3a6e6c&&console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x19a)+_0x3a6e6c),_0x5b2ab9&&console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x269)));let _0x12f9f9;if(_0x3a6e6c)try{if(_0x3a6e6c['startsWith']('@')){const _0x33175f=await import(_0xeb2ccb(0x141)),_0x1a64fc=_0x3a6e6c[_0xeb2ccb(0x18e)](0x1),_0x12b69d=await _0x33175f[_0xeb2ccb(0x2c7)](_0x1a64fc,_0xeb2ccb(0x1e3));_0x12f9f9=JSON[_0xeb2ccb(0x1ea)](_0x12b69d);}else _0x12f9f9=JSON[_0xeb2ccb(0x1ea)](_0x3a6e6c);}catch{return console[_0xeb2ccb(0x26f)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x1613f1[_0xeb2ccb(0x1b0)]){if(!isInteractive())return console['error'](a42_0x126119[_0xeb2ccb(0x2b4)]('\x0aError:'),_0xeb2ccb(0x25b)),console['error'](a42_0x126119[_0xeb2ccb(0x236)](_0xeb2ccb(0x25c))),0x1;const _0x57a975=await confirmKey(_0xeb2ccb(0x2b6)+(_0x55bb1f?'session':_0xeb2ccb(0x157))+'\x20'+_0x4df09e+'?');if(!_0x57a975)return console[_0xeb2ccb(0x26f)](a42_0x126119[_0xeb2ccb(0x1ee)](_0xeb2ccb(0x28e))),0x1;}let _0x2d9216;_0x55bb1f?_0x2d9216=await withSpinner(_0xeb2ccb(0x2a1),()=>_0x328d30[_0xeb2ccb(0x27d)][_0xeb2ccb(0x195)](_0x4df09e,{'fromTask':_0x3f7834,'retryParams':_0x12f9f9}),{'verbose':_0x1613f1[_0xeb2ccb(0x1d1)]}):_0x2d9216=await withSpinner(_0xeb2ccb(0x286),()=>_0x328d30[_0xeb2ccb(0x27d)][_0xeb2ccb(0x14d)](_0x4df09e,{'resumeFrom':_0x30b574,'retryParams':_0x12f9f9,'force':_0x5b2ab9}),{'verbose':_0x1613f1[_0xeb2ccb(0x1d1)]});const _0x3bf41d=_0x2d9216[_0xeb2ccb(0x1f2)];return console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x20e)),console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x249)+_0x3bf41d['attemptId']),console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x279)+_0x3bf41d[_0xeb2ccb(0x224)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x203);[a42_0x45bdeb(0x17f)]='Start\x20a\x20workflow\x20run';async[a42_0x45bdeb(0x221)](_0x2cd46e){const _0x5d6d74=a42_0x45bdeb,{options:_0x12ea41,args:_0x52873c,tdx:_0x43d87b}=_0x2cd46e;let _0x56e6da=_0x52873c[0x0];if(!_0x56e6da){const _0x144b08=this['resolveProject']([],_0x12ea41),_0x295f3f=await withSpinner(_0x5d6d74(0x197),()=>_0x43d87b[_0x5d6d74(0x27d)]['workflows'](_0x144b08,{'limit':_0x12ea41[_0x5d6d74(0x27f)]}),{'verbose':_0x12ea41[_0x5d6d74(0x1d1)]}),_0x5ca0ed=_0x295f3f[_0x5d6d74(0x1f2)];if(_0x5ca0ed[_0x5d6d74(0x252)]===0x0)return console[_0x5d6d74(0x26f)](_0x5d6d74(0x14c)),!_0x144b08&&console[_0x5d6d74(0x26f)](a42_0x126119[_0x5d6d74(0x236)](_0x5d6d74(0x289))),0x1;const _0x4573e1=_0x5ca0ed['map'](_0x5b9aee=>({'title':_0x5b9aee[_0x5d6d74(0x2cc)]?.[_0x5d6d74(0x265)]+'.'+_0x5b9aee['name'],'value':_0x5b9aee[_0x5d6d74(0x2cc)]?.[_0x5d6d74(0x265)]+'.'+_0x5b9aee['name'],'description':_0x5b9aee['revision']?_0x5d6d74(0x1a7)+_0x5b9aee[_0x5d6d74(0x1e7)]:undefined})),_0x5d733f=await a42_0x430795({'type':_0x5d6d74(0x1b8),'name':_0x5d6d74(0x27d),'message':_0x5d6d74(0x174),'choices':_0x4573e1});if(!_0x5d733f[_0x5d6d74(0x27d)])return 0x1;_0x56e6da=_0x5d733f['workflow'];}if(!_0x56e6da[_0x5d6d74(0x1a4)]('.')){const _0x1dd70e=this[_0x5d6d74(0x184)]([],_0x12ea41);if(_0x1dd70e)_0x56e6da=_0x1dd70e+'.'+_0x56e6da;else return console[_0x5d6d74(0x26f)](a42_0x126119[_0x5d6d74(0x2b4)](_0x5d6d74(0x1af)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x5d6d74(0x26f)](a42_0x126119['dim'](_0x5d6d74(0x289))),0x1;}const _0x50eae2=_0x12ea41[_0x5d6d74(0x2e0)],_0x128513=_0x12ea41[_0x5d6d74(0x2b5)],_0x45290f={};if(_0x50eae2&&Array[_0x5d6d74(0x161)](_0x50eae2))for(const _0x1786b8 of _0x50eae2){const _0x22cf65=_0x1786b8[_0x5d6d74(0x278)]('=');if(_0x22cf65===-0x1)return console[_0x5d6d74(0x26f)](_0x5d6d74(0x2a5)+_0x1786b8),console['error'](_0x5d6d74(0x1a0)),0x1;const _0x426f48=_0x1786b8[_0x5d6d74(0x18e)](0x0,_0x22cf65),_0x2cd7fa=_0x1786b8[_0x5d6d74(0x18e)](_0x22cf65+0x1);try{_0x45290f[_0x426f48]=JSON[_0x5d6d74(0x1ea)](_0x2cd7fa);}catch{_0x45290f[_0x426f48]=_0x2cd7fa;}}_0x12ea41['verbose']&&(console[_0x5d6d74(0x26f)](_0x5d6d74(0x1fb)+_0x56e6da),Object[_0x5d6d74(0x214)](_0x45290f)[_0x5d6d74(0x252)]>0x0&&console[_0x5d6d74(0x26f)](_0x5d6d74(0x1df)+JSON[_0x5d6d74(0x29b)](_0x45290f)),_0x128513&&console[_0x5d6d74(0x26f)](_0x5d6d74(0x1c5)+_0x128513));const _0x32682c=await withSpinner('Starting\x20workflow\x20run...',()=>_0x43d87b[_0x5d6d74(0x27d)][_0x5d6d74(0x194)](_0x56e6da,_0x45290f,{'sessionTime':_0x128513}),{'verbose':_0x12ea41[_0x5d6d74(0x1d1)]}),_0x498789=_0x32682c['data'];console[_0x5d6d74(0x26f)](_0x5d6d74(0x28f)),console[_0x5d6d74(0x26f)](_0x5d6d74(0x2bb)+_0x498789['id']),console['error']('\x20\x20Session\x20ID:\x20'+_0x498789[_0x5d6d74(0x224)]),console[_0x5d6d74(0x26f)](_0x5d6d74(0x2e2)+_0x498789[_0x5d6d74(0x2cc)]?.['name']),console[_0x5d6d74(0x26f)](_0x5d6d74(0x20a)+_0x498789[_0x5d6d74(0x27d)]?.[_0x5d6d74(0x265)]);if(_0x498789[_0x5d6d74(0x2cc)]?.['id']&&_0x498789['sessionId']&&_0x498789['id']){const _0xa18e1d=_0x12ea41[_0x5d6d74(0x259)],_0x21f298=getConsoleUrl(_0xa18e1d,_0x5d6d74(0x1d5)+_0x498789[_0x5d6d74(0x2cc)]['id']+_0x5d6d74(0x151)+_0x498789[_0x5d6d74(0x224)]+_0x5d6d74(0x28d)+_0x498789['id']);console[_0x5d6d74(0x26f)]('\x20\x20Console:\x20'+a42_0x126119[_0x5d6d74(0x1c4)](_0x21f298));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x167);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x210);async['execute'](_0x467a1c){const _0x414ea6=a42_0x45bdeb,{options:_0x3cf1b0,args:_0x19d7e8,tdx:_0xa251a1}=_0x467a1c,_0x405fc6=_0x19d7e8[0x0],_0xf0124e=_0x19d7e8[0x1]||'.';if(!_0x405fc6)return console['error'](_0x414ea6(0x15b)),console[_0x414ea6(0x26f)](_0x414ea6(0x1fd)),0x1;const _0x394638=_0x3cf1b0[_0x414ea6(0x1e7)];_0x3cf1b0[_0x414ea6(0x1d1)]&&(console[_0x414ea6(0x26f)](_0x414ea6(0x222)+_0x405fc6),console[_0x414ea6(0x26f)](_0x414ea6(0x1fc)+_0xf0124e),_0x394638&&console['error'](_0x414ea6(0x189)+_0x394638));const _0x2cf0d3=await withSpinner(_0x414ea6(0x216)+_0x405fc6+_0x414ea6(0x15a),()=>_0xa251a1[_0x414ea6(0x27d)]['download'](_0x405fc6,_0xf0124e,{'revision':_0x394638}),{'verbose':_0x3cf1b0[_0x414ea6(0x1d1)]}),_0x1186ab=_0x2cf0d3[_0x414ea6(0x1f2)];return console[_0x414ea6(0x26f)](_0x414ea6(0x217)+_0x1186ab['projectName']),console['error'](_0x414ea6(0x1c9)+_0x1186ab['revision']),console['error']('\x20\x20Files\x20extracted:\x20'+_0x1186ab['filesExtracted']),console[_0x414ea6(0x26f)](_0x414ea6(0x177)+_0xf0124e+'/'+_0x1186ab[_0x414ea6(0x2ca)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a42_0x45bdeb(0x1aa);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x298);async[a42_0x45bdeb(0x221)](_0x604c08){const _0xec5a73=a42_0x45bdeb,{options:_0x1d6c75,args:_0x1439a4,tdx:_0x5660d7}=_0x604c08;let _0xf962ef='.',_0x2a9266=_0x1d6c75[_0xec5a73(0x265)];if(_0x1439a4[0x0]){const {promises:_0x44619e}=await import('fs');try{const _0x4543ec=await _0x44619e['stat'](_0x1439a4[0x0]);if(_0x4543ec[_0xec5a73(0x16f)]())_0xf962ef=_0x1439a4[0x0];else return console[_0xec5a73(0x26f)](_0xec5a73(0x244)+_0x1439a4[0x0]+_0xec5a73(0x21e)),0x1;}catch{_0x2a9266=_0x1439a4[0x0],_0xf962ef='.';}}const _0x43c1f9=_0x1d6c75[_0xec5a73(0x1e7)],_0xf088ce=_0x1d6c75['skipValidation'];_0x1d6c75['verbose']&&(console[_0xec5a73(0x26f)](_0xec5a73(0x255)+_0xf962ef),_0x2a9266&&console['error'](_0xec5a73(0x1b6)+_0x2a9266),_0x43c1f9&&console['error'](_0xec5a73(0x189)+_0x43c1f9),_0xf088ce&&console[_0xec5a73(0x26f)]('Validation:\x20skipped'));const _0x1a34c4=await withSpinner(_0xec5a73(0x1f0),()=>_0x5660d7[_0xec5a73(0x27d)]['push'](_0xf962ef,{'projectName':_0x2a9266,'revision':_0x43c1f9,'skipValidation':_0xf088ce}),{'verbose':_0x1d6c75['verbose']}),_0x25c732=_0x1a34c4[_0xec5a73(0x1f2)];return console[_0xec5a73(0x26f)]('✔\x20Pushed\x20'+_0x25c732[_0xec5a73(0x2ca)]),console['error'](_0xec5a73(0x267)+_0x25c732[_0xec5a73(0x2bc)]),console[_0xec5a73(0x26f)](_0xec5a73(0x1c9)+_0x25c732[_0xec5a73(0x1e7)]),await this[_0xec5a73(0x20f)](_0x5660d7,_0x25c732[_0xec5a73(0x2ca)],_0x1d6c75[_0xec5a73(0x259)]),0x0;}}function a42_0x2886(){const _0x2d90aa=['\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','fs/promises','rows','requireProject','MAX_TASKS_DISPLAY','.\x20Expected\x20format:\x20KEY=VALUE','1441225iHWDVd','Listing\x20workflows...','\x0a✔\x20Already\x20up\x20to\x20date','pending','output','\x20logs','No\x20workflows\x20found','retryAttempt','resumeFrom','✔\x20Project:\x20','Source\x20directory\x20is\x20required','/sessions/','Include\x20retried:\x20yes','toLowerCase','repeat','List\x20workflow\x20execution\x20sessions','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','attempt','tasks','workflow:delete','...','Error:\x20Project\x20name\x20is\x20required','Key\x20cannot\x20be\x20empty','createdAt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','some','\x0aUpdate\x20existing\x20project\x20\x22','isArray','min','6909qpYMQB','Getting\x20attempt\x20tasks...','executePushProject','MAX_POLL_ITERATIONS','workflow:download','New\x20project\x20name:\x20','Kill\x20a\x20running\x20attempt','cwd','context','targetExists','window','green','isDirectory','max','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x0aDry\x20run\x20-\x20nothing\x20pushed','prepareCloneProject','Select\x20a\x20workflow\x20to\x20run','value','Usage:\x20workflow:delete\x20<project-name-or-id>','\x20\x20Location:\x20','\x22\x20to\x20new\x20project\x20\x22','Error:\x20Secret\x20key\x20is\x20required','json','\x20has\x20no\x20attempts','💡\x20Tip:\x20Use\x20','padStart','(unknown)','description','find','startsWith','Attempt\x20ID:\x20','\x0aError:','resolveProject','workflow:kill','⚠\x20Showing\x20first\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Source\x20directory:\x20','Revision:\x20','pollTimeline','getMonth','\x27...','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','substring','success','4893296HsjzyJ','Error:\x20Attempt\x20ID\x20is\x20required','renderSessionsTimeline','pullProject','run','retrySession','unknown','Loading\x20workflows...','Total:\x20','134GUBptz','Params:\x20','fill','Task\x20name:\x20','\x22\x20with\x20new\x20revision?','slice','navigateSessionsInteractive','Expected\x20format:\x20--param\x20key=value','logFiles','Listing\x20workflow\x20sessions...','workflow:push','includes','\x0aPolling...\x20(','GUTTER','revision:\x20','\x20secret','→\x20New\x20project:\x20','workflow:upload','Killing\x20attempt...','relative','done','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Error:','yes','\x20new','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','workflow:projects','Auto-selected\x20latest\x20session:\x20','map','Project\x20name:\x20','hasChanges','select','workflowProject','✔\x20Project\x20updated','workflows','resolveProjectId','workflow:logs','✔\x20Secret\x20\x27','workflow:workflows','Updating\x20','No\x20attempts\x20found','jsonl','Attempt:\x20','cyan','Session\x20time:\x20','dryRun','workflow:use','✔\x20Found\x20','\x20\x20Revision:\x20','\x20attempt','set','has','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','kill','displayLine','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','verbose','total','\x0aFailed\x20to\x20fetch\x20attempt\x20data','workflow:retry','/app/workflows/','Listing\x20secrets...','No\x20attempts\x20found\x20for:\x20','fromTask','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','now','finishedAt','workflow:timeline','Source\x20project:\x20','duration','Parameters:\x20','---\x20','99dNhCzT','Invalid\x20format:\x20','utf-8','deleted','\x20of\x20','attempt:','revision','479380yCpsdP','retryAttemptName','parse','startTime','\x20(use\x20--limit\x20to\x20show\x20more)','fullName','yellow','getDate','Pushing\x20workflow\x20project...','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','data','metadata','message','\x1b[1A\x1b[2K','\x20(system)','lastAttempt','end','floor','cancelRequested','Workflow:\x20','Output\x20directory:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','updatedAt','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Downloading\x20logs...','targetDir','Filter:\x20project=','workflow:run','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Validation:\x20skipped','Failed\x20to\x20fetch\x20attempt\x20data','session','Pulling\x20project\x20','index','\x20\x20Workflow:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow:secrets:set','✔\x20Retry\x20started','showWorkflowConsoleUrl','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','startedAt','skipValidation','every','keys','5374XhkhhH','Downloading\x20project\x20','✔\x20Downloaded\x20','-\x20no\x20files\x20written','format','13278pJPYWz','sourceProjectName','sort','session:','\x20is\x20not\x20a\x20directory','Pull\x20workflow\x20project\x20to\x20local\x20folder','workflow:sessions','execute','Project:\x20','Dry\x20run:\x20yes','sessionId','replace','\x0a✔\x20Attempt\x20complete','Listing\x20workflow\x20attempts...','force','Loading\x20session...','table','applyPullProject','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','icon','values','LABEL_WIDTH_DIVISOR','Analyzing\x20project...','MAX_LABEL_COUNT','Session\x20','newProjectName','localeCompare','\x20from\x20session\x20','dim','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x20project','modified','workflow:pull','2478WzivHC','status','clear','unchanged','new','Show\x20specific\x20attempt\x20details','\x20to\x20see\x20detailed\x20logs','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Error:\x20','getFullYear','POLL_INTERVAL_MS','Tip:\x20cd\x20to\x20workflows/','sessions','\x20\x20New\x20attempt\x20ID:\x20','group_error','tdx.json','16158406DhDFlm','getTime','✔\x20Workflow\x20project\x20context\x20cleared.','buildTimelineData','getHours','attemptId','length','Deleting\x20secret...','summary','Project\x20directory:\x20','fileCount','📁\x20','match','site','Pattern:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','No\x20matching\x20sessions\x20found','\x20\x20Session\x20context\x20set\x20to:\x20','start','✔\x20Deleted\x20project\x20','Listing\x20workflow\x20projects...','Loading\x20sessions...','List\x20workflows','Writing\x20files...','name','white','\x20\x20Project\x20ID:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Force:\x20yes','path','session_id','Resume\x20from:\x20','No\x20sessions\x20found','logs','error','isTTY','No\x20workflow\x20projects\x20found','ICON_SPACING','LABEL_MIN_SPACING','changes','\x0aClone\x20\x22','\x0aDry\x20run\x20-\x20no\x20files\x20written','durationMs','indexOf','\x20\x20Session\x20ID:\x20','key','workflowName','TASK_NAME_WIDTH','workflow','\x20-\x20','limit','text','Session\x20not\x20found:\x20','projects','trim','resolve','renderTimeline','Retrying\x20attempt...','\x0a✔\x20No\x20changes\x20to\x20push','🔄\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','state','ICON_WIDTH','renderSingleTimeline','/attempt/','Cancelled','✔\x20Workflow\x20run\x20started','\x20sessions\x20','Warning:','→\x20Project:\x20','sourceDir','Key:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Target\x20directory:\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Getting\x20attempt\x20details...','generateSessionTimelineRows','stringify','includeSubtasks','size','parseProjectWorkflowPattern','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','No\x20attempts\x20found\x20in\x20project:\x20','Retrying\x20session...','basename','task','List\x20all\x20workflow\x20projects','Error:\x20Invalid\x20parameter\x20format:\x20','canceling','sys','(use\x20--limit\x20to\x20see\x20more)','\x20unchanged','resolveProjectDir','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','planned','No\x20sessions\x20found\x20in\x20project:\x20','join','follow','executeCloneProject','workflow:secrets:list','Using\x20attempt\x20','\x20deleted','red','sessionTime','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','diff','\x20\x20tdx\x20wf\x20use\x20<project>','filter','Files\x20to\x20upload:\x20','\x20\x20Attempt\x20ID:\x20','projectId','blue','No\x20workflow\x20sessions\x20found','152UeAdeM','Select\x20a\x20task\x20to\x20view\x20logs:','isNewProject','log','\x0aDry\x20run\x20-\x20no\x20project\x20created','delete','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Filter:\x20','readFile','\x20\x20Source:\x20','push','projectName','all','project','\x20\x20Changes:\x20','Latest\x20session\x20has\x20no\x20attempt','taskName','stdout','write','type','preparePushProject','columns','toISOString','\x20tasks','running','workflow:secrets:delete','Show\x20logs\x20for\x20a\x20workflow\x20attempt','list','No\x20workflow\x20tdx.json\x20found','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','trimEnd','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','param','fileSize','\x20\x20Project:\x20','Project\x20name\x20is\x20required','No\x20sessions\x20found\x20for:\x20'];a42_0x2886=function(){return _0x2d90aa;};return a42_0x2886();}export class WorkflowPullCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x23b);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x21f);async[a42_0x45bdeb(0x221)](_0x2bd14c){const _0x190ecb=a42_0x45bdeb,{options:_0x3a4842,args:_0x45f1d1,tdx:_0xdac92f}=_0x2bd14c,_0x3d24d1=_0x45f1d1[0x0],_0xd4b823=_0x45f1d1[0x1];if(!_0x3d24d1)return console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x2b4)](_0x190ecb(0x1af)),'Project\x20name\x20is\x20required'),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x236)](_0x190ecb(0x238))),0x1;const _0x222479=_0x3a4842[_0x190ecb(0x1e7)];_0x3a4842['verbose']&&(console[_0x190ecb(0x26f)](_0x190ecb(0x222)+_0x3d24d1),_0xd4b823&&console[_0x190ecb(0x26f)](_0x190ecb(0x297)+_0xd4b823),_0x222479&&console[_0x190ecb(0x26f)]('Revision:\x20'+_0x222479),_0x3a4842['dryRun']&&console[_0x190ecb(0x26f)](_0x190ecb(0x223)));const _0x3b3d8c=await withSpinner(_0x190ecb(0x208)+_0x3d24d1+'...',()=>_0xdac92f[_0x190ecb(0x27d)][_0x190ecb(0x193)](_0x3d24d1,{'targetDir':_0xd4b823,'revision':_0x222479}),{'verbose':_0x3a4842[_0x190ecb(0x1d1)]}),_0x8e8ef2=_0x3b3d8c['data'];_0x8e8ef2[_0x190ecb(0x2c1)]?console['error'](_0x190ecb(0x1a9)+_0x8e8ef2[_0x190ecb(0x2ca)]):console[_0x190ecb(0x26f)](_0x190ecb(0x292)+_0x8e8ef2[_0x190ecb(0x2ca)]);console[_0x190ecb(0x26f)](_0x190ecb(0x1c9)+_0x8e8ef2[_0x190ecb(0x1e7)]),console['error']('\x20\x20Target:\x20'+(a42_0x273201['relative'](process['cwd'](),_0x8e8ef2[_0x190ecb(0x201)])||'.')),console['error'](_0x190ecb(0x2cd)+a42_0x126119['green']('+'+_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x240)]+'\x20new')+',\x20'+(a42_0x126119[_0x190ecb(0x1ee)]('~'+_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x23a)]+'\x20modified')+',\x20')+(a42_0x126119['red']('-'+_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x1e4)]+_0x190ecb(0x2b3))+',\x20')+(''+a42_0x126119[_0x190ecb(0x236)](_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x23f)]+_0x190ecb(0x2a9))));for(const _0x23894a of _0x8e8ef2[_0x190ecb(0x274)]){_0x23894a[_0x190ecb(0x2d2)]==='modified'&&_0x23894a[_0x190ecb(0x2b7)]&&(console[_0x190ecb(0x26f)]('\x0a'+a42_0x126119['cyan'](_0x190ecb(0x1e0)+_0x23894a[_0x190ecb(0x26a)])),console[_0x190ecb(0x26f)](_0x23894a[_0x190ecb(0x2b7)]));}if(!_0x8e8ef2[_0x190ecb(0x1b7)])return saveSessionContext({'workflow_project':_0x8e8ef2[_0x190ecb(0x2ca)]},_0x3a4842['session']),console[_0x190ecb(0x26f)](a42_0x126119['green'](_0x190ecb(0x148))),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x236)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x8e8ef2[_0x190ecb(0x2ca)])),0x0;if(_0x3a4842[_0x190ecb(0x1c6)])return console['error'](a42_0x126119['yellow'](_0x190ecb(0x276))),0x0;if(!_0x3a4842[_0x190ecb(0x1b0)]){if(!isInteractive())return console['error'](a42_0x126119['red'](_0x190ecb(0x183)),_0x190ecb(0x25b)),console[_0x190ecb(0x26f)](a42_0x126119['dim'](_0x190ecb(0x25c))),0x1;const _0x3acaeb=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x3acaeb)return console[_0x190ecb(0x26f)](a42_0x126119['yellow'](_0x190ecb(0x28e)),_0x190ecb(0x218)),0x1;}await withSpinner(_0x190ecb(0x264),()=>_0xdac92f['workflow'][_0x190ecb(0x22b)](_0x8e8ef2,{'revision':_0x222479}),{'verbose':_0x3a4842[_0x190ecb(0x1d1)]}),saveSessionContext({'workflow_project':_0x8e8ef2[_0x190ecb(0x2ca)]},_0x3a4842[_0x190ecb(0x207)]),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x16e)]('✔\x20Pull\x20complete'));const _0x34f3f1=a42_0x273201[_0x190ecb(0x1ac)](process[_0x190ecb(0x16a)](),_0x8e8ef2[_0x190ecb(0x201)])||'.';return console[_0x190ecb(0x26f)](a42_0x126119['dim']('\x20\x20Location:\x20'+_0x34f3f1)),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x236)](_0x190ecb(0x25e)+_0x8e8ef2[_0x190ecb(0x2ca)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1a3);[a42_0x45bdeb(0x17f)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a42_0x45bdeb(0x221)](_0x5be968){const _0x44d69c=a42_0x45bdeb,{options:_0x271f5b,args:_0x4412ff,tdx:_0x3193d5}=_0x5be968,_0x37fcaf=this['resolveProjectDir'](_0x4412ff,_0x271f5b),_0x4cde28=_0x271f5b[_0x44d69c(0x1e7)],_0x572c55=_0x271f5b[_0x44d69c(0x212)];_0x271f5b[_0x44d69c(0x1d1)]&&(_0x37fcaf&&console[_0x44d69c(0x26f)](_0x44d69c(0x188)+_0x37fcaf),_0x4cde28&&console[_0x44d69c(0x26f)]('Revision:\x20'+_0x4cde28),_0x271f5b['dryRun']&&console[_0x44d69c(0x26f)](_0x44d69c(0x223)),_0x572c55&&console[_0x44d69c(0x26f)](_0x44d69c(0x205)));let _0x23d5fa;try{_0x23d5fa=await withSpinner('Analyzing\x20changes...',()=>_0x3193d5[_0x44d69c(0x27d)][_0x44d69c(0x2d3)]({'sourceDir':_0x37fcaf,'revision':_0x4cde28,'skipValidation':_0x572c55}),{'verbose':_0x271f5b[_0x44d69c(0x1d1)]});}catch(_0x5a0652){if(_0x5a0652 instanceof Error&&_0x5a0652['message'][_0x44d69c(0x1a4)](_0x44d69c(0x2db)))return console['error'](a42_0x126119['red'](_0x44d69c(0x1af)),_0x44d69c(0x296)),_0x271f5b[_0x44d69c(0x1b9)]?console[_0x44d69c(0x26f)](a42_0x126119[_0x44d69c(0x236)](_0x44d69c(0x247)+_0x271f5b['workflowProject']+_0x44d69c(0x1d0)+_0x271f5b['workflowProject']+'\x27')):console[_0x44d69c(0x26f)](a42_0x126119['dim'](_0x44d69c(0x1ae))),0x1;throw _0x5a0652;}const _0x23a127=_0x23d5fa[_0x44d69c(0x1f2)];console[_0x44d69c(0x26f)](_0x44d69c(0x14f)+_0x23a127[_0x44d69c(0x2ca)]),console[_0x44d69c(0x26f)](_0x44d69c(0x2c8)+_0x23a127['sourceDir']),console[_0x44d69c(0x26f)](_0x44d69c(0x1c9)+_0x23a127[_0x44d69c(0x1e7)]),console[_0x44d69c(0x26f)](_0x44d69c(0x2cd)+a42_0x126119[_0x44d69c(0x16e)]('+'+_0x23a127[_0x44d69c(0x254)]['new']+_0x44d69c(0x1b1))+',\x20'+(a42_0x126119['yellow']('~'+_0x23a127[_0x44d69c(0x254)][_0x44d69c(0x23a)]+'\x20modified')+',\x20')+(a42_0x126119['red']('-'+_0x23a127[_0x44d69c(0x254)]['deleted']+_0x44d69c(0x2b3))+',\x20')+(''+a42_0x126119['dim'](_0x23a127[_0x44d69c(0x254)][_0x44d69c(0x23f)]+'\x20unchanged')));for(const _0x48a822 of _0x23a127['changes']){_0x48a822[_0x44d69c(0x2d2)]===_0x44d69c(0x23a)&&_0x48a822['diff']&&(console[_0x44d69c(0x26f)]('\x0a'+a42_0x126119[_0x44d69c(0x1c4)](_0x44d69c(0x1e0)+_0x48a822[_0x44d69c(0x26a)])),console['error'](_0x48a822['diff']));}if(!_0x23a127[_0x44d69c(0x1b7)])return console[_0x44d69c(0x26f)](a42_0x126119[_0x44d69c(0x16e)](_0x44d69c(0x287))),await this[_0x44d69c(0x20f)](_0x3193d5,_0x23a127[_0x44d69c(0x2ca)],_0x271f5b['site']),0x0;if(_0x271f5b['dryRun'])return console[_0x44d69c(0x26f)](a42_0x126119['yellow'](_0x44d69c(0x172))),0x0;if(!_0x271f5b[_0x44d69c(0x1b0)]){if(!isInteractive())return console[_0x44d69c(0x26f)](a42_0x126119['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x44d69c(0x26f)](a42_0x126119['dim'](_0x44d69c(0x25c))),0x1;const _0x187870=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x187870)return console[_0x44d69c(0x26f)](a42_0x126119['yellow'](_0x44d69c(0x28e)),'-\x20nothing\x20pushed'),0x1;}const _0x4e3982=await withSpinner('Pushing\x20project...',()=>_0x3193d5['workflow'][_0x44d69c(0x165)](_0x23a127),{'verbose':_0x271f5b[_0x44d69c(0x1d1)]}),_0x1d4ae8=_0x4e3982[_0x44d69c(0x1f2)];return console['error'](a42_0x126119[_0x44d69c(0x16e)]('✔\x20Push\x20complete')),console[_0x44d69c(0x26f)](_0x44d69c(0x267)+_0x1d4ae8['projectId']),console[_0x44d69c(0x26f)]('\x20\x20Revision:\x20'+_0x1d4ae8[_0x44d69c(0x1e7)]),await this['showWorkflowConsoleUrl'](_0x3193d5,_0x1d4ae8[_0x44d69c(0x2ca)],_0x271f5b[_0x44d69c(0x259)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]='workflow:clone';[a42_0x45bdeb(0x17f)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a42_0x45bdeb(0x221)](_0x343002){const _0xbc2677=a42_0x45bdeb,{options:_0x2632e2,args:_0x45c851,tdx:_0x4fed29}=_0x343002,_0x4b52a1=this[_0xbc2677(0x2aa)](_0x45c851,_0x2632e2),_0x509f1b=_0x2632e2[_0xbc2677(0x265)],_0x3f23f7=_0x2632e2[_0xbc2677(0x1e7)],_0x5aaf96=_0x2632e2[_0xbc2677(0x212)];if(!_0x4b52a1)return console['error'](a42_0x126119[_0xbc2677(0x2b4)]('Error:'),_0xbc2677(0x150)),console[_0xbc2677(0x26f)](a42_0x126119['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0xbc2677(0x26f)](a42_0x126119['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x509f1b)return console[_0xbc2677(0x26f)](a42_0x126119['red'](_0xbc2677(0x1af)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x236)](_0xbc2677(0x1ff))),0x1;_0x2632e2[_0xbc2677(0x1d1)]&&(console[_0xbc2677(0x26f)](_0xbc2677(0x188)+_0x4b52a1),console[_0xbc2677(0x26f)]('New\x20project\x20name:\x20'+_0x509f1b),_0x3f23f7&&console[_0xbc2677(0x26f)]('Revision:\x20'+_0x3f23f7),_0x2632e2[_0xbc2677(0x1c6)]&&console[_0xbc2677(0x26f)](_0xbc2677(0x223)),_0x5aaf96&&console[_0xbc2677(0x26f)](_0xbc2677(0x205)));const _0x4cb7c2=await withSpinner(_0xbc2677(0x230),()=>_0x4fed29['workflow'][_0xbc2677(0x173)](_0x4b52a1,_0x509f1b,{'revision':_0x3f23f7,'skipValidation':_0x5aaf96}),{'verbose':_0x2632e2[_0xbc2677(0x1d1)]}),_0x22b917=_0x4cb7c2[_0xbc2677(0x1f2)];console['error']('Source:\x20'+_0x22b917[_0xbc2677(0x293)]);_0x22b917[_0xbc2677(0x21b)]&&console[_0xbc2677(0x26f)](_0xbc2677(0x1dd)+_0x22b917[_0xbc2677(0x21b)]);console[_0xbc2677(0x26f)](_0xbc2677(0x168)+_0x22b917[_0xbc2677(0x233)]),console[_0xbc2677(0x26f)](_0xbc2677(0x189)+_0x22b917[_0xbc2677(0x1e7)]),console[_0xbc2677(0x26f)](_0xbc2677(0x2ba)+_0x22b917[_0xbc2677(0x256)]);_0x22b917[_0xbc2677(0x16c)]&&(console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x1ee)]('\x0a⚠\x20Project\x20\x22'+_0x22b917[_0xbc2677(0x233)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x22b917['existingProjectId']+')')),console['error'](a42_0x126119[_0xbc2677(0x1ee)](_0xbc2677(0x156))));if(_0x2632e2[_0xbc2677(0x1c6)])return console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x1ee)](_0xbc2677(0x2c3))),0x0;if(!_0x2632e2[_0xbc2677(0x1b0)]){if(!isInteractive())return console['error'](a42_0x126119[_0xbc2677(0x2b4)]('\x0aError:'),_0xbc2677(0x25b)),console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x236)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x14674d=_0x22b917[_0xbc2677(0x21b)]||a42_0x273201[_0xbc2677(0x2a2)](_0x4b52a1),_0x541bd7=_0x22b917[_0xbc2677(0x16c)]?_0xbc2677(0x160)+_0x509f1b+_0xbc2677(0x19d):_0xbc2677(0x275)+_0x14674d+_0xbc2677(0x178)+_0x509f1b+'\x22?',_0x5c22f9=await confirmKey(_0x541bd7);if(!_0x5c22f9)return console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x1ee)](_0xbc2677(0x28e))),0x1;}const _0x26835a=await withSpinner(_0x22b917[_0xbc2677(0x16c)]?_0xbc2677(0x1c0)+_0x509f1b+_0xbc2677(0x15a):'Cloning\x20to\x20'+_0x509f1b+'...',()=>_0x4fed29[_0xbc2677(0x27d)][_0xbc2677(0x2b0)](_0x22b917),{'verbose':_0x2632e2[_0xbc2677(0x1d1)]}),_0x258e8c=_0x26835a[_0xbc2677(0x1f2)];return console['error'](a42_0x126119[_0xbc2677(0x16e)](_0x22b917[_0xbc2677(0x16c)]?_0xbc2677(0x1ba):'✔\x20Clone\x20complete')),console[_0xbc2677(0x26f)](_0xbc2677(0x2e2)+_0x258e8c['newProjectName']),console[_0xbc2677(0x26f)](_0xbc2677(0x267)+_0x258e8c['newProjectId']),console['error'](_0xbc2677(0x1c9)+_0x258e8c[_0xbc2677(0x1e7)]),await this['showWorkflowConsoleUrl'](_0x4fed29,_0x258e8c[_0xbc2677(0x233)],_0x2632e2[_0xbc2677(0x259)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x159);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x295);async[a42_0x45bdeb(0x221)](_0xee7ebf){const _0x37c394=a42_0x45bdeb,{options:_0x3554b1,args:_0xbbba51,tdx:_0x2a6247}=_0xee7ebf,_0x2a3708=_0xbbba51[0x0];if(!_0x2a3708)return console[_0x37c394(0x26f)](_0x37c394(0x29f)),console[_0x37c394(0x26f)](_0x37c394(0x176)),0x1;_0x3554b1[_0x37c394(0x1d1)]&&console['error'](_0x37c394(0x222)+_0x2a3708);if(!_0x3554b1[_0x37c394(0x1b0)]){if(!isInteractive())return console[_0x37c394(0x26f)](a42_0x126119[_0x37c394(0x2b4)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a42_0x126119[_0x37c394(0x236)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3a1fad=await confirmKey(_0x37c394(0x2df)+_0x2a3708+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3a1fad)return console['error'](a42_0x126119['yellow'](_0x37c394(0x28e))),0x1;}const _0x28952f=await withSpinner('Deleting\x20project\x20'+_0x2a3708+_0x37c394(0x15a),()=>_0x2a6247[_0x37c394(0x27d)][_0x37c394(0x2c4)](_0x2a3708),{'verbose':_0x3554b1[_0x37c394(0x1d1)]}),_0x2a3042=_0x28952f[_0x37c394(0x1f2)];return console[_0x37c394(0x26f)](_0x37c394(0x260)+_0x2a3042[_0x37c394(0x2ca)]),console[_0x37c394(0x26f)](_0x37c394(0x267)+_0x2a3042[_0x37c394(0x2bc)]),0x0;}}export function parseKeyValue(_0x5c1418){const _0x48a76e=a42_0x45bdeb,_0x180477=_0x5c1418[_0x48a76e(0x278)]('=');if(_0x180477===-0x1)throw new Error(_0x48a76e(0x1e2)+_0x5c1418+_0x48a76e(0x145));const _0x59dc03=_0x5c1418['substring'](0x0,_0x180477),_0x56fd80=_0x5c1418[_0x48a76e(0x18e)](_0x180477+0x1);if(!_0x59dc03)throw new Error(_0x48a76e(0x15c));return{'key':_0x59dc03,'value':_0x56fd80};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x2b1);[a42_0x45bdeb(0x17f)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x45bdeb(0x221)](_0x5b628c){const _0x4f721c=a42_0x45bdeb,{options:_0x109363,args:_0x4cc604,tdx:_0x3750e3}=_0x5b628c,_0x3108a3=this[_0x4f721c(0x143)](_0x4cc604,_0x109363);if(!_0x3108a3)return 0x1;_0x109363[_0x4f721c(0x1d1)]&&console[_0x4f721c(0x26f)](_0x4f721c(0x222)+_0x3108a3);const _0x28fd6a=await withSpinner(_0x4f721c(0x1d6),()=>_0x3750e3[_0x4f721c(0x27d)]['listSecrets'](_0x3108a3),{'verbose':_0x109363[_0x4f721c(0x1d1)]}),{secrets:_0x1e4085}=_0x28fd6a[_0x4f721c(0x1f2)];return console[_0x4f721c(0x26f)](_0x4f721c(0x1c8)+_0x1e4085[_0x4f721c(0x252)]+_0x4f721c(0x1a8)+(_0x1e4085['length']!==0x1?'s':'')),await handleSDKOutput(_0x1e4085,_0x109363),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0x45bdeb(0x20d);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x187);async[a42_0x45bdeb(0x221)](_0x9281d3){const _0x8165f3=a42_0x45bdeb,{options:_0x2ad4ae,args:_0x3c38f9,tdx:_0x264a78}=_0x9281d3;let _0x27a71c,_0xe3254b;if(_0x3c38f9['length']>=0x2)_0x27a71c=_0x3c38f9[0x0],_0xe3254b=_0x3c38f9[0x1];else{if(_0x3c38f9['length']===0x1&&_0x2ad4ae[_0x8165f3(0x1b9)])_0x27a71c=_0x2ad4ae[_0x8165f3(0x1b9)],_0xe3254b=_0x3c38f9[0x0];else return _0x3c38f9[_0x8165f3(0x252)]===0x1?(console[_0x8165f3(0x26f)](_0x8165f3(0x15b)),console[_0x8165f3(0x26f)](_0x8165f3(0x289)),0x1):(console[_0x8165f3(0x26f)]('Error:\x20KEY=VALUE\x20is\x20required'),console[_0x8165f3(0x26f)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x16ca2e,_0x26f850;try{({key:_0x16ca2e,value:_0x26f850}=parseKeyValue(_0xe3254b));}catch(_0x24c6b7){return _0x24c6b7 instanceof Error&&console['error'](a42_0x126119['red'](_0x8165f3(0x1af)),_0x24c6b7[_0x8165f3(0x1f4)]),0x1;}_0x2ad4ae['verbose']&&(console[_0x8165f3(0x26f)](_0x8165f3(0x222)+_0x27a71c),console[_0x8165f3(0x26f)](_0x8165f3(0x294)+_0x16ca2e));const _0x2d4a1e=await withSpinner('Setting\x20secret...',()=>_0x264a78[_0x8165f3(0x27d)]['setSecret'](_0x27a71c,_0x16ca2e,_0x26f850),{'verbose':_0x2ad4ae[_0x8165f3(0x1d1)]}),_0x7aed96=_0x2d4a1e[_0x8165f3(0x1f2)];return console[_0x8165f3(0x26f)](_0x8165f3(0x1be)+_0x7aed96[_0x8165f3(0x27a)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x7aed96['projectName']+'\x27'),(_0x2ad4ae[_0x8165f3(0x17a)]||_0x2ad4ae[_0x8165f3(0x1c2)])&&await handleSingleObjectOutput(_0x7aed96,_0x2ad4ae),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x2d8);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x2de);async[a42_0x45bdeb(0x221)](_0x197978){const _0x4e8012=a42_0x45bdeb,{options:_0xc468b3,args:_0x5a5107,tdx:_0xfeb878}=_0x197978;let _0x277f51,_0x2306c3;if(_0x5a5107['length']>=0x2)_0x277f51=_0x5a5107[0x0],_0x2306c3=_0x5a5107[0x1];else{if(_0x5a5107[_0x4e8012(0x252)]===0x1&&_0xc468b3[_0x4e8012(0x1b9)])_0x277f51=_0xc468b3['workflowProject'],_0x2306c3=_0x5a5107[0x0];else return _0x5a5107['length']===0x1?(console[_0x4e8012(0x26f)](_0x4e8012(0x15b)),console[_0x4e8012(0x26f)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x4e8012(0x26f)](_0x4e8012(0x179)),console[_0x4e8012(0x26f)](_0x4e8012(0x1b2)),0x1);}_0xc468b3[_0x4e8012(0x1d1)]&&(console[_0x4e8012(0x26f)]('Project:\x20'+_0x277f51),console[_0x4e8012(0x26f)]('Key:\x20'+_0x2306c3));if(!_0xc468b3[_0x4e8012(0x1b0)]){if(!isInteractive())return console[_0x4e8012(0x26f)](a42_0x126119[_0x4e8012(0x2b4)]('\x0aError:'),_0x4e8012(0x25b)),console[_0x4e8012(0x26f)](a42_0x126119[_0x4e8012(0x236)](_0x4e8012(0x25c))),0x1;const _0x482863=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x2306c3+'\x27\x20from\x20project\x20\x27'+_0x277f51+'\x27?');if(!_0x482863)return console[_0x4e8012(0x26f)](a42_0x126119[_0x4e8012(0x1ee)](_0x4e8012(0x28e))),0x1;}const _0x2e2c65=await withSpinner(_0x4e8012(0x253),()=>_0xfeb878[_0x4e8012(0x27d)]['deleteSecret'](_0x277f51,_0x2306c3),{'verbose':_0xc468b3[_0x4e8012(0x1d1)]}),_0x33a66f=_0x2e2c65['data'];return console[_0x4e8012(0x26f)](_0x4e8012(0x1be)+_0x33a66f[_0x4e8012(0x27a)]+_0x4e8012(0x140)+_0x33a66f['projectName']+'\x27'),(_0xc468b3[_0x4e8012(0x17a)]||_0xc468b3[_0x4e8012(0x1c2)])&&await handleSingleObjectOutput(_0x33a66f,_0xc468b3),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x15bc76){const _0x3f9167=a42_0x45bdeb,_0xde2835=Math[_0x3f9167(0x1f9)](_0x15bc76/0x3e8),_0x49c58a=Math[_0x3f9167(0x1f9)](_0xde2835/0x3c),_0x1adec1=Math[_0x3f9167(0x1f9)](_0x49c58a/0x3c),_0x37b85a=Math[_0x3f9167(0x1f9)](_0x1adec1/0x18);if(_0x37b85a>0x0){const _0xbc3071=_0x1adec1%0x18;return _0xbc3071>0x0?_0x37b85a+'d\x20'+_0xbc3071+'h':_0x37b85a+'d';}else{if(_0x1adec1>0x0){const _0x19e82d=_0x49c58a%0x3c;return _0x19e82d>0x0?_0x1adec1+'h\x20'+_0x19e82d+'m':_0x1adec1+'h';}else{if(_0x49c58a>0x0){const _0x1879f9=_0xde2835%0x3c;return _0x1879f9>0x0?_0x49c58a+'m\x20'+_0x1879f9+'s':_0x49c58a+'m';}else return _0xde2835+'s';}}}function formatTimestamp(_0x3f8ea2,_0x6d6337){const _0x401c51=a42_0x45bdeb,_0x2a3ca5=new Date(_0x3f8ea2),_0x376677=String(_0x2a3ca5[_0x401c51(0x250)]())[_0x401c51(0x17d)](0x2,'0'),_0xf05b65=String(_0x2a3ca5['getMinutes']())[_0x401c51(0x17d)](0x2,'0'),_0x4137b2=_0x376677+':'+_0xf05b65,_0x25a5f5=_0x2a3ca5[_0x401c51(0x245)]()===_0x6d6337[_0x401c51(0x245)]()&&_0x2a3ca5[_0x401c51(0x18b)]()===_0x6d6337[_0x401c51(0x18b)]()&&_0x2a3ca5[_0x401c51(0x1ef)]()===_0x6d6337[_0x401c51(0x1ef)]();if(_0x25a5f5)return _0x4137b2;else{const _0x30f0c4=String(_0x2a3ca5['getMonth']()+0x1)[_0x401c51(0x17d)](0x2,'0'),_0x558b0a=String(_0x2a3ca5['getDate']())[_0x401c51(0x17d)](0x2,'0');return _0x30f0c4+'-'+_0x558b0a+'\x20'+_0x4137b2;}}function formatDate(_0x3aff00){const _0x289239=a42_0x45bdeb,_0x1e0648=_0x3aff00[_0x289239(0x245)](),_0x46024f=String(_0x3aff00[_0x289239(0x18b)]()+0x1)[_0x289239(0x17d)](0x2,'0'),_0x54abaa=String(_0x3aff00[_0x289239(0x1ef)]())[_0x289239(0x17d)](0x2,'0');return _0x1e0648+'-'+_0x46024f+'-'+_0x54abaa;}function getTaskStateIcon(_0x4500b9){const _0x14d880={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x14d880[_0x4500b9]||'⚪';}function getBarChar(_0x3c8b6d){const _0x522b9b=a42_0x45bdeb;return _0x3c8b6d===_0x522b9b(0x26f)||_0x3c8b6d===_0x522b9b(0x24a)?'×':'─';}function getBarColor(_0xa8bdc7){const _0x5565d2=a42_0x45bdeb,_0x9a92a6={'success':a42_0x126119[_0x5565d2(0x16e)],'error':a42_0x126119[_0x5565d2(0x2b4)],'group_error':a42_0x126119['red'],'running':a42_0x126119[_0x5565d2(0x2bd)],'blocked':a42_0x126119[_0x5565d2(0x1ee)],'planned':a42_0x126119[_0x5565d2(0x236)],'canceling':a42_0x126119[_0x5565d2(0x1ee)]};return _0x9a92a6[_0xa8bdc7]||a42_0x126119[_0x5565d2(0x266)];}function parseTaskName(_0xd4640f){const _0x5c25f4=a42_0x45bdeb;let _0x4b36fe=_0xd4640f[_0x5c25f4(0x225)](/^\++/,'');const _0x1e7e72=_0x4b36fe['split']('+'),_0x2e8ca6=_0x1e7e72[_0x5c25f4(0x252)]>0x1?_0x1e7e72[_0x5c25f4(0x252)]-0x2:0x0,_0x37024d=_0x1e7e72[_0x1e7e72[_0x5c25f4(0x252)]-0x1]||_0x4b36fe;return{'level':_0x2e8ca6,'name':'+'+_0x37024d};}function truncateTaskName(_0x40152f,_0xb1f075){const _0x396516=a42_0x45bdeb,_0xd78915=stringWidth(_0x40152f);if(_0xd78915<=_0xb1f075)return _0x40152f;let _0x47eff6=_0x40152f;while(stringWidth(_0x47eff6+'…')>_0xb1f075&&_0x47eff6[_0x396516(0x252)]>0x0){_0x47eff6=_0x47eff6[_0x396516(0x19e)](0x0,-0x1);}return _0x47eff6+'…';}function calculateTimeScale(_0x780e3d,_0x22b047){const _0x1ad1bf=a42_0x45bdeb;return{'startTime':_0x780e3d[_0x1ad1bf(0x25f)],'endTime':_0x780e3d[_0x1ad1bf(0x1f8)],'durationMs':_0x780e3d[_0x1ad1bf(0x1de)],'msPerChar':_0x780e3d[_0x1ad1bf(0x1de)]/_0x22b047};}function timeToPosition(_0xc481af,_0x1658b7,_0x2af27d){const _0x2e21b3=a42_0x45bdeb,_0x331519=_0xc481af-_0x1658b7[_0x2e21b3(0x1eb)],_0x489ac2=Math['floor'](_0x331519/_0x1658b7['msPerChar']);return Math[_0x2e21b3(0x170)](0x0,Math['min'](_0x489ac2,_0x2af27d));}function renderTimeAxis(_0x320630,_0x413f4b){const _0x20ec53=a42_0x45bdeb,_0x35b8fa=Math['min'](TIMELINE_CONFIG[_0x20ec53(0x231)],Math['max'](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x20ec53(0x1f9)](_0x413f4b/TIMELINE_CONFIG[_0x20ec53(0x22f)]))),_0x315c2f=_0x320630[_0x20ec53(0x277)]/(_0x35b8fa-0x1),_0x46ba79=new Date(_0x320630[_0x20ec53(0x1eb)]),_0x2235e3=[];for(let _0x24e299=0x0;_0x24e299<_0x35b8fa;_0x24e299++){const _0xa1fa64=_0x320630[_0x20ec53(0x1eb)]+_0x24e299*_0x315c2f,_0x2dc36c=timeToPosition(_0xa1fa64,_0x320630,_0x413f4b),_0x2ce4c5=formatTimestamp(_0xa1fa64,_0x46ba79);_0x2235e3['push']({'pos':_0x2dc36c,'text':_0x2ce4c5});}const _0x287960=new Array(_0x413f4b)[_0x20ec53(0x19b)]('\x20');let _0x5bc7f0=-0x1;for(const {pos:_0x4fd696,text:_0x5c31c9}of _0x2235e3){let _0x2b8650=Math[_0x20ec53(0x170)](0x0,_0x4fd696-Math[_0x20ec53(0x1f9)](_0x5c31c9['length']/0x2));_0x2b8650<=_0x5bc7f0+TIMELINE_CONFIG[_0x20ec53(0x273)]&&(_0x2b8650=_0x5bc7f0+TIMELINE_CONFIG[_0x20ec53(0x273)]+0x1);_0x2b8650+_0x5c31c9[_0x20ec53(0x252)]>_0x413f4b&&(_0x2b8650=_0x413f4b-_0x5c31c9[_0x20ec53(0x252)]);if(_0x2b8650>=0x0&&_0x2b8650+_0x5c31c9[_0x20ec53(0x252)]<=_0x413f4b&&_0x2b8650>_0x5bc7f0){for(let _0x1a24d4=0x0;_0x1a24d4<_0x5c31c9[_0x20ec53(0x252)];_0x1a24d4++){_0x287960[_0x2b8650+_0x1a24d4]=_0x5c31c9[_0x1a24d4];}_0x5bc7f0=_0x2b8650+_0x5c31c9[_0x20ec53(0x252)]-0x1;}}return _0x287960[_0x20ec53(0x2ae)]('');}function renderTaskRow(_0x24f5dd,_0x2ea7cf,_0x440e82,_0x569231){const _0x4fb7ec=a42_0x45bdeb,{level:_0x5d6734,name:_0x56238e}=parseTaskName(_0x24f5dd[_0x4fb7ec(0x265)]),_0x26598b='\x20'[_0x4fb7ec(0x154)](_0x5d6734),_0x196e08=_0x24f5dd['window']?'('+formatElapsed(_0x24f5dd[_0x4fb7ec(0x16d)][_0x4fb7ec(0x1de)])+')':'',_0x3b16ca=stringWidth(_0x196e08),_0x3fc698=_0x5d6734*0x1,_0x2a1703=_0x569231-_0x3fc698-_0x3b16ca-0x1,_0x35cbe4=truncateTaskName(_0x56238e,_0x2a1703),_0x3de715=_0x26598b+_0x35cbe4,_0x38d210=stringWidth(_0x3de715),_0x130a41=_0x569231-_0x38d210-_0x3b16ca,_0x3224d9=_0x3de715+'\x20'[_0x4fb7ec(0x154)](Math[_0x4fb7ec(0x170)](0x1,_0x130a41))+a42_0x126119[_0x4fb7ec(0x236)](_0x196e08),_0x1608a0=getTaskStateIcon(_0x24f5dd[_0x4fb7ec(0x28a)]),_0x5bf4bc=new Array(_0x440e82)[_0x4fb7ec(0x19b)]('\x20');if(_0x24f5dd[_0x4fb7ec(0x16d)]){const _0x257338=timeToPosition(_0x24f5dd[_0x4fb7ec(0x16d)]['start'],_0x2ea7cf,_0x440e82),_0x10ca09=timeToPosition(_0x24f5dd[_0x4fb7ec(0x16d)][_0x4fb7ec(0x1f8)],_0x2ea7cf,_0x440e82),_0x2b5833=getBarChar(_0x24f5dd[_0x4fb7ec(0x28a)]),_0x12809b=Math[_0x4fb7ec(0x170)](_0x257338+0x1,_0x10ca09);for(let _0x3dd589=_0x257338;_0x3dd589<Math['min'](_0x12809b,_0x440e82);_0x3dd589++){_0x5bf4bc[_0x3dd589]=_0x2b5833;}}const _0x38148b=getBarColor(_0x24f5dd[_0x4fb7ec(0x28a)]),_0x2eae22=_0x5bf4bc[_0x4fb7ec(0x1b5)](_0x25a766=>_0x25a766==='\x20'?'\x20':_0x38148b(_0x25a766))[_0x4fb7ec(0x2ae)]('');return _0x1608a0+'\x20'+_0x3224d9+'│'+_0x2eae22+'│';}function calculateStats(_0x28b756){const _0x312c7f=a42_0x45bdeb,_0x4b0878={'total':_0x28b756[_0x312c7f(0x252)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x21eba3 of _0x28b756){if(_0x21eba3['state']===_0x312c7f(0x18f))_0x4b0878['success']++;else{if(_0x21eba3[_0x312c7f(0x28a)]===_0x312c7f(0x26f)||_0x21eba3[_0x312c7f(0x28a)]===_0x312c7f(0x24a))_0x4b0878[_0x312c7f(0x26f)]++;else _0x21eba3[_0x312c7f(0x28a)]===_0x312c7f(0x2d7)?_0x4b0878['running']++:_0x4b0878['pending']++;}}return _0x4b0878;}function formatStats(_0x26384e){const _0x497d5=a42_0x45bdeb;return[_0x497d5(0x198)+_0x26384e[_0x497d5(0x1d2)],'✅\x20'+_0x26384e['success'],'❌\x20'+_0x26384e[_0x497d5(0x26f)],_0x497d5(0x288)+_0x26384e[_0x497d5(0x2d7)],'⏳\x20'+_0x26384e[_0x497d5(0x149)]][_0x497d5(0x2ae)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0x45bdeb(0x1dc);[a42_0x45bdeb(0x17f)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a42_0x45bdeb(0x221)](_0x480aea){const _0x4383a8=a42_0x45bdeb,{options:_0x2e3e8a,args:_0x417cc4,tdx:_0x24e219}=_0x480aea;let _0x10764c,_0x470a49,_0x1be946=![];if(_0x417cc4[0x0]){if(_0x417cc4[0x0][_0x4383a8(0x1a4)]('.')){const _0x3c3d72=this[_0x4383a8(0x29e)](_0x417cc4,_0x2e3e8a);if(!_0x3c3d72)return 0x1;_0x10764c=_0x3c3d72[_0x4383a8(0x2ca)],_0x470a49=_0x3c3d72['workflowName'];}else{_0x470a49=_0x417cc4[0x0],_0x10764c=_0x2e3e8a[_0x4383a8(0x1b9)];if(!_0x10764c)return console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x2b4)](_0x4383a8(0x1af)),_0x4383a8(0x2c5)),0x1;_0x1be946=!![];}}else{const _0x41e939=this['parseProjectWorkflowPattern'](_0x417cc4,_0x2e3e8a);if(!_0x41e939)return 0x1;_0x10764c=_0x41e939[_0x4383a8(0x2ca)],_0x470a49=_0x41e939[_0x4383a8(0x27b)];}if(_0x2e3e8a[_0x4383a8(0x1d1)]){if(_0x10764c&&_0x470a49)console[_0x4383a8(0x26f)]('Filter:\x20'+_0x10764c+'.'+_0x470a49);else _0x10764c&&console[_0x4383a8(0x26f)](_0x4383a8(0x202)+_0x10764c);}const _0x48d758=_0x2e3e8a[_0x4383a8(0x251)],_0x5025ce=_0x2e3e8a[_0x4383a8(0x224)];if(_0x48d758){_0x5025ce&&console['error'](a42_0x126119[_0x4383a8(0x1ee)](_0x4383a8(0x291)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x276777=_0x2e3e8a[_0x4383a8(0x2af)];return _0x276777?await this['pollTimeline'](_0x480aea,_0x48d758):await this['renderSingleTimeline'](_0x480aea,_0x48d758,_0x2e3e8a),0x0;}if(_0x5025ce){const _0x3b3478=await withSpinner(_0x4383a8(0x229),()=>_0x24e219[_0x4383a8(0x27d)][_0x4383a8(0x248)]({'projectName':_0x10764c,'workflowName':_0x470a49,'limit':0x64}),{'verbose':_0x2e3e8a[_0x4383a8(0x1d1)]}),_0x413b76=_0x3b3478[_0x4383a8(0x1f2)]['find'](_0x3a5693=>_0x3a5693['id']===_0x5025ce);if(!_0x413b76)return console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x2b4)]('Error:'),_0x4383a8(0x281)+_0x5025ce),0x1;if(!_0x413b76[_0x4383a8(0x1f7)]?.['id'])return console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x2b4)]('Error:'),_0x4383a8(0x232)+_0x5025ce+_0x4383a8(0x17b)),0x1;const _0x5d5d0e=_0x413b76[_0x4383a8(0x1f7)]['id'];_0x2e3e8a[_0x4383a8(0x1d1)]&&console[_0x4383a8(0x26f)](_0x4383a8(0x2b2)+_0x5d5d0e+_0x4383a8(0x235)+_0x5025ce);const _0x199908=_0x2e3e8a['follow'];return _0x199908?await this[_0x4383a8(0x18a)](_0x480aea,_0x5d5d0e):await this[_0x4383a8(0x28c)](_0x480aea,_0x5d5d0e,_0x2e3e8a),0x0;}const _0x4eeaf4=await withSpinner(_0x4383a8(0x262),()=>_0x24e219[_0x4383a8(0x27d)][_0x4383a8(0x248)]({'projectName':_0x10764c,'workflowName':_0x470a49,'limit':_0x2e3e8a[_0x4383a8(0x27f)]||0x32}),{'verbose':_0x2e3e8a[_0x4383a8(0x1d1)]}),_0x3fc232=_0x4eeaf4[_0x4383a8(0x1f2)];if(_0x3fc232['length']===0x0){if(_0x10764c&&_0x470a49)console[_0x4383a8(0x26f)](_0x4383a8(0x13f)+_0x10764c+'.'+_0x470a49);else _0x10764c?console['error']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x10764c):(console[_0x4383a8(0x26f)](_0x4383a8(0x2be)),console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x236)](_0x4383a8(0x268))));return 0x0;}_0x3fc232[_0x4383a8(0x21c)]((_0x23e366,_0x378b47)=>{const _0x2c2acf=_0x4383a8,_0x3e3f2a=_0x23e366[_0x2c2acf(0x2b5)]||'',_0x382317=_0x378b47[_0x2c2acf(0x2b5)]||'';return _0x382317['localeCompare'](_0x3e3f2a);});if(_0x2e3e8a[_0x4383a8(0x17a)]||_0x2e3e8a[_0x4383a8(0x1c2)])return await handleSDKOutput(_0x3fc232,_0x2e3e8a),0x0;let _0x4df6cc;if(_0x1be946){const _0x11fac6=_0x3fc232[0x0];if(!_0x11fac6[_0x4383a8(0x1f7)]?.['id'])return console[_0x4383a8(0x26f)](_0x4383a8(0x2ce)),0x0;_0x4df6cc=_0x11fac6[_0x4383a8(0x1f7)]['id'],_0x2e3e8a[_0x4383a8(0x1d1)]&&console[_0x4383a8(0x26f)](_0x4383a8(0x1b4)+_0x11fac6['sessionTime']);}else{const _0x17e543=_0x3fc232[_0x4383a8(0x1b5)](_0x4052c4=>{const _0x273671=_0x4383a8,_0x305806=getAttemptStatusDisplay(_0x4052c4[_0x273671(0x1f7)]);return{'title':_0x4052c4[_0x273671(0x2cc)]?.[_0x273671(0x265)]+'.'+_0x4052c4[_0x273671(0x27d)]?.[_0x273671(0x265)]+_0x273671(0x27e)+_0x4052c4[_0x273671(0x2b5)]+'\x20'+_0x305806[_0x273671(0x22d)],'value':_0x4052c4[_0x273671(0x1f7)]?.['id']||'','description':_0x305806[_0x273671(0x280)]};}),_0xb435aa=await a42_0x430795({'type':_0x4383a8(0x1b8),'name':_0x4383a8(0x251),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x17e543['filter'](_0x1540c3=>_0x1540c3[_0x4383a8(0x175)]!=='')});if(!_0xb435aa[_0x4383a8(0x251)])return 0x0;_0x4df6cc=_0xb435aa['attemptId'];}const _0x4e41b5=_0x2e3e8a[_0x4383a8(0x2af)];return _0x4e41b5?await this[_0x4383a8(0x18a)](_0x480aea,_0x4df6cc):await this['renderSingleTimeline'](_0x480aea,_0x4df6cc,_0x2e3e8a),0x0;}async['renderSingleTimeline'](_0x1bcbbc,_0x774960,_0xa17574){const _0x3d997a=a42_0x45bdeb,{tdx:_0x39ce14}=_0x1bcbbc;let _0x56d53e,_0x13d0f9;try{[_0x56d53e,_0x13d0f9]=await Promise[_0x3d997a(0x2cb)]([_0x39ce14['workflow'][_0x3d997a(0x157)](_0x774960),_0x39ce14['workflow']['tasks'](_0x774960,![])]);}catch(_0x41c464){console[_0x3d997a(0x26f)](a42_0x126119[_0x3d997a(0x2b4)](_0x3d997a(0x206)));_0xa17574[_0x3d997a(0x1d1)]&&console['error'](_0x41c464);throw _0x41c464;}if(_0xa17574[_0x3d997a(0x17a)]||_0xa17574[_0x3d997a(0x1c2)]){const _0x29e751=this[_0x3d997a(0x24f)](_0x56d53e,_0x13d0f9);await handleSDKOutput([_0x29e751],_0xa17574);return;}const _0x229bda=_0x39ce14[_0x3d997a(0x16b)][_0x3d997a(0x259)],_0x282187=this['renderTimeline'](_0x56d53e,_0x13d0f9,_0x229bda);console[_0x3d997a(0x2c2)](_0x282187);}async[a42_0x45bdeb(0x18a)](_0x18652b,_0x125225){const _0x554af7=a42_0x45bdeb,{tdx:_0x50e1e9}=_0x18652b,_0x45548e=TIMELINE_CONFIG[_0x554af7(0x246)],_0x11f1c1=TIMELINE_CONFIG[_0x554af7(0x166)];let _0x17d2a7=0x0;while(_0x17d2a7<_0x11f1c1){process[_0x554af7(0x2d0)][_0x554af7(0x270)]&&process['stdout']['write']('\x1bc');let _0x376ecb,_0x178cfe;try{[_0x376ecb,_0x178cfe]=await Promise['all']([_0x50e1e9[_0x554af7(0x27d)][_0x554af7(0x157)](_0x125225),_0x50e1e9[_0x554af7(0x27d)][_0x554af7(0x158)](_0x125225,![])]);}catch(_0x1a1f6e){console[_0x554af7(0x26f)](a42_0x126119['red'](_0x554af7(0x1d3)));_0x17d2a7>0x0&&console[_0x554af7(0x26f)](a42_0x126119[_0x554af7(0x236)](_0x554af7(0x237)+_0x17d2a7));throw _0x1a1f6e;}const _0x33c9e8=_0x50e1e9[_0x554af7(0x16b)][_0x554af7(0x259)],_0x3593ee=this[_0x554af7(0x285)](_0x376ecb,_0x178cfe,_0x33c9e8);console[_0x554af7(0x2c2)](_0x3593ee);const _0x184749=_0x376ecb['done']&&_0x178cfe[_0x554af7(0x213)](_0x21ee92=>_0x21ee92['state']!==_0x554af7(0x2d7)&&_0x21ee92[_0x554af7(0x28a)]!==_0x554af7(0x2ac));if(_0x184749){console[_0x554af7(0x26f)](a42_0x126119[_0x554af7(0x16e)](_0x554af7(0x226)));break;}console['error'](a42_0x126119['dim'](_0x554af7(0x1a5)+_0x17d2a7*0x2+_0x554af7(0x2ab))),await new Promise(_0x51c45d=>setTimeout(_0x51c45d,_0x45548e)),_0x17d2a7++;}_0x17d2a7>=_0x11f1c1&&console[_0x554af7(0x26f)](a42_0x126119['yellow']('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0x45bdeb(0x285)](_0x1c2788,_0x3c5d93,_0x2536b5){const _0x382e53=a42_0x45bdeb,_0x54a325=[],_0x2da013=TIMELINE_CONFIG[_0x382e53(0x27c)],_0x1d05fd=0x5,_0x1e33ac=process[_0x382e53(0x2d0)]['columns']||0x78,_0x3da0f1=_0x1e33ac-_0x2da013-_0x1d05fd,_0x336da8=Math[_0x382e53(0x170)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x382e53(0x162)](_0x3da0f1,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x54e75a=new Date(_0x1c2788[_0x382e53(0x15d)])[_0x382e53(0x24d)](),_0x18ad49=_0x1c2788[_0x382e53(0x1db)]?new Date(_0x1c2788[_0x382e53(0x1db)])[_0x382e53(0x24d)]():Date[_0x382e53(0x1da)](),_0x1c6634={'start':_0x54e75a,'end':_0x18ad49,'duration':_0x18ad49-_0x54e75a},_0x190375=new Map(),_0x35c072=[];for(const _0x5da70e of _0x3c5d93){if(_0x5da70e[_0x382e53(0x211)]){const _0x5dd431=new Date(_0x5da70e[_0x382e53(0x211)])[_0x382e53(0x24d)](),_0x276751=_0x5da70e[_0x382e53(0x1fe)]?new Date(_0x5da70e['updatedAt'])[_0x382e53(0x24d)]():Date[_0x382e53(0x1da)](),_0x682b2a={'start':_0x5dd431,'end':_0x276751,'duration':_0x276751-_0x5dd431};_0x190375['set'](_0x5da70e['id'],_0x682b2a),_0x35c072['push']({'name':_0x5da70e[_0x382e53(0x1ed)],'state':_0x5da70e['state']||_0x382e53(0x196),'window':_0x682b2a});}else _0x35c072[_0x382e53(0x2c9)]({'name':_0x5da70e[_0x382e53(0x1ed)],'state':_0x5da70e[_0x382e53(0x28a)]||_0x382e53(0x2ac),'window':undefined});}_0x35c072[_0x382e53(0x21c)]((_0x18a8c3,_0x811936)=>{const _0xff5507=_0x382e53;if(!_0x18a8c3[_0xff5507(0x16d)])return 0x1;if(!_0x811936[_0xff5507(0x16d)])return-0x1;return _0x18a8c3[_0xff5507(0x16d)]['start']-_0x811936[_0xff5507(0x16d)][_0xff5507(0x25f)];});const _0x49ef4d=_0x35c072[_0x382e53(0x252)],_0x201bac=_0x49ef4d>TIMELINE_CONFIG[_0x382e53(0x144)];_0x201bac&&_0x35c072['splice'](TIMELINE_CONFIG[_0x382e53(0x144)]);const _0x126a64=calculateTimeScale(_0x1c6634,_0x336da8),_0x418c72=_0x1c2788[_0x382e53(0x1ad)]?_0x1c2788[_0x382e53(0x18f)]?a42_0x126119['green'](_0x382e53(0x18f)):a42_0x126119['red'](_0x382e53(0x26f)):a42_0x126119[_0x382e53(0x2bd)](_0x382e53(0x2d7)),_0x181c49=_0x1c2788[_0x382e53(0x2cc)]?.['id'],_0x21e6d9=_0x1c2788[_0x382e53(0x224)];let _0x47a7d4;if(_0x181c49&&_0x21e6d9){const _0x5c01a2=getWorkflowAttemptUrl(_0x2536b5,_0x181c49,_0x21e6d9,_0x1c2788['id']);_0x47a7d4=hyperlink(a42_0x126119['dim'](_0x1c2788['id']),_0x5c01a2);}else _0x47a7d4=a42_0x126119[_0x382e53(0x236)](_0x1c2788['id']);_0x54a325['push'](_0x382e53(0x1c3)+_0x47a7d4+'\x20-\x20'+_0x418c72+_0x382e53(0x27e)+formatElapsed(_0x1c6634[_0x382e53(0x1de)]));if(_0x35c072['length']>0x0){const _0x3d6c83=renderTimeAxis(_0x126a64,_0x336da8),_0xaa1c16=new Date(_0x1c6634[_0x382e53(0x25f)]),_0x5ac99b=formatDate(_0xaa1c16),_0x29ab80=TIMELINE_CONFIG[_0x382e53(0x28b)]+TIMELINE_CONFIG[_0x382e53(0x272)]+_0x2da013,_0x57f157=_0x5ac99b[_0x382e53(0x17d)](_0x29ab80),_0x160244=a42_0x126119[_0x382e53(0x236)](_0x57f157);_0x54a325[_0x382e53(0x2c9)](_0x160244+'\x20'+_0x3d6c83);for(const _0x1dfe49 of _0x35c072){_0x54a325[_0x382e53(0x2c9)](renderTaskRow(_0x1dfe49,_0x126a64,_0x336da8,_0x2da013));}const _0x528e83=calculateStats(_0x35c072);_0x54a325[_0x382e53(0x2c9)](formatStats(_0x528e83)),_0x201bac&&_0x54a325[_0x382e53(0x2c9)](a42_0x126119['yellow'](_0x382e53(0x186)+TIMELINE_CONFIG[_0x382e53(0x144)]+_0x382e53(0x1e5)+_0x49ef4d+_0x382e53(0x2d6))),_0x54a325[_0x382e53(0x2c9)](''),_0x54a325[_0x382e53(0x2c9)](a42_0x126119['dim'](_0x382e53(0x17c))+('tdx\x20wf\x20attempt\x20'+_0x1c2788['id']+_0x382e53(0x14b))+a42_0x126119['dim'](_0x382e53(0x242)));}else _0x54a325[_0x382e53(0x2c9)](_0x382e53(0x2dc));return _0x54a325['join']('\x0a');}['buildTimelineData'](_0x4174fc,_0x49771f){const _0x425618=a42_0x45bdeb,_0x24201d=new Date(_0x4174fc[_0x425618(0x15d)])[_0x425618(0x24d)](),_0xc7227b=_0x4174fc[_0x425618(0x1db)]?new Date(_0x4174fc[_0x425618(0x1db)])[_0x425618(0x24d)]():Date[_0x425618(0x1da)](),_0x361ddd=_0xc7227b-_0x24201d,_0x4095ff=[];for(const _0x20c09e of _0x49771f){if(_0x20c09e[_0x425618(0x211)]){const _0x30c01d=new Date(_0x20c09e['startedAt'])[_0x425618(0x24d)](),_0x321606=_0x20c09e['updatedAt']?new Date(_0x20c09e[_0x425618(0x1fe)])[_0x425618(0x24d)]():Date[_0x425618(0x1da)]();_0x4095ff[_0x425618(0x2c9)]({'name':_0x20c09e['fullName'],'state':_0x20c09e[_0x425618(0x28a)]||_0x425618(0x196),'window':{'start':_0x30c01d,'end':_0x321606,'duration':_0x321606-_0x30c01d}});}else _0x4095ff[_0x425618(0x2c9)]({'name':_0x20c09e[_0x425618(0x1ed)],'state':_0x20c09e[_0x425618(0x28a)]||_0x425618(0x2ac),'window':undefined});}const _0x35afa7=calculateStats(_0x4095ff);return{'attempt':{'id':_0x4174fc['id'],'status':_0x4174fc['done']?_0x4174fc[_0x425618(0x18f)]?_0x425618(0x18f):_0x425618(0x26f):_0x425618(0x2d7),'createdAt':_0x4174fc['createdAt'],'finishedAt':_0x4174fc['finishedAt'],'duration_ms':_0x361ddd},'tasks':_0x4095ff[_0x425618(0x1b5)](_0x3b2153=>({'name':_0x3b2153[_0x425618(0x265)],'state':_0x3b2153[_0x425618(0x28a)],'startedAt':_0x3b2153[_0x425618(0x16d)]?new Date(_0x3b2153[_0x425618(0x16d)][_0x425618(0x25f)])[_0x425618(0x2d5)]():null,'updatedAt':_0x3b2153[_0x425618(0x16d)]?new Date(_0x3b2153[_0x425618(0x16d)][_0x425618(0x1f8)])['toISOString']():null,'duration_ms':_0x3b2153[_0x425618(0x16d)]?.[_0x425618(0x1de)]||null})),'stats':_0x35afa7};}}
1
+ const a42_0x1c1cea=a42_0x3081;(function(_0x1006c6,_0x3e24d5){const _0x18ef44=a42_0x3081,_0x4186f9=_0x1006c6();while(!![]){try{const _0x273189=-parseInt(_0x18ef44(0x300))/0x1+parseInt(_0x18ef44(0x2bc))/0x2*(parseInt(_0x18ef44(0x2a3))/0x3)+parseInt(_0x18ef44(0x239))/0x4+-parseInt(_0x18ef44(0x21e))/0x5*(-parseInt(_0x18ef44(0x1a6))/0x6)+-parseInt(_0x18ef44(0x2be))/0x7*(parseInt(_0x18ef44(0x269))/0x8)+parseInt(_0x18ef44(0x1fd))/0x9+-parseInt(_0x18ef44(0x24c))/0xa;if(_0x273189===_0x3e24d5)break;else _0x4186f9['push'](_0x4186f9['shift']());}catch(_0x3f3513){_0x4186f9['push'](_0x4186f9['shift']());}}}(a42_0x11c0,0x4c4d1));import a42_0x3b83e4 from'chalk';import{existsSync}from'fs';import a42_0x17a291 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x399419 from'prompts';function getAttemptStatusDisplay(_0x2fe5e8){const _0x5236a7=a42_0x3081;if(!_0x2fe5e8)return{'icon':'⏳','text':''};const {done:_0x2fb8bd,success:_0x3634c6,cancelRequested:_0x48b985}=_0x2fe5e8;if(!_0x2fb8bd)return _0x48b985?{'icon':'🛑','text':a42_0x3b83e4[_0x5236a7(0x1c3)](_0x5236a7(0x277))}:{'icon':'🔄','text':a42_0x3b83e4[_0x5236a7(0x2d2)]('running')};if(_0x3634c6)return{'icon':'✅','text':a42_0x3b83e4[_0x5236a7(0x185)](_0x5236a7(0x310))};return{'icon':'❌','text':a42_0x3b83e4['red']('error')};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x1c1cea(0x302)](_0x1c81c3,_0x109f40,_0x4b395f=0x0){const _0x4f48d3=a42_0x1c1cea;return _0x1c81c3[_0x4b395f]||_0x109f40[_0x4f48d3(0x26e)];}['requireProject'](_0x3ec886,_0x39511b,_0x48e716=0x0){const _0x141da3=a42_0x1c1cea,_0x4b8b6e=this[_0x141da3(0x302)](_0x3ec886,_0x39511b,_0x48e716);if(!_0x4b8b6e)return console[_0x141da3(0x30f)](a42_0x3b83e4['red'](_0x141da3(0x212)),'Project\x20name\x20is\x20required'),console['error'](a42_0x3b83e4[_0x141da3(0x24a)](_0x141da3(0x263))),null;return _0x4b8b6e;}[a42_0x1c1cea(0x1bd)](_0x3bc232,_0x1e9598){const _0x4c354e=a42_0x1c1cea;if(_0x3bc232[0x0]){const _0x3cd796=_0x3bc232[0x0][_0x4c354e(0x197)]('.');if(_0x3cd796[_0x4c354e(0x177)]===0x1)return{'projectName':_0x3cd796[0x0],'workflowName':undefined};else return _0x3cd796['length']===0x2?{'projectName':_0x3cd796[0x0],'workflowName':_0x3cd796[0x1]}:(console['error'](a42_0x3b83e4[_0x4c354e(0x305)](_0x4c354e(0x212)),_0x4c354e(0x16e)),null);}return{'projectName':_0x1e9598[_0x4c354e(0x26e)],'workflowName':undefined};}['resolveProjectDir'](_0x9967f0,_0x369a8f,_0x2f238b=0x0){const _0x5146cf=a42_0x1c1cea;if(_0x9967f0[_0x2f238b])return _0x9967f0[_0x2f238b];if(_0x369a8f['workflowProject']){const _0x186e56=a42_0x17a291[_0x5146cf(0x1d9)](process[_0x5146cf(0x1e6)](),_0x5146cf(0x2b7),_0x369a8f[_0x5146cf(0x26e)]);if(existsSync(a42_0x17a291[_0x5146cf(0x1d9)](_0x186e56,_0x5146cf(0x281))))return _0x186e56;}return undefined;}async[a42_0x1c1cea(0x1ed)](_0x4990fd,_0x33c742,_0x191ef4){const _0x109676=a42_0x1c1cea;try{const _0x29d82f=await _0x4990fd['workflow'][_0x109676(0x2b7)](_0x33c742,{'limit':0x1});if(_0x29d82f[_0x109676(0x177)]>0x0){const _0x5d275c=_0x29d82f[0x0]['id'],_0xa8750a=getWorkflowUrl(_0x191ef4,_0x5d275c);console[_0x109676(0x30f)](_0x109676(0x25c)+a42_0x3b83e4[_0x109676(0x1c8)](_0xa8750a));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0x1c1cea(0x160);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x27d);async[a42_0x1c1cea(0x2fd)](_0x254d33){const _0x3a6c44=a42_0x1c1cea,{options:_0x409f82,args:_0x2cb473,tdx:_0x5a4070}=_0x254d33,_0x5aba88=_0x2cb473[0x0],_0x4d9cce=_0x409f82[_0x3a6c44(0x19e)];if(_0x4d9cce)return saveSessionContext({'workflow_project':undefined},_0x409f82[_0x3a6c44(0x25e)]),console['log'](a42_0x3b83e4[_0x3a6c44(0x185)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x5aba88)return console[_0x3a6c44(0x30f)](a42_0x3b83e4[_0x3a6c44(0x305)](_0x3a6c44(0x212)),_0x3a6c44(0x235)),console['error'](a42_0x3b83e4[_0x3a6c44(0x24a)](_0x3a6c44(0x27e))),console['error'](a42_0x3b83e4[_0x3a6c44(0x24a)](_0x3a6c44(0x299))),0x1;const _0x4e2d3c=await withSpinner(_0x3a6c44(0x2b9)+_0x5aba88+'\x27...',()=>_0x5a4070['workflow'][_0x3a6c44(0x26a)](_0x5aba88),{'verbose':_0x409f82[_0x3a6c44(0x304)]}),{name:_0x190f2b}=_0x4e2d3c[_0x3a6c44(0x17b)];return saveSessionContext({'workflow_project':_0x190f2b},_0x409f82[_0x3a6c44(0x25e)]),console[_0x3a6c44(0x167)](a42_0x3b83e4['green'](_0x3a6c44(0x228)+a42_0x3b83e4[_0x3a6c44(0x1c8)](_0x190f2b))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x22e);['description']=a42_0x1c1cea(0x1c9);async[a42_0x1c1cea(0x2fd)](_0x319cba){const _0xab07b2=a42_0x1c1cea,{options:_0x14c9b2,args:_0x381151,tdx:_0x43ea86}=_0x319cba,_0x37b9ca=_0x381151[0x0];_0x14c9b2[_0xab07b2(0x304)]&&_0x37b9ca&&console[_0xab07b2(0x30f)](_0xab07b2(0x2de)+_0x37b9ca);const _0xb46b64=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x43ea86[_0xab07b2(0x2fe)][_0xab07b2(0x2f3)](_0x37b9ca,{'limit':_0x14c9b2[_0xab07b2(0x2f1)]}),{'verbose':_0x14c9b2[_0xab07b2(0x304)]});let _0x2f0dc6=_0xb46b64[_0xab07b2(0x17b)];_0x2f0dc6[_0xab07b2(0x2d8)]((_0x3c2c8e,_0x575b56)=>_0x3c2c8e[_0xab07b2(0x19b)]['localeCompare'](_0x575b56['name']));const _0x24721a=_0x14c9b2[_0xab07b2(0x2f1)]||0x64,_0x4b6765=_0x2f0dc6[_0xab07b2(0x177)]>=_0x24721a?a42_0x3b83e4[_0xab07b2(0x24a)](_0xab07b2(0x1d7)):'';console[_0xab07b2(0x30f)](_0xab07b2(0x2fa)+_0x2f0dc6[_0xab07b2(0x177)]+_0xab07b2(0x278)+(_0x2f0dc6[_0xab07b2(0x177)]!==0x1?'s':'')+_0x4b6765);if(_0x14c9b2[_0xab07b2(0x2b1)]===_0xab07b2(0x27a)||_0x14c9b2[_0xab07b2(0x2b1)]===_0xab07b2(0x18a)||_0x14c9b2[_0xab07b2(0x2b1)]===_0xab07b2(0x293))await handleSDKOutput(_0x2f0dc6,_0x14c9b2);else{if(_0x2f0dc6[_0xab07b2(0x177)]===0x0)_0x37b9ca?console[_0xab07b2(0x167)](_0xab07b2(0x20a)+_0x37b9ca):console[_0xab07b2(0x167)](_0xab07b2(0x27b));else{const _0x1ccdf6=_0x2f0dc6[_0xab07b2(0x2aa)](_0xc8a016=>{const _0x353c67=_0xab07b2,_0x1bc76a=_0xc8a016['metadata']?.[_0x353c67(0x161)](_0x4c2245=>_0x4c2245[_0x353c67(0x22f)]===_0x353c67(0x1ae)),_0xe62ca8=_0x1bc76a?a42_0x3b83e4[_0x353c67(0x24a)](_0x353c67(0x1ad)):'';return _0x353c67(0x30a)+_0xc8a016[_0x353c67(0x19b)]+_0xe62ca8;});await writeOutput(_0x1ccdf6[_0xab07b2(0x1d9)]('\x0a'),_0x14c9b2[_0xab07b2(0x2bd)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a42_0x1c1cea(0x2ab);[a42_0x1c1cea(0x181)]='List\x20workflows';async[a42_0x1c1cea(0x2fd)](_0x2dfbac){const _0x4b366c=a42_0x1c1cea,{options:_0x417574,args:_0x38f08a,tdx:_0x190603}=_0x2dfbac,_0x26c4ff=this[_0x4b366c(0x302)](_0x38f08a,_0x417574);_0x417574[_0x4b366c(0x304)]&&_0x26c4ff&&console[_0x4b366c(0x30f)](_0x4b366c(0x211)+_0x26c4ff);const _0x3fd92f=await withSpinner(_0x4b366c(0x2f2),()=>_0x190603[_0x4b366c(0x2fe)][_0x4b366c(0x2b7)](_0x26c4ff,{'limit':_0x417574['limit']}),{'verbose':_0x417574['verbose']});let _0x48531a=_0x3fd92f[_0x4b366c(0x17b)];_0x48531a[_0x4b366c(0x2d8)]((_0x3a8864,_0x2dc42c)=>{const _0x56794d=_0x4b366c,_0x11ee09=_0x3a8864[_0x56794d(0x19b)][_0x56794d(0x2d4)](_0x2dc42c[_0x56794d(0x19b)]);if(_0x11ee09!==0x0)return _0x11ee09;return(_0x3a8864[_0x56794d(0x250)]?.[_0x56794d(0x19b)]||'')[_0x56794d(0x2d4)](_0x2dc42c[_0x56794d(0x250)]?.[_0x56794d(0x19b)]||'');});const _0x4dd6ec=_0x417574['limit']||0x64,_0x29d84f=_0x48531a[_0x4b366c(0x177)]>=_0x4dd6ec?a42_0x3b83e4[_0x4b366c(0x24a)](_0x4b366c(0x1d7)):'';console[_0x4b366c(0x30f)](_0x4b366c(0x2fa)+_0x48531a[_0x4b366c(0x177)]+_0x4b366c(0x22d)+(_0x48531a['length']!==0x1?'s':'')+_0x29d84f);if(_0x417574['format']===_0x4b366c(0x27a)||_0x417574[_0x4b366c(0x2b1)]===_0x4b366c(0x18a)||_0x417574[_0x4b366c(0x2b1)]===_0x4b366c(0x293))await handleSDKOutput(_0x48531a,_0x417574);else{if(_0x48531a[_0x4b366c(0x177)]===0x0)_0x26c4ff?console[_0x4b366c(0x167)](_0x4b366c(0x291)+_0x26c4ff):console['log'](_0x4b366c(0x178));else{const _0x1cd763=_0x417574[_0x4b366c(0x28a)],_0x5ee496=_0x48531a[_0x4b366c(0x2aa)](_0x17c8b2=>{const _0x3b8a6d=_0x4b366c,_0xf9b4bc=a42_0x3b83e4[_0x3b8a6d(0x24a)]('#'+_0x17c8b2['id']),_0x21edb6=hyperlink(_0xf9b4bc,getWorkflowUrl(_0x1cd763,_0x17c8b2['id'])),_0x29765a=_0x17c8b2[_0x3b8a6d(0x250)]?.[_0x3b8a6d(0x19b)]?a42_0x3b83e4['dim']('\x20('+_0x17c8b2[_0x3b8a6d(0x250)]['name']+')'):'';return'📋\x20'+_0x21edb6+'\x20'+_0x17c8b2[_0x3b8a6d(0x19b)]+_0x29765a;});await writeOutput(_0x5ee496['join']('\x0a'),_0x417574['output'],_0x4b366c(0x23a));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x29f);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x192);async[a42_0x1c1cea(0x2fd)](_0x5f0093){const _0xa00fb2=a42_0x1c1cea,{options:_0x2cf58c,args:_0x249296,tdx:_0x440e05}=_0x5f0093,_0x3e0662=this['parseProjectWorkflowPattern'](_0x249296,_0x2cf58c);if(!_0x3e0662)return 0x1;const {projectName:_0x1d1bae,workflowName:_0x269c2a}=_0x3e0662;if(_0x2cf58c['verbose']){if(_0x1d1bae&&_0x269c2a)console[_0xa00fb2(0x30f)]('Filter:\x20'+_0x1d1bae+'.'+_0x269c2a);else _0x1d1bae&&console[_0xa00fb2(0x30f)](_0xa00fb2(0x248)+_0x1d1bae);const _0x1f2135=_0x2cf58c[_0xa00fb2(0x25d)];_0x1f2135&&console[_0xa00fb2(0x30f)](_0xa00fb2(0x296)+_0x1f2135);}let _0x517515=0x28;if(process[_0xa00fb2(0x174)][_0xa00fb2(0x22a)]&&!_0x2cf58c[_0xa00fb2(0x2bd)]&&!_0x2cf58c[_0xa00fb2(0x2b1)]){const _0x2cbe6f=process[_0xa00fb2(0x174)]['rows']||0x28;_0x517515=Math[_0xa00fb2(0x292)](0x14,Math[_0xa00fb2(0x1c0)](_0x2cbe6f*0x2/0x3));}const _0x49a6a4=_0x2cf58c[_0xa00fb2(0x2f1)]||_0x517515,_0x5f3e2c=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x440e05[_0xa00fb2(0x2fe)][_0xa00fb2(0x236)]({'projectName':_0x1d1bae,'workflowName':_0x269c2a,'status':_0x2cf58c[_0xa00fb2(0x25d)],'fromTime':_0x2cf58c[_0xa00fb2(0x1b1)],'toTime':_0x2cf58c['to'],'limit':_0x49a6a4}),{'verbose':_0x2cf58c[_0xa00fb2(0x304)]}),_0x2aa5fe=_0x5f3e2c['data'];_0x2aa5fe[_0xa00fb2(0x2d8)]((_0x521180,_0x17ce41)=>{const _0x3c0980=_0xa00fb2,_0x23f9bc=_0x521180[_0x3c0980(0x1f1)]||'',_0x3c2a8c=_0x17ce41['sessionTime']||'';return _0x3c2a8c[_0x3c0980(0x2d4)](_0x23f9bc);});_0x2aa5fe[_0xa00fb2(0x177)]>=_0x49a6a4?console[_0xa00fb2(0x30f)](_0xa00fb2(0x23b)+_0x2aa5fe[_0xa00fb2(0x177)]+_0xa00fb2(0x30d)+a42_0x3b83e4[_0xa00fb2(0x24a)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0xa00fb2(0x30f)](_0xa00fb2(0x2fa)+_0x2aa5fe[_0xa00fb2(0x177)]+_0xa00fb2(0x1cd)+(_0x2aa5fe[_0xa00fb2(0x177)]!==0x1?'s':''));if(_0x2cf58c[_0xa00fb2(0x2b1)]===_0xa00fb2(0x27a)||_0x2cf58c[_0xa00fb2(0x2b1)]===_0xa00fb2(0x18a)||_0x2cf58c['format']===_0xa00fb2(0x293))await handleSDKOutput(_0x2aa5fe,_0x2cf58c);else{if(!process[_0xa00fb2(0x174)][_0xa00fb2(0x22a)]||_0x2cf58c[_0xa00fb2(0x2bd)]){if(_0x2aa5fe['length']===0x0){if(_0x1d1bae&&_0x269c2a)console[_0xa00fb2(0x167)]('No\x20sessions\x20found\x20for:\x20'+_0x1d1bae+'.'+_0x269c2a);else _0x1d1bae?console[_0xa00fb2(0x167)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x1d1bae):console[_0xa00fb2(0x167)](_0xa00fb2(0x288));}else{const _0x3b4c0d=_0x2cf58c[_0xa00fb2(0x28a)],_0x28cb08=this[_0xa00fb2(0x256)](_0x2aa5fe,_0x3b4c0d);_0x2cf58c[_0xa00fb2(0x2bd)]?await writeOutput(_0x28cb08,_0x2cf58c[_0xa00fb2(0x2bd)],_0xa00fb2(0x23a)):console['log'](_0x28cb08);}!_0x1d1bae&&(console[_0xa00fb2(0x30f)](''),console[_0xa00fb2(0x30f)](a42_0x3b83e4['dim'](_0xa00fb2(0x30e))),console[_0xa00fb2(0x30f)](a42_0x3b83e4[_0xa00fb2(0x24a)](_0xa00fb2(0x259))+'or'+a42_0x3b83e4[_0xa00fb2(0x24a)](_0xa00fb2(0x261))));}else{if(_0x2aa5fe[_0xa00fb2(0x177)]===0x0){if(_0x1d1bae&&_0x269c2a)console[_0xa00fb2(0x167)]('No\x20sessions\x20found\x20for:\x20'+_0x1d1bae+'.'+_0x269c2a);else _0x1d1bae?console[_0xa00fb2(0x167)](_0xa00fb2(0x2b2)+_0x1d1bae):console[_0xa00fb2(0x167)](_0xa00fb2(0x288));}else await this[_0xa00fb2(0x1b7)](_0x2aa5fe,_0x5f0093,_0x1d1bae);}}return 0x0;}[a42_0x1c1cea(0x256)](_0x103fb8,_0x5572b8){const _0x2b07d0=a42_0x1c1cea,_0x1d7a9f=[],_0x129386=new Map();let _0x131cf4=Infinity,_0x49bdf1=-Infinity;for(const _0x506c36 of _0x103fb8){if(_0x506c36[_0x2b07d0(0x1aa)]?.['createdAt']){const _0x58ad82=new Date(_0x506c36['lastAttempt'][_0x2b07d0(0x2f5)])[_0x2b07d0(0x21f)](),_0x1fa6f5=_0x506c36['lastAttempt'][_0x2b07d0(0x24e)]?new Date(_0x506c36[_0x2b07d0(0x1aa)]['finishedAt'])['getTime']():Date['now'](),_0x4e7119=_0x506c36[_0x2b07d0(0x250)]?.[_0x2b07d0(0x19b)]||_0x2b07d0(0x233);!_0x129386[_0x2b07d0(0x2b5)](_0x4e7119)&&_0x129386['set'](_0x4e7119,[]),_0x129386[_0x2b07d0(0x217)](_0x4e7119)[_0x2b07d0(0x1d6)]({'session':_0x506c36,'startTime':_0x58ad82,'endTime':_0x1fa6f5,'duration':_0x1fa6f5-_0x58ad82}),_0x131cf4=Math[_0x2b07d0(0x1e8)](_0x131cf4,_0x58ad82),_0x49bdf1=Math['max'](_0x49bdf1,_0x1fa6f5);}}if(_0x129386[_0x2b07d0(0x220)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x51c813=process['stdout'][_0x2b07d0(0x240)]||0x78,_0xdafc4a=0x1e,_0x39b671=0x32,_0x500d83=0x4,_0x5ce550=Math[_0x2b07d0(0x1e8)](_0x39b671,Math[_0x2b07d0(0x292)](_0xdafc4a,Math['floor'](_0x51c813*0.3))),_0x294e5b=_0x51c813-_0x5ce550-TIMELINE_CONFIG[_0x2b07d0(0x1e7)]-0x3-_0x500d83,_0x5e6109=_0x49bdf1-_0x131cf4,_0x5e2b61=_0x5e6109/_0x5ce550,_0x10ddda=renderTimeAxis({'startTime':_0x131cf4,'endTime':_0x49bdf1,'durationMs':_0x5e6109,'msPerChar':_0x5e2b61},_0x5ce550),_0x2cb0fa=[];for(const _0x50a05a of _0x129386[_0x2b07d0(0x219)]()){_0x2cb0fa[_0x2b07d0(0x1d6)](..._0x50a05a);}_0x2cb0fa[_0x2b07d0(0x2d8)]((_0x64409c,_0xb111a)=>_0xb111a[_0x2b07d0(0x2c9)]-_0x64409c[_0x2b07d0(0x2c9)]);const _0x70af29=new Date(_0x131cf4),_0x3b5b4a=formatDate(_0x70af29),_0x977a86=_0x500d83+TIMELINE_CONFIG[_0x2b07d0(0x2ed)]+TIMELINE_CONFIG['ICON_SPACING']+_0x294e5b,_0x17502b='\x20'['repeat'](_0x977a86-_0x3b5b4a['length']),_0x1ae4b6=_0x17502b+a42_0x3b83e4[_0x2b07d0(0x24a)](_0x3b5b4a)+'\x20'+_0x10ddda;_0x1d7a9f['push'](_0x1ae4b6);const _0x2bd3ab=0x16;let _0x3e9712=0x0;for(const _0x1fe4ad of _0x2cb0fa){const _0x363d3d=_0x1fe4ad['session'][_0x2b07d0(0x250)]?.[_0x2b07d0(0x19b)]||'?',_0x198691=Math[_0x2b07d0(0x1e8)](stringWidth(_0x363d3d),_0x2bd3ab);_0x3e9712=Math['max'](_0x3e9712,_0x198691);}for(const _0x12072a of _0x2cb0fa){const {session:_0x300b26,startTime:_0x3ce2e4,endTime:_0x247eef,duration:_0x384f41}=_0x12072a,_0x123268=_0x300b26[_0x2b07d0(0x250)]?.['id'],_0x5002f6=_0x300b26['id'],_0x4cdf69=_0x300b26[_0x2b07d0(0x250)]?.[_0x2b07d0(0x19b)]||'?',_0x2e2eec=_0x300b26[_0x2b07d0(0x2fe)]?.[_0x2b07d0(0x19b)]||'?';let _0x35c1ea,_0xe90048;if(_0x300b26[_0x2b07d0(0x1aa)]){const _0x270545=_0x300b26[_0x2b07d0(0x1aa)];!_0x270545[_0x2b07d0(0x20c)]?(_0x35c1ea=_0x270545[_0x2b07d0(0x27f)]?'🛑':'🔄',_0xe90048=_0x270545['cancelRequested']?a42_0x3b83e4[_0x2b07d0(0x1c3)]:a42_0x3b83e4[_0x2b07d0(0x2d2)]):(_0x35c1ea=_0x270545[_0x2b07d0(0x310)]?'✅':'❌',_0xe90048=_0x270545['success']?a42_0x3b83e4[_0x2b07d0(0x185)]:a42_0x3b83e4['red']);}else _0x35c1ea='⏳',_0xe90048=a42_0x3b83e4[_0x2b07d0(0x24a)];const _0x39327e='#'+_0x5002f6,_0x32d2b2=_0x123268?hyperlink(_0x39327e,getWorkflowSessionUrl(_0x5572b8,_0x123268,_0x5002f6)):_0x39327e;let _0x59a868=_0x4cdf69;stringWidth(_0x4cdf69)>_0x2bd3ab&&(_0x59a868=_0x4cdf69['slice'](0x0,_0x2bd3ab-0x1)+'…');const _0x4d0f80=a42_0x3b83e4[_0x2b07d0(0x24a)](_0x59a868),_0x11ecfc=stringWidth(_0x59a868),_0xe8d62f='\x20'[_0x2b07d0(0x21c)](_0x3e9712-stringWidth(_0x59a868)+0x2),_0x137655='('+formatElapsed(_0x384f41)+')',_0x74f879=stringWidth(_0x137655),_0x3ed09b=stringWidth(_0x39327e),_0x97ce43=_0x3ed09b+0x1+_0x11ecfc+_0xe8d62f[_0x2b07d0(0x177)],_0x1e71ae=_0x294e5b-_0x97ce43-_0x74f879-0x1-0x8;let _0x38810c=_0x2e2eec;stringWidth(_0x38810c)>_0x1e71ae&&(_0x38810c=_0x38810c['slice'](0x0,_0x1e71ae-0x1)+'…');const _0x412b59=_0x32d2b2+'\x20'+_0x4d0f80+_0xe8d62f+_0x38810c,_0x25fbef=stringWidth(_0x412b59),_0x2979f4=_0x294e5b-_0x25fbef-_0x74f879,_0x11dd4e=_0x412b59+'\x20'[_0x2b07d0(0x21c)](Math[_0x2b07d0(0x292)](0x1,_0x2979f4))+a42_0x3b83e4[_0x2b07d0(0x24a)](_0x137655),_0x33c215=Math[_0x2b07d0(0x1c0)]((_0x3ce2e4-_0x131cf4)/_0x5e2b61),_0x8000af=Math[_0x2b07d0(0x1c0)]((_0x247eef-_0x131cf4)/_0x5e2b61),_0x3f056a=Math[_0x2b07d0(0x292)](_0x33c215+0x1,_0x8000af),_0x5e85a5=new Array(_0x5ce550)[_0x2b07d0(0x26c)]('\x20');for(let _0x36e5d9=_0x33c215;_0x36e5d9<Math[_0x2b07d0(0x1e8)](_0x3f056a,_0x5ce550);_0x36e5d9++){_0x5e85a5[_0x36e5d9]='─';}const _0x357211=_0x5e85a5[_0x2b07d0(0x2aa)](_0x410f16=>_0x410f16==='\x20'?'\x20':_0xe90048(_0x410f16))[_0x2b07d0(0x1d9)]('');_0x1d7a9f['push'](_0x35c1ea+'\x20'+_0x11dd4e+'│'+_0x357211+'│');}return _0x1d7a9f[_0x2b07d0(0x1d9)]('\x0a');}async[a42_0x1c1cea(0x1b7)](_0x3aae09,_0x43f8aa,_0x569395){const _0x58ec74=a42_0x1c1cea,{options:_0x1333a2,tdx:_0x4f78ce}=_0x43f8aa,_0xec9f50=_0x1333a2[_0x58ec74(0x28a)],{timelineRows:_0x6ddf5a,timeAxisHeader:_0x424fab}=this['generateSessionTimelineRows'](_0x3aae09,_0xec9f50),_0x45ea92=_0x6ddf5a[_0x58ec74(0x2c6)](_0xfec5c4=>_0xfec5c4[_0x58ec74(0x307)]);if(_0x45ea92['length']===0x0){const _0x2384cd=this[_0x58ec74(0x256)](_0x3aae09,_0xec9f50);console['log'](_0x2384cd);!_0x569395&&(console[_0x58ec74(0x30f)](''),console[_0x58ec74(0x30f)](a42_0x3b83e4['dim'](_0x58ec74(0x30e))),console[_0x58ec74(0x30f)](a42_0x3b83e4[_0x58ec74(0x24a)](_0x58ec74(0x259))+'or'+a42_0x3b83e4['dim'](_0x58ec74(0x261))));return;}_0x424fab&&console[_0x58ec74(0x167)](_0x424fab);const _0x763131=_0x6ddf5a['filter'](_0x3fa6bc=>_0x3fa6bc[_0x58ec74(0x307)])[_0x58ec74(0x2aa)](_0x1ca339=>({'title':_0x1ca339['displayLine'],'value':_0x1ca339[_0x58ec74(0x307)]})),_0x52792d=process['stdout'][_0x58ec74(0x2a5)]||0x3c,_0x4375a1=Math[_0x58ec74(0x292)](0x28,Math[_0x58ec74(0x1c0)](_0x52792d*0x2/0x3)),_0x2dda36=await a42_0x399419({'type':'autocomplete','name':_0x58ec74(0x307),'message':_0x58ec74(0x1f7),'choices':_0x763131,'initial':-0x1,'limit':_0x4375a1,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x386b10,_0x2aecff)=>{const _0x59cb11=_0x58ec74;if(!_0x386b10)return Promise[_0x59cb11(0x1e0)](_0x2aecff);const _0x2bb0f0=_0x2aecff[_0x59cb11(0x2c6)](_0x377803=>{const _0x3e5331=_0x59cb11,_0xc0b94=_0x377803;return _0xc0b94[_0x3e5331(0x2a6)][_0x3e5331(0x213)]()['includes'](_0x386b10[_0x3e5331(0x213)]());});return Promise[_0x59cb11(0x1e0)](_0x2bb0f0);}}),_0x243e73=()=>{const _0x5ae72b=_0x58ec74;process['stdout'][_0x5ae72b(0x2e4)](_0x5ae72b(0x29e)),process['stdout']['write'](_0x5ae72b(0x29e)),process[_0x5ae72b(0x174)]['write'](_0x5ae72b(0x29e));},_0x53154a=_0x2dda36&&_0x2dda36[_0x58ec74(0x307)]&&_0x2dda36[_0x58ec74(0x307)]!==null&&_0x2dda36['attemptId']['trim']()!=='';if(!_0x53154a){_0x243e73(),console[_0x58ec74(0x167)](a42_0x3b83e4[_0x58ec74(0x24a)](_0x58ec74(0x1f8)));return;}_0x243e73();const _0x4b2758=_0x3aae09['find'](_0xd04b78=>_0xd04b78[_0x58ec74(0x1aa)]?.['id']===_0x2dda36[_0x58ec74(0x307)]);if(_0x4b2758){const _0x4278cd=_0x4b2758[_0x58ec74(0x250)]?.[_0x58ec74(0x19b)]||'?',_0xc83014=_0x4b2758[_0x58ec74(0x2fe)]?.['name']||'?';console[_0x58ec74(0x167)](_0x58ec74(0x2b0)+a42_0x3b83e4['dim'](_0x4278cd)+_0x58ec74(0x222)+a42_0x3b83e4[_0x58ec74(0x24a)](_0xc83014));}const _0x3e4df1=new WorkflowTimelineCommand();await _0x3e4df1['execute']({'args':[],'options':{..._0x1333a2,'attemptId':_0x2dda36[_0x58ec74(0x307)]},'tdx':_0x4f78ce});}[a42_0x1c1cea(0x162)](_0x4bb50f,_0x50b4e4){const _0x36c26d=a42_0x1c1cea,_0x386b23=new Map();for(const _0xa56986 of _0x4bb50f){_0xa56986['id']&&_0xa56986['lastAttempt']?.['id']&&_0x386b23[_0x36c26d(0x29c)](_0xa56986['id'],_0xa56986[_0x36c26d(0x1aa)]['id']);}const _0xd100a2=[];let _0x19a976='';const _0x156921=this[_0x36c26d(0x256)](_0x4bb50f,_0x50b4e4),_0xa3451e=_0x156921[_0x36c26d(0x197)]('\x0a');for(const _0x4d9e2c of _0xa3451e){if(_0x4d9e2c[_0x36c26d(0x1bf)](_0x36c26d(0x2e8))||_0x4d9e2c[_0x36c26d(0x173)](/^\s+\d{4}-\d{2}-\d{2}/))_0x19a976=_0x4d9e2c;else{if(_0x4d9e2c['match'](/^[✅❌🔄🛑⏳]/)){const _0x38ddf3=_0x4d9e2c[_0x36c26d(0x173)](/#(\d+)/),_0x3be8e7=_0x38ddf3?_0x38ddf3[0x1]:null,_0x5a58c9=_0x3be8e7?_0x386b23[_0x36c26d(0x217)](_0x3be8e7)||null:null,_0x49f0f1=_0x4bb50f[_0x36c26d(0x247)](_0x47a413=>_0x47a413['id']===_0x3be8e7),_0x443568=_0x49f0f1?.[_0x36c26d(0x250)]?.[_0x36c26d(0x19b)]||'';_0xd100a2[_0x36c26d(0x1d6)]({'displayLine':_0x4d9e2c,'attemptId':_0x5a58c9,'projectName':_0x443568});}}}return{'timelineRows':_0xd100a2,'timeAxisHeader':_0x19a976};}}function a42_0x3081(_0x1ee86c,_0x2d8f4d){_0x1ee86c=_0x1ee86c-0x160;const _0x11c069=a42_0x11c0();let _0x3081f9=_0x11c069[_0x1ee86c];return _0x3081f9;}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x2f6);[a42_0x1c1cea(0x181)]='List\x20workflow\x20attempts';async[a42_0x1c1cea(0x2fd)](_0x48357f){const _0x156727=a42_0x1c1cea,{options:_0x5b4cbd,args:_0x3f82e6,tdx:_0xd2c745}=_0x48357f,_0x15a67a=this[_0x156727(0x1bd)](_0x3f82e6,_0x5b4cbd);if(!_0x15a67a)return 0x1;const {projectName:_0x3f4c44,workflowName:_0x3d2c19}=_0x15a67a,_0x4efca3=_0x5b4cbd['includeRetried'];if(_0x5b4cbd['verbose']){if(_0x3f4c44&&_0x3d2c19)console['error'](_0x156727(0x284)+_0x3f4c44+'.'+_0x3d2c19);else _0x3f4c44&&console[_0x156727(0x30f)](_0x156727(0x248)+_0x3f4c44);_0x4efca3&&console[_0x156727(0x30f)](_0x156727(0x1d5));}const _0x5b388e=await withSpinner(_0x156727(0x19d),()=>_0xd2c745[_0x156727(0x2fe)]['attempts']({'projectName':_0x3f4c44,'workflowName':_0x3d2c19,'includeRetried':_0x4efca3,'limit':_0x5b4cbd['limit']}),{'verbose':_0x5b4cbd[_0x156727(0x304)]}),_0x5b59c1=_0x5b388e[_0x156727(0x17b)],_0x34079c=_0x5b4cbd[_0x156727(0x2f1)]||0x64,_0x562470=_0x5b59c1[_0x156727(0x177)]>=_0x34079c?a42_0x3b83e4[_0x156727(0x24a)](_0x156727(0x1d7)):'';console[_0x156727(0x30f)](_0x156727(0x2fa)+_0x5b59c1[_0x156727(0x177)]+'\x20attempt'+(_0x5b59c1['length']!==0x1?'s':'')+_0x562470);if(_0x5b4cbd[_0x156727(0x2b1)]===_0x156727(0x27a)||_0x5b4cbd[_0x156727(0x2b1)]===_0x156727(0x18a)||_0x5b4cbd[_0x156727(0x2b1)]==='table')await handleSDKOutput(_0x5b59c1,_0x5b4cbd);else{if(_0x5b59c1[_0x156727(0x177)]===0x0){if(_0x3f4c44&&_0x3d2c19)console[_0x156727(0x167)](_0x156727(0x2ea)+_0x3f4c44+'.'+_0x3d2c19);else _0x3f4c44?console[_0x156727(0x167)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x3f4c44):console[_0x156727(0x167)](_0x156727(0x1e1));}else{const _0x23944b=_0x5b4cbd['site'],_0x30935f=_0x5b59c1['map'](_0x4cbe0e=>{const _0xed9559=_0x156727,_0x5c2bef=a42_0x3b83e4[_0xed9559(0x24a)]('#'+_0x4cbe0e['id']),_0x105bc4=_0x4cbe0e[_0xed9559(0x250)]?.['id'],_0x58192a=_0x4cbe0e[_0xed9559(0x1f3)]||_0x4cbe0e['sessionId'],_0x15251b=_0x105bc4&&_0x58192a?hyperlink(_0x5c2bef,getWorkflowAttemptUrl(_0x23944b,_0x105bc4,_0x58192a,_0x4cbe0e['id'])):_0x5c2bef,{icon:_0x264e0e,text:_0x2f408f}=getAttemptStatusDisplay(_0x4cbe0e),_0x582afe=(_0x4cbe0e[_0xed9559(0x250)]?.[_0xed9559(0x19b)]||'?')+'.'+(_0x4cbe0e['workflow']?.[_0xed9559(0x19b)]||'?'),_0x505933=_0x4cbe0e[_0xed9559(0x1f1)]?a42_0x3b83e4[_0xed9559(0x24a)](_0x4cbe0e['sessionTime']):'';return(_0x15251b+'\x20'+_0x264e0e+(_0x2f408f?'\x20'+_0x2f408f:'')+'\x20'+_0x582afe+'\x20'+_0x505933)[_0xed9559(0x216)]();});await writeOutput(_0x30935f['join']('\x0a'),_0x5b4cbd['output'],_0x156727(0x23a));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x1c1cea(0x19b)]='workflow:attempt';[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x194);async[a42_0x1c1cea(0x2fd)](_0x66d8e9){const _0x8a00fc=a42_0x1c1cea,{options:_0x1bbb36,args:_0x3175f8,tdx:_0x25134e}=_0x66d8e9,_0x3c426b=_0x3175f8[0x0];if(!_0x3c426b)return console[_0x8a00fc(0x30f)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x1bbb36[_0x8a00fc(0x304)]&&console[_0x8a00fc(0x30f)](_0x8a00fc(0x2d6)+_0x3c426b);const _0x3531bf=await withSpinner(_0x8a00fc(0x297),()=>_0x25134e['workflow'][_0x8a00fc(0x258)](_0x3c426b),{'verbose':_0x1bbb36['verbose']}),_0x3d6400=_0x3531bf[_0x8a00fc(0x17b)];let _0x441351;!_0x3d6400['done']?_0x441351=_0x3d6400['cancelRequested']?_0x8a00fc(0x277):_0x8a00fc(0x2ca):_0x441351=_0x3d6400['success']?_0x8a00fc(0x310):_0x8a00fc(0x30f);let _0x4b98cc;if(_0x3d6400[_0x8a00fc(0x2f5)]&&_0x3d6400[_0x8a00fc(0x24e)]){const _0x25d1cd=new Date(_0x3d6400['createdAt'])['getTime'](),_0x398c13=new Date(_0x3d6400[_0x8a00fc(0x24e)])[_0x8a00fc(0x21f)]();_0x4b98cc=Math[_0x8a00fc(0x1c6)]((_0x398c13-_0x25d1cd)/0x3e8);}const _0x52a840={'attempt_id':_0x3d6400['id'],'status':_0x441351,..._0x3d6400[_0x8a00fc(0x2fb)]!==undefined&&{'index':_0x3d6400['index']},..._0x3d6400['project']&&{'project':_0x3d6400[_0x8a00fc(0x250)][_0x8a00fc(0x19b)]},..._0x3d6400['workflow']&&{'workflow':_0x3d6400['workflow']['name']},..._0x3d6400['sessionId']&&{'session_id':_0x3d6400[_0x8a00fc(0x1f0)]},..._0x3d6400[_0x8a00fc(0x1f1)]&&{'session_time':_0x3d6400[_0x8a00fc(0x1f1)]},..._0x3d6400[_0x8a00fc(0x2d7)]&&{'retry_attempt':_0x3d6400[_0x8a00fc(0x2d7)]},..._0x4b98cc!==undefined&&{'duration_sec':_0x4b98cc},..._0x3d6400['createdAt']&&{'created_at':_0x3d6400[_0x8a00fc(0x2f5)]},..._0x3d6400[_0x8a00fc(0x24e)]&&{'finished_at':_0x3d6400[_0x8a00fc(0x24e)]},...Object[_0x8a00fc(0x171)](_0x3d6400[_0x8a00fc(0x203)])[_0x8a00fc(0x177)]>0x0&&{'params':_0x3d6400[_0x8a00fc(0x203)]}};return await handleSingleObjectOutput(_0x52a840,_0x1bbb36),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x17e);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x287);async[a42_0x1c1cea(0x2fd)](_0x11cfa2){const _0x4c0335=a42_0x1c1cea,{options:_0x2f00c4,args:_0x39ae27,tdx:_0x89068d}=_0x11cfa2,_0xa0fb7f=_0x39ae27[0x0];if(!_0xa0fb7f)return console[_0x4c0335(0x30f)](_0x4c0335(0x205)),0x1;const _0x36dcff=_0x2f00c4[_0x4c0335(0x2d3)];_0x2f00c4[_0x4c0335(0x304)]&&(console[_0x4c0335(0x30f)]('Attempt\x20ID:\x20'+_0xa0fb7f),_0x36dcff&&console[_0x4c0335(0x30f)](_0x4c0335(0x1a1)));const _0x1c48c0=await withSpinner(_0x4c0335(0x2ba),()=>_0x89068d[_0x4c0335(0x2fe)][_0x4c0335(0x1b9)](_0xa0fb7f,_0x36dcff||![]),{'verbose':_0x2f00c4[_0x4c0335(0x304)]}),_0x1228ed=_0x1c48c0['data'];return console[_0x4c0335(0x30f)](_0x4c0335(0x2fa)+_0x1228ed[_0x4c0335(0x177)]+_0x4c0335(0x238)+(_0x1228ed[_0x4c0335(0x177)]!==0x1?'s':'')),await handleSDKOutput(_0x1228ed,_0x2f00c4),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x2db);[a42_0x1c1cea(0x181)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a42_0x1c1cea(0x2fd)](_0x3c4fab){const _0x3f5b76=a42_0x1c1cea,{options:_0x145101,args:_0x413a23,tdx:_0x2535ca}=_0x3c4fab,_0x3b7a89=_0x413a23[0x0];let _0x3bb23e=_0x413a23[0x1];if(!_0x3b7a89)return console[_0x3f5b76(0x30f)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x145101[_0x3f5b76(0x304)]&&(console[_0x3f5b76(0x30f)]('Attempt\x20ID:\x20'+_0x3b7a89),_0x3bb23e&&console[_0x3f5b76(0x30f)](_0x3f5b76(0x1b5)+_0x3bb23e));const _0x4e15b0=await withSpinner('Fetching\x20log\x20files...',()=>_0x2535ca[_0x3f5b76(0x2fe)][_0x3f5b76(0x1df)](_0x3b7a89,_0x3bb23e),{'verbose':_0x145101[_0x3f5b76(0x304)]}),_0x5cf12a=_0x4e15b0[_0x3f5b76(0x17b)];if(_0x5cf12a[_0x3f5b76(0x177)]===0x0)return console[_0x3f5b76(0x30f)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x3bb23e&&(_0x145101[_0x3f5b76(0x27a)]||_0x145101[_0x3f5b76(0x2b1)]))return await handleSDKOutput(_0x5cf12a,_0x145101),0x0;if(!_0x3bb23e){const _0xb17ef3=_0x5cf12a[_0x3f5b76(0x2aa)](_0x55e9e6=>({'title':_0x55e9e6[_0x3f5b76(0x25a)]+'\x20('+formatBytes(_0x55e9e6[_0x3f5b76(0x1c2)])+')','value':_0x55e9e6[_0x3f5b76(0x25a)]})),_0x49a59d=await a42_0x399419({'type':'select','name':'task','message':_0x3f5b76(0x168),'choices':_0xb17ef3});if(!_0x49a59d['task'])return console[_0x3f5b76(0x30f)]('Cancelled'),0x0;_0x3bb23e=_0x49a59d[_0x3f5b76(0x172)];}const _0x59d7a1=await withSpinner(_0x3f5b76(0x23c),()=>_0x2535ca[_0x3f5b76(0x2fe)][_0x3f5b76(0x1f9)](_0x3b7a89,_0x3bb23e),{'verbose':_0x145101[_0x3f5b76(0x304)]}),_0x3d943b=_0x59d7a1[_0x3f5b76(0x17b)];return _0x3d943b?console[_0x3f5b76(0x167)](_0x3d943b):console[_0x3f5b76(0x30f)](_0x3f5b76(0x255)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x2f9);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x280);async['execute'](_0x3cc159){const _0x4be26c=a42_0x1c1cea,{options:_0x463a43,args:_0xba28cd,tdx:_0x6e3a42}=_0x3cc159,_0x43192e=_0xba28cd[0x0];if(!_0x43192e)return console[_0x4be26c(0x30f)](_0x4be26c(0x205)),0x1;const _0x304bcf=_0x463a43[_0x4be26c(0x2f7)];_0x463a43[_0x4be26c(0x304)]&&(console['error'](_0x4be26c(0x2d6)+_0x43192e),_0x304bcf&&console[_0x4be26c(0x30f)](_0x4be26c(0x268)+_0x304bcf));if(!_0x463a43[_0x4be26c(0x199)]){if(!isInteractive())return console[_0x4be26c(0x30f)](a42_0x3b83e4[_0x4be26c(0x305)](_0x4be26c(0x2eb)),_0x4be26c(0x207)),console[_0x4be26c(0x30f)](a42_0x3b83e4['dim'](_0x4be26c(0x274))),0x1;const _0x402adc=await confirmKey(_0x4be26c(0x201)+_0x43192e+'?');if(!_0x402adc)return console['error'](a42_0x3b83e4[_0x4be26c(0x1c3)]('Cancelled')),0x1;}const _0x28ec3b=await withSpinner('Killing\x20attempt...',()=>_0x6e3a42['workflow'][_0x4be26c(0x18b)](_0x43192e,_0x304bcf),{'verbose':_0x463a43[_0x4be26c(0x304)]}),_0x4bbada=_0x28ec3b[_0x4be26c(0x17b)];return console[_0x4be26c(0x30f)]('✔\x20'+_0x4bbada),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x170);['description']=a42_0x1c1cea(0x249);async[a42_0x1c1cea(0x2fd)](_0x130094){const _0x4b3a2f=a42_0x1c1cea,{options:_0x229568,args:_0x1de121,tdx:_0x45a8a0}=_0x130094,_0x588cc6=_0x1de121[0x0];if(!_0x588cc6)return console[_0x4b3a2f(0x30f)](_0x4b3a2f(0x246)),console['error'](_0x4b3a2f(0x1f5)),0x1;let _0x412a51=![],_0x1deb76=_0x588cc6;if(_0x588cc6[_0x4b3a2f(0x1bf)](_0x4b3a2f(0x29b)))_0x412a51=!![],_0x1deb76=_0x588cc6['substring'](0x8);else{if(_0x588cc6[_0x4b3a2f(0x1bf)](_0x4b3a2f(0x193)))_0x412a51=![],_0x1deb76=_0x588cc6[_0x4b3a2f(0x26f)](0x8);else return console[_0x4b3a2f(0x30f)](_0x4b3a2f(0x1f2)),console['error'](_0x4b3a2f(0x1f5)),0x1;}const _0x428d03=_0x229568[_0x4b3a2f(0x210)],_0x1cbc45=_0x229568[_0x4b3a2f(0x16d)],_0x27faf7=_0x229568[_0x4b3a2f(0x203)],_0x2b4bb3=_0x229568[_0x4b3a2f(0x169)];_0x229568[_0x4b3a2f(0x304)]&&(console[_0x4b3a2f(0x30f)](_0x4b3a2f(0x1ba)+(_0x412a51?_0x4b3a2f(0x25e):_0x4b3a2f(0x258))+'\x20'+_0x1deb76),_0x428d03&&console['error'](_0x4b3a2f(0x198)+_0x428d03),_0x1cbc45&&console[_0x4b3a2f(0x30f)](_0x4b3a2f(0x1b4)+_0x1cbc45),_0x27faf7&&console['error'](_0x4b3a2f(0x2c1)+_0x27faf7),_0x2b4bb3&&console[_0x4b3a2f(0x30f)](_0x4b3a2f(0x1ff)));let _0x3621c0;if(_0x27faf7)try{if(_0x27faf7[_0x4b3a2f(0x1bf)]('@')){const _0xc0453a=await import(_0x4b3a2f(0x1e9)),_0x5091df=_0x27faf7[_0x4b3a2f(0x26f)](0x1),_0xeb20fc=await _0xc0453a['readFile'](_0x5091df,'utf-8');_0x3621c0=JSON[_0x4b3a2f(0x1c5)](_0xeb20fc);}else _0x3621c0=JSON[_0x4b3a2f(0x1c5)](_0x27faf7);}catch{return console[_0x4b3a2f(0x30f)](_0x4b3a2f(0x1ab)),0x1;}if(!_0x229568[_0x4b3a2f(0x199)]){if(!isInteractive())return console['error'](a42_0x3b83e4[_0x4b3a2f(0x305)](_0x4b3a2f(0x2eb)),_0x4b3a2f(0x207)),console[_0x4b3a2f(0x30f)](a42_0x3b83e4['dim'](_0x4b3a2f(0x274))),0x1;const _0x45a9be=await confirmKey(_0x4b3a2f(0x2b4)+(_0x412a51?_0x4b3a2f(0x25e):'attempt')+'\x20'+_0x1deb76+'?');if(!_0x45a9be)return console[_0x4b3a2f(0x30f)](a42_0x3b83e4[_0x4b3a2f(0x1c3)](_0x4b3a2f(0x1f8))),0x1;}let _0x3cdcfb;_0x412a51?_0x3cdcfb=await withSpinner(_0x4b3a2f(0x260),()=>_0x45a8a0[_0x4b3a2f(0x2fe)][_0x4b3a2f(0x1d8)](_0x1deb76,{'fromTask':_0x428d03,'retryParams':_0x3621c0}),{'verbose':_0x229568[_0x4b3a2f(0x304)]}):_0x3cdcfb=await withSpinner(_0x4b3a2f(0x28f),()=>_0x45a8a0[_0x4b3a2f(0x2fe)][_0x4b3a2f(0x180)](_0x1deb76,{'resumeFrom':_0x1cbc45,'retryParams':_0x3621c0,'force':_0x2b4bb3}),{'verbose':_0x229568['verbose']});const _0x59c849=_0x3cdcfb[_0x4b3a2f(0x17b)];return console['error'](_0x4b3a2f(0x2e5)),console[_0x4b3a2f(0x30f)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x59c849['attemptId']),console[_0x4b3a2f(0x30f)](_0x4b3a2f(0x1b6)+_0x59c849[_0x4b3a2f(0x1f0)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x1de);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x1be);async[a42_0x1c1cea(0x2fd)](_0x1f5cce){const _0x598d4f=a42_0x1c1cea,{options:_0x281903,args:_0x281cce,tdx:_0x49c7fb}=_0x1f5cce;let _0xc42c5b=_0x281cce[0x0];if(!_0xc42c5b){const _0x32fcfa=this[_0x598d4f(0x302)]([],_0x281903),_0x2259d3=await withSpinner('Loading\x20workflows...',()=>_0x49c7fb[_0x598d4f(0x2fe)][_0x598d4f(0x2b7)](_0x32fcfa,{'limit':_0x281903[_0x598d4f(0x2f1)]}),{'verbose':_0x281903[_0x598d4f(0x304)]}),_0x12b474=_0x2259d3[_0x598d4f(0x17b)];if(_0x12b474[_0x598d4f(0x177)]===0x0)return console[_0x598d4f(0x30f)](_0x598d4f(0x178)),!_0x32fcfa&&console[_0x598d4f(0x30f)](a42_0x3b83e4['dim'](_0x598d4f(0x263))),0x1;const _0x30e18e=_0x12b474['map'](_0x2694bb=>({'title':_0x2694bb[_0x598d4f(0x250)]?.[_0x598d4f(0x19b)]+'.'+_0x2694bb['name'],'value':_0x2694bb[_0x598d4f(0x250)]?.[_0x598d4f(0x19b)]+'.'+_0x2694bb[_0x598d4f(0x19b)],'description':_0x2694bb['revision']?'revision:\x20'+_0x2694bb[_0x598d4f(0x285)]:undefined})),_0x5a3893=await a42_0x399419({'type':_0x598d4f(0x1ce),'name':_0x598d4f(0x2fe),'message':_0x598d4f(0x2a1),'choices':_0x30e18e});if(!_0x5a3893[_0x598d4f(0x2fe)])return 0x1;_0xc42c5b=_0x5a3893[_0x598d4f(0x2fe)];}if(!_0xc42c5b[_0x598d4f(0x308)]('.')){const _0x449fea=this[_0x598d4f(0x302)]([],_0x281903);if(_0x449fea)_0xc42c5b=_0x449fea+'.'+_0xc42c5b;else return console[_0x598d4f(0x30f)](a42_0x3b83e4[_0x598d4f(0x305)](_0x598d4f(0x212)),_0x598d4f(0x1f6)),console['error'](a42_0x3b83e4[_0x598d4f(0x24a)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x542977=_0x281903[_0x598d4f(0x30b)],_0xef9e2b=_0x281903['sessionTime'],_0x2eaa30={};if(_0x542977&&Array['isArray'](_0x542977))for(const _0x34ec9f of _0x542977){const _0xe14a5=_0x34ec9f[_0x598d4f(0x2c8)]('=');if(_0xe14a5===-0x1)return console[_0x598d4f(0x30f)](_0x598d4f(0x18f)+_0x34ec9f),console[_0x598d4f(0x30f)](_0x598d4f(0x176)),0x1;const _0x36b431=_0x34ec9f[_0x598d4f(0x26f)](0x0,_0xe14a5),_0x26b4d4=_0x34ec9f['substring'](_0xe14a5+0x1);try{_0x2eaa30[_0x36b431]=JSON[_0x598d4f(0x1c5)](_0x26b4d4);}catch{_0x2eaa30[_0x36b431]=_0x26b4d4;}}_0x281903[_0x598d4f(0x304)]&&(console[_0x598d4f(0x30f)](_0x598d4f(0x1cb)+_0xc42c5b),Object[_0x598d4f(0x171)](_0x2eaa30)[_0x598d4f(0x177)]>0x0&&console[_0x598d4f(0x30f)](_0x598d4f(0x1b0)+JSON['stringify'](_0x2eaa30)),_0xef9e2b&&console[_0x598d4f(0x30f)](_0x598d4f(0x226)+_0xef9e2b));const _0x21d5c3=await withSpinner(_0x598d4f(0x23e),()=>_0x49c7fb[_0x598d4f(0x2fe)]['run'](_0xc42c5b,_0x2eaa30,{'sessionTime':_0xef9e2b}),{'verbose':_0x281903[_0x598d4f(0x304)]}),_0x4a0d76=_0x21d5c3['data'];console['error'](_0x598d4f(0x1c4)),console[_0x598d4f(0x30f)](_0x598d4f(0x2ff)+_0x4a0d76['id']),console[_0x598d4f(0x30f)](_0x598d4f(0x1b6)+_0x4a0d76['sessionId']),console[_0x598d4f(0x30f)](_0x598d4f(0x279)+_0x4a0d76[_0x598d4f(0x250)]?.[_0x598d4f(0x19b)]),console[_0x598d4f(0x30f)](_0x598d4f(0x2f8)+_0x4a0d76[_0x598d4f(0x2fe)]?.[_0x598d4f(0x19b)]);if(_0x4a0d76['project']?.['id']&&_0x4a0d76[_0x598d4f(0x1f0)]&&_0x4a0d76['id']){const _0x48eccb=_0x281903[_0x598d4f(0x28a)],_0xb3bf0d=getConsoleUrl(_0x48eccb,_0x598d4f(0x1d2)+_0x4a0d76['project']['id']+_0x598d4f(0x26d)+_0x4a0d76['sessionId']+_0x598d4f(0x28e)+_0x4a0d76['id']);console[_0x598d4f(0x30f)](_0x598d4f(0x25c)+a42_0x3b83e4[_0x598d4f(0x1c8)](_0xb3bf0d));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x30c);[a42_0x1c1cea(0x181)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x12b675){const _0x5ec449=a42_0x1c1cea,{options:_0x59c77f,args:_0xb29144,tdx:_0xe8d855}=_0x12b675,_0x149db3=_0xb29144[0x0],_0x2760f5=_0xb29144[0x1]||'.';if(!_0x149db3)return console[_0x5ec449(0x30f)](_0x5ec449(0x2e3)),console[_0x5ec449(0x30f)](_0x5ec449(0x189)),0x1;const _0x4597f0=_0x59c77f[_0x5ec449(0x285)];_0x59c77f[_0x5ec449(0x304)]&&(console['error'](_0x5ec449(0x2b0)+_0x149db3),console[_0x5ec449(0x30f)](_0x5ec449(0x295)+_0x2760f5),_0x4597f0&&console[_0x5ec449(0x30f)](_0x5ec449(0x1d4)+_0x4597f0));const _0x3ffd6a=await withSpinner('Downloading\x20project\x20'+_0x149db3+_0x5ec449(0x2ae),()=>_0xe8d855[_0x5ec449(0x2fe)][_0x5ec449(0x2b6)](_0x149db3,_0x2760f5,{'revision':_0x4597f0}),{'verbose':_0x59c77f[_0x5ec449(0x304)]}),_0x4aa817=_0x3ffd6a[_0x5ec449(0x17b)];return console[_0x5ec449(0x30f)]('✔\x20Downloaded\x20'+_0x4aa817[_0x5ec449(0x20b)]),console['error']('\x20\x20Revision:\x20'+_0x4aa817['revision']),console[_0x5ec449(0x30f)](_0x5ec449(0x24b)+_0x4aa817['filesExtracted']),console[_0x5ec449(0x30f)](_0x5ec449(0x190)+_0x2760f5+'/'+_0x4aa817['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a42_0x1c1cea(0x1bc);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x1f4);async[a42_0x1c1cea(0x2fd)](_0x51c88f){const _0x5698ea=a42_0x1c1cea,{options:_0x434c85,args:_0x3ca645,tdx:_0x4e97ea}=_0x51c88f;let _0x4aba6a='.',_0x860cc4=_0x434c85['name'];if(_0x3ca645[0x0]){const {promises:_0x282116}=await import('fs');try{const _0x113a72=await _0x282116[_0x5698ea(0x2c0)](_0x3ca645[0x0]);if(_0x113a72[_0x5698ea(0x2cc)]())_0x4aba6a=_0x3ca645[0x0];else return console[_0x5698ea(0x30f)](_0x5698ea(0x221)+_0x3ca645[0x0]+_0x5698ea(0x2ee)),0x1;}catch{_0x860cc4=_0x3ca645[0x0],_0x4aba6a='.';}}const _0x186f3c=_0x434c85[_0x5698ea(0x285)],_0x28fe5b=_0x434c85[_0x5698ea(0x2a0)];_0x434c85[_0x5698ea(0x304)]&&(console['error'](_0x5698ea(0x1b3)+_0x4aba6a),_0x860cc4&&console[_0x5698ea(0x30f)](_0x5698ea(0x267)+_0x860cc4),_0x186f3c&&console[_0x5698ea(0x30f)](_0x5698ea(0x1d4)+_0x186f3c),_0x28fe5b&&console[_0x5698ea(0x30f)](_0x5698ea(0x2af)));const _0x296ee6=await withSpinner(_0x5698ea(0x1cc),()=>_0x4e97ea[_0x5698ea(0x2fe)][_0x5698ea(0x1d6)](_0x4aba6a,{'projectName':_0x860cc4,'revision':_0x186f3c,'skipValidation':_0x28fe5b}),{'verbose':_0x434c85['verbose']}),_0x438414=_0x296ee6[_0x5698ea(0x17b)];return console[_0x5698ea(0x30f)](_0x5698ea(0x1a2)+_0x438414[_0x5698ea(0x20b)]),console[_0x5698ea(0x30f)]('\x20\x20Project\x20ID:\x20'+_0x438414[_0x5698ea(0x164)]),console['error'](_0x5698ea(0x21a)+_0x438414[_0x5698ea(0x285)]),await this[_0x5698ea(0x1ed)](_0x4e97ea,_0x438414['projectName'],_0x434c85['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a42_0x1c1cea(0x266);['description']=a42_0x1c1cea(0x1bb);async[a42_0x1c1cea(0x2fd)](_0x589a7d){const _0x583dc7=a42_0x1c1cea,{options:_0x4a0b9a,args:_0x1381c6,tdx:_0x4a1a68}=_0x589a7d,_0x3706a5=_0x1381c6[0x0],_0x23e764=_0x1381c6[0x1];if(!_0x3706a5)return console[_0x583dc7(0x30f)](a42_0x3b83e4[_0x583dc7(0x305)](_0x583dc7(0x212)),_0x583dc7(0x235)),console[_0x583dc7(0x30f)](a42_0x3b83e4[_0x583dc7(0x24a)](_0x583dc7(0x188))),0x1;const _0x288df7=_0x4a0b9a[_0x583dc7(0x285)];_0x4a0b9a[_0x583dc7(0x304)]&&(console[_0x583dc7(0x30f)]('Project:\x20'+_0x3706a5),_0x23e764&&console['error'](_0x583dc7(0x1af)+_0x23e764),_0x288df7&&console[_0x583dc7(0x30f)](_0x583dc7(0x1d4)+_0x288df7),_0x4a0b9a[_0x583dc7(0x1b2)]&&console['error'](_0x583dc7(0x1a8)));const _0x22a6e3=await withSpinner(_0x583dc7(0x22b)+_0x3706a5+_0x583dc7(0x2ae),()=>_0x4a1a68['workflow'][_0x583dc7(0x2e1)](_0x3706a5,{'targetDir':_0x23e764,'revision':_0x288df7}),{'verbose':_0x4a0b9a[_0x583dc7(0x304)]}),_0x507fea=_0x22a6e3[_0x583dc7(0x17b)];_0x507fea[_0x583dc7(0x264)]?console[_0x583dc7(0x30f)](_0x583dc7(0x2ac)+_0x507fea[_0x583dc7(0x20b)]):console[_0x583dc7(0x30f)]('→\x20Project:\x20'+_0x507fea[_0x583dc7(0x20b)]);console['error']('\x20\x20Revision:\x20'+_0x507fea[_0x583dc7(0x285)]),console[_0x583dc7(0x30f)]('\x20\x20Target:\x20'+(a42_0x17a291['relative'](process['cwd'](),_0x507fea[_0x583dc7(0x298)])||'.')),console[_0x583dc7(0x30f)](_0x583dc7(0x2c5)+a42_0x3b83e4[_0x583dc7(0x185)]('+'+_0x507fea[_0x583dc7(0x1ca)][_0x583dc7(0x19f)]+_0x583dc7(0x22c))+',\x20'+(a42_0x3b83e4[_0x583dc7(0x1c3)]('~'+_0x507fea[_0x583dc7(0x1ca)]['modified']+_0x583dc7(0x200))+',\x20')+(a42_0x3b83e4[_0x583dc7(0x305)]('-'+_0x507fea[_0x583dc7(0x1ca)][_0x583dc7(0x214)]+_0x583dc7(0x2dd))+',\x20')+(''+a42_0x3b83e4[_0x583dc7(0x24a)](_0x507fea['summary'][_0x583dc7(0x1a7)]+_0x583dc7(0x289))));for(const _0x1c1919 of _0x507fea['changes']){_0x1c1919[_0x583dc7(0x27c)]==='modified'&&_0x1c1919['diff']&&(console[_0x583dc7(0x30f)]('\x0a'+a42_0x3b83e4[_0x583dc7(0x1c8)](_0x583dc7(0x1ec)+_0x1c1919[_0x583dc7(0x19a)])),console['error'](_0x1c1919['diff']));}if(!_0x507fea[_0x583dc7(0x1e4)])return saveSessionContext({'workflow_project':_0x507fea['projectName']},_0x4a0b9a[_0x583dc7(0x25e)]),console['error'](a42_0x3b83e4[_0x583dc7(0x185)](_0x583dc7(0x253))),console[_0x583dc7(0x30f)](a42_0x3b83e4[_0x583dc7(0x24a)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x507fea[_0x583dc7(0x20b)])),0x0;if(_0x4a0b9a['dryRun'])return console[_0x583dc7(0x30f)](a42_0x3b83e4[_0x583dc7(0x1c3)](_0x583dc7(0x2f4))),0x0;if(!_0x4a0b9a['yes']){if(!isInteractive())return console[_0x583dc7(0x30f)](a42_0x3b83e4['red'](_0x583dc7(0x2eb)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x583dc7(0x30f)](a42_0x3b83e4['dim'](_0x583dc7(0x274))),0x1;const _0x227d86=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x227d86)return console[_0x583dc7(0x30f)](a42_0x3b83e4['yellow'](_0x583dc7(0x1f8)),_0x583dc7(0x166)),0x1;}await withSpinner(_0x583dc7(0x2a4),()=>_0x4a1a68['workflow'][_0x583dc7(0x16a)](_0x507fea,{'revision':_0x288df7}),{'verbose':_0x4a0b9a[_0x583dc7(0x304)]}),saveSessionContext({'workflow_project':_0x507fea[_0x583dc7(0x20b)]},_0x4a0b9a[_0x583dc7(0x25e)]),console[_0x583dc7(0x30f)](a42_0x3b83e4[_0x583dc7(0x185)]('✔\x20Pull\x20complete'));const _0x72f585=a42_0x17a291[_0x583dc7(0x2e0)](process[_0x583dc7(0x1e6)](),_0x507fea[_0x583dc7(0x298)])||'.';return console[_0x583dc7(0x30f)](a42_0x3b83e4[_0x583dc7(0x24a)](_0x583dc7(0x190)+_0x72f585)),console['error'](a42_0x3b83e4[_0x583dc7(0x24a)](_0x583dc7(0x229)+_0x507fea[_0x583dc7(0x20b)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x1c1cea(0x19b)]='workflow:push';['description']=a42_0x1c1cea(0x232);async[a42_0x1c1cea(0x2fd)](_0x4f55ca){const _0x495152=a42_0x1c1cea,{options:_0xaed1fd,args:_0x2795ab,tdx:_0xdbd873}=_0x4f55ca,_0x349073=this[_0x495152(0x18d)](_0x2795ab,_0xaed1fd),_0x41e77a=_0xaed1fd['revision'],_0x5d850d=_0xaed1fd[_0x495152(0x2a0)];_0xaed1fd[_0x495152(0x304)]&&(_0x349073&&console[_0x495152(0x30f)](_0x495152(0x1b8)+_0x349073),_0x41e77a&&console[_0x495152(0x30f)](_0x495152(0x1d4)+_0x41e77a),_0xaed1fd[_0x495152(0x1b2)]&&console['error'](_0x495152(0x1a8)),_0x5d850d&&console[_0x495152(0x30f)](_0x495152(0x2af)));let _0x3f0939;try{_0x3f0939=await withSpinner(_0x495152(0x2b8),()=>_0xdbd873[_0x495152(0x2fe)]['preparePushProject']({'sourceDir':_0x349073,'revision':_0x41e77a,'skipValidation':_0x5d850d}),{'verbose':_0xaed1fd[_0x495152(0x304)]});}catch(_0x183115){if(_0x183115 instanceof Error&&_0x183115[_0x495152(0x28d)]['includes']('No\x20workflow\x20tdx.json\x20found'))return console['error'](a42_0x3b83e4[_0x495152(0x305)](_0x495152(0x212)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0xaed1fd[_0x495152(0x26e)]?console[_0x495152(0x30f)](a42_0x3b83e4['dim']('Tip:\x20cd\x20to\x20workflows/'+_0xaed1fd[_0x495152(0x26e)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0xaed1fd[_0x495152(0x26e)]+'\x27')):console['error'](a42_0x3b83e4['dim'](_0x495152(0x306))),0x1;throw _0x183115;}const _0x36d2b9=_0x3f0939[_0x495152(0x17b)];console['error']('✔\x20Project:\x20'+_0x36d2b9[_0x495152(0x20b)]),console[_0x495152(0x30f)]('\x20\x20Source:\x20'+_0x36d2b9[_0x495152(0x272)]),console[_0x495152(0x30f)](_0x495152(0x21a)+_0x36d2b9[_0x495152(0x285)]),console['error'](_0x495152(0x2c5)+a42_0x3b83e4[_0x495152(0x185)]('+'+_0x36d2b9[_0x495152(0x1ca)][_0x495152(0x19f)]+_0x495152(0x22c))+',\x20'+(a42_0x3b83e4['yellow']('~'+_0x36d2b9[_0x495152(0x1ca)][_0x495152(0x243)]+'\x20modified')+',\x20')+(a42_0x3b83e4[_0x495152(0x305)]('-'+_0x36d2b9[_0x495152(0x1ca)][_0x495152(0x214)]+_0x495152(0x2dd))+',\x20')+(''+a42_0x3b83e4[_0x495152(0x24a)](_0x36d2b9['summary'][_0x495152(0x1a7)]+_0x495152(0x289))));for(const _0x44c5f3 of _0x36d2b9[_0x495152(0x1dc)]){_0x44c5f3['type']===_0x495152(0x243)&&_0x44c5f3[_0x495152(0x1ea)]&&(console[_0x495152(0x30f)]('\x0a'+a42_0x3b83e4[_0x495152(0x1c8)]('---\x20'+_0x44c5f3[_0x495152(0x19a)])),console[_0x495152(0x30f)](_0x44c5f3[_0x495152(0x1ea)]));}if(!_0x36d2b9[_0x495152(0x1e4)])return console['error'](a42_0x3b83e4[_0x495152(0x185)](_0x495152(0x2c7))),await this[_0x495152(0x1ed)](_0xdbd873,_0x36d2b9[_0x495152(0x20b)],_0xaed1fd[_0x495152(0x28a)]),0x0;if(_0xaed1fd[_0x495152(0x1b2)])return console[_0x495152(0x30f)](a42_0x3b83e4[_0x495152(0x1c3)](_0x495152(0x224))),0x0;if(!_0xaed1fd[_0x495152(0x199)]){if(!isInteractive())return console[_0x495152(0x30f)](a42_0x3b83e4[_0x495152(0x305)]('\x0aError:'),_0x495152(0x207)),console[_0x495152(0x30f)](a42_0x3b83e4['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3a7a3b=await confirmKey(_0x495152(0x2f0));if(!_0x3a7a3b)return console['error'](a42_0x3b83e4[_0x495152(0x1c3)]('Cancelled'),_0x495152(0x21b)),0x1;}const _0xb26403=await withSpinner('Pushing\x20project...',()=>_0xdbd873[_0x495152(0x2fe)]['executePushProject'](_0x36d2b9),{'verbose':_0xaed1fd['verbose']}),_0x5a41ec=_0xb26403[_0x495152(0x17b)];return console[_0x495152(0x30f)](a42_0x3b83e4[_0x495152(0x185)](_0x495152(0x26b))),console[_0x495152(0x30f)](_0x495152(0x195)+_0x5a41ec[_0x495152(0x164)]),console[_0x495152(0x30f)](_0x495152(0x21a)+_0x5a41ec[_0x495152(0x285)]),await this[_0x495152(0x1ed)](_0xdbd873,_0x5a41ec[_0x495152(0x20b)],_0xaed1fd[_0x495152(0x28a)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a42_0x1c1cea(0x2cf);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x265);async[a42_0x1c1cea(0x2fd)](_0x5c56a3){const _0x3db03e=a42_0x1c1cea,{options:_0x2662b4,args:_0x3ca13d,tdx:_0x2f5b51}=_0x5c56a3,_0x6e505a=this[_0x3db03e(0x18d)](_0x3ca13d,_0x2662b4),_0xb55c67=_0x2662b4[_0x3db03e(0x19b)],_0x5bcdc8=_0x2662b4['revision'],_0x4ce516=_0x2662b4[_0x3db03e(0x2a0)];if(!_0x6e505a)return console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x305)](_0x3db03e(0x212)),_0x3db03e(0x294)),console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x24a)](_0x3db03e(0x2fc))),console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x24a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0xb55c67)return console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x305)](_0x3db03e(0x212)),_0x3db03e(0x1c7)),console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x24a)](_0x3db03e(0x2fc))),0x1;_0x2662b4[_0x3db03e(0x304)]&&(console[_0x3db03e(0x30f)](_0x3db03e(0x1b8)+_0x6e505a),console[_0x3db03e(0x30f)](_0x3db03e(0x165)+_0xb55c67),_0x5bcdc8&&console[_0x3db03e(0x30f)](_0x3db03e(0x1d4)+_0x5bcdc8),_0x2662b4['dryRun']&&console[_0x3db03e(0x30f)](_0x3db03e(0x1a8)),_0x4ce516&&console[_0x3db03e(0x30f)](_0x3db03e(0x2af)));const _0x80c0de=await withSpinner(_0x3db03e(0x24f),()=>_0x2f5b51[_0x3db03e(0x2fe)][_0x3db03e(0x1eb)](_0x6e505a,_0xb55c67,{'revision':_0x5bcdc8,'skipValidation':_0x4ce516}),{'verbose':_0x2662b4[_0x3db03e(0x304)]}),_0x54b01c=_0x80c0de[_0x3db03e(0x17b)];console[_0x3db03e(0x30f)](_0x3db03e(0x2dc)+_0x54b01c['sourceDir']);_0x54b01c[_0x3db03e(0x17a)]&&console['error'](_0x3db03e(0x1e5)+_0x54b01c[_0x3db03e(0x17a)]);console[_0x3db03e(0x30f)](_0x3db03e(0x165)+_0x54b01c[_0x3db03e(0x252)]),console[_0x3db03e(0x30f)]('Revision:\x20'+_0x54b01c['revision']),console[_0x3db03e(0x30f)](_0x3db03e(0x271)+_0x54b01c[_0x3db03e(0x20f)]);_0x54b01c['targetExists']&&(console[_0x3db03e(0x30f)](a42_0x3b83e4['yellow'](_0x3db03e(0x2a9)+_0x54b01c[_0x3db03e(0x252)]+_0x3db03e(0x20e)+_0x54b01c[_0x3db03e(0x290)]+')')),console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x1c3)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x2662b4[_0x3db03e(0x1b2)])return console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x1c3)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x2662b4['yes']){if(!isInteractive())return console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x305)](_0x3db03e(0x2eb)),_0x3db03e(0x207)),console['error'](a42_0x3b83e4['dim'](_0x3db03e(0x274))),0x1;const _0x5b0b07=_0x54b01c[_0x3db03e(0x17a)]||a42_0x17a291[_0x3db03e(0x1a9)](_0x6e505a),_0x35640f=_0x54b01c['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0xb55c67+'\x22\x20with\x20new\x20revision?':_0x3db03e(0x1a5)+_0x5b0b07+'\x22\x20to\x20new\x20project\x20\x22'+_0xb55c67+'\x22?',_0x26e88e=await confirmKey(_0x35640f);if(!_0x26e88e)return console[_0x3db03e(0x30f)](a42_0x3b83e4['yellow'](_0x3db03e(0x1f8))),0x1;}const _0x354792=await withSpinner(_0x54b01c['targetExists']?_0x3db03e(0x1ac)+_0xb55c67+_0x3db03e(0x2ae):_0x3db03e(0x282)+_0xb55c67+_0x3db03e(0x2ae),()=>_0x2f5b51['workflow'][_0x3db03e(0x301)](_0x54b01c),{'verbose':_0x2662b4[_0x3db03e(0x304)]}),_0x498dd3=_0x354792['data'];return console[_0x3db03e(0x30f)](a42_0x3b83e4[_0x3db03e(0x185)](_0x54b01c[_0x3db03e(0x16b)]?_0x3db03e(0x21d):_0x3db03e(0x283))),console[_0x3db03e(0x30f)]('\x20\x20Project:\x20'+_0x498dd3[_0x3db03e(0x252)]),console[_0x3db03e(0x30f)](_0x3db03e(0x195)+_0x498dd3[_0x3db03e(0x1ee)]),console[_0x3db03e(0x30f)](_0x3db03e(0x21a)+_0x498dd3[_0x3db03e(0x285)]),await this['showWorkflowConsoleUrl'](_0x2f5b51,_0x498dd3[_0x3db03e(0x252)],_0x2662b4[_0x3db03e(0x28a)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']='workflow:delete';[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x18c);async[a42_0x1c1cea(0x2fd)](_0x139916){const _0x165c7d=a42_0x1c1cea,{options:_0x5744d4,args:_0x26360c,tdx:_0xcd2041}=_0x139916,_0x2e4874=_0x26360c[0x0];if(!_0x2e4874)return console[_0x165c7d(0x30f)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x165c7d(0x30f)](_0x165c7d(0x1ef)),0x1;_0x5744d4[_0x165c7d(0x304)]&&console[_0x165c7d(0x30f)](_0x165c7d(0x2b0)+_0x2e4874);if(!_0x5744d4[_0x165c7d(0x199)]){if(!isInteractive())return console[_0x165c7d(0x30f)](a42_0x3b83e4[_0x165c7d(0x305)]('\x0aError:'),_0x165c7d(0x207)),console[_0x165c7d(0x30f)](a42_0x3b83e4[_0x165c7d(0x24a)](_0x165c7d(0x274))),0x1;const _0x2c8725=await confirmKey(_0x165c7d(0x225)+_0x2e4874+_0x165c7d(0x2bb));if(!_0x2c8725)return console[_0x165c7d(0x30f)](a42_0x3b83e4['yellow'](_0x165c7d(0x1f8))),0x1;}const _0x8ba4a9=await withSpinner(_0x165c7d(0x28b)+_0x2e4874+_0x165c7d(0x2ae),()=>_0xcd2041[_0x165c7d(0x2fe)][_0x165c7d(0x2c4)](_0x2e4874),{'verbose':_0x5744d4[_0x165c7d(0x304)]}),_0x359c66=_0x8ba4a9[_0x165c7d(0x17b)];return console['error'](_0x165c7d(0x2ef)+_0x359c66['projectName']),console[_0x165c7d(0x30f)](_0x165c7d(0x195)+_0x359c66[_0x165c7d(0x164)]),0x0;}}export function parseKeyValue(_0x586a01){const _0x566ea3=a42_0x1c1cea,_0x2907cc=_0x586a01['indexOf']('=');if(_0x2907cc===-0x1)throw new Error(_0x566ea3(0x16f)+_0x586a01+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x1e926a=_0x586a01['substring'](0x0,_0x2907cc),_0x5e2dd2=_0x586a01['substring'](_0x2907cc+0x1);if(!_0x1e926a)throw new Error(_0x566ea3(0x2a7));return{'key':_0x1e926a,'value':_0x5e2dd2};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x2da);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x2d0);async[a42_0x1c1cea(0x2fd)](_0x27e257){const _0x5ca026=a42_0x1c1cea,{options:_0x10f0d1,args:_0x3db9ef,tdx:_0xf1c8a7}=_0x27e257,_0x28de1a=this[_0x5ca026(0x244)](_0x3db9ef,_0x10f0d1);if(!_0x28de1a)return 0x1;_0x10f0d1[_0x5ca026(0x304)]&&console[_0x5ca026(0x30f)](_0x5ca026(0x2b0)+_0x28de1a);const _0x1eb0f6=await withSpinner('Listing\x20secrets...',()=>_0xf1c8a7[_0x5ca026(0x2fe)][_0x5ca026(0x2c2)](_0x28de1a),{'verbose':_0x10f0d1['verbose']}),{secrets:_0x1a523a}=_0x1eb0f6[_0x5ca026(0x17b)];return console[_0x5ca026(0x30f)](_0x5ca026(0x2fa)+_0x1a523a[_0x5ca026(0x177)]+_0x5ca026(0x23d)+(_0x1a523a[_0x5ca026(0x177)]!==0x1?'s':'')),await handleSDKOutput(_0x1a523a,_0x10f0d1),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0x1c1cea(0x187);[a42_0x1c1cea(0x181)]=a42_0x1c1cea(0x196);async[a42_0x1c1cea(0x2fd)](_0x2e44c3){const _0x4c8a83=a42_0x1c1cea,{options:_0x3d37e0,args:_0x43fda2,tdx:_0x161093}=_0x2e44c3;let _0x2b8460,_0x3aa36f;if(_0x43fda2[_0x4c8a83(0x177)]>=0x2)_0x2b8460=_0x43fda2[0x0],_0x3aa36f=_0x43fda2[0x1];else{if(_0x43fda2[_0x4c8a83(0x177)]===0x1&&_0x3d37e0[_0x4c8a83(0x26e)])_0x2b8460=_0x3d37e0[_0x4c8a83(0x26e)],_0x3aa36f=_0x43fda2[0x0];else return _0x43fda2[_0x4c8a83(0x177)]===0x1?(console[_0x4c8a83(0x30f)](_0x4c8a83(0x2e3)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x4c8a83(0x30f)](_0x4c8a83(0x24d)),console['error'](_0x4c8a83(0x16c)),0x1);}let _0x170d14,_0x2519e4;try{({key:_0x170d14,value:_0x2519e4}=parseKeyValue(_0x3aa36f));}catch(_0x3d8e7a){return _0x3d8e7a instanceof Error&&console[_0x4c8a83(0x30f)](a42_0x3b83e4[_0x4c8a83(0x305)](_0x4c8a83(0x212)),_0x3d8e7a['message']),0x1;}_0x3d37e0[_0x4c8a83(0x304)]&&(console['error']('Project:\x20'+_0x2b8460),console[_0x4c8a83(0x30f)]('Key:\x20'+_0x170d14));const _0x4e26d4=await withSpinner('Setting\x20secret...',()=>_0x161093[_0x4c8a83(0x2fe)]['setSecret'](_0x2b8460,_0x170d14,_0x2519e4),{'verbose':_0x3d37e0[_0x4c8a83(0x304)]}),_0x4b9d28=_0x4e26d4[_0x4c8a83(0x17b)];return console[_0x4c8a83(0x30f)](_0x4c8a83(0x1c1)+_0x4b9d28['key']+_0x4c8a83(0x1db)+_0x4b9d28['projectName']+'\x27'),(_0x3d37e0['json']||_0x3d37e0[_0x4c8a83(0x18a)])&&await handleSingleObjectOutput(_0x4b9d28,_0x3d37e0),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x1dd);['description']=a42_0x1c1cea(0x241);async[a42_0x1c1cea(0x2fd)](_0x4e0db5){const _0x79e6c9=a42_0x1c1cea,{options:_0x145930,args:_0x28dae4,tdx:_0x2e1b1c}=_0x4e0db5;let _0x52192c,_0x1de023;if(_0x28dae4[_0x79e6c9(0x177)]>=0x2)_0x52192c=_0x28dae4[0x0],_0x1de023=_0x28dae4[0x1];else{if(_0x28dae4[_0x79e6c9(0x177)]===0x1&&_0x145930[_0x79e6c9(0x26e)])_0x52192c=_0x145930['workflowProject'],_0x1de023=_0x28dae4[0x0];else return _0x28dae4[_0x79e6c9(0x177)]===0x1?(console['error'](_0x79e6c9(0x2e3)),console['error'](_0x79e6c9(0x263)),0x1):(console[_0x79e6c9(0x30f)](_0x79e6c9(0x19c)),console['error'](_0x79e6c9(0x20d)),0x1);}_0x145930[_0x79e6c9(0x304)]&&(console['error']('Project:\x20'+_0x52192c),console[_0x79e6c9(0x30f)](_0x79e6c9(0x234)+_0x1de023));if(!_0x145930[_0x79e6c9(0x199)]){if(!isInteractive())return console[_0x79e6c9(0x30f)](a42_0x3b83e4[_0x79e6c9(0x305)](_0x79e6c9(0x2eb)),_0x79e6c9(0x207)),console[_0x79e6c9(0x30f)](a42_0x3b83e4[_0x79e6c9(0x24a)](_0x79e6c9(0x274))),0x1;const _0x4e5ee1=await confirmKey(_0x79e6c9(0x186)+_0x1de023+_0x79e6c9(0x2d1)+_0x52192c+'\x27?');if(!_0x4e5ee1)return console[_0x79e6c9(0x30f)](a42_0x3b83e4[_0x79e6c9(0x1c3)](_0x79e6c9(0x1f8))),0x1;}const _0x31714d=await withSpinner(_0x79e6c9(0x17d),()=>_0x2e1b1c[_0x79e6c9(0x2fe)][_0x79e6c9(0x29a)](_0x52192c,_0x1de023),{'verbose':_0x145930['verbose']}),_0x2142ba=_0x31714d[_0x79e6c9(0x17b)];return console[_0x79e6c9(0x30f)]('✔\x20Secret\x20\x27'+_0x2142ba['key']+_0x79e6c9(0x1da)+_0x2142ba[_0x79e6c9(0x20b)]+'\x27'),(_0x145930['json']||_0x145930[_0x79e6c9(0x18a)])&&await handleSingleObjectOutput(_0x2142ba,_0x145930),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x2b7397){const _0xac3696=a42_0x1c1cea,_0x485419=Math[_0xac3696(0x1c0)](_0x2b7397/0x3e8),_0x1ade4c=Math[_0xac3696(0x1c0)](_0x485419/0x3c),_0x2ab89c=Math[_0xac3696(0x1c0)](_0x1ade4c/0x3c),_0x137189=Math[_0xac3696(0x1c0)](_0x2ab89c/0x18);if(_0x137189>0x0){const _0x4f8e34=_0x2ab89c%0x18;return _0x4f8e34>0x0?_0x137189+'d\x20'+_0x4f8e34+'h':_0x137189+'d';}else{if(_0x2ab89c>0x0){const _0x4072b0=_0x1ade4c%0x3c;return _0x4072b0>0x0?_0x2ab89c+'h\x20'+_0x4072b0+'m':_0x2ab89c+'h';}else{if(_0x1ade4c>0x0){const _0x3fa9d5=_0x485419%0x3c;return _0x3fa9d5>0x0?_0x1ade4c+'m\x20'+_0x3fa9d5+'s':_0x1ade4c+'m';}else return _0x485419+'s';}}}function formatTimestamp(_0x18c826,_0x243e97){const _0x4aac22=a42_0x1c1cea,_0x5f7996=new Date(_0x18c826),_0x202652=String(_0x5f7996['getHours']())[_0x4aac22(0x2ec)](0x2,'0'),_0x5d262d=String(_0x5f7996[_0x4aac22(0x2ce)]())['padStart'](0x2,'0'),_0x5997f4=_0x202652+':'+_0x5d262d,_0x36e7e6=_0x5f7996['getFullYear']()===_0x243e97[_0x4aac22(0x25f)]()&&_0x5f7996[_0x4aac22(0x206)]()===_0x243e97[_0x4aac22(0x206)]()&&_0x5f7996[_0x4aac22(0x254)]()===_0x243e97[_0x4aac22(0x254)]();if(_0x36e7e6)return _0x5997f4;else{const _0x3e9e52=String(_0x5f7996[_0x4aac22(0x206)]()+0x1)['padStart'](0x2,'0'),_0x3d31f8=String(_0x5f7996[_0x4aac22(0x254)]())[_0x4aac22(0x2ec)](0x2,'0');return _0x3e9e52+'-'+_0x3d31f8+'\x20'+_0x5997f4;}}function formatDate(_0x45adba){const _0x1fa54d=a42_0x1c1cea,_0x1a76e3=_0x45adba[_0x1fa54d(0x25f)](),_0x432476=String(_0x45adba[_0x1fa54d(0x206)]()+0x1)[_0x1fa54d(0x2ec)](0x2,'0'),_0x3e6ef6=String(_0x45adba[_0x1fa54d(0x254)]())['padStart'](0x2,'0');return _0x1a76e3+'-'+_0x432476+'-'+_0x3e6ef6;}function getTaskStateIcon(_0x343004){const _0x1bf091={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1bf091[_0x343004]||'⚪';}function getBarChar(_0x516a94){const _0x315f32=a42_0x1c1cea;return _0x516a94===_0x315f32(0x30f)||_0x516a94===_0x315f32(0x262)?'×':'─';}function getBarColor(_0x255bd2){const _0x3e4827=a42_0x1c1cea,_0x334166={'success':a42_0x3b83e4[_0x3e4827(0x185)],'error':a42_0x3b83e4[_0x3e4827(0x305)],'group_error':a42_0x3b83e4[_0x3e4827(0x305)],'running':a42_0x3b83e4[_0x3e4827(0x2d2)],'blocked':a42_0x3b83e4[_0x3e4827(0x1c3)],'planned':a42_0x3b83e4[_0x3e4827(0x24a)],'canceling':a42_0x3b83e4[_0x3e4827(0x1c3)]};return _0x334166[_0x255bd2]||a42_0x3b83e4[_0x3e4827(0x1e2)];}function parseTaskName(_0xb11cb2){const _0xea2b55=a42_0x1c1cea;let _0x14aa16=_0xb11cb2['replace'](/^\++/,'');const _0x266f4a=_0x14aa16[_0xea2b55(0x197)]('+'),_0x3a9838=_0x266f4a['length']>0x1?_0x266f4a['length']-0x2:0x0,_0x24cd88=_0x266f4a[_0x266f4a[_0xea2b55(0x177)]-0x1]||_0x14aa16;return{'level':_0x3a9838,'name':'+'+_0x24cd88};}function truncateTaskName(_0x29e7fa,_0x19db9c){const _0x3cd437=a42_0x1c1cea,_0x1bc71c=stringWidth(_0x29e7fa);if(_0x1bc71c<=_0x19db9c)return _0x29e7fa;let _0x14274d=_0x29e7fa;while(stringWidth(_0x14274d+'…')>_0x19db9c&&_0x14274d[_0x3cd437(0x177)]>0x0){_0x14274d=_0x14274d[_0x3cd437(0x175)](0x0,-0x1);}return _0x14274d+'…';}function calculateTimeScale(_0x33b015,_0x479395){const _0x4319ca=a42_0x1c1cea;return{'startTime':_0x33b015[_0x4319ca(0x1e3)],'endTime':_0x33b015[_0x4319ca(0x28c)],'durationMs':_0x33b015[_0x4319ca(0x276)],'msPerChar':_0x33b015[_0x4319ca(0x276)]/_0x479395};}function timeToPosition(_0x2fd7ae,_0x229082,_0xedf64f){const _0x5a50d1=a42_0x1c1cea,_0x7a2a4a=_0x2fd7ae-_0x229082['startTime'],_0x3bd170=Math['floor'](_0x7a2a4a/_0x229082[_0x5a50d1(0x1d1)]);return Math[_0x5a50d1(0x292)](0x0,Math[_0x5a50d1(0x1e8)](_0x3bd170,_0xedf64f));}function renderTimeAxis(_0x375814,_0x52b9ef){const _0x53eb11=a42_0x1c1cea,_0x12cc32=Math[_0x53eb11(0x1e8)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x53eb11(0x292)](TIMELINE_CONFIG[_0x53eb11(0x275)],Math[_0x53eb11(0x1c0)](_0x52b9ef/TIMELINE_CONFIG[_0x53eb11(0x202)]))),_0x3c7606=_0x375814[_0x53eb11(0x257)]/(_0x12cc32-0x1),_0x1e4df4=new Date(_0x375814['startTime']),_0x507805=[];for(let _0x37e934=0x0;_0x37e934<_0x12cc32;_0x37e934++){const _0x3be057=_0x375814[_0x53eb11(0x2c9)]+_0x37e934*_0x3c7606,_0x44b5dc=timeToPosition(_0x3be057,_0x375814,_0x52b9ef),_0x412a7d=formatTimestamp(_0x3be057,_0x1e4df4);_0x507805[_0x53eb11(0x1d6)]({'pos':_0x44b5dc,'text':_0x412a7d});}const _0xc7a748=new Array(_0x52b9ef)[_0x53eb11(0x26c)]('\x20');let _0x3a0ad2=-0x1;for(const {pos:_0x328f20,text:_0x50c670}of _0x507805){let _0x1e4255=Math[_0x53eb11(0x292)](0x0,_0x328f20-Math[_0x53eb11(0x1c0)](_0x50c670['length']/0x2));_0x1e4255<=_0x3a0ad2+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x1e4255=_0x3a0ad2+TIMELINE_CONFIG[_0x53eb11(0x2e7)]+0x1);_0x1e4255+_0x50c670[_0x53eb11(0x177)]>_0x52b9ef&&(_0x1e4255=_0x52b9ef-_0x50c670[_0x53eb11(0x177)]);if(_0x1e4255>=0x0&&_0x1e4255+_0x50c670[_0x53eb11(0x177)]<=_0x52b9ef&&_0x1e4255>_0x3a0ad2){for(let _0x107bc2=0x0;_0x107bc2<_0x50c670[_0x53eb11(0x177)];_0x107bc2++){_0xc7a748[_0x1e4255+_0x107bc2]=_0x50c670[_0x107bc2];}_0x3a0ad2=_0x1e4255+_0x50c670['length']-0x1;}}return _0xc7a748['join']('');}function renderTaskRow(_0x195724,_0x3cfdfd,_0x1fdcd5,_0x5c3ebb){const _0x5e823d=a42_0x1c1cea,{level:_0x415d13,name:_0x47e9fe}=parseTaskName(_0x195724['name']),_0x11ebbe='\x20'[_0x5e823d(0x21c)](_0x415d13),_0x49e7b2=_0x195724[_0x5e823d(0x2bf)]?'('+formatElapsed(_0x195724[_0x5e823d(0x2bf)][_0x5e823d(0x276)])+')':'',_0xc2a5c6=stringWidth(_0x49e7b2),_0x4b4d63=_0x415d13*0x1,_0x176ad4=_0x5c3ebb-_0x4b4d63-_0xc2a5c6-0x1,_0x5bbdde=truncateTaskName(_0x47e9fe,_0x176ad4),_0x333deb=_0x11ebbe+_0x5bbdde,_0x11e580=stringWidth(_0x333deb),_0x15fc9b=_0x5c3ebb-_0x11e580-_0xc2a5c6,_0x35e4f=_0x333deb+'\x20'['repeat'](Math['max'](0x1,_0x15fc9b))+a42_0x3b83e4[_0x5e823d(0x24a)](_0x49e7b2),_0x394345=getTaskStateIcon(_0x195724[_0x5e823d(0x2a8)]),_0x5d36f7=new Array(_0x1fdcd5)[_0x5e823d(0x26c)]('\x20');if(_0x195724[_0x5e823d(0x2bf)]){const _0x47c918=timeToPosition(_0x195724[_0x5e823d(0x2bf)]['start'],_0x3cfdfd,_0x1fdcd5),_0x3b908a=timeToPosition(_0x195724['window'][_0x5e823d(0x28c)],_0x3cfdfd,_0x1fdcd5),_0x52b4b7=getBarChar(_0x195724['state']),_0x5b0d16=Math[_0x5e823d(0x292)](_0x47c918+0x1,_0x3b908a);for(let _0x5a480b=_0x47c918;_0x5a480b<Math[_0x5e823d(0x1e8)](_0x5b0d16,_0x1fdcd5);_0x5a480b++){_0x5d36f7[_0x5a480b]=_0x52b4b7;}}const _0x584d10=getBarColor(_0x195724[_0x5e823d(0x2a8)]),_0x206628=_0x5d36f7[_0x5e823d(0x2aa)](_0x112191=>_0x112191==='\x20'?'\x20':_0x584d10(_0x112191))['join']('');return _0x394345+'\x20'+_0x35e4f+'│'+_0x206628+'│';}function calculateStats(_0x1c7cdf){const _0x165e22=a42_0x1c1cea,_0x5854ac={'total':_0x1c7cdf['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x5ad348 of _0x1c7cdf){if(_0x5ad348[_0x165e22(0x2a8)]===_0x165e22(0x310))_0x5854ac[_0x165e22(0x310)]++;else{if(_0x5ad348[_0x165e22(0x2a8)]===_0x165e22(0x30f)||_0x5ad348[_0x165e22(0x2a8)]===_0x165e22(0x262))_0x5854ac[_0x165e22(0x30f)]++;else _0x5ad348[_0x165e22(0x2a8)]===_0x165e22(0x2ca)?_0x5854ac[_0x165e22(0x2ca)]++:_0x5854ac[_0x165e22(0x208)]++;}}return _0x5854ac;}function a42_0x11c0(){const _0x40c0c8=['Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','resumeFrom','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Invalid\x20format:\x20','workflow:retry','keys','task','match','stdout','slice','Expected\x20format:\x20--param\x20key=value','length','No\x20workflows\x20found','renderTimeline','sourceProjectName','data','MIN_TIMELINE_WIDTH','Deleting\x20secret...','workflow:tasks','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','retryAttempt','description','\x0aFailed\x20to\x20fetch\x20attempt\x20data','total','Latest\x20session\x20has\x20no\x20attempt','green','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','workflow:secrets:set','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','jsonl','kill','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','resolveProjectDir','planned','Error:\x20Invalid\x20parameter\x20format:\x20','\x20\x20Location:\x20','buildTimelineData','List\x20workflow\x20execution\x20sessions','attempt:','Show\x20specific\x20attempt\x20details','\x20\x20Project\x20ID:\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','split','From\x20task:\x20','yes','path','name','Error:\x20Secret\x20key\x20is\x20required','Listing\x20workflow\x20attempts...','clear','new','No\x20sessions\x20found\x20for:\x20','Including\x20subtasks:\x20yes','✔\x20Pushed\x20','startedAt','\x0a✔\x20Attempt\x20complete','\x0aClone\x20\x22','288meAUoe','unchanged','Dry\x20run:\x20yes','basename','lastAttempt','Error:\x20Invalid\x20JSON\x20in\x20--params','Updating\x20','\x20(system)','sys','Target\x20directory:\x20','Parameters:\x20','from','dryRun','Project\x20directory:\x20','Resume\x20from:\x20','Task\x20name:\x20','\x20\x20Session\x20ID:\x20','navigateSessionsInteractive','Source\x20directory:\x20','tasks','Target:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','workflow:upload','parseProjectWorkflowPattern','Start\x20a\x20workflow\x20run','startsWith','floor','✔\x20Secret\x20\x27','fileSize','yellow','✔\x20Workflow\x20run\x20started','parse','round','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','cyan','List\x20all\x20workflow\x20projects','summary','Workflow:\x20','Pushing\x20workflow\x20project...','\x20session','select','now','🔄\x20','msPerChar','/app/workflows/','\x20-\x20','Revision:\x20','Include\x20retried:\x20yes','push','\x20(use\x20--limit\x20to\x20show\x20more)','retrySession','join','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','changes','workflow:secrets:delete','workflow:run','logFiles','resolve','No\x20attempts\x20found','white','start','hasChanges','Source\x20project:\x20','cwd','GUTTER','min','fs/promises','diff','prepareCloneProject','---\x20','showWorkflowConsoleUrl','newProjectId','Usage:\x20workflow:delete\x20<project-name-or-id>','sessionId','sessionTime','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','session_id','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Cancelled','logs','\x20from\x20session\x20','every','renderSingleTimeline','443304CvxHtL','POLL_INTERVAL_MS','Force:\x20yes','\x20modified','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','LABEL_WIDTH_DIVISOR','params','MAX_TASKS_DISPLAY','Error:\x20Attempt\x20ID\x20is\x20required','getMonth','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','pending','text','No\x20projects\x20match\x20pattern:\x20','projectName','done','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x22\x20already\x20exists\x20(ID:\x20','fileCount','fromTask','Project\x20filter:\x20','Error:','toLowerCase','deleted','ICON_SPACING','trimEnd','get','Session\x20','values','\x20\x20Revision:\x20','-\x20nothing\x20pushed','repeat','✔\x20Project\x20updated','54980ICcckC','getTime','size','Error:\x20',',\x20Workflow:\x20','Using\x20attempt\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Session\x20time:\x20','follow','✔\x20Workflow\x20project\x20set\x20to:\x20','\x20\x20Session\x20context\x20set\x20to:\x20','isTTY','Pulling\x20project\x20','\x20new','\x20workflow','workflow:projects','key','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','fullName','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','(unknown)','Key:\x20','Project\x20name\x20is\x20required','sessions','unknown','\x20task','161192fLFItc','list','✔\x20Showing\x20','Downloading\x20logs...','\x20secret','Starting\x20workflow\x20run...','updatedAt','columns','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','all','modified','requireProject','context','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','find','Filter:\x20project=','Retry\x20a\x20session\x20or\x20attempt','dim','\x20\x20Files\x20extracted:\x20','128270YQWvjS','Error:\x20KEY=VALUE\x20is\x20required','finishedAt','Analyzing\x20project...','project','pollTimeline','newProjectName','\x0a✔\x20Already\x20up\x20to\x20date','getDate','No\x20log\x20content\x20found','renderSessionsTimeline','durationMs','attempt','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','taskName','💡\x20Tip:\x20Use\x20','\x20\x20Console:\x20','status','session','getFullYear','Retrying\x20session...','\x20\x20tdx\x20wf\x20use\x20<project>','group_error','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','isNewProject','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','workflow:pull','Project\x20name:\x20','Reason:\x20','26552LQXnrP','resolveProjectId','✔\x20Push\x20complete','fill','/sessions/','workflowProject','substring','No\x20workflow\x20sessions\x20found','Files\x20to\x20upload:\x20','sourceDir','⚠\x20Showing\x20first\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','MIN_LABEL_COUNT','duration','canceling','\x20project','\x20\x20Project:\x20','json','No\x20workflow\x20projects\x20found','type','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Usage:\x20tdx\x20wf\x20use\x20<project>','cancelRequested','Kill\x20a\x20running\x20attempt','tdx.json','Cloning\x20to\x20','✔\x20Clone\x20complete','Filter:\x20','revision','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Show\x20tasks\x20for\x20an\x20attempt','No\x20sessions\x20found','\x20unchanged','site','Deleting\x20project\x20','end','message','/attempt/','Retrying\x20attempt...','existingProjectId','No\x20workflows\x20found\x20in\x20project:\x20','max','table','Source\x20directory\x20is\x20required','Output\x20directory:\x20','Status:\x20','Getting\x20attempt\x20details...','targetDir','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','deleteSecret','session:','set','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x1b[1A\x1b[2K','workflow:sessions','skipValidation','Select\x20a\x20workflow\x20to\x20run','Loading\x20sessions...','6HUhXEp','Writing\x20files...','rows','title','Key\x20cannot\x20be\x20empty','state','\x0a⚠\x20Project\x20\x22','map','workflow:workflows','→\x20New\x20project:\x20','workflow:timeline','...','Validation:\x20skipped','Project:\x20','format','No\x20sessions\x20found\x20in\x20project:\x20','value','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','has','download','workflows','Analyzing\x20changes...','Resolving\x20project\x20\x27','Getting\x20attempt\x20tasks...','\x22?\x20This\x20cannot\x20be\x20undone.','452206fceFTY','output','406BKuhUO','window','stat','Params:\x20','listSecrets','MAX_POLL_ITERATIONS','delete','\x20\x20Changes:\x20','filter','\x0a✔\x20No\x20changes\x20to\x20push','indexOf','startTime','running','workflowName','isDirectory','Failed\x20to\x20fetch\x20attempt\x20data','getMinutes','workflow:clone','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x27\x20from\x20project\x20\x27','blue','includeSubtasks','localeCompare','Auto-selected\x20latest\x20session:\x20','Attempt\x20ID:\x20','retryAttemptName','sort','Session\x20not\x20found:\x20','workflow:secrets:list','workflow:logs','Source:\x20','\x20deleted','Pattern:\x20','Total:\x20','relative','pullProject','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Error:\x20Project\x20name\x20is\x20required','write','✔\x20Retry\x20started','\x20of\x20','LABEL_MIN_SPACING','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','splice','No\x20attempts\x20found\x20for:\x20','\x0aError:','padStart','ICON_WIDTH','\x20is\x20not\x20a\x20directory','✔\x20Deleted\x20project\x20','\x0aPush\x20these\x20changes?','limit','Listing\x20workflows...','projects','\x0aDry\x20run\x20-\x20no\x20files\x20written','createdAt','workflow:attempts','reason','\x20\x20Workflow:\x20','workflow:kill','✔\x20Found\x20','index','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','execute','workflow','\x20\x20Attempt\x20ID:\x20','551710qtjHmb','executeCloneProject','resolveProject','icon','verbose','red','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','attemptId','includes','toISOString','📁\x20','param','workflow:download','\x20sessions\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','error','success','workflow:use','some','generateSessionTimelineRows','\x20tasks','projectId','New\x20project\x20name:\x20','-\x20no\x20files\x20written','log','Select\x20a\x20task\x20to\x20view\x20logs:','force','applyPullProject','targetExists'];a42_0x11c0=function(){return _0x40c0c8;};return a42_0x11c0();}function formatStats(_0x54c43a){const _0x554ba0=a42_0x1c1cea;return[_0x554ba0(0x2df)+_0x54c43a[_0x554ba0(0x183)],'✅\x20'+_0x54c43a[_0x554ba0(0x310)],'❌\x20'+_0x54c43a['error'],_0x554ba0(0x1d0)+_0x54c43a[_0x554ba0(0x2ca)],'⏳\x20'+_0x54c43a[_0x554ba0(0x208)]][_0x554ba0(0x1d9)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x1c1cea(0x19b)]=a42_0x1c1cea(0x2ad);['description']=a42_0x1c1cea(0x230);async[a42_0x1c1cea(0x2fd)](_0x72fa65){const _0x569c2b=a42_0x1c1cea,{options:_0x9c832f,args:_0x1f366e,tdx:_0x2def67}=_0x72fa65;let _0x1b9d70,_0x5141a8,_0x311f1e=![];if(_0x1f366e[0x0]){if(_0x1f366e[0x0]['includes']('.')){const _0x361a4c=this[_0x569c2b(0x1bd)](_0x1f366e,_0x9c832f);if(!_0x361a4c)return 0x1;_0x1b9d70=_0x361a4c[_0x569c2b(0x20b)],_0x5141a8=_0x361a4c[_0x569c2b(0x2cb)];}else{_0x5141a8=_0x1f366e[0x0],_0x1b9d70=_0x9c832f[_0x569c2b(0x26e)];if(!_0x1b9d70)return console[_0x569c2b(0x30f)](a42_0x3b83e4[_0x569c2b(0x305)](_0x569c2b(0x212)),_0x569c2b(0x17f)),0x1;_0x311f1e=!![];}}else{const _0x923177=this['parseProjectWorkflowPattern'](_0x1f366e,_0x9c832f);if(!_0x923177)return 0x1;_0x1b9d70=_0x923177[_0x569c2b(0x20b)],_0x5141a8=_0x923177[_0x569c2b(0x2cb)];}if(_0x9c832f['verbose']){if(_0x1b9d70&&_0x5141a8)console['error'](_0x569c2b(0x284)+_0x1b9d70+'.'+_0x5141a8);else _0x1b9d70&&console['error']('Filter:\x20project='+_0x1b9d70);}const _0x49a872=_0x9c832f['attemptId'],_0x31af65=_0x9c832f['sessionId'];if(_0x49a872){_0x31af65&&console[_0x569c2b(0x30f)](a42_0x3b83e4[_0x569c2b(0x1c3)]('Warning:'),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x4d5401=_0x9c832f[_0x569c2b(0x227)];return _0x4d5401?await this[_0x569c2b(0x251)](_0x72fa65,_0x49a872):await this[_0x569c2b(0x1fc)](_0x72fa65,_0x49a872,_0x9c832f),0x0;}if(_0x31af65){const _0x5c9523=await withSpinner('Loading\x20session...',()=>_0x2def67[_0x569c2b(0x2fe)]['sessions']({'projectName':_0x1b9d70,'workflowName':_0x5141a8,'limit':0x64}),{'verbose':_0x9c832f[_0x569c2b(0x304)]}),_0x23e2ef=_0x5c9523[_0x569c2b(0x17b)][_0x569c2b(0x247)](_0x446b53=>_0x446b53['id']===_0x31af65);if(!_0x23e2ef)return console[_0x569c2b(0x30f)](a42_0x3b83e4[_0x569c2b(0x305)]('Error:'),_0x569c2b(0x2d9)+_0x31af65),0x1;if(!_0x23e2ef['lastAttempt']?.['id'])return console[_0x569c2b(0x30f)](a42_0x3b83e4[_0x569c2b(0x305)](_0x569c2b(0x212)),_0x569c2b(0x218)+_0x31af65+'\x20has\x20no\x20attempts'),0x1;const _0x5140e2=_0x23e2ef[_0x569c2b(0x1aa)]['id'];_0x9c832f['verbose']&&console[_0x569c2b(0x30f)](_0x569c2b(0x223)+_0x5140e2+_0x569c2b(0x1fa)+_0x31af65);const _0x4da0ea=_0x9c832f[_0x569c2b(0x227)];return _0x4da0ea?await this['pollTimeline'](_0x72fa65,_0x5140e2):await this['renderSingleTimeline'](_0x72fa65,_0x5140e2,_0x9c832f),0x0;}const _0x2c588a=await withSpinner(_0x569c2b(0x2a2),()=>_0x2def67['workflow'][_0x569c2b(0x236)]({'projectName':_0x1b9d70,'workflowName':_0x5141a8,'limit':_0x9c832f[_0x569c2b(0x2f1)]||0x32}),{'verbose':_0x9c832f[_0x569c2b(0x304)]}),_0x13613e=_0x2c588a[_0x569c2b(0x17b)];if(_0x13613e[_0x569c2b(0x177)]===0x0){if(_0x1b9d70&&_0x5141a8)console['error'](_0x569c2b(0x1a0)+_0x1b9d70+'.'+_0x5141a8);else _0x1b9d70?console[_0x569c2b(0x30f)](_0x569c2b(0x2b2)+_0x1b9d70):(console[_0x569c2b(0x30f)](_0x569c2b(0x270)),console[_0x569c2b(0x30f)](a42_0x3b83e4[_0x569c2b(0x24a)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x13613e[_0x569c2b(0x2d8)]((_0x3eb14c,_0x83eae0)=>{const _0x2c568f=_0x569c2b,_0x16226f=_0x3eb14c['sessionTime']||'',_0x5939ad=_0x83eae0[_0x2c568f(0x1f1)]||'';return _0x5939ad[_0x2c568f(0x2d4)](_0x16226f);});if(_0x9c832f['json']||_0x9c832f[_0x569c2b(0x18a)])return await handleSDKOutput(_0x13613e,_0x9c832f),0x0;let _0x361701;if(_0x311f1e){const _0x2efc68=_0x13613e[0x0];if(!_0x2efc68[_0x569c2b(0x1aa)]?.['id'])return console[_0x569c2b(0x30f)](_0x569c2b(0x184)),0x0;_0x361701=_0x2efc68[_0x569c2b(0x1aa)]['id'],_0x9c832f[_0x569c2b(0x304)]&&console[_0x569c2b(0x30f)](_0x569c2b(0x2d5)+_0x2efc68[_0x569c2b(0x1f1)]);}else{const _0x13c125=_0x13613e['map'](_0x194310=>{const _0x523171=_0x569c2b,_0x260765=getAttemptStatusDisplay(_0x194310[_0x523171(0x1aa)]);return{'title':_0x194310[_0x523171(0x250)]?.[_0x523171(0x19b)]+'.'+_0x194310[_0x523171(0x2fe)]?.[_0x523171(0x19b)]+_0x523171(0x1d3)+_0x194310[_0x523171(0x1f1)]+'\x20'+_0x260765[_0x523171(0x303)],'value':_0x194310[_0x523171(0x1aa)]?.['id']||'','description':_0x260765[_0x523171(0x209)]};}),_0x5d4f7f=await a42_0x399419({'type':'select','name':_0x569c2b(0x307),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x13c125[_0x569c2b(0x2c6)](_0x22b231=>_0x22b231[_0x569c2b(0x2b3)]!=='')});if(!_0x5d4f7f['attemptId'])return 0x0;_0x361701=_0x5d4f7f[_0x569c2b(0x307)];}const _0x4608b9=_0x9c832f[_0x569c2b(0x227)];return _0x4608b9?await this[_0x569c2b(0x251)](_0x72fa65,_0x361701):await this['renderSingleTimeline'](_0x72fa65,_0x361701,_0x9c832f),0x0;}async[a42_0x1c1cea(0x1fc)](_0x2c6942,_0xd1c107,_0x14ae31){const _0x4c91a5=a42_0x1c1cea,{tdx:_0x3f624c}=_0x2c6942;let _0x1295fa,_0xaa1539;try{[_0x1295fa,_0xaa1539]=await Promise[_0x4c91a5(0x242)]([_0x3f624c[_0x4c91a5(0x2fe)][_0x4c91a5(0x258)](_0xd1c107),_0x3f624c[_0x4c91a5(0x2fe)]['tasks'](_0xd1c107,![])]);}catch(_0x12ca9e){console['error'](a42_0x3b83e4[_0x4c91a5(0x305)](_0x4c91a5(0x2cd)));_0x14ae31[_0x4c91a5(0x304)]&&console['error'](_0x12ca9e);throw _0x12ca9e;}if(_0x14ae31[_0x4c91a5(0x27a)]||_0x14ae31['jsonl']){const _0x2ba903=this['buildTimelineData'](_0x1295fa,_0xaa1539);await handleSDKOutput([_0x2ba903],_0x14ae31);return;}const _0x3cf3ce=_0x3f624c['context'][_0x4c91a5(0x28a)],_0x1ae246=this[_0x4c91a5(0x179)](_0x1295fa,_0xaa1539,_0x3cf3ce);console[_0x4c91a5(0x167)](_0x1ae246);}async[a42_0x1c1cea(0x251)](_0x2563ea,_0x131202){const _0x19e7bf=a42_0x1c1cea,{tdx:_0x19f983}=_0x2563ea,_0x2dc09f=TIMELINE_CONFIG[_0x19e7bf(0x1fe)],_0x3cce36=TIMELINE_CONFIG[_0x19e7bf(0x2c3)];let _0x47b938=0x0;while(_0x47b938<_0x3cce36){process[_0x19e7bf(0x174)][_0x19e7bf(0x22a)]&&process[_0x19e7bf(0x174)]['write']('\x1bc');let _0x2cca3a,_0x42f3c9;try{[_0x2cca3a,_0x42f3c9]=await Promise[_0x19e7bf(0x242)]([_0x19f983[_0x19e7bf(0x2fe)][_0x19e7bf(0x258)](_0x131202),_0x19f983[_0x19e7bf(0x2fe)][_0x19e7bf(0x1b9)](_0x131202,![])]);}catch(_0x188a70){console[_0x19e7bf(0x30f)](a42_0x3b83e4[_0x19e7bf(0x305)](_0x19e7bf(0x182)));_0x47b938>0x0&&console[_0x19e7bf(0x30f)](a42_0x3b83e4[_0x19e7bf(0x24a)](_0x19e7bf(0x2e2)+_0x47b938));throw _0x188a70;}const _0x4f5687=_0x19f983[_0x19e7bf(0x245)][_0x19e7bf(0x28a)],_0x49d1c3=this[_0x19e7bf(0x179)](_0x2cca3a,_0x42f3c9,_0x4f5687);console[_0x19e7bf(0x167)](_0x49d1c3);const _0x3f5f91=_0x2cca3a[_0x19e7bf(0x20c)]&&_0x42f3c9[_0x19e7bf(0x1fb)](_0x16f748=>_0x16f748[_0x19e7bf(0x2a8)]!==_0x19e7bf(0x2ca)&&_0x16f748[_0x19e7bf(0x2a8)]!=='planned');if(_0x3f5f91){console[_0x19e7bf(0x30f)](a42_0x3b83e4[_0x19e7bf(0x185)](_0x19e7bf(0x1a4)));break;}console['error'](a42_0x3b83e4[_0x19e7bf(0x24a)]('\x0aPolling...\x20('+_0x47b938*0x2+_0x19e7bf(0x286))),await new Promise(_0x5b30ba=>setTimeout(_0x5b30ba,_0x2dc09f)),_0x47b938++;}_0x47b938>=_0x3cce36&&console['error'](a42_0x3b83e4[_0x19e7bf(0x1c3)](_0x19e7bf(0x29d)));}[a42_0x1c1cea(0x179)](_0x559e68,_0x47de38,_0x446b20){const _0x2424b7=a42_0x1c1cea,_0x532f86=[],_0x538b65=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0xd98019=0x5,_0x18bcdf=process[_0x2424b7(0x174)][_0x2424b7(0x240)]||0x78,_0x5f8a80=_0x18bcdf-_0x538b65-_0xd98019,_0x22386e=Math[_0x2424b7(0x292)](TIMELINE_CONFIG[_0x2424b7(0x17c)],Math[_0x2424b7(0x1e8)](_0x5f8a80,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0xed51a=new Date(_0x559e68[_0x2424b7(0x2f5)])[_0x2424b7(0x21f)](),_0x224844=_0x559e68[_0x2424b7(0x24e)]?new Date(_0x559e68['finishedAt'])[_0x2424b7(0x21f)]():Date['now'](),_0x46b21f={'start':_0xed51a,'end':_0x224844,'duration':_0x224844-_0xed51a},_0x14b57f=new Map(),_0x4934ec=[];for(const _0x480614 of _0x47de38){if(_0x480614[_0x2424b7(0x1a3)]){const _0x570e63=new Date(_0x480614[_0x2424b7(0x1a3)])[_0x2424b7(0x21f)](),_0x848146=_0x480614[_0x2424b7(0x23f)]?new Date(_0x480614[_0x2424b7(0x23f)])[_0x2424b7(0x21f)]():Date[_0x2424b7(0x1cf)](),_0x5421a8={'start':_0x570e63,'end':_0x848146,'duration':_0x848146-_0x570e63};_0x14b57f[_0x2424b7(0x29c)](_0x480614['id'],_0x5421a8),_0x4934ec[_0x2424b7(0x1d6)]({'name':_0x480614[_0x2424b7(0x231)],'state':_0x480614[_0x2424b7(0x2a8)]||_0x2424b7(0x237),'window':_0x5421a8});}else _0x4934ec[_0x2424b7(0x1d6)]({'name':_0x480614[_0x2424b7(0x231)],'state':_0x480614[_0x2424b7(0x2a8)]||'planned','window':undefined});}_0x4934ec[_0x2424b7(0x2d8)]((_0x2e27dc,_0x492d29)=>{const _0x2596e0=_0x2424b7;if(!_0x2e27dc[_0x2596e0(0x2bf)])return 0x1;if(!_0x492d29['window'])return-0x1;return _0x2e27dc[_0x2596e0(0x2bf)][_0x2596e0(0x1e3)]-_0x492d29['window']['start'];});const _0x5a02cd=_0x4934ec[_0x2424b7(0x177)],_0x4f9b4d=_0x5a02cd>TIMELINE_CONFIG[_0x2424b7(0x204)];_0x4f9b4d&&_0x4934ec[_0x2424b7(0x2e9)](TIMELINE_CONFIG[_0x2424b7(0x204)]);const _0x4ebbdb=calculateTimeScale(_0x46b21f,_0x22386e),_0x315552=_0x559e68[_0x2424b7(0x20c)]?_0x559e68[_0x2424b7(0x310)]?a42_0x3b83e4['green'](_0x2424b7(0x310)):a42_0x3b83e4['red'](_0x2424b7(0x30f)):a42_0x3b83e4['blue'](_0x2424b7(0x2ca)),_0x315d7f=_0x559e68['project']?.['id'],_0x340004=_0x559e68[_0x2424b7(0x1f0)];let _0x5bfd00;if(_0x315d7f&&_0x340004){const _0x439686=getWorkflowAttemptUrl(_0x446b20,_0x315d7f,_0x340004,_0x559e68['id']);_0x5bfd00=hyperlink(a42_0x3b83e4[_0x2424b7(0x24a)](_0x559e68['id']),_0x439686);}else _0x5bfd00=a42_0x3b83e4[_0x2424b7(0x24a)](_0x559e68['id']);_0x532f86[_0x2424b7(0x1d6)]('Attempt:\x20'+_0x5bfd00+_0x2424b7(0x1d3)+_0x315552+_0x2424b7(0x1d3)+formatElapsed(_0x46b21f[_0x2424b7(0x276)]));if(_0x4934ec[_0x2424b7(0x177)]>0x0){const _0x3b6289=renderTimeAxis(_0x4ebbdb,_0x22386e),_0x359d18=new Date(_0x46b21f[_0x2424b7(0x1e3)]),_0x149006=formatDate(_0x359d18),_0x188cc6=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x2424b7(0x215)]+_0x538b65,_0xf9ebdc=_0x149006[_0x2424b7(0x2ec)](_0x188cc6),_0xe6f97b=a42_0x3b83e4[_0x2424b7(0x24a)](_0xf9ebdc);_0x532f86[_0x2424b7(0x1d6)](_0xe6f97b+'\x20'+_0x3b6289);for(const _0x189931 of _0x4934ec){_0x532f86['push'](renderTaskRow(_0x189931,_0x4ebbdb,_0x22386e,_0x538b65));}const _0x43206b=calculateStats(_0x4934ec);_0x532f86[_0x2424b7(0x1d6)](formatStats(_0x43206b)),_0x4f9b4d&&_0x532f86[_0x2424b7(0x1d6)](a42_0x3b83e4[_0x2424b7(0x1c3)](_0x2424b7(0x273)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x2424b7(0x2e6)+_0x5a02cd+_0x2424b7(0x163))),_0x532f86[_0x2424b7(0x1d6)](''),_0x532f86[_0x2424b7(0x1d6)](a42_0x3b83e4[_0x2424b7(0x24a)](_0x2424b7(0x25b))+('tdx\x20wf\x20attempt\x20'+_0x559e68['id']+'\x20logs')+a42_0x3b83e4['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x532f86['push']('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x532f86[_0x2424b7(0x1d9)]('\x0a');}[a42_0x1c1cea(0x191)](_0x5ee9a5,_0x4dd6ea){const _0x5d09aa=a42_0x1c1cea,_0x8ea2be=new Date(_0x5ee9a5['createdAt'])[_0x5d09aa(0x21f)](),_0x56ae86=_0x5ee9a5['finishedAt']?new Date(_0x5ee9a5['finishedAt'])[_0x5d09aa(0x21f)]():Date['now'](),_0x4e98d0=_0x56ae86-_0x8ea2be,_0x1070ba=[];for(const _0x53d27c of _0x4dd6ea){if(_0x53d27c[_0x5d09aa(0x1a3)]){const _0x5a2415=new Date(_0x53d27c[_0x5d09aa(0x1a3)])[_0x5d09aa(0x21f)](),_0x58c614=_0x53d27c[_0x5d09aa(0x23f)]?new Date(_0x53d27c['updatedAt'])[_0x5d09aa(0x21f)]():Date['now']();_0x1070ba[_0x5d09aa(0x1d6)]({'name':_0x53d27c[_0x5d09aa(0x231)],'state':_0x53d27c['state']||_0x5d09aa(0x237),'window':{'start':_0x5a2415,'end':_0x58c614,'duration':_0x58c614-_0x5a2415}});}else _0x1070ba[_0x5d09aa(0x1d6)]({'name':_0x53d27c['fullName'],'state':_0x53d27c[_0x5d09aa(0x2a8)]||_0x5d09aa(0x18e),'window':undefined});}const _0x5088f1=calculateStats(_0x1070ba);return{'attempt':{'id':_0x5ee9a5['id'],'status':_0x5ee9a5[_0x5d09aa(0x20c)]?_0x5ee9a5[_0x5d09aa(0x310)]?_0x5d09aa(0x310):_0x5d09aa(0x30f):_0x5d09aa(0x2ca),'createdAt':_0x5ee9a5[_0x5d09aa(0x2f5)],'finishedAt':_0x5ee9a5[_0x5d09aa(0x24e)],'duration_ms':_0x4e98d0},'tasks':_0x1070ba[_0x5d09aa(0x2aa)](_0x4e47ec=>({'name':_0x4e47ec[_0x5d09aa(0x19b)],'state':_0x4e47ec[_0x5d09aa(0x2a8)],'startedAt':_0x4e47ec['window']?new Date(_0x4e47ec[_0x5d09aa(0x2bf)][_0x5d09aa(0x1e3)])[_0x5d09aa(0x309)]():null,'updatedAt':_0x4e47ec[_0x5d09aa(0x2bf)]?new Date(_0x4e47ec[_0x5d09aa(0x2bf)][_0x5d09aa(0x28c)])[_0x5d09aa(0x309)]():null,'duration_ms':_0x4e47ec[_0x5d09aa(0x2bf)]?.[_0x5d09aa(0x276)]||null})),'stats':_0x5088f1};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x24d3f7,_0x1cf6fc){const _0x15c326=a43_0x13f4,_0xccad92=_0x24d3f7();while(!![]){try{const _0x3e3131=parseInt(_0x15c326(0x171))/0x1+-parseInt(_0x15c326(0x17c))/0x2*(parseInt(_0x15c326(0x16f))/0x3)+-parseInt(_0x15c326(0x178))/0x4+-parseInt(_0x15c326(0x174))/0x5*(parseInt(_0x15c326(0x16d))/0x6)+-parseInt(_0x15c326(0x173))/0x7*(-parseInt(_0x15c326(0x17b))/0x8)+parseInt(_0x15c326(0x16c))/0x9*(parseInt(_0x15c326(0x172))/0xa)+parseInt(_0x15c326(0x179))/0xb;if(_0x3e3131===_0x1cf6fc)break;else _0xccad92['push'](_0xccad92['shift']());}catch(_0x3c716d){_0xccad92['push'](_0xccad92['shift']());}}}(a43_0x5740,0xeb8df));import{platform}from'os';import{getAPIKey}from'./config.js';function a43_0x5740(){const _0x23722f=['2688830gmHuFo','542983whBYwD','450cYbLYZ','length','X-Trino-User','tdx/','676448uPNqHI','7450938XfJQDz','replace','8rqLzBe','2yPkPbd','entries',';\x20node/','63zjycsX','54498SwJyRN','tdx','3001224tqhLfm','Authorization','314713knXsGH'];a43_0x5740=function(){return _0x23722f;};return a43_0x5740();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x1800ba=a43_0x13f4,_0x276f10=getVersion(),_0x497379=platform(),_0x3d4b5b=process['version'][_0x1800ba(0x17a)]('v','');return _0x1800ba(0x177)+_0x276f10+'\x20('+_0x497379+_0x1800ba(0x17e)+_0x3d4b5b+')';}function a43_0x13f4(_0x3f2283,_0x5989c3){_0x3f2283=_0x3f2283-0x16c;const _0x5740a4=a43_0x5740();let _0x13f4cd=_0x5740a4[_0x3f2283];return _0x13f4cd;}export function getAuthHeaders(_0x40ba9e,_0x1ca9ae){const _0x47a4d8=a43_0x13f4,_0x5a488b=getVersion(),_0x37e384={'User-Agent':getUserAgent(),'X-TD-Client':_0x47a4d8(0x16e),'X-TD-Client-Version':_0x5a488b};return _0x1ca9ae&&(_0x37e384[_0x47a4d8(0x170)]='TD1\x20'+_0x1ca9ae),_0x37e384;}export function toHeaderRecord(_0x192bc5){const _0x19c2a0=a43_0x13f4,_0x3c6ff4={};for(const [_0x48d0d0,_0x53b922]of Object[_0x19c2a0(0x17d)](_0x192bc5)){_0x53b922!==undefined&&(_0x3c6ff4[_0x48d0d0]=_0x53b922);}return _0x3c6ff4;}export function getTrinoHeaders(_0x1c4dfd,_0x5dd34a){const _0x2a03bb=a43_0x13f4,_0x4fb177=getAuthHeaders(_0x1c4dfd,_0x5dd34a),_0x4263a5=toHeaderRecord(_0x4fb177);return delete _0x4263a5['Authorization'],_0x5dd34a&&(_0x4263a5[_0x2a03bb(0x176)]=_0x5dd34a),_0x4263a5;}export function hasAPIKey(_0x1737d8){const _0x41604a=a43_0x13f4,_0x50868b=getAPIKey();return _0x50868b!==undefined&&_0x50868b[_0x41604a(0x175)]>0x0;}
1
+ (function(_0x5a1ea8,_0x48fa2b){const _0x52165f=a43_0x5e56,_0x5b1124=_0x5a1ea8();while(!![]){try{const _0x2942e1=-parseInt(_0x52165f(0xcc))/0x1+parseInt(_0x52165f(0xd6))/0x2*(-parseInt(_0x52165f(0xd7))/0x3)+-parseInt(_0x52165f(0xd3))/0x4+-parseInt(_0x52165f(0xd4))/0x5+-parseInt(_0x52165f(0xd5))/0x6+-parseInt(_0x52165f(0xd0))/0x7*(-parseInt(_0x52165f(0xcf))/0x8)+parseInt(_0x52165f(0xd9))/0x9*(parseInt(_0x52165f(0xc9))/0xa);if(_0x2942e1===_0x48fa2b)break;else _0x5b1124['push'](_0x5b1124['shift']());}catch(_0xdd8b53){_0x5b1124['push'](_0x5b1124['shift']());}}}(a43_0x4c04,0x3644d));import{platform}from'os';function a43_0x4c04(){const _0x1638a1=['44832GfdXwK','replace','length','8336HPuTdG','77FBkhzL','version',';\x20node/','276600ocdxYy','1206715FtRBvq','619620dwfzqT','2DPLMpX','1211667yzIywf','tdx/','9659763OJebcj','10iDzvBi','tdx','entries'];a43_0x4c04=function(){return _0x1638a1;};return a43_0x4c04();}function a43_0x5e56(_0x5db077,_0x4bf57f){_0x5db077=_0x5db077-0xc9;const _0x4c04ea=a43_0x4c04();let _0x5e5674=_0x4c04ea[_0x5db077];return _0x5e5674;}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x22b07c=a43_0x5e56,_0x188c5d=getVersion(),_0x5105f2=platform(),_0x2d15e3=process[_0x22b07c(0xd1)][_0x22b07c(0xcd)]('v','');return _0x22b07c(0xd8)+_0x188c5d+'\x20('+_0x5105f2+_0x22b07c(0xd2)+_0x2d15e3+')';}export function getAuthHeaders(_0x352513,_0x36b494){const _0x5e7c89=a43_0x5e56,_0x57178f=getVersion(),_0x298777={'User-Agent':getUserAgent(),'X-TD-Client':_0x5e7c89(0xca),'X-TD-Client-Version':_0x57178f};return _0x36b494&&(_0x298777['Authorization']='TD1\x20'+_0x36b494),_0x298777;}export function toHeaderRecord(_0x3cdfa6){const _0x5781a2=a43_0x5e56,_0x70930d={};for(const [_0x44ffd3,_0x5b43a8]of Object[_0x5781a2(0xcb)](_0x3cdfa6)){_0x5b43a8!==undefined&&(_0x70930d[_0x44ffd3]=_0x5b43a8);}return _0x70930d;}export function getTrinoHeaders(_0x59a59f,_0x7035bc){const _0x4b40f6=getAuthHeaders(_0x59a59f,_0x7035bc),_0x4d304a=toHeaderRecord(_0x4b40f6);return delete _0x4d304a['Authorization'],_0x7035bc&&(_0x4d304a['X-Trino-User']=_0x7035bc),_0x4d304a;}export function hasAPIKey(_0x32cc5d){const _0x27d728=a43_0x5e56,_0x4f2737=getAPIKey();return _0x4f2737!==undefined&&_0x4f2737[_0x27d728(0xce)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x1207d2,_0x2d4548){const _0xadea56=a44_0x1a05,_0x4fed15=_0x1207d2();while(!![]){try{const _0x5c7ef9=parseInt(_0xadea56(0x236))/0x1*(parseInt(_0xadea56(0x207))/0x2)+parseInt(_0xadea56(0x219))/0x3+parseInt(_0xadea56(0x218))/0x4+parseInt(_0xadea56(0x227))/0x5+-parseInt(_0xadea56(0x21d))/0x6*(-parseInt(_0xadea56(0x209))/0x7)+-parseInt(_0xadea56(0x20a))/0x8*(parseInt(_0xadea56(0x223))/0x9)+parseInt(_0xadea56(0x1f4))/0xa*(-parseInt(_0xadea56(0x22f))/0xb);if(_0x5c7ef9===_0x2d4548)break;else _0x4fed15['push'](_0x4fed15['shift']());}catch(_0x255e09){_0x4fed15['push'](_0x4fed15['shift']());}}}(a44_0x49ab,0x5477b));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x228d16 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x57a838){const _0x2bb891=a44_0x1a05;return _0x57a838[_0x2bb891(0x1f7)]==='json'||_0x57a838[_0x2bb891(0x1f7)]===_0x2bb891(0x23a)||_0x57a838[_0x2bb891(0x1f7)]===_0x2bb891(0x230)||_0x57a838[_0x2bb891(0x1f7)]==='table'||_0x57a838[_0x2bb891(0x220)]===!![]||_0x57a838[_0x2bb891(0x23a)]===!![]||_0x57a838[_0x2bb891(0x230)]===!![]||_0x57a838['table']===!![];}export function parseOutputOptions(_0x4def23){const _0x4909b0=a44_0x1a05;return{'format':_0x4def23[_0x4909b0(0x1f7)]||_0x4909b0(0x22c),'output':_0x4def23['output']||'','limit':_0x4def23['limit'],'color':_0x4def23[_0x4909b0(0x21a)],'noColor':_0x4def23[_0x4909b0(0x213)]};}function convertSDKResultToQueryResult(_0x3e8d5e){const _0x15af74=a44_0x1a05,_0x266f86=[];if(_0x3e8d5e[_0x15af74(0x23b)]>0x0){const _0x30631e=_0x3e8d5e[0x0];for(const [_0x3a87aa,_0x19892e]of Object[_0x15af74(0x233)](_0x30631e)){let _0x3dd299=_0x15af74(0x1fa);if(typeof _0x19892e===_0x15af74(0x215))_0x3dd299=Number[_0x15af74(0x200)](_0x19892e)?_0x15af74(0x208):_0x15af74(0x1f6);else{if(typeof _0x19892e===_0x15af74(0x203))_0x3dd299=_0x15af74(0x203);else _0x19892e===null&&(_0x3dd299=_0x15af74(0x1fa));}_0x266f86[_0x15af74(0x229)]({'name':_0x3a87aa,'type':_0x3dd299});}}return{'queryId':_0x15af74(0x20b),'columns':_0x266f86,'data':_0x3e8d5e,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3e8d5e['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}function a44_0x49ab(){const _0x5be3fd=['error','187kdeeLQ','tsv','resolve','max','entries','write','log','33cbhpdm','filter','repeat','forEach','jsonl','length','[logs]','stdout','output','149980LuYCpN','object','double','format','stdin','map','varchar','No\x20data','list','join','[Object]','isTTY','isInteger','cyan','split','boolean','trim','params','less','9974gBrzTF','bigint','14LRwBWr','16RWwNBW','sdk-result','[rule]','inherit','─┴─','[error]','spawn','blue','keys','noColor','debug','number','magenta','limit','332124ozZpgW','1034814dYnrNE','color','cmdout','bold','1578162nZnTdh','stringify','padEnd','json','stderr','pipe','3043179vxhffN','string','[params]','query','793065VEfkNt','-FXRSn','push','close','yellow','table','Results\x20saved\x20to\x20'];a44_0x49ab=function(){return _0x5be3fd;};return a44_0x49ab();}export async function formatSDKOutput(_0x543b04,_0x2bea6a){const _0x136496=convertSDKResultToQueryResult(_0x543b04);return formatQueryOutput(_0x136496,_0x2bea6a);}function a44_0x1a05(_0x3f39d7,_0x2a5bdb){_0x3f39d7=_0x3f39d7-0x1f1;const _0x49abd8=a44_0x49ab();let _0x1a05a0=_0x49abd8[_0x3f39d7];return _0x1a05a0;}export async function formatQueryOutput(_0x219214,_0x43b631){const _0x370767=a44_0x1a05,{format:_0x51c7e4,limit:_0x476a37,output:_0x426b4f,color:_0x244f35,noColor:_0x43c339}=_0x43b631,_0x437225=Boolean(_0x426b4f)&&!_0x244f35,_0x2f1fcb={'color':_0x244f35,'noColor':_0x43c339||_0x437225};if(_0x51c7e4==='table'){const _0x6be7a2=shouldUseLess(_0x51c7e4,_0x426b4f);return formatAsTable(_0x219214,_0x476a37,_0x6be7a2,_0x2f1fcb);}else{if(_0x51c7e4==='json')return formatAsJSON(_0x219214,_0x2f1fcb);else return _0x51c7e4===_0x370767(0x23a)?formatAsJSONL(_0x219214,_0x2f1fcb):formatQueryResult(_0x219214,_0x51c7e4);}}function shouldUseLess(_0x30fdaa,_0x4881ff){const _0xaa1198=a44_0x1a05;return(_0x30fdaa===_0xaa1198(0x22c)||_0x30fdaa===_0xaa1198(0x1fc))&&process[_0xaa1198(0x1f2)][_0xaa1198(0x1ff)]&&!_0x4881ff;}export function resolveOutputOptions(_0x418321){const _0x18a322=a44_0x1a05,_0x4ba576=resolveOutputFormat(_0x418321[_0x18a322(0x1f7)],_0x418321[_0x18a322(0x1f3)],_0x18a322(0x22c));let _0x3997bd=typeof _0x418321[_0x18a322(0x217)]===_0x18a322(0x215)?_0x418321[_0x18a322(0x217)]:parseInt(_0x418321['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x17db74=_0x418321['output']||'';return shouldUseLess(_0x4ba576,_0x17db74)&&(_0x3997bd=Infinity),{'format':_0x4ba576,'output':_0x17db74,'limit':_0x3997bd,'color':_0x418321[_0x18a322(0x21a)],'noColor':_0x418321[_0x18a322(0x213)]};}export function writeOutput(_0x3fab58,_0x42f8f6,_0x52dbab){const _0x4eba33=a44_0x1a05;return _0x42f8f6?(writeFileSync(_0x42f8f6,_0x3fab58),console[_0x4eba33(0x22e)](_0x4eba33(0x22d)+_0x42f8f6),Promise[_0x4eba33(0x231)]()):shouldUseLess(_0x52dbab||'','')?new Promise(_0x2e8f9c=>{const _0x25c38c=_0x4eba33,_0x270e2e=spawn(_0x25c38c(0x206),[_0x25c38c(0x228)],{'stdio':[_0x25c38c(0x222),_0x25c38c(0x20d),_0x25c38c(0x20d)]});let _0x3e6ce9=![];_0x270e2e['on'](_0x25c38c(0x22e),()=>{!_0x3e6ce9&&(_0x3e6ce9=!![],console['log'](_0x3fab58),_0x2e8f9c());}),_0x270e2e['on'](_0x25c38c(0x22a),()=>{!_0x3e6ce9&&(_0x3e6ce9=!![],_0x2e8f9c());}),_0x270e2e['on'](_0x25c38c(0x210),()=>{const _0x2de10a=_0x25c38c;!_0x3e6ce9&&_0x270e2e[_0x2de10a(0x1f8)]&&(_0x270e2e['stdin']['on'](_0x2de10a(0x22e),()=>{}),_0x270e2e[_0x2de10a(0x1f8)][_0x2de10a(0x234)](_0x3fab58),_0x270e2e['stdin']['end']());}),!_0x270e2e['stdin']&&(!_0x3e6ce9&&(_0x3e6ce9=!![],console[_0x25c38c(0x235)](_0x3fab58),_0x2e8f9c()));}):(console['log'](_0x3fab58),Promise['resolve']());}export async function handleSDKOutput(_0xd43a46,_0x4bb6e4){const _0x26215c=resolveOutputOptions(_0x4bb6e4),_0x28b9ca=await formatSDKOutput(_0xd43a46,_0x26215c);await writeOutput(_0x28b9ca,_0x26215c['output']||undefined,_0x26215c['format']);}export async function handleQueryOutput(_0x56ae57,_0x55d14b){const _0x247cd0=a44_0x1a05,_0x295f4a=resolveOutputOptions(_0x55d14b),_0x3d6270=await formatQueryOutput(_0x56ae57,_0x295f4a);await writeOutput(_0x3d6270,_0x295f4a['output']||undefined,_0x295f4a[_0x247cd0(0x1f7)]);}async function formatSingleObject(_0x12074b,_0x1d0630){const _0x39adc2=a44_0x1a05,{format:_0x5206cf,color:_0x175848,noColor:_0xc5084e}=_0x1d0630,_0x39d666={'color':_0x175848,'noColor':_0xc5084e};if(_0x5206cf===_0x39adc2(0x220)){if(shouldUseColor(_0x39d666))return colorizeJSON(_0x12074b,_0x39d666);return JSON['stringify'](_0x12074b,null,0x2);}else{if(_0x5206cf===_0x39adc2(0x23a)){if(shouldUseColor(_0x39d666))return colorizeJSONCompact(_0x12074b,_0x39d666);return JSON[_0x39adc2(0x21e)](_0x12074b);}else{if(_0x5206cf===_0x39adc2(0x230))return Object[_0x39adc2(0x233)](_0x12074b)[_0x39adc2(0x1f9)](([_0x59e223,_0x4e6ee4])=>_0x59e223+'\x09'+_0x4e6ee4)[_0x39adc2(0x1fd)]('\x0a');else{const _0x181df0=Object[_0x39adc2(0x233)](_0x12074b);if(_0x181df0[_0x39adc2(0x23b)]===0x0)return _0x39adc2(0x1fb);const _0x514ffd=_0x12074b[_0x39adc2(0x214)],_0x43761a=_0x12074b[_0x39adc2(0x226)],_0x13487b=_0x12074b[_0x39adc2(0x205)],_0x3a2e41=_0x12074b['rule'],_0x59219e=_0x43761a?typeof _0x43761a===_0x39adc2(0x224)?_0x43761a:JSON[_0x39adc2(0x21e)](_0x43761a,null,0x2):undefined,_0x208cdd=_0x13487b&&Object[_0x39adc2(0x212)](_0x13487b)['length']>0x0?JSON['stringify'](_0x13487b,null,0x2):undefined,_0x597c61=_0x3a2e41&&Object['keys'](_0x3a2e41)[_0x39adc2(0x23b)]>0x0?JSON[_0x39adc2(0x21e)](_0x3a2e41,null,0x2):undefined,_0x43c0b3=_0x181df0[_0x39adc2(0x237)](([_0x36eea8])=>_0x36eea8!==_0x39adc2(0x214)&&_0x36eea8!==_0x39adc2(0x226)&&_0x36eea8!==_0x39adc2(0x205)&&_0x36eea8!=='rule'),_0x285669=Math[_0x39adc2(0x232)](..._0x43c0b3['map'](([_0x106bfd])=>_0x106bfd[_0x39adc2(0x23b)])),_0x4d926e=Math[_0x39adc2(0x232)](..._0x43c0b3['map'](([,_0x50bae9])=>{const _0x294fa1=_0x39adc2;try{const _0x48d92e=_0x50bae9===null||_0x50bae9===undefined?'':typeof _0x50bae9===_0x294fa1(0x1f5)?JSON[_0x294fa1(0x21e)](_0x50bae9):String(_0x50bae9),_0x5018ea=_0x48d92e[_0x294fa1(0x202)]('\x0a');return Math['max'](..._0x5018ea[_0x294fa1(0x1f9)](_0x1f88c0=>_0x1f88c0[_0x294fa1(0x23b)]),0x0);}catch{return 0x0;}}),0x14),_0x35ebff=[];_0x35ebff[_0x39adc2(0x229)](colorBorder('┌─'+'─'[_0x39adc2(0x238)](_0x285669)+'─┬─'+'─'[_0x39adc2(0x238)](_0x4d926e)+'─┐',_0x39d666)),_0x43c0b3['forEach'](([_0x26b44d,_0x902731])=>{const _0x5ec5b4=_0x39adc2;let _0x50cb4a;try{_0x50cb4a=_0x902731===null||_0x902731===undefined?'':typeof _0x902731==='object'?JSON['stringify'](_0x902731):String(_0x902731);}catch{_0x50cb4a=_0x5ec5b4(0x1fe);}const _0x19f7e5=_0x26b44d[_0x5ec5b4(0x21f)](_0x285669),_0x24981e=_0x50cb4a[_0x5ec5b4(0x202)]('\x0a');_0x24981e[_0x5ec5b4(0x239)]((_0x5af088,_0x6e245b)=>{const _0x4cb273=_0x5ec5b4,_0xd739b4=colorBorder('│',_0x39d666);_0x6e245b===0x0?_0x35ebff[_0x4cb273(0x229)](_0xd739b4+'\x20'+_0x19f7e5+'\x20'+_0xd739b4+'\x20'+_0x5af088[_0x4cb273(0x21f)](_0x4d926e)+'\x20'+_0xd739b4):_0x35ebff[_0x4cb273(0x229)](_0xd739b4+'\x20'+'\x20'[_0x4cb273(0x238)](_0x285669)+'\x20'+_0xd739b4+'\x20'+_0x5af088['padEnd'](_0x4d926e)+'\x20'+_0xd739b4);});}),_0x35ebff[_0x39adc2(0x229)](colorBorder('└─'+'─'[_0x39adc2(0x238)](_0x285669)+_0x39adc2(0x20e)+'─'[_0x39adc2(0x238)](_0x4d926e)+'─┘',_0x39d666));_0x59219e&&(_0x35ebff[_0x39adc2(0x229)](''),_0x35ebff['push'](String(a44_0x228d16[_0x39adc2(0x22b)][_0x39adc2(0x21c)]('[query]'))),_0x35ebff[_0x39adc2(0x229)](_0x59219e));_0x208cdd&&(_0x35ebff[_0x39adc2(0x229)](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16[_0x39adc2(0x211)]['bold'](_0x39adc2(0x225)))),_0x35ebff['push'](_0x208cdd));_0x597c61&&(_0x35ebff['push'](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16[_0x39adc2(0x216)][_0x39adc2(0x21c)](_0x39adc2(0x20c)))),_0x35ebff['push'](_0x597c61));if(_0x514ffd){if(_0x514ffd['stderr']){_0x35ebff['push'](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16['red']['bold'](_0x39adc2(0x20f))));const _0x431f19=_0x514ffd[_0x39adc2(0x221)][_0x39adc2(0x202)]('\x0a');_0x431f19[_0x39adc2(0x239)](_0x5033c0=>{const _0x27ef0e=_0x39adc2;_0x5033c0[_0x27ef0e(0x204)]()&&_0x35ebff['push'](_0x5033c0);});}if(_0x514ffd[_0x39adc2(0x21b)]){_0x35ebff[_0x39adc2(0x229)](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16[_0x39adc2(0x201)][_0x39adc2(0x21c)](_0x39adc2(0x1f1))));const _0x37747b=_0x514ffd[_0x39adc2(0x21b)]['split']('\x0a');_0x37747b[_0x39adc2(0x239)](_0x1a1580=>{const _0x37999f=_0x39adc2;_0x1a1580[_0x37999f(0x204)]()&&_0x35ebff[_0x37999f(0x229)](_0x1a1580);});}}return _0x35ebff[_0x39adc2(0x1fd)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x4e64cf,_0x5dc06f){const _0x14a239=a44_0x1a05;if(_0x5dc06f[_0x14a239(0x1f7)]==='table'){await handleSDKOutput([_0x4e64cf],_0x5dc06f);return;}const _0x41b938=resolveOutputOptions(_0x5dc06f),_0x6f6ba2=await formatSingleObject(_0x4e64cf,_0x41b938);await writeOutput(_0x6f6ba2,_0x41b938[_0x14a239(0x1f3)]||undefined,_0x41b938[_0x14a239(0x1f7)]);}
1
+ (function(_0x3f16eb,_0x59f439){const _0x23a617=a44_0x2c00,_0xea61fe=_0x3f16eb();while(!![]){try{const _0x440e92=-parseInt(_0x23a617(0xa1))/0x1*(parseInt(_0x23a617(0x8b))/0x2)+parseInt(_0x23a617(0xc9))/0x3*(-parseInt(_0x23a617(0xd0))/0x4)+-parseInt(_0x23a617(0xa5))/0x5*(-parseInt(_0x23a617(0xce))/0x6)+parseInt(_0x23a617(0x8a))/0x7*(parseInt(_0x23a617(0xa2))/0x8)+-parseInt(_0x23a617(0xc2))/0x9*(-parseInt(_0x23a617(0xa4))/0xa)+parseInt(_0x23a617(0xd1))/0xb*(-parseInt(_0x23a617(0x94))/0xc)+parseInt(_0x23a617(0xb1))/0xd;if(_0x440e92===_0x59f439)break;else _0xea61fe['push'](_0xea61fe['shift']());}catch(_0x5adac0){_0xea61fe['push'](_0xea61fe['shift']());}}}(a44_0x2887,0x5793c));function a44_0x2887(){const _0x1cccf3=['jsonl','Results\x20saved\x20to\x20','inherit','less','error','filter','number','resolve','FINISHED','51746QSzKlv','176TgQGIO','[logs]','10JCeFBC','305vPzhqz','tsv','stderr','push','[params]','[query]','rule','close','isInteger','log','map','string','3849040JDzPRX','─┴─','split','limit','bold','blue','[rule]','end','cyan','isTTY','stdin','stringify','format','No\x20data','cmdout','entries','debug','4466547BRkmll','object','magenta','bigint','stdout','max','query','424077PyHzyX','boolean','list','json','varchar','30858ESNmUI','noColor','12lwBHiu','4635961bmtkTg','[Object]','trim','80626ZqzSRM','6OYAsPB','repeat','forEach','output','join','pipe','padEnd','length','write','12YFZqbD','-FXRSn','table','─┬─'];a44_0x2887=function(){return _0x1cccf3;};return a44_0x2887();}import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x9e8858 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x3c1b94){const _0x41b81c=a44_0x2c00;return _0x3c1b94['format']===_0x41b81c(0xcc)||_0x3c1b94[_0x41b81c(0xbd)]==='jsonl'||_0x3c1b94[_0x41b81c(0xbd)]===_0x41b81c(0xa6)||_0x3c1b94[_0x41b81c(0xbd)]==='table'||_0x3c1b94['json']===!![]||_0x3c1b94[_0x41b81c(0x98)]===!![]||_0x3c1b94['tsv']===!![]||_0x3c1b94['table']===!![];}export function parseOutputOptions(_0x83847){const _0x2a9a9b=a44_0x2c00;return{'format':_0x83847['format']||_0x2a9a9b(0x96),'output':_0x83847['output']||'','limit':_0x83847['limit'],'color':_0x83847['color'],'noColor':_0x83847[_0x2a9a9b(0xcf)]};}function convertSDKResultToQueryResult(_0x5d5f2b){const _0x5e502e=a44_0x2c00,_0x1b1259=[];if(_0x5d5f2b[_0x5e502e(0x92)]>0x0){const _0x248fc6=_0x5d5f2b[0x0];for(const [_0x229dfe,_0x1cc429]of Object[_0x5e502e(0xc0)](_0x248fc6)){let _0x1e78f4=_0x5e502e(0xcd);if(typeof _0x1cc429===_0x5e502e(0x9e))_0x1e78f4=Number[_0x5e502e(0xad)](_0x1cc429)?_0x5e502e(0xc5):'double';else{if(typeof _0x1cc429===_0x5e502e(0xca))_0x1e78f4=_0x5e502e(0xca);else _0x1cc429===null&&(_0x1e78f4=_0x5e502e(0xcd));}_0x1b1259['push']({'name':_0x229dfe,'type':_0x1e78f4});}}return{'queryId':'sdk-result','columns':_0x1b1259,'data':_0x5d5f2b,'stats':{'state':_0x5e502e(0xa0),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x5d5f2b[_0x5e502e(0x92)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2ec4e9,_0x20ec8a){const _0x55e329=convertSDKResultToQueryResult(_0x2ec4e9);return formatQueryOutput(_0x55e329,_0x20ec8a);}export async function formatQueryOutput(_0x2b8ca5,_0x3143b4){const _0x2aa543=a44_0x2c00,{format:_0x1c9a8c,limit:_0x1710a4,output:_0x9fad35,color:_0x34841e,noColor:_0x4e0aa9}=_0x3143b4,_0x2ce65d=Boolean(_0x9fad35)&&!_0x34841e,_0x3d32b1={'color':_0x34841e,'noColor':_0x4e0aa9||_0x2ce65d};if(_0x1c9a8c===_0x2aa543(0x96)){const _0x3b379e=shouldUseLess(_0x1c9a8c,_0x9fad35);return formatAsTable(_0x2b8ca5,_0x1710a4,_0x3b379e,_0x3d32b1);}else{if(_0x1c9a8c===_0x2aa543(0xcc))return formatAsJSON(_0x2b8ca5,_0x3d32b1);else return _0x1c9a8c===_0x2aa543(0x98)?formatAsJSONL(_0x2b8ca5,_0x3d32b1):formatQueryResult(_0x2b8ca5,_0x1c9a8c);}}function a44_0x2c00(_0x1ce710,_0x516a8c){_0x1ce710=_0x1ce710-0x89;const _0x2887c9=a44_0x2887();let _0x2c000c=_0x2887c9[_0x1ce710];return _0x2c000c;}function shouldUseLess(_0x2d135c,_0x1b67ca){const _0x13c9b8=a44_0x2c00;return(_0x2d135c===_0x13c9b8(0x96)||_0x2d135c===_0x13c9b8(0xcb))&&process[_0x13c9b8(0xc6)][_0x13c9b8(0xba)]&&!_0x1b67ca;}export function resolveOutputOptions(_0x52daa2){const _0x546dc4=a44_0x2c00,_0x5b8c90=resolveOutputFormat(_0x52daa2['format'],_0x52daa2[_0x546dc4(0x8e)],'table');let _0x1a1ae3=typeof _0x52daa2[_0x546dc4(0xb4)]===_0x546dc4(0x9e)?_0x52daa2['limit']:parseInt(_0x52daa2[_0x546dc4(0xb4)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x31b400=_0x52daa2[_0x546dc4(0x8e)]||'';return shouldUseLess(_0x5b8c90,_0x31b400)&&(_0x1a1ae3=Infinity),{'format':_0x5b8c90,'output':_0x31b400,'limit':_0x1a1ae3,'color':_0x52daa2['color'],'noColor':_0x52daa2[_0x546dc4(0xcf)]};}export function writeOutput(_0x4cb9f8,_0x39d467,_0x203817){const _0x5b9014=a44_0x2c00;return _0x39d467?(writeFileSync(_0x39d467,_0x4cb9f8),console['error'](_0x5b9014(0x99)+_0x39d467),Promise[_0x5b9014(0x9f)]()):shouldUseLess(_0x203817||'','')?new Promise(_0x4dc6ca=>{const _0x319eb9=_0x5b9014,_0x35d563=spawn(_0x319eb9(0x9b),[_0x319eb9(0x95)],{'stdio':[_0x319eb9(0x90),_0x319eb9(0x9a),_0x319eb9(0x9a)]});let _0x25b967=![];_0x35d563['on'](_0x319eb9(0x9c),()=>{const _0x3a81f2=_0x319eb9;!_0x25b967&&(_0x25b967=!![],console[_0x3a81f2(0xae)](_0x4cb9f8),_0x4dc6ca());}),_0x35d563['on'](_0x319eb9(0xac),()=>{!_0x25b967&&(_0x25b967=!![],_0x4dc6ca());}),_0x35d563['on']('spawn',()=>{const _0x4b88eb=_0x319eb9;!_0x25b967&&_0x35d563[_0x4b88eb(0xbb)]&&(_0x35d563[_0x4b88eb(0xbb)]['on']('error',()=>{}),_0x35d563[_0x4b88eb(0xbb)][_0x4b88eb(0x93)](_0x4cb9f8),_0x35d563[_0x4b88eb(0xbb)][_0x4b88eb(0xb8)]());}),!_0x35d563[_0x319eb9(0xbb)]&&(!_0x25b967&&(_0x25b967=!![],console[_0x319eb9(0xae)](_0x4cb9f8),_0x4dc6ca()));}):(console['log'](_0x4cb9f8),Promise['resolve']());}export async function handleSDKOutput(_0x9c1bc1,_0x352364){const _0x26184d=a44_0x2c00,_0x54195a=resolveOutputOptions(_0x352364),_0x3f20da=await formatSDKOutput(_0x9c1bc1,_0x54195a);await writeOutput(_0x3f20da,_0x54195a[_0x26184d(0x8e)]||undefined,_0x54195a['format']);}export async function handleQueryOutput(_0x44e79d,_0x110160){const _0x518a1f=a44_0x2c00,_0x1aca2b=resolveOutputOptions(_0x110160),_0x8d3c86=await formatQueryOutput(_0x44e79d,_0x1aca2b);await writeOutput(_0x8d3c86,_0x1aca2b[_0x518a1f(0x8e)]||undefined,_0x1aca2b[_0x518a1f(0xbd)]);}async function formatSingleObject(_0x357898,_0x5d8219){const _0x40d444=a44_0x2c00,{format:_0x575776,color:_0x12dbb0,noColor:_0x4b6ebc}=_0x5d8219,_0x9e37b6={'color':_0x12dbb0,'noColor':_0x4b6ebc};if(_0x575776===_0x40d444(0xcc)){if(shouldUseColor(_0x9e37b6))return colorizeJSON(_0x357898,_0x9e37b6);return JSON['stringify'](_0x357898,null,0x2);}else{if(_0x575776==='jsonl'){if(shouldUseColor(_0x9e37b6))return colorizeJSONCompact(_0x357898,_0x9e37b6);return JSON['stringify'](_0x357898);}else{if(_0x575776===_0x40d444(0xa6))return Object[_0x40d444(0xc0)](_0x357898)[_0x40d444(0xaf)](([_0x52e09a,_0x20bb0b])=>_0x52e09a+'\x09'+_0x20bb0b)['join']('\x0a');else{const _0x164cd0=Object[_0x40d444(0xc0)](_0x357898);if(_0x164cd0[_0x40d444(0x92)]===0x0)return _0x40d444(0xbe);const _0x3981b7=_0x357898['debug'],_0x592fef=_0x357898[_0x40d444(0xc8)],_0xf73b31=_0x357898['params'],_0x32512b=_0x357898['rule'],_0x2b41cb=_0x592fef?typeof _0x592fef===_0x40d444(0xb0)?_0x592fef:JSON[_0x40d444(0xbc)](_0x592fef,null,0x2):undefined,_0x475f9a=_0xf73b31&&Object['keys'](_0xf73b31)[_0x40d444(0x92)]>0x0?JSON[_0x40d444(0xbc)](_0xf73b31,null,0x2):undefined,_0x1d096e=_0x32512b&&Object['keys'](_0x32512b)[_0x40d444(0x92)]>0x0?JSON[_0x40d444(0xbc)](_0x32512b,null,0x2):undefined,_0x513e6f=_0x164cd0[_0x40d444(0x9d)](([_0x10fcca])=>_0x10fcca!==_0x40d444(0xc1)&&_0x10fcca!==_0x40d444(0xc8)&&_0x10fcca!=='params'&&_0x10fcca!==_0x40d444(0xab)),_0x22d9c1=Math[_0x40d444(0xc7)](..._0x513e6f[_0x40d444(0xaf)](([_0x28894c])=>_0x28894c['length'])),_0x25709e=Math['max'](..._0x513e6f['map'](([,_0x5ec4b7])=>{const _0x282ef9=_0x40d444;try{const _0x36ea73=_0x5ec4b7===null||_0x5ec4b7===undefined?'':typeof _0x5ec4b7===_0x282ef9(0xc3)?JSON[_0x282ef9(0xbc)](_0x5ec4b7):String(_0x5ec4b7),_0x54f69d=_0x36ea73[_0x282ef9(0xb3)]('\x0a');return Math[_0x282ef9(0xc7)](..._0x54f69d[_0x282ef9(0xaf)](_0x280932=>_0x280932[_0x282ef9(0x92)]),0x0);}catch{return 0x0;}}),0x14),_0x4a53ef=[];_0x4a53ef[_0x40d444(0xa8)](colorBorder('┌─'+'─'[_0x40d444(0x8c)](_0x22d9c1)+_0x40d444(0x97)+'─'[_0x40d444(0x8c)](_0x25709e)+'─┐',_0x9e37b6)),_0x513e6f[_0x40d444(0x8d)](([_0x8d8b5,_0x4d8968])=>{const _0x63654d=_0x40d444;let _0x4ac425;try{_0x4ac425=_0x4d8968===null||_0x4d8968===undefined?'':typeof _0x4d8968===_0x63654d(0xc3)?JSON[_0x63654d(0xbc)](_0x4d8968):String(_0x4d8968);}catch{_0x4ac425=_0x63654d(0xd2);}const _0x4a48cb=_0x8d8b5['padEnd'](_0x22d9c1),_0x115ca7=_0x4ac425[_0x63654d(0xb3)]('\x0a');_0x115ca7['forEach']((_0x26fe34,_0x1c4706)=>{const _0x554e22=_0x63654d,_0x29f1f1=colorBorder('│',_0x9e37b6);_0x1c4706===0x0?_0x4a53ef[_0x554e22(0xa8)](_0x29f1f1+'\x20'+_0x4a48cb+'\x20'+_0x29f1f1+'\x20'+_0x26fe34[_0x554e22(0x91)](_0x25709e)+'\x20'+_0x29f1f1):_0x4a53ef[_0x554e22(0xa8)](_0x29f1f1+'\x20'+'\x20'['repeat'](_0x22d9c1)+'\x20'+_0x29f1f1+'\x20'+_0x26fe34[_0x554e22(0x91)](_0x25709e)+'\x20'+_0x29f1f1);});}),_0x4a53ef[_0x40d444(0xa8)](colorBorder('└─'+'─'[_0x40d444(0x8c)](_0x22d9c1)+_0x40d444(0xb2)+'─'['repeat'](_0x25709e)+'─┘',_0x9e37b6));_0x2b41cb&&(_0x4a53ef[_0x40d444(0xa8)](''),_0x4a53ef[_0x40d444(0xa8)](String(a44_0x9e8858['yellow'][_0x40d444(0xb5)](_0x40d444(0xaa)))),_0x4a53ef[_0x40d444(0xa8)](_0x2b41cb));_0x475f9a&&(_0x4a53ef[_0x40d444(0xa8)](''),_0x4a53ef[_0x40d444(0xa8)](String(a44_0x9e8858[_0x40d444(0xb6)][_0x40d444(0xb5)](_0x40d444(0xa9)))),_0x4a53ef['push'](_0x475f9a));_0x1d096e&&(_0x4a53ef[_0x40d444(0xa8)](''),_0x4a53ef[_0x40d444(0xa8)](String(a44_0x9e8858[_0x40d444(0xc4)]['bold'](_0x40d444(0xb7)))),_0x4a53ef[_0x40d444(0xa8)](_0x1d096e));if(_0x3981b7){if(_0x3981b7[_0x40d444(0xa7)]){_0x4a53ef[_0x40d444(0xa8)](''),_0x4a53ef['push'](String(a44_0x9e8858['red'][_0x40d444(0xb5)]('[error]')));const _0x3a6d47=_0x3981b7[_0x40d444(0xa7)][_0x40d444(0xb3)]('\x0a');_0x3a6d47[_0x40d444(0x8d)](_0x5cfa67=>{const _0x1d191d=_0x40d444;_0x5cfa67[_0x1d191d(0x89)]()&&_0x4a53ef[_0x1d191d(0xa8)](_0x5cfa67);});}if(_0x3981b7[_0x40d444(0xbf)]){_0x4a53ef[_0x40d444(0xa8)](''),_0x4a53ef[_0x40d444(0xa8)](String(a44_0x9e8858[_0x40d444(0xb9)][_0x40d444(0xb5)](_0x40d444(0xa3))));const _0xbb46e8=_0x3981b7['cmdout'][_0x40d444(0xb3)]('\x0a');_0xbb46e8[_0x40d444(0x8d)](_0x4f94ec=>{_0x4f94ec['trim']()&&_0x4a53ef['push'](_0x4f94ec);});}}return _0x4a53ef[_0x40d444(0x8f)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x116324,_0x215a1b){const _0x3eb267=a44_0x2c00;if(_0x215a1b[_0x3eb267(0xbd)]===_0x3eb267(0x96)){await handleSDKOutput([_0x116324],_0x215a1b);return;}const _0x582837=resolveOutputOptions(_0x215a1b),_0x41d81c=await formatSingleObject(_0x116324,_0x582837);await writeOutput(_0x41d81c,_0x582837['output']||undefined,_0x582837[_0x3eb267(0xbd)]);}