@treasuredata/tdx 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/client/cdp-client.js +1 -1
  4. package/dist/client/http-client.js +1 -1
  5. package/dist/client/llm-client.js +1 -1
  6. package/dist/client/rate-limiter.js +1 -1
  7. package/dist/client/td-client.js +1 -1
  8. package/dist/client/trino-client.js +1 -1
  9. package/dist/client/workflow-client.js +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/context-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/job-command.js +1 -1
  19. package/dist/commands/llm-command.js +1 -1
  20. package/dist/commands/llm-proxy.js +1 -1
  21. package/dist/commands/parent-segment-command.js +1 -1
  22. package/dist/commands/profiles-command.js +1 -1
  23. package/dist/commands/query-command.js +1 -1
  24. package/dist/commands/segment-command.js +1 -1
  25. package/dist/commands/segment-create-command.js +1 -1
  26. package/dist/commands/segment-fields-command.js +1 -1
  27. package/dist/commands/segment-pwd-command.js +1 -1
  28. package/dist/commands/segment-update-command.js +1 -1
  29. package/dist/commands/segment-use-command.js +1 -1
  30. package/dist/commands/segments.js +1 -1
  31. package/dist/commands/show.js +1 -1
  32. package/dist/commands/tables.js +1 -1
  33. package/dist/commands/use-command.js +1 -1
  34. package/dist/commands/workflow-command.js +1 -1
  35. package/dist/core/auth.js +1 -1
  36. package/dist/core/config.js +1 -1
  37. package/dist/core/global-context.js +1 -1
  38. package/dist/core/profile.js +1 -1
  39. package/dist/core/project-config.js +1 -1
  40. package/dist/core/session.js +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/proxy/anthropic-adapter.d.ts +27 -3
  43. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  44. package/dist/proxy/anthropic-adapter.js +1 -1
  45. package/dist/proxy/anthropic-adapter.js.map +1 -1
  46. package/dist/proxy/server.d.ts.map +1 -1
  47. package/dist/proxy/server.js +1 -1
  48. package/dist/proxy/server.js.map +1 -1
  49. package/dist/proxy/session-cache.js +1 -1
  50. package/dist/sdk/api.js +1 -1
  51. package/dist/sdk/database.js +1 -1
  52. package/dist/sdk/errors.js +1 -1
  53. package/dist/sdk/index.js +1 -1
  54. package/dist/sdk/job.js +1 -1
  55. package/dist/sdk/llm.js +1 -1
  56. package/dist/sdk/query.js +1 -1
  57. package/dist/sdk/segment.js +1 -1
  58. package/dist/sdk/table.js +1 -1
  59. package/dist/sdk/workflow.js +1 -1
  60. package/dist/types/endpoints.js +1 -1
  61. package/dist/types/index.js +1 -1
  62. package/dist/utils/agent-ref-parser.js +1 -1
  63. package/dist/utils/chat-cache.js +1 -1
  64. package/dist/utils/colors.js +1 -1
  65. package/dist/utils/command-output.js +1 -1
  66. package/dist/utils/constants.js +1 -1
  67. package/dist/utils/file-permissions.js +1 -1
  68. package/dist/utils/format-detector.js +1 -1
  69. package/dist/utils/formatters.js +1 -1
  70. package/dist/utils/json-loader.js +1 -1
  71. package/dist/utils/model-aliases.js +1 -1
  72. package/dist/utils/option-validation.js +1 -1
  73. package/dist/utils/port.js +1 -1
  74. package/dist/utils/process.js +1 -1
  75. package/dist/utils/prompt.js +1 -1
  76. package/dist/utils/segment-path-parser.js +1 -1
  77. package/dist/utils/segment-ref-parser.js +1 -1
  78. package/dist/utils/spinner.js +1 -1
  79. package/dist/utils/sql-parser.js +1 -1
  80. package/dist/utils/sse-parser.js +1 -1
  81. package/dist/utils/string-utils.js +1 -1
  82. package/dist/utils/table-ref-parser.js +1 -1
  83. package/dist/utils/tdx-logger.js +1 -1
  84. package/dist/utils/tree-formatter.js +1 -1
  85. package/dist/utils/version-check.js +1 -1
  86. package/dist/utils/workflow-utils.js +1 -1
  87. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  {
2
- "gitRevision": "713653c",
3
- "buildTime": "2025-11-21 23:31:51+0000"
2
+ "gitRevision": "2147cf4",
3
+ "buildTime": "2025-11-22 01:44:11+0000"
4
4
  }
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x3b11c6=a0_0x2b7a;(function(_0x163cbc,_0x1b508f){const _0x1dabb2=a0_0x2b7a,_0x3c371a=_0x163cbc();while(!![]){try{const _0x532ced=parseInt(_0x1dabb2(0x21d))/0x1*(-parseInt(_0x1dabb2(0x20e))/0x2)+-parseInt(_0x1dabb2(0x25e))/0x3*(parseInt(_0x1dabb2(0x273))/0x4)+-parseInt(_0x1dabb2(0x2b4))/0x5*(-parseInt(_0x1dabb2(0x2dd))/0x6)+-parseInt(_0x1dabb2(0x20b))/0x7+-parseInt(_0x1dabb2(0x236))/0x8*(parseInt(_0x1dabb2(0x1bf))/0x9)+parseInt(_0x1dabb2(0x271))/0xa+parseInt(_0x1dabb2(0x1e6))/0xb*(parseInt(_0x1dabb2(0x289))/0xc);if(_0x532ced===_0x1b508f)break;else _0x3c371a['push'](_0x3c371a['shift']());}catch(_0x2338b8){_0x3c371a['push'](_0x3c371a['shift']());}}}(a0_0x58f0,0x43573));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';function a0_0x58f0(){const _0x1ed3f1=['1226949VavyZa','--database\x20<name>','apiKey','-y,\x20--yes','Database\x20to\x20use\x20(overrides\x20context)','--port\x20<number>','Start\x20time\x20filter\x20(ISO\x208601\x20format)','Workflow\x20(Digdag)\x20management\x20commands','Show\x20logs\x20for\x20a\x20specific\x20task','Show\x20tasks\x20for\x20an\x20attempt','Make\x20segment\x20invisible\x20(default:\x20visible)','--rule-file\x20<file>','length','--new','--trace','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','repeat','optionTerm','--no-color','2016860wtPLmR','then','4dCdeaK','after','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','action','show\x20<segment_name>','-r,\x20--recursive','--json','run','Master\x20database\x20name','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','preAction','Preview\x20operation\x20without\x20executing','-d,\x20--database\x20<database>','--kind\x20<type>','pwd','-d,\x20--database\x20<name>','--in\x20<name>','Kill\x20a\x20job','--folder\x20<name>','End\x20time\x20filter\x20(ISO\x208601\x20format)','10625772RMtQth','INFO','--reason\x20<text>','--agent\x20<name>','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)','Read\x20query\x20from\x20file','--from-task\x20<task>','Attributes\x20as\x20JSON\x20string','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','use\x20<path>','registeredArguments','--name\x20<text>','Add\x20attributes\x20from\x20JSON\x20file','List\x20available\x20LLM\x20models','commandUsage','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','argv','--starter-message\x20<text>',',\x20version\x20','Folder\x20name\x20for\x20organization','../package.json','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','retry\x20<session-id|attempt-id>','information_schema','--temperature\x20<n>','stderr','--jsonl','job','Delete\x20an\x20agent','Add\x20behaviors\x20as\x20JSON\x20string','--offset\x20<number>','Include\x20subtasks\x20in\x20the\x20output','map','Agent\x20name','Updated\x20schedule\x20option','kill\x20<attempt-id>','jobs','workflows\x20[project]','--database\x20<db>','padWidth','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','profiles','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','337900EplHke','debug','--version','--name\x20<new_name>','--tsv','--behaviors\x20<json>','0.7','Project\x20description','Temperature\x20(0.0-2.0,\x20default:\x200.7)','proxy','sql\x20<segment_name>','jsonl','subcommandTerm','update\x20<segment_name>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','Segment\x20description','Clear\x20session\x20context','log','allowUnknownOption','utf-8','LLM\x20project\x20to\x20use\x20(overrides\x20context)','Customer\x20group\x20from\x20JSON\x20file','Set\x20operation\x20timeout\x20in\x20seconds','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','api\x20[endpoint]','describe\x20<segment_name>','commandDescription','Create\x20segment\x20folder','Parent\x20segment\x20(audience)\x20management','agent','isTTY','push\x20[project-name-or-dir]','LLM\x20project\x20management','commands','--resume-from\x20<task>','Revision\x20name\x20(default:\x20timestamp)','-H,\x20--header\x20<header>','--session\x20<id>','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','--output\x20<file>','segment','36opmvfE','--project\x20<name>','buildTime','Submit\x20a\x20job','join','fields\x20<parent_name>','--revision\x20<revision>','port','alias','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','Usage:\x20','--skip-validation','Attributes\x20from\x20JSON\x20file','history\x20[chat-id]','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','json','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','--name\x20<name>','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','update\x20<name>','Show\x20job\x20details','logLevel','Customer\x20group\x20as\x20JSON\x20string','submit\x20[query]','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','--format\x20<format>','--limit\x20<rows>','--add-attributes-file\x20<file>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','--site\x20<site>','Parent\x20segment\x20description','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','required','--profile\x20<name>','--status\x20<status>','context','729BfSSWl','--table\x20<table>','show\x20<job-id>','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','Parent\x20folder\x20name\x20for\x20nested\x20folders','Filtering\x20rule\x20from\x20JSON\x20file','opts','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','--behaviors-file\x20<file>','build-info.json','Filtering\x20rule\x20as\x20JSON\x20string','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','Model\x20type\x20(default:\x20claude-4.5-sonnet)','project','Timezone\x20(e.g.,\x20America/Los_Angeles)','Create\x20a\x20new\x20agent\x20in\x20current\x20project','--parent-folder\x20<name>','Override\x20project\x20name','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','Save\x20output\x20to\x20file','List\x20jobs','option','command','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','--schedule-type\x20<type>','--model\x20<name>','--from\x20<timestamp>','TRACE','Add\x20attributes\x20as\x20JSON\x20string','--schedule-option\x20<value>','Updated\x20timezone','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','--dry-run','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','--customer-group-file\x20<file>','--max-tool-iterations\x20<n>','addHelpText','11OONAke','Database\x20name\x20(default:\x20information_schema)','format','Starter\x20message','options','List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)','includes','\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a','filter','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','Alias\x20for\x20--database\x20(natural\x20language\x20style)','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','catch','create\x20<name>','argumentDescription','DEBUG','push','Update\x20an\x20existing\x20agent','tdx\x20','Updated\x20filtering\x20rule\x20from\x20JSON\x20file','result\x20<job-id>','Arguments:','activations\x20<segment_name>','Job\x20management\x20commands','--force','trace','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','Model\x20name\x20(default:\x20claude-4.5-sonnet)','trino','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','--add-behaviors-file\x20<file>','llm','--rule\x20<json>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','exit','configureHelp','968947DgUcii','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','44588oYxVJu','hook','Segment\x20folder\x20management','Agent\x20reference\x20(project-name/agent-name)','Skip\x20confirmation\x20prompts','--attributes\x20<json>','--prompt\x20<text>','kill\x20<job-id>','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','-f,\x20--file\x20<path>','delete\x20<name>','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','claude-4.5-sonnet','attempt\x20<attempt-id>','-v,\x20--verbose','23jyEfYq','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','tsv','--llm-project\x20<name>','--description\x20<text>','Commands:','4000','optionDescription','Updated\x20description','databases\x20[pattern]','folder','parse','-X,\x20--method\x20<method>','gitRevision','tasks\x20<attempt-id>','Show\x20current\x20segment/folder\x20context','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','use\x20<project-name>','--add-attributes\x20<json>','Read\x20SQL\x20query\x20from\x20file','description','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','--in\x20<database>','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Run\x20Trino\x20query\x20with\x20streaming\x20results','15472IKMXtP','--type\x20<api_type>','.dev','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Move\x20to\x20folder','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','sessions\x20[project]','--timeout\x20<seconds>','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','projects\x20[pattern]','Describe\x20table\x20schema','Reason\x20for\x20killing\x20the\x20attempt','--to\x20<timestamp>','--timezone\x20<tz>','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','--max-depth\x20<depth>','name','summary','--customer-group\x20<json>','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','Update\x20parent\x20segment\x20(audience)','--system-prompt\x20<text>','desc','GET','database','Create\x20a\x20new\x20LLM\x20project','use\x20[resource]\x20[value]','segments\x20[path]','version','Delete\x20an\x20LLM\x20project','Create\x20parent\x20segment\x20(audience)','chat\x20[message...]','Enable\x20verbose\x20logging','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','create\x20<parent_name>\x20<folder_name>','replace','--no-count-population','tables\x20[pattern]','show\x20[table]'];a0_0x58f0=function(){return _0x1ed3f1;};return a0_0x58f0();}import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta['url']),__dirname=dirname(__filename),packageJson=JSON[a0_0x3b11c6(0x228)](readFileSync(join(__dirname,a0_0x3b11c6(0x29d)),a0_0x3b11c6(0x2c7)));let buildInfo={};try{buildInfo=JSON[a0_0x3b11c6(0x228)](readFileSync(join(__dirname,a0_0x3b11c6(0x1c9)),a0_0x3b11c6(0x2c7)));}catch{}if(process[a0_0x3b11c6(0x299)][a0_0x3b11c6(0x1ec)](a0_0x3b11c6(0x2b6))){let versionOutput=a0_0x3b11c6(0x1f9)+packageJson['version'];buildInfo[a0_0x3b11c6(0x22a)]&&(versionOutput+='\x20('+buildInfo[a0_0x3b11c6(0x22a)]+')'),buildInfo[a0_0x3b11c6(0x2df)]&&(versionOutput+='\x20-\x20built\x20'+buildInfo['buildTime']),console[a0_0x3b11c6(0x2c5)](versionOutput),process[a0_0x3b11c6(0x209)](0x0);}const program=new Command();let description='AI-native\x20CLI\x20for\x20Treasure\x20Data';buildInfo['gitRevision']?description+=a0_0x3b11c6(0x29b)+packageJson[a0_0x3b11c6(0x253)]+'\x20('+buildInfo[a0_0x3b11c6(0x22a)]+')':description+=a0_0x3b11c6(0x29b)+packageJson[a0_0x3b11c6(0x253)];program[a0_0x3b11c6(0x247)]('tdx')[a0_0x3b11c6(0x231)](description),program['option'](a0_0x3b11c6(0x2fc),a0_0x3b11c6(0x28d),'us01')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2f8),'Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)')['option'](a0_0x3b11c6(0x279),a0_0x3b11c6(0x1ef))['option'](a0_0x3b11c6(0x2a3),a0_0x3b11c6(0x2b1))['option'](a0_0x3b11c6(0x2b8),'Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2db),a0_0x3b11c6(0x1d3))[a0_0x3b11c6(0x1d5)]('--limit\x20<number>','Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)')['option']('--color',a0_0x3b11c6(0x216),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x270),a0_0x3b11c6(0x22d),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x21c),a0_0x3b11c6(0x257),![])[a0_0x3b11c6(0x1d5)]('--debug','Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x26c),a0_0x3b11c6(0x201))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x23e),a0_0x3b11c6(0x2ca),'30')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1e0),a0_0x3b11c6(0x280),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x261),a0_0x3b11c6(0x212),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2d9),a0_0x3b11c6(0x2eb))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1bc),'Profile\x20to\x20use\x20(overrides\x20active\x20profile)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x284),a0_0x3b11c6(0x262))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x285),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x3b11c6(0x1d5)]('--parent-segment\x20<name>',a0_0x3b11c6(0x2fb))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x220),a0_0x3b11c6(0x2c8)),program[a0_0x3b11c6(0x20a)]({'formatHelp':(_0x28d2e4,_0xceed2f)=>{const _0x341b31=a0_0x3b11c6,_0xa6d49c=_0xceed2f[_0x341b31(0x2b0)](_0x28d2e4,_0xceed2f),_0x374fda=0x2,_0x52432d=0x2;function _0x1928f9(_0x3c53bc){return!!_0x3c53bc['hidden'];}function _0x172447(_0x3da56c,_0x345c23){if(_0x345c23){const _0x3583e8=''+_0x3da56c['padEnd'](_0xa6d49c+_0x52432d)+_0x345c23;return _0x3583e8;}return _0x3da56c;}function _0x351c82(_0x45c162){const _0x2d2b39=_0x341b31;return _0x45c162[_0x2d2b39(0x2e1)]('\x0a')[_0x2d2b39(0x25a)](/^/gm,'\x20'[_0x2d2b39(0x26e)](_0x374fda));}const _0x10d0d6=[];_0x10d0d6[_0x341b31(0x1f7)](_0x341b31(0x2e7)+_0xceed2f[_0x341b31(0x297)](_0x28d2e4));const _0xa9c25c=_0xceed2f[_0x341b31(0x2ce)](_0x28d2e4);_0xa9c25c&&(_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6['push'](_0xa9c25c));const _0x3cb02d=_0x28d2e4[_0x341b31(0x2d5)][_0x341b31(0x1ee)](_0xeecc4a=>!_0x1928f9(_0xeecc4a));if(_0x3cb02d['length']>0x0){const _0x1d6365=_0x3cb02d[_0x341b31(0x2a9)](_0x47d2cf=>{const _0x4f1ae3=_0x341b31,_0x112f3b=_0xceed2f[_0x4f1ae3(0x2c0)](_0x47d2cf),_0x4bf475=_0xceed2f['subcommandDescription'](_0x47d2cf);return _0x172447(_0x112f3b,_0x4bf475);});_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6[_0x341b31(0x1f7)](_0x341b31(0x222)),_0x10d0d6[_0x341b31(0x1f7)](_0x351c82(_0x1d6365));}const _0x5b8f50=_0x28d2e4[_0x341b31(0x1ea)][_0x341b31(0x1ee)](_0x3d7efd=>!_0x1928f9(_0x3d7efd));if(_0x5b8f50['length']>0x0){const _0x226a21=_0x5b8f50[_0x341b31(0x2a9)](_0x3568cd=>{const _0x5ab3a1=_0x341b31,_0x48db86=_0xceed2f[_0x5ab3a1(0x26f)](_0x3568cd),_0x1484c4=_0xceed2f[_0x5ab3a1(0x224)](_0x3568cd);return _0x172447(_0x48db86,_0x1484c4);});_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6[_0x341b31(0x1f7)]('Options:'),_0x10d0d6[_0x341b31(0x1f7)](_0x351c82(_0x226a21));}const _0x51b966=(_0x28d2e4[_0x341b31(0x293)]||[])[_0x341b31(0x1ee)](_0xbca2d1=>!_0x1928f9(_0xbca2d1));if(_0x51b966[_0x341b31(0x26a)]>0x0){const _0x3989a7=_0x51b966[_0x341b31(0x2a9)](_0x529bc7=>{const _0x18c390=_0x341b31,_0x35c9a8=_0xceed2f['argumentTerm'](_0x529bc7),_0x1ffb2=_0xceed2f[_0x18c390(0x1f5)](_0x529bc7);return _0x172447(_0x35c9a8,_0x1ffb2);});_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6[_0x341b31(0x1f7)](_0x341b31(0x1fc)),_0x10d0d6[_0x341b31(0x1f7)](_0x351c82(_0x3989a7));}return _0x10d0d6['join']('\x0a');},'subcommandTerm':_0x2cab55=>{const _0x31251e=a0_0x3b11c6,_0x41e47a=(_0x2cab55['registeredArguments']||[])[_0x31251e(0x2a9)](_0x3cabda=>_0x3cabda[_0x31251e(0x1bb)]?'<'+_0x3cabda[_0x31251e(0x247)]()+'>':'['+_0x3cabda[_0x31251e(0x247)]()+']')[_0x31251e(0x2e1)]('\x20'),_0x41c2d4=_0x2cab55['aliases'](),_0x1ee6a8=_0x41c2d4['length']>0x0?_0x2cab55[_0x31251e(0x247)]()+',\x20'+_0x41c2d4[_0x31251e(0x2e1)](',\x20'):_0x2cab55[_0x31251e(0x247)]();return _0x41e47a?_0x1ee6a8+'\x20'+_0x41e47a:_0x1ee6a8;}}),program[a0_0x3b11c6(0x20f)](a0_0x3b11c6(0x27f),_0xf2b210=>{const _0x7b0d6c=a0_0x3b11c6,_0x3276d1=_0xf2b210['opts']();if(!_0x3276d1['format']){if(_0x3276d1[_0x7b0d6c(0x2ec)])_0x3276d1[_0x7b0d6c(0x1e8)]=_0x7b0d6c(0x2ec);else{if(_0x3276d1[_0x7b0d6c(0x2bf)])_0x3276d1[_0x7b0d6c(0x1e8)]=_0x7b0d6c(0x2bf);else _0x3276d1[_0x7b0d6c(0x21f)]&&(_0x3276d1[_0x7b0d6c(0x1e8)]=_0x7b0d6c(0x21f));}}_0x3276d1['in']&&!_0x3276d1[_0x7b0d6c(0x24f)]&&(_0x3276d1[_0x7b0d6c(0x24f)]=_0x3276d1['in']);if(_0x3276d1[_0x7b0d6c(0x200)])_0x3276d1['logLevel']=LogLevel[_0x7b0d6c(0x1db)];else{if(_0x3276d1[_0x7b0d6c(0x2b5)])_0x3276d1[_0x7b0d6c(0x2f2)]=LogLevel[_0x7b0d6c(0x1f6)];else _0x3276d1['logLevel']===undefined&&(_0x3276d1['logLevel']=LogLevel[_0x7b0d6c(0x28a)]);}});function createTDXInstance(_0x3d86f9){const _0x449d9f=a0_0x3b11c6,_0x272ff4=new GlobalContext(_0x3d86f9);_0x272ff4['injectIntoOptions'](_0x3d86f9);const _0x28ff78={'site':_0x272ff4['site'],'apiKey':_0x272ff4[_0x449d9f(0x260)],'logLevel':_0x272ff4['logLevel']};return new TDX(_0x28ff78);}program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x226))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1f2))['action'](async(_0x17868d,_0xfc620)=>{const _0x31a740=a0_0x3b11c6,_0x41dc60=new DatabasesCommand(),_0xd42fe4=program[_0x31a740(0x1c6)](),_0x5d16ad=createTDXInstance(_0xd42fe4),_0x2c811a=await _0x41dc60[_0x31a740(0x27a)]({'options':{..._0xd42fe4,..._0xfc620},'args':_0x17868d?[_0x17868d]:[],'tdx':_0x5d16ad});process[_0x31a740(0x209)](_0x2c811a);}),program['command'](a0_0x3b11c6(0x256))['description']('Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)')['option']('--agent\x20<ref>',a0_0x3b11c6(0x211))[a0_0x3b11c6(0x1d5)]('--model\x20<name>',a0_0x3b11c6(0x202))[a0_0x3b11c6(0x1d5)]('--temperature\x20<n>',a0_0x3b11c6(0x2bc))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x26b),'Start\x20a\x20new\x20chat\x20session')[a0_0x3b11c6(0x276)](async(_0x119a00,_0x1a6f8b)=>{const _0x149a60=a0_0x3b11c6,_0x3c4399=new ChatCommand(),_0xd0d119=program[_0x149a60(0x1c6)](),_0x5e9fef=createTDXInstance(_0xd0d119),_0x1afd69=await _0x3c4399[_0x149a60(0x27a)]({'options':{..._0xd0d119,..._0x1a6f8b},'args':_0x119a00,'tdx':_0x5e9fef});process[_0x149a60(0x209)](_0x1afd69);});const apiCmd=program['command'](a0_0x3b11c6(0x2cc))[a0_0x3b11c6(0x248)](a0_0x3b11c6(0x234))[a0_0x3b11c6(0x1e5)](a0_0x3b11c6(0x274),a0_0x3b11c6(0x1ed))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x229),a0_0x3b11c6(0x2c2),a0_0x3b11c6(0x24e))['option']('--data\x20<data>','Request\x20body\x20as\x20JSON\x20string')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x217),'Read\x20request\x20body\x20from\x20file')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2d8),a0_0x3b11c6(0x26d),(_0x374135,_0x3fba5c)=>{return _0x3fba5c?[..._0x3fba5c,_0x374135]:[_0x374135];})['option'](a0_0x3b11c6(0x237),a0_0x3b11c6(0x1df),'td')[a0_0x3b11c6(0x276)](async(_0x3b271b,_0x4dcf5d)=>{const _0x41fc2d=a0_0x3b11c6;if(!_0x3b271b){apiCmd['help']();return;}const _0x3a6305=new ApiCommand(),_0x35beba=program[_0x41fc2d(0x1c6)](),_0x54305e=createTDXInstance(_0x35beba),_0x108dc5=await _0x3a6305[_0x41fc2d(0x27a)]({'options':{..._0x35beba,..._0x4dcf5d},'args':[_0x3b271b],'tdx':_0x54305e});process['exit'](_0x108dc5);});program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x25c))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1d2))[a0_0x3b11c6(0x1d5)]('-d,\x20--database\x20<database>',a0_0x3b11c6(0x208))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x233),a0_0x3b11c6(0x1f1))[a0_0x3b11c6(0x276)](async(_0x17b268,_0x2c6353)=>{const _0x4fbf28=a0_0x3b11c6,_0x516495=new TablesCommand(),_0x10ba1c=program[_0x4fbf28(0x1c6)](),_0x4328aa=createTDXInstance(_0x10ba1c);_0x2c6353['in']&&(_0x2c6353[_0x4fbf28(0x24f)]=_0x2c6353['in']);const _0x393bab=await _0x516495['run']({'options':{..._0x10ba1c,..._0x2c6353},'args':_0x17b268?[_0x17b268]:[],'tdx':_0x4328aa});process[_0x4fbf28(0x209)](_0x393bab);}),program['command'](a0_0x3b11c6(0x25d))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x20d))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x281),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x233),a0_0x3b11c6(0x1f1))[a0_0x3b11c6(0x276)](async(_0x25092d,_0x560dbe)=>{const _0x5823b9=a0_0x3b11c6,_0x2e9e94=new ShowCommand(),_0x37e6dc=program[_0x5823b9(0x1c6)](),_0x784c2c=createTDXInstance(_0x37e6dc);_0x560dbe['in']&&(_0x560dbe[_0x5823b9(0x24f)]=_0x560dbe['in']);const _0x2d875a=await _0x2e9e94[_0x5823b9(0x27a)]({'options':{..._0x37e6dc,..._0x560dbe},'args':_0x25092d?[_0x25092d]:[],'tdx':_0x784c2c});process['exit'](_0x2d875a);}),program[a0_0x3b11c6(0x1d6)]('describe\x20[table]')[a0_0x3b11c6(0x2e5)](a0_0x3b11c6(0x24d))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x241))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x281),a0_0x3b11c6(0x23c))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x233),a0_0x3b11c6(0x1f1))[a0_0x3b11c6(0x276)](async(_0x2c29a2,_0x3d2c75)=>{const _0x1a5b75=a0_0x3b11c6,_0x1d3c98=new DescribeCommand(),_0x17ac0b=program[_0x1a5b75(0x1c6)](),_0x4203fc=createTDXInstance(_0x17ac0b);_0x3d2c75['in']&&(_0x3d2c75[_0x1a5b75(0x24f)]=_0x3d2c75['in']);const _0x1df558=await _0x1d3c98[_0x1a5b75(0x27a)]({'options':{..._0x17ac0b,..._0x3d2c75},'args':_0x2c29a2?[_0x2c29a2]:[],'tdx':_0x4203fc});process[_0x1a5b75(0x209)](_0x1df558);}),program['command']('query\x20[sql]')['description'](a0_0x3b11c6(0x235))['option']('-d,\x20--database\x20<database>','Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x3b11c6(0x1d5)]('--in\x20<database>',a0_0x3b11c6(0x1f1))['option']('--catalog\x20<catalog>','Trino\x20catalog\x20(default:\x20td)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x217),a0_0x3b11c6(0x230))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2f9),a0_0x3b11c6(0x23f),'40')['action'](async(_0x3f198e,_0x2106bd)=>{const _0x2c731d=a0_0x3b11c6,_0x1c3542=new QueryCommand(),_0x38b8fd=program[_0x2c731d(0x1c6)](),_0x1d6949=createTDXInstance(_0x38b8fd);_0x2106bd['in']&&(_0x2106bd['database']=_0x2106bd['in']);const _0x2ff084=await _0x1c3542['run']({'options':{..._0x38b8fd,..._0x2106bd},'args':_0x3f198e?[_0x3f198e]:[],'tdx':_0x1d6949});process['exit'](_0x2ff084);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x252))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1e1))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x278),a0_0x3b11c6(0x27d))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x246),'Maximum\x20recursion\x20depth\x20(default:\x2010)','10')[a0_0x3b11c6(0x276)](async(_0x54de36,_0x559397)=>{const _0x3a494e=a0_0x3b11c6,_0x204c9d=new SegmentsCommand(),_0x4b8300=program[_0x3a494e(0x1c6)](),_0x104604=createTDXInstance(_0x4b8300),_0x314136=await _0x204c9d['run']({'options':{..._0x4b8300,..._0x559397},'args':_0x54de36?[_0x54de36]:[],'tdx':_0x104604});process['exit'](_0x314136);});const segmentCmd=program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2dc))[a0_0x3b11c6(0x231)]('CDP\x20segment\x20management\x20commands');segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x292))[a0_0x3b11c6(0x231)]('Set\x20current\x20segment/folder\x20context\x20for\x20navigation')[a0_0x3b11c6(0x276)](async(_0x36840c,_0x24a259)=>{const _0x1d8524=a0_0x3b11c6,_0xc1b68=new SegmentUseCommand(),_0x50be35=program[_0x1d8524(0x1c6)](),_0x37b958=createTDXInstance(_0x50be35),_0x1df390=await _0xc1b68[_0x1d8524(0x27a)]({'options':{..._0x50be35,..._0x24a259},'args':[_0x36840c],'tdx':_0x37b958});process[_0x1d8524(0x209)](_0x1df390);}),segmentCmd['command'](a0_0x3b11c6(0x283))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x22c))[a0_0x3b11c6(0x276)](async _0x162796=>{const _0x16585a=a0_0x3b11c6,_0x1a0a99=new SegmentPwdCommand(),_0x231ca0=program['opts'](),_0x27798e=createTDXInstance(_0x231ca0),_0x34f323=await _0x1a0a99[_0x16585a(0x27a)]({'options':{..._0x231ca0,..._0x162796},'args':[],'tdx':_0x27798e});process[_0x16585a(0x209)](_0x34f323);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2cd))['alias']('desc')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1d7))[a0_0x3b11c6(0x276)](async(_0x5bd2e7,_0x20d84d)=>{const _0x525ebb=a0_0x3b11c6,_0x3fb69f=new SegmentDescribeCommand(),_0x6568c6=program['opts'](),_0x859308=createTDXInstance(_0x6568c6),_0x9c4df6=await _0x3fb69f[_0x525ebb(0x27a)]({'options':{..._0x6568c6,..._0x20d84d},'args':[_0x5bd2e7],'tdx':_0x859308});process[_0x525ebb(0x209)](_0x9c4df6);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x277))['description'](a0_0x3b11c6(0x2f5))[a0_0x3b11c6(0x276)](async(_0x5b96e2,_0x46c65b)=>{const _0x4d78ac=a0_0x3b11c6,_0x3650d1=new SegmentShowCommand(),_0xed9024=program[_0x4d78ac(0x1c6)](),_0x37c968=createTDXInstance(_0xed9024),_0x5a31fa=await _0x3650d1[_0x4d78ac(0x27a)]({'options':{..._0xed9024,..._0x46c65b},'args':[_0x5b96e2],'tdx':_0x37c968});process[_0x4d78ac(0x209)](_0x5a31fa);}),segmentCmd['command']('folders\x20<parent_name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x219))[a0_0x3b11c6(0x276)](async(_0x2006bc,_0x37e5fb)=>{const _0xd9997e=a0_0x3b11c6,_0x1eb5b=new SegmentFolderListCommand(),_0x42e5a7=program[_0xd9997e(0x1c6)](),_0x4939b3=createTDXInstance(_0x42e5a7),_0x5e23fa=await _0x1eb5b['run']({'options':{..._0x42e5a7,..._0x37e5fb},'args':[_0x2006bc],'tdx':_0x4939b3});process[_0xd9997e(0x209)](_0x5e23fa);});const folderCmd=segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x227))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x210));folderCmd['command']('show\x20<folder_ref>')[a0_0x3b11c6(0x231)]('Show\x20folder\x20details\x20(use\x20parent_name/folder_name)')['action'](async(_0x5d6393,_0x5cca2a)=>{const _0x1879b0=a0_0x3b11c6,_0x250814=new SegmentFolderShowCommand(),_0xcd7811=program[_0x1879b0(0x1c6)](),_0x2cb61b=createTDXInstance(_0xcd7811),_0x1ef1fe=await _0x250814['run']({'options':{..._0xcd7811,..._0x5cca2a},'args':[_0x5d6393],'tdx':_0x2cb61b});process[_0x1879b0(0x209)](_0x1ef1fe);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2be))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2cb))[a0_0x3b11c6(0x276)](async(_0x10a941,_0xa00d7f)=>{const _0x4644a9=a0_0x3b11c6,_0x237c60=new SegmentSQLCommand(),_0x425dad=program[_0x4644a9(0x1c6)](),_0x2a2c37=createTDXInstance(_0x425dad),_0x39c5ab=await _0x237c60['run']({'options':{..._0x425dad,..._0xa00d7f},'args':[_0x10a941],'tdx':_0x2a2c37});process[_0x4644a9(0x209)](_0x39c5ab);}),segmentCmd['command'](a0_0x3b11c6(0x2e2))['description']('List\x20available\x20fields\x20for\x20segmentation')[a0_0x3b11c6(0x276)](async(_0x40a798,_0x55a2f2)=>{const _0x7b6bd3=a0_0x3b11c6,_0x211925=new SegmentFieldsCommand(),_0x154957=program['opts'](),_0x4455cc=createTDXInstance(_0x154957),_0x5a453a=await _0x211925[_0x7b6bd3(0x27a)]({'options':{..._0x154957,..._0x55a2f2},'args':[_0x40a798],'tdx':_0x4455cc});process['exit'](_0x5a453a);}),segmentCmd[a0_0x3b11c6(0x1d6)]('create\x20<segment_name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2b3))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x2c3))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x207),a0_0x3b11c6(0x1ca))[a0_0x3b11c6(0x1d5)]('--rule-file\x20<file>',a0_0x3b11c6(0x1c5))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x287),a0_0x3b11c6(0x29c))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x282),a0_0x3b11c6(0x232))[a0_0x3b11c6(0x1d5)]('--invisible',a0_0x3b11c6(0x268))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x25b),'Skip\x20population\x20counting')[a0_0x3b11c6(0x276)](async(_0x5c418f,_0x42c726)=>{const _0x5d2443=a0_0x3b11c6,_0x4eb66f=new SegmentCreateCommand(),_0x41efae=program[_0x5d2443(0x1c6)](),_0x48a190=createTDXInstance(_0x41efae),_0x4ee0fa=await _0x4eb66f['run']({'options':{..._0x41efae,..._0x42c726},'args':[_0x5c418f],'tdx':_0x48a190});process['exit'](_0x4ee0fa);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2c1))[a0_0x3b11c6(0x231)]('Update\x20child\x20segment\x20(use\x20parent_name/child_name)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2b7),'New\x20segment\x20name')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x225))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x207),a0_0x3b11c6(0x204))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x269),a0_0x3b11c6(0x1fa))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x287),a0_0x3b11c6(0x23b))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x282),a0_0x3b11c6(0x232))[a0_0x3b11c6(0x276)](async(_0x47bc40,_0x167910)=>{const _0x444fff=a0_0x3b11c6,_0x1322e7=new SegmentUpdateCommand(),_0x87c6bd=program[_0x444fff(0x1c6)](),_0x2b4861=createTDXInstance(_0x87c6bd),_0x4dd5d9=await _0x1322e7['run']({'options':{..._0x87c6bd,..._0x167910},'args':[_0x47bc40],'tdx':_0x2b4861});process['exit'](_0x4dd5d9);});const parentCmd=segmentCmd[a0_0x3b11c6(0x1d6)]('parent')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2d0));parentCmd['command'](a0_0x3b11c6(0x1f4))['description'](a0_0x3b11c6(0x255))['requiredOption'](a0_0x3b11c6(0x2af),a0_0x3b11c6(0x27b))['requiredOption'](a0_0x3b11c6(0x1c0),'Master\x20table\x20name')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x2fd))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1d8),a0_0x3b11c6(0x239))[a0_0x3b11c6(0x1d5)]('--schedule-option\x20<value>',a0_0x3b11c6(0x1c2))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x244),a0_0x3b11c6(0x1ce))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x213),a0_0x3b11c6(0x290))[a0_0x3b11c6(0x1d5)]('--attributes-file\x20<file>',a0_0x3b11c6(0x2e9))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2b9),'Behaviors\x20as\x20JSON\x20string')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1c8),'Behaviors\x20from\x20JSON\x20file')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x249),a0_0x3b11c6(0x2f3))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1e3),a0_0x3b11c6(0x2c9))[a0_0x3b11c6(0x276)](async(_0x15d968,_0x4acb11)=>{const _0x524926=a0_0x3b11c6,_0x47f977=new ParentSegmentCreateCommand(),_0x599a70=program[_0x524926(0x1c6)](),_0x61fb26=createTDXInstance(_0x599a70),_0x345963=await _0x47f977['run']({'options':{..._0x599a70,..._0x4acb11},'args':[_0x15d968],'tdx':_0x61fb26});process[_0x524926(0x209)](_0x345963);}),parentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2f0))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x24b))[a0_0x3b11c6(0x1d5)]('--description\x20<text>',a0_0x3b11c6(0x225))['option'](a0_0x3b11c6(0x1d8),a0_0x3b11c6(0x29e))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1dd),a0_0x3b11c6(0x2ab))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x244),a0_0x3b11c6(0x1de))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x22f),a0_0x3b11c6(0x1dc))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2fa),a0_0x3b11c6(0x295))['option']('--add-behaviors\x20<json>',a0_0x3b11c6(0x2a6))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x205),'Add\x20behaviors\x20from\x20JSON\x20file')[a0_0x3b11c6(0x276)](async(_0x21f231,_0x29c182)=>{const _0x330ea5=a0_0x3b11c6,_0x2771ec=new ParentSegmentUpdateCommand(),_0x325eb7=program[_0x330ea5(0x1c6)](),_0x350f79=createTDXInstance(_0x325eb7),_0x1d5d87=await _0x2771ec[_0x330ea5(0x27a)]({'options':{..._0x325eb7,..._0x29c182},'args':[_0x21f231],'tdx':_0x350f79});process[_0x330ea5(0x209)](_0x1d5d87);}),folderCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x259))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2cf))['option'](a0_0x3b11c6(0x221),'Folder\x20description')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1d0),a0_0x3b11c6(0x1c4))[a0_0x3b11c6(0x276)](async(_0x157205,_0x58aeea,_0x4ef299)=>{const _0x16acc7=a0_0x3b11c6,_0x46cf16=new SegmentFolderCreateCommand(),_0x2d87a9=program[_0x16acc7(0x1c6)](),_0x483a4f=createTDXInstance(_0x2d87a9),_0x4def0f=await _0x46cf16[_0x16acc7(0x27a)]({'options':{..._0x2d87a9,..._0x4ef299},'args':[_0x157205,_0x58aeea],'tdx':_0x483a4f});process[_0x16acc7(0x209)](_0x4def0f);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1fd))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x21e))[a0_0x3b11c6(0x276)](async(_0x307dee,_0x101706)=>{const _0x3f4681=a0_0x3b11c6,_0x4302a1=new ActivationsCommand(),_0x566ee5=program[_0x3f4681(0x1c6)](),_0xaf4c56=createTDXInstance(_0x566ee5),_0x388303=await _0x4302a1['run']({'options':{..._0x566ee5,..._0x101706},'args':[_0x307dee],'tdx':_0xaf4c56});process[_0x3f4681(0x209)](_0x388303);});const workflowCmd=program['command']('workflow')[a0_0x3b11c6(0x2e5)]('wf')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x265));workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x240))[a0_0x3b11c6(0x231)]('List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)')[a0_0x3b11c6(0x276)](async(_0x2c22e4,_0x58e788)=>{const _0x5e0937=a0_0x3b11c6,_0x349231=new WorkflowProjectsCommand(),_0x186c7c=program[_0x5e0937(0x1c6)](),_0x580a62=createTDXInstance(_0x186c7c),_0x2724a9=await _0x349231[_0x5e0937(0x27a)]({'options':{..._0x186c7c,..._0x58e788},'args':_0x2c22e4?[_0x2c22e4]:[],'tdx':_0x580a62});process[_0x5e0937(0x209)](_0x2724a9);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ae))['alias']('ls')[a0_0x3b11c6(0x231)]('List\x20workflows\x20(optionally\x20filtered\x20by\x20project)')[a0_0x3b11c6(0x276)](async(_0x47f75f,_0x4d627f)=>{const _0x500aad=a0_0x3b11c6,_0xf4e447=new WorkflowWorkflowsCommand(),_0x56f018=program[_0x500aad(0x1c6)](),_0x693c4d=createTDXInstance(_0x56f018),_0xbedb38=await _0xf4e447[_0x500aad(0x27a)]({'options':{..._0x56f018,..._0x4d627f},'args':_0x47f75f?[_0x47f75f]:[],'tdx':_0x693c4d});process[_0x500aad(0x209)](_0xbedb38);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x23d))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x27c))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1bd),a0_0x3b11c6(0x275))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1da),a0_0x3b11c6(0x264))['option'](a0_0x3b11c6(0x243),a0_0x3b11c6(0x288))[a0_0x3b11c6(0x276)](async(_0x20b4ef,_0x4cf0db)=>{const _0x158695=a0_0x3b11c6,_0x1045c7=new WorkflowSessionsCommand(),_0x24b73a=program[_0x158695(0x1c6)](),_0x8df03=createTDXInstance(_0x24b73a),_0xf8a5f2=await _0x1045c7[_0x158695(0x27a)]({'options':{..._0x24b73a,..._0x4cf0db},'args':_0x20b4ef?[_0x20b4ef]:[],'tdx':_0x8df03});process[_0x158695(0x209)](_0xf8a5f2);}),workflowCmd[a0_0x3b11c6(0x1d6)]('attempts\x20[project]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1eb))['option']('--include-retried','Include\x20retried\x20attempts')['action'](async(_0x168b42,_0x2b918e)=>{const _0x29646a=a0_0x3b11c6,_0x1cd5ac=new WorkflowAttemptsCommand(),_0x3da4cc=program[_0x29646a(0x1c6)](),_0x4f394f=createTDXInstance(_0x3da4cc),_0x58480c=await _0x1cd5ac[_0x29646a(0x27a)]({'options':{..._0x3da4cc,..._0x2b918e},'args':_0x168b42?[_0x168b42]:[],'tdx':_0x4f394f});process[_0x29646a(0x209)](_0x58480c);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x21b))[a0_0x3b11c6(0x231)]('Show\x20specific\x20attempt\x20details')[a0_0x3b11c6(0x276)](async(_0x392d66,_0x2407dd)=>{const _0xc2a36e=a0_0x3b11c6,_0x4b0db2=new WorkflowAttemptCommand(),_0x3bce1b=program[_0xc2a36e(0x1c6)](),_0x177a24=createTDXInstance(_0x3bce1b),_0x21c65d=await _0x4b0db2[_0xc2a36e(0x27a)]({'options':{..._0x3bce1b,..._0x2407dd},'args':[_0x392d66],'tdx':_0x177a24});process['exit'](_0x21c65d);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x22b))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x267))['option']('--include-subtasks',a0_0x3b11c6(0x2a8))[a0_0x3b11c6(0x276)](async(_0x2a4a06,_0x2ac164)=>{const _0x5d676b=a0_0x3b11c6,_0x33f380=new WorkflowTasksCommand(),_0x308119=program[_0x5d676b(0x1c6)](),_0x235127=createTDXInstance(_0x308119),_0x30fdff=await _0x33f380[_0x5d676b(0x27a)]({'options':{..._0x308119,..._0x2ac164},'args':[_0x2a4a06],'tdx':_0x235127});process['exit'](_0x30fdff);}),workflowCmd[a0_0x3b11c6(0x1d6)]('logs\x20<attempt-id>\x20<task-name>')['description'](a0_0x3b11c6(0x266))['option'](a0_0x3b11c6(0x2a7),a0_0x3b11c6(0x23a),_0x148007=>parseInt(_0x148007,0xa),0x0)[a0_0x3b11c6(0x276)](async(_0x213f4f,_0x277962,_0x5bd58f)=>{const _0x2bfb2b=a0_0x3b11c6,_0x3ffd6e=new WorkflowLogsCommand(),_0x4f100f=program[_0x2bfb2b(0x1c6)](),_0x146b24=createTDXInstance(_0x4f100f),_0x1bd1c3=await _0x3ffd6e[_0x2bfb2b(0x27a)]({'options':{..._0x4f100f,..._0x5bd58f},'args':[_0x213f4f,_0x277962],'tdx':_0x146b24});process[_0x2bfb2b(0x209)](_0x1bd1c3);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ac))['description']('Kill\x20a\x20running\x20attempt')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x28b),a0_0x3b11c6(0x242))['action'](async(_0x33a760,_0x2a0c2f)=>{const _0x449188=a0_0x3b11c6,_0x5780ab=new WorkflowKillCommand(),_0x5cbc18=program['opts'](),_0x12dff6=createTDXInstance(_0x5cbc18),_0x10c619=await _0x5780ab[_0x449188(0x27a)]({'options':{..._0x5cbc18,..._0x2a0c2f},'args':[_0x33a760],'tdx':_0x12dff6});process[_0x449188(0x209)](_0x10c619);}),workflowCmd['command'](a0_0x3b11c6(0x29f))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1cb))['option'](a0_0x3b11c6(0x28f),a0_0x3b11c6(0x245))['option'](a0_0x3b11c6(0x2d6),a0_0x3b11c6(0x2ed))[a0_0x3b11c6(0x1d5)]('--params\x20<json>',a0_0x3b11c6(0x24a))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1ff),a0_0x3b11c6(0x1c3))[a0_0x3b11c6(0x276)](async(_0x1956c1,_0x3088b2)=>{const _0x261257=a0_0x3b11c6,_0x2b5805=new WorkflowRetryCommand(),_0x2bdfaa=program[_0x261257(0x1c6)](),_0x362793=createTDXInstance(_0x2bdfaa),_0x431c4e=await _0x2b5805[_0x261257(0x27a)]({'options':{..._0x2bdfaa,..._0x3088b2},'args':[_0x1956c1],'tdx':_0x362793});process[_0x261257(0x209)](_0x431c4e);}),workflowCmd[a0_0x3b11c6(0x1d6)]('download\x20<project-name>\x20[output-dir]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x298))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2e3),a0_0x3b11c6(0x2da))[a0_0x3b11c6(0x276)](async(_0x2bc4b0,_0x148479,_0x243b40)=>{const _0x160dad=a0_0x3b11c6,_0x582713=new WorkflowDownloadCommand(),_0x4fbe8b=program['opts'](),_0x4d0865=createTDXInstance(_0x4fbe8b),_0x51f7d6=await _0x582713[_0x160dad(0x27a)]({'options':{..._0x4fbe8b,..._0x243b40},'args':[_0x2bc4b0,_0x148479||'.'],'tdx':_0x4d0865});process[_0x160dad(0x209)](_0x51f7d6);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2d3))[a0_0x3b11c6(0x231)]('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2ee),a0_0x3b11c6(0x1d1))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2e3),a0_0x3b11c6(0x2d7))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2e8),'Skip\x20validation\x20of\x20.dig\x20files')['action'](async(_0x1edaac,_0x172fb0)=>{const _0x5039f9=a0_0x3b11c6,_0x2e6829=new WorkflowPushCommand(),_0x19cd04=program['opts'](),_0x111e0d=createTDXInstance(_0x19cd04),_0x3b41b1=await _0x2e6829[_0x5039f9(0x27a)]({'options':{..._0x19cd04,..._0x172fb0},'args':_0x1edaac?[_0x1edaac]:[],'tdx':_0x111e0d});process[_0x5039f9(0x209)](_0x3b41b1);}),workflowCmd['command']('delete\x20<project-name-or-id>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x258))[a0_0x3b11c6(0x276)](async(_0x43aaa8,_0xcdb7b2)=>{const _0x12320e=a0_0x3b11c6,_0x55c5ec=new WorkflowDeleteCommand(),_0x3f1a8d=program[_0x12320e(0x1c6)](),_0x48bb0c=createTDXInstance(_0x3f1a8d),_0x3aa686=await _0x55c5ec['run']({'options':{..._0x3f1a8d,..._0xcdb7b2},'args':[_0x43aaa8],'tdx':_0x48bb0c});process['exit'](_0x3aa686);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ad))['description'](a0_0x3b11c6(0x1d4))['option'](a0_0x3b11c6(0x1bd),a0_0x3b11c6(0x2fe))['action'](async _0x479c1c=>{const _0x1769d4=a0_0x3b11c6,_0x242c24=new JobListCommand(),_0x505d12=program[_0x1769d4(0x1c6)](),_0x1812fd=createTDXInstance(_0x505d12),_0xfafe70=await _0x242c24[_0x1769d4(0x27a)]({'options':{..._0x505d12,..._0x479c1c},'args':[],'tdx':_0x1812fd});process[_0x1769d4(0x209)](_0xfafe70);});const jobCmd=program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2a4))['description'](a0_0x3b11c6(0x1fe));jobCmd['command'](a0_0x3b11c6(0x1c1))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2f1))[a0_0x3b11c6(0x276)](async(_0x53a102,_0x32869f)=>{const _0x564810=a0_0x3b11c6,_0x201f1e=new JobShowCommand(),_0x52aa1a=program[_0x564810(0x1c6)](),_0x3de2f7=createTDXInstance(_0x52aa1a),_0x5edb21=await _0x201f1e[_0x564810(0x27a)]({'options':{..._0x52aa1a,..._0x32869f},'args':[_0x53a102],'tdx':_0x3de2f7});process[_0x564810(0x209)](_0x5edb21);}),jobCmd['command'](a0_0x3b11c6(0x215))['description'](a0_0x3b11c6(0x286))[a0_0x3b11c6(0x276)](async(_0x3e2830,_0x3db2e3)=>{const _0x488382=a0_0x3b11c6,_0x369410=new JobKillCommand(),_0xbba052=program[_0x488382(0x1c6)](),_0x4e5a11=createTDXInstance(_0xbba052),_0x5d654b=await _0x369410[_0x488382(0x27a)]({'options':{..._0xbba052,..._0x3db2e3},'args':[_0x3e2830],'tdx':_0x4e5a11});process['exit'](_0x5d654b);}),jobCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2f4))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2e0))[a0_0x3b11c6(0x1d5)]('--job-type\x20<type>','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)',a0_0x3b11c6(0x203))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x217),a0_0x3b11c6(0x28e))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x25f),a0_0x3b11c6(0x1e7),a0_0x3b11c6(0x2a0))[a0_0x3b11c6(0x276)](async(_0xd60514,_0x22be80)=>{const _0x31f8ef=a0_0x3b11c6,_0x4c40b4=new JobSubmitCommand(),_0x43d49a=program[_0x31f8ef(0x1c6)](),_0x1ff00d=createTDXInstance(_0x43d49a),_0x36ec18=await _0x4c40b4[_0x31f8ef(0x27a)]({'options':{..._0x43d49a,..._0x22be80},'args':_0xd60514?[_0xd60514]:[],'tdx':_0x1ff00d});process[_0x31f8ef(0x209)](_0x36ec18);}),jobCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1fb))[a0_0x3b11c6(0x231)]('Get\x20job\x20results')[a0_0x3b11c6(0x276)](async(_0x32eb57,_0x26dd09)=>{const _0x179db6=a0_0x3b11c6,_0x5d3c55=new JobResultCommand(),_0xaebf28=program[_0x179db6(0x1c6)](),_0x8c8ab3=createTDXInstance(_0xaebf28),_0xa54083=await _0x5d3c55[_0x179db6(0x27a)]({'options':{..._0xaebf28,..._0x26dd09},'args':[_0x32eb57],'tdx':_0x8c8ab3});process['exit'](_0xa54083);});const llmCmd=program['command'](a0_0x3b11c6(0x206))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x20c));llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x22e))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2ef))[a0_0x3b11c6(0x276)](async(_0x286a8f,_0x1ce44a)=>{const _0x492118=a0_0x3b11c6,_0x3af85c=new LLMUseCommand(),_0xe24483=program[_0x492118(0x1c6)](),_0x34429b=createTDXInstance(_0xe24483),_0x3a6479=await _0x3af85c[_0x492118(0x27a)]({'options':{..._0xe24483,..._0x1ce44a},'args':[_0x286a8f],'tdx':_0x34429b});process[_0x492118(0x209)](_0x3a6479);}),llmCmd['command']('models')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x296))[a0_0x3b11c6(0x276)](async _0x217b83=>{const _0x155885=a0_0x3b11c6,_0x47206e=new LLMModelsCommand(),_0x59e56c=program['opts'](),_0x402746=createTDXInstance(_0x59e56c),_0x784bc4=await _0x47206e[_0x155885(0x27a)]({'options':{..._0x59e56c,..._0x217b83},'args':[],'tdx':_0x402746});process[_0x155885(0x209)](_0x784bc4);}),llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x240))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2f7))[a0_0x3b11c6(0x276)](async(_0x28afbe,_0x4258f9)=>{const _0x171eef=a0_0x3b11c6,_0x34d11d=new LLMProjectsCommand(),_0x4ba5d4=program['opts'](),_0x52a433=createTDXInstance(_0x4ba5d4),_0x584b77=await _0x34d11d[_0x171eef(0x27a)]({'options':{..._0x4ba5d4,..._0x4258f9},'args':_0x28afbe?[_0x28afbe]:[],'tdx':_0x52a433});process[_0x171eef(0x209)](_0x584b77);});function a0_0x2b7a(_0x1b67b9,_0x1ae7d4){const _0x58f008=a0_0x58f0();return a0_0x2b7a=function(_0x2b7a79,_0x184c1c){_0x2b7a79=_0x2b7a79-0x1bb;let _0x50c7cc=_0x58f008[_0x2b7a79];return _0x50c7cc;},a0_0x2b7a(_0x1b67b9,_0x1ae7d4);}const projectCmd=llmCmd['command'](a0_0x3b11c6(0x1cd))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2d4));projectCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1f4))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x250))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x2bb))['action'](async(_0x18e5f4,_0x4ab70c)=>{const _0xe8d7d8=a0_0x3b11c6,_0x5c468d=new LLMProjectCreateCommand(),_0x36d2b1=program[_0xe8d7d8(0x1c6)](),_0x9533d2=createTDXInstance(_0x36d2b1),_0x14a4b1=await _0x5c468d[_0xe8d7d8(0x27a)]({'options':{..._0x36d2b1,..._0x4ab70c},'args':[_0x18e5f4],'tdx':_0x9533d2});process['exit'](_0x14a4b1);}),projectCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x218))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x254))['action'](async(_0x2bdb9b,_0x3f3bae)=>{const _0x129b66=a0_0x3b11c6,_0x3d66c1=new LLMProjectDeleteCommand(),_0x247df4=program[_0x129b66(0x1c6)](),_0x6ca4a4=createTDXInstance(_0x247df4),_0x3f0490=await _0x3d66c1[_0x129b66(0x27a)]({'options':{..._0x247df4,..._0x3f3bae},'args':[_0x2bdb9b],'tdx':_0x6ca4a4});process['exit'](_0x3f0490);}),llmCmd[a0_0x3b11c6(0x1d6)]('agents\x20[pattern]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x27e))[a0_0x3b11c6(0x276)](async(_0x407a57,_0x1183d4)=>{const _0x57f7fe=a0_0x3b11c6,_0x24fc87=new LLMAgentsCommand(),_0x1014db=program[_0x57f7fe(0x1c6)](),_0x26e26a=createTDXInstance(_0x1014db),_0x4f904a=await _0x24fc87[_0x57f7fe(0x27a)]({'options':{..._0x1014db,..._0x1183d4},'args':_0x407a57?[_0x407a57]:[],'tdx':_0x26e26a});process['exit'](_0x4f904a);});const agentCmd=llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2d1))['description']('LLM\x20agent\x20management');agentCmd[a0_0x3b11c6(0x1d6)]('show\x20<agent-name>')['description']('Show\x20agent\x20details')[a0_0x3b11c6(0x276)](async(_0x5dea41,_0x5b5e37)=>{const _0x114550=a0_0x3b11c6,_0x2015fd=new LLMAgentShowCommand(),_0x1151d7=program[_0x114550(0x1c6)](),_0x2e4e1a=createTDXInstance(_0x1151d7),_0x3bea95=await _0x2015fd[_0x114550(0x27a)]({'options':{..._0x1151d7,..._0x5b5e37},'args':[_0x5dea41],'tdx':_0x2e4e1a});process[_0x114550(0x209)](_0x3bea95);}),agentCmd['command'](a0_0x3b11c6(0x1f4))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1cf))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x24c),'System\x20prompt/instructions\x20(default:\x20empty)')[a0_0x3b11c6(0x1d5)]('--model\x20<name>',a0_0x3b11c6(0x1cc),a0_0x3b11c6(0x21a))[a0_0x3b11c6(0x1d5)]('--starter-message\x20<text>',a0_0x3b11c6(0x1e9))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1e4),'Maximum\x20tool\x20iterations\x20(default:\x204)','4')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2a1),'Temperature\x20(0.0-2.0,\x20default:\x200.7)',a0_0x3b11c6(0x2ba))[a0_0x3b11c6(0x276)](async(_0x14f718,_0x1a3087)=>{const _0x57edd7=a0_0x3b11c6,_0x1fd0b4=new LLMAgentCreateCommand(),_0x31337d=program['opts'](),_0x32d575=createTDXInstance(_0x31337d),_0x6ce230=await _0x1fd0b4['run']({'options':{..._0x31337d,..._0x1a3087},'args':[_0x14f718],'tdx':_0x32d575});process[_0x57edd7(0x209)](_0x6ce230);}),agentCmd[a0_0x3b11c6(0x1d6)]('update\x20<agent-name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1f8))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x294),a0_0x3b11c6(0x2aa))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x214),'Agent\x20prompt/instructions')['option'](a0_0x3b11c6(0x221),'Agent\x20description')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x29a),a0_0x3b11c6(0x1e9))['action'](async(_0x196bc5,_0xed6a63)=>{const _0x24bb4b=a0_0x3b11c6,_0x3d4e5f=new LLMAgentUpdateCommand(),_0x27fe3e=program['opts'](),_0x4531fc=createTDXInstance(_0x27fe3e),_0x81bfaa=await _0x3d4e5f[_0x24bb4b(0x27a)]({'options':{..._0x27fe3e,..._0xed6a63},'args':[_0x196bc5],'tdx':_0x4531fc});process[_0x24bb4b(0x209)](_0x81bfaa);}),agentCmd[a0_0x3b11c6(0x1d6)]('delete\x20<agent-name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2a5))[a0_0x3b11c6(0x276)](async(_0x36a264,_0x25c904)=>{const _0x539353=a0_0x3b11c6,_0x415308=new LLMAgentDeleteCommand(),_0x53713b=program[_0x539353(0x1c6)](),_0x1d0905=createTDXInstance(_0x53713b),_0x94cf69=await _0x415308[_0x539353(0x27a)]({'options':{..._0x53713b,..._0x25c904},'args':[_0x36a264],'tdx':_0x1d0905});process[_0x539353(0x209)](_0x94cf69);}),llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ea))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2e6))[a0_0x3b11c6(0x1d5)]('--last','Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session')[a0_0x3b11c6(0x276)](async(_0x4705af,_0x5bcb12)=>{const _0x4697d2=a0_0x3b11c6,_0x24ed02=new LLMHistoryCommand(),_0x38082b=program[_0x4697d2(0x1c6)](),_0x31a9f7=createTDXInstance(_0x38082b),_0x54de38=await _0x24ed02[_0x4697d2(0x27a)]({'options':{..._0x38082b,..._0x5bcb12},'args':_0x4705af?[_0x4705af]:[],'tdx':_0x31a9f7});process[_0x4697d2(0x209)](_0x54de38);}),llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2bd))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x291))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x263),a0_0x3b11c6(0x2f6),a0_0x3b11c6(0x223))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2de),a0_0x3b11c6(0x1c7))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x28c),'Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)')['action'](async _0x520e16=>{const _0x585998=a0_0x3b11c6,_0x11ffdd=new LLMProxyCommand(),_0x27787c=program['opts'](),_0x219b3b=createTDXInstance(_0x27787c),_0x5261ff={..._0x520e16,'port':_0x520e16[_0x585998(0x2e4)]?parseInt(_0x520e16[_0x585998(0x2e4)],0xa):undefined},_0x4ec02a=await _0x11ffdd[_0x585998(0x27a)]({'options':{..._0x27787c,..._0x5261ff},'args':[],'tdx':_0x219b3b});process[_0x585998(0x209)](_0x4ec02a);}),program[a0_0x3b11c6(0x1d6)]('claude\x20[args...]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1e2))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1d9),'Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','sonnet')[a0_0x3b11c6(0x2c6)]()['allowExcessArguments'](!![])[a0_0x3b11c6(0x276)](async(_0xec1292,_0x1bf87c)=>{const _0x3545e1=a0_0x3b11c6,_0x54a876=new ClaudeCommand(),_0x34fa66=program[_0x3545e1(0x1c6)](),_0x4c11b2=createTDXInstance(_0x34fa66),_0xa48fa6=Array['isArray'](_0xec1292)?_0xec1292:[],_0x4559ca=await _0x54a876[_0x3545e1(0x27a)]({'options':{..._0x34fa66,..._0x1bf87c},'args':_0xa48fa6,'tdx':_0x4c11b2});process[_0x3545e1(0x209)](_0x4559ca);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1be))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1f0))[a0_0x3b11c6(0x1d5)]('--clear',a0_0x3b11c6(0x2c4))['action'](async _0x584502=>{const _0x21ded3=new ContextCommand(),_0x26af6a=program['opts'](),_0xaa9cf5=await _0x21ded3['run']({'options':{..._0x26af6a,..._0x584502},'args':[],'tdx':null});process['exit'](_0xaa9cf5);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x251))[a0_0x3b11c6(0x231)]('Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)')['action'](async(_0x39e3cb,_0x3151a7,_0x2ea543)=>{const _0x3c091a=a0_0x3b11c6,_0x318d58=new UseCommand(),_0x2c528a=program[_0x3c091a(0x1c6)](),_0x1c5a36=[];if(_0x39e3cb)_0x1c5a36['push'](_0x39e3cb);if(_0x3151a7)_0x1c5a36['push'](_0x3151a7);const _0x2347b5=await _0x318d58[_0x3c091a(0x27a)]({'options':{..._0x2c528a,..._0x2ea543},'args':_0x1c5a36,'tdx':null});process[_0x3c091a(0x209)](_0x2347b5);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2b2))[a0_0x3b11c6(0x231)]('List\x20all\x20available\x20profiles')['action'](async _0x1422d1=>{const _0x9cb758=a0_0x3b11c6,_0x34f283=new ProfilesCommand(),_0x2bff9d=program['opts'](),_0x5dca2f=await _0x34f283['run']({'options':{..._0x2bff9d,..._0x1422d1},'args':[],'tdx':null});process[_0x9cb758(0x209)](_0x5dca2f);}),program[a0_0x3b11c6(0x228)](process[a0_0x3b11c6(0x299)]);!process[a0_0x3b11c6(0x299)]['slice'](0x2)[a0_0x3b11c6(0x26a)]&&program['outputHelp']();const currentVersion=packageJson[a0_0x3b11c6(0x253)];process[a0_0x3b11c6(0x2a2)][a0_0x3b11c6(0x2d2)]&&process['argv'][a0_0x3b11c6(0x26a)]>0x2&&!currentVersion['includes'](a0_0x3b11c6(0x238))&&checkForUpdate(currentVersion)[a0_0x3b11c6(0x272)](_0x500bde=>{_0x500bde&&displayUpdateNotification(_0x500bde);})[a0_0x3b11c6(0x1f3)](()=>{});
2
+ const a0_0x5061e8=a0_0x7e75;function a0_0x7e75(_0x1abb08,_0x1f3325){const _0x10258f=a0_0x1025();return a0_0x7e75=function(_0x7e7504,_0x4f3508){_0x7e7504=_0x7e7504-0xf5;let _0x4f5031=_0x10258f[_0x7e7504];return _0x4f5031;},a0_0x7e75(_0x1abb08,_0x1f3325);}(function(_0x27ff66,_0x2b7446){const _0x270d1a=a0_0x7e75,_0x5572f4=_0x27ff66();while(!![]){try{const _0x4edb6a=-parseInt(_0x270d1a(0x1cd))/0x1+parseInt(_0x270d1a(0x1b7))/0x2+-parseInt(_0x270d1a(0x17e))/0x3+parseInt(_0x270d1a(0x1b8))/0x4*(parseInt(_0x270d1a(0x235))/0x5)+-parseInt(_0x270d1a(0x180))/0x6+parseInt(_0x270d1a(0x157))/0x7+parseInt(_0x270d1a(0x10e))/0x8;if(_0x4edb6a===_0x2b7446)break;else _0x5572f4['push'](_0x5572f4['shift']());}catch(_0x36c054){_0x5572f4['push'](_0x5572f4['shift']());}}}(a0_0x1025,0xaadd6));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';function a0_0x1025(){const _0x54dce2=['LLM\x20project\x20to\x20use\x20(overrides\x20context)','--color','show\x20<segment_name>','Options:','Preview\x20operation\x20without\x20executing','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','Skip\x20population\x20counting','workflow','-d,\x20--database\x20<name>','Job\x20management\x20commands','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','download\x20<project-name>\x20[output-dir]','port','log','trino','Include\x20retried\x20attempts','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','replace','desc','isTTY','Segment\x20folder\x20management','description','List\x20jobs','Delete\x20an\x20LLM\x20project','Save\x20output\x20to\x20file','context','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','--params\x20<json>',',\x20version\x20','--resume-from\x20<task>','alias','--add-attributes\x20<json>','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','Make\x20segment\x20invisible\x20(default:\x20visible)','--status\x20<status>','Read\x20SQL\x20query\x20from\x20file','--last','length','--customer-group-file\x20<file>','show\x20<job-id>','parse','AI-native\x20CLI\x20for\x20Treasure\x20Data','parent','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','--profile\x20<name>','GET','argv','--name\x20<new_name>','--description\x20<text>','jsonl','--add-attributes-file\x20<file>','Enable\x20verbose\x20logging','Reason\x20for\x20killing\x20the\x20attempt','1222334ddkhyQ','9024HqIlyQ','format','Attributes\x20from\x20JSON\x20file','--version','tsv','pwd','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','Arguments:','Master\x20table\x20name','--no-color','Include\x20subtasks\x20in\x20the\x20output','--temperature\x20<n>','option','Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','Segment\x20description','Show\x20tasks\x20for\x20an\x20attempt','agents\x20[pattern]','--max-depth\x20<depth>','workflows\x20[project]','gitRevision','263949xgvXzo','Updated\x20schedule\x20option','registeredArguments','preAction','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Set\x20operation\x20timeout\x20in\x20seconds','map','--agent\x20<name>','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','job','CDP\x20segment\x20management\x20commands','--debug','opts','.dev','exit','create\x20<segment_name>','Master\x20database\x20name','--include-retried','Run\x20Trino\x20query\x20with\x20streaming\x20results','--format\x20<format>','injectIntoOptions','Update\x20an\x20existing\x20agent','Usage:\x20','Folder\x20name\x20for\x20organization','--behaviors\x20<json>','System\x20prompt/instructions\x20(default:\x20empty)','-y,\x20--yes','subcommandDescription','api\x20[endpoint]','includes','push\x20[project-name-or-dir]','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','submit\x20[query]','--parent-folder\x20<name>','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','Add\x20behaviors\x20as\x20JSON\x20string','--model\x20<name>','run','join','padWidth','\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a','Database\x20to\x20use\x20(overrides\x20context)','llm','help','--invisible','../package.json','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','--to\x20<timestamp>','Create\x20parent\x20segment\x20(audience)','Read\x20query\x20from\x20file','filter','--force','Behaviors\x20as\x20JSON\x20string','List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)','--attributes\x20<json>','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','--customer-group\x20<json>','--from\x20<timestamp>','database','DEBUG','--max-tool-iterations\x20<n>','--in\x20<name>','--add-behaviors-file\x20<file>','Kill\x20a\x20running\x20attempt','optionDescription','use\x20<project-name>','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','sonnet','--parent-segment\x20<name>','4000','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','0.7','logLevel','List\x20all\x20available\x20profiles','padEnd','Behaviors\x20from\x20JSON\x20file','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','Database\x20to\x20query\x20(default:\x20information_schema)','aliases','Commands:','TRACE','show\x20[table]','outputHelp','Start\x20a\x20new\x20chat\x20session','--type\x20<api_type>','--agent\x20<ref>','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','Submit\x20a\x20job','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Customer\x20group\x20from\x20JSON\x20file','us01','commands','Alias\x20for\x20--database\x20(natural\x20language\x20style)','--name\x20<name>','sessions\x20[project]','buildTime','--dry-run','Filtering\x20rule\x20from\x20JSON\x20file','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','INFO','Delete\x20an\x20agent','Show\x20logs\x20for\x20a\x20specific\x20task','--include-subtasks','--in\x20<database>','2605axCRqf','--no-count-population','Agent\x20prompt/instructions','--tsv','--schedule-type\x20<type>','segment','hidden','use\x20<path>','--timezone\x20<tz>','debug','--timeout\x20<seconds>','Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)','projects\x20[pattern]','sql\x20<segment_name>','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','Database\x20name\x20(default:\x20information_schema)','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','List\x20available\x20LLM\x20models','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','Show\x20current\x20segment/folder\x20context','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','Add\x20attributes\x20from\x20JSON\x20file','allowExcessArguments','update\x20<name>','Skip\x20validation\x20of\x20.dig\x20files','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)','Kill\x20a\x20job','--name\x20<text>','create\x20<name>','Skip\x20confirmation\x20prompts','3573848KIffaY','version','describe\x20[table]','slice','Updated\x20description','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','name','show\x20<agent-name>','--clear','kill\x20<attempt-id>','--rule-file\x20<file>','Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)','--schedule-option\x20<value>','segments\x20[path]','addHelpText','-f,\x20--file\x20<path>','--port\x20<number>','Read\x20request\x20body\x20from\x20file','json','--starter-message\x20<text>','--add-behaviors\x20<json>','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','jobs','New\x20segment\x20name','project','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','requiredOption','Agent\x20name','--rule\x20<json>','-H,\x20--header\x20<header>','--limit\x20<number>','isArray','Start\x20time\x20filter\x20(ISO\x208601\x20format)','build-info.json','then','--attributes-file\x20<file>','tables\x20[pattern]','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','Project\x20description','--jsonl','commandDescription','--data\x20<data>','attempts\x20[project]','Override\x20project\x20name','required','--revision\x20<revision>','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)','url','query\x20[sql]','-X,\x20--method\x20<method>','history\x20[chat-id]','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Starting\x20offset\x20for\x20logs\x20(default:\x200)','delete\x20<project-name-or-id>','Folder\x20description','Show\x20agent\x20details','push','claude\x20[args...]','Show\x20job\x20details','delete\x20<name>','repeat','--skip-validation','Maximum\x20recursion\x20depth\x20(default:\x2010)','Describe\x20table\x20schema','Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)','Maximum\x20tool\x20iterations\x20(default:\x204)','Timezone\x20(e.g.,\x20America/Los_Angeles)','Agent\x20reference\x20(project-name/agent-name)','Attributes\x20as\x20JSON\x20string','Parent\x20segment\x20description','--database\x20<db>','--project\x20<name>','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','2649528skiVGm','kill\x20<job-id>','-d,\x20--database\x20<database>','Move\x20to\x20folder','utf-8','action','activations\x20<segment_name>','tasks\x20<attempt-id>','optionTerm','--output\x20<file>','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Temperature\x20(0.0-2.0,\x20default:\x200.7)','List\x20available\x20fields\x20for\x20segmentation','configureHelp','command','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','Add\x20attributes\x20as\x20JSON\x20string','apiKey','logs\x20<attempt-id>\x20<task-name>','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','Model\x20name\x20(default:\x20claude-4.5-sonnet)','options','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','Profile\x20to\x20use\x20(overrides\x20active\x20profile)','--llm-project\x20<name>','Model\x20type\x20(default:\x20claude-4.5-sonnet)','Revision\x20name\x20(default:\x20timestamp)','--reason\x20<text>','delete\x20<agent-name>','--catalog\x20<catalog>','--kind\x20<type>','-v,\x20--verbose','--json','subcommandTerm','Updated\x20timezone','Agent\x20description','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','proxy','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','3538182oNnBti','folder','2811438hUibyZ','summary'];a0_0x1025=function(){return _0x54dce2;};return a0_0x1025();}import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta[a0_0x5061e8(0x13d)]),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,a0_0x5061e8(0x1fa)),a0_0x5061e8(0x15b)));let buildInfo={};try{buildInfo=JSON['parse'](readFileSync(join(__dirname,a0_0x5061e8(0x12f)),a0_0x5061e8(0x15b)));}catch{}if(process[a0_0x5061e8(0x1b0)][a0_0x5061e8(0x1ea)](a0_0x5061e8(0x1bb))){let versionOutput='tdx\x20'+packageJson[a0_0x5061e8(0x10f)];buildInfo['gitRevision']&&(versionOutput+='\x20('+buildInfo[a0_0x5061e8(0x1cc)]+')'),buildInfo[a0_0x5061e8(0x22c)]&&(versionOutput+='\x20-\x20built\x20'+buildInfo[a0_0x5061e8(0x22c)]),console[a0_0x5061e8(0x18f)](versionOutput),process[a0_0x5061e8(0x1db)](0x0);}const program=new Command();let description=a0_0x5061e8(0x1ab);buildInfo['gitRevision']?description+=a0_0x5061e8(0x19e)+packageJson[a0_0x5061e8(0x10f)]+'\x20('+buildInfo[a0_0x5061e8(0x1cc)]+')':description+=a0_0x5061e8(0x19e)+packageJson[a0_0x5061e8(0x10f)];program['name']('tdx')[a0_0x5061e8(0x197)](description),program[a0_0x5061e8(0x1c4)]('--site\x20<site>',a0_0x5061e8(0x13c),a0_0x5061e8(0x227))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1e0),'Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x177),a0_0x5061e8(0x219))['option'](a0_0x5061e8(0x135),a0_0x5061e8(0x133))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x238),a0_0x5061e8(0x223))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x160),a0_0x5061e8(0x19a))['option'](a0_0x5061e8(0x12c),a0_0x5061e8(0x14e))['option'](a0_0x5061e8(0x183),a0_0x5061e8(0x187),![])[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1c1),a0_0x5061e8(0x123),![])[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x176),a0_0x5061e8(0x1b5),![])[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1d8),a0_0x5061e8(0x119))[a0_0x5061e8(0x1c4)]('--trace',a0_0x5061e8(0xfe))['option'](a0_0x5061e8(0xfa),a0_0x5061e8(0x1d2),'30')['option'](a0_0x5061e8(0x22d),a0_0x5061e8(0x186),![])[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1e7),a0_0x5061e8(0x10d),![])[a0_0x5061e8(0x1c4)]('--session\x20<id>','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)')['option'](a0_0x5061e8(0x1ae),a0_0x5061e8(0x16e))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x18a),a0_0x5061e8(0x1f6))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x20a),a0_0x5061e8(0x229))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x211),a0_0x5061e8(0x102))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x16f),a0_0x5061e8(0x182)),program[a0_0x5061e8(0x164)]({'formatHelp':(_0x5317c1,_0xcce61b)=>{const _0xd1ca5f=a0_0x5061e8,_0x304a1e=_0xcce61b[_0xd1ca5f(0x1f4)](_0x5317c1,_0xcce61b),_0x4746b7=0x2,_0x2d4087=0x2;function _0x5c19f0(_0x456947){const _0x512298=_0xd1ca5f;return!!_0x456947[_0x512298(0xf6)];}function _0x4473dd(_0x2b5bef,_0x19f933){const _0x1ac623=_0xd1ca5f;if(_0x19f933){const _0xd17409=''+_0x2b5bef[_0x1ac623(0x217)](_0x304a1e+_0x2d4087)+_0x19f933;return _0xd17409;}return _0x2b5bef;}function _0x83f716(_0x2ce4fd){const _0x367a99=_0xd1ca5f;return _0x2ce4fd['join']('\x0a')[_0x367a99(0x193)](/^/gm,'\x20'[_0x367a99(0x14a)](_0x4746b7));}const _0x4c7543=[];_0x4c7543[_0xd1ca5f(0x146)](_0xd1ca5f(0x1e3)+_0xcce61b['commandUsage'](_0x5317c1));const _0x3f9179=_0xcce61b[_0xd1ca5f(0x136)](_0x5317c1);_0x3f9179&&(_0x4c7543[_0xd1ca5f(0x146)](''),_0x4c7543[_0xd1ca5f(0x146)](_0x3f9179));const _0x3d1884=_0x5317c1[_0xd1ca5f(0x228)][_0xd1ca5f(0x1ff)](_0x184016=>!_0x5c19f0(_0x184016));if(_0x3d1884[_0xd1ca5f(0x1a7)]>0x0){const _0x19c3f9=_0x3d1884['map'](_0x5a876c=>{const _0x3661d2=_0xd1ca5f,_0x10b1fb=_0xcce61b[_0x3661d2(0x178)](_0x5a876c),_0x56d099=_0xcce61b[_0x3661d2(0x1e8)](_0x5a876c);return _0x4473dd(_0x10b1fb,_0x56d099);});_0x4c7543[_0xd1ca5f(0x146)](''),_0x4c7543[_0xd1ca5f(0x146)](_0xd1ca5f(0x21c)),_0x4c7543[_0xd1ca5f(0x146)](_0x83f716(_0x19c3f9));}const _0x1ae9d8=_0x5317c1[_0xd1ca5f(0x16c)]['filter'](_0x15d039=>!_0x5c19f0(_0x15d039));if(_0x1ae9d8[_0xd1ca5f(0x1a7)]>0x0){const _0x59cf88=_0x1ae9d8[_0xd1ca5f(0x1d3)](_0x34e74f=>{const _0x3c283c=_0xd1ca5f,_0x407a07=_0xcce61b[_0x3c283c(0x15f)](_0x34e74f),_0x5239fb=_0xcce61b[_0x3c283c(0x20d)](_0x34e74f);return _0x4473dd(_0x407a07,_0x5239fb);});_0x4c7543[_0xd1ca5f(0x146)](''),_0x4c7543[_0xd1ca5f(0x146)](_0xd1ca5f(0x185)),_0x4c7543['push'](_0x83f716(_0x59cf88));}const _0x46b254=(_0x5317c1[_0xd1ca5f(0x1cf)]||[])['filter'](_0x50b546=>!_0x5c19f0(_0x50b546));if(_0x46b254[_0xd1ca5f(0x1a7)]>0x0){const _0x42711f=_0x46b254[_0xd1ca5f(0x1d3)](_0xe5e1cd=>{const _0x4bcd9f=_0xcce61b['argumentTerm'](_0xe5e1cd),_0xfd066a=_0xcce61b['argumentDescription'](_0xe5e1cd);return _0x4473dd(_0x4bcd9f,_0xfd066a);});_0x4c7543[_0xd1ca5f(0x146)](''),_0x4c7543[_0xd1ca5f(0x146)](_0xd1ca5f(0x1bf)),_0x4c7543[_0xd1ca5f(0x146)](_0x83f716(_0x42711f));}return _0x4c7543['join']('\x0a');},'subcommandTerm':_0xee0dc=>{const _0x4edf76=a0_0x5061e8,_0x208682=(_0xee0dc[_0x4edf76(0x1cf)]||[])['map'](_0x2dae51=>_0x2dae51[_0x4edf76(0x13a)]?'<'+_0x2dae51[_0x4edf76(0x114)]()+'>':'['+_0x2dae51[_0x4edf76(0x114)]()+']')[_0x4edf76(0x1f3)]('\x20'),_0x5ee255=_0xee0dc[_0x4edf76(0x21b)](),_0x2c4bae=_0x5ee255[_0x4edf76(0x1a7)]>0x0?_0xee0dc[_0x4edf76(0x114)]()+',\x20'+_0x5ee255['join'](',\x20'):_0xee0dc[_0x4edf76(0x114)]();return _0x208682?_0x2c4bae+'\x20'+_0x208682:_0x2c4bae;}}),program['hook'](a0_0x5061e8(0x1d0),_0x4c9d04=>{const _0x7da4df=a0_0x5061e8,_0x5ed8b3=_0x4c9d04[_0x7da4df(0x1d9)]();if(!_0x5ed8b3[_0x7da4df(0x1b9)]){if(_0x5ed8b3[_0x7da4df(0x120)])_0x5ed8b3[_0x7da4df(0x1b9)]=_0x7da4df(0x120);else{if(_0x5ed8b3[_0x7da4df(0x1b3)])_0x5ed8b3[_0x7da4df(0x1b9)]='jsonl';else _0x5ed8b3['tsv']&&(_0x5ed8b3[_0x7da4df(0x1b9)]=_0x7da4df(0x1bc));}}_0x5ed8b3['in']&&!_0x5ed8b3[_0x7da4df(0x207)]&&(_0x5ed8b3[_0x7da4df(0x207)]=_0x5ed8b3['in']);if(_0x5ed8b3['trace'])_0x5ed8b3[_0x7da4df(0x215)]=LogLevel[_0x7da4df(0x21d)];else{if(_0x5ed8b3[_0x7da4df(0xf9)])_0x5ed8b3[_0x7da4df(0x215)]=LogLevel[_0x7da4df(0x208)];else _0x5ed8b3[_0x7da4df(0x215)]===undefined&&(_0x5ed8b3[_0x7da4df(0x215)]=LogLevel[_0x7da4df(0x230)]);}});function createTDXInstance(_0xa1e8ac){const _0x3b62ad=a0_0x5061e8,_0x498dcd=new GlobalContext(_0xa1e8ac);_0x498dcd[_0x3b62ad(0x1e1)](_0xa1e8ac);const _0x9d8be4={'site':_0x498dcd['site'],'apiKey':_0x498dcd[_0x3b62ad(0x168)],'logLevel':_0x498dcd[_0x3b62ad(0x215)]};return new TDX(_0x9d8be4);}program[a0_0x5061e8(0x165)]('databases\x20[pattern]')[a0_0x5061e8(0x197)](a0_0x5061e8(0x192))[a0_0x5061e8(0x15c)](async(_0x82f0cb,_0x48792a)=>{const _0xdb7de5=a0_0x5061e8,_0x5e58d0=new DatabasesCommand(),_0x3d7020=program[_0xdb7de5(0x1d9)](),_0x404687=createTDXInstance(_0x3d7020),_0x192075=await _0x5e58d0['run']({'options':{..._0x3d7020,..._0x48792a},'args':_0x82f0cb?[_0x82f0cb]:[],'tdx':_0x404687});process[_0xdb7de5(0x1db)](_0x192075);}),program['command']('chat\x20[message...]')['description']('Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x222),a0_0x5061e8(0x151))[a0_0x5061e8(0x1c4)]('--model\x20<name>',a0_0x5061e8(0x16b))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1c3),a0_0x5061e8(0x162))['option']('--new',a0_0x5061e8(0x220))[a0_0x5061e8(0x15c)](async(_0x364e80,_0x3bf551)=>{const _0xf0987c=a0_0x5061e8,_0x132717=new ChatCommand(),_0x4d5495=program[_0xf0987c(0x1d9)](),_0x559df5=createTDXInstance(_0x4d5495),_0x68ca32=await _0x132717[_0xf0987c(0x1f2)]({'options':{..._0x4d5495,..._0x3bf551},'args':_0x364e80,'tdx':_0x559df5});process[_0xf0987c(0x1db)](_0x68ca32);});const apiCmd=program[a0_0x5061e8(0x165)](a0_0x5061e8(0x1e9))[a0_0x5061e8(0x181)]('Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs')[a0_0x5061e8(0x11c)]('after',a0_0x5061e8(0x1f5))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x13f),'HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)',a0_0x5061e8(0x1af))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x137),'Request\x20body\x20as\x20JSON\x20string')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x11d),a0_0x5061e8(0x11f))['option'](a0_0x5061e8(0x12b),a0_0x5061e8(0x1fb),(_0x47f9e2,_0x2dcf1e)=>{return _0x2dcf1e?[..._0x2dcf1e,_0x47f9e2]:[_0x47f9e2];})[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x221),a0_0x5061e8(0x113),'td')[a0_0x5061e8(0x15c)](async(_0x46b6fe,_0x1b0ab1)=>{const _0x530efb=a0_0x5061e8;if(!_0x46b6fe){apiCmd[_0x530efb(0x1f8)]();return;}const _0x129283=new ApiCommand(),_0x3232cd=program[_0x530efb(0x1d9)](),_0x263bef=createTDXInstance(_0x3232cd),_0x41e009=await _0x129283[_0x530efb(0x1f2)]({'options':{..._0x3232cd,..._0x1b0ab1},'args':[_0x46b6fe],'tdx':_0x263bef});process[_0x530efb(0x1db)](_0x41e009);});program[a0_0x5061e8(0x165)](a0_0x5061e8(0x132))['description'](a0_0x5061e8(0x1be))['option'](a0_0x5061e8(0x159),a0_0x5061e8(0x104))['option'](a0_0x5061e8(0x234),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x5061e8(0x15c)](async(_0x18498e,_0xfc29eb)=>{const _0x497ef4=a0_0x5061e8,_0x7fa66c=new TablesCommand(),_0x26ab89=program['opts'](),_0x3d3008=createTDXInstance(_0x26ab89);_0xfc29eb['in']&&(_0xfc29eb[_0x497ef4(0x207)]=_0xfc29eb['in']);const _0x4e933b=await _0x7fa66c[_0x497ef4(0x1f2)]({'options':{..._0x26ab89,..._0xfc29eb},'args':_0x18498e?[_0x18498e]:[],'tdx':_0x3d3008});process[_0x497ef4(0x1db)](_0x4e933b);}),program['command'](a0_0x5061e8(0x21e))[a0_0x5061e8(0x197)](a0_0x5061e8(0x1ef))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x159),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)')['option'](a0_0x5061e8(0x234),a0_0x5061e8(0x229))['action'](async(_0x205950,_0x257f72)=>{const _0x220114=a0_0x5061e8,_0x2465fb=new ShowCommand(),_0x22fd75=program['opts'](),_0xda39f7=createTDXInstance(_0x22fd75);_0x257f72['in']&&(_0x257f72[_0x220114(0x207)]=_0x257f72['in']);const _0x3f4e09=await _0x2465fb[_0x220114(0x1f2)]({'options':{..._0x22fd75,..._0x257f72},'args':_0x205950?[_0x205950]:[],'tdx':_0xda39f7});process[_0x220114(0x1db)](_0x3f4e09);}),program[a0_0x5061e8(0x165)](a0_0x5061e8(0x110))[a0_0x5061e8(0x1a0)]('desc')[a0_0x5061e8(0x197)](a0_0x5061e8(0x14d))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x159),a0_0x5061e8(0x17d))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x234),a0_0x5061e8(0x229))[a0_0x5061e8(0x15c)](async(_0x234e1c,_0xbb7edc)=>{const _0x2d87d0=a0_0x5061e8,_0x374c97=new DescribeCommand(),_0x2c9b04=program[_0x2d87d0(0x1d9)](),_0x1fca0f=createTDXInstance(_0x2c9b04);_0xbb7edc['in']&&(_0xbb7edc[_0x2d87d0(0x207)]=_0xbb7edc['in']);const _0x3bbd39=await _0x374c97[_0x2d87d0(0x1f2)]({'options':{..._0x2c9b04,..._0xbb7edc},'args':_0x234e1c?[_0x234e1c]:[],'tdx':_0x1fca0f});process['exit'](_0x3bbd39);}),program[a0_0x5061e8(0x165)](a0_0x5061e8(0x13e))[a0_0x5061e8(0x197)](a0_0x5061e8(0x1df))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x159),a0_0x5061e8(0x21a))['option']('--in\x20<database>',a0_0x5061e8(0x229))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x174),'Trino\x20catalog\x20(default:\x20td)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x11d),a0_0x5061e8(0x1a5))[a0_0x5061e8(0x1c4)]('--limit\x20<rows>','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','40')[a0_0x5061e8(0x15c)](async(_0x264317,_0x2f1ec6)=>{const _0x33607a=a0_0x5061e8,_0x105090=new QueryCommand(),_0x368650=program['opts'](),_0x1a1493=createTDXInstance(_0x368650);_0x2f1ec6['in']&&(_0x2f1ec6[_0x33607a(0x207)]=_0x2f1ec6['in']);const _0x47b2e5=await _0x105090[_0x33607a(0x1f2)]({'options':{..._0x368650,..._0x2f1ec6},'args':_0x264317?[_0x264317]:[],'tdx':_0x1a1493});process[_0x33607a(0x1db)](_0x47b2e5);}),program[a0_0x5061e8(0x165)](a0_0x5061e8(0x11b))[a0_0x5061e8(0x197)]('List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context')[a0_0x5061e8(0x1c4)]('-r,\x20--recursive','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1ca),a0_0x5061e8(0x14c),'10')['action'](async(_0x51e941,_0x4b51c5)=>{const _0x1a8657=a0_0x5061e8,_0x5195e1=new SegmentsCommand(),_0x39e682=program[_0x1a8657(0x1d9)](),_0x351eaf=createTDXInstance(_0x39e682),_0x2c53b0=await _0x5195e1['run']({'options':{..._0x39e682,..._0x4b51c5},'args':_0x51e941?[_0x51e941]:[],'tdx':_0x351eaf});process[_0x1a8657(0x1db)](_0x2c53b0);});const segmentCmd=program['command'](a0_0x5061e8(0xf5))['description'](a0_0x5061e8(0x1d7));segmentCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0xf7))[a0_0x5061e8(0x197)]('Set\x20current\x20segment/folder\x20context\x20for\x20navigation')[a0_0x5061e8(0x15c)](async(_0x4fc4f8,_0x5d26af)=>{const _0x428a62=a0_0x5061e8,_0x518def=new SegmentUseCommand(),_0x5a50f1=program[_0x428a62(0x1d9)](),_0x3ba79c=createTDXInstance(_0x5a50f1),_0x3f486f=await _0x518def[_0x428a62(0x1f2)]({'options':{..._0x5a50f1,..._0x5d26af},'args':[_0x4fc4f8],'tdx':_0x3ba79c});process['exit'](_0x3f486f);}),segmentCmd['command'](a0_0x5061e8(0x1bd))[a0_0x5061e8(0x197)](a0_0x5061e8(0x103))['action'](async _0x2c6b8d=>{const _0x26adc9=a0_0x5061e8,_0x26c6a0=new SegmentPwdCommand(),_0xcc1c1c=program[_0x26adc9(0x1d9)](),_0x4771ed=createTDXInstance(_0xcc1c1c),_0x5144e7=await _0x26c6a0[_0x26adc9(0x1f2)]({'options':{..._0xcc1c1c,..._0x2c6b8d},'args':[],'tdx':_0x4771ed});process['exit'](_0x5144e7);}),segmentCmd['command']('describe\x20<segment_name>')[a0_0x5061e8(0x1a0)](a0_0x5061e8(0x194))[a0_0x5061e8(0x197)](a0_0x5061e8(0x161))[a0_0x5061e8(0x15c)](async(_0x58ccd7,_0x305c8f)=>{const _0x3dd9f6=a0_0x5061e8,_0x470b97=new SegmentDescribeCommand(),_0xdacfe8=program['opts'](),_0x565fd3=createTDXInstance(_0xdacfe8),_0x349d1b=await _0x470b97[_0x3dd9f6(0x1f2)]({'options':{..._0xdacfe8,..._0x305c8f},'args':[_0x58ccd7],'tdx':_0x565fd3});process[_0x3dd9f6(0x1db)](_0x349d1b);}),segmentCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x184))[a0_0x5061e8(0x197)](a0_0x5061e8(0x100))[a0_0x5061e8(0x15c)](async(_0x2d2797,_0x346f44)=>{const _0x523b83=a0_0x5061e8,_0x4c436c=new SegmentShowCommand(),_0x233382=program[_0x523b83(0x1d9)](),_0x784545=createTDXInstance(_0x233382),_0x25a783=await _0x4c436c[_0x523b83(0x1f2)]({'options':{..._0x233382,..._0x346f44},'args':[_0x2d2797],'tdx':_0x784545});process[_0x523b83(0x1db)](_0x25a783);}),segmentCmd[a0_0x5061e8(0x165)]('folders\x20<parent_name>')['description'](a0_0x5061e8(0x20f))[a0_0x5061e8(0x15c)](async(_0x5af454,_0x504d66)=>{const _0x2207a5=a0_0x5061e8,_0x1089ef=new SegmentFolderListCommand(),_0x91b254=program[_0x2207a5(0x1d9)](),_0xb70e9a=createTDXInstance(_0x91b254),_0x106adf=await _0x1089ef[_0x2207a5(0x1f2)]({'options':{..._0x91b254,..._0x504d66},'args':[_0x5af454],'tdx':_0xb70e9a});process['exit'](_0x106adf);});const folderCmd=segmentCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x17f))[a0_0x5061e8(0x197)](a0_0x5061e8(0x196));folderCmd['command']('show\x20<folder_ref>')[a0_0x5061e8(0x197)](a0_0x5061e8(0x1d5))[a0_0x5061e8(0x15c)](async(_0x509c46,_0x57c33f)=>{const _0x78a524=a0_0x5061e8,_0x418cc6=new SegmentFolderShowCommand(),_0x194323=program[_0x78a524(0x1d9)](),_0x55289c=createTDXInstance(_0x194323),_0x4730a4=await _0x418cc6[_0x78a524(0x1f2)]({'options':{..._0x194323,..._0x57c33f},'args':[_0x509c46],'tdx':_0x55289c});process['exit'](_0x4730a4);}),segmentCmd['command'](a0_0x5061e8(0xfd))['description']('Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)')[a0_0x5061e8(0x15c)](async(_0x14d6fb,_0x5c6e53)=>{const _0x12d43a=a0_0x5061e8,_0x4dd690=new SegmentSQLCommand(),_0x110052=program['opts'](),_0x5abda1=createTDXInstance(_0x110052),_0x2503b1=await _0x4dd690[_0x12d43a(0x1f2)]({'options':{..._0x110052,..._0x5c6e53},'args':[_0x14d6fb],'tdx':_0x5abda1});process[_0x12d43a(0x1db)](_0x2503b1);}),segmentCmd[a0_0x5061e8(0x165)]('fields\x20<parent_name>')[a0_0x5061e8(0x197)](a0_0x5061e8(0x163))['action'](async(_0x5d030d,_0xa5fbbc)=>{const _0x5d6e14=a0_0x5061e8,_0x196007=new SegmentFieldsCommand(),_0x37caba=program['opts'](),_0x2fe80e=createTDXInstance(_0x37caba),_0x39a573=await _0x196007[_0x5d6e14(0x1f2)]({'options':{..._0x37caba,..._0xa5fbbc},'args':[_0x5d030d],'tdx':_0x2fe80e});process[_0x5d6e14(0x1db)](_0x39a573);}),segmentCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x1dc))[a0_0x5061e8(0x197)]('Create\x20child\x20segment\x20(use\x20parent_name/child_name)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1b2),a0_0x5061e8(0x1c7))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x12a),'Filtering\x20rule\x20as\x20JSON\x20string')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x118),a0_0x5061e8(0x22e))[a0_0x5061e8(0x1c4)]('--folder\x20<name>',a0_0x5061e8(0x1e4))['option'](a0_0x5061e8(0x175),a0_0x5061e8(0x22f))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1f9),a0_0x5061e8(0x1a3))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x236),a0_0x5061e8(0x188))[a0_0x5061e8(0x15c)](async(_0x42af5a,_0x6e2003)=>{const _0x5ed66a=a0_0x5061e8,_0x3ee88b=new SegmentCreateCommand(),_0x50f722=program[_0x5ed66a(0x1d9)](),_0x198629=createTDXInstance(_0x50f722),_0x1c7131=await _0x3ee88b[_0x5ed66a(0x1f2)]({'options':{..._0x50f722,..._0x6e2003},'args':[_0x42af5a],'tdx':_0x198629});process[_0x5ed66a(0x1db)](_0x1c7131);}),segmentCmd['command']('update\x20<segment_name>')['description']('Update\x20child\x20segment\x20(use\x20parent_name/child_name)')['option'](a0_0x5061e8(0x1b1),a0_0x5061e8(0x125))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1b2),a0_0x5061e8(0x112))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x12a),a0_0x5061e8(0x19c))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x118),'Updated\x20filtering\x20rule\x20from\x20JSON\x20file')[a0_0x5061e8(0x1c4)]('--folder\x20<name>',a0_0x5061e8(0x15a))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x175),a0_0x5061e8(0x22f))[a0_0x5061e8(0x15c)](async(_0x16dc92,_0x364a8f)=>{const _0x577dae=a0_0x5061e8,_0x32e029=new SegmentUpdateCommand(),_0x1434d3=program[_0x577dae(0x1d9)](),_0x3a33d9=createTDXInstance(_0x1434d3),_0x5d428f=await _0x32e029[_0x577dae(0x1f2)]({'options':{..._0x1434d3,..._0x364a8f},'args':[_0x16dc92],'tdx':_0x3a33d9});process[_0x577dae(0x1db)](_0x5d428f);});const parentCmd=segmentCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x1ac))[a0_0x5061e8(0x197)]('Parent\x20segment\x20(audience)\x20management');parentCmd['command'](a0_0x5061e8(0x10c))[a0_0x5061e8(0x197)](a0_0x5061e8(0x1fd))[a0_0x5061e8(0x128)](a0_0x5061e8(0x154),a0_0x5061e8(0x1dd))[a0_0x5061e8(0x128)]('--table\x20<table>',a0_0x5061e8(0x1c0))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1b2),a0_0x5061e8(0x153))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x239),a0_0x5061e8(0x1d1))[a0_0x5061e8(0x1c4)]('--schedule-option\x20<value>',a0_0x5061e8(0x1ec))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0xf8),a0_0x5061e8(0x150))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x203),a0_0x5061e8(0x152))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x131),a0_0x5061e8(0x1ba))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1e5),a0_0x5061e8(0x201))['option']('--behaviors-file\x20<file>',a0_0x5061e8(0x218))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x205),'Customer\x20group\x20as\x20JSON\x20string')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1a8),a0_0x5061e8(0x226))[a0_0x5061e8(0x15c)](async(_0x34b564,_0x159bd2)=>{const _0x268961=a0_0x5061e8,_0x1ff047=new ParentSegmentCreateCommand(),_0x519bb5=program[_0x268961(0x1d9)](),_0x489dc6=createTDXInstance(_0x519bb5),_0x1cfefb=await _0x1ff047[_0x268961(0x1f2)]({'options':{..._0x519bb5,..._0x159bd2},'args':[_0x34b564],'tdx':_0x489dc6});process[_0x268961(0x1db)](_0x1cfefb);}),parentCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x107))[a0_0x5061e8(0x197)]('Update\x20parent\x20segment\x20(audience)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1b2),a0_0x5061e8(0x112))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x239),'Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x11a),a0_0x5061e8(0x1ce))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0xf8),a0_0x5061e8(0x179))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1a1),a0_0x5061e8(0x167))['option'](a0_0x5061e8(0x1b4),a0_0x5061e8(0x105))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x122),a0_0x5061e8(0x1f0))['option'](a0_0x5061e8(0x20b),'Add\x20behaviors\x20from\x20JSON\x20file')[a0_0x5061e8(0x15c)](async(_0x1631fd,_0x5166b3)=>{const _0x55e4a0=a0_0x5061e8,_0x41ff95=new ParentSegmentUpdateCommand(),_0x41e3ec=program[_0x55e4a0(0x1d9)](),_0x3f3278=createTDXInstance(_0x41e3ec),_0x4409be=await _0x41ff95[_0x55e4a0(0x1f2)]({'options':{..._0x41e3ec,..._0x5166b3},'args':[_0x1631fd],'tdx':_0x3f3278});process[_0x55e4a0(0x1db)](_0x4409be);}),folderCmd[a0_0x5061e8(0x165)]('create\x20<parent_name>\x20<folder_name>')['description']('Create\x20segment\x20folder')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1b2),a0_0x5061e8(0x144))['option'](a0_0x5061e8(0x1ee),'Parent\x20folder\x20name\x20for\x20nested\x20folders')['action'](async(_0x40c12f,_0x103005,_0xf30cab)=>{const _0x3b19f0=a0_0x5061e8,_0x1858a9=new SegmentFolderCreateCommand(),_0x29a6f5=program['opts'](),_0x278a82=createTDXInstance(_0x29a6f5),_0x84fc5b=await _0x1858a9['run']({'options':{..._0x29a6f5,..._0xf30cab},'args':[_0x40c12f,_0x103005],'tdx':_0x278a82});process[_0x3b19f0(0x1db)](_0x84fc5b);}),program['command'](a0_0x5061e8(0x15d))[a0_0x5061e8(0x197)]('List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)')[a0_0x5061e8(0x15c)](async(_0x14e4ef,_0x2c32d1)=>{const _0x1b0f03=a0_0x5061e8,_0x4dc0bb=new ActivationsCommand(),_0x35f797=program[_0x1b0f03(0x1d9)](),_0x51298e=createTDXInstance(_0x35f797),_0x8bc224=await _0x4dc0bb[_0x1b0f03(0x1f2)]({'options':{..._0x35f797,..._0x2c32d1},'args':[_0x14e4ef],'tdx':_0x51298e});process[_0x1b0f03(0x1db)](_0x8bc224);});const workflowCmd=program[a0_0x5061e8(0x165)](a0_0x5061e8(0x189))[a0_0x5061e8(0x1a0)]('wf')[a0_0x5061e8(0x197)]('Workflow\x20(Digdag)\x20management\x20commands');workflowCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0xfc))[a0_0x5061e8(0x197)]('List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)')[a0_0x5061e8(0x15c)](async(_0x563112,_0x22877f)=>{const _0x359aad=a0_0x5061e8,_0x2029b2=new WorkflowProjectsCommand(),_0xfdf8ac=program[_0x359aad(0x1d9)](),_0x4caf82=createTDXInstance(_0xfdf8ac),_0xea07f0=await _0x2029b2[_0x359aad(0x1f2)]({'options':{..._0xfdf8ac,..._0x22877f},'args':_0x563112?[_0x563112]:[],'tdx':_0x4caf82});process[_0x359aad(0x1db)](_0xea07f0);}),workflowCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x1cb))[a0_0x5061e8(0x1a0)]('ls')[a0_0x5061e8(0x197)]('List\x20workflows\x20(optionally\x20filtered\x20by\x20project)')['action'](async(_0x1df6f0,_0x1e8db5)=>{const _0x4829f2=a0_0x5061e8,_0x37d784=new WorkflowWorkflowsCommand(),_0x1fb977=program[_0x4829f2(0x1d9)](),_0x2043b1=createTDXInstance(_0x1fb977),_0x5dd275=await _0x37d784[_0x4829f2(0x1f2)]({'options':{..._0x1fb977,..._0x1e8db5},'args':_0x1df6f0?[_0x1df6f0]:[],'tdx':_0x2043b1});process['exit'](_0x5dd275);}),workflowCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x22b))['description'](a0_0x5061e8(0x166))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1a4),'Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x206),a0_0x5061e8(0x12e))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1fc),'End\x20time\x20filter\x20(ISO\x208601\x20format)')[a0_0x5061e8(0x15c)](async(_0x381e60,_0x13a52a)=>{const _0x586941=a0_0x5061e8,_0x30af34=new WorkflowSessionsCommand(),_0x3447d7=program[_0x586941(0x1d9)](),_0x7c4db6=createTDXInstance(_0x3447d7),_0x4b82c7=await _0x30af34[_0x586941(0x1f2)]({'options':{..._0x3447d7,..._0x13a52a},'args':_0x381e60?[_0x381e60]:[],'tdx':_0x7c4db6});process[_0x586941(0x1db)](_0x4b82c7);}),workflowCmd['command'](a0_0x5061e8(0x138))[a0_0x5061e8(0x197)](a0_0x5061e8(0x202))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1de),a0_0x5061e8(0x191))[a0_0x5061e8(0x15c)](async(_0x7030a2,_0x13808d)=>{const _0x34e972=a0_0x5061e8,_0x1f1f4d=new WorkflowAttemptsCommand(),_0x90def9=program[_0x34e972(0x1d9)](),_0x46a91b=createTDXInstance(_0x90def9),_0x5622d2=await _0x1f1f4d[_0x34e972(0x1f2)]({'options':{..._0x90def9,..._0x13808d},'args':_0x7030a2?[_0x7030a2]:[],'tdx':_0x46a91b});process[_0x34e972(0x1db)](_0x5622d2);}),workflowCmd[a0_0x5061e8(0x165)]('attempt\x20<attempt-id>')[a0_0x5061e8(0x197)]('Show\x20specific\x20attempt\x20details')[a0_0x5061e8(0x15c)](async(_0x1cbaf3,_0x57f099)=>{const _0x25dfe7=a0_0x5061e8,_0x149bf3=new WorkflowAttemptCommand(),_0x349b1f=program[_0x25dfe7(0x1d9)](),_0x43db58=createTDXInstance(_0x349b1f),_0x951018=await _0x149bf3[_0x25dfe7(0x1f2)]({'options':{..._0x349b1f,..._0x57f099},'args':[_0x1cbaf3],'tdx':_0x43db58});process['exit'](_0x951018);}),workflowCmd['command'](a0_0x5061e8(0x15e))[a0_0x5061e8(0x197)](a0_0x5061e8(0x1c8))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x233),a0_0x5061e8(0x1c2))[a0_0x5061e8(0x15c)](async(_0x161e0e,_0x539ba3)=>{const _0x286021=a0_0x5061e8,_0x240588=new WorkflowTasksCommand(),_0x5f3d6a=program[_0x286021(0x1d9)](),_0x200797=createTDXInstance(_0x5f3d6a),_0x491eea=await _0x240588[_0x286021(0x1f2)]({'options':{..._0x5f3d6a,..._0x539ba3},'args':[_0x161e0e],'tdx':_0x200797});process[_0x286021(0x1db)](_0x491eea);}),workflowCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x169))['description'](a0_0x5061e8(0x232))[a0_0x5061e8(0x1c4)]('--offset\x20<number>',a0_0x5061e8(0x142),_0x3dfce3=>parseInt(_0x3dfce3,0xa),0x0)[a0_0x5061e8(0x15c)](async(_0x5df454,_0x4ae14b,_0x28d9e4)=>{const _0x56d680=a0_0x5061e8,_0x340958=new WorkflowLogsCommand(),_0x1a32db=program['opts'](),_0x30b85e=createTDXInstance(_0x1a32db),_0x5efca3=await _0x340958[_0x56d680(0x1f2)]({'options':{..._0x1a32db,..._0x28d9e4},'args':[_0x5df454,_0x4ae14b],'tdx':_0x30b85e});process[_0x56d680(0x1db)](_0x5efca3);}),workflowCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x117))['description'](a0_0x5061e8(0x20c))['option'](a0_0x5061e8(0x172),a0_0x5061e8(0x1b6))[a0_0x5061e8(0x15c)](async(_0x4bef73,_0x5288cf)=>{const _0x1153fa=a0_0x5061e8,_0x129205=new WorkflowKillCommand(),_0xedc988=program[_0x1153fa(0x1d9)](),_0x400d56=createTDXInstance(_0xedc988),_0x558f0e=await _0x129205[_0x1153fa(0x1f2)]({'options':{..._0xedc988,..._0x5288cf},'args':[_0x4bef73],'tdx':_0x400d56});process[_0x1153fa(0x1db)](_0x558f0e);}),workflowCmd[a0_0x5061e8(0x165)]('retry\x20<session-id|attempt-id>')[a0_0x5061e8(0x197)]('Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)')[a0_0x5061e8(0x1c4)]('--from-task\x20<task>',a0_0x5061e8(0x1a2))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x19f),'Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x19d),'Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x200),'Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)')[a0_0x5061e8(0x15c)](async(_0x2f143d,_0x48608c)=>{const _0x20d8e5=a0_0x5061e8,_0x4b31e9=new WorkflowRetryCommand(),_0x3265e7=program['opts'](),_0x200ab7=createTDXInstance(_0x3265e7),_0x56d984=await _0x4b31e9[_0x20d8e5(0x1f2)]({'options':{..._0x3265e7,..._0x48608c},'args':[_0x2f143d],'tdx':_0x200ab7});process[_0x20d8e5(0x1db)](_0x56d984);}),workflowCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x18d))[a0_0x5061e8(0x197)]('Download\x20workflow\x20project\x20from\x20Treasure\x20Data')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x13b),'Specific\x20revision\x20to\x20download\x20(default:\x20latest)')[a0_0x5061e8(0x15c)](async(_0x9a277c,_0x3a0d21,_0x991f61)=>{const _0x4174dc=a0_0x5061e8,_0x137af1=new WorkflowDownloadCommand(),_0x33c6d4=program[_0x4174dc(0x1d9)](),_0x2a7b41=createTDXInstance(_0x33c6d4),_0x50aa5a=await _0x137af1[_0x4174dc(0x1f2)]({'options':{..._0x33c6d4,..._0x991f61},'args':[_0x9a277c,_0x3a0d21||'.'],'tdx':_0x2a7b41});process['exit'](_0x50aa5a);}),workflowCmd['command'](a0_0x5061e8(0x1eb))[a0_0x5061e8(0x197)](a0_0x5061e8(0xfb))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x22a),a0_0x5061e8(0x139))['option'](a0_0x5061e8(0x13b),a0_0x5061e8(0x171))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x14b),a0_0x5061e8(0x108))[a0_0x5061e8(0x15c)](async(_0x228745,_0x4f4df6)=>{const _0x4709e5=a0_0x5061e8,_0x58c512=new WorkflowPushCommand(),_0x148cfe=program[_0x4709e5(0x1d9)](),_0x3e166b=createTDXInstance(_0x148cfe),_0x1b8ade=await _0x58c512[_0x4709e5(0x1f2)]({'options':{..._0x148cfe,..._0x4f4df6},'args':_0x228745?[_0x228745]:[],'tdx':_0x3e166b});process[_0x4709e5(0x1db)](_0x1b8ade);}),workflowCmd['command'](a0_0x5061e8(0x143))[a0_0x5061e8(0x197)](a0_0x5061e8(0x1ad))[a0_0x5061e8(0x15c)](async(_0x1c1373,_0x2e8ef5)=>{const _0x3e39fb=a0_0x5061e8,_0x6f0ea1=new WorkflowDeleteCommand(),_0xab7db5=program[_0x3e39fb(0x1d9)](),_0x5da5f8=createTDXInstance(_0xab7db5),_0x127a48=await _0x6f0ea1['run']({'options':{..._0xab7db5,..._0x2e8ef5},'args':[_0x1c1373],'tdx':_0x5da5f8});process['exit'](_0x127a48);}),program[a0_0x5061e8(0x165)](a0_0x5061e8(0x124))[a0_0x5061e8(0x197)](a0_0x5061e8(0x198))['option']('--status\x20<status>',a0_0x5061e8(0x213))[a0_0x5061e8(0x15c)](async _0xf82cb4=>{const _0x17c958=a0_0x5061e8,_0x53abc6=new JobListCommand(),_0x4d3e04=program['opts'](),_0x55a230=createTDXInstance(_0x4d3e04),_0x3b29ed=await _0x53abc6[_0x17c958(0x1f2)]({'options':{..._0x4d3e04,..._0xf82cb4},'args':[],'tdx':_0x55a230});process[_0x17c958(0x1db)](_0x3b29ed);});const jobCmd=program[a0_0x5061e8(0x165)](a0_0x5061e8(0x1d6))['description'](a0_0x5061e8(0x18b));jobCmd['command'](a0_0x5061e8(0x1a9))[a0_0x5061e8(0x197)](a0_0x5061e8(0x148))[a0_0x5061e8(0x15c)](async(_0x557ccf,_0x2aeb97)=>{const _0xd47eb2=a0_0x5061e8,_0x4c03c8=new JobShowCommand(),_0x6c5b4c=program[_0xd47eb2(0x1d9)](),_0x73d720=createTDXInstance(_0x6c5b4c),_0x582378=await _0x4c03c8['run']({'options':{..._0x6c5b4c,..._0x2aeb97},'args':[_0x557ccf],'tdx':_0x73d720});process['exit'](_0x582378);}),jobCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x158))[a0_0x5061e8(0x197)](a0_0x5061e8(0x10a))[a0_0x5061e8(0x15c)](async(_0x523dce,_0x4d2a0e)=>{const _0x1dd500=a0_0x5061e8,_0xed70ee=new JobKillCommand(),_0x1c835d=program['opts'](),_0x20005e=createTDXInstance(_0x1c835d),_0x54781f=await _0xed70ee[_0x1dd500(0x1f2)]({'options':{..._0x1c835d,..._0x4d2a0e},'args':[_0x523dce],'tdx':_0x20005e});process[_0x1dd500(0x1db)](_0x54781f);}),jobCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x1ed))[a0_0x5061e8(0x197)](a0_0x5061e8(0x224))[a0_0x5061e8(0x1c4)]('--job-type\x20<type>',a0_0x5061e8(0x109),a0_0x5061e8(0x190))[a0_0x5061e8(0x1c4)]('-f,\x20--file\x20<path>',a0_0x5061e8(0x1fe))[a0_0x5061e8(0x1c4)]('--database\x20<name>',a0_0x5061e8(0xff),'information_schema')[a0_0x5061e8(0x15c)](async(_0x5f2502,_0x29d15c)=>{const _0x5a831b=a0_0x5061e8,_0x58d083=new JobSubmitCommand(),_0x4f9569=program[_0x5a831b(0x1d9)](),_0x505748=createTDXInstance(_0x4f9569),_0x20cbc4=await _0x58d083['run']({'options':{..._0x4f9569,..._0x29d15c},'args':_0x5f2502?[_0x5f2502]:[],'tdx':_0x505748});process[_0x5a831b(0x1db)](_0x20cbc4);}),jobCmd[a0_0x5061e8(0x165)]('result\x20<job-id>')[a0_0x5061e8(0x197)]('Get\x20job\x20results')[a0_0x5061e8(0x15c)](async(_0x462439,_0x44b559)=>{const _0x2b769c=a0_0x5061e8,_0x574990=new JobResultCommand(),_0x247b6d=program[_0x2b769c(0x1d9)](),_0x335685=createTDXInstance(_0x247b6d),_0x92c547=await _0x574990[_0x2b769c(0x1f2)]({'options':{..._0x247b6d,..._0x44b559},'args':[_0x462439],'tdx':_0x335685});process['exit'](_0x92c547);});const llmCmd=program[a0_0x5061e8(0x165)](a0_0x5061e8(0x1f7))[a0_0x5061e8(0x197)]('LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)');llmCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x20e))[a0_0x5061e8(0x197)](a0_0x5061e8(0x16d))[a0_0x5061e8(0x15c)](async(_0x485c9c,_0x19128a)=>{const _0x2af6c8=a0_0x5061e8,_0x3439c0=new LLMUseCommand(),_0x48bc3c=program[_0x2af6c8(0x1d9)](),_0x501f80=createTDXInstance(_0x48bc3c),_0x3271e1=await _0x3439c0[_0x2af6c8(0x1f2)]({'options':{..._0x48bc3c,..._0x19128a},'args':[_0x485c9c],'tdx':_0x501f80});process['exit'](_0x3271e1);}),llmCmd['command']('models')[a0_0x5061e8(0x197)](a0_0x5061e8(0x101))['action'](async _0x57a670=>{const _0x26cdc4=a0_0x5061e8,_0x2e554c=new LLMModelsCommand(),_0x2085d1=program['opts'](),_0x40ae78=createTDXInstance(_0x2085d1),_0x9407f5=await _0x2e554c[_0x26cdc4(0x1f2)]({'options':{..._0x2085d1,..._0x57a670},'args':[],'tdx':_0x40ae78});process[_0x26cdc4(0x1db)](_0x9407f5);}),llmCmd['command'](a0_0x5061e8(0xfc))[a0_0x5061e8(0x197)](a0_0x5061e8(0x17b))['action'](async(_0x34d5d2,_0x5dfcd0)=>{const _0x543a36=a0_0x5061e8,_0xef2696=new LLMProjectsCommand(),_0x42dded=program['opts'](),_0x450e59=createTDXInstance(_0x42dded),_0x15396f=await _0xef2696[_0x543a36(0x1f2)]({'options':{..._0x42dded,..._0x5dfcd0},'args':_0x34d5d2?[_0x34d5d2]:[],'tdx':_0x450e59});process[_0x543a36(0x1db)](_0x15396f);});const projectCmd=llmCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x126))[a0_0x5061e8(0x197)]('LLM\x20project\x20management');projectCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x10c))[a0_0x5061e8(0x197)]('Create\x20a\x20new\x20LLM\x20project')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1b2),a0_0x5061e8(0x134))['action'](async(_0x2643bd,_0x519f13)=>{const _0x5d46e0=a0_0x5061e8,_0x292739=new LLMProjectCreateCommand(),_0x39c3f8=program[_0x5d46e0(0x1d9)](),_0x4fefea=createTDXInstance(_0x39c3f8),_0x2a85eb=await _0x292739[_0x5d46e0(0x1f2)]({'options':{..._0x39c3f8,..._0x519f13},'args':[_0x2643bd],'tdx':_0x4fefea});process[_0x5d46e0(0x1db)](_0x2a85eb);}),projectCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x149))[a0_0x5061e8(0x197)](a0_0x5061e8(0x199))['action'](async(_0x9e7bbb,_0x1c3c0c)=>{const _0x2e5e59=a0_0x5061e8,_0x30a52b=new LLMProjectDeleteCommand(),_0x20bd56=program['opts'](),_0x2f5d83=createTDXInstance(_0x20bd56),_0x509de5=await _0x30a52b[_0x2e5e59(0x1f2)]({'options':{..._0x20bd56,..._0x1c3c0c},'args':[_0x9e7bbb],'tdx':_0x2f5d83});process['exit'](_0x509de5);}),llmCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x1c9))[a0_0x5061e8(0x197)](a0_0x5061e8(0x127))['action'](async(_0x110b32,_0x49fd47)=>{const _0x20c073=a0_0x5061e8,_0x25ff7d=new LLMAgentsCommand(),_0x21c95d=program['opts'](),_0x1790b2=createTDXInstance(_0x21c95d),_0x1dce05=await _0x25ff7d[_0x20c073(0x1f2)]({'options':{..._0x21c95d,..._0x49fd47},'args':_0x110b32?[_0x110b32]:[],'tdx':_0x1790b2});process[_0x20c073(0x1db)](_0x1dce05);});const agentCmd=llmCmd[a0_0x5061e8(0x165)]('agent')[a0_0x5061e8(0x197)]('LLM\x20agent\x20management');agentCmd['command'](a0_0x5061e8(0x115))[a0_0x5061e8(0x197)](a0_0x5061e8(0x145))[a0_0x5061e8(0x15c)](async(_0x3e7f63,_0x2ee8e9)=>{const _0x11a650=a0_0x5061e8,_0x1fe21f=new LLMAgentShowCommand(),_0x429f3e=program[_0x11a650(0x1d9)](),_0x5d11cb=createTDXInstance(_0x429f3e),_0x57e49=await _0x1fe21f[_0x11a650(0x1f2)]({'options':{..._0x429f3e,..._0x2ee8e9},'args':[_0x3e7f63],'tdx':_0x5d11cb});process['exit'](_0x57e49);}),agentCmd['command'](a0_0x5061e8(0x10c))[a0_0x5061e8(0x197)]('Create\x20a\x20new\x20agent\x20in\x20current\x20project')[a0_0x5061e8(0x1c4)]('--system-prompt\x20<text>',a0_0x5061e8(0x1e6))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1f1),a0_0x5061e8(0x170),'claude-4.5-sonnet')[a0_0x5061e8(0x1c4)]('--starter-message\x20<text>','Starter\x20message')['option'](a0_0x5061e8(0x209),a0_0x5061e8(0x14f),'4')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1c3),a0_0x5061e8(0x162),a0_0x5061e8(0x214))['action'](async(_0x116ba0,_0x212d79)=>{const _0x3e66b9=a0_0x5061e8,_0xdfaa7=new LLMAgentCreateCommand(),_0x120e3d=program[_0x3e66b9(0x1d9)](),_0x2a17f3=createTDXInstance(_0x120e3d),_0xa99682=await _0xdfaa7[_0x3e66b9(0x1f2)]({'options':{..._0x120e3d,..._0x212d79},'args':[_0x116ba0],'tdx':_0x2a17f3});process['exit'](_0xa99682);}),agentCmd[a0_0x5061e8(0x165)]('update\x20<agent-name>')[a0_0x5061e8(0x197)](a0_0x5061e8(0x1e2))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x10b),a0_0x5061e8(0x129))[a0_0x5061e8(0x1c4)]('--prompt\x20<text>',a0_0x5061e8(0x237))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1b2),a0_0x5061e8(0x17a))['option'](a0_0x5061e8(0x121),'Starter\x20message')[a0_0x5061e8(0x15c)](async(_0x14390f,_0x2f9068)=>{const _0x3ccdb4=a0_0x5061e8,_0x480eb7=new LLMAgentUpdateCommand(),_0xbe9b2c=program['opts'](),_0x1c4b90=createTDXInstance(_0xbe9b2c),_0x4c44bb=await _0x480eb7[_0x3ccdb4(0x1f2)]({'options':{..._0xbe9b2c,..._0x2f9068},'args':[_0x14390f],'tdx':_0x1c4b90});process[_0x3ccdb4(0x1db)](_0x4c44bb);}),agentCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x173))[a0_0x5061e8(0x197)](a0_0x5061e8(0x231))[a0_0x5061e8(0x15c)](async(_0x24146f,_0x14c5f0)=>{const _0x53e63c=a0_0x5061e8,_0x183547=new LLMAgentDeleteCommand(),_0xe9cfb5=program[_0x53e63c(0x1d9)](),_0xa8d9db=createTDXInstance(_0xe9cfb5),_0x417351=await _0x183547[_0x53e63c(0x1f2)]({'options':{..._0xe9cfb5,..._0x14c5f0},'args':[_0x24146f],'tdx':_0xa8d9db});process[_0x53e63c(0x1db)](_0x417351);}),llmCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x140))[a0_0x5061e8(0x197)](a0_0x5061e8(0x1c6))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1a6),a0_0x5061e8(0x1c5))[a0_0x5061e8(0x15c)](async(_0x1b7043,_0x157a72)=>{const _0x2198e5=a0_0x5061e8,_0x486563=new LLMHistoryCommand(),_0xe3c32c=program['opts'](),_0x49d4b5=createTDXInstance(_0xe3c32c),_0x276597=await _0x486563[_0x2198e5(0x1f2)]({'options':{..._0xe3c32c,..._0x157a72},'args':_0x1b7043?[_0x1b7043]:[],'tdx':_0x49d4b5});process['exit'](_0x276597);}),llmCmd[a0_0x5061e8(0x165)](a0_0x5061e8(0x17c))[a0_0x5061e8(0x197)]('[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)')[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x11e),a0_0x5061e8(0x156),a0_0x5061e8(0x212))['option'](a0_0x5061e8(0x155),a0_0x5061e8(0x141))[a0_0x5061e8(0x1c4)](a0_0x5061e8(0x1d4),a0_0x5061e8(0x225))['action'](async _0x37f5be=>{const _0x543ac4=a0_0x5061e8,_0x4ab7ee=new LLMProxyCommand(),_0x5c3906=program['opts'](),_0x8302b4=createTDXInstance(_0x5c3906),_0x4ec564={..._0x37f5be,'port':_0x37f5be[_0x543ac4(0x18e)]?parseInt(_0x37f5be[_0x543ac4(0x18e)],0xa):undefined},_0x531cbf=await _0x4ab7ee['run']({'options':{..._0x5c3906,..._0x4ec564},'args':[],'tdx':_0x8302b4});process[_0x543ac4(0x1db)](_0x531cbf);}),program[a0_0x5061e8(0x165)](a0_0x5061e8(0x147))['description']('Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)')['option'](a0_0x5061e8(0x1f1),a0_0x5061e8(0x204),a0_0x5061e8(0x210))['allowUnknownOption']()[a0_0x5061e8(0x106)](!![])[a0_0x5061e8(0x15c)](async(_0xf68878,_0x53bac5)=>{const _0x45ba8e=a0_0x5061e8,_0x14d4ab=new ClaudeCommand(),_0x4610dd=program[_0x45ba8e(0x1d9)](),_0x215525=createTDXInstance(_0x4610dd),_0x307e1e=Array[_0x45ba8e(0x12d)](_0xf68878)?_0xf68878:[],_0x6cda85=await _0x14d4ab['run']({'options':{..._0x4610dd,..._0x53bac5},'args':_0x307e1e,'tdx':_0x215525});process['exit'](_0x6cda85);}),program['command'](a0_0x5061e8(0x19b))['description'](a0_0x5061e8(0x16a))['option'](a0_0x5061e8(0x116),'Clear\x20session\x20context')[a0_0x5061e8(0x15c)](async _0x1a08ea=>{const _0x1905f0=a0_0x5061e8,_0x4d5c41=new ContextCommand(),_0x38318e=program[_0x1905f0(0x1d9)](),_0x31c54a=await _0x4d5c41[_0x1905f0(0x1f2)]({'options':{..._0x38318e,..._0x1a08ea},'args':[],'tdx':null});process[_0x1905f0(0x1db)](_0x31c54a);}),program[a0_0x5061e8(0x165)]('use\x20[resource]\x20[value]')['description'](a0_0x5061e8(0x18c))[a0_0x5061e8(0x15c)](async(_0x15d726,_0x1ef823,_0x554340)=>{const _0x298838=a0_0x5061e8,_0x34bb15=new UseCommand(),_0x478813=program[_0x298838(0x1d9)](),_0x1db5b3=[];if(_0x15d726)_0x1db5b3['push'](_0x15d726);if(_0x1ef823)_0x1db5b3[_0x298838(0x146)](_0x1ef823);const _0x29d0e0=await _0x34bb15['run']({'options':{..._0x478813,..._0x554340},'args':_0x1db5b3,'tdx':null});process[_0x298838(0x1db)](_0x29d0e0);}),program[a0_0x5061e8(0x165)]('profiles')[a0_0x5061e8(0x197)](a0_0x5061e8(0x216))[a0_0x5061e8(0x15c)](async _0xf11159=>{const _0x4189fc=a0_0x5061e8,_0x43af5b=new ProfilesCommand(),_0x27f572=program[_0x4189fc(0x1d9)](),_0xc46ad=await _0x43af5b['run']({'options':{..._0x27f572,..._0xf11159},'args':[],'tdx':null});process[_0x4189fc(0x1db)](_0xc46ad);}),program[a0_0x5061e8(0x1aa)](process[a0_0x5061e8(0x1b0)]);!process[a0_0x5061e8(0x1b0)][a0_0x5061e8(0x111)](0x2)[a0_0x5061e8(0x1a7)]&&program[a0_0x5061e8(0x21f)]();const currentVersion=packageJson[a0_0x5061e8(0x10f)];process['stderr'][a0_0x5061e8(0x195)]&&process['argv'][a0_0x5061e8(0x1a7)]>0x2&&!currentVersion[a0_0x5061e8(0x1ea)](a0_0x5061e8(0x1da))&&checkForUpdate(currentVersion)[a0_0x5061e8(0x130)](_0x1eca43=>{_0x1eca43&&displayUpdateNotification(_0x1eca43);})['catch'](()=>{});
@@ -1 +1 @@
1
- const a1_0x1435cc=a1_0x582f;(function(_0x541504,_0x1cb0b7){const _0x33ef5=a1_0x582f,_0x2dc059=_0x541504();while(!![]){try{const _0x4e9187=parseInt(_0x33ef5(0xec))/0x1+parseInt(_0x33ef5(0xd1))/0x2*(-parseInt(_0x33ef5(0xcf))/0x3)+parseInt(_0x33ef5(0xca))/0x4*(-parseInt(_0x33ef5(0xce))/0x5)+-parseInt(_0x33ef5(0xcb))/0x6+-parseInt(_0x33ef5(0xf1))/0x7*(parseInt(_0x33ef5(0xcc))/0x8)+parseInt(_0x33ef5(0xf7))/0x9*(-parseInt(_0x33ef5(0xf5))/0xa)+parseInt(_0x33ef5(0xc5))/0xb;if(_0x4e9187===_0x1cb0b7)break;else _0x2dc059['push'](_0x2dc059['shift']());}catch(_0x5d75a4){_0x2dc059['push'](_0x2dc059['shift']());}}}(a1_0x599c,0xaf3cd));function a1_0x599c(){const _0x753752=['audienceId','getParentSegmentSQL','/entities/folders/','updatedAt','name','apiKey','updateSegment','getSegmentFolder','application/vnd.treasuredata.v1+json','PUT','/segments/','parentFolderId','/entities/parent_segments','getParentSegment','listParentSegments','/folders','getParentSegmentFull','/syndications','site','listSegmentFolders','/segments/query','1417201EhDZhX','GET','request','query','data','287IQHjqr','createParentSegment','listSegments','isArray','10AveLqS','rule','6044967chUAto','createSegmentFolder','/segments','getSegmentSQL','38384203TbuajH','/audiences','httpClient','POST','/entities/parent_segments/','4UYScRk','8293596wBZLFT','70696sChSWs','updateParentSegment','4144145RvGjlh','108903NfpdCb','authHeaders','52vsXJYa','createSegment','/audiences/','sql','application/json','getSegment'];a1_0x599c=function(){return _0x753752;};return a1_0x599c();}function a1_0x582f(_0x4b6c9c,_0x3a0890){const _0x599cb2=a1_0x599c();return a1_0x582f=function(_0x582fac,_0x469a02){_0x582fac=_0x582fac-0xc5;let _0x1efc7d=_0x599cb2[_0x582fac];return _0x1efc7d;},a1_0x582f(_0x4b6c9c,_0x3a0890);}import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class CDPClient{[a1_0x1435cc(0xc7)];[a1_0x1435cc(0xd0)];constructor(_0x131f91,_0x3136b0){const _0x4f6aa6=a1_0x1435cc,_0x7f36f2=getEndpoint(_0x131f91[_0x4f6aa6(0xe9)],'cdp');this[_0x4f6aa6(0xd0)]=toHeaderRecord(getAuthHeaders(_0x131f91[_0x4f6aa6(0xe9)],_0x131f91[_0x4f6aa6(0xdc)])),this['httpClient']=new HTTPClient(_0x7f36f2,{...this[_0x4f6aa6(0xd0)],'Accept':_0x4f6aa6(0xdf),'Content-Type':_0x4f6aa6(0xd5)},_0x3136b0);}async[a1_0x1435cc(0xe5)](){const _0x3372ea=a1_0x1435cc,_0x455f8e=_0x3372ea(0xe3),_0x3e62e0=await this[_0x3372ea(0xc7)][_0x3372ea(0xee)](_0x3372ea(0xed),_0x455f8e);return Array[_0x3372ea(0xf4)](_0x3e62e0)?_0x3e62e0:_0x3e62e0['data'];}async[a1_0x1435cc(0xe4)](_0x24fd08){const _0x5ae948=a1_0x1435cc,_0x4f0039=_0x5ae948(0xc9)+_0x24fd08,_0x478899=await this[_0x5ae948(0xc7)][_0x5ae948(0xee)](_0x5ae948(0xed),_0x4f0039);return _0x5ae948(0xf0)in _0x478899?_0x478899['data']:_0x478899;}async[a1_0x1435cc(0xf3)](_0x302c62){const _0x17abfc=a1_0x1435cc,_0x1cb433=_0x17abfc(0xd3)+_0x302c62+_0x17abfc(0xf9),_0x4c4984=await this[_0x17abfc(0xc7)][_0x17abfc(0xee)](_0x17abfc(0xed),_0x1cb433);return Array[_0x17abfc(0xf4)](_0x4c4984)?_0x4c4984:_0x4c4984['data'];}async[a1_0x1435cc(0xd6)](_0x38ec31,_0x356896){const _0x568774=a1_0x1435cc,_0xfe7808=_0x568774(0xd3)+_0x38ec31+_0x568774(0xe1)+_0x356896,_0x10b70f=await this[_0x568774(0xc7)]['request'](_0x568774(0xed),_0xfe7808);return _0x568774(0xf0)in _0x10b70f?_0x10b70f[_0x568774(0xf0)]:_0x10b70f;}async[a1_0x1435cc(0xea)](_0x115568){const _0x30dcbe=a1_0x1435cc,_0x1de829=_0x30dcbe(0xd3)+_0x115568+_0x30dcbe(0xe6),_0x4f3e45=await this['httpClient'][_0x30dcbe(0xee)]('GET',_0x1de829);return Array['isArray'](_0x4f3e45)?_0x4f3e45:_0x4f3e45[_0x30dcbe(0xf0)];}async[a1_0x1435cc(0xde)](_0x3e88f4){const _0x7e435e=a1_0x1435cc,_0x4ad139=_0x7e435e(0xd9)+_0x3e88f4,_0xdc0350=await this[_0x7e435e(0xc7)][_0x7e435e(0xee)](_0x7e435e(0xed),_0x4ad139);return _0x7e435e(0xf0)in _0xdc0350?_0xdc0350[_0x7e435e(0xf0)]:_0xdc0350;}async['listActivations'](_0x29a9eb,_0x8c05f1){const _0x4c505e=a1_0x1435cc,_0x56fbf8=_0x4c505e(0xd3)+_0x29a9eb+_0x4c505e(0xe1)+_0x8c05f1+_0x4c505e(0xe8),_0x4f13e0=await this[_0x4c505e(0xc7)][_0x4c505e(0xee)]('GET',_0x56fbf8);return Array[_0x4c505e(0xf4)](_0x4f13e0)?_0x4f13e0:_0x4f13e0['data'];}async[a1_0x1435cc(0xd8)](_0xe4bb14){const _0xd66f98=a1_0x1435cc,_0x8ee97b=_0xd66f98(0xd3)+_0xe4bb14+'/segments/query',_0x32f822=await this[_0xd66f98(0xc7)][_0xd66f98(0xee)](_0xd66f98(0xc8),_0x8ee97b,{'body':{'format':'sql'}});return _0x32f822[_0xd66f98(0xd4)]||_0x32f822[_0xd66f98(0xef)]||'';}async[a1_0x1435cc(0xfa)](_0x2e0ab9,_0x129070){const _0x3ab8e4=a1_0x1435cc,_0x377059=await this[_0x3ab8e4(0xd6)](_0x2e0ab9,_0x129070),_0x236497={'format':_0x3ab8e4(0xd4)};_0x3ab8e4(0xf6)in _0x377059&&_0x377059[_0x3ab8e4(0xf6)]&&(_0x236497[_0x3ab8e4(0xf6)]=_0x377059['rule']);const _0x3aef6b=_0x3ab8e4(0xd3)+_0x2e0ab9+_0x3ab8e4(0xeb),_0x313c1c=await this[_0x3ab8e4(0xc7)][_0x3ab8e4(0xee)](_0x3ab8e4(0xc8),_0x3aef6b,{'body':_0x236497});return _0x313c1c[_0x3ab8e4(0xd4)]||_0x313c1c[_0x3ab8e4(0xef)]||'';}async[a1_0x1435cc(0xf2)](_0x1a51d6){const _0x28ef8a=a1_0x1435cc,_0x301903=_0x28ef8a(0xc6),_0x566826=await this[_0x28ef8a(0xc7)][_0x28ef8a(0xee)](_0x28ef8a(0xc8),_0x301903,{'body':_0x1a51d6,'headers':{'Content-Type':_0x28ef8a(0xdf)}});return _0x566826;}async[a1_0x1435cc(0xcd)](_0x26c0e0,_0x38fe90){const _0xeb08ef=a1_0x1435cc,_0x5460ed=_0xeb08ef(0xd3)+_0x26c0e0,_0x34075b=await this[_0xeb08ef(0xc7)][_0xeb08ef(0xee)](_0xeb08ef(0xe0),_0x5460ed,{'body':_0x38fe90,'headers':{'Content-Type':'application/vnd.treasuredata.v1+json'}});return _0x34075b;}async[a1_0x1435cc(0xe7)](_0x4f81b7){const _0x1453ee=a1_0x1435cc,_0x2b005e=_0x1453ee(0xd3)+_0x4f81b7,_0x47bf75=await this[_0x1453ee(0xc7)][_0x1453ee(0xee)]('GET',_0x2b005e,{'headers':{'Accept':_0x1453ee(0xdf)}});return _0x47bf75;}async[a1_0x1435cc(0xd2)](_0x1840e6,_0x56ed43){const _0x462649=a1_0x1435cc,_0x329271=_0x462649(0xd3)+_0x1840e6+_0x462649(0xf9),_0x288140=await this[_0x462649(0xc7)][_0x462649(0xee)](_0x462649(0xc8),_0x329271,{'body':_0x56ed43});return _0x288140;}async[a1_0x1435cc(0xdd)](_0x44ab09,_0x5b165c,_0x1bdfd5){const _0x4db11e=a1_0x1435cc,_0x2850fc=_0x4db11e(0xd3)+_0x44ab09+_0x4db11e(0xe1)+_0x5b165c,_0x4f3883=await this[_0x4db11e(0xc7)][_0x4db11e(0xee)](_0x4db11e(0xe0),_0x2850fc,{'body':_0x1bdfd5});return _0x4f3883;}async[a1_0x1435cc(0xf8)](_0xd5e5fd,_0x313151){const _0x1b8c4c=a1_0x1435cc,_0x1c280f=_0x1b8c4c(0xd3)+_0xd5e5fd+_0x1b8c4c(0xe6),_0x3b3ee8=await this[_0x1b8c4c(0xc7)]['request'](_0x1b8c4c(0xc8),_0x1c280f,{'body':_0x313151});if(_0x1b8c4c(0xf0)in _0x3b3ee8&&_0x3b3ee8[_0x1b8c4c(0xf0)]){const _0x44da9c=_0x3b3ee8['data'];return{'id':_0x44da9c['id'],'name':_0x44da9c[_0x1b8c4c(0xdb)],'description':_0x44da9c['description'],'audienceId':_0x44da9c[_0x1b8c4c(0xd7)]||String(_0xd5e5fd),'parentFolderId':_0x44da9c[_0x1b8c4c(0xe2)],'createdAt':_0x44da9c['createdAt'],'updatedAt':_0x44da9c[_0x1b8c4c(0xda)]};}return _0x3b3ee8;}}
1
+ function a1_0x2ea2(_0x396548,_0x4539b5){const _0x31188a=a1_0x3118();return a1_0x2ea2=function(_0x2ea2e5,_0x3760cc){_0x2ea2e5=_0x2ea2e5-0x6b;let _0x583c6b=_0x31188a[_0x2ea2e5];return _0x583c6b;},a1_0x2ea2(_0x396548,_0x4539b5);}const a1_0x2d43f0=a1_0x2ea2;function a1_0x3118(){const _0x4d5b5a=['request','createdAt','getSegmentSQL','1627572UVEQcz','authHeaders','getParentSegmentSQL','/syndications','/entities/parent_segments/','listSegmentFolders','query','1177719RGyWOF','data','/audiences','createSegmentFolder','getParentSegment','isArray','8663967fBsKxH','PUT','listActivations','application/json','/folders','httpClient','1122318OXkwFb','/audiences/','cdp','8FdyFkO','251977lzvbug','rule','getSegmentFolder','getParentSegmentFull','sql','714680QyyRgk','description','name','POST','/entities/folders/','apiKey','660585KflXjQ','application/vnd.treasuredata.v1+json','GET','updatedAt','/segments','/segments/','site','getSegment','7vwHzDD'];a1_0x3118=function(){return _0x4d5b5a;};return a1_0x3118();}(function(_0x3dd5f6,_0x35ac51){const _0x5485ce=a1_0x2ea2,_0x38acd6=_0x3dd5f6();while(!![]){try{const _0x478695=parseInt(_0x5485ce(0x88))/0x1+parseInt(_0x5485ce(0x71))/0x2+parseInt(_0x5485ce(0x78))/0x3+parseInt(_0x5485ce(0x87))/0x4*(-parseInt(_0x5485ce(0x93))/0x5)+parseInt(_0x5485ce(0x84))/0x6*(parseInt(_0x5485ce(0x6d))/0x7)+parseInt(_0x5485ce(0x8d))/0x8+-parseInt(_0x5485ce(0x7e))/0x9;if(_0x478695===_0x35ac51)break;else _0x38acd6['push'](_0x38acd6['shift']());}catch(_0x2e3a89){_0x38acd6['push'](_0x38acd6['shift']());}}}(a1_0x3118,0x7bfb3));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class CDPClient{[a1_0x2d43f0(0x83)];[a1_0x2d43f0(0x72)];constructor(_0x3ceac7,_0x431601){const _0x4e9a40=a1_0x2d43f0,_0x1e28b6=getEndpoint(_0x3ceac7[_0x4e9a40(0x6b)],_0x4e9a40(0x86));this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x3ceac7['site'],_0x3ceac7[_0x4e9a40(0x92)])),this[_0x4e9a40(0x83)]=new HTTPClient(_0x1e28b6,{...this[_0x4e9a40(0x72)],'Accept':_0x4e9a40(0x94),'Content-Type':_0x4e9a40(0x81)},_0x431601);}async['listParentSegments'](){const _0x313d45=a1_0x2d43f0,_0x519d18='/entities/parent_segments',_0x26238e=await this[_0x313d45(0x83)][_0x313d45(0x6e)](_0x313d45(0x95),_0x519d18);return Array[_0x313d45(0x7d)](_0x26238e)?_0x26238e:_0x26238e[_0x313d45(0x79)];}async[a1_0x2d43f0(0x7c)](_0x31ffd6){const _0x22eead=a1_0x2d43f0,_0x358419=_0x22eead(0x75)+_0x31ffd6,_0x11d12e=await this['httpClient'][_0x22eead(0x6e)](_0x22eead(0x95),_0x358419);return'data'in _0x11d12e?_0x11d12e[_0x22eead(0x79)]:_0x11d12e;}async['listSegments'](_0x36479e){const _0x4cc373=a1_0x2d43f0,_0x5bb48b=_0x4cc373(0x85)+_0x36479e+_0x4cc373(0x97),_0x59ae91=await this[_0x4cc373(0x83)][_0x4cc373(0x6e)](_0x4cc373(0x95),_0x5bb48b);return Array[_0x4cc373(0x7d)](_0x59ae91)?_0x59ae91:_0x59ae91['data'];}async[a1_0x2d43f0(0x6c)](_0x11ba09,_0x523761){const _0x571818=a1_0x2d43f0,_0x3572ed='/audiences/'+_0x11ba09+_0x571818(0x98)+_0x523761,_0x387916=await this[_0x571818(0x83)][_0x571818(0x6e)]('GET',_0x3572ed);return _0x571818(0x79)in _0x387916?_0x387916['data']:_0x387916;}async[a1_0x2d43f0(0x76)](_0x543975){const _0x3520bb=a1_0x2d43f0,_0x3b3098=_0x3520bb(0x85)+_0x543975+_0x3520bb(0x82),_0x5dc422=await this[_0x3520bb(0x83)][_0x3520bb(0x6e)]('GET',_0x3b3098);return Array[_0x3520bb(0x7d)](_0x5dc422)?_0x5dc422:_0x5dc422['data'];}async[a1_0x2d43f0(0x8a)](_0x25006f){const _0x1b7994=a1_0x2d43f0,_0x4671ce=_0x1b7994(0x91)+_0x25006f,_0x189660=await this[_0x1b7994(0x83)][_0x1b7994(0x6e)]('GET',_0x4671ce);return'data'in _0x189660?_0x189660[_0x1b7994(0x79)]:_0x189660;}async[a1_0x2d43f0(0x80)](_0x39d1a8,_0x430115){const _0x82abc6=a1_0x2d43f0,_0x43b305='/audiences/'+_0x39d1a8+_0x82abc6(0x98)+_0x430115+_0x82abc6(0x74),_0x466a44=await this['httpClient']['request']('GET',_0x43b305);return Array[_0x82abc6(0x7d)](_0x466a44)?_0x466a44:_0x466a44[_0x82abc6(0x79)];}async[a1_0x2d43f0(0x73)](_0x3180be){const _0x2214cb=a1_0x2d43f0,_0xa12229=_0x2214cb(0x85)+_0x3180be+'/segments/query',_0x2b94ce=await this[_0x2214cb(0x83)][_0x2214cb(0x6e)]('POST',_0xa12229,{'body':{'format':_0x2214cb(0x8c)}});return _0x2b94ce[_0x2214cb(0x8c)]||_0x2b94ce[_0x2214cb(0x77)]||'';}async[a1_0x2d43f0(0x70)](_0x3d03a9,_0x13599f){const _0x16e955=a1_0x2d43f0,_0x10e3e1=await this[_0x16e955(0x6c)](_0x3d03a9,_0x13599f),_0x452472={'format':_0x16e955(0x8c)};_0x16e955(0x89)in _0x10e3e1&&_0x10e3e1['rule']&&(_0x452472[_0x16e955(0x89)]=_0x10e3e1[_0x16e955(0x89)]);const _0x5d112e='/audiences/'+_0x3d03a9+'/segments/query',_0x45df60=await this[_0x16e955(0x83)]['request'](_0x16e955(0x90),_0x5d112e,{'body':_0x452472});return _0x45df60[_0x16e955(0x8c)]||_0x45df60['query']||'';}async['createParentSegment'](_0x4f78d9){const _0x5f0bf6=a1_0x2d43f0,_0x72668f=_0x5f0bf6(0x7a),_0x53af95=await this['httpClient'][_0x5f0bf6(0x6e)]('POST',_0x72668f,{'body':_0x4f78d9,'headers':{'Content-Type':_0x5f0bf6(0x94)}});return _0x53af95;}async['updateParentSegment'](_0x3365f0,_0x73085b){const _0x5ae6b3=a1_0x2d43f0,_0x99e973=_0x5ae6b3(0x85)+_0x3365f0,_0x42082b=await this['httpClient'][_0x5ae6b3(0x6e)](_0x5ae6b3(0x7f),_0x99e973,{'body':_0x73085b,'headers':{'Content-Type':'application/vnd.treasuredata.v1+json'}});return _0x42082b;}async[a1_0x2d43f0(0x8b)](_0xec3781){const _0x1e7090=a1_0x2d43f0,_0x5f503f=_0x1e7090(0x85)+_0xec3781,_0x3ed4be=await this[_0x1e7090(0x83)][_0x1e7090(0x6e)](_0x1e7090(0x95),_0x5f503f,{'headers':{'Accept':_0x1e7090(0x94)}});return _0x3ed4be;}async['createSegment'](_0x2fbe3e,_0x453eb9){const _0x230289=a1_0x2d43f0,_0x5c05a2=_0x230289(0x85)+_0x2fbe3e+_0x230289(0x97),_0x3c832b=await this[_0x230289(0x83)]['request']('POST',_0x5c05a2,{'body':_0x453eb9});return _0x3c832b;}async['updateSegment'](_0x22423d,_0x2978dd,_0x501c21){const _0x535cf2=a1_0x2d43f0,_0x176c95=_0x535cf2(0x85)+_0x22423d+_0x535cf2(0x98)+_0x2978dd,_0x12dd01=await this['httpClient'][_0x535cf2(0x6e)](_0x535cf2(0x7f),_0x176c95,{'body':_0x501c21});return _0x12dd01;}async[a1_0x2d43f0(0x7b)](_0x2f4622,_0x5932c2){const _0x2fa672=a1_0x2d43f0,_0x50b3db=_0x2fa672(0x85)+_0x2f4622+_0x2fa672(0x82),_0x34c064=await this['httpClient'][_0x2fa672(0x6e)](_0x2fa672(0x90),_0x50b3db,{'body':_0x5932c2});if(_0x2fa672(0x79)in _0x34c064&&_0x34c064['data']){const _0x1112e6=_0x34c064[_0x2fa672(0x79)];return{'id':_0x1112e6['id'],'name':_0x1112e6[_0x2fa672(0x8f)],'description':_0x1112e6[_0x2fa672(0x8e)],'audienceId':_0x1112e6['audienceId']||String(_0x2f4622),'parentFolderId':_0x1112e6['parentFolderId'],'createdAt':_0x1112e6[_0x2fa672(0x6f)],'updatedAt':_0x1112e6[_0x2fa672(0x96)]};}return _0x34c064;}}
@@ -1 +1 @@
1
- const a2_0x193129=a2_0x514b;(function(_0x2bb6d6,_0x169270){const _0x22ee1a=a2_0x514b,_0x443d5c=_0x2bb6d6();while(!![]){try{const _0x501bc2=-parseInt(_0x22ee1a(0xfc))/0x1+-parseInt(_0x22ee1a(0xd9))/0x2*(-parseInt(_0x22ee1a(0xeb))/0x3)+parseInt(_0x22ee1a(0x10d))/0x4+-parseInt(_0x22ee1a(0x112))/0x5+-parseInt(_0x22ee1a(0x108))/0x6*(-parseInt(_0x22ee1a(0x100))/0x7)+-parseInt(_0x22ee1a(0xe7))/0x8*(-parseInt(_0x22ee1a(0xe6))/0x9)+parseInt(_0x22ee1a(0xed))/0xa*(-parseInt(_0x22ee1a(0xfe))/0xb);if(_0x501bc2===_0x169270)break;else _0x443d5c['push'](_0x443d5c['shift']());}catch(_0x3fb5b1){_0x443d5c['push'](_0x443d5c['shift']());}}}(a2_0x26e0,0x844c9));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x14cdfd from'json-bigint';function a2_0x26e0(){const _0x555fb9=['arraybuffer','code','name',']:\x20','pow','498WbUfWr','arrayBuffer','\x20failed:\x20',']\x20Request\x20to\x20','status','4196720atsuAZ','headers','HTTP_REQUEST_FAILURE','combineSignals','aborted','781845vILQeg','\x0a\x20\x20URL:\x20','safeParseJSON','retryConfig','instance','forEach','stringify','defaultHeaders','parseProblemDetails','problemDetails','text','trace','addEventListener','type','round','application/json','signal','about:blank','Request\x20cancelled\x20by\x20user','INTERNAL','ms...','string','\x0a\x20\x20Details:\x20','debug','Error','6vYGRMB','object','retrying\x20in\x20','RATE_LIMITED','PERMISSION_DENIED','warn',']\x20Request\x20failed\x20with\x20HTTP\x20','Retry-After','Request:\x20','baseUrl','logger','min','[Retry\x20','18UKLnMY','3556984OaZnVG','requestSSE','parse','baseDelay','499935ofKtof','sleep','20WwqjOV','from','title','An\x20error\x20occurred','maxDelay','statusText','HTTP\x20','detail','Response\x20[','Content-Type','random','abort','get','AbortError','request','928894cvYwps','json','5546706oKybfB','message','16639oeIglF',']\x20Request\x20failed\x20with\x20','body'];a2_0x26e0=function(){return _0x555fb9;};return a2_0x26e0();}const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function a2_0x514b(_0x35e2f,_0x2a08b8){const _0x26e08e=a2_0x26e0();return a2_0x514b=function(_0x514b15,_0x34c69c){_0x514b15=_0x514b15-0xd0;let _0x686da0=_0x26e08e[_0x514b15];return _0x686da0;},a2_0x514b(_0x35e2f,_0x2a08b8);}function isRetryableError(_0x9c03cd){return _0x9c03cd>=0x1f4||_0x9c03cd===0x1ad;}function getRetryDelay(_0x2ad49d,_0x303cb7){const _0x393193=a2_0x514b,_0x2b6672=Math[_0x393193(0xe4)](_0x303cb7[_0x393193(0xea)]*Math[_0x393193(0x107)](0x2,_0x2ad49d),_0x303cb7[_0x393193(0xf1)]);return Math[_0x393193(0xf7)]()*_0x2b6672;}function statusCodeToErrorCode(_0xd43af1){const _0x23463a=a2_0x514b;if(_0xd43af1===0x191)return ErrorCode['UNAUTHENTICATED'];else{if(_0xd43af1===0x193)return ErrorCode[_0x23463a(0xdd)];else{if(_0xd43af1===0x194)return ErrorCode['NOT_FOUND'];else{if(_0xd43af1===0x1ad)return ErrorCode[_0x23463a(0xdc)];else return _0xd43af1>=0x1f4?ErrorCode['UNAVAILABLE']:ErrorCode['INVALID_ARGUMENT'];}}}}export class HTTPClientError extends Error{['status'];[a2_0x193129(0x11b)];[a2_0x193129(0x104)];constructor(_0x2a0141,_0x407828,_0x3fe4a9){const _0x471496=a2_0x193129,_0x21588e=statusCodeToErrorCode(_0x407828);super('['+_0x21588e+']\x20'+_0x2a0141),this[_0x471496(0x10c)]=_0x407828,this['problemDetails']=_0x3fe4a9,this[_0x471496(0x105)]='HTTPClientError',this[_0x471496(0x104)]=_0x21588e;}}export class HTTPClient{[a2_0x193129(0x115)];[a2_0x193129(0xe2)];[a2_0x193129(0x119)];[a2_0x193129(0xe3)];constructor(_0x412c25,_0x210e3e,_0x1e9f97,_0x261bc8){const _0x155d23=a2_0x193129;this['baseUrl']=_0x412c25,this[_0x155d23(0x119)]=_0x210e3e,this[_0x155d23(0x115)]={...DEFAULT_RETRY_CONFIG,..._0x261bc8},this[_0x155d23(0xe3)]=_0x1e9f97;}async[a2_0x193129(0xfb)](_0x2d1374,_0x438aea,_0x56c37a={}){const _0x4e5851=a2_0x193129,{headers:headers={},body:_0x59a32c,timeout:timeout=0x7530,retries:retries=this[_0x4e5851(0x115)]['maxRetries'],signal:_0x166341,includeHeaders:includeHeaders=![],responseType:responseType=_0x4e5851(0xfd)}=_0x56c37a,_0x3ab68b=''+this['baseUrl']+_0x438aea;this[_0x4e5851(0xe3)]['info'](_0x4e5851(0xe1)+_0x2d1374+'\x20'+_0x3ab68b);const _0x198bc1={...this[_0x4e5851(0x119)],...headers};if(_0x59a32c&&!_0x198bc1[_0x4e5851(0xf6)]){if(_0x59a32c instanceof Buffer){}else _0x198bc1['Content-Type']=_0x4e5851(0x121);}let _0x34adc6;_0x59a32c&&(_0x59a32c instanceof Buffer?_0x34adc6=_0x59a32c:_0x34adc6=typeof _0x59a32c===_0x4e5851(0xd5)?_0x59a32c:JSON[_0x4e5851(0x118)](_0x59a32c));let _0x968207=null;for(let _0x568872=0x0;_0x568872<=retries;_0x568872++){try{const _0x36a6ce=new AbortController(),_0x25a019=setTimeout(()=>_0x36a6ce[_0x4e5851(0xf8)](),timeout);if(_0x166341){if(_0x166341[_0x4e5851(0x111)])throw new Error(_0x4e5851(0xd2));_0x166341['addEventListener'](_0x4e5851(0xf8),()=>_0x36a6ce[_0x4e5851(0xf8)](),{'once':!![]});}const _0x1804ea=await fetch(_0x3ab68b,{'method':_0x2d1374,'headers':_0x198bc1,'body':_0x34adc6,'signal':_0x36a6ce['signal']});clearTimeout(_0x25a019);if(_0x568872<retries&&isRetryableError(_0x1804ea[_0x4e5851(0x10c)])){const _0x2890ae=_0x1804ea[_0x4e5851(0x10e)][_0x4e5851(0xf9)](_0x4e5851(0xe0)),_0x201154=_0x2890ae?parseInt(_0x2890ae,0xa)*0x3e8:getRetryDelay(_0x568872,this[_0x4e5851(0x115)]);console[_0x4e5851(0xde)](_0x4e5851(0xe5)+(_0x568872+0x1)+'/'+retries+_0x4e5851(0x101)+_0x1804ea['status']+',\x20'+(_0x4e5851(0xdb)+Math[_0x4e5851(0x120)](_0x201154)+_0x4e5851(0xd4))),await this['sleep'](_0x201154);continue;}if(!_0x1804ea['ok']){const _0x532925=await this['safeParseJSON'](_0x1804ea),_0x4c81c8=this[_0x4e5851(0x11a)](_0x532925,_0x1804ea[_0x4e5851(0x10c)]);let _0x13874f;if(_0x1804ea['status']===0x191)_0x13874f=_0x4e5851(0xf3)+_0x1804ea['status']+':\x20'+_0x1804ea[_0x4e5851(0xf2)]+'\x0a\x20\x20URL:\x20'+_0x3ab68b;else{if(_0x4c81c8?.[_0x4e5851(0xf4)])_0x13874f=_0x4c81c8['detail'];else{if(_0x532925){const _0x56e3cb=JSON['stringify'](_0x532925);_0x13874f=_0x4e5851(0xf3)+_0x1804ea['status']+':\x20'+_0x1804ea[_0x4e5851(0xf2)]+_0x4e5851(0xd6)+_0x56e3cb;}else _0x13874f=_0x4e5851(0xf3)+_0x1804ea[_0x4e5851(0x10c)]+':\x20'+_0x1804ea[_0x4e5851(0xf2)];}}throw new HTTPClientError(_0x13874f,_0x1804ea[_0x4e5851(0x10c)],_0x4c81c8);}let _0x2888b3;if(responseType===_0x4e5851(0x103)){const _0x30460c=await _0x1804ea[_0x4e5851(0x109)]();_0x2888b3=Buffer[_0x4e5851(0xee)](_0x30460c);}else responseType===_0x4e5851(0x11c)?_0x2888b3=await _0x1804ea[_0x4e5851(0x11c)]():_0x2888b3=await this[_0x4e5851(0x114)](_0x1804ea);this[_0x4e5851(0xe3)][_0x4e5851(0xd7)](_0x4e5851(0xf5)+_0x1804ea[_0x4e5851(0x10c)]+_0x4e5851(0x106)+_0x2d1374+'\x20'+_0x438aea),this[_0x4e5851(0xe3)][_0x4e5851(0x11d)](JSON['stringify'](_0x2888b3,null,0x2));if(includeHeaders){const _0x439e0a={};return _0x1804ea['headers'][_0x4e5851(0x117)]((_0x540dfa,_0x3df761)=>{_0x439e0a[_0x3df761]=_0x540dfa;}),{'data':_0x2888b3,'status':_0x1804ea[_0x4e5851(0x10c)],'headers':_0x439e0a};}return _0x2888b3;}catch(_0x498804){_0x968207=_0x498804 instanceof Error?_0x498804:new Error(String(_0x498804));if(_0x498804 instanceof HTTPClientError&&!isRetryableError(_0x498804[_0x4e5851(0x10c)]))throw _0x498804;if(_0x568872>=retries)throw _0x968207;const _0x42eec8=getRetryDelay(_0x568872,this[_0x4e5851(0x115)]);let _0x401b4e;_0x968207 instanceof HTTPClientError?_0x401b4e='[Retry\x20'+(_0x568872+0x1)+'/'+retries+_0x4e5851(0xdf)+_0x968207[_0x4e5851(0x10c)]+':\x20'+_0x968207[_0x4e5851(0xff)]+',\x20'+(_0x4e5851(0xdb)+Math['round'](_0x42eec8)+'ms...'):_0x401b4e=_0x4e5851(0xe5)+(_0x568872+0x1)+'/'+retries+_0x4e5851(0x10b)+_0x3ab68b+'\x20failed:\x20'+_0x968207['message']+',\x20'+(_0x4e5851(0xdb)+Math['round'](_0x42eec8)+_0x4e5851(0xd4)),console[_0x4e5851(0xde)](_0x401b4e),await this[_0x4e5851(0xec)](_0x42eec8);}}if(_0x968207&&!(_0x968207 instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x4e5851(0x10f)],'Request\x20to\x20'+_0x3ab68b+_0x4e5851(0x10a)+_0x968207[_0x4e5851(0xff)],_0x968207);throw _0x968207||new SDKError(ErrorCode[_0x4e5851(0xd3)],'Request\x20failed\x20after\x20retries');}async[a2_0x193129(0x114)](_0x2e9d77){const _0x47fc97=a2_0x193129,_0x5bb077=await _0x2e9d77[_0x47fc97(0x11c)]();if(!_0x5bb077)return null;try{const _0x4214c3=a2_0x14cdfd({'storeAsString':!![]});return _0x4214c3[_0x47fc97(0xe9)](_0x5bb077);}catch{return{'body':_0x5bb077};}}[a2_0x193129(0x11a)](_0x5590b9,_0x29a776){const _0x5a6d3c=a2_0x193129;if(!_0x5590b9||typeof _0x5590b9!==_0x5a6d3c(0xda))return undefined;const _0x18f067=_0x5590b9;if(_0x18f067[_0x5a6d3c(0x11f)]||_0x18f067[_0x5a6d3c(0xef)]||_0x18f067['detail'])return{'type':_0x18f067[_0x5a6d3c(0x11f)]||_0x5a6d3c(0xd1),'title':_0x18f067[_0x5a6d3c(0xef)]||_0x5a6d3c(0xd8),'status':_0x18f067[_0x5a6d3c(0x10c)]||_0x29a776,'detail':_0x18f067[_0x5a6d3c(0xf4)]||_0x5a6d3c(0xf0),'instance':_0x18f067[_0x5a6d3c(0x116)]||'',..._0x18f067};return undefined;}[a2_0x193129(0xec)](_0x50e076){return new Promise(_0x5970d9=>setTimeout(_0x5970d9,_0x50e076));}async[a2_0x193129(0xe8)](_0x6949b,_0x2917de,_0x26d3ee={}){const _0x258d0c=a2_0x193129,{headers:headers={},body:_0x42b2aa,timeout:timeout=0x7530,signal:_0x3100b2}=_0x26d3ee,_0x563571=''+this[_0x258d0c(0xe2)]+_0x2917de,_0x29e108={...this[_0x258d0c(0x119)],...headers},_0x10832e=new AbortController(),_0x491e69=setTimeout(()=>_0x10832e['abort'](),timeout),_0x1144c0=_0x3100b2?[_0x10832e[_0x258d0c(0xd0)],_0x3100b2]:[_0x10832e[_0x258d0c(0xd0)]],_0x47a683=this[_0x258d0c(0x110)](_0x1144c0);try{const _0x491558={'method':_0x6949b,'headers':_0x29e108,'signal':_0x47a683};if(_0x42b2aa){if(typeof _0x42b2aa===_0x258d0c(0xd5))_0x491558[_0x258d0c(0x102)]=_0x42b2aa;else _0x42b2aa instanceof Buffer?_0x491558[_0x258d0c(0x102)]=_0x42b2aa:_0x491558[_0x258d0c(0x102)]=JSON[_0x258d0c(0x118)](_0x42b2aa);}const _0x56e0e1=await fetch(_0x563571,_0x491558);clearTimeout(_0x491e69);if(!_0x56e0e1['ok']){const _0xcd73ba=await this['safeParseJSON'](_0x56e0e1),_0x52daf5=this[_0x258d0c(0x11a)](_0xcd73ba,_0x56e0e1['status']);let _0x4d2e90;if(_0x56e0e1[_0x258d0c(0x10c)]===0x191)_0x4d2e90=_0x258d0c(0xf3)+_0x56e0e1[_0x258d0c(0x10c)]+':\x20'+_0x56e0e1['statusText']+_0x258d0c(0x113)+_0x563571;else{if(_0x52daf5?.[_0x258d0c(0xf4)])_0x4d2e90=_0x52daf5[_0x258d0c(0xf4)];else{if(_0xcd73ba){const _0x181179=JSON[_0x258d0c(0x118)](_0xcd73ba);_0x4d2e90=_0x258d0c(0xf3)+_0x56e0e1[_0x258d0c(0x10c)]+':\x20'+_0x56e0e1['statusText']+_0x258d0c(0xd6)+_0x181179;}else _0x4d2e90=_0x258d0c(0xf3)+_0x56e0e1[_0x258d0c(0x10c)]+':\x20'+_0x56e0e1['statusText'];}}throw new HTTPClientError(_0x4d2e90,_0x56e0e1[_0x258d0c(0x10c)],_0x52daf5);}return _0x56e0e1;}catch(_0x111588){clearTimeout(_0x491e69);if(_0x111588 instanceof HTTPClientError)throw _0x111588;if(_0x111588[_0x258d0c(0x105)]===_0x258d0c(0xfa))throw new Error(_0x258d0c(0xd2));throw _0x111588;}}['combineSignals'](_0x421de0){const _0x58fde1=a2_0x193129,_0x4a1a0=new AbortController();for(const _0x33ae84 of _0x421de0){if(_0x33ae84['aborted'])return _0x4a1a0[_0x58fde1(0xf8)](),_0x4a1a0[_0x58fde1(0xd0)];_0x33ae84[_0x58fde1(0x11e)](_0x58fde1(0xf8),()=>_0x4a1a0[_0x58fde1(0xf8)](),{'once':!![]});}return _0x4a1a0['signal'];}}
1
+ const a2_0x3b2fc1=a2_0x3f71;(function(_0x32bd18,_0xdf8cf4){const _0x4fdb34=a2_0x3f71,_0x14a762=_0x32bd18();while(!![]){try{const _0xed5f57=-parseInt(_0x4fdb34(0x18c))/0x1+-parseInt(_0x4fdb34(0x1aa))/0x2+parseInt(_0x4fdb34(0x1c3))/0x3*(-parseInt(_0x4fdb34(0x1c4))/0x4)+-parseInt(_0x4fdb34(0x1c1))/0x5*(-parseInt(_0x4fdb34(0x1c0))/0x6)+-parseInt(_0x4fdb34(0x1a6))/0x7+-parseInt(_0x4fdb34(0x17d))/0x8+parseInt(_0x4fdb34(0x19e))/0x9*(parseInt(_0x4fdb34(0x198))/0xa);if(_0xed5f57===_0xdf8cf4)break;else _0x14a762['push'](_0x14a762['shift']());}catch(_0x1ccdd8){_0x14a762['push'](_0x14a762['shift']());}}}(a2_0x563d,0xdbe3d));function a2_0x563d(){const _0x1a66e9=['text','6xSEciT','1469620GlhHZb',']\x20Request\x20failed\x20with\x20','853521QgVaOH','24JFnbsc','min',']:\x20','\x0a\x20\x20Details:\x20','application/json','stringify','UNAVAILABLE','5480968iHRiuj','Error','aborted','pow',']\x20Request\x20failed\x20with\x20HTTP\x20','arraybuffer','detail','signal','logger','problemDetails','INTERNAL','AbortError','random','Request\x20cancelled\x20by\x20user','HTTP\x20','882090dBvnia',']\x20Request\x20to\x20','statusText','combineSignals','ms...','body','retrying\x20in\x20','parse','Request\x20to\x20','\x20failed:\x20','from','UNAUTHENTICATED','18889070nwSQye','type','\x0a\x20\x20URL:\x20','Request\x20failed\x20after\x20retries','message','title','27oTgYcx','info','addEventListener','Content-Type','retryConfig','request','abort','trace','9254182ZydmTA','parseProblemDetails','sleep','baseUrl','927394GHKndH','Request:\x20','safeParseJSON','defaultHeaders','forEach','HTTP_REQUEST_FAILURE','name','round','maxDelay','status','baseDelay','RATE_LIMITED','headers','debug','instance','Response\x20[','Retry-After','An\x20error\x20occurred','requestSSE','[Retry\x20','HTTPClientError'];a2_0x563d=function(){return _0x1a66e9;};return a2_0x563d();}import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x461e8f from'json-bigint';const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x29cd19){return _0x29cd19>=0x1f4||_0x29cd19===0x1ad;}function getRetryDelay(_0x156179,_0x3d98b2){const _0x30b169=a2_0x3f71,_0x2fbc67=Math[_0x30b169(0x1c5)](_0x3d98b2[_0x30b169(0x1b4)]*Math[_0x30b169(0x180)](0x2,_0x156179),_0x3d98b2[_0x30b169(0x1b2)]);return Math[_0x30b169(0x189)]()*_0x2fbc67;}function a2_0x3f71(_0x24feb6,_0x25961b){const _0x563d79=a2_0x563d();return a2_0x3f71=function(_0x3f7138,_0x289966){_0x3f7138=_0x3f7138-0x17b;let _0xda52ab=_0x563d79[_0x3f7138];return _0xda52ab;},a2_0x3f71(_0x24feb6,_0x25961b);}function statusCodeToErrorCode(_0x5d9cd6){const _0x49181f=a2_0x3f71;if(_0x5d9cd6===0x191)return ErrorCode[_0x49181f(0x197)];else{if(_0x5d9cd6===0x193)return ErrorCode['PERMISSION_DENIED'];else{if(_0x5d9cd6===0x194)return ErrorCode['NOT_FOUND'];else{if(_0x5d9cd6===0x1ad)return ErrorCode[_0x49181f(0x1b5)];else return _0x5d9cd6>=0x1f4?ErrorCode[_0x49181f(0x17c)]:ErrorCode['INVALID_ARGUMENT'];}}}}export class HTTPClientError extends Error{[a2_0x3b2fc1(0x1b3)];[a2_0x3b2fc1(0x186)];['code'];constructor(_0x260be6,_0x4e301d,_0x11b3da){const _0x4e89b5=a2_0x3b2fc1,_0x413f92=statusCodeToErrorCode(_0x4e301d);super('['+_0x413f92+']\x20'+_0x260be6),this['status']=_0x4e301d,this['problemDetails']=_0x11b3da,this[_0x4e89b5(0x1b0)]=_0x4e89b5(0x1be),this['code']=_0x413f92;}}export class HTTPClient{['retryConfig'];['baseUrl'];[a2_0x3b2fc1(0x1ad)];[a2_0x3b2fc1(0x185)];constructor(_0x41eb58,_0x58f3f4,_0x47ea9b,_0x15997e){const _0x159a13=a2_0x3b2fc1;this[_0x159a13(0x1a9)]=_0x41eb58,this[_0x159a13(0x1ad)]=_0x58f3f4,this[_0x159a13(0x1a2)]={...DEFAULT_RETRY_CONFIG,..._0x15997e},this['logger']=_0x47ea9b;}async[a2_0x3b2fc1(0x1a3)](_0x39d1ce,_0x30e1eb,_0x1fb55e={}){const _0x1ff52d=a2_0x3b2fc1,{headers:headers={},body:_0x367511,timeout:timeout=0x7530,retries:retries=this['retryConfig']['maxRetries'],signal:_0x576a34,includeHeaders:includeHeaders=![],responseType:responseType='json'}=_0x1fb55e,_0x4865c3=''+this[_0x1ff52d(0x1a9)]+_0x30e1eb;this['logger'][_0x1ff52d(0x19f)](_0x1ff52d(0x1ab)+_0x39d1ce+'\x20'+_0x4865c3);const _0x337491={...this[_0x1ff52d(0x1ad)],...headers};if(_0x367511&&!_0x337491[_0x1ff52d(0x1a1)]){if(_0x367511 instanceof Buffer){}else _0x337491[_0x1ff52d(0x1a1)]=_0x1ff52d(0x1c8);}let _0x3d3a3f;_0x367511&&(_0x367511 instanceof Buffer?_0x3d3a3f=_0x367511:_0x3d3a3f=typeof _0x367511==='string'?_0x367511:JSON[_0x1ff52d(0x17b)](_0x367511));let _0x28886f=null;for(let _0x153908=0x0;_0x153908<=retries;_0x153908++){try{const _0x770e5c=new AbortController(),_0x23b3a4=setTimeout(()=>_0x770e5c['abort'](),timeout);if(_0x576a34){if(_0x576a34[_0x1ff52d(0x17f)])throw new Error('Request\x20cancelled\x20by\x20user');_0x576a34[_0x1ff52d(0x1a0)]('abort',()=>_0x770e5c[_0x1ff52d(0x1a4)](),{'once':!![]});}const _0x104143=await fetch(_0x4865c3,{'method':_0x39d1ce,'headers':_0x337491,'body':_0x3d3a3f,'signal':_0x770e5c[_0x1ff52d(0x184)]});clearTimeout(_0x23b3a4);if(_0x153908<retries&&isRetryableError(_0x104143[_0x1ff52d(0x1b3)])){const _0x4375e2=_0x104143[_0x1ff52d(0x1b6)]['get'](_0x1ff52d(0x1ba)),_0x1801f7=_0x4375e2?parseInt(_0x4375e2,0xa)*0x3e8:getRetryDelay(_0x153908,this[_0x1ff52d(0x1a2)]);console['warn']('[Retry\x20'+(_0x153908+0x1)+'/'+retries+_0x1ff52d(0x1c2)+_0x104143['status']+',\x20'+(_0x1ff52d(0x192)+Math['round'](_0x1801f7)+_0x1ff52d(0x190))),await this[_0x1ff52d(0x1a8)](_0x1801f7);continue;}if(!_0x104143['ok']){const _0x502d49=await this[_0x1ff52d(0x1ac)](_0x104143),_0x26c09b=this['parseProblemDetails'](_0x502d49,_0x104143[_0x1ff52d(0x1b3)]);let _0x38d044;if(_0x104143[_0x1ff52d(0x1b3)]===0x191)_0x38d044='HTTP\x20'+_0x104143['status']+':\x20'+_0x104143[_0x1ff52d(0x18e)]+_0x1ff52d(0x19a)+_0x4865c3;else{if(_0x26c09b?.[_0x1ff52d(0x183)])_0x38d044=_0x26c09b['detail'];else{if(_0x502d49){const _0x25d032=JSON[_0x1ff52d(0x17b)](_0x502d49);_0x38d044=_0x1ff52d(0x18b)+_0x104143['status']+':\x20'+_0x104143[_0x1ff52d(0x18e)]+_0x1ff52d(0x1c7)+_0x25d032;}else _0x38d044=_0x1ff52d(0x18b)+_0x104143[_0x1ff52d(0x1b3)]+':\x20'+_0x104143[_0x1ff52d(0x18e)];}}throw new HTTPClientError(_0x38d044,_0x104143[_0x1ff52d(0x1b3)],_0x26c09b);}let _0x3fd154;if(responseType===_0x1ff52d(0x182)){const _0x7f7c4=await _0x104143['arrayBuffer']();_0x3fd154=Buffer[_0x1ff52d(0x196)](_0x7f7c4);}else responseType==='text'?_0x3fd154=await _0x104143[_0x1ff52d(0x1bf)]():_0x3fd154=await this[_0x1ff52d(0x1ac)](_0x104143);this[_0x1ff52d(0x185)][_0x1ff52d(0x1b7)](_0x1ff52d(0x1b9)+_0x104143['status']+_0x1ff52d(0x1c6)+_0x39d1ce+'\x20'+_0x30e1eb),this[_0x1ff52d(0x185)][_0x1ff52d(0x1a5)](JSON[_0x1ff52d(0x17b)](_0x3fd154,null,0x2));if(includeHeaders){const _0x14ac73={};return _0x104143['headers'][_0x1ff52d(0x1ae)]((_0x3e9633,_0x5279c2)=>{_0x14ac73[_0x5279c2]=_0x3e9633;}),{'data':_0x3fd154,'status':_0x104143[_0x1ff52d(0x1b3)],'headers':_0x14ac73};}return _0x3fd154;}catch(_0x374ab1){_0x28886f=_0x374ab1 instanceof Error?_0x374ab1:new Error(String(_0x374ab1));if(_0x374ab1 instanceof HTTPClientError&&!isRetryableError(_0x374ab1['status']))throw _0x374ab1;if(_0x153908>=retries)throw _0x28886f;const _0x3a19fe=getRetryDelay(_0x153908,this['retryConfig']);let _0x33f380;_0x28886f instanceof HTTPClientError?_0x33f380=_0x1ff52d(0x1bd)+(_0x153908+0x1)+'/'+retries+_0x1ff52d(0x181)+_0x28886f[_0x1ff52d(0x1b3)]+':\x20'+_0x28886f[_0x1ff52d(0x19c)]+',\x20'+(_0x1ff52d(0x192)+Math[_0x1ff52d(0x1b1)](_0x3a19fe)+_0x1ff52d(0x190)):_0x33f380=_0x1ff52d(0x1bd)+(_0x153908+0x1)+'/'+retries+_0x1ff52d(0x18d)+_0x4865c3+_0x1ff52d(0x195)+_0x28886f[_0x1ff52d(0x19c)]+',\x20'+(_0x1ff52d(0x192)+Math[_0x1ff52d(0x1b1)](_0x3a19fe)+_0x1ff52d(0x190)),console['warn'](_0x33f380),await this[_0x1ff52d(0x1a8)](_0x3a19fe);}}if(_0x28886f&&!(_0x28886f instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x1ff52d(0x1af)],_0x1ff52d(0x194)+_0x4865c3+_0x1ff52d(0x195)+_0x28886f[_0x1ff52d(0x19c)],_0x28886f);throw _0x28886f||new SDKError(ErrorCode[_0x1ff52d(0x187)],_0x1ff52d(0x19b));}async[a2_0x3b2fc1(0x1ac)](_0x549a1b){const _0x27844a=a2_0x3b2fc1,_0x1e3d6b=await _0x549a1b['text']();if(!_0x1e3d6b)return null;try{const _0x298f8b=a2_0x461e8f({'storeAsString':!![]});return _0x298f8b[_0x27844a(0x193)](_0x1e3d6b);}catch{return{'body':_0x1e3d6b};}}[a2_0x3b2fc1(0x1a7)](_0x5e01da,_0x29b657){const _0x1a5c14=a2_0x3b2fc1;if(!_0x5e01da||typeof _0x5e01da!=='object')return undefined;const _0x12fe12=_0x5e01da;if(_0x12fe12['type']||_0x12fe12['title']||_0x12fe12['detail'])return{'type':_0x12fe12[_0x1a5c14(0x199)]||'about:blank','title':_0x12fe12[_0x1a5c14(0x19d)]||_0x1a5c14(0x17e),'status':_0x12fe12[_0x1a5c14(0x1b3)]||_0x29b657,'detail':_0x12fe12['detail']||_0x1a5c14(0x1bb),'instance':_0x12fe12[_0x1a5c14(0x1b8)]||'',..._0x12fe12};return undefined;}[a2_0x3b2fc1(0x1a8)](_0x451456){return new Promise(_0x1747cb=>setTimeout(_0x1747cb,_0x451456));}async[a2_0x3b2fc1(0x1bc)](_0x47c4a0,_0x761e18,_0x5a0715={}){const _0x3d725c=a2_0x3b2fc1,{headers:headers={},body:_0x4637ab,timeout:timeout=0x7530,signal:_0x755d7a}=_0x5a0715,_0x4de65b=''+this[_0x3d725c(0x1a9)]+_0x761e18,_0x4cd669={...this[_0x3d725c(0x1ad)],...headers},_0x4e20a4=new AbortController(),_0x2ed255=setTimeout(()=>_0x4e20a4[_0x3d725c(0x1a4)](),timeout),_0x49dd72=_0x755d7a?[_0x4e20a4[_0x3d725c(0x184)],_0x755d7a]:[_0x4e20a4[_0x3d725c(0x184)]],_0x37b3ad=this[_0x3d725c(0x18f)](_0x49dd72);try{const _0x342e4b={'method':_0x47c4a0,'headers':_0x4cd669,'signal':_0x37b3ad};if(_0x4637ab){if(typeof _0x4637ab==='string')_0x342e4b[_0x3d725c(0x191)]=_0x4637ab;else _0x4637ab instanceof Buffer?_0x342e4b[_0x3d725c(0x191)]=_0x4637ab:_0x342e4b[_0x3d725c(0x191)]=JSON[_0x3d725c(0x17b)](_0x4637ab);}const _0x8183a3=await fetch(_0x4de65b,_0x342e4b);clearTimeout(_0x2ed255);if(!_0x8183a3['ok']){const _0x7526fe=await this[_0x3d725c(0x1ac)](_0x8183a3),_0x34ff60=this['parseProblemDetails'](_0x7526fe,_0x8183a3['status']);let _0x496844;if(_0x8183a3[_0x3d725c(0x1b3)]===0x191)_0x496844='HTTP\x20'+_0x8183a3['status']+':\x20'+_0x8183a3['statusText']+_0x3d725c(0x19a)+_0x4de65b;else{if(_0x34ff60?.[_0x3d725c(0x183)])_0x496844=_0x34ff60[_0x3d725c(0x183)];else{if(_0x7526fe){const _0x2979d6=JSON['stringify'](_0x7526fe);_0x496844=_0x3d725c(0x18b)+_0x8183a3[_0x3d725c(0x1b3)]+':\x20'+_0x8183a3[_0x3d725c(0x18e)]+'\x0a\x20\x20Details:\x20'+_0x2979d6;}else _0x496844=_0x3d725c(0x18b)+_0x8183a3[_0x3d725c(0x1b3)]+':\x20'+_0x8183a3[_0x3d725c(0x18e)];}}throw new HTTPClientError(_0x496844,_0x8183a3[_0x3d725c(0x1b3)],_0x34ff60);}return _0x8183a3;}catch(_0x14c1a2){clearTimeout(_0x2ed255);if(_0x14c1a2 instanceof HTTPClientError)throw _0x14c1a2;if(_0x14c1a2['name']===_0x3d725c(0x188))throw new Error(_0x3d725c(0x18a));throw _0x14c1a2;}}[a2_0x3b2fc1(0x18f)](_0x25d19a){const _0x10ad41=a2_0x3b2fc1,_0x2fb772=new AbortController();for(const _0x2b76e3 of _0x25d19a){if(_0x2b76e3[_0x10ad41(0x17f)])return _0x2fb772[_0x10ad41(0x1a4)](),_0x2fb772[_0x10ad41(0x184)];_0x2b76e3['addEventListener'](_0x10ad41(0x1a4),()=>_0x2fb772['abort'](),{'once':!![]});}return _0x2fb772[_0x10ad41(0x184)];}}
@@ -1 +1 @@
1
- const a3_0x2ef9cc=a3_0x1caf;(function(_0x570d7b,_0x3b2f8b){const _0x54c4a0=a3_0x1caf,_0x116d3e=_0x570d7b();while(!![]){try{const _0x3ba0d7=-parseInt(_0x54c4a0(0x145))/0x1+-parseInt(_0x54c4a0(0x160))/0x2*(-parseInt(_0x54c4a0(0x137))/0x3)+parseInt(_0x54c4a0(0x148))/0x4*(parseInt(_0x54c4a0(0x14e))/0x5)+-parseInt(_0x54c4a0(0x163))/0x6+parseInt(_0x54c4a0(0x13f))/0x7*(parseInt(_0x54c4a0(0x14c))/0x8)+-parseInt(_0x54c4a0(0x12d))/0x9*(-parseInt(_0x54c4a0(0x161))/0xa)+-parseInt(_0x54c4a0(0x12b))/0xb;if(_0x3ba0d7===_0x3b2f8b)break;else _0x116d3e['push'](_0x116d3e['shift']());}catch(_0x104665){_0x116d3e['push'](_0x116d3e['shift']());}}}(a3_0x20a5,0xa5583));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a3_0x1caf(_0x85806c,_0x19550e){const _0x20a51b=a3_0x20a5();return a3_0x1caf=function(_0x1caf41,_0x3bd055){_0x1caf41=_0x1caf41-0x11b;let _0x153a6d=_0x20a51b[_0x1caf41];return _0x153a6d;},a3_0x1caf(_0x85806c,_0x19550e);}import{parseSSEStream}from'../utils/sse-parser.js';import{ErrorCode,SDKError}from'../sdk/errors.js';function a3_0x20a5(){const _0x599444=['LLM_CHAT_CREATION_FAILURE','links','prompt','Failed\x20to\x20create\x20chat\x20after\x20','projectId','/api/projects?page[limit]=','site','DELETE','application/vnd.api+json','startsWith','/api/agents','updateAgent','sort','733756VEbcEe','30SacEbM','deleteProject','6019512XMqQpT','next','warn','createAgent','temperature','ms...','modelType','startChat','listAgents','/api/chats/','description','Message\x20cannot\x20be\x20empty\x20or\x20whitespace\x20only','baseUrl','getAgent','LLM_EMPTY_MESSAGE','[Retry\x20','agents','request','starterMessage','5036042EsJUeG','push','2937195KzgIps','projects','text/event-stream','/api/projects/','name','httpClient','LLM_STREAM_ERROR',']\x20Chat\x20creation\x20returned\x20empty\x20ID,\x20retrying\x20in\x20','GET','listProjects','6bNRsYY','POST','trim','Failed\x20to\x20continue\x20chat\x20(chatId:\x20','page[limit]','llm','systemPrompt','continueChat','98ybGTGR','data','PATCH','Failed\x20to\x20create\x20chat:\x20unexpected\x20error','/api/users/current_settings','application/json','1227465TrWCAh','/api/agents/','/history','130148QnhSbE','chats','getChatInfo','getUserSettings','368184bMRDUK','maxToolIterations','155hnbwou','/continue','authHeaders',',\x20message\x20length:\x20','/api/chats?'];a3_0x20a5=function(){return _0x599444;};return a3_0x20a5();}export class LLMClient{[a3_0x2ef9cc(0x132)];[a3_0x2ef9cc(0x124)];[a3_0x2ef9cc(0x150)];constructor(_0x4a5873,_0x5a7a19){const _0x551178=a3_0x2ef9cc;this['baseUrl']=getEndpoint(_0x4a5873[_0x551178(0x159)],_0x551178(0x13c)),this[_0x551178(0x150)]=toHeaderRecord(getAuthHeaders(_0x4a5873[_0x551178(0x159)],_0x4a5873['apiKey'])),this[_0x551178(0x132)]=new HTTPClient(this[_0x551178(0x124)],this[_0x551178(0x150)],_0x5a7a19);}async[a3_0x2ef9cc(0x14b)](){const _0x5e3bdf=a3_0x2ef9cc;return await this[_0x5e3bdf(0x132)][_0x5e3bdf(0x129)]('GET',_0x5e3bdf(0x143));}async['createProject'](_0x196846){const _0xe8bb7e=a3_0x2ef9cc,_0xd947fc={'data':{'type':_0xe8bb7e(0x12e),'attributes':{'name':_0x196846['name'],..._0x196846['description']&&{'description':_0x196846['description']}}}},_0x36d975=await this[_0xe8bb7e(0x132)][_0xe8bb7e(0x129)](_0xe8bb7e(0x138),'/api/projects',{'headers':{'Content-Type':_0xe8bb7e(0x15b),'Accept':_0xe8bb7e(0x15b)},'body':_0xd947fc});return _0x36d975[_0xe8bb7e(0x140)];}async[a3_0x2ef9cc(0x162)](_0x31b8a3){const _0x241a68=a3_0x2ef9cc,_0x1b0fb0=_0x241a68(0x130)+encodeURIComponent(_0x31b8a3);await this[_0x241a68(0x132)][_0x241a68(0x129)](_0x241a68(0x15a),_0x1b0fb0);}async[a3_0x2ef9cc(0x136)](_0x11e9ea=0x32){const _0x2dd438=a3_0x2ef9cc,_0x101f61=[];let _0x4d411d=_0x2dd438(0x158)+_0x11e9ea;while(_0x4d411d){const _0x717391=await this['httpClient'][_0x2dd438(0x129)](_0x2dd438(0x135),_0x4d411d);_0x717391[_0x2dd438(0x140)]&&_0x101f61[_0x2dd438(0x12c)](..._0x717391['data']);_0x4d411d=_0x717391[_0x2dd438(0x154)]?.[_0x2dd438(0x164)];if(_0x4d411d&&_0x4d411d[_0x2dd438(0x15c)]('http')){const _0x4f1439=new URL(_0x4d411d);_0x4d411d=_0x4f1439['pathname']+_0x4f1439['search'];}}return _0x101f61;}async[a3_0x2ef9cc(0x120)](_0x147f01){const _0x5e2e96=a3_0x2ef9cc;let _0x286825=_0x5e2e96(0x15d);_0x147f01&&(_0x286825+='?filter[project_id]='+encodeURIComponent(_0x147f01));const _0x48f060=await this[_0x5e2e96(0x132)][_0x5e2e96(0x129)](_0x5e2e96(0x135),_0x286825);return _0x48f060[_0x5e2e96(0x140)]||[];}async[a3_0x2ef9cc(0x125)](_0x575083){const _0x3dc4c9=a3_0x2ef9cc,_0x2595a8=_0x3dc4c9(0x146)+encodeURIComponent(_0x575083),_0x535372=await this[_0x3dc4c9(0x132)]['request']('GET',_0x2595a8);return _0x535372[_0x3dc4c9(0x140)];}async[a3_0x2ef9cc(0x11b)](_0x52c62c){const _0x1468a5=a3_0x2ef9cc,_0x1de5e3={'name':_0x52c62c[_0x1468a5(0x131)],'projectId':_0x52c62c[_0x1468a5(0x157)],'modelType':_0x52c62c[_0x1468a5(0x11e)],'maxToolIterations':_0x52c62c[_0x1468a5(0x14d)]??0x4,'temperature':_0x52c62c[_0x1468a5(0x11c)]??0.7};_0x52c62c[_0x1468a5(0x13d)]!==undefined&&(_0x1de5e3[_0x1468a5(0x13d)]=_0x52c62c[_0x1468a5(0x13d)]);_0x52c62c[_0x1468a5(0x12a)]&&(_0x1de5e3[_0x1468a5(0x12a)]=_0x52c62c[_0x1468a5(0x12a)]);const _0x53ffe3={'data':{'type':_0x1468a5(0x128),'attributes':_0x1de5e3}},_0xdd113e=await this[_0x1468a5(0x132)][_0x1468a5(0x129)](_0x1468a5(0x138),_0x1468a5(0x15d),{'headers':{'Content-Type':_0x1468a5(0x15b),'Accept':'application/vnd.api+json'},'body':_0x53ffe3});return _0xdd113e[_0x1468a5(0x140)];}async[a3_0x2ef9cc(0x15e)](_0x24064f,_0x490204){const _0x271c92=a3_0x2ef9cc,_0x2a72b1={'data':{'type':'agents','id':_0x24064f,'attributes':{..._0x490204[_0x271c92(0x131)]&&{'name':_0x490204[_0x271c92(0x131)]},..._0x490204['description']&&{'description':_0x490204[_0x271c92(0x122)]},..._0x490204[_0x271c92(0x155)]&&{'prompt':_0x490204[_0x271c92(0x155)]},..._0x490204[_0x271c92(0x12a)]&&{'starter_message':_0x490204['starterMessage']}}}},_0x3df730=_0x271c92(0x146)+encodeURIComponent(_0x24064f),_0xeeac47=await this[_0x271c92(0x132)][_0x271c92(0x129)](_0x271c92(0x141),_0x3df730,{'body':_0x2a72b1});return _0xeeac47[_0x271c92(0x140)];}async['deleteAgent'](_0x231e50){const _0x1dbedf=a3_0x2ef9cc,_0x33a13f='/api/agents/'+encodeURIComponent(_0x231e50);await this[_0x1dbedf(0x132)]['request'](_0x1dbedf(0x15a),_0x33a13f);}async['listChats'](_0x36a4e8=0x32){const _0x16ad89=a3_0x2ef9cc,_0x3b7bf5=new URLSearchParams();_0x3b7bf5['append'](_0x16ad89(0x13b),String(_0x36a4e8)),_0x3b7bf5['append'](_0x16ad89(0x15f),'-last_conversation_at');const _0x5ec63c=_0x16ad89(0x152)+_0x3b7bf5['toString'](),_0x87a74e=await this['httpClient'][_0x16ad89(0x129)](_0x16ad89(0x135),_0x5ec63c);return _0x87a74e[_0x16ad89(0x140)]||[];}async[a3_0x2ef9cc(0x14a)](_0x38be51){const _0x1160b5=a3_0x2ef9cc,_0x54b263=_0x1160b5(0x121)+encodeURIComponent(_0x38be51),_0x2e37b9=await this[_0x1160b5(0x132)][_0x1160b5(0x129)](_0x1160b5(0x135),_0x54b263);return _0x2e37b9['data'];}async['getChatHistory'](_0x15fade){const _0x45aae0=a3_0x2ef9cc,_0x4af76d=_0x45aae0(0x121)+encodeURIComponent(_0x15fade)+_0x45aae0(0x147);return await this[_0x45aae0(0x132)][_0x45aae0(0x129)]('GET',_0x4af76d);}async[a3_0x2ef9cc(0x11f)](_0x32e0d0){const _0x337a22=a3_0x2ef9cc,_0xb60be8={'data':{'type':_0x337a22(0x149),'attributes':{'agentId':_0x32e0d0['agentId']}}},_0xafecd0=0x3,_0x2a6cd2=[0x3e8,0x7d0,0xfa0];for(let _0x20c71c=0x0;_0x20c71c<=_0xafecd0;_0x20c71c++){const _0x5bc3e1=await this[_0x337a22(0x132)][_0x337a22(0x129)](_0x337a22(0x138),'/api/chats',{'headers':{'Content-Type':_0x337a22(0x15b),'Accept':_0x337a22(0x15b)},'body':_0xb60be8});if(_0x5bc3e1[_0x337a22(0x140)]&&_0x5bc3e1['data']['id'])return _0x5bc3e1[_0x337a22(0x140)];if(_0x20c71c>=_0xafecd0)throw new SDKError(ErrorCode[_0x337a22(0x153)],_0x337a22(0x156)+(_0xafecd0+0x1)+'\x20attempts:\x20API\x20returned\x20empty\x20chat\x20ID');const _0x4433ae=_0x2a6cd2[_0x20c71c];console[_0x337a22(0x165)](_0x337a22(0x127)+(_0x20c71c+0x1)+'/'+_0xafecd0+_0x337a22(0x134)+_0x4433ae+_0x337a22(0x11d)),await new Promise(_0x43350e=>setTimeout(_0x43350e,_0x4433ae));}throw new SDKError(ErrorCode['LLM_CHAT_CREATION_FAILURE'],_0x337a22(0x142));}async*[a3_0x2ef9cc(0x13e)](_0x1eb93e,_0x38930b,_0x2f0c3c){const _0x2d5716=a3_0x2ef9cc,_0x1975b8=_0x38930b[_0x2d5716(0x139)]();if(!_0x1975b8)throw new SDKError(ErrorCode[_0x2d5716(0x126)],_0x2d5716(0x123),undefined,{'helpText':'Please\x20provide\x20a\x20non-empty\x20message\x20to\x20continue\x20the\x20chat.'});const _0x2f2418=_0x2d5716(0x121)+encodeURIComponent(_0x1eb93e)+_0x2d5716(0x14f),_0x324bec={'input':_0x38930b};try{const _0x134e3a=await this[_0x2d5716(0x132)]['requestSSE']('POST',_0x2f2418,{'headers':{'Content-Type':_0x2d5716(0x144),'Accept':_0x2d5716(0x12f)},'body':_0x324bec,'signal':_0x2f0c3c});yield*parseSSEStream(_0x134e3a);}catch(_0x517b6a){throw new SDKError(ErrorCode[_0x2d5716(0x133)],_0x2d5716(0x13a)+_0x1eb93e+_0x2d5716(0x151)+_0x38930b['length']+')',_0x517b6a);}}}
1
+ const a3_0x3cc577=a3_0xd660;(function(_0x1dcbc8,_0x1466a4){const _0x12d165=a3_0xd660,_0x211cda=_0x1dcbc8();while(!![]){try{const _0x8911f4=parseInt(_0x12d165(0x9d))/0x1*(parseInt(_0x12d165(0xa7))/0x2)+-parseInt(_0x12d165(0xad))/0x3*(parseInt(_0x12d165(0xb7))/0x4)+parseInt(_0x12d165(0x91))/0x5*(parseInt(_0x12d165(0xb5))/0x6)+-parseInt(_0x12d165(0xa9))/0x7*(-parseInt(_0x12d165(0xbe))/0x8)+parseInt(_0x12d165(0x9f))/0x9+parseInt(_0x12d165(0xab))/0xa+-parseInt(_0x12d165(0xcb))/0xb;if(_0x8911f4===_0x1466a4)break;else _0x211cda['push'](_0x211cda['shift']());}catch(_0x3e6848){_0x211cda['push'](_0x211cda['shift']());}}}(a3_0x2e0f,0xcfe2a));import{HTTPClient}from'./http-client.js';function a3_0xd660(_0x54b13a,_0x4874ea){const _0x2e0f17=a3_0x2e0f();return a3_0xd660=function(_0xd66037,_0x480336){_0xd66037=_0xd66037-0x87;let _0x2aeb8c=_0x2e0f17[_0xd66037];return _0x2aeb8c;},a3_0xd660(_0x54b13a,_0x4874ea);}import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{parseSSEStream}from'../utils/sse-parser.js';import{ErrorCode,SDKError}from'../sdk/errors.js';export class LLMClient{['httpClient'];[a3_0x3cc577(0x99)];[a3_0x3cc577(0x8c)];constructor(_0x4fdbb4,_0x1166d1){const _0x59be52=a3_0x3cc577;this[_0x59be52(0x99)]=getEndpoint(_0x4fdbb4[_0x59be52(0x8b)],_0x59be52(0xa3)),this[_0x59be52(0x8c)]=toHeaderRecord(getAuthHeaders(_0x4fdbb4[_0x59be52(0x8b)],_0x4fdbb4[_0x59be52(0xcd)])),this[_0x59be52(0xbd)]=new HTTPClient(this['baseUrl'],this['authHeaders'],_0x1166d1);}async[a3_0x3cc577(0x9a)](){const _0x3e9e3e=a3_0x3cc577;return await this[_0x3e9e3e(0xbd)][_0x3e9e3e(0x95)](_0x3e9e3e(0xc9),'/api/users/current_settings');}async[a3_0x3cc577(0xae)](_0xfa8562){const _0x123943=a3_0x3cc577,_0x3d2475={'data':{'type':_0x123943(0xb1),'attributes':{'name':_0xfa8562[_0x123943(0xbc)],..._0xfa8562['description']&&{'description':_0xfa8562[_0x123943(0xd1)]}}}},_0x331aea=await this['httpClient']['request'](_0x123943(0x88),'/api/projects',{'headers':{'Content-Type':_0x123943(0x9e),'Accept':_0x123943(0x9e)},'body':_0x3d2475});return _0x331aea[_0x123943(0xba)];}async[a3_0x3cc577(0xcc)](_0x3fcc87){const _0x54a35c=a3_0x3cc577,_0x2a3e25='/api/projects/'+encodeURIComponent(_0x3fcc87);await this[_0x54a35c(0xbd)][_0x54a35c(0x95)](_0x54a35c(0xc2),_0x2a3e25);}async[a3_0x3cc577(0xa0)](_0x558975=0x32){const _0x7195c4=a3_0x3cc577,_0x50e102=[];let _0x29277d=_0x7195c4(0xb8)+_0x558975;while(_0x29277d){const _0x15c18f=await this[_0x7195c4(0xbd)]['request'](_0x7195c4(0xc9),_0x29277d);_0x15c18f[_0x7195c4(0xba)]&&_0x50e102[_0x7195c4(0xbf)](..._0x15c18f['data']);_0x29277d=_0x15c18f[_0x7195c4(0x9c)]?.[_0x7195c4(0xc0)];if(_0x29277d&&_0x29277d['startsWith'](_0x7195c4(0x97))){const _0x384181=new URL(_0x29277d);_0x29277d=_0x384181[_0x7195c4(0xc4)]+_0x384181[_0x7195c4(0x98)];}}return _0x50e102;}async[a3_0x3cc577(0xcf)](_0x30f7d4){const _0x888d79=a3_0x3cc577;let _0x5c5098=_0x888d79(0xb9);_0x30f7d4&&(_0x5c5098+='?filter[project_id]='+encodeURIComponent(_0x30f7d4));const _0xcdd164=await this[_0x888d79(0xbd)]['request'](_0x888d79(0xc9),_0x5c5098);return _0xcdd164[_0x888d79(0xba)]||[];}async[a3_0x3cc577(0xb4)](_0x53b5b8){const _0x1a67f9=a3_0x3cc577,_0x1e89b1=_0x1a67f9(0xc1)+encodeURIComponent(_0x53b5b8),_0x37af28=await this['httpClient'][_0x1a67f9(0x95)]('GET',_0x1e89b1);return _0x37af28[_0x1a67f9(0xba)];}async['createAgent'](_0x479202){const _0x423e98=a3_0x3cc577,_0x5411f7={'name':_0x479202[_0x423e98(0xbc)],'projectId':_0x479202[_0x423e98(0xd2)],'modelType':_0x479202[_0x423e98(0x89)],'maxToolIterations':_0x479202[_0x423e98(0x93)]??0x4,'temperature':_0x479202[_0x423e98(0xca)]??0.7};_0x479202['systemPrompt']!==undefined&&(_0x5411f7[_0x423e98(0x9b)]=_0x479202[_0x423e98(0x9b)]);_0x479202[_0x423e98(0xa2)]&&(_0x5411f7[_0x423e98(0xa2)]=_0x479202['starterMessage']);const _0x38dae4={'data':{'type':'agents','attributes':_0x5411f7}},_0x22fa2d=await this[_0x423e98(0xbd)][_0x423e98(0x95)](_0x423e98(0x88),_0x423e98(0xb9),{'headers':{'Content-Type':_0x423e98(0x9e),'Accept':'application/vnd.api+json'},'body':_0x38dae4});return _0x22fa2d[_0x423e98(0xba)];}async[a3_0x3cc577(0xc7)](_0x2a8b48,_0x57bfb0){const _0x3ff51e=a3_0x3cc577,_0x5edbcb={'data':{'type':_0x3ff51e(0x92),'id':_0x2a8b48,'attributes':{..._0x57bfb0[_0x3ff51e(0xbc)]&&{'name':_0x57bfb0[_0x3ff51e(0xbc)]},..._0x57bfb0[_0x3ff51e(0xd1)]&&{'description':_0x57bfb0[_0x3ff51e(0xd1)]},..._0x57bfb0['prompt']&&{'prompt':_0x57bfb0[_0x3ff51e(0x94)]},..._0x57bfb0[_0x3ff51e(0xa2)]&&{'starter_message':_0x57bfb0[_0x3ff51e(0xa2)]}}}},_0x14ffa3=_0x3ff51e(0xc1)+encodeURIComponent(_0x2a8b48),_0x2885c3=await this[_0x3ff51e(0xbd)][_0x3ff51e(0x95)](_0x3ff51e(0xc3),_0x14ffa3,{'body':_0x5edbcb});return _0x2885c3[_0x3ff51e(0xba)];}async[a3_0x3cc577(0xa1)](_0x3a2b2d){const _0x466345=a3_0x3cc577,_0x19f371='/api/agents/'+encodeURIComponent(_0x3a2b2d);await this[_0x466345(0xbd)][_0x466345(0x95)]('DELETE',_0x19f371);}async[a3_0x3cc577(0xc8)](_0x5b9ca0=0x32){const _0x4487cf=a3_0x3cc577,_0x52333e=new URLSearchParams();_0x52333e[_0x4487cf(0x90)]('page[limit]',String(_0x5b9ca0)),_0x52333e['append'](_0x4487cf(0xa4),_0x4487cf(0xb0));const _0x19a7e='/api/chats?'+_0x52333e[_0x4487cf(0xc6)](),_0x75b765=await this['httpClient'][_0x4487cf(0x95)](_0x4487cf(0xc9),_0x19a7e);return _0x75b765['data']||[];}async[a3_0x3cc577(0xd5)](_0x371924){const _0x59af5a=a3_0x3cc577,_0x3c20af=_0x59af5a(0xd3)+encodeURIComponent(_0x371924),_0x206924=await this[_0x59af5a(0xbd)][_0x59af5a(0x95)]('GET',_0x3c20af);return _0x206924[_0x59af5a(0xba)];}async['getChatHistory'](_0x39dbea){const _0x586247=a3_0x3cc577,_0x12b489=_0x586247(0xd3)+encodeURIComponent(_0x39dbea)+_0x586247(0xac);return await this[_0x586247(0xbd)][_0x586247(0x95)](_0x586247(0xc9),_0x12b489);}async[a3_0x3cc577(0xa6)](_0x1df263){const _0x48aa9c=a3_0x3cc577,_0x369396={'data':{'type':_0x48aa9c(0x87),'attributes':{'agentId':_0x1df263[_0x48aa9c(0xb3)]}}},_0x401cd7=0x3,_0x5a487d=[0x3e8,0x7d0,0xfa0];for(let _0x4e515a=0x0;_0x4e515a<=_0x401cd7;_0x4e515a++){const _0x40196c=await this[_0x48aa9c(0xbd)][_0x48aa9c(0x95)]('POST',_0x48aa9c(0xc5),{'headers':{'Content-Type':_0x48aa9c(0x9e),'Accept':_0x48aa9c(0x9e)},'body':_0x369396});if(_0x40196c[_0x48aa9c(0xba)]&&_0x40196c[_0x48aa9c(0xba)]['id'])return _0x40196c[_0x48aa9c(0xba)];if(_0x4e515a>=_0x401cd7)throw new SDKError(ErrorCode[_0x48aa9c(0xd6)],_0x48aa9c(0xbb)+(_0x401cd7+0x1)+_0x48aa9c(0xce));const _0x5681e3=_0x5a487d[_0x4e515a];console['warn'](_0x48aa9c(0x8e)+(_0x4e515a+0x1)+'/'+_0x401cd7+_0x48aa9c(0x8f)+_0x5681e3+_0x48aa9c(0xaf)),await new Promise(_0x2b411c=>setTimeout(_0x2b411c,_0x5681e3));}throw new SDKError(ErrorCode[_0x48aa9c(0xd6)],_0x48aa9c(0xd0));}async*[a3_0x3cc577(0x8d)](_0x5477a1,_0x2f219e,_0x100eb6){const _0x29153c=a3_0x3cc577,_0x3080b2=_0x2f219e[_0x29153c(0xa8)]();if(!_0x3080b2)throw new SDKError(ErrorCode[_0x29153c(0xaa)],_0x29153c(0xb6),undefined,{'helpText':_0x29153c(0xa5)});const _0x345c6d=_0x29153c(0xd3)+encodeURIComponent(_0x5477a1)+_0x29153c(0xd4),_0x407e07={'input':_0x2f219e};try{const _0x128d1f=await this[_0x29153c(0xbd)]['requestSSE']('POST',_0x345c6d,{'headers':{'Content-Type':'application/json','Accept':_0x29153c(0xb2)},'body':_0x407e07,'signal':_0x100eb6});yield*parseSSEStream(_0x128d1f);}catch(_0x4a09d0){throw new SDKError(ErrorCode[_0x29153c(0x8a)],'Failed\x20to\x20continue\x20chat\x20(chatId:\x20'+_0x5477a1+',\x20message\x20length:\x20'+_0x2f219e[_0x29153c(0x96)]+')',_0x4a09d0);}}}function a3_0x2e0f(){const _0x2c4836=['/continue','getChatInfo','LLM_CHAT_CREATION_FAILURE','chats','POST','modelType','LLM_STREAM_ERROR','site','authHeaders','continueChat','[Retry\x20',']\x20Chat\x20creation\x20returned\x20empty\x20ID,\x20retrying\x20in\x20','append','18505AcjJBG','agents','maxToolIterations','prompt','request','length','http','search','baseUrl','getUserSettings','systemPrompt','links','44248kaQHmd','application/vnd.api+json','6169104rxRDZc','listProjects','deleteAgent','starterMessage','llm','sort','Please\x20provide\x20a\x20non-empty\x20message\x20to\x20continue\x20the\x20chat.','startChat','62HDAOWy','trim','1897YrVKhj','LLM_EMPTY_MESSAGE','11323450lEHysi','/history','3syPCbC','createProject','ms...','-last_conversation_at','projects','text/event-stream','agentId','getAgent','1680yqoDeB','Message\x20cannot\x20be\x20empty\x20or\x20whitespace\x20only','3380656fOBlTA','/api/projects?page[limit]=','/api/agents','data','Failed\x20to\x20create\x20chat\x20after\x20','name','httpClient','9368DnjUkz','push','next','/api/agents/','DELETE','PATCH','pathname','/api/chats','toString','updateAgent','listChats','GET','temperature','31310928svxgdB','deleteProject','apiKey','\x20attempts:\x20API\x20returned\x20empty\x20chat\x20ID','listAgents','Failed\x20to\x20create\x20chat:\x20unexpected\x20error','description','projectId','/api/chats/'];a3_0x2e0f=function(){return _0x2c4836;};return a3_0x2e0f();}
@@ -1 +1 @@
1
- function a4_0x5d90(_0x14ebd7,_0x5cb789){const _0x910651=a4_0x9106();return a4_0x5d90=function(_0x5d902d,_0x1ae7dd){_0x5d902d=_0x5d902d-0xa0;let _0x3f28cc=_0x910651[_0x5d902d];return _0x3f28cc;},a4_0x5d90(_0x14ebd7,_0x5cb789);}function a4_0x9106(){const _0x22ce83=['3850650kBAVhW','acquire','21pOqBzP','1028229HqvQOL','min','1843818gMEcxm','maxTokens','12SsCfEe','528530MXaPNv','620256Ifsgsc','tokens','maxRequests','floor','refill','max','175781sOnLss','233352COkJvD','refillRate','ceil','now','tryAcquire','getAvailableTokens','lastRefill'];a4_0x9106=function(){return _0x22ce83;};return a4_0x9106();}const a4_0x10a813=a4_0x5d90;(function(_0x2ddf0d,_0x314dd4){const _0x3a7550=a4_0x5d90,_0x1a8dab=_0x2ddf0d();while(!![]){try{const _0xdd58b0=parseInt(_0x3a7550(0xaa))/0x1+parseInt(_0x3a7550(0xa4))/0x2+-parseInt(_0x3a7550(0xb5))/0x3+parseInt(_0x3a7550(0xa2))/0x4*(parseInt(_0x3a7550(0xa3))/0x5)+parseInt(_0x3a7550(0xa0))/0x6+parseInt(_0x3a7550(0xb4))/0x7*(-parseInt(_0x3a7550(0xab))/0x8)+-parseInt(_0x3a7550(0xb2))/0x9;if(_0xdd58b0===_0x314dd4)break;else _0x1a8dab['push'](_0x1a8dab['shift']());}catch(_0x374e5f){_0x1a8dab['push'](_0x1a8dab['shift']());}}}(a4_0x9106,0x3d946));export class RateLimiter{[a4_0x10a813(0xa5)];[a4_0x10a813(0xb1)];[a4_0x10a813(0xa1)];[a4_0x10a813(0xac)];constructor(_0x32a48f){const _0x118753=a4_0x10a813;this[_0x118753(0xa1)]=_0x32a48f[_0x118753(0xa6)],this[_0x118753(0xa5)]=_0x32a48f['maxRequests'],this[_0x118753(0xb1)]=Date['now'](),this[_0x118753(0xac)]=_0x32a48f['maxRequests']/_0x32a48f['windowMs'];}async[a4_0x10a813(0xb3)](){const _0x2d82e0=a4_0x10a813;while(!![]){this['refill']();if(this['tokens']>=0x1){this[_0x2d82e0(0xa5)]-=0x1;return;}const _0x3c1c66=Math[_0x2d82e0(0xa9)](0x1,Math[_0x2d82e0(0xad)](0x1/this[_0x2d82e0(0xac)]));await this['sleep'](_0x3c1c66);}}[a4_0x10a813(0xaf)](){const _0x3f717d=a4_0x10a813;this[_0x3f717d(0xa8)]();if(this[_0x3f717d(0xa5)]>=0x1)return this[_0x3f717d(0xa5)]-=0x1,!![];return![];}[a4_0x10a813(0xa8)](){const _0x1de787=a4_0x10a813,_0x1e42ac=Date[_0x1de787(0xae)](),_0x2119e6=_0x1e42ac-this[_0x1de787(0xb1)];if(_0x2119e6>0x0){const _0x1209c3=_0x2119e6*this[_0x1de787(0xac)];this[_0x1de787(0xa5)]=Math[_0x1de787(0xb6)](this['maxTokens'],this['tokens']+_0x1209c3),this[_0x1de787(0xb1)]=_0x1e42ac;}}[a4_0x10a813(0xb0)](){const _0x20e618=a4_0x10a813;return this[_0x20e618(0xa8)](),Math[_0x20e618(0xa7)](this['tokens']);}['reset'](){const _0x356d75=a4_0x10a813;this[_0x356d75(0xa5)]=this[_0x356d75(0xa1)],this['lastRefill']=Date['now']();}['sleep'](_0x5bc335){return new Promise(_0x3ef467=>setTimeout(_0x3ef467,_0x5bc335));}}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});
1
+ const a4_0x518f41=a4_0x2b17;(function(_0x570beb,_0x1d0a51){const _0x53c5dc=a4_0x2b17,_0x1dd8d8=_0x570beb();while(!![]){try{const _0x581cc4=parseInt(_0x53c5dc(0x1e2))/0x1*(parseInt(_0x53c5dc(0x1e5))/0x2)+-parseInt(_0x53c5dc(0x1df))/0x3+parseInt(_0x53c5dc(0x1ce))/0x4+parseInt(_0x53c5dc(0x1e6))/0x5*(parseInt(_0x53c5dc(0x1da))/0x6)+parseInt(_0x53c5dc(0x1de))/0x7*(-parseInt(_0x53c5dc(0x1e7))/0x8)+-parseInt(_0x53c5dc(0x1e3))/0x9*(parseInt(_0x53c5dc(0x1d6))/0xa)+-parseInt(_0x53c5dc(0x1d2))/0xb;if(_0x581cc4===_0x1d0a51)break;else _0x1dd8d8['push'](_0x1dd8d8['shift']());}catch(_0x1fd947){_0x1dd8d8['push'](_0x1dd8d8['shift']());}}}(a4_0x5abc,0x4da49));export class RateLimiter{[a4_0x518f41(0x1e1)];[a4_0x518f41(0x1e4)];[a4_0x518f41(0x1d5)];[a4_0x518f41(0x1dc)];constructor(_0x48ee90){const _0x128c8a=a4_0x518f41;this[_0x128c8a(0x1d5)]=_0x48ee90[_0x128c8a(0x1db)],this[_0x128c8a(0x1e1)]=_0x48ee90['maxRequests'],this[_0x128c8a(0x1e4)]=Date[_0x128c8a(0x1dd)](),this[_0x128c8a(0x1dc)]=_0x48ee90['maxRequests']/_0x48ee90[_0x128c8a(0x1d4)];}async[a4_0x518f41(0x1e0)](){const _0x502714=a4_0x518f41;while(!![]){this[_0x502714(0x1d1)]();if(this[_0x502714(0x1e1)]>=0x1){this[_0x502714(0x1e1)]-=0x1;return;}const _0x34c289=Math[_0x502714(0x1d8)](0x1,Math['ceil'](0x1/this['refillRate']));await this['sleep'](_0x34c289);}}[a4_0x518f41(0x1d0)](){const _0x5d8e3b=a4_0x518f41;this['refill']();if(this[_0x5d8e3b(0x1e1)]>=0x1)return this[_0x5d8e3b(0x1e1)]-=0x1,!![];return![];}[a4_0x518f41(0x1d1)](){const _0x14372e=a4_0x518f41,_0x5aa0f8=Date[_0x14372e(0x1dd)](),_0x808935=_0x5aa0f8-this[_0x14372e(0x1e4)];if(_0x808935>0x0){const _0x488f4b=_0x808935*this[_0x14372e(0x1dc)];this['tokens']=Math[_0x14372e(0x1d7)](this[_0x14372e(0x1d5)],this['tokens']+_0x488f4b),this[_0x14372e(0x1e4)]=_0x5aa0f8;}}[a4_0x518f41(0x1d9)](){const _0x3a9bf7=a4_0x518f41;return this[_0x3a9bf7(0x1d1)](),Math[_0x3a9bf7(0x1cf)](this[_0x3a9bf7(0x1e1)]);}['reset'](){const _0x52de6b=a4_0x518f41;this[_0x52de6b(0x1e1)]=this[_0x52de6b(0x1d5)],this[_0x52de6b(0x1e4)]=Date[_0x52de6b(0x1dd)]();}[a4_0x518f41(0x1d3)](_0x536bb6){return new Promise(_0xcad375=>setTimeout(_0xcad375,_0x536bb6));}}function a4_0x2b17(_0x100c39,_0x2c9c27){const _0x5abc52=a4_0x5abc();return a4_0x2b17=function(_0x2b1713,_0x40747f){_0x2b1713=_0x2b1713-0x1ce;let _0x4e2b7b=_0x5abc52[_0x2b1713];return _0x4e2b7b;},a4_0x2b17(_0x100c39,_0x2c9c27);}function a4_0x5abc(){const _0xfca22e=['3112319VEaZzO','955683FhoPkw','acquire','tokens','3FjxFld','93411ftWITx','lastRefill','335786XOjaCX','453085xYSenK','8WyicXP','1800412fNaEXX','floor','tryAcquire','refill','1953204ScHNYk','sleep','windowMs','maxTokens','230RSrqSt','min','max','getAvailableTokens','36tExduT','maxRequests','refillRate','now'];a4_0x5abc=function(){return _0xfca22e;};return a4_0x5abc();}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});
@@ -1 +1 @@
1
- const a5_0x3e5b4=a5_0x2864;function a5_0x2864(_0x3720a1,_0x5c43d5){const _0x408dea=a5_0x408d();return a5_0x2864=function(_0x28641c,_0x359c75){_0x28641c=_0x28641c-0x1f0;let _0xc255cc=_0x408dea[_0x28641c];return _0xc255cc;},a5_0x2864(_0x3720a1,_0x5c43d5);}(function(_0x32d18a,_0xd3d763){const _0x8ffadf=a5_0x2864,_0x15293b=_0x32d18a();while(!![]){try{const _0x113421=parseInt(_0x8ffadf(0x220))/0x1*(-parseInt(_0x8ffadf(0x225))/0x2)+-parseInt(_0x8ffadf(0x223))/0x3+-parseInt(_0x8ffadf(0x208))/0x4+-parseInt(_0x8ffadf(0x224))/0x5+parseInt(_0x8ffadf(0x20f))/0x6+parseInt(_0x8ffadf(0x215))/0x7*(parseInt(_0x8ffadf(0x21f))/0x8)+-parseInt(_0x8ffadf(0x1f5))/0x9*(-parseInt(_0x8ffadf(0x20d))/0xa);if(_0x113421===_0xd3d763)break;else _0x15293b['push'](_0x15293b['shift']());}catch(_0x5d60d0){_0x15293b['push'](_0x15293b['shift']());}}}(a5_0x408d,0xe0f04));import{HTTPClient}from'./http-client.js';function a5_0x408d(){const _0x1e38cc=['/v3/database/show/','3779886lqVqJB','site','application/json','tables','jobs','deleteTable','182SXFAkC','httpClient','/v3/job/list','/v3/database/create/','message','filter','text','/v3/job/list?','authHeaders','status','465128tSUwTe','32FqsTnv','request','parse','4409514qmbmOF','4520610VNttHB','17306rSvcAi','submitPrestoJob','cancelJob','/v3/table/delete/','warn','/v3/database/list','/v3/job/result/','GET','append','from','/v3/job/issue/hive/','1539AocEty','toString','createDatabase','push','listJobs','/v3/job/show/','/v3/table/show/','?header=true','length','apiKey','databases','/v3/job/kill/','/v3/job/issue/presto/','getJobResult','createTable','/v3/table/list/','trim','listTables','/v3/database/delete/','4004936YMRizk','forEach','split','Failed\x20to\x20parse\x20NDJSON\x20line\x20','POST','142210TNjlSP'];a5_0x408d=function(){return _0x1e38cc;};return a5_0x408d();}import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class TDClient{[a5_0x3e5b4(0x216)];['authHeaders'];constructor(_0x56acdd,_0x1deb67){const _0x55608e=a5_0x3e5b4,_0x155c4c=getEndpoint(_0x56acdd[_0x55608e(0x210)],'td');this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x56acdd['site'],_0x56acdd[_0x55608e(0x1fe)])),this[_0x55608e(0x216)]=new HTTPClient(_0x155c4c,this[_0x55608e(0x21d)],_0x1deb67);}async['listDatabases'](){const _0x3767ef=a5_0x3e5b4,_0x271b6f=await this[_0x3767ef(0x216)]['request']('GET',_0x3767ef(0x22a));return _0x271b6f[_0x3767ef(0x1ff)];}async['showDatabase'](_0x5e4f8e){const _0x4fa6ba=a5_0x3e5b4,_0x7fd84=await this[_0x4fa6ba(0x216)]['request'](_0x4fa6ba(0x1f1),_0x4fa6ba(0x20e)+encodeURIComponent(_0x5e4f8e));return _0x7fd84;}async[a5_0x3e5b4(0x1f7)](_0x9dc254){const _0x473b49=a5_0x3e5b4;await this['httpClient'][_0x473b49(0x221)]('POST',_0x473b49(0x218)+encodeURIComponent(_0x9dc254));}async['deleteDatabase'](_0x9f72da){const _0x53c046=a5_0x3e5b4;await this['httpClient'][_0x53c046(0x221)](_0x53c046(0x20c),_0x53c046(0x207)+encodeURIComponent(_0x9f72da));}async[a5_0x3e5b4(0x206)](_0x5ab202){const _0x180720=a5_0x3e5b4,_0x3bd78c=await this['httpClient']['request'](_0x180720(0x1f1),_0x180720(0x204)+encodeURIComponent(_0x5ab202));return _0x3bd78c[_0x180720(0x212)];}async['showTable'](_0x392ca3,_0x37ee58){const _0x3f7162=a5_0x3e5b4,_0x17cc38=await this[_0x3f7162(0x216)][_0x3f7162(0x221)](_0x3f7162(0x1f1),_0x3f7162(0x1fb)+encodeURIComponent(_0x392ca3)+'/'+encodeURIComponent(_0x37ee58));return _0x17cc38;}async[a5_0x3e5b4(0x203)](_0x309aa6,_0x52bc93){const _0x41b93d=a5_0x3e5b4;await this[_0x41b93d(0x216)][_0x41b93d(0x221)](_0x41b93d(0x20c),'/v3/table/create/'+encodeURIComponent(_0x309aa6)+'/'+encodeURIComponent(_0x52bc93));}async[a5_0x3e5b4(0x214)](_0x4bd251,_0x2c48a6){const _0x1fae4e=a5_0x3e5b4;await this[_0x1fae4e(0x216)]['request'](_0x1fae4e(0x20c),_0x1fae4e(0x228)+encodeURIComponent(_0x4bd251)+'/'+encodeURIComponent(_0x2c48a6));}async['submitHiveJob'](_0x3c7168,_0x442910){const _0x493a6c=a5_0x3e5b4,_0x767d49=await this[_0x493a6c(0x216)][_0x493a6c(0x221)](_0x493a6c(0x20c),_0x493a6c(0x1f4)+encodeURIComponent(_0x3c7168),{'body':{'query':_0x442910}});return _0x767d49;}async[a5_0x3e5b4(0x226)](_0x3c8152,_0x50f378){const _0x2179c8=a5_0x3e5b4,_0x59a060=await this[_0x2179c8(0x216)][_0x2179c8(0x221)](_0x2179c8(0x20c),_0x2179c8(0x201)+encodeURIComponent(_0x3c8152),{'body':{'query':_0x50f378}});return _0x59a060;}async[a5_0x3e5b4(0x1f9)](_0x3b7544){const _0x47b939=a5_0x3e5b4,_0xc04f61=new URLSearchParams();if(_0x3b7544?.[_0x47b939(0x1f3)]!==undefined)_0xc04f61[_0x47b939(0x1f2)](_0x47b939(0x1f3),_0x3b7544[_0x47b939(0x1f3)][_0x47b939(0x1f6)]());if(_0x3b7544?.['to']!==undefined)_0xc04f61[_0x47b939(0x1f2)]('to',_0x3b7544['to'][_0x47b939(0x1f6)]());if(_0x3b7544?.[_0x47b939(0x21e)])_0xc04f61['append']('status',_0x3b7544[_0x47b939(0x21e)]);const _0x3e99ba=_0xc04f61['toString'](),_0x307f0e=_0x3e99ba?_0x47b939(0x21c)+_0x3e99ba:_0x47b939(0x217),_0xb8a7f=await this[_0x47b939(0x216)][_0x47b939(0x221)](_0x47b939(0x1f1),_0x307f0e);return _0xb8a7f[_0x47b939(0x213)];}async['showJob'](_0x53fb1b){const _0x2d3f2b=a5_0x3e5b4,_0x518f39=await this[_0x2d3f2b(0x216)][_0x2d3f2b(0x221)](_0x2d3f2b(0x1f1),_0x2d3f2b(0x1fa)+encodeURIComponent(_0x53fb1b));return _0x518f39;}async[a5_0x3e5b4(0x227)](_0x579126){const _0x1b7a49=a5_0x3e5b4;await this[_0x1b7a49(0x216)][_0x1b7a49(0x221)]('POST',_0x1b7a49(0x200)+encodeURIComponent(_0x579126));}async[a5_0x3e5b4(0x202)](_0x2ca3c0){const _0x5488df=a5_0x3e5b4,_0x28a47f=await this['httpClient'][_0x5488df(0x221)]('GET',_0x5488df(0x1f0)+encodeURIComponent(_0x2ca3c0)+_0x5488df(0x1fc),{'headers':{'Accept':_0x5488df(0x211)},'responseType':_0x5488df(0x21b)});if(typeof _0x28a47f==='string'){const _0x31b6ce=_0x28a47f[_0x5488df(0x20a)]('\x0a')[_0x5488df(0x21a)](_0x3979a1=>_0x3979a1['trim']());if(_0x31b6ce[_0x5488df(0x1fd)]===0x0)return[];let _0x97a15e;try{_0x97a15e=JSON[_0x5488df(0x222)](_0x31b6ce[0x0]);}catch(_0x136997){return console['warn']('Failed\x20to\x20parse\x20column\x20names:\x20'+(_0x136997 instanceof Error?_0x136997[_0x5488df(0x219)]:String(_0x136997))),[];}const _0x37ce2f=[];for(let _0x3d1d7f=0x1;_0x3d1d7f<_0x31b6ce[_0x5488df(0x1fd)];_0x3d1d7f++){const _0x1b4de1=_0x31b6ce[_0x3d1d7f][_0x5488df(0x205)]();if(!_0x1b4de1)continue;try{const _0x495224=JSON['parse'](_0x1b4de1),_0x2c5008={};_0x97a15e[_0x5488df(0x209)]((_0x4f1baf,_0x552625)=>{_0x2c5008[_0x4f1baf]=_0x495224[_0x552625];}),_0x37ce2f[_0x5488df(0x1f8)](_0x2c5008);}catch(_0x1594ca){console[_0x5488df(0x229)](_0x5488df(0x20b)+(_0x3d1d7f+0x1)+':\x20'+(_0x1594ca instanceof Error?_0x1594ca[_0x5488df(0x219)]:String(_0x1594ca)));}}return _0x37ce2f;}return[];}}export function createTDClient(_0x475759,_0x165264){return new TDClient(_0x475759,_0x165264);}
1
+ const a5_0xea8bcb=a5_0xe0e7;function a5_0xe0e7(_0x283f36,_0x1c1e3c){const _0x5970af=a5_0x5970();return a5_0xe0e7=function(_0xe0e73c,_0x422154){_0xe0e73c=_0xe0e73c-0x1d7;let _0x3b9f40=_0x5970af[_0xe0e73c];return _0x3b9f40;},a5_0xe0e7(_0x283f36,_0x1c1e3c);}(function(_0x13db17,_0x11aeb8){const _0x251e42=a5_0xe0e7,_0xe38792=_0x13db17();while(!![]){try{const _0xb8c7e5=-parseInt(_0x251e42(0x1fd))/0x1+-parseInt(_0x251e42(0x211))/0x2*(parseInt(_0x251e42(0x212))/0x3)+parseInt(_0x251e42(0x1db))/0x4+parseInt(_0x251e42(0x20e))/0x5+-parseInt(_0x251e42(0x202))/0x6+-parseInt(_0x251e42(0x200))/0x7+parseInt(_0x251e42(0x1f1))/0x8;if(_0xb8c7e5===_0x11aeb8)break;else _0xe38792['push'](_0xe38792['shift']());}catch(_0xaeab0a){_0xe38792['push'](_0xe38792['shift']());}}}(a5_0x5970,0x3677e));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';function a5_0x5970(){const _0x5691bd=['createTable','/v3/table/show/','133400cFOEzG','split','toString','trim','showDatabase','text','jobs','/v3/job/issue/presto/','length','listDatabases','authHeaders','push','GET','/v3/job/list?','submitHiveJob','/v3/job/kill/','message','POST','getJobResult','submitPrestoJob','showJob','warn','8876080bwIAKj','/v3/job/show/','/v3/database/delete/','site','?header=true','deleteTable','tables','/v3/table/create/','/v3/table/list/','/v3/job/issue/hive/','/v3/job/list','/v3/table/delete/','305014mFUzHQ','application/json','append','2635605OSGPOC','filter','1755294pLpQpf','Failed\x20to\x20parse\x20NDJSON\x20line\x20','status','string','showTable','/v3/database/show/','request','databases','/v3/job/result/','httpClient','from','parse','1100905uQXQNf','createDatabase','deleteDatabase','6mSOoqZ','165861eyeZCE','forEach','/v3/database/create/'];a5_0x5970=function(){return _0x5691bd;};return a5_0x5970();}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class TDClient{['httpClient'];['authHeaders'];constructor(_0x13ab95,_0x3122f4){const _0x653050=a5_0xe0e7,_0x3e2e00=getEndpoint(_0x13ab95['site'],'td');this[_0x653050(0x1e5)]=toHeaderRecord(getAuthHeaders(_0x13ab95[_0x653050(0x1f4)],_0x13ab95['apiKey'])),this[_0x653050(0x20b)]=new HTTPClient(_0x3e2e00,this['authHeaders'],_0x3122f4);}async[a5_0xea8bcb(0x1e4)](){const _0x1f91a4=a5_0xea8bcb,_0x3de447=await this[_0x1f91a4(0x20b)][_0x1f91a4(0x208)](_0x1f91a4(0x1e7),'/v3/database/list');return _0x3de447[_0x1f91a4(0x209)];}async[a5_0xea8bcb(0x1df)](_0xb02dd9){const _0x10abd3=a5_0xea8bcb,_0x2a57a6=await this[_0x10abd3(0x20b)][_0x10abd3(0x208)](_0x10abd3(0x1e7),_0x10abd3(0x207)+encodeURIComponent(_0xb02dd9));return _0x2a57a6;}async[a5_0xea8bcb(0x20f)](_0xe6e1b3){const _0x5af3e5=a5_0xea8bcb;await this[_0x5af3e5(0x20b)][_0x5af3e5(0x208)]('POST',_0x5af3e5(0x1d8)+encodeURIComponent(_0xe6e1b3));}async[a5_0xea8bcb(0x210)](_0x478019){const _0x3b506a=a5_0xea8bcb;await this[_0x3b506a(0x20b)][_0x3b506a(0x208)](_0x3b506a(0x1ec),_0x3b506a(0x1f3)+encodeURIComponent(_0x478019));}async['listTables'](_0x344eb1){const _0x200b8a=a5_0xea8bcb,_0x18bff5=await this[_0x200b8a(0x20b)][_0x200b8a(0x208)](_0x200b8a(0x1e7),_0x200b8a(0x1f9)+encodeURIComponent(_0x344eb1));return _0x18bff5[_0x200b8a(0x1f7)];}async[a5_0xea8bcb(0x206)](_0x65115c,_0x1c1e7a){const _0x2f4a9f=a5_0xea8bcb,_0x105228=await this['httpClient'][_0x2f4a9f(0x208)](_0x2f4a9f(0x1e7),_0x2f4a9f(0x1da)+encodeURIComponent(_0x65115c)+'/'+encodeURIComponent(_0x1c1e7a));return _0x105228;}async[a5_0xea8bcb(0x1d9)](_0x55239e,_0x499717){const _0x1999a5=a5_0xea8bcb;await this[_0x1999a5(0x20b)][_0x1999a5(0x208)](_0x1999a5(0x1ec),_0x1999a5(0x1f8)+encodeURIComponent(_0x55239e)+'/'+encodeURIComponent(_0x499717));}async[a5_0xea8bcb(0x1f6)](_0x589228,_0x19572d){const _0x4ac3e4=a5_0xea8bcb;await this[_0x4ac3e4(0x20b)][_0x4ac3e4(0x208)](_0x4ac3e4(0x1ec),_0x4ac3e4(0x1fc)+encodeURIComponent(_0x589228)+'/'+encodeURIComponent(_0x19572d));}async[a5_0xea8bcb(0x1e9)](_0x5377f7,_0x2f10e5){const _0x510633=a5_0xea8bcb,_0x427227=await this[_0x510633(0x20b)][_0x510633(0x208)](_0x510633(0x1ec),_0x510633(0x1fa)+encodeURIComponent(_0x5377f7),{'body':{'query':_0x2f10e5}});return _0x427227;}async[a5_0xea8bcb(0x1ee)](_0x533051,_0x32c9b1){const _0xaae268=a5_0xea8bcb,_0x1393dd=await this[_0xaae268(0x20b)][_0xaae268(0x208)](_0xaae268(0x1ec),_0xaae268(0x1e2)+encodeURIComponent(_0x533051),{'body':{'query':_0x32c9b1}});return _0x1393dd;}async['listJobs'](_0x18347b){const _0x19c3fd=a5_0xea8bcb,_0x8dea37=new URLSearchParams();if(_0x18347b?.[_0x19c3fd(0x20c)]!==undefined)_0x8dea37['append']('from',_0x18347b[_0x19c3fd(0x20c)][_0x19c3fd(0x1dd)]());if(_0x18347b?.['to']!==undefined)_0x8dea37[_0x19c3fd(0x1ff)]('to',_0x18347b['to']['toString']());if(_0x18347b?.['status'])_0x8dea37[_0x19c3fd(0x1ff)](_0x19c3fd(0x204),_0x18347b[_0x19c3fd(0x204)]);const _0x95b1d4=_0x8dea37[_0x19c3fd(0x1dd)](),_0x58e875=_0x95b1d4?_0x19c3fd(0x1e8)+_0x95b1d4:_0x19c3fd(0x1fb),_0x29de2f=await this['httpClient'][_0x19c3fd(0x208)](_0x19c3fd(0x1e7),_0x58e875);return _0x29de2f[_0x19c3fd(0x1e1)];}async[a5_0xea8bcb(0x1ef)](_0x540082){const _0x331d83=a5_0xea8bcb,_0x7d728f=await this[_0x331d83(0x20b)]['request'](_0x331d83(0x1e7),_0x331d83(0x1f2)+encodeURIComponent(_0x540082));return _0x7d728f;}async['cancelJob'](_0x33ab89){const _0x3d2b49=a5_0xea8bcb;await this[_0x3d2b49(0x20b)][_0x3d2b49(0x208)](_0x3d2b49(0x1ec),_0x3d2b49(0x1ea)+encodeURIComponent(_0x33ab89));}async[a5_0xea8bcb(0x1ed)](_0x4f65fa){const _0x22a52b=a5_0xea8bcb,_0x2ab0a5=await this['httpClient'][_0x22a52b(0x208)](_0x22a52b(0x1e7),_0x22a52b(0x20a)+encodeURIComponent(_0x4f65fa)+_0x22a52b(0x1f5),{'headers':{'Accept':_0x22a52b(0x1fe)},'responseType':_0x22a52b(0x1e0)});if(typeof _0x2ab0a5===_0x22a52b(0x205)){const _0x1411df=_0x2ab0a5[_0x22a52b(0x1dc)]('\x0a')[_0x22a52b(0x201)](_0x53490f=>_0x53490f[_0x22a52b(0x1de)]());if(_0x1411df[_0x22a52b(0x1e3)]===0x0)return[];let _0x21a0c5;try{_0x21a0c5=JSON[_0x22a52b(0x20d)](_0x1411df[0x0]);}catch(_0x259807){return console[_0x22a52b(0x1f0)]('Failed\x20to\x20parse\x20column\x20names:\x20'+(_0x259807 instanceof Error?_0x259807[_0x22a52b(0x1eb)]:String(_0x259807))),[];}const _0x2f088f=[];for(let _0x4b0031=0x1;_0x4b0031<_0x1411df['length'];_0x4b0031++){const _0x24b4fe=_0x1411df[_0x4b0031][_0x22a52b(0x1de)]();if(!_0x24b4fe)continue;try{const _0x2c372c=JSON[_0x22a52b(0x20d)](_0x24b4fe),_0x11d70e={};_0x21a0c5[_0x22a52b(0x1d7)]((_0x1d1cd7,_0xc8e986)=>{_0x11d70e[_0x1d1cd7]=_0x2c372c[_0xc8e986];}),_0x2f088f[_0x22a52b(0x1e6)](_0x11d70e);}catch(_0x404a2a){console['warn'](_0x22a52b(0x203)+(_0x4b0031+0x1)+':\x20'+(_0x404a2a instanceof Error?_0x404a2a['message']:String(_0x404a2a)));}}return _0x2f088f;}return[];}}export function createTDClient(_0x5a6471,_0x114bfd){return new TDClient(_0x5a6471,_0x114bfd);}