@treasuredata/tdx 2026.4.15 → 2026.4.17

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 (220) 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/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/access-tracker.js +1 -1
  182. package/dist/sdk/workspace/frontmatter.js +1 -1
  183. package/dist/sdk/workspace/git.js +1 -1
  184. package/dist/sdk/workspace/index.js +1 -1
  185. package/dist/sdk/workspace/templates.js +1 -1
  186. package/dist/sdk/workspace/weekly.js +1 -1
  187. package/dist/sdk/workspace/wikilinks.js +1 -1
  188. package/dist/test-utils/command-runner.js +1 -1
  189. package/dist/test-utils/factories.js +1 -1
  190. package/dist/test-utils/fixtures.js +1 -1
  191. package/dist/test-utils/http-mock.js +1 -1
  192. package/dist/test-utils/index.js +1 -1
  193. package/dist/utils/async.js +1 -1
  194. package/dist/utils/colors.js +1 -1
  195. package/dist/utils/diff.js +1 -1
  196. package/dist/utils/file-permissions.js +1 -1
  197. package/dist/utils/file-reader.js +1 -1
  198. package/dist/utils/github-releases.js +1 -1
  199. package/dist/utils/global-cache.js +1 -1
  200. package/dist/utils/json-loader.js +1 -1
  201. package/dist/utils/local-cache.js +1 -1
  202. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  203. package/dist/utils/logger/formatters/index.js +1 -1
  204. package/dist/utils/logger/handlers/console-handler.js +1 -1
  205. package/dist/utils/logger/handlers/file-handler.js +1 -1
  206. package/dist/utils/logger/handlers/index.js +1 -1
  207. package/dist/utils/logger/handlers/null-handler.js +1 -1
  208. package/dist/utils/logger/index.js +1 -1
  209. package/dist/utils/logger/logger.js +1 -1
  210. package/dist/utils/logger/types.js +1 -1
  211. package/dist/utils/option-validation.js +1 -1
  212. package/dist/utils/process.js +1 -1
  213. package/dist/utils/prompt.js +1 -1
  214. package/dist/utils/spinner.js +1 -1
  215. package/dist/utils/sse-parser.js +1 -1
  216. package/dist/utils/string-utils.js +1 -1
  217. package/dist/utils/table-ref-parser.js +1 -1
  218. package/dist/utils/tdx-logger.js +1 -1
  219. package/dist/utils/version-check.js +1 -1
  220. package/package.json +1 -1
@@ -1 +1 @@
1
- const a54_0x1978f8=a54_0x238d;(function(_0x59c905,_0x5ed708){const _0x2f4db2=a54_0x238d,_0x49b38a=_0x59c905();while(!![]){try{const _0x232584=-parseInt(_0x2f4db2(0x159))/0x1+parseInt(_0x2f4db2(0x30a))/0x2*(-parseInt(_0x2f4db2(0x29e))/0x3)+-parseInt(_0x2f4db2(0x176))/0x4*(parseInt(_0x2f4db2(0x1a7))/0x5)+parseInt(_0x2f4db2(0x290))/0x6+-parseInt(_0x2f4db2(0x186))/0x7+parseInt(_0x2f4db2(0x192))/0x8+parseInt(_0x2f4db2(0x25c))/0x9;if(_0x232584===_0x5ed708)break;else _0x49b38a['push'](_0x49b38a['shift']());}catch(_0x161915){_0x49b38a['push'](_0x49b38a['shift']());}}}(a54_0x4909,0x65f3c));import a54_0x4dcb08 from'chalk';import{existsSync}from'fs';import a54_0x331f20 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a54_0x238d(_0x73c11a,_0x1921e4){_0x73c11a=_0x73c11a-0x150;const _0x49093c=a54_0x4909();let _0x238d7e=_0x49093c[_0x73c11a];return _0x238d7e;}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 a54_0x51a435 from'prompts';function getAttemptStatusDisplay(_0x135ab4){const _0x545e7c=a54_0x238d;if(!_0x135ab4)return{'icon':'⏳','text':''};const {done:_0x5de673,success:_0x45931c,cancelRequested:_0x2e4339}=_0x135ab4;if(!_0x5de673)return _0x2e4339?{'icon':'🛑','text':a54_0x4dcb08['yellow'](_0x545e7c(0x2d3))}:{'icon':'🔄','text':a54_0x4dcb08[_0x545e7c(0x15f)](_0x545e7c(0x20a))};if(_0x45931c)return{'icon':'✅','text':a54_0x4dcb08[_0x545e7c(0x2ac)](_0x545e7c(0x1e7))};return{'icon':'❌','text':a54_0x4dcb08['red']('error')};}export class WorkflowBaseCommand extends BaseCommand{[a54_0x1978f8(0x27e)](_0x563db8,_0x168966,_0x56e9bf=0x0){return _0x563db8[_0x56e9bf]||_0x168966['workflowProject'];}[a54_0x1978f8(0x22c)](_0x4b5cc6,_0x140c17,_0x22e6d6=0x0){const _0x583299=a54_0x1978f8,_0x172e7c=this['resolveProject'](_0x4b5cc6,_0x140c17,_0x22e6d6);if(!_0x172e7c)return console[_0x583299(0x1a6)](a54_0x4dcb08[_0x583299(0x236)](_0x583299(0x2a4)),_0x583299(0x249)),console[_0x583299(0x1a6)](a54_0x4dcb08['dim'](_0x583299(0x166))),null;return _0x172e7c;}[a54_0x1978f8(0x1c5)](_0x1f3b9b,_0x1f0552){const _0x2ba321=a54_0x1978f8;if(_0x1f3b9b[0x0]){const _0x1b4a7a=_0x1f3b9b[0x0]['split']('.');if(_0x1b4a7a[_0x2ba321(0x1d5)]===0x1)return{'projectName':_0x1b4a7a[0x0],'workflowName':undefined};else return _0x1b4a7a[_0x2ba321(0x1d5)]===0x2?{'projectName':_0x1b4a7a[0x0],'workflowName':_0x1b4a7a[0x1]}:(console[_0x2ba321(0x1a6)](a54_0x4dcb08[_0x2ba321(0x236)](_0x2ba321(0x2a4)),_0x2ba321(0x269)),null);}return{'projectName':_0x1f0552['workflowProject'],'workflowName':undefined};}['resolveProjectDir'](_0x21a9dc,_0x174ddf,_0x3cbc14=0x0){const _0x3a41a4=a54_0x1978f8;if(_0x21a9dc[_0x3cbc14])return _0x21a9dc[_0x3cbc14];if(_0x174ddf[_0x3a41a4(0x28a)]){const _0xa8d5b8=a54_0x331f20[_0x3a41a4(0x302)](process[_0x3a41a4(0x2c1)](),_0x3a41a4(0x2aa),_0x174ddf[_0x3a41a4(0x28a)]);if(existsSync(a54_0x331f20['join'](_0xa8d5b8,_0x3a41a4(0x247))))return _0xa8d5b8;}return undefined;}async[a54_0x1978f8(0x23b)](_0x17bc6d,_0x6d407,_0x1e2135){const _0x83cc5=a54_0x1978f8;try{const _0x536585=await _0x17bc6d[_0x83cc5(0x1ef)][_0x83cc5(0x2aa)](_0x6d407,{'limit':0x1});if(_0x536585[_0x83cc5(0x1d5)]>0x0){const _0x489c70=_0x536585[0x0]['id'],_0x2a06b5=getWorkflowUrl(_0x1e2135,_0x489c70);console['error'](_0x83cc5(0x252)+a54_0x4dcb08[_0x83cc5(0x30f)](_0x2a06b5));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']='workflow:use';[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x2fd);async[a54_0x1978f8(0x1bd)](_0x1aab24){const _0x3d5526=a54_0x1978f8,{options:_0x595fba,args:_0x55c984,tdx:_0x3638d3}=_0x1aab24,_0x4bf5fd=_0x55c984[0x0],_0x33455a=_0x595fba[_0x3d5526(0x2df)];if(_0x33455a)return saveSessionContext({'workflow_project':undefined},_0x595fba[_0x3d5526(0x2ed)]),console[_0x3d5526(0x2e8)](a54_0x4dcb08[_0x3d5526(0x2ac)](_0x3d5526(0x178))),0x0;if(!_0x4bf5fd)return console[_0x3d5526(0x1a6)](a54_0x4dcb08[_0x3d5526(0x236)](_0x3d5526(0x2a4)),_0x3d5526(0x249)),console[_0x3d5526(0x1a6)](a54_0x4dcb08[_0x3d5526(0x24d)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x3d5526(0x1a6)](a54_0x4dcb08[_0x3d5526(0x24d)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x289bd5=await withSpinner(_0x3d5526(0x2de)+_0x4bf5fd+_0x3d5526(0x17c),()=>_0x3638d3[_0x3d5526(0x1ef)][_0x3d5526(0x1ec)](_0x4bf5fd),{'verbose':_0x595fba[_0x3d5526(0x156)]}),{name:_0x1dc422}=_0x289bd5[_0x3d5526(0x297)];return saveSessionContext({'workflow_project':_0x1dc422},_0x595fba['session']),console[_0x3d5526(0x2e8)](a54_0x4dcb08[_0x3d5526(0x2ac)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a54_0x4dcb08['cyan'](_0x1dc422))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a54_0x1978f8(0x1d7);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x1dd);async[a54_0x1978f8(0x1bd)](_0x2cc16b){const _0x54933f=a54_0x1978f8,{options:_0x3580bd,args:_0x5eed1a,tdx:_0x26d2c9}=_0x2cc16b,_0x40481f=_0x5eed1a[0x0];_0x3580bd[_0x54933f(0x156)]&&_0x40481f&&console[_0x54933f(0x1a6)]('Pattern:\x20'+_0x40481f);const _0x17def0=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x26d2c9['workflow'][_0x54933f(0x270)](_0x40481f,{'limit':_0x3580bd[_0x54933f(0x214)]}),{'verbose':_0x3580bd[_0x54933f(0x156)]});let _0x2f9078=_0x17def0[_0x54933f(0x297)];_0x2f9078[_0x54933f(0x23d)]((_0x451bb0,_0x2b04f2)=>_0x451bb0[_0x54933f(0x273)][_0x54933f(0x165)](_0x2b04f2[_0x54933f(0x273)]));const _0x440e5f=_0x3580bd[_0x54933f(0x214)]||0x64,_0x414009=_0x2f9078['length']>=_0x440e5f?a54_0x4dcb08[_0x54933f(0x24d)](_0x54933f(0x218)):'';console[_0x54933f(0x1a6)](_0x54933f(0x29a)+_0x2f9078[_0x54933f(0x1d5)]+'\x20project'+(_0x2f9078['length']!==0x1?'s':'')+_0x414009);if(_0x3580bd['format']===_0x54933f(0x169)||_0x3580bd[_0x54933f(0x1a8)]===_0x54933f(0x1c6)||_0x3580bd[_0x54933f(0x1a8)]===_0x54933f(0x1d3))await handleSDKOutput(_0x2f9078,_0x3580bd);else{if(_0x2f9078['length']===0x0)_0x40481f?console['log'](_0x54933f(0x234)+_0x40481f):console[_0x54933f(0x2e8)](_0x54933f(0x25a));else{const _0x50a34d=_0x2f9078[_0x54933f(0x1f0)](_0x2b6539=>{const _0x28e436=_0x54933f,_0x4e8689=_0x2b6539['metadata']?.[_0x28e436(0x2e2)](_0xafc427=>_0xafc427[_0x28e436(0x152)]===_0x28e436(0x277)),_0x35e50f=_0x4e8689?a54_0x4dcb08[_0x28e436(0x24d)](_0x28e436(0x24b)):'';return _0x28e436(0x220)+_0x2b6539[_0x28e436(0x273)]+_0x35e50f;});await writeOutput(_0x50a34d['join']('\x0a'),_0x3580bd[_0x54933f(0x1b8)],_0x54933f(0x256));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x223);[a54_0x1978f8(0x19b)]='List\x20workflows';async[a54_0x1978f8(0x1bd)](_0x23f7da){const _0x5f4653=a54_0x1978f8,{options:_0x30d4c2,args:_0x3624f5,tdx:_0x510749}=_0x23f7da,_0x3f6574=this[_0x5f4653(0x27e)](_0x3624f5,_0x30d4c2);_0x30d4c2[_0x5f4653(0x156)]&&_0x3f6574&&console[_0x5f4653(0x1a6)]('Project\x20filter:\x20'+_0x3f6574);const _0x231426=await withSpinner(_0x5f4653(0x20b),()=>_0x510749[_0x5f4653(0x1ef)][_0x5f4653(0x2aa)](_0x3f6574,{'limit':_0x30d4c2[_0x5f4653(0x214)]}),{'verbose':_0x30d4c2[_0x5f4653(0x156)]});let _0x226d2c=_0x231426[_0x5f4653(0x297)];_0x226d2c['sort']((_0x5688ca,_0x24f8cb)=>{const _0x260c23=_0x5f4653,_0x34a2bb=_0x5688ca['name'][_0x260c23(0x165)](_0x24f8cb[_0x260c23(0x273)]);if(_0x34a2bb!==0x0)return _0x34a2bb;return(_0x5688ca[_0x260c23(0x301)]?.[_0x260c23(0x273)]||'')[_0x260c23(0x165)](_0x24f8cb[_0x260c23(0x301)]?.[_0x260c23(0x273)]||'');});const _0x4fc1e8=_0x30d4c2[_0x5f4653(0x214)]||0x64,_0x68f169=_0x226d2c[_0x5f4653(0x1d5)]>=_0x4fc1e8?a54_0x4dcb08[_0x5f4653(0x24d)](_0x5f4653(0x218)):'';console[_0x5f4653(0x1a6)](_0x5f4653(0x29a)+_0x226d2c[_0x5f4653(0x1d5)]+_0x5f4653(0x1e9)+(_0x226d2c[_0x5f4653(0x1d5)]!==0x1?'s':'')+_0x68f169);if(_0x30d4c2[_0x5f4653(0x1a8)]===_0x5f4653(0x169)||_0x30d4c2[_0x5f4653(0x1a8)]===_0x5f4653(0x1c6)||_0x30d4c2[_0x5f4653(0x1a8)]===_0x5f4653(0x1d3))await handleSDKOutput(_0x226d2c,_0x30d4c2);else{if(_0x226d2c[_0x5f4653(0x1d5)]===0x0)_0x3f6574?console[_0x5f4653(0x2e8)](_0x5f4653(0x1b4)+_0x3f6574):console[_0x5f4653(0x2e8)]('No\x20workflows\x20found');else{const _0xb28657=_0x30d4c2['site'],_0x4973bb=_0x226d2c[_0x5f4653(0x1f0)](_0x2e904f=>{const _0x4a745b=_0x5f4653,_0x505e37=a54_0x4dcb08[_0x4a745b(0x24d)]('#'+_0x2e904f['id']),_0x5544f9=hyperlink(_0x505e37,getWorkflowUrl(_0xb28657,_0x2e904f['id'])),_0x4dbe56=_0x2e904f['project']?.['name']?a54_0x4dcb08['dim']('\x20('+_0x2e904f[_0x4a745b(0x301)][_0x4a745b(0x273)]+')'):'';return _0x4a745b(0x1e3)+_0x5544f9+'\x20'+_0x2e904f['name']+_0x4dbe56;});await writeOutput(_0x4973bb['join']('\x0a'),_0x30d4c2[_0x5f4653(0x1b8)],_0x5f4653(0x256));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x280);['description']='List\x20workflow\x20execution\x20sessions';async['execute'](_0x435f52){const _0x50260f=a54_0x1978f8,{options:_0x2fea27,args:_0x3ba7e9,tdx:_0x37e352}=_0x435f52,_0x424b36=this[_0x50260f(0x1c5)](_0x3ba7e9,_0x2fea27);if(!_0x424b36)return 0x1;const {projectName:_0x2726a,workflowName:_0x28bb03}=_0x424b36;if(_0x2fea27[_0x50260f(0x156)]){if(_0x2726a&&_0x28bb03)console[_0x50260f(0x1a6)](_0x50260f(0x2a0)+_0x2726a+'.'+_0x28bb03);else _0x2726a&&console['error']('Filter:\x20project='+_0x2726a);const _0x79a548=_0x2fea27[_0x50260f(0x2bd)];_0x79a548&&console[_0x50260f(0x1a6)](_0x50260f(0x2f3)+_0x79a548);}let _0x4f3da3=0x28;if(process['stdout'][_0x50260f(0x2d6)]&&!_0x2fea27['output']&&!_0x2fea27[_0x50260f(0x1a8)]){const _0x4e6e83=process[_0x50260f(0x272)][_0x50260f(0x181)]||0x28;_0x4f3da3=Math[_0x50260f(0x29c)](0x14,Math['floor'](_0x4e6e83*0x2/0x3));}const _0x1ab67f=_0x2fea27[_0x50260f(0x214)]||_0x4f3da3,_0x6fee86=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x37e352[_0x50260f(0x1ef)][_0x50260f(0x172)]({'projectName':_0x2726a,'workflowName':_0x28bb03,'status':_0x2fea27['status'],'fromTime':_0x2fea27[_0x50260f(0x182)],'toTime':_0x2fea27['to'],'limit':_0x1ab67f}),{'verbose':_0x2fea27[_0x50260f(0x156)]}),_0x5c91cc=_0x6fee86[_0x50260f(0x297)];_0x5c91cc['sort']((_0x4b57de,_0x5653be)=>{const _0x1cb7e8=_0x50260f,_0x77d42d=_0x4b57de['sessionTime']||'',_0x23e38d=_0x5653be[_0x1cb7e8(0x1e1)]||'';return _0x23e38d[_0x1cb7e8(0x165)](_0x77d42d);});_0x5c91cc[_0x50260f(0x1d5)]>=_0x1ab67f?console[_0x50260f(0x1a6)](_0x50260f(0x2f2)+_0x5c91cc[_0x50260f(0x1d5)]+_0x50260f(0x185)+a54_0x4dcb08[_0x50260f(0x24d)](_0x50260f(0x2d8))):console[_0x50260f(0x1a6)](_0x50260f(0x29a)+_0x5c91cc[_0x50260f(0x1d5)]+_0x50260f(0x173)+(_0x5c91cc[_0x50260f(0x1d5)]!==0x1?'s':''));if(_0x2fea27['format']==='json'||_0x2fea27[_0x50260f(0x1a8)]===_0x50260f(0x1c6)||_0x2fea27[_0x50260f(0x1a8)]===_0x50260f(0x1d3))await handleSDKOutput(_0x5c91cc,_0x2fea27);else{if(!process[_0x50260f(0x272)][_0x50260f(0x2d6)]||_0x2fea27['output']){if(_0x5c91cc[_0x50260f(0x1d5)]===0x0){if(_0x2726a&&_0x28bb03)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x2726a+'.'+_0x28bb03);else _0x2726a?console[_0x50260f(0x2e8)](_0x50260f(0x1c8)+_0x2726a):console[_0x50260f(0x2e8)](_0x50260f(0x1ce));}else{const _0x23a4cb=_0x2fea27[_0x50260f(0x2e3)],_0x8363de=this[_0x50260f(0x239)](_0x5c91cc,_0x23a4cb);_0x2fea27[_0x50260f(0x1b8)]?await writeOutput(_0x8363de,_0x2fea27['output'],'list'):console['log'](_0x8363de);}!_0x2726a&&(console[_0x50260f(0x1a6)](''),console[_0x50260f(0x1a6)](a54_0x4dcb08[_0x50260f(0x24d)](_0x50260f(0x1a5))),console[_0x50260f(0x1a6)](a54_0x4dcb08[_0x50260f(0x24d)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a54_0x4dcb08['dim'](_0x50260f(0x163))));}else{if(_0x5c91cc[_0x50260f(0x1d5)]===0x0){if(_0x2726a&&_0x28bb03)console[_0x50260f(0x2e8)](_0x50260f(0x312)+_0x2726a+'.'+_0x28bb03);else _0x2726a?console[_0x50260f(0x2e8)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x2726a):console[_0x50260f(0x2e8)](_0x50260f(0x1ce));}else await this[_0x50260f(0x285)](_0x5c91cc,_0x435f52,_0x2726a);}}return 0x0;}[a54_0x1978f8(0x239)](_0x5c2d75,_0x2d6f4c){const _0x3b01ca=a54_0x1978f8,_0x4d7ec2=[],_0x35fc92=new Map();let _0x51acab=Infinity,_0x4c3535=-Infinity;for(const _0x4b8f7f of _0x5c2d75){if(_0x4b8f7f[_0x3b01ca(0x2e6)]?.[_0x3b01ca(0x2c7)]){const _0x11fcac=new Date(_0x4b8f7f[_0x3b01ca(0x2e6)]['createdAt'])[_0x3b01ca(0x307)](),_0x1fee07=_0x4b8f7f['lastAttempt'][_0x3b01ca(0x1de)]?new Date(_0x4b8f7f[_0x3b01ca(0x2e6)][_0x3b01ca(0x1de)])[_0x3b01ca(0x307)]():Date['now'](),_0x4c8b9c=_0x4b8f7f[_0x3b01ca(0x301)]?.['name']||_0x3b01ca(0x19e);!_0x35fc92[_0x3b01ca(0x1f6)](_0x4c8b9c)&&_0x35fc92['set'](_0x4c8b9c,[]),_0x35fc92['get'](_0x4c8b9c)[_0x3b01ca(0x198)]({'session':_0x4b8f7f,'startTime':_0x11fcac,'endTime':_0x1fee07,'duration':_0x1fee07-_0x11fcac}),_0x51acab=Math['min'](_0x51acab,_0x11fcac),_0x4c3535=Math[_0x3b01ca(0x29c)](_0x4c3535,_0x1fee07);}}if(_0x35fc92[_0x3b01ca(0x20d)]===0x0)return _0x3b01ca(0x27a);const _0x5d5991=process[_0x3b01ca(0x272)][_0x3b01ca(0x2c0)]||0x78,_0x294263=0x1e,_0x310a00=0x32,_0x5f89a0=0x4,_0x565ae6=Math[_0x3b01ca(0x264)](_0x310a00,Math[_0x3b01ca(0x29c)](_0x294263,Math[_0x3b01ca(0x18c)](_0x5d5991*0.3))),_0x4b8502=_0x5d5991-_0x565ae6-TIMELINE_CONFIG['GUTTER']-0x3-_0x5f89a0,_0xb94e56=_0x4c3535-_0x51acab,_0x9889b7=_0xb94e56/_0x565ae6,_0x5774cc=renderTimeAxis({'startTime':_0x51acab,'endTime':_0x4c3535,'durationMs':_0xb94e56,'msPerChar':_0x9889b7},_0x565ae6),_0x883e57=[];for(const _0x561275 of _0x35fc92['values']()){_0x883e57[_0x3b01ca(0x198)](..._0x561275);}_0x883e57[_0x3b01ca(0x23d)]((_0xe4e65a,_0x3ecd80)=>_0x3ecd80[_0x3b01ca(0x190)]-_0xe4e65a[_0x3b01ca(0x190)]);const _0x35863d=new Date(_0x51acab),_0x54bd0b=formatDate(_0x35863d),_0x5e20bf=_0x5f89a0+TIMELINE_CONFIG[_0x3b01ca(0x29f)]+TIMELINE_CONFIG[_0x3b01ca(0x300)]+_0x4b8502,_0x53ea08='\x20'['repeat'](_0x5e20bf-_0x54bd0b[_0x3b01ca(0x1d5)]),_0x4ac99b=_0x53ea08+a54_0x4dcb08[_0x3b01ca(0x24d)](_0x54bd0b)+'\x20'+_0x5774cc;_0x4d7ec2[_0x3b01ca(0x198)](_0x4ac99b);const _0x3fdc0b=0x16;let _0x3dc50f=0x0;for(const _0x3b0ae8 of _0x883e57){const _0x1798e9=_0x3b0ae8[_0x3b01ca(0x2ed)]['project']?.[_0x3b01ca(0x273)]||'?',_0x16cf00=Math[_0x3b01ca(0x264)](stringWidth(_0x1798e9),_0x3fdc0b);_0x3dc50f=Math[_0x3b01ca(0x29c)](_0x3dc50f,_0x16cf00);}for(const _0xbec3c of _0x883e57){const {session:_0x2b201f,startTime:_0x4c6a03,endTime:_0xc760ea,duration:_0x31fbd9}=_0xbec3c,_0xdcb6ad=_0x2b201f[_0x3b01ca(0x301)]?.['id'],_0x4cdb9d=_0x2b201f['id'],_0x398cc7=_0x2b201f[_0x3b01ca(0x301)]?.['name']||'?',_0x49fbc0=_0x2b201f[_0x3b01ca(0x1ef)]?.[_0x3b01ca(0x273)]||'?';let _0x3cb0e2,_0x1cb079;if(_0x2b201f[_0x3b01ca(0x2e6)]){const _0x12653d=_0x2b201f['lastAttempt'];!_0x12653d[_0x3b01ca(0x259)]?(_0x3cb0e2=_0x12653d[_0x3b01ca(0x1b1)]?'🛑':'🔄',_0x1cb079=_0x12653d[_0x3b01ca(0x1b1)]?a54_0x4dcb08['yellow']:a54_0x4dcb08[_0x3b01ca(0x15f)]):(_0x3cb0e2=_0x12653d[_0x3b01ca(0x1e7)]?'✅':'❌',_0x1cb079=_0x12653d[_0x3b01ca(0x1e7)]?a54_0x4dcb08['green']:a54_0x4dcb08[_0x3b01ca(0x236)]);}else _0x3cb0e2='⏳',_0x1cb079=a54_0x4dcb08[_0x3b01ca(0x24d)];const _0x26b191='#'+_0x4cdb9d,_0x4c1be9=_0xdcb6ad?hyperlink(_0x26b191,getWorkflowSessionUrl(_0x2d6f4c,_0xdcb6ad,_0x4cdb9d)):_0x26b191;let _0x4c801b=_0x398cc7;stringWidth(_0x398cc7)>_0x3fdc0b&&(_0x4c801b=_0x398cc7[_0x3b01ca(0x23a)](0x0,_0x3fdc0b-0x1)+'…');const _0x2a312c=a54_0x4dcb08[_0x3b01ca(0x24d)](_0x4c801b),_0x2e1741=stringWidth(_0x4c801b),_0x5dc7f1='\x20'[_0x3b01ca(0x28f)](_0x3dc50f-stringWidth(_0x4c801b)+0x2),_0x201f66='('+formatElapsed(_0x31fbd9)+')',_0x3a891d=stringWidth(_0x201f66),_0x49465b=stringWidth(_0x26b191),_0x1b8ca2=_0x49465b+0x1+_0x2e1741+_0x5dc7f1[_0x3b01ca(0x1d5)],_0x20ef8e=_0x4b8502-_0x1b8ca2-_0x3a891d-0x1-0x8;let _0x540f2c=_0x49fbc0;stringWidth(_0x540f2c)>_0x20ef8e&&(_0x540f2c=_0x540f2c[_0x3b01ca(0x23a)](0x0,_0x20ef8e-0x1)+'…');const _0x2fb284=_0x4c1be9+'\x20'+_0x2a312c+_0x5dc7f1+_0x540f2c,_0x3d5484=stringWidth(_0x2fb284),_0x466848=_0x4b8502-_0x3d5484-_0x3a891d,_0x5f5ce3=_0x2fb284+'\x20'[_0x3b01ca(0x28f)](Math[_0x3b01ca(0x29c)](0x1,_0x466848))+a54_0x4dcb08[_0x3b01ca(0x24d)](_0x201f66),_0x50a718=Math[_0x3b01ca(0x18c)]((_0x4c6a03-_0x51acab)/_0x9889b7),_0x4baf8b=Math[_0x3b01ca(0x18c)]((_0xc760ea-_0x51acab)/_0x9889b7),_0x432333=Math[_0x3b01ca(0x29c)](_0x50a718+0x1,_0x4baf8b),_0x340c2c=new Array(_0x565ae6)[_0x3b01ca(0x226)]('\x20');for(let _0x13bf1c=_0x50a718;_0x13bf1c<Math[_0x3b01ca(0x264)](_0x432333,_0x565ae6);_0x13bf1c++){_0x340c2c[_0x13bf1c]='─';}const _0x9adf1c=_0x340c2c[_0x3b01ca(0x1f0)](_0x453b06=>_0x453b06==='\x20'?'\x20':_0x1cb079(_0x453b06))[_0x3b01ca(0x302)]('');_0x4d7ec2[_0x3b01ca(0x198)](_0x3cb0e2+'\x20'+_0x5f5ce3+'│'+_0x9adf1c+'│');}return _0x4d7ec2[_0x3b01ca(0x302)]('\x0a');}async[a54_0x1978f8(0x285)](_0x1064f0,_0x1b20bd,_0x3702f2){const _0x2e338e=a54_0x1978f8,{options:_0x510bda,tdx:_0x43a5ec}=_0x1b20bd,_0x4a8a8d=_0x510bda[_0x2e338e(0x2e3)],{timelineRows:_0x1c1eed,timeAxisHeader:_0x1f3f0b}=this[_0x2e338e(0x1fc)](_0x1064f0,_0x4a8a8d),_0x1cd649=_0x1c1eed[_0x2e338e(0x1ed)](_0x1a0527=>_0x1a0527['attemptId']);if(_0x1cd649['length']===0x0){const _0x4c5356=this[_0x2e338e(0x239)](_0x1064f0,_0x4a8a8d);console[_0x2e338e(0x2e8)](_0x4c5356);!_0x3702f2&&(console[_0x2e338e(0x1a6)](''),console['error'](a54_0x4dcb08['dim']('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x2e338e(0x1a6)](a54_0x4dcb08[_0x2e338e(0x24d)](_0x2e338e(0x1b9))+'or'+a54_0x4dcb08[_0x2e338e(0x24d)](_0x2e338e(0x163))));return;}_0x1f3f0b&&console['log'](_0x1f3f0b);const _0x11ef5b=_0x1c1eed['filter'](_0xe8e45=>_0xe8e45[_0x2e338e(0x217)])[_0x2e338e(0x1f0)](_0x7859cf=>({'title':_0x7859cf[_0x2e338e(0x1ae)],'value':_0x7859cf['attemptId']})),_0x227a3f=process[_0x2e338e(0x272)]['rows']||0x3c,_0xec24b9=Math['max'](0x28,Math[_0x2e338e(0x18c)](_0x227a3f*0x2/0x3)),_0x59eedd=await a54_0x51a435({'type':_0x2e338e(0x17d),'name':_0x2e338e(0x217),'message':_0x2e338e(0x1c9),'choices':_0x11ef5b,'initial':-0x1,'limit':_0xec24b9,'clearFirst':!![],'fallback':{'title':_0x2e338e(0x224),'value':null},'suggest':(_0x1b6816,_0x159579)=>{const _0x540132=_0x2e338e;if(!_0x1b6816)return Promise[_0x540132(0x2b2)](_0x159579);const _0x50905e=_0x159579[_0x540132(0x1ed)](_0x58243b=>{const _0x34de82=_0x540132,_0x299f8b=_0x58243b;return _0x299f8b[_0x34de82(0x16d)]['toLowerCase']()['includes'](_0x1b6816[_0x34de82(0x2c3)]());});return Promise['resolve'](_0x50905e);}}),_0x1a3262=()=>{const _0xaef7f1=_0x2e338e;process[_0xaef7f1(0x272)][_0xaef7f1(0x1f1)](_0xaef7f1(0x27b)),process['stdout'][_0xaef7f1(0x1f1)](_0xaef7f1(0x27b)),process[_0xaef7f1(0x272)]['write'](_0xaef7f1(0x27b));},_0xa996a1=_0x59eedd&&_0x59eedd[_0x2e338e(0x217)]&&_0x59eedd[_0x2e338e(0x217)]!==null&&_0x59eedd[_0x2e338e(0x217)]['trim']()!=='';if(!_0xa996a1){_0x1a3262(),console[_0x2e338e(0x2e8)](a54_0x4dcb08[_0x2e338e(0x24d)](_0x2e338e(0x202)));return;}_0x1a3262();const _0x7a8c77=_0x1064f0[_0x2e338e(0x2a3)](_0x13f6de=>_0x13f6de[_0x2e338e(0x2e6)]?.['id']===_0x59eedd[_0x2e338e(0x217)]);if(_0x7a8c77){const _0x47c0cb=_0x7a8c77['project']?.[_0x2e338e(0x273)]||'?',_0x3e0e78=_0x7a8c77[_0x2e338e(0x1ef)]?.[_0x2e338e(0x273)]||'?';console[_0x2e338e(0x2e8)]('Project:\x20'+a54_0x4dcb08[_0x2e338e(0x24d)](_0x47c0cb)+_0x2e338e(0x1d6)+a54_0x4dcb08[_0x2e338e(0x24d)](_0x3e0e78));}const _0x178c8f=new WorkflowTimelineCommand();await _0x178c8f[_0x2e338e(0x1bd)]({'args':[],'options':{..._0x510bda,'attemptId':_0x59eedd[_0x2e338e(0x217)]},'tdx':_0x43a5ec});}[a54_0x1978f8(0x1fc)](_0x1a0171,_0x2b3d40){const _0x507ba8=a54_0x1978f8,_0x5b5fb2=new Map();for(const _0x24247d of _0x1a0171){_0x24247d['id']&&_0x24247d[_0x507ba8(0x2e6)]?.['id']&&_0x5b5fb2[_0x507ba8(0x24f)](_0x24247d['id'],_0x24247d['lastAttempt']['id']);}const _0x552eb9=[];let _0x466dad='';const _0xd9ed14=this[_0x507ba8(0x239)](_0x1a0171,_0x2b3d40),_0xbe4605=_0xd9ed14['split']('\x0a');for(const _0x161fb9 of _0xbe4605){if(_0x161fb9[_0x507ba8(0x2f6)](_0x507ba8(0x248))||_0x161fb9[_0x507ba8(0x212)](/^\s+\d{4}-\d{2}-\d{2}/))_0x466dad=_0x161fb9;else{if(_0x161fb9[_0x507ba8(0x212)](/^[✅❌🔄🛑⏳]/)){const _0x36d6b1=_0x161fb9[_0x507ba8(0x212)](/#(\d+)/),_0x177d71=_0x36d6b1?_0x36d6b1[0x1]:null,_0x93ed39=_0x177d71?_0x5b5fb2[_0x507ba8(0x18d)](_0x177d71)||null:null,_0x3ac34a=_0x1a0171[_0x507ba8(0x2a3)](_0x45a352=>_0x45a352['id']===_0x177d71),_0x127402=_0x3ac34a?.[_0x507ba8(0x301)]?.[_0x507ba8(0x273)]||'';_0x552eb9['push']({'displayLine':_0x161fb9,'attemptId':_0x93ed39,'projectName':_0x127402});}}}return{'timelineRows':_0x552eb9,'timeAxisHeader':_0x466dad};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a54_0x1978f8(0x1e4);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x291);async[a54_0x1978f8(0x1bd)](_0x28fc12){const _0xca8eff=a54_0x1978f8,{options:_0x500d59,args:_0x3ba970,tdx:_0x1baefe}=_0x28fc12,_0x576f60=this[_0xca8eff(0x1c5)](_0x3ba970,_0x500d59);if(!_0x576f60)return 0x1;const {projectName:_0x49f108,workflowName:_0x232b3a}=_0x576f60,_0x41cc02=_0x500d59['includeRetried'];if(_0x500d59[_0xca8eff(0x156)]){if(_0x49f108&&_0x232b3a)console['error']('Filter:\x20'+_0x49f108+'.'+_0x232b3a);else _0x49f108&&console[_0xca8eff(0x1a6)](_0xca8eff(0x1f3)+_0x49f108);_0x41cc02&&console[_0xca8eff(0x1a6)](_0xca8eff(0x17a));}const _0x2d84f1=await withSpinner(_0xca8eff(0x2e7),()=>_0x1baefe['workflow'][_0xca8eff(0x241)]({'projectName':_0x49f108,'workflowName':_0x232b3a,'includeRetried':_0x41cc02,'limit':_0x500d59['limit']}),{'verbose':_0x500d59[_0xca8eff(0x156)]}),_0xbf3737=_0x2d84f1['data'],_0x5a1413=_0x500d59[_0xca8eff(0x214)]||0x64,_0x1e26b2=_0xbf3737[_0xca8eff(0x1d5)]>=_0x5a1413?a54_0x4dcb08[_0xca8eff(0x24d)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0xca8eff(0x1a6)](_0xca8eff(0x29a)+_0xbf3737[_0xca8eff(0x1d5)]+'\x20attempt'+(_0xbf3737[_0xca8eff(0x1d5)]!==0x1?'s':'')+_0x1e26b2);if(_0x500d59[_0xca8eff(0x1a8)]===_0xca8eff(0x169)||_0x500d59[_0xca8eff(0x1a8)]===_0xca8eff(0x1c6)||_0x500d59[_0xca8eff(0x1a8)]==='table')await handleSDKOutput(_0xbf3737,_0x500d59);else{if(_0xbf3737[_0xca8eff(0x1d5)]===0x0){if(_0x49f108&&_0x232b3a)console['log']('No\x20attempts\x20found\x20for:\x20'+_0x49f108+'.'+_0x232b3a);else _0x49f108?console[_0xca8eff(0x2e8)](_0xca8eff(0x1d9)+_0x49f108):console[_0xca8eff(0x2e8)](_0xca8eff(0x15c));}else{const _0x52ca7d=_0x500d59['site'],_0x2d86d2=_0xbf3737['map'](_0x404a3d=>{const _0x12255f=_0xca8eff,_0x3f6472=a54_0x4dcb08[_0x12255f(0x24d)]('#'+_0x404a3d['id']),_0x471a9e=_0x404a3d['project']?.['id'],_0x3eb0a3=_0x404a3d[_0x12255f(0x257)]||_0x404a3d[_0x12255f(0x245)],_0x18442d=_0x471a9e&&_0x3eb0a3?hyperlink(_0x3f6472,getWorkflowAttemptUrl(_0x52ca7d,_0x471a9e,_0x3eb0a3,_0x404a3d['id'])):_0x3f6472,{icon:_0x5cc8a0,text:_0x2e9fab}=getAttemptStatusDisplay(_0x404a3d),_0x4525aa=(_0x404a3d[_0x12255f(0x301)]?.[_0x12255f(0x273)]||'?')+'.'+(_0x404a3d['workflow']?.[_0x12255f(0x273)]||'?'),_0x3d8b2e=_0x404a3d[_0x12255f(0x1e1)]?a54_0x4dcb08['dim'](_0x404a3d[_0x12255f(0x1e1)]):'';return(_0x18442d+'\x20'+_0x5cc8a0+(_0x2e9fab?'\x20'+_0x2e9fab:'')+'\x20'+_0x4525aa+'\x20'+_0x3d8b2e)[_0x12255f(0x22b)]();});await writeOutput(_0x2d86d2[_0xca8eff(0x302)]('\x0a'),_0x500d59[_0xca8eff(0x1b8)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x2f9);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x1d4);async[a54_0x1978f8(0x1bd)](_0x115c54){const _0xfaa9c5=a54_0x1978f8,{options:_0xa0ec9b,args:_0x1d4bb4,tdx:_0x4463b0}=_0x115c54,_0x2930a0=_0x1d4bb4[0x0];if(!_0x2930a0)return console[_0xfaa9c5(0x1a6)](_0xfaa9c5(0x221)),0x1;_0xa0ec9b[_0xfaa9c5(0x156)]&&console[_0xfaa9c5(0x1a6)](_0xfaa9c5(0x1d0)+_0x2930a0);const _0x7e62bc=await withSpinner('Getting\x20attempt\x20details...',()=>_0x4463b0[_0xfaa9c5(0x1ef)][_0xfaa9c5(0x2b6)](_0x2930a0),{'verbose':_0xa0ec9b[_0xfaa9c5(0x156)]}),_0x55c7d9=_0x7e62bc['data'];let _0x102337;!_0x55c7d9[_0xfaa9c5(0x259)]?_0x102337=_0x55c7d9[_0xfaa9c5(0x1b1)]?_0xfaa9c5(0x2d3):_0xfaa9c5(0x20a):_0x102337=_0x55c7d9[_0xfaa9c5(0x1e7)]?'success':_0xfaa9c5(0x1a6);let _0x5e55f4;if(_0x55c7d9[_0xfaa9c5(0x2c7)]&&_0x55c7d9['finishedAt']){const _0x3d3bb8=new Date(_0x55c7d9[_0xfaa9c5(0x2c7)])[_0xfaa9c5(0x307)](),_0xaa0fb2=new Date(_0x55c7d9[_0xfaa9c5(0x1de)])[_0xfaa9c5(0x307)]();_0x5e55f4=Math[_0xfaa9c5(0x184)]((_0xaa0fb2-_0x3d3bb8)/0x3e8);}const _0x596b62={'attempt_id':_0x55c7d9['id'],'status':_0x102337,..._0x55c7d9[_0xfaa9c5(0x18b)]!==undefined&&{'index':_0x55c7d9[_0xfaa9c5(0x18b)]},..._0x55c7d9[_0xfaa9c5(0x301)]&&{'project':_0x55c7d9[_0xfaa9c5(0x301)][_0xfaa9c5(0x273)]},..._0x55c7d9[_0xfaa9c5(0x1ef)]&&{'workflow':_0x55c7d9['workflow'][_0xfaa9c5(0x273)]},..._0x55c7d9[_0xfaa9c5(0x245)]&&{'session_id':_0x55c7d9[_0xfaa9c5(0x245)]},..._0x55c7d9['sessionTime']&&{'session_time':_0x55c7d9[_0xfaa9c5(0x1e1)]},..._0x55c7d9[_0xfaa9c5(0x26c)]&&{'retry_attempt':_0x55c7d9['retryAttemptName']},..._0x5e55f4!==undefined&&{'duration_sec':_0x5e55f4},..._0x55c7d9['createdAt']&&{'created_at':_0x55c7d9[_0xfaa9c5(0x2c7)]},..._0x55c7d9['finishedAt']&&{'finished_at':_0x55c7d9[_0xfaa9c5(0x1de)]},...Object['keys'](_0x55c7d9[_0xfaa9c5(0x1bc)])[_0xfaa9c5(0x1d5)]>0x0&&{'params':_0x55c7d9[_0xfaa9c5(0x1bc)]}};return await handleSingleObjectOutput(_0x596b62,_0xa0ec9b),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a54_0x1978f8(0x1c2);[a54_0x1978f8(0x19b)]='Show\x20tasks\x20for\x20an\x20attempt';async['execute'](_0x51741e){const _0x12addc=a54_0x1978f8,{options:_0x122ee6,args:_0x180bba,tdx:_0x10e4a9}=_0x51741e,_0x1a7f39=_0x180bba[0x0];if(!_0x1a7f39)return console['error'](_0x12addc(0x221)),0x1;const _0x2b3404=_0x122ee6['includeSubtasks'];_0x122ee6[_0x12addc(0x156)]&&(console[_0x12addc(0x1a6)](_0x12addc(0x1d0)+_0x1a7f39),_0x2b3404&&console[_0x12addc(0x1a6)](_0x12addc(0x2d1)));const _0x234bb2=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x10e4a9[_0x12addc(0x1ef)][_0x12addc(0x254)](_0x1a7f39,_0x2b3404||![]),{'verbose':_0x122ee6[_0x12addc(0x156)]}),_0x2b521c=_0x234bb2[_0x12addc(0x297)];return console[_0x12addc(0x1a6)]('✔\x20Found\x20'+_0x2b521c[_0x12addc(0x1d5)]+_0x12addc(0x30e)+(_0x2b521c[_0x12addc(0x1d5)]!==0x1?'s':'')),await handleSDKOutput(_0x2b521c,_0x122ee6),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x283);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x19a);async[a54_0x1978f8(0x1bd)](_0x581af4){const _0x4e7dd9=a54_0x1978f8,{options:_0x5da196,args:_0x69f1e6,tdx:_0x1a9406}=_0x581af4,_0x2b09d2=_0x69f1e6[0x0];let _0x1fbec8=_0x69f1e6[0x1];if(!_0x2b09d2)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x5da196[_0x4e7dd9(0x156)]&&(console[_0x4e7dd9(0x1a6)]('Attempt\x20ID:\x20'+_0x2b09d2),_0x1fbec8&&console[_0x4e7dd9(0x1a6)](_0x4e7dd9(0x2d2)+_0x1fbec8));const _0x17fd0d=await withSpinner(_0x4e7dd9(0x2b3),()=>_0x1a9406[_0x4e7dd9(0x1ef)]['logFiles'](_0x2b09d2,_0x1fbec8),{'verbose':_0x5da196[_0x4e7dd9(0x156)]}),_0x4fe493=_0x17fd0d[_0x4e7dd9(0x297)];if(_0x4fe493[_0x4e7dd9(0x1d5)]===0x0)return console[_0x4e7dd9(0x1a6)](_0x4e7dd9(0x253)),0x0;if(!_0x1fbec8&&(_0x5da196[_0x4e7dd9(0x169)]||_0x5da196['format']))return await handleSDKOutput(_0x4fe493,_0x5da196),0x0;if(!_0x1fbec8){const _0x79c702=_0x4fe493['map'](_0x136a83=>({'title':_0x136a83['taskName']+'\x20('+formatBytes(_0x136a83[_0x4e7dd9(0x232)])+')','value':_0x136a83['taskName']})),_0x450ae6=await a54_0x51a435({'type':_0x4e7dd9(0x204),'name':'task','message':_0x4e7dd9(0x29d),'choices':_0x79c702});if(!_0x450ae6['task'])return console[_0x4e7dd9(0x1a6)]('Cancelled'),0x0;_0x1fbec8=_0x450ae6[_0x4e7dd9(0x2c8)];}const _0x4ffa42=await withSpinner('Downloading\x20logs...',()=>_0x1a9406[_0x4e7dd9(0x1ef)][_0x4e7dd9(0x2f1)](_0x2b09d2,_0x1fbec8),{'verbose':_0x5da196[_0x4e7dd9(0x156)]}),_0x400301=_0x4ffa42['data'];return _0x400301?console[_0x4e7dd9(0x2e8)](_0x400301):console[_0x4e7dd9(0x1a6)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0x1978f8(0x273)]='workflow:kill';[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x19c);async[a54_0x1978f8(0x1bd)](_0x4c0c0f){const _0x75b0c8=a54_0x1978f8,{options:_0x57aeb6,args:_0x2423a6,tdx:_0x4d5421}=_0x4c0c0f,_0x543da8=_0x2423a6[0x0];if(!_0x543da8)return console['error'](_0x75b0c8(0x221)),0x1;const _0x3c6787=_0x57aeb6['reason'];_0x57aeb6['verbose']&&(console['error'](_0x75b0c8(0x1d0)+_0x543da8),_0x3c6787&&console[_0x75b0c8(0x1a6)](_0x75b0c8(0x1b6)+_0x3c6787));if(!_0x57aeb6['yes']){if(!isInteractive())return console[_0x75b0c8(0x1a6)](a54_0x4dcb08[_0x75b0c8(0x236)]('\x0aError:'),_0x75b0c8(0x168)),console[_0x75b0c8(0x1a6)](a54_0x4dcb08[_0x75b0c8(0x24d)](_0x75b0c8(0x203))),0x1;const _0x2ec83e=await confirmKey(_0x75b0c8(0x207)+_0x543da8+'?');if(!_0x2ec83e)return console[_0x75b0c8(0x1a6)](a54_0x4dcb08['yellow'](_0x75b0c8(0x202))),0x1;}const _0x460a51=await withSpinner(_0x75b0c8(0x16e),()=>_0x4d5421[_0x75b0c8(0x1ef)][_0x75b0c8(0x2bf)](_0x543da8,_0x3c6787),{'verbose':_0x57aeb6['verbose']}),_0xefce82=_0x460a51['data'];return console['error']('✔\x20'+_0xefce82),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a54_0x1978f8(0x205);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x2dc);async[a54_0x1978f8(0x1bd)](_0x28212a){const _0x1ded5e=a54_0x1978f8,{options:_0x2305d3,args:_0x10f31a,tdx:_0xd40ee9}=_0x28212a,_0xcd0132=_0x10f31a[0x0];if(!_0xcd0132)return console[_0x1ded5e(0x1a6)](_0x1ded5e(0x246)),console['error'](_0x1ded5e(0x1d1)),0x1;let _0x2a8810=![],_0x13eaf4=_0xcd0132;if(_0xcd0132['startsWith'](_0x1ded5e(0x16c)))_0x2a8810=!![],_0x13eaf4=_0xcd0132[_0x1ded5e(0x25e)](0x8);else{if(_0xcd0132[_0x1ded5e(0x2f6)](_0x1ded5e(0x24e)))_0x2a8810=![],_0x13eaf4=_0xcd0132[_0x1ded5e(0x25e)](0x8);else return console[_0x1ded5e(0x1a6)](_0x1ded5e(0x2ab)),console[_0x1ded5e(0x1a6)](_0x1ded5e(0x1d1)),0x1;}const _0x11346e=_0x2305d3[_0x1ded5e(0x281)],_0x1c3ae2=_0x2305d3[_0x1ded5e(0x314)],_0x5cf88e=_0x2305d3['params'],_0x5f3fce=_0x2305d3[_0x1ded5e(0x26e)];_0x2305d3[_0x1ded5e(0x156)]&&(console[_0x1ded5e(0x1a6)](_0x1ded5e(0x1e8)+(_0x2a8810?_0x1ded5e(0x2ed):'attempt')+'\x20'+_0x13eaf4),_0x11346e&&console['error'](_0x1ded5e(0x1c1)+_0x11346e),_0x1c3ae2&&console['error'](_0x1ded5e(0x1c0)+_0x1c3ae2),_0x5cf88e&&console[_0x1ded5e(0x1a6)](_0x1ded5e(0x21e)+_0x5cf88e),_0x5f3fce&&console[_0x1ded5e(0x1a6)]('Force:\x20yes'));let _0x4cc626;if(_0x5cf88e)try{if(_0x5cf88e['startsWith']('@')){const _0x430152=await import(_0x1ded5e(0x1f9)),_0x3cb2be=_0x5cf88e[_0x1ded5e(0x25e)](0x1),_0x207130=await _0x430152[_0x1ded5e(0x1cb)](_0x3cb2be,_0x1ded5e(0x20f));_0x4cc626=JSON[_0x1ded5e(0x29b)](_0x207130);}else _0x4cc626=JSON['parse'](_0x5cf88e);}catch{return console[_0x1ded5e(0x1a6)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x2305d3[_0x1ded5e(0x188)]){if(!isInteractive())return console[_0x1ded5e(0x1a6)](a54_0x4dcb08[_0x1ded5e(0x236)](_0x1ded5e(0x2ba)),_0x1ded5e(0x168)),console['error'](a54_0x4dcb08['dim'](_0x1ded5e(0x203))),0x1;const _0x21ee43=await confirmKey(_0x1ded5e(0x22e)+(_0x2a8810?_0x1ded5e(0x2ed):'attempt')+'\x20'+_0x13eaf4+'?');if(!_0x21ee43)return console['error'](a54_0x4dcb08['yellow']('Cancelled')),0x1;}let _0x4bdc65;_0x2a8810?_0x4bdc65=await withSpinner(_0x1ded5e(0x250),()=>_0xd40ee9[_0x1ded5e(0x1ef)][_0x1ded5e(0x21b)](_0x13eaf4,{'fromTask':_0x11346e,'retryParams':_0x4cc626}),{'verbose':_0x2305d3['verbose']}):_0x4bdc65=await withSpinner(_0x1ded5e(0x1ca),()=>_0xd40ee9[_0x1ded5e(0x1ef)]['retryAttempt'](_0x13eaf4,{'resumeFrom':_0x1c3ae2,'retryParams':_0x4cc626,'force':_0x5f3fce}),{'verbose':_0x2305d3[_0x1ded5e(0x156)]});const _0x2e23a7=_0x4bdc65[_0x1ded5e(0x297)];return console[_0x1ded5e(0x1a6)](_0x1ded5e(0x2a2)),console[_0x1ded5e(0x1a6)](_0x1ded5e(0x2ea)+_0x2e23a7[_0x1ded5e(0x217)]),console['error']('\x20\x20Session\x20ID:\x20'+_0x2e23a7[_0x1ded5e(0x245)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a54_0x1978f8(0x17f);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x2cd);async[a54_0x1978f8(0x1bd)](_0x2b13f3){const _0x170912=a54_0x1978f8,{options:_0x378c8d,args:_0x252f38,tdx:_0x221ed0}=_0x2b13f3;let _0x4ef507=_0x252f38[0x0];if(!_0x4ef507){const _0x4b8419=this[_0x170912(0x27e)]([],_0x378c8d),_0x5773cb=await withSpinner(_0x170912(0x1fd),()=>_0x221ed0[_0x170912(0x1ef)][_0x170912(0x2aa)](_0x4b8419,{'limit':_0x378c8d[_0x170912(0x214)]}),{'verbose':_0x378c8d[_0x170912(0x156)]}),_0x1e86b1=_0x5773cb[_0x170912(0x297)];if(_0x1e86b1[_0x170912(0x1d5)]===0x0)return console[_0x170912(0x1a6)](_0x170912(0x230)),!_0x4b8419&&console['error'](a54_0x4dcb08[_0x170912(0x24d)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x1942cb=_0x1e86b1[_0x170912(0x1f0)](_0x53f110=>({'title':_0x53f110[_0x170912(0x301)]?.[_0x170912(0x273)]+'.'+_0x53f110[_0x170912(0x273)],'value':_0x53f110[_0x170912(0x301)]?.['name']+'.'+_0x53f110['name'],'description':_0x53f110[_0x170912(0x1af)]?_0x170912(0x227)+_0x53f110['revision']:undefined})),_0x4192af=await a54_0x51a435({'type':_0x170912(0x204),'name':_0x170912(0x1ef),'message':_0x170912(0x1eb),'choices':_0x1942cb});if(!_0x4192af['workflow'])return 0x1;_0x4ef507=_0x4192af[_0x170912(0x1ef)];}if(!_0x4ef507[_0x170912(0x243)]('.')){const _0x2c9308=this[_0x170912(0x27e)]([],_0x378c8d);if(_0x2c9308)_0x4ef507=_0x2c9308+'.'+_0x4ef507;else return console[_0x170912(0x1a6)](a54_0x4dcb08[_0x170912(0x236)](_0x170912(0x2a4)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a54_0x4dcb08[_0x170912(0x24d)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0xbcad30=_0x378c8d[_0x170912(0x279)],_0x53bd39=_0x378c8d[_0x170912(0x1e1)],_0x42a708={};if(_0xbcad30&&Array[_0x170912(0x1c7)](_0xbcad30))for(const _0x9205aa of _0xbcad30){const _0xec0d8a=_0x9205aa[_0x170912(0x1cc)]('=');if(_0xec0d8a===-0x1)return console[_0x170912(0x1a6)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x9205aa),console['error']('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x2c4923=_0x9205aa[_0x170912(0x25e)](0x0,_0xec0d8a),_0x4d369e=_0x9205aa['substring'](_0xec0d8a+0x1);try{_0x42a708[_0x2c4923]=JSON[_0x170912(0x29b)](_0x4d369e);}catch{_0x42a708[_0x2c4923]=_0x4d369e;}}_0x378c8d[_0x170912(0x156)]&&(console[_0x170912(0x1a6)](_0x170912(0x2f5)+_0x4ef507),Object[_0x170912(0x189)](_0x42a708)[_0x170912(0x1d5)]>0x0&&console[_0x170912(0x1a6)]('Parameters:\x20'+JSON['stringify'](_0x42a708)),_0x53bd39&&console[_0x170912(0x1a6)]('Session\x20time:\x20'+_0x53bd39));const _0x13719a=await withSpinner(_0x170912(0x305),()=>_0x221ed0[_0x170912(0x1ef)]['run'](_0x4ef507,_0x42a708,{'sessionTime':_0x53bd39}),{'verbose':_0x378c8d[_0x170912(0x156)]}),_0x46b341=_0x13719a[_0x170912(0x297)];console['error'](_0x170912(0x15a)),console[_0x170912(0x1a6)](_0x170912(0x263)+_0x46b341['id']),console['error']('\x20\x20Session\x20ID:\x20'+_0x46b341[_0x170912(0x245)]),console[_0x170912(0x1a6)](_0x170912(0x262)+_0x46b341[_0x170912(0x301)]?.[_0x170912(0x273)]),console[_0x170912(0x1a6)](_0x170912(0x19d)+_0x46b341[_0x170912(0x1ef)]?.['name']);if(_0x46b341['project']?.['id']&&_0x46b341[_0x170912(0x245)]&&_0x46b341['id']){const _0x4a091d=_0x378c8d[_0x170912(0x2e3)],_0xbc2fbc=getConsoleUrl(_0x4a091d,_0x170912(0x311)+_0x46b341[_0x170912(0x301)]['id']+_0x170912(0x229)+_0x46b341[_0x170912(0x245)]+_0x170912(0x233)+_0x46b341['id']);console[_0x170912(0x1a6)](_0x170912(0x252)+a54_0x4dcb08[_0x170912(0x30f)](_0xbc2fbc));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x310);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x158);async[a54_0x1978f8(0x1bd)](_0x410b02){const _0x564bfb=a54_0x1978f8,{options:_0x35036a,args:_0x1948d7,tdx:_0x9d9750}=_0x410b02,_0x4a0646=_0x1948d7[0x0],_0x3d4b1c=_0x1948d7[0x1]||'.';if(!_0x4a0646)return console[_0x564bfb(0x1a6)](_0x564bfb(0x209)),console[_0x564bfb(0x1a6)](_0x564bfb(0x1f8)),0x1;const _0x5f2d10=_0x35036a[_0x564bfb(0x1af)];_0x35036a[_0x564bfb(0x156)]&&(console[_0x564bfb(0x1a6)]('Project:\x20'+_0x4a0646),console['error'](_0x564bfb(0x18f)+_0x3d4b1c),_0x5f2d10&&console[_0x564bfb(0x1a6)](_0x564bfb(0x25b)+_0x5f2d10));const _0x2e906c=await withSpinner(_0x564bfb(0x23e)+_0x4a0646+_0x564bfb(0x199),()=>_0x9d9750['workflow'][_0x564bfb(0x16a)](_0x4a0646,_0x3d4b1c,{'revision':_0x5f2d10}),{'verbose':_0x35036a[_0x564bfb(0x156)]}),_0x119068=_0x2e906c[_0x564bfb(0x297)];return console[_0x564bfb(0x1a6)](_0x564bfb(0x2dd)+_0x119068[_0x564bfb(0x306)]),console[_0x564bfb(0x1a6)](_0x564bfb(0x2ee)+_0x119068[_0x564bfb(0x1af)]),console['error'](_0x564bfb(0x1fa)+_0x119068[_0x564bfb(0x292)]),console['error'](_0x564bfb(0x2b7)+_0x3d4b1c+'/'+_0x119068[_0x564bfb(0x306)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x2ca);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x21d);async[a54_0x1978f8(0x1bd)](_0x18dcaa){const _0x56abc8=a54_0x1978f8,{options:_0x31cdb8,args:_0x344f0b,tdx:_0x5b6070}=_0x18dcaa;let _0x584617='.',_0x5460fc=_0x31cdb8[_0x56abc8(0x273)];if(_0x344f0b[0x0]){const {promises:_0x1acd96}=await import('fs');try{const _0x134e5f=await _0x1acd96[_0x56abc8(0x183)](_0x344f0b[0x0]);if(_0x134e5f[_0x56abc8(0x194)]())_0x584617=_0x344f0b[0x0];else return console['error']('Error:\x20'+_0x344f0b[0x0]+_0x56abc8(0x1f7)),0x1;}catch{_0x5460fc=_0x344f0b[0x0],_0x584617='.';}}const _0x22470c=_0x31cdb8[_0x56abc8(0x1af)],_0x1c5d7e=_0x31cdb8[_0x56abc8(0x23c)];_0x31cdb8['verbose']&&(console[_0x56abc8(0x1a6)](_0x56abc8(0x2b4)+_0x584617),_0x5460fc&&console['error'](_0x56abc8(0x2bb)+_0x5460fc),_0x22470c&&console['error'](_0x56abc8(0x25b)+_0x22470c),_0x1c5d7e&&console[_0x56abc8(0x1a6)](_0x56abc8(0x308)));const _0x28a99d=await withSpinner(_0x56abc8(0x170),()=>_0x5b6070[_0x56abc8(0x1ef)][_0x56abc8(0x198)](_0x584617,{'projectName':_0x5460fc,'revision':_0x22470c,'skipValidation':_0x1c5d7e}),{'verbose':_0x31cdb8[_0x56abc8(0x156)]}),_0x55ecf7=_0x28a99d['data'];return console[_0x56abc8(0x1a6)](_0x56abc8(0x2c4)+_0x55ecf7[_0x56abc8(0x306)]),console[_0x56abc8(0x1a6)]('\x20\x20Project\x20ID:\x20'+_0x55ecf7['projectId']),console['error'](_0x56abc8(0x2ee)+_0x55ecf7[_0x56abc8(0x1af)]),await this[_0x56abc8(0x23b)](_0x5b6070,_0x55ecf7[_0x56abc8(0x306)],_0x31cdb8[_0x56abc8(0x2e3)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x22f);['description']=a54_0x1978f8(0x1bb);async[a54_0x1978f8(0x1bd)](_0x572cab){const _0x1b663b=a54_0x1978f8,{options:_0x3e1489,args:_0x53325d,tdx:_0x3933dc}=_0x572cab,_0x186698=_0x53325d[0x0],_0x4ddc4c=_0x53325d[0x1];if(!_0x186698)return console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x236)](_0x1b663b(0x2a4)),_0x1b663b(0x249)),console[_0x1b663b(0x1a6)](a54_0x4dcb08['dim'](_0x1b663b(0x235))),0x1;const _0x25a6b2=_0x3e1489['revision'];_0x3e1489[_0x1b663b(0x156)]&&(console[_0x1b663b(0x1a6)](_0x1b663b(0x2b1)+_0x186698),_0x4ddc4c&&console[_0x1b663b(0x1a6)](_0x1b663b(0x2e1)+_0x4ddc4c),_0x25a6b2&&console[_0x1b663b(0x1a6)](_0x1b663b(0x25b)+_0x25a6b2),_0x3e1489[_0x1b663b(0x1b2)]&&console[_0x1b663b(0x1a6)]('Dry\x20run:\x20yes'));const _0x4f2b3d=await withSpinner(_0x1b663b(0x1fe)+_0x186698+'...',()=>_0x3933dc[_0x1b663b(0x1ef)][_0x1b663b(0x286)](_0x186698,{'targetDir':_0x4ddc4c,'revision':_0x25a6b2}),{'verbose':_0x3e1489[_0x1b663b(0x156)]}),_0x2b2703=_0x4f2b3d[_0x1b663b(0x297)];_0x2b2703[_0x1b663b(0x27c)]?console[_0x1b663b(0x1a6)]('→\x20New\x20project:\x20'+_0x2b2703[_0x1b663b(0x306)]):console[_0x1b663b(0x1a6)](_0x1b663b(0x2db)+_0x2b2703[_0x1b663b(0x306)]);console[_0x1b663b(0x1a6)](_0x1b663b(0x2ee)+_0x2b2703['revision']),console[_0x1b663b(0x1a6)]('\x20\x20Target:\x20'+(a54_0x331f20[_0x1b663b(0x2ce)](process[_0x1b663b(0x2c1)](),_0x2b2703[_0x1b663b(0x164)])||'.')),console[_0x1b663b(0x1a6)]('\x20\x20Changes:\x20'+a54_0x4dcb08['green']('+'+_0x2b2703[_0x1b663b(0x27f)]['new']+_0x1b663b(0x238))+',\x20'+(a54_0x4dcb08[_0x1b663b(0x1ff)]('~'+_0x2b2703[_0x1b663b(0x27f)][_0x1b663b(0x2b8)]+_0x1b663b(0x201))+',\x20')+(a54_0x4dcb08[_0x1b663b(0x236)]('-'+_0x2b2703[_0x1b663b(0x27f)][_0x1b663b(0x17e)]+_0x1b663b(0x161))+',\x20')+(''+a54_0x4dcb08[_0x1b663b(0x24d)](_0x2b2703[_0x1b663b(0x27f)][_0x1b663b(0x1cf)]+_0x1b663b(0x22a))));for(const _0x23af98 of _0x2b2703['changes']){_0x23af98[_0x1b663b(0x2ec)]===_0x1b663b(0x2b8)&&_0x23af98['diff']&&(console['error']('\x0a'+a54_0x4dcb08['cyan'](_0x1b663b(0x26f)+_0x23af98['path'])),console[_0x1b663b(0x1a6)](_0x23af98[_0x1b663b(0x167)]));}if(!_0x2b2703[_0x1b663b(0x2b9)])return saveSessionContext({'workflow_project':_0x2b2703[_0x1b663b(0x306)]},_0x3e1489[_0x1b663b(0x2ed)]),console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x2ac)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x24d)](_0x1b663b(0x1a3)+_0x2b2703['projectName'])),0x0;if(_0x3e1489['dryRun'])return console['error'](a54_0x4dcb08[_0x1b663b(0x1ff)](_0x1b663b(0x258))),0x0;if(!_0x3e1489[_0x1b663b(0x188)]){if(!isInteractive())return console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x236)](_0x1b663b(0x2ba)),_0x1b663b(0x168)),console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x24d)](_0x1b663b(0x203))),0x1;const _0x1ec344=await confirmKey(_0x1b663b(0x195));if(!_0x1ec344)return console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x1ff)](_0x1b663b(0x202)),_0x1b663b(0x265)),0x1;}await withSpinner(_0x1b663b(0x1a1),()=>_0x3933dc[_0x1b663b(0x1ef)][_0x1b663b(0x211)](_0x2b2703,{'revision':_0x25a6b2}),{'verbose':_0x3e1489[_0x1b663b(0x156)]}),saveSessionContext({'workflow_project':_0x2b2703['projectName']},_0x3e1489[_0x1b663b(0x2ed)]),console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x2ac)](_0x1b663b(0x2f4)));const _0x44d661=a54_0x331f20['relative'](process[_0x1b663b(0x2c1)](),_0x2b2703[_0x1b663b(0x164)])||'.';return console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x24d)](_0x1b663b(0x2b7)+_0x44d661)),console[_0x1b663b(0x1a6)](a54_0x4dcb08[_0x1b663b(0x24d)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x2b2703[_0x1b663b(0x306)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a54_0x1978f8(0x1a9);['description']=a54_0x1978f8(0x288);async[a54_0x1978f8(0x1bd)](_0x74c8fb){const _0xa45fd4=a54_0x1978f8,{options:_0x57c09f,args:_0x35a31d,tdx:_0x501733}=_0x74c8fb,_0xcad5cc=this['resolveProjectDir'](_0x35a31d,_0x57c09f),_0x2dcd9d=_0x57c09f[_0xa45fd4(0x1af)],_0x3fbac8=_0x57c09f[_0xa45fd4(0x23c)];_0x57c09f[_0xa45fd4(0x156)]&&(_0xcad5cc&&console['error'](_0xa45fd4(0x2f0)+_0xcad5cc),_0x2dcd9d&&console[_0xa45fd4(0x1a6)]('Revision:\x20'+_0x2dcd9d),_0x57c09f[_0xa45fd4(0x1b2)]&&console[_0xa45fd4(0x1a6)](_0xa45fd4(0x2c6)),_0x3fbac8&&console['error']('Validation:\x20skipped'));let _0x53b416;try{_0x53b416=await withSpinner(_0xa45fd4(0x222),()=>_0x501733[_0xa45fd4(0x1ef)]['preparePushProject']({'sourceDir':_0xcad5cc,'revision':_0x2dcd9d,'skipValidation':_0x3fbac8}),{'verbose':_0x57c09f[_0xa45fd4(0x156)]});}catch(_0x3186d1){if(_0x3186d1 instanceof Error&&_0x3186d1[_0xa45fd4(0x242)]['includes'](_0xa45fd4(0x20c)))return console['error'](a54_0x4dcb08['red'](_0xa45fd4(0x2a4)),_0xa45fd4(0x1a0)),_0x57c09f[_0xa45fd4(0x28a)]?console[_0xa45fd4(0x1a6)](a54_0x4dcb08[_0xa45fd4(0x24d)](_0xa45fd4(0x157)+_0x57c09f[_0xa45fd4(0x28a)]+_0xa45fd4(0x1c4)+_0x57c09f[_0xa45fd4(0x28a)]+'\x27')):console[_0xa45fd4(0x1a6)](a54_0x4dcb08[_0xa45fd4(0x24d)](_0xa45fd4(0x191))),0x1;throw _0x3186d1;}const _0x4d05e9=_0x53b416[_0xa45fd4(0x297)];console[_0xa45fd4(0x1a6)](_0xa45fd4(0x2be)+_0x4d05e9[_0xa45fd4(0x306)]),console['error'](_0xa45fd4(0x2a1)+_0x4d05e9[_0xa45fd4(0x294)]),console[_0xa45fd4(0x1a6)](_0xa45fd4(0x2ee)+_0x4d05e9[_0xa45fd4(0x1af)]),console[_0xa45fd4(0x1a6)](_0xa45fd4(0x210)+a54_0x4dcb08[_0xa45fd4(0x2ac)]('+'+_0x4d05e9[_0xa45fd4(0x27f)][_0xa45fd4(0x2cc)]+_0xa45fd4(0x238))+',\x20'+(a54_0x4dcb08[_0xa45fd4(0x1ff)]('~'+_0x4d05e9[_0xa45fd4(0x27f)][_0xa45fd4(0x2b8)]+_0xa45fd4(0x201))+',\x20')+(a54_0x4dcb08[_0xa45fd4(0x236)]('-'+_0x4d05e9['summary'][_0xa45fd4(0x17e)]+'\x20deleted')+',\x20')+(''+a54_0x4dcb08[_0xa45fd4(0x24d)](_0x4d05e9[_0xa45fd4(0x27f)][_0xa45fd4(0x1cf)]+'\x20unchanged')));for(const _0x3a38cb of _0x4d05e9['changes']){_0x3a38cb['type']===_0xa45fd4(0x2b8)&&_0x3a38cb['diff']&&(console[_0xa45fd4(0x1a6)]('\x0a'+a54_0x4dcb08[_0xa45fd4(0x30f)](_0xa45fd4(0x26f)+_0x3a38cb['path'])),console[_0xa45fd4(0x1a6)](_0x3a38cb['diff']));}if(!_0x4d05e9[_0xa45fd4(0x2b9)])return console[_0xa45fd4(0x1a6)](a54_0x4dcb08[_0xa45fd4(0x2ac)](_0xa45fd4(0x19f))),await this[_0xa45fd4(0x23b)](_0x501733,_0x4d05e9[_0xa45fd4(0x306)],_0x57c09f[_0xa45fd4(0x2e3)]),0x0;if(_0x57c09f['dryRun'])return console[_0xa45fd4(0x1a6)](a54_0x4dcb08[_0xa45fd4(0x1ff)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x57c09f[_0xa45fd4(0x188)]){if(!isInteractive())return console['error'](a54_0x4dcb08[_0xa45fd4(0x236)](_0xa45fd4(0x2ba)),_0xa45fd4(0x168)),console[_0xa45fd4(0x1a6)](a54_0x4dcb08[_0xa45fd4(0x24d)](_0xa45fd4(0x203))),0x1;const _0x4b7f06=await confirmKey(_0xa45fd4(0x160));if(!_0x4b7f06)return console['error'](a54_0x4dcb08['yellow'](_0xa45fd4(0x202)),'-\x20nothing\x20pushed'),0x1;}const _0x22eb69=await withSpinner(_0xa45fd4(0x15e),()=>_0x501733['workflow'][_0xa45fd4(0x150)](_0x4d05e9),{'verbose':_0x57c09f[_0xa45fd4(0x156)]}),_0x40ed47=_0x22eb69[_0xa45fd4(0x297)];return console[_0xa45fd4(0x1a6)](a54_0x4dcb08[_0xa45fd4(0x2ac)](_0xa45fd4(0x296))),console['error']('\x20\x20Project\x20ID:\x20'+_0x40ed47[_0xa45fd4(0x213)]),console[_0xa45fd4(0x1a6)]('\x20\x20Revision:\x20'+_0x40ed47[_0xa45fd4(0x1af)]),await this[_0xa45fd4(0x23b)](_0x501733,_0x40ed47[_0xa45fd4(0x306)],_0x57c09f['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x180);['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a54_0x1978f8(0x1bd)](_0x1fac2f){const _0x19e2c1=a54_0x1978f8,{options:_0x37e6a7,args:_0x24b1ce,tdx:_0x58e6ba}=_0x1fac2f,_0x360294=this['resolveProjectDir'](_0x24b1ce,_0x37e6a7),_0x2586ea=_0x37e6a7[_0x19e2c1(0x273)],_0x1a321a=_0x37e6a7['revision'],_0x25abab=_0x37e6a7[_0x19e2c1(0x23c)];if(!_0x360294)return console[_0x19e2c1(0x1a6)](a54_0x4dcb08[_0x19e2c1(0x236)](_0x19e2c1(0x2a4)),_0x19e2c1(0x244)),console[_0x19e2c1(0x1a6)](a54_0x4dcb08[_0x19e2c1(0x24d)](_0x19e2c1(0x303))),console[_0x19e2c1(0x1a6)](a54_0x4dcb08[_0x19e2c1(0x24d)](_0x19e2c1(0x197))),0x1;if(!_0x2586ea)return console[_0x19e2c1(0x1a6)](a54_0x4dcb08[_0x19e2c1(0x236)](_0x19e2c1(0x2a4)),_0x19e2c1(0x25d)),console[_0x19e2c1(0x1a6)](a54_0x4dcb08[_0x19e2c1(0x24d)](_0x19e2c1(0x303))),0x1;_0x37e6a7[_0x19e2c1(0x156)]&&(console[_0x19e2c1(0x1a6)](_0x19e2c1(0x2f0)+_0x360294),console[_0x19e2c1(0x1a6)](_0x19e2c1(0x260)+_0x2586ea),_0x1a321a&&console[_0x19e2c1(0x1a6)](_0x19e2c1(0x25b)+_0x1a321a),_0x37e6a7[_0x19e2c1(0x1b2)]&&console['error'](_0x19e2c1(0x2c6)),_0x25abab&&console[_0x19e2c1(0x1a6)]('Validation:\x20skipped'));const _0x1dc144=await withSpinner('Analyzing\x20project...',()=>_0x58e6ba['workflow']['prepareCloneProject'](_0x360294,_0x2586ea,{'revision':_0x1a321a,'skipValidation':_0x25abab}),{'verbose':_0x37e6a7[_0x19e2c1(0x156)]}),_0x4c8674=_0x1dc144[_0x19e2c1(0x297)];console[_0x19e2c1(0x1a6)](_0x19e2c1(0x26b)+_0x4c8674['sourceDir']);_0x4c8674['sourceProjectName']&&console['error'](_0x19e2c1(0x2fc)+_0x4c8674[_0x19e2c1(0x24c)]);console[_0x19e2c1(0x1a6)](_0x19e2c1(0x260)+_0x4c8674[_0x19e2c1(0x24a)]),console[_0x19e2c1(0x1a6)]('Revision:\x20'+_0x4c8674[_0x19e2c1(0x1af)]),console['error']('Files\x20to\x20upload:\x20'+_0x4c8674[_0x19e2c1(0x1e5)]);_0x4c8674['targetExists']&&(console['error'](a54_0x4dcb08[_0x19e2c1(0x1ff)](_0x19e2c1(0x30c)+_0x4c8674['newProjectName']+_0x19e2c1(0x278)+_0x4c8674['existingProjectId']+')')),console['error'](a54_0x4dcb08[_0x19e2c1(0x1ff)](_0x19e2c1(0x2b0))));if(_0x37e6a7[_0x19e2c1(0x1b2)])return console[_0x19e2c1(0x1a6)](a54_0x4dcb08['yellow']('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x37e6a7[_0x19e2c1(0x188)]){if(!isInteractive())return console[_0x19e2c1(0x1a6)](a54_0x4dcb08['red'](_0x19e2c1(0x2ba)),_0x19e2c1(0x168)),console[_0x19e2c1(0x1a6)](a54_0x4dcb08['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4329b5=_0x4c8674[_0x19e2c1(0x24c)]||a54_0x331f20['basename'](_0x360294),_0x5258af=_0x4c8674[_0x19e2c1(0x215)]?_0x19e2c1(0x15d)+_0x2586ea+_0x19e2c1(0x2b5):_0x19e2c1(0x1f4)+_0x4329b5+_0x19e2c1(0x17b)+_0x2586ea+'\x22?',_0x2efbf9=await confirmKey(_0x5258af);if(!_0x2efbf9)return console[_0x19e2c1(0x1a6)](a54_0x4dcb08['yellow'](_0x19e2c1(0x202))),0x1;}const _0x5342d1=await withSpinner(_0x4c8674[_0x19e2c1(0x215)]?_0x19e2c1(0x153)+_0x2586ea+'...':'Cloning\x20to\x20'+_0x2586ea+_0x19e2c1(0x199),()=>_0x58e6ba[_0x19e2c1(0x1ef)][_0x19e2c1(0x25f)](_0x4c8674),{'verbose':_0x37e6a7['verbose']}),_0x9ba626=_0x5342d1[_0x19e2c1(0x297)];return console[_0x19e2c1(0x1a6)](a54_0x4dcb08[_0x19e2c1(0x2ac)](_0x4c8674[_0x19e2c1(0x215)]?_0x19e2c1(0x196):_0x19e2c1(0x219))),console['error'](_0x19e2c1(0x262)+_0x9ba626[_0x19e2c1(0x24a)]),console[_0x19e2c1(0x1a6)](_0x19e2c1(0x151)+_0x9ba626[_0x19e2c1(0x2ef)]),console[_0x19e2c1(0x1a6)](_0x19e2c1(0x2ee)+_0x9ba626['revision']),await this[_0x19e2c1(0x23b)](_0x58e6ba,_0x9ba626[_0x19e2c1(0x24a)],_0x37e6a7[_0x19e2c1(0x2e3)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x240);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x225);async['execute'](_0x32b092){const _0x2a1a09=a54_0x1978f8,{options:_0x44f6e2,args:_0x31cea0,tdx:_0x3b4a96}=_0x32b092,_0x94ce39=_0x31cea0[0x0];if(!_0x94ce39)return console[_0x2a1a09(0x1a6)](_0x2a1a09(0x1dc)),console[_0x2a1a09(0x1a6)](_0x2a1a09(0x2fa)),0x1;_0x44f6e2[_0x2a1a09(0x156)]&&console[_0x2a1a09(0x1a6)](_0x2a1a09(0x2b1)+_0x94ce39);if(!_0x44f6e2[_0x2a1a09(0x188)]){if(!isInteractive())return console[_0x2a1a09(0x1a6)](a54_0x4dcb08[_0x2a1a09(0x236)](_0x2a1a09(0x2ba)),_0x2a1a09(0x168)),console[_0x2a1a09(0x1a6)](a54_0x4dcb08[_0x2a1a09(0x24d)](_0x2a1a09(0x203))),0x1;const _0x2a4305=await confirmKey(_0x2a1a09(0x2f7)+_0x94ce39+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x2a4305)return console['error'](a54_0x4dcb08[_0x2a1a09(0x1ff)](_0x2a1a09(0x202))),0x1;}const _0x44d08f=await withSpinner(_0x2a1a09(0x1a4)+_0x94ce39+'...',()=>_0x3b4a96[_0x2a1a09(0x1ef)][_0x2a1a09(0x2fe)](_0x94ce39),{'verbose':_0x44f6e2['verbose']}),_0x5bf8eb=_0x44d08f[_0x2a1a09(0x297)];return console[_0x2a1a09(0x1a6)]('✔\x20Deleted\x20project\x20'+_0x5bf8eb[_0x2a1a09(0x306)]),console[_0x2a1a09(0x1a6)](_0x2a1a09(0x151)+_0x5bf8eb[_0x2a1a09(0x213)]),0x0;}}export function parseKeyValue(_0x5a76fd){const _0x341296=a54_0x1978f8,_0x1b35b9=_0x5a76fd['indexOf']('=');if(_0x1b35b9===-0x1)throw new Error('Invalid\x20format:\x20'+_0x5a76fd+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x3206e1=_0x5a76fd[_0x341296(0x25e)](0x0,_0x1b35b9),_0x3b1514=_0x5a76fd[_0x341296(0x25e)](_0x1b35b9+0x1);if(!_0x3206e1)throw new Error(_0x341296(0x1e6));return{'key':_0x3206e1,'value':_0x3b1514};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x2ae);[a54_0x1978f8(0x19b)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a54_0x1978f8(0x1bd)](_0x1f1f8f){const _0x46d90c=a54_0x1978f8,{options:_0x510b5b,args:_0x435ac9,tdx:_0x389515}=_0x1f1f8f,_0xcf1dbe=this[_0x46d90c(0x22c)](_0x435ac9,_0x510b5b);if(!_0xcf1dbe)return 0x1;_0x510b5b['verbose']&&console[_0x46d90c(0x1a6)]('Project:\x20'+_0xcf1dbe);const _0x325acc=await withSpinner(_0x46d90c(0x28b),()=>_0x389515[_0x46d90c(0x1ef)][_0x46d90c(0x1ac)](_0xcf1dbe),{'verbose':_0x510b5b[_0x46d90c(0x156)]}),{secrets:_0x11e1b6}=_0x325acc[_0x46d90c(0x297)];return console[_0x46d90c(0x1a6)](_0x46d90c(0x29a)+_0x11e1b6[_0x46d90c(0x1d5)]+'\x20secret'+(_0x11e1b6['length']!==0x1?'s':'')),await handleSDKOutput(_0x11e1b6,_0x510b5b),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x208);['description']=a54_0x1978f8(0x2d4);async[a54_0x1978f8(0x1bd)](_0x3ec3e4){const _0x5c93a9=a54_0x1978f8,{options:_0x5e3a24,args:_0x2b381d,tdx:_0x417392}=_0x3ec3e4;let _0x3c7945,_0x4d2c54;if(_0x2b381d[_0x5c93a9(0x1d5)]>=0x1&&!_0x2b381d[0x0]['includes']('='))_0x3c7945=_0x2b381d[0x0],_0x4d2c54=_0x2b381d['slice'](0x1);else{if(_0x2b381d[_0x5c93a9(0x1d5)]>=0x1&&_0x5e3a24[_0x5c93a9(0x28a)])_0x3c7945=_0x5e3a24[_0x5c93a9(0x28a)],_0x4d2c54=_0x2b381d;else return _0x2b381d[_0x5c93a9(0x1d5)]>=0x1?(console[_0x5c93a9(0x1a6)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x5c93a9(0x1a6)](_0x5c93a9(0x166)),0x1):(console['error'](_0x5c93a9(0x1db)),console[_0x5c93a9(0x1a6)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x4d2c54[_0x5c93a9(0x1d5)]===0x0)return console[_0x5c93a9(0x1a6)](_0x5c93a9(0x1db)),console['error'](_0x5c93a9(0x175)),0x1;const _0x7299df={};try{for(const _0x481db7 of _0x4d2c54){const {key:_0x3d601d,value:_0xb7f7a4}=parseKeyValue(_0x481db7);_0x7299df[_0x3d601d]=_0xb7f7a4;}}catch(_0x28ff2e){return _0x28ff2e instanceof Error&&console['error'](a54_0x4dcb08['red'](_0x5c93a9(0x2a4)),_0x28ff2e[_0x5c93a9(0x242)]),0x1;}const _0x4835f3=Object['keys'](_0x7299df);_0x5e3a24[_0x5c93a9(0x156)]&&(console[_0x5c93a9(0x1a6)](_0x5c93a9(0x2b1)+_0x3c7945),console[_0x5c93a9(0x1a6)](_0x5c93a9(0x162)+_0x4835f3[_0x5c93a9(0x302)](',\x20')));const _0x1f1164=await withSpinner(_0x4835f3[_0x5c93a9(0x1d5)]===0x1?_0x5c93a9(0x2c9):_0x5c93a9(0x2d7)+_0x4835f3[_0x5c93a9(0x1d5)]+'\x20secrets...',()=>_0x417392[_0x5c93a9(0x1ef)][_0x5c93a9(0x275)](_0x3c7945,_0x7299df),{'verbose':_0x5e3a24['verbose']}),_0x24cf13=_0x1f1164[_0x5c93a9(0x297)];return console[_0x5c93a9(0x1a6)](_0x4835f3[_0x5c93a9(0x1d5)]===0x1?_0x5c93a9(0x2cf)+_0x24cf13[_0x5c93a9(0x189)][0x0]+_0x5c93a9(0x2da)+_0x24cf13[_0x5c93a9(0x306)]+'\x27':'✔\x20'+_0x24cf13[_0x5c93a9(0x189)][_0x5c93a9(0x1d5)]+_0x5c93a9(0x2a8)+_0x24cf13[_0x5c93a9(0x306)]+'\x27'),(_0x5e3a24['json']||_0x5e3a24[_0x5c93a9(0x1c6)])&&await handleSingleObjectOutput(_0x24cf13,_0x5e3a24),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a54_0x1978f8(0x295);[a54_0x1978f8(0x19b)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a54_0x1978f8(0x1bd)](_0x26f5aa){const _0x59518e=a54_0x1978f8,{options:_0x546133,args:_0x31f647,tdx:_0x3b0ce3}=_0x26f5aa;let _0x52836a,_0x58f92e;if(_0x31f647[_0x59518e(0x1d5)]>=0x2)_0x52836a=_0x31f647[0x0],_0x58f92e=_0x31f647[0x1];else{if(_0x31f647[_0x59518e(0x1d5)]===0x1&&_0x546133[_0x59518e(0x28a)])_0x52836a=_0x546133['workflowProject'],_0x58f92e=_0x31f647[0x0];else return _0x31f647[_0x59518e(0x1d5)]===0x1?(console[_0x59518e(0x1a6)](_0x59518e(0x209)),console[_0x59518e(0x1a6)](_0x59518e(0x166)),0x1):(console[_0x59518e(0x1a6)](_0x59518e(0x289)),console[_0x59518e(0x1a6)](_0x59518e(0x30b)),0x1);}_0x546133[_0x59518e(0x156)]&&(console[_0x59518e(0x1a6)](_0x59518e(0x2b1)+_0x52836a),console[_0x59518e(0x1a6)](_0x59518e(0x1b0)+_0x58f92e));if(!_0x546133[_0x59518e(0x188)]){if(!isInteractive())return console[_0x59518e(0x1a6)](a54_0x4dcb08[_0x59518e(0x236)](_0x59518e(0x2ba)),_0x59518e(0x168)),console['error'](a54_0x4dcb08['dim'](_0x59518e(0x203))),0x1;const _0x1f766e=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x58f92e+_0x59518e(0x2a7)+_0x52836a+'\x27?');if(!_0x1f766e)return console[_0x59518e(0x1a6)](a54_0x4dcb08[_0x59518e(0x1ff)]('Cancelled')),0x1;}const _0xdfebdb=await withSpinner(_0x59518e(0x261),()=>_0x3b0ce3[_0x59518e(0x1ef)][_0x59518e(0x18a)](_0x52836a,_0x58f92e),{'verbose':_0x546133[_0x59518e(0x156)]}),_0x3fb64f=_0xdfebdb[_0x59518e(0x297)];return console[_0x59518e(0x1a6)]('✔\x20Secret\x20\x27'+_0x3fb64f[_0x59518e(0x152)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x3fb64f[_0x59518e(0x306)]+'\x27'),(_0x546133['json']||_0x546133[_0x59518e(0x1c6)])&&await handleSingleObjectOutput(_0x3fb64f,_0x546133),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(_0x442488){const _0x1bee9a=a54_0x1978f8,_0x36db98=Math[_0x1bee9a(0x18c)](_0x442488/0x3e8),_0x2c00c5=Math['floor'](_0x36db98/0x3c),_0x543aa9=Math[_0x1bee9a(0x18c)](_0x2c00c5/0x3c),_0x4b80c8=Math[_0x1bee9a(0x18c)](_0x543aa9/0x18);if(_0x4b80c8>0x0){const _0x900605=_0x543aa9%0x18;return _0x900605>0x0?_0x4b80c8+'d\x20'+_0x900605+'h':_0x4b80c8+'d';}else{if(_0x543aa9>0x0){const _0xa4f501=_0x2c00c5%0x3c;return _0xa4f501>0x0?_0x543aa9+'h\x20'+_0xa4f501+'m':_0x543aa9+'h';}else{if(_0x2c00c5>0x0){const _0x4bb846=_0x36db98%0x3c;return _0x4bb846>0x0?_0x2c00c5+'m\x20'+_0x4bb846+'s':_0x2c00c5+'m';}else return _0x36db98+'s';}}}function formatTimestamp(_0x3a2552,_0x3c9bd1){const _0x12d58b=a54_0x1978f8,_0x49d853=new Date(_0x3a2552),_0x3eaf91=String(_0x49d853['getHours']())['padStart'](0x2,'0'),_0x34619c=String(_0x49d853[_0x12d58b(0x287)]())[_0x12d58b(0x266)](0x2,'0'),_0x418a37=_0x3eaf91+':'+_0x34619c,_0x51b320=_0x49d853[_0x12d58b(0x2d9)]()===_0x3c9bd1['getFullYear']()&&_0x49d853[_0x12d58b(0x2a6)]()===_0x3c9bd1[_0x12d58b(0x2a6)]()&&_0x49d853[_0x12d58b(0x206)]()===_0x3c9bd1['getDate']();if(_0x51b320)return _0x418a37;else{const _0x27470a=String(_0x49d853[_0x12d58b(0x2a6)]()+0x1)[_0x12d58b(0x266)](0x2,'0'),_0x2457b9=String(_0x49d853[_0x12d58b(0x206)]())[_0x12d58b(0x266)](0x2,'0');return _0x27470a+'-'+_0x2457b9+'\x20'+_0x418a37;}}function formatDate(_0x3a0a85){const _0x13155=a54_0x1978f8,_0x20ce47=_0x3a0a85[_0x13155(0x2d9)](),_0x4d4bbd=String(_0x3a0a85[_0x13155(0x2a6)]()+0x1)['padStart'](0x2,'0'),_0x5955a0=String(_0x3a0a85[_0x13155(0x206)]())[_0x13155(0x266)](0x2,'0');return _0x20ce47+'-'+_0x4d4bbd+'-'+_0x5955a0;}function getTaskStateIcon(_0x297891){const _0x3269d9={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x3269d9[_0x297891]||'⚪';}function getBarChar(_0x3e73c8){const _0x16971a=a54_0x1978f8;return _0x3e73c8===_0x16971a(0x1a6)||_0x3e73c8===_0x16971a(0x2bc)?'×':'─';}function getBarColor(_0x45cc4e){const _0x4533e2=a54_0x1978f8,_0x339e48={'success':a54_0x4dcb08[_0x4533e2(0x2ac)],'error':a54_0x4dcb08[_0x4533e2(0x236)],'group_error':a54_0x4dcb08[_0x4533e2(0x236)],'running':a54_0x4dcb08[_0x4533e2(0x15f)],'blocked':a54_0x4dcb08['yellow'],'planned':a54_0x4dcb08[_0x4533e2(0x24d)],'canceling':a54_0x4dcb08['yellow']};return _0x339e48[_0x45cc4e]||a54_0x4dcb08[_0x4533e2(0x1f2)];}function parseTaskName(_0x587895){const _0x31e605=a54_0x1978f8;let _0x23defa=_0x587895[_0x31e605(0x28e)](/^\++/,'');const _0x1fefed=_0x23defa[_0x31e605(0x313)]('+'),_0xcab4d1=_0x1fefed[_0x31e605(0x1d5)]>0x1?_0x1fefed[_0x31e605(0x1d5)]-0x2:0x0,_0x28470f=_0x1fefed[_0x1fefed[_0x31e605(0x1d5)]-0x1]||_0x23defa;return{'level':_0xcab4d1,'name':'+'+_0x28470f};}function truncateTaskName(_0x3a9b63,_0x2916f0){const _0x5a5cbc=a54_0x1978f8,_0x24073d=stringWidth(_0x3a9b63);if(_0x24073d<=_0x2916f0)return _0x3a9b63;let _0x57f279=_0x3a9b63;while(stringWidth(_0x57f279+'…')>_0x2916f0&&_0x57f279[_0x5a5cbc(0x1d5)]>0x0){_0x57f279=_0x57f279[_0x5a5cbc(0x23a)](0x0,-0x1);}return _0x57f279+'…';}function calculateTimeScale(_0x33aad6,_0x361559){const _0x3bbb6e=a54_0x1978f8;return{'startTime':_0x33aad6[_0x3bbb6e(0x23f)],'endTime':_0x33aad6['end'],'durationMs':_0x33aad6['duration'],'msPerChar':_0x33aad6[_0x3bbb6e(0x1d8)]/_0x361559};}function timeToPosition(_0x5f1c9c,_0x2f361f,_0xc4fa67){const _0x2cccf5=a54_0x1978f8,_0x15c760=_0x5f1c9c-_0x2f361f[_0x2cccf5(0x190)],_0x50c380=Math[_0x2cccf5(0x18c)](_0x15c760/_0x2f361f[_0x2cccf5(0x2ff)]);return Math['max'](0x0,Math[_0x2cccf5(0x264)](_0x50c380,_0xc4fa67));}function renderTimeAxis(_0x520a45,_0xd58fde){const _0x11d4bb=a54_0x1978f8,_0x158bb8=Math[_0x11d4bb(0x264)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x11d4bb(0x29c)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x11d4bb(0x18c)](_0xd58fde/TIMELINE_CONFIG[_0x11d4bb(0x1b3)]))),_0x47b1e4=_0x520a45[_0x11d4bb(0x1da)]/(_0x158bb8-0x1),_0x2fe096=new Date(_0x520a45[_0x11d4bb(0x190)]),_0x5b4c33=[];for(let _0x599616=0x0;_0x599616<_0x158bb8;_0x599616++){const _0x4a52aa=_0x520a45[_0x11d4bb(0x190)]+_0x599616*_0x47b1e4,_0x2876e1=timeToPosition(_0x4a52aa,_0x520a45,_0xd58fde),_0x23b7c8=formatTimestamp(_0x4a52aa,_0x2fe096);_0x5b4c33[_0x11d4bb(0x198)]({'pos':_0x2876e1,'text':_0x23b7c8});}const _0x47d3e1=new Array(_0xd58fde)[_0x11d4bb(0x226)]('\x20');let _0xf82215=-0x1;for(const {pos:_0x4f4eaa,text:_0x3ca562}of _0x5b4c33){let _0x34b250=Math[_0x11d4bb(0x29c)](0x0,_0x4f4eaa-Math['floor'](_0x3ca562[_0x11d4bb(0x1d5)]/0x2));_0x34b250<=_0xf82215+TIMELINE_CONFIG[_0x11d4bb(0x154)]&&(_0x34b250=_0xf82215+TIMELINE_CONFIG[_0x11d4bb(0x154)]+0x1);_0x34b250+_0x3ca562['length']>_0xd58fde&&(_0x34b250=_0xd58fde-_0x3ca562['length']);if(_0x34b250>=0x0&&_0x34b250+_0x3ca562[_0x11d4bb(0x1d5)]<=_0xd58fde&&_0x34b250>_0xf82215){for(let _0x186999=0x0;_0x186999<_0x3ca562[_0x11d4bb(0x1d5)];_0x186999++){_0x47d3e1[_0x34b250+_0x186999]=_0x3ca562[_0x186999];}_0xf82215=_0x34b250+_0x3ca562[_0x11d4bb(0x1d5)]-0x1;}}return _0x47d3e1['join']('');}function renderTaskRow(_0xfa5f5b,_0x4a8bc8,_0x1d0443,_0x7c6ba9){const _0x4724ec=a54_0x1978f8,{level:_0x1c2de7,name:_0x458b30}=parseTaskName(_0xfa5f5b['name']),_0x1907b6='\x20'[_0x4724ec(0x28f)](_0x1c2de7),_0x26b359=_0xfa5f5b['window']?'('+formatElapsed(_0xfa5f5b[_0x4724ec(0x179)][_0x4724ec(0x1d8)])+')':'',_0x236ed7=stringWidth(_0x26b359),_0x167b86=_0x1c2de7*0x1,_0x149f8b=_0x7c6ba9-_0x167b86-_0x236ed7-0x1,_0x1ec009=truncateTaskName(_0x458b30,_0x149f8b),_0x3e6444=_0x1907b6+_0x1ec009,_0x50dad0=stringWidth(_0x3e6444),_0x5c970e=_0x7c6ba9-_0x50dad0-_0x236ed7,_0x40eb00=_0x3e6444+'\x20'['repeat'](Math[_0x4724ec(0x29c)](0x1,_0x5c970e))+a54_0x4dcb08['dim'](_0x26b359),_0x194945=getTaskStateIcon(_0xfa5f5b[_0x4724ec(0x2cb)]),_0x47457a=new Array(_0x1d0443)[_0x4724ec(0x226)]('\x20');if(_0xfa5f5b[_0x4724ec(0x179)]){const _0x2cbd10=timeToPosition(_0xfa5f5b[_0x4724ec(0x179)][_0x4724ec(0x23f)],_0x4a8bc8,_0x1d0443),_0x53c539=timeToPosition(_0xfa5f5b[_0x4724ec(0x179)][_0x4724ec(0x28c)],_0x4a8bc8,_0x1d0443),_0x5c9571=getBarChar(_0xfa5f5b[_0x4724ec(0x2cb)]),_0x44c658=Math[_0x4724ec(0x29c)](_0x2cbd10+0x1,_0x53c539);for(let _0x1399ac=_0x2cbd10;_0x1399ac<Math[_0x4724ec(0x264)](_0x44c658,_0x1d0443);_0x1399ac++){_0x47457a[_0x1399ac]=_0x5c9571;}}const _0x217021=getBarColor(_0xfa5f5b[_0x4724ec(0x2cb)]),_0x3db565=_0x47457a[_0x4724ec(0x1f0)](_0xfeeff5=>_0xfeeff5==='\x20'?'\x20':_0x217021(_0xfeeff5))[_0x4724ec(0x302)]('');return _0x194945+'\x20'+_0x40eb00+'│'+_0x3db565+'│';}function calculateStats(_0x4704f3){const _0x468fa9=a54_0x1978f8,_0x5dbdc5={'total':_0x4704f3['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x4d02f4 of _0x4704f3){if(_0x4d02f4[_0x468fa9(0x2cb)]===_0x468fa9(0x1e7))_0x5dbdc5[_0x468fa9(0x1e7)]++;else{if(_0x4d02f4['state']===_0x468fa9(0x1a6)||_0x4d02f4[_0x468fa9(0x2cb)]===_0x468fa9(0x2bc))_0x5dbdc5[_0x468fa9(0x1a6)]++;else _0x4d02f4[_0x468fa9(0x2cb)]===_0x468fa9(0x20a)?_0x5dbdc5[_0x468fa9(0x20a)]++:_0x5dbdc5[_0x468fa9(0x1fb)]++;}}return _0x5dbdc5;}function a54_0x4909(){const _0x14e38e=['Pulling\x20project\x20','yellow','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','\x20modified','Cancelled','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','select','workflow:retry','getDate','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','workflow:secrets:set','Error:\x20Project\x20name\x20is\x20required','running','Listing\x20workflows...','No\x20workflow\x20tdx.json\x20found','size','nextRunTime','utf-8','\x20\x20Changes:\x20','applyPullProject','match','projectId','limit','targetExists','now','attemptId','\x20(use\x20--limit\x20to\x20show\x20more)','✔\x20Clone\x20complete','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','retrySession','tdx\x20wf\x20attempt\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Params:\x20','\x0aPolling...\x20(','📁\x20','Error:\x20Attempt\x20ID\x20is\x20required','Analyzing\x20changes...','workflow:workflows','No\x20matching\x20sessions\x20found','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','fill','revision:\x20','\x20tasks','/sessions/','\x20unchanged','trimEnd','requireProject','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:pull','No\x20workflows\x20found','renderSingleTimeline','fileSize','/attempt/','No\x20projects\x20match\x20pattern:\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','red','pollTimeline','\x20new','renderSessionsTimeline','slice','showWorkflowConsoleUrl','skipValidation','sort','Downloading\x20project\x20','start','workflow:delete','attempts','message','includes','Source\x20directory\x20is\x20required','sessionId','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','tdx.json','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project\x20name\x20is\x20required','newProjectName','\x20(system)','sourceProjectName','dim','attempt:','set','Retrying\x20session...','Schedule\x20ID\x20is\x20required','\x20\x20Console:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','tasks','Session\x20','list','session_id','\x0aDry\x20run\x20-\x20no\x20files\x20written','done','No\x20workflow\x20projects\x20found','Revision:\x20','6039675ubXUhL','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','substring','executeCloneProject','New\x20project\x20name:\x20','Deleting\x20secret...','\x20\x20Project:\x20','\x20\x20Attempt\x20ID:\x20','min','-\x20no\x20files\x20written','padStart','toISOString','\x20\x20Next\x20run:\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','MAX_TASKS_DISPLAY','Source:\x20','retryAttemptName','✔\x20Schedule\x20#','force','---\x20','projects','Using\x20attempt\x20','stdout','name','💡\x20Tip:\x20Use\x20','setSecrets','updatedAt','sys','\x22\x20already\x20exists\x20(ID:\x20','param','No\x20sessions\x20with\x20timing\x20information','\x1b[1A\x1b[2K','isNewProject','disableSchedule','resolveProject','summary','workflow:sessions','fromTask','workflowName','workflow:logs','Failed\x20to\x20fetch\x20attempt\x20data','navigateSessionsInteractive','pullProject','getMinutes','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Error:\x20Secret\x20key\x20is\x20required','workflowProject','Listing\x20secrets...','end','Latest\x20session\x20has\x20no\x20attempt','replace','repeat','1133778BhVuSN','List\x20workflow\x20attempts','filesExtracted','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','sourceDir','workflow:secrets:delete','✔\x20Push\x20complete','data','📅\x20#','\x0a✔\x20Attempt\x20complete','✔\x20Found\x20','parse','max','Select\x20a\x20task\x20to\x20view\x20logs:','3oOvSEI','ICON_WIDTH','Filter:\x20','\x20\x20Source:\x20','✔\x20Retry\x20started','find','Error:','text','getMonth','\x27\x20from\x20project\x20\x27','\x20secrets\x20set\x20for\x20project\x20\x27','renderTimeline','workflows','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','green','toLocaleString','workflow:secrets:list','\x20enabled\x20(','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Project:\x20','resolve','Fetching\x20log\x20files...','Project\x20directory:\x20','\x22\x20with\x20new\x20revision?','attempt','\x20\x20Location:\x20','modified','hasChanges','\x0aError:','Project\x20name:\x20','group_error','status','✔\x20Project:\x20','kill','columns','cwd','buildTimelineData','toLowerCase','✔\x20Pushed\x20','unknown','Dry\x20run:\x20yes','createdAt','task','Setting\x20secret...','workflow:upload','state','new','Start\x20a\x20workflow\x20run','relative','✔\x20Secret\x20\x27','total','Including\x20subtasks:\x20yes','Task\x20name:\x20','canceling','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','startedAt','isTTY','Setting\x20','(use\x20--limit\x20to\x20see\x20more)','getFullYear','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','→\x20Project:\x20','Retry\x20a\x20session\x20or\x20attempt','✔\x20Downloaded\x20','Resolving\x20project\x20\x27','clear','value','Target\x20directory:\x20','some','site','planned','\x20logs','lastAttempt','Listing\x20workflow\x20attempts...','log','MAX_TIMELINE_WIDTH','\x20\x20New\x20attempt\x20ID:\x20','\x20next:\x20','type','session','\x20\x20Revision:\x20','newProjectId','Source\x20directory:\x20','logs','✔\x20Showing\x20','Status:\x20','✔\x20Pull\x20complete','Workflow:\x20','startsWith','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','workflow:attempt','Usage:\x20workflow:delete\x20<project-name-or-id>','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Source\x20project:\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','delete','msPerChar','ICON_SPACING','project','join','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','No\x20workflow\x20sessions\x20found','Starting\x20workflow\x20run...','projectName','getTime','Validation:\x20skipped','🔄\x20','1490240YREyyf','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x0a⚠\x20Project\x20\x22','TASK_NAME_WIDTH','\x20task','cyan','workflow:download','/app/workflows/','No\x20sessions\x20found\x20for:\x20','split','resumeFrom','executePushProject','\x20\x20Project\x20ID:\x20','key','Updating\x20','LABEL_MIN_SPACING','Enabling\x20schedule\x20#','verbose','Tip:\x20cd\x20to\x20workflows/','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','257234cwtNvg','✔\x20Workflow\x20run\x20started','Loading\x20sessions...','No\x20attempts\x20found','\x0aUpdate\x20existing\x20project\x20\x22','Pushing\x20project...','blue','\x0aPush\x20these\x20changes?','\x20deleted','Secrets\x20to\x20set:\x20','\x20\x20tdx\x20wf\x20use\x20<project>','targetDir','localeCompare','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','diff','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','json','download','follow','session:','title','Killing\x20attempt...','Auto-selected\x20latest\x20session:\x20','Pushing\x20workflow\x20project...','workflow:timeline','sessions','\x20session','Listing\x20schedules...','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','7532uiZCAg','splice','✔\x20Workflow\x20project\x20context\x20cleared.','window','Include\x20retried:\x20yes','\x22\x20to\x20new\x20project\x20\x22','\x27...','autocomplete','deleted','workflow:run','workflow:clone','rows','from','stat','round','\x20sessions\x20','930951HsFgni','⚠\x20Showing\x20first\x20','yes','keys','deleteSecret','index','floor','get','Warning:','Output\x20directory:\x20','startTime','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','5799328DCvBiJ','Loading\x20session...','isDirectory','\x0aApply\x20these\x20changes?','✔\x20Project\x20updated','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','push','...','Show\x20logs\x20for\x20a\x20workflow\x20attempt','description','Kill\x20a\x20running\x20attempt','\x20\x20Workflow:\x20','(unknown)','\x0a✔\x20No\x20changes\x20to\x20push','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Writing\x20files...','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','\x20\x20Session\x20context\x20set\x20to:\x20','Deleting\x20project\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','error','85dijeHr','format','workflow:push','Total:\x20','icon','listSecrets','\x20schedule','displayLine','revision','Key:\x20','cancelRequested','dryRun','LABEL_WIDTH_DIVISOR','No\x20workflows\x20found\x20in\x20project:\x20','\x20(disabled)','Reason:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','output','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','all','Pull\x20workflow\x20project\x20to\x20local\x20folder','params','execute','Session\x20not\x20found:\x20','\x20has\x20no\x20attempts','Resume\x20from:\x20','From\x20task:\x20','workflow:tasks','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','parseProjectWorkflowPattern','jsonl','isArray','No\x20sessions\x20found\x20in\x20project:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Retrying\x20attempt...','readFile','indexOf','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','No\x20sessions\x20found','unchanged','Attempt\x20ID:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','context','table','Show\x20specific\x20attempt\x20details','length',',\x20Workflow:\x20','workflow:projects','duration','No\x20attempts\x20found\x20in\x20project:\x20','durationMs','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','List\x20all\x20workflow\x20projects','finishedAt','fullName','Enable\x20a\x20workflow\x20schedule','sessionTime','workflow:schedule:enable','📋\x20','workflow:attempts','fileCount','Key\x20cannot\x20be\x20empty','success','Target:\x20','\x20workflow','\x20-\x20','Select\x20a\x20workflow\x20to\x20run','resolveProjectId','filter','POLL_INTERVAL_MS','workflow','map','write','white','Filter:\x20project=','\x0aClone\x20\x22','MIN_TIMELINE_WIDTH','has','\x20is\x20not\x20a\x20directory','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','fs/promises','\x20\x20Files\x20extracted:\x20','pending','generateSessionTimelineRows','Loading\x20workflows...'];a54_0x4909=function(){return _0x14e38e;};return a54_0x4909();}function formatStats(_0x15779d){const _0x5e8c96=a54_0x1978f8;return[_0x5e8c96(0x1aa)+_0x15779d[_0x5e8c96(0x2d0)],'✅\x20'+_0x15779d[_0x5e8c96(0x1e7)],'❌\x20'+_0x15779d[_0x5e8c96(0x1a6)],_0x5e8c96(0x309)+_0x15779d[_0x5e8c96(0x20a)],'⏳\x20'+_0x15779d[_0x5e8c96(0x1fb)]][_0x5e8c96(0x302)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x171);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x21a);async[a54_0x1978f8(0x1bd)](_0x19c3a1){const _0xaf37b6=a54_0x1978f8,{options:_0x2ed5cd,args:_0x129a79,tdx:_0x31bb27}=_0x19c3a1;let _0x44704a,_0x4665f8,_0x10684e=![];if(_0x129a79[0x0]){if(_0x129a79[0x0]['includes']('.')){const _0x20cd4a=this[_0xaf37b6(0x1c5)](_0x129a79,_0x2ed5cd);if(!_0x20cd4a)return 0x1;_0x44704a=_0x20cd4a['projectName'],_0x4665f8=_0x20cd4a['workflowName'];}else{_0x4665f8=_0x129a79[0x0],_0x44704a=_0x2ed5cd[_0xaf37b6(0x28a)];if(!_0x44704a)return console[_0xaf37b6(0x1a6)](a54_0x4dcb08[_0xaf37b6(0x236)](_0xaf37b6(0x2a4)),_0xaf37b6(0x1cd)),0x1;_0x10684e=!![];}}else{const _0x366844=this['parseProjectWorkflowPattern'](_0x129a79,_0x2ed5cd);if(!_0x366844)return 0x1;_0x44704a=_0x366844[_0xaf37b6(0x306)],_0x4665f8=_0x366844[_0xaf37b6(0x282)];}if(_0x2ed5cd[_0xaf37b6(0x156)]){if(_0x44704a&&_0x4665f8)console[_0xaf37b6(0x1a6)](_0xaf37b6(0x2a0)+_0x44704a+'.'+_0x4665f8);else _0x44704a&&console[_0xaf37b6(0x1a6)](_0xaf37b6(0x1f3)+_0x44704a);}const _0x21feac=_0x2ed5cd[_0xaf37b6(0x217)],_0x2c9f9b=_0x2ed5cd[_0xaf37b6(0x245)];if(_0x21feac){_0x2c9f9b&&console['error'](a54_0x4dcb08[_0xaf37b6(0x1ff)](_0xaf37b6(0x18e)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0xd04d6e=_0x2ed5cd[_0xaf37b6(0x16b)];return _0xd04d6e?await this[_0xaf37b6(0x237)](_0x19c3a1,_0x21feac):await this['renderSingleTimeline'](_0x19c3a1,_0x21feac,_0x2ed5cd),0x0;}if(_0x2c9f9b){const _0x2671d8=await withSpinner(_0xaf37b6(0x193),()=>_0x31bb27[_0xaf37b6(0x1ef)]['sessions']({'projectName':_0x44704a,'workflowName':_0x4665f8,'limit':0x64}),{'verbose':_0x2ed5cd[_0xaf37b6(0x156)]}),_0x5f03c0=_0x2671d8[_0xaf37b6(0x297)][_0xaf37b6(0x2a3)](_0x2dfb8f=>_0x2dfb8f['id']===_0x2c9f9b);if(!_0x5f03c0)return console[_0xaf37b6(0x1a6)](a54_0x4dcb08[_0xaf37b6(0x236)]('Error:'),_0xaf37b6(0x1be)+_0x2c9f9b),0x1;if(!_0x5f03c0[_0xaf37b6(0x2e6)]?.['id'])return console[_0xaf37b6(0x1a6)](a54_0x4dcb08['red'](_0xaf37b6(0x2a4)),_0xaf37b6(0x255)+_0x2c9f9b+_0xaf37b6(0x1bf)),0x1;const _0x58fcc0=_0x5f03c0[_0xaf37b6(0x2e6)]['id'];_0x2ed5cd[_0xaf37b6(0x156)]&&console['error'](_0xaf37b6(0x271)+_0x58fcc0+'\x20from\x20session\x20'+_0x2c9f9b);const _0x46d791=_0x2ed5cd['follow'];return _0x46d791?await this[_0xaf37b6(0x237)](_0x19c3a1,_0x58fcc0):await this[_0xaf37b6(0x231)](_0x19c3a1,_0x58fcc0,_0x2ed5cd),0x0;}const _0x16d670=await withSpinner(_0xaf37b6(0x15b),()=>_0x31bb27[_0xaf37b6(0x1ef)][_0xaf37b6(0x172)]({'projectName':_0x44704a,'workflowName':_0x4665f8,'limit':_0x2ed5cd[_0xaf37b6(0x214)]||0x32}),{'verbose':_0x2ed5cd['verbose']}),_0x58bddc=_0x16d670['data'];if(_0x58bddc['length']===0x0){if(_0x44704a&&_0x4665f8)console['error'](_0xaf37b6(0x312)+_0x44704a+'.'+_0x4665f8);else _0x44704a?console[_0xaf37b6(0x1a6)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x44704a):(console['error'](_0xaf37b6(0x304)),console[_0xaf37b6(0x1a6)](a54_0x4dcb08['dim'](_0xaf37b6(0x1b7))));return 0x0;}_0x58bddc[_0xaf37b6(0x23d)]((_0x53b413,_0x2b95cf)=>{const _0x37f513=_0xaf37b6,_0x1326d9=_0x53b413[_0x37f513(0x1e1)]||'',_0x5ac8e8=_0x2b95cf[_0x37f513(0x1e1)]||'';return _0x5ac8e8['localeCompare'](_0x1326d9);});if(_0x2ed5cd[_0xaf37b6(0x169)]||_0x2ed5cd[_0xaf37b6(0x1c6)])return await handleSDKOutput(_0x58bddc,_0x2ed5cd),0x0;let _0x4fe7a9;if(_0x10684e){const _0x4d5833=_0x58bddc[0x0];if(!_0x4d5833[_0xaf37b6(0x2e6)]?.['id'])return console['error'](_0xaf37b6(0x28d)),0x0;_0x4fe7a9=_0x4d5833[_0xaf37b6(0x2e6)]['id'],_0x2ed5cd['verbose']&&console[_0xaf37b6(0x1a6)](_0xaf37b6(0x16f)+_0x4d5833[_0xaf37b6(0x1e1)]);}else{const _0x55a914=_0x58bddc[_0xaf37b6(0x1f0)](_0x441a85=>{const _0x2f7b0e=_0xaf37b6,_0x2c8153=getAttemptStatusDisplay(_0x441a85[_0x2f7b0e(0x2e6)]);return{'title':_0x441a85[_0x2f7b0e(0x301)]?.['name']+'.'+_0x441a85['workflow']?.[_0x2f7b0e(0x273)]+'\x20-\x20'+_0x441a85[_0x2f7b0e(0x1e1)]+'\x20'+_0x2c8153[_0x2f7b0e(0x1ab)],'value':_0x441a85['lastAttempt']?.['id']||'','description':_0x2c8153[_0x2f7b0e(0x2a5)]};}),_0x548545=await a54_0x51a435({'type':_0xaf37b6(0x204),'name':_0xaf37b6(0x217),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x55a914['filter'](_0x5db10b=>_0x5db10b[_0xaf37b6(0x2e0)]!=='')});if(!_0x548545[_0xaf37b6(0x217)])return 0x0;_0x4fe7a9=_0x548545[_0xaf37b6(0x217)];}const _0x55ec48=_0x2ed5cd[_0xaf37b6(0x16b)];return _0x55ec48?await this[_0xaf37b6(0x237)](_0x19c3a1,_0x4fe7a9):await this[_0xaf37b6(0x231)](_0x19c3a1,_0x4fe7a9,_0x2ed5cd),0x0;}async[a54_0x1978f8(0x231)](_0x333320,_0x4f33a1,_0x3280b4){const _0x5e4b9f=a54_0x1978f8,{tdx:_0x6eabc7}=_0x333320;let _0x2719b6,_0x17f4bd;try{[_0x2719b6,_0x17f4bd]=await Promise[_0x5e4b9f(0x1ba)]([_0x6eabc7[_0x5e4b9f(0x1ef)][_0x5e4b9f(0x2b6)](_0x4f33a1),_0x6eabc7[_0x5e4b9f(0x1ef)][_0x5e4b9f(0x254)](_0x4f33a1,![])]);}catch(_0x381b91){console[_0x5e4b9f(0x1a6)](a54_0x4dcb08['red'](_0x5e4b9f(0x284)));_0x3280b4[_0x5e4b9f(0x156)]&&console[_0x5e4b9f(0x1a6)](_0x381b91);throw _0x381b91;}if(_0x3280b4['json']||_0x3280b4[_0x5e4b9f(0x1c6)]){const _0x5ae120=this[_0x5e4b9f(0x2c2)](_0x2719b6,_0x17f4bd);await handleSDKOutput([_0x5ae120],_0x3280b4);return;}const _0x51acdf=_0x6eabc7['context'][_0x5e4b9f(0x2e3)],_0x2987bf=this[_0x5e4b9f(0x2a9)](_0x2719b6,_0x17f4bd,_0x51acdf);console[_0x5e4b9f(0x2e8)](_0x2987bf);}async[a54_0x1978f8(0x237)](_0x513f21,_0x43a969){const _0x317cd7=a54_0x1978f8,{tdx:_0x227d47}=_0x513f21,_0x59cc5b=TIMELINE_CONFIG[_0x317cd7(0x1ee)],_0x4b8fe8=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x380359=0x0;while(_0x380359<_0x4b8fe8){process['stdout']['isTTY']&&process[_0x317cd7(0x272)]['write']('\x1bc');let _0x1b3764,_0x2551d2;try{[_0x1b3764,_0x2551d2]=await Promise[_0x317cd7(0x1ba)]([_0x227d47[_0x317cd7(0x1ef)][_0x317cd7(0x2b6)](_0x43a969),_0x227d47[_0x317cd7(0x1ef)][_0x317cd7(0x254)](_0x43a969,![])]);}catch(_0x7161a1){console[_0x317cd7(0x1a6)](a54_0x4dcb08[_0x317cd7(0x236)](_0x317cd7(0x22d)));_0x380359>0x0&&console[_0x317cd7(0x1a6)](a54_0x4dcb08[_0x317cd7(0x24d)](_0x317cd7(0x293)+_0x380359));throw _0x7161a1;}const _0x359568=_0x227d47[_0x317cd7(0x1d2)][_0x317cd7(0x2e3)],_0x1dd26e=this[_0x317cd7(0x2a9)](_0x1b3764,_0x2551d2,_0x359568);console['log'](_0x1dd26e);const _0x10c698=_0x1b3764[_0x317cd7(0x259)]&&_0x2551d2['every'](_0x55ffd8=>_0x55ffd8[_0x317cd7(0x2cb)]!==_0x317cd7(0x20a)&&_0x55ffd8['state']!==_0x317cd7(0x2e4));if(_0x10c698){console['error'](a54_0x4dcb08[_0x317cd7(0x2ac)](_0x317cd7(0x299)));break;}console[_0x317cd7(0x1a6)](a54_0x4dcb08['dim'](_0x317cd7(0x21f)+_0x380359*0x2+_0x317cd7(0x200))),await new Promise(_0x259872=>setTimeout(_0x259872,_0x59cc5b)),_0x380359++;}_0x380359>=_0x4b8fe8&&console[_0x317cd7(0x1a6)](a54_0x4dcb08['yellow'](_0x317cd7(0x1c3)));}['renderTimeline'](_0x4919fe,_0x37c768,_0x502d83){const _0x1db4c8=a54_0x1978f8,_0x32dbf3=[],_0x296907=TIMELINE_CONFIG[_0x1db4c8(0x30d)],_0x5bbed9=0x5,_0x4bde2e=process[_0x1db4c8(0x272)][_0x1db4c8(0x2c0)]||0x78,_0x38f9d0=_0x4bde2e-_0x296907-_0x5bbed9,_0x45df5a=Math[_0x1db4c8(0x29c)](TIMELINE_CONFIG[_0x1db4c8(0x1f5)],Math[_0x1db4c8(0x264)](_0x38f9d0,TIMELINE_CONFIG[_0x1db4c8(0x2e9)])),_0x284b0f=new Date(_0x4919fe[_0x1db4c8(0x2c7)])[_0x1db4c8(0x307)](),_0x3c9ece=_0x4919fe[_0x1db4c8(0x1de)]?new Date(_0x4919fe[_0x1db4c8(0x1de)])['getTime']():Date[_0x1db4c8(0x216)](),_0x423109={'start':_0x284b0f,'end':_0x3c9ece,'duration':_0x3c9ece-_0x284b0f},_0x1c65dc=new Map(),_0x25f238=[];for(const _0x5a6830 of _0x37c768){if(_0x5a6830[_0x1db4c8(0x2d5)]){const _0x45932a=new Date(_0x5a6830['startedAt'])[_0x1db4c8(0x307)](),_0x45e2ed=_0x5a6830[_0x1db4c8(0x276)]?new Date(_0x5a6830[_0x1db4c8(0x276)])[_0x1db4c8(0x307)]():Date[_0x1db4c8(0x216)](),_0x462935={'start':_0x45932a,'end':_0x45e2ed,'duration':_0x45e2ed-_0x45932a};_0x1c65dc[_0x1db4c8(0x24f)](_0x5a6830['id'],_0x462935),_0x25f238[_0x1db4c8(0x198)]({'name':_0x5a6830[_0x1db4c8(0x1df)],'state':_0x5a6830['state']||_0x1db4c8(0x2c5),'window':_0x462935});}else _0x25f238[_0x1db4c8(0x198)]({'name':_0x5a6830['fullName'],'state':_0x5a6830[_0x1db4c8(0x2cb)]||'planned','window':undefined});}_0x25f238[_0x1db4c8(0x23d)]((_0x27eb19,_0x220c73)=>{const _0x29fa15=_0x1db4c8;if(!_0x27eb19[_0x29fa15(0x179)])return 0x1;if(!_0x220c73['window'])return-0x1;return _0x27eb19[_0x29fa15(0x179)][_0x29fa15(0x23f)]-_0x220c73['window']['start'];});const _0x2c83a9=_0x25f238['length'],_0x587ca4=_0x2c83a9>TIMELINE_CONFIG[_0x1db4c8(0x26a)];_0x587ca4&&_0x25f238[_0x1db4c8(0x177)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x2a924b=calculateTimeScale(_0x423109,_0x45df5a),_0x228380=_0x4919fe['done']?_0x4919fe[_0x1db4c8(0x1e7)]?a54_0x4dcb08[_0x1db4c8(0x2ac)](_0x1db4c8(0x1e7)):a54_0x4dcb08[_0x1db4c8(0x236)]('error'):a54_0x4dcb08[_0x1db4c8(0x15f)](_0x1db4c8(0x20a)),_0x580686=_0x4919fe['project']?.['id'],_0x11c940=_0x4919fe[_0x1db4c8(0x245)];let _0x557371;if(_0x580686&&_0x11c940){const _0x5b3449=getWorkflowAttemptUrl(_0x502d83,_0x580686,_0x11c940,_0x4919fe['id']);_0x557371=hyperlink(a54_0x4dcb08[_0x1db4c8(0x24d)](_0x4919fe['id']),_0x5b3449);}else _0x557371=a54_0x4dcb08[_0x1db4c8(0x24d)](_0x4919fe['id']);_0x32dbf3['push']('Attempt:\x20'+_0x557371+_0x1db4c8(0x1ea)+_0x228380+'\x20-\x20'+formatElapsed(_0x423109['duration']));if(_0x25f238[_0x1db4c8(0x1d5)]>0x0){const _0x37cc17=renderTimeAxis(_0x2a924b,_0x45df5a),_0x5a33d0=new Date(_0x423109[_0x1db4c8(0x23f)]),_0x4e8448=formatDate(_0x5a33d0),_0xcd174e=TIMELINE_CONFIG[_0x1db4c8(0x29f)]+TIMELINE_CONFIG[_0x1db4c8(0x300)]+_0x296907,_0x5e5a79=_0x4e8448['padStart'](_0xcd174e),_0x3e23c2=a54_0x4dcb08[_0x1db4c8(0x24d)](_0x5e5a79);_0x32dbf3[_0x1db4c8(0x198)](_0x3e23c2+'\x20'+_0x37cc17);for(const _0x516979 of _0x25f238){_0x32dbf3['push'](renderTaskRow(_0x516979,_0x2a924b,_0x45df5a,_0x296907));}const _0x28f1ba=calculateStats(_0x25f238);_0x32dbf3[_0x1db4c8(0x198)](formatStats(_0x28f1ba)),_0x587ca4&&_0x32dbf3['push'](a54_0x4dcb08[_0x1db4c8(0x1ff)](_0x1db4c8(0x187)+TIMELINE_CONFIG[_0x1db4c8(0x26a)]+'\x20of\x20'+_0x2c83a9+_0x1db4c8(0x228))),_0x32dbf3[_0x1db4c8(0x198)](''),_0x32dbf3[_0x1db4c8(0x198)](a54_0x4dcb08[_0x1db4c8(0x24d)](_0x1db4c8(0x274))+(_0x1db4c8(0x21c)+_0x4919fe['id']+_0x1db4c8(0x2e5))+a54_0x4dcb08['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x32dbf3[_0x1db4c8(0x198)](_0x1db4c8(0x2f8));return _0x32dbf3[_0x1db4c8(0x302)]('\x0a');}[a54_0x1978f8(0x2c2)](_0x1c8421,_0x353534){const _0x33f321=a54_0x1978f8,_0x33f2db=new Date(_0x1c8421['createdAt'])[_0x33f321(0x307)](),_0x4bd8b5=_0x1c8421[_0x33f321(0x1de)]?new Date(_0x1c8421[_0x33f321(0x1de)])['getTime']():Date['now'](),_0x2e5812=_0x4bd8b5-_0x33f2db,_0x5b1831=[];for(const _0x222def of _0x353534){if(_0x222def[_0x33f321(0x2d5)]){const _0x4a3aa7=new Date(_0x222def[_0x33f321(0x2d5)])['getTime'](),_0x2130ed=_0x222def[_0x33f321(0x276)]?new Date(_0x222def[_0x33f321(0x276)])['getTime']():Date[_0x33f321(0x216)]();_0x5b1831[_0x33f321(0x198)]({'name':_0x222def[_0x33f321(0x1df)],'state':_0x222def['state']||_0x33f321(0x2c5),'window':{'start':_0x4a3aa7,'end':_0x2130ed,'duration':_0x2130ed-_0x4a3aa7}});}else _0x5b1831[_0x33f321(0x198)]({'name':_0x222def[_0x33f321(0x1df)],'state':_0x222def[_0x33f321(0x2cb)]||_0x33f321(0x2e4),'window':undefined});}const _0x3484e3=calculateStats(_0x5b1831);return{'attempt':{'id':_0x1c8421['id'],'status':_0x1c8421[_0x33f321(0x259)]?_0x1c8421[_0x33f321(0x1e7)]?_0x33f321(0x1e7):_0x33f321(0x1a6):_0x33f321(0x20a),'createdAt':_0x1c8421['createdAt'],'finishedAt':_0x1c8421[_0x33f321(0x1de)],'duration_ms':_0x2e5812},'tasks':_0x5b1831['map'](_0x5ae4a2=>({'name':_0x5ae4a2[_0x33f321(0x273)],'state':_0x5ae4a2[_0x33f321(0x2cb)],'startedAt':_0x5ae4a2['window']?new Date(_0x5ae4a2['window'][_0x33f321(0x23f)])[_0x33f321(0x267)]():null,'updatedAt':_0x5ae4a2['window']?new Date(_0x5ae4a2['window']['end'])['toISOString']():null,'duration_ms':_0x5ae4a2[_0x33f321(0x179)]?.[_0x33f321(0x1d8)]||null})),'stats':_0x3484e3};}}export class WorkflowSchedulesCommand extends BaseCommand{[a54_0x1978f8(0x273)]='workflow:schedules';[a54_0x1978f8(0x19b)]='List\x20workflow\x20schedules';async['execute'](_0x472e74){const _0x26fec7=a54_0x1978f8,{options:_0xb97722,tdx:_0x169441}=_0x472e74,_0x222275=await withSpinner(_0x26fec7(0x174),()=>_0x169441['workflow']['listSchedules'](),{'verbose':_0xb97722['verbose']}),_0x3e7e09=_0x222275[_0x26fec7(0x297)];console['error']('✔\x20Found\x20'+_0x3e7e09['length']+_0x26fec7(0x1ad)+(_0x3e7e09[_0x26fec7(0x1d5)]!==0x1?'s':''));if(isStructuredFormat(_0xb97722))await handleSDKOutput(_0x3e7e09,_0xb97722);else{if(_0x3e7e09[_0x26fec7(0x1d5)]===0x0)console[_0x26fec7(0x2e8)]('No\x20schedules\x20found');else for(const _0x20453e of _0x3e7e09){const _0x382772=_0x20453e['disabledAt']?a54_0x4dcb08[_0x26fec7(0x1ff)](_0x26fec7(0x1b5)):'',_0x13a95f=_0x20453e['project']?.[_0x26fec7(0x273)]?a54_0x4dcb08[_0x26fec7(0x24d)]('\x20['+_0x20453e['project'][_0x26fec7(0x273)]+']'):'',_0xec6c21=_0x20453e[_0x26fec7(0x20e)]?a54_0x4dcb08[_0x26fec7(0x24d)](_0x26fec7(0x2eb)+new Date(_0x20453e[_0x26fec7(0x20e)])['toLocaleString']()):'';console['log'](_0x26fec7(0x298)+_0x20453e['id']+'\x20'+(_0x20453e[_0x26fec7(0x1ef)]?.[_0x26fec7(0x273)]||_0x26fec7(0x19e))+_0x13a95f+_0x382772+_0xec6c21);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a54_0x1978f8(0x273)]=a54_0x1978f8(0x1e2);[a54_0x1978f8(0x19b)]=a54_0x1978f8(0x1e0);async[a54_0x1978f8(0x1bd)](_0x193d29){const _0x2d0de7=a54_0x1978f8,{options:_0x27eef2,args:_0x27b1d4,tdx:_0x40675b}=_0x193d29,_0x4d5d8b=_0x27b1d4[0x0];if(!_0x4d5d8b)return console[_0x2d0de7(0x1a6)](a54_0x4dcb08[_0x2d0de7(0x236)]('Error:'),_0x2d0de7(0x251)),console['error'](a54_0x4dcb08[_0x2d0de7(0x24d)](_0x2d0de7(0x1a2))),console[_0x2d0de7(0x1a6)](a54_0x4dcb08[_0x2d0de7(0x24d)](_0x2d0de7(0x2fb))),0x1;const _0x4d317a=await withSpinner(_0x2d0de7(0x155)+_0x4d5d8b+_0x2d0de7(0x199),()=>_0x40675b[_0x2d0de7(0x1ef)]['enableSchedule'](_0x4d5d8b),{'verbose':_0x27eef2[_0x2d0de7(0x156)]}),_0x2c6c3d=_0x4d317a[_0x2d0de7(0x297)];return isStructuredFormat(_0x27eef2)?await handleSingleObjectOutput(_0x2c6c3d,_0x27eef2):(console[_0x2d0de7(0x2e8)](_0x2d0de7(0x26d)+_0x4d5d8b+_0x2d0de7(0x2af)+(_0x2c6c3d[_0x2d0de7(0x1ef)]?.['name']||_0x2d0de7(0x2c5))+')'),_0x2c6c3d[_0x2d0de7(0x20e)]&&console[_0x2d0de7(0x2e8)](a54_0x4dcb08[_0x2d0de7(0x24d)](_0x2d0de7(0x268)+new Date(_0x2c6c3d[_0x2d0de7(0x20e)])[_0x2d0de7(0x2ad)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a54_0x1978f8(0x273)]='workflow:schedule:disable';[a54_0x1978f8(0x19b)]='Disable\x20a\x20workflow\x20schedule';async['execute'](_0x45709c){const _0x4bf960=a54_0x1978f8,{options:_0x5aeb23,args:_0xacd921,tdx:_0x438106}=_0x45709c,_0x46882e=_0xacd921[0x0];if(!_0x46882e)return console[_0x4bf960(0x1a6)](a54_0x4dcb08['red'](_0x4bf960(0x2a4)),_0x4bf960(0x251)),console[_0x4bf960(0x1a6)](a54_0x4dcb08['dim']('Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>')),console[_0x4bf960(0x1a6)](a54_0x4dcb08[_0x4bf960(0x24d)](_0x4bf960(0x2fb))),0x1;const _0x24511a=await withSpinner('Disabling\x20schedule\x20#'+_0x46882e+_0x4bf960(0x199),()=>_0x438106[_0x4bf960(0x1ef)][_0x4bf960(0x27d)](_0x46882e),{'verbose':_0x5aeb23[_0x4bf960(0x156)]}),_0x381abd=_0x24511a[_0x4bf960(0x297)];return isStructuredFormat(_0x5aeb23)?await handleSingleObjectOutput(_0x381abd,_0x5aeb23):console[_0x4bf960(0x2e8)](_0x4bf960(0x26d)+_0x46882e+'\x20disabled\x20('+(_0x381abd['workflow']?.[_0x4bf960(0x273)]||'unknown')+')'),0x0;}}
1
+ const a54_0xb298fb=a54_0x2110;(function(_0x3b705e,_0x30084f){const _0x23a438=a54_0x2110,_0x3f61dd=_0x3b705e();while(!![]){try{const _0x2c57e9=-parseInt(_0x23a438(0x36f))/0x1+-parseInt(_0x23a438(0x210))/0x2+-parseInt(_0x23a438(0x25b))/0x3*(parseInt(_0x23a438(0x274))/0x4)+-parseInt(_0x23a438(0x26b))/0x5+parseInt(_0x23a438(0x2e1))/0x6*(-parseInt(_0x23a438(0x3aa))/0x7)+parseInt(_0x23a438(0x2a6))/0x8+parseInt(_0x23a438(0x345))/0x9;if(_0x2c57e9===_0x30084f)break;else _0x3f61dd['push'](_0x3f61dd['shift']());}catch(_0x4dc4a4){_0x3f61dd['push'](_0x3f61dd['shift']());}}}(a54_0x56b4,0x5d436));import a54_0x238b4f from'chalk';import{existsSync}from'fs';import a54_0x2f24e3 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,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 a54_0x206969 from'prompts';function getAttemptStatusDisplay(_0xbf0ebf){const _0x21317a=a54_0x2110;if(!_0xbf0ebf)return{'icon':'⏳','text':''};const {done:_0x2a4b5c,success:_0x149ca0,cancelRequested:_0x481ff1}=_0xbf0ebf;if(!_0x2a4b5c)return _0x481ff1?{'icon':'🛑','text':a54_0x238b4f[_0x21317a(0x344)](_0x21317a(0x203))}:{'icon':'🔄','text':a54_0x238b4f[_0x21317a(0x211)](_0x21317a(0x20a))};if(_0x149ca0)return{'icon':'✅','text':a54_0x238b4f['green'](_0x21317a(0x2d2))};return{'icon':'❌','text':a54_0x238b4f[_0x21317a(0x301)](_0x21317a(0x30d))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0xb298fb(0x2e6)](_0x3fd076,_0x20aad0,_0x372d8d=0x0){const _0x5c8792=a54_0xb298fb;return _0x3fd076[_0x372d8d]||_0x20aad0[_0x5c8792(0x216)];}['requireProject'](_0x450f58,_0x270991,_0x4911ff=0x0){const _0x13776d=a54_0xb298fb,_0x2e9718=this[_0x13776d(0x2e6)](_0x450f58,_0x270991,_0x4911ff);if(!_0x2e9718)return console['error'](a54_0x238b4f[_0x13776d(0x301)]('Error:'),_0x13776d(0x2ba)),console['error'](a54_0x238b4f[_0x13776d(0x373)](_0x13776d(0x2ab))),null;return _0x2e9718;}['parseProjectWorkflowPattern'](_0x2c7ef7,_0x1501f5){const _0x4aafca=a54_0xb298fb;if(_0x2c7ef7[0x0]){const _0x271ec0=_0x2c7ef7[0x0][_0x4aafca(0x2ee)]('.');if(_0x271ec0[_0x4aafca(0x33b)]===0x1)return{'projectName':_0x271ec0[0x0],'workflowName':undefined};else return _0x271ec0[_0x4aafca(0x33b)]===0x2?{'projectName':_0x271ec0[0x0],'workflowName':_0x271ec0[0x1]}:(console[_0x4aafca(0x30d)](a54_0x238b4f[_0x4aafca(0x301)]('Error:'),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x1501f5[_0x4aafca(0x216)],'workflowName':undefined};}[a54_0xb298fb(0x398)](_0x1c5ab2,_0x30288f,_0x40846f=0x0){const _0x4207ca=a54_0xb298fb;if(_0x1c5ab2[_0x40846f])return _0x1c5ab2[_0x40846f];if(_0x30288f[_0x4207ca(0x216)]){const _0x253dc2=a54_0x2f24e3[_0x4207ca(0x29a)](process[_0x4207ca(0x28a)](),_0x4207ca(0x267),_0x30288f[_0x4207ca(0x216)]);if(existsSync(a54_0x2f24e3['join'](_0x253dc2,'tdx.json')))return _0x253dc2;}return undefined;}async[a54_0xb298fb(0x317)](_0x365c11,_0x5c6b3a,_0xe4f703){const _0x51116f=a54_0xb298fb;try{const _0x3c4e38=await _0x365c11[_0x51116f(0x2e9)][_0x51116f(0x267)](_0x5c6b3a,{'limit':0x1});if(_0x3c4e38[_0x51116f(0x33b)]>0x0){const _0x37196c=_0x3c4e38[0x0]['id'],_0x17c7b8=getWorkflowUrl(_0xe4f703,_0x37196c);console['error']('\x20\x20Console:\x20'+a54_0x238b4f['cyan'](_0x17c7b8));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a54_0xb298fb(0x2ce);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x37e);async[a54_0xb298fb(0x335)](_0x350aa1){const _0x1c2f02=a54_0xb298fb,{options:_0x393380,args:_0x280988,tdx:_0xe8a385}=_0x350aa1,_0x104a47=_0x280988[0x0],_0x2d02c3=_0x393380['clear'];if(_0x2d02c3)return saveSessionContext({'workflow_project':undefined},_0x393380[_0x1c2f02(0x38b)]),console[_0x1c2f02(0x360)](a54_0x238b4f[_0x1c2f02(0x23e)](_0x1c2f02(0x283))),0x0;if(!_0x104a47)return console[_0x1c2f02(0x30d)](a54_0x238b4f['red'](_0x1c2f02(0x33f)),'Project\x20name\x20is\x20required'),console[_0x1c2f02(0x30d)](a54_0x238b4f[_0x1c2f02(0x373)](_0x1c2f02(0x263))),console[_0x1c2f02(0x30d)](a54_0x238b4f[_0x1c2f02(0x373)](_0x1c2f02(0x34e))),0x1;const _0x1c1a3c=await withSpinner(_0x1c2f02(0x294)+_0x104a47+'\x27...',()=>_0xe8a385[_0x1c2f02(0x2e9)][_0x1c2f02(0x1ea)](_0x104a47),{'verbose':_0x393380[_0x1c2f02(0x31d)]}),{name:_0x1b1b8b}=_0x1c1a3c['data'];return saveSessionContext({'workflow_project':_0x1b1b8b},_0x393380['session']),console['log'](a54_0x238b4f[_0x1c2f02(0x23e)](_0x1c2f02(0x1ed)+a54_0x238b4f['cyan'](_0x1b1b8b))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a54_0xb298fb(0x256);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x35c);async[a54_0xb298fb(0x335)](_0x4cecb6){const _0x1c4e8c=a54_0xb298fb,{options:_0x1aeb70,args:_0x2ba0d2,tdx:_0x135132}=_0x4cecb6,_0x11e6fb=_0x2ba0d2[0x0];_0x1aeb70['verbose']&&_0x11e6fb&&console[_0x1c4e8c(0x30d)](_0x1c4e8c(0x33e)+_0x11e6fb);const _0x214aa9=await withSpinner(_0x1c4e8c(0x2c8),()=>_0x135132[_0x1c4e8c(0x2e9)][_0x1c4e8c(0x38a)](_0x11e6fb,{'limit':_0x1aeb70[_0x1c4e8c(0x3ab)]}),{'verbose':_0x1aeb70[_0x1c4e8c(0x31d)]});let _0x26d8f4=_0x214aa9[_0x1c4e8c(0x364)];_0x26d8f4[_0x1c4e8c(0x270)]((_0x440ede,_0x59d370)=>_0x440ede['name']['localeCompare'](_0x59d370[_0x1c4e8c(0x2f3)]));const _0x47f250=_0x1aeb70[_0x1c4e8c(0x3ab)]||0x64,_0xd62f8=_0x26d8f4['length']>=_0x47f250?a54_0x238b4f[_0x1c4e8c(0x373)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x1c4e8c(0x30d)](_0x1c4e8c(0x275)+_0x26d8f4[_0x1c4e8c(0x33b)]+_0x1c4e8c(0x355)+(_0x26d8f4[_0x1c4e8c(0x33b)]!==0x1?'s':'')+_0xd62f8);if(_0x1aeb70[_0x1c4e8c(0x2b6)]===_0x1c4e8c(0x366)||_0x1aeb70[_0x1c4e8c(0x2b6)]===_0x1c4e8c(0x35b)||_0x1aeb70['format']===_0x1c4e8c(0x340))await handleSDKOutput(_0x26d8f4,_0x1aeb70);else{if(_0x26d8f4[_0x1c4e8c(0x33b)]===0x0)_0x11e6fb?console[_0x1c4e8c(0x360)]('No\x20projects\x20match\x20pattern:\x20'+_0x11e6fb):console[_0x1c4e8c(0x360)](_0x1c4e8c(0x32d));else{const _0x5e03b5=_0x26d8f4[_0x1c4e8c(0x298)](_0x3986e4=>{const _0x557353=_0x1c4e8c,_0x3f1a76=_0x3986e4[_0x557353(0x2e4)]?.[_0x557353(0x35f)](_0x47e4ae=>_0x47e4ae['key']==='sys'),_0x1ccbdb=_0x3f1a76?a54_0x238b4f['dim'](_0x557353(0x21d)):'';return'📁\x20'+_0x3986e4[_0x557353(0x2f3)]+_0x1ccbdb;});await writeOutput(_0x5e03b5['join']('\x0a'),_0x1aeb70['output'],_0x1c4e8c(0x209));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a54_0xb298fb(0x3b4);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x32a);async[a54_0xb298fb(0x335)](_0x372ed3){const _0x1f9b88=a54_0xb298fb,{options:_0x1124a9,args:_0xb6ead0,tdx:_0x7cd526}=_0x372ed3,_0x580af4=this[_0x1f9b88(0x2e6)](_0xb6ead0,_0x1124a9);_0x1124a9[_0x1f9b88(0x31d)]&&_0x580af4&&console[_0x1f9b88(0x30d)](_0x1f9b88(0x2c0)+_0x580af4);const _0x545006=await withSpinner(_0x1f9b88(0x397),()=>_0x7cd526[_0x1f9b88(0x2e9)][_0x1f9b88(0x267)](_0x580af4,{'limit':_0x1124a9[_0x1f9b88(0x3ab)]}),{'verbose':_0x1124a9[_0x1f9b88(0x31d)]});let _0x272e41=_0x545006[_0x1f9b88(0x364)];_0x272e41[_0x1f9b88(0x270)]((_0x11a241,_0xb0c35a)=>{const _0x4983ec=_0x1f9b88,_0x5f3fda=_0x11a241[_0x4983ec(0x2f3)]['localeCompare'](_0xb0c35a[_0x4983ec(0x2f3)]);if(_0x5f3fda!==0x0)return _0x5f3fda;return(_0x11a241[_0x4983ec(0x1f5)]?.[_0x4983ec(0x2f3)]||'')['localeCompare'](_0xb0c35a[_0x4983ec(0x1f5)]?.[_0x4983ec(0x2f3)]||'');});const _0xbfc55=_0x1124a9['limit']||0x64,_0x6ce2f9=_0x272e41['length']>=_0xbfc55?a54_0x238b4f[_0x1f9b88(0x373)](_0x1f9b88(0x277)):'';console[_0x1f9b88(0x30d)]('✔\x20Found\x20'+_0x272e41[_0x1f9b88(0x33b)]+'\x20workflow'+(_0x272e41[_0x1f9b88(0x33b)]!==0x1?'s':'')+_0x6ce2f9);if(_0x1124a9['format']===_0x1f9b88(0x366)||_0x1124a9[_0x1f9b88(0x2b6)]===_0x1f9b88(0x35b)||_0x1124a9[_0x1f9b88(0x2b6)]==='table')await handleSDKOutput(_0x272e41,_0x1124a9);else{if(_0x272e41[_0x1f9b88(0x33b)]===0x0)_0x580af4?console[_0x1f9b88(0x360)](_0x1f9b88(0x2bd)+_0x580af4):console[_0x1f9b88(0x360)]('No\x20workflows\x20found');else{const _0xa780ef=_0x1124a9[_0x1f9b88(0x311)],_0x3762cf=_0x272e41[_0x1f9b88(0x298)](_0x53a507=>{const _0x48bfb2=_0x1f9b88,_0x5128e6=a54_0x238b4f['dim']('#'+_0x53a507['id']),_0x3b870b=hyperlink(_0x5128e6,getWorkflowUrl(_0xa780ef,_0x53a507['id'])),_0x3503cd=_0x53a507[_0x48bfb2(0x1f5)]?.[_0x48bfb2(0x2f3)]?a54_0x238b4f[_0x48bfb2(0x373)]('\x20('+_0x53a507[_0x48bfb2(0x1f5)][_0x48bfb2(0x2f3)]+')'):'';return _0x48bfb2(0x300)+_0x3b870b+'\x20'+_0x53a507[_0x48bfb2(0x2f3)]+_0x3503cd;});await writeOutput(_0x3762cf[_0x1f9b88(0x29a)]('\x0a'),_0x1124a9[_0x1f9b88(0x292)],_0x1f9b88(0x209));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a54_0xb298fb(0x220);[a54_0xb298fb(0x346)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x75737){const _0x2cc1ca=a54_0xb298fb,{options:_0x5c5bde,args:_0x584aec,tdx:_0x376b5b}=_0x75737,_0x7b328a=this[_0x2cc1ca(0x31c)](_0x584aec,_0x5c5bde);if(!_0x7b328a)return 0x1;const {projectName:_0x356f50,workflowName:_0x2ba40f}=_0x7b328a;if(_0x5c5bde[_0x2cc1ca(0x31d)]){if(_0x356f50&&_0x2ba40f)console[_0x2cc1ca(0x30d)](_0x2cc1ca(0x3a8)+_0x356f50+'.'+_0x2ba40f);else _0x356f50&&console[_0x2cc1ca(0x30d)](_0x2cc1ca(0x284)+_0x356f50);const _0x53e6ec=_0x5c5bde['status'];_0x53e6ec&&console[_0x2cc1ca(0x30d)](_0x2cc1ca(0x21c)+_0x53e6ec);}let _0x31bbbb=0x28;if(process[_0x2cc1ca(0x296)][_0x2cc1ca(0x3b1)]&&!_0x5c5bde[_0x2cc1ca(0x292)]&&!_0x5c5bde[_0x2cc1ca(0x2b6)]){const _0xd3133a=process[_0x2cc1ca(0x296)][_0x2cc1ca(0x278)]||0x28;_0x31bbbb=Math['max'](0x14,Math[_0x2cc1ca(0x332)](_0xd3133a*0x2/0x3));}const _0x2c1cad=_0x5c5bde['limit']||_0x31bbbb,_0x2dbc40=await withSpinner(_0x2cc1ca(0x34f),()=>_0x376b5b[_0x2cc1ca(0x2e9)][_0x2cc1ca(0x24a)]({'projectName':_0x356f50,'workflowName':_0x2ba40f,'status':_0x5c5bde[_0x2cc1ca(0x321)],'fromTime':_0x5c5bde[_0x2cc1ca(0x3b3)],'toTime':_0x5c5bde['to'],'limit':_0x2c1cad}),{'verbose':_0x5c5bde[_0x2cc1ca(0x31d)]}),_0x475115=_0x2dbc40[_0x2cc1ca(0x364)];_0x475115['sort']((_0x1419a0,_0x2a621c)=>{const _0x3cb82f=_0x2cc1ca,_0x2dd856=_0x1419a0['sessionTime']||'',_0x2808f0=_0x2a621c[_0x3cb82f(0x230)]||'';return _0x2808f0[_0x3cb82f(0x337)](_0x2dd856);});_0x475115[_0x2cc1ca(0x33b)]>=_0x2c1cad?console[_0x2cc1ca(0x30d)]('✔\x20Showing\x20'+_0x475115[_0x2cc1ca(0x33b)]+_0x2cc1ca(0x20f)+a54_0x238b4f[_0x2cc1ca(0x373)](_0x2cc1ca(0x205))):console['error'](_0x2cc1ca(0x275)+_0x475115[_0x2cc1ca(0x33b)]+_0x2cc1ca(0x1eb)+(_0x475115[_0x2cc1ca(0x33b)]!==0x1?'s':''));if(_0x5c5bde['format']==='json'||_0x5c5bde[_0x2cc1ca(0x2b6)]===_0x2cc1ca(0x35b)||_0x5c5bde['format']===_0x2cc1ca(0x340))await handleSDKOutput(_0x475115,_0x5c5bde);else{if(!process[_0x2cc1ca(0x296)][_0x2cc1ca(0x3b1)]||_0x5c5bde[_0x2cc1ca(0x292)]){if(_0x475115[_0x2cc1ca(0x33b)]===0x0){if(_0x356f50&&_0x2ba40f)console[_0x2cc1ca(0x360)](_0x2cc1ca(0x2f9)+_0x356f50+'.'+_0x2ba40f);else _0x356f50?console[_0x2cc1ca(0x360)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x356f50):console['log'](_0x2cc1ca(0x3b0));}else{const _0xad9c8f=_0x5c5bde[_0x2cc1ca(0x311)],_0xfb92f0=this[_0x2cc1ca(0x280)](_0x475115,_0xad9c8f);_0x5c5bde[_0x2cc1ca(0x292)]?await writeOutput(_0xfb92f0,_0x5c5bde['output'],'list'):console[_0x2cc1ca(0x360)](_0xfb92f0);}!_0x356f50&&(console[_0x2cc1ca(0x30d)](''),console[_0x2cc1ca(0x30d)](a54_0x238b4f[_0x2cc1ca(0x373)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a54_0x238b4f['dim'](_0x2cc1ca(0x351))+'or'+a54_0x238b4f[_0x2cc1ca(0x373)](_0x2cc1ca(0x2f7))));}else{if(_0x475115[_0x2cc1ca(0x33b)]===0x0){if(_0x356f50&&_0x2ba40f)console[_0x2cc1ca(0x360)]('No\x20sessions\x20found\x20for:\x20'+_0x356f50+'.'+_0x2ba40f);else _0x356f50?console['log'](_0x2cc1ca(0x2be)+_0x356f50):console['log'](_0x2cc1ca(0x3b0));}else await this[_0x2cc1ca(0x36c)](_0x475115,_0x75737,_0x356f50);}}return 0x0;}['renderSessionsTimeline'](_0x5d1b3a,_0x5b23e2){const _0x2d5362=a54_0xb298fb,_0x1dfb81=[],_0x1509b3=new Map();let _0x28e8b4=Infinity,_0x33d00c=-Infinity;for(const _0x3177a3 of _0x5d1b3a){if(_0x3177a3[_0x2d5362(0x266)]?.[_0x2d5362(0x217)]){const _0x21bcfb=new Date(_0x3177a3['lastAttempt'][_0x2d5362(0x217)])[_0x2d5362(0x3a4)](),_0x2be63d=_0x3177a3['lastAttempt'][_0x2d5362(0x227)]?new Date(_0x3177a3[_0x2d5362(0x266)]['finishedAt'])['getTime']():Date['now'](),_0x137575=_0x3177a3[_0x2d5362(0x1f5)]?.['name']||'(unknown)';!_0x1509b3['has'](_0x137575)&&_0x1509b3['set'](_0x137575,[]),_0x1509b3['get'](_0x137575)['push']({'session':_0x3177a3,'startTime':_0x21bcfb,'endTime':_0x2be63d,'duration':_0x2be63d-_0x21bcfb}),_0x28e8b4=Math['min'](_0x28e8b4,_0x21bcfb),_0x33d00c=Math[_0x2d5362(0x23d)](_0x33d00c,_0x2be63d);}}if(_0x1509b3['size']===0x0)return _0x2d5362(0x29c);const _0x196d15=process[_0x2d5362(0x296)][_0x2d5362(0x326)]||0x78,_0x445aac=0x1e,_0x4c3130=0x32,_0x41e43e=0x4,_0x547f61=Math['min'](_0x4c3130,Math[_0x2d5362(0x23d)](_0x445aac,Math['floor'](_0x196d15*0.3))),_0x191915=_0x196d15-_0x547f61-TIMELINE_CONFIG[_0x2d5362(0x248)]-0x3-_0x41e43e,_0x4cf679=_0x33d00c-_0x28e8b4,_0x343748=_0x4cf679/_0x547f61,_0x29cc43=renderTimeAxis({'startTime':_0x28e8b4,'endTime':_0x33d00c,'durationMs':_0x4cf679,'msPerChar':_0x343748},_0x547f61),_0x56ab59=[];for(const _0x185e35 of _0x1509b3[_0x2d5362(0x2c4)]()){_0x56ab59[_0x2d5362(0x2c7)](..._0x185e35);}_0x56ab59[_0x2d5362(0x270)]((_0x20458a,_0x5c6893)=>_0x5c6893[_0x2d5362(0x223)]-_0x20458a['startTime']);const _0x4ed24c=new Date(_0x28e8b4),_0x35073f=formatDate(_0x4ed24c),_0x523908=_0x41e43e+TIMELINE_CONFIG[_0x2d5362(0x2d3)]+TIMELINE_CONFIG[_0x2d5362(0x2f0)]+_0x191915,_0x473903='\x20'['repeat'](_0x523908-_0x35073f['length']),_0x1ea375=_0x473903+a54_0x238b4f[_0x2d5362(0x373)](_0x35073f)+'\x20'+_0x29cc43;_0x1dfb81[_0x2d5362(0x2c7)](_0x1ea375);const _0xa2a723=0x16;let _0x3b9deb=0x0;for(const _0x5da6b2 of _0x56ab59){const _0xf48747=_0x5da6b2['session'][_0x2d5362(0x1f5)]?.[_0x2d5362(0x2f3)]||'?',_0x2798ca=Math[_0x2d5362(0x27d)](stringWidth(_0xf48747),_0xa2a723);_0x3b9deb=Math[_0x2d5362(0x23d)](_0x3b9deb,_0x2798ca);}for(const _0x221380 of _0x56ab59){const {session:_0x244a2e,startTime:_0x2853ee,endTime:_0x475f00,duration:_0x2314b1}=_0x221380,_0x185524=_0x244a2e[_0x2d5362(0x1f5)]?.['id'],_0x5f4f80=_0x244a2e['id'],_0x244703=_0x244a2e['project']?.[_0x2d5362(0x2f3)]||'?',_0xc67da4=_0x244a2e['workflow']?.[_0x2d5362(0x2f3)]||'?';let _0x44ec52,_0x2c0d8f;if(_0x244a2e[_0x2d5362(0x266)]){const _0x3bd448=_0x244a2e[_0x2d5362(0x266)];!_0x3bd448['done']?(_0x44ec52=_0x3bd448['cancelRequested']?'🛑':'🔄',_0x2c0d8f=_0x3bd448[_0x2d5362(0x379)]?a54_0x238b4f[_0x2d5362(0x344)]:a54_0x238b4f['blue']):(_0x44ec52=_0x3bd448[_0x2d5362(0x2d2)]?'✅':'❌',_0x2c0d8f=_0x3bd448['success']?a54_0x238b4f[_0x2d5362(0x23e)]:a54_0x238b4f[_0x2d5362(0x301)]);}else _0x44ec52='⏳',_0x2c0d8f=a54_0x238b4f['dim'];const _0x44ee7e='#'+_0x5f4f80,_0x16e1a0=_0x185524?hyperlink(_0x44ee7e,getWorkflowSessionUrl(_0x5b23e2,_0x185524,_0x5f4f80)):_0x44ee7e;let _0x58a2aa=_0x244703;stringWidth(_0x244703)>_0xa2a723&&(_0x58a2aa=_0x244703[_0x2d5362(0x258)](0x0,_0xa2a723-0x1)+'…');const _0x2eaed2=a54_0x238b4f[_0x2d5362(0x373)](_0x58a2aa),_0x18c48d=stringWidth(_0x58a2aa),_0x5b7999='\x20'[_0x2d5362(0x21a)](_0x3b9deb-stringWidth(_0x58a2aa)+0x2),_0x5d50b9='('+formatElapsed(_0x2314b1)+')',_0x465909=stringWidth(_0x5d50b9),_0x396d32=stringWidth(_0x44ee7e),_0x4213c8=_0x396d32+0x1+_0x18c48d+_0x5b7999[_0x2d5362(0x33b)],_0x1782a2=_0x191915-_0x4213c8-_0x465909-0x1-0x8;let _0x192fd0=_0xc67da4;stringWidth(_0x192fd0)>_0x1782a2&&(_0x192fd0=_0x192fd0[_0x2d5362(0x258)](0x0,_0x1782a2-0x1)+'…');const _0x3c990e=_0x16e1a0+'\x20'+_0x2eaed2+_0x5b7999+_0x192fd0,_0x43df7e=stringWidth(_0x3c990e),_0xd6f749=_0x191915-_0x43df7e-_0x465909,_0x44ec27=_0x3c990e+'\x20'['repeat'](Math[_0x2d5362(0x23d)](0x1,_0xd6f749))+a54_0x238b4f[_0x2d5362(0x373)](_0x5d50b9),_0x4bf132=Math[_0x2d5362(0x332)]((_0x2853ee-_0x28e8b4)/_0x343748),_0x3cb0dd=Math[_0x2d5362(0x332)]((_0x475f00-_0x28e8b4)/_0x343748),_0x5cc26d=Math['max'](_0x4bf132+0x1,_0x3cb0dd),_0x11d4a5=new Array(_0x547f61)[_0x2d5362(0x286)]('\x20');for(let _0x148500=_0x4bf132;_0x148500<Math[_0x2d5362(0x27d)](_0x5cc26d,_0x547f61);_0x148500++){_0x11d4a5[_0x148500]='─';}const _0x5e667b=_0x11d4a5[_0x2d5362(0x298)](_0x11bf4f=>_0x11bf4f==='\x20'?'\x20':_0x2c0d8f(_0x11bf4f))[_0x2d5362(0x29a)]('');_0x1dfb81[_0x2d5362(0x2c7)](_0x44ec52+'\x20'+_0x44ec27+'│'+_0x5e667b+'│');}return _0x1dfb81[_0x2d5362(0x29a)]('\x0a');}async['navigateSessionsInteractive'](_0x1d5423,_0x11eed9,_0x3c7301){const _0x280cf0=a54_0xb298fb,{options:_0x24fc4e,tdx:_0x1f6e80}=_0x11eed9,_0x1a1970=_0x24fc4e[_0x280cf0(0x311)],{timelineRows:_0x34f978,timeAxisHeader:_0x2317db}=this[_0x280cf0(0x3af)](_0x1d5423,_0x1a1970),_0x33f117=_0x34f978[_0x280cf0(0x281)](_0x3a3a42=>_0x3a3a42[_0x280cf0(0x2b7)]);if(_0x33f117[_0x280cf0(0x33b)]===0x0){const _0x15f6dd=this['renderSessionsTimeline'](_0x1d5423,_0x1a1970);console['log'](_0x15f6dd);!_0x3c7301&&(console[_0x280cf0(0x30d)](''),console[_0x280cf0(0x30d)](a54_0x238b4f[_0x280cf0(0x373)](_0x280cf0(0x25c))),console['error'](a54_0x238b4f[_0x280cf0(0x373)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a54_0x238b4f[_0x280cf0(0x373)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x2317db&&console[_0x280cf0(0x360)](_0x2317db);const _0xa3dad7=_0x34f978[_0x280cf0(0x281)](_0x583538=>_0x583538['attemptId'])[_0x280cf0(0x298)](_0x95364b=>({'title':_0x95364b[_0x280cf0(0x348)],'value':_0x95364b[_0x280cf0(0x2b7)]})),_0x3c3f26=process[_0x280cf0(0x296)][_0x280cf0(0x278)]||0x3c,_0x2fe3bf=Math[_0x280cf0(0x23d)](0x28,Math['floor'](_0x3c3f26*0x2/0x3)),_0x40ad5e=await a54_0x206969({'type':_0x280cf0(0x272),'name':_0x280cf0(0x2b7),'message':_0x280cf0(0x221),'choices':_0xa3dad7,'initial':-0x1,'limit':_0x2fe3bf,'clearFirst':!![],'fallback':{'title':_0x280cf0(0x3a2),'value':null},'suggest':(_0x54be6b,_0x1d8075)=>{const _0x4d016a=_0x280cf0;if(!_0x54be6b)return Promise[_0x4d016a(0x1fa)](_0x1d8075);const _0x566b58=_0x1d8075[_0x4d016a(0x281)](_0x330485=>{const _0x3e34c4=_0x4d016a,_0x597a0d=_0x330485;return _0x597a0d[_0x3e34c4(0x2e8)]['toLowerCase']()['includes'](_0x54be6b[_0x3e34c4(0x2f4)]());});return Promise['resolve'](_0x566b58);}}),_0x5396d2=()=>{const _0xa302a0=_0x280cf0;process[_0xa302a0(0x296)]['write']('\x1b[1A\x1b[2K'),process[_0xa302a0(0x296)][_0xa302a0(0x1f0)](_0xa302a0(0x244)),process[_0xa302a0(0x296)]['write']('\x1b[1A\x1b[2K');},_0xd083d8=_0x40ad5e&&_0x40ad5e[_0x280cf0(0x2b7)]&&_0x40ad5e[_0x280cf0(0x2b7)]!==null&&_0x40ad5e['attemptId']['trim']()!=='';if(!_0xd083d8){_0x5396d2(),console[_0x280cf0(0x360)](a54_0x238b4f[_0x280cf0(0x373)](_0x280cf0(0x30e)));return;}_0x5396d2();const _0x196657=_0x1d5423[_0x280cf0(0x2fd)](_0x585e8f=>_0x585e8f[_0x280cf0(0x266)]?.['id']===_0x40ad5e[_0x280cf0(0x2b7)]);if(_0x196657){const _0xc1b553=_0x196657[_0x280cf0(0x1f5)]?.[_0x280cf0(0x2f3)]||'?',_0x4e931e=_0x196657[_0x280cf0(0x2e9)]?.[_0x280cf0(0x2f3)]||'?';console[_0x280cf0(0x360)](_0x280cf0(0x24b)+a54_0x238b4f['dim'](_0xc1b553)+_0x280cf0(0x1ee)+a54_0x238b4f[_0x280cf0(0x373)](_0x4e931e));}const _0x93b4dc=new WorkflowTimelineCommand();await _0x93b4dc['execute']({'args':[],'options':{..._0x24fc4e,'attemptId':_0x40ad5e[_0x280cf0(0x2b7)]},'tdx':_0x1f6e80});}[a54_0xb298fb(0x3af)](_0x13743e,_0x168ceb){const _0x43e64f=a54_0xb298fb,_0x4afad6=new Map();for(const _0x2e8a96 of _0x13743e){_0x2e8a96['id']&&_0x2e8a96[_0x43e64f(0x266)]?.['id']&&_0x4afad6['set'](_0x2e8a96['id'],_0x2e8a96[_0x43e64f(0x266)]['id']);}const _0x598546=[];let _0x458ebc='';const _0x1055d2=this[_0x43e64f(0x280)](_0x13743e,_0x168ceb),_0x3004b1=_0x1055d2[_0x43e64f(0x2ee)]('\x0a');for(const _0x34c738 of _0x3004b1){if(_0x34c738['startsWith']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x34c738[_0x43e64f(0x37f)](/^\s+\d{4}-\d{2}-\d{2}/))_0x458ebc=_0x34c738;else{if(_0x34c738[_0x43e64f(0x37f)](/^[✅❌🔄🛑⏳]/)){const _0xef5b3d=_0x34c738[_0x43e64f(0x37f)](/#(\d+)/),_0x6739cd=_0xef5b3d?_0xef5b3d[0x1]:null,_0x4cdc47=_0x6739cd?_0x4afad6[_0x43e64f(0x378)](_0x6739cd)||null:null,_0x2e6889=_0x13743e[_0x43e64f(0x2fd)](_0x400960=>_0x400960['id']===_0x6739cd),_0x538ab7=_0x2e6889?.[_0x43e64f(0x1f5)]?.[_0x43e64f(0x2f3)]||'';_0x598546[_0x43e64f(0x2c7)]({'displayLine':_0x34c738,'attemptId':_0x4cdc47,'projectName':_0x538ab7});}}}return{'timelineRows':_0x598546,'timeAxisHeader':_0x458ebc};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a54_0xb298fb(0x381);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x334);async[a54_0xb298fb(0x335)](_0x106181){const _0x123e12=a54_0xb298fb,{options:_0x6f9ff3,args:_0x4d8349,tdx:_0x4d90a9}=_0x106181,_0x305bce=this[_0x123e12(0x31c)](_0x4d8349,_0x6f9ff3);if(!_0x305bce)return 0x1;const {projectName:_0x2e9668,workflowName:_0x317af0}=_0x305bce,_0x2602b2=_0x6f9ff3[_0x123e12(0x308)];if(_0x6f9ff3[_0x123e12(0x31d)]){if(_0x2e9668&&_0x317af0)console['error']('Filter:\x20'+_0x2e9668+'.'+_0x317af0);else _0x2e9668&&console['error'](_0x123e12(0x284)+_0x2e9668);_0x2602b2&&console['error']('Include\x20retried:\x20yes');}const _0x1cc6ab=await withSpinner(_0x123e12(0x319),()=>_0x4d90a9[_0x123e12(0x2e9)][_0x123e12(0x368)]({'projectName':_0x2e9668,'workflowName':_0x317af0,'includeRetried':_0x2602b2,'limit':_0x6f9ff3[_0x123e12(0x3ab)]}),{'verbose':_0x6f9ff3[_0x123e12(0x31d)]}),_0x461c87=_0x1cc6ab[_0x123e12(0x364)],_0x54ce33=_0x6f9ff3[_0x123e12(0x3ab)]||0x64,_0x164889=_0x461c87['length']>=_0x54ce33?a54_0x238b4f[_0x123e12(0x373)](_0x123e12(0x277)):'';console[_0x123e12(0x30d)](_0x123e12(0x275)+_0x461c87['length']+_0x123e12(0x27e)+(_0x461c87[_0x123e12(0x33b)]!==0x1?'s':'')+_0x164889);if(_0x6f9ff3[_0x123e12(0x2b6)]===_0x123e12(0x366)||_0x6f9ff3[_0x123e12(0x2b6)]==='jsonl'||_0x6f9ff3[_0x123e12(0x2b6)]===_0x123e12(0x340))await handleSDKOutput(_0x461c87,_0x6f9ff3);else{if(_0x461c87[_0x123e12(0x33b)]===0x0){if(_0x2e9668&&_0x317af0)console[_0x123e12(0x360)](_0x123e12(0x219)+_0x2e9668+'.'+_0x317af0);else _0x2e9668?console[_0x123e12(0x360)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x2e9668):console['log'](_0x123e12(0x201));}else{const _0x21ff18=_0x6f9ff3['site'],_0xf17b27=_0x461c87[_0x123e12(0x298)](_0x288a71=>{const _0x3efe48=_0x123e12,_0x2b44e8=a54_0x238b4f[_0x3efe48(0x373)]('#'+_0x288a71['id']),_0x3412f6=_0x288a71[_0x3efe48(0x1f5)]?.['id'],_0xb13cdc=_0x288a71[_0x3efe48(0x310)]||_0x288a71[_0x3efe48(0x2ca)],_0x5802d7=_0x3412f6&&_0xb13cdc?hyperlink(_0x2b44e8,getWorkflowAttemptUrl(_0x21ff18,_0x3412f6,_0xb13cdc,_0x288a71['id'])):_0x2b44e8,{icon:_0x20fe71,text:_0x155f0e}=getAttemptStatusDisplay(_0x288a71),_0x33f536=(_0x288a71[_0x3efe48(0x1f5)]?.['name']||'?')+'.'+(_0x288a71[_0x3efe48(0x2e9)]?.['name']||'?'),_0x8ea03=_0x288a71[_0x3efe48(0x230)]?a54_0x238b4f[_0x3efe48(0x373)](_0x288a71['sessionTime']):'';return(_0x5802d7+'\x20'+_0x20fe71+(_0x155f0e?'\x20'+_0x155f0e:'')+'\x20'+_0x33f536+'\x20'+_0x8ea03)[_0x3efe48(0x2ff)]();});await writeOutput(_0xf17b27['join']('\x0a'),_0x6f9ff3['output'],_0x123e12(0x209));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]='workflow:attempt';[a54_0xb298fb(0x346)]=a54_0xb298fb(0x386);async[a54_0xb298fb(0x335)](_0x642f62){const _0x2a7cc2=a54_0xb298fb,{options:_0x145479,args:_0x50d6fa,tdx:_0x21ab0f}=_0x642f62,_0x4d2fa6=_0x50d6fa[0x0];if(!_0x4d2fa6)return console[_0x2a7cc2(0x30d)](_0x2a7cc2(0x24d)),0x1;_0x145479['verbose']&&console[_0x2a7cc2(0x30d)](_0x2a7cc2(0x333)+_0x4d2fa6);const _0x674ad3=await withSpinner('Getting\x20attempt\x20details...',()=>_0x21ab0f[_0x2a7cc2(0x2e9)][_0x2a7cc2(0x328)](_0x4d2fa6),{'verbose':_0x145479['verbose']}),_0x1d30c3=_0x674ad3[_0x2a7cc2(0x364)];let _0x4a107b;!_0x1d30c3[_0x2a7cc2(0x234)]?_0x4a107b=_0x1d30c3['cancelRequested']?_0x2a7cc2(0x203):_0x2a7cc2(0x20a):_0x4a107b=_0x1d30c3[_0x2a7cc2(0x2d2)]?_0x2a7cc2(0x2d2):_0x2a7cc2(0x30d);let _0x430818;if(_0x1d30c3['createdAt']&&_0x1d30c3[_0x2a7cc2(0x227)]){const _0x565f33=new Date(_0x1d30c3[_0x2a7cc2(0x217)])[_0x2a7cc2(0x3a4)](),_0x2629ff=new Date(_0x1d30c3['finishedAt'])[_0x2a7cc2(0x3a4)]();_0x430818=Math[_0x2a7cc2(0x358)]((_0x2629ff-_0x565f33)/0x3e8);}const _0x456e0f={'attempt_id':_0x1d30c3['id'],'status':_0x4a107b,..._0x1d30c3[_0x2a7cc2(0x288)]!==undefined&&{'index':_0x1d30c3[_0x2a7cc2(0x288)]},..._0x1d30c3[_0x2a7cc2(0x1f5)]&&{'project':_0x1d30c3[_0x2a7cc2(0x1f5)][_0x2a7cc2(0x2f3)]},..._0x1d30c3[_0x2a7cc2(0x2e9)]&&{'workflow':_0x1d30c3['workflow']['name']},..._0x1d30c3['sessionId']&&{'session_id':_0x1d30c3[_0x2a7cc2(0x2ca)]},..._0x1d30c3[_0x2a7cc2(0x230)]&&{'session_time':_0x1d30c3[_0x2a7cc2(0x230)]},..._0x1d30c3['retryAttemptName']&&{'retry_attempt':_0x1d30c3[_0x2a7cc2(0x26f)]},..._0x430818!==undefined&&{'duration_sec':_0x430818},..._0x1d30c3[_0x2a7cc2(0x217)]&&{'created_at':_0x1d30c3[_0x2a7cc2(0x217)]},..._0x1d30c3[_0x2a7cc2(0x227)]&&{'finished_at':_0x1d30c3['finishedAt']},...Object[_0x2a7cc2(0x39f)](_0x1d30c3[_0x2a7cc2(0x30c)])[_0x2a7cc2(0x33b)]>0x0&&{'params':_0x1d30c3[_0x2a7cc2(0x30c)]}};return await handleSingleObjectOutput(_0x456e0f,_0x145479),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x27f);['description']=a54_0xb298fb(0x1fc);async[a54_0xb298fb(0x335)](_0x1d42f8){const _0x46f413=a54_0xb298fb,{options:_0xd51279,args:_0x3b7d19,tdx:_0x472333}=_0x1d42f8,_0x284a5c=_0x3b7d19[0x0];if(!_0x284a5c)return console[_0x46f413(0x30d)](_0x46f413(0x24d)),0x1;const _0x5ce814=_0xd51279[_0x46f413(0x238)];_0xd51279['verbose']&&(console[_0x46f413(0x30d)](_0x46f413(0x333)+_0x284a5c),_0x5ce814&&console[_0x46f413(0x30d)](_0x46f413(0x2a4)));const _0x59b4d8=await withSpinner(_0x46f413(0x307),()=>_0x472333[_0x46f413(0x2e9)][_0x46f413(0x2a9)](_0x284a5c,_0x5ce814||![]),{'verbose':_0xd51279[_0x46f413(0x31d)]}),_0x9f80c1=_0x59b4d8[_0x46f413(0x364)];return console['error'](_0x46f413(0x275)+_0x9f80c1[_0x46f413(0x33b)]+_0x46f413(0x22d)+(_0x9f80c1['length']!==0x1?'s':'')),await handleSDKOutput(_0x9f80c1,_0xd51279),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x36b);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x25d);async['execute'](_0x1e6ef3){const _0xf49420=a54_0xb298fb,{options:_0x55719,args:_0x35cd87,tdx:_0x1684ec}=_0x1e6ef3,_0x49da90=_0x35cd87[0x0];let _0x46cb86=_0x35cd87[0x1];if(!_0x49da90)return console[_0xf49420(0x30d)](_0xf49420(0x24d)),0x1;_0x55719['verbose']&&(console[_0xf49420(0x30d)](_0xf49420(0x333)+_0x49da90),_0x46cb86&&console['error'](_0xf49420(0x2b0)+_0x46cb86));const _0x3afc38=await withSpinner(_0xf49420(0x2a8),()=>_0x1684ec[_0xf49420(0x2e9)][_0xf49420(0x3a9)](_0x49da90,_0x46cb86),{'verbose':_0x55719[_0xf49420(0x31d)]}),_0x35a912=_0x3afc38[_0xf49420(0x364)];if(_0x35a912[_0xf49420(0x33b)]===0x0)return console[_0xf49420(0x30d)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x46cb86&&(_0x55719[_0xf49420(0x366)]||_0x55719[_0xf49420(0x2b6)]))return await handleSDKOutput(_0x35a912,_0x55719),0x0;if(!_0x46cb86){const _0xa81465=_0x35a912[_0xf49420(0x298)](_0x4c7cab=>({'title':_0x4c7cab[_0xf49420(0x255)]+'\x20('+formatBytes(_0x4c7cab[_0xf49420(0x2b2)])+')','value':_0x4c7cab[_0xf49420(0x255)]})),_0x57e979=await a54_0x206969({'type':'select','name':_0xf49420(0x331),'message':_0xf49420(0x23f),'choices':_0xa81465});if(!_0x57e979['task'])return console[_0xf49420(0x30d)](_0xf49420(0x30e)),0x0;_0x46cb86=_0x57e979[_0xf49420(0x331)];}const _0x43eb49=await withSpinner(_0xf49420(0x28f),()=>_0x1684ec[_0xf49420(0x2e9)]['logs'](_0x49da90,_0x46cb86),{'verbose':_0x55719[_0xf49420(0x31d)]}),_0x333d23=_0x43eb49[_0xf49420(0x364)];return _0x333d23?console[_0xf49420(0x360)](_0x333d23):console['error'](_0xf49420(0x320)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x2c6);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x1f3);async[a54_0xb298fb(0x335)](_0x3b8d66){const _0x377818=a54_0xb298fb,{options:_0x16bb44,args:_0x17ddab,tdx:_0x6a6b9f}=_0x3b8d66,_0x13cfe9=_0x17ddab[0x0];if(!_0x13cfe9)return console[_0x377818(0x30d)](_0x377818(0x24d)),0x1;const _0x5c489d=_0x16bb44['reason'];_0x16bb44[_0x377818(0x31d)]&&(console[_0x377818(0x30d)]('Attempt\x20ID:\x20'+_0x13cfe9),_0x5c489d&&console['error'](_0x377818(0x1f4)+_0x5c489d));if(!_0x16bb44['yes']){if(!isInteractive())return console[_0x377818(0x30d)](a54_0x238b4f[_0x377818(0x301)](_0x377818(0x343)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x377818(0x30d)](a54_0x238b4f[_0x377818(0x373)](_0x377818(0x1f6))),0x1;const _0x7f9587=await confirmKey(_0x377818(0x38c)+_0x13cfe9+'?');if(!_0x7f9587)return console[_0x377818(0x30d)](a54_0x238b4f['yellow']('Cancelled')),0x1;}const _0x1aec53=await withSpinner(_0x377818(0x257),()=>_0x6a6b9f['workflow']['kill'](_0x13cfe9,_0x5c489d),{'verbose':_0x16bb44[_0x377818(0x31d)]}),_0x322a0f=_0x1aec53[_0x377818(0x364)];return console[_0x377818(0x30d)]('✔\x20'+_0x322a0f),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x27b);[a54_0xb298fb(0x346)]='Retry\x20a\x20session\x20or\x20attempt';async['execute'](_0x10fc8d){const _0x4cb303=a54_0xb298fb,{options:_0x296a79,args:_0x5c114b,tdx:_0x3e98c9}=_0x10fc8d,_0x15b86f=_0x5c114b[0x0];if(!_0x15b86f)return console[_0x4cb303(0x30d)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x4cb303(0x30d)](_0x4cb303(0x2f6)),0x1;let _0x3a6516=![],_0x21c52d=_0x15b86f;if(_0x15b86f[_0x4cb303(0x30a)](_0x4cb303(0x28d)))_0x3a6516=!![],_0x21c52d=_0x15b86f[_0x4cb303(0x291)](0x8);else{if(_0x15b86f[_0x4cb303(0x30a)](_0x4cb303(0x1f9)))_0x3a6516=![],_0x21c52d=_0x15b86f[_0x4cb303(0x291)](0x8);else return console[_0x4cb303(0x30d)](_0x4cb303(0x226)),console[_0x4cb303(0x30d)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x1a381a=_0x296a79[_0x4cb303(0x2bf)],_0x584b1d=_0x296a79[_0x4cb303(0x2b8)],_0x5ac5a6=_0x296a79[_0x4cb303(0x30c)],_0x48137b=_0x296a79[_0x4cb303(0x207)];_0x296a79['verbose']&&(console[_0x4cb303(0x30d)](_0x4cb303(0x2de)+(_0x3a6516?_0x4cb303(0x38b):_0x4cb303(0x328))+'\x20'+_0x21c52d),_0x1a381a&&console['error']('From\x20task:\x20'+_0x1a381a),_0x584b1d&&console['error']('Resume\x20from:\x20'+_0x584b1d),_0x5ac5a6&&console[_0x4cb303(0x30d)](_0x4cb303(0x2f2)+_0x5ac5a6),_0x48137b&&console['error'](_0x4cb303(0x32e)));let _0x3cb124;if(_0x5ac5a6)try{if(_0x5ac5a6[_0x4cb303(0x30a)]('@')){const _0x2226bb=await import(_0x4cb303(0x3ac)),_0xf8eac2=_0x5ac5a6['substring'](0x1),_0x30e6ae=await _0x2226bb[_0x4cb303(0x374)](_0xf8eac2,_0x4cb303(0x2fb));_0x3cb124=JSON[_0x4cb303(0x1e9)](_0x30e6ae);}else _0x3cb124=JSON['parse'](_0x5ac5a6);}catch{return console[_0x4cb303(0x30d)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x296a79[_0x4cb303(0x30b)]){if(!isInteractive())return console['error'](a54_0x238b4f[_0x4cb303(0x301)](_0x4cb303(0x343)),_0x4cb303(0x2e2)),console[_0x4cb303(0x30d)](a54_0x238b4f['dim'](_0x4cb303(0x1f6))),0x1;const _0x5bd351=await confirmKey(_0x4cb303(0x261)+(_0x3a6516?_0x4cb303(0x38b):'attempt')+'\x20'+_0x21c52d+'?');if(!_0x5bd351)return console[_0x4cb303(0x30d)](a54_0x238b4f['yellow'](_0x4cb303(0x30e))),0x1;}let _0x1259bb;_0x3a6516?_0x1259bb=await withSpinner(_0x4cb303(0x392),()=>_0x3e98c9['workflow'][_0x4cb303(0x2e5)](_0x21c52d,{'fromTask':_0x1a381a,'retryParams':_0x3cb124}),{'verbose':_0x296a79[_0x4cb303(0x31d)]}):_0x1259bb=await withSpinner(_0x4cb303(0x304),()=>_0x3e98c9['workflow'][_0x4cb303(0x349)](_0x21c52d,{'resumeFrom':_0x584b1d,'retryParams':_0x3cb124,'force':_0x48137b}),{'verbose':_0x296a79[_0x4cb303(0x31d)]});const _0xc3d55c=_0x1259bb[_0x4cb303(0x364)];return console[_0x4cb303(0x30d)](_0x4cb303(0x37c)),console['error'](_0x4cb303(0x23a)+_0xc3d55c['attemptId']),console['error'](_0x4cb303(0x20d)+_0xc3d55c[_0x4cb303(0x2ca)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a54_0xb298fb(0x2ea);['description']=a54_0xb298fb(0x34a);async[a54_0xb298fb(0x335)](_0xe7c7dd){const _0x5bc3be=a54_0xb298fb,{options:_0x4f293d,args:_0x4f523e,tdx:_0x4a030c}=_0xe7c7dd;let _0x5a4b1e=_0x4f523e[0x0];if(!_0x5a4b1e){const _0x3c8fee=this[_0x5bc3be(0x2e6)]([],_0x4f293d),_0x3189ea=await withSpinner('Loading\x20workflows...',()=>_0x4a030c[_0x5bc3be(0x2e9)][_0x5bc3be(0x267)](_0x3c8fee,{'limit':_0x4f293d[_0x5bc3be(0x3ab)]}),{'verbose':_0x4f293d[_0x5bc3be(0x31d)]}),_0x36bcad=_0x3189ea[_0x5bc3be(0x364)];if(_0x36bcad[_0x5bc3be(0x33b)]===0x0)return console['error']('No\x20workflows\x20found'),!_0x3c8fee&&console[_0x5bc3be(0x30d)](a54_0x238b4f['dim'](_0x5bc3be(0x2ab))),0x1;const _0x5803a6=_0x36bcad[_0x5bc3be(0x298)](_0x2cbf69=>({'title':_0x2cbf69['project']?.[_0x5bc3be(0x2f3)]+'.'+_0x2cbf69[_0x5bc3be(0x2f3)],'value':_0x2cbf69[_0x5bc3be(0x1f5)]?.[_0x5bc3be(0x2f3)]+'.'+_0x2cbf69[_0x5bc3be(0x2f3)],'description':_0x2cbf69[_0x5bc3be(0x2c3)]?_0x5bc3be(0x297)+_0x2cbf69[_0x5bc3be(0x2c3)]:undefined})),_0x1778bb=await a54_0x206969({'type':_0x5bc3be(0x29f),'name':_0x5bc3be(0x2e9),'message':_0x5bc3be(0x354),'choices':_0x5803a6});if(!_0x1778bb[_0x5bc3be(0x2e9)])return 0x1;_0x5a4b1e=_0x1778bb[_0x5bc3be(0x2e9)];}if(!_0x5a4b1e[_0x5bc3be(0x388)]('.')){const _0x4d5df9=this[_0x5bc3be(0x2e6)]([],_0x4f293d);if(_0x4d5df9)_0x5a4b1e=_0x4d5df9+'.'+_0x5a4b1e;else return console[_0x5bc3be(0x30d)](a54_0x238b4f[_0x5bc3be(0x301)]('Error:'),_0x5bc3be(0x1fd)),console['error'](a54_0x238b4f[_0x5bc3be(0x373)](_0x5bc3be(0x2ab))),0x1;}const _0x419652=_0x4f293d[_0x5bc3be(0x34b)],_0x21e5e2=_0x4f293d[_0x5bc3be(0x230)],_0x156fba={};if(_0x419652&&Array[_0x5bc3be(0x2a2)](_0x419652))for(const _0x16ff79 of _0x419652){const _0x2e5159=_0x16ff79['indexOf']('=');if(_0x2e5159===-0x1)return console[_0x5bc3be(0x30d)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x16ff79),console[_0x5bc3be(0x30d)](_0x5bc3be(0x31a)),0x1;const _0x34a48e=_0x16ff79['substring'](0x0,_0x2e5159),_0x3dbf0f=_0x16ff79[_0x5bc3be(0x291)](_0x2e5159+0x1);try{_0x156fba[_0x34a48e]=JSON[_0x5bc3be(0x1e9)](_0x3dbf0f);}catch{_0x156fba[_0x34a48e]=_0x3dbf0f;}}_0x4f293d[_0x5bc3be(0x31d)]&&(console['error'](_0x5bc3be(0x37d)+_0x5a4b1e),Object[_0x5bc3be(0x39f)](_0x156fba)[_0x5bc3be(0x33b)]>0x0&&console[_0x5bc3be(0x30d)](_0x5bc3be(0x2a0)+JSON[_0x5bc3be(0x22b)](_0x156fba)),_0x21e5e2&&console[_0x5bc3be(0x30d)](_0x5bc3be(0x2dd)+_0x21e5e2));const _0x38dad0=await withSpinner('Starting\x20workflow\x20run...',()=>_0x4a030c[_0x5bc3be(0x2e9)][_0x5bc3be(0x32f)](_0x5a4b1e,_0x156fba,{'sessionTime':_0x21e5e2}),{'verbose':_0x4f293d['verbose']}),_0x3d8120=_0x38dad0[_0x5bc3be(0x364)];console[_0x5bc3be(0x30d)](_0x5bc3be(0x28e)),console[_0x5bc3be(0x30d)](_0x5bc3be(0x21e)+_0x3d8120['id']),console[_0x5bc3be(0x30d)](_0x5bc3be(0x20d)+_0x3d8120['sessionId']),console[_0x5bc3be(0x30d)](_0x5bc3be(0x271)+_0x3d8120[_0x5bc3be(0x1f5)]?.[_0x5bc3be(0x2f3)]),console[_0x5bc3be(0x30d)](_0x5bc3be(0x37a)+_0x3d8120['workflow']?.[_0x5bc3be(0x2f3)]);if(_0x3d8120[_0x5bc3be(0x1f5)]?.['id']&&_0x3d8120[_0x5bc3be(0x2ca)]&&_0x3d8120['id']){const _0x2bc4c8=_0x4f293d['site'],_0x4ae436=getConsoleUrl(_0x2bc4c8,'/app/workflows/'+_0x3d8120['project']['id']+_0x5bc3be(0x2c2)+_0x3d8120[_0x5bc3be(0x2ca)]+_0x5bc3be(0x363)+_0x3d8120['id']);console[_0x5bc3be(0x30d)](_0x5bc3be(0x22c)+a54_0x238b4f[_0x5bc3be(0x228)](_0x4ae436));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x302);['description']=a54_0xb298fb(0x303);async[a54_0xb298fb(0x335)](_0x573e73){const _0x248d5a=a54_0xb298fb,{options:_0x481dcf,args:_0x2bbbd3,tdx:_0x15da8c}=_0x573e73,_0x13aff6=_0x2bbbd3[0x0],_0x5f3765=_0x2bbbd3[0x1]||'.';if(!_0x13aff6)return console[_0x248d5a(0x30d)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x248d5a(0x30d)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x50a67e=_0x481dcf[_0x248d5a(0x2c3)];_0x481dcf[_0x248d5a(0x31d)]&&(console['error'](_0x248d5a(0x24b)+_0x13aff6),console['error'](_0x248d5a(0x2a1)+_0x5f3765),_0x50a67e&&console[_0x248d5a(0x30d)]('Revision:\x20'+_0x50a67e));const _0x52a5c4=await withSpinner('Downloading\x20project\x20'+_0x13aff6+_0x248d5a(0x3a6),()=>_0x15da8c['workflow'][_0x248d5a(0x22e)](_0x13aff6,_0x5f3765,{'revision':_0x50a67e}),{'verbose':_0x481dcf['verbose']}),_0x486d95=_0x52a5c4['data'];return console[_0x248d5a(0x30d)](_0x248d5a(0x214)+_0x486d95[_0x248d5a(0x352)]),console['error']('\x20\x20Revision:\x20'+_0x486d95[_0x248d5a(0x2c3)]),console[_0x248d5a(0x30d)](_0x248d5a(0x38d)+_0x486d95[_0x248d5a(0x24f)]),console[_0x248d5a(0x30d)]('\x20\x20Location:\x20'+_0x5f3765+'/'+_0x486d95[_0x248d5a(0x352)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x3ad);[a54_0xb298fb(0x346)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a54_0xb298fb(0x335)](_0x31a874){const _0x4df6c9=a54_0xb298fb,{options:_0x22f07a,args:_0x3ca4ea,tdx:_0x272f35}=_0x31a874;let _0x19641b='.',_0x461237=_0x22f07a[_0x4df6c9(0x2f3)];if(_0x3ca4ea[0x0]){const {promises:_0x29fbd7}=await import('fs');try{const _0x81eade=await _0x29fbd7[_0x4df6c9(0x318)](_0x3ca4ea[0x0]);if(_0x81eade['isDirectory']())_0x19641b=_0x3ca4ea[0x0];else return console[_0x4df6c9(0x30d)](_0x4df6c9(0x239)+_0x3ca4ea[0x0]+_0x4df6c9(0x26e)),0x1;}catch{_0x461237=_0x3ca4ea[0x0],_0x19641b='.';}}const _0x16fcf9=_0x22f07a[_0x4df6c9(0x2c3)],_0x3562a1=_0x22f07a[_0x4df6c9(0x365)];_0x22f07a[_0x4df6c9(0x31d)]&&(console['error']('Project\x20directory:\x20'+_0x19641b),_0x461237&&console['error'](_0x4df6c9(0x24e)+_0x461237),_0x16fcf9&&console['error'](_0x4df6c9(0x32b)+_0x16fcf9),_0x3562a1&&console[_0x4df6c9(0x30d)](_0x4df6c9(0x295)));const _0x3cc37f=await withSpinner(_0x4df6c9(0x20c),()=>_0x272f35['workflow']['push'](_0x19641b,{'projectName':_0x461237,'revision':_0x16fcf9,'skipValidation':_0x3562a1}),{'verbose':_0x22f07a[_0x4df6c9(0x31d)]}),_0x52e1d9=_0x3cc37f[_0x4df6c9(0x364)];return console[_0x4df6c9(0x30d)](_0x4df6c9(0x2d4)+_0x52e1d9['projectName']),console[_0x4df6c9(0x30d)](_0x4df6c9(0x350)+_0x52e1d9['projectId']),console[_0x4df6c9(0x30d)](_0x4df6c9(0x204)+_0x52e1d9[_0x4df6c9(0x2c3)]),await this[_0x4df6c9(0x317)](_0x272f35,_0x52e1d9[_0x4df6c9(0x352)],_0x22f07a[_0x4df6c9(0x311)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a54_0xb298fb(0x31b);['description']=a54_0xb298fb(0x35d);async[a54_0xb298fb(0x335)](_0x1d76b3){const _0x3fc718=a54_0xb298fb,{options:_0x2d52f9,args:_0x3ef490,tdx:_0x3bd061}=_0x1d76b3,_0x4c213a=_0x3ef490[0x0],_0x346876=_0x3ef490[0x1];if(!_0x4c213a)return console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x301)](_0x3fc718(0x33f)),_0x3fc718(0x2ba)),console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x373)](_0x3fc718(0x34c))),0x1;const _0x7f728=_0x2d52f9[_0x3fc718(0x2c3)];_0x2d52f9[_0x3fc718(0x31d)]&&(console[_0x3fc718(0x30d)]('Project:\x20'+_0x4c213a),_0x346876&&console[_0x3fc718(0x30d)](_0x3fc718(0x254)+_0x346876),_0x7f728&&console[_0x3fc718(0x30d)](_0x3fc718(0x32b)+_0x7f728),_0x2d52f9['dryRun']&&console[_0x3fc718(0x30d)](_0x3fc718(0x3a3)));const _0x5d5504=await withSpinner(_0x3fc718(0x395)+_0x4c213a+_0x3fc718(0x3a6),()=>_0x3bd061[_0x3fc718(0x2e9)][_0x3fc718(0x259)](_0x4c213a,{'targetDir':_0x346876,'revision':_0x7f728}),{'verbose':_0x2d52f9['verbose']}),_0x399711=_0x5d5504['data'];_0x399711[_0x3fc718(0x2cb)]?console[_0x3fc718(0x30d)]('→\x20New\x20project:\x20'+_0x399711[_0x3fc718(0x352)]):console[_0x3fc718(0x30d)](_0x3fc718(0x380)+_0x399711['projectName']);console['error']('\x20\x20Revision:\x20'+_0x399711[_0x3fc718(0x2c3)]),console[_0x3fc718(0x30d)](_0x3fc718(0x22a)+(a54_0x2f24e3[_0x3fc718(0x361)](process['cwd'](),_0x399711['targetDir'])||'.')),console[_0x3fc718(0x30d)]('\x20\x20Changes:\x20'+a54_0x238b4f[_0x3fc718(0x23e)]('+'+_0x399711[_0x3fc718(0x2ed)][_0x3fc718(0x1ef)]+_0x3fc718(0x237))+',\x20'+(a54_0x238b4f[_0x3fc718(0x344)]('~'+_0x399711[_0x3fc718(0x2ed)][_0x3fc718(0x247)]+_0x3fc718(0x269))+',\x20')+(a54_0x238b4f[_0x3fc718(0x301)]('-'+_0x399711[_0x3fc718(0x2ed)][_0x3fc718(0x25f)]+_0x3fc718(0x35a))+',\x20')+(''+a54_0x238b4f['dim'](_0x399711[_0x3fc718(0x2ed)]['unchanged']+_0x3fc718(0x39c))));for(const _0x2d5ea6 of _0x399711[_0x3fc718(0x375)]){_0x2d5ea6['type']==='modified'&&_0x2d5ea6['diff']&&(console[_0x3fc718(0x30d)]('\x0a'+a54_0x238b4f[_0x3fc718(0x228)]('---\x20'+_0x2d5ea6[_0x3fc718(0x329)])),console[_0x3fc718(0x30d)](_0x2d5ea6[_0x3fc718(0x265)]));}if(!_0x399711[_0x3fc718(0x2da)])return saveSessionContext({'workflow_project':_0x399711['projectName']},_0x2d52f9[_0x3fc718(0x38b)]),console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x23e)](_0x3fc718(0x2a3))),console[_0x3fc718(0x30d)](a54_0x238b4f['dim'](_0x3fc718(0x253)+_0x399711['projectName'])),0x0;if(_0x2d52f9[_0x3fc718(0x2d5)])return console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x344)](_0x3fc718(0x31f))),0x0;if(!_0x2d52f9[_0x3fc718(0x30b)]){if(!isInteractive())return console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x301)]('\x0aError:'),_0x3fc718(0x2e2)),console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x373)](_0x3fc718(0x1f6))),0x1;const _0x478023=await confirmKey(_0x3fc718(0x20b));if(!_0x478023)return console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x344)]('Cancelled'),_0x3fc718(0x370)),0x1;}await withSpinner(_0x3fc718(0x2a5),()=>_0x3bd061[_0x3fc718(0x2e9)][_0x3fc718(0x229)](_0x399711,{'revision':_0x7f728}),{'verbose':_0x2d52f9['verbose']}),saveSessionContext({'workflow_project':_0x399711['projectName']},_0x2d52f9['session']),console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x23e)](_0x3fc718(0x1f2)));const _0x28fc26=a54_0x2f24e3[_0x3fc718(0x361)](process[_0x3fc718(0x28a)](),_0x399711[_0x3fc718(0x279)])||'.';return console[_0x3fc718(0x30d)](a54_0x238b4f['dim'](_0x3fc718(0x241)+_0x28fc26)),console[_0x3fc718(0x30d)](a54_0x238b4f[_0x3fc718(0x373)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x399711[_0x3fc718(0x352)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x252);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x2d7);async[a54_0xb298fb(0x335)](_0x286347){const _0x3f77aa=a54_0xb298fb,{options:_0x938a3f,args:_0x4e8a6f,tdx:_0x320684}=_0x286347,_0x3f6d5a=this[_0x3f77aa(0x398)](_0x4e8a6f,_0x938a3f),_0x6bcdbc=_0x938a3f[_0x3f77aa(0x2c3)],_0x22bea0=_0x938a3f[_0x3f77aa(0x365)];_0x938a3f[_0x3f77aa(0x31d)]&&(_0x3f6d5a&&console[_0x3f77aa(0x30d)](_0x3f77aa(0x390)+_0x3f6d5a),_0x6bcdbc&&console[_0x3f77aa(0x30d)]('Revision:\x20'+_0x6bcdbc),_0x938a3f['dryRun']&&console[_0x3f77aa(0x30d)]('Dry\x20run:\x20yes'),_0x22bea0&&console[_0x3f77aa(0x30d)]('Validation:\x20skipped'));let _0x5a0dfc;try{_0x5a0dfc=await withSpinner('Analyzing\x20changes...',()=>_0x320684[_0x3f77aa(0x2e9)][_0x3f77aa(0x3a7)]({'sourceDir':_0x3f6d5a,'revision':_0x6bcdbc,'skipValidation':_0x22bea0}),{'verbose':_0x938a3f[_0x3f77aa(0x31d)]});}catch(_0x5ac0e1){if(_0x5ac0e1 instanceof Error&&_0x5ac0e1[_0x3f77aa(0x26d)][_0x3f77aa(0x388)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x3f77aa(0x30d)](a54_0x238b4f[_0x3f77aa(0x301)]('Error:'),_0x3f77aa(0x339)),_0x938a3f[_0x3f77aa(0x216)]?console[_0x3f77aa(0x30d)](a54_0x238b4f['dim'](_0x3f77aa(0x399)+_0x938a3f[_0x3f77aa(0x216)]+_0x3f77aa(0x2f8)+_0x938a3f[_0x3f77aa(0x216)]+'\x27')):console[_0x3f77aa(0x30d)](a54_0x238b4f[_0x3f77aa(0x373)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x5ac0e1;}const _0x2bfa7f=_0x5a0dfc[_0x3f77aa(0x364)];console[_0x3f77aa(0x30d)](_0x3f77aa(0x212)+_0x2bfa7f['projectName']),console[_0x3f77aa(0x30d)](_0x3f77aa(0x34d)+_0x2bfa7f[_0x3f77aa(0x31e)]),console[_0x3f77aa(0x30d)]('\x20\x20Revision:\x20'+_0x2bfa7f['revision']),console[_0x3f77aa(0x30d)](_0x3f77aa(0x356)+a54_0x238b4f['green']('+'+_0x2bfa7f[_0x3f77aa(0x2ed)][_0x3f77aa(0x1ef)]+_0x3f77aa(0x237))+',\x20'+(a54_0x238b4f[_0x3f77aa(0x344)]('~'+_0x2bfa7f['summary']['modified']+_0x3f77aa(0x269))+',\x20')+(a54_0x238b4f['red']('-'+_0x2bfa7f[_0x3f77aa(0x2ed)][_0x3f77aa(0x25f)]+_0x3f77aa(0x35a))+',\x20')+(''+a54_0x238b4f[_0x3f77aa(0x373)](_0x2bfa7f[_0x3f77aa(0x2ed)][_0x3f77aa(0x251)]+_0x3f77aa(0x39c))));for(const _0x5046b5 of _0x2bfa7f[_0x3f77aa(0x375)]){_0x5046b5['type']===_0x3f77aa(0x247)&&_0x5046b5[_0x3f77aa(0x265)]&&(console[_0x3f77aa(0x30d)]('\x0a'+a54_0x238b4f['cyan'](_0x3f77aa(0x309)+_0x5046b5[_0x3f77aa(0x329)])),console[_0x3f77aa(0x30d)](_0x5046b5[_0x3f77aa(0x265)]));}if(!_0x2bfa7f['hasChanges'])return console[_0x3f77aa(0x30d)](a54_0x238b4f[_0x3f77aa(0x23e)](_0x3f77aa(0x29b))),await this['showWorkflowConsoleUrl'](_0x320684,_0x2bfa7f['projectName'],_0x938a3f[_0x3f77aa(0x311)]),0x0;if(_0x938a3f['dryRun'])return console[_0x3f77aa(0x30d)](a54_0x238b4f[_0x3f77aa(0x344)](_0x3f77aa(0x20e))),0x0;if(!_0x938a3f[_0x3f77aa(0x30b)]){if(!isInteractive())return console[_0x3f77aa(0x30d)](a54_0x238b4f[_0x3f77aa(0x301)](_0x3f77aa(0x343)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3f77aa(0x30d)](a54_0x238b4f['dim'](_0x3f77aa(0x1f6))),0x1;const _0x59c755=await confirmKey(_0x3f77aa(0x2b3));if(!_0x59c755)return console[_0x3f77aa(0x30d)](a54_0x238b4f[_0x3f77aa(0x344)](_0x3f77aa(0x30e)),_0x3f77aa(0x2b5)),0x1;}const _0x36de50=await withSpinner(_0x3f77aa(0x2bb),()=>_0x320684[_0x3f77aa(0x2e9)][_0x3f77aa(0x293)](_0x2bfa7f),{'verbose':_0x938a3f[_0x3f77aa(0x31d)]}),_0x3daee2=_0x36de50[_0x3f77aa(0x364)];return console['error'](a54_0x238b4f[_0x3f77aa(0x23e)]('✔\x20Push\x20complete')),console[_0x3f77aa(0x30d)](_0x3f77aa(0x350)+_0x3daee2[_0x3f77aa(0x2fa)]),console['error'](_0x3f77aa(0x204)+_0x3daee2[_0x3f77aa(0x2c3)]),await this[_0x3f77aa(0x317)](_0x320684,_0x3daee2['projectName'],_0x938a3f[_0x3f77aa(0x311)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']='workflow:clone';[a54_0xb298fb(0x346)]=a54_0xb298fb(0x208);async[a54_0xb298fb(0x335)](_0x358bbb){const _0x1729d2=a54_0xb298fb,{options:_0x1c648c,args:_0x50044b,tdx:_0x36a31e}=_0x358bbb,_0x3a2233=this['resolveProjectDir'](_0x50044b,_0x1c648c),_0x245c2a=_0x1c648c[_0x1729d2(0x2f3)],_0xbb93e6=_0x1c648c['revision'],_0x4b9e16=_0x1c648c[_0x1729d2(0x365)];if(!_0x3a2233)return console[_0x1729d2(0x30d)](a54_0x238b4f['red'](_0x1729d2(0x33f)),_0x1729d2(0x28c)),console[_0x1729d2(0x30d)](a54_0x238b4f[_0x1729d2(0x373)](_0x1729d2(0x2ec))),console['error'](a54_0x238b4f[_0x1729d2(0x373)](_0x1729d2(0x25a))),0x1;if(!_0x245c2a)return console[_0x1729d2(0x30d)](a54_0x238b4f[_0x1729d2(0x301)]('Error:'),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x1729d2(0x30d)](a54_0x238b4f['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x1c648c[_0x1729d2(0x31d)]&&(console['error'](_0x1729d2(0x390)+_0x3a2233),console[_0x1729d2(0x30d)](_0x1729d2(0x2ae)+_0x245c2a),_0xbb93e6&&console[_0x1729d2(0x30d)](_0x1729d2(0x32b)+_0xbb93e6),_0x1c648c[_0x1729d2(0x2d5)]&&console[_0x1729d2(0x30d)](_0x1729d2(0x3a3)),_0x4b9e16&&console[_0x1729d2(0x30d)]('Validation:\x20skipped'));const _0x6f6125=await withSpinner(_0x1729d2(0x243),()=>_0x36a31e['workflow'][_0x1729d2(0x357)](_0x3a2233,_0x245c2a,{'revision':_0xbb93e6,'skipValidation':_0x4b9e16}),{'verbose':_0x1c648c[_0x1729d2(0x31d)]}),_0x2daf59=_0x6f6125['data'];console['error'](_0x1729d2(0x29d)+_0x2daf59[_0x1729d2(0x31e)]);_0x2daf59[_0x1729d2(0x2aa)]&&console['error'](_0x1729d2(0x240)+_0x2daf59[_0x1729d2(0x2aa)]);console['error'](_0x1729d2(0x2ae)+_0x2daf59['newProjectName']),console[_0x1729d2(0x30d)](_0x1729d2(0x32b)+_0x2daf59[_0x1729d2(0x2c3)]),console[_0x1729d2(0x30d)](_0x1729d2(0x3ae)+_0x2daf59[_0x1729d2(0x323)]);_0x2daf59[_0x1729d2(0x2c1)]&&(console['error'](a54_0x238b4f[_0x1729d2(0x344)]('\x0a⚠\x20Project\x20\x22'+_0x2daf59[_0x1729d2(0x2ac)]+_0x1729d2(0x22f)+_0x2daf59[_0x1729d2(0x2fe)]+')')),console['error'](a54_0x238b4f['yellow'](_0x1729d2(0x250))));if(_0x1c648c[_0x1729d2(0x2d5)])return console[_0x1729d2(0x30d)](a54_0x238b4f[_0x1729d2(0x344)](_0x1729d2(0x327))),0x0;if(!_0x1c648c[_0x1729d2(0x30b)]){if(!isInteractive())return console[_0x1729d2(0x30d)](a54_0x238b4f[_0x1729d2(0x301)]('\x0aError:'),_0x1729d2(0x2e2)),console[_0x1729d2(0x30d)](a54_0x238b4f[_0x1729d2(0x373)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1f4c6c=_0x2daf59['sourceProjectName']||a54_0x2f24e3[_0x1729d2(0x2db)](_0x3a2233),_0x675291=_0x2daf59[_0x1729d2(0x2c1)]?_0x1729d2(0x371)+_0x245c2a+_0x1729d2(0x2e0):_0x1729d2(0x215)+_0x1f4c6c+_0x1729d2(0x1fe)+_0x245c2a+'\x22?',_0x5c0c33=await confirmKey(_0x675291);if(!_0x5c0c33)return console[_0x1729d2(0x30d)](a54_0x238b4f[_0x1729d2(0x344)](_0x1729d2(0x30e))),0x1;}const _0x514f34=await withSpinner(_0x2daf59['targetExists']?_0x1729d2(0x3a1)+_0x245c2a+_0x1729d2(0x3a6):'Cloning\x20to\x20'+_0x245c2a+'...',()=>_0x36a31e['workflow'][_0x1729d2(0x377)](_0x2daf59),{'verbose':_0x1c648c['verbose']}),_0x46d6fb=_0x514f34[_0x1729d2(0x364)];return console[_0x1729d2(0x30d)](a54_0x238b4f[_0x1729d2(0x23e)](_0x2daf59[_0x1729d2(0x2c1)]?_0x1729d2(0x387):_0x1729d2(0x1f1))),console[_0x1729d2(0x30d)](_0x1729d2(0x271)+_0x46d6fb[_0x1729d2(0x2ac)]),console[_0x1729d2(0x30d)](_0x1729d2(0x350)+_0x46d6fb[_0x1729d2(0x232)]),console[_0x1729d2(0x30d)]('\x20\x20Revision:\x20'+_0x46d6fb[_0x1729d2(0x2c3)]),await this[_0x1729d2(0x317)](_0x36a31e,_0x46d6fb[_0x1729d2(0x2ac)],_0x1c648c[_0x1729d2(0x311)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a54_0xb298fb(0x2dc);[a54_0xb298fb(0x346)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a54_0xb298fb(0x335)](_0x39c67c){const _0x4c4e76=a54_0xb298fb,{options:_0x3e1369,args:_0x28a631,tdx:_0x1840df}=_0x39c67c,_0x114967=_0x28a631[0x0];if(!_0x114967)return console['error'](_0x4c4e76(0x23c)),console['error'](_0x4c4e76(0x33a)),0x1;_0x3e1369['verbose']&&console[_0x4c4e76(0x30d)](_0x4c4e76(0x24b)+_0x114967);if(!_0x3e1369[_0x4c4e76(0x30b)]){if(!isInteractive())return console[_0x4c4e76(0x30d)](a54_0x238b4f[_0x4c4e76(0x301)](_0x4c4e76(0x343)),_0x4c4e76(0x2e2)),console[_0x4c4e76(0x30d)](a54_0x238b4f[_0x4c4e76(0x373)](_0x4c4e76(0x1f6))),0x1;const _0x472c4d=await confirmKey(_0x4c4e76(0x1fb)+_0x114967+_0x4c4e76(0x314));if(!_0x472c4d)return console['error'](a54_0x238b4f['yellow'](_0x4c4e76(0x30e))),0x1;}const _0x475f2f=await withSpinner(_0x4c4e76(0x305)+_0x114967+_0x4c4e76(0x3a6),()=>_0x1840df[_0x4c4e76(0x2e9)][_0x4c4e76(0x25e)](_0x114967),{'verbose':_0x3e1369['verbose']}),_0x518fb0=_0x475f2f[_0x4c4e76(0x364)];return console['error'](_0x4c4e76(0x3b2)+_0x518fb0[_0x4c4e76(0x352)]),console[_0x4c4e76(0x30d)](_0x4c4e76(0x350)+_0x518fb0[_0x4c4e76(0x2fa)]),0x0;}}export function parseKeyValue(_0x5ef584){const _0x44e990=a54_0xb298fb,_0xd75e0f=_0x5ef584[_0x44e990(0x315)]('=');if(_0xd75e0f===-0x1)throw new Error(_0x44e990(0x36a)+_0x5ef584+_0x44e990(0x369));const _0x1075c7=_0x5ef584[_0x44e990(0x291)](0x0,_0xd75e0f),_0x28b96b=_0x5ef584[_0x44e990(0x291)](_0xd75e0f+0x1);if(!_0x1075c7)throw new Error(_0x44e990(0x2ad));return{'key':_0x1075c7,'value':_0x28b96b};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x2d0);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x2c9);async[a54_0xb298fb(0x335)](_0xf38b5b){const _0x49a442=a54_0xb298fb,{options:_0x49e29c,args:_0x58fa38,tdx:_0x51b1eb}=_0xf38b5b,_0x4c372c=this[_0x49a442(0x3b5)](_0x58fa38,_0x49e29c);if(!_0x4c372c)return 0x1;_0x49e29c[_0x49a442(0x31d)]&&console[_0x49a442(0x30d)](_0x49a442(0x24b)+_0x4c372c);const _0x2b2c4f=await withSpinner(_0x49a442(0x383),()=>_0x51b1eb['workflow'][_0x49a442(0x2af)](_0x4c372c),{'verbose':_0x49e29c['verbose']}),{secrets:_0x28e924}=_0x2b2c4f['data'];return console[_0x49a442(0x30d)](_0x49a442(0x275)+_0x28e924[_0x49a442(0x33b)]+_0x49a442(0x33d)+(_0x28e924['length']!==0x1?'s':'')),await handleSDKOutput(_0x28e924,_0x49e29c),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x2cc);['description']=a54_0xb298fb(0x2bc);async[a54_0xb298fb(0x335)](_0x508075){const _0x1a921d=a54_0xb298fb,{options:_0x4aef2a,args:_0xdef4ce,tdx:_0x4d52b6}=_0x508075;let _0x44a5b8,_0x5f41cd;if(_0xdef4ce[_0x1a921d(0x33b)]>=0x1&&!_0xdef4ce[0x0][_0x1a921d(0x388)]('='))_0x44a5b8=_0xdef4ce[0x0],_0x5f41cd=_0xdef4ce[_0x1a921d(0x258)](0x1);else{if(_0xdef4ce[_0x1a921d(0x33b)]>=0x1&&_0x4aef2a[_0x1a921d(0x216)])_0x44a5b8=_0x4aef2a[_0x1a921d(0x216)],_0x5f41cd=_0xdef4ce;else return _0xdef4ce[_0x1a921d(0x33b)]>=0x1?(console[_0x1a921d(0x30d)](_0x1a921d(0x39a)),console[_0x1a921d(0x30d)](_0x1a921d(0x2ab)),0x1):(console[_0x1a921d(0x30d)](_0x1a921d(0x389)),console[_0x1a921d(0x30d)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x5f41cd['length']===0x0)return console[_0x1a921d(0x30d)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x1a921d(0x30d)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x49ccdb={};try{for(const _0x3f9fc1 of _0x5f41cd){const {key:_0x436bd7,value:_0x3f6ddd}=parseKeyValue(_0x3f9fc1);_0x49ccdb[_0x436bd7]=_0x3f6ddd;}}catch(_0x2ffad3){return _0x2ffad3 instanceof Error&&console[_0x1a921d(0x30d)](a54_0x238b4f[_0x1a921d(0x301)](_0x1a921d(0x33f)),_0x2ffad3[_0x1a921d(0x26d)]),0x1;}const _0x3b8744=Object[_0x1a921d(0x39f)](_0x49ccdb);_0x4aef2a[_0x1a921d(0x31d)]&&(console[_0x1a921d(0x30d)](_0x1a921d(0x24b)+_0x44a5b8),console['error'](_0x1a921d(0x38e)+_0x3b8744['join'](',\x20')));const _0x1968c7=await withSpinner(_0x3b8744[_0x1a921d(0x33b)]===0x1?_0x1a921d(0x385):_0x1a921d(0x225)+_0x3b8744[_0x1a921d(0x33b)]+'\x20secrets...',()=>_0x4d52b6[_0x1a921d(0x2e9)]['setSecrets'](_0x44a5b8,_0x49ccdb),{'verbose':_0x4aef2a[_0x1a921d(0x31d)]}),_0x151291=_0x1968c7['data'];return console[_0x1a921d(0x30d)](_0x3b8744[_0x1a921d(0x33b)]===0x1?_0x1a921d(0x2fc)+_0x151291[_0x1a921d(0x39f)][0x0]+_0x1a921d(0x1ec)+_0x151291['projectName']+'\x27':'✔\x20'+_0x151291[_0x1a921d(0x39f)]['length']+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x151291['projectName']+'\x27'),(_0x4aef2a[_0x1a921d(0x366)]||_0x4aef2a[_0x1a921d(0x35b)])&&await handleSingleObjectOutput(_0x151291,_0x4aef2a),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x249);[a54_0xb298fb(0x346)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a54_0xb298fb(0x335)](_0x43966b){const _0x57f1f5=a54_0xb298fb,{options:_0x46d58f,args:_0x1f9fe4,tdx:_0x4d3043}=_0x43966b;let _0x377345,_0x2e4194;if(_0x1f9fe4[_0x57f1f5(0x33b)]>=0x2)_0x377345=_0x1f9fe4[0x0],_0x2e4194=_0x1f9fe4[0x1];else{if(_0x1f9fe4[_0x57f1f5(0x33b)]===0x1&&_0x46d58f[_0x57f1f5(0x216)])_0x377345=_0x46d58f[_0x57f1f5(0x216)],_0x2e4194=_0x1f9fe4[0x0];else return _0x1f9fe4[_0x57f1f5(0x33b)]===0x1?(console[_0x57f1f5(0x30d)](_0x57f1f5(0x39a)),console[_0x57f1f5(0x30d)](_0x57f1f5(0x2ab)),0x1):(console[_0x57f1f5(0x30d)](_0x57f1f5(0x206)),console['error'](_0x57f1f5(0x236)),0x1);}_0x46d58f[_0x57f1f5(0x31d)]&&(console[_0x57f1f5(0x30d)](_0x57f1f5(0x24b)+_0x377345),console[_0x57f1f5(0x30d)](_0x57f1f5(0x290)+_0x2e4194));if(!_0x46d58f['yes']){if(!isInteractive())return console[_0x57f1f5(0x30d)](a54_0x238b4f[_0x57f1f5(0x301)](_0x57f1f5(0x343)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x57f1f5(0x30d)](a54_0x238b4f[_0x57f1f5(0x373)](_0x57f1f5(0x1f6))),0x1;const _0x4d6c28=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x2e4194+_0x57f1f5(0x24c)+_0x377345+'\x27?');if(!_0x4d6c28)return console[_0x57f1f5(0x30d)](a54_0x238b4f[_0x57f1f5(0x344)](_0x57f1f5(0x30e))),0x1;}const _0x587d8a=await withSpinner(_0x57f1f5(0x2d6),()=>_0x4d3043[_0x57f1f5(0x2e9)][_0x57f1f5(0x276)](_0x377345,_0x2e4194),{'verbose':_0x46d58f[_0x57f1f5(0x31d)]}),_0xcbada6=_0x587d8a[_0x57f1f5(0x364)];return console[_0x57f1f5(0x30d)](_0x57f1f5(0x2fc)+_0xcbada6[_0x57f1f5(0x382)]+_0x57f1f5(0x322)+_0xcbada6[_0x57f1f5(0x352)]+'\x27'),(_0x46d58f['json']||_0x46d58f[_0x57f1f5(0x35b)])&&await handleSingleObjectOutput(_0xcbada6,_0x46d58f),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(_0x2d0c0b){const _0x2fde85=a54_0xb298fb,_0x5aef95=Math[_0x2fde85(0x332)](_0x2d0c0b/0x3e8),_0x2d3487=Math['floor'](_0x5aef95/0x3c),_0xf563fc=Math[_0x2fde85(0x332)](_0x2d3487/0x3c),_0x180736=Math[_0x2fde85(0x332)](_0xf563fc/0x18);if(_0x180736>0x0){const _0x4c9abf=_0xf563fc%0x18;return _0x4c9abf>0x0?_0x180736+'d\x20'+_0x4c9abf+'h':_0x180736+'d';}else{if(_0xf563fc>0x0){const _0x558cb8=_0x2d3487%0x3c;return _0x558cb8>0x0?_0xf563fc+'h\x20'+_0x558cb8+'m':_0xf563fc+'h';}else{if(_0x2d3487>0x0){const _0x4290a6=_0x5aef95%0x3c;return _0x4290a6>0x0?_0x2d3487+'m\x20'+_0x4290a6+'s':_0x2d3487+'m';}else return _0x5aef95+'s';}}}function formatTimestamp(_0x3a67e7,_0x2c1154){const _0x5c0fdf=a54_0xb298fb,_0x3c8989=new Date(_0x3a67e7),_0x392eef=String(_0x3c8989['getHours']())[_0x5c0fdf(0x325)](0x2,'0'),_0x4090fd=String(_0x3c8989[_0x5c0fdf(0x231)]())[_0x5c0fdf(0x325)](0x2,'0'),_0x2d5470=_0x392eef+':'+_0x4090fd,_0xd00a43=_0x3c8989[_0x5c0fdf(0x260)]()===_0x2c1154[_0x5c0fdf(0x260)]()&&_0x3c8989['getMonth']()===_0x2c1154[_0x5c0fdf(0x2e3)]()&&_0x3c8989[_0x5c0fdf(0x384)]()===_0x2c1154[_0x5c0fdf(0x384)]();if(_0xd00a43)return _0x2d5470;else{const _0x212556=String(_0x3c8989[_0x5c0fdf(0x2e3)]()+0x1)['padStart'](0x2,'0'),_0x1ad5f3=String(_0x3c8989['getDate']())[_0x5c0fdf(0x325)](0x2,'0');return _0x212556+'-'+_0x1ad5f3+'\x20'+_0x2d5470;}}function formatDate(_0x250375){const _0x1cf1d2=a54_0xb298fb,_0x2abb65=_0x250375[_0x1cf1d2(0x260)](),_0x5d8e4c=String(_0x250375[_0x1cf1d2(0x2e3)]()+0x1)[_0x1cf1d2(0x325)](0x2,'0'),_0x2e81cf=String(_0x250375[_0x1cf1d2(0x384)]())[_0x1cf1d2(0x325)](0x2,'0');return _0x2abb65+'-'+_0x5d8e4c+'-'+_0x2e81cf;}function getTaskStateIcon(_0x2f1d83){const _0x5033d0={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5033d0[_0x2f1d83]||'⚪';}function getBarChar(_0x34d43a){const _0x5918f3=a54_0xb298fb;return _0x34d43a===_0x5918f3(0x30d)||_0x34d43a==='group_error'?'×':'─';}function getBarColor(_0x47dd3b){const _0x41b100=a54_0xb298fb,_0x5d9c72={'success':a54_0x238b4f['green'],'error':a54_0x238b4f[_0x41b100(0x301)],'group_error':a54_0x238b4f['red'],'running':a54_0x238b4f[_0x41b100(0x211)],'blocked':a54_0x238b4f['yellow'],'planned':a54_0x238b4f['dim'],'canceling':a54_0x238b4f['yellow']};return _0x5d9c72[_0x47dd3b]||a54_0x238b4f[_0x41b100(0x2df)];}function parseTaskName(_0x1c53e3){const _0x1ee984=a54_0xb298fb;let _0x3e14f2=_0x1c53e3[_0x1ee984(0x2c5)](/^\++/,'');const _0x3de49a=_0x3e14f2[_0x1ee984(0x2ee)]('+'),_0x4bffe2=_0x3de49a[_0x1ee984(0x33b)]>0x1?_0x3de49a[_0x1ee984(0x33b)]-0x2:0x0,_0x1e8811=_0x3de49a[_0x3de49a[_0x1ee984(0x33b)]-0x1]||_0x3e14f2;return{'level':_0x4bffe2,'name':'+'+_0x1e8811};}function a54_0x2110(_0x183309,_0x381d2d){_0x183309=_0x183309-0x1e7;const _0x56b492=a54_0x56b4();let _0x21105d=_0x56b492[_0x183309];return _0x21105d;}function truncateTaskName(_0x1d2752,_0xc5afc9){const _0x2152e6=a54_0xb298fb,_0x10eded=stringWidth(_0x1d2752);if(_0x10eded<=_0xc5afc9)return _0x1d2752;let _0xe3b053=_0x1d2752;while(stringWidth(_0xe3b053+'…')>_0xc5afc9&&_0xe3b053[_0x2152e6(0x33b)]>0x0){_0xe3b053=_0xe3b053['slice'](0x0,-0x1);}return _0xe3b053+'…';}function calculateTimeScale(_0x58478b,_0x5d5e6d){const _0x43b520=a54_0xb298fb;return{'startTime':_0x58478b['start'],'endTime':_0x58478b[_0x43b520(0x342)],'durationMs':_0x58478b[_0x43b520(0x1ff)],'msPerChar':_0x58478b[_0x43b520(0x1ff)]/_0x5d5e6d};}function timeToPosition(_0x1659dc,_0x206dce,_0x31d1c8){const _0x22adfe=a54_0xb298fb,_0x17ca20=_0x1659dc-_0x206dce['startTime'],_0x40f771=Math[_0x22adfe(0x332)](_0x17ca20/_0x206dce[_0x22adfe(0x268)]);return Math[_0x22adfe(0x23d)](0x0,Math[_0x22adfe(0x27d)](_0x40f771,_0x31d1c8));}function renderTimeAxis(_0x1242a9,_0x4f7461){const _0x372fd3=a54_0xb298fb,_0x5c30c7=Math[_0x372fd3(0x27d)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x372fd3(0x23d)](TIMELINE_CONFIG[_0x372fd3(0x2e7)],Math[_0x372fd3(0x332)](_0x4f7461/TIMELINE_CONFIG[_0x372fd3(0x316)]))),_0x213c6a=_0x1242a9[_0x372fd3(0x393)]/(_0x5c30c7-0x1),_0x3ca231=new Date(_0x1242a9[_0x372fd3(0x223)]),_0x11e5e7=[];for(let _0x189517=0x0;_0x189517<_0x5c30c7;_0x189517++){const _0x53dc80=_0x1242a9[_0x372fd3(0x223)]+_0x189517*_0x213c6a,_0x125cb0=timeToPosition(_0x53dc80,_0x1242a9,_0x4f7461),_0x453d1e=formatTimestamp(_0x53dc80,_0x3ca231);_0x11e5e7[_0x372fd3(0x2c7)]({'pos':_0x125cb0,'text':_0x453d1e});}const _0x348880=new Array(_0x4f7461)[_0x372fd3(0x286)]('\x20');let _0x273804=-0x1;for(const {pos:_0x52530c,text:_0x24728b}of _0x11e5e7){let _0x428da9=Math['max'](0x0,_0x52530c-Math[_0x372fd3(0x332)](_0x24728b['length']/0x2));_0x428da9<=_0x273804+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x428da9=_0x273804+TIMELINE_CONFIG[_0x372fd3(0x1f8)]+0x1);_0x428da9+_0x24728b[_0x372fd3(0x33b)]>_0x4f7461&&(_0x428da9=_0x4f7461-_0x24728b[_0x372fd3(0x33b)]);if(_0x428da9>=0x0&&_0x428da9+_0x24728b[_0x372fd3(0x33b)]<=_0x4f7461&&_0x428da9>_0x273804){for(let _0x3cd5f7=0x0;_0x3cd5f7<_0x24728b[_0x372fd3(0x33b)];_0x3cd5f7++){_0x348880[_0x428da9+_0x3cd5f7]=_0x24728b[_0x3cd5f7];}_0x273804=_0x428da9+_0x24728b[_0x372fd3(0x33b)]-0x1;}}return _0x348880['join']('');}function renderTaskRow(_0x208867,_0x48e5da,_0x19e4b5,_0x4094f3){const _0x2d1c12=a54_0xb298fb,{level:_0x37e246,name:_0x517847}=parseTaskName(_0x208867[_0x2d1c12(0x2f3)]),_0x4c1563='\x20'[_0x2d1c12(0x21a)](_0x37e246),_0x270980=_0x208867['window']?'('+formatElapsed(_0x208867[_0x2d1c12(0x36d)][_0x2d1c12(0x1ff)])+')':'',_0x59fa42=stringWidth(_0x270980),_0x4d02f6=_0x37e246*0x1,_0xc4766f=_0x4094f3-_0x4d02f6-_0x59fa42-0x1,_0x3cac56=truncateTaskName(_0x517847,_0xc4766f),_0x317fe2=_0x4c1563+_0x3cac56,_0x4cb279=stringWidth(_0x317fe2),_0x1d2965=_0x4094f3-_0x4cb279-_0x59fa42,_0x32584b=_0x317fe2+'\x20'[_0x2d1c12(0x21a)](Math['max'](0x1,_0x1d2965))+a54_0x238b4f[_0x2d1c12(0x373)](_0x270980),_0x42fadb=getTaskStateIcon(_0x208867[_0x2d1c12(0x39d)]),_0x22761b=new Array(_0x19e4b5)['fill']('\x20');if(_0x208867[_0x2d1c12(0x36d)]){const _0x46baa9=timeToPosition(_0x208867[_0x2d1c12(0x36d)]['start'],_0x48e5da,_0x19e4b5),_0x51cdd3=timeToPosition(_0x208867['window']['end'],_0x48e5da,_0x19e4b5),_0x30c0fc=getBarChar(_0x208867[_0x2d1c12(0x39d)]),_0x137628=Math[_0x2d1c12(0x23d)](_0x46baa9+0x1,_0x51cdd3);for(let _0x415152=_0x46baa9;_0x415152<Math[_0x2d1c12(0x27d)](_0x137628,_0x19e4b5);_0x415152++){_0x22761b[_0x415152]=_0x30c0fc;}}const _0x10c678=getBarColor(_0x208867['state']),_0x10e58e=_0x22761b['map'](_0x9a971=>_0x9a971==='\x20'?'\x20':_0x10c678(_0x9a971))['join']('');return _0x42fadb+'\x20'+_0x32584b+'│'+_0x10e58e+'│';}function calculateStats(_0xda9577){const _0x266f7d=a54_0xb298fb,_0x5b56c3={'total':_0xda9577[_0x266f7d(0x33b)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x29ef17 of _0xda9577){if(_0x29ef17[_0x266f7d(0x39d)]===_0x266f7d(0x2d2))_0x5b56c3[_0x266f7d(0x2d2)]++;else{if(_0x29ef17['state']===_0x266f7d(0x30d)||_0x29ef17[_0x266f7d(0x39d)]===_0x266f7d(0x324))_0x5b56c3[_0x266f7d(0x30d)]++;else _0x29ef17[_0x266f7d(0x39d)]===_0x266f7d(0x20a)?_0x5b56c3[_0x266f7d(0x20a)]++:_0x5b56c3[_0x266f7d(0x2d8)]++;}}return _0x5b56c3;}function formatStats(_0xa8d040){const _0x1db2e8=a54_0xb298fb;return[_0x1db2e8(0x273)+_0xa8d040[_0x1db2e8(0x2b1)],'✅\x20'+_0xa8d040[_0x1db2e8(0x2d2)],'❌\x20'+_0xa8d040[_0x1db2e8(0x30d)],'🔄\x20'+_0xa8d040['running'],'⏳\x20'+_0xa8d040[_0x1db2e8(0x2d8)]][_0x1db2e8(0x29a)]('\x20\x20');}function a54_0x56b4(){const _0x285fd5=['✔\x20Downloaded\x20','\x0aClone\x20\x22','workflowProject','createdAt','disableSchedule','No\x20attempts\x20found\x20for:\x20','repeat','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Status:\x20','\x20(system)','\x20\x20Attempt\x20ID:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','workflow:sessions','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','\x20-\x20','startTime','List\x20workflow\x20schedules','Setting\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','finishedAt','cyan','applyPullProject','\x20\x20Target:\x20','stringify','\x20\x20Console:\x20','\x20task','download','\x22\x20already\x20exists\x20(ID:\x20','sessionTime','getMinutes','newProjectId','renderTimeline','done','\x20tasks','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20new','includeSubtasks','Error:\x20','\x20\x20New\x20attempt\x20ID:\x20','\x20schedule','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','max','green','Select\x20a\x20task\x20to\x20view\x20logs:','Source\x20project:\x20','\x20\x20Location:\x20','Disable\x20a\x20workflow\x20schedule','Analyzing\x20project...','\x1b[1A\x1b[2K','listSchedules','workflow:schedule:enable','modified','GUTTER','workflow:secrets:delete','sessions','Project:\x20','\x27\x20from\x20project\x20\x27','Error:\x20Attempt\x20ID\x20is\x20required','Project\x20name:\x20','filesExtracted','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','unchanged','workflow:push','\x20\x20Session\x20context\x20set\x20to:\x20','Target\x20directory:\x20','taskName','workflow:projects','Killing\x20attempt...','slice','pullProject','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','6EMvRYI','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Show\x20logs\x20for\x20a\x20workflow\x20attempt','delete','deleted','getFullYear','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Auto-selected\x20latest\x20session:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','pollTimeline','diff','lastAttempt','workflows','msPerChar','\x20modified','TASK_NAME_WIDTH','1148145sUhbhl','planned','message','\x20is\x20not\x20a\x20directory','retryAttemptName','sort','\x20\x20Project:\x20','autocomplete','Total:\x20','964576UwhDpR','✔\x20Found\x20','deleteSecret','\x20(use\x20--limit\x20to\x20show\x20more)','rows','targetDir','value','workflow:retry','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','min','\x20attempt','workflow:tasks','renderSessionsTimeline','filter','workflow:timeline','✔\x20Workflow\x20project\x20context\x20cleared.','Filter:\x20project=','disabledAt','fill','Enabling\x20schedule\x20#','index','fullName','cwd','MAX_TIMELINE_WIDTH','Source\x20directory\x20is\x20required','session:','✔\x20Workflow\x20run\x20started','Downloading\x20logs...','Key:\x20','substring','output','executePushProject','Resolving\x20project\x20\x27','Validation:\x20skipped','stdout','revision:\x20','map','\x20enabled\x20(','join','\x0a✔\x20No\x20changes\x20to\x20push','No\x20sessions\x20with\x20timing\x20information','Source:\x20','Latest\x20session\x20has\x20no\x20attempt','select','Parameters:\x20','Output\x20directory:\x20','isArray','\x0a✔\x20Already\x20up\x20to\x20date','Including\x20subtasks:\x20yes','Writing\x20files...','2558200qsiZWQ','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','Fetching\x20log\x20files...','tasks','sourceProjectName','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','newProjectName','Key\x20cannot\x20be\x20empty','New\x20project\x20name:\x20','listSecrets','Task\x20name:\x20','total','fileSize','\x0aPush\x20these\x20changes?','MIN_TIMELINE_WIDTH','-\x20nothing\x20pushed','format','attemptId','resumeFrom','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Project\x20name\x20is\x20required','Pushing\x20project...','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','No\x20workflows\x20found\x20in\x20project:\x20','No\x20sessions\x20found\x20in\x20project:\x20','fromTask','Project\x20filter:\x20','targetExists','/sessions/','revision','values','replace','workflow:kill','push','Listing\x20workflow\x20projects...','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','sessionId','isNewProject','workflow:secrets:set','buildTimelineData','workflow:use','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','workflow:secrets:list','toLocaleString','success','ICON_WIDTH','✔\x20Pushed\x20','dryRun','Deleting\x20secret...','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','pending','splice','hasChanges','basename','workflow:delete','Session\x20time:\x20','Target:\x20','white','\x22\x20with\x20new\x20revision?','258PWskTI','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','getMonth','metadata','retrySession','resolveProject','MIN_LABEL_COUNT','title','workflow','workflow:run','context','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','summary','split','start','ICON_SPACING','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Params:\x20','name','toLowerCase','Loading\x20session...','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20\x20tdx\x20wf\x20use\x20<project>','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','No\x20sessions\x20found\x20for:\x20','projectId','utf-8','✔\x20Secret\x20\x27','find','existingProjectId','trimEnd','📋\x20','red','workflow:download','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Retrying\x20attempt...','Deleting\x20project\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Getting\x20attempt\x20tasks...','includeRetried','---\x20','startsWith','yes','params','error','Cancelled','📅\x20#','session_id','site','POLL_INTERVAL_MS','Session\x20','\x22?\x20This\x20cannot\x20be\x20undone.','indexOf','LABEL_WIDTH_DIVISOR','showWorkflowConsoleUrl','stat','Listing\x20workflow\x20attempts...','Expected\x20format:\x20--param\x20key=value','workflow:pull','parseProjectWorkflowPattern','verbose','sourceDir','\x0aDry\x20run\x20-\x20no\x20files\x20written','No\x20log\x20content\x20found','status','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','fileCount','group_error','padStart','columns','\x0aDry\x20run\x20-\x20no\x20project\x20created','attempt','path','List\x20workflows','Revision:\x20','\x20from\x20session\x20','No\x20workflow\x20projects\x20found','Force:\x20yes','run','No\x20workflow\x20sessions\x20found','task','floor','Attempt\x20ID:\x20','List\x20workflow\x20attempts','execute','startedAt','localeCompare','⚠\x20Showing\x20first\x20','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Usage:\x20workflow:delete\x20<project-name-or-id>','length','Attempt:\x20','\x20secret','Pattern:\x20','Error:','table','icon','end','\x0aError:','yellow','14574699YMBCro','description','✔\x20Schedule\x20#','displayLine','retryAttempt','Start\x20a\x20workflow\x20run','param','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x20\x20Source:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Listing\x20workflow\x20sessions...','\x20\x20Project\x20ID:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','projectName','unknown','Select\x20a\x20workflow\x20to\x20run','\x20project','\x20\x20Changes:\x20','prepareCloneProject','round','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x20deleted','jsonl','List\x20all\x20workflow\x20projects','Pull\x20workflow\x20project\x20to\x20local\x20folder','workflowName','some','log','relative','nextRunTime','/attempt/','data','skipValidation','json','\x0aPolling...\x20(','attempts','.\x20Expected\x20format:\x20KEY=VALUE','Invalid\x20format:\x20','workflow:logs','navigateSessionsInteractive','window','Listing\x20schedules...','90572UiRpfD','-\x20no\x20files\x20written','\x0aUpdate\x20existing\x20project\x20\x22','renderSingleTimeline','dim','readFile','changes','Schedule\x20ID\x20is\x20required','executeCloneProject','get','cancelRequested','\x20\x20Workflow:\x20','MAX_TASKS_DISPLAY','✔\x20Retry\x20started','Workflow:\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','match','→\x20Project:\x20','workflow:attempts','key','Listing\x20secrets...','getDate','Setting\x20secret...','Show\x20specific\x20attempt\x20details','✔\x20Project\x20updated','includes','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','projects','session','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','\x20\x20Files\x20extracted:\x20','Secrets\x20to\x20set:\x20','(unknown)','Source\x20directory:\x20','\x0a✔\x20Attempt\x20complete','Retrying\x20session...','durationMs','💡\x20Tip:\x20Use\x20','Pulling\x20project\x20','Warning:','Listing\x20workflows...','resolveProjectDir','Tip:\x20cd\x20to\x20workflows/','Error:\x20Project\x20name\x20is\x20required','now','\x20unchanged','state','all','keys','updatedAt','Updating\x20','No\x20matching\x20sessions\x20found','Dry\x20run:\x20yes','getTime','Disabling\x20schedule\x20#','...','preparePushProject','Filter:\x20','logFiles','75698VqquqR','limit','fs/promises','workflow:upload','Files\x20to\x20upload:\x20','generateSessionTimelineRows','No\x20sessions\x20found','isTTY','✔\x20Deleted\x20project\x20','from','workflow:workflows','requireProject','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Session\x20not\x20found:\x20','parse','resolveProjectId','\x20session','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','✔\x20Workflow\x20project\x20set\x20to:\x20',',\x20Workflow:\x20','new','write','✔\x20Clone\x20complete','✔\x20Pull\x20complete','Kill\x20a\x20running\x20attempt','Reason:\x20','project','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','MAX_POLL_ITERATIONS','LABEL_MIN_SPACING','attempt:','resolve','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Show\x20tasks\x20for\x20an\x20attempt','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','\x22\x20to\x20new\x20project\x20\x22','duration','follow','No\x20attempts\x20found','\x20(disabled)','canceling','\x20\x20Revision:\x20','(use\x20--limit\x20to\x20see\x20more)','Error:\x20Secret\x20key\x20is\x20required','force','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','list','running','\x0aApply\x20these\x20changes?','Pushing\x20workflow\x20project...','\x20\x20Session\x20ID:\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x20sessions\x20','579378pwArzP','blue','✔\x20Project:\x20','\x20disabled\x20('];a54_0x56b4=function(){return _0x285fd5;};return a54_0x56b4();}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a54_0xb298fb(0x282);[a54_0xb298fb(0x346)]=a54_0xb298fb(0x2f1);async['execute'](_0x3453fa){const _0x127f6d=a54_0xb298fb,{options:_0x1e6a56,args:_0x50ff82,tdx:_0x5643f0}=_0x3453fa;let _0x40114e,_0x35b3f5,_0x523738=![];if(_0x50ff82[0x0]){if(_0x50ff82[0x0][_0x127f6d(0x388)]('.')){const _0x459e1e=this[_0x127f6d(0x31c)](_0x50ff82,_0x1e6a56);if(!_0x459e1e)return 0x1;_0x40114e=_0x459e1e['projectName'],_0x35b3f5=_0x459e1e[_0x127f6d(0x35e)];}else{_0x35b3f5=_0x50ff82[0x0],_0x40114e=_0x1e6a56[_0x127f6d(0x216)];if(!_0x40114e)return console[_0x127f6d(0x30d)](a54_0x238b4f[_0x127f6d(0x301)](_0x127f6d(0x33f)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x523738=!![];}}else{const _0x20018b=this[_0x127f6d(0x31c)](_0x50ff82,_0x1e6a56);if(!_0x20018b)return 0x1;_0x40114e=_0x20018b[_0x127f6d(0x352)],_0x35b3f5=_0x20018b[_0x127f6d(0x35e)];}if(_0x1e6a56[_0x127f6d(0x31d)]){if(_0x40114e&&_0x35b3f5)console['error'](_0x127f6d(0x3a8)+_0x40114e+'.'+_0x35b3f5);else _0x40114e&&console[_0x127f6d(0x30d)]('Filter:\x20project='+_0x40114e);}const _0x59debe=_0x1e6a56[_0x127f6d(0x2b7)],_0x3f71d2=_0x1e6a56[_0x127f6d(0x2ca)];if(_0x59debe){_0x3f71d2&&console[_0x127f6d(0x30d)](a54_0x238b4f[_0x127f6d(0x344)](_0x127f6d(0x396)),_0x127f6d(0x2cf));const _0x130b99=_0x1e6a56['follow'];return _0x130b99?await this[_0x127f6d(0x264)](_0x3453fa,_0x59debe):await this[_0x127f6d(0x372)](_0x3453fa,_0x59debe,_0x1e6a56),0x0;}if(_0x3f71d2){const _0xdf0ea6=await withSpinner(_0x127f6d(0x2f5),()=>_0x5643f0[_0x127f6d(0x2e9)]['sessions']({'projectName':_0x40114e,'workflowName':_0x35b3f5,'limit':0x64}),{'verbose':_0x1e6a56[_0x127f6d(0x31d)]}),_0x1c80da=_0xdf0ea6[_0x127f6d(0x364)][_0x127f6d(0x2fd)](_0x501ade=>_0x501ade['id']===_0x3f71d2);if(!_0x1c80da)return console[_0x127f6d(0x30d)](a54_0x238b4f[_0x127f6d(0x301)](_0x127f6d(0x33f)),_0x127f6d(0x1e8)+_0x3f71d2),0x1;if(!_0x1c80da[_0x127f6d(0x266)]?.['id'])return console[_0x127f6d(0x30d)](a54_0x238b4f[_0x127f6d(0x301)](_0x127f6d(0x33f)),_0x127f6d(0x313)+_0x3f71d2+'\x20has\x20no\x20attempts'),0x1;const _0x2c14ed=_0x1c80da['lastAttempt']['id'];_0x1e6a56['verbose']&&console[_0x127f6d(0x30d)]('Using\x20attempt\x20'+_0x2c14ed+_0x127f6d(0x32c)+_0x3f71d2);const _0x46112f=_0x1e6a56[_0x127f6d(0x200)];return _0x46112f?await this[_0x127f6d(0x264)](_0x3453fa,_0x2c14ed):await this[_0x127f6d(0x372)](_0x3453fa,_0x2c14ed,_0x1e6a56),0x0;}const _0x2b4698=await withSpinner('Loading\x20sessions...',()=>_0x5643f0[_0x127f6d(0x2e9)][_0x127f6d(0x24a)]({'projectName':_0x40114e,'workflowName':_0x35b3f5,'limit':_0x1e6a56[_0x127f6d(0x3ab)]||0x32}),{'verbose':_0x1e6a56['verbose']}),_0x56cff3=_0x2b4698[_0x127f6d(0x364)];if(_0x56cff3['length']===0x0){if(_0x40114e&&_0x35b3f5)console[_0x127f6d(0x30d)](_0x127f6d(0x2f9)+_0x40114e+'.'+_0x35b3f5);else _0x40114e?console['error'](_0x127f6d(0x2be)+_0x40114e):(console[_0x127f6d(0x30d)](_0x127f6d(0x330)),console[_0x127f6d(0x30d)](a54_0x238b4f[_0x127f6d(0x373)](_0x127f6d(0x27c))));return 0x0;}_0x56cff3[_0x127f6d(0x270)]((_0x28cbf1,_0x399549)=>{const _0x321b90=_0x127f6d,_0x30b646=_0x28cbf1[_0x321b90(0x230)]||'',_0x488fde=_0x399549[_0x321b90(0x230)]||'';return _0x488fde[_0x321b90(0x337)](_0x30b646);});if(_0x1e6a56['json']||_0x1e6a56[_0x127f6d(0x35b)])return await handleSDKOutput(_0x56cff3,_0x1e6a56),0x0;let _0x27203d;if(_0x523738){const _0x3e3ef6=_0x56cff3[0x0];if(!_0x3e3ef6[_0x127f6d(0x266)]?.['id'])return console[_0x127f6d(0x30d)](_0x127f6d(0x29e)),0x0;_0x27203d=_0x3e3ef6[_0x127f6d(0x266)]['id'],_0x1e6a56[_0x127f6d(0x31d)]&&console[_0x127f6d(0x30d)](_0x127f6d(0x262)+_0x3e3ef6['sessionTime']);}else{const _0x51e011=_0x56cff3[_0x127f6d(0x298)](_0x18f589=>{const _0x51a948=_0x127f6d,_0x528bba=getAttemptStatusDisplay(_0x18f589[_0x51a948(0x266)]);return{'title':_0x18f589['project']?.[_0x51a948(0x2f3)]+'.'+_0x18f589[_0x51a948(0x2e9)]?.[_0x51a948(0x2f3)]+_0x51a948(0x222)+_0x18f589[_0x51a948(0x230)]+'\x20'+_0x528bba[_0x51a948(0x341)],'value':_0x18f589[_0x51a948(0x266)]?.['id']||'','description':_0x528bba['text']};}),_0x1b93a5=await a54_0x206969({'type':_0x127f6d(0x29f),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x51e011[_0x127f6d(0x281)](_0x2ed6da=>_0x2ed6da[_0x127f6d(0x27a)]!=='')});if(!_0x1b93a5[_0x127f6d(0x2b7)])return 0x0;_0x27203d=_0x1b93a5[_0x127f6d(0x2b7)];}const _0x4a5cd1=_0x1e6a56[_0x127f6d(0x200)];return _0x4a5cd1?await this[_0x127f6d(0x264)](_0x3453fa,_0x27203d):await this[_0x127f6d(0x372)](_0x3453fa,_0x27203d,_0x1e6a56),0x0;}async[a54_0xb298fb(0x372)](_0x50855b,_0x38a855,_0x5caef7){const _0x51a8e4=a54_0xb298fb,{tdx:_0x2ba4d4}=_0x50855b;let _0x38a478,_0xf4b221;try{[_0x38a478,_0xf4b221]=await Promise[_0x51a8e4(0x39e)]([_0x2ba4d4[_0x51a8e4(0x2e9)][_0x51a8e4(0x328)](_0x38a855),_0x2ba4d4[_0x51a8e4(0x2e9)][_0x51a8e4(0x2a9)](_0x38a855,![])]);}catch(_0x2e83a1){console['error'](a54_0x238b4f[_0x51a8e4(0x301)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x5caef7['verbose']&&console[_0x51a8e4(0x30d)](_0x2e83a1);throw _0x2e83a1;}if(_0x5caef7[_0x51a8e4(0x366)]||_0x5caef7[_0x51a8e4(0x35b)]){const _0xe081a6=this[_0x51a8e4(0x2cd)](_0x38a478,_0xf4b221);await handleSDKOutput([_0xe081a6],_0x5caef7);return;}const _0xb3bbd3=_0x2ba4d4[_0x51a8e4(0x2eb)][_0x51a8e4(0x311)],_0x241dec=this[_0x51a8e4(0x233)](_0x38a478,_0xf4b221,_0xb3bbd3);console['log'](_0x241dec);}async[a54_0xb298fb(0x264)](_0x58b0de,_0x3ed551){const _0x211b6f=a54_0xb298fb,{tdx:_0x5599ad}=_0x58b0de,_0x3f7238=TIMELINE_CONFIG[_0x211b6f(0x312)],_0x4f1015=TIMELINE_CONFIG[_0x211b6f(0x1f7)];let _0x32935d=0x0;while(_0x32935d<_0x4f1015){process[_0x211b6f(0x296)][_0x211b6f(0x3b1)]&&process[_0x211b6f(0x296)][_0x211b6f(0x1f0)]('\x1bc');let _0x4df22e,_0x262c41;try{[_0x4df22e,_0x262c41]=await Promise['all']([_0x5599ad[_0x211b6f(0x2e9)][_0x211b6f(0x328)](_0x3ed551),_0x5599ad[_0x211b6f(0x2e9)][_0x211b6f(0x2a9)](_0x3ed551,![])]);}catch(_0x5633ec){console[_0x211b6f(0x30d)](a54_0x238b4f['red']('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x32935d>0x0&&console['error'](a54_0x238b4f[_0x211b6f(0x373)](_0x211b6f(0x1e7)+_0x32935d));throw _0x5633ec;}const _0xcb6fe7=_0x5599ad[_0x211b6f(0x2eb)][_0x211b6f(0x311)],_0x5d446c=this[_0x211b6f(0x233)](_0x4df22e,_0x262c41,_0xcb6fe7);console[_0x211b6f(0x360)](_0x5d446c);const _0x38ea57=_0x4df22e[_0x211b6f(0x234)]&&_0x262c41['every'](_0x957641=>_0x957641[_0x211b6f(0x39d)]!=='running'&&_0x957641[_0x211b6f(0x39d)]!==_0x211b6f(0x26c));if(_0x38ea57){console['error'](a54_0x238b4f['green'](_0x211b6f(0x391)));break;}console['error'](a54_0x238b4f['dim'](_0x211b6f(0x367)+_0x32935d*0x2+_0x211b6f(0x306))),await new Promise(_0x22ee8e=>setTimeout(_0x22ee8e,_0x3f7238)),_0x32935d++;}_0x32935d>=_0x4f1015&&console[_0x211b6f(0x30d)](a54_0x238b4f[_0x211b6f(0x344)](_0x211b6f(0x359)));}['renderTimeline'](_0xa2362f,_0x11b9e0,_0x37c57f){const _0x55ee7c=a54_0xb298fb,_0x68d89a=[],_0x3f05f4=TIMELINE_CONFIG[_0x55ee7c(0x26a)],_0x3c70b9=0x5,_0x293047=process[_0x55ee7c(0x296)]['columns']||0x78,_0x10b5f5=_0x293047-_0x3f05f4-_0x3c70b9,_0x22bbec=Math[_0x55ee7c(0x23d)](TIMELINE_CONFIG[_0x55ee7c(0x2b4)],Math[_0x55ee7c(0x27d)](_0x10b5f5,TIMELINE_CONFIG[_0x55ee7c(0x28b)])),_0x479da4=new Date(_0xa2362f[_0x55ee7c(0x217)])[_0x55ee7c(0x3a4)](),_0x459d55=_0xa2362f[_0x55ee7c(0x227)]?new Date(_0xa2362f[_0x55ee7c(0x227)])[_0x55ee7c(0x3a4)]():Date['now'](),_0x41dfd8={'start':_0x479da4,'end':_0x459d55,'duration':_0x459d55-_0x479da4},_0x515636=new Map(),_0x4c6a22=[];for(const _0x5078fd of _0x11b9e0){if(_0x5078fd[_0x55ee7c(0x336)]){const _0x4cd64c=new Date(_0x5078fd[_0x55ee7c(0x336)])[_0x55ee7c(0x3a4)](),_0x3c337d=_0x5078fd[_0x55ee7c(0x3a0)]?new Date(_0x5078fd[_0x55ee7c(0x3a0)])[_0x55ee7c(0x3a4)]():Date[_0x55ee7c(0x39b)](),_0x44afff={'start':_0x4cd64c,'end':_0x3c337d,'duration':_0x3c337d-_0x4cd64c};_0x515636['set'](_0x5078fd['id'],_0x44afff),_0x4c6a22[_0x55ee7c(0x2c7)]({'name':_0x5078fd['fullName'],'state':_0x5078fd[_0x55ee7c(0x39d)]||_0x55ee7c(0x353),'window':_0x44afff});}else _0x4c6a22[_0x55ee7c(0x2c7)]({'name':_0x5078fd[_0x55ee7c(0x289)],'state':_0x5078fd[_0x55ee7c(0x39d)]||'planned','window':undefined});}_0x4c6a22[_0x55ee7c(0x270)]((_0x5cde55,_0xcd9dcd)=>{const _0x45f383=_0x55ee7c;if(!_0x5cde55[_0x45f383(0x36d)])return 0x1;if(!_0xcd9dcd[_0x45f383(0x36d)])return-0x1;return _0x5cde55[_0x45f383(0x36d)][_0x45f383(0x2ef)]-_0xcd9dcd[_0x45f383(0x36d)]['start'];});const _0xa1111d=_0x4c6a22[_0x55ee7c(0x33b)],_0xc4aeb2=_0xa1111d>TIMELINE_CONFIG[_0x55ee7c(0x37b)];_0xc4aeb2&&_0x4c6a22[_0x55ee7c(0x2d9)](TIMELINE_CONFIG[_0x55ee7c(0x37b)]);const _0x26d293=calculateTimeScale(_0x41dfd8,_0x22bbec),_0x19ed5e=_0xa2362f[_0x55ee7c(0x234)]?_0xa2362f[_0x55ee7c(0x2d2)]?a54_0x238b4f[_0x55ee7c(0x23e)](_0x55ee7c(0x2d2)):a54_0x238b4f[_0x55ee7c(0x301)](_0x55ee7c(0x30d)):a54_0x238b4f[_0x55ee7c(0x211)](_0x55ee7c(0x20a)),_0x26f743=_0xa2362f[_0x55ee7c(0x1f5)]?.['id'],_0xc92e2a=_0xa2362f[_0x55ee7c(0x2ca)];let _0x166971;if(_0x26f743&&_0xc92e2a){const _0x4459bb=getWorkflowAttemptUrl(_0x37c57f,_0x26f743,_0xc92e2a,_0xa2362f['id']);_0x166971=hyperlink(a54_0x238b4f[_0x55ee7c(0x373)](_0xa2362f['id']),_0x4459bb);}else _0x166971=a54_0x238b4f[_0x55ee7c(0x373)](_0xa2362f['id']);_0x68d89a[_0x55ee7c(0x2c7)](_0x55ee7c(0x33c)+_0x166971+_0x55ee7c(0x222)+_0x19ed5e+_0x55ee7c(0x222)+formatElapsed(_0x41dfd8['duration']));if(_0x4c6a22[_0x55ee7c(0x33b)]>0x0){const _0x592c10=renderTimeAxis(_0x26d293,_0x22bbec),_0x1f336b=new Date(_0x41dfd8[_0x55ee7c(0x2ef)]),_0x5a9ea9=formatDate(_0x1f336b),_0x2daaff=TIMELINE_CONFIG[_0x55ee7c(0x2d3)]+TIMELINE_CONFIG[_0x55ee7c(0x2f0)]+_0x3f05f4,_0x3e4fbb=_0x5a9ea9['padStart'](_0x2daaff),_0x464cee=a54_0x238b4f['dim'](_0x3e4fbb);_0x68d89a[_0x55ee7c(0x2c7)](_0x464cee+'\x20'+_0x592c10);for(const _0x3deb85 of _0x4c6a22){_0x68d89a[_0x55ee7c(0x2c7)](renderTaskRow(_0x3deb85,_0x26d293,_0x22bbec,_0x3f05f4));}const _0x296241=calculateStats(_0x4c6a22);_0x68d89a['push'](formatStats(_0x296241)),_0xc4aeb2&&_0x68d89a[_0x55ee7c(0x2c7)](a54_0x238b4f[_0x55ee7c(0x344)](_0x55ee7c(0x338)+TIMELINE_CONFIG[_0x55ee7c(0x37b)]+'\x20of\x20'+_0xa1111d+_0x55ee7c(0x235))),_0x68d89a['push'](''),_0x68d89a['push'](a54_0x238b4f[_0x55ee7c(0x373)](_0x55ee7c(0x394))+('tdx\x20wf\x20attempt\x20'+_0xa2362f['id']+'\x20logs')+a54_0x238b4f[_0x55ee7c(0x373)]('\x20to\x20see\x20detailed\x20logs'));}else _0x68d89a[_0x55ee7c(0x2c7)](_0x55ee7c(0x21f));return _0x68d89a[_0x55ee7c(0x29a)]('\x0a');}[a54_0xb298fb(0x2cd)](_0x2a4ca4,_0x2d63ae){const _0x2eb1d7=a54_0xb298fb,_0x362f80=new Date(_0x2a4ca4[_0x2eb1d7(0x217)])[_0x2eb1d7(0x3a4)](),_0x495c12=_0x2a4ca4[_0x2eb1d7(0x227)]?new Date(_0x2a4ca4['finishedAt'])[_0x2eb1d7(0x3a4)]():Date[_0x2eb1d7(0x39b)](),_0x201206=_0x495c12-_0x362f80,_0x3c126e=[];for(const _0x37710f of _0x2d63ae){if(_0x37710f[_0x2eb1d7(0x336)]){const _0x1fe158=new Date(_0x37710f['startedAt'])[_0x2eb1d7(0x3a4)](),_0x4d98bb=_0x37710f[_0x2eb1d7(0x3a0)]?new Date(_0x37710f[_0x2eb1d7(0x3a0)])[_0x2eb1d7(0x3a4)]():Date[_0x2eb1d7(0x39b)]();_0x3c126e[_0x2eb1d7(0x2c7)]({'name':_0x37710f[_0x2eb1d7(0x289)],'state':_0x37710f[_0x2eb1d7(0x39d)]||_0x2eb1d7(0x353),'window':{'start':_0x1fe158,'end':_0x4d98bb,'duration':_0x4d98bb-_0x1fe158}});}else _0x3c126e[_0x2eb1d7(0x2c7)]({'name':_0x37710f[_0x2eb1d7(0x289)],'state':_0x37710f[_0x2eb1d7(0x39d)]||_0x2eb1d7(0x26c),'window':undefined});}const _0x2396be=calculateStats(_0x3c126e);return{'attempt':{'id':_0x2a4ca4['id'],'status':_0x2a4ca4[_0x2eb1d7(0x234)]?_0x2a4ca4[_0x2eb1d7(0x2d2)]?_0x2eb1d7(0x2d2):_0x2eb1d7(0x30d):_0x2eb1d7(0x20a),'createdAt':_0x2a4ca4['createdAt'],'finishedAt':_0x2a4ca4[_0x2eb1d7(0x227)],'duration_ms':_0x201206},'tasks':_0x3c126e[_0x2eb1d7(0x298)](_0x543d27=>({'name':_0x543d27['name'],'state':_0x543d27[_0x2eb1d7(0x39d)],'startedAt':_0x543d27[_0x2eb1d7(0x36d)]?new Date(_0x543d27[_0x2eb1d7(0x36d)][_0x2eb1d7(0x2ef)])['toISOString']():null,'updatedAt':_0x543d27[_0x2eb1d7(0x36d)]?new Date(_0x543d27[_0x2eb1d7(0x36d)][_0x2eb1d7(0x342)])['toISOString']():null,'duration_ms':_0x543d27['window']?.[_0x2eb1d7(0x1ff)]||null})),'stats':_0x2396be};}}export class WorkflowSchedulesCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]='workflow:schedules';[a54_0xb298fb(0x346)]=a54_0xb298fb(0x224);async[a54_0xb298fb(0x335)](_0x2693d0){const _0x70ad6a=a54_0xb298fb,{options:_0x841d31,tdx:_0x260595}=_0x2693d0,_0x274bd6=await withSpinner(_0x70ad6a(0x36e),()=>_0x260595[_0x70ad6a(0x2e9)][_0x70ad6a(0x245)](),{'verbose':_0x841d31[_0x70ad6a(0x31d)]}),_0x1d6ff4=_0x274bd6[_0x70ad6a(0x364)];console[_0x70ad6a(0x30d)](_0x70ad6a(0x275)+_0x1d6ff4[_0x70ad6a(0x33b)]+_0x70ad6a(0x23b)+(_0x1d6ff4['length']!==0x1?'s':''));if(isStructuredFormat(_0x841d31))await handleSDKOutput(_0x1d6ff4,_0x841d31);else{if(_0x1d6ff4['length']===0x0)console[_0x70ad6a(0x360)]('No\x20schedules\x20found');else for(const _0x230cf0 of _0x1d6ff4){const _0x3f5742=_0x230cf0[_0x70ad6a(0x285)]?a54_0x238b4f[_0x70ad6a(0x344)](_0x70ad6a(0x202)):'',_0x36acc6=_0x230cf0['project']?.[_0x70ad6a(0x2f3)]?a54_0x238b4f[_0x70ad6a(0x373)]('\x20['+_0x230cf0[_0x70ad6a(0x1f5)][_0x70ad6a(0x2f3)]+']'):'',_0x1299c1=_0x230cf0[_0x70ad6a(0x362)]?a54_0x238b4f[_0x70ad6a(0x373)]('\x20next:\x20'+new Date(_0x230cf0[_0x70ad6a(0x362)])[_0x70ad6a(0x2d1)]()):'';console[_0x70ad6a(0x360)](_0x70ad6a(0x30f)+_0x230cf0['id']+'\x20'+(_0x230cf0[_0x70ad6a(0x2e9)]?.[_0x70ad6a(0x2f3)]||_0x70ad6a(0x38f))+_0x36acc6+_0x3f5742+_0x1299c1);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a54_0xb298fb(0x2f3)]=a54_0xb298fb(0x246);[a54_0xb298fb(0x346)]='Enable\x20a\x20workflow\x20schedule';async[a54_0xb298fb(0x335)](_0x5ba4f1){const _0x51adac=a54_0xb298fb,{options:_0xa8e0ae,args:_0x507abb,tdx:_0x5ab483}=_0x5ba4f1,_0x459f8d=_0x507abb[0x0];if(!_0x459f8d)return console[_0x51adac(0x30d)](a54_0x238b4f[_0x51adac(0x301)](_0x51adac(0x33f)),_0x51adac(0x376)),console[_0x51adac(0x30d)](a54_0x238b4f['dim'](_0x51adac(0x2a7))),console[_0x51adac(0x30d)](a54_0x238b4f[_0x51adac(0x373)](_0x51adac(0x21b))),0x1;const _0x7d25f8=await withSpinner(_0x51adac(0x287)+_0x459f8d+_0x51adac(0x3a6),()=>_0x5ab483[_0x51adac(0x2e9)]['enableSchedule'](_0x459f8d),{'verbose':_0xa8e0ae[_0x51adac(0x31d)]}),_0x206448=_0x7d25f8[_0x51adac(0x364)];return isStructuredFormat(_0xa8e0ae)?await handleSingleObjectOutput(_0x206448,_0xa8e0ae):(console[_0x51adac(0x360)](_0x51adac(0x347)+_0x459f8d+_0x51adac(0x299)+(_0x206448[_0x51adac(0x2e9)]?.['name']||'unknown')+')'),_0x206448['nextRunTime']&&console[_0x51adac(0x360)](a54_0x238b4f['dim']('\x20\x20Next\x20run:\x20'+new Date(_0x206448[_0x51adac(0x362)])[_0x51adac(0x2d1)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']='workflow:schedule:disable';[a54_0xb298fb(0x346)]=a54_0xb298fb(0x242);async[a54_0xb298fb(0x335)](_0x2593de){const _0x57e50c=a54_0xb298fb,{options:_0x632e06,args:_0x590fa1,tdx:_0x436430}=_0x2593de,_0x354446=_0x590fa1[0x0];if(!_0x354446)return console[_0x57e50c(0x30d)](a54_0x238b4f[_0x57e50c(0x301)](_0x57e50c(0x33f)),_0x57e50c(0x376)),console['error'](a54_0x238b4f['dim'](_0x57e50c(0x2b9))),console[_0x57e50c(0x30d)](a54_0x238b4f[_0x57e50c(0x373)]('Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs')),0x1;const _0x395a10=await withSpinner(_0x57e50c(0x3a5)+_0x354446+_0x57e50c(0x3a6),()=>_0x436430[_0x57e50c(0x2e9)][_0x57e50c(0x218)](_0x354446),{'verbose':_0x632e06[_0x57e50c(0x31d)]}),_0x292b60=_0x395a10[_0x57e50c(0x364)];return isStructuredFormat(_0x632e06)?await handleSingleObjectOutput(_0x292b60,_0x632e06):console['log'](_0x57e50c(0x347)+_0x354446+_0x57e50c(0x213)+(_0x292b60[_0x57e50c(0x2e9)]?.[_0x57e50c(0x2f3)]||_0x57e50c(0x353))+')'),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- function a55_0x3d43(){const _0x581cfe=['X-Trino-User','33036beIefs','1614bDAjrQ','tdx',';\x20node/','338066zusuOB','tdx/','Authorization','1699173UMHtMP','1423870NCEJjw','150QJXBBI','1089GbAdge','3215304aEYNGL','entries','length','version','165712LwAaPr','Bearer\x20','161bHuBjI'];a55_0x3d43=function(){return _0x581cfe;};return a55_0x3d43();}(function(_0x39d0b6,_0x3c2d56){const _0x3d6f06=a55_0x1668,_0xae89e=_0x39d0b6();while(!![]){try{const _0x5b1761=parseInt(_0x3d6f06(0xdb))/0x1+parseInt(_0x3d6f06(0xd8))/0x2*(-parseInt(_0x3d6f06(0xe1))/0x3)+parseInt(_0x3d6f06(0xd7))/0x4*(parseInt(_0x3d6f06(0xe0))/0x5)+parseInt(_0x3d6f06(0xcf))/0x6+-parseInt(_0x3d6f06(0xd5))/0x7*(parseInt(_0x3d6f06(0xd3))/0x8)+-parseInt(_0x3d6f06(0xde))/0x9+parseInt(_0x3d6f06(0xdf))/0xa;if(_0x5b1761===_0x3c2d56)break;else _0xae89e['push'](_0xae89e['shift']());}catch(_0x247716){_0xae89e['push'](_0xae89e['shift']());}}}(a55_0x3d43,0x4ab1b));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x42a300=a55_0x1668,_0x47ba2e=getVersion(),_0x2ade97=platform(),_0x777479=process[_0x42a300(0xd2)]['replace']('v','');return _0x42a300(0xdc)+_0x47ba2e+'\x20('+_0x2ade97+_0x42a300(0xda)+_0x777479+')';}export function getAuthHeaders(_0x31c8a3,_0x5681c2,_0x58bef9){const _0x1d492a=a55_0x1668,_0x7c7d74=getVersion(),_0x12f820={'User-Agent':getUserAgent(),'X-TD-Client':_0x1d492a(0xd9),'X-TD-Client-Version':_0x7c7d74};if(_0x58bef9)_0x12f820[_0x1d492a(0xdd)]=_0x1d492a(0xd4)+_0x58bef9;else _0x5681c2&&(_0x12f820[_0x1d492a(0xdd)]='TD1\x20'+_0x5681c2);return _0x12f820;}function a55_0x1668(_0x54a1ab,_0x52f481){_0x54a1ab=_0x54a1ab-0xcf;const _0x3d43f6=a55_0x3d43();let _0x16680c=_0x3d43f6[_0x54a1ab];return _0x16680c;}export function toHeaderRecord(_0x67799d){const _0x23d2da=a55_0x1668,_0x4b570f={};for(const [_0x3e92b2,_0x441c56]of Object[_0x23d2da(0xd0)](_0x67799d)){_0x441c56!==undefined&&(_0x4b570f[_0x3e92b2]=_0x441c56);}return _0x4b570f;}export function getTrinoHeaders(_0x2af590,_0x156fbb,_0xfe94e0){const _0x5b8b7e=a55_0x1668,_0x3d7a37=getAuthHeaders(_0x2af590),_0x5419ef=toHeaderRecord(_0x3d7a37);if(_0xfe94e0)_0x5419ef[_0x5b8b7e(0xdd)]='Bearer\x20'+_0xfe94e0;else _0x156fbb&&(_0x5419ef[_0x5b8b7e(0xd6)]=_0x156fbb);return _0x5419ef;}export function hasAPIKey(_0x16fbd6){const _0x13d4a4=a55_0x1668,_0x39e237=getAPIKey();return _0x39e237!==undefined&&_0x39e237[_0x13d4a4(0xd1)]>0x0;}
1
+ (function(_0x4f6cd1,_0x192288){const _0x2cc41b=a55_0x20ff,_0x390581=_0x4f6cd1();while(!![]){try{const _0x473615=-parseInt(_0x2cc41b(0x142))/0x1*(-parseInt(_0x2cc41b(0x145))/0x2)+-parseInt(_0x2cc41b(0x152))/0x3*(-parseInt(_0x2cc41b(0x151))/0x4)+parseInt(_0x2cc41b(0x148))/0x5*(parseInt(_0x2cc41b(0x14a))/0x6)+parseInt(_0x2cc41b(0x140))/0x7+-parseInt(_0x2cc41b(0x14f))/0x8+-parseInt(_0x2cc41b(0x14b))/0x9*(parseInt(_0x2cc41b(0x14d))/0xa)+parseInt(_0x2cc41b(0x14c))/0xb*(parseInt(_0x2cc41b(0x141))/0xc);if(_0x473615===_0x192288)break;else _0x390581['push'](_0x390581['shift']());}catch(_0x4c6621){_0x390581['push'](_0x390581['shift']());}}}(a55_0x5880,0x60139));function a55_0x20ff(_0x3fc695,_0x267d04){_0x3fc695=_0x3fc695-0x140;const _0x588082=a55_0x5880();let _0x20ffb8=_0x588082[_0x3fc695];return _0x20ffb8;}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x131c5e=a55_0x20ff,_0x8a91b7=getVersion(),_0x25e774=platform(),_0x5f3739=process[_0x131c5e(0x154)][_0x131c5e(0x147)]('v','');return _0x131c5e(0x150)+_0x8a91b7+'\x20('+_0x25e774+_0x131c5e(0x143)+_0x5f3739+')';}export function getAuthHeaders(_0x256610,_0x9fe137,_0x2ba6e1){const _0x348be2=a55_0x20ff,_0x6b6df3=getVersion(),_0x1684c2={'User-Agent':getUserAgent(),'X-TD-Client':_0x348be2(0x153),'X-TD-Client-Version':_0x6b6df3};if(_0x2ba6e1)_0x1684c2[_0x348be2(0x14e)]=_0x348be2(0x144)+_0x2ba6e1;else _0x9fe137&&(_0x1684c2[_0x348be2(0x14e)]='TD1\x20'+_0x9fe137);return _0x1684c2;}export function toHeaderRecord(_0x1f21ec){const _0x18a4e1=a55_0x20ff,_0x5cbf69={};for(const [_0x51354d,_0x5c91ae]of Object[_0x18a4e1(0x149)](_0x1f21ec)){_0x5c91ae!==undefined&&(_0x5cbf69[_0x51354d]=_0x5c91ae);}return _0x5cbf69;}export function getTrinoHeaders(_0x10b780,_0x53f9cf,_0x7bf055){const _0x415643=a55_0x20ff,_0x40c825=getAuthHeaders(_0x10b780),_0x9705c9=toHeaderRecord(_0x40c825);if(_0x7bf055)_0x9705c9[_0x415643(0x14e)]=_0x415643(0x144)+_0x7bf055;else _0x53f9cf&&(_0x9705c9['X-Trino-User']=_0x53f9cf);return _0x9705c9;}export function hasAPIKey(_0x15d299){const _0x405418=a55_0x20ff,_0x4a093d=getAPIKey();return _0x4a093d!==undefined&&_0x4a093d[_0x405418(0x146)]>0x0;}function a55_0x5880(){const _0x5d38d4=['3349689pTLQLC','12MIhuuB','209nOYRYs',';\x20node/','Bearer\x20','70sWcyAl','length','replace','85McMRvw','entries','153480SzaUio','18ajxUMb','3801930sFphMd','2679730IXxEkI','Authorization','3423952EMFZqN','tdx/','204zvnpvv','5361lyfsNX','tdx','version'];a55_0x5880=function(){return _0x5d38d4;};return a55_0x5880();}
@@ -1 +1 @@
1
- (function(_0x55c1e9,_0x1263f9){const _0x434812=a56_0x5239,_0x4e54a3=_0x55c1e9();while(!![]){try{const _0x4784d7=-parseInt(_0x434812(0xb7))/0x1+-parseInt(_0x434812(0xc8))/0x2*(-parseInt(_0x434812(0xe2))/0x3)+-parseInt(_0x434812(0xf8))/0x4+-parseInt(_0x434812(0xfb))/0x5*(parseInt(_0x434812(0xe6))/0x6)+parseInt(_0x434812(0xd7))/0x7+-parseInt(_0x434812(0xcf))/0x8+-parseInt(_0x434812(0xdf))/0x9*(-parseInt(_0x434812(0xf7))/0xa);if(_0x4784d7===_0x1263f9)break;else _0x4e54a3['push'](_0x4e54a3['shift']());}catch(_0x25b295){_0x4e54a3['push'](_0x4e54a3['shift']());}}}(a56_0x4348,0x6ab3c));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a56_0x5239(_0x6990e7,_0x1150be){_0x6990e7=_0x6990e7-0xb7;const _0x43485a=a56_0x4348();let _0x523992=_0x43485a[_0x6990e7];return _0x523992;}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a56_0x1157a8 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x141a98){const _0x4cee1b=a56_0x5239;return _0x141a98[_0x4cee1b(0xfa)]===_0x4cee1b(0xf6)||_0x141a98[_0x4cee1b(0xfa)]==='jsonl'||_0x141a98[_0x4cee1b(0xfa)]===_0x4cee1b(0xdc)||_0x141a98[_0x4cee1b(0xfa)]==='table'||_0x141a98['json']===!![]||_0x141a98[_0x4cee1b(0xfe)]===!![]||_0x141a98[_0x4cee1b(0xdc)]===!![]||_0x141a98[_0x4cee1b(0xfc)]===!![];}export function parseOutputOptions(_0xe30adc){const _0x418036=a56_0x5239;return{'format':_0xe30adc[_0x418036(0xfa)]||'table','output':_0xe30adc[_0x418036(0xe7)]||'','limit':_0xe30adc['limit'],'limitStructuredFormats':_0xe30adc[_0x418036(0xd1)],'color':_0xe30adc['color'],'noColor':_0xe30adc[_0x418036(0xd3)]};}function convertSDKResultToQueryResult(_0x306c42){const _0x2c6ed4=a56_0x5239,_0x2ca136=[];if(_0x306c42[_0x2c6ed4(0xf1)]>0x0){const _0x52b8f0=_0x306c42[0x0];for(const [_0x11e9cf,_0x5893cb]of Object['entries'](_0x52b8f0)){let _0x224210=_0x2c6ed4(0xe1);if(typeof _0x5893cb==='number')_0x224210=Number[_0x2c6ed4(0xf0)](_0x5893cb)?_0x2c6ed4(0xf3):_0x2c6ed4(0xcb);else{if(typeof _0x5893cb===_0x2c6ed4(0xc9))_0x224210=_0x2c6ed4(0xc9);else _0x5893cb===null&&(_0x224210=_0x2c6ed4(0xe1));}_0x2ca136[_0x2c6ed4(0xe3)]({'name':_0x11e9cf,'type':_0x224210});}}return{'queryId':'sdk-result','columns':_0x2ca136,'data':_0x306c42,'stats':{'state':_0x2c6ed4(0xcd),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x306c42[_0x2c6ed4(0xf1)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2eaa58,_0x57cf23){const _0xc36f7d=convertSDKResultToQueryResult(_0x2eaa58);return formatQueryOutput(_0xc36f7d,_0x57cf23);}export async function formatQueryOutput(_0x3fe7d6,_0x4e4e1e){const _0x31784b=a56_0x5239,{format:_0x4ae2e7,limit:_0x1c44c8,output:_0x1753df,color:_0x24e0b6,noColor:_0x965dda,limitStructuredFormats:_0x58ca86}=_0x4e4e1e,_0x115a57=Boolean(_0x1753df)&&!_0x24e0b6,_0x5d7403={'color':_0x24e0b6,'noColor':_0x965dda||_0x115a57};if(_0x4ae2e7===_0x31784b(0xfc)){const _0x4b24ef=shouldUseLess(_0x4ae2e7,_0x1753df);return formatAsTable(_0x3fe7d6,_0x1c44c8,_0x4b24ef,_0x5d7403);}const _0x469bee=_0x58ca86&&Number[_0x31784b(0xce)](_0x1c44c8)&&_0x3fe7d6[_0x31784b(0xef)][_0x31784b(0xf1)]>_0x1c44c8?{..._0x3fe7d6,'data':_0x3fe7d6[_0x31784b(0xef)][_0x31784b(0xdb)](0x0,_0x1c44c8)}:_0x3fe7d6;if(_0x4ae2e7===_0x31784b(0xf6))return formatAsJSON(_0x469bee,_0x5d7403);else return _0x4ae2e7==='jsonl'?formatAsJSONL(_0x469bee,_0x5d7403):formatQueryResult(_0x469bee,_0x4ae2e7);}function shouldUseLess(_0x1b0ff8,_0x2b69eb){const _0x21a62d=a56_0x5239;return(_0x1b0ff8==='table'||_0x1b0ff8===_0x21a62d(0xe0))&&process[_0x21a62d(0xc1)]['isTTY']&&!_0x2b69eb;}export function resolveOutputOptions(_0x717a94){const _0x522f3a=a56_0x5239,_0xda4cca=_0x717a94[_0x522f3a(0xe7)]||'',_0x7a20d0=resolveOutputFormat(_0x717a94['format'],_0xda4cca,_0x522f3a(0xfc));let _0x53b3ff=typeof _0x717a94[_0x522f3a(0xbd)]===_0x522f3a(0xf5)?_0x717a94[_0x522f3a(0xbd)]:parseInt(_0x717a94[_0x522f3a(0xbd)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x717a94['limit']===undefined&&shouldUseLess(_0x7a20d0,_0xda4cca)&&(_0x53b3ff=Infinity),{'format':_0x7a20d0,'output':_0xda4cca,'limit':_0x53b3ff,'limitStructuredFormats':_0x717a94[_0x522f3a(0xd1)],'color':_0x717a94['color'],'noColor':_0x717a94['noColor']};}function a56_0x4348(){const _0x302b15=['boolean','map','double','keys','FINISHED','isFinite','239824whQUcO','blue','limitStructuredFormats','stdin','noColor','magenta','object','Results\x20saved\x20to\x20','2127076cUDAcz','end','rule','debug','slice','tsv','-FXRSn','repeat','13383WkkOtU','list','varchar','1692yHdJYW','push','inherit','split','174VqzzFQ','output','error','[Object]','query','string','filter','forEach','log','data','isInteger','length','join','bigint','padEnd','number','json','8140WAMJba','3361612ewsGwD','stringify','format','102335WyimRk','table','pipe','jsonl','cyan','trim','283342ySfhHR','resolve','[rule]','spawn','max','No\x20data','limit','─┴─','params','less','stdout','stderr','cmdout','[params]','[error]','entries','bold','2376cHEhWy'];a56_0x4348=function(){return _0x302b15;};return a56_0x4348();}export function writeOutput(_0x31f31d,_0x31b4b5,_0x52f3b1){const _0x1ac77c=a56_0x5239;return _0x31b4b5?(writeFileSync(_0x31b4b5,_0x31f31d),console[_0x1ac77c(0xe8)](_0x1ac77c(0xd6)+_0x31b4b5),Promise[_0x1ac77c(0xb8)]()):shouldUseLess(_0x52f3b1||'','')?new Promise(_0x350905=>{const _0x4f64f9=_0x1ac77c,_0x3a5d74=spawn(_0x4f64f9(0xc0),[_0x4f64f9(0xdd)],{'stdio':[_0x4f64f9(0xfd),'inherit',_0x4f64f9(0xe4)]});let _0x15d7f0=![];_0x3a5d74['on'](_0x4f64f9(0xe8),()=>{const _0x5b8fc0=_0x4f64f9;!_0x15d7f0&&(_0x15d7f0=!![],console[_0x5b8fc0(0xee)](_0x31f31d),_0x350905());}),_0x3a5d74['on']('close',()=>{!_0x15d7f0&&(_0x15d7f0=!![],_0x350905());}),_0x3a5d74['on'](_0x4f64f9(0xba),()=>{const _0x35ae4c=_0x4f64f9;!_0x15d7f0&&_0x3a5d74[_0x35ae4c(0xd2)]&&(_0x3a5d74['stdin']['on'](_0x35ae4c(0xe8),()=>{}),_0x3a5d74['stdin']['write'](_0x31f31d),_0x3a5d74[_0x35ae4c(0xd2)][_0x35ae4c(0xd8)]());}),!_0x3a5d74[_0x4f64f9(0xd2)]&&(!_0x15d7f0&&(_0x15d7f0=!![],console['log'](_0x31f31d),_0x350905()));}):(console[_0x1ac77c(0xee)](_0x31f31d),Promise[_0x1ac77c(0xb8)]());}export async function handleSDKOutput(_0x88850,_0x32b4c0){const _0x5cc4d3=a56_0x5239,_0x5390fb=resolveOutputOptions(_0x32b4c0),_0x2f49ae=await formatSDKOutput(_0x88850,_0x5390fb);await writeOutput(_0x2f49ae,_0x5390fb['output']||undefined,_0x5390fb[_0x5cc4d3(0xfa)]);}export async function handleQueryOutput(_0x137eed,_0x5b4da3){const _0x2ed352=a56_0x5239,_0x2e6240=resolveOutputOptions(_0x5b4da3),_0x5c1084=await formatQueryOutput(_0x137eed,_0x2e6240);await writeOutput(_0x5c1084,_0x2e6240[_0x2ed352(0xe7)]||undefined,_0x2e6240[_0x2ed352(0xfa)]);}async function formatSingleObject(_0x25fd9c,_0x455ae8){const _0x33a7=a56_0x5239,{format:_0x3bb229,color:_0x49f236,noColor:_0x2bcf92}=_0x455ae8,_0x159610={'color':_0x49f236,'noColor':_0x2bcf92};if(_0x3bb229==='json'){if(shouldUseColor(_0x159610))return colorizeJSON(_0x25fd9c,_0x159610);return JSON['stringify'](_0x25fd9c,null,0x2);}else{if(_0x3bb229===_0x33a7(0xfe)){if(shouldUseColor(_0x159610))return colorizeJSONCompact(_0x25fd9c,_0x159610);return JSON[_0x33a7(0xf9)](_0x25fd9c);}else{if(_0x3bb229==='tsv')return Object[_0x33a7(0xc6)](_0x25fd9c)['map'](([_0x1066a3,_0x22a0c3])=>_0x1066a3+'\x09'+_0x22a0c3)[_0x33a7(0xf2)]('\x0a');else{const _0x1e7cf4=Object[_0x33a7(0xc6)](_0x25fd9c);if(_0x1e7cf4[_0x33a7(0xf1)]===0x0)return _0x33a7(0xbc);const _0x1ed934=_0x25fd9c[_0x33a7(0xda)],_0x29e3cd=_0x25fd9c['query'],_0x202b2e=_0x25fd9c[_0x33a7(0xbf)],_0x31a853=_0x25fd9c['rule'],_0x3eb827=_0x29e3cd?typeof _0x29e3cd===_0x33a7(0xeb)?_0x29e3cd:JSON['stringify'](_0x29e3cd,null,0x2):undefined,_0x564ff9=_0x202b2e&&Object[_0x33a7(0xcc)](_0x202b2e)[_0x33a7(0xf1)]>0x0?JSON['stringify'](_0x202b2e,null,0x2):undefined,_0x2454ca=_0x31a853&&Object[_0x33a7(0xcc)](_0x31a853)[_0x33a7(0xf1)]>0x0?JSON['stringify'](_0x31a853,null,0x2):undefined,_0x4195f6=_0x1e7cf4[_0x33a7(0xec)](([_0x2e65c9])=>_0x2e65c9!=='debug'&&_0x2e65c9!==_0x33a7(0xea)&&_0x2e65c9!==_0x33a7(0xbf)&&_0x2e65c9!==_0x33a7(0xd9)),_0x2e5be2=Math[_0x33a7(0xbb)](..._0x4195f6[_0x33a7(0xca)](([_0x28ea20])=>_0x28ea20['length'])),_0x132974=Math['max'](..._0x4195f6['map'](([,_0x522485])=>{const _0x442411=_0x33a7;try{const _0x36835c=_0x522485===null||_0x522485===undefined?'':typeof _0x522485===_0x442411(0xd5)?JSON[_0x442411(0xf9)](_0x522485):String(_0x522485),_0x250af0=_0x36835c['split']('\x0a');return Math['max'](..._0x250af0[_0x442411(0xca)](_0x35df09=>_0x35df09['length']),0x0);}catch{return 0x0;}}),0x14),_0x1034d1=[];_0x1034d1['push'](colorBorder('┌─'+'─'['repeat'](_0x2e5be2)+'─┬─'+'─'[_0x33a7(0xde)](_0x132974)+'─┐',_0x159610)),_0x4195f6[_0x33a7(0xed)](([_0x11e39e,_0x39040b])=>{const _0x38a30f=_0x33a7;let _0x126b9f;try{_0x126b9f=_0x39040b===null||_0x39040b===undefined?'':typeof _0x39040b===_0x38a30f(0xd5)?JSON[_0x38a30f(0xf9)](_0x39040b):String(_0x39040b);}catch{_0x126b9f=_0x38a30f(0xe9);}const _0xae2f8f=_0x11e39e['padEnd'](_0x2e5be2),_0x5d0cc5=_0x126b9f[_0x38a30f(0xe5)]('\x0a');_0x5d0cc5['forEach']((_0x4e1105,_0x3886d3)=>{const _0x3a00af=_0x38a30f,_0x3503f3=colorBorder('│',_0x159610);_0x3886d3===0x0?_0x1034d1[_0x3a00af(0xe3)](_0x3503f3+'\x20'+_0xae2f8f+'\x20'+_0x3503f3+'\x20'+_0x4e1105['padEnd'](_0x132974)+'\x20'+_0x3503f3):_0x1034d1['push'](_0x3503f3+'\x20'+'\x20'[_0x3a00af(0xde)](_0x2e5be2)+'\x20'+_0x3503f3+'\x20'+_0x4e1105[_0x3a00af(0xf4)](_0x132974)+'\x20'+_0x3503f3);});}),_0x1034d1['push'](colorBorder('└─'+'─'[_0x33a7(0xde)](_0x2e5be2)+_0x33a7(0xbe)+'─'[_0x33a7(0xde)](_0x132974)+'─┘',_0x159610));_0x3eb827&&(_0x1034d1[_0x33a7(0xe3)](''),_0x1034d1[_0x33a7(0xe3)](String(a56_0x1157a8['yellow'][_0x33a7(0xc7)]('[query]'))),_0x1034d1[_0x33a7(0xe3)](_0x3eb827));_0x564ff9&&(_0x1034d1[_0x33a7(0xe3)](''),_0x1034d1[_0x33a7(0xe3)](String(a56_0x1157a8[_0x33a7(0xd0)][_0x33a7(0xc7)](_0x33a7(0xc4)))),_0x1034d1['push'](_0x564ff9));_0x2454ca&&(_0x1034d1[_0x33a7(0xe3)](''),_0x1034d1[_0x33a7(0xe3)](String(a56_0x1157a8[_0x33a7(0xd4)][_0x33a7(0xc7)](_0x33a7(0xb9)))),_0x1034d1[_0x33a7(0xe3)](_0x2454ca));if(_0x1ed934){if(_0x1ed934[_0x33a7(0xc2)]){_0x1034d1[_0x33a7(0xe3)](''),_0x1034d1[_0x33a7(0xe3)](String(a56_0x1157a8['red'][_0x33a7(0xc7)](_0x33a7(0xc5))));const _0x47ea04=_0x1ed934[_0x33a7(0xc2)]['split']('\x0a');_0x47ea04[_0x33a7(0xed)](_0x1a93e5=>{const _0x22683c=_0x33a7;_0x1a93e5[_0x22683c(0x100)]()&&_0x1034d1[_0x22683c(0xe3)](_0x1a93e5);});}if(_0x1ed934['cmdout']){_0x1034d1[_0x33a7(0xe3)](''),_0x1034d1[_0x33a7(0xe3)](String(a56_0x1157a8[_0x33a7(0xff)]['bold']('[logs]')));const _0x3f05a8=_0x1ed934[_0x33a7(0xc3)][_0x33a7(0xe5)]('\x0a');_0x3f05a8[_0x33a7(0xed)](_0x51610b=>{const _0x4771df=_0x33a7;_0x51610b[_0x4771df(0x100)]()&&_0x1034d1[_0x4771df(0xe3)](_0x51610b);});}}return _0x1034d1[_0x33a7(0xf2)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2b7139,_0x388d0d){const _0x121788=a56_0x5239;if(_0x388d0d[_0x121788(0xfa)]===_0x121788(0xfc)){await handleSDKOutput([_0x2b7139],_0x388d0d);return;}const _0x395274=resolveOutputOptions(_0x388d0d),_0x1638cf=await formatSingleObject(_0x2b7139,_0x395274);await writeOutput(_0x1638cf,_0x395274[_0x121788(0xe7)]||undefined,_0x395274[_0x121788(0xfa)]);}
1
+ (function(_0x4cf41d,_0x22c891){const _0xd0b4c7=a56_0xe13f,_0x479414=_0x4cf41d();while(!![]){try{const _0x4821b6=-parseInt(_0xd0b4c7(0x18d))/0x1+-parseInt(_0xd0b4c7(0x194))/0x2+-parseInt(_0xd0b4c7(0x1a8))/0x3*(parseInt(_0xd0b4c7(0x1aa))/0x4)+parseInt(_0xd0b4c7(0x19c))/0x5+parseInt(_0xd0b4c7(0x184))/0x6+parseInt(_0xd0b4c7(0x18e))/0x7+-parseInt(_0xd0b4c7(0x1a5))/0x8;if(_0x4821b6===_0x22c891)break;else _0x479414['push'](_0x479414['shift']());}catch(_0x5bb0b4){_0x479414['push'](_0x479414['shift']());}}}(a56_0x459c,0x6e4c1));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 a56_0x14c237 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';function a56_0x459c(){const _0x2361cb=['2075688wsIXPy','error','stringify','669MkMAHp','isFinite','2428WEvYtJ','log','color','-FXRSn','limit','debug','string','bold','trim','padEnd','noColor','stderr','pipe','table','less','FINISHED','max','cyan','object','query','split','bigint','cmdout','keys','tsv','double','write','slice','[rule]','─┬─','entries','Results\x20saved\x20to\x20','varchar','4208982fvInpF','[logs]','data','join','repeat','number','format','rule','forEach','366548tPDJNs','1627682SLBOzN','stdin','boolean','params','No\x20data','resolve','301968WKGYSC','spawn','isTTY','magenta','output','stdout','json','[error]','2150540nWpxMD','map','close','[Object]','push','jsonl','length','limitStructuredFormats','inherit'];a56_0x459c=function(){return _0x2361cb;};return a56_0x459c();}export function isStructuredFormat(_0x45d023){const _0x279b32=a56_0xe13f;return _0x45d023['format']===_0x279b32(0x19a)||_0x45d023[_0x279b32(0x18a)]===_0x279b32(0x1a1)||_0x45d023['format']===_0x279b32(0x17b)||_0x45d023[_0x279b32(0x18a)]===_0x279b32(0x1b7)||_0x45d023[_0x279b32(0x19a)]===!![]||_0x45d023[_0x279b32(0x1a1)]===!![]||_0x45d023[_0x279b32(0x17b)]===!![]||_0x45d023[_0x279b32(0x1b7)]===!![];}export function parseOutputOptions(_0x12d7ec){const _0x1dce28=a56_0xe13f;return{'format':_0x12d7ec[_0x1dce28(0x18a)]||_0x1dce28(0x1b7),'output':_0x12d7ec[_0x1dce28(0x198)]||'','limit':_0x12d7ec['limit'],'limitStructuredFormats':_0x12d7ec[_0x1dce28(0x1a3)],'color':_0x12d7ec['color'],'noColor':_0x12d7ec[_0x1dce28(0x1b4)]};}function convertSDKResultToQueryResult(_0x6e9323){const _0xcc6037=a56_0xe13f,_0x537911=[];if(_0x6e9323[_0xcc6037(0x1a2)]>0x0){const _0x8f9130=_0x6e9323[0x0];for(const [_0x687398,_0x175956]of Object[_0xcc6037(0x181)](_0x8f9130)){let _0x528310=_0xcc6037(0x183);if(typeof _0x175956==='number')_0x528310=Number['isInteger'](_0x175956)?_0xcc6037(0x178):_0xcc6037(0x17c);else{if(typeof _0x175956===_0xcc6037(0x190))_0x528310=_0xcc6037(0x190);else _0x175956===null&&(_0x528310=_0xcc6037(0x183));}_0x537911[_0xcc6037(0x1a0)]({'name':_0x687398,'type':_0x528310});}}return{'queryId':'sdk-result','columns':_0x537911,'data':_0x6e9323,'stats':{'state':_0xcc6037(0x1b9),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x6e9323[_0xcc6037(0x1a2)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x401e90,_0x5f0f35){const _0x5e0b30=convertSDKResultToQueryResult(_0x401e90);return formatQueryOutput(_0x5e0b30,_0x5f0f35);}export async function formatQueryOutput(_0x5a384a,_0x42c9b5){const _0x3101da=a56_0xe13f,{format:_0x5c2ef9,limit:_0xd523e5,output:_0x13974c,color:_0x4b75b6,noColor:_0x2cdac5,limitStructuredFormats:_0x20bf3a}=_0x42c9b5,_0x3d2e54=Boolean(_0x13974c)&&!_0x4b75b6,_0x1b1eb4={'color':_0x4b75b6,'noColor':_0x2cdac5||_0x3d2e54};if(_0x5c2ef9===_0x3101da(0x1b7)){const _0x46be72=shouldUseLess(_0x5c2ef9,_0x13974c);return formatAsTable(_0x5a384a,_0xd523e5,_0x46be72,_0x1b1eb4);}const _0x55a7bd=_0x20bf3a&&Number[_0x3101da(0x1a9)](_0xd523e5)&&_0x5a384a[_0x3101da(0x186)][_0x3101da(0x1a2)]>_0xd523e5?{..._0x5a384a,'data':_0x5a384a[_0x3101da(0x186)][_0x3101da(0x17e)](0x0,_0xd523e5)}:_0x5a384a;if(_0x5c2ef9==='json')return formatAsJSON(_0x55a7bd,_0x1b1eb4);else return _0x5c2ef9===_0x3101da(0x1a1)?formatAsJSONL(_0x55a7bd,_0x1b1eb4):formatQueryResult(_0x55a7bd,_0x5c2ef9);}function shouldUseLess(_0x2d3825,_0x33e6d5){const _0xedc8a4=a56_0xe13f;return(_0x2d3825===_0xedc8a4(0x1b7)||_0x2d3825==='list')&&process[_0xedc8a4(0x199)][_0xedc8a4(0x196)]&&!_0x33e6d5;}export function resolveOutputOptions(_0x31f35e){const _0x34402d=a56_0xe13f,_0x16a3f8=_0x31f35e[_0x34402d(0x198)]||'',_0x358ef1=resolveOutputFormat(_0x31f35e[_0x34402d(0x18a)],_0x16a3f8,_0x34402d(0x1b7));let _0x456c32=typeof _0x31f35e[_0x34402d(0x1ae)]===_0x34402d(0x189)?_0x31f35e[_0x34402d(0x1ae)]:parseInt(_0x31f35e[_0x34402d(0x1ae)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x31f35e['limit']===undefined&&shouldUseLess(_0x358ef1,_0x16a3f8)&&(_0x456c32=Infinity),{'format':_0x358ef1,'output':_0x16a3f8,'limit':_0x456c32,'limitStructuredFormats':_0x31f35e[_0x34402d(0x1a3)],'color':_0x31f35e[_0x34402d(0x1ac)],'noColor':_0x31f35e[_0x34402d(0x1b4)]};}function a56_0xe13f(_0x2d6736,_0x54f6d9){_0x2d6736=_0x2d6736-0x178;const _0x459cd7=a56_0x459c();let _0xe13fc7=_0x459cd7[_0x2d6736];return _0xe13fc7;}export function writeOutput(_0x3fe44a,_0x50ac50,_0x1194f4){const _0x4ff62c=a56_0xe13f;return _0x50ac50?(writeFileSync(_0x50ac50,_0x3fe44a),console['error'](_0x4ff62c(0x182)+_0x50ac50),Promise[_0x4ff62c(0x193)]()):shouldUseLess(_0x1194f4||'','')?new Promise(_0x253875=>{const _0x4cf977=_0x4ff62c,_0x444f28=spawn(_0x4cf977(0x1b8),[_0x4cf977(0x1ad)],{'stdio':[_0x4cf977(0x1b6),_0x4cf977(0x1a4),'inherit']});let _0x3251d1=![];_0x444f28['on'](_0x4cf977(0x1a6),()=>{const _0x5bc7b6=_0x4cf977;!_0x3251d1&&(_0x3251d1=!![],console[_0x5bc7b6(0x1ab)](_0x3fe44a),_0x253875());}),_0x444f28['on'](_0x4cf977(0x19e),()=>{!_0x3251d1&&(_0x3251d1=!![],_0x253875());}),_0x444f28['on'](_0x4cf977(0x195),()=>{const _0x2bfde5=_0x4cf977;!_0x3251d1&&_0x444f28['stdin']&&(_0x444f28[_0x2bfde5(0x18f)]['on']('error',()=>{}),_0x444f28[_0x2bfde5(0x18f)][_0x2bfde5(0x17d)](_0x3fe44a),_0x444f28[_0x2bfde5(0x18f)]['end']());}),!_0x444f28[_0x4cf977(0x18f)]&&(!_0x3251d1&&(_0x3251d1=!![],console[_0x4cf977(0x1ab)](_0x3fe44a),_0x253875()));}):(console['log'](_0x3fe44a),Promise[_0x4ff62c(0x193)]());}export async function handleSDKOutput(_0x30c2d7,_0x3314db){const _0x30534d=a56_0xe13f,_0x103b46=resolveOutputOptions(_0x3314db),_0x3c19f8=await formatSDKOutput(_0x30c2d7,_0x103b46);await writeOutput(_0x3c19f8,_0x103b46[_0x30534d(0x198)]||undefined,_0x103b46[_0x30534d(0x18a)]);}export async function handleQueryOutput(_0x33d258,_0x5ea5ee){const _0x245e60=a56_0xe13f,_0x1fd059=resolveOutputOptions(_0x5ea5ee),_0x29c251=await formatQueryOutput(_0x33d258,_0x1fd059);await writeOutput(_0x29c251,_0x1fd059[_0x245e60(0x198)]||undefined,_0x1fd059[_0x245e60(0x18a)]);}async function formatSingleObject(_0x29eba6,_0x59177e){const _0x3ebecf=a56_0xe13f,{format:_0x1921d3,color:_0x5df002,noColor:_0x32e64b}=_0x59177e,_0x13f39c={'color':_0x5df002,'noColor':_0x32e64b};if(_0x1921d3===_0x3ebecf(0x19a)){if(shouldUseColor(_0x13f39c))return colorizeJSON(_0x29eba6,_0x13f39c);return JSON[_0x3ebecf(0x1a7)](_0x29eba6,null,0x2);}else{if(_0x1921d3===_0x3ebecf(0x1a1)){if(shouldUseColor(_0x13f39c))return colorizeJSONCompact(_0x29eba6,_0x13f39c);return JSON[_0x3ebecf(0x1a7)](_0x29eba6);}else{if(_0x1921d3===_0x3ebecf(0x17b))return Object[_0x3ebecf(0x181)](_0x29eba6)['map'](([_0xdb7563,_0x391f37])=>_0xdb7563+'\x09'+_0x391f37)[_0x3ebecf(0x187)]('\x0a');else{const _0x118072=Object['entries'](_0x29eba6);if(_0x118072['length']===0x0)return _0x3ebecf(0x192);const _0x14f0c8=_0x29eba6['debug'],_0x4e7f20=_0x29eba6[_0x3ebecf(0x1bd)],_0x588868=_0x29eba6[_0x3ebecf(0x191)],_0x34ed52=_0x29eba6[_0x3ebecf(0x18b)],_0x2e780c=_0x4e7f20?typeof _0x4e7f20===_0x3ebecf(0x1b0)?_0x4e7f20:JSON[_0x3ebecf(0x1a7)](_0x4e7f20,null,0x2):undefined,_0x332178=_0x588868&&Object['keys'](_0x588868)[_0x3ebecf(0x1a2)]>0x0?JSON['stringify'](_0x588868,null,0x2):undefined,_0x42170d=_0x34ed52&&Object[_0x3ebecf(0x17a)](_0x34ed52)[_0x3ebecf(0x1a2)]>0x0?JSON[_0x3ebecf(0x1a7)](_0x34ed52,null,0x2):undefined,_0x473f8c=_0x118072['filter'](([_0x49d3c0])=>_0x49d3c0!==_0x3ebecf(0x1af)&&_0x49d3c0!==_0x3ebecf(0x1bd)&&_0x49d3c0!==_0x3ebecf(0x191)&&_0x49d3c0!==_0x3ebecf(0x18b)),_0xc45915=Math['max'](..._0x473f8c[_0x3ebecf(0x19d)](([_0x3efe4d])=>_0x3efe4d['length'])),_0x2fb858=Math['max'](..._0x473f8c[_0x3ebecf(0x19d)](([,_0x51602a])=>{const _0x54ab5d=_0x3ebecf;try{const _0x24dfc4=_0x51602a===null||_0x51602a===undefined?'':typeof _0x51602a==='object'?JSON[_0x54ab5d(0x1a7)](_0x51602a):String(_0x51602a),_0x4cd3e6=_0x24dfc4[_0x54ab5d(0x1be)]('\x0a');return Math[_0x54ab5d(0x1ba)](..._0x4cd3e6[_0x54ab5d(0x19d)](_0x21f9e1=>_0x21f9e1[_0x54ab5d(0x1a2)]),0x0);}catch{return 0x0;}}),0x14),_0x3c9c22=[];_0x3c9c22[_0x3ebecf(0x1a0)](colorBorder('┌─'+'─'[_0x3ebecf(0x188)](_0xc45915)+_0x3ebecf(0x180)+'─'[_0x3ebecf(0x188)](_0x2fb858)+'─┐',_0x13f39c)),_0x473f8c['forEach'](([_0x508085,_0x193afb])=>{const _0x5b2086=_0x3ebecf;let _0x260e35;try{_0x260e35=_0x193afb===null||_0x193afb===undefined?'':typeof _0x193afb===_0x5b2086(0x1bc)?JSON[_0x5b2086(0x1a7)](_0x193afb):String(_0x193afb);}catch{_0x260e35=_0x5b2086(0x19f);}const _0x4fdbf4=_0x508085[_0x5b2086(0x1b3)](_0xc45915),_0x1e648e=_0x260e35[_0x5b2086(0x1be)]('\x0a');_0x1e648e[_0x5b2086(0x18c)]((_0x566f46,_0x4daba8)=>{const _0x4b4139=_0x5b2086,_0x17c5b8=colorBorder('│',_0x13f39c);_0x4daba8===0x0?_0x3c9c22[_0x4b4139(0x1a0)](_0x17c5b8+'\x20'+_0x4fdbf4+'\x20'+_0x17c5b8+'\x20'+_0x566f46[_0x4b4139(0x1b3)](_0x2fb858)+'\x20'+_0x17c5b8):_0x3c9c22[_0x4b4139(0x1a0)](_0x17c5b8+'\x20'+'\x20'[_0x4b4139(0x188)](_0xc45915)+'\x20'+_0x17c5b8+'\x20'+_0x566f46[_0x4b4139(0x1b3)](_0x2fb858)+'\x20'+_0x17c5b8);});}),_0x3c9c22['push'](colorBorder('└─'+'─'[_0x3ebecf(0x188)](_0xc45915)+'─┴─'+'─'[_0x3ebecf(0x188)](_0x2fb858)+'─┘',_0x13f39c));_0x2e780c&&(_0x3c9c22[_0x3ebecf(0x1a0)](''),_0x3c9c22[_0x3ebecf(0x1a0)](String(a56_0x14c237['yellow'][_0x3ebecf(0x1b1)]('[query]'))),_0x3c9c22['push'](_0x2e780c));_0x332178&&(_0x3c9c22[_0x3ebecf(0x1a0)](''),_0x3c9c22['push'](String(a56_0x14c237['blue'][_0x3ebecf(0x1b1)]('[params]'))),_0x3c9c22[_0x3ebecf(0x1a0)](_0x332178));_0x42170d&&(_0x3c9c22[_0x3ebecf(0x1a0)](''),_0x3c9c22[_0x3ebecf(0x1a0)](String(a56_0x14c237[_0x3ebecf(0x197)][_0x3ebecf(0x1b1)](_0x3ebecf(0x17f)))),_0x3c9c22[_0x3ebecf(0x1a0)](_0x42170d));if(_0x14f0c8){if(_0x14f0c8[_0x3ebecf(0x1b5)]){_0x3c9c22['push'](''),_0x3c9c22[_0x3ebecf(0x1a0)](String(a56_0x14c237['red'][_0x3ebecf(0x1b1)](_0x3ebecf(0x19b))));const _0x43a506=_0x14f0c8['stderr'][_0x3ebecf(0x1be)]('\x0a');_0x43a506[_0x3ebecf(0x18c)](_0x57c7b6=>{const _0x155751=_0x3ebecf;_0x57c7b6[_0x155751(0x1b2)]()&&_0x3c9c22[_0x155751(0x1a0)](_0x57c7b6);});}if(_0x14f0c8[_0x3ebecf(0x179)]){_0x3c9c22['push'](''),_0x3c9c22[_0x3ebecf(0x1a0)](String(a56_0x14c237[_0x3ebecf(0x1bb)][_0x3ebecf(0x1b1)](_0x3ebecf(0x185))));const _0x5724ee=_0x14f0c8[_0x3ebecf(0x179)]['split']('\x0a');_0x5724ee[_0x3ebecf(0x18c)](_0x1ce067=>{const _0x2afdb7=_0x3ebecf;_0x1ce067[_0x2afdb7(0x1b2)]()&&_0x3c9c22[_0x2afdb7(0x1a0)](_0x1ce067);});}}return _0x3c9c22['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x3ef504,_0xc16069){const _0x31e357=a56_0xe13f;if(_0xc16069['format']==='table'){await handleSDKOutput([_0x3ef504],_0xc16069);return;}const _0x5ba790=resolveOutputOptions(_0xc16069),_0x7cdc9a=await formatSingleObject(_0x3ef504,_0x5ba790);await writeOutput(_0x7cdc9a,_0x5ba790[_0x31e357(0x198)]||undefined,_0x5ba790[_0x31e357(0x18a)]);}