@treasuredata/tdx 2026.3.10 → 2026.3.11
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.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a51_0x10da29=a51_0x4c2d;(function(_0xbe5b85,_0x51a451){const _0x335325=a51_0x4c2d,_0x272445=_0xbe5b85();while(!![]){try{const _0x2a3b44=parseInt(_0x335325(0x2e7))/0x1*(-parseInt(_0x335325(0x1c2))/0x2)+-parseInt(_0x335325(0x177))/0x3*(parseInt(_0x335325(0x236))/0x4)+parseInt(_0x335325(0x1ab))/0x5*(parseInt(_0x335325(0x227))/0x6)+parseInt(_0x335325(0x29b))/0x7+-parseInt(_0x335325(0x157))/0x8*(-parseInt(_0x335325(0x17d))/0x9)+-parseInt(_0x335325(0x1a1))/0xa*(parseInt(_0x335325(0x21d))/0xb)+-parseInt(_0x335325(0x248))/0xc;if(_0x2a3b44===_0x51a451)break;else _0x272445['push'](_0x272445['shift']());}catch(_0x59e32f){_0x272445['push'](_0x272445['shift']());}}}(a51_0x141c,0xb2353));import a51_0x55b9d6 from'chalk';import{existsSync}from'fs';import a51_0x2dea47 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';function a51_0x141c(){const _0x1dffcd=['\x20session','match','\x20-\x20','Session\x20time:\x20','getFullYear','utf-8','New\x20project\x20name:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','Listing\x20workflow\x20attempts...','sourceDir','buildTimelineData','startedAt','showWorkflowConsoleUrl','Including\x20subtasks:\x20yes','relative','workflow:tasks','Killing\x20attempt...','attemptId','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','window','Select\x20a\x20session\x20to\x20view\x20timeline:','\x20to\x20see\x20detailed\x20logs','group_error','readFile','Force:\x20yes','Secrets\x20to\x20set:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','session:','✔\x20Workflow\x20run\x20started','renderSessionsTimeline','💡\x20Tip:\x20Use\x20','cancelRequested','path','66JMHDnv','taskName','workflow:timeline','-\x20nothing\x20pushed','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','log','toISOString','attempt','\x20\x20tdx\x20wf\x20use\x20<project>','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','246mwmAlG','fileCount','\x27\x20from\x20project\x20\x27','isArray','\x0a✔\x20Attempt\x20complete','padStart','session','context','Error:','setSecrets','keys','retrySession','sessions','\x20unchanged','clear','1651480rzChXV','Revision:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','Project\x20name\x20is\x20required','yes','updatedAt','List\x20workflows','round','autocomplete','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','resolveProject','Attempt\x20ID:\x20','deleted','changes','planned','Source\x20directory\x20is\x20required','join','MAX_POLL_ITERATIONS','19033020AqAwhl','fromTask','icon','startsWith','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Retry\x20a\x20session\x20or\x20attempt','filesExtracted','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','floor','\x20\x20Console:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x20is\x20not\x20a\x20directory','modified','/app/workflows/','\x22\x20with\x20new\x20revision?','startTime','Usage:\x20workflow:delete\x20<project-name-or-id>','toLowerCase','✔\x20Project\x20updated','No\x20sessions\x20found\x20for:\x20','\x20from\x20session\x20','existingProjectId','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','getMonth','workflow:kill','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Getting\x20attempt\x20details...','status','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Kill\x20a\x20running\x20attempt','Parameters:\x20','✔\x20Found\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','stat','Error:\x20Project\x20name\x20is\x20required','workflow:logs','push','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Include\x20retried:\x20yes','No\x20workflows\x20found','green','\x0aPolling...\x20(','Target:\x20','index','workflow:attempt','red','start','✔\x20Retry\x20started','values','executeCloneProject','rows','tdx.json','Resume\x20from:\x20','workflow:upload','message','\x20\x20Session\x20ID:\x20','limit','Attempt:\x20','✔\x20Showing\x20','\x20\x20Project:\x20','yellow','includeSubtasks','\x20modified','getTime','\x20\x20Target:\x20','splice','✔\x20Clone\x20complete','\x0a⚠\x20Project\x20\x22','max','new','\x20project','Validation:\x20skipped','\x22\x20already\x20exists\x20(ID:\x20','\x0aUpdate\x20existing\x20project\x20\x22','\x22\x20to\x20new\x20project\x20\x22','No\x20attempts\x20found','Project\x20directory:\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','canceling','Writing\x20files...','indexOf','revision:\x20','9114861MMrGuz','json','workflows','fs/promises','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','/attempt/','workflowName','No\x20sessions\x20found\x20in\x20project:\x20','Retrying\x20session...','Filter:\x20','sessionTime','\x20(use\x20--limit\x20to\x20show\x20more)','find','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','site','Deleting\x20project\x20','all','task','\x20secrets...','parseProjectWorkflowPattern','Error:\x20Secret\x20key\x20is\x20required','pending','\x0a✔\x20No\x20changes\x20to\x20push','error','\x20\x20New\x20attempt\x20ID:\x20','metadata','workflow:secrets:delete','Source:\x20','parse','\x20\x20Revision:\x20','repeat','ICON_WIDTH','projectId','Listing\x20workflows...','fileSize','Show\x20logs\x20for\x20a\x20workflow\x20attempt','✔\x20Project:\x20','description','Reason:\x20','fill','project','white','finishedAt','workflow:secrets:set','set','Filter:\x20project=','No\x20workflow\x20projects\x20found','end','/sessions/','workflow:sessions','targetExists','params','newProjectName','\x20has\x20no\x20attempts','\x20secret','createdAt','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Files\x20to\x20upload:\x20','navigateSessionsInteractive','min','state','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','✔\x20Pushed\x20','Source\x20directory:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20deleted','sessionId','blue','Source\x20project:\x20','key','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20Session\x20context\x20set\x20to:\x20','deleteSecret','\x20\x20Location:\x20','workflow','Cancelled','21689tcpDpx','stringify','slice','force','✔\x20Workflow\x20project\x20set\x20to:\x20','newProjectId','revision','\x20\x20Project\x20ID:\x20','retryAttemptName','\x0a✔\x20Already\x20up\x20to\x20date','projectName','MIN_LABEL_COUNT','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','resolve','Task\x20name:\x20','Listing\x20workflow\x20projects...','Deleting\x20secret...','-\x20no\x20files\x20written','No\x20attempts\x20found\x20for:\x20','→\x20New\x20project:\x20','3524072cCfgTW','duration','Project\x20filter:\x20','reason','Failed\x20to\x20fetch\x20attempt\x20data','Using\x20attempt\x20','data','includes','workflow:clone','No\x20workflow\x20tdx.json\x20found','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','filter','skipValidation','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','MAX_LABEL_COUNT','\x20new','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','\x20\x20Workflow:\x20','Show\x20tasks\x20for\x20an\x20attempt','displayLine','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','list','\x20of\x20','Target\x20directory:\x20','getDate','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','delete','substring','🔄\x20','Error:\x20Attempt\x20ID\x20is\x20required','localeCompare','generateSessionTimelineRows','3EMIwev','applyPullProject','write','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x1b[1A\x1b[2K','listSecrets','18CqHulz','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','now','workflow:run','targetDir','download','Getting\x20attempt\x20tasks...','resolveProjectDir','...','text','trim','Output\x20directory:\x20','No\x20sessions\x20found','✔\x20Pull\x20complete','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','some','split','pollTimeline','MIN_TIMELINE_WIDTH','dim','attempts','from','output','workflow:use','renderSingleTimeline','follow','List\x20workflow\x20attempts','unknown','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','msPerChar','Project:\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','workflowProject','✔\x20Workflow\x20project\x20context\x20cleared.','.\x20Expected\x20format:\x20KEY=VALUE','diff','772710QAYYSm','total','\x20\x20Source:\x20','columns','sys','Auto-selected\x20latest\x20session:\x20','📋\x20','logs','Dry\x20run:\x20yes','select','141610LxfxUh','jsonl','List\x20all\x20workflow\x20projects','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x0aApply\x20these\x20changes?','basename','POLL_INTERVAL_MS','table','size','session_id','length','No\x20matching\x20sessions\x20found','param','replace','name','---\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','No\x20attempts\x20found\x20in\x20project:\x20','Expected\x20format:\x20--param\x20key=value','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','No\x20log\x20content\x20found','Downloading\x20project\x20','14WSMvjG','✔\x20Secret\x20\x27','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','LABEL_MIN_SPACING','Key:\x20','sourceProjectName','Session\x20not\x20found:\x20','summary','List\x20workflow\x20execution\x20sessions','map','stdout','MAX_TIMELINE_WIDTH','Show\x20specific\x20attempt\x20details','\x0aPush\x20these\x20changes?','\x20task','\x0aError:','workflow:push','Start\x20a\x20workflow\x20run','unchanged','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','workflow:download','Invalid\x20format:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','done','cyan','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','MAX_TASKS_DISPLAY','workflow:pull','format','tdx\x20wf\x20attempt\x20','get','(use\x20--limit\x20to\x20see\x20more)','execute','Starting\x20workflow\x20run...','Pushing\x20workflow\x20project...','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x0aClone\x20\x22','GUTTER','✔\x20Push\x20complete','Pulling\x20project\x20','renderTimeline','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','verbose','running','Setting\x20','tasks','(unknown)','sort','isNewProject','isTTY','Pattern:\x20','success','lastAttempt','\x20\x20Changes:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','dryRun','fullName'];a51_0x141c=function(){return _0x1dffcd;};return a51_0x141c();}import a51_0x5637a3 from'prompts';function getAttemptStatusDisplay(_0x23d6f3){const _0x54a343=a51_0x4c2d;if(!_0x23d6f3)return{'icon':'⏳','text':''};const {done:_0x3bb723,success:_0x121f48,cancelRequested:_0x218631}=_0x23d6f3;if(!_0x3bb723)return _0x218631?{'icon':'🛑','text':a51_0x55b9d6['yellow']('canceling')}:{'icon':'🔄','text':a51_0x55b9d6[_0x54a343(0x2de)](_0x54a343(0x1ee))};if(_0x121f48)return{'icon':'✅','text':a51_0x55b9d6[_0x54a343(0x270)](_0x54a343(0x1f6))};return{'icon':'❌','text':a51_0x55b9d6[_0x54a343(0x275)](_0x54a343(0x2b2))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x2465d7,_0x622e37,_0x595b61=0x0){const _0x5d1111=a51_0x4c2d;return _0x2465d7[_0x595b61]||_0x622e37[_0x5d1111(0x19d)];}['requireProject'](_0x2c6e9a,_0x48d15e,_0x3625e0=0x0){const _0x4d01c9=a51_0x4c2d,_0x3ab603=this['resolveProject'](_0x2c6e9a,_0x48d15e,_0x3625e0);if(!_0x3ab603)return console[_0x4d01c9(0x2b2)](a51_0x55b9d6[_0x4d01c9(0x275)](_0x4d01c9(0x22f)),_0x4d01c9(0x239)),console[_0x4d01c9(0x2b2)](a51_0x55b9d6[_0x4d01c9(0x190)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x3ab603;}['parseProjectWorkflowPattern'](_0x40f3cb,_0x1d7d53){const _0x34f0eb=a51_0x4c2d;if(_0x40f3cb[0x0]){const _0x582a8a=_0x40f3cb[0x0][_0x34f0eb(0x18d)]('.');if(_0x582a8a[_0x34f0eb(0x1b5)]===0x1)return{'projectName':_0x582a8a[0x0],'workflowName':undefined};else return _0x582a8a['length']===0x2?{'projectName':_0x582a8a[0x0],'workflowName':_0x582a8a[0x1]}:(console[_0x34f0eb(0x2b2)](a51_0x55b9d6['red'](_0x34f0eb(0x22f)),_0x34f0eb(0x161)),null);}return{'projectName':_0x1d7d53[_0x34f0eb(0x19d)],'workflowName':undefined};}[a51_0x10da29(0x184)](_0x5f192c,_0x24aa6a,_0xf237a8=0x0){const _0x202929=a51_0x10da29;if(_0x5f192c[_0xf237a8])return _0x5f192c[_0xf237a8];if(_0x24aa6a['workflowProject']){const _0x528503=a51_0x2dea47['join'](process['cwd'](),_0x202929(0x29d),_0x24aa6a[_0x202929(0x19d)]);if(existsSync(a51_0x2dea47['join'](_0x528503,_0x202929(0x27b))))return _0x528503;}return undefined;}async['showWorkflowConsoleUrl'](_0x58a510,_0x48a34f,_0x4716bc){const _0x270165=a51_0x10da29;try{const _0x406404=await _0x58a510[_0x270165(0x2e5)]['workflows'](_0x48a34f,{'limit':0x1});if(_0x406404[_0x270165(0x1b5)]>0x0){const _0x12cd92=_0x406404[0x0]['id'],_0x592edb=getWorkflowUrl(_0x4716bc,_0x12cd92);console[_0x270165(0x2b2)]('\x20\x20Console:\x20'+a51_0x55b9d6[_0x270165(0x1da)](_0x592edb));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x194);[a51_0x10da29(0x2c0)]=a51_0x10da29(0x29f);async[a51_0x10da29(0x1e3)](_0x236cab){const _0x554720=a51_0x10da29,{options:_0x29739d,args:_0x21339f,tdx:_0x4428f4}=_0x236cab,_0x53fd54=_0x21339f[0x0],_0x3d70d5=_0x29739d[_0x554720(0x235)];if(_0x3d70d5)return saveSessionContext({'workflow_project':undefined},_0x29739d['session']),console[_0x554720(0x222)](a51_0x55b9d6[_0x554720(0x270)](_0x554720(0x19e))),0x0;if(!_0x53fd54)return console[_0x554720(0x2b2)](a51_0x55b9d6[_0x554720(0x275)](_0x554720(0x22f)),'Project\x20name\x20is\x20required'),console[_0x554720(0x2b2)](a51_0x55b9d6[_0x554720(0x190)](_0x554720(0x1bb))),console[_0x554720(0x2b2)](a51_0x55b9d6['dim'](_0x554720(0x1d8))),0x1;const _0x183320=await withSpinner('Resolving\x20project\x20\x27'+_0x53fd54+'\x27...',()=>_0x4428f4[_0x554720(0x2e5)]['resolveProjectId'](_0x53fd54),{'verbose':_0x29739d[_0x554720(0x1ed)]}),{name:_0x2ff6cf}=_0x183320[_0x554720(0x15d)];return saveSessionContext({'workflow_project':_0x2ff6cf},_0x29739d[_0x554720(0x22d)]),console[_0x554720(0x222)](a51_0x55b9d6[_0x554720(0x270)](_0x554720(0x147)+a51_0x55b9d6['cyan'](_0x2ff6cf))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a51_0x10da29(0x1b9)]='workflow:projects';[a51_0x10da29(0x2c0)]=a51_0x10da29(0x1ad);async[a51_0x10da29(0x1e3)](_0x13cafb){const _0x2d0219=a51_0x10da29,{options:_0x548e6a,args:_0x322307,tdx:_0x58745b}=_0x13cafb,_0x50823b=_0x322307[0x0];_0x548e6a[_0x2d0219(0x1ed)]&&_0x50823b&&console[_0x2d0219(0x2b2)](_0x2d0219(0x1f5)+_0x50823b);const _0x29a2b6=await withSpinner(_0x2d0219(0x152),()=>_0x58745b['workflow']['projects'](_0x50823b,{'limit':_0x548e6a[_0x2d0219(0x280)]}),{'verbose':_0x548e6a[_0x2d0219(0x1ed)]});let _0x11c0ca=_0x29a2b6['data'];_0x11c0ca[_0x2d0219(0x1f2)]((_0x156559,_0x189689)=>_0x156559[_0x2d0219(0x1b9)]['localeCompare'](_0x189689['name']));const _0x565a56=_0x548e6a['limit']||0x64,_0x3cf0d7=_0x11c0ca[_0x2d0219(0x1b5)]>=_0x565a56?a51_0x55b9d6[_0x2d0219(0x190)](_0x2d0219(0x2a6)):'';console[_0x2d0219(0x2b2)](_0x2d0219(0x267)+_0x11c0ca[_0x2d0219(0x1b5)]+_0x2d0219(0x28e)+(_0x11c0ca[_0x2d0219(0x1b5)]!==0x1?'s':'')+_0x3cf0d7);if(_0x548e6a['format']===_0x2d0219(0x29c)||_0x548e6a['format']===_0x2d0219(0x1ac)||_0x548e6a[_0x2d0219(0x1df)]===_0x2d0219(0x1b2))await handleSDKOutput(_0x11c0ca,_0x548e6a);else{if(_0x11c0ca[_0x2d0219(0x1b5)]===0x0)_0x50823b?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x50823b):console['log'](_0x2d0219(0x2c9));else{const _0x6964cb=_0x11c0ca['map'](_0x26965d=>{const _0x5de235=_0x2d0219,_0x1b9f75=_0x26965d[_0x5de235(0x2b4)]?.[_0x5de235(0x18c)](_0x2dbef5=>_0x2dbef5['key']===_0x5de235(0x1a5)),_0x27b591=_0x1b9f75?a51_0x55b9d6[_0x5de235(0x190)]('\x20(system)'):'';return'📁\x20'+_0x26965d['name']+_0x27b591;});await writeOutput(_0x6964cb[_0x2d0219(0x246)]('\x0a'),_0x548e6a[_0x2d0219(0x193)],_0x2d0219(0x16c));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]='workflow:workflows';[a51_0x10da29(0x2c0)]=a51_0x10da29(0x23c);async[a51_0x10da29(0x1e3)](_0x3607f4){const _0x4aed05=a51_0x10da29,{options:_0xd47ecf,args:_0x218f20,tdx:_0x3b1d87}=_0x3607f4,_0x28f848=this['resolveProject'](_0x218f20,_0xd47ecf);_0xd47ecf['verbose']&&_0x28f848&&console['error'](_0x4aed05(0x159)+_0x28f848);const _0x24e4e0=await withSpinner(_0x4aed05(0x2bc),()=>_0x3b1d87[_0x4aed05(0x2e5)][_0x4aed05(0x29d)](_0x28f848,{'limit':_0xd47ecf[_0x4aed05(0x280)]}),{'verbose':_0xd47ecf[_0x4aed05(0x1ed)]});let _0x3fb431=_0x24e4e0['data'];_0x3fb431['sort']((_0x421833,_0x384873)=>{const _0x56bf57=_0x4aed05,_0x32bd14=_0x421833[_0x56bf57(0x1b9)]['localeCompare'](_0x384873[_0x56bf57(0x1b9)]);if(_0x32bd14!==0x0)return _0x32bd14;return(_0x421833[_0x56bf57(0x2c3)]?.[_0x56bf57(0x1b9)]||'')[_0x56bf57(0x175)](_0x384873['project']?.[_0x56bf57(0x1b9)]||'');});const _0x1b4767=_0xd47ecf[_0x4aed05(0x280)]||0x64,_0x4b64b5=_0x3fb431[_0x4aed05(0x1b5)]>=_0x1b4767?a51_0x55b9d6[_0x4aed05(0x190)](_0x4aed05(0x2a6)):'';console[_0x4aed05(0x2b2)](_0x4aed05(0x267)+_0x3fb431['length']+'\x20workflow'+(_0x3fb431[_0x4aed05(0x1b5)]!==0x1?'s':'')+_0x4b64b5);if(_0xd47ecf[_0x4aed05(0x1df)]===_0x4aed05(0x29c)||_0xd47ecf[_0x4aed05(0x1df)]==='jsonl'||_0xd47ecf['format']===_0x4aed05(0x1b2))await handleSDKOutput(_0x3fb431,_0xd47ecf);else{if(_0x3fb431[_0x4aed05(0x1b5)]===0x0)_0x28f848?console['log']('No\x20workflows\x20found\x20in\x20project:\x20'+_0x28f848):console[_0x4aed05(0x222)](_0x4aed05(0x26f));else{const _0x135e48=_0xd47ecf[_0x4aed05(0x2a9)],_0x7a522e=_0x3fb431['map'](_0x2f4ee5=>{const _0x4fd054=_0x4aed05,_0x3cd38b=a51_0x55b9d6[_0x4fd054(0x190)]('#'+_0x2f4ee5['id']),_0x58c326=hyperlink(_0x3cd38b,getWorkflowUrl(_0x135e48,_0x2f4ee5['id'])),_0x4ce57c=_0x2f4ee5[_0x4fd054(0x2c3)]?.['name']?a51_0x55b9d6[_0x4fd054(0x190)]('\x20('+_0x2f4ee5[_0x4fd054(0x2c3)][_0x4fd054(0x1b9)]+')'):'';return _0x4fd054(0x1a7)+_0x58c326+'\x20'+_0x2f4ee5[_0x4fd054(0x1b9)]+_0x4ce57c;});await writeOutput(_0x7a522e['join']('\x0a'),_0xd47ecf['output'],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x2cc);[a51_0x10da29(0x2c0)]=a51_0x10da29(0x1ca);async[a51_0x10da29(0x1e3)](_0x508d46){const _0x54a014=a51_0x10da29,{options:_0x206ce8,args:_0xb1831,tdx:_0x3194f2}=_0x508d46,_0x4cbc3b=this[_0x54a014(0x2ae)](_0xb1831,_0x206ce8);if(!_0x4cbc3b)return 0x1;const {projectName:_0x2c1f77,workflowName:_0x5b7fed}=_0x4cbc3b;if(_0x206ce8['verbose']){if(_0x2c1f77&&_0x5b7fed)console['error'](_0x54a014(0x2a4)+_0x2c1f77+'.'+_0x5b7fed);else _0x2c1f77&&console[_0x54a014(0x2b2)](_0x54a014(0x2c8)+_0x2c1f77);const _0x419005=_0x206ce8[_0x54a014(0x263)];_0x419005&&console['error']('Status:\x20'+_0x419005);}let _0x35e217=0x28;if(process[_0x54a014(0x1cc)][_0x54a014(0x1f4)]&&!_0x206ce8[_0x54a014(0x193)]&&!_0x206ce8[_0x54a014(0x1df)]){const _0x188386=process['stdout']['rows']||0x28;_0x35e217=Math['max'](0x14,Math[_0x54a014(0x250)](_0x188386*0x2/0x3));}const _0x141343=_0x206ce8['limit']||_0x35e217,_0xc489a4=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x3194f2['workflow']['sessions']({'projectName':_0x2c1f77,'workflowName':_0x5b7fed,'status':_0x206ce8[_0x54a014(0x263)],'fromTime':_0x206ce8[_0x54a014(0x192)],'toTime':_0x206ce8['to'],'limit':_0x141343}),{'verbose':_0x206ce8[_0x54a014(0x1ed)]}),_0x279b37=_0xc489a4[_0x54a014(0x15d)];_0x279b37['sort']((_0x2aa6e3,_0x2042b9)=>{const _0x43c2c5=_0x54a014,_0x3d3092=_0x2aa6e3[_0x43c2c5(0x2a5)]||'',_0xd98888=_0x2042b9[_0x43c2c5(0x2a5)]||'';return _0xd98888[_0x43c2c5(0x175)](_0x3d3092);});_0x279b37['length']>=_0x141343?console[_0x54a014(0x2b2)](_0x54a014(0x282)+_0x279b37[_0x54a014(0x1b5)]+'\x20sessions\x20'+a51_0x55b9d6[_0x54a014(0x190)](_0x54a014(0x1e2))):console['error'](_0x54a014(0x267)+_0x279b37[_0x54a014(0x1b5)]+_0x54a014(0x1fc)+(_0x279b37[_0x54a014(0x1b5)]!==0x1?'s':''));if(_0x206ce8[_0x54a014(0x1df)]==='json'||_0x206ce8[_0x54a014(0x1df)]===_0x54a014(0x1ac)||_0x206ce8[_0x54a014(0x1df)]===_0x54a014(0x1b2))await handleSDKOutput(_0x279b37,_0x206ce8);else{if(!process[_0x54a014(0x1cc)][_0x54a014(0x1f4)]||_0x206ce8['output']){if(_0x279b37['length']===0x0){if(_0x2c1f77&&_0x5b7fed)console[_0x54a014(0x222)](_0x54a014(0x25b)+_0x2c1f77+'.'+_0x5b7fed);else _0x2c1f77?console[_0x54a014(0x222)](_0x54a014(0x2a2)+_0x2c1f77):console[_0x54a014(0x222)](_0x54a014(0x189));}else{const _0x30b30f=_0x206ce8[_0x54a014(0x2a9)],_0x3a7b3e=this[_0x54a014(0x219)](_0x279b37,_0x30b30f);_0x206ce8['output']?await writeOutput(_0x3a7b3e,_0x206ce8[_0x54a014(0x193)],'list'):console[_0x54a014(0x222)](_0x3a7b3e);}!_0x2c1f77&&(console[_0x54a014(0x2b2)](''),console[_0x54a014(0x2b2)](a51_0x55b9d6[_0x54a014(0x190)](_0x54a014(0x2db))),console[_0x54a014(0x2b2)](a51_0x55b9d6[_0x54a014(0x190)](_0x54a014(0x1f9))+'or'+a51_0x55b9d6[_0x54a014(0x190)](_0x54a014(0x225))));}else{if(_0x279b37['length']===0x0){if(_0x2c1f77&&_0x5b7fed)console[_0x54a014(0x222)]('No\x20sessions\x20found\x20for:\x20'+_0x2c1f77+'.'+_0x5b7fed);else _0x2c1f77?console[_0x54a014(0x222)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x2c1f77):console['log'](_0x54a014(0x189));}else await this[_0x54a014(0x2d5)](_0x279b37,_0x508d46,_0x2c1f77);}}return 0x0;}[a51_0x10da29(0x219)](_0x54a16e,_0x117dbe){const _0xc2bdaf=a51_0x10da29,_0x41e5b6=[],_0x42d6cb=new Map();let _0x4e0459=Infinity,_0x459c73=-Infinity;for(const _0x53f5dc of _0x54a16e){if(_0x53f5dc[_0xc2bdaf(0x1f7)]?.[_0xc2bdaf(0x2d2)]){const _0x2aa0bd=new Date(_0x53f5dc[_0xc2bdaf(0x1f7)]['createdAt'])[_0xc2bdaf(0x287)](),_0x49c604=_0x53f5dc[_0xc2bdaf(0x1f7)][_0xc2bdaf(0x2c5)]?new Date(_0x53f5dc['lastAttempt'][_0xc2bdaf(0x2c5)])['getTime']():Date[_0xc2bdaf(0x17f)](),_0x3e0a3b=_0x53f5dc[_0xc2bdaf(0x2c3)]?.[_0xc2bdaf(0x1b9)]||_0xc2bdaf(0x1f1);!_0x42d6cb['has'](_0x3e0a3b)&&_0x42d6cb['set'](_0x3e0a3b,[]),_0x42d6cb[_0xc2bdaf(0x1e1)](_0x3e0a3b)[_0xc2bdaf(0x26c)]({'session':_0x53f5dc,'startTime':_0x2aa0bd,'endTime':_0x49c604,'duration':_0x49c604-_0x2aa0bd}),_0x4e0459=Math['min'](_0x4e0459,_0x2aa0bd),_0x459c73=Math[_0xc2bdaf(0x28c)](_0x459c73,_0x49c604);}}if(_0x42d6cb[_0xc2bdaf(0x1b3)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x575a9c=process[_0xc2bdaf(0x1cc)][_0xc2bdaf(0x1a4)]||0x78,_0x27dcc2=0x1e,_0x46f83b=0x32,_0x1c0403=0x4,_0x4de66a=Math[_0xc2bdaf(0x2d6)](_0x46f83b,Math[_0xc2bdaf(0x28c)](_0x27dcc2,Math[_0xc2bdaf(0x250)](_0x575a9c*0.3))),_0x2e97f5=_0x575a9c-_0x4de66a-TIMELINE_CONFIG[_0xc2bdaf(0x1e8)]-0x3-_0x1c0403,_0x4e3d19=_0x459c73-_0x4e0459,_0x3be75d=_0x4e3d19/_0x4de66a,_0x1d403d=renderTimeAxis({'startTime':_0x4e0459,'endTime':_0x459c73,'durationMs':_0x4e3d19,'msPerChar':_0x3be75d},_0x4de66a),_0x9912f9=[];for(const _0x23a7c0 of _0x42d6cb[_0xc2bdaf(0x278)]()){_0x9912f9['push'](..._0x23a7c0);}_0x9912f9[_0xc2bdaf(0x1f2)]((_0x5a0917,_0x714dca)=>_0x714dca[_0xc2bdaf(0x257)]-_0x5a0917['startTime']);const _0x4106ac=new Date(_0x4e0459),_0x10d0eb=formatDate(_0x4106ac),_0x582f18=_0x1c0403+TIMELINE_CONFIG[_0xc2bdaf(0x2ba)]+TIMELINE_CONFIG['ICON_SPACING']+_0x2e97f5,_0x29c71e='\x20'[_0xc2bdaf(0x2b9)](_0x582f18-_0x10d0eb['length']),_0x30d26f=_0x29c71e+a51_0x55b9d6['dim'](_0x10d0eb)+'\x20'+_0x1d403d;_0x41e5b6[_0xc2bdaf(0x26c)](_0x30d26f);const _0x515480=0x16;let _0x5344ef=0x0;for(const _0xdf3240 of _0x9912f9){const _0x383b71=_0xdf3240[_0xc2bdaf(0x22d)][_0xc2bdaf(0x2c3)]?.['name']||'?',_0x2f79c8=Math[_0xc2bdaf(0x2d6)](stringWidth(_0x383b71),_0x515480);_0x5344ef=Math[_0xc2bdaf(0x28c)](_0x5344ef,_0x2f79c8);}for(const _0x1754bf of _0x9912f9){const {session:_0x38eea4,startTime:_0x204742,endTime:_0xaeb974,duration:_0x2af4c8}=_0x1754bf,_0x40a6ae=_0x38eea4[_0xc2bdaf(0x2c3)]?.['id'],_0x3ed5cc=_0x38eea4['id'],_0xa6489b=_0x38eea4['project']?.['name']||'?',_0x3e158c=_0x38eea4[_0xc2bdaf(0x2e5)]?.[_0xc2bdaf(0x1b9)]||'?';let _0x33192d,_0x1d3ac7;if(_0x38eea4[_0xc2bdaf(0x1f7)]){const _0x3cb59e=_0x38eea4[_0xc2bdaf(0x1f7)];!_0x3cb59e[_0xc2bdaf(0x1d9)]?(_0x33192d=_0x3cb59e[_0xc2bdaf(0x21b)]?'🛑':'🔄',_0x1d3ac7=_0x3cb59e[_0xc2bdaf(0x21b)]?a51_0x55b9d6['yellow']:a51_0x55b9d6[_0xc2bdaf(0x2de)]):(_0x33192d=_0x3cb59e[_0xc2bdaf(0x1f6)]?'✅':'❌',_0x1d3ac7=_0x3cb59e['success']?a51_0x55b9d6[_0xc2bdaf(0x270)]:a51_0x55b9d6[_0xc2bdaf(0x275)]);}else _0x33192d='⏳',_0x1d3ac7=a51_0x55b9d6[_0xc2bdaf(0x190)];const _0x5dac23='#'+_0x3ed5cc,_0x42f171=_0x40a6ae?hyperlink(_0x5dac23,getWorkflowSessionUrl(_0x117dbe,_0x40a6ae,_0x3ed5cc)):_0x5dac23;let _0x298ce5=_0xa6489b;stringWidth(_0xa6489b)>_0x515480&&(_0x298ce5=_0xa6489b['slice'](0x0,_0x515480-0x1)+'…');const _0x2e46c3=a51_0x55b9d6[_0xc2bdaf(0x190)](_0x298ce5),_0x300269=stringWidth(_0x298ce5),_0x5a59a6='\x20'[_0xc2bdaf(0x2b9)](_0x5344ef-stringWidth(_0x298ce5)+0x2),_0x337581='('+formatElapsed(_0x2af4c8)+')',_0x2fdd39=stringWidth(_0x337581),_0x26f08a=stringWidth(_0x5dac23),_0x190279=_0x26f08a+0x1+_0x300269+_0x5a59a6[_0xc2bdaf(0x1b5)],_0x409fb6=_0x2e97f5-_0x190279-_0x2fdd39-0x1-0x8;let _0x56a616=_0x3e158c;stringWidth(_0x56a616)>_0x409fb6&&(_0x56a616=_0x56a616[_0xc2bdaf(0x2e9)](0x0,_0x409fb6-0x1)+'…');const _0x2098e5=_0x42f171+'\x20'+_0x2e46c3+_0x5a59a6+_0x56a616,_0x278cd8=stringWidth(_0x2098e5),_0x4cd0b2=_0x2e97f5-_0x278cd8-_0x2fdd39,_0x3c7477=_0x2098e5+'\x20'[_0xc2bdaf(0x2b9)](Math[_0xc2bdaf(0x28c)](0x1,_0x4cd0b2))+a51_0x55b9d6[_0xc2bdaf(0x190)](_0x337581),_0x431d2b=Math['floor']((_0x204742-_0x4e0459)/_0x3be75d),_0x25ddd6=Math[_0xc2bdaf(0x250)]((_0xaeb974-_0x4e0459)/_0x3be75d),_0x55f353=Math[_0xc2bdaf(0x28c)](_0x431d2b+0x1,_0x25ddd6),_0x1bbbed=new Array(_0x4de66a)['fill']('\x20');for(let _0x1b4460=_0x431d2b;_0x1b4460<Math[_0xc2bdaf(0x2d6)](_0x55f353,_0x4de66a);_0x1b4460++){_0x1bbbed[_0x1b4460]='─';}const _0x193c9a=_0x1bbbed['map'](_0x4ca925=>_0x4ca925==='\x20'?'\x20':_0x1d3ac7(_0x4ca925))[_0xc2bdaf(0x246)]('');_0x41e5b6[_0xc2bdaf(0x26c)](_0x33192d+'\x20'+_0x3c7477+'│'+_0x193c9a+'│');}return _0x41e5b6['join']('\x0a');}async['navigateSessionsInteractive'](_0x4a8132,_0x54f417,_0x3b99fe){const _0x316eed=a51_0x10da29,{options:_0x6140d,tdx:_0x208621}=_0x54f417,_0x2e7119=_0x6140d[_0x316eed(0x2a9)],{timelineRows:_0x44cadf,timeAxisHeader:_0x1f6db2}=this['generateSessionTimelineRows'](_0x4a8132,_0x2e7119),_0x3bd420=_0x44cadf['filter'](_0x3a4166=>_0x3a4166['attemptId']);if(_0x3bd420['length']===0x0){const _0x36c534=this[_0x316eed(0x219)](_0x4a8132,_0x2e7119);console['log'](_0x36c534);!_0x3b99fe&&(console[_0x316eed(0x2b2)](''),console[_0x316eed(0x2b2)](a51_0x55b9d6[_0x316eed(0x190)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x316eed(0x2b2)](a51_0x55b9d6['dim'](_0x316eed(0x1f9))+'or'+a51_0x55b9d6[_0x316eed(0x190)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x1f6db2&&console[_0x316eed(0x222)](_0x1f6db2);const _0x30ebd8=_0x44cadf[_0x316eed(0x162)](_0x498dbd=>_0x498dbd[_0x316eed(0x20d)])[_0x316eed(0x1cb)](_0x19966c=>({'title':_0x19966c[_0x316eed(0x16a)],'value':_0x19966c['attemptId']})),_0x37b35f=process[_0x316eed(0x1cc)][_0x316eed(0x27a)]||0x3c,_0x1f7868=Math[_0x316eed(0x28c)](0x28,Math[_0x316eed(0x250)](_0x37b35f*0x2/0x3)),_0x3872b2=await a51_0x5637a3({'type':_0x316eed(0x23e),'name':_0x316eed(0x20d),'message':_0x316eed(0x1c4),'choices':_0x30ebd8,'initial':-0x1,'limit':_0x1f7868,'clearFirst':!![],'fallback':{'title':_0x316eed(0x1b6),'value':null},'suggest':(_0x19986a,_0x4029f5)=>{const _0x1641f2=_0x316eed;if(!_0x19986a)return Promise[_0x1641f2(0x150)](_0x4029f5);const _0x132276=_0x4029f5[_0x1641f2(0x162)](_0xe961f=>{const _0x8fb4dc=_0x1641f2,_0x67b694=_0xe961f;return _0x67b694['title'][_0x8fb4dc(0x259)]()[_0x8fb4dc(0x15e)](_0x19986a[_0x8fb4dc(0x259)]());});return Promise[_0x1641f2(0x150)](_0x132276);}}),_0x2f415a=()=>{const _0xbb536b=_0x316eed;process['stdout'][_0xbb536b(0x179)]('\x1b[1A\x1b[2K'),process[_0xbb536b(0x1cc)][_0xbb536b(0x179)](_0xbb536b(0x17b)),process[_0xbb536b(0x1cc)][_0xbb536b(0x179)](_0xbb536b(0x17b));},_0x46d71c=_0x3872b2&&_0x3872b2[_0x316eed(0x20d)]&&_0x3872b2[_0x316eed(0x20d)]!==null&&_0x3872b2['attemptId'][_0x316eed(0x187)]()!=='';if(!_0x46d71c){_0x2f415a(),console[_0x316eed(0x222)](a51_0x55b9d6[_0x316eed(0x190)](_0x316eed(0x2e6)));return;}_0x2f415a();const _0x4ad8ab=_0x4a8132[_0x316eed(0x2a7)](_0x941e74=>_0x941e74[_0x316eed(0x1f7)]?.['id']===_0x3872b2['attemptId']);if(_0x4ad8ab){const _0x5f2ad0=_0x4ad8ab['project']?.[_0x316eed(0x1b9)]||'?',_0x5eb993=_0x4ad8ab[_0x316eed(0x2e5)]?.[_0x316eed(0x1b9)]||'?';console[_0x316eed(0x222)](_0x316eed(0x19b)+a51_0x55b9d6[_0x316eed(0x190)](_0x5f2ad0)+',\x20Workflow:\x20'+a51_0x55b9d6[_0x316eed(0x190)](_0x5eb993));}const _0x1a7a13=new WorkflowTimelineCommand();await _0x1a7a13[_0x316eed(0x1e3)]({'args':[],'options':{..._0x6140d,'attemptId':_0x3872b2[_0x316eed(0x20d)]},'tdx':_0x208621});}[a51_0x10da29(0x176)](_0x5770b3,_0x22bdfe){const _0x2ba10d=a51_0x10da29,_0x4448e9=new Map();for(const _0x4fb6da of _0x5770b3){_0x4fb6da['id']&&_0x4fb6da['lastAttempt']?.['id']&&_0x4448e9[_0x2ba10d(0x2c7)](_0x4fb6da['id'],_0x4fb6da[_0x2ba10d(0x1f7)]['id']);}const _0x3e5b62=[];let _0x2b8c26='';const _0x19a54b=this['renderSessionsTimeline'](_0x5770b3,_0x22bdfe),_0x5e97af=_0x19a54b[_0x2ba10d(0x18d)]('\x0a');for(const _0x3ec752 of _0x5e97af){if(_0x3ec752[_0x2ba10d(0x24b)](_0x2ba10d(0x164))||_0x3ec752[_0x2ba10d(0x1fd)](/^\s+\d{4}-\d{2}-\d{2}/))_0x2b8c26=_0x3ec752;else{if(_0x3ec752['match'](/^[✅❌🔄🛑⏳]/)){const _0x3feb6f=_0x3ec752[_0x2ba10d(0x1fd)](/#(\d+)/),_0x27c42a=_0x3feb6f?_0x3feb6f[0x1]:null,_0x31a442=_0x27c42a?_0x4448e9['get'](_0x27c42a)||null:null,_0xf37b45=_0x5770b3['find'](_0x1a803a=>_0x1a803a['id']===_0x27c42a),_0x286cd0=_0xf37b45?.[_0x2ba10d(0x2c3)]?.[_0x2ba10d(0x1b9)]||'';_0x3e5b62[_0x2ba10d(0x26c)]({'displayLine':_0x3ec752,'attemptId':_0x31a442,'projectName':_0x286cd0});}}}return{'timelineRows':_0x3e5b62,'timeAxisHeader':_0x2b8c26};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]='workflow:attempts';['description']=a51_0x10da29(0x197);async[a51_0x10da29(0x1e3)](_0x5e1077){const _0xeb21f8=a51_0x10da29,{options:_0x2e5795,args:_0x29fa9f,tdx:_0xddfdd0}=_0x5e1077,_0x7daf59=this[_0xeb21f8(0x2ae)](_0x29fa9f,_0x2e5795);if(!_0x7daf59)return 0x1;const {projectName:_0x4d950d,workflowName:_0x441eb1}=_0x7daf59,_0x7327b8=_0x2e5795['includeRetried'];if(_0x2e5795[_0xeb21f8(0x1ed)]){if(_0x4d950d&&_0x441eb1)console[_0xeb21f8(0x2b2)](_0xeb21f8(0x2a4)+_0x4d950d+'.'+_0x441eb1);else _0x4d950d&&console['error']('Filter:\x20project='+_0x4d950d);_0x7327b8&&console[_0xeb21f8(0x2b2)](_0xeb21f8(0x26e));}const _0xc1b6e0=await withSpinner(_0xeb21f8(0x204),()=>_0xddfdd0[_0xeb21f8(0x2e5)][_0xeb21f8(0x191)]({'projectName':_0x4d950d,'workflowName':_0x441eb1,'includeRetried':_0x7327b8,'limit':_0x2e5795[_0xeb21f8(0x280)]}),{'verbose':_0x2e5795['verbose']}),_0x10fa13=_0xc1b6e0[_0xeb21f8(0x15d)],_0x39de60=_0x2e5795[_0xeb21f8(0x280)]||0x64,_0x6f5431=_0x10fa13[_0xeb21f8(0x1b5)]>=_0x39de60?a51_0x55b9d6[_0xeb21f8(0x190)](_0xeb21f8(0x2a6)):'';console['error'](_0xeb21f8(0x267)+_0x10fa13[_0xeb21f8(0x1b5)]+'\x20attempt'+(_0x10fa13[_0xeb21f8(0x1b5)]!==0x1?'s':'')+_0x6f5431);if(_0x2e5795[_0xeb21f8(0x1df)]==='json'||_0x2e5795[_0xeb21f8(0x1df)]===_0xeb21f8(0x1ac)||_0x2e5795[_0xeb21f8(0x1df)]===_0xeb21f8(0x1b2))await handleSDKOutput(_0x10fa13,_0x2e5795);else{if(_0x10fa13[_0xeb21f8(0x1b5)]===0x0){if(_0x4d950d&&_0x441eb1)console['log'](_0xeb21f8(0x155)+_0x4d950d+'.'+_0x441eb1);else _0x4d950d?console[_0xeb21f8(0x222)](_0xeb21f8(0x1bc)+_0x4d950d):console[_0xeb21f8(0x222)](_0xeb21f8(0x293));}else{const _0x2ba7b9=_0x2e5795['site'],_0x30504b=_0x10fa13[_0xeb21f8(0x1cb)](_0x44c4d6=>{const _0x1023da=_0xeb21f8,_0x1f0d28=a51_0x55b9d6[_0x1023da(0x190)]('#'+_0x44c4d6['id']),_0x1849fa=_0x44c4d6[_0x1023da(0x2c3)]?.['id'],_0x3e2a20=_0x44c4d6[_0x1023da(0x1b4)]||_0x44c4d6['sessionId'],_0x4f0837=_0x1849fa&&_0x3e2a20?hyperlink(_0x1f0d28,getWorkflowAttemptUrl(_0x2ba7b9,_0x1849fa,_0x3e2a20,_0x44c4d6['id'])):_0x1f0d28,{icon:_0x206eca,text:_0x44f726}=getAttemptStatusDisplay(_0x44c4d6),_0x4c7436=(_0x44c4d6[_0x1023da(0x2c3)]?.[_0x1023da(0x1b9)]||'?')+'.'+(_0x44c4d6[_0x1023da(0x2e5)]?.['name']||'?'),_0x317db6=_0x44c4d6[_0x1023da(0x2a5)]?a51_0x55b9d6[_0x1023da(0x190)](_0x44c4d6[_0x1023da(0x2a5)]):'';return(_0x4f0837+'\x20'+_0x206eca+(_0x44f726?'\x20'+_0x44f726:'')+'\x20'+_0x4c7436+'\x20'+_0x317db6)['trimEnd']();});await writeOutput(_0x30504b['join']('\x0a'),_0x2e5795[_0xeb21f8(0x193)],_0xeb21f8(0x16c));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x274);['description']=a51_0x10da29(0x1ce);async[a51_0x10da29(0x1e3)](_0x55a1a4){const _0x70a5a7=a51_0x10da29,{options:_0x4ee046,args:_0x2411b2,tdx:_0x800335}=_0x55a1a4,_0x489af5=_0x2411b2[0x0];if(!_0x489af5)return console[_0x70a5a7(0x2b2)](_0x70a5a7(0x174)),0x1;_0x4ee046[_0x70a5a7(0x1ed)]&&console['error'](_0x70a5a7(0x241)+_0x489af5);const _0x4fe17f=await withSpinner(_0x70a5a7(0x262),()=>_0x800335[_0x70a5a7(0x2e5)][_0x70a5a7(0x224)](_0x489af5),{'verbose':_0x4ee046[_0x70a5a7(0x1ed)]}),_0x13fc2b=_0x4fe17f[_0x70a5a7(0x15d)];let _0x229a43;!_0x13fc2b[_0x70a5a7(0x1d9)]?_0x229a43=_0x13fc2b[_0x70a5a7(0x21b)]?_0x70a5a7(0x297):_0x70a5a7(0x1ee):_0x229a43=_0x13fc2b[_0x70a5a7(0x1f6)]?'success':_0x70a5a7(0x2b2);let _0x35c9b1;if(_0x13fc2b[_0x70a5a7(0x2d2)]&&_0x13fc2b['finishedAt']){const _0x5bcc5a=new Date(_0x13fc2b[_0x70a5a7(0x2d2)])[_0x70a5a7(0x287)](),_0x3caae5=new Date(_0x13fc2b[_0x70a5a7(0x2c5)])[_0x70a5a7(0x287)]();_0x35c9b1=Math[_0x70a5a7(0x23d)]((_0x3caae5-_0x5bcc5a)/0x3e8);}const _0x534a39={'attempt_id':_0x13fc2b['id'],'status':_0x229a43,..._0x13fc2b['index']!==undefined&&{'index':_0x13fc2b[_0x70a5a7(0x273)]},..._0x13fc2b[_0x70a5a7(0x2c3)]&&{'project':_0x13fc2b['project']['name']},..._0x13fc2b[_0x70a5a7(0x2e5)]&&{'workflow':_0x13fc2b[_0x70a5a7(0x2e5)][_0x70a5a7(0x1b9)]},..._0x13fc2b[_0x70a5a7(0x2dd)]&&{'session_id':_0x13fc2b[_0x70a5a7(0x2dd)]},..._0x13fc2b[_0x70a5a7(0x2a5)]&&{'session_time':_0x13fc2b[_0x70a5a7(0x2a5)]},..._0x13fc2b[_0x70a5a7(0x14b)]&&{'retry_attempt':_0x13fc2b[_0x70a5a7(0x14b)]},..._0x35c9b1!==undefined&&{'duration_sec':_0x35c9b1},..._0x13fc2b[_0x70a5a7(0x2d2)]&&{'created_at':_0x13fc2b[_0x70a5a7(0x2d2)]},..._0x13fc2b[_0x70a5a7(0x2c5)]&&{'finished_at':_0x13fc2b[_0x70a5a7(0x2c5)]},...Object[_0x70a5a7(0x231)](_0x13fc2b['params'])[_0x70a5a7(0x1b5)]>0x0&&{'params':_0x13fc2b['params']}};return await handleSingleObjectOutput(_0x534a39,_0x4ee046),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x20b);['description']=a51_0x10da29(0x169);async['execute'](_0x44e77e){const _0x2fbd76=a51_0x10da29,{options:_0x42b601,args:_0x5e43cb,tdx:_0xbf6498}=_0x44e77e,_0x307729=_0x5e43cb[0x0];if(!_0x307729)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x101819=_0x42b601[_0x2fbd76(0x285)];_0x42b601['verbose']&&(console[_0x2fbd76(0x2b2)](_0x2fbd76(0x241)+_0x307729),_0x101819&&console[_0x2fbd76(0x2b2)](_0x2fbd76(0x209)));const _0x4192c3=await withSpinner(_0x2fbd76(0x183),()=>_0xbf6498[_0x2fbd76(0x2e5)][_0x2fbd76(0x1f0)](_0x307729,_0x101819||![]),{'verbose':_0x42b601[_0x2fbd76(0x1ed)]}),_0x4f98a1=_0x4192c3[_0x2fbd76(0x15d)];return console[_0x2fbd76(0x2b2)](_0x2fbd76(0x267)+_0x4f98a1[_0x2fbd76(0x1b5)]+_0x2fbd76(0x1d0)+(_0x4f98a1[_0x2fbd76(0x1b5)]!==0x1?'s':'')),await handleSDKOutput(_0x4f98a1,_0x42b601),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x26b);[a51_0x10da29(0x2c0)]=a51_0x10da29(0x2be);async['execute'](_0x4a6d6d){const _0x5ad5a9=a51_0x10da29,{options:_0x2226c1,args:_0x5a3128,tdx:_0x532872}=_0x4a6d6d,_0x39b90a=_0x5a3128[0x0];let _0x3a673d=_0x5a3128[0x1];if(!_0x39b90a)return console['error'](_0x5ad5a9(0x174)),0x1;_0x2226c1[_0x5ad5a9(0x1ed)]&&(console[_0x5ad5a9(0x2b2)](_0x5ad5a9(0x241)+_0x39b90a),_0x3a673d&&console[_0x5ad5a9(0x2b2)](_0x5ad5a9(0x151)+_0x3a673d));const _0x2c71cb=await withSpinner('Fetching\x20log\x20files...',()=>_0x532872['workflow']['logFiles'](_0x39b90a,_0x3a673d),{'verbose':_0x2226c1[_0x5ad5a9(0x1ed)]}),_0x1c8fc7=_0x2c71cb[_0x5ad5a9(0x15d)];if(_0x1c8fc7[_0x5ad5a9(0x1b5)]===0x0)return console['error']('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x3a673d&&(_0x2226c1[_0x5ad5a9(0x29c)]||_0x2226c1[_0x5ad5a9(0x1df)]))return await handleSDKOutput(_0x1c8fc7,_0x2226c1),0x0;if(!_0x3a673d){const _0xc714c7=_0x1c8fc7[_0x5ad5a9(0x1cb)](_0x84ea17=>({'title':_0x84ea17[_0x5ad5a9(0x21e)]+'\x20('+formatBytes(_0x84ea17[_0x5ad5a9(0x2bd)])+')','value':_0x84ea17[_0x5ad5a9(0x21e)]})),_0xd47c2b=await a51_0x5637a3({'type':_0x5ad5a9(0x1aa),'name':_0x5ad5a9(0x2ac),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0xc714c7});if(!_0xd47c2b['task'])return console[_0x5ad5a9(0x2b2)](_0x5ad5a9(0x2e6)),0x0;_0x3a673d=_0xd47c2b[_0x5ad5a9(0x2ac)];}const _0xf046fd=await withSpinner('Downloading\x20logs...',()=>_0x532872[_0x5ad5a9(0x2e5)][_0x5ad5a9(0x1a8)](_0x39b90a,_0x3a673d),{'verbose':_0x2226c1[_0x5ad5a9(0x1ed)]}),_0x2fe0bd=_0xf046fd[_0x5ad5a9(0x15d)];return _0x2fe0bd?console[_0x5ad5a9(0x222)](_0x2fe0bd):console[_0x5ad5a9(0x2b2)](_0x5ad5a9(0x1c0)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x260);['description']=a51_0x10da29(0x265);async[a51_0x10da29(0x1e3)](_0x1835f9){const _0x3f1e1b=a51_0x10da29,{options:_0x24f72c,args:_0x1f095c,tdx:_0x50dc14}=_0x1835f9,_0x1412a6=_0x1f095c[0x0];if(!_0x1412a6)return console['error'](_0x3f1e1b(0x174)),0x1;const _0x207e83=_0x24f72c[_0x3f1e1b(0x15a)];_0x24f72c[_0x3f1e1b(0x1ed)]&&(console[_0x3f1e1b(0x2b2)](_0x3f1e1b(0x241)+_0x1412a6),_0x207e83&&console[_0x3f1e1b(0x2b2)](_0x3f1e1b(0x2c1)+_0x207e83));if(!_0x24f72c[_0x3f1e1b(0x23a)]){if(!isInteractive())return console[_0x3f1e1b(0x2b2)](a51_0x55b9d6[_0x3f1e1b(0x275)](_0x3f1e1b(0x1d1)),_0x3f1e1b(0x261)),console[_0x3f1e1b(0x2b2)](a51_0x55b9d6['dim'](_0x3f1e1b(0x20e))),0x1;const _0x21908b=await confirmKey(_0x3f1e1b(0x24f)+_0x1412a6+'?');if(!_0x21908b)return console[_0x3f1e1b(0x2b2)](a51_0x55b9d6['yellow'](_0x3f1e1b(0x2e6))),0x1;}const _0x314b1c=await withSpinner(_0x3f1e1b(0x20c),()=>_0x50dc14[_0x3f1e1b(0x2e5)]['kill'](_0x1412a6,_0x207e83),{'verbose':_0x24f72c['verbose']}),_0x30423c=_0x314b1c[_0x3f1e1b(0x15d)];return console['error']('✔\x20'+_0x30423c),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';[a51_0x10da29(0x2c0)]=a51_0x10da29(0x24d);async[a51_0x10da29(0x1e3)](_0x4175f2){const _0xf4fd03=a51_0x10da29,{options:_0x4f23c5,args:_0x459c5f,tdx:_0xe91ddb}=_0x4175f2,_0x1b1a50=_0x459c5f[0x0];if(!_0x1b1a50)return console[_0xf4fd03(0x2b2)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0xf4fd03(0x2b2)](_0xf4fd03(0x17e)),0x1;let _0x29bf05=![],_0x224462=_0x1b1a50;if(_0x1b1a50[_0xf4fd03(0x24b)](_0xf4fd03(0x217)))_0x29bf05=!![],_0x224462=_0x1b1a50['substring'](0x8);else{if(_0x1b1a50[_0xf4fd03(0x24b)]('attempt:'))_0x29bf05=![],_0x224462=_0x1b1a50['substring'](0x8);else return console[_0xf4fd03(0x2b2)](_0xf4fd03(0x23f)),console[_0xf4fd03(0x2b2)](_0xf4fd03(0x17e)),0x1;}const _0x4d82e8=_0x4f23c5[_0xf4fd03(0x249)],_0x3815ea=_0x4f23c5['resumeFrom'],_0x4aa3d2=_0x4f23c5[_0xf4fd03(0x2ce)],_0x376a04=_0x4f23c5[_0xf4fd03(0x146)];_0x4f23c5[_0xf4fd03(0x1ed)]&&(console[_0xf4fd03(0x2b2)](_0xf4fd03(0x272)+(_0x29bf05?_0xf4fd03(0x22d):_0xf4fd03(0x224))+'\x20'+_0x224462),_0x4d82e8&&console[_0xf4fd03(0x2b2)]('From\x20task:\x20'+_0x4d82e8),_0x3815ea&&console['error'](_0xf4fd03(0x27c)+_0x3815ea),_0x4aa3d2&&console[_0xf4fd03(0x2b2)]('Params:\x20'+_0x4aa3d2),_0x376a04&&console[_0xf4fd03(0x2b2)](_0xf4fd03(0x214)));let _0x5d3437;if(_0x4aa3d2)try{if(_0x4aa3d2[_0xf4fd03(0x24b)]('@')){const _0x24c69e=await import(_0xf4fd03(0x29e)),_0x1d3d07=_0x4aa3d2[_0xf4fd03(0x172)](0x1),_0x1600d6=await _0x24c69e[_0xf4fd03(0x213)](_0x1d3d07,_0xf4fd03(0x201));_0x5d3437=JSON['parse'](_0x1600d6);}else _0x5d3437=JSON[_0xf4fd03(0x2b7)](_0x4aa3d2);}catch{return console[_0xf4fd03(0x2b2)](_0xf4fd03(0x268)),0x1;}if(!_0x4f23c5['yes']){if(!isInteractive())return console[_0xf4fd03(0x2b2)](a51_0x55b9d6['red'](_0xf4fd03(0x1d1)),_0xf4fd03(0x261)),console['error'](a51_0x55b9d6[_0xf4fd03(0x190)](_0xf4fd03(0x20e))),0x1;const _0x349399=await confirmKey(_0xf4fd03(0x26d)+(_0x29bf05?'session':_0xf4fd03(0x224))+'\x20'+_0x224462+'?');if(!_0x349399)return console['error'](a51_0x55b9d6[_0xf4fd03(0x284)](_0xf4fd03(0x2e6))),0x1;}let _0x3f8c9e;_0x29bf05?_0x3f8c9e=await withSpinner(_0xf4fd03(0x2a3),()=>_0xe91ddb['workflow'][_0xf4fd03(0x232)](_0x224462,{'fromTask':_0x4d82e8,'retryParams':_0x5d3437}),{'verbose':_0x4f23c5['verbose']}):_0x3f8c9e=await withSpinner('Retrying\x20attempt...',()=>_0xe91ddb[_0xf4fd03(0x2e5)]['retryAttempt'](_0x224462,{'resumeFrom':_0x3815ea,'retryParams':_0x5d3437,'force':_0x376a04}),{'verbose':_0x4f23c5[_0xf4fd03(0x1ed)]});const _0x43d8e=_0x3f8c9e[_0xf4fd03(0x15d)];return console[_0xf4fd03(0x2b2)](_0xf4fd03(0x277)),console['error'](_0xf4fd03(0x2b3)+_0x43d8e[_0xf4fd03(0x20d)]),console['error'](_0xf4fd03(0x27f)+_0x43d8e[_0xf4fd03(0x2dd)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x180);[a51_0x10da29(0x2c0)]=a51_0x10da29(0x1d3);async[a51_0x10da29(0x1e3)](_0x1b3eff){const _0x3f331f=a51_0x10da29,{options:_0x3d7c84,args:_0x32d2de,tdx:_0x1ad0f8}=_0x1b3eff;let _0x45b68f=_0x32d2de[0x0];if(!_0x45b68f){const _0x341830=this[_0x3f331f(0x240)]([],_0x3d7c84),_0x381a91=await withSpinner('Loading\x20workflows...',()=>_0x1ad0f8[_0x3f331f(0x2e5)][_0x3f331f(0x29d)](_0x341830,{'limit':_0x3d7c84[_0x3f331f(0x280)]}),{'verbose':_0x3d7c84[_0x3f331f(0x1ed)]}),_0x3176a0=_0x381a91['data'];if(_0x3176a0['length']===0x0)return console['error']('No\x20workflows\x20found'),!_0x341830&&console[_0x3f331f(0x2b2)](a51_0x55b9d6[_0x3f331f(0x190)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x168482=_0x3176a0[_0x3f331f(0x1cb)](_0x3a9eb8=>({'title':_0x3a9eb8[_0x3f331f(0x2c3)]?.[_0x3f331f(0x1b9)]+'.'+_0x3a9eb8[_0x3f331f(0x1b9)],'value':_0x3a9eb8[_0x3f331f(0x2c3)]?.['name']+'.'+_0x3a9eb8[_0x3f331f(0x1b9)],'description':_0x3a9eb8[_0x3f331f(0x149)]?_0x3f331f(0x29a)+_0x3a9eb8['revision']:undefined})),_0x3ead9d=await a51_0x5637a3({'type':_0x3f331f(0x1aa),'name':'workflow','message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x168482});if(!_0x3ead9d['workflow'])return 0x1;_0x45b68f=_0x3ead9d[_0x3f331f(0x2e5)];}if(!_0x45b68f['includes']('.')){const _0x199651=this[_0x3f331f(0x240)]([],_0x3d7c84);if(_0x199651)_0x45b68f=_0x199651+'.'+_0x45b68f;else return console[_0x3f331f(0x2b2)](a51_0x55b9d6['red']('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a51_0x55b9d6[_0x3f331f(0x190)](_0x3f331f(0x24c))),0x1;}const _0x24308e=_0x3d7c84[_0x3f331f(0x1b7)],_0x11921e=_0x3d7c84[_0x3f331f(0x2a5)],_0x4f9b3a={};if(_0x24308e&&Array[_0x3f331f(0x22a)](_0x24308e))for(const _0x4ddf3c of _0x24308e){const _0x450d48=_0x4ddf3c[_0x3f331f(0x299)]('=');if(_0x450d48===-0x1)return console[_0x3f331f(0x2b2)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x4ddf3c),console[_0x3f331f(0x2b2)](_0x3f331f(0x1bd)),0x1;const _0x2592b4=_0x4ddf3c['substring'](0x0,_0x450d48),_0xc88b5e=_0x4ddf3c[_0x3f331f(0x172)](_0x450d48+0x1);try{_0x4f9b3a[_0x2592b4]=JSON['parse'](_0xc88b5e);}catch{_0x4f9b3a[_0x2592b4]=_0xc88b5e;}}_0x3d7c84['verbose']&&(console[_0x3f331f(0x2b2)]('Workflow:\x20'+_0x45b68f),Object[_0x3f331f(0x231)](_0x4f9b3a)[_0x3f331f(0x1b5)]>0x0&&console[_0x3f331f(0x2b2)](_0x3f331f(0x266)+JSON[_0x3f331f(0x2e8)](_0x4f9b3a)),_0x11921e&&console[_0x3f331f(0x2b2)](_0x3f331f(0x1ff)+_0x11921e));const _0xf1925c=await withSpinner(_0x3f331f(0x1e4),()=>_0x1ad0f8[_0x3f331f(0x2e5)]['run'](_0x45b68f,_0x4f9b3a,{'sessionTime':_0x11921e}),{'verbose':_0x3d7c84[_0x3f331f(0x1ed)]}),_0x1a2d75=_0xf1925c[_0x3f331f(0x15d)];console[_0x3f331f(0x2b2)](_0x3f331f(0x218)),console['error']('\x20\x20Attempt\x20ID:\x20'+_0x1a2d75['id']),console[_0x3f331f(0x2b2)]('\x20\x20Session\x20ID:\x20'+_0x1a2d75['sessionId']),console[_0x3f331f(0x2b2)]('\x20\x20Project:\x20'+_0x1a2d75[_0x3f331f(0x2c3)]?.[_0x3f331f(0x1b9)]),console[_0x3f331f(0x2b2)](_0x3f331f(0x168)+_0x1a2d75[_0x3f331f(0x2e5)]?.[_0x3f331f(0x1b9)]);if(_0x1a2d75[_0x3f331f(0x2c3)]?.['id']&&_0x1a2d75[_0x3f331f(0x2dd)]&&_0x1a2d75['id']){const _0x299596=_0x3d7c84[_0x3f331f(0x2a9)],_0xcda364=getConsoleUrl(_0x299596,_0x3f331f(0x255)+_0x1a2d75[_0x3f331f(0x2c3)]['id']+_0x3f331f(0x2cb)+_0x1a2d75['sessionId']+_0x3f331f(0x2a0)+_0x1a2d75['id']);console[_0x3f331f(0x2b2)](_0x3f331f(0x251)+a51_0x55b9d6[_0x3f331f(0x1da)](_0xcda364));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x1d6);[a51_0x10da29(0x2c0)]=a51_0x10da29(0x2e1);async[a51_0x10da29(0x1e3)](_0x3a45bf){const _0x51a7ea=a51_0x10da29,{options:_0x4d1421,args:_0x322b7a,tdx:_0x3be260}=_0x3a45bf,_0x158f89=_0x322b7a[0x0],_0x36b2c9=_0x322b7a[0x1]||'.';if(!_0x158f89)return console[_0x51a7ea(0x2b2)](_0x51a7ea(0x26a)),console[_0x51a7ea(0x2b2)](_0x51a7ea(0x252)),0x1;const _0x3fa5e7=_0x4d1421[_0x51a7ea(0x149)];_0x4d1421[_0x51a7ea(0x1ed)]&&(console[_0x51a7ea(0x2b2)](_0x51a7ea(0x19b)+_0x158f89),console[_0x51a7ea(0x2b2)](_0x51a7ea(0x188)+_0x36b2c9),_0x3fa5e7&&console[_0x51a7ea(0x2b2)](_0x51a7ea(0x237)+_0x3fa5e7));const _0x58b77b=await withSpinner(_0x51a7ea(0x1c1)+_0x158f89+_0x51a7ea(0x185),()=>_0x3be260['workflow'][_0x51a7ea(0x182)](_0x158f89,_0x36b2c9,{'revision':_0x3fa5e7}),{'verbose':_0x4d1421[_0x51a7ea(0x1ed)]}),_0x5ddb9c=_0x58b77b[_0x51a7ea(0x15d)];return console['error']('✔\x20Downloaded\x20'+_0x5ddb9c[_0x51a7ea(0x14d)]),console[_0x51a7ea(0x2b2)](_0x51a7ea(0x2b8)+_0x5ddb9c[_0x51a7ea(0x149)]),console['error']('\x20\x20Files\x20extracted:\x20'+_0x5ddb9c[_0x51a7ea(0x24e)]),console[_0x51a7ea(0x2b2)](_0x51a7ea(0x2e4)+_0x36b2c9+'/'+_0x5ddb9c['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a51_0x10da29(0x27d);['description']=a51_0x10da29(0x18b);async[a51_0x10da29(0x1e3)](_0x23aa62){const _0x57c392=a51_0x10da29,{options:_0x51fce8,args:_0x1b252c,tdx:_0x345454}=_0x23aa62;let _0x3af14b='.',_0x572d98=_0x51fce8[_0x57c392(0x1b9)];if(_0x1b252c[0x0]){const {promises:_0x415067}=await import('fs');try{const _0x684fa6=await _0x415067[_0x57c392(0x269)](_0x1b252c[0x0]);if(_0x684fa6['isDirectory']())_0x3af14b=_0x1b252c[0x0];else return console[_0x57c392(0x2b2)]('Error:\x20'+_0x1b252c[0x0]+_0x57c392(0x253)),0x1;}catch{_0x572d98=_0x1b252c[0x0],_0x3af14b='.';}}const _0x489e83=_0x51fce8[_0x57c392(0x149)],_0x372bdc=_0x51fce8['skipValidation'];_0x51fce8[_0x57c392(0x1ed)]&&(console['error'](_0x57c392(0x294)+_0x3af14b),_0x572d98&&console[_0x57c392(0x2b2)]('Project\x20name:\x20'+_0x572d98),_0x489e83&&console[_0x57c392(0x2b2)](_0x57c392(0x237)+_0x489e83),_0x372bdc&&console[_0x57c392(0x2b2)]('Validation:\x20skipped'));const _0x45fcba=await withSpinner(_0x57c392(0x1e5),()=>_0x345454[_0x57c392(0x2e5)][_0x57c392(0x26c)](_0x3af14b,{'projectName':_0x572d98,'revision':_0x489e83,'skipValidation':_0x372bdc}),{'verbose':_0x51fce8[_0x57c392(0x1ed)]}),_0x913fed=_0x45fcba[_0x57c392(0x15d)];return console[_0x57c392(0x2b2)](_0x57c392(0x2d9)+_0x913fed['projectName']),console[_0x57c392(0x2b2)](_0x57c392(0x14a)+_0x913fed[_0x57c392(0x2bb)]),console[_0x57c392(0x2b2)](_0x57c392(0x2b8)+_0x913fed[_0x57c392(0x149)]),await this[_0x57c392(0x208)](_0x345454,_0x913fed[_0x57c392(0x14d)],_0x51fce8['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x1de);[a51_0x10da29(0x2c0)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a51_0x10da29(0x1e3)](_0x493416){const _0x481b5b=a51_0x10da29,{options:_0x471f59,args:_0x1a2277,tdx:_0x4dec44}=_0x493416,_0x5db744=_0x1a2277[0x0],_0x29598f=_0x1a2277[0x1];if(!_0x5db744)return console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x275)]('Error:'),'Project\x20name\x20is\x20required'),console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x190)](_0x481b5b(0x1be))),0x1;const _0x566de1=_0x471f59[_0x481b5b(0x149)];_0x471f59[_0x481b5b(0x1ed)]&&(console[_0x481b5b(0x2b2)](_0x481b5b(0x19b)+_0x5db744),_0x29598f&&console[_0x481b5b(0x2b2)](_0x481b5b(0x16e)+_0x29598f),_0x566de1&&console['error'](_0x481b5b(0x237)+_0x566de1),_0x471f59[_0x481b5b(0x1fa)]&&console['error'](_0x481b5b(0x1a9)));const _0x4e39ed=await withSpinner(_0x481b5b(0x1ea)+_0x5db744+_0x481b5b(0x185),()=>_0x4dec44[_0x481b5b(0x2e5)]['pullProject'](_0x5db744,{'targetDir':_0x29598f,'revision':_0x566de1}),{'verbose':_0x471f59[_0x481b5b(0x1ed)]}),_0x54dda4=_0x4e39ed[_0x481b5b(0x15d)];_0x54dda4[_0x481b5b(0x1f3)]?console[_0x481b5b(0x2b2)](_0x481b5b(0x156)+_0x54dda4[_0x481b5b(0x14d)]):console[_0x481b5b(0x2b2)]('→\x20Project:\x20'+_0x54dda4['projectName']);console[_0x481b5b(0x2b2)](_0x481b5b(0x2b8)+_0x54dda4[_0x481b5b(0x149)]),console[_0x481b5b(0x2b2)](_0x481b5b(0x288)+(a51_0x2dea47[_0x481b5b(0x20a)](process['cwd'](),_0x54dda4[_0x481b5b(0x181)])||'.')),console[_0x481b5b(0x2b2)](_0x481b5b(0x1f8)+a51_0x55b9d6[_0x481b5b(0x270)]('+'+_0x54dda4['summary'][_0x481b5b(0x28d)]+_0x481b5b(0x166))+',\x20'+(a51_0x55b9d6[_0x481b5b(0x284)]('~'+_0x54dda4[_0x481b5b(0x1c9)][_0x481b5b(0x254)]+_0x481b5b(0x286))+',\x20')+(a51_0x55b9d6[_0x481b5b(0x275)]('-'+_0x54dda4['summary'][_0x481b5b(0x242)]+_0x481b5b(0x2dc))+',\x20')+(''+a51_0x55b9d6[_0x481b5b(0x190)](_0x54dda4[_0x481b5b(0x1c9)][_0x481b5b(0x1d4)]+_0x481b5b(0x234))));for(const _0x4b63c7 of _0x54dda4['changes']){_0x4b63c7['type']===_0x481b5b(0x254)&&_0x4b63c7[_0x481b5b(0x1a0)]&&(console[_0x481b5b(0x2b2)]('\x0a'+a51_0x55b9d6[_0x481b5b(0x1da)](_0x481b5b(0x1ba)+_0x4b63c7['path'])),console[_0x481b5b(0x2b2)](_0x4b63c7[_0x481b5b(0x1a0)]));}if(!_0x54dda4['hasChanges'])return saveSessionContext({'workflow_project':_0x54dda4[_0x481b5b(0x14d)]},_0x471f59[_0x481b5b(0x22d)]),console['error'](a51_0x55b9d6['green'](_0x481b5b(0x14c))),console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x190)](_0x481b5b(0x2e2)+_0x54dda4[_0x481b5b(0x14d)])),0x0;if(_0x471f59['dryRun'])return console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x284)](_0x481b5b(0x203))),0x0;if(!_0x471f59[_0x481b5b(0x23a)]){if(!isInteractive())return console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x275)](_0x481b5b(0x1d1)),_0x481b5b(0x261)),console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x190)](_0x481b5b(0x20e))),0x1;const _0x59c288=await confirmKey(_0x481b5b(0x1af));if(!_0x59c288)return console['error'](a51_0x55b9d6[_0x481b5b(0x284)](_0x481b5b(0x2e6)),_0x481b5b(0x154)),0x1;}await withSpinner(_0x481b5b(0x298),()=>_0x4dec44[_0x481b5b(0x2e5)][_0x481b5b(0x178)](_0x54dda4,{'revision':_0x566de1}),{'verbose':_0x471f59['verbose']}),saveSessionContext({'workflow_project':_0x54dda4[_0x481b5b(0x14d)]},_0x471f59[_0x481b5b(0x22d)]),console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x270)](_0x481b5b(0x18a)));const _0x3779f5=a51_0x2dea47[_0x481b5b(0x20a)](process['cwd'](),_0x54dda4[_0x481b5b(0x181)])||'.';return console[_0x481b5b(0x2b2)](a51_0x55b9d6[_0x481b5b(0x190)](_0x481b5b(0x2e4)+_0x3779f5)),console[_0x481b5b(0x2b2)](a51_0x55b9d6['dim'](_0x481b5b(0x2e2)+_0x54dda4[_0x481b5b(0x14d)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x1d2);[a51_0x10da29(0x2c0)]=a51_0x10da29(0x2d8);async[a51_0x10da29(0x1e3)](_0x279bd6){const _0x57c2ba=a51_0x10da29,{options:_0x5bfd74,args:_0x1a17c4,tdx:_0x443ea1}=_0x279bd6,_0x4405e1=this[_0x57c2ba(0x184)](_0x1a17c4,_0x5bfd74),_0x2d4e0f=_0x5bfd74['revision'],_0xda9c8a=_0x5bfd74[_0x57c2ba(0x163)];_0x5bfd74[_0x57c2ba(0x1ed)]&&(_0x4405e1&&console[_0x57c2ba(0x2b2)](_0x57c2ba(0x2da)+_0x4405e1),_0x2d4e0f&&console[_0x57c2ba(0x2b2)](_0x57c2ba(0x237)+_0x2d4e0f),_0x5bfd74[_0x57c2ba(0x1fa)]&&console[_0x57c2ba(0x2b2)](_0x57c2ba(0x1a9)),_0xda9c8a&&console[_0x57c2ba(0x2b2)](_0x57c2ba(0x28f)));let _0x265e26;try{_0x265e26=await withSpinner('Analyzing\x20changes...',()=>_0x443ea1['workflow']['preparePushProject']({'sourceDir':_0x4405e1,'revision':_0x2d4e0f,'skipValidation':_0xda9c8a}),{'verbose':_0x5bfd74[_0x57c2ba(0x1ed)]});}catch(_0x21a81d){if(_0x21a81d instanceof Error&&_0x21a81d[_0x57c2ba(0x27e)][_0x57c2ba(0x15e)](_0x57c2ba(0x160)))return console[_0x57c2ba(0x2b2)](a51_0x55b9d6[_0x57c2ba(0x275)](_0x57c2ba(0x22f)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x5bfd74[_0x57c2ba(0x19d)]?console[_0x57c2ba(0x2b2)](a51_0x55b9d6['dim']('Tip:\x20cd\x20to\x20workflows/'+_0x5bfd74[_0x57c2ba(0x19d)]+_0x57c2ba(0x216)+_0x5bfd74[_0x57c2ba(0x19d)]+'\x27')):console[_0x57c2ba(0x2b2)](a51_0x55b9d6['dim'](_0x57c2ba(0x221))),0x1;throw _0x21a81d;}const _0x1fcd4a=_0x265e26[_0x57c2ba(0x15d)];console[_0x57c2ba(0x2b2)](_0x57c2ba(0x2bf)+_0x1fcd4a[_0x57c2ba(0x14d)]),console['error'](_0x57c2ba(0x1a3)+_0x1fcd4a[_0x57c2ba(0x205)]),console['error'](_0x57c2ba(0x2b8)+_0x1fcd4a[_0x57c2ba(0x149)]),console[_0x57c2ba(0x2b2)]('\x20\x20Changes:\x20'+a51_0x55b9d6[_0x57c2ba(0x270)]('+'+_0x1fcd4a[_0x57c2ba(0x1c9)][_0x57c2ba(0x28d)]+_0x57c2ba(0x166))+',\x20'+(a51_0x55b9d6[_0x57c2ba(0x284)]('~'+_0x1fcd4a[_0x57c2ba(0x1c9)][_0x57c2ba(0x254)]+_0x57c2ba(0x286))+',\x20')+(a51_0x55b9d6[_0x57c2ba(0x275)]('-'+_0x1fcd4a[_0x57c2ba(0x1c9)][_0x57c2ba(0x242)]+_0x57c2ba(0x2dc))+',\x20')+(''+a51_0x55b9d6['dim'](_0x1fcd4a['summary']['unchanged']+'\x20unchanged')));for(const _0x590695 of _0x1fcd4a[_0x57c2ba(0x243)]){_0x590695['type']==='modified'&&_0x590695['diff']&&(console[_0x57c2ba(0x2b2)]('\x0a'+a51_0x55b9d6[_0x57c2ba(0x1da)]('---\x20'+_0x590695[_0x57c2ba(0x21c)])),console[_0x57c2ba(0x2b2)](_0x590695[_0x57c2ba(0x1a0)]));}if(!_0x1fcd4a['hasChanges'])return console['error'](a51_0x55b9d6[_0x57c2ba(0x270)](_0x57c2ba(0x2b1))),await this['showWorkflowConsoleUrl'](_0x443ea1,_0x1fcd4a[_0x57c2ba(0x14d)],_0x5bfd74['site']),0x0;if(_0x5bfd74[_0x57c2ba(0x1fa)])return console['error'](a51_0x55b9d6[_0x57c2ba(0x284)](_0x57c2ba(0x295))),0x0;if(!_0x5bfd74[_0x57c2ba(0x23a)]){if(!isInteractive())return console['error'](a51_0x55b9d6[_0x57c2ba(0x275)](_0x57c2ba(0x1d1)),_0x57c2ba(0x261)),console['error'](a51_0x55b9d6[_0x57c2ba(0x190)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x153dca=await confirmKey(_0x57c2ba(0x1cf));if(!_0x153dca)return console[_0x57c2ba(0x2b2)](a51_0x55b9d6[_0x57c2ba(0x284)](_0x57c2ba(0x2e6)),_0x57c2ba(0x220)),0x1;}const _0x12793a=await withSpinner('Pushing\x20project...',()=>_0x443ea1[_0x57c2ba(0x2e5)]['executePushProject'](_0x1fcd4a),{'verbose':_0x5bfd74[_0x57c2ba(0x1ed)]}),_0x3da7bd=_0x12793a[_0x57c2ba(0x15d)];return console[_0x57c2ba(0x2b2)](a51_0x55b9d6['green'](_0x57c2ba(0x1e9))),console['error'](_0x57c2ba(0x14a)+_0x3da7bd[_0x57c2ba(0x2bb)]),console[_0x57c2ba(0x2b2)](_0x57c2ba(0x2b8)+_0x3da7bd[_0x57c2ba(0x149)]),await this['showWorkflowConsoleUrl'](_0x443ea1,_0x3da7bd[_0x57c2ba(0x14d)],_0x5bfd74[_0x57c2ba(0x2a9)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x15f);['description']=a51_0x10da29(0x17a);async[a51_0x10da29(0x1e3)](_0x5dc2c4){const _0x264802=a51_0x10da29,{options:_0x37f5ab,args:_0x49218d,tdx:_0x1e646c}=_0x5dc2c4,_0x168ddb=this[_0x264802(0x184)](_0x49218d,_0x37f5ab),_0x5e4417=_0x37f5ab[_0x264802(0x1b9)],_0x4e3399=_0x37f5ab[_0x264802(0x149)],_0x23e46c=_0x37f5ab[_0x264802(0x163)];if(!_0x168ddb)return console[_0x264802(0x2b2)](a51_0x55b9d6[_0x264802(0x275)](_0x264802(0x22f)),_0x264802(0x245)),console[_0x264802(0x2b2)](a51_0x55b9d6[_0x264802(0x190)](_0x264802(0x170))),console[_0x264802(0x2b2)](a51_0x55b9d6[_0x264802(0x190)](_0x264802(0x1db))),0x1;if(!_0x5e4417)return console[_0x264802(0x2b2)](a51_0x55b9d6['red'](_0x264802(0x22f)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x264802(0x2b2)](a51_0x55b9d6[_0x264802(0x190)](_0x264802(0x170))),0x1;_0x37f5ab[_0x264802(0x1ed)]&&(console[_0x264802(0x2b2)](_0x264802(0x2da)+_0x168ddb),console[_0x264802(0x2b2)]('New\x20project\x20name:\x20'+_0x5e4417),_0x4e3399&&console[_0x264802(0x2b2)](_0x264802(0x237)+_0x4e3399),_0x37f5ab[_0x264802(0x1fa)]&&console[_0x264802(0x2b2)](_0x264802(0x1a9)),_0x23e46c&&console['error'](_0x264802(0x28f)));const _0x3a1072=await withSpinner('Analyzing\x20project...',()=>_0x1e646c[_0x264802(0x2e5)]['prepareCloneProject'](_0x168ddb,_0x5e4417,{'revision':_0x4e3399,'skipValidation':_0x23e46c}),{'verbose':_0x37f5ab['verbose']}),_0x3e3479=_0x3a1072[_0x264802(0x15d)];console['error'](_0x264802(0x2b6)+_0x3e3479['sourceDir']);_0x3e3479[_0x264802(0x1c7)]&&console['error'](_0x264802(0x2df)+_0x3e3479[_0x264802(0x1c7)]);console['error'](_0x264802(0x202)+_0x3e3479['newProjectName']),console['error'](_0x264802(0x237)+_0x3e3479[_0x264802(0x149)]),console[_0x264802(0x2b2)](_0x264802(0x2d4)+_0x3e3479[_0x264802(0x228)]);_0x3e3479[_0x264802(0x2cd)]&&(console[_0x264802(0x2b2)](a51_0x55b9d6[_0x264802(0x284)](_0x264802(0x28b)+_0x3e3479[_0x264802(0x2cf)]+_0x264802(0x290)+_0x3e3479[_0x264802(0x25d)]+')')),console[_0x264802(0x2b2)](a51_0x55b9d6[_0x264802(0x284)](_0x264802(0x296))));if(_0x37f5ab[_0x264802(0x1fa)])return console['error'](a51_0x55b9d6[_0x264802(0x284)](_0x264802(0x1ae))),0x0;if(!_0x37f5ab[_0x264802(0x23a)]){if(!isInteractive())return console['error'](a51_0x55b9d6[_0x264802(0x275)](_0x264802(0x1d1)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x264802(0x2b2)](a51_0x55b9d6['dim'](_0x264802(0x20e))),0x1;const _0x5adbda=_0x3e3479[_0x264802(0x1c7)]||a51_0x2dea47[_0x264802(0x1b0)](_0x168ddb),_0x1aa866=_0x3e3479[_0x264802(0x2cd)]?_0x264802(0x291)+_0x5e4417+_0x264802(0x256):_0x264802(0x1e7)+_0x5adbda+_0x264802(0x292)+_0x5e4417+'\x22?',_0x3bdccf=await confirmKey(_0x1aa866);if(!_0x3bdccf)return console[_0x264802(0x2b2)](a51_0x55b9d6['yellow'](_0x264802(0x2e6))),0x1;}const _0xf9cd2a=await withSpinner(_0x3e3479['targetExists']?'Updating\x20'+_0x5e4417+_0x264802(0x185):'Cloning\x20to\x20'+_0x5e4417+_0x264802(0x185),()=>_0x1e646c[_0x264802(0x2e5)][_0x264802(0x279)](_0x3e3479),{'verbose':_0x37f5ab[_0x264802(0x1ed)]}),_0x3a21d6=_0xf9cd2a['data'];return console['error'](a51_0x55b9d6[_0x264802(0x270)](_0x3e3479[_0x264802(0x2cd)]?_0x264802(0x25a):_0x264802(0x28a))),console[_0x264802(0x2b2)](_0x264802(0x283)+_0x3a21d6[_0x264802(0x2cf)]),console['error'](_0x264802(0x14a)+_0x3a21d6[_0x264802(0x148)]),console[_0x264802(0x2b2)](_0x264802(0x2b8)+_0x3a21d6['revision']),await this[_0x264802(0x208)](_0x1e646c,_0x3a21d6['newProjectName'],_0x37f5ab[_0x264802(0x2a9)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a51_0x10da29(0x1b9)]='workflow:delete';[a51_0x10da29(0x2c0)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a51_0x10da29(0x1e3)](_0x37a13d){const _0x59c647=a51_0x10da29,{options:_0x29380a,args:_0x2d01aa,tdx:_0x3eaa83}=_0x37a13d,_0x24cf23=_0x2d01aa[0x0];if(!_0x24cf23)return console[_0x59c647(0x2b2)](_0x59c647(0x264)),console['error'](_0x59c647(0x258)),0x1;_0x29380a[_0x59c647(0x1ed)]&&console[_0x59c647(0x2b2)](_0x59c647(0x19b)+_0x24cf23);if(!_0x29380a[_0x59c647(0x23a)]){if(!isInteractive())return console['error'](a51_0x55b9d6[_0x59c647(0x275)]('\x0aError:'),_0x59c647(0x261)),console[_0x59c647(0x2b2)](a51_0x55b9d6['dim'](_0x59c647(0x20e))),0x1;const _0x523cc2=await confirmKey(_0x59c647(0x25e)+_0x24cf23+_0x59c647(0x238));if(!_0x523cc2)return console[_0x59c647(0x2b2)](a51_0x55b9d6[_0x59c647(0x284)](_0x59c647(0x2e6))),0x1;}const _0x4fe1d7=await withSpinner(_0x59c647(0x2aa)+_0x24cf23+'...',()=>_0x3eaa83[_0x59c647(0x2e5)][_0x59c647(0x171)](_0x24cf23),{'verbose':_0x29380a[_0x59c647(0x1ed)]}),_0x159a2d=_0x4fe1d7[_0x59c647(0x15d)];return console[_0x59c647(0x2b2)]('✔\x20Deleted\x20project\x20'+_0x159a2d['projectName']),console['error'](_0x59c647(0x14a)+_0x159a2d[_0x59c647(0x2bb)]),0x0;}}export function parseKeyValue(_0x20f371){const _0x50b1fa=a51_0x10da29,_0x166517=_0x20f371[_0x50b1fa(0x299)]('=');if(_0x166517===-0x1)throw new Error(_0x50b1fa(0x1d7)+_0x20f371+_0x50b1fa(0x19f));const _0x9e50d=_0x20f371[_0x50b1fa(0x172)](0x0,_0x166517),_0x2f91dc=_0x20f371[_0x50b1fa(0x172)](_0x166517+0x1);if(!_0x9e50d)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x9e50d,'value':_0x2f91dc};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]='workflow:secrets:list';['description']=a51_0x10da29(0x1dc);async[a51_0x10da29(0x1e3)](_0x2e78ea){const _0x3c33b8=a51_0x10da29,{options:_0x1fe0bc,args:_0x45c5c2,tdx:_0x1d2050}=_0x2e78ea,_0x3d0cd6=this['requireProject'](_0x45c5c2,_0x1fe0bc);if(!_0x3d0cd6)return 0x1;_0x1fe0bc[_0x3c33b8(0x1ed)]&&console['error']('Project:\x20'+_0x3d0cd6);const _0x32ee0=await withSpinner('Listing\x20secrets...',()=>_0x1d2050[_0x3c33b8(0x2e5)][_0x3c33b8(0x17c)](_0x3d0cd6),{'verbose':_0x1fe0bc[_0x3c33b8(0x1ed)]}),{secrets:_0x2776e4}=_0x32ee0[_0x3c33b8(0x15d)];return console[_0x3c33b8(0x2b2)](_0x3c33b8(0x267)+_0x2776e4[_0x3c33b8(0x1b5)]+_0x3c33b8(0x2d1)+(_0x2776e4[_0x3c33b8(0x1b5)]!==0x1?'s':'')),await handleSDKOutput(_0x2776e4,_0x1fe0bc),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x2c6);[a51_0x10da29(0x2c0)]=a51_0x10da29(0x1d5);async['execute'](_0x3a9feb){const _0x11b16f=a51_0x10da29,{options:_0x2bd8bd,args:_0x1e21ed,tdx:_0x44b803}=_0x3a9feb;let _0x2039cd,_0x420d1e;if(_0x1e21ed[_0x11b16f(0x1b5)]>=0x1&&!_0x1e21ed[0x0]['includes']('='))_0x2039cd=_0x1e21ed[0x0],_0x420d1e=_0x1e21ed['slice'](0x1);else{if(_0x1e21ed[_0x11b16f(0x1b5)]>=0x1&&_0x2bd8bd['workflowProject'])_0x2039cd=_0x2bd8bd[_0x11b16f(0x19d)],_0x420d1e=_0x1e21ed;else return _0x1e21ed[_0x11b16f(0x1b5)]>=0x1?(console[_0x11b16f(0x2b2)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x11b16f(0x2b2)](_0x11b16f(0x24c)),0x1):(console[_0x11b16f(0x2b2)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x11b16f(0x2b2)](_0x11b16f(0x2a8)),0x1);}if(_0x420d1e['length']===0x0)return console['error'](_0x11b16f(0x19c)),console[_0x11b16f(0x2b2)](_0x11b16f(0x2a8)),0x1;const _0x3a788a={};try{for(const _0x3927f6 of _0x420d1e){const {key:_0x3dabba,value:_0x16e7bc}=parseKeyValue(_0x3927f6);_0x3a788a[_0x3dabba]=_0x16e7bc;}}catch(_0x21ec71){return _0x21ec71 instanceof Error&&console[_0x11b16f(0x2b2)](a51_0x55b9d6['red'](_0x11b16f(0x22f)),_0x21ec71[_0x11b16f(0x27e)]),0x1;}const _0x30ad9e=Object[_0x11b16f(0x231)](_0x3a788a);_0x2bd8bd[_0x11b16f(0x1ed)]&&(console[_0x11b16f(0x2b2)](_0x11b16f(0x19b)+_0x2039cd),console['error'](_0x11b16f(0x215)+_0x30ad9e[_0x11b16f(0x246)](',\x20')));const _0x48ed61=await withSpinner(_0x30ad9e[_0x11b16f(0x1b5)]===0x1?'Setting\x20secret...':_0x11b16f(0x1ef)+_0x30ad9e['length']+_0x11b16f(0x2ad),()=>_0x44b803[_0x11b16f(0x2e5)][_0x11b16f(0x230)](_0x2039cd,_0x3a788a),{'verbose':_0x2bd8bd[_0x11b16f(0x1ed)]}),_0x14cb05=_0x48ed61[_0x11b16f(0x15d)];return console[_0x11b16f(0x2b2)](_0x30ad9e[_0x11b16f(0x1b5)]===0x1?_0x11b16f(0x1c3)+_0x14cb05[_0x11b16f(0x231)][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x14cb05[_0x11b16f(0x14d)]+'\x27':'✔\x20'+_0x14cb05[_0x11b16f(0x231)][_0x11b16f(0x1b5)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x14cb05['projectName']+'\x27'),(_0x2bd8bd[_0x11b16f(0x29c)]||_0x2bd8bd[_0x11b16f(0x1ac)])&&await handleSingleObjectOutput(_0x14cb05,_0x2bd8bd),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x2b5);[a51_0x10da29(0x2c0)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async['execute'](_0xe22167){const _0x45ea27=a51_0x10da29,{options:_0xfbbe99,args:_0x50a62e,tdx:_0x4027b3}=_0xe22167;let _0x12152f,_0x1290e9;if(_0x50a62e['length']>=0x2)_0x12152f=_0x50a62e[0x0],_0x1290e9=_0x50a62e[0x1];else{if(_0x50a62e['length']===0x1&&_0xfbbe99['workflowProject'])_0x12152f=_0xfbbe99[_0x45ea27(0x19d)],_0x1290e9=_0x50a62e[0x0];else return _0x50a62e[_0x45ea27(0x1b5)]===0x1?(console[_0x45ea27(0x2b2)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x45ea27(0x2b2)](_0x45ea27(0x24c)),0x1):(console[_0x45ea27(0x2b2)](_0x45ea27(0x2af)),console[_0x45ea27(0x2b2)](_0x45ea27(0x226)),0x1);}_0xfbbe99[_0x45ea27(0x1ed)]&&(console[_0x45ea27(0x2b2)](_0x45ea27(0x19b)+_0x12152f),console['error'](_0x45ea27(0x1c6)+_0x1290e9));if(!_0xfbbe99[_0x45ea27(0x23a)]){if(!isInteractive())return console[_0x45ea27(0x2b2)](a51_0x55b9d6[_0x45ea27(0x275)]('\x0aError:'),_0x45ea27(0x261)),console[_0x45ea27(0x2b2)](a51_0x55b9d6[_0x45ea27(0x190)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x189c12=await confirmKey(_0x45ea27(0x16b)+_0x1290e9+_0x45ea27(0x229)+_0x12152f+'\x27?');if(!_0x189c12)return console[_0x45ea27(0x2b2)](a51_0x55b9d6[_0x45ea27(0x284)](_0x45ea27(0x2e6))),0x1;}const _0x4d92ea=await withSpinner(_0x45ea27(0x153),()=>_0x4027b3['workflow'][_0x45ea27(0x2e3)](_0x12152f,_0x1290e9),{'verbose':_0xfbbe99[_0x45ea27(0x1ed)]}),_0x1a68c1=_0x4d92ea[_0x45ea27(0x15d)];return console[_0x45ea27(0x2b2)](_0x45ea27(0x1c3)+_0x1a68c1[_0x45ea27(0x2e0)]+_0x45ea27(0x14f)+_0x1a68c1[_0x45ea27(0x14d)]+'\x27'),(_0xfbbe99['json']||_0xfbbe99['jsonl'])&&await handleSingleObjectOutput(_0x1a68c1,_0xfbbe99),0x0;}}function a51_0x4c2d(_0x3003f6,_0x2be4a4){_0x3003f6=_0x3003f6-0x146;const _0x141caf=a51_0x141c();let _0x4c2d46=_0x141caf[_0x3003f6];return _0x4c2d46;}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(_0x3c6c7f){const _0x234b86=a51_0x10da29,_0x5ae5d8=Math['floor'](_0x3c6c7f/0x3e8),_0x45ff7b=Math['floor'](_0x5ae5d8/0x3c),_0x1d639b=Math[_0x234b86(0x250)](_0x45ff7b/0x3c),_0x38f0f4=Math[_0x234b86(0x250)](_0x1d639b/0x18);if(_0x38f0f4>0x0){const _0x40060d=_0x1d639b%0x18;return _0x40060d>0x0?_0x38f0f4+'d\x20'+_0x40060d+'h':_0x38f0f4+'d';}else{if(_0x1d639b>0x0){const _0x58f498=_0x45ff7b%0x3c;return _0x58f498>0x0?_0x1d639b+'h\x20'+_0x58f498+'m':_0x1d639b+'h';}else{if(_0x45ff7b>0x0){const _0xe3b12e=_0x5ae5d8%0x3c;return _0xe3b12e>0x0?_0x45ff7b+'m\x20'+_0xe3b12e+'s':_0x45ff7b+'m';}else return _0x5ae5d8+'s';}}}function formatTimestamp(_0x3deb37,_0xb9507a){const _0x415b11=a51_0x10da29,_0x1fa640=new Date(_0x3deb37),_0x422a22=String(_0x1fa640['getHours']())[_0x415b11(0x22c)](0x2,'0'),_0x557c4f=String(_0x1fa640['getMinutes']())[_0x415b11(0x22c)](0x2,'0'),_0x20cb77=_0x422a22+':'+_0x557c4f,_0x1da6b7=_0x1fa640[_0x415b11(0x200)]()===_0xb9507a[_0x415b11(0x200)]()&&_0x1fa640[_0x415b11(0x25f)]()===_0xb9507a['getMonth']()&&_0x1fa640[_0x415b11(0x16f)]()===_0xb9507a[_0x415b11(0x16f)]();if(_0x1da6b7)return _0x20cb77;else{const _0x24a9e5=String(_0x1fa640['getMonth']()+0x1)['padStart'](0x2,'0'),_0x37299a=String(_0x1fa640['getDate']())[_0x415b11(0x22c)](0x2,'0');return _0x24a9e5+'-'+_0x37299a+'\x20'+_0x20cb77;}}function formatDate(_0xffd67d){const _0x598c47=a51_0x10da29,_0x3ddf49=_0xffd67d['getFullYear'](),_0xe60e6e=String(_0xffd67d[_0x598c47(0x25f)]()+0x1)[_0x598c47(0x22c)](0x2,'0'),_0x5dc473=String(_0xffd67d[_0x598c47(0x16f)]())['padStart'](0x2,'0');return _0x3ddf49+'-'+_0xe60e6e+'-'+_0x5dc473;}function getTaskStateIcon(_0x14d696){const _0x1cea90={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1cea90[_0x14d696]||'⚪';}function getBarChar(_0x45cce4){const _0x16b1e6=a51_0x10da29;return _0x45cce4==='error'||_0x45cce4===_0x16b1e6(0x212)?'×':'─';}function getBarColor(_0x166ca7){const _0x18bb21=a51_0x10da29,_0x39aa67={'success':a51_0x55b9d6['green'],'error':a51_0x55b9d6[_0x18bb21(0x275)],'group_error':a51_0x55b9d6[_0x18bb21(0x275)],'running':a51_0x55b9d6['blue'],'blocked':a51_0x55b9d6[_0x18bb21(0x284)],'planned':a51_0x55b9d6[_0x18bb21(0x190)],'canceling':a51_0x55b9d6[_0x18bb21(0x284)]};return _0x39aa67[_0x166ca7]||a51_0x55b9d6[_0x18bb21(0x2c4)];}function parseTaskName(_0x3d1d88){const _0x5aa05e=a51_0x10da29;let _0x46b93e=_0x3d1d88[_0x5aa05e(0x1b8)](/^\++/,'');const _0x5e888b=_0x46b93e[_0x5aa05e(0x18d)]('+'),_0x2eb0ba=_0x5e888b[_0x5aa05e(0x1b5)]>0x1?_0x5e888b['length']-0x2:0x0,_0x2754d1=_0x5e888b[_0x5e888b[_0x5aa05e(0x1b5)]-0x1]||_0x46b93e;return{'level':_0x2eb0ba,'name':'+'+_0x2754d1};}function truncateTaskName(_0x3d1e8c,_0x2807a3){const _0x1f0bda=a51_0x10da29,_0xa40225=stringWidth(_0x3d1e8c);if(_0xa40225<=_0x2807a3)return _0x3d1e8c;let _0x26800b=_0x3d1e8c;while(stringWidth(_0x26800b+'…')>_0x2807a3&&_0x26800b[_0x1f0bda(0x1b5)]>0x0){_0x26800b=_0x26800b['slice'](0x0,-0x1);}return _0x26800b+'…';}function calculateTimeScale(_0x495483,_0xa4958f){const _0x5eb76f=a51_0x10da29;return{'startTime':_0x495483[_0x5eb76f(0x276)],'endTime':_0x495483['end'],'durationMs':_0x495483['duration'],'msPerChar':_0x495483['duration']/_0xa4958f};}function timeToPosition(_0x26b8b3,_0x194f03,_0x30d8b7){const _0x24c02c=a51_0x10da29,_0x28aefd=_0x26b8b3-_0x194f03[_0x24c02c(0x257)],_0x44fbbd=Math['floor'](_0x28aefd/_0x194f03[_0x24c02c(0x19a)]);return Math['max'](0x0,Math[_0x24c02c(0x2d6)](_0x44fbbd,_0x30d8b7));}function renderTimeAxis(_0xccee63,_0x67fa3e){const _0xfc100f=a51_0x10da29,_0x22163b=Math[_0xfc100f(0x2d6)](TIMELINE_CONFIG[_0xfc100f(0x165)],Math['max'](TIMELINE_CONFIG[_0xfc100f(0x14e)],Math['floor'](_0x67fa3e/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x182799=_0xccee63['durationMs']/(_0x22163b-0x1),_0x1b42a7=new Date(_0xccee63[_0xfc100f(0x257)]),_0x3e62c8=[];for(let _0x14c9cc=0x0;_0x14c9cc<_0x22163b;_0x14c9cc++){const _0x2d8692=_0xccee63[_0xfc100f(0x257)]+_0x14c9cc*_0x182799,_0x4f4c6b=timeToPosition(_0x2d8692,_0xccee63,_0x67fa3e),_0x5548d0=formatTimestamp(_0x2d8692,_0x1b42a7);_0x3e62c8['push']({'pos':_0x4f4c6b,'text':_0x5548d0});}const _0x3f95eb=new Array(_0x67fa3e)[_0xfc100f(0x2c2)]('\x20');let _0x2c8bc5=-0x1;for(const {pos:_0x225b8d,text:_0xb80b22}of _0x3e62c8){let _0x193dc4=Math[_0xfc100f(0x28c)](0x0,_0x225b8d-Math[_0xfc100f(0x250)](_0xb80b22[_0xfc100f(0x1b5)]/0x2));_0x193dc4<=_0x2c8bc5+TIMELINE_CONFIG[_0xfc100f(0x1c5)]&&(_0x193dc4=_0x2c8bc5+TIMELINE_CONFIG[_0xfc100f(0x1c5)]+0x1);_0x193dc4+_0xb80b22['length']>_0x67fa3e&&(_0x193dc4=_0x67fa3e-_0xb80b22[_0xfc100f(0x1b5)]);if(_0x193dc4>=0x0&&_0x193dc4+_0xb80b22[_0xfc100f(0x1b5)]<=_0x67fa3e&&_0x193dc4>_0x2c8bc5){for(let _0x17a1d1=0x0;_0x17a1d1<_0xb80b22[_0xfc100f(0x1b5)];_0x17a1d1++){_0x3f95eb[_0x193dc4+_0x17a1d1]=_0xb80b22[_0x17a1d1];}_0x2c8bc5=_0x193dc4+_0xb80b22['length']-0x1;}}return _0x3f95eb[_0xfc100f(0x246)]('');}function renderTaskRow(_0x1f59c,_0x524733,_0x556d0a,_0x5865dc){const _0x5c88f4=a51_0x10da29,{level:_0x5a1fb5,name:_0xe96b18}=parseTaskName(_0x1f59c[_0x5c88f4(0x1b9)]),_0x429990='\x20'[_0x5c88f4(0x2b9)](_0x5a1fb5),_0x3d2860=_0x1f59c[_0x5c88f4(0x20f)]?'('+formatElapsed(_0x1f59c[_0x5c88f4(0x20f)][_0x5c88f4(0x158)])+')':'',_0x338189=stringWidth(_0x3d2860),_0x3c8943=_0x5a1fb5*0x1,_0x2854c2=_0x5865dc-_0x3c8943-_0x338189-0x1,_0x39d0b3=truncateTaskName(_0xe96b18,_0x2854c2),_0x591fc6=_0x429990+_0x39d0b3,_0xe1169d=stringWidth(_0x591fc6),_0x4c7d55=_0x5865dc-_0xe1169d-_0x338189,_0x2a6794=_0x591fc6+'\x20'[_0x5c88f4(0x2b9)](Math[_0x5c88f4(0x28c)](0x1,_0x4c7d55))+a51_0x55b9d6['dim'](_0x3d2860),_0x6071f8=getTaskStateIcon(_0x1f59c['state']),_0x3b5660=new Array(_0x556d0a)[_0x5c88f4(0x2c2)]('\x20');if(_0x1f59c[_0x5c88f4(0x20f)]){const _0x369980=timeToPosition(_0x1f59c['window'][_0x5c88f4(0x276)],_0x524733,_0x556d0a),_0x4169bb=timeToPosition(_0x1f59c[_0x5c88f4(0x20f)][_0x5c88f4(0x2ca)],_0x524733,_0x556d0a),_0x92bda=getBarChar(_0x1f59c[_0x5c88f4(0x2d7)]),_0x2d6337=Math[_0x5c88f4(0x28c)](_0x369980+0x1,_0x4169bb);for(let _0x3c7a93=_0x369980;_0x3c7a93<Math[_0x5c88f4(0x2d6)](_0x2d6337,_0x556d0a);_0x3c7a93++){_0x3b5660[_0x3c7a93]=_0x92bda;}}const _0x470f65=getBarColor(_0x1f59c[_0x5c88f4(0x2d7)]),_0x1a12ad=_0x3b5660[_0x5c88f4(0x1cb)](_0x475c55=>_0x475c55==='\x20'?'\x20':_0x470f65(_0x475c55))[_0x5c88f4(0x246)]('');return _0x6071f8+'\x20'+_0x2a6794+'│'+_0x1a12ad+'│';}function calculateStats(_0x24c8b4){const _0xffff51=a51_0x10da29,_0x35cd60={'total':_0x24c8b4[_0xffff51(0x1b5)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x5e5a3d of _0x24c8b4){if(_0x5e5a3d[_0xffff51(0x2d7)]==='success')_0x35cd60[_0xffff51(0x1f6)]++;else{if(_0x5e5a3d[_0xffff51(0x2d7)]===_0xffff51(0x2b2)||_0x5e5a3d['state']==='group_error')_0x35cd60[_0xffff51(0x2b2)]++;else _0x5e5a3d[_0xffff51(0x2d7)]===_0xffff51(0x1ee)?_0x35cd60[_0xffff51(0x1ee)]++:_0x35cd60[_0xffff51(0x2b0)]++;}}return _0x35cd60;}function formatStats(_0xae0765){const _0x34e917=a51_0x10da29;return['Total:\x20'+_0xae0765[_0x34e917(0x1a2)],'✅\x20'+_0xae0765['success'],'❌\x20'+_0xae0765[_0x34e917(0x2b2)],_0x34e917(0x173)+_0xae0765[_0x34e917(0x1ee)],'⏳\x20'+_0xae0765[_0x34e917(0x2b0)]][_0x34e917(0x246)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a51_0x10da29(0x1b9)]=a51_0x10da29(0x21f);['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a51_0x10da29(0x1e3)](_0x341547){const _0x20b973=a51_0x10da29,{options:_0x5c49de,args:_0x4a5ccd,tdx:_0x17c7ad}=_0x341547;let _0x387c7a,_0x316dd8,_0x5f592b=![];if(_0x4a5ccd[0x0]){if(_0x4a5ccd[0x0][_0x20b973(0x15e)]('.')){const _0x244a42=this[_0x20b973(0x2ae)](_0x4a5ccd,_0x5c49de);if(!_0x244a42)return 0x1;_0x387c7a=_0x244a42[_0x20b973(0x14d)],_0x316dd8=_0x244a42[_0x20b973(0x2a1)];}else{_0x316dd8=_0x4a5ccd[0x0],_0x387c7a=_0x5c49de[_0x20b973(0x19d)];if(!_0x387c7a)return console['error'](a51_0x55b9d6[_0x20b973(0x275)]('Error:'),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x5f592b=!![];}}else{const _0x48ed6a=this[_0x20b973(0x2ae)](_0x4a5ccd,_0x5c49de);if(!_0x48ed6a)return 0x1;_0x387c7a=_0x48ed6a[_0x20b973(0x14d)],_0x316dd8=_0x48ed6a[_0x20b973(0x2a1)];}if(_0x5c49de[_0x20b973(0x1ed)]){if(_0x387c7a&&_0x316dd8)console[_0x20b973(0x2b2)](_0x20b973(0x2a4)+_0x387c7a+'.'+_0x316dd8);else _0x387c7a&&console[_0x20b973(0x2b2)](_0x20b973(0x2c8)+_0x387c7a);}const _0x551291=_0x5c49de[_0x20b973(0x20d)],_0x2b8d3f=_0x5c49de[_0x20b973(0x2dd)];if(_0x551291){_0x2b8d3f&&console[_0x20b973(0x2b2)](a51_0x55b9d6[_0x20b973(0x284)]('Warning:'),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x214e2a=_0x5c49de[_0x20b973(0x196)];return _0x214e2a?await this[_0x20b973(0x18e)](_0x341547,_0x551291):await this[_0x20b973(0x195)](_0x341547,_0x551291,_0x5c49de),0x0;}if(_0x2b8d3f){const _0x823a3a=await withSpinner('Loading\x20session...',()=>_0x17c7ad[_0x20b973(0x2e5)][_0x20b973(0x233)]({'projectName':_0x387c7a,'workflowName':_0x316dd8,'limit':0x64}),{'verbose':_0x5c49de['verbose']}),_0x1d0f5=_0x823a3a['data']['find'](_0x4cec0b=>_0x4cec0b['id']===_0x2b8d3f);if(!_0x1d0f5)return console[_0x20b973(0x2b2)](a51_0x55b9d6['red'](_0x20b973(0x22f)),_0x20b973(0x1c8)+_0x2b8d3f),0x1;if(!_0x1d0f5[_0x20b973(0x1f7)]?.['id'])return console[_0x20b973(0x2b2)](a51_0x55b9d6['red'](_0x20b973(0x22f)),'Session\x20'+_0x2b8d3f+_0x20b973(0x2d0)),0x1;const _0x5dbdc7=_0x1d0f5[_0x20b973(0x1f7)]['id'];_0x5c49de[_0x20b973(0x1ed)]&&console[_0x20b973(0x2b2)](_0x20b973(0x15c)+_0x5dbdc7+_0x20b973(0x25c)+_0x2b8d3f);const _0x51bf8a=_0x5c49de[_0x20b973(0x196)];return _0x51bf8a?await this[_0x20b973(0x18e)](_0x341547,_0x5dbdc7):await this[_0x20b973(0x195)](_0x341547,_0x5dbdc7,_0x5c49de),0x0;}const _0xb0b7c=await withSpinner('Loading\x20sessions...',()=>_0x17c7ad[_0x20b973(0x2e5)]['sessions']({'projectName':_0x387c7a,'workflowName':_0x316dd8,'limit':_0x5c49de[_0x20b973(0x280)]||0x32}),{'verbose':_0x5c49de['verbose']}),_0x2cdd72=_0xb0b7c[_0x20b973(0x15d)];if(_0x2cdd72[_0x20b973(0x1b5)]===0x0){if(_0x387c7a&&_0x316dd8)console[_0x20b973(0x2b2)](_0x20b973(0x25b)+_0x387c7a+'.'+_0x316dd8);else _0x387c7a?console[_0x20b973(0x2b2)](_0x20b973(0x2a2)+_0x387c7a):(console[_0x20b973(0x2b2)]('No\x20workflow\x20sessions\x20found'),console['error'](a51_0x55b9d6[_0x20b973(0x190)](_0x20b973(0x199))));return 0x0;}_0x2cdd72[_0x20b973(0x1f2)]((_0x3d5355,_0x144803)=>{const _0x3f80dd=_0x20b973,_0x4b6a46=_0x3d5355[_0x3f80dd(0x2a5)]||'',_0x5896b6=_0x144803[_0x3f80dd(0x2a5)]||'';return _0x5896b6[_0x3f80dd(0x175)](_0x4b6a46);});if(_0x5c49de[_0x20b973(0x29c)]||_0x5c49de[_0x20b973(0x1ac)])return await handleSDKOutput(_0x2cdd72,_0x5c49de),0x0;let _0x2b3233;if(_0x5f592b){const _0x3d1ef0=_0x2cdd72[0x0];if(!_0x3d1ef0['lastAttempt']?.['id'])return console[_0x20b973(0x2b2)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x2b3233=_0x3d1ef0[_0x20b973(0x1f7)]['id'],_0x5c49de['verbose']&&console[_0x20b973(0x2b2)](_0x20b973(0x1a6)+_0x3d1ef0[_0x20b973(0x2a5)]);}else{const _0x42bbc9=_0x2cdd72[_0x20b973(0x1cb)](_0x6b5332=>{const _0x58b646=_0x20b973,_0x2a5a95=getAttemptStatusDisplay(_0x6b5332[_0x58b646(0x1f7)]);return{'title':_0x6b5332[_0x58b646(0x2c3)]?.['name']+'.'+_0x6b5332['workflow']?.[_0x58b646(0x1b9)]+_0x58b646(0x1fe)+_0x6b5332[_0x58b646(0x2a5)]+'\x20'+_0x2a5a95[_0x58b646(0x24a)],'value':_0x6b5332[_0x58b646(0x1f7)]?.['id']||'','description':_0x2a5a95[_0x58b646(0x186)]};}),_0x425dbe=await a51_0x5637a3({'type':_0x20b973(0x1aa),'name':_0x20b973(0x20d),'message':_0x20b973(0x210),'choices':_0x42bbc9[_0x20b973(0x162)](_0x574c4a=>_0x574c4a['value']!=='')});if(!_0x425dbe['attemptId'])return 0x0;_0x2b3233=_0x425dbe[_0x20b973(0x20d)];}const _0x237271=_0x5c49de[_0x20b973(0x196)];return _0x237271?await this[_0x20b973(0x18e)](_0x341547,_0x2b3233):await this[_0x20b973(0x195)](_0x341547,_0x2b3233,_0x5c49de),0x0;}async[a51_0x10da29(0x195)](_0x9e5ba7,_0x31f191,_0x4511cd){const _0x4f54f1=a51_0x10da29,{tdx:_0x5c525c}=_0x9e5ba7;let _0x58d69c,_0x1794da;try{[_0x58d69c,_0x1794da]=await Promise[_0x4f54f1(0x2ab)]([_0x5c525c[_0x4f54f1(0x2e5)][_0x4f54f1(0x224)](_0x31f191),_0x5c525c[_0x4f54f1(0x2e5)][_0x4f54f1(0x1f0)](_0x31f191,![])]);}catch(_0x45d467){console[_0x4f54f1(0x2b2)](a51_0x55b9d6[_0x4f54f1(0x275)](_0x4f54f1(0x15b)));_0x4511cd['verbose']&&console[_0x4f54f1(0x2b2)](_0x45d467);throw _0x45d467;}if(_0x4511cd[_0x4f54f1(0x29c)]||_0x4511cd[_0x4f54f1(0x1ac)]){const _0x575458=this[_0x4f54f1(0x206)](_0x58d69c,_0x1794da);await handleSDKOutput([_0x575458],_0x4511cd);return;}const _0x386bfc=_0x5c525c[_0x4f54f1(0x22e)][_0x4f54f1(0x2a9)],_0x48ee88=this[_0x4f54f1(0x1eb)](_0x58d69c,_0x1794da,_0x386bfc);console[_0x4f54f1(0x222)](_0x48ee88);}async[a51_0x10da29(0x18e)](_0x5e48a8,_0x1d870b){const _0x5e8902=a51_0x10da29,{tdx:_0x2d4521}=_0x5e48a8,_0x238200=TIMELINE_CONFIG[_0x5e8902(0x1b1)],_0x54f974=TIMELINE_CONFIG[_0x5e8902(0x247)];let _0x4aa64c=0x0;while(_0x4aa64c<_0x54f974){process[_0x5e8902(0x1cc)][_0x5e8902(0x1f4)]&&process[_0x5e8902(0x1cc)]['write']('\x1bc');let _0x388cf1,_0x1b6337;try{[_0x388cf1,_0x1b6337]=await Promise[_0x5e8902(0x2ab)]([_0x2d4521[_0x5e8902(0x2e5)][_0x5e8902(0x224)](_0x1d870b),_0x2d4521[_0x5e8902(0x2e5)]['tasks'](_0x1d870b,![])]);}catch(_0x5323f7){console[_0x5e8902(0x2b2)](a51_0x55b9d6[_0x5e8902(0x275)](_0x5e8902(0x2d3)));_0x4aa64c>0x0&&console['error'](a51_0x55b9d6[_0x5e8902(0x190)](_0x5e8902(0x1ec)+_0x4aa64c));throw _0x5323f7;}const _0x4b9394=_0x2d4521[_0x5e8902(0x22e)]['site'],_0x1b75ae=this['renderTimeline'](_0x388cf1,_0x1b6337,_0x4b9394);console['log'](_0x1b75ae);const _0x50bc84=_0x388cf1['done']&&_0x1b6337['every'](_0x4238f4=>_0x4238f4['state']!==_0x5e8902(0x1ee)&&_0x4238f4[_0x5e8902(0x2d7)]!==_0x5e8902(0x244));if(_0x50bc84){console['error'](a51_0x55b9d6[_0x5e8902(0x270)](_0x5e8902(0x22b)));break;}console['error'](a51_0x55b9d6[_0x5e8902(0x190)](_0x5e8902(0x271)+_0x4aa64c*0x2+_0x5e8902(0x167))),await new Promise(_0x2be11e=>setTimeout(_0x2be11e,_0x238200)),_0x4aa64c++;}_0x4aa64c>=_0x54f974&&console['error'](a51_0x55b9d6[_0x5e8902(0x284)](_0x5e8902(0x1e6)));}['renderTimeline'](_0x3449db,_0x38ecd1,_0x2c934c){const _0x5dda19=a51_0x10da29,_0x11768f=[],_0x1f7f86=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x4afbac=0x5,_0x240233=process[_0x5dda19(0x1cc)][_0x5dda19(0x1a4)]||0x78,_0x842d13=_0x240233-_0x1f7f86-_0x4afbac,_0x2cfaef=Math[_0x5dda19(0x28c)](TIMELINE_CONFIG[_0x5dda19(0x18f)],Math['min'](_0x842d13,TIMELINE_CONFIG[_0x5dda19(0x1cd)])),_0x5b38f2=new Date(_0x3449db[_0x5dda19(0x2d2)])['getTime'](),_0x515b5d=_0x3449db['finishedAt']?new Date(_0x3449db[_0x5dda19(0x2c5)])[_0x5dda19(0x287)]():Date[_0x5dda19(0x17f)](),_0x4f5094={'start':_0x5b38f2,'end':_0x515b5d,'duration':_0x515b5d-_0x5b38f2},_0x584081=new Map(),_0x3ac82c=[];for(const _0x4c047e of _0x38ecd1){if(_0x4c047e[_0x5dda19(0x207)]){const _0x351886=new Date(_0x4c047e['startedAt'])[_0x5dda19(0x287)](),_0x10d4ff=_0x4c047e[_0x5dda19(0x23b)]?new Date(_0x4c047e[_0x5dda19(0x23b)])[_0x5dda19(0x287)]():Date[_0x5dda19(0x17f)](),_0x1c5e7d={'start':_0x351886,'end':_0x10d4ff,'duration':_0x10d4ff-_0x351886};_0x584081[_0x5dda19(0x2c7)](_0x4c047e['id'],_0x1c5e7d),_0x3ac82c[_0x5dda19(0x26c)]({'name':_0x4c047e[_0x5dda19(0x1fb)],'state':_0x4c047e[_0x5dda19(0x2d7)]||_0x5dda19(0x198),'window':_0x1c5e7d});}else _0x3ac82c[_0x5dda19(0x26c)]({'name':_0x4c047e[_0x5dda19(0x1fb)],'state':_0x4c047e[_0x5dda19(0x2d7)]||_0x5dda19(0x244),'window':undefined});}_0x3ac82c[_0x5dda19(0x1f2)]((_0x3379dc,_0x19f9b5)=>{const _0x5acff1=_0x5dda19;if(!_0x3379dc[_0x5acff1(0x20f)])return 0x1;if(!_0x19f9b5[_0x5acff1(0x20f)])return-0x1;return _0x3379dc[_0x5acff1(0x20f)]['start']-_0x19f9b5['window'][_0x5acff1(0x276)];});const _0x195727=_0x3ac82c['length'],_0x3a51c3=_0x195727>TIMELINE_CONFIG[_0x5dda19(0x1dd)];_0x3a51c3&&_0x3ac82c[_0x5dda19(0x289)](TIMELINE_CONFIG[_0x5dda19(0x1dd)]);const _0x5bbd34=calculateTimeScale(_0x4f5094,_0x2cfaef),_0x1d09ef=_0x3449db[_0x5dda19(0x1d9)]?_0x3449db['success']?a51_0x55b9d6['green'](_0x5dda19(0x1f6)):a51_0x55b9d6['red'](_0x5dda19(0x2b2)):a51_0x55b9d6['blue'](_0x5dda19(0x1ee)),_0x486137=_0x3449db[_0x5dda19(0x2c3)]?.['id'],_0x109023=_0x3449db[_0x5dda19(0x2dd)];let _0x2f29f6;if(_0x486137&&_0x109023){const _0x482b2a=getWorkflowAttemptUrl(_0x2c934c,_0x486137,_0x109023,_0x3449db['id']);_0x2f29f6=hyperlink(a51_0x55b9d6[_0x5dda19(0x190)](_0x3449db['id']),_0x482b2a);}else _0x2f29f6=a51_0x55b9d6[_0x5dda19(0x190)](_0x3449db['id']);_0x11768f[_0x5dda19(0x26c)](_0x5dda19(0x281)+_0x2f29f6+_0x5dda19(0x1fe)+_0x1d09ef+_0x5dda19(0x1fe)+formatElapsed(_0x4f5094[_0x5dda19(0x158)]));if(_0x3ac82c['length']>0x0){const _0xe198b=renderTimeAxis(_0x5bbd34,_0x2cfaef),_0x5ce63c=new Date(_0x4f5094[_0x5dda19(0x276)]),_0x5ca4d7=formatDate(_0x5ce63c),_0x593e0c=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG['ICON_SPACING']+_0x1f7f86,_0xbd794c=_0x5ca4d7[_0x5dda19(0x22c)](_0x593e0c),_0x45f302=a51_0x55b9d6[_0x5dda19(0x190)](_0xbd794c);_0x11768f[_0x5dda19(0x26c)](_0x45f302+'\x20'+_0xe198b);for(const _0x27c9ab of _0x3ac82c){_0x11768f[_0x5dda19(0x26c)](renderTaskRow(_0x27c9ab,_0x5bbd34,_0x2cfaef,_0x1f7f86));}const _0x9ac30d=calculateStats(_0x3ac82c);_0x11768f[_0x5dda19(0x26c)](formatStats(_0x9ac30d)),_0x3a51c3&&_0x11768f[_0x5dda19(0x26c)](a51_0x55b9d6[_0x5dda19(0x284)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x5dda19(0x1dd)]+_0x5dda19(0x16d)+_0x195727+'\x20tasks')),_0x11768f[_0x5dda19(0x26c)](''),_0x11768f['push'](a51_0x55b9d6[_0x5dda19(0x190)](_0x5dda19(0x21a))+(_0x5dda19(0x1e0)+_0x3449db['id']+'\x20logs')+a51_0x55b9d6[_0x5dda19(0x190)](_0x5dda19(0x211)));}else _0x11768f[_0x5dda19(0x26c)](_0x5dda19(0x1bf));return _0x11768f['join']('\x0a');}[a51_0x10da29(0x206)](_0x37024d,_0x2b2960){const _0x3240f1=a51_0x10da29,_0x21a587=new Date(_0x37024d['createdAt'])[_0x3240f1(0x287)](),_0x185025=_0x37024d[_0x3240f1(0x2c5)]?new Date(_0x37024d['finishedAt'])[_0x3240f1(0x287)]():Date['now'](),_0x48f865=_0x185025-_0x21a587,_0x464458=[];for(const _0x4ff790 of _0x2b2960){if(_0x4ff790[_0x3240f1(0x207)]){const _0x2cca39=new Date(_0x4ff790['startedAt'])[_0x3240f1(0x287)](),_0x3ff9d0=_0x4ff790[_0x3240f1(0x23b)]?new Date(_0x4ff790[_0x3240f1(0x23b)])[_0x3240f1(0x287)]():Date[_0x3240f1(0x17f)]();_0x464458[_0x3240f1(0x26c)]({'name':_0x4ff790[_0x3240f1(0x1fb)],'state':_0x4ff790[_0x3240f1(0x2d7)]||'unknown','window':{'start':_0x2cca39,'end':_0x3ff9d0,'duration':_0x3ff9d0-_0x2cca39}});}else _0x464458[_0x3240f1(0x26c)]({'name':_0x4ff790[_0x3240f1(0x1fb)],'state':_0x4ff790[_0x3240f1(0x2d7)]||'planned','window':undefined});}const _0x3c4312=calculateStats(_0x464458);return{'attempt':{'id':_0x37024d['id'],'status':_0x37024d['done']?_0x37024d[_0x3240f1(0x1f6)]?_0x3240f1(0x1f6):_0x3240f1(0x2b2):_0x3240f1(0x1ee),'createdAt':_0x37024d[_0x3240f1(0x2d2)],'finishedAt':_0x37024d[_0x3240f1(0x2c5)],'duration_ms':_0x48f865},'tasks':_0x464458['map'](_0x50865e=>({'name':_0x50865e['name'],'state':_0x50865e[_0x3240f1(0x2d7)],'startedAt':_0x50865e['window']?new Date(_0x50865e[_0x3240f1(0x20f)][_0x3240f1(0x276)])[_0x3240f1(0x223)]():null,'updatedAt':_0x50865e['window']?new Date(_0x50865e['window'][_0x3240f1(0x2ca)])[_0x3240f1(0x223)]():null,'duration_ms':_0x50865e[_0x3240f1(0x20f)]?.['duration']||null})),'stats':_0x3c4312};}}
|
|
1
|
+
const a51_0x4fe97f=a51_0x9b69;(function(_0x356cc6,_0xaf29a6){const _0x25f431=a51_0x9b69,_0x4b505f=_0x356cc6();while(!![]){try{const _0x4130a4=parseInt(_0x25f431(0x23d))/0x1+parseInt(_0x25f431(0x1a1))/0x2+parseInt(_0x25f431(0x115))/0x3+parseInt(_0x25f431(0x17e))/0x4*(-parseInt(_0x25f431(0x157))/0x5)+parseInt(_0x25f431(0x191))/0x6*(-parseInt(_0x25f431(0x211))/0x7)+parseInt(_0x25f431(0x26b))/0x8*(-parseInt(_0x25f431(0x19c))/0x9)+parseInt(_0x25f431(0x152))/0xa;if(_0x4130a4===_0xaf29a6)break;else _0x4b505f['push'](_0x4b505f['shift']());}catch(_0x40849c){_0x4b505f['push'](_0x4b505f['shift']());}}}(a51_0x210b,0x7877d));import a51_0x107aaa from'chalk';import{existsSync}from'fs';import a51_0x3c8a7f from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a51_0x8f4c4c from'prompts';function getAttemptStatusDisplay(_0x4ba1dd){const _0x54e164=a51_0x9b69;if(!_0x4ba1dd)return{'icon':'⏳','text':''};const {done:_0x493f89,success:_0x5e6a70,cancelRequested:_0x195649}=_0x4ba1dd;if(!_0x493f89)return _0x195649?{'icon':'🛑','text':a51_0x107aaa[_0x54e164(0x2a5)]('canceling')}:{'icon':'🔄','text':a51_0x107aaa[_0x54e164(0x1b2)]('running')};if(_0x5e6a70)return{'icon':'✅','text':a51_0x107aaa[_0x54e164(0x25f)](_0x54e164(0x24d))};return{'icon':'❌','text':a51_0x107aaa[_0x54e164(0x26f)](_0x54e164(0x1fd))};}export class WorkflowBaseCommand extends BaseCommand{[a51_0x4fe97f(0x185)](_0xeac1ab,_0x5bc8e0,_0x40bed6=0x0){const _0x4e5f0f=a51_0x4fe97f;return _0xeac1ab[_0x40bed6]||_0x5bc8e0[_0x4e5f0f(0x1f3)];}[a51_0x4fe97f(0x175)](_0x4f3ef8,_0x38d6a5,_0x27fb40=0x0){const _0x58b6cd=a51_0x4fe97f,_0x2c6afe=this[_0x58b6cd(0x185)](_0x4f3ef8,_0x38d6a5,_0x27fb40);if(!_0x2c6afe)return console[_0x58b6cd(0x1fd)](a51_0x107aaa['red'](_0x58b6cd(0x147)),_0x58b6cd(0x109)),console['error'](a51_0x107aaa[_0x58b6cd(0x19d)](_0x58b6cd(0x16a))),null;return _0x2c6afe;}['parseProjectWorkflowPattern'](_0x4f0668,_0x57c189){const _0x1addf1=a51_0x4fe97f;if(_0x4f0668[0x0]){const _0x295372=_0x4f0668[0x0][_0x1addf1(0x2a0)]('.');if(_0x295372[_0x1addf1(0x1a8)]===0x1)return{'projectName':_0x295372[0x0],'workflowName':undefined};else return _0x295372[_0x1addf1(0x1a8)]===0x2?{'projectName':_0x295372[0x0],'workflowName':_0x295372[0x1]}:(console[_0x1addf1(0x1fd)](a51_0x107aaa[_0x1addf1(0x26f)](_0x1addf1(0x147)),_0x1addf1(0x1a5)),null);}return{'projectName':_0x57c189['workflowProject'],'workflowName':undefined};}[a51_0x4fe97f(0x1e2)](_0x240835,_0x5d9fae,_0x2f9fcb=0x0){const _0x36fb12=a51_0x4fe97f;if(_0x240835[_0x2f9fcb])return _0x240835[_0x2f9fcb];if(_0x5d9fae[_0x36fb12(0x1f3)]){const _0x326c9b=a51_0x3c8a7f[_0x36fb12(0x267)](process[_0x36fb12(0x1f9)](),_0x36fb12(0x298),_0x5d9fae[_0x36fb12(0x1f3)]);if(existsSync(a51_0x3c8a7f['join'](_0x326c9b,_0x36fb12(0x195))))return _0x326c9b;}return undefined;}async[a51_0x4fe97f(0x239)](_0x240ca6,_0x27cc43,_0x442531){const _0x4256d1=a51_0x4fe97f;try{const _0x518810=await _0x240ca6['workflow'][_0x4256d1(0x298)](_0x27cc43,{'limit':0x1});if(_0x518810[_0x4256d1(0x1a8)]>0x0){const _0x934a70=_0x518810[0x0]['id'],_0x335a51=getWorkflowUrl(_0x442531,_0x934a70);console[_0x4256d1(0x1fd)](_0x4256d1(0x235)+a51_0x107aaa[_0x4256d1(0x1dc)](_0x335a51));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x133);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x13e);async[a51_0x4fe97f(0x1da)](_0x2dfa04){const _0x4711bf=a51_0x4fe97f,{options:_0x30cac7,args:_0xbb13d6,tdx:_0x3d0178}=_0x2dfa04,_0x298053=_0xbb13d6[0x0],_0x43f655=_0x30cac7[_0x4711bf(0x2b0)];if(_0x43f655)return saveSessionContext({'workflow_project':undefined},_0x30cac7['session']),console['log'](a51_0x107aaa[_0x4711bf(0x25f)](_0x4711bf(0x178))),0x0;if(!_0x298053)return console[_0x4711bf(0x1fd)](a51_0x107aaa[_0x4711bf(0x26f)](_0x4711bf(0x147)),'Project\x20name\x20is\x20required'),console[_0x4711bf(0x1fd)](a51_0x107aaa[_0x4711bf(0x19d)](_0x4711bf(0x285))),console[_0x4711bf(0x1fd)](a51_0x107aaa[_0x4711bf(0x19d)](_0x4711bf(0x1b7))),0x1;const _0x2dc978=await withSpinner(_0x4711bf(0x174)+_0x298053+'\x27...',()=>_0x3d0178[_0x4711bf(0x16b)]['resolveProjectId'](_0x298053),{'verbose':_0x30cac7['verbose']}),{name:_0x3e8c46}=_0x2dc978[_0x4711bf(0x1ab)];return saveSessionContext({'workflow_project':_0x3e8c46},_0x30cac7[_0x4711bf(0x280)]),console[_0x4711bf(0x143)](a51_0x107aaa[_0x4711bf(0x25f)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a51_0x107aaa[_0x4711bf(0x1dc)](_0x3e8c46))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]='workflow:projects';[a51_0x4fe97f(0x1d6)]='List\x20all\x20workflow\x20projects';async[a51_0x4fe97f(0x1da)](_0x5bc421){const _0x18738a=a51_0x4fe97f,{options:_0xd77450,args:_0x2a9b87,tdx:_0x28b172}=_0x5bc421,_0x3ee02d=_0x2a9b87[0x0];_0xd77450[_0x18738a(0x28e)]&&_0x3ee02d&&console['error']('Pattern:\x20'+_0x3ee02d);const _0x2bf183=await withSpinner(_0x18738a(0x106),()=>_0x28b172[_0x18738a(0x16b)][_0x18738a(0x167)](_0x3ee02d,{'limit':_0xd77450[_0x18738a(0x184)]}),{'verbose':_0xd77450[_0x18738a(0x28e)]});let _0x53ebaa=_0x2bf183[_0x18738a(0x1ab)];_0x53ebaa[_0x18738a(0x20c)]((_0x15d8c1,_0x25b079)=>_0x15d8c1[_0x18738a(0x19a)][_0x18738a(0x1ae)](_0x25b079[_0x18738a(0x19a)]));const _0x254982=_0xd77450[_0x18738a(0x184)]||0x64,_0x11f1bf=_0x53ebaa[_0x18738a(0x1a8)]>=_0x254982?a51_0x107aaa['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x18738a(0x1fd)]('✔\x20Found\x20'+_0x53ebaa['length']+_0x18738a(0x1b4)+(_0x53ebaa[_0x18738a(0x1a8)]!==0x1?'s':'')+_0x11f1bf);if(_0xd77450[_0x18738a(0x12e)]===_0x18738a(0x18e)||_0xd77450['format']===_0x18738a(0x14a)||_0xd77450['format']===_0x18738a(0x256))await handleSDKOutput(_0x53ebaa,_0xd77450);else{if(_0x53ebaa[_0x18738a(0x1a8)]===0x0)_0x3ee02d?console[_0x18738a(0x143)]('No\x20projects\x20match\x20pattern:\x20'+_0x3ee02d):console[_0x18738a(0x143)](_0x18738a(0x1e6));else{const _0x1e7b1f=_0x53ebaa[_0x18738a(0x1eb)](_0x23c696=>{const _0x6a595f=_0x18738a,_0x31c3ce=_0x23c696[_0x6a595f(0x18a)]?.[_0x6a595f(0x1a4)](_0x5a865a=>_0x5a865a[_0x6a595f(0x122)]===_0x6a595f(0x125)),_0x49ea42=_0x31c3ce?a51_0x107aaa[_0x6a595f(0x19d)](_0x6a595f(0x216)):'';return _0x6a595f(0x1c2)+_0x23c696['name']+_0x49ea42;});await writeOutput(_0x1e7b1f[_0x18738a(0x267)]('\x0a'),_0xd77450['output'],_0x18738a(0x28f));}}return 0x0;}}function a51_0x9b69(_0x511553,_0x5d7cfc){_0x511553=_0x511553-0xfd;const _0x210be1=a51_0x210b();let _0x9b6944=_0x210be1[_0x511553];return _0x9b6944;}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x241);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x1f2);async[a51_0x4fe97f(0x1da)](_0x447ca8){const _0x2b6e31=a51_0x4fe97f,{options:_0x5bf688,args:_0x441e64,tdx:_0x11bff7}=_0x447ca8,_0x2f6036=this[_0x2b6e31(0x185)](_0x441e64,_0x5bf688);_0x5bf688[_0x2b6e31(0x28e)]&&_0x2f6036&&console[_0x2b6e31(0x1fd)]('Project\x20filter:\x20'+_0x2f6036);const _0x3b311b=await withSpinner(_0x2b6e31(0x1af),()=>_0x11bff7[_0x2b6e31(0x16b)][_0x2b6e31(0x298)](_0x2f6036,{'limit':_0x5bf688[_0x2b6e31(0x184)]}),{'verbose':_0x5bf688[_0x2b6e31(0x28e)]});let _0x41faa2=_0x3b311b[_0x2b6e31(0x1ab)];_0x41faa2[_0x2b6e31(0x20c)]((_0x1cebda,_0x5f36ef)=>{const _0xa0876d=_0x2b6e31,_0x3ed9cf=_0x1cebda[_0xa0876d(0x19a)][_0xa0876d(0x1ae)](_0x5f36ef[_0xa0876d(0x19a)]);if(_0x3ed9cf!==0x0)return _0x3ed9cf;return(_0x1cebda['project']?.['name']||'')[_0xa0876d(0x1ae)](_0x5f36ef['project']?.[_0xa0876d(0x19a)]||'');});const _0x43fd20=_0x5bf688[_0x2b6e31(0x184)]||0x64,_0x68ce8a=_0x41faa2['length']>=_0x43fd20?a51_0x107aaa[_0x2b6e31(0x19d)](_0x2b6e31(0x23c)):'';console['error'](_0x2b6e31(0x2a9)+_0x41faa2['length']+_0x2b6e31(0x11e)+(_0x41faa2[_0x2b6e31(0x1a8)]!==0x1?'s':'')+_0x68ce8a);if(_0x5bf688[_0x2b6e31(0x12e)]==='json'||_0x5bf688[_0x2b6e31(0x12e)]==='jsonl'||_0x5bf688['format']==='table')await handleSDKOutput(_0x41faa2,_0x5bf688);else{if(_0x41faa2[_0x2b6e31(0x1a8)]===0x0)_0x2f6036?console['log']('No\x20workflows\x20found\x20in\x20project:\x20'+_0x2f6036):console[_0x2b6e31(0x143)](_0x2b6e31(0x1cd));else{const _0x2988e9=_0x5bf688[_0x2b6e31(0x248)],_0x51e9d6=_0x41faa2[_0x2b6e31(0x1eb)](_0x172930=>{const _0x4de4d7=_0x2b6e31,_0x15d85f=a51_0x107aaa[_0x4de4d7(0x19d)]('#'+_0x172930['id']),_0x1dfc0b=hyperlink(_0x15d85f,getWorkflowUrl(_0x2988e9,_0x172930['id'])),_0x5e50ac=_0x172930[_0x4de4d7(0x104)]?.[_0x4de4d7(0x19a)]?a51_0x107aaa['dim']('\x20('+_0x172930[_0x4de4d7(0x104)][_0x4de4d7(0x19a)]+')'):'';return _0x4de4d7(0x14d)+_0x1dfc0b+'\x20'+_0x172930['name']+_0x5e50ac;});await writeOutput(_0x51e9d6[_0x2b6e31(0x267)]('\x0a'),_0x5bf688[_0x2b6e31(0x22e)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a51_0x4fe97f(0x200);[a51_0x4fe97f(0x1d6)]='List\x20workflow\x20execution\x20sessions';async[a51_0x4fe97f(0x1da)](_0x2aa591){const _0x4371aa=a51_0x4fe97f,{options:_0x5e73b2,args:_0xd8be31,tdx:_0x313475}=_0x2aa591,_0x8c5a0f=this[_0x4371aa(0x198)](_0xd8be31,_0x5e73b2);if(!_0x8c5a0f)return 0x1;const {projectName:_0x24c21e,workflowName:_0x100a75}=_0x8c5a0f;if(_0x5e73b2['verbose']){if(_0x24c21e&&_0x100a75)console[_0x4371aa(0x1fd)](_0x4371aa(0x18f)+_0x24c21e+'.'+_0x100a75);else _0x24c21e&&console[_0x4371aa(0x1fd)](_0x4371aa(0x203)+_0x24c21e);const _0x318ffe=_0x5e73b2[_0x4371aa(0x24e)];_0x318ffe&&console[_0x4371aa(0x1fd)]('Status:\x20'+_0x318ffe);}let _0x583f6b=0x28;if(process['stdout'][_0x4371aa(0x273)]&&!_0x5e73b2['output']&&!_0x5e73b2[_0x4371aa(0x12e)]){const _0x49947c=process[_0x4371aa(0x2b1)][_0x4371aa(0x1ec)]||0x28;_0x583f6b=Math[_0x4371aa(0x15b)](0x14,Math['floor'](_0x49947c*0x2/0x3));}const _0x138724=_0x5e73b2['limit']||_0x583f6b,_0x585ee8=await withSpinner(_0x4371aa(0x13a),()=>_0x313475[_0x4371aa(0x16b)][_0x4371aa(0x12f)]({'projectName':_0x24c21e,'workflowName':_0x100a75,'status':_0x5e73b2[_0x4371aa(0x24e)],'fromTime':_0x5e73b2['from'],'toTime':_0x5e73b2['to'],'limit':_0x138724}),{'verbose':_0x5e73b2[_0x4371aa(0x28e)]}),_0x4416cf=_0x585ee8[_0x4371aa(0x1ab)];_0x4416cf['sort']((_0x502f4a,_0x5aad7f)=>{const _0xab47c3=_0x4371aa,_0x2b7fc4=_0x502f4a[_0xab47c3(0x243)]||'',_0x1bba17=_0x5aad7f[_0xab47c3(0x243)]||'';return _0x1bba17[_0xab47c3(0x1ae)](_0x2b7fc4);});_0x4416cf[_0x4371aa(0x1a8)]>=_0x138724?console['error'](_0x4371aa(0x132)+_0x4416cf[_0x4371aa(0x1a8)]+'\x20sessions\x20'+a51_0x107aaa[_0x4371aa(0x19d)]('(use\x20--limit\x20to\x20see\x20more)')):console['error'](_0x4371aa(0x2a9)+_0x4416cf[_0x4371aa(0x1a8)]+'\x20session'+(_0x4416cf['length']!==0x1?'s':''));if(_0x5e73b2[_0x4371aa(0x12e)]==='json'||_0x5e73b2['format']===_0x4371aa(0x14a)||_0x5e73b2[_0x4371aa(0x12e)]==='table')await handleSDKOutput(_0x4416cf,_0x5e73b2);else{if(!process[_0x4371aa(0x2b1)][_0x4371aa(0x273)]||_0x5e73b2[_0x4371aa(0x22e)]){if(_0x4416cf[_0x4371aa(0x1a8)]===0x0){if(_0x24c21e&&_0x100a75)console[_0x4371aa(0x143)](_0x4371aa(0x264)+_0x24c21e+'.'+_0x100a75);else _0x24c21e?console['log'](_0x4371aa(0x148)+_0x24c21e):console['log'](_0x4371aa(0x294));}else{const _0x36ca52=_0x5e73b2['site'],_0x4e93f2=this[_0x4371aa(0x15f)](_0x4416cf,_0x36ca52);_0x5e73b2['output']?await writeOutput(_0x4e93f2,_0x5e73b2[_0x4371aa(0x22e)],_0x4371aa(0x28f)):console['log'](_0x4e93f2);}!_0x24c21e&&(console[_0x4371aa(0x1fd)](''),console[_0x4371aa(0x1fd)](a51_0x107aaa[_0x4371aa(0x19d)](_0x4371aa(0x295))),console['error'](a51_0x107aaa[_0x4371aa(0x19d)](_0x4371aa(0x1c1))+'or'+a51_0x107aaa[_0x4371aa(0x19d)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x4416cf['length']===0x0){if(_0x24c21e&&_0x100a75)console[_0x4371aa(0x143)](_0x4371aa(0x264)+_0x24c21e+'.'+_0x100a75);else _0x24c21e?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x24c21e):console[_0x4371aa(0x143)](_0x4371aa(0x294));}else await this['navigateSessionsInteractive'](_0x4416cf,_0x2aa591,_0x24c21e);}}return 0x0;}[a51_0x4fe97f(0x15f)](_0x23c422,_0x3c9804){const _0x110515=a51_0x4fe97f,_0x47a8be=[],_0x5a4865=new Map();let _0x13c9ba=Infinity,_0x1d453e=-Infinity;for(const _0x300502 of _0x23c422){if(_0x300502[_0x110515(0x1d8)]?.[_0x110515(0x234)]){const _0x3877e4=new Date(_0x300502[_0x110515(0x1d8)][_0x110515(0x234)])[_0x110515(0x1e8)](),_0x447e3b=_0x300502['lastAttempt']['finishedAt']?new Date(_0x300502[_0x110515(0x1d8)][_0x110515(0x21f)])['getTime']():Date['now'](),_0x354cc7=_0x300502['project']?.[_0x110515(0x19a)]||_0x110515(0x140);!_0x5a4865[_0x110515(0x145)](_0x354cc7)&&_0x5a4865['set'](_0x354cc7,[]),_0x5a4865['get'](_0x354cc7)[_0x110515(0x1ee)]({'session':_0x300502,'startTime':_0x3877e4,'endTime':_0x447e3b,'duration':_0x447e3b-_0x3877e4}),_0x13c9ba=Math[_0x110515(0x11b)](_0x13c9ba,_0x3877e4),_0x1d453e=Math['max'](_0x1d453e,_0x447e3b);}}if(_0x5a4865[_0x110515(0x193)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x42a04c=process[_0x110515(0x2b1)][_0x110515(0x1b1)]||0x78,_0x3125eb=0x1e,_0x41dabb=0x32,_0x461670=0x4,_0x242198=Math[_0x110515(0x11b)](_0x41dabb,Math[_0x110515(0x15b)](_0x3125eb,Math[_0x110515(0x219)](_0x42a04c*0.3))),_0x17c871=_0x42a04c-_0x242198-TIMELINE_CONFIG[_0x110515(0x265)]-0x3-_0x461670,_0x405a13=_0x1d453e-_0x13c9ba,_0x2578d1=_0x405a13/_0x242198,_0x36dbe4=renderTimeAxis({'startTime':_0x13c9ba,'endTime':_0x1d453e,'durationMs':_0x405a13,'msPerChar':_0x2578d1},_0x242198),_0x93e936=[];for(const _0x535c2d of _0x5a4865[_0x110515(0x18b)]()){_0x93e936[_0x110515(0x1ee)](..._0x535c2d);}_0x93e936[_0x110515(0x20c)]((_0x51169e,_0x12cb37)=>_0x12cb37[_0x110515(0x214)]-_0x51169e['startTime']);const _0x445f4d=new Date(_0x13c9ba),_0x4f6d41=formatDate(_0x445f4d),_0x27d7e4=_0x461670+TIMELINE_CONFIG[_0x110515(0x254)]+TIMELINE_CONFIG[_0x110515(0x156)]+_0x17c871,_0x2e7541='\x20'[_0x110515(0x1dd)](_0x27d7e4-_0x4f6d41['length']),_0x16f183=_0x2e7541+a51_0x107aaa[_0x110515(0x19d)](_0x4f6d41)+'\x20'+_0x36dbe4;_0x47a8be[_0x110515(0x1ee)](_0x16f183);const _0x146f62=0x16;let _0x1223dc=0x0;for(const _0x456e7b of _0x93e936){const _0x2394fa=_0x456e7b['session'][_0x110515(0x104)]?.[_0x110515(0x19a)]||'?',_0x53c5e2=Math[_0x110515(0x11b)](stringWidth(_0x2394fa),_0x146f62);_0x1223dc=Math['max'](_0x1223dc,_0x53c5e2);}for(const _0x92078 of _0x93e936){const {session:_0x518eea,startTime:_0x1433c1,endTime:_0x3c6695,duration:_0x54912b}=_0x92078,_0x4dc8db=_0x518eea['project']?.['id'],_0x5eaceb=_0x518eea['id'],_0x183997=_0x518eea[_0x110515(0x104)]?.[_0x110515(0x19a)]||'?',_0x4ef216=_0x518eea[_0x110515(0x16b)]?.[_0x110515(0x19a)]||'?';let _0x58e16b,_0x423746;if(_0x518eea[_0x110515(0x1d8)]){const _0x5507cc=_0x518eea[_0x110515(0x1d8)];!_0x5507cc[_0x110515(0x1bb)]?(_0x58e16b=_0x5507cc[_0x110515(0x13d)]?'🛑':'🔄',_0x423746=_0x5507cc[_0x110515(0x13d)]?a51_0x107aaa[_0x110515(0x2a5)]:a51_0x107aaa[_0x110515(0x1b2)]):(_0x58e16b=_0x5507cc[_0x110515(0x24d)]?'✅':'❌',_0x423746=_0x5507cc['success']?a51_0x107aaa[_0x110515(0x25f)]:a51_0x107aaa[_0x110515(0x26f)]);}else _0x58e16b='⏳',_0x423746=a51_0x107aaa[_0x110515(0x19d)];const _0x51474d='#'+_0x5eaceb,_0x4f96dc=_0x4dc8db?hyperlink(_0x51474d,getWorkflowSessionUrl(_0x3c9804,_0x4dc8db,_0x5eaceb)):_0x51474d;let _0x4a2553=_0x183997;stringWidth(_0x183997)>_0x146f62&&(_0x4a2553=_0x183997['slice'](0x0,_0x146f62-0x1)+'…');const _0x155974=a51_0x107aaa[_0x110515(0x19d)](_0x4a2553),_0x11bbdb=stringWidth(_0x4a2553),_0x56fe10='\x20'[_0x110515(0x1dd)](_0x1223dc-stringWidth(_0x4a2553)+0x2),_0x1944b9='('+formatElapsed(_0x54912b)+')',_0x22daf1=stringWidth(_0x1944b9),_0x108937=stringWidth(_0x51474d),_0x28c873=_0x108937+0x1+_0x11bbdb+_0x56fe10['length'],_0x5543c9=_0x17c871-_0x28c873-_0x22daf1-0x1-0x8;let _0x1812b2=_0x4ef216;stringWidth(_0x1812b2)>_0x5543c9&&(_0x1812b2=_0x1812b2[_0x110515(0x154)](0x0,_0x5543c9-0x1)+'…');const _0x10f087=_0x4f96dc+'\x20'+_0x155974+_0x56fe10+_0x1812b2,_0x453732=stringWidth(_0x10f087),_0x1f5cc6=_0x17c871-_0x453732-_0x22daf1,_0x24569e=_0x10f087+'\x20'[_0x110515(0x1dd)](Math['max'](0x1,_0x1f5cc6))+a51_0x107aaa[_0x110515(0x19d)](_0x1944b9),_0x5f2318=Math[_0x110515(0x219)]((_0x1433c1-_0x13c9ba)/_0x2578d1),_0x12eb87=Math[_0x110515(0x219)]((_0x3c6695-_0x13c9ba)/_0x2578d1),_0x260d51=Math['max'](_0x5f2318+0x1,_0x12eb87),_0x3bea48=new Array(_0x242198)[_0x110515(0x27f)]('\x20');for(let _0x3a5a8f=_0x5f2318;_0x3a5a8f<Math['min'](_0x260d51,_0x242198);_0x3a5a8f++){_0x3bea48[_0x3a5a8f]='─';}const _0x1be0dd=_0x3bea48['map'](_0x45a0e5=>_0x45a0e5==='\x20'?'\x20':_0x423746(_0x45a0e5))[_0x110515(0x267)]('');_0x47a8be['push'](_0x58e16b+'\x20'+_0x24569e+'│'+_0x1be0dd+'│');}return _0x47a8be[_0x110515(0x267)]('\x0a');}async['navigateSessionsInteractive'](_0x194c3f,_0x33fa8f,_0x13d300){const _0x37ded6=a51_0x4fe97f,{options:_0x5134e1,tdx:_0xc715fb}=_0x33fa8f,_0x4030e2=_0x5134e1[_0x37ded6(0x248)],{timelineRows:_0x368e91,timeAxisHeader:_0x57a855}=this[_0x37ded6(0x238)](_0x194c3f,_0x4030e2),_0x412340=_0x368e91[_0x37ded6(0x1db)](_0x1f656a=>_0x1f656a[_0x37ded6(0x249)]);if(_0x412340[_0x37ded6(0x1a8)]===0x0){const _0x4af91d=this[_0x37ded6(0x15f)](_0x194c3f,_0x4030e2);console[_0x37ded6(0x143)](_0x4af91d);!_0x13d300&&(console[_0x37ded6(0x1fd)](''),console[_0x37ded6(0x1fd)](a51_0x107aaa[_0x37ded6(0x19d)](_0x37ded6(0x295))),console['error'](a51_0x107aaa[_0x37ded6(0x19d)](_0x37ded6(0x1c1))+'or'+a51_0x107aaa[_0x37ded6(0x19d)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x57a855&&console[_0x37ded6(0x143)](_0x57a855);const _0x2eb814=_0x368e91['filter'](_0x4ead20=>_0x4ead20[_0x37ded6(0x249)])[_0x37ded6(0x1eb)](_0x59042c=>({'title':_0x59042c[_0x37ded6(0x2a2)],'value':_0x59042c[_0x37ded6(0x249)]})),_0x11f4e7=process[_0x37ded6(0x2b1)]['rows']||0x3c,_0x1f23f9=Math[_0x37ded6(0x15b)](0x28,Math['floor'](_0x11f4e7*0x2/0x3)),_0x51f003=await a51_0x8f4c4c({'type':_0x37ded6(0x29f),'name':_0x37ded6(0x249),'message':_0x37ded6(0x29c),'choices':_0x2eb814,'initial':-0x1,'limit':_0x1f23f9,'clearFirst':!![],'fallback':{'title':_0x37ded6(0x274),'value':null},'suggest':(_0x57727a,_0x27a959)=>{const _0x3feb2d=_0x37ded6;if(!_0x57727a)return Promise[_0x3feb2d(0x137)](_0x27a959);const _0x4ef6f2=_0x27a959[_0x3feb2d(0x1db)](_0x36688a=>{const _0x134654=_0x3feb2d,_0x1536d0=_0x36688a;return _0x1536d0['title'][_0x134654(0x13c)]()[_0x134654(0x12a)](_0x57727a[_0x134654(0x13c)]());});return Promise['resolve'](_0x4ef6f2);}}),_0x536230=()=>{const _0x536162=_0x37ded6;process[_0x536162(0x2b1)]['write'](_0x536162(0x1b3)),process['stdout'][_0x536162(0x1f4)](_0x536162(0x1b3)),process['stdout']['write'](_0x536162(0x1b3));},_0x1c2788=_0x51f003&&_0x51f003['attemptId']&&_0x51f003[_0x37ded6(0x249)]!==null&&_0x51f003[_0x37ded6(0x249)][_0x37ded6(0x22d)]()!=='';if(!_0x1c2788){_0x536230(),console[_0x37ded6(0x143)](a51_0x107aaa[_0x37ded6(0x19d)]('Cancelled'));return;}_0x536230();const _0x4ca423=_0x194c3f[_0x37ded6(0x1ff)](_0x1d39c5=>_0x1d39c5[_0x37ded6(0x1d8)]?.['id']===_0x51f003[_0x37ded6(0x249)]);if(_0x4ca423){const _0x259c98=_0x4ca423[_0x37ded6(0x104)]?.[_0x37ded6(0x19a)]||'?',_0x3948d6=_0x4ca423[_0x37ded6(0x16b)]?.[_0x37ded6(0x19a)]||'?';console[_0x37ded6(0x143)](_0x37ded6(0x2ad)+a51_0x107aaa[_0x37ded6(0x19d)](_0x259c98)+_0x37ded6(0x215)+a51_0x107aaa['dim'](_0x3948d6));}const _0x53375e=new WorkflowTimelineCommand();await _0x53375e[_0x37ded6(0x1da)]({'args':[],'options':{..._0x5134e1,'attemptId':_0x51f003[_0x37ded6(0x249)]},'tdx':_0xc715fb});}[a51_0x4fe97f(0x238)](_0x18c114,_0x2f73f5){const _0x1bc0a3=a51_0x4fe97f,_0xebda68=new Map();for(const _0x1d696c of _0x18c114){_0x1d696c['id']&&_0x1d696c[_0x1bc0a3(0x1d8)]?.['id']&&_0xebda68[_0x1bc0a3(0x1d7)](_0x1d696c['id'],_0x1d696c[_0x1bc0a3(0x1d8)]['id']);}const _0x4f272c=[];let _0xf1ceef='';const _0x48b836=this[_0x1bc0a3(0x15f)](_0x18c114,_0x2f73f5),_0x20c08b=_0x48b836[_0x1bc0a3(0x2a0)]('\x0a');for(const _0x125d47 of _0x20c08b){if(_0x125d47[_0x1bc0a3(0x229)](_0x1bc0a3(0x23e))||_0x125d47[_0x1bc0a3(0x237)](/^\s+\d{4}-\d{2}-\d{2}/))_0xf1ceef=_0x125d47;else{if(_0x125d47[_0x1bc0a3(0x237)](/^[✅❌🔄🛑⏳]/)){const _0x40098d=_0x125d47[_0x1bc0a3(0x237)](/#(\d+)/),_0x50eb6b=_0x40098d?_0x40098d[0x1]:null,_0xcee7c6=_0x50eb6b?_0xebda68[_0x1bc0a3(0x246)](_0x50eb6b)||null:null,_0x2a96fd=_0x18c114[_0x1bc0a3(0x1ff)](_0x1c3ea9=>_0x1c3ea9['id']===_0x50eb6b),_0x150520=_0x2a96fd?.[_0x1bc0a3(0x104)]?.[_0x1bc0a3(0x19a)]||'';_0x4f272c[_0x1bc0a3(0x1ee)]({'displayLine':_0x125d47,'attemptId':_0xcee7c6,'projectName':_0x150520});}}}return{'timelineRows':_0x4f272c,'timeAxisHeader':_0xf1ceef};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x231);['description']=a51_0x4fe97f(0x212);async[a51_0x4fe97f(0x1da)](_0x5c36b0){const _0x848de4=a51_0x4fe97f,{options:_0x4a2de2,args:_0x3dfdbd,tdx:_0x1af97b}=_0x5c36b0,_0x3abb61=this[_0x848de4(0x198)](_0x3dfdbd,_0x4a2de2);if(!_0x3abb61)return 0x1;const {projectName:_0x5a61f3,workflowName:_0x417fd2}=_0x3abb61,_0x1f1055=_0x4a2de2[_0x848de4(0x11a)];if(_0x4a2de2['verbose']){if(_0x5a61f3&&_0x417fd2)console[_0x848de4(0x1fd)](_0x848de4(0x18f)+_0x5a61f3+'.'+_0x417fd2);else _0x5a61f3&&console[_0x848de4(0x1fd)](_0x848de4(0x203)+_0x5a61f3);_0x1f1055&&console['error'](_0x848de4(0x1b5));}const _0x5c45e3=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x1af97b[_0x848de4(0x16b)][_0x848de4(0x1ad)]({'projectName':_0x5a61f3,'workflowName':_0x417fd2,'includeRetried':_0x1f1055,'limit':_0x4a2de2[_0x848de4(0x184)]}),{'verbose':_0x4a2de2['verbose']}),_0x15b8de=_0x5c45e3[_0x848de4(0x1ab)],_0x269e71=_0x4a2de2[_0x848de4(0x184)]||0x64,_0x35faca=_0x15b8de[_0x848de4(0x1a8)]>=_0x269e71?a51_0x107aaa['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x848de4(0x1fd)](_0x848de4(0x2a9)+_0x15b8de[_0x848de4(0x1a8)]+_0x848de4(0x257)+(_0x15b8de['length']!==0x1?'s':'')+_0x35faca);if(_0x4a2de2[_0x848de4(0x12e)]===_0x848de4(0x18e)||_0x4a2de2[_0x848de4(0x12e)]===_0x848de4(0x14a)||_0x4a2de2[_0x848de4(0x12e)]===_0x848de4(0x256))await handleSDKOutput(_0x15b8de,_0x4a2de2);else{if(_0x15b8de[_0x848de4(0x1a8)]===0x0){if(_0x5a61f3&&_0x417fd2)console[_0x848de4(0x143)](_0x848de4(0x14f)+_0x5a61f3+'.'+_0x417fd2);else _0x5a61f3?console[_0x848de4(0x143)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x5a61f3):console[_0x848de4(0x143)](_0x848de4(0x244));}else{const _0x107bd6=_0x4a2de2[_0x848de4(0x248)],_0x23a763=_0x15b8de['map'](_0x47190c=>{const _0x2d89a3=_0x848de4,_0x10c7e5=a51_0x107aaa['dim']('#'+_0x47190c['id']),_0x3e5a65=_0x47190c['project']?.['id'],_0x20f31d=_0x47190c[_0x2d89a3(0x1d1)]||_0x47190c[_0x2d89a3(0x15e)],_0x495afa=_0x3e5a65&&_0x20f31d?hyperlink(_0x10c7e5,getWorkflowAttemptUrl(_0x107bd6,_0x3e5a65,_0x20f31d,_0x47190c['id'])):_0x10c7e5,{icon:_0x2c9b33,text:_0x4346c1}=getAttemptStatusDisplay(_0x47190c),_0x28518f=(_0x47190c[_0x2d89a3(0x104)]?.['name']||'?')+'.'+(_0x47190c[_0x2d89a3(0x16b)]?.['name']||'?'),_0x5886f7=_0x47190c['sessionTime']?a51_0x107aaa[_0x2d89a3(0x19d)](_0x47190c[_0x2d89a3(0x243)]):'';return(_0x495afa+'\x20'+_0x2c9b33+(_0x4346c1?'\x20'+_0x4346c1:'')+'\x20'+_0x28518f+'\x20'+_0x5886f7)[_0x2d89a3(0x29e)]();});await writeOutput(_0x23a763[_0x848de4(0x267)]('\x0a'),_0x4a2de2[_0x848de4(0x22e)],_0x848de4(0x28f));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x1b9);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x19e);async[a51_0x4fe97f(0x1da)](_0x498d78){const _0x3aa759=a51_0x4fe97f,{options:_0x156262,args:_0x194db3,tdx:_0x3c4293}=_0x498d78,_0x11071e=_0x194db3[0x0];if(!_0x11071e)return console[_0x3aa759(0x1fd)](_0x3aa759(0x171)),0x1;_0x156262[_0x3aa759(0x28e)]&&console[_0x3aa759(0x1fd)](_0x3aa759(0x120)+_0x11071e);const _0x1d1ab0=await withSpinner(_0x3aa759(0x1a2),()=>_0x3c4293[_0x3aa759(0x16b)]['attempt'](_0x11071e),{'verbose':_0x156262['verbose']}),_0x3df4f8=_0x1d1ab0['data'];let _0x2cf057;!_0x3df4f8[_0x3aa759(0x1bb)]?_0x2cf057=_0x3df4f8[_0x3aa759(0x13d)]?'canceling':_0x3aa759(0x1e3):_0x2cf057=_0x3df4f8['success']?_0x3aa759(0x24d):_0x3aa759(0x1fd);let _0x3320f4;if(_0x3df4f8[_0x3aa759(0x234)]&&_0x3df4f8[_0x3aa759(0x21f)]){const _0x347646=new Date(_0x3df4f8[_0x3aa759(0x234)])['getTime'](),_0x12650b=new Date(_0x3df4f8[_0x3aa759(0x21f)])[_0x3aa759(0x1e8)]();_0x3320f4=Math['round']((_0x12650b-_0x347646)/0x3e8);}const _0x499cb8={'attempt_id':_0x3df4f8['id'],'status':_0x2cf057,..._0x3df4f8[_0x3aa759(0x1df)]!==undefined&&{'index':_0x3df4f8[_0x3aa759(0x1df)]},..._0x3df4f8[_0x3aa759(0x104)]&&{'project':_0x3df4f8[_0x3aa759(0x104)][_0x3aa759(0x19a)]},..._0x3df4f8[_0x3aa759(0x16b)]&&{'workflow':_0x3df4f8[_0x3aa759(0x16b)]['name']},..._0x3df4f8['sessionId']&&{'session_id':_0x3df4f8[_0x3aa759(0x15e)]},..._0x3df4f8[_0x3aa759(0x243)]&&{'session_time':_0x3df4f8[_0x3aa759(0x243)]},..._0x3df4f8[_0x3aa759(0x118)]&&{'retry_attempt':_0x3df4f8['retryAttemptName']},..._0x3320f4!==undefined&&{'duration_sec':_0x3320f4},..._0x3df4f8[_0x3aa759(0x234)]&&{'created_at':_0x3df4f8['createdAt']},..._0x3df4f8['finishedAt']&&{'finished_at':_0x3df4f8[_0x3aa759(0x21f)]},...Object[_0x3aa759(0x276)](_0x3df4f8['params'])[_0x3aa759(0x1a8)]>0x0&&{'params':_0x3df4f8[_0x3aa759(0x22f)]}};return await handleSingleObjectOutput(_0x499cb8,_0x156262),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]='workflow:tasks';[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x1f6);async[a51_0x4fe97f(0x1da)](_0x404ee5){const _0x3abe90=a51_0x4fe97f,{options:_0x4e6a9c,args:_0x473276,tdx:_0x1ab0a4}=_0x404ee5,_0x1e1378=_0x473276[0x0];if(!_0x1e1378)return console['error'](_0x3abe90(0x171)),0x1;const _0x4c9726=_0x4e6a9c[_0x3abe90(0x164)];_0x4e6a9c[_0x3abe90(0x28e)]&&(console['error'](_0x3abe90(0x120)+_0x1e1378),_0x4c9726&&console['error'](_0x3abe90(0x117)));const _0x4fd8ed=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x1ab0a4[_0x3abe90(0x16b)][_0x3abe90(0x153)](_0x1e1378,_0x4c9726||![]),{'verbose':_0x4e6a9c['verbose']}),_0x22894a=_0x4fd8ed[_0x3abe90(0x1ab)];return console[_0x3abe90(0x1fd)]('✔\x20Found\x20'+_0x22894a['length']+'\x20task'+(_0x22894a[_0x3abe90(0x1a8)]!==0x1?'s':'')),await handleSDKOutput(_0x22894a,_0x4e6a9c),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x12c);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x233);async['execute'](_0x39a300){const _0x420677=a51_0x4fe97f,{options:_0x562dac,args:_0x44dc0c,tdx:_0xa99521}=_0x39a300,_0x2ae2fa=_0x44dc0c[0x0];let _0x47162e=_0x44dc0c[0x1];if(!_0x2ae2fa)return console[_0x420677(0x1fd)](_0x420677(0x171)),0x1;_0x562dac[_0x420677(0x28e)]&&(console[_0x420677(0x1fd)]('Attempt\x20ID:\x20'+_0x2ae2fa),_0x47162e&&console[_0x420677(0x1fd)](_0x420677(0x277)+_0x47162e));const _0x2c4cf1=await withSpinner(_0x420677(0x25b),()=>_0xa99521['workflow'][_0x420677(0x11d)](_0x2ae2fa,_0x47162e),{'verbose':_0x562dac[_0x420677(0x28e)]}),_0x2d3694=_0x2c4cf1[_0x420677(0x1ab)];if(_0x2d3694[_0x420677(0x1a8)]===0x0)return console[_0x420677(0x1fd)](_0x420677(0x129)),0x0;if(!_0x47162e&&(_0x562dac[_0x420677(0x18e)]||_0x562dac['format']))return await handleSDKOutput(_0x2d3694,_0x562dac),0x0;if(!_0x47162e){const _0x4571fa=_0x2d3694[_0x420677(0x1eb)](_0x59c702=>({'title':_0x59c702[_0x420677(0x126)]+'\x20('+formatBytes(_0x59c702[_0x420677(0x10d)])+')','value':_0x59c702['taskName']})),_0xf0148c=await a51_0x8f4c4c({'type':'select','name':_0x420677(0x1f7),'message':_0x420677(0x221),'choices':_0x4571fa});if(!_0xf0148c['task'])return console[_0x420677(0x1fd)](_0x420677(0x222)),0x0;_0x47162e=_0xf0148c[_0x420677(0x1f7)];}const _0x2ed6c0=await withSpinner('Downloading\x20logs...',()=>_0xa99521[_0x420677(0x16b)][_0x420677(0xff)](_0x2ae2fa,_0x47162e),{'verbose':_0x562dac[_0x420677(0x28e)]}),_0x516672=_0x2ed6c0['data'];return _0x516672?console[_0x420677(0x143)](_0x516672):console['error'](_0x420677(0x27d)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]='workflow:kill';[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x1d3);async[a51_0x4fe97f(0x1da)](_0x4865b6){const _0x461e11=a51_0x4fe97f,{options:_0x399695,args:_0x4b25d6,tdx:_0x1036a5}=_0x4865b6,_0x564e57=_0x4b25d6[0x0];if(!_0x564e57)return console[_0x461e11(0x1fd)](_0x461e11(0x171)),0x1;const _0x4217e5=_0x399695[_0x461e11(0x130)];_0x399695['verbose']&&(console[_0x461e11(0x1fd)](_0x461e11(0x120)+_0x564e57),_0x4217e5&&console[_0x461e11(0x1fd)](_0x461e11(0x176)+_0x4217e5));if(!_0x399695[_0x461e11(0x22c)]){if(!isInteractive())return console[_0x461e11(0x1fd)](a51_0x107aaa[_0x461e11(0x26f)](_0x461e11(0x14b)),_0x461e11(0x263)),console[_0x461e11(0x1fd)](a51_0x107aaa[_0x461e11(0x19d)](_0x461e11(0x255))),0x1;const _0x103e60=await confirmKey(_0x461e11(0x135)+_0x564e57+'?');if(!_0x103e60)return console['error'](a51_0x107aaa[_0x461e11(0x2a5)](_0x461e11(0x222))),0x1;}const _0x1d348a=await withSpinner(_0x461e11(0x1e1),()=>_0x1036a5[_0x461e11(0x16b)][_0x461e11(0x26d)](_0x564e57,_0x4217e5),{'verbose':_0x399695['verbose']}),_0x5ce223=_0x1d348a[_0x461e11(0x1ab)];return console[_0x461e11(0x1fd)]('✔\x20'+_0x5ce223),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x288);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x12b);async['execute'](_0x28a923){const _0xd81b75=a51_0x4fe97f,{options:_0x1fd17a,args:_0x295163,tdx:_0x5a32a7}=_0x28a923,_0x2d597d=_0x295163[0x0];if(!_0x2d597d)return console[_0xd81b75(0x1fd)](_0xd81b75(0x158)),console['error'](_0xd81b75(0x2a4)),0x1;let _0x35bb23=![],_0x1a886d=_0x2d597d;if(_0x2d597d[_0xd81b75(0x229)](_0xd81b75(0x25a)))_0x35bb23=!![],_0x1a886d=_0x2d597d[_0xd81b75(0x16f)](0x8);else{if(_0x2d597d[_0xd81b75(0x229)](_0xd81b75(0x261)))_0x35bb23=![],_0x1a886d=_0x2d597d[_0xd81b75(0x16f)](0x8);else return console[_0xd81b75(0x1fd)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x10c3a9=_0x1fd17a[_0xd81b75(0x20d)],_0x2cf4ee=_0x1fd17a['resumeFrom'],_0x268e36=_0x1fd17a[_0xd81b75(0x22f)],_0x403264=_0x1fd17a[_0xd81b75(0x19b)];_0x1fd17a[_0xd81b75(0x28e)]&&(console[_0xd81b75(0x1fd)](_0xd81b75(0x201)+(_0x35bb23?'session':_0xd81b75(0x23b))+'\x20'+_0x1a886d),_0x10c3a9&&console[_0xd81b75(0x1fd)]('From\x20task:\x20'+_0x10c3a9),_0x2cf4ee&&console[_0xd81b75(0x1fd)](_0xd81b75(0x27b)+_0x2cf4ee),_0x268e36&&console[_0xd81b75(0x1fd)](_0xd81b75(0x2a6)+_0x268e36),_0x403264&&console['error'](_0xd81b75(0x22b)));let _0x45c249;if(_0x268e36)try{if(_0x268e36[_0xd81b75(0x229)]('@')){const _0x262382=await import(_0xd81b75(0x1ac)),_0x3a07bd=_0x268e36['substring'](0x1),_0x194b6b=await _0x262382['readFile'](_0x3a07bd,_0xd81b75(0x24a));_0x45c249=JSON[_0xd81b75(0x225)](_0x194b6b);}else _0x45c249=JSON[_0xd81b75(0x225)](_0x268e36);}catch{return console[_0xd81b75(0x1fd)](_0xd81b75(0x1fe)),0x1;}if(!_0x1fd17a['yes']){if(!isInteractive())return console[_0xd81b75(0x1fd)](a51_0x107aaa[_0xd81b75(0x26f)]('\x0aError:'),_0xd81b75(0x263)),console[_0xd81b75(0x1fd)](a51_0x107aaa['dim'](_0xd81b75(0x255))),0x1;const _0x39278c=await confirmKey(_0xd81b75(0x165)+(_0x35bb23?'session':'attempt')+'\x20'+_0x1a886d+'?');if(!_0x39278c)return console[_0xd81b75(0x1fd)](a51_0x107aaa[_0xd81b75(0x2a5)]('Cancelled')),0x1;}let _0x3df910;_0x35bb23?_0x3df910=await withSpinner(_0xd81b75(0x270),()=>_0x5a32a7[_0xd81b75(0x16b)]['retrySession'](_0x1a886d,{'fromTask':_0x10c3a9,'retryParams':_0x45c249}),{'verbose':_0x1fd17a[_0xd81b75(0x28e)]}):_0x3df910=await withSpinner(_0xd81b75(0x224),()=>_0x5a32a7[_0xd81b75(0x16b)]['retryAttempt'](_0x1a886d,{'resumeFrom':_0x2cf4ee,'retryParams':_0x45c249,'force':_0x403264}),{'verbose':_0x1fd17a[_0xd81b75(0x28e)]});const _0x26f9b3=_0x3df910['data'];return console[_0xd81b75(0x1fd)](_0xd81b75(0x29a)),console[_0xd81b75(0x1fd)](_0xd81b75(0x17d)+_0x26f9b3[_0xd81b75(0x249)]),console[_0xd81b75(0x1fd)]('\x20\x20Session\x20ID:\x20'+_0x26f9b3['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x1aa);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x2af);async[a51_0x4fe97f(0x1da)](_0x2a096c){const _0x3e4632=a51_0x4fe97f,{options:_0x113f3a,args:_0x9aba35,tdx:_0x31b526}=_0x2a096c;let _0x39408b=_0x9aba35[0x0];if(!_0x39408b){const _0x1c2304=this[_0x3e4632(0x185)]([],_0x113f3a),_0x78cd71=await withSpinner('Loading\x20workflows...',()=>_0x31b526['workflow'][_0x3e4632(0x298)](_0x1c2304,{'limit':_0x113f3a[_0x3e4632(0x184)]}),{'verbose':_0x113f3a[_0x3e4632(0x28e)]}),_0x350f26=_0x78cd71['data'];if(_0x350f26[_0x3e4632(0x1a8)]===0x0)return console[_0x3e4632(0x1fd)]('No\x20workflows\x20found'),!_0x1c2304&&console[_0x3e4632(0x1fd)](a51_0x107aaa['dim'](_0x3e4632(0x16a))),0x1;const _0x3d0586=_0x350f26[_0x3e4632(0x1eb)](_0x283222=>({'title':_0x283222[_0x3e4632(0x104)]?.[_0x3e4632(0x19a)]+'.'+_0x283222[_0x3e4632(0x19a)],'value':_0x283222['project']?.['name']+'.'+_0x283222[_0x3e4632(0x19a)],'description':_0x283222[_0x3e4632(0x1d5)]?'revision:\x20'+_0x283222['revision']:undefined})),_0x597887=await a51_0x8f4c4c({'type':_0x3e4632(0x245),'name':_0x3e4632(0x16b),'message':_0x3e4632(0x1e9),'choices':_0x3d0586});if(!_0x597887['workflow'])return 0x1;_0x39408b=_0x597887['workflow'];}if(!_0x39408b['includes']('.')){const _0x5045a0=this[_0x3e4632(0x185)]([],_0x113f3a);if(_0x5045a0)_0x39408b=_0x5045a0+'.'+_0x39408b;else return console[_0x3e4632(0x1fd)](a51_0x107aaa[_0x3e4632(0x26f)]('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x3e4632(0x1fd)](a51_0x107aaa[_0x3e4632(0x19d)](_0x3e4632(0x16a))),0x1;}const _0x34540e=_0x113f3a[_0x3e4632(0x262)],_0x5c1ce2=_0x113f3a['sessionTime'],_0x3a0e04={};if(_0x34540e&&Array['isArray'](_0x34540e))for(const _0x32a2f9 of _0x34540e){const _0x45aaaf=_0x32a2f9['indexOf']('=');if(_0x45aaaf===-0x1)return console['error'](_0x3e4632(0x161)+_0x32a2f9),console['error'](_0x3e4632(0x1c9)),0x1;const _0x19606c=_0x32a2f9[_0x3e4632(0x16f)](0x0,_0x45aaaf),_0x440b15=_0x32a2f9[_0x3e4632(0x16f)](_0x45aaaf+0x1);try{_0x3a0e04[_0x19606c]=JSON[_0x3e4632(0x225)](_0x440b15);}catch{_0x3a0e04[_0x19606c]=_0x440b15;}}_0x113f3a['verbose']&&(console[_0x3e4632(0x1fd)](_0x3e4632(0x1f5)+_0x39408b),Object[_0x3e4632(0x276)](_0x3a0e04)[_0x3e4632(0x1a8)]>0x0&&console[_0x3e4632(0x1fd)](_0x3e4632(0x179)+JSON[_0x3e4632(0x182)](_0x3a0e04)),_0x5c1ce2&&console['error'](_0x3e4632(0x136)+_0x5c1ce2));const _0x2c6b73=await withSpinner('Starting\x20workflow\x20run...',()=>_0x31b526['workflow']['run'](_0x39408b,_0x3a0e04,{'sessionTime':_0x5c1ce2}),{'verbose':_0x113f3a[_0x3e4632(0x28e)]}),_0x2a25fc=_0x2c6b73[_0x3e4632(0x1ab)];console[_0x3e4632(0x1fd)]('✔\x20Workflow\x20run\x20started'),console[_0x3e4632(0x1fd)]('\x20\x20Attempt\x20ID:\x20'+_0x2a25fc['id']),console['error'](_0x3e4632(0x172)+_0x2a25fc[_0x3e4632(0x15e)]),console['error'](_0x3e4632(0x10b)+_0x2a25fc[_0x3e4632(0x104)]?.[_0x3e4632(0x19a)]),console[_0x3e4632(0x1fd)](_0x3e4632(0x170)+_0x2a25fc[_0x3e4632(0x16b)]?.[_0x3e4632(0x19a)]);if(_0x2a25fc[_0x3e4632(0x104)]?.['id']&&_0x2a25fc[_0x3e4632(0x15e)]&&_0x2a25fc['id']){const _0x5418f3=_0x113f3a[_0x3e4632(0x248)],_0x3a487b=getConsoleUrl(_0x5418f3,_0x3e4632(0x2a8)+_0x2a25fc[_0x3e4632(0x104)]['id']+_0x3e4632(0x1b6)+_0x2a25fc[_0x3e4632(0x15e)]+_0x3e4632(0x1c0)+_0x2a25fc['id']);console[_0x3e4632(0x1fd)](_0x3e4632(0x235)+a51_0x107aaa[_0x3e4632(0x1dc)](_0x3a487b));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a51_0x4fe97f(0x283);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x292);async[a51_0x4fe97f(0x1da)](_0x48428f){const _0x1e17fb=a51_0x4fe97f,{options:_0x2c4fec,args:_0x49f9a5,tdx:_0x17fbb7}=_0x48428f,_0x1b8fef=_0x49f9a5[0x0],_0xadf8ed=_0x49f9a5[0x1]||'.';if(!_0x1b8fef)return console['error'](_0x1e17fb(0x12d)),console[_0x1e17fb(0x1fd)](_0x1e17fb(0x2a7)),0x1;const _0x510c5a=_0x2c4fec[_0x1e17fb(0x1d5)];_0x2c4fec[_0x1e17fb(0x28e)]&&(console[_0x1e17fb(0x1fd)](_0x1e17fb(0x2ad)+_0x1b8fef),console[_0x1e17fb(0x1fd)](_0x1e17fb(0x28d)+_0xadf8ed),_0x510c5a&&console['error'](_0x1e17fb(0x189)+_0x510c5a));const _0xad003d=await withSpinner(_0x1e17fb(0x1ce)+_0x1b8fef+'...',()=>_0x17fbb7['workflow'][_0x1e17fb(0x1c3)](_0x1b8fef,_0xadf8ed,{'revision':_0x510c5a}),{'verbose':_0x2c4fec[_0x1e17fb(0x28e)]}),_0x561053=_0xad003d[_0x1e17fb(0x1ab)];return console['error'](_0x1e17fb(0x15a)+_0x561053[_0x1e17fb(0x1d2)]),console[_0x1e17fb(0x1fd)]('\x20\x20Revision:\x20'+_0x561053[_0x1e17fb(0x1d5)]),console[_0x1e17fb(0x1fd)](_0x1e17fb(0x1cc)+_0x561053[_0x1e17fb(0x1e7)]),console[_0x1e17fb(0x1fd)](_0x1e17fb(0x100)+_0xadf8ed+'/'+_0x561053[_0x1e17fb(0x1d2)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x197);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x1ba);async[a51_0x4fe97f(0x1da)](_0x595fac){const _0x455caa=a51_0x4fe97f,{options:_0x2d211e,args:_0x33279e,tdx:_0x4207e0}=_0x595fac;let _0x5794c2='.',_0x5687dc=_0x2d211e['name'];if(_0x33279e[0x0]){const {promises:_0x1bab7d}=await import('fs');try{const _0x41e918=await _0x1bab7d[_0x455caa(0x114)](_0x33279e[0x0]);if(_0x41e918['isDirectory']())_0x5794c2=_0x33279e[0x0];else return console[_0x455caa(0x1fd)](_0x455caa(0x27a)+_0x33279e[0x0]+_0x455caa(0x17b)),0x1;}catch{_0x5687dc=_0x33279e[0x0],_0x5794c2='.';}}const _0x27063c=_0x2d211e[_0x455caa(0x1d5)],_0x235cd6=_0x2d211e[_0x455caa(0x271)];_0x2d211e[_0x455caa(0x28e)]&&(console['error'](_0x455caa(0x107)+_0x5794c2),_0x5687dc&&console[_0x455caa(0x1fd)](_0x455caa(0x269)+_0x5687dc),_0x27063c&&console[_0x455caa(0x1fd)]('Revision:\x20'+_0x27063c),_0x235cd6&&console['error']('Validation:\x20skipped'));const _0x2990de=await withSpinner(_0x455caa(0x138),()=>_0x4207e0[_0x455caa(0x16b)]['push'](_0x5794c2,{'projectName':_0x5687dc,'revision':_0x27063c,'skipValidation':_0x235cd6}),{'verbose':_0x2d211e[_0x455caa(0x28e)]}),_0x4622f4=_0x2990de[_0x455caa(0x1ab)];return console[_0x455caa(0x1fd)](_0x455caa(0x1a6)+_0x4622f4['projectName']),console['error'](_0x455caa(0x25c)+_0x4622f4[_0x455caa(0x26c)]),console['error']('\x20\x20Revision:\x20'+_0x4622f4['revision']),await this[_0x455caa(0x239)](_0x4207e0,_0x4622f4['projectName'],_0x2d211e[_0x455caa(0x248)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x173);['description']=a51_0x4fe97f(0x15d);async[a51_0x4fe97f(0x1da)](_0x9a143a){const _0x2ff6da=a51_0x4fe97f,{options:_0x2644d1,args:_0x268fb1,tdx:_0x4085d3}=_0x9a143a,_0x3cc8e3=_0x268fb1[0x0],_0x223530=_0x268fb1[0x1];if(!_0x3cc8e3)return console[_0x2ff6da(0x1fd)](a51_0x107aaa['red'](_0x2ff6da(0x147)),_0x2ff6da(0x109)),console['error'](a51_0x107aaa[_0x2ff6da(0x19d)](_0x2ff6da(0x252))),0x1;const _0x2bb5b9=_0x2644d1['revision'];_0x2644d1['verbose']&&(console[_0x2ff6da(0x1fd)](_0x2ff6da(0x2ad)+_0x3cc8e3),_0x223530&&console[_0x2ff6da(0x1fd)](_0x2ff6da(0x209)+_0x223530),_0x2bb5b9&&console[_0x2ff6da(0x1fd)](_0x2ff6da(0x189)+_0x2bb5b9),_0x2644d1[_0x2ff6da(0x22a)]&&console[_0x2ff6da(0x1fd)](_0x2ff6da(0x1e5)));const _0x14bcb2=await withSpinner(_0x2ff6da(0x205)+_0x3cc8e3+_0x2ff6da(0x1ef),()=>_0x4085d3[_0x2ff6da(0x16b)]['pullProject'](_0x3cc8e3,{'targetDir':_0x223530,'revision':_0x2bb5b9}),{'verbose':_0x2644d1[_0x2ff6da(0x28e)]}),_0x197566=_0x14bcb2[_0x2ff6da(0x1ab)];_0x197566[_0x2ff6da(0x15c)]?console[_0x2ff6da(0x1fd)](_0x2ff6da(0x186)+_0x197566[_0x2ff6da(0x1d2)]):console[_0x2ff6da(0x1fd)](_0x2ff6da(0x146)+_0x197566[_0x2ff6da(0x1d2)]);console[_0x2ff6da(0x1fd)]('\x20\x20Revision:\x20'+_0x197566[_0x2ff6da(0x1d5)]),console[_0x2ff6da(0x1fd)]('\x20\x20Target:\x20'+(a51_0x3c8a7f['relative'](process[_0x2ff6da(0x1f9)](),_0x197566[_0x2ff6da(0x2a3)])||'.')),console[_0x2ff6da(0x1fd)](_0x2ff6da(0x204)+a51_0x107aaa[_0x2ff6da(0x25f)]('+'+_0x197566['summary'][_0x2ff6da(0x297)]+_0x2ff6da(0x1b0))+',\x20'+(a51_0x107aaa['yellow']('~'+_0x197566[_0x2ff6da(0x124)][_0x2ff6da(0x27c)]+_0x2ff6da(0x131))+',\x20')+(a51_0x107aaa[_0x2ff6da(0x26f)]('-'+_0x197566[_0x2ff6da(0x124)]['deleted']+_0x2ff6da(0x1de))+',\x20')+(''+a51_0x107aaa[_0x2ff6da(0x19d)](_0x197566['summary'][_0x2ff6da(0x202)]+_0x2ff6da(0x20a))));for(const _0x972142 of _0x197566[_0x2ff6da(0x17c)]){_0x972142[_0x2ff6da(0x284)]===_0x2ff6da(0x27c)&&_0x972142[_0x2ff6da(0xfd)]&&(console[_0x2ff6da(0x1fd)]('\x0a'+a51_0x107aaa[_0x2ff6da(0x1dc)](_0x2ff6da(0x286)+_0x972142[_0x2ff6da(0x10e)])),console[_0x2ff6da(0x1fd)](_0x972142[_0x2ff6da(0xfd)]));}if(!_0x197566['hasChanges'])return saveSessionContext({'workflow_project':_0x197566['projectName']},_0x2644d1[_0x2ff6da(0x280)]),console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x25f)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x19d)](_0x2ff6da(0x159)+_0x197566['projectName'])),0x0;if(_0x2644d1[_0x2ff6da(0x22a)])return console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x2a5)](_0x2ff6da(0x207))),0x0;if(!_0x2644d1[_0x2ff6da(0x22c)]){if(!isInteractive())return console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x26f)]('\x0aError:'),_0x2ff6da(0x263)),console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x19d)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x39a382=await confirmKey(_0x2ff6da(0x166));if(!_0x39a382)return console['error'](a51_0x107aaa[_0x2ff6da(0x2a5)](_0x2ff6da(0x222)),_0x2ff6da(0x227)),0x1;}await withSpinner(_0x2ff6da(0x13b),()=>_0x4085d3[_0x2ff6da(0x16b)]['applyPullProject'](_0x197566,{'revision':_0x2bb5b9}),{'verbose':_0x2644d1[_0x2ff6da(0x28e)]}),saveSessionContext({'workflow_project':_0x197566['projectName']},_0x2644d1['session']),console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x25f)](_0x2ff6da(0x28b)));const _0x3d6763=a51_0x3c8a7f['relative'](process[_0x2ff6da(0x1f9)](),_0x197566[_0x2ff6da(0x2a3)])||'.';return console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x19d)]('\x20\x20Location:\x20'+_0x3d6763)),console[_0x2ff6da(0x1fd)](a51_0x107aaa[_0x2ff6da(0x19d)](_0x2ff6da(0x159)+_0x197566[_0x2ff6da(0x1d2)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x1f1);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x1cf);async['execute'](_0x21821f){const _0x2b235b=a51_0x4fe97f,{options:_0x1fb704,args:_0x4dd58d,tdx:_0x405177}=_0x21821f,_0x52455e=this[_0x2b235b(0x1e2)](_0x4dd58d,_0x1fb704),_0x17ba88=_0x1fb704[_0x2b235b(0x1d5)],_0x43d6f7=_0x1fb704[_0x2b235b(0x271)];_0x1fb704[_0x2b235b(0x28e)]&&(_0x52455e&&console['error'](_0x2b235b(0x18c)+_0x52455e),_0x17ba88&&console[_0x2b235b(0x1fd)](_0x2b235b(0x189)+_0x17ba88),_0x1fb704['dryRun']&&console[_0x2b235b(0x1fd)](_0x2b235b(0x1e5)),_0x43d6f7&&console[_0x2b235b(0x1fd)]('Validation:\x20skipped'));let _0x177e7a;try{_0x177e7a=await withSpinner(_0x2b235b(0x102),()=>_0x405177['workflow'][_0x2b235b(0x1c7)]({'sourceDir':_0x52455e,'revision':_0x17ba88,'skipValidation':_0x43d6f7}),{'verbose':_0x1fb704[_0x2b235b(0x28e)]});}catch(_0x54088c){if(_0x54088c instanceof Error&&_0x54088c[_0x2b235b(0x123)]['includes']('No\x20workflow\x20tdx.json\x20found'))return console[_0x2b235b(0x1fd)](a51_0x107aaa[_0x2b235b(0x26f)](_0x2b235b(0x147)),_0x2b235b(0x13f)),_0x1fb704['workflowProject']?console[_0x2b235b(0x1fd)](a51_0x107aaa[_0x2b235b(0x19d)](_0x2b235b(0x296)+_0x1fb704[_0x2b235b(0x1f3)]+_0x2b235b(0x26e)+_0x1fb704[_0x2b235b(0x1f3)]+'\x27')):console[_0x2b235b(0x1fd)](a51_0x107aaa[_0x2b235b(0x19d)](_0x2b235b(0x21d))),0x1;throw _0x54088c;}const _0x220d8e=_0x177e7a[_0x2b235b(0x1ab)];console[_0x2b235b(0x1fd)]('✔\x20Project:\x20'+_0x220d8e['projectName']),console[_0x2b235b(0x1fd)](_0x2b235b(0x1e4)+_0x220d8e[_0x2b235b(0x232)]),console[_0x2b235b(0x1fd)]('\x20\x20Revision:\x20'+_0x220d8e[_0x2b235b(0x1d5)]),console[_0x2b235b(0x1fd)]('\x20\x20Changes:\x20'+a51_0x107aaa['green']('+'+_0x220d8e[_0x2b235b(0x124)][_0x2b235b(0x297)]+'\x20new')+',\x20'+(a51_0x107aaa[_0x2b235b(0x2a5)]('~'+_0x220d8e[_0x2b235b(0x124)]['modified']+_0x2b235b(0x131))+',\x20')+(a51_0x107aaa[_0x2b235b(0x26f)]('-'+_0x220d8e[_0x2b235b(0x124)][_0x2b235b(0x1fc)]+_0x2b235b(0x1de))+',\x20')+(''+a51_0x107aaa[_0x2b235b(0x19d)](_0x220d8e[_0x2b235b(0x124)][_0x2b235b(0x202)]+_0x2b235b(0x20a))));for(const _0x3270b5 of _0x220d8e['changes']){_0x3270b5[_0x2b235b(0x284)]===_0x2b235b(0x27c)&&_0x3270b5[_0x2b235b(0xfd)]&&(console[_0x2b235b(0x1fd)]('\x0a'+a51_0x107aaa[_0x2b235b(0x1dc)](_0x2b235b(0x286)+_0x3270b5[_0x2b235b(0x10e)])),console[_0x2b235b(0x1fd)](_0x3270b5[_0x2b235b(0xfd)]));}if(!_0x220d8e[_0x2b235b(0x142)])return console[_0x2b235b(0x1fd)](a51_0x107aaa[_0x2b235b(0x25f)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this['showWorkflowConsoleUrl'](_0x405177,_0x220d8e[_0x2b235b(0x1d2)],_0x1fb704[_0x2b235b(0x248)]),0x0;if(_0x1fb704['dryRun'])return console[_0x2b235b(0x1fd)](a51_0x107aaa['yellow'](_0x2b235b(0x1b8))),0x0;if(!_0x1fb704['yes']){if(!isInteractive())return console[_0x2b235b(0x1fd)](a51_0x107aaa[_0x2b235b(0x26f)](_0x2b235b(0x14b)),_0x2b235b(0x263)),console[_0x2b235b(0x1fd)](a51_0x107aaa['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x235f68=await confirmKey(_0x2b235b(0x14c));if(!_0x235f68)return console['error'](a51_0x107aaa[_0x2b235b(0x2a5)](_0x2b235b(0x222)),_0x2b235b(0x10f)),0x1;}const _0xf29740=await withSpinner(_0x2b235b(0x18d),()=>_0x405177['workflow'][_0x2b235b(0x196)](_0x220d8e),{'verbose':_0x1fb704['verbose']}),_0x2cca70=_0xf29740[_0x2b235b(0x1ab)];return console['error'](a51_0x107aaa[_0x2b235b(0x25f)](_0x2b235b(0x217))),console[_0x2b235b(0x1fd)]('\x20\x20Project\x20ID:\x20'+_0x2cca70['projectId']),console[_0x2b235b(0x1fd)]('\x20\x20Revision:\x20'+_0x2cca70[_0x2b235b(0x1d5)]),await this['showWorkflowConsoleUrl'](_0x405177,_0x2cca70[_0x2b235b(0x1d2)],_0x1fb704[_0x2b235b(0x248)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]='workflow:clone';[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x10c);async[a51_0x4fe97f(0x1da)](_0x13942a){const _0x595c69=a51_0x4fe97f,{options:_0x407c30,args:_0x51d7f0,tdx:_0x5b88bb}=_0x13942a,_0x1a0914=this['resolveProjectDir'](_0x51d7f0,_0x407c30),_0xec9b97=_0x407c30['name'],_0x41090a=_0x407c30[_0x595c69(0x1d5)],_0x3fbcc2=_0x407c30[_0x595c69(0x271)];if(!_0x1a0914)return console['error'](a51_0x107aaa[_0x595c69(0x26f)](_0x595c69(0x147)),_0x595c69(0x101)),console['error'](a51_0x107aaa[_0x595c69(0x19d)](_0x595c69(0x24c))),console['error'](a51_0x107aaa['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0xec9b97)return console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x26f)](_0x595c69(0x147)),_0x595c69(0x220)),console[_0x595c69(0x1fd)](a51_0x107aaa['dim'](_0x595c69(0x24c))),0x1;_0x407c30[_0x595c69(0x28e)]&&(console['error'](_0x595c69(0x18c)+_0x1a0914),console[_0x595c69(0x1fd)](_0x595c69(0x151)+_0xec9b97),_0x41090a&&console[_0x595c69(0x1fd)](_0x595c69(0x189)+_0x41090a),_0x407c30[_0x595c69(0x22a)]&&console[_0x595c69(0x1fd)](_0x595c69(0x1e5)),_0x3fbcc2&&console[_0x595c69(0x1fd)]('Validation:\x20skipped'));const _0x554931=await withSpinner(_0x595c69(0x226),()=>_0x5b88bb[_0x595c69(0x16b)]['prepareCloneProject'](_0x1a0914,_0xec9b97,{'revision':_0x41090a,'skipValidation':_0x3fbcc2}),{'verbose':_0x407c30[_0x595c69(0x28e)]}),_0x5e24b6=_0x554931[_0x595c69(0x1ab)];console['error']('Source:\x20'+_0x5e24b6[_0x595c69(0x232)]);_0x5e24b6[_0x595c69(0x177)]&&console[_0x595c69(0x1fd)](_0x595c69(0x250)+_0x5e24b6[_0x595c69(0x177)]);console['error'](_0x595c69(0x151)+_0x5e24b6['newProjectName']),console[_0x595c69(0x1fd)]('Revision:\x20'+_0x5e24b6[_0x595c69(0x1d5)]),console['error']('Files\x20to\x20upload:\x20'+_0x5e24b6[_0x595c69(0x299)]);_0x5e24b6[_0x595c69(0x1a0)]&&(console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x2a5)](_0x595c69(0x1bd)+_0x5e24b6[_0x595c69(0x24b)]+_0x595c69(0x289)+_0x5e24b6[_0x595c69(0x251)]+')')),console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x2a5)](_0x595c69(0x1a3))));if(_0x407c30[_0x595c69(0x22a)])return console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x2a5)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x407c30[_0x595c69(0x22c)]){if(!isInteractive())return console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x26f)]('\x0aError:'),_0x595c69(0x263)),console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x19d)](_0x595c69(0x255))),0x1;const _0x386194=_0x5e24b6['sourceProjectName']||a51_0x3c8a7f[_0x595c69(0x14e)](_0x1a0914),_0xdc6d56=_0x5e24b6[_0x595c69(0x1a0)]?_0x595c69(0x253)+_0xec9b97+_0x595c69(0x144):_0x595c69(0x1c6)+_0x386194+_0x595c69(0x20b)+_0xec9b97+'\x22?',_0x24679e=await confirmKey(_0xdc6d56);if(!_0x24679e)return console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x2a5)]('Cancelled')),0x1;}const _0x51dc1a=await withSpinner(_0x5e24b6[_0x595c69(0x1a0)]?_0x595c69(0x1f0)+_0xec9b97+_0x595c69(0x1ef):_0x595c69(0x1d0)+_0xec9b97+_0x595c69(0x1ef),()=>_0x5b88bb[_0x595c69(0x16b)][_0x595c69(0x259)](_0x5e24b6),{'verbose':_0x407c30[_0x595c69(0x28e)]}),_0x33133a=_0x51dc1a[_0x595c69(0x1ab)];return console[_0x595c69(0x1fd)](a51_0x107aaa[_0x595c69(0x25f)](_0x5e24b6[_0x595c69(0x1a0)]?'✔\x20Project\x20updated':'✔\x20Clone\x20complete')),console[_0x595c69(0x1fd)](_0x595c69(0x10b)+_0x33133a[_0x595c69(0x24b)]),console[_0x595c69(0x1fd)](_0x595c69(0x25c)+_0x33133a[_0x595c69(0x2ab)]),console[_0x595c69(0x1fd)](_0x595c69(0x1f8)+_0x33133a['revision']),await this[_0x595c69(0x239)](_0x5b88bb,_0x33133a['newProjectName'],_0x407c30[_0x595c69(0x248)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x2ac);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x190);async[a51_0x4fe97f(0x1da)](_0xbb92ca){const _0x1fb992=a51_0x4fe97f,{options:_0x1815d6,args:_0xb90354,tdx:_0x3f2041}=_0xbb92ca,_0x3a755d=_0xb90354[0x0];if(!_0x3a755d)return console[_0x1fb992(0x1fd)](_0x1fb992(0x103)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x1815d6[_0x1fb992(0x28e)]&&console[_0x1fb992(0x1fd)](_0x1fb992(0x2ad)+_0x3a755d);if(!_0x1815d6[_0x1fb992(0x22c)]){if(!isInteractive())return console[_0x1fb992(0x1fd)](a51_0x107aaa[_0x1fb992(0x26f)](_0x1fb992(0x14b)),_0x1fb992(0x263)),console[_0x1fb992(0x1fd)](a51_0x107aaa[_0x1fb992(0x19d)](_0x1fb992(0x255))),0x1;const _0x1a9645=await confirmKey(_0x1fb992(0x111)+_0x3a755d+_0x1fb992(0x162));if(!_0x1a9645)return console[_0x1fb992(0x1fd)](a51_0x107aaa['yellow'](_0x1fb992(0x222))),0x1;}const _0x57370d=await withSpinner(_0x1fb992(0x181)+_0x3a755d+'...',()=>_0x3f2041[_0x1fb992(0x16b)][_0x1fb992(0x2aa)](_0x3a755d),{'verbose':_0x1815d6[_0x1fb992(0x28e)]}),_0x4607f8=_0x57370d[_0x1fb992(0x1ab)];return console['error']('✔\x20Deleted\x20project\x20'+_0x4607f8[_0x1fb992(0x1d2)]),console[_0x1fb992(0x1fd)](_0x1fb992(0x25c)+_0x4607f8['projectId']),0x0;}}export function parseKeyValue(_0x462030){const _0x238781=a51_0x4fe97f,_0x18f471=_0x462030[_0x238781(0x260)]('=');if(_0x18f471===-0x1)throw new Error(_0x238781(0x28a)+_0x462030+_0x238781(0x218));const _0x173128=_0x462030['substring'](0x0,_0x18f471),_0x17a48a=_0x462030[_0x238781(0x16f)](_0x18f471+0x1);if(!_0x173128)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x173128,'value':_0x17a48a};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x24f);[a51_0x4fe97f(0x1d6)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async['execute'](_0x4d0240){const _0x412d3d=a51_0x4fe97f,{options:_0x120c59,args:_0x3517c1,tdx:_0x1a019e}=_0x4d0240,_0xa0be6b=this[_0x412d3d(0x175)](_0x3517c1,_0x120c59);if(!_0xa0be6b)return 0x1;_0x120c59[_0x412d3d(0x28e)]&&console[_0x412d3d(0x1fd)](_0x412d3d(0x2ad)+_0xa0be6b);const _0x5c4b77=await withSpinner('Listing\x20secrets...',()=>_0x1a019e[_0x412d3d(0x16b)][_0x412d3d(0x1fb)](_0xa0be6b),{'verbose':_0x120c59[_0x412d3d(0x28e)]}),{secrets:_0x3f30f4}=_0x5c4b77[_0x412d3d(0x1ab)];return console[_0x412d3d(0x1fd)](_0x412d3d(0x2a9)+_0x3f30f4[_0x412d3d(0x1a8)]+_0x412d3d(0x213)+(_0x3f30f4[_0x412d3d(0x1a8)]!==0x1?'s':'')),await handleSDKOutput(_0x3f30f4,_0x120c59),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x1bc);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x266);async[a51_0x4fe97f(0x1da)](_0x4d8a5c){const _0x2029e7=a51_0x4fe97f,{options:_0x780c44,args:_0xe7db21,tdx:_0xed7cd6}=_0x4d8a5c;let _0x4eb2bf,_0x17e92f;if(_0xe7db21['length']>=0x1&&!_0xe7db21[0x0][_0x2029e7(0x12a)]('='))_0x4eb2bf=_0xe7db21[0x0],_0x17e92f=_0xe7db21[_0x2029e7(0x154)](0x1);else{if(_0xe7db21['length']>=0x1&&_0x780c44[_0x2029e7(0x1f3)])_0x4eb2bf=_0x780c44[_0x2029e7(0x1f3)],_0x17e92f=_0xe7db21;else return _0xe7db21[_0x2029e7(0x1a8)]>=0x1?(console[_0x2029e7(0x1fd)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x2029e7(0x1fd)](_0x2029e7(0x16a)),0x1):(console[_0x2029e7(0x1fd)](_0x2029e7(0x16d)),console[_0x2029e7(0x1fd)](_0x2029e7(0x168)),0x1);}if(_0x17e92f[_0x2029e7(0x1a8)]===0x0)return console[_0x2029e7(0x1fd)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x4676b5={};try{for(const _0x1d9b6c of _0x17e92f){const {key:_0x20d89e,value:_0x3c2be5}=parseKeyValue(_0x1d9b6c);_0x4676b5[_0x20d89e]=_0x3c2be5;}}catch(_0x233368){return _0x233368 instanceof Error&&console['error'](a51_0x107aaa[_0x2029e7(0x26f)]('Error:'),_0x233368[_0x2029e7(0x123)]),0x1;}const _0xb4ee5b=Object['keys'](_0x4676b5);_0x780c44[_0x2029e7(0x28e)]&&(console['error']('Project:\x20'+_0x4eb2bf),console[_0x2029e7(0x1fd)](_0x2029e7(0x10a)+_0xb4ee5b[_0x2029e7(0x267)](',\x20')));const _0x3f2d86=await withSpinner(_0xb4ee5b[_0x2029e7(0x1a8)]===0x1?_0x2029e7(0x1cb):_0x2029e7(0x206)+_0xb4ee5b['length']+_0x2029e7(0x29d),()=>_0xed7cd6[_0x2029e7(0x16b)][_0x2029e7(0x20e)](_0x4eb2bf,_0x4676b5),{'verbose':_0x780c44[_0x2029e7(0x28e)]}),_0x4e8cea=_0x3f2d86[_0x2029e7(0x1ab)];return console[_0x2029e7(0x1fd)](_0xb4ee5b[_0x2029e7(0x1a8)]===0x1?_0x2029e7(0x21b)+_0x4e8cea['keys'][0x0]+_0x2029e7(0x183)+_0x4e8cea[_0x2029e7(0x1d2)]+'\x27':'✔\x20'+_0x4e8cea[_0x2029e7(0x276)]['length']+_0x2029e7(0x275)+_0x4e8cea[_0x2029e7(0x1d2)]+'\x27'),(_0x780c44['json']||_0x780c44[_0x2029e7(0x14a)])&&await handleSingleObjectOutput(_0x4e8cea,_0x780c44),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a51_0x4fe97f(0x25e);[a51_0x4fe97f(0x1d6)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a51_0x4fe97f(0x1da)](_0x1d3c44){const _0x155452=a51_0x4fe97f,{options:_0x305248,args:_0xe63563,tdx:_0x5a1c42}=_0x1d3c44;let _0x462c80,_0x59eb5a;if(_0xe63563[_0x155452(0x1a8)]>=0x2)_0x462c80=_0xe63563[0x0],_0x59eb5a=_0xe63563[0x1];else{if(_0xe63563[_0x155452(0x1a8)]===0x1&&_0x305248[_0x155452(0x1f3)])_0x462c80=_0x305248[_0x155452(0x1f3)],_0x59eb5a=_0xe63563[0x0];else return _0xe63563[_0x155452(0x1a8)]===0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console[_0x155452(0x1fd)](_0x155452(0x16a)),0x1):(console['error'](_0x155452(0x149)),console[_0x155452(0x1fd)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x305248[_0x155452(0x28e)]&&(console[_0x155452(0x1fd)](_0x155452(0x2ad)+_0x462c80),console['error'](_0x155452(0x210)+_0x59eb5a));if(!_0x305248[_0x155452(0x22c)]){if(!isInteractive())return console[_0x155452(0x1fd)](a51_0x107aaa[_0x155452(0x26f)]('\x0aError:'),_0x155452(0x263)),console[_0x155452(0x1fd)](a51_0x107aaa['dim'](_0x155452(0x255))),0x1;const _0x2d4492=await confirmKey(_0x155452(0x1d9)+_0x59eb5a+_0x155452(0x268)+_0x462c80+'\x27?');if(!_0x2d4492)return console[_0x155452(0x1fd)](a51_0x107aaa[_0x155452(0x2a5)]('Cancelled')),0x1;}const _0x486647=await withSpinner('Deleting\x20secret...',()=>_0x5a1c42[_0x155452(0x16b)][_0x155452(0x1c8)](_0x462c80,_0x59eb5a),{'verbose':_0x305248['verbose']}),_0x15eed7=_0x486647[_0x155452(0x1ab)];return console[_0x155452(0x1fd)](_0x155452(0x21b)+_0x15eed7[_0x155452(0x122)]+_0x155452(0x17f)+_0x15eed7['projectName']+'\x27'),(_0x305248['json']||_0x305248[_0x155452(0x14a)])&&await handleSingleObjectOutput(_0x15eed7,_0x305248),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(_0x2f9e5b){const _0x170e25=a51_0x4fe97f,_0x2035db=Math[_0x170e25(0x219)](_0x2f9e5b/0x3e8),_0x3ba93d=Math[_0x170e25(0x219)](_0x2035db/0x3c),_0x5d2c83=Math[_0x170e25(0x219)](_0x3ba93d/0x3c),_0x1f3e3f=Math[_0x170e25(0x219)](_0x5d2c83/0x18);if(_0x1f3e3f>0x0){const _0x3fec11=_0x5d2c83%0x18;return _0x3fec11>0x0?_0x1f3e3f+'d\x20'+_0x3fec11+'h':_0x1f3e3f+'d';}else{if(_0x5d2c83>0x0){const _0x3f32bc=_0x3ba93d%0x3c;return _0x3f32bc>0x0?_0x5d2c83+'h\x20'+_0x3f32bc+'m':_0x5d2c83+'h';}else{if(_0x3ba93d>0x0){const _0x447fa7=_0x2035db%0x3c;return _0x447fa7>0x0?_0x3ba93d+'m\x20'+_0x447fa7+'s':_0x3ba93d+'m';}else return _0x2035db+'s';}}}function formatTimestamp(_0x64534f,_0x4f76d4){const _0x303d16=a51_0x4fe97f,_0x24e28f=new Date(_0x64534f),_0x2b98ce=String(_0x24e28f['getHours']())[_0x303d16(0x160)](0x2,'0'),_0x14f573=String(_0x24e28f[_0x303d16(0x194)]())['padStart'](0x2,'0'),_0x28f326=_0x2b98ce+':'+_0x14f573,_0x3e8f13=_0x24e28f[_0x303d16(0x127)]()===_0x4f76d4[_0x303d16(0x127)]()&&_0x24e28f[_0x303d16(0x187)]()===_0x4f76d4['getMonth']()&&_0x24e28f[_0x303d16(0x112)]()===_0x4f76d4['getDate']();if(_0x3e8f13)return _0x28f326;else{const _0x527c5e=String(_0x24e28f[_0x303d16(0x187)]()+0x1)[_0x303d16(0x160)](0x2,'0'),_0x5bdefa=String(_0x24e28f[_0x303d16(0x112)]())[_0x303d16(0x160)](0x2,'0');return _0x527c5e+'-'+_0x5bdefa+'\x20'+_0x28f326;}}function formatDate(_0x227703){const _0x1ed25a=a51_0x4fe97f,_0x40815b=_0x227703[_0x1ed25a(0x127)](),_0x2649f7=String(_0x227703[_0x1ed25a(0x187)]()+0x1)['padStart'](0x2,'0'),_0x309b01=String(_0x227703[_0x1ed25a(0x112)]())['padStart'](0x2,'0');return _0x40815b+'-'+_0x2649f7+'-'+_0x309b01;}function getTaskStateIcon(_0x2b0306){const _0x2a0a36={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2a0a36[_0x2b0306]||'⚪';}function getBarChar(_0x5ca038){const _0x2271ca=a51_0x4fe97f;return _0x5ca038===_0x2271ca(0x1fd)||_0x5ca038===_0x2271ca(0x105)?'×':'─';}function getBarColor(_0x13b7d0){const _0x184b8d=a51_0x4fe97f,_0x17540e={'success':a51_0x107aaa['green'],'error':a51_0x107aaa[_0x184b8d(0x26f)],'group_error':a51_0x107aaa[_0x184b8d(0x26f)],'running':a51_0x107aaa[_0x184b8d(0x1b2)],'blocked':a51_0x107aaa[_0x184b8d(0x2a5)],'planned':a51_0x107aaa[_0x184b8d(0x19d)],'canceling':a51_0x107aaa[_0x184b8d(0x2a5)]};return _0x17540e[_0x13b7d0]||a51_0x107aaa[_0x184b8d(0x228)];}function parseTaskName(_0x1b6bed){const _0x38793a=a51_0x4fe97f;let _0x42542a=_0x1b6bed['replace'](/^\++/,'');const _0x323075=_0x42542a['split']('+'),_0x5cc934=_0x323075[_0x38793a(0x1a8)]>0x1?_0x323075[_0x38793a(0x1a8)]-0x2:0x0,_0x2a47d5=_0x323075[_0x323075['length']-0x1]||_0x42542a;return{'level':_0x5cc934,'name':'+'+_0x2a47d5};}function truncateTaskName(_0xe2077d,_0x55c017){const _0x150622=a51_0x4fe97f,_0x4743e5=stringWidth(_0xe2077d);if(_0x4743e5<=_0x55c017)return _0xe2077d;let _0x41d94e=_0xe2077d;while(stringWidth(_0x41d94e+'…')>_0x55c017&&_0x41d94e[_0x150622(0x1a8)]>0x0){_0x41d94e=_0x41d94e[_0x150622(0x154)](0x0,-0x1);}return _0x41d94e+'…';}function calculateTimeScale(_0x3ef84d,_0x2f7b82){const _0x34d307=a51_0x4fe97f;return{'startTime':_0x3ef84d['start'],'endTime':_0x3ef84d['end'],'durationMs':_0x3ef84d['duration'],'msPerChar':_0x3ef84d[_0x34d307(0x1ea)]/_0x2f7b82};}function timeToPosition(_0x2adac4,_0x282262,_0x3d466a){const _0x314be7=a51_0x4fe97f,_0xed42c2=_0x2adac4-_0x282262[_0x314be7(0x214)],_0x180ac9=Math[_0x314be7(0x219)](_0xed42c2/_0x282262[_0x314be7(0x281)]);return Math[_0x314be7(0x15b)](0x0,Math[_0x314be7(0x11b)](_0x180ac9,_0x3d466a));}function renderTimeAxis(_0x311cbd,_0x47dc39){const _0xf18c0b=a51_0x4fe97f,_0xd4e8c1=Math[_0xf18c0b(0x11b)](TIMELINE_CONFIG[_0xf18c0b(0x278)],Math[_0xf18c0b(0x15b)](TIMELINE_CONFIG[_0xf18c0b(0x110)],Math[_0xf18c0b(0x219)](_0x47dc39/TIMELINE_CONFIG[_0xf18c0b(0x1a9)]))),_0x44a8e7=_0x311cbd[_0xf18c0b(0x29b)]/(_0xd4e8c1-0x1),_0x1997c0=new Date(_0x311cbd[_0xf18c0b(0x214)]),_0x31b02d=[];for(let _0x405c78=0x0;_0x405c78<_0xd4e8c1;_0x405c78++){const _0x14f2fa=_0x311cbd[_0xf18c0b(0x214)]+_0x405c78*_0x44a8e7,_0x631ea4=timeToPosition(_0x14f2fa,_0x311cbd,_0x47dc39),_0x74fab1=formatTimestamp(_0x14f2fa,_0x1997c0);_0x31b02d[_0xf18c0b(0x1ee)]({'pos':_0x631ea4,'text':_0x74fab1});}const _0x531138=new Array(_0x47dc39)[_0xf18c0b(0x27f)]('\x20');let _0x3ffbf1=-0x1;for(const {pos:_0x405e71,text:_0x57c83c}of _0x31b02d){let _0xdee624=Math[_0xf18c0b(0x15b)](0x0,_0x405e71-Math['floor'](_0x57c83c[_0xf18c0b(0x1a8)]/0x2));_0xdee624<=_0x3ffbf1+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0xdee624=_0x3ffbf1+TIMELINE_CONFIG[_0xf18c0b(0x17a)]+0x1);_0xdee624+_0x57c83c[_0xf18c0b(0x1a8)]>_0x47dc39&&(_0xdee624=_0x47dc39-_0x57c83c[_0xf18c0b(0x1a8)]);if(_0xdee624>=0x0&&_0xdee624+_0x57c83c[_0xf18c0b(0x1a8)]<=_0x47dc39&&_0xdee624>_0x3ffbf1){for(let _0x5c1278=0x0;_0x5c1278<_0x57c83c[_0xf18c0b(0x1a8)];_0x5c1278++){_0x531138[_0xdee624+_0x5c1278]=_0x57c83c[_0x5c1278];}_0x3ffbf1=_0xdee624+_0x57c83c[_0xf18c0b(0x1a8)]-0x1;}}return _0x531138[_0xf18c0b(0x267)]('');}function renderTaskRow(_0x73ca32,_0x24afc4,_0x15abb7,_0x1cea10){const _0x470d6c=a51_0x4fe97f,{level:_0x145dbe,name:_0xf2fadb}=parseTaskName(_0x73ca32[_0x470d6c(0x19a)]),_0x6d16='\x20'[_0x470d6c(0x1dd)](_0x145dbe),_0x5a5fad=_0x73ca32['window']?'('+formatElapsed(_0x73ca32[_0x470d6c(0x293)][_0x470d6c(0x1ea)])+')':'',_0x12c3de=stringWidth(_0x5a5fad),_0x1a4268=_0x145dbe*0x1,_0x53f74f=_0x1cea10-_0x1a4268-_0x12c3de-0x1,_0x528ecf=truncateTaskName(_0xf2fadb,_0x53f74f),_0x57515f=_0x6d16+_0x528ecf,_0x535e9e=stringWidth(_0x57515f),_0x3bdd78=_0x1cea10-_0x535e9e-_0x12c3de,_0x1a4473=_0x57515f+'\x20'[_0x470d6c(0x1dd)](Math[_0x470d6c(0x15b)](0x1,_0x3bdd78))+a51_0x107aaa['dim'](_0x5a5fad),_0x35eb33=getTaskStateIcon(_0x73ca32[_0x470d6c(0x25d)]),_0x2d78c9=new Array(_0x15abb7)[_0x470d6c(0x27f)]('\x20');if(_0x73ca32[_0x470d6c(0x293)]){const _0x132ee1=timeToPosition(_0x73ca32['window'][_0x470d6c(0x169)],_0x24afc4,_0x15abb7),_0x591254=timeToPosition(_0x73ca32['window'][_0x470d6c(0x23f)],_0x24afc4,_0x15abb7),_0x4598a4=getBarChar(_0x73ca32[_0x470d6c(0x25d)]),_0x5e95fb=Math[_0x470d6c(0x15b)](_0x132ee1+0x1,_0x591254);for(let _0x26ab45=_0x132ee1;_0x26ab45<Math['min'](_0x5e95fb,_0x15abb7);_0x26ab45++){_0x2d78c9[_0x26ab45]=_0x4598a4;}}const _0x271bd6=getBarColor(_0x73ca32[_0x470d6c(0x25d)]),_0x12e6ea=_0x2d78c9[_0x470d6c(0x1eb)](_0x295ce0=>_0x295ce0==='\x20'?'\x20':_0x271bd6(_0x295ce0))[_0x470d6c(0x267)]('');return _0x35eb33+'\x20'+_0x1a4473+'│'+_0x12e6ea+'│';}function calculateStats(_0x283abb){const _0x5368ae=a51_0x4fe97f,_0x2bbc5a={'total':_0x283abb[_0x5368ae(0x1a8)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x1f119f of _0x283abb){if(_0x1f119f[_0x5368ae(0x25d)]===_0x5368ae(0x24d))_0x2bbc5a[_0x5368ae(0x24d)]++;else{if(_0x1f119f['state']===_0x5368ae(0x1fd)||_0x1f119f[_0x5368ae(0x25d)]==='group_error')_0x2bbc5a[_0x5368ae(0x1fd)]++;else _0x1f119f[_0x5368ae(0x25d)]===_0x5368ae(0x1e3)?_0x2bbc5a[_0x5368ae(0x1e3)]++:_0x2bbc5a[_0x5368ae(0x291)]++;}}return _0x2bbc5a;}function formatStats(_0x312673){const _0x52d7c2=a51_0x4fe97f;return[_0x52d7c2(0x1e0)+_0x312673[_0x52d7c2(0x1a7)],'✅\x20'+_0x312673[_0x52d7c2(0x24d)],'❌\x20'+_0x312673[_0x52d7c2(0x1fd)],_0x52d7c2(0x116)+_0x312673[_0x52d7c2(0x1e3)],'⏳\x20'+_0x312673[_0x52d7c2(0x291)]][_0x52d7c2(0x267)]('\x20\x20');}function a51_0x210b(){const _0x1dc05c=['\x20to\x20see\x20detailed\x20logs','Start\x20a\x20workflow\x20run','clear','stdout','diff','workflowName','logs','\x20\x20Location:\x20','Source\x20directory\x20is\x20required','Analyzing\x20changes...','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','project','group_error','Listing\x20workflow\x20projects...','Project\x20directory:\x20','renderTimeline','Project\x20name\x20is\x20required','Secrets\x20to\x20set:\x20','\x20\x20Project:\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','fileSize','path','-\x20nothing\x20pushed','MIN_LABEL_COUNT','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','getDate','buildTimelineData','stat','318972AmcpVa','🔄\x20','Including\x20subtasks:\x20yes','retryAttemptName','\x0a✔\x20Attempt\x20complete','includeRetried','min','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','logFiles','\x20workflow','Session\x20not\x20found:\x20','Attempt\x20ID:\x20','Loading\x20session...','key','message','summary','sys','taskName','getFullYear','\x20tasks','No\x20log\x20files\x20found\x20for\x20this\x20attempt','includes','Retry\x20a\x20session\x20or\x20attempt','workflow:logs','Error:\x20Project\x20name\x20is\x20required','format','sessions','reason','\x20modified','✔\x20Showing\x20','workflow:use','startedAt','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Session\x20time:\x20','resolve','Pushing\x20workflow\x20project...','\x20logs','Listing\x20workflow\x20sessions...','Writing\x20files...','toLowerCase','cancelRequested','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','(unknown)','MAX_TIMELINE_WIDTH','hasChanges','log','\x22\x20with\x20new\x20revision?','has','→\x20Project:\x20','Error:','No\x20sessions\x20found\x20in\x20project:\x20','Error:\x20Secret\x20key\x20is\x20required','jsonl','\x0aError:','\x0aPush\x20these\x20changes?','📋\x20','basename','No\x20attempts\x20found\x20for:\x20','💡\x20Tip:\x20Use\x20','New\x20project\x20name:\x20','19219120xGuszk','tasks','slice','Warning:','ICON_SPACING','1887295WxmNNi','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20\x20Session\x20context\x20set\x20to:\x20','✔\x20Downloaded\x20','max','isNewProject','Pull\x20workflow\x20project\x20to\x20local\x20folder','sessionId','renderSessionsTimeline','padStart','Error:\x20Invalid\x20parameter\x20format:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','includeSubtasks','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','\x0aApply\x20these\x20changes?','projects','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','start','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','workflow','POLL_INTERVAL_MS','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','all','substring','\x20\x20Workflow:\x20','Error:\x20Attempt\x20ID\x20is\x20required','\x20\x20Session\x20ID:\x20','workflow:pull','Resolving\x20project\x20\x27','requireProject','Reason:\x20','sourceProjectName','✔\x20Workflow\x20project\x20context\x20cleared.','Parameters:\x20','LABEL_MIN_SPACING','\x20is\x20not\x20a\x20directory','changes','\x20\x20New\x20attempt\x20ID:\x20','4ruiHTb','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Deleting\x20project\x20','stringify','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','limit','resolveProject','→\x20New\x20project:\x20','getMonth','context','Revision:\x20','metadata','values','Source\x20directory:\x20','Pushing\x20project...','json','Filter:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','596868fuNVlg','Select\x20a\x20session\x20to\x20view\x20timeline:','size','getMinutes','tdx.json','executePushProject','workflow:upload','parseProjectWorkflowPattern','\x20from\x20session\x20','name','force','6901299lIEuSi','dim','Show\x20specific\x20attempt\x20details','toISOString','targetExists','276476GBerox','Getting\x20attempt\x20details...','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','some','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Pushed\x20','total','length','LABEL_WIDTH_DIVISOR','workflow:run','data','fs/promises','attempts','localeCompare','Listing\x20workflows...','\x20new','columns','blue','\x1b[1A\x1b[2K','\x20project','Include\x20retried:\x20yes','/sessions/','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','\x0aDry\x20run\x20-\x20nothing\x20pushed','workflow:attempt','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','done','workflow:secrets:set','\x0a⚠\x20Project\x20\x22','Loading\x20sessions...','pollTimeline','/attempt/','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','📁\x20','download','text','\x20of\x20','\x0aClone\x20\x22','preparePushProject','deleteSecret','Expected\x20format:\x20--param\x20key=value','\x0aPolling...\x20(','Setting\x20secret...','\x20\x20Files\x20extracted:\x20','No\x20workflows\x20found','Downloading\x20project\x20','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Cloning\x20to\x20','session_id','projectName','Kill\x20a\x20running\x20attempt','value','revision','description','set','lastAttempt','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','execute','filter','cyan','repeat','\x20deleted','index','Total:\x20','Killing\x20attempt...','resolveProjectDir','running','\x20\x20Source:\x20','Dry\x20run:\x20yes','No\x20workflow\x20projects\x20found','filesExtracted','getTime','Select\x20a\x20workflow\x20to\x20run','duration','map','rows','Session\x20','push','...','Updating\x20','workflow:push','List\x20workflows','workflowProject','write','Workflow:\x20','Show\x20tasks\x20for\x20an\x20attempt','task','\x20\x20Revision:\x20','cwd','No\x20workflow\x20sessions\x20found','listSecrets','deleted','error','Error:\x20Invalid\x20JSON\x20in\x20--params','find','workflow:sessions','Target:\x20','unchanged','Filter:\x20project=','\x20\x20Changes:\x20','Pulling\x20project\x20','Setting\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Target\x20directory:\x20','\x20unchanged','\x22\x20to\x20new\x20project\x20\x22','sort','fromTask','setSecrets','now','Key:\x20','49VxuzWP','List\x20workflow\x20attempts','\x20secret','startTime',',\x20Workflow:\x20','\x20(system)','✔\x20Push\x20complete','.\x20Expected\x20format:\x20KEY=VALUE','floor','\x20-\x20','✔\x20Secret\x20\x27','Using\x20attempt\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','unknown','finishedAt','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Select\x20a\x20task\x20to\x20view\x20logs:','Cancelled','planned','Retrying\x20attempt...','parse','Analyzing\x20project...','-\x20no\x20files\x20written','white','startsWith','dryRun','Force:\x20yes','yes','trim','output','params','TASK_NAME_WIDTH','workflow:attempts','sourceDir','Show\x20logs\x20for\x20a\x20workflow\x20attempt','createdAt','\x20\x20Console:\x20','fullName','match','generateSessionTimelineRows','showWorkflowConsoleUrl','MAX_POLL_ITERATIONS','attempt','\x20(use\x20--limit\x20to\x20show\x20more)','167579gNTUkM','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','end','icon','workflow:workflows','workflow:timeline','sessionTime','No\x20attempts\x20found','select','get','\x20has\x20no\x20attempts','site','attemptId','utf-8','newProjectName','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','success','status','workflow:secrets:list','Source\x20project:\x20','existingProjectId','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x0aUpdate\x20existing\x20project\x20\x22','ICON_WIDTH','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','table','\x20attempt','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','executeCloneProject','session:','Fetching\x20log\x20files...','\x20\x20Project\x20ID:\x20','state','workflow:secrets:delete','green','indexOf','attempt:','param','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','No\x20sessions\x20found\x20for:\x20','GUTTER','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','join','\x27\x20from\x20project\x20\x27','Project\x20name:\x20','MAX_TASKS_DISPLAY','8eFclRz','projectId','kill','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','red','Retrying\x20session...','skipValidation','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','isTTY','No\x20matching\x20sessions\x20found','\x20secrets\x20set\x20for\x20project\x20\x27','keys','Task\x20name:\x20','MAX_LABEL_COUNT','splice','Error:\x20','Resume\x20from:\x20','modified','No\x20log\x20content\x20found','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','fill','session','msPerChar','every','workflow:download','type','Usage:\x20tdx\x20wf\x20use\x20<project>','---\x20','renderSingleTimeline','workflow:retry','\x22\x20already\x20exists\x20(ID:\x20','Invalid\x20format:\x20','✔\x20Pull\x20complete','Latest\x20session\x20has\x20no\x20attempt','Output\x20directory:\x20','verbose','list','follow','pending','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','window','No\x20sessions\x20found','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Tip:\x20cd\x20to\x20workflows/','new','workflows','fileCount','✔\x20Retry\x20started','durationMs','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','\x20secrets...','trimEnd','autocomplete','split','updatedAt','displayLine','targetDir','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','yellow','Params:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','/app/workflows/','✔\x20Found\x20','delete','newProjectId','workflow:delete','Project:\x20'];a51_0x210b=function(){return _0x1dc05c;};return a51_0x210b();}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a51_0x4fe97f(0x19a)]=a51_0x4fe97f(0x242);[a51_0x4fe97f(0x1d6)]=a51_0x4fe97f(0x258);async[a51_0x4fe97f(0x1da)](_0x4e6883){const _0x4cf088=a51_0x4fe97f,{options:_0x5cd26c,args:_0x28bddc,tdx:_0xdf643c}=_0x4e6883;let _0x5e2701,_0x47bfc2,_0x557fdb=![];if(_0x28bddc[0x0]){if(_0x28bddc[0x0]['includes']('.')){const _0x214ca0=this[_0x4cf088(0x198)](_0x28bddc,_0x5cd26c);if(!_0x214ca0)return 0x1;_0x5e2701=_0x214ca0[_0x4cf088(0x1d2)],_0x47bfc2=_0x214ca0[_0x4cf088(0xfe)];}else{_0x47bfc2=_0x28bddc[0x0],_0x5e2701=_0x5cd26c[_0x4cf088(0x1f3)];if(!_0x5e2701)return console['error'](a51_0x107aaa[_0x4cf088(0x26f)](_0x4cf088(0x147)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x557fdb=!![];}}else{const _0x1f5e1f=this['parseProjectWorkflowPattern'](_0x28bddc,_0x5cd26c);if(!_0x1f5e1f)return 0x1;_0x5e2701=_0x1f5e1f[_0x4cf088(0x1d2)],_0x47bfc2=_0x1f5e1f[_0x4cf088(0xfe)];}if(_0x5cd26c[_0x4cf088(0x28e)]){if(_0x5e2701&&_0x47bfc2)console['error'](_0x4cf088(0x18f)+_0x5e2701+'.'+_0x47bfc2);else _0x5e2701&&console[_0x4cf088(0x1fd)]('Filter:\x20project='+_0x5e2701);}const _0x232c24=_0x5cd26c[_0x4cf088(0x249)],_0x304db2=_0x5cd26c['sessionId'];if(_0x232c24){_0x304db2&&console[_0x4cf088(0x1fd)](a51_0x107aaa[_0x4cf088(0x2a5)](_0x4cf088(0x155)),_0x4cf088(0x27e));const _0x64e0c9=_0x5cd26c[_0x4cf088(0x290)];return _0x64e0c9?await this['pollTimeline'](_0x4e6883,_0x232c24):await this[_0x4cf088(0x287)](_0x4e6883,_0x232c24,_0x5cd26c),0x0;}if(_0x304db2){const _0x2ef1c3=await withSpinner(_0x4cf088(0x121),()=>_0xdf643c[_0x4cf088(0x16b)]['sessions']({'projectName':_0x5e2701,'workflowName':_0x47bfc2,'limit':0x64}),{'verbose':_0x5cd26c['verbose']}),_0x2f9373=_0x2ef1c3[_0x4cf088(0x1ab)]['find'](_0x27e9f3=>_0x27e9f3['id']===_0x304db2);if(!_0x2f9373)return console[_0x4cf088(0x1fd)](a51_0x107aaa[_0x4cf088(0x26f)](_0x4cf088(0x147)),_0x4cf088(0x11f)+_0x304db2),0x1;if(!_0x2f9373['lastAttempt']?.['id'])return console['error'](a51_0x107aaa[_0x4cf088(0x26f)]('Error:'),_0x4cf088(0x1ed)+_0x304db2+_0x4cf088(0x247)),0x1;const _0x123a6b=_0x2f9373[_0x4cf088(0x1d8)]['id'];_0x5cd26c[_0x4cf088(0x28e)]&&console[_0x4cf088(0x1fd)](_0x4cf088(0x21c)+_0x123a6b+_0x4cf088(0x199)+_0x304db2);const _0x138738=_0x5cd26c[_0x4cf088(0x290)];return _0x138738?await this[_0x4cf088(0x1bf)](_0x4e6883,_0x123a6b):await this[_0x4cf088(0x287)](_0x4e6883,_0x123a6b,_0x5cd26c),0x0;}const _0x58ed13=await withSpinner(_0x4cf088(0x1be),()=>_0xdf643c[_0x4cf088(0x16b)]['sessions']({'projectName':_0x5e2701,'workflowName':_0x47bfc2,'limit':_0x5cd26c[_0x4cf088(0x184)]||0x32}),{'verbose':_0x5cd26c[_0x4cf088(0x28e)]}),_0x483457=_0x58ed13[_0x4cf088(0x1ab)];if(_0x483457[_0x4cf088(0x1a8)]===0x0){if(_0x5e2701&&_0x47bfc2)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x5e2701+'.'+_0x47bfc2);else _0x5e2701?console[_0x4cf088(0x1fd)](_0x4cf088(0x148)+_0x5e2701):(console[_0x4cf088(0x1fd)](_0x4cf088(0x1fa)),console[_0x4cf088(0x1fd)](a51_0x107aaa[_0x4cf088(0x19d)](_0x4cf088(0x272))));return 0x0;}_0x483457[_0x4cf088(0x20c)]((_0x304772,_0x49e1e8)=>{const _0x4113d1=_0x4cf088,_0x23060f=_0x304772['sessionTime']||'',_0x1476ee=_0x49e1e8[_0x4113d1(0x243)]||'';return _0x1476ee[_0x4113d1(0x1ae)](_0x23060f);});if(_0x5cd26c[_0x4cf088(0x18e)]||_0x5cd26c[_0x4cf088(0x14a)])return await handleSDKOutput(_0x483457,_0x5cd26c),0x0;let _0xc955d0;if(_0x557fdb){const _0x7286c4=_0x483457[0x0];if(!_0x7286c4[_0x4cf088(0x1d8)]?.['id'])return console[_0x4cf088(0x1fd)](_0x4cf088(0x28c)),0x0;_0xc955d0=_0x7286c4[_0x4cf088(0x1d8)]['id'],_0x5cd26c[_0x4cf088(0x28e)]&&console[_0x4cf088(0x1fd)]('Auto-selected\x20latest\x20session:\x20'+_0x7286c4['sessionTime']);}else{const _0x1cb1ac=_0x483457[_0x4cf088(0x1eb)](_0x215921=>{const _0x4db971=_0x4cf088,_0x3acda2=getAttemptStatusDisplay(_0x215921[_0x4db971(0x1d8)]);return{'title':_0x215921['project']?.[_0x4db971(0x19a)]+'.'+_0x215921[_0x4db971(0x16b)]?.[_0x4db971(0x19a)]+'\x20-\x20'+_0x215921[_0x4db971(0x243)]+'\x20'+_0x3acda2[_0x4db971(0x240)],'value':_0x215921[_0x4db971(0x1d8)]?.['id']||'','description':_0x3acda2[_0x4db971(0x1c4)]};}),_0x587503=await a51_0x8f4c4c({'type':_0x4cf088(0x245),'name':_0x4cf088(0x249),'message':_0x4cf088(0x192),'choices':_0x1cb1ac[_0x4cf088(0x1db)](_0x2dede5=>_0x2dede5[_0x4cf088(0x1d4)]!=='')});if(!_0x587503[_0x4cf088(0x249)])return 0x0;_0xc955d0=_0x587503[_0x4cf088(0x249)];}const _0x3ce6cf=_0x5cd26c[_0x4cf088(0x290)];return _0x3ce6cf?await this['pollTimeline'](_0x4e6883,_0xc955d0):await this['renderSingleTimeline'](_0x4e6883,_0xc955d0,_0x5cd26c),0x0;}async[a51_0x4fe97f(0x287)](_0x456bca,_0xdc9c73,_0x56c0b1){const _0x557bfe=a51_0x4fe97f,{tdx:_0x890132}=_0x456bca;let _0x5261ec,_0x93f37d;try{[_0x5261ec,_0x93f37d]=await Promise[_0x557bfe(0x16e)]([_0x890132['workflow'][_0x557bfe(0x23b)](_0xdc9c73),_0x890132[_0x557bfe(0x16b)][_0x557bfe(0x153)](_0xdc9c73,![])]);}catch(_0x5c869f){console[_0x557bfe(0x1fd)](a51_0x107aaa[_0x557bfe(0x26f)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x56c0b1[_0x557bfe(0x28e)]&&console[_0x557bfe(0x1fd)](_0x5c869f);throw _0x5c869f;}if(_0x56c0b1[_0x557bfe(0x18e)]||_0x56c0b1[_0x557bfe(0x14a)]){const _0x491444=this[_0x557bfe(0x113)](_0x5261ec,_0x93f37d);await handleSDKOutput([_0x491444],_0x56c0b1);return;}const _0x5eb558=_0x890132[_0x557bfe(0x188)][_0x557bfe(0x248)],_0x22ca9c=this[_0x557bfe(0x108)](_0x5261ec,_0x93f37d,_0x5eb558);console[_0x557bfe(0x143)](_0x22ca9c);}async[a51_0x4fe97f(0x1bf)](_0x1ca9d7,_0x39dd07){const _0x4971f6=a51_0x4fe97f,{tdx:_0x5ca42c}=_0x1ca9d7,_0x1550f2=TIMELINE_CONFIG[_0x4971f6(0x16c)],_0x53504c=TIMELINE_CONFIG[_0x4971f6(0x23a)];let _0xaa43bc=0x0;while(_0xaa43bc<_0x53504c){process[_0x4971f6(0x2b1)][_0x4971f6(0x273)]&&process['stdout'][_0x4971f6(0x1f4)]('\x1bc');let _0x1cd259,_0x3e192a;try{[_0x1cd259,_0x3e192a]=await Promise['all']([_0x5ca42c['workflow'][_0x4971f6(0x23b)](_0x39dd07),_0x5ca42c['workflow'][_0x4971f6(0x153)](_0x39dd07,![])]);}catch(_0x1a3645){console[_0x4971f6(0x1fd)](a51_0x107aaa[_0x4971f6(0x26f)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0xaa43bc>0x0&&console[_0x4971f6(0x1fd)](a51_0x107aaa[_0x4971f6(0x19d)](_0x4971f6(0x208)+_0xaa43bc));throw _0x1a3645;}const _0x4ff832=_0x5ca42c['context']['site'],_0x5876d6=this['renderTimeline'](_0x1cd259,_0x3e192a,_0x4ff832);console[_0x4971f6(0x143)](_0x5876d6);const _0x2787eb=_0x1cd259[_0x4971f6(0x1bb)]&&_0x3e192a[_0x4971f6(0x282)](_0x15ad58=>_0x15ad58[_0x4971f6(0x25d)]!==_0x4971f6(0x1e3)&&_0x15ad58['state']!==_0x4971f6(0x223));if(_0x2787eb){console[_0x4971f6(0x1fd)](a51_0x107aaa[_0x4971f6(0x25f)](_0x4971f6(0x119)));break;}console[_0x4971f6(0x1fd)](a51_0x107aaa['dim'](_0x4971f6(0x1ca)+_0xaa43bc*0x2+_0x4971f6(0x180))),await new Promise(_0x5cdbc9=>setTimeout(_0x5cdbc9,_0x1550f2)),_0xaa43bc++;}_0xaa43bc>=_0x53504c&&console[_0x4971f6(0x1fd)](a51_0x107aaa[_0x4971f6(0x2a5)](_0x4971f6(0x11c)));}['renderTimeline'](_0x450747,_0x2e010b,_0x55c825){const _0xc4232f=a51_0x4fe97f,_0x1a9fb6=[],_0x55dbae=TIMELINE_CONFIG[_0xc4232f(0x230)],_0x18662d=0x5,_0x36f06f=process['stdout'][_0xc4232f(0x1b1)]||0x78,_0xdfddaa=_0x36f06f-_0x55dbae-_0x18662d,_0x16901f=Math['max'](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0xc4232f(0x11b)](_0xdfddaa,TIMELINE_CONFIG[_0xc4232f(0x141)])),_0x444af4=new Date(_0x450747['createdAt'])[_0xc4232f(0x1e8)](),_0x3e25e0=_0x450747[_0xc4232f(0x21f)]?new Date(_0x450747['finishedAt'])[_0xc4232f(0x1e8)]():Date['now'](),_0x5a4b54={'start':_0x444af4,'end':_0x3e25e0,'duration':_0x3e25e0-_0x444af4},_0x4b413b=new Map(),_0x13d0b8=[];for(const _0x2006aa of _0x2e010b){if(_0x2006aa[_0xc4232f(0x134)]){const _0x3bcef1=new Date(_0x2006aa[_0xc4232f(0x134)])[_0xc4232f(0x1e8)](),_0x3391cc=_0x2006aa[_0xc4232f(0x2a1)]?new Date(_0x2006aa[_0xc4232f(0x2a1)])[_0xc4232f(0x1e8)]():Date[_0xc4232f(0x20f)](),_0x1adc0b={'start':_0x3bcef1,'end':_0x3391cc,'duration':_0x3391cc-_0x3bcef1};_0x4b413b[_0xc4232f(0x1d7)](_0x2006aa['id'],_0x1adc0b),_0x13d0b8[_0xc4232f(0x1ee)]({'name':_0x2006aa[_0xc4232f(0x236)],'state':_0x2006aa[_0xc4232f(0x25d)]||_0xc4232f(0x21e),'window':_0x1adc0b});}else _0x13d0b8[_0xc4232f(0x1ee)]({'name':_0x2006aa[_0xc4232f(0x236)],'state':_0x2006aa[_0xc4232f(0x25d)]||'planned','window':undefined});}_0x13d0b8['sort']((_0x9a7df0,_0x11d995)=>{const _0x2fe0eb=_0xc4232f;if(!_0x9a7df0['window'])return 0x1;if(!_0x11d995[_0x2fe0eb(0x293)])return-0x1;return _0x9a7df0['window'][_0x2fe0eb(0x169)]-_0x11d995[_0x2fe0eb(0x293)][_0x2fe0eb(0x169)];});const _0xf04626=_0x13d0b8[_0xc4232f(0x1a8)],_0x10b1a5=_0xf04626>TIMELINE_CONFIG[_0xc4232f(0x26a)];_0x10b1a5&&_0x13d0b8[_0xc4232f(0x279)](TIMELINE_CONFIG[_0xc4232f(0x26a)]);const _0x30228f=calculateTimeScale(_0x5a4b54,_0x16901f),_0x37c2d4=_0x450747[_0xc4232f(0x1bb)]?_0x450747[_0xc4232f(0x24d)]?a51_0x107aaa['green']('success'):a51_0x107aaa[_0xc4232f(0x26f)](_0xc4232f(0x1fd)):a51_0x107aaa[_0xc4232f(0x1b2)](_0xc4232f(0x1e3)),_0x41dd06=_0x450747[_0xc4232f(0x104)]?.['id'],_0x4b3dd3=_0x450747[_0xc4232f(0x15e)];let _0x45abcf;if(_0x41dd06&&_0x4b3dd3){const _0x3fc0fd=getWorkflowAttemptUrl(_0x55c825,_0x41dd06,_0x4b3dd3,_0x450747['id']);_0x45abcf=hyperlink(a51_0x107aaa[_0xc4232f(0x19d)](_0x450747['id']),_0x3fc0fd);}else _0x45abcf=a51_0x107aaa[_0xc4232f(0x19d)](_0x450747['id']);_0x1a9fb6[_0xc4232f(0x1ee)]('Attempt:\x20'+_0x45abcf+_0xc4232f(0x21a)+_0x37c2d4+'\x20-\x20'+formatElapsed(_0x5a4b54[_0xc4232f(0x1ea)]));if(_0x13d0b8[_0xc4232f(0x1a8)]>0x0){const _0x3fb1d6=renderTimeAxis(_0x30228f,_0x16901f),_0x1278d4=new Date(_0x5a4b54[_0xc4232f(0x169)]),_0x36a304=formatDate(_0x1278d4),_0x458ff3=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0xc4232f(0x156)]+_0x55dbae,_0x56f81b=_0x36a304[_0xc4232f(0x160)](_0x458ff3),_0x2c45e1=a51_0x107aaa['dim'](_0x56f81b);_0x1a9fb6[_0xc4232f(0x1ee)](_0x2c45e1+'\x20'+_0x3fb1d6);for(const _0x3c0de5 of _0x13d0b8){_0x1a9fb6[_0xc4232f(0x1ee)](renderTaskRow(_0x3c0de5,_0x30228f,_0x16901f,_0x55dbae));}const _0x519e9d=calculateStats(_0x13d0b8);_0x1a9fb6[_0xc4232f(0x1ee)](formatStats(_0x519e9d)),_0x10b1a5&&_0x1a9fb6[_0xc4232f(0x1ee)](a51_0x107aaa[_0xc4232f(0x2a5)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0xc4232f(0x26a)]+_0xc4232f(0x1c5)+_0xf04626+_0xc4232f(0x128))),_0x1a9fb6[_0xc4232f(0x1ee)](''),_0x1a9fb6[_0xc4232f(0x1ee)](a51_0x107aaa[_0xc4232f(0x19d)](_0xc4232f(0x150))+('tdx\x20wf\x20attempt\x20'+_0x450747['id']+_0xc4232f(0x139))+a51_0x107aaa['dim'](_0xc4232f(0x2ae)));}else _0x1a9fb6['push'](_0xc4232f(0x163));return _0x1a9fb6[_0xc4232f(0x267)]('\x0a');}['buildTimelineData'](_0x2de5ce,_0x15cf23){const _0x1a9cca=a51_0x4fe97f,_0x27bda6=new Date(_0x2de5ce[_0x1a9cca(0x234)])['getTime'](),_0x4843a6=_0x2de5ce[_0x1a9cca(0x21f)]?new Date(_0x2de5ce['finishedAt'])[_0x1a9cca(0x1e8)]():Date[_0x1a9cca(0x20f)](),_0x2062f9=_0x4843a6-_0x27bda6,_0x53077d=[];for(const _0x3491a5 of _0x15cf23){if(_0x3491a5[_0x1a9cca(0x134)]){const _0x461b42=new Date(_0x3491a5[_0x1a9cca(0x134)])['getTime'](),_0x4f949b=_0x3491a5['updatedAt']?new Date(_0x3491a5[_0x1a9cca(0x2a1)])[_0x1a9cca(0x1e8)]():Date[_0x1a9cca(0x20f)]();_0x53077d[_0x1a9cca(0x1ee)]({'name':_0x3491a5[_0x1a9cca(0x236)],'state':_0x3491a5[_0x1a9cca(0x25d)]||_0x1a9cca(0x21e),'window':{'start':_0x461b42,'end':_0x4f949b,'duration':_0x4f949b-_0x461b42}});}else _0x53077d['push']({'name':_0x3491a5[_0x1a9cca(0x236)],'state':_0x3491a5[_0x1a9cca(0x25d)]||'planned','window':undefined});}const _0x1711ac=calculateStats(_0x53077d);return{'attempt':{'id':_0x2de5ce['id'],'status':_0x2de5ce['done']?_0x2de5ce['success']?_0x1a9cca(0x24d):_0x1a9cca(0x1fd):_0x1a9cca(0x1e3),'createdAt':_0x2de5ce[_0x1a9cca(0x234)],'finishedAt':_0x2de5ce['finishedAt'],'duration_ms':_0x2062f9},'tasks':_0x53077d[_0x1a9cca(0x1eb)](_0xb3f1b9=>({'name':_0xb3f1b9[_0x1a9cca(0x19a)],'state':_0xb3f1b9[_0x1a9cca(0x25d)],'startedAt':_0xb3f1b9['window']?new Date(_0xb3f1b9[_0x1a9cca(0x293)][_0x1a9cca(0x169)])[_0x1a9cca(0x19f)]():null,'updatedAt':_0xb3f1b9['window']?new Date(_0xb3f1b9['window']['end'])[_0x1a9cca(0x19f)]():null,'duration_ms':_0xb3f1b9[_0x1a9cca(0x293)]?.[_0x1a9cca(0x1ea)]||null})),'stats':_0x1711ac};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24b42e,_0x2fd16a){const _0x5ab817=a52_0x54f0,_0x551403=_0x24b42e();while(!![]){try{const _0x3c8ff0=parseInt(_0x5ab817(0x17d))/0x1*(parseInt(_0x5ab817(0x18d))/0x2)+parseInt(_0x5ab817(0x17f))/0x3*(parseInt(_0x5ab817(0x184))/0x4)+-parseInt(_0x5ab817(0x187))/0x5+-parseInt(_0x5ab817(0x185))/0x6+-parseInt(_0x5ab817(0x18c))/0x7*(-parseInt(_0x5ab817(0x17c))/0x8)+parseInt(_0x5ab817(0x180))/0x9+-parseInt(_0x5ab817(0x17e))/0xa;if(_0x3c8ff0===_0x2fd16a)break;else _0x551403['push'](_0x551403['shift']());}catch(_0x34f59f){_0x551403['push'](_0x551403['shift']());}}}(a52_0x4587,0xdabf4));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 _0x511593=a52_0x54f0,_0x52e5db=getVersion(),_0x420c5f=platform(),_0x6d596f=process[_0x511593(0x18a)]['replace']('v','');return'tdx/'+_0x52e5db+'\x20('+_0x420c5f+_0x511593(0x183)+_0x6d596f+')';}function a52_0x54f0(_0x2dbb1d,_0x19ed0f){_0x2dbb1d=_0x2dbb1d-0x17c;const _0x4587fb=a52_0x4587();let _0x54f0db=_0x4587fb[_0x2dbb1d];return _0x54f0db;}export function getAuthHeaders(_0x14b20b,_0x5ce8b5,_0x5670af){const _0x36f72d=a52_0x54f0,_0x22fe73=getVersion(),_0xb44958={'User-Agent':getUserAgent(),'X-TD-Client':_0x36f72d(0x18b),'X-TD-Client-Version':_0x22fe73};if(_0x5670af)_0xb44958['Authorization']=_0x36f72d(0x182)+_0x5670af;else _0x5ce8b5&&(_0xb44958[_0x36f72d(0x188)]=_0x36f72d(0x186)+_0x5ce8b5);return _0xb44958;}function a52_0x4587(){const _0x25ebe6=['32153yvWvPo','16952380SUFSfR','2571RtIqiw','6549417jMPhNh','length','Bearer\x20',';\x20node/','2504qYNeEg','1060734hQwVEC','TD1\x20','2876355mYxdeE','Authorization','X-Trino-User','version','tdx','7LMKCJp','62WXrmIm','8658784tYgIOY'];a52_0x4587=function(){return _0x25ebe6;};return a52_0x4587();}export function toHeaderRecord(_0x3c4975){const _0x76c424={};for(const [_0x2e5b95,_0x611361]of Object['entries'](_0x3c4975)){_0x611361!==undefined&&(_0x76c424[_0x2e5b95]=_0x611361);}return _0x76c424;}export function getTrinoHeaders(_0x3e25f8,_0x1ae186,_0x2d4606){const _0x27f99d=a52_0x54f0,_0x24ab1b=getAuthHeaders(_0x3e25f8),_0x5369c7=toHeaderRecord(_0x24ab1b);if(_0x2d4606)_0x5369c7[_0x27f99d(0x188)]='Bearer\x20'+_0x2d4606;else _0x1ae186&&(_0x5369c7[_0x27f99d(0x189)]=_0x1ae186);return _0x5369c7;}export function hasAPIKey(_0x48eae4){const _0x14245c=a52_0x54f0,_0x2314f0=getAPIKey();return _0x2314f0!==undefined&&_0x2314f0[_0x14245c(0x181)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x532838,_0x51caf9){const _0xa5e27f=a53_0x28da,_0xf82e0e=_0x532838();while(!![]){try{const _0x54f811=-parseInt(_0xa5e27f(0x202))/0x1*(-parseInt(_0xa5e27f(0x1dc))/0x2)+parseInt(_0xa5e27f(0x1ed))/0x3*(parseInt(_0xa5e27f(0x200))/0x4)+-parseInt(_0xa5e27f(0x1c2))/0x5+parseInt(_0xa5e27f(0x1c5))/0x6*(parseInt(_0xa5e27f(0x1f2))/0x7)+-parseInt(_0xa5e27f(0x1be))/0x8*(-parseInt(_0xa5e27f(0x1d0))/0x9)+-parseInt(_0xa5e27f(0x1e8))/0xa+parseInt(_0xa5e27f(0x1cc))/0xb*(-parseInt(_0xa5e27f(0x1bc))/0xc);if(_0x54f811===_0x51caf9)break;else _0xf82e0e['push'](_0xf82e0e['shift']());}catch(_0x534e13){_0xf82e0e['push'](_0xf82e0e['shift']());}}}(a53_0x2feb,0x544fc));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a53_0x524e49 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x2389bc){const _0x4a188f=a53_0x28da;return _0x2389bc[_0x4a188f(0x1c9)]===_0x4a188f(0x1c3)||_0x2389bc[_0x4a188f(0x1c9)]===_0x4a188f(0x1fc)||_0x2389bc[_0x4a188f(0x1c9)]===_0x4a188f(0x1c8)||_0x2389bc[_0x4a188f(0x1c9)]===_0x4a188f(0x201)||_0x2389bc[_0x4a188f(0x1c3)]===!![]||_0x2389bc[_0x4a188f(0x1fc)]===!![]||_0x2389bc[_0x4a188f(0x1c8)]===!![]||_0x2389bc[_0x4a188f(0x201)]===!![];}export function parseOutputOptions(_0x5856f2){const _0x32ff51=a53_0x28da;return{'format':_0x5856f2[_0x32ff51(0x1c9)]||_0x32ff51(0x201),'output':_0x5856f2['output']||'','limit':_0x5856f2[_0x32ff51(0x1d7)],'limitStructuredFormats':_0x5856f2[_0x32ff51(0x1fb)],'color':_0x5856f2['color'],'noColor':_0x5856f2[_0x32ff51(0x1bb)]};}function convertSDKResultToQueryResult(_0x3c8cd0){const _0x206e26=a53_0x28da,_0x1acc08=[];if(_0x3c8cd0[_0x206e26(0x1f9)]>0x0){const _0x35ff45=_0x3c8cd0[0x0];for(const [_0x16348e,_0x1368ac]of Object[_0x206e26(0x1da)](_0x35ff45)){let _0x21c3c1='varchar';if(typeof _0x1368ac===_0x206e26(0x1ff))_0x21c3c1=Number[_0x206e26(0x1c6)](_0x1368ac)?_0x206e26(0x1e1):_0x206e26(0x204);else{if(typeof _0x1368ac===_0x206e26(0x1f1))_0x21c3c1=_0x206e26(0x1f1);else _0x1368ac===null&&(_0x21c3c1='varchar');}_0x1acc08[_0x206e26(0x1c1)]({'name':_0x16348e,'type':_0x21c3c1});}}return{'queryId':_0x206e26(0x1f6),'columns':_0x1acc08,'data':_0x3c8cd0,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3c8cd0[_0x206e26(0x1f9)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x1bdb0c,_0xb93201){const _0x20c280=convertSDKResultToQueryResult(_0x1bdb0c);return formatQueryOutput(_0x20c280,_0xb93201);}export async function formatQueryOutput(_0x502e85,_0xbb8c48){const _0x5c24d3=a53_0x28da,{format:_0x540e6d,limit:_0x457309,output:_0xdf6f3e,color:_0x49c415,noColor:_0x2f8edb,limitStructuredFormats:_0x131019}=_0xbb8c48,_0x25fd8e=Boolean(_0xdf6f3e)&&!_0x49c415,_0x310435={'color':_0x49c415,'noColor':_0x2f8edb||_0x25fd8e};if(_0x540e6d===_0x5c24d3(0x201)){const _0x597b34=shouldUseLess(_0x540e6d,_0xdf6f3e);return formatAsTable(_0x502e85,_0x457309,_0x597b34,_0x310435);}const _0x32dc2e=_0x131019&&Number['isFinite'](_0x457309)&&_0x502e85[_0x5c24d3(0x1ea)]['length']>_0x457309?{..._0x502e85,'data':_0x502e85[_0x5c24d3(0x1ea)]['slice'](0x0,_0x457309)}:_0x502e85;if(_0x540e6d===_0x5c24d3(0x1c3))return formatAsJSON(_0x32dc2e,_0x310435);else return _0x540e6d==='jsonl'?formatAsJSONL(_0x32dc2e,_0x310435):formatQueryResult(_0x32dc2e,_0x540e6d);}function shouldUseLess(_0x61b710,_0x311a5f){const _0x535cc1=a53_0x28da;return(_0x61b710==='table'||_0x61b710===_0x535cc1(0x1e3))&&process[_0x535cc1(0x1f7)][_0x535cc1(0x1c4)]&&!_0x311a5f;}export function resolveOutputOptions(_0x1da157){const _0x5ea93e=a53_0x28da,_0x2b258b=_0x1da157[_0x5ea93e(0x1eb)]||'',_0x1f4e8b=resolveOutputFormat(_0x1da157['format'],_0x2b258b,_0x5ea93e(0x201));let _0x21f873=typeof _0x1da157[_0x5ea93e(0x1d7)]===_0x5ea93e(0x1ff)?_0x1da157['limit']:parseInt(_0x1da157[_0x5ea93e(0x1d7)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x1da157['limit']===undefined&&shouldUseLess(_0x1f4e8b,_0x2b258b)&&(_0x21f873=Infinity),{'format':_0x1f4e8b,'output':_0x2b258b,'limit':_0x21f873,'limitStructuredFormats':_0x1da157[_0x5ea93e(0x1fb)],'color':_0x1da157[_0x5ea93e(0x1ee)],'noColor':_0x1da157[_0x5ea93e(0x1bb)]};}function a53_0x2feb(){const _0x449d75=['2176493gapIUr','magenta','query','yellow','135MzwFem','map','debug','repeat','bold','blue','red','limit','-FXRSn','─┬─','entries','pipe','665156hDKBje','[error]','error','inherit','trim','bigint','string','list','─┴─','cmdout','padEnd','rule','3283780StSPeL','keys','data','output','cyan','6egxdyo','color','params','log','boolean','973RdztHy','[logs]','max','stderr','sdk-result','stdout','write','length','[rule]','limitStructuredFormats','jsonl','join','split','number','354640gtWtmG','table','2pASNVD','filter','double','[query]','noColor','12VGFRYp','stdin','213848haLUBq','object','forEach','push','2436845rEhrMO','json','isTTY','4986KEDnvo','isInteger','resolve','tsv','format','stringify','less'];a53_0x2feb=function(){return _0x449d75;};return a53_0x2feb();}export function writeOutput(_0x2a38a5,_0x3742fa,_0x279ecf){const _0x21f90d=a53_0x28da;return _0x3742fa?(writeFileSync(_0x3742fa,_0x2a38a5),console[_0x21f90d(0x1de)]('Results\x20saved\x20to\x20'+_0x3742fa),Promise[_0x21f90d(0x1c7)]()):shouldUseLess(_0x279ecf||'','')?new Promise(_0x4b7f95=>{const _0x4acea4=_0x21f90d,_0x23d678=spawn(_0x4acea4(0x1cb),[_0x4acea4(0x1d8)],{'stdio':[_0x4acea4(0x1db),_0x4acea4(0x1df),'inherit']});let _0xc4013c=![];_0x23d678['on'](_0x4acea4(0x1de),()=>{const _0x3e37e1=_0x4acea4;!_0xc4013c&&(_0xc4013c=!![],console[_0x3e37e1(0x1f0)](_0x2a38a5),_0x4b7f95());}),_0x23d678['on']('close',()=>{!_0xc4013c&&(_0xc4013c=!![],_0x4b7f95());}),_0x23d678['on']('spawn',()=>{const _0x42a416=_0x4acea4;!_0xc4013c&&_0x23d678[_0x42a416(0x1bd)]&&(_0x23d678['stdin']['on'](_0x42a416(0x1de),()=>{}),_0x23d678[_0x42a416(0x1bd)][_0x42a416(0x1f8)](_0x2a38a5),_0x23d678['stdin']['end']());}),!_0x23d678['stdin']&&(!_0xc4013c&&(_0xc4013c=!![],console['log'](_0x2a38a5),_0x4b7f95()));}):(console[_0x21f90d(0x1f0)](_0x2a38a5),Promise[_0x21f90d(0x1c7)]());}export async function handleSDKOutput(_0x21cc94,_0x5f1b53){const _0x2a2f52=a53_0x28da,_0x308986=resolveOutputOptions(_0x5f1b53),_0xdfe745=await formatSDKOutput(_0x21cc94,_0x308986);await writeOutput(_0xdfe745,_0x308986[_0x2a2f52(0x1eb)]||undefined,_0x308986['format']);}function a53_0x28da(_0x520c34,_0x22c580){_0x520c34=_0x520c34-0x1bb;const _0x2febbb=a53_0x2feb();let _0x28da91=_0x2febbb[_0x520c34];return _0x28da91;}export async function handleQueryOutput(_0x1d52e5,_0x18dd99){const _0x2a645c=a53_0x28da,_0x3e98bf=resolveOutputOptions(_0x18dd99),_0x40d1a8=await formatQueryOutput(_0x1d52e5,_0x3e98bf);await writeOutput(_0x40d1a8,_0x3e98bf[_0x2a645c(0x1eb)]||undefined,_0x3e98bf[_0x2a645c(0x1c9)]);}async function formatSingleObject(_0x42ce6a,_0x41b48d){const _0x133be6=a53_0x28da,{format:_0x39bc61,color:_0x5d238b,noColor:_0x51f97d}=_0x41b48d,_0x232155={'color':_0x5d238b,'noColor':_0x51f97d};if(_0x39bc61===_0x133be6(0x1c3)){if(shouldUseColor(_0x232155))return colorizeJSON(_0x42ce6a,_0x232155);return JSON[_0x133be6(0x1ca)](_0x42ce6a,null,0x2);}else{if(_0x39bc61==='jsonl'){if(shouldUseColor(_0x232155))return colorizeJSONCompact(_0x42ce6a,_0x232155);return JSON[_0x133be6(0x1ca)](_0x42ce6a);}else{if(_0x39bc61===_0x133be6(0x1c8))return Object[_0x133be6(0x1da)](_0x42ce6a)[_0x133be6(0x1d1)](([_0x42d1c6,_0x3e1302])=>_0x42d1c6+'\x09'+_0x3e1302)['join']('\x0a');else{const _0x1fdce7=Object[_0x133be6(0x1da)](_0x42ce6a);if(_0x1fdce7[_0x133be6(0x1f9)]===0x0)return'No\x20data';const _0x297cda=_0x42ce6a[_0x133be6(0x1d2)],_0x318ba1=_0x42ce6a['query'],_0x2bcfa6=_0x42ce6a[_0x133be6(0x1ef)],_0xfc701e=_0x42ce6a[_0x133be6(0x1e7)],_0x19ee2c=_0x318ba1?typeof _0x318ba1===_0x133be6(0x1e2)?_0x318ba1:JSON['stringify'](_0x318ba1,null,0x2):undefined,_0x4b8613=_0x2bcfa6&&Object[_0x133be6(0x1e9)](_0x2bcfa6)[_0x133be6(0x1f9)]>0x0?JSON['stringify'](_0x2bcfa6,null,0x2):undefined,_0x4a22f8=_0xfc701e&&Object[_0x133be6(0x1e9)](_0xfc701e)['length']>0x0?JSON[_0x133be6(0x1ca)](_0xfc701e,null,0x2):undefined,_0x3d381c=_0x1fdce7[_0x133be6(0x203)](([_0x3a905b])=>_0x3a905b!==_0x133be6(0x1d2)&&_0x3a905b!==_0x133be6(0x1ce)&&_0x3a905b!==_0x133be6(0x1ef)&&_0x3a905b!==_0x133be6(0x1e7)),_0xd3ab4=Math[_0x133be6(0x1f4)](..._0x3d381c[_0x133be6(0x1d1)](([_0x4f7d72])=>_0x4f7d72['length'])),_0x21fb22=Math[_0x133be6(0x1f4)](..._0x3d381c[_0x133be6(0x1d1)](([,_0xe1bf40])=>{const _0x174716=_0x133be6;try{const _0x376742=_0xe1bf40===null||_0xe1bf40===undefined?'':typeof _0xe1bf40===_0x174716(0x1bf)?JSON[_0x174716(0x1ca)](_0xe1bf40):String(_0xe1bf40),_0xdd014c=_0x376742[_0x174716(0x1fe)]('\x0a');return Math[_0x174716(0x1f4)](..._0xdd014c[_0x174716(0x1d1)](_0x51c920=>_0x51c920[_0x174716(0x1f9)]),0x0);}catch{return 0x0;}}),0x14),_0x155543=[];_0x155543[_0x133be6(0x1c1)](colorBorder('┌─'+'─'[_0x133be6(0x1d3)](_0xd3ab4)+_0x133be6(0x1d9)+'─'['repeat'](_0x21fb22)+'─┐',_0x232155)),_0x3d381c[_0x133be6(0x1c0)](([_0x37404b,_0x56f3b4])=>{const _0x4fc59a=_0x133be6;let _0x4a82c4;try{_0x4a82c4=_0x56f3b4===null||_0x56f3b4===undefined?'':typeof _0x56f3b4===_0x4fc59a(0x1bf)?JSON[_0x4fc59a(0x1ca)](_0x56f3b4):String(_0x56f3b4);}catch{_0x4a82c4='[Object]';}const _0x403eb1=_0x37404b[_0x4fc59a(0x1e6)](_0xd3ab4),_0x55df86=_0x4a82c4['split']('\x0a');_0x55df86[_0x4fc59a(0x1c0)]((_0x137b5b,_0x517cdc)=>{const _0x531f9d=_0x4fc59a,_0x32748b=colorBorder('│',_0x232155);_0x517cdc===0x0?_0x155543[_0x531f9d(0x1c1)](_0x32748b+'\x20'+_0x403eb1+'\x20'+_0x32748b+'\x20'+_0x137b5b[_0x531f9d(0x1e6)](_0x21fb22)+'\x20'+_0x32748b):_0x155543[_0x531f9d(0x1c1)](_0x32748b+'\x20'+'\x20'[_0x531f9d(0x1d3)](_0xd3ab4)+'\x20'+_0x32748b+'\x20'+_0x137b5b[_0x531f9d(0x1e6)](_0x21fb22)+'\x20'+_0x32748b);});}),_0x155543[_0x133be6(0x1c1)](colorBorder('└─'+'─'['repeat'](_0xd3ab4)+_0x133be6(0x1e4)+'─'[_0x133be6(0x1d3)](_0x21fb22)+'─┘',_0x232155));_0x19ee2c&&(_0x155543['push'](''),_0x155543[_0x133be6(0x1c1)](String(a53_0x524e49[_0x133be6(0x1cf)][_0x133be6(0x1d4)](_0x133be6(0x205)))),_0x155543[_0x133be6(0x1c1)](_0x19ee2c));_0x4b8613&&(_0x155543[_0x133be6(0x1c1)](''),_0x155543[_0x133be6(0x1c1)](String(a53_0x524e49[_0x133be6(0x1d5)][_0x133be6(0x1d4)]('[params]'))),_0x155543[_0x133be6(0x1c1)](_0x4b8613));_0x4a22f8&&(_0x155543[_0x133be6(0x1c1)](''),_0x155543['push'](String(a53_0x524e49[_0x133be6(0x1cd)]['bold'](_0x133be6(0x1fa)))),_0x155543[_0x133be6(0x1c1)](_0x4a22f8));if(_0x297cda){if(_0x297cda[_0x133be6(0x1f5)]){_0x155543[_0x133be6(0x1c1)](''),_0x155543[_0x133be6(0x1c1)](String(a53_0x524e49[_0x133be6(0x1d6)][_0x133be6(0x1d4)](_0x133be6(0x1dd))));const _0x4ded92=_0x297cda[_0x133be6(0x1f5)][_0x133be6(0x1fe)]('\x0a');_0x4ded92[_0x133be6(0x1c0)](_0xa6e660=>{const _0x149e7d=_0x133be6;_0xa6e660[_0x149e7d(0x1e0)]()&&_0x155543[_0x149e7d(0x1c1)](_0xa6e660);});}if(_0x297cda[_0x133be6(0x1e5)]){_0x155543[_0x133be6(0x1c1)](''),_0x155543['push'](String(a53_0x524e49[_0x133be6(0x1ec)][_0x133be6(0x1d4)](_0x133be6(0x1f3))));const _0xa95722=_0x297cda[_0x133be6(0x1e5)][_0x133be6(0x1fe)]('\x0a');_0xa95722['forEach'](_0x228068=>{const _0x9f6aa4=_0x133be6;_0x228068['trim']()&&_0x155543[_0x9f6aa4(0x1c1)](_0x228068);});}}return _0x155543[_0x133be6(0x1fd)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x1b62e7,_0x192d85){const _0x30bc80=a53_0x28da;if(_0x192d85['format']===_0x30bc80(0x201)){await handleSDKOutput([_0x1b62e7],_0x192d85);return;}const _0x52f8b0=resolveOutputOptions(_0x192d85),_0xf31543=await formatSingleObject(_0x1b62e7,_0x52f8b0);await writeOutput(_0xf31543,_0x52f8b0[_0x30bc80(0x1eb)]||undefined,_0x52f8b0['format']);}
|
|
1
|
+
(function(_0x4e56c6,_0x3a649b){const _0x5be4b1=a53_0x2189,_0xf64b1f=_0x4e56c6();while(!![]){try{const _0x515a9b=parseInt(_0x5be4b1(0xbf))/0x1+parseInt(_0x5be4b1(0x102))/0x2+parseInt(_0x5be4b1(0xfa))/0x3+-parseInt(_0x5be4b1(0xfd))/0x4+-parseInt(_0x5be4b1(0xe4))/0x5*(parseInt(_0x5be4b1(0xc3))/0x6)+parseInt(_0x5be4b1(0xeb))/0x7*(-parseInt(_0x5be4b1(0xcb))/0x8)+parseInt(_0x5be4b1(0xc9))/0x9*(-parseInt(_0x5be4b1(0xde))/0xa);if(_0x515a9b===_0x3a649b)break;else _0xf64b1f['push'](_0xf64b1f['shift']());}catch(_0x2c6644){_0xf64b1f['push'](_0xf64b1f['shift']());}}}(a53_0x567f,0x91a15));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a53_0x2875ed from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x268e25){const _0x404efb=a53_0x2189;return _0x268e25[_0x404efb(0xc1)]==='json'||_0x268e25[_0x404efb(0xc1)]===_0x404efb(0xea)||_0x268e25[_0x404efb(0xc1)]===_0x404efb(0xee)||_0x268e25[_0x404efb(0xc1)]===_0x404efb(0xf0)||_0x268e25[_0x404efb(0xdb)]===!![]||_0x268e25[_0x404efb(0xea)]===!![]||_0x268e25['tsv']===!![]||_0x268e25[_0x404efb(0xf0)]===!![];}export function parseOutputOptions(_0x3e1cea){const _0x4c0c4c=a53_0x2189;return{'format':_0x3e1cea[_0x4c0c4c(0xc1)]||_0x4c0c4c(0xf0),'output':_0x3e1cea[_0x4c0c4c(0xef)]||'','limit':_0x3e1cea[_0x4c0c4c(0xed)],'limitStructuredFormats':_0x3e1cea[_0x4c0c4c(0xf4)],'color':_0x3e1cea[_0x4c0c4c(0xd1)],'noColor':_0x3e1cea[_0x4c0c4c(0xf3)]};}function convertSDKResultToQueryResult(_0x444d01){const _0x113e2c=a53_0x2189,_0xbca67c=[];if(_0x444d01[_0x113e2c(0xd9)]>0x0){const _0x1227fc=_0x444d01[0x0];for(const [_0x245f9a,_0x450750]of Object[_0x113e2c(0xc4)](_0x1227fc)){let _0x5bb52b=_0x113e2c(0xc6);if(typeof _0x450750===_0x113e2c(0x105))_0x5bb52b=Number[_0x113e2c(0xe1)](_0x450750)?_0x113e2c(0x104):'double';else{if(typeof _0x450750===_0x113e2c(0xc2))_0x5bb52b=_0x113e2c(0xc2);else _0x450750===null&&(_0x5bb52b=_0x113e2c(0xc6));}_0xbca67c[_0x113e2c(0xff)]({'name':_0x245f9a,'type':_0x5bb52b});}}return{'queryId':'sdk-result','columns':_0xbca67c,'data':_0x444d01,'stats':{'state':_0x113e2c(0x101),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x444d01[_0x113e2c(0xd9)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0xd74005,_0x2782f3){const _0x3f65d5=convertSDKResultToQueryResult(_0xd74005);return formatQueryOutput(_0x3f65d5,_0x2782f3);}export async function formatQueryOutput(_0x4c27a2,_0x4093cf){const _0x130328=a53_0x2189,{format:_0x5efcac,limit:_0x389bd7,output:_0x2d39ed,color:_0x2d6118,noColor:_0x3897d1,limitStructuredFormats:_0x32f288}=_0x4093cf,_0x1b4c2f=Boolean(_0x2d39ed)&&!_0x2d6118,_0x297346={'color':_0x2d6118,'noColor':_0x3897d1||_0x1b4c2f};if(_0x5efcac===_0x130328(0xf0)){const _0x44fd81=shouldUseLess(_0x5efcac,_0x2d39ed);return formatAsTable(_0x4c27a2,_0x389bd7,_0x44fd81,_0x297346);}const _0x2540e3=_0x32f288&&Number[_0x130328(0xd5)](_0x389bd7)&&_0x4c27a2[_0x130328(0xda)][_0x130328(0xd9)]>_0x389bd7?{..._0x4c27a2,'data':_0x4c27a2[_0x130328(0xda)][_0x130328(0xe7)](0x0,_0x389bd7)}:_0x4c27a2;if(_0x5efcac==='json')return formatAsJSON(_0x2540e3,_0x297346);else return _0x5efcac===_0x130328(0xea)?formatAsJSONL(_0x2540e3,_0x297346):formatQueryResult(_0x2540e3,_0x5efcac);}function shouldUseLess(_0x5ae8d5,_0x4ea5de){const _0x5e1ed9=a53_0x2189;return(_0x5ae8d5===_0x5e1ed9(0xf0)||_0x5ae8d5===_0x5e1ed9(0xf1))&&process[_0x5e1ed9(0xd4)][_0x5e1ed9(0xdd)]&&!_0x4ea5de;}export function resolveOutputOptions(_0x450160){const _0x561ed4=a53_0x2189,_0x5caa7f=_0x450160[_0x561ed4(0xef)]||'',_0x3668a0=resolveOutputFormat(_0x450160[_0x561ed4(0xc1)],_0x5caa7f,_0x561ed4(0xf0));let _0x3fd1b4=typeof _0x450160[_0x561ed4(0xed)]===_0x561ed4(0x105)?_0x450160[_0x561ed4(0xed)]:parseInt(_0x450160[_0x561ed4(0xed)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x450160[_0x561ed4(0xed)]===undefined&&shouldUseLess(_0x3668a0,_0x5caa7f)&&(_0x3fd1b4=Infinity),{'format':_0x3668a0,'output':_0x5caa7f,'limit':_0x3fd1b4,'limitStructuredFormats':_0x450160[_0x561ed4(0xf4)],'color':_0x450160[_0x561ed4(0xd1)],'noColor':_0x450160[_0x561ed4(0xf3)]};}function a53_0x2189(_0x33f8c1,_0x16369e){_0x33f8c1=_0x33f8c1-0xba;const _0x567fb0=a53_0x567f();let _0x218912=_0x567fb0[_0x33f8c1];return _0x218912;}export function writeOutput(_0x502527,_0xdd3863,_0x25a35f){const _0x4f4ffa=a53_0x2189;return _0xdd3863?(writeFileSync(_0xdd3863,_0x502527),console[_0x4f4ffa(0xd2)](_0x4f4ffa(0xcc)+_0xdd3863),Promise['resolve']()):shouldUseLess(_0x25a35f||'','')?new Promise(_0x23c0e0=>{const _0x5209b7=_0x4f4ffa,_0x5835d0=spawn(_0x5209b7(0xd7),[_0x5209b7(0xec)],{'stdio':['pipe',_0x5209b7(0xf9),_0x5209b7(0xf9)]});let _0x247a60=![];_0x5835d0['on'](_0x5209b7(0xd2),()=>{!_0x247a60&&(_0x247a60=!![],console['log'](_0x502527),_0x23c0e0());}),_0x5835d0['on'](_0x5209b7(0xba),()=>{!_0x247a60&&(_0x247a60=!![],_0x23c0e0());}),_0x5835d0['on'](_0x5209b7(0xfb),()=>{const _0x16b219=_0x5209b7;!_0x247a60&&_0x5835d0[_0x16b219(0xbe)]&&(_0x5835d0[_0x16b219(0xbe)]['on']('error',()=>{}),_0x5835d0[_0x16b219(0xbe)][_0x16b219(0x103)](_0x502527),_0x5835d0[_0x16b219(0xbe)][_0x16b219(0xbc)]());}),!_0x5835d0[_0x5209b7(0xbe)]&&(!_0x247a60&&(_0x247a60=!![],console[_0x5209b7(0xcf)](_0x502527),_0x23c0e0()));}):(console['log'](_0x502527),Promise['resolve']());}export async function handleSDKOutput(_0x470bb5,_0x385271){const _0x186eef=a53_0x2189,_0x33fe7f=resolveOutputOptions(_0x385271),_0x36e24c=await formatSDKOutput(_0x470bb5,_0x33fe7f);await writeOutput(_0x36e24c,_0x33fe7f[_0x186eef(0xef)]||undefined,_0x33fe7f['format']);}function a53_0x567f(){const _0x4b19f0=['data','json','join','isTTY','30bIjuXX','rule','[query]','isInteger','cyan','trim','10qrMnPk','blue','magenta','slice','[error]','repeat','jsonl','312886FlwjDH','-FXRSn','limit','tsv','output','table','list','object','noColor','limitStructuredFormats','[Object]','stringify','bold','red','inherit','476127kNOcnp','spawn','[rule]','939036NsrLTE','split','push','debug','FINISHED','2349000oOkPhT','write','bigint','number','close','cmdout','end','stderr','stdin','548808gFzrbN','params','format','boolean','1497186xJaoAl','entries','map','varchar','padEnd','forEach','716427GcgyEU','keys','56xqmGKJ','Results\x20saved\x20to\x20','─┴─','filter','log','max','color','error','No\x20data','stdout','isFinite','yellow','less','query','length'];a53_0x567f=function(){return _0x4b19f0;};return a53_0x567f();}export async function handleQueryOutput(_0x51fbe5,_0x2d4301){const _0x48f672=a53_0x2189,_0x3a71af=resolveOutputOptions(_0x2d4301),_0x3fb812=await formatQueryOutput(_0x51fbe5,_0x3a71af);await writeOutput(_0x3fb812,_0x3a71af[_0x48f672(0xef)]||undefined,_0x3a71af['format']);}async function formatSingleObject(_0x47bcd0,_0x4985be){const _0x82c3fd=a53_0x2189,{format:_0x2265ba,color:_0x423722,noColor:_0xfad5ca}=_0x4985be,_0x365fa6={'color':_0x423722,'noColor':_0xfad5ca};if(_0x2265ba===_0x82c3fd(0xdb)){if(shouldUseColor(_0x365fa6))return colorizeJSON(_0x47bcd0,_0x365fa6);return JSON[_0x82c3fd(0xf6)](_0x47bcd0,null,0x2);}else{if(_0x2265ba===_0x82c3fd(0xea)){if(shouldUseColor(_0x365fa6))return colorizeJSONCompact(_0x47bcd0,_0x365fa6);return JSON['stringify'](_0x47bcd0);}else{if(_0x2265ba===_0x82c3fd(0xee))return Object[_0x82c3fd(0xc4)](_0x47bcd0)[_0x82c3fd(0xc5)](([_0x3b2fe8,_0x5b744a])=>_0x3b2fe8+'\x09'+_0x5b744a)[_0x82c3fd(0xdc)]('\x0a');else{const _0x4bbc0b=Object[_0x82c3fd(0xc4)](_0x47bcd0);if(_0x4bbc0b['length']===0x0)return _0x82c3fd(0xd3);const _0x54ea5c=_0x47bcd0[_0x82c3fd(0x100)],_0x20955a=_0x47bcd0['query'],_0xdbf9ce=_0x47bcd0[_0x82c3fd(0xc0)],_0x365c1e=_0x47bcd0[_0x82c3fd(0xdf)],_0x56d773=_0x20955a?typeof _0x20955a==='string'?_0x20955a:JSON['stringify'](_0x20955a,null,0x2):undefined,_0x44c3d9=_0xdbf9ce&&Object[_0x82c3fd(0xca)](_0xdbf9ce)[_0x82c3fd(0xd9)]>0x0?JSON[_0x82c3fd(0xf6)](_0xdbf9ce,null,0x2):undefined,_0x581142=_0x365c1e&&Object[_0x82c3fd(0xca)](_0x365c1e)[_0x82c3fd(0xd9)]>0x0?JSON[_0x82c3fd(0xf6)](_0x365c1e,null,0x2):undefined,_0x2a990e=_0x4bbc0b[_0x82c3fd(0xce)](([_0x5ed521])=>_0x5ed521!==_0x82c3fd(0x100)&&_0x5ed521!==_0x82c3fd(0xd8)&&_0x5ed521!==_0x82c3fd(0xc0)&&_0x5ed521!=='rule'),_0x1e0444=Math['max'](..._0x2a990e[_0x82c3fd(0xc5)](([_0x15d037])=>_0x15d037['length'])),_0x5b4f38=Math[_0x82c3fd(0xd0)](..._0x2a990e[_0x82c3fd(0xc5)](([,_0x1e759c])=>{const _0x2a36d3=_0x82c3fd;try{const _0x422a78=_0x1e759c===null||_0x1e759c===undefined?'':typeof _0x1e759c===_0x2a36d3(0xf2)?JSON[_0x2a36d3(0xf6)](_0x1e759c):String(_0x1e759c),_0x482e60=_0x422a78[_0x2a36d3(0xfe)]('\x0a');return Math[_0x2a36d3(0xd0)](..._0x482e60['map'](_0x52364a=>_0x52364a[_0x2a36d3(0xd9)]),0x0);}catch{return 0x0;}}),0x14),_0x52208c=[];_0x52208c[_0x82c3fd(0xff)](colorBorder('┌─'+'─'[_0x82c3fd(0xe9)](_0x1e0444)+'─┬─'+'─'[_0x82c3fd(0xe9)](_0x5b4f38)+'─┐',_0x365fa6)),_0x2a990e[_0x82c3fd(0xc8)](([_0x1de053,_0x38a3a2])=>{const _0x2bc3d7=_0x82c3fd;let _0x1cd42d;try{_0x1cd42d=_0x38a3a2===null||_0x38a3a2===undefined?'':typeof _0x38a3a2===_0x2bc3d7(0xf2)?JSON[_0x2bc3d7(0xf6)](_0x38a3a2):String(_0x38a3a2);}catch{_0x1cd42d=_0x2bc3d7(0xf5);}const _0x1eaceb=_0x1de053[_0x2bc3d7(0xc7)](_0x1e0444),_0x1de4b5=_0x1cd42d['split']('\x0a');_0x1de4b5[_0x2bc3d7(0xc8)]((_0x5e5d60,_0x5007b5)=>{const _0x3f76de=_0x2bc3d7,_0x1f2cfb=colorBorder('│',_0x365fa6);_0x5007b5===0x0?_0x52208c[_0x3f76de(0xff)](_0x1f2cfb+'\x20'+_0x1eaceb+'\x20'+_0x1f2cfb+'\x20'+_0x5e5d60['padEnd'](_0x5b4f38)+'\x20'+_0x1f2cfb):_0x52208c[_0x3f76de(0xff)](_0x1f2cfb+'\x20'+'\x20'[_0x3f76de(0xe9)](_0x1e0444)+'\x20'+_0x1f2cfb+'\x20'+_0x5e5d60[_0x3f76de(0xc7)](_0x5b4f38)+'\x20'+_0x1f2cfb);});}),_0x52208c[_0x82c3fd(0xff)](colorBorder('└─'+'─'[_0x82c3fd(0xe9)](_0x1e0444)+_0x82c3fd(0xcd)+'─'[_0x82c3fd(0xe9)](_0x5b4f38)+'─┘',_0x365fa6));_0x56d773&&(_0x52208c['push'](''),_0x52208c['push'](String(a53_0x2875ed[_0x82c3fd(0xd6)][_0x82c3fd(0xf7)](_0x82c3fd(0xe0)))),_0x52208c[_0x82c3fd(0xff)](_0x56d773));_0x44c3d9&&(_0x52208c['push'](''),_0x52208c['push'](String(a53_0x2875ed[_0x82c3fd(0xe5)][_0x82c3fd(0xf7)]('[params]'))),_0x52208c[_0x82c3fd(0xff)](_0x44c3d9));_0x581142&&(_0x52208c[_0x82c3fd(0xff)](''),_0x52208c[_0x82c3fd(0xff)](String(a53_0x2875ed[_0x82c3fd(0xe6)]['bold'](_0x82c3fd(0xfc)))),_0x52208c['push'](_0x581142));if(_0x54ea5c){if(_0x54ea5c['stderr']){_0x52208c[_0x82c3fd(0xff)](''),_0x52208c[_0x82c3fd(0xff)](String(a53_0x2875ed[_0x82c3fd(0xf8)][_0x82c3fd(0xf7)](_0x82c3fd(0xe8))));const _0x1ee737=_0x54ea5c[_0x82c3fd(0xbd)][_0x82c3fd(0xfe)]('\x0a');_0x1ee737['forEach'](_0x4de985=>{const _0x1b8823=_0x82c3fd;_0x4de985[_0x1b8823(0xe3)]()&&_0x52208c[_0x1b8823(0xff)](_0x4de985);});}if(_0x54ea5c['cmdout']){_0x52208c['push'](''),_0x52208c[_0x82c3fd(0xff)](String(a53_0x2875ed[_0x82c3fd(0xe2)][_0x82c3fd(0xf7)]('[logs]')));const _0x26e427=_0x54ea5c[_0x82c3fd(0xbb)][_0x82c3fd(0xfe)]('\x0a');_0x26e427[_0x82c3fd(0xc8)](_0x514e96=>{const _0x1df287=_0x82c3fd;_0x514e96[_0x1df287(0xe3)]()&&_0x52208c['push'](_0x514e96);});}}return _0x52208c['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x27f599,_0x1a9944){const _0x11c1dc=a53_0x2189;if(_0x1a9944[_0x11c1dc(0xc1)]===_0x11c1dc(0xf0)){await handleSDKOutput([_0x27f599],_0x1a9944);return;}const _0x3e68ba=resolveOutputOptions(_0x1a9944),_0x3125a9=await formatSingleObject(_0x27f599,_0x3e68ba);await writeOutput(_0x3125a9,_0x3e68ba['output']||undefined,_0x3e68ba[_0x11c1dc(0xc1)]);}
|