@treasuredata/tdx 0.2.7 → 0.2.8

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 (111) 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.d.ts.map +1 -1
  5. package/dist/client/http-client.js +1 -1
  6. package/dist/client/http-client.js.map +1 -1
  7. package/dist/client/llm-client.d.ts +2 -0
  8. package/dist/client/llm-client.d.ts.map +1 -1
  9. package/dist/client/llm-client.js +1 -1
  10. package/dist/client/llm-client.js.map +1 -1
  11. package/dist/client/rate-limiter.js +1 -1
  12. package/dist/client/td-client.js +1 -1
  13. package/dist/client/trino-client.js +1 -1
  14. package/dist/client/workflow-client.js +1 -1
  15. package/dist/commands/activations.js +1 -1
  16. package/dist/commands/api-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/chat-command.js.map +1 -1
  19. package/dist/commands/claude-command.d.ts.map +1 -1
  20. package/dist/commands/claude-command.js +1 -1
  21. package/dist/commands/claude-command.js.map +1 -1
  22. package/dist/commands/command.js +1 -1
  23. package/dist/commands/context-command.js +1 -1
  24. package/dist/commands/databases.js +1 -1
  25. package/dist/commands/describe.js +1 -1
  26. package/dist/commands/job-command.js +1 -1
  27. package/dist/commands/llm-command.js +1 -1
  28. package/dist/commands/llm-proxy.d.ts.map +1 -1
  29. package/dist/commands/llm-proxy.js +1 -1
  30. package/dist/commands/llm-proxy.js.map +1 -1
  31. package/dist/commands/parent-segment-command.js +1 -1
  32. package/dist/commands/profiles-command.js +1 -1
  33. package/dist/commands/query-command.js +1 -1
  34. package/dist/commands/segment-command.js +1 -1
  35. package/dist/commands/segment-create-command.js +1 -1
  36. package/dist/commands/segment-fields-command.js +1 -1
  37. package/dist/commands/segment-pwd-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segments.js +1 -1
  41. package/dist/commands/show.js +1 -1
  42. package/dist/commands/tables.js +1 -1
  43. package/dist/commands/use-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/config.js +1 -1
  47. package/dist/core/global-context.js +1 -1
  48. package/dist/core/profile.js +1 -1
  49. package/dist/core/project-config.js +1 -1
  50. package/dist/core/session.js +1 -1
  51. package/dist/index.js +1 -1
  52. package/dist/proxy/anthropic-adapter.d.ts +1 -14
  53. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  54. package/dist/proxy/anthropic-adapter.js +1 -1
  55. package/dist/proxy/anthropic-adapter.js.map +1 -1
  56. package/dist/proxy/server.d.ts +3 -1
  57. package/dist/proxy/server.d.ts.map +1 -1
  58. package/dist/proxy/server.js +1 -1
  59. package/dist/proxy/server.js.map +1 -1
  60. package/dist/proxy/session-cache.js +1 -1
  61. package/dist/sdk/api.js +1 -1
  62. package/dist/sdk/database.js +1 -1
  63. package/dist/sdk/errors.d.ts +2 -0
  64. package/dist/sdk/errors.d.ts.map +1 -1
  65. package/dist/sdk/errors.js +1 -1
  66. package/dist/sdk/errors.js.map +1 -1
  67. package/dist/sdk/index.js +1 -1
  68. package/dist/sdk/job.js +1 -1
  69. package/dist/sdk/llm.d.ts +5 -3
  70. package/dist/sdk/llm.d.ts.map +1 -1
  71. package/dist/sdk/llm.js +1 -1
  72. package/dist/sdk/llm.js.map +1 -1
  73. package/dist/sdk/query.js +1 -1
  74. package/dist/sdk/segment.js +1 -1
  75. package/dist/sdk/table.js +1 -1
  76. package/dist/sdk/workflow.js +1 -1
  77. package/dist/types/anthropic.d.ts +10 -3
  78. package/dist/types/anthropic.d.ts.map +1 -1
  79. package/dist/types/endpoints.js +1 -1
  80. package/dist/types/index.d.ts +5 -1
  81. package/dist/types/index.d.ts.map +1 -1
  82. package/dist/types/index.js +1 -1
  83. package/dist/utils/agent-ref-parser.js +1 -1
  84. package/dist/utils/chat-cache.js +1 -1
  85. package/dist/utils/colors.js +1 -1
  86. package/dist/utils/command-output.js +1 -1
  87. package/dist/utils/constants.js +1 -1
  88. package/dist/utils/file-permissions.js +1 -1
  89. package/dist/utils/format-detector.js +1 -1
  90. package/dist/utils/formatters.js +1 -1
  91. package/dist/utils/json-loader.js +1 -1
  92. package/dist/utils/model-aliases.js +1 -1
  93. package/dist/utils/option-validation.js +1 -1
  94. package/dist/utils/port.js +1 -1
  95. package/dist/utils/process.js +1 -1
  96. package/dist/utils/prompt.js +1 -1
  97. package/dist/utils/segment-path-parser.js +1 -1
  98. package/dist/utils/segment-ref-parser.js +1 -1
  99. package/dist/utils/spinner.js +1 -1
  100. package/dist/utils/sql-parser.js +1 -1
  101. package/dist/utils/sse-parser.d.ts +3 -1
  102. package/dist/utils/sse-parser.d.ts.map +1 -1
  103. package/dist/utils/sse-parser.js +1 -1
  104. package/dist/utils/sse-parser.js.map +1 -1
  105. package/dist/utils/string-utils.js +1 -1
  106. package/dist/utils/table-ref-parser.js +1 -1
  107. package/dist/utils/tdx-logger.js +1 -1
  108. package/dist/utils/tree-formatter.js +1 -1
  109. package/dist/utils/version-check.js +1 -1
  110. package/dist/utils/workflow-utils.js +1 -1
  111. package/package.json +2 -2
@@ -1 +1 @@
1
- const a21_0x1f5175=a21_0x5a88;(function(_0x2934a6,_0xcca3ec){const _0x5520ca=a21_0x5a88,_0x55f7f2=_0x2934a6();while(!![]){try{const _0x3a3dff=-parseInt(_0x5520ca(0x15a))/0x1+-parseInt(_0x5520ca(0x16c))/0x2+parseInt(_0x5520ca(0x178))/0x3+parseInt(_0x5520ca(0x14b))/0x4+-parseInt(_0x5520ca(0x158))/0x5*(-parseInt(_0x5520ca(0x166))/0x6)+parseInt(_0x5520ca(0x159))/0x7*(-parseInt(_0x5520ca(0x16f))/0x8)+-parseInt(_0x5520ca(0x153))/0x9;if(_0x3a3dff===_0xcca3ec)break;else _0x55f7f2['push'](_0x55f7f2['shift']());}catch(_0xeeb918){_0x55f7f2['push'](_0x55f7f2['shift']());}}}(a21_0x25bc,0xb9ee8));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a21_0x5a88(_0x4e8818,_0x4b21e8){const _0x25bc22=a21_0x25bc();return a21_0x5a88=function(_0x5a88a0,_0x242e0a){_0x5a88a0=_0x5a88a0-0x14b;let _0x3c7bfe=_0x25bc22[_0x5a88a0];return _0x3c7bfe;},a21_0x5a88(_0x4e8818,_0x4b21e8);}import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../utils/command-output.js';import{readSqlStatementsFromFile,splitSqlStatements}from'../utils/sql-parser.js';import{writeFileSync}from'fs';function a21_0x25bc(){const _0x5467e1=['in\x20','catalog','description','error','...','Catalog:\x20','2981604GixKPw','\x20rows\x20','state','1695468ubEEew','validate','completedSplits','site','verbose','\x20splits','push','Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20--file\x20query.sql\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options','2258145XjdBAO','setJobId','query','\x0aAll\x20results\x20saved\x20to\x20','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','5157040lZYjyP','217jmXvWl','1065982oPnLJp','Executing\x20query...','output','length','join','stats','processedRows','elapsedTimeMillis','Run\x20Trino\x20queries\x20(streaming)','information_schema','Site:\x20','jobId','6FgREgz','totalSplits','Executing\x20statement\x20','\x20-\x20','setPhase','file','346916DtNsOb','Schema:\x20','Error:\x20','50896iDChaR','Statement\x20','message'];a21_0x25bc=function(){return _0x5467e1;};return a21_0x25bc();}import{withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{formatRows}from'../utils/formatters.js';export class QueryCommand extends BaseCommand{['name']=a21_0x1f5175(0x155);[a21_0x1f5175(0x174)]=a21_0x1f5175(0x162);async['execute'](_0x2fec91){const _0x54646c=a21_0x1f5175,{options:_0x5918a4,args:_0x15e867,tdx:_0x520db8}=_0x2fec91,_0x8e20ee=_0x15e867[0x0],_0x3949a0=_0x5918a4[_0x54646c(0x16b)];let _0x864ba2;if(_0x3949a0)try{_0x864ba2=readSqlStatementsFromFile(_0x3949a0);}catch(_0x1a9487){return console[_0x54646c(0x175)](_0x54646c(0x16e)+_0x1a9487['message']),0x1;}else try{_0x864ba2=splitSqlStatements(_0x8e20ee);}catch(_0x5bc381){return console[_0x54646c(0x175)](_0x54646c(0x16e)+_0x5bc381[_0x54646c(0x171)]),0x1;}const _0xa63595=_0x5918a4['database']||_0x54646c(0x163),_0x1585a5=_0x5918a4[_0x54646c(0x173)];try{const _0x197128=[],_0x12536a=!!_0x5918a4[_0x54646c(0x15c)];for(let _0x1ff266=0x0;_0x1ff266<_0x864ba2[_0x54646c(0x15d)];_0x1ff266++){const _0x2f009c=_0x864ba2[_0x1ff266],_0x257c3c=_0x1ff266+0x1,_0x1c4ac9=_0x864ba2[_0x54646c(0x15d)],_0x48d8b5=_0x1c4ac9>0x1;_0x5918a4[_0x54646c(0x14f)]&&(console[_0x54646c(0x175)]('\x0a'+(_0x48d8b5?_0x54646c(0x170)+_0x257c3c+'/'+_0x1c4ac9+':':'')),console[_0x54646c(0x175)](_0x54646c(0x164)+_0x5918a4[_0x54646c(0x14e)]),console[_0x54646c(0x175)](_0x54646c(0x177)+(_0x1585a5||'td')),console[_0x54646c(0x175)](_0x54646c(0x16d)+_0xa63595),console[_0x54646c(0x175)]('SQL:\x20'+_0x2f009c));const _0x713023=_0x48d8b5?_0x54646c(0x168)+_0x257c3c+'/'+_0x1c4ac9+_0x54646c(0x176):_0x54646c(0x15b);try{const _0x22ac25=await withQuerySpinner(_0x713023,async _0x142af7=>{const _0x12fe79=_0x54646c,_0x5d14d5=await _0x520db8[_0x12fe79(0x155)](_0x2f009c,{'catalog':_0x1585a5,'schema':_0xa63595,'onJobId':_0x423d91=>{const _0x14a597=_0x12fe79;_0x142af7[_0x14a597(0x154)](_0x423d91);},'onProgress':_0x5d0636=>{const _0x17325a=_0x12fe79;_0x142af7[_0x17325a(0x16a)]('Executing\x20query\x20['+_0x5d0636[_0x17325a(0x17a)]+']'),_0x142af7['setExtra'](formatRows(_0x5d0636['processedRows'])+_0x17325a(0x179)+_0x5d0636[_0x17325a(0x14d)]+'/'+_0x5d0636[_0x17325a(0x167)]+_0x17325a(0x150));}});return _0x5d14d5;},{'verbose':_0x5918a4[_0x54646c(0x14f)]}),_0x444386=_0x22ac25['data'],_0xfdeff2=_0x444386['jobId']?'\x20[Job\x20ID:\x20'+_0x444386[_0x54646c(0x165)]+']':'',_0x3d5bd2=_0x48d8b5?'Statement\x20'+_0x257c3c+'/'+_0x1c4ac9+_0x54646c(0x169):'';console['error']('✔\x20'+_0x3d5bd2+'Query\x20completed:\x20Processed\x20'+formatRows(_0x444386[_0x54646c(0x15f)][_0x54646c(0x160)])+_0x54646c(0x179)+(_0x54646c(0x172)+formatElapsed(_0x444386[_0x54646c(0x15f)][_0x54646c(0x161)])+_0xfdeff2));if(_0x48d8b5&&_0x12536a){const _0x388877=resolveOutputOptions(_0x5918a4),_0x599ff6=await formatQueryOutput(_0x444386,_0x388877);_0x197128[_0x54646c(0x151)](_0x599ff6);}else await handleQueryOutput(_0x444386,_0x5918a4);}catch(_0x16c215){const _0xf63ffa=_0x48d8b5?_0x54646c(0x170)+_0x257c3c+'/'+_0x1c4ac9+':\x0a':'',_0x483464=_0x16c215 instanceof SDKError?_0x16c215['originalMessage']:_0x16c215[_0x54646c(0x171)];return console[_0x54646c(0x175)](''+_0xf63ffa+_0x483464),0x1;}}if(_0x864ba2[_0x54646c(0x15d)]>0x1&&_0x12536a&&_0x197128[_0x54646c(0x15d)]>0x0){const _0x4b7856=_0x197128[_0x54646c(0x15e)]('\x0a');writeFileSync(_0x5918a4[_0x54646c(0x15c)],_0x4b7856),console[_0x54646c(0x175)](_0x54646c(0x156)+_0x5918a4[_0x54646c(0x15c)]);}return 0x0;}catch(_0x4e9c64){throw _0x4e9c64;}}[a21_0x1f5175(0x14c)](_0x293457){const _0x1f0b50=a21_0x1f5175,_0x2d961b=_0x293457['args'][0x0],_0x41e430=_0x293457['options'][_0x1f0b50(0x16b)];if(!_0x2d961b&&!_0x41e430)return _0x1f0b50(0x152);if(_0x2d961b&&_0x41e430)return _0x1f0b50(0x157);return undefined;}}
1
+ function a21_0x3446(){const _0x3e1eaf=['\x20splits','Statement\x20','file','setJobId','completedSplits','information_schema','stats','1251162kYVfTy','5845LEekAe','Schema:\x20','push','setExtra','data','name','error','message','jobId','Run\x20Trino\x20queries\x20(streaming)','489156ZbQKuz','description','Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20--file\x20query.sql\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options','setPhase','verbose','\x0aAll\x20results\x20saved\x20to\x20','10QOlNRb','query','Executing\x20query...','Site:\x20','processedRows','output','11pIfuBJ','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','2570892DaPtTa','join','9016wFNnxV','elapsedTimeMillis','Executing\x20statement\x20','3976gIIOHO','...','totalSplits','Catalog:\x20','originalMessage','length','Executing\x20query\x20[','database','validate','Error:\x20','in\x20','2171490OcGrEB','Query\x20completed:\x20Processed\x20','3916017klquYG','5NYWgts'];a21_0x3446=function(){return _0x3e1eaf;};return a21_0x3446();}const a21_0x48e1f0=a21_0x154f;(function(_0x4f76ed,_0xfd0aeb){const _0x159552=a21_0x154f,_0xfdc8b8=_0x4f76ed();while(!![]){try{const _0x1e3b14=parseInt(_0x159552(0xe9))/0x1*(parseInt(_0x159552(0x113))/0x2)+-parseInt(_0x159552(0x102))/0x3+-parseInt(_0x159552(0x10d))/0x4*(-parseInt(_0x159552(0xfa))/0x5)+parseInt(_0x159552(0x11b))/0x6+-parseInt(_0x159552(0x103))/0x7*(-parseInt(_0x159552(0xec))/0x8)+-parseInt(_0x159552(0xf9))/0x9+-parseInt(_0x159552(0xf7))/0xa*(-parseInt(_0x159552(0x119))/0xb);if(_0x1e3b14===_0xfd0aeb)break;else _0xfdc8b8['push'](_0xfdc8b8['shift']());}catch(_0x5bba9f){_0xfdc8b8['push'](_0xfdc8b8['shift']());}}}(a21_0x3446,0x5bc14));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../utils/command-output.js';function a21_0x154f(_0x35d28b,_0x558f11){const _0x344677=a21_0x3446();return a21_0x154f=function(_0x154f48,_0x2bf249){_0x154f48=_0x154f48-0xe9;let _0x2e5f56=_0x344677[_0x154f48];return _0x2e5f56;},a21_0x154f(_0x35d28b,_0x558f11);}import{readSqlStatementsFromFile,splitSqlStatements}from'../utils/sql-parser.js';import{writeFileSync}from'fs';import{withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{formatRows}from'../utils/formatters.js';export class QueryCommand extends BaseCommand{[a21_0x48e1f0(0x108)]=a21_0x48e1f0(0x114);[a21_0x48e1f0(0x10e)]=a21_0x48e1f0(0x10c);async['execute'](_0x549f24){const _0x108d98=a21_0x48e1f0,{options:_0x129c9,args:_0x464dda,tdx:_0x464930}=_0x549f24,_0x417e3d=_0x464dda[0x0],_0x20f660=_0x129c9[_0x108d98(0xfd)];let _0x44bff7;if(_0x20f660)try{_0x44bff7=readSqlStatementsFromFile(_0x20f660);}catch(_0x4433a1){return console[_0x108d98(0x109)](_0x108d98(0xf5)+_0x4433a1['message']),0x1;}else try{_0x44bff7=splitSqlStatements(_0x417e3d);}catch(_0x424689){return console[_0x108d98(0x109)](_0x108d98(0xf5)+_0x424689[_0x108d98(0x10a)]),0x1;}const _0x1bd554=_0x129c9[_0x108d98(0xf3)]||_0x108d98(0x100),_0x1f0529=_0x129c9['catalog'];try{const _0x178839=[],_0x2e795f=!!_0x129c9[_0x108d98(0x118)];for(let _0x2ccf14=0x0;_0x2ccf14<_0x44bff7['length'];_0x2ccf14++){const _0x3ba046=_0x44bff7[_0x2ccf14],_0x593fbf=_0x2ccf14+0x1,_0x114b8a=_0x44bff7[_0x108d98(0xf1)],_0x2debd3=_0x114b8a>0x1;_0x129c9[_0x108d98(0x111)]&&(console[_0x108d98(0x109)]('\x0a'+(_0x2debd3?'Statement\x20'+_0x593fbf+'/'+_0x114b8a+':':'')),console[_0x108d98(0x109)](_0x108d98(0x116)+_0x129c9['site']),console['error'](_0x108d98(0xef)+(_0x1f0529||'td')),console['error'](_0x108d98(0x104)+_0x1bd554),console[_0x108d98(0x109)]('SQL:\x20'+_0x3ba046));const _0x5729d4=_0x2debd3?_0x108d98(0xeb)+_0x593fbf+'/'+_0x114b8a+_0x108d98(0xed):_0x108d98(0x115);try{const _0x3cc735=await withQuerySpinner(_0x5729d4,async _0x2ccb81=>{const _0x24f243=await _0x464930['query'](_0x3ba046,{'catalog':_0x1f0529,'schema':_0x1bd554,'onJobId':_0x268da5=>{const _0x475f1a=a21_0x154f;_0x2ccb81[_0x475f1a(0xfe)](_0x268da5);},'onProgress':_0x3b9785=>{const _0x328c5d=a21_0x154f;_0x2ccb81[_0x328c5d(0x110)](_0x328c5d(0xf2)+_0x3b9785['state']+']'),_0x2ccb81[_0x328c5d(0x106)](formatRows(_0x3b9785['processedRows'])+'\x20rows\x20'+_0x3b9785[_0x328c5d(0xff)]+'/'+_0x3b9785[_0x328c5d(0xee)]+_0x328c5d(0xfb));}});return _0x24f243;},{'verbose':_0x129c9[_0x108d98(0x111)]}),_0xb80e63=_0x3cc735[_0x108d98(0x107)],_0x323b70=_0xb80e63[_0x108d98(0x10b)]?'\x20[Job\x20ID:\x20'+_0xb80e63[_0x108d98(0x10b)]+']':'',_0x258549=_0x2debd3?_0x108d98(0xfc)+_0x593fbf+'/'+_0x114b8a+'\x20-\x20':'';console[_0x108d98(0x109)]('✔\x20'+_0x258549+_0x108d98(0xf8)+formatRows(_0xb80e63[_0x108d98(0x101)][_0x108d98(0x117)])+'\x20rows\x20'+(_0x108d98(0xf6)+formatElapsed(_0xb80e63[_0x108d98(0x101)][_0x108d98(0xea)])+_0x323b70));if(_0x2debd3&&_0x2e795f){const _0x3065d1=resolveOutputOptions(_0x129c9),_0x230118=await formatQueryOutput(_0xb80e63,_0x3065d1);_0x178839[_0x108d98(0x105)](_0x230118);}else await handleQueryOutput(_0xb80e63,_0x129c9);}catch(_0x543065){const _0x4c0925=_0x2debd3?_0x108d98(0xfc)+_0x593fbf+'/'+_0x114b8a+':\x0a':'',_0x103cd3=_0x543065 instanceof SDKError?_0x543065[_0x108d98(0xf0)]:_0x543065['message'];return console[_0x108d98(0x109)](''+_0x4c0925+_0x103cd3),0x1;}}if(_0x44bff7[_0x108d98(0xf1)]>0x1&&_0x2e795f&&_0x178839['length']>0x0){const _0x5823d3=_0x178839[_0x108d98(0x11c)]('\x0a');writeFileSync(_0x129c9[_0x108d98(0x118)],_0x5823d3),console[_0x108d98(0x109)](_0x108d98(0x112)+_0x129c9[_0x108d98(0x118)]);}return 0x0;}catch(_0x231beb){throw _0x231beb;}}[a21_0x48e1f0(0xf4)](_0x5ec372){const _0x48c4b2=a21_0x48e1f0,_0xecd757=_0x5ec372['args'][0x0],_0x54b13c=_0x5ec372['options'][_0x48c4b2(0xfd)];if(!_0xecd757&&!_0x54b13c)return _0x48c4b2(0x10f);if(_0xecd757&&_0x54b13c)return _0x48c4b2(0x11a);return undefined;}}
@@ -1 +1 @@
1
- function a22_0x2b30(_0x30a963,_0x7513a1){const _0x500a25=a22_0x500a();return a22_0x2b30=function(_0x2b30a0,_0x41bd6f){_0x2b30a0=_0x2b30a0-0x71;let _0x43474d=_0x500a25[_0x2b30a0];return _0x43474d;},a22_0x2b30(_0x30a963,_0x7513a1);}const a22_0x3911c0=a22_0x2b30;(function(_0x3a404e,_0x46a5cf){const _0x37843c=a22_0x2b30,_0x1e7e64=_0x3a404e();while(!![]){try{const _0x4a663a=parseInt(_0x37843c(0x7a))/0x1*(parseInt(_0x37843c(0x88))/0x2)+parseInt(_0x37843c(0xca))/0x3*(-parseInt(_0x37843c(0xb2))/0x4)+parseInt(_0x37843c(0x8a))/0x5+-parseInt(_0x37843c(0x85))/0x6*(-parseInt(_0x37843c(0x89))/0x7)+parseInt(_0x37843c(0xce))/0x8+-parseInt(_0x37843c(0x78))/0x9*(parseInt(_0x37843c(0xd8))/0xa)+-parseInt(_0x37843c(0x9d))/0xb*(-parseInt(_0x37843c(0xd0))/0xc);if(_0x4a663a===_0x46a5cf)break;else _0x1e7e64['push'](_0x1e7e64['shift']());}catch(_0x2ef775){_0x1e7e64['push'](_0x1e7e64['shift']());}}}(a22_0x500a,0x3540c));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class SegmentDescribeCommand extends BaseCommand{['name']=a22_0x3911c0(0xe4);['description']=a22_0x3911c0(0x7d);async[a22_0x3911c0(0xbf)](_0x5777ed){const _0x160a3b=a22_0x3911c0,{options:_0x226ee0,args:_0x36c79a,tdx:_0x15d9ba}=_0x5777ed;if(_0x36c79a['length']===0x0)return console[_0x160a3b(0x86)](_0x160a3b(0x83)),console[_0x160a3b(0x86)]('Usage:\x20tdx\x20segment\x20describe\x20<path>'),console['error'](_0x160a3b(0x72)),console[_0x160a3b(0x86)](_0x160a3b(0x98)),console[_0x160a3b(0x86)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x160a3b(0x86)](_0x160a3b(0x75)),0x1;try{const _0x4d0b24=_0x36c79a[0x0],_0x5c0b66=_0x226ee0[_0x160a3b(0xb0)];let _0xa543a8=_0x4d0b24;_0x5c0b66&&!_0x4d0b24[_0x160a3b(0xa1)]('/')&&(_0xa543a8=_0x5c0b66+'/'+_0x4d0b24,_0x226ee0[_0x160a3b(0xd1)]&&console[_0x160a3b(0x86)](_0x160a3b(0xba)+_0xa543a8));const _0x440b64=await withSpinner(_0x160a3b(0x7e)+_0xa543a8+'\x27...',()=>_0x15d9ba[_0x160a3b(0xb9)][_0x160a3b(0x8f)](_0xa543a8),{'verbose':_0x226ee0[_0x160a3b(0xd1)]}),_0x3b6513=_0x440b64[_0x160a3b(0x90)];_0x226ee0[_0x160a3b(0xd1)]&&(console[_0x160a3b(0x86)](_0x160a3b(0x7b)+_0x3b6513['type']),console[_0x160a3b(0x86)]('Parent\x20ID:\x20'+_0x3b6513[_0x160a3b(0xa2)]),_0x3b6513[_0x160a3b(0xa6)]&&console[_0x160a3b(0x86)](_0x160a3b(0x9c)+_0x3b6513['folderId']),_0x3b6513[_0x160a3b(0x81)]&&console[_0x160a3b(0x86)]('Segment\x20ID:\x20'+_0x3b6513[_0x160a3b(0x81)]));if(_0x3b6513['type']==='parent'){const _0x4fefc0=await withSpinner(_0x160a3b(0xae),()=>_0x15d9ba['segment'][_0x160a3b(0xcd)](_0x3b6513['parentId']),{'verbose':_0x226ee0['verbose']});await handleSDKOutput([_0x4fefc0[_0x160a3b(0x90)]],_0x226ee0);}else{if(_0x3b6513[_0x160a3b(0x9f)]===_0x160a3b(0xdc)){if(!_0x3b6513[_0x160a3b(0xa6)])throw new SDKError(ErrorCode[_0x160a3b(0xa3)],_0x160a3b(0xd6));const _0x414c5a=await withSpinner(_0x160a3b(0xa4),()=>_0x15d9ba[_0x160a3b(0xb9)]['getFolder'](_0x3b6513[_0x160a3b(0xa6)]),{'verbose':_0x226ee0['verbose']});await handleSDKOutput([_0x414c5a[_0x160a3b(0x90)]],_0x226ee0);}else{if(_0x3b6513[_0x160a3b(0x9f)]===_0x160a3b(0xb9)){if(!_0x3b6513['segmentId'])throw new SDKError(ErrorCode[_0x160a3b(0xa3)],_0x160a3b(0x7f));const _0x56ca4a=await withSpinner(_0x160a3b(0xcc),()=>_0x15d9ba['segment'][_0x160a3b(0x74)](_0x3b6513[_0x160a3b(0xa2)],_0x3b6513['segmentId']),{'verbose':_0x226ee0[_0x160a3b(0xd1)]});await handleSDKOutput([_0x56ca4a[_0x160a3b(0x90)]],_0x226ee0);}}}return 0x0;}catch(_0x460b58){if(_0x460b58 instanceof SDKError)return console[_0x160a3b(0x86)]('Error:\x20'+_0x460b58[_0x160a3b(0xe6)]),_0x460b58['cause']&&console['error'](_0x160a3b(0xa0)+_0x460b58[_0x160a3b(0xe2)]),0x1;throw _0x460b58;}}}export class SegmentShowCommand extends BaseCommand{[a22_0x3911c0(0x80)]='segment:show';[a22_0x3911c0(0x79)]='Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results';async['execute'](_0x2a9456){const _0x5a1f35=a22_0x3911c0,{options:_0x2c559f,args:_0x3a675e,tdx:_0x3c12c4}=_0x2a9456;if(_0x3a675e[_0x5a1f35(0xdb)]===0x0)return console['error'](_0x5a1f35(0xa7)),console[_0x5a1f35(0x86)](_0x5a1f35(0xa5)),console['error'](_0x5a1f35(0x72)),console[_0x5a1f35(0x86)]('\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22'),console[_0x5a1f35(0x86)](_0x5a1f35(0xdf)),console[_0x5a1f35(0x86)]('\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x3a052e=_0x3a675e[0x0],_0x26219c=_0x2c559f[_0x5a1f35(0xb0)];let _0xae2140=_0x3a052e;_0x26219c&&!_0x3a052e[_0x5a1f35(0xa1)]('/')&&(_0xae2140=_0x26219c+'/'+_0x3a052e,_0x2c559f['verbose']&&console[_0x5a1f35(0x86)]('Resolved\x20relative\x20path\x20to:\x20'+_0xae2140));const _0x845e85=await withSpinner(_0x5a1f35(0x7e)+_0xae2140+'\x27...',()=>_0x3c12c4['segment'][_0x5a1f35(0x8f)](_0xae2140),{'verbose':_0x2c559f[_0x5a1f35(0xd1)]}),_0xe38805=_0x845e85[_0x5a1f35(0x90)];_0x2c559f[_0x5a1f35(0xd1)]&&(console[_0x5a1f35(0x86)](_0x5a1f35(0x7b)+_0xe38805['type']),console[_0x5a1f35(0x86)](_0x5a1f35(0x8e)+_0xe38805[_0x5a1f35(0xa2)]));if(_0xe38805[_0x5a1f35(0x9f)]===_0x5a1f35(0xdc))return console['error']('Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.'),console[_0x5a1f35(0x86)]('Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details'),0x1;let _0x5e82f1;if(_0xe38805[_0x5a1f35(0x9f)]===_0x5a1f35(0xcf)){const _0x5877fd=await withSpinner(_0x5a1f35(0xde),()=>_0x3c12c4[_0x5a1f35(0xb9)][_0x5a1f35(0xc1)](_0xe38805[_0x5a1f35(0xa2)]),{'verbose':_0x2c559f[_0x5a1f35(0xd1)]});_0x5e82f1=_0x5877fd[_0x5a1f35(0x90)];}else{if(!_0xe38805['segmentId'])throw new SDKError(ErrorCode[_0x5a1f35(0xa3)],_0x5a1f35(0x7f));const _0x29ff3c=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3c12c4[_0x5a1f35(0xb9)]['getSegmentSQL'](_0xe38805[_0x5a1f35(0xa2)],_0xe38805['segmentId']),{'verbose':_0x2c559f[_0x5a1f35(0xd1)]});_0x5e82f1=_0x29ff3c[_0x5a1f35(0x90)];}const _0x4e729f=resolveLimit(_0x2c559f['limit'],DEFAULT_DISPLAY_LIMIT),_0x223c80=/\bLIMIT\s+\d+/i[_0x5a1f35(0x77)](_0x5e82f1);!_0x223c80&&(_0x5e82f1=_0x5e82f1[_0x5a1f35(0xb6)]()[_0x5a1f35(0xaa)](/;+$/,''),_0x5e82f1=_0x5a1f35(0xd7)+_0x5e82f1+_0x5a1f35(0xd3)+_0x4e729f);_0x2c559f[_0x5a1f35(0xd1)]&&console['error']('SQL\x20query:\x0a'+_0x5e82f1);const _0x5eb99c=await withQuerySpinner('Executing\x20segment\x20query...',async _0x55b1e1=>{const _0x3b3c40=_0x5a1f35,_0x2bdc25=await _0x3c12c4[_0x3b3c40(0xb1)](_0x5e82f1,{'catalog':'td','schema':_0x3b3c40(0x73),'onJobId':_0x519534=>{_0x55b1e1['setJobId'](_0x519534);}});return _0x2bdc25;},{'verbose':_0x2c559f[_0x5a1f35(0xd1)]}),_0x3003dd=_0x5eb99c[_0x5a1f35(0x90)],_0x146ebd=_0x3003dd[_0x5a1f35(0x9a)]?_0x5a1f35(0xc6)+_0x3003dd[_0x5a1f35(0x9a)]+']':'';return console[_0x5a1f35(0x86)](_0x5a1f35(0xbe)+_0x3003dd[_0x5a1f35(0xb8)][_0x5a1f35(0x92)][_0x5a1f35(0xe0)]()+_0x5a1f35(0xe1)+(_0x5a1f35(0xc3)+formatElapsed(_0x3003dd[_0x5a1f35(0xb8)][_0x5a1f35(0x94)])+_0x146ebd)),await handleQueryOutput(_0x3003dd,_0x2c559f),0x0;}catch(_0x5dd630){if(_0x5dd630 instanceof SDKError)return console[_0x5a1f35(0x86)](_0x5a1f35(0x84)+_0x5dd630[_0x5a1f35(0xab)]+']'),console[_0x5a1f35(0x86)]('\x0a'+_0x5dd630[_0x5a1f35(0xe6)]),0x1;throw _0x5dd630;}}}export class SegmentFolderListCommand extends BaseCommand{['name']=a22_0x3911c0(0xe3);[a22_0x3911c0(0x79)]=a22_0x3911c0(0xb5);async['execute'](_0x2dddbd){const _0x44c142=a22_0x3911c0,{options:_0x41d6f0,args:_0x17c8ba,tdx:_0xca3f7f}=_0x2dddbd;if(_0x17c8ba[_0x44c142(0xdb)]===0x0)return console[_0x44c142(0x86)](_0x44c142(0xc7)),console[_0x44c142(0x86)]('Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>'),0x1;const _0x4a42bd=_0x17c8ba[0x0];try{_0x41d6f0['verbose']&&(console[_0x44c142(0x86)](_0x44c142(0xd5)+_0x41d6f0['site']),console[_0x44c142(0x86)]('Parent\x20name:\x20'+_0x4a42bd));const _0x2d7a7f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4a42bd+_0x44c142(0xc8),()=>_0xca3f7f[_0x44c142(0xb9)][_0x44c142(0x87)](_0x4a42bd),{'verbose':_0x41d6f0[_0x44c142(0xd1)]}),_0x10215b=_0x2d7a7f[_0x44c142(0x90)];_0x41d6f0[_0x44c142(0xd1)]&&console[_0x44c142(0x86)]('Resolved\x20parent\x20ID:\x20'+_0x10215b);const _0xf88c24=await withSpinner(_0x44c142(0x97)+_0x4a42bd+_0x44c142(0xc8),()=>_0xca3f7f[_0x44c142(0xb9)][_0x44c142(0xb4)](_0x10215b),{'verbose':_0x41d6f0[_0x44c142(0xd1)]}),_0x53b9ea=_0xf88c24[_0x44c142(0x90)];return console[_0x44c142(0x86)](_0x44c142(0x7c)+_0x53b9ea[_0x44c142(0xdb)]+'\x20folder'+(_0x53b9ea[_0x44c142(0xdb)]!==0x1?'s':'')),await handleSDKOutput(_0x53b9ea,_0x41d6f0),0x0;}catch(_0xff8192){if(_0xff8192 instanceof SDKError)return console['error']('Error:\x20'+_0xff8192[_0x44c142(0xe6)]),_0xff8192[_0x44c142(0xe2)]&&console['error'](_0x44c142(0xa0)+_0xff8192[_0x44c142(0xe2)]),0x1;throw _0xff8192;}}}function a22_0x500a(){const _0x3f814d=['Error:\x20Parent\x20segment\x20name\x20is\x20required','\x27...','Fetching\x20folder\x20\x27','417xmZIjB','Resolved\x20parent\x20ID:\x20','Fetching\x20segment\x20details...','getParent','623032YbyOTX','parent','75876lMbljj','verbose','Folder\x20name:\x20','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','format','Site:\x20','Folder\x20ID\x20missing\x20from\x20resolved\x20path','SELECT\x20*\x20FROM\x20(\x0a','295810cMiQee','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','resolveFolderId','length','folder','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','Fetching\x20SQL\x20for\x20parent\x20segment...','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','toLocaleString','\x20rows\x20','cause','segment:folder:list','segment:describe','Error:\x20','message','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Examples:','information_schema','getSegment','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','test','126jUHdqW','description','114407wZgxTD','Resolved\x20type:\x20','✔\x20Found\x20','Show\x20segment\x20or\x20folder\x20details','Resolving\x20path\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','name','segmentId','log','Error:\x20Path\x20or\x20name\x20is\x20required','✖\x20Query\x20failed\x20[','1200tUMZAy','error','resolveParentId','4KRZGfC','2492ueexUS','2116960EaiLQw','✔\x20Created\x20folder\x20\x27','site','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22','Parent\x20ID:\x20','resolvePathToResource','data','createFolder','processedRows','Resolving\x20parent\x20folder\x20\x27','elapsedTimeMillis','Fetching\x20SQL\x20for\x20segment...','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','Listing\x20folders\x20for\x20parent\x20\x27','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','jsonl','jobId','parentFolder','Folder\x20ID:\x20','22WgOOXI','segment:folder:create','type','\x20\x20Cause:\x20','includes','parentId','INTERNAL','Fetching\x20folder\x20details...','Usage:\x20tdx\x20segment\x20show\x20<path>','folderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','json','replace','code','segment:folder:show','Show\x20segment\x20folder\x20details','Fetching\x20parent\x20segment\x20details...','Resolving\x20folder\x20\x27','segmentPath','query','5228GQetNB','getSegmentSQL','listFolders','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','trim','\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','stats','segment','Resolved\x20relative\x20path\x20to:\x20','Creating\x20folder\x20\x27','Resolved\x20folder\x20ID:\x20','Resolving\x20parent\x20segment\x20\x27','✔\x20Query\x20completed:\x20Processed\x20','execute','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','getParentSQL','segment:sql','in\x20','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Parent\x20name:\x20','\x20[Job\x20ID:\x20'];a22_0x500a=function(){return _0x3f814d;};return a22_0x500a();}export class SegmentFolderShowCommand extends BaseCommand{['name']=a22_0x3911c0(0xac);['description']=a22_0x3911c0(0xad);async['execute'](_0x4f2726){const _0x2895a9=a22_0x3911c0,{options:_0x2710bc,args:_0x537d8c,tdx:_0x535bd1}=_0x4f2726;if(_0x537d8c[_0x2895a9(0xdb)]===0x0)return console[_0x2895a9(0x86)]('Error:\x20Folder\x20reference\x20is\x20required'),console[_0x2895a9(0x86)](_0x2895a9(0x71)),0x1;try{const {parentId:_0x39d698,childId:_0x2cdb5d}=parseSegmentRef(_0x537d8c[0x0]);_0x2710bc['verbose']&&(console['error'](_0x2895a9(0xd5)+_0x2710bc[_0x2895a9(0x8c)]),console['error'](_0x2895a9(0xc5)+_0x39d698),_0x2cdb5d&&console[_0x2895a9(0x86)]('Folder\x20name:\x20'+_0x2cdb5d));if(!_0x2cdb5d)return console[_0x2895a9(0x86)](_0x2895a9(0x96)),0x1;const _0x25979c=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x39d698+_0x2895a9(0xc8),()=>_0x535bd1['segment'][_0x2895a9(0x87)](_0x39d698),{'verbose':_0x2710bc['verbose']}),_0x29fb7f=_0x25979c[_0x2895a9(0x90)];_0x2710bc[_0x2895a9(0xd1)]&&console[_0x2895a9(0x86)](_0x2895a9(0xcb)+_0x29fb7f);const _0x4ed6be=await withSpinner(_0x2895a9(0xaf)+_0x2cdb5d+'\x27...',()=>_0x535bd1['segment'][_0x2895a9(0xda)](_0x29fb7f,_0x2cdb5d),{'verbose':_0x2710bc['verbose']}),_0x5b1191=_0x4ed6be[_0x2895a9(0x90)];_0x2710bc[_0x2895a9(0xd1)]&&console[_0x2895a9(0x86)](_0x2895a9(0xbc)+_0x5b1191);const _0x25c98b=await withSpinner(_0x2895a9(0xc9)+_0x2cdb5d+_0x2895a9(0xc8),()=>_0x535bd1[_0x2895a9(0xb9)]['getFolder'](_0x5b1191),{'verbose':_0x2710bc['verbose']});return await handleSDKOutput([_0x25c98b[_0x2895a9(0x90)]],_0x2710bc),0x0;}catch(_0x558a54){if(_0x558a54 instanceof SDKError)return console[_0x2895a9(0x86)](_0x2895a9(0xe5)+_0x558a54[_0x2895a9(0xe6)]),_0x558a54['cause']&&console[_0x2895a9(0x86)]('\x20\x20Cause:\x20'+_0x558a54[_0x2895a9(0xe2)]),0x1;throw _0x558a54;}}}export class SegmentSQLCommand extends BaseCommand{[a22_0x3911c0(0x80)]=a22_0x3911c0(0xc2);[a22_0x3911c0(0x79)]=a22_0x3911c0(0xd9);async['execute'](_0x15ec14){const _0x163ad6=a22_0x3911c0,{options:_0x4ba2c5,args:_0x5c0886,tdx:_0x349c05}=_0x15ec14;if(_0x5c0886[_0x163ad6(0xdb)]===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20segment\x20sql\x20<path>'),console['error'](_0x163ad6(0x72)),console[_0x163ad6(0x86)](_0x163ad6(0x8d)),console[_0x163ad6(0x86)](_0x163ad6(0xc4)),console[_0x163ad6(0x86)](_0x163ad6(0xb7)),0x1;try{const _0x54bfb2=_0x5c0886[0x0],_0x494ae3=_0x4ba2c5[_0x163ad6(0xb0)];let _0x2c6922=_0x54bfb2;_0x494ae3&&!_0x54bfb2['includes']('/')&&(_0x2c6922=_0x494ae3+'/'+_0x54bfb2,_0x4ba2c5['verbose']&&console[_0x163ad6(0x86)](_0x163ad6(0xba)+_0x2c6922));const _0x2a8843=await withSpinner(_0x163ad6(0x7e)+_0x2c6922+_0x163ad6(0xc8),()=>_0x349c05[_0x163ad6(0xb9)][_0x163ad6(0x8f)](_0x2c6922),{'verbose':_0x4ba2c5[_0x163ad6(0xd1)]}),_0x35c263=_0x2a8843['data'];_0x4ba2c5[_0x163ad6(0xd1)]&&(console['error'](_0x163ad6(0x7b)+_0x35c263['type']),console[_0x163ad6(0x86)](_0x163ad6(0x8e)+_0x35c263[_0x163ad6(0xa2)]));if(_0x35c263[_0x163ad6(0x9f)]==='folder')return console[_0x163ad6(0x86)](_0x163ad6(0xa8)),console[_0x163ad6(0x86)](_0x163ad6(0xdd)),0x1;let _0x2e622d;if(_0x35c263['type']==='parent'){const _0x3a3acc=await withSpinner(_0x163ad6(0xde),()=>_0x349c05[_0x163ad6(0xb9)][_0x163ad6(0xc1)](_0x35c263[_0x163ad6(0xa2)]),{'verbose':_0x4ba2c5['verbose']});_0x2e622d=_0x3a3acc[_0x163ad6(0x90)];}else{if(!_0x35c263[_0x163ad6(0x81)])throw new SDKError(ErrorCode['INTERNAL'],_0x163ad6(0x7f));const _0x2c6a4a=await withSpinner(_0x163ad6(0x95),()=>_0x349c05[_0x163ad6(0xb9)][_0x163ad6(0xb3)](_0x35c263[_0x163ad6(0xa2)],_0x35c263[_0x163ad6(0x81)]),{'verbose':_0x4ba2c5[_0x163ad6(0xd1)]});_0x2e622d=_0x2c6a4a[_0x163ad6(0x90)];}return _0x4ba2c5[_0x163ad6(0xd4)]===_0x163ad6(0xa9)||_0x4ba2c5[_0x163ad6(0xd4)]===_0x163ad6(0x99)?await handleSDKOutput([{'sql':_0x2e622d}],_0x4ba2c5):console[_0x163ad6(0x82)](_0x2e622d),0x0;}catch(_0x12fa13){if(_0x12fa13 instanceof SDKError)return console[_0x163ad6(0x86)](_0x163ad6(0xe5)+_0x12fa13[_0x163ad6(0xe6)]),_0x12fa13[_0x163ad6(0xe2)]&&console['error'](_0x163ad6(0xa0)+_0x12fa13[_0x163ad6(0xe2)]),0x1;throw _0x12fa13;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a22_0x3911c0(0x80)]=a22_0x3911c0(0x9e);['description']='Create\x20segment\x20folder\x20for\x20organization';async[a22_0x3911c0(0xbf)](_0x29c7de){const _0x3dd4e9=a22_0x3911c0,{options:_0x554fe0,args:_0x7577ec,tdx:_0x259aec}=_0x29c7de,_0x281427=_0x554fe0;if(_0x7577ec[_0x3dd4e9(0xdb)]<0x2)return console[_0x3dd4e9(0x86)](_0x3dd4e9(0x76)),console[_0x3dd4e9(0x86)](_0x3dd4e9(0xc0)),0x1;const _0x10c866=_0x7577ec[0x0],_0x9b6c3e=_0x7577ec[0x1];_0x281427[_0x3dd4e9(0xd1)]&&(console[_0x3dd4e9(0x86)](_0x3dd4e9(0xd5)+_0x281427[_0x3dd4e9(0x8c)]),console[_0x3dd4e9(0x86)]('Parent\x20segment:\x20'+_0x10c866),console['error'](_0x3dd4e9(0xd2)+_0x9b6c3e));let _0x3888cf;if(_0x281427[_0x3dd4e9(0x9b)]){const _0x457fe1=_0x281427['parentFolder'],_0x37f574=await withSpinner(_0x3dd4e9(0xbd)+_0x10c866+_0x3dd4e9(0xc8),()=>_0x259aec[_0x3dd4e9(0xb9)][_0x3dd4e9(0x87)](_0x10c866),{'verbose':_0x281427[_0x3dd4e9(0xd1)]}),_0x2cf996=_0x37f574[_0x3dd4e9(0x90)],_0x40f98e=await withSpinner(_0x3dd4e9(0x93)+_0x457fe1+_0x3dd4e9(0xc8),()=>_0x259aec['segment'][_0x3dd4e9(0xda)](_0x2cf996,_0x457fe1),{'verbose':_0x281427[_0x3dd4e9(0xd1)]});_0x3888cf=_0x40f98e[_0x3dd4e9(0x90)],_0x281427[_0x3dd4e9(0xd1)]&&console['error']('Resolved\x20parent\x20folder\x20ID:\x20'+_0x3888cf);}const _0x4be87a={'name':_0x9b6c3e,'description':_0x281427[_0x3dd4e9(0x79)],'parentFolderId':_0x3888cf},_0x40e331=await withSpinner(_0x3dd4e9(0xbb)+_0x9b6c3e+'\x27...',()=>_0x259aec['segment'][_0x3dd4e9(0x91)](_0x10c866,_0x4be87a),{'verbose':_0x281427[_0x3dd4e9(0xd1)]}),_0x5eb0c4=_0x40e331[_0x3dd4e9(0x90)];return console[_0x3dd4e9(0x86)](_0x3dd4e9(0x8b)+_0x5eb0c4[_0x3dd4e9(0x80)]+'\x27\x20with\x20ID:\x20'+_0x5eb0c4['id']),await handleSDKOutput([_0x5eb0c4],_0x281427),0x0;}}
1
+ const a22_0x22b1fd=a22_0x4942;(function(_0x388dfc,_0x3586e7){const _0x3dc287=a22_0x4942,_0x33c4a2=_0x388dfc();while(!![]){try{const _0x44135a=parseInt(_0x3dc287(0x17f))/0x1*(parseInt(_0x3dc287(0x19b))/0x2)+-parseInt(_0x3dc287(0x140))/0x3+parseInt(_0x3dc287(0x17b))/0x4+parseInt(_0x3dc287(0x18a))/0x5*(-parseInt(_0x3dc287(0x155))/0x6)+-parseInt(_0x3dc287(0x14b))/0x7*(parseInt(_0x3dc287(0x160))/0x8)+-parseInt(_0x3dc287(0x14e))/0x9+-parseInt(_0x3dc287(0x16c))/0xa*(-parseInt(_0x3dc287(0x182))/0xb);if(_0x44135a===_0x3586e7)break;else _0x33c4a2['push'](_0x33c4a2['shift']());}catch(_0x52e89c){_0x33c4a2['push'](_0x33c4a2['shift']());}}}(a22_0x4596,0xe32a1));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';function a22_0x4942(_0x2a5611,_0x2ddf13){const _0x459685=a22_0x4596();return a22_0x4942=function(_0x4942b1,_0x15df9a){_0x4942b1=_0x4942b1-0x132;let _0x474cac=_0x459685[_0x4942b1];return _0x474cac;},a22_0x4942(_0x2a5611,_0x2ddf13);}export class SegmentDescribeCommand extends BaseCommand{[a22_0x22b1fd(0x1a1)]=a22_0x22b1fd(0x141);['description']=a22_0x22b1fd(0x193);async[a22_0x22b1fd(0x188)](_0x4c1e2f){const _0x5796f9=a22_0x22b1fd,{options:_0x24e40d,args:_0x543db7,tdx:_0x1a7448}=_0x4c1e2f;if(_0x543db7[_0x5796f9(0x194)]===0x0)return console[_0x5796f9(0x134)](_0x5796f9(0x13d)),console[_0x5796f9(0x134)](_0x5796f9(0x19c)),console[_0x5796f9(0x134)](_0x5796f9(0x195)),console[_0x5796f9(0x134)](_0x5796f9(0x14d)),console[_0x5796f9(0x134)](_0x5796f9(0x18f)),console[_0x5796f9(0x134)]('\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x5514ec=_0x543db7[0x0],_0x42f1bc=_0x24e40d[_0x5796f9(0x169)];let _0x5de153=_0x5514ec;_0x42f1bc&&!_0x5514ec[_0x5796f9(0x13b)]('/')&&(_0x5de153=_0x42f1bc+'/'+_0x5514ec,_0x24e40d['verbose']&&console[_0x5796f9(0x134)](_0x5796f9(0x137)+_0x5de153));const _0x7443a2=await withSpinner(_0x5796f9(0x146)+_0x5de153+'\x27...',()=>_0x1a7448['segment'][_0x5796f9(0x163)](_0x5de153),{'verbose':_0x24e40d[_0x5796f9(0x170)]}),_0x230c35=_0x7443a2[_0x5796f9(0x168)];_0x24e40d[_0x5796f9(0x170)]&&(console[_0x5796f9(0x134)](_0x5796f9(0x164)+_0x230c35[_0x5796f9(0x161)]),console[_0x5796f9(0x134)](_0x5796f9(0x148)+_0x230c35[_0x5796f9(0x18d)]),_0x230c35['folderId']&&console[_0x5796f9(0x134)](_0x5796f9(0x1a2)+_0x230c35[_0x5796f9(0x176)]),_0x230c35[_0x5796f9(0x14c)]&&console[_0x5796f9(0x134)](_0x5796f9(0x150)+_0x230c35[_0x5796f9(0x14c)]));if(_0x230c35[_0x5796f9(0x161)]===_0x5796f9(0x13a)){const _0x50443c=await withSpinner(_0x5796f9(0x1a0),()=>_0x1a7448['segment'][_0x5796f9(0x174)](_0x230c35[_0x5796f9(0x18d)]),{'verbose':_0x24e40d[_0x5796f9(0x170)]});await handleSDKOutput([_0x50443c[_0x5796f9(0x168)]],_0x24e40d);}else{if(_0x230c35[_0x5796f9(0x161)]===_0x5796f9(0x179)){if(!_0x230c35['folderId'])throw new SDKError(ErrorCode[_0x5796f9(0x13f)],_0x5796f9(0x18e));const _0x18084d=await withSpinner('Fetching\x20folder\x20details...',()=>_0x1a7448[_0x5796f9(0x1a8)]['getFolder'](_0x230c35[_0x5796f9(0x176)]),{'verbose':_0x24e40d[_0x5796f9(0x170)]});await handleSDKOutput([_0x18084d['data']],_0x24e40d);}else{if(_0x230c35[_0x5796f9(0x161)]===_0x5796f9(0x1a8)){if(!_0x230c35[_0x5796f9(0x14c)])throw new SDKError(ErrorCode[_0x5796f9(0x13f)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2db466=await withSpinner(_0x5796f9(0x139),()=>_0x1a7448[_0x5796f9(0x1a8)][_0x5796f9(0x18c)](_0x230c35[_0x5796f9(0x18d)],_0x230c35[_0x5796f9(0x14c)]),{'verbose':_0x24e40d['verbose']});await handleSDKOutput([_0x2db466[_0x5796f9(0x168)]],_0x24e40d);}}}return 0x0;}catch(_0xb5da1d){if(_0xb5da1d instanceof SDKError)return console[_0x5796f9(0x134)](_0x5796f9(0x152)+_0xb5da1d[_0x5796f9(0x16f)]),_0xb5da1d[_0x5796f9(0x1aa)]&&console[_0x5796f9(0x134)](_0x5796f9(0x1a7)+_0xb5da1d[_0x5796f9(0x1aa)]),0x1;throw _0xb5da1d;}}}export class SegmentShowCommand extends BaseCommand{[a22_0x22b1fd(0x1a1)]='segment:show';['description']=a22_0x22b1fd(0x17d);async[a22_0x22b1fd(0x188)](_0x45a4f4){const _0x245c3a=a22_0x22b1fd,{options:_0x271f00,args:_0x5cd6d5,tdx:_0x3644b1}=_0x45a4f4;if(_0x5cd6d5[_0x245c3a(0x194)]===0x0)return console[_0x245c3a(0x134)](_0x245c3a(0x190)),console['error'](_0x245c3a(0x151)),console['error'](_0x245c3a(0x195)),console[_0x245c3a(0x134)](_0x245c3a(0x19a)),console[_0x245c3a(0x134)](_0x245c3a(0x17a)),console[_0x245c3a(0x134)](_0x245c3a(0x1a3)),0x1;try{const _0x1a0153=_0x5cd6d5[0x0],_0x130681=_0x271f00[_0x245c3a(0x169)];let _0x176ab9=_0x1a0153;_0x130681&&!_0x1a0153[_0x245c3a(0x13b)]('/')&&(_0x176ab9=_0x130681+'/'+_0x1a0153,_0x271f00[_0x245c3a(0x170)]&&console[_0x245c3a(0x134)]('Resolved\x20relative\x20path\x20to:\x20'+_0x176ab9));const _0x2362ce=await withSpinner(_0x245c3a(0x146)+_0x176ab9+_0x245c3a(0x167),()=>_0x3644b1[_0x245c3a(0x1a8)][_0x245c3a(0x163)](_0x176ab9),{'verbose':_0x271f00[_0x245c3a(0x170)]}),_0x54e6fa=_0x2362ce[_0x245c3a(0x168)];_0x271f00[_0x245c3a(0x170)]&&(console[_0x245c3a(0x134)]('Resolved\x20type:\x20'+_0x54e6fa[_0x245c3a(0x161)]),console[_0x245c3a(0x134)](_0x245c3a(0x148)+_0x54e6fa[_0x245c3a(0x18d)]));if(_0x54e6fa['type']===_0x245c3a(0x179))return console[_0x245c3a(0x134)](_0x245c3a(0x153)),console[_0x245c3a(0x134)]('Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details'),0x1;let _0x406bfd;if(_0x54e6fa[_0x245c3a(0x161)]===_0x245c3a(0x13a)){const _0x2b712c=await withSpinner(_0x245c3a(0x199),()=>_0x3644b1[_0x245c3a(0x1a8)][_0x245c3a(0x13c)](_0x54e6fa[_0x245c3a(0x18d)]),{'verbose':_0x271f00[_0x245c3a(0x170)]});_0x406bfd=_0x2b712c[_0x245c3a(0x168)];}else{if(!_0x54e6fa['segmentId'])throw new SDKError(ErrorCode[_0x245c3a(0x13f)],_0x245c3a(0x177));const _0x2a8195=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3644b1[_0x245c3a(0x1a8)][_0x245c3a(0x1a9)](_0x54e6fa['parentId'],_0x54e6fa[_0x245c3a(0x14c)]),{'verbose':_0x271f00[_0x245c3a(0x170)]});_0x406bfd=_0x2a8195[_0x245c3a(0x168)];}const _0x2f0091=resolveLimit(_0x271f00[_0x245c3a(0x191)],DEFAULT_DISPLAY_LIMIT),_0x129717=/\bLIMIT\s+\d+/i[_0x245c3a(0x15f)](_0x406bfd);!_0x129717&&(_0x406bfd=_0x406bfd[_0x245c3a(0x154)]()[_0x245c3a(0x143)](/;+$/,''),_0x406bfd=_0x245c3a(0x138)+_0x406bfd+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x2f0091);_0x271f00['verbose']&&console[_0x245c3a(0x134)](_0x245c3a(0x145)+_0x406bfd);const _0x25a4d4=await withQuerySpinner(_0x245c3a(0x173),async _0x2a50ff=>{const _0x2012f2=_0x245c3a,_0x40d807=await _0x3644b1[_0x2012f2(0x18b)](_0x406bfd,{'catalog':'td','schema':'information_schema','onJobId':_0x22cd72=>{const _0x150cd6=_0x2012f2;_0x2a50ff[_0x150cd6(0x192)](_0x22cd72);}});return _0x40d807;},{'verbose':_0x271f00['verbose']}),_0x291f4d=_0x25a4d4['data'],_0x5b44ea=_0x291f4d[_0x245c3a(0x165)]?_0x245c3a(0x15b)+_0x291f4d[_0x245c3a(0x165)]+']':'';return console['error'](_0x245c3a(0x16b)+_0x291f4d[_0x245c3a(0x13e)][_0x245c3a(0x14a)][_0x245c3a(0x136)]()+'\x20rows\x20'+(_0x245c3a(0x189)+formatElapsed(_0x291f4d[_0x245c3a(0x13e)]['elapsedTimeMillis'])+_0x5b44ea)),await handleQueryOutput(_0x291f4d,_0x271f00),0x0;}catch(_0x34636b){if(_0x34636b instanceof SDKError)return console[_0x245c3a(0x134)]('✖\x20Query\x20failed\x20['+_0x34636b[_0x245c3a(0x135)]+']'),console[_0x245c3a(0x134)]('\x0a'+_0x34636b[_0x245c3a(0x16f)]),0x1;throw _0x34636b;}}}export class SegmentFolderListCommand extends BaseCommand{[a22_0x22b1fd(0x1a1)]=a22_0x22b1fd(0x166);[a22_0x22b1fd(0x175)]=a22_0x22b1fd(0x19d);async[a22_0x22b1fd(0x188)](_0x268a51){const _0x488537=a22_0x22b1fd,{options:_0xe604e3,args:_0x2bfc95,tdx:_0x33f243}=_0x268a51;if(_0x2bfc95['length']===0x0)return console[_0x488537(0x134)](_0x488537(0x180)),console[_0x488537(0x134)](_0x488537(0x178)),0x1;const _0x26bb3e=_0x2bfc95[0x0];try{_0xe604e3[_0x488537(0x170)]&&(console[_0x488537(0x134)](_0x488537(0x15c)+_0xe604e3[_0x488537(0x14f)]),console['error'](_0x488537(0x17e)+_0x26bb3e));const _0x425b56=await withSpinner(_0x488537(0x185)+_0x26bb3e+_0x488537(0x167),()=>_0x33f243[_0x488537(0x1a8)]['resolveParentId'](_0x26bb3e),{'verbose':_0xe604e3['verbose']}),_0x1a6c2e=_0x425b56[_0x488537(0x168)];_0xe604e3[_0x488537(0x170)]&&console['error'](_0x488537(0x16d)+_0x1a6c2e);const _0x855005=await withSpinner(_0x488537(0x1a6)+_0x26bb3e+_0x488537(0x167),()=>_0x33f243[_0x488537(0x1a8)][_0x488537(0x132)](_0x1a6c2e),{'verbose':_0xe604e3['verbose']}),_0x1674f1=_0x855005[_0x488537(0x168)];return console['error']('✔\x20Found\x20'+_0x1674f1[_0x488537(0x194)]+_0x488537(0x197)+(_0x1674f1[_0x488537(0x194)]!==0x1?'s':'')),await handleSDKOutput(_0x1674f1,_0xe604e3),0x0;}catch(_0x44076f){if(_0x44076f instanceof SDKError)return console[_0x488537(0x134)](_0x488537(0x152)+_0x44076f['message']),_0x44076f[_0x488537(0x1aa)]&&console[_0x488537(0x134)](_0x488537(0x1a7)+_0x44076f['cause']),0x1;throw _0x44076f;}}}export class SegmentFolderShowCommand extends BaseCommand{['name']=a22_0x22b1fd(0x15d);['description']='Show\x20segment\x20folder\x20details';async['execute'](_0x5e212c){const _0x5685fc=a22_0x22b1fd,{options:_0x39bd36,args:_0x22eb63,tdx:_0x2b5a0e}=_0x5e212c;if(_0x22eb63[_0x5685fc(0x194)]===0x0)return console[_0x5685fc(0x134)]('Error:\x20Folder\x20reference\x20is\x20required'),console[_0x5685fc(0x134)](_0x5685fc(0x15e)),0x1;try{const {parentId:_0x2d14c2,childId:_0x267fdb}=parseSegmentRef(_0x22eb63[0x0]);_0x39bd36[_0x5685fc(0x170)]&&(console[_0x5685fc(0x134)](_0x5685fc(0x15c)+_0x39bd36[_0x5685fc(0x14f)]),console[_0x5685fc(0x134)](_0x5685fc(0x17e)+_0x2d14c2),_0x267fdb&&console['error'](_0x5685fc(0x159)+_0x267fdb));if(!_0x267fdb)return console[_0x5685fc(0x134)](_0x5685fc(0x198)),0x1;const _0x2295b8=await withSpinner(_0x5685fc(0x185)+_0x2d14c2+_0x5685fc(0x167),()=>_0x2b5a0e[_0x5685fc(0x1a8)][_0x5685fc(0x15a)](_0x2d14c2),{'verbose':_0x39bd36[_0x5685fc(0x170)]}),_0x2d2b9d=_0x2295b8['data'];_0x39bd36[_0x5685fc(0x170)]&&console[_0x5685fc(0x134)](_0x5685fc(0x16d)+_0x2d2b9d);const _0x3cfdf0=await withSpinner(_0x5685fc(0x149)+_0x267fdb+'\x27...',()=>_0x2b5a0e['segment'][_0x5685fc(0x181)](_0x2d2b9d,_0x267fdb),{'verbose':_0x39bd36[_0x5685fc(0x170)]}),_0x5c773e=_0x3cfdf0['data'];_0x39bd36[_0x5685fc(0x170)]&&console[_0x5685fc(0x134)](_0x5685fc(0x17c)+_0x5c773e);const _0x39bc5a=await withSpinner(_0x5685fc(0x19e)+_0x267fdb+_0x5685fc(0x167),()=>_0x2b5a0e[_0x5685fc(0x1a8)]['getFolder'](_0x5c773e),{'verbose':_0x39bd36[_0x5685fc(0x170)]});return await handleSDKOutput([_0x39bc5a[_0x5685fc(0x168)]],_0x39bd36),0x0;}catch(_0x252034){if(_0x252034 instanceof SDKError)return console[_0x5685fc(0x134)](_0x5685fc(0x152)+_0x252034[_0x5685fc(0x16f)]),_0x252034[_0x5685fc(0x1aa)]&&console[_0x5685fc(0x134)](_0x5685fc(0x1a7)+_0x252034[_0x5685fc(0x1aa)]),0x1;throw _0x252034;}}}export class SegmentSQLCommand extends BaseCommand{[a22_0x22b1fd(0x1a1)]=a22_0x22b1fd(0x19f);[a22_0x22b1fd(0x175)]=a22_0x22b1fd(0x172);async[a22_0x22b1fd(0x188)](_0x415eed){const _0x26b5ad=a22_0x22b1fd,{options:_0x476010,args:_0x566a73,tdx:_0x1d3978}=_0x415eed;if(_0x566a73['length']===0x0)return console[_0x26b5ad(0x134)](_0x26b5ad(0x190)),console['error'](_0x26b5ad(0x16a)),console['error'](_0x26b5ad(0x195)),console[_0x26b5ad(0x134)](_0x26b5ad(0x171)),console[_0x26b5ad(0x134)](_0x26b5ad(0x157)),console[_0x26b5ad(0x134)]('\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x1bd9e8=_0x566a73[0x0],_0x591091=_0x476010[_0x26b5ad(0x169)];let _0x4ead76=_0x1bd9e8;_0x591091&&!_0x1bd9e8[_0x26b5ad(0x13b)]('/')&&(_0x4ead76=_0x591091+'/'+_0x1bd9e8,_0x476010['verbose']&&console[_0x26b5ad(0x134)](_0x26b5ad(0x137)+_0x4ead76));const _0x5516c4=await withSpinner('Resolving\x20path\x20\x27'+_0x4ead76+_0x26b5ad(0x167),()=>_0x1d3978[_0x26b5ad(0x1a8)][_0x26b5ad(0x163)](_0x4ead76),{'verbose':_0x476010[_0x26b5ad(0x170)]}),_0x17a2ee=_0x5516c4['data'];_0x476010[_0x26b5ad(0x170)]&&(console['error'](_0x26b5ad(0x164)+_0x17a2ee['type']),console[_0x26b5ad(0x134)](_0x26b5ad(0x148)+_0x17a2ee[_0x26b5ad(0x18d)]));if(_0x17a2ee[_0x26b5ad(0x161)]==='folder')return console['error'](_0x26b5ad(0x133)),console[_0x26b5ad(0x134)](_0x26b5ad(0x144)),0x1;let _0xbdf34f;if(_0x17a2ee[_0x26b5ad(0x161)]===_0x26b5ad(0x13a)){const _0x2dc355=await withSpinner(_0x26b5ad(0x199),()=>_0x1d3978[_0x26b5ad(0x1a8)][_0x26b5ad(0x13c)](_0x17a2ee[_0x26b5ad(0x18d)]),{'verbose':_0x476010[_0x26b5ad(0x170)]});_0xbdf34f=_0x2dc355['data'];}else{if(!_0x17a2ee[_0x26b5ad(0x14c)])throw new SDKError(ErrorCode[_0x26b5ad(0x13f)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x4338d5=await withSpinner(_0x26b5ad(0x162),()=>_0x1d3978[_0x26b5ad(0x1a8)]['getSegmentSQL'](_0x17a2ee[_0x26b5ad(0x18d)],_0x17a2ee['segmentId']),{'verbose':_0x476010['verbose']});_0xbdf34f=_0x4338d5[_0x26b5ad(0x168)];}return _0x476010['format']===_0x26b5ad(0x142)||_0x476010['format']===_0x26b5ad(0x187)?await handleSDKOutput([{'sql':_0xbdf34f}],_0x476010):console[_0x26b5ad(0x183)](_0xbdf34f),0x0;}catch(_0x328a0f){if(_0x328a0f instanceof SDKError)return console[_0x26b5ad(0x134)](_0x26b5ad(0x152)+_0x328a0f[_0x26b5ad(0x16f)]),_0x328a0f[_0x26b5ad(0x1aa)]&&console[_0x26b5ad(0x134)](_0x26b5ad(0x1a7)+_0x328a0f[_0x26b5ad(0x1aa)]),0x1;throw _0x328a0f;}}}function a22_0x4596(){const _0x388fa3=['trim','1528506ixDAKx','createFolder','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Resolved\x20parent\x20folder\x20ID:\x20','Folder\x20name:\x20','resolveParentId','\x20[Job\x20ID:\x20','Site:\x20','segment:folder:show','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','test','5680zgSZxR','type','Fetching\x20SQL\x20for\x20segment...','resolvePathToResource','Resolved\x20type:\x20','jobId','segment:folder:list','\x27...','data','segmentPath','Usage:\x20tdx\x20segment\x20sql\x20<path>','✔\x20Query\x20completed:\x20Processed\x20','380fBfeYW','Resolved\x20parent\x20ID:\x20','Parent\x20segment:\x20','message','verbose','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','Executing\x20segment\x20query...','getParent','description','folderId','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','folder','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','1495056ZtVXsn','Resolved\x20folder\x20ID:\x20','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results','Parent\x20name:\x20','707fYaKYV','Error:\x20Parent\x20segment\x20name\x20is\x20required','resolveFolderId','1588477JWvGMB','log','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','Resolving\x20parent\x20segment\x20\x27','parentFolder','jsonl','execute','in\x20','30UmYpTG','query','getSegment','parentId','Folder\x20ID\x20missing\x20from\x20resolved\x20path','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','limit','setJobId','Show\x20segment\x20or\x20folder\x20details','length','Examples:','\x27\x20with\x20ID:\x20','\x20folder','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','Fetching\x20SQL\x20for\x20parent\x20segment...','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22','2252cJSXPH','Usage:\x20tdx\x20segment\x20describe\x20<path>','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Fetching\x20folder\x20\x27','segment:sql','Fetching\x20parent\x20segment\x20details...','name','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','Creating\x20folder\x20\x27','Resolving\x20parent\x20folder\x20\x27','Listing\x20folders\x20for\x20parent\x20\x27','\x20\x20Cause:\x20','segment','getSegmentSQL','cause','listFolders','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','error','code','toLocaleString','Resolved\x20relative\x20path\x20to:\x20','SELECT\x20*\x20FROM\x20(\x0a','Fetching\x20segment\x20details...','parent','includes','getParentSQL','Error:\x20Path\x20or\x20name\x20is\x20required','stats','INTERNAL','3034347cjcAID','segment:describe','json','replace','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','SQL\x20query:\x0a','Resolving\x20path\x20\x27','✔\x20Created\x20folder\x20\x27','Parent\x20ID:\x20','Resolving\x20folder\x20\x27','processedRows','14728BHpmOV','segmentId','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','15237468ZgcQWa','site','Segment\x20ID:\x20','Usage:\x20tdx\x20segment\x20show\x20<path>','Error:\x20','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.'];a22_0x4596=function(){return _0x388fa3;};return a22_0x4596();}export class SegmentFolderCreateCommand extends BaseCommand{['name']='segment:folder:create';[a22_0x22b1fd(0x175)]='Create\x20segment\x20folder\x20for\x20organization';async[a22_0x22b1fd(0x188)](_0x366fab){const _0x5c5073=a22_0x22b1fd,{options:_0x29eedb,args:_0x362ebc,tdx:_0x26c9c9}=_0x366fab,_0x149b48=_0x29eedb;if(_0x362ebc[_0x5c5073(0x194)]<0x2)return console['error']('Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required'),console[_0x5c5073(0x134)](_0x5c5073(0x184)),0x1;const _0x519040=_0x362ebc[0x0],_0x1d4124=_0x362ebc[0x1];_0x149b48['verbose']&&(console[_0x5c5073(0x134)](_0x5c5073(0x15c)+_0x149b48[_0x5c5073(0x14f)]),console['error'](_0x5c5073(0x16e)+_0x519040),console[_0x5c5073(0x134)](_0x5c5073(0x159)+_0x1d4124));let _0x16e27b;if(_0x149b48[_0x5c5073(0x186)]){const _0x1a7111=_0x149b48['parentFolder'],_0x5ef77e=await withSpinner(_0x5c5073(0x185)+_0x519040+_0x5c5073(0x167),()=>_0x26c9c9[_0x5c5073(0x1a8)][_0x5c5073(0x15a)](_0x519040),{'verbose':_0x149b48[_0x5c5073(0x170)]}),_0x16e1f3=_0x5ef77e['data'],_0x4c978b=await withSpinner(_0x5c5073(0x1a5)+_0x1a7111+_0x5c5073(0x167),()=>_0x26c9c9['segment'][_0x5c5073(0x181)](_0x16e1f3,_0x1a7111),{'verbose':_0x149b48[_0x5c5073(0x170)]});_0x16e27b=_0x4c978b['data'],_0x149b48[_0x5c5073(0x170)]&&console[_0x5c5073(0x134)](_0x5c5073(0x158)+_0x16e27b);}const _0x29b857={'name':_0x1d4124,'description':_0x149b48['description'],'parentFolderId':_0x16e27b},_0x2160d7=await withSpinner(_0x5c5073(0x1a4)+_0x1d4124+_0x5c5073(0x167),()=>_0x26c9c9[_0x5c5073(0x1a8)][_0x5c5073(0x156)](_0x519040,_0x29b857),{'verbose':_0x149b48[_0x5c5073(0x170)]}),_0x42873d=_0x2160d7[_0x5c5073(0x168)];return console[_0x5c5073(0x134)](_0x5c5073(0x147)+_0x42873d[_0x5c5073(0x1a1)]+_0x5c5073(0x196)+_0x42873d['id']),await handleSDKOutput([_0x42873d],_0x149b48),0x0;}}
@@ -1 +1 @@
1
- function a23_0x4d38(){const _0x13e520=['length','resolvePathToResource','\x27\x20with\x20ID:\x20','invisible','Target\x20path:\x20','data','includes','Create\x20child\x20segment\x20with\x20filtering\x20rules','Resolving\x20parent\x20segment\x20\x27','name','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','18598550stMkmn','folder','5MGhyZE','resolveParentId','2wQkzdS','15408JSdNKo','Resolved\x20folder\x20ID:\x20','segments','noCountPopulation','createSegment','error','4823mDiTkW','Site:\x20','rule','5248728YfRDHr','3625821chflrx','5318292heeosL','folderId','segment','kind','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','\x20\x20\x20Path:\x20','✔\x20Created\x20segment\x20\x27','Examples:','Resolving\x20folder\x20\x27','type','993081SdicKx','resolveFolderId','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','ruleFile','description','verbose','segmentPath','1002234SJQjSa','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Creating\x20segment\x20\x27','\x27...','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','Resolved\x20relative\x20path\x20to:\x20'];a23_0x4d38=function(){return _0x13e520;};return a23_0x4d38();}const a23_0x2113d4=a23_0x39d5;(function(_0x33ec97,_0x186347){const _0x507fbc=a23_0x39d5,_0x1e1cb5=_0x33ec97();while(!![]){try{const _0x2043e4=parseInt(_0x507fbc(0xe2))/0x1*(parseInt(_0x507fbc(0xff))/0x2)+parseInt(_0x507fbc(0x10a))/0x3+parseInt(_0x507fbc(0xd8))/0x4+parseInt(_0x507fbc(0xfd))/0x5*(-parseInt(_0x507fbc(0xe9))/0x6)+parseInt(_0x507fbc(0x106))/0x7*(-parseInt(_0x507fbc(0x100))/0x8)+parseInt(_0x507fbc(0x109))/0x9+-parseInt(_0x507fbc(0xfb))/0xa;if(_0x2043e4===_0x186347)break;else _0x1e1cb5['push'](_0x1e1cb5['shift']());}catch(_0x1aeb8e){_0x1e1cb5['push'](_0x1e1cb5['shift']());}}}(a23_0x4d38,0xb9ae1));import{BaseCommand}from'./command.js';function a23_0x39d5(_0x4bafff,_0x509889){const _0x4d38fd=a23_0x4d38();return a23_0x39d5=function(_0x39d546,_0x57f47e){_0x39d546=_0x39d546-0xd8;let _0x266e5c=_0x4d38fd[_0x39d546];return _0x266e5c;},a23_0x39d5(_0x4bafff,_0x509889);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a23_0x2113d4(0xf9)]='segment:create';[a23_0x2113d4(0xe6)]=a23_0x2113d4(0xf7);async['execute'](_0x5ec2df){const _0x3e7362=a23_0x2113d4,{options:_0x5d5f8d,args:_0x51ea3f,tdx:_0x38c4bf}=_0x5ec2df,_0x472a93=_0x5d5f8d;if(_0x51ea3f[_0x3e7362(0xf0)]===0x0)return console[_0x3e7362(0x105)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error'](_0x3e7362(0xee)),console['error'](_0x3e7362(0xdf)),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x3e7362(0x105)](_0x3e7362(0xdc)),console[_0x3e7362(0x105)](_0x3e7362(0xe4)),0x1;const _0x368cdc=_0x51ea3f[0x0],_0x377b97=_0x5d5f8d[_0x3e7362(0xe8)];let _0x3e6bcb=_0x368cdc;_0x377b97&&!_0x368cdc[_0x3e7362(0xf6)]('/')&&(_0x3e6bcb=_0x377b97+'/'+_0x368cdc,_0x472a93['verbose']&&console[_0x3e7362(0x105)](_0x3e7362(0xef)+_0x3e6bcb));const _0x30c10f=parsePath(_0x3e6bcb);if(_0x30c10f['segments'][_0x3e7362(0xf0)]<0x2)return console[_0x3e7362(0x105)](_0x3e7362(0xed)),console[_0x3e7362(0x105)](_0x3e7362(0xea)),0x1;const _0x29155f=_0x30c10f[_0x3e7362(0x102)][0x0],_0x51b3e5=getBaseName(_0x3e6bcb),_0x409e2a=getParentPath(_0x3e6bcb);_0x472a93[_0x3e7362(0xe7)]&&(console[_0x3e7362(0x105)](_0x3e7362(0x107)+_0x472a93['site']),console[_0x3e7362(0x105)](_0x3e7362(0xf4)+_0x3e6bcb),console[_0x3e7362(0x105)]('Parent:\x20'+_0x29155f),console[_0x3e7362(0x105)]('Segment\x20name:\x20'+_0x51b3e5),console[_0x3e7362(0x105)]('Parent\x20path:\x20'+_0x409e2a));const _0x30a2ce=await withSpinner(_0x3e7362(0xf8)+_0x29155f+_0x3e7362(0xec),()=>_0x38c4bf[_0x3e7362(0xda)][_0x3e7362(0xfe)](_0x29155f),{'verbose':_0x472a93[_0x3e7362(0xe7)]}),_0x48a283=_0x30a2ce[_0x3e7362(0xf5)];let _0x5ca558;if(_0x30c10f[_0x3e7362(0x102)][_0x3e7362(0xf0)]>0x2){const _0x321ed2=await withSpinner('Resolving\x20folder\x20path\x20\x27'+_0x409e2a+_0x3e7362(0xec),()=>_0x38c4bf['segment'][_0x3e7362(0xf1)](_0x409e2a),{'verbose':_0x472a93[_0x3e7362(0xe7)]}),_0x4bf955=_0x321ed2[_0x3e7362(0xf5)];if(_0x4bf955['type']!==_0x3e7362(0xfc)&&_0x4bf955[_0x3e7362(0xe1)]!=='parent')return console[_0x3e7362(0x105)](_0x3e7362(0xfa)),0x1;_0x5ca558=_0x4bf955[_0x3e7362(0xd9)];}else{if(_0x472a93[_0x3e7362(0xfc)]){const _0x46703e=await withSpinner(_0x3e7362(0xe0)+_0x472a93[_0x3e7362(0xfc)]+_0x3e7362(0xec),()=>_0x38c4bf['segment'][_0x3e7362(0xe3)](_0x48a283,_0x472a93[_0x3e7362(0xfc)]),{'verbose':_0x472a93[_0x3e7362(0xe7)]});_0x5ca558=_0x46703e[_0x3e7362(0xf5)];}}_0x472a93[_0x3e7362(0xe7)]&&_0x5ca558&&console[_0x3e7362(0x105)](_0x3e7362(0x101)+_0x5ca558);const _0x205206=await loadJSONFromOptions(_0x472a93[_0x3e7362(0x108)],_0x472a93[_0x3e7362(0xe5)]),_0x56e4e4={'name':_0x51b3e5,'description':_0x472a93[_0x3e7362(0xe6)],'rule':_0x205206,'kind':_0x472a93[_0x3e7362(0xdb)]!==undefined?parseInt(_0x472a93[_0x3e7362(0xdb)],0xa):undefined,'isVisible':_0x472a93[_0x3e7362(0xf3)]?![]:undefined,'segmentFolderId':_0x5ca558,'countPopulation':_0x472a93[_0x3e7362(0x103)]?![]:undefined},_0x5c54e9=await withSpinner(_0x3e7362(0xeb)+_0x51b3e5+_0x3e7362(0xec),()=>_0x38c4bf[_0x3e7362(0xda)][_0x3e7362(0x104)](_0x48a283,_0x56e4e4),{'verbose':_0x472a93[_0x3e7362(0xe7)]}),_0x1c9388=_0x5c54e9['data'];return console['error'](_0x3e7362(0xde)+_0x1c9388[_0x3e7362(0xf9)]+_0x3e7362(0xf2)+_0x1c9388['id']),_0x3e6bcb!==_0x368cdc&&console['error'](_0x3e7362(0xdd)+_0x3e6bcb),await handleSDKOutput([_0x1c9388],_0x472a93),0x0;}}
1
+ function a23_0x440d(_0x52efe3,_0xe22ccd){const _0x181e2b=a23_0x181e();return a23_0x440d=function(_0x440db7,_0x4b3aa9){_0x440db7=_0x440db7-0x105;let _0x3365b4=_0x181e2b[_0x440db7];return _0x3365b4;},a23_0x440d(_0x52efe3,_0xe22ccd);}const a23_0x4f0b06=a23_0x440d;(function(_0x477278,_0x344efa){const _0x4bbd44=a23_0x440d,_0x11ebd5=_0x477278();while(!![]){try{const _0x30cd6c=-parseInt(_0x4bbd44(0x105))/0x1+parseInt(_0x4bbd44(0x12c))/0x2*(-parseInt(_0x4bbd44(0x106))/0x3)+-parseInt(_0x4bbd44(0x114))/0x4*(parseInt(_0x4bbd44(0x115))/0x5)+-parseInt(_0x4bbd44(0x10c))/0x6+parseInt(_0x4bbd44(0x111))/0x7+-parseInt(_0x4bbd44(0x126))/0x8*(-parseInt(_0x4bbd44(0x11b))/0x9)+parseInt(_0x4bbd44(0x108))/0xa;if(_0x30cd6c===_0x344efa)break;else _0x11ebd5['push'](_0x11ebd5['shift']());}catch(_0x355cf6){_0x11ebd5['push'](_0x11ebd5['shift']());}}}(a23_0x181e,0xd5ba9));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a23_0x181e(){const _0x450ef9=['1108HhlTnI','8165FxLBww','segmentPath','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','error','noCountPopulation','\x27\x20with\x20ID:\x20','1275174oIGYkn','data','Examples:','segment','Resolving\x20folder\x20\x27','\x20\x20\x20Path:\x20','execute','createSegment','Site:\x20','Resolved\x20relative\x20path\x20to:\x20','description','72QmQsnu','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','segments','type','Resolving\x20parent\x20segment\x20\x27','resolveFolderId','2NFCrEX','segment:create','verbose','Parent:\x20','includes','1741935vYfAaZ','4423482qkoXzB','Create\x20child\x20segment\x20with\x20filtering\x20rules','39375160OXiaIt','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','name','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','7873032DPdpbL','length','resolveParentId','\x27...','Resolving\x20folder\x20path\x20\x27','4505795wyVjoV','folder','Parent\x20path:\x20'];a23_0x181e=function(){return _0x450ef9;};return a23_0x181e();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a23_0x4f0b06(0x10a)]=a23_0x4f0b06(0x12d);[a23_0x4f0b06(0x125)]=a23_0x4f0b06(0x107);async[a23_0x4f0b06(0x121)](_0x5925fa){const _0x48b984=a23_0x4f0b06,{options:_0x2d6009,args:_0x5f4e18,tdx:_0x37a783}=_0x5925fa,_0x358813=_0x2d6009;if(_0x5f4e18[_0x48b984(0x10d)]===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x48b984(0x118)](_0x48b984(0x10b)),console[_0x48b984(0x118)](_0x48b984(0x11d)),console[_0x48b984(0x118)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x48b984(0x118)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console[_0x48b984(0x118)](_0x48b984(0x109)),0x1;const _0x40e8c4=_0x5f4e18[0x0],_0x1b239e=_0x2d6009[_0x48b984(0x116)];let _0x357dba=_0x40e8c4;_0x1b239e&&!_0x40e8c4[_0x48b984(0x130)]('/')&&(_0x357dba=_0x1b239e+'/'+_0x40e8c4,_0x358813['verbose']&&console['error'](_0x48b984(0x124)+_0x357dba));const _0x11a40d=parsePath(_0x357dba);if(_0x11a40d['segments'][_0x48b984(0x10d)]<0x2)return console[_0x48b984(0x118)]('Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)'),console[_0x48b984(0x118)](_0x48b984(0x117)),0x1;const _0x221464=_0x11a40d[_0x48b984(0x128)][0x0],_0x498ee1=getBaseName(_0x357dba),_0x52d8bf=getParentPath(_0x357dba);_0x358813[_0x48b984(0x12e)]&&(console[_0x48b984(0x118)](_0x48b984(0x123)+_0x358813['site']),console[_0x48b984(0x118)]('Target\x20path:\x20'+_0x357dba),console[_0x48b984(0x118)](_0x48b984(0x12f)+_0x221464),console[_0x48b984(0x118)]('Segment\x20name:\x20'+_0x498ee1),console[_0x48b984(0x118)](_0x48b984(0x113)+_0x52d8bf));const _0x3c6c42=await withSpinner(_0x48b984(0x12a)+_0x221464+_0x48b984(0x10f),()=>_0x37a783[_0x48b984(0x11e)][_0x48b984(0x10e)](_0x221464),{'verbose':_0x358813['verbose']}),_0x1b9f40=_0x3c6c42[_0x48b984(0x11c)];let _0x445de4;if(_0x11a40d[_0x48b984(0x128)]['length']>0x2){const _0x3278a4=await withSpinner(_0x48b984(0x110)+_0x52d8bf+'\x27...',()=>_0x37a783[_0x48b984(0x11e)]['resolvePathToResource'](_0x52d8bf),{'verbose':_0x358813[_0x48b984(0x12e)]}),_0x5f5654=_0x3278a4[_0x48b984(0x11c)];if(_0x5f5654['type']!==_0x48b984(0x112)&&_0x5f5654[_0x48b984(0x129)]!=='parent')return console[_0x48b984(0x118)](_0x48b984(0x127)),0x1;_0x445de4=_0x5f5654['folderId'];}else{if(_0x358813[_0x48b984(0x112)]){const _0x275f45=await withSpinner(_0x48b984(0x11f)+_0x358813[_0x48b984(0x112)]+_0x48b984(0x10f),()=>_0x37a783[_0x48b984(0x11e)][_0x48b984(0x12b)](_0x1b9f40,_0x358813[_0x48b984(0x112)]),{'verbose':_0x358813['verbose']});_0x445de4=_0x275f45[_0x48b984(0x11c)];}}_0x358813[_0x48b984(0x12e)]&&_0x445de4&&console[_0x48b984(0x118)]('Resolved\x20folder\x20ID:\x20'+_0x445de4);const _0x17e32d=await loadJSONFromOptions(_0x358813['rule'],_0x358813['ruleFile']),_0x4455be={'name':_0x498ee1,'description':_0x358813[_0x48b984(0x125)],'rule':_0x17e32d,'kind':_0x358813['kind']!==undefined?parseInt(_0x358813['kind'],0xa):undefined,'isVisible':_0x358813['invisible']?![]:undefined,'segmentFolderId':_0x445de4,'countPopulation':_0x358813[_0x48b984(0x119)]?![]:undefined},_0x2e59dd=await withSpinner('Creating\x20segment\x20\x27'+_0x498ee1+_0x48b984(0x10f),()=>_0x37a783[_0x48b984(0x11e)][_0x48b984(0x122)](_0x1b9f40,_0x4455be),{'verbose':_0x358813[_0x48b984(0x12e)]}),_0x58c996=_0x2e59dd['data'];return console[_0x48b984(0x118)]('✔\x20Created\x20segment\x20\x27'+_0x58c996[_0x48b984(0x10a)]+_0x48b984(0x11a)+_0x58c996['id']),_0x357dba!==_0x40e8c4&&console[_0x48b984(0x118)](_0x48b984(0x120)+_0x357dba),await handleSDKOutput([_0x58c996],_0x358813),0x0;}}
@@ -1 +1 @@
1
- const a24_0x5d6da0=a24_0x2d3f;(function(_0x335288,_0x1175f6){const _0x32bc72=a24_0x2d3f,_0x38fa88=_0x335288();while(!![]){try{const _0x28d90a=parseInt(_0x32bc72(0x142))/0x1*(-parseInt(_0x32bc72(0x130))/0x2)+-parseInt(_0x32bc72(0x12f))/0x3+parseInt(_0x32bc72(0x131))/0x4+parseInt(_0x32bc72(0x143))/0x5*(parseInt(_0x32bc72(0x13e))/0x6)+parseInt(_0x32bc72(0x138))/0x7+-parseInt(_0x32bc72(0x134))/0x8+parseInt(_0x32bc72(0x139))/0x9*(parseInt(_0x32bc72(0x137))/0xa);if(_0x28d90a===_0x1175f6)break;else _0x38fa88['push'](_0x38fa88['shift']());}catch(_0x444316){_0x38fa88['push'](_0x38fa88['shift']());}}}(a24_0x10a3,0xe61fd));import{BaseCommand}from'./command.js';function a24_0x2d3f(_0x40d004,_0x329ea1){const _0x10a334=a24_0x10a3();return a24_0x2d3f=function(_0x2d3f83,_0x15c562){_0x2d3f83=_0x2d3f83-0x12c;let _0x9777ad=_0x10a334[_0x2d3f83];return _0x9777ad;},a24_0x2d3f(_0x40d004,_0x329ea1);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a24_0x10a3(){const _0x2efb56=['site','error','Listing\x20fields\x20for\x20\x27','execute','5597298JpGHZn','1154FMHBwA','3919636UtBAas','verbose','segment:fields','371544yLZcFS','Error:\x20Parent\x20segment\x20name\x20is\x20required','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','2541970KWeevW','2733626TmfhYs','63cKYmKp','List\x20available\x20fields\x20for\x20segmentation','Parent\x20segment:\x20','name','description','1266126jLGSIL','data','Site:\x20','length','877utNvLT','5ECngXq','\x27...'];a24_0x10a3=function(){return _0x2efb56;};return a24_0x10a3();}export class SegmentFieldsCommand extends BaseCommand{[a24_0x5d6da0(0x13c)]=a24_0x5d6da0(0x133);[a24_0x5d6da0(0x13d)]=a24_0x5d6da0(0x13a);async[a24_0x5d6da0(0x12e)](_0x8cc0a8){const _0x46f3d5=a24_0x5d6da0,{options:_0x2b603a,args:_0x8382a3,tdx:_0x5f1216}=_0x8cc0a8;if(_0x8382a3[_0x46f3d5(0x141)]===0x0)return console['error'](_0x46f3d5(0x135)),console['error'](_0x46f3d5(0x136)),0x1;const _0x1fdf39=_0x8382a3[0x0];_0x2b603a[_0x46f3d5(0x132)]&&(console[_0x46f3d5(0x12c)](_0x46f3d5(0x140)+_0x2b603a[_0x46f3d5(0x145)]),console[_0x46f3d5(0x12c)](_0x46f3d5(0x13b)+_0x1fdf39));const _0x3d4170=await withSpinner(_0x46f3d5(0x12d)+_0x1fdf39+_0x46f3d5(0x144),()=>_0x5f1216['segment']['listFields'](_0x1fdf39),{'verbose':_0x2b603a[_0x46f3d5(0x132)]}),_0x46dc96=_0x3d4170[_0x46f3d5(0x13f)];return console[_0x46f3d5(0x12c)]('✔\x20Found\x20'+_0x46dc96[_0x46f3d5(0x141)]+'\x20field'+(_0x46dc96['length']!==0x1?'s':'')),await handleSDKOutput(_0x46dc96,_0x2b603a),0x0;}}
1
+ const a24_0x51d6c0=a24_0x5a50;(function(_0x447692,_0x4fb1aa){const _0x1eba63=a24_0x5a50,_0x432114=_0x447692();while(!![]){try{const _0x4abf5c=parseInt(_0x1eba63(0x8f))/0x1*(parseInt(_0x1eba63(0x7f))/0x2)+-parseInt(_0x1eba63(0x7b))/0x3*(parseInt(_0x1eba63(0x90))/0x4)+-parseInt(_0x1eba63(0x83))/0x5+parseInt(_0x1eba63(0x7d))/0x6*(-parseInt(_0x1eba63(0x7e))/0x7)+-parseInt(_0x1eba63(0x8b))/0x8+-parseInt(_0x1eba63(0x7a))/0x9*(-parseInt(_0x1eba63(0x8e))/0xa)+-parseInt(_0x1eba63(0x88))/0xb*(-parseInt(_0x1eba63(0x84))/0xc);if(_0x4abf5c===_0x4fb1aa)break;else _0x432114['push'](_0x432114['shift']());}catch(_0x397377){_0x432114['push'](_0x432114['shift']());}}}(a24_0x1b8d,0x2ac25));function a24_0x5a50(_0x442f2c,_0x4a2e9a){const _0x1b8da6=a24_0x1b8d();return a24_0x5a50=function(_0x5a50a7,_0x128eeb){_0x5a50a7=_0x5a50a7-0x74;let _0x42eaa9=_0x1b8da6[_0x5a50a7];return _0x42eaa9;},a24_0x5a50(_0x442f2c,_0x4a2e9a);}function a24_0x1b8d(){const _0x4dcdb6=['segment:fields','275VIDHqA','\x27...','site','2654568UJoVHK','name','Parent\x20segment:\x20','39170WkZSYP','240721OiuBYG','112928gysVKK','description','segment','error','Site:\x20','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','verbose','Listing\x20fields\x20for\x20\x27','333DRGcgQ','12mIulXt','length','14568LUuxus','133YlRjcK','2qfKBVj','\x20field','listFields','execute','467015XMBudd','179412MRKwUl','Error:\x20Parent\x20segment\x20name\x20is\x20required','✔\x20Found\x20'];a24_0x1b8d=function(){return _0x4dcdb6;};return a24_0x1b8d();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a24_0x51d6c0(0x8c)]=a24_0x51d6c0(0x87);[a24_0x51d6c0(0x91)]='List\x20available\x20fields\x20for\x20segmentation';async[a24_0x51d6c0(0x82)](_0x2221cc){const _0x1519de=a24_0x51d6c0,{options:_0x16c0ee,args:_0x35c433,tdx:_0x571edb}=_0x2221cc;if(_0x35c433[_0x1519de(0x7c)]===0x0)return console[_0x1519de(0x75)](_0x1519de(0x85)),console[_0x1519de(0x75)](_0x1519de(0x77)),0x1;const _0x34052b=_0x35c433[0x0];_0x16c0ee[_0x1519de(0x78)]&&(console['error'](_0x1519de(0x76)+_0x16c0ee[_0x1519de(0x8a)]),console['error'](_0x1519de(0x8d)+_0x34052b));const _0x54ebfc=await withSpinner(_0x1519de(0x79)+_0x34052b+_0x1519de(0x89),()=>_0x571edb[_0x1519de(0x74)][_0x1519de(0x81)](_0x34052b),{'verbose':_0x16c0ee[_0x1519de(0x78)]}),_0x1521a1=_0x54ebfc['data'];return console[_0x1519de(0x75)](_0x1519de(0x86)+_0x1521a1[_0x1519de(0x7c)]+_0x1519de(0x80)+(_0x1521a1[_0x1519de(0x7c)]!==0x1?'s':'')),await handleSDKOutput(_0x1521a1,_0x16c0ee),0x0;}}
@@ -1 +1 @@
1
- const a25_0x544aac=a25_0x22db;(function(_0xa8a146,_0x248894){const _0x51231b=a25_0x22db,_0x5d859b=_0xa8a146();while(!![]){try{const _0x54b016=parseInt(_0x51231b(0x11c))/0x1+-parseInt(_0x51231b(0x121))/0x2*(-parseInt(_0x51231b(0x118))/0x3)+-parseInt(_0x51231b(0x115))/0x4+parseInt(_0x51231b(0x11d))/0x5*(parseInt(_0x51231b(0x114))/0x6)+-parseInt(_0x51231b(0x10f))/0x7+parseInt(_0x51231b(0x10e))/0x8+parseInt(_0x51231b(0x10d))/0x9;if(_0x54b016===_0x248894)break;else _0x5d859b['push'](_0x5d859b['shift']());}catch(_0x38cc65){_0x5d859b['push'](_0x5d859b['shift']());}}}(a25_0x1251,0x1eed5));function a25_0x22db(_0x55bbd0,_0xf45b02){const _0x1251ac=a25_0x1251();return a25_0x22db=function(_0x22db48,_0x20f52c){_0x22db48=_0x22db48-0x10b;let _0x20c484=_0x1251ac[_0x22db48];return _0x20c484;},a25_0x22db(_0x55bbd0,_0xf45b02);}function a25_0x1251(){const _0x14292a=['1104194JTFSuA','error','log','description','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','10236mPvgEW','274824kIxKow','format','execute','3vMAuVq','verbose','segment:pwd','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','144415gLtYvK','25NsDIGc','json','Show\x20current\x20segment/folder\x20context','segmentPath','142MeTver','jsonl','stringify','Context\x20details:','name','root','321120okRNBA','1315432CYdvdn'];a25_0x1251=function(){return _0x14292a;};return a25_0x1251();}import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a25_0x544aac(0x10b)]=a25_0x544aac(0x11a);[a25_0x544aac(0x112)]=a25_0x544aac(0x11f);async[a25_0x544aac(0x117)](_0x4a2bf2){const _0x431cb2=a25_0x544aac,{options:_0x4b2e41}=_0x4a2bf2;try{const _0x425df9=_0x4b2e41[_0x431cb2(0x120)];if(!_0x425df9)return _0x4b2e41[_0x431cb2(0x116)]===_0x431cb2(0x11e)||_0x4b2e41['format']===_0x431cb2(0x122)?console['log'](JSON[_0x431cb2(0x123)]({'path':'/','type':_0x431cb2(0x10c)})):console[_0x431cb2(0x111)]('/'),0x0;if(_0x4b2e41[_0x431cb2(0x116)]===_0x431cb2(0x11e)||_0x4b2e41['format']===_0x431cb2(0x122)){const _0x37b0d6={'path':_0x425df9};console['log'](JSON[_0x431cb2(0x123)](_0x37b0d6));}else console[_0x431cb2(0x111)](_0x425df9),_0x4b2e41[_0x431cb2(0x119)]&&(console['error'](''),console[_0x431cb2(0x110)](_0x431cb2(0x124)),console['error']('\x20\x20Path:\x20'+_0x425df9),console[_0x431cb2(0x110)](''),console[_0x431cb2(0x110)](_0x431cb2(0x11b)),console[_0x431cb2(0x110)](_0x431cb2(0x113)));return 0x0;}catch(_0x470dc6){throw _0x470dc6;}}}
1
+ const a25_0x1ca26f=a25_0x2b51;function a25_0x2b51(_0x2df5f7,_0x2efd0b){const _0xb91fe6=a25_0xb91f();return a25_0x2b51=function(_0x2b51c0,_0x560188){_0x2b51c0=_0x2b51c0-0x143;let _0x47e7d2=_0xb91fe6[_0x2b51c0];return _0x47e7d2;},a25_0x2b51(_0x2df5f7,_0x2efd0b);}(function(_0x3e67e3,_0x494a9f){const _0xa477d0=a25_0x2b51,_0x43d4ad=_0x3e67e3();while(!![]){try{const _0x1c60d8=-parseInt(_0xa477d0(0x149))/0x1+-parseInt(_0xa477d0(0x157))/0x2+-parseInt(_0xa477d0(0x154))/0x3*(parseInt(_0xa477d0(0x150))/0x4)+-parseInt(_0xa477d0(0x14a))/0x5*(-parseInt(_0xa477d0(0x14c))/0x6)+parseInt(_0xa477d0(0x147))/0x7*(parseInt(_0xa477d0(0x144))/0x8)+parseInt(_0xa477d0(0x155))/0x9*(-parseInt(_0xa477d0(0x14b))/0xa)+parseInt(_0xa477d0(0x152))/0xb*(parseInt(_0xa477d0(0x153))/0xc);if(_0x1c60d8===_0x494a9f)break;else _0x43d4ad['push'](_0x43d4ad['shift']());}catch(_0x33f305){_0x43d4ad['push'](_0x43d4ad['shift']());}}}(a25_0xb91f,0xcbdaa));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a25_0x1ca26f(0x143)]=a25_0x1ca26f(0x145);[a25_0x1ca26f(0x14d)]=a25_0x1ca26f(0x148);async['execute'](_0x3972b7){const _0x37b189=a25_0x1ca26f,{options:_0x4e7edc}=_0x3972b7;try{const _0x58ca3d=_0x4e7edc['segmentPath'];if(!_0x58ca3d)return _0x4e7edc[_0x37b189(0x159)]===_0x37b189(0x158)||_0x4e7edc[_0x37b189(0x159)]===_0x37b189(0x14e)?console[_0x37b189(0x15c)](JSON['stringify']({'path':'/','type':_0x37b189(0x15b)})):console[_0x37b189(0x15c)]('/'),0x0;if(_0x4e7edc[_0x37b189(0x159)]===_0x37b189(0x158)||_0x4e7edc['format']==='jsonl'){const _0x1eda87={'path':_0x58ca3d};console[_0x37b189(0x15c)](JSON[_0x37b189(0x156)](_0x1eda87));}else console[_0x37b189(0x15c)](_0x58ca3d),_0x4e7edc['verbose']&&(console[_0x37b189(0x15a)](''),console[_0x37b189(0x15a)]('Context\x20details:'),console[_0x37b189(0x15a)](_0x37b189(0x151)+_0x58ca3d),console[_0x37b189(0x15a)](''),console[_0x37b189(0x15a)](_0x37b189(0x14f)),console[_0x37b189(0x15a)](_0x37b189(0x146)));return 0x0;}catch(_0x15066a){throw _0x15066a;}}}function a25_0xb91f(){const _0x5bd924=['segment:pwd','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','42dYhqZO','Show\x20current\x20segment/folder\x20context','732652ICwaLe','2911430HMzBTp','4007770gYmrSg','12WcdmqU','description','jsonl','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','2172WXHWsV','\x20\x20Path:\x20','297bOBjso','1236120kiVogn','7290AYuzIi','9qcCUId','stringify','2669654DvTHpN','json','format','error','root','log','name','902520TSFPDQ'];a25_0xb91f=function(){return _0x5bd924;};return a25_0xb91f();}
@@ -1 +1 @@
1
- const a26_0x27bad5=a26_0xa4cd;(function(_0x1096a7,_0x3b189e){const _0x234133=a26_0xa4cd,_0x1cb4ea=_0x1096a7();while(!![]){try{const _0x3d3497=parseInt(_0x234133(0x13c))/0x1*(parseInt(_0x234133(0x12e))/0x2)+parseInt(_0x234133(0x147))/0x3+parseInt(_0x234133(0x121))/0x4*(parseInt(_0x234133(0x134))/0x5)+parseInt(_0x234133(0x125))/0x6+-parseInt(_0x234133(0x12f))/0x7*(parseInt(_0x234133(0x122))/0x8)+parseInt(_0x234133(0x144))/0x9+parseInt(_0x234133(0x13b))/0xa*(-parseInt(_0x234133(0x135))/0xb);if(_0x3d3497===_0x3b189e)break;else _0x1cb4ea['push'](_0x1cb4ea['shift']());}catch(_0x36ad1d){_0x1cb4ea['push'](_0x1cb4ea['shift']());}}}(a26_0x3ce2,0xa1994));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a26_0xa4cd(_0x5b7b24,_0x7e6692){const _0x3ce251=a26_0x3ce2();return a26_0xa4cd=function(_0xa4cd6b,_0x466158){_0xa4cd6b=_0xa4cd6b-0x11f;let _0x424a28=_0x3ce251[_0xa4cd6b];return _0x424a28;},a26_0xa4cd(_0x5b7b24,_0x7e6692);}import{loadJSONFromOptions}from'../utils/json-loader.js';function a26_0x3ce2(){const _0x16df35=['8ALDUIT','8696XuHPPN','rule','Resolved\x20folder\x20ID:\x20','3068604xIhjTk','length','Updating\x20segment\x20\x27','folder','updateSegmentById','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','parentId','description','✔\x20Updated\x20segment\x20\x27','502ccOugv','6335eRHcHx','\x20\x20\x20Path:\x20','includes','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','name','291755eKLszM','77fHUXjX','\x27...','data','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','verbose','type','1268430tzkrzx','3807XKXjSN','Resolved\x20type:\x20','Error:\x20Cannot\x20update\x20','resolveFolderId','segment:update','INTERNAL','Resolving\x20folder\x20\x27','resolvePathToResource','2554092kqOWWo','Update\x20existing\x20child\x20segment','error','1998189vmZEfX','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','kind','Examples:','Parent\x20ID:\x20','Resolved\x20relative\x20path\x20to:\x20','execute','segmentPath','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','ruleFile','segment'];a26_0x3ce2=function(){return _0x16df35;};return a26_0x3ce2();}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x27bad5(0x133)]=a26_0x27bad5(0x140);[a26_0x27bad5(0x12c)]=a26_0x27bad5(0x145);async[a26_0x27bad5(0x14d)](_0x4a977e){const _0x3c2a84=a26_0x27bad5,{options:_0x3208a5,args:_0x1ca44d,tdx:_0x27b9a0}=_0x4a977e,_0x55eeb5=_0x3208a5;if(_0x1ca44d[_0x3c2a84(0x126)]===0x0)return console[_0x3c2a84(0x146)](_0x3c2a84(0x148)),console[_0x3c2a84(0x146)](_0x3c2a84(0x138)),console['error'](_0x3c2a84(0x14a)),console[_0x3c2a84(0x146)](_0x3c2a84(0x12a)),console[_0x3c2a84(0x146)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x391204=_0x1ca44d[0x0],_0xd72586=_0x3208a5[_0x3c2a84(0x14e)];let _0x249df9=_0x391204;_0xd72586&&!_0x391204[_0x3c2a84(0x131)]('/')&&(_0x249df9=_0xd72586+'/'+_0x391204,_0x55eeb5[_0x3c2a84(0x139)]&&console[_0x3c2a84(0x146)](_0x3c2a84(0x14c)+_0x249df9));const _0xf44a2c=await withSpinner('Resolving\x20path\x20\x27'+_0x249df9+_0x3c2a84(0x136),()=>_0x27b9a0[_0x3c2a84(0x120)][_0x3c2a84(0x143)](_0x249df9),{'verbose':_0x55eeb5[_0x3c2a84(0x139)]}),_0x1b8eb2=_0xf44a2c[_0x3c2a84(0x137)];_0x55eeb5['verbose']&&console['error'](_0x3c2a84(0x13d)+_0x1b8eb2[_0x3c2a84(0x13a)]);if(_0x1b8eb2[_0x3c2a84(0x13a)]!==_0x3c2a84(0x120))return console[_0x3c2a84(0x146)](_0x3c2a84(0x13e)+_0x1b8eb2['type']+_0x3c2a84(0x132)),console['error'](_0x3c2a84(0x14f)),0x1;if(!_0x1b8eb2['segmentId'])throw new SDKError(ErrorCode[_0x3c2a84(0x141)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2206f9=_0x1b8eb2[_0x3c2a84(0x12b)],_0x12b6ef=_0x1b8eb2['segmentId'];_0x55eeb5[_0x3c2a84(0x139)]&&(console['error'](_0x3c2a84(0x14b)+_0x2206f9),console[_0x3c2a84(0x146)]('Segment\x20ID:\x20'+_0x12b6ef));let _0x2de92b;if(_0x55eeb5[_0x3c2a84(0x128)]){const _0x167bcf=_0x55eeb5[_0x3c2a84(0x128)],_0x1bd111=await withSpinner(_0x3c2a84(0x142)+_0x167bcf+_0x3c2a84(0x136),()=>_0x27b9a0[_0x3c2a84(0x120)][_0x3c2a84(0x13f)](_0x2206f9,_0x167bcf),{'verbose':_0x55eeb5['verbose']});_0x2de92b=parseInt(_0x1bd111[_0x3c2a84(0x137)],0xa),_0x55eeb5[_0x3c2a84(0x139)]&&console[_0x3c2a84(0x146)](_0x3c2a84(0x124)+_0x2de92b);}const _0x27af9e=await loadJSONFromOptions(_0x55eeb5[_0x3c2a84(0x123)],_0x55eeb5[_0x3c2a84(0x11f)]),_0x90d7b6={'name':_0x55eeb5[_0x3c2a84(0x133)],'description':_0x55eeb5[_0x3c2a84(0x12c)],'rule':_0x27af9e,'kind':_0x55eeb5['kind']!==undefined?parseInt(_0x55eeb5[_0x3c2a84(0x149)],0xa):undefined,'segmentFolderId':_0x2de92b},_0x31d812=await withSpinner(_0x3c2a84(0x127)+_0x1b8eb2['segmentName']+_0x3c2a84(0x136),()=>_0x27b9a0[_0x3c2a84(0x120)][_0x3c2a84(0x129)](_0x2206f9,_0x12b6ef,_0x90d7b6),{'verbose':_0x55eeb5[_0x3c2a84(0x139)]}),_0x3acccd=_0x31d812[_0x3c2a84(0x137)];return console[_0x3c2a84(0x146)](_0x3c2a84(0x12d)+_0x3acccd['name']+'\x27'),_0x249df9!==_0x391204&&console['error'](_0x3c2a84(0x130)+_0x249df9),await handleSDKOutput([_0x3acccd],_0x55eeb5),0x0;}}
1
+ const a26_0x112971=a26_0x4651;(function(_0x4d2e33,_0x2ce93a){const _0x460cdf=a26_0x4651,_0x240ea5=_0x4d2e33();while(!![]){try{const _0x54eba3=-parseInt(_0x460cdf(0x1b6))/0x1*(-parseInt(_0x460cdf(0x195))/0x2)+parseInt(_0x460cdf(0x19b))/0x3+parseInt(_0x460cdf(0x1a9))/0x4+parseInt(_0x460cdf(0x1aa))/0x5+parseInt(_0x460cdf(0x1a6))/0x6+-parseInt(_0x460cdf(0x1a8))/0x7+-parseInt(_0x460cdf(0x1b3))/0x8;if(_0x54eba3===_0x2ce93a)break;else _0x240ea5['push'](_0x240ea5['shift']());}catch(_0x58e73c){_0x240ea5['push'](_0x240ea5['shift']());}}}(a26_0x55ec,0xa0cdd));function a26_0x4651(_0x239dc6,_0x500465){const _0x55ecab=a26_0x55ec();return a26_0x4651=function(_0x4651d5,_0x3ee7ef){_0x4651d5=_0x4651d5-0x194;let _0x3ae61e=_0x55ecab[_0x4651d5];return _0x3ae61e;},a26_0x4651(_0x239dc6,_0x500465);}function a26_0x55ec(){const _0x133c35=['3816955YwGmeU','description','segmentId','Resolved\x20type:\x20','folder','Resolved\x20folder\x20ID:\x20','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','INTERNAL','Examples:','15362720bXvIbJ','type','name','1KSQjyw','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','parentId','segmentName','error','includes','segment','Updating\x20segment\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Parent\x20ID:\x20','317054YPXnuF','segment:update','Error:\x20Cannot\x20update\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','verbose','resolveFolderId','2699709xQopvs','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','✔\x20Updated\x20segment\x20\x27','\x27...','length','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','data','kind','execute','updateSegmentById','rule','5338692Eacvbt','Segment\x20ID:\x20','3666558SBWIhy','1564736xSnGRy'];a26_0x55ec=function(){return _0x133c35;};return a26_0x55ec();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x112971(0x1b5)]=a26_0x112971(0x196);[a26_0x112971(0x1ab)]='Update\x20existing\x20child\x20segment';async[a26_0x112971(0x1a3)](_0x5f4830){const _0x54cc49=a26_0x112971,{options:_0x5d8555,args:_0x2a8578,tdx:_0x49992c}=_0x5f4830,_0x2d39af=_0x5d8555;if(_0x2a8578[_0x54cc49(0x19f)]===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x54cc49(0x1ba)](_0x54cc49(0x1b7)),console[_0x54cc49(0x1ba)](_0x54cc49(0x1b2)),console['error'](_0x54cc49(0x198)),console[_0x54cc49(0x1ba)](_0x54cc49(0x1a0)),0x1;const _0x117be4=_0x2a8578[0x0],_0x50a79f=_0x5d8555['segmentPath'];let _0x39618d=_0x117be4;_0x50a79f&&!_0x117be4[_0x54cc49(0x1bb)]('/')&&(_0x39618d=_0x50a79f+'/'+_0x117be4,_0x2d39af[_0x54cc49(0x199)]&&console[_0x54cc49(0x1ba)]('Resolved\x20relative\x20path\x20to:\x20'+_0x39618d));const _0x170b8f=await withSpinner('Resolving\x20path\x20\x27'+_0x39618d+'\x27...',()=>_0x49992c['segment']['resolvePathToResource'](_0x39618d),{'verbose':_0x2d39af[_0x54cc49(0x199)]}),_0x44ff94=_0x170b8f[_0x54cc49(0x1a1)];_0x2d39af[_0x54cc49(0x199)]&&console[_0x54cc49(0x1ba)](_0x54cc49(0x1ad)+_0x44ff94['type']);if(_0x44ff94[_0x54cc49(0x1b4)]!=='segment')return console[_0x54cc49(0x1ba)](_0x54cc49(0x197)+_0x44ff94['type']+_0x54cc49(0x19c)),console[_0x54cc49(0x1ba)](_0x54cc49(0x1b0)),0x1;if(!_0x44ff94[_0x54cc49(0x1ac)])throw new SDKError(ErrorCode[_0x54cc49(0x1b1)],_0x54cc49(0x1be));const _0x155684=_0x44ff94[_0x54cc49(0x1b8)],_0x47575b=_0x44ff94['segmentId'];_0x2d39af['verbose']&&(console['error'](_0x54cc49(0x194)+_0x155684),console[_0x54cc49(0x1ba)](_0x54cc49(0x1a7)+_0x47575b));let _0x254bfa;if(_0x2d39af[_0x54cc49(0x1ae)]){const _0x2544d8=_0x2d39af[_0x54cc49(0x1ae)],_0x55d64f=await withSpinner('Resolving\x20folder\x20\x27'+_0x2544d8+_0x54cc49(0x19e),()=>_0x49992c[_0x54cc49(0x1bc)][_0x54cc49(0x19a)](_0x155684,_0x2544d8),{'verbose':_0x2d39af[_0x54cc49(0x199)]});_0x254bfa=parseInt(_0x55d64f[_0x54cc49(0x1a1)],0xa),_0x2d39af[_0x54cc49(0x199)]&&console[_0x54cc49(0x1ba)](_0x54cc49(0x1af)+_0x254bfa);}const _0x12acf6=await loadJSONFromOptions(_0x2d39af[_0x54cc49(0x1a5)],_0x2d39af['ruleFile']),_0x2a931c={'name':_0x2d39af[_0x54cc49(0x1b5)],'description':_0x2d39af[_0x54cc49(0x1ab)],'rule':_0x12acf6,'kind':_0x2d39af[_0x54cc49(0x1a2)]!==undefined?parseInt(_0x2d39af[_0x54cc49(0x1a2)],0xa):undefined,'segmentFolderId':_0x254bfa},_0xd9f82b=await withSpinner(_0x54cc49(0x1bd)+_0x44ff94[_0x54cc49(0x1b9)]+_0x54cc49(0x19e),()=>_0x49992c['segment'][_0x54cc49(0x1a4)](_0x155684,_0x47575b,_0x2a931c),{'verbose':_0x2d39af[_0x54cc49(0x199)]}),_0x40fc95=_0xd9f82b['data'];return console[_0x54cc49(0x1ba)](_0x54cc49(0x19d)+_0x40fc95[_0x54cc49(0x1b5)]+'\x27'),_0x39618d!==_0x117be4&&console[_0x54cc49(0x1ba)]('\x20\x20\x20Path:\x20'+_0x39618d),await handleSDKOutput([_0x40fc95],_0x2d39af),0x0;}}
@@ -1 +1 @@
1
- const a27_0x4a5dea=a27_0x50d3;(function(_0x23c70f,_0x4a0bad){const _0x11c891=a27_0x50d3,_0x4e0eb0=_0x23c70f();while(!![]){try{const _0x36081b=-parseInt(_0x11c891(0x1b8))/0x1+-parseInt(_0x11c891(0x1b0))/0x2*(parseInt(_0x11c891(0x1b1))/0x3)+parseInt(_0x11c891(0x1ad))/0x4*(parseInt(_0x11c891(0x194))/0x5)+parseInt(_0x11c891(0x1ac))/0x6*(-parseInt(_0x11c891(0x198))/0x7)+-parseInt(_0x11c891(0x1a9))/0x8+-parseInt(_0x11c891(0x1a5))/0x9*(parseInt(_0x11c891(0x1b9))/0xa)+parseInt(_0x11c891(0x1a8))/0xb;if(_0x36081b===_0x4a0bad)break;else _0x4e0eb0['push'](_0x4e0eb0['shift']());}catch(_0x27c9b5){_0x4e0eb0['push'](_0x4e0eb0['shift']());}}}(a27_0xcfa2,0x403f5));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a27_0x50d3(_0x2f903d,_0x2871c2){const _0xcfa2fd=a27_0xcfa2();return a27_0x50d3=function(_0x50d356,_0x4525aa){_0x50d356=_0x50d356-0x18e;let _0x21d5c0=_0xcfa2fd[_0x50d356];return _0x21d5c0;},a27_0x50d3(_0x2f903d,_0x2871c2);}function a27_0xcfa2(){const _0x24472b=['238446qWdZyw','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','19069655ebdcLX','2065288cxSyUB','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','segment:use','42750IMHUOs','2552rplUeu','parentId','segment','2YIDbvD','1149090tpRDgP','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Resolved\x20relative\x20path\x20to:\x20','log','Examples:','234446aGzQoi','90Cuwnjo','Target\x20path:\x20','error','segmentPath','type','length','name','split','725upnZlZ','session','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Resolving\x20path\x20\x27','441ShpfOB','join','verbose','site','slice','segments','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','parentName','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','data','resolvePathToResource','Set\x20current\x20segment/folder\x20context\x20for\x20navigation'];a27_0xcfa2=function(){return _0x24472b;};return a27_0xcfa2();}import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a27_0x4a5dea(0x192)]=a27_0x4a5dea(0x1ab);['description']=a27_0x4a5dea(0x1a4);async['execute'](_0x357143){const _0x3b897b=a27_0x4a5dea,{options:_0x5f2696,args:_0x499a0a,tdx:_0x30d09d}=_0x357143;if(_0x499a0a['length']===0x0)return console[_0x3b897b(0x18e)]('Error:\x20Path\x20is\x20required'),console[_0x3b897b(0x18e)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x3b897b(0x18e)](_0x3b897b(0x1b7)),console['error'](_0x3b897b(0x1b2)),console['error'](_0x3b897b(0x1aa)),console[_0x3b897b(0x18e)]('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0x3b897b(0x18e)](_0x3b897b(0x1b4)),0x1;const _0x480755=_0x499a0a[0x0],_0x377990=_0x5f2696[_0x3b897b(0x195)];try{if(_0x480755==='/')return saveSessionContext({'segment_path':undefined},_0x377990),console[_0x3b897b(0x1b6)](_0x3b897b(0x1b3)),0x0;const _0x29080b=_0x5f2696[_0x3b897b(0x18f)];let _0xaa8b62=_0x480755;const _0x1911ae=parsePath(_0x480755);if(!_0x1911ae['isAbsolute']){if(!_0x29080b)return console[_0x3b897b(0x18e)](_0x3b897b(0x1a6)),console['error'](_0x3b897b(0x196)),0x1;if(_0x480755==='..'){const _0x59a0d6=_0x29080b[_0x3b897b(0x193)]('/')[_0x3b897b(0x19c)](0x0,-0x1)[_0x3b897b(0x199)]('/');_0xaa8b62=_0x59a0d6||'/';}else _0x480755==='.'?_0xaa8b62=_0x29080b:_0xaa8b62=_0x29080b+'/'+_0x480755;_0x5f2696['verbose']&&console[_0x3b897b(0x18e)](_0x3b897b(0x1b5)+_0xaa8b62);}if(_0xaa8b62==='/'||_0xaa8b62==='')return saveSessionContext({'segment_path':undefined},_0x377990),console[_0x3b897b(0x1b6)](_0x3b897b(0x1b3)),0x0;_0xaa8b62=normalizePath(_0xaa8b62);const _0x24c07d=parsePath(_0xaa8b62)[_0x3b897b(0x19d)];if(_0x24c07d[_0x3b897b(0x191)]===0x0)return saveSessionContext({'segment_path':undefined},_0x377990),console[_0x3b897b(0x1b6)](_0x3b897b(0x1b3)),0x0;_0x5f2696[_0x3b897b(0x19a)]&&(console[_0x3b897b(0x18e)]('Site:\x20'+_0x5f2696[_0x3b897b(0x19b)]),console[_0x3b897b(0x18e)](_0x3b897b(0x1ba)+_0xaa8b62));const _0x46a257=await withSpinner(_0x3b897b(0x197)+_0xaa8b62+'\x27...',()=>_0x30d09d[_0x3b897b(0x1af)][_0x3b897b(0x1a3)](_0xaa8b62),{'verbose':_0x5f2696['verbose']}),_0xb721b=_0x46a257[_0x3b897b(0x1a2)];_0x5f2696[_0x3b897b(0x19a)]&&(console[_0x3b897b(0x18e)]('Resolved\x20path\x20type:\x20'+_0xb721b[_0x3b897b(0x190)]),console[_0x3b897b(0x18e)]('Parent\x20ID:\x20'+_0xb721b[_0x3b897b(0x1ae)]),_0xb721b['folderId']&&console[_0x3b897b(0x18e)]('Folder\x20ID:\x20'+_0xb721b['folderId']));if(_0xb721b[_0x3b897b(0x190)]==='segment')return console[_0x3b897b(0x18e)](_0x3b897b(0x19e)),console[_0x3b897b(0x18e)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console['error']('Use:\x20tdx\x20segment\x20use\x20'+_0xb721b[_0x3b897b(0x1a0)]+(_0xb721b['folderPath']?'/'+_0xb721b['folderPath'][_0x3b897b(0x199)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0xb721b['fullPath'],'parent_segment':_0xb721b[_0x3b897b(0x1a0)]},_0x377990),console[_0x3b897b(0x1b6)]('Context\x20set\x20to:\x20'+_0xb721b['fullPath']),_0x5f2696[_0x3b897b(0x19a)]&&(console[_0x3b897b(0x18e)](_0x3b897b(0x1a7)),console[_0x3b897b(0x18e)](_0x3b897b(0x1a1)),console['error'](_0x3b897b(0x19f))),0x0;}catch(_0x752b2a){throw _0x752b2a;}}}
1
+ const a27_0x454508=a27_0x1d8e;function a27_0x1d8e(_0x5beda2,_0x3e990a){const _0x2de941=a27_0x2de9();return a27_0x1d8e=function(_0x1d8e23,_0x45bb73){_0x1d8e23=_0x1d8e23-0x18c;let _0x57e2d0=_0x2de941[_0x1d8e23];return _0x57e2d0;},a27_0x1d8e(_0x5beda2,_0x3e990a);}(function(_0x3b829d,_0x1fb2c8){const _0x16c102=a27_0x1d8e,_0x140649=_0x3b829d();while(!![]){try{const _0x408dfa=-parseInt(_0x16c102(0x19d))/0x1+parseInt(_0x16c102(0x18e))/0x2*(-parseInt(_0x16c102(0x1bb))/0x3)+parseInt(_0x16c102(0x197))/0x4*(parseInt(_0x16c102(0x1a0))/0x5)+parseInt(_0x16c102(0x1ac))/0x6+parseInt(_0x16c102(0x196))/0x7*(parseInt(_0x16c102(0x1b2))/0x8)+-parseInt(_0x16c102(0x18c))/0x9*(parseInt(_0x16c102(0x19b))/0xa)+-parseInt(_0x16c102(0x1a7))/0xb;if(_0x408dfa===_0x1fb2c8)break;else _0x140649['push'](_0x140649['shift']());}catch(_0x301cde){_0x140649['push'](_0x140649['shift']());}}}(a27_0x2de9,0xe7641));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a27_0x2de9(){const _0x4bf547=['110620nMYvcQ','Target\x20path:\x20','89947ticvdO','join','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','45qTmssZ','segment:use','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Usage:\x20tdx\x20segment\x20use\x20<path>','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','error','folderId','7402120YtLLTg','execute','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Resolved\x20path\x20type:\x20','isAbsolute','877788SQvSqa','Resolved\x20relative\x20path\x20to:\x20','Folder\x20ID:\x20','Site:\x20','description','segments','8VDSkYb','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','segment','site','session','folderPath','verbose','Error:\x20Path\x20is\x20required','resolvePathToResource','1835520SzevmU','9tfZOQO','length','4IDQHwB','Context\x20set\x20to:\x20','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Resolving\x20path\x20\x27','slice','parentName','Context\x20cleared.\x20Back\x20to\x20root.','log','12849151YwDiVm','428220WCPqSK','fullPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Parent\x20ID:\x20'];a27_0x2de9=function(){return _0x4bf547;};return a27_0x2de9();}export class SegmentUseCommand extends BaseCommand{['name']=a27_0x454508(0x1a1);[a27_0x454508(0x1b0)]=a27_0x454508(0x19f);async[a27_0x454508(0x1a8)](_0x53646b){const _0xac5526=a27_0x454508,{options:_0x2b9cde,args:_0x562c8c,tdx:_0x5228af}=_0x53646b;if(_0x562c8c[_0xac5526(0x18d)]===0x0)return console[_0xac5526(0x1a5)](_0xac5526(0x1b9)),console['error'](_0xac5526(0x1a3)),console['error']('Examples:'),console[_0xac5526(0x1a5)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0xac5526(0x1a5)](_0xac5526(0x1a9)),console[_0xac5526(0x1a5)]('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0xac5526(0x1a5)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x2123d9=_0x562c8c[0x0],_0x330253=_0x2b9cde[_0xac5526(0x1b6)];try{if(_0x2123d9==='/')return saveSessionContext({'segment_path':undefined},_0x330253),console[_0xac5526(0x195)](_0xac5526(0x194)),0x0;const _0x22108c=_0x2b9cde['segmentPath'];let _0x3b2f01=_0x2123d9;const _0x4e3754=parsePath(_0x2123d9);if(!_0x4e3754[_0xac5526(0x1ab)]){if(!_0x22108c)return console['error']('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0xac5526(0x1a5)](_0xac5526(0x1b3)),0x1;if(_0x2123d9==='..'){const _0x348b1b=_0x22108c['split']('/')[_0xac5526(0x192)](0x0,-0x1)[_0xac5526(0x19e)]('/');_0x3b2f01=_0x348b1b||'/';}else _0x2123d9==='.'?_0x3b2f01=_0x22108c:_0x3b2f01=_0x22108c+'/'+_0x2123d9;_0x2b9cde[_0xac5526(0x1b8)]&&console[_0xac5526(0x1a5)](_0xac5526(0x1ad)+_0x3b2f01);}if(_0x3b2f01==='/'||_0x3b2f01==='')return saveSessionContext({'segment_path':undefined},_0x330253),console[_0xac5526(0x195)](_0xac5526(0x194)),0x0;_0x3b2f01=normalizePath(_0x3b2f01);const _0x14ea84=parsePath(_0x3b2f01)[_0xac5526(0x1b1)];if(_0x14ea84['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x330253),console[_0xac5526(0x195)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x2b9cde[_0xac5526(0x1b8)]&&(console[_0xac5526(0x1a5)](_0xac5526(0x1af)+_0x2b9cde[_0xac5526(0x1b5)]),console[_0xac5526(0x1a5)](_0xac5526(0x19c)+_0x3b2f01));const _0x230264=await withSpinner(_0xac5526(0x191)+_0x3b2f01+'\x27...',()=>_0x5228af[_0xac5526(0x1b4)][_0xac5526(0x1ba)](_0x3b2f01),{'verbose':_0x2b9cde['verbose']}),_0x4ae84a=_0x230264['data'];_0x2b9cde[_0xac5526(0x1b8)]&&(console[_0xac5526(0x1a5)](_0xac5526(0x1aa)+_0x4ae84a['type']),console['error'](_0xac5526(0x19a)+_0x4ae84a['parentId']),_0x4ae84a[_0xac5526(0x1a6)]&&console[_0xac5526(0x1a5)](_0xac5526(0x1ae)+_0x4ae84a[_0xac5526(0x1a6)]));if(_0x4ae84a['type']===_0xac5526(0x1b4))return console[_0xac5526(0x1a5)](_0xac5526(0x1a4)),console['error'](_0xac5526(0x199)),console[_0xac5526(0x1a5)]('Use:\x20tdx\x20segment\x20use\x20'+_0x4ae84a[_0xac5526(0x193)]+(_0x4ae84a[_0xac5526(0x1b7)]?'/'+_0x4ae84a[_0xac5526(0x1b7)][_0xac5526(0x19e)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x4ae84a[_0xac5526(0x198)],'parent_segment':_0x4ae84a[_0xac5526(0x193)]},_0x330253),console[_0xac5526(0x195)](_0xac5526(0x18f)+_0x4ae84a[_0xac5526(0x198)]),_0x2b9cde[_0xac5526(0x1b8)]&&(console['error'](_0xac5526(0x1a2)),console[_0xac5526(0x1a5)](_0xac5526(0x190)),console[_0xac5526(0x1a5)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x2b07a1){throw _0x2b07a1;}}}
@@ -1 +1 @@
1
- const a28_0x103ceb=a28_0x4ece;(function(_0x14af50,_0x263ce3){const _0x1b37e2=a28_0x4ece,_0x3772d1=_0x14af50();while(!![]){try{const _0xc5cca5=-parseInt(_0x1b37e2(0x14e))/0x1+-parseInt(_0x1b37e2(0x160))/0x2*(-parseInt(_0x1b37e2(0x151))/0x3)+-parseInt(_0x1b37e2(0x180))/0x4*(parseInt(_0x1b37e2(0x15e))/0x5)+-parseInt(_0x1b37e2(0x158))/0x6+parseInt(_0x1b37e2(0x14b))/0x7*(parseInt(_0x1b37e2(0x164))/0x8)+parseInt(_0x1b37e2(0x15f))/0x9+parseInt(_0x1b37e2(0x168))/0xa;if(_0xc5cca5===_0x263ce3)break;else _0x3772d1['push'](_0x3772d1['shift']());}catch(_0xd3d704){_0x3772d1['push'](_0x3772d1['shift']());}}}(a28_0xfe0d,0xe61a1));import{BaseCommand}from'./command.js';function a28_0x4ece(_0x4d3ab3,_0x4b39fa){const _0xfe0dc2=a28_0xfe0d();return a28_0x4ece=function(_0x4ece5a,_0x229c66){_0x4ece5a=_0x4ece5a-0x149;let _0xd46cd3=_0xfe0dc2[_0x4ece5a];return _0xd46cd3;},a28_0x4ece(_0x4d3ab3,_0x4b39fa);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a28_0x3e6116 from'chalk';function a28_0xfe0d(){const _0x3d059d=['listRecursive','cause','17304aebSgl','dim','✔\x20Found\x20','161986aCyYYU','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','verbose','3426186kmpXWa','execute','\x20and\x20','Listing\x20parent\x20segments\x20matching\x20\x27','folderId','[parent\x20segments]','No\x20parent\x20segments\x20match\x20pattern:\x20','7177206warpKv','length','includes','description','sort','localeCompare','264965vYUXPd','1467936RnBVRO','2FaoWZF','Recursive\x20mode:\x20enabled','resolvePathToResource','segment','96KaHWGD','\x20matching\x20\x27','data','message','10188470stiYRq','(empty)','listUnified','filter','\x27...','replace','parentId','\x20parent\x20segment','attributes','Parent\x20ID:\x20','log','👥\x20','Resolving\x20context\x20path\x20\x27','error','population','name','jsonl','Error:\x20','\x20top-level\x20items','Building\x20hierarchy\x20tree...','json','listParents','format','\x20folder','4MktlIh','Path/pattern\x20arg:\x20','\x20\x20Cause:\x20','Site:\x20','site','listParentsWithPattern','\x5c$&'];a28_0xfe0d=function(){return _0x3d059d;};return a28_0xfe0d();}export class SegmentsCommand extends BaseCommand{[a28_0x103ceb(0x177)]='segments';[a28_0x103ceb(0x15b)]=a28_0x103ceb(0x14f);async[a28_0x103ceb(0x152)](_0xcdc542){const _0x5053dd=a28_0x103ceb,{options:_0x5e451b,args:_0x17a766}=_0xcdc542,_0x5d709e=_0x5e451b['recursive'],_0x1a616f=_0x17a766[0x0];try{const _0x3084b8=_0x5e451b['segmentPath'];_0x5e451b['verbose']&&(console[_0x5053dd(0x175)](_0x5053dd(0x183)+_0x5e451b[_0x5053dd(0x184)]),console[_0x5053dd(0x175)]('Current\x20context:\x20'+(_0x3084b8||'/')),_0x1a616f&&console[_0x5053dd(0x175)](_0x5053dd(0x181)+_0x1a616f),_0x5d709e&&console[_0x5053dd(0x175)](_0x5053dd(0x161)));if(_0x1a616f){const _0x245b7e=_0x1a616f[_0x5053dd(0x15a)]('*')||_0x1a616f[_0x5053dd(0x15a)]('?');if(_0x245b7e&&!_0x3084b8)return await this[_0x5053dd(0x185)](_0xcdc542,_0x1a616f);else return _0x245b7e?(console[_0x5053dd(0x175)]('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console['error']('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x5d709e?await this[_0x5053dd(0x149)](_0xcdc542,_0x1a616f):await this[_0x5053dd(0x16a)](_0xcdc542,_0x1a616f);}if(!_0x3084b8)return await this[_0x5053dd(0x17d)](_0xcdc542);return _0x5d709e?await this[_0x5053dd(0x149)](_0xcdc542,_0x3084b8):await this[_0x5053dd(0x16a)](_0xcdc542,_0x3084b8);}catch(_0x4af9c9){if(_0x4af9c9 instanceof SDKError)return console[_0x5053dd(0x175)](_0x5053dd(0x179)+_0x4af9c9[_0x5053dd(0x167)]),_0x4af9c9[_0x5053dd(0x14a)]&&console[_0x5053dd(0x175)](_0x5053dd(0x182)+_0x4af9c9[_0x5053dd(0x14a)]),0x1;throw _0x4af9c9;}}async[a28_0x103ceb(0x185)](_0x55cea6,_0x15e570){const _0x257b81=a28_0x103ceb,{options:_0x453009,tdx:_0x583b67}=_0x55cea6,_0x28b1a8=await withSpinner(_0x257b81(0x154)+_0x15e570+'\x27...',()=>_0x583b67[_0x257b81(0x163)][_0x257b81(0x17d)](),{'verbose':_0x453009[_0x257b81(0x150)]}),_0x354c6c=_0x28b1a8[_0x257b81(0x166)],_0x3e6cfe=_0x15e570[_0x257b81(0x16d)](/[.+^${}()|[\]\\]/g,_0x257b81(0x186))[_0x257b81(0x16d)](/\*/g,'.*')[_0x257b81(0x16d)](/\?/g,'.'),_0x5f219e=new RegExp('^'+_0x3e6cfe+'$','i'),_0x5c72d5=_0x354c6c[_0x257b81(0x16b)](_0x5061a1=>_0x5f219e['test'](_0x5061a1[_0x257b81(0x170)][_0x257b81(0x177)]));console[_0x257b81(0x175)]('✔\x20Found\x20'+_0x5c72d5['length']+_0x257b81(0x16f)+(_0x5c72d5[_0x257b81(0x159)]!==0x1?'s':'')+_0x257b81(0x165)+_0x15e570+'\x27');if(_0x453009[_0x257b81(0x17e)]===_0x257b81(0x17c)||_0x453009[_0x257b81(0x17e)]==='jsonl')await handleSDKOutput(_0x5c72d5,_0x453009);else{if(_0x5c72d5['length']===0x0)console[_0x257b81(0x172)](_0x257b81(0x157)+_0x15e570);else{console['log']('[parent\x20segments]');for(const _0x14f1ad of _0x5c72d5){const _0x1b4313=_0x14f1ad['attributes'][_0x257b81(0x176)]?a28_0x3e6116[_0x257b81(0x14c)]('\x20('+formatRows(_0x14f1ad[_0x257b81(0x170)]['population'])+')'):'';console['log'](_0x257b81(0x173)+_0x14f1ad['attributes'][_0x257b81(0x177)]+_0x1b4313);}}}return 0x0;}async[a28_0x103ceb(0x17d)](_0x57cd64){const _0x1ee200=a28_0x103ceb,{options:_0x26bb0e,tdx:_0x3dd696}=_0x57cd64,_0x490303=await withSpinner('Listing\x20parent\x20segments...',()=>_0x3dd696[_0x1ee200(0x163)][_0x1ee200(0x17d)](),{'verbose':_0x26bb0e[_0x1ee200(0x150)]}),_0x9ef7bc=_0x490303['data'];console[_0x1ee200(0x175)](_0x1ee200(0x14d)+_0x9ef7bc['length']+_0x1ee200(0x16f)+(_0x9ef7bc[_0x1ee200(0x159)]!==0x1?'s':''));if(_0x26bb0e[_0x1ee200(0x17e)]===_0x1ee200(0x17c)||_0x26bb0e[_0x1ee200(0x17e)]===_0x1ee200(0x178))await handleSDKOutput(_0x9ef7bc,_0x26bb0e);else{console[_0x1ee200(0x172)](_0x1ee200(0x156));for(const _0x11ea7d of _0x9ef7bc){const _0x422697=_0x11ea7d[_0x1ee200(0x170)][_0x1ee200(0x176)]?a28_0x3e6116[_0x1ee200(0x14c)]('\x20('+formatRows(_0x11ea7d['attributes'][_0x1ee200(0x176)])+')'):'';console['log']('👥\x20'+_0x11ea7d['attributes'][_0x1ee200(0x177)]+_0x422697);}}return 0x0;}async[a28_0x103ceb(0x16a)](_0x1a3261,_0x47d039){const _0x3f7732=a28_0x103ceb,{options:_0x5783b4,tdx:_0x4b515a}=_0x1a3261,_0x163698=await withSpinner(_0x3f7732(0x174)+_0x47d039+'\x27...',()=>_0x4b515a[_0x3f7732(0x163)][_0x3f7732(0x162)](_0x47d039),{'verbose':_0x5783b4['verbose']}),_0x1d5f53=_0x163698[_0x3f7732(0x166)];_0x5783b4[_0x3f7732(0x150)]&&(console['error']('Parent\x20ID:\x20'+_0x1d5f53['parentId']),_0x1d5f53[_0x3f7732(0x155)]&&console[_0x3f7732(0x175)]('Folder\x20ID:\x20'+_0x1d5f53['folderId']));const _0x3af563=await withSpinner('Listing\x20folders\x20and\x20segments...',()=>_0x4b515a[_0x3f7732(0x163)][_0x3f7732(0x16a)](_0x1d5f53[_0x3f7732(0x16e)],_0x1d5f53[_0x3f7732(0x155)]),{'verbose':_0x5783b4[_0x3f7732(0x150)]}),{folders:_0xd3f056,segments:_0x6832ca}=_0x3af563[_0x3f7732(0x166)],_0x553fba=_0xd3f056[_0x3f7732(0x159)]+_0x6832ca[_0x3f7732(0x159)];console[_0x3f7732(0x175)]('✔\x20Found\x20'+_0xd3f056[_0x3f7732(0x159)]+_0x3f7732(0x17f)+(_0xd3f056[_0x3f7732(0x159)]!==0x1?'s':'')+_0x3f7732(0x153)+_0x6832ca['length']+'\x20segment'+(_0x6832ca[_0x3f7732(0x159)]!==0x1?'s':''));if(_0x5783b4[_0x3f7732(0x17e)]===_0x3f7732(0x17c)||_0x5783b4[_0x3f7732(0x17e)]===_0x3f7732(0x178)){const _0x2cbbfb=[..._0xd3f056['map'](_0x2952a4=>({..._0x2952a4,'type':'folder'})),..._0x6832ca['map'](_0x2c3660=>({..._0x2c3660,'type':_0x3f7732(0x163)}))][_0x3f7732(0x15c)]((_0x570e6d,_0x4ffe78)=>_0x570e6d[_0x3f7732(0x177)][_0x3f7732(0x15d)](_0x4ffe78[_0x3f7732(0x177)]));await handleSDKOutput(_0x2cbbfb,_0x5783b4);}else{if(_0x553fba===0x0)console['log'](a28_0x3e6116[_0x3f7732(0x14c)]('[/'+_0x47d039+']')),console['log'](_0x3f7732(0x169));else{console[_0x3f7732(0x172)](a28_0x3e6116[_0x3f7732(0x14c)]('[/'+_0x47d039+']'));const _0x2d7841=formatFlatList(_0xd3f056,_0x6832ca,{'showMetadata':!![]});console[_0x3f7732(0x172)](_0x2d7841);}}return 0x0;}async[a28_0x103ceb(0x149)](_0x33e686,_0x1c935f){const _0x583df1=a28_0x103ceb,{options:_0x4d7781,tdx:_0x46bd09}=_0x33e686,_0x5e4e82=await withSpinner(_0x583df1(0x174)+_0x1c935f+_0x583df1(0x16c),()=>_0x46bd09[_0x583df1(0x163)][_0x583df1(0x162)](_0x1c935f),{'verbose':_0x4d7781[_0x583df1(0x150)]}),_0x13c765=_0x5e4e82[_0x583df1(0x166)];_0x4d7781['verbose']&&(console['error'](_0x583df1(0x171)+_0x13c765[_0x583df1(0x16e)]),_0x13c765[_0x583df1(0x155)]&&console[_0x583df1(0x175)]('Folder\x20ID:\x20'+_0x13c765['folderId']));const _0x332a32=_0x4d7781['maxDepth']||0xa,_0x181cd6=await withSpinner(_0x583df1(0x17b),()=>_0x46bd09['segment'][_0x583df1(0x149)](_0x13c765[_0x583df1(0x16e)],_0x13c765['folderId'],0x0,_0x332a32),{'verbose':_0x4d7781[_0x583df1(0x150)]}),_0x4f6228=_0x181cd6[_0x583df1(0x166)];console[_0x583df1(0x175)]('✔\x20Built\x20tree\x20with\x20'+_0x4f6228[_0x583df1(0x159)]+_0x583df1(0x17a));if(_0x4d7781[_0x583df1(0x17e)]==='json'||_0x4d7781[_0x583df1(0x17e)]===_0x583df1(0x178))await handleSDKOutput(_0x4f6228,_0x4d7781);else{console[_0x583df1(0x172)](a28_0x3e6116[_0x583df1(0x14c)]('[/'+_0x1c935f+']'));const _0x215c65=formatTree(_0x4f6228,{'showMetadata':!![]});console[_0x583df1(0x172)](_0x215c65);}return 0x0;}}
1
+ function a28_0x1407(){const _0x2b5828=['maxDepth','attributes','\x20\x20Cause:\x20','👥\x20','data','json','16182738kfvnek','log','\x5c$&','listUnified','sort','folder','name','segment','verbose','\x20and\x20','(empty)','site','31012WAWhWc','execute','✔\x20Found\x20','listParentsWithPattern','Path/pattern\x20arg:\x20','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','listRecursive','Recursive\x20mode:\x20enabled','132edMtDs','10mMhKAN','1549842hoKamG','1400xTqbJR','folderId','map','format','listParents','37984zeUdvi','Listing\x20folders\x20and\x20segments...','includes','resolvePathToResource','\x20folder','replace','Parent\x20ID:\x20','473NMdDjr','error','83spiiuY','dim','jsonl','Error:\x20','Listing\x20parent\x20segments...','159370pPKNPm','parentId','localeCompare','✔\x20Built\x20tree\x20with\x20','\x27...','population','2399501AcdMeq','filter','Folder\x20ID:\x20','12twFaUm','\x20parent\x20segment','No\x20parent\x20segments\x20match\x20pattern:\x20','\x20top-level\x20items','message','[parent\x20segments]','Resolving\x20context\x20path\x20\x27','length','1327779iuQcFn','segmentPath'];a28_0x1407=function(){return _0x2b5828;};return a28_0x1407();}const a28_0x45f81f=a28_0x3fab;(function(_0xca0927,_0x39d6d8){const _0x2e0471=a28_0x3fab,_0x45a6d1=_0xca0927();while(!![]){try{const _0x3d88c3=-parseInt(_0x2e0471(0x1fe))/0x1*(-parseInt(_0x2e0471(0x1e5))/0x2)+parseInt(_0x2e0471(0x214))/0x3*(-parseInt(_0x2e0471(0x20c))/0x4)+parseInt(_0x2e0471(0x1ee))/0x5*(parseInt(_0x2e0471(0x1ef))/0x6)+parseInt(_0x2e0471(0x1f0))/0x7*(parseInt(_0x2e0471(0x1f5))/0x8)+-parseInt(_0x2e0471(0x1d9))/0x9+parseInt(_0x2e0471(0x203))/0xa*(-parseInt(_0x2e0471(0x1fc))/0xb)+parseInt(_0x2e0471(0x1ed))/0xc*(parseInt(_0x2e0471(0x209))/0xd);if(_0x3d88c3===_0x39d6d8)break;else _0x45a6d1['push'](_0x45a6d1['shift']());}catch(_0x28a678){_0x45a6d1['push'](_0x45a6d1['shift']());}}}(a28_0x1407,0xed677));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a28_0x3fab(_0x69ec96,_0x4d71d8){const _0x14074e=a28_0x1407();return a28_0x3fab=function(_0x3fab4c,_0x2c8ddf){_0x3fab4c=_0x3fab4c-0x1d5;let _0x42d093=_0x14074e[_0x3fab4c];return _0x42d093;},a28_0x3fab(_0x69ec96,_0x4d71d8);}import{formatRows}from'../utils/formatters.js';import a28_0x91264d from'chalk';export class SegmentsCommand extends BaseCommand{['name']='segments';['description']='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a28_0x45f81f(0x1e6)](_0x38adb2){const _0x1cb9aa=a28_0x45f81f,{options:_0x3dcc54,args:_0x92da0d}=_0x38adb2,_0x216a89=_0x3dcc54['recursive'],_0x2039c7=_0x92da0d[0x0];try{const _0x1c503f=_0x3dcc54[_0x1cb9aa(0x215)];_0x3dcc54[_0x1cb9aa(0x1e1)]&&(console[_0x1cb9aa(0x1fd)]('Site:\x20'+_0x3dcc54[_0x1cb9aa(0x1e4)]),console['error']('Current\x20context:\x20'+(_0x1c503f||'/')),_0x2039c7&&console[_0x1cb9aa(0x1fd)](_0x1cb9aa(0x1e9)+_0x2039c7),_0x216a89&&console[_0x1cb9aa(0x1fd)](_0x1cb9aa(0x1ec)));if(_0x2039c7){const _0x3732a9=_0x2039c7['includes']('*')||_0x2039c7[_0x1cb9aa(0x1f7)]('?');if(_0x3732a9&&!_0x1c503f)return await this[_0x1cb9aa(0x1e8)](_0x38adb2,_0x2039c7);else return _0x3732a9?(console[_0x1cb9aa(0x1fd)]('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x1cb9aa(0x1fd)](_0x1cb9aa(0x1ea)),0x1):_0x216a89?await this[_0x1cb9aa(0x1eb)](_0x38adb2,_0x2039c7):await this[_0x1cb9aa(0x1dc)](_0x38adb2,_0x2039c7);}if(!_0x1c503f)return await this['listParents'](_0x38adb2);return _0x216a89?await this[_0x1cb9aa(0x1eb)](_0x38adb2,_0x1c503f):await this[_0x1cb9aa(0x1dc)](_0x38adb2,_0x1c503f);}catch(_0x51f71b){if(_0x51f71b instanceof SDKError)return console[_0x1cb9aa(0x1fd)](_0x1cb9aa(0x201)+_0x51f71b[_0x1cb9aa(0x210)]),_0x51f71b['cause']&&console[_0x1cb9aa(0x1fd)](_0x1cb9aa(0x1d5)+_0x51f71b['cause']),0x1;throw _0x51f71b;}}async[a28_0x45f81f(0x1e8)](_0x22f2f1,_0x582b84){const _0x799830=a28_0x45f81f,{options:_0x5452fd,tdx:_0x23bd9a}=_0x22f2f1,_0x153d79=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x582b84+_0x799830(0x207),()=>_0x23bd9a[_0x799830(0x1e0)][_0x799830(0x1f4)](),{'verbose':_0x5452fd[_0x799830(0x1e1)]}),_0x30f3e0=_0x153d79[_0x799830(0x1d7)],_0x2ce757=_0x582b84['replace'](/[.+^${}()|[\]\\]/g,_0x799830(0x1db))[_0x799830(0x1fa)](/\*/g,'.*')[_0x799830(0x1fa)](/\?/g,'.'),_0x46fec8=new RegExp('^'+_0x2ce757+'$','i'),_0x2e8f9e=_0x30f3e0[_0x799830(0x20a)](_0x17a34a=>_0x46fec8['test'](_0x17a34a['attributes'][_0x799830(0x1df)]));console[_0x799830(0x1fd)](_0x799830(0x1e7)+_0x2e8f9e[_0x799830(0x213)]+_0x799830(0x20d)+(_0x2e8f9e[_0x799830(0x213)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x582b84+'\x27');if(_0x5452fd[_0x799830(0x1f3)]==='json'||_0x5452fd[_0x799830(0x1f3)]==='jsonl')await handleSDKOutput(_0x2e8f9e,_0x5452fd);else{if(_0x2e8f9e[_0x799830(0x213)]===0x0)console[_0x799830(0x1da)](_0x799830(0x20e)+_0x582b84);else{console['log'](_0x799830(0x211));for(const _0x486e38 of _0x2e8f9e){const _0x512f4e=_0x486e38[_0x799830(0x217)]['population']?a28_0x91264d[_0x799830(0x1ff)]('\x20('+formatRows(_0x486e38[_0x799830(0x217)][_0x799830(0x208)])+')'):'';console[_0x799830(0x1da)](_0x799830(0x1d6)+_0x486e38['attributes'][_0x799830(0x1df)]+_0x512f4e);}}}return 0x0;}async[a28_0x45f81f(0x1f4)](_0x311253){const _0x1e51ed=a28_0x45f81f,{options:_0x55fba3,tdx:_0x109eca}=_0x311253,_0x5ed1c5=await withSpinner(_0x1e51ed(0x202),()=>_0x109eca['segment'][_0x1e51ed(0x1f4)](),{'verbose':_0x55fba3[_0x1e51ed(0x1e1)]}),_0x27ede6=_0x5ed1c5[_0x1e51ed(0x1d7)];console[_0x1e51ed(0x1fd)]('✔\x20Found\x20'+_0x27ede6[_0x1e51ed(0x213)]+_0x1e51ed(0x20d)+(_0x27ede6['length']!==0x1?'s':''));if(_0x55fba3[_0x1e51ed(0x1f3)]===_0x1e51ed(0x1d8)||_0x55fba3['format']===_0x1e51ed(0x200))await handleSDKOutput(_0x27ede6,_0x55fba3);else{console[_0x1e51ed(0x1da)](_0x1e51ed(0x211));for(const _0x5a1ceb of _0x27ede6){const _0x144a78=_0x5a1ceb[_0x1e51ed(0x217)]['population']?a28_0x91264d['dim']('\x20('+formatRows(_0x5a1ceb[_0x1e51ed(0x217)][_0x1e51ed(0x208)])+')'):'';console['log']('👥\x20'+_0x5a1ceb['attributes'][_0x1e51ed(0x1df)]+_0x144a78);}}return 0x0;}async[a28_0x45f81f(0x1dc)](_0x2da5a2,_0x3968f5){const _0xd2fa31=a28_0x45f81f,{options:_0x26c320,tdx:_0x2595a5}=_0x2da5a2,_0x4116a6=await withSpinner(_0xd2fa31(0x212)+_0x3968f5+_0xd2fa31(0x207),()=>_0x2595a5[_0xd2fa31(0x1e0)][_0xd2fa31(0x1f8)](_0x3968f5),{'verbose':_0x26c320[_0xd2fa31(0x1e1)]}),_0x477de5=_0x4116a6[_0xd2fa31(0x1d7)];_0x26c320[_0xd2fa31(0x1e1)]&&(console['error'](_0xd2fa31(0x1fb)+_0x477de5[_0xd2fa31(0x204)]),_0x477de5[_0xd2fa31(0x1f1)]&&console['error'](_0xd2fa31(0x20b)+_0x477de5[_0xd2fa31(0x1f1)]));const _0xf16060=await withSpinner(_0xd2fa31(0x1f6),()=>_0x2595a5['segment'][_0xd2fa31(0x1dc)](_0x477de5['parentId'],_0x477de5[_0xd2fa31(0x1f1)]),{'verbose':_0x26c320['verbose']}),{folders:_0x14b8c0,segments:_0x1ff66a}=_0xf16060[_0xd2fa31(0x1d7)],_0x41586b=_0x14b8c0[_0xd2fa31(0x213)]+_0x1ff66a[_0xd2fa31(0x213)];console[_0xd2fa31(0x1fd)]('✔\x20Found\x20'+_0x14b8c0[_0xd2fa31(0x213)]+_0xd2fa31(0x1f9)+(_0x14b8c0[_0xd2fa31(0x213)]!==0x1?'s':'')+_0xd2fa31(0x1e2)+_0x1ff66a[_0xd2fa31(0x213)]+'\x20segment'+(_0x1ff66a[_0xd2fa31(0x213)]!==0x1?'s':''));if(_0x26c320[_0xd2fa31(0x1f3)]===_0xd2fa31(0x1d8)||_0x26c320[_0xd2fa31(0x1f3)]===_0xd2fa31(0x200)){const _0x4547f2=[..._0x14b8c0[_0xd2fa31(0x1f2)](_0xb7c5be=>({..._0xb7c5be,'type':_0xd2fa31(0x1de)})),..._0x1ff66a[_0xd2fa31(0x1f2)](_0x207557=>({..._0x207557,'type':'segment'}))][_0xd2fa31(0x1dd)]((_0x273a1d,_0x2d09b3)=>_0x273a1d['name'][_0xd2fa31(0x205)](_0x2d09b3[_0xd2fa31(0x1df)]));await handleSDKOutput(_0x4547f2,_0x26c320);}else{if(_0x41586b===0x0)console[_0xd2fa31(0x1da)](a28_0x91264d[_0xd2fa31(0x1ff)]('[/'+_0x3968f5+']')),console['log'](_0xd2fa31(0x1e3));else{console['log'](a28_0x91264d['dim']('[/'+_0x3968f5+']'));const _0x137a1c=formatFlatList(_0x14b8c0,_0x1ff66a,{'showMetadata':!![]});console[_0xd2fa31(0x1da)](_0x137a1c);}}return 0x0;}async['listRecursive'](_0x514b81,_0x35598d){const _0x23bf27=a28_0x45f81f,{options:_0x54f38b,tdx:_0x154a46}=_0x514b81,_0x999664=await withSpinner(_0x23bf27(0x212)+_0x35598d+_0x23bf27(0x207),()=>_0x154a46[_0x23bf27(0x1e0)][_0x23bf27(0x1f8)](_0x35598d),{'verbose':_0x54f38b[_0x23bf27(0x1e1)]}),_0x2e6f09=_0x999664[_0x23bf27(0x1d7)];_0x54f38b[_0x23bf27(0x1e1)]&&(console[_0x23bf27(0x1fd)](_0x23bf27(0x1fb)+_0x2e6f09[_0x23bf27(0x204)]),_0x2e6f09[_0x23bf27(0x1f1)]&&console[_0x23bf27(0x1fd)]('Folder\x20ID:\x20'+_0x2e6f09[_0x23bf27(0x1f1)]));const _0x38cb16=_0x54f38b[_0x23bf27(0x216)]||0xa,_0x6371d6=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x154a46[_0x23bf27(0x1e0)][_0x23bf27(0x1eb)](_0x2e6f09[_0x23bf27(0x204)],_0x2e6f09['folderId'],0x0,_0x38cb16),{'verbose':_0x54f38b[_0x23bf27(0x1e1)]}),_0x1b0d32=_0x6371d6[_0x23bf27(0x1d7)];console[_0x23bf27(0x1fd)](_0x23bf27(0x206)+_0x1b0d32[_0x23bf27(0x213)]+_0x23bf27(0x20f));if(_0x54f38b[_0x23bf27(0x1f3)]==='json'||_0x54f38b[_0x23bf27(0x1f3)]===_0x23bf27(0x200))await handleSDKOutput(_0x1b0d32,_0x54f38b);else{console[_0x23bf27(0x1da)](a28_0x91264d[_0x23bf27(0x1ff)]('[/'+_0x35598d+']'));const _0x429be7=formatTree(_0x1b0d32,{'showMetadata':!![]});console[_0x23bf27(0x1da)](_0x429be7);}return 0x0;}}
@@ -1 +1 @@
1
- function a29_0x4bfb(_0x18d691,_0x58ab1b){const _0xf5b57b=a29_0xf5b5();return a29_0x4bfb=function(_0x4bfb00,_0x5ee638){_0x4bfb00=_0x4bfb00-0x10c;let _0x371760=_0xf5b57b[_0x4bfb00];return _0x371760;},a29_0x4bfb(_0x18d691,_0x58ab1b);}const a29_0x4f388f=a29_0x4bfb;(function(_0x56c55e,_0x13b3dd){const _0x3e6594=a29_0x4bfb,_0x5a375f=_0x56c55e();while(!![]){try{const _0x2d7dd4=parseInt(_0x3e6594(0x131))/0x1+-parseInt(_0x3e6594(0x12d))/0x2+-parseInt(_0x3e6594(0x126))/0x3+parseInt(_0x3e6594(0x121))/0x4*(-parseInt(_0x3e6594(0x128))/0x5)+parseInt(_0x3e6594(0x129))/0x6+parseInt(_0x3e6594(0x115))/0x7+parseInt(_0x3e6594(0x12f))/0x8*(parseInt(_0x3e6594(0x120))/0x9);if(_0x2d7dd4===_0x13b3dd)break;else _0x5a375f['push'](_0x5a375f['shift']());}catch(_0x4495b8){_0x5a375f['push'](_0x5a375f['shift']());}}}(a29_0xf5b5,0x94bfe));function a29_0xf5b5(){const _0x420736=['...','395SjUije','3176256ieAocm','\x20from\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','args','1266226bnYMYv','cause','1896256sddxMT','data','731707JXTLlX','verbose','Catalog:\x20','description','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','name','Database:\x20','error','showTable','validate','table','2149371gfzEDD','execute','show','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','length','Error:\x20','Usage:\x20tdx\x20show\x20<database.table>','Site:\x20','database','Show\x20table\x20contents','9zyIMcG','22452NEbhGb','\x20\x20Cause:\x20','site','catalog','limit','358050vTATxh'];a29_0xf5b5=function(){return _0x420736;};return a29_0xf5b5();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a29_0x4f388f(0x10f)]=a29_0x4f388f(0x117);[a29_0x4f388f(0x10c)]=a29_0x4f388f(0x11f);async[a29_0x4f388f(0x116)](_0x30bf4b){const _0x3e6f36=a29_0x4f388f;return this[_0x3e6f36(0x112)](_0x30bf4b);}async[a29_0x4f388f(0x112)](_0x1cd87b){const _0x4195e3=a29_0x4f388f,{options:_0xdd131b,args:_0x10b341,tdx:_0xea5863}=_0x1cd87b;let _0x318d91;try{_0x318d91=parseTableReference(_0x10b341[0x0]);const _0x4b6abd=_0xdd131b['database'];!_0x318d91['database']&&_0x4b6abd&&(_0x318d91[_0x4195e3(0x11e)]=_0x4b6abd);const _0x17ba41=validateTableDescribeReference(_0x318d91);if(_0x17ba41)return console[_0x4195e3(0x111)](_0x4195e3(0x11b)+_0x17ba41),console[_0x4195e3(0x111)](_0x4195e3(0x11c)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x4195e3(0x111)](_0x4195e3(0x10d)),0x1;}catch(_0x6b6cf8){return console[_0x4195e3(0x111)]('Error:\x20'+_0x6b6cf8['message']),console[_0x4195e3(0x111)](_0x4195e3(0x11c)),console['error'](_0x4195e3(0x10e)),console[_0x4195e3(0x111)](_0x4195e3(0x10d)),0x1;}const _0x3ae19f=_0x318d91[_0x4195e3(0x124)],_0x4ddb16=_0x318d91[_0x4195e3(0x11e)],_0xed4b01=_0x318d91[_0x4195e3(0x114)],_0x223328=resolveLimit(_0xdd131b[_0x4195e3(0x125)],DEFAULT_DISPLAY_LIMIT);try{_0xdd131b[_0x4195e3(0x132)]&&(console[_0x4195e3(0x111)](_0x4195e3(0x11d)+_0xdd131b[_0x4195e3(0x123)]),_0x3ae19f&&console[_0x4195e3(0x111)](_0x4195e3(0x133)+_0x3ae19f),console[_0x4195e3(0x111)](_0x4195e3(0x110)+_0x4ddb16),console[_0x4195e3(0x111)]('Table:\x20'+_0xed4b01),console['error']('Limit:\x20'+_0x223328));const _0x571447=_0x3ae19f?_0x3ae19f+'.'+_0x4ddb16+'.'+_0xed4b01:_0x4ddb16+'.'+_0xed4b01,_0x4e65b7=await withSpinner('Querying\x20'+_0x571447+_0x4195e3(0x127),()=>_0xea5863['table']['show'](_0x4ddb16,_0xed4b01,_0x223328,_0x3ae19f),{'verbose':_0xdd131b[_0x4195e3(0x132)]}),_0x4614c2=_0x4e65b7[_0x4195e3(0x130)],_0x4447a6=_0x4614c2['data'];return _0x4447a6[_0x4195e3(0x11a)]===0x0?console['error'](_0x4195e3(0x118)):console['error']('✔\x20Retrieved\x20'+_0x4447a6[_0x4195e3(0x11a)]+'\x20row'+(_0x4447a6[_0x4195e3(0x11a)]!==0x1?'s':'')+_0x4195e3(0x12a)+_0x571447),await handleSDKOutput(_0x4447a6,_0xdd131b),0x0;}catch(_0x4a83b1){if(_0x4a83b1 instanceof SDKError)return console[_0x4195e3(0x111)](_0x4195e3(0x11b)+_0x4a83b1['message']),_0x4a83b1['cause']&&console[_0x4195e3(0x111)](_0x4195e3(0x122)+_0x4a83b1[_0x4195e3(0x12e)]),0x1;throw _0x4a83b1;}}[a29_0x4f388f(0x113)](_0x52b60f){const _0x3bdc23=a29_0x4f388f;if(_0x52b60f['args'][_0x3bdc23(0x11a)]===0x0)return _0x3bdc23(0x119);if(_0x52b60f[_0x3bdc23(0x12c)][_0x3bdc23(0x11a)]>0x1)return _0x3bdc23(0x12b);return undefined;}}
1
+ const a29_0x47094d=a29_0xc776;(function(_0x36f724,_0x317b84){const _0x3527f=a29_0xc776,_0x602dba=_0x36f724();while(!![]){try{const _0x53ba0e=-parseInt(_0x3527f(0xa1))/0x1+parseInt(_0x3527f(0x99))/0x2+parseInt(_0x3527f(0xb0))/0x3*(parseInt(_0x3527f(0xae))/0x4)+-parseInt(_0x3527f(0xb1))/0x5*(parseInt(_0x3527f(0xaa))/0x6)+parseInt(_0x3527f(0x9d))/0x7+parseInt(_0x3527f(0xa0))/0x8+-parseInt(_0x3527f(0xa5))/0x9*(parseInt(_0x3527f(0xa6))/0xa);if(_0x53ba0e===_0x317b84)break;else _0x602dba['push'](_0x602dba['shift']());}catch(_0x5a539d){_0x602dba['push'](_0x602dba['shift']());}}}(a29_0x408e,0xe0749));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a29_0xc776(_0x3a846a,_0xbe87e7){const _0x408ee7=a29_0x408e();return a29_0xc776=function(_0xc776a5,_0x28110f){_0xc776a5=_0xc776a5-0x98;let _0x2fe217=_0x408ee7[_0xc776a5];return _0x2fe217;},a29_0xc776(_0x3a846a,_0xbe87e7);}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a29_0x408e(){const _0xa312f5=['Site:\x20','\x20\x20Cause:\x20','5672EGGfoX','description','3867GwKmUs','1285pJVeql','database','cause','Catalog:\x20','✔\x20Retrieved\x20','Usage:\x20tdx\x20show\x20<database.table>','limit','validate','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','args','table','Limit:\x20','\x20from\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','verbose','name','message','1806260psTGJQ','Querying\x20','data','Database:\x20','89922GljYBH','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','error','14329824rKppzk','1661202TaVdhw','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','catalog','\x20row','4581eiuBPG','23230twUXba','Error:\x20','length','site','18024IoxLBs','show'];a29_0x408e=function(){return _0xa312f5;};return a29_0x408e();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a29_0x47094d(0xc0)]=a29_0x47094d(0xab);[a29_0x47094d(0xaf)]='Show\x20table\x20contents';async['execute'](_0x47f6ba){return this['showTable'](_0x47f6ba);}async['showTable'](_0x456a48){const _0xfd0415=a29_0x47094d,{options:_0x2a1602,args:_0x5dae5b,tdx:_0x13754b}=_0x456a48;let _0x55e527;try{_0x55e527=parseTableReference(_0x5dae5b[0x0]);const _0x21cc3b=_0x2a1602[_0xfd0415(0xb2)];!_0x55e527[_0xfd0415(0xb2)]&&_0x21cc3b&&(_0x55e527[_0xfd0415(0xb2)]=_0x21cc3b);const _0xb2e8e4=validateTableDescribeReference(_0x55e527);if(_0xb2e8e4)return console[_0xfd0415(0x9f)](_0xfd0415(0xa7)+_0xb2e8e4),console['error']('Usage:\x20tdx\x20show\x20<database.table>'),console[_0xfd0415(0x9f)](_0xfd0415(0xbe)),console[_0xfd0415(0x9f)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x5cb387){return console['error'](_0xfd0415(0xa7)+_0x5cb387[_0xfd0415(0x98)]),console[_0xfd0415(0x9f)](_0xfd0415(0xb6)),console[_0xfd0415(0x9f)](_0xfd0415(0xbe)),console[_0xfd0415(0x9f)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x4228f1=_0x55e527[_0xfd0415(0xa3)],_0x4e8c2a=_0x55e527['database'],_0x1097fd=_0x55e527[_0xfd0415(0xbb)],_0x5f12db=resolveLimit(_0x2a1602[_0xfd0415(0xb7)],DEFAULT_DISPLAY_LIMIT);try{_0x2a1602[_0xfd0415(0xbf)]&&(console[_0xfd0415(0x9f)](_0xfd0415(0xac)+_0x2a1602[_0xfd0415(0xa9)]),_0x4228f1&&console[_0xfd0415(0x9f)](_0xfd0415(0xb4)+_0x4228f1),console[_0xfd0415(0x9f)](_0xfd0415(0x9c)+_0x4e8c2a),console[_0xfd0415(0x9f)]('Table:\x20'+_0x1097fd),console[_0xfd0415(0x9f)](_0xfd0415(0xbc)+_0x5f12db));const _0x37f230=_0x4228f1?_0x4228f1+'.'+_0x4e8c2a+'.'+_0x1097fd:_0x4e8c2a+'.'+_0x1097fd,_0x3295f3=await withSpinner(_0xfd0415(0x9a)+_0x37f230+'...',()=>_0x13754b[_0xfd0415(0xbb)][_0xfd0415(0xab)](_0x4e8c2a,_0x1097fd,_0x5f12db,_0x4228f1),{'verbose':_0x2a1602[_0xfd0415(0xbf)]}),_0x528189=_0x3295f3[_0xfd0415(0x9b)],_0x506a94=_0x528189['data'];return _0x506a94[_0xfd0415(0xa8)]===0x0?console[_0xfd0415(0x9f)](_0xfd0415(0xb9)):console['error'](_0xfd0415(0xb5)+_0x506a94[_0xfd0415(0xa8)]+_0xfd0415(0xa4)+(_0x506a94[_0xfd0415(0xa8)]!==0x1?'s':'')+_0xfd0415(0xbd)+_0x37f230),await handleSDKOutput(_0x506a94,_0x2a1602),0x0;}catch(_0x24fa0a){if(_0x24fa0a instanceof SDKError)return console[_0xfd0415(0x9f)]('Error:\x20'+_0x24fa0a[_0xfd0415(0x98)]),_0x24fa0a[_0xfd0415(0xb3)]&&console[_0xfd0415(0x9f)](_0xfd0415(0xad)+_0x24fa0a[_0xfd0415(0xb3)]),0x1;throw _0x24fa0a;}}[a29_0x47094d(0xb8)](_0x11857d){const _0x151028=a29_0x47094d;if(_0x11857d[_0x151028(0xba)][_0x151028(0xa8)]===0x0)return _0x151028(0x9e);if(_0x11857d[_0x151028(0xba)][_0x151028(0xa8)]>0x1)return _0x151028(0xa2);return undefined;}}
@@ -1 +1 @@
1
- const a30_0xb8138=a30_0x308f;(function(_0xfe9169,_0x2d5fc2){const _0x21f506=a30_0x308f,_0x2dff68=_0xfe9169();while(!![]){try{const _0x18f3a7=-parseInt(_0x21f506(0x15d))/0x1+parseInt(_0x21f506(0x172))/0x2*(-parseInt(_0x21f506(0x174))/0x3)+parseInt(_0x21f506(0x17b))/0x4+parseInt(_0x21f506(0x155))/0x5+-parseInt(_0x21f506(0x169))/0x6+-parseInt(_0x21f506(0x182))/0x7*(parseInt(_0x21f506(0x15a))/0x8)+parseInt(_0x21f506(0x180))/0x9;if(_0x18f3a7===_0x2d5fc2)break;else _0x2dff68['push'](_0x2dff68['shift']());}catch(_0x371bcd){_0x2dff68['push'](_0x2dff68['shift']());}}}(a30_0x54ba,0x6c652));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a30_0x54ba(){const _0x5a41b7=['\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','1778300SeMjLh','✖\x20No\x20tables\x20found','✔\x20Found\x20','table','database','195656pLHcaI','length','Listing\x20tables...','67670JNyqgp','tables','\x20table','Error:\x20Pattern\x20\x27','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','name','data','error','Or\x20use\x20--in\x20flag:','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','.*\x22','5214636AGnVSX','site','Error:\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','validate','includes','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','execute','890992ggdBqg','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','3lhGFNn','Database\x20\x27','verbose','limit','description','\x20\x20Cause:\x20','Table\x20pattern:\x20','34072FQhMGj','cause','\x27\x20is\x20ambiguous.','Note:\x20\x27','message','18001206RLdtYi','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','154inCfIH','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','list'];a30_0x54ba=function(){return _0x5a41b7;};return a30_0x54ba();}function a30_0x308f(_0x59e2f9,_0x25fa2b){const _0x54ba9d=a30_0x54ba();return a30_0x308f=function(_0x308fb9,_0x2d27ed){_0x308fb9=_0x308fb9-0x152;let _0x26c874=_0x54ba9d[_0x308fb9];return _0x26c874;},a30_0x308f(_0x59e2f9,_0x25fa2b);}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0xb8138(0x163)]=a30_0xb8138(0x15e);[a30_0xb8138(0x178)]='List\x20tables\x20in\x20a\x20database';async[a30_0xb8138(0x171)](_0x515c68){const _0x3ba231=a30_0xb8138,{options:_0xa813bf,args:_0xe70c4b,tdx:_0x1b716f}=_0x515c68;let _0x217998;if(_0xe70c4b[_0x3ba231(0x15b)]===0x0)_0x217998={'database':undefined,'table':undefined,'original':''};else{if(_0xe70c4b[_0x3ba231(0x15b)]===0x1)try{_0x217998=parseTableReference(_0xe70c4b[0x0]);if(_0x217998[_0x3ba231(0x158)]&&!_0x217998['database']&&!_0x217998[_0x3ba231(0x158)][_0x3ba231(0x16e)]('*')&&!_0x217998[_0x3ba231(0x158)][_0x3ba231(0x16e)]('?'))return console[_0x3ba231(0x165)](_0x3ba231(0x160)+_0xe70c4b[0x0]+_0x3ba231(0x17d)),console[_0x3ba231(0x165)](_0x3ba231(0x170)+_0x217998[_0x3ba231(0x158)]+'\x27?'),console[_0x3ba231(0x165)](_0x3ba231(0x161)+_0x217998['table']+_0x3ba231(0x168)),console[_0x3ba231(0x165)](_0x3ba231(0x173)+_0x217998['table']),console[_0x3ba231(0x165)](_0x3ba231(0x183)+_0x217998[_0x3ba231(0x158)]),console[_0x3ba231(0x165)](''),console[_0x3ba231(0x165)](_0x3ba231(0x17e)+_0xe70c4b[0x0]+_0x3ba231(0x16f)+_0x217998[_0x3ba231(0x158)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x207386){return console[_0x3ba231(0x165)](_0x3ba231(0x16b)+_0x207386[_0x3ba231(0x17f)]),0x1;}else return console[_0x3ba231(0x165)](_0x3ba231(0x181)),console[_0x3ba231(0x165)](_0x3ba231(0x154)),console[_0x3ba231(0x165)](_0x3ba231(0x162)),console[_0x3ba231(0x165)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x3ba231(0x165)](_0x3ba231(0x153)),console[_0x3ba231(0x165)](_0x3ba231(0x166)),console[_0x3ba231(0x165)](_0x3ba231(0x16c)),0x1;}const _0x26be40=_0xa813bf[_0x3ba231(0x159)];!_0x217998['database']&&_0x26be40&&(_0x217998[_0x3ba231(0x159)]=_0x26be40);try{const _0x7780ff=_0x517769=>_0x517769&&(_0x517769[_0x3ba231(0x16e)]('*')||_0x517769[_0x3ba231(0x16e)]('?')),_0x22bc49=_0x7780ff(_0x217998[_0x3ba231(0x159)]);_0xa813bf[_0x3ba231(0x176)]&&(console['error']('Site:\x20'+_0xa813bf[_0x3ba231(0x16a)]),_0x217998[_0x3ba231(0x159)]?_0x22bc49?console[_0x3ba231(0x165)]('Database\x20pattern:\x20'+_0x217998['database']):console[_0x3ba231(0x165)]('Database:\x20'+_0x217998[_0x3ba231(0x159)]):console['error']('Database:\x20all'),_0x217998[_0x3ba231(0x158)]&&console[_0x3ba231(0x165)](_0x3ba231(0x17a)+_0x217998[_0x3ba231(0x158)]));const _0x109fe7=_0x217998[_0x3ba231(0x159)]&&!_0x22bc49?_0x217998[_0x3ba231(0x159)]:undefined,_0x36587c=_0x22bc49?_0x217998[_0x3ba231(0x159)]:undefined,_0x4d041e=_0x217998[_0x3ba231(0x158)],_0x5561f5=resolveLimit(_0xa813bf[_0x3ba231(0x177)],DEFAULT_LISTING_LIMIT),_0x467da6=await withSpinner(_0x3ba231(0x15c),()=>_0x1b716f['table'][_0x3ba231(0x152)](_0x109fe7,_0x4d041e,_0x36587c,_0x5561f5),{'verbose':_0xa813bf[_0x3ba231(0x176)]}),_0x3442a6=_0x467da6[_0x3ba231(0x164)];if(_0x3442a6[_0x3ba231(0x15b)]===0x0&&_0x217998[_0x3ba231(0x159)]&&!_0x22bc49)return console['error'](_0x3ba231(0x156)),console[_0x3ba231(0x165)](_0x3ba231(0x175)+_0x217998[_0x3ba231(0x159)]+_0x3ba231(0x167)),0x1;return console[_0x3ba231(0x165)](_0x3ba231(0x157)+_0x3442a6[_0x3ba231(0x15b)]+_0x3ba231(0x15f)+(_0x3442a6[_0x3ba231(0x15b)]!==0x1?'s':'')),await handleSDKOutput(_0x3442a6,{..._0xa813bf,'limit':_0x5561f5}),0x0;}catch(_0x1d7e07){if(_0x1d7e07 instanceof SDKError)return console[_0x3ba231(0x165)](_0x3ba231(0x16b)+_0x1d7e07[_0x3ba231(0x17f)]),_0x1d7e07[_0x3ba231(0x17c)]&&console[_0x3ba231(0x165)](_0x3ba231(0x179)+_0x1d7e07[_0x3ba231(0x17c)]),0x1;throw _0x1d7e07;}}[a30_0xb8138(0x16d)](_0x37ae88){return undefined;}}
1
+ const a30_0xfebd27=a30_0x7d29;function a30_0x55e8(){const _0x4b663f=['site','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x20table','\x27\x20is\x20ambiguous.','✖\x20No\x20tables\x20found','name','✔\x20Found\x20','Error:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Database\x20pattern:\x20','.*\x22','260193iZMjTt','46152EacSPq','list','data','database','8YMRUaY','includes','message','12vzpqfJ','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','error','\x20\x20Use:\x20tdx\x20tables\x20\x22','287440RLqeCD','Database:\x20all','Error:\x20Pattern\x20\x27','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','143gNnZvV','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','99920lkRYMQ','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','length','Database\x20\x27','13136qGXGOv','table','3829437uHiQci','2808505GcyFTv','2RdFfHG','validate','cause','91NvUPcz','96bFUkYz','Note:\x20\x27','verbose','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'];a30_0x55e8=function(){return _0x4b663f;};return a30_0x55e8();}(function(_0x21819f,_0x41f826){const _0xad4997=a30_0x7d29,_0xc4d698=_0x21819f();while(!![]){try{const _0x564d83=-parseInt(_0xad4997(0x1c4))/0x1*(parseInt(_0xad4997(0x1df))/0x2)+-parseInt(_0xad4997(0x1cc))/0x3*(-parseInt(_0xad4997(0x1db))/0x4)+parseInt(_0xad4997(0x1d1))/0x5*(parseInt(_0xad4997(0x1e3))/0x6)+-parseInt(_0xad4997(0x1de))/0x7*(-parseInt(_0xad4997(0x1c9))/0x8)+-parseInt(_0xad4997(0x1dd))/0x9+parseInt(_0xad4997(0x1d7))/0xa*(-parseInt(_0xad4997(0x1d5))/0xb)+-parseInt(_0xad4997(0x1c5))/0xc*(parseInt(_0xad4997(0x1e2))/0xd);if(_0x564d83===_0x41f826)break;else _0xc4d698['push'](_0xc4d698['shift']());}catch(_0x3e742d){_0xc4d698['push'](_0xc4d698['shift']());}}}(a30_0x55e8,0x78087));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a30_0x7d29(_0x72d84d,_0x4f34ec){const _0x55e818=a30_0x55e8();return a30_0x7d29=function(_0x7d2943,_0x59721d){_0x7d2943=_0x7d2943-0x1c2;let _0x3db01a=_0x55e818[_0x7d2943];return _0x3db01a;},a30_0x7d29(_0x72d84d,_0x4f34ec);}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0xfebd27(0x1ed)]='tables';['description']='List\x20tables\x20in\x20a\x20database';async['execute'](_0xec49f6){const _0x50d92a=a30_0xfebd27,{options:_0x16b3f0,args:_0x1aa4ba,tdx:_0x3dd7ba}=_0xec49f6;let _0x292c84;if(_0x1aa4ba[_0x50d92a(0x1d9)]===0x0)_0x292c84={'database':undefined,'table':undefined,'original':''};else{if(_0x1aa4ba[_0x50d92a(0x1d9)]===0x1)try{_0x292c84=parseTableReference(_0x1aa4ba[0x0]);if(_0x292c84[_0x50d92a(0x1dc)]&&!_0x292c84[_0x50d92a(0x1c8)]&&!_0x292c84[_0x50d92a(0x1dc)][_0x50d92a(0x1ca)]('*')&&!_0x292c84[_0x50d92a(0x1dc)]['includes']('?'))return console[_0x50d92a(0x1cf)](_0x50d92a(0x1d3)+_0x1aa4ba[0x0]+_0x50d92a(0x1eb)),console[_0x50d92a(0x1cf)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x292c84[_0x50d92a(0x1dc)]+'\x27?'),console['error'](_0x50d92a(0x1d0)+_0x292c84[_0x50d92a(0x1dc)]+_0x50d92a(0x1c3)),console[_0x50d92a(0x1cf)](_0x50d92a(0x1ce)+_0x292c84['table']),console[_0x50d92a(0x1cf)](_0x50d92a(0x1d6)+_0x292c84['table']),console[_0x50d92a(0x1cf)](''),console[_0x50d92a(0x1cf)](_0x50d92a(0x1e4)+_0x1aa4ba[0x0]+_0x50d92a(0x1d4)+_0x292c84['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x2c5e5a){return console[_0x50d92a(0x1cf)](_0x50d92a(0x1ef)+_0x2c5e5a[_0x50d92a(0x1cb)]),0x1;}else return console[_0x50d92a(0x1cf)](_0x50d92a(0x1cd)),console[_0x50d92a(0x1cf)](_0x50d92a(0x1e7)),console[_0x50d92a(0x1cf)](_0x50d92a(0x1d8)),console['error'](_0x50d92a(0x1e9)),console[_0x50d92a(0x1cf)](_0x50d92a(0x1f0)),console['error']('Or\x20use\x20--in\x20flag:'),console[_0x50d92a(0x1cf)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x36c8c7=_0x16b3f0[_0x50d92a(0x1c8)];!_0x292c84[_0x50d92a(0x1c8)]&&_0x36c8c7&&(_0x292c84[_0x50d92a(0x1c8)]=_0x36c8c7);try{const _0x485ea3=_0x17a085=>_0x17a085&&(_0x17a085['includes']('*')||_0x17a085['includes']('?')),_0x4a2bd9=_0x485ea3(_0x292c84['database']);_0x16b3f0[_0x50d92a(0x1e5)]&&(console[_0x50d92a(0x1cf)]('Site:\x20'+_0x16b3f0[_0x50d92a(0x1e8)]),_0x292c84[_0x50d92a(0x1c8)]?_0x4a2bd9?console['error'](_0x50d92a(0x1c2)+_0x292c84[_0x50d92a(0x1c8)]):console[_0x50d92a(0x1cf)]('Database:\x20'+_0x292c84[_0x50d92a(0x1c8)]):console[_0x50d92a(0x1cf)](_0x50d92a(0x1d2)),_0x292c84[_0x50d92a(0x1dc)]&&console['error']('Table\x20pattern:\x20'+_0x292c84[_0x50d92a(0x1dc)]));const _0x30a10b=_0x292c84['database']&&!_0x4a2bd9?_0x292c84[_0x50d92a(0x1c8)]:undefined,_0x41c0df=_0x4a2bd9?_0x292c84[_0x50d92a(0x1c8)]:undefined,_0x3943b4=_0x292c84[_0x50d92a(0x1dc)],_0xb9bda6=resolveLimit(_0x16b3f0['limit'],DEFAULT_LISTING_LIMIT),_0x1bbc29=await withSpinner('Listing\x20tables...',()=>_0x3dd7ba[_0x50d92a(0x1dc)][_0x50d92a(0x1c6)](_0x30a10b,_0x3943b4,_0x41c0df,_0xb9bda6),{'verbose':_0x16b3f0[_0x50d92a(0x1e5)]}),_0x37ed93=_0x1bbc29[_0x50d92a(0x1c7)];if(_0x37ed93['length']===0x0&&_0x292c84[_0x50d92a(0x1c8)]&&!_0x4a2bd9)return console['error'](_0x50d92a(0x1ec)),console[_0x50d92a(0x1cf)](_0x50d92a(0x1da)+_0x292c84['database']+_0x50d92a(0x1e6)),0x1;return console[_0x50d92a(0x1cf)](_0x50d92a(0x1ee)+_0x37ed93[_0x50d92a(0x1d9)]+_0x50d92a(0x1ea)+(_0x37ed93[_0x50d92a(0x1d9)]!==0x1?'s':'')),await handleSDKOutput(_0x37ed93,{..._0x16b3f0,'limit':_0xb9bda6}),0x0;}catch(_0x3222e2){if(_0x3222e2 instanceof SDKError)return console['error'](_0x50d92a(0x1ef)+_0x3222e2[_0x50d92a(0x1cb)]),_0x3222e2[_0x50d92a(0x1e1)]&&console[_0x50d92a(0x1cf)]('\x20\x20Cause:\x20'+_0x3222e2[_0x50d92a(0x1e1)]),0x1;throw _0x3222e2;}}[a30_0xfebd27(0x1e0)](_0x1a1aa2){return undefined;}}
@@ -1 +1 @@
1
- function a31_0x716a(){const _0x569efe=['Error:\x20','execute','log','4761MhEHdQ','profile','7lrDlJj','llm_project','Session\x20profile\x20set\x20to:\x20','1236998qWsyKp','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','.\x20Must\x20be\x20one\x20of:\x20','6680EcIstj','1188492vVvmkM','message','parent_segment','15nxbRiG','error','1314668MEtZir','4250xSKzuu','database','use','description','includes','name','Session\x20llm_project\x20set\x20to:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','44pUQGIK','Set\x20session-level\x20context','2670AjpwwC','\x20(session:\x20','\x27\x20does\x20not\x20exist','Invalid\x20resource:\x20','14035624HudSpM','1042680IGHZnG','toString','session'];a31_0x716a=function(){return _0x569efe;};return a31_0x716a();}const a31_0x4b76cd=a31_0xd8eb;(function(_0x496e27,_0x5724af){const _0x4784c9=a31_0xd8eb,_0x2a3998=_0x496e27();while(!![]){try{const _0x1c3d6f=parseInt(_0x4784c9(0xa6))/0x1+parseInt(_0x4784c9(0x9b))/0x2+parseInt(_0x4784c9(0xae))/0x3*(parseInt(_0x4784c9(0xb0))/0x4)+parseInt(_0x4784c9(0xaa))/0x5*(-parseInt(_0x4784c9(0x96))/0x6)+-parseInt(_0x4784c9(0xa3))/0x7*(parseInt(_0x4784c9(0x9a))/0x8)+parseInt(_0x4784c9(0xa1))/0x9*(parseInt(_0x4784c9(0xb1))/0xa)+parseInt(_0x4784c9(0x94))/0xb*(-parseInt(_0x4784c9(0xab))/0xc);if(_0x1c3d6f===_0x5724af)break;else _0x2a3998['push'](_0x2a3998['shift']());}catch(_0x32b484){_0x2a3998['push'](_0x2a3998['shift']());}}}(a31_0x716a,0xd72d1));function a31_0xd8eb(_0x6de34b,_0x377785){const _0x716a93=a31_0x716a();return a31_0xd8eb=function(_0xd8eb73,_0x32477f){_0xd8eb73=_0xd8eb73-0x8d;let _0x2926b9=_0x716a93[_0xd8eb73];return _0x2926b9;},a31_0xd8eb(_0x6de34b,_0x377785);}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x4b76cd(0x91)]=a31_0x4b76cd(0x8e);[a31_0x4b76cd(0x8f)]=a31_0x4b76cd(0x95);['validate'](_0x378d6f){const _0x1d8bad=a31_0x4b76cd,{args:_0x37d86b}=_0x378d6f;if(_0x37d86b['length']<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x1d8bad(0x93)+_0x1d8bad(0xa8)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x269747=_0x37d86b[0x0],_0x5285e0=['database',_0x1d8bad(0xad),'llm_project',_0x1d8bad(0xa2)];if(!_0x5285e0[_0x1d8bad(0x90)](_0x269747))return _0x1d8bad(0x99)+_0x269747+_0x1d8bad(0xa9)+_0x5285e0['join'](',\x20');return undefined;}async[a31_0x4b76cd(0x9f)](_0x14c253){const _0x4e2fd8=a31_0x4b76cd,{args:_0x1ee3eb,options:_0x1d002f}=_0x14c253;try{const _0x103dd5=_0x1ee3eb[0x0],_0x2c55cd=_0x1ee3eb[0x1];if(_0x103dd5===_0x4e2fd8(0xa2)){if(!profileExists(_0x2c55cd))return console[_0x4e2fd8(0xaf)]('Error:\x20Profile\x20\x27'+_0x2c55cd+_0x4e2fd8(0x98)),console[_0x4e2fd8(0xaf)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x1dc563=_0x1d002f[_0x4e2fd8(0x9d)]||getCurrentSessionPID()[_0x4e2fd8(0x9c)]();return saveSessionContext({'profile':_0x2c55cd},_0x1d002f[_0x4e2fd8(0x9d)]),console[_0x4e2fd8(0xa0)](_0x4e2fd8(0xa5)+_0x2c55cd+_0x4e2fd8(0x97)+_0x1dc563+')'),console['log'](_0x4e2fd8(0xa7)),0x0;}const _0x2bc6d9={},_0x325589=_0x1d002f[_0x4e2fd8(0x9d)]||getCurrentSessionPID()[_0x4e2fd8(0x9c)]();switch(_0x103dd5){case _0x4e2fd8(0x8d):_0x2bc6d9[_0x4e2fd8(0x8d)]=_0x2c55cd,console[_0x4e2fd8(0xa0)]('Session\x20database\x20set\x20to:\x20'+_0x2c55cd+'\x20(session:\x20'+_0x325589+')');break;case'parent_segment':_0x2bc6d9[_0x4e2fd8(0xad)]=_0x2c55cd,console[_0x4e2fd8(0xa0)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x2c55cd+_0x4e2fd8(0x97)+_0x325589+')');break;case _0x4e2fd8(0xa4):_0x2bc6d9['llm_project']=_0x2c55cd,console['log'](_0x4e2fd8(0x92)+_0x2c55cd+'\x20(session:\x20'+_0x325589+')');break;}return saveSessionContext(_0x2bc6d9,_0x1d002f[_0x4e2fd8(0x9d)]),console[_0x4e2fd8(0xa0)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x5ae4a6){return _0x5ae4a6 instanceof Error&&console[_0x4e2fd8(0xaf)](_0x4e2fd8(0x9e)+_0x5ae4a6[_0x4e2fd8(0xac)]),0x1;}}}
1
+ const a31_0x1bc122=a31_0x288a;(function(_0x5c0ddf,_0x546156){const _0x4e251a=a31_0x288a,_0x50c174=_0x5c0ddf();while(!![]){try{const _0xebcfb3=-parseInt(_0x4e251a(0x131))/0x1*(-parseInt(_0x4e251a(0x129))/0x2)+parseInt(_0x4e251a(0x12a))/0x3+parseInt(_0x4e251a(0x11f))/0x4+parseInt(_0x4e251a(0x11e))/0x5+parseInt(_0x4e251a(0x116))/0x6+-parseInt(_0x4e251a(0x13a))/0x7*(-parseInt(_0x4e251a(0x127))/0x8)+-parseInt(_0x4e251a(0x12b))/0x9;if(_0xebcfb3===_0x546156)break;else _0x50c174['push'](_0x50c174['shift']());}catch(_0x53ba59){_0x50c174['push'](_0x50c174['shift']());}}}(a31_0x51fe,0xcca89));import{BaseCommand}from'./command.js';function a31_0x51fe(){const _0x3d52e4=['5820894zjqdID','message','profile','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','toString','Session\x20llm_project\x20set\x20to:\x20','\x20(session:\x20','execute','863325FBygWp','604400gUzTjb','llm_project','use','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','log','session','Error:\x20Profile\x20\x27','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','93992mwjFwd','error','1052gEGBOe','2118156cWFVMe','30579426CmSOiZ','Invalid\x20resource:\x20','database','join','parent_segment','description','1861soRGaa','.\x20Must\x20be\x20one\x20of:\x20','name','length','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20parent_segment\x20set\x20to:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Error:\x20','Set\x20session-level\x20context','749wQFPOh','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','includes'];a31_0x51fe=function(){return _0x3d52e4;};return a31_0x51fe();}function a31_0x288a(_0x47d48f,_0x44a6a6){const _0x51fe84=a31_0x51fe();return a31_0x288a=function(_0x288abb,_0x22bada){_0x288abb=_0x288abb-0x115;let _0x406081=_0x51fe84[_0x288abb];return _0x406081;},a31_0x288a(_0x47d48f,_0x44a6a6);}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x1bc122(0x133)]=a31_0x1bc122(0x121);[a31_0x1bc122(0x130)]=a31_0x1bc122(0x139);['validate'](_0x337fb3){const _0x14ebc1=a31_0x1bc122,{args:_0x526afa}=_0x337fb3;if(_0x526afa[_0x14ebc1(0x134)]<0x2)return _0x14ebc1(0x126)+_0x14ebc1(0x137)+_0x14ebc1(0x119)+_0x14ebc1(0x122);const _0x43bb4c=_0x526afa[0x0],_0x36d552=['database','parent_segment',_0x14ebc1(0x120),_0x14ebc1(0x118)];if(!_0x36d552[_0x14ebc1(0x115)](_0x43bb4c))return _0x14ebc1(0x12c)+_0x43bb4c+_0x14ebc1(0x132)+_0x36d552[_0x14ebc1(0x12e)](',\x20');return undefined;}async[a31_0x1bc122(0x11d)](_0x3ab215){const _0x308d6f=a31_0x1bc122,{args:_0x10f813,options:_0x5973ac}=_0x3ab215;try{const _0x25f208=_0x10f813[0x0],_0x54e1e9=_0x10f813[0x1];if(_0x25f208===_0x308d6f(0x118)){if(!profileExists(_0x54e1e9))return console[_0x308d6f(0x128)](_0x308d6f(0x125)+_0x54e1e9+'\x27\x20does\x20not\x20exist'),console['error'](_0x308d6f(0x13b)),0x1;const _0xd60633=_0x5973ac[_0x308d6f(0x124)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x54e1e9},_0x5973ac['session']),console[_0x308d6f(0x123)]('Session\x20profile\x20set\x20to:\x20'+_0x54e1e9+_0x308d6f(0x11c)+_0xd60633+')'),console[_0x308d6f(0x123)](_0x308d6f(0x135)),0x0;}const _0x3908e3={},_0x532364=_0x5973ac[_0x308d6f(0x124)]||getCurrentSessionPID()[_0x308d6f(0x11a)]();switch(_0x25f208){case _0x308d6f(0x12d):_0x3908e3['database']=_0x54e1e9,console[_0x308d6f(0x123)]('Session\x20database\x20set\x20to:\x20'+_0x54e1e9+_0x308d6f(0x11c)+_0x532364+')');break;case _0x308d6f(0x12f):_0x3908e3['parent_segment']=_0x54e1e9,console['log'](_0x308d6f(0x136)+_0x54e1e9+_0x308d6f(0x11c)+_0x532364+')');break;case'llm_project':_0x3908e3['llm_project']=_0x54e1e9,console[_0x308d6f(0x123)](_0x308d6f(0x11b)+_0x54e1e9+_0x308d6f(0x11c)+_0x532364+')');break;}return saveSessionContext(_0x3908e3,_0x5973ac[_0x308d6f(0x124)]),console[_0x308d6f(0x123)](_0x308d6f(0x135)),0x0;}catch(_0x2814bd){return _0x2814bd instanceof Error&&console['error'](_0x308d6f(0x138)+_0x2814bd[_0x308d6f(0x117)]),0x1;}}}