@treasuredata/tdx 2026.3.5 → 2026.3.6
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/auth-login-command.d.ts +29 -0
- package/dist/commands/auth-login-command.d.ts.map +1 -0
- package/dist/commands/auth-login-command.js +1 -0
- package/dist/commands/auth-login-command.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/mcp-command.js.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.d.ts.map +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profile-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/status-command.js.map +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.d.ts +11 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/constants.js.map +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.d.ts +32 -0
- package/dist/core/oauth-keychain.d.ts.map +1 -0
- package/dist/core/oauth-keychain.js +1 -0
- package/dist/core/oauth-keychain.js.map +1 -0
- package/dist/core/oauth.d.ts +112 -0
- package/dist/core/oauth.d.ts.map +1 -0
- package/dist/core/oauth.js +1 -0
- package/dist/core/oauth.js.map +1 -0
- 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/endpoints.js.map +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.d.ts +16 -0
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -0
- package/dist/sdk/client/oauth-refresh.js +1 -0
- package/dist/sdk/client/oauth-refresh.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +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 a50_0x36cf24=a50_0x2ead;(function(_0x27c026,_0x1096ec){const _0x12765e=a50_0x2ead,_0x326b5b=_0x27c026();while(!![]){try{const _0x222d5f=-parseInt(_0x12765e(0x268))/0x1+-parseInt(_0x12765e(0x30d))/0x2+-parseInt(_0x12765e(0x30b))/0x3*(-parseInt(_0x12765e(0x207))/0x4)+parseInt(_0x12765e(0x29d))/0x5*(parseInt(_0x12765e(0x379))/0x6)+-parseInt(_0x12765e(0x2a9))/0x7+-parseInt(_0x12765e(0x2ff))/0x8+parseInt(_0x12765e(0x31d))/0x9;if(_0x222d5f===_0x1096ec)break;else _0x326b5b['push'](_0x326b5b['shift']());}catch(_0x88de0e){_0x326b5b['push'](_0x326b5b['shift']());}}}(a50_0x4e3c,0x2b953));import a50_0x2262f3 from'chalk';import{existsSync}from'fs';import a50_0x426a1b from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';function a50_0x2ead(_0x388c8b,_0x253029){_0x388c8b=_0x388c8b-0x1f3;const _0x4e3cee=a50_0x4e3c();let _0x2eade9=_0x4e3cee[_0x388c8b];return _0x2eade9;}import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a50_0x42cef6 from'prompts';function getAttemptStatusDisplay(_0x5e1677){const _0x453344=a50_0x2ead;if(!_0x5e1677)return{'icon':'⏳','text':''};const {done:_0x170dcc,success:_0x195f11,cancelRequested:_0x15baa3}=_0x5e1677;if(!_0x170dcc)return _0x15baa3?{'icon':'🛑','text':a50_0x2262f3[_0x453344(0x2ed)](_0x453344(0x2bc))}:{'icon':'🔄','text':a50_0x2262f3[_0x453344(0x24f)](_0x453344(0x2ba))};if(_0x195f11)return{'icon':'✅','text':a50_0x2262f3['green'](_0x453344(0x226))};return{'icon':'❌','text':a50_0x2262f3[_0x453344(0x312)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a50_0x36cf24(0x361)](_0x253d2d,_0x57eb1e,_0x14ec2e=0x0){return _0x253d2d[_0x14ec2e]||_0x57eb1e['workflowProject'];}[a50_0x36cf24(0x26e)](_0x7349f4,_0x4ed50c,_0x3aa07d=0x0){const _0x235b7e=a50_0x36cf24,_0x59fea0=this['resolveProject'](_0x7349f4,_0x4ed50c,_0x3aa07d);if(!_0x59fea0)return console['error'](a50_0x2262f3[_0x235b7e(0x312)](_0x235b7e(0x219)),_0x235b7e(0x2df)),console['error'](a50_0x2262f3[_0x235b7e(0x329)](_0x235b7e(0x21f))),null;return _0x59fea0;}['parseProjectWorkflowPattern'](_0x4cff02,_0x1980c0){const _0x53adde=a50_0x36cf24;if(_0x4cff02[0x0]){const _0x3d687b=_0x4cff02[0x0]['split']('.');if(_0x3d687b[_0x53adde(0x272)]===0x1)return{'projectName':_0x3d687b[0x0],'workflowName':undefined};else return _0x3d687b['length']===0x2?{'projectName':_0x3d687b[0x0],'workflowName':_0x3d687b[0x1]}:(console[_0x53adde(0x26f)](a50_0x2262f3[_0x53adde(0x312)](_0x53adde(0x219)),_0x53adde(0x2e0)),null);}return{'projectName':_0x1980c0[_0x53adde(0x325)],'workflowName':undefined};}[a50_0x36cf24(0x1ff)](_0x5c981e,_0x315f24,_0x104860=0x0){const _0x5871e0=a50_0x36cf24;if(_0x5c981e[_0x104860])return _0x5c981e[_0x104860];if(_0x315f24[_0x5871e0(0x325)]){const _0x2c90bb=a50_0x426a1b[_0x5871e0(0x31f)](process[_0x5871e0(0x2d8)](),_0x5871e0(0x216),_0x315f24[_0x5871e0(0x325)]);if(existsSync(a50_0x426a1b[_0x5871e0(0x31f)](_0x2c90bb,'tdx.json')))return _0x2c90bb;}return undefined;}async['showWorkflowConsoleUrl'](_0x3a27b6,_0x53db66,_0x70b57c){const _0x6cc7d3=a50_0x36cf24;try{const _0x58c22d=await _0x3a27b6[_0x6cc7d3(0x29f)][_0x6cc7d3(0x216)](_0x53db66,{'limit':0x1});if(_0x58c22d[_0x6cc7d3(0x272)]>0x0){const _0x135fb0=_0x58c22d[0x0]['id'],_0x2320d6=getWorkflowUrl(_0x70b57c,_0x135fb0);console[_0x6cc7d3(0x26f)]('\x20\x20Console:\x20'+a50_0x2262f3[_0x6cc7d3(0x2b5)](_0x2320d6));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x39c);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x31a);async['execute'](_0x3d793f){const _0x1dcb86=a50_0x36cf24,{options:_0x4ded54,args:_0x1fb014,tdx:_0x5c2ea3}=_0x3d793f,_0x25f33e=_0x1fb014[0x0],_0x27b1b5=_0x4ded54[_0x1dcb86(0x2bd)];if(_0x27b1b5)return saveSessionContext({'workflow_project':undefined},_0x4ded54[_0x1dcb86(0x2e3)]),console['log'](a50_0x2262f3[_0x1dcb86(0x37f)](_0x1dcb86(0x371))),0x0;if(!_0x25f33e)return console[_0x1dcb86(0x26f)](a50_0x2262f3['red'](_0x1dcb86(0x219)),_0x1dcb86(0x2df)),console[_0x1dcb86(0x26f)](a50_0x2262f3[_0x1dcb86(0x329)](_0x1dcb86(0x363))),console[_0x1dcb86(0x26f)](a50_0x2262f3[_0x1dcb86(0x329)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x4e9f5b=await withSpinner('Resolving\x20project\x20\x27'+_0x25f33e+_0x1dcb86(0x396),()=>_0x5c2ea3[_0x1dcb86(0x29f)][_0x1dcb86(0x2e1)](_0x25f33e),{'verbose':_0x4ded54[_0x1dcb86(0x279)]}),{name:_0x4975fb}=_0x4e9f5b[_0x1dcb86(0x215)];return saveSessionContext({'workflow_project':_0x4975fb},_0x4ded54[_0x1dcb86(0x2e3)]),console[_0x1dcb86(0x35a)](a50_0x2262f3[_0x1dcb86(0x37f)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a50_0x2262f3[_0x1dcb86(0x2b5)](_0x4975fb))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a50_0x36cf24(0x2d7)]='workflow:projects';[a50_0x36cf24(0x266)]=a50_0x36cf24(0x28a);async[a50_0x36cf24(0x35f)](_0x50afa4){const _0x262594=a50_0x36cf24,{options:_0x4a282b,args:_0x2ab2ac,tdx:_0x559bec}=_0x50afa4,_0x32340a=_0x2ab2ac[0x0];_0x4a282b['verbose']&&_0x32340a&&console[_0x262594(0x26f)](_0x262594(0x2c5)+_0x32340a);const _0x58d538=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x559bec[_0x262594(0x29f)][_0x262594(0x293)](_0x32340a,{'limit':_0x4a282b['limit']}),{'verbose':_0x4a282b[_0x262594(0x279)]});let _0x14f284=_0x58d538['data'];_0x14f284['sort']((_0x5abf13,_0x2f786b)=>_0x5abf13['name']['localeCompare'](_0x2f786b[_0x262594(0x2d7)]));const _0x4557ff=_0x4a282b[_0x262594(0x297)]||0x64,_0x353384=_0x14f284['length']>=_0x4557ff?a50_0x2262f3['dim'](_0x262594(0x295)):'';console[_0x262594(0x26f)](_0x262594(0x21a)+_0x14f284['length']+_0x262594(0x288)+(_0x14f284['length']!==0x1?'s':'')+_0x353384);if(_0x4a282b['format']===_0x262594(0x280)||_0x4a282b['format']===_0x262594(0x235)||_0x4a282b[_0x262594(0x2fb)]===_0x262594(0x32b))await handleSDKOutput(_0x14f284,_0x4a282b);else{if(_0x14f284[_0x262594(0x272)]===0x0)_0x32340a?console[_0x262594(0x35a)](_0x262594(0x397)+_0x32340a):console[_0x262594(0x35a)](_0x262594(0x313));else{const _0x518372=_0x14f284[_0x262594(0x2e4)](_0x54a5ff=>{const _0x45d879=_0x262594,_0x445e22=_0x54a5ff[_0x45d879(0x38e)]?.[_0x45d879(0x385)](_0x202cb0=>_0x202cb0[_0x45d879(0x2db)]===_0x45d879(0x343)),_0x58582f=_0x445e22?a50_0x2262f3[_0x45d879(0x329)](_0x45d879(0x332)):'';return'📁\x20'+_0x54a5ff[_0x45d879(0x2d7)]+_0x58582f;});await writeOutput(_0x518372['join']('\x0a'),_0x4a282b[_0x262594(0x341)],_0x262594(0x339));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x2b3);['description']='List\x20workflows';async['execute'](_0x1d49b3){const _0x21efcf=a50_0x36cf24,{options:_0x26b5a0,args:_0x47ddf5,tdx:_0x5df0b7}=_0x1d49b3,_0x14bd7f=this[_0x21efcf(0x361)](_0x47ddf5,_0x26b5a0);_0x26b5a0[_0x21efcf(0x279)]&&_0x14bd7f&&console[_0x21efcf(0x26f)](_0x21efcf(0x2fd)+_0x14bd7f);const _0x15e48a=await withSpinner(_0x21efcf(0x378),()=>_0x5df0b7['workflow'][_0x21efcf(0x216)](_0x14bd7f,{'limit':_0x26b5a0[_0x21efcf(0x297)]}),{'verbose':_0x26b5a0[_0x21efcf(0x279)]});let _0x597ff4=_0x15e48a[_0x21efcf(0x215)];_0x597ff4['sort']((_0x1c52b3,_0x204b37)=>{const _0x4fef58=_0x21efcf,_0x387865=_0x1c52b3[_0x4fef58(0x2d7)][_0x4fef58(0x2cd)](_0x204b37[_0x4fef58(0x2d7)]);if(_0x387865!==0x0)return _0x387865;return(_0x1c52b3[_0x4fef58(0x22b)]?.['name']||'')[_0x4fef58(0x2cd)](_0x204b37[_0x4fef58(0x22b)]?.[_0x4fef58(0x2d7)]||'');});const _0x22f229=_0x26b5a0[_0x21efcf(0x297)]||0x64,_0x880748=_0x597ff4[_0x21efcf(0x272)]>=_0x22f229?a50_0x2262f3[_0x21efcf(0x329)](_0x21efcf(0x295)):'';console['error'](_0x21efcf(0x21a)+_0x597ff4[_0x21efcf(0x272)]+'\x20workflow'+(_0x597ff4[_0x21efcf(0x272)]!==0x1?'s':'')+_0x880748);if(_0x26b5a0[_0x21efcf(0x2fb)]===_0x21efcf(0x280)||_0x26b5a0[_0x21efcf(0x2fb)]===_0x21efcf(0x235)||_0x26b5a0[_0x21efcf(0x2fb)]===_0x21efcf(0x32b))await handleSDKOutput(_0x597ff4,_0x26b5a0);else{if(_0x597ff4[_0x21efcf(0x272)]===0x0)_0x14bd7f?console[_0x21efcf(0x35a)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x14bd7f):console[_0x21efcf(0x35a)]('No\x20workflows\x20found');else{const _0x2fa1ff=_0x26b5a0[_0x21efcf(0x309)],_0x1512a7=_0x597ff4[_0x21efcf(0x2e4)](_0x1dcf57=>{const _0x11fc5f=_0x21efcf,_0xf38572=a50_0x2262f3[_0x11fc5f(0x329)]('#'+_0x1dcf57['id']),_0x3d9a35=hyperlink(_0xf38572,getWorkflowUrl(_0x2fa1ff,_0x1dcf57['id'])),_0x93ef9=_0x1dcf57[_0x11fc5f(0x22b)]?.[_0x11fc5f(0x2d7)]?a50_0x2262f3[_0x11fc5f(0x329)]('\x20('+_0x1dcf57[_0x11fc5f(0x22b)]['name']+')'):'';return _0x11fc5f(0x238)+_0x3d9a35+'\x20'+_0x1dcf57[_0x11fc5f(0x2d7)]+_0x93ef9;});await writeOutput(_0x1512a7[_0x21efcf(0x31f)]('\x0a'),_0x26b5a0[_0x21efcf(0x341)],_0x21efcf(0x339));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a50_0x36cf24(0x23f);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x2be);async[a50_0x36cf24(0x35f)](_0x40d9fd){const _0x44ad17=a50_0x36cf24,{options:_0x4bdd20,args:_0x594e65,tdx:_0x20d614}=_0x40d9fd,_0x4ed671=this['parseProjectWorkflowPattern'](_0x594e65,_0x4bdd20);if(!_0x4ed671)return 0x1;const {projectName:_0x59f012,workflowName:_0x35c53e}=_0x4ed671;if(_0x4bdd20[_0x44ad17(0x279)]){if(_0x59f012&&_0x35c53e)console[_0x44ad17(0x26f)](_0x44ad17(0x37e)+_0x59f012+'.'+_0x35c53e);else _0x59f012&&console['error'](_0x44ad17(0x326)+_0x59f012);const _0x633f7f=_0x4bdd20[_0x44ad17(0x202)];_0x633f7f&&console[_0x44ad17(0x26f)]('Status:\x20'+_0x633f7f);}let _0x17cbdb=0x28;if(process[_0x44ad17(0x333)][_0x44ad17(0x351)]&&!_0x4bdd20[_0x44ad17(0x341)]&&!_0x4bdd20[_0x44ad17(0x2fb)]){const _0xf81a0d=process[_0x44ad17(0x333)][_0x44ad17(0x2ee)]||0x28;_0x17cbdb=Math[_0x44ad17(0x23d)](0x14,Math[_0x44ad17(0x287)](_0xf81a0d*0x2/0x3));}const _0x19de4f=_0x4bdd20['limit']||_0x17cbdb,_0x5c164f=await withSpinner(_0x44ad17(0x224),()=>_0x20d614[_0x44ad17(0x29f)]['sessions']({'projectName':_0x59f012,'workflowName':_0x35c53e,'status':_0x4bdd20[_0x44ad17(0x202)],'fromTime':_0x4bdd20['from'],'toTime':_0x4bdd20['to'],'limit':_0x19de4f}),{'verbose':_0x4bdd20[_0x44ad17(0x279)]}),_0xf10d17=_0x5c164f[_0x44ad17(0x215)];_0xf10d17[_0x44ad17(0x22a)]((_0x2a4bbf,_0x437226)=>{const _0x3e99b4=_0x44ad17,_0x1d0cef=_0x2a4bbf[_0x3e99b4(0x296)]||'',_0x4d4167=_0x437226[_0x3e99b4(0x296)]||'';return _0x4d4167[_0x3e99b4(0x2cd)](_0x1d0cef);});_0xf10d17['length']>=_0x19de4f?console[_0x44ad17(0x26f)]('✔\x20Showing\x20'+_0xf10d17[_0x44ad17(0x272)]+_0x44ad17(0x31c)+a50_0x2262f3[_0x44ad17(0x329)](_0x44ad17(0x36f))):console[_0x44ad17(0x26f)](_0x44ad17(0x21a)+_0xf10d17[_0x44ad17(0x272)]+_0x44ad17(0x239)+(_0xf10d17[_0x44ad17(0x272)]!==0x1?'s':''));if(_0x4bdd20[_0x44ad17(0x2fb)]===_0x44ad17(0x280)||_0x4bdd20['format']==='jsonl'||_0x4bdd20['format']===_0x44ad17(0x32b))await handleSDKOutput(_0xf10d17,_0x4bdd20);else{if(!process['stdout']['isTTY']||_0x4bdd20[_0x44ad17(0x341)]){if(_0xf10d17['length']===0x0){if(_0x59f012&&_0x35c53e)console[_0x44ad17(0x35a)](_0x44ad17(0x320)+_0x59f012+'.'+_0x35c53e);else _0x59f012?console['log'](_0x44ad17(0x38a)+_0x59f012):console[_0x44ad17(0x35a)](_0x44ad17(0x29b));}else{const _0x4132fd=_0x4bdd20['site'],_0x41d334=this['renderSessionsTimeline'](_0xf10d17,_0x4132fd);_0x4bdd20[_0x44ad17(0x341)]?await writeOutput(_0x41d334,_0x4bdd20[_0x44ad17(0x341)],'list'):console[_0x44ad17(0x35a)](_0x41d334);}!_0x59f012&&(console[_0x44ad17(0x26f)](''),console[_0x44ad17(0x26f)](a50_0x2262f3[_0x44ad17(0x329)](_0x44ad17(0x285))),console[_0x44ad17(0x26f)](a50_0x2262f3[_0x44ad17(0x329)](_0x44ad17(0x2af))+'or'+a50_0x2262f3[_0x44ad17(0x329)](_0x44ad17(0x262))));}else{if(_0xf10d17[_0x44ad17(0x272)]===0x0){if(_0x59f012&&_0x35c53e)console[_0x44ad17(0x35a)](_0x44ad17(0x320)+_0x59f012+'.'+_0x35c53e);else _0x59f012?console[_0x44ad17(0x35a)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x59f012):console[_0x44ad17(0x35a)]('No\x20sessions\x20found');}else await this[_0x44ad17(0x338)](_0xf10d17,_0x40d9fd,_0x59f012);}}return 0x0;}[a50_0x36cf24(0x24a)](_0x17a70d,_0x4d3081){const _0x2b7172=a50_0x36cf24,_0x59d2b1=[],_0x317264=new Map();let _0x3b91e2=Infinity,_0x591df7=-Infinity;for(const _0x484537 of _0x17a70d){if(_0x484537[_0x2b7172(0x342)]?.[_0x2b7172(0x2d2)]){const _0x1dae01=new Date(_0x484537[_0x2b7172(0x342)][_0x2b7172(0x2d2)])[_0x2b7172(0x34f)](),_0x1a1d16=_0x484537['lastAttempt'][_0x2b7172(0x383)]?new Date(_0x484537[_0x2b7172(0x342)][_0x2b7172(0x383)])['getTime']():Date['now'](),_0x216de5=_0x484537[_0x2b7172(0x22b)]?.[_0x2b7172(0x2d7)]||_0x2b7172(0x26b);!_0x317264[_0x2b7172(0x2e9)](_0x216de5)&&_0x317264[_0x2b7172(0x247)](_0x216de5,[]),_0x317264[_0x2b7172(0x381)](_0x216de5)[_0x2b7172(0x386)]({'session':_0x484537,'startTime':_0x1dae01,'endTime':_0x1a1d16,'duration':_0x1a1d16-_0x1dae01}),_0x3b91e2=Math[_0x2b7172(0x244)](_0x3b91e2,_0x1dae01),_0x591df7=Math[_0x2b7172(0x23d)](_0x591df7,_0x1a1d16);}}if(_0x317264['size']===0x0)return _0x2b7172(0x1f9);const _0x33d451=process['stdout']['columns']||0x78,_0x3eddfe=0x1e,_0x7c3e73=0x32,_0x126069=0x4,_0x25eea0=Math['min'](_0x7c3e73,Math['max'](_0x3eddfe,Math[_0x2b7172(0x287)](_0x33d451*0.3))),_0x16b5eb=_0x33d451-_0x25eea0-TIMELINE_CONFIG[_0x2b7172(0x382)]-0x3-_0x126069,_0x25cd79=_0x591df7-_0x3b91e2,_0x1c1b74=_0x25cd79/_0x25eea0,_0x2d2729=renderTimeAxis({'startTime':_0x3b91e2,'endTime':_0x591df7,'durationMs':_0x25cd79,'msPerChar':_0x1c1b74},_0x25eea0),_0x3b3c0c=[];for(const _0x1e5efd of _0x317264[_0x2b7172(0x1fc)]()){_0x3b3c0c[_0x2b7172(0x386)](..._0x1e5efd);}_0x3b3c0c[_0x2b7172(0x22a)]((_0x5f47b6,_0x1f790a)=>_0x1f790a[_0x2b7172(0x26d)]-_0x5f47b6['startTime']);const _0x444c96=new Date(_0x3b91e2),_0x10e506=formatDate(_0x444c96),_0x501b2a=_0x126069+TIMELINE_CONFIG[_0x2b7172(0x220)]+TIMELINE_CONFIG[_0x2b7172(0x35b)]+_0x16b5eb,_0x58fea6='\x20'[_0x2b7172(0x21d)](_0x501b2a-_0x10e506['length']),_0x57900e=_0x58fea6+a50_0x2262f3[_0x2b7172(0x329)](_0x10e506)+'\x20'+_0x2d2729;_0x59d2b1['push'](_0x57900e);const _0x118c32=0x16;let _0x4b3113=0x0;for(const _0x4682ee of _0x3b3c0c){const _0x4b13a0=_0x4682ee[_0x2b7172(0x2e3)][_0x2b7172(0x22b)]?.[_0x2b7172(0x2d7)]||'?',_0x38950a=Math[_0x2b7172(0x244)](stringWidth(_0x4b13a0),_0x118c32);_0x4b3113=Math[_0x2b7172(0x23d)](_0x4b3113,_0x38950a);}for(const _0x14d9a0 of _0x3b3c0c){const {session:_0x1d8163,startTime:_0x1b1213,endTime:_0x4bbd67,duration:_0x1dba6d}=_0x14d9a0,_0x319a37=_0x1d8163[_0x2b7172(0x22b)]?.['id'],_0x5b9994=_0x1d8163['id'],_0x3957be=_0x1d8163['project']?.[_0x2b7172(0x2d7)]||'?',_0x173b77=_0x1d8163[_0x2b7172(0x29f)]?.[_0x2b7172(0x2d7)]||'?';let _0x2a11ec,_0xedea3c;if(_0x1d8163['lastAttempt']){const _0x1445a1=_0x1d8163['lastAttempt'];!_0x1445a1[_0x2b7172(0x22f)]?(_0x2a11ec=_0x1445a1[_0x2b7172(0x324)]?'🛑':'🔄',_0xedea3c=_0x1445a1[_0x2b7172(0x324)]?a50_0x2262f3[_0x2b7172(0x2ed)]:a50_0x2262f3[_0x2b7172(0x24f)]):(_0x2a11ec=_0x1445a1['success']?'✅':'❌',_0xedea3c=_0x1445a1['success']?a50_0x2262f3['green']:a50_0x2262f3[_0x2b7172(0x312)]);}else _0x2a11ec='⏳',_0xedea3c=a50_0x2262f3['dim'];const _0x1927b7='#'+_0x5b9994,_0x5a8091=_0x319a37?hyperlink(_0x1927b7,getWorkflowSessionUrl(_0x4d3081,_0x319a37,_0x5b9994)):_0x1927b7;let _0x1fbc50=_0x3957be;stringWidth(_0x3957be)>_0x118c32&&(_0x1fbc50=_0x3957be[_0x2b7172(0x306)](0x0,_0x118c32-0x1)+'…');const _0xf50b75=a50_0x2262f3['dim'](_0x1fbc50),_0x383b3c=stringWidth(_0x1fbc50),_0x1ee4ba='\x20'['repeat'](_0x4b3113-stringWidth(_0x1fbc50)+0x2),_0x681822='('+formatElapsed(_0x1dba6d)+')',_0x5a2b48=stringWidth(_0x681822),_0x294692=stringWidth(_0x1927b7),_0xc038aa=_0x294692+0x1+_0x383b3c+_0x1ee4ba[_0x2b7172(0x272)],_0x24122c=_0x16b5eb-_0xc038aa-_0x5a2b48-0x1-0x8;let _0xf70d1a=_0x173b77;stringWidth(_0xf70d1a)>_0x24122c&&(_0xf70d1a=_0xf70d1a[_0x2b7172(0x306)](0x0,_0x24122c-0x1)+'…');const _0x7e172d=_0x5a8091+'\x20'+_0xf50b75+_0x1ee4ba+_0xf70d1a,_0x18ff0e=stringWidth(_0x7e172d),_0x595363=_0x16b5eb-_0x18ff0e-_0x5a2b48,_0x1b2b0c=_0x7e172d+'\x20'[_0x2b7172(0x21d)](Math[_0x2b7172(0x23d)](0x1,_0x595363))+a50_0x2262f3['dim'](_0x681822),_0x109337=Math[_0x2b7172(0x287)]((_0x1b1213-_0x3b91e2)/_0x1c1b74),_0x5aacde=Math[_0x2b7172(0x287)]((_0x4bbd67-_0x3b91e2)/_0x1c1b74),_0x557316=Math[_0x2b7172(0x23d)](_0x109337+0x1,_0x5aacde),_0xd0f096=new Array(_0x25eea0)[_0x2b7172(0x2fe)]('\x20');for(let _0x3e0692=_0x109337;_0x3e0692<Math[_0x2b7172(0x244)](_0x557316,_0x25eea0);_0x3e0692++){_0xd0f096[_0x3e0692]='─';}const _0x2865e1=_0xd0f096['map'](_0x34c30a=>_0x34c30a==='\x20'?'\x20':_0xedea3c(_0x34c30a))[_0x2b7172(0x31f)]('');_0x59d2b1[_0x2b7172(0x386)](_0x2a11ec+'\x20'+_0x1b2b0c+'│'+_0x2865e1+'│');}return _0x59d2b1[_0x2b7172(0x31f)]('\x0a');}async[a50_0x36cf24(0x338)](_0x54cf62,_0x34ac50,_0x5524f1){const _0x58c712=a50_0x36cf24,{options:_0xac3888,tdx:_0x34bf8}=_0x34ac50,_0x586069=_0xac3888['site'],{timelineRows:_0x22378b,timeAxisHeader:_0x5e6f7c}=this['generateSessionTimelineRows'](_0x54cf62,_0x586069),_0x5786a8=_0x22378b[_0x58c712(0x374)](_0xd301a3=>_0xd301a3[_0x58c712(0x203)]);if(_0x5786a8[_0x58c712(0x272)]===0x0){const _0x12b78f=this['renderSessionsTimeline'](_0x54cf62,_0x586069);console[_0x58c712(0x35a)](_0x12b78f);!_0x5524f1&&(console[_0x58c712(0x26f)](''),console[_0x58c712(0x26f)](a50_0x2262f3[_0x58c712(0x329)](_0x58c712(0x285))),console[_0x58c712(0x26f)](a50_0x2262f3['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a50_0x2262f3['dim'](_0x58c712(0x262))));return;}_0x5e6f7c&&console[_0x58c712(0x35a)](_0x5e6f7c);const _0x863605=_0x22378b[_0x58c712(0x374)](_0x1af08b=>_0x1af08b[_0x58c712(0x203)])[_0x58c712(0x2e4)](_0x505d9d=>({'title':_0x505d9d[_0x58c712(0x335)],'value':_0x505d9d[_0x58c712(0x203)]})),_0x19ecd8=process['stdout'][_0x58c712(0x2ee)]||0x3c,_0x4b1ea8=Math[_0x58c712(0x23d)](0x28,Math[_0x58c712(0x287)](_0x19ecd8*0x2/0x3)),_0x214bcc=await a50_0x42cef6({'type':_0x58c712(0x367),'name':_0x58c712(0x203),'message':_0x58c712(0x1fa),'choices':_0x863605,'initial':-0x1,'limit':_0x4b1ea8,'clearFirst':!![],'fallback':{'title':_0x58c712(0x33d),'value':null},'suggest':(_0xb80b0e,_0x7d12ec)=>{const _0x5b1002=_0x58c712;if(!_0xb80b0e)return Promise['resolve'](_0x7d12ec);const _0x41b8d2=_0x7d12ec[_0x5b1002(0x374)](_0x4ec9cb=>{const _0x26a1fd=_0x5b1002,_0x819e3b=_0x4ec9cb;return _0x819e3b[_0x26a1fd(0x350)][_0x26a1fd(0x223)]()[_0x26a1fd(0x32f)](_0xb80b0e['toLowerCase']());});return Promise[_0x5b1002(0x252)](_0x41b8d2);}}),_0x2e3107=()=>{const _0x20f3e6=_0x58c712;process[_0x20f3e6(0x333)][_0x20f3e6(0x300)](_0x20f3e6(0x231)),process[_0x20f3e6(0x333)][_0x20f3e6(0x300)](_0x20f3e6(0x231)),process[_0x20f3e6(0x333)][_0x20f3e6(0x300)](_0x20f3e6(0x231));},_0x234521=_0x214bcc&&_0x214bcc[_0x58c712(0x203)]&&_0x214bcc[_0x58c712(0x203)]!==null&&_0x214bcc[_0x58c712(0x203)]['trim']()!=='';if(!_0x234521){_0x2e3107(),console[_0x58c712(0x35a)](a50_0x2262f3['dim'](_0x58c712(0x315)));return;}_0x2e3107();const _0x37bce5=_0x54cf62[_0x58c712(0x2ce)](_0x2cc7d2=>_0x2cc7d2[_0x58c712(0x342)]?.['id']===_0x214bcc[_0x58c712(0x203)]);if(_0x37bce5){const _0x36ccc2=_0x37bce5[_0x58c712(0x22b)]?.[_0x58c712(0x2d7)]||'?',_0x24a8fd=_0x37bce5[_0x58c712(0x29f)]?.[_0x58c712(0x2d7)]||'?';console[_0x58c712(0x35a)](_0x58c712(0x27c)+a50_0x2262f3['dim'](_0x36ccc2)+_0x58c712(0x364)+a50_0x2262f3[_0x58c712(0x329)](_0x24a8fd));}const _0x3a030e=new WorkflowTimelineCommand();await _0x3a030e['execute']({'args':[],'options':{..._0xac3888,'attemptId':_0x214bcc[_0x58c712(0x203)]},'tdx':_0x34bf8});}[a50_0x36cf24(0x1f5)](_0x5ad8f2,_0xd8397c){const _0x4a04ed=a50_0x36cf24,_0x392270=new Map();for(const _0x2a4dba of _0x5ad8f2){_0x2a4dba['id']&&_0x2a4dba[_0x4a04ed(0x342)]?.['id']&&_0x392270[_0x4a04ed(0x247)](_0x2a4dba['id'],_0x2a4dba[_0x4a04ed(0x342)]['id']);}const _0x1b810a=[];let _0x520f95='';const _0x5f05fc=this[_0x4a04ed(0x24a)](_0x5ad8f2,_0xd8397c),_0x19ca24=_0x5f05fc['split']('\x0a');for(const _0x1b4bd0 of _0x19ca24){if(_0x1b4bd0[_0x4a04ed(0x32d)](_0x4a04ed(0x37a))||_0x1b4bd0[_0x4a04ed(0x290)](/^\s+\d{4}-\d{2}-\d{2}/))_0x520f95=_0x1b4bd0;else{if(_0x1b4bd0[_0x4a04ed(0x290)](/^[✅❌🔄🛑⏳]/)){const _0x1ecf14=_0x1b4bd0[_0x4a04ed(0x290)](/#(\d+)/),_0x3d4f98=_0x1ecf14?_0x1ecf14[0x1]:null,_0x5bb402=_0x3d4f98?_0x392270[_0x4a04ed(0x381)](_0x3d4f98)||null:null,_0x32cdaf=_0x5ad8f2[_0x4a04ed(0x2ce)](_0x5e544c=>_0x5e544c['id']===_0x3d4f98),_0x52e4d1=_0x32cdaf?.['project']?.[_0x4a04ed(0x2d7)]||'';_0x1b810a[_0x4a04ed(0x386)]({'displayLine':_0x1b4bd0,'attemptId':_0x5bb402,'projectName':_0x52e4d1});}}}return{'timelineRows':_0x1b810a,'timeAxisHeader':_0x520f95};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x2d1);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x211);async['execute'](_0x3b48b0){const _0x3c5b3e=a50_0x36cf24,{options:_0x4b1051,args:_0x18eed9,tdx:_0x5bb37c}=_0x3b48b0,_0x4191a1=this[_0x3c5b3e(0x246)](_0x18eed9,_0x4b1051);if(!_0x4191a1)return 0x1;const {projectName:_0x53ca2a,workflowName:_0x2784e1}=_0x4191a1,_0x2b2de9=_0x4b1051[_0x3c5b3e(0x30a)];if(_0x4b1051['verbose']){if(_0x53ca2a&&_0x2784e1)console[_0x3c5b3e(0x26f)](_0x3c5b3e(0x37e)+_0x53ca2a+'.'+_0x2784e1);else _0x53ca2a&&console[_0x3c5b3e(0x26f)](_0x3c5b3e(0x326)+_0x53ca2a);_0x2b2de9&&console[_0x3c5b3e(0x26f)](_0x3c5b3e(0x2dc));}const _0x57e7e1=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x5bb37c['workflow'][_0x3c5b3e(0x398)]({'projectName':_0x53ca2a,'workflowName':_0x2784e1,'includeRetried':_0x2b2de9,'limit':_0x4b1051[_0x3c5b3e(0x297)]}),{'verbose':_0x4b1051['verbose']}),_0x2a1261=_0x57e7e1[_0x3c5b3e(0x215)],_0x3f48da=_0x4b1051[_0x3c5b3e(0x297)]||0x64,_0x4b06d0=_0x2a1261[_0x3c5b3e(0x272)]>=_0x3f48da?a50_0x2262f3[_0x3c5b3e(0x329)](_0x3c5b3e(0x295)):'';console[_0x3c5b3e(0x26f)](_0x3c5b3e(0x21a)+_0x2a1261[_0x3c5b3e(0x272)]+'\x20attempt'+(_0x2a1261[_0x3c5b3e(0x272)]!==0x1?'s':'')+_0x4b06d0);if(_0x4b1051[_0x3c5b3e(0x2fb)]===_0x3c5b3e(0x280)||_0x4b1051[_0x3c5b3e(0x2fb)]===_0x3c5b3e(0x235)||_0x4b1051[_0x3c5b3e(0x2fb)]===_0x3c5b3e(0x32b))await handleSDKOutput(_0x2a1261,_0x4b1051);else{if(_0x2a1261[_0x3c5b3e(0x272)]===0x0){if(_0x53ca2a&&_0x2784e1)console[_0x3c5b3e(0x35a)](_0x3c5b3e(0x254)+_0x53ca2a+'.'+_0x2784e1);else _0x53ca2a?console[_0x3c5b3e(0x35a)](_0x3c5b3e(0x2ec)+_0x53ca2a):console['log'](_0x3c5b3e(0x281));}else{const _0x37a713=_0x4b1051['site'],_0x5d3b6e=_0x2a1261[_0x3c5b3e(0x2e4)](_0x59865d=>{const _0x496539=_0x3c5b3e,_0x1a3202=a50_0x2262f3['dim']('#'+_0x59865d['id']),_0x3f48e9=_0x59865d[_0x496539(0x22b)]?.['id'],_0x5dfa84=_0x59865d[_0x496539(0x277)]||_0x59865d[_0x496539(0x37b)],_0x37af41=_0x3f48e9&&_0x5dfa84?hyperlink(_0x1a3202,getWorkflowAttemptUrl(_0x37a713,_0x3f48e9,_0x5dfa84,_0x59865d['id'])):_0x1a3202,{icon:_0x25c4af,text:_0x33991b}=getAttemptStatusDisplay(_0x59865d),_0x3c0b8f=(_0x59865d[_0x496539(0x22b)]?.[_0x496539(0x2d7)]||'?')+'.'+(_0x59865d[_0x496539(0x29f)]?.[_0x496539(0x2d7)]||'?'),_0x453d54=_0x59865d['sessionTime']?a50_0x2262f3[_0x496539(0x329)](_0x59865d[_0x496539(0x296)]):'';return(_0x37af41+'\x20'+_0x25c4af+(_0x33991b?'\x20'+_0x33991b:'')+'\x20'+_0x3c0b8f+'\x20'+_0x453d54)[_0x496539(0x25c)]();});await writeOutput(_0x5d3b6e['join']('\x0a'),_0x4b1051[_0x3c5b3e(0x341)],_0x3c5b3e(0x339));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a50_0x36cf24(0x2d7)]='workflow:attempt';[a50_0x36cf24(0x266)]=a50_0x36cf24(0x261);async[a50_0x36cf24(0x35f)](_0x34766e){const _0x135029=a50_0x36cf24,{options:_0x2250b3,args:_0x4e4fe2,tdx:_0x261973}=_0x34766e,_0x43d20a=_0x4e4fe2[0x0];if(!_0x43d20a)return console['error'](_0x135029(0x2e2)),0x1;_0x2250b3['verbose']&&console['error'](_0x135029(0x2de)+_0x43d20a);const _0xfa25a=await withSpinner(_0x135029(0x284),()=>_0x261973['workflow'][_0x135029(0x2a3)](_0x43d20a),{'verbose':_0x2250b3[_0x135029(0x279)]}),_0x1f1f9a=_0xfa25a[_0x135029(0x215)];let _0x1cd9f6;!_0x1f1f9a[_0x135029(0x22f)]?_0x1cd9f6=_0x1f1f9a[_0x135029(0x324)]?'canceling':'running':_0x1cd9f6=_0x1f1f9a[_0x135029(0x226)]?_0x135029(0x226):_0x135029(0x26f);let _0x29a03d;if(_0x1f1f9a['createdAt']&&_0x1f1f9a[_0x135029(0x383)]){const _0xf86048=new Date(_0x1f1f9a[_0x135029(0x2d2)])[_0x135029(0x34f)](),_0x25f6a1=new Date(_0x1f1f9a[_0x135029(0x383)])[_0x135029(0x34f)]();_0x29a03d=Math[_0x135029(0x2b8)]((_0x25f6a1-_0xf86048)/0x3e8);}const _0xb9f22f={'attempt_id':_0x1f1f9a['id'],'status':_0x1cd9f6,..._0x1f1f9a[_0x135029(0x376)]!==undefined&&{'index':_0x1f1f9a[_0x135029(0x376)]},..._0x1f1f9a[_0x135029(0x22b)]&&{'project':_0x1f1f9a[_0x135029(0x22b)][_0x135029(0x2d7)]},..._0x1f1f9a['workflow']&&{'workflow':_0x1f1f9a[_0x135029(0x29f)][_0x135029(0x2d7)]},..._0x1f1f9a[_0x135029(0x37b)]&&{'session_id':_0x1f1f9a[_0x135029(0x37b)]},..._0x1f1f9a['sessionTime']&&{'session_time':_0x1f1f9a[_0x135029(0x296)]},..._0x1f1f9a[_0x135029(0x37c)]&&{'retry_attempt':_0x1f1f9a[_0x135029(0x37c)]},..._0x29a03d!==undefined&&{'duration_sec':_0x29a03d},..._0x1f1f9a['createdAt']&&{'created_at':_0x1f1f9a[_0x135029(0x2d2)]},..._0x1f1f9a[_0x135029(0x383)]&&{'finished_at':_0x1f1f9a[_0x135029(0x383)]},...Object['keys'](_0x1f1f9a[_0x135029(0x1f7)])[_0x135029(0x272)]>0x0&&{'params':_0x1f1f9a[_0x135029(0x1f7)]}};return await handleSingleObjectOutput(_0xb9f22f,_0x2250b3),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a50_0x36cf24(0x20f);['description']=a50_0x36cf24(0x314);async[a50_0x36cf24(0x35f)](_0x1887c8){const _0x4c3c0d=a50_0x36cf24,{options:_0x4a8cfa,args:_0x4a8822,tdx:_0x5c4287}=_0x1887c8,_0x363d1d=_0x4a8822[0x0];if(!_0x363d1d)return console[_0x4c3c0d(0x26f)](_0x4c3c0d(0x2e2)),0x1;const _0x5715e8=_0x4a8cfa[_0x4c3c0d(0x331)];_0x4a8cfa[_0x4c3c0d(0x279)]&&(console[_0x4c3c0d(0x26f)](_0x4c3c0d(0x2de)+_0x363d1d),_0x5715e8&&console['error'](_0x4c3c0d(0x2e5)));const _0x4d920f=await withSpinner(_0x4c3c0d(0x27b),()=>_0x5c4287[_0x4c3c0d(0x29f)][_0x4c3c0d(0x274)](_0x363d1d,_0x5715e8||![]),{'verbose':_0x4a8cfa['verbose']}),_0x244976=_0x4d920f[_0x4c3c0d(0x215)];return console['error'](_0x4c3c0d(0x21a)+_0x244976['length']+_0x4c3c0d(0x377)+(_0x244976['length']!==0x1?'s':'')),await handleSDKOutput(_0x244976,_0x4a8cfa),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x33f);['description']=a50_0x36cf24(0x24b);async['execute'](_0x5ec632){const _0x2d8d22=a50_0x36cf24,{options:_0x29b2be,args:_0x14ebd9,tdx:_0x324712}=_0x5ec632,_0x29d95c=_0x14ebd9[0x0];let _0x28a3aa=_0x14ebd9[0x1];if(!_0x29d95c)return console[_0x2d8d22(0x26f)](_0x2d8d22(0x2e2)),0x1;_0x29b2be[_0x2d8d22(0x279)]&&(console[_0x2d8d22(0x26f)](_0x2d8d22(0x2de)+_0x29d95c),_0x28a3aa&&console[_0x2d8d22(0x26f)](_0x2d8d22(0x28e)+_0x28a3aa));const _0x3e5c29=await withSpinner(_0x2d8d22(0x2a7),()=>_0x324712[_0x2d8d22(0x29f)][_0x2d8d22(0x348)](_0x29d95c,_0x28a3aa),{'verbose':_0x29b2be[_0x2d8d22(0x279)]}),_0x35dd01=_0x3e5c29[_0x2d8d22(0x215)];if(_0x35dd01[_0x2d8d22(0x272)]===0x0)return console[_0x2d8d22(0x26f)](_0x2d8d22(0x36a)),0x0;if(!_0x28a3aa&&(_0x29b2be[_0x2d8d22(0x280)]||_0x29b2be[_0x2d8d22(0x2fb)]))return await handleSDKOutput(_0x35dd01,_0x29b2be),0x0;if(!_0x28a3aa){const _0x52e31e=_0x35dd01[_0x2d8d22(0x2e4)](_0xe13dbb=>({'title':_0xe13dbb[_0x2d8d22(0x34b)]+'\x20('+formatBytes(_0xe13dbb[_0x2d8d22(0x317)])+')','value':_0xe13dbb[_0x2d8d22(0x34b)]})),_0x3d41c4=await a50_0x42cef6({'type':'select','name':_0x2d8d22(0x32e),'message':_0x2d8d22(0x2a8),'choices':_0x52e31e});if(!_0x3d41c4['task'])return console['error'](_0x2d8d22(0x315)),0x0;_0x28a3aa=_0x3d41c4[_0x2d8d22(0x32e)];}const _0x365e57=await withSpinner(_0x2d8d22(0x286),()=>_0x324712['workflow'][_0x2d8d22(0x2d0)](_0x29d95c,_0x28a3aa),{'verbose':_0x29b2be['verbose']}),_0x2157ef=_0x365e57['data'];return _0x2157ef?console[_0x2d8d22(0x35a)](_0x2157ef):console[_0x2d8d22(0x26f)](_0x2d8d22(0x2c2)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a50_0x36cf24(0x2c3);['description']=a50_0x36cf24(0x24e);async[a50_0x36cf24(0x35f)](_0x1fb829){const _0x280c8e=a50_0x36cf24,{options:_0x28eb55,args:_0xe87eb3,tdx:_0x530ce9}=_0x1fb829,_0x5f55d6=_0xe87eb3[0x0];if(!_0x5f55d6)return console[_0x280c8e(0x26f)](_0x280c8e(0x2e2)),0x1;const _0xb27ec6=_0x28eb55[_0x280c8e(0x25b)];_0x28eb55[_0x280c8e(0x279)]&&(console['error'](_0x280c8e(0x2de)+_0x5f55d6),_0xb27ec6&&console[_0x280c8e(0x26f)](_0x280c8e(0x2d3)+_0xb27ec6));if(!_0x28eb55[_0x280c8e(0x292)]){if(!isInteractive())return console[_0x280c8e(0x26f)](a50_0x2262f3[_0x280c8e(0x312)]('\x0aError:'),_0x280c8e(0x25d)),console[_0x280c8e(0x26f)](a50_0x2262f3[_0x280c8e(0x329)](_0x280c8e(0x237))),0x1;const _0x341d20=await confirmKey(_0x280c8e(0x2f3)+_0x5f55d6+'?');if(!_0x341d20)return console[_0x280c8e(0x26f)](a50_0x2262f3[_0x280c8e(0x2ed)](_0x280c8e(0x315))),0x1;}const _0x56b183=await withSpinner(_0x280c8e(0x210),()=>_0x530ce9['workflow'][_0x280c8e(0x2f0)](_0x5f55d6,_0xb27ec6),{'verbose':_0x28eb55[_0x280c8e(0x279)]}),_0x5b4e61=_0x56b183['data'];return console[_0x280c8e(0x26f)]('✔\x20'+_0x5b4e61),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';[a50_0x36cf24(0x266)]='Retry\x20a\x20session\x20or\x20attempt';async[a50_0x36cf24(0x35f)](_0x215a29){const _0x208774=a50_0x36cf24,{options:_0x5673d4,args:_0x5f0c66,tdx:_0x50c8a5}=_0x215a29,_0x388f73=_0x5f0c66[0x0];if(!_0x388f73)return console[_0x208774(0x26f)](_0x208774(0x304)),console[_0x208774(0x26f)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x137e55=![],_0x53e84b=_0x388f73;if(_0x388f73[_0x208774(0x32d)](_0x208774(0x2b4)))_0x137e55=!![],_0x53e84b=_0x388f73[_0x208774(0x24c)](0x8);else{if(_0x388f73[_0x208774(0x32d)](_0x208774(0x2da)))_0x137e55=![],_0x53e84b=_0x388f73[_0x208774(0x24c)](0x8);else return console[_0x208774(0x26f)](_0x208774(0x2ae)),console[_0x208774(0x26f)](_0x208774(0x38d)),0x1;}const _0x53d55f=_0x5673d4[_0x208774(0x201)],_0x46f886=_0x5673d4[_0x208774(0x384)],_0x251d89=_0x5673d4['params'],_0x398e3e=_0x5673d4['force'];_0x5673d4['verbose']&&(console['error'](_0x208774(0x380)+(_0x137e55?_0x208774(0x2e3):_0x208774(0x2a3))+'\x20'+_0x53e84b),_0x53d55f&&console['error'](_0x208774(0x34a)+_0x53d55f),_0x46f886&&console['error'](_0x208774(0x241)+_0x46f886),_0x251d89&&console['error']('Params:\x20'+_0x251d89),_0x398e3e&&console[_0x208774(0x26f)](_0x208774(0x2b2)));let _0x4d7205;if(_0x251d89)try{if(_0x251d89['startsWith']('@')){const _0xca19c7=await import(_0x208774(0x334)),_0x21cb4c=_0x251d89[_0x208774(0x24c)](0x1),_0x2d0926=await _0xca19c7['readFile'](_0x21cb4c,'utf-8');_0x4d7205=JSON[_0x208774(0x365)](_0x2d0926);}else _0x4d7205=JSON[_0x208774(0x365)](_0x251d89);}catch{return console[_0x208774(0x26f)](_0x208774(0x38c)),0x1;}if(!_0x5673d4[_0x208774(0x292)]){if(!isInteractive())return console['error'](a50_0x2262f3[_0x208774(0x312)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x208774(0x26f)](a50_0x2262f3[_0x208774(0x329)](_0x208774(0x237))),0x1;const _0x8cb013=await confirmKey(_0x208774(0x358)+(_0x137e55?_0x208774(0x2e3):'attempt')+'\x20'+_0x53e84b+'?');if(!_0x8cb013)return console[_0x208774(0x26f)](a50_0x2262f3['yellow'](_0x208774(0x315))),0x1;}let _0x3bba42;_0x137e55?_0x3bba42=await withSpinner(_0x208774(0x2a2),()=>_0x50c8a5['workflow'][_0x208774(0x213)](_0x53e84b,{'fromTask':_0x53d55f,'retryParams':_0x4d7205}),{'verbose':_0x5673d4[_0x208774(0x279)]}):_0x3bba42=await withSpinner('Retrying\x20attempt...',()=>_0x50c8a5[_0x208774(0x29f)][_0x208774(0x33c)](_0x53e84b,{'resumeFrom':_0x46f886,'retryParams':_0x4d7205,'force':_0x398e3e}),{'verbose':_0x5673d4[_0x208774(0x279)]});const _0x527734=_0x3bba42['data'];return console[_0x208774(0x26f)]('✔\x20Retry\x20started'),console[_0x208774(0x26f)](_0x208774(0x221)+_0x527734['attemptId']),console[_0x208774(0x26f)]('\x20\x20Session\x20ID:\x20'+_0x527734['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]='workflow:run';[a50_0x36cf24(0x266)]=a50_0x36cf24(0x251);async[a50_0x36cf24(0x35f)](_0x544ee1){const _0x25ab38=a50_0x36cf24,{options:_0x5a1a53,args:_0x2cb201,tdx:_0x104cff}=_0x544ee1;let _0x5760cb=_0x2cb201[0x0];if(!_0x5760cb){const _0x5eacf0=this[_0x25ab38(0x361)]([],_0x5a1a53),_0x26b57d=await withSpinner(_0x25ab38(0x25e),()=>_0x104cff[_0x25ab38(0x29f)][_0x25ab38(0x216)](_0x5eacf0,{'limit':_0x5a1a53[_0x25ab38(0x297)]}),{'verbose':_0x5a1a53[_0x25ab38(0x279)]}),_0x4f9c88=_0x26b57d[_0x25ab38(0x215)];if(_0x4f9c88[_0x25ab38(0x272)]===0x0)return console[_0x25ab38(0x26f)](_0x25ab38(0x204)),!_0x5eacf0&&console['error'](a50_0x2262f3['dim'](_0x25ab38(0x21f))),0x1;const _0x531722=_0x4f9c88['map'](_0x4bbd87=>({'title':_0x4bbd87[_0x25ab38(0x22b)]?.[_0x25ab38(0x2d7)]+'.'+_0x4bbd87[_0x25ab38(0x2d7)],'value':_0x4bbd87[_0x25ab38(0x22b)]?.[_0x25ab38(0x2d7)]+'.'+_0x4bbd87[_0x25ab38(0x2d7)],'description':_0x4bbd87[_0x25ab38(0x346)]?_0x25ab38(0x393)+_0x4bbd87[_0x25ab38(0x346)]:undefined})),_0x124229=await a50_0x42cef6({'type':_0x25ab38(0x2d4),'name':'workflow','message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x531722});if(!_0x124229['workflow'])return 0x1;_0x5760cb=_0x124229[_0x25ab38(0x29f)];}if(!_0x5760cb[_0x25ab38(0x32f)]('.')){const _0xd952c9=this[_0x25ab38(0x361)]([],_0x5a1a53);if(_0xd952c9)_0x5760cb=_0xd952c9+'.'+_0x5760cb;else return console['error'](a50_0x2262f3[_0x25ab38(0x312)](_0x25ab38(0x219)),_0x25ab38(0x2b6)),console[_0x25ab38(0x26f)](a50_0x2262f3[_0x25ab38(0x329)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x2932b3=_0x5a1a53['param'],_0x2bc1dc=_0x5a1a53['sessionTime'],_0xd0b287={};if(_0x2932b3&&Array[_0x25ab38(0x33b)](_0x2932b3))for(const _0x30a85d of _0x2932b3){const _0x444535=_0x30a85d[_0x25ab38(0x2f4)]('=');if(_0x444535===-0x1)return console[_0x25ab38(0x26f)](_0x25ab38(0x289)+_0x30a85d),console[_0x25ab38(0x26f)](_0x25ab38(0x322)),0x1;const _0x1c800c=_0x30a85d[_0x25ab38(0x24c)](0x0,_0x444535),_0x46f80a=_0x30a85d['substring'](_0x444535+0x1);try{_0xd0b287[_0x1c800c]=JSON[_0x25ab38(0x365)](_0x46f80a);}catch{_0xd0b287[_0x1c800c]=_0x46f80a;}}_0x5a1a53[_0x25ab38(0x279)]&&(console['error']('Workflow:\x20'+_0x5760cb),Object[_0x25ab38(0x208)](_0xd0b287)[_0x25ab38(0x272)]>0x0&&console[_0x25ab38(0x26f)]('Parameters:\x20'+JSON[_0x25ab38(0x394)](_0xd0b287)),_0x2bc1dc&&console[_0x25ab38(0x26f)](_0x25ab38(0x328)+_0x2bc1dc));const _0x40ba17=await withSpinner('Starting\x20workflow\x20run...',()=>_0x104cff[_0x25ab38(0x29f)]['run'](_0x5760cb,_0xd0b287,{'sessionTime':_0x2bc1dc}),{'verbose':_0x5a1a53[_0x25ab38(0x279)]}),_0xe3cf5=_0x40ba17[_0x25ab38(0x215)];console['error'](_0x25ab38(0x209)),console['error']('\x20\x20Attempt\x20ID:\x20'+_0xe3cf5['id']),console['error'](_0x25ab38(0x30c)+_0xe3cf5[_0x25ab38(0x37b)]),console['error']('\x20\x20Project:\x20'+_0xe3cf5[_0x25ab38(0x22b)]?.['name']),console[_0x25ab38(0x26f)](_0x25ab38(0x21e)+_0xe3cf5[_0x25ab38(0x29f)]?.[_0x25ab38(0x2d7)]);if(_0xe3cf5['project']?.['id']&&_0xe3cf5['sessionId']&&_0xe3cf5['id']){const _0x14f3e0=_0x5a1a53['site'],_0x3e64cd=getConsoleUrl(_0x14f3e0,_0x25ab38(0x258)+_0xe3cf5['project']['id']+_0x25ab38(0x30e)+_0xe3cf5['sessionId']+_0x25ab38(0x391)+_0xe3cf5['id']);console[_0x25ab38(0x26f)]('\x20\x20Console:\x20'+a50_0x2262f3[_0x25ab38(0x2b5)](_0x3e64cd));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x321);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x28f);async[a50_0x36cf24(0x35f)](_0x20d420){const _0x3c25fd=a50_0x36cf24,{options:_0x5ca3c8,args:_0x38a215,tdx:_0x173d46}=_0x20d420,_0x5419d8=_0x38a215[0x0],_0x3f2867=_0x38a215[0x1]||'.';if(!_0x5419d8)return console[_0x3c25fd(0x26f)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x3c25fd(0x26f)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x59c58a=_0x5ca3c8['revision'];_0x5ca3c8[_0x3c25fd(0x279)]&&(console[_0x3c25fd(0x26f)](_0x3c25fd(0x27c)+_0x5419d8),console[_0x3c25fd(0x26f)]('Output\x20directory:\x20'+_0x3f2867),_0x59c58a&&console[_0x3c25fd(0x26f)](_0x3c25fd(0x259)+_0x59c58a));const _0x4c5c2e=await withSpinner(_0x3c25fd(0x36e)+_0x5419d8+_0x3c25fd(0x2cf),()=>_0x173d46[_0x3c25fd(0x29f)]['download'](_0x5419d8,_0x3f2867,{'revision':_0x59c58a}),{'verbose':_0x5ca3c8[_0x3c25fd(0x279)]}),_0x3bb11e=_0x4c5c2e[_0x3c25fd(0x215)];return console[_0x3c25fd(0x26f)](_0x3c25fd(0x2aa)+_0x3bb11e['projectName']),console[_0x3c25fd(0x26f)]('\x20\x20Revision:\x20'+_0x3bb11e[_0x3c25fd(0x346)]),console['error'](_0x3c25fd(0x264)+_0x3bb11e[_0x3c25fd(0x273)]),console[_0x3c25fd(0x26f)](_0x3c25fd(0x1f4)+_0x3f2867+'/'+_0x3bb11e['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x22c);[a50_0x36cf24(0x266)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a50_0x36cf24(0x35f)](_0x264b34){const _0xf6134d=a50_0x36cf24,{options:_0x445102,args:_0x3e6291,tdx:_0x37840b}=_0x264b34;let _0x237ec4='.',_0x5a3ffc=_0x445102[_0xf6134d(0x2d7)];if(_0x3e6291[0x0]){const {promises:_0x3a628e}=await import('fs');try{const _0x563845=await _0x3a628e['stat'](_0x3e6291[0x0]);if(_0x563845[_0xf6134d(0x392)]())_0x237ec4=_0x3e6291[0x0];else return console[_0xf6134d(0x26f)](_0xf6134d(0x349)+_0x3e6291[0x0]+_0xf6134d(0x250)),0x1;}catch{_0x5a3ffc=_0x3e6291[0x0],_0x237ec4='.';}}const _0x402475=_0x445102[_0xf6134d(0x346)],_0x2d4a4d=_0x445102[_0xf6134d(0x2c1)];_0x445102[_0xf6134d(0x279)]&&(console[_0xf6134d(0x26f)]('Project\x20directory:\x20'+_0x237ec4),_0x5a3ffc&&console[_0xf6134d(0x26f)]('Project\x20name:\x20'+_0x5a3ffc),_0x402475&&console['error']('Revision:\x20'+_0x402475),_0x2d4a4d&&console['error'](_0xf6134d(0x2cb)));const _0x192762=await withSpinner(_0xf6134d(0x29a),()=>_0x37840b[_0xf6134d(0x29f)][_0xf6134d(0x386)](_0x237ec4,{'projectName':_0x5a3ffc,'revision':_0x402475,'skipValidation':_0x2d4a4d}),{'verbose':_0x445102['verbose']}),_0x1c3949=_0x192762[_0xf6134d(0x215)];return console[_0xf6134d(0x26f)](_0xf6134d(0x278)+_0x1c3949['projectName']),console[_0xf6134d(0x26f)](_0xf6134d(0x2eb)+_0x1c3949[_0xf6134d(0x307)]),console['error'](_0xf6134d(0x359)+_0x1c3949[_0xf6134d(0x346)]),await this[_0xf6134d(0x2fa)](_0x37840b,_0x1c3949['projectName'],_0x445102[_0xf6134d(0x309)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x21c);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x1f8);async[a50_0x36cf24(0x35f)](_0x28ee13){const _0x4cf192=a50_0x36cf24,{options:_0x24c76e,args:_0x4c7aad,tdx:_0xc84450}=_0x28ee13,_0x3638cf=_0x4c7aad[0x0],_0x5ee583=_0x4c7aad[0x1];if(!_0x3638cf)return console[_0x4cf192(0x26f)](a50_0x2262f3['red']('Error:'),_0x4cf192(0x2df)),console['error'](a50_0x2262f3[_0x4cf192(0x329)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x2ab05a=_0x24c76e[_0x4cf192(0x346)];_0x24c76e[_0x4cf192(0x279)]&&(console[_0x4cf192(0x26f)](_0x4cf192(0x27c)+_0x3638cf),_0x5ee583&&console[_0x4cf192(0x26f)](_0x4cf192(0x276)+_0x5ee583),_0x2ab05a&&console[_0x4cf192(0x26f)](_0x4cf192(0x259)+_0x2ab05a),_0x24c76e[_0x4cf192(0x2c6)]&&console['error'](_0x4cf192(0x2a0)));const _0x1fd8ce=await withSpinner('Pulling\x20project\x20'+_0x3638cf+_0x4cf192(0x2cf),()=>_0xc84450[_0x4cf192(0x29f)][_0x4cf192(0x2ef)](_0x3638cf,{'targetDir':_0x5ee583,'revision':_0x2ab05a}),{'verbose':_0x24c76e[_0x4cf192(0x279)]}),_0xeb756d=_0x1fd8ce[_0x4cf192(0x215)];_0xeb756d[_0x4cf192(0x2b1)]?console[_0x4cf192(0x26f)](_0x4cf192(0x2b9)+_0xeb756d[_0x4cf192(0x33a)]):console[_0x4cf192(0x26f)](_0x4cf192(0x275)+_0xeb756d['projectName']);console[_0x4cf192(0x26f)](_0x4cf192(0x359)+_0xeb756d[_0x4cf192(0x346)]),console[_0x4cf192(0x26f)](_0x4cf192(0x352)+(a50_0x426a1b[_0x4cf192(0x20a)](process[_0x4cf192(0x2d8)](),_0xeb756d[_0x4cf192(0x2a5)])||'.')),console[_0x4cf192(0x26f)](_0x4cf192(0x34d)+a50_0x2262f3['green']('+'+_0xeb756d[_0x4cf192(0x2d5)]['new']+'\x20new')+',\x20'+(a50_0x2262f3[_0x4cf192(0x2ed)]('~'+_0xeb756d['summary'][_0x4cf192(0x230)]+_0x4cf192(0x2f7))+',\x20')+(a50_0x2262f3[_0x4cf192(0x312)]('-'+_0xeb756d['summary'][_0x4cf192(0x2ac)]+'\x20deleted')+',\x20')+(''+a50_0x2262f3['dim'](_0xeb756d[_0x4cf192(0x2d5)]['unchanged']+_0x4cf192(0x1f3))));for(const _0x36967b of _0xeb756d[_0x4cf192(0x2f6)]){_0x36967b['type']==='modified'&&_0x36967b[_0x4cf192(0x2a4)]&&(console[_0x4cf192(0x26f)]('\x0a'+a50_0x2262f3['cyan']('---\x20'+_0x36967b['path'])),console[_0x4cf192(0x26f)](_0x36967b[_0x4cf192(0x2a4)]));}if(!_0xeb756d[_0x4cf192(0x200)])return saveSessionContext({'workflow_project':_0xeb756d['projectName']},_0x24c76e['session']),console[_0x4cf192(0x26f)](a50_0x2262f3[_0x4cf192(0x37f)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x4cf192(0x26f)](a50_0x2262f3[_0x4cf192(0x329)](_0x4cf192(0x25a)+_0xeb756d[_0x4cf192(0x33a)])),0x0;if(_0x24c76e['dryRun'])return console[_0x4cf192(0x26f)](a50_0x2262f3[_0x4cf192(0x2ed)](_0x4cf192(0x255))),0x0;if(!_0x24c76e[_0x4cf192(0x292)]){if(!isInteractive())return console[_0x4cf192(0x26f)](a50_0x2262f3['red'](_0x4cf192(0x2dd)),_0x4cf192(0x25d)),console[_0x4cf192(0x26f)](a50_0x2262f3['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5d6df4=await confirmKey(_0x4cf192(0x34e));if(!_0x5d6df4)return console['error'](a50_0x2262f3[_0x4cf192(0x2ed)](_0x4cf192(0x315)),_0x4cf192(0x212)),0x1;}await withSpinner(_0x4cf192(0x373),()=>_0xc84450['workflow'][_0x4cf192(0x229)](_0xeb756d,{'revision':_0x2ab05a}),{'verbose':_0x24c76e[_0x4cf192(0x279)]}),saveSessionContext({'workflow_project':_0xeb756d[_0x4cf192(0x33a)]},_0x24c76e[_0x4cf192(0x2e3)]),console[_0x4cf192(0x26f)](a50_0x2262f3[_0x4cf192(0x37f)](_0x4cf192(0x1f6)));const _0x56b0ad=a50_0x426a1b[_0x4cf192(0x20a)](process['cwd'](),_0xeb756d[_0x4cf192(0x2a5)])||'.';return console['error'](a50_0x2262f3[_0x4cf192(0x329)](_0x4cf192(0x1f4)+_0x56b0ad)),console[_0x4cf192(0x26f)](a50_0x2262f3['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0xeb756d[_0x4cf192(0x33a)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a50_0x36cf24(0x263);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x269);async[a50_0x36cf24(0x35f)](_0x2aec3e){const _0x55c3b9=a50_0x36cf24,{options:_0x3c7656,args:_0x4fa0d1,tdx:_0x2adfc4}=_0x2aec3e,_0x3726b1=this['resolveProjectDir'](_0x4fa0d1,_0x3c7656),_0x449d7e=_0x3c7656[_0x55c3b9(0x346)],_0x2ba4bd=_0x3c7656[_0x55c3b9(0x2c1)];_0x3c7656[_0x55c3b9(0x279)]&&(_0x3726b1&&console[_0x55c3b9(0x26f)](_0x55c3b9(0x298)+_0x3726b1),_0x449d7e&&console[_0x55c3b9(0x26f)](_0x55c3b9(0x259)+_0x449d7e),_0x3c7656[_0x55c3b9(0x2c6)]&&console['error']('Dry\x20run:\x20yes'),_0x2ba4bd&&console[_0x55c3b9(0x26f)](_0x55c3b9(0x2cb)));let _0x3c120b;try{_0x3c120b=await withSpinner(_0x55c3b9(0x2f8),()=>_0x2adfc4[_0x55c3b9(0x29f)][_0x55c3b9(0x243)]({'sourceDir':_0x3726b1,'revision':_0x449d7e,'skipValidation':_0x2ba4bd}),{'verbose':_0x3c7656[_0x55c3b9(0x279)]});}catch(_0x193dbb){if(_0x193dbb instanceof Error&&_0x193dbb[_0x55c3b9(0x245)]['includes'](_0x55c3b9(0x225)))return console['error'](a50_0x2262f3[_0x55c3b9(0x312)](_0x55c3b9(0x219)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x3c7656[_0x55c3b9(0x325)]?console['error'](a50_0x2262f3[_0x55c3b9(0x329)]('Tip:\x20cd\x20to\x20workflows/'+_0x3c7656[_0x55c3b9(0x325)]+_0x55c3b9(0x265)+_0x3c7656[_0x55c3b9(0x325)]+'\x27')):console[_0x55c3b9(0x26f)](a50_0x2262f3[_0x55c3b9(0x329)](_0x55c3b9(0x356))),0x1;throw _0x193dbb;}const _0x2d097c=_0x3c120b['data'];console[_0x55c3b9(0x26f)](_0x55c3b9(0x387)+_0x2d097c[_0x55c3b9(0x33a)]),console[_0x55c3b9(0x26f)](_0x55c3b9(0x344)+_0x2d097c[_0x55c3b9(0x20b)]),console[_0x55c3b9(0x26f)](_0x55c3b9(0x359)+_0x2d097c[_0x55c3b9(0x346)]),console['error'](_0x55c3b9(0x34d)+a50_0x2262f3[_0x55c3b9(0x37f)]('+'+_0x2d097c[_0x55c3b9(0x2d5)]['new']+'\x20new')+',\x20'+(a50_0x2262f3[_0x55c3b9(0x2ed)]('~'+_0x2d097c[_0x55c3b9(0x2d5)]['modified']+_0x55c3b9(0x2f7))+',\x20')+(a50_0x2262f3['red']('-'+_0x2d097c[_0x55c3b9(0x2d5)][_0x55c3b9(0x2ac)]+_0x55c3b9(0x345))+',\x20')+(''+a50_0x2262f3['dim'](_0x2d097c['summary'][_0x55c3b9(0x256)]+_0x55c3b9(0x1f3))));for(const _0x6668a3 of _0x2d097c[_0x55c3b9(0x2f6)]){_0x6668a3[_0x55c3b9(0x28d)]==='modified'&&_0x6668a3['diff']&&(console['error']('\x0a'+a50_0x2262f3['cyan'](_0x55c3b9(0x28b)+_0x6668a3[_0x55c3b9(0x360)])),console[_0x55c3b9(0x26f)](_0x6668a3[_0x55c3b9(0x2a4)]));}if(!_0x2d097c[_0x55c3b9(0x200)])return console['error'](a50_0x2262f3[_0x55c3b9(0x37f)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x55c3b9(0x2fa)](_0x2adfc4,_0x2d097c['projectName'],_0x3c7656[_0x55c3b9(0x309)]),0x0;if(_0x3c7656[_0x55c3b9(0x2c6)])return console[_0x55c3b9(0x26f)](a50_0x2262f3[_0x55c3b9(0x2ed)](_0x55c3b9(0x399))),0x0;if(!_0x3c7656[_0x55c3b9(0x292)]){if(!isInteractive())return console[_0x55c3b9(0x26f)](a50_0x2262f3[_0x55c3b9(0x312)](_0x55c3b9(0x2dd)),_0x55c3b9(0x25d)),console[_0x55c3b9(0x26f)](a50_0x2262f3[_0x55c3b9(0x329)](_0x55c3b9(0x237))),0x1;const _0x1c7cb8=await confirmKey(_0x55c3b9(0x232));if(!_0x1c7cb8)return console[_0x55c3b9(0x26f)](a50_0x2262f3['yellow'](_0x55c3b9(0x315)),_0x55c3b9(0x2ca)),0x1;}const _0x4fa6bb=await withSpinner(_0x55c3b9(0x260),()=>_0x2adfc4[_0x55c3b9(0x29f)][_0x55c3b9(0x355)](_0x2d097c),{'verbose':_0x3c7656[_0x55c3b9(0x279)]}),_0x387623=_0x4fa6bb[_0x55c3b9(0x215)];return console[_0x55c3b9(0x26f)](a50_0x2262f3[_0x55c3b9(0x37f)](_0x55c3b9(0x303))),console[_0x55c3b9(0x26f)](_0x55c3b9(0x2eb)+_0x387623['projectId']),console[_0x55c3b9(0x26f)](_0x55c3b9(0x359)+_0x387623[_0x55c3b9(0x346)]),await this[_0x55c3b9(0x2fa)](_0x2adfc4,_0x387623[_0x55c3b9(0x33a)],_0x3c7656[_0x55c3b9(0x309)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x253);[a50_0x36cf24(0x266)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async['execute'](_0xdfea8d){const _0x5acdb4=a50_0x36cf24,{options:_0x14d390,args:_0x5a74cd,tdx:_0x1919e3}=_0xdfea8d,_0x2c6d99=this[_0x5acdb4(0x1ff)](_0x5a74cd,_0x14d390),_0x409b21=_0x14d390[_0x5acdb4(0x2d7)],_0x1d2b20=_0x14d390[_0x5acdb4(0x346)],_0x2fe4b8=_0x14d390[_0x5acdb4(0x2c1)];if(!_0x2c6d99)return console[_0x5acdb4(0x26f)](a50_0x2262f3['red'](_0x5acdb4(0x219)),'Source\x20directory\x20is\x20required'),console['error'](a50_0x2262f3[_0x5acdb4(0x329)](_0x5acdb4(0x336))),console[_0x5acdb4(0x26f)](a50_0x2262f3[_0x5acdb4(0x329)](_0x5acdb4(0x267))),0x1;if(!_0x409b21)return console[_0x5acdb4(0x26f)](a50_0x2262f3['red'](_0x5acdb4(0x219)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console['error'](a50_0x2262f3[_0x5acdb4(0x329)](_0x5acdb4(0x336))),0x1;_0x14d390[_0x5acdb4(0x279)]&&(console[_0x5acdb4(0x26f)](_0x5acdb4(0x298)+_0x2c6d99),console[_0x5acdb4(0x26f)](_0x5acdb4(0x2b7)+_0x409b21),_0x1d2b20&&console['error']('Revision:\x20'+_0x1d2b20),_0x14d390[_0x5acdb4(0x2c6)]&&console[_0x5acdb4(0x26f)]('Dry\x20run:\x20yes'),_0x2fe4b8&&console[_0x5acdb4(0x26f)](_0x5acdb4(0x2cb)));const _0x2e1d7d=await withSpinner('Analyzing\x20project...',()=>_0x1919e3[_0x5acdb4(0x29f)][_0x5acdb4(0x24d)](_0x2c6d99,_0x409b21,{'revision':_0x1d2b20,'skipValidation':_0x2fe4b8}),{'verbose':_0x14d390[_0x5acdb4(0x279)]}),_0x3b74ed=_0x2e1d7d['data'];console[_0x5acdb4(0x26f)](_0x5acdb4(0x35d)+_0x3b74ed[_0x5acdb4(0x20b)]);_0x3b74ed[_0x5acdb4(0x2a6)]&&console[_0x5acdb4(0x26f)](_0x5acdb4(0x372)+_0x3b74ed[_0x5acdb4(0x2a6)]);console[_0x5acdb4(0x26f)](_0x5acdb4(0x2b7)+_0x3b74ed[_0x5acdb4(0x38b)]),console['error'](_0x5acdb4(0x259)+_0x3b74ed[_0x5acdb4(0x346)]),console[_0x5acdb4(0x26f)](_0x5acdb4(0x2b0)+_0x3b74ed['fileCount']);_0x3b74ed['targetExists']&&(console[_0x5acdb4(0x26f)](a50_0x2262f3['yellow']('\x0a⚠\x20Project\x20\x22'+_0x3b74ed['newProjectName']+_0x5acdb4(0x316)+_0x3b74ed['existingProjectId']+')')),console[_0x5acdb4(0x26f)](a50_0x2262f3[_0x5acdb4(0x2ed)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x14d390[_0x5acdb4(0x2c6)])return console[_0x5acdb4(0x26f)](a50_0x2262f3[_0x5acdb4(0x2ed)](_0x5acdb4(0x2ea))),0x0;if(!_0x14d390['yes']){if(!isInteractive())return console[_0x5acdb4(0x26f)](a50_0x2262f3[_0x5acdb4(0x312)](_0x5acdb4(0x2dd)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5acdb4(0x26f)](a50_0x2262f3[_0x5acdb4(0x329)](_0x5acdb4(0x237))),0x1;const _0x309fb0=_0x3b74ed['sourceProjectName']||a50_0x426a1b[_0x5acdb4(0x2cc)](_0x2c6d99),_0x74711a=_0x3b74ed[_0x5acdb4(0x36b)]?_0x5acdb4(0x249)+_0x409b21+_0x5acdb4(0x20c):_0x5acdb4(0x2c8)+_0x309fb0+_0x5acdb4(0x217)+_0x409b21+'\x22?',_0x44c85f=await confirmKey(_0x74711a);if(!_0x44c85f)return console[_0x5acdb4(0x26f)](a50_0x2262f3['yellow']('Cancelled')),0x1;}const _0x3772f7=await withSpinner(_0x3b74ed[_0x5acdb4(0x36b)]?_0x5acdb4(0x248)+_0x409b21+_0x5acdb4(0x2cf):'Cloning\x20to\x20'+_0x409b21+'...',()=>_0x1919e3[_0x5acdb4(0x29f)]['executeCloneProject'](_0x3b74ed),{'verbose':_0x14d390[_0x5acdb4(0x279)]}),_0x5fd3ae=_0x3772f7[_0x5acdb4(0x215)];return console['error'](a50_0x2262f3[_0x5acdb4(0x37f)](_0x3b74ed[_0x5acdb4(0x36b)]?_0x5acdb4(0x368):_0x5acdb4(0x2c7))),console[_0x5acdb4(0x26f)]('\x20\x20Project:\x20'+_0x5fd3ae['newProjectName']),console[_0x5acdb4(0x26f)](_0x5acdb4(0x2eb)+_0x5fd3ae['newProjectId']),console[_0x5acdb4(0x26f)](_0x5acdb4(0x359)+_0x5fd3ae[_0x5acdb4(0x346)]),await this[_0x5acdb4(0x2fa)](_0x1919e3,_0x5fd3ae[_0x5acdb4(0x38b)],_0x14d390[_0x5acdb4(0x309)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x366);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x31b);async[a50_0x36cf24(0x35f)](_0x2e128f){const _0x55282f=a50_0x36cf24,{options:_0x12bcf5,args:_0x24bf13,tdx:_0x53a470}=_0x2e128f,_0x335ad4=_0x24bf13[0x0];if(!_0x335ad4)return console[_0x55282f(0x26f)](_0x55282f(0x206)),console[_0x55282f(0x26f)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x12bcf5['verbose']&&console['error']('Project:\x20'+_0x335ad4);if(!_0x12bcf5[_0x55282f(0x292)]){if(!isInteractive())return console['error'](a50_0x2262f3[_0x55282f(0x312)]('\x0aError:'),_0x55282f(0x25d)),console[_0x55282f(0x26f)](a50_0x2262f3[_0x55282f(0x329)](_0x55282f(0x237))),0x1;const _0x43936b=await confirmKey(_0x55282f(0x302)+_0x335ad4+_0x55282f(0x39b));if(!_0x43936b)return console[_0x55282f(0x26f)](a50_0x2262f3[_0x55282f(0x2ed)](_0x55282f(0x315))),0x1;}const _0x4ffb6b=await withSpinner(_0x55282f(0x2e7)+_0x335ad4+_0x55282f(0x2cf),()=>_0x53a470['workflow'][_0x55282f(0x257)](_0x335ad4),{'verbose':_0x12bcf5[_0x55282f(0x279)]}),_0xa89127=_0x4ffb6b[_0x55282f(0x215)];return console[_0x55282f(0x26f)](_0x55282f(0x318)+_0xa89127[_0x55282f(0x33a)]),console[_0x55282f(0x26f)](_0x55282f(0x2eb)+_0xa89127[_0x55282f(0x307)]),0x0;}}export function parseKeyValue(_0x3cc884){const _0x4bc24a=a50_0x36cf24,_0x1725ad=_0x3cc884[_0x4bc24a(0x2f4)]('=');if(_0x1725ad===-0x1)throw new Error(_0x4bc24a(0x26a)+_0x3cc884+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x3e59de=_0x3cc884[_0x4bc24a(0x24c)](0x0,_0x1725ad),_0x283b32=_0x3cc884['substring'](_0x1725ad+0x1);if(!_0x3e59de)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x3e59de,'value':_0x283b32};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]='workflow:secrets:list';[a50_0x36cf24(0x266)]=a50_0x36cf24(0x395);async[a50_0x36cf24(0x35f)](_0x25244c){const _0x40bf06=a50_0x36cf24,{options:_0x4484bb,args:_0x47a12f,tdx:_0x2443d2}=_0x25244c,_0x1fee47=this[_0x40bf06(0x26e)](_0x47a12f,_0x4484bb);if(!_0x1fee47)return 0x1;_0x4484bb[_0x40bf06(0x279)]&&console[_0x40bf06(0x26f)](_0x40bf06(0x27c)+_0x1fee47);const _0x209b01=await withSpinner(_0x40bf06(0x1fb),()=>_0x2443d2[_0x40bf06(0x29f)][_0x40bf06(0x2d6)](_0x1fee47),{'verbose':_0x4484bb[_0x40bf06(0x279)]}),{secrets:_0x15c8fc}=_0x209b01[_0x40bf06(0x215)];return console[_0x40bf06(0x26f)](_0x40bf06(0x21a)+_0x15c8fc[_0x40bf06(0x272)]+_0x40bf06(0x2fc)+(_0x15c8fc[_0x40bf06(0x272)]!==0x1?'s':'')),await handleSDKOutput(_0x15c8fc,_0x4484bb),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x2f1);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x327);async['execute'](_0x30574c){const _0x2db02d=a50_0x36cf24,{options:_0x590257,args:_0x23e251,tdx:_0x3394a9}=_0x30574c;let _0x897085,_0x1738c7;if(_0x23e251[_0x2db02d(0x272)]>=0x2)_0x897085=_0x23e251[0x0],_0x1738c7=_0x23e251[0x1];else{if(_0x23e251[_0x2db02d(0x272)]===0x1&&_0x590257[_0x2db02d(0x325)])_0x897085=_0x590257[_0x2db02d(0x325)],_0x1738c7=_0x23e251[0x0];else return _0x23e251[_0x2db02d(0x272)]===0x1?(console[_0x2db02d(0x26f)](_0x2db02d(0x294)),console[_0x2db02d(0x26f)](_0x2db02d(0x21f)),0x1):(console['error']('Error:\x20KEY=VALUE\x20is\x20required'),console['error'](_0x2db02d(0x25f)),0x1);}let _0x3f7f43,_0x28a646;try{({key:_0x3f7f43,value:_0x28a646}=parseKeyValue(_0x1738c7));}catch(_0x4b52f8){return _0x4b52f8 instanceof Error&&console[_0x2db02d(0x26f)](a50_0x2262f3[_0x2db02d(0x312)](_0x2db02d(0x219)),_0x4b52f8[_0x2db02d(0x245)]),0x1;}_0x590257[_0x2db02d(0x279)]&&(console[_0x2db02d(0x26f)]('Project:\x20'+_0x897085),console[_0x2db02d(0x26f)](_0x2db02d(0x228)+_0x3f7f43));const _0x489423=await withSpinner(_0x2db02d(0x27d),()=>_0x3394a9['workflow']['setSecret'](_0x897085,_0x3f7f43,_0x28a646),{'verbose':_0x590257[_0x2db02d(0x279)]}),_0x81cd6=_0x489423[_0x2db02d(0x215)];return console[_0x2db02d(0x26f)]('✔\x20Secret\x20\x27'+_0x81cd6[_0x2db02d(0x2db)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x81cd6[_0x2db02d(0x33a)]+'\x27'),(_0x590257[_0x2db02d(0x280)]||_0x590257['jsonl'])&&await handleSingleObjectOutput(_0x81cd6,_0x590257),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]=a50_0x36cf24(0x23c);[a50_0x36cf24(0x266)]=a50_0x36cf24(0x301);async[a50_0x36cf24(0x35f)](_0x47ae91){const _0x457a4f=a50_0x36cf24,{options:_0x25e42d,args:_0x3c2fcf,tdx:_0x149830}=_0x47ae91;let _0x494690,_0x14f037;if(_0x3c2fcf[_0x457a4f(0x272)]>=0x2)_0x494690=_0x3c2fcf[0x0],_0x14f037=_0x3c2fcf[0x1];else{if(_0x3c2fcf['length']===0x1&&_0x25e42d[_0x457a4f(0x325)])_0x494690=_0x25e42d[_0x457a4f(0x325)],_0x14f037=_0x3c2fcf[0x0];else return _0x3c2fcf[_0x457a4f(0x272)]===0x1?(console[_0x457a4f(0x26f)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x457a4f(0x26f)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error']('Error:\x20Secret\x20key\x20is\x20required'),console[_0x457a4f(0x26f)](_0x457a4f(0x27f)),0x1);}_0x25e42d['verbose']&&(console[_0x457a4f(0x26f)](_0x457a4f(0x27c)+_0x494690),console[_0x457a4f(0x26f)](_0x457a4f(0x228)+_0x14f037));if(!_0x25e42d[_0x457a4f(0x292)]){if(!isInteractive())return console[_0x457a4f(0x26f)](a50_0x2262f3['red'](_0x457a4f(0x2dd)),_0x457a4f(0x25d)),console['error'](a50_0x2262f3[_0x457a4f(0x329)](_0x457a4f(0x237))),0x1;const _0x5e9d3c=await confirmKey(_0x457a4f(0x2f5)+_0x14f037+_0x457a4f(0x330)+_0x494690+'\x27?');if(!_0x5e9d3c)return console[_0x457a4f(0x26f)](a50_0x2262f3[_0x457a4f(0x2ed)]('Cancelled')),0x1;}const _0x2f61cc=await withSpinner(_0x457a4f(0x234),()=>_0x149830[_0x457a4f(0x29f)][_0x457a4f(0x2a1)](_0x494690,_0x14f037),{'verbose':_0x25e42d[_0x457a4f(0x279)]}),_0x1f32f9=_0x2f61cc[_0x457a4f(0x215)];return console['error'](_0x457a4f(0x21b)+_0x1f32f9[_0x457a4f(0x2db)]+_0x457a4f(0x271)+_0x1f32f9['projectName']+'\x27'),(_0x25e42d[_0x457a4f(0x280)]||_0x25e42d[_0x457a4f(0x235)])&&await handleSingleObjectOutput(_0x1f32f9,_0x25e42d),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(_0x6083b2){const _0x34c3ae=a50_0x36cf24,_0x135e8c=Math[_0x34c3ae(0x287)](_0x6083b2/0x3e8),_0x45f2ca=Math[_0x34c3ae(0x287)](_0x135e8c/0x3c),_0x529c8d=Math[_0x34c3ae(0x287)](_0x45f2ca/0x3c),_0x3b186f=Math[_0x34c3ae(0x287)](_0x529c8d/0x18);if(_0x3b186f>0x0){const _0x2b1262=_0x529c8d%0x18;return _0x2b1262>0x0?_0x3b186f+'d\x20'+_0x2b1262+'h':_0x3b186f+'d';}else{if(_0x529c8d>0x0){const _0x504fb9=_0x45f2ca%0x3c;return _0x504fb9>0x0?_0x529c8d+'h\x20'+_0x504fb9+'m':_0x529c8d+'h';}else{if(_0x45f2ca>0x0){const _0xf83ac7=_0x135e8c%0x3c;return _0xf83ac7>0x0?_0x45f2ca+'m\x20'+_0xf83ac7+'s':_0x45f2ca+'m';}else return _0x135e8c+'s';}}}function formatTimestamp(_0x42a30f,_0x4a3f71){const _0x3b5742=a50_0x36cf24,_0x518e48=new Date(_0x42a30f),_0x4c5fb3=String(_0x518e48[_0x3b5742(0x388)]())[_0x3b5742(0x30f)](0x2,'0'),_0x315fa8=String(_0x518e48[_0x3b5742(0x305)]())[_0x3b5742(0x30f)](0x2,'0'),_0x4bcd4e=_0x4c5fb3+':'+_0x315fa8,_0x4f843f=_0x518e48['getFullYear']()===_0x4a3f71['getFullYear']()&&_0x518e48[_0x3b5742(0x291)]()===_0x4a3f71[_0x3b5742(0x291)]()&&_0x518e48[_0x3b5742(0x218)]()===_0x4a3f71['getDate']();if(_0x4f843f)return _0x4bcd4e;else{const _0x337685=String(_0x518e48[_0x3b5742(0x291)]()+0x1)['padStart'](0x2,'0'),_0x439dcd=String(_0x518e48[_0x3b5742(0x218)]())['padStart'](0x2,'0');return _0x337685+'-'+_0x439dcd+'\x20'+_0x4bcd4e;}}function formatDate(_0x4cbc56){const _0x40951a=a50_0x36cf24,_0x445d02=_0x4cbc56['getFullYear'](),_0x1107d1=String(_0x4cbc56[_0x40951a(0x291)]()+0x1)[_0x40951a(0x30f)](0x2,'0'),_0x105314=String(_0x4cbc56[_0x40951a(0x218)]())['padStart'](0x2,'0');return _0x445d02+'-'+_0x1107d1+'-'+_0x105314;}function getTaskStateIcon(_0x25e96c){const _0x4964fb={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x4964fb[_0x25e96c]||'⚪';}function getBarChar(_0x1758bd){const _0x3c9d12=a50_0x36cf24;return _0x1758bd===_0x3c9d12(0x26f)||_0x1758bd===_0x3c9d12(0x22e)?'×':'─';}function a50_0x4e3c(){const _0x1d4a47=['Error:\x20Invalid\x20parameter\x20format:\x20','List\x20all\x20workflow\x20projects','---\x20','icon','type','Task\x20name:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','match','getMonth','yes','projects','Error:\x20Project\x20name\x20is\x20required','\x20(use\x20--limit\x20to\x20show\x20more)','sessionTime','limit','Source\x20directory:\x20','LABEL_MIN_SPACING','Pushing\x20workflow\x20project...','No\x20sessions\x20found','LABEL_WIDTH_DIVISOR','12255TTvsot','\x20from\x20session\x20','workflow','Dry\x20run:\x20yes','deleteSecret','Retrying\x20session...','attempt','diff','targetDir','sourceProjectName','Fetching\x20log\x20files...','Select\x20a\x20task\x20to\x20view\x20logs:','2020326yMtvLA','✔\x20Downloaded\x20','MAX_TASKS_DISPLAY','deleted','planned','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Files\x20to\x20upload:\x20','isNewProject','Force:\x20yes','workflow:workflows','session:','cyan','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','New\x20project\x20name:\x20','round','→\x20New\x20project:\x20','running','MAX_LABEL_COUNT','canceling','clear','List\x20workflow\x20execution\x20sessions','No\x20workflow\x20sessions\x20found','start','skipValidation','No\x20log\x20content\x20found','workflow:kill','\x20-\x20','Pattern:\x20','dryRun','✔\x20Clone\x20complete','\x0aClone\x20\x22','value','-\x20nothing\x20pushed','Validation:\x20skipped','basename','localeCompare','find','...','logs','workflow:attempts','createdAt','Reason:\x20','select','summary','listSecrets','name','cwd','Failed\x20to\x20fetch\x20attempt\x20data','attempt:','key','Include\x20retried:\x20yes','\x0aError:','Attempt\x20ID:\x20','Project\x20name\x20is\x20required','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','resolveProjectId','Error:\x20Attempt\x20ID\x20is\x20required','session','map','Including\x20subtasks:\x20yes','toISOString','Deleting\x20project\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','has','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x20\x20Project\x20ID:\x20','No\x20attempts\x20found\x20in\x20project:\x20','yellow','rows','pullProject','kill','workflow:secrets:set','\x20to\x20see\x20detailed\x20logs','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','indexOf','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','changes','\x20modified','Analyzing\x20changes...','Session\x20','showWorkflowConsoleUrl','format','\x20secret','Project\x20filter:\x20','fill','192896aTxWbE','write','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Push\x20complete','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','getMinutes','slice','projectId','pending','site','includeRetried','3693geIcjq','\x20\x20Session\x20ID:\x20','109736AtRuTp','/sessions/','padStart','MAX_POLL_ITERATIONS','POLL_INTERVAL_MS','red','No\x20workflow\x20projects\x20found','Show\x20tasks\x20for\x20an\x20attempt','Cancelled','\x22\x20already\x20exists\x20(ID:\x20','fileSize','✔\x20Deleted\x20project\x20','split','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20sessions\x20','4086810nJprtL','\x20tasks','join','No\x20sessions\x20found\x20for:\x20','workflow:download','Expected\x20format:\x20--param\x20key=value','startedAt','cancelRequested','workflowProject','Filter:\x20project=','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Session\x20time:\x20','dim','state','table','🔄\x20','startsWith','task','includes','\x27\x20from\x20project\x20\x27','includeSubtasks','\x20(system)','stdout','fs/promises','displayLine','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','MIN_LABEL_COUNT','navigateSessionsInteractive','list','projectName','isArray','retryAttempt','No\x20matching\x20sessions\x20found','splice','workflow:logs','Total:\x20','output','lastAttempt','sys','\x20\x20Source:\x20','\x20deleted','revision','buildTimelineData','logFiles','Error:\x20','From\x20task:\x20','taskName','msPerChar','\x20\x20Changes:\x20','\x0aApply\x20these\x20changes?','getTime','title','isTTY','\x20\x20Target:\x20','end','tdx\x20wf\x20attempt\x20','executePushProject','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','MAX_TIMELINE_WIDTH','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','\x20\x20Revision:\x20','log','ICON_SPACING','⚠\x20Showing\x20first\x20','Source:\x20','unknown','execute','path','resolveProject','Loading\x20sessions...','Usage:\x20tdx\x20wf\x20use\x20<project>',',\x20Workflow:\x20','parse','workflow:delete','autocomplete','✔\x20Project\x20updated','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','No\x20log\x20files\x20found\x20for\x20this\x20attempt','targetExists','Attempt:\x20','follow','Downloading\x20project\x20','(use\x20--limit\x20to\x20see\x20more)','renderTimeline','✔\x20Workflow\x20project\x20context\x20cleared.','Source\x20project:\x20','Writing\x20files...','filter','💡\x20Tip:\x20Use\x20','index','\x20task','Listing\x20workflows...','864ZLbblh','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','sessionId','retryAttemptName','Loading\x20session...','Filter:\x20','green','Target:\x20','get','GUTTER','finishedAt','resumeFrom','some','push','✔\x20Project:\x20','getHours','now','No\x20sessions\x20found\x20in\x20project:\x20','newProjectName','Error:\x20Invalid\x20JSON\x20in\x20--params','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','metadata','workflowName','renderSingleTimeline','/attempt/','isDirectory','revision:\x20','stringify','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x27...','No\x20projects\x20match\x20pattern:\x20','attempts','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x0a✔\x20Attempt\x20complete','\x22?\x20This\x20cannot\x20be\x20undone.','workflow:use','\x20unchanged','\x20\x20Location:\x20','generateSessionTimelineRows','✔\x20Pull\x20complete','params','Pull\x20workflow\x20project\x20to\x20local\x20folder','No\x20sessions\x20with\x20timing\x20information','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Listing\x20secrets...','values','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','MIN_TIMELINE_WIDTH','resolveProjectDir','hasChanges','fromTask','status','attemptId','No\x20workflows\x20found','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','172QjpDQP','keys','✔\x20Workflow\x20run\x20started','relative','sourceDir','\x22\x20with\x20new\x20revision?','every','\x20of\x20','workflow:tasks','Killing\x20attempt...','List\x20workflow\x20attempts','-\x20no\x20files\x20written','retrySession','Latest\x20session\x20has\x20no\x20attempt','data','workflows','\x22\x20to\x20new\x20project\x20\x22','getDate','Error:','✔\x20Found\x20','✔\x20Secret\x20\x27','workflow:pull','repeat','\x20\x20Workflow:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','ICON_WIDTH','\x20\x20New\x20attempt\x20ID:\x20','pollTimeline','toLowerCase','Listing\x20workflow\x20sessions...','No\x20workflow\x20tdx.json\x20found','success','Select\x20a\x20session\x20to\x20view\x20timeline:','Key:\x20','applyPullProject','sort','project','workflow:upload','Auto-selected\x20latest\x20session:\x20','group_error','done','modified','\x1b[1A\x1b[2K','\x0aPush\x20these\x20changes?','window','Deleting\x20secret...','jsonl','all','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','📋\x20','\x20session','text','updatedAt','workflow:secrets:delete','max','context','workflow:sessions','sessions','Resume\x20from:\x20','duration','preparePushProject','min','message','parseProjectWorkflowPattern','set','Updating\x20','\x0aUpdate\x20existing\x20project\x20\x22','renderSessionsTimeline','Show\x20logs\x20for\x20a\x20workflow\x20attempt','substring','prepareCloneProject','Kill\x20a\x20running\x20attempt','blue','\x20is\x20not\x20a\x20directory','Start\x20a\x20workflow\x20run','resolve','workflow:clone','No\x20attempts\x20found\x20for:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','unchanged','delete','/app/workflows/','Revision:\x20','\x20\x20Session\x20context\x20set\x20to:\x20','reason','trimEnd','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Loading\x20workflows...','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','Pushing\x20project...','Show\x20specific\x20attempt\x20details','\x20\x20tdx\x20wf\x20use\x20<project>','workflow:push','\x20\x20Files\x20extracted:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','313854jKyGeA','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Invalid\x20format:\x20','(unknown)','\x0aPolling...\x20(','startTime','requireProject','error','Warning:','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','length','filesExtracted','tasks','→\x20Project:\x20','Target\x20directory:\x20','session_id','✔\x20Pushed\x20','verbose','white','Getting\x20attempt\x20tasks...','Project:\x20','Setting\x20secret...','TASK_NAME_WIDTH','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','json','No\x20attempts\x20found','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','fullName','Getting\x20attempt\x20details...','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Downloading\x20logs...','floor','\x20project'];a50_0x4e3c=function(){return _0x1d4a47;};return a50_0x4e3c();}function getBarColor(_0x148467){const _0xebe4cb=a50_0x36cf24,_0x46649d={'success':a50_0x2262f3[_0xebe4cb(0x37f)],'error':a50_0x2262f3[_0xebe4cb(0x312)],'group_error':a50_0x2262f3[_0xebe4cb(0x312)],'running':a50_0x2262f3[_0xebe4cb(0x24f)],'blocked':a50_0x2262f3[_0xebe4cb(0x2ed)],'planned':a50_0x2262f3[_0xebe4cb(0x329)],'canceling':a50_0x2262f3[_0xebe4cb(0x2ed)]};return _0x46649d[_0x148467]||a50_0x2262f3[_0xebe4cb(0x27a)];}function parseTaskName(_0x45fe39){const _0x41c277=a50_0x36cf24;let _0x210b1e=_0x45fe39['replace'](/^\++/,'');const _0x463efe=_0x210b1e[_0x41c277(0x319)]('+'),_0x28fa33=_0x463efe[_0x41c277(0x272)]>0x1?_0x463efe[_0x41c277(0x272)]-0x2:0x0,_0x3be8eb=_0x463efe[_0x463efe['length']-0x1]||_0x210b1e;return{'level':_0x28fa33,'name':'+'+_0x3be8eb};}function truncateTaskName(_0x56308a,_0x2f0c8b){const _0x2404dc=a50_0x36cf24,_0x2edcca=stringWidth(_0x56308a);if(_0x2edcca<=_0x2f0c8b)return _0x56308a;let _0x46ec41=_0x56308a;while(stringWidth(_0x46ec41+'…')>_0x2f0c8b&&_0x46ec41[_0x2404dc(0x272)]>0x0){_0x46ec41=_0x46ec41[_0x2404dc(0x306)](0x0,-0x1);}return _0x46ec41+'…';}function calculateTimeScale(_0x1cafda,_0x2d0db6){const _0x48a5e9=a50_0x36cf24;return{'startTime':_0x1cafda[_0x48a5e9(0x2c0)],'endTime':_0x1cafda[_0x48a5e9(0x353)],'durationMs':_0x1cafda[_0x48a5e9(0x242)],'msPerChar':_0x1cafda[_0x48a5e9(0x242)]/_0x2d0db6};}function timeToPosition(_0x1a83e2,_0x21c81d,_0x1ff022){const _0x13e3f3=a50_0x36cf24,_0x345ae5=_0x1a83e2-_0x21c81d['startTime'],_0x4a3ac1=Math['floor'](_0x345ae5/_0x21c81d[_0x13e3f3(0x34c)]);return Math[_0x13e3f3(0x23d)](0x0,Math[_0x13e3f3(0x244)](_0x4a3ac1,_0x1ff022));}function renderTimeAxis(_0x1916c8,_0x1574ab){const _0x47d31b=a50_0x36cf24,_0x88f352=Math[_0x47d31b(0x244)](TIMELINE_CONFIG[_0x47d31b(0x2bb)],Math['max'](TIMELINE_CONFIG[_0x47d31b(0x337)],Math[_0x47d31b(0x287)](_0x1574ab/TIMELINE_CONFIG[_0x47d31b(0x29c)]))),_0x1ffae4=_0x1916c8['durationMs']/(_0x88f352-0x1),_0x3b933e=new Date(_0x1916c8[_0x47d31b(0x26d)]),_0x2be26a=[];for(let _0x37b3a3=0x0;_0x37b3a3<_0x88f352;_0x37b3a3++){const _0x401530=_0x1916c8['startTime']+_0x37b3a3*_0x1ffae4,_0x237fa4=timeToPosition(_0x401530,_0x1916c8,_0x1574ab),_0x1847f8=formatTimestamp(_0x401530,_0x3b933e);_0x2be26a['push']({'pos':_0x237fa4,'text':_0x1847f8});}const _0x218992=new Array(_0x1574ab)[_0x47d31b(0x2fe)]('\x20');let _0x65f111=-0x1;for(const {pos:_0x354390,text:_0x268b34}of _0x2be26a){let _0x13436a=Math[_0x47d31b(0x23d)](0x0,_0x354390-Math[_0x47d31b(0x287)](_0x268b34[_0x47d31b(0x272)]/0x2));_0x13436a<=_0x65f111+TIMELINE_CONFIG[_0x47d31b(0x299)]&&(_0x13436a=_0x65f111+TIMELINE_CONFIG[_0x47d31b(0x299)]+0x1);_0x13436a+_0x268b34['length']>_0x1574ab&&(_0x13436a=_0x1574ab-_0x268b34[_0x47d31b(0x272)]);if(_0x13436a>=0x0&&_0x13436a+_0x268b34[_0x47d31b(0x272)]<=_0x1574ab&&_0x13436a>_0x65f111){for(let _0x137b5f=0x0;_0x137b5f<_0x268b34['length'];_0x137b5f++){_0x218992[_0x13436a+_0x137b5f]=_0x268b34[_0x137b5f];}_0x65f111=_0x13436a+_0x268b34[_0x47d31b(0x272)]-0x1;}}return _0x218992[_0x47d31b(0x31f)]('');}function renderTaskRow(_0x5935a6,_0x40a6f2,_0x4b001f,_0x2e6c1c){const _0x47f81a=a50_0x36cf24,{level:_0x4d05b6,name:_0x201d45}=parseTaskName(_0x5935a6['name']),_0x2fb3bf='\x20'[_0x47f81a(0x21d)](_0x4d05b6),_0x21ac98=_0x5935a6[_0x47f81a(0x233)]?'('+formatElapsed(_0x5935a6[_0x47f81a(0x233)][_0x47f81a(0x242)])+')':'',_0x21bca9=stringWidth(_0x21ac98),_0x55a62c=_0x4d05b6*0x1,_0x1e4655=_0x2e6c1c-_0x55a62c-_0x21bca9-0x1,_0x4068e4=truncateTaskName(_0x201d45,_0x1e4655),_0x435f4b=_0x2fb3bf+_0x4068e4,_0x443402=stringWidth(_0x435f4b),_0x595e42=_0x2e6c1c-_0x443402-_0x21bca9,_0x1ed68f=_0x435f4b+'\x20'[_0x47f81a(0x21d)](Math[_0x47f81a(0x23d)](0x1,_0x595e42))+a50_0x2262f3[_0x47f81a(0x329)](_0x21ac98),_0x11542a=getTaskStateIcon(_0x5935a6[_0x47f81a(0x32a)]),_0x3a3c8c=new Array(_0x4b001f)[_0x47f81a(0x2fe)]('\x20');if(_0x5935a6['window']){const _0x29430d=timeToPosition(_0x5935a6[_0x47f81a(0x233)][_0x47f81a(0x2c0)],_0x40a6f2,_0x4b001f),_0x36070c=timeToPosition(_0x5935a6[_0x47f81a(0x233)][_0x47f81a(0x353)],_0x40a6f2,_0x4b001f),_0x155e68=getBarChar(_0x5935a6[_0x47f81a(0x32a)]),_0x3d0624=Math[_0x47f81a(0x23d)](_0x29430d+0x1,_0x36070c);for(let _0x12fa6c=_0x29430d;_0x12fa6c<Math[_0x47f81a(0x244)](_0x3d0624,_0x4b001f);_0x12fa6c++){_0x3a3c8c[_0x12fa6c]=_0x155e68;}}const _0x47cda6=getBarColor(_0x5935a6[_0x47f81a(0x32a)]),_0x1fe70a=_0x3a3c8c['map'](_0x5ecd17=>_0x5ecd17==='\x20'?'\x20':_0x47cda6(_0x5ecd17))[_0x47f81a(0x31f)]('');return _0x11542a+'\x20'+_0x1ed68f+'│'+_0x1fe70a+'│';}function calculateStats(_0x4f48b4){const _0x59c296=a50_0x36cf24,_0x416558={'total':_0x4f48b4[_0x59c296(0x272)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x303c86 of _0x4f48b4){if(_0x303c86['state']===_0x59c296(0x226))_0x416558[_0x59c296(0x226)]++;else{if(_0x303c86[_0x59c296(0x32a)]===_0x59c296(0x26f)||_0x303c86[_0x59c296(0x32a)]===_0x59c296(0x22e))_0x416558['error']++;else _0x303c86[_0x59c296(0x32a)]===_0x59c296(0x2ba)?_0x416558['running']++:_0x416558[_0x59c296(0x308)]++;}}return _0x416558;}function formatStats(_0x5c1763){const _0x455d38=a50_0x36cf24;return[_0x455d38(0x340)+_0x5c1763['total'],'✅\x20'+_0x5c1763[_0x455d38(0x226)],'❌\x20'+_0x5c1763[_0x455d38(0x26f)],_0x455d38(0x32c)+_0x5c1763[_0x455d38(0x2ba)],'⏳\x20'+_0x5c1763[_0x455d38(0x308)]][_0x455d38(0x31f)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a50_0x36cf24(0x2d7)]='workflow:timeline';[a50_0x36cf24(0x266)]=a50_0x36cf24(0x2e8);async[a50_0x36cf24(0x35f)](_0x2535ee){const _0x83106=a50_0x36cf24,{options:_0x3fb4aa,args:_0x1df75d,tdx:_0x3fb9b6}=_0x2535ee;let _0x55e670,_0x438611,_0x334fba=![];if(_0x1df75d[0x0]){if(_0x1df75d[0x0]['includes']('.')){const _0x3669a5=this[_0x83106(0x246)](_0x1df75d,_0x3fb4aa);if(!_0x3669a5)return 0x1;_0x55e670=_0x3669a5['projectName'],_0x438611=_0x3669a5[_0x83106(0x38f)];}else{_0x438611=_0x1df75d[0x0],_0x55e670=_0x3fb4aa[_0x83106(0x325)];if(!_0x55e670)return console[_0x83106(0x26f)](a50_0x2262f3['red']('Error:'),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x334fba=!![];}}else{const _0x1f6c89=this['parseProjectWorkflowPattern'](_0x1df75d,_0x3fb4aa);if(!_0x1f6c89)return 0x1;_0x55e670=_0x1f6c89[_0x83106(0x33a)],_0x438611=_0x1f6c89['workflowName'];}if(_0x3fb4aa[_0x83106(0x279)]){if(_0x55e670&&_0x438611)console[_0x83106(0x26f)](_0x83106(0x37e)+_0x55e670+'.'+_0x438611);else _0x55e670&&console['error'](_0x83106(0x326)+_0x55e670);}const _0x276bb6=_0x3fb4aa['attemptId'],_0x192d58=_0x3fb4aa[_0x83106(0x37b)];if(_0x276bb6){_0x192d58&&console[_0x83106(0x26f)](a50_0x2262f3[_0x83106(0x2ed)](_0x83106(0x270)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x329f36=_0x3fb4aa[_0x83106(0x36d)];return _0x329f36?await this[_0x83106(0x222)](_0x2535ee,_0x276bb6):await this[_0x83106(0x390)](_0x2535ee,_0x276bb6,_0x3fb4aa),0x0;}if(_0x192d58){const _0x1783d5=await withSpinner(_0x83106(0x37d),()=>_0x3fb9b6[_0x83106(0x29f)][_0x83106(0x240)]({'projectName':_0x55e670,'workflowName':_0x438611,'limit':0x64}),{'verbose':_0x3fb4aa['verbose']}),_0xc17abc=_0x1783d5[_0x83106(0x215)][_0x83106(0x2ce)](_0x599e44=>_0x599e44['id']===_0x192d58);if(!_0xc17abc)return console[_0x83106(0x26f)](a50_0x2262f3[_0x83106(0x312)](_0x83106(0x219)),'Session\x20not\x20found:\x20'+_0x192d58),0x1;if(!_0xc17abc[_0x83106(0x342)]?.['id'])return console[_0x83106(0x26f)](a50_0x2262f3[_0x83106(0x312)](_0x83106(0x219)),_0x83106(0x2f9)+_0x192d58+'\x20has\x20no\x20attempts'),0x1;const _0x82fe13=_0xc17abc['lastAttempt']['id'];_0x3fb4aa[_0x83106(0x279)]&&console['error']('Using\x20attempt\x20'+_0x82fe13+_0x83106(0x29e)+_0x192d58);const _0x23c99d=_0x3fb4aa[_0x83106(0x36d)];return _0x23c99d?await this[_0x83106(0x222)](_0x2535ee,_0x82fe13):await this['renderSingleTimeline'](_0x2535ee,_0x82fe13,_0x3fb4aa),0x0;}const _0x20f4dc=await withSpinner(_0x83106(0x362),()=>_0x3fb9b6[_0x83106(0x29f)][_0x83106(0x240)]({'projectName':_0x55e670,'workflowName':_0x438611,'limit':_0x3fb4aa[_0x83106(0x297)]||0x32}),{'verbose':_0x3fb4aa[_0x83106(0x279)]}),_0x4e9488=_0x20f4dc[_0x83106(0x215)];if(_0x4e9488[_0x83106(0x272)]===0x0){if(_0x55e670&&_0x438611)console['error'](_0x83106(0x320)+_0x55e670+'.'+_0x438611);else _0x55e670?console['error']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x55e670):(console['error'](_0x83106(0x2bf)),console['error'](a50_0x2262f3[_0x83106(0x329)](_0x83106(0x1fd))));return 0x0;}_0x4e9488[_0x83106(0x22a)]((_0x14c5ee,_0x36ad82)=>{const _0x23caf2=_0x83106,_0x4c7d9a=_0x14c5ee[_0x23caf2(0x296)]||'',_0x2f69ff=_0x36ad82[_0x23caf2(0x296)]||'';return _0x2f69ff[_0x23caf2(0x2cd)](_0x4c7d9a);});if(_0x3fb4aa['json']||_0x3fb4aa[_0x83106(0x235)])return await handleSDKOutput(_0x4e9488,_0x3fb4aa),0x0;let _0x516848;if(_0x334fba){const _0x536f79=_0x4e9488[0x0];if(!_0x536f79[_0x83106(0x342)]?.['id'])return console[_0x83106(0x26f)](_0x83106(0x214)),0x0;_0x516848=_0x536f79[_0x83106(0x342)]['id'],_0x3fb4aa['verbose']&&console['error'](_0x83106(0x22d)+_0x536f79['sessionTime']);}else{const _0x15bf59=_0x4e9488[_0x83106(0x2e4)](_0x3f8632=>{const _0x2f218f=_0x83106,_0x2beb02=getAttemptStatusDisplay(_0x3f8632[_0x2f218f(0x342)]);return{'title':_0x3f8632[_0x2f218f(0x22b)]?.['name']+'.'+_0x3f8632[_0x2f218f(0x29f)]?.[_0x2f218f(0x2d7)]+_0x2f218f(0x2c4)+_0x3f8632['sessionTime']+'\x20'+_0x2beb02[_0x2f218f(0x28c)],'value':_0x3f8632['lastAttempt']?.['id']||'','description':_0x2beb02[_0x2f218f(0x23a)]};}),_0x3defe0=await a50_0x42cef6({'type':'select','name':_0x83106(0x203),'message':_0x83106(0x227),'choices':_0x15bf59[_0x83106(0x374)](_0x4cde75=>_0x4cde75[_0x83106(0x2c9)]!=='')});if(!_0x3defe0[_0x83106(0x203)])return 0x0;_0x516848=_0x3defe0[_0x83106(0x203)];}const _0x3e42ea=_0x3fb4aa[_0x83106(0x36d)];return _0x3e42ea?await this['pollTimeline'](_0x2535ee,_0x516848):await this[_0x83106(0x390)](_0x2535ee,_0x516848,_0x3fb4aa),0x0;}async[a50_0x36cf24(0x390)](_0x792af,_0x4732e1,_0x151ad0){const _0x32e942=a50_0x36cf24,{tdx:_0x41fa73}=_0x792af;let _0x217852,_0x127b92;try{[_0x217852,_0x127b92]=await Promise[_0x32e942(0x236)]([_0x41fa73[_0x32e942(0x29f)][_0x32e942(0x2a3)](_0x4732e1),_0x41fa73[_0x32e942(0x29f)]['tasks'](_0x4732e1,![])]);}catch(_0x10a3c4){console[_0x32e942(0x26f)](a50_0x2262f3[_0x32e942(0x312)](_0x32e942(0x2d9)));_0x151ad0[_0x32e942(0x279)]&&console[_0x32e942(0x26f)](_0x10a3c4);throw _0x10a3c4;}if(_0x151ad0[_0x32e942(0x280)]||_0x151ad0[_0x32e942(0x235)]){const _0x2ccba2=this[_0x32e942(0x347)](_0x217852,_0x127b92);await handleSDKOutput([_0x2ccba2],_0x151ad0);return;}const _0x5bef16=_0x41fa73[_0x32e942(0x23e)][_0x32e942(0x309)],_0x894fec=this[_0x32e942(0x370)](_0x217852,_0x127b92,_0x5bef16);console[_0x32e942(0x35a)](_0x894fec);}async[a50_0x36cf24(0x222)](_0x6eb318,_0x44fd86){const _0x498996=a50_0x36cf24,{tdx:_0x1b2b1e}=_0x6eb318,_0x375cf0=TIMELINE_CONFIG[_0x498996(0x311)],_0x58e029=TIMELINE_CONFIG[_0x498996(0x310)];let _0x48e28d=0x0;while(_0x48e28d<_0x58e029){process['stdout'][_0x498996(0x351)]&&process[_0x498996(0x333)][_0x498996(0x300)]('\x1bc');let _0xdaf083,_0x5074bc;try{[_0xdaf083,_0x5074bc]=await Promise[_0x498996(0x236)]([_0x1b2b1e[_0x498996(0x29f)][_0x498996(0x2a3)](_0x44fd86),_0x1b2b1e[_0x498996(0x29f)][_0x498996(0x274)](_0x44fd86,![])]);}catch(_0x4202cd){console[_0x498996(0x26f)](a50_0x2262f3['red']('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x48e28d>0x0&&console['error'](a50_0x2262f3[_0x498996(0x329)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x48e28d));throw _0x4202cd;}const _0x2dbf2d=_0x1b2b1e['context']['site'],_0x25a387=this['renderTimeline'](_0xdaf083,_0x5074bc,_0x2dbf2d);console[_0x498996(0x35a)](_0x25a387);const _0x437553=_0xdaf083[_0x498996(0x22f)]&&_0x5074bc[_0x498996(0x20d)](_0x16b2bd=>_0x16b2bd[_0x498996(0x32a)]!=='running'&&_0x16b2bd[_0x498996(0x32a)]!=='planned');if(_0x437553){console[_0x498996(0x26f)](a50_0x2262f3['green'](_0x498996(0x39a)));break;}console['error'](a50_0x2262f3[_0x498996(0x329)](_0x498996(0x26c)+_0x48e28d*0x2+_0x498996(0x369))),await new Promise(_0x28acd2=>setTimeout(_0x28acd2,_0x375cf0)),_0x48e28d++;}_0x48e28d>=_0x58e029&&console[_0x498996(0x26f)](a50_0x2262f3[_0x498996(0x2ed)](_0x498996(0x282)));}['renderTimeline'](_0x4a071d,_0x31825c,_0x1c0d6e){const _0x1d0114=a50_0x36cf24,_0x5dc8b4=[],_0x1d272d=TIMELINE_CONFIG[_0x1d0114(0x27e)],_0x21c6bd=0x5,_0x250204=process[_0x1d0114(0x333)]['columns']||0x78,_0x51420d=_0x250204-_0x1d272d-_0x21c6bd,_0x2811aa=Math[_0x1d0114(0x23d)](TIMELINE_CONFIG[_0x1d0114(0x1fe)],Math[_0x1d0114(0x244)](_0x51420d,TIMELINE_CONFIG[_0x1d0114(0x357)])),_0xfd3f31=new Date(_0x4a071d['createdAt'])[_0x1d0114(0x34f)](),_0x4ebac0=_0x4a071d[_0x1d0114(0x383)]?new Date(_0x4a071d[_0x1d0114(0x383)])[_0x1d0114(0x34f)]():Date[_0x1d0114(0x389)](),_0x418a60={'start':_0xfd3f31,'end':_0x4ebac0,'duration':_0x4ebac0-_0xfd3f31},_0x40c0ba=new Map(),_0x1b58dc=[];for(const _0x471c73 of _0x31825c){if(_0x471c73[_0x1d0114(0x323)]){const _0x41b9c8=new Date(_0x471c73[_0x1d0114(0x323)])[_0x1d0114(0x34f)](),_0x3115cb=_0x471c73['updatedAt']?new Date(_0x471c73[_0x1d0114(0x23b)])[_0x1d0114(0x34f)]():Date['now'](),_0x35e5a3={'start':_0x41b9c8,'end':_0x3115cb,'duration':_0x3115cb-_0x41b9c8};_0x40c0ba[_0x1d0114(0x247)](_0x471c73['id'],_0x35e5a3),_0x1b58dc[_0x1d0114(0x386)]({'name':_0x471c73['fullName'],'state':_0x471c73[_0x1d0114(0x32a)]||'unknown','window':_0x35e5a3});}else _0x1b58dc[_0x1d0114(0x386)]({'name':_0x471c73[_0x1d0114(0x283)],'state':_0x471c73[_0x1d0114(0x32a)]||_0x1d0114(0x2ad),'window':undefined});}_0x1b58dc['sort']((_0x2a48fa,_0x2caca9)=>{const _0x1b892d=_0x1d0114;if(!_0x2a48fa['window'])return 0x1;if(!_0x2caca9[_0x1b892d(0x233)])return-0x1;return _0x2a48fa[_0x1b892d(0x233)][_0x1b892d(0x2c0)]-_0x2caca9[_0x1b892d(0x233)][_0x1b892d(0x2c0)];});const _0x43b4bd=_0x1b58dc[_0x1d0114(0x272)],_0x5a3a1f=_0x43b4bd>TIMELINE_CONFIG[_0x1d0114(0x2ab)];_0x5a3a1f&&_0x1b58dc[_0x1d0114(0x33e)](TIMELINE_CONFIG[_0x1d0114(0x2ab)]);const _0x29953c=calculateTimeScale(_0x418a60,_0x2811aa),_0x10c3f6=_0x4a071d[_0x1d0114(0x22f)]?_0x4a071d[_0x1d0114(0x226)]?a50_0x2262f3['green'](_0x1d0114(0x226)):a50_0x2262f3[_0x1d0114(0x312)](_0x1d0114(0x26f)):a50_0x2262f3[_0x1d0114(0x24f)]('running'),_0x1c9ff0=_0x4a071d[_0x1d0114(0x22b)]?.['id'],_0x464093=_0x4a071d[_0x1d0114(0x37b)];let _0x3d0bdb;if(_0x1c9ff0&&_0x464093){const _0x1134e1=getWorkflowAttemptUrl(_0x1c0d6e,_0x1c9ff0,_0x464093,_0x4a071d['id']);_0x3d0bdb=hyperlink(a50_0x2262f3[_0x1d0114(0x329)](_0x4a071d['id']),_0x1134e1);}else _0x3d0bdb=a50_0x2262f3[_0x1d0114(0x329)](_0x4a071d['id']);_0x5dc8b4['push'](_0x1d0114(0x36c)+_0x3d0bdb+_0x1d0114(0x2c4)+_0x10c3f6+'\x20-\x20'+formatElapsed(_0x418a60[_0x1d0114(0x242)]));if(_0x1b58dc[_0x1d0114(0x272)]>0x0){const _0x15eaa7=renderTimeAxis(_0x29953c,_0x2811aa),_0x7a072f=new Date(_0x418a60[_0x1d0114(0x2c0)]),_0x4eeb8c=formatDate(_0x7a072f),_0x3a8557=TIMELINE_CONFIG[_0x1d0114(0x220)]+TIMELINE_CONFIG['ICON_SPACING']+_0x1d272d,_0x327a43=_0x4eeb8c[_0x1d0114(0x30f)](_0x3a8557),_0x2d2e8d=a50_0x2262f3[_0x1d0114(0x329)](_0x327a43);_0x5dc8b4[_0x1d0114(0x386)](_0x2d2e8d+'\x20'+_0x15eaa7);for(const _0x201f96 of _0x1b58dc){_0x5dc8b4[_0x1d0114(0x386)](renderTaskRow(_0x201f96,_0x29953c,_0x2811aa,_0x1d272d));}const _0xa87076=calculateStats(_0x1b58dc);_0x5dc8b4['push'](formatStats(_0xa87076)),_0x5a3a1f&&_0x5dc8b4[_0x1d0114(0x386)](a50_0x2262f3[_0x1d0114(0x2ed)](_0x1d0114(0x35c)+TIMELINE_CONFIG[_0x1d0114(0x2ab)]+_0x1d0114(0x20e)+_0x43b4bd+_0x1d0114(0x31e))),_0x5dc8b4[_0x1d0114(0x386)](''),_0x5dc8b4[_0x1d0114(0x386)](a50_0x2262f3[_0x1d0114(0x329)](_0x1d0114(0x375))+(_0x1d0114(0x354)+_0x4a071d['id']+'\x20logs')+a50_0x2262f3['dim'](_0x1d0114(0x2f2)));}else _0x5dc8b4['push'](_0x1d0114(0x205));return _0x5dc8b4[_0x1d0114(0x31f)]('\x0a');}['buildTimelineData'](_0x4a37f4,_0x126d98){const _0xb070d2=a50_0x36cf24,_0x182064=new Date(_0x4a37f4[_0xb070d2(0x2d2)])[_0xb070d2(0x34f)](),_0x91afba=_0x4a37f4['finishedAt']?new Date(_0x4a37f4[_0xb070d2(0x383)])[_0xb070d2(0x34f)]():Date[_0xb070d2(0x389)](),_0x14fb0e=_0x91afba-_0x182064,_0x598560=[];for(const _0x124a64 of _0x126d98){if(_0x124a64['startedAt']){const _0x13678d=new Date(_0x124a64[_0xb070d2(0x323)])['getTime'](),_0xcae4c4=_0x124a64['updatedAt']?new Date(_0x124a64[_0xb070d2(0x23b)])[_0xb070d2(0x34f)]():Date[_0xb070d2(0x389)]();_0x598560[_0xb070d2(0x386)]({'name':_0x124a64[_0xb070d2(0x283)],'state':_0x124a64[_0xb070d2(0x32a)]||_0xb070d2(0x35e),'window':{'start':_0x13678d,'end':_0xcae4c4,'duration':_0xcae4c4-_0x13678d}});}else _0x598560[_0xb070d2(0x386)]({'name':_0x124a64[_0xb070d2(0x283)],'state':_0x124a64['state']||'planned','window':undefined});}const _0x5ce17c=calculateStats(_0x598560);return{'attempt':{'id':_0x4a37f4['id'],'status':_0x4a37f4[_0xb070d2(0x22f)]?_0x4a37f4[_0xb070d2(0x226)]?_0xb070d2(0x226):_0xb070d2(0x26f):_0xb070d2(0x2ba),'createdAt':_0x4a37f4[_0xb070d2(0x2d2)],'finishedAt':_0x4a37f4['finishedAt'],'duration_ms':_0x14fb0e},'tasks':_0x598560[_0xb070d2(0x2e4)](_0x4dd0b6=>({'name':_0x4dd0b6[_0xb070d2(0x2d7)],'state':_0x4dd0b6[_0xb070d2(0x32a)],'startedAt':_0x4dd0b6[_0xb070d2(0x233)]?new Date(_0x4dd0b6[_0xb070d2(0x233)][_0xb070d2(0x2c0)])[_0xb070d2(0x2e6)]():null,'updatedAt':_0x4dd0b6[_0xb070d2(0x233)]?new Date(_0x4dd0b6[_0xb070d2(0x233)][_0xb070d2(0x353)])[_0xb070d2(0x2e6)]():null,'duration_ms':_0x4dd0b6['window']?.['duration']||null})),'stats':_0x5ce17c};}}
|
|
1
|
+
const a51_0x467f12=a51_0x56f9;(function(_0xceb76b,_0x1e911a){const _0x43eabb=a51_0x56f9,_0x209e75=_0xceb76b();while(!![]){try{const _0x548da6=-parseInt(_0x43eabb(0x278))/0x1+-parseInt(_0x43eabb(0x31a))/0x2+parseInt(_0x43eabb(0x1b1))/0x3*(parseInt(_0x43eabb(0x214))/0x4)+parseInt(_0x43eabb(0x21f))/0x5+-parseInt(_0x43eabb(0x277))/0x6*(parseInt(_0x43eabb(0x26c))/0x7)+-parseInt(_0x43eabb(0x222))/0x8*(-parseInt(_0x43eabb(0x1ad))/0x9)+-parseInt(_0x43eabb(0x1b4))/0xa*(-parseInt(_0x43eabb(0x231))/0xb);if(_0x548da6===_0x1e911a)break;else _0x209e75['push'](_0x209e75['shift']());}catch(_0x14fe01){_0x209e75['push'](_0x209e75['shift']());}}}(a51_0xf6ba,0x6a7a1));import a51_0x221e70 from'chalk';import{existsSync}from'fs';import a51_0x5534f1 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';function a51_0xf6ba(){const _0x2ce8a0=['143gQTGRI','Project:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','start','window','workflows','MAX_TASKS_DISPLAY','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x22\x20already\x20exists\x20(ID:\x20','includes','Retrying\x20session...','No\x20workflow\x20projects\x20found','running','No\x20workflows\x20found\x20in\x20project:\x20','project','parse','sort','description','List\x20workflow\x20execution\x20sessions','\x0aDry\x20run\x20-\x20no\x20files\x20written','skipValidation','durationMs','executePushProject','Loading\x20session...','stringify','Project\x20filter:\x20','params','error','isTTY','Select\x20a\x20workflow\x20to\x20run','getDate','workflow:delete','fullName','format','workflow:kill','done','execute','Pulling\x20project\x20','ICON_SPACING','New\x20project\x20name:\x20','Error:\x20Secret\x20key\x20is\x20required','green','Kill\x20a\x20running\x20attempt','startTime','startsWith','✔\x20Workflow\x20project\x20context\x20cleared.','...','\x20\x20Revision:\x20','existingProjectId','setSecret','---\x20','data','\x0a✔\x20Attempt\x20complete','get','workflow:sessions','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','workflow:timeline','basename','planned','7cQPwxa','\x20\x20Changes:\x20','length','site','msPerChar','Project\x20name:\x20','hasChanges','find','clear','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','→\x20New\x20project:\x20','599736MPAXJh','693281psvFww','Usage:\x20tdx\x20wf\x20use\x20<project>','Show\x20tasks\x20for\x20an\x20attempt','utf-8','Validation:\x20skipped','attemptId','Warning:','type','Filter:\x20','Analyzing\x20project...','Files\x20to\x20upload:\x20','Filter:\x20project=','taskName','✔\x20Found\x20','\x20\x20Session\x20ID:\x20',',\x20Workflow:\x20','modified','\x20-\x20','lastAttempt','Revision:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','unknown','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x22\x20to\x20new\x20project\x20\x22','attempt','\x20deleted','\x20\x20Console:\x20','No\x20sessions\x20found','stat','log','yellow','workflow:attempt','✔\x20Project:\x20','Listing\x20workflow\x20sessions...','pullProject','List\x20workflows','session','\x20is\x20not\x20a\x20directory','indexOf','limit','MIN_LABEL_COUNT','Pushing\x20project...','Killing\x20attempt...','Project\x20directory:\x20','fs/promises','key','end','✔\x20Secret\x20\x27','No\x20workflow\x20tdx.json\x20found','new','targetExists','summary','session:','includeSubtasks','getTime','blue','cyan','jsonl','workflow:logs','dim','substring','→\x20Project:\x20','map','Downloading\x20logs...','Listing\x20workflow\x20attempts...','context','/attempt/','No\x20projects\x20match\x20pattern:\x20','displayLine','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','slice','renderSingleTimeline','\x20\x20New\x20attempt\x20ID:\x20','Listing\x20secrets...','\x20\x20Project:\x20','round','changes','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Key:\x20','index','icon','Retry\x20a\x20session\x20or\x20attempt','MIN_TIMELINE_WIDTH','\x20sessions\x20','newProjectId','navigateSessionsInteractive','match','localeCompare','Listing\x20workflows...','\x20task','MAX_TIMELINE_WIDTH','deleteSecret','workflow:run','Source\x20directory:\x20','workflow:retry','min','Source\x20directory\x20is\x20required','projectId','pending','\x20\x20Attempt\x20ID:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','cwd','\x20secret','\x20unchanged','Error:\x20Invalid\x20JSON\x20in\x20--params','✔\x20Showing\x20','splice','json','join','List\x20workflow\x20attempts','listSecrets','table','status','renderTimeline','delete','follow','Error:\x20Project\x20name\x20is\x20required','Attempt\x20ID:\x20','\x22\x20with\x20new\x20revision?','No\x20attempts\x20found\x20in\x20project:\x20','includeRetried','updatedAt','run','revision','Total:\x20','\x0a⚠\x20Project\x20\x22','\x22?\x20This\x20cannot\x20be\x20undone.','✔\x20Clone\x20complete','Workflow:\x20','\x20\x20Target:\x20','🔄\x20','param','sourceDir','select','workflow:workflows','set','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20Project\x20ID:\x20','trim','list','Analyzing\x20changes...','Resolving\x20project\x20\x27','yes','\x0a✔\x20Already\x20up\x20to\x20date','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','push','From\x20task:\x20','fill','Writing\x20files...','Error:\x20Attempt\x20ID\x20is\x20required','white','\x0aError:','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','No\x20attempts\x20found','applyPullProject','POLL_INTERVAL_MS','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','✔\x20Deleted\x20project\x20','workflowName','prepareCloneProject','relative','561370JHiNHA','rows','max','Session\x20not\x20found:\x20','Start\x20a\x20workflow\x20run','showWorkflowConsoleUrl','\x20\x20Session\x20context\x20set\x20to:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20new','sessions','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','No\x20workflows\x20found','\x20\x20Source:\x20','.\x20Expected\x20format:\x20KEY=VALUE','Source\x20project:\x20','Failed\x20to\x20fetch\x20attempt\x20data','dryRun','\x20\x20Location:\x20','pollTimeline','tdx\x20wf\x20attempt\x20','Project\x20name\x20is\x20required','filter','workflowProject','values','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','attempt:','isArray','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','has','success','verbose','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Force:\x20yes','\x0aFailed\x20to\x20fetch\x20attempt\x20data','projectName','Listing\x20workflow\x20projects...','\x20\x20Workflow:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','💡\x20Tip:\x20Use\x20','\x0aApply\x20these\x20changes?','\x1b[1A\x1b[2K','Fetching\x20log\x20files...','floor','\x20attempt','tdx.json','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','retryAttempt','diff','resumeFrom','readFile','\x0aClone\x20\x22','Task\x20name:\x20','265851RFkCVY','Attempt:\x20','sessionId','attempts','462tGeuqN','startedAt','toLowerCase','803420AswiOI','stdout','\x20of\x20','Status:\x20','from','buildTimelineData','kill','Pushing\x20workflow\x20project...','\x20to\x20see\x20detailed\x20logs','newProjectName','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','MAX_POLL_ITERATIONS','✔\x20Pushed\x20','No\x20log\x20content\x20found','Cancelled','duration','renderSessionsTimeline','parseProjectWorkflowPattern','retryAttemptName','getFullYear','Resume\x20from:\x20','Error:','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','No\x20sessions\x20found\x20in\x20project:\x20','\x20(system)','Getting\x20attempt\x20tasks...','unchanged','(use\x20--limit\x20to\x20see\x20more)','Select\x20a\x20task\x20to\x20view\x20logs:','some','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','columns','Session\x20time:\x20','/sessions/','red','Downloading\x20project\x20','Updating\x20','name','state','\x0aPolling...\x20(','Tip:\x20cd\x20to\x20workflows/','createdAt','✔\x20Downloaded\x20','fileCount','padStart','sessionTime','cancelRequested','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','finishedAt','force','Select\x20a\x20session\x20to\x20view\x20timeline:','tasks','keys','Target:\x20','No\x20sessions\x20found\x20for:\x20','workflow:use','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','canceling','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','✔\x20Retry\x20started','\x20has\x20no\x20attempts','all','Source:\x20','-\x20nothing\x20pushed','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Workflow\x20project\x20set\x20to:\x20','now','resolveProjectDir','Dry\x20run:\x20yes','Error:\x20Invalid\x20parameter\x20format:\x20','workflow:clone','output','\x27\x20from\x20project\x20\x27','GUTTER','No\x20attempts\x20found\x20for:\x20','workflow','sourceProjectName','No\x20matching\x20sessions\x20found','\x27...','Show\x20specific\x20attempt\x20details','group_error','task','\x0a✔\x20No\x20changes\x20to\x20push','retrySession','requireProject','preparePushProject','workflow:secrets:set','workflow:projects','Getting\x20attempt\x20details...','projects','title','workflow:download','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x0aPush\x20these\x20changes?','3520cFlnJz','generateSessionTimelineRows','Session\x20','autocomplete','message','No\x20workflow\x20sessions\x20found','/app/workflows/','Including\x20subtasks:\x20yes','size','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','resolve','25780FTgcgf','session_id','Setting\x20secret...','88UWRMjN','workflow:secrets:delete','write','repeat','split','resolveProject','✔\x20Push\x20complete','ICON_WIDTH','✔\x20Pull\x20complete','\x0aDry\x20run\x20-\x20no\x20project\x20created','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Output\x20directory:\x20','Starting\x20workflow\x20run...','Latest\x20session\x20has\x20no\x20attempt','toISOString'];a51_0xf6ba=function(){return _0x2ce8a0;};return a51_0xf6ba();}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_0x59e223 from'prompts';function getAttemptStatusDisplay(_0x3d78da){const _0x6dd222=a51_0x56f9;if(!_0x3d78da)return{'icon':'⏳','text':''};const {done:_0x2dc84e,success:_0x4ebde9,cancelRequested:_0x2fc6a1}=_0x3d78da;if(!_0x2dc84e)return _0x2fc6a1?{'icon':'🛑','text':a51_0x221e70[_0x6dd222(0x296)]('canceling')}:{'icon':'🔄','text':a51_0x221e70[_0x6dd222(0x2af)]('running')};if(_0x4ebde9)return{'icon':'✅','text':a51_0x221e70[_0x6dd222(0x25a)](_0x6dd222(0x194))};return{'icon':'❌','text':a51_0x221e70[_0x6dd222(0x1d8)](_0x6dd222(0x24c))};}export class WorkflowBaseCommand extends BaseCommand{[a51_0x467f12(0x227)](_0x2cf2dd,_0x4d37da,_0x262f08=0x0){return _0x2cf2dd[_0x262f08]||_0x4d37da['workflowProject'];}[a51_0x467f12(0x20a)](_0x3bb82e,_0x1c28e7,_0x36db4d=0x0){const _0x2f1b73=a51_0x467f12,_0x36f96a=this[_0x2f1b73(0x227)](_0x3bb82e,_0x1c28e7,_0x36db4d);if(!_0x36f96a)return console[_0x2f1b73(0x24c)](a51_0x221e70[_0x2f1b73(0x1d8)](_0x2f1b73(0x1cb)),_0x2f1b73(0x32e)),console[_0x2f1b73(0x24c)](a51_0x221e70[_0x2f1b73(0x2b3)](_0x2f1b73(0x1a5))),null;return _0x36f96a;}[a51_0x467f12(0x1c7)](_0x435fb6,_0x24bd88){const _0x36fafd=a51_0x467f12;if(_0x435fb6[0x0]){const _0xbcbdab=_0x435fb6[0x0][_0x36fafd(0x226)]('.');if(_0xbcbdab[_0x36fafd(0x26e)]===0x1)return{'projectName':_0xbcbdab[0x0],'workflowName':undefined};else return _0xbcbdab[_0x36fafd(0x26e)]===0x2?{'projectName':_0xbcbdab[0x0],'workflowName':_0xbcbdab[0x1]}:(console['error'](a51_0x221e70[_0x36fafd(0x1d8)]('Error:'),_0x36fafd(0x196)),null);}return{'projectName':_0x24bd88[_0x36fafd(0x330)],'workflowName':undefined};}[a51_0x467f12(0x1f9)](_0x48cff8,_0x1c5fd2,_0x430547=0x0){const _0x1dc6bc=a51_0x467f12;if(_0x48cff8[_0x430547])return _0x48cff8[_0x430547];if(_0x1c5fd2['workflowProject']){const _0x54755d=a51_0x5534f1[_0x1dc6bc(0x2e4)](process[_0x1dc6bc(0x2dd)](),_0x1dc6bc(0x236),_0x1c5fd2[_0x1dc6bc(0x330)]);if(existsSync(a51_0x5534f1[_0x1dc6bc(0x2e4)](_0x54755d,_0x1dc6bc(0x1a3))))return _0x54755d;}return undefined;}async[a51_0x467f12(0x31f)](_0x602945,_0xf7b1af,_0x2a614f){const _0x149ada=a51_0x467f12;try{const _0x51a196=await _0x602945[_0x149ada(0x201)]['workflows'](_0xf7b1af,{'limit':0x1});if(_0x51a196[_0x149ada(0x26e)]>0x0){const _0x44fe5e=_0x51a196[0x0]['id'],_0x2397a9=getWorkflowUrl(_0x2a614f,_0x44fe5e);console['error'](_0x149ada(0x292)+a51_0x221e70['cyan'](_0x2397a9));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x1ed);['description']='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async['execute'](_0x36038a){const _0x3b1e6d=a51_0x467f12,{options:_0x59fe94,args:_0x248574,tdx:_0x3a7a8f}=_0x36038a,_0x602a69=_0x248574[0x0],_0x379e73=_0x59fe94[_0x3b1e6d(0x274)];if(_0x379e73)return saveSessionContext({'workflow_project':undefined},_0x59fe94[_0x3b1e6d(0x29c)]),console['log'](a51_0x221e70[_0x3b1e6d(0x25a)](_0x3b1e6d(0x25e))),0x0;if(!_0x602a69)return console['error'](a51_0x221e70[_0x3b1e6d(0x1d8)](_0x3b1e6d(0x1cb)),_0x3b1e6d(0x32e)),console['error'](a51_0x221e70['dim'](_0x3b1e6d(0x279))),console[_0x3b1e6d(0x24c)](a51_0x221e70['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x3127c4=await withSpinner(_0x3b1e6d(0x306)+_0x602a69+_0x3b1e6d(0x204),()=>_0x3a7a8f[_0x3b1e6d(0x201)]['resolveProjectId'](_0x602a69),{'verbose':_0x59fe94[_0x3b1e6d(0x195)]}),{name:_0x5e62c9}=_0x3127c4[_0x3b1e6d(0x264)];return saveSessionContext({'workflow_project':_0x5e62c9},_0x59fe94[_0x3b1e6d(0x29c)]),console['log'](a51_0x221e70['green'](_0x3b1e6d(0x1f7)+a51_0x221e70['cyan'](_0x5e62c9))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x20d);[a51_0x467f12(0x242)]='List\x20all\x20workflow\x20projects';async[a51_0x467f12(0x255)](_0x420644){const _0x48f3e5=a51_0x467f12,{options:_0x1b9504,args:_0x595e22,tdx:_0x490fce}=_0x420644,_0x13c43f=_0x595e22[0x0];_0x1b9504[_0x48f3e5(0x195)]&&_0x13c43f&&console[_0x48f3e5(0x24c)]('Pattern:\x20'+_0x13c43f);const _0x3ec4f5=await withSpinner(_0x48f3e5(0x19a),()=>_0x490fce['workflow'][_0x48f3e5(0x20f)](_0x13c43f,{'limit':_0x1b9504[_0x48f3e5(0x29f)]}),{'verbose':_0x1b9504['verbose']});let _0x4abad2=_0x3ec4f5['data'];_0x4abad2[_0x48f3e5(0x241)]((_0x169b50,_0x5c4cf8)=>_0x169b50['name'][_0x48f3e5(0x2cf)](_0x5c4cf8['name']));const _0x268fc8=_0x1b9504[_0x48f3e5(0x29f)]||0x64,_0x9d8504=_0x4abad2[_0x48f3e5(0x26e)]>=_0x268fc8?a51_0x221e70[_0x48f3e5(0x2b3)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x48f3e5(0x24c)](_0x48f3e5(0x285)+_0x4abad2[_0x48f3e5(0x26e)]+'\x20project'+(_0x4abad2[_0x48f3e5(0x26e)]!==0x1?'s':'')+_0x9d8504);if(_0x1b9504[_0x48f3e5(0x252)]===_0x48f3e5(0x2e3)||_0x1b9504[_0x48f3e5(0x252)]===_0x48f3e5(0x2b1)||_0x1b9504[_0x48f3e5(0x252)]===_0x48f3e5(0x2e7))await handleSDKOutput(_0x4abad2,_0x1b9504);else{if(_0x4abad2[_0x48f3e5(0x26e)]===0x0)_0x13c43f?console['log'](_0x48f3e5(0x2bb)+_0x13c43f):console['log'](_0x48f3e5(0x23c));else{const _0x3e2984=_0x4abad2[_0x48f3e5(0x2b6)](_0x2664fc=>{const _0x3d4e3c=_0x48f3e5,_0x4ba335=_0x2664fc['metadata']?.[_0x3d4e3c(0x1d3)](_0x2e224e=>_0x2e224e[_0x3d4e3c(0x2a5)]==='sys'),_0xcb5bab=_0x4ba335?a51_0x221e70['dim'](_0x3d4e3c(0x1ce)):'';return'📁\x20'+_0x2664fc[_0x3d4e3c(0x1db)]+_0xcb5bab;});await writeOutput(_0x3e2984[_0x48f3e5(0x2e4)]('\x0a'),_0x1b9504[_0x48f3e5(0x1fd)],_0x48f3e5(0x304));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x2fe);['description']=a51_0x467f12(0x29b);async[a51_0x467f12(0x255)](_0x427d74){const _0x3a104c=a51_0x467f12,{options:_0x16bf86,args:_0x2bb3c8,tdx:_0x261a0e}=_0x427d74,_0x40d7e9=this[_0x3a104c(0x227)](_0x2bb3c8,_0x16bf86);_0x16bf86['verbose']&&_0x40d7e9&&console[_0x3a104c(0x24c)](_0x3a104c(0x24a)+_0x40d7e9);const _0x3b8067=await withSpinner(_0x3a104c(0x2d0),()=>_0x261a0e[_0x3a104c(0x201)][_0x3a104c(0x236)](_0x40d7e9,{'limit':_0x16bf86[_0x3a104c(0x29f)]}),{'verbose':_0x16bf86[_0x3a104c(0x195)]});let _0x382eba=_0x3b8067[_0x3a104c(0x264)];_0x382eba[_0x3a104c(0x241)]((_0x215f63,_0x3ea009)=>{const _0x51a93e=_0x3a104c,_0x2b9a11=_0x215f63[_0x51a93e(0x1db)]['localeCompare'](_0x3ea009['name']);if(_0x2b9a11!==0x0)return _0x2b9a11;return(_0x215f63['project']?.[_0x51a93e(0x1db)]||'')[_0x51a93e(0x2cf)](_0x3ea009['project']?.[_0x51a93e(0x1db)]||'');});const _0x546ee9=_0x16bf86[_0x3a104c(0x29f)]||0x64,_0x51033e=_0x382eba[_0x3a104c(0x26e)]>=_0x546ee9?a51_0x221e70[_0x3a104c(0x2b3)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3a104c(0x24c)](_0x3a104c(0x285)+_0x382eba[_0x3a104c(0x26e)]+'\x20workflow'+(_0x382eba[_0x3a104c(0x26e)]!==0x1?'s':'')+_0x51033e);if(_0x16bf86[_0x3a104c(0x252)]===_0x3a104c(0x2e3)||_0x16bf86['format']===_0x3a104c(0x2b1)||_0x16bf86['format']===_0x3a104c(0x2e7))await handleSDKOutput(_0x382eba,_0x16bf86);else{if(_0x382eba[_0x3a104c(0x26e)]===0x0)_0x40d7e9?console[_0x3a104c(0x295)](_0x3a104c(0x23e)+_0x40d7e9):console[_0x3a104c(0x295)](_0x3a104c(0x325));else{const _0x34fa17=_0x16bf86[_0x3a104c(0x26f)],_0x52b65c=_0x382eba['map'](_0x3c6fc5=>{const _0x226593=_0x3a104c,_0x2099b2=a51_0x221e70[_0x226593(0x2b3)]('#'+_0x3c6fc5['id']),_0x44e231=hyperlink(_0x2099b2,getWorkflowUrl(_0x34fa17,_0x3c6fc5['id'])),_0xe98f4c=_0x3c6fc5[_0x226593(0x23f)]?.['name']?a51_0x221e70['dim']('\x20('+_0x3c6fc5[_0x226593(0x23f)][_0x226593(0x1db)]+')'):'';return'📋\x20'+_0x44e231+'\x20'+_0x3c6fc5[_0x226593(0x1db)]+_0xe98f4c;});await writeOutput(_0x52b65c[_0x3a104c(0x2e4)]('\x0a'),_0x16bf86[_0x3a104c(0x1fd)],_0x3a104c(0x304));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x267);[a51_0x467f12(0x242)]=a51_0x467f12(0x243);async[a51_0x467f12(0x255)](_0x1aec0c){const _0x38efab=a51_0x467f12,{options:_0x377413,args:_0x127c57,tdx:_0x31d2db}=_0x1aec0c,_0x1fa47d=this[_0x38efab(0x1c7)](_0x127c57,_0x377413);if(!_0x1fa47d)return 0x1;const {projectName:_0x88bb3,workflowName:_0xd1114a}=_0x1fa47d;if(_0x377413[_0x38efab(0x195)]){if(_0x88bb3&&_0xd1114a)console['error'](_0x38efab(0x280)+_0x88bb3+'.'+_0xd1114a);else _0x88bb3&&console[_0x38efab(0x24c)](_0x38efab(0x283)+_0x88bb3);const _0x4be621=_0x377413['status'];_0x4be621&&console[_0x38efab(0x24c)](_0x38efab(0x1b7)+_0x4be621);}let _0x29d341=0x28;if(process['stdout'][_0x38efab(0x24d)]&&!_0x377413['output']&&!_0x377413[_0x38efab(0x252)]){const _0x38feec=process[_0x38efab(0x1b5)][_0x38efab(0x31b)]||0x28;_0x29d341=Math[_0x38efab(0x31c)](0x14,Math['floor'](_0x38feec*0x2/0x3));}const _0x18982b=_0x377413[_0x38efab(0x29f)]||_0x29d341,_0x5ac2ce=await withSpinner(_0x38efab(0x299),()=>_0x31d2db[_0x38efab(0x201)][_0x38efab(0x323)]({'projectName':_0x88bb3,'workflowName':_0xd1114a,'status':_0x377413[_0x38efab(0x2e8)],'fromTime':_0x377413[_0x38efab(0x1b8)],'toTime':_0x377413['to'],'limit':_0x18982b}),{'verbose':_0x377413[_0x38efab(0x195)]}),_0x45844e=_0x5ac2ce[_0x38efab(0x264)];_0x45844e[_0x38efab(0x241)]((_0x45ec36,_0x1ca32b)=>{const _0x38f185=_0x38efab,_0x5b940f=_0x45ec36[_0x38f185(0x1e3)]||'',_0x8375b5=_0x1ca32b[_0x38f185(0x1e3)]||'';return _0x8375b5[_0x38f185(0x2cf)](_0x5b940f);});_0x45844e[_0x38efab(0x26e)]>=_0x18982b?console[_0x38efab(0x24c)](_0x38efab(0x2e1)+_0x45844e['length']+_0x38efab(0x2cb)+a51_0x221e70['dim'](_0x38efab(0x1d1))):console[_0x38efab(0x24c)](_0x38efab(0x285)+_0x45844e[_0x38efab(0x26e)]+'\x20session'+(_0x45844e[_0x38efab(0x26e)]!==0x1?'s':''));if(_0x377413[_0x38efab(0x252)]==='json'||_0x377413[_0x38efab(0x252)]===_0x38efab(0x2b1)||_0x377413['format']===_0x38efab(0x2e7))await handleSDKOutput(_0x45844e,_0x377413);else{if(!process[_0x38efab(0x1b5)][_0x38efab(0x24d)]||_0x377413[_0x38efab(0x1fd)]){if(_0x45844e[_0x38efab(0x26e)]===0x0){if(_0x88bb3&&_0xd1114a)console[_0x38efab(0x295)](_0x38efab(0x1ec)+_0x88bb3+'.'+_0xd1114a);else _0x88bb3?console[_0x38efab(0x295)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x88bb3):console[_0x38efab(0x295)](_0x38efab(0x293));}else{const _0x4b2eef=_0x377413[_0x38efab(0x26f)],_0x1c204d=this[_0x38efab(0x1c6)](_0x45844e,_0x4b2eef);_0x377413[_0x38efab(0x1fd)]?await writeOutput(_0x1c204d,_0x377413[_0x38efab(0x1fd)],_0x38efab(0x304)):console['log'](_0x1c204d);}!_0x88bb3&&(console[_0x38efab(0x24c)](''),console[_0x38efab(0x24c)](a51_0x221e70[_0x38efab(0x2b3)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a51_0x221e70[_0x38efab(0x2b3)](_0x38efab(0x301))+'or'+a51_0x221e70[_0x38efab(0x2b3)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x45844e[_0x38efab(0x26e)]===0x0){if(_0x88bb3&&_0xd1114a)console[_0x38efab(0x295)]('No\x20sessions\x20found\x20for:\x20'+_0x88bb3+'.'+_0xd1114a);else _0x88bb3?console[_0x38efab(0x295)](_0x38efab(0x1cd)+_0x88bb3):console['log'](_0x38efab(0x293));}else await this['navigateSessionsInteractive'](_0x45844e,_0x1aec0c,_0x88bb3);}}return 0x0;}[a51_0x467f12(0x1c6)](_0xa966a3,_0x128492){const _0x4df439=a51_0x467f12,_0x1f1643=[],_0x13550e=new Map();let _0x2f3c71=Infinity,_0x3d9bf7=-Infinity;for(const _0x5b230d of _0xa966a3){if(_0x5b230d['lastAttempt']?.[_0x4df439(0x1df)]){const _0xfd2348=new Date(_0x5b230d['lastAttempt'][_0x4df439(0x1df)])[_0x4df439(0x2ae)](),_0x1c2e45=_0x5b230d[_0x4df439(0x28a)]['finishedAt']?new Date(_0x5b230d[_0x4df439(0x28a)][_0x4df439(0x1e6)])['getTime']():Date['now'](),_0x400dd0=_0x5b230d[_0x4df439(0x23f)]?.['name']||'(unknown)';!_0x13550e[_0x4df439(0x193)](_0x400dd0)&&_0x13550e[_0x4df439(0x2ff)](_0x400dd0,[]),_0x13550e[_0x4df439(0x266)](_0x400dd0)[_0x4df439(0x30a)]({'session':_0x5b230d,'startTime':_0xfd2348,'endTime':_0x1c2e45,'duration':_0x1c2e45-_0xfd2348}),_0x2f3c71=Math[_0x4df439(0x2d7)](_0x2f3c71,_0xfd2348),_0x3d9bf7=Math[_0x4df439(0x31c)](_0x3d9bf7,_0x1c2e45);}}if(_0x13550e[_0x4df439(0x21c)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x1a169d=process[_0x4df439(0x1b5)][_0x4df439(0x1d5)]||0x78,_0x111d44=0x1e,_0x5e31af=0x32,_0x572dc8=0x4,_0x52c990=Math[_0x4df439(0x2d7)](_0x5e31af,Math[_0x4df439(0x31c)](_0x111d44,Math['floor'](_0x1a169d*0.3))),_0x32c71d=_0x1a169d-_0x52c990-TIMELINE_CONFIG[_0x4df439(0x1ff)]-0x3-_0x572dc8,_0xe4648b=_0x3d9bf7-_0x2f3c71,_0x21b5f4=_0xe4648b/_0x52c990,_0x3cfafd=renderTimeAxis({'startTime':_0x2f3c71,'endTime':_0x3d9bf7,'durationMs':_0xe4648b,'msPerChar':_0x21b5f4},_0x52c990),_0x1904f4=[];for(const _0x30b884 of _0x13550e[_0x4df439(0x331)]()){_0x1904f4[_0x4df439(0x30a)](..._0x30b884);}_0x1904f4[_0x4df439(0x241)]((_0x51d42d,_0x4bf58b)=>_0x4bf58b[_0x4df439(0x25c)]-_0x51d42d['startTime']);const _0x1765d8=new Date(_0x2f3c71),_0xa60809=formatDate(_0x1765d8),_0x5a59ee=_0x572dc8+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x4df439(0x257)]+_0x32c71d,_0x5bdbd6='\x20'[_0x4df439(0x225)](_0x5a59ee-_0xa60809['length']),_0x3075b4=_0x5bdbd6+a51_0x221e70[_0x4df439(0x2b3)](_0xa60809)+'\x20'+_0x3cfafd;_0x1f1643[_0x4df439(0x30a)](_0x3075b4);const _0x44b5b4=0x16;let _0x7e7279=0x0;for(const _0x3dde08 of _0x1904f4){const _0x531d0d=_0x3dde08['session'][_0x4df439(0x23f)]?.[_0x4df439(0x1db)]||'?',_0x371f2e=Math[_0x4df439(0x2d7)](stringWidth(_0x531d0d),_0x44b5b4);_0x7e7279=Math['max'](_0x7e7279,_0x371f2e);}for(const _0x30d398 of _0x1904f4){const {session:_0x566252,startTime:_0x181e03,endTime:_0x3b106a,duration:_0x4cb1e2}=_0x30d398,_0x1aa534=_0x566252[_0x4df439(0x23f)]?.['id'],_0xe7b2e0=_0x566252['id'],_0x19d4f6=_0x566252[_0x4df439(0x23f)]?.[_0x4df439(0x1db)]||'?',_0x3cd3a3=_0x566252['workflow']?.[_0x4df439(0x1db)]||'?';let _0x2ce840,_0x216558;if(_0x566252[_0x4df439(0x28a)]){const _0x3154ae=_0x566252[_0x4df439(0x28a)];!_0x3154ae[_0x4df439(0x254)]?(_0x2ce840=_0x3154ae['cancelRequested']?'🛑':'🔄',_0x216558=_0x3154ae['cancelRequested']?a51_0x221e70['yellow']:a51_0x221e70['blue']):(_0x2ce840=_0x3154ae[_0x4df439(0x194)]?'✅':'❌',_0x216558=_0x3154ae[_0x4df439(0x194)]?a51_0x221e70[_0x4df439(0x25a)]:a51_0x221e70[_0x4df439(0x1d8)]);}else _0x2ce840='⏳',_0x216558=a51_0x221e70[_0x4df439(0x2b3)];const _0x4b0084='#'+_0xe7b2e0,_0x55c7b0=_0x1aa534?hyperlink(_0x4b0084,getWorkflowSessionUrl(_0x128492,_0x1aa534,_0xe7b2e0)):_0x4b0084;let _0x69c5b=_0x19d4f6;stringWidth(_0x19d4f6)>_0x44b5b4&&(_0x69c5b=_0x19d4f6[_0x4df439(0x2be)](0x0,_0x44b5b4-0x1)+'…');const _0x1dc55e=a51_0x221e70['dim'](_0x69c5b),_0x4601f3=stringWidth(_0x69c5b),_0x859cfb='\x20'[_0x4df439(0x225)](_0x7e7279-stringWidth(_0x69c5b)+0x2),_0x556984='('+formatElapsed(_0x4cb1e2)+')',_0x215b6c=stringWidth(_0x556984),_0x1d8fc3=stringWidth(_0x4b0084),_0x29d114=_0x1d8fc3+0x1+_0x4601f3+_0x859cfb[_0x4df439(0x26e)],_0x2c7828=_0x32c71d-_0x29d114-_0x215b6c-0x1-0x8;let _0x52dac0=_0x3cd3a3;stringWidth(_0x52dac0)>_0x2c7828&&(_0x52dac0=_0x52dac0[_0x4df439(0x2be)](0x0,_0x2c7828-0x1)+'…');const _0x36cfbf=_0x55c7b0+'\x20'+_0x1dc55e+_0x859cfb+_0x52dac0,_0x5bd3d7=stringWidth(_0x36cfbf),_0x32628d=_0x32c71d-_0x5bd3d7-_0x215b6c,_0x1d7446=_0x36cfbf+'\x20'[_0x4df439(0x225)](Math[_0x4df439(0x31c)](0x1,_0x32628d))+a51_0x221e70[_0x4df439(0x2b3)](_0x556984),_0x4db779=Math[_0x4df439(0x1a1)]((_0x181e03-_0x2f3c71)/_0x21b5f4),_0x54ac2f=Math[_0x4df439(0x1a1)]((_0x3b106a-_0x2f3c71)/_0x21b5f4),_0x2e5b25=Math['max'](_0x4db779+0x1,_0x54ac2f),_0x5b6229=new Array(_0x52c990)[_0x4df439(0x30c)]('\x20');for(let _0x2ab180=_0x4db779;_0x2ab180<Math[_0x4df439(0x2d7)](_0x2e5b25,_0x52c990);_0x2ab180++){_0x5b6229[_0x2ab180]='─';}const _0x41b875=_0x5b6229[_0x4df439(0x2b6)](_0x5b636c=>_0x5b636c==='\x20'?'\x20':_0x216558(_0x5b636c))[_0x4df439(0x2e4)]('');_0x1f1643[_0x4df439(0x30a)](_0x2ce840+'\x20'+_0x1d7446+'│'+_0x41b875+'│');}return _0x1f1643[_0x4df439(0x2e4)]('\x0a');}async[a51_0x467f12(0x2cd)](_0x1d4ff4,_0x425c30,_0x3f6b1b){const _0x5ed0e6=a51_0x467f12,{options:_0x3ad489,tdx:_0x1e3294}=_0x425c30,_0xd61b7=_0x3ad489['site'],{timelineRows:_0x40b87b,timeAxisHeader:_0xc609e0}=this['generateSessionTimelineRows'](_0x1d4ff4,_0xd61b7),_0xa65e92=_0x40b87b[_0x5ed0e6(0x32f)](_0x55d6f0=>_0x55d6f0['attemptId']);if(_0xa65e92['length']===0x0){const _0xa1e642=this[_0x5ed0e6(0x1c6)](_0x1d4ff4,_0xd61b7);console[_0x5ed0e6(0x295)](_0xa1e642);!_0x3f6b1b&&(console['error'](''),console[_0x5ed0e6(0x24c)](a51_0x221e70['dim'](_0x5ed0e6(0x22c))),console[_0x5ed0e6(0x24c)](a51_0x221e70['dim'](_0x5ed0e6(0x301))+'or'+a51_0x221e70[_0x5ed0e6(0x2b3)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0xc609e0&&console[_0x5ed0e6(0x295)](_0xc609e0);const _0x31a752=_0x40b87b[_0x5ed0e6(0x32f)](_0x4dbfc6=>_0x4dbfc6['attemptId'])['map'](_0x3683ea=>({'title':_0x3683ea[_0x5ed0e6(0x2bc)],'value':_0x3683ea[_0x5ed0e6(0x27d)]})),_0x503c00=process['stdout']['rows']||0x3c,_0x2778a3=Math[_0x5ed0e6(0x31c)](0x28,Math['floor'](_0x503c00*0x2/0x3)),_0x1c2963=await a51_0x59e223({'type':_0x5ed0e6(0x217),'name':_0x5ed0e6(0x27d),'message':_0x5ed0e6(0x1cc),'choices':_0x31a752,'initial':-0x1,'limit':_0x2778a3,'clearFirst':!![],'fallback':{'title':_0x5ed0e6(0x203),'value':null},'suggest':(_0x1a2097,_0x5bba33)=>{const _0x539d8e=_0x5ed0e6;if(!_0x1a2097)return Promise[_0x539d8e(0x21e)](_0x5bba33);const _0x4c867f=_0x5bba33[_0x539d8e(0x32f)](_0x2d53db=>{const _0x562128=_0x539d8e,_0x59e71e=_0x2d53db;return _0x59e71e[_0x562128(0x210)][_0x562128(0x1b3)]()[_0x562128(0x23a)](_0x1a2097['toLowerCase']());});return Promise[_0x539d8e(0x21e)](_0x4c867f);}}),_0x109959=()=>{const _0x11ad77=_0x5ed0e6;process['stdout'][_0x11ad77(0x224)]('\x1b[1A\x1b[2K'),process[_0x11ad77(0x1b5)]['write'](_0x11ad77(0x19f)),process[_0x11ad77(0x1b5)][_0x11ad77(0x224)](_0x11ad77(0x19f));},_0x2e80dc=_0x1c2963&&_0x1c2963[_0x5ed0e6(0x27d)]&&_0x1c2963['attemptId']!==null&&_0x1c2963[_0x5ed0e6(0x27d)][_0x5ed0e6(0x303)]()!=='';if(!_0x2e80dc){_0x109959(),console[_0x5ed0e6(0x295)](a51_0x221e70[_0x5ed0e6(0x2b3)]('Cancelled'));return;}_0x109959();const _0x1f22d9=_0x1d4ff4['find'](_0x472879=>_0x472879[_0x5ed0e6(0x28a)]?.['id']===_0x1c2963[_0x5ed0e6(0x27d)]);if(_0x1f22d9){const _0x5c7f20=_0x1f22d9['project']?.[_0x5ed0e6(0x1db)]||'?',_0x1aeb03=_0x1f22d9['workflow']?.[_0x5ed0e6(0x1db)]||'?';console[_0x5ed0e6(0x295)](_0x5ed0e6(0x232)+a51_0x221e70[_0x5ed0e6(0x2b3)](_0x5c7f20)+_0x5ed0e6(0x287)+a51_0x221e70[_0x5ed0e6(0x2b3)](_0x1aeb03));}const _0x103744=new WorkflowTimelineCommand();await _0x103744[_0x5ed0e6(0x255)]({'args':[],'options':{..._0x3ad489,'attemptId':_0x1c2963['attemptId']},'tdx':_0x1e3294});}[a51_0x467f12(0x215)](_0x20d10d,_0xca40a7){const _0x377621=a51_0x467f12,_0x3b46be=new Map();for(const _0x34f63d of _0x20d10d){_0x34f63d['id']&&_0x34f63d['lastAttempt']?.['id']&&_0x3b46be[_0x377621(0x2ff)](_0x34f63d['id'],_0x34f63d[_0x377621(0x28a)]['id']);}const _0x2fcd5a=[];let _0x34a941='';const _0x32b488=this[_0x377621(0x1c6)](_0x20d10d,_0xca40a7),_0x19814a=_0x32b488['split']('\x0a');for(const _0x5a9592 of _0x19814a){if(_0x5a9592[_0x377621(0x25d)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x5a9592[_0x377621(0x2ce)](/^\s+\d{4}-\d{2}-\d{2}/))_0x34a941=_0x5a9592;else{if(_0x5a9592[_0x377621(0x2ce)](/^[✅❌🔄🛑⏳]/)){const _0x7eb204=_0x5a9592[_0x377621(0x2ce)](/#(\d+)/),_0x547985=_0x7eb204?_0x7eb204[0x1]:null,_0x77849f=_0x547985?_0x3b46be[_0x377621(0x266)](_0x547985)||null:null,_0x4af2f1=_0x20d10d[_0x377621(0x273)](_0x1d01c6=>_0x1d01c6['id']===_0x547985),_0x1b5f28=_0x4af2f1?.[_0x377621(0x23f)]?.[_0x377621(0x1db)]||'';_0x2fcd5a['push']({'displayLine':_0x5a9592,'attemptId':_0x77849f,'projectName':_0x1b5f28});}}}return{'timelineRows':_0x2fcd5a,'timeAxisHeader':_0x34a941};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']='workflow:attempts';['description']=a51_0x467f12(0x2e5);async[a51_0x467f12(0x255)](_0x36f244){const _0x1b4b78=a51_0x467f12,{options:_0x42b770,args:_0x39c2f8,tdx:_0x25095e}=_0x36f244,_0x4e233b=this[_0x1b4b78(0x1c7)](_0x39c2f8,_0x42b770);if(!_0x4e233b)return 0x1;const {projectName:_0x3ec361,workflowName:_0x5c8e52}=_0x4e233b,_0x5d8ba3=_0x42b770[_0x1b4b78(0x2f0)];if(_0x42b770[_0x1b4b78(0x195)]){if(_0x3ec361&&_0x5c8e52)console[_0x1b4b78(0x24c)](_0x1b4b78(0x280)+_0x3ec361+'.'+_0x5c8e52);else _0x3ec361&&console[_0x1b4b78(0x24c)]('Filter:\x20project='+_0x3ec361);_0x5d8ba3&&console[_0x1b4b78(0x24c)]('Include\x20retried:\x20yes');}const _0x53f7ed=await withSpinner(_0x1b4b78(0x2b8),()=>_0x25095e['workflow'][_0x1b4b78(0x1b0)]({'projectName':_0x3ec361,'workflowName':_0x5c8e52,'includeRetried':_0x5d8ba3,'limit':_0x42b770[_0x1b4b78(0x29f)]}),{'verbose':_0x42b770['verbose']}),_0x185c49=_0x53f7ed[_0x1b4b78(0x264)],_0x2c0647=_0x42b770[_0x1b4b78(0x29f)]||0x64,_0x1c9625=_0x185c49[_0x1b4b78(0x26e)]>=_0x2c0647?a51_0x221e70[_0x1b4b78(0x2b3)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x1b4b78(0x24c)](_0x1b4b78(0x285)+_0x185c49['length']+_0x1b4b78(0x1a2)+(_0x185c49['length']!==0x1?'s':'')+_0x1c9625);if(_0x42b770['format']===_0x1b4b78(0x2e3)||_0x42b770['format']==='jsonl'||_0x42b770[_0x1b4b78(0x252)]===_0x1b4b78(0x2e7))await handleSDKOutput(_0x185c49,_0x42b770);else{if(_0x185c49['length']===0x0){if(_0x3ec361&&_0x5c8e52)console['log'](_0x1b4b78(0x200)+_0x3ec361+'.'+_0x5c8e52);else _0x3ec361?console[_0x1b4b78(0x295)](_0x1b4b78(0x2ef)+_0x3ec361):console[_0x1b4b78(0x295)](_0x1b4b78(0x312));}else{const _0x2017b3=_0x42b770[_0x1b4b78(0x26f)],_0x244646=_0x185c49['map'](_0x3b4fcf=>{const _0x41a023=_0x1b4b78,_0x1f8f59=a51_0x221e70[_0x41a023(0x2b3)]('#'+_0x3b4fcf['id']),_0x50385c=_0x3b4fcf[_0x41a023(0x23f)]?.['id'],_0x31faab=_0x3b4fcf[_0x41a023(0x220)]||_0x3b4fcf[_0x41a023(0x1af)],_0x2a157d=_0x50385c&&_0x31faab?hyperlink(_0x1f8f59,getWorkflowAttemptUrl(_0x2017b3,_0x50385c,_0x31faab,_0x3b4fcf['id'])):_0x1f8f59,{icon:_0x5bdd1a,text:_0x3c0dbc}=getAttemptStatusDisplay(_0x3b4fcf),_0x7d42bb=(_0x3b4fcf['project']?.[_0x41a023(0x1db)]||'?')+'.'+(_0x3b4fcf[_0x41a023(0x201)]?.[_0x41a023(0x1db)]||'?'),_0x34219e=_0x3b4fcf['sessionTime']?a51_0x221e70['dim'](_0x3b4fcf[_0x41a023(0x1e3)]):'';return(_0x2a157d+'\x20'+_0x5bdd1a+(_0x3c0dbc?'\x20'+_0x3c0dbc:'')+'\x20'+_0x7d42bb+'\x20'+_0x34219e)['trimEnd']();});await writeOutput(_0x244646[_0x1b4b78(0x2e4)]('\x0a'),_0x42b770[_0x1b4b78(0x1fd)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x297);[a51_0x467f12(0x242)]=a51_0x467f12(0x205);async[a51_0x467f12(0x255)](_0x42bf27){const _0x54a883=a51_0x467f12,{options:_0x499c4d,args:_0x5899b3,tdx:_0x18cc11}=_0x42bf27,_0x598b07=_0x5899b3[0x0];if(!_0x598b07)return console[_0x54a883(0x24c)](_0x54a883(0x30e)),0x1;_0x499c4d['verbose']&&console['error'](_0x54a883(0x2ed)+_0x598b07);const _0x32ed5f=await withSpinner(_0x54a883(0x20e),()=>_0x18cc11[_0x54a883(0x201)][_0x54a883(0x290)](_0x598b07),{'verbose':_0x499c4d[_0x54a883(0x195)]}),_0x48ae5d=_0x32ed5f['data'];let _0x459a9a;!_0x48ae5d[_0x54a883(0x254)]?_0x459a9a=_0x48ae5d[_0x54a883(0x1e4)]?_0x54a883(0x1ef):_0x54a883(0x23d):_0x459a9a=_0x48ae5d['success']?_0x54a883(0x194):_0x54a883(0x24c);let _0x5d2f95;if(_0x48ae5d['createdAt']&&_0x48ae5d['finishedAt']){const _0x493924=new Date(_0x48ae5d['createdAt'])[_0x54a883(0x2ae)](),_0x32ba86=new Date(_0x48ae5d[_0x54a883(0x1e6)])[_0x54a883(0x2ae)]();_0x5d2f95=Math[_0x54a883(0x2c3)]((_0x32ba86-_0x493924)/0x3e8);}const _0x300a8b={'attempt_id':_0x48ae5d['id'],'status':_0x459a9a,..._0x48ae5d[_0x54a883(0x2c7)]!==undefined&&{'index':_0x48ae5d[_0x54a883(0x2c7)]},..._0x48ae5d[_0x54a883(0x23f)]&&{'project':_0x48ae5d[_0x54a883(0x23f)]['name']},..._0x48ae5d['workflow']&&{'workflow':_0x48ae5d[_0x54a883(0x201)]['name']},..._0x48ae5d['sessionId']&&{'session_id':_0x48ae5d['sessionId']},..._0x48ae5d['sessionTime']&&{'session_time':_0x48ae5d[_0x54a883(0x1e3)]},..._0x48ae5d[_0x54a883(0x1c8)]&&{'retry_attempt':_0x48ae5d['retryAttemptName']},..._0x5d2f95!==undefined&&{'duration_sec':_0x5d2f95},..._0x48ae5d[_0x54a883(0x1df)]&&{'created_at':_0x48ae5d['createdAt']},..._0x48ae5d[_0x54a883(0x1e6)]&&{'finished_at':_0x48ae5d[_0x54a883(0x1e6)]},...Object[_0x54a883(0x1ea)](_0x48ae5d['params'])[_0x54a883(0x26e)]>0x0&&{'params':_0x48ae5d[_0x54a883(0x24b)]}};return await handleSingleObjectOutput(_0x300a8b,_0x499c4d),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a51_0x467f12(0x1db)]='workflow:tasks';[a51_0x467f12(0x242)]=a51_0x467f12(0x27a);async['execute'](_0x603c95){const _0x3604e6=a51_0x467f12,{options:_0x14030b,args:_0x520ba4,tdx:_0x54b5ea}=_0x603c95,_0x1852d0=_0x520ba4[0x0];if(!_0x1852d0)return console['error'](_0x3604e6(0x30e)),0x1;const _0x3cdc81=_0x14030b[_0x3604e6(0x2ad)];_0x14030b['verbose']&&(console[_0x3604e6(0x24c)]('Attempt\x20ID:\x20'+_0x1852d0),_0x3cdc81&&console[_0x3604e6(0x24c)](_0x3604e6(0x21b)));const _0x215a9d=await withSpinner(_0x3604e6(0x1cf),()=>_0x54b5ea[_0x3604e6(0x201)][_0x3604e6(0x1e9)](_0x1852d0,_0x3cdc81||![]),{'verbose':_0x14030b['verbose']}),_0x8a73=_0x215a9d['data'];return console['error'](_0x3604e6(0x285)+_0x8a73['length']+_0x3604e6(0x2d1)+(_0x8a73[_0x3604e6(0x26e)]!==0x1?'s':'')),await handleSDKOutput(_0x8a73,_0x14030b),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x2b2);[a51_0x467f12(0x242)]=a51_0x467f12(0x233);async[a51_0x467f12(0x255)](_0x9edc82){const _0x54120c=a51_0x467f12,{options:_0x3f45ee,args:_0x39c943,tdx:_0x1831bf}=_0x9edc82,_0x4f7e0c=_0x39c943[0x0];let _0x3440b9=_0x39c943[0x1];if(!_0x4f7e0c)return console[_0x54120c(0x24c)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x3f45ee[_0x54120c(0x195)]&&(console['error'](_0x54120c(0x2ed)+_0x4f7e0c),_0x3440b9&&console[_0x54120c(0x24c)](_0x54120c(0x1ac)+_0x3440b9));const _0x27551e=await withSpinner(_0x54120c(0x1a0),()=>_0x1831bf['workflow']['logFiles'](_0x4f7e0c,_0x3440b9),{'verbose':_0x3f45ee[_0x54120c(0x195)]}),_0x2dcba0=_0x27551e['data'];if(_0x2dcba0[_0x54120c(0x26e)]===0x0)return console[_0x54120c(0x24c)](_0x54120c(0x1a4)),0x0;if(!_0x3440b9&&(_0x3f45ee[_0x54120c(0x2e3)]||_0x3f45ee[_0x54120c(0x252)]))return await handleSDKOutput(_0x2dcba0,_0x3f45ee),0x0;if(!_0x3440b9){const _0x2533dc=_0x2dcba0[_0x54120c(0x2b6)](_0x1efb39=>({'title':_0x1efb39['taskName']+'\x20('+formatBytes(_0x1efb39['fileSize'])+')','value':_0x1efb39[_0x54120c(0x284)]})),_0x1b507b=await a51_0x59e223({'type':_0x54120c(0x2fd),'name':_0x54120c(0x207),'message':_0x54120c(0x1d2),'choices':_0x2533dc});if(!_0x1b507b[_0x54120c(0x207)])return console['error'](_0x54120c(0x1c4)),0x0;_0x3440b9=_0x1b507b[_0x54120c(0x207)];}const _0x5d0571=await withSpinner(_0x54120c(0x2b7),()=>_0x1831bf[_0x54120c(0x201)]['logs'](_0x4f7e0c,_0x3440b9),{'verbose':_0x3f45ee[_0x54120c(0x195)]}),_0x431acd=_0x5d0571[_0x54120c(0x264)];return _0x431acd?console['log'](_0x431acd):console['error'](_0x54120c(0x1c3)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x253);[a51_0x467f12(0x242)]=a51_0x467f12(0x25b);async[a51_0x467f12(0x255)](_0x285d18){const _0x55fb9e=a51_0x467f12,{options:_0x1feccf,args:_0x168e71,tdx:_0xcb3980}=_0x285d18,_0x18658f=_0x168e71[0x0];if(!_0x18658f)return console['error'](_0x55fb9e(0x30e)),0x1;const _0x1d761a=_0x1feccf['reason'];_0x1feccf['verbose']&&(console[_0x55fb9e(0x24c)](_0x55fb9e(0x2ed)+_0x18658f),_0x1d761a&&console['error']('Reason:\x20'+_0x1d761a));if(!_0x1feccf[_0x55fb9e(0x307)]){if(!isInteractive())return console[_0x55fb9e(0x24c)](a51_0x221e70['red'](_0x55fb9e(0x310)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x55fb9e(0x24c)](a51_0x221e70[_0x55fb9e(0x2b3)](_0x55fb9e(0x324))),0x1;const _0x40177e=await confirmKey(_0x55fb9e(0x1e5)+_0x18658f+'?');if(!_0x40177e)return console[_0x55fb9e(0x24c)](a51_0x221e70[_0x55fb9e(0x296)](_0x55fb9e(0x1c4))),0x1;}const _0x367dd7=await withSpinner(_0x55fb9e(0x2a2),()=>_0xcb3980[_0x55fb9e(0x201)][_0x55fb9e(0x1ba)](_0x18658f,_0x1d761a),{'verbose':_0x1feccf[_0x55fb9e(0x195)]}),_0x428e38=_0x367dd7[_0x55fb9e(0x264)];return console[_0x55fb9e(0x24c)]('✔\x20'+_0x428e38),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a51_0x467f12(0x2d6);['description']=a51_0x467f12(0x2c9);async[a51_0x467f12(0x255)](_0x259e4a){const _0x4757c1=a51_0x467f12,{options:_0x59e1cb,args:_0x495bfe,tdx:_0x15722a}=_0x259e4a,_0x2799fd=_0x495bfe[0x0];if(!_0x2799fd)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x4757c1(0x24c)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0xa78e9c=![],_0x2c0eb3=_0x2799fd;if(_0x2799fd[_0x4757c1(0x25d)](_0x4757c1(0x2ac)))_0xa78e9c=!![],_0x2c0eb3=_0x2799fd['substring'](0x8);else{if(_0x2799fd['startsWith'](_0x4757c1(0x190)))_0xa78e9c=![],_0x2c0eb3=_0x2799fd[_0x4757c1(0x2b4)](0x8);else return console[_0x4757c1(0x24c)](_0x4757c1(0x238)),console[_0x4757c1(0x24c)](_0x4757c1(0x2c5)),0x1;}const _0x2e7380=_0x59e1cb['fromTask'],_0x3a5527=_0x59e1cb[_0x4757c1(0x1a9)],_0x4d01d0=_0x59e1cb[_0x4757c1(0x24b)],_0x324f27=_0x59e1cb[_0x4757c1(0x1e7)];_0x59e1cb[_0x4757c1(0x195)]&&(console[_0x4757c1(0x24c)](_0x4757c1(0x1eb)+(_0xa78e9c?'session':'attempt')+'\x20'+_0x2c0eb3),_0x2e7380&&console[_0x4757c1(0x24c)](_0x4757c1(0x30b)+_0x2e7380),_0x3a5527&&console[_0x4757c1(0x24c)](_0x4757c1(0x1ca)+_0x3a5527),_0x4d01d0&&console[_0x4757c1(0x24c)]('Params:\x20'+_0x4d01d0),_0x324f27&&console[_0x4757c1(0x24c)](_0x4757c1(0x197)));let _0x5cbc5b;if(_0x4d01d0)try{if(_0x4d01d0[_0x4757c1(0x25d)]('@')){const _0x11a927=await import(_0x4757c1(0x2a4)),_0x2c4151=_0x4d01d0[_0x4757c1(0x2b4)](0x1),_0xa50e54=await _0x11a927[_0x4757c1(0x1aa)](_0x2c4151,_0x4757c1(0x27b));_0x5cbc5b=JSON[_0x4757c1(0x240)](_0xa50e54);}else _0x5cbc5b=JSON[_0x4757c1(0x240)](_0x4d01d0);}catch{return console[_0x4757c1(0x24c)](_0x4757c1(0x2e0)),0x1;}if(!_0x59e1cb['yes']){if(!isInteractive())return console['error'](a51_0x221e70[_0x4757c1(0x1d8)](_0x4757c1(0x310)),_0x4757c1(0x28e)),console['error'](a51_0x221e70[_0x4757c1(0x2b3)](_0x4757c1(0x324))),0x1;const _0x224e5a=await confirmKey(_0x4757c1(0x19c)+(_0xa78e9c?_0x4757c1(0x29c):_0x4757c1(0x290))+'\x20'+_0x2c0eb3+'?');if(!_0x224e5a)return console[_0x4757c1(0x24c)](a51_0x221e70[_0x4757c1(0x296)](_0x4757c1(0x1c4))),0x1;}let _0x2767ea;_0xa78e9c?_0x2767ea=await withSpinner(_0x4757c1(0x23b),()=>_0x15722a[_0x4757c1(0x201)][_0x4757c1(0x209)](_0x2c0eb3,{'fromTask':_0x2e7380,'retryParams':_0x5cbc5b}),{'verbose':_0x59e1cb['verbose']}):_0x2767ea=await withSpinner('Retrying\x20attempt...',()=>_0x15722a['workflow'][_0x4757c1(0x1a7)](_0x2c0eb3,{'resumeFrom':_0x3a5527,'retryParams':_0x5cbc5b,'force':_0x324f27}),{'verbose':_0x59e1cb['verbose']});const _0x483028=_0x2767ea[_0x4757c1(0x264)];return console['error'](_0x4757c1(0x1f1)),console['error'](_0x4757c1(0x2c0)+_0x483028[_0x4757c1(0x27d)]),console[_0x4757c1(0x24c)](_0x4757c1(0x286)+_0x483028[_0x4757c1(0x1af)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a51_0x467f12(0x2d4);[a51_0x467f12(0x242)]=a51_0x467f12(0x31e);async[a51_0x467f12(0x255)](_0x559dba){const _0x50c908=a51_0x467f12,{options:_0x12b2b3,args:_0x452d4e,tdx:_0x1e32f4}=_0x559dba;let _0xd3c3d4=_0x452d4e[0x0];if(!_0xd3c3d4){const _0x55a9c6=this[_0x50c908(0x227)]([],_0x12b2b3),_0x4a43ab=await withSpinner('Loading\x20workflows...',()=>_0x1e32f4[_0x50c908(0x201)]['workflows'](_0x55a9c6,{'limit':_0x12b2b3[_0x50c908(0x29f)]}),{'verbose':_0x12b2b3[_0x50c908(0x195)]}),_0x4a173d=_0x4a43ab[_0x50c908(0x264)];if(_0x4a173d[_0x50c908(0x26e)]===0x0)return console[_0x50c908(0x24c)](_0x50c908(0x325)),!_0x55a9c6&&console[_0x50c908(0x24c)](a51_0x221e70['dim'](_0x50c908(0x1a5))),0x1;const _0x40598b=_0x4a173d['map'](_0x2f2d12=>({'title':_0x2f2d12[_0x50c908(0x23f)]?.[_0x50c908(0x1db)]+'.'+_0x2f2d12[_0x50c908(0x1db)],'value':_0x2f2d12[_0x50c908(0x23f)]?.[_0x50c908(0x1db)]+'.'+_0x2f2d12[_0x50c908(0x1db)],'description':_0x2f2d12[_0x50c908(0x2f3)]?'revision:\x20'+_0x2f2d12[_0x50c908(0x2f3)]:undefined})),_0x4e8836=await a51_0x59e223({'type':_0x50c908(0x2fd),'name':_0x50c908(0x201),'message':_0x50c908(0x24e),'choices':_0x40598b});if(!_0x4e8836[_0x50c908(0x201)])return 0x1;_0xd3c3d4=_0x4e8836['workflow'];}if(!_0xd3c3d4[_0x50c908(0x23a)]('.')){const _0x4b24e5=this[_0x50c908(0x227)]([],_0x12b2b3);if(_0x4b24e5)_0xd3c3d4=_0x4b24e5+'.'+_0xd3c3d4;else return console[_0x50c908(0x24c)](a51_0x221e70[_0x50c908(0x1d8)](_0x50c908(0x1cb)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a51_0x221e70[_0x50c908(0x2b3)](_0x50c908(0x1a5))),0x1;}const _0x48e9ed=_0x12b2b3[_0x50c908(0x2fb)],_0x18b423=_0x12b2b3[_0x50c908(0x1e3)],_0x277fec={};if(_0x48e9ed&&Array[_0x50c908(0x191)](_0x48e9ed))for(const _0x425af1 of _0x48e9ed){const _0xfaf6a7=_0x425af1[_0x50c908(0x29e)]('=');if(_0xfaf6a7===-0x1)return console['error'](_0x50c908(0x1fb)+_0x425af1),console[_0x50c908(0x24c)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x32b240=_0x425af1[_0x50c908(0x2b4)](0x0,_0xfaf6a7),_0x1fce25=_0x425af1['substring'](_0xfaf6a7+0x1);try{_0x277fec[_0x32b240]=JSON[_0x50c908(0x240)](_0x1fce25);}catch{_0x277fec[_0x32b240]=_0x1fce25;}}_0x12b2b3['verbose']&&(console['error'](_0x50c908(0x2f8)+_0xd3c3d4),Object[_0x50c908(0x1ea)](_0x277fec)[_0x50c908(0x26e)]>0x0&&console[_0x50c908(0x24c)]('Parameters:\x20'+JSON[_0x50c908(0x249)](_0x277fec)),_0x18b423&&console[_0x50c908(0x24c)](_0x50c908(0x1d6)+_0x18b423));const _0x4417f5=await withSpinner(_0x50c908(0x22e),()=>_0x1e32f4['workflow'][_0x50c908(0x2f2)](_0xd3c3d4,_0x277fec,{'sessionTime':_0x18b423}),{'verbose':_0x12b2b3[_0x50c908(0x195)]}),_0x3dbe41=_0x4417f5[_0x50c908(0x264)];console[_0x50c908(0x24c)]('✔\x20Workflow\x20run\x20started'),console[_0x50c908(0x24c)](_0x50c908(0x2db)+_0x3dbe41['id']),console[_0x50c908(0x24c)]('\x20\x20Session\x20ID:\x20'+_0x3dbe41['sessionId']),console[_0x50c908(0x24c)](_0x50c908(0x2c2)+_0x3dbe41[_0x50c908(0x23f)]?.[_0x50c908(0x1db)]),console[_0x50c908(0x24c)](_0x50c908(0x19b)+_0x3dbe41[_0x50c908(0x201)]?.[_0x50c908(0x1db)]);if(_0x3dbe41['project']?.['id']&&_0x3dbe41['sessionId']&&_0x3dbe41['id']){const _0x3e22c2=_0x12b2b3[_0x50c908(0x26f)],_0x40f393=getConsoleUrl(_0x3e22c2,_0x50c908(0x21a)+_0x3dbe41[_0x50c908(0x23f)]['id']+_0x50c908(0x1d7)+_0x3dbe41[_0x50c908(0x1af)]+_0x50c908(0x2ba)+_0x3dbe41['id']);console[_0x50c908(0x24c)](_0x50c908(0x292)+a51_0x221e70['cyan'](_0x40f393));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a51_0x467f12(0x211);[a51_0x467f12(0x242)]=a51_0x467f12(0x332);async[a51_0x467f12(0x255)](_0x1aff62){const _0x3a8dc6=a51_0x467f12,{options:_0x49bed7,args:_0x221af5,tdx:_0x2852b8}=_0x1aff62,_0x17bf63=_0x221af5[0x0],_0x1efcd2=_0x221af5[0x1]||'.';if(!_0x17bf63)return console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x2ec)),console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x1c0)),0x1;const _0x2469ae=_0x49bed7[_0x3a8dc6(0x2f3)];_0x49bed7[_0x3a8dc6(0x195)]&&(console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x232)+_0x17bf63),console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x22d)+_0x1efcd2),_0x2469ae&&console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x28b)+_0x2469ae));const _0x531827=await withSpinner(_0x3a8dc6(0x1d9)+_0x17bf63+_0x3a8dc6(0x25f),()=>_0x2852b8[_0x3a8dc6(0x201)]['download'](_0x17bf63,_0x1efcd2,{'revision':_0x2469ae}),{'verbose':_0x49bed7['verbose']}),_0x6929ab=_0x531827[_0x3a8dc6(0x264)];return console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x1e0)+_0x6929ab[_0x3a8dc6(0x199)]),console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x260)+_0x6929ab['revision']),console[_0x3a8dc6(0x24c)]('\x20\x20Files\x20extracted:\x20'+_0x6929ab['filesExtracted']),console[_0x3a8dc6(0x24c)](_0x3a8dc6(0x32b)+_0x1efcd2+'/'+_0x6929ab[_0x3a8dc6(0x199)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']='workflow:upload';[a51_0x467f12(0x242)]=a51_0x467f12(0x2bd);async[a51_0x467f12(0x255)](_0x1cb9d6){const _0x26bc08=a51_0x467f12,{options:_0xde8096,args:_0x42d349,tdx:_0x1b29fe}=_0x1cb9d6;let _0x488215='.',_0x6998f2=_0xde8096[_0x26bc08(0x1db)];if(_0x42d349[0x0]){const {promises:_0x10e317}=await import('fs');try{const _0x2da5c9=await _0x10e317[_0x26bc08(0x294)](_0x42d349[0x0]);if(_0x2da5c9['isDirectory']())_0x488215=_0x42d349[0x0];else return console[_0x26bc08(0x24c)]('Error:\x20'+_0x42d349[0x0]+_0x26bc08(0x29d)),0x1;}catch{_0x6998f2=_0x42d349[0x0],_0x488215='.';}}const _0x217a0f=_0xde8096['revision'],_0x1b4f7d=_0xde8096[_0x26bc08(0x245)];_0xde8096[_0x26bc08(0x195)]&&(console[_0x26bc08(0x24c)](_0x26bc08(0x2a3)+_0x488215),_0x6998f2&&console[_0x26bc08(0x24c)](_0x26bc08(0x271)+_0x6998f2),_0x217a0f&&console[_0x26bc08(0x24c)]('Revision:\x20'+_0x217a0f),_0x1b4f7d&&console[_0x26bc08(0x24c)](_0x26bc08(0x27c)));const _0x6e50a0=await withSpinner(_0x26bc08(0x1bb),()=>_0x1b29fe['workflow'][_0x26bc08(0x30a)](_0x488215,{'projectName':_0x6998f2,'revision':_0x217a0f,'skipValidation':_0x1b4f7d}),{'verbose':_0xde8096[_0x26bc08(0x195)]}),_0x13deac=_0x6e50a0[_0x26bc08(0x264)];return console['error'](_0x26bc08(0x1c2)+_0x13deac[_0x26bc08(0x199)]),console['error'](_0x26bc08(0x302)+_0x13deac[_0x26bc08(0x2d9)]),console[_0x26bc08(0x24c)](_0x26bc08(0x260)+_0x13deac[_0x26bc08(0x2f3)]),await this[_0x26bc08(0x31f)](_0x1b29fe,_0x13deac[_0x26bc08(0x199)],_0xde8096[_0x26bc08(0x26f)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a51_0x467f12(0x1db)]='workflow:pull';[a51_0x467f12(0x242)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a51_0x467f12(0x255)](_0x4b0bf5){const _0x48c090=a51_0x467f12,{options:_0x250dde,args:_0x494616,tdx:_0x5434c6}=_0x4b0bf5,_0x3eda25=_0x494616[0x0],_0x18ddcc=_0x494616[0x1];if(!_0x3eda25)return console['error'](a51_0x221e70[_0x48c090(0x1d8)]('Error:'),_0x48c090(0x32e)),console['error'](a51_0x221e70[_0x48c090(0x2b3)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x241e96=_0x250dde[_0x48c090(0x2f3)];_0x250dde['verbose']&&(console['error'](_0x48c090(0x232)+_0x3eda25),_0x18ddcc&&console[_0x48c090(0x24c)]('Target\x20directory:\x20'+_0x18ddcc),_0x241e96&&console[_0x48c090(0x24c)](_0x48c090(0x28b)+_0x241e96),_0x250dde[_0x48c090(0x32a)]&&console[_0x48c090(0x24c)]('Dry\x20run:\x20yes'));const _0x225382=await withSpinner(_0x48c090(0x256)+_0x3eda25+_0x48c090(0x25f),()=>_0x5434c6[_0x48c090(0x201)][_0x48c090(0x29a)](_0x3eda25,{'targetDir':_0x18ddcc,'revision':_0x241e96}),{'verbose':_0x250dde[_0x48c090(0x195)]}),_0x43821b=_0x225382['data'];_0x43821b['isNewProject']?console[_0x48c090(0x24c)](_0x48c090(0x276)+_0x43821b['projectName']):console['error'](_0x48c090(0x2b5)+_0x43821b[_0x48c090(0x199)]);console['error'](_0x48c090(0x260)+_0x43821b[_0x48c090(0x2f3)]),console[_0x48c090(0x24c)](_0x48c090(0x2f9)+(a51_0x5534f1['relative'](process['cwd'](),_0x43821b['targetDir'])||'.')),console[_0x48c090(0x24c)](_0x48c090(0x26d)+a51_0x221e70[_0x48c090(0x25a)]('+'+_0x43821b[_0x48c090(0x2ab)][_0x48c090(0x2a9)]+_0x48c090(0x322))+',\x20'+(a51_0x221e70[_0x48c090(0x296)]('~'+_0x43821b[_0x48c090(0x2ab)][_0x48c090(0x288)]+'\x20modified')+',\x20')+(a51_0x221e70[_0x48c090(0x1d8)]('-'+_0x43821b[_0x48c090(0x2ab)]['deleted']+_0x48c090(0x291))+',\x20')+(''+a51_0x221e70[_0x48c090(0x2b3)](_0x43821b[_0x48c090(0x2ab)][_0x48c090(0x1d0)]+_0x48c090(0x2df))));for(const _0x393659 of _0x43821b[_0x48c090(0x2c4)]){_0x393659['type']===_0x48c090(0x288)&&_0x393659[_0x48c090(0x1a8)]&&(console[_0x48c090(0x24c)]('\x0a'+a51_0x221e70['cyan'](_0x48c090(0x263)+_0x393659['path'])),console[_0x48c090(0x24c)](_0x393659['diff']));}if(!_0x43821b['hasChanges'])return saveSessionContext({'workflow_project':_0x43821b[_0x48c090(0x199)]},_0x250dde[_0x48c090(0x29c)]),console['error'](a51_0x221e70['green'](_0x48c090(0x308))),console[_0x48c090(0x24c)](a51_0x221e70['dim'](_0x48c090(0x320)+_0x43821b[_0x48c090(0x199)])),0x0;if(_0x250dde['dryRun'])return console[_0x48c090(0x24c)](a51_0x221e70[_0x48c090(0x296)](_0x48c090(0x244))),0x0;if(!_0x250dde[_0x48c090(0x307)]){if(!isInteractive())return console[_0x48c090(0x24c)](a51_0x221e70[_0x48c090(0x1d8)](_0x48c090(0x310)),_0x48c090(0x28e)),console['error'](a51_0x221e70['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1aa0f7=await confirmKey(_0x48c090(0x19e));if(!_0x1aa0f7)return console[_0x48c090(0x24c)](a51_0x221e70[_0x48c090(0x296)](_0x48c090(0x1c4)),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x48c090(0x30d),()=>_0x5434c6['workflow'][_0x48c090(0x313)](_0x43821b,{'revision':_0x241e96}),{'verbose':_0x250dde[_0x48c090(0x195)]}),saveSessionContext({'workflow_project':_0x43821b[_0x48c090(0x199)]},_0x250dde[_0x48c090(0x29c)]),console[_0x48c090(0x24c)](a51_0x221e70[_0x48c090(0x25a)](_0x48c090(0x22a)));const _0x2fd2de=a51_0x5534f1[_0x48c090(0x319)](process[_0x48c090(0x2dd)](),_0x43821b['targetDir'])||'.';return console[_0x48c090(0x24c)](a51_0x221e70[_0x48c090(0x2b3)]('\x20\x20Location:\x20'+_0x2fd2de)),console[_0x48c090(0x24c)](a51_0x221e70[_0x48c090(0x2b3)](_0x48c090(0x320)+_0x43821b[_0x48c090(0x199)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]='workflow:push';[a51_0x467f12(0x242)]=a51_0x467f12(0x309);async[a51_0x467f12(0x255)](_0x31d588){const _0x3f70a8=a51_0x467f12,{options:_0x4f42ad,args:_0x1865cd,tdx:_0x347242}=_0x31d588,_0x3f5f89=this['resolveProjectDir'](_0x1865cd,_0x4f42ad),_0x2d8b54=_0x4f42ad['revision'],_0x177ed1=_0x4f42ad['skipValidation'];_0x4f42ad[_0x3f70a8(0x195)]&&(_0x3f5f89&&console[_0x3f70a8(0x24c)](_0x3f70a8(0x2d5)+_0x3f5f89),_0x2d8b54&&console[_0x3f70a8(0x24c)](_0x3f70a8(0x28b)+_0x2d8b54),_0x4f42ad[_0x3f70a8(0x32a)]&&console[_0x3f70a8(0x24c)](_0x3f70a8(0x1fa)),_0x177ed1&&console[_0x3f70a8(0x24c)](_0x3f70a8(0x27c)));let _0x48ed42;try{_0x48ed42=await withSpinner(_0x3f70a8(0x305),()=>_0x347242['workflow'][_0x3f70a8(0x20b)]({'sourceDir':_0x3f5f89,'revision':_0x2d8b54,'skipValidation':_0x177ed1}),{'verbose':_0x4f42ad[_0x3f70a8(0x195)]});}catch(_0x27f172){if(_0x27f172 instanceof Error&&_0x27f172[_0x3f70a8(0x218)][_0x3f70a8(0x23a)](_0x3f70a8(0x2a8)))return console['error'](a51_0x221e70[_0x3f70a8(0x1d8)](_0x3f70a8(0x1cb)),_0x3f70a8(0x1d4)),_0x4f42ad[_0x3f70a8(0x330)]?console[_0x3f70a8(0x24c)](a51_0x221e70[_0x3f70a8(0x2b3)](_0x3f70a8(0x1de)+_0x4f42ad[_0x3f70a8(0x330)]+_0x3f70a8(0x275)+_0x4f42ad[_0x3f70a8(0x330)]+'\x27')):console[_0x3f70a8(0x24c)](a51_0x221e70[_0x3f70a8(0x2b3)](_0x3f70a8(0x21d))),0x1;throw _0x27f172;}const _0x3263fa=_0x48ed42['data'];console[_0x3f70a8(0x24c)](_0x3f70a8(0x298)+_0x3263fa[_0x3f70a8(0x199)]),console[_0x3f70a8(0x24c)](_0x3f70a8(0x326)+_0x3263fa[_0x3f70a8(0x2fc)]),console[_0x3f70a8(0x24c)](_0x3f70a8(0x260)+_0x3263fa[_0x3f70a8(0x2f3)]),console[_0x3f70a8(0x24c)](_0x3f70a8(0x26d)+a51_0x221e70['green']('+'+_0x3263fa['summary'][_0x3f70a8(0x2a9)]+_0x3f70a8(0x322))+',\x20'+(a51_0x221e70[_0x3f70a8(0x296)]('~'+_0x3263fa[_0x3f70a8(0x2ab)][_0x3f70a8(0x288)]+'\x20modified')+',\x20')+(a51_0x221e70[_0x3f70a8(0x1d8)]('-'+_0x3263fa['summary']['deleted']+'\x20deleted')+',\x20')+(''+a51_0x221e70['dim'](_0x3263fa[_0x3f70a8(0x2ab)][_0x3f70a8(0x1d0)]+_0x3f70a8(0x2df))));for(const _0x355f9f of _0x3263fa['changes']){_0x355f9f[_0x3f70a8(0x27f)]==='modified'&&_0x355f9f[_0x3f70a8(0x1a8)]&&(console[_0x3f70a8(0x24c)]('\x0a'+a51_0x221e70[_0x3f70a8(0x2b0)]('---\x20'+_0x355f9f['path'])),console[_0x3f70a8(0x24c)](_0x355f9f[_0x3f70a8(0x1a8)]));}if(!_0x3263fa[_0x3f70a8(0x272)])return console[_0x3f70a8(0x24c)](a51_0x221e70[_0x3f70a8(0x25a)](_0x3f70a8(0x208))),await this['showWorkflowConsoleUrl'](_0x347242,_0x3263fa[_0x3f70a8(0x199)],_0x4f42ad[_0x3f70a8(0x26f)]),0x0;if(_0x4f42ad[_0x3f70a8(0x32a)])return console[_0x3f70a8(0x24c)](a51_0x221e70['yellow']('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x4f42ad[_0x3f70a8(0x307)]){if(!isInteractive())return console[_0x3f70a8(0x24c)](a51_0x221e70[_0x3f70a8(0x1d8)](_0x3f70a8(0x310)),_0x3f70a8(0x28e)),console['error'](a51_0x221e70[_0x3f70a8(0x2b3)](_0x3f70a8(0x324))),0x1;const _0x535d33=await confirmKey(_0x3f70a8(0x213));if(!_0x535d33)return console[_0x3f70a8(0x24c)](a51_0x221e70[_0x3f70a8(0x296)](_0x3f70a8(0x1c4)),_0x3f70a8(0x1f5)),0x1;}const _0x1e8d55=await withSpinner(_0x3f70a8(0x2a1),()=>_0x347242['workflow'][_0x3f70a8(0x247)](_0x3263fa),{'verbose':_0x4f42ad[_0x3f70a8(0x195)]}),_0x5ca8d6=_0x1e8d55[_0x3f70a8(0x264)];return console[_0x3f70a8(0x24c)](a51_0x221e70[_0x3f70a8(0x25a)](_0x3f70a8(0x228))),console['error']('\x20\x20Project\x20ID:\x20'+_0x5ca8d6['projectId']),console[_0x3f70a8(0x24c)](_0x3f70a8(0x260)+_0x5ca8d6['revision']),await this[_0x3f70a8(0x31f)](_0x347242,_0x5ca8d6['projectName'],_0x4f42ad[_0x3f70a8(0x26f)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x1fc);['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a51_0x467f12(0x255)](_0x29fe9b){const _0xfad1ac=a51_0x467f12,{options:_0x5328c2,args:_0xb57f01,tdx:_0x30a6b9}=_0x29fe9b,_0x8285f3=this[_0xfad1ac(0x1f9)](_0xb57f01,_0x5328c2),_0x25b726=_0x5328c2['name'],_0x38da5b=_0x5328c2['revision'],_0x2d3e1c=_0x5328c2[_0xfad1ac(0x245)];if(!_0x8285f3)return console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x1d8)](_0xfad1ac(0x1cb)),_0xfad1ac(0x2d8)),console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x2b3)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x2b3)](_0xfad1ac(0x315))),0x1;if(!_0x25b726)return console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x1d8)](_0xfad1ac(0x1cb)),_0xfad1ac(0x192)),console['error'](a51_0x221e70['dim'](_0xfad1ac(0x268))),0x1;_0x5328c2[_0xfad1ac(0x195)]&&(console[_0xfad1ac(0x24c)](_0xfad1ac(0x2d5)+_0x8285f3),console[_0xfad1ac(0x24c)](_0xfad1ac(0x258)+_0x25b726),_0x38da5b&&console['error'](_0xfad1ac(0x28b)+_0x38da5b),_0x5328c2[_0xfad1ac(0x32a)]&&console['error'](_0xfad1ac(0x1fa)),_0x2d3e1c&&console[_0xfad1ac(0x24c)](_0xfad1ac(0x27c)));const _0xd2dc17=await withSpinner(_0xfad1ac(0x281),()=>_0x30a6b9[_0xfad1ac(0x201)][_0xfad1ac(0x318)](_0x8285f3,_0x25b726,{'revision':_0x38da5b,'skipValidation':_0x2d3e1c}),{'verbose':_0x5328c2[_0xfad1ac(0x195)]}),_0x924740=_0xd2dc17['data'];console[_0xfad1ac(0x24c)](_0xfad1ac(0x1f4)+_0x924740[_0xfad1ac(0x2fc)]);_0x924740['sourceProjectName']&&console[_0xfad1ac(0x24c)](_0xfad1ac(0x328)+_0x924740[_0xfad1ac(0x202)]);console['error']('New\x20project\x20name:\x20'+_0x924740[_0xfad1ac(0x1bd)]),console[_0xfad1ac(0x24c)]('Revision:\x20'+_0x924740['revision']),console[_0xfad1ac(0x24c)](_0xfad1ac(0x282)+_0x924740[_0xfad1ac(0x1e1)]);_0x924740[_0xfad1ac(0x2aa)]&&(console['error'](a51_0x221e70[_0xfad1ac(0x296)](_0xfad1ac(0x2f5)+_0x924740[_0xfad1ac(0x1bd)]+_0xfad1ac(0x239)+_0x924740[_0xfad1ac(0x261)]+')')),console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x296)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x5328c2['dryRun'])return console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x296)](_0xfad1ac(0x22b))),0x0;if(!_0x5328c2['yes']){if(!isInteractive())return console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x1d8)](_0xfad1ac(0x310)),_0xfad1ac(0x28e)),console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x2b3)](_0xfad1ac(0x324))),0x1;const _0x27fa87=_0x924740['sourceProjectName']||a51_0x5534f1[_0xfad1ac(0x26a)](_0x8285f3),_0x2b1db1=_0x924740[_0xfad1ac(0x2aa)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x25b726+_0xfad1ac(0x2ee):_0xfad1ac(0x1ab)+_0x27fa87+_0xfad1ac(0x28f)+_0x25b726+'\x22?',_0x5622c1=await confirmKey(_0x2b1db1);if(!_0x5622c1)return console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x296)]('Cancelled')),0x1;}const _0x4dc36b=await withSpinner(_0x924740[_0xfad1ac(0x2aa)]?_0xfad1ac(0x1da)+_0x25b726+_0xfad1ac(0x25f):'Cloning\x20to\x20'+_0x25b726+_0xfad1ac(0x25f),()=>_0x30a6b9[_0xfad1ac(0x201)]['executeCloneProject'](_0x924740),{'verbose':_0x5328c2[_0xfad1ac(0x195)]}),_0x56e0eb=_0x4dc36b[_0xfad1ac(0x264)];return console[_0xfad1ac(0x24c)](a51_0x221e70[_0xfad1ac(0x25a)](_0x924740['targetExists']?'✔\x20Project\x20updated':_0xfad1ac(0x2f7))),console[_0xfad1ac(0x24c)](_0xfad1ac(0x2c2)+_0x56e0eb[_0xfad1ac(0x1bd)]),console[_0xfad1ac(0x24c)]('\x20\x20Project\x20ID:\x20'+_0x56e0eb[_0xfad1ac(0x2cc)]),console[_0xfad1ac(0x24c)](_0xfad1ac(0x260)+_0x56e0eb['revision']),await this['showWorkflowConsoleUrl'](_0x30a6b9,_0x56e0eb[_0xfad1ac(0x1bd)],_0x5328c2[_0xfad1ac(0x26f)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x250);[a51_0x467f12(0x242)]=a51_0x467f12(0x321);async['execute'](_0x40f15d){const _0x12ee75=a51_0x467f12,{options:_0x40a64e,args:_0x37162f,tdx:_0x162195}=_0x40f15d,_0x466b40=_0x37162f[0x0];if(!_0x466b40)return console[_0x12ee75(0x24c)](_0x12ee75(0x1be)),console[_0x12ee75(0x24c)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x40a64e[_0x12ee75(0x195)]&&console[_0x12ee75(0x24c)]('Project:\x20'+_0x466b40);if(!_0x40a64e['yes']){if(!isInteractive())return console[_0x12ee75(0x24c)](a51_0x221e70['red'](_0x12ee75(0x310)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a51_0x221e70[_0x12ee75(0x2b3)](_0x12ee75(0x324))),0x1;const _0x248f9a=await confirmKey(_0x12ee75(0x1f6)+_0x466b40+_0x12ee75(0x2f6));if(!_0x248f9a)return console[_0x12ee75(0x24c)](a51_0x221e70[_0x12ee75(0x296)](_0x12ee75(0x1c4))),0x1;}const _0xbe12fd=await withSpinner('Deleting\x20project\x20'+_0x466b40+_0x12ee75(0x25f),()=>_0x162195[_0x12ee75(0x201)][_0x12ee75(0x2ea)](_0x466b40),{'verbose':_0x40a64e[_0x12ee75(0x195)]}),_0x213288=_0xbe12fd[_0x12ee75(0x264)];return console[_0x12ee75(0x24c)](_0x12ee75(0x316)+_0x213288['projectName']),console[_0x12ee75(0x24c)]('\x20\x20Project\x20ID:\x20'+_0x213288[_0x12ee75(0x2d9)]),0x0;}}export function parseKeyValue(_0x5331b0){const _0xd324ad=a51_0x467f12,_0x15aa8c=_0x5331b0[_0xd324ad(0x29e)]('=');if(_0x15aa8c===-0x1)throw new Error('Invalid\x20format:\x20'+_0x5331b0+_0xd324ad(0x327));const _0xaf4c75=_0x5331b0['substring'](0x0,_0x15aa8c),_0x56404c=_0x5331b0[_0xd324ad(0x2b4)](_0x15aa8c+0x1);if(!_0xaf4c75)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0xaf4c75,'value':_0x56404c};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]='workflow:secrets:list';['description']=a51_0x467f12(0x1f0);async[a51_0x467f12(0x255)](_0x1107a9){const _0x474382=a51_0x467f12,{options:_0x92887b,args:_0x422da3,tdx:_0x9ca0f7}=_0x1107a9,_0x58b0e3=this[_0x474382(0x20a)](_0x422da3,_0x92887b);if(!_0x58b0e3)return 0x1;_0x92887b[_0x474382(0x195)]&&console['error'](_0x474382(0x232)+_0x58b0e3);const _0x3c3cab=await withSpinner(_0x474382(0x2c1),()=>_0x9ca0f7['workflow'][_0x474382(0x2e6)](_0x58b0e3),{'verbose':_0x92887b[_0x474382(0x195)]}),{secrets:_0x583627}=_0x3c3cab['data'];return console['error']('✔\x20Found\x20'+_0x583627[_0x474382(0x26e)]+_0x474382(0x2de)+(_0x583627[_0x474382(0x26e)]!==0x1?'s':'')),await handleSDKOutput(_0x583627,_0x92887b),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x20c);[a51_0x467f12(0x242)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a51_0x467f12(0x255)](_0x36aa60){const _0x7266a9=a51_0x467f12,{options:_0x21ee3d,args:_0x547b4d,tdx:_0x42533a}=_0x36aa60;let _0x28f2d0,_0x1eecf9;if(_0x547b4d['length']>=0x2)_0x28f2d0=_0x547b4d[0x0],_0x1eecf9=_0x547b4d[0x1];else{if(_0x547b4d[_0x7266a9(0x26e)]===0x1&&_0x21ee3d[_0x7266a9(0x330)])_0x28f2d0=_0x21ee3d[_0x7266a9(0x330)],_0x1eecf9=_0x547b4d[0x0];else return _0x547b4d[_0x7266a9(0x26e)]===0x1?(console[_0x7266a9(0x24c)](_0x7266a9(0x2ec)),console[_0x7266a9(0x24c)](_0x7266a9(0x1a5)),0x1):(console[_0x7266a9(0x24c)]('Error:\x20KEY=VALUE\x20is\x20required'),console[_0x7266a9(0x24c)](_0x7266a9(0x1bf)),0x1);}let _0x5b019c,_0x551c0b;try{({key:_0x5b019c,value:_0x551c0b}=parseKeyValue(_0x1eecf9));}catch(_0x1007d6){return _0x1007d6 instanceof Error&&console[_0x7266a9(0x24c)](a51_0x221e70[_0x7266a9(0x1d8)]('Error:'),_0x1007d6[_0x7266a9(0x218)]),0x1;}_0x21ee3d[_0x7266a9(0x195)]&&(console['error'](_0x7266a9(0x232)+_0x28f2d0),console[_0x7266a9(0x24c)](_0x7266a9(0x2c6)+_0x5b019c));const _0x3319c6=await withSpinner(_0x7266a9(0x221),()=>_0x42533a[_0x7266a9(0x201)][_0x7266a9(0x262)](_0x28f2d0,_0x5b019c,_0x551c0b),{'verbose':_0x21ee3d[_0x7266a9(0x195)]}),_0x10fc71=_0x3319c6[_0x7266a9(0x264)];return console[_0x7266a9(0x24c)](_0x7266a9(0x2a7)+_0x10fc71[_0x7266a9(0x2a5)]+_0x7266a9(0x300)+_0x10fc71[_0x7266a9(0x199)]+'\x27'),(_0x21ee3d[_0x7266a9(0x2e3)]||_0x21ee3d[_0x7266a9(0x2b1)])&&await handleSingleObjectOutput(_0x10fc71,_0x21ee3d),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x223);[a51_0x467f12(0x242)]=a51_0x467f12(0x2dc);async[a51_0x467f12(0x255)](_0x6821d9){const _0x32beb3=a51_0x467f12,{options:_0xf879c7,args:_0x450d8b,tdx:_0x9329c3}=_0x6821d9;let _0x35138c,_0x4cc7b3;if(_0x450d8b[_0x32beb3(0x26e)]>=0x2)_0x35138c=_0x450d8b[0x0],_0x4cc7b3=_0x450d8b[0x1];else{if(_0x450d8b[_0x32beb3(0x26e)]===0x1&&_0xf879c7[_0x32beb3(0x330)])_0x35138c=_0xf879c7['workflowProject'],_0x4cc7b3=_0x450d8b[0x0];else return _0x450d8b[_0x32beb3(0x26e)]===0x1?(console[_0x32beb3(0x24c)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x32beb3(0x24c)](_0x32beb3(0x1a5)),0x1):(console[_0x32beb3(0x24c)](_0x32beb3(0x259)),console['error'](_0x32beb3(0x28c)),0x1);}_0xf879c7[_0x32beb3(0x195)]&&(console[_0x32beb3(0x24c)](_0x32beb3(0x232)+_0x35138c),console[_0x32beb3(0x24c)](_0x32beb3(0x2c6)+_0x4cc7b3));if(!_0xf879c7[_0x32beb3(0x307)]){if(!isInteractive())return console[_0x32beb3(0x24c)](a51_0x221e70[_0x32beb3(0x1d8)](_0x32beb3(0x310)),_0x32beb3(0x28e)),console[_0x32beb3(0x24c)](a51_0x221e70[_0x32beb3(0x2b3)](_0x32beb3(0x324))),0x1;const _0x409f04=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x4cc7b3+_0x32beb3(0x1fe)+_0x35138c+'\x27?');if(!_0x409f04)return console[_0x32beb3(0x24c)](a51_0x221e70[_0x32beb3(0x296)](_0x32beb3(0x1c4))),0x1;}const _0x261c7c=await withSpinner('Deleting\x20secret...',()=>_0x9329c3[_0x32beb3(0x201)][_0x32beb3(0x2d3)](_0x35138c,_0x4cc7b3),{'verbose':_0xf879c7['verbose']}),_0x472a45=_0x261c7c[_0x32beb3(0x264)];return console[_0x32beb3(0x24c)]('✔\x20Secret\x20\x27'+_0x472a45[_0x32beb3(0x2a5)]+_0x32beb3(0x1a6)+_0x472a45[_0x32beb3(0x199)]+'\x27'),(_0xf879c7[_0x32beb3(0x2e3)]||_0xf879c7[_0x32beb3(0x2b1)])&&await handleSingleObjectOutput(_0x472a45,_0xf879c7),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(_0x165aae){const _0x2c3c15=a51_0x467f12,_0x4ef541=Math[_0x2c3c15(0x1a1)](_0x165aae/0x3e8),_0x64e67d=Math[_0x2c3c15(0x1a1)](_0x4ef541/0x3c),_0xba319c=Math[_0x2c3c15(0x1a1)](_0x64e67d/0x3c),_0x44c404=Math[_0x2c3c15(0x1a1)](_0xba319c/0x18);if(_0x44c404>0x0){const _0x3f77da=_0xba319c%0x18;return _0x3f77da>0x0?_0x44c404+'d\x20'+_0x3f77da+'h':_0x44c404+'d';}else{if(_0xba319c>0x0){const _0x22e4d6=_0x64e67d%0x3c;return _0x22e4d6>0x0?_0xba319c+'h\x20'+_0x22e4d6+'m':_0xba319c+'h';}else{if(_0x64e67d>0x0){const _0x536f54=_0x4ef541%0x3c;return _0x536f54>0x0?_0x64e67d+'m\x20'+_0x536f54+'s':_0x64e67d+'m';}else return _0x4ef541+'s';}}}function formatTimestamp(_0x39f163,_0x2c59e1){const _0xf2956d=a51_0x467f12,_0x17fec9=new Date(_0x39f163),_0x3c714f=String(_0x17fec9['getHours']())[_0xf2956d(0x1e2)](0x2,'0'),_0x47bf69=String(_0x17fec9['getMinutes']())[_0xf2956d(0x1e2)](0x2,'0'),_0x17ffcc=_0x3c714f+':'+_0x47bf69,_0x3d2767=_0x17fec9['getFullYear']()===_0x2c59e1[_0xf2956d(0x1c9)]()&&_0x17fec9['getMonth']()===_0x2c59e1['getMonth']()&&_0x17fec9['getDate']()===_0x2c59e1[_0xf2956d(0x24f)]();if(_0x3d2767)return _0x17ffcc;else{const _0x35f992=String(_0x17fec9['getMonth']()+0x1)[_0xf2956d(0x1e2)](0x2,'0'),_0x21acf3=String(_0x17fec9[_0xf2956d(0x24f)]())['padStart'](0x2,'0');return _0x35f992+'-'+_0x21acf3+'\x20'+_0x17ffcc;}}function formatDate(_0x1e951b){const _0x39ee03=a51_0x467f12,_0x21ab87=_0x1e951b[_0x39ee03(0x1c9)](),_0x20390b=String(_0x1e951b['getMonth']()+0x1)[_0x39ee03(0x1e2)](0x2,'0'),_0x4602a1=String(_0x1e951b[_0x39ee03(0x24f)]())[_0x39ee03(0x1e2)](0x2,'0');return _0x21ab87+'-'+_0x20390b+'-'+_0x4602a1;}function getTaskStateIcon(_0x2953d0){const _0x5b711e={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5b711e[_0x2953d0]||'⚪';}function getBarChar(_0x2fdb2b){const _0x1f571c=a51_0x467f12;return _0x2fdb2b===_0x1f571c(0x24c)||_0x2fdb2b===_0x1f571c(0x206)?'×':'─';}function getBarColor(_0x40c5ef){const _0x2acc43=a51_0x467f12,_0x5e8f9d={'success':a51_0x221e70[_0x2acc43(0x25a)],'error':a51_0x221e70['red'],'group_error':a51_0x221e70[_0x2acc43(0x1d8)],'running':a51_0x221e70[_0x2acc43(0x2af)],'blocked':a51_0x221e70[_0x2acc43(0x296)],'planned':a51_0x221e70[_0x2acc43(0x2b3)],'canceling':a51_0x221e70[_0x2acc43(0x296)]};return _0x5e8f9d[_0x40c5ef]||a51_0x221e70[_0x2acc43(0x30f)];}function parseTaskName(_0x5c5a95){const _0x1c4794=a51_0x467f12;let _0xf4674e=_0x5c5a95['replace'](/^\++/,'');const _0x51cd96=_0xf4674e[_0x1c4794(0x226)]('+'),_0x3a3bb8=_0x51cd96[_0x1c4794(0x26e)]>0x1?_0x51cd96['length']-0x2:0x0,_0x34a1e8=_0x51cd96[_0x51cd96[_0x1c4794(0x26e)]-0x1]||_0xf4674e;return{'level':_0x3a3bb8,'name':'+'+_0x34a1e8};}function truncateTaskName(_0x210a10,_0x2b695e){const _0x3c4f6a=a51_0x467f12,_0x6db817=stringWidth(_0x210a10);if(_0x6db817<=_0x2b695e)return _0x210a10;let _0x1865ad=_0x210a10;while(stringWidth(_0x1865ad+'…')>_0x2b695e&&_0x1865ad[_0x3c4f6a(0x26e)]>0x0){_0x1865ad=_0x1865ad[_0x3c4f6a(0x2be)](0x0,-0x1);}return _0x1865ad+'…';}function calculateTimeScale(_0x4c45a0,_0x425c31){const _0x53ae7f=a51_0x467f12;return{'startTime':_0x4c45a0['start'],'endTime':_0x4c45a0[_0x53ae7f(0x2a6)],'durationMs':_0x4c45a0[_0x53ae7f(0x1c5)],'msPerChar':_0x4c45a0[_0x53ae7f(0x1c5)]/_0x425c31};}function timeToPosition(_0x2b5716,_0x38e222,_0x44c05d){const _0x3ca1d9=a51_0x467f12,_0x4233fc=_0x2b5716-_0x38e222[_0x3ca1d9(0x25c)],_0xdc381e=Math[_0x3ca1d9(0x1a1)](_0x4233fc/_0x38e222[_0x3ca1d9(0x270)]);return Math[_0x3ca1d9(0x31c)](0x0,Math[_0x3ca1d9(0x2d7)](_0xdc381e,_0x44c05d));}function renderTimeAxis(_0x71b4dc,_0x2ae5a7){const _0x271459=a51_0x467f12,_0x171890=Math['min'](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x271459(0x31c)](TIMELINE_CONFIG[_0x271459(0x2a0)],Math['floor'](_0x2ae5a7/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x413599=_0x71b4dc[_0x271459(0x246)]/(_0x171890-0x1),_0x52a191=new Date(_0x71b4dc['startTime']),_0x496cc1=[];for(let _0x2f77f6=0x0;_0x2f77f6<_0x171890;_0x2f77f6++){const _0x501ebf=_0x71b4dc[_0x271459(0x25c)]+_0x2f77f6*_0x413599,_0x14bc0c=timeToPosition(_0x501ebf,_0x71b4dc,_0x2ae5a7),_0x3459e4=formatTimestamp(_0x501ebf,_0x52a191);_0x496cc1[_0x271459(0x30a)]({'pos':_0x14bc0c,'text':_0x3459e4});}const _0x2c9ff4=new Array(_0x2ae5a7)['fill']('\x20');let _0x1b5d85=-0x1;for(const {pos:_0x2f3c9f,text:_0x45a7bd}of _0x496cc1){let _0x403327=Math[_0x271459(0x31c)](0x0,_0x2f3c9f-Math[_0x271459(0x1a1)](_0x45a7bd[_0x271459(0x26e)]/0x2));_0x403327<=_0x1b5d85+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x403327=_0x1b5d85+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x403327+_0x45a7bd[_0x271459(0x26e)]>_0x2ae5a7&&(_0x403327=_0x2ae5a7-_0x45a7bd[_0x271459(0x26e)]);if(_0x403327>=0x0&&_0x403327+_0x45a7bd[_0x271459(0x26e)]<=_0x2ae5a7&&_0x403327>_0x1b5d85){for(let _0x30307e=0x0;_0x30307e<_0x45a7bd[_0x271459(0x26e)];_0x30307e++){_0x2c9ff4[_0x403327+_0x30307e]=_0x45a7bd[_0x30307e];}_0x1b5d85=_0x403327+_0x45a7bd['length']-0x1;}}return _0x2c9ff4[_0x271459(0x2e4)]('');}function renderTaskRow(_0x55d141,_0x599e8b,_0x4c5112,_0x2d5255){const _0x271745=a51_0x467f12,{level:_0x16ba13,name:_0x50b9ab}=parseTaskName(_0x55d141[_0x271745(0x1db)]),_0x275bcf='\x20'[_0x271745(0x225)](_0x16ba13),_0xa6976e=_0x55d141[_0x271745(0x235)]?'('+formatElapsed(_0x55d141[_0x271745(0x235)]['duration'])+')':'',_0x51f19b=stringWidth(_0xa6976e),_0x315fda=_0x16ba13*0x1,_0x43466b=_0x2d5255-_0x315fda-_0x51f19b-0x1,_0x110aff=truncateTaskName(_0x50b9ab,_0x43466b),_0x4281b0=_0x275bcf+_0x110aff,_0xb052af=stringWidth(_0x4281b0),_0x2073a1=_0x2d5255-_0xb052af-_0x51f19b,_0x3f4cba=_0x4281b0+'\x20'[_0x271745(0x225)](Math[_0x271745(0x31c)](0x1,_0x2073a1))+a51_0x221e70[_0x271745(0x2b3)](_0xa6976e),_0x474311=getTaskStateIcon(_0x55d141[_0x271745(0x1dc)]),_0x8f783d=new Array(_0x4c5112)['fill']('\x20');if(_0x55d141[_0x271745(0x235)]){const _0x5dd7c0=timeToPosition(_0x55d141[_0x271745(0x235)][_0x271745(0x234)],_0x599e8b,_0x4c5112),_0x2fde80=timeToPosition(_0x55d141[_0x271745(0x235)]['end'],_0x599e8b,_0x4c5112),_0x36608e=getBarChar(_0x55d141[_0x271745(0x1dc)]),_0x3d5c86=Math[_0x271745(0x31c)](_0x5dd7c0+0x1,_0x2fde80);for(let _0x53d1f0=_0x5dd7c0;_0x53d1f0<Math[_0x271745(0x2d7)](_0x3d5c86,_0x4c5112);_0x53d1f0++){_0x8f783d[_0x53d1f0]=_0x36608e;}}const _0x41feb2=getBarColor(_0x55d141[_0x271745(0x1dc)]),_0x14da59=_0x8f783d[_0x271745(0x2b6)](_0xf4a25e=>_0xf4a25e==='\x20'?'\x20':_0x41feb2(_0xf4a25e))[_0x271745(0x2e4)]('');return _0x474311+'\x20'+_0x3f4cba+'│'+_0x14da59+'│';}function a51_0x56f9(_0x5657ec,_0x99f221){_0x5657ec=_0x5657ec-0x190;const _0xf6ba0a=a51_0xf6ba();let _0x56f9b6=_0xf6ba0a[_0x5657ec];return _0x56f9b6;}function calculateStats(_0xa1ffe){const _0x75a23d=a51_0x467f12,_0x1338e8={'total':_0xa1ffe[_0x75a23d(0x26e)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x196710 of _0xa1ffe){if(_0x196710['state']===_0x75a23d(0x194))_0x1338e8[_0x75a23d(0x194)]++;else{if(_0x196710[_0x75a23d(0x1dc)]===_0x75a23d(0x24c)||_0x196710[_0x75a23d(0x1dc)]==='group_error')_0x1338e8['error']++;else _0x196710['state']==='running'?_0x1338e8[_0x75a23d(0x23d)]++:_0x1338e8[_0x75a23d(0x2da)]++;}}return _0x1338e8;}function formatStats(_0x199cf3){const _0x46dac3=a51_0x467f12;return[_0x46dac3(0x2f4)+_0x199cf3['total'],'✅\x20'+_0x199cf3[_0x46dac3(0x194)],'❌\x20'+_0x199cf3[_0x46dac3(0x24c)],_0x46dac3(0x2fa)+_0x199cf3[_0x46dac3(0x23d)],'⏳\x20'+_0x199cf3[_0x46dac3(0x2da)]][_0x46dac3(0x2e4)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a51_0x467f12(0x1db)]=a51_0x467f12(0x269);[a51_0x467f12(0x242)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a51_0x467f12(0x255)](_0x2fc28a){const _0x398a6f=a51_0x467f12,{options:_0x578f7c,args:_0x2558d1,tdx:_0x3537d8}=_0x2fc28a;let _0x12febc,_0x4c6e06,_0x3af0df=![];if(_0x2558d1[0x0]){if(_0x2558d1[0x0][_0x398a6f(0x23a)]('.')){const _0x2eca1e=this[_0x398a6f(0x1c7)](_0x2558d1,_0x578f7c);if(!_0x2eca1e)return 0x1;_0x12febc=_0x2eca1e[_0x398a6f(0x199)],_0x4c6e06=_0x2eca1e[_0x398a6f(0x317)];}else{_0x4c6e06=_0x2558d1[0x0],_0x12febc=_0x578f7c['workflowProject'];if(!_0x12febc)return console[_0x398a6f(0x24c)](a51_0x221e70[_0x398a6f(0x1d8)](_0x398a6f(0x1cb)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x3af0df=!![];}}else{const _0x435967=this[_0x398a6f(0x1c7)](_0x2558d1,_0x578f7c);if(!_0x435967)return 0x1;_0x12febc=_0x435967['projectName'],_0x4c6e06=_0x435967[_0x398a6f(0x317)];}if(_0x578f7c[_0x398a6f(0x195)]){if(_0x12febc&&_0x4c6e06)console['error']('Filter:\x20'+_0x12febc+'.'+_0x4c6e06);else _0x12febc&&console[_0x398a6f(0x24c)](_0x398a6f(0x283)+_0x12febc);}const _0x366e95=_0x578f7c[_0x398a6f(0x27d)],_0x12418f=_0x578f7c[_0x398a6f(0x1af)];if(_0x366e95){_0x12418f&&console[_0x398a6f(0x24c)](a51_0x221e70[_0x398a6f(0x296)](_0x398a6f(0x27e)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x33f381=_0x578f7c['follow'];return _0x33f381?await this[_0x398a6f(0x32c)](_0x2fc28a,_0x366e95):await this[_0x398a6f(0x2bf)](_0x2fc28a,_0x366e95,_0x578f7c),0x0;}if(_0x12418f){const _0x370add=await withSpinner(_0x398a6f(0x248),()=>_0x3537d8[_0x398a6f(0x201)][_0x398a6f(0x323)]({'projectName':_0x12febc,'workflowName':_0x4c6e06,'limit':0x64}),{'verbose':_0x578f7c[_0x398a6f(0x195)]}),_0x3dee9d=_0x370add[_0x398a6f(0x264)]['find'](_0x28d6c0=>_0x28d6c0['id']===_0x12418f);if(!_0x3dee9d)return console['error'](a51_0x221e70[_0x398a6f(0x1d8)]('Error:'),_0x398a6f(0x31d)+_0x12418f),0x1;if(!_0x3dee9d[_0x398a6f(0x28a)]?.['id'])return console[_0x398a6f(0x24c)](a51_0x221e70['red']('Error:'),_0x398a6f(0x216)+_0x12418f+_0x398a6f(0x1f2)),0x1;const _0x4bb5a4=_0x3dee9d[_0x398a6f(0x28a)]['id'];_0x578f7c[_0x398a6f(0x195)]&&console['error']('Using\x20attempt\x20'+_0x4bb5a4+'\x20from\x20session\x20'+_0x12418f);const _0x323f3f=_0x578f7c[_0x398a6f(0x2eb)];return _0x323f3f?await this[_0x398a6f(0x32c)](_0x2fc28a,_0x4bb5a4):await this[_0x398a6f(0x2bf)](_0x2fc28a,_0x4bb5a4,_0x578f7c),0x0;}const _0x10cf30=await withSpinner('Loading\x20sessions...',()=>_0x3537d8[_0x398a6f(0x201)][_0x398a6f(0x323)]({'projectName':_0x12febc,'workflowName':_0x4c6e06,'limit':_0x578f7c[_0x398a6f(0x29f)]||0x32}),{'verbose':_0x578f7c[_0x398a6f(0x195)]}),_0x2fad71=_0x10cf30[_0x398a6f(0x264)];if(_0x2fad71[_0x398a6f(0x26e)]===0x0){if(_0x12febc&&_0x4c6e06)console[_0x398a6f(0x24c)]('No\x20sessions\x20found\x20for:\x20'+_0x12febc+'.'+_0x4c6e06);else _0x12febc?console[_0x398a6f(0x24c)](_0x398a6f(0x1cd)+_0x12febc):(console['error'](_0x398a6f(0x219)),console[_0x398a6f(0x24c)](a51_0x221e70[_0x398a6f(0x2b3)](_0x398a6f(0x1ee))));return 0x0;}_0x2fad71[_0x398a6f(0x241)]((_0x577370,_0x46dd1b)=>{const _0x50a7c1=_0x398a6f,_0x93df0f=_0x577370['sessionTime']||'',_0x55c906=_0x46dd1b[_0x50a7c1(0x1e3)]||'';return _0x55c906[_0x50a7c1(0x2cf)](_0x93df0f);});if(_0x578f7c['json']||_0x578f7c[_0x398a6f(0x2b1)])return await handleSDKOutput(_0x2fad71,_0x578f7c),0x0;let _0x24ca48;if(_0x3af0df){const _0x10760f=_0x2fad71[0x0];if(!_0x10760f['lastAttempt']?.['id'])return console[_0x398a6f(0x24c)](_0x398a6f(0x22f)),0x0;_0x24ca48=_0x10760f[_0x398a6f(0x28a)]['id'],_0x578f7c['verbose']&&console[_0x398a6f(0x24c)]('Auto-selected\x20latest\x20session:\x20'+_0x10760f[_0x398a6f(0x1e3)]);}else{const _0x38eb98=_0x2fad71[_0x398a6f(0x2b6)](_0x5618ed=>{const _0x4ef19a=_0x398a6f,_0x4cedba=getAttemptStatusDisplay(_0x5618ed[_0x4ef19a(0x28a)]);return{'title':_0x5618ed[_0x4ef19a(0x23f)]?.['name']+'.'+_0x5618ed[_0x4ef19a(0x201)]?.['name']+_0x4ef19a(0x289)+_0x5618ed[_0x4ef19a(0x1e3)]+'\x20'+_0x4cedba[_0x4ef19a(0x2c8)],'value':_0x5618ed['lastAttempt']?.['id']||'','description':_0x4cedba['text']};}),_0x530eb5=await a51_0x59e223({'type':_0x398a6f(0x2fd),'name':_0x398a6f(0x27d),'message':_0x398a6f(0x1e8),'choices':_0x38eb98[_0x398a6f(0x32f)](_0x426bf5=>_0x426bf5['value']!=='')});if(!_0x530eb5[_0x398a6f(0x27d)])return 0x0;_0x24ca48=_0x530eb5['attemptId'];}const _0x12eee3=_0x578f7c['follow'];return _0x12eee3?await this[_0x398a6f(0x32c)](_0x2fc28a,_0x24ca48):await this[_0x398a6f(0x2bf)](_0x2fc28a,_0x24ca48,_0x578f7c),0x0;}async[a51_0x467f12(0x2bf)](_0x1bf689,_0x1ed336,_0x5b8e78){const _0x59c74a=a51_0x467f12,{tdx:_0x150863}=_0x1bf689;let _0x18cd4a,_0xb33159;try{[_0x18cd4a,_0xb33159]=await Promise[_0x59c74a(0x1f3)]([_0x150863[_0x59c74a(0x201)][_0x59c74a(0x290)](_0x1ed336),_0x150863[_0x59c74a(0x201)]['tasks'](_0x1ed336,![])]);}catch(_0x181a74){console['error'](a51_0x221e70[_0x59c74a(0x1d8)](_0x59c74a(0x329)));_0x5b8e78[_0x59c74a(0x195)]&&console[_0x59c74a(0x24c)](_0x181a74);throw _0x181a74;}if(_0x5b8e78['json']||_0x5b8e78[_0x59c74a(0x2b1)]){const _0x4a4129=this['buildTimelineData'](_0x18cd4a,_0xb33159);await handleSDKOutput([_0x4a4129],_0x5b8e78);return;}const _0x1d89d9=_0x150863['context'][_0x59c74a(0x26f)],_0x22916c=this[_0x59c74a(0x2e9)](_0x18cd4a,_0xb33159,_0x1d89d9);console[_0x59c74a(0x295)](_0x22916c);}async[a51_0x467f12(0x32c)](_0x9a09da,_0x16ad16){const _0x422ba3=a51_0x467f12,{tdx:_0x5cbb80}=_0x9a09da,_0x530565=TIMELINE_CONFIG[_0x422ba3(0x314)],_0xdfabfc=TIMELINE_CONFIG[_0x422ba3(0x1c1)];let _0x568f47=0x0;while(_0x568f47<_0xdfabfc){process[_0x422ba3(0x1b5)][_0x422ba3(0x24d)]&&process[_0x422ba3(0x1b5)][_0x422ba3(0x224)]('\x1bc');let _0x13fcb8,_0x48d00b;try{[_0x13fcb8,_0x48d00b]=await Promise[_0x422ba3(0x1f3)]([_0x5cbb80[_0x422ba3(0x201)]['attempt'](_0x16ad16),_0x5cbb80[_0x422ba3(0x201)]['tasks'](_0x16ad16,![])]);}catch(_0x5d4553){console['error'](a51_0x221e70[_0x422ba3(0x1d8)](_0x422ba3(0x198)));_0x568f47>0x0&&console[_0x422ba3(0x24c)](a51_0x221e70[_0x422ba3(0x2b3)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x568f47));throw _0x5d4553;}const _0x48ae06=_0x5cbb80[_0x422ba3(0x2b9)][_0x422ba3(0x26f)],_0x348690=this[_0x422ba3(0x2e9)](_0x13fcb8,_0x48d00b,_0x48ae06);console[_0x422ba3(0x295)](_0x348690);const _0x364d63=_0x13fcb8[_0x422ba3(0x254)]&&_0x48d00b['every'](_0xc78db4=>_0xc78db4[_0x422ba3(0x1dc)]!==_0x422ba3(0x23d)&&_0xc78db4[_0x422ba3(0x1dc)]!==_0x422ba3(0x26b));if(_0x364d63){console[_0x422ba3(0x24c)](a51_0x221e70[_0x422ba3(0x25a)](_0x422ba3(0x265)));break;}console[_0x422ba3(0x24c)](a51_0x221e70[_0x422ba3(0x2b3)](_0x422ba3(0x1dd)+_0x568f47*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x46f890=>setTimeout(_0x46f890,_0x530565)),_0x568f47++;}_0x568f47>=_0xdfabfc&&console[_0x422ba3(0x24c)](a51_0x221e70[_0x422ba3(0x296)](_0x422ba3(0x212)));}[a51_0x467f12(0x2e9)](_0x587cb2,_0x19687a,_0xdda74b){const _0xb56b00=a51_0x467f12,_0x35992a=[],_0x139fde=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x2660f6=0x5,_0x2a3414=process['stdout'][_0xb56b00(0x1d5)]||0x78,_0x27e841=_0x2a3414-_0x139fde-_0x2660f6,_0x451566=Math['max'](TIMELINE_CONFIG[_0xb56b00(0x2ca)],Math[_0xb56b00(0x2d7)](_0x27e841,TIMELINE_CONFIG[_0xb56b00(0x2d2)])),_0x191861=new Date(_0x587cb2[_0xb56b00(0x1df)])['getTime'](),_0x2e216b=_0x587cb2[_0xb56b00(0x1e6)]?new Date(_0x587cb2[_0xb56b00(0x1e6)])[_0xb56b00(0x2ae)]():Date[_0xb56b00(0x1f8)](),_0x5e6840={'start':_0x191861,'end':_0x2e216b,'duration':_0x2e216b-_0x191861},_0x24f6e6=new Map(),_0x19c0f4=[];for(const _0x180644 of _0x19687a){if(_0x180644[_0xb56b00(0x1b2)]){const _0x403fa6=new Date(_0x180644['startedAt'])[_0xb56b00(0x2ae)](),_0x464150=_0x180644['updatedAt']?new Date(_0x180644[_0xb56b00(0x2f1)])['getTime']():Date[_0xb56b00(0x1f8)](),_0x54c3f2={'start':_0x403fa6,'end':_0x464150,'duration':_0x464150-_0x403fa6};_0x24f6e6[_0xb56b00(0x2ff)](_0x180644['id'],_0x54c3f2),_0x19c0f4[_0xb56b00(0x30a)]({'name':_0x180644['fullName'],'state':_0x180644[_0xb56b00(0x1dc)]||_0xb56b00(0x28d),'window':_0x54c3f2});}else _0x19c0f4[_0xb56b00(0x30a)]({'name':_0x180644[_0xb56b00(0x251)],'state':_0x180644[_0xb56b00(0x1dc)]||_0xb56b00(0x26b),'window':undefined});}_0x19c0f4[_0xb56b00(0x241)]((_0x18032f,_0x235540)=>{const _0x554268=_0xb56b00;if(!_0x18032f[_0x554268(0x235)])return 0x1;if(!_0x235540[_0x554268(0x235)])return-0x1;return _0x18032f[_0x554268(0x235)][_0x554268(0x234)]-_0x235540['window'][_0x554268(0x234)];});const _0x2a4e38=_0x19c0f4[_0xb56b00(0x26e)],_0x2c3f69=_0x2a4e38>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x2c3f69&&_0x19c0f4[_0xb56b00(0x2e2)](TIMELINE_CONFIG[_0xb56b00(0x237)]);const _0x448e24=calculateTimeScale(_0x5e6840,_0x451566),_0x41694c=_0x587cb2['done']?_0x587cb2[_0xb56b00(0x194)]?a51_0x221e70[_0xb56b00(0x25a)](_0xb56b00(0x194)):a51_0x221e70[_0xb56b00(0x1d8)](_0xb56b00(0x24c)):a51_0x221e70[_0xb56b00(0x2af)](_0xb56b00(0x23d)),_0x3d6f19=_0x587cb2['project']?.['id'],_0x58dafb=_0x587cb2[_0xb56b00(0x1af)];let _0x1e3b2b;if(_0x3d6f19&&_0x58dafb){const _0x28aafe=getWorkflowAttemptUrl(_0xdda74b,_0x3d6f19,_0x58dafb,_0x587cb2['id']);_0x1e3b2b=hyperlink(a51_0x221e70[_0xb56b00(0x2b3)](_0x587cb2['id']),_0x28aafe);}else _0x1e3b2b=a51_0x221e70[_0xb56b00(0x2b3)](_0x587cb2['id']);_0x35992a['push'](_0xb56b00(0x1ae)+_0x1e3b2b+'\x20-\x20'+_0x41694c+'\x20-\x20'+formatElapsed(_0x5e6840['duration']));if(_0x19c0f4[_0xb56b00(0x26e)]>0x0){const _0xbdac33=renderTimeAxis(_0x448e24,_0x451566),_0xe8b1ed=new Date(_0x5e6840['start']),_0x12c29e=formatDate(_0xe8b1ed),_0x2a2154=TIMELINE_CONFIG[_0xb56b00(0x229)]+TIMELINE_CONFIG['ICON_SPACING']+_0x139fde,_0x55d9be=_0x12c29e[_0xb56b00(0x1e2)](_0x2a2154),_0x4c9d28=a51_0x221e70[_0xb56b00(0x2b3)](_0x55d9be);_0x35992a['push'](_0x4c9d28+'\x20'+_0xbdac33);for(const _0x5d6076 of _0x19c0f4){_0x35992a[_0xb56b00(0x30a)](renderTaskRow(_0x5d6076,_0x448e24,_0x451566,_0x139fde));}const _0x1fe7eb=calculateStats(_0x19c0f4);_0x35992a[_0xb56b00(0x30a)](formatStats(_0x1fe7eb)),_0x2c3f69&&_0x35992a['push'](a51_0x221e70['yellow']('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0xb56b00(0x237)]+_0xb56b00(0x1b6)+_0x2a4e38+'\x20tasks')),_0x35992a['push'](''),_0x35992a['push'](a51_0x221e70[_0xb56b00(0x2b3)](_0xb56b00(0x19d))+(_0xb56b00(0x32d)+_0x587cb2['id']+'\x20logs')+a51_0x221e70[_0xb56b00(0x2b3)](_0xb56b00(0x1bc)));}else _0x35992a[_0xb56b00(0x30a)](_0xb56b00(0x311));return _0x35992a['join']('\x0a');}[a51_0x467f12(0x1b9)](_0x75a849,_0x4e9349){const _0x5797d5=a51_0x467f12,_0x2b5d69=new Date(_0x75a849[_0x5797d5(0x1df)])[_0x5797d5(0x2ae)](),_0xdbdcf=_0x75a849['finishedAt']?new Date(_0x75a849[_0x5797d5(0x1e6)])['getTime']():Date[_0x5797d5(0x1f8)](),_0x3efc12=_0xdbdcf-_0x2b5d69,_0x2ca60c=[];for(const _0x33ef99 of _0x4e9349){if(_0x33ef99[_0x5797d5(0x1b2)]){const _0x9d50e0=new Date(_0x33ef99[_0x5797d5(0x1b2)])[_0x5797d5(0x2ae)](),_0x4a8c71=_0x33ef99['updatedAt']?new Date(_0x33ef99[_0x5797d5(0x2f1)])['getTime']():Date[_0x5797d5(0x1f8)]();_0x2ca60c['push']({'name':_0x33ef99[_0x5797d5(0x251)],'state':_0x33ef99['state']||'unknown','window':{'start':_0x9d50e0,'end':_0x4a8c71,'duration':_0x4a8c71-_0x9d50e0}});}else _0x2ca60c[_0x5797d5(0x30a)]({'name':_0x33ef99[_0x5797d5(0x251)],'state':_0x33ef99[_0x5797d5(0x1dc)]||'planned','window':undefined});}const _0x37fae2=calculateStats(_0x2ca60c);return{'attempt':{'id':_0x75a849['id'],'status':_0x75a849['done']?_0x75a849[_0x5797d5(0x194)]?_0x5797d5(0x194):'error':_0x5797d5(0x23d),'createdAt':_0x75a849[_0x5797d5(0x1df)],'finishedAt':_0x75a849[_0x5797d5(0x1e6)],'duration_ms':_0x3efc12},'tasks':_0x2ca60c[_0x5797d5(0x2b6)](_0x3d2b3d=>({'name':_0x3d2b3d[_0x5797d5(0x1db)],'state':_0x3d2b3d['state'],'startedAt':_0x3d2b3d[_0x5797d5(0x235)]?new Date(_0x3d2b3d[_0x5797d5(0x235)][_0x5797d5(0x234)])['toISOString']():null,'updatedAt':_0x3d2b3d['window']?new Date(_0x3d2b3d[_0x5797d5(0x235)][_0x5797d5(0x2a6)])[_0x5797d5(0x230)]():null,'duration_ms':_0x3d2b3d[_0x5797d5(0x235)]?.[_0x5797d5(0x1c5)]||null})),'stats':_0x37fae2};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ee971,_0x15a4ea){const _0x499c5e=a52_0x5795,_0x5d88a9=_0x2ee971();while(!![]){try{const _0x1c2fe1=-parseInt(_0x499c5e(0x134))/0x1*(parseInt(_0x499c5e(0x12c))/0x2)+-parseInt(_0x499c5e(0x133))/0x3*(parseInt(_0x499c5e(0x132))/0x4)+parseInt(_0x499c5e(0x12b))/0x5+-parseInt(_0x499c5e(0x12d))/0x6+-parseInt(_0x499c5e(0x129))/0x7*(parseInt(_0x499c5e(0x131))/0x8)+-parseInt(_0x499c5e(0x125))/0x9+parseInt(_0x499c5e(0x12f))/0xa;if(_0x1c2fe1===_0x15a4ea)break;else _0x5d88a9['push'](_0x5d88a9['shift']());}catch(_0x1450eb){_0x5d88a9['push'](_0x5d88a9['shift']());}}}(a52_0x4d82,0x6a58c));import{platform}from'os';function a52_0x4d82(){const _0x38e455=['entries','88maNJZS','9808ksAuqO','537VCXKQu','307WvBXiZ','tdx','6354180uqXRVW','Bearer\x20',';\x20node/','Authorization','20573cdgimW','TD1\x20','3455485LSWpco','2362awSKcx','1589292gDgpwE','length','15492050zJsgDB'];a52_0x4d82=function(){return _0x38e455;};return a52_0x4d82();}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x266aa4=a52_0x5795,_0x1ea4ba=getVersion(),_0x36eb3c=platform(),_0x318a7f=process['version']['replace']('v','');return'tdx/'+_0x1ea4ba+'\x20('+_0x36eb3c+_0x266aa4(0x127)+_0x318a7f+')';}function a52_0x5795(_0x33a3e7,_0x421bcd){_0x33a3e7=_0x33a3e7-0x125;const _0x4d8209=a52_0x4d82();let _0x579512=_0x4d8209[_0x33a3e7];return _0x579512;}export function getAuthHeaders(_0x26b551,_0x1f9682,_0x53835c){const _0x336038=a52_0x5795,_0x519fc6=getVersion(),_0x40fa46={'User-Agent':getUserAgent(),'X-TD-Client':_0x336038(0x135),'X-TD-Client-Version':_0x519fc6};if(_0x53835c)_0x40fa46[_0x336038(0x128)]=_0x336038(0x126)+_0x53835c;else _0x1f9682&&(_0x40fa46[_0x336038(0x128)]=_0x336038(0x12a)+_0x1f9682);return _0x40fa46;}export function toHeaderRecord(_0x196480){const _0x4b70c9=a52_0x5795,_0x1793c4={};for(const [_0x12ec0e,_0x383d8b]of Object[_0x4b70c9(0x130)](_0x196480)){_0x383d8b!==undefined&&(_0x1793c4[_0x12ec0e]=_0x383d8b);}return _0x1793c4;}export function getTrinoHeaders(_0x4f8ffb,_0x332535,_0x5cfb5e){const _0x189596=a52_0x5795,_0x1011d7=getAuthHeaders(_0x4f8ffb),_0x2abd11=toHeaderRecord(_0x1011d7);if(_0x5cfb5e)_0x2abd11[_0x189596(0x128)]=_0x189596(0x126)+_0x5cfb5e;else _0x332535&&(_0x2abd11['X-Trino-User']=_0x332535);return _0x2abd11;}export function hasAPIKey(_0x567ca4){const _0x1f05a4=a52_0x5795,_0x1e2147=getAPIKey();return _0x1e2147!==undefined&&_0x1e2147[_0x1f05a4(0x12e)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2b739d,_0x1fbffd){const _0x2d334d=a52_0x2f07,_0x55edf8=_0x2b739d();while(!![]){try{const _0x6514a4=-parseInt(_0x2d334d(0xed))/0x1*(-parseInt(_0x2d334d(0xdf))/0x2)+-parseInt(_0x2d334d(0xee))/0x3*(-parseInt(_0x2d334d(0xe1))/0x4)+parseInt(_0x2d334d(0xd7))/0x5*(parseInt(_0x2d334d(0xd2))/0x6)+-parseInt(_0x2d334d(0xfa))/0x7+parseInt(_0x2d334d(0xc5))/0x8*(parseInt(_0x2d334d(0xb3))/0x9)+parseInt(_0x2d334d(0xb4))/0xa*(parseInt(_0x2d334d(0xbc))/0xb)+-parseInt(_0x2d334d(0xc7))/0xc;if(_0x6514a4===_0x1fbffd)break;else _0x55edf8['push'](_0x55edf8['shift']());}catch(_0x263d2a){_0x55edf8['push'](_0x55edf8['shift']());}}}(a52_0x252f,0x62dcf));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a52_0x2f07(_0x3f6060,_0x12296e){_0x3f6060=_0x3f6060-0xb0;const _0x252f1b=a52_0x252f();let _0x2f0737=_0x252f1b[_0x3f6060];return _0x2f0737;}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a52_0x15dbad from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';function a52_0x252f(){const _0x57a3e3=['varchar','stdin','push','bold','4955314jCouYX','blue','slice','bigint','[error]','657bliCeH','5650AVOIAN','list','─┴─','keys','error','map','resolve','number','12177zdrPff','stderr','cmdout','length','params','filter','format','FINISHED','write','18056Aktsqx','data','1229724zsHXEn','log','[logs]','query','limit','close','sdk-result','double','table','repeat','tsv','69798oRMfEB','trim','forEach','color','output','45dLajoW','boolean','─┬─','yellow','object','noColor','inherit','json','621106yRVAYs','padEnd','176fKjsPw','magenta','rule','pipe','split','[rule]','string','cyan','isTTY','limitStructuredFormats','spawn','-FXRSn','1jkmisQ','672wqILBo','stdout','stringify','max','Results\x20saved\x20to\x20','entries','jsonl','debug'];a52_0x252f=function(){return _0x57a3e3;};return a52_0x252f();}export function isStructuredFormat(_0x9dc69b){const _0x41cf0d=a52_0x2f07;return _0x9dc69b[_0x41cf0d(0xc2)]==='json'||_0x9dc69b[_0x41cf0d(0xc2)]===_0x41cf0d(0xf4)||_0x9dc69b[_0x41cf0d(0xc2)]===_0x41cf0d(0xd1)||_0x9dc69b[_0x41cf0d(0xc2)]===_0x41cf0d(0xcf)||_0x9dc69b[_0x41cf0d(0xde)]===!![]||_0x9dc69b['jsonl']===!![]||_0x9dc69b[_0x41cf0d(0xd1)]===!![]||_0x9dc69b[_0x41cf0d(0xcf)]===!![];}export function parseOutputOptions(_0x42dccf){const _0x1f3bf8=a52_0x2f07;return{'format':_0x42dccf[_0x1f3bf8(0xc2)]||_0x1f3bf8(0xcf),'output':_0x42dccf[_0x1f3bf8(0xd6)]||'','limit':_0x42dccf[_0x1f3bf8(0xcb)],'limitStructuredFormats':_0x42dccf[_0x1f3bf8(0xea)],'color':_0x42dccf['color'],'noColor':_0x42dccf[_0x1f3bf8(0xdc)]};}function convertSDKResultToQueryResult(_0x126457){const _0x489544=a52_0x2f07,_0x21ff0f=[];if(_0x126457[_0x489544(0xbf)]>0x0){const _0x1553d4=_0x126457[0x0];for(const [_0xff5df9,_0x19de34]of Object[_0x489544(0xf3)](_0x1553d4)){let _0x23c138=_0x489544(0xf6);if(typeof _0x19de34===_0x489544(0xbb))_0x23c138=Number['isInteger'](_0x19de34)?_0x489544(0xb1):_0x489544(0xce);else{if(typeof _0x19de34===_0x489544(0xd8))_0x23c138=_0x489544(0xd8);else _0x19de34===null&&(_0x23c138='varchar');}_0x21ff0f[_0x489544(0xf8)]({'name':_0xff5df9,'type':_0x23c138});}}return{'queryId':_0x489544(0xcd),'columns':_0x21ff0f,'data':_0x126457,'stats':{'state':_0x489544(0xc3),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x126457[_0x489544(0xbf)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2fc747,_0x1c8a6a){const _0x35f489=convertSDKResultToQueryResult(_0x2fc747);return formatQueryOutput(_0x35f489,_0x1c8a6a);}export async function formatQueryOutput(_0x595cd9,_0x51ce0b){const _0x54654e=a52_0x2f07,{format:_0xbabea6,limit:_0x575f78,output:_0x4d3011,color:_0x1f8b05,noColor:_0x3659ba,limitStructuredFormats:_0x4dceef}=_0x51ce0b,_0x2fee9c=Boolean(_0x4d3011)&&!_0x1f8b05,_0x5ef2a2={'color':_0x1f8b05,'noColor':_0x3659ba||_0x2fee9c};if(_0xbabea6===_0x54654e(0xcf)){const _0x11f8f4=shouldUseLess(_0xbabea6,_0x4d3011);return formatAsTable(_0x595cd9,_0x575f78,_0x11f8f4,_0x5ef2a2);}const _0x9dd225=_0x4dceef&&Number['isFinite'](_0x575f78)&&_0x595cd9['data'][_0x54654e(0xbf)]>_0x575f78?{..._0x595cd9,'data':_0x595cd9[_0x54654e(0xc6)][_0x54654e(0xb0)](0x0,_0x575f78)}:_0x595cd9;if(_0xbabea6===_0x54654e(0xde))return formatAsJSON(_0x9dd225,_0x5ef2a2);else return _0xbabea6==='jsonl'?formatAsJSONL(_0x9dd225,_0x5ef2a2):formatQueryResult(_0x9dd225,_0xbabea6);}function shouldUseLess(_0x4e79fa,_0x1f992a){const _0xac74bb=a52_0x2f07;return(_0x4e79fa===_0xac74bb(0xcf)||_0x4e79fa===_0xac74bb(0xb5))&&process[_0xac74bb(0xef)][_0xac74bb(0xe9)]&&!_0x1f992a;}export function resolveOutputOptions(_0x298825){const _0x12e833=a52_0x2f07,_0x59f2c8=_0x298825[_0x12e833(0xd6)]||'',_0x54748a=resolveOutputFormat(_0x298825[_0x12e833(0xc2)],_0x59f2c8,'table');let _0x415dad=typeof _0x298825[_0x12e833(0xcb)]===_0x12e833(0xbb)?_0x298825[_0x12e833(0xcb)]:parseInt(_0x298825['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x298825[_0x12e833(0xcb)]===undefined&&shouldUseLess(_0x54748a,_0x59f2c8)&&(_0x415dad=Infinity),{'format':_0x54748a,'output':_0x59f2c8,'limit':_0x415dad,'limitStructuredFormats':_0x298825[_0x12e833(0xea)],'color':_0x298825[_0x12e833(0xd5)],'noColor':_0x298825['noColor']};}export function writeOutput(_0x482fd6,_0x36a97f,_0x9342cd){const _0x2637b4=a52_0x2f07;return _0x36a97f?(writeFileSync(_0x36a97f,_0x482fd6),console[_0x2637b4(0xb8)](_0x2637b4(0xf2)+_0x36a97f),Promise['resolve']()):shouldUseLess(_0x9342cd||'','')?new Promise(_0x1463cc=>{const _0x3ced90=_0x2637b4,_0x1a79cf=spawn('less',[_0x3ced90(0xec)],{'stdio':[_0x3ced90(0xe4),_0x3ced90(0xdd),_0x3ced90(0xdd)]});let _0x303e33=![];_0x1a79cf['on']('error',()=>{!_0x303e33&&(_0x303e33=!![],console['log'](_0x482fd6),_0x1463cc());}),_0x1a79cf['on'](_0x3ced90(0xcc),()=>{!_0x303e33&&(_0x303e33=!![],_0x1463cc());}),_0x1a79cf['on'](_0x3ced90(0xeb),()=>{const _0x37506e=_0x3ced90;!_0x303e33&&_0x1a79cf[_0x37506e(0xf7)]&&(_0x1a79cf[_0x37506e(0xf7)]['on']('error',()=>{}),_0x1a79cf[_0x37506e(0xf7)][_0x37506e(0xc4)](_0x482fd6),_0x1a79cf[_0x37506e(0xf7)]['end']());}),!_0x1a79cf[_0x3ced90(0xf7)]&&(!_0x303e33&&(_0x303e33=!![],console[_0x3ced90(0xc8)](_0x482fd6),_0x1463cc()));}):(console[_0x2637b4(0xc8)](_0x482fd6),Promise[_0x2637b4(0xba)]());}export async function handleSDKOutput(_0xf8fc0f,_0x47caa7){const _0x29d576=a52_0x2f07,_0x3a7f41=resolveOutputOptions(_0x47caa7),_0x3a1b9f=await formatSDKOutput(_0xf8fc0f,_0x3a7f41);await writeOutput(_0x3a1b9f,_0x3a7f41[_0x29d576(0xd6)]||undefined,_0x3a7f41[_0x29d576(0xc2)]);}export async function handleQueryOutput(_0x1bd5b5,_0xac178e){const _0x4c24dd=a52_0x2f07,_0x5c59f4=resolveOutputOptions(_0xac178e),_0x4a8380=await formatQueryOutput(_0x1bd5b5,_0x5c59f4);await writeOutput(_0x4a8380,_0x5c59f4[_0x4c24dd(0xd6)]||undefined,_0x5c59f4['format']);}async function formatSingleObject(_0x5918f5,_0x15b2e2){const _0x2af78a=a52_0x2f07,{format:_0xa5358c,color:_0xe275cb,noColor:_0x1ae9f2}=_0x15b2e2,_0x99a3a4={'color':_0xe275cb,'noColor':_0x1ae9f2};if(_0xa5358c==='json'){if(shouldUseColor(_0x99a3a4))return colorizeJSON(_0x5918f5,_0x99a3a4);return JSON[_0x2af78a(0xf0)](_0x5918f5,null,0x2);}else{if(_0xa5358c===_0x2af78a(0xf4)){if(shouldUseColor(_0x99a3a4))return colorizeJSONCompact(_0x5918f5,_0x99a3a4);return JSON[_0x2af78a(0xf0)](_0x5918f5);}else{if(_0xa5358c==='tsv')return Object[_0x2af78a(0xf3)](_0x5918f5)[_0x2af78a(0xb9)](([_0x4156fd,_0x5e7535])=>_0x4156fd+'\x09'+_0x5e7535)['join']('\x0a');else{const _0x53617d=Object[_0x2af78a(0xf3)](_0x5918f5);if(_0x53617d[_0x2af78a(0xbf)]===0x0)return'No\x20data';const _0x2bdeac=_0x5918f5['debug'],_0x54b520=_0x5918f5[_0x2af78a(0xca)],_0x338993=_0x5918f5[_0x2af78a(0xc0)],_0x854f3a=_0x5918f5[_0x2af78a(0xe3)],_0x1d4a37=_0x54b520?typeof _0x54b520===_0x2af78a(0xe7)?_0x54b520:JSON['stringify'](_0x54b520,null,0x2):undefined,_0x4d9b0c=_0x338993&&Object[_0x2af78a(0xb7)](_0x338993)[_0x2af78a(0xbf)]>0x0?JSON[_0x2af78a(0xf0)](_0x338993,null,0x2):undefined,_0x1e6e13=_0x854f3a&&Object['keys'](_0x854f3a)['length']>0x0?JSON[_0x2af78a(0xf0)](_0x854f3a,null,0x2):undefined,_0xe178ac=_0x53617d[_0x2af78a(0xc1)](([_0x5b0c08])=>_0x5b0c08!==_0x2af78a(0xf5)&&_0x5b0c08!=='query'&&_0x5b0c08!=='params'&&_0x5b0c08!==_0x2af78a(0xe3)),_0x33a252=Math[_0x2af78a(0xf1)](..._0xe178ac[_0x2af78a(0xb9)](([_0x94fda6])=>_0x94fda6[_0x2af78a(0xbf)])),_0x51d874=Math['max'](..._0xe178ac[_0x2af78a(0xb9)](([,_0x31dab5])=>{const _0x5cb738=_0x2af78a;try{const _0x263a97=_0x31dab5===null||_0x31dab5===undefined?'':typeof _0x31dab5==='object'?JSON['stringify'](_0x31dab5):String(_0x31dab5),_0x45e8ed=_0x263a97[_0x5cb738(0xe5)]('\x0a');return Math[_0x5cb738(0xf1)](..._0x45e8ed[_0x5cb738(0xb9)](_0x418605=>_0x418605[_0x5cb738(0xbf)]),0x0);}catch{return 0x0;}}),0x14),_0x5cbc29=[];_0x5cbc29[_0x2af78a(0xf8)](colorBorder('┌─'+'─'[_0x2af78a(0xd0)](_0x33a252)+_0x2af78a(0xd9)+'─'[_0x2af78a(0xd0)](_0x51d874)+'─┐',_0x99a3a4)),_0xe178ac[_0x2af78a(0xd4)](([_0xa9e00f,_0x5e011f])=>{const _0x20781d=_0x2af78a;let _0x3bbe66;try{_0x3bbe66=_0x5e011f===null||_0x5e011f===undefined?'':typeof _0x5e011f===_0x20781d(0xdb)?JSON[_0x20781d(0xf0)](_0x5e011f):String(_0x5e011f);}catch{_0x3bbe66='[Object]';}const _0x22a5d8=_0xa9e00f[_0x20781d(0xe0)](_0x33a252),_0x1259a6=_0x3bbe66[_0x20781d(0xe5)]('\x0a');_0x1259a6['forEach']((_0x394abf,_0x58ce28)=>{const _0x3ef456=_0x20781d,_0x4d6f15=colorBorder('│',_0x99a3a4);_0x58ce28===0x0?_0x5cbc29[_0x3ef456(0xf8)](_0x4d6f15+'\x20'+_0x22a5d8+'\x20'+_0x4d6f15+'\x20'+_0x394abf[_0x3ef456(0xe0)](_0x51d874)+'\x20'+_0x4d6f15):_0x5cbc29[_0x3ef456(0xf8)](_0x4d6f15+'\x20'+'\x20'[_0x3ef456(0xd0)](_0x33a252)+'\x20'+_0x4d6f15+'\x20'+_0x394abf['padEnd'](_0x51d874)+'\x20'+_0x4d6f15);});}),_0x5cbc29[_0x2af78a(0xf8)](colorBorder('└─'+'─'[_0x2af78a(0xd0)](_0x33a252)+_0x2af78a(0xb6)+'─'['repeat'](_0x51d874)+'─┘',_0x99a3a4));_0x1d4a37&&(_0x5cbc29['push'](''),_0x5cbc29[_0x2af78a(0xf8)](String(a52_0x15dbad[_0x2af78a(0xda)][_0x2af78a(0xf9)]('[query]'))),_0x5cbc29[_0x2af78a(0xf8)](_0x1d4a37));_0x4d9b0c&&(_0x5cbc29['push'](''),_0x5cbc29['push'](String(a52_0x15dbad[_0x2af78a(0xfb)][_0x2af78a(0xf9)]('[params]'))),_0x5cbc29[_0x2af78a(0xf8)](_0x4d9b0c));_0x1e6e13&&(_0x5cbc29[_0x2af78a(0xf8)](''),_0x5cbc29[_0x2af78a(0xf8)](String(a52_0x15dbad[_0x2af78a(0xe2)]['bold'](_0x2af78a(0xe6)))),_0x5cbc29[_0x2af78a(0xf8)](_0x1e6e13));if(_0x2bdeac){if(_0x2bdeac[_0x2af78a(0xbd)]){_0x5cbc29[_0x2af78a(0xf8)](''),_0x5cbc29[_0x2af78a(0xf8)](String(a52_0x15dbad['red'][_0x2af78a(0xf9)](_0x2af78a(0xb2))));const _0x105b02=_0x2bdeac[_0x2af78a(0xbd)][_0x2af78a(0xe5)]('\x0a');_0x105b02[_0x2af78a(0xd4)](_0x43735d=>{const _0x481532=_0x2af78a;_0x43735d[_0x481532(0xd3)]()&&_0x5cbc29[_0x481532(0xf8)](_0x43735d);});}if(_0x2bdeac[_0x2af78a(0xbe)]){_0x5cbc29['push'](''),_0x5cbc29[_0x2af78a(0xf8)](String(a52_0x15dbad[_0x2af78a(0xe8)][_0x2af78a(0xf9)](_0x2af78a(0xc9))));const _0x3c33ce=_0x2bdeac[_0x2af78a(0xbe)]['split']('\x0a');_0x3c33ce[_0x2af78a(0xd4)](_0x32bf7b=>{const _0x5ee316=_0x2af78a;_0x32bf7b[_0x5ee316(0xd3)]()&&_0x5cbc29[_0x5ee316(0xf8)](_0x32bf7b);});}}return _0x5cbc29['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x214e10,_0x2c899b){const _0x269239=a52_0x2f07;if(_0x2c899b['format']===_0x269239(0xcf)){await handleSDKOutput([_0x214e10],_0x2c899b);return;}const _0x42da3e=resolveOutputOptions(_0x2c899b),_0x584055=await formatSingleObject(_0x214e10,_0x42da3e);await writeOutput(_0x584055,_0x42da3e[_0x269239(0xd6)]||undefined,_0x42da3e[_0x269239(0xc2)]);}
|
|
1
|
+
(function(_0x3af5a2,_0x4107f0){const _0x5342fc=a53_0x42f9,_0xe3757e=_0x3af5a2();while(!![]){try{const _0x3127c2=-parseInt(_0x5342fc(0x1e1))/0x1+-parseInt(_0x5342fc(0x1e3))/0x2*(-parseInt(_0x5342fc(0x1f1))/0x3)+-parseInt(_0x5342fc(0x1f3))/0x4+parseInt(_0x5342fc(0x1d4))/0x5+-parseInt(_0x5342fc(0x21a))/0x6+parseInt(_0x5342fc(0x207))/0x7*(parseInt(_0x5342fc(0x20e))/0x8)+parseInt(_0x5342fc(0x1df))/0x9;if(_0x3127c2===_0x4107f0)break;else _0xe3757e['push'](_0xe3757e['shift']());}catch(_0x28dda9){_0xe3757e['push'](_0xe3757e['shift']());}}}(a53_0x4a1f,0x65ac1));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_0x1d096b from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x59291f){const _0x43e48d=a53_0x42f9;return _0x59291f[_0x43e48d(0x1ee)]===_0x43e48d(0x1e2)||_0x59291f['format']===_0x43e48d(0x203)||_0x59291f[_0x43e48d(0x1ee)]===_0x43e48d(0x202)||_0x59291f['format']===_0x43e48d(0x1e8)||_0x59291f[_0x43e48d(0x1e2)]===!![]||_0x59291f[_0x43e48d(0x203)]===!![]||_0x59291f[_0x43e48d(0x202)]===!![]||_0x59291f[_0x43e48d(0x1e8)]===!![];}export function parseOutputOptions(_0x25298c){const _0xb4b0ff=a53_0x42f9;return{'format':_0x25298c[_0xb4b0ff(0x1ee)]||'table','output':_0x25298c[_0xb4b0ff(0x211)]||'','limit':_0x25298c[_0xb4b0ff(0x217)],'limitStructuredFormats':_0x25298c['limitStructuredFormats'],'color':_0x25298c[_0xb4b0ff(0x1e0)],'noColor':_0x25298c[_0xb4b0ff(0x1db)]};}function convertSDKResultToQueryResult(_0x421b2d){const _0xa0a1ae=a53_0x42f9,_0x4d1f5e=[];if(_0x421b2d[_0xa0a1ae(0x1f4)]>0x0){const _0x34c5f7=_0x421b2d[0x0];for(const [_0x5e243,_0x4b64bf]of Object[_0xa0a1ae(0x1fb)](_0x34c5f7)){let _0x1fbccf=_0xa0a1ae(0x1dc);if(typeof _0x4b64bf===_0xa0a1ae(0x1fc))_0x1fbccf=Number[_0xa0a1ae(0x209)](_0x4b64bf)?_0xa0a1ae(0x1d7):_0xa0a1ae(0x1ef);else{if(typeof _0x4b64bf===_0xa0a1ae(0x20b))_0x1fbccf='boolean';else _0x4b64bf===null&&(_0x1fbccf=_0xa0a1ae(0x1dc));}_0x4d1f5e[_0xa0a1ae(0x20a)]({'name':_0x5e243,'type':_0x1fbccf});}}return{'queryId':_0xa0a1ae(0x206),'columns':_0x4d1f5e,'data':_0x421b2d,'stats':{'state':_0xa0a1ae(0x210),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x421b2d[_0xa0a1ae(0x1f4)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x24f325,_0x49b490){const _0x823292=convertSDKResultToQueryResult(_0x24f325);return formatQueryOutput(_0x823292,_0x49b490);}export async function formatQueryOutput(_0xf917bd,_0x141a19){const _0x311c83=a53_0x42f9,{format:_0x104ffd,limit:_0x4cacc3,output:_0x4206e5,color:_0x23a322,noColor:_0x449b04,limitStructuredFormats:_0x2c945b}=_0x141a19,_0x5909c5=Boolean(_0x4206e5)&&!_0x23a322,_0x51f1df={'color':_0x23a322,'noColor':_0x449b04||_0x5909c5};if(_0x104ffd===_0x311c83(0x1e8)){const _0x2c642b=shouldUseLess(_0x104ffd,_0x4206e5);return formatAsTable(_0xf917bd,_0x4cacc3,_0x2c642b,_0x51f1df);}const _0x2b8eb8=_0x2c945b&&Number['isFinite'](_0x4cacc3)&&_0xf917bd['data'][_0x311c83(0x1f4)]>_0x4cacc3?{..._0xf917bd,'data':_0xf917bd['data'][_0x311c83(0x20f)](0x0,_0x4cacc3)}:_0xf917bd;if(_0x104ffd===_0x311c83(0x1e2))return formatAsJSON(_0x2b8eb8,_0x51f1df);else return _0x104ffd==='jsonl'?formatAsJSONL(_0x2b8eb8,_0x51f1df):formatQueryResult(_0x2b8eb8,_0x104ffd);}function a53_0x42f9(_0x131c87,_0x7f51fd){_0x131c87=_0x131c87-0x1d4;const _0x4a1f24=a53_0x4a1f();let _0x42f99f=_0x4a1f24[_0x131c87];return _0x42f99f;}function shouldUseLess(_0x3df2e6,_0x139f35){const _0x24dd27=a53_0x42f9;return(_0x3df2e6==='table'||_0x3df2e6===_0x24dd27(0x1da))&&process['stdout']['isTTY']&&!_0x139f35;}export function resolveOutputOptions(_0x40726e){const _0xccb4f9=a53_0x42f9,_0x22c0fb=_0x40726e[_0xccb4f9(0x211)]||'',_0x5777f3=resolveOutputFormat(_0x40726e[_0xccb4f9(0x1ee)],_0x22c0fb,_0xccb4f9(0x1e8));let _0x52db82=typeof _0x40726e[_0xccb4f9(0x217)]===_0xccb4f9(0x1fc)?_0x40726e[_0xccb4f9(0x217)]:parseInt(_0x40726e[_0xccb4f9(0x217)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x40726e[_0xccb4f9(0x217)]===undefined&&shouldUseLess(_0x5777f3,_0x22c0fb)&&(_0x52db82=Infinity),{'format':_0x5777f3,'output':_0x22c0fb,'limit':_0x52db82,'limitStructuredFormats':_0x40726e[_0xccb4f9(0x208)],'color':_0x40726e[_0xccb4f9(0x1e0)],'noColor':_0x40726e[_0xccb4f9(0x1db)]};}export function writeOutput(_0x5315e2,_0x242870,_0x5dcb6b){const _0x530b29=a53_0x42f9;return _0x242870?(writeFileSync(_0x242870,_0x5315e2),console[_0x530b29(0x1ed)](_0x530b29(0x1f0)+_0x242870),Promise[_0x530b29(0x1e7)]()):shouldUseLess(_0x5dcb6b||'','')?new Promise(_0x5608ce=>{const _0x4d5636=_0x530b29,_0x4cdee4=spawn(_0x4d5636(0x214),[_0x4d5636(0x1e9)],{'stdio':[_0x4d5636(0x200),_0x4d5636(0x20c),'inherit']});let _0x15fca7=![];_0x4cdee4['on'](_0x4d5636(0x1ed),()=>{const _0x6430a6=_0x4d5636;!_0x15fca7&&(_0x15fca7=!![],console[_0x6430a6(0x1fd)](_0x5315e2),_0x5608ce());}),_0x4cdee4['on'](_0x4d5636(0x1fa),()=>{!_0x15fca7&&(_0x15fca7=!![],_0x5608ce());}),_0x4cdee4['on'](_0x4d5636(0x1f5),()=>{const _0x71aebf=_0x4d5636;!_0x15fca7&&_0x4cdee4[_0x71aebf(0x201)]&&(_0x4cdee4[_0x71aebf(0x201)]['on']('error',()=>{}),_0x4cdee4[_0x71aebf(0x201)]['write'](_0x5315e2),_0x4cdee4[_0x71aebf(0x201)][_0x71aebf(0x213)]());}),!_0x4cdee4['stdin']&&(!_0x15fca7&&(_0x15fca7=!![],console[_0x4d5636(0x1fd)](_0x5315e2),_0x5608ce()));}):(console[_0x530b29(0x1fd)](_0x5315e2),Promise[_0x530b29(0x1e7)]());}export async function handleSDKOutput(_0x27f18e,_0x5c3395){const _0x3b5a0a=a53_0x42f9,_0x143daf=resolveOutputOptions(_0x5c3395),_0x57fa03=await formatSDKOutput(_0x27f18e,_0x143daf);await writeOutput(_0x57fa03,_0x143daf[_0x3b5a0a(0x211)]||undefined,_0x143daf[_0x3b5a0a(0x1ee)]);}export async function handleQueryOutput(_0x3f503b,_0x17c4fb){const _0x3b2758=resolveOutputOptions(_0x17c4fb),_0x15345e=await formatQueryOutput(_0x3f503b,_0x3b2758);await writeOutput(_0x15345e,_0x3b2758['output']||undefined,_0x3b2758['format']);}async function formatSingleObject(_0x5a9cb4,_0x268978){const _0x196af2=a53_0x42f9,{format:_0x5d2569,color:_0x4fc953,noColor:_0x250333}=_0x268978,_0x55001f={'color':_0x4fc953,'noColor':_0x250333};if(_0x5d2569==='json'){if(shouldUseColor(_0x55001f))return colorizeJSON(_0x5a9cb4,_0x55001f);return JSON[_0x196af2(0x215)](_0x5a9cb4,null,0x2);}else{if(_0x5d2569===_0x196af2(0x203)){if(shouldUseColor(_0x55001f))return colorizeJSONCompact(_0x5a9cb4,_0x55001f);return JSON[_0x196af2(0x215)](_0x5a9cb4);}else{if(_0x5d2569===_0x196af2(0x202))return Object[_0x196af2(0x1fb)](_0x5a9cb4)[_0x196af2(0x204)](([_0x547873,_0x59b3f5])=>_0x547873+'\x09'+_0x59b3f5)['join']('\x0a');else{const _0x2e8c55=Object['entries'](_0x5a9cb4);if(_0x2e8c55[_0x196af2(0x1f4)]===0x0)return _0x196af2(0x1f9);const _0x12cc9c=_0x5a9cb4[_0x196af2(0x1e5)],_0x4b0e59=_0x5a9cb4[_0x196af2(0x218)],_0x992aad=_0x5a9cb4[_0x196af2(0x1d8)],_0x188cb8=_0x5a9cb4['rule'],_0x426776=_0x4b0e59?typeof _0x4b0e59==='string'?_0x4b0e59:JSON[_0x196af2(0x215)](_0x4b0e59,null,0x2):undefined,_0x57f4bd=_0x992aad&&Object['keys'](_0x992aad)[_0x196af2(0x1f4)]>0x0?JSON[_0x196af2(0x215)](_0x992aad,null,0x2):undefined,_0x5ac716=_0x188cb8&&Object[_0x196af2(0x1d9)](_0x188cb8)[_0x196af2(0x1f4)]>0x0?JSON[_0x196af2(0x215)](_0x188cb8,null,0x2):undefined,_0x457499=_0x2e8c55['filter'](([_0x48bba6])=>_0x48bba6!==_0x196af2(0x1e5)&&_0x48bba6!==_0x196af2(0x218)&&_0x48bba6!=='params'&&_0x48bba6!==_0x196af2(0x205)),_0x434788=Math[_0x196af2(0x1fe)](..._0x457499[_0x196af2(0x204)](([_0x20d7d0])=>_0x20d7d0['length'])),_0x50e8c1=Math[_0x196af2(0x1fe)](..._0x457499[_0x196af2(0x204)](([,_0x52aa6a])=>{const _0x26c008=_0x196af2;try{const _0x448309=_0x52aa6a===null||_0x52aa6a===undefined?'':typeof _0x52aa6a===_0x26c008(0x1dd)?JSON['stringify'](_0x52aa6a):String(_0x52aa6a),_0x44b90a=_0x448309[_0x26c008(0x1f6)]('\x0a');return Math[_0x26c008(0x1fe)](..._0x44b90a[_0x26c008(0x204)](_0x158145=>_0x158145[_0x26c008(0x1f4)]),0x0);}catch{return 0x0;}}),0x14),_0x4c8ba9=[];_0x4c8ba9[_0x196af2(0x20a)](colorBorder('┌─'+'─'[_0x196af2(0x1eb)](_0x434788)+_0x196af2(0x1ff)+'─'[_0x196af2(0x1eb)](_0x50e8c1)+'─┐',_0x55001f)),_0x457499[_0x196af2(0x1f8)](([_0x1079ce,_0x53a2c5])=>{const _0x188966=_0x196af2;let _0x5cb8c5;try{_0x5cb8c5=_0x53a2c5===null||_0x53a2c5===undefined?'':typeof _0x53a2c5===_0x188966(0x1dd)?JSON[_0x188966(0x215)](_0x53a2c5):String(_0x53a2c5);}catch{_0x5cb8c5='[Object]';}const _0x244a4b=_0x1079ce['padEnd'](_0x434788),_0x333f06=_0x5cb8c5[_0x188966(0x1f6)]('\x0a');_0x333f06[_0x188966(0x1f8)]((_0x22cd96,_0x3fcab7)=>{const _0x4096bb=_0x188966,_0x2ccaca=colorBorder('│',_0x55001f);_0x3fcab7===0x0?_0x4c8ba9[_0x4096bb(0x20a)](_0x2ccaca+'\x20'+_0x244a4b+'\x20'+_0x2ccaca+'\x20'+_0x22cd96['padEnd'](_0x50e8c1)+'\x20'+_0x2ccaca):_0x4c8ba9[_0x4096bb(0x20a)](_0x2ccaca+'\x20'+'\x20'[_0x4096bb(0x1eb)](_0x434788)+'\x20'+_0x2ccaca+'\x20'+_0x22cd96['padEnd'](_0x50e8c1)+'\x20'+_0x2ccaca);});}),_0x4c8ba9[_0x196af2(0x20a)](colorBorder('└─'+'─'[_0x196af2(0x1eb)](_0x434788)+_0x196af2(0x219)+'─'['repeat'](_0x50e8c1)+'─┘',_0x55001f));_0x426776&&(_0x4c8ba9[_0x196af2(0x20a)](''),_0x4c8ba9[_0x196af2(0x20a)](String(a53_0x1d096b['yellow'][_0x196af2(0x1f7)](_0x196af2(0x20d)))),_0x4c8ba9[_0x196af2(0x20a)](_0x426776));_0x57f4bd&&(_0x4c8ba9[_0x196af2(0x20a)](''),_0x4c8ba9['push'](String(a53_0x1d096b[_0x196af2(0x216)][_0x196af2(0x1f7)]('[params]'))),_0x4c8ba9[_0x196af2(0x20a)](_0x57f4bd));_0x5ac716&&(_0x4c8ba9[_0x196af2(0x20a)](''),_0x4c8ba9[_0x196af2(0x20a)](String(a53_0x1d096b[_0x196af2(0x1ec)][_0x196af2(0x1f7)](_0x196af2(0x1ea)))),_0x4c8ba9[_0x196af2(0x20a)](_0x5ac716));if(_0x12cc9c){if(_0x12cc9c[_0x196af2(0x1de)]){_0x4c8ba9[_0x196af2(0x20a)](''),_0x4c8ba9[_0x196af2(0x20a)](String(a53_0x1d096b['red'][_0x196af2(0x1f7)](_0x196af2(0x1d6))));const _0x3f5329=_0x12cc9c[_0x196af2(0x1de)][_0x196af2(0x1f6)]('\x0a');_0x3f5329[_0x196af2(0x1f8)](_0x4293bc=>{const _0x3bf971=_0x196af2;_0x4293bc[_0x3bf971(0x212)]()&&_0x4c8ba9[_0x3bf971(0x20a)](_0x4293bc);});}if(_0x12cc9c['cmdout']){_0x4c8ba9['push'](''),_0x4c8ba9[_0x196af2(0x20a)](String(a53_0x1d096b[_0x196af2(0x1e6)][_0x196af2(0x1f7)](_0x196af2(0x1e4))));const _0xa0ef66=_0x12cc9c[_0x196af2(0x1d5)][_0x196af2(0x1f6)]('\x0a');_0xa0ef66[_0x196af2(0x1f8)](_0x40873b=>{const _0x117891=_0x196af2;_0x40873b['trim']()&&_0x4c8ba9[_0x117891(0x20a)](_0x40873b);});}}return _0x4c8ba9[_0x196af2(0x1f2)]('\x0a');}}}}function a53_0x4a1f(){const _0x17c1fb=['No\x20data','close','entries','number','log','max','─┬─','pipe','stdin','tsv','jsonl','map','rule','sdk-result','7mprjXM','limitStructuredFormats','isInteger','push','boolean','inherit','[query]','2887928rkjoxj','slice','FINISHED','output','trim','end','less','stringify','blue','limit','query','─┴─','1512108jSakEk','2295130DEHyuU','cmdout','[error]','bigint','params','keys','list','noColor','varchar','object','stderr','5452668KcQozI','color','508692AGfjaK','json','54106NcBzGg','[logs]','debug','cyan','resolve','table','-FXRSn','[rule]','repeat','magenta','error','format','double','Results\x20saved\x20to\x20','48yHEACh','join','2726232YgTrKa','length','spawn','split','bold','forEach'];a53_0x4a1f=function(){return _0x17c1fb;};return a53_0x4a1f();}export async function handleSingleObjectOutput(_0x5b1ff1,_0x12a51b){const _0x316d3c=a53_0x42f9;if(_0x12a51b[_0x316d3c(0x1ee)]==='table'){await handleSDKOutput([_0x5b1ff1],_0x12a51b);return;}const _0x495d17=resolveOutputOptions(_0x12a51b),_0x283fcd=await formatSingleObject(_0x5b1ff1,_0x495d17);await writeOutput(_0x283fcd,_0x495d17[_0x316d3c(0x211)]||undefined,_0x495d17['format']);}
|