@treasuredata/tdx 0.25.0 → 0.25.2

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_0x3bd9b9=a42_0x5c3c;(function(_0x346e53,_0x6bd87d){const _0x335842=a42_0x5c3c,_0x70842f=_0x346e53();while(!![]){try{const _0x3392b6=parseInt(_0x335842(0x327))/0x1+-parseInt(_0x335842(0x1f9))/0x2+parseInt(_0x335842(0x27a))/0x3*(-parseInt(_0x335842(0x2ac))/0x4)+parseInt(_0x335842(0x26b))/0x5+-parseInt(_0x335842(0x2f5))/0x6*(parseInt(_0x335842(0x1fb))/0x7)+-parseInt(_0x335842(0x256))/0x8+parseInt(_0x335842(0x2e3))/0x9;if(_0x3392b6===_0x6bd87d)break;else _0x70842f['push'](_0x70842f['shift']());}catch(_0x1a346e){_0x70842f['push'](_0x70842f['shift']());}}}(a42_0x148a,0x64492));import a42_0x48c95c from'chalk';import{existsSync}from'fs';import a42_0x50631b from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';function a42_0x148a(){const _0x2e8adb=['sort','Task\x20name:\x20','Source\x20directory:\x20','done','dim','Key:\x20','logFiles','List\x20workflow\x20attempts','tasks','No\x20workflow\x20projects\x20found','now','Session\x20','LABEL_MIN_SPACING','\x0a✔\x20Attempt\x20complete','→\x20Project:\x20','✔\x20Deleted\x20project\x20','workflow:kill','length','showWorkflowConsoleUrl','key','Expected\x20format:\x20--param\x20key=value','join','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x20unchanged','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20Attempt\x20ID:\x20','description','Show\x20specific\x20attempt\x20details','delete','Validation:\x20skipped','get','requireProject','MIN_LABEL_COUNT','parseProjectWorkflowPattern','No\x20sessions\x20found\x20for:\x20','\x20\x20Workflow:\x20','session:','Key\x20cannot\x20be\x20empty','window','readFile','param','No\x20workflow\x20sessions\x20found','Using\x20attempt\x20','📋\x20','Include\x20retried:\x20yes','slice','projectId','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','trim','new','columns','floor','\x0aPush\x20these\x20changes?','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Start\x20a\x20workflow\x20run','state','Session\x20time:\x20','\x22\x20with\x20new\x20revision?','✔\x20Clone\x20complete','LABEL_WIDTH_DIVISOR','Source\x20directory\x20is\x20required','createdAt','trimEnd','type','\x20is\x20not\x20a\x20directory','match','Killing\x20attempt...','toLowerCase','Project\x20name\x20is\x20required','workflow:workflows','project','✔\x20Found\x20','1284644izjTpO','text','99687wNFLLH','\x20\x20Console:\x20','List\x20workflow\x20execution\x20sessions','repeat','params','Latest\x20session\x20has\x20no\x20attempt','resolveProject','yes','No\x20sessions\x20found','taskName','path','POLL_INTERVAL_MS','prepareCloneProject','\x20secret','getMonth','navigateSessionsInteractive','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','workflow:retry','Error:\x20Attempt\x20ID\x20is\x20required','Kill\x20a\x20running\x20attempt','Auto-selected\x20latest\x20session:\x20','Dry\x20run:\x20yes','unknown','summary','Error:\x20KEY=VALUE\x20is\x20required','startTime','Error:','Retrying\x20attempt...','Workflow:\x20','No\x20matching\x20sessions\x20found','No\x20workflows\x20found','\x22\x20to\x20new\x20project\x20\x22','split','isDirectory','\x20new','changes','fileSize','Error:\x20Secret\x20key\x20is\x20required','📁\x20','No\x20workflow\x20tdx.json\x20found','Select\x20a\x20session\x20to\x20view\x20timeline:','No\x20log\x20content\x20found','min','\x0aDry\x20run\x20-\x20no\x20files\x20written','revision:\x20','group_error','buildTimelineData','/sessions/','newProjectName','workflow:run','getTime','rows','includeRetried','\x0aFailed\x20to\x20fetch\x20attempt\x20data','find','\x20(use\x20--limit\x20to\x20show\x20more)','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','→\x20New\x20project:\x20','running','attempt:','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Listing\x20workflow\x20sessions...','error','Deleting\x20project\x20','durationMs','\x20sessions\x20','Cloning\x20to\x20','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','list','end','Warning:','retryAttemptName','Invalid\x20format:\x20','diff','session','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','(use\x20--limit\x20to\x20see\x20more)','select','site','\x20\x20Changes:\x20','fileCount','projectName','startsWith','planned','\x0a⚠\x20Project\x20\x22','✔\x20Push\x20complete','\x20task','cwd','Output\x20directory:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Files\x20to\x20upload:\x20','1088544JejUgQ','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','canceling','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x0aClone\x20\x22','\x0aUpdate\x20existing\x20project\x20\x22','kill','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','pending','Retry\x20a\x20session\x20or\x20attempt','Project\x20directory:\x20','map','\x0aDry\x20run\x20-\x20no\x20project\x20created','Listing\x20workflow\x20projects...','No\x20attempts\x20found','success','run','\x20\x20Files\x20extracted:\x20','table','Filter:\x20','648485xzINMs','metadata','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x22?\x20This\x20cannot\x20be\x20undone.','\x20\x20Location:\x20','lastAttempt','keys','startedAt','\x20\x20tdx\x20wf\x20use\x20<project>','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','.\x20Expected\x20format:\x20KEY=VALUE','log','sessionId','workflow:push','green','464208ZOzaQh','reason','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','resolveProjectId','Downloading\x20logs...','fullName','Listing\x20workflow\x20attempts...','No\x20log\x20files\x20found\x20for\x20this\x20attempt','skipValidation','dryRun','Resolving\x20project\x20\x27','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Loading\x20workflows...','duration','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','List\x20workflows','msPerChar','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','TASK_NAME_WIDTH','sourceDir','\x20modified','json','every','workflow:secrets:list','includes','Downloading\x20project\x20','getDate','MAX_TIMELINE_WIDTH','deleted','substring','MAX_LABEL_COUNT','Cancelled','sessionTime','Error:\x20Invalid\x20parameter\x20format:\x20','Getting\x20attempt\x20details...','\x20(system)','yellow','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','isArray','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','targetDir','fill','No\x20sessions\x20found\x20in\x20project:\x20','workflow:attempt','\x1b[1A\x1b[2K','Usage:\x20tdx\x20wf\x20use\x20<project>','\x20attempt','status','workflow','From\x20task:\x20','8vbRBQq','toISOString','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x20deleted','Project\x20name:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','cancelRequested','✔\x20Secret\x20\x27','targetExists','resolve','round','\x20\x20Project\x20ID:\x20','\x20\x20Session\x20ID:\x20','Project:\x20','Select\x20a\x20workflow\x20to\x20run','filesExtracted','workflow:secrets:delete','✔\x20Project\x20updated','write','Pushing\x20project...','workflow:upload','GUTTER','renderSingleTimeline','updatedAt','\x20\x20Revision:\x20','autocomplete','MAX_POLL_ITERATIONS','Revision:\x20','parse','data','Select\x20a\x20task\x20to\x20view\x20logs:','attemptId','white','...','renderTimeline','follow','Getting\x20attempt\x20tasks...','verbose','Listing\x20secrets...','Target:\x20','index','Fetching\x20log\x20files...','Resume\x20from:\x20','has','✔\x20Retry\x20started','ICON_SPACING','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Error:\x20Invalid\x20JSON\x20in\x20--params','finishedAt','cyan','projects','getFullYear','No\x20projects\x20match\x20pattern:\x20','blue','values','12377349vSNOXJ','/app/workflows/','push','Pulling\x20project\x20','\x20\x20New\x20attempt\x20ID:\x20','stdout','✔\x20Pushed\x20','workflow:logs','workflow:projects','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','clear','\x20\x20Session\x20context\x20set\x20to:\x20','workflow:tasks','revision','Loading\x20sessions...','from','icon','context','6EscKKL','value','task','Session\x20not\x20found:\x20','\x20\x20Target:\x20','Show\x20tasks\x20for\x20an\x20attempt','-\x20no\x20files\x20written','\x20workflow','resolveProjectDir','filter','sessions','(unknown)','existingProjectId','padStart','max','force','Attempt\x20ID:\x20','Source:\x20','\x20tasks','No\x20workflows\x20found\x20in\x20project:\x20','hasChanges','includeSubtasks','pollTimeline','✔\x20Workflow\x20project\x20set\x20to:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','MAX_TASKS_DISPLAY','name','\x22\x20already\x20exists\x20(ID:\x20','total','title','pullProject','---\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','output','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Pattern:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Parameters:\x20','Project\x20filter:\x20','generateSessionTimelineRows','isTTY','Show\x20logs\x20for\x20a\x20workflow\x20attempt','workflow:download','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','download','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','✔\x20Pull\x20complete','Including\x20subtasks:\x20yes','workflow:secrets:set','7915jowWeL','✔\x20Showing\x20','Reason:\x20','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','isNewProject','applyPullProject','\x20session','message','retryAttempt','New\x20project\x20name:\x20','🔄\x20','indexOf','utf-8','attempt','Params:\x20','format','\x20has\x20no\x20attempts','\x0aError:','modified','stat','deleteSecret','workflows','No\x20attempts\x20found\x20in\x20project:\x20','✔\x20Project:\x20','\x20\x20Project:\x20','Filter:\x20project=','limit','✔\x20Downloaded\x20','Loading\x20session...','Writing\x20files...','localeCompare','start','red','\x20-\x20','workflow:delete','unchanged','Total:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Usage:\x20workflow:delete\x20<project-name-or-id>','relative','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','getHours','Error:\x20Project\x20name\x20is\x20required','workflowProject','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','renderSessionsTimeline','set','workflow:pull','size','✔\x20Workflow\x20project\x20context\x20cleared.','sourceProjectName','execute','jsonl','all','replace','Failed\x20to\x20fetch\x20attempt\x20data','Pushing\x20workflow\x20project...','workflow:timeline','\x0aPolling...\x20('];a42_0x148a=function(){return _0x2e8adb;};return a42_0x148a();}import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x1933bf from'prompts';function getAttemptStatusDisplay(_0x35af6e){const _0x3d609e=a42_0x5c3c;if(!_0x35af6e)return{'icon':'⏳','text':''};const {done:_0x20fea2,success:_0x1b2316,cancelRequested:_0x301b36}=_0x35af6e;if(!_0x20fea2)return _0x301b36?{'icon':'🛑','text':a42_0x48c95c[_0x3d609e(0x29e)](_0x3d609e(0x258))}:{'icon':'🔄','text':a42_0x48c95c[_0x3d609e(0x2e1)](_0x3d609e(0x235))};if(_0x1b2316)return{'icon':'✅','text':a42_0x48c95c[_0x3d609e(0x279)](_0x3d609e(0x266))};return{'icon':'❌','text':a42_0x48c95c[_0x3d609e(0x196)](_0x3d609e(0x239))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x3bd9b9(0x201)](_0x13e702,_0x29f939,_0x4ced7a=0x0){const _0xf8c38c=a42_0x3bd9b9;return _0x13e702[_0x4ced7a]||_0x29f939[_0xf8c38c(0x1a1)];}[a42_0x3bd9b9(0x1d0)](_0x5f08ac,_0x4c8d07,_0x3cd58d=0x0){const _0x1dcc9c=a42_0x3bd9b9,_0x4853bd=this[_0x1dcc9c(0x201)](_0x5f08ac,_0x4c8d07,_0x3cd58d);if(!_0x4853bd)return console[_0x1dcc9c(0x239)](a42_0x48c95c['red'](_0x1dcc9c(0x215)),_0x1dcc9c(0x1f5)),console[_0x1dcc9c(0x239)](a42_0x48c95c['dim'](_0x1dcc9c(0x26d))),null;return _0x4853bd;}[a42_0x3bd9b9(0x1d2)](_0x1bdc31,_0x363b27){const _0x8c0fd6=a42_0x3bd9b9;if(_0x1bdc31[0x0]){const _0x2ec06f=_0x1bdc31[0x0][_0x8c0fd6(0x21b)]('.');if(_0x2ec06f[_0x8c0fd6(0x1c2)]===0x1)return{'projectName':_0x2ec06f[0x0],'workflowName':undefined};else return _0x2ec06f['length']===0x2?{'projectName':_0x2ec06f[0x0],'workflowName':_0x2ec06f[0x1]}:(console[_0x8c0fd6(0x239)](a42_0x48c95c['red'](_0x8c0fd6(0x215)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x363b27['workflowProject'],'workflowName':undefined};}[a42_0x3bd9b9(0x2fd)](_0x12a544,_0x50a673,_0x212477=0x0){const _0x36cc26=a42_0x3bd9b9;if(_0x12a544[_0x212477])return _0x12a544[_0x212477];if(_0x50a673[_0x36cc26(0x1a1)]){const _0x2fbdc4=a42_0x50631b[_0x36cc26(0x1c6)](process['cwd'](),_0x36cc26(0x18b),_0x50a673[_0x36cc26(0x1a1)]);if(existsSync(a42_0x50631b[_0x36cc26(0x1c6)](_0x2fbdc4,'tdx.json')))return _0x2fbdc4;}return undefined;}async[a42_0x3bd9b9(0x1c3)](_0x1f7034,_0x2005fb,_0x5ef06e){const _0x26e7a1=a42_0x3bd9b9;try{const _0x5248ad=await _0x1f7034[_0x26e7a1(0x2aa)][_0x26e7a1(0x18b)](_0x2005fb,{'limit':0x1});if(_0x5248ad[_0x26e7a1(0x1c2)]>0x0){const _0x368017=_0x5248ad[0x0]['id'],_0x3664bc=getWorkflowUrl(_0x5ef06e,_0x368017);console[_0x26e7a1(0x239)](_0x26e7a1(0x1fc)+a42_0x48c95c[_0x26e7a1(0x2dd)](_0x3664bc));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]='workflow:use';['description']=a42_0x3bd9b9(0x1e0);async[a42_0x3bd9b9(0x1a9)](_0x1f7a22){const _0x1348f1=a42_0x3bd9b9,{options:_0x12d913,args:_0x1e3889,tdx:_0xbd12f2}=_0x1f7a22,_0x2df0fa=_0x1e3889[0x0],_0x4b6947=_0x12d913[_0x1348f1(0x2ed)];if(_0x4b6947)return saveSessionContext({'workflow_project':undefined},_0x12d913[_0x1348f1(0x245)]),console[_0x1348f1(0x276)](a42_0x48c95c['green'](_0x1348f1(0x1a7))),0x0;if(!_0x2df0fa)return console[_0x1348f1(0x239)](a42_0x48c95c[_0x1348f1(0x196)]('Error:'),_0x1348f1(0x1f5)),console[_0x1348f1(0x239)](a42_0x48c95c[_0x1348f1(0x1b5)](_0x1348f1(0x2a7))),console['error'](a42_0x48c95c['dim'](_0x1348f1(0x2da))),0x1;const _0x45f2f7=await withSpinner(_0x1348f1(0x284)+_0x2df0fa+'\x27...',()=>_0xbd12f2[_0x1348f1(0x2aa)][_0x1348f1(0x27d)](_0x2df0fa),{'verbose':_0x12d913['verbose']}),{name:_0x371616}=_0x45f2f7[_0x1348f1(0x2c9)];return saveSessionContext({'workflow_project':_0x371616},_0x12d913[_0x1348f1(0x245)]),console[_0x1348f1(0x276)](a42_0x48c95c['green'](_0x1348f1(0x30c)+a42_0x48c95c[_0x1348f1(0x2dd)](_0x371616))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x2eb);[a42_0x3bd9b9(0x1cb)]='List\x20all\x20workflow\x20projects';async[a42_0x3bd9b9(0x1a9)](_0x3cfd19){const _0x2cff16=a42_0x3bd9b9,{options:_0x48b58f,args:_0x36599e,tdx:_0x4fc7b8}=_0x3cfd19,_0x1895db=_0x36599e[0x0];_0x48b58f[_0x2cff16(0x2d1)]&&_0x1895db&&console['error'](_0x2cff16(0x318)+_0x1895db);const _0x6cc8db=await withSpinner(_0x2cff16(0x264),()=>_0x4fc7b8['workflow'][_0x2cff16(0x2de)](_0x1895db,{'limit':_0x48b58f[_0x2cff16(0x190)]}),{'verbose':_0x48b58f[_0x2cff16(0x2d1)]});let _0x5ede45=_0x6cc8db[_0x2cff16(0x2c9)];_0x5ede45[_0x2cff16(0x1b1)]((_0x5a9ca7,_0x1c0ae5)=>_0x5a9ca7[_0x2cff16(0x30f)][_0x2cff16(0x194)](_0x1c0ae5[_0x2cff16(0x30f)]));const _0x33f883=_0x48b58f[_0x2cff16(0x190)]||0x64,_0xbd366b=_0x5ede45[_0x2cff16(0x1c2)]>=_0x33f883?a42_0x48c95c[_0x2cff16(0x1b5)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x2cff16(0x239)](_0x2cff16(0x1f8)+_0x5ede45['length']+'\x20project'+(_0x5ede45[_0x2cff16(0x1c2)]!==0x1?'s':'')+_0xbd366b);if(_0x48b58f[_0x2cff16(0x185)]===_0x2cff16(0x28f)||_0x48b58f[_0x2cff16(0x185)]===_0x2cff16(0x1aa)||_0x48b58f[_0x2cff16(0x185)]===_0x2cff16(0x269))await handleSDKOutput(_0x5ede45,_0x48b58f);else{if(_0x5ede45['length']===0x0)_0x1895db?console[_0x2cff16(0x276)](_0x2cff16(0x2e0)+_0x1895db):console['log'](_0x2cff16(0x1ba));else{const _0xd8aa9e=_0x5ede45[_0x2cff16(0x262)](_0x15fa4a=>{const _0x42c180=_0x2cff16,_0x2e3c4b=_0x15fa4a[_0x42c180(0x26c)]?.['some'](_0x3e4890=>_0x3e4890[_0x42c180(0x1c4)]==='sys'),_0x462eed=_0x2e3c4b?a42_0x48c95c[_0x42c180(0x1b5)](_0x42c180(0x29d)):'';return _0x42c180(0x221)+_0x15fa4a['name']+_0x462eed;});await writeOutput(_0xd8aa9e[_0x2cff16(0x1c6)]('\x0a'),_0x48b58f[_0x2cff16(0x316)],_0x2cff16(0x23f));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x1f6);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x289);async[a42_0x3bd9b9(0x1a9)](_0x369c84){const _0x9370e0=a42_0x3bd9b9,{options:_0x113819,args:_0x467f47,tdx:_0xc00be3}=_0x369c84,_0x3db071=this[_0x9370e0(0x201)](_0x467f47,_0x113819);_0x113819[_0x9370e0(0x2d1)]&&_0x3db071&&console['error'](_0x9370e0(0x31b)+_0x3db071);const _0xbf1fe6=await withSpinner('Listing\x20workflows...',()=>_0xc00be3[_0x9370e0(0x2aa)][_0x9370e0(0x18b)](_0x3db071,{'limit':_0x113819['limit']}),{'verbose':_0x113819[_0x9370e0(0x2d1)]});let _0x5b9542=_0xbf1fe6['data'];_0x5b9542[_0x9370e0(0x1b1)]((_0x4608b0,_0x28d64b)=>{const _0x1e459e=_0x9370e0,_0xbac584=_0x4608b0[_0x1e459e(0x30f)][_0x1e459e(0x194)](_0x28d64b[_0x1e459e(0x30f)]);if(_0xbac584!==0x0)return _0xbac584;return(_0x4608b0[_0x1e459e(0x1f7)]?.[_0x1e459e(0x30f)]||'')[_0x1e459e(0x194)](_0x28d64b[_0x1e459e(0x1f7)]?.[_0x1e459e(0x30f)]||'');});const _0x3122e5=_0x113819[_0x9370e0(0x190)]||0x64,_0x3b02ab=_0x5b9542['length']>=_0x3122e5?a42_0x48c95c[_0x9370e0(0x1b5)](_0x9370e0(0x232)):'';console[_0x9370e0(0x239)](_0x9370e0(0x1f8)+_0x5b9542['length']+_0x9370e0(0x2fc)+(_0x5b9542['length']!==0x1?'s':'')+_0x3b02ab);if(_0x113819[_0x9370e0(0x185)]===_0x9370e0(0x28f)||_0x113819[_0x9370e0(0x185)]==='jsonl'||_0x113819['format']==='table')await handleSDKOutput(_0x5b9542,_0x113819);else{if(_0x5b9542[_0x9370e0(0x1c2)]===0x0)_0x3db071?console['log'](_0x9370e0(0x308)+_0x3db071):console[_0x9370e0(0x276)](_0x9370e0(0x219));else{const _0x4734b4=_0x113819[_0x9370e0(0x249)],_0xb89f97=_0x5b9542[_0x9370e0(0x262)](_0x40da1c=>{const _0x3965ad=_0x9370e0,_0xec9387=a42_0x48c95c[_0x3965ad(0x1b5)]('#'+_0x40da1c['id']),_0x2541ec=hyperlink(_0xec9387,getWorkflowUrl(_0x4734b4,_0x40da1c['id'])),_0x4e2b96=_0x40da1c[_0x3965ad(0x1f7)]?.['name']?a42_0x48c95c[_0x3965ad(0x1b5)]('\x20('+_0x40da1c[_0x3965ad(0x1f7)][_0x3965ad(0x30f)]+')'):'';return _0x3965ad(0x1dc)+_0x2541ec+'\x20'+_0x40da1c[_0x3965ad(0x30f)]+_0x4e2b96;});await writeOutput(_0xb89f97['join']('\x0a'),_0x113819['output'],_0x9370e0(0x23f));}}return 0x0;}}function a42_0x5c3c(_0x731f4f,_0x1bb16a){_0x731f4f=_0x731f4f-0x17f;const _0x148aa3=a42_0x148a();let _0x5c3c07=_0x148aa3[_0x731f4f];return _0x5c3c07;}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']='workflow:sessions';[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x1fd);async[a42_0x3bd9b9(0x1a9)](_0x2f576a){const _0x830f5d=a42_0x3bd9b9,{options:_0x1e199f,args:_0x2b17b2,tdx:_0x2ba4c6}=_0x2f576a,_0x368154=this[_0x830f5d(0x1d2)](_0x2b17b2,_0x1e199f);if(!_0x368154)return 0x1;const {projectName:_0x2849b2,workflowName:_0x2574f1}=_0x368154;if(_0x1e199f[_0x830f5d(0x2d1)]){if(_0x2849b2&&_0x2574f1)console['error']('Filter:\x20'+_0x2849b2+'.'+_0x2574f1);else _0x2849b2&&console[_0x830f5d(0x239)](_0x830f5d(0x18f)+_0x2849b2);const _0x1b216f=_0x1e199f[_0x830f5d(0x2a9)];_0x1b216f&&console[_0x830f5d(0x239)]('Status:\x20'+_0x1b216f);}let _0x559c99=0x28;if(process['stdout'][_0x830f5d(0x31d)]&&!_0x1e199f['output']&&!_0x1e199f[_0x830f5d(0x185)]){const _0x8c686=process[_0x830f5d(0x2e8)][_0x830f5d(0x22e)]||0x28;_0x559c99=Math['max'](0x14,Math['floor'](_0x8c686*0x2/0x3));}const _0x3ef7db=_0x1e199f[_0x830f5d(0x190)]||_0x559c99,_0x56c16a=await withSpinner(_0x830f5d(0x238),()=>_0x2ba4c6[_0x830f5d(0x2aa)]['sessions']({'projectName':_0x2849b2,'workflowName':_0x2574f1,'status':_0x1e199f['status'],'fromTime':_0x1e199f[_0x830f5d(0x2f2)],'toTime':_0x1e199f['to'],'limit':_0x3ef7db}),{'verbose':_0x1e199f[_0x830f5d(0x2d1)]}),_0x40495f=_0x56c16a['data'];_0x40495f[_0x830f5d(0x1b1)]((_0xfc641d,_0x6a2e20)=>{const _0x361e86=_0x830f5d,_0x479b25=_0xfc641d[_0x361e86(0x29a)]||'',_0x3c0e2f=_0x6a2e20[_0x361e86(0x29a)]||'';return _0x3c0e2f[_0x361e86(0x194)](_0x479b25);});_0x40495f['length']>=_0x3ef7db?console[_0x830f5d(0x239)](_0x830f5d(0x328)+_0x40495f['length']+_0x830f5d(0x23c)+a42_0x48c95c[_0x830f5d(0x1b5)](_0x830f5d(0x247))):console[_0x830f5d(0x239)]('✔\x20Found\x20'+_0x40495f[_0x830f5d(0x1c2)]+_0x830f5d(0x32d)+(_0x40495f[_0x830f5d(0x1c2)]!==0x1?'s':''));if(_0x1e199f['format']===_0x830f5d(0x28f)||_0x1e199f[_0x830f5d(0x185)]===_0x830f5d(0x1aa)||_0x1e199f[_0x830f5d(0x185)]===_0x830f5d(0x269))await handleSDKOutput(_0x40495f,_0x1e199f);else{if(!process[_0x830f5d(0x2e8)]['isTTY']||_0x1e199f[_0x830f5d(0x316)]){if(_0x40495f[_0x830f5d(0x1c2)]===0x0){if(_0x2849b2&&_0x2574f1)console['log'](_0x830f5d(0x1d3)+_0x2849b2+'.'+_0x2574f1);else _0x2849b2?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x2849b2):console[_0x830f5d(0x276)]('No\x20sessions\x20found');}else{const _0x4b3908=_0x1e199f['site'],_0x3216a2=this[_0x830f5d(0x1a3)](_0x40495f,_0x4b3908);_0x1e199f[_0x830f5d(0x316)]?await writeOutput(_0x3216a2,_0x1e199f[_0x830f5d(0x316)],_0x830f5d(0x23f)):console[_0x830f5d(0x276)](_0x3216a2);}!_0x2849b2&&(console['error'](''),console[_0x830f5d(0x239)](a42_0x48c95c['dim'](_0x830f5d(0x30d))),console[_0x830f5d(0x239)](a42_0x48c95c['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x48c95c[_0x830f5d(0x1b5)](_0x830f5d(0x273))));}else{if(_0x40495f[_0x830f5d(0x1c2)]===0x0){if(_0x2849b2&&_0x2574f1)console[_0x830f5d(0x276)](_0x830f5d(0x1d3)+_0x2849b2+'.'+_0x2574f1);else _0x2849b2?console[_0x830f5d(0x276)](_0x830f5d(0x2a4)+_0x2849b2):console[_0x830f5d(0x276)](_0x830f5d(0x203));}else await this[_0x830f5d(0x20a)](_0x40495f,_0x2f576a,_0x2849b2);}}return 0x0;}[a42_0x3bd9b9(0x1a3)](_0x1ae285,_0x33696f){const _0x289675=a42_0x3bd9b9,_0x48cfbb=[],_0x1519b4=new Map();let _0x5abf06=Infinity,_0x1b3d51=-Infinity;for(const _0x4da571 of _0x1ae285){if(_0x4da571[_0x289675(0x270)]?.['createdAt']){const _0x3fef58=new Date(_0x4da571[_0x289675(0x270)][_0x289675(0x1ee)])['getTime'](),_0x30e952=_0x4da571[_0x289675(0x270)][_0x289675(0x2dc)]?new Date(_0x4da571['lastAttempt'][_0x289675(0x2dc)])[_0x289675(0x22d)]():Date[_0x289675(0x1bb)](),_0x5eab35=_0x4da571[_0x289675(0x1f7)]?.[_0x289675(0x30f)]||_0x289675(0x300);!_0x1519b4[_0x289675(0x2d7)](_0x5eab35)&&_0x1519b4[_0x289675(0x1a4)](_0x5eab35,[]),_0x1519b4[_0x289675(0x1cf)](_0x5eab35)[_0x289675(0x2e5)]({'session':_0x4da571,'startTime':_0x3fef58,'endTime':_0x30e952,'duration':_0x30e952-_0x3fef58}),_0x5abf06=Math[_0x289675(0x225)](_0x5abf06,_0x3fef58),_0x1b3d51=Math['max'](_0x1b3d51,_0x30e952);}}if(_0x1519b4[_0x289675(0x1a6)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x1b567a=process['stdout'][_0x289675(0x1e3)]||0x78,_0x36be3a=0x1e,_0x3cb3bd=0x32,_0x3b75d9=0x4,_0x4b9f51=Math[_0x289675(0x225)](_0x3cb3bd,Math['max'](_0x36be3a,Math['floor'](_0x1b567a*0.3))),_0x1585ce=_0x1b567a-_0x4b9f51-TIMELINE_CONFIG[_0x289675(0x2c1)]-0x3-_0x3b75d9,_0x526cc6=_0x1b3d51-_0x5abf06,_0x26cc7b=_0x526cc6/_0x4b9f51,_0x7b2530=renderTimeAxis({'startTime':_0x5abf06,'endTime':_0x1b3d51,'durationMs':_0x526cc6,'msPerChar':_0x26cc7b},_0x4b9f51),_0x522854=[];for(const _0x3bba5b of _0x1519b4[_0x289675(0x2e2)]()){_0x522854['push'](..._0x3bba5b);}_0x522854[_0x289675(0x1b1)]((_0x4258fe,_0x321a7e)=>_0x321a7e['startTime']-_0x4258fe['startTime']);const _0x29ea03=new Date(_0x5abf06),_0x1c9018=formatDate(_0x29ea03),_0x556bf3=_0x3b75d9+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG['ICON_SPACING']+_0x1585ce,_0x176086='\x20'[_0x289675(0x1fe)](_0x556bf3-_0x1c9018[_0x289675(0x1c2)]),_0x3dbc27=_0x176086+a42_0x48c95c[_0x289675(0x1b5)](_0x1c9018)+'\x20'+_0x7b2530;_0x48cfbb[_0x289675(0x2e5)](_0x3dbc27);const _0x1d1620=0x16;let _0x391b34=0x0;for(const _0x4712ba of _0x522854){const _0x458180=_0x4712ba['session'][_0x289675(0x1f7)]?.[_0x289675(0x30f)]||'?',_0x29b747=Math[_0x289675(0x225)](stringWidth(_0x458180),_0x1d1620);_0x391b34=Math['max'](_0x391b34,_0x29b747);}for(const _0xeabe9b of _0x522854){const {session:_0x2b4e98,startTime:_0x2a5819,endTime:_0x2c7ebf,duration:_0x47aa19}=_0xeabe9b,_0x432efb=_0x2b4e98[_0x289675(0x1f7)]?.['id'],_0x24cfdd=_0x2b4e98['id'],_0x431175=_0x2b4e98[_0x289675(0x1f7)]?.[_0x289675(0x30f)]||'?',_0x110de5=_0x2b4e98[_0x289675(0x2aa)]?.['name']||'?';let _0x5ce43b,_0x5fbe28;if(_0x2b4e98['lastAttempt']){const _0x3d756a=_0x2b4e98['lastAttempt'];!_0x3d756a[_0x289675(0x1b4)]?(_0x5ce43b=_0x3d756a[_0x289675(0x2b2)]?'🛑':'🔄',_0x5fbe28=_0x3d756a[_0x289675(0x2b2)]?a42_0x48c95c[_0x289675(0x29e)]:a42_0x48c95c['blue']):(_0x5ce43b=_0x3d756a[_0x289675(0x266)]?'✅':'❌',_0x5fbe28=_0x3d756a[_0x289675(0x266)]?a42_0x48c95c[_0x289675(0x279)]:a42_0x48c95c[_0x289675(0x196)]);}else _0x5ce43b='⏳',_0x5fbe28=a42_0x48c95c[_0x289675(0x1b5)];const _0x387517='#'+_0x24cfdd,_0x32f426=_0x432efb?hyperlink(_0x387517,getWorkflowSessionUrl(_0x33696f,_0x432efb,_0x24cfdd)):_0x387517;let _0x10da74=_0x431175;stringWidth(_0x431175)>_0x1d1620&&(_0x10da74=_0x431175['slice'](0x0,_0x1d1620-0x1)+'…');const _0x33a55a=a42_0x48c95c[_0x289675(0x1b5)](_0x10da74),_0x488e43=stringWidth(_0x10da74),_0x319b8c='\x20'['repeat'](_0x391b34-stringWidth(_0x10da74)+0x2),_0x22a523='('+formatElapsed(_0x47aa19)+')',_0x1f9c30=stringWidth(_0x22a523),_0x36b17a=stringWidth(_0x387517),_0x22c80b=_0x36b17a+0x1+_0x488e43+_0x319b8c[_0x289675(0x1c2)],_0x2cffcb=_0x1585ce-_0x22c80b-_0x1f9c30-0x1-0x8;let _0x23e18d=_0x110de5;stringWidth(_0x23e18d)>_0x2cffcb&&(_0x23e18d=_0x23e18d[_0x289675(0x1de)](0x0,_0x2cffcb-0x1)+'…');const _0x537d4c=_0x32f426+'\x20'+_0x33a55a+_0x319b8c+_0x23e18d,_0x3c7b98=stringWidth(_0x537d4c),_0x4bcee0=_0x1585ce-_0x3c7b98-_0x1f9c30,_0x27ed8b=_0x537d4c+'\x20'[_0x289675(0x1fe)](Math[_0x289675(0x303)](0x1,_0x4bcee0))+a42_0x48c95c[_0x289675(0x1b5)](_0x22a523),_0x2a71ee=Math['floor']((_0x2a5819-_0x5abf06)/_0x26cc7b),_0x44f222=Math[_0x289675(0x1e4)]((_0x2c7ebf-_0x5abf06)/_0x26cc7b),_0x1e00f1=Math[_0x289675(0x303)](_0x2a71ee+0x1,_0x44f222),_0x279fc3=new Array(_0x4b9f51)[_0x289675(0x2a3)]('\x20');for(let _0x2d6ed3=_0x2a71ee;_0x2d6ed3<Math['min'](_0x1e00f1,_0x4b9f51);_0x2d6ed3++){_0x279fc3[_0x2d6ed3]='─';}const _0x2df2f2=_0x279fc3[_0x289675(0x262)](_0x37b65a=>_0x37b65a==='\x20'?'\x20':_0x5fbe28(_0x37b65a))[_0x289675(0x1c6)]('');_0x48cfbb[_0x289675(0x2e5)](_0x5ce43b+'\x20'+_0x27ed8b+'│'+_0x2df2f2+'│');}return _0x48cfbb[_0x289675(0x1c6)]('\x0a');}async[a42_0x3bd9b9(0x20a)](_0x3a6e0f,_0x500704,_0x18aa5e){const _0x3054bc=a42_0x3bd9b9,{options:_0x2e7522,tdx:_0x4b3032}=_0x500704,_0x26efcb=_0x2e7522[_0x3054bc(0x249)],{timelineRows:_0x4f5b6c,timeAxisHeader:_0x21993c}=this['generateSessionTimelineRows'](_0x3a6e0f,_0x26efcb),_0x48f6bb=_0x4f5b6c[_0x3054bc(0x2fe)](_0x31b15a=>_0x31b15a[_0x3054bc(0x2cb)]);if(_0x48f6bb[_0x3054bc(0x1c2)]===0x0){const _0x3bbe60=this['renderSessionsTimeline'](_0x3a6e0f,_0x26efcb);console[_0x3054bc(0x276)](_0x3bbe60);!_0x18aa5e&&(console[_0x3054bc(0x239)](''),console[_0x3054bc(0x239)](a42_0x48c95c[_0x3054bc(0x1b5)](_0x3054bc(0x30d))),console[_0x3054bc(0x239)](a42_0x48c95c['dim'](_0x3054bc(0x1c9))+'or'+a42_0x48c95c[_0x3054bc(0x1b5)](_0x3054bc(0x273))));return;}_0x21993c&&console[_0x3054bc(0x276)](_0x21993c);const _0x38e739=_0x4f5b6c[_0x3054bc(0x2fe)](_0x2b78de=>_0x2b78de[_0x3054bc(0x2cb)])[_0x3054bc(0x262)](_0x422cca=>({'title':_0x422cca['displayLine'],'value':_0x422cca[_0x3054bc(0x2cb)]})),_0x40f5d3=process['stdout'][_0x3054bc(0x22e)]||0x3c,_0x1ba9a8=Math[_0x3054bc(0x303)](0x28,Math[_0x3054bc(0x1e4)](_0x40f5d3*0x2/0x3)),_0x530f03=await a42_0x1933bf({'type':_0x3054bc(0x2c5),'name':_0x3054bc(0x2cb),'message':_0x3054bc(0x322),'choices':_0x38e739,'initial':-0x1,'limit':_0x1ba9a8,'clearFirst':!![],'fallback':{'title':_0x3054bc(0x218),'value':null},'suggest':(_0x8c11a9,_0x240b21)=>{const _0x58bf48=_0x3054bc;if(!_0x8c11a9)return Promise[_0x58bf48(0x2b5)](_0x240b21);const _0x300009=_0x240b21[_0x58bf48(0x2fe)](_0xb567f2=>{const _0x4855ba=_0x58bf48,_0x223b60=_0xb567f2;return _0x223b60[_0x4855ba(0x312)][_0x4855ba(0x1f4)]()[_0x4855ba(0x292)](_0x8c11a9[_0x4855ba(0x1f4)]());});return Promise[_0x58bf48(0x2b5)](_0x300009);}}),_0xa038b3=()=>{const _0x12fd6a=_0x3054bc;process[_0x12fd6a(0x2e8)][_0x12fd6a(0x2be)](_0x12fd6a(0x2a6)),process[_0x12fd6a(0x2e8)][_0x12fd6a(0x2be)](_0x12fd6a(0x2a6)),process[_0x12fd6a(0x2e8)][_0x12fd6a(0x2be)](_0x12fd6a(0x2a6));},_0x58d6c6=_0x530f03&&_0x530f03['attemptId']&&_0x530f03['attemptId']!==null&&_0x530f03[_0x3054bc(0x2cb)][_0x3054bc(0x1e1)]()!=='';if(!_0x58d6c6){_0xa038b3(),console['log'](a42_0x48c95c[_0x3054bc(0x1b5)](_0x3054bc(0x299)));return;}_0xa038b3();const _0x383929=_0x3a6e0f[_0x3054bc(0x231)](_0x149852=>_0x149852[_0x3054bc(0x270)]?.['id']===_0x530f03[_0x3054bc(0x2cb)]);if(_0x383929){const _0x472b6d=_0x383929[_0x3054bc(0x1f7)]?.['name']||'?',_0x275b8a=_0x383929[_0x3054bc(0x2aa)]?.[_0x3054bc(0x30f)]||'?';console[_0x3054bc(0x276)](_0x3054bc(0x2b9)+a42_0x48c95c[_0x3054bc(0x1b5)](_0x472b6d)+',\x20Workflow:\x20'+a42_0x48c95c['dim'](_0x275b8a));}const _0x5e3c26=new WorkflowTimelineCommand();await _0x5e3c26[_0x3054bc(0x1a9)]({'args':[],'options':{..._0x2e7522,'attemptId':_0x530f03[_0x3054bc(0x2cb)]},'tdx':_0x4b3032});}[a42_0x3bd9b9(0x31c)](_0xa6687e,_0x2c4214){const _0x5e45a0=a42_0x3bd9b9,_0x3295fc=new Map();for(const _0x28db9c of _0xa6687e){_0x28db9c['id']&&_0x28db9c['lastAttempt']?.['id']&&_0x3295fc[_0x5e45a0(0x1a4)](_0x28db9c['id'],_0x28db9c[_0x5e45a0(0x270)]['id']);}const _0x314cc7=[];let _0x28617e='';const _0xea36c1=this[_0x5e45a0(0x1a3)](_0xa6687e,_0x2c4214),_0x2c8291=_0xea36c1[_0x5e45a0(0x21b)]('\x0a');for(const _0x79aa9e of _0x2c8291){if(_0x79aa9e[_0x5e45a0(0x24d)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x79aa9e['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x28617e=_0x79aa9e;else{if(_0x79aa9e[_0x5e45a0(0x1f2)](/^[✅❌🔄🛑⏳]/)){const _0x38d15f=_0x79aa9e[_0x5e45a0(0x1f2)](/#(\d+)/),_0x445894=_0x38d15f?_0x38d15f[0x1]:null,_0x593383=_0x445894?_0x3295fc[_0x5e45a0(0x1cf)](_0x445894)||null:null,_0x4fec36=_0xa6687e[_0x5e45a0(0x231)](_0x5eafd2=>_0x5eafd2['id']===_0x445894),_0x36b4a6=_0x4fec36?.[_0x5e45a0(0x1f7)]?.[_0x5e45a0(0x30f)]||'';_0x314cc7[_0x5e45a0(0x2e5)]({'displayLine':_0x79aa9e,'attemptId':_0x593383,'projectName':_0x36b4a6});}}}return{'timelineRows':_0x314cc7,'timeAxisHeader':_0x28617e};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]='workflow:attempts';['description']=a42_0x3bd9b9(0x1b8);async[a42_0x3bd9b9(0x1a9)](_0xdafa85){const _0x353370=a42_0x3bd9b9,{options:_0x3a8da9,args:_0x5f2893,tdx:_0x1f4d7b}=_0xdafa85,_0x360056=this[_0x353370(0x1d2)](_0x5f2893,_0x3a8da9);if(!_0x360056)return 0x1;const {projectName:_0x56d05d,workflowName:_0x4b4fbe}=_0x360056,_0x3838a9=_0x3a8da9[_0x353370(0x22f)];if(_0x3a8da9['verbose']){if(_0x56d05d&&_0x4b4fbe)console[_0x353370(0x239)](_0x353370(0x26a)+_0x56d05d+'.'+_0x4b4fbe);else _0x56d05d&&console[_0x353370(0x239)](_0x353370(0x18f)+_0x56d05d);_0x3838a9&&console[_0x353370(0x239)](_0x353370(0x1dd));}const _0x332c07=await withSpinner(_0x353370(0x280),()=>_0x1f4d7b[_0x353370(0x2aa)]['attempts']({'projectName':_0x56d05d,'workflowName':_0x4b4fbe,'includeRetried':_0x3838a9,'limit':_0x3a8da9[_0x353370(0x190)]}),{'verbose':_0x3a8da9[_0x353370(0x2d1)]}),_0xbb6edb=_0x332c07[_0x353370(0x2c9)],_0x12800d=_0x3a8da9[_0x353370(0x190)]||0x64,_0x5d98b2=_0xbb6edb[_0x353370(0x1c2)]>=_0x12800d?a42_0x48c95c[_0x353370(0x1b5)](_0x353370(0x232)):'';console[_0x353370(0x239)](_0x353370(0x1f8)+_0xbb6edb['length']+_0x353370(0x2a8)+(_0xbb6edb[_0x353370(0x1c2)]!==0x1?'s':'')+_0x5d98b2);if(_0x3a8da9[_0x353370(0x185)]===_0x353370(0x28f)||_0x3a8da9['format']==='jsonl'||_0x3a8da9[_0x353370(0x185)]===_0x353370(0x269))await handleSDKOutput(_0xbb6edb,_0x3a8da9);else{if(_0xbb6edb[_0x353370(0x1c2)]===0x0){if(_0x56d05d&&_0x4b4fbe)console[_0x353370(0x276)]('No\x20attempts\x20found\x20for:\x20'+_0x56d05d+'.'+_0x4b4fbe);else _0x56d05d?console[_0x353370(0x276)](_0x353370(0x18c)+_0x56d05d):console['log'](_0x353370(0x265));}else{const _0x80cb03=_0x3a8da9[_0x353370(0x249)],_0x5a8a43=_0xbb6edb[_0x353370(0x262)](_0x30bad9=>{const _0x3f6583=_0x353370,_0x3c6a7e=a42_0x48c95c[_0x3f6583(0x1b5)]('#'+_0x30bad9['id']),_0x3e8771=_0x30bad9[_0x3f6583(0x1f7)]?.['id'],_0x436800=_0x30bad9['session_id']||_0x30bad9['sessionId'],_0x8a0d68=_0x3e8771&&_0x436800?hyperlink(_0x3c6a7e,getWorkflowAttemptUrl(_0x80cb03,_0x3e8771,_0x436800,_0x30bad9['id'])):_0x3c6a7e,{icon:_0x240c73,text:_0x9dc51d}=getAttemptStatusDisplay(_0x30bad9),_0x1f2dad=(_0x30bad9['project']?.[_0x3f6583(0x30f)]||'?')+'.'+(_0x30bad9[_0x3f6583(0x2aa)]?.[_0x3f6583(0x30f)]||'?'),_0x27de7a=_0x30bad9[_0x3f6583(0x29a)]?a42_0x48c95c[_0x3f6583(0x1b5)](_0x30bad9[_0x3f6583(0x29a)]):'';return(_0x8a0d68+'\x20'+_0x240c73+(_0x9dc51d?'\x20'+_0x9dc51d:'')+'\x20'+_0x1f2dad+'\x20'+_0x27de7a)[_0x3f6583(0x1ef)]();});await writeOutput(_0x5a8a43[_0x353370(0x1c6)]('\x0a'),_0x3a8da9[_0x353370(0x316)],_0x353370(0x23f));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x2a5);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x1cc);async[a42_0x3bd9b9(0x1a9)](_0xce29f4){const _0x4a8531=a42_0x3bd9b9,{options:_0x5643de,args:_0x14a6f6,tdx:_0x169582}=_0xce29f4,_0x90e383=_0x14a6f6[0x0];if(!_0x90e383)return console[_0x4a8531(0x239)](_0x4a8531(0x20d)),0x1;_0x5643de[_0x4a8531(0x2d1)]&&console[_0x4a8531(0x239)]('Attempt\x20ID:\x20'+_0x90e383);const _0x17fa6a=await withSpinner(_0x4a8531(0x29c),()=>_0x169582[_0x4a8531(0x2aa)][_0x4a8531(0x183)](_0x90e383),{'verbose':_0x5643de[_0x4a8531(0x2d1)]}),_0x5eb1f8=_0x17fa6a[_0x4a8531(0x2c9)];let _0x4f3e72;!_0x5eb1f8[_0x4a8531(0x1b4)]?_0x4f3e72=_0x5eb1f8[_0x4a8531(0x2b2)]?_0x4a8531(0x258):'running':_0x4f3e72=_0x5eb1f8[_0x4a8531(0x266)]?_0x4a8531(0x266):_0x4a8531(0x239);let _0x43517e;if(_0x5eb1f8['createdAt']&&_0x5eb1f8[_0x4a8531(0x2dc)]){const _0x36666f=new Date(_0x5eb1f8[_0x4a8531(0x1ee)])['getTime'](),_0x516dc6=new Date(_0x5eb1f8[_0x4a8531(0x2dc)])[_0x4a8531(0x22d)]();_0x43517e=Math[_0x4a8531(0x2b6)]((_0x516dc6-_0x36666f)/0x3e8);}const _0x41b558={'attempt_id':_0x5eb1f8['id'],'status':_0x4f3e72,..._0x5eb1f8[_0x4a8531(0x2d4)]!==undefined&&{'index':_0x5eb1f8[_0x4a8531(0x2d4)]},..._0x5eb1f8[_0x4a8531(0x1f7)]&&{'project':_0x5eb1f8[_0x4a8531(0x1f7)][_0x4a8531(0x30f)]},..._0x5eb1f8[_0x4a8531(0x2aa)]&&{'workflow':_0x5eb1f8[_0x4a8531(0x2aa)][_0x4a8531(0x30f)]},..._0x5eb1f8['sessionId']&&{'session_id':_0x5eb1f8[_0x4a8531(0x277)]},..._0x5eb1f8['sessionTime']&&{'session_time':_0x5eb1f8['sessionTime']},..._0x5eb1f8['retryAttemptName']&&{'retry_attempt':_0x5eb1f8[_0x4a8531(0x242)]},..._0x43517e!==undefined&&{'duration_sec':_0x43517e},..._0x5eb1f8[_0x4a8531(0x1ee)]&&{'created_at':_0x5eb1f8['createdAt']},..._0x5eb1f8[_0x4a8531(0x2dc)]&&{'finished_at':_0x5eb1f8[_0x4a8531(0x2dc)]},...Object['keys'](_0x5eb1f8[_0x4a8531(0x1ff)])[_0x4a8531(0x1c2)]>0x0&&{'params':_0x5eb1f8['params']}};return await handleSingleObjectOutput(_0x41b558,_0x5643de),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a42_0x3bd9b9(0x2ef);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x2fa);async[a42_0x3bd9b9(0x1a9)](_0x3fc53f){const _0x4bf06f=a42_0x3bd9b9,{options:_0x8762ea,args:_0x3b6cc4,tdx:_0x59e12}=_0x3fc53f,_0x292838=_0x3b6cc4[0x0];if(!_0x292838)return console[_0x4bf06f(0x239)](_0x4bf06f(0x20d)),0x1;const _0x2050e4=_0x8762ea[_0x4bf06f(0x30a)];_0x8762ea['verbose']&&(console['error'](_0x4bf06f(0x305)+_0x292838),_0x2050e4&&console['error'](_0x4bf06f(0x325)));const _0x3b8d7f=await withSpinner(_0x4bf06f(0x2d0),()=>_0x59e12['workflow']['tasks'](_0x292838,_0x2050e4||![]),{'verbose':_0x8762ea[_0x4bf06f(0x2d1)]}),_0x1391ac=_0x3b8d7f[_0x4bf06f(0x2c9)];return console[_0x4bf06f(0x239)]('✔\x20Found\x20'+_0x1391ac[_0x4bf06f(0x1c2)]+_0x4bf06f(0x251)+(_0x1391ac[_0x4bf06f(0x1c2)]!==0x1?'s':'')),await handleSDKOutput(_0x1391ac,_0x8762ea),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a42_0x3bd9b9(0x2ea);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x31e);async[a42_0x3bd9b9(0x1a9)](_0x4aea2a){const _0x9fe843=a42_0x3bd9b9,{options:_0x5ba80f,args:_0x312d1f,tdx:_0xd62722}=_0x4aea2a,_0x42c8e4=_0x312d1f[0x0];let _0x53b1d7=_0x312d1f[0x1];if(!_0x42c8e4)return console[_0x9fe843(0x239)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x5ba80f[_0x9fe843(0x2d1)]&&(console[_0x9fe843(0x239)]('Attempt\x20ID:\x20'+_0x42c8e4),_0x53b1d7&&console[_0x9fe843(0x239)](_0x9fe843(0x1b2)+_0x53b1d7));const _0x414edd=await withSpinner(_0x9fe843(0x2d5),()=>_0xd62722[_0x9fe843(0x2aa)][_0x9fe843(0x1b7)](_0x42c8e4,_0x53b1d7),{'verbose':_0x5ba80f[_0x9fe843(0x2d1)]}),_0x20a518=_0x414edd[_0x9fe843(0x2c9)];if(_0x20a518[_0x9fe843(0x1c2)]===0x0)return console[_0x9fe843(0x239)](_0x9fe843(0x281)),0x0;if(!_0x53b1d7&&(_0x5ba80f[_0x9fe843(0x28f)]||_0x5ba80f[_0x9fe843(0x185)]))return await handleSDKOutput(_0x20a518,_0x5ba80f),0x0;if(!_0x53b1d7){const _0x51ce5c=_0x20a518[_0x9fe843(0x262)](_0x431bff=>({'title':_0x431bff[_0x9fe843(0x204)]+'\x20('+formatBytes(_0x431bff[_0x9fe843(0x21f)])+')','value':_0x431bff[_0x9fe843(0x204)]})),_0x421add=await a42_0x1933bf({'type':_0x9fe843(0x248),'name':_0x9fe843(0x2f7),'message':_0x9fe843(0x2ca),'choices':_0x51ce5c});if(!_0x421add[_0x9fe843(0x2f7)])return console[_0x9fe843(0x239)](_0x9fe843(0x299)),0x0;_0x53b1d7=_0x421add[_0x9fe843(0x2f7)];}const _0xe4de96=await withSpinner(_0x9fe843(0x27e),()=>_0xd62722[_0x9fe843(0x2aa)]['logs'](_0x42c8e4,_0x53b1d7),{'verbose':_0x5ba80f['verbose']}),_0x19c57c=_0xe4de96['data'];return _0x19c57c?console[_0x9fe843(0x276)](_0x19c57c):console[_0x9fe843(0x239)](_0x9fe843(0x224)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x1c1);['description']=a42_0x3bd9b9(0x20e);async[a42_0x3bd9b9(0x1a9)](_0x3b7095){const _0x102e16=a42_0x3bd9b9,{options:_0x1ace83,args:_0x4a18f3,tdx:_0xc3a209}=_0x3b7095,_0x1a0f45=_0x4a18f3[0x0];if(!_0x1a0f45)return console['error'](_0x102e16(0x20d)),0x1;const _0x5a75bb=_0x1ace83[_0x102e16(0x27b)];_0x1ace83[_0x102e16(0x2d1)]&&(console[_0x102e16(0x239)](_0x102e16(0x305)+_0x1a0f45),_0x5a75bb&&console[_0x102e16(0x239)](_0x102e16(0x329)+_0x5a75bb));if(!_0x1ace83[_0x102e16(0x202)]){if(!isInteractive())return console[_0x102e16(0x239)](a42_0x48c95c[_0x102e16(0x196)](_0x102e16(0x187)),_0x102e16(0x285)),console[_0x102e16(0x239)](a42_0x48c95c[_0x102e16(0x1b5)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x52277e=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x1a0f45+'?');if(!_0x52277e)return console[_0x102e16(0x239)](a42_0x48c95c[_0x102e16(0x29e)](_0x102e16(0x299))),0x1;}const _0x368975=await withSpinner(_0x102e16(0x1f3),()=>_0xc3a209[_0x102e16(0x2aa)][_0x102e16(0x25d)](_0x1a0f45,_0x5a75bb),{'verbose':_0x1ace83[_0x102e16(0x2d1)]}),_0x41a4ed=_0x368975[_0x102e16(0x2c9)];return console[_0x102e16(0x239)]('✔\x20'+_0x41a4ed),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x20c);['description']=a42_0x3bd9b9(0x260);async[a42_0x3bd9b9(0x1a9)](_0x19a7a9){const _0x22d51f=a42_0x3bd9b9,{options:_0x427ca2,args:_0x3349b8,tdx:_0x286fc1}=_0x19a7a9,_0x5eae6a=_0x3349b8[0x0];if(!_0x5eae6a)return console[_0x22d51f(0x239)](_0x22d51f(0x29f)),console[_0x22d51f(0x239)](_0x22d51f(0x317)),0x1;let _0x2ec7e8=![],_0x229daf=_0x5eae6a;if(_0x5eae6a['startsWith'](_0x22d51f(0x1d5)))_0x2ec7e8=!![],_0x229daf=_0x5eae6a[_0x22d51f(0x297)](0x8);else{if(_0x5eae6a[_0x22d51f(0x24d)](_0x22d51f(0x236)))_0x2ec7e8=![],_0x229daf=_0x5eae6a[_0x22d51f(0x297)](0x8);else return console[_0x22d51f(0x239)](_0x22d51f(0x320)),console[_0x22d51f(0x239)](_0x22d51f(0x317)),0x1;}const _0x4d6991=_0x427ca2['fromTask'],_0x4ea455=_0x427ca2['resumeFrom'],_0x2ff5e8=_0x427ca2['params'],_0x15fe96=_0x427ca2[_0x22d51f(0x304)];_0x427ca2['verbose']&&(console[_0x22d51f(0x239)](_0x22d51f(0x2d3)+(_0x2ec7e8?'session':_0x22d51f(0x183))+'\x20'+_0x229daf),_0x4d6991&&console[_0x22d51f(0x239)](_0x22d51f(0x2ab)+_0x4d6991),_0x4ea455&&console[_0x22d51f(0x239)](_0x22d51f(0x2d6)+_0x4ea455),_0x2ff5e8&&console[_0x22d51f(0x239)](_0x22d51f(0x184)+_0x2ff5e8),_0x15fe96&&console[_0x22d51f(0x239)]('Force:\x20yes'));let _0x5eafc5;if(_0x2ff5e8)try{if(_0x2ff5e8[_0x22d51f(0x24d)]('@')){const _0x4c37be=await import('fs/promises'),_0x39ebf0=_0x2ff5e8[_0x22d51f(0x297)](0x1),_0x11659f=await _0x4c37be[_0x22d51f(0x1d8)](_0x39ebf0,_0x22d51f(0x182));_0x5eafc5=JSON['parse'](_0x11659f);}else _0x5eafc5=JSON['parse'](_0x2ff5e8);}catch{return console[_0x22d51f(0x239)](_0x22d51f(0x2db)),0x1;}if(!_0x427ca2['yes']){if(!isInteractive())return console[_0x22d51f(0x239)](a42_0x48c95c['red']('\x0aError:'),_0x22d51f(0x285)),console[_0x22d51f(0x239)](a42_0x48c95c['dim'](_0x22d51f(0x246))),0x1;const _0x52de72=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x2ec7e8?_0x22d51f(0x245):_0x22d51f(0x183))+'\x20'+_0x229daf+'?');if(!_0x52de72)return console[_0x22d51f(0x239)](a42_0x48c95c['yellow'](_0x22d51f(0x299))),0x1;}let _0xe26113;_0x2ec7e8?_0xe26113=await withSpinner('Retrying\x20session...',()=>_0x286fc1[_0x22d51f(0x2aa)]['retrySession'](_0x229daf,{'fromTask':_0x4d6991,'retryParams':_0x5eafc5}),{'verbose':_0x427ca2[_0x22d51f(0x2d1)]}):_0xe26113=await withSpinner(_0x22d51f(0x216),()=>_0x286fc1[_0x22d51f(0x2aa)][_0x22d51f(0x32f)](_0x229daf,{'resumeFrom':_0x4ea455,'retryParams':_0x5eafc5,'force':_0x15fe96}),{'verbose':_0x427ca2[_0x22d51f(0x2d1)]});const _0x1e72d5=_0xe26113[_0x22d51f(0x2c9)];return console[_0x22d51f(0x239)](_0x22d51f(0x2d8)),console[_0x22d51f(0x239)](_0x22d51f(0x2e7)+_0x1e72d5[_0x22d51f(0x2cb)]),console[_0x22d51f(0x239)](_0x22d51f(0x2b8)+_0x1e72d5['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x22c);['description']=a42_0x3bd9b9(0x1e7);async[a42_0x3bd9b9(0x1a9)](_0x565d81){const _0x5b1434=a42_0x3bd9b9,{options:_0x2bdac9,args:_0x560eb0,tdx:_0x5d0f9c}=_0x565d81;let _0x3430ff=_0x560eb0[0x0];if(!_0x3430ff){const _0x5a1266=this[_0x5b1434(0x201)]([],_0x2bdac9),_0x27ed79=await withSpinner(_0x5b1434(0x286),()=>_0x5d0f9c['workflow']['workflows'](_0x5a1266,{'limit':_0x2bdac9[_0x5b1434(0x190)]}),{'verbose':_0x2bdac9['verbose']}),_0x435bdd=_0x27ed79[_0x5b1434(0x2c9)];if(_0x435bdd[_0x5b1434(0x1c2)]===0x0)return console[_0x5b1434(0x239)](_0x5b1434(0x219)),!_0x5a1266&&console[_0x5b1434(0x239)](a42_0x48c95c[_0x5b1434(0x1b5)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x4d546b=_0x435bdd[_0x5b1434(0x262)](_0x261da4=>({'title':_0x261da4[_0x5b1434(0x1f7)]?.[_0x5b1434(0x30f)]+'.'+_0x261da4[_0x5b1434(0x30f)],'value':_0x261da4['project']?.[_0x5b1434(0x30f)]+'.'+_0x261da4['name'],'description':_0x261da4[_0x5b1434(0x2f0)]?_0x5b1434(0x227)+_0x261da4['revision']:undefined})),_0x23ad45=await a42_0x1933bf({'type':_0x5b1434(0x248),'name':_0x5b1434(0x2aa),'message':_0x5b1434(0x2ba),'choices':_0x4d546b});if(!_0x23ad45[_0x5b1434(0x2aa)])return 0x1;_0x3430ff=_0x23ad45[_0x5b1434(0x2aa)];}if(!_0x3430ff[_0x5b1434(0x292)]('.')){const _0x58c17e=this['resolveProject']([],_0x2bdac9);if(_0x58c17e)_0x3430ff=_0x58c17e+'.'+_0x3430ff;else return console[_0x5b1434(0x239)](a42_0x48c95c[_0x5b1434(0x196)](_0x5b1434(0x215)),_0x5b1434(0x274)),console['error'](a42_0x48c95c[_0x5b1434(0x1b5)](_0x5b1434(0x26d))),0x1;}const _0xf6eac8=_0x2bdac9[_0x5b1434(0x1d9)],_0x5cab15=_0x2bdac9[_0x5b1434(0x29a)],_0x1803b4={};if(_0xf6eac8&&Array[_0x5b1434(0x2a0)](_0xf6eac8))for(const _0x3230ec of _0xf6eac8){const _0x498413=_0x3230ec[_0x5b1434(0x181)]('=');if(_0x498413===-0x1)return console['error'](_0x5b1434(0x29b)+_0x3230ec),console[_0x5b1434(0x239)](_0x5b1434(0x1c5)),0x1;const _0x30ec7b=_0x3230ec[_0x5b1434(0x297)](0x0,_0x498413),_0x502717=_0x3230ec[_0x5b1434(0x297)](_0x498413+0x1);try{_0x1803b4[_0x30ec7b]=JSON[_0x5b1434(0x2c8)](_0x502717);}catch{_0x1803b4[_0x30ec7b]=_0x502717;}}_0x2bdac9[_0x5b1434(0x2d1)]&&(console[_0x5b1434(0x239)](_0x5b1434(0x217)+_0x3430ff),Object[_0x5b1434(0x271)](_0x1803b4)['length']>0x0&&console['error'](_0x5b1434(0x31a)+JSON['stringify'](_0x1803b4)),_0x5cab15&&console[_0x5b1434(0x239)](_0x5b1434(0x1e9)+_0x5cab15));const _0x4c19a0=await withSpinner('Starting\x20workflow\x20run...',()=>_0x5d0f9c['workflow'][_0x5b1434(0x267)](_0x3430ff,_0x1803b4,{'sessionTime':_0x5cab15}),{'verbose':_0x2bdac9[_0x5b1434(0x2d1)]}),_0x44df37=_0x4c19a0['data'];console[_0x5b1434(0x239)]('✔\x20Workflow\x20run\x20started'),console[_0x5b1434(0x239)](_0x5b1434(0x1ca)+_0x44df37['id']),console[_0x5b1434(0x239)]('\x20\x20Session\x20ID:\x20'+_0x44df37[_0x5b1434(0x277)]),console['error'](_0x5b1434(0x18e)+_0x44df37[_0x5b1434(0x1f7)]?.[_0x5b1434(0x30f)]),console[_0x5b1434(0x239)](_0x5b1434(0x1d4)+_0x44df37[_0x5b1434(0x2aa)]?.[_0x5b1434(0x30f)]);if(_0x44df37[_0x5b1434(0x1f7)]?.['id']&&_0x44df37['sessionId']&&_0x44df37['id']){const _0x2f1fea=_0x2bdac9['site'],_0x577077=getConsoleUrl(_0x2f1fea,_0x5b1434(0x2e4)+_0x44df37[_0x5b1434(0x1f7)]['id']+_0x5b1434(0x22a)+_0x44df37[_0x5b1434(0x277)]+'/attempt/'+_0x44df37['id']);console[_0x5b1434(0x239)](_0x5b1434(0x1fc)+a42_0x48c95c[_0x5b1434(0x2dd)](_0x577077));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x31f);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x19b);async[a42_0x3bd9b9(0x1a9)](_0xeb96e3){const _0x492ce9=a42_0x3bd9b9,{options:_0x32cb01,args:_0x4c78f7,tdx:_0x22b18c}=_0xeb96e3,_0x302ef4=_0x4c78f7[0x0],_0x389f73=_0x4c78f7[0x1]||'.';if(!_0x302ef4)return console['error'](_0x492ce9(0x1a0)),console[_0x492ce9(0x239)](_0x492ce9(0x1c7)),0x1;const _0x4ca46a=_0x32cb01['revision'];_0x32cb01[_0x492ce9(0x2d1)]&&(console['error'](_0x492ce9(0x2b9)+_0x302ef4),console[_0x492ce9(0x239)](_0x492ce9(0x253)+_0x389f73),_0x4ca46a&&console[_0x492ce9(0x239)]('Revision:\x20'+_0x4ca46a));const _0x51619e=await withSpinner(_0x492ce9(0x293)+_0x302ef4+_0x492ce9(0x2cd),()=>_0x22b18c[_0x492ce9(0x2aa)][_0x492ce9(0x321)](_0x302ef4,_0x389f73,{'revision':_0x4ca46a}),{'verbose':_0x32cb01[_0x492ce9(0x2d1)]}),_0x1a5f24=_0x51619e[_0x492ce9(0x2c9)];return console['error'](_0x492ce9(0x191)+_0x1a5f24[_0x492ce9(0x24c)]),console['error'](_0x492ce9(0x2c4)+_0x1a5f24[_0x492ce9(0x2f0)]),console[_0x492ce9(0x239)](_0x492ce9(0x268)+_0x1a5f24[_0x492ce9(0x2bb)]),console['error']('\x20\x20Location:\x20'+_0x389f73+'/'+_0x1a5f24['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x2c0);[a42_0x3bd9b9(0x1cb)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async['execute'](_0x316321){const _0x4524c3=a42_0x3bd9b9,{options:_0xeedbbf,args:_0xc357df,tdx:_0x5d696d}=_0x316321;let _0x2276a1='.',_0x27ca6c=_0xeedbbf[_0x4524c3(0x30f)];if(_0xc357df[0x0]){const {promises:_0x17ce4f}=await import('fs');try{const _0x5baeca=await _0x17ce4f[_0x4524c3(0x189)](_0xc357df[0x0]);if(_0x5baeca[_0x4524c3(0x21c)]())_0x2276a1=_0xc357df[0x0];else return console[_0x4524c3(0x239)]('Error:\x20'+_0xc357df[0x0]+_0x4524c3(0x1f1)),0x1;}catch{_0x27ca6c=_0xc357df[0x0],_0x2276a1='.';}}const _0x1a481f=_0xeedbbf[_0x4524c3(0x2f0)],_0x1d9101=_0xeedbbf[_0x4524c3(0x282)];_0xeedbbf[_0x4524c3(0x2d1)]&&(console[_0x4524c3(0x239)](_0x4524c3(0x261)+_0x2276a1),_0x27ca6c&&console[_0x4524c3(0x239)](_0x4524c3(0x2b0)+_0x27ca6c),_0x1a481f&&console['error']('Revision:\x20'+_0x1a481f),_0x1d9101&&console['error'](_0x4524c3(0x1ce)));const _0x154943=await withSpinner(_0x4524c3(0x1ae),()=>_0x5d696d[_0x4524c3(0x2aa)][_0x4524c3(0x2e5)](_0x2276a1,{'projectName':_0x27ca6c,'revision':_0x1a481f,'skipValidation':_0x1d9101}),{'verbose':_0xeedbbf[_0x4524c3(0x2d1)]}),_0x4fd520=_0x154943['data'];return console[_0x4524c3(0x239)](_0x4524c3(0x2e9)+_0x4fd520[_0x4524c3(0x24c)]),console[_0x4524c3(0x239)](_0x4524c3(0x2b7)+_0x4fd520[_0x4524c3(0x1df)]),console[_0x4524c3(0x239)]('\x20\x20Revision:\x20'+_0x4fd520[_0x4524c3(0x2f0)]),await this[_0x4524c3(0x1c3)](_0x5d696d,_0x4fd520['projectName'],_0xeedbbf[_0x4524c3(0x249)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x1a5);[a42_0x3bd9b9(0x1cb)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async['execute'](_0x42ac3d){const _0x575f70=a42_0x3bd9b9,{options:_0x4ca51b,args:_0x563f1d,tdx:_0xabbff7}=_0x42ac3d,_0x288be5=_0x563f1d[0x0],_0x1082c2=_0x563f1d[0x1];if(!_0x288be5)return console[_0x575f70(0x239)](a42_0x48c95c[_0x575f70(0x196)](_0x575f70(0x215)),'Project\x20name\x20is\x20required'),console[_0x575f70(0x239)](a42_0x48c95c['dim']('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x2db4da=_0x4ca51b[_0x575f70(0x2f0)];_0x4ca51b[_0x575f70(0x2d1)]&&(console['error'](_0x575f70(0x2b9)+_0x288be5),_0x1082c2&&console[_0x575f70(0x239)]('Target\x20directory:\x20'+_0x1082c2),_0x2db4da&&console[_0x575f70(0x239)]('Revision:\x20'+_0x2db4da),_0x4ca51b['dryRun']&&console[_0x575f70(0x239)]('Dry\x20run:\x20yes'));const _0x421d22=await withSpinner(_0x575f70(0x2e6)+_0x288be5+_0x575f70(0x2cd),()=>_0xabbff7[_0x575f70(0x2aa)][_0x575f70(0x313)](_0x288be5,{'targetDir':_0x1082c2,'revision':_0x2db4da}),{'verbose':_0x4ca51b[_0x575f70(0x2d1)]}),_0xb7d90d=_0x421d22[_0x575f70(0x2c9)];_0xb7d90d[_0x575f70(0x32b)]?console['error'](_0x575f70(0x234)+_0xb7d90d[_0x575f70(0x24c)]):console[_0x575f70(0x239)](_0x575f70(0x1bf)+_0xb7d90d[_0x575f70(0x24c)]);console[_0x575f70(0x239)]('\x20\x20Revision:\x20'+_0xb7d90d['revision']),console['error'](_0x575f70(0x2f9)+(a42_0x50631b[_0x575f70(0x19d)](process[_0x575f70(0x252)](),_0xb7d90d[_0x575f70(0x2a2)])||'.')),console['error'](_0x575f70(0x24a)+a42_0x48c95c[_0x575f70(0x279)]('+'+_0xb7d90d[_0x575f70(0x212)][_0x575f70(0x1e2)]+_0x575f70(0x21d))+',\x20'+(a42_0x48c95c[_0x575f70(0x29e)]('~'+_0xb7d90d[_0x575f70(0x212)]['modified']+'\x20modified')+',\x20')+(a42_0x48c95c['red']('-'+_0xb7d90d[_0x575f70(0x212)][_0x575f70(0x296)]+_0x575f70(0x2af))+',\x20')+(''+a42_0x48c95c[_0x575f70(0x1b5)](_0xb7d90d[_0x575f70(0x212)][_0x575f70(0x199)]+'\x20unchanged')));for(const _0x3ea70d of _0xb7d90d[_0x575f70(0x21e)]){_0x3ea70d[_0x575f70(0x1f0)]===_0x575f70(0x188)&&_0x3ea70d[_0x575f70(0x244)]&&(console[_0x575f70(0x239)]('\x0a'+a42_0x48c95c[_0x575f70(0x2dd)]('---\x20'+_0x3ea70d[_0x575f70(0x205)])),console['error'](_0x3ea70d[_0x575f70(0x244)]));}if(!_0xb7d90d[_0x575f70(0x309)])return saveSessionContext({'workflow_project':_0xb7d90d[_0x575f70(0x24c)]},_0x4ca51b['session']),console[_0x575f70(0x239)](a42_0x48c95c[_0x575f70(0x279)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x575f70(0x239)](a42_0x48c95c[_0x575f70(0x1b5)](_0x575f70(0x2ee)+_0xb7d90d[_0x575f70(0x24c)])),0x0;if(_0x4ca51b[_0x575f70(0x283)])return console[_0x575f70(0x239)](a42_0x48c95c[_0x575f70(0x29e)](_0x575f70(0x226))),0x0;if(!_0x4ca51b[_0x575f70(0x202)]){if(!isInteractive())return console['error'](a42_0x48c95c[_0x575f70(0x196)](_0x575f70(0x187)),_0x575f70(0x285)),console[_0x575f70(0x239)](a42_0x48c95c[_0x575f70(0x1b5)](_0x575f70(0x246))),0x1;const _0x25b0e5=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x25b0e5)return console['error'](a42_0x48c95c['yellow']('Cancelled'),_0x575f70(0x2fb)),0x1;}await withSpinner(_0x575f70(0x193),()=>_0xabbff7[_0x575f70(0x2aa)][_0x575f70(0x32c)](_0xb7d90d,{'revision':_0x2db4da}),{'verbose':_0x4ca51b[_0x575f70(0x2d1)]}),saveSessionContext({'workflow_project':_0xb7d90d[_0x575f70(0x24c)]},_0x4ca51b['session']),console['error'](a42_0x48c95c[_0x575f70(0x279)](_0x575f70(0x324)));const _0x2d28a4=a42_0x50631b[_0x575f70(0x19d)](process[_0x575f70(0x252)](),_0xb7d90d['targetDir'])||'.';return console['error'](a42_0x48c95c[_0x575f70(0x1b5)](_0x575f70(0x26f)+_0x2d28a4)),console['error'](a42_0x48c95c['dim'](_0x575f70(0x2ee)+_0xb7d90d[_0x575f70(0x24c)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a42_0x3bd9b9(0x278);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x27c);async[a42_0x3bd9b9(0x1a9)](_0x4a8afd){const _0x3c2675=a42_0x3bd9b9,{options:_0x586543,args:_0x13cd33,tdx:_0x29eda6}=_0x4a8afd,_0xe2269e=this[_0x3c2675(0x2fd)](_0x13cd33,_0x586543),_0x2f49b4=_0x586543[_0x3c2675(0x2f0)],_0x3bee3b=_0x586543['skipValidation'];_0x586543[_0x3c2675(0x2d1)]&&(_0xe2269e&&console[_0x3c2675(0x239)](_0x3c2675(0x1b3)+_0xe2269e),_0x2f49b4&&console[_0x3c2675(0x239)](_0x3c2675(0x2c7)+_0x2f49b4),_0x586543[_0x3c2675(0x283)]&&console[_0x3c2675(0x239)](_0x3c2675(0x210)),_0x3bee3b&&console['error'](_0x3c2675(0x1ce)));let _0x2b2404;try{_0x2b2404=await withSpinner('Analyzing\x20changes...',()=>_0x29eda6[_0x3c2675(0x2aa)]['preparePushProject']({'sourceDir':_0xe2269e,'revision':_0x2f49b4,'skipValidation':_0x3bee3b}),{'verbose':_0x586543[_0x3c2675(0x2d1)]});}catch(_0x5e9aab){if(_0x5e9aab instanceof Error&&_0x5e9aab[_0x3c2675(0x32e)][_0x3c2675(0x292)](_0x3c2675(0x222)))return console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x196)](_0x3c2675(0x215)),_0x3c2675(0x20b)),_0x586543[_0x3c2675(0x1a1)]?console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x1b5)]('Tip:\x20cd\x20to\x20workflows/'+_0x586543[_0x3c2675(0x1a1)]+_0x3c2675(0x28b)+_0x586543[_0x3c2675(0x1a1)]+'\x27')):console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x1b5)](_0x3c2675(0x233))),0x1;throw _0x5e9aab;}const _0x979268=_0x2b2404[_0x3c2675(0x2c9)];console['error'](_0x3c2675(0x18d)+_0x979268[_0x3c2675(0x24c)]),console[_0x3c2675(0x239)]('\x20\x20Source:\x20'+_0x979268['sourceDir']),console[_0x3c2675(0x239)](_0x3c2675(0x2c4)+_0x979268[_0x3c2675(0x2f0)]),console[_0x3c2675(0x239)](_0x3c2675(0x24a)+a42_0x48c95c[_0x3c2675(0x279)]('+'+_0x979268['summary']['new']+_0x3c2675(0x21d))+',\x20'+(a42_0x48c95c[_0x3c2675(0x29e)]('~'+_0x979268['summary'][_0x3c2675(0x188)]+_0x3c2675(0x28e))+',\x20')+(a42_0x48c95c[_0x3c2675(0x196)]('-'+_0x979268[_0x3c2675(0x212)][_0x3c2675(0x296)]+_0x3c2675(0x2af))+',\x20')+(''+a42_0x48c95c['dim'](_0x979268[_0x3c2675(0x212)][_0x3c2675(0x199)]+_0x3c2675(0x1c8))));for(const _0x467a9c of _0x979268[_0x3c2675(0x21e)]){_0x467a9c[_0x3c2675(0x1f0)]===_0x3c2675(0x188)&&_0x467a9c['diff']&&(console['error']('\x0a'+a42_0x48c95c['cyan'](_0x3c2675(0x314)+_0x467a9c[_0x3c2675(0x205)])),console[_0x3c2675(0x239)](_0x467a9c[_0x3c2675(0x244)]));}if(!_0x979268[_0x3c2675(0x309)])return console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x279)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x3c2675(0x1c3)](_0x29eda6,_0x979268['projectName'],_0x586543[_0x3c2675(0x249)]),0x0;if(_0x586543[_0x3c2675(0x283)])return console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x29e)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x586543[_0x3c2675(0x202)]){if(!isInteractive())return console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x196)]('\x0aError:'),_0x3c2675(0x285)),console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x1b5)](_0x3c2675(0x246))),0x1;const _0x293687=await confirmKey(_0x3c2675(0x1e5));if(!_0x293687)return console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x29e)](_0x3c2675(0x299)),'-\x20nothing\x20pushed'),0x1;}const _0x122410=await withSpinner(_0x3c2675(0x2bf),()=>_0x29eda6[_0x3c2675(0x2aa)]['executePushProject'](_0x979268),{'verbose':_0x586543[_0x3c2675(0x2d1)]}),_0x2c0392=_0x122410[_0x3c2675(0x2c9)];return console[_0x3c2675(0x239)](a42_0x48c95c[_0x3c2675(0x279)](_0x3c2675(0x250))),console[_0x3c2675(0x239)](_0x3c2675(0x2b7)+_0x2c0392[_0x3c2675(0x1df)]),console[_0x3c2675(0x239)](_0x3c2675(0x2c4)+_0x2c0392[_0x3c2675(0x2f0)]),await this[_0x3c2675(0x1c3)](_0x29eda6,_0x2c0392[_0x3c2675(0x24c)],_0x586543[_0x3c2675(0x249)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']='workflow:clone';['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a42_0x3bd9b9(0x1a9)](_0x52a399){const _0x3b7cfa=a42_0x3bd9b9,{options:_0xd28724,args:_0x29edbc,tdx:_0x5b5403}=_0x52a399,_0x86c13c=this['resolveProjectDir'](_0x29edbc,_0xd28724),_0xc39ce2=_0xd28724[_0x3b7cfa(0x30f)],_0x624560=_0xd28724[_0x3b7cfa(0x2f0)],_0x5c3790=_0xd28724[_0x3b7cfa(0x282)];if(!_0x86c13c)return console['error'](a42_0x48c95c[_0x3b7cfa(0x196)]('Error:'),_0x3b7cfa(0x1ed)),console[_0x3b7cfa(0x239)](a42_0x48c95c[_0x3b7cfa(0x1b5)](_0x3b7cfa(0x1e6))),console[_0x3b7cfa(0x239)](a42_0x48c95c[_0x3b7cfa(0x1b5)](_0x3b7cfa(0x254))),0x1;if(!_0xc39ce2)return console[_0x3b7cfa(0x239)](a42_0x48c95c[_0x3b7cfa(0x196)](_0x3b7cfa(0x215)),_0x3b7cfa(0x1a2)),console[_0x3b7cfa(0x239)](a42_0x48c95c['dim'](_0x3b7cfa(0x1e6))),0x1;_0xd28724['verbose']&&(console[_0x3b7cfa(0x239)](_0x3b7cfa(0x1b3)+_0x86c13c),console['error']('New\x20project\x20name:\x20'+_0xc39ce2),_0x624560&&console[_0x3b7cfa(0x239)](_0x3b7cfa(0x2c7)+_0x624560),_0xd28724['dryRun']&&console[_0x3b7cfa(0x239)]('Dry\x20run:\x20yes'),_0x5c3790&&console[_0x3b7cfa(0x239)]('Validation:\x20skipped'));const _0x2df1d9=await withSpinner('Analyzing\x20project...',()=>_0x5b5403[_0x3b7cfa(0x2aa)][_0x3b7cfa(0x207)](_0x86c13c,_0xc39ce2,{'revision':_0x624560,'skipValidation':_0x5c3790}),{'verbose':_0xd28724[_0x3b7cfa(0x2d1)]}),_0x106e61=_0x2df1d9['data'];console[_0x3b7cfa(0x239)](_0x3b7cfa(0x306)+_0x106e61[_0x3b7cfa(0x28d)]);_0x106e61[_0x3b7cfa(0x1a8)]&&console['error']('Source\x20project:\x20'+_0x106e61[_0x3b7cfa(0x1a8)]);console[_0x3b7cfa(0x239)](_0x3b7cfa(0x17f)+_0x106e61['newProjectName']),console[_0x3b7cfa(0x239)](_0x3b7cfa(0x2c7)+_0x106e61[_0x3b7cfa(0x2f0)]),console['error'](_0x3b7cfa(0x255)+_0x106e61[_0x3b7cfa(0x24b)]);_0x106e61[_0x3b7cfa(0x2b4)]&&(console[_0x3b7cfa(0x239)](a42_0x48c95c['yellow'](_0x3b7cfa(0x24f)+_0x106e61[_0x3b7cfa(0x22b)]+_0x3b7cfa(0x310)+_0x106e61[_0x3b7cfa(0x301)]+')')),console[_0x3b7cfa(0x239)](a42_0x48c95c[_0x3b7cfa(0x29e)](_0x3b7cfa(0x23e))));if(_0xd28724['dryRun'])return console['error'](a42_0x48c95c[_0x3b7cfa(0x29e)](_0x3b7cfa(0x263))),0x0;if(!_0xd28724[_0x3b7cfa(0x202)]){if(!isInteractive())return console[_0x3b7cfa(0x239)](a42_0x48c95c[_0x3b7cfa(0x196)](_0x3b7cfa(0x187)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a42_0x48c95c[_0x3b7cfa(0x1b5)](_0x3b7cfa(0x246))),0x1;const _0x26b1c1=_0x106e61[_0x3b7cfa(0x1a8)]||a42_0x50631b['basename'](_0x86c13c),_0x542992=_0x106e61[_0x3b7cfa(0x2b4)]?_0x3b7cfa(0x25c)+_0xc39ce2+_0x3b7cfa(0x1ea):_0x3b7cfa(0x25b)+_0x26b1c1+_0x3b7cfa(0x21a)+_0xc39ce2+'\x22?',_0x2a5e0b=await confirmKey(_0x542992);if(!_0x2a5e0b)return console[_0x3b7cfa(0x239)](a42_0x48c95c[_0x3b7cfa(0x29e)](_0x3b7cfa(0x299))),0x1;}const _0x5b58f9=await withSpinner(_0x106e61[_0x3b7cfa(0x2b4)]?'Updating\x20'+_0xc39ce2+_0x3b7cfa(0x2cd):_0x3b7cfa(0x23d)+_0xc39ce2+_0x3b7cfa(0x2cd),()=>_0x5b5403[_0x3b7cfa(0x2aa)]['executeCloneProject'](_0x106e61),{'verbose':_0xd28724[_0x3b7cfa(0x2d1)]}),_0x3aa8c6=_0x5b58f9[_0x3b7cfa(0x2c9)];return console[_0x3b7cfa(0x239)](a42_0x48c95c['green'](_0x106e61[_0x3b7cfa(0x2b4)]?_0x3b7cfa(0x2bd):_0x3b7cfa(0x1eb))),console[_0x3b7cfa(0x239)](_0x3b7cfa(0x18e)+_0x3aa8c6[_0x3b7cfa(0x22b)]),console['error'](_0x3b7cfa(0x2b7)+_0x3aa8c6['newProjectId']),console[_0x3b7cfa(0x239)](_0x3b7cfa(0x2c4)+_0x3aa8c6[_0x3b7cfa(0x2f0)]),await this[_0x3b7cfa(0x1c3)](_0x5b5403,_0x3aa8c6['newProjectName'],_0xd28724['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x198);['description']=a42_0x3bd9b9(0x2ec);async[a42_0x3bd9b9(0x1a9)](_0x2b3210){const _0x43a894=a42_0x3bd9b9,{options:_0x33b968,args:_0x1cdf10,tdx:_0x3d5247}=_0x2b3210,_0x82902f=_0x1cdf10[0x0];if(!_0x82902f)return console[_0x43a894(0x239)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x43a894(0x239)](_0x43a894(0x19c)),0x1;_0x33b968[_0x43a894(0x2d1)]&&console['error'](_0x43a894(0x2b9)+_0x82902f);if(!_0x33b968[_0x43a894(0x202)]){if(!isInteractive())return console[_0x43a894(0x239)](a42_0x48c95c['red']('\x0aError:'),_0x43a894(0x285)),console[_0x43a894(0x239)](a42_0x48c95c[_0x43a894(0x1b5)](_0x43a894(0x246))),0x1;const _0x45497b=await confirmKey(_0x43a894(0x259)+_0x82902f+_0x43a894(0x26e));if(!_0x45497b)return console[_0x43a894(0x239)](a42_0x48c95c[_0x43a894(0x29e)](_0x43a894(0x299))),0x1;}const _0x2212f1=await withSpinner(_0x43a894(0x23a)+_0x82902f+'...',()=>_0x3d5247['workflow'][_0x43a894(0x1cd)](_0x82902f),{'verbose':_0x33b968[_0x43a894(0x2d1)]}),_0x19b2ee=_0x2212f1['data'];return console[_0x43a894(0x239)](_0x43a894(0x1c0)+_0x19b2ee[_0x43a894(0x24c)]),console[_0x43a894(0x239)](_0x43a894(0x2b7)+_0x19b2ee[_0x43a894(0x1df)]),0x0;}}export function parseKeyValue(_0x25c050){const _0x16d38f=a42_0x3bd9b9,_0x5bc80e=_0x25c050[_0x16d38f(0x181)]('=');if(_0x5bc80e===-0x1)throw new Error(_0x16d38f(0x243)+_0x25c050+_0x16d38f(0x275));const _0x116675=_0x25c050[_0x16d38f(0x297)](0x0,_0x5bc80e),_0x220c4d=_0x25c050[_0x16d38f(0x297)](_0x5bc80e+0x1);if(!_0x116675)throw new Error(_0x16d38f(0x1d6));return{'key':_0x116675,'value':_0x220c4d};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x291);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x2ae);async[a42_0x3bd9b9(0x1a9)](_0x103fd4){const _0x2fb820=a42_0x3bd9b9,{options:_0x3f218f,args:_0x4bee08,tdx:_0x2371a4}=_0x103fd4,_0x1e5f78=this['requireProject'](_0x4bee08,_0x3f218f);if(!_0x1e5f78)return 0x1;_0x3f218f[_0x2fb820(0x2d1)]&&console[_0x2fb820(0x239)](_0x2fb820(0x2b9)+_0x1e5f78);const _0x14a863=await withSpinner(_0x2fb820(0x2d2),()=>_0x2371a4[_0x2fb820(0x2aa)]['listSecrets'](_0x1e5f78),{'verbose':_0x3f218f[_0x2fb820(0x2d1)]}),{secrets:_0x527aa4}=_0x14a863['data'];return console[_0x2fb820(0x239)](_0x2fb820(0x1f8)+_0x527aa4[_0x2fb820(0x1c2)]+_0x2fb820(0x208)+(_0x527aa4[_0x2fb820(0x1c2)]!==0x1?'s':'')),await handleSDKOutput(_0x527aa4,_0x3f218f),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x326);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x323);async[a42_0x3bd9b9(0x1a9)](_0x3ba7e9){const _0x3a0a24=a42_0x3bd9b9,{options:_0x316bbf,args:_0x1fa561,tdx:_0x25f10c}=_0x3ba7e9;let _0x1fe099,_0x3c6872;if(_0x1fa561[_0x3a0a24(0x1c2)]>=0x2)_0x1fe099=_0x1fa561[0x0],_0x3c6872=_0x1fa561[0x1];else{if(_0x1fa561[_0x3a0a24(0x1c2)]===0x1&&_0x316bbf[_0x3a0a24(0x1a1)])_0x1fe099=_0x316bbf[_0x3a0a24(0x1a1)],_0x3c6872=_0x1fa561[0x0];else return _0x1fa561[_0x3a0a24(0x1c2)]===0x1?(console[_0x3a0a24(0x239)](_0x3a0a24(0x1a0)),console[_0x3a0a24(0x239)](_0x3a0a24(0x26d)),0x1):(console['error'](_0x3a0a24(0x213)),console[_0x3a0a24(0x239)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x11a38c,_0x1669d3;try{({key:_0x11a38c,value:_0x1669d3}=parseKeyValue(_0x3c6872));}catch(_0x4f2810){return _0x4f2810 instanceof Error&&console[_0x3a0a24(0x239)](a42_0x48c95c[_0x3a0a24(0x196)](_0x3a0a24(0x215)),_0x4f2810[_0x3a0a24(0x32e)]),0x1;}_0x316bbf[_0x3a0a24(0x2d1)]&&(console[_0x3a0a24(0x239)](_0x3a0a24(0x2b9)+_0x1fe099),console['error'](_0x3a0a24(0x1b6)+_0x11a38c));const _0x3ea60e=await withSpinner('Setting\x20secret...',()=>_0x25f10c[_0x3a0a24(0x2aa)]['setSecret'](_0x1fe099,_0x11a38c,_0x1669d3),{'verbose':_0x316bbf[_0x3a0a24(0x2d1)]}),_0x320ca7=_0x3ea60e[_0x3a0a24(0x2c9)];return console[_0x3a0a24(0x239)](_0x3a0a24(0x2b3)+_0x320ca7[_0x3a0a24(0x1c4)]+_0x3a0a24(0x2a1)+_0x320ca7[_0x3a0a24(0x24c)]+'\x27'),(_0x316bbf['json']||_0x316bbf[_0x3a0a24(0x1aa)])&&await handleSingleObjectOutput(_0x320ca7,_0x316bbf),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x2bc);[a42_0x3bd9b9(0x1cb)]=a42_0x3bd9b9(0x288);async['execute'](_0x1c7bb5){const _0x34c5c1=a42_0x3bd9b9,{options:_0x2ca4a8,args:_0x83f62f,tdx:_0x1093c8}=_0x1c7bb5;let _0x366302,_0x227554;if(_0x83f62f[_0x34c5c1(0x1c2)]>=0x2)_0x366302=_0x83f62f[0x0],_0x227554=_0x83f62f[0x1];else{if(_0x83f62f[_0x34c5c1(0x1c2)]===0x1&&_0x2ca4a8[_0x34c5c1(0x1a1)])_0x366302=_0x2ca4a8[_0x34c5c1(0x1a1)],_0x227554=_0x83f62f[0x0];else return _0x83f62f['length']===0x1?(console[_0x34c5c1(0x239)](_0x34c5c1(0x1a0)),console[_0x34c5c1(0x239)](_0x34c5c1(0x26d)),0x1):(console[_0x34c5c1(0x239)](_0x34c5c1(0x220)),console[_0x34c5c1(0x239)](_0x34c5c1(0x2b1)),0x1);}_0x2ca4a8[_0x34c5c1(0x2d1)]&&(console[_0x34c5c1(0x239)](_0x34c5c1(0x2b9)+_0x366302),console[_0x34c5c1(0x239)](_0x34c5c1(0x1b6)+_0x227554));if(!_0x2ca4a8[_0x34c5c1(0x202)]){if(!isInteractive())return console['error'](a42_0x48c95c[_0x34c5c1(0x196)](_0x34c5c1(0x187)),_0x34c5c1(0x285)),console[_0x34c5c1(0x239)](a42_0x48c95c['dim'](_0x34c5c1(0x246))),0x1;const _0xb5635d=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x227554+'\x27\x20from\x20project\x20\x27'+_0x366302+'\x27?');if(!_0xb5635d)return console['error'](a42_0x48c95c[_0x34c5c1(0x29e)](_0x34c5c1(0x299))),0x1;}const _0x1b9c95=await withSpinner('Deleting\x20secret...',()=>_0x1093c8['workflow'][_0x34c5c1(0x18a)](_0x366302,_0x227554),{'verbose':_0x2ca4a8['verbose']}),_0x476a4a=_0x1b9c95['data'];return console[_0x34c5c1(0x239)](_0x34c5c1(0x2b3)+_0x476a4a[_0x34c5c1(0x1c4)]+_0x34c5c1(0x25a)+_0x476a4a['projectName']+'\x27'),(_0x2ca4a8['json']||_0x2ca4a8[_0x34c5c1(0x1aa)])&&await handleSingleObjectOutput(_0x476a4a,_0x2ca4a8),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(_0xeb54bc){const _0x149155=a42_0x3bd9b9,_0x29f163=Math[_0x149155(0x1e4)](_0xeb54bc/0x3e8),_0x84b6e1=Math[_0x149155(0x1e4)](_0x29f163/0x3c),_0x5ad25f=Math['floor'](_0x84b6e1/0x3c),_0x21111c=Math[_0x149155(0x1e4)](_0x5ad25f/0x18);if(_0x21111c>0x0){const _0xe8b529=_0x5ad25f%0x18;return _0xe8b529>0x0?_0x21111c+'d\x20'+_0xe8b529+'h':_0x21111c+'d';}else{if(_0x5ad25f>0x0){const _0x32aef7=_0x84b6e1%0x3c;return _0x32aef7>0x0?_0x5ad25f+'h\x20'+_0x32aef7+'m':_0x5ad25f+'h';}else{if(_0x84b6e1>0x0){const _0x428f5c=_0x29f163%0x3c;return _0x428f5c>0x0?_0x84b6e1+'m\x20'+_0x428f5c+'s':_0x84b6e1+'m';}else return _0x29f163+'s';}}}function formatTimestamp(_0x5c43f7,_0x5a1fd5){const _0x477af4=a42_0x3bd9b9,_0x4082d0=new Date(_0x5c43f7),_0x2a0900=String(_0x4082d0[_0x477af4(0x19f)]())[_0x477af4(0x302)](0x2,'0'),_0x375ea4=String(_0x4082d0['getMinutes']())[_0x477af4(0x302)](0x2,'0'),_0x4f9cf2=_0x2a0900+':'+_0x375ea4,_0x10d1bd=_0x4082d0['getFullYear']()===_0x5a1fd5[_0x477af4(0x2df)]()&&_0x4082d0[_0x477af4(0x209)]()===_0x5a1fd5[_0x477af4(0x209)]()&&_0x4082d0[_0x477af4(0x294)]()===_0x5a1fd5['getDate']();if(_0x10d1bd)return _0x4f9cf2;else{const _0x2797a1=String(_0x4082d0[_0x477af4(0x209)]()+0x1)['padStart'](0x2,'0'),_0x2c8605=String(_0x4082d0[_0x477af4(0x294)]())[_0x477af4(0x302)](0x2,'0');return _0x2797a1+'-'+_0x2c8605+'\x20'+_0x4f9cf2;}}function formatDate(_0x4bdf13){const _0x3a9e4d=a42_0x3bd9b9,_0x58479f=_0x4bdf13[_0x3a9e4d(0x2df)](),_0x15cd64=String(_0x4bdf13['getMonth']()+0x1)['padStart'](0x2,'0'),_0x10d0ec=String(_0x4bdf13[_0x3a9e4d(0x294)]())[_0x3a9e4d(0x302)](0x2,'0');return _0x58479f+'-'+_0x15cd64+'-'+_0x10d0ec;}function getTaskStateIcon(_0x28b045){const _0x3d0684={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x3d0684[_0x28b045]||'⚪';}function getBarChar(_0x38a11b){const _0x2b97a5=a42_0x3bd9b9;return _0x38a11b===_0x2b97a5(0x239)||_0x38a11b===_0x2b97a5(0x228)?'×':'─';}function getBarColor(_0x4f64ca){const _0x472256=a42_0x3bd9b9,_0x5e72d2={'success':a42_0x48c95c['green'],'error':a42_0x48c95c[_0x472256(0x196)],'group_error':a42_0x48c95c[_0x472256(0x196)],'running':a42_0x48c95c[_0x472256(0x2e1)],'blocked':a42_0x48c95c[_0x472256(0x29e)],'planned':a42_0x48c95c['dim'],'canceling':a42_0x48c95c[_0x472256(0x29e)]};return _0x5e72d2[_0x4f64ca]||a42_0x48c95c[_0x472256(0x2cc)];}function parseTaskName(_0x45021f){const _0x1ff120=a42_0x3bd9b9;let _0x4b69a6=_0x45021f[_0x1ff120(0x1ac)](/^\++/,'');const _0x4d096d=_0x4b69a6[_0x1ff120(0x21b)]('+'),_0x29f792=_0x4d096d[_0x1ff120(0x1c2)]>0x1?_0x4d096d['length']-0x2:0x0,_0x59df62=_0x4d096d[_0x4d096d[_0x1ff120(0x1c2)]-0x1]||_0x4b69a6;return{'level':_0x29f792,'name':'+'+_0x59df62};}function truncateTaskName(_0x3dd618,_0x2c1f09){const _0x19c811=a42_0x3bd9b9,_0x4bf96e=stringWidth(_0x3dd618);if(_0x4bf96e<=_0x2c1f09)return _0x3dd618;let _0x278da2=_0x3dd618;while(stringWidth(_0x278da2+'…')>_0x2c1f09&&_0x278da2[_0x19c811(0x1c2)]>0x0){_0x278da2=_0x278da2[_0x19c811(0x1de)](0x0,-0x1);}return _0x278da2+'…';}function calculateTimeScale(_0x40edfb,_0x248b25){const _0x517aba=a42_0x3bd9b9;return{'startTime':_0x40edfb[_0x517aba(0x195)],'endTime':_0x40edfb[_0x517aba(0x240)],'durationMs':_0x40edfb[_0x517aba(0x287)],'msPerChar':_0x40edfb[_0x517aba(0x287)]/_0x248b25};}function timeToPosition(_0x35eda7,_0x3125c5,_0x9699ce){const _0x59de11=a42_0x3bd9b9,_0x5f0096=_0x35eda7-_0x3125c5[_0x59de11(0x214)],_0x5b336a=Math[_0x59de11(0x1e4)](_0x5f0096/_0x3125c5[_0x59de11(0x28a)]);return Math[_0x59de11(0x303)](0x0,Math[_0x59de11(0x225)](_0x5b336a,_0x9699ce));}function renderTimeAxis(_0x3ed425,_0x33d313){const _0x143782=a42_0x3bd9b9,_0x599fba=Math[_0x143782(0x225)](TIMELINE_CONFIG[_0x143782(0x298)],Math[_0x143782(0x303)](TIMELINE_CONFIG[_0x143782(0x1d1)],Math[_0x143782(0x1e4)](_0x33d313/TIMELINE_CONFIG[_0x143782(0x1ec)]))),_0x30c081=_0x3ed425[_0x143782(0x23b)]/(_0x599fba-0x1),_0x45e37a=new Date(_0x3ed425[_0x143782(0x214)]),_0x3d3eea=[];for(let _0x1ea4cb=0x0;_0x1ea4cb<_0x599fba;_0x1ea4cb++){const _0x25f1cc=_0x3ed425[_0x143782(0x214)]+_0x1ea4cb*_0x30c081,_0x1026af=timeToPosition(_0x25f1cc,_0x3ed425,_0x33d313),_0x476482=formatTimestamp(_0x25f1cc,_0x45e37a);_0x3d3eea[_0x143782(0x2e5)]({'pos':_0x1026af,'text':_0x476482});}const _0x5347a5=new Array(_0x33d313)[_0x143782(0x2a3)]('\x20');let _0x1eebb4=-0x1;for(const {pos:_0x4c4a7e,text:_0x242ce8}of _0x3d3eea){let _0x2b1f62=Math[_0x143782(0x303)](0x0,_0x4c4a7e-Math['floor'](_0x242ce8[_0x143782(0x1c2)]/0x2));_0x2b1f62<=_0x1eebb4+TIMELINE_CONFIG[_0x143782(0x1bd)]&&(_0x2b1f62=_0x1eebb4+TIMELINE_CONFIG[_0x143782(0x1bd)]+0x1);_0x2b1f62+_0x242ce8['length']>_0x33d313&&(_0x2b1f62=_0x33d313-_0x242ce8[_0x143782(0x1c2)]);if(_0x2b1f62>=0x0&&_0x2b1f62+_0x242ce8['length']<=_0x33d313&&_0x2b1f62>_0x1eebb4){for(let _0x1c9d64=0x0;_0x1c9d64<_0x242ce8[_0x143782(0x1c2)];_0x1c9d64++){_0x5347a5[_0x2b1f62+_0x1c9d64]=_0x242ce8[_0x1c9d64];}_0x1eebb4=_0x2b1f62+_0x242ce8[_0x143782(0x1c2)]-0x1;}}return _0x5347a5[_0x143782(0x1c6)]('');}function renderTaskRow(_0x3e9569,_0x2fbe7b,_0x46efee,_0x5bd25a){const _0x30c4f2=a42_0x3bd9b9,{level:_0x2e236c,name:_0x54549a}=parseTaskName(_0x3e9569['name']),_0x2cdf10='\x20'[_0x30c4f2(0x1fe)](_0x2e236c),_0xb370d2=_0x3e9569[_0x30c4f2(0x1d7)]?'('+formatElapsed(_0x3e9569[_0x30c4f2(0x1d7)][_0x30c4f2(0x287)])+')':'',_0x56130f=stringWidth(_0xb370d2),_0x412de1=_0x2e236c*0x1,_0xef1fb5=_0x5bd25a-_0x412de1-_0x56130f-0x1,_0x93651a=truncateTaskName(_0x54549a,_0xef1fb5),_0x1945db=_0x2cdf10+_0x93651a,_0x58cf5f=stringWidth(_0x1945db),_0x52d2ae=_0x5bd25a-_0x58cf5f-_0x56130f,_0xf9ef28=_0x1945db+'\x20'['repeat'](Math[_0x30c4f2(0x303)](0x1,_0x52d2ae))+a42_0x48c95c[_0x30c4f2(0x1b5)](_0xb370d2),_0x5ea3cc=getTaskStateIcon(_0x3e9569['state']),_0x4758ba=new Array(_0x46efee)[_0x30c4f2(0x2a3)]('\x20');if(_0x3e9569['window']){const _0x1ec4d3=timeToPosition(_0x3e9569[_0x30c4f2(0x1d7)][_0x30c4f2(0x195)],_0x2fbe7b,_0x46efee),_0x394e14=timeToPosition(_0x3e9569['window'][_0x30c4f2(0x240)],_0x2fbe7b,_0x46efee),_0x1d55d1=getBarChar(_0x3e9569[_0x30c4f2(0x1e8)]),_0x434cfc=Math['max'](_0x1ec4d3+0x1,_0x394e14);for(let _0x20bc7e=_0x1ec4d3;_0x20bc7e<Math[_0x30c4f2(0x225)](_0x434cfc,_0x46efee);_0x20bc7e++){_0x4758ba[_0x20bc7e]=_0x1d55d1;}}const _0x1ea107=getBarColor(_0x3e9569[_0x30c4f2(0x1e8)]),_0x9549c9=_0x4758ba['map'](_0x87b18a=>_0x87b18a==='\x20'?'\x20':_0x1ea107(_0x87b18a))[_0x30c4f2(0x1c6)]('');return _0x5ea3cc+'\x20'+_0xf9ef28+'│'+_0x9549c9+'│';}function calculateStats(_0x565ef3){const _0x398dd0=a42_0x3bd9b9,_0x1ccbf4={'total':_0x565ef3[_0x398dd0(0x1c2)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x27c4bf of _0x565ef3){if(_0x27c4bf['state']===_0x398dd0(0x266))_0x1ccbf4[_0x398dd0(0x266)]++;else{if(_0x27c4bf['state']===_0x398dd0(0x239)||_0x27c4bf['state']===_0x398dd0(0x228))_0x1ccbf4[_0x398dd0(0x239)]++;else _0x27c4bf[_0x398dd0(0x1e8)]===_0x398dd0(0x235)?_0x1ccbf4[_0x398dd0(0x235)]++:_0x1ccbf4['pending']++;}}return _0x1ccbf4;}function formatStats(_0x1ba3fc){const _0x59688f=a42_0x3bd9b9;return[_0x59688f(0x19a)+_0x1ba3fc[_0x59688f(0x311)],'✅\x20'+_0x1ba3fc['success'],'❌\x20'+_0x1ba3fc['error'],_0x59688f(0x180)+_0x1ba3fc[_0x59688f(0x235)],'⏳\x20'+_0x1ba3fc[_0x59688f(0x25f)]][_0x59688f(0x1c6)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x3bd9b9(0x30f)]=a42_0x3bd9b9(0x1af);[a42_0x3bd9b9(0x1cb)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a42_0x3bd9b9(0x1a9)](_0x2ea8c7){const _0x18b5bd=a42_0x3bd9b9,{options:_0x199fb0,args:_0x445379,tdx:_0x2e49e5}=_0x2ea8c7;let _0x2cd210,_0x50ea2f,_0x1bf374=![];if(_0x445379[0x0]){if(_0x445379[0x0][_0x18b5bd(0x292)]('.')){const _0x5267fb=this['parseProjectWorkflowPattern'](_0x445379,_0x199fb0);if(!_0x5267fb)return 0x1;_0x2cd210=_0x5267fb[_0x18b5bd(0x24c)],_0x50ea2f=_0x5267fb['workflowName'];}else{_0x50ea2f=_0x445379[0x0],_0x2cd210=_0x199fb0[_0x18b5bd(0x1a1)];if(!_0x2cd210)return console[_0x18b5bd(0x239)](a42_0x48c95c[_0x18b5bd(0x196)](_0x18b5bd(0x215)),_0x18b5bd(0x315)),0x1;_0x1bf374=!![];}}else{const _0x440a66=this[_0x18b5bd(0x1d2)](_0x445379,_0x199fb0);if(!_0x440a66)return 0x1;_0x2cd210=_0x440a66[_0x18b5bd(0x24c)],_0x50ea2f=_0x440a66['workflowName'];}if(_0x199fb0[_0x18b5bd(0x2d1)]){if(_0x2cd210&&_0x50ea2f)console[_0x18b5bd(0x239)](_0x18b5bd(0x26a)+_0x2cd210+'.'+_0x50ea2f);else _0x2cd210&&console[_0x18b5bd(0x239)]('Filter:\x20project='+_0x2cd210);}const _0x76bd89=_0x199fb0[_0x18b5bd(0x2cb)],_0x1ac7ed=_0x199fb0[_0x18b5bd(0x277)];if(_0x76bd89){_0x1ac7ed&&console['error'](a42_0x48c95c['yellow'](_0x18b5bd(0x241)),_0x18b5bd(0x32a));const _0x12d64b=_0x199fb0[_0x18b5bd(0x2cf)];return _0x12d64b?await this[_0x18b5bd(0x30b)](_0x2ea8c7,_0x76bd89):await this['renderSingleTimeline'](_0x2ea8c7,_0x76bd89,_0x199fb0),0x0;}if(_0x1ac7ed){const _0x481abc=await withSpinner(_0x18b5bd(0x192),()=>_0x2e49e5[_0x18b5bd(0x2aa)][_0x18b5bd(0x2ff)]({'projectName':_0x2cd210,'workflowName':_0x50ea2f,'limit':0x64}),{'verbose':_0x199fb0['verbose']}),_0x2137ea=_0x481abc[_0x18b5bd(0x2c9)][_0x18b5bd(0x231)](_0x30c4e3=>_0x30c4e3['id']===_0x1ac7ed);if(!_0x2137ea)return console['error'](a42_0x48c95c[_0x18b5bd(0x196)](_0x18b5bd(0x215)),_0x18b5bd(0x2f8)+_0x1ac7ed),0x1;if(!_0x2137ea[_0x18b5bd(0x270)]?.['id'])return console[_0x18b5bd(0x239)](a42_0x48c95c[_0x18b5bd(0x196)]('Error:'),_0x18b5bd(0x1bc)+_0x1ac7ed+_0x18b5bd(0x186)),0x1;const _0x5bb3e0=_0x2137ea[_0x18b5bd(0x270)]['id'];_0x199fb0[_0x18b5bd(0x2d1)]&&console[_0x18b5bd(0x239)](_0x18b5bd(0x1db)+_0x5bb3e0+'\x20from\x20session\x20'+_0x1ac7ed);const _0x21d64a=_0x199fb0[_0x18b5bd(0x2cf)];return _0x21d64a?await this[_0x18b5bd(0x30b)](_0x2ea8c7,_0x5bb3e0):await this[_0x18b5bd(0x2c2)](_0x2ea8c7,_0x5bb3e0,_0x199fb0),0x0;}const _0x25c9f5=await withSpinner(_0x18b5bd(0x2f1),()=>_0x2e49e5['workflow']['sessions']({'projectName':_0x2cd210,'workflowName':_0x50ea2f,'limit':_0x199fb0[_0x18b5bd(0x190)]||0x32}),{'verbose':_0x199fb0[_0x18b5bd(0x2d1)]}),_0x2101d9=_0x25c9f5['data'];if(_0x2101d9[_0x18b5bd(0x1c2)]===0x0){if(_0x2cd210&&_0x50ea2f)console[_0x18b5bd(0x239)]('No\x20sessions\x20found\x20for:\x20'+_0x2cd210+'.'+_0x50ea2f);else _0x2cd210?console[_0x18b5bd(0x239)](_0x18b5bd(0x2a4)+_0x2cd210):(console['error'](_0x18b5bd(0x1da)),console['error'](a42_0x48c95c[_0x18b5bd(0x1b5)](_0x18b5bd(0x25e))));return 0x0;}_0x2101d9[_0x18b5bd(0x1b1)]((_0x120274,_0x1cd172)=>{const _0x136eb7=_0x18b5bd,_0x2e0c03=_0x120274[_0x136eb7(0x29a)]||'',_0x379213=_0x1cd172[_0x136eb7(0x29a)]||'';return _0x379213[_0x136eb7(0x194)](_0x2e0c03);});if(_0x199fb0[_0x18b5bd(0x28f)]||_0x199fb0['jsonl'])return await handleSDKOutput(_0x2101d9,_0x199fb0),0x0;let _0x58a0e2;if(_0x1bf374){const _0x4b0e07=_0x2101d9[0x0];if(!_0x4b0e07[_0x18b5bd(0x270)]?.['id'])return console[_0x18b5bd(0x239)](_0x18b5bd(0x200)),0x0;_0x58a0e2=_0x4b0e07[_0x18b5bd(0x270)]['id'],_0x199fb0[_0x18b5bd(0x2d1)]&&console['error'](_0x18b5bd(0x20f)+_0x4b0e07[_0x18b5bd(0x29a)]);}else{const _0x28a030=_0x2101d9['map'](_0x1a20dd=>{const _0x511e71=_0x18b5bd,_0x4dbb50=getAttemptStatusDisplay(_0x1a20dd[_0x511e71(0x270)]);return{'title':_0x1a20dd[_0x511e71(0x1f7)]?.[_0x511e71(0x30f)]+'.'+_0x1a20dd[_0x511e71(0x2aa)]?.[_0x511e71(0x30f)]+_0x511e71(0x197)+_0x1a20dd['sessionTime']+'\x20'+_0x4dbb50[_0x511e71(0x2f3)],'value':_0x1a20dd[_0x511e71(0x270)]?.['id']||'','description':_0x4dbb50[_0x511e71(0x1fa)]};}),_0x2d7979=await a42_0x1933bf({'type':'select','name':_0x18b5bd(0x2cb),'message':_0x18b5bd(0x223),'choices':_0x28a030[_0x18b5bd(0x2fe)](_0x1d7129=>_0x1d7129[_0x18b5bd(0x2f6)]!=='')});if(!_0x2d7979[_0x18b5bd(0x2cb)])return 0x0;_0x58a0e2=_0x2d7979[_0x18b5bd(0x2cb)];}const _0x5c36e1=_0x199fb0[_0x18b5bd(0x2cf)];return _0x5c36e1?await this[_0x18b5bd(0x30b)](_0x2ea8c7,_0x58a0e2):await this[_0x18b5bd(0x2c2)](_0x2ea8c7,_0x58a0e2,_0x199fb0),0x0;}async[a42_0x3bd9b9(0x2c2)](_0x4ab601,_0x11f624,_0x5ce4e9){const _0x30c485=a42_0x3bd9b9,{tdx:_0x34983a}=_0x4ab601;let _0x42c712,_0x51de82;try{[_0x42c712,_0x51de82]=await Promise[_0x30c485(0x1ab)]([_0x34983a[_0x30c485(0x2aa)]['attempt'](_0x11f624),_0x34983a[_0x30c485(0x2aa)][_0x30c485(0x1b9)](_0x11f624,![])]);}catch(_0x221443){console[_0x30c485(0x239)](a42_0x48c95c[_0x30c485(0x196)](_0x30c485(0x1ad)));_0x5ce4e9[_0x30c485(0x2d1)]&&console[_0x30c485(0x239)](_0x221443);throw _0x221443;}if(_0x5ce4e9[_0x30c485(0x28f)]||_0x5ce4e9[_0x30c485(0x1aa)]){const _0x13b558=this[_0x30c485(0x229)](_0x42c712,_0x51de82);await handleSDKOutput([_0x13b558],_0x5ce4e9);return;}const _0x13e62e=_0x34983a[_0x30c485(0x2f4)]['site'],_0x22da1c=this[_0x30c485(0x2ce)](_0x42c712,_0x51de82,_0x13e62e);console['log'](_0x22da1c);}async[a42_0x3bd9b9(0x30b)](_0x3de622,_0x269347){const _0x4f6f4a=a42_0x3bd9b9,{tdx:_0x4117e8}=_0x3de622,_0x535bb4=TIMELINE_CONFIG[_0x4f6f4a(0x206)],_0x169979=TIMELINE_CONFIG[_0x4f6f4a(0x2c6)];let _0x15dc9c=0x0;while(_0x15dc9c<_0x169979){process[_0x4f6f4a(0x2e8)][_0x4f6f4a(0x31d)]&&process[_0x4f6f4a(0x2e8)][_0x4f6f4a(0x2be)]('\x1bc');let _0x2ab7cf,_0x22736e;try{[_0x2ab7cf,_0x22736e]=await Promise['all']([_0x4117e8['workflow'][_0x4f6f4a(0x183)](_0x269347),_0x4117e8[_0x4f6f4a(0x2aa)]['tasks'](_0x269347,![])]);}catch(_0xcacc4){console[_0x4f6f4a(0x239)](a42_0x48c95c['red'](_0x4f6f4a(0x230)));_0x15dc9c>0x0&&console[_0x4f6f4a(0x239)](a42_0x48c95c[_0x4f6f4a(0x1b5)](_0x4f6f4a(0x237)+_0x15dc9c));throw _0xcacc4;}const _0x2a4a95=_0x4117e8[_0x4f6f4a(0x2f4)][_0x4f6f4a(0x249)],_0x2c3b40=this['renderTimeline'](_0x2ab7cf,_0x22736e,_0x2a4a95);console['log'](_0x2c3b40);const _0x4f0a4e=_0x2ab7cf[_0x4f6f4a(0x1b4)]&&_0x22736e[_0x4f6f4a(0x290)](_0x205643=>_0x205643[_0x4f6f4a(0x1e8)]!=='running'&&_0x205643[_0x4f6f4a(0x1e8)]!==_0x4f6f4a(0x24e));if(_0x4f0a4e){console[_0x4f6f4a(0x239)](a42_0x48c95c[_0x4f6f4a(0x279)](_0x4f6f4a(0x1be)));break;}console[_0x4f6f4a(0x239)](a42_0x48c95c[_0x4f6f4a(0x1b5)](_0x4f6f4a(0x1b0)+_0x15dc9c*0x2+_0x4f6f4a(0x319))),await new Promise(_0xbeccc9=>setTimeout(_0xbeccc9,_0x535bb4)),_0x15dc9c++;}_0x15dc9c>=_0x169979&&console[_0x4f6f4a(0x239)](a42_0x48c95c[_0x4f6f4a(0x29e)](_0x4f6f4a(0x257)));}[a42_0x3bd9b9(0x2ce)](_0x40f315,_0x122d40,_0x5d0d82){const _0x309f00=a42_0x3bd9b9,_0x3a3abd=[],_0x420451=TIMELINE_CONFIG[_0x309f00(0x28c)],_0x262320=0x5,_0x427c00=process[_0x309f00(0x2e8)][_0x309f00(0x1e3)]||0x78,_0xe8710d=_0x427c00-_0x420451-_0x262320,_0x37637a=Math['max'](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math['min'](_0xe8710d,TIMELINE_CONFIG[_0x309f00(0x295)])),_0x56b4e5=new Date(_0x40f315[_0x309f00(0x1ee)])[_0x309f00(0x22d)](),_0x33ad50=_0x40f315[_0x309f00(0x2dc)]?new Date(_0x40f315['finishedAt'])[_0x309f00(0x22d)]():Date[_0x309f00(0x1bb)](),_0x5049a0={'start':_0x56b4e5,'end':_0x33ad50,'duration':_0x33ad50-_0x56b4e5},_0x11d6fd=new Map(),_0x126501=[];for(const _0xdbe1c6 of _0x122d40){if(_0xdbe1c6[_0x309f00(0x272)]){const _0x37e48c=new Date(_0xdbe1c6[_0x309f00(0x272)])[_0x309f00(0x22d)](),_0x17fdd4=_0xdbe1c6[_0x309f00(0x2c3)]?new Date(_0xdbe1c6[_0x309f00(0x2c3)])[_0x309f00(0x22d)]():Date['now'](),_0x57e134={'start':_0x37e48c,'end':_0x17fdd4,'duration':_0x17fdd4-_0x37e48c};_0x11d6fd['set'](_0xdbe1c6['id'],_0x57e134),_0x126501[_0x309f00(0x2e5)]({'name':_0xdbe1c6[_0x309f00(0x27f)],'state':_0xdbe1c6['state']||'unknown','window':_0x57e134});}else _0x126501['push']({'name':_0xdbe1c6[_0x309f00(0x27f)],'state':_0xdbe1c6[_0x309f00(0x1e8)]||_0x309f00(0x24e),'window':undefined});}_0x126501[_0x309f00(0x1b1)]((_0x4588d9,_0x1bfda1)=>{const _0x5bf4aa=_0x309f00;if(!_0x4588d9[_0x5bf4aa(0x1d7)])return 0x1;if(!_0x1bfda1['window'])return-0x1;return _0x4588d9['window'][_0x5bf4aa(0x195)]-_0x1bfda1[_0x5bf4aa(0x1d7)][_0x5bf4aa(0x195)];});const _0x24b5c3=_0x126501[_0x309f00(0x1c2)],_0x47c07c=_0x24b5c3>TIMELINE_CONFIG[_0x309f00(0x30e)];_0x47c07c&&_0x126501['splice'](TIMELINE_CONFIG[_0x309f00(0x30e)]);const _0x138103=calculateTimeScale(_0x5049a0,_0x37637a),_0x1b20ac=_0x40f315[_0x309f00(0x1b4)]?_0x40f315[_0x309f00(0x266)]?a42_0x48c95c[_0x309f00(0x279)](_0x309f00(0x266)):a42_0x48c95c['red'](_0x309f00(0x239)):a42_0x48c95c[_0x309f00(0x2e1)]('running'),_0x132506=_0x40f315['project']?.['id'],_0x6e2c4a=_0x40f315[_0x309f00(0x277)];let _0x64a2f4;if(_0x132506&&_0x6e2c4a){const _0x43c2c6=getWorkflowAttemptUrl(_0x5d0d82,_0x132506,_0x6e2c4a,_0x40f315['id']);_0x64a2f4=hyperlink(a42_0x48c95c[_0x309f00(0x1b5)](_0x40f315['id']),_0x43c2c6);}else _0x64a2f4=a42_0x48c95c[_0x309f00(0x1b5)](_0x40f315['id']);_0x3a3abd[_0x309f00(0x2e5)]('Attempt:\x20'+_0x64a2f4+_0x309f00(0x197)+_0x1b20ac+_0x309f00(0x197)+formatElapsed(_0x5049a0[_0x309f00(0x287)]));if(_0x126501['length']>0x0){const _0x4712da=renderTimeAxis(_0x138103,_0x37637a),_0x2d3d1b=new Date(_0x5049a0[_0x309f00(0x195)]),_0x2af6e5=formatDate(_0x2d3d1b),_0x41c033=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x309f00(0x2d9)]+_0x420451,_0x3b61bd=_0x2af6e5['padStart'](_0x41c033),_0x1d4b84=a42_0x48c95c[_0x309f00(0x1b5)](_0x3b61bd);_0x3a3abd[_0x309f00(0x2e5)](_0x1d4b84+'\x20'+_0x4712da);for(const _0x15bb06 of _0x126501){_0x3a3abd[_0x309f00(0x2e5)](renderTaskRow(_0x15bb06,_0x138103,_0x37637a,_0x420451));}const _0x3b0474=calculateStats(_0x126501);_0x3a3abd[_0x309f00(0x2e5)](formatStats(_0x3b0474)),_0x47c07c&&_0x3a3abd['push'](a42_0x48c95c[_0x309f00(0x29e)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x309f00(0x30e)]+'\x20of\x20'+_0x24b5c3+_0x309f00(0x307))),_0x3a3abd[_0x309f00(0x2e5)](''),_0x3a3abd[_0x309f00(0x2e5)](a42_0x48c95c[_0x309f00(0x1b5)]('💡\x20Tip:\x20Use\x20')+('tdx\x20wf\x20attempt\x20'+_0x40f315['id']+'\x20logs')+a42_0x48c95c[_0x309f00(0x1b5)]('\x20to\x20see\x20detailed\x20logs'));}else _0x3a3abd['push'](_0x309f00(0x19e));return _0x3a3abd[_0x309f00(0x1c6)]('\x0a');}[a42_0x3bd9b9(0x229)](_0x49cc03,_0x12da41){const _0x4d2219=a42_0x3bd9b9,_0x197b1d=new Date(_0x49cc03[_0x4d2219(0x1ee)])[_0x4d2219(0x22d)](),_0x3103e4=_0x49cc03[_0x4d2219(0x2dc)]?new Date(_0x49cc03[_0x4d2219(0x2dc)])[_0x4d2219(0x22d)]():Date[_0x4d2219(0x1bb)](),_0x29857e=_0x3103e4-_0x197b1d,_0x147191=[];for(const _0x35e41b of _0x12da41){if(_0x35e41b[_0x4d2219(0x272)]){const _0x2428e8=new Date(_0x35e41b[_0x4d2219(0x272)])[_0x4d2219(0x22d)](),_0x413ddf=_0x35e41b[_0x4d2219(0x2c3)]?new Date(_0x35e41b[_0x4d2219(0x2c3)])[_0x4d2219(0x22d)]():Date['now']();_0x147191[_0x4d2219(0x2e5)]({'name':_0x35e41b[_0x4d2219(0x27f)],'state':_0x35e41b[_0x4d2219(0x1e8)]||_0x4d2219(0x211),'window':{'start':_0x2428e8,'end':_0x413ddf,'duration':_0x413ddf-_0x2428e8}});}else _0x147191[_0x4d2219(0x2e5)]({'name':_0x35e41b[_0x4d2219(0x27f)],'state':_0x35e41b[_0x4d2219(0x1e8)]||_0x4d2219(0x24e),'window':undefined});}const _0x5bc975=calculateStats(_0x147191);return{'attempt':{'id':_0x49cc03['id'],'status':_0x49cc03[_0x4d2219(0x1b4)]?_0x49cc03[_0x4d2219(0x266)]?_0x4d2219(0x266):_0x4d2219(0x239):'running','createdAt':_0x49cc03[_0x4d2219(0x1ee)],'finishedAt':_0x49cc03[_0x4d2219(0x2dc)],'duration_ms':_0x29857e},'tasks':_0x147191[_0x4d2219(0x262)](_0x127242=>({'name':_0x127242['name'],'state':_0x127242[_0x4d2219(0x1e8)],'startedAt':_0x127242[_0x4d2219(0x1d7)]?new Date(_0x127242[_0x4d2219(0x1d7)][_0x4d2219(0x195)])['toISOString']():null,'updatedAt':_0x127242['window']?new Date(_0x127242[_0x4d2219(0x1d7)][_0x4d2219(0x240)])[_0x4d2219(0x2ad)]():null,'duration_ms':_0x127242[_0x4d2219(0x1d7)]?.[_0x4d2219(0x287)]||null})),'stats':_0x5bc975};}}
1
+ const a42_0xe6da40=a42_0x4f05;(function(_0x54bb7a,_0x15e7f0){const _0x2159bf=a42_0x4f05,_0x2aadae=_0x54bb7a();while(!![]){try{const _0x48aa0f=parseInt(_0x2159bf(0x340))/0x1*(parseInt(_0x2159bf(0x2ca))/0x2)+parseInt(_0x2159bf(0x254))/0x3+-parseInt(_0x2159bf(0x2c1))/0x4*(parseInt(_0x2159bf(0x397))/0x5)+-parseInt(_0x2159bf(0x31a))/0x6+-parseInt(_0x2159bf(0x31b))/0x7*(parseInt(_0x2159bf(0x2ab))/0x8)+parseInt(_0x2159bf(0x246))/0x9*(parseInt(_0x2159bf(0x21c))/0xa)+-parseInt(_0x2159bf(0x2f4))/0xb*(-parseInt(_0x2159bf(0x2ea))/0xc);if(_0x48aa0f===_0x15e7f0)break;else _0x2aadae['push'](_0x2aadae['shift']());}catch(_0xc67b9){_0x2aadae['push'](_0x2aadae['shift']());}}}(a42_0x59b6,0x93722));import a42_0x144d21 from'chalk';import{existsSync}from'fs';import a42_0x17adf7 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';function a42_0x59b6(){const _0x708554=['stdout','renderTimeline','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Error:\x20','renderSingleTimeline','clear','fromTask','Project\x20filter:\x20','deleted','Target:\x20','run','sourceProjectName','requireProject','cwd','workflowName','Resolving\x20project\x20\x27','Session\x20','retrySession','No\x20attempts\x20found\x20for:\x20','workflow:projects','resolveProjectDir','No\x20sessions\x20found','now','workflow:kill','Filter:\x20project=','Files\x20to\x20upload:\x20','data','end','Task\x20name:\x20','done','dryRun','pollTimeline','title','/sessions/','Validation:\x20skipped','projectName','path','No\x20sessions\x20found\x20for:\x20','\x20-\x20','targetExists','attemptId','→\x20Project:\x20','Pattern:\x20','json','Error:\x20Invalid\x20parameter\x20format:\x20','autocomplete','Invalid\x20format:\x20','total','output','duration','No\x20matching\x20sessions\x20found','table','logFiles','hasChanges','-\x20nothing\x20pushed','Deleting\x20project\x20','ICON_WIDTH','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Force:\x20yes','Warning:','split','2079510isbkLO','Project\x20name\x20is\x20required','basename','Error:\x20Invalid\x20JSON\x20in\x20--params','taskName','Dry\x20run:\x20yes','execute','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x1b[1A\x1b[2K','/attempt/','session_id','session:','slice','\x20\x20Attempt\x20ID:\x20','Including\x20subtasks:\x20yes','\x20of\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','join','keys','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x0aClone\x20\x22','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:push','Filter:\x20','get','format','resumeFrom','includeSubtasks','follow','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','showWorkflowConsoleUrl','parse','attempt:','newProjectId','✔\x20Workflow\x20run\x20started','fullName','\x20is\x20not\x20a\x20directory','\x20logs','\x20\x20Location:\x20','set','\x20\x20Project\x20ID:\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','fs/promises','workflow:attempts','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','getHours','10XuMpsi','pending','startsWith','\x20\x20Session\x20context\x20set\x20to:\x20','new','projects','Loading\x20sessions...','workflow:retry','\x0aError:','List\x20workflow\x20attempts','metadata','rows','\x20\x20New\x20attempt\x20ID:\x20','✔\x20Found\x20','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','error','Cancelled','window','workflow:timeline','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x20modified','delete','workflow:secrets:set','localeCompare','Key\x20cannot\x20be\x20empty','unchanged','\x20to\x20see\x20detailed\x20logs','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','cyan','key','Project\x20name:\x20','project','\x20unchanged','✔\x20Secret\x20\x27','LABEL_WIDTH_DIVISOR','getFullYear','floor','canceling','Output\x20directory:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','List\x20workflow\x20execution\x20sessions','POLL_INTERVAL_MS','5014089nehZWN','No\x20attempts\x20found\x20in\x20project:\x20','✔\x20Workflow\x20project\x20context\x20cleared.','Workflow:\x20','kill','\x0aApply\x20these\x20changes?','from','type','\x20\x20Changes:\x20','updatedAt','Revision:\x20','\x0aPush\x20these\x20changes?','push','skipValidation','1658112EAfQJS','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20\x20Console:\x20','\x0aUpdate\x20existing\x20project\x20\x22','map','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','jsonl','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','preparePushProject','📋\x20','\x20attempt','\x20sessions\x20','revision:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Source:\x20','\x20new','No\x20sessions\x20found\x20in\x20project:\x20','getMonth','MAX_LABEL_COUNT','createdAt','🔄\x20','No\x20workflows\x20found','Show\x20logs\x20for\x20a\x20workflow\x20attempt','✔\x20Workflow\x20project\x20set\x20to:\x20','targetDir','TASK_NAME_WIDTH','Pulling\x20project\x20','yellow','values','stringify','List\x20all\x20workflow\x20projects','workflow:workflows','No\x20attempts\x20found','...','fill','No\x20log\x20files\x20found\x20for\x20this\x20attempt','repeat','\x20secret','trim','\x0aDry\x20run\x20-\x20no\x20files\x20written','select','isNewProject','Listing\x20secrets...','planned','---\x20','Parameters:\x20','renderSessionsTimeline','unknown','Source\x20project:\x20','Error:\x20Attempt\x20ID\x20is\x20required','workflow:clone','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','yes','Error:\x20KEY=VALUE\x20is\x20required','attempt','projectId','setSecret','Show\x20specific\x20attempt\x20details','resolve','limit','Reason:\x20','Status:\x20','match','Retrying\x20attempt...','startTime','green','tasks','workflow:download','listSecrets','GUTTER','sessionId','applyPullProject','✔\x20Deleted\x20project\x20','filter','state','\x22\x20to\x20new\x20project\x20\x22','\x20session','changes','executeCloneProject','write','-\x20no\x20files\x20written','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','padStart','Show\x20tasks\x20for\x20an\x20attempt','⚠\x20Showing\x20first\x20','value','all','848zQTAXn','\x20\x20Revision:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','Fetching\x20log\x20files...','✔\x20Push\x20complete','workflow:upload','max','context','cancelRequested','workflow:logs','Error:','resolveProjectId','every','\x22\x20with\x20new\x20revision?','find','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Listing\x20workflow\x20sessions...','toLowerCase','\x20has\x20no\x20attempts','parseProjectWorkflowPattern','workflow:pull','navigateSessionsInteractive','4fruHxB','✔\x20Downloaded\x20','Setting\x20secret...','Error:\x20Secret\x20key\x20is\x20required','round','resolveProject','running','Usage:\x20tdx\x20wf\x20use\x20<project>','includes','7540nNaqYf','tdx.json','Session\x20not\x20found:\x20','\x0a✔\x20Already\x20up\x20to\x20date','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow','No\x20projects\x20match\x20pattern:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','isArray','workflow:sessions','\x0aPolling...\x20(','deleteSecret','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','generateSessionTimelineRows','💡\x20Tip:\x20Use\x20','newProjectName','Pushing\x20project...','getMinutes','\x20\x20Files\x20extracted:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','startedAt','\x20deleted','lastAttempt','toISOString','workflow:secrets:list','MAX_TASKS_DISPLAY','filesExtracted','✔\x20Project\x20updated','session','Starting\x20workflow\x20run...','getDate','sessions','17676ZYNyaM','Using\x20attempt\x20','fileCount','Source\x20directory\x20is\x20required','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','finishedAt','size','success','description','site','1958jwtddR','text','columns','tdx\x20wf\x20attempt\x20','status','logs','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','download','Listing\x20workflow\x20attempts...','Select\x20a\x20workflow\x20to\x20run','utf-8','Source\x20directory:\x20','Attempt\x20ID:\x20','params','msPerChar','group_error','→\x20New\x20project:\x20','log','prepareCloneProject','relative','workflowProject','blue','Retry\x20a\x20session\x20or\x20attempt','revision','Key:\x20','name','Target\x20directory:\x20','From\x20task:\x20','LABEL_MIN_SPACING','task','list','workflows','\x20\x20Project:\x20','MAX_POLL_ITERATIONS','sourceDir',',\x20Workflow:\x20','/app/workflows/','retryAttemptName','5211222WsDCoe','31129MxhVNj','white','indexOf','ICON_SPACING','sessionTime','Getting\x20attempt\x20tasks...','\x20(use\x20--limit\x20to\x20show\x20more)','\x20(system)','red','Params:\x20','No\x20workflow\x20sessions\x20found','trimEnd','Session\x20time:\x20','length','includeRetried','min','\x20task','\x20\x20Session\x20ID:\x20','pullProject','buildTimelineData','Expected\x20format:\x20--param\x20key=value','has','Deleting\x20secret...','Error:\x20Project\x20name\x20is\x20required','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','diff','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x20project','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Auto-selected\x20latest\x20session:\x20','(use\x20--limit\x20to\x20see\x20more)','✔\x20Showing\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Project:\x20','getTime','\x22\x20already\x20exists\x20(ID:\x20','\x20\x20Target:\x20','262DegVIK','sort','dim','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20log\x20content\x20found','Start\x20a\x20workflow\x20run','summary','start','modified','Kill\x20a\x20running\x20attempt','workflow:delete','force','substring','workflow:attempt','\x22?\x20This\x20cannot\x20be\x20undone.','message','verbose','retryAttempt','Total:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','(unknown)','List\x20workflows','📁\x20','isTTY','Latest\x20session\x20has\x20no\x20attempt'];a42_0x59b6=function(){return _0x708554;};return a42_0x59b6();}import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x36de0e from'prompts';function getAttemptStatusDisplay(_0x1a314a){const _0x56d03a=a42_0x4f05;if(!_0x1a314a)return{'icon':'⏳','text':''};const {done:_0x5293d5,success:_0x3f9290,cancelRequested:_0x51f4cb}=_0x1a314a;if(!_0x5293d5)return _0x51f4cb?{'icon':'🛑','text':a42_0x144d21[_0x56d03a(0x26f)]('canceling')}:{'icon':'🔄','text':a42_0x144d21[_0x56d03a(0x309)]('running')};if(_0x3f9290)return{'icon':'✅','text':a42_0x144d21[_0x56d03a(0x295)](_0x56d03a(0x2f1))};return{'icon':'❌','text':a42_0x144d21[_0x56d03a(0x323)](_0x56d03a(0x22b))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0xe6da40(0x2c6)](_0x55c5df,_0x10720d,_0x371651=0x0){const _0x577935=a42_0xe6da40;return _0x55c5df[_0x371651]||_0x10720d[_0x577935(0x308)];}[a42_0xe6da40(0x366)](_0x28ccd7,_0x3ed5b9,_0x593747=0x0){const _0x5b1a9d=a42_0xe6da40,_0x541405=this[_0x5b1a9d(0x2c6)](_0x28ccd7,_0x3ed5b9,_0x593747);if(!_0x541405)return console['error'](a42_0x144d21[_0x5b1a9d(0x323)]('Error:'),_0x5b1a9d(0x398)),console[_0x5b1a9d(0x22b)](a42_0x144d21['dim'](_0x5b1a9d(0x2dd))),null;return _0x541405;}[a42_0xe6da40(0x2be)](_0x503314,_0x4610a6){const _0x4c01bd=a42_0xe6da40;if(_0x503314[0x0]){const _0x1ea436=_0x503314[0x0][_0x4c01bd(0x396)]('.');if(_0x1ea436['length']===0x1)return{'projectName':_0x1ea436[0x0],'workflowName':undefined};else return _0x1ea436[_0x4c01bd(0x328)]===0x2?{'projectName':_0x1ea436[0x0],'workflowName':_0x1ea436[0x1]}:(console[_0x4c01bd(0x22b)](a42_0x144d21[_0x4c01bd(0x323)](_0x4c01bd(0x2b5)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x4610a6[_0x4c01bd(0x308)],'workflowName':undefined};}[a42_0xe6da40(0x36e)](_0x975d4d,_0x3f4f60,_0x56a727=0x0){const _0x3f403b=a42_0xe6da40;if(_0x975d4d[_0x56a727])return _0x975d4d[_0x56a727];if(_0x3f4f60[_0x3f403b(0x308)]){const _0x39cdb1=a42_0x17adf7['join'](process[_0x3f403b(0x367)](),_0x3f403b(0x313),_0x3f4f60['workflowProject']);if(existsSync(a42_0x17adf7[_0x3f403b(0x1fd)](_0x39cdb1,_0x3f403b(0x2cb))))return _0x39cdb1;}return undefined;}async[a42_0xe6da40(0x20b)](_0xe27dd5,_0x471e67,_0x52fa6d){const _0x355387=a42_0xe6da40;try{const _0x2c2397=await _0xe27dd5[_0x355387(0x2cf)][_0x355387(0x313)](_0x471e67,{'limit':0x1});if(_0x2c2397[_0x355387(0x328)]>0x0){const _0x142ee9=_0x2c2397[0x0]['id'],_0x5d8a03=getWorkflowUrl(_0x52fa6d,_0x142ee9);console['error'](_0x355387(0x256)+a42_0x144d21[_0x355387(0x238)](_0x5d8a03));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']='workflow:use';[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x2a5);async[a42_0xe6da40(0x1f1)](_0x3f036c){const _0x265a8d=a42_0xe6da40,{options:_0x32b317,args:_0x1f74b1,tdx:_0x11c20d}=_0x3f036c,_0x382050=_0x1f74b1[0x0],_0x14debb=_0x32b317[_0x265a8d(0x35f)];if(_0x14debb)return saveSessionContext({'workflow_project':undefined},_0x32b317[_0x265a8d(0x2e6)]),console[_0x265a8d(0x305)](a42_0x144d21[_0x265a8d(0x295)](_0x265a8d(0x248))),0x0;if(!_0x382050)return console[_0x265a8d(0x22b)](a42_0x144d21[_0x265a8d(0x323)](_0x265a8d(0x2b5)),_0x265a8d(0x398)),console[_0x265a8d(0x22b)](a42_0x144d21[_0x265a8d(0x342)](_0x265a8d(0x2c8))),console[_0x265a8d(0x22b)](a42_0x144d21[_0x265a8d(0x342)](_0x265a8d(0x219))),0x1;const _0x4d28ec=await withSpinner(_0x265a8d(0x369)+_0x382050+'\x27...',()=>_0x11c20d[_0x265a8d(0x2cf)][_0x265a8d(0x2b6)](_0x382050),{'verbose':_0x32b317[_0x265a8d(0x350)]}),{name:_0x2e1e10}=_0x4d28ec[_0x265a8d(0x374)];return saveSessionContext({'workflow_project':_0x2e1e10},_0x32b317['session']),console['log'](a42_0x144d21[_0x265a8d(0x295)](_0x265a8d(0x26b)+a42_0x144d21['cyan'](_0x2e1e10))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x36d);['description']=a42_0xe6da40(0x272);async[a42_0xe6da40(0x1f1)](_0x4298e7){const _0x5e2b56=a42_0xe6da40,{options:_0xb10cce,args:_0x184c42,tdx:_0x387fa4}=_0x4298e7,_0x462147=_0x184c42[0x0];_0xb10cce[_0x5e2b56(0x350)]&&_0x462147&&console[_0x5e2b56(0x22b)](_0x5e2b56(0x384)+_0x462147);const _0x230832=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x387fa4[_0x5e2b56(0x2cf)][_0x5e2b56(0x221)](_0x462147,{'limit':_0xb10cce['limit']}),{'verbose':_0xb10cce[_0x5e2b56(0x350)]});let _0x1d535a=_0x230832[_0x5e2b56(0x374)];_0x1d535a['sort']((_0x1ac31d,_0x4212d9)=>_0x1ac31d[_0x5e2b56(0x30d)][_0x5e2b56(0x233)](_0x4212d9[_0x5e2b56(0x30d)]));const _0x422b34=_0xb10cce[_0x5e2b56(0x28f)]||0x64,_0x42201e=_0x1d535a['length']>=_0x422b34?a42_0x144d21[_0x5e2b56(0x342)](_0x5e2b56(0x321)):'';console['error'](_0x5e2b56(0x229)+_0x1d535a[_0x5e2b56(0x328)]+_0x5e2b56(0x336)+(_0x1d535a['length']!==0x1?'s':'')+_0x42201e);if(_0xb10cce[_0x5e2b56(0x206)]==='json'||_0xb10cce['format']===_0x5e2b56(0x25a)||_0xb10cce[_0x5e2b56(0x206)]===_0x5e2b56(0x38d))await handleSDKOutput(_0x1d535a,_0xb10cce);else{if(_0x1d535a[_0x5e2b56(0x328)]===0x0)_0x462147?console[_0x5e2b56(0x305)](_0x5e2b56(0x2d0)+_0x462147):console[_0x5e2b56(0x305)]('No\x20workflow\x20projects\x20found');else{const _0x237828=_0x1d535a[_0x5e2b56(0x258)](_0x4fca8d=>{const _0x18f31c=_0x5e2b56,_0x367b4f=_0x4fca8d[_0x18f31c(0x226)]?.['some'](_0xb5c4cf=>_0xb5c4cf[_0x18f31c(0x239)]==='sys'),_0x405e94=_0x367b4f?a42_0x144d21['dim'](_0x18f31c(0x322)):'';return _0x18f31c(0x356)+_0x4fca8d['name']+_0x405e94;});await writeOutput(_0x237828[_0x5e2b56(0x1fd)]('\x0a'),_0xb10cce[_0x5e2b56(0x38a)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a42_0xe6da40(0x273);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x355);async[a42_0xe6da40(0x1f1)](_0x3a9aa0){const _0x5fb3a7=a42_0xe6da40,{options:_0x5acc48,args:_0x2f16bb,tdx:_0x5c3d96}=_0x3a9aa0,_0x45bba9=this[_0x5fb3a7(0x2c6)](_0x2f16bb,_0x5acc48);_0x5acc48['verbose']&&_0x45bba9&&console['error'](_0x5fb3a7(0x361)+_0x45bba9);const _0x101f68=await withSpinner('Listing\x20workflows...',()=>_0x5c3d96[_0x5fb3a7(0x2cf)][_0x5fb3a7(0x313)](_0x45bba9,{'limit':_0x5acc48['limit']}),{'verbose':_0x5acc48[_0x5fb3a7(0x350)]});let _0x341f4f=_0x101f68['data'];_0x341f4f[_0x5fb3a7(0x341)]((_0x51ad84,_0x377ddb)=>{const _0x50ee7d=_0x5fb3a7,_0x490df7=_0x51ad84[_0x50ee7d(0x30d)]['localeCompare'](_0x377ddb['name']);if(_0x490df7!==0x0)return _0x490df7;return(_0x51ad84[_0x50ee7d(0x23b)]?.['name']||'')['localeCompare'](_0x377ddb[_0x50ee7d(0x23b)]?.[_0x50ee7d(0x30d)]||'');});const _0x1b9855=_0x5acc48[_0x5fb3a7(0x28f)]||0x64,_0x2e4aff=_0x341f4f[_0x5fb3a7(0x328)]>=_0x1b9855?a42_0x144d21[_0x5fb3a7(0x342)](_0x5fb3a7(0x321)):'';console[_0x5fb3a7(0x22b)](_0x5fb3a7(0x229)+_0x341f4f['length']+'\x20workflow'+(_0x341f4f[_0x5fb3a7(0x328)]!==0x1?'s':'')+_0x2e4aff);if(_0x5acc48['format']===_0x5fb3a7(0x385)||_0x5acc48[_0x5fb3a7(0x206)]===_0x5fb3a7(0x25a)||_0x5acc48[_0x5fb3a7(0x206)]==='table')await handleSDKOutput(_0x341f4f,_0x5acc48);else{if(_0x341f4f[_0x5fb3a7(0x328)]===0x0)_0x45bba9?console[_0x5fb3a7(0x305)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x45bba9):console[_0x5fb3a7(0x305)](_0x5fb3a7(0x269));else{const _0xe08bb1=_0x5acc48['site'],_0x263b08=_0x341f4f['map'](_0x3e0778=>{const _0x55f849=_0x5fb3a7,_0xa7aac3=a42_0x144d21[_0x55f849(0x342)]('#'+_0x3e0778['id']),_0x283a26=hyperlink(_0xa7aac3,getWorkflowUrl(_0xe08bb1,_0x3e0778['id'])),_0x24597e=_0x3e0778[_0x55f849(0x23b)]?.[_0x55f849(0x30d)]?a42_0x144d21[_0x55f849(0x342)]('\x20('+_0x3e0778[_0x55f849(0x23b)][_0x55f849(0x30d)]+')'):'';return _0x55f849(0x25d)+_0x283a26+'\x20'+_0x3e0778[_0x55f849(0x30d)]+_0x24597e;});await writeOutput(_0x263b08[_0x5fb3a7(0x1fd)]('\x0a'),_0x5acc48[_0x5fb3a7(0x38a)],_0x5fb3a7(0x312));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2d3);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x244);async[a42_0xe6da40(0x1f1)](_0x4f430e){const _0x1b1a93=a42_0xe6da40,{options:_0x5c59a1,args:_0x291a1f,tdx:_0x55c930}=_0x4f430e,_0x15b89f=this['parseProjectWorkflowPattern'](_0x291a1f,_0x5c59a1);if(!_0x15b89f)return 0x1;const {projectName:_0x25d546,workflowName:_0x133c01}=_0x15b89f;if(_0x5c59a1['verbose']){if(_0x25d546&&_0x133c01)console[_0x1b1a93(0x22b)](_0x1b1a93(0x204)+_0x25d546+'.'+_0x133c01);else _0x25d546&&console[_0x1b1a93(0x22b)](_0x1b1a93(0x372)+_0x25d546);const _0x34eead=_0x5c59a1['status'];_0x34eead&&console[_0x1b1a93(0x22b)](_0x1b1a93(0x291)+_0x34eead);}let _0x4639cc=0x28;if(process[_0x1b1a93(0x359)][_0x1b1a93(0x357)]&&!_0x5c59a1[_0x1b1a93(0x38a)]&&!_0x5c59a1[_0x1b1a93(0x206)]){const _0x106d60=process[_0x1b1a93(0x359)][_0x1b1a93(0x227)]||0x28;_0x4639cc=Math[_0x1b1a93(0x2b1)](0x14,Math['floor'](_0x106d60*0x2/0x3));}const _0x5d2993=_0x5c59a1['limit']||_0x4639cc,_0x27d989=await withSpinner(_0x1b1a93(0x2bb),()=>_0x55c930[_0x1b1a93(0x2cf)]['sessions']({'projectName':_0x25d546,'workflowName':_0x133c01,'status':_0x5c59a1[_0x1b1a93(0x2f8)],'fromTime':_0x5c59a1[_0x1b1a93(0x24c)],'toTime':_0x5c59a1['to'],'limit':_0x5d2993}),{'verbose':_0x5c59a1[_0x1b1a93(0x350)]}),_0x49736d=_0x27d989['data'];_0x49736d[_0x1b1a93(0x341)]((_0x294321,_0x4b89b9)=>{const _0x3bc20f=_0x1b1a93,_0x51662f=_0x294321[_0x3bc20f(0x31f)]||'',_0x4e4933=_0x4b89b9[_0x3bc20f(0x31f)]||'';return _0x4e4933[_0x3bc20f(0x233)](_0x51662f);});_0x49736d['length']>=_0x5d2993?console[_0x1b1a93(0x22b)](_0x1b1a93(0x33a)+_0x49736d[_0x1b1a93(0x328)]+_0x1b1a93(0x25f)+a42_0x144d21[_0x1b1a93(0x342)](_0x1b1a93(0x339))):console[_0x1b1a93(0x22b)](_0x1b1a93(0x229)+_0x49736d[_0x1b1a93(0x328)]+_0x1b1a93(0x2a0)+(_0x49736d[_0x1b1a93(0x328)]!==0x1?'s':''));if(_0x5c59a1[_0x1b1a93(0x206)]===_0x1b1a93(0x385)||_0x5c59a1[_0x1b1a93(0x206)]===_0x1b1a93(0x25a)||_0x5c59a1[_0x1b1a93(0x206)]===_0x1b1a93(0x38d))await handleSDKOutput(_0x49736d,_0x5c59a1);else{if(!process['stdout'][_0x1b1a93(0x357)]||_0x5c59a1['output']){if(_0x49736d[_0x1b1a93(0x328)]===0x0){if(_0x25d546&&_0x133c01)console[_0x1b1a93(0x305)](_0x1b1a93(0x37f)+_0x25d546+'.'+_0x133c01);else _0x25d546?console[_0x1b1a93(0x305)](_0x1b1a93(0x264)+_0x25d546):console[_0x1b1a93(0x305)]('No\x20sessions\x20found');}else{const _0x52d0fc=_0x5c59a1[_0x1b1a93(0x2f3)],_0x6e7ce7=this[_0x1b1a93(0x282)](_0x49736d,_0x52d0fc);_0x5c59a1[_0x1b1a93(0x38a)]?await writeOutput(_0x6e7ce7,_0x5c59a1['output'],'list'):console[_0x1b1a93(0x305)](_0x6e7ce7);}!_0x25d546&&(console[_0x1b1a93(0x22b)](''),console[_0x1b1a93(0x22b)](a42_0x144d21[_0x1b1a93(0x342)](_0x1b1a93(0x25b))),console[_0x1b1a93(0x22b)](a42_0x144d21[_0x1b1a93(0x342)](_0x1b1a93(0x2d1))+'or'+a42_0x144d21['dim'](_0x1b1a93(0x343))));}else{if(_0x49736d[_0x1b1a93(0x328)]===0x0){if(_0x25d546&&_0x133c01)console['log'](_0x1b1a93(0x37f)+_0x25d546+'.'+_0x133c01);else _0x25d546?console[_0x1b1a93(0x305)](_0x1b1a93(0x264)+_0x25d546):console[_0x1b1a93(0x305)](_0x1b1a93(0x36f));}else await this[_0x1b1a93(0x2c0)](_0x49736d,_0x4f430e,_0x25d546);}}return 0x0;}[a42_0xe6da40(0x282)](_0x21ac80,_0x4c1d2c){const _0x5f12be=a42_0xe6da40,_0x5989e4=[],_0xbbbbe8=new Map();let _0x4e6c45=Infinity,_0x392155=-Infinity;for(const _0x11683e of _0x21ac80){if(_0x11683e['lastAttempt']?.[_0x5f12be(0x267)]){const _0x579108=new Date(_0x11683e[_0x5f12be(0x2e0)][_0x5f12be(0x267)])[_0x5f12be(0x33d)](),_0x26c027=_0x11683e[_0x5f12be(0x2e0)][_0x5f12be(0x2ef)]?new Date(_0x11683e[_0x5f12be(0x2e0)][_0x5f12be(0x2ef)])[_0x5f12be(0x33d)]():Date[_0x5f12be(0x370)](),_0x40dc42=_0x11683e[_0x5f12be(0x23b)]?.[_0x5f12be(0x30d)]||_0x5f12be(0x354);!_0xbbbbe8[_0x5f12be(0x330)](_0x40dc42)&&_0xbbbbe8['set'](_0x40dc42,[]),_0xbbbbe8['get'](_0x40dc42)[_0x5f12be(0x252)]({'session':_0x11683e,'startTime':_0x579108,'endTime':_0x26c027,'duration':_0x26c027-_0x579108}),_0x4e6c45=Math[_0x5f12be(0x32a)](_0x4e6c45,_0x579108),_0x392155=Math[_0x5f12be(0x2b1)](_0x392155,_0x26c027);}}if(_0xbbbbe8[_0x5f12be(0x2f0)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x467a95=process[_0x5f12be(0x359)][_0x5f12be(0x2f6)]||0x78,_0x4af5fc=0x1e,_0x5bfeff=0x32,_0x3c5c2f=0x4,_0x263eac=Math[_0x5f12be(0x32a)](_0x5bfeff,Math[_0x5f12be(0x2b1)](_0x4af5fc,Math[_0x5f12be(0x240)](_0x467a95*0.3))),_0x57bc57=_0x467a95-_0x263eac-TIMELINE_CONFIG[_0x5f12be(0x299)]-0x3-_0x3c5c2f,_0x28f569=_0x392155-_0x4e6c45,_0x50c446=_0x28f569/_0x263eac,_0x5c3825=renderTimeAxis({'startTime':_0x4e6c45,'endTime':_0x392155,'durationMs':_0x28f569,'msPerChar':_0x50c446},_0x263eac),_0x25b8b5=[];for(const _0x1f9afe of _0xbbbbe8[_0x5f12be(0x270)]()){_0x25b8b5[_0x5f12be(0x252)](..._0x1f9afe);}_0x25b8b5['sort']((_0x44182c,_0x24cb25)=>_0x24cb25[_0x5f12be(0x294)]-_0x44182c[_0x5f12be(0x294)]);const _0xae716d=new Date(_0x4e6c45),_0x3e638b=formatDate(_0xae716d),_0x127e6a=_0x3c5c2f+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x5f12be(0x31e)]+_0x57bc57,_0x20492f='\x20'[_0x5f12be(0x278)](_0x127e6a-_0x3e638b[_0x5f12be(0x328)]),_0x35dd50=_0x20492f+a42_0x144d21[_0x5f12be(0x342)](_0x3e638b)+'\x20'+_0x5c3825;_0x5989e4[_0x5f12be(0x252)](_0x35dd50);const _0x13e1bd=0x16;let _0xd073a8=0x0;for(const _0x33402f of _0x25b8b5){const _0x4bd113=_0x33402f[_0x5f12be(0x2e6)][_0x5f12be(0x23b)]?.[_0x5f12be(0x30d)]||'?',_0x3f4b97=Math[_0x5f12be(0x32a)](stringWidth(_0x4bd113),_0x13e1bd);_0xd073a8=Math[_0x5f12be(0x2b1)](_0xd073a8,_0x3f4b97);}for(const _0x46f52b of _0x25b8b5){const {session:_0x19256e,startTime:_0x3090b0,endTime:_0x20b739,duration:_0x176778}=_0x46f52b,_0x4abbfc=_0x19256e[_0x5f12be(0x23b)]?.['id'],_0x25979a=_0x19256e['id'],_0x433b8c=_0x19256e[_0x5f12be(0x23b)]?.['name']||'?',_0x530484=_0x19256e[_0x5f12be(0x2cf)]?.[_0x5f12be(0x30d)]||'?';let _0x90e290,_0x35425e;if(_0x19256e[_0x5f12be(0x2e0)]){const _0x4c8952=_0x19256e[_0x5f12be(0x2e0)];!_0x4c8952['done']?(_0x90e290=_0x4c8952['cancelRequested']?'🛑':'🔄',_0x35425e=_0x4c8952[_0x5f12be(0x2b3)]?a42_0x144d21[_0x5f12be(0x26f)]:a42_0x144d21['blue']):(_0x90e290=_0x4c8952[_0x5f12be(0x2f1)]?'✅':'❌',_0x35425e=_0x4c8952['success']?a42_0x144d21[_0x5f12be(0x295)]:a42_0x144d21['red']);}else _0x90e290='⏳',_0x35425e=a42_0x144d21['dim'];const _0x5b650e='#'+_0x25979a,_0x585f50=_0x4abbfc?hyperlink(_0x5b650e,getWorkflowSessionUrl(_0x4c1d2c,_0x4abbfc,_0x25979a)):_0x5b650e;let _0x12346f=_0x433b8c;stringWidth(_0x433b8c)>_0x13e1bd&&(_0x12346f=_0x433b8c[_0x5f12be(0x1f8)](0x0,_0x13e1bd-0x1)+'…');const _0x5e3e25=a42_0x144d21[_0x5f12be(0x342)](_0x12346f),_0x5d72e2=stringWidth(_0x12346f),_0x34ea80='\x20'[_0x5f12be(0x278)](_0xd073a8-stringWidth(_0x12346f)+0x2),_0x4514e8='('+formatElapsed(_0x176778)+')',_0x363200=stringWidth(_0x4514e8),_0x302f71=stringWidth(_0x5b650e),_0x1fb54e=_0x302f71+0x1+_0x5d72e2+_0x34ea80[_0x5f12be(0x328)],_0x15bd8d=_0x57bc57-_0x1fb54e-_0x363200-0x1-0x8;let _0x2e3f4a=_0x530484;stringWidth(_0x2e3f4a)>_0x15bd8d&&(_0x2e3f4a=_0x2e3f4a['slice'](0x0,_0x15bd8d-0x1)+'…');const _0x57e20e=_0x585f50+'\x20'+_0x5e3e25+_0x34ea80+_0x2e3f4a,_0x58b033=stringWidth(_0x57e20e),_0x3523bb=_0x57bc57-_0x58b033-_0x363200,_0x1d1b68=_0x57e20e+'\x20'['repeat'](Math['max'](0x1,_0x3523bb))+a42_0x144d21[_0x5f12be(0x342)](_0x4514e8),_0x4ae7b3=Math[_0x5f12be(0x240)]((_0x3090b0-_0x4e6c45)/_0x50c446),_0x2c254c=Math[_0x5f12be(0x240)]((_0x20b739-_0x4e6c45)/_0x50c446),_0x39ab67=Math[_0x5f12be(0x2b1)](_0x4ae7b3+0x1,_0x2c254c),_0x42596d=new Array(_0x263eac)[_0x5f12be(0x276)]('\x20');for(let _0xdc1b97=_0x4ae7b3;_0xdc1b97<Math[_0x5f12be(0x32a)](_0x39ab67,_0x263eac);_0xdc1b97++){_0x42596d[_0xdc1b97]='─';}const _0x47e84e=_0x42596d[_0x5f12be(0x258)](_0x2647a0=>_0x2647a0==='\x20'?'\x20':_0x35425e(_0x2647a0))[_0x5f12be(0x1fd)]('');_0x5989e4['push'](_0x90e290+'\x20'+_0x1d1b68+'│'+_0x47e84e+'│');}return _0x5989e4[_0x5f12be(0x1fd)]('\x0a');}async['navigateSessionsInteractive'](_0x282dc4,_0x5204c9,_0x48ab96){const _0x597601=a42_0xe6da40,{options:_0x3ade42,tdx:_0x3a5f5a}=_0x5204c9,_0x197d43=_0x3ade42['site'],{timelineRows:_0x5b105e,timeAxisHeader:_0x458a9c}=this[_0x597601(0x2d7)](_0x282dc4,_0x197d43),_0x24be96=_0x5b105e[_0x597601(0x29d)](_0x48e38c=>_0x48e38c[_0x597601(0x382)]);if(_0x24be96['length']===0x0){const _0x1fd7d1=this[_0x597601(0x282)](_0x282dc4,_0x197d43);console[_0x597601(0x305)](_0x1fd7d1);!_0x48ab96&&(console[_0x597601(0x22b)](''),console['error'](a42_0x144d21[_0x597601(0x342)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x597601(0x22b)](a42_0x144d21[_0x597601(0x342)](_0x597601(0x2d1))+'or'+a42_0x144d21['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x458a9c&&console[_0x597601(0x305)](_0x458a9c);const _0x3b2f8a=_0x5b105e['filter'](_0x6dfc24=>_0x6dfc24[_0x597601(0x382)])['map'](_0x57cc31=>({'title':_0x57cc31['displayLine'],'value':_0x57cc31[_0x597601(0x382)]})),_0x34c1be=process[_0x597601(0x359)]['rows']||0x3c,_0x259c12=Math[_0x597601(0x2b1)](0x28,Math[_0x597601(0x240)](_0x34c1be*0x2/0x3)),_0x2fc457=await a42_0x36de0e({'type':_0x597601(0x387),'name':_0x597601(0x382),'message':_0x597601(0x35b),'choices':_0x3b2f8a,'initial':-0x1,'limit':_0x259c12,'clearFirst':!![],'fallback':{'title':_0x597601(0x38c),'value':null},'suggest':(_0x380bd7,_0x526b75)=>{const _0x926d8c=_0x597601;if(!_0x380bd7)return Promise[_0x926d8c(0x28e)](_0x526b75);const _0x290ebb=_0x526b75[_0x926d8c(0x29d)](_0x512318=>{const _0x140f38=_0x926d8c,_0x5dddc4=_0x512318;return _0x5dddc4[_0x140f38(0x37a)]['toLowerCase']()[_0x140f38(0x2c9)](_0x380bd7[_0x140f38(0x2bc)]());});return Promise['resolve'](_0x290ebb);}}),_0x31320f=()=>{const _0x48d6e7=_0x597601;process[_0x48d6e7(0x359)]['write'](_0x48d6e7(0x1f4)),process[_0x48d6e7(0x359)][_0x48d6e7(0x2a3)](_0x48d6e7(0x1f4)),process[_0x48d6e7(0x359)][_0x48d6e7(0x2a3)](_0x48d6e7(0x1f4));},_0x189138=_0x2fc457&&_0x2fc457['attemptId']&&_0x2fc457[_0x597601(0x382)]!==null&&_0x2fc457[_0x597601(0x382)][_0x597601(0x27a)]()!=='';if(!_0x189138){_0x31320f(),console['log'](a42_0x144d21[_0x597601(0x342)](_0x597601(0x22c)));return;}_0x31320f();const _0x23e7e5=_0x282dc4[_0x597601(0x2b9)](_0x1ffa28=>_0x1ffa28[_0x597601(0x2e0)]?.['id']===_0x2fc457[_0x597601(0x382)]);if(_0x23e7e5){const _0x265515=_0x23e7e5[_0x597601(0x23b)]?.[_0x597601(0x30d)]||'?',_0x1631af=_0x23e7e5[_0x597601(0x2cf)]?.[_0x597601(0x30d)]||'?';console[_0x597601(0x305)]('Project:\x20'+a42_0x144d21[_0x597601(0x342)](_0x265515)+_0x597601(0x317)+a42_0x144d21['dim'](_0x1631af));}const _0x2089d8=new WorkflowTimelineCommand();await _0x2089d8[_0x597601(0x1f1)]({'args':[],'options':{..._0x3ade42,'attemptId':_0x2fc457['attemptId']},'tdx':_0x3a5f5a});}[a42_0xe6da40(0x2d7)](_0x12bca4,_0x17efdb){const _0x1d45db=a42_0xe6da40,_0x15805c=new Map();for(const _0x377730 of _0x12bca4){_0x377730['id']&&_0x377730[_0x1d45db(0x2e0)]?.['id']&&_0x15805c[_0x1d45db(0x214)](_0x377730['id'],_0x377730[_0x1d45db(0x2e0)]['id']);}const _0x3c0eb0=[];let _0xd38b49='';const _0x25bf17=this[_0x1d45db(0x282)](_0x12bca4,_0x17efdb),_0x418459=_0x25bf17[_0x1d45db(0x396)]('\x0a');for(const _0x54cfcf of _0x418459){if(_0x54cfcf['startsWith'](_0x1d45db(0x261))||_0x54cfcf[_0x1d45db(0x292)](/^\s+\d{4}-\d{2}-\d{2}/))_0xd38b49=_0x54cfcf;else{if(_0x54cfcf['match'](/^[✅❌🔄🛑⏳]/)){const _0x277d17=_0x54cfcf[_0x1d45db(0x292)](/#(\d+)/),_0x3e43a9=_0x277d17?_0x277d17[0x1]:null,_0x5834e5=_0x3e43a9?_0x15805c[_0x1d45db(0x205)](_0x3e43a9)||null:null,_0x36abc2=_0x12bca4['find'](_0x199182=>_0x199182['id']===_0x3e43a9),_0x2ed451=_0x36abc2?.[_0x1d45db(0x23b)]?.[_0x1d45db(0x30d)]||'';_0x3c0eb0[_0x1d45db(0x252)]({'displayLine':_0x54cfcf,'attemptId':_0x5834e5,'projectName':_0x2ed451});}}}return{'timelineRows':_0x3c0eb0,'timeAxisHeader':_0xd38b49};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x218);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x225);async[a42_0xe6da40(0x1f1)](_0x330cee){const _0x534997=a42_0xe6da40,{options:_0x1e9409,args:_0x3667fd,tdx:_0x574293}=_0x330cee,_0x2c0805=this['parseProjectWorkflowPattern'](_0x3667fd,_0x1e9409);if(!_0x2c0805)return 0x1;const {projectName:_0x225fd1,workflowName:_0x5fb4f0}=_0x2c0805,_0x344dc7=_0x1e9409[_0x534997(0x329)];if(_0x1e9409['verbose']){if(_0x225fd1&&_0x5fb4f0)console['error']('Filter:\x20'+_0x225fd1+'.'+_0x5fb4f0);else _0x225fd1&&console[_0x534997(0x22b)](_0x534997(0x372)+_0x225fd1);_0x344dc7&&console[_0x534997(0x22b)]('Include\x20retried:\x20yes');}const _0x48c29f=await withSpinner(_0x534997(0x2fc),()=>_0x574293[_0x534997(0x2cf)]['attempts']({'projectName':_0x225fd1,'workflowName':_0x5fb4f0,'includeRetried':_0x344dc7,'limit':_0x1e9409[_0x534997(0x28f)]}),{'verbose':_0x1e9409[_0x534997(0x350)]}),_0x28fb1f=_0x48c29f[_0x534997(0x374)],_0x51139b=_0x1e9409[_0x534997(0x28f)]||0x64,_0x5252e2=_0x28fb1f[_0x534997(0x328)]>=_0x51139b?a42_0x144d21[_0x534997(0x342)](_0x534997(0x321)):'';console[_0x534997(0x22b)]('✔\x20Found\x20'+_0x28fb1f[_0x534997(0x328)]+_0x534997(0x25e)+(_0x28fb1f[_0x534997(0x328)]!==0x1?'s':'')+_0x5252e2);if(_0x1e9409[_0x534997(0x206)]===_0x534997(0x385)||_0x1e9409[_0x534997(0x206)]===_0x534997(0x25a)||_0x1e9409[_0x534997(0x206)]==='table')await handleSDKOutput(_0x28fb1f,_0x1e9409);else{if(_0x28fb1f['length']===0x0){if(_0x225fd1&&_0x5fb4f0)console[_0x534997(0x305)](_0x534997(0x36c)+_0x225fd1+'.'+_0x5fb4f0);else _0x225fd1?console[_0x534997(0x305)](_0x534997(0x247)+_0x225fd1):console['log'](_0x534997(0x274));}else{const _0x4307e0=_0x1e9409['site'],_0x295f42=_0x28fb1f['map'](_0x66a196=>{const _0x23ef86=_0x534997,_0x2eeb6e=a42_0x144d21[_0x23ef86(0x342)]('#'+_0x66a196['id']),_0x1808c3=_0x66a196[_0x23ef86(0x23b)]?.['id'],_0x20eaee=_0x66a196[_0x23ef86(0x1f6)]||_0x66a196[_0x23ef86(0x29a)],_0x44637c=_0x1808c3&&_0x20eaee?hyperlink(_0x2eeb6e,getWorkflowAttemptUrl(_0x4307e0,_0x1808c3,_0x20eaee,_0x66a196['id'])):_0x2eeb6e,{icon:_0x5e14b9,text:_0x577b11}=getAttemptStatusDisplay(_0x66a196),_0x45321e=(_0x66a196[_0x23ef86(0x23b)]?.[_0x23ef86(0x30d)]||'?')+'.'+(_0x66a196['workflow']?.[_0x23ef86(0x30d)]||'?'),_0x49e71f=_0x66a196[_0x23ef86(0x31f)]?a42_0x144d21[_0x23ef86(0x342)](_0x66a196['sessionTime']):'';return(_0x44637c+'\x20'+_0x5e14b9+(_0x577b11?'\x20'+_0x577b11:'')+'\x20'+_0x45321e+'\x20'+_0x49e71f)[_0x23ef86(0x326)]();});await writeOutput(_0x295f42[_0x534997(0x1fd)]('\x0a'),_0x1e9409[_0x534997(0x38a)],_0x534997(0x312));}}return 0x0;}}function a42_0x4f05(_0x137c22,_0x349a39){_0x137c22=_0x137c22-0x1ef;const _0x59b6e6=a42_0x59b6();let _0x4f05a3=_0x59b6e6[_0x137c22];return _0x4f05a3;}export class WorkflowAttemptCommand extends BaseCommand{['name']=a42_0xe6da40(0x34d);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x28d);async[a42_0xe6da40(0x1f1)](_0x154446){const _0x5533d5=a42_0xe6da40,{options:_0x32d980,args:_0x438862,tdx:_0x39c823}=_0x154446,_0x457153=_0x438862[0x0];if(!_0x457153)return console[_0x5533d5(0x22b)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x32d980[_0x5533d5(0x350)]&&console[_0x5533d5(0x22b)]('Attempt\x20ID:\x20'+_0x457153);const _0x4c292a=await withSpinner('Getting\x20attempt\x20details...',()=>_0x39c823[_0x5533d5(0x2cf)][_0x5533d5(0x28a)](_0x457153),{'verbose':_0x32d980[_0x5533d5(0x350)]}),_0x2dea84=_0x4c292a['data'];let _0x3fd4a8;!_0x2dea84[_0x5533d5(0x377)]?_0x3fd4a8=_0x2dea84[_0x5533d5(0x2b3)]?_0x5533d5(0x241):_0x5533d5(0x2c7):_0x3fd4a8=_0x2dea84['success']?'success':_0x5533d5(0x22b);let _0xf8255b;if(_0x2dea84[_0x5533d5(0x267)]&&_0x2dea84[_0x5533d5(0x2ef)]){const _0xdfffdf=new Date(_0x2dea84['createdAt'])[_0x5533d5(0x33d)](),_0x425427=new Date(_0x2dea84['finishedAt'])[_0x5533d5(0x33d)]();_0xf8255b=Math[_0x5533d5(0x2c5)]((_0x425427-_0xdfffdf)/0x3e8);}const _0x3ba14d={'attempt_id':_0x2dea84['id'],'status':_0x3fd4a8,..._0x2dea84['index']!==undefined&&{'index':_0x2dea84['index']},..._0x2dea84[_0x5533d5(0x23b)]&&{'project':_0x2dea84[_0x5533d5(0x23b)]['name']},..._0x2dea84['workflow']&&{'workflow':_0x2dea84[_0x5533d5(0x2cf)][_0x5533d5(0x30d)]},..._0x2dea84[_0x5533d5(0x29a)]&&{'session_id':_0x2dea84[_0x5533d5(0x29a)]},..._0x2dea84[_0x5533d5(0x31f)]&&{'session_time':_0x2dea84[_0x5533d5(0x31f)]},..._0x2dea84['retryAttemptName']&&{'retry_attempt':_0x2dea84[_0x5533d5(0x319)]},..._0xf8255b!==undefined&&{'duration_sec':_0xf8255b},..._0x2dea84[_0x5533d5(0x267)]&&{'created_at':_0x2dea84[_0x5533d5(0x267)]},..._0x2dea84[_0x5533d5(0x2ef)]&&{'finished_at':_0x2dea84[_0x5533d5(0x2ef)]},...Object['keys'](_0x2dea84['params'])['length']>0x0&&{'params':_0x2dea84[_0x5533d5(0x301)]}};return await handleSingleObjectOutput(_0x3ba14d,_0x32d980),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0xe6da40(0x30d)]='workflow:tasks';[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x2a7);async[a42_0xe6da40(0x1f1)](_0x1b3cfa){const _0x5a64f3=a42_0xe6da40,{options:_0x4b0a79,args:_0x5a72fd,tdx:_0x4dda7a}=_0x1b3cfa,_0x2e095d=_0x5a72fd[0x0];if(!_0x2e095d)return console[_0x5a64f3(0x22b)](_0x5a64f3(0x285)),0x1;const _0x33cd4f=_0x4b0a79[_0x5a64f3(0x208)];_0x4b0a79['verbose']&&(console[_0x5a64f3(0x22b)](_0x5a64f3(0x300)+_0x2e095d),_0x33cd4f&&console[_0x5a64f3(0x22b)](_0x5a64f3(0x1fa)));const _0x2690ce=await withSpinner(_0x5a64f3(0x320),()=>_0x4dda7a['workflow']['tasks'](_0x2e095d,_0x33cd4f||![]),{'verbose':_0x4b0a79[_0x5a64f3(0x350)]}),_0x1a79f8=_0x2690ce[_0x5a64f3(0x374)];return console['error'](_0x5a64f3(0x229)+_0x1a79f8['length']+_0x5a64f3(0x32b)+(_0x1a79f8[_0x5a64f3(0x328)]!==0x1?'s':'')),await handleSDKOutput(_0x1a79f8,_0x4b0a79),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2b4);['description']=a42_0xe6da40(0x26a);async['execute'](_0x3b2612){const _0xd1b9e6=a42_0xe6da40,{options:_0x448cd5,args:_0x1c1810,tdx:_0x43b362}=_0x3b2612,_0xe416e3=_0x1c1810[0x0];let _0x580ad1=_0x1c1810[0x1];if(!_0xe416e3)return console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x285)),0x1;_0x448cd5[_0xd1b9e6(0x350)]&&(console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x300)+_0xe416e3),_0x580ad1&&console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x376)+_0x580ad1));const _0x496503=await withSpinner(_0xd1b9e6(0x2ae),()=>_0x43b362[_0xd1b9e6(0x2cf)][_0xd1b9e6(0x38e)](_0xe416e3,_0x580ad1),{'verbose':_0x448cd5[_0xd1b9e6(0x350)]}),_0x4aab50=_0x496503[_0xd1b9e6(0x374)];if(_0x4aab50[_0xd1b9e6(0x328)]===0x0)return console['error'](_0xd1b9e6(0x277)),0x0;if(!_0x580ad1&&(_0x448cd5[_0xd1b9e6(0x385)]||_0x448cd5['format']))return await handleSDKOutput(_0x4aab50,_0x448cd5),0x0;if(!_0x580ad1){const _0x146c40=_0x4aab50[_0xd1b9e6(0x258)](_0x49fea0=>({'title':_0x49fea0[_0xd1b9e6(0x1ef)]+'\x20('+formatBytes(_0x49fea0['fileSize'])+')','value':_0x49fea0[_0xd1b9e6(0x1ef)]})),_0x7a2141=await a42_0x36de0e({'type':_0xd1b9e6(0x27c),'name':_0xd1b9e6(0x311),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x146c40});if(!_0x7a2141['task'])return console[_0xd1b9e6(0x22b)]('Cancelled'),0x0;_0x580ad1=_0x7a2141[_0xd1b9e6(0x311)];}const _0x2eb49f=await withSpinner('Downloading\x20logs...',()=>_0x43b362[_0xd1b9e6(0x2cf)][_0xd1b9e6(0x2f9)](_0xe416e3,_0x580ad1),{'verbose':_0x448cd5[_0xd1b9e6(0x350)]}),_0xc4a511=_0x2eb49f[_0xd1b9e6(0x374)];return _0xc4a511?console['log'](_0xc4a511):console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x344)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x371);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x349);async['execute'](_0x28fe6c){const _0x3e0f58=a42_0xe6da40,{options:_0xf89323,args:_0x504a87,tdx:_0x1d1c42}=_0x28fe6c,_0x1cebc4=_0x504a87[0x0];if(!_0x1cebc4)return console[_0x3e0f58(0x22b)](_0x3e0f58(0x285)),0x1;const _0x301e68=_0xf89323['reason'];_0xf89323[_0x3e0f58(0x350)]&&(console[_0x3e0f58(0x22b)](_0x3e0f58(0x300)+_0x1cebc4),_0x301e68&&console[_0x3e0f58(0x22b)](_0x3e0f58(0x290)+_0x301e68));if(!_0xf89323[_0x3e0f58(0x288)]){if(!isInteractive())return console['error'](a42_0x144d21[_0x3e0f58(0x323)](_0x3e0f58(0x224)),_0x3e0f58(0x243)),console['error'](a42_0x144d21[_0x3e0f58(0x342)](_0x3e0f58(0x333))),0x1;const _0x24aa3a=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x1cebc4+'?');if(!_0x24aa3a)return console[_0x3e0f58(0x22b)](a42_0x144d21[_0x3e0f58(0x26f)](_0x3e0f58(0x22c))),0x1;}const _0x1e2e24=await withSpinner('Killing\x20attempt...',()=>_0x1d1c42[_0x3e0f58(0x2cf)][_0x3e0f58(0x24a)](_0x1cebc4,_0x301e68),{'verbose':_0xf89323[_0x3e0f58(0x350)]}),_0x35217f=_0x1e2e24[_0x3e0f58(0x374)];return console[_0x3e0f58(0x22b)]('✔\x20'+_0x35217f),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x223);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x30a);async[a42_0xe6da40(0x1f1)](_0x4fbb94){const _0x25c5cb=a42_0xe6da40,{options:_0x4afaca,args:_0x2e35e4,tdx:_0x3233e4}=_0x4fbb94,_0x3def0c=_0x2e35e4[0x0];if(!_0x3def0c)return console['error'](_0x25c5cb(0x2ce)),console[_0x25c5cb(0x22b)](_0x25c5cb(0x2ee)),0x1;let _0xae4adc=![],_0x29d1a3=_0x3def0c;if(_0x3def0c[_0x25c5cb(0x21e)](_0x25c5cb(0x1f7)))_0xae4adc=!![],_0x29d1a3=_0x3def0c[_0x25c5cb(0x34c)](0x8);else{if(_0x3def0c[_0x25c5cb(0x21e)](_0x25c5cb(0x20d)))_0xae4adc=![],_0x29d1a3=_0x3def0c[_0x25c5cb(0x34c)](0x8);else return console[_0x25c5cb(0x22b)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x25c5cb(0x22b)](_0x25c5cb(0x2ee)),0x1;}const _0x3cf676=_0x4afaca[_0x25c5cb(0x360)],_0x170d85=_0x4afaca[_0x25c5cb(0x207)],_0x469264=_0x4afaca[_0x25c5cb(0x301)],_0x14d8bf=_0x4afaca[_0x25c5cb(0x34b)];_0x4afaca[_0x25c5cb(0x350)]&&(console[_0x25c5cb(0x22b)](_0x25c5cb(0x363)+(_0xae4adc?'session':_0x25c5cb(0x28a))+'\x20'+_0x29d1a3),_0x3cf676&&console[_0x25c5cb(0x22b)](_0x25c5cb(0x30f)+_0x3cf676),_0x170d85&&console[_0x25c5cb(0x22b)]('Resume\x20from:\x20'+_0x170d85),_0x469264&&console[_0x25c5cb(0x22b)](_0x25c5cb(0x324)+_0x469264),_0x14d8bf&&console[_0x25c5cb(0x22b)](_0x25c5cb(0x394)));let _0x38fb51;if(_0x469264)try{if(_0x469264[_0x25c5cb(0x21e)]('@')){const _0x2ba21a=await import(_0x25c5cb(0x217)),_0x595354=_0x469264['substring'](0x1),_0x6c2525=await _0x2ba21a['readFile'](_0x595354,_0x25c5cb(0x2fe));_0x38fb51=JSON[_0x25c5cb(0x20c)](_0x6c2525);}else _0x38fb51=JSON[_0x25c5cb(0x20c)](_0x469264);}catch{return console['error'](_0x25c5cb(0x39a)),0x1;}if(!_0x4afaca[_0x25c5cb(0x288)]){if(!isInteractive())return console['error'](a42_0x144d21[_0x25c5cb(0x323)](_0x25c5cb(0x224)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x25c5cb(0x22b)](a42_0x144d21[_0x25c5cb(0x342)](_0x25c5cb(0x333))),0x1;const _0x115841=await confirmKey(_0x25c5cb(0x393)+(_0xae4adc?'session':'attempt')+'\x20'+_0x29d1a3+'?');if(!_0x115841)return console[_0x25c5cb(0x22b)](a42_0x144d21[_0x25c5cb(0x26f)](_0x25c5cb(0x22c))),0x1;}let _0x2edd6f;_0xae4adc?_0x2edd6f=await withSpinner('Retrying\x20session...',()=>_0x3233e4[_0x25c5cb(0x2cf)][_0x25c5cb(0x36b)](_0x29d1a3,{'fromTask':_0x3cf676,'retryParams':_0x38fb51}),{'verbose':_0x4afaca[_0x25c5cb(0x350)]}):_0x2edd6f=await withSpinner(_0x25c5cb(0x293),()=>_0x3233e4['workflow'][_0x25c5cb(0x351)](_0x29d1a3,{'resumeFrom':_0x170d85,'retryParams':_0x38fb51,'force':_0x14d8bf}),{'verbose':_0x4afaca[_0x25c5cb(0x350)]});const _0x42a954=_0x2edd6f[_0x25c5cb(0x374)];return console[_0x25c5cb(0x22b)]('✔\x20Retry\x20started'),console['error'](_0x25c5cb(0x228)+_0x42a954[_0x25c5cb(0x382)]),console['error'](_0x25c5cb(0x32c)+_0x42a954[_0x25c5cb(0x29a)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]='workflow:run';['description']=a42_0xe6da40(0x345);async[a42_0xe6da40(0x1f1)](_0x57091b){const _0x561cba=a42_0xe6da40,{options:_0xfbd186,args:_0x2d9b04,tdx:_0xb3a71c}=_0x57091b;let _0x5d9792=_0x2d9b04[0x0];if(!_0x5d9792){const _0x4af0bb=this[_0x561cba(0x2c6)]([],_0xfbd186),_0x4248b4=await withSpinner('Loading\x20workflows...',()=>_0xb3a71c[_0x561cba(0x2cf)][_0x561cba(0x313)](_0x4af0bb,{'limit':_0xfbd186[_0x561cba(0x28f)]}),{'verbose':_0xfbd186[_0x561cba(0x350)]}),_0x360027=_0x4248b4[_0x561cba(0x374)];if(_0x360027[_0x561cba(0x328)]===0x0)return console['error'](_0x561cba(0x269)),!_0x4af0bb&&console['error'](a42_0x144d21[_0x561cba(0x342)](_0x561cba(0x2dd))),0x1;const _0x3c8e17=_0x360027[_0x561cba(0x258)](_0x55dce0=>({'title':_0x55dce0['project']?.[_0x561cba(0x30d)]+'.'+_0x55dce0[_0x561cba(0x30d)],'value':_0x55dce0[_0x561cba(0x23b)]?.['name']+'.'+_0x55dce0[_0x561cba(0x30d)],'description':_0x55dce0[_0x561cba(0x30b)]?_0x561cba(0x260)+_0x55dce0[_0x561cba(0x30b)]:undefined})),_0x236a7b=await a42_0x36de0e({'type':_0x561cba(0x27c),'name':_0x561cba(0x2cf),'message':_0x561cba(0x2fd),'choices':_0x3c8e17});if(!_0x236a7b[_0x561cba(0x2cf)])return 0x1;_0x5d9792=_0x236a7b[_0x561cba(0x2cf)];}if(!_0x5d9792['includes']('.')){const _0x306aca=this[_0x561cba(0x2c6)]([],_0xfbd186);if(_0x306aca)_0x5d9792=_0x306aca+'.'+_0x5d9792;else return console[_0x561cba(0x22b)](a42_0x144d21[_0x561cba(0x323)](_0x561cba(0x2b5)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a42_0x144d21[_0x561cba(0x342)](_0x561cba(0x2dd))),0x1;}const _0x27a378=_0xfbd186['param'],_0x19d258=_0xfbd186[_0x561cba(0x31f)],_0x1888b1={};if(_0x27a378&&Array[_0x561cba(0x2d2)](_0x27a378))for(const _0x40a527 of _0x27a378){const _0x549220=_0x40a527[_0x561cba(0x31d)]('=');if(_0x549220===-0x1)return console[_0x561cba(0x22b)](_0x561cba(0x386)+_0x40a527),console[_0x561cba(0x22b)](_0x561cba(0x32f)),0x1;const _0x4b645d=_0x40a527[_0x561cba(0x34c)](0x0,_0x549220),_0x135b6f=_0x40a527[_0x561cba(0x34c)](_0x549220+0x1);try{_0x1888b1[_0x4b645d]=JSON[_0x561cba(0x20c)](_0x135b6f);}catch{_0x1888b1[_0x4b645d]=_0x135b6f;}}_0xfbd186['verbose']&&(console['error'](_0x561cba(0x249)+_0x5d9792),Object[_0x561cba(0x1fe)](_0x1888b1)[_0x561cba(0x328)]>0x0&&console[_0x561cba(0x22b)](_0x561cba(0x281)+JSON[_0x561cba(0x271)](_0x1888b1)),_0x19d258&&console[_0x561cba(0x22b)](_0x561cba(0x327)+_0x19d258));const _0x400e46=await withSpinner(_0x561cba(0x2e7),()=>_0xb3a71c[_0x561cba(0x2cf)][_0x561cba(0x364)](_0x5d9792,_0x1888b1,{'sessionTime':_0x19d258}),{'verbose':_0xfbd186[_0x561cba(0x350)]}),_0x322193=_0x400e46[_0x561cba(0x374)];console[_0x561cba(0x22b)](_0x561cba(0x20f)),console[_0x561cba(0x22b)](_0x561cba(0x1f9)+_0x322193['id']),console[_0x561cba(0x22b)](_0x561cba(0x32c)+_0x322193[_0x561cba(0x29a)]),console['error'](_0x561cba(0x314)+_0x322193[_0x561cba(0x23b)]?.[_0x561cba(0x30d)]),console[_0x561cba(0x22b)]('\x20\x20Workflow:\x20'+_0x322193[_0x561cba(0x2cf)]?.['name']);if(_0x322193[_0x561cba(0x23b)]?.['id']&&_0x322193[_0x561cba(0x29a)]&&_0x322193['id']){const _0x14c371=_0xfbd186['site'],_0x47654b=getConsoleUrl(_0x14c371,_0x561cba(0x318)+_0x322193[_0x561cba(0x23b)]['id']+_0x561cba(0x37b)+_0x322193['sessionId']+_0x561cba(0x1f5)+_0x322193['id']);console[_0x561cba(0x22b)](_0x561cba(0x256)+a42_0x144d21[_0x561cba(0x238)](_0x47654b));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x297);[a42_0xe6da40(0x2f2)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0xe6da40(0x1f1)](_0x3da241){const _0x26d2e8=a42_0xe6da40,{options:_0x298dd5,args:_0x28d715,tdx:_0x2ae74a}=_0x3da241,_0x251f4c=_0x28d715[0x0],_0x29ac97=_0x28d715[0x1]||'.';if(!_0x251f4c)return console[_0x26d2e8(0x22b)](_0x26d2e8(0x332)),console['error'](_0x26d2e8(0x1ff)),0x1;const _0x1d1abd=_0x298dd5[_0x26d2e8(0x30b)];_0x298dd5['verbose']&&(console['error'](_0x26d2e8(0x33c)+_0x251f4c),console[_0x26d2e8(0x22b)](_0x26d2e8(0x242)+_0x29ac97),_0x1d1abd&&console[_0x26d2e8(0x22b)](_0x26d2e8(0x250)+_0x1d1abd));const _0x5945c0=await withSpinner('Downloading\x20project\x20'+_0x251f4c+'...',()=>_0x2ae74a[_0x26d2e8(0x2cf)][_0x26d2e8(0x2fb)](_0x251f4c,_0x29ac97,{'revision':_0x1d1abd}),{'verbose':_0x298dd5[_0x26d2e8(0x350)]}),_0x4e3fcc=_0x5945c0[_0x26d2e8(0x374)];return console['error'](_0x26d2e8(0x2c2)+_0x4e3fcc['projectName']),console[_0x26d2e8(0x22b)](_0x26d2e8(0x2ac)+_0x4e3fcc['revision']),console[_0x26d2e8(0x22b)](_0x26d2e8(0x2dc)+_0x4e3fcc[_0x26d2e8(0x2e4)]),console['error'](_0x26d2e8(0x213)+_0x29ac97+'/'+_0x4e3fcc[_0x26d2e8(0x37d)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2b0);[a42_0xe6da40(0x2f2)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a42_0xe6da40(0x1f1)](_0x1dfd5e){const _0x454f26=a42_0xe6da40,{options:_0x1b1e4a,args:_0xc9f346,tdx:_0x1fc3f6}=_0x1dfd5e;let _0xf62bc9='.',_0x50915e=_0x1b1e4a[_0x454f26(0x30d)];if(_0xc9f346[0x0]){const {promises:_0x1237b7}=await import('fs');try{const _0x1b5353=await _0x1237b7['stat'](_0xc9f346[0x0]);if(_0x1b5353['isDirectory']())_0xf62bc9=_0xc9f346[0x0];else return console[_0x454f26(0x22b)](_0x454f26(0x35d)+_0xc9f346[0x0]+_0x454f26(0x211)),0x1;}catch{_0x50915e=_0xc9f346[0x0],_0xf62bc9='.';}}const _0x5398b1=_0x1b1e4a[_0x454f26(0x30b)],_0xf54192=_0x1b1e4a['skipValidation'];_0x1b1e4a[_0x454f26(0x350)]&&(console[_0x454f26(0x22b)]('Project\x20directory:\x20'+_0xf62bc9),_0x50915e&&console['error'](_0x454f26(0x23a)+_0x50915e),_0x5398b1&&console[_0x454f26(0x22b)](_0x454f26(0x250)+_0x5398b1),_0xf54192&&console[_0x454f26(0x22b)](_0x454f26(0x37c)));const _0x21bf2f=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x1fc3f6[_0x454f26(0x2cf)][_0x454f26(0x252)](_0xf62bc9,{'projectName':_0x50915e,'revision':_0x5398b1,'skipValidation':_0xf54192}),{'verbose':_0x1b1e4a[_0x454f26(0x350)]}),_0x5d5acc=_0x21bf2f['data'];return console[_0x454f26(0x22b)]('✔\x20Pushed\x20'+_0x5d5acc[_0x454f26(0x37d)]),console[_0x454f26(0x22b)]('\x20\x20Project\x20ID:\x20'+_0x5d5acc[_0x454f26(0x28b)]),console[_0x454f26(0x22b)](_0x454f26(0x2ac)+_0x5d5acc['revision']),await this['showWorkflowConsoleUrl'](_0x1fc3f6,_0x5d5acc[_0x454f26(0x37d)],_0x1b1e4a[_0x454f26(0x2f3)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2bf);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x2ad);async['execute'](_0x40c82c){const _0x33ce01=a42_0xe6da40,{options:_0xe28af5,args:_0x226bf5,tdx:_0x39571a}=_0x40c82c,_0xa0896=_0x226bf5[0x0],_0x598d70=_0x226bf5[0x1];if(!_0xa0896)return console['error'](a42_0x144d21[_0x33ce01(0x323)](_0x33ce01(0x2b5)),_0x33ce01(0x398)),console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x342)](_0x33ce01(0x35c))),0x1;const _0x2bcbc3=_0xe28af5[_0x33ce01(0x30b)];_0xe28af5[_0x33ce01(0x350)]&&(console[_0x33ce01(0x22b)]('Project:\x20'+_0xa0896),_0x598d70&&console[_0x33ce01(0x22b)](_0x33ce01(0x30e)+_0x598d70),_0x2bcbc3&&console[_0x33ce01(0x22b)](_0x33ce01(0x250)+_0x2bcbc3),_0xe28af5[_0x33ce01(0x378)]&&console[_0x33ce01(0x22b)]('Dry\x20run:\x20yes'));const _0x57741f=await withSpinner(_0x33ce01(0x26e)+_0xa0896+_0x33ce01(0x275),()=>_0x39571a[_0x33ce01(0x2cf)][_0x33ce01(0x32d)](_0xa0896,{'targetDir':_0x598d70,'revision':_0x2bcbc3}),{'verbose':_0xe28af5[_0x33ce01(0x350)]}),_0x1c4d17=_0x57741f['data'];_0x1c4d17[_0x33ce01(0x27d)]?console['error'](_0x33ce01(0x304)+_0x1c4d17[_0x33ce01(0x37d)]):console[_0x33ce01(0x22b)](_0x33ce01(0x383)+_0x1c4d17['projectName']);console[_0x33ce01(0x22b)]('\x20\x20Revision:\x20'+_0x1c4d17[_0x33ce01(0x30b)]),console['error'](_0x33ce01(0x33f)+(a42_0x17adf7['relative'](process[_0x33ce01(0x367)](),_0x1c4d17[_0x33ce01(0x26c)])||'.')),console['error']('\x20\x20Changes:\x20'+a42_0x144d21[_0x33ce01(0x295)]('+'+_0x1c4d17[_0x33ce01(0x346)][_0x33ce01(0x220)]+_0x33ce01(0x263))+',\x20'+(a42_0x144d21[_0x33ce01(0x26f)]('~'+_0x1c4d17[_0x33ce01(0x346)][_0x33ce01(0x348)]+'\x20modified')+',\x20')+(a42_0x144d21[_0x33ce01(0x323)]('-'+_0x1c4d17[_0x33ce01(0x346)][_0x33ce01(0x362)]+_0x33ce01(0x2df))+',\x20')+(''+a42_0x144d21[_0x33ce01(0x342)](_0x1c4d17['summary'][_0x33ce01(0x235)]+_0x33ce01(0x23c))));for(const _0x43cbe of _0x1c4d17[_0x33ce01(0x2a1)]){_0x43cbe[_0x33ce01(0x24d)]==='modified'&&_0x43cbe[_0x33ce01(0x334)]&&(console[_0x33ce01(0x22b)]('\x0a'+a42_0x144d21[_0x33ce01(0x238)]('---\x20'+_0x43cbe[_0x33ce01(0x37e)])),console[_0x33ce01(0x22b)](_0x43cbe[_0x33ce01(0x334)]));}if(!_0x1c4d17[_0x33ce01(0x38f)])return saveSessionContext({'workflow_project':_0x1c4d17['projectName']},_0xe28af5[_0x33ce01(0x2e6)]),console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x295)](_0x33ce01(0x2cd))),console['error'](a42_0x144d21[_0x33ce01(0x342)](_0x33ce01(0x21f)+_0x1c4d17[_0x33ce01(0x37d)])),0x0;if(_0xe28af5[_0x33ce01(0x378)])return console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x26f)](_0x33ce01(0x27b))),0x0;if(!_0xe28af5[_0x33ce01(0x288)]){if(!isInteractive())return console['error'](a42_0x144d21[_0x33ce01(0x323)]('\x0aError:'),_0x33ce01(0x243)),console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x342)](_0x33ce01(0x333))),0x1;const _0x3a6e70=await confirmKey(_0x33ce01(0x24b));if(!_0x3a6e70)return console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x26f)](_0x33ce01(0x22c)),_0x33ce01(0x2a4)),0x1;}await withSpinner('Writing\x20files...',()=>_0x39571a[_0x33ce01(0x2cf)][_0x33ce01(0x29b)](_0x1c4d17,{'revision':_0x2bcbc3}),{'verbose':_0xe28af5[_0x33ce01(0x350)]}),saveSessionContext({'workflow_project':_0x1c4d17[_0x33ce01(0x37d)]},_0xe28af5[_0x33ce01(0x2e6)]),console['error'](a42_0x144d21['green']('✔\x20Pull\x20complete'));const _0x49c604=a42_0x17adf7[_0x33ce01(0x307)](process['cwd'](),_0x1c4d17[_0x33ce01(0x26c)])||'.';return console['error'](a42_0x144d21['dim']('\x20\x20Location:\x20'+_0x49c604)),console['error'](a42_0x144d21['dim'](_0x33ce01(0x21f)+_0x1c4d17[_0x33ce01(0x37d)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x203);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x22f);async[a42_0xe6da40(0x1f1)](_0x3a11c1){const _0x5f17ab=a42_0xe6da40,{options:_0x1142be,args:_0x25a900,tdx:_0x12ef40}=_0x3a11c1,_0x5a468a=this[_0x5f17ab(0x36e)](_0x25a900,_0x1142be),_0x30ed60=_0x1142be[_0x5f17ab(0x30b)],_0x23ea9a=_0x1142be[_0x5f17ab(0x253)];_0x1142be[_0x5f17ab(0x350)]&&(_0x5a468a&&console[_0x5f17ab(0x22b)](_0x5f17ab(0x2ff)+_0x5a468a),_0x30ed60&&console[_0x5f17ab(0x22b)](_0x5f17ab(0x250)+_0x30ed60),_0x1142be[_0x5f17ab(0x378)]&&console['error']('Dry\x20run:\x20yes'),_0x23ea9a&&console['error'](_0x5f17ab(0x37c)));let _0x567472;try{_0x567472=await withSpinner('Analyzing\x20changes...',()=>_0x12ef40['workflow'][_0x5f17ab(0x25c)]({'sourceDir':_0x5a468a,'revision':_0x30ed60,'skipValidation':_0x23ea9a}),{'verbose':_0x1142be[_0x5f17ab(0x350)]});}catch(_0x54892f){if(_0x54892f instanceof Error&&_0x54892f[_0x5f17ab(0x34f)][_0x5f17ab(0x2c9)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x323)](_0x5f17ab(0x2b5)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x1142be['workflowProject']?console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x342)]('Tip:\x20cd\x20to\x20workflows/'+_0x1142be['workflowProject']+_0x5f17ab(0x1fc)+_0x1142be[_0x5f17ab(0x308)]+'\x27')):console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x342)](_0x5f17ab(0x2ba))),0x1;throw _0x54892f;}const _0x4ee35a=_0x567472[_0x5f17ab(0x374)];console[_0x5f17ab(0x22b)]('✔\x20Project:\x20'+_0x4ee35a[_0x5f17ab(0x37d)]),console[_0x5f17ab(0x22b)](_0x5f17ab(0x262)+_0x4ee35a[_0x5f17ab(0x316)]),console[_0x5f17ab(0x22b)](_0x5f17ab(0x2ac)+_0x4ee35a['revision']),console['error'](_0x5f17ab(0x24e)+a42_0x144d21['green']('+'+_0x4ee35a['summary'][_0x5f17ab(0x220)]+_0x5f17ab(0x263))+',\x20'+(a42_0x144d21[_0x5f17ab(0x26f)]('~'+_0x4ee35a['summary'][_0x5f17ab(0x348)]+_0x5f17ab(0x230))+',\x20')+(a42_0x144d21[_0x5f17ab(0x323)]('-'+_0x4ee35a[_0x5f17ab(0x346)][_0x5f17ab(0x362)]+_0x5f17ab(0x2df))+',\x20')+(''+a42_0x144d21[_0x5f17ab(0x342)](_0x4ee35a[_0x5f17ab(0x346)][_0x5f17ab(0x235)]+_0x5f17ab(0x23c))));for(const _0x30dc52 of _0x4ee35a[_0x5f17ab(0x2a1)]){_0x30dc52[_0x5f17ab(0x24d)]==='modified'&&_0x30dc52['diff']&&(console[_0x5f17ab(0x22b)]('\x0a'+a42_0x144d21['cyan'](_0x5f17ab(0x280)+_0x30dc52[_0x5f17ab(0x37e)])),console[_0x5f17ab(0x22b)](_0x30dc52[_0x5f17ab(0x334)]));}if(!_0x4ee35a[_0x5f17ab(0x38f)])return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x295)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x5f17ab(0x20b)](_0x12ef40,_0x4ee35a[_0x5f17ab(0x37d)],_0x1142be[_0x5f17ab(0x2f3)]),0x0;if(_0x1142be['dryRun'])return console['error'](a42_0x144d21[_0x5f17ab(0x26f)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x1142be['yes']){if(!isInteractive())return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x323)](_0x5f17ab(0x224)),_0x5f17ab(0x243)),console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x342)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x35c22e=await confirmKey(_0x5f17ab(0x251));if(!_0x35c22e)return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x26f)](_0x5f17ab(0x22c)),_0x5f17ab(0x390)),0x1;}const _0x17d490=await withSpinner(_0x5f17ab(0x2da),()=>_0x12ef40[_0x5f17ab(0x2cf)]['executePushProject'](_0x4ee35a),{'verbose':_0x1142be['verbose']}),_0x14e7a5=_0x17d490['data'];return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x295)](_0x5f17ab(0x2af))),console['error'](_0x5f17ab(0x215)+_0x14e7a5[_0x5f17ab(0x28b)]),console['error'](_0x5f17ab(0x2ac)+_0x14e7a5[_0x5f17ab(0x30b)]),await this[_0x5f17ab(0x20b)](_0x12ef40,_0x14e7a5[_0x5f17ab(0x37d)],_0x1142be['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x286);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x259);async[a42_0xe6da40(0x1f1)](_0x51ff1d){const _0x1a1a26=a42_0xe6da40,{options:_0x1252e5,args:_0x33a8c7,tdx:_0xbabde6}=_0x51ff1d,_0x2a01b3=this[_0x1a1a26(0x36e)](_0x33a8c7,_0x1252e5),_0x5b9bd6=_0x1252e5[_0x1a1a26(0x30d)],_0x4ab5b1=_0x1252e5[_0x1a1a26(0x30b)],_0x258d4a=_0x1252e5[_0x1a1a26(0x253)];if(!_0x2a01b3)return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x323)]('Error:'),_0x1a1a26(0x2ed)),console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x342)](_0x1a1a26(0x33b))),console['error'](a42_0x144d21[_0x1a1a26(0x342)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x5b9bd6)return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x323)](_0x1a1a26(0x2b5)),_0x1a1a26(0x335)),console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x342)](_0x1a1a26(0x33b))),0x1;_0x1252e5['verbose']&&(console['error'](_0x1a1a26(0x2ff)+_0x2a01b3),console[_0x1a1a26(0x22b)]('New\x20project\x20name:\x20'+_0x5b9bd6),_0x4ab5b1&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x250)+_0x4ab5b1),_0x1252e5['dryRun']&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x1f0)),_0x258d4a&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x37c)));const _0x171dd9=await withSpinner('Analyzing\x20project...',()=>_0xbabde6[_0x1a1a26(0x2cf)][_0x1a1a26(0x306)](_0x2a01b3,_0x5b9bd6,{'revision':_0x4ab5b1,'skipValidation':_0x258d4a}),{'verbose':_0x1252e5[_0x1a1a26(0x350)]}),_0x3d7f8d=_0x171dd9['data'];console[_0x1a1a26(0x22b)]('Source:\x20'+_0x3d7f8d['sourceDir']);_0x3d7f8d['sourceProjectName']&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x284)+_0x3d7f8d[_0x1a1a26(0x365)]);console[_0x1a1a26(0x22b)]('New\x20project\x20name:\x20'+_0x3d7f8d[_0x1a1a26(0x2d9)]),console[_0x1a1a26(0x22b)](_0x1a1a26(0x250)+_0x3d7f8d[_0x1a1a26(0x30b)]),console[_0x1a1a26(0x22b)](_0x1a1a26(0x373)+_0x3d7f8d[_0x1a1a26(0x2ec)]);_0x3d7f8d[_0x1a1a26(0x381)]&&(console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x26f)]('\x0a⚠\x20Project\x20\x22'+_0x3d7f8d['newProjectName']+_0x1a1a26(0x33e)+_0x3d7f8d['existingProjectId']+')')),console[_0x1a1a26(0x22b)](a42_0x144d21['yellow']('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x1252e5['dryRun'])return console[_0x1a1a26(0x22b)](a42_0x144d21['yellow'](_0x1a1a26(0x1f3))),0x0;if(!_0x1252e5[_0x1a1a26(0x288)]){if(!isInteractive())return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x323)](_0x1a1a26(0x224)),_0x1a1a26(0x243)),console['error'](a42_0x144d21[_0x1a1a26(0x342)](_0x1a1a26(0x333))),0x1;const _0x11eb32=_0x3d7f8d['sourceProjectName']||a42_0x17adf7[_0x1a1a26(0x399)](_0x2a01b3),_0x2f8e7e=_0x3d7f8d[_0x1a1a26(0x381)]?_0x1a1a26(0x257)+_0x5b9bd6+_0x1a1a26(0x2b8):_0x1a1a26(0x200)+_0x11eb32+_0x1a1a26(0x29f)+_0x5b9bd6+'\x22?',_0x9a4c9e=await confirmKey(_0x2f8e7e);if(!_0x9a4c9e)return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x26f)]('Cancelled')),0x1;}const _0x34871c=await withSpinner(_0x3d7f8d['targetExists']?'Updating\x20'+_0x5b9bd6+'...':'Cloning\x20to\x20'+_0x5b9bd6+'...',()=>_0xbabde6[_0x1a1a26(0x2cf)][_0x1a1a26(0x2a2)](_0x3d7f8d),{'verbose':_0x1252e5['verbose']}),_0x2fd684=_0x34871c[_0x1a1a26(0x374)];return console[_0x1a1a26(0x22b)](a42_0x144d21['green'](_0x3d7f8d[_0x1a1a26(0x381)]?_0x1a1a26(0x2e5):'✔\x20Clone\x20complete')),console[_0x1a1a26(0x22b)](_0x1a1a26(0x314)+_0x2fd684[_0x1a1a26(0x2d9)]),console[_0x1a1a26(0x22b)](_0x1a1a26(0x215)+_0x2fd684[_0x1a1a26(0x20e)]),console[_0x1a1a26(0x22b)]('\x20\x20Revision:\x20'+_0x2fd684[_0x1a1a26(0x30b)]),await this[_0x1a1a26(0x20b)](_0xbabde6,_0x2fd684[_0x1a1a26(0x2d9)],_0x1252e5[_0x1a1a26(0x2f3)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x34a);[a42_0xe6da40(0x2f2)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0xe6da40(0x1f1)](_0xd3f620){const _0x39491f=a42_0xe6da40,{options:_0x18872f,args:_0x566122,tdx:_0x1f6b93}=_0xd3f620,_0x43b72d=_0x566122[0x0];if(!_0x43b72d)return console[_0x39491f(0x22b)](_0x39491f(0x202)),console[_0x39491f(0x22b)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x18872f[_0x39491f(0x350)]&&console[_0x39491f(0x22b)](_0x39491f(0x33c)+_0x43b72d);if(!_0x18872f['yes']){if(!isInteractive())return console[_0x39491f(0x22b)](a42_0x144d21['red'](_0x39491f(0x224)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x39491f(0x22b)](a42_0x144d21[_0x39491f(0x342)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1908ab=await confirmKey(_0x39491f(0x2d6)+_0x43b72d+_0x39491f(0x34e));if(!_0x1908ab)return console[_0x39491f(0x22b)](a42_0x144d21['yellow'](_0x39491f(0x22c))),0x1;}const _0x300eef=await withSpinner(_0x39491f(0x391)+_0x43b72d+_0x39491f(0x275),()=>_0x1f6b93[_0x39491f(0x2cf)][_0x39491f(0x231)](_0x43b72d),{'verbose':_0x18872f['verbose']}),_0x2f1b8c=_0x300eef[_0x39491f(0x374)];return console['error'](_0x39491f(0x29c)+_0x2f1b8c[_0x39491f(0x37d)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x2f1b8c[_0x39491f(0x28b)]),0x0;}}export function parseKeyValue(_0x156d6b){const _0xaa9089=a42_0xe6da40,_0x49b428=_0x156d6b['indexOf']('=');if(_0x49b428===-0x1)throw new Error(_0xaa9089(0x388)+_0x156d6b+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x31de7b=_0x156d6b['substring'](0x0,_0x49b428),_0x2e7ece=_0x156d6b[_0xaa9089(0x34c)](_0x49b428+0x1);if(!_0x31de7b)throw new Error(_0xaa9089(0x234));return{'key':_0x31de7b,'value':_0x2e7ece};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2e2);['description']='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0xe6da40(0x1f1)](_0x1048aa){const _0x5ed5fc=a42_0xe6da40,{options:_0x4ad9c4,args:_0x40ce6e,tdx:_0x557708}=_0x1048aa,_0x47d5d4=this[_0x5ed5fc(0x366)](_0x40ce6e,_0x4ad9c4);if(!_0x47d5d4)return 0x1;_0x4ad9c4['verbose']&&console[_0x5ed5fc(0x22b)](_0x5ed5fc(0x33c)+_0x47d5d4);const _0xd3e8da=await withSpinner(_0x5ed5fc(0x27e),()=>_0x557708[_0x5ed5fc(0x2cf)][_0x5ed5fc(0x298)](_0x47d5d4),{'verbose':_0x4ad9c4[_0x5ed5fc(0x350)]}),{secrets:_0x5dab75}=_0xd3e8da[_0x5ed5fc(0x374)];return console[_0x5ed5fc(0x22b)](_0x5ed5fc(0x229)+_0x5dab75[_0x5ed5fc(0x328)]+_0x5ed5fc(0x279)+(_0x5dab75['length']!==0x1?'s':'')),await handleSDKOutput(_0x5dab75,_0x4ad9c4),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x232);['description']=a42_0xe6da40(0x216);async['execute'](_0x4bc710){const _0x56f6cd=a42_0xe6da40,{options:_0x451db8,args:_0x50b6b1,tdx:_0x3334cb}=_0x4bc710;let _0x50dbac,_0x14238a;if(_0x50b6b1[_0x56f6cd(0x328)]>=0x2)_0x50dbac=_0x50b6b1[0x0],_0x14238a=_0x50b6b1[0x1];else{if(_0x50b6b1[_0x56f6cd(0x328)]===0x1&&_0x451db8[_0x56f6cd(0x308)])_0x50dbac=_0x451db8['workflowProject'],_0x14238a=_0x50b6b1[0x0];else return _0x50b6b1[_0x56f6cd(0x328)]===0x1?(console[_0x56f6cd(0x22b)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x56f6cd(0x2dd)),0x1):(console[_0x56f6cd(0x22b)](_0x56f6cd(0x289)),console[_0x56f6cd(0x22b)](_0x56f6cd(0x20a)),0x1);}let _0x4541b2,_0x474de1;try{({key:_0x4541b2,value:_0x474de1}=parseKeyValue(_0x14238a));}catch(_0x3f3dd0){return _0x3f3dd0 instanceof Error&&console[_0x56f6cd(0x22b)](a42_0x144d21[_0x56f6cd(0x323)](_0x56f6cd(0x2b5)),_0x3f3dd0[_0x56f6cd(0x34f)]),0x1;}_0x451db8[_0x56f6cd(0x350)]&&(console[_0x56f6cd(0x22b)](_0x56f6cd(0x33c)+_0x50dbac),console['error'](_0x56f6cd(0x30c)+_0x4541b2));const _0x4f9fe7=await withSpinner(_0x56f6cd(0x2c3),()=>_0x3334cb['workflow'][_0x56f6cd(0x28c)](_0x50dbac,_0x4541b2,_0x474de1),{'verbose':_0x451db8['verbose']}),_0x3cb649=_0x4f9fe7[_0x56f6cd(0x374)];return console[_0x56f6cd(0x22b)](_0x56f6cd(0x23d)+_0x3cb649['key']+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x3cb649['projectName']+'\x27'),(_0x451db8['json']||_0x451db8[_0x56f6cd(0x25a)])&&await handleSingleObjectOutput(_0x3cb649,_0x451db8),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]='workflow:secrets:delete';[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x1f2);async['execute'](_0x230ec5){const _0x573bdf=a42_0xe6da40,{options:_0x3a4d00,args:_0xaf296e,tdx:_0x489908}=_0x230ec5;let _0x5346b5,_0x27440c;if(_0xaf296e['length']>=0x2)_0x5346b5=_0xaf296e[0x0],_0x27440c=_0xaf296e[0x1];else{if(_0xaf296e[_0x573bdf(0x328)]===0x1&&_0x3a4d00[_0x573bdf(0x308)])_0x5346b5=_0x3a4d00['workflowProject'],_0x27440c=_0xaf296e[0x0];else return _0xaf296e['length']===0x1?(console['error'](_0x573bdf(0x332)),console[_0x573bdf(0x22b)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0x573bdf(0x2c4)),console[_0x573bdf(0x22b)](_0x573bdf(0x2fa)),0x1);}_0x3a4d00[_0x573bdf(0x350)]&&(console[_0x573bdf(0x22b)](_0x573bdf(0x33c)+_0x5346b5),console[_0x573bdf(0x22b)](_0x573bdf(0x30c)+_0x27440c));if(!_0x3a4d00[_0x573bdf(0x288)]){if(!isInteractive())return console[_0x573bdf(0x22b)](a42_0x144d21[_0x573bdf(0x323)](_0x573bdf(0x224)),_0x573bdf(0x243)),console['error'](a42_0x144d21[_0x573bdf(0x342)](_0x573bdf(0x333))),0x1;const _0x14aa38=await confirmKey(_0x573bdf(0x337)+_0x27440c+'\x27\x20from\x20project\x20\x27'+_0x5346b5+'\x27?');if(!_0x14aa38)return console[_0x573bdf(0x22b)](a42_0x144d21[_0x573bdf(0x26f)](_0x573bdf(0x22c))),0x1;}const _0x43da64=await withSpinner(_0x573bdf(0x331),()=>_0x489908[_0x573bdf(0x2cf)][_0x573bdf(0x2d5)](_0x5346b5,_0x27440c),{'verbose':_0x3a4d00[_0x573bdf(0x350)]}),_0x51c180=_0x43da64['data'];return console[_0x573bdf(0x22b)](_0x573bdf(0x23d)+_0x51c180[_0x573bdf(0x239)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x51c180[_0x573bdf(0x37d)]+'\x27'),(_0x3a4d00[_0x573bdf(0x385)]||_0x3a4d00[_0x573bdf(0x25a)])&&await handleSingleObjectOutput(_0x51c180,_0x3a4d00),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(_0x10d5b7){const _0x4737f5=a42_0xe6da40,_0x1aec07=Math['floor'](_0x10d5b7/0x3e8),_0x5e0362=Math[_0x4737f5(0x240)](_0x1aec07/0x3c),_0x19d29e=Math[_0x4737f5(0x240)](_0x5e0362/0x3c),_0x15a2fa=Math[_0x4737f5(0x240)](_0x19d29e/0x18);if(_0x15a2fa>0x0){const _0x177218=_0x19d29e%0x18;return _0x177218>0x0?_0x15a2fa+'d\x20'+_0x177218+'h':_0x15a2fa+'d';}else{if(_0x19d29e>0x0){const _0xbbfce6=_0x5e0362%0x3c;return _0xbbfce6>0x0?_0x19d29e+'h\x20'+_0xbbfce6+'m':_0x19d29e+'h';}else{if(_0x5e0362>0x0){const _0x344562=_0x1aec07%0x3c;return _0x344562>0x0?_0x5e0362+'m\x20'+_0x344562+'s':_0x5e0362+'m';}else return _0x1aec07+'s';}}}function formatTimestamp(_0xfe3b3a,_0x455df1){const _0x55c0a5=a42_0xe6da40,_0x4e1a90=new Date(_0xfe3b3a),_0x2ae41d=String(_0x4e1a90[_0x55c0a5(0x21b)]())[_0x55c0a5(0x2a6)](0x2,'0'),_0x25f358=String(_0x4e1a90[_0x55c0a5(0x2db)]())[_0x55c0a5(0x2a6)](0x2,'0'),_0x3c5d02=_0x2ae41d+':'+_0x25f358,_0x822f29=_0x4e1a90[_0x55c0a5(0x23f)]()===_0x455df1[_0x55c0a5(0x23f)]()&&_0x4e1a90[_0x55c0a5(0x265)]()===_0x455df1['getMonth']()&&_0x4e1a90[_0x55c0a5(0x2e8)]()===_0x455df1[_0x55c0a5(0x2e8)]();if(_0x822f29)return _0x3c5d02;else{const _0x3207c7=String(_0x4e1a90[_0x55c0a5(0x265)]()+0x1)[_0x55c0a5(0x2a6)](0x2,'0'),_0x5ce4d0=String(_0x4e1a90[_0x55c0a5(0x2e8)]())[_0x55c0a5(0x2a6)](0x2,'0');return _0x3207c7+'-'+_0x5ce4d0+'\x20'+_0x3c5d02;}}function formatDate(_0xa34c9f){const _0x1a1a63=a42_0xe6da40,_0x1eef49=_0xa34c9f[_0x1a1a63(0x23f)](),_0x3af6f3=String(_0xa34c9f[_0x1a1a63(0x265)]()+0x1)[_0x1a1a63(0x2a6)](0x2,'0'),_0x87dc4d=String(_0xa34c9f['getDate']())[_0x1a1a63(0x2a6)](0x2,'0');return _0x1eef49+'-'+_0x3af6f3+'-'+_0x87dc4d;}function getTaskStateIcon(_0x476358){const _0x4cc295={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x4cc295[_0x476358]||'⚪';}function getBarChar(_0x4455a2){const _0x543471=a42_0xe6da40;return _0x4455a2===_0x543471(0x22b)||_0x4455a2===_0x543471(0x303)?'×':'─';}function getBarColor(_0x19a9d9){const _0x2d5a92=a42_0xe6da40,_0xce4ce={'success':a42_0x144d21[_0x2d5a92(0x295)],'error':a42_0x144d21[_0x2d5a92(0x323)],'group_error':a42_0x144d21[_0x2d5a92(0x323)],'running':a42_0x144d21['blue'],'blocked':a42_0x144d21['yellow'],'planned':a42_0x144d21[_0x2d5a92(0x342)],'canceling':a42_0x144d21[_0x2d5a92(0x26f)]};return _0xce4ce[_0x19a9d9]||a42_0x144d21[_0x2d5a92(0x31c)];}function parseTaskName(_0x412898){const _0x264d95=a42_0xe6da40;let _0x1d873c=_0x412898['replace'](/^\++/,'');const _0x44cb3c=_0x1d873c[_0x264d95(0x396)]('+'),_0xa39d01=_0x44cb3c[_0x264d95(0x328)]>0x1?_0x44cb3c[_0x264d95(0x328)]-0x2:0x0,_0x494df8=_0x44cb3c[_0x44cb3c[_0x264d95(0x328)]-0x1]||_0x1d873c;return{'level':_0xa39d01,'name':'+'+_0x494df8};}function truncateTaskName(_0x2b2253,_0x4de63b){const _0x4999fe=a42_0xe6da40,_0x2ce12a=stringWidth(_0x2b2253);if(_0x2ce12a<=_0x4de63b)return _0x2b2253;let _0x111b23=_0x2b2253;while(stringWidth(_0x111b23+'…')>_0x4de63b&&_0x111b23[_0x4999fe(0x328)]>0x0){_0x111b23=_0x111b23[_0x4999fe(0x1f8)](0x0,-0x1);}return _0x111b23+'…';}function calculateTimeScale(_0x48c847,_0x2081ad){const _0x5a5ce6=a42_0xe6da40;return{'startTime':_0x48c847[_0x5a5ce6(0x347)],'endTime':_0x48c847[_0x5a5ce6(0x375)],'durationMs':_0x48c847[_0x5a5ce6(0x38b)],'msPerChar':_0x48c847['duration']/_0x2081ad};}function timeToPosition(_0x5c59b4,_0x134407,_0x5833fe){const _0x34be48=a42_0xe6da40,_0x11cc87=_0x5c59b4-_0x134407[_0x34be48(0x294)],_0x48a35f=Math[_0x34be48(0x240)](_0x11cc87/_0x134407[_0x34be48(0x302)]);return Math[_0x34be48(0x2b1)](0x0,Math[_0x34be48(0x32a)](_0x48a35f,_0x5833fe));}function renderTimeAxis(_0x427b4a,_0x4241b9){const _0x17c0ce=a42_0xe6da40,_0x1f1fb4=Math[_0x17c0ce(0x32a)](TIMELINE_CONFIG[_0x17c0ce(0x266)],Math[_0x17c0ce(0x2b1)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math['floor'](_0x4241b9/TIMELINE_CONFIG[_0x17c0ce(0x23e)]))),_0x5d4abe=_0x427b4a['durationMs']/(_0x1f1fb4-0x1),_0x35f227=new Date(_0x427b4a[_0x17c0ce(0x294)]),_0x287650=[];for(let _0x24da8b=0x0;_0x24da8b<_0x1f1fb4;_0x24da8b++){const _0x45d92b=_0x427b4a[_0x17c0ce(0x294)]+_0x24da8b*_0x5d4abe,_0x9c9d3f=timeToPosition(_0x45d92b,_0x427b4a,_0x4241b9),_0x5c58ae=formatTimestamp(_0x45d92b,_0x35f227);_0x287650['push']({'pos':_0x9c9d3f,'text':_0x5c58ae});}const _0x3279a3=new Array(_0x4241b9)[_0x17c0ce(0x276)]('\x20');let _0x3b426d=-0x1;for(const {pos:_0x448bb8,text:_0x4e494e}of _0x287650){let _0x2cc4ee=Math[_0x17c0ce(0x2b1)](0x0,_0x448bb8-Math[_0x17c0ce(0x240)](_0x4e494e[_0x17c0ce(0x328)]/0x2));_0x2cc4ee<=_0x3b426d+TIMELINE_CONFIG[_0x17c0ce(0x310)]&&(_0x2cc4ee=_0x3b426d+TIMELINE_CONFIG[_0x17c0ce(0x310)]+0x1);_0x2cc4ee+_0x4e494e[_0x17c0ce(0x328)]>_0x4241b9&&(_0x2cc4ee=_0x4241b9-_0x4e494e[_0x17c0ce(0x328)]);if(_0x2cc4ee>=0x0&&_0x2cc4ee+_0x4e494e[_0x17c0ce(0x328)]<=_0x4241b9&&_0x2cc4ee>_0x3b426d){for(let _0x1f0ce5=0x0;_0x1f0ce5<_0x4e494e[_0x17c0ce(0x328)];_0x1f0ce5++){_0x3279a3[_0x2cc4ee+_0x1f0ce5]=_0x4e494e[_0x1f0ce5];}_0x3b426d=_0x2cc4ee+_0x4e494e[_0x17c0ce(0x328)]-0x1;}}return _0x3279a3[_0x17c0ce(0x1fd)]('');}function renderTaskRow(_0x3232a3,_0x3acee9,_0xea2b6f,_0x4623f5){const _0x43822c=a42_0xe6da40,{level:_0x4b8b20,name:_0x599d80}=parseTaskName(_0x3232a3[_0x43822c(0x30d)]),_0x4a89cf='\x20'[_0x43822c(0x278)](_0x4b8b20),_0x531d57=_0x3232a3['window']?'('+formatElapsed(_0x3232a3[_0x43822c(0x22d)][_0x43822c(0x38b)])+')':'',_0x1c3ca2=stringWidth(_0x531d57),_0xb9d219=_0x4b8b20*0x1,_0x5cebe5=_0x4623f5-_0xb9d219-_0x1c3ca2-0x1,_0x4bfd71=truncateTaskName(_0x599d80,_0x5cebe5),_0x5a75f2=_0x4a89cf+_0x4bfd71,_0x24629e=stringWidth(_0x5a75f2),_0x7b939e=_0x4623f5-_0x24629e-_0x1c3ca2,_0x3b14d2=_0x5a75f2+'\x20'[_0x43822c(0x278)](Math[_0x43822c(0x2b1)](0x1,_0x7b939e))+a42_0x144d21['dim'](_0x531d57),_0x279795=getTaskStateIcon(_0x3232a3[_0x43822c(0x29e)]),_0x335ec7=new Array(_0xea2b6f)['fill']('\x20');if(_0x3232a3[_0x43822c(0x22d)]){const _0x115577=timeToPosition(_0x3232a3['window'][_0x43822c(0x347)],_0x3acee9,_0xea2b6f),_0x549d82=timeToPosition(_0x3232a3[_0x43822c(0x22d)][_0x43822c(0x375)],_0x3acee9,_0xea2b6f),_0x8031f9=getBarChar(_0x3232a3[_0x43822c(0x29e)]),_0x4f5011=Math['max'](_0x115577+0x1,_0x549d82);for(let _0xdca03d=_0x115577;_0xdca03d<Math[_0x43822c(0x32a)](_0x4f5011,_0xea2b6f);_0xdca03d++){_0x335ec7[_0xdca03d]=_0x8031f9;}}const _0x574273=getBarColor(_0x3232a3[_0x43822c(0x29e)]),_0x27d24b=_0x335ec7[_0x43822c(0x258)](_0x162b4a=>_0x162b4a==='\x20'?'\x20':_0x574273(_0x162b4a))[_0x43822c(0x1fd)]('');return _0x279795+'\x20'+_0x3b14d2+'│'+_0x27d24b+'│';}function calculateStats(_0x53b926){const _0x505be7=a42_0xe6da40,_0x1edcee={'total':_0x53b926[_0x505be7(0x328)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x58b2a8 of _0x53b926){if(_0x58b2a8[_0x505be7(0x29e)]==='success')_0x1edcee['success']++;else{if(_0x58b2a8[_0x505be7(0x29e)]==='error'||_0x58b2a8[_0x505be7(0x29e)]==='group_error')_0x1edcee['error']++;else _0x58b2a8[_0x505be7(0x29e)]===_0x505be7(0x2c7)?_0x1edcee[_0x505be7(0x2c7)]++:_0x1edcee[_0x505be7(0x21d)]++;}}return _0x1edcee;}function formatStats(_0x2a5110){const _0x27e7f5=a42_0xe6da40;return[_0x27e7f5(0x352)+_0x2a5110[_0x27e7f5(0x389)],'✅\x20'+_0x2a5110['success'],'❌\x20'+_0x2a5110[_0x27e7f5(0x22b)],_0x27e7f5(0x268)+_0x2a5110[_0x27e7f5(0x2c7)],'⏳\x20'+_0x2a5110[_0x27e7f5(0x21d)]][_0x27e7f5(0x1fd)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0xe6da40(0x22e);['description']=a42_0xe6da40(0x255);async[a42_0xe6da40(0x1f1)](_0x41a4a2){const _0x3be7da=a42_0xe6da40,{options:_0x3fb9d3,args:_0x292f9b,tdx:_0x5c6924}=_0x41a4a2;let _0x5ecc50,_0x3e6917,_0x5c2a84=![];if(_0x292f9b[0x0]){if(_0x292f9b[0x0]['includes']('.')){const _0x1b3f14=this[_0x3be7da(0x2be)](_0x292f9b,_0x3fb9d3);if(!_0x1b3f14)return 0x1;_0x5ecc50=_0x1b3f14[_0x3be7da(0x37d)],_0x3e6917=_0x1b3f14[_0x3be7da(0x368)];}else{_0x3e6917=_0x292f9b[0x0],_0x5ecc50=_0x3fb9d3[_0x3be7da(0x308)];if(!_0x5ecc50)return console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x323)](_0x3be7da(0x2b5)),_0x3be7da(0x287)),0x1;_0x5c2a84=!![];}}else{const _0x95479e=this[_0x3be7da(0x2be)](_0x292f9b,_0x3fb9d3);if(!_0x95479e)return 0x1;_0x5ecc50=_0x95479e[_0x3be7da(0x37d)],_0x3e6917=_0x95479e[_0x3be7da(0x368)];}if(_0x3fb9d3['verbose']){if(_0x5ecc50&&_0x3e6917)console[_0x3be7da(0x22b)](_0x3be7da(0x204)+_0x5ecc50+'.'+_0x3e6917);else _0x5ecc50&&console[_0x3be7da(0x22b)]('Filter:\x20project='+_0x5ecc50);}const _0x3d2d1a=_0x3fb9d3[_0x3be7da(0x382)],_0x593f01=_0x3fb9d3['sessionId'];if(_0x3d2d1a){_0x593f01&&console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x26f)](_0x3be7da(0x395)),_0x3be7da(0x22a));const _0xc80c53=_0x3fb9d3[_0x3be7da(0x209)];return _0xc80c53?await this[_0x3be7da(0x379)](_0x41a4a2,_0x3d2d1a):await this['renderSingleTimeline'](_0x41a4a2,_0x3d2d1a,_0x3fb9d3),0x0;}if(_0x593f01){const _0x12e7f8=await withSpinner('Loading\x20session...',()=>_0x5c6924[_0x3be7da(0x2cf)][_0x3be7da(0x2e9)]({'projectName':_0x5ecc50,'workflowName':_0x3e6917,'limit':0x64}),{'verbose':_0x3fb9d3[_0x3be7da(0x350)]}),_0x3c0f32=_0x12e7f8[_0x3be7da(0x374)][_0x3be7da(0x2b9)](_0x2bb2de=>_0x2bb2de['id']===_0x593f01);if(!_0x3c0f32)return console['error'](a42_0x144d21[_0x3be7da(0x323)](_0x3be7da(0x2b5)),_0x3be7da(0x2cc)+_0x593f01),0x1;if(!_0x3c0f32[_0x3be7da(0x2e0)]?.['id'])return console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x323)](_0x3be7da(0x2b5)),_0x3be7da(0x36a)+_0x593f01+_0x3be7da(0x2bd)),0x1;const _0x1d3f63=_0x3c0f32['lastAttempt']['id'];_0x3fb9d3['verbose']&&console['error'](_0x3be7da(0x2eb)+_0x1d3f63+'\x20from\x20session\x20'+_0x593f01);const _0x4c5024=_0x3fb9d3[_0x3be7da(0x209)];return _0x4c5024?await this[_0x3be7da(0x379)](_0x41a4a2,_0x1d3f63):await this[_0x3be7da(0x35e)](_0x41a4a2,_0x1d3f63,_0x3fb9d3),0x0;}const _0x55006f=await withSpinner(_0x3be7da(0x222),()=>_0x5c6924[_0x3be7da(0x2cf)][_0x3be7da(0x2e9)]({'projectName':_0x5ecc50,'workflowName':_0x3e6917,'limit':_0x3fb9d3[_0x3be7da(0x28f)]||0x32}),{'verbose':_0x3fb9d3[_0x3be7da(0x350)]}),_0x488e13=_0x55006f[_0x3be7da(0x374)];if(_0x488e13[_0x3be7da(0x328)]===0x0){if(_0x5ecc50&&_0x3e6917)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x5ecc50+'.'+_0x3e6917);else _0x5ecc50?console[_0x3be7da(0x22b)](_0x3be7da(0x264)+_0x5ecc50):(console[_0x3be7da(0x22b)](_0x3be7da(0x325)),console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x342)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x488e13[_0x3be7da(0x341)]((_0x7869dc,_0x4a98c6)=>{const _0x325bd5=_0x3be7da,_0x1e2d65=_0x7869dc[_0x325bd5(0x31f)]||'',_0x120c28=_0x4a98c6[_0x325bd5(0x31f)]||'';return _0x120c28[_0x325bd5(0x233)](_0x1e2d65);});if(_0x3fb9d3[_0x3be7da(0x385)]||_0x3fb9d3['jsonl'])return await handleSDKOutput(_0x488e13,_0x3fb9d3),0x0;let _0x323d2c;if(_0x5c2a84){const _0x329b76=_0x488e13[0x0];if(!_0x329b76[_0x3be7da(0x2e0)]?.['id'])return console[_0x3be7da(0x22b)](_0x3be7da(0x358)),0x0;_0x323d2c=_0x329b76[_0x3be7da(0x2e0)]['id'],_0x3fb9d3[_0x3be7da(0x350)]&&console[_0x3be7da(0x22b)](_0x3be7da(0x338)+_0x329b76[_0x3be7da(0x31f)]);}else{const _0x73da25=_0x488e13[_0x3be7da(0x258)](_0x3f7d64=>{const _0x2a71cb=_0x3be7da,_0x1d7169=getAttemptStatusDisplay(_0x3f7d64[_0x2a71cb(0x2e0)]);return{'title':_0x3f7d64[_0x2a71cb(0x23b)]?.[_0x2a71cb(0x30d)]+'.'+_0x3f7d64[_0x2a71cb(0x2cf)]?.[_0x2a71cb(0x30d)]+_0x2a71cb(0x380)+_0x3f7d64['sessionTime']+'\x20'+_0x1d7169['icon'],'value':_0x3f7d64[_0x2a71cb(0x2e0)]?.['id']||'','description':_0x1d7169[_0x2a71cb(0x2f5)]};}),_0x105db1=await a42_0x36de0e({'type':_0x3be7da(0x27c),'name':_0x3be7da(0x382),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x73da25['filter'](_0x26fb21=>_0x26fb21[_0x3be7da(0x2a9)]!=='')});if(!_0x105db1[_0x3be7da(0x382)])return 0x0;_0x323d2c=_0x105db1[_0x3be7da(0x382)];}const _0x389f6f=_0x3fb9d3[_0x3be7da(0x209)];return _0x389f6f?await this[_0x3be7da(0x379)](_0x41a4a2,_0x323d2c):await this[_0x3be7da(0x35e)](_0x41a4a2,_0x323d2c,_0x3fb9d3),0x0;}async[a42_0xe6da40(0x35e)](_0xc7e1ea,_0x1ffd46,_0xc59b3c){const _0x39d98e=a42_0xe6da40,{tdx:_0x4f37eb}=_0xc7e1ea;let _0x29f199,_0x5c5329;try{[_0x29f199,_0x5c5329]=await Promise['all']([_0x4f37eb[_0x39d98e(0x2cf)][_0x39d98e(0x28a)](_0x1ffd46),_0x4f37eb[_0x39d98e(0x2cf)][_0x39d98e(0x296)](_0x1ffd46,![])]);}catch(_0x3c372c){console[_0x39d98e(0x22b)](a42_0x144d21['red']('Failed\x20to\x20fetch\x20attempt\x20data'));_0xc59b3c[_0x39d98e(0x350)]&&console[_0x39d98e(0x22b)](_0x3c372c);throw _0x3c372c;}if(_0xc59b3c[_0x39d98e(0x385)]||_0xc59b3c['jsonl']){const _0x552929=this['buildTimelineData'](_0x29f199,_0x5c5329);await handleSDKOutput([_0x552929],_0xc59b3c);return;}const _0x50d9f8=_0x4f37eb[_0x39d98e(0x2b2)][_0x39d98e(0x2f3)],_0x177e2a=this[_0x39d98e(0x35a)](_0x29f199,_0x5c5329,_0x50d9f8);console[_0x39d98e(0x305)](_0x177e2a);}async[a42_0xe6da40(0x379)](_0x9d1263,_0x5a960c){const _0x7dbec0=a42_0xe6da40,{tdx:_0xa34510}=_0x9d1263,_0x1130de=TIMELINE_CONFIG[_0x7dbec0(0x245)],_0x5a17cd=TIMELINE_CONFIG[_0x7dbec0(0x315)];let _0x337626=0x0;while(_0x337626<_0x5a17cd){process[_0x7dbec0(0x359)][_0x7dbec0(0x357)]&&process[_0x7dbec0(0x359)][_0x7dbec0(0x2a3)]('\x1bc');let _0x261b5d,_0x2012e7;try{[_0x261b5d,_0x2012e7]=await Promise[_0x7dbec0(0x2aa)]([_0xa34510[_0x7dbec0(0x2cf)][_0x7dbec0(0x28a)](_0x5a960c),_0xa34510[_0x7dbec0(0x2cf)][_0x7dbec0(0x296)](_0x5a960c,![])]);}catch(_0x4ad089){console[_0x7dbec0(0x22b)](a42_0x144d21[_0x7dbec0(0x323)](_0x7dbec0(0x353)));_0x337626>0x0&&console['error'](a42_0x144d21[_0x7dbec0(0x342)](_0x7dbec0(0x21a)+_0x337626));throw _0x4ad089;}const _0xf755ad=_0xa34510['context']['site'],_0x48453e=this[_0x7dbec0(0x35a)](_0x261b5d,_0x2012e7,_0xf755ad);console['log'](_0x48453e);const _0x39a588=_0x261b5d[_0x7dbec0(0x377)]&&_0x2012e7[_0x7dbec0(0x2b7)](_0x3ffaa7=>_0x3ffaa7[_0x7dbec0(0x29e)]!=='running'&&_0x3ffaa7[_0x7dbec0(0x29e)]!==_0x7dbec0(0x27f));if(_0x39a588){console[_0x7dbec0(0x22b)](a42_0x144d21['green']('\x0a✔\x20Attempt\x20complete'));break;}console['error'](a42_0x144d21['dim'](_0x7dbec0(0x2d4)+_0x337626*0x2+_0x7dbec0(0x201))),await new Promise(_0x37afae=>setTimeout(_0x37afae,_0x1130de)),_0x337626++;}_0x337626>=_0x5a17cd&&console[_0x7dbec0(0x22b)](a42_0x144d21['yellow']('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0xe6da40(0x35a)](_0x4c0bb9,_0x253a1b,_0x26b6e3){const _0x5a2975=a42_0xe6da40,_0x51cbef=[],_0xfa4c99=TIMELINE_CONFIG[_0x5a2975(0x26d)],_0x4cd435=0x5,_0x1a222c=process[_0x5a2975(0x359)]['columns']||0x78,_0x5c1fa7=_0x1a222c-_0xfa4c99-_0x4cd435,_0x62865c=Math[_0x5a2975(0x2b1)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x5a2975(0x32a)](_0x5c1fa7,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x2c12b9=new Date(_0x4c0bb9[_0x5a2975(0x267)])[_0x5a2975(0x33d)](),_0x3ab638=_0x4c0bb9[_0x5a2975(0x2ef)]?new Date(_0x4c0bb9[_0x5a2975(0x2ef)])[_0x5a2975(0x33d)]():Date[_0x5a2975(0x370)](),_0x2697fa={'start':_0x2c12b9,'end':_0x3ab638,'duration':_0x3ab638-_0x2c12b9},_0x386edd=new Map(),_0x37dfb0=[];for(const _0x3a29f1 of _0x253a1b){if(_0x3a29f1[_0x5a2975(0x2de)]){const _0x51559a=new Date(_0x3a29f1[_0x5a2975(0x2de)])[_0x5a2975(0x33d)](),_0x3d4fbb=_0x3a29f1[_0x5a2975(0x24f)]?new Date(_0x3a29f1[_0x5a2975(0x24f)])[_0x5a2975(0x33d)]():Date[_0x5a2975(0x370)](),_0x4cecf6={'start':_0x51559a,'end':_0x3d4fbb,'duration':_0x3d4fbb-_0x51559a};_0x386edd['set'](_0x3a29f1['id'],_0x4cecf6),_0x37dfb0[_0x5a2975(0x252)]({'name':_0x3a29f1[_0x5a2975(0x210)],'state':_0x3a29f1['state']||_0x5a2975(0x283),'window':_0x4cecf6});}else _0x37dfb0[_0x5a2975(0x252)]({'name':_0x3a29f1[_0x5a2975(0x210)],'state':_0x3a29f1[_0x5a2975(0x29e)]||_0x5a2975(0x27f),'window':undefined});}_0x37dfb0[_0x5a2975(0x341)]((_0x37aead,_0x11e119)=>{const _0x1a80be=_0x5a2975;if(!_0x37aead[_0x1a80be(0x22d)])return 0x1;if(!_0x11e119[_0x1a80be(0x22d)])return-0x1;return _0x37aead[_0x1a80be(0x22d)][_0x1a80be(0x347)]-_0x11e119[_0x1a80be(0x22d)][_0x1a80be(0x347)];});const _0x36b656=_0x37dfb0[_0x5a2975(0x328)],_0x357646=_0x36b656>TIMELINE_CONFIG[_0x5a2975(0x2e3)];_0x357646&&_0x37dfb0['splice'](TIMELINE_CONFIG[_0x5a2975(0x2e3)]);const _0x5c6da9=calculateTimeScale(_0x2697fa,_0x62865c),_0x49ae09=_0x4c0bb9[_0x5a2975(0x377)]?_0x4c0bb9[_0x5a2975(0x2f1)]?a42_0x144d21['green'](_0x5a2975(0x2f1)):a42_0x144d21[_0x5a2975(0x323)](_0x5a2975(0x22b)):a42_0x144d21[_0x5a2975(0x309)](_0x5a2975(0x2c7)),_0x5e8487=_0x4c0bb9[_0x5a2975(0x23b)]?.['id'],_0x2b9189=_0x4c0bb9[_0x5a2975(0x29a)];let _0x236fdc;if(_0x5e8487&&_0x2b9189){const _0x122755=getWorkflowAttemptUrl(_0x26b6e3,_0x5e8487,_0x2b9189,_0x4c0bb9['id']);_0x236fdc=hyperlink(a42_0x144d21[_0x5a2975(0x342)](_0x4c0bb9['id']),_0x122755);}else _0x236fdc=a42_0x144d21[_0x5a2975(0x342)](_0x4c0bb9['id']);_0x51cbef[_0x5a2975(0x252)]('Attempt:\x20'+_0x236fdc+'\x20-\x20'+_0x49ae09+_0x5a2975(0x380)+formatElapsed(_0x2697fa['duration']));if(_0x37dfb0[_0x5a2975(0x328)]>0x0){const _0x2a0674=renderTimeAxis(_0x5c6da9,_0x62865c),_0x3da661=new Date(_0x2697fa['start']),_0x4ac9b0=formatDate(_0x3da661),_0x145ea9=TIMELINE_CONFIG[_0x5a2975(0x392)]+TIMELINE_CONFIG['ICON_SPACING']+_0xfa4c99,_0x16b4da=_0x4ac9b0[_0x5a2975(0x2a6)](_0x145ea9),_0x3aa03e=a42_0x144d21[_0x5a2975(0x342)](_0x16b4da);_0x51cbef['push'](_0x3aa03e+'\x20'+_0x2a0674);for(const _0x85ec3c of _0x37dfb0){_0x51cbef['push'](renderTaskRow(_0x85ec3c,_0x5c6da9,_0x62865c,_0xfa4c99));}const _0x14cb77=calculateStats(_0x37dfb0);_0x51cbef['push'](formatStats(_0x14cb77)),_0x357646&&_0x51cbef[_0x5a2975(0x252)](a42_0x144d21[_0x5a2975(0x26f)](_0x5a2975(0x2a8)+TIMELINE_CONFIG[_0x5a2975(0x2e3)]+_0x5a2975(0x1fb)+_0x36b656+'\x20tasks')),_0x51cbef[_0x5a2975(0x252)](''),_0x51cbef[_0x5a2975(0x252)](a42_0x144d21['dim'](_0x5a2975(0x2d8))+(_0x5a2975(0x2f7)+_0x4c0bb9['id']+_0x5a2975(0x212))+a42_0x144d21[_0x5a2975(0x342)](_0x5a2975(0x236)));}else _0x51cbef['push'](_0x5a2975(0x237));return _0x51cbef['join']('\x0a');}[a42_0xe6da40(0x32e)](_0x4091ec,_0x3c80a3){const _0x31880d=a42_0xe6da40,_0x35ab6e=new Date(_0x4091ec[_0x31880d(0x267)])[_0x31880d(0x33d)](),_0x128a25=_0x4091ec['finishedAt']?new Date(_0x4091ec[_0x31880d(0x2ef)])['getTime']():Date['now'](),_0x79ae03=_0x128a25-_0x35ab6e,_0x5af358=[];for(const _0x121a27 of _0x3c80a3){if(_0x121a27[_0x31880d(0x2de)]){const _0x570199=new Date(_0x121a27[_0x31880d(0x2de)])[_0x31880d(0x33d)](),_0x4d7d6a=_0x121a27[_0x31880d(0x24f)]?new Date(_0x121a27[_0x31880d(0x24f)])[_0x31880d(0x33d)]():Date[_0x31880d(0x370)]();_0x5af358[_0x31880d(0x252)]({'name':_0x121a27['fullName'],'state':_0x121a27[_0x31880d(0x29e)]||_0x31880d(0x283),'window':{'start':_0x570199,'end':_0x4d7d6a,'duration':_0x4d7d6a-_0x570199}});}else _0x5af358[_0x31880d(0x252)]({'name':_0x121a27[_0x31880d(0x210)],'state':_0x121a27[_0x31880d(0x29e)]||_0x31880d(0x27f),'window':undefined});}const _0x26113c=calculateStats(_0x5af358);return{'attempt':{'id':_0x4091ec['id'],'status':_0x4091ec[_0x31880d(0x377)]?_0x4091ec[_0x31880d(0x2f1)]?_0x31880d(0x2f1):_0x31880d(0x22b):_0x31880d(0x2c7),'createdAt':_0x4091ec['createdAt'],'finishedAt':_0x4091ec['finishedAt'],'duration_ms':_0x79ae03},'tasks':_0x5af358[_0x31880d(0x258)](_0x30012f=>({'name':_0x30012f['name'],'state':_0x30012f[_0x31880d(0x29e)],'startedAt':_0x30012f[_0x31880d(0x22d)]?new Date(_0x30012f[_0x31880d(0x22d)][_0x31880d(0x347)])[_0x31880d(0x2e1)]():null,'updatedAt':_0x30012f[_0x31880d(0x22d)]?new Date(_0x30012f[_0x31880d(0x22d)][_0x31880d(0x375)])['toISOString']():null,'duration_ms':_0x30012f[_0x31880d(0x22d)]?.[_0x31880d(0x38b)]||null})),'stats':_0x26113c};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x8cfb04,_0x77e3d9){const _0xc74793=a43_0x32d7,_0x2c9f81=_0x8cfb04();while(!![]){try{const _0x455d9a=-parseInt(_0xc74793(0x107))/0x1*(parseInt(_0xc74793(0xfe))/0x2)+-parseInt(_0xc74793(0x100))/0x3*(-parseInt(_0xc74793(0x103))/0x4)+parseInt(_0xc74793(0x106))/0x5+parseInt(_0xc74793(0xf7))/0x6*(-parseInt(_0xc74793(0x108))/0x7)+parseInt(_0xc74793(0x104))/0x8*(-parseInt(_0xc74793(0x102))/0x9)+parseInt(_0xc74793(0xfa))/0xa+parseInt(_0xc74793(0xfb))/0xb;if(_0x455d9a===_0x77e3d9)break;else _0x2c9f81['push'](_0x2c9f81['shift']());}catch(_0x3ffa74){_0x2c9f81['push'](_0x2c9f81['shift']());}}}(a43_0x1649,0xf102a));function a43_0x1649(){const _0x18f9cd=['replace','442593ZGMrvp','1927756qrMtiX','272xJgtoR','entries','9328605sLliWU','140863BGFSos','1334067qOdGfF','tdx/','6CIdoyK','Authorization','tdx','221290oXgDEu','6829361EjBFSN','version','X-Trino-User','2IZLAon','length','3qizuKX'];a43_0x1649=function(){return _0x18f9cd;};return a43_0x1649();}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 _0x5c4272=a43_0x32d7,_0xa6d679=getVersion(),_0x25e36d=platform(),_0x1429a0=process[_0x5c4272(0xfc)][_0x5c4272(0x101)]('v','');return _0x5c4272(0xf6)+_0xa6d679+'\x20('+_0x25e36d+';\x20node/'+_0x1429a0+')';}export function getAuthHeaders(_0x256ded,_0x1ae6ac){const _0x29d181=a43_0x32d7,_0x485b39=getVersion(),_0x521621={'User-Agent':getUserAgent(),'X-TD-Client':_0x29d181(0xf9),'X-TD-Client-Version':_0x485b39};return _0x1ae6ac&&(_0x521621[_0x29d181(0xf8)]='TD1\x20'+_0x1ae6ac),_0x521621;}export function toHeaderRecord(_0x59266a){const _0x4f01e7=a43_0x32d7,_0x4a65c5={};for(const [_0x185736,_0x3c9e76]of Object[_0x4f01e7(0x105)](_0x59266a)){_0x3c9e76!==undefined&&(_0x4a65c5[_0x185736]=_0x3c9e76);}return _0x4a65c5;}export function getTrinoHeaders(_0x3ae6c3,_0x4da3b3){const _0x3ffd6d=a43_0x32d7,_0x75b59a=getAuthHeaders(_0x3ae6c3,_0x4da3b3),_0x2c1206=toHeaderRecord(_0x75b59a);return delete _0x2c1206['Authorization'],_0x4da3b3&&(_0x2c1206[_0x3ffd6d(0xfd)]=_0x4da3b3),_0x2c1206;}function a43_0x32d7(_0x1d139d,_0x3b8026){_0x1d139d=_0x1d139d-0xf6;const _0x164905=a43_0x1649();let _0x32d7ff=_0x164905[_0x1d139d];return _0x32d7ff;}export function hasAPIKey(_0x3fb5cc){const _0x3c4a77=a43_0x32d7,_0x3b8195=getAPIKey();return _0x3b8195!==undefined&&_0x3b8195[_0x3c4a77(0xff)]>0x0;}
1
+ (function(_0x1c50fa,_0x32fadb){const _0x2b4da7=a43_0x5284,_0x5b22b8=_0x1c50fa();while(!![]){try{const _0x567711=-parseInt(_0x2b4da7(0xdd))/0x1*(-parseInt(_0x2b4da7(0xe3))/0x2)+-parseInt(_0x2b4da7(0xe4))/0x3*(-parseInt(_0x2b4da7(0xe2))/0x4)+-parseInt(_0x2b4da7(0xde))/0x5*(parseInt(_0x2b4da7(0xdc))/0x6)+-parseInt(_0x2b4da7(0xd8))/0x7*(-parseInt(_0x2b4da7(0xd9))/0x8)+parseInt(_0x2b4da7(0xe1))/0x9+-parseInt(_0x2b4da7(0xd5))/0xa*(-parseInt(_0x2b4da7(0xd6))/0xb)+-parseInt(_0x2b4da7(0xda))/0xc;if(_0x567711===_0x32fadb)break;else _0x5b22b8['push'](_0x5b22b8['shift']());}catch(_0x56f9cf){_0x5b22b8['push'](_0x5b22b8['shift']());}}}(a43_0x1b11,0x3d232));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 _0x29c713=a43_0x5284,_0x4971b0=getVersion(),_0x2c6596=platform(),_0x38fcf2=process['version'][_0x29c713(0xdf)]('v','');return'tdx/'+_0x4971b0+'\x20('+_0x2c6596+';\x20node/'+_0x38fcf2+')';}export function getAuthHeaders(_0xba6f7c,_0x48c28a){const _0xbbf89e=a43_0x5284,_0x554d1e=getVersion(),_0x540a50={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x554d1e};return _0x48c28a&&(_0x540a50[_0xbbf89e(0xdb)]=_0xbbf89e(0xe0)+_0x48c28a),_0x540a50;}export function toHeaderRecord(_0x4d023a){const _0x37b0aa=a43_0x5284,_0x4370f0={};for(const [_0x357c2d,_0x24a87c]of Object[_0x37b0aa(0xd7)](_0x4d023a)){_0x24a87c!==undefined&&(_0x4370f0[_0x357c2d]=_0x24a87c);}return _0x4370f0;}function a43_0x5284(_0x56b8aa,_0x553d8e){_0x56b8aa=_0x56b8aa-0xd5;const _0x1b1185=a43_0x1b11();let _0x5284e9=_0x1b1185[_0x56b8aa];return _0x5284e9;}export function getTrinoHeaders(_0x5d99be,_0x1817ea){const _0xea670f=a43_0x5284,_0x53ddfe=getAuthHeaders(_0x5d99be,_0x1817ea),_0x26c653=toHeaderRecord(_0x53ddfe);return delete _0x26c653[_0xea670f(0xdb)],_0x1817ea&&(_0x26c653['X-Trino-User']=_0x1817ea),_0x26c653;}export function hasAPIKey(_0x373d63){const _0x141dd1=getAPIKey();return _0x141dd1!==undefined&&_0x141dd1['length']>0x0;}function a43_0x1b11(){const _0x2993b1=['8216196rxvDQp','Authorization','72888GkYsxb','4LQAdZw','40YkEYYl','replace','TD1\x20','1806660xrjRtp','408efRuLP','122226JfmbHR','8877IyyHaw','10YOHrKi','2429053TSberJ','entries','1722Njxjgm','2096nTkGXL'];a43_0x1b11=function(){return _0x2993b1;};return a43_0x1b11();}
@@ -1 +1 @@
1
- (function(_0x5162cc,_0x28632f){const _0x432b61=a44_0x268e,_0xe18435=_0x5162cc();while(!![]){try{const _0x15e45b=parseInt(_0x432b61(0x1e4))/0x1+parseInt(_0x432b61(0x1dc))/0x2+parseInt(_0x432b61(0x1ed))/0x3*(-parseInt(_0x432b61(0x214))/0x4)+parseInt(_0x432b61(0x209))/0x5*(-parseInt(_0x432b61(0x20b))/0x6)+parseInt(_0x432b61(0x1e1))/0x7+parseInt(_0x432b61(0x1dd))/0x8+-parseInt(_0x432b61(0x216))/0x9;if(_0x15e45b===_0x28632f)break;else _0xe18435['push'](_0xe18435['shift']());}catch(_0x1b5b30){_0xe18435['push'](_0xe18435['shift']());}}}(a44_0xe8c3,0x74b23));function a44_0x268e(_0x4bbc2c,_0x2b4116){_0x4bbc2c=_0x4bbc2c-0x1d9;const _0xe8c3d7=a44_0xe8c3();let _0x268e04=_0xe8c3d7[_0x4bbc2c];return _0x268e04;}import{writeFileSync}from'fs';import{spawn}from'child_process';function a44_0xe8c3(){const _0x351c5e=['rule','string','755536OjaXCT','949784zHXpQr','[rule]','tsv','map','6671826hoYwEI','stderr','FINISHED','854617CwQSaS','error','keys','sdk-result','params','blue','log','format','-FXRSn','365628lOKfgq','table','padEnd','length','color','double','query','object','split','bold','stdin','jsonl','entries','─┬─','max','boolean','json','inherit','cmdout','less','spawn','noColor','resolve','No\x20data','varchar','limit','[query]','join','280555odZBss','list','30dvITaa','magenta','stringify','forEach','trim','repeat','stdout','[logs]','write','20FgBReu','push','8426736vFogQN','isInteger','number','[params]','Results\x20saved\x20to\x20','[error]','debug','output'];a44_0xe8c3=function(){return _0x351c5e;};return a44_0xe8c3();}import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x56cb3c from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x4c8d5a){const _0x4a995b=a44_0x268e;return _0x4c8d5a[_0x4a995b(0x1eb)]===_0x4a995b(0x1fd)||_0x4c8d5a[_0x4a995b(0x1eb)]===_0x4a995b(0x1f8)||_0x4c8d5a[_0x4a995b(0x1eb)]==='tsv'||_0x4c8d5a[_0x4a995b(0x1eb)]===_0x4a995b(0x1ee)||_0x4c8d5a[_0x4a995b(0x1fd)]===!![]||_0x4c8d5a[_0x4a995b(0x1f8)]===!![]||_0x4c8d5a[_0x4a995b(0x1df)]===!![]||_0x4c8d5a['table']===!![];}export function parseOutputOptions(_0x386772){const _0x56e5f6=a44_0x268e;return{'format':_0x386772[_0x56e5f6(0x1eb)]||_0x56e5f6(0x1ee),'output':_0x386772['output']||'','limit':_0x386772[_0x56e5f6(0x206)],'color':_0x386772[_0x56e5f6(0x1f1)],'noColor':_0x386772[_0x56e5f6(0x202)]};}function convertSDKResultToQueryResult(_0x398e2d){const _0x36aed0=a44_0x268e,_0x5c296b=[];if(_0x398e2d[_0x36aed0(0x1f0)]>0x0){const _0x2f4645=_0x398e2d[0x0];for(const [_0x49ab3b,_0x356efc]of Object[_0x36aed0(0x1f9)](_0x2f4645)){let _0x59edbf='varchar';if(typeof _0x356efc===_0x36aed0(0x218))_0x59edbf=Number[_0x36aed0(0x217)](_0x356efc)?'bigint':_0x36aed0(0x1f2);else{if(typeof _0x356efc===_0x36aed0(0x1fc))_0x59edbf=_0x36aed0(0x1fc);else _0x356efc===null&&(_0x59edbf=_0x36aed0(0x205));}_0x5c296b[_0x36aed0(0x215)]({'name':_0x49ab3b,'type':_0x59edbf});}}return{'queryId':_0x36aed0(0x1e7),'columns':_0x5c296b,'data':_0x398e2d,'stats':{'state':_0x36aed0(0x1e3),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x398e2d[_0x36aed0(0x1f0)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x441bdd,_0x21c70a){const _0x42d01d=convertSDKResultToQueryResult(_0x441bdd);return formatQueryOutput(_0x42d01d,_0x21c70a);}export async function formatQueryOutput(_0x51d222,_0x4ae8c5){const _0x1f8b5c=a44_0x268e,{format:_0x36574b,limit:_0x753cc7,output:_0x25a800,color:_0x12cbe1,noColor:_0x218624}=_0x4ae8c5,_0x59f148=Boolean(_0x25a800)&&!_0x12cbe1,_0x2f5c4d={'color':_0x12cbe1,'noColor':_0x218624||_0x59f148};if(_0x36574b===_0x1f8b5c(0x1ee)){const _0xe9ee7f=shouldUseLess(_0x36574b,_0x25a800);return formatAsTable(_0x51d222,_0x753cc7,_0xe9ee7f,_0x2f5c4d);}else{if(_0x36574b===_0x1f8b5c(0x1fd))return formatAsJSON(_0x51d222,_0x2f5c4d);else return _0x36574b===_0x1f8b5c(0x1f8)?formatAsJSONL(_0x51d222,_0x2f5c4d):formatQueryResult(_0x51d222,_0x36574b);}}function shouldUseLess(_0x361f95,_0x5ee92e){const _0x4f7522=a44_0x268e;return(_0x361f95==='table'||_0x361f95===_0x4f7522(0x20a))&&process[_0x4f7522(0x211)]['isTTY']&&!_0x5ee92e;}export function resolveOutputOptions(_0x33fb6f){const _0x5b951e=a44_0x268e,_0xd05881=resolveOutputFormat(_0x33fb6f[_0x5b951e(0x1eb)],_0x33fb6f[_0x5b951e(0x1d9)],_0x5b951e(0x1ee));let _0x5018e6=typeof _0x33fb6f[_0x5b951e(0x206)]==='number'?_0x33fb6f[_0x5b951e(0x206)]:parseInt(_0x33fb6f[_0x5b951e(0x206)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x2d199a=_0x33fb6f[_0x5b951e(0x1d9)]||'';return shouldUseLess(_0xd05881,_0x2d199a)&&(_0x5018e6=Infinity),{'format':_0xd05881,'output':_0x2d199a,'limit':_0x5018e6,'color':_0x33fb6f[_0x5b951e(0x1f1)],'noColor':_0x33fb6f[_0x5b951e(0x202)]};}export function writeOutput(_0x1eb864,_0x4b9e4b,_0xebcab2){const _0x2f38da=a44_0x268e;return _0x4b9e4b?(writeFileSync(_0x4b9e4b,_0x1eb864),console[_0x2f38da(0x1e5)](_0x2f38da(0x21a)+_0x4b9e4b),Promise[_0x2f38da(0x203)]()):shouldUseLess(_0xebcab2||'','')?new Promise(_0x28e539=>{const _0x3fac25=_0x2f38da,_0x595d5c=spawn(_0x3fac25(0x200),[_0x3fac25(0x1ec)],{'stdio':['pipe',_0x3fac25(0x1fe),'inherit']});let _0xd12adc=![];_0x595d5c['on'](_0x3fac25(0x1e5),()=>{!_0xd12adc&&(_0xd12adc=!![],console['log'](_0x1eb864),_0x28e539());}),_0x595d5c['on']('close',()=>{!_0xd12adc&&(_0xd12adc=!![],_0x28e539());}),_0x595d5c['on'](_0x3fac25(0x201),()=>{const _0x3dad51=_0x3fac25;!_0xd12adc&&_0x595d5c[_0x3dad51(0x1f7)]&&(_0x595d5c[_0x3dad51(0x1f7)]['on']('error',()=>{}),_0x595d5c[_0x3dad51(0x1f7)][_0x3dad51(0x213)](_0x1eb864),_0x595d5c['stdin']['end']());}),!_0x595d5c[_0x3fac25(0x1f7)]&&(!_0xd12adc&&(_0xd12adc=!![],console['log'](_0x1eb864),_0x28e539()));}):(console[_0x2f38da(0x1ea)](_0x1eb864),Promise[_0x2f38da(0x203)]());}export async function handleSDKOutput(_0x247c6e,_0x34e2f3){const _0x573164=a44_0x268e,_0x5287de=resolveOutputOptions(_0x34e2f3),_0x2f142a=await formatSDKOutput(_0x247c6e,_0x5287de);await writeOutput(_0x2f142a,_0x5287de[_0x573164(0x1d9)]||undefined,_0x5287de['format']);}export async function handleQueryOutput(_0x27f2fc,_0x5b53c4){const _0x5bf2c7=a44_0x268e,_0x291693=resolveOutputOptions(_0x5b53c4),_0x2a877a=await formatQueryOutput(_0x27f2fc,_0x291693);await writeOutput(_0x2a877a,_0x291693[_0x5bf2c7(0x1d9)]||undefined,_0x291693[_0x5bf2c7(0x1eb)]);}async function formatSingleObject(_0x19e285,_0x5d64e5){const _0x530974=a44_0x268e,{format:_0x3d9df6,color:_0x285756,noColor:_0x44c9ce}=_0x5d64e5,_0x4af8c0={'color':_0x285756,'noColor':_0x44c9ce};if(_0x3d9df6==='json'){if(shouldUseColor(_0x4af8c0))return colorizeJSON(_0x19e285,_0x4af8c0);return JSON[_0x530974(0x20d)](_0x19e285,null,0x2);}else{if(_0x3d9df6===_0x530974(0x1f8)){if(shouldUseColor(_0x4af8c0))return colorizeJSONCompact(_0x19e285,_0x4af8c0);return JSON[_0x530974(0x20d)](_0x19e285);}else{if(_0x3d9df6==='tsv')return Object[_0x530974(0x1f9)](_0x19e285)[_0x530974(0x1e0)](([_0x22dd37,_0x3494f0])=>_0x22dd37+'\x09'+_0x3494f0)[_0x530974(0x208)]('\x0a');else{const _0x1023b7=Object['entries'](_0x19e285);if(_0x1023b7['length']===0x0)return _0x530974(0x204);const _0x24e72f=_0x19e285[_0x530974(0x21c)],_0x11efa9=_0x19e285['query'],_0x20e0ac=_0x19e285['params'],_0x435823=_0x19e285[_0x530974(0x1da)],_0x4c2508=_0x11efa9?typeof _0x11efa9===_0x530974(0x1db)?_0x11efa9:JSON[_0x530974(0x20d)](_0x11efa9,null,0x2):undefined,_0x168f1a=_0x20e0ac&&Object[_0x530974(0x1e6)](_0x20e0ac)[_0x530974(0x1f0)]>0x0?JSON['stringify'](_0x20e0ac,null,0x2):undefined,_0x183dd8=_0x435823&&Object[_0x530974(0x1e6)](_0x435823)[_0x530974(0x1f0)]>0x0?JSON[_0x530974(0x20d)](_0x435823,null,0x2):undefined,_0x46cdc2=_0x1023b7['filter'](([_0x2cffd7])=>_0x2cffd7!==_0x530974(0x21c)&&_0x2cffd7!==_0x530974(0x1f3)&&_0x2cffd7!==_0x530974(0x1e8)&&_0x2cffd7!==_0x530974(0x1da)),_0x3ac566=Math[_0x530974(0x1fb)](..._0x46cdc2[_0x530974(0x1e0)](([_0x3d766c])=>_0x3d766c[_0x530974(0x1f0)])),_0x3afcbb=Math[_0x530974(0x1fb)](..._0x46cdc2['map'](([,_0x367524])=>{const _0x39c7ec=_0x530974;try{const _0x3243e6=_0x367524===null||_0x367524===undefined?'':typeof _0x367524===_0x39c7ec(0x1f4)?JSON[_0x39c7ec(0x20d)](_0x367524):String(_0x367524),_0x4bf230=_0x3243e6[_0x39c7ec(0x1f5)]('\x0a');return Math['max'](..._0x4bf230[_0x39c7ec(0x1e0)](_0x26ae42=>_0x26ae42[_0x39c7ec(0x1f0)]),0x0);}catch{return 0x0;}}),0x14),_0x4b4958=[];_0x4b4958[_0x530974(0x215)](colorBorder('┌─'+'─'[_0x530974(0x210)](_0x3ac566)+_0x530974(0x1fa)+'─'[_0x530974(0x210)](_0x3afcbb)+'─┐',_0x4af8c0)),_0x46cdc2['forEach'](([_0x15a77e,_0x2192da])=>{const _0x756115=_0x530974;let _0x415415;try{_0x415415=_0x2192da===null||_0x2192da===undefined?'':typeof _0x2192da===_0x756115(0x1f4)?JSON['stringify'](_0x2192da):String(_0x2192da);}catch{_0x415415='[Object]';}const _0x28c743=_0x15a77e[_0x756115(0x1ef)](_0x3ac566),_0x8ee966=_0x415415[_0x756115(0x1f5)]('\x0a');_0x8ee966['forEach']((_0x5376ff,_0x2f7a26)=>{const _0x2eb128=_0x756115,_0x40d18d=colorBorder('│',_0x4af8c0);_0x2f7a26===0x0?_0x4b4958[_0x2eb128(0x215)](_0x40d18d+'\x20'+_0x28c743+'\x20'+_0x40d18d+'\x20'+_0x5376ff['padEnd'](_0x3afcbb)+'\x20'+_0x40d18d):_0x4b4958[_0x2eb128(0x215)](_0x40d18d+'\x20'+'\x20'[_0x2eb128(0x210)](_0x3ac566)+'\x20'+_0x40d18d+'\x20'+_0x5376ff[_0x2eb128(0x1ef)](_0x3afcbb)+'\x20'+_0x40d18d);});}),_0x4b4958[_0x530974(0x215)](colorBorder('└─'+'─'['repeat'](_0x3ac566)+'─┴─'+'─'[_0x530974(0x210)](_0x3afcbb)+'─┘',_0x4af8c0));_0x4c2508&&(_0x4b4958[_0x530974(0x215)](''),_0x4b4958['push'](String(a44_0x56cb3c['yellow']['bold'](_0x530974(0x207)))),_0x4b4958[_0x530974(0x215)](_0x4c2508));_0x168f1a&&(_0x4b4958[_0x530974(0x215)](''),_0x4b4958[_0x530974(0x215)](String(a44_0x56cb3c[_0x530974(0x1e9)][_0x530974(0x1f6)](_0x530974(0x219)))),_0x4b4958['push'](_0x168f1a));_0x183dd8&&(_0x4b4958['push'](''),_0x4b4958[_0x530974(0x215)](String(a44_0x56cb3c[_0x530974(0x20c)][_0x530974(0x1f6)](_0x530974(0x1de)))),_0x4b4958[_0x530974(0x215)](_0x183dd8));if(_0x24e72f){if(_0x24e72f[_0x530974(0x1e2)]){_0x4b4958[_0x530974(0x215)](''),_0x4b4958[_0x530974(0x215)](String(a44_0x56cb3c['red'][_0x530974(0x1f6)](_0x530974(0x21b))));const _0x48d0fb=_0x24e72f[_0x530974(0x1e2)][_0x530974(0x1f5)]('\x0a');_0x48d0fb[_0x530974(0x20e)](_0x4498a1=>{const _0x3e4141=_0x530974;_0x4498a1[_0x3e4141(0x20f)]()&&_0x4b4958[_0x3e4141(0x215)](_0x4498a1);});}if(_0x24e72f[_0x530974(0x1ff)]){_0x4b4958[_0x530974(0x215)](''),_0x4b4958[_0x530974(0x215)](String(a44_0x56cb3c['cyan'][_0x530974(0x1f6)](_0x530974(0x212))));const _0x30121f=_0x24e72f[_0x530974(0x1ff)][_0x530974(0x1f5)]('\x0a');_0x30121f[_0x530974(0x20e)](_0x1b9ab3=>{const _0x404342=_0x530974;_0x1b9ab3[_0x404342(0x20f)]()&&_0x4b4958['push'](_0x1b9ab3);});}}return _0x4b4958[_0x530974(0x208)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x7f774c,_0x7de0e4){const _0x46d217=a44_0x268e;if(_0x7de0e4[_0x46d217(0x1eb)]===_0x46d217(0x1ee)){await handleSDKOutput([_0x7f774c],_0x7de0e4);return;}const _0x1fe875=resolveOutputOptions(_0x7de0e4),_0x1180c5=await formatSingleObject(_0x7f774c,_0x1fe875);await writeOutput(_0x1180c5,_0x1fe875[_0x46d217(0x1d9)]||undefined,_0x1fe875[_0x46d217(0x1eb)]);}
1
+ (function(_0x64c41,_0x37e616){const _0x587f00=a44_0x3927,_0x20bf11=_0x64c41();while(!![]){try{const _0x98469c=parseInt(_0x587f00(0x144))/0x1*(parseInt(_0x587f00(0x119))/0x2)+parseInt(_0x587f00(0x118))/0x3*(-parseInt(_0x587f00(0x130))/0x4)+parseInt(_0x587f00(0x142))/0x5*(-parseInt(_0x587f00(0x138))/0x6)+-parseInt(_0x587f00(0x10b))/0x7*(-parseInt(_0x587f00(0x121))/0x8)+parseInt(_0x587f00(0x13c))/0x9*(parseInt(_0x587f00(0x12a))/0xa)+-parseInt(_0x587f00(0x11a))/0xb+parseInt(_0x587f00(0x148))/0xc;if(_0x98469c===_0x37e616)break;else _0x20bf11['push'](_0x20bf11['shift']());}catch(_0x50d9be){_0x20bf11['push'](_0x20bf11['shift']());}}}(a44_0x54ab,0x6c82e));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a44_0x3927(_0x5cbb5f,_0x89af4f){_0x5cbb5f=_0x5cbb5f-0x101;const _0x54abb5=a44_0x54ab();let _0x392740=_0x54abb5[_0x5cbb5f];return _0x392740;}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x118b13 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x17c5b3){const _0x1753b9=a44_0x3927;return _0x17c5b3['format']==='json'||_0x17c5b3['format']===_0x1753b9(0x109)||_0x17c5b3['format']===_0x1753b9(0x125)||_0x17c5b3[_0x1753b9(0x141)]===_0x1753b9(0x103)||_0x17c5b3[_0x1753b9(0x12c)]===!![]||_0x17c5b3[_0x1753b9(0x109)]===!![]||_0x17c5b3[_0x1753b9(0x125)]===!![]||_0x17c5b3['table']===!![];}export function parseOutputOptions(_0x1f0a0d){const _0xc8c604=a44_0x3927;return{'format':_0x1f0a0d['format']||_0xc8c604(0x103),'output':_0x1f0a0d['output']||'','limit':_0x1f0a0d[_0xc8c604(0x120)],'color':_0x1f0a0d[_0xc8c604(0x13a)],'noColor':_0x1f0a0d['noColor']};}function convertSDKResultToQueryResult(_0x54a2d4){const _0x233c21=a44_0x3927,_0x1908d6=[];if(_0x54a2d4['length']>0x0){const _0x1818bf=_0x54a2d4[0x0];for(const [_0x3593eb,_0x48a7f8]of Object[_0x233c21(0x116)](_0x1818bf)){let _0x226e90=_0x233c21(0x14b);if(typeof _0x48a7f8===_0x233c21(0x129))_0x226e90=Number[_0x233c21(0x145)](_0x48a7f8)?_0x233c21(0x11e):'double';else{if(typeof _0x48a7f8===_0x233c21(0x115))_0x226e90='boolean';else _0x48a7f8===null&&(_0x226e90=_0x233c21(0x14b));}_0x1908d6[_0x233c21(0x13e)]({'name':_0x3593eb,'type':_0x226e90});}}return{'queryId':_0x233c21(0x111),'columns':_0x1908d6,'data':_0x54a2d4,'stats':{'state':_0x233c21(0x12b),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x54a2d4['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x566d3b,_0x312ac9){const _0x9640c4=convertSDKResultToQueryResult(_0x566d3b);return formatQueryOutput(_0x9640c4,_0x312ac9);}function a44_0x54ab(){const _0x2eb911=['jsonl','stringify','3681293UnZIMq','max','─┴─','isTTY','magenta','log','sdk-result','join','[error]','bold','boolean','entries','spawn','1647oDGbHl','525130xSARRU','7466283mkNbwx','padEnd','debug','output','bigint','resolve','limit','8BdFJdv','[Object]','[params]','stderr','tsv','map','[rule]','end','number','63790ScrMlj','FINISHED','json','-FXRSn','error','pipe','2820aOXtCA','query','blue','[query]','filter','keys','forEach','close','6pYcdmF','less','color','stdin','801mxECVs','cmdout','push','inherit','No\x20data','format','2072530mroASf','─┬─','1wmejyF','isInteger','object','list','6822852nhTXSl','repeat','length','varchar','trim','split','yellow','table','rule','[logs]','params','write','string'];a44_0x54ab=function(){return _0x2eb911;};return a44_0x54ab();}export async function formatQueryOutput(_0xffca5b,_0x25b539){const _0x1e547d=a44_0x3927,{format:_0x545d76,limit:_0x18dd0b,output:_0x562c0a,color:_0x51e221,noColor:_0x24117f}=_0x25b539,_0x2abb70=Boolean(_0x562c0a)&&!_0x51e221,_0x328311={'color':_0x51e221,'noColor':_0x24117f||_0x2abb70};if(_0x545d76===_0x1e547d(0x103)){const _0x542f29=shouldUseLess(_0x545d76,_0x562c0a);return formatAsTable(_0xffca5b,_0x18dd0b,_0x542f29,_0x328311);}else{if(_0x545d76===_0x1e547d(0x12c))return formatAsJSON(_0xffca5b,_0x328311);else return _0x545d76===_0x1e547d(0x109)?formatAsJSONL(_0xffca5b,_0x328311):formatQueryResult(_0xffca5b,_0x545d76);}}function shouldUseLess(_0x204bd1,_0x465f90){const _0x36b689=a44_0x3927;return(_0x204bd1===_0x36b689(0x103)||_0x204bd1===_0x36b689(0x147))&&process['stdout'][_0x36b689(0x10e)]&&!_0x465f90;}export function resolveOutputOptions(_0x25d225){const _0x1ca872=a44_0x3927,_0x12a834=resolveOutputFormat(_0x25d225[_0x1ca872(0x141)],_0x25d225[_0x1ca872(0x11d)],_0x1ca872(0x103));let _0x252cbc=typeof _0x25d225[_0x1ca872(0x120)]===_0x1ca872(0x129)?_0x25d225[_0x1ca872(0x120)]:parseInt(_0x25d225['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x4994f9=_0x25d225['output']||'';return shouldUseLess(_0x12a834,_0x4994f9)&&(_0x252cbc=Infinity),{'format':_0x12a834,'output':_0x4994f9,'limit':_0x252cbc,'color':_0x25d225[_0x1ca872(0x13a)],'noColor':_0x25d225['noColor']};}export function writeOutput(_0x537823,_0x246177,_0x61d7cd){const _0x54552f=a44_0x3927;return _0x246177?(writeFileSync(_0x246177,_0x537823),console[_0x54552f(0x12e)]('Results\x20saved\x20to\x20'+_0x246177),Promise[_0x54552f(0x11f)]()):shouldUseLess(_0x61d7cd||'','')?new Promise(_0x1e24d5=>{const _0x32510b=_0x54552f,_0x1fcdbe=spawn(_0x32510b(0x139),[_0x32510b(0x12d)],{'stdio':[_0x32510b(0x12f),_0x32510b(0x13f),'inherit']});let _0x176257=![];_0x1fcdbe['on'](_0x32510b(0x12e),()=>{const _0x2666b8=_0x32510b;!_0x176257&&(_0x176257=!![],console[_0x2666b8(0x110)](_0x537823),_0x1e24d5());}),_0x1fcdbe['on'](_0x32510b(0x137),()=>{!_0x176257&&(_0x176257=!![],_0x1e24d5());}),_0x1fcdbe['on'](_0x32510b(0x117),()=>{const _0xff8901=_0x32510b;!_0x176257&&_0x1fcdbe['stdin']&&(_0x1fcdbe['stdin']['on']('error',()=>{}),_0x1fcdbe['stdin'][_0xff8901(0x107)](_0x537823),_0x1fcdbe[_0xff8901(0x13b)][_0xff8901(0x128)]());}),!_0x1fcdbe[_0x32510b(0x13b)]&&(!_0x176257&&(_0x176257=!![],console[_0x32510b(0x110)](_0x537823),_0x1e24d5()));}):(console[_0x54552f(0x110)](_0x537823),Promise[_0x54552f(0x11f)]());}export async function handleSDKOutput(_0x3733c1,_0x381abd){const _0x3c0b22=a44_0x3927,_0xb9af92=resolveOutputOptions(_0x381abd),_0x46b14a=await formatSDKOutput(_0x3733c1,_0xb9af92);await writeOutput(_0x46b14a,_0xb9af92[_0x3c0b22(0x11d)]||undefined,_0xb9af92[_0x3c0b22(0x141)]);}export async function handleQueryOutput(_0x9bd945,_0x3f4099){const _0x4187fb=a44_0x3927,_0xddfef2=resolveOutputOptions(_0x3f4099),_0x5d009f=await formatQueryOutput(_0x9bd945,_0xddfef2);await writeOutput(_0x5d009f,_0xddfef2[_0x4187fb(0x11d)]||undefined,_0xddfef2[_0x4187fb(0x141)]);}async function formatSingleObject(_0x4fad2b,_0x343cd1){const _0x4ec792=a44_0x3927,{format:_0x45cd05,color:_0x2a513b,noColor:_0x995ab}=_0x343cd1,_0x41efd1={'color':_0x2a513b,'noColor':_0x995ab};if(_0x45cd05===_0x4ec792(0x12c)){if(shouldUseColor(_0x41efd1))return colorizeJSON(_0x4fad2b,_0x41efd1);return JSON[_0x4ec792(0x10a)](_0x4fad2b,null,0x2);}else{if(_0x45cd05===_0x4ec792(0x109)){if(shouldUseColor(_0x41efd1))return colorizeJSONCompact(_0x4fad2b,_0x41efd1);return JSON['stringify'](_0x4fad2b);}else{if(_0x45cd05==='tsv')return Object[_0x4ec792(0x116)](_0x4fad2b)[_0x4ec792(0x126)](([_0x521234,_0x387a1c])=>_0x521234+'\x09'+_0x387a1c)[_0x4ec792(0x112)]('\x0a');else{const _0x434911=Object['entries'](_0x4fad2b);if(_0x434911[_0x4ec792(0x14a)]===0x0)return _0x4ec792(0x140);const _0x3270fc=_0x4fad2b[_0x4ec792(0x11c)],_0x580483=_0x4fad2b[_0x4ec792(0x131)],_0x4ee9fe=_0x4fad2b[_0x4ec792(0x106)],_0xddb999=_0x4fad2b['rule'],_0x5f0feb=_0x580483?typeof _0x580483===_0x4ec792(0x108)?_0x580483:JSON[_0x4ec792(0x10a)](_0x580483,null,0x2):undefined,_0x25238b=_0x4ee9fe&&Object[_0x4ec792(0x135)](_0x4ee9fe)[_0x4ec792(0x14a)]>0x0?JSON[_0x4ec792(0x10a)](_0x4ee9fe,null,0x2):undefined,_0x18f77a=_0xddb999&&Object[_0x4ec792(0x135)](_0xddb999)[_0x4ec792(0x14a)]>0x0?JSON[_0x4ec792(0x10a)](_0xddb999,null,0x2):undefined,_0x2ce0fd=_0x434911[_0x4ec792(0x134)](([_0x2e7997])=>_0x2e7997!==_0x4ec792(0x11c)&&_0x2e7997!==_0x4ec792(0x131)&&_0x2e7997!==_0x4ec792(0x106)&&_0x2e7997!==_0x4ec792(0x104)),_0x2537ce=Math[_0x4ec792(0x10c)](..._0x2ce0fd['map'](([_0x89a33b])=>_0x89a33b[_0x4ec792(0x14a)])),_0xadfd16=Math[_0x4ec792(0x10c)](..._0x2ce0fd['map'](([,_0x58aedb])=>{const _0x315c60=_0x4ec792;try{const _0x514d56=_0x58aedb===null||_0x58aedb===undefined?'':typeof _0x58aedb===_0x315c60(0x146)?JSON['stringify'](_0x58aedb):String(_0x58aedb),_0x3c9f17=_0x514d56[_0x315c60(0x101)]('\x0a');return Math[_0x315c60(0x10c)](..._0x3c9f17[_0x315c60(0x126)](_0x24c3f8=>_0x24c3f8[_0x315c60(0x14a)]),0x0);}catch{return 0x0;}}),0x14),_0x28d52f=[];_0x28d52f[_0x4ec792(0x13e)](colorBorder('┌─'+'─'[_0x4ec792(0x149)](_0x2537ce)+_0x4ec792(0x143)+'─'[_0x4ec792(0x149)](_0xadfd16)+'─┐',_0x41efd1)),_0x2ce0fd['forEach'](([_0x24b4c9,_0x59c804])=>{const _0x23b569=_0x4ec792;let _0x494e21;try{_0x494e21=_0x59c804===null||_0x59c804===undefined?'':typeof _0x59c804===_0x23b569(0x146)?JSON[_0x23b569(0x10a)](_0x59c804):String(_0x59c804);}catch{_0x494e21=_0x23b569(0x122);}const _0x1c1f94=_0x24b4c9[_0x23b569(0x11b)](_0x2537ce),_0x11245b=_0x494e21[_0x23b569(0x101)]('\x0a');_0x11245b[_0x23b569(0x136)]((_0x5a78c6,_0x3e28f2)=>{const _0x3c14e6=_0x23b569,_0x46fc6e=colorBorder('│',_0x41efd1);_0x3e28f2===0x0?_0x28d52f[_0x3c14e6(0x13e)](_0x46fc6e+'\x20'+_0x1c1f94+'\x20'+_0x46fc6e+'\x20'+_0x5a78c6[_0x3c14e6(0x11b)](_0xadfd16)+'\x20'+_0x46fc6e):_0x28d52f[_0x3c14e6(0x13e)](_0x46fc6e+'\x20'+'\x20'[_0x3c14e6(0x149)](_0x2537ce)+'\x20'+_0x46fc6e+'\x20'+_0x5a78c6[_0x3c14e6(0x11b)](_0xadfd16)+'\x20'+_0x46fc6e);});}),_0x28d52f[_0x4ec792(0x13e)](colorBorder('└─'+'─'[_0x4ec792(0x149)](_0x2537ce)+_0x4ec792(0x10d)+'─'[_0x4ec792(0x149)](_0xadfd16)+'─┘',_0x41efd1));_0x5f0feb&&(_0x28d52f['push'](''),_0x28d52f['push'](String(a44_0x118b13[_0x4ec792(0x102)]['bold'](_0x4ec792(0x133)))),_0x28d52f[_0x4ec792(0x13e)](_0x5f0feb));_0x25238b&&(_0x28d52f[_0x4ec792(0x13e)](''),_0x28d52f['push'](String(a44_0x118b13[_0x4ec792(0x132)][_0x4ec792(0x114)](_0x4ec792(0x123)))),_0x28d52f[_0x4ec792(0x13e)](_0x25238b));_0x18f77a&&(_0x28d52f['push'](''),_0x28d52f[_0x4ec792(0x13e)](String(a44_0x118b13[_0x4ec792(0x10f)][_0x4ec792(0x114)](_0x4ec792(0x127)))),_0x28d52f[_0x4ec792(0x13e)](_0x18f77a));if(_0x3270fc){if(_0x3270fc['stderr']){_0x28d52f['push'](''),_0x28d52f[_0x4ec792(0x13e)](String(a44_0x118b13['red']['bold'](_0x4ec792(0x113))));const _0x5ba985=_0x3270fc[_0x4ec792(0x124)][_0x4ec792(0x101)]('\x0a');_0x5ba985[_0x4ec792(0x136)](_0x4d4192=>{const _0x27b9d6=_0x4ec792;_0x4d4192[_0x27b9d6(0x14c)]()&&_0x28d52f[_0x27b9d6(0x13e)](_0x4d4192);});}if(_0x3270fc['cmdout']){_0x28d52f[_0x4ec792(0x13e)](''),_0x28d52f[_0x4ec792(0x13e)](String(a44_0x118b13['cyan']['bold'](_0x4ec792(0x105))));const _0x13d76c=_0x3270fc[_0x4ec792(0x13d)][_0x4ec792(0x101)]('\x0a');_0x13d76c[_0x4ec792(0x136)](_0x14afb2=>{const _0x5ae361=_0x4ec792;_0x14afb2[_0x5ae361(0x14c)]()&&_0x28d52f[_0x5ae361(0x13e)](_0x14afb2);});}}return _0x28d52f[_0x4ec792(0x112)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x3fbd26,_0x561501){const _0x5b925b=a44_0x3927;if(_0x561501['format']===_0x5b925b(0x103)){await handleSDKOutput([_0x3fbd26],_0x561501);return;}const _0x25672f=resolveOutputOptions(_0x561501),_0x435ad0=await formatSingleObject(_0x3fbd26,_0x25672f);await writeOutput(_0x435ad0,_0x25672f[_0x5b925b(0x11d)]||undefined,_0x25672f[_0x5b925b(0x141)]);}