@treasuredata/tdx 0.16.3 → 0.16.5
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.d.ts.map +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-command.js.map +1 -1
- package/dist/commands/agent-test-command.d.ts +4 -0
- package/dist/commands/agent-test-command.d.ts.map +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/agent-test-command.js.map +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/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/describe.js +1 -1
- package/dist/commands/engage-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/llm-proxy.js +1 -1
- package/dist/commands/mcp-command.d.ts +3 -0
- 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/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/tables.js +1 -1
- package/dist/commands/unset-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.d.ts +7 -5
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/connection-cache.d.ts.map +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/connection-cache.js.map +1 -1
- package/dist/core/constants.d.ts +22 -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.js +1 -1
- package/dist/core/keychain.d.ts.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/keychain.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.d.ts.map +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/user-cache.js.map +1 -1
- package/dist/core/version.d.ts +2 -2
- 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/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.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.d.ts +2 -0
- package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/agent-yaml.js.map +1 -1
- package/dist/sdk/agent/test/evaluator.d.ts +3 -6
- package/dist/sdk/agent/test/evaluator.d.ts.map +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/evaluator.js.map +1 -1
- package/dist/sdk/agent/test/executor.d.ts +57 -1
- package/dist/sdk/agent/test/executor.d.ts.map +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/executor.js.map +1 -1
- package/dist/sdk/agent/test/index.d.ts +2 -2
- package/dist/sdk/agent/test/index.d.ts.map +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/index.js.map +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.d.ts.map +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/test/parser.js.map +1 -1
- package/dist/sdk/agent/test/types.d.ts +44 -0
- package/dist/sdk/agent/test/types.d.ts.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/claude-agent/claude-agent-client.js +1 -1
- package/dist/sdk/claude-agent/environment.js +1 -1
- package/dist/sdk/claude-agent/index.js +1 -1
- package/dist/sdk/claude-agent/system-prompts.js +1 -1
- package/dist/sdk/client/cdp-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.d.ts +6 -0
- package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js.map +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/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.d.ts.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/chat-cache.js.map +1 -1
- package/dist/sdk/llm/index.d.ts +11 -3
- package/dist/sdk/llm/index.d.ts.map +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/index.js.map +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.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-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-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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.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/llm.d.ts +39 -0
- package/dist/sdk/types/llm.d.ts.map +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/tree-formatter.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/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/global-cache.d.ts +88 -0
- package/dist/utils/global-cache.d.ts.map +1 -0
- package/dist/utils/global-cache.js +1 -0
- package/dist/utils/global-cache.js.map +1 -0
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.d.ts +48 -0
- package/dist/utils/local-cache.d.ts.map +1 -0
- package/dist/utils/local-cache.js +1 -0
- package/dist/utils/local-cache.js.map +1 -0
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.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/tdx-logger.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x448846=a41_0x141e;(function(_0xa10281,_0x1d701d){const _0x106aa7=a41_0x141e,_0x313f6d=_0xa10281();while(!![]){try{const _0x3e3a80=parseInt(_0x106aa7(0x199))/0x1*(parseInt(_0x106aa7(0x226))/0x2)+-parseInt(_0x106aa7(0x179))/0x3+-parseInt(_0x106aa7(0x1dc))/0x4+parseInt(_0x106aa7(0x1ef))/0x5*(-parseInt(_0x106aa7(0xc5))/0x6)+parseInt(_0x106aa7(0x1fd))/0x7*(-parseInt(_0x106aa7(0x126))/0x8)+parseInt(_0x106aa7(0x1cb))/0x9*(parseInt(_0x106aa7(0x215))/0xa)+parseInt(_0x106aa7(0xc6))/0xb*(parseInt(_0x106aa7(0x1a8))/0xc);if(_0x3e3a80===_0x1d701d)break;else _0x313f6d['push'](_0x313f6d['shift']());}catch(_0x4dee77){_0x313f6d['push'](_0x313f6d['shift']());}}}(a41_0x13e8,0x62f9d));import a41_0x402fbc from'chalk';import{existsSync}from'fs';import a41_0xf5d811 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}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 a41_0x131ac0 from'prompts';function getAttemptStatusDisplay(_0xee5bb){const _0x7a9c23=a41_0x141e;if(!_0xee5bb)return{'icon':'⏳','text':''};const {done:_0x42a066,success:_0xd62942,cancelRequested:_0x20b3b5}=_0xee5bb;if(!_0x42a066)return _0x20b3b5?{'icon':'🛑','text':a41_0x402fbc['yellow'](_0x7a9c23(0x9c))}:{'icon':'🔄','text':a41_0x402fbc[_0x7a9c23(0x15a)](_0x7a9c23(0x1eb))};if(_0xd62942)return{'icon':'✅','text':a41_0x402fbc[_0x7a9c23(0x142)](_0x7a9c23(0xbf))};return{'icon':'❌','text':a41_0x402fbc[_0x7a9c23(0x95)]('error')};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x3a4f8c,_0x2a24f9,_0x5aa623=0x0){const _0x3934d5=a41_0x141e;return _0x3a4f8c[_0x5aa623]||_0x2a24f9[_0x3934d5(0x1b9)];}[a41_0x448846(0x9b)](_0x5cfa5c,_0x2d6e37,_0x350013=0x0){const _0x4f595a=a41_0x448846,_0x53fc81=this[_0x4f595a(0x1f5)](_0x5cfa5c,_0x2d6e37,_0x350013);if(!_0x53fc81)return console['error'](a41_0x402fbc[_0x4f595a(0x95)](_0x4f595a(0x9a)),_0x4f595a(0x21c)),console[_0x4f595a(0x154)](a41_0x402fbc[_0x4f595a(0x16c)](_0x4f595a(0xf9))),null;return _0x53fc81;}[a41_0x448846(0xea)](_0x1bd7be,_0x2d1ac3){const _0x523510=a41_0x448846;if(_0x1bd7be[0x0]){const _0x2d27b0=_0x1bd7be[0x0][_0x523510(0x19b)]('.');if(_0x2d27b0[_0x523510(0x1c5)]===0x1)return{'projectName':_0x2d27b0[0x0],'workflowName':undefined};else return _0x2d27b0[_0x523510(0x1c5)]===0x2?{'projectName':_0x2d27b0[0x0],'workflowName':_0x2d27b0[0x1]}:(console['error'](a41_0x402fbc[_0x523510(0x95)](_0x523510(0x9a)),_0x523510(0x139)),null);}return{'projectName':_0x2d1ac3[_0x523510(0x1b9)],'workflowName':undefined};}[a41_0x448846(0x10c)](_0x174d90,_0x5c0dd1,_0x5945fa=0x0){const _0x1e4b4e=a41_0x448846;if(_0x174d90[_0x5945fa])return _0x174d90[_0x5945fa];if(_0x5c0dd1['workflowProject']){const _0x25962d=a41_0xf5d811[_0x1e4b4e(0xdb)](process[_0x1e4b4e(0x191)](),_0x1e4b4e(0xfb),_0x5c0dd1[_0x1e4b4e(0x1b9)]);if(existsSync(a41_0xf5d811[_0x1e4b4e(0xdb)](_0x25962d,'tdx.json')))return _0x25962d;}return undefined;}async[a41_0x448846(0x1c6)](_0x101447,_0x5bd1e1,_0x68dd0d){const _0x5e174d=a41_0x448846;try{const _0xc0ce43=await _0x101447[_0x5e174d(0x13f)][_0x5e174d(0xfb)](_0x5bd1e1,{'limit':0x1});if(_0xc0ce43[_0x5e174d(0x1c5)]>0x0){const _0x45ac79=_0xc0ce43[0x0]['id'],_0xe748f1=getWorkflowUrl(_0x68dd0d,_0x45ac79);console[_0x5e174d(0x154)]('\x20\x20Console:\x20'+a41_0x402fbc[_0x5e174d(0x18c)](_0xe748f1));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a41_0x448846(0xb1);['description']=a41_0x448846(0xd9);async[a41_0x448846(0x1f9)](_0x34f4a8){const _0x2df43a=a41_0x448846,{options:_0x2927af,args:_0x4eeb93,tdx:_0x71d278}=_0x34f4a8,_0x2408bd=_0x4eeb93[0x0],_0x18cce2=_0x2927af[_0x2df43a(0x1d1)];if(_0x18cce2)return saveSessionContext({'workflow_project':undefined},_0x2927af[_0x2df43a(0x1ff)]),console[_0x2df43a(0x12f)](a41_0x402fbc[_0x2df43a(0x142)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x2408bd)return console[_0x2df43a(0x154)](a41_0x402fbc[_0x2df43a(0x95)](_0x2df43a(0x9a)),_0x2df43a(0x21c)),console['error'](a41_0x402fbc[_0x2df43a(0x16c)](_0x2df43a(0x1fe))),console[_0x2df43a(0x154)](a41_0x402fbc[_0x2df43a(0x16c)](_0x2df43a(0x188))),0x1;const _0x1eb14d=await withSpinner(_0x2df43a(0xa1)+_0x2408bd+_0x2df43a(0x161),()=>_0x71d278['workflow'][_0x2df43a(0x144)](_0x2408bd),{'verbose':_0x2927af[_0x2df43a(0x138)]}),{name:_0x1de996}=_0x1eb14d[_0x2df43a(0x104)];return saveSessionContext({'workflow_project':_0x1de996},_0x2927af[_0x2df43a(0x1ff)]),console[_0x2df43a(0x12f)](a41_0x402fbc['green']('✔\x20Workflow\x20project\x20set\x20to:\x20'+a41_0x402fbc['cyan'](_0x1de996))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a41_0x448846(0x18a)]='workflow:projects';['description']=a41_0x448846(0x160);async['execute'](_0x5810b3){const _0x29aaf1=a41_0x448846,{options:_0x3bbb76,args:_0x4ba405,tdx:_0x5438c9}=_0x5810b3,_0x2c818f=_0x4ba405[0x0];_0x3bbb76['verbose']&&_0x2c818f&&console['error'](_0x29aaf1(0x1ad)+_0x2c818f);const _0x317ee6=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x5438c9[_0x29aaf1(0x13f)][_0x29aaf1(0x122)](_0x2c818f,{'limit':_0x3bbb76['limit']}),{'verbose':_0x3bbb76[_0x29aaf1(0x138)]});let _0x1ac37d=_0x317ee6[_0x29aaf1(0x104)];_0x1ac37d['sort']((_0x548851,_0x37d714)=>_0x548851[_0x29aaf1(0x18a)]['localeCompare'](_0x37d714['name']));const _0x2ef1c7=_0x3bbb76['limit']||0x64,_0x41fd63=_0x1ac37d[_0x29aaf1(0x1c5)]>=_0x2ef1c7?a41_0x402fbc[_0x29aaf1(0x16c)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x29aaf1(0x154)](_0x29aaf1(0x111)+_0x1ac37d[_0x29aaf1(0x1c5)]+_0x29aaf1(0xf4)+(_0x1ac37d[_0x29aaf1(0x1c5)]!==0x1?'s':'')+_0x41fd63);if(_0x3bbb76[_0x29aaf1(0x177)]==='json'||_0x3bbb76[_0x29aaf1(0x177)]===_0x29aaf1(0x168)||_0x3bbb76['format']===_0x29aaf1(0x221))await handleSDKOutput(_0x1ac37d,_0x3bbb76);else{if(_0x1ac37d[_0x29aaf1(0x1c5)]===0x0)_0x2c818f?console['log'](_0x29aaf1(0xab)+_0x2c818f):console[_0x29aaf1(0x12f)](_0x29aaf1(0x210));else{const _0x5900da=_0x1ac37d[_0x29aaf1(0x1bc)](_0x2cbc12=>{const _0x59345b=_0x29aaf1,_0x1c16eb=_0x2cbc12[_0x59345b(0x207)]?.[_0x59345b(0x189)](_0x283ecf=>_0x283ecf[_0x59345b(0x218)]==='sys'),_0x21f96b=_0x1c16eb?a41_0x402fbc[_0x59345b(0x16c)](_0x59345b(0xf8)):'';return _0x59345b(0xd3)+_0x2cbc12[_0x59345b(0x18a)]+_0x21f96b;});await writeOutput(_0x5900da[_0x29aaf1(0xdb)]('\x0a'),_0x3bbb76[_0x29aaf1(0xbb)],_0x29aaf1(0x1d8));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]='workflow:workflows';[a41_0x448846(0xd0)]=a41_0x448846(0xff);async['execute'](_0x5303d8){const _0x13cad6=a41_0x448846,{options:_0x31b178,args:_0x30a214,tdx:_0x55a6bd}=_0x5303d8,_0x4b08bd=this[_0x13cad6(0x1f5)](_0x30a214,_0x31b178);_0x31b178[_0x13cad6(0x138)]&&_0x4b08bd&&console[_0x13cad6(0x154)]('Project\x20filter:\x20'+_0x4b08bd);const _0x4e0455=await withSpinner(_0x13cad6(0x11d),()=>_0x55a6bd[_0x13cad6(0x13f)][_0x13cad6(0xfb)](_0x4b08bd,{'limit':_0x31b178['limit']}),{'verbose':_0x31b178[_0x13cad6(0x138)]});let _0x3fa504=_0x4e0455[_0x13cad6(0x104)];_0x3fa504['sort']((_0x3926c0,_0x4cc502)=>{const _0x1a349f=_0x13cad6,_0x338ecd=_0x3926c0[_0x1a349f(0x18a)][_0x1a349f(0x170)](_0x4cc502[_0x1a349f(0x18a)]);if(_0x338ecd!==0x0)return _0x338ecd;return(_0x3926c0[_0x1a349f(0x1b2)]?.[_0x1a349f(0x18a)]||'')['localeCompare'](_0x4cc502['project']?.[_0x1a349f(0x18a)]||'');});const _0x25f4a3=_0x31b178[_0x13cad6(0x222)]||0x64,_0x297e66=_0x3fa504[_0x13cad6(0x1c5)]>=_0x25f4a3?a41_0x402fbc['dim'](_0x13cad6(0x101)):'';console[_0x13cad6(0x154)](_0x13cad6(0x111)+_0x3fa504[_0x13cad6(0x1c5)]+_0x13cad6(0x10f)+(_0x3fa504[_0x13cad6(0x1c5)]!==0x1?'s':'')+_0x297e66);if(_0x31b178[_0x13cad6(0x177)]===_0x13cad6(0x143)||_0x31b178[_0x13cad6(0x177)]===_0x13cad6(0x168)||_0x31b178['format']===_0x13cad6(0x221))await handleSDKOutput(_0x3fa504,_0x31b178);else{if(_0x3fa504[_0x13cad6(0x1c5)]===0x0)_0x4b08bd?console[_0x13cad6(0x12f)](_0x13cad6(0x8e)+_0x4b08bd):console[_0x13cad6(0x12f)](_0x13cad6(0x1d7));else{const _0x3c7e17=_0x31b178[_0x13cad6(0x91)],_0x471a23=_0x3fa504['map'](_0x3c148a=>{const _0x5b42b3=_0x13cad6,_0x2d31f9=a41_0x402fbc[_0x5b42b3(0x16c)]('#'+_0x3c148a['id']),_0x482655=hyperlink(_0x2d31f9,getWorkflowUrl(_0x3c7e17,_0x3c148a['id'])),_0xa75a38=_0x3c148a[_0x5b42b3(0x1b2)]?.[_0x5b42b3(0x18a)]?a41_0x402fbc[_0x5b42b3(0x16c)]('\x20('+_0x3c148a[_0x5b42b3(0x1b2)][_0x5b42b3(0x18a)]+')'):'';return _0x5b42b3(0x22d)+_0x482655+'\x20'+_0x3c148a[_0x5b42b3(0x18a)]+_0xa75a38;});await writeOutput(_0x471a23[_0x13cad6(0xdb)]('\x0a'),_0x31b178[_0x13cad6(0xbb)],_0x13cad6(0x1d8));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0xa8);[a41_0x448846(0xd0)]=a41_0x448846(0xe0);async[a41_0x448846(0x1f9)](_0x3dd673){const _0x2a2369=a41_0x448846,{options:_0x20ccc8,args:_0xcef21f,tdx:_0x55610b}=_0x3dd673,_0x5edfe6=this[_0x2a2369(0xea)](_0xcef21f,_0x20ccc8);if(!_0x5edfe6)return 0x1;const {projectName:_0x20a104,workflowName:_0x4cbfc7}=_0x5edfe6;if(_0x20ccc8['verbose']){if(_0x20a104&&_0x4cbfc7)console[_0x2a2369(0x154)](_0x2a2369(0x12d)+_0x20a104+'.'+_0x4cbfc7);else _0x20a104&&console['error']('Filter:\x20project='+_0x20a104);const _0x43745d=_0x20ccc8[_0x2a2369(0xa9)];_0x43745d&&console[_0x2a2369(0x154)]('Status:\x20'+_0x43745d);}let _0x183bd3=0x28;if(process[_0x2a2369(0x163)][_0x2a2369(0x148)]&&!_0x20ccc8[_0x2a2369(0xbb)]&&!_0x20ccc8[_0x2a2369(0x177)]){const _0x2c4585=process[_0x2a2369(0x163)][_0x2a2369(0x1a5)]||0x28;_0x183bd3=Math[_0x2a2369(0x11f)](0x14,Math[_0x2a2369(0x123)](_0x2c4585*0x2/0x3));}const _0x4e8bd5=_0x20ccc8[_0x2a2369(0x222)]||_0x183bd3,_0x9d25b=await withSpinner(_0x2a2369(0xcd),()=>_0x55610b[_0x2a2369(0x13f)][_0x2a2369(0xb9)]({'projectName':_0x20a104,'workflowName':_0x4cbfc7,'status':_0x20ccc8[_0x2a2369(0xa9)],'fromTime':_0x20ccc8[_0x2a2369(0x220)],'toTime':_0x20ccc8['to'],'limit':_0x4e8bd5}),{'verbose':_0x20ccc8[_0x2a2369(0x138)]}),_0x1c77dd=_0x9d25b[_0x2a2369(0x104)];_0x1c77dd[_0x2a2369(0x205)]((_0x383361,_0x12ac9e)=>{const _0xbbaf3d=_0x2a2369,_0x1d7b61=_0x383361[_0xbbaf3d(0x1ce)]||'',_0x266b62=_0x12ac9e[_0xbbaf3d(0x1ce)]||'';return _0x266b62[_0xbbaf3d(0x170)](_0x1d7b61);});_0x1c77dd[_0x2a2369(0x1c5)]>=_0x4e8bd5?console[_0x2a2369(0x154)]('✔\x20Showing\x20'+_0x1c77dd[_0x2a2369(0x1c5)]+_0x2a2369(0xe9)+a41_0x402fbc['dim']('(use\x20--limit\x20to\x20see\x20more)')):console['error'](_0x2a2369(0x111)+_0x1c77dd[_0x2a2369(0x1c5)]+'\x20session'+(_0x1c77dd[_0x2a2369(0x1c5)]!==0x1?'s':''));if(_0x20ccc8[_0x2a2369(0x177)]==='json'||_0x20ccc8['format']==='jsonl'||_0x20ccc8[_0x2a2369(0x177)]===_0x2a2369(0x221))await handleSDKOutput(_0x1c77dd,_0x20ccc8);else{if(!process[_0x2a2369(0x163)][_0x2a2369(0x148)]||_0x20ccc8['output']){if(_0x1c77dd[_0x2a2369(0x1c5)]===0x0){if(_0x20a104&&_0x4cbfc7)console['log'](_0x2a2369(0x176)+_0x20a104+'.'+_0x4cbfc7);else _0x20a104?console[_0x2a2369(0x12f)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x20a104):console['log']('No\x20sessions\x20found');}else{const _0x2a37e3=_0x20ccc8[_0x2a2369(0x91)],_0x4c4b29=this[_0x2a2369(0xc1)](_0x1c77dd,_0x2a37e3);_0x20ccc8[_0x2a2369(0xbb)]?await writeOutput(_0x4c4b29,_0x20ccc8['output'],_0x2a2369(0x1d8)):console[_0x2a2369(0x12f)](_0x4c4b29);}!_0x20a104&&(console[_0x2a2369(0x154)](''),console[_0x2a2369(0x154)](a41_0x402fbc[_0x2a2369(0x16c)](_0x2a2369(0x223))),console['error'](a41_0x402fbc['dim'](_0x2a2369(0x225))+'or'+a41_0x402fbc[_0x2a2369(0x16c)](_0x2a2369(0x1aa))));}else{if(_0x1c77dd['length']===0x0){if(_0x20a104&&_0x4cbfc7)console[_0x2a2369(0x12f)](_0x2a2369(0x176)+_0x20a104+'.'+_0x4cbfc7);else _0x20a104?console[_0x2a2369(0x12f)](_0x2a2369(0x118)+_0x20a104):console[_0x2a2369(0x12f)]('No\x20sessions\x20found');}else await this[_0x2a2369(0xb4)](_0x1c77dd,_0x3dd673,_0x20a104);}}return 0x0;}[a41_0x448846(0xc1)](_0x2c0ba0,_0x2e0b41){const _0x3ee455=a41_0x448846,_0x351d73=[],_0x5b76bb=new Map();let _0x5c16d6=Infinity,_0xa60a01=-Infinity;for(const _0x467e30 of _0x2c0ba0){if(_0x467e30[_0x3ee455(0x190)]?.[_0x3ee455(0x97)]){const _0x5340ab=new Date(_0x467e30[_0x3ee455(0x190)][_0x3ee455(0x97)])['getTime'](),_0x5f3946=_0x467e30[_0x3ee455(0x190)][_0x3ee455(0xb7)]?new Date(_0x467e30[_0x3ee455(0x190)][_0x3ee455(0xb7)])['getTime']():Date['now'](),_0x4c9fa4=_0x467e30[_0x3ee455(0x1b2)]?.[_0x3ee455(0x18a)]||_0x3ee455(0x227);!_0x5b76bb[_0x3ee455(0x147)](_0x4c9fa4)&&_0x5b76bb['set'](_0x4c9fa4,[]),_0x5b76bb['get'](_0x4c9fa4)[_0x3ee455(0x194)]({'session':_0x467e30,'startTime':_0x5340ab,'endTime':_0x5f3946,'duration':_0x5f3946-_0x5340ab}),_0x5c16d6=Math[_0x3ee455(0x121)](_0x5c16d6,_0x5340ab),_0xa60a01=Math[_0x3ee455(0x11f)](_0xa60a01,_0x5f3946);}}if(_0x5b76bb[_0x3ee455(0x22e)]===0x0)return _0x3ee455(0x175);const _0x133b04=process['stdout']['columns']||0x78,_0x2885ff=0x1e,_0x4078d3=0x32,_0x288085=0x4,_0xc7e45a=Math['min'](_0x4078d3,Math[_0x3ee455(0x11f)](_0x2885ff,Math[_0x3ee455(0x123)](_0x133b04*0.3))),_0x1f30f6=_0x133b04-_0xc7e45a-TIMELINE_CONFIG[_0x3ee455(0xf0)]-0x3-_0x288085,_0x3396aa=_0xa60a01-_0x5c16d6,_0x2d1524=_0x3396aa/_0xc7e45a,_0x24c438=renderTimeAxis({'startTime':_0x5c16d6,'endTime':_0xa60a01,'durationMs':_0x3396aa,'msPerChar':_0x2d1524},_0xc7e45a),_0xedd448=[];for(const _0x1d6f3a of _0x5b76bb[_0x3ee455(0x202)]()){_0xedd448[_0x3ee455(0x194)](..._0x1d6f3a);}_0xedd448[_0x3ee455(0x205)]((_0x6ef863,_0x84e85d)=>_0x84e85d[_0x3ee455(0x151)]-_0x6ef863[_0x3ee455(0x151)]);const _0x23bb3b=new Date(_0x5c16d6),_0x2c36b2=formatDate(_0x23bb3b),_0x44ccca=_0x288085+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x3ee455(0xc9)]+_0x1f30f6,_0x16f345='\x20'[_0x3ee455(0xb3)](_0x44ccca-_0x2c36b2[_0x3ee455(0x1c5)]),_0x421ea0=_0x16f345+a41_0x402fbc[_0x3ee455(0x16c)](_0x2c36b2)+'\x20'+_0x24c438;_0x351d73['push'](_0x421ea0);const _0x50b51d=0x16;let _0x205302=0x0;for(const _0x1311fc of _0xedd448){const _0x22c0cb=_0x1311fc[_0x3ee455(0x1ff)][_0x3ee455(0x1b2)]?.[_0x3ee455(0x18a)]||'?',_0x1a4559=Math['min'](stringWidth(_0x22c0cb),_0x50b51d);_0x205302=Math[_0x3ee455(0x11f)](_0x205302,_0x1a4559);}for(const _0x43d0c2 of _0xedd448){const {session:_0x4eb0ee,startTime:_0x274867,endTime:_0x1e2a0a,duration:_0x2a32df}=_0x43d0c2,_0x8e8975=_0x4eb0ee[_0x3ee455(0x1b2)]?.['id'],_0x2cbd06=_0x4eb0ee['id'],_0x14e530=_0x4eb0ee[_0x3ee455(0x1b2)]?.['name']||'?',_0x4ec558=_0x4eb0ee['workflow']?.[_0x3ee455(0x18a)]||'?';let _0x5a37a7,_0x5e75d7;if(_0x4eb0ee[_0x3ee455(0x190)]){const _0x80888=_0x4eb0ee['lastAttempt'];!_0x80888[_0x3ee455(0x186)]?(_0x5a37a7=_0x80888[_0x3ee455(0x185)]?'🛑':'🔄',_0x5e75d7=_0x80888[_0x3ee455(0x185)]?a41_0x402fbc[_0x3ee455(0x1f6)]:a41_0x402fbc[_0x3ee455(0x15a)]):(_0x5a37a7=_0x80888['success']?'✅':'❌',_0x5e75d7=_0x80888[_0x3ee455(0xbf)]?a41_0x402fbc['green']:a41_0x402fbc[_0x3ee455(0x95)]);}else _0x5a37a7='⏳',_0x5e75d7=a41_0x402fbc[_0x3ee455(0x16c)];const _0x5d6bba='#'+_0x2cbd06,_0x41330c=_0x8e8975?hyperlink(_0x5d6bba,getWorkflowSessionUrl(_0x2e0b41,_0x8e8975,_0x2cbd06)):_0x5d6bba;let _0x760f2c=_0x14e530;stringWidth(_0x14e530)>_0x50b51d&&(_0x760f2c=_0x14e530[_0x3ee455(0x1ea)](0x0,_0x50b51d-0x1)+'…');const _0x2c9d32=a41_0x402fbc[_0x3ee455(0x16c)](_0x760f2c),_0x1f5fb4=stringWidth(_0x760f2c),_0x46c60b='\x20'[_0x3ee455(0xb3)](_0x205302-stringWidth(_0x760f2c)+0x2),_0x1b91ed='('+formatElapsed(_0x2a32df)+')',_0x5d301f=stringWidth(_0x1b91ed),_0x10ec51=stringWidth(_0x5d6bba),_0x798178=_0x10ec51+0x1+_0x1f5fb4+_0x46c60b[_0x3ee455(0x1c5)],_0x5a590d=_0x1f30f6-_0x798178-_0x5d301f-0x1-0x8;let _0x18aea4=_0x4ec558;stringWidth(_0x18aea4)>_0x5a590d&&(_0x18aea4=_0x18aea4['slice'](0x0,_0x5a590d-0x1)+'…');const _0x329310=_0x41330c+'\x20'+_0x2c9d32+_0x46c60b+_0x18aea4,_0x284b08=stringWidth(_0x329310),_0x5dda6c=_0x1f30f6-_0x284b08-_0x5d301f,_0x575f3c=_0x329310+'\x20'[_0x3ee455(0xb3)](Math[_0x3ee455(0x11f)](0x1,_0x5dda6c))+a41_0x402fbc[_0x3ee455(0x16c)](_0x1b91ed),_0x461f20=Math[_0x3ee455(0x123)]((_0x274867-_0x5c16d6)/_0x2d1524),_0x46f700=Math[_0x3ee455(0x123)]((_0x1e2a0a-_0x5c16d6)/_0x2d1524),_0x4233bb=Math[_0x3ee455(0x11f)](_0x461f20+0x1,_0x46f700),_0x54a008=new Array(_0xc7e45a)[_0x3ee455(0x15c)]('\x20');for(let _0x540671=_0x461f20;_0x540671<Math[_0x3ee455(0x121)](_0x4233bb,_0xc7e45a);_0x540671++){_0x54a008[_0x540671]='─';}const _0x413fe2=_0x54a008['map'](_0x6080c5=>_0x6080c5==='\x20'?'\x20':_0x5e75d7(_0x6080c5))[_0x3ee455(0xdb)]('');_0x351d73[_0x3ee455(0x194)](_0x5a37a7+'\x20'+_0x575f3c+'│'+_0x413fe2+'│');}return _0x351d73[_0x3ee455(0xdb)]('\x0a');}async[a41_0x448846(0xb4)](_0x1cfe7d,_0x3dbb6d,_0xe24907){const _0x336862=a41_0x448846,{options:_0x3d1002,tdx:_0x71a447}=_0x3dbb6d,_0x48e1f9=_0x3d1002[_0x336862(0x91)],{timelineRows:_0x2dddbf,timeAxisHeader:_0x28122d}=this[_0x336862(0x136)](_0x1cfe7d,_0x48e1f9),_0x3e9d0a=_0x2dddbf['filter'](_0xc0b944=>_0xc0b944[_0x336862(0xce)]);if(_0x3e9d0a[_0x336862(0x1c5)]===0x0){const _0x4b801a=this[_0x336862(0xc1)](_0x1cfe7d,_0x48e1f9);console[_0x336862(0x12f)](_0x4b801a);!_0xe24907&&(console['error'](''),console[_0x336862(0x154)](a41_0x402fbc[_0x336862(0x16c)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x336862(0x154)](a41_0x402fbc[_0x336862(0x16c)](_0x336862(0x225))+'or'+a41_0x402fbc[_0x336862(0x16c)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x28122d&&console[_0x336862(0x12f)](_0x28122d);const _0x58aab1=_0x2dddbf[_0x336862(0x183)](_0x2aa5fc=>_0x2aa5fc[_0x336862(0xce)])[_0x336862(0x1bc)](_0xb22f2e=>({'title':_0xb22f2e[_0x336862(0x1f3)],'value':_0xb22f2e[_0x336862(0xce)]})),_0x50ec32=process[_0x336862(0x163)][_0x336862(0x1a5)]||0x3c,_0x1c2373=Math['max'](0x28,Math[_0x336862(0x123)](_0x50ec32*0x2/0x3)),_0xcea6d4=await a41_0x131ac0({'type':_0x336862(0x1c7),'name':_0x336862(0xce),'message':_0x336862(0xc7),'choices':_0x58aab1,'initial':-0x1,'limit':_0x1c2373,'clearFirst':!![],'fallback':{'title':_0x336862(0x146),'value':null},'suggest':(_0x3590fc,_0x39ca78)=>{const _0x36c350=_0x336862;if(!_0x3590fc)return Promise[_0x36c350(0x1d5)](_0x39ca78);const _0xd32b3b=_0x39ca78[_0x36c350(0x183)](_0x532cfd=>{const _0x5d70ef=_0x36c350,_0x1ffd35=_0x532cfd;return _0x1ffd35[_0x5d70ef(0x22b)][_0x5d70ef(0x1d6)]()['includes'](_0x3590fc[_0x5d70ef(0x1d6)]());});return Promise[_0x36c350(0x1d5)](_0xd32b3b);}}),_0x475ed7=()=>{const _0x1b57df=_0x336862;process[_0x1b57df(0x163)][_0x1b57df(0x22a)](_0x1b57df(0x1d3)),process[_0x1b57df(0x163)][_0x1b57df(0x22a)]('\x1b[1A\x1b[2K'),process[_0x1b57df(0x163)][_0x1b57df(0x22a)]('\x1b[1A\x1b[2K');},_0x49d18c=_0xcea6d4&&_0xcea6d4[_0x336862(0xce)]&&_0xcea6d4['attemptId']!==null&&_0xcea6d4['attemptId']['trim']()!=='';if(!_0x49d18c){_0x475ed7(),console[_0x336862(0x12f)](a41_0x402fbc[_0x336862(0x16c)](_0x336862(0x165)));return;}_0x475ed7();const _0xdac7cd=_0x1cfe7d[_0x336862(0x16b)](_0x5a6068=>_0x5a6068[_0x336862(0x190)]?.['id']===_0xcea6d4[_0x336862(0xce)]);if(_0xdac7cd){const _0x46d84e=_0xdac7cd['project']?.[_0x336862(0x18a)]||'?',_0x26cbf7=_0xdac7cd[_0x336862(0x13f)]?.['name']||'?';console[_0x336862(0x12f)](_0x336862(0x108)+a41_0x402fbc['dim'](_0x46d84e)+_0x336862(0x1d9)+a41_0x402fbc[_0x336862(0x16c)](_0x26cbf7));}const _0x15dd50=new WorkflowTimelineCommand();await _0x15dd50['execute']({'args':[],'options':{..._0x3d1002,'attemptId':_0xcea6d4[_0x336862(0xce)]},'tdx':_0x71a447});}[a41_0x448846(0x136)](_0x1a018a,_0x3ae393){const _0x5ac66c=a41_0x448846,_0x2c677b=new Map();for(const _0x3f1f64 of _0x1a018a){_0x3f1f64['id']&&_0x3f1f64[_0x5ac66c(0x190)]?.['id']&&_0x2c677b['set'](_0x3f1f64['id'],_0x3f1f64[_0x5ac66c(0x190)]['id']);}const _0x4a72fe=[];let _0xe138a7='';const _0x2d02ad=this[_0x5ac66c(0xc1)](_0x1a018a,_0x3ae393),_0x5999b8=_0x2d02ad[_0x5ac66c(0x19b)]('\x0a');for(const _0x52ffd4 of _0x5999b8){if(_0x52ffd4['startsWith']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x52ffd4[_0x5ac66c(0x208)](/^\s+\d{4}-\d{2}-\d{2}/))_0xe138a7=_0x52ffd4;else{if(_0x52ffd4[_0x5ac66c(0x208)](/^[✅❌🔄🛑⏳]/)){const _0x4403c0=_0x52ffd4[_0x5ac66c(0x208)](/#(\d+)/),_0x2b5569=_0x4403c0?_0x4403c0[0x1]:null,_0x164bc9=_0x2b5569?_0x2c677b[_0x5ac66c(0x16d)](_0x2b5569)||null:null,_0x1274d4=_0x1a018a['find'](_0x1f7c2e=>_0x1f7c2e['id']===_0x2b5569),_0x4a0d88=_0x1274d4?.[_0x5ac66c(0x1b2)]?.['name']||'';_0x4a72fe[_0x5ac66c(0x194)]({'displayLine':_0x52ffd4,'attemptId':_0x164bc9,'projectName':_0x4a0d88});}}}return{'timelineRows':_0x4a72fe,'timeAxisHeader':_0xe138a7};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0x1bb);[a41_0x448846(0xd0)]=a41_0x448846(0x145);async[a41_0x448846(0x1f9)](_0x188577){const _0x1707bc=a41_0x448846,{options:_0x5a3444,args:_0x569f77,tdx:_0x1171ac}=_0x188577,_0x3d4ad8=this[_0x1707bc(0xea)](_0x569f77,_0x5a3444);if(!_0x3d4ad8)return 0x1;const {projectName:_0x577b9a,workflowName:_0x5306de}=_0x3d4ad8,_0x159bea=_0x5a3444['includeRetried'];if(_0x5a3444[_0x1707bc(0x138)]){if(_0x577b9a&&_0x5306de)console['error']('Filter:\x20'+_0x577b9a+'.'+_0x5306de);else _0x577b9a&&console[_0x1707bc(0x154)](_0x1707bc(0x1fa)+_0x577b9a);_0x159bea&&console[_0x1707bc(0x154)]('Include\x20retried:\x20yes');}const _0x1074d2=await withSpinner(_0x1707bc(0x20e),()=>_0x1171ac[_0x1707bc(0x13f)]['attempts']({'projectName':_0x577b9a,'workflowName':_0x5306de,'includeRetried':_0x159bea,'limit':_0x5a3444['limit']}),{'verbose':_0x5a3444['verbose']}),_0x45efcf=_0x1074d2[_0x1707bc(0x104)],_0x2859f2=_0x5a3444[_0x1707bc(0x222)]||0x64,_0x249f5f=_0x45efcf[_0x1707bc(0x1c5)]>=_0x2859f2?a41_0x402fbc[_0x1707bc(0x16c)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error']('✔\x20Found\x20'+_0x45efcf[_0x1707bc(0x1c5)]+'\x20attempt'+(_0x45efcf[_0x1707bc(0x1c5)]!==0x1?'s':'')+_0x249f5f);if(_0x5a3444[_0x1707bc(0x177)]===_0x1707bc(0x143)||_0x5a3444[_0x1707bc(0x177)]===_0x1707bc(0x168)||_0x5a3444[_0x1707bc(0x177)]===_0x1707bc(0x221))await handleSDKOutput(_0x45efcf,_0x5a3444);else{if(_0x45efcf[_0x1707bc(0x1c5)]===0x0){if(_0x577b9a&&_0x5306de)console[_0x1707bc(0x12f)](_0x1707bc(0xa6)+_0x577b9a+'.'+_0x5306de);else _0x577b9a?console[_0x1707bc(0x12f)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x577b9a):console[_0x1707bc(0x12f)]('No\x20attempts\x20found');}else{const _0x81932b=_0x5a3444[_0x1707bc(0x91)],_0x2a78d5=_0x45efcf[_0x1707bc(0x1bc)](_0x15e5d7=>{const _0x3567d6=_0x1707bc,_0x4b23fe=a41_0x402fbc[_0x3567d6(0x16c)]('#'+_0x15e5d7['id']),_0x36c322=_0x15e5d7['project']?.['id'],_0xdcac2e=_0x15e5d7[_0x3567d6(0xe1)]||_0x15e5d7[_0x3567d6(0x13b)],_0x4eaaef=_0x36c322&&_0xdcac2e?hyperlink(_0x4b23fe,getWorkflowAttemptUrl(_0x81932b,_0x36c322,_0xdcac2e,_0x15e5d7['id'])):_0x4b23fe,{icon:_0x54d303,text:_0x419c7b}=getAttemptStatusDisplay(_0x15e5d7),_0x4a699c=(_0x15e5d7[_0x3567d6(0x1b2)]?.[_0x3567d6(0x18a)]||'?')+'.'+(_0x15e5d7[_0x3567d6(0x13f)]?.[_0x3567d6(0x18a)]||'?'),_0x5151d2=_0x15e5d7[_0x3567d6(0x1ce)]?a41_0x402fbc[_0x3567d6(0x16c)](_0x15e5d7['sessionTime']):'';return(_0x4eaaef+'\x20'+_0x54d303+(_0x419c7b?'\x20'+_0x419c7b:'')+'\x20'+_0x4a699c+'\x20'+_0x5151d2)[_0x3567d6(0x18f)]();});await writeOutput(_0x2a78d5[_0x1707bc(0xdb)]('\x0a'),_0x5a3444[_0x1707bc(0xbb)],_0x1707bc(0x1d8));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a41_0x448846(0x1e5);[a41_0x448846(0xd0)]=a41_0x448846(0x1f0);async[a41_0x448846(0x1f9)](_0xbb38bc){const _0x29ec14=a41_0x448846,{options:_0x58cdae,args:_0x1b11fb,tdx:_0x283d00}=_0xbb38bc,_0x504c6a=_0x1b11fb[0x0];if(!_0x504c6a)return console[_0x29ec14(0x154)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x58cdae['verbose']&&console[_0x29ec14(0x154)]('Attempt\x20ID:\x20'+_0x504c6a);const _0x40051b=await withSpinner('Getting\x20attempt\x20details...',()=>_0x283d00[_0x29ec14(0x13f)]['attempt'](_0x504c6a),{'verbose':_0x58cdae[_0x29ec14(0x138)]}),_0x49389e=_0x40051b['data'];let _0xafb3e5;!_0x49389e['done']?_0xafb3e5=_0x49389e['cancelRequested']?_0x29ec14(0x9c):'running':_0xafb3e5=_0x49389e[_0x29ec14(0xbf)]?_0x29ec14(0xbf):'error';let _0x17be56;if(_0x49389e[_0x29ec14(0x97)]&&_0x49389e[_0x29ec14(0xb7)]){const _0x5d7786=new Date(_0x49389e[_0x29ec14(0x97)])['getTime'](),_0x2ed547=new Date(_0x49389e['finishedAt'])[_0x29ec14(0x1a9)]();_0x17be56=Math[_0x29ec14(0x1fc)]((_0x2ed547-_0x5d7786)/0x3e8);}const _0x2ac434={'attempt_id':_0x49389e['id'],'status':_0xafb3e5,..._0x49389e[_0x29ec14(0x10e)]!==undefined&&{'index':_0x49389e[_0x29ec14(0x10e)]},..._0x49389e['project']&&{'project':_0x49389e['project'][_0x29ec14(0x18a)]},..._0x49389e[_0x29ec14(0x13f)]&&{'workflow':_0x49389e['workflow'][_0x29ec14(0x18a)]},..._0x49389e[_0x29ec14(0x13b)]&&{'session_id':_0x49389e[_0x29ec14(0x13b)]},..._0x49389e[_0x29ec14(0x1ce)]&&{'session_time':_0x49389e[_0x29ec14(0x1ce)]},..._0x49389e[_0x29ec14(0x1b1)]&&{'retry_attempt':_0x49389e[_0x29ec14(0x1b1)]},..._0x17be56!==undefined&&{'duration_sec':_0x17be56},..._0x49389e[_0x29ec14(0x97)]&&{'created_at':_0x49389e[_0x29ec14(0x97)]},..._0x49389e['finishedAt']&&{'finished_at':_0x49389e[_0x29ec14(0xb7)]},...Object[_0x29ec14(0xd2)](_0x49389e['params'])['length']>0x0&&{'params':_0x49389e['params']}};return await handleSingleObjectOutput(_0x2ac434,_0x58cdae),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a41_0x448846(0x18a)]='workflow:tasks';[a41_0x448846(0xd0)]=a41_0x448846(0x197);async[a41_0x448846(0x1f9)](_0x1703b9){const _0x4ba2fe=a41_0x448846,{options:_0x56c3ce,args:_0x17e964,tdx:_0x1ad09e}=_0x1703b9,_0x12005a=_0x17e964[0x0];if(!_0x12005a)return console[_0x4ba2fe(0x154)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x1c9556=_0x56c3ce[_0x4ba2fe(0xfe)];_0x56c3ce['verbose']&&(console[_0x4ba2fe(0x154)](_0x4ba2fe(0x1ac)+_0x12005a),_0x1c9556&&console[_0x4ba2fe(0x154)](_0x4ba2fe(0x12a)));const _0x21bf6a=await withSpinner(_0x4ba2fe(0xb2),()=>_0x1ad09e[_0x4ba2fe(0x13f)][_0x4ba2fe(0x113)](_0x12005a,_0x1c9556||![]),{'verbose':_0x56c3ce['verbose']}),_0x12424f=_0x21bf6a[_0x4ba2fe(0x104)];return console['error'](_0x4ba2fe(0x111)+_0x12424f['length']+_0x4ba2fe(0x1fb)+(_0x12424f[_0x4ba2fe(0x1c5)]!==0x1?'s':'')),await handleSDKOutput(_0x12424f,_0x56c3ce),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a41_0x448846(0x18a)]='workflow:logs';[a41_0x448846(0xd0)]=a41_0x448846(0x209);async[a41_0x448846(0x1f9)](_0x397a0f){const _0x3b4529=a41_0x448846,{options:_0x188cd6,args:_0x4fff39,tdx:_0x3a21e3}=_0x397a0f,_0x4e1fff=_0x4fff39[0x0];let _0xcb9209=_0x4fff39[0x1];if(!_0x4e1fff)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x188cd6[_0x3b4529(0x138)]&&(console[_0x3b4529(0x154)]('Attempt\x20ID:\x20'+_0x4e1fff),_0xcb9209&&console[_0x3b4529(0x154)](_0x3b4529(0x1e0)+_0xcb9209));const _0x44cd88=await withSpinner('Fetching\x20log\x20files...',()=>_0x3a21e3[_0x3b4529(0x13f)]['logFiles'](_0x4e1fff,_0xcb9209),{'verbose':_0x188cd6['verbose']}),_0x596299=_0x44cd88[_0x3b4529(0x104)];if(_0x596299[_0x3b4529(0x1c5)]===0x0)return console[_0x3b4529(0x154)](_0x3b4529(0xe8)),0x0;if(!_0xcb9209&&(_0x188cd6[_0x3b4529(0x143)]||_0x188cd6[_0x3b4529(0x177)]))return await handleSDKOutput(_0x596299,_0x188cd6),0x0;if(!_0xcb9209){const _0x4ad1bb=_0x596299[_0x3b4529(0x1bc)](_0x1e16a5=>({'title':_0x1e16a5[_0x3b4529(0x203)]+'\x20('+formatBytes(_0x1e16a5[_0x3b4529(0x117)])+')','value':_0x1e16a5[_0x3b4529(0x203)]})),_0x4980de=await a41_0x131ac0({'type':_0x3b4529(0x21d),'name':'task','message':_0x3b4529(0x1df),'choices':_0x4ad1bb});if(!_0x4980de['task'])return console[_0x3b4529(0x154)](_0x3b4529(0x165)),0x0;_0xcb9209=_0x4980de['task'];}const _0x1bfb05=await withSpinner(_0x3b4529(0x20a),()=>_0x3a21e3[_0x3b4529(0x13f)][_0x3b4529(0x125)](_0x4e1fff,_0xcb9209),{'verbose':_0x188cd6[_0x3b4529(0x138)]}),_0x395c5b=_0x1bfb05['data'];return _0x395c5b?console[_0x3b4529(0x12f)](_0x395c5b):console['error'](_0x3b4529(0x11c)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0xcc);['description']=a41_0x448846(0x19a);async[a41_0x448846(0x1f9)](_0x278474){const _0xa61a0=a41_0x448846,{options:_0x4eaa29,args:_0x13f2b4,tdx:_0x58c27b}=_0x278474,_0x139648=_0x13f2b4[0x0];if(!_0x139648)return console[_0xa61a0(0x154)](_0xa61a0(0xba)),0x1;const _0xfe41f5=_0x4eaa29[_0xa61a0(0x13a)];_0x4eaa29[_0xa61a0(0x138)]&&(console[_0xa61a0(0x154)](_0xa61a0(0x1ac)+_0x139648),_0xfe41f5&&console[_0xa61a0(0x154)]('Reason:\x20'+_0xfe41f5));if(!_0x4eaa29[_0xa61a0(0x228)]){const _0x14757e=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x139648+'?');if(!_0x14757e)return console['error']('Cancelled'),0x0;}const _0x194635=await withSpinner(_0xa61a0(0xfa),()=>_0x58c27b[_0xa61a0(0x13f)][_0xa61a0(0x8f)](_0x139648,_0xfe41f5),{'verbose':_0x4eaa29[_0xa61a0(0x138)]}),_0x384645=_0x194635[_0xa61a0(0x104)];return console[_0xa61a0(0x154)]('✔\x20'+_0x384645),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a41_0x448846(0x18a)]='workflow:retry';['description']=a41_0x448846(0xb8);async[a41_0x448846(0x1f9)](_0x2f4945){const _0x511ad1=a41_0x448846,{options:_0x45eb0b,args:_0x4ed404,tdx:_0x78ccfb}=_0x2f4945,_0x18747a=_0x4ed404[0x0];if(!_0x18747a)return console['error'](_0x511ad1(0x1f2)),console[_0x511ad1(0x154)](_0x511ad1(0xd8)),0x1;let _0x4ad834=![],_0x5810c8=_0x18747a;if(_0x18747a[_0x511ad1(0x1bf)](_0x511ad1(0x162)))_0x4ad834=!![],_0x5810c8=_0x18747a[_0x511ad1(0x14c)](0x8);else{if(_0x18747a[_0x511ad1(0x1bf)](_0x511ad1(0x1ee)))_0x4ad834=![],_0x5810c8=_0x18747a[_0x511ad1(0x14c)](0x8);else return console[_0x511ad1(0x154)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x511ad1(0x154)](_0x511ad1(0xd8)),0x1;}const _0x510b01=_0x45eb0b[_0x511ad1(0x99)],_0xf512c7=_0x45eb0b[_0x511ad1(0x169)],_0x9120ef=_0x45eb0b[_0x511ad1(0x229)],_0x4dd049=_0x45eb0b[_0x511ad1(0xa5)];_0x45eb0b[_0x511ad1(0x138)]&&(console[_0x511ad1(0x154)](_0x511ad1(0xd4)+(_0x4ad834?_0x511ad1(0x1ff):'attempt')+'\x20'+_0x5810c8),_0x510b01&&console[_0x511ad1(0x154)]('From\x20task:\x20'+_0x510b01),_0xf512c7&&console[_0x511ad1(0x154)]('Resume\x20from:\x20'+_0xf512c7),_0x9120ef&&console[_0x511ad1(0x154)](_0x511ad1(0x1c0)+_0x9120ef),_0x4dd049&&console[_0x511ad1(0x154)](_0x511ad1(0x21a)));let _0x5e7656;if(_0x9120ef)try{if(_0x9120ef[_0x511ad1(0x1bf)]('@')){const _0x82ecf0=await import(_0x511ad1(0x15d)),_0x5c8ab3=_0x9120ef[_0x511ad1(0x14c)](0x1),_0x110679=await _0x82ecf0['readFile'](_0x5c8ab3,_0x511ad1(0x15b));_0x5e7656=JSON[_0x511ad1(0xed)](_0x110679);}else _0x5e7656=JSON[_0x511ad1(0xed)](_0x9120ef);}catch{return console[_0x511ad1(0x154)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x45eb0b[_0x511ad1(0x228)]){const _0x304f7d=await confirmKey(_0x511ad1(0x16a)+(_0x4ad834?_0x511ad1(0x1ff):'attempt')+'\x20'+_0x5810c8+'?');if(!_0x304f7d)return console[_0x511ad1(0x154)](_0x511ad1(0x165)),0x0;}let _0x200ed4;_0x4ad834?_0x200ed4=await withSpinner(_0x511ad1(0x141),()=>_0x78ccfb['workflow'][_0x511ad1(0xfc)](_0x5810c8,{'fromTask':_0x510b01,'retryParams':_0x5e7656}),{'verbose':_0x45eb0b[_0x511ad1(0x138)]}):_0x200ed4=await withSpinner(_0x511ad1(0x18d),()=>_0x78ccfb[_0x511ad1(0x13f)][_0x511ad1(0x19d)](_0x5810c8,{'resumeFrom':_0xf512c7,'retryParams':_0x5e7656,'force':_0x4dd049}),{'verbose':_0x45eb0b[_0x511ad1(0x138)]});const _0xa1909=_0x200ed4[_0x511ad1(0x104)];return console[_0x511ad1(0x154)](_0x511ad1(0xc3)),console['error'](_0x511ad1(0xcb)+_0xa1909[_0x511ad1(0xce)]),console[_0x511ad1(0x154)](_0x511ad1(0x224)+_0xa1909[_0x511ad1(0x13b)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0x11b);[a41_0x448846(0xd0)]=a41_0x448846(0x1ed);async['execute'](_0x51e6d5){const _0x5b5ef8=a41_0x448846,{options:_0x3f48c9,args:_0x4e0778,tdx:_0x4a9cf2}=_0x51e6d5;let _0x46d076=_0x4e0778[0x0];if(!_0x46d076){const _0x5695eb=this[_0x5b5ef8(0x1f5)]([],_0x3f48c9),_0x57b779=await withSpinner(_0x5b5ef8(0x20b),()=>_0x4a9cf2[_0x5b5ef8(0x13f)]['workflows'](_0x5695eb,{'limit':_0x3f48c9[_0x5b5ef8(0x222)]}),{'verbose':_0x3f48c9[_0x5b5ef8(0x138)]}),_0x2de15f=_0x57b779[_0x5b5ef8(0x104)];if(_0x2de15f[_0x5b5ef8(0x1c5)]===0x0)return console[_0x5b5ef8(0x154)](_0x5b5ef8(0x1d7)),!_0x5695eb&&console[_0x5b5ef8(0x154)](a41_0x402fbc[_0x5b5ef8(0x16c)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x5bc8e2=_0x2de15f[_0x5b5ef8(0x1bc)](_0x914be7=>({'title':_0x914be7['project']?.['name']+'.'+_0x914be7[_0x5b5ef8(0x18a)],'value':_0x914be7[_0x5b5ef8(0x1b2)]?.['name']+'.'+_0x914be7['name'],'description':_0x914be7[_0x5b5ef8(0x124)]?'revision:\x20'+_0x914be7['revision']:undefined})),_0x58c2fb=await a41_0x131ac0({'type':_0x5b5ef8(0x21d),'name':_0x5b5ef8(0x13f),'message':_0x5b5ef8(0xef),'choices':_0x5bc8e2});if(!_0x58c2fb['workflow'])return 0x1;_0x46d076=_0x58c2fb['workflow'];}if(!_0x46d076[_0x5b5ef8(0x14b)]('.')){const _0x300d92=this['resolveProject']([],_0x3f48c9);if(_0x300d92)_0x46d076=_0x300d92+'.'+_0x46d076;else return console['error'](a41_0x402fbc[_0x5b5ef8(0x95)](_0x5b5ef8(0x9a)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x5b5ef8(0x154)](a41_0x402fbc[_0x5b5ef8(0x16c)](_0x5b5ef8(0xf9))),0x1;}const _0x457168=_0x3f48c9[_0x5b5ef8(0x10d)],_0x1aa785=_0x3f48c9[_0x5b5ef8(0x1ce)],_0x5be559={};if(_0x457168&&Array[_0x5b5ef8(0x1b0)](_0x457168))for(const _0x3f8228 of _0x457168){const _0x459b12=_0x3f8228[_0x5b5ef8(0x15e)]('=');if(_0x459b12===-0x1)return console['error'](_0x5b5ef8(0x1b8)+_0x3f8228),console[_0x5b5ef8(0x154)](_0x5b5ef8(0x1d2)),0x1;const _0x14f61d=_0x3f8228[_0x5b5ef8(0x14c)](0x0,_0x459b12),_0x18cfa7=_0x3f8228[_0x5b5ef8(0x14c)](_0x459b12+0x1);try{_0x5be559[_0x14f61d]=JSON['parse'](_0x18cfa7);}catch{_0x5be559[_0x14f61d]=_0x18cfa7;}}_0x3f48c9[_0x5b5ef8(0x138)]&&(console[_0x5b5ef8(0x154)](_0x5b5ef8(0xb0)+_0x46d076),Object[_0x5b5ef8(0xd2)](_0x5be559)['length']>0x0&&console[_0x5b5ef8(0x154)]('Parameters:\x20'+JSON['stringify'](_0x5be559)),_0x1aa785&&console[_0x5b5ef8(0x154)](_0x5b5ef8(0x94)+_0x1aa785));const _0x54beb9=await withSpinner('Starting\x20workflow\x20run...',()=>_0x4a9cf2['workflow'][_0x5b5ef8(0x18e)](_0x46d076,_0x5be559,{'sessionTime':_0x1aa785}),{'verbose':_0x3f48c9[_0x5b5ef8(0x138)]}),_0x20c644=_0x54beb9['data'];console['error'](_0x5b5ef8(0x171)),console['error'](_0x5b5ef8(0xe4)+_0x20c644['id']),console[_0x5b5ef8(0x154)](_0x5b5ef8(0x224)+_0x20c644[_0x5b5ef8(0x13b)]),console[_0x5b5ef8(0x154)](_0x5b5ef8(0x1b5)+_0x20c644[_0x5b5ef8(0x1b2)]?.[_0x5b5ef8(0x18a)]),console['error'](_0x5b5ef8(0x137)+_0x20c644[_0x5b5ef8(0x13f)]?.[_0x5b5ef8(0x18a)]);if(_0x20c644[_0x5b5ef8(0x1b2)]?.['id']&&_0x20c644[_0x5b5ef8(0x13b)]&&_0x20c644['id']){const _0x23593d=_0x3f48c9[_0x5b5ef8(0x91)],_0x112d94=getConsoleUrl(_0x23593d,_0x5b5ef8(0x112)+_0x20c644[_0x5b5ef8(0x1b2)]['id']+'/sessions/'+_0x20c644[_0x5b5ef8(0x13b)]+_0x5b5ef8(0x133)+_0x20c644['id']);console[_0x5b5ef8(0x154)](_0x5b5ef8(0x17c)+a41_0x402fbc[_0x5b5ef8(0x18c)](_0x112d94));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']='workflow:download';[a41_0x448846(0xd0)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a41_0x448846(0x1f9)](_0x122b24){const _0x39fa9a=a41_0x448846,{options:_0x5364e5,args:_0x208a84,tdx:_0x505252}=_0x122b24,_0x59fcd2=_0x208a84[0x0],_0x34e7bc=_0x208a84[0x1]||'.';if(!_0x59fcd2)return console[_0x39fa9a(0x154)](_0x39fa9a(0x14a)),console[_0x39fa9a(0x154)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x33ace8=_0x5364e5[_0x39fa9a(0x124)];_0x5364e5[_0x39fa9a(0x138)]&&(console[_0x39fa9a(0x154)]('Project:\x20'+_0x59fcd2),console[_0x39fa9a(0x154)]('Output\x20directory:\x20'+_0x34e7bc),_0x33ace8&&console[_0x39fa9a(0x154)](_0x39fa9a(0x1c3)+_0x33ace8));const _0x4c16f8=await withSpinner('Downloading\x20project\x20'+_0x59fcd2+_0x39fa9a(0xeb),()=>_0x505252[_0x39fa9a(0x13f)][_0x39fa9a(0x109)](_0x59fcd2,_0x34e7bc,{'revision':_0x33ace8}),{'verbose':_0x5364e5[_0x39fa9a(0x138)]}),_0xce6550=_0x4c16f8['data'];return console[_0x39fa9a(0x154)](_0x39fa9a(0x1be)+_0xce6550[_0x39fa9a(0x9e)]),console['error'](_0x39fa9a(0x201)+_0xce6550[_0x39fa9a(0x124)]),console[_0x39fa9a(0x154)](_0x39fa9a(0x18b)+_0xce6550[_0x39fa9a(0x9f)]),console[_0x39fa9a(0x154)]('\x20\x20Location:\x20'+_0x34e7bc+'/'+_0xce6550[_0x39fa9a(0x9e)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0x15f);[a41_0x448846(0xd0)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async['execute'](_0x27e257){const _0x196018=a41_0x448846,{options:_0x2dcf45,args:_0x3f6a87,tdx:_0x3d7b91}=_0x27e257;let _0x23cbd0='.',_0x175a17=_0x2dcf45[_0x196018(0x18a)];if(_0x3f6a87[0x0]){const {promises:_0x8d31c7}=await import('fs');try{const _0x47da2a=await _0x8d31c7['stat'](_0x3f6a87[0x0]);if(_0x47da2a['isDirectory']())_0x23cbd0=_0x3f6a87[0x0];else return console[_0x196018(0x154)]('Error:\x20'+_0x3f6a87[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x175a17=_0x3f6a87[0x0],_0x23cbd0='.';}}const _0x24d734=_0x2dcf45[_0x196018(0x124)],_0x5952c2=_0x2dcf45[_0x196018(0x129)];_0x2dcf45[_0x196018(0x138)]&&(console[_0x196018(0x154)](_0x196018(0x140)+_0x23cbd0),_0x175a17&&console[_0x196018(0x154)]('Project\x20name:\x20'+_0x175a17),_0x24d734&&console['error'](_0x196018(0x1c3)+_0x24d734),_0x5952c2&&console[_0x196018(0x154)](_0x196018(0x173)));const _0x5d7ddd=await withSpinner(_0x196018(0x1d0),()=>_0x3d7b91[_0x196018(0x13f)][_0x196018(0x194)](_0x23cbd0,{'projectName':_0x175a17,'revision':_0x24d734,'skipValidation':_0x5952c2}),{'verbose':_0x2dcf45[_0x196018(0x138)]}),_0x5e66c1=_0x5d7ddd[_0x196018(0x104)];return console[_0x196018(0x154)](_0x196018(0x119)+_0x5e66c1['projectName']),console['error']('\x20\x20Project\x20ID:\x20'+_0x5e66c1[_0x196018(0xbe)]),console[_0x196018(0x154)](_0x196018(0x201)+_0x5e66c1[_0x196018(0x124)]),await this[_0x196018(0x1c6)](_0x3d7b91,_0x5e66c1[_0x196018(0x9e)],_0x2dcf45['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a41_0x448846(0x1dd);[a41_0x448846(0xd0)]=a41_0x448846(0x164);async[a41_0x448846(0x1f9)](_0x17ee99){const _0xd7720c=a41_0x448846,{options:_0x5574d4,args:_0x83adf6,tdx:_0x4ce241}=_0x17ee99,_0x4829f4=_0x83adf6[0x0],_0x140899=_0x83adf6[0x1];if(!_0x4829f4)return console['error'](a41_0x402fbc[_0xd7720c(0x95)]('Error:'),'Project\x20name\x20is\x20required'),console[_0xd7720c(0x154)](a41_0x402fbc[_0xd7720c(0x16c)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x30a42d=_0x5574d4[_0xd7720c(0x124)];_0x5574d4['verbose']&&(console[_0xd7720c(0x154)](_0xd7720c(0x108)+_0x4829f4),_0x140899&&console[_0xd7720c(0x154)](_0xd7720c(0x21f)+_0x140899),_0x30a42d&&console[_0xd7720c(0x154)](_0xd7720c(0x1c3)+_0x30a42d),_0x5574d4[_0xd7720c(0x22c)]&&console['error'](_0xd7720c(0x178)));const _0x4eb63d=await withSpinner(_0xd7720c(0x11e)+_0x4829f4+_0xd7720c(0xeb),()=>_0x4ce241[_0xd7720c(0x13f)][_0xd7720c(0x127)](_0x4829f4,{'targetDir':_0x140899,'revision':_0x30a42d}),{'verbose':_0x5574d4[_0xd7720c(0x138)]}),_0x55d1f7=_0x4eb63d[_0xd7720c(0x104)];_0x55d1f7[_0xd7720c(0x153)]?console[_0xd7720c(0x154)](_0xd7720c(0x1ec)+_0x55d1f7[_0xd7720c(0x9e)]):console['error'](_0xd7720c(0xd6)+_0x55d1f7[_0xd7720c(0x9e)]);console['error']('\x20\x20Revision:\x20'+_0x55d1f7['revision']),console[_0xd7720c(0x154)]('\x20\x20Target:\x20'+(a41_0xf5d811['relative'](process['cwd'](),_0x55d1f7[_0xd7720c(0x107)])||'.')),console[_0xd7720c(0x154)](_0xd7720c(0x1e7)+a41_0x402fbc['green']('+'+_0x55d1f7[_0xd7720c(0x1f7)][_0xd7720c(0x20c)]+_0xd7720c(0xc0))+',\x20'+(a41_0x402fbc['yellow']('~'+_0x55d1f7[_0xd7720c(0x1f7)]['modified']+_0xd7720c(0x1cc))+',\x20')+(a41_0x402fbc['red']('-'+_0x55d1f7[_0xd7720c(0x1f7)][_0xd7720c(0x114)]+'\x20deleted')+',\x20')+(''+a41_0x402fbc['dim'](_0x55d1f7[_0xd7720c(0x1f7)][_0xd7720c(0xd7)]+_0xd7720c(0x1e2))));for(const _0x3e2709 of _0x55d1f7[_0xd7720c(0x17e)]){_0x3e2709[_0xd7720c(0x128)]===_0xd7720c(0x1d4)&&_0x3e2709[_0xd7720c(0x1e8)]&&(console[_0xd7720c(0x154)]('\x0a'+a41_0x402fbc['cyan'](_0xd7720c(0x150)+_0x3e2709[_0xd7720c(0x192)])),console['error'](_0x3e2709[_0xd7720c(0x1e8)]));}if(!_0x55d1f7[_0xd7720c(0x213)])return saveSessionContext({'workflow_project':_0x55d1f7['projectName']},_0x5574d4[_0xd7720c(0x1ff)]),console['error'](a41_0x402fbc[_0xd7720c(0x142)](_0xd7720c(0x131))),console[_0xd7720c(0x154)](a41_0x402fbc[_0xd7720c(0x16c)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x55d1f7['projectName'])),0x0;if(_0x5574d4[_0xd7720c(0x22c)])return console['error'](a41_0x402fbc[_0xd7720c(0x1f6)](_0xd7720c(0xec))),0x0;if(!_0x5574d4['yes']){const _0x49c765=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x49c765)return console[_0xd7720c(0x154)](_0xd7720c(0x165)),0x0;}await withSpinner(_0xd7720c(0x166),()=>_0x4ce241[_0xd7720c(0x13f)][_0xd7720c(0x1e9)](_0x55d1f7,{'revision':_0x30a42d}),{'verbose':_0x5574d4[_0xd7720c(0x138)]}),saveSessionContext({'workflow_project':_0x55d1f7['projectName']},_0x5574d4[_0xd7720c(0x1ff)]),console[_0xd7720c(0x154)](a41_0x402fbc['green'](_0xd7720c(0xa4)));const _0x2dca7f=a41_0xf5d811[_0xd7720c(0x217)](process[_0xd7720c(0x191)](),_0x55d1f7[_0xd7720c(0x107)])||'.';return console[_0xd7720c(0x154)](a41_0x402fbc[_0xd7720c(0x16c)](_0xd7720c(0xad)+_0x2dca7f)),console[_0xd7720c(0x154)](a41_0x402fbc[_0xd7720c(0x16c)](_0xd7720c(0x13d)+_0x55d1f7[_0xd7720c(0x9e)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0xfd);[a41_0x448846(0xd0)]=a41_0x448846(0x13c);async[a41_0x448846(0x1f9)](_0x8dc4ba){const _0x3457ba=a41_0x448846,{options:_0x3dc68a,args:_0x5a698d,tdx:_0x1c790b}=_0x8dc4ba,_0x5ce5bc=this[_0x3457ba(0x10c)](_0x5a698d,_0x3dc68a),_0x5e52c0=_0x3dc68a['revision'],_0x4c9dbd=_0x3dc68a[_0x3457ba(0x129)];_0x3dc68a['verbose']&&(_0x5ce5bc&&console[_0x3457ba(0x154)]('Source\x20directory:\x20'+_0x5ce5bc),_0x5e52c0&&console['error'](_0x3457ba(0x1c3)+_0x5e52c0),_0x3dc68a[_0x3457ba(0x22c)]&&console['error']('Dry\x20run:\x20yes'),_0x4c9dbd&&console['error']('Validation:\x20skipped'));let _0x205640;try{_0x205640=await withSpinner(_0x3457ba(0xaa),()=>_0x1c790b['workflow'][_0x3457ba(0x120)]({'sourceDir':_0x5ce5bc,'revision':_0x5e52c0,'skipValidation':_0x4c9dbd}),{'verbose':_0x3dc68a['verbose']});}catch(_0x3b5f60){if(_0x3b5f60 instanceof Error&&_0x3b5f60['message'][_0x3457ba(0x14b)](_0x3457ba(0xbd)))return console['error'](a41_0x402fbc[_0x3457ba(0x95)](_0x3457ba(0x9a)),_0x3457ba(0x90)),_0x3dc68a[_0x3457ba(0x1b9)]?console[_0x3457ba(0x154)](a41_0x402fbc[_0x3457ba(0x16c)]('Tip:\x20cd\x20to\x20workflows/'+_0x3dc68a[_0x3457ba(0x1b9)]+_0x3457ba(0x1a7)+_0x3dc68a[_0x3457ba(0x1b9)]+'\x27')):console[_0x3457ba(0x154)](a41_0x402fbc[_0x3457ba(0x16c)](_0x3457ba(0x206))),0x1;throw _0x3b5f60;}const _0x1bd393=_0x205640[_0x3457ba(0x104)];console['error'](_0x3457ba(0xd6)+_0x1bd393[_0x3457ba(0x9e)]),console[_0x3457ba(0x154)]('\x20\x20Source:\x20'+_0x1bd393[_0x3457ba(0x134)]),console[_0x3457ba(0x154)](_0x3457ba(0x201)+_0x1bd393[_0x3457ba(0x124)]),console[_0x3457ba(0x154)]('\x20\x20Changes:\x20'+a41_0x402fbc[_0x3457ba(0x142)]('+'+_0x1bd393['summary'][_0x3457ba(0x20c)]+_0x3457ba(0xc0))+',\x20'+(a41_0x402fbc[_0x3457ba(0x1f6)]('~'+_0x1bd393['summary'][_0x3457ba(0x1d4)]+_0x3457ba(0x1cc))+',\x20')+(a41_0x402fbc[_0x3457ba(0x95)]('-'+_0x1bd393[_0x3457ba(0x1f7)][_0x3457ba(0x114)]+_0x3457ba(0xb6))+',\x20')+(''+a41_0x402fbc[_0x3457ba(0x16c)](_0x1bd393[_0x3457ba(0x1f7)]['unchanged']+_0x3457ba(0x1e2))));for(const _0x59c529 of _0x1bd393[_0x3457ba(0x17e)]){_0x59c529[_0x3457ba(0x128)]===_0x3457ba(0x1d4)&&_0x59c529[_0x3457ba(0x1e8)]&&(console[_0x3457ba(0x154)]('\x0a'+a41_0x402fbc['cyan']('---\x20'+_0x59c529['path'])),console[_0x3457ba(0x154)](_0x59c529[_0x3457ba(0x1e8)]));}if(!_0x1bd393['hasChanges'])return console[_0x3457ba(0x154)](a41_0x402fbc[_0x3457ba(0x142)](_0x3457ba(0x1b7))),await this[_0x3457ba(0x1c6)](_0x1c790b,_0x1bd393[_0x3457ba(0x9e)],_0x3dc68a['site']),0x0;if(_0x3dc68a['dryRun'])return console[_0x3457ba(0x154)](a41_0x402fbc[_0x3457ba(0x1f6)](_0x3457ba(0x1db))),0x0;if(!_0x3dc68a['yes']){const _0x4cec8d=await confirmKey(_0x3457ba(0x1de));if(!_0x4cec8d)return console[_0x3457ba(0x154)](_0x3457ba(0x165)),0x0;}const _0x22482d=await withSpinner('Pushing\x20project...',()=>_0x1c790b[_0x3457ba(0x13f)][_0x3457ba(0x9d)](_0x1bd393),{'verbose':_0x3dc68a[_0x3457ba(0x138)]}),_0x4a7dbf=_0x22482d[_0x3457ba(0x104)];return console[_0x3457ba(0x154)](a41_0x402fbc[_0x3457ba(0x142)](_0x3457ba(0x98))),console[_0x3457ba(0x154)]('\x20\x20Project\x20ID:\x20'+_0x4a7dbf['projectId']),console[_0x3457ba(0x154)]('\x20\x20Revision:\x20'+_0x4a7dbf[_0x3457ba(0x124)]),await this['showWorkflowConsoleUrl'](_0x1c790b,_0x4a7dbf['projectName'],_0x3dc68a[_0x3457ba(0x91)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0x1e1);[a41_0x448846(0xd0)]=a41_0x448846(0xc4);async['execute'](_0x1cb587){const _0x5af8c9=a41_0x448846,{options:_0xfcd070,args:_0x44d45b,tdx:_0x27e05a}=_0x1cb587,_0x3fe29b=this[_0x5af8c9(0x10c)](_0x44d45b,_0xfcd070),_0x1655ed=_0xfcd070[_0x5af8c9(0x18a)],_0x3e2cd7=_0xfcd070[_0x5af8c9(0x124)],_0x156d5f=_0xfcd070['skipValidation'];if(!_0x3fe29b)return console[_0x5af8c9(0x154)](a41_0x402fbc[_0x5af8c9(0x95)](_0x5af8c9(0x9a)),_0x5af8c9(0x211)),console[_0x5af8c9(0x154)](a41_0x402fbc[_0x5af8c9(0x16c)](_0x5af8c9(0x159))),console[_0x5af8c9(0x154)](a41_0x402fbc['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x1655ed)return console['error'](a41_0x402fbc[_0x5af8c9(0x95)](_0x5af8c9(0x9a)),_0x5af8c9(0x167)),console['error'](a41_0x402fbc[_0x5af8c9(0x16c)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0xfcd070[_0x5af8c9(0x138)]&&(console['error'](_0x5af8c9(0x1e4)+_0x3fe29b),console['error'](_0x5af8c9(0x106)+_0x1655ed),_0x3e2cd7&&console['error'](_0x5af8c9(0x1c3)+_0x3e2cd7),_0xfcd070['dryRun']&&console[_0x5af8c9(0x154)](_0x5af8c9(0x178)),_0x156d5f&&console[_0x5af8c9(0x154)](_0x5af8c9(0x173)));const _0x15c46e=await withSpinner(_0x5af8c9(0x17d),()=>_0x27e05a['workflow']['prepareCloneProject'](_0x3fe29b,_0x1655ed,{'revision':_0x3e2cd7,'skipValidation':_0x156d5f}),{'verbose':_0xfcd070[_0x5af8c9(0x138)]}),_0x2f910f=_0x15c46e[_0x5af8c9(0x104)];console[_0x5af8c9(0x154)](_0x5af8c9(0x1cf)+_0x2f910f[_0x5af8c9(0x134)]);_0x2f910f[_0x5af8c9(0xc8)]&&console[_0x5af8c9(0x154)](_0x5af8c9(0x12c)+_0x2f910f[_0x5af8c9(0xc8)]);console[_0x5af8c9(0x154)](_0x5af8c9(0x106)+_0x2f910f[_0x5af8c9(0x214)]),console[_0x5af8c9(0x154)]('Revision:\x20'+_0x2f910f[_0x5af8c9(0x124)]),console[_0x5af8c9(0x154)](_0x5af8c9(0x132)+_0x2f910f['fileCount']);_0x2f910f['targetExists']&&(console[_0x5af8c9(0x154)](a41_0x402fbc[_0x5af8c9(0x1f6)](_0x5af8c9(0x1a1)+_0x2f910f[_0x5af8c9(0x214)]+_0x5af8c9(0x17f)+_0x2f910f[_0x5af8c9(0x1e6)]+')')),console[_0x5af8c9(0x154)](a41_0x402fbc[_0x5af8c9(0x1f6)](_0x5af8c9(0x1c2))));if(_0xfcd070['dryRun'])return console['error'](a41_0x402fbc[_0x5af8c9(0x1f6)](_0x5af8c9(0xf2))),0x0;if(!_0xfcd070[_0x5af8c9(0x228)]){const _0x57c3bc=_0x2f910f[_0x5af8c9(0xc8)]||a41_0xf5d811[_0x5af8c9(0x105)](_0x3fe29b),_0x5a0f38=_0x2f910f[_0x5af8c9(0x182)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x1655ed+_0x5af8c9(0x1c4):_0x5af8c9(0x181)+_0x57c3bc+_0x5af8c9(0x1b6)+_0x1655ed+'\x22?',_0x3462cf=await confirmKey(_0x5a0f38);if(!_0x3462cf)return console[_0x5af8c9(0x154)]('Cancelled'),0x0;}const _0x5123de=await withSpinner(_0x2f910f[_0x5af8c9(0x182)]?'Updating\x20'+_0x1655ed+'...':_0x5af8c9(0x115)+_0x1655ed+_0x5af8c9(0xeb),()=>_0x27e05a[_0x5af8c9(0x13f)][_0x5af8c9(0xbc)](_0x2f910f),{'verbose':_0xfcd070[_0x5af8c9(0x138)]}),_0x269c92=_0x5123de[_0x5af8c9(0x104)];return console[_0x5af8c9(0x154)](a41_0x402fbc['green'](_0x2f910f[_0x5af8c9(0x182)]?_0x5af8c9(0x1c9):'✔\x20Clone\x20complete')),console['error'](_0x5af8c9(0x1b5)+_0x269c92[_0x5af8c9(0x214)]),console[_0x5af8c9(0x154)](_0x5af8c9(0xe3)+_0x269c92[_0x5af8c9(0x152)]),console[_0x5af8c9(0x154)](_0x5af8c9(0x201)+_0x269c92['revision']),await this[_0x5af8c9(0x1c6)](_0x27e05a,_0x269c92[_0x5af8c9(0x214)],_0xfcd070['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0x20f);[a41_0x448846(0xd0)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0xe82962){const _0x4e06f5=a41_0x448846,{options:_0x17056b,args:_0x5c1668,tdx:_0x2454bc}=_0xe82962,_0x314647=_0x5c1668[0x0];if(!_0x314647)return console[_0x4e06f5(0x154)](_0x4e06f5(0x195)),console[_0x4e06f5(0x154)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x17056b[_0x4e06f5(0x138)]&&console[_0x4e06f5(0x154)]('Project:\x20'+_0x314647);if(!_0x17056b[_0x4e06f5(0x228)]){const _0x31f055=await confirmKey(_0x4e06f5(0x17b)+_0x314647+_0x4e06f5(0x158));if(!_0x31f055)return console[_0x4e06f5(0x154)](_0x4e06f5(0x165)),0x0;}const _0x8a26ae=await withSpinner('Deleting\x20project\x20'+_0x314647+_0x4e06f5(0xeb),()=>_0x2454bc['workflow']['delete'](_0x314647),{'verbose':_0x17056b[_0x4e06f5(0x138)]}),_0x3c0988=_0x8a26ae['data'];return console[_0x4e06f5(0x154)](_0x4e06f5(0x193)+_0x3c0988[_0x4e06f5(0x9e)]),console[_0x4e06f5(0x154)](_0x4e06f5(0xe3)+_0x3c0988[_0x4e06f5(0xbe)]),0x0;}}export function parseKeyValue(_0x4d0c84){const _0x2bf9b3=a41_0x448846,_0x4d1094=_0x4d0c84['indexOf']('=');if(_0x4d1094===-0x1)throw new Error(_0x2bf9b3(0x1a4)+_0x4d0c84+_0x2bf9b3(0x174));const _0x410877=_0x4d0c84[_0x2bf9b3(0x14c)](0x0,_0x4d1094),_0xeaa1cf=_0x4d0c84[_0x2bf9b3(0x14c)](_0x4d1094+0x1);if(!_0x410877)throw new Error(_0x2bf9b3(0x100));return{'key':_0x410877,'value':_0xeaa1cf};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0x180);[a41_0x448846(0xd0)]=a41_0x448846(0x198);async[a41_0x448846(0x1f9)](_0x3ff918){const _0x2fb773=a41_0x448846,{options:_0x4126ab,args:_0x4c04f9,tdx:_0x5a3856}=_0x3ff918,_0xa53bc3=this[_0x2fb773(0x9b)](_0x4c04f9,_0x4126ab);if(!_0xa53bc3)return 0x1;_0x4126ab[_0x2fb773(0x138)]&&console[_0x2fb773(0x154)](_0x2fb773(0x108)+_0xa53bc3);const _0x536570=await withSpinner(_0x2fb773(0xf6),()=>_0x5a3856[_0x2fb773(0x13f)][_0x2fb773(0x200)](_0xa53bc3),{'verbose':_0x4126ab[_0x2fb773(0x138)]}),{secrets:_0x53fffd}=_0x536570[_0x2fb773(0x104)];return console[_0x2fb773(0x154)](_0x2fb773(0x111)+_0x53fffd[_0x2fb773(0x1c5)]+'\x20secret'+(_0x53fffd['length']!==0x1?'s':'')),await handleSDKOutput(_0x53fffd,_0x4126ab),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]='workflow:secrets:set';['description']=a41_0x448846(0x1e3);async[a41_0x448846(0x1f9)](_0x1187c1){const _0x10c8cc=a41_0x448846,{options:_0xafdc52,args:_0xea600,tdx:_0x4741a8}=_0x1187c1;let _0x265b3c,_0x418b1e;if(_0xea600[_0x10c8cc(0x1c5)]>=0x2)_0x265b3c=_0xea600[0x0],_0x418b1e=_0xea600[0x1];else{if(_0xea600['length']===0x1&&_0xafdc52[_0x10c8cc(0x1b9)])_0x265b3c=_0xafdc52[_0x10c8cc(0x1b9)],_0x418b1e=_0xea600[0x0];else return _0xea600[_0x10c8cc(0x1c5)]===0x1?(console[_0x10c8cc(0x154)](_0x10c8cc(0x14a)),console['error'](_0x10c8cc(0xf9)),0x1):(console[_0x10c8cc(0x154)](_0x10c8cc(0xee)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x5e3656,_0x4dfd96;try{({key:_0x5e3656,value:_0x4dfd96}=parseKeyValue(_0x418b1e));}catch(_0x33b9b1){return _0x33b9b1 instanceof Error&&console[_0x10c8cc(0x154)](a41_0x402fbc[_0x10c8cc(0x95)](_0x10c8cc(0x9a)),_0x33b9b1[_0x10c8cc(0x19f)]),0x1;}_0xafdc52['verbose']&&(console[_0x10c8cc(0x154)](_0x10c8cc(0x108)+_0x265b3c),console[_0x10c8cc(0x154)](_0x10c8cc(0x19c)+_0x5e3656));const _0x18d645=await withSpinner(_0x10c8cc(0x1da),()=>_0x4741a8['workflow']['setSecret'](_0x265b3c,_0x5e3656,_0x4dfd96),{'verbose':_0xafdc52[_0x10c8cc(0x138)]}),_0x188cc3=_0x18d645[_0x10c8cc(0x104)];return console[_0x10c8cc(0x154)](_0x10c8cc(0x16e)+_0x188cc3[_0x10c8cc(0x218)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x188cc3['projectName']+'\x27'),(_0xafdc52[_0x10c8cc(0x143)]||_0xafdc52[_0x10c8cc(0x168)])&&await handleSingleObjectOutput(_0x188cc3,_0xafdc52),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]='workflow:secrets:delete';['description']=a41_0x448846(0x1a3);async[a41_0x448846(0x1f9)](_0x104fab){const _0xccc1ca=a41_0x448846,{options:_0x50483b,args:_0x7fe3c7,tdx:_0x3e3951}=_0x104fab;let _0x5bf1dd,_0x4f2761;if(_0x7fe3c7[_0xccc1ca(0x1c5)]>=0x2)_0x5bf1dd=_0x7fe3c7[0x0],_0x4f2761=_0x7fe3c7[0x1];else{if(_0x7fe3c7[_0xccc1ca(0x1c5)]===0x1&&_0x50483b[_0xccc1ca(0x1b9)])_0x5bf1dd=_0x50483b[_0xccc1ca(0x1b9)],_0x4f2761=_0x7fe3c7[0x0];else return _0x7fe3c7[_0xccc1ca(0x1c5)]===0x1?(console[_0xccc1ca(0x154)](_0xccc1ca(0x14a)),console[_0xccc1ca(0x154)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0xccc1ca(0x1af)),console[_0xccc1ca(0x154)](_0xccc1ca(0xa0)),0x1);}_0x50483b[_0xccc1ca(0x138)]&&(console[_0xccc1ca(0x154)](_0xccc1ca(0x108)+_0x5bf1dd),console[_0xccc1ca(0x154)](_0xccc1ca(0x19c)+_0x4f2761));if(!_0x50483b[_0xccc1ca(0x228)]){const _0x112a93=await confirmKey(_0xccc1ca(0xca)+_0x4f2761+'\x27\x20from\x20project\x20\x27'+_0x5bf1dd+'\x27?');if(!_0x112a93)return console[_0xccc1ca(0x154)]('Cancelled'),0x0;}const _0x473561=await withSpinner(_0xccc1ca(0x12b),()=>_0x3e3951['workflow'][_0xccc1ca(0x21e)](_0x5bf1dd,_0x4f2761),{'verbose':_0x50483b[_0xccc1ca(0x138)]}),_0xddb3f2=_0x473561[_0xccc1ca(0x104)];return console['error']('✔\x20Secret\x20\x27'+_0xddb3f2[_0xccc1ca(0x218)]+_0xccc1ca(0x14d)+_0xddb3f2[_0xccc1ca(0x9e)]+'\x27'),(_0x50483b[_0xccc1ca(0x143)]||_0x50483b[_0xccc1ca(0x168)])&&await handleSingleObjectOutput(_0xddb3f2,_0x50483b),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(_0x41e7d6){const _0x32c223=a41_0x448846,_0x46ccae=Math[_0x32c223(0x123)](_0x41e7d6/0x3e8),_0x264ec6=Math[_0x32c223(0x123)](_0x46ccae/0x3c),_0x45cbfa=Math[_0x32c223(0x123)](_0x264ec6/0x3c),_0x49ca82=Math[_0x32c223(0x123)](_0x45cbfa/0x18);if(_0x49ca82>0x0){const _0xe977cb=_0x45cbfa%0x18;return _0xe977cb>0x0?_0x49ca82+'d\x20'+_0xe977cb+'h':_0x49ca82+'d';}else{if(_0x45cbfa>0x0){const _0x483f1e=_0x264ec6%0x3c;return _0x483f1e>0x0?_0x45cbfa+'h\x20'+_0x483f1e+'m':_0x45cbfa+'h';}else{if(_0x264ec6>0x0){const _0x3de81b=_0x46ccae%0x3c;return _0x3de81b>0x0?_0x264ec6+'m\x20'+_0x3de81b+'s':_0x264ec6+'m';}else return _0x46ccae+'s';}}}function formatTimestamp(_0x48bcee,_0x83374b){const _0x12a850=a41_0x448846,_0x2b28db=new Date(_0x48bcee),_0x494d9e=String(_0x2b28db[_0x12a850(0xde)]())[_0x12a850(0x1b4)](0x2,'0'),_0x20f75b=String(_0x2b28db[_0x12a850(0x1ae)]())['padStart'](0x2,'0'),_0x18f4bc=_0x494d9e+':'+_0x20f75b,_0x15555f=_0x2b28db[_0x12a850(0xd1)]()===_0x83374b['getFullYear']()&&_0x2b28db[_0x12a850(0x130)]()===_0x83374b['getMonth']()&&_0x2b28db[_0x12a850(0x1a2)]()===_0x83374b[_0x12a850(0x1a2)]();if(_0x15555f)return _0x18f4bc;else{const _0x1ef9fc=String(_0x2b28db[_0x12a850(0x130)]()+0x1)[_0x12a850(0x1b4)](0x2,'0'),_0x3e5e59=String(_0x2b28db['getDate']())['padStart'](0x2,'0');return _0x1ef9fc+'-'+_0x3e5e59+'\x20'+_0x18f4bc;}}function formatDate(_0x587899){const _0xcf851=a41_0x448846,_0x2f34ce=_0x587899['getFullYear'](),_0x41ffe7=String(_0x587899[_0xcf851(0x130)]()+0x1)[_0xcf851(0x1b4)](0x2,'0'),_0x191d47=String(_0x587899[_0xcf851(0x1a2)]())['padStart'](0x2,'0');return _0x2f34ce+'-'+_0x41ffe7+'-'+_0x191d47;}function getTaskStateIcon(_0x17c5ff){const _0x2e5563={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2e5563[_0x17c5ff]||'⚪';}function a41_0x13e8(){const _0x5c87ca=['No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x20sessions\x20','parseProjectWorkflowPattern','...','\x0aDry\x20run\x20-\x20no\x20files\x20written','parse','Error:\x20KEY=VALUE\x20is\x20required','Select\x20a\x20workflow\x20to\x20run','GUTTER','No\x20workflow\x20sessions\x20found','\x0aDry\x20run\x20-\x20no\x20project\x20created','context','\x20project','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Listing\x20secrets...','\x0aPolling...\x20(','\x20(system)','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Killing\x20attempt...','workflows','retrySession','workflow:push','includeSubtasks','List\x20workflows','Key\x20cannot\x20be\x20empty','\x20(use\x20--limit\x20to\x20show\x20more)','msPerChar','window','data','basename','New\x20project\x20name:\x20','targetDir','Project:\x20','download','MAX_LABEL_COUNT','renderTimeline','resolveProjectDir','param','index','\x20workflow','MAX_POLL_ITERATIONS','✔\x20Found\x20','/app/workflows/','tasks','deleted','Cloning\x20to\x20','splice','fileSize','No\x20sessions\x20found\x20in\x20project:\x20','✔\x20Pushed\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','workflow:run','No\x20log\x20content\x20found','Listing\x20workflows...','Pulling\x20project\x20','max','preparePushProject','min','projects','floor','revision','logs','144qZFKYS','pullProject','type','skipValidation','Including\x20subtasks:\x20yes','Deleting\x20secret...','Source\x20project:\x20','Filter:\x20','white','log','getMonth','\x0a✔\x20Already\x20up\x20to\x20date','Files\x20to\x20upload:\x20','/attempt/','sourceDir','⚠\x20Showing\x20first\x20','generateSessionTimelineRows','\x20\x20Workflow:\x20','verbose','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','reason','sessionId','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x20\x20Session\x20context\x20set\x20to:\x20','now','workflow','Project\x20directory:\x20','Retrying\x20session...','green','json','resolveProjectId','List\x20workflow\x20attempts','No\x20matching\x20sessions\x20found','has','isTTY','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Error:\x20Project\x20name\x20is\x20required','includes','substring','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','Auto-selected\x20latest\x20session:\x20','---\x20','startTime','newProjectId','isNewProject','error','icon','Total:\x20','state','\x22?\x20This\x20cannot\x20be\x20undone.','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','blue','utf-8','fill','fs/promises','indexOf','workflow:upload','List\x20all\x20workflow\x20projects','\x27...','session:','stdout','Pull\x20workflow\x20project\x20to\x20local\x20folder','Cancelled','Writing\x20files...','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','jsonl','resumeFrom','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','find','dim','get','✔\x20Secret\x20\x27','\x0a✔\x20Attempt\x20complete','localeCompare','✔\x20Workflow\x20run\x20started','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Validation:\x20skipped','.\x20Expected\x20format:\x20KEY=VALUE','No\x20sessions\x20with\x20timing\x20information','No\x20sessions\x20found\x20for:\x20','format','Dry\x20run:\x20yes','48357rdpjkz','tdx\x20wf\x20attempt\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20\x20Console:\x20','Analyzing\x20project...','changes','\x22\x20already\x20exists\x20(ID:\x20','workflow:secrets:list','\x0aClone\x20\x22','targetExists','filter','MAX_TASKS_DISPLAY','cancelRequested','done','start','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','some','name','\x20\x20Files\x20extracted:\x20','cyan','Retrying\x20attempt...','run','trimEnd','lastAttempt','cwd','path','✔\x20Deleted\x20project\x20','push','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','unknown','Show\x20tasks\x20for\x20an\x20attempt','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','1369vSbzsW','Kill\x20a\x20running\x20attempt','split','Key:\x20','retryAttempt','POLL_INTERVAL_MS','message','every','\x0a⚠\x20Project\x20\x22','getDate','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Invalid\x20format:\x20','rows','duration','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','12354084GhtIHL','getTime','\x20\x20tdx\x20wf\x20use\x20<project>','workflowName','Attempt\x20ID:\x20','Pattern:\x20','getMinutes','Error:\x20Secret\x20key\x20is\x20required','isArray','retryAttemptName','project','set','padStart','\x20\x20Project:\x20','\x22\x20to\x20new\x20project\x20\x22','\x0a✔\x20No\x20changes\x20to\x20push','Error:\x20Invalid\x20parameter\x20format:\x20','workflowProject','group_error','workflow:attempts','map','text','✔\x20Downloaded\x20','startsWith','Params:\x20','end','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Revision:\x20','\x22\x20with\x20new\x20revision?','length','showWorkflowConsoleUrl','autocomplete','columns','✔\x20Project\x20updated','durationMs','1244934njXhzJ','\x20modified','Warning:','sessionTime','Source:\x20','Pushing\x20workflow\x20project...','clear','Expected\x20format:\x20--param\x20key=value','\x1b[1A\x1b[2K','modified','resolve','toLowerCase','No\x20workflows\x20found','list',',\x20Workflow:\x20','Setting\x20secret...','\x0aDry\x20run\x20-\x20nothing\x20pushed','2541076HNwjjS','workflow:pull','\x0aPush\x20these\x20changes?','Select\x20a\x20task\x20to\x20view\x20logs:','Task\x20name:\x20','workflow:clone','\x20unchanged','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Source\x20directory:\x20','workflow:attempt','existingProjectId','\x20\x20Changes:\x20','diff','applyPullProject','slice','running','✔\x20New\x20project:\x20','Start\x20a\x20workflow\x20run','attempt:','2656175AMKUvh','Show\x20specific\x20attempt\x20details','MIN_TIMELINE_WIDTH','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','displayLine','Failed\x20to\x20fetch\x20attempt\x20data','resolveProject','yellow','summary','total','execute','Filter:\x20project=','\x20task','round','93779RMRGCD','Usage:\x20tdx\x20wf\x20use\x20<project>','session','listSecrets','\x20\x20Revision:\x20','values','taskName','\x20to\x20see\x20detailed\x20logs','sort','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','metadata','match','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Downloading\x20logs...','Loading\x20workflows...','new','follow','Listing\x20workflow\x20attempts...','workflow:delete','No\x20workflow\x20projects\x20found','Source\x20directory\x20is\x20required','workflow:timeline','hasChanges','newProjectName','30JfDinL','🔄\x20','relative','key','💡\x20Tip:\x20Use\x20','Force:\x20yes','Using\x20attempt\x20','Project\x20name\x20is\x20required','select','deleteSecret','Target\x20directory:\x20','from','table','limit','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20\x20Session\x20ID:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','562dNoHTS','(unknown)','yes','params','write','title','dryRun','📋\x20','size','renderSingleTimeline','No\x20workflows\x20found\x20in\x20project:\x20','kill','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','site','ICON_WIDTH','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Session\x20time:\x20','red','Loading\x20sessions...','createdAt','✔\x20Push\x20complete','fromTask','Error:','requireProject','canceling','executePushProject','projectName','filesExtracted','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Resolving\x20project\x20\x27','pollTimeline','LABEL_MIN_SPACING','✔\x20Pull\x20complete','force','No\x20attempts\x20found\x20for:\x20','Latest\x20session\x20has\x20no\x20attempt','workflow:sessions','status','Analyzing\x20changes...','No\x20projects\x20match\x20pattern:\x20','pending','\x20\x20Location:\x20','fullName','toISOString','Workflow:\x20','workflow:use','Getting\x20attempt\x20tasks...','repeat','navigateSessionsInteractive','updatedAt','\x20deleted','finishedAt','Retry\x20a\x20session\x20or\x20attempt','sessions','Error:\x20Attempt\x20ID\x20is\x20required','output','executeCloneProject','No\x20workflow\x20tdx.json\x20found','projectId','success','\x20new','renderSessionsTimeline','\x20from\x20session\x20','✔\x20Retry\x20started','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','6HsebWY','11UbaUNq','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','sourceProjectName','ICON_SPACING','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x20\x20New\x20attempt\x20ID:\x20','workflow:kill','Listing\x20workflow\x20sessions...','attemptId','startedAt','description','getFullYear','keys','📁\x20','Target:\x20','MIN_LABEL_COUNT','✔\x20Project:\x20','unchanged','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Session\x20','join','\x20-\x20','Attempt:\x20','getHours','buildTimelineData','List\x20workflow\x20execution\x20sessions','session_id','planned','\x20\x20Project\x20ID:\x20','\x20\x20Attempt\x20ID:\x20','Session\x20not\x20found:\x20','\x20logs','TASK_NAME_WIDTH'];a41_0x13e8=function(){return _0x5c87ca;};return a41_0x13e8();}function getBarChar(_0x4d0b91){const _0x245056=a41_0x448846;return _0x4d0b91===_0x245056(0x154)||_0x4d0b91===_0x245056(0x1ba)?'×':'─';}function a41_0x141e(_0x5365b0,_0x2e2e18){_0x5365b0=_0x5365b0-0x8e;const _0x13e8a0=a41_0x13e8();let _0x141e30=_0x13e8a0[_0x5365b0];return _0x141e30;}function getBarColor(_0x5373f0){const _0x4fb77e=a41_0x448846,_0x479c7d={'success':a41_0x402fbc[_0x4fb77e(0x142)],'error':a41_0x402fbc[_0x4fb77e(0x95)],'group_error':a41_0x402fbc[_0x4fb77e(0x95)],'running':a41_0x402fbc[_0x4fb77e(0x15a)],'blocked':a41_0x402fbc[_0x4fb77e(0x1f6)],'planned':a41_0x402fbc[_0x4fb77e(0x16c)],'canceling':a41_0x402fbc[_0x4fb77e(0x1f6)]};return _0x479c7d[_0x5373f0]||a41_0x402fbc[_0x4fb77e(0x12e)];}function parseTaskName(_0x5b9b04){const _0x4d1ad9=a41_0x448846;let _0xbb26ef=_0x5b9b04['replace'](/^\++/,'');const _0x49841f=_0xbb26ef[_0x4d1ad9(0x19b)]('+'),_0x545e79=_0x49841f[_0x4d1ad9(0x1c5)]>0x1?_0x49841f[_0x4d1ad9(0x1c5)]-0x2:0x0,_0x3ef90c=_0x49841f[_0x49841f[_0x4d1ad9(0x1c5)]-0x1]||_0xbb26ef;return{'level':_0x545e79,'name':'+'+_0x3ef90c};}function truncateTaskName(_0x57e0dc,_0x1eb727){const _0x1a8140=a41_0x448846,_0x10a160=stringWidth(_0x57e0dc);if(_0x10a160<=_0x1eb727)return _0x57e0dc;let _0x278d70=_0x57e0dc;while(stringWidth(_0x278d70+'…')>_0x1eb727&&_0x278d70[_0x1a8140(0x1c5)]>0x0){_0x278d70=_0x278d70[_0x1a8140(0x1ea)](0x0,-0x1);}return _0x278d70+'…';}function calculateTimeScale(_0x13be7b,_0xe1d805){const _0x336f2f=a41_0x448846;return{'startTime':_0x13be7b[_0x336f2f(0x187)],'endTime':_0x13be7b[_0x336f2f(0x1c1)],'durationMs':_0x13be7b[_0x336f2f(0x1a6)],'msPerChar':_0x13be7b[_0x336f2f(0x1a6)]/_0xe1d805};}function timeToPosition(_0x4c5c74,_0x1ae5b9,_0x142cdc){const _0x53bee1=a41_0x448846,_0x542e51=_0x4c5c74-_0x1ae5b9[_0x53bee1(0x151)],_0x36520a=Math[_0x53bee1(0x123)](_0x542e51/_0x1ae5b9[_0x53bee1(0x102)]);return Math[_0x53bee1(0x11f)](0x0,Math['min'](_0x36520a,_0x142cdc));}function renderTimeAxis(_0x48ec9a,_0x3fbf75){const _0x55ecd8=a41_0x448846,_0x48a99a=Math['min'](TIMELINE_CONFIG[_0x55ecd8(0x10a)],Math[_0x55ecd8(0x11f)](TIMELINE_CONFIG[_0x55ecd8(0xd5)],Math[_0x55ecd8(0x123)](_0x3fbf75/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x4ed722=_0x48ec9a[_0x55ecd8(0x1ca)]/(_0x48a99a-0x1),_0x3c5bf5=new Date(_0x48ec9a[_0x55ecd8(0x151)]),_0x932b87=[];for(let _0x25b73e=0x0;_0x25b73e<_0x48a99a;_0x25b73e++){const _0x36f62d=_0x48ec9a['startTime']+_0x25b73e*_0x4ed722,_0x497069=timeToPosition(_0x36f62d,_0x48ec9a,_0x3fbf75),_0x197f7b=formatTimestamp(_0x36f62d,_0x3c5bf5);_0x932b87[_0x55ecd8(0x194)]({'pos':_0x497069,'text':_0x197f7b});}const _0xa0c04c=new Array(_0x3fbf75)[_0x55ecd8(0x15c)]('\x20');let _0x1ec28c=-0x1;for(const {pos:_0x50872b,text:_0x3f17d8}of _0x932b87){let _0x4536c8=Math[_0x55ecd8(0x11f)](0x0,_0x50872b-Math[_0x55ecd8(0x123)](_0x3f17d8[_0x55ecd8(0x1c5)]/0x2));_0x4536c8<=_0x1ec28c+TIMELINE_CONFIG[_0x55ecd8(0xa3)]&&(_0x4536c8=_0x1ec28c+TIMELINE_CONFIG[_0x55ecd8(0xa3)]+0x1);_0x4536c8+_0x3f17d8[_0x55ecd8(0x1c5)]>_0x3fbf75&&(_0x4536c8=_0x3fbf75-_0x3f17d8[_0x55ecd8(0x1c5)]);if(_0x4536c8>=0x0&&_0x4536c8+_0x3f17d8[_0x55ecd8(0x1c5)]<=_0x3fbf75&&_0x4536c8>_0x1ec28c){for(let _0x3e4270=0x0;_0x3e4270<_0x3f17d8[_0x55ecd8(0x1c5)];_0x3e4270++){_0xa0c04c[_0x4536c8+_0x3e4270]=_0x3f17d8[_0x3e4270];}_0x1ec28c=_0x4536c8+_0x3f17d8[_0x55ecd8(0x1c5)]-0x1;}}return _0xa0c04c[_0x55ecd8(0xdb)]('');}function renderTaskRow(_0x24e25f,_0x4387a9,_0x6c203d,_0x4473d3){const _0x4689cd=a41_0x448846,{level:_0x5a7897,name:_0x438da8}=parseTaskName(_0x24e25f[_0x4689cd(0x18a)]),_0x3416d3='\x20'[_0x4689cd(0xb3)](_0x5a7897),_0x33a0cc=_0x24e25f[_0x4689cd(0x103)]?'('+formatElapsed(_0x24e25f['window'][_0x4689cd(0x1a6)])+')':'',_0x5aad5d=stringWidth(_0x33a0cc),_0x311741=_0x5a7897*0x1,_0x9d8d4e=_0x4473d3-_0x311741-_0x5aad5d-0x1,_0x968d30=truncateTaskName(_0x438da8,_0x9d8d4e),_0x4c6ec5=_0x3416d3+_0x968d30,_0x39c9ed=stringWidth(_0x4c6ec5),_0x5a84ce=_0x4473d3-_0x39c9ed-_0x5aad5d,_0x206e4d=_0x4c6ec5+'\x20'[_0x4689cd(0xb3)](Math[_0x4689cd(0x11f)](0x1,_0x5a84ce))+a41_0x402fbc[_0x4689cd(0x16c)](_0x33a0cc),_0x4a7f0a=getTaskStateIcon(_0x24e25f[_0x4689cd(0x157)]),_0x70409b=new Array(_0x6c203d)[_0x4689cd(0x15c)]('\x20');if(_0x24e25f[_0x4689cd(0x103)]){const _0x32fffe=timeToPosition(_0x24e25f[_0x4689cd(0x103)]['start'],_0x4387a9,_0x6c203d),_0x5c9c92=timeToPosition(_0x24e25f[_0x4689cd(0x103)][_0x4689cd(0x1c1)],_0x4387a9,_0x6c203d),_0x29928a=getBarChar(_0x24e25f[_0x4689cd(0x157)]),_0x5511e5=Math[_0x4689cd(0x11f)](_0x32fffe+0x1,_0x5c9c92);for(let _0xaae1d3=_0x32fffe;_0xaae1d3<Math['min'](_0x5511e5,_0x6c203d);_0xaae1d3++){_0x70409b[_0xaae1d3]=_0x29928a;}}const _0x4da351=getBarColor(_0x24e25f['state']),_0x65e7ff=_0x70409b['map'](_0x5d4664=>_0x5d4664==='\x20'?'\x20':_0x4da351(_0x5d4664))['join']('');return _0x4a7f0a+'\x20'+_0x206e4d+'│'+_0x65e7ff+'│';}function calculateStats(_0x5de29e){const _0x5efe45=a41_0x448846,_0x309189={'total':_0x5de29e['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x4f1191 of _0x5de29e){if(_0x4f1191[_0x5efe45(0x157)]===_0x5efe45(0xbf))_0x309189['success']++;else{if(_0x4f1191['state']===_0x5efe45(0x154)||_0x4f1191['state']===_0x5efe45(0x1ba))_0x309189['error']++;else _0x4f1191['state']===_0x5efe45(0x1eb)?_0x309189[_0x5efe45(0x1eb)]++:_0x309189[_0x5efe45(0xac)]++;}}return _0x309189;}function formatStats(_0x13d91a){const _0x5bceb8=a41_0x448846;return[_0x5bceb8(0x156)+_0x13d91a[_0x5bceb8(0x1f8)],'✅\x20'+_0x13d91a[_0x5bceb8(0xbf)],'❌\x20'+_0x13d91a['error'],_0x5bceb8(0x216)+_0x13d91a[_0x5bceb8(0x1eb)],'⏳\x20'+_0x13d91a[_0x5bceb8(0xac)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a41_0x448846(0x18a)]=a41_0x448846(0x212);[a41_0x448846(0xd0)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a41_0x448846(0x1f9)](_0x1fb4ba){const _0x2d2927=a41_0x448846,{options:_0x26d387,args:_0x572214,tdx:_0x18d964}=_0x1fb4ba;let _0x6b2a51,_0x3e4e92,_0xf1e515=![];if(_0x572214[0x0]){if(_0x572214[0x0]['includes']('.')){const _0x4c52c3=this[_0x2d2927(0xea)](_0x572214,_0x26d387);if(!_0x4c52c3)return 0x1;_0x6b2a51=_0x4c52c3['projectName'],_0x3e4e92=_0x4c52c3['workflowName'];}else{_0x3e4e92=_0x572214[0x0],_0x6b2a51=_0x26d387[_0x2d2927(0x1b9)];if(!_0x6b2a51)return console['error'](a41_0x402fbc[_0x2d2927(0x95)](_0x2d2927(0x9a)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0xf1e515=!![];}}else{const _0x4f7a7d=this['parseProjectWorkflowPattern'](_0x572214,_0x26d387);if(!_0x4f7a7d)return 0x1;_0x6b2a51=_0x4f7a7d[_0x2d2927(0x9e)],_0x3e4e92=_0x4f7a7d[_0x2d2927(0x1ab)];}if(_0x26d387[_0x2d2927(0x138)]){if(_0x6b2a51&&_0x3e4e92)console[_0x2d2927(0x154)](_0x2d2927(0x12d)+_0x6b2a51+'.'+_0x3e4e92);else _0x6b2a51&&console[_0x2d2927(0x154)](_0x2d2927(0x1fa)+_0x6b2a51);}const _0x2622db=_0x26d387[_0x2d2927(0xce)],_0x39a72e=_0x26d387[_0x2d2927(0x13b)];if(_0x2622db){_0x39a72e&&console[_0x2d2927(0x154)](a41_0x402fbc[_0x2d2927(0x1f6)](_0x2d2927(0x1cd)),_0x2d2927(0x172));const _0x2491f0=_0x26d387[_0x2d2927(0x20d)];return _0x2491f0?await this[_0x2d2927(0xa2)](_0x1fb4ba,_0x2622db):await this[_0x2d2927(0x22f)](_0x1fb4ba,_0x2622db,_0x26d387),0x0;}if(_0x39a72e){const _0x200576=await withSpinner('Loading\x20session...',()=>_0x18d964['workflow'][_0x2d2927(0xb9)]({'projectName':_0x6b2a51,'workflowName':_0x3e4e92,'limit':0x64}),{'verbose':_0x26d387[_0x2d2927(0x138)]}),_0x59c021=_0x200576['data'][_0x2d2927(0x16b)](_0x5774e1=>_0x5774e1['id']===_0x39a72e);if(!_0x59c021)return console[_0x2d2927(0x154)](a41_0x402fbc[_0x2d2927(0x95)](_0x2d2927(0x9a)),_0x2d2927(0xe5)+_0x39a72e),0x1;if(!_0x59c021['lastAttempt']?.['id'])return console[_0x2d2927(0x154)](a41_0x402fbc[_0x2d2927(0x95)](_0x2d2927(0x9a)),_0x2d2927(0xda)+_0x39a72e+'\x20has\x20no\x20attempts'),0x1;const _0x48695c=_0x59c021[_0x2d2927(0x190)]['id'];_0x26d387[_0x2d2927(0x138)]&&console[_0x2d2927(0x154)](_0x2d2927(0x21b)+_0x48695c+_0x2d2927(0xc2)+_0x39a72e);const _0xb67e25=_0x26d387[_0x2d2927(0x20d)];return _0xb67e25?await this[_0x2d2927(0xa2)](_0x1fb4ba,_0x48695c):await this[_0x2d2927(0x22f)](_0x1fb4ba,_0x48695c,_0x26d387),0x0;}const _0x4b6de2=await withSpinner(_0x2d2927(0x96),()=>_0x18d964[_0x2d2927(0x13f)][_0x2d2927(0xb9)]({'projectName':_0x6b2a51,'workflowName':_0x3e4e92,'limit':_0x26d387[_0x2d2927(0x222)]||0x32}),{'verbose':_0x26d387[_0x2d2927(0x138)]}),_0x53844b=_0x4b6de2[_0x2d2927(0x104)];if(_0x53844b[_0x2d2927(0x1c5)]===0x0){if(_0x6b2a51&&_0x3e4e92)console[_0x2d2927(0x154)](_0x2d2927(0x176)+_0x6b2a51+'.'+_0x3e4e92);else _0x6b2a51?console[_0x2d2927(0x154)](_0x2d2927(0x118)+_0x6b2a51):(console[_0x2d2927(0x154)](_0x2d2927(0xf1)),console[_0x2d2927(0x154)](a41_0x402fbc[_0x2d2927(0x16c)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x53844b[_0x2d2927(0x205)]((_0x547119,_0x3d329f)=>{const _0x331aff=_0x2d2927,_0x269509=_0x547119[_0x331aff(0x1ce)]||'',_0x34e0ce=_0x3d329f[_0x331aff(0x1ce)]||'';return _0x34e0ce[_0x331aff(0x170)](_0x269509);});if(_0x26d387[_0x2d2927(0x143)]||_0x26d387[_0x2d2927(0x168)])return await handleSDKOutput(_0x53844b,_0x26d387),0x0;let _0x5dff07;if(_0xf1e515){const _0x599d5d=_0x53844b[0x0];if(!_0x599d5d[_0x2d2927(0x190)]?.['id'])return console[_0x2d2927(0x154)](_0x2d2927(0xa7)),0x0;_0x5dff07=_0x599d5d[_0x2d2927(0x190)]['id'],_0x26d387[_0x2d2927(0x138)]&&console['error'](_0x2d2927(0x14f)+_0x599d5d[_0x2d2927(0x1ce)]);}else{const _0x214525=_0x53844b['map'](_0x4e0c94=>{const _0x3fea4f=_0x2d2927,_0x5c74c9=getAttemptStatusDisplay(_0x4e0c94[_0x3fea4f(0x190)]);return{'title':_0x4e0c94[_0x3fea4f(0x1b2)]?.['name']+'.'+_0x4e0c94['workflow']?.[_0x3fea4f(0x18a)]+_0x3fea4f(0xdc)+_0x4e0c94[_0x3fea4f(0x1ce)]+'\x20'+_0x5c74c9[_0x3fea4f(0x155)],'value':_0x4e0c94[_0x3fea4f(0x190)]?.['id']||'','description':_0x5c74c9[_0x3fea4f(0x1bd)]};}),_0x5defc8=await a41_0x131ac0({'type':_0x2d2927(0x21d),'name':_0x2d2927(0xce),'message':_0x2d2927(0x11a),'choices':_0x214525[_0x2d2927(0x183)](_0x1d75e3=>_0x1d75e3['value']!=='')});if(!_0x5defc8[_0x2d2927(0xce)])return 0x0;_0x5dff07=_0x5defc8[_0x2d2927(0xce)];}const _0x1d52fc=_0x26d387['follow'];return _0x1d52fc?await this[_0x2d2927(0xa2)](_0x1fb4ba,_0x5dff07):await this[_0x2d2927(0x22f)](_0x1fb4ba,_0x5dff07,_0x26d387),0x0;}async['renderSingleTimeline'](_0x4cdc8a,_0x175c2e,_0x23b86a){const _0x5dc0d5=a41_0x448846,{tdx:_0x2059a3}=_0x4cdc8a;let _0x1a8a67,_0x47d9c8;try{[_0x1a8a67,_0x47d9c8]=await Promise['all']([_0x2059a3[_0x5dc0d5(0x13f)]['attempt'](_0x175c2e),_0x2059a3['workflow'][_0x5dc0d5(0x113)](_0x175c2e,![])]);}catch(_0x4bb1d4){console[_0x5dc0d5(0x154)](a41_0x402fbc['red'](_0x5dc0d5(0x1f4)));_0x23b86a[_0x5dc0d5(0x138)]&&console[_0x5dc0d5(0x154)](_0x4bb1d4);throw _0x4bb1d4;}if(_0x23b86a[_0x5dc0d5(0x143)]||_0x23b86a[_0x5dc0d5(0x168)]){const _0x5b2208=this[_0x5dc0d5(0xdf)](_0x1a8a67,_0x47d9c8);await handleSDKOutput([_0x5b2208],_0x23b86a);return;}const _0x949eb3=_0x2059a3['context']['site'],_0x436ecc=this['renderTimeline'](_0x1a8a67,_0x47d9c8,_0x949eb3);console['log'](_0x436ecc);}async[a41_0x448846(0xa2)](_0x3fa035,_0x45e283){const _0x4cbab3=a41_0x448846,{tdx:_0x1415b8}=_0x3fa035,_0x282893=TIMELINE_CONFIG[_0x4cbab3(0x19e)],_0x4b5275=TIMELINE_CONFIG[_0x4cbab3(0x110)];let _0x48855c=0x0;while(_0x48855c<_0x4b5275){process['stdout']['isTTY']&&process[_0x4cbab3(0x163)][_0x4cbab3(0x22a)]('\x1bc');let _0x2fcc97,_0x5ad939;try{[_0x2fcc97,_0x5ad939]=await Promise['all']([_0x1415b8[_0x4cbab3(0x13f)]['attempt'](_0x45e283),_0x1415b8[_0x4cbab3(0x13f)][_0x4cbab3(0x113)](_0x45e283,![])]);}catch(_0x3be08f){console['error'](a41_0x402fbc[_0x4cbab3(0x95)](_0x4cbab3(0xf5)));_0x48855c>0x0&&console['error'](a41_0x402fbc['dim'](_0x4cbab3(0x93)+_0x48855c));throw _0x3be08f;}const _0x34f79c=_0x1415b8[_0x4cbab3(0xf3)][_0x4cbab3(0x91)],_0x24ab3a=this[_0x4cbab3(0x10b)](_0x2fcc97,_0x5ad939,_0x34f79c);console[_0x4cbab3(0x12f)](_0x24ab3a);const _0x48a94f=_0x2fcc97[_0x4cbab3(0x186)]&&_0x5ad939[_0x4cbab3(0x1a0)](_0x3db636=>_0x3db636[_0x4cbab3(0x157)]!==_0x4cbab3(0x1eb)&&_0x3db636['state']!=='planned');if(_0x48a94f){console[_0x4cbab3(0x154)](a41_0x402fbc[_0x4cbab3(0x142)](_0x4cbab3(0x16f)));break;}console['error'](a41_0x402fbc[_0x4cbab3(0x16c)](_0x4cbab3(0xf7)+_0x48855c*0x2+_0x4cbab3(0x149))),await new Promise(_0x179488=>setTimeout(_0x179488,_0x282893)),_0x48855c++;}_0x48855c>=_0x4b5275&&console['error'](a41_0x402fbc[_0x4cbab3(0x1f6)](_0x4cbab3(0x14e)));}[a41_0x448846(0x10b)](_0x4f64e5,_0x2fb282,_0x334e3a){const _0x5b42db=a41_0x448846,_0x55c331=[],_0x59ee45=TIMELINE_CONFIG[_0x5b42db(0xe7)],_0x319971=0x5,_0x257348=process['stdout'][_0x5b42db(0x1c8)]||0x78,_0x1cac53=_0x257348-_0x59ee45-_0x319971,_0xb67f78=Math[_0x5b42db(0x11f)](TIMELINE_CONFIG[_0x5b42db(0x1f1)],Math[_0x5b42db(0x121)](_0x1cac53,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0xdc4a51=new Date(_0x4f64e5['createdAt'])[_0x5b42db(0x1a9)](),_0x2bf4af=_0x4f64e5[_0x5b42db(0xb7)]?new Date(_0x4f64e5[_0x5b42db(0xb7)])[_0x5b42db(0x1a9)]():Date[_0x5b42db(0x13e)](),_0x4cfa5f={'start':_0xdc4a51,'end':_0x2bf4af,'duration':_0x2bf4af-_0xdc4a51},_0x1b8db3=new Map(),_0x371b80=[];for(const _0x4cb12a of _0x2fb282){if(_0x4cb12a[_0x5b42db(0xcf)]){const _0x5cd331=new Date(_0x4cb12a[_0x5b42db(0xcf)])[_0x5b42db(0x1a9)](),_0x396c51=_0x4cb12a['updatedAt']?new Date(_0x4cb12a[_0x5b42db(0xb5)])[_0x5b42db(0x1a9)]():Date[_0x5b42db(0x13e)](),_0x18f4e5={'start':_0x5cd331,'end':_0x396c51,'duration':_0x396c51-_0x5cd331};_0x1b8db3[_0x5b42db(0x1b3)](_0x4cb12a['id'],_0x18f4e5),_0x371b80['push']({'name':_0x4cb12a[_0x5b42db(0xae)],'state':_0x4cb12a['state']||_0x5b42db(0x196),'window':_0x18f4e5});}else _0x371b80[_0x5b42db(0x194)]({'name':_0x4cb12a[_0x5b42db(0xae)],'state':_0x4cb12a['state']||_0x5b42db(0xe2),'window':undefined});}_0x371b80['sort']((_0x4daac9,_0x39f0f6)=>{const _0x5a927d=_0x5b42db;if(!_0x4daac9[_0x5a927d(0x103)])return 0x1;if(!_0x39f0f6[_0x5a927d(0x103)])return-0x1;return _0x4daac9[_0x5a927d(0x103)][_0x5a927d(0x187)]-_0x39f0f6[_0x5a927d(0x103)][_0x5a927d(0x187)];});const _0x5ab1b5=_0x371b80['length'],_0x153d04=_0x5ab1b5>TIMELINE_CONFIG[_0x5b42db(0x184)];_0x153d04&&_0x371b80[_0x5b42db(0x116)](TIMELINE_CONFIG[_0x5b42db(0x184)]);const _0xc17d5e=calculateTimeScale(_0x4cfa5f,_0xb67f78),_0x1bd0b0=_0x4f64e5[_0x5b42db(0x186)]?_0x4f64e5[_0x5b42db(0xbf)]?a41_0x402fbc['green'](_0x5b42db(0xbf)):a41_0x402fbc['red']('error'):a41_0x402fbc['blue'](_0x5b42db(0x1eb)),_0x18dbd4=_0x4f64e5['project']?.['id'],_0x4ec49c=_0x4f64e5[_0x5b42db(0x13b)];let _0x5b1214;if(_0x18dbd4&&_0x4ec49c){const _0x3fef56=getWorkflowAttemptUrl(_0x334e3a,_0x18dbd4,_0x4ec49c,_0x4f64e5['id']);_0x5b1214=hyperlink(a41_0x402fbc['dim'](_0x4f64e5['id']),_0x3fef56);}else _0x5b1214=a41_0x402fbc[_0x5b42db(0x16c)](_0x4f64e5['id']);_0x55c331[_0x5b42db(0x194)](_0x5b42db(0xdd)+_0x5b1214+'\x20-\x20'+_0x1bd0b0+_0x5b42db(0xdc)+formatElapsed(_0x4cfa5f[_0x5b42db(0x1a6)]));if(_0x371b80[_0x5b42db(0x1c5)]>0x0){const _0x6c7f5b=renderTimeAxis(_0xc17d5e,_0xb67f78),_0x3d0150=new Date(_0x4cfa5f['start']),_0x43806c=formatDate(_0x3d0150),_0x25fcbf=TIMELINE_CONFIG[_0x5b42db(0x92)]+TIMELINE_CONFIG[_0x5b42db(0xc9)]+_0x59ee45,_0x367812=_0x43806c[_0x5b42db(0x1b4)](_0x25fcbf),_0x4b3189=a41_0x402fbc['dim'](_0x367812);_0x55c331[_0x5b42db(0x194)](_0x4b3189+'\x20'+_0x6c7f5b);for(const _0x5f456f of _0x371b80){_0x55c331[_0x5b42db(0x194)](renderTaskRow(_0x5f456f,_0xc17d5e,_0xb67f78,_0x59ee45));}const _0x5518a1=calculateStats(_0x371b80);_0x55c331[_0x5b42db(0x194)](formatStats(_0x5518a1)),_0x153d04&&_0x55c331[_0x5b42db(0x194)](a41_0x402fbc[_0x5b42db(0x1f6)](_0x5b42db(0x135)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+'\x20of\x20'+_0x5ab1b5+'\x20tasks')),_0x55c331[_0x5b42db(0x194)](''),_0x55c331[_0x5b42db(0x194)](a41_0x402fbc['dim'](_0x5b42db(0x219))+(_0x5b42db(0x17a)+_0x4f64e5['id']+_0x5b42db(0xe6))+a41_0x402fbc['dim'](_0x5b42db(0x204)));}else _0x55c331[_0x5b42db(0x194)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x55c331[_0x5b42db(0xdb)]('\x0a');}['buildTimelineData'](_0x2ff160,_0x1952b1){const _0x58415f=a41_0x448846,_0x46ed0a=new Date(_0x2ff160[_0x58415f(0x97)])['getTime'](),_0x3ba542=_0x2ff160[_0x58415f(0xb7)]?new Date(_0x2ff160['finishedAt'])[_0x58415f(0x1a9)]():Date['now'](),_0x3e8884=_0x3ba542-_0x46ed0a,_0x4ee3f7=[];for(const _0x21fa25 of _0x1952b1){if(_0x21fa25['startedAt']){const _0x7f83e0=new Date(_0x21fa25[_0x58415f(0xcf)])[_0x58415f(0x1a9)](),_0x210f58=_0x21fa25[_0x58415f(0xb5)]?new Date(_0x21fa25[_0x58415f(0xb5)])[_0x58415f(0x1a9)]():Date[_0x58415f(0x13e)]();_0x4ee3f7['push']({'name':_0x21fa25['fullName'],'state':_0x21fa25[_0x58415f(0x157)]||_0x58415f(0x196),'window':{'start':_0x7f83e0,'end':_0x210f58,'duration':_0x210f58-_0x7f83e0}});}else _0x4ee3f7[_0x58415f(0x194)]({'name':_0x21fa25['fullName'],'state':_0x21fa25[_0x58415f(0x157)]||'planned','window':undefined});}const _0x19c9ee=calculateStats(_0x4ee3f7);return{'attempt':{'id':_0x2ff160['id'],'status':_0x2ff160[_0x58415f(0x186)]?_0x2ff160[_0x58415f(0xbf)]?_0x58415f(0xbf):_0x58415f(0x154):_0x58415f(0x1eb),'createdAt':_0x2ff160[_0x58415f(0x97)],'finishedAt':_0x2ff160['finishedAt'],'duration_ms':_0x3e8884},'tasks':_0x4ee3f7[_0x58415f(0x1bc)](_0xec408a=>({'name':_0xec408a[_0x58415f(0x18a)],'state':_0xec408a[_0x58415f(0x157)],'startedAt':_0xec408a[_0x58415f(0x103)]?new Date(_0xec408a[_0x58415f(0x103)][_0x58415f(0x187)])[_0x58415f(0xaf)]():null,'updatedAt':_0xec408a[_0x58415f(0x103)]?new Date(_0xec408a[_0x58415f(0x103)]['end'])[_0x58415f(0xaf)]():null,'duration_ms':_0xec408a[_0x58415f(0x103)]?.['duration']||null})),'stats':_0x19c9ee};}}
|
|
1
|
+
const a41_0x139d5f=a41_0x1b9e;(function(_0x21d575,_0x16387a){const _0x2e3914=a41_0x1b9e,_0x34b616=_0x21d575();while(!![]){try{const _0x1ff112=parseInt(_0x2e3914(0x1dd))/0x1*(-parseInt(_0x2e3914(0x1ee))/0x2)+parseInt(_0x2e3914(0x256))/0x3*(parseInt(_0x2e3914(0x28b))/0x4)+-parseInt(_0x2e3914(0x2a0))/0x5*(-parseInt(_0x2e3914(0x1a0))/0x6)+parseInt(_0x2e3914(0x17a))/0x7*(parseInt(_0x2e3914(0x293))/0x8)+-parseInt(_0x2e3914(0x190))/0x9+-parseInt(_0x2e3914(0x1d6))/0xa+-parseInt(_0x2e3914(0x24b))/0xb*(-parseInt(_0x2e3914(0x2d6))/0xc);if(_0x1ff112===_0x16387a)break;else _0x34b616['push'](_0x34b616['shift']());}catch(_0x309a00){_0x34b616['push'](_0x34b616['shift']());}}}(a41_0x3efd,0x5c6ce));import a41_0x50b6be from'chalk';import{existsSync}from'fs';import a41_0x145759 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}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 a41_0x116876 from'prompts';function getAttemptStatusDisplay(_0x33d63c){const _0xc5f83d=a41_0x1b9e;if(!_0x33d63c)return{'icon':'⏳','text':''};const {done:_0x295b0d,success:_0x146c4b,cancelRequested:_0x1f83bb}=_0x33d63c;if(!_0x295b0d)return _0x1f83bb?{'icon':'🛑','text':a41_0x50b6be[_0xc5f83d(0x1d8)](_0xc5f83d(0x2cf))}:{'icon':'🔄','text':a41_0x50b6be[_0xc5f83d(0x17c)]('running')};if(_0x146c4b)return{'icon':'✅','text':a41_0x50b6be[_0xc5f83d(0x20b)](_0xc5f83d(0x1fd))};return{'icon':'❌','text':a41_0x50b6be[_0xc5f83d(0x266)](_0xc5f83d(0x295))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0xa433a,_0x2c5c60,_0x17f2a0=0x0){const _0x2434c0=a41_0x1b9e;return _0xa433a[_0x17f2a0]||_0x2c5c60[_0x2434c0(0x25e)];}[a41_0x139d5f(0x243)](_0x33cd7f,_0x236bdf,_0x546e4b=0x0){const _0x53b9ce=a41_0x139d5f,_0x44f6b9=this[_0x53b9ce(0x1c9)](_0x33cd7f,_0x236bdf,_0x546e4b);if(!_0x44f6b9)return console[_0x53b9ce(0x295)](a41_0x50b6be[_0x53b9ce(0x266)](_0x53b9ce(0x232)),_0x53b9ce(0x183)),console['error'](a41_0x50b6be['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x44f6b9;}[a41_0x139d5f(0x1b6)](_0xb5e9fd,_0x36d2d1){const _0xe078ed=a41_0x139d5f;if(_0xb5e9fd[0x0]){const _0xe4e0dd=_0xb5e9fd[0x0][_0xe078ed(0x18d)]('.');if(_0xe4e0dd['length']===0x1)return{'projectName':_0xe4e0dd[0x0],'workflowName':undefined};else return _0xe4e0dd[_0xe078ed(0x207)]===0x2?{'projectName':_0xe4e0dd[0x0],'workflowName':_0xe4e0dd[0x1]}:(console[_0xe078ed(0x295)](a41_0x50b6be[_0xe078ed(0x266)]('Error:'),_0xe078ed(0x1b1)),null);}return{'projectName':_0x36d2d1[_0xe078ed(0x25e)],'workflowName':undefined};}[a41_0x139d5f(0x141)](_0x269213,_0x5d047c,_0x47bddf=0x0){const _0x40dfcd=a41_0x139d5f;if(_0x269213[_0x47bddf])return _0x269213[_0x47bddf];if(_0x5d047c[_0x40dfcd(0x25e)]){const _0x3777b9=a41_0x145759[_0x40dfcd(0x168)](process[_0x40dfcd(0x1bf)](),_0x40dfcd(0x2bc),_0x5d047c[_0x40dfcd(0x25e)]);if(existsSync(a41_0x145759[_0x40dfcd(0x168)](_0x3777b9,_0x40dfcd(0x15e))))return _0x3777b9;}return undefined;}async['showWorkflowConsoleUrl'](_0x151104,_0xb3ceb1,_0xd0cb6a){const _0x160663=a41_0x139d5f;try{const _0x9109e6=await _0x151104['workflow'][_0x160663(0x2bc)](_0xb3ceb1,{'limit':0x1});if(_0x9109e6['length']>0x0){const _0x46496b=_0x9109e6[0x0]['id'],_0xf4fecf=getWorkflowUrl(_0xd0cb6a,_0x46496b);console['error'](_0x160663(0x2c6)+a41_0x50b6be['cyan'](_0xf4fecf));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a41_0x139d5f(0x167)]='workflow:use';[a41_0x139d5f(0x25d)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a41_0x139d5f(0x175)](_0x6edb12){const _0x41b5a1=a41_0x139d5f,{options:_0x55ef68,args:_0x42345f,tdx:_0x3d0ee9}=_0x6edb12,_0x1ed6f9=_0x42345f[0x0],_0x41c010=_0x55ef68[_0x41b5a1(0x1e7)];if(_0x41c010)return saveSessionContext({'workflow_project':undefined},_0x55ef68[_0x41b5a1(0x2b8)]),console[_0x41b5a1(0x215)](a41_0x50b6be[_0x41b5a1(0x20b)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x1ed6f9)return console['error'](a41_0x50b6be['red'](_0x41b5a1(0x232)),_0x41b5a1(0x183)),console['error'](a41_0x50b6be[_0x41b5a1(0x176)](_0x41b5a1(0x2ad))),console[_0x41b5a1(0x295)](a41_0x50b6be[_0x41b5a1(0x176)](_0x41b5a1(0x2e1))),0x1;const _0x569862=await withSpinner(_0x41b5a1(0x29c)+_0x1ed6f9+_0x41b5a1(0x27d),()=>_0x3d0ee9[_0x41b5a1(0x2b6)][_0x41b5a1(0x1fb)](_0x1ed6f9),{'verbose':_0x55ef68['verbose']}),{name:_0x2b93a5}=_0x569862[_0x41b5a1(0x2d9)];return saveSessionContext({'workflow_project':_0x2b93a5},_0x55ef68[_0x41b5a1(0x2b8)]),console[_0x41b5a1(0x215)](a41_0x50b6be[_0x41b5a1(0x20b)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a41_0x50b6be[_0x41b5a1(0x2ce)](_0x2b93a5))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x28e);[a41_0x139d5f(0x25d)]='List\x20all\x20workflow\x20projects';async[a41_0x139d5f(0x175)](_0xdc50ae){const _0x7a62c5=a41_0x139d5f,{options:_0x30d664,args:_0x1d89c2,tdx:_0x3e62d9}=_0xdc50ae,_0x2c6924=_0x1d89c2[0x0];_0x30d664[_0x7a62c5(0x1e9)]&&_0x2c6924&&console[_0x7a62c5(0x295)](_0x7a62c5(0x1da)+_0x2c6924);const _0x22ecaa=await withSpinner(_0x7a62c5(0x208),()=>_0x3e62d9['workflow'][_0x7a62c5(0x277)](_0x2c6924,{'limit':_0x30d664[_0x7a62c5(0x1b9)]}),{'verbose':_0x30d664[_0x7a62c5(0x1e9)]});let _0x4c1471=_0x22ecaa[_0x7a62c5(0x2d9)];_0x4c1471['sort']((_0x484ef8,_0x1e037b)=>_0x484ef8[_0x7a62c5(0x167)][_0x7a62c5(0x272)](_0x1e037b['name']));const _0x3ba087=_0x30d664[_0x7a62c5(0x1b9)]||0x64,_0x1162f6=_0x4c1471[_0x7a62c5(0x207)]>=_0x3ba087?a41_0x50b6be['dim'](_0x7a62c5(0x1e4)):'';console['error'](_0x7a62c5(0x262)+_0x4c1471['length']+_0x7a62c5(0x23d)+(_0x4c1471[_0x7a62c5(0x207)]!==0x1?'s':'')+_0x1162f6);if(_0x30d664['format']===_0x7a62c5(0x18f)||_0x30d664[_0x7a62c5(0x1d3)]===_0x7a62c5(0x248)||_0x30d664[_0x7a62c5(0x1d3)]===_0x7a62c5(0x260))await handleSDKOutput(_0x4c1471,_0x30d664);else{if(_0x4c1471[_0x7a62c5(0x207)]===0x0)_0x2c6924?console['log'](_0x7a62c5(0x172)+_0x2c6924):console[_0x7a62c5(0x215)](_0x7a62c5(0x1f9));else{const _0x2a6b78=_0x4c1471[_0x7a62c5(0x2a3)](_0x1f5320=>{const _0x4adc81=_0x7a62c5,_0xbd0ee4=_0x1f5320[_0x4adc81(0x1ac)]?.[_0x4adc81(0x238)](_0xa00788=>_0xa00788['key']==='sys'),_0x5d9529=_0xbd0ee4?a41_0x50b6be[_0x4adc81(0x176)](_0x4adc81(0x224)):'';return _0x4adc81(0x21f)+_0x1f5320[_0x4adc81(0x167)]+_0x5d9529;});await writeOutput(_0x2a6b78[_0x7a62c5(0x168)]('\x0a'),_0x30d664['output'],_0x7a62c5(0x2c5));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x1ad);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x27b);async[a41_0x139d5f(0x175)](_0x1c2648){const _0x3a1550=a41_0x139d5f,{options:_0x5d37fb,args:_0x315236,tdx:_0x4d81c0}=_0x1c2648,_0x28bdd5=this['resolveProject'](_0x315236,_0x5d37fb);_0x5d37fb['verbose']&&_0x28bdd5&&console[_0x3a1550(0x295)](_0x3a1550(0x278)+_0x28bdd5);const _0x5c067c=await withSpinner(_0x3a1550(0x2a7),()=>_0x4d81c0[_0x3a1550(0x2b6)][_0x3a1550(0x2bc)](_0x28bdd5,{'limit':_0x5d37fb['limit']}),{'verbose':_0x5d37fb[_0x3a1550(0x1e9)]});let _0x26aea1=_0x5c067c[_0x3a1550(0x2d9)];_0x26aea1[_0x3a1550(0x161)]((_0x3e2beb,_0x562bc7)=>{const _0x427b6e=_0x3a1550,_0x25b2ac=_0x3e2beb['name']['localeCompare'](_0x562bc7[_0x427b6e(0x167)]);if(_0x25b2ac!==0x0)return _0x25b2ac;return(_0x3e2beb[_0x427b6e(0x1cb)]?.[_0x427b6e(0x167)]||'')[_0x427b6e(0x272)](_0x562bc7['project']?.[_0x427b6e(0x167)]||'');});const _0x7bff14=_0x5d37fb[_0x3a1550(0x1b9)]||0x64,_0x1379c6=_0x26aea1[_0x3a1550(0x207)]>=_0x7bff14?a41_0x50b6be[_0x3a1550(0x176)](_0x3a1550(0x1e4)):'';console[_0x3a1550(0x295)](_0x3a1550(0x262)+_0x26aea1[_0x3a1550(0x207)]+_0x3a1550(0x2c4)+(_0x26aea1[_0x3a1550(0x207)]!==0x1?'s':'')+_0x1379c6);if(_0x5d37fb[_0x3a1550(0x1d3)]===_0x3a1550(0x18f)||_0x5d37fb[_0x3a1550(0x1d3)]===_0x3a1550(0x248)||_0x5d37fb[_0x3a1550(0x1d3)]==='table')await handleSDKOutput(_0x26aea1,_0x5d37fb);else{if(_0x26aea1[_0x3a1550(0x207)]===0x0)_0x28bdd5?console[_0x3a1550(0x215)](_0x3a1550(0x17e)+_0x28bdd5):console['log'](_0x3a1550(0x29d));else{const _0x480f57=_0x5d37fb[_0x3a1550(0x1f8)],_0x4d95f3=_0x26aea1[_0x3a1550(0x2a3)](_0x5f145c=>{const _0x86d637=_0x3a1550,_0x323d87=a41_0x50b6be[_0x86d637(0x176)]('#'+_0x5f145c['id']),_0x29c819=hyperlink(_0x323d87,getWorkflowUrl(_0x480f57,_0x5f145c['id'])),_0x4bff76=_0x5f145c[_0x86d637(0x1cb)]?.[_0x86d637(0x167)]?a41_0x50b6be[_0x86d637(0x176)]('\x20('+_0x5f145c[_0x86d637(0x1cb)][_0x86d637(0x167)]+')'):'';return _0x86d637(0x159)+_0x29c819+'\x20'+_0x5f145c[_0x86d637(0x167)]+_0x4bff76;});await writeOutput(_0x4d95f3[_0x3a1550(0x168)]('\x0a'),_0x5d37fb[_0x3a1550(0x2c1)],_0x3a1550(0x2c5));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x2b1);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x16e);async[a41_0x139d5f(0x175)](_0x37e4b8){const _0x3087e9=a41_0x139d5f,{options:_0xed9a62,args:_0x35175c,tdx:_0x151b4a}=_0x37e4b8,_0x230150=this[_0x3087e9(0x1b6)](_0x35175c,_0xed9a62);if(!_0x230150)return 0x1;const {projectName:_0x46d1ac,workflowName:_0x5bccf1}=_0x230150;if(_0xed9a62[_0x3087e9(0x1e9)]){if(_0x46d1ac&&_0x5bccf1)console['error'](_0x3087e9(0x221)+_0x46d1ac+'.'+_0x5bccf1);else _0x46d1ac&&console[_0x3087e9(0x295)]('Filter:\x20project='+_0x46d1ac);const _0x366439=_0xed9a62[_0x3087e9(0x1f4)];_0x366439&&console['error'](_0x3087e9(0x16b)+_0x366439);}let _0x668ce9=0x28;if(process[_0x3087e9(0x178)][_0x3087e9(0x170)]&&!_0xed9a62[_0x3087e9(0x2c1)]&&!_0xed9a62['format']){const _0x1dee07=process[_0x3087e9(0x178)][_0x3087e9(0x25b)]||0x28;_0x668ce9=Math[_0x3087e9(0x1a9)](0x14,Math[_0x3087e9(0x2ac)](_0x1dee07*0x2/0x3));}const _0x109098=_0xed9a62[_0x3087e9(0x1b9)]||_0x668ce9,_0x4263fd=await withSpinner(_0x3087e9(0x203),()=>_0x151b4a[_0x3087e9(0x2b6)]['sessions']({'projectName':_0x46d1ac,'workflowName':_0x5bccf1,'status':_0xed9a62[_0x3087e9(0x1f4)],'fromTime':_0xed9a62[_0x3087e9(0x18a)],'toTime':_0xed9a62['to'],'limit':_0x109098}),{'verbose':_0xed9a62[_0x3087e9(0x1e9)]}),_0x3082d9=_0x4263fd[_0x3087e9(0x2d9)];_0x3082d9[_0x3087e9(0x161)]((_0x45176a,_0x204cd5)=>{const _0x1eb8f3=_0x3087e9,_0x470c87=_0x45176a[_0x1eb8f3(0x1c1)]||'',_0x33cbce=_0x204cd5['sessionTime']||'';return _0x33cbce['localeCompare'](_0x470c87);});_0x3082d9[_0x3087e9(0x207)]>=_0x109098?console[_0x3087e9(0x295)](_0x3087e9(0x23a)+_0x3082d9[_0x3087e9(0x207)]+_0x3087e9(0x298)+a41_0x50b6be['dim'](_0x3087e9(0x233))):console[_0x3087e9(0x295)]('✔\x20Found\x20'+_0x3082d9[_0x3087e9(0x207)]+_0x3087e9(0x1b4)+(_0x3082d9[_0x3087e9(0x207)]!==0x1?'s':''));if(_0xed9a62[_0x3087e9(0x1d3)]==='json'||_0xed9a62['format']===_0x3087e9(0x248)||_0xed9a62['format']===_0x3087e9(0x260))await handleSDKOutput(_0x3082d9,_0xed9a62);else{if(!process[_0x3087e9(0x178)][_0x3087e9(0x170)]||_0xed9a62[_0x3087e9(0x2c1)]){if(_0x3082d9[_0x3087e9(0x207)]===0x0){if(_0x46d1ac&&_0x5bccf1)console[_0x3087e9(0x215)](_0x3087e9(0x15d)+_0x46d1ac+'.'+_0x5bccf1);else _0x46d1ac?console['log'](_0x3087e9(0x1b8)+_0x46d1ac):console[_0x3087e9(0x215)]('No\x20sessions\x20found');}else{const _0x394ad6=_0xed9a62[_0x3087e9(0x1f8)],_0x4847d7=this['renderSessionsTimeline'](_0x3082d9,_0x394ad6);_0xed9a62['output']?await writeOutput(_0x4847d7,_0xed9a62[_0x3087e9(0x2c1)],_0x3087e9(0x2c5)):console['log'](_0x4847d7);}!_0x46d1ac&&(console[_0x3087e9(0x295)](''),console['error'](a41_0x50b6be[_0x3087e9(0x176)](_0x3087e9(0x22b))),console[_0x3087e9(0x295)](a41_0x50b6be[_0x3087e9(0x176)](_0x3087e9(0x27c))+'or'+a41_0x50b6be[_0x3087e9(0x176)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x3082d9['length']===0x0){if(_0x46d1ac&&_0x5bccf1)console[_0x3087e9(0x215)]('No\x20sessions\x20found\x20for:\x20'+_0x46d1ac+'.'+_0x5bccf1);else _0x46d1ac?console[_0x3087e9(0x215)](_0x3087e9(0x1b8)+_0x46d1ac):console['log']('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x3082d9,_0x37e4b8,_0x46d1ac);}}return 0x0;}[a41_0x139d5f(0x193)](_0x45de5b,_0x32ad85){const _0x50a8a8=a41_0x139d5f,_0x5367da=[],_0x3eef3c=new Map();let _0x672317=Infinity,_0x100f23=-Infinity;for(const _0x54a305 of _0x45de5b){if(_0x54a305[_0x50a8a8(0x218)]?.['createdAt']){const _0x4bd828=new Date(_0x54a305[_0x50a8a8(0x218)][_0x50a8a8(0x290)])['getTime'](),_0x19cc2d=_0x54a305[_0x50a8a8(0x218)][_0x50a8a8(0x299)]?new Date(_0x54a305[_0x50a8a8(0x218)][_0x50a8a8(0x299)])[_0x50a8a8(0x1b5)]():Date[_0x50a8a8(0x2a9)](),_0x4ed25d=_0x54a305[_0x50a8a8(0x1cb)]?.[_0x50a8a8(0x167)]||_0x50a8a8(0x192);!_0x3eef3c['has'](_0x4ed25d)&&_0x3eef3c[_0x50a8a8(0x1bd)](_0x4ed25d,[]),_0x3eef3c[_0x50a8a8(0x1eb)](_0x4ed25d)['push']({'session':_0x54a305,'startTime':_0x4bd828,'endTime':_0x19cc2d,'duration':_0x19cc2d-_0x4bd828}),_0x672317=Math['min'](_0x672317,_0x4bd828),_0x100f23=Math[_0x50a8a8(0x1a9)](_0x100f23,_0x19cc2d);}}if(_0x3eef3c[_0x50a8a8(0x1c3)]===0x0)return _0x50a8a8(0x1a6);const _0x40ccf5=process['stdout'][_0x50a8a8(0x228)]||0x78,_0x2c45f1=0x1e,_0x236e4c=0x32,_0x385472=0x4,_0x227603=Math['min'](_0x236e4c,Math[_0x50a8a8(0x1a9)](_0x2c45f1,Math[_0x50a8a8(0x2ac)](_0x40ccf5*0.3))),_0x54f846=_0x40ccf5-_0x227603-TIMELINE_CONFIG[_0x50a8a8(0x2de)]-0x3-_0x385472,_0x39e77d=_0x100f23-_0x672317,_0x3e7f6d=_0x39e77d/_0x227603,_0x3c4935=renderTimeAxis({'startTime':_0x672317,'endTime':_0x100f23,'durationMs':_0x39e77d,'msPerChar':_0x3e7f6d},_0x227603),_0xd5348=[];for(const _0x277237 of _0x3eef3c['values']()){_0xd5348['push'](..._0x277237);}_0xd5348[_0x50a8a8(0x161)]((_0xd19f0e,_0x566c2f)=>_0x566c2f[_0x50a8a8(0x14b)]-_0xd19f0e['startTime']);const _0xf41167=new Date(_0x672317),_0x70105b=formatDate(_0xf41167),_0x4b5e9f=_0x385472+TIMELINE_CONFIG[_0x50a8a8(0x2bf)]+TIMELINE_CONFIG['ICON_SPACING']+_0x54f846,_0x21d153='\x20'['repeat'](_0x4b5e9f-_0x70105b[_0x50a8a8(0x207)]),_0x3c373d=_0x21d153+a41_0x50b6be[_0x50a8a8(0x176)](_0x70105b)+'\x20'+_0x3c4935;_0x5367da[_0x50a8a8(0x2b2)](_0x3c373d);const _0x4bb98d=0x16;let _0x4587b7=0x0;for(const _0x43f4d9 of _0xd5348){const _0x3d534d=_0x43f4d9['session'][_0x50a8a8(0x1cb)]?.['name']||'?',_0x1129e9=Math[_0x50a8a8(0x253)](stringWidth(_0x3d534d),_0x4bb98d);_0x4587b7=Math[_0x50a8a8(0x1a9)](_0x4587b7,_0x1129e9);}for(const _0x419732 of _0xd5348){const {session:_0x4453cb,startTime:_0x2461b1,endTime:_0x4c7b0e,duration:_0x303125}=_0x419732,_0x29b0ba=_0x4453cb[_0x50a8a8(0x1cb)]?.['id'],_0x566076=_0x4453cb['id'],_0x533c54=_0x4453cb[_0x50a8a8(0x1cb)]?.[_0x50a8a8(0x167)]||'?',_0x28c4b8=_0x4453cb[_0x50a8a8(0x2b6)]?.[_0x50a8a8(0x167)]||'?';let _0x3ff8f0,_0x463ffd;if(_0x4453cb['lastAttempt']){const _0x31ba1d=_0x4453cb['lastAttempt'];!_0x31ba1d[_0x50a8a8(0x13d)]?(_0x3ff8f0=_0x31ba1d[_0x50a8a8(0x22a)]?'🛑':'🔄',_0x463ffd=_0x31ba1d['cancelRequested']?a41_0x50b6be[_0x50a8a8(0x1d8)]:a41_0x50b6be['blue']):(_0x3ff8f0=_0x31ba1d[_0x50a8a8(0x1fd)]?'✅':'❌',_0x463ffd=_0x31ba1d[_0x50a8a8(0x1fd)]?a41_0x50b6be['green']:a41_0x50b6be[_0x50a8a8(0x266)]);}else _0x3ff8f0='⏳',_0x463ffd=a41_0x50b6be[_0x50a8a8(0x176)];const _0x17bf21='#'+_0x566076,_0x21876f=_0x29b0ba?hyperlink(_0x17bf21,getWorkflowSessionUrl(_0x32ad85,_0x29b0ba,_0x566076)):_0x17bf21;let _0x4878ee=_0x533c54;stringWidth(_0x533c54)>_0x4bb98d&&(_0x4878ee=_0x533c54[_0x50a8a8(0x211)](0x0,_0x4bb98d-0x1)+'…');const _0x55862e=a41_0x50b6be[_0x50a8a8(0x176)](_0x4878ee),_0x170791=stringWidth(_0x4878ee),_0x65c3fe='\x20'['repeat'](_0x4587b7-stringWidth(_0x4878ee)+0x2),_0x4684fd='('+formatElapsed(_0x303125)+')',_0x1951b6=stringWidth(_0x4684fd),_0x2643ce=stringWidth(_0x17bf21),_0x356c3d=_0x2643ce+0x1+_0x170791+_0x65c3fe['length'],_0x153dd2=_0x54f846-_0x356c3d-_0x1951b6-0x1-0x8;let _0xa9fb33=_0x28c4b8;stringWidth(_0xa9fb33)>_0x153dd2&&(_0xa9fb33=_0xa9fb33[_0x50a8a8(0x211)](0x0,_0x153dd2-0x1)+'…');const _0x6d50e3=_0x21876f+'\x20'+_0x55862e+_0x65c3fe+_0xa9fb33,_0x3b1bbe=stringWidth(_0x6d50e3),_0x104cd6=_0x54f846-_0x3b1bbe-_0x1951b6,_0x487cbb=_0x6d50e3+'\x20'[_0x50a8a8(0x274)](Math[_0x50a8a8(0x1a9)](0x1,_0x104cd6))+a41_0x50b6be[_0x50a8a8(0x176)](_0x4684fd),_0x1134a7=Math[_0x50a8a8(0x2ac)]((_0x2461b1-_0x672317)/_0x3e7f6d),_0x3e5d36=Math['floor']((_0x4c7b0e-_0x672317)/_0x3e7f6d),_0xf667a6=Math['max'](_0x1134a7+0x1,_0x3e5d36),_0x17f41c=new Array(_0x227603)[_0x50a8a8(0x251)]('\x20');for(let _0x43f9a4=_0x1134a7;_0x43f9a4<Math[_0x50a8a8(0x253)](_0xf667a6,_0x227603);_0x43f9a4++){_0x17f41c[_0x43f9a4]='─';}const _0x189ded=_0x17f41c[_0x50a8a8(0x2a3)](_0x3463b8=>_0x3463b8==='\x20'?'\x20':_0x463ffd(_0x3463b8))[_0x50a8a8(0x168)]('');_0x5367da[_0x50a8a8(0x2b2)](_0x3ff8f0+'\x20'+_0x487cbb+'│'+_0x189ded+'│');}return _0x5367da['join']('\x0a');}async['navigateSessionsInteractive'](_0x4fef3a,_0x194a0d,_0x690eb3){const _0x1c1364=a41_0x139d5f,{options:_0xf49cd4,tdx:_0x1b19bd}=_0x194a0d,_0x223c97=_0xf49cd4['site'],{timelineRows:_0x1176ac,timeAxisHeader:_0x2fa9c8}=this[_0x1c1364(0x1ff)](_0x4fef3a,_0x223c97),_0x3ed817=_0x1176ac[_0x1c1364(0x15b)](_0x452226=>_0x452226[_0x1c1364(0x1d1)]);if(_0x3ed817['length']===0x0){const _0x3f0d36=this['renderSessionsTimeline'](_0x4fef3a,_0x223c97);console['log'](_0x3f0d36);!_0x690eb3&&(console[_0x1c1364(0x295)](''),console[_0x1c1364(0x295)](a41_0x50b6be['dim'](_0x1c1364(0x22b))),console[_0x1c1364(0x295)](a41_0x50b6be[_0x1c1364(0x176)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a41_0x50b6be['dim'](_0x1c1364(0x240))));return;}_0x2fa9c8&&console[_0x1c1364(0x215)](_0x2fa9c8);const _0x297d47=_0x1176ac[_0x1c1364(0x15b)](_0xa82e8e=>_0xa82e8e['attemptId'])['map'](_0x524fd3=>({'title':_0x524fd3['displayLine'],'value':_0x524fd3[_0x1c1364(0x1d1)]})),_0x4e214b=process[_0x1c1364(0x178)][_0x1c1364(0x25b)]||0x3c,_0x1b9f0b=Math[_0x1c1364(0x1a9)](0x28,Math[_0x1c1364(0x2ac)](_0x4e214b*0x2/0x3)),_0x16d626=await a41_0x116876({'type':_0x1c1364(0x1cd),'name':'attemptId','message':_0x1c1364(0x22e),'choices':_0x297d47,'initial':-0x1,'limit':_0x1b9f0b,'clearFirst':!![],'fallback':{'title':_0x1c1364(0x267),'value':null},'suggest':(_0x380388,_0x39dd0e)=>{const _0x908bf0=_0x1c1364;if(!_0x380388)return Promise[_0x908bf0(0x2a8)](_0x39dd0e);const _0x337efd=_0x39dd0e['filter'](_0x3ba895=>{const _0x43ba2d=_0x908bf0,_0xfea055=_0x3ba895;return _0xfea055['title'][_0x43ba2d(0x2c7)]()[_0x43ba2d(0x19d)](_0x380388['toLowerCase']());});return Promise[_0x908bf0(0x2a8)](_0x337efd);}}),_0x5ed949=()=>{const _0x3c3259=_0x1c1364;process[_0x3c3259(0x178)][_0x3c3259(0x2df)]('\x1b[1A\x1b[2K'),process['stdout'][_0x3c3259(0x2df)](_0x3c3259(0x2be)),process[_0x3c3259(0x178)]['write'](_0x3c3259(0x2be));},_0x59d41d=_0x16d626&&_0x16d626[_0x1c1364(0x1d1)]&&_0x16d626[_0x1c1364(0x1d1)]!==null&&_0x16d626[_0x1c1364(0x1d1)][_0x1c1364(0x26b)]()!=='';if(!_0x59d41d){_0x5ed949(),console[_0x1c1364(0x215)](a41_0x50b6be[_0x1c1364(0x176)](_0x1c1364(0x2a2)));return;}_0x5ed949();const _0x27e054=_0x4fef3a[_0x1c1364(0x164)](_0x5741c6=>_0x5741c6[_0x1c1364(0x218)]?.['id']===_0x16d626[_0x1c1364(0x1d1)]);if(_0x27e054){const _0xf08ab1=_0x27e054[_0x1c1364(0x1cb)]?.[_0x1c1364(0x167)]||'?',_0xc53959=_0x27e054[_0x1c1364(0x2b6)]?.[_0x1c1364(0x167)]||'?';console[_0x1c1364(0x215)](_0x1c1364(0x209)+a41_0x50b6be[_0x1c1364(0x176)](_0xf08ab1)+_0x1c1364(0x155)+a41_0x50b6be[_0x1c1364(0x176)](_0xc53959));}const _0x436beb=new WorkflowTimelineCommand();await _0x436beb['execute']({'args':[],'options':{..._0xf49cd4,'attemptId':_0x16d626[_0x1c1364(0x1d1)]},'tdx':_0x1b19bd});}['generateSessionTimelineRows'](_0x4f6cc1,_0x12867a){const _0x331711=a41_0x139d5f,_0x4a347d=new Map();for(const _0x22cc64 of _0x4f6cc1){_0x22cc64['id']&&_0x22cc64[_0x331711(0x218)]?.['id']&&_0x4a347d[_0x331711(0x1bd)](_0x22cc64['id'],_0x22cc64[_0x331711(0x218)]['id']);}const _0x275646=[];let _0x222616='';const _0x418566=this['renderSessionsTimeline'](_0x4f6cc1,_0x12867a),_0x57dc87=_0x418566[_0x331711(0x18d)]('\x0a');for(const _0x33230a of _0x57dc87){if(_0x33230a['startsWith']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x33230a[_0x331711(0x202)](/^\s+\d{4}-\d{2}-\d{2}/))_0x222616=_0x33230a;else{if(_0x33230a[_0x331711(0x202)](/^[✅❌🔄🛑⏳]/)){const _0x2d6bdb=_0x33230a[_0x331711(0x202)](/#(\d+)/),_0x57e1e3=_0x2d6bdb?_0x2d6bdb[0x1]:null,_0x3e1034=_0x57e1e3?_0x4a347d[_0x331711(0x1eb)](_0x57e1e3)||null:null,_0x27ea2b=_0x4f6cc1[_0x331711(0x164)](_0x9d169b=>_0x9d169b['id']===_0x57e1e3),_0x3efc2d=_0x27ea2b?.[_0x331711(0x1cb)]?.[_0x331711(0x167)]||'';_0x275646['push']({'displayLine':_0x33230a,'attemptId':_0x3e1034,'projectName':_0x3efc2d});}}}return{'timelineRows':_0x275646,'timeAxisHeader':_0x222616};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x20e);['description']=a41_0x139d5f(0x28c);async['execute'](_0x123db9){const _0x57ec3a=a41_0x139d5f,{options:_0x1bb77c,args:_0x2dbc07,tdx:_0x4b099b}=_0x123db9,_0x3d9c74=this[_0x57ec3a(0x1b6)](_0x2dbc07,_0x1bb77c);if(!_0x3d9c74)return 0x1;const {projectName:_0x2094d2,workflowName:_0x2b6031}=_0x3d9c74,_0x4d1e9e=_0x1bb77c['includeRetried'];if(_0x1bb77c['verbose']){if(_0x2094d2&&_0x2b6031)console[_0x57ec3a(0x295)](_0x57ec3a(0x221)+_0x2094d2+'.'+_0x2b6031);else _0x2094d2&&console['error'](_0x57ec3a(0x188)+_0x2094d2);_0x4d1e9e&&console['error'](_0x57ec3a(0x29e));}const _0x2040bc=await withSpinner(_0x57ec3a(0x1ae),()=>_0x4b099b['workflow'][_0x57ec3a(0x1e3)]({'projectName':_0x2094d2,'workflowName':_0x2b6031,'includeRetried':_0x4d1e9e,'limit':_0x1bb77c[_0x57ec3a(0x1b9)]}),{'verbose':_0x1bb77c[_0x57ec3a(0x1e9)]}),_0x2a8df1=_0x2040bc['data'],_0x5bd241=_0x1bb77c[_0x57ec3a(0x1b9)]||0x64,_0x4136df=_0x2a8df1[_0x57ec3a(0x207)]>=_0x5bd241?a41_0x50b6be[_0x57ec3a(0x176)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x57ec3a(0x295)](_0x57ec3a(0x262)+_0x2a8df1[_0x57ec3a(0x207)]+_0x57ec3a(0x2d8)+(_0x2a8df1[_0x57ec3a(0x207)]!==0x1?'s':'')+_0x4136df);if(_0x1bb77c[_0x57ec3a(0x1d3)]===_0x57ec3a(0x18f)||_0x1bb77c[_0x57ec3a(0x1d3)]===_0x57ec3a(0x248)||_0x1bb77c[_0x57ec3a(0x1d3)]===_0x57ec3a(0x260))await handleSDKOutput(_0x2a8df1,_0x1bb77c);else{if(_0x2a8df1[_0x57ec3a(0x207)]===0x0){if(_0x2094d2&&_0x2b6031)console[_0x57ec3a(0x215)](_0x57ec3a(0x216)+_0x2094d2+'.'+_0x2b6031);else _0x2094d2?console['log']('No\x20attempts\x20found\x20in\x20project:\x20'+_0x2094d2):console['log']('No\x20attempts\x20found');}else{const _0x41e3c8=_0x1bb77c[_0x57ec3a(0x1f8)],_0x50c7ed=_0x2a8df1[_0x57ec3a(0x2a3)](_0x4c7089=>{const _0x520ab1=_0x57ec3a,_0x45a806=a41_0x50b6be[_0x520ab1(0x176)]('#'+_0x4c7089['id']),_0x109e05=_0x4c7089['project']?.['id'],_0xdb1489=_0x4c7089[_0x520ab1(0x2c9)]||_0x4c7089[_0x520ab1(0x223)],_0x1849c3=_0x109e05&&_0xdb1489?hyperlink(_0x45a806,getWorkflowAttemptUrl(_0x41e3c8,_0x109e05,_0xdb1489,_0x4c7089['id'])):_0x45a806,{icon:_0x13163e,text:_0x260787}=getAttemptStatusDisplay(_0x4c7089),_0x2ce38f=(_0x4c7089[_0x520ab1(0x1cb)]?.[_0x520ab1(0x167)]||'?')+'.'+(_0x4c7089['workflow']?.[_0x520ab1(0x167)]||'?'),_0x2047e5=_0x4c7089[_0x520ab1(0x1c1)]?a41_0x50b6be[_0x520ab1(0x176)](_0x4c7089[_0x520ab1(0x1c1)]):'';return(_0x1849c3+'\x20'+_0x13163e+(_0x260787?'\x20'+_0x260787:'')+'\x20'+_0x2ce38f+'\x20'+_0x2047e5)[_0x520ab1(0x204)]();});await writeOutput(_0x50c7ed[_0x57ec3a(0x168)]('\x0a'),_0x1bb77c[_0x57ec3a(0x2c1)],_0x57ec3a(0x2c5));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x19c);['description']=a41_0x139d5f(0x24f);async['execute'](_0x47cec3){const _0x376259=a41_0x139d5f,{options:_0x5bda43,args:_0x142776,tdx:_0x4511ca}=_0x47cec3,_0x235228=_0x142776[0x0];if(!_0x235228)return console[_0x376259(0x295)](_0x376259(0x1ba)),0x1;_0x5bda43['verbose']&&console['error'](_0x376259(0x13e)+_0x235228);const _0x3f81bf=await withSpinner(_0x376259(0x19e),()=>_0x4511ca[_0x376259(0x2b6)][_0x376259(0x189)](_0x235228),{'verbose':_0x5bda43['verbose']}),_0x2923ba=_0x3f81bf[_0x376259(0x2d9)];let _0x24ed92;!_0x2923ba[_0x376259(0x13d)]?_0x24ed92=_0x2923ba[_0x376259(0x22a)]?'canceling':_0x376259(0x21d):_0x24ed92=_0x2923ba['success']?_0x376259(0x1fd):_0x376259(0x295);let _0x1cbc8f;if(_0x2923ba['createdAt']&&_0x2923ba['finishedAt']){const _0xec2466=new Date(_0x2923ba[_0x376259(0x290)])[_0x376259(0x1b5)](),_0xf49e0=new Date(_0x2923ba[_0x376259(0x299)])[_0x376259(0x1b5)]();_0x1cbc8f=Math[_0x376259(0x273)]((_0xf49e0-_0xec2466)/0x3e8);}const _0x48cff7={'attempt_id':_0x2923ba['id'],'status':_0x24ed92,..._0x2923ba['index']!==undefined&&{'index':_0x2923ba[_0x376259(0x269)]},..._0x2923ba['project']&&{'project':_0x2923ba[_0x376259(0x1cb)][_0x376259(0x167)]},..._0x2923ba['workflow']&&{'workflow':_0x2923ba[_0x376259(0x2b6)]['name']},..._0x2923ba['sessionId']&&{'session_id':_0x2923ba[_0x376259(0x223)]},..._0x2923ba[_0x376259(0x1c1)]&&{'session_time':_0x2923ba[_0x376259(0x1c1)]},..._0x2923ba[_0x376259(0x280)]&&{'retry_attempt':_0x2923ba[_0x376259(0x280)]},..._0x1cbc8f!==undefined&&{'duration_sec':_0x1cbc8f},..._0x2923ba[_0x376259(0x290)]&&{'created_at':_0x2923ba[_0x376259(0x290)]},..._0x2923ba[_0x376259(0x299)]&&{'finished_at':_0x2923ba[_0x376259(0x299)]},...Object[_0x376259(0x146)](_0x2923ba[_0x376259(0x1a2)])[_0x376259(0x207)]>0x0&&{'params':_0x2923ba[_0x376259(0x1a2)]}};return await handleSingleObjectOutput(_0x48cff7,_0x5bda43),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a41_0x139d5f(0x167)]='workflow:tasks';[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x1d5);async['execute'](_0x3b1b51){const _0x3c9662=a41_0x139d5f,{options:_0x59b27c,args:_0x3c6733,tdx:_0x4e8d0d}=_0x3b1b51,_0x2c92dd=_0x3c6733[0x0];if(!_0x2c92dd)return console[_0x3c9662(0x295)](_0x3c9662(0x1ba)),0x1;const _0x2530bf=_0x59b27c['includeSubtasks'];_0x59b27c['verbose']&&(console[_0x3c9662(0x295)](_0x3c9662(0x13e)+_0x2c92dd),_0x2530bf&&console['error'](_0x3c9662(0x279)));const _0x215244=await withSpinner(_0x3c9662(0x148),()=>_0x4e8d0d[_0x3c9662(0x2b6)][_0x3c9662(0x1af)](_0x2c92dd,_0x2530bf||![]),{'verbose':_0x59b27c[_0x3c9662(0x1e9)]}),_0x226024=_0x215244[_0x3c9662(0x2d9)];return console[_0x3c9662(0x295)]('✔\x20Found\x20'+_0x226024['length']+_0x3c9662(0x214)+(_0x226024[_0x3c9662(0x207)]!==0x1?'s':'')),await handleSDKOutput(_0x226024,_0x59b27c),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a41_0x139d5f(0x167)]='workflow:logs';['description']=a41_0x139d5f(0x143);async[a41_0x139d5f(0x175)](_0x86d35a){const _0x42e2ea=a41_0x139d5f,{options:_0x1e445f,args:_0x21ae4e,tdx:_0x1436d3}=_0x86d35a,_0x209a41=_0x21ae4e[0x0];let _0x22dc28=_0x21ae4e[0x1];if(!_0x209a41)return console[_0x42e2ea(0x295)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x1e445f['verbose']&&(console[_0x42e2ea(0x295)]('Attempt\x20ID:\x20'+_0x209a41),_0x22dc28&&console[_0x42e2ea(0x295)](_0x42e2ea(0x13c)+_0x22dc28));const _0x190a02=await withSpinner(_0x42e2ea(0x249),()=>_0x1436d3[_0x42e2ea(0x2b6)][_0x42e2ea(0x281)](_0x209a41,_0x22dc28),{'verbose':_0x1e445f['verbose']}),_0x11091f=_0x190a02[_0x42e2ea(0x2d9)];if(_0x11091f[_0x42e2ea(0x207)]===0x0)return console[_0x42e2ea(0x295)](_0x42e2ea(0x2a1)),0x0;if(!_0x22dc28&&(_0x1e445f[_0x42e2ea(0x18f)]||_0x1e445f[_0x42e2ea(0x1d3)]))return await handleSDKOutput(_0x11091f,_0x1e445f),0x0;if(!_0x22dc28){const _0xc91245=_0x11091f[_0x42e2ea(0x2a3)](_0x4539c8=>({'title':_0x4539c8[_0x42e2ea(0x201)]+'\x20('+formatBytes(_0x4539c8[_0x42e2ea(0x13f)])+')','value':_0x4539c8[_0x42e2ea(0x201)]})),_0x3ac069=await a41_0x116876({'type':_0x42e2ea(0x2bd),'name':_0x42e2ea(0x2cd),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0xc91245});if(!_0x3ac069[_0x42e2ea(0x2cd)])return console[_0x42e2ea(0x295)]('Cancelled'),0x0;_0x22dc28=_0x3ac069[_0x42e2ea(0x2cd)];}const _0x35ce64=await withSpinner(_0x42e2ea(0x1e5),()=>_0x1436d3[_0x42e2ea(0x2b6)][_0x42e2ea(0x2ba)](_0x209a41,_0x22dc28),{'verbose':_0x1e445f[_0x42e2ea(0x1e9)]}),_0x31cb02=_0x35ce64[_0x42e2ea(0x2d9)];return _0x31cb02?console[_0x42e2ea(0x215)](_0x31cb02):console[_0x42e2ea(0x295)](_0x42e2ea(0x200)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x244);[a41_0x139d5f(0x25d)]='Kill\x20a\x20running\x20attempt';async[a41_0x139d5f(0x175)](_0x1d7e90){const _0x4f12fe=a41_0x139d5f,{options:_0x937b99,args:_0xce7410,tdx:_0x1542e0}=_0x1d7e90,_0x59d177=_0xce7410[0x0];if(!_0x59d177)return console[_0x4f12fe(0x295)](_0x4f12fe(0x1ba)),0x1;const _0x43f23a=_0x937b99['reason'];_0x937b99['verbose']&&(console[_0x4f12fe(0x295)](_0x4f12fe(0x13e)+_0x59d177),_0x43f23a&&console['error'](_0x4f12fe(0x26d)+_0x43f23a));if(!_0x937b99[_0x4f12fe(0x16f)]){const _0x480231=await confirmKey(_0x4f12fe(0x1e2)+_0x59d177+'?');if(!_0x480231)return console['error'](_0x4f12fe(0x2a2)),0x0;}const _0xf4e733=await withSpinner(_0x4f12fe(0x1d2),()=>_0x1542e0[_0x4f12fe(0x2b6)][_0x4f12fe(0x1a7)](_0x59d177,_0x43f23a),{'verbose':_0x937b99[_0x4f12fe(0x1e9)]}),_0x5c2bc3=_0xf4e733['data'];return console[_0x4f12fe(0x295)]('✔\x20'+_0x5c2bc3),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x217);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x286);async['execute'](_0x414a98){const _0x47f1fc=a41_0x139d5f,{options:_0x46b90b,args:_0x378771,tdx:_0x1cbda0}=_0x414a98,_0x40b7df=_0x378771[0x0];if(!_0x40b7df)return console[_0x47f1fc(0x295)](_0x47f1fc(0x1b0)),console['error'](_0x47f1fc(0x282)),0x1;let _0x556217=![],_0x547b1e=_0x40b7df;if(_0x40b7df['startsWith']('session:'))_0x556217=!![],_0x547b1e=_0x40b7df[_0x47f1fc(0x1c6)](0x8);else{if(_0x40b7df[_0x47f1fc(0x236)](_0x47f1fc(0x21a)))_0x556217=![],_0x547b1e=_0x40b7df[_0x47f1fc(0x1c6)](0x8);else return console['error'](_0x47f1fc(0x1df)),console['error'](_0x47f1fc(0x282)),0x1;}const _0x210129=_0x46b90b['fromTask'],_0x254564=_0x46b90b[_0x47f1fc(0x226)],_0x2fed99=_0x46b90b['params'],_0x221d7f=_0x46b90b[_0x47f1fc(0x1c4)];_0x46b90b[_0x47f1fc(0x1e9)]&&(console[_0x47f1fc(0x295)](_0x47f1fc(0x24c)+(_0x556217?'session':'attempt')+'\x20'+_0x547b1e),_0x210129&&console[_0x47f1fc(0x295)]('From\x20task:\x20'+_0x210129),_0x254564&&console['error'](_0x47f1fc(0x1c5)+_0x254564),_0x2fed99&&console['error']('Params:\x20'+_0x2fed99),_0x221d7f&&console['error'](_0x47f1fc(0x1f1)));let _0x3f61bc;if(_0x2fed99)try{if(_0x2fed99[_0x47f1fc(0x236)]('@')){const _0x134f7e=await import(_0x47f1fc(0x27e)),_0x2a4b44=_0x2fed99[_0x47f1fc(0x1c6)](0x1),_0x4b3c2c=await _0x134f7e['readFile'](_0x2a4b44,_0x47f1fc(0x261));_0x3f61bc=JSON[_0x47f1fc(0x157)](_0x4b3c2c);}else _0x3f61bc=JSON['parse'](_0x2fed99);}catch{return console[_0x47f1fc(0x295)](_0x47f1fc(0x291)),0x1;}if(!_0x46b90b[_0x47f1fc(0x16f)]){const _0xfb867f=await confirmKey(_0x47f1fc(0x28f)+(_0x556217?_0x47f1fc(0x2b8):_0x47f1fc(0x189))+'\x20'+_0x547b1e+'?');if(!_0xfb867f)return console['error'](_0x47f1fc(0x2a2)),0x0;}let _0x521ab3;_0x556217?_0x521ab3=await withSpinner(_0x47f1fc(0x197),()=>_0x1cbda0[_0x47f1fc(0x2b6)][_0x47f1fc(0x1f3)](_0x547b1e,{'fromTask':_0x210129,'retryParams':_0x3f61bc}),{'verbose':_0x46b90b[_0x47f1fc(0x1e9)]}):_0x521ab3=await withSpinner(_0x47f1fc(0x2d5),()=>_0x1cbda0[_0x47f1fc(0x2b6)][_0x47f1fc(0x22f)](_0x547b1e,{'resumeFrom':_0x254564,'retryParams':_0x3f61bc,'force':_0x221d7f}),{'verbose':_0x46b90b[_0x47f1fc(0x1e9)]});const _0x380c95=_0x521ab3['data'];return console['error'](_0x47f1fc(0x219)),console[_0x47f1fc(0x295)](_0x47f1fc(0x1fa)+_0x380c95[_0x47f1fc(0x1d1)]),console[_0x47f1fc(0x295)]('\x20\x20Session\x20ID:\x20'+_0x380c95[_0x47f1fc(0x223)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]='workflow:run';[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x2d4);async['execute'](_0xdc08f2){const _0x2862dd=a41_0x139d5f,{options:_0x3845a0,args:_0x25355e,tdx:_0x1ca3d6}=_0xdc08f2;let _0x3ea504=_0x25355e[0x0];if(!_0x3ea504){const _0xdc124e=this[_0x2862dd(0x1c9)]([],_0x3845a0),_0x295b06=await withSpinner(_0x2862dd(0x21e),()=>_0x1ca3d6['workflow'][_0x2862dd(0x2bc)](_0xdc124e,{'limit':_0x3845a0['limit']}),{'verbose':_0x3845a0['verbose']}),_0x307ec0=_0x295b06[_0x2862dd(0x2d9)];if(_0x307ec0[_0x2862dd(0x207)]===0x0)return console['error'](_0x2862dd(0x29d)),!_0xdc124e&&console[_0x2862dd(0x295)](a41_0x50b6be[_0x2862dd(0x176)](_0x2862dd(0x17f))),0x1;const _0x569096=_0x307ec0['map'](_0x2cf194=>({'title':_0x2cf194[_0x2862dd(0x1cb)]?.[_0x2862dd(0x167)]+'.'+_0x2cf194[_0x2862dd(0x167)],'value':_0x2cf194[_0x2862dd(0x1cb)]?.[_0x2862dd(0x167)]+'.'+_0x2cf194[_0x2862dd(0x167)],'description':_0x2cf194[_0x2862dd(0x22c)]?_0x2862dd(0x2b7)+_0x2cf194[_0x2862dd(0x22c)]:undefined})),_0x247662=await a41_0x116876({'type':_0x2862dd(0x2bd),'name':_0x2862dd(0x2b6),'message':_0x2862dd(0x264),'choices':_0x569096});if(!_0x247662['workflow'])return 0x1;_0x3ea504=_0x247662[_0x2862dd(0x2b6)];}if(!_0x3ea504[_0x2862dd(0x19d)]('.')){const _0x58584e=this[_0x2862dd(0x1c9)]([],_0x3845a0);if(_0x58584e)_0x3ea504=_0x58584e+'.'+_0x3ea504;else return console[_0x2862dd(0x295)](a41_0x50b6be[_0x2862dd(0x266)](_0x2862dd(0x232)),_0x2862dd(0x1f6)),console[_0x2862dd(0x295)](a41_0x50b6be[_0x2862dd(0x176)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x1f0854=_0x3845a0['param'],_0x1fd7c9=_0x3845a0[_0x2862dd(0x1c1)],_0xf7c0c7={};if(_0x1f0854&&Array['isArray'](_0x1f0854))for(const _0x2bad6c of _0x1f0854){const _0x4efa93=_0x2bad6c['indexOf']('=');if(_0x4efa93===-0x1)return console[_0x2862dd(0x295)](_0x2862dd(0x294)+_0x2bad6c),console[_0x2862dd(0x295)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x662fcc=_0x2bad6c[_0x2862dd(0x1c6)](0x0,_0x4efa93),_0x14d4a8=_0x2bad6c[_0x2862dd(0x1c6)](_0x4efa93+0x1);try{_0xf7c0c7[_0x662fcc]=JSON[_0x2862dd(0x157)](_0x14d4a8);}catch{_0xf7c0c7[_0x662fcc]=_0x14d4a8;}}_0x3845a0[_0x2862dd(0x1e9)]&&(console[_0x2862dd(0x295)]('Workflow:\x20'+_0x3ea504),Object['keys'](_0xf7c0c7)[_0x2862dd(0x207)]>0x0&&console[_0x2862dd(0x295)]('Parameters:\x20'+JSON[_0x2862dd(0x276)](_0xf7c0c7)),_0x1fd7c9&&console[_0x2862dd(0x295)]('Session\x20time:\x20'+_0x1fd7c9));const _0xb78b=await withSpinner('Starting\x20workflow\x20run...',()=>_0x1ca3d6[_0x2862dd(0x2b6)][_0x2862dd(0x2d2)](_0x3ea504,_0xf7c0c7,{'sessionTime':_0x1fd7c9}),{'verbose':_0x3845a0['verbose']}),_0x1367dc=_0xb78b[_0x2862dd(0x2d9)];console['error'](_0x2862dd(0x1d7)),console[_0x2862dd(0x295)](_0x2862dd(0x15c)+_0x1367dc['id']),console[_0x2862dd(0x295)](_0x2862dd(0x180)+_0x1367dc['sessionId']),console['error'](_0x2862dd(0x2ca)+_0x1367dc[_0x2862dd(0x1cb)]?.[_0x2862dd(0x167)]),console[_0x2862dd(0x295)](_0x2862dd(0x1fc)+_0x1367dc[_0x2862dd(0x2b6)]?.[_0x2862dd(0x167)]);if(_0x1367dc[_0x2862dd(0x1cb)]?.['id']&&_0x1367dc[_0x2862dd(0x223)]&&_0x1367dc['id']){const _0x218eb4=_0x3845a0[_0x2862dd(0x1f8)],_0x2bba49=getConsoleUrl(_0x218eb4,_0x2862dd(0x287)+_0x1367dc[_0x2862dd(0x1cb)]['id']+_0x2862dd(0x1f5)+_0x1367dc[_0x2862dd(0x223)]+_0x2862dd(0x2b4)+_0x1367dc['id']);console[_0x2862dd(0x295)](_0x2862dd(0x2c6)+a41_0x50b6be[_0x2862dd(0x2ce)](_0x2bba49));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a41_0x139d5f(0x1d0);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x1f0);async['execute'](_0x11dccb){const _0xaff56c=a41_0x139d5f,{options:_0x5430d3,args:_0x17e14b,tdx:_0x483849}=_0x11dccb,_0x36d2d8=_0x17e14b[0x0],_0x243ecb=_0x17e14b[0x1]||'.';if(!_0x36d2d8)return console['error'](_0xaff56c(0x1bb)),console[_0xaff56c(0x295)](_0xaff56c(0x158)),0x1;const _0x5e8494=_0x5430d3[_0xaff56c(0x22c)];_0x5430d3[_0xaff56c(0x1e9)]&&(console[_0xaff56c(0x295)](_0xaff56c(0x209)+_0x36d2d8),console[_0xaff56c(0x295)](_0xaff56c(0x171)+_0x243ecb),_0x5e8494&&console[_0xaff56c(0x295)](_0xaff56c(0x1a4)+_0x5e8494));const _0x484e39=await withSpinner(_0xaff56c(0x1c8)+_0x36d2d8+_0xaff56c(0x20f),()=>_0x483849[_0xaff56c(0x2b6)][_0xaff56c(0x2d7)](_0x36d2d8,_0x243ecb,{'revision':_0x5e8494}),{'verbose':_0x5430d3['verbose']}),_0x474481=_0x484e39[_0xaff56c(0x2d9)];return console['error'](_0xaff56c(0x174)+_0x474481['projectName']),console[_0xaff56c(0x295)](_0xaff56c(0x2aa)+_0x474481[_0xaff56c(0x22c)]),console[_0xaff56c(0x295)]('\x20\x20Files\x20extracted:\x20'+_0x474481[_0xaff56c(0x254)]),console[_0xaff56c(0x295)](_0xaff56c(0x19a)+_0x243ecb+'/'+_0x474481['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']='workflow:upload';[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x257);async[a41_0x139d5f(0x175)](_0x233881){const _0x23ce52=a41_0x139d5f,{options:_0x33ac99,args:_0x46f1dc,tdx:_0x33c6c7}=_0x233881;let _0x3a0fa0='.',_0x3ff983=_0x33ac99[_0x23ce52(0x167)];if(_0x46f1dc[0x0]){const {promises:_0x148818}=await import('fs');try{const _0x112571=await _0x148818['stat'](_0x46f1dc[0x0]);if(_0x112571[_0x23ce52(0x1ca)]())_0x3a0fa0=_0x46f1dc[0x0];else return console['error'](_0x23ce52(0x26e)+_0x46f1dc[0x0]+_0x23ce52(0x151)),0x1;}catch{_0x3ff983=_0x46f1dc[0x0],_0x3a0fa0='.';}}const _0x54d2d9=_0x33ac99[_0x23ce52(0x22c)],_0x53c6e4=_0x33ac99[_0x23ce52(0x222)];_0x33ac99[_0x23ce52(0x1e9)]&&(console[_0x23ce52(0x295)](_0x23ce52(0x166)+_0x3a0fa0),_0x3ff983&&console[_0x23ce52(0x295)](_0x23ce52(0x234)+_0x3ff983),_0x54d2d9&&console[_0x23ce52(0x295)]('Revision:\x20'+_0x54d2d9),_0x53c6e4&&console['error'](_0x23ce52(0x2c3)));const _0xee24a2=await withSpinner(_0x23ce52(0x1be),()=>_0x33c6c7[_0x23ce52(0x2b6)][_0x23ce52(0x2b2)](_0x3a0fa0,{'projectName':_0x3ff983,'revision':_0x54d2d9,'skipValidation':_0x53c6e4}),{'verbose':_0x33ac99[_0x23ce52(0x1e9)]}),_0x53a94d=_0xee24a2['data'];return console[_0x23ce52(0x295)](_0x23ce52(0x297)+_0x53a94d[_0x23ce52(0x205)]),console[_0x23ce52(0x295)](_0x23ce52(0x2c8)+_0x53a94d[_0x23ce52(0x2a6)]),console['error']('\x20\x20Revision:\x20'+_0x53a94d[_0x23ce52(0x22c)]),await this[_0x23ce52(0x150)](_0x33c6c7,_0x53a94d[_0x23ce52(0x205)],_0x33ac99['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a41_0x139d5f(0x167)]='workflow:pull';[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x1dc);async[a41_0x139d5f(0x175)](_0x592814){const _0x464a48=a41_0x139d5f,{options:_0x14368b,args:_0x439898,tdx:_0x2fbec5}=_0x592814,_0x5548ad=_0x439898[0x0],_0x297e26=_0x439898[0x1];if(!_0x5548ad)return console[_0x464a48(0x295)](a41_0x50b6be[_0x464a48(0x266)](_0x464a48(0x232)),'Project\x20name\x20is\x20required'),console[_0x464a48(0x295)](a41_0x50b6be[_0x464a48(0x176)](_0x464a48(0x1de))),0x1;const _0x2ff49f=_0x14368b[_0x464a48(0x22c)];_0x14368b[_0x464a48(0x1e9)]&&(console['error']('Project:\x20'+_0x5548ad),_0x297e26&&console['error'](_0x464a48(0x2e0)+_0x297e26),_0x2ff49f&&console[_0x464a48(0x295)](_0x464a48(0x1a4)+_0x2ff49f),_0x14368b[_0x464a48(0x26c)]&&console['error'](_0x464a48(0x2dd)));const _0x593b8b=await withSpinner(_0x464a48(0x288)+_0x5548ad+_0x464a48(0x20f),()=>_0x2fbec5[_0x464a48(0x2b6)][_0x464a48(0x144)](_0x5548ad,{'targetDir':_0x297e26,'revision':_0x2ff49f}),{'verbose':_0x14368b['verbose']}),_0x3dae42=_0x593b8b['data'];_0x3dae42[_0x464a48(0x16d)]?console['error']('✔\x20New\x20project:\x20'+_0x3dae42['projectName']):console[_0x464a48(0x295)](_0x464a48(0x2c0)+_0x3dae42[_0x464a48(0x205)]);console['error'](_0x464a48(0x2aa)+_0x3dae42[_0x464a48(0x22c)]),console[_0x464a48(0x295)](_0x464a48(0x285)+(a41_0x145759[_0x464a48(0x23e)](process[_0x464a48(0x1bf)](),_0x3dae42[_0x464a48(0x16a)])||'.')),console[_0x464a48(0x295)](_0x464a48(0x1b3)+a41_0x50b6be['green']('+'+_0x3dae42[_0x464a48(0x2d0)]['new']+'\x20new')+',\x20'+(a41_0x50b6be['yellow']('~'+_0x3dae42[_0x464a48(0x2d0)][_0x464a48(0x247)]+_0x464a48(0x1c7))+',\x20')+(a41_0x50b6be[_0x464a48(0x266)]('-'+_0x3dae42[_0x464a48(0x2d0)][_0x464a48(0x1cc)]+_0x464a48(0x2d3))+',\x20')+(''+a41_0x50b6be[_0x464a48(0x176)](_0x3dae42[_0x464a48(0x2d0)][_0x464a48(0x1a8)]+_0x464a48(0x19b))));for(const _0x447791 of _0x3dae42['changes']){_0x447791[_0x464a48(0x2cc)]===_0x464a48(0x247)&&_0x447791[_0x464a48(0x23c)]&&(console[_0x464a48(0x295)]('\x0a'+a41_0x50b6be['cyan'](_0x464a48(0x1e0)+_0x447791['path'])),console[_0x464a48(0x295)](_0x447791[_0x464a48(0x23c)]));}if(!_0x3dae42[_0x464a48(0x179)])return saveSessionContext({'workflow_project':_0x3dae42[_0x464a48(0x205)]},_0x14368b[_0x464a48(0x2b8)]),console[_0x464a48(0x295)](a41_0x50b6be[_0x464a48(0x20b)](_0x464a48(0x1e8))),console['error'](a41_0x50b6be[_0x464a48(0x176)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x3dae42[_0x464a48(0x205)])),0x0;if(_0x14368b[_0x464a48(0x26c)])return console['error'](a41_0x50b6be[_0x464a48(0x1d8)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x14368b[_0x464a48(0x16f)]){const _0x20a0f5=await confirmKey(_0x464a48(0x1f7));if(!_0x20a0f5)return console[_0x464a48(0x295)]('Cancelled'),0x0;}await withSpinner(_0x464a48(0x198),()=>_0x2fbec5[_0x464a48(0x2b6)][_0x464a48(0x1db)](_0x3dae42,{'revision':_0x2ff49f}),{'verbose':_0x14368b['verbose']}),saveSessionContext({'workflow_project':_0x3dae42['projectName']},_0x14368b[_0x464a48(0x2b8)]),console['error'](a41_0x50b6be['green'](_0x464a48(0x1a5)));const _0x188a01=a41_0x145759['relative'](process['cwd'](),_0x3dae42[_0x464a48(0x16a)])||'.';return console[_0x464a48(0x295)](a41_0x50b6be['dim'](_0x464a48(0x19a)+_0x188a01)),console[_0x464a48(0x295)](a41_0x50b6be[_0x464a48(0x176)](_0x464a48(0x27f)+_0x3dae42[_0x464a48(0x205)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a41_0x139d5f(0x18b);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x246);async[a41_0x139d5f(0x175)](_0x47c6e1){const _0x435cf0=a41_0x139d5f,{options:_0x171e6e,args:_0x44a80b,tdx:_0x495e67}=_0x47c6e1,_0x73942f=this['resolveProjectDir'](_0x44a80b,_0x171e6e),_0x2057c8=_0x171e6e[_0x435cf0(0x22c)],_0x28c6de=_0x171e6e[_0x435cf0(0x222)];_0x171e6e[_0x435cf0(0x1e9)]&&(_0x73942f&&console[_0x435cf0(0x295)](_0x435cf0(0x18c)+_0x73942f),_0x2057c8&&console[_0x435cf0(0x295)](_0x435cf0(0x1a4)+_0x2057c8),_0x171e6e[_0x435cf0(0x26c)]&&console['error']('Dry\x20run:\x20yes'),_0x28c6de&&console['error'](_0x435cf0(0x2c3)));let _0x172c90;try{_0x172c90=await withSpinner('Analyzing\x20changes...',()=>_0x495e67[_0x435cf0(0x2b6)][_0x435cf0(0x187)]({'sourceDir':_0x73942f,'revision':_0x2057c8,'skipValidation':_0x28c6de}),{'verbose':_0x171e6e[_0x435cf0(0x1e9)]});}catch(_0x1b86af){if(_0x1b86af instanceof Error&&_0x1b86af[_0x435cf0(0x242)]['includes'](_0x435cf0(0x252)))return console[_0x435cf0(0x295)](a41_0x50b6be[_0x435cf0(0x266)](_0x435cf0(0x232)),_0x435cf0(0x21c)),_0x171e6e['workflowProject']?console[_0x435cf0(0x295)](a41_0x50b6be['dim'](_0x435cf0(0x186)+_0x171e6e[_0x435cf0(0x25e)]+_0x435cf0(0x245)+_0x171e6e[_0x435cf0(0x25e)]+'\x27')):console[_0x435cf0(0x295)](a41_0x50b6be['dim']('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x1b86af;}const _0x34c182=_0x172c90[_0x435cf0(0x2d9)];console[_0x435cf0(0x295)](_0x435cf0(0x2c0)+_0x34c182['projectName']),console[_0x435cf0(0x295)](_0x435cf0(0x28a)+_0x34c182[_0x435cf0(0x1ec)]),console[_0x435cf0(0x295)](_0x435cf0(0x2aa)+_0x34c182['revision']),console[_0x435cf0(0x295)](_0x435cf0(0x1b3)+a41_0x50b6be['green']('+'+_0x34c182['summary'][_0x435cf0(0x275)]+_0x435cf0(0x25c))+',\x20'+(a41_0x50b6be[_0x435cf0(0x1d8)]('~'+_0x34c182[_0x435cf0(0x2d0)][_0x435cf0(0x247)]+_0x435cf0(0x1c7))+',\x20')+(a41_0x50b6be[_0x435cf0(0x266)]('-'+_0x34c182[_0x435cf0(0x2d0)][_0x435cf0(0x1cc)]+_0x435cf0(0x2d3))+',\x20')+(''+a41_0x50b6be[_0x435cf0(0x176)](_0x34c182[_0x435cf0(0x2d0)]['unchanged']+_0x435cf0(0x19b))));for(const _0x28da38 of _0x34c182[_0x435cf0(0x1b7)]){_0x28da38[_0x435cf0(0x2cc)]==='modified'&&_0x28da38[_0x435cf0(0x23c)]&&(console[_0x435cf0(0x295)]('\x0a'+a41_0x50b6be['cyan'](_0x435cf0(0x1e0)+_0x28da38[_0x435cf0(0x284)])),console[_0x435cf0(0x295)](_0x28da38[_0x435cf0(0x23c)]));}if(!_0x34c182[_0x435cf0(0x179)])return console['error'](a41_0x50b6be['green'](_0x435cf0(0x250))),await this['showWorkflowConsoleUrl'](_0x495e67,_0x34c182[_0x435cf0(0x205)],_0x171e6e[_0x435cf0(0x1f8)]),0x0;if(_0x171e6e[_0x435cf0(0x26c)])return console[_0x435cf0(0x295)](a41_0x50b6be[_0x435cf0(0x1d8)](_0x435cf0(0x1ef))),0x0;if(!_0x171e6e[_0x435cf0(0x16f)]){const _0x394f27=await confirmKey(_0x435cf0(0x2da));if(!_0x394f27)return console[_0x435cf0(0x295)](_0x435cf0(0x2a2)),0x0;}const _0x4ac6f4=await withSpinner(_0x435cf0(0x270),()=>_0x495e67[_0x435cf0(0x2b6)][_0x435cf0(0x227)](_0x34c182),{'verbose':_0x171e6e['verbose']}),_0x5890b4=_0x4ac6f4[_0x435cf0(0x2d9)];return console['error'](a41_0x50b6be[_0x435cf0(0x20b)]('✔\x20Push\x20complete')),console[_0x435cf0(0x295)]('\x20\x20Project\x20ID:\x20'+_0x5890b4[_0x435cf0(0x2a6)]),console[_0x435cf0(0x295)](_0x435cf0(0x2aa)+_0x5890b4[_0x435cf0(0x22c)]),await this['showWorkflowConsoleUrl'](_0x495e67,_0x5890b4['projectName'],_0x171e6e['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x18e);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x213);async[a41_0x139d5f(0x175)](_0x20e3e5){const _0x32bbdf=a41_0x139d5f,{options:_0x3baedd,args:_0x20064b,tdx:_0x180be5}=_0x20e3e5,_0x379ba5=this[_0x32bbdf(0x141)](_0x20064b,_0x3baedd),_0x1e9f6f=_0x3baedd[_0x32bbdf(0x167)],_0x73686b=_0x3baedd[_0x32bbdf(0x22c)],_0x1ed525=_0x3baedd['skipValidation'];if(!_0x379ba5)return console[_0x32bbdf(0x295)](a41_0x50b6be[_0x32bbdf(0x266)](_0x32bbdf(0x232)),_0x32bbdf(0x22d)),console['error'](a41_0x50b6be[_0x32bbdf(0x176)](_0x32bbdf(0x29f))),console['error'](a41_0x50b6be[_0x32bbdf(0x176)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x1e9f6f)return console[_0x32bbdf(0x295)](a41_0x50b6be[_0x32bbdf(0x266)](_0x32bbdf(0x232)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x32bbdf(0x295)](a41_0x50b6be['dim'](_0x32bbdf(0x29f))),0x1;_0x3baedd[_0x32bbdf(0x1e9)]&&(console[_0x32bbdf(0x295)](_0x32bbdf(0x18c)+_0x379ba5),console[_0x32bbdf(0x295)]('New\x20project\x20name:\x20'+_0x1e9f6f),_0x73686b&&console[_0x32bbdf(0x295)](_0x32bbdf(0x1a4)+_0x73686b),_0x3baedd[_0x32bbdf(0x26c)]&&console['error'](_0x32bbdf(0x2dd)),_0x1ed525&&console[_0x32bbdf(0x295)](_0x32bbdf(0x2c3)));const _0x138ea6=await withSpinner(_0x32bbdf(0x173),()=>_0x180be5[_0x32bbdf(0x2b6)][_0x32bbdf(0x24d)](_0x379ba5,_0x1e9f6f,{'revision':_0x73686b,'skipValidation':_0x1ed525}),{'verbose':_0x3baedd[_0x32bbdf(0x1e9)]}),_0x3f7f41=_0x138ea6[_0x32bbdf(0x2d9)];console[_0x32bbdf(0x295)](_0x32bbdf(0x149)+_0x3f7f41['sourceDir']);_0x3f7f41[_0x32bbdf(0x235)]&&console['error']('Source\x20project:\x20'+_0x3f7f41[_0x32bbdf(0x235)]);console[_0x32bbdf(0x295)]('New\x20project\x20name:\x20'+_0x3f7f41[_0x32bbdf(0x165)]),console['error'](_0x32bbdf(0x1a4)+_0x3f7f41[_0x32bbdf(0x22c)]),console[_0x32bbdf(0x295)]('Files\x20to\x20upload:\x20'+_0x3f7f41['fileCount']);_0x3f7f41['targetExists']&&(console[_0x32bbdf(0x295)](a41_0x50b6be[_0x32bbdf(0x1d8)](_0x32bbdf(0x268)+_0x3f7f41[_0x32bbdf(0x165)]+_0x32bbdf(0x24e)+_0x3f7f41['existingProjectId']+')')),console[_0x32bbdf(0x295)](a41_0x50b6be[_0x32bbdf(0x1d8)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x3baedd[_0x32bbdf(0x26c)])return console[_0x32bbdf(0x295)](a41_0x50b6be['yellow'](_0x32bbdf(0x153))),0x0;if(!_0x3baedd['yes']){const _0x4360cb=_0x3f7f41[_0x32bbdf(0x235)]||a41_0x145759[_0x32bbdf(0x1aa)](_0x379ba5),_0x3d65b8=_0x3f7f41['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x1e9f6f+_0x32bbdf(0x17d):_0x32bbdf(0x163)+_0x4360cb+_0x32bbdf(0x2b9)+_0x1e9f6f+'\x22?',_0x4578df=await confirmKey(_0x3d65b8);if(!_0x4578df)return console['error']('Cancelled'),0x0;}const _0x3b0424=await withSpinner(_0x3f7f41[_0x32bbdf(0x23f)]?'Updating\x20'+_0x1e9f6f+_0x32bbdf(0x20f):_0x32bbdf(0x14e)+_0x1e9f6f+_0x32bbdf(0x20f),()=>_0x180be5['workflow'][_0x32bbdf(0x2e2)](_0x3f7f41),{'verbose':_0x3baedd[_0x32bbdf(0x1e9)]}),_0x1d1afc=_0x3b0424[_0x32bbdf(0x2d9)];return console[_0x32bbdf(0x295)](a41_0x50b6be['green'](_0x3f7f41[_0x32bbdf(0x23f)]?_0x32bbdf(0x1a3):'✔\x20Clone\x20complete')),console['error'](_0x32bbdf(0x2ca)+_0x1d1afc[_0x32bbdf(0x165)]),console['error'](_0x32bbdf(0x2c8)+_0x1d1afc[_0x32bbdf(0x239)]),console[_0x32bbdf(0x295)](_0x32bbdf(0x2aa)+_0x1d1afc[_0x32bbdf(0x22c)]),await this[_0x32bbdf(0x150)](_0x180be5,_0x1d1afc[_0x32bbdf(0x165)],_0x3baedd[_0x32bbdf(0x1f8)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a41_0x139d5f(0x167)]='workflow:delete';[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x160);async[a41_0x139d5f(0x175)](_0x58ebe3){const _0x320453=a41_0x139d5f,{options:_0x18eb4a,args:_0x4b5a72,tdx:_0x4861ef}=_0x58ebe3,_0x2b18d7=_0x4b5a72[0x0];if(!_0x2b18d7)return console[_0x320453(0x295)](_0x320453(0x1fe)),console[_0x320453(0x295)](_0x320453(0x14a)),0x1;_0x18eb4a[_0x320453(0x1e9)]&&console['error'](_0x320453(0x209)+_0x2b18d7);if(!_0x18eb4a['yes']){const _0x513d82=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x2b18d7+_0x320453(0x17b));if(!_0x513d82)return console[_0x320453(0x295)](_0x320453(0x2a2)),0x0;}const _0x50b5a1=await withSpinner(_0x320453(0x27a)+_0x2b18d7+_0x320453(0x20f),()=>_0x4861ef[_0x320453(0x2b6)]['delete'](_0x2b18d7),{'verbose':_0x18eb4a[_0x320453(0x1e9)]}),_0x4a701d=_0x50b5a1['data'];return console[_0x320453(0x295)]('✔\x20Deleted\x20project\x20'+_0x4a701d['projectName']),console[_0x320453(0x295)](_0x320453(0x2c8)+_0x4a701d[_0x320453(0x2a6)]),0x0;}}export function parseKeyValue(_0x234b7a){const _0x108e34=a41_0x139d5f,_0x2701db=_0x234b7a[_0x108e34(0x20d)]('=');if(_0x2701db===-0x1)throw new Error(_0x108e34(0x283)+_0x234b7a+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x31b808=_0x234b7a['substring'](0x0,_0x2701db),_0x5212b0=_0x234b7a[_0x108e34(0x1c6)](_0x2701db+0x1);if(!_0x31b808)throw new Error(_0x108e34(0x265));return{'key':_0x31b808,'value':_0x5212b0};}function a41_0x1b9e(_0x40a8e5,_0x2da084){_0x40a8e5=_0x40a8e5-0x13c;const _0x3efd85=a41_0x3efd();let _0x1b9e5e=_0x3efd85[_0x40a8e5];return _0x1b9e5e;}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x194);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x1ab);async[a41_0x139d5f(0x175)](_0x5493a8){const _0x22784f=a41_0x139d5f,{options:_0x4c6169,args:_0x3c2f26,tdx:_0x27a0fb}=_0x5493a8,_0x2ebba5=this['requireProject'](_0x3c2f26,_0x4c6169);if(!_0x2ebba5)return 0x1;_0x4c6169[_0x22784f(0x1e9)]&&console[_0x22784f(0x295)]('Project:\x20'+_0x2ebba5);const _0x2919e8=await withSpinner(_0x22784f(0x152),()=>_0x27a0fb[_0x22784f(0x2b6)][_0x22784f(0x2cb)](_0x2ebba5),{'verbose':_0x4c6169[_0x22784f(0x1e9)]}),{secrets:_0x514aff}=_0x2919e8[_0x22784f(0x2d9)];return console[_0x22784f(0x295)](_0x22784f(0x262)+_0x514aff[_0x22784f(0x207)]+_0x22784f(0x191)+(_0x514aff[_0x22784f(0x207)]!==0x1?'s':'')),await handleSDKOutput(_0x514aff,_0x4c6169),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x1bc);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x147);async['execute'](_0xba6ae7){const _0x4fdc3d=a41_0x139d5f,{options:_0x3072d7,args:_0x17339a,tdx:_0x551776}=_0xba6ae7;let _0x37b1a3,_0x1ae51a;if(_0x17339a['length']>=0x2)_0x37b1a3=_0x17339a[0x0],_0x1ae51a=_0x17339a[0x1];else{if(_0x17339a[_0x4fdc3d(0x207)]===0x1&&_0x3072d7[_0x4fdc3d(0x25e)])_0x37b1a3=_0x3072d7['workflowProject'],_0x1ae51a=_0x17339a[0x0];else return _0x17339a[_0x4fdc3d(0x207)]===0x1?(console[_0x4fdc3d(0x295)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x4fdc3d(0x295)](_0x4fdc3d(0x17f)),0x1):(console['error'](_0x4fdc3d(0x21b)),console[_0x4fdc3d(0x295)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x1cf3b9,_0x6ad84b;try{({key:_0x1cf3b9,value:_0x6ad84b}=parseKeyValue(_0x1ae51a));}catch(_0x1a9f5f){return _0x1a9f5f instanceof Error&&console['error'](a41_0x50b6be[_0x4fdc3d(0x266)](_0x4fdc3d(0x232)),_0x1a9f5f[_0x4fdc3d(0x242)]),0x1;}_0x3072d7['verbose']&&(console[_0x4fdc3d(0x295)](_0x4fdc3d(0x209)+_0x37b1a3),console[_0x4fdc3d(0x295)]('Key:\x20'+_0x1cf3b9));const _0x4dddf6=await withSpinner(_0x4fdc3d(0x1cf),()=>_0x551776[_0x4fdc3d(0x2b6)]['setSecret'](_0x37b1a3,_0x1cf3b9,_0x6ad84b),{'verbose':_0x3072d7[_0x4fdc3d(0x1e9)]}),_0x24bd64=_0x4dddf6['data'];return console[_0x4fdc3d(0x295)]('✔\x20Secret\x20\x27'+_0x24bd64['key']+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x24bd64[_0x4fdc3d(0x205)]+'\x27'),(_0x3072d7[_0x4fdc3d(0x18f)]||_0x3072d7[_0x4fdc3d(0x248)])&&await handleSingleObjectOutput(_0x24bd64,_0x3072d7),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x1c2);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x156);async[a41_0x139d5f(0x175)](_0x443bd8){const _0x125118=a41_0x139d5f,{options:_0x1e3079,args:_0x3d9e3f,tdx:_0x1da4ef}=_0x443bd8;let _0x4082ce,_0x47668b;if(_0x3d9e3f[_0x125118(0x207)]>=0x2)_0x4082ce=_0x3d9e3f[0x0],_0x47668b=_0x3d9e3f[0x1];else{if(_0x3d9e3f['length']===0x1&&_0x1e3079['workflowProject'])_0x4082ce=_0x1e3079[_0x125118(0x25e)],_0x47668b=_0x3d9e3f[0x0];else return _0x3d9e3f['length']===0x1?(console[_0x125118(0x295)](_0x125118(0x1bb)),console[_0x125118(0x295)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0x125118(0x25f)),console[_0x125118(0x295)](_0x125118(0x1c0)),0x1);}_0x1e3079[_0x125118(0x1e9)]&&(console[_0x125118(0x295)](_0x125118(0x209)+_0x4082ce),console[_0x125118(0x295)](_0x125118(0x184)+_0x47668b));if(!_0x1e3079[_0x125118(0x16f)]){const _0x4d70e0=await confirmKey(_0x125118(0x231)+_0x47668b+'\x27\x20from\x20project\x20\x27'+_0x4082ce+'\x27?');if(!_0x4d70e0)return console[_0x125118(0x295)]('Cancelled'),0x0;}const _0x503ebf=await withSpinner(_0x125118(0x220),()=>_0x1da4ef[_0x125118(0x2b6)]['deleteSecret'](_0x4082ce,_0x47668b),{'verbose':_0x1e3079[_0x125118(0x1e9)]}),_0xa5e101=_0x503ebf[_0x125118(0x2d9)];return console['error'](_0x125118(0x230)+_0xa5e101[_0x125118(0x271)]+_0x125118(0x162)+_0xa5e101[_0x125118(0x205)]+'\x27'),(_0x1e3079[_0x125118(0x18f)]||_0x1e3079[_0x125118(0x248)])&&await handleSingleObjectOutput(_0xa5e101,_0x1e3079),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(_0x5343f8){const _0xa359b9=a41_0x139d5f,_0x38caee=Math[_0xa359b9(0x2ac)](_0x5343f8/0x3e8),_0x7aa0f0=Math['floor'](_0x38caee/0x3c),_0x50a0f4=Math[_0xa359b9(0x2ac)](_0x7aa0f0/0x3c),_0x5cbc13=Math[_0xa359b9(0x2ac)](_0x50a0f4/0x18);if(_0x5cbc13>0x0){const _0x1acdc2=_0x50a0f4%0x18;return _0x1acdc2>0x0?_0x5cbc13+'d\x20'+_0x1acdc2+'h':_0x5cbc13+'d';}else{if(_0x50a0f4>0x0){const _0x2b429c=_0x7aa0f0%0x3c;return _0x2b429c>0x0?_0x50a0f4+'h\x20'+_0x2b429c+'m':_0x50a0f4+'h';}else{if(_0x7aa0f0>0x0){const _0x9f99d7=_0x38caee%0x3c;return _0x9f99d7>0x0?_0x7aa0f0+'m\x20'+_0x9f99d7+'s':_0x7aa0f0+'m';}else return _0x38caee+'s';}}}function formatTimestamp(_0x3fb892,_0x1d84f0){const _0x481afa=a41_0x139d5f,_0x3c6d14=new Date(_0x3fb892),_0x40716d=String(_0x3c6d14['getHours']())[_0x481afa(0x2af)](0x2,'0'),_0x276beb=String(_0x3c6d14[_0x481afa(0x2ab)]())[_0x481afa(0x2af)](0x2,'0'),_0xf6a034=_0x40716d+':'+_0x276beb,_0x562b24=_0x3c6d14[_0x481afa(0x182)]()===_0x1d84f0[_0x481afa(0x182)]()&&_0x3c6d14[_0x481afa(0x15f)]()===_0x1d84f0['getMonth']()&&_0x3c6d14[_0x481afa(0x19f)]()===_0x1d84f0[_0x481afa(0x19f)]();if(_0x562b24)return _0xf6a034;else{const _0x5b3916=String(_0x3c6d14['getMonth']()+0x1)[_0x481afa(0x2af)](0x2,'0'),_0x1dc3b2=String(_0x3c6d14['getDate']())['padStart'](0x2,'0');return _0x5b3916+'-'+_0x1dc3b2+'\x20'+_0xf6a034;}}function formatDate(_0x58e106){const _0x2248bd=a41_0x139d5f,_0x38b26d=_0x58e106[_0x2248bd(0x182)](),_0x46a570=String(_0x58e106['getMonth']()+0x1)[_0x2248bd(0x2af)](0x2,'0'),_0x5da310=String(_0x58e106['getDate']())[_0x2248bd(0x2af)](0x2,'0');return _0x38b26d+'-'+_0x46a570+'-'+_0x5da310;}function getTaskStateIcon(_0x5f4c1f){const _0x374b85={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x374b85[_0x5f4c1f]||'⚪';}function getBarChar(_0x2347ac){const _0x124d15=a41_0x139d5f;return _0x2347ac===_0x124d15(0x295)||_0x2347ac===_0x124d15(0x1ed)?'×':'─';}function getBarColor(_0x61914a){const _0x4462fe=a41_0x139d5f,_0x1484ea={'success':a41_0x50b6be[_0x4462fe(0x20b)],'error':a41_0x50b6be[_0x4462fe(0x266)],'group_error':a41_0x50b6be[_0x4462fe(0x266)],'running':a41_0x50b6be[_0x4462fe(0x17c)],'blocked':a41_0x50b6be[_0x4462fe(0x1d8)],'planned':a41_0x50b6be[_0x4462fe(0x176)],'canceling':a41_0x50b6be[_0x4462fe(0x1d8)]};return _0x1484ea[_0x61914a]||a41_0x50b6be[_0x4462fe(0x29a)];}function parseTaskName(_0x33c2c0){const _0x497154=a41_0x139d5f;let _0x10d132=_0x33c2c0[_0x497154(0x26a)](/^\++/,'');const _0x4c6680=_0x10d132[_0x497154(0x18d)]('+'),_0xdbd1de=_0x4c6680[_0x497154(0x207)]>0x1?_0x4c6680[_0x497154(0x207)]-0x2:0x0,_0x2018ad=_0x4c6680[_0x4c6680[_0x497154(0x207)]-0x1]||_0x10d132;return{'level':_0xdbd1de,'name':'+'+_0x2018ad};}function truncateTaskName(_0x35c6f9,_0x1bf964){const _0x174e50=a41_0x139d5f,_0x489e3e=stringWidth(_0x35c6f9);if(_0x489e3e<=_0x1bf964)return _0x35c6f9;let _0x50532b=_0x35c6f9;while(stringWidth(_0x50532b+'…')>_0x1bf964&&_0x50532b[_0x174e50(0x207)]>0x0){_0x50532b=_0x50532b[_0x174e50(0x211)](0x0,-0x1);}return _0x50532b+'…';}function calculateTimeScale(_0x7737b1,_0x49adc2){const _0x865d18=a41_0x139d5f;return{'startTime':_0x7737b1[_0x865d18(0x210)],'endTime':_0x7737b1['end'],'durationMs':_0x7737b1[_0x865d18(0x14f)],'msPerChar':_0x7737b1[_0x865d18(0x14f)]/_0x49adc2};}function timeToPosition(_0x5c9ec7,_0x248a46,_0x3bbd92){const _0x4e9bd4=a41_0x139d5f,_0x12b149=_0x5c9ec7-_0x248a46[_0x4e9bd4(0x14b)],_0x135bd5=Math[_0x4e9bd4(0x2ac)](_0x12b149/_0x248a46[_0x4e9bd4(0x2b0)]);return Math['max'](0x0,Math[_0x4e9bd4(0x253)](_0x135bd5,_0x3bbd92));}function renderTimeAxis(_0x567eb6,_0x17aee8){const _0x2f54ca=a41_0x139d5f,_0x67e1a7=Math[_0x2f54ca(0x253)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math['max'](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x2f54ca(0x2ac)](_0x17aee8/TIMELINE_CONFIG[_0x2f54ca(0x241)]))),_0x94de55=_0x567eb6['durationMs']/(_0x67e1a7-0x1),_0x58810b=new Date(_0x567eb6[_0x2f54ca(0x14b)]),_0x4a94c6=[];for(let _0x35e0ab=0x0;_0x35e0ab<_0x67e1a7;_0x35e0ab++){const _0xe48c05=_0x567eb6[_0x2f54ca(0x14b)]+_0x35e0ab*_0x94de55,_0x25bbdc=timeToPosition(_0xe48c05,_0x567eb6,_0x17aee8),_0x4c0646=formatTimestamp(_0xe48c05,_0x58810b);_0x4a94c6[_0x2f54ca(0x2b2)]({'pos':_0x25bbdc,'text':_0x4c0646});}const _0x19e2cd=new Array(_0x17aee8)[_0x2f54ca(0x251)]('\x20');let _0xf91d00=-0x1;for(const {pos:_0x485632,text:_0x4f4018}of _0x4a94c6){let _0xb252ba=Math['max'](0x0,_0x485632-Math[_0x2f54ca(0x2ac)](_0x4f4018[_0x2f54ca(0x207)]/0x2));_0xb252ba<=_0xf91d00+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0xb252ba=_0xf91d00+TIMELINE_CONFIG[_0x2f54ca(0x28d)]+0x1);_0xb252ba+_0x4f4018['length']>_0x17aee8&&(_0xb252ba=_0x17aee8-_0x4f4018[_0x2f54ca(0x207)]);if(_0xb252ba>=0x0&&_0xb252ba+_0x4f4018[_0x2f54ca(0x207)]<=_0x17aee8&&_0xb252ba>_0xf91d00){for(let _0x4bb797=0x0;_0x4bb797<_0x4f4018[_0x2f54ca(0x207)];_0x4bb797++){_0x19e2cd[_0xb252ba+_0x4bb797]=_0x4f4018[_0x4bb797];}_0xf91d00=_0xb252ba+_0x4f4018[_0x2f54ca(0x207)]-0x1;}}return _0x19e2cd['join']('');}function a41_0x3efd(){const _0x535198=['Project\x20filter:\x20','Including\x20subtasks:\x20yes','Deleting\x20project\x20','List\x20workflows','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x27...','fs/promises','\x20\x20Session\x20context\x20set\x20to:\x20','retryAttemptName','logFiles','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Invalid\x20format:\x20','path','\x20\x20Target:\x20','Retry\x20a\x20session\x20or\x20attempt','/app/workflows/','Pulling\x20project\x20','all','\x20\x20Source:\x20','44PhnfiA','List\x20workflow\x20attempts','LABEL_MIN_SPACING','workflow:projects','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','createdAt','Error:\x20Invalid\x20JSON\x20in\x20--params','Loading\x20sessions...','232zlyxQY','Error:\x20Invalid\x20parameter\x20format:\x20','error','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','✔\x20Pushed\x20','\x20sessions\x20','finishedAt','white','workflow:timeline','Resolving\x20project\x20\x27','No\x20workflows\x20found','Include\x20retried:\x20yes','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','8155rZAiwW','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Cancelled','map','context','window','projectId','Listing\x20workflows...','resolve','now','\x20\x20Revision:\x20','getMinutes','floor','Usage:\x20tdx\x20wf\x20use\x20<project>','splice','padStart','msPerChar','workflow:sessions','push','Warning:','/attempt/','text','workflow','revision:\x20','session','\x22\x20to\x20new\x20project\x20\x22','logs','\x0aPolling...\x20(','workflows','select','\x1b[1A\x1b[2K','ICON_WIDTH','✔\x20Project:\x20','output','fullName','Validation:\x20skipped','\x20workflow','list','\x20\x20Console:\x20','toLowerCase','\x20\x20Project\x20ID:\x20','session_id','\x20\x20Project:\x20','listSecrets','type','task','cyan','canceling','summary','POLL_INTERVAL_MS','run','\x20deleted','Start\x20a\x20workflow\x20run','Retrying\x20attempt...','46236whtSio','download','\x20attempt','data','\x0aPush\x20these\x20changes?','updatedAt','Loading\x20session...','Dry\x20run:\x20yes','GUTTER','write','Target\x20directory:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','executeCloneProject','Latest\x20session\x20has\x20no\x20attempt','Task\x20name:\x20','done','Attempt\x20ID:\x20','fileSize','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','resolveProjectDir','\x20-\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','pullProject','value','keys','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Getting\x20attempt\x20tasks...','Source:\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','startTime','MIN_TIMELINE_WIDTH','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Cloning\x20to\x20','duration','showWorkflowConsoleUrl','\x20is\x20not\x20a\x20directory','Listing\x20secrets...','\x0aDry\x20run\x20-\x20no\x20project\x20created','⚠\x20Showing\x20first\x20',',\x20Workflow:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','parse','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','📋\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','filter','\x20\x20Attempt\x20ID:\x20','No\x20sessions\x20found\x20for:\x20','tdx.json','getMonth','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','sort','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x0aClone\x20\x22','find','newProjectName','Project\x20directory:\x20','name','join','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','targetDir','Status:\x20','end','isNewProject','List\x20workflow\x20execution\x20sessions','yes','isTTY','Output\x20directory:\x20','No\x20projects\x20match\x20pattern:\x20','Analyzing\x20project...','✔\x20Downloaded\x20','execute','dim','Attempt:\x20','stdout','hasChanges','1232JoXhyJ','\x22?\x20This\x20cannot\x20be\x20undone.','blue','\x22\x20with\x20new\x20revision?','No\x20workflows\x20found\x20in\x20project:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Session\x20ID:\x20','MAX_TASKS_DISPLAY','getFullYear','Project\x20name\x20is\x20required','Key:\x20','MAX_TIMELINE_WIDTH','Tip:\x20cd\x20to\x20workflows/','preparePushProject','Filter:\x20project=','attempt','from','workflow:push','Source\x20directory:\x20','split','workflow:clone','json','5631363rjzMap','\x20secret','(unknown)','renderSessionsTimeline','workflow:secrets:list','💡\x20Tip:\x20Use\x20','pollTimeline','Retrying\x20session...','Writing\x20files...','sessions','\x20\x20Location:\x20','\x20unchanged','workflow:attempt','includes','Getting\x20attempt\x20details...','getDate','1086XNIxGa','\x20to\x20see\x20detailed\x20logs','params','✔\x20Project\x20updated','Revision:\x20','✔\x20Pull\x20complete','No\x20sessions\x20with\x20timing\x20information','kill','unchanged','max','basename','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','metadata','workflow:workflows','Listing\x20workflow\x20attempts...','tasks','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','renderSingleTimeline','\x20\x20Changes:\x20','\x20session','getTime','parseProjectWorkflowPattern','changes','No\x20sessions\x20found\x20in\x20project:\x20','limit','Error:\x20Attempt\x20ID\x20is\x20required','Error:\x20Project\x20name\x20is\x20required','workflow:secrets:set','set','Pushing\x20workflow\x20project...','cwd','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','sessionTime','workflow:secrets:delete','size','force','Resume\x20from:\x20','substring','\x20modified','Downloading\x20project\x20','resolveProject','isDirectory','project','deleted','autocomplete','ICON_SPACING','Setting\x20secret...','workflow:download','attemptId','Killing\x20attempt...','format','renderTimeline','Show\x20tasks\x20for\x20an\x20attempt','3345120XWWaux','✔\x20Workflow\x20run\x20started','yellow','Auto-selected\x20latest\x20session:\x20','Pattern:\x20','applyPullProject','Pull\x20workflow\x20project\x20to\x20local\x20folder','36JKpuLq','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','---\x20','every','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','attempts','\x20(use\x20--limit\x20to\x20show\x20more)','Downloading\x20logs...','follow','clear','\x0a✔\x20Already\x20up\x20to\x20date','verbose','startedAt','get','sourceDir','group_error','12102qIgzmW','\x0aDry\x20run\x20-\x20nothing\x20pushed','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Force:\x20yes','toISOString','retrySession','status','/sessions/','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','\x0aApply\x20these\x20changes?','site','No\x20workflow\x20projects\x20found','\x20\x20New\x20attempt\x20ID:\x20','resolveProjectId','\x20\x20Workflow:\x20','success','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','generateSessionTimelineRows','No\x20log\x20content\x20found','taskName','match','Listing\x20workflow\x20sessions...','trimEnd','projectName','planned','length','Listing\x20workflow\x20projects...','Project:\x20','No\x20workflow\x20sessions\x20found','green','unknown','indexOf','workflow:attempts','...','start','slice','Session\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x20task','log','No\x20attempts\x20found\x20for:\x20','workflow:retry','lastAttempt','✔\x20Retry\x20started','attempt:','Error:\x20KEY=VALUE\x20is\x20required','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','running','Loading\x20workflows...','📁\x20','Deleting\x20secret...','Filter:\x20','skipValidation','sessionId','\x20(system)','\x20has\x20no\x20attempts','resumeFrom','executePushProject','columns','\x0aFailed\x20to\x20fetch\x20attempt\x20data','cancelRequested','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','revision','Source\x20directory\x20is\x20required','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','retryAttempt','✔\x20Secret\x20\x27','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Error:','(use\x20--limit\x20to\x20see\x20more)','Project\x20name:\x20','sourceProjectName','startsWith','state','some','newProjectId','✔\x20Showing\x20','workflowName','diff','\x20project','relative','targetExists','\x20\x20tdx\x20wf\x20use\x20<project>','LABEL_WIDTH_DIVISOR','message','requireProject','workflow:kill','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','modified','jsonl','Fetching\x20log\x20files...','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','1870mmbQSs','Target:\x20','prepareCloneProject','\x22\x20already\x20exists\x20(ID:\x20','Show\x20specific\x20attempt\x20details','\x0a✔\x20No\x20changes\x20to\x20push','fill','No\x20workflow\x20tdx.json\x20found','min','filesExtracted','Select\x20a\x20session\x20to\x20view\x20timeline:','163992JJGgxi','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','\x20of\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','rows','\x20new','description','workflowProject','Error:\x20Secret\x20key\x20is\x20required','table','utf-8','✔\x20Found\x20','buildTimelineData','Select\x20a\x20workflow\x20to\x20run','Key\x20cannot\x20be\x20empty','red','No\x20matching\x20sessions\x20found','\x0a⚠\x20Project\x20\x22','index','replace','trim','dryRun','Reason:\x20','Error:\x20','Failed\x20to\x20fetch\x20attempt\x20data','Pushing\x20project...','key','localeCompare','round','repeat','new','stringify','projects'];a41_0x3efd=function(){return _0x535198;};return a41_0x3efd();}function renderTaskRow(_0x596436,_0x5ddc82,_0x15bd13,_0x14267d){const _0x1a5d37=a41_0x139d5f,{level:_0x3768fb,name:_0x59e956}=parseTaskName(_0x596436[_0x1a5d37(0x167)]),_0xbd6cfd='\x20'[_0x1a5d37(0x274)](_0x3768fb),_0x535606=_0x596436['window']?'('+formatElapsed(_0x596436['window'][_0x1a5d37(0x14f)])+')':'',_0x32658b=stringWidth(_0x535606),_0x3c7a10=_0x3768fb*0x1,_0x5ab146=_0x14267d-_0x3c7a10-_0x32658b-0x1,_0x37876d=truncateTaskName(_0x59e956,_0x5ab146),_0x41ca5f=_0xbd6cfd+_0x37876d,_0x11708a=stringWidth(_0x41ca5f),_0x3e5f1c=_0x14267d-_0x11708a-_0x32658b,_0x1a6304=_0x41ca5f+'\x20'[_0x1a5d37(0x274)](Math['max'](0x1,_0x3e5f1c))+a41_0x50b6be[_0x1a5d37(0x176)](_0x535606),_0x1f4e01=getTaskStateIcon(_0x596436[_0x1a5d37(0x237)]),_0x1f8b6d=new Array(_0x15bd13)[_0x1a5d37(0x251)]('\x20');if(_0x596436['window']){const _0x375c91=timeToPosition(_0x596436[_0x1a5d37(0x2a5)][_0x1a5d37(0x210)],_0x5ddc82,_0x15bd13),_0x711ed5=timeToPosition(_0x596436[_0x1a5d37(0x2a5)][_0x1a5d37(0x16c)],_0x5ddc82,_0x15bd13),_0x30955e=getBarChar(_0x596436[_0x1a5d37(0x237)]),_0x4282d9=Math[_0x1a5d37(0x1a9)](_0x375c91+0x1,_0x711ed5);for(let _0xac399a=_0x375c91;_0xac399a<Math[_0x1a5d37(0x253)](_0x4282d9,_0x15bd13);_0xac399a++){_0x1f8b6d[_0xac399a]=_0x30955e;}}const _0x180467=getBarColor(_0x596436[_0x1a5d37(0x237)]),_0x4c1ee8=_0x1f8b6d[_0x1a5d37(0x2a3)](_0xc0ce61=>_0xc0ce61==='\x20'?'\x20':_0x180467(_0xc0ce61))[_0x1a5d37(0x168)]('');return _0x1f4e01+'\x20'+_0x1a6304+'│'+_0x4c1ee8+'│';}function calculateStats(_0x3abf0b){const _0x2df286=a41_0x139d5f,_0x16596e={'total':_0x3abf0b[_0x2df286(0x207)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x129327 of _0x3abf0b){if(_0x129327[_0x2df286(0x237)]==='success')_0x16596e[_0x2df286(0x1fd)]++;else{if(_0x129327[_0x2df286(0x237)]===_0x2df286(0x295)||_0x129327[_0x2df286(0x237)]===_0x2df286(0x1ed))_0x16596e[_0x2df286(0x295)]++;else _0x129327[_0x2df286(0x237)]===_0x2df286(0x21d)?_0x16596e[_0x2df286(0x21d)]++:_0x16596e['pending']++;}}return _0x16596e;}function formatStats(_0x3619d3){const _0x2bf7f8=a41_0x139d5f;return['Total:\x20'+_0x3619d3['total'],'✅\x20'+_0x3619d3[_0x2bf7f8(0x1fd)],'❌\x20'+_0x3619d3['error'],'🔄\x20'+_0x3619d3['running'],'⏳\x20'+_0x3619d3['pending']][_0x2bf7f8(0x168)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a41_0x139d5f(0x167)]=a41_0x139d5f(0x29b);[a41_0x139d5f(0x25d)]=a41_0x139d5f(0x25a);async[a41_0x139d5f(0x175)](_0x5b8fc4){const _0x89ad7c=a41_0x139d5f,{options:_0x1e79d2,args:_0x13f125,tdx:_0x539182}=_0x5b8fc4;let _0x17b811,_0x10bfa5,_0x46ddd3=![];if(_0x13f125[0x0]){if(_0x13f125[0x0][_0x89ad7c(0x19d)]('.')){const _0x38a09d=this['parseProjectWorkflowPattern'](_0x13f125,_0x1e79d2);if(!_0x38a09d)return 0x1;_0x17b811=_0x38a09d[_0x89ad7c(0x205)],_0x10bfa5=_0x38a09d[_0x89ad7c(0x23b)];}else{_0x10bfa5=_0x13f125[0x0],_0x17b811=_0x1e79d2[_0x89ad7c(0x25e)];if(!_0x17b811)return console[_0x89ad7c(0x295)](a41_0x50b6be[_0x89ad7c(0x266)]('Error:'),_0x89ad7c(0x15a)),0x1;_0x46ddd3=!![];}}else{const _0x4101bf=this[_0x89ad7c(0x1b6)](_0x13f125,_0x1e79d2);if(!_0x4101bf)return 0x1;_0x17b811=_0x4101bf[_0x89ad7c(0x205)],_0x10bfa5=_0x4101bf['workflowName'];}if(_0x1e79d2['verbose']){if(_0x17b811&&_0x10bfa5)console[_0x89ad7c(0x295)]('Filter:\x20'+_0x17b811+'.'+_0x10bfa5);else _0x17b811&&console[_0x89ad7c(0x295)](_0x89ad7c(0x188)+_0x17b811);}const _0x13d736=_0x1e79d2['attemptId'],_0x24d378=_0x1e79d2[_0x89ad7c(0x223)];if(_0x13d736){_0x24d378&&console[_0x89ad7c(0x295)](a41_0x50b6be[_0x89ad7c(0x1d8)](_0x89ad7c(0x2b3)),_0x89ad7c(0x258));const _0x50ab16=_0x1e79d2['follow'];return _0x50ab16?await this[_0x89ad7c(0x196)](_0x5b8fc4,_0x13d736):await this['renderSingleTimeline'](_0x5b8fc4,_0x13d736,_0x1e79d2),0x0;}if(_0x24d378){const _0x52606a=await withSpinner(_0x89ad7c(0x2dc),()=>_0x539182['workflow'][_0x89ad7c(0x199)]({'projectName':_0x17b811,'workflowName':_0x10bfa5,'limit':0x64}),{'verbose':_0x1e79d2[_0x89ad7c(0x1e9)]}),_0x8cf572=_0x52606a[_0x89ad7c(0x2d9)]['find'](_0x229d94=>_0x229d94['id']===_0x24d378);if(!_0x8cf572)return console[_0x89ad7c(0x295)](a41_0x50b6be[_0x89ad7c(0x266)](_0x89ad7c(0x232)),'Session\x20not\x20found:\x20'+_0x24d378),0x1;if(!_0x8cf572[_0x89ad7c(0x218)]?.['id'])return console[_0x89ad7c(0x295)](a41_0x50b6be[_0x89ad7c(0x266)](_0x89ad7c(0x232)),_0x89ad7c(0x212)+_0x24d378+_0x89ad7c(0x225)),0x1;const _0x4d55a8=_0x8cf572[_0x89ad7c(0x218)]['id'];_0x1e79d2[_0x89ad7c(0x1e9)]&&console[_0x89ad7c(0x295)]('Using\x20attempt\x20'+_0x4d55a8+'\x20from\x20session\x20'+_0x24d378);const _0x3982ac=_0x1e79d2[_0x89ad7c(0x1e6)];return _0x3982ac?await this[_0x89ad7c(0x196)](_0x5b8fc4,_0x4d55a8):await this[_0x89ad7c(0x1b2)](_0x5b8fc4,_0x4d55a8,_0x1e79d2),0x0;}const _0x4b368b=await withSpinner(_0x89ad7c(0x292),()=>_0x539182[_0x89ad7c(0x2b6)][_0x89ad7c(0x199)]({'projectName':_0x17b811,'workflowName':_0x10bfa5,'limit':_0x1e79d2[_0x89ad7c(0x1b9)]||0x32}),{'verbose':_0x1e79d2['verbose']}),_0x1379fa=_0x4b368b[_0x89ad7c(0x2d9)];if(_0x1379fa[_0x89ad7c(0x207)]===0x0){if(_0x17b811&&_0x10bfa5)console['error'](_0x89ad7c(0x15d)+_0x17b811+'.'+_0x10bfa5);else _0x17b811?console['error'](_0x89ad7c(0x1b8)+_0x17b811):(console[_0x89ad7c(0x295)](_0x89ad7c(0x20a)),console[_0x89ad7c(0x295)](a41_0x50b6be[_0x89ad7c(0x176)](_0x89ad7c(0x296))));return 0x0;}_0x1379fa[_0x89ad7c(0x161)]((_0x1840a8,_0x4f11bc)=>{const _0x63a546=_0x89ad7c,_0x371a3a=_0x1840a8[_0x63a546(0x1c1)]||'',_0x58b0fe=_0x4f11bc[_0x63a546(0x1c1)]||'';return _0x58b0fe[_0x63a546(0x272)](_0x371a3a);});if(_0x1e79d2[_0x89ad7c(0x18f)]||_0x1e79d2[_0x89ad7c(0x248)])return await handleSDKOutput(_0x1379fa,_0x1e79d2),0x0;let _0x3d24ba;if(_0x46ddd3){const _0x52edc1=_0x1379fa[0x0];if(!_0x52edc1[_0x89ad7c(0x218)]?.['id'])return console['error'](_0x89ad7c(0x2e3)),0x0;_0x3d24ba=_0x52edc1[_0x89ad7c(0x218)]['id'],_0x1e79d2[_0x89ad7c(0x1e9)]&&console[_0x89ad7c(0x295)](_0x89ad7c(0x1d9)+_0x52edc1['sessionTime']);}else{const _0x5e4660=_0x1379fa[_0x89ad7c(0x2a3)](_0x1b688d=>{const _0x3ae744=_0x89ad7c,_0x3e30e5=getAttemptStatusDisplay(_0x1b688d[_0x3ae744(0x218)]);return{'title':_0x1b688d['project']?.[_0x3ae744(0x167)]+'.'+_0x1b688d[_0x3ae744(0x2b6)]?.[_0x3ae744(0x167)]+_0x3ae744(0x142)+_0x1b688d[_0x3ae744(0x1c1)]+'\x20'+_0x3e30e5['icon'],'value':_0x1b688d[_0x3ae744(0x218)]?.['id']||'','description':_0x3e30e5[_0x3ae744(0x2b5)]};}),_0x4be4be=await a41_0x116876({'type':_0x89ad7c(0x2bd),'name':_0x89ad7c(0x1d1),'message':_0x89ad7c(0x255),'choices':_0x5e4660[_0x89ad7c(0x15b)](_0x2b4cc2=>_0x2b4cc2[_0x89ad7c(0x145)]!=='')});if(!_0x4be4be['attemptId'])return 0x0;_0x3d24ba=_0x4be4be['attemptId'];}const _0x153d6b=_0x1e79d2[_0x89ad7c(0x1e6)];return _0x153d6b?await this[_0x89ad7c(0x196)](_0x5b8fc4,_0x3d24ba):await this[_0x89ad7c(0x1b2)](_0x5b8fc4,_0x3d24ba,_0x1e79d2),0x0;}async[a41_0x139d5f(0x1b2)](_0x244078,_0x4cd971,_0x29ac98){const _0x44c9d4=a41_0x139d5f,{tdx:_0x42221e}=_0x244078;let _0x47b658,_0x219d7f;try{[_0x47b658,_0x219d7f]=await Promise['all']([_0x42221e[_0x44c9d4(0x2b6)][_0x44c9d4(0x189)](_0x4cd971),_0x42221e['workflow'][_0x44c9d4(0x1af)](_0x4cd971,![])]);}catch(_0x20d641){console[_0x44c9d4(0x295)](a41_0x50b6be[_0x44c9d4(0x266)](_0x44c9d4(0x26f)));_0x29ac98[_0x44c9d4(0x1e9)]&&console['error'](_0x20d641);throw _0x20d641;}if(_0x29ac98[_0x44c9d4(0x18f)]||_0x29ac98[_0x44c9d4(0x248)]){const _0x1d9f2e=this[_0x44c9d4(0x263)](_0x47b658,_0x219d7f);await handleSDKOutput([_0x1d9f2e],_0x29ac98);return;}const _0x4669f0=_0x42221e[_0x44c9d4(0x2a4)][_0x44c9d4(0x1f8)],_0x5718f6=this[_0x44c9d4(0x1d4)](_0x47b658,_0x219d7f,_0x4669f0);console[_0x44c9d4(0x215)](_0x5718f6);}async[a41_0x139d5f(0x196)](_0x2fea82,_0x2a97c8){const _0x2c76c0=a41_0x139d5f,{tdx:_0x11f3b7}=_0x2fea82,_0x2c6264=TIMELINE_CONFIG[_0x2c76c0(0x2d1)],_0x4da198=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x30525b=0x0;while(_0x30525b<_0x4da198){process[_0x2c76c0(0x178)][_0x2c76c0(0x170)]&&process[_0x2c76c0(0x178)][_0x2c76c0(0x2df)]('\x1bc');let _0x38bf7,_0x5b52cc;try{[_0x38bf7,_0x5b52cc]=await Promise[_0x2c76c0(0x289)]([_0x11f3b7['workflow'][_0x2c76c0(0x189)](_0x2a97c8),_0x11f3b7['workflow'][_0x2c76c0(0x1af)](_0x2a97c8,![])]);}catch(_0x21fdf6){console[_0x2c76c0(0x295)](a41_0x50b6be[_0x2c76c0(0x266)](_0x2c76c0(0x229)));_0x30525b>0x0&&console[_0x2c76c0(0x295)](a41_0x50b6be[_0x2c76c0(0x176)](_0x2c76c0(0x140)+_0x30525b));throw _0x21fdf6;}const _0x163bad=_0x11f3b7['context'][_0x2c76c0(0x1f8)],_0xec7477=this[_0x2c76c0(0x1d4)](_0x38bf7,_0x5b52cc,_0x163bad);console[_0x2c76c0(0x215)](_0xec7477);const _0x4b587c=_0x38bf7[_0x2c76c0(0x13d)]&&_0x5b52cc[_0x2c76c0(0x1e1)](_0x4c8f2b=>_0x4c8f2b[_0x2c76c0(0x237)]!==_0x2c76c0(0x21d)&&_0x4c8f2b['state']!==_0x2c76c0(0x206));if(_0x4b587c){console[_0x2c76c0(0x295)](a41_0x50b6be['green']('\x0a✔\x20Attempt\x20complete'));break;}console[_0x2c76c0(0x295)](a41_0x50b6be[_0x2c76c0(0x176)](_0x2c76c0(0x2bb)+_0x30525b*0x2+_0x2c76c0(0x169))),await new Promise(_0xbd0cc8=>setTimeout(_0xbd0cc8,_0x2c6264)),_0x30525b++;}_0x30525b>=_0x4da198&&console[_0x2c76c0(0x295)](a41_0x50b6be[_0x2c76c0(0x1d8)](_0x2c76c0(0x24a)));}[a41_0x139d5f(0x1d4)](_0x1b009a,_0x41f070,_0x5855d7){const _0x3341ff=a41_0x139d5f,_0x751450=[],_0x4dc042=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x444318=0x5,_0x407ef4=process[_0x3341ff(0x178)][_0x3341ff(0x228)]||0x78,_0x2de1e7=_0x407ef4-_0x4dc042-_0x444318,_0x45e371=Math[_0x3341ff(0x1a9)](TIMELINE_CONFIG[_0x3341ff(0x14c)],Math['min'](_0x2de1e7,TIMELINE_CONFIG[_0x3341ff(0x185)])),_0x2a27e0=new Date(_0x1b009a[_0x3341ff(0x290)])[_0x3341ff(0x1b5)](),_0x5a8508=_0x1b009a[_0x3341ff(0x299)]?new Date(_0x1b009a[_0x3341ff(0x299)])[_0x3341ff(0x1b5)]():Date[_0x3341ff(0x2a9)](),_0x46031c={'start':_0x2a27e0,'end':_0x5a8508,'duration':_0x5a8508-_0x2a27e0},_0xb26a66=new Map(),_0x3453fa=[];for(const _0x51b09f of _0x41f070){if(_0x51b09f['startedAt']){const _0x336927=new Date(_0x51b09f[_0x3341ff(0x1ea)])[_0x3341ff(0x1b5)](),_0x3eefce=_0x51b09f[_0x3341ff(0x2db)]?new Date(_0x51b09f[_0x3341ff(0x2db)])[_0x3341ff(0x1b5)]():Date[_0x3341ff(0x2a9)](),_0x58e4e7={'start':_0x336927,'end':_0x3eefce,'duration':_0x3eefce-_0x336927};_0xb26a66['set'](_0x51b09f['id'],_0x58e4e7),_0x3453fa['push']({'name':_0x51b09f[_0x3341ff(0x2c2)],'state':_0x51b09f[_0x3341ff(0x237)]||_0x3341ff(0x20c),'window':_0x58e4e7});}else _0x3453fa[_0x3341ff(0x2b2)]({'name':_0x51b09f[_0x3341ff(0x2c2)],'state':_0x51b09f[_0x3341ff(0x237)]||'planned','window':undefined});}_0x3453fa['sort']((_0x2bf0bd,_0xd36b2e)=>{const _0x58cdad=_0x3341ff;if(!_0x2bf0bd[_0x58cdad(0x2a5)])return 0x1;if(!_0xd36b2e[_0x58cdad(0x2a5)])return-0x1;return _0x2bf0bd['window']['start']-_0xd36b2e['window']['start'];});const _0x1f799c=_0x3453fa['length'],_0x1ebbe1=_0x1f799c>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x1ebbe1&&_0x3453fa[_0x3341ff(0x2ae)](TIMELINE_CONFIG[_0x3341ff(0x181)]);const _0x3652bf=calculateTimeScale(_0x46031c,_0x45e371),_0x4d70ee=_0x1b009a['done']?_0x1b009a['success']?a41_0x50b6be[_0x3341ff(0x20b)](_0x3341ff(0x1fd)):a41_0x50b6be['red'](_0x3341ff(0x295)):a41_0x50b6be[_0x3341ff(0x17c)](_0x3341ff(0x21d)),_0x542838=_0x1b009a[_0x3341ff(0x1cb)]?.['id'],_0x1dfb50=_0x1b009a[_0x3341ff(0x223)];let _0xf7b629;if(_0x542838&&_0x1dfb50){const _0x30ac08=getWorkflowAttemptUrl(_0x5855d7,_0x542838,_0x1dfb50,_0x1b009a['id']);_0xf7b629=hyperlink(a41_0x50b6be[_0x3341ff(0x176)](_0x1b009a['id']),_0x30ac08);}else _0xf7b629=a41_0x50b6be[_0x3341ff(0x176)](_0x1b009a['id']);_0x751450[_0x3341ff(0x2b2)](_0x3341ff(0x177)+_0xf7b629+_0x3341ff(0x142)+_0x4d70ee+_0x3341ff(0x142)+formatElapsed(_0x46031c[_0x3341ff(0x14f)]));if(_0x3453fa[_0x3341ff(0x207)]>0x0){const _0x5c0a30=renderTimeAxis(_0x3652bf,_0x45e371),_0x297509=new Date(_0x46031c[_0x3341ff(0x210)]),_0x3537e2=formatDate(_0x297509),_0x479f33=TIMELINE_CONFIG[_0x3341ff(0x2bf)]+TIMELINE_CONFIG[_0x3341ff(0x1ce)]+_0x4dc042,_0x10c2be=_0x3537e2[_0x3341ff(0x2af)](_0x479f33),_0x176648=a41_0x50b6be['dim'](_0x10c2be);_0x751450[_0x3341ff(0x2b2)](_0x176648+'\x20'+_0x5c0a30);for(const _0xb399bf of _0x3453fa){_0x751450[_0x3341ff(0x2b2)](renderTaskRow(_0xb399bf,_0x3652bf,_0x45e371,_0x4dc042));}const _0x2a108d=calculateStats(_0x3453fa);_0x751450[_0x3341ff(0x2b2)](formatStats(_0x2a108d)),_0x1ebbe1&&_0x751450['push'](a41_0x50b6be[_0x3341ff(0x1d8)](_0x3341ff(0x154)+TIMELINE_CONFIG[_0x3341ff(0x181)]+_0x3341ff(0x259)+_0x1f799c+'\x20tasks')),_0x751450[_0x3341ff(0x2b2)](''),_0x751450[_0x3341ff(0x2b2)](a41_0x50b6be[_0x3341ff(0x176)](_0x3341ff(0x195))+('tdx\x20wf\x20attempt\x20'+_0x1b009a['id']+'\x20logs')+a41_0x50b6be['dim'](_0x3341ff(0x1a1)));}else _0x751450[_0x3341ff(0x2b2)](_0x3341ff(0x14d));return _0x751450['join']('\x0a');}[a41_0x139d5f(0x263)](_0x4b3322,_0x57c030){const _0x32f4ac=a41_0x139d5f,_0xf89ed9=new Date(_0x4b3322['createdAt'])[_0x32f4ac(0x1b5)](),_0x288568=_0x4b3322[_0x32f4ac(0x299)]?new Date(_0x4b3322['finishedAt'])[_0x32f4ac(0x1b5)]():Date['now'](),_0x514415=_0x288568-_0xf89ed9,_0x436ee8=[];for(const _0x2d557d of _0x57c030){if(_0x2d557d[_0x32f4ac(0x1ea)]){const _0x470d53=new Date(_0x2d557d[_0x32f4ac(0x1ea)])['getTime'](),_0x4153cc=_0x2d557d[_0x32f4ac(0x2db)]?new Date(_0x2d557d[_0x32f4ac(0x2db)])[_0x32f4ac(0x1b5)]():Date[_0x32f4ac(0x2a9)]();_0x436ee8['push']({'name':_0x2d557d[_0x32f4ac(0x2c2)],'state':_0x2d557d[_0x32f4ac(0x237)]||'unknown','window':{'start':_0x470d53,'end':_0x4153cc,'duration':_0x4153cc-_0x470d53}});}else _0x436ee8[_0x32f4ac(0x2b2)]({'name':_0x2d557d[_0x32f4ac(0x2c2)],'state':_0x2d557d[_0x32f4ac(0x237)]||_0x32f4ac(0x206),'window':undefined});}const _0x58dda7=calculateStats(_0x436ee8);return{'attempt':{'id':_0x4b3322['id'],'status':_0x4b3322[_0x32f4ac(0x13d)]?_0x4b3322['success']?_0x32f4ac(0x1fd):_0x32f4ac(0x295):_0x32f4ac(0x21d),'createdAt':_0x4b3322['createdAt'],'finishedAt':_0x4b3322[_0x32f4ac(0x299)],'duration_ms':_0x514415},'tasks':_0x436ee8['map'](_0x1f06e3=>({'name':_0x1f06e3[_0x32f4ac(0x167)],'state':_0x1f06e3[_0x32f4ac(0x237)],'startedAt':_0x1f06e3[_0x32f4ac(0x2a5)]?new Date(_0x1f06e3[_0x32f4ac(0x2a5)][_0x32f4ac(0x210)])[_0x32f4ac(0x1f2)]():null,'updatedAt':_0x1f06e3[_0x32f4ac(0x2a5)]?new Date(_0x1f06e3[_0x32f4ac(0x2a5)][_0x32f4ac(0x16c)])[_0x32f4ac(0x1f2)]():null,'duration_ms':_0x1f06e3[_0x32f4ac(0x2a5)]?.['duration']||null})),'stats':_0x58dda7};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bfa1f,_0x55929f){const _0x1410aa=a42_0x22f3,_0x359bd3=_0x2bfa1f();while(!![]){try{const _0x17f9d0=-parseInt(_0x1410aa(0xdc))/0x1*(parseInt(_0x1410aa(0xdd))/0x2)+-parseInt(_0x1410aa(0xd0))/0x3+-parseInt(_0x1410aa(0xdb))/0x4+-parseInt(_0x1410aa(0xd1))/0x5*(-parseInt(_0x1410aa(0xd8))/0x6)+-parseInt(_0x1410aa(0xd3))/0x7*(-parseInt(_0x1410aa(0xd6))/0x8)+parseInt(_0x1410aa(0xcf))/0x9+parseInt(_0x1410aa(0xd5))/0xa;if(_0x17f9d0===_0x55929f)break;else _0x359bd3['push'](_0x359bd3['shift']());}catch(_0x37e364){_0x359bd3['push'](_0x359bd3['shift']());}}}(a42_0x282c,0x306e1));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a42_0x22f3(_0x4794ce,_0xc48179){_0x4794ce=_0x4794ce-0xcf;const _0x282c4f=a42_0x282c();let _0x22f35f=_0x282c4f[_0x4794ce];return _0x22f35f;}export function getUserAgent(){const _0x2c7da0=a42_0x22f3,_0x56d1ec=getVersion(),_0x2b6490=platform(),_0x4a2356=process['version'][_0x2c7da0(0xd2)]('v','');return'tdx/'+_0x56d1ec+'\x20('+_0x2b6490+_0x2c7da0(0xd9)+_0x4a2356+')';}function a42_0x282c(){const _0x99ac60=['TD1\x20','1221748sMCeAk','77933TNxbWb','10qfvszb','X-Trino-User','524385bolmGf','122448zKllVL','11065aidYmq','replace','91Emyofi','Authorization','2804240lYIhjB','135008QeHlrB','length','1020UZGOYE',';\x20node/'];a42_0x282c=function(){return _0x99ac60;};return a42_0x282c();}export function getAuthHeaders(_0x418da5,_0x5acc30){const _0x4a660c=a42_0x22f3,_0x41c234=getVersion(),_0x1513a1={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x41c234};return _0x5acc30&&(_0x1513a1[_0x4a660c(0xd4)]=_0x4a660c(0xda)+_0x5acc30),_0x1513a1;}export function toHeaderRecord(_0xfbff04){const _0x2d8dd0={};for(const [_0xdd0279,_0x5a2a39]of Object['entries'](_0xfbff04)){_0x5a2a39!==undefined&&(_0x2d8dd0[_0xdd0279]=_0x5a2a39);}return _0x2d8dd0;}export function getTrinoHeaders(_0x5e509b,_0xb36611){const _0x20c705=a42_0x22f3,_0x46d095=getAuthHeaders(_0x5e509b,_0xb36611),_0x338e8f=toHeaderRecord(_0x46d095);return delete _0x338e8f['Authorization'],_0xb36611&&(_0x338e8f[_0x20c705(0xde)]=_0xb36611),_0x338e8f;}export function hasAPIKey(_0x34760c){const _0x2a8343=a42_0x22f3,_0x445c5f=getAPIKey(_0x34760c);return _0x445c5f!==undefined&&_0x445c5f[_0x2a8343(0xd7)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5bcb31,_0x202c51){const _0xffca70=a43_0x32a3,_0x2c9693=_0x5bcb31();while(!![]){try{const _0x4569b5=parseInt(_0xffca70(0xa0))/0x1+parseInt(_0xffca70(0x8e))/0x2+-parseInt(_0xffca70(0xad))/0x3*(parseInt(_0xffca70(0x92))/0x4)+-parseInt(_0xffca70(0x94))/0x5+parseInt(_0xffca70(0xb3))/0x6+parseInt(_0xffca70(0xa3))/0x7+parseInt(_0xffca70(0x85))/0x8*(-parseInt(_0xffca70(0x90))/0x9);if(_0x4569b5===_0x202c51)break;else _0x2c9693['push'](_0x2c9693['shift']());}catch(_0x547a2d){_0x2c9693['push'](_0x2c9693['shift']());}}}(a43_0x398e,0x878c3));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 a43_0x2e6788 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x3cedb5){const _0x2e727d=a43_0x32a3;return _0x3cedb5[_0x2e727d(0xb8)]===_0x2e727d(0xa5)||_0x3cedb5[_0x2e727d(0xb8)]==='jsonl'||_0x3cedb5['format']===_0x2e727d(0x78)||_0x3cedb5[_0x2e727d(0xb8)]===_0x2e727d(0x9d)||_0x3cedb5['json']===!![]||_0x3cedb5['jsonl']===!![]||_0x3cedb5[_0x2e727d(0x78)]===!![]||_0x3cedb5[_0x2e727d(0x9d)]===!![];}export function parseOutputOptions(_0x479080){const _0x33ec64=a43_0x32a3;return{'format':_0x479080['format']||'table','output':_0x479080[_0x33ec64(0xa4)]||'','limit':_0x479080[_0x33ec64(0x86)],'color':_0x479080['color'],'noColor':_0x479080[_0x33ec64(0x7a)]};}function convertSDKResultToQueryResult(_0x13b674){const _0x1047a9=a43_0x32a3,_0x407036=[];if(_0x13b674['length']>0x0){const _0x43e6af=_0x13b674[0x0];for(const [_0x44ec00,_0xeb3a05]of Object[_0x1047a9(0x7d)](_0x43e6af)){let _0x37f5f4='varchar';if(typeof _0xeb3a05===_0x1047a9(0xb6))_0x37f5f4=Number[_0x1047a9(0xaf)](_0xeb3a05)?_0x1047a9(0x79):_0x1047a9(0x89);else{if(typeof _0xeb3a05===_0x1047a9(0x9c))_0x37f5f4='boolean';else _0xeb3a05===null&&(_0x37f5f4=_0x1047a9(0xae));}_0x407036['push']({'name':_0x44ec00,'type':_0x37f5f4});}}return{'queryId':_0x1047a9(0x87),'columns':_0x407036,'data':_0x13b674,'stats':{'state':_0x1047a9(0xa8),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x13b674[_0x1047a9(0xaa)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x50b668,_0x17d915){const _0x3c5247=convertSDKResultToQueryResult(_0x50b668);return formatQueryOutput(_0x3c5247,_0x17d915);}export async function formatQueryOutput(_0x5804f4,_0x44eed0){const _0x473ad2=a43_0x32a3,{format:_0x1393e4,limit:_0x50cf31,output:_0x182a0c,color:_0x2f7369,noColor:_0x41f3ae}=_0x44eed0,_0x26f11b=Boolean(_0x182a0c)&&!_0x2f7369,_0x54e4f3={'color':_0x2f7369,'noColor':_0x41f3ae||_0x26f11b};if(_0x1393e4===_0x473ad2(0x9d)){const _0x320108=shouldUseLess(_0x1393e4,_0x182a0c);return formatAsTable(_0x5804f4,_0x50cf31,_0x320108,_0x54e4f3);}else{if(_0x1393e4==='json')return formatAsJSON(_0x5804f4,_0x54e4f3);else return _0x1393e4===_0x473ad2(0xb9)?formatAsJSONL(_0x5804f4,_0x54e4f3):formatQueryResult(_0x5804f4,_0x1393e4);}}function shouldUseLess(_0x1c98d5,_0x4e86c6){const _0x16b926=a43_0x32a3;return(_0x1c98d5===_0x16b926(0x9d)||_0x1c98d5==='list')&&process['stdout'][_0x16b926(0x8f)]&&!_0x4e86c6;}export function resolveOutputOptions(_0x7e99f9){const _0x1d54ef=a43_0x32a3,_0x34273a=resolveOutputFormat(_0x7e99f9[_0x1d54ef(0xb8)],_0x7e99f9[_0x1d54ef(0xa4)],_0x1d54ef(0x9d));let _0x345391=typeof _0x7e99f9[_0x1d54ef(0x86)]==='number'?_0x7e99f9[_0x1d54ef(0x86)]:parseInt(_0x7e99f9[_0x1d54ef(0x86)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0xfbaaa6=_0x7e99f9[_0x1d54ef(0xa4)]||'';return shouldUseLess(_0x34273a,_0xfbaaa6)&&(_0x345391=Infinity),{'format':_0x34273a,'output':_0xfbaaa6,'limit':_0x345391,'color':_0x7e99f9['color'],'noColor':_0x7e99f9[_0x1d54ef(0x7a)]};}export function writeOutput(_0x4a06d6,_0x22917a,_0x3a855c){const _0x20f106=a43_0x32a3;return _0x22917a?(writeFileSync(_0x22917a,_0x4a06d6),console[_0x20f106(0xb7)]('Results\x20saved\x20to\x20'+_0x22917a),Promise[_0x20f106(0x98)]()):shouldUseLess(_0x3a855c||'','')?new Promise(_0x1020d0=>{const _0x27a093=_0x20f106,_0x502751=spawn('less',[_0x27a093(0xb2)],{'stdio':[_0x27a093(0x8b),'inherit','inherit']});let _0x3d4d27=![];_0x502751['on'](_0x27a093(0xb7),()=>{const _0x56eb58=_0x27a093;!_0x3d4d27&&(_0x3d4d27=!![],console[_0x56eb58(0xb5)](_0x4a06d6),_0x1020d0());}),_0x502751['on']('close',()=>{!_0x3d4d27&&(_0x3d4d27=!![],_0x1020d0());}),_0x502751['on'](_0x27a093(0xa2),()=>{const _0x16e90f=_0x27a093;!_0x3d4d27&&_0x502751[_0x16e90f(0x97)]&&(_0x502751[_0x16e90f(0x97)]['on']('error',()=>{}),_0x502751[_0x16e90f(0x97)]['write'](_0x4a06d6),_0x502751[_0x16e90f(0x97)][_0x16e90f(0x91)]());}),!_0x502751[_0x27a093(0x97)]&&(!_0x3d4d27&&(_0x3d4d27=!![],console[_0x27a093(0xb5)](_0x4a06d6),_0x1020d0()));}):(console['log'](_0x4a06d6),Promise[_0x20f106(0x98)]());}export async function handleSDKOutput(_0x9f3596,_0xa70c1e){const _0x3fffda=a43_0x32a3,_0x409afe=resolveOutputOptions(_0xa70c1e),_0x1343e8=await formatSDKOutput(_0x9f3596,_0x409afe);await writeOutput(_0x1343e8,_0x409afe[_0x3fffda(0xa4)]||undefined,_0x409afe[_0x3fffda(0xb8)]);}function a43_0x32a3(_0x58a222,_0x3f73af){_0x58a222=_0x58a222-0x77;const _0x398eb8=a43_0x398e();let _0x32a395=_0x398eb8[_0x58a222];return _0x32a395;}export async function handleQueryOutput(_0x3d2f7e,_0x3c0de2){const _0x10f7cc=a43_0x32a3,_0x13ae4a=resolveOutputOptions(_0x3c0de2),_0x3d396b=await formatQueryOutput(_0x3d2f7e,_0x13ae4a);await writeOutput(_0x3d396b,_0x13ae4a['output']||undefined,_0x13ae4a[_0x10f7cc(0xb8)]);}async function formatSingleObject(_0x2956bc,_0x330e9d){const _0x42cb7b=a43_0x32a3,{format:_0x52ad3e,color:_0x1a9eed,noColor:_0x196da8}=_0x330e9d,_0x5bda4e={'color':_0x1a9eed,'noColor':_0x196da8};if(_0x52ad3e===_0x42cb7b(0xa5)){if(shouldUseColor(_0x5bda4e))return colorizeJSON(_0x2956bc,_0x5bda4e);return JSON[_0x42cb7b(0x9b)](_0x2956bc,null,0x2);}else{if(_0x52ad3e===_0x42cb7b(0xb9)){if(shouldUseColor(_0x5bda4e))return colorizeJSONCompact(_0x2956bc,_0x5bda4e);return JSON[_0x42cb7b(0x9b)](_0x2956bc);}else{if(_0x52ad3e===_0x42cb7b(0x78))return Object[_0x42cb7b(0x7d)](_0x2956bc)[_0x42cb7b(0x9a)](([_0x47ae61,_0x20d5d8])=>_0x47ae61+'\x09'+_0x20d5d8)[_0x42cb7b(0x8a)]('\x0a');else{const _0x4c3e33=Object[_0x42cb7b(0x7d)](_0x2956bc);if(_0x4c3e33[_0x42cb7b(0xaa)]===0x0)return _0x42cb7b(0xa6);const _0xbc6eef=_0x2956bc[_0x42cb7b(0x7f)],_0x587671=_0x2956bc[_0x42cb7b(0x7b)],_0x26ce00=_0x2956bc[_0x42cb7b(0xa7)],_0x144bdc=_0x2956bc['rule'],_0x1448d8=_0x587671?typeof _0x587671===_0x42cb7b(0xa9)?_0x587671:JSON[_0x42cb7b(0x9b)](_0x587671,null,0x2):undefined,_0x56a3b1=_0x26ce00&&Object[_0x42cb7b(0x8c)](_0x26ce00)['length']>0x0?JSON['stringify'](_0x26ce00,null,0x2):undefined,_0x4d23eb=_0x144bdc&&Object['keys'](_0x144bdc)[_0x42cb7b(0xaa)]>0x0?JSON[_0x42cb7b(0x9b)](_0x144bdc,null,0x2):undefined,_0x4c35d8=_0x4c3e33[_0x42cb7b(0x84)](([_0x75ad80])=>_0x75ad80!=='debug'&&_0x75ad80!==_0x42cb7b(0x7b)&&_0x75ad80!==_0x42cb7b(0xa7)&&_0x75ad80!==_0x42cb7b(0x7e)),_0x373efa=Math[_0x42cb7b(0x77)](..._0x4c35d8['map'](([_0x1ad2a5])=>_0x1ad2a5[_0x42cb7b(0xaa)])),_0x36c940=Math[_0x42cb7b(0x77)](..._0x4c35d8[_0x42cb7b(0x9a)](([,_0x1d3292])=>{const _0x34a695=_0x42cb7b;try{const _0x311a34=_0x1d3292===null||_0x1d3292===undefined?'':typeof _0x1d3292===_0x34a695(0x7c)?JSON['stringify'](_0x1d3292):String(_0x1d3292),_0x393489=_0x311a34[_0x34a695(0x82)]('\x0a');return Math['max'](..._0x393489[_0x34a695(0x9a)](_0x5e4fb6=>_0x5e4fb6[_0x34a695(0xaa)]),0x0);}catch{return 0x0;}}),0x14),_0x5b6993=[];_0x5b6993[_0x42cb7b(0xb1)](colorBorder('┌─'+'─'[_0x42cb7b(0xac)](_0x373efa)+_0x42cb7b(0x96)+'─'['repeat'](_0x36c940)+'─┐',_0x5bda4e)),_0x4c35d8['forEach'](([_0x2a8a01,_0x51f2c9])=>{const _0x36d12a=_0x42cb7b;let _0x6372c5;try{_0x6372c5=_0x51f2c9===null||_0x51f2c9===undefined?'':typeof _0x51f2c9==='object'?JSON[_0x36d12a(0x9b)](_0x51f2c9):String(_0x51f2c9);}catch{_0x6372c5=_0x36d12a(0x9e);}const _0x58010b=_0x2a8a01[_0x36d12a(0x80)](_0x373efa),_0x110e32=_0x6372c5[_0x36d12a(0x82)]('\x0a');_0x110e32['forEach']((_0x158285,_0x3356d4)=>{const _0x519fe4=_0x36d12a,_0x44533d=colorBorder('│',_0x5bda4e);_0x3356d4===0x0?_0x5b6993[_0x519fe4(0xb1)](_0x44533d+'\x20'+_0x58010b+'\x20'+_0x44533d+'\x20'+_0x158285['padEnd'](_0x36c940)+'\x20'+_0x44533d):_0x5b6993[_0x519fe4(0xb1)](_0x44533d+'\x20'+'\x20'[_0x519fe4(0xac)](_0x373efa)+'\x20'+_0x44533d+'\x20'+_0x158285[_0x519fe4(0x80)](_0x36c940)+'\x20'+_0x44533d);});}),_0x5b6993[_0x42cb7b(0xb1)](colorBorder('└─'+'─'['repeat'](_0x373efa)+'─┴─'+'─'['repeat'](_0x36c940)+'─┘',_0x5bda4e));_0x1448d8&&(_0x5b6993['push'](''),_0x5b6993[_0x42cb7b(0xb1)](String(a43_0x2e6788[_0x42cb7b(0x99)][_0x42cb7b(0x9f)](_0x42cb7b(0x95)))),_0x5b6993[_0x42cb7b(0xb1)](_0x1448d8));_0x56a3b1&&(_0x5b6993[_0x42cb7b(0xb1)](''),_0x5b6993['push'](String(a43_0x2e6788[_0x42cb7b(0xa1)][_0x42cb7b(0x9f)](_0x42cb7b(0xab)))),_0x5b6993[_0x42cb7b(0xb1)](_0x56a3b1));_0x4d23eb&&(_0x5b6993[_0x42cb7b(0xb1)](''),_0x5b6993[_0x42cb7b(0xb1)](String(a43_0x2e6788[_0x42cb7b(0x93)]['bold'](_0x42cb7b(0xb0)))),_0x5b6993[_0x42cb7b(0xb1)](_0x4d23eb));if(_0xbc6eef){if(_0xbc6eef[_0x42cb7b(0x88)]){_0x5b6993[_0x42cb7b(0xb1)](''),_0x5b6993[_0x42cb7b(0xb1)](String(a43_0x2e6788[_0x42cb7b(0x8d)][_0x42cb7b(0x9f)]('[error]')));const _0x409f97=_0xbc6eef[_0x42cb7b(0x88)]['split']('\x0a');_0x409f97[_0x42cb7b(0xb4)](_0x4b4ccc=>{const _0x503a36=_0x42cb7b;_0x4b4ccc[_0x503a36(0x83)]()&&_0x5b6993[_0x503a36(0xb1)](_0x4b4ccc);});}if(_0xbc6eef['cmdout']){_0x5b6993[_0x42cb7b(0xb1)](''),_0x5b6993[_0x42cb7b(0xb1)](String(a43_0x2e6788['cyan'][_0x42cb7b(0x9f)](_0x42cb7b(0x81))));const _0x4677da=_0xbc6eef['cmdout'][_0x42cb7b(0x82)]('\x0a');_0x4677da['forEach'](_0x520607=>{const _0x497342=_0x42cb7b;_0x520607[_0x497342(0x83)]()&&_0x5b6993['push'](_0x520607);});}}return _0x5b6993['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0xc9e4cf,_0x2c9cf4){const _0x2eb6b5=a43_0x32a3;if(_0x2c9cf4[_0x2eb6b5(0xb8)]===_0x2eb6b5(0x9d)){await handleSDKOutput([_0xc9e4cf],_0x2c9cf4);return;}const _0x1cb434=resolveOutputOptions(_0x2c9cf4),_0x23540b=await formatSingleObject(_0xc9e4cf,_0x1cb434);await writeOutput(_0x23540b,_0x1cb434[_0x2eb6b5(0xa4)]||undefined,_0x1cb434[_0x2eb6b5(0xb8)]);}function a43_0x398e(){const _0x2c4f09=['bigint','noColor','query','object','entries','rule','debug','padEnd','[logs]','split','trim','filter','12911504PCqfNu','limit','sdk-result','stderr','double','join','pipe','keys','red','1865868XkCvpw','isTTY','9lDZird','end','941444CgectM','magenta','3371685fRvuem','[query]','─┬─','stdin','resolve','yellow','map','stringify','boolean','table','[Object]','bold','1037772evypGH','blue','spawn','3356521bcluLn','output','json','No\x20data','params','FINISHED','string','length','[params]','repeat','3XHSGrc','varchar','isInteger','[rule]','push','-FXRSn','3771780FKOfUe','forEach','log','number','error','format','jsonl','max','tsv'];a43_0x398e=function(){return _0x2c4f09;};return a43_0x398e();}
|
|
1
|
+
(function(_0x16f6e9,_0x155b9f){const _0x4c05b7=a43_0xaa61,_0x5010f9=_0x16f6e9();while(!![]){try{const _0x4fdb10=parseInt(_0x4c05b7(0x20c))/0x1*(parseInt(_0x4c05b7(0x1f5))/0x2)+parseInt(_0x4c05b7(0x214))/0x3+-parseInt(_0x4c05b7(0x1f4))/0x4+-parseInt(_0x4c05b7(0x222))/0x5*(parseInt(_0x4c05b7(0x1fb))/0x6)+-parseInt(_0x4c05b7(0x1e4))/0x7+parseInt(_0x4c05b7(0x1fa))/0x8*(parseInt(_0x4c05b7(0x201))/0x9)+parseInt(_0x4c05b7(0x206))/0xa*(parseInt(_0x4c05b7(0x200))/0xb);if(_0x4fdb10===_0x155b9f)break;else _0x5010f9['push'](_0x5010f9['shift']());}catch(_0x2ee247){_0x5010f9['push'](_0x5010f9['shift']());}}}(a43_0x2f3b,0x77357));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 a43_0x36abf7 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x571578){const _0x28f3ff=a43_0xaa61;return _0x571578[_0x28f3ff(0x229)]==='json'||_0x571578[_0x28f3ff(0x229)]===_0x28f3ff(0x221)||_0x571578[_0x28f3ff(0x229)]===_0x28f3ff(0x1e7)||_0x571578[_0x28f3ff(0x229)]==='table'||_0x571578[_0x28f3ff(0x217)]===!![]||_0x571578[_0x28f3ff(0x221)]===!![]||_0x571578[_0x28f3ff(0x1e7)]===!![]||_0x571578[_0x28f3ff(0x1e5)]===!![];}export function parseOutputOptions(_0x331ee9){const _0x6e03ab=a43_0xaa61;return{'format':_0x331ee9[_0x6e03ab(0x229)]||_0x6e03ab(0x1e5),'output':_0x331ee9[_0x6e03ab(0x1e8)]||'','limit':_0x331ee9[_0x6e03ab(0x1ee)],'color':_0x331ee9[_0x6e03ab(0x218)],'noColor':_0x331ee9['noColor']};}function a43_0x2f3b(){const _0x1ea281=['inherit','FINISHED','1402158QihQMH','[error]','max','json','color','string','forEach','pipe','repeat','[Object]','padEnd','varchar','push','jsonl','11305QQSICP','noColor','stringify','cyan','split','object','blue','format','write','[logs]','keys','146979YLsNDi','table','yellow','tsv','output','number','-FXRSn','stdin','params','length','limit','trim','debug','─┬─','log','[rule]','2778384lQGjyd','14cCeMGf','bigint','list','boolean','[query]','138552FOTfam','1044SLryAF','magenta','[params]','spawn','join','13750aJbvdj','9QnSwhF','isTTY','cmdout','less','rule','2470ZwxYeR','map','query','─┴─','No\x20data','entries','114833IbeIYG','bold','filter','end','isInteger','red'];a43_0x2f3b=function(){return _0x1ea281;};return a43_0x2f3b();}function convertSDKResultToQueryResult(_0x1d251e){const _0xfbed46=a43_0xaa61,_0x3bef48=[];if(_0x1d251e[_0xfbed46(0x1ed)]>0x0){const _0x4caaf9=_0x1d251e[0x0];for(const [_0xa14f75,_0x53f028]of Object[_0xfbed46(0x20b)](_0x4caaf9)){let _0x18d7dc=_0xfbed46(0x21f);if(typeof _0x53f028==='number')_0x18d7dc=Number[_0xfbed46(0x210)](_0x53f028)?_0xfbed46(0x1f6):'double';else{if(typeof _0x53f028==='boolean')_0x18d7dc=_0xfbed46(0x1f8);else _0x53f028===null&&(_0x18d7dc=_0xfbed46(0x21f));}_0x3bef48[_0xfbed46(0x220)]({'name':_0xa14f75,'type':_0x18d7dc});}}return{'queryId':'sdk-result','columns':_0x3bef48,'data':_0x1d251e,'stats':{'state':_0xfbed46(0x213),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1d251e[_0xfbed46(0x1ed)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x5384d0,_0xa30f36){const _0x35aea8=convertSDKResultToQueryResult(_0x5384d0);return formatQueryOutput(_0x35aea8,_0xa30f36);}export async function formatQueryOutput(_0x4938e5,_0x11eb8a){const _0x4e2ade=a43_0xaa61,{format:_0x3578f2,limit:_0x4031eb,output:_0x4843f3,color:_0x1c3799,noColor:_0x1cca07}=_0x11eb8a,_0x516f10=Boolean(_0x4843f3)&&!_0x1c3799,_0x12d7b3={'color':_0x1c3799,'noColor':_0x1cca07||_0x516f10};if(_0x3578f2===_0x4e2ade(0x1e5)){const _0x52f94a=shouldUseLess(_0x3578f2,_0x4843f3);return formatAsTable(_0x4938e5,_0x4031eb,_0x52f94a,_0x12d7b3);}else{if(_0x3578f2===_0x4e2ade(0x217))return formatAsJSON(_0x4938e5,_0x12d7b3);else return _0x3578f2==='jsonl'?formatAsJSONL(_0x4938e5,_0x12d7b3):formatQueryResult(_0x4938e5,_0x3578f2);}}function a43_0xaa61(_0x1c78bf,_0x4ea782){_0x1c78bf=_0x1c78bf-0x1e2;const _0x2f3be1=a43_0x2f3b();let _0xaa6166=_0x2f3be1[_0x1c78bf];return _0xaa6166;}function shouldUseLess(_0x4761bf,_0x3c6ca1){const _0x361f65=a43_0xaa61;return(_0x4761bf==='table'||_0x4761bf===_0x361f65(0x1f7))&&process['stdout'][_0x361f65(0x202)]&&!_0x3c6ca1;}export function resolveOutputOptions(_0x273f74){const _0x279627=a43_0xaa61,_0xbe8c95=resolveOutputFormat(_0x273f74[_0x279627(0x229)],_0x273f74['output'],_0x279627(0x1e5));let _0x5b18b5=typeof _0x273f74[_0x279627(0x1ee)]===_0x279627(0x1e9)?_0x273f74[_0x279627(0x1ee)]:parseInt(_0x273f74[_0x279627(0x1ee)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x31e491=_0x273f74['output']||'';return shouldUseLess(_0xbe8c95,_0x31e491)&&(_0x5b18b5=Infinity),{'format':_0xbe8c95,'output':_0x31e491,'limit':_0x5b18b5,'color':_0x273f74[_0x279627(0x218)],'noColor':_0x273f74[_0x279627(0x223)]};}export function writeOutput(_0x428fc1,_0x4e867e,_0x34ff60){const _0x251970=a43_0xaa61;return _0x4e867e?(writeFileSync(_0x4e867e,_0x428fc1),console['error']('Results\x20saved\x20to\x20'+_0x4e867e),Promise['resolve']()):shouldUseLess(_0x34ff60||'','')?new Promise(_0x5d0131=>{const _0x16c370=a43_0xaa61,_0x458ae4=spawn(_0x16c370(0x204),[_0x16c370(0x1ea)],{'stdio':[_0x16c370(0x21b),_0x16c370(0x212),'inherit']});let _0x4a0946=![];_0x458ae4['on']('error',()=>{const _0x442c06=_0x16c370;!_0x4a0946&&(_0x4a0946=!![],console[_0x442c06(0x1f2)](_0x428fc1),_0x5d0131());}),_0x458ae4['on']('close',()=>{!_0x4a0946&&(_0x4a0946=!![],_0x5d0131());}),_0x458ae4['on'](_0x16c370(0x1fe),()=>{const _0x185fbd=_0x16c370;!_0x4a0946&&_0x458ae4[_0x185fbd(0x1eb)]&&(_0x458ae4['stdin']['on']('error',()=>{}),_0x458ae4['stdin'][_0x185fbd(0x22a)](_0x428fc1),_0x458ae4[_0x185fbd(0x1eb)][_0x185fbd(0x20f)]());}),!_0x458ae4[_0x16c370(0x1eb)]&&(!_0x4a0946&&(_0x4a0946=!![],console['log'](_0x428fc1),_0x5d0131()));}):(console[_0x251970(0x1f2)](_0x428fc1),Promise['resolve']());}export async function handleSDKOutput(_0x466edb,_0x372841){const _0x108b60=a43_0xaa61,_0x3db317=resolveOutputOptions(_0x372841),_0x313134=await formatSDKOutput(_0x466edb,_0x3db317);await writeOutput(_0x313134,_0x3db317[_0x108b60(0x1e8)]||undefined,_0x3db317[_0x108b60(0x229)]);}export async function handleQueryOutput(_0x4f6c26,_0x338806){const _0x236e47=a43_0xaa61,_0x172498=resolveOutputOptions(_0x338806),_0x473fc5=await formatQueryOutput(_0x4f6c26,_0x172498);await writeOutput(_0x473fc5,_0x172498[_0x236e47(0x1e8)]||undefined,_0x172498[_0x236e47(0x229)]);}async function formatSingleObject(_0x11239a,_0x45e738){const _0x14ce05=a43_0xaa61,{format:_0x1a121c,color:_0x44838d,noColor:_0x1353c5}=_0x45e738,_0x1c77dd={'color':_0x44838d,'noColor':_0x1353c5};if(_0x1a121c===_0x14ce05(0x217)){if(shouldUseColor(_0x1c77dd))return colorizeJSON(_0x11239a,_0x1c77dd);return JSON['stringify'](_0x11239a,null,0x2);}else{if(_0x1a121c===_0x14ce05(0x221)){if(shouldUseColor(_0x1c77dd))return colorizeJSONCompact(_0x11239a,_0x1c77dd);return JSON['stringify'](_0x11239a);}else{if(_0x1a121c===_0x14ce05(0x1e7))return Object[_0x14ce05(0x20b)](_0x11239a)[_0x14ce05(0x207)](([_0x14eb20,_0x581829])=>_0x14eb20+'\x09'+_0x581829)[_0x14ce05(0x1ff)]('\x0a');else{const _0xf1c255=Object[_0x14ce05(0x20b)](_0x11239a);if(_0xf1c255[_0x14ce05(0x1ed)]===0x0)return _0x14ce05(0x20a);const _0xf4f56c=_0x11239a[_0x14ce05(0x1f0)],_0x5ef69f=_0x11239a[_0x14ce05(0x208)],_0x618f40=_0x11239a[_0x14ce05(0x1ec)],_0x48565b=_0x11239a['rule'],_0x592607=_0x5ef69f?typeof _0x5ef69f===_0x14ce05(0x219)?_0x5ef69f:JSON[_0x14ce05(0x224)](_0x5ef69f,null,0x2):undefined,_0xc990f5=_0x618f40&&Object[_0x14ce05(0x1e3)](_0x618f40)['length']>0x0?JSON[_0x14ce05(0x224)](_0x618f40,null,0x2):undefined,_0x2fb022=_0x48565b&&Object[_0x14ce05(0x1e3)](_0x48565b)[_0x14ce05(0x1ed)]>0x0?JSON[_0x14ce05(0x224)](_0x48565b,null,0x2):undefined,_0x2dbe33=_0xf1c255[_0x14ce05(0x20e)](([_0xfab285])=>_0xfab285!==_0x14ce05(0x1f0)&&_0xfab285!==_0x14ce05(0x208)&&_0xfab285!==_0x14ce05(0x1ec)&&_0xfab285!==_0x14ce05(0x205)),_0x116b0b=Math['max'](..._0x2dbe33[_0x14ce05(0x207)](([_0xfea833])=>_0xfea833['length'])),_0x3ee902=Math[_0x14ce05(0x216)](..._0x2dbe33[_0x14ce05(0x207)](([,_0x1d6410])=>{const _0x1b5a21=_0x14ce05;try{const _0x5cfb69=_0x1d6410===null||_0x1d6410===undefined?'':typeof _0x1d6410==='object'?JSON[_0x1b5a21(0x224)](_0x1d6410):String(_0x1d6410),_0x50a2ea=_0x5cfb69[_0x1b5a21(0x226)]('\x0a');return Math[_0x1b5a21(0x216)](..._0x50a2ea['map'](_0xda2bfc=>_0xda2bfc[_0x1b5a21(0x1ed)]),0x0);}catch{return 0x0;}}),0x14),_0x3e5af2=[];_0x3e5af2['push'](colorBorder('┌─'+'─'['repeat'](_0x116b0b)+_0x14ce05(0x1f1)+'─'[_0x14ce05(0x21c)](_0x3ee902)+'─┐',_0x1c77dd)),_0x2dbe33[_0x14ce05(0x21a)](([_0x3892f9,_0x368cb6])=>{const _0x3395c1=_0x14ce05;let _0x5e85ba;try{_0x5e85ba=_0x368cb6===null||_0x368cb6===undefined?'':typeof _0x368cb6===_0x3395c1(0x227)?JSON[_0x3395c1(0x224)](_0x368cb6):String(_0x368cb6);}catch{_0x5e85ba=_0x3395c1(0x21d);}const _0x15d850=_0x3892f9['padEnd'](_0x116b0b),_0x28df18=_0x5e85ba[_0x3395c1(0x226)]('\x0a');_0x28df18[_0x3395c1(0x21a)]((_0x51dab8,_0x23e765)=>{const _0x47d243=_0x3395c1,_0x3daaec=colorBorder('│',_0x1c77dd);_0x23e765===0x0?_0x3e5af2[_0x47d243(0x220)](_0x3daaec+'\x20'+_0x15d850+'\x20'+_0x3daaec+'\x20'+_0x51dab8[_0x47d243(0x21e)](_0x3ee902)+'\x20'+_0x3daaec):_0x3e5af2[_0x47d243(0x220)](_0x3daaec+'\x20'+'\x20'[_0x47d243(0x21c)](_0x116b0b)+'\x20'+_0x3daaec+'\x20'+_0x51dab8[_0x47d243(0x21e)](_0x3ee902)+'\x20'+_0x3daaec);});}),_0x3e5af2[_0x14ce05(0x220)](colorBorder('└─'+'─'[_0x14ce05(0x21c)](_0x116b0b)+_0x14ce05(0x209)+'─'[_0x14ce05(0x21c)](_0x3ee902)+'─┘',_0x1c77dd));_0x592607&&(_0x3e5af2[_0x14ce05(0x220)](''),_0x3e5af2[_0x14ce05(0x220)](String(a43_0x36abf7[_0x14ce05(0x1e6)]['bold'](_0x14ce05(0x1f9)))),_0x3e5af2['push'](_0x592607));_0xc990f5&&(_0x3e5af2[_0x14ce05(0x220)](''),_0x3e5af2[_0x14ce05(0x220)](String(a43_0x36abf7[_0x14ce05(0x228)][_0x14ce05(0x20d)](_0x14ce05(0x1fd)))),_0x3e5af2['push'](_0xc990f5));_0x2fb022&&(_0x3e5af2[_0x14ce05(0x220)](''),_0x3e5af2[_0x14ce05(0x220)](String(a43_0x36abf7[_0x14ce05(0x1fc)][_0x14ce05(0x20d)](_0x14ce05(0x1f3)))),_0x3e5af2[_0x14ce05(0x220)](_0x2fb022));if(_0xf4f56c){if(_0xf4f56c['stderr']){_0x3e5af2[_0x14ce05(0x220)](''),_0x3e5af2[_0x14ce05(0x220)](String(a43_0x36abf7[_0x14ce05(0x211)]['bold'](_0x14ce05(0x215))));const _0x3b811d=_0xf4f56c['stderr']['split']('\x0a');_0x3b811d[_0x14ce05(0x21a)](_0x4a157e=>{const _0x1db5dc=_0x14ce05;_0x4a157e[_0x1db5dc(0x1ef)]()&&_0x3e5af2[_0x1db5dc(0x220)](_0x4a157e);});}if(_0xf4f56c[_0x14ce05(0x203)]){_0x3e5af2[_0x14ce05(0x220)](''),_0x3e5af2[_0x14ce05(0x220)](String(a43_0x36abf7[_0x14ce05(0x225)][_0x14ce05(0x20d)](_0x14ce05(0x1e2))));const _0x3c09cd=_0xf4f56c['cmdout'][_0x14ce05(0x226)]('\x0a');_0x3c09cd['forEach'](_0x3c7822=>{const _0x29975d=_0x14ce05;_0x3c7822[_0x29975d(0x1ef)]()&&_0x3e5af2[_0x29975d(0x220)](_0x3c7822);});}}return _0x3e5af2['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x438846,_0xafc9c8){const _0x1b29c8=a43_0xaa61;if(_0xafc9c8[_0x1b29c8(0x229)]===_0x1b29c8(0x1e5)){await handleSDKOutput([_0x438846],_0xafc9c8);return;}const _0x61f037=resolveOutputOptions(_0xafc9c8),_0x25136a=await formatSingleObject(_0x438846,_0x61f037);await writeOutput(_0x25136a,_0x61f037[_0x1b29c8(0x1e8)]||undefined,_0x61f037[_0x1b29c8(0x229)]);}
|
package/dist/core/config.d.ts
CHANGED
|
@@ -26,13 +26,10 @@ export declare function getConfigFilePath(profileName?: string): string;
|
|
|
26
26
|
/**
|
|
27
27
|
* Get the user cache directory path
|
|
28
28
|
* Uses TDX_CACHE_DIR environment variable if set (for testing)
|
|
29
|
+
*
|
|
30
|
+
* @deprecated Use getGlobalCacheDir() from utils/global-cache.js instead
|
|
29
31
|
*/
|
|
30
32
|
export declare function getCacheDir(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Get the LLM default project cache file path
|
|
33
|
-
* @param profile - Optional profile name for profile-specific cache
|
|
34
|
-
*/
|
|
35
|
-
export declare function getLLMProjectCacheFile(profile?: string): string;
|
|
36
33
|
/**
|
|
37
34
|
* Cached LLM project info (name and ID for fast lookup)
|
|
38
35
|
*/
|
|
@@ -40,6 +37,11 @@ export interface CachedLLMProjectInfo {
|
|
|
40
37
|
name: string;
|
|
41
38
|
id: string;
|
|
42
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the LLM default project cache file path
|
|
42
|
+
* @param profile - Optional profile name for profile-specific cache
|
|
43
|
+
*/
|
|
44
|
+
export declare function getLLMProjectCacheFile(profile?: string): string;
|
|
43
45
|
/**
|
|
44
46
|
* Read cached LLM project info (name and ID)
|
|
45
47
|
* @param profile - Optional profile name for profile-specific cache
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAkB/D;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAMlF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAMpG;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAM9E;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAMjH;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAM1D;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAID;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAMhF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAU9F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BpE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BrD;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA8ChF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CA2GzG;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,UAAO,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B;AAkJD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAgCnF;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvG;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,SAAS,CA2BtC"}
|