@treasuredata/tdx 0.23.0 → 0.23.1

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 (163) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/query/index.js +1 -1
  99. package/dist/sdk/query/sql-parser.js +1 -1
  100. package/dist/sdk/schedule.js +1 -1
  101. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  102. package/dist/sdk/segment/fields-display.js +1 -1
  103. package/dist/sdk/segment/file-discovery.js +1 -1
  104. package/dist/sdk/segment/journey-utils.js +1 -1
  105. package/dist/sdk/segment/journey-yaml.js +1 -1
  106. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  107. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  108. package/dist/sdk/segment/pull-workflow.js +1 -1
  109. package/dist/sdk/segment/push-workflow.js +1 -1
  110. package/dist/sdk/segment/resolution-context.js +1 -1
  111. package/dist/sdk/segment/segment-path-parser.js +1 -1
  112. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  113. package/dist/sdk/segment/target-resolution.js +1 -1
  114. package/dist/sdk/segment/tdx-config.js +1 -1
  115. package/dist/sdk/segment/validate-files.js +1 -1
  116. package/dist/sdk/segment/yaml-validator.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/types/index.js +1 -1
  119. package/dist/sdk/types/progress.js +1 -1
  120. package/dist/sdk/user.js +1 -1
  121. package/dist/sdk/util/format-detector.js +1 -1
  122. package/dist/sdk/util/formatters.js +1 -1
  123. package/dist/sdk/util/index.js +1 -1
  124. package/dist/sdk/util/tree-formatter.js +1 -1
  125. package/dist/sdk/workflow/archive-validation.js +1 -1
  126. package/dist/sdk/workflow/clone-workflow.js +1 -1
  127. package/dist/sdk/workflow/index.js +1 -1
  128. package/dist/sdk/workflow/pull-workflow.js +1 -1
  129. package/dist/sdk/workflow/push-workflow.js +1 -1
  130. package/dist/sdk/workflow/tdx-config.js +1 -1
  131. package/dist/sdk/workflow/workflow-utils.js +1 -1
  132. package/dist/test-utils/command-runner.js +1 -1
  133. package/dist/test-utils/factories.js +1 -1
  134. package/dist/test-utils/fixtures.js +1 -1
  135. package/dist/test-utils/http-mock.js +1 -1
  136. package/dist/test-utils/index.js +1 -1
  137. package/dist/utils/async.js +1 -1
  138. package/dist/utils/colors.js +1 -1
  139. package/dist/utils/diff.js +1 -1
  140. package/dist/utils/file-permissions.js +1 -1
  141. package/dist/utils/global-cache.js +1 -1
  142. package/dist/utils/json-loader.js +1 -1
  143. package/dist/utils/local-cache.js +1 -1
  144. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  145. package/dist/utils/logger/formatters/index.js +1 -1
  146. package/dist/utils/logger/handlers/console-handler.js +1 -1
  147. package/dist/utils/logger/handlers/file-handler.js +1 -1
  148. package/dist/utils/logger/handlers/index.js +1 -1
  149. package/dist/utils/logger/handlers/null-handler.js +1 -1
  150. package/dist/utils/logger/index.js +1 -1
  151. package/dist/utils/logger/logger.js +1 -1
  152. package/dist/utils/logger/types.js +1 -1
  153. package/dist/utils/option-validation.js +1 -1
  154. package/dist/utils/port.js +1 -1
  155. package/dist/utils/process.js +1 -1
  156. package/dist/utils/prompt.js +1 -1
  157. package/dist/utils/spinner.js +1 -1
  158. package/dist/utils/sse-parser.js +1 -1
  159. package/dist/utils/string-utils.js +1 -1
  160. package/dist/utils/table-ref-parser.js +1 -1
  161. package/dist/utils/tdx-logger.js +1 -1
  162. package/dist/utils/version-check.js +1 -1
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- const a42_0x3d9e57=a42_0x5d83;(function(_0x3db320,_0x332fc2){const _0x35822a=a42_0x5d83,_0x3566de=_0x3db320();while(!![]){try{const _0x45146d=-parseInt(_0x35822a(0x1a0))/0x1+-parseInt(_0x35822a(0x23f))/0x2*(-parseInt(_0x35822a(0x237))/0x3)+-parseInt(_0x35822a(0x22b))/0x4+-parseInt(_0x35822a(0x30e))/0x5*(-parseInt(_0x35822a(0x2a5))/0x6)+parseInt(_0x35822a(0x2fe))/0x7*(-parseInt(_0x35822a(0x1c1))/0x8)+-parseInt(_0x35822a(0x222))/0x9*(parseInt(_0x35822a(0x1ef))/0xa)+parseInt(_0x35822a(0x20a))/0xb;if(_0x45146d===_0x332fc2)break;else _0x3566de['push'](_0x3566de['shift']());}catch(_0x1bad51){_0x3566de['push'](_0x3566de['shift']());}}}(a42_0x1dca,0x692cd));import a42_0x1f5ccf from'chalk';import{existsSync}from'fs';import a42_0x5b90c4 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x40d5a1 from'prompts';function getAttemptStatusDisplay(_0x6c3dba){const _0x569e4d=a42_0x5d83;if(!_0x6c3dba)return{'icon':'⏳','text':''};const {done:_0x462a83,success:_0xc9dd75,cancelRequested:_0x2adb44}=_0x6c3dba;if(!_0x462a83)return _0x2adb44?{'icon':'🛑','text':a42_0x1f5ccf['yellow'](_0x569e4d(0x21a))}:{'icon':'🔄','text':a42_0x1f5ccf['blue'](_0x569e4d(0x249))};if(_0xc9dd75)return{'icon':'✅','text':a42_0x1f5ccf[_0x569e4d(0x2dc)]('success')};return{'icon':'❌','text':a42_0x1f5ccf[_0x569e4d(0x1ce)](_0x569e4d(0x1b4))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x3d9e57(0x2cc)](_0x5ca1e7,_0x237b15,_0x2936de=0x0){const _0x443e25=a42_0x3d9e57;return _0x5ca1e7[_0x2936de]||_0x237b15[_0x443e25(0x21f)];}[a42_0x3d9e57(0x2e6)](_0x70fa76,_0x1b7648,_0x1fbc81=0x0){const _0x14f070=a42_0x3d9e57,_0x474245=this['resolveProject'](_0x70fa76,_0x1b7648,_0x1fbc81);if(!_0x474245)return console['error'](a42_0x1f5ccf['red'](_0x14f070(0x2a7)),_0x14f070(0x203)),console[_0x14f070(0x1b4)](a42_0x1f5ccf['dim'](_0x14f070(0x20b))),null;return _0x474245;}[a42_0x3d9e57(0x28e)](_0x52b9a6,_0x44ec10){const _0x568e87=a42_0x3d9e57;if(_0x52b9a6[0x0]){const _0x29e929=_0x52b9a6[0x0][_0x568e87(0x2f3)]('.');if(_0x29e929['length']===0x1)return{'projectName':_0x29e929[0x0],'workflowName':undefined};else return _0x29e929[_0x568e87(0x1bd)]===0x2?{'projectName':_0x29e929[0x0],'workflowName':_0x29e929[0x1]}:(console[_0x568e87(0x1b4)](a42_0x1f5ccf['red'](_0x568e87(0x2a7)),_0x568e87(0x27e)),null);}return{'projectName':_0x44ec10[_0x568e87(0x21f)],'workflowName':undefined};}[a42_0x3d9e57(0x332)](_0x328361,_0x455aa1,_0x434ae5=0x0){const _0xde6b28=a42_0x3d9e57;if(_0x328361[_0x434ae5])return _0x328361[_0x434ae5];if(_0x455aa1['workflowProject']){const _0x4470ab=a42_0x5b90c4[_0xde6b28(0x288)](process[_0xde6b28(0x217)](),_0xde6b28(0x1cf),_0x455aa1[_0xde6b28(0x21f)]);if(existsSync(a42_0x5b90c4[_0xde6b28(0x288)](_0x4470ab,'tdx.json')))return _0x4470ab;}return undefined;}async[a42_0x3d9e57(0x1c0)](_0x14f632,_0x440105,_0x231c73){const _0x11ee07=a42_0x3d9e57;try{const _0x317d5c=await _0x14f632[_0x11ee07(0x20e)][_0x11ee07(0x1cf)](_0x440105,{'limit':0x1});if(_0x317d5c[_0x11ee07(0x1bd)]>0x0){const _0x3ec4a1=_0x317d5c[0x0]['id'],_0x875f61=getWorkflowUrl(_0x231c73,_0x3ec4a1);console[_0x11ee07(0x1b4)](_0x11ee07(0x200)+a42_0x1f5ccf[_0x11ee07(0x1b5)](_0x875f61));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0x3d9e57(0x1b2);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1dd);async['execute'](_0x149c0f){const _0xf92b9b=a42_0x3d9e57,{options:_0x4ae2d1,args:_0x4cceac,tdx:_0x3678fb}=_0x149c0f,_0x4175e0=_0x4cceac[0x0],_0x488ed1=_0x4ae2d1['clear'];if(_0x488ed1)return saveSessionContext({'workflow_project':undefined},_0x4ae2d1[_0xf92b9b(0x2f1)]),console[_0xf92b9b(0x1d8)](a42_0x1f5ccf[_0xf92b9b(0x2dc)](_0xf92b9b(0x32b))),0x0;if(!_0x4175e0)return console[_0xf92b9b(0x1b4)](a42_0x1f5ccf[_0xf92b9b(0x1ce)]('Error:'),'Project\x20name\x20is\x20required'),console[_0xf92b9b(0x1b4)](a42_0x1f5ccf[_0xf92b9b(0x1fc)](_0xf92b9b(0x1ed))),console['error'](a42_0x1f5ccf['dim'](_0xf92b9b(0x2ae))),0x1;const _0x460a33=await withSpinner(_0xf92b9b(0x279)+_0x4175e0+_0xf92b9b(0x2d0),()=>_0x3678fb['workflow'][_0xf92b9b(0x1f2)](_0x4175e0),{'verbose':_0x4ae2d1[_0xf92b9b(0x271)]}),{name:_0x2cc548}=_0x460a33[_0xf92b9b(0x19c)];return saveSessionContext({'workflow_project':_0x2cc548},_0x4ae2d1[_0xf92b9b(0x2f1)]),console[_0xf92b9b(0x1d8)](a42_0x1f5ccf[_0xf92b9b(0x2dc)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a42_0x1f5ccf[_0xf92b9b(0x1b5)](_0x2cc548))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]='workflow:projects';[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1d0);async['execute'](_0x89e589){const _0x40f3a9=a42_0x3d9e57,{options:_0x289197,args:_0xb701fb,tdx:_0x94ec32}=_0x89e589,_0x2d7478=_0xb701fb[0x0];_0x289197[_0x40f3a9(0x271)]&&_0x2d7478&&console[_0x40f3a9(0x1b4)](_0x40f3a9(0x1ca)+_0x2d7478);const _0x5e6485=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x94ec32['workflow'][_0x40f3a9(0x1ec)](_0x2d7478,{'limit':_0x289197[_0x40f3a9(0x284)]}),{'verbose':_0x289197['verbose']});let _0x1f5d15=_0x5e6485[_0x40f3a9(0x19c)];_0x1f5d15[_0x40f3a9(0x229)]((_0x5ef6e4,_0x4047c2)=>_0x5ef6e4['name'][_0x40f3a9(0x207)](_0x4047c2[_0x40f3a9(0x2e0)]));const _0x318740=_0x289197[_0x40f3a9(0x284)]||0x64,_0x115945=_0x1f5d15[_0x40f3a9(0x1bd)]>=_0x318740?a42_0x1f5ccf['dim'](_0x40f3a9(0x1b8)):'';console[_0x40f3a9(0x1b4)](_0x40f3a9(0x1eb)+_0x1f5d15['length']+_0x40f3a9(0x2cf)+(_0x1f5d15[_0x40f3a9(0x1bd)]!==0x1?'s':'')+_0x115945);if(_0x289197[_0x40f3a9(0x233)]===_0x40f3a9(0x2b5)||_0x289197['format']==='jsonl'||_0x289197[_0x40f3a9(0x233)]===_0x40f3a9(0x2fa))await handleSDKOutput(_0x1f5d15,_0x289197);else{if(_0x1f5d15[_0x40f3a9(0x1bd)]===0x0)_0x2d7478?console[_0x40f3a9(0x1d8)]('No\x20projects\x20match\x20pattern:\x20'+_0x2d7478):console[_0x40f3a9(0x1d8)](_0x40f3a9(0x311));else{const _0x36953c=_0x1f5d15['map'](_0x548f8f=>{const _0x27dcbf=_0x40f3a9,_0x1453cc=_0x548f8f[_0x27dcbf(0x18d)]?.[_0x27dcbf(0x2ac)](_0x1aef60=>_0x1aef60[_0x27dcbf(0x32c)]===_0x27dcbf(0x305)),_0xcc9de8=_0x1453cc?a42_0x1f5ccf['dim']('\x20(system)'):'';return _0x27dcbf(0x258)+_0x548f8f['name']+_0xcc9de8;});await writeOutput(_0x36953c[_0x40f3a9(0x288)]('\x0a'),_0x289197['output'],_0x40f3a9(0x2ad));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1d5);[a42_0x3d9e57(0x1f3)]='List\x20workflows';async[a42_0x3d9e57(0x190)](_0x32adfd){const _0x54ddab=a42_0x3d9e57,{options:_0x2893ff,args:_0x1acd33,tdx:_0x53511e}=_0x32adfd,_0x395b78=this['resolveProject'](_0x1acd33,_0x2893ff);_0x2893ff[_0x54ddab(0x271)]&&_0x395b78&&console[_0x54ddab(0x1b4)](_0x54ddab(0x2a2)+_0x395b78);const _0x1caa99=await withSpinner(_0x54ddab(0x28b),()=>_0x53511e[_0x54ddab(0x20e)]['workflows'](_0x395b78,{'limit':_0x2893ff[_0x54ddab(0x284)]}),{'verbose':_0x2893ff[_0x54ddab(0x271)]});let _0x21a6c8=_0x1caa99['data'];_0x21a6c8['sort']((_0x3578fd,_0x31dc46)=>{const _0x5bba86=_0x54ddab,_0x2039d7=_0x3578fd[_0x5bba86(0x2e0)]['localeCompare'](_0x31dc46[_0x5bba86(0x2e0)]);if(_0x2039d7!==0x0)return _0x2039d7;return(_0x3578fd[_0x5bba86(0x1c7)]?.[_0x5bba86(0x2e0)]||'')[_0x5bba86(0x207)](_0x31dc46[_0x5bba86(0x1c7)]?.[_0x5bba86(0x2e0)]||'');});const _0x1f7af6=_0x2893ff[_0x54ddab(0x284)]||0x64,_0x15df45=_0x21a6c8['length']>=_0x1f7af6?a42_0x1f5ccf[_0x54ddab(0x1fc)](_0x54ddab(0x1b8)):'';console[_0x54ddab(0x1b4)](_0x54ddab(0x1eb)+_0x21a6c8[_0x54ddab(0x1bd)]+_0x54ddab(0x22f)+(_0x21a6c8[_0x54ddab(0x1bd)]!==0x1?'s':'')+_0x15df45);if(_0x2893ff[_0x54ddab(0x233)]===_0x54ddab(0x2b5)||_0x2893ff[_0x54ddab(0x233)]===_0x54ddab(0x2aa)||_0x2893ff[_0x54ddab(0x233)]===_0x54ddab(0x2fa))await handleSDKOutput(_0x21a6c8,_0x2893ff);else{if(_0x21a6c8[_0x54ddab(0x1bd)]===0x0)_0x395b78?console[_0x54ddab(0x1d8)](_0x54ddab(0x1e7)+_0x395b78):console[_0x54ddab(0x1d8)](_0x54ddab(0x1bf));else{const _0x425a66=_0x2893ff['site'],_0x1d3b0=_0x21a6c8[_0x54ddab(0x198)](_0x4d433b=>{const _0xc60391=_0x54ddab,_0x2d9abd=a42_0x1f5ccf[_0xc60391(0x1fc)]('#'+_0x4d433b['id']),_0x489965=hyperlink(_0x2d9abd,getWorkflowUrl(_0x425a66,_0x4d433b['id'])),_0x2dfff1=_0x4d433b[_0xc60391(0x1c7)]?.[_0xc60391(0x2e0)]?a42_0x1f5ccf[_0xc60391(0x1fc)]('\x20('+_0x4d433b[_0xc60391(0x1c7)][_0xc60391(0x2e0)]+')'):'';return'📋\x20'+_0x489965+'\x20'+_0x4d433b['name']+_0x2dfff1;});await writeOutput(_0x1d3b0[_0x54ddab(0x288)]('\x0a'),_0x2893ff[_0x54ddab(0x2ca)],_0x54ddab(0x2ad));}}return 0x0;}}function a42_0x5d83(_0x5ca45b,_0x53b0a0){_0x5ca45b=_0x5ca45b-0x18c;const _0x1dca40=a42_0x1dca();let _0x5d8342=_0x1dca40[_0x5ca45b];return _0x5d8342;}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x2d2);['description']=a42_0x3d9e57(0x261);async[a42_0x3d9e57(0x190)](_0x2cabfc){const _0x46172b=a42_0x3d9e57,{options:_0x3f8779,args:_0x2f2f16,tdx:_0x2f67a7}=_0x2cabfc,_0x5319b3=this['parseProjectWorkflowPattern'](_0x2f2f16,_0x3f8779);if(!_0x5319b3)return 0x1;const {projectName:_0x1f7be8,workflowName:_0x4721c2}=_0x5319b3;if(_0x3f8779[_0x46172b(0x271)]){if(_0x1f7be8&&_0x4721c2)console[_0x46172b(0x1b4)](_0x46172b(0x2b7)+_0x1f7be8+'.'+_0x4721c2);else _0x1f7be8&&console[_0x46172b(0x1b4)](_0x46172b(0x1a2)+_0x1f7be8);const _0x404c4f=_0x3f8779[_0x46172b(0x223)];_0x404c4f&&console[_0x46172b(0x1b4)](_0x46172b(0x26d)+_0x404c4f);}let _0x920039=0x28;if(process[_0x46172b(0x1da)]['isTTY']&&!_0x3f8779[_0x46172b(0x2ca)]&&!_0x3f8779[_0x46172b(0x233)]){const _0x57519b=process['stdout'][_0x46172b(0x22d)]||0x28;_0x920039=Math['max'](0x14,Math[_0x46172b(0x2bf)](_0x57519b*0x2/0x3));}const _0x5e051e=_0x3f8779[_0x46172b(0x284)]||_0x920039,_0x4d510a=await withSpinner(_0x46172b(0x2b8),()=>_0x2f67a7[_0x46172b(0x20e)][_0x46172b(0x1ba)]({'projectName':_0x1f7be8,'workflowName':_0x4721c2,'status':_0x3f8779[_0x46172b(0x223)],'fromTime':_0x3f8779[_0x46172b(0x1ae)],'toTime':_0x3f8779['to'],'limit':_0x5e051e}),{'verbose':_0x3f8779['verbose']}),_0x376bdc=_0x4d510a[_0x46172b(0x19c)];_0x376bdc[_0x46172b(0x229)]((_0x26584d,_0x4cb1c3)=>{const _0x591c31=_0x46172b,_0xdadd3f=_0x26584d['sessionTime']||'',_0x26a465=_0x4cb1c3[_0x591c31(0x300)]||'';return _0x26a465[_0x591c31(0x207)](_0xdadd3f);});_0x376bdc[_0x46172b(0x1bd)]>=_0x5e051e?console['error']('✔\x20Showing\x20'+_0x376bdc['length']+'\x20sessions\x20'+a42_0x1f5ccf[_0x46172b(0x1fc)](_0x46172b(0x308))):console['error'](_0x46172b(0x1eb)+_0x376bdc[_0x46172b(0x1bd)]+_0x46172b(0x260)+(_0x376bdc[_0x46172b(0x1bd)]!==0x1?'s':''));if(_0x3f8779[_0x46172b(0x233)]===_0x46172b(0x2b5)||_0x3f8779[_0x46172b(0x233)]===_0x46172b(0x2aa)||_0x3f8779['format']===_0x46172b(0x2fa))await handleSDKOutput(_0x376bdc,_0x3f8779);else{if(!process[_0x46172b(0x1da)]['isTTY']||_0x3f8779[_0x46172b(0x2ca)]){if(_0x376bdc[_0x46172b(0x1bd)]===0x0){if(_0x1f7be8&&_0x4721c2)console[_0x46172b(0x1d8)](_0x46172b(0x294)+_0x1f7be8+'.'+_0x4721c2);else _0x1f7be8?console[_0x46172b(0x1d8)](_0x46172b(0x286)+_0x1f7be8):console['log'](_0x46172b(0x2b1));}else{const _0x373991=_0x3f8779[_0x46172b(0x2ed)],_0xaca2ee=this['renderSessionsTimeline'](_0x376bdc,_0x373991);_0x3f8779[_0x46172b(0x2ca)]?await writeOutput(_0xaca2ee,_0x3f8779[_0x46172b(0x2ca)],'list'):console[_0x46172b(0x1d8)](_0xaca2ee);}!_0x1f7be8&&(console[_0x46172b(0x1b4)](''),console[_0x46172b(0x1b4)](a42_0x1f5ccf[_0x46172b(0x1fc)](_0x46172b(0x230))),console[_0x46172b(0x1b4)](a42_0x1f5ccf['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x1f5ccf[_0x46172b(0x1fc)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x376bdc[_0x46172b(0x1bd)]===0x0){if(_0x1f7be8&&_0x4721c2)console[_0x46172b(0x1d8)]('No\x20sessions\x20found\x20for:\x20'+_0x1f7be8+'.'+_0x4721c2);else _0x1f7be8?console[_0x46172b(0x1d8)](_0x46172b(0x286)+_0x1f7be8):console['log']('No\x20sessions\x20found');}else await this[_0x46172b(0x27a)](_0x376bdc,_0x2cabfc,_0x1f7be8);}}return 0x0;}[a42_0x3d9e57(0x1ad)](_0x2b99d1,_0xd17b26){const _0x292a87=a42_0x3d9e57,_0x266268=[],_0x326106=new Map();let _0x21c8a9=Infinity,_0x5483a5=-Infinity;for(const _0x58b5f8 of _0x2b99d1){if(_0x58b5f8['lastAttempt']?.[_0x292a87(0x318)]){const _0x2ae731=new Date(_0x58b5f8[_0x292a87(0x32d)][_0x292a87(0x318)])[_0x292a87(0x214)](),_0x5d73b1=_0x58b5f8['lastAttempt'][_0x292a87(0x2e4)]?new Date(_0x58b5f8[_0x292a87(0x32d)][_0x292a87(0x2e4)])[_0x292a87(0x214)]():Date[_0x292a87(0x2b9)](),_0x1b4329=_0x58b5f8[_0x292a87(0x1c7)]?.[_0x292a87(0x2e0)]||_0x292a87(0x1b9);!_0x326106['has'](_0x1b4329)&&_0x326106['set'](_0x1b4329,[]),_0x326106['get'](_0x1b4329)[_0x292a87(0x289)]({'session':_0x58b5f8,'startTime':_0x2ae731,'endTime':_0x5d73b1,'duration':_0x5d73b1-_0x2ae731}),_0x21c8a9=Math['min'](_0x21c8a9,_0x2ae731),_0x5483a5=Math['max'](_0x5483a5,_0x5d73b1);}}if(_0x326106['size']===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x1c4bc5=process['stdout']['columns']||0x78,_0x573a16=0x1e,_0x1438fb=0x32,_0x4a80d9=0x4,_0x5c5ff9=Math['min'](_0x1438fb,Math[_0x292a87(0x274)](_0x573a16,Math[_0x292a87(0x2bf)](_0x1c4bc5*0.3))),_0xac4837=_0x1c4bc5-_0x5c5ff9-TIMELINE_CONFIG['GUTTER']-0x3-_0x4a80d9,_0x515984=_0x5483a5-_0x21c8a9,_0x187403=_0x515984/_0x5c5ff9,_0x178932=renderTimeAxis({'startTime':_0x21c8a9,'endTime':_0x5483a5,'durationMs':_0x515984,'msPerChar':_0x187403},_0x5c5ff9),_0x7f1160=[];for(const _0x400640 of _0x326106[_0x292a87(0x1b0)]()){_0x7f1160[_0x292a87(0x289)](..._0x400640);}_0x7f1160[_0x292a87(0x229)]((_0x2c90c0,_0x4d0bd6)=>_0x4d0bd6[_0x292a87(0x245)]-_0x2c90c0[_0x292a87(0x245)]);const _0x46dd57=new Date(_0x21c8a9),_0x11dc8c=formatDate(_0x46dd57),_0xead811=_0x4a80d9+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x292a87(0x22e)]+_0xac4837,_0x409fba='\x20'[_0x292a87(0x1f4)](_0xead811-_0x11dc8c[_0x292a87(0x1bd)]),_0x3c409e=_0x409fba+a42_0x1f5ccf['dim'](_0x11dc8c)+'\x20'+_0x178932;_0x266268['push'](_0x3c409e);const _0x5b057a=0x16;let _0x1efbad=0x0;for(const _0x475996 of _0x7f1160){const _0x206902=_0x475996[_0x292a87(0x2f1)][_0x292a87(0x1c7)]?.[_0x292a87(0x2e0)]||'?',_0x1ceeab=Math['min'](stringWidth(_0x206902),_0x5b057a);_0x1efbad=Math[_0x292a87(0x274)](_0x1efbad,_0x1ceeab);}for(const _0x84178d of _0x7f1160){const {session:_0x9ae0bb,startTime:_0x12841c,endTime:_0x453fbb,duration:_0x143d3d}=_0x84178d,_0x5a47e4=_0x9ae0bb[_0x292a87(0x1c7)]?.['id'],_0x368924=_0x9ae0bb['id'],_0x5d87d5=_0x9ae0bb['project']?.['name']||'?',_0x2a829f=_0x9ae0bb[_0x292a87(0x20e)]?.[_0x292a87(0x2e0)]||'?';let _0x41a58d,_0x1ae2cf;if(_0x9ae0bb[_0x292a87(0x32d)]){const _0x4ade69=_0x9ae0bb[_0x292a87(0x32d)];!_0x4ade69[_0x292a87(0x29d)]?(_0x41a58d=_0x4ade69[_0x292a87(0x2b4)]?'🛑':'🔄',_0x1ae2cf=_0x4ade69['cancelRequested']?a42_0x1f5ccf['yellow']:a42_0x1f5ccf['blue']):(_0x41a58d=_0x4ade69[_0x292a87(0x1d1)]?'✅':'❌',_0x1ae2cf=_0x4ade69['success']?a42_0x1f5ccf[_0x292a87(0x2dc)]:a42_0x1f5ccf[_0x292a87(0x1ce)]);}else _0x41a58d='⏳',_0x1ae2cf=a42_0x1f5ccf['dim'];const _0x181b81='#'+_0x368924,_0x155c83=_0x5a47e4?hyperlink(_0x181b81,getWorkflowSessionUrl(_0xd17b26,_0x5a47e4,_0x368924)):_0x181b81;let _0x23a187=_0x5d87d5;stringWidth(_0x5d87d5)>_0x5b057a&&(_0x23a187=_0x5d87d5['slice'](0x0,_0x5b057a-0x1)+'…');const _0x181861=a42_0x1f5ccf[_0x292a87(0x1fc)](_0x23a187),_0x373aaf=stringWidth(_0x23a187),_0x594b61='\x20'[_0x292a87(0x1f4)](_0x1efbad-stringWidth(_0x23a187)+0x2),_0x480d25='('+formatElapsed(_0x143d3d)+')',_0x1672ce=stringWidth(_0x480d25),_0x38b9ec=stringWidth(_0x181b81),_0x3e193a=_0x38b9ec+0x1+_0x373aaf+_0x594b61[_0x292a87(0x1bd)],_0x135718=_0xac4837-_0x3e193a-_0x1672ce-0x1-0x8;let _0x3c92f9=_0x2a829f;stringWidth(_0x3c92f9)>_0x135718&&(_0x3c92f9=_0x3c92f9['slice'](0x0,_0x135718-0x1)+'…');const _0x5e3e45=_0x155c83+'\x20'+_0x181861+_0x594b61+_0x3c92f9,_0x11c28e=stringWidth(_0x5e3e45),_0x405c86=_0xac4837-_0x11c28e-_0x1672ce,_0x218a69=_0x5e3e45+'\x20'[_0x292a87(0x1f4)](Math[_0x292a87(0x274)](0x1,_0x405c86))+a42_0x1f5ccf[_0x292a87(0x1fc)](_0x480d25),_0x4f0626=Math[_0x292a87(0x2bf)]((_0x12841c-_0x21c8a9)/_0x187403),_0x2b4a29=Math[_0x292a87(0x2bf)]((_0x453fbb-_0x21c8a9)/_0x187403),_0x558148=Math[_0x292a87(0x274)](_0x4f0626+0x1,_0x2b4a29),_0x5c9728=new Array(_0x5c5ff9)['fill']('\x20');for(let _0x337c0d=_0x4f0626;_0x337c0d<Math[_0x292a87(0x316)](_0x558148,_0x5c5ff9);_0x337c0d++){_0x5c9728[_0x337c0d]='─';}const _0x223bab=_0x5c9728['map'](_0x5a13cd=>_0x5a13cd==='\x20'?'\x20':_0x1ae2cf(_0x5a13cd))[_0x292a87(0x288)]('');_0x266268[_0x292a87(0x289)](_0x41a58d+'\x20'+_0x218a69+'│'+_0x223bab+'│');}return _0x266268[_0x292a87(0x288)]('\x0a');}async[a42_0x3d9e57(0x27a)](_0x33ac5b,_0x55aec5,_0x4decdd){const _0x38c225=a42_0x3d9e57,{options:_0xdaf3b7,tdx:_0x295e3d}=_0x55aec5,_0x120d13=_0xdaf3b7['site'],{timelineRows:_0x1584bf,timeAxisHeader:_0x39b4da}=this[_0x38c225(0x267)](_0x33ac5b,_0x120d13),_0x19aa5f=_0x1584bf[_0x38c225(0x30a)](_0x57f5a1=>_0x57f5a1[_0x38c225(0x228)]);if(_0x19aa5f[_0x38c225(0x1bd)]===0x0){const _0x39ebd2=this[_0x38c225(0x1ad)](_0x33ac5b,_0x120d13);console[_0x38c225(0x1d8)](_0x39ebd2);!_0x4decdd&&(console[_0x38c225(0x1b4)](''),console['error'](a42_0x1f5ccf[_0x38c225(0x1fc)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x38c225(0x1b4)](a42_0x1f5ccf['dim'](_0x38c225(0x26c))+'or'+a42_0x1f5ccf[_0x38c225(0x1fc)](_0x38c225(0x265))));return;}_0x39b4da&&console[_0x38c225(0x1d8)](_0x39b4da);const _0x4ded9a=_0x1584bf[_0x38c225(0x30a)](_0x27b841=>_0x27b841[_0x38c225(0x228)])['map'](_0x5421e3=>({'title':_0x5421e3['displayLine'],'value':_0x5421e3['attemptId']})),_0x50f6b9=process[_0x38c225(0x1da)][_0x38c225(0x22d)]||0x3c,_0x4bba8e=Math[_0x38c225(0x274)](0x28,Math[_0x38c225(0x2bf)](_0x50f6b9*0x2/0x3)),_0x1ba0df=await a42_0x40d5a1({'type':_0x38c225(0x22a),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x4ded9a,'initial':-0x1,'limit':_0x4bba8e,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x4889d2,_0x5c5f47)=>{const _0x378700=_0x38c225;if(!_0x4889d2)return Promise[_0x378700(0x210)](_0x5c5f47);const _0x2cd635=_0x5c5f47['filter'](_0x1a94e4=>{const _0x12c3db=_0x378700,_0x26de75=_0x1a94e4;return _0x26de75[_0x12c3db(0x26a)][_0x12c3db(0x317)]()['includes'](_0x4889d2[_0x12c3db(0x317)]());});return Promise[_0x378700(0x210)](_0x2cd635);}}),_0x327774=()=>{const _0x4f72a6=_0x38c225;process[_0x4f72a6(0x1da)][_0x4f72a6(0x1f6)](_0x4f72a6(0x281)),process['stdout'][_0x4f72a6(0x1f6)](_0x4f72a6(0x281)),process[_0x4f72a6(0x1da)][_0x4f72a6(0x1f6)](_0x4f72a6(0x281));},_0x4eeabd=_0x1ba0df&&_0x1ba0df[_0x38c225(0x228)]&&_0x1ba0df[_0x38c225(0x228)]!==null&&_0x1ba0df['attemptId'][_0x38c225(0x2c0)]()!=='';if(!_0x4eeabd){_0x327774(),console[_0x38c225(0x1d8)](a42_0x1f5ccf[_0x38c225(0x1fc)](_0x38c225(0x238)));return;}_0x327774();const _0x644127=_0x33ac5b['find'](_0x509041=>_0x509041['lastAttempt']?.['id']===_0x1ba0df['attemptId']);if(_0x644127){const _0x4b929c=_0x644127[_0x38c225(0x1c7)]?.[_0x38c225(0x2e0)]||'?',_0x58e378=_0x644127[_0x38c225(0x20e)]?.[_0x38c225(0x2e0)]||'?';console[_0x38c225(0x1d8)](_0x38c225(0x2e5)+a42_0x1f5ccf[_0x38c225(0x1fc)](_0x4b929c)+_0x38c225(0x328)+a42_0x1f5ccf[_0x38c225(0x1fc)](_0x58e378));}const _0x541f17=new WorkflowTimelineCommand();await _0x541f17[_0x38c225(0x190)]({'args':[],'options':{..._0xdaf3b7,'attemptId':_0x1ba0df['attemptId']},'tdx':_0x295e3d});}['generateSessionTimelineRows'](_0x35e83e,_0x2f48fc){const _0x53e9ac=a42_0x3d9e57,_0x43754c=new Map();for(const _0x4181e2 of _0x35e83e){_0x4181e2['id']&&_0x4181e2[_0x53e9ac(0x32d)]?.['id']&&_0x43754c[_0x53e9ac(0x2b2)](_0x4181e2['id'],_0x4181e2[_0x53e9ac(0x32d)]['id']);}const _0xe0dcd2=[];let _0x381960='';const _0x1a842d=this[_0x53e9ac(0x1ad)](_0x35e83e,_0x2f48fc),_0x99585b=_0x1a842d['split']('\x0a');for(const _0x4ad8ca of _0x99585b){if(_0x4ad8ca[_0x53e9ac(0x20c)](_0x53e9ac(0x2be))||_0x4ad8ca['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x381960=_0x4ad8ca;else{if(_0x4ad8ca['match'](/^[✅❌🔄🛑⏳]/)){const _0x3d8b6e=_0x4ad8ca[_0x53e9ac(0x329)](/#(\d+)/),_0x250fd1=_0x3d8b6e?_0x3d8b6e[0x1]:null,_0x459923=_0x250fd1?_0x43754c[_0x53e9ac(0x216)](_0x250fd1)||null:null,_0x186724=_0x35e83e[_0x53e9ac(0x24f)](_0x13eed5=>_0x13eed5['id']===_0x250fd1),_0x53662e=_0x186724?.[_0x53e9ac(0x1c7)]?.[_0x53e9ac(0x2e0)]||'';_0xe0dcd2['push']({'displayLine':_0x4ad8ca,'attemptId':_0x459923,'projectName':_0x53662e});}}}return{'timelineRows':_0xe0dcd2,'timeAxisHeader':_0x381960};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a42_0x3d9e57(0x2b3);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x23c);async[a42_0x3d9e57(0x190)](_0x473796){const _0x1718c9=a42_0x3d9e57,{options:_0x2fdd7d,args:_0x21ee2a,tdx:_0x3ec4d2}=_0x473796,_0x36d224=this[_0x1718c9(0x28e)](_0x21ee2a,_0x2fdd7d);if(!_0x36d224)return 0x1;const {projectName:_0x13df16,workflowName:_0x4dc000}=_0x36d224,_0x49362e=_0x2fdd7d['includeRetried'];if(_0x2fdd7d[_0x1718c9(0x271)]){if(_0x13df16&&_0x4dc000)console[_0x1718c9(0x1b4)](_0x1718c9(0x2b7)+_0x13df16+'.'+_0x4dc000);else _0x13df16&&console['error'](_0x1718c9(0x1a2)+_0x13df16);_0x49362e&&console['error']('Include\x20retried:\x20yes');}const _0x1d526f=await withSpinner(_0x1718c9(0x2e8),()=>_0x3ec4d2[_0x1718c9(0x20e)]['attempts']({'projectName':_0x13df16,'workflowName':_0x4dc000,'includeRetried':_0x49362e,'limit':_0x2fdd7d['limit']}),{'verbose':_0x2fdd7d['verbose']}),_0x4aaa68=_0x1d526f[_0x1718c9(0x19c)],_0x52f6e5=_0x2fdd7d[_0x1718c9(0x284)]||0x64,_0x5e82b8=_0x4aaa68['length']>=_0x52f6e5?a42_0x1f5ccf[_0x1718c9(0x1fc)](_0x1718c9(0x1b8)):'';console[_0x1718c9(0x1b4)](_0x1718c9(0x1eb)+_0x4aaa68[_0x1718c9(0x1bd)]+_0x1718c9(0x23e)+(_0x4aaa68[_0x1718c9(0x1bd)]!==0x1?'s':'')+_0x5e82b8);if(_0x2fdd7d[_0x1718c9(0x233)]==='json'||_0x2fdd7d[_0x1718c9(0x233)]===_0x1718c9(0x2aa)||_0x2fdd7d[_0x1718c9(0x233)]===_0x1718c9(0x2fa))await handleSDKOutput(_0x4aaa68,_0x2fdd7d);else{if(_0x4aaa68['length']===0x0){if(_0x13df16&&_0x4dc000)console[_0x1718c9(0x1d8)]('No\x20attempts\x20found\x20for:\x20'+_0x13df16+'.'+_0x4dc000);else _0x13df16?console['log'](_0x1718c9(0x21b)+_0x13df16):console['log']('No\x20attempts\x20found');}else{const _0x495f9c=_0x2fdd7d[_0x1718c9(0x2ed)],_0x5b675a=_0x4aaa68[_0x1718c9(0x198)](_0x398024=>{const _0x180f92=_0x1718c9,_0x57ac29=a42_0x1f5ccf[_0x180f92(0x1fc)]('#'+_0x398024['id']),_0x5a1d8a=_0x398024[_0x180f92(0x1c7)]?.['id'],_0x5ee50c=_0x398024['session_id']||_0x398024['sessionId'],_0x35b3af=_0x5a1d8a&&_0x5ee50c?hyperlink(_0x57ac29,getWorkflowAttemptUrl(_0x495f9c,_0x5a1d8a,_0x5ee50c,_0x398024['id'])):_0x57ac29,{icon:_0x100786,text:_0x3d0f79}=getAttemptStatusDisplay(_0x398024),_0x4569cb=(_0x398024[_0x180f92(0x1c7)]?.['name']||'?')+'.'+(_0x398024[_0x180f92(0x20e)]?.[_0x180f92(0x2e0)]||'?'),_0x516b88=_0x398024[_0x180f92(0x300)]?a42_0x1f5ccf['dim'](_0x398024[_0x180f92(0x300)]):'';return(_0x35b3af+'\x20'+_0x100786+(_0x3d0f79?'\x20'+_0x3d0f79:'')+'\x20'+_0x4569cb+'\x20'+_0x516b88)['trimEnd']();});await writeOutput(_0x5b675a[_0x1718c9(0x288)]('\x0a'),_0x2fdd7d[_0x1718c9(0x2ca)],_0x1718c9(0x2ad));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]='workflow:attempt';[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2dd);async['execute'](_0x4472af){const _0x909d9=a42_0x3d9e57,{options:_0x334d4e,args:_0x219f95,tdx:_0x2b4a82}=_0x4472af,_0x576645=_0x219f95[0x0];if(!_0x576645)return console[_0x909d9(0x1b4)](_0x909d9(0x275)),0x1;_0x334d4e[_0x909d9(0x271)]&&console[_0x909d9(0x1b4)](_0x909d9(0x292)+_0x576645);const _0x41679a=await withSpinner(_0x909d9(0x23d),()=>_0x2b4a82[_0x909d9(0x20e)][_0x909d9(0x26e)](_0x576645),{'verbose':_0x334d4e[_0x909d9(0x271)]}),_0x826802=_0x41679a['data'];let _0x1920cb;!_0x826802[_0x909d9(0x29d)]?_0x1920cb=_0x826802[_0x909d9(0x2b4)]?'canceling':'running':_0x1920cb=_0x826802[_0x909d9(0x1d1)]?'success':_0x909d9(0x1b4);let _0x201431;if(_0x826802[_0x909d9(0x318)]&&_0x826802['finishedAt']){const _0x2217a3=new Date(_0x826802['createdAt'])[_0x909d9(0x214)](),_0x49c9e2=new Date(_0x826802[_0x909d9(0x2e4)])[_0x909d9(0x214)]();_0x201431=Math[_0x909d9(0x2c2)]((_0x49c9e2-_0x2217a3)/0x3e8);}const _0xee6dad={'attempt_id':_0x826802['id'],'status':_0x1920cb,..._0x826802[_0x909d9(0x224)]!==undefined&&{'index':_0x826802[_0x909d9(0x224)]},..._0x826802['project']&&{'project':_0x826802[_0x909d9(0x1c7)][_0x909d9(0x2e0)]},..._0x826802[_0x909d9(0x20e)]&&{'workflow':_0x826802[_0x909d9(0x20e)][_0x909d9(0x2e0)]},..._0x826802[_0x909d9(0x21d)]&&{'session_id':_0x826802[_0x909d9(0x21d)]},..._0x826802['sessionTime']&&{'session_time':_0x826802[_0x909d9(0x300)]},..._0x826802[_0x909d9(0x218)]&&{'retry_attempt':_0x826802[_0x909d9(0x218)]},..._0x201431!==undefined&&{'duration_sec':_0x201431},..._0x826802[_0x909d9(0x318)]&&{'created_at':_0x826802['createdAt']},..._0x826802[_0x909d9(0x2e4)]&&{'finished_at':_0x826802[_0x909d9(0x2e4)]},...Object[_0x909d9(0x1c6)](_0x826802[_0x909d9(0x270)])[_0x909d9(0x1bd)]>0x0&&{'params':_0x826802['params']}};return await handleSingleObjectOutput(_0xee6dad,_0x334d4e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x205);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1c4);async[a42_0x3d9e57(0x190)](_0x5a5ad6){const _0x40f795=a42_0x3d9e57,{options:_0x12a9eb,args:_0x4d6a03,tdx:_0x2249f2}=_0x5a5ad6,_0x441e43=_0x4d6a03[0x0];if(!_0x441e43)return console[_0x40f795(0x1b4)](_0x40f795(0x275)),0x1;const _0x45b9af=_0x12a9eb[_0x40f795(0x1d4)];_0x12a9eb[_0x40f795(0x271)]&&(console[_0x40f795(0x1b4)](_0x40f795(0x292)+_0x441e43),_0x45b9af&&console[_0x40f795(0x1b4)]('Including\x20subtasks:\x20yes'));const _0x25b2ce=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x2249f2['workflow'][_0x40f795(0x1b7)](_0x441e43,_0x45b9af||![]),{'verbose':_0x12a9eb[_0x40f795(0x271)]}),_0x3175a7=_0x25b2ce[_0x40f795(0x19c)];return console[_0x40f795(0x1b4)](_0x40f795(0x1eb)+_0x3175a7[_0x40f795(0x1bd)]+_0x40f795(0x191)+(_0x3175a7[_0x40f795(0x1bd)]!==0x1?'s':'')),await handleSDKOutput(_0x3175a7,_0x12a9eb),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x29f);['description']=a42_0x3d9e57(0x287);async['execute'](_0x4dec40){const _0x370685=a42_0x3d9e57,{options:_0x392613,args:_0x3ed973,tdx:_0x24693d}=_0x4dec40,_0x1d25aa=_0x3ed973[0x0];let _0x1cf40b=_0x3ed973[0x1];if(!_0x1d25aa)return console[_0x370685(0x1b4)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x392613[_0x370685(0x271)]&&(console[_0x370685(0x1b4)](_0x370685(0x292)+_0x1d25aa),_0x1cf40b&&console[_0x370685(0x1b4)]('Task\x20name:\x20'+_0x1cf40b));const _0x2e21b9=await withSpinner(_0x370685(0x1dc),()=>_0x24693d[_0x370685(0x20e)][_0x370685(0x26b)](_0x1d25aa,_0x1cf40b),{'verbose':_0x392613[_0x370685(0x271)]}),_0x35b8cb=_0x2e21b9[_0x370685(0x19c)];if(_0x35b8cb['length']===0x0)return console['error']('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x1cf40b&&(_0x392613[_0x370685(0x2b5)]||_0x392613[_0x370685(0x233)]))return await handleSDKOutput(_0x35b8cb,_0x392613),0x0;if(!_0x1cf40b){const _0x3654d7=_0x35b8cb['map'](_0x429dd0=>({'title':_0x429dd0[_0x370685(0x1a1)]+'\x20('+formatBytes(_0x429dd0[_0x370685(0x307)])+')','value':_0x429dd0[_0x370685(0x1a1)]})),_0x52fa12=await a42_0x40d5a1({'type':_0x370685(0x29b),'name':'task','message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x3654d7});if(!_0x52fa12[_0x370685(0x21e)])return console[_0x370685(0x1b4)](_0x370685(0x238)),0x0;_0x1cf40b=_0x52fa12[_0x370685(0x21e)];}const _0x165f47=await withSpinner(_0x370685(0x22c),()=>_0x24693d[_0x370685(0x20e)][_0x370685(0x1b3)](_0x1d25aa,_0x1cf40b),{'verbose':_0x392613[_0x370685(0x271)]}),_0x47be96=_0x165f47[_0x370685(0x19c)];return _0x47be96?console['log'](_0x47be96):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']='workflow:kill';['description']=a42_0x3d9e57(0x31d);async[a42_0x3d9e57(0x190)](_0x312f32){const _0x1ca864=a42_0x3d9e57,{options:_0x684b74,args:_0x100070,tdx:_0x4f605e}=_0x312f32,_0x50c855=_0x100070[0x0];if(!_0x50c855)return console[_0x1ca864(0x1b4)](_0x1ca864(0x275)),0x1;const _0x13a235=_0x684b74[_0x1ca864(0x213)];_0x684b74[_0x1ca864(0x271)]&&(console[_0x1ca864(0x1b4)](_0x1ca864(0x292)+_0x50c855),_0x13a235&&console['error'](_0x1ca864(0x2bb)+_0x13a235));if(!_0x684b74[_0x1ca864(0x297)]){if(!isInteractive())return console[_0x1ca864(0x1b4)](a42_0x1f5ccf['red'](_0x1ca864(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a42_0x1f5ccf['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xac4343=await confirmKey(_0x1ca864(0x313)+_0x50c855+'?');if(!_0xac4343)return console[_0x1ca864(0x1b4)](a42_0x1f5ccf['yellow'](_0x1ca864(0x238))),0x1;}const _0x5f38cd=await withSpinner(_0x1ca864(0x29e),()=>_0x4f605e[_0x1ca864(0x20e)][_0x1ca864(0x241)](_0x50c855,_0x13a235),{'verbose':_0x684b74[_0x1ca864(0x271)]}),_0x5aa589=_0x5f38cd[_0x1ca864(0x19c)];return console[_0x1ca864(0x1b4)]('✔\x20'+_0x5aa589),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1a9);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1e4);async[a42_0x3d9e57(0x190)](_0x3ebb5e){const _0xa6b582=a42_0x3d9e57,{options:_0x62b6ee,args:_0x5e8528,tdx:_0x8092aa}=_0x3ebb5e,_0x33a1bd=_0x5e8528[0x0];if(!_0x33a1bd)return console[_0xa6b582(0x1b4)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0xa6b582(0x1b4)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x75dbd=![],_0x251d1c=_0x33a1bd;if(_0x33a1bd[_0xa6b582(0x20c)](_0xa6b582(0x295)))_0x75dbd=!![],_0x251d1c=_0x33a1bd[_0xa6b582(0x2d1)](0x8);else{if(_0x33a1bd[_0xa6b582(0x20c)](_0xa6b582(0x206)))_0x75dbd=![],_0x251d1c=_0x33a1bd[_0xa6b582(0x2d1)](0x8);else return console['error'](_0xa6b582(0x2c7)),console['error'](_0xa6b582(0x236)),0x1;}const _0xb92a46=_0x62b6ee[_0xa6b582(0x1ea)],_0x21a9f6=_0x62b6ee[_0xa6b582(0x1c2)],_0x5bb20b=_0x62b6ee[_0xa6b582(0x270)],_0x909a7f=_0x62b6ee[_0xa6b582(0x2a3)];_0x62b6ee[_0xa6b582(0x271)]&&(console['error'](_0xa6b582(0x24b)+(_0x75dbd?_0xa6b582(0x2f1):_0xa6b582(0x26e))+'\x20'+_0x251d1c),_0xb92a46&&console['error'](_0xa6b582(0x2a9)+_0xb92a46),_0x21a9f6&&console[_0xa6b582(0x1b4)](_0xa6b582(0x31a)+_0x21a9f6),_0x5bb20b&&console[_0xa6b582(0x1b4)](_0xa6b582(0x215)+_0x5bb20b),_0x909a7f&&console[_0xa6b582(0x1b4)]('Force:\x20yes'));let _0x29a6db;if(_0x5bb20b)try{if(_0x5bb20b[_0xa6b582(0x20c)]('@')){const _0x541da9=await import(_0xa6b582(0x2d9)),_0x14b31e=_0x5bb20b[_0xa6b582(0x2d1)](0x1),_0x59e9f8=await _0x541da9[_0xa6b582(0x192)](_0x14b31e,'utf-8');_0x29a6db=JSON[_0xa6b582(0x32f)](_0x59e9f8);}else _0x29a6db=JSON['parse'](_0x5bb20b);}catch{return console[_0xa6b582(0x1b4)](_0xa6b582(0x27c)),0x1;}if(!_0x62b6ee[_0xa6b582(0x297)]){if(!isInteractive())return console[_0xa6b582(0x1b4)](a42_0x1f5ccf['red'](_0xa6b582(0x1e6)),_0xa6b582(0x2ff)),console[_0xa6b582(0x1b4)](a42_0x1f5ccf[_0xa6b582(0x1fc)](_0xa6b582(0x1b1))),0x1;const _0x230505=await confirmKey(_0xa6b582(0x2cd)+(_0x75dbd?'session':_0xa6b582(0x26e))+'\x20'+_0x251d1c+'?');if(!_0x230505)return console[_0xa6b582(0x1b4)](a42_0x1f5ccf['yellow'](_0xa6b582(0x238))),0x1;}let _0x160df6;_0x75dbd?_0x160df6=await withSpinner(_0xa6b582(0x310),()=>_0x8092aa[_0xa6b582(0x20e)][_0xa6b582(0x1a5)](_0x251d1c,{'fromTask':_0xb92a46,'retryParams':_0x29a6db}),{'verbose':_0x62b6ee[_0xa6b582(0x271)]}):_0x160df6=await withSpinner('Retrying\x20attempt...',()=>_0x8092aa[_0xa6b582(0x20e)]['retryAttempt'](_0x251d1c,{'resumeFrom':_0x21a9f6,'retryParams':_0x29a6db,'force':_0x909a7f}),{'verbose':_0x62b6ee[_0xa6b582(0x271)]});const _0x1ba093=_0x160df6[_0xa6b582(0x19c)];return console[_0xa6b582(0x1b4)](_0xa6b582(0x25e)),console[_0xa6b582(0x1b4)](_0xa6b582(0x1d6)+_0x1ba093[_0xa6b582(0x228)]),console[_0xa6b582(0x1b4)](_0xa6b582(0x29a)+_0x1ba093['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1c8);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x28f);async[a42_0x3d9e57(0x190)](_0x40f0d8){const _0x28680e=a42_0x3d9e57,{options:_0x53205a,args:_0x1b1eee,tdx:_0x28ca64}=_0x40f0d8;let _0x37ab51=_0x1b1eee[0x0];if(!_0x37ab51){const _0x5ac21e=this[_0x28680e(0x2cc)]([],_0x53205a),_0x48aea2=await withSpinner(_0x28680e(0x1f7),()=>_0x28ca64[_0x28680e(0x20e)][_0x28680e(0x1cf)](_0x5ac21e,{'limit':_0x53205a[_0x28680e(0x284)]}),{'verbose':_0x53205a[_0x28680e(0x271)]}),_0xdacc17=_0x48aea2[_0x28680e(0x19c)];if(_0xdacc17[_0x28680e(0x1bd)]===0x0)return console['error']('No\x20workflows\x20found'),!_0x5ac21e&&console[_0x28680e(0x1b4)](a42_0x1f5ccf['dim'](_0x28680e(0x20b))),0x1;const _0xedce38=_0xdacc17[_0x28680e(0x198)](_0x2723dc=>({'title':_0x2723dc['project']?.['name']+'.'+_0x2723dc[_0x28680e(0x2e0)],'value':_0x2723dc[_0x28680e(0x1c7)]?.[_0x28680e(0x2e0)]+'.'+_0x2723dc[_0x28680e(0x2e0)],'description':_0x2723dc['revision']?_0x28680e(0x266)+_0x2723dc['revision']:undefined})),_0x32613d=await a42_0x40d5a1({'type':'select','name':_0x28680e(0x20e),'message':'Select\x20a\x20workflow\x20to\x20run','choices':_0xedce38});if(!_0x32613d[_0x28680e(0x20e)])return 0x1;_0x37ab51=_0x32613d[_0x28680e(0x20e)];}if(!_0x37ab51[_0x28680e(0x30d)]('.')){const _0x2c19a6=this['resolveProject']([],_0x53205a);if(_0x2c19a6)_0x37ab51=_0x2c19a6+'.'+_0x37ab51;else return console[_0x28680e(0x1b4)](a42_0x1f5ccf[_0x28680e(0x1ce)](_0x28680e(0x2a7)),_0x28680e(0x2f6)),console[_0x28680e(0x1b4)](a42_0x1f5ccf[_0x28680e(0x1fc)](_0x28680e(0x20b))),0x1;}const _0x19ede=_0x53205a[_0x28680e(0x243)],_0x50019b=_0x53205a[_0x28680e(0x300)],_0x3e9a4e={};if(_0x19ede&&Array[_0x28680e(0x2e7)](_0x19ede))for(const _0x550607 of _0x19ede){const _0x3a64e4=_0x550607[_0x28680e(0x225)]('=');if(_0x3a64e4===-0x1)return console[_0x28680e(0x1b4)](_0x28680e(0x25f)+_0x550607),console['error'](_0x28680e(0x19b)),0x1;const _0x190bf7=_0x550607[_0x28680e(0x2d1)](0x0,_0x3a64e4),_0x8f0b03=_0x550607[_0x28680e(0x2d1)](_0x3a64e4+0x1);try{_0x3e9a4e[_0x190bf7]=JSON['parse'](_0x8f0b03);}catch{_0x3e9a4e[_0x190bf7]=_0x8f0b03;}}_0x53205a[_0x28680e(0x271)]&&(console[_0x28680e(0x1b4)](_0x28680e(0x252)+_0x37ab51),Object[_0x28680e(0x1c6)](_0x3e9a4e)['length']>0x0&&console[_0x28680e(0x1b4)](_0x28680e(0x251)+JSON[_0x28680e(0x29c)](_0x3e9a4e)),_0x50019b&&console['error']('Session\x20time:\x20'+_0x50019b));const _0x44d864=await withSpinner(_0x28680e(0x209),()=>_0x28ca64[_0x28680e(0x20e)][_0x28680e(0x2f2)](_0x37ab51,_0x3e9a4e,{'sessionTime':_0x50019b}),{'verbose':_0x53205a['verbose']}),_0x17f11e=_0x44d864[_0x28680e(0x19c)];console[_0x28680e(0x1b4)](_0x28680e(0x291)),console[_0x28680e(0x1b4)](_0x28680e(0x326)+_0x17f11e['id']),console[_0x28680e(0x1b4)]('\x20\x20Session\x20ID:\x20'+_0x17f11e[_0x28680e(0x21d)]),console[_0x28680e(0x1b4)]('\x20\x20Project:\x20'+_0x17f11e[_0x28680e(0x1c7)]?.[_0x28680e(0x2e0)]),console[_0x28680e(0x1b4)](_0x28680e(0x219)+_0x17f11e[_0x28680e(0x20e)]?.[_0x28680e(0x2e0)]);if(_0x17f11e[_0x28680e(0x1c7)]?.['id']&&_0x17f11e[_0x28680e(0x21d)]&&_0x17f11e['id']){const _0x25be05=_0x53205a['site'],_0x195feb=getConsoleUrl(_0x25be05,_0x28680e(0x2bc)+_0x17f11e[_0x28680e(0x1c7)]['id']+_0x28680e(0x282)+_0x17f11e[_0x28680e(0x21d)]+'/attempt/'+_0x17f11e['id']);console[_0x28680e(0x1b4)](_0x28680e(0x200)+a42_0x1f5ccf[_0x28680e(0x1b5)](_0x195feb));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']='workflow:download';['description']=a42_0x3d9e57(0x24a);async[a42_0x3d9e57(0x190)](_0x19a93e){const _0x295457=a42_0x3d9e57,{options:_0xf739d7,args:_0x53a0ae,tdx:_0x1c10d7}=_0x19a93e,_0x200982=_0x53a0ae[0x0],_0x42b5bb=_0x53a0ae[0x1]||'.';if(!_0x200982)return console[_0x295457(0x1b4)](_0x295457(0x299)),console[_0x295457(0x1b4)](_0x295457(0x202)),0x1;const _0x290c94=_0xf739d7[_0x295457(0x280)];_0xf739d7['verbose']&&(console[_0x295457(0x1b4)]('Project:\x20'+_0x200982),console['error'](_0x295457(0x2d7)+_0x42b5bb),_0x290c94&&console['error'](_0x295457(0x1e3)+_0x290c94));const _0x4e8f9c=await withSpinner('Downloading\x20project\x20'+_0x200982+_0x295457(0x246),()=>_0x1c10d7[_0x295457(0x20e)]['download'](_0x200982,_0x42b5bb,{'revision':_0x290c94}),{'verbose':_0xf739d7['verbose']}),_0x4254bd=_0x4e8f9c[_0x295457(0x19c)];return console[_0x295457(0x1b4)](_0x295457(0x2e9)+_0x4254bd['projectName']),console['error'](_0x295457(0x1d3)+_0x4254bd[_0x295457(0x280)]),console[_0x295457(0x1b4)](_0x295457(0x254)+_0x4254bd[_0x295457(0x262)]),console[_0x295457(0x1b4)](_0x295457(0x19a)+_0x42b5bb+'/'+_0x4254bd[_0x295457(0x1af)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x204);['description']='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a42_0x3d9e57(0x190)](_0x284d6d){const _0x262e65=a42_0x3d9e57,{options:_0x487085,args:_0x192772,tdx:_0x4d9348}=_0x284d6d;let _0x52d9b9='.',_0x1e6faa=_0x487085['name'];if(_0x192772[0x0]){const {promises:_0x42ab0a}=await import('fs');try{const _0x555005=await _0x42ab0a[_0x262e65(0x250)](_0x192772[0x0]);if(_0x555005[_0x262e65(0x1bb)]())_0x52d9b9=_0x192772[0x0];else return console[_0x262e65(0x1b4)](_0x262e65(0x19f)+_0x192772[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x1e6faa=_0x192772[0x0],_0x52d9b9='.';}}const _0x5bdd1f=_0x487085[_0x262e65(0x280)],_0x399e0e=_0x487085['skipValidation'];_0x487085[_0x262e65(0x271)]&&(console[_0x262e65(0x1b4)](_0x262e65(0x2fc)+_0x52d9b9),_0x1e6faa&&console[_0x262e65(0x1b4)](_0x262e65(0x2c3)+_0x1e6faa),_0x5bdd1f&&console[_0x262e65(0x1b4)]('Revision:\x20'+_0x5bdd1f),_0x399e0e&&console[_0x262e65(0x1b4)]('Validation:\x20skipped'));const _0x584a50=await withSpinner(_0x262e65(0x2ec),()=>_0x4d9348[_0x262e65(0x20e)][_0x262e65(0x289)](_0x52d9b9,{'projectName':_0x1e6faa,'revision':_0x5bdd1f,'skipValidation':_0x399e0e}),{'verbose':_0x487085[_0x262e65(0x271)]}),_0x31e7c1=_0x584a50[_0x262e65(0x19c)];return console[_0x262e65(0x1b4)](_0x262e65(0x2a1)+_0x31e7c1[_0x262e65(0x1af)]),console[_0x262e65(0x1b4)](_0x262e65(0x2c6)+_0x31e7c1[_0x262e65(0x323)]),console['error'](_0x262e65(0x1d3)+_0x31e7c1['revision']),await this[_0x262e65(0x1c0)](_0x4d9348,_0x31e7c1[_0x262e65(0x1af)],_0x487085[_0x262e65(0x2ed)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]='workflow:pull';['description']='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a42_0x3d9e57(0x190)](_0x44e5f7){const _0x56baa7=a42_0x3d9e57,{options:_0x12dc56,args:_0x2c6a56,tdx:_0x86c328}=_0x44e5f7,_0x27ccbd=_0x2c6a56[0x0],_0x223a98=_0x2c6a56[0x1];if(!_0x27ccbd)return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1ce)](_0x56baa7(0x2a7)),_0x56baa7(0x203)),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x2c9))),0x1;const _0x257953=_0x12dc56['revision'];_0x12dc56[_0x56baa7(0x271)]&&(console[_0x56baa7(0x1b4)]('Project:\x20'+_0x27ccbd),_0x223a98&&console['error'](_0x56baa7(0x20f)+_0x223a98),_0x257953&&console[_0x56baa7(0x1b4)](_0x56baa7(0x1e3)+_0x257953),_0x12dc56[_0x56baa7(0x27b)]&&console[_0x56baa7(0x1b4)](_0x56baa7(0x24c)));const _0x29d42d=await withSpinner(_0x56baa7(0x1f5)+_0x27ccbd+_0x56baa7(0x246),()=>_0x86c328[_0x56baa7(0x20e)][_0x56baa7(0x240)](_0x27ccbd,{'targetDir':_0x223a98,'revision':_0x257953}),{'verbose':_0x12dc56[_0x56baa7(0x271)]}),_0x492673=_0x29d42d[_0x56baa7(0x19c)];_0x492673['isNewProject']?console[_0x56baa7(0x1b4)]('→\x20New\x20project:\x20'+_0x492673[_0x56baa7(0x1af)]):console[_0x56baa7(0x1b4)](_0x56baa7(0x25b)+_0x492673[_0x56baa7(0x1af)]);console[_0x56baa7(0x1b4)](_0x56baa7(0x1d3)+_0x492673[_0x56baa7(0x280)]),console[_0x56baa7(0x1b4)](_0x56baa7(0x25a)+(a42_0x5b90c4[_0x56baa7(0x1df)](process[_0x56baa7(0x217)](),_0x492673[_0x56baa7(0x2d3)])||'.')),console[_0x56baa7(0x1b4)](_0x56baa7(0x2b0)+a42_0x1f5ccf[_0x56baa7(0x2dc)]('+'+_0x492673[_0x56baa7(0x2d5)][_0x56baa7(0x2e3)]+_0x56baa7(0x28a))+',\x20'+(a42_0x1f5ccf[_0x56baa7(0x220)]('~'+_0x492673[_0x56baa7(0x2d5)][_0x56baa7(0x23a)]+'\x20modified')+',\x20')+(a42_0x1f5ccf[_0x56baa7(0x1ce)]('-'+_0x492673['summary'][_0x56baa7(0x1cb)]+_0x56baa7(0x315))+',\x20')+(''+a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x492673[_0x56baa7(0x2d5)][_0x56baa7(0x1b6)]+_0x56baa7(0x32e))));for(const _0x2bb393 of _0x492673[_0x56baa7(0x2de)]){_0x2bb393[_0x56baa7(0x1be)]==='modified'&&_0x2bb393[_0x56baa7(0x1c9)]&&(console['error']('\x0a'+a42_0x1f5ccf[_0x56baa7(0x1b5)](_0x56baa7(0x1fb)+_0x2bb393[_0x56baa7(0x2eb)])),console[_0x56baa7(0x1b4)](_0x2bb393[_0x56baa7(0x1c9)]));}if(!_0x492673[_0x56baa7(0x273)])return saveSessionContext({'workflow_project':_0x492673[_0x56baa7(0x1af)]},_0x12dc56[_0x56baa7(0x2f1)]),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x2dc)](_0x56baa7(0x27d))),console['error'](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x197)+_0x492673['projectName'])),0x0;if(_0x12dc56[_0x56baa7(0x27b)])return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x220)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x12dc56[_0x56baa7(0x297)]){if(!isInteractive())return console['error'](a42_0x1f5ccf[_0x56baa7(0x1ce)](_0x56baa7(0x1e6)),_0x56baa7(0x2ff)),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x1b1))),0x1;const _0x19b254=await confirmKey(_0x56baa7(0x21c));if(!_0x19b254)return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x220)]('Cancelled'),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x56baa7(0x1fd),()=>_0x86c328[_0x56baa7(0x20e)]['applyPullProject'](_0x492673,{'revision':_0x257953}),{'verbose':_0x12dc56[_0x56baa7(0x271)]}),saveSessionContext({'workflow_project':_0x492673[_0x56baa7(0x1af)]},_0x12dc56[_0x56baa7(0x2f1)]),console['error'](a42_0x1f5ccf['green'](_0x56baa7(0x1f9)));const _0x28f7fd=a42_0x5b90c4[_0x56baa7(0x1df)](process[_0x56baa7(0x217)](),_0x492673['targetDir'])||'.';return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x19a)+_0x28f7fd)),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x197)+_0x492673[_0x56baa7(0x1af)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1d2);['description']='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async['execute'](_0x58f2b1){const _0x41f2a4=a42_0x3d9e57,{options:_0xa155a9,args:_0x3e7882,tdx:_0x1bbbf6}=_0x58f2b1,_0x4de411=this[_0x41f2a4(0x332)](_0x3e7882,_0xa155a9),_0x5ab06a=_0xa155a9[_0x41f2a4(0x280)],_0x2cf390=_0xa155a9[_0x41f2a4(0x2d8)];_0xa155a9[_0x41f2a4(0x271)]&&(_0x4de411&&console[_0x41f2a4(0x1b4)](_0x41f2a4(0x2fb)+_0x4de411),_0x5ab06a&&console['error'](_0x41f2a4(0x1e3)+_0x5ab06a),_0xa155a9['dryRun']&&console[_0x41f2a4(0x1b4)]('Dry\x20run:\x20yes'),_0x2cf390&&console[_0x41f2a4(0x1b4)](_0x41f2a4(0x2af)));let _0x5df36d;try{_0x5df36d=await withSpinner('Analyzing\x20changes...',()=>_0x1bbbf6[_0x41f2a4(0x20e)][_0x41f2a4(0x255)]({'sourceDir':_0x4de411,'revision':_0x5ab06a,'skipValidation':_0x2cf390}),{'verbose':_0xa155a9[_0x41f2a4(0x271)]});}catch(_0x1aa1e7){if(_0x1aa1e7 instanceof Error&&_0x1aa1e7[_0x41f2a4(0x2e1)][_0x41f2a4(0x30d)](_0x41f2a4(0x306)))return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1ce)]('Error:'),_0x41f2a4(0x2cb)),_0xa155a9['workflowProject']?console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x41f2a4(0x194)+_0xa155a9['workflowProject']+_0x41f2a4(0x248)+_0xa155a9[_0x41f2a4(0x21f)]+'\x27')):console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x41f2a4(0x2a8))),0x1;throw _0x1aa1e7;}const _0x3ed5a5=_0x5df36d[_0x41f2a4(0x19c)];console[_0x41f2a4(0x1b4)](_0x41f2a4(0x231)+_0x3ed5a5['projectName']),console[_0x41f2a4(0x1b4)]('\x20\x20Source:\x20'+_0x3ed5a5[_0x41f2a4(0x298)]),console['error'](_0x41f2a4(0x1d3)+_0x3ed5a5[_0x41f2a4(0x280)]),console[_0x41f2a4(0x1b4)]('\x20\x20Changes:\x20'+a42_0x1f5ccf['green']('+'+_0x3ed5a5[_0x41f2a4(0x2d5)][_0x41f2a4(0x2e3)]+'\x20new')+',\x20'+(a42_0x1f5ccf['yellow']('~'+_0x3ed5a5[_0x41f2a4(0x2d5)]['modified']+_0x41f2a4(0x18e))+',\x20')+(a42_0x1f5ccf[_0x41f2a4(0x1ce)]('-'+_0x3ed5a5[_0x41f2a4(0x2d5)]['deleted']+_0x41f2a4(0x315))+',\x20')+(''+a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x3ed5a5[_0x41f2a4(0x2d5)]['unchanged']+_0x41f2a4(0x32e))));for(const _0x60d43c of _0x3ed5a5[_0x41f2a4(0x2de)]){_0x60d43c[_0x41f2a4(0x1be)]==='modified'&&_0x60d43c[_0x41f2a4(0x1c9)]&&(console[_0x41f2a4(0x1b4)]('\x0a'+a42_0x1f5ccf['cyan'](_0x41f2a4(0x1fb)+_0x60d43c[_0x41f2a4(0x2eb)])),console[_0x41f2a4(0x1b4)](_0x60d43c[_0x41f2a4(0x1c9)]));}if(!_0x3ed5a5['hasChanges'])return console['error'](a42_0x1f5ccf[_0x41f2a4(0x2dc)](_0x41f2a4(0x1e8))),await this[_0x41f2a4(0x1c0)](_0x1bbbf6,_0x3ed5a5[_0x41f2a4(0x1af)],_0xa155a9[_0x41f2a4(0x2ed)]),0x0;if(_0xa155a9[_0x41f2a4(0x27b)])return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x220)](_0x41f2a4(0x2ab))),0x0;if(!_0xa155a9[_0x41f2a4(0x297)]){if(!isInteractive())return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1ce)](_0x41f2a4(0x1e6)),_0x41f2a4(0x2ff)),console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x41f2a4(0x1b1))),0x1;const _0xb8cdc6=await confirmKey(_0x41f2a4(0x1cc));if(!_0xb8cdc6)return console['error'](a42_0x1f5ccf[_0x41f2a4(0x220)]('Cancelled'),_0x41f2a4(0x1f1)),0x1;}const _0x5ecb80=await withSpinner(_0x41f2a4(0x253),()=>_0x1bbbf6[_0x41f2a4(0x20e)][_0x41f2a4(0x232)](_0x3ed5a5),{'verbose':_0xa155a9[_0x41f2a4(0x271)]}),_0x4b057e=_0x5ecb80[_0x41f2a4(0x19c)];return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x2dc)]('✔\x20Push\x20complete')),console[_0x41f2a4(0x1b4)](_0x41f2a4(0x2c6)+_0x4b057e['projectId']),console[_0x41f2a4(0x1b4)]('\x20\x20Revision:\x20'+_0x4b057e[_0x41f2a4(0x280)]),await this['showWorkflowConsoleUrl'](_0x1bbbf6,_0x4b057e[_0x41f2a4(0x1af)],_0xa155a9['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x24e);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1fa);async[a42_0x3d9e57(0x190)](_0x597a00){const _0x37b7c0=a42_0x3d9e57,{options:_0x3d566d,args:_0x4f43cc,tdx:_0x55eba9}=_0x597a00,_0x399dd2=this['resolveProjectDir'](_0x4f43cc,_0x3d566d),_0x5927eb=_0x3d566d[_0x37b7c0(0x2e0)],_0x3e09df=_0x3d566d[_0x37b7c0(0x280)],_0x4995e0=_0x3d566d[_0x37b7c0(0x2d8)];if(!_0x399dd2)return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1ce)]('Error:'),_0x37b7c0(0x1ac)),console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x1e5))),console['error'](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x25d))),0x1;if(!_0x5927eb)return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf['red']('Error:'),_0x37b7c0(0x1e2)),console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x1e5))),0x1;_0x3d566d[_0x37b7c0(0x271)]&&(console[_0x37b7c0(0x1b4)]('Source\x20directory:\x20'+_0x399dd2),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x272)+_0x5927eb),_0x3e09df&&console[_0x37b7c0(0x1b4)](_0x37b7c0(0x1e3)+_0x3e09df),_0x3d566d[_0x37b7c0(0x27b)]&&console[_0x37b7c0(0x1b4)](_0x37b7c0(0x24c)),_0x4995e0&&console['error'](_0x37b7c0(0x2af)));const _0x4e645b=await withSpinner('Analyzing\x20project...',()=>_0x55eba9['workflow'][_0x37b7c0(0x2da)](_0x399dd2,_0x5927eb,{'revision':_0x3e09df,'skipValidation':_0x4995e0}),{'verbose':_0x3d566d['verbose']}),_0x4bf50a=_0x4e645b[_0x37b7c0(0x19c)];console['error']('Source:\x20'+_0x4bf50a['sourceDir']);_0x4bf50a['sourceProjectName']&&console[_0x37b7c0(0x1b4)](_0x37b7c0(0x211)+_0x4bf50a[_0x37b7c0(0x333)]);console['error'](_0x37b7c0(0x272)+_0x4bf50a[_0x37b7c0(0x31f)]),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x1e3)+_0x4bf50a[_0x37b7c0(0x280)]),console[_0x37b7c0(0x1b4)]('Files\x20to\x20upload:\x20'+_0x4bf50a[_0x37b7c0(0x18f)]);_0x4bf50a[_0x37b7c0(0x1f8)]&&(console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x220)](_0x37b7c0(0x1de)+_0x4bf50a[_0x37b7c0(0x31f)]+_0x37b7c0(0x227)+_0x4bf50a['existingProjectId']+')')),console['error'](a42_0x1f5ccf[_0x37b7c0(0x220)](_0x37b7c0(0x2bd))));if(_0x3d566d[_0x37b7c0(0x27b)])return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x220)](_0x37b7c0(0x1d9))),0x0;if(!_0x3d566d[_0x37b7c0(0x297)]){if(!isInteractive())return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1ce)](_0x37b7c0(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x1b1))),0x1;const _0x1b606b=_0x4bf50a[_0x37b7c0(0x333)]||a42_0x5b90c4[_0x37b7c0(0x226)](_0x399dd2),_0x175a28=_0x4bf50a[_0x37b7c0(0x1f8)]?_0x37b7c0(0x2db)+_0x5927eb+_0x37b7c0(0x1cd):_0x37b7c0(0x259)+_0x1b606b+_0x37b7c0(0x330)+_0x5927eb+'\x22?',_0x1a727a=await confirmKey(_0x175a28);if(!_0x1a727a)return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x220)]('Cancelled')),0x1;}const _0x122f4b=await withSpinner(_0x4bf50a[_0x37b7c0(0x1f8)]?_0x37b7c0(0x19d)+_0x5927eb+_0x37b7c0(0x246):_0x37b7c0(0x302)+_0x5927eb+_0x37b7c0(0x246),()=>_0x55eba9[_0x37b7c0(0x20e)][_0x37b7c0(0x1fe)](_0x4bf50a),{'verbose':_0x3d566d[_0x37b7c0(0x271)]}),_0x567fed=_0x122f4b['data'];return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x2dc)](_0x4bf50a['targetExists']?'✔\x20Project\x20updated':_0x37b7c0(0x30c))),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x301)+_0x567fed[_0x37b7c0(0x31f)]),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x2c6)+_0x567fed[_0x37b7c0(0x247)]),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x1d3)+_0x567fed[_0x37b7c0(0x280)]),await this[_0x37b7c0(0x1c0)](_0x55eba9,_0x567fed[_0x37b7c0(0x31f)],_0x3d566d['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a42_0x3d9e57(0x31b);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2ea);async[a42_0x3d9e57(0x190)](_0x4fd98b){const _0x814868=a42_0x3d9e57,{options:_0x43d8a2,args:_0x1e6618,tdx:_0x3754f6}=_0x4fd98b,_0xcbf015=_0x1e6618[0x0];if(!_0xcbf015)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x43d8a2[_0x814868(0x271)]&&console[_0x814868(0x1b4)](_0x814868(0x2e5)+_0xcbf015);if(!_0x43d8a2[_0x814868(0x297)]){if(!isInteractive())return console[_0x814868(0x1b4)](a42_0x1f5ccf['red'](_0x814868(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x814868(0x1b4)](a42_0x1f5ccf[_0x814868(0x1fc)](_0x814868(0x1b1))),0x1;const _0x3f8a84=await confirmKey(_0x814868(0x1e9)+_0xcbf015+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3f8a84)return console[_0x814868(0x1b4)](a42_0x1f5ccf[_0x814868(0x220)](_0x814868(0x238))),0x1;}const _0x388a09=await withSpinner(_0x814868(0x30f)+_0xcbf015+_0x814868(0x246),()=>_0x3754f6[_0x814868(0x20e)]['delete'](_0xcbf015),{'verbose':_0x43d8a2['verbose']}),_0xfdafab=_0x388a09['data'];return console[_0x814868(0x1b4)](_0x814868(0x27f)+_0xfdafab[_0x814868(0x1af)]),console['error'](_0x814868(0x2c6)+_0xfdafab[_0x814868(0x323)]),0x0;}}export function parseKeyValue(_0xb64d0f){const _0x5d0e7e=a42_0x3d9e57,_0x59315f=_0xb64d0f['indexOf']('=');if(_0x59315f===-0x1)throw new Error(_0x5d0e7e(0x1aa)+_0xb64d0f+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x3b24c7=_0xb64d0f[_0x5d0e7e(0x2d1)](0x0,_0x59315f),_0x480125=_0xb64d0f['substring'](_0x59315f+0x1);if(!_0x3b24c7)throw new Error(_0x5d0e7e(0x201));return{'key':_0x3b24c7,'value':_0x480125};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x28c);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2c1);async[a42_0x3d9e57(0x190)](_0x3e54e2){const _0x28bf64=a42_0x3d9e57,{options:_0x577027,args:_0x311fd7,tdx:_0x2f9e49}=_0x3e54e2,_0x18262a=this['requireProject'](_0x311fd7,_0x577027);if(!_0x18262a)return 0x1;_0x577027[_0x28bf64(0x271)]&&console[_0x28bf64(0x1b4)]('Project:\x20'+_0x18262a);const _0x3b5854=await withSpinner(_0x28bf64(0x1a6),()=>_0x2f9e49[_0x28bf64(0x20e)]['listSecrets'](_0x18262a),{'verbose':_0x577027[_0x28bf64(0x271)]}),{secrets:_0x2a442c}=_0x3b5854[_0x28bf64(0x19c)];return console[_0x28bf64(0x1b4)](_0x28bf64(0x1eb)+_0x2a442c[_0x28bf64(0x1bd)]+'\x20secret'+(_0x2a442c[_0x28bf64(0x1bd)]!==0x1?'s':'')),await handleSDKOutput(_0x2a442c,_0x577027),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0x3d9e57(0x331);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x278);async[a42_0x3d9e57(0x190)](_0x1f7d15){const _0x2ee59f=a42_0x3d9e57,{options:_0x30be40,args:_0x25e46b,tdx:_0x547356}=_0x1f7d15;let _0x582b95,_0x4ea9cb;if(_0x25e46b[_0x2ee59f(0x1bd)]>=0x2)_0x582b95=_0x25e46b[0x0],_0x4ea9cb=_0x25e46b[0x1];else{if(_0x25e46b[_0x2ee59f(0x1bd)]===0x1&&_0x30be40[_0x2ee59f(0x21f)])_0x582b95=_0x30be40[_0x2ee59f(0x21f)],_0x4ea9cb=_0x25e46b[0x0];else return _0x25e46b['length']===0x1?(console[_0x2ee59f(0x1b4)](_0x2ee59f(0x299)),console[_0x2ee59f(0x1b4)](_0x2ee59f(0x20b)),0x1):(console[_0x2ee59f(0x1b4)](_0x2ee59f(0x208)),console['error'](_0x2ee59f(0x296)),0x1);}let _0x3f79a9,_0x18e3d7;try{({key:_0x3f79a9,value:_0x18e3d7}=parseKeyValue(_0x4ea9cb));}catch(_0x2e23fe){return _0x2e23fe instanceof Error&&console[_0x2ee59f(0x1b4)](a42_0x1f5ccf[_0x2ee59f(0x1ce)]('Error:'),_0x2e23fe['message']),0x1;}_0x30be40[_0x2ee59f(0x271)]&&(console['error']('Project:\x20'+_0x582b95),console[_0x2ee59f(0x1b4)](_0x2ee59f(0x1c5)+_0x3f79a9));const _0x291640=await withSpinner(_0x2ee59f(0x1a7),()=>_0x547356[_0x2ee59f(0x20e)][_0x2ee59f(0x1a3)](_0x582b95,_0x3f79a9,_0x18e3d7),{'verbose':_0x30be40[_0x2ee59f(0x271)]}),_0x1545ab=_0x291640[_0x2ee59f(0x19c)];return console['error'](_0x2ee59f(0x277)+_0x1545ab[_0x2ee59f(0x32c)]+_0x2ee59f(0x2e2)+_0x1545ab[_0x2ee59f(0x1af)]+'\x27'),(_0x30be40[_0x2ee59f(0x2b5)]||_0x30be40[_0x2ee59f(0x2aa)])&&await handleSingleObjectOutput(_0x1545ab,_0x30be40),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x283);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2fd);async[a42_0x3d9e57(0x190)](_0xf864fd){const _0x6f09e3=a42_0x3d9e57,{options:_0x1ee44d,args:_0x4ed6de,tdx:_0x1ee9e2}=_0xf864fd;let _0x5959d6,_0x4a720b;if(_0x4ed6de[_0x6f09e3(0x1bd)]>=0x2)_0x5959d6=_0x4ed6de[0x0],_0x4a720b=_0x4ed6de[0x1];else{if(_0x4ed6de[_0x6f09e3(0x1bd)]===0x1&&_0x1ee44d[_0x6f09e3(0x21f)])_0x5959d6=_0x1ee44d[_0x6f09e3(0x21f)],_0x4a720b=_0x4ed6de[0x0];else return _0x4ed6de['length']===0x1?(console['error'](_0x6f09e3(0x299)),console['error'](_0x6f09e3(0x20b)),0x1):(console[_0x6f09e3(0x1b4)](_0x6f09e3(0x26f)),console['error']('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x1ee44d[_0x6f09e3(0x271)]&&(console[_0x6f09e3(0x1b4)](_0x6f09e3(0x2e5)+_0x5959d6),console[_0x6f09e3(0x1b4)](_0x6f09e3(0x1c5)+_0x4a720b));if(!_0x1ee44d[_0x6f09e3(0x297)]){if(!isInteractive())return console[_0x6f09e3(0x1b4)](a42_0x1f5ccf[_0x6f09e3(0x1ce)](_0x6f09e3(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a42_0x1f5ccf['dim'](_0x6f09e3(0x1b1))),0x1;const _0x2f2e44=await confirmKey(_0x6f09e3(0x1f0)+_0x4a720b+_0x6f09e3(0x31c)+_0x5959d6+'\x27?');if(!_0x2f2e44)return console['error'](a42_0x1f5ccf[_0x6f09e3(0x220)](_0x6f09e3(0x238))),0x1;}const _0x3b321e=await withSpinner(_0x6f09e3(0x2a6),()=>_0x1ee9e2[_0x6f09e3(0x20e)][_0x6f09e3(0x1bc)](_0x5959d6,_0x4a720b),{'verbose':_0x1ee44d[_0x6f09e3(0x271)]}),_0x1338cf=_0x3b321e[_0x6f09e3(0x19c)];return console[_0x6f09e3(0x1b4)]('✔\x20Secret\x20\x27'+_0x1338cf[_0x6f09e3(0x32c)]+_0x6f09e3(0x31e)+_0x1338cf[_0x6f09e3(0x1af)]+'\x27'),(_0x1ee44d['json']||_0x1ee44d['jsonl'])&&await handleSingleObjectOutput(_0x1338cf,_0x1ee44d),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(_0x34b7b2){const _0x59995b=a42_0x3d9e57,_0x572263=Math[_0x59995b(0x2bf)](_0x34b7b2/0x3e8),_0x478987=Math[_0x59995b(0x2bf)](_0x572263/0x3c),_0x17128c=Math['floor'](_0x478987/0x3c),_0x39d84b=Math[_0x59995b(0x2bf)](_0x17128c/0x18);if(_0x39d84b>0x0){const _0x25689a=_0x17128c%0x18;return _0x25689a>0x0?_0x39d84b+'d\x20'+_0x25689a+'h':_0x39d84b+'d';}else{if(_0x17128c>0x0){const _0x192189=_0x478987%0x3c;return _0x192189>0x0?_0x17128c+'h\x20'+_0x192189+'m':_0x17128c+'h';}else{if(_0x478987>0x0){const _0x4e7b67=_0x572263%0x3c;return _0x4e7b67>0x0?_0x478987+'m\x20'+_0x4e7b67+'s':_0x478987+'m';}else return _0x572263+'s';}}}function formatTimestamp(_0x292270,_0x3d387a){const _0x45aa22=a42_0x3d9e57,_0x27119c=new Date(_0x292270),_0x4f6532=String(_0x27119c[_0x45aa22(0x244)]())[_0x45aa22(0x2ba)](0x2,'0'),_0x15cd3b=String(_0x27119c[_0x45aa22(0x1e0)]())[_0x45aa22(0x2ba)](0x2,'0'),_0x4eafe8=_0x4f6532+':'+_0x15cd3b,_0x31b941=_0x27119c[_0x45aa22(0x2f7)]()===_0x3d387a[_0x45aa22(0x2f7)]()&&_0x27119c[_0x45aa22(0x19e)]()===_0x3d387a['getMonth']()&&_0x27119c['getDate']()===_0x3d387a[_0x45aa22(0x2ef)]();if(_0x31b941)return _0x4eafe8;else{const _0x598aad=String(_0x27119c[_0x45aa22(0x19e)]()+0x1)[_0x45aa22(0x2ba)](0x2,'0'),_0x2d1a81=String(_0x27119c[_0x45aa22(0x2ef)]())['padStart'](0x2,'0');return _0x598aad+'-'+_0x2d1a81+'\x20'+_0x4eafe8;}}function formatDate(_0x530733){const _0x3bce8f=a42_0x3d9e57,_0x3d163d=_0x530733[_0x3bce8f(0x2f7)](),_0x116fca=String(_0x530733[_0x3bce8f(0x19e)]()+0x1)['padStart'](0x2,'0'),_0x23993b=String(_0x530733[_0x3bce8f(0x2ef)]())[_0x3bce8f(0x2ba)](0x2,'0');return _0x3d163d+'-'+_0x116fca+'-'+_0x23993b;}function getTaskStateIcon(_0x88c296){const _0x17c159={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x17c159[_0x88c296]||'⚪';}function getBarChar(_0x482cee){const _0x566f72=a42_0x3d9e57;return _0x482cee===_0x566f72(0x1b4)||_0x482cee==='group_error'?'×':'─';}function getBarColor(_0x440abb){const _0x448240=a42_0x3d9e57,_0x28e663={'success':a42_0x1f5ccf[_0x448240(0x2dc)],'error':a42_0x1f5ccf['red'],'group_error':a42_0x1f5ccf[_0x448240(0x1ce)],'running':a42_0x1f5ccf['blue'],'blocked':a42_0x1f5ccf[_0x448240(0x220)],'planned':a42_0x1f5ccf[_0x448240(0x1fc)],'canceling':a42_0x1f5ccf['yellow']};return _0x28e663[_0x440abb]||a42_0x1f5ccf[_0x448240(0x199)];}function parseTaskName(_0x29cf08){const _0x339cb5=a42_0x3d9e57;let _0x5db68b=_0x29cf08[_0x339cb5(0x2f8)](/^\++/,'');const _0x3e7c00=_0x5db68b['split']('+'),_0x501754=_0x3e7c00[_0x339cb5(0x1bd)]>0x1?_0x3e7c00[_0x339cb5(0x1bd)]-0x2:0x0,_0x19a833=_0x3e7c00[_0x3e7c00[_0x339cb5(0x1bd)]-0x1]||_0x5db68b;return{'level':_0x501754,'name':'+'+_0x19a833};}function a42_0x1dca(){const _0x4ae853=['Project\x20directory:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','665TZIIUl','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','sessionTime','\x20\x20Project:\x20','Cloning\x20to\x20','Total:\x20','splice','sys','No\x20workflow\x20tdx.json\x20found','fileSize','(use\x20--limit\x20to\x20see\x20more)','text','filter','\x20has\x20no\x20attempts','✔\x20Clone\x20complete','includes','20CMrzQN','Deleting\x20project\x20','Retrying\x20session...','No\x20workflow\x20projects\x20found','all','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','slice','\x20deleted','min','toLowerCase','createdAt','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Resume\x20from:\x20','workflow:delete','\x27\x20from\x20project\x20\x27','Kill\x20a\x20running\x20attempt','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','newProjectName','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','renderSingleTimeline','LABEL_WIDTH_DIVISOR','projectId','\x20from\x20session\x20','\x20-\x20','\x20\x20Attempt\x20ID:\x20','state',',\x20Workflow:\x20','match','\x20of\x20','✔\x20Workflow\x20project\x20context\x20cleared.','key','lastAttempt','\x20unchanged','parse','\x22\x20to\x20new\x20project\x20\x22','workflow:secrets:set','resolveProjectDir','sourceProjectName','fullName','metadata','\x20modified','fileCount','execute','\x20task','readFile','pollTimeline','Tip:\x20cd\x20to\x20workflows/','updatedAt','renderTimeline','\x20\x20Session\x20context\x20set\x20to:\x20','map','white','\x20\x20Location:\x20','Expected\x20format:\x20--param\x20key=value','data','Updating\x20','getMonth','Error:\x20','734118CKiHwQ','taskName','Filter:\x20project=','setSecret','total','retrySession','Listing\x20secrets...','Setting\x20secret...','Latest\x20session\x20has\x20no\x20attempt','workflow:retry','Invalid\x20format:\x20','window','Source\x20directory\x20is\x20required','renderSessionsTimeline','from','projectName','values','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','workflow:use','logs','error','cyan','unchanged','tasks','\x20(use\x20--limit\x20to\x20show\x20more)','(unknown)','sessions','isDirectory','deleteSecret','length','type','No\x20workflows\x20found','showWorkflowConsoleUrl','57712GsmAyF','resumeFrom','isTTY','Show\x20tasks\x20for\x20an\x20attempt','Key:\x20','keys','project','workflow:run','diff','Pattern:\x20','deleted','\x0aPush\x20these\x20changes?','\x22\x20with\x20new\x20revision?','red','workflows','List\x20all\x20workflow\x20projects','success','workflow:push','\x20\x20Revision:\x20','includeSubtasks','workflow:workflows','\x20\x20New\x20attempt\x20ID:\x20','MAX_TASKS_DISPLAY','log','\x0aDry\x20run\x20-\x20no\x20project\x20created','stdout','value','Fetching\x20log\x20files...','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','\x0a⚠\x20Project\x20\x22','relative','getMinutes','Loading\x20sessions...','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Revision:\x20','Retry\x20a\x20session\x20or\x20attempt','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x0aError:','No\x20workflows\x20found\x20in\x20project:\x20','\x0a✔\x20No\x20changes\x20to\x20push','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','fromTask','✔\x20Found\x20','projects','Usage:\x20tdx\x20wf\x20use\x20<project>','Session\x20','760DEAiOs','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','-\x20nothing\x20pushed','resolveProjectId','description','repeat','Pulling\x20project\x20','write','Loading\x20workflows...','targetExists','✔\x20Pull\x20complete','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','---\x20','dim','Writing\x20files...','executeCloneProject','planned','\x20\x20Console:\x20','Key\x20cannot\x20be\x20empty','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Project\x20name\x20is\x20required','workflow:upload','workflow:tasks','attempt:','localeCompare','Error:\x20KEY=VALUE\x20is\x20required','Starting\x20workflow\x20run...','17852439rNNFml','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','startsWith','durationMs','workflow','Target\x20directory:\x20','resolve','Source\x20project:\x20','start','reason','getTime','Params:\x20','get','cwd','retryAttemptName','\x20\x20Workflow:\x20','canceling','No\x20attempts\x20found\x20in\x20project:\x20','\x0aApply\x20these\x20changes?','sessionId','task','workflowProject','yellow','pending','80019PGHhwv','status','index','indexOf','basename','\x22\x20already\x20exists\x20(ID:\x20','attemptId','sort','autocomplete','2189420BIWRmK','Downloading\x20logs...','rows','ICON_SPACING','\x20workflow','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','✔\x20Project:\x20','executePushProject','format','msPerChar','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','3qLThwy','Cancelled','toISOString','modified','end','List\x20workflow\x20attempts','Getting\x20attempt\x20details...','\x20attempt','1582942wvVRQe','pullProject','kill','LABEL_MIN_SPACING','param','getHours','startTime','...','newProjectId','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','running','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Target:\x20','Dry\x20run:\x20yes','fill','workflow:clone','find','stat','Parameters:\x20','Workflow:\x20','Pushing\x20project...','\x20\x20Files\x20extracted:\x20','preparePushProject','workflow:timeline','unknown','📁\x20','\x0aClone\x20\x22','\x20\x20Target:\x20','→\x20Project:\x20','context','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','✔\x20Retry\x20started','Error:\x20Invalid\x20parameter\x20format:\x20','\x20session','List\x20workflow\x20execution\x20sessions','filesExtracted','startedAt','blue','\x20\x20tdx\x20wf\x20use\x20<project>','revision:\x20','generateSessionTimelineRows','POLL_INTERVAL_MS','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','title','logFiles','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Status:\x20','attempt','Error:\x20Secret\x20key\x20is\x20required','params','verbose','New\x20project\x20name:\x20','hasChanges','max','Error:\x20Attempt\x20ID\x20is\x20required','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','✔\x20Secret\x20\x27','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Resolving\x20project\x20\x27','navigateSessionsInteractive','dryRun','Error:\x20Invalid\x20JSON\x20in\x20--params','\x0a✔\x20Already\x20up\x20to\x20date','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Deleted\x20project\x20','revision','\x1b[1A\x1b[2K','/sessions/','workflow:secrets:delete','limit','workflowName','No\x20sessions\x20found\x20in\x20project:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','join','push','\x20new','Listing\x20workflows...','workflow:secrets:list','columns','parseProjectWorkflowPattern','Start\x20a\x20workflow\x20run','follow','✔\x20Workflow\x20run\x20started','Attempt\x20ID:\x20','Attempt:\x20','No\x20sessions\x20found\x20for:\x20','session:','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','yes','sourceDir','Error:\x20Project\x20name\x20is\x20required','\x20\x20Session\x20ID:\x20','select','stringify','done','Killing\x20attempt...','workflow:logs','icon','✔\x20Pushed\x20','Project\x20filter:\x20','force','\x20to\x20see\x20detailed\x20logs','988344OsvaqX','Deleting\x20secret...','Error:','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','From\x20task:\x20','jsonl','\x0aDry\x20run\x20-\x20nothing\x20pushed','some','list','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Validation:\x20skipped','\x20\x20Changes:\x20','No\x20sessions\x20found','set','workflow:attempts','cancelRequested','json','MIN_LABEL_COUNT','Filter:\x20','Listing\x20workflow\x20sessions...','now','padStart','Reason:\x20','/app/workflows/','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','floor','trim','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','round','Project\x20name:\x20','MAX_TIMELINE_WIDTH','buildTimelineData','\x20\x20Project\x20ID:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','output','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','resolveProject','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Auto-selected\x20latest\x20session:\x20','\x20project','\x27...','substring','workflow:sessions','targetDir','MAX_LABEL_COUNT','summary','Select\x20a\x20session\x20to\x20view\x20timeline:','Output\x20directory:\x20','skipValidation','fs/promises','prepareCloneProject','\x0aUpdate\x20existing\x20project\x20\x22','green','Show\x20specific\x20attempt\x20details','changes','Session\x20not\x20found:\x20','name','message','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','new','finishedAt','Project:\x20','requireProject','isArray','Listing\x20workflow\x20attempts...','✔\x20Downloaded\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','path','Pushing\x20workflow\x20project...','site','MIN_TIMELINE_WIDTH','getDate','ICON_WIDTH','session','run','split','tdx\x20wf\x20attempt\x20','duration','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','getFullYear','replace','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','table','Source\x20directory:\x20'];a42_0x1dca=function(){return _0x4ae853;};return a42_0x1dca();}function truncateTaskName(_0x5a1c48,_0x386838){const _0x211db4=a42_0x3d9e57,_0x166e0f=stringWidth(_0x5a1c48);if(_0x166e0f<=_0x386838)return _0x5a1c48;let _0x5c9378=_0x5a1c48;while(stringWidth(_0x5c9378+'…')>_0x386838&&_0x5c9378[_0x211db4(0x1bd)]>0x0){_0x5c9378=_0x5c9378[_0x211db4(0x314)](0x0,-0x1);}return _0x5c9378+'…';}function calculateTimeScale(_0x16ebb9,_0x7bde69){const _0x5497bf=a42_0x3d9e57;return{'startTime':_0x16ebb9[_0x5497bf(0x212)],'endTime':_0x16ebb9[_0x5497bf(0x23b)],'durationMs':_0x16ebb9[_0x5497bf(0x2f5)],'msPerChar':_0x16ebb9[_0x5497bf(0x2f5)]/_0x7bde69};}function timeToPosition(_0x594301,_0x24e058,_0x37bddd){const _0x1b573d=a42_0x3d9e57,_0x1ca5a3=_0x594301-_0x24e058[_0x1b573d(0x245)],_0x58e09f=Math[_0x1b573d(0x2bf)](_0x1ca5a3/_0x24e058[_0x1b573d(0x234)]);return Math['max'](0x0,Math[_0x1b573d(0x316)](_0x58e09f,_0x37bddd));}function renderTimeAxis(_0x16528d,_0x500a18){const _0x572fc4=a42_0x3d9e57,_0x402fa9=Math[_0x572fc4(0x316)](TIMELINE_CONFIG[_0x572fc4(0x2d4)],Math[_0x572fc4(0x274)](TIMELINE_CONFIG[_0x572fc4(0x2b6)],Math[_0x572fc4(0x2bf)](_0x500a18/TIMELINE_CONFIG[_0x572fc4(0x322)]))),_0x23d260=_0x16528d[_0x572fc4(0x20d)]/(_0x402fa9-0x1),_0x449725=new Date(_0x16528d[_0x572fc4(0x245)]),_0x3364fd=[];for(let _0x283851=0x0;_0x283851<_0x402fa9;_0x283851++){const _0x176b70=_0x16528d[_0x572fc4(0x245)]+_0x283851*_0x23d260,_0x11c403=timeToPosition(_0x176b70,_0x16528d,_0x500a18),_0x233e32=formatTimestamp(_0x176b70,_0x449725);_0x3364fd[_0x572fc4(0x289)]({'pos':_0x11c403,'text':_0x233e32});}const _0x2530d2=new Array(_0x500a18)[_0x572fc4(0x24d)]('\x20');let _0x185b14=-0x1;for(const {pos:_0x24565b,text:_0x42f6b9}of _0x3364fd){let _0x288d2f=Math[_0x572fc4(0x274)](0x0,_0x24565b-Math[_0x572fc4(0x2bf)](_0x42f6b9['length']/0x2));_0x288d2f<=_0x185b14+TIMELINE_CONFIG[_0x572fc4(0x242)]&&(_0x288d2f=_0x185b14+TIMELINE_CONFIG[_0x572fc4(0x242)]+0x1);_0x288d2f+_0x42f6b9[_0x572fc4(0x1bd)]>_0x500a18&&(_0x288d2f=_0x500a18-_0x42f6b9[_0x572fc4(0x1bd)]);if(_0x288d2f>=0x0&&_0x288d2f+_0x42f6b9[_0x572fc4(0x1bd)]<=_0x500a18&&_0x288d2f>_0x185b14){for(let _0x437164=0x0;_0x437164<_0x42f6b9['length'];_0x437164++){_0x2530d2[_0x288d2f+_0x437164]=_0x42f6b9[_0x437164];}_0x185b14=_0x288d2f+_0x42f6b9[_0x572fc4(0x1bd)]-0x1;}}return _0x2530d2['join']('');}function renderTaskRow(_0x3d2df0,_0x5450cd,_0x246fac,_0x35b7c9){const _0x4c7117=a42_0x3d9e57,{level:_0x5789d5,name:_0x802896}=parseTaskName(_0x3d2df0[_0x4c7117(0x2e0)]),_0x3ed995='\x20'[_0x4c7117(0x1f4)](_0x5789d5),_0x57a71e=_0x3d2df0[_0x4c7117(0x1ab)]?'('+formatElapsed(_0x3d2df0[_0x4c7117(0x1ab)]['duration'])+')':'',_0x5e0a90=stringWidth(_0x57a71e),_0x31ee04=_0x5789d5*0x1,_0x1d7de0=_0x35b7c9-_0x31ee04-_0x5e0a90-0x1,_0x11c4b0=truncateTaskName(_0x802896,_0x1d7de0),_0x154860=_0x3ed995+_0x11c4b0,_0x3964a8=stringWidth(_0x154860),_0x5e6005=_0x35b7c9-_0x3964a8-_0x5e0a90,_0x34979c=_0x154860+'\x20'['repeat'](Math['max'](0x1,_0x5e6005))+a42_0x1f5ccf[_0x4c7117(0x1fc)](_0x57a71e),_0x2129a8=getTaskStateIcon(_0x3d2df0[_0x4c7117(0x327)]),_0x47f254=new Array(_0x246fac)[_0x4c7117(0x24d)]('\x20');if(_0x3d2df0[_0x4c7117(0x1ab)]){const _0x5232b8=timeToPosition(_0x3d2df0[_0x4c7117(0x1ab)][_0x4c7117(0x212)],_0x5450cd,_0x246fac),_0x538eff=timeToPosition(_0x3d2df0[_0x4c7117(0x1ab)][_0x4c7117(0x23b)],_0x5450cd,_0x246fac),_0x36bd20=getBarChar(_0x3d2df0[_0x4c7117(0x327)]),_0x51ea8b=Math[_0x4c7117(0x274)](_0x5232b8+0x1,_0x538eff);for(let _0x45db42=_0x5232b8;_0x45db42<Math['min'](_0x51ea8b,_0x246fac);_0x45db42++){_0x47f254[_0x45db42]=_0x36bd20;}}const _0x3471e6=getBarColor(_0x3d2df0['state']),_0x346dac=_0x47f254[_0x4c7117(0x198)](_0x2a646e=>_0x2a646e==='\x20'?'\x20':_0x3471e6(_0x2a646e))[_0x4c7117(0x288)]('');return _0x2129a8+'\x20'+_0x34979c+'│'+_0x346dac+'│';}function calculateStats(_0xe2329e){const _0x2a93ea=a42_0x3d9e57,_0x1d4d84={'total':_0xe2329e['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x47020b of _0xe2329e){if(_0x47020b[_0x2a93ea(0x327)]==='success')_0x1d4d84['success']++;else{if(_0x47020b[_0x2a93ea(0x327)]===_0x2a93ea(0x1b4)||_0x47020b['state']==='group_error')_0x1d4d84[_0x2a93ea(0x1b4)]++;else _0x47020b[_0x2a93ea(0x327)]===_0x2a93ea(0x249)?_0x1d4d84[_0x2a93ea(0x249)]++:_0x1d4d84[_0x2a93ea(0x221)]++;}}return _0x1d4d84;}function formatStats(_0x56ab3d){const _0x29e0f2=a42_0x3d9e57;return[_0x29e0f2(0x303)+_0x56ab3d[_0x29e0f2(0x1a4)],'✅\x20'+_0x56ab3d[_0x29e0f2(0x1d1)],'❌\x20'+_0x56ab3d[_0x29e0f2(0x1b4)],'🔄\x20'+_0x56ab3d[_0x29e0f2(0x249)],'⏳\x20'+_0x56ab3d[_0x29e0f2(0x221)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0x3d9e57(0x256);['description']=a42_0x3d9e57(0x235);async[a42_0x3d9e57(0x190)](_0x3c2375){const _0x3deda0=a42_0x3d9e57,{options:_0x114f6d,args:_0x1c857f,tdx:_0x12c76e}=_0x3c2375;let _0x139222,_0x21cde7,_0x6c46b7=![];if(_0x1c857f[0x0]){if(_0x1c857f[0x0]['includes']('.')){const _0x4474ee=this['parseProjectWorkflowPattern'](_0x1c857f,_0x114f6d);if(!_0x4474ee)return 0x1;_0x139222=_0x4474ee['projectName'],_0x21cde7=_0x4474ee[_0x3deda0(0x285)];}else{_0x21cde7=_0x1c857f[0x0],_0x139222=_0x114f6d['workflowProject'];if(!_0x139222)return console[_0x3deda0(0x1b4)](a42_0x1f5ccf[_0x3deda0(0x1ce)](_0x3deda0(0x2a7)),_0x3deda0(0x2f9)),0x1;_0x6c46b7=!![];}}else{const _0xd2792e=this['parseProjectWorkflowPattern'](_0x1c857f,_0x114f6d);if(!_0xd2792e)return 0x1;_0x139222=_0xd2792e[_0x3deda0(0x1af)],_0x21cde7=_0xd2792e[_0x3deda0(0x285)];}if(_0x114f6d[_0x3deda0(0x271)]){if(_0x139222&&_0x21cde7)console[_0x3deda0(0x1b4)]('Filter:\x20'+_0x139222+'.'+_0x21cde7);else _0x139222&&console[_0x3deda0(0x1b4)]('Filter:\x20project='+_0x139222);}const _0x3274b6=_0x114f6d[_0x3deda0(0x228)],_0xf9df7=_0x114f6d['sessionId'];if(_0x3274b6){_0xf9df7&&console['error'](a42_0x1f5ccf['yellow']('Warning:'),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x4961cb=_0x114f6d[_0x3deda0(0x290)];return _0x4961cb?await this[_0x3deda0(0x193)](_0x3c2375,_0x3274b6):await this['renderSingleTimeline'](_0x3c2375,_0x3274b6,_0x114f6d),0x0;}if(_0xf9df7){const _0x5317dc=await withSpinner('Loading\x20session...',()=>_0x12c76e[_0x3deda0(0x20e)][_0x3deda0(0x1ba)]({'projectName':_0x139222,'workflowName':_0x21cde7,'limit':0x64}),{'verbose':_0x114f6d[_0x3deda0(0x271)]}),_0x205b0d=_0x5317dc[_0x3deda0(0x19c)][_0x3deda0(0x24f)](_0x386d5e=>_0x386d5e['id']===_0xf9df7);if(!_0x205b0d)return console[_0x3deda0(0x1b4)](a42_0x1f5ccf['red'](_0x3deda0(0x2a7)),_0x3deda0(0x2df)+_0xf9df7),0x1;if(!_0x205b0d[_0x3deda0(0x32d)]?.['id'])return console['error'](a42_0x1f5ccf[_0x3deda0(0x1ce)](_0x3deda0(0x2a7)),_0x3deda0(0x1ee)+_0xf9df7+_0x3deda0(0x30b)),0x1;const _0x12a7a2=_0x205b0d[_0x3deda0(0x32d)]['id'];_0x114f6d[_0x3deda0(0x271)]&&console[_0x3deda0(0x1b4)]('Using\x20attempt\x20'+_0x12a7a2+_0x3deda0(0x324)+_0xf9df7);const _0x3f01c7=_0x114f6d[_0x3deda0(0x290)];return _0x3f01c7?await this[_0x3deda0(0x193)](_0x3c2375,_0x12a7a2):await this['renderSingleTimeline'](_0x3c2375,_0x12a7a2,_0x114f6d),0x0;}const _0x2f12e7=await withSpinner(_0x3deda0(0x1e1),()=>_0x12c76e['workflow'][_0x3deda0(0x1ba)]({'projectName':_0x139222,'workflowName':_0x21cde7,'limit':_0x114f6d[_0x3deda0(0x284)]||0x32}),{'verbose':_0x114f6d['verbose']}),_0x3366d1=_0x2f12e7[_0x3deda0(0x19c)];if(_0x3366d1['length']===0x0){if(_0x139222&&_0x21cde7)console[_0x3deda0(0x1b4)](_0x3deda0(0x294)+_0x139222+'.'+_0x21cde7);else _0x139222?console[_0x3deda0(0x1b4)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x139222):(console[_0x3deda0(0x1b4)]('No\x20workflow\x20sessions\x20found'),console[_0x3deda0(0x1b4)](a42_0x1f5ccf[_0x3deda0(0x1fc)](_0x3deda0(0x2c8))));return 0x0;}_0x3366d1[_0x3deda0(0x229)]((_0x273cb1,_0x235941)=>{const _0x201e9e=_0x273cb1['sessionTime']||'',_0x207b5a=_0x235941['sessionTime']||'';return _0x207b5a['localeCompare'](_0x201e9e);});if(_0x114f6d[_0x3deda0(0x2b5)]||_0x114f6d[_0x3deda0(0x2aa)])return await handleSDKOutput(_0x3366d1,_0x114f6d),0x0;let _0x76e38e;if(_0x6c46b7){const _0x40ebab=_0x3366d1[0x0];if(!_0x40ebab[_0x3deda0(0x32d)]?.['id'])return console['error'](_0x3deda0(0x1a8)),0x0;_0x76e38e=_0x40ebab['lastAttempt']['id'],_0x114f6d[_0x3deda0(0x271)]&&console[_0x3deda0(0x1b4)](_0x3deda0(0x2ce)+_0x40ebab['sessionTime']);}else{const _0x3baa1b=_0x3366d1[_0x3deda0(0x198)](_0x48ce72=>{const _0x193d47=_0x3deda0,_0x249199=getAttemptStatusDisplay(_0x48ce72[_0x193d47(0x32d)]);return{'title':_0x48ce72[_0x193d47(0x1c7)]?.['name']+'.'+_0x48ce72['workflow']?.[_0x193d47(0x2e0)]+_0x193d47(0x325)+_0x48ce72[_0x193d47(0x300)]+'\x20'+_0x249199[_0x193d47(0x2a0)],'value':_0x48ce72[_0x193d47(0x32d)]?.['id']||'','description':_0x249199[_0x193d47(0x309)]};}),_0x3159d9=await a42_0x40d5a1({'type':_0x3deda0(0x29b),'name':_0x3deda0(0x228),'message':_0x3deda0(0x2d6),'choices':_0x3baa1b[_0x3deda0(0x30a)](_0x562651=>_0x562651[_0x3deda0(0x1db)]!=='')});if(!_0x3159d9[_0x3deda0(0x228)])return 0x0;_0x76e38e=_0x3159d9[_0x3deda0(0x228)];}const _0x15ddeb=_0x114f6d[_0x3deda0(0x290)];return _0x15ddeb?await this['pollTimeline'](_0x3c2375,_0x76e38e):await this[_0x3deda0(0x321)](_0x3c2375,_0x76e38e,_0x114f6d),0x0;}async[a42_0x3d9e57(0x321)](_0x3fdefc,_0x28d22a,_0x11a617){const _0x42d359=a42_0x3d9e57,{tdx:_0x578053}=_0x3fdefc;let _0x18e9df,_0x16e623;try{[_0x18e9df,_0x16e623]=await Promise['all']([_0x578053['workflow']['attempt'](_0x28d22a),_0x578053[_0x42d359(0x20e)]['tasks'](_0x28d22a,![])]);}catch(_0x97e21c){console['error'](a42_0x1f5ccf[_0x42d359(0x1ce)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x11a617[_0x42d359(0x271)]&&console[_0x42d359(0x1b4)](_0x97e21c);throw _0x97e21c;}if(_0x11a617[_0x42d359(0x2b5)]||_0x11a617[_0x42d359(0x2aa)]){const _0x5cb388=this[_0x42d359(0x2c5)](_0x18e9df,_0x16e623);await handleSDKOutput([_0x5cb388],_0x11a617);return;}const _0x2eb610=_0x578053[_0x42d359(0x25c)][_0x42d359(0x2ed)],_0x51be3d=this[_0x42d359(0x196)](_0x18e9df,_0x16e623,_0x2eb610);console[_0x42d359(0x1d8)](_0x51be3d);}async[a42_0x3d9e57(0x193)](_0x210ce3,_0x4e8d59){const _0x560fab=a42_0x3d9e57,{tdx:_0x5707ad}=_0x210ce3,_0x50a39e=TIMELINE_CONFIG[_0x560fab(0x268)],_0xce58cd=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x568c77=0x0;while(_0x568c77<_0xce58cd){process[_0x560fab(0x1da)][_0x560fab(0x1c3)]&&process[_0x560fab(0x1da)][_0x560fab(0x1f6)]('\x1bc');let _0x8e9513,_0x4dbaf4;try{[_0x8e9513,_0x4dbaf4]=await Promise[_0x560fab(0x312)]([_0x5707ad[_0x560fab(0x20e)][_0x560fab(0x26e)](_0x4e8d59),_0x5707ad[_0x560fab(0x20e)][_0x560fab(0x1b7)](_0x4e8d59,![])]);}catch(_0x5ddabc){console['error'](a42_0x1f5ccf[_0x560fab(0x1ce)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x568c77>0x0&&console[_0x560fab(0x1b4)](a42_0x1f5ccf[_0x560fab(0x1fc)](_0x560fab(0x276)+_0x568c77));throw _0x5ddabc;}const _0x5ecbfd=_0x5707ad[_0x560fab(0x25c)]['site'],_0x3773aa=this['renderTimeline'](_0x8e9513,_0x4dbaf4,_0x5ecbfd);console[_0x560fab(0x1d8)](_0x3773aa);const _0x49a7fb=_0x8e9513[_0x560fab(0x29d)]&&_0x4dbaf4['every'](_0x2ccf27=>_0x2ccf27[_0x560fab(0x327)]!==_0x560fab(0x249)&&_0x2ccf27[_0x560fab(0x327)]!==_0x560fab(0x1ff));if(_0x49a7fb){console[_0x560fab(0x1b4)](a42_0x1f5ccf[_0x560fab(0x2dc)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x560fab(0x1b4)](a42_0x1f5ccf['dim']('\x0aPolling...\x20('+_0x568c77*0x2+_0x560fab(0x319))),await new Promise(_0x5c6004=>setTimeout(_0x5c6004,_0x50a39e)),_0x568c77++;}_0x568c77>=_0xce58cd&&console[_0x560fab(0x1b4)](a42_0x1f5ccf[_0x560fab(0x220)](_0x560fab(0x269)));}['renderTimeline'](_0x2e6249,_0x84bdd,_0x56397f){const _0x258a74=a42_0x3d9e57,_0xe9b9b2=[],_0x461f0a=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x20006b=0x5,_0x39f525=process['stdout'][_0x258a74(0x28d)]||0x78,_0x59df69=_0x39f525-_0x461f0a-_0x20006b,_0x45dec6=Math[_0x258a74(0x274)](TIMELINE_CONFIG[_0x258a74(0x2ee)],Math[_0x258a74(0x316)](_0x59df69,TIMELINE_CONFIG[_0x258a74(0x2c4)])),_0x59266e=new Date(_0x2e6249[_0x258a74(0x318)])[_0x258a74(0x214)](),_0x2d64e5=_0x2e6249[_0x258a74(0x2e4)]?new Date(_0x2e6249[_0x258a74(0x2e4)])['getTime']():Date['now'](),_0x37ac51={'start':_0x59266e,'end':_0x2d64e5,'duration':_0x2d64e5-_0x59266e},_0x2ae305=new Map(),_0x550019=[];for(const _0x9acc14 of _0x84bdd){if(_0x9acc14[_0x258a74(0x263)]){const _0x216dba=new Date(_0x9acc14[_0x258a74(0x263)])['getTime'](),_0x16be69=_0x9acc14[_0x258a74(0x195)]?new Date(_0x9acc14[_0x258a74(0x195)])['getTime']():Date[_0x258a74(0x2b9)](),_0x420031={'start':_0x216dba,'end':_0x16be69,'duration':_0x16be69-_0x216dba};_0x2ae305[_0x258a74(0x2b2)](_0x9acc14['id'],_0x420031),_0x550019[_0x258a74(0x289)]({'name':_0x9acc14[_0x258a74(0x18c)],'state':_0x9acc14['state']||_0x258a74(0x257),'window':_0x420031});}else _0x550019[_0x258a74(0x289)]({'name':_0x9acc14[_0x258a74(0x18c)],'state':_0x9acc14['state']||'planned','window':undefined});}_0x550019[_0x258a74(0x229)]((_0x2e96b7,_0x238e9e)=>{const _0x313ac9=_0x258a74;if(!_0x2e96b7['window'])return 0x1;if(!_0x238e9e['window'])return-0x1;return _0x2e96b7[_0x313ac9(0x1ab)][_0x313ac9(0x212)]-_0x238e9e[_0x313ac9(0x1ab)][_0x313ac9(0x212)];});const _0x2e0356=_0x550019[_0x258a74(0x1bd)],_0x425fdc=_0x2e0356>TIMELINE_CONFIG[_0x258a74(0x1d7)];_0x425fdc&&_0x550019[_0x258a74(0x304)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x3f406f=calculateTimeScale(_0x37ac51,_0x45dec6),_0x402c3b=_0x2e6249[_0x258a74(0x29d)]?_0x2e6249['success']?a42_0x1f5ccf[_0x258a74(0x2dc)](_0x258a74(0x1d1)):a42_0x1f5ccf[_0x258a74(0x1ce)](_0x258a74(0x1b4)):a42_0x1f5ccf[_0x258a74(0x264)](_0x258a74(0x249)),_0x28bb17=_0x2e6249[_0x258a74(0x1c7)]?.['id'],_0x208eeb=_0x2e6249[_0x258a74(0x21d)];let _0x9eca20;if(_0x28bb17&&_0x208eeb){const _0x5e3056=getWorkflowAttemptUrl(_0x56397f,_0x28bb17,_0x208eeb,_0x2e6249['id']);_0x9eca20=hyperlink(a42_0x1f5ccf[_0x258a74(0x1fc)](_0x2e6249['id']),_0x5e3056);}else _0x9eca20=a42_0x1f5ccf[_0x258a74(0x1fc)](_0x2e6249['id']);_0xe9b9b2['push'](_0x258a74(0x293)+_0x9eca20+_0x258a74(0x325)+_0x402c3b+_0x258a74(0x325)+formatElapsed(_0x37ac51['duration']));if(_0x550019[_0x258a74(0x1bd)]>0x0){const _0x2a7d4c=renderTimeAxis(_0x3f406f,_0x45dec6),_0x13c5f4=new Date(_0x37ac51['start']),_0xc94e1e=formatDate(_0x13c5f4),_0x13f974=TIMELINE_CONFIG[_0x258a74(0x2f0)]+TIMELINE_CONFIG[_0x258a74(0x22e)]+_0x461f0a,_0x2bc0be=_0xc94e1e[_0x258a74(0x2ba)](_0x13f974),_0x57d9be=a42_0x1f5ccf[_0x258a74(0x1fc)](_0x2bc0be);_0xe9b9b2[_0x258a74(0x289)](_0x57d9be+'\x20'+_0x2a7d4c);for(const _0xc1ab78 of _0x550019){_0xe9b9b2[_0x258a74(0x289)](renderTaskRow(_0xc1ab78,_0x3f406f,_0x45dec6,_0x461f0a));}const _0x28b289=calculateStats(_0x550019);_0xe9b9b2[_0x258a74(0x289)](formatStats(_0x28b289)),_0x425fdc&&_0xe9b9b2[_0x258a74(0x289)](a42_0x1f5ccf[_0x258a74(0x220)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x258a74(0x1d7)]+_0x258a74(0x32a)+_0x2e0356+'\x20tasks')),_0xe9b9b2[_0x258a74(0x289)](''),_0xe9b9b2[_0x258a74(0x289)](a42_0x1f5ccf[_0x258a74(0x1fc)]('💡\x20Tip:\x20Use\x20')+(_0x258a74(0x2f4)+_0x2e6249['id']+'\x20logs')+a42_0x1f5ccf[_0x258a74(0x1fc)](_0x258a74(0x2a4)));}else _0xe9b9b2[_0x258a74(0x289)](_0x258a74(0x320));return _0xe9b9b2[_0x258a74(0x288)]('\x0a');}['buildTimelineData'](_0x388633,_0xed0ff6){const _0x47630f=a42_0x3d9e57,_0x18ce16=new Date(_0x388633['createdAt'])[_0x47630f(0x214)](),_0xb1caf7=_0x388633[_0x47630f(0x2e4)]?new Date(_0x388633[_0x47630f(0x2e4)])[_0x47630f(0x214)]():Date[_0x47630f(0x2b9)](),_0x352cd4=_0xb1caf7-_0x18ce16,_0x35aa98=[];for(const _0x697bfb of _0xed0ff6){if(_0x697bfb[_0x47630f(0x263)]){const _0x1550d3=new Date(_0x697bfb[_0x47630f(0x263)])['getTime'](),_0x1d9824=_0x697bfb[_0x47630f(0x195)]?new Date(_0x697bfb[_0x47630f(0x195)])[_0x47630f(0x214)]():Date[_0x47630f(0x2b9)]();_0x35aa98[_0x47630f(0x289)]({'name':_0x697bfb[_0x47630f(0x18c)],'state':_0x697bfb[_0x47630f(0x327)]||'unknown','window':{'start':_0x1550d3,'end':_0x1d9824,'duration':_0x1d9824-_0x1550d3}});}else _0x35aa98['push']({'name':_0x697bfb[_0x47630f(0x18c)],'state':_0x697bfb['state']||_0x47630f(0x1ff),'window':undefined});}const _0x463b02=calculateStats(_0x35aa98);return{'attempt':{'id':_0x388633['id'],'status':_0x388633[_0x47630f(0x29d)]?_0x388633[_0x47630f(0x1d1)]?_0x47630f(0x1d1):_0x47630f(0x1b4):_0x47630f(0x249),'createdAt':_0x388633[_0x47630f(0x318)],'finishedAt':_0x388633[_0x47630f(0x2e4)],'duration_ms':_0x352cd4},'tasks':_0x35aa98[_0x47630f(0x198)](_0x3453bd=>({'name':_0x3453bd[_0x47630f(0x2e0)],'state':_0x3453bd[_0x47630f(0x327)],'startedAt':_0x3453bd[_0x47630f(0x1ab)]?new Date(_0x3453bd[_0x47630f(0x1ab)]['start'])[_0x47630f(0x239)]():null,'updatedAt':_0x3453bd[_0x47630f(0x1ab)]?new Date(_0x3453bd[_0x47630f(0x1ab)][_0x47630f(0x23b)])[_0x47630f(0x239)]():null,'duration_ms':_0x3453bd[_0x47630f(0x1ab)]?.[_0x47630f(0x2f5)]||null})),'stats':_0x463b02};}}
1
+ const a42_0x548fe7=a42_0x3632;(function(_0x220811,_0xf56ec6){const _0xb87c72=a42_0x3632,_0xd0e709=_0x220811();while(!![]){try{const _0xeb8ff8=parseInt(_0xb87c72(0x304))/0x1+-parseInt(_0xb87c72(0x205))/0x2*(parseInt(_0xb87c72(0x353))/0x3)+-parseInt(_0xb87c72(0x226))/0x4*(parseInt(_0xb87c72(0x21f))/0x5)+parseInt(_0xb87c72(0x37d))/0x6+-parseInt(_0xb87c72(0x2a8))/0x7+parseInt(_0xb87c72(0x2be))/0x8*(-parseInt(_0xb87c72(0x2f0))/0x9)+parseInt(_0xb87c72(0x2b3))/0xa;if(_0xeb8ff8===_0xf56ec6)break;else _0xd0e709['push'](_0xd0e709['shift']());}catch(_0x1ad299){_0xd0e709['push'](_0xd0e709['shift']());}}}(a42_0x46c0,0x291cf));import a42_0x5737de from'chalk';import{existsSync}from'fs';import a42_0x32a3eb from'path';import{BaseCommand}from'./command.js';function a42_0x46c0(){const _0x3a4e79=['No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Reason:\x20','running','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','workflow:kill','generateSessionTimelineRows','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Parameters:\x20','localeCompare','\x20attempt','projects','Project\x20name\x20is\x20required','Using\x20attempt\x20','\x20\x20Session\x20context\x20set\x20to:\x20','isTTY','limit','---\x20','planned','getDate','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','startedAt','createdAt','getFullYear','\x20tasks','sessionTime','resumeFrom','relative','\x0aPolling...\x20(','toLowerCase','499142RAylvk','now','message','tasks','List\x20workflow\x20execution\x20sessions','\x0a⚠\x20Project\x20\x22','Project:\x20','MAX_POLL_ITERATIONS','jsonl','Error:\x20Secret\x20key\x20is\x20required','\x20has\x20no\x20attempts','5653880LNcEaN','list','durationMs','No\x20sessions\x20found','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','reason','Attempt:\x20','Source\x20directory:\x20','prepareCloneProject','Error:\x20Invalid\x20JSON\x20in\x20--params','→\x20Project:\x20','136QFqEgW','projectId','substring','applyPullProject','sort','blue','unchanged','run','\x20(use\x20--limit\x20to\x20show\x20more)','listSecrets','📁\x20','window','workflow:tasks','Getting\x20attempt\x20details...','ICON_SPACING','Source\x20project:\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','Pull\x20workflow\x20project\x20to\x20local\x20folder','Show\x20tasks\x20for\x20an\x20attempt','Error:\x20Invalid\x20parameter\x20format:\x20','dim','indexOf','Killing\x20attempt...','No\x20sessions\x20found\x20in\x20project:\x20','from','getMonth','Session\x20not\x20found:\x20','\x0aError:','description','fileSize','Invalid\x20format:\x20','Key:\x20','msPerChar','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','buildTimelineData','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','red','Output\x20directory:\x20','No\x20workflow\x20sessions\x20found','renderSingleTimeline','rows','Error:\x20Attempt\x20ID\x20is\x20required','List\x20all\x20workflow\x20projects','size','workflowProject','Error:\x20','revision','metadata','✔\x20Project\x20updated','Warning:','146871hrjLdX','kill','\x1b[1A\x1b[2K','newProjectId','/attempt/','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Include\x20retried:\x20yes','logFiles','✔\x20Found\x20','padStart','workflow:use','write','Listing\x20secrets...','Auto-selected\x20latest\x20session:\x20','duration','Downloading\x20logs...','workflow:workflows','summary','session','workflow:secrets:delete','267821eVjKPO','yes','site','\x20(system)','filesExtracted','⚠\x20Showing\x20first\x20','✔\x20Retry\x20started','renderTimeline','resolveProjectDir','Force:\x20yes','\x0a✔\x20Attempt\x20complete','text','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','No\x20attempts\x20found','No\x20workflow\x20projects\x20found','name','yellow','autocomplete','workflows','min','Resume\x20from:\x20','Files\x20to\x20upload:\x20','updatedAt','Failed\x20to\x20fetch\x20attempt\x20data','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20\x20Revision:\x20','isNewProject','.\x20Expected\x20format:\x20KEY=VALUE','\x27\x20from\x20project\x20\x27','setSecret','has','MIN_LABEL_COUNT','\x0aDry\x20run\x20-\x20nothing\x20pushed','set','Error:\x20Project\x20name\x20is\x20required','✔\x20Push\x20complete','\x20\x20tdx\x20wf\x20use\x20<project>','\x20\x20New\x20attempt\x20ID:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','No\x20workflows\x20found','startTime','\x22\x20already\x20exists\x20(ID:\x20','✔\x20Secret\x20\x27','-\x20nothing\x20pushed','getMinutes','workflow:timeline','MAX_TASKS_DISPLAY','error','cyan','pullProject','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','modified','retryAttempt','title','deleteSecret','find','skipValidation','\x20deleted','group_error','\x20workflow','path','preparePushProject','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','success','Fetching\x20log\x20files...','navigateSessionsInteractive','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','\x20\x20Project:\x20','changes','\x20unchanged','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','✔\x20Showing\x20','✔\x20Workflow\x20project\x20context\x20cleared.','fullName','attempt','end','workflow','\x22?\x20This\x20cannot\x20be\x20undone.','\x22\x20to\x20new\x20project\x20\x22','111MbBaAM','\x20to\x20see\x20detailed\x20logs','(use\x20--limit\x20to\x20see\x20more)','session_id','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Cloning\x20to\x20','parseProjectWorkflowPattern','sourceProjectName','pollTimeline','Tip:\x20cd\x20to\x20workflows/','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','start','executeCloneProject','Source\x20directory\x20is\x20required','workflow:attempt','green','New\x20project\x20name:\x20','tdx.json','(unknown)','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','unknown','renderSessionsTimeline','every','total','type','-\x20no\x20files\x20written','max','List\x20workflows','POLL_INTERVAL_MS','\x20logs','finishedAt','executePushProject','log','dryRun','\x0a✔\x20No\x20changes\x20to\x20push','params','replace','readFile','\x20\x20Workflow:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project\x20ID:\x20','Target:\x20','51036opjSsk','Attempt\x20ID:\x20','\x20-\x20','value','workflow:download','push','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','filter','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Task\x20name:\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Select\x20a\x20workflow\x20to\x20run','List\x20workflow\x20attempts','includeRetried','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Select\x20a\x20task\x20to\x20view\x20logs:','requireProject','Listing\x20workflow\x20projects...','No\x20matching\x20sessions\x20found','resolve','sessions','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','map','deleted','task','targetDir','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','match','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','/sessions/','Latest\x20session\x20has\x20no\x20attempt','Filter:\x20project=','From\x20task:\x20','targetExists','Source:\x20','\x20\x20Location:\x20','follow','toISOString','Resolving\x20project\x20\x27','splice','stdout','fileCount','workflow:clone','✔\x20Clone\x20complete','pending','basename','Retrying\x20session...','✔\x20Workflow\x20run\x20started','Retrying\x20attempt...','stringify','cwd','✔\x20Pushed\x20','\x20task','No\x20log\x20files\x20found\x20for\x20this\x20attempt','10038krHTzl','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','...','newProjectName','Total:\x20','ICON_WIDTH','\x20\x20Console:\x20','round','cancelRequested','workflow:retry','\x20new','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Analyzing\x20changes...','No\x20projects\x20match\x20pattern:\x20','resolveProjectId','length','No\x20sessions\x20found\x20for:\x20','\x20session','keys','Including\x20subtasks:\x20yes','\x20\x20Source:\x20','verbose','Deleting\x20project\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','→\x20New\x20project:\x20','\x20is\x20not\x20a\x20directory','694420wcKTiS','startsWith','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Session\x20','output','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','project','4xSAFum','force','Validation:\x20skipped','trimEnd','tdx\x20wf\x20attempt\x20','slice','white','MIN_TIMELINE_WIDTH','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','key','json','No\x20attempts\x20found\x20in\x20project:\x20','TASK_NAME_WIDTH','Params:\x20','canceling','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','clear','Dry\x20run:\x20yes','🔄\x20','Show\x20specific\x20attempt\x20details','lastAttempt','taskName','hasChanges','workflow:projects','sys','Key\x20cannot\x20be\x20empty','isArray','✔\x20Deleted\x20project\x20','Deleting\x20secret...','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','session:','showWorkflowConsoleUrl','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','parse','\x20\x20Session\x20ID:\x20','trim','Start\x20a\x20workflow\x20run','GUTTER','format','join','getTime','table','done','\x20secret','data','Session\x20time:\x20','\x20\x20Changes:\x20','Filter:\x20','\x0aPush\x20these\x20changes?','Status:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','includes','attempts','✔\x20Pull\x20complete','get','utf-8','MAX_LABEL_COUNT','retrySession','Updating\x20','\x20sessions\x20','execute','Error:\x20KEY=VALUE\x20is\x20required','Cancelled','repeat','split','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','workflow:secrets:set','attemptId','\x0aUpdate\x20existing\x20project\x20\x22','download','Getting\x20attempt\x20tasks...','No\x20workflows\x20found\x20in\x20project:\x20','fill','projectName','resolveProject','Revision:\x20','diff','floor','Project\x20name:\x20','Project\x20filter:\x20','Loading\x20workflows...','workflowName','getHours','sourceDir','Setting\x20secret...','\x20modified','delete','Error:','\x20\x20Attempt\x20ID:\x20','fs/promises','sessionId','state','✔\x20Workflow\x20project\x20set\x20to:\x20','💡\x20Tip:\x20Use\x20','LABEL_MIN_SPACING','select','index','displayLine','\x20\x20Target:\x20','new','\x0aFailed\x20to\x20fetch\x20attempt\x20data'];a42_0x46c0=function(){return _0x3a4e79;};return a42_0x46c0();}import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x2a4a52 from'prompts';function getAttemptStatusDisplay(_0x31fbc3){const _0x4e4037=a42_0x3632;if(!_0x31fbc3)return{'icon':'⏳','text':''};const {done:_0x26091d,success:_0x4ee619,cancelRequested:_0x226621}=_0x31fbc3;if(!_0x26091d)return _0x226621?{'icon':'🛑','text':a42_0x5737de[_0x4e4037(0x314)](_0x4e4037(0x234))}:{'icon':'🔄','text':a42_0x5737de[_0x4e4037(0x2c3)](_0x4e4037(0x28d))};if(_0x4ee619)return{'icon':'✅','text':a42_0x5737de[_0x4e4037(0x362)](_0x4e4037(0x343))};return{'icon':'❌','text':a42_0x5737de[_0x4e4037(0x2e2)](_0x4e4037(0x333))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x548fe7(0x270)](_0x297db6,_0x243d99,_0x1df67f=0x0){const _0x5f2bfb=a42_0x548fe7;return _0x297db6[_0x1df67f]||_0x243d99[_0x5f2bfb(0x2ea)];}[a42_0x548fe7(0x38e)](_0xcef595,_0x17238e,_0xe9453=0x0){const _0x3c6e11=a42_0x548fe7,_0x446675=this['resolveProject'](_0xcef595,_0x17238e,_0xe9453);if(!_0x446675)return console[_0x3c6e11(0x333)](a42_0x5737de['red'](_0x3c6e11(0x27d)),_0x3c6e11(0x296)),console[_0x3c6e11(0x333)](a42_0x5737de['dim'](_0x3c6e11(0x34a))),null;return _0x446675;}[a42_0x548fe7(0x359)](_0x5cd2de,_0x301f7f){const _0x20857b=a42_0x548fe7;if(_0x5cd2de[0x0]){const _0x3cd391=_0x5cd2de[0x0][_0x20857b(0x266)]('.');if(_0x3cd391['length']===0x1)return{'projectName':_0x3cd391[0x0],'workflowName':undefined};else return _0x3cd391[_0x20857b(0x214)]===0x2?{'projectName':_0x3cd391[0x0],'workflowName':_0x3cd391[0x1]}:(console[_0x20857b(0x333)](a42_0x5737de[_0x20857b(0x2e2)](_0x20857b(0x27d)),_0x20857b(0x35d)),null);}return{'projectName':_0x301f7f[_0x20857b(0x2ea)],'workflowName':undefined};}['resolveProjectDir'](_0x37b183,_0x433d76,_0x18c5b3=0x0){const _0x1b980a=a42_0x548fe7;if(_0x37b183[_0x18c5b3])return _0x37b183[_0x18c5b3];if(_0x433d76[_0x1b980a(0x2ea)]){const _0x46a890=a42_0x32a3eb[_0x1b980a(0x24d)](process['cwd'](),_0x1b980a(0x316),_0x433d76['workflowProject']);if(existsSync(a42_0x32a3eb[_0x1b980a(0x24d)](_0x46a890,_0x1b980a(0x364))))return _0x46a890;}return undefined;}async['showWorkflowConsoleUrl'](_0x21f519,_0x2635a3,_0x511aa3){const _0x5e3867=a42_0x548fe7;try{const _0x26c424=await _0x21f519[_0x5e3867(0x350)][_0x5e3867(0x316)](_0x2635a3,{'limit':0x1});if(_0x26c424[_0x5e3867(0x214)]>0x0){const _0x1874a6=_0x26c424[0x0]['id'],_0x48f7f0=getWorkflowUrl(_0x511aa3,_0x1874a6);console['error']('\x20\x20Console:\x20'+a42_0x5737de[_0x5e3867(0x334)](_0x48f7f0));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x2fa);[a42_0x548fe7(0x2da)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a42_0x548fe7(0x262)](_0x1b07da){const _0x4e1f45=a42_0x548fe7,{options:_0x29f45c,args:_0x3b62c7,tdx:_0x328c84}=_0x1b07da,_0x545aae=_0x3b62c7[0x0],_0x2003fc=_0x29f45c[_0x4e1f45(0x236)];if(_0x2003fc)return saveSessionContext({'workflow_project':undefined},_0x29f45c[_0x4e1f45(0x302)]),console[_0x4e1f45(0x373)](a42_0x5737de['green'](_0x4e1f45(0x34c))),0x0;if(!_0x545aae)return console[_0x4e1f45(0x333)](a42_0x5737de['red']('Error:'),_0x4e1f45(0x296)),console['error'](a42_0x5737de[_0x4e1f45(0x2d2)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x4e1f45(0x333)](a42_0x5737de[_0x4e1f45(0x2d2)](_0x4e1f45(0x346))),0x1;const _0x300760=await withSpinner(_0x4e1f45(0x1f5)+_0x545aae+'\x27...',()=>_0x328c84[_0x4e1f45(0x350)][_0x4e1f45(0x213)](_0x545aae),{'verbose':_0x29f45c[_0x4e1f45(0x21a)]}),{name:_0xbfb7a9}=_0x300760[_0x4e1f45(0x252)];return saveSessionContext({'workflow_project':_0xbfb7a9},_0x29f45c['session']),console['log'](a42_0x5737de[_0x4e1f45(0x362)](_0x4e1f45(0x282)+a42_0x5737de['cyan'](_0xbfb7a9))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a42_0x548fe7(0x23d);[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x2e8);async[a42_0x548fe7(0x262)](_0x308048){const _0x14f68b=a42_0x548fe7,{options:_0x2d22c0,args:_0x326669,tdx:_0x10bfee}=_0x308048,_0xcee178=_0x326669[0x0];_0x2d22c0[_0x14f68b(0x21a)]&&_0xcee178&&console[_0x14f68b(0x333)]('Pattern:\x20'+_0xcee178);const _0x518a2b=await withSpinner(_0x14f68b(0x38f),()=>_0x10bfee[_0x14f68b(0x350)][_0x14f68b(0x295)](_0xcee178,{'limit':_0x2d22c0[_0x14f68b(0x29a)]}),{'verbose':_0x2d22c0['verbose']});let _0x3ee269=_0x518a2b['data'];_0x3ee269['sort']((_0x3001bf,_0x281421)=>_0x3001bf[_0x14f68b(0x313)][_0x14f68b(0x293)](_0x281421['name']));const _0x59ba40=_0x2d22c0[_0x14f68b(0x29a)]||0x64,_0x579432=_0x3ee269['length']>=_0x59ba40?a42_0x5737de[_0x14f68b(0x2d2)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x14f68b(0x333)]('✔\x20Found\x20'+_0x3ee269['length']+'\x20project'+(_0x3ee269['length']!==0x1?'s':'')+_0x579432);if(_0x2d22c0[_0x14f68b(0x24c)]===_0x14f68b(0x230)||_0x2d22c0['format']==='jsonl'||_0x2d22c0[_0x14f68b(0x24c)]===_0x14f68b(0x24f))await handleSDKOutput(_0x3ee269,_0x2d22c0);else{if(_0x3ee269['length']===0x0)_0xcee178?console['log'](_0x14f68b(0x212)+_0xcee178):console['log'](_0x14f68b(0x312));else{const _0x1c2400=_0x3ee269['map'](_0x149eb0=>{const _0x2be110=_0x14f68b,_0x82a2ca=_0x149eb0[_0x2be110(0x2ed)]?.['some'](_0x93afce=>_0x93afce[_0x2be110(0x22f)]===_0x2be110(0x23e)),_0xea0a3c=_0x82a2ca?a42_0x5737de['dim'](_0x2be110(0x307)):'';return _0x2be110(0x2c8)+_0x149eb0['name']+_0xea0a3c;});await writeOutput(_0x1c2400[_0x14f68b(0x24d)]('\x0a'),_0x2d22c0['output'],_0x14f68b(0x2b4));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x300);['description']=a42_0x548fe7(0x36e);async[a42_0x548fe7(0x262)](_0x3d2645){const _0x360754=a42_0x548fe7,{options:_0x21385c,args:_0x4b4f61,tdx:_0x2bcbf8}=_0x3d2645,_0x37959d=this[_0x360754(0x270)](_0x4b4f61,_0x21385c);_0x21385c[_0x360754(0x21a)]&&_0x37959d&&console[_0x360754(0x333)](_0x360754(0x275)+_0x37959d);const _0x5c9a21=await withSpinner('Listing\x20workflows...',()=>_0x2bcbf8[_0x360754(0x350)][_0x360754(0x316)](_0x37959d,{'limit':_0x21385c[_0x360754(0x29a)]}),{'verbose':_0x21385c[_0x360754(0x21a)]});let _0x4f681a=_0x5c9a21['data'];_0x4f681a[_0x360754(0x2c2)]((_0x6a6122,_0x1bfa32)=>{const _0x1cca46=_0x360754,_0x558adf=_0x6a6122[_0x1cca46(0x313)]['localeCompare'](_0x1bfa32[_0x1cca46(0x313)]);if(_0x558adf!==0x0)return _0x558adf;return(_0x6a6122[_0x1cca46(0x225)]?.[_0x1cca46(0x313)]||'')[_0x1cca46(0x293)](_0x1bfa32[_0x1cca46(0x225)]?.['name']||'');});const _0x4da198=_0x21385c[_0x360754(0x29a)]||0x64,_0x42c140=_0x4f681a[_0x360754(0x214)]>=_0x4da198?a42_0x5737de['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x360754(0x333)]('✔\x20Found\x20'+_0x4f681a[_0x360754(0x214)]+_0x360754(0x33f)+(_0x4f681a[_0x360754(0x214)]!==0x1?'s':'')+_0x42c140);if(_0x21385c[_0x360754(0x24c)]==='json'||_0x21385c[_0x360754(0x24c)]===_0x360754(0x2b0)||_0x21385c[_0x360754(0x24c)]==='table')await handleSDKOutput(_0x4f681a,_0x21385c);else{if(_0x4f681a[_0x360754(0x214)]===0x0)_0x37959d?console['log'](_0x360754(0x26d)+_0x37959d):console['log'](_0x360754(0x32b));else{const _0x292e92=_0x21385c['site'],_0x22d406=_0x4f681a[_0x360754(0x394)](_0x559521=>{const _0x370cc3=_0x360754,_0x394d4c=a42_0x5737de[_0x370cc3(0x2d2)]('#'+_0x559521['id']),_0x290548=hyperlink(_0x394d4c,getWorkflowUrl(_0x292e92,_0x559521['id'])),_0xf50f5e=_0x559521[_0x370cc3(0x225)]?.[_0x370cc3(0x313)]?a42_0x5737de[_0x370cc3(0x2d2)]('\x20('+_0x559521['project'][_0x370cc3(0x313)]+')'):'';return'📋\x20'+_0x290548+'\x20'+_0x559521[_0x370cc3(0x313)]+_0xf50f5e;});await writeOutput(_0x22d406['join']('\x0a'),_0x21385c[_0x360754(0x223)],_0x360754(0x2b4));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]='workflow:sessions';[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x2ac);async['execute'](_0x479d71){const _0x4035e5=a42_0x548fe7,{options:_0x46251d,args:_0x466db9,tdx:_0xa3d7e4}=_0x479d71,_0x1d450f=this['parseProjectWorkflowPattern'](_0x466db9,_0x46251d);if(!_0x1d450f)return 0x1;const {projectName:_0x4b6b18,workflowName:_0x6e1ba2}=_0x1d450f;if(_0x46251d[_0x4035e5(0x21a)]){if(_0x4b6b18&&_0x6e1ba2)console[_0x4035e5(0x333)](_0x4035e5(0x255)+_0x4b6b18+'.'+_0x6e1ba2);else _0x4b6b18&&console['error'](_0x4035e5(0x1ee)+_0x4b6b18);const _0x183a5d=_0x46251d['status'];_0x183a5d&&console[_0x4035e5(0x333)](_0x4035e5(0x257)+_0x183a5d);}let _0x1d9a51=0x28;if(process[_0x4035e5(0x1f7)][_0x4035e5(0x299)]&&!_0x46251d[_0x4035e5(0x223)]&&!_0x46251d[_0x4035e5(0x24c)]){const _0x2f823b=process[_0x4035e5(0x1f7)][_0x4035e5(0x2e6)]||0x28;_0x1d9a51=Math[_0x4035e5(0x36d)](0x14,Math[_0x4035e5(0x273)](_0x2f823b*0x2/0x3));}const _0x212d27=_0x46251d[_0x4035e5(0x29a)]||_0x1d9a51,_0x10e9ec=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0xa3d7e4['workflow'][_0x4035e5(0x392)]({'projectName':_0x4b6b18,'workflowName':_0x6e1ba2,'status':_0x46251d['status'],'fromTime':_0x46251d[_0x4035e5(0x2d6)],'toTime':_0x46251d['to'],'limit':_0x212d27}),{'verbose':_0x46251d[_0x4035e5(0x21a)]}),_0xab1ea5=_0x10e9ec[_0x4035e5(0x252)];_0xab1ea5['sort']((_0x1a45bb,_0x49d324)=>{const _0x52e990=_0x4035e5,_0x324d45=_0x1a45bb[_0x52e990(0x2a3)]||'',_0x1d031a=_0x49d324[_0x52e990(0x2a3)]||'';return _0x1d031a[_0x52e990(0x293)](_0x324d45);});_0xab1ea5[_0x4035e5(0x214)]>=_0x212d27?console[_0x4035e5(0x333)](_0x4035e5(0x34b)+_0xab1ea5['length']+_0x4035e5(0x261)+a42_0x5737de[_0x4035e5(0x2d2)](_0x4035e5(0x355))):console['error']('✔\x20Found\x20'+_0xab1ea5[_0x4035e5(0x214)]+_0x4035e5(0x216)+(_0xab1ea5[_0x4035e5(0x214)]!==0x1?'s':''));if(_0x46251d[_0x4035e5(0x24c)]===_0x4035e5(0x230)||_0x46251d[_0x4035e5(0x24c)]===_0x4035e5(0x2b0)||_0x46251d[_0x4035e5(0x24c)]==='table')await handleSDKOutput(_0xab1ea5,_0x46251d);else{if(!process[_0x4035e5(0x1f7)][_0x4035e5(0x299)]||_0x46251d[_0x4035e5(0x223)]){if(_0xab1ea5['length']===0x0){if(_0x4b6b18&&_0x6e1ba2)console[_0x4035e5(0x373)](_0x4035e5(0x215)+_0x4b6b18+'.'+_0x6e1ba2);else _0x4b6b18?console[_0x4035e5(0x373)](_0x4035e5(0x2d5)+_0x4b6b18):console[_0x4035e5(0x373)](_0x4035e5(0x2b6));}else{const _0x51177b=_0x46251d['site'],_0x453358=this['renderSessionsTimeline'](_0xab1ea5,_0x51177b);_0x46251d[_0x4035e5(0x223)]?await writeOutput(_0x453358,_0x46251d[_0x4035e5(0x223)],_0x4035e5(0x2b4)):console[_0x4035e5(0x373)](_0x453358);}!_0x4b6b18&&(console[_0x4035e5(0x333)](''),console[_0x4035e5(0x333)](a42_0x5737de['dim'](_0x4035e5(0x388))),console['error'](a42_0x5737de[_0x4035e5(0x2d2)](_0x4035e5(0x22e))+'or'+a42_0x5737de[_0x4035e5(0x2d2)](_0x4035e5(0x328))));}else{if(_0xab1ea5[_0x4035e5(0x214)]===0x0){if(_0x4b6b18&&_0x6e1ba2)console[_0x4035e5(0x373)](_0x4035e5(0x215)+_0x4b6b18+'.'+_0x6e1ba2);else _0x4b6b18?console[_0x4035e5(0x373)](_0x4035e5(0x2d5)+_0x4b6b18):console[_0x4035e5(0x373)](_0x4035e5(0x2b6));}else await this['navigateSessionsInteractive'](_0xab1ea5,_0x479d71,_0x4b6b18);}}return 0x0;}['renderSessionsTimeline'](_0x4d3db2,_0xd25341){const _0x28d738=a42_0x548fe7,_0x24da2c=[],_0x11de17=new Map();let _0x4f902e=Infinity,_0x2e3e86=-Infinity;for(const _0x3e5aa1 of _0x4d3db2){if(_0x3e5aa1[_0x28d738(0x23a)]?.['createdAt']){const _0x547dd1=new Date(_0x3e5aa1[_0x28d738(0x23a)]['createdAt'])[_0x28d738(0x24e)](),_0x50df69=_0x3e5aa1['lastAttempt'][_0x28d738(0x371)]?new Date(_0x3e5aa1[_0x28d738(0x23a)][_0x28d738(0x371)])['getTime']():Date[_0x28d738(0x2a9)](),_0xdfc5b4=_0x3e5aa1['project']?.[_0x28d738(0x313)]||_0x28d738(0x365);!_0x11de17[_0x28d738(0x322)](_0xdfc5b4)&&_0x11de17['set'](_0xdfc5b4,[]),_0x11de17[_0x28d738(0x25c)](_0xdfc5b4)['push']({'session':_0x3e5aa1,'startTime':_0x547dd1,'endTime':_0x50df69,'duration':_0x50df69-_0x547dd1}),_0x4f902e=Math['min'](_0x4f902e,_0x547dd1),_0x2e3e86=Math[_0x28d738(0x36d)](_0x2e3e86,_0x50df69);}}if(_0x11de17[_0x28d738(0x2e9)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x4d26ec=process[_0x28d738(0x1f7)]['columns']||0x78,_0x1306a4=0x1e,_0x2d6977=0x32,_0x1073cd=0x4,_0x498c88=Math[_0x28d738(0x317)](_0x2d6977,Math[_0x28d738(0x36d)](_0x1306a4,Math[_0x28d738(0x273)](_0x4d26ec*0.3))),_0x319d17=_0x4d26ec-_0x498c88-TIMELINE_CONFIG[_0x28d738(0x24b)]-0x3-_0x1073cd,_0x313294=_0x2e3e86-_0x4f902e,_0x493071=_0x313294/_0x498c88,_0x201703=renderTimeAxis({'startTime':_0x4f902e,'endTime':_0x2e3e86,'durationMs':_0x313294,'msPerChar':_0x493071},_0x498c88),_0x2210eb=[];for(const _0x1c1de9 of _0x11de17['values']()){_0x2210eb[_0x28d738(0x382)](..._0x1c1de9);}_0x2210eb[_0x28d738(0x2c2)]((_0x403e93,_0x4be78b)=>_0x4be78b['startTime']-_0x403e93['startTime']);const _0x27e3ae=new Date(_0x4f902e),_0x4a28da=formatDate(_0x27e3ae),_0x4f3264=_0x1073cd+TIMELINE_CONFIG[_0x28d738(0x20a)]+TIMELINE_CONFIG[_0x28d738(0x2cc)]+_0x319d17,_0x17cb4e='\x20'[_0x28d738(0x265)](_0x4f3264-_0x4a28da[_0x28d738(0x214)]),_0x107dc2=_0x17cb4e+a42_0x5737de[_0x28d738(0x2d2)](_0x4a28da)+'\x20'+_0x201703;_0x24da2c[_0x28d738(0x382)](_0x107dc2);const _0x1ff45e=0x16;let _0x553ec9=0x0;for(const _0x377ff1 of _0x2210eb){const _0x4b36a0=_0x377ff1[_0x28d738(0x302)]['project']?.['name']||'?',_0x4870cd=Math[_0x28d738(0x317)](stringWidth(_0x4b36a0),_0x1ff45e);_0x553ec9=Math[_0x28d738(0x36d)](_0x553ec9,_0x4870cd);}for(const _0x3b0088 of _0x2210eb){const {session:_0xb4221c,startTime:_0x500a05,endTime:_0x21f175,duration:_0xbf352a}=_0x3b0088,_0x21b614=_0xb4221c[_0x28d738(0x225)]?.['id'],_0x285bdb=_0xb4221c['id'],_0x3f82a8=_0xb4221c[_0x28d738(0x225)]?.[_0x28d738(0x313)]||'?',_0x3b46d3=_0xb4221c[_0x28d738(0x350)]?.[_0x28d738(0x313)]||'?';let _0x315e00,_0x35d7fc;if(_0xb4221c[_0x28d738(0x23a)]){const _0x5d77a1=_0xb4221c[_0x28d738(0x23a)];!_0x5d77a1[_0x28d738(0x250)]?(_0x315e00=_0x5d77a1[_0x28d738(0x20d)]?'🛑':'🔄',_0x35d7fc=_0x5d77a1[_0x28d738(0x20d)]?a42_0x5737de['yellow']:a42_0x5737de[_0x28d738(0x2c3)]):(_0x315e00=_0x5d77a1[_0x28d738(0x343)]?'✅':'❌',_0x35d7fc=_0x5d77a1[_0x28d738(0x343)]?a42_0x5737de[_0x28d738(0x362)]:a42_0x5737de[_0x28d738(0x2e2)]);}else _0x315e00='⏳',_0x35d7fc=a42_0x5737de[_0x28d738(0x2d2)];const _0x404d03='#'+_0x285bdb,_0x390533=_0x21b614?hyperlink(_0x404d03,getWorkflowSessionUrl(_0xd25341,_0x21b614,_0x285bdb)):_0x404d03;let _0x454d73=_0x3f82a8;stringWidth(_0x3f82a8)>_0x1ff45e&&(_0x454d73=_0x3f82a8[_0x28d738(0x22b)](0x0,_0x1ff45e-0x1)+'…');const _0x3a6c8c=a42_0x5737de['dim'](_0x454d73),_0x425593=stringWidth(_0x454d73),_0x189363='\x20'[_0x28d738(0x265)](_0x553ec9-stringWidth(_0x454d73)+0x2),_0x3c4ea8='('+formatElapsed(_0xbf352a)+')',_0x3d40d2=stringWidth(_0x3c4ea8),_0x44373e=stringWidth(_0x404d03),_0x39395c=_0x44373e+0x1+_0x425593+_0x189363[_0x28d738(0x214)],_0x5b0d8d=_0x319d17-_0x39395c-_0x3d40d2-0x1-0x8;let _0x307195=_0x3b46d3;stringWidth(_0x307195)>_0x5b0d8d&&(_0x307195=_0x307195['slice'](0x0,_0x5b0d8d-0x1)+'…');const _0x49159c=_0x390533+'\x20'+_0x3a6c8c+_0x189363+_0x307195,_0x502ddb=stringWidth(_0x49159c),_0xe9b6d8=_0x319d17-_0x502ddb-_0x3d40d2,_0x318dbe=_0x49159c+'\x20'[_0x28d738(0x265)](Math[_0x28d738(0x36d)](0x1,_0xe9b6d8))+a42_0x5737de[_0x28d738(0x2d2)](_0x3c4ea8),_0x199f3a=Math[_0x28d738(0x273)]((_0x500a05-_0x4f902e)/_0x493071),_0x2a2c36=Math[_0x28d738(0x273)]((_0x21f175-_0x4f902e)/_0x493071),_0x1e6980=Math[_0x28d738(0x36d)](_0x199f3a+0x1,_0x2a2c36),_0x46e20e=new Array(_0x498c88)[_0x28d738(0x26e)]('\x20');for(let _0x5577e2=_0x199f3a;_0x5577e2<Math['min'](_0x1e6980,_0x498c88);_0x5577e2++){_0x46e20e[_0x5577e2]='─';}const _0x5bef0f=_0x46e20e[_0x28d738(0x394)](_0x3d1e30=>_0x3d1e30==='\x20'?'\x20':_0x35d7fc(_0x3d1e30))[_0x28d738(0x24d)]('');_0x24da2c[_0x28d738(0x382)](_0x315e00+'\x20'+_0x318dbe+'│'+_0x5bef0f+'│');}return _0x24da2c['join']('\x0a');}async[a42_0x548fe7(0x345)](_0x1b7cf5,_0x3a6a22,_0x1c5c29){const _0xd13e1d=a42_0x548fe7,{options:_0x23d756,tdx:_0x2b2820}=_0x3a6a22,_0x2381bd=_0x23d756[_0xd13e1d(0x306)],{timelineRows:_0x13c6f4,timeAxisHeader:_0x187c0c}=this[_0xd13e1d(0x290)](_0x1b7cf5,_0x2381bd),_0x147d27=_0x13c6f4[_0xd13e1d(0x384)](_0x14c8c3=>_0x14c8c3[_0xd13e1d(0x269)]);if(_0x147d27[_0xd13e1d(0x214)]===0x0){const _0x365238=this[_0xd13e1d(0x368)](_0x1b7cf5,_0x2381bd);console[_0xd13e1d(0x373)](_0x365238);!_0x1c5c29&&(console[_0xd13e1d(0x333)](''),console[_0xd13e1d(0x333)](a42_0x5737de['dim'](_0xd13e1d(0x388))),console[_0xd13e1d(0x333)](a42_0x5737de[_0xd13e1d(0x2d2)](_0xd13e1d(0x22e))+'or'+a42_0x5737de[_0xd13e1d(0x2d2)](_0xd13e1d(0x328))));return;}_0x187c0c&&console[_0xd13e1d(0x373)](_0x187c0c);const _0x4a61b5=_0x13c6f4[_0xd13e1d(0x384)](_0x4887d8=>_0x4887d8['attemptId'])['map'](_0x3fe34d=>({'title':_0x3fe34d[_0xd13e1d(0x287)],'value':_0x3fe34d[_0xd13e1d(0x269)]})),_0x1f889f=process['stdout']['rows']||0x3c,_0xeee27d=Math[_0xd13e1d(0x36d)](0x28,Math['floor'](_0x1f889f*0x2/0x3)),_0x21e027=await a42_0x2a4a52({'type':_0xd13e1d(0x315),'name':'attemptId','message':_0xd13e1d(0x32a),'choices':_0x4a61b5,'initial':-0x1,'limit':_0xeee27d,'clearFirst':!![],'fallback':{'title':_0xd13e1d(0x390),'value':null},'suggest':(_0x2a0403,_0x4a8d6b)=>{const _0x67bd9b=_0xd13e1d;if(!_0x2a0403)return Promise[_0x67bd9b(0x391)](_0x4a8d6b);const _0x666fc=_0x4a8d6b[_0x67bd9b(0x384)](_0x32078b=>{const _0x4acc65=_0x67bd9b,_0x2bd40a=_0x32078b;return _0x2bd40a[_0x4acc65(0x339)][_0x4acc65(0x2a7)]()['includes'](_0x2a0403[_0x4acc65(0x2a7)]());});return Promise[_0x67bd9b(0x391)](_0x666fc);}}),_0x117d73=()=>{const _0x564390=_0xd13e1d;process['stdout'][_0x564390(0x2fb)](_0x564390(0x2f2)),process['stdout'][_0x564390(0x2fb)](_0x564390(0x2f2)),process[_0x564390(0x1f7)][_0x564390(0x2fb)](_0x564390(0x2f2));},_0x24f662=_0x21e027&&_0x21e027[_0xd13e1d(0x269)]&&_0x21e027[_0xd13e1d(0x269)]!==null&&_0x21e027['attemptId'][_0xd13e1d(0x249)]()!=='';if(!_0x24f662){_0x117d73(),console[_0xd13e1d(0x373)](a42_0x5737de[_0xd13e1d(0x2d2)](_0xd13e1d(0x264)));return;}_0x117d73();const _0x2c2513=_0x1b7cf5['find'](_0x4e0576=>_0x4e0576[_0xd13e1d(0x23a)]?.['id']===_0x21e027['attemptId']);if(_0x2c2513){const _0x56f48a=_0x2c2513[_0xd13e1d(0x225)]?.[_0xd13e1d(0x313)]||'?',_0x4f0121=_0x2c2513[_0xd13e1d(0x350)]?.[_0xd13e1d(0x313)]||'?';console['log']('Project:\x20'+a42_0x5737de[_0xd13e1d(0x2d2)](_0x56f48a)+',\x20Workflow:\x20'+a42_0x5737de[_0xd13e1d(0x2d2)](_0x4f0121));}const _0x7b19d3=new WorkflowTimelineCommand();await _0x7b19d3[_0xd13e1d(0x262)]({'args':[],'options':{..._0x23d756,'attemptId':_0x21e027[_0xd13e1d(0x269)]},'tdx':_0x2b2820});}[a42_0x548fe7(0x290)](_0x45107e,_0xa6cb72){const _0x170c5d=a42_0x548fe7,_0x357c3e=new Map();for(const _0xee43f1 of _0x45107e){_0xee43f1['id']&&_0xee43f1[_0x170c5d(0x23a)]?.['id']&&_0x357c3e[_0x170c5d(0x325)](_0xee43f1['id'],_0xee43f1[_0x170c5d(0x23a)]['id']);}const _0x12b86c=[];let _0x186d0d='';const _0x2759ab=this[_0x170c5d(0x368)](_0x45107e,_0xa6cb72),_0x3a3963=_0x2759ab[_0x170c5d(0x266)]('\x0a');for(const _0x71ec38 of _0x3a3963){if(_0x71ec38[_0x170c5d(0x220)](_0x170c5d(0x37a))||_0x71ec38[_0x170c5d(0x1ea)](/^\s+\d{4}-\d{2}-\d{2}/))_0x186d0d=_0x71ec38;else{if(_0x71ec38['match'](/^[✅❌🔄🛑⏳]/)){const _0x346ef6=_0x71ec38[_0x170c5d(0x1ea)](/#(\d+)/),_0x137f07=_0x346ef6?_0x346ef6[0x1]:null,_0x2f84be=_0x137f07?_0x357c3e[_0x170c5d(0x25c)](_0x137f07)||null:null,_0x1b37a2=_0x45107e['find'](_0x50069c=>_0x50069c['id']===_0x137f07),_0x2c78c0=_0x1b37a2?.[_0x170c5d(0x225)]?.['name']||'';_0x12b86c['push']({'displayLine':_0x71ec38,'attemptId':_0x2f84be,'projectName':_0x2c78c0});}}}return{'timelineRows':_0x12b86c,'timeAxisHeader':_0x186d0d};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']='workflow:attempts';['description']=a42_0x548fe7(0x38a);async[a42_0x548fe7(0x262)](_0x1f6d71){const _0x212bdf=a42_0x548fe7,{options:_0xab0d0b,args:_0x50ed2b,tdx:_0x499e4f}=_0x1f6d71,_0xdf6d62=this[_0x212bdf(0x359)](_0x50ed2b,_0xab0d0b);if(!_0xdf6d62)return 0x1;const {projectName:_0x41bdac,workflowName:_0x213441}=_0xdf6d62,_0x36c388=_0xab0d0b[_0x212bdf(0x38b)];if(_0xab0d0b[_0x212bdf(0x21a)]){if(_0x41bdac&&_0x213441)console[_0x212bdf(0x333)](_0x212bdf(0x255)+_0x41bdac+'.'+_0x213441);else _0x41bdac&&console[_0x212bdf(0x333)]('Filter:\x20project='+_0x41bdac);_0x36c388&&console[_0x212bdf(0x333)](_0x212bdf(0x2f6));}const _0x32b32f=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x499e4f[_0x212bdf(0x350)][_0x212bdf(0x25a)]({'projectName':_0x41bdac,'workflowName':_0x213441,'includeRetried':_0x36c388,'limit':_0xab0d0b[_0x212bdf(0x29a)]}),{'verbose':_0xab0d0b[_0x212bdf(0x21a)]}),_0x2ab4e1=_0x32b32f['data'],_0x2a673c=_0xab0d0b['limit']||0x64,_0x1ca62d=_0x2ab4e1['length']>=_0x2a673c?a42_0x5737de['dim'](_0x212bdf(0x2c6)):'';console[_0x212bdf(0x333)](_0x212bdf(0x2f8)+_0x2ab4e1[_0x212bdf(0x214)]+_0x212bdf(0x294)+(_0x2ab4e1['length']!==0x1?'s':'')+_0x1ca62d);if(_0xab0d0b[_0x212bdf(0x24c)]===_0x212bdf(0x230)||_0xab0d0b[_0x212bdf(0x24c)]===_0x212bdf(0x2b0)||_0xab0d0b[_0x212bdf(0x24c)]===_0x212bdf(0x24f))await handleSDKOutput(_0x2ab4e1,_0xab0d0b);else{if(_0x2ab4e1[_0x212bdf(0x214)]===0x0){if(_0x41bdac&&_0x213441)console[_0x212bdf(0x373)]('No\x20attempts\x20found\x20for:\x20'+_0x41bdac+'.'+_0x213441);else _0x41bdac?console[_0x212bdf(0x373)](_0x212bdf(0x231)+_0x41bdac):console['log'](_0x212bdf(0x311));}else{const _0x32f5e9=_0xab0d0b[_0x212bdf(0x306)],_0x18c566=_0x2ab4e1['map'](_0x5e4d2b=>{const _0x43111a=_0x212bdf,_0x3467ad=a42_0x5737de['dim']('#'+_0x5e4d2b['id']),_0x44645f=_0x5e4d2b['project']?.['id'],_0x28ad3f=_0x5e4d2b[_0x43111a(0x356)]||_0x5e4d2b[_0x43111a(0x280)],_0x1a6c2e=_0x44645f&&_0x28ad3f?hyperlink(_0x3467ad,getWorkflowAttemptUrl(_0x32f5e9,_0x44645f,_0x28ad3f,_0x5e4d2b['id'])):_0x3467ad,{icon:_0x2d9f80,text:_0x4c7eb9}=getAttemptStatusDisplay(_0x5e4d2b),_0x2ba2eb=(_0x5e4d2b['project']?.[_0x43111a(0x313)]||'?')+'.'+(_0x5e4d2b[_0x43111a(0x350)]?.['name']||'?'),_0x2aac79=_0x5e4d2b['sessionTime']?a42_0x5737de[_0x43111a(0x2d2)](_0x5e4d2b['sessionTime']):'';return(_0x1a6c2e+'\x20'+_0x2d9f80+(_0x4c7eb9?'\x20'+_0x4c7eb9:'')+'\x20'+_0x2ba2eb+'\x20'+_0x2aac79)[_0x43111a(0x229)]();});await writeOutput(_0x18c566[_0x212bdf(0x24d)]('\x0a'),_0xab0d0b['output'],_0x212bdf(0x2b4));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x361);['description']=a42_0x548fe7(0x239);async['execute'](_0x1bb502){const _0x4ea1d7=a42_0x548fe7,{options:_0x9d2c08,args:_0x52610a,tdx:_0x576ec4}=_0x1bb502,_0x183943=_0x52610a[0x0];if(!_0x183943)return console[_0x4ea1d7(0x333)](_0x4ea1d7(0x2e7)),0x1;_0x9d2c08[_0x4ea1d7(0x21a)]&&console[_0x4ea1d7(0x333)]('Attempt\x20ID:\x20'+_0x183943);const _0x1c4e12=await withSpinner(_0x4ea1d7(0x2cb),()=>_0x576ec4[_0x4ea1d7(0x350)]['attempt'](_0x183943),{'verbose':_0x9d2c08[_0x4ea1d7(0x21a)]}),_0xea0dc0=_0x1c4e12['data'];let _0x4c1fc2;!_0xea0dc0[_0x4ea1d7(0x250)]?_0x4c1fc2=_0xea0dc0[_0x4ea1d7(0x20d)]?_0x4ea1d7(0x234):_0x4ea1d7(0x28d):_0x4c1fc2=_0xea0dc0[_0x4ea1d7(0x343)]?_0x4ea1d7(0x343):_0x4ea1d7(0x333);let _0x46d172;if(_0xea0dc0['createdAt']&&_0xea0dc0['finishedAt']){const _0x298ec8=new Date(_0xea0dc0[_0x4ea1d7(0x2a0)])[_0x4ea1d7(0x24e)](),_0x302d47=new Date(_0xea0dc0['finishedAt'])['getTime']();_0x46d172=Math[_0x4ea1d7(0x20c)]((_0x302d47-_0x298ec8)/0x3e8);}const _0x18598f={'attempt_id':_0xea0dc0['id'],'status':_0x4c1fc2,..._0xea0dc0[_0x4ea1d7(0x286)]!==undefined&&{'index':_0xea0dc0[_0x4ea1d7(0x286)]},..._0xea0dc0[_0x4ea1d7(0x225)]&&{'project':_0xea0dc0['project'][_0x4ea1d7(0x313)]},..._0xea0dc0[_0x4ea1d7(0x350)]&&{'workflow':_0xea0dc0[_0x4ea1d7(0x350)][_0x4ea1d7(0x313)]},..._0xea0dc0[_0x4ea1d7(0x280)]&&{'session_id':_0xea0dc0[_0x4ea1d7(0x280)]},..._0xea0dc0[_0x4ea1d7(0x2a3)]&&{'session_time':_0xea0dc0[_0x4ea1d7(0x2a3)]},..._0xea0dc0['retryAttemptName']&&{'retry_attempt':_0xea0dc0['retryAttemptName']},..._0x46d172!==undefined&&{'duration_sec':_0x46d172},..._0xea0dc0['createdAt']&&{'created_at':_0xea0dc0[_0x4ea1d7(0x2a0)]},..._0xea0dc0[_0x4ea1d7(0x371)]&&{'finished_at':_0xea0dc0[_0x4ea1d7(0x371)]},...Object[_0x4ea1d7(0x217)](_0xea0dc0[_0x4ea1d7(0x376)])[_0x4ea1d7(0x214)]>0x0&&{'params':_0xea0dc0[_0x4ea1d7(0x376)]}};return await handleSingleObjectOutput(_0x18598f,_0x9d2c08),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x2ca);['description']=a42_0x548fe7(0x2d0);async[a42_0x548fe7(0x262)](_0xa707e7){const _0x3755f4=a42_0x548fe7,{options:_0x5bb324,args:_0x1f5570,tdx:_0x429902}=_0xa707e7,_0x592ae2=_0x1f5570[0x0];if(!_0x592ae2)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x2d1a4c=_0x5bb324['includeSubtasks'];_0x5bb324['verbose']&&(console['error'](_0x3755f4(0x37e)+_0x592ae2),_0x2d1a4c&&console[_0x3755f4(0x333)](_0x3755f4(0x218)));const _0x25b2bd=await withSpinner(_0x3755f4(0x26c),()=>_0x429902[_0x3755f4(0x350)][_0x3755f4(0x2ab)](_0x592ae2,_0x2d1a4c||![]),{'verbose':_0x5bb324[_0x3755f4(0x21a)]}),_0x1e1030=_0x25b2bd['data'];return console[_0x3755f4(0x333)](_0x3755f4(0x2f8)+_0x1e1030[_0x3755f4(0x214)]+_0x3755f4(0x203)+(_0x1e1030[_0x3755f4(0x214)]!==0x1?'s':'')),await handleSDKOutput(_0x1e1030,_0x5bb324),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']='workflow:logs';[a42_0x548fe7(0x2da)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a42_0x548fe7(0x262)](_0x509324){const _0x4b8937=a42_0x548fe7,{options:_0x395f67,args:_0x3d9796,tdx:_0x292ff8}=_0x509324,_0x2f1a36=_0x3d9796[0x0];let _0x5b4474=_0x3d9796[0x1];if(!_0x2f1a36)return console['error'](_0x4b8937(0x2e7)),0x1;_0x395f67[_0x4b8937(0x21a)]&&(console[_0x4b8937(0x333)](_0x4b8937(0x37e)+_0x2f1a36),_0x5b4474&&console[_0x4b8937(0x333)](_0x4b8937(0x386)+_0x5b4474));const _0x1aad2d=await withSpinner(_0x4b8937(0x344),()=>_0x292ff8['workflow'][_0x4b8937(0x2f7)](_0x2f1a36,_0x5b4474),{'verbose':_0x395f67[_0x4b8937(0x21a)]}),_0x7da375=_0x1aad2d[_0x4b8937(0x252)];if(_0x7da375[_0x4b8937(0x214)]===0x0)return console['error'](_0x4b8937(0x204)),0x0;if(!_0x5b4474&&(_0x395f67[_0x4b8937(0x230)]||_0x395f67['format']))return await handleSDKOutput(_0x7da375,_0x395f67),0x0;if(!_0x5b4474){const _0x597fb7=_0x7da375[_0x4b8937(0x394)](_0x58b038=>({'title':_0x58b038[_0x4b8937(0x23b)]+'\x20('+formatBytes(_0x58b038[_0x4b8937(0x2db)])+')','value':_0x58b038[_0x4b8937(0x23b)]})),_0x265e1d=await a42_0x2a4a52({'type':'select','name':_0x4b8937(0x396),'message':_0x4b8937(0x38d),'choices':_0x597fb7});if(!_0x265e1d['task'])return console[_0x4b8937(0x333)](_0x4b8937(0x264)),0x0;_0x5b4474=_0x265e1d[_0x4b8937(0x396)];}const _0x57accf=await withSpinner(_0x4b8937(0x2ff),()=>_0x292ff8[_0x4b8937(0x350)]['logs'](_0x2f1a36,_0x5b4474),{'verbose':_0x395f67[_0x4b8937(0x21a)]}),_0x1762ae=_0x57accf[_0x4b8937(0x252)];return _0x1762ae?console[_0x4b8937(0x373)](_0x1762ae):console[_0x4b8937(0x333)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x28f);['description']='Kill\x20a\x20running\x20attempt';async[a42_0x548fe7(0x262)](_0xbf6e64){const _0x25e1d8=a42_0x548fe7,{options:_0x2169dd,args:_0x1fbc41,tdx:_0x572790}=_0xbf6e64,_0x2227ea=_0x1fbc41[0x0];if(!_0x2227ea)return console['error'](_0x25e1d8(0x2e7)),0x1;const _0x404bc8=_0x2169dd[_0x25e1d8(0x2b8)];_0x2169dd['verbose']&&(console[_0x25e1d8(0x333)](_0x25e1d8(0x37e)+_0x2227ea),_0x404bc8&&console['error'](_0x25e1d8(0x28c)+_0x404bc8));if(!_0x2169dd[_0x25e1d8(0x305)]){if(!isInteractive())return console[_0x25e1d8(0x333)](a42_0x5737de[_0x25e1d8(0x2e2)]('\x0aError:'),_0x25e1d8(0x366)),console['error'](a42_0x5737de[_0x25e1d8(0x2d2)](_0x25e1d8(0x393))),0x1;const _0x292238=await confirmKey(_0x25e1d8(0x336)+_0x2227ea+'?');if(!_0x292238)return console['error'](a42_0x5737de[_0x25e1d8(0x314)](_0x25e1d8(0x264))),0x1;}const _0x49393b=await withSpinner(_0x25e1d8(0x2d4),()=>_0x572790[_0x25e1d8(0x350)][_0x25e1d8(0x2f1)](_0x2227ea,_0x404bc8),{'verbose':_0x2169dd['verbose']}),_0x569ee3=_0x49393b['data'];return console['error']('✔\x20'+_0x569ee3),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a42_0x548fe7(0x20e);[a42_0x548fe7(0x2da)]='Retry\x20a\x20session\x20or\x20attempt';async[a42_0x548fe7(0x262)](_0xc0c708){const _0x504a97=a42_0x548fe7,{options:_0x467d3f,args:_0x1a889f,tdx:_0x10d19f}=_0xc0c708,_0x41b30e=_0x1a889f[0x0];if(!_0x41b30e)return console[_0x504a97(0x333)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x504a97(0x333)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x21b1db=![],_0x5649a0=_0x41b30e;if(_0x41b30e[_0x504a97(0x220)](_0x504a97(0x244)))_0x21b1db=!![],_0x5649a0=_0x41b30e[_0x504a97(0x2c0)](0x8);else{if(_0x41b30e['startsWith']('attempt:'))_0x21b1db=![],_0x5649a0=_0x41b30e['substring'](0x8);else return console[_0x504a97(0x333)](_0x504a97(0x235)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x5c743c=_0x467d3f['fromTask'],_0x5db078=_0x467d3f[_0x504a97(0x2a4)],_0x4a81c2=_0x467d3f[_0x504a97(0x376)],_0x5f0215=_0x467d3f[_0x504a97(0x227)];_0x467d3f[_0x504a97(0x21a)]&&(console['error'](_0x504a97(0x37c)+(_0x21b1db?_0x504a97(0x302):_0x504a97(0x34e))+'\x20'+_0x5649a0),_0x5c743c&&console[_0x504a97(0x333)](_0x504a97(0x1ef)+_0x5c743c),_0x5db078&&console['error'](_0x504a97(0x318)+_0x5db078),_0x4a81c2&&console[_0x504a97(0x333)](_0x504a97(0x233)+_0x4a81c2),_0x5f0215&&console[_0x504a97(0x333)](_0x504a97(0x30d)));let _0x29fef1;if(_0x4a81c2)try{if(_0x4a81c2[_0x504a97(0x220)]('@')){const _0x4f2436=await import(_0x504a97(0x27f)),_0x5ced2f=_0x4a81c2[_0x504a97(0x2c0)](0x1),_0x2e3d56=await _0x4f2436[_0x504a97(0x378)](_0x5ced2f,_0x504a97(0x25d));_0x29fef1=JSON[_0x504a97(0x247)](_0x2e3d56);}else _0x29fef1=JSON['parse'](_0x4a81c2);}catch{return console['error'](_0x504a97(0x2bc)),0x1;}if(!_0x467d3f[_0x504a97(0x305)]){if(!isInteractive())return console[_0x504a97(0x333)](a42_0x5737de[_0x504a97(0x2e2)](_0x504a97(0x2d9)),_0x504a97(0x366)),console[_0x504a97(0x333)](a42_0x5737de['dim'](_0x504a97(0x393))),0x1;const _0x54d330=await confirmKey(_0x504a97(0x310)+(_0x21b1db?_0x504a97(0x302):'attempt')+'\x20'+_0x5649a0+'?');if(!_0x54d330)return console['error'](a42_0x5737de[_0x504a97(0x314)](_0x504a97(0x264))),0x1;}let _0x27ed22;_0x21b1db?_0x27ed22=await withSpinner(_0x504a97(0x1fd),()=>_0x10d19f[_0x504a97(0x350)][_0x504a97(0x25f)](_0x5649a0,{'fromTask':_0x5c743c,'retryParams':_0x29fef1}),{'verbose':_0x467d3f['verbose']}):_0x27ed22=await withSpinner(_0x504a97(0x1ff),()=>_0x10d19f[_0x504a97(0x350)][_0x504a97(0x338)](_0x5649a0,{'resumeFrom':_0x5db078,'retryParams':_0x29fef1,'force':_0x5f0215}),{'verbose':_0x467d3f[_0x504a97(0x21a)]});const _0x24e6ce=_0x27ed22['data'];return console['error'](_0x504a97(0x30a)),console['error'](_0x504a97(0x329)+_0x24e6ce[_0x504a97(0x269)]),console[_0x504a97(0x333)]('\x20\x20Session\x20ID:\x20'+_0x24e6ce['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]='workflow:run';[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x24a);async['execute'](_0x4b49c2){const _0x323071=a42_0x548fe7,{options:_0x149786,args:_0x116863,tdx:_0x3deabf}=_0x4b49c2;let _0x5b0777=_0x116863[0x0];if(!_0x5b0777){const _0x6071e7=this[_0x323071(0x270)]([],_0x149786),_0x5b3275=await withSpinner(_0x323071(0x276),()=>_0x3deabf[_0x323071(0x350)][_0x323071(0x316)](_0x6071e7,{'limit':_0x149786[_0x323071(0x29a)]}),{'verbose':_0x149786[_0x323071(0x21a)]}),_0x12a5f9=_0x5b3275[_0x323071(0x252)];if(_0x12a5f9['length']===0x0)return console[_0x323071(0x333)](_0x323071(0x32b)),!_0x6071e7&&console[_0x323071(0x333)](a42_0x5737de[_0x323071(0x2d2)](_0x323071(0x34a))),0x1;const _0x5655a4=_0x12a5f9[_0x323071(0x394)](_0xc70a0a=>({'title':_0xc70a0a[_0x323071(0x225)]?.[_0x323071(0x313)]+'.'+_0xc70a0a[_0x323071(0x313)],'value':_0xc70a0a[_0x323071(0x225)]?.[_0x323071(0x313)]+'.'+_0xc70a0a[_0x323071(0x313)],'description':_0xc70a0a['revision']?'revision:\x20'+_0xc70a0a['revision']:undefined})),_0x5285f8=await a42_0x2a4a52({'type':_0x323071(0x285),'name':_0x323071(0x350),'message':_0x323071(0x389),'choices':_0x5655a4});if(!_0x5285f8['workflow'])return 0x1;_0x5b0777=_0x5285f8[_0x323071(0x350)];}if(!_0x5b0777[_0x323071(0x259)]('.')){const _0x41bc4a=this[_0x323071(0x270)]([],_0x149786);if(_0x41bc4a)_0x5b0777=_0x41bc4a+'.'+_0x5b0777;else return console[_0x323071(0x333)](a42_0x5737de[_0x323071(0x2e2)](_0x323071(0x27d)),_0x323071(0x1eb)),console[_0x323071(0x333)](a42_0x5737de[_0x323071(0x2d2)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x1c9374=_0x149786['param'],_0x13b589=_0x149786[_0x323071(0x2a3)],_0x2f44ad={};if(_0x1c9374&&Array[_0x323071(0x240)](_0x1c9374))for(const _0x299fbd of _0x1c9374){const _0x9b833f=_0x299fbd[_0x323071(0x2d3)]('=');if(_0x9b833f===-0x1)return console[_0x323071(0x333)](_0x323071(0x2d1)+_0x299fbd),console[_0x323071(0x333)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x6b515b=_0x299fbd[_0x323071(0x2c0)](0x0,_0x9b833f),_0x172789=_0x299fbd['substring'](_0x9b833f+0x1);try{_0x2f44ad[_0x6b515b]=JSON[_0x323071(0x247)](_0x172789);}catch{_0x2f44ad[_0x6b515b]=_0x172789;}}_0x149786['verbose']&&(console[_0x323071(0x333)]('Workflow:\x20'+_0x5b0777),Object[_0x323071(0x217)](_0x2f44ad)[_0x323071(0x214)]>0x0&&console[_0x323071(0x333)](_0x323071(0x292)+JSON[_0x323071(0x200)](_0x2f44ad)),_0x13b589&&console['error'](_0x323071(0x253)+_0x13b589));const _0x160d52=await withSpinner('Starting\x20workflow\x20run...',()=>_0x3deabf[_0x323071(0x350)][_0x323071(0x2c5)](_0x5b0777,_0x2f44ad,{'sessionTime':_0x13b589}),{'verbose':_0x149786[_0x323071(0x21a)]}),_0x5dd7a4=_0x160d52[_0x323071(0x252)];console[_0x323071(0x333)](_0x323071(0x1fe)),console['error'](_0x323071(0x27e)+_0x5dd7a4['id']),console['error'](_0x323071(0x248)+_0x5dd7a4[_0x323071(0x280)]),console[_0x323071(0x333)](_0x323071(0x347)+_0x5dd7a4[_0x323071(0x225)]?.[_0x323071(0x313)]),console['error'](_0x323071(0x379)+_0x5dd7a4[_0x323071(0x350)]?.['name']);if(_0x5dd7a4[_0x323071(0x225)]?.['id']&&_0x5dd7a4[_0x323071(0x280)]&&_0x5dd7a4['id']){const _0x2d3ee1=_0x149786[_0x323071(0x306)],_0x2a4b31=getConsoleUrl(_0x2d3ee1,'/app/workflows/'+_0x5dd7a4[_0x323071(0x225)]['id']+_0x323071(0x1ec)+_0x5dd7a4[_0x323071(0x280)]+_0x323071(0x2f4)+_0x5dd7a4['id']);console[_0x323071(0x333)](_0x323071(0x20b)+a42_0x5737de[_0x323071(0x334)](_0x2a4b31));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x381);[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x2df);async[a42_0x548fe7(0x262)](_0x10c02f){const _0x5e7a95=a42_0x548fe7,{options:_0x55d913,args:_0x4dc8a5,tdx:_0x1e283d}=_0x10c02f,_0x11cf44=_0x4dc8a5[0x0],_0xefb325=_0x4dc8a5[0x1]||'.';if(!_0x11cf44)return console[_0x5e7a95(0x333)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x5e7a95(0x333)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0xff608f=_0x55d913['revision'];_0x55d913[_0x5e7a95(0x21a)]&&(console['error'](_0x5e7a95(0x2ae)+_0x11cf44),console['error'](_0x5e7a95(0x2e3)+_0xefb325),_0xff608f&&console['error']('Revision:\x20'+_0xff608f));const _0xf5d71f=await withSpinner('Downloading\x20project\x20'+_0x11cf44+_0x5e7a95(0x207),()=>_0x1e283d[_0x5e7a95(0x350)][_0x5e7a95(0x26b)](_0x11cf44,_0xefb325,{'revision':_0xff608f}),{'verbose':_0x55d913[_0x5e7a95(0x21a)]}),_0x36f308=_0xf5d71f[_0x5e7a95(0x252)];return console[_0x5e7a95(0x333)]('✔\x20Downloaded\x20'+_0x36f308[_0x5e7a95(0x26f)]),console[_0x5e7a95(0x333)](_0x5e7a95(0x31d)+_0x36f308[_0x5e7a95(0x2ec)]),console[_0x5e7a95(0x333)]('\x20\x20Files\x20extracted:\x20'+_0x36f308[_0x5e7a95(0x308)]),console[_0x5e7a95(0x333)](_0x5e7a95(0x1f2)+_0xefb325+'/'+_0x36f308[_0x5e7a95(0x26f)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]='workflow:upload';[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x246);async[a42_0x548fe7(0x262)](_0x1f5a09){const _0x20d665=a42_0x548fe7,{options:_0x31c480,args:_0x2379c9,tdx:_0x3a981d}=_0x1f5a09;let _0x53afe6='.',_0x1b4fbc=_0x31c480['name'];if(_0x2379c9[0x0]){const {promises:_0x456755}=await import('fs');try{const _0x499718=await _0x456755['stat'](_0x2379c9[0x0]);if(_0x499718['isDirectory']())_0x53afe6=_0x2379c9[0x0];else return console['error'](_0x20d665(0x2eb)+_0x2379c9[0x0]+_0x20d665(0x21e)),0x1;}catch{_0x1b4fbc=_0x2379c9[0x0],_0x53afe6='.';}}const _0x1c0fc3=_0x31c480[_0x20d665(0x2ec)],_0x2e6b67=_0x31c480[_0x20d665(0x33c)];_0x31c480[_0x20d665(0x21a)]&&(console[_0x20d665(0x333)]('Project\x20directory:\x20'+_0x53afe6),_0x1b4fbc&&console[_0x20d665(0x333)](_0x20d665(0x274)+_0x1b4fbc),_0x1c0fc3&&console[_0x20d665(0x333)](_0x20d665(0x271)+_0x1c0fc3),_0x2e6b67&&console[_0x20d665(0x333)](_0x20d665(0x228)));const _0x39ebec=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x3a981d[_0x20d665(0x350)][_0x20d665(0x382)](_0x53afe6,{'projectName':_0x1b4fbc,'revision':_0x1c0fc3,'skipValidation':_0x2e6b67}),{'verbose':_0x31c480[_0x20d665(0x21a)]}),_0x25d60d=_0x39ebec[_0x20d665(0x252)];return console[_0x20d665(0x333)](_0x20d665(0x202)+_0x25d60d[_0x20d665(0x26f)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x25d60d['projectId']),console[_0x20d665(0x333)](_0x20d665(0x31d)+_0x25d60d[_0x20d665(0x2ec)]),await this[_0x20d665(0x245)](_0x3a981d,_0x25d60d[_0x20d665(0x26f)],_0x31c480[_0x20d665(0x306)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x548fe7(0x313)]='workflow:pull';[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x2cf);async['execute'](_0xeb6f60){const _0x1985ca=a42_0x548fe7,{options:_0x484cfa,args:_0x1fd5c8,tdx:_0x35c5a9}=_0xeb6f60,_0x5b43bf=_0x1fd5c8[0x0],_0x4edb5c=_0x1fd5c8[0x1];if(!_0x5b43bf)return console['error'](a42_0x5737de['red'](_0x1985ca(0x27d)),_0x1985ca(0x296)),console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x2d2)](_0x1985ca(0x38c))),0x1;const _0x40824c=_0x484cfa[_0x1985ca(0x2ec)];_0x484cfa[_0x1985ca(0x21a)]&&(console[_0x1985ca(0x333)](_0x1985ca(0x2ae)+_0x5b43bf),_0x4edb5c&&console[_0x1985ca(0x333)]('Target\x20directory:\x20'+_0x4edb5c),_0x40824c&&console[_0x1985ca(0x333)](_0x1985ca(0x271)+_0x40824c),_0x484cfa['dryRun']&&console['error'](_0x1985ca(0x237)));const _0x4fde35=await withSpinner('Pulling\x20project\x20'+_0x5b43bf+'...',()=>_0x35c5a9[_0x1985ca(0x350)][_0x1985ca(0x335)](_0x5b43bf,{'targetDir':_0x4edb5c,'revision':_0x40824c}),{'verbose':_0x484cfa[_0x1985ca(0x21a)]}),_0x512883=_0x4fde35[_0x1985ca(0x252)];_0x512883[_0x1985ca(0x31e)]?console[_0x1985ca(0x333)](_0x1985ca(0x21d)+_0x512883[_0x1985ca(0x26f)]):console['error'](_0x1985ca(0x2bd)+_0x512883[_0x1985ca(0x26f)]);console['error'](_0x1985ca(0x31d)+_0x512883[_0x1985ca(0x2ec)]),console[_0x1985ca(0x333)](_0x1985ca(0x288)+(a42_0x32a3eb['relative'](process[_0x1985ca(0x201)](),_0x512883[_0x1985ca(0x397)])||'.')),console[_0x1985ca(0x333)]('\x20\x20Changes:\x20'+a42_0x5737de[_0x1985ca(0x362)]('+'+_0x512883['summary']['new']+_0x1985ca(0x20f))+',\x20'+(a42_0x5737de[_0x1985ca(0x314)]('~'+_0x512883['summary']['modified']+_0x1985ca(0x27b))+',\x20')+(a42_0x5737de[_0x1985ca(0x2e2)]('-'+_0x512883['summary'][_0x1985ca(0x395)]+'\x20deleted')+',\x20')+(''+a42_0x5737de[_0x1985ca(0x2d2)](_0x512883['summary'][_0x1985ca(0x2c4)]+_0x1985ca(0x349))));for(const _0x58c82e of _0x512883['changes']){_0x58c82e[_0x1985ca(0x36b)]===_0x1985ca(0x337)&&_0x58c82e[_0x1985ca(0x272)]&&(console[_0x1985ca(0x333)]('\x0a'+a42_0x5737de[_0x1985ca(0x334)](_0x1985ca(0x29b)+_0x58c82e[_0x1985ca(0x340)])),console[_0x1985ca(0x333)](_0x58c82e['diff']));}if(!_0x512883[_0x1985ca(0x23c)])return saveSessionContext({'workflow_project':_0x512883['projectName']},_0x484cfa[_0x1985ca(0x302)]),console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x362)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x2d2)](_0x1985ca(0x298)+_0x512883['projectName'])),0x0;if(_0x484cfa[_0x1985ca(0x374)])return console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x314)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x484cfa[_0x1985ca(0x305)]){if(!isInteractive())return console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x2e2)](_0x1985ca(0x2d9)),_0x1985ca(0x366)),console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x2d2)](_0x1985ca(0x393))),0x1;const _0x7d079b=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x7d079b)return console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x314)]('Cancelled'),_0x1985ca(0x36c)),0x1;}await withSpinner('Writing\x20files...',()=>_0x35c5a9[_0x1985ca(0x350)][_0x1985ca(0x2c1)](_0x512883,{'revision':_0x40824c}),{'verbose':_0x484cfa[_0x1985ca(0x21a)]}),saveSessionContext({'workflow_project':_0x512883[_0x1985ca(0x26f)]},_0x484cfa[_0x1985ca(0x302)]),console['error'](a42_0x5737de['green'](_0x1985ca(0x25b)));const _0x5f2d8a=a42_0x32a3eb[_0x1985ca(0x2a5)](process['cwd'](),_0x512883[_0x1985ca(0x397)])||'.';return console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x2d2)](_0x1985ca(0x1f2)+_0x5f2d8a)),console[_0x1985ca(0x333)](a42_0x5737de[_0x1985ca(0x2d2)](_0x1985ca(0x298)+_0x512883[_0x1985ca(0x26f)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']='workflow:push';['description']=a42_0x548fe7(0x291);async[a42_0x548fe7(0x262)](_0x471c83){const _0x4f81db=a42_0x548fe7,{options:_0x1ddae4,args:_0x4eaa4c,tdx:_0x4e3119}=_0x471c83,_0x1a2fae=this[_0x4f81db(0x30c)](_0x4eaa4c,_0x1ddae4),_0x10464e=_0x1ddae4[_0x4f81db(0x2ec)],_0x2a6d60=_0x1ddae4[_0x4f81db(0x33c)];_0x1ddae4[_0x4f81db(0x21a)]&&(_0x1a2fae&&console[_0x4f81db(0x333)](_0x4f81db(0x2ba)+_0x1a2fae),_0x10464e&&console[_0x4f81db(0x333)]('Revision:\x20'+_0x10464e),_0x1ddae4[_0x4f81db(0x374)]&&console['error'](_0x4f81db(0x237)),_0x2a6d60&&console[_0x4f81db(0x333)](_0x4f81db(0x228)));let _0x34195c;try{_0x34195c=await withSpinner(_0x4f81db(0x211),()=>_0x4e3119[_0x4f81db(0x350)][_0x4f81db(0x341)]({'sourceDir':_0x1a2fae,'revision':_0x10464e,'skipValidation':_0x2a6d60}),{'verbose':_0x1ddae4['verbose']});}catch(_0x483ed7){if(_0x483ed7 instanceof Error&&_0x483ed7['message']['includes']('No\x20workflow\x20tdx.json\x20found'))return console['error'](a42_0x5737de[_0x4f81db(0x2e2)](_0x4f81db(0x27d)),_0x4f81db(0x28b)),_0x1ddae4[_0x4f81db(0x2ea)]?console[_0x4f81db(0x333)](a42_0x5737de[_0x4f81db(0x2d2)](_0x4f81db(0x35c)+_0x1ddae4['workflowProject']+_0x4f81db(0x29e)+_0x1ddae4[_0x4f81db(0x2ea)]+'\x27')):console[_0x4f81db(0x333)](a42_0x5737de[_0x4f81db(0x2d2)](_0x4f81db(0x1e9))),0x1;throw _0x483ed7;}const _0x237aa8=_0x34195c[_0x4f81db(0x252)];console[_0x4f81db(0x333)]('✔\x20Project:\x20'+_0x237aa8[_0x4f81db(0x26f)]),console['error'](_0x4f81db(0x219)+_0x237aa8['sourceDir']),console[_0x4f81db(0x333)](_0x4f81db(0x31d)+_0x237aa8[_0x4f81db(0x2ec)]),console[_0x4f81db(0x333)](_0x4f81db(0x254)+a42_0x5737de['green']('+'+_0x237aa8[_0x4f81db(0x301)][_0x4f81db(0x289)]+'\x20new')+',\x20'+(a42_0x5737de['yellow']('~'+_0x237aa8[_0x4f81db(0x301)]['modified']+_0x4f81db(0x27b))+',\x20')+(a42_0x5737de['red']('-'+_0x237aa8[_0x4f81db(0x301)][_0x4f81db(0x395)]+_0x4f81db(0x33d))+',\x20')+(''+a42_0x5737de[_0x4f81db(0x2d2)](_0x237aa8[_0x4f81db(0x301)][_0x4f81db(0x2c4)]+_0x4f81db(0x349))));for(const _0x386af2 of _0x237aa8[_0x4f81db(0x348)]){_0x386af2[_0x4f81db(0x36b)]===_0x4f81db(0x337)&&_0x386af2[_0x4f81db(0x272)]&&(console[_0x4f81db(0x333)]('\x0a'+a42_0x5737de['cyan'](_0x4f81db(0x29b)+_0x386af2[_0x4f81db(0x340)])),console[_0x4f81db(0x333)](_0x386af2[_0x4f81db(0x272)]));}if(!_0x237aa8[_0x4f81db(0x23c)])return console[_0x4f81db(0x333)](a42_0x5737de[_0x4f81db(0x362)](_0x4f81db(0x375))),await this[_0x4f81db(0x245)](_0x4e3119,_0x237aa8['projectName'],_0x1ddae4['site']),0x0;if(_0x1ddae4[_0x4f81db(0x374)])return console['error'](a42_0x5737de['yellow'](_0x4f81db(0x324))),0x0;if(!_0x1ddae4[_0x4f81db(0x305)]){if(!isInteractive())return console[_0x4f81db(0x333)](a42_0x5737de[_0x4f81db(0x2e2)](_0x4f81db(0x2d9)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4f81db(0x333)](a42_0x5737de[_0x4f81db(0x2d2)](_0x4f81db(0x393))),0x1;const _0x2cae97=await confirmKey(_0x4f81db(0x256));if(!_0x2cae97)return console[_0x4f81db(0x333)](a42_0x5737de[_0x4f81db(0x314)](_0x4f81db(0x264)),_0x4f81db(0x32f)),0x1;}const _0x3804f3=await withSpinner('Pushing\x20project...',()=>_0x4e3119[_0x4f81db(0x350)][_0x4f81db(0x372)](_0x237aa8),{'verbose':_0x1ddae4[_0x4f81db(0x21a)]}),_0x48664f=_0x3804f3['data'];return console[_0x4f81db(0x333)](a42_0x5737de[_0x4f81db(0x362)](_0x4f81db(0x327))),console['error'](_0x4f81db(0x37b)+_0x48664f['projectId']),console['error'](_0x4f81db(0x31d)+_0x48664f[_0x4f81db(0x2ec)]),await this['showWorkflowConsoleUrl'](_0x4e3119,_0x48664f[_0x4f81db(0x26f)],_0x1ddae4['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x1f9);[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x267);async[a42_0x548fe7(0x262)](_0x4ee035){const _0xbd4dc6=a42_0x548fe7,{options:_0x3caac2,args:_0x6a4696,tdx:_0x4e5aea}=_0x4ee035,_0x11238b=this[_0xbd4dc6(0x30c)](_0x6a4696,_0x3caac2),_0x4d1915=_0x3caac2['name'],_0x46de18=_0x3caac2[_0xbd4dc6(0x2ec)],_0x1bdb11=_0x3caac2[_0xbd4dc6(0x33c)];if(!_0x11238b)return console['error'](a42_0x5737de[_0xbd4dc6(0x2e2)](_0xbd4dc6(0x27d)),_0xbd4dc6(0x360)),console[_0xbd4dc6(0x333)](a42_0x5737de[_0xbd4dc6(0x2d2)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console['error'](a42_0x5737de[_0xbd4dc6(0x2d2)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x4d1915)return console[_0xbd4dc6(0x333)](a42_0x5737de['red'](_0xbd4dc6(0x27d)),_0xbd4dc6(0x383)),console['error'](a42_0x5737de[_0xbd4dc6(0x2d2)](_0xbd4dc6(0x28e))),0x1;_0x3caac2[_0xbd4dc6(0x21a)]&&(console['error'](_0xbd4dc6(0x2ba)+_0x11238b),console[_0xbd4dc6(0x333)]('New\x20project\x20name:\x20'+_0x4d1915),_0x46de18&&console['error'](_0xbd4dc6(0x271)+_0x46de18),_0x3caac2['dryRun']&&console[_0xbd4dc6(0x333)](_0xbd4dc6(0x237)),_0x1bdb11&&console[_0xbd4dc6(0x333)](_0xbd4dc6(0x228)));const _0x3753d6=await withSpinner('Analyzing\x20project...',()=>_0x4e5aea[_0xbd4dc6(0x350)][_0xbd4dc6(0x2bb)](_0x11238b,_0x4d1915,{'revision':_0x46de18,'skipValidation':_0x1bdb11}),{'verbose':_0x3caac2[_0xbd4dc6(0x21a)]}),_0xa6b0c0=_0x3753d6[_0xbd4dc6(0x252)];console[_0xbd4dc6(0x333)](_0xbd4dc6(0x1f1)+_0xa6b0c0[_0xbd4dc6(0x279)]);_0xa6b0c0['sourceProjectName']&&console[_0xbd4dc6(0x333)](_0xbd4dc6(0x2cd)+_0xa6b0c0[_0xbd4dc6(0x35a)]);console[_0xbd4dc6(0x333)](_0xbd4dc6(0x363)+_0xa6b0c0[_0xbd4dc6(0x208)]),console[_0xbd4dc6(0x333)](_0xbd4dc6(0x271)+_0xa6b0c0[_0xbd4dc6(0x2ec)]),console['error'](_0xbd4dc6(0x319)+_0xa6b0c0[_0xbd4dc6(0x1f8)]);_0xa6b0c0[_0xbd4dc6(0x1f0)]&&(console[_0xbd4dc6(0x333)](a42_0x5737de[_0xbd4dc6(0x314)](_0xbd4dc6(0x2ad)+_0xa6b0c0[_0xbd4dc6(0x208)]+_0xbd4dc6(0x32d)+_0xa6b0c0['existingProjectId']+')')),console[_0xbd4dc6(0x333)](a42_0x5737de[_0xbd4dc6(0x314)](_0xbd4dc6(0x224))));if(_0x3caac2['dryRun'])return console['error'](a42_0x5737de[_0xbd4dc6(0x314)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x3caac2[_0xbd4dc6(0x305)]){if(!isInteractive())return console['error'](a42_0x5737de[_0xbd4dc6(0x2e2)](_0xbd4dc6(0x2d9)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xbd4dc6(0x333)](a42_0x5737de[_0xbd4dc6(0x2d2)](_0xbd4dc6(0x393))),0x1;const _0x137f7b=_0xa6b0c0[_0xbd4dc6(0x35a)]||a42_0x32a3eb[_0xbd4dc6(0x1fc)](_0x11238b),_0x4f2101=_0xa6b0c0[_0xbd4dc6(0x1f0)]?_0xbd4dc6(0x26a)+_0x4d1915+'\x22\x20with\x20new\x20revision?':'\x0aClone\x20\x22'+_0x137f7b+_0xbd4dc6(0x352)+_0x4d1915+'\x22?',_0x23d380=await confirmKey(_0x4f2101);if(!_0x23d380)return console['error'](a42_0x5737de['yellow'](_0xbd4dc6(0x264))),0x1;}const _0x20e39a=await withSpinner(_0xa6b0c0[_0xbd4dc6(0x1f0)]?_0xbd4dc6(0x260)+_0x4d1915+_0xbd4dc6(0x207):_0xbd4dc6(0x358)+_0x4d1915+_0xbd4dc6(0x207),()=>_0x4e5aea[_0xbd4dc6(0x350)][_0xbd4dc6(0x35f)](_0xa6b0c0),{'verbose':_0x3caac2[_0xbd4dc6(0x21a)]}),_0x1c99f4=_0x20e39a['data'];return console[_0xbd4dc6(0x333)](a42_0x5737de[_0xbd4dc6(0x362)](_0xa6b0c0[_0xbd4dc6(0x1f0)]?_0xbd4dc6(0x2ee):_0xbd4dc6(0x1fa))),console[_0xbd4dc6(0x333)](_0xbd4dc6(0x347)+_0x1c99f4['newProjectName']),console[_0xbd4dc6(0x333)](_0xbd4dc6(0x37b)+_0x1c99f4[_0xbd4dc6(0x2f3)]),console[_0xbd4dc6(0x333)](_0xbd4dc6(0x31d)+_0x1c99f4['revision']),await this['showWorkflowConsoleUrl'](_0x4e5aea,_0x1c99f4[_0xbd4dc6(0x208)],_0x3caac2[_0xbd4dc6(0x306)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x548fe7(0x313)]='workflow:delete';[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x258);async[a42_0x548fe7(0x262)](_0x45a61d){const _0x3128a2=a42_0x548fe7,{options:_0x50d360,args:_0x496338,tdx:_0x5465a1}=_0x45a61d,_0x3ce076=_0x496338[0x0];if(!_0x3ce076)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x3128a2(0x333)](_0x3128a2(0x2ce)),0x1;_0x50d360[_0x3128a2(0x21a)]&&console[_0x3128a2(0x333)]('Project:\x20'+_0x3ce076);if(!_0x50d360['yes']){if(!isInteractive())return console[_0x3128a2(0x333)](a42_0x5737de[_0x3128a2(0x2e2)](_0x3128a2(0x2d9)),_0x3128a2(0x366)),console[_0x3128a2(0x333)](a42_0x5737de['dim'](_0x3128a2(0x393))),0x1;const _0x35567f=await confirmKey(_0x3128a2(0x342)+_0x3ce076+_0x3128a2(0x351));if(!_0x35567f)return console['error'](a42_0x5737de[_0x3128a2(0x314)](_0x3128a2(0x264))),0x1;}const _0x3db09b=await withSpinner(_0x3128a2(0x21b)+_0x3ce076+_0x3128a2(0x207),()=>_0x5465a1['workflow'][_0x3128a2(0x27c)](_0x3ce076),{'verbose':_0x50d360[_0x3128a2(0x21a)]}),_0x4618d1=_0x3db09b[_0x3128a2(0x252)];return console[_0x3128a2(0x333)](_0x3128a2(0x241)+_0x4618d1[_0x3128a2(0x26f)]),console[_0x3128a2(0x333)](_0x3128a2(0x37b)+_0x4618d1[_0x3128a2(0x2bf)]),0x0;}}export function parseKeyValue(_0x1de4c2){const _0x58152c=a42_0x548fe7,_0x17644a=_0x1de4c2[_0x58152c(0x2d3)]('=');if(_0x17644a===-0x1)throw new Error(_0x58152c(0x2dc)+_0x1de4c2+_0x58152c(0x31f));const _0xe8c54d=_0x1de4c2[_0x58152c(0x2c0)](0x0,_0x17644a),_0x475c53=_0x1de4c2[_0x58152c(0x2c0)](_0x17644a+0x1);if(!_0xe8c54d)throw new Error(_0x58152c(0x23f));return{'key':_0xe8c54d,'value':_0x475c53};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]='workflow:secrets:list';['description']='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x548fe7(0x262)](_0x3ee15e){const _0x43c21a=a42_0x548fe7,{options:_0x4338fb,args:_0x54e150,tdx:_0x2e66dc}=_0x3ee15e,_0x4824b3=this['requireProject'](_0x54e150,_0x4338fb);if(!_0x4824b3)return 0x1;_0x4338fb[_0x43c21a(0x21a)]&&console[_0x43c21a(0x333)]('Project:\x20'+_0x4824b3);const _0x59e49c=await withSpinner(_0x43c21a(0x2fc),()=>_0x2e66dc[_0x43c21a(0x350)][_0x43c21a(0x2c7)](_0x4824b3),{'verbose':_0x4338fb[_0x43c21a(0x21a)]}),{secrets:_0x43b843}=_0x59e49c[_0x43c21a(0x252)];return console[_0x43c21a(0x333)](_0x43c21a(0x2f8)+_0x43b843[_0x43c21a(0x214)]+_0x43c21a(0x251)+(_0x43b843[_0x43c21a(0x214)]!==0x1?'s':'')),await handleSDKOutput(_0x43b843,_0x4338fb),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x268);[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x357);async[a42_0x548fe7(0x262)](_0x5bb3fc){const _0x5342e6=a42_0x548fe7,{options:_0x476180,args:_0x37d7a1,tdx:_0x4bc263}=_0x5bb3fc;let _0xcb5262,_0x32d29f;if(_0x37d7a1['length']>=0x2)_0xcb5262=_0x37d7a1[0x0],_0x32d29f=_0x37d7a1[0x1];else{if(_0x37d7a1[_0x5342e6(0x214)]===0x1&&_0x476180[_0x5342e6(0x2ea)])_0xcb5262=_0x476180[_0x5342e6(0x2ea)],_0x32d29f=_0x37d7a1[0x0];else return _0x37d7a1['length']===0x1?(console['error'](_0x5342e6(0x326)),console[_0x5342e6(0x333)](_0x5342e6(0x34a)),0x1):(console[_0x5342e6(0x333)](_0x5342e6(0x263)),console[_0x5342e6(0x333)](_0x5342e6(0x206)),0x1);}let _0x59995a,_0x20c4b0;try{({key:_0x59995a,value:_0x20c4b0}=parseKeyValue(_0x32d29f));}catch(_0x786910){return _0x786910 instanceof Error&&console[_0x5342e6(0x333)](a42_0x5737de[_0x5342e6(0x2e2)](_0x5342e6(0x27d)),_0x786910[_0x5342e6(0x2aa)]),0x1;}_0x476180[_0x5342e6(0x21a)]&&(console[_0x5342e6(0x333)](_0x5342e6(0x2ae)+_0xcb5262),console[_0x5342e6(0x333)]('Key:\x20'+_0x59995a));const _0x1994e6=await withSpinner(_0x5342e6(0x27a),()=>_0x4bc263[_0x5342e6(0x350)][_0x5342e6(0x321)](_0xcb5262,_0x59995a,_0x20c4b0),{'verbose':_0x476180[_0x5342e6(0x21a)]}),_0x171deb=_0x1994e6[_0x5342e6(0x252)];return console[_0x5342e6(0x333)]('✔\x20Secret\x20\x27'+_0x171deb[_0x5342e6(0x22f)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x171deb[_0x5342e6(0x26f)]+'\x27'),(_0x476180[_0x5342e6(0x230)]||_0x476180[_0x5342e6(0x2b0)])&&await handleSingleObjectOutput(_0x171deb,_0x476180),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x303);[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x21c);async[a42_0x548fe7(0x262)](_0x3c3078){const _0x1c164f=a42_0x548fe7,{options:_0x367544,args:_0x5f57d6,tdx:_0x3e3e0d}=_0x3c3078;let _0x3f3f35,_0x244a83;if(_0x5f57d6['length']>=0x2)_0x3f3f35=_0x5f57d6[0x0],_0x244a83=_0x5f57d6[0x1];else{if(_0x5f57d6[_0x1c164f(0x214)]===0x1&&_0x367544[_0x1c164f(0x2ea)])_0x3f3f35=_0x367544['workflowProject'],_0x244a83=_0x5f57d6[0x0];else return _0x5f57d6[_0x1c164f(0x214)]===0x1?(console[_0x1c164f(0x333)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x1c164f(0x34a)),0x1):(console['error'](_0x1c164f(0x2b1)),console[_0x1c164f(0x333)](_0x1c164f(0x31c)),0x1);}_0x367544[_0x1c164f(0x21a)]&&(console[_0x1c164f(0x333)](_0x1c164f(0x2ae)+_0x3f3f35),console[_0x1c164f(0x333)](_0x1c164f(0x2dd)+_0x244a83));if(!_0x367544['yes']){if(!isInteractive())return console[_0x1c164f(0x333)](a42_0x5737de[_0x1c164f(0x2e2)]('\x0aError:'),_0x1c164f(0x366)),console[_0x1c164f(0x333)](a42_0x5737de[_0x1c164f(0x2d2)](_0x1c164f(0x393))),0x1;const _0xb5b2f=await confirmKey(_0x1c164f(0x2b7)+_0x244a83+_0x1c164f(0x320)+_0x3f3f35+'\x27?');if(!_0xb5b2f)return console[_0x1c164f(0x333)](a42_0x5737de[_0x1c164f(0x314)](_0x1c164f(0x264))),0x1;}const _0x147ae1=await withSpinner(_0x1c164f(0x242),()=>_0x3e3e0d[_0x1c164f(0x350)][_0x1c164f(0x33a)](_0x3f3f35,_0x244a83),{'verbose':_0x367544[_0x1c164f(0x21a)]}),_0x55d37e=_0x147ae1[_0x1c164f(0x252)];return console[_0x1c164f(0x333)](_0x1c164f(0x32e)+_0x55d37e[_0x1c164f(0x22f)]+_0x1c164f(0x387)+_0x55d37e[_0x1c164f(0x26f)]+'\x27'),(_0x367544[_0x1c164f(0x230)]||_0x367544[_0x1c164f(0x2b0)])&&await handleSingleObjectOutput(_0x55d37e,_0x367544),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(_0x2e81ce){const _0x274088=a42_0x548fe7,_0x5469a1=Math[_0x274088(0x273)](_0x2e81ce/0x3e8),_0xe9b4c=Math[_0x274088(0x273)](_0x5469a1/0x3c),_0x3ccf30=Math[_0x274088(0x273)](_0xe9b4c/0x3c),_0x3509f4=Math[_0x274088(0x273)](_0x3ccf30/0x18);if(_0x3509f4>0x0){const _0x5ac706=_0x3ccf30%0x18;return _0x5ac706>0x0?_0x3509f4+'d\x20'+_0x5ac706+'h':_0x3509f4+'d';}else{if(_0x3ccf30>0x0){const _0x327baa=_0xe9b4c%0x3c;return _0x327baa>0x0?_0x3ccf30+'h\x20'+_0x327baa+'m':_0x3ccf30+'h';}else{if(_0xe9b4c>0x0){const _0x49b09e=_0x5469a1%0x3c;return _0x49b09e>0x0?_0xe9b4c+'m\x20'+_0x49b09e+'s':_0xe9b4c+'m';}else return _0x5469a1+'s';}}}function formatTimestamp(_0x3148c0,_0x219ab5){const _0x3bf275=a42_0x548fe7,_0x507642=new Date(_0x3148c0),_0x17d99c=String(_0x507642[_0x3bf275(0x278)]())['padStart'](0x2,'0'),_0x113341=String(_0x507642[_0x3bf275(0x330)]())[_0x3bf275(0x2f9)](0x2,'0'),_0x18b2a3=_0x17d99c+':'+_0x113341,_0x34e208=_0x507642[_0x3bf275(0x2a1)]()===_0x219ab5[_0x3bf275(0x2a1)]()&&_0x507642[_0x3bf275(0x2d7)]()===_0x219ab5[_0x3bf275(0x2d7)]()&&_0x507642[_0x3bf275(0x29d)]()===_0x219ab5['getDate']();if(_0x34e208)return _0x18b2a3;else{const _0xd81691=String(_0x507642['getMonth']()+0x1)[_0x3bf275(0x2f9)](0x2,'0'),_0x431201=String(_0x507642[_0x3bf275(0x29d)]())[_0x3bf275(0x2f9)](0x2,'0');return _0xd81691+'-'+_0x431201+'\x20'+_0x18b2a3;}}function formatDate(_0x3eeff9){const _0x5acca8=a42_0x548fe7,_0x3c325e=_0x3eeff9[_0x5acca8(0x2a1)](),_0x56e812=String(_0x3eeff9['getMonth']()+0x1)['padStart'](0x2,'0'),_0x24a483=String(_0x3eeff9[_0x5acca8(0x29d)]())['padStart'](0x2,'0');return _0x3c325e+'-'+_0x56e812+'-'+_0x24a483;}function a42_0x3632(_0x1a6033,_0xcefc7b){_0x1a6033=_0x1a6033-0x1e9;const _0x46c0b0=a42_0x46c0();let _0x3632d4=_0x46c0b0[_0x1a6033];return _0x3632d4;}function getTaskStateIcon(_0x24b671){const _0x41f612={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x41f612[_0x24b671]||'⚪';}function getBarChar(_0x52673d){const _0x2232cf=a42_0x548fe7;return _0x52673d==='error'||_0x52673d===_0x2232cf(0x33e)?'×':'─';}function getBarColor(_0x5b9511){const _0x1511ae=a42_0x548fe7,_0x11ca6d={'success':a42_0x5737de[_0x1511ae(0x362)],'error':a42_0x5737de[_0x1511ae(0x2e2)],'group_error':a42_0x5737de[_0x1511ae(0x2e2)],'running':a42_0x5737de[_0x1511ae(0x2c3)],'blocked':a42_0x5737de[_0x1511ae(0x314)],'planned':a42_0x5737de[_0x1511ae(0x2d2)],'canceling':a42_0x5737de['yellow']};return _0x11ca6d[_0x5b9511]||a42_0x5737de[_0x1511ae(0x22c)];}function parseTaskName(_0x4cac28){const _0x126ea8=a42_0x548fe7;let _0x41ecad=_0x4cac28[_0x126ea8(0x377)](/^\++/,'');const _0x52a84e=_0x41ecad[_0x126ea8(0x266)]('+'),_0x439288=_0x52a84e[_0x126ea8(0x214)]>0x1?_0x52a84e['length']-0x2:0x0,_0x5893c8=_0x52a84e[_0x52a84e[_0x126ea8(0x214)]-0x1]||_0x41ecad;return{'level':_0x439288,'name':'+'+_0x5893c8};}function truncateTaskName(_0x37843b,_0x25047c){const _0x14c5a2=a42_0x548fe7,_0x6f664d=stringWidth(_0x37843b);if(_0x6f664d<=_0x25047c)return _0x37843b;let _0x422199=_0x37843b;while(stringWidth(_0x422199+'…')>_0x25047c&&_0x422199[_0x14c5a2(0x214)]>0x0){_0x422199=_0x422199[_0x14c5a2(0x22b)](0x0,-0x1);}return _0x422199+'…';}function calculateTimeScale(_0x28eb92,_0x4bd1a3){const _0x495040=a42_0x548fe7;return{'startTime':_0x28eb92[_0x495040(0x35e)],'endTime':_0x28eb92['end'],'durationMs':_0x28eb92[_0x495040(0x2fe)],'msPerChar':_0x28eb92[_0x495040(0x2fe)]/_0x4bd1a3};}function timeToPosition(_0x21d6c0,_0x46bc27,_0x1885ca){const _0x4ffd1b=a42_0x548fe7,_0x2d3c64=_0x21d6c0-_0x46bc27[_0x4ffd1b(0x32c)],_0x24aff1=Math[_0x4ffd1b(0x273)](_0x2d3c64/_0x46bc27[_0x4ffd1b(0x2de)]);return Math[_0x4ffd1b(0x36d)](0x0,Math[_0x4ffd1b(0x317)](_0x24aff1,_0x1885ca));}function renderTimeAxis(_0x4112f2,_0x21b01f){const _0x313c2f=a42_0x548fe7,_0x23fc28=Math[_0x313c2f(0x317)](TIMELINE_CONFIG[_0x313c2f(0x25e)],Math[_0x313c2f(0x36d)](TIMELINE_CONFIG[_0x313c2f(0x323)],Math[_0x313c2f(0x273)](_0x21b01f/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x50ebed=_0x4112f2[_0x313c2f(0x2b5)]/(_0x23fc28-0x1),_0x45ea75=new Date(_0x4112f2['startTime']),_0x4f983b=[];for(let _0x2cb93a=0x0;_0x2cb93a<_0x23fc28;_0x2cb93a++){const _0x28104e=_0x4112f2['startTime']+_0x2cb93a*_0x50ebed,_0x3ccdd8=timeToPosition(_0x28104e,_0x4112f2,_0x21b01f),_0xcf146d=formatTimestamp(_0x28104e,_0x45ea75);_0x4f983b[_0x313c2f(0x382)]({'pos':_0x3ccdd8,'text':_0xcf146d});}const _0x1cd6e3=new Array(_0x21b01f)[_0x313c2f(0x26e)]('\x20');let _0x4516ab=-0x1;for(const {pos:_0x17117c,text:_0x28da98}of _0x4f983b){let _0x39534b=Math[_0x313c2f(0x36d)](0x0,_0x17117c-Math[_0x313c2f(0x273)](_0x28da98[_0x313c2f(0x214)]/0x2));_0x39534b<=_0x4516ab+TIMELINE_CONFIG[_0x313c2f(0x284)]&&(_0x39534b=_0x4516ab+TIMELINE_CONFIG[_0x313c2f(0x284)]+0x1);_0x39534b+_0x28da98['length']>_0x21b01f&&(_0x39534b=_0x21b01f-_0x28da98[_0x313c2f(0x214)]);if(_0x39534b>=0x0&&_0x39534b+_0x28da98[_0x313c2f(0x214)]<=_0x21b01f&&_0x39534b>_0x4516ab){for(let _0xe62e8c=0x0;_0xe62e8c<_0x28da98[_0x313c2f(0x214)];_0xe62e8c++){_0x1cd6e3[_0x39534b+_0xe62e8c]=_0x28da98[_0xe62e8c];}_0x4516ab=_0x39534b+_0x28da98[_0x313c2f(0x214)]-0x1;}}return _0x1cd6e3[_0x313c2f(0x24d)]('');}function renderTaskRow(_0xdbd99e,_0x174058,_0xf23900,_0x2b0fd9){const _0x2fbfef=a42_0x548fe7,{level:_0x31676a,name:_0xec952b}=parseTaskName(_0xdbd99e['name']),_0x31b9b3='\x20'[_0x2fbfef(0x265)](_0x31676a),_0x34bd44=_0xdbd99e[_0x2fbfef(0x2c9)]?'('+formatElapsed(_0xdbd99e[_0x2fbfef(0x2c9)][_0x2fbfef(0x2fe)])+')':'',_0x164351=stringWidth(_0x34bd44),_0x55d24f=_0x31676a*0x1,_0x20a7e5=_0x2b0fd9-_0x55d24f-_0x164351-0x1,_0x1e24aa=truncateTaskName(_0xec952b,_0x20a7e5),_0x5dbf2f=_0x31b9b3+_0x1e24aa,_0x59ffe7=stringWidth(_0x5dbf2f),_0x81a1cb=_0x2b0fd9-_0x59ffe7-_0x164351,_0x3c97bb=_0x5dbf2f+'\x20'['repeat'](Math[_0x2fbfef(0x36d)](0x1,_0x81a1cb))+a42_0x5737de[_0x2fbfef(0x2d2)](_0x34bd44),_0x500826=getTaskStateIcon(_0xdbd99e[_0x2fbfef(0x281)]),_0x1f778b=new Array(_0xf23900)[_0x2fbfef(0x26e)]('\x20');if(_0xdbd99e['window']){const _0x1323c1=timeToPosition(_0xdbd99e[_0x2fbfef(0x2c9)][_0x2fbfef(0x35e)],_0x174058,_0xf23900),_0x1301b6=timeToPosition(_0xdbd99e[_0x2fbfef(0x2c9)]['end'],_0x174058,_0xf23900),_0x5be582=getBarChar(_0xdbd99e[_0x2fbfef(0x281)]),_0x415b3c=Math['max'](_0x1323c1+0x1,_0x1301b6);for(let _0x5d543b=_0x1323c1;_0x5d543b<Math[_0x2fbfef(0x317)](_0x415b3c,_0xf23900);_0x5d543b++){_0x1f778b[_0x5d543b]=_0x5be582;}}const _0x6e9b5=getBarColor(_0xdbd99e['state']),_0x5e8476=_0x1f778b[_0x2fbfef(0x394)](_0x2459e9=>_0x2459e9==='\x20'?'\x20':_0x6e9b5(_0x2459e9))['join']('');return _0x500826+'\x20'+_0x3c97bb+'│'+_0x5e8476+'│';}function calculateStats(_0x3cf30a){const _0x422f65=a42_0x548fe7,_0x5b2df8={'total':_0x3cf30a[_0x422f65(0x214)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x5840b2 of _0x3cf30a){if(_0x5840b2[_0x422f65(0x281)]===_0x422f65(0x343))_0x5b2df8[_0x422f65(0x343)]++;else{if(_0x5840b2[_0x422f65(0x281)]===_0x422f65(0x333)||_0x5840b2[_0x422f65(0x281)]===_0x422f65(0x33e))_0x5b2df8['error']++;else _0x5840b2[_0x422f65(0x281)]===_0x422f65(0x28d)?_0x5b2df8[_0x422f65(0x28d)]++:_0x5b2df8[_0x422f65(0x1fb)]++;}}return _0x5b2df8;}function formatStats(_0x555c2d){const _0xb59538=a42_0x548fe7;return[_0xb59538(0x209)+_0x555c2d[_0xb59538(0x36a)],'✅\x20'+_0x555c2d['success'],'❌\x20'+_0x555c2d['error'],_0xb59538(0x238)+_0x555c2d['running'],'⏳\x20'+_0x555c2d[_0xb59538(0x1fb)]][_0xb59538(0x24d)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x548fe7(0x313)]=a42_0x548fe7(0x331);[a42_0x548fe7(0x2da)]=a42_0x548fe7(0x2e1);async['execute'](_0x4881bc){const _0x395242=a42_0x548fe7,{options:_0x1857d0,args:_0x28e4d9,tdx:_0x2cfa54}=_0x4881bc;let _0x14f744,_0x5a6102,_0x774d9=![];if(_0x28e4d9[0x0]){if(_0x28e4d9[0x0][_0x395242(0x259)]('.')){const _0x4fd3a5=this[_0x395242(0x359)](_0x28e4d9,_0x1857d0);if(!_0x4fd3a5)return 0x1;_0x14f744=_0x4fd3a5[_0x395242(0x26f)],_0x5a6102=_0x4fd3a5[_0x395242(0x277)];}else{_0x5a6102=_0x28e4d9[0x0],_0x14f744=_0x1857d0['workflowProject'];if(!_0x14f744)return console[_0x395242(0x333)](a42_0x5737de['red']('Error:'),_0x395242(0x210)),0x1;_0x774d9=!![];}}else{const _0x286ec5=this[_0x395242(0x359)](_0x28e4d9,_0x1857d0);if(!_0x286ec5)return 0x1;_0x14f744=_0x286ec5['projectName'],_0x5a6102=_0x286ec5[_0x395242(0x277)];}if(_0x1857d0[_0x395242(0x21a)]){if(_0x14f744&&_0x5a6102)console[_0x395242(0x333)](_0x395242(0x255)+_0x14f744+'.'+_0x5a6102);else _0x14f744&&console[_0x395242(0x333)]('Filter:\x20project='+_0x14f744);}const _0x37bf70=_0x1857d0[_0x395242(0x269)],_0x597184=_0x1857d0[_0x395242(0x280)];if(_0x37bf70){_0x597184&&console[_0x395242(0x333)](a42_0x5737de[_0x395242(0x314)](_0x395242(0x2ef)),_0x395242(0x385));const _0x1f28e0=_0x1857d0['follow'];return _0x1f28e0?await this[_0x395242(0x35b)](_0x4881bc,_0x37bf70):await this[_0x395242(0x2e5)](_0x4881bc,_0x37bf70,_0x1857d0),0x0;}if(_0x597184){const _0x3aef49=await withSpinner('Loading\x20session...',()=>_0x2cfa54[_0x395242(0x350)][_0x395242(0x392)]({'projectName':_0x14f744,'workflowName':_0x5a6102,'limit':0x64}),{'verbose':_0x1857d0['verbose']}),_0x34c8d6=_0x3aef49['data'][_0x395242(0x33b)](_0x2499d4=>_0x2499d4['id']===_0x597184);if(!_0x34c8d6)return console[_0x395242(0x333)](a42_0x5737de[_0x395242(0x2e2)]('Error:'),_0x395242(0x2d8)+_0x597184),0x1;if(!_0x34c8d6[_0x395242(0x23a)]?.['id'])return console[_0x395242(0x333)](a42_0x5737de[_0x395242(0x2e2)]('Error:'),_0x395242(0x222)+_0x597184+_0x395242(0x2b2)),0x1;const _0x585fcb=_0x34c8d6[_0x395242(0x23a)]['id'];_0x1857d0[_0x395242(0x21a)]&&console[_0x395242(0x333)](_0x395242(0x297)+_0x585fcb+'\x20from\x20session\x20'+_0x597184);const _0x3333b8=_0x1857d0[_0x395242(0x1f3)];return _0x3333b8?await this[_0x395242(0x35b)](_0x4881bc,_0x585fcb):await this[_0x395242(0x2e5)](_0x4881bc,_0x585fcb,_0x1857d0),0x0;}const _0x4f6fc3=await withSpinner('Loading\x20sessions...',()=>_0x2cfa54['workflow'][_0x395242(0x392)]({'projectName':_0x14f744,'workflowName':_0x5a6102,'limit':_0x1857d0[_0x395242(0x29a)]||0x32}),{'verbose':_0x1857d0[_0x395242(0x21a)]}),_0x1f39e2=_0x4f6fc3['data'];if(_0x1f39e2[_0x395242(0x214)]===0x0){if(_0x14f744&&_0x5a6102)console[_0x395242(0x333)](_0x395242(0x215)+_0x14f744+'.'+_0x5a6102);else _0x14f744?console['error'](_0x395242(0x2d5)+_0x14f744):(console[_0x395242(0x333)](_0x395242(0x2e4)),console[_0x395242(0x333)](a42_0x5737de[_0x395242(0x2d2)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x1f39e2[_0x395242(0x2c2)]((_0x56319f,_0x3c0908)=>{const _0x4ea7bd=_0x395242,_0x1ebe82=_0x56319f[_0x4ea7bd(0x2a3)]||'',_0xca80f5=_0x3c0908[_0x4ea7bd(0x2a3)]||'';return _0xca80f5['localeCompare'](_0x1ebe82);});if(_0x1857d0['json']||_0x1857d0[_0x395242(0x2b0)])return await handleSDKOutput(_0x1f39e2,_0x1857d0),0x0;let _0x5cf999;if(_0x774d9){const _0x42e729=_0x1f39e2[0x0];if(!_0x42e729[_0x395242(0x23a)]?.['id'])return console[_0x395242(0x333)](_0x395242(0x1ed)),0x0;_0x5cf999=_0x42e729[_0x395242(0x23a)]['id'],_0x1857d0['verbose']&&console['error'](_0x395242(0x2fd)+_0x42e729[_0x395242(0x2a3)]);}else{const _0x3a363f=_0x1f39e2['map'](_0x1b16c9=>{const _0x3aac24=_0x395242,_0x44b89f=getAttemptStatusDisplay(_0x1b16c9[_0x3aac24(0x23a)]);return{'title':_0x1b16c9['project']?.[_0x3aac24(0x313)]+'.'+_0x1b16c9[_0x3aac24(0x350)]?.[_0x3aac24(0x313)]+'\x20-\x20'+_0x1b16c9['sessionTime']+'\x20'+_0x44b89f['icon'],'value':_0x1b16c9[_0x3aac24(0x23a)]?.['id']||'','description':_0x44b89f[_0x3aac24(0x30f)]};}),_0x24d747=await a42_0x2a4a52({'type':'select','name':_0x395242(0x269),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x3a363f[_0x395242(0x384)](_0x41f1c0=>_0x41f1c0[_0x395242(0x380)]!=='')});if(!_0x24d747['attemptId'])return 0x0;_0x5cf999=_0x24d747['attemptId'];}const _0x3fc209=_0x1857d0[_0x395242(0x1f3)];return _0x3fc209?await this[_0x395242(0x35b)](_0x4881bc,_0x5cf999):await this[_0x395242(0x2e5)](_0x4881bc,_0x5cf999,_0x1857d0),0x0;}async[a42_0x548fe7(0x2e5)](_0x42c7c5,_0x46f757,_0x175368){const _0x578d83=a42_0x548fe7,{tdx:_0x5886b0}=_0x42c7c5;let _0x58b6ba,_0x211612;try{[_0x58b6ba,_0x211612]=await Promise['all']([_0x5886b0[_0x578d83(0x350)][_0x578d83(0x34e)](_0x46f757),_0x5886b0['workflow'][_0x578d83(0x2ab)](_0x46f757,![])]);}catch(_0x461d17){console['error'](a42_0x5737de['red'](_0x578d83(0x31b)));_0x175368['verbose']&&console[_0x578d83(0x333)](_0x461d17);throw _0x461d17;}if(_0x175368['json']||_0x175368[_0x578d83(0x2b0)]){const _0xa820c3=this[_0x578d83(0x2e0)](_0x58b6ba,_0x211612);await handleSDKOutput([_0xa820c3],_0x175368);return;}const _0x298ce2=_0x5886b0['context'][_0x578d83(0x306)],_0x9c9b6a=this[_0x578d83(0x30b)](_0x58b6ba,_0x211612,_0x298ce2);console['log'](_0x9c9b6a);}async[a42_0x548fe7(0x35b)](_0x279b1b,_0x1db7e6){const _0x1f832b=a42_0x548fe7,{tdx:_0x39e7bb}=_0x279b1b,_0x2c2cf8=TIMELINE_CONFIG[_0x1f832b(0x36f)],_0x2dedb0=TIMELINE_CONFIG[_0x1f832b(0x2af)];let _0x29dc5b=0x0;while(_0x29dc5b<_0x2dedb0){process[_0x1f832b(0x1f7)][_0x1f832b(0x299)]&&process[_0x1f832b(0x1f7)]['write']('\x1bc');let _0x1e3b1f,_0x237861;try{[_0x1e3b1f,_0x237861]=await Promise['all']([_0x39e7bb[_0x1f832b(0x350)][_0x1f832b(0x34e)](_0x1db7e6),_0x39e7bb[_0x1f832b(0x350)][_0x1f832b(0x2ab)](_0x1db7e6,![])]);}catch(_0x488414){console[_0x1f832b(0x333)](a42_0x5737de[_0x1f832b(0x2e2)](_0x1f832b(0x28a)));_0x29dc5b>0x0&&console[_0x1f832b(0x333)](a42_0x5737de['dim'](_0x1f832b(0x221)+_0x29dc5b));throw _0x488414;}const _0x1e5663=_0x39e7bb['context'][_0x1f832b(0x306)],_0x5953e6=this[_0x1f832b(0x30b)](_0x1e3b1f,_0x237861,_0x1e5663);console['log'](_0x5953e6);const _0x26db27=_0x1e3b1f[_0x1f832b(0x250)]&&_0x237861[_0x1f832b(0x369)](_0x3e7993=>_0x3e7993[_0x1f832b(0x281)]!==_0x1f832b(0x28d)&&_0x3e7993[_0x1f832b(0x281)]!=='planned');if(_0x26db27){console[_0x1f832b(0x333)](a42_0x5737de[_0x1f832b(0x362)](_0x1f832b(0x30e)));break;}console['error'](a42_0x5737de[_0x1f832b(0x2d2)](_0x1f832b(0x2a6)+_0x29dc5b*0x2+_0x1f832b(0x243))),await new Promise(_0x4f1b7a=>setTimeout(_0x4f1b7a,_0x2c2cf8)),_0x29dc5b++;}_0x29dc5b>=_0x2dedb0&&console[_0x1f832b(0x333)](a42_0x5737de[_0x1f832b(0x314)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0x548fe7(0x30b)](_0x2d9760,_0x1b49ee,_0x2b26b9){const _0x380563=a42_0x548fe7,_0x284e5e=[],_0x2e997e=TIMELINE_CONFIG[_0x380563(0x232)],_0x35b3a1=0x5,_0x1a3e57=process[_0x380563(0x1f7)]['columns']||0x78,_0xa7e8fc=_0x1a3e57-_0x2e997e-_0x35b3a1,_0x44aa20=Math[_0x380563(0x36d)](TIMELINE_CONFIG[_0x380563(0x22d)],Math[_0x380563(0x317)](_0xa7e8fc,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x456402=new Date(_0x2d9760[_0x380563(0x2a0)])[_0x380563(0x24e)](),_0x9170bf=_0x2d9760[_0x380563(0x371)]?new Date(_0x2d9760['finishedAt'])[_0x380563(0x24e)]():Date['now'](),_0x146444={'start':_0x456402,'end':_0x9170bf,'duration':_0x9170bf-_0x456402},_0xa81a1c=new Map(),_0x39b970=[];for(const _0x4d3b0e of _0x1b49ee){if(_0x4d3b0e[_0x380563(0x29f)]){const _0x1b00e6=new Date(_0x4d3b0e[_0x380563(0x29f)])[_0x380563(0x24e)](),_0x202369=_0x4d3b0e[_0x380563(0x31a)]?new Date(_0x4d3b0e[_0x380563(0x31a)])[_0x380563(0x24e)]():Date[_0x380563(0x2a9)](),_0x4fea12={'start':_0x1b00e6,'end':_0x202369,'duration':_0x202369-_0x1b00e6};_0xa81a1c[_0x380563(0x325)](_0x4d3b0e['id'],_0x4fea12),_0x39b970[_0x380563(0x382)]({'name':_0x4d3b0e[_0x380563(0x34d)],'state':_0x4d3b0e['state']||_0x380563(0x367),'window':_0x4fea12});}else _0x39b970[_0x380563(0x382)]({'name':_0x4d3b0e[_0x380563(0x34d)],'state':_0x4d3b0e[_0x380563(0x281)]||'planned','window':undefined});}_0x39b970[_0x380563(0x2c2)]((_0x3c07ad,_0x52e7ea)=>{const _0x3318e9=_0x380563;if(!_0x3c07ad['window'])return 0x1;if(!_0x52e7ea[_0x3318e9(0x2c9)])return-0x1;return _0x3c07ad[_0x3318e9(0x2c9)][_0x3318e9(0x35e)]-_0x52e7ea[_0x3318e9(0x2c9)][_0x3318e9(0x35e)];});const _0x1b6d5c=_0x39b970[_0x380563(0x214)],_0x1ff0a3=_0x1b6d5c>TIMELINE_CONFIG[_0x380563(0x332)];_0x1ff0a3&&_0x39b970[_0x380563(0x1f6)](TIMELINE_CONFIG[_0x380563(0x332)]);const _0x2d7bbd=calculateTimeScale(_0x146444,_0x44aa20),_0x1732bf=_0x2d9760[_0x380563(0x250)]?_0x2d9760[_0x380563(0x343)]?a42_0x5737de['green'](_0x380563(0x343)):a42_0x5737de[_0x380563(0x2e2)](_0x380563(0x333)):a42_0x5737de[_0x380563(0x2c3)]('running'),_0x244211=_0x2d9760[_0x380563(0x225)]?.['id'],_0x5b16a8=_0x2d9760[_0x380563(0x280)];let _0x7e7171;if(_0x244211&&_0x5b16a8){const _0x26301c=getWorkflowAttemptUrl(_0x2b26b9,_0x244211,_0x5b16a8,_0x2d9760['id']);_0x7e7171=hyperlink(a42_0x5737de[_0x380563(0x2d2)](_0x2d9760['id']),_0x26301c);}else _0x7e7171=a42_0x5737de[_0x380563(0x2d2)](_0x2d9760['id']);_0x284e5e['push'](_0x380563(0x2b9)+_0x7e7171+_0x380563(0x37f)+_0x1732bf+_0x380563(0x37f)+formatElapsed(_0x146444['duration']));if(_0x39b970['length']>0x0){const _0x2ff428=renderTimeAxis(_0x2d7bbd,_0x44aa20),_0x3c4f58=new Date(_0x146444[_0x380563(0x35e)]),_0x14c81c=formatDate(_0x3c4f58),_0x43ef6e=TIMELINE_CONFIG[_0x380563(0x20a)]+TIMELINE_CONFIG[_0x380563(0x2cc)]+_0x2e997e,_0x12ed5e=_0x14c81c['padStart'](_0x43ef6e),_0x54264f=a42_0x5737de['dim'](_0x12ed5e);_0x284e5e[_0x380563(0x382)](_0x54264f+'\x20'+_0x2ff428);for(const _0x3b2ad2 of _0x39b970){_0x284e5e[_0x380563(0x382)](renderTaskRow(_0x3b2ad2,_0x2d7bbd,_0x44aa20,_0x2e997e));}const _0x4eae21=calculateStats(_0x39b970);_0x284e5e[_0x380563(0x382)](formatStats(_0x4eae21)),_0x1ff0a3&&_0x284e5e[_0x380563(0x382)](a42_0x5737de['yellow'](_0x380563(0x309)+TIMELINE_CONFIG[_0x380563(0x332)]+'\x20of\x20'+_0x1b6d5c+_0x380563(0x2a2))),_0x284e5e[_0x380563(0x382)](''),_0x284e5e[_0x380563(0x382)](a42_0x5737de['dim'](_0x380563(0x283))+(_0x380563(0x22a)+_0x2d9760['id']+_0x380563(0x370))+a42_0x5737de[_0x380563(0x2d2)](_0x380563(0x354)));}else _0x284e5e[_0x380563(0x382)](_0x380563(0x2f5));return _0x284e5e['join']('\x0a');}[a42_0x548fe7(0x2e0)](_0xaf5d6f,_0x5595f9){const _0x222da3=a42_0x548fe7,_0xdb0790=new Date(_0xaf5d6f[_0x222da3(0x2a0)])[_0x222da3(0x24e)](),_0xec5aef=_0xaf5d6f['finishedAt']?new Date(_0xaf5d6f[_0x222da3(0x371)])['getTime']():Date[_0x222da3(0x2a9)](),_0x5a4fca=_0xec5aef-_0xdb0790,_0x1bc98c=[];for(const _0x262a73 of _0x5595f9){if(_0x262a73['startedAt']){const _0xa6d8dd=new Date(_0x262a73['startedAt'])[_0x222da3(0x24e)](),_0x16d4d6=_0x262a73['updatedAt']?new Date(_0x262a73['updatedAt'])[_0x222da3(0x24e)]():Date[_0x222da3(0x2a9)]();_0x1bc98c[_0x222da3(0x382)]({'name':_0x262a73[_0x222da3(0x34d)],'state':_0x262a73[_0x222da3(0x281)]||_0x222da3(0x367),'window':{'start':_0xa6d8dd,'end':_0x16d4d6,'duration':_0x16d4d6-_0xa6d8dd}});}else _0x1bc98c['push']({'name':_0x262a73[_0x222da3(0x34d)],'state':_0x262a73[_0x222da3(0x281)]||_0x222da3(0x29c),'window':undefined});}const _0x34d24d=calculateStats(_0x1bc98c);return{'attempt':{'id':_0xaf5d6f['id'],'status':_0xaf5d6f[_0x222da3(0x250)]?_0xaf5d6f[_0x222da3(0x343)]?_0x222da3(0x343):_0x222da3(0x333):_0x222da3(0x28d),'createdAt':_0xaf5d6f[_0x222da3(0x2a0)],'finishedAt':_0xaf5d6f[_0x222da3(0x371)],'duration_ms':_0x5a4fca},'tasks':_0x1bc98c[_0x222da3(0x394)](_0x2d787a=>({'name':_0x2d787a[_0x222da3(0x313)],'state':_0x2d787a[_0x222da3(0x281)],'startedAt':_0x2d787a[_0x222da3(0x2c9)]?new Date(_0x2d787a['window'][_0x222da3(0x35e)])[_0x222da3(0x1f4)]():null,'updatedAt':_0x2d787a['window']?new Date(_0x2d787a[_0x222da3(0x2c9)][_0x222da3(0x34f)])[_0x222da3(0x1f4)]():null,'duration_ms':_0x2d787a[_0x222da3(0x2c9)]?.[_0x222da3(0x2fe)]||null})),'stats':_0x34d24d};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x177c61,_0x6cbc1b){const _0x54649a=a43_0x14fe,_0x1fb3d6=_0x177c61();while(!![]){try{const _0x4a2c0e=-parseInt(_0x54649a(0x1a8))/0x1*(-parseInt(_0x54649a(0x1ac))/0x2)+-parseInt(_0x54649a(0x1b2))/0x3+-parseInt(_0x54649a(0x1a4))/0x4+parseInt(_0x54649a(0x1b4))/0x5*(-parseInt(_0x54649a(0x1b5))/0x6)+-parseInt(_0x54649a(0x1a6))/0x7*(-parseInt(_0x54649a(0x1b6))/0x8)+parseInt(_0x54649a(0x1ae))/0x9+-parseInt(_0x54649a(0x1b0))/0xa*(-parseInt(_0x54649a(0x1a5))/0xb);if(_0x4a2c0e===_0x6cbc1b)break;else _0x1fb3d6['push'](_0x1fb3d6['shift']());}catch(_0x341ecd){_0x1fb3d6['push'](_0x1fb3d6['shift']());}}}(a43_0x4c37,0x1df6d));function a43_0x14fe(_0x22b37e,_0x34ddc9){_0x22b37e=_0x22b37e-0x1a4;const _0x4c3729=a43_0x4c37();let _0x14fee4=_0x4c3729[_0x22b37e];return _0x14fee4;}import{platform}from'os';import{getAPIKey}from'./config.js';function a43_0x4c37(){const _0x4925bc=['48WmunMi','481016NOiNpr','265463cxJDpG','156254zNkXgs','replace','107767kbGpwo','version','Authorization','entries','4gjGFIC',';\x20node/','401382XHgwrr','length','40odAplu','TD1\x20','481140cvynuT','tdx','22955XsuQfl','114BIsmfI'];a43_0x4c37=function(){return _0x4925bc;};return a43_0x4c37();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x4543be=a43_0x14fe,_0x3a467d=getVersion(),_0x133157=platform(),_0x5e7c20=process[_0x4543be(0x1a9)][_0x4543be(0x1a7)]('v','');return'tdx/'+_0x3a467d+'\x20('+_0x133157+_0x4543be(0x1ad)+_0x5e7c20+')';}export function getAuthHeaders(_0xc90671,_0x1c1491){const _0x5bc42b=a43_0x14fe,_0x405c4f=getVersion(),_0x2ec0fd={'User-Agent':getUserAgent(),'X-TD-Client':_0x5bc42b(0x1b3),'X-TD-Client-Version':_0x405c4f};return _0x1c1491&&(_0x2ec0fd['Authorization']=_0x5bc42b(0x1b1)+_0x1c1491),_0x2ec0fd;}export function toHeaderRecord(_0x24f03b){const _0x3307b8=a43_0x14fe,_0x519ea2={};for(const [_0x51d22a,_0x1a815a]of Object[_0x3307b8(0x1ab)](_0x24f03b)){_0x1a815a!==undefined&&(_0x519ea2[_0x51d22a]=_0x1a815a);}return _0x519ea2;}export function getTrinoHeaders(_0x3cb37b,_0x13c111){const _0x40e1ac=a43_0x14fe,_0xc9c5aa=getAuthHeaders(_0x3cb37b,_0x13c111),_0x1300c7=toHeaderRecord(_0xc9c5aa);return delete _0x1300c7[_0x40e1ac(0x1aa)],_0x13c111&&(_0x1300c7['X-Trino-User']=_0x13c111),_0x1300c7;}export function hasAPIKey(_0x268db8){const _0x114e87=a43_0x14fe,_0x365b4b=getAPIKey();return _0x365b4b!==undefined&&_0x365b4b[_0x114e87(0x1af)]>0x0;}
1
+ function a43_0x212a(){const _0x41147d=['6JmlQfs','195002tWDsyO','15645HnZmOE','replace','60KcAKhs','8NpxWyo','X-Trino-User','10nMcQTX','version','380838SyXLjm','entries','16178256Vdzfkf','Authorization','10424007kXqgEb','85nOcGtD',';\x20node/','tdx','5966891OtrfKh','3808575YoKGIR'];a43_0x212a=function(){return _0x41147d;};return a43_0x212a();}(function(_0x3236ca,_0xb2018b){const _0x3fbc02=a43_0x4d02,_0x447917=_0x3236ca();while(!![]){try{const _0x30b320=parseInt(_0x3fbc02(0x1e5))/0x1*(-parseInt(_0x3fbc02(0x1e4))/0x2)+parseInt(_0x3fbc02(0x1e6))/0x3*(parseInt(_0x3fbc02(0x1e8))/0x4)+-parseInt(_0x3fbc02(0x1df))/0x5*(-parseInt(_0x3fbc02(0x1ed))/0x6)+-parseInt(_0x3fbc02(0x1e2))/0x7*(parseInt(_0x3fbc02(0x1e9))/0x8)+parseInt(_0x3fbc02(0x1e3))/0x9+-parseInt(_0x3fbc02(0x1eb))/0xa*(parseInt(_0x3fbc02(0x1f1))/0xb)+parseInt(_0x3fbc02(0x1ef))/0xc;if(_0x30b320===_0xb2018b)break;else _0x447917['push'](_0x447917['shift']());}catch(_0x45a7e1){_0x447917['push'](_0x447917['shift']());}}}(a43_0x212a,0x84b55));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 _0x29b58f=a43_0x4d02,_0x52b712=getVersion(),_0x23d321=platform(),_0xb16d2=process[_0x29b58f(0x1ec)][_0x29b58f(0x1e7)]('v','');return'tdx/'+_0x52b712+'\x20('+_0x23d321+_0x29b58f(0x1e0)+_0xb16d2+')';}export function getAuthHeaders(_0xf31ab4,_0x4556d4){const _0x32e0d9=a43_0x4d02,_0x19b558=getVersion(),_0x5c2608={'User-Agent':getUserAgent(),'X-TD-Client':_0x32e0d9(0x1e1),'X-TD-Client-Version':_0x19b558};return _0x4556d4&&(_0x5c2608[_0x32e0d9(0x1f0)]='TD1\x20'+_0x4556d4),_0x5c2608;}export function toHeaderRecord(_0x5de6da){const _0x57c4cb=a43_0x4d02,_0xa6b80e={};for(const [_0x554f66,_0x18a057]of Object[_0x57c4cb(0x1ee)](_0x5de6da)){_0x18a057!==undefined&&(_0xa6b80e[_0x554f66]=_0x18a057);}return _0xa6b80e;}function a43_0x4d02(_0x29c491,_0x464a8b){_0x29c491=_0x29c491-0x1df;const _0x212a34=a43_0x212a();let _0x4d0298=_0x212a34[_0x29c491];return _0x4d0298;}export function getTrinoHeaders(_0xbd6fd7,_0x34b89e){const _0x31c21f=a43_0x4d02,_0xfbd9ed=getAuthHeaders(_0xbd6fd7,_0x34b89e),_0x2b0750=toHeaderRecord(_0xfbd9ed);return delete _0x2b0750[_0x31c21f(0x1f0)],_0x34b89e&&(_0x2b0750[_0x31c21f(0x1ea)]=_0x34b89e),_0x2b0750;}export function hasAPIKey(_0x792cb){const _0x55195e=getAPIKey();return _0x55195e!==undefined&&_0x55195e['length']>0x0;}
@@ -1 +1 @@
1
- (function(_0x34826b,_0x588a1d){const _0x5bd670=a44_0x17bf,_0x1198c1=_0x34826b();while(!![]){try{const _0x4e9010=-parseInt(_0x5bd670(0x93))/0x1*(parseInt(_0x5bd670(0xa4))/0x2)+parseInt(_0x5bd670(0x85))/0x3+parseInt(_0x5bd670(0x9e))/0x4+-parseInt(_0x5bd670(0x9b))/0x5*(parseInt(_0x5bd670(0x72))/0x6)+-parseInt(_0x5bd670(0xb1))/0x7*(parseInt(_0x5bd670(0x75))/0x8)+-parseInt(_0x5bd670(0x70))/0x9*(-parseInt(_0x5bd670(0x96))/0xa)+parseInt(_0x5bd670(0x8a))/0xb;if(_0x4e9010===_0x588a1d)break;else _0x1198c1['push'](_0x1198c1['shift']());}catch(_0x458607){_0x1198c1['push'](_0x1198c1['shift']());}}}(a44_0x42bd,0x71ef0));function a44_0x17bf(_0x38dfb8,_0x435ec2){_0x38dfb8=_0x38dfb8-0x68;const _0x42bdfc=a44_0x42bd();let _0x17bf57=_0x42bdfc[_0x38dfb8];return _0x17bf57;}import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x3f3bef from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';function a44_0x42bd(){const _0x1ce476=['push','table','rule','[query]','[error]','jsonl','limit','3010aEXcBC','list','format','varchar','query','log','bold','trim','less','1152NAYjQi','keys','13002HtVRjo','json','No\x20data','8104TfAPwZ','end','string','number','output','entries','filter','resolve','max','-FXRSn','stdin','error','noColor','length','object','─┴─','126372PMEKyM','map','[Object]','stringify','[rule]','17475667XAlTWK','debug','join','forEach','bigint','write','padEnd','─┬─','cyan','7660HleCct','close','[logs]','2110JbUqXg','tsv','sdk-result','spawn','Results\x20saved\x20to\x20','1385oCbXEm','stderr','color','83488pmMPgc','isTTY','isInteger','stdout','yellow','cmdout','46PPrtlY','split','double','repeat','pipe','[params]'];a44_0x42bd=function(){return _0x1ce476;};return a44_0x42bd();}export function isStructuredFormat(_0x1035bc){const _0x4d492b=a44_0x17bf;return _0x1035bc[_0x4d492b(0x69)]===_0x4d492b(0x73)||_0x1035bc[_0x4d492b(0x69)]===_0x4d492b(0xaf)||_0x1035bc['format']===_0x4d492b(0x97)||_0x1035bc[_0x4d492b(0x69)]==='table'||_0x1035bc['json']===!![]||_0x1035bc[_0x4d492b(0xaf)]===!![]||_0x1035bc['tsv']===!![]||_0x1035bc[_0x4d492b(0xab)]===!![];}export function parseOutputOptions(_0x2dd6c8){const _0x31aca5=a44_0x17bf;return{'format':_0x2dd6c8[_0x31aca5(0x69)]||_0x31aca5(0xab),'output':_0x2dd6c8[_0x31aca5(0x79)]||'','limit':_0x2dd6c8[_0x31aca5(0xb0)],'color':_0x2dd6c8[_0x31aca5(0x9d)],'noColor':_0x2dd6c8[_0x31aca5(0x81)]};}function convertSDKResultToQueryResult(_0x5e0332){const _0x5aa59b=a44_0x17bf,_0x53a2eb=[];if(_0x5e0332[_0x5aa59b(0x82)]>0x0){const _0x1aa229=_0x5e0332[0x0];for(const [_0x430786,_0x31177e]of Object['entries'](_0x1aa229)){let _0x29e93c=_0x5aa59b(0x6a);if(typeof _0x31177e===_0x5aa59b(0x78))_0x29e93c=Number[_0x5aa59b(0xa0)](_0x31177e)?_0x5aa59b(0x8e):_0x5aa59b(0xa6);else{if(typeof _0x31177e==='boolean')_0x29e93c='boolean';else _0x31177e===null&&(_0x29e93c=_0x5aa59b(0x6a));}_0x53a2eb[_0x5aa59b(0xaa)]({'name':_0x430786,'type':_0x29e93c});}}return{'queryId':_0x5aa59b(0x98),'columns':_0x53a2eb,'data':_0x5e0332,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x5e0332['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x3e74bc,_0x7e4ae8){const _0x12c84c=convertSDKResultToQueryResult(_0x3e74bc);return formatQueryOutput(_0x12c84c,_0x7e4ae8);}export async function formatQueryOutput(_0x4c1a07,_0x350fbc){const _0x19e7f7=a44_0x17bf,{format:_0x2c8126,limit:_0x3eaef6,output:_0x388020,color:_0x486ab9,noColor:_0x30b758}=_0x350fbc,_0x4416a7=Boolean(_0x388020)&&!_0x486ab9,_0x1b5f8b={'color':_0x486ab9,'noColor':_0x30b758||_0x4416a7};if(_0x2c8126===_0x19e7f7(0xab)){const _0x454d9f=shouldUseLess(_0x2c8126,_0x388020);return formatAsTable(_0x4c1a07,_0x3eaef6,_0x454d9f,_0x1b5f8b);}else{if(_0x2c8126===_0x19e7f7(0x73))return formatAsJSON(_0x4c1a07,_0x1b5f8b);else return _0x2c8126==='jsonl'?formatAsJSONL(_0x4c1a07,_0x1b5f8b):formatQueryResult(_0x4c1a07,_0x2c8126);}}function shouldUseLess(_0x1192f9,_0x115976){const _0x283048=a44_0x17bf;return(_0x1192f9===_0x283048(0xab)||_0x1192f9===_0x283048(0x68))&&process[_0x283048(0xa1)][_0x283048(0x9f)]&&!_0x115976;}export function resolveOutputOptions(_0x3c5359){const _0x1a35d4=a44_0x17bf,_0x5668de=resolveOutputFormat(_0x3c5359['format'],_0x3c5359['output'],_0x1a35d4(0xab));let _0x431a8b=typeof _0x3c5359[_0x1a35d4(0xb0)]===_0x1a35d4(0x78)?_0x3c5359[_0x1a35d4(0xb0)]:parseInt(_0x3c5359['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x4fce8b=_0x3c5359[_0x1a35d4(0x79)]||'';return shouldUseLess(_0x5668de,_0x4fce8b)&&(_0x431a8b=Infinity),{'format':_0x5668de,'output':_0x4fce8b,'limit':_0x431a8b,'color':_0x3c5359[_0x1a35d4(0x9d)],'noColor':_0x3c5359[_0x1a35d4(0x81)]};}export function writeOutput(_0x19f869,_0x539960,_0x1c2180){const _0x3ead46=a44_0x17bf;return _0x539960?(writeFileSync(_0x539960,_0x19f869),console[_0x3ead46(0x80)](_0x3ead46(0x9a)+_0x539960),Promise['resolve']()):shouldUseLess(_0x1c2180||'','')?new Promise(_0x59ac94=>{const _0x1dfc90=_0x3ead46,_0x4b6123=spawn(_0x1dfc90(0x6f),[_0x1dfc90(0x7e)],{'stdio':[_0x1dfc90(0xa8),'inherit','inherit']});let _0x31d969=![];_0x4b6123['on'](_0x1dfc90(0x80),()=>{const _0x539b16=_0x1dfc90;!_0x31d969&&(_0x31d969=!![],console[_0x539b16(0x6c)](_0x19f869),_0x59ac94());}),_0x4b6123['on'](_0x1dfc90(0x94),()=>{!_0x31d969&&(_0x31d969=!![],_0x59ac94());}),_0x4b6123['on'](_0x1dfc90(0x99),()=>{const _0x4172c7=_0x1dfc90;!_0x31d969&&_0x4b6123[_0x4172c7(0x7f)]&&(_0x4b6123['stdin']['on']('error',()=>{}),_0x4b6123['stdin'][_0x4172c7(0x8f)](_0x19f869),_0x4b6123[_0x4172c7(0x7f)][_0x4172c7(0x76)]());}),!_0x4b6123[_0x1dfc90(0x7f)]&&(!_0x31d969&&(_0x31d969=!![],console[_0x1dfc90(0x6c)](_0x19f869),_0x59ac94()));}):(console[_0x3ead46(0x6c)](_0x19f869),Promise[_0x3ead46(0x7c)]());}export async function handleSDKOutput(_0x5895ea,_0x577852){const _0x1fc0de=a44_0x17bf,_0x186c7d=resolveOutputOptions(_0x577852),_0x3a1fe8=await formatSDKOutput(_0x5895ea,_0x186c7d);await writeOutput(_0x3a1fe8,_0x186c7d[_0x1fc0de(0x79)]||undefined,_0x186c7d[_0x1fc0de(0x69)]);}export async function handleQueryOutput(_0x20a55b,_0x2a8b1c){const _0x2c58c9=a44_0x17bf,_0x156e1a=resolveOutputOptions(_0x2a8b1c),_0x487cea=await formatQueryOutput(_0x20a55b,_0x156e1a);await writeOutput(_0x487cea,_0x156e1a['output']||undefined,_0x156e1a[_0x2c58c9(0x69)]);}async function formatSingleObject(_0x44c005,_0x1cf9f7){const _0x1bc34c=a44_0x17bf,{format:_0x34d350,color:_0x48e8f9,noColor:_0x3732b0}=_0x1cf9f7,_0x32a5ad={'color':_0x48e8f9,'noColor':_0x3732b0};if(_0x34d350===_0x1bc34c(0x73)){if(shouldUseColor(_0x32a5ad))return colorizeJSON(_0x44c005,_0x32a5ad);return JSON['stringify'](_0x44c005,null,0x2);}else{if(_0x34d350===_0x1bc34c(0xaf)){if(shouldUseColor(_0x32a5ad))return colorizeJSONCompact(_0x44c005,_0x32a5ad);return JSON['stringify'](_0x44c005);}else{if(_0x34d350===_0x1bc34c(0x97))return Object[_0x1bc34c(0x7a)](_0x44c005)[_0x1bc34c(0x86)](([_0x541a13,_0x58f570])=>_0x541a13+'\x09'+_0x58f570)['join']('\x0a');else{const _0x3d6c08=Object[_0x1bc34c(0x7a)](_0x44c005);if(_0x3d6c08['length']===0x0)return _0x1bc34c(0x74);const _0x28c15d=_0x44c005[_0x1bc34c(0x8b)],_0x1ac30e=_0x44c005['query'],_0xcafc85=_0x44c005['params'],_0x73479=_0x44c005[_0x1bc34c(0xac)],_0x3506c5=_0x1ac30e?typeof _0x1ac30e===_0x1bc34c(0x77)?_0x1ac30e:JSON[_0x1bc34c(0x88)](_0x1ac30e,null,0x2):undefined,_0x268968=_0xcafc85&&Object[_0x1bc34c(0x71)](_0xcafc85)['length']>0x0?JSON[_0x1bc34c(0x88)](_0xcafc85,null,0x2):undefined,_0x2f250c=_0x73479&&Object[_0x1bc34c(0x71)](_0x73479)[_0x1bc34c(0x82)]>0x0?JSON[_0x1bc34c(0x88)](_0x73479,null,0x2):undefined,_0x56558a=_0x3d6c08[_0x1bc34c(0x7b)](([_0x543d90])=>_0x543d90!==_0x1bc34c(0x8b)&&_0x543d90!==_0x1bc34c(0x6b)&&_0x543d90!=='params'&&_0x543d90!==_0x1bc34c(0xac)),_0x4d967c=Math[_0x1bc34c(0x7d)](..._0x56558a[_0x1bc34c(0x86)](([_0x3b9748])=>_0x3b9748[_0x1bc34c(0x82)])),_0x22e4ab=Math['max'](..._0x56558a[_0x1bc34c(0x86)](([,_0x11cf64])=>{const _0x30d8a0=_0x1bc34c;try{const _0x5046a4=_0x11cf64===null||_0x11cf64===undefined?'':typeof _0x11cf64===_0x30d8a0(0x83)?JSON[_0x30d8a0(0x88)](_0x11cf64):String(_0x11cf64),_0x13f691=_0x5046a4[_0x30d8a0(0xa5)]('\x0a');return Math[_0x30d8a0(0x7d)](..._0x13f691[_0x30d8a0(0x86)](_0x26004c=>_0x26004c[_0x30d8a0(0x82)]),0x0);}catch{return 0x0;}}),0x14),_0xda1378=[];_0xda1378[_0x1bc34c(0xaa)](colorBorder('┌─'+'─'[_0x1bc34c(0xa7)](_0x4d967c)+_0x1bc34c(0x91)+'─'[_0x1bc34c(0xa7)](_0x22e4ab)+'─┐',_0x32a5ad)),_0x56558a[_0x1bc34c(0x8d)](([_0x1649f7,_0x4fdd4d])=>{const _0xf5f445=_0x1bc34c;let _0x2c9611;try{_0x2c9611=_0x4fdd4d===null||_0x4fdd4d===undefined?'':typeof _0x4fdd4d===_0xf5f445(0x83)?JSON[_0xf5f445(0x88)](_0x4fdd4d):String(_0x4fdd4d);}catch{_0x2c9611=_0xf5f445(0x87);}const _0x5dce8c=_0x1649f7['padEnd'](_0x4d967c),_0x113cc1=_0x2c9611[_0xf5f445(0xa5)]('\x0a');_0x113cc1[_0xf5f445(0x8d)]((_0x32057b,_0x2b8ace)=>{const _0x273a49=_0xf5f445,_0x2da075=colorBorder('│',_0x32a5ad);_0x2b8ace===0x0?_0xda1378[_0x273a49(0xaa)](_0x2da075+'\x20'+_0x5dce8c+'\x20'+_0x2da075+'\x20'+_0x32057b[_0x273a49(0x90)](_0x22e4ab)+'\x20'+_0x2da075):_0xda1378['push'](_0x2da075+'\x20'+'\x20'[_0x273a49(0xa7)](_0x4d967c)+'\x20'+_0x2da075+'\x20'+_0x32057b[_0x273a49(0x90)](_0x22e4ab)+'\x20'+_0x2da075);});}),_0xda1378[_0x1bc34c(0xaa)](colorBorder('└─'+'─'[_0x1bc34c(0xa7)](_0x4d967c)+_0x1bc34c(0x84)+'─'[_0x1bc34c(0xa7)](_0x22e4ab)+'─┘',_0x32a5ad));_0x3506c5&&(_0xda1378['push'](''),_0xda1378[_0x1bc34c(0xaa)](String(a44_0x3f3bef[_0x1bc34c(0xa2)][_0x1bc34c(0x6d)](_0x1bc34c(0xad)))),_0xda1378['push'](_0x3506c5));_0x268968&&(_0xda1378['push'](''),_0xda1378[_0x1bc34c(0xaa)](String(a44_0x3f3bef['blue'][_0x1bc34c(0x6d)](_0x1bc34c(0xa9)))),_0xda1378[_0x1bc34c(0xaa)](_0x268968));_0x2f250c&&(_0xda1378[_0x1bc34c(0xaa)](''),_0xda1378[_0x1bc34c(0xaa)](String(a44_0x3f3bef['magenta']['bold'](_0x1bc34c(0x89)))),_0xda1378['push'](_0x2f250c));if(_0x28c15d){if(_0x28c15d[_0x1bc34c(0x9c)]){_0xda1378[_0x1bc34c(0xaa)](''),_0xda1378['push'](String(a44_0x3f3bef['red']['bold'](_0x1bc34c(0xae))));const _0x572531=_0x28c15d['stderr']['split']('\x0a');_0x572531[_0x1bc34c(0x8d)](_0x48f13a=>{const _0x330b2e=_0x1bc34c;_0x48f13a['trim']()&&_0xda1378[_0x330b2e(0xaa)](_0x48f13a);});}if(_0x28c15d[_0x1bc34c(0xa3)]){_0xda1378['push'](''),_0xda1378[_0x1bc34c(0xaa)](String(a44_0x3f3bef[_0x1bc34c(0x92)][_0x1bc34c(0x6d)](_0x1bc34c(0x95))));const _0x2b458f=_0x28c15d[_0x1bc34c(0xa3)][_0x1bc34c(0xa5)]('\x0a');_0x2b458f['forEach'](_0x49c90c=>{const _0x439fac=_0x1bc34c;_0x49c90c[_0x439fac(0x6e)]()&&_0xda1378['push'](_0x49c90c);});}}return _0xda1378[_0x1bc34c(0x8c)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x1795e0,_0x441333){const _0x38f3da=a44_0x17bf;if(_0x441333[_0x38f3da(0x69)]===_0x38f3da(0xab)){await handleSDKOutput([_0x1795e0],_0x441333);return;}const _0x224b2c=resolveOutputOptions(_0x441333),_0x834afa=await formatSingleObject(_0x1795e0,_0x224b2c);await writeOutput(_0x834afa,_0x224b2c['output']||undefined,_0x224b2c[_0x38f3da(0x69)]);}
1
+ (function(_0x1dd258,_0x3bf123){const _0x5c3675=a44_0x56f5,_0x3c493d=_0x1dd258();while(!![]){try{const _0x36909a=-parseInt(_0x5c3675(0x140))/0x1+parseInt(_0x5c3675(0x10f))/0x2*(-parseInt(_0x5c3675(0x122))/0x3)+-parseInt(_0x5c3675(0x132))/0x4+-parseInt(_0x5c3675(0x127))/0x5+-parseInt(_0x5c3675(0x12b))/0x6+-parseInt(_0x5c3675(0x139))/0x7*(-parseInt(_0x5c3675(0x12a))/0x8)+-parseInt(_0x5c3675(0x111))/0x9*(-parseInt(_0x5c3675(0x138))/0xa);if(_0x36909a===_0x3bf123)break;else _0x3c493d['push'](_0x3c493d['shift']());}catch(_0x10b7d7){_0x3c493d['push'](_0x3c493d['shift']());}}}(a44_0x2e4d,0x43e42));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x4dfe64 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x48ac6f){const _0x2b5dd7=a44_0x56f5;return _0x48ac6f[_0x2b5dd7(0x13e)]==='json'||_0x48ac6f[_0x2b5dd7(0x13e)]==='jsonl'||_0x48ac6f['format']===_0x2b5dd7(0x13f)||_0x48ac6f[_0x2b5dd7(0x13e)]===_0x2b5dd7(0x114)||_0x48ac6f['json']===!![]||_0x48ac6f[_0x2b5dd7(0x11d)]===!![]||_0x48ac6f[_0x2b5dd7(0x13f)]===!![]||_0x48ac6f[_0x2b5dd7(0x114)]===!![];}export function parseOutputOptions(_0x3288a4){const _0x34d40f=a44_0x56f5;return{'format':_0x3288a4['format']||_0x34d40f(0x114),'output':_0x3288a4[_0x34d40f(0x12d)]||'','limit':_0x3288a4[_0x34d40f(0x130)],'color':_0x3288a4[_0x34d40f(0x106)],'noColor':_0x3288a4[_0x34d40f(0x120)]};}function convertSDKResultToQueryResult(_0xc8f08){const _0x310d09=a44_0x56f5,_0x22ee09=[];if(_0xc8f08[_0x310d09(0x137)]>0x0){const _0x380e9f=_0xc8f08[0x0];for(const [_0x151e68,_0x411e7f]of Object[_0x310d09(0x10a)](_0x380e9f)){let _0x35497e=_0x310d09(0x11e);if(typeof _0x411e7f===_0x310d09(0x112))_0x35497e=Number[_0x310d09(0x10c)](_0x411e7f)?_0x310d09(0x13c):_0x310d09(0x135);else{if(typeof _0x411e7f==='boolean')_0x35497e=_0x310d09(0x10e);else _0x411e7f===null&&(_0x35497e='varchar');}_0x22ee09[_0x310d09(0x142)]({'name':_0x151e68,'type':_0x35497e});}}return{'queryId':_0x310d09(0x10b),'columns':_0x22ee09,'data':_0xc8f08,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0xc8f08[_0x310d09(0x137)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x5a2015,_0x51d993){const _0x51bd0c=convertSDKResultToQueryResult(_0x5a2015);return formatQueryOutput(_0x51bd0c,_0x51d993);}function a44_0x56f5(_0xc26417,_0x1a5692){_0xc26417=_0xc26417-0x101;const _0x2e4db1=a44_0x2e4d();let _0x56f5a8=_0x2e4db1[_0xc26417];return _0x56f5a8;}export async function formatQueryOutput(_0x3166b5,_0x4c3293){const _0x5369ed=a44_0x56f5,{format:_0x155060,limit:_0x378e64,output:_0x37d38f,color:_0x176107,noColor:_0x28b362}=_0x4c3293,_0x24790b=Boolean(_0x37d38f)&&!_0x176107,_0x391700={'color':_0x176107,'noColor':_0x28b362||_0x24790b};if(_0x155060===_0x5369ed(0x114)){const _0x59b30d=shouldUseLess(_0x155060,_0x37d38f);return formatAsTable(_0x3166b5,_0x378e64,_0x59b30d,_0x391700);}else{if(_0x155060===_0x5369ed(0x123))return formatAsJSON(_0x3166b5,_0x391700);else return _0x155060===_0x5369ed(0x11d)?formatAsJSONL(_0x3166b5,_0x391700):formatQueryResult(_0x3166b5,_0x155060);}}function shouldUseLess(_0x1c0758,_0x229dca){const _0x213010=a44_0x56f5;return(_0x1c0758===_0x213010(0x114)||_0x1c0758===_0x213010(0x143))&&process['stdout'][_0x213010(0x12f)]&&!_0x229dca;}export function resolveOutputOptions(_0x2894f6){const _0x30cf6c=a44_0x56f5,_0x25aac8=resolveOutputFormat(_0x2894f6[_0x30cf6c(0x13e)],_0x2894f6[_0x30cf6c(0x12d)],_0x30cf6c(0x114));let _0x35e868=typeof _0x2894f6[_0x30cf6c(0x130)]===_0x30cf6c(0x112)?_0x2894f6[_0x30cf6c(0x130)]:parseInt(_0x2894f6['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0xcd20aa=_0x2894f6[_0x30cf6c(0x12d)]||'';return shouldUseLess(_0x25aac8,_0xcd20aa)&&(_0x35e868=Infinity),{'format':_0x25aac8,'output':_0xcd20aa,'limit':_0x35e868,'color':_0x2894f6[_0x30cf6c(0x106)],'noColor':_0x2894f6[_0x30cf6c(0x120)]};}export function writeOutput(_0x2a6d0e,_0x4d1d40,_0x4c28fb){const _0x7dccec=a44_0x56f5;return _0x4d1d40?(writeFileSync(_0x4d1d40,_0x2a6d0e),console[_0x7dccec(0x128)]('Results\x20saved\x20to\x20'+_0x4d1d40),Promise['resolve']()):shouldUseLess(_0x4c28fb||'','')?new Promise(_0x4672f4=>{const _0x4b65be=_0x7dccec,_0x30322d=spawn(_0x4b65be(0x110),[_0x4b65be(0x102)],{'stdio':['pipe',_0x4b65be(0x131),'inherit']});let _0x7898af=![];_0x30322d['on']('error',()=>{const _0x5659de=_0x4b65be;!_0x7898af&&(_0x7898af=!![],console[_0x5659de(0x136)](_0x2a6d0e),_0x4672f4());}),_0x30322d['on'](_0x4b65be(0x108),()=>{!_0x7898af&&(_0x7898af=!![],_0x4672f4());}),_0x30322d['on']('spawn',()=>{const _0x4f210c=_0x4b65be;!_0x7898af&&_0x30322d[_0x4f210c(0x124)]&&(_0x30322d[_0x4f210c(0x124)]['on'](_0x4f210c(0x128),()=>{}),_0x30322d['stdin'][_0x4f210c(0x134)](_0x2a6d0e),_0x30322d['stdin'][_0x4f210c(0x125)]());}),!_0x30322d[_0x4b65be(0x124)]&&(!_0x7898af&&(_0x7898af=!![],console[_0x4b65be(0x136)](_0x2a6d0e),_0x4672f4()));}):(console['log'](_0x2a6d0e),Promise[_0x7dccec(0x11f)]());}function a44_0x2e4d(){const _0x3ec475=['repeat','[logs]','cyan','stringify','─┴─','padEnd','jsonl','varchar','resolve','noColor','red','3iaZzaH','json','stdin','end','[query]','2298470ALztOq','error','debug','80768UKbfhO','440994ZAFzgQ','[params]','output','bold','isTTY','limit','inherit','380644zhSpUb','trim','write','double','log','length','1295870Iuwzzu','133XQddMh','No\x20data','map','bigint','join','format','tsv','227904ZvhmFo','split','push','list','max','-FXRSn','string','[rule]','stderr','color','yellow','close','forEach','entries','sdk-result','isInteger','magenta','boolean','706708RIyRIC','less','90ZIfupm','number','keys','table','─┬─','params'];a44_0x2e4d=function(){return _0x3ec475;};return a44_0x2e4d();}export async function handleSDKOutput(_0x4825d8,_0x15797b){const _0x3d6b03=a44_0x56f5,_0x582823=resolveOutputOptions(_0x15797b),_0x262834=await formatSDKOutput(_0x4825d8,_0x582823);await writeOutput(_0x262834,_0x582823['output']||undefined,_0x582823[_0x3d6b03(0x13e)]);}export async function handleQueryOutput(_0x5940d5,_0x4e90ea){const _0x1ad16a=a44_0x56f5,_0x4345fc=resolveOutputOptions(_0x4e90ea),_0x292f58=await formatQueryOutput(_0x5940d5,_0x4345fc);await writeOutput(_0x292f58,_0x4345fc['output']||undefined,_0x4345fc[_0x1ad16a(0x13e)]);}async function formatSingleObject(_0x619a51,_0x2a01d3){const _0x3286e3=a44_0x56f5,{format:_0x972417,color:_0x491f85,noColor:_0x584c9c}=_0x2a01d3,_0x5313aa={'color':_0x491f85,'noColor':_0x584c9c};if(_0x972417===_0x3286e3(0x123)){if(shouldUseColor(_0x5313aa))return colorizeJSON(_0x619a51,_0x5313aa);return JSON['stringify'](_0x619a51,null,0x2);}else{if(_0x972417===_0x3286e3(0x11d)){if(shouldUseColor(_0x5313aa))return colorizeJSONCompact(_0x619a51,_0x5313aa);return JSON[_0x3286e3(0x11a)](_0x619a51);}else{if(_0x972417==='tsv')return Object[_0x3286e3(0x10a)](_0x619a51)[_0x3286e3(0x13b)](([_0x2fce92,_0xbfd0e3])=>_0x2fce92+'\x09'+_0xbfd0e3)['join']('\x0a');else{const _0x387f0a=Object[_0x3286e3(0x10a)](_0x619a51);if(_0x387f0a[_0x3286e3(0x137)]===0x0)return _0x3286e3(0x13a);const _0x4068d1=_0x619a51['debug'],_0xf4dda4=_0x619a51['query'],_0xe57be=_0x619a51[_0x3286e3(0x116)],_0x328a60=_0x619a51['rule'],_0x2c3754=_0xf4dda4?typeof _0xf4dda4===_0x3286e3(0x103)?_0xf4dda4:JSON[_0x3286e3(0x11a)](_0xf4dda4,null,0x2):undefined,_0x5729cd=_0xe57be&&Object[_0x3286e3(0x113)](_0xe57be)['length']>0x0?JSON['stringify'](_0xe57be,null,0x2):undefined,_0x28760c=_0x328a60&&Object[_0x3286e3(0x113)](_0x328a60)[_0x3286e3(0x137)]>0x0?JSON[_0x3286e3(0x11a)](_0x328a60,null,0x2):undefined,_0x9e1c85=_0x387f0a['filter'](([_0x179a4c])=>_0x179a4c!==_0x3286e3(0x129)&&_0x179a4c!=='query'&&_0x179a4c!=='params'&&_0x179a4c!=='rule'),_0x321533=Math[_0x3286e3(0x101)](..._0x9e1c85[_0x3286e3(0x13b)](([_0x59e06a])=>_0x59e06a[_0x3286e3(0x137)])),_0x4bc800=Math['max'](..._0x9e1c85[_0x3286e3(0x13b)](([,_0x435587])=>{const _0x45ed7b=_0x3286e3;try{const _0x4e1ccb=_0x435587===null||_0x435587===undefined?'':typeof _0x435587==='object'?JSON[_0x45ed7b(0x11a)](_0x435587):String(_0x435587),_0x13c699=_0x4e1ccb[_0x45ed7b(0x141)]('\x0a');return Math[_0x45ed7b(0x101)](..._0x13c699['map'](_0x1e33d1=>_0x1e33d1['length']),0x0);}catch{return 0x0;}}),0x14),_0x27f3ee=[];_0x27f3ee['push'](colorBorder('┌─'+'─'['repeat'](_0x321533)+_0x3286e3(0x115)+'─'[_0x3286e3(0x117)](_0x4bc800)+'─┐',_0x5313aa)),_0x9e1c85['forEach'](([_0x2094c9,_0x5db99d])=>{const _0x4528a4=_0x3286e3;let _0x4073;try{_0x4073=_0x5db99d===null||_0x5db99d===undefined?'':typeof _0x5db99d==='object'?JSON[_0x4528a4(0x11a)](_0x5db99d):String(_0x5db99d);}catch{_0x4073='[Object]';}const _0x4f36bb=_0x2094c9[_0x4528a4(0x11c)](_0x321533),_0x51390=_0x4073[_0x4528a4(0x141)]('\x0a');_0x51390[_0x4528a4(0x109)]((_0x9b4cb1,_0x518c08)=>{const _0x28f679=_0x4528a4,_0x16a580=colorBorder('│',_0x5313aa);_0x518c08===0x0?_0x27f3ee['push'](_0x16a580+'\x20'+_0x4f36bb+'\x20'+_0x16a580+'\x20'+_0x9b4cb1[_0x28f679(0x11c)](_0x4bc800)+'\x20'+_0x16a580):_0x27f3ee[_0x28f679(0x142)](_0x16a580+'\x20'+'\x20'[_0x28f679(0x117)](_0x321533)+'\x20'+_0x16a580+'\x20'+_0x9b4cb1[_0x28f679(0x11c)](_0x4bc800)+'\x20'+_0x16a580);});}),_0x27f3ee[_0x3286e3(0x142)](colorBorder('└─'+'─'[_0x3286e3(0x117)](_0x321533)+_0x3286e3(0x11b)+'─'[_0x3286e3(0x117)](_0x4bc800)+'─┘',_0x5313aa));_0x2c3754&&(_0x27f3ee[_0x3286e3(0x142)](''),_0x27f3ee[_0x3286e3(0x142)](String(a44_0x4dfe64[_0x3286e3(0x107)][_0x3286e3(0x12e)](_0x3286e3(0x126)))),_0x27f3ee[_0x3286e3(0x142)](_0x2c3754));_0x5729cd&&(_0x27f3ee['push'](''),_0x27f3ee['push'](String(a44_0x4dfe64['blue'][_0x3286e3(0x12e)](_0x3286e3(0x12c)))),_0x27f3ee['push'](_0x5729cd));_0x28760c&&(_0x27f3ee['push'](''),_0x27f3ee[_0x3286e3(0x142)](String(a44_0x4dfe64[_0x3286e3(0x10d)][_0x3286e3(0x12e)](_0x3286e3(0x104)))),_0x27f3ee[_0x3286e3(0x142)](_0x28760c));if(_0x4068d1){if(_0x4068d1[_0x3286e3(0x105)]){_0x27f3ee[_0x3286e3(0x142)](''),_0x27f3ee[_0x3286e3(0x142)](String(a44_0x4dfe64[_0x3286e3(0x121)][_0x3286e3(0x12e)]('[error]')));const _0x34be46=_0x4068d1[_0x3286e3(0x105)][_0x3286e3(0x141)]('\x0a');_0x34be46['forEach'](_0x4db5c4=>{const _0x257c34=_0x3286e3;_0x4db5c4[_0x257c34(0x133)]()&&_0x27f3ee[_0x257c34(0x142)](_0x4db5c4);});}if(_0x4068d1['cmdout']){_0x27f3ee[_0x3286e3(0x142)](''),_0x27f3ee[_0x3286e3(0x142)](String(a44_0x4dfe64[_0x3286e3(0x119)][_0x3286e3(0x12e)](_0x3286e3(0x118))));const _0xf3da3b=_0x4068d1['cmdout'][_0x3286e3(0x141)]('\x0a');_0xf3da3b[_0x3286e3(0x109)](_0x582b30=>{const _0x3f562e=_0x3286e3;_0x582b30[_0x3f562e(0x133)]()&&_0x27f3ee['push'](_0x582b30);});}}return _0x27f3ee[_0x3286e3(0x13d)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2170ca,_0x3ed082){const _0x443e12=a44_0x56f5;if(_0x3ed082[_0x443e12(0x13e)]===_0x443e12(0x114)){await handleSDKOutput([_0x2170ca],_0x3ed082);return;}const _0x87681a=resolveOutputOptions(_0x3ed082),_0x18afac=await formatSingleObject(_0x2170ca,_0x87681a);await writeOutput(_0x18afac,_0x87681a[_0x443e12(0x12d)]||undefined,_0x87681a[_0x443e12(0x13e)]);}