@treasuredata/tdx 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/client/cdp-client.js +1 -1
  4. package/dist/client/http-client.js +1 -1
  5. package/dist/client/llm-client.js +1 -1
  6. package/dist/client/rate-limiter.js +1 -1
  7. package/dist/client/td-client.js +1 -1
  8. package/dist/client/trino-client.js +1 -1
  9. package/dist/client/workflow-client.js +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/context-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/job-command.js +1 -1
  19. package/dist/commands/llm-command.js +1 -1
  20. package/dist/commands/llm-proxy.js +1 -1
  21. package/dist/commands/parent-segment-command.js +1 -1
  22. package/dist/commands/profiles-command.js +1 -1
  23. package/dist/commands/query-command.js +1 -1
  24. package/dist/commands/segment-command.js +1 -1
  25. package/dist/commands/segment-create-command.js +1 -1
  26. package/dist/commands/segment-fields-command.js +1 -1
  27. package/dist/commands/segment-pwd-command.js +1 -1
  28. package/dist/commands/segment-update-command.js +1 -1
  29. package/dist/commands/segment-use-command.js +1 -1
  30. package/dist/commands/segments.js +1 -1
  31. package/dist/commands/show.js +1 -1
  32. package/dist/commands/tables.js +1 -1
  33. package/dist/commands/use-command.js +1 -1
  34. package/dist/commands/workflow-command.js +1 -1
  35. package/dist/core/auth.js +1 -1
  36. package/dist/core/config.js +1 -1
  37. package/dist/core/global-context.js +1 -1
  38. package/dist/core/profile.js +1 -1
  39. package/dist/core/project-config.js +1 -1
  40. package/dist/core/session.js +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/proxy/anthropic-adapter.d.ts +8 -0
  43. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  44. package/dist/proxy/anthropic-adapter.js +1 -1
  45. package/dist/proxy/anthropic-adapter.js.map +1 -1
  46. package/dist/proxy/server.js +1 -1
  47. package/dist/proxy/session-cache.js +1 -1
  48. package/dist/sdk/api.js +1 -1
  49. package/dist/sdk/database.js +1 -1
  50. package/dist/sdk/errors.js +1 -1
  51. package/dist/sdk/index.js +1 -1
  52. package/dist/sdk/job.js +1 -1
  53. package/dist/sdk/llm.js +1 -1
  54. package/dist/sdk/query.js +1 -1
  55. package/dist/sdk/segment.js +1 -1
  56. package/dist/sdk/table.js +1 -1
  57. package/dist/sdk/workflow.js +1 -1
  58. package/dist/types/endpoints.js +1 -1
  59. package/dist/types/index.js +1 -1
  60. package/dist/utils/agent-ref-parser.js +1 -1
  61. package/dist/utils/chat-cache.js +1 -1
  62. package/dist/utils/colors.js +1 -1
  63. package/dist/utils/command-output.js +1 -1
  64. package/dist/utils/constants.js +1 -1
  65. package/dist/utils/file-permissions.js +1 -1
  66. package/dist/utils/format-detector.js +1 -1
  67. package/dist/utils/formatters.js +1 -1
  68. package/dist/utils/json-loader.js +1 -1
  69. package/dist/utils/model-aliases.js +1 -1
  70. package/dist/utils/option-validation.js +1 -1
  71. package/dist/utils/port.js +1 -1
  72. package/dist/utils/process.js +1 -1
  73. package/dist/utils/prompt.js +1 -1
  74. package/dist/utils/segment-path-parser.js +1 -1
  75. package/dist/utils/segment-ref-parser.js +1 -1
  76. package/dist/utils/spinner.js +1 -1
  77. package/dist/utils/sql-parser.js +1 -1
  78. package/dist/utils/sse-parser.js +1 -1
  79. package/dist/utils/string-utils.js +1 -1
  80. package/dist/utils/table-ref-parser.js +1 -1
  81. package/dist/utils/tdx-logger.js +1 -1
  82. package/dist/utils/tree-formatter.js +1 -1
  83. package/dist/utils/version-check.js +1 -1
  84. package/dist/utils/workflow-utils.js +1 -1
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- function a52_0x4bc8(_0x44eff5,_0x474c39){const _0x1d8543=a52_0x1d85();return a52_0x4bc8=function(_0x4bc842,_0x4e5705){_0x4bc842=_0x4bc842-0x19b;let _0x5bc9a1=_0x1d8543[_0x4bc842];return _0x5bc9a1;},a52_0x4bc8(_0x44eff5,_0x474c39);}const a52_0x9f1ca4=a52_0x4bc8;(function(_0x4cbc12,_0x4d2d55){const _0x347c17=a52_0x4bc8,_0x299dd8=_0x4cbc12();while(!![]){try{const _0x5cc350=parseInt(_0x347c17(0x1de))/0x1*(-parseInt(_0x347c17(0x1e1))/0x2)+-parseInt(_0x347c17(0x1e9))/0x3+parseInt(_0x347c17(0x1ac))/0x4*(-parseInt(_0x347c17(0x1ad))/0x5)+-parseInt(_0x347c17(0x1d5))/0x6*(-parseInt(_0x347c17(0x1be))/0x7)+parseInt(_0x347c17(0x1b0))/0x8*(-parseInt(_0x347c17(0x1f6))/0x9)+-parseInt(_0x347c17(0x1c0))/0xa+parseInt(_0x347c17(0x1b7))/0xb;if(_0x5cc350===_0x4d2d55)break;else _0x299dd8['push'](_0x299dd8['shift']());}catch(_0x428f60){_0x299dd8['push'](_0x299dd8['shift']());}}}(a52_0x1d85,0x2c3e0));import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowAPI{[a52_0x9f1ca4(0x1ab)];static [a52_0x9f1ca4(0x1fa)]=/^\d+$/;constructor(_0x110a36){const _0x33a575=a52_0x9f1ca4;this[_0x33a575(0x1ab)]=_0x110a36;}async[a52_0x9f1ca4(0x1e5)](_0x3c31d6){const _0x411d0f=a52_0x9f1ca4;if(WorkflowAPI[_0x411d0f(0x1fa)][_0x411d0f(0x1ea)](_0x3c31d6))return{'id':_0x3c31d6,'name':_0x3c31d6};const _0x310773=await this['client'][_0x411d0f(0x1a9)]({'name_pattern':_0x3c31d6}),_0xa5f39d=_0x310773[_0x411d0f(0x1b3)][_0x411d0f(0x1a2)](_0x2287bc=>_0x2287bc['name']===_0x3c31d6);if(!_0xa5f39d)throw new Error(_0x411d0f(0x1db)+_0x3c31d6);return{'id':_0xa5f39d['id'],'name':_0xa5f39d[_0x411d0f(0x19f)]};}async['projects'](_0x4ecc29,_0x5c5d45){const _0x235f9c=a52_0x9f1ca4,_0x186639=await this['client'][_0x235f9c(0x1a9)]({'name_pattern':_0x4ecc29,..._0x5c5d45});return _0x186639[_0x235f9c(0x1b3)]['map'](_0x23f70c=>({..._0x23f70c,'project_id':_0x23f70c['id'],'project_name':_0x23f70c['name']}));}async[a52_0x9f1ca4(0x1c7)](_0x21e353,_0x2210fa){const _0x1c32dd=a52_0x9f1ca4,_0xf122b=await this[_0x1c32dd(0x1ab)][_0x1c32dd(0x1f4)]({'project_name':_0x21e353,..._0x2210fa});return _0xf122b[_0x1c32dd(0x1b3)]['map'](_0x449423=>({'project_id':_0x449423[_0x1c32dd(0x1c4)]?.['id'],'project_name':_0x449423[_0x1c32dd(0x1c4)]?.['name'],'workflow_id':_0x449423['id'],'workflow_name':_0x449423['name'],'revision':_0x449423[_0x1c32dd(0x1d1)],'timezone':_0x449423[_0x1c32dd(0x1a8)],'config':_0x449423[_0x1c32dd(0x1e3)],'id':_0x449423['id'],'name':_0x449423[_0x1c32dd(0x19f)],'project':_0x449423[_0x1c32dd(0x1c4)]}));}async['sessions'](_0x5572c9){const _0x4abf39=a52_0x9f1ca4;let _0x360c65;if(_0x5572c9?.[_0x4abf39(0x1a4)]){let _0x2cff2b,_0x21dd2f=![];while(!_0x21dd2f){const _0xd7d8ce=await this[_0x4abf39(0x1ab)][_0x4abf39(0x1a9)]({'limit':0x64,'last_id':_0x2cff2b}),_0x2159e3=_0xd7d8ce[_0x4abf39(0x1b3)][_0x4abf39(0x1a2)](_0x13edc0=>_0x13edc0[_0x4abf39(0x19f)]===_0x5572c9[_0x4abf39(0x1a4)]);if(_0x2159e3){_0x360c65=_0x2159e3['id'],_0x21dd2f=!![];break;}if(!_0xd7d8ce[_0x4abf39(0x1dc)]||_0xd7d8ce[_0x4abf39(0x1b3)][_0x4abf39(0x1b8)]===0x0)break;_0x2cff2b=_0xd7d8ce['lastId'];}if(!_0x360c65)throw new Error('Project\x20not\x20found:\x20'+_0x5572c9[_0x4abf39(0x1a4)]);}const _0xd8114d=await this[_0x4abf39(0x1ab)]['listSessions']({'project_id':_0x360c65,'project_name':_0x5572c9?.[_0x4abf39(0x1a4)],'workflow_name':_0x5572c9?.['workflowName'],'status':_0x5572c9?.[_0x4abf39(0x1ce)],'from_time':_0x5572c9?.['fromTime'],'to_time':_0x5572c9?.[_0x4abf39(0x1b4)],'limit':_0x5572c9?.[_0x4abf39(0x1ef)],'last_id':_0x5572c9?.['last_id']});return _0xd8114d['data'][_0x4abf39(0x1a6)](_0x5d2ab2=>({'project_id':_0x5d2ab2[_0x4abf39(0x1c4)]?.['id'],'project_name':_0x5d2ab2[_0x4abf39(0x1c4)]?.[_0x4abf39(0x19f)],'workflow_id':_0x5d2ab2[_0x4abf39(0x19d)]?.['id'],'workflow_name':_0x5d2ab2[_0x4abf39(0x19d)]?.[_0x4abf39(0x19f)],'session_id':_0x5d2ab2['id'],'sessionUuid':_0x5d2ab2[_0x4abf39(0x1ca)],'sessionTime':_0x5d2ab2[_0x4abf39(0x1a3)],'lastAttempt':_0x5d2ab2['lastAttempt'],'id':_0x5d2ab2['id'],'project':_0x5d2ab2[_0x4abf39(0x1c4)],'workflow':_0x5d2ab2['workflow']}));}async[a52_0x9f1ca4(0x1bc)](_0x54f8fb){const _0x557534=a52_0x9f1ca4,_0x2d55d1=await this['client'][_0x557534(0x1d2)]({'project_name':_0x54f8fb?.['projectName'],'workflow_name':_0x54f8fb?.[_0x557534(0x1a0)],'include_retried':_0x54f8fb?.[_0x557534(0x1bd)],'limit':_0x54f8fb?.[_0x557534(0x1ef)],'last_id':_0x54f8fb?.[_0x557534(0x1df)]});return _0x2d55d1[_0x557534(0x1b3)][_0x557534(0x1a6)](_0x7b2a25=>({'project_id':_0x7b2a25[_0x557534(0x1c4)]?.['id'],'project_name':_0x7b2a25[_0x557534(0x1c4)]?.[_0x557534(0x19f)],'workflow_id':_0x7b2a25[_0x557534(0x19d)]?.['id'],'workflow_name':_0x7b2a25['workflow']?.[_0x557534(0x19f)],'session_id':_0x7b2a25[_0x557534(0x1fb)],'sessionUuid':_0x7b2a25[_0x557534(0x1ca)],'sessionTime':_0x7b2a25['sessionTime'],'attempt_id':_0x7b2a25['id'],'attempt_index':_0x7b2a25[_0x557534(0x1e4)],'retryAttemptName':_0x7b2a25[_0x557534(0x1ee)],'done':_0x7b2a25['done'],'success':_0x7b2a25[_0x557534(0x1bf)],'cancelRequested':_0x7b2a25[_0x557534(0x1f8)],'params':_0x7b2a25[_0x557534(0x1f2)],'createdAt':_0x7b2a25['createdAt'],'finishedAt':_0x7b2a25['finishedAt'],'id':_0x7b2a25['id'],'index':_0x7b2a25['index'],'project':_0x7b2a25[_0x557534(0x1c4)],'workflow':_0x7b2a25[_0x557534(0x19d)]}));}async[a52_0x9f1ca4(0x1c2)](_0x19f67b){const _0x8c11f2=a52_0x9f1ca4,_0x4562ed=await this[_0x8c11f2(0x1ab)][_0x8c11f2(0x1d8)](_0x19f67b);return _0x4562ed;}async[a52_0x9f1ca4(0x1ba)](_0x1a5267,_0xc7b004=![]){const _0x24a012=a52_0x9f1ca4,_0x3dd19e=await this[_0x24a012(0x1ab)][_0x24a012(0x1eb)](_0x1a5267,_0xc7b004);return _0x3dd19e[_0x24a012(0x1a6)](_0x1b1124=>({'task_id':_0x1b1124['id'],'task_name':_0x1b1124[_0x24a012(0x1f5)],'parentId':_0x1b1124['parentId'],'config':_0x1b1124['config'],'upstreams':_0x1b1124[_0x24a012(0x1e8)],'state':_0x1b1124[_0x24a012(0x1f1)],'exportParams':_0x1b1124[_0x24a012(0x1cb)],'storeParams':_0x1b1124['storeParams'],'stateParams':_0x1b1124['stateParams'],'updatedAt':_0x1b1124['updatedAt'],'retryAt':_0x1b1124['retryAt'],'startedAt':_0x1b1124[_0x24a012(0x1c5)],'error':_0x1b1124[_0x24a012(0x1cc)],'isGroup':_0x1b1124[_0x24a012(0x1bb)],'id':_0x1b1124['id'],'fullName':_0x1b1124[_0x24a012(0x1f5)]}));}async[a52_0x9f1ca4(0x1cd)](_0x3cef23,_0x7c72da,_0x3be412){const _0x4d3e77=a52_0x9f1ca4;return await this[_0x4d3e77(0x1ab)][_0x4d3e77(0x1ae)](_0x3cef23,_0x7c72da,_0x3be412);}async['kill'](_0x56882f,_0x768051){const _0x63f9ac=a52_0x9f1ca4,_0x510383=await this[_0x63f9ac(0x1ab)][_0x63f9ac(0x1b1)](_0x56882f,_0x768051);return _0x510383[_0x63f9ac(0x1af)];}async['retrySession'](_0x1a3962,_0x168d1a){const _0xf2d489=a52_0x9f1ca4,_0x223225=await this[_0xf2d489(0x1ab)][_0xf2d489(0x1a1)](_0x1a3962,{'from_task':_0x168d1a?.[_0xf2d489(0x1f3)],'retry_params':_0x168d1a?.['retryParams']});return{'attemptId':_0x223225['id'],'sessionId':_0x223225['sessionId']};}async['retryAttempt'](_0x20899e,_0x20f70b){const _0x2de9a6=a52_0x9f1ca4,_0x5b40a0=await this['client'][_0x2de9a6(0x1dd)](_0x20899e,{'resume_from':_0x20f70b?.[_0x2de9a6(0x1e6)],'retry_params':_0x20f70b?.[_0x2de9a6(0x1c8)],'force':_0x20f70b?.['force']});return{'attemptId':_0x5b40a0['id'],'sessionId':_0x5b40a0['sessionId']};}async[a52_0x9f1ca4(0x1d3)](_0x4510c4,_0x474e72,_0x2a3c98){const _0x29905a=a52_0x9f1ca4,{promises:_0xc3f2d5}=await import('fs'),_0x3030e4=await import(_0x29905a(0x1c1)),_0x203b50=await import('os'),_0x376521=await import(_0x29905a(0x1b6)),{id:_0x378128,name:_0x334794}=await this[_0x29905a(0x1e5)](_0x4510c4),_0x3d5adf=_0x203b50[_0x29905a(0x1e7)](),_0x198fd7=_0x3030e4['join'](_0x3d5adf,_0x29905a(0x1d0)+_0x378128+'-'+Date[_0x29905a(0x1f0)]()+_0x29905a(0x1f7));try{await this['client'][_0x29905a(0x19e)](_0x378128,_0x198fd7,_0x2a3c98?.[_0x29905a(0x1d1)]);const _0x5ba45e=_0x3030e4['join'](_0x474e72,_0x334794);await _0xc3f2d5[_0x29905a(0x1da)](_0x5ba45e,{'recursive':!![]}),await _0x376521[_0x29905a(0x1a7)]({'file':_0x198fd7,'cwd':_0x5ba45e,'gzip':!![]});const _0x1b535b=async _0x44bb3a=>{const _0x1a96e1=_0x29905a;let _0x368775=0x0;const _0x30c154=await _0xc3f2d5[_0x1a96e1(0x1b2)](_0x44bb3a,{'withFileTypes':!![]});for(const _0x334792 of _0x30c154){const _0x1fc074=_0x3030e4[_0x1a96e1(0x1e2)](_0x44bb3a,_0x334792[_0x1a96e1(0x19f)]);if(_0x334792[_0x1a96e1(0x1aa)]())_0x368775++;else _0x334792[_0x1a96e1(0x1f9)]()&&(_0x368775+=await _0x1b535b(_0x1fc074));}return _0x368775;},_0x5d341d=await _0x1b535b(_0x5ba45e);return{'projectName':_0x334794,'revision':_0x2a3c98?.['revision']||_0x29905a(0x1b5),'filesExtracted':_0x5d341d};}finally{try{await _0xc3f2d5['unlink'](_0x198fd7);}catch{}}}async[a52_0x9f1ca4(0x1e0)](_0x495290,_0x521f87){const _0x49f725=a52_0x9f1ca4,{promises:_0x61700}=await import('fs'),_0x53c807=await import('path'),_0x151b85=await import(_0x49f725(0x1b6)),_0x3e31a8=_0x521f87?.[_0x49f725(0x1a4)]||_0x53c807[_0x49f725(0x1ed)](_0x495290),_0x34433f=_0x521f87?.[_0x49f725(0x1d1)]||new Date()[_0x49f725(0x1c6)]()[_0x49f725(0x1d9)](/[:.]/g,'-');try{await _0x61700[_0x49f725(0x1d4)](_0x495290);}catch{throw new Error(_0x49f725(0x1ec)+_0x495290);}if(!_0x521f87?.['skipValidation']){const _0x52a098=await _0x61700[_0x49f725(0x1b2)](_0x495290),_0x2eab6a=_0x52a098[_0x49f725(0x19b)](_0x2f4ad6=>_0x2f4ad6['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x2eab6a[_0x49f725(0x1b8)]===0x0)throw new Error(_0x49f725(0x1a5)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20project\x20directory');for(const _0x3ab18e of _0x2eab6a){const _0x3f5790=_0x53c807[_0x49f725(0x1e2)](_0x495290,_0x3ab18e);try{await _0x61700[_0x49f725(0x1d4)](_0x3f5790);}catch{throw new Error(_0x49f725(0x1c3)+_0x3ab18e);}}}const _0x258e6d=async(_0x5768b0,_0x28cdeb='')=>{const _0x4e868e=_0x49f725,_0x13934d=await _0x61700[_0x4e868e(0x1b2)](_0x5768b0,{'withFileTypes':!![]}),_0x579801=[];for(const _0x383f38 of _0x13934d){const _0x32cffa=_0x53c807['join'](_0x28cdeb,_0x383f38['name']),_0x11f5c7=_0x53c807['join'](_0x5768b0,_0x383f38[_0x4e868e(0x19f)]);if(!shouldIncludeInArchive(_0x383f38['name']))continue;_0x383f38[_0x4e868e(0x1f9)]()?_0x579801['push'](...await _0x258e6d(_0x11f5c7,_0x32cffa)):_0x579801[_0x4e868e(0x1e0)](_0x32cffa);}return _0x579801;},_0x1a92da=await _0x258e6d(_0x495290),_0x4b7329=await import('os'),_0x2fbadf=_0x4b7329[_0x49f725(0x1e7)](),_0x15b4da=_0x53c807[_0x49f725(0x1e2)](_0x2fbadf,_0x49f725(0x1d6)+Date['now']()+_0x49f725(0x1f7));try{await _0x151b85[_0x49f725(0x1c9)]({'file':_0x15b4da,'gzip':!![],'cwd':_0x495290,'portable':!![]},_0x1a92da);const _0x1d031a=await this['client'][_0x49f725(0x1d7)](_0x3e31a8,_0x34433f,_0x15b4da,{'scheduleFrom':_0x521f87?.[_0x49f725(0x1cf)],'clearSchedule':_0x521f87?.['clearSchedule'],'clearScheduleAll':_0x521f87?.[_0x49f725(0x19c)]});return{'projectId':_0x1d031a['id'],'projectName':_0x1d031a[_0x49f725(0x19f)],'revision':_0x1d031a[_0x49f725(0x1d1)]};}finally{try{await _0x61700['unlink'](_0x15b4da);}catch{}}}async['delete'](_0x359e6e){const _0x5116aa=a52_0x9f1ca4,{id:_0x379d16}=await this[_0x5116aa(0x1e5)](_0x359e6e),_0x6d695f=await this[_0x5116aa(0x1ab)][_0x5116aa(0x1b9)](_0x379d16);return{'projectId':_0x6d695f['id'],'projectName':_0x6d695f[_0x5116aa(0x19f)]};}}function a52_0x1d85(){const _0x4fc8d6=['isDirectory','NUMERIC_ID_PATTERN','sessionId','filter','clearScheduleAll','workflow','downloadProjectArchive','name','workflowName','retrySession','find','sessionTime','projectName','No\x20','map','extract','timezone','listProjects','isFile','client','23972ModJgf','245faMLuI','getTaskLogs','message','88hHxroe','killAttempt','readdir','data','toTime','latest','tar','12696365irBQlu','length','deleteProject','tasks','isGroup','attempts','includeRetried','1303491MywjFr','success','2403470eVYbuj','path','attempt','Cannot\x20read\x20workflow\x20file:\x20','project','startedAt','toISOString','workflows','retryParams','create','sessionUuid','exportParams','error','logs','status','scheduleFrom','tdx-workflow-','revision','listAttempts','download','access','6jEeMKG','tdx-workflow-push-','uploadProjectArchive','getAttempt','replace','mkdir','Project\x20not\x20found:\x20','lastId','retryAttempt','2ITNOuk','last_id','push','265294UHXWVR','join','config','index','resolveProjectId','resumeFrom','tmpdir','upstreams','175740BIasVy','test','getAttemptTasks','Project\x20directory\x20not\x20found:\x20','basename','retryAttemptName','limit','now','state','params','fromTask','listWorkflows','fullName','246546mceiEY','.tar.gz','cancelRequested'];a52_0x1d85=function(){return _0x4fc8d6;};return a52_0x1d85();}
1
+ const a52_0x460b4b=a52_0x2c50;(function(_0x5ee9e9,_0x4ff46){const _0x2a4a3c=a52_0x2c50,_0xcb6eb2=_0x5ee9e9();while(!![]){try{const _0x35c8b5=-parseInt(_0x2a4a3c(0xdf))/0x1+parseInt(_0x2a4a3c(0xd0))/0x2*(-parseInt(_0x2a4a3c(0xa8))/0x3)+parseInt(_0x2a4a3c(0xf7))/0x4*(-parseInt(_0x2a4a3c(0x110))/0x5)+-parseInt(_0x2a4a3c(0xb4))/0x6+parseInt(_0x2a4a3c(0x100))/0x7*(-parseInt(_0x2a4a3c(0xe5))/0x8)+-parseInt(_0x2a4a3c(0xcd))/0x9*(-parseInt(_0x2a4a3c(0xca))/0xa)+parseInt(_0x2a4a3c(0xb1))/0xb;if(_0x35c8b5===_0x4ff46)break;else _0xcb6eb2['push'](_0xcb6eb2['shift']());}catch(_0x9561ad){_0xcb6eb2['push'](_0xcb6eb2['shift']());}}}(a52_0x3b0c,0x21160));import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';function a52_0x3b0c(){const _0x2035f8=['createdAt','project','191038Ughnbe','storeParams','fullName','limit','getAttemptTasks','toTime','1179472FrffYk','message','cancelRequested','downloadProjectArchive','force','client','last_id','sessions','length','sessionId','endsWith','test','index','revision','kill','Cannot\x20read\x20workflow\x20file:\x20','download','attempt','79972OBuptL','success','filter','getTaskLogs','NUMERIC_ID_PATTERN','sessionTime','workflow','tmpdir','tar','7JMhapB','basename','readdir','listWorkflows','isGroup','state','projectName','name','fromTask','extract','retryAttemptName','find','listAttempts','deleteProject','finishedAt','config','25uBGgCc','33oSEIxz','lastId','listSessions','retryAt','workflowName','toISOString','skipValidation','unlink','startedAt','6472642uarVwL','resumeFrom','exportParams','555498xkINif','data','updatedAt','retryParams','stateParams','No\x20','clearSchedule','parentId','lastAttempt','attempts','now','workflows','scheduleFrom','killAttempt','push','sessionUuid','isFile','params','includeRetried','resolveProjectId','error','delete','1401470SEGkIC','tdx-workflow-push-','path','9jviLcU','.tar.gz','access','11278XEThqE','logs','retryAttempt','join','done','isDirectory','tasks','Project\x20not\x20found:\x20','listProjects','mkdir','map','timezone','\x20workflow\x20files\x20found\x20in\x20project\x20directory'];a52_0x3b0c=function(){return _0x2035f8;};return a52_0x3b0c();}function a52_0x2c50(_0x25559f,_0xd7e158){const _0x3b0c4b=a52_0x3b0c();return a52_0x2c50=function(_0x2c5089,_0x2190bf){_0x2c5089=_0x2c5089-0xa8;let _0x43dbfa=_0x3b0c4b[_0x2c5089];return _0x43dbfa;},a52_0x2c50(_0x25559f,_0xd7e158);}export class WorkflowAPI{['client'];static [a52_0x460b4b(0xfb)]=/^\d+$/;constructor(_0x22a786){const _0x5cd84f=a52_0x460b4b;this[_0x5cd84f(0xea)]=_0x22a786;}async[a52_0x460b4b(0xc7)](_0x2a5045){const _0x5ba6b4=a52_0x460b4b;if(WorkflowAPI[_0x5ba6b4(0xfb)][_0x5ba6b4(0xf0)](_0x2a5045))return{'id':_0x2a5045,'name':_0x2a5045};const _0x1a5da6=await this['client']['listProjects']({'name_pattern':_0x2a5045}),_0x51c9ff=_0x1a5da6['data'][_0x5ba6b4(0x10b)](_0x31ac2d=>_0x31ac2d[_0x5ba6b4(0x107)]===_0x2a5045);if(!_0x51c9ff)throw new Error(_0x5ba6b4(0xd7)+_0x2a5045);return{'id':_0x51c9ff['id'],'name':_0x51c9ff[_0x5ba6b4(0x107)]};}async['projects'](_0x231272,_0x2c039d){const _0x1c24c4=a52_0x460b4b,_0x4f8606=await this[_0x1c24c4(0xea)][_0x1c24c4(0xd8)]({'name_pattern':_0x231272,..._0x2c039d});return _0x4f8606[_0x1c24c4(0xb5)][_0x1c24c4(0xda)](_0x267927=>({..._0x267927,'project_id':_0x267927['id'],'project_name':_0x267927[_0x1c24c4(0x107)]}));}async[a52_0x460b4b(0xbf)](_0x104c39,_0x1c21fd){const _0x38651b=a52_0x460b4b,_0xdf1bf8=await this[_0x38651b(0xea)][_0x38651b(0x103)]({'project_name':_0x104c39,..._0x1c21fd});return _0xdf1bf8[_0x38651b(0xb5)][_0x38651b(0xda)](_0x252c98=>({'project_id':_0x252c98['project']?.['id'],'project_name':_0x252c98[_0x38651b(0xde)]?.[_0x38651b(0x107)],'workflow_id':_0x252c98['id'],'workflow_name':_0x252c98['name'],'revision':_0x252c98['revision'],'timezone':_0x252c98[_0x38651b(0xdb)],'config':_0x252c98[_0x38651b(0x10f)],'id':_0x252c98['id'],'name':_0x252c98[_0x38651b(0x107)],'project':_0x252c98[_0x38651b(0xde)]}));}async[a52_0x460b4b(0xec)](_0x29abc4){const _0x10d5cc=a52_0x460b4b;let _0x18888e;if(_0x29abc4?.[_0x10d5cc(0x106)]){let _0x312a86,_0xa89c7b=![];while(!_0xa89c7b){const _0x56edda=await this[_0x10d5cc(0xea)][_0x10d5cc(0xd8)]({'limit':0x64,'last_id':_0x312a86}),_0x5898f8=_0x56edda[_0x10d5cc(0xb5)][_0x10d5cc(0x10b)](_0x440f1f=>_0x440f1f['name']===_0x29abc4[_0x10d5cc(0x106)]);if(_0x5898f8){_0x18888e=_0x5898f8['id'],_0xa89c7b=!![];break;}if(!_0x56edda[_0x10d5cc(0xa9)]||_0x56edda[_0x10d5cc(0xb5)][_0x10d5cc(0xed)]===0x0)break;_0x312a86=_0x56edda[_0x10d5cc(0xa9)];}if(!_0x18888e)throw new Error(_0x10d5cc(0xd7)+_0x29abc4[_0x10d5cc(0x106)]);}const _0x4651ce=await this[_0x10d5cc(0xea)][_0x10d5cc(0xaa)]({'project_id':_0x18888e,'project_name':_0x29abc4?.[_0x10d5cc(0x106)],'workflow_name':_0x29abc4?.[_0x10d5cc(0xac)],'status':_0x29abc4?.['status'],'from_time':_0x29abc4?.['fromTime'],'to_time':_0x29abc4?.[_0x10d5cc(0xe4)],'limit':_0x29abc4?.[_0x10d5cc(0xe2)],'last_id':_0x29abc4?.['last_id']});return _0x4651ce[_0x10d5cc(0xb5)][_0x10d5cc(0xda)](_0xd9ad3a=>({'project_id':_0xd9ad3a[_0x10d5cc(0xde)]?.['id'],'project_name':_0xd9ad3a[_0x10d5cc(0xde)]?.[_0x10d5cc(0x107)],'workflow_id':_0xd9ad3a[_0x10d5cc(0xfd)]?.['id'],'workflow_name':_0xd9ad3a[_0x10d5cc(0xfd)]?.[_0x10d5cc(0x107)],'session_id':_0xd9ad3a['id'],'sessionUuid':_0xd9ad3a[_0x10d5cc(0xc3)],'sessionTime':_0xd9ad3a[_0x10d5cc(0xfc)],'lastAttempt':_0xd9ad3a[_0x10d5cc(0xbc)],'id':_0xd9ad3a['id'],'project':_0xd9ad3a[_0x10d5cc(0xde)],'workflow':_0xd9ad3a[_0x10d5cc(0xfd)]}));}async[a52_0x460b4b(0xbd)](_0x3fa9c4){const _0x3591c2=a52_0x460b4b,_0x30124d=await this[_0x3591c2(0xea)][_0x3591c2(0x10c)]({'project_name':_0x3fa9c4?.[_0x3591c2(0x106)],'workflow_name':_0x3fa9c4?.[_0x3591c2(0xac)],'include_retried':_0x3fa9c4?.[_0x3591c2(0xc6)],'limit':_0x3fa9c4?.[_0x3591c2(0xe2)],'last_id':_0x3fa9c4?.[_0x3591c2(0xeb)]});return _0x30124d[_0x3591c2(0xb5)][_0x3591c2(0xda)](_0x4925d9=>({'project_id':_0x4925d9['project']?.['id'],'project_name':_0x4925d9['project']?.['name'],'workflow_id':_0x4925d9[_0x3591c2(0xfd)]?.['id'],'workflow_name':_0x4925d9[_0x3591c2(0xfd)]?.['name'],'session_id':_0x4925d9[_0x3591c2(0xee)],'sessionUuid':_0x4925d9[_0x3591c2(0xc3)],'sessionTime':_0x4925d9['sessionTime'],'attempt_id':_0x4925d9['id'],'attempt_index':_0x4925d9[_0x3591c2(0xf1)],'retryAttemptName':_0x4925d9[_0x3591c2(0x10a)],'done':_0x4925d9[_0x3591c2(0xd4)],'success':_0x4925d9[_0x3591c2(0xf8)],'cancelRequested':_0x4925d9[_0x3591c2(0xe7)],'params':_0x4925d9[_0x3591c2(0xc5)],'createdAt':_0x4925d9[_0x3591c2(0xdd)],'finishedAt':_0x4925d9[_0x3591c2(0x10e)],'id':_0x4925d9['id'],'index':_0x4925d9[_0x3591c2(0xf1)],'project':_0x4925d9[_0x3591c2(0xde)],'workflow':_0x4925d9['workflow']}));}async[a52_0x460b4b(0xf6)](_0x2039c9){const _0x38baf2=a52_0x460b4b,_0x1817b4=await this[_0x38baf2(0xea)]['getAttempt'](_0x2039c9);return _0x1817b4;}async[a52_0x460b4b(0xd6)](_0x4de0a8,_0x1d319d=![]){const _0x48f2d6=a52_0x460b4b,_0x114828=await this[_0x48f2d6(0xea)][_0x48f2d6(0xe3)](_0x4de0a8,_0x1d319d);return _0x114828[_0x48f2d6(0xda)](_0x3df1d5=>({'task_id':_0x3df1d5['id'],'task_name':_0x3df1d5[_0x48f2d6(0xe1)],'parentId':_0x3df1d5[_0x48f2d6(0xbb)],'config':_0x3df1d5[_0x48f2d6(0x10f)],'upstreams':_0x3df1d5['upstreams'],'state':_0x3df1d5[_0x48f2d6(0x105)],'exportParams':_0x3df1d5[_0x48f2d6(0xb3)],'storeParams':_0x3df1d5[_0x48f2d6(0xe0)],'stateParams':_0x3df1d5[_0x48f2d6(0xb8)],'updatedAt':_0x3df1d5[_0x48f2d6(0xb6)],'retryAt':_0x3df1d5[_0x48f2d6(0xab)],'startedAt':_0x3df1d5[_0x48f2d6(0xb0)],'error':_0x3df1d5[_0x48f2d6(0xc8)],'isGroup':_0x3df1d5[_0x48f2d6(0x104)],'id':_0x3df1d5['id'],'fullName':_0x3df1d5[_0x48f2d6(0xe1)]}));}async[a52_0x460b4b(0xd1)](_0x47ec0b,_0x5d7d98,_0x442b29){const _0x3d3169=a52_0x460b4b;return await this[_0x3d3169(0xea)][_0x3d3169(0xfa)](_0x47ec0b,_0x5d7d98,_0x442b29);}async[a52_0x460b4b(0xf3)](_0x27433b,_0x18c9a4){const _0x2a1d20=a52_0x460b4b,_0x568401=await this[_0x2a1d20(0xea)][_0x2a1d20(0xc1)](_0x27433b,_0x18c9a4);return _0x568401[_0x2a1d20(0xe6)];}async['retrySession'](_0x47ae1b,_0x2395b8){const _0x1885b7=a52_0x460b4b,_0x3492cf=await this[_0x1885b7(0xea)]['retrySession'](_0x47ae1b,{'from_task':_0x2395b8?.[_0x1885b7(0x108)],'retry_params':_0x2395b8?.[_0x1885b7(0xb7)]});return{'attemptId':_0x3492cf['id'],'sessionId':_0x3492cf[_0x1885b7(0xee)]};}async[a52_0x460b4b(0xd2)](_0x39701a,_0x5a9621){const _0x1ddaf6=a52_0x460b4b,_0xb08e17=await this['client'][_0x1ddaf6(0xd2)](_0x39701a,{'resume_from':_0x5a9621?.[_0x1ddaf6(0xb2)],'retry_params':_0x5a9621?.[_0x1ddaf6(0xb7)],'force':_0x5a9621?.[_0x1ddaf6(0xe9)]});return{'attemptId':_0xb08e17['id'],'sessionId':_0xb08e17['sessionId']};}async[a52_0x460b4b(0xf5)](_0x49e62c,_0x150393,_0x290c69){const _0x29ebbf=a52_0x460b4b,{promises:_0x1181fe}=await import('fs'),_0x3fdbd8=await import(_0x29ebbf(0xcc)),_0x112866=await import('os'),_0xd88564=await import(_0x29ebbf(0xff)),{id:_0x33c411,name:_0x3ca928}=await this[_0x29ebbf(0xc7)](_0x49e62c),_0x363a5f=_0x112866[_0x29ebbf(0xfe)](),_0x477166=_0x3fdbd8[_0x29ebbf(0xd3)](_0x363a5f,'tdx-workflow-'+_0x33c411+'-'+Date[_0x29ebbf(0xbe)]()+_0x29ebbf(0xce));try{await this['client'][_0x29ebbf(0xe8)](_0x33c411,_0x477166,_0x290c69?.['revision']);const _0x5c3d35=_0x3fdbd8[_0x29ebbf(0xd3)](_0x150393,_0x3ca928);await _0x1181fe[_0x29ebbf(0xd9)](_0x5c3d35,{'recursive':!![]}),await _0xd88564[_0x29ebbf(0x109)]({'file':_0x477166,'cwd':_0x5c3d35,'gzip':!![]});const _0x55ee88=async _0x161cb2=>{const _0x2f28c8=_0x29ebbf;let _0x113399=0x0;const _0x415922=await _0x1181fe[_0x2f28c8(0x102)](_0x161cb2,{'withFileTypes':!![]});for(const _0x35b147 of _0x415922){const _0x1d2de6=_0x3fdbd8['join'](_0x161cb2,_0x35b147['name']);if(_0x35b147[_0x2f28c8(0xc4)]())_0x113399++;else _0x35b147[_0x2f28c8(0xd5)]()&&(_0x113399+=await _0x55ee88(_0x1d2de6));}return _0x113399;},_0x4924f6=await _0x55ee88(_0x5c3d35);return{'projectName':_0x3ca928,'revision':_0x290c69?.['revision']||'latest','filesExtracted':_0x4924f6};}finally{try{await _0x1181fe['unlink'](_0x477166);}catch{}}}async[a52_0x460b4b(0xc2)](_0x36ca9e,_0x583fc2){const _0x32a23e=a52_0x460b4b,{promises:_0x5ae1d6}=await import('fs'),_0x498556=await import(_0x32a23e(0xcc)),_0x46ef67=await import('tar'),_0x12d161=_0x583fc2?.[_0x32a23e(0x106)]||_0x498556[_0x32a23e(0x101)](_0x36ca9e),_0x1d9c56=_0x583fc2?.[_0x32a23e(0xf2)]||new Date()[_0x32a23e(0xad)]()['replace'](/[:.]/g,'-');try{await _0x5ae1d6['access'](_0x36ca9e);}catch{throw new Error('Project\x20directory\x20not\x20found:\x20'+_0x36ca9e);}if(!_0x583fc2?.[_0x32a23e(0xae)]){const _0x35c41=await _0x5ae1d6['readdir'](_0x36ca9e),_0x11b5cb=_0x35c41[_0x32a23e(0xf9)](_0x5a411e=>_0x5a411e[_0x32a23e(0xef)](WORKFLOW_FILE_EXTENSION));if(_0x11b5cb['length']===0x0)throw new Error(_0x32a23e(0xb9)+WORKFLOW_FILE_EXTENSION+_0x32a23e(0xdc));for(const _0x39a28e of _0x11b5cb){const _0x23487e=_0x498556[_0x32a23e(0xd3)](_0x36ca9e,_0x39a28e);try{await _0x5ae1d6[_0x32a23e(0xcf)](_0x23487e);}catch{throw new Error(_0x32a23e(0xf4)+_0x39a28e);}}}const _0x26401d=async(_0x3e3fb0,_0x9a6606='')=>{const _0x44c66f=_0x32a23e,_0x1618a7=await _0x5ae1d6['readdir'](_0x3e3fb0,{'withFileTypes':!![]}),_0x44fbf8=[];for(const _0x3c8e8a of _0x1618a7){const _0x5409a2=_0x498556[_0x44c66f(0xd3)](_0x9a6606,_0x3c8e8a[_0x44c66f(0x107)]),_0x3f18de=_0x498556['join'](_0x3e3fb0,_0x3c8e8a[_0x44c66f(0x107)]);if(!shouldIncludeInArchive(_0x3c8e8a['name']))continue;_0x3c8e8a['isDirectory']()?_0x44fbf8[_0x44c66f(0xc2)](...await _0x26401d(_0x3f18de,_0x5409a2)):_0x44fbf8[_0x44c66f(0xc2)](_0x5409a2);}return _0x44fbf8;},_0x8f19f5=await _0x26401d(_0x36ca9e),_0x277d0f=await import('os'),_0x576d4f=_0x277d0f[_0x32a23e(0xfe)](),_0x2475b1=_0x498556[_0x32a23e(0xd3)](_0x576d4f,_0x32a23e(0xcb)+Date[_0x32a23e(0xbe)]()+_0x32a23e(0xce));try{await _0x46ef67['create']({'file':_0x2475b1,'gzip':!![],'cwd':_0x36ca9e,'portable':!![]},_0x8f19f5);const _0x27f4e7=await this[_0x32a23e(0xea)]['uploadProjectArchive'](_0x12d161,_0x1d9c56,_0x2475b1,{'scheduleFrom':_0x583fc2?.[_0x32a23e(0xc0)],'clearSchedule':_0x583fc2?.[_0x32a23e(0xba)],'clearScheduleAll':_0x583fc2?.['clearScheduleAll']});return{'projectId':_0x27f4e7['id'],'projectName':_0x27f4e7[_0x32a23e(0x107)],'revision':_0x27f4e7[_0x32a23e(0xf2)]};}finally{try{await _0x5ae1d6[_0x32a23e(0xaf)](_0x2475b1);}catch{}}}async[a52_0x460b4b(0xc9)](_0x47faae){const _0xbb9811=a52_0x460b4b,{id:_0x171fbd}=await this['resolveProjectId'](_0x47faae),_0x398c14=await this['client'][_0xbb9811(0x10d)](_0x171fbd);return{'projectId':_0x398c14['id'],'projectName':_0x398c14[_0xbb9811(0x107)]};}}
@@ -1 +1 @@
1
- function a55_0x2fc4(){const _0xae4467=['https://api-staging.treasuredata.co.jp','12590wzAQOU','2736040fdflWV','https://api.eu01.treasuredata.com','12rxTQlR','55YkfDRO','https://api-workflow.ap03.treasuredata.com','2294552AYvsWc','25422859tudRVz','https://api-staging-presto.treasuredata.com','https://api-presto.treasuredata.com','https://api-presto.ap02.treasuredata.com','https://api-staging-workflow.treasuredata.co.jp','https://api-development.us01.treasuredata.com','281412kWWPmQ','204udPAYR','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','82024nWBiSo','https://api-staging-cdp.treasuredata.co.jp','https://api-workflow.treasuredata.co.jp','1155664ifRpCy','28BhiOtY','https://api-staging.ap03.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://api-staging-cdp.ap03.treasuredata.com','https://api-workflow.ap02.treasuredata.com','https://api-development.eu01.treasuredata.com','https://api-development-workflow.us01.treasuredata.com','7794ZqtoBY','https://api.ap03.treasuredata.com','https://llm-api.treasuredata.com','https://api-cdp.treasuredata.com','https://llm-api-development.eu01.treasuredata.com','\x27\x20and\x20site\x20\x27','https://api.ap02.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','https://api-staging-workflow.ap03.treasuredata.com','https://api.treasuredata.com','https://llm-api-staging.ap03.treasuredata.com','https://api-development-cdp.eu01.treasuredata.com','https://api-development-cdp.us01.treasuredata.com','https://llm-api.ap02.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','https://api-presto.eu01.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-presto.treasuredata.co.jp','https://api-cdp.ap03.treasuredata.com','https://llm-api-development.us01.treasuredata.com','https://llm-api.treasuredata.co.jp'];a55_0x2fc4=function(){return _0xae4467;};return a55_0x2fc4();}const a55_0x37c6f1=a55_0x402b;function a55_0x402b(_0x9fb790,_0x297f92){const _0x2fc442=a55_0x2fc4();return a55_0x402b=function(_0x402b72,_0x50da67){_0x402b72=_0x402b72-0x140;let _0x524312=_0x2fc442[_0x402b72];return _0x524312;},a55_0x402b(_0x9fb790,_0x297f92);}(function(_0x1c2c16,_0x434412){const _0x224848=a55_0x402b,_0x1f8377=_0x1c2c16();while(!![]){try{const _0xf09065=-parseInt(_0x224848(0x167))/0x1+-parseInt(_0x224848(0x155))/0x2+-parseInt(_0x224848(0x162))/0x3*(-parseInt(_0x224848(0x164))/0x4)+-parseInt(_0x224848(0x158))/0x5*(parseInt(_0x224848(0x161))/0x6)+parseInt(_0x224848(0x168))/0x7*(parseInt(_0x224848(0x15a))/0x8)+parseInt(_0x224848(0x16f))/0x9*(-parseInt(_0x224848(0x154))/0xa)+-parseInt(_0x224848(0x15b))/0xb*(-parseInt(_0x224848(0x157))/0xc);if(_0xf09065===_0x434412)break;else _0x1f8377['push'](_0x1f8377['shift']());}catch(_0x1d84f8){_0x1f8377['push'](_0x1f8377['shift']());}}}(a55_0x2fc4,0xb0809));export const TD_ENDPOINTS={'us01':a55_0x37c6f1(0x147),'jp01':'https://api.treasuredata.co.jp','eu01':a55_0x37c6f1(0x156),'ap02':a55_0x37c6f1(0x144),'ap03':a55_0x37c6f1(0x170),'dev-us01':a55_0x37c6f1(0x160),'dev-eu01':a55_0x37c6f1(0x16d),'stg-us01':'https://api-staging.us01.treasuredata.com','stg-jp01':a55_0x37c6f1(0x153),'stg-ap03':a55_0x37c6f1(0x169)};export const CDP_ENDPOINTS={'us01':a55_0x37c6f1(0x141),'jp01':'https://api-cdp.treasuredata.co.jp','eu01':'https://api-cdp.eu01.treasuredata.com','ap02':'https://api-cdp.ap02.treasuredata.com','ap03':a55_0x37c6f1(0x150),'dev-us01':a55_0x37c6f1(0x14a),'dev-eu01':a55_0x37c6f1(0x149),'stg-us01':a55_0x37c6f1(0x145),'stg-jp01':a55_0x37c6f1(0x165),'stg-ap03':a55_0x37c6f1(0x16b)};export const WORKFLOW_ENDPOINTS={'us01':'https://api-workflow.treasuredata.com','jp01':a55_0x37c6f1(0x166),'eu01':'https://api-workflow.eu01.treasuredata.com','ap02':a55_0x37c6f1(0x16c),'ap03':a55_0x37c6f1(0x159),'dev-us01':a55_0x37c6f1(0x16e),'dev-eu01':'https://api-development-workflow.eu01.treasuredata.com','stg-us01':a55_0x37c6f1(0x14c),'stg-jp01':a55_0x37c6f1(0x15f),'stg-ap03':a55_0x37c6f1(0x146)};export const TRINO_ENDPOINTS={'us01':a55_0x37c6f1(0x15d),'jp01':a55_0x37c6f1(0x14f),'eu01':a55_0x37c6f1(0x14d),'ap02':a55_0x37c6f1(0x15e),'ap03':'https://api-presto.ap03.treasuredata.com','dev-us01':'https://api-development-presto.treasuredata.com','dev-eu01':'https://api-development-presto.eu01.treasuredata.com','stg-us01':a55_0x37c6f1(0x15c),'stg-jp01':'https://api-staging-presto.treasuredata.co.jp','stg-ap03':'https://api-staging-presto.ap03.treasuredata.com'};export const LLM_ENDPOINTS={'us01':a55_0x37c6f1(0x140),'jp01':a55_0x37c6f1(0x152),'eu01':'https://llm-api.eu01.treasuredata.com','ap02':a55_0x37c6f1(0x14b),'ap03':a55_0x37c6f1(0x14e),'dev-us01':a55_0x37c6f1(0x151),'dev-eu01':a55_0x37c6f1(0x142),'stg-us01':a55_0x37c6f1(0x16a),'stg-jp01':'https://llm-api-staging.treasuredata.co.jp','stg-ap03':a55_0x37c6f1(0x148)};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x4c87c7,_0x43481d='td'){const _0x49a812=a55_0x37c6f1,_0xfe7bc5=API_ENDPOINTS[_0x43481d]?.[_0x4c87c7];if(!_0xfe7bc5)throw new Error(_0x49a812(0x163)+_0x43481d+_0x49a812(0x143)+_0x4c87c7+'\x27');return _0xfe7bc5;}
1
+ const a55_0x37d1ab=a55_0x97ab;(function(_0x5284f3,_0x5b796b){const _0x2ce4b5=a55_0x97ab,_0xbac125=_0x5284f3();while(!![]){try{const _0x411bd1=parseInt(_0x2ce4b5(0xa4))/0x1*(-parseInt(_0x2ce4b5(0x9b))/0x2)+parseInt(_0x2ce4b5(0xbb))/0x3+-parseInt(_0x2ce4b5(0xad))/0x4+parseInt(_0x2ce4b5(0xa9))/0x5+-parseInt(_0x2ce4b5(0xc0))/0x6*(-parseInt(_0x2ce4b5(0x9d))/0x7)+-parseInt(_0x2ce4b5(0xc8))/0x8*(-parseInt(_0x2ce4b5(0xa7))/0x9)+-parseInt(_0x2ce4b5(0xa0))/0xa*(-parseInt(_0x2ce4b5(0xbc))/0xb);if(_0x411bd1===_0x5b796b)break;else _0xbac125['push'](_0xbac125['shift']());}catch(_0x501cf7){_0xbac125['push'](_0xbac125['shift']());}}}(a55_0x1064,0x197df));function a55_0x1064(){const _0x14a46f=['105FinXpZ','https://api-staging-cdp.ap03.treasuredata.com','https://api-cdp.treasuredata.co.jp','512100jEHAom','https://api-development-presto.eu01.treasuredata.com','https://api-development-workflow.eu01.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','110812ppstQF','https://api.treasuredata.com','https://api-presto.eu01.treasuredata.com','174753LCQucF','https://api.treasuredata.co.jp','685845QIUZIr','https://api-staging-presto.treasuredata.co.jp','https://api.ap02.treasuredata.com','https://api-workflow.treasuredata.com','678356CUXfog','https://llm-api.treasuredata.co.jp','https://llm-api.ap02.treasuredata.com','https://api-staging-presto.treasuredata.com','https://api-staging-workflow.treasuredata.co.jp','https://llm-api-staging.treasuredata.co.jp','https://api-workflow.eu01.treasuredata.com','\x27\x20and\x20site\x20\x27','https://llm-api-development.eu01.treasuredata.com','https://api-cdp.eu01.treasuredata.com','https://api-development-presto.treasuredata.com','https://api-staging-cdp.treasuredata.co.jp','https://api-workflow.ap02.treasuredata.com','https://api.eu01.treasuredata.com','73953rAvxpt','11alPjgZ','https://api-cdp.ap03.treasuredata.com','https://api-staging-workflow.ap03.treasuredata.com','https://api-presto.ap03.treasuredata.com','45414Jibhaa','https://llm-api-staging.us01.treasuredata.com','https://api-development-workflow.us01.treasuredata.com','https://api-development.eu01.treasuredata.com','https://api-staging.us01.treasuredata.com','https://api.ap03.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','https://api-workflow.treasuredata.co.jp','24LijPIk','https://api-presto.ap02.treasuredata.com','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://api-cdp.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','https://api-staging.ap03.treasuredata.com','https://api-development-cdp.eu01.treasuredata.com','https://llm-api.treasuredata.com','2hVzuEe','https://llm-api-development.us01.treasuredata.com'];a55_0x1064=function(){return _0x14a46f;};return a55_0x1064();}export const TD_ENDPOINTS={'us01':a55_0x37d1ab(0xa5),'jp01':a55_0x37d1ab(0xa8),'eu01':a55_0x37d1ab(0xba),'ap02':a55_0x37d1ab(0xab),'ap03':a55_0x37d1ab(0xc5),'dev-us01':'https://api-development.us01.treasuredata.com','dev-eu01':a55_0x37d1ab(0xc3),'stg-us01':a55_0x37d1ab(0xc4),'stg-jp01':'https://api-staging.treasuredata.co.jp','stg-ap03':a55_0x37d1ab(0xcd)};export const CDP_ENDPOINTS={'us01':a55_0x37d1ab(0xcb),'jp01':a55_0x37d1ab(0x9f),'eu01':a55_0x37d1ab(0xb6),'ap02':'https://api-cdp.ap02.treasuredata.com','ap03':a55_0x37d1ab(0xbd),'dev-us01':'https://api-development-cdp.us01.treasuredata.com','dev-eu01':a55_0x37d1ab(0xce),'stg-us01':a55_0x37d1ab(0xa3),'stg-jp01':a55_0x37d1ab(0xb8),'stg-ap03':a55_0x37d1ab(0x9e)};export const WORKFLOW_ENDPOINTS={'us01':a55_0x37d1ab(0xac),'jp01':a55_0x37d1ab(0xc7),'eu01':a55_0x37d1ab(0xb3),'ap02':a55_0x37d1ab(0xb9),'ap03':'https://api-workflow.ap03.treasuredata.com','dev-us01':a55_0x37d1ab(0xc2),'dev-eu01':a55_0x37d1ab(0xa2),'stg-us01':a55_0x37d1ab(0xc6),'stg-jp01':a55_0x37d1ab(0xb1),'stg-ap03':a55_0x37d1ab(0xbe)};export const TRINO_ENDPOINTS={'us01':'https://api-presto.treasuredata.com','jp01':'https://api-presto.treasuredata.co.jp','eu01':a55_0x37d1ab(0xa6),'ap02':a55_0x37d1ab(0xc9),'ap03':a55_0x37d1ab(0xbf),'dev-us01':a55_0x37d1ab(0xb7),'dev-eu01':a55_0x37d1ab(0xa1),'stg-us01':a55_0x37d1ab(0xb0),'stg-jp01':a55_0x37d1ab(0xaa),'stg-ap03':a55_0x37d1ab(0xcc)};export const LLM_ENDPOINTS={'us01':a55_0x37d1ab(0xcf),'jp01':a55_0x37d1ab(0xae),'eu01':'https://llm-api.eu01.treasuredata.com','ap02':a55_0x37d1ab(0xaf),'ap03':'https://llm-api.ap03.treasuredata.com','dev-us01':a55_0x37d1ab(0x9c),'dev-eu01':a55_0x37d1ab(0xb5),'stg-us01':a55_0x37d1ab(0xc1),'stg-jp01':a55_0x37d1ab(0xb2),'stg-ap03':'https://llm-api-staging.ap03.treasuredata.com'};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};function a55_0x97ab(_0x165bb9,_0x23bd79){const _0x10648b=a55_0x1064();return a55_0x97ab=function(_0x97ab92,_0x505146){_0x97ab92=_0x97ab92-0x9b;let _0x5619f1=_0x10648b[_0x97ab92];return _0x5619f1;},a55_0x97ab(_0x165bb9,_0x23bd79);}export function getEndpoint(_0x22f753,_0x5996c7='td'){const _0x248f9b=a55_0x37d1ab,_0x577e62=API_ENDPOINTS[_0x5996c7]?.[_0x22f753];if(!_0x577e62)throw new Error(_0x248f9b(0xca)+_0x5996c7+_0x248f9b(0xb4)+_0x22f753+'\x27');return _0x577e62;}
@@ -1 +1 @@
1
- function a56_0x3ca8(_0x41137b,_0x11d2a4){const _0x2d90d1=a56_0x2d90();return a56_0x3ca8=function(_0x3ca826,_0x41454a){_0x3ca826=_0x3ca826-0x1bf;let _0x336702=_0x2d90d1[_0x3ca826];return _0x336702;},a56_0x3ca8(_0x41137b,_0x11d2a4);}function a56_0x2d90(){const _0x1a7840=['dev-us01','58745gdPQgJ','10622176oHyLyO','us01','10545ozsXRn','60oRPbHu','7JYqZlr','6413604oNmHeo','2771920HsSvXp','5227326kBFWTr','stg-us01','jp01','508JuzCyF','4HjtYuR','5135317FBqDvU'];a56_0x2d90=function(){return _0x1a7840;};return a56_0x2d90();}const a56_0xf0be99=a56_0x3ca8;(function(_0x11a62f,_0x5a64eb){const _0x11698f=a56_0x3ca8,_0xf2c0b6=_0x11a62f();while(!![]){try{const _0x234ed5=parseInt(_0x11698f(0x1bf))/0x1*(-parseInt(_0x11698f(0x1cb))/0x2)+-parseInt(_0x11698f(0x1c2))/0x3*(-parseInt(_0x11698f(0x1ca))/0x4)+parseInt(_0x11698f(0x1c6))/0x5+-parseInt(_0x11698f(0x1c5))/0x6*(parseInt(_0x11698f(0x1c4))/0x7)+-parseInt(_0x11698f(0x1c0))/0x8+-parseInt(_0x11698f(0x1c7))/0x9+-parseInt(_0x11698f(0x1c3))/0xa*(-parseInt(_0x11698f(0x1cc))/0xb);if(_0x234ed5===_0x5a64eb)break;else _0xf2c0b6['push'](_0xf2c0b6['shift']());}catch(_0x2893ed){_0xf2c0b6['push'](_0xf2c0b6['shift']());}}}(a56_0x2d90,0xac92d));export const SITE_ALIASES={'us':a56_0xf0be99(0x1c1),'aws':a56_0xf0be99(0x1c1),'jp':a56_0xf0be99(0x1c9),'aws-tokyo':a56_0xf0be99(0x1c9),'dev':a56_0xf0be99(0x1cd),'stg':a56_0xf0be99(0x1c8)};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
1
+ const a56_0x4f82ca=a56_0x4094;function a56_0x4094(_0x5b9502,_0x1857ea){const _0x53172e=a56_0x5317();return a56_0x4094=function(_0x409494,_0xb6a98b){_0x409494=_0x409494-0x1e7;let _0x150714=_0x53172e[_0x409494];return _0x150714;},a56_0x4094(_0x5b9502,_0x1857ea);}(function(_0x199a9f,_0x1aa040){const _0x3d1f29=a56_0x4094,_0x2404ff=_0x199a9f();while(!![]){try{const _0x283c28=-parseInt(_0x3d1f29(0x1ea))/0x1+parseInt(_0x3d1f29(0x1ee))/0x2*(parseInt(_0x3d1f29(0x1ec))/0x3)+parseInt(_0x3d1f29(0x1e7))/0x4+-parseInt(_0x3d1f29(0x1f2))/0x5+-parseInt(_0x3d1f29(0x1ef))/0x6*(-parseInt(_0x3d1f29(0x1f3))/0x7)+parseInt(_0x3d1f29(0x1e9))/0x8+-parseInt(_0x3d1f29(0x1eb))/0x9;if(_0x283c28===_0x1aa040)break;else _0x2404ff['push'](_0x2404ff['shift']());}catch(_0x49e6b6){_0x2404ff['push'](_0x2404ff['shift']());}}}(a56_0x5317,0x4fc43));export const SITE_ALIASES={'us':a56_0x4f82ca(0x1f0),'aws':a56_0x4f82ca(0x1f0),'jp':a56_0x4f82ca(0x1f1),'aws-tokyo':a56_0x4f82ca(0x1f1),'dev':a56_0x4f82ca(0x1ed),'stg':a56_0x4f82ca(0x1e8)};function a56_0x5317(){const _0x1562a5=['1940896jIaZjd','stg-us01','2158472EXappE','29918XnaVzG','3378393kaeYEj','90561lVpBnm','dev-us01','12PHoZtt','3048qrjUHL','us01','jp01','2308465bhtbZx','3549EnfERI'];a56_0x5317=function(){return _0x1562a5;};return a56_0x5317();}export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
@@ -1 +1 @@
1
- (function(_0x235375,_0x3f6783){const _0xac0ae3=a59_0x3532,_0x2923b5=_0x235375();while(!![]){try{const _0x12344b=parseInt(_0xac0ae3(0xc5))/0x1+parseInt(_0xac0ae3(0xc7))/0x2*(parseInt(_0xac0ae3(0xc4))/0x3)+parseInt(_0xac0ae3(0xc6))/0x4+-parseInt(_0xac0ae3(0xc1))/0x5*(parseInt(_0xac0ae3(0xc8))/0x6)+parseInt(_0xac0ae3(0xd0))/0x7*(parseInt(_0xac0ae3(0xc0))/0x8)+parseInt(_0xac0ae3(0xca))/0x9+-parseInt(_0xac0ae3(0xc2))/0xa;if(_0x12344b===_0x3f6783)break;else _0x2923b5['push'](_0x2923b5['shift']());}catch(_0x14a95e){_0x2923b5['push'](_0x2923b5['shift']());}}}(a59_0x3e3a,0x3e533));function a59_0x3e3a(){const _0x1dfa31=['81360epVgzn','1132940THgKfK','218AIezLL','42906BmSdOn','Agent\x20name\x20cannot\x20be\x20empty','408636LmCtBS','trim','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','split','length','Invalid\x20agent\x20reference\x20format:\x20','1261099inWFvr','Project\x20name\x20cannot\x20be\x20empty','16agVJhV','95GAsTDH','7455100zujAiW','Agent\x20reference\x20cannot\x20be\x20empty','10083vLiosI'];a59_0x3e3a=function(){return _0x1dfa31;};return a59_0x3e3a();}function a59_0x3532(_0x493cc7,_0x568570){const _0x3e3a0c=a59_0x3e3a();return a59_0x3532=function(_0x3532d4,_0x2509d4){_0x3532d4=_0x3532d4-0xbf;let _0x32dace=_0x3e3a0c[_0x3532d4];return _0x32dace;},a59_0x3532(_0x493cc7,_0x568570);}export function parseAgentRef(_0x5991a2){const _0x1f84d2=a59_0x3532;if(!_0x5991a2||_0x5991a2[_0x1f84d2(0xcb)]()==='')throw new Error(_0x1f84d2(0xc3));const _0x5a5744=_0x5991a2[_0x1f84d2(0xcb)](),_0x1ef3ec=_0x5a5744[_0x1f84d2(0xcd)]('/');if(_0x1ef3ec['length']===0x1)return{'projectName':_0x1ef3ec[0x0],'agentName':undefined};else{if(_0x1ef3ec[_0x1f84d2(0xce)]===0x2){const [_0x3a2052,_0x5895f4]=_0x1ef3ec;if(!_0x3a2052||_0x3a2052[_0x1f84d2(0xcb)]()==='')throw new Error(_0x1f84d2(0xbf));if(!_0x5895f4||_0x5895f4['trim']()==='')throw new Error(_0x1f84d2(0xc9));return{'projectName':_0x3a2052['trim'](),'agentName':_0x5895f4[_0x1f84d2(0xcb)]()};}else throw new Error(_0x1f84d2(0xcf)+_0x5991a2+_0x1f84d2(0xcc));}}
1
+ function a59_0x3408(_0x5cfe90,_0x4f1a3c){const _0x513050=a59_0x5130();return a59_0x3408=function(_0x3408ee,_0x8d266c){_0x3408ee=_0x3408ee-0xd1;let _0x414f20=_0x513050[_0x3408ee];return _0x414f20;},a59_0x3408(_0x5cfe90,_0x4f1a3c);}function a59_0x5130(){const _0x44ecea=['Agent\x20name\x20cannot\x20be\x20empty','1170Zauwgz','Invalid\x20agent\x20reference\x20format:\x20','24VWiAga','2943689DbtARZ','1OGSoup','4635672ivWRlb','13TMHnaS','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','76813EeHGwT','1074292cPFIxr','length','16iNkzdQ','40csISMT','Agent\x20reference\x20cannot\x20be\x20empty','871212ysBobr','split','470772hOERFg','Project\x20name\x20cannot\x20be\x20empty','trim','6371325tFWmeN'];a59_0x5130=function(){return _0x44ecea;};return a59_0x5130();}(function(_0x2b37c6,_0x55c0fb){const _0xd161d2=a59_0x3408,_0x568677=_0x2b37c6();while(!![]){try{const _0x487944=parseInt(_0xd161d2(0xd3))/0x1*(-parseInt(_0xd161d2(0xd8))/0x2)+parseInt(_0xd161d2(0xdf))/0x3*(-parseInt(_0xd161d2(0xda))/0x4)+parseInt(_0xd161d2(0xdb))/0x5*(parseInt(_0xd161d2(0xdd))/0x6)+parseInt(_0xd161d2(0xd2))/0x7*(-parseInt(_0xd161d2(0xd1))/0x8)+parseInt(_0xd161d2(0xe2))/0x9+parseInt(_0xd161d2(0xe4))/0xa*(parseInt(_0xd161d2(0xd7))/0xb)+-parseInt(_0xd161d2(0xd4))/0xc*(-parseInt(_0xd161d2(0xd5))/0xd);if(_0x487944===_0x55c0fb)break;else _0x568677['push'](_0x568677['shift']());}catch(_0x51d1cb){_0x568677['push'](_0x568677['shift']());}}}(a59_0x5130,0x9dd23));export function parseAgentRef(_0x20607c){const _0x25a092=a59_0x3408;if(!_0x20607c||_0x20607c['trim']()==='')throw new Error(_0x25a092(0xdc));const _0x4d8433=_0x20607c[_0x25a092(0xe1)](),_0x2d646c=_0x4d8433[_0x25a092(0xde)]('/');if(_0x2d646c['length']===0x1)return{'projectName':_0x2d646c[0x0],'agentName':undefined};else{if(_0x2d646c[_0x25a092(0xd9)]===0x2){const [_0x5264d2,_0x1238a5]=_0x2d646c;if(!_0x5264d2||_0x5264d2[_0x25a092(0xe1)]()==='')throw new Error(_0x25a092(0xe0));if(!_0x1238a5||_0x1238a5[_0x25a092(0xe1)]()==='')throw new Error(_0x25a092(0xe3));return{'projectName':_0x5264d2[_0x25a092(0xe1)](),'agentName':_0x1238a5['trim']()};}else throw new Error(_0x25a092(0xe5)+_0x20607c+_0x25a092(0xd6));}}
@@ -1 +1 @@
1
- (function(_0x4cdea6,_0x5ad4d4){const _0x374e55=a60_0x1478,_0x464a57=_0x4cdea6();while(!![]){try{const _0x1e7148=-parseInt(_0x374e55(0x117))/0x1*(parseInt(_0x374e55(0x10f))/0x2)+-parseInt(_0x374e55(0x118))/0x3*(parseInt(_0x374e55(0x10e))/0x4)+-parseInt(_0x374e55(0x116))/0x5*(-parseInt(_0x374e55(0x10a))/0x6)+parseInt(_0x374e55(0x112))/0x7+parseInt(_0x374e55(0x10c))/0x8*(parseInt(_0x374e55(0x114))/0x9)+-parseInt(_0x374e55(0x109))/0xa+parseInt(_0x374e55(0x10d))/0xb;if(_0x1e7148===_0x5ad4d4)break;else _0x464a57['push'](_0x464a57['shift']());}catch(_0x479e8c){_0x464a57['push'](_0x464a57['shift']());}}}(a60_0x4561,0x99b8a));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x16b1f4=a60_0x1478;return join(process[_0x16b1f4(0x10b)](),'.cache',_0x16b1f4(0x110));}function getLastChatIdPath(){const _0x36f0e0=a60_0x1478;return join(getCacheDir(),_0x36f0e0(0x115));}function a60_0x1478(_0x3f8619,_0x27c89d){const _0x456101=a60_0x4561();return a60_0x1478=function(_0x14784c,_0x15e839){_0x14784c=_0x14784c-0x109;let _0x1bd3b2=_0x456101[_0x14784c];return _0x1bd3b2;},a60_0x1478(_0x3f8619,_0x27c89d);}function ensureCacheDir(){const _0x3c1162=getCacheDir();!existsSync(_0x3c1162)&&mkdirSync(_0x3c1162,{'recursive':!![]});}export function saveLastChatId(_0x30d50e){const _0x3e64f4=a60_0x1478;ensureCacheDir();const _0x81330e=getLastChatIdPath();writeFileSync(_0x81330e,_0x30d50e,_0x3e64f4(0x113));}export function loadLastChatId(){const _0x1417a4=a60_0x1478,_0xf9d7f1=getLastChatIdPath();if(!existsSync(_0xf9d7f1))return undefined;try{const _0x495bdd=readFileSync(_0xf9d7f1,_0x1417a4(0x113))[_0x1417a4(0x111)]();return _0x495bdd||undefined;}catch{return undefined;}}function a60_0x4561(){const _0x36db29=['4458248AOGDFe','5594JnsvtB','tdx','trim','6833771AJqFKc','utf-8','90THxsTK','last_chat_id','4700060iWgUIQ','345pAXMfR','3gbNdEA','658370kEaxeY','6mrVxsA','cwd','32272DtgDfR','9002411pRvDQk'];a60_0x4561=function(){return _0x36db29;};return a60_0x4561();}export function clearLastChatId(){const _0x50a888=getLastChatIdPath();if(existsSync(_0x50a888))try{writeFileSync(_0x50a888,'','utf-8');}catch{}}
1
+ (function(_0x454e42,_0x2bd53c){const _0x582a08=a60_0x2018,_0x43d2af=_0x454e42();while(!![]){try{const _0x1f3e5b=-parseInt(_0x582a08(0x1ba))/0x1+-parseInt(_0x582a08(0x1b8))/0x2+parseInt(_0x582a08(0x1bd))/0x3+-parseInt(_0x582a08(0x1b6))/0x4+parseInt(_0x582a08(0x1b7))/0x5*(-parseInt(_0x582a08(0x1b5))/0x6)+parseInt(_0x582a08(0x1be))/0x7+-parseInt(_0x582a08(0x1b9))/0x8*(-parseInt(_0x582a08(0x1bc))/0x9);if(_0x1f3e5b===_0x2bd53c)break;else _0x43d2af['push'](_0x43d2af['shift']());}catch(_0x1cc101){_0x43d2af['push'](_0x43d2af['shift']());}}}(a60_0x3464,0x45072));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){return join(process['cwd'](),'.cache','tdx');}function getLastChatIdPath(){const _0x5e1fac=a60_0x2018;return join(getCacheDir(),_0x5e1fac(0x1bb));}function a60_0x2018(_0x13c354,_0x1aad23){const _0x3464a9=a60_0x3464();return a60_0x2018=function(_0x201849,_0xebbf20){_0x201849=_0x201849-0x1b4;let _0x41605f=_0x3464a9[_0x201849];return _0x41605f;},a60_0x2018(_0x13c354,_0x1aad23);}function ensureCacheDir(){const _0x24d805=getCacheDir();!existsSync(_0x24d805)&&mkdirSync(_0x24d805,{'recursive':!![]});}export function saveLastChatId(_0x46231b){ensureCacheDir();const _0x5a3701=getLastChatIdPath();writeFileSync(_0x5a3701,_0x46231b,'utf-8');}export function loadLastChatId(){const _0x5dd476=a60_0x2018,_0x3de95b=getLastChatIdPath();if(!existsSync(_0x3de95b))return undefined;try{const _0x351c38=readFileSync(_0x3de95b,'utf-8')[_0x5dd476(0x1b4)]();return _0x351c38||undefined;}catch{return undefined;}}function a60_0x3464(){const _0x5c4e14=['trim','6BKzJaJ','587220BaXBZg','1542275aHHOPR','67280CPGPXN','1832CSCAWx','13607vXdjDZ','last_chat_id','19917RnMepL','175905mkFZpX','1538831UsnRQL'];a60_0x3464=function(){return _0x5c4e14;};return a60_0x3464();}export function clearLastChatId(){const _0x41eb0e=getLastChatIdPath();if(existsSync(_0x41eb0e))try{writeFileSync(_0x41eb0e,'','utf-8');}catch{}}
@@ -1 +1 @@
1
- (function(_0x28d77f,_0x329532){const _0x15f7b0=a61_0x2f7e,_0x1e67e9=_0x28d77f();while(!![]){try{const _0x1373ab=parseInt(_0x15f7b0(0x192))/0x1+parseInt(_0x15f7b0(0x196))/0x2+-parseInt(_0x15f7b0(0x194))/0x3*(parseInt(_0x15f7b0(0x18a))/0x4)+parseInt(_0x15f7b0(0x179))/0x5*(parseInt(_0x15f7b0(0x193))/0x6)+-parseInt(_0x15f7b0(0x17f))/0x7*(-parseInt(_0x15f7b0(0x17e))/0x8)+-parseInt(_0x15f7b0(0x18b))/0x9*(-parseInt(_0x15f7b0(0x178))/0xa)+-parseInt(_0x15f7b0(0x186))/0xb*(parseInt(_0x15f7b0(0x185))/0xc);if(_0x1373ab===_0x329532)break;else _0x1e67e9['push'](_0x1e67e9['shift']());}catch(_0x1a78dc){_0x1e67e9['push'](_0x1e67e9['shift']());}}}(a61_0x2ab6,0x3d47e));function a61_0x2f7e(_0x5ad71c,_0x52c725){const _0x2ab61a=a61_0x2ab6();return a61_0x2f7e=function(_0x2f7e3a,_0x262067){_0x2f7e3a=_0x2f7e3a-0x175;let _0x390387=_0x2ab61a[_0x2f7e3a];return _0x390387;},a61_0x2f7e(_0x5ad71c,_0x52c725);}import{Chalk}from'chalk';export function shouldUseColor(_0x50be96={}){const _0x1bda2e=a61_0x2f7e;if(_0x50be96[_0x1bda2e(0x17d)]===!![])return![];if(_0x50be96[_0x1bda2e(0x17c)]===!![])return!![];if(process[_0x1bda2e(0x181)][_0x1bda2e(0x175)]!==undefined)return![];return process[_0x1bda2e(0x180)][_0x1bda2e(0x176)]??![];}export function getChalk(_0x2d2253={}){if(shouldUseColor(_0x2d2253))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x4cd0cb,_0x2afa81={}){return getChalk(_0x2afa81)['dim'](_0x4cd0cb);}function a61_0x2ab6(){const _0x4a89ba=['588FTfSrY','130647hcHaeA','join','stringify','boolean','40sXunLc','9WwdWCX','map','green','object','entries','length','blue','484605zeokfy','20604tKGBWd','50517LuvNgm','null','137458eMGuUd','NO_COLOR','isTTY','string','1232770dFjBpm','25BVSyxH','repeat','dim','color','noColor','32BmEBrT','538279DtoxmH','stdout','env','isArray','cyan','number'];a61_0x2ab6=function(){return _0x4a89ba;};return a61_0x2ab6();}export function colorHeader(_0x11bc9e,_0x5bf4cb={}){const _0x133716=a61_0x2f7e;return getChalk(_0x5bf4cb)[_0x133716(0x183)](_0x11bc9e);}export function colorType(_0x13f9a3,_0x428afb={}){const _0x2cf87a=a61_0x2f7e;return getChalk(_0x428afb)[_0x2cf87a(0x17b)](_0x13f9a3);}export function colorJSONKey(_0x2ef750,_0x1b7fef={}){const _0x27f530=a61_0x2f7e;return getChalk(_0x1b7fef)[_0x27f530(0x191)](_0x2ef750);}export function colorJSONString(_0x2da4ec,_0x457075={}){const _0x5248e9=a61_0x2f7e;return getChalk(_0x457075)[_0x5248e9(0x18d)](_0x2da4ec);}export function colorJSONNumber(_0x3012b4,_0x225be4={}){const _0x3ceeab=a61_0x2f7e;return getChalk(_0x225be4)[_0x3ceeab(0x183)](_0x3012b4);}export function colorJSONBoolean(_0x12964d,_0x4f02e2={}){return getChalk(_0x4f02e2)['yellow'](_0x12964d);}export function colorJSONNull(_0x823a39,_0x140f16={}){return getChalk(_0x140f16)['dim'](_0x823a39);}export function colorizeJSONCompact(_0x1c7d90,_0xeaee5b={}){const _0x3ac1cd=a61_0x2f7e;if(!shouldUseColor(_0xeaee5b))return JSON[_0x3ac1cd(0x188)](_0x1c7d90);if(_0x1c7d90===null)return colorJSONNull('null',_0xeaee5b);if(typeof _0x1c7d90===_0x3ac1cd(0x189))return colorJSONBoolean(String(_0x1c7d90),_0xeaee5b);if(typeof _0x1c7d90===_0x3ac1cd(0x184))return colorJSONNumber(String(_0x1c7d90),_0xeaee5b);if(typeof _0x1c7d90==='string')return colorJSONString(JSON[_0x3ac1cd(0x188)](_0x1c7d90),_0xeaee5b);if(Array[_0x3ac1cd(0x182)](_0x1c7d90)){if(_0x1c7d90[_0x3ac1cd(0x190)]===0x0)return'[]';const _0x597c7b=_0x1c7d90[_0x3ac1cd(0x18c)](_0x36ad3b=>colorizeJSONCompact(_0x36ad3b,_0xeaee5b));return'['+_0x597c7b[_0x3ac1cd(0x187)](',')+']';}if(typeof _0x1c7d90===_0x3ac1cd(0x18e)){const _0x31d189=Object[_0x3ac1cd(0x18f)](_0x1c7d90);if(_0x31d189[_0x3ac1cd(0x190)]===0x0)return'{}';const _0x37e38b=_0x31d189[_0x3ac1cd(0x18c)](([_0x372a0d,_0x19888c])=>{const _0x1c66f3=_0x3ac1cd,_0x5b3a09=colorJSONKey(JSON[_0x1c66f3(0x188)](_0x372a0d),_0xeaee5b),_0xb1c1a2=colorizeJSONCompact(_0x19888c,_0xeaee5b);return _0x5b3a09+':'+_0xb1c1a2;});return'{'+_0x37e38b['join'](',')+'}';}return String(_0x1c7d90);}export function colorizeJSON(_0x457937,_0x815ca0={},_0x5d812f=0x0){const _0x5d207b=a61_0x2f7e;if(!shouldUseColor(_0x815ca0))return JSON['stringify'](_0x457937,null,0x2);const _0x1ea013='\x20'[_0x5d207b(0x17a)](_0x5d812f),_0x27bfcd=_0x5d812f+0x2;if(_0x457937===null)return colorJSONNull(_0x5d207b(0x195),_0x815ca0);if(typeof _0x457937===_0x5d207b(0x189))return colorJSONBoolean(String(_0x457937),_0x815ca0);if(typeof _0x457937===_0x5d207b(0x184))return colorJSONNumber(String(_0x457937),_0x815ca0);if(typeof _0x457937===_0x5d207b(0x177))return colorJSONString(JSON[_0x5d207b(0x188)](_0x457937),_0x815ca0);if(Array[_0x5d207b(0x182)](_0x457937)){if(_0x457937[_0x5d207b(0x190)]===0x0)return'[]';const _0x41bd7b=_0x457937['map'](_0x1761bb=>{const _0x45bcff=_0x5d207b,_0x18f3d9=colorizeJSON(_0x1761bb,_0x815ca0,_0x27bfcd);return''+'\x20'[_0x45bcff(0x17a)](_0x27bfcd)+_0x18f3d9;});return'[\x0a'+_0x41bd7b[_0x5d207b(0x187)](',\x0a')+('\x0a'+_0x1ea013+']');}if(typeof _0x457937===_0x5d207b(0x18e)){const _0x5f5bc6=Object['entries'](_0x457937);if(_0x5f5bc6[_0x5d207b(0x190)]===0x0)return'{}';const _0x2c9aea=_0x5f5bc6['map'](([_0x2a44a2,_0x4ae0d1])=>{const _0x2d5e8c=_0x5d207b,_0x15789c=colorJSONKey(JSON[_0x2d5e8c(0x188)](_0x2a44a2),_0x815ca0),_0x498c5e=colorizeJSON(_0x4ae0d1,_0x815ca0,_0x27bfcd);return''+'\x20'['repeat'](_0x27bfcd)+_0x15789c+':\x20'+_0x498c5e;});return'{\x0a'+_0x2c9aea['join'](',\x0a')+('\x0a'+_0x1ea013+'}');}return String(_0x457937);}
1
+ (function(_0x2e8172,_0x56af9f){const _0x46689e=a61_0x5e01,_0xa73a23=_0x2e8172();while(!![]){try{const _0x4aaa8a=-parseInt(_0x46689e(0xbd))/0x1*(parseInt(_0x46689e(0xaf))/0x2)+parseInt(_0x46689e(0xba))/0x3*(parseInt(_0x46689e(0xb3))/0x4)+parseInt(_0x46689e(0xb8))/0x5*(-parseInt(_0x46689e(0xb4))/0x6)+parseInt(_0x46689e(0xb6))/0x7*(-parseInt(_0x46689e(0xad))/0x8)+-parseInt(_0x46689e(0xb5))/0x9*(-parseInt(_0x46689e(0xa7))/0xa)+-parseInt(_0x46689e(0xbf))/0xb*(-parseInt(_0x46689e(0xa2))/0xc)+parseInt(_0x46689e(0xc0))/0xd*(parseInt(_0x46689e(0xa9))/0xe);if(_0x4aaa8a===_0x56af9f)break;else _0xa73a23['push'](_0xa73a23['shift']());}catch(_0x35aac3){_0xa73a23['push'](_0xa73a23['shift']());}}}(a61_0x3e24,0xaa1c3));function a61_0x3e24(){const _0x4742f6=['object','yellow','stdout','30hRyLre','map','4408306CyGIXG','env','null','repeat','4579080NeWBwf','length','2NDoBIB','cyan','stringify','blue','1005232HFwbmB','6WahPcf','3444453tVwKGG','7uXLcwy','color','4576115VtvvHl','entries','9pDavMr','dim','string','1268011MyACNz','noColor','33iNPTtL','13LrOeWb','isArray','number','isTTY','boolean','4941744bdQzHb','join'];a61_0x3e24=function(){return _0x4742f6;};return a61_0x3e24();}import{Chalk}from'chalk';export function shouldUseColor(_0x12c8ef={}){const _0x295e05=a61_0x5e01;if(_0x12c8ef[_0x295e05(0xbe)]===!![])return![];if(_0x12c8ef[_0x295e05(0xb7)]===!![])return!![];if(process[_0x295e05(0xaa)]['NO_COLOR']!==undefined)return![];return process[_0x295e05(0xa6)][_0x295e05(0xa0)]??![];}function a61_0x5e01(_0x1ef8d3,_0x8b1ccc){const _0x3e24cd=a61_0x3e24();return a61_0x5e01=function(_0x5e0132,_0x47418e){_0x5e0132=_0x5e0132-0xa0;let _0xb01da8=_0x3e24cd[_0x5e0132];return _0xb01da8;},a61_0x5e01(_0x1ef8d3,_0x8b1ccc);}export function getChalk(_0x194839={}){if(shouldUseColor(_0x194839))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x5cefd4,_0x3f3fe6={}){const _0x3accdc=a61_0x5e01;return getChalk(_0x3f3fe6)[_0x3accdc(0xbb)](_0x5cefd4);}export function colorHeader(_0x280ad7,_0x346659={}){const _0xbb7ee2=a61_0x5e01;return getChalk(_0x346659)[_0xbb7ee2(0xb0)](_0x280ad7);}export function colorType(_0x47d10f,_0x13c830={}){const _0x449052=a61_0x5e01;return getChalk(_0x13c830)[_0x449052(0xbb)](_0x47d10f);}export function colorJSONKey(_0x1a34d9,_0xa69e90={}){const _0x114e42=a61_0x5e01;return getChalk(_0xa69e90)[_0x114e42(0xb2)](_0x1a34d9);}export function colorJSONString(_0x3d4fec,_0x158d44={}){return getChalk(_0x158d44)['green'](_0x3d4fec);}export function colorJSONNumber(_0x33ce95,_0x3df617={}){return getChalk(_0x3df617)['cyan'](_0x33ce95);}export function colorJSONBoolean(_0x32a069,_0x4f317a={}){const _0x1bae77=a61_0x5e01;return getChalk(_0x4f317a)[_0x1bae77(0xa5)](_0x32a069);}export function colorJSONNull(_0x29c348,_0x4576cc={}){const _0x38ed94=a61_0x5e01;return getChalk(_0x4576cc)[_0x38ed94(0xbb)](_0x29c348);}export function colorizeJSONCompact(_0x1fa600,_0x40057f={}){const _0x2a1129=a61_0x5e01;if(!shouldUseColor(_0x40057f))return JSON[_0x2a1129(0xb1)](_0x1fa600);if(_0x1fa600===null)return colorJSONNull(_0x2a1129(0xab),_0x40057f);if(typeof _0x1fa600==='boolean')return colorJSONBoolean(String(_0x1fa600),_0x40057f);if(typeof _0x1fa600==='number')return colorJSONNumber(String(_0x1fa600),_0x40057f);if(typeof _0x1fa600===_0x2a1129(0xbc))return colorJSONString(JSON[_0x2a1129(0xb1)](_0x1fa600),_0x40057f);if(Array[_0x2a1129(0xc1)](_0x1fa600)){if(_0x1fa600[_0x2a1129(0xae)]===0x0)return'[]';const _0x4c24f1=_0x1fa600[_0x2a1129(0xa8)](_0x540829=>colorizeJSONCompact(_0x540829,_0x40057f));return'['+_0x4c24f1[_0x2a1129(0xa3)](',')+']';}if(typeof _0x1fa600===_0x2a1129(0xa4)){const _0x5576d8=Object['entries'](_0x1fa600);if(_0x5576d8[_0x2a1129(0xae)]===0x0)return'{}';const _0x50e80a=_0x5576d8[_0x2a1129(0xa8)](([_0x891239,_0x3a0d15])=>{const _0x5019f6=_0x2a1129,_0x2b3e0a=colorJSONKey(JSON[_0x5019f6(0xb1)](_0x891239),_0x40057f),_0x48a4ac=colorizeJSONCompact(_0x3a0d15,_0x40057f);return _0x2b3e0a+':'+_0x48a4ac;});return'{'+_0x50e80a[_0x2a1129(0xa3)](',')+'}';}return String(_0x1fa600);}export function colorizeJSON(_0x793203,_0x22bbfb={},_0x32cd66=0x0){const _0x59c182=a61_0x5e01;if(!shouldUseColor(_0x22bbfb))return JSON[_0x59c182(0xb1)](_0x793203,null,0x2);const _0xe0e836='\x20'[_0x59c182(0xac)](_0x32cd66),_0x3bae9b=_0x32cd66+0x2;if(_0x793203===null)return colorJSONNull(_0x59c182(0xab),_0x22bbfb);if(typeof _0x793203===_0x59c182(0xa1))return colorJSONBoolean(String(_0x793203),_0x22bbfb);if(typeof _0x793203===_0x59c182(0xc2))return colorJSONNumber(String(_0x793203),_0x22bbfb);if(typeof _0x793203===_0x59c182(0xbc))return colorJSONString(JSON[_0x59c182(0xb1)](_0x793203),_0x22bbfb);if(Array[_0x59c182(0xc1)](_0x793203)){if(_0x793203[_0x59c182(0xae)]===0x0)return'[]';const _0x592a65=_0x793203['map'](_0x2f3721=>{const _0x1a3dca=colorizeJSON(_0x2f3721,_0x22bbfb,_0x3bae9b);return''+'\x20'['repeat'](_0x3bae9b)+_0x1a3dca;});return'[\x0a'+_0x592a65[_0x59c182(0xa3)](',\x0a')+('\x0a'+_0xe0e836+']');}if(typeof _0x793203===_0x59c182(0xa4)){const _0x1f76bd=Object[_0x59c182(0xb9)](_0x793203);if(_0x1f76bd['length']===0x0)return'{}';const _0x278a05=_0x1f76bd[_0x59c182(0xa8)](([_0x53fac0,_0x6cc2e5])=>{const _0x3b289e=_0x59c182,_0x14b1aa=colorJSONKey(JSON['stringify'](_0x53fac0),_0x22bbfb),_0x16922a=colorizeJSON(_0x6cc2e5,_0x22bbfb,_0x3bae9b);return''+'\x20'[_0x3b289e(0xac)](_0x3bae9b)+_0x14b1aa+':\x20'+_0x16922a;});return'{\x0a'+_0x278a05[_0x59c182(0xa3)](',\x0a')+('\x0a'+_0xe0e836+'}');}return String(_0x793203);}
@@ -1 +1 @@
1
- (function(_0x43ae3d,_0x4dbcd3){const _0x42200a=a62_0x2260,_0x5db16a=_0x43ae3d();while(!![]){try{const _0x5b1880=-parseInt(_0x42200a(0xc6))/0x1+-parseInt(_0x42200a(0xc3))/0x2*(parseInt(_0x42200a(0xc5))/0x3)+parseInt(_0x42200a(0xf9))/0x4+parseInt(_0x42200a(0xc1))/0x5+-parseInt(_0x42200a(0xd3))/0x6+parseInt(_0x42200a(0xf5))/0x7*(-parseInt(_0x42200a(0xef))/0x8)+parseInt(_0x42200a(0xd2))/0x9;if(_0x5b1880===_0x4dbcd3)break;else _0x5db16a['push'](_0x5db16a['shift']());}catch(_0x2ab193){_0x5db16a['push'](_0x5db16a['shift']());}}}(a62_0x2b51,0xaeca3));function a62_0x2260(_0x42dcff,_0x3d234d){const _0x2b5122=a62_0x2b51();return a62_0x2260=function(_0x226095,_0x5032ce){_0x226095=_0x226095-0xbe;let _0x26188a=_0x2b5122[_0x226095];return _0x26188a;},a62_0x2260(_0x42dcff,_0x3d234d);}import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a62_0x2b51(){const _0x3b9c85=['619285wLvrHD','varchar','sdk-result','─┬─','query','isTTY','object','[query]','repeat','bold','FINISHED','forEach','16641684bnjqVo','7764744UlqxwW','pipe','less','push','table','double','isInteger','stderr','cyan','output','number','entries','padEnd','red','spawn','map','log','jsonl','write','stringify','boolean','max','debug','split','string','join','format','length','8bSJUCV','color','─┴─','error','cmdout','filter','5961382GVysJR','noColor','No\x20data','[Object]','4765240mQeUTF','close','inherit','trim','json','limit','stdin','3325815OgHvjG','-FXRSn','650DRHtgr','[logs]','2073TPzFWQ'];a62_0x2b51=function(){return _0x3b9c85;};return a62_0x2b51();}import a62_0x18292c from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function parseOutputOptions(_0x532ceb){const _0x196a77=a62_0x2260;return{'format':_0x532ceb[_0x196a77(0xed)]||_0x196a77(0xd7),'output':_0x532ceb[_0x196a77(0xdc)]||'','limit':_0x532ceb[_0x196a77(0xbf)],'color':_0x532ceb['color'],'noColor':_0x532ceb[_0x196a77(0xf6)]};}function convertSDKResultToQueryResult(_0x25a05c){const _0x57eef9=a62_0x2260,_0xc7b984=[];if(_0x25a05c['length']>0x0){const _0x32ec52=_0x25a05c[0x0];for(const [_0x329c15,_0x124b1d]of Object[_0x57eef9(0xde)](_0x32ec52)){let _0xc5db3a=_0x57eef9(0xc7);if(typeof _0x124b1d===_0x57eef9(0xdd))_0xc5db3a=Number[_0x57eef9(0xd9)](_0x124b1d)?'bigint':_0x57eef9(0xd8);else{if(typeof _0x124b1d===_0x57eef9(0xe7))_0xc5db3a=_0x57eef9(0xe7);else _0x124b1d===null&&(_0xc5db3a=_0x57eef9(0xc7));}_0xc7b984[_0x57eef9(0xd6)]({'name':_0x329c15,'type':_0xc5db3a});}}return{'queryId':_0x57eef9(0xc8),'columns':_0xc7b984,'data':_0x25a05c,'stats':{'state':_0x57eef9(0xd0),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x25a05c['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x1b1d83,_0x3b260d){const _0x43ce98=convertSDKResultToQueryResult(_0x1b1d83);return formatQueryOutput(_0x43ce98,_0x3b260d);}export async function formatQueryOutput(_0x3d8eac,_0x445076){const _0x3f1c40=a62_0x2260,{format:_0x3c910f,limit:_0x3d70f5,output:_0x2b6cfc,color:_0xb302cc,noColor:_0x382e27}=_0x445076,_0xa3f9f0=Boolean(_0x2b6cfc)&&!_0xb302cc,_0x307106={'color':_0xb302cc,'noColor':_0x382e27||_0xa3f9f0};if(_0x3c910f===_0x3f1c40(0xd7)){const _0x56a812=shouldUseLess(_0x3c910f,_0x2b6cfc);return formatAsTable(_0x3d8eac,_0x3d70f5,_0x56a812,_0x307106);}else{if(_0x3c910f===_0x3f1c40(0xbe))return formatAsJSON(_0x3d8eac,_0x307106);else return _0x3c910f===_0x3f1c40(0xe4)?formatAsJSONL(_0x3d8eac,_0x307106):formatQueryResult(_0x3d8eac,_0x3c910f);}}function shouldUseLess(_0x169837,_0xbed311){const _0x2d2032=a62_0x2260;return _0x169837===_0x2d2032(0xd7)&&process['stdout'][_0x2d2032(0xcb)]&&!_0xbed311;}export function resolveOutputOptions(_0x317ec3){const _0x1cdb6a=a62_0x2260,_0x147b5d=resolveOutputFormat(_0x317ec3[_0x1cdb6a(0xed)],_0x317ec3[_0x1cdb6a(0xdc)],_0x1cdb6a(0xd7));let _0x37514b=typeof _0x317ec3[_0x1cdb6a(0xbf)]===_0x1cdb6a(0xdd)?_0x317ec3[_0x1cdb6a(0xbf)]:parseInt(_0x317ec3[_0x1cdb6a(0xbf)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x5eff0e=_0x317ec3['output']||'';return shouldUseLess(_0x147b5d,_0x5eff0e)&&(_0x37514b=Infinity),{'format':_0x147b5d,'output':_0x5eff0e,'limit':_0x37514b,'color':_0x317ec3[_0x1cdb6a(0xf0)],'noColor':_0x317ec3[_0x1cdb6a(0xf6)]};}export function writeOutput(_0x1db192,_0xc9d71a,_0x42bd4a){const _0x3adfe6=a62_0x2260;return _0xc9d71a?(writeFileSync(_0xc9d71a,_0x1db192),console[_0x3adfe6(0xf2)]('Results\x20saved\x20to\x20'+_0xc9d71a),Promise['resolve']()):shouldUseLess(_0x42bd4a||'','')?new Promise(_0x201a63=>{const _0x28c39a=_0x3adfe6,_0x324435=spawn(_0x28c39a(0xd5),[_0x28c39a(0xc2)],{'stdio':[_0x28c39a(0xd4),_0x28c39a(0xfb),_0x28c39a(0xfb)]});let _0x49a839=![];_0x324435['on']('error',()=>{const _0x4e8d19=_0x28c39a;!_0x49a839&&(_0x49a839=!![],console[_0x4e8d19(0xe3)](_0x1db192),_0x201a63());}),_0x324435['on'](_0x28c39a(0xfa),()=>{!_0x49a839&&(_0x49a839=!![],_0x201a63());}),_0x324435['on'](_0x28c39a(0xe1),()=>{const _0x46b289=_0x28c39a;!_0x49a839&&_0x324435[_0x46b289(0xc0)]&&(_0x324435[_0x46b289(0xc0)]['on'](_0x46b289(0xf2),()=>{}),_0x324435[_0x46b289(0xc0)][_0x46b289(0xe5)](_0x1db192),_0x324435[_0x46b289(0xc0)]['end']());}),!_0x324435['stdin']&&(!_0x49a839&&(_0x49a839=!![],console[_0x28c39a(0xe3)](_0x1db192),_0x201a63()));}):(console[_0x3adfe6(0xe3)](_0x1db192),Promise['resolve']());}export async function handleSDKOutput(_0x3fc73c,_0x115ee5){const _0x3f6ba0=a62_0x2260,_0xbe1a20=resolveOutputOptions(_0x115ee5),_0x3e1f9e=await formatSDKOutput(_0x3fc73c,_0xbe1a20);await writeOutput(_0x3e1f9e,_0xbe1a20[_0x3f6ba0(0xdc)]||undefined,_0xbe1a20['format']);}export async function handleQueryOutput(_0x18078d,_0x396017){const _0x20a5f3=a62_0x2260,_0x7688dd=resolveOutputOptions(_0x396017),_0x8307d6=await formatQueryOutput(_0x18078d,_0x7688dd);await writeOutput(_0x8307d6,_0x7688dd[_0x20a5f3(0xdc)]||undefined,_0x7688dd[_0x20a5f3(0xed)]);}async function formatSingleObject(_0x1e324e,_0x1a0a28){const _0xfd8e95=a62_0x2260,{format:_0x26382e,color:_0x35d2e5,noColor:_0x1fd339}=_0x1a0a28,_0x599b93={'color':_0x35d2e5,'noColor':_0x1fd339};if(_0x26382e===_0xfd8e95(0xbe)){if(shouldUseColor(_0x599b93))return colorizeJSON(_0x1e324e,_0x599b93);return JSON['stringify'](_0x1e324e,null,0x2);}else{if(_0x26382e==='jsonl'){if(shouldUseColor(_0x599b93))return colorizeJSONCompact(_0x1e324e,_0x599b93);return JSON[_0xfd8e95(0xe6)](_0x1e324e);}else{if(_0x26382e==='tsv')return Object[_0xfd8e95(0xde)](_0x1e324e)[_0xfd8e95(0xe2)](([_0x27ed5f,_0xac7bbe])=>_0x27ed5f+'\x09'+_0xac7bbe)[_0xfd8e95(0xec)]('\x0a');else{const _0x38cbb7=Object['entries'](_0x1e324e);if(_0x38cbb7['length']===0x0)return _0xfd8e95(0xf7);const _0x45afd4=_0x1e324e[_0xfd8e95(0xe9)],_0x1986ea=_0x1e324e[_0xfd8e95(0xca)],_0x5bc774=_0x1986ea?typeof _0x1986ea===_0xfd8e95(0xeb)?_0x1986ea:JSON[_0xfd8e95(0xe6)](_0x1986ea,null,0x2):undefined,_0x5da49f=_0x38cbb7[_0xfd8e95(0xf4)](([_0x59aad3])=>_0x59aad3!==_0xfd8e95(0xe9)&&_0x59aad3!==_0xfd8e95(0xca)),_0x289e56=Math['max'](..._0x5da49f[_0xfd8e95(0xe2)](([_0x22568d])=>_0x22568d[_0xfd8e95(0xee)])),_0x4ded93=Math['max'](..._0x5da49f[_0xfd8e95(0xe2)](([,_0x48abc9])=>{const _0x2593d5=_0xfd8e95;try{const _0x5a1f02=_0x48abc9===null||_0x48abc9===undefined?'':typeof _0x48abc9===_0x2593d5(0xcc)?JSON['stringify'](_0x48abc9):String(_0x48abc9),_0xbbf96d=_0x5a1f02[_0x2593d5(0xea)]('\x0a');return Math[_0x2593d5(0xe8)](..._0xbbf96d['map'](_0x39a794=>_0x39a794[_0x2593d5(0xee)]),0x0);}catch{return 0x0;}}),0x14),_0x4f130f=[];_0x4f130f[_0xfd8e95(0xd6)](colorBorder('┌─'+'─'[_0xfd8e95(0xce)](_0x289e56)+_0xfd8e95(0xc9)+'─'[_0xfd8e95(0xce)](_0x4ded93)+'─┐',_0x599b93)),_0x5da49f[_0xfd8e95(0xd1)](([_0x4ebb4b,_0x1b8a1f])=>{const _0x1cc28c=_0xfd8e95;let _0x3e92dc;try{_0x3e92dc=_0x1b8a1f===null||_0x1b8a1f===undefined?'':typeof _0x1b8a1f==='object'?JSON[_0x1cc28c(0xe6)](_0x1b8a1f):String(_0x1b8a1f);}catch{_0x3e92dc=_0x1cc28c(0xf8);}const _0x3e33f8=_0x4ebb4b['padEnd'](_0x289e56),_0xdc21d4=_0x3e92dc[_0x1cc28c(0xea)]('\x0a');_0xdc21d4[_0x1cc28c(0xd1)]((_0x28e634,_0x220cbd)=>{const _0x413207=_0x1cc28c,_0x4f7814=colorBorder('│',_0x599b93);_0x220cbd===0x0?_0x4f130f[_0x413207(0xd6)](_0x4f7814+'\x20'+_0x3e33f8+'\x20'+_0x4f7814+'\x20'+_0x28e634[_0x413207(0xdf)](_0x4ded93)+'\x20'+_0x4f7814):_0x4f130f['push'](_0x4f7814+'\x20'+'\x20'[_0x413207(0xce)](_0x289e56)+'\x20'+_0x4f7814+'\x20'+_0x28e634[_0x413207(0xdf)](_0x4ded93)+'\x20'+_0x4f7814);});}),_0x4f130f[_0xfd8e95(0xd6)](colorBorder('└─'+'─'['repeat'](_0x289e56)+_0xfd8e95(0xf1)+'─'[_0xfd8e95(0xce)](_0x4ded93)+'─┘',_0x599b93));_0x5bc774&&(_0x4f130f[_0xfd8e95(0xd6)](''),_0x4f130f['push'](String(a62_0x18292c['yellow'][_0xfd8e95(0xcf)](_0xfd8e95(0xcd)))),_0x4f130f['push'](_0x5bc774));if(_0x45afd4){if(_0x45afd4[_0xfd8e95(0xda)]){_0x4f130f[_0xfd8e95(0xd6)](''),_0x4f130f[_0xfd8e95(0xd6)](String(a62_0x18292c[_0xfd8e95(0xe0)]['bold']('[error]')));const _0x4a9898=_0x45afd4['stderr'][_0xfd8e95(0xea)]('\x0a');_0x4a9898['forEach'](_0x3f4a8e=>{const _0x3abbe6=_0xfd8e95;_0x3f4a8e[_0x3abbe6(0xfc)]()&&_0x4f130f[_0x3abbe6(0xd6)](_0x3f4a8e);});}if(_0x45afd4['cmdout']){_0x4f130f[_0xfd8e95(0xd6)](''),_0x4f130f[_0xfd8e95(0xd6)](String(a62_0x18292c[_0xfd8e95(0xdb)]['bold'](_0xfd8e95(0xc4))));const _0x55fc2c=_0x45afd4[_0xfd8e95(0xf3)][_0xfd8e95(0xea)]('\x0a');_0x55fc2c[_0xfd8e95(0xd1)](_0x118b2a=>{const _0x6a32e4=_0xfd8e95;_0x118b2a[_0x6a32e4(0xfc)]()&&_0x4f130f[_0x6a32e4(0xd6)](_0x118b2a);});}}return _0x4f130f['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x2e7989,_0x29c86d){const _0x2c498e=a62_0x2260,_0x32eeef=resolveOutputOptions(_0x29c86d),_0x2ab04c=await formatSingleObject(_0x2e7989,_0x32eeef);await writeOutput(_0x2ab04c,_0x32eeef['output']||undefined,_0x32eeef[_0x2c498e(0xed)]);}
1
+ (function(_0x545bf2,_0x19bbc5){const _0x40c654=a62_0x51c2,_0x20f35a=_0x545bf2();while(!![]){try{const _0x46739d=parseInt(_0x40c654(0x139))/0x1+parseInt(_0x40c654(0x140))/0x2*(-parseInt(_0x40c654(0x144))/0x3)+parseInt(_0x40c654(0x161))/0x4+parseInt(_0x40c654(0x131))/0x5*(-parseInt(_0x40c654(0x13a))/0x6)+-parseInt(_0x40c654(0x15d))/0x7*(-parseInt(_0x40c654(0x13d))/0x8)+parseInt(_0x40c654(0x159))/0x9+-parseInt(_0x40c654(0x132))/0xa*(-parseInt(_0x40c654(0x15c))/0xb);if(_0x46739d===_0x19bbc5)break;else _0x20f35a['push'](_0x20f35a['shift']());}catch(_0xbf1d70){_0x20f35a['push'](_0x20f35a['shift']());}}}(a62_0x3fe9,0x9f3ff));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a62_0x39cd5f from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function parseOutputOptions(_0x4e0557){const _0x4f8bed=a62_0x51c2;return{'format':_0x4e0557[_0x4f8bed(0x12d)]||'table','output':_0x4e0557[_0x4f8bed(0x168)]||'','limit':_0x4e0557['limit'],'color':_0x4e0557['color'],'noColor':_0x4e0557[_0x4f8bed(0x12f)]};}function convertSDKResultToQueryResult(_0x28dc30){const _0x20d14f=a62_0x51c2,_0x18f357=[];if(_0x28dc30[_0x20d14f(0x154)]>0x0){const _0x593f74=_0x28dc30[0x0];for(const [_0x3b4d29,_0x5898f8]of Object['entries'](_0x593f74)){let _0x4412a6=_0x20d14f(0x152);if(typeof _0x5898f8===_0x20d14f(0x167))_0x4412a6=Number['isInteger'](_0x5898f8)?_0x20d14f(0x14d):_0x20d14f(0x145);else{if(typeof _0x5898f8===_0x20d14f(0x142))_0x4412a6=_0x20d14f(0x142);else _0x5898f8===null&&(_0x4412a6=_0x20d14f(0x152));}_0x18f357[_0x20d14f(0x162)]({'name':_0x3b4d29,'type':_0x4412a6});}}return{'queryId':_0x20d14f(0x130),'columns':_0x18f357,'data':_0x28dc30,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x28dc30[_0x20d14f(0x154)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x45f104,_0x43739c){const _0x9c9d71=convertSDKResultToQueryResult(_0x45f104);return formatQueryOutput(_0x9c9d71,_0x43739c);}export async function formatQueryOutput(_0x51f9e2,_0x76dc71){const _0x239732=a62_0x51c2,{format:_0x397ded,limit:_0x31bab9,output:_0x56a48c,color:_0x27e0b3,noColor:_0x3206e9}=_0x76dc71,_0x3a95af=Boolean(_0x56a48c)&&!_0x27e0b3,_0x4e74c8={'color':_0x27e0b3,'noColor':_0x3206e9||_0x3a95af};if(_0x397ded==='table'){const _0x20f004=shouldUseLess(_0x397ded,_0x56a48c);return formatAsTable(_0x51f9e2,_0x31bab9,_0x20f004,_0x4e74c8);}else{if(_0x397ded===_0x239732(0x14c))return formatAsJSON(_0x51f9e2,_0x4e74c8);else return _0x397ded===_0x239732(0x149)?formatAsJSONL(_0x51f9e2,_0x4e74c8):formatQueryResult(_0x51f9e2,_0x397ded);}}function a62_0x51c2(_0x3841b1,_0x2cf4fc){const _0x3fe9a7=a62_0x3fe9();return a62_0x51c2=function(_0x51c296,_0x542211){_0x51c296=_0x51c296-0x12a;let _0x233ee7=_0x3fe9a7[_0x51c296];return _0x233ee7;},a62_0x51c2(_0x3841b1,_0x2cf4fc);}function shouldUseLess(_0x33da77,_0x17b396){const _0x1d92ac=a62_0x51c2;return _0x33da77==='table'&&process['stdout'][_0x1d92ac(0x14a)]&&!_0x17b396;}export function resolveOutputOptions(_0x1ca4ce){const _0xdee241=a62_0x51c2,_0x2cbfd1=resolveOutputFormat(_0x1ca4ce[_0xdee241(0x12d)],_0x1ca4ce[_0xdee241(0x168)],_0xdee241(0x156));let _0x2f39b8=typeof _0x1ca4ce[_0xdee241(0x15f)]===_0xdee241(0x167)?_0x1ca4ce[_0xdee241(0x15f)]:parseInt(_0x1ca4ce['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x51fc16=_0x1ca4ce[_0xdee241(0x168)]||'';return shouldUseLess(_0x2cbfd1,_0x51fc16)&&(_0x2f39b8=Infinity),{'format':_0x2cbfd1,'output':_0x51fc16,'limit':_0x2f39b8,'color':_0x1ca4ce[_0xdee241(0x12a)],'noColor':_0x1ca4ce[_0xdee241(0x12f)]};}export function writeOutput(_0xfa875,_0x5e85da,_0x474a6c){const _0x49ab93=a62_0x51c2;return _0x5e85da?(writeFileSync(_0x5e85da,_0xfa875),console[_0x49ab93(0x164)](_0x49ab93(0x148)+_0x5e85da),Promise['resolve']()):shouldUseLess(_0x474a6c||'','')?new Promise(_0x5c4d1d=>{const _0x29f114=_0x49ab93,_0x644abb=spawn(_0x29f114(0x160),[_0x29f114(0x133)],{'stdio':['pipe',_0x29f114(0x163),_0x29f114(0x163)]});let _0x4f494e=![];_0x644abb['on'](_0x29f114(0x164),()=>{const _0x54cda7=_0x29f114;!_0x4f494e&&(_0x4f494e=!![],console[_0x54cda7(0x15e)](_0xfa875),_0x5c4d1d());}),_0x644abb['on'](_0x29f114(0x136),()=>{!_0x4f494e&&(_0x4f494e=!![],_0x5c4d1d());}),_0x644abb['on'](_0x29f114(0x14b),()=>{const _0x1e751f=_0x29f114;!_0x4f494e&&_0x644abb['stdin']&&(_0x644abb[_0x1e751f(0x138)]['on'](_0x1e751f(0x164),()=>{}),_0x644abb[_0x1e751f(0x138)]['write'](_0xfa875),_0x644abb[_0x1e751f(0x138)]['end']());}),!_0x644abb['stdin']&&(!_0x4f494e&&(_0x4f494e=!![],console['log'](_0xfa875),_0x5c4d1d()));}):(console['log'](_0xfa875),Promise[_0x49ab93(0x15b)]());}function a62_0x3fe9(){const _0x275bfb=['forEach','Results\x20saved\x20to\x20','jsonl','isTTY','spawn','json','bigint','object','cyan','map','No\x20data','varchar','[Object]','length','entries','table','[query]','red','3019347NbdNyK','split','resolve','66tavoqV','81823ZSWtoN','log','limit','less','341624EXWPGc','push','inherit','error','debug','query','number','output','color','filter','stringify','format','[error]','noColor','sdk-result','1755605XZBftv','38470oOuMLm','-FXRSn','max','tsv','close','stderr','stdin','1119753vdSotI','18TCnxgh','padEnd','repeat','848oqFiCj','trim','yellow','548554hcmSst','─┬─','boolean','join','12srKgBv','double','cmdout'];a62_0x3fe9=function(){return _0x275bfb;};return a62_0x3fe9();}export async function handleSDKOutput(_0x5843bf,_0x56f192){const _0x3f367a=a62_0x51c2,_0x1cfe47=resolveOutputOptions(_0x56f192),_0x3363e8=await formatSDKOutput(_0x5843bf,_0x1cfe47);await writeOutput(_0x3363e8,_0x1cfe47[_0x3f367a(0x168)]||undefined,_0x1cfe47[_0x3f367a(0x12d)]);}export async function handleQueryOutput(_0x34bc1c,_0x2f0432){const _0x1b900f=a62_0x51c2,_0x350e07=resolveOutputOptions(_0x2f0432),_0x38b167=await formatQueryOutput(_0x34bc1c,_0x350e07);await writeOutput(_0x38b167,_0x350e07[_0x1b900f(0x168)]||undefined,_0x350e07[_0x1b900f(0x12d)]);}async function formatSingleObject(_0x455a39,_0x436278){const _0x5d247b=a62_0x51c2,{format:_0x2ad90c,color:_0xefdf52,noColor:_0x5d71cc}=_0x436278,_0x20e5b0={'color':_0xefdf52,'noColor':_0x5d71cc};if(_0x2ad90c==='json'){if(shouldUseColor(_0x20e5b0))return colorizeJSON(_0x455a39,_0x20e5b0);return JSON[_0x5d247b(0x12c)](_0x455a39,null,0x2);}else{if(_0x2ad90c===_0x5d247b(0x149)){if(shouldUseColor(_0x20e5b0))return colorizeJSONCompact(_0x455a39,_0x20e5b0);return JSON[_0x5d247b(0x12c)](_0x455a39);}else{if(_0x2ad90c===_0x5d247b(0x135))return Object[_0x5d247b(0x155)](_0x455a39)[_0x5d247b(0x150)](([_0x22a6ae,_0x305c3b])=>_0x22a6ae+'\x09'+_0x305c3b)['join']('\x0a');else{const _0x1ac06d=Object['entries'](_0x455a39);if(_0x1ac06d[_0x5d247b(0x154)]===0x0)return _0x5d247b(0x151);const _0x496401=_0x455a39[_0x5d247b(0x165)],_0x503b5d=_0x455a39[_0x5d247b(0x166)],_0x392029=_0x503b5d?typeof _0x503b5d==='string'?_0x503b5d:JSON['stringify'](_0x503b5d,null,0x2):undefined,_0x2537b3=_0x1ac06d[_0x5d247b(0x12b)](([_0x379666])=>_0x379666!==_0x5d247b(0x165)&&_0x379666!=='query'),_0x5e0560=Math[_0x5d247b(0x134)](..._0x2537b3[_0x5d247b(0x150)](([_0x156d32])=>_0x156d32[_0x5d247b(0x154)])),_0x2ca4e6=Math[_0x5d247b(0x134)](..._0x2537b3[_0x5d247b(0x150)](([,_0x5cb254])=>{const _0x5b859b=_0x5d247b;try{const _0x18a222=_0x5cb254===null||_0x5cb254===undefined?'':typeof _0x5cb254===_0x5b859b(0x14e)?JSON[_0x5b859b(0x12c)](_0x5cb254):String(_0x5cb254),_0x7ac020=_0x18a222['split']('\x0a');return Math[_0x5b859b(0x134)](..._0x7ac020[_0x5b859b(0x150)](_0x27f9ec=>_0x27f9ec[_0x5b859b(0x154)]),0x0);}catch{return 0x0;}}),0x14),_0x3e6050=[];_0x3e6050[_0x5d247b(0x162)](colorBorder('┌─'+'─'[_0x5d247b(0x13c)](_0x5e0560)+_0x5d247b(0x141)+'─'[_0x5d247b(0x13c)](_0x2ca4e6)+'─┐',_0x20e5b0)),_0x2537b3[_0x5d247b(0x147)](([_0x3140c7,_0x3310a1])=>{const _0x552755=_0x5d247b;let _0x4ef611;try{_0x4ef611=_0x3310a1===null||_0x3310a1===undefined?'':typeof _0x3310a1===_0x552755(0x14e)?JSON[_0x552755(0x12c)](_0x3310a1):String(_0x3310a1);}catch{_0x4ef611=_0x552755(0x153);}const _0xe265b1=_0x3140c7[_0x552755(0x13b)](_0x5e0560),_0xa76807=_0x4ef611[_0x552755(0x15a)]('\x0a');_0xa76807[_0x552755(0x147)]((_0x5e2d32,_0xc3ea55)=>{const _0x4edb35=_0x552755,_0x27b8eb=colorBorder('│',_0x20e5b0);_0xc3ea55===0x0?_0x3e6050[_0x4edb35(0x162)](_0x27b8eb+'\x20'+_0xe265b1+'\x20'+_0x27b8eb+'\x20'+_0x5e2d32[_0x4edb35(0x13b)](_0x2ca4e6)+'\x20'+_0x27b8eb):_0x3e6050[_0x4edb35(0x162)](_0x27b8eb+'\x20'+'\x20'['repeat'](_0x5e0560)+'\x20'+_0x27b8eb+'\x20'+_0x5e2d32[_0x4edb35(0x13b)](_0x2ca4e6)+'\x20'+_0x27b8eb);});}),_0x3e6050[_0x5d247b(0x162)](colorBorder('└─'+'─'['repeat'](_0x5e0560)+'─┴─'+'─'['repeat'](_0x2ca4e6)+'─┘',_0x20e5b0));_0x392029&&(_0x3e6050[_0x5d247b(0x162)](''),_0x3e6050[_0x5d247b(0x162)](String(a62_0x39cd5f[_0x5d247b(0x13f)]['bold'](_0x5d247b(0x157)))),_0x3e6050['push'](_0x392029));if(_0x496401){if(_0x496401[_0x5d247b(0x137)]){_0x3e6050[_0x5d247b(0x162)](''),_0x3e6050['push'](String(a62_0x39cd5f[_0x5d247b(0x158)]['bold'](_0x5d247b(0x12e))));const _0x551d02=_0x496401[_0x5d247b(0x137)]['split']('\x0a');_0x551d02[_0x5d247b(0x147)](_0xda9f36=>{const _0x5d6b05=_0x5d247b;_0xda9f36[_0x5d6b05(0x13e)]()&&_0x3e6050[_0x5d6b05(0x162)](_0xda9f36);});}if(_0x496401[_0x5d247b(0x146)]){_0x3e6050['push'](''),_0x3e6050[_0x5d247b(0x162)](String(a62_0x39cd5f[_0x5d247b(0x14f)]['bold']('[logs]')));const _0x42b2cd=_0x496401[_0x5d247b(0x146)]['split']('\x0a');_0x42b2cd['forEach'](_0x310c11=>{const _0x48f27c=_0x5d247b;_0x310c11[_0x48f27c(0x13e)]()&&_0x3e6050['push'](_0x310c11);});}}return _0x3e6050[_0x5d247b(0x143)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x151e10,_0x2779d7){const _0x24a370=a62_0x51c2,_0x21b183=resolveOutputOptions(_0x2779d7),_0x3a2183=await formatSingleObject(_0x151e10,_0x21b183);await writeOutput(_0x3a2183,_0x21b183[_0x24a370(0x168)]||undefined,_0x21b183[_0x24a370(0x12d)]);}
@@ -1 +1 @@
1
- (function(_0xc8635b,_0x42b7b2){const _0x462e2b=a63_0x32ed,_0xa67369=_0xc8635b();while(!![]){try{const _0x5c4b97=parseInt(_0x462e2b(0x118))/0x1*(-parseInt(_0x462e2b(0x110))/0x2)+-parseInt(_0x462e2b(0x10f))/0x3*(-parseInt(_0x462e2b(0x114))/0x4)+parseInt(_0x462e2b(0x10c))/0x5+-parseInt(_0x462e2b(0x111))/0x6*(-parseInt(_0x462e2b(0x113))/0x7)+parseInt(_0x462e2b(0x116))/0x8*(-parseInt(_0x462e2b(0x115))/0x9)+parseInt(_0x462e2b(0x117))/0xa+-parseInt(_0x462e2b(0x112))/0xb*(parseInt(_0x462e2b(0x10d))/0xc);if(_0x5c4b97===_0x42b7b2)break;else _0xa67369['push'](_0xa67369['shift']());}catch(_0x2ebde3){_0xa67369['push'](_0xa67369['shift']());}}}(a63_0x283c,0x2c2e9));export const DEFAULT_DISPLAY_LIMIT=0x28;export const DEFAULT_LISTING_LIMIT=0x2710;function a63_0x283c(){const _0x75aa77=['100484fvrowX','258mIyaxm','4367PozzpB','56273QphGWR','16KjFymQ','2549403NlxPTg','8WuLmSv','3495990GVkXDf','5PyUEHw','1098625KERFjL','13956URSeRd','number','196617tDKCOa'];a63_0x283c=function(){return _0x75aa77;};return a63_0x283c();}function a63_0x32ed(_0x95371,_0x403b1c){const _0x283cfc=a63_0x283c();return a63_0x32ed=function(_0x32ed25,_0x6f0757){_0x32ed25=_0x32ed25-0x10c;let _0x2ccf64=_0x283cfc[_0x32ed25];return _0x2ccf64;},a63_0x32ed(_0x95371,_0x403b1c);}export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x421449,_0x141e43){const _0x438383=a63_0x32ed;if(_0x421449===undefined)return _0x141e43;if(typeof _0x421449===_0x438383(0x10e))return _0x421449;return parseInt(_0x421449,0xa);}
1
+ (function(_0x2e4c60,_0x166d04){const _0xe4dda7=a63_0x4b58,_0x186544=_0x2e4c60();while(!![]){try{const _0x3cf968=parseInt(_0xe4dda7(0x8c))/0x1+-parseInt(_0xe4dda7(0x8e))/0x2+parseInt(_0xe4dda7(0x8f))/0x3*(-parseInt(_0xe4dda7(0x90))/0x4)+parseInt(_0xe4dda7(0x8d))/0x5+-parseInt(_0xe4dda7(0x92))/0x6+-parseInt(_0xe4dda7(0x8b))/0x7+parseInt(_0xe4dda7(0x91))/0x8;if(_0x3cf968===_0x166d04)break;else _0x186544['push'](_0x186544['shift']());}catch(_0x2619e6){_0x186544['push'](_0x186544['shift']());}}}(a63_0x7902,0x73b84));export const DEFAULT_DISPLAY_LIMIT=0x28;function a63_0x7902(){const _0x44170e=['1002430gpZtfY','93063zMSxxF','116PyRjrP','15564912ZGRNzh','3239952bNSyMk','number','1329188FtLAqN','495576dPoYBI','817490pLnbUg'];a63_0x7902=function(){return _0x44170e;};return a63_0x7902();}function a63_0x4b58(_0x389898,_0x4376b3){const _0x79021b=a63_0x7902();return a63_0x4b58=function(_0x4b5883,_0x54f7a4){_0x4b5883=_0x4b5883-0x8b;let _0xd81439=_0x79021b[_0x4b5883];return _0xd81439;},a63_0x4b58(_0x389898,_0x4376b3);}export const DEFAULT_LISTING_LIMIT=0x2710;export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x27736f,_0x524f54){const _0x27d3e7=a63_0x4b58;if(_0x27736f===undefined)return _0x524f54;if(typeof _0x27736f===_0x27d3e7(0x93))return _0x27736f;return parseInt(_0x27736f,0xa);}
@@ -1 +1 @@
1
- function a64_0x40d9(_0x131982,_0x137c93){const _0x42323e=a64_0x4232();return a64_0x40d9=function(_0x40d9ce,_0x20642d){_0x40d9ce=_0x40d9ce-0x1ef;let _0x307961=_0x42323e[_0x40d9ce];return _0x307961;},a64_0x40d9(_0x131982,_0x137c93);}(function(_0x5f5055,_0x1a525c){const _0x4e480f=a64_0x40d9,_0x370205=_0x5f5055();while(!![]){try{const _0x454790=-parseInt(_0x4e480f(0x1f1))/0x1+parseInt(_0x4e480f(0x1f2))/0x2*(parseInt(_0x4e480f(0x1ff))/0x3)+parseInt(_0x4e480f(0x1f3))/0x4*(parseInt(_0x4e480f(0x1f5))/0x5)+parseInt(_0x4e480f(0x1f4))/0x6*(parseInt(_0x4e480f(0x1f0))/0x7)+-parseInt(_0x4e480f(0x1f7))/0x8*(-parseInt(_0x4e480f(0x201))/0x9)+parseInt(_0x4e480f(0x1fc))/0xa*(-parseInt(_0x4e480f(0x1fd))/0xb)+parseInt(_0x4e480f(0x1fe))/0xc;if(_0x454790===_0x1a525c)break;else _0x370205['push'](_0x370205['shift']());}catch(_0x27a4ac){_0x370205['push'](_0x370205['shift']());}}}(a64_0x4232,0x24166));import*as a64_0x39549b from'node:fs';import*as a64_0x46a5b2 from'node:path';function a64_0x4232(){const _0x179ff7=['113229mQAPEn','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','\x20has\x20insecure\x20permissions\x20(','writeFileSync','701246slkmYz','282607dCZIPP','9838VsgrUz','44djQpEv','6BUdcYG','38470Dfrmiy','warn','8rVGOTh','chmodSync','statSync','dirname','Warning:\x20','83770zmYiNY','198omsRiP','2185620OfNqGC','123igVCsr',').\x20'];a64_0x4232=function(){return _0x179ff7;};return a64_0x4232();}export function setSecureFilePermissions(_0x5d39d8){const _0xb8208e=a64_0x40d9;try{a64_0x39549b[_0xb8208e(0x1f8)](_0x5d39d8,0x180);}catch{console[_0xb8208e(0x1f6)](_0xb8208e(0x202)+_0x5d39d8);}}export function setSecureDirectoryPermissions(_0x35ecd6){const _0x506c99=a64_0x40d9;try{a64_0x39549b[_0x506c99(0x1f8)](_0x35ecd6,0x1c0);}catch{console[_0x506c99(0x1f6)](_0x506c99(0x202)+_0x35ecd6);}}export function createSecureDirectory(_0x327677){!a64_0x39549b['existsSync'](_0x327677)&&(a64_0x39549b['mkdirSync'](_0x327677,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x327677));}export function validateSecureFilePermissions(_0x22db3f){const _0x2d7529=a64_0x40d9;try{const _0x47cc0a=a64_0x39549b[_0x2d7529(0x1f9)](_0x22db3f),_0x510177=_0x47cc0a['mode']&0x1ff,_0x3c724b=(_0x510177&0x3f)!==0x0;if(_0x3c724b)return console[_0x2d7529(0x1f6)](_0x2d7529(0x1fb)+_0x22db3f+_0x2d7529(0x203)+_0x510177['toString'](0x8)+_0x2d7529(0x200)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x3c177f,_0x10087d){const _0x5a1163=a64_0x40d9,_0x178bf0=a64_0x46a5b2[_0x5a1163(0x1fa)](_0x3c177f);createSecureDirectory(_0x178bf0),a64_0x39549b[_0x5a1163(0x1ef)](_0x3c177f,_0x10087d,{'mode':0x180}),setSecureFilePermissions(_0x3c177f);}
1
+ (function(_0x28fe3,_0x212b98){const _0x376a13=a64_0x20c6,_0xb31282=_0x28fe3();while(!![]){try{const _0x413c5a=parseInt(_0x376a13(0x190))/0x1*(-parseInt(_0x376a13(0x191))/0x2)+-parseInt(_0x376a13(0x184))/0x3*(parseInt(_0x376a13(0x18b))/0x4)+parseInt(_0x376a13(0x18f))/0x5+-parseInt(_0x376a13(0x185))/0x6*(-parseInt(_0x376a13(0x183))/0x7)+parseInt(_0x376a13(0x18a))/0x8+-parseInt(_0x376a13(0x189))/0x9*(-parseInt(_0x376a13(0x180))/0xa)+-parseInt(_0x376a13(0x187))/0xb*(parseInt(_0x376a13(0x17f))/0xc);if(_0x413c5a===_0x212b98)break;else _0xb31282['push'](_0xb31282['shift']());}catch(_0x2814d4){_0xb31282['push'](_0xb31282['shift']());}}}(a64_0x38af,0xbd800));import*as a64_0x46c93a from'node:fs';import*as a64_0x4eca69 from'node:path';export function setSecureFilePermissions(_0x46d397){const _0x34c6ca=a64_0x20c6;try{a64_0x46c93a[_0x34c6ca(0x17e)](_0x46d397,0x180);}catch{console[_0x34c6ca(0x18c)](_0x34c6ca(0x192)+_0x46d397);}}export function setSecureDirectoryPermissions(_0x5ce3f3){const _0x55271d=a64_0x20c6;try{a64_0x46c93a[_0x55271d(0x17e)](_0x5ce3f3,0x1c0);}catch{console[_0x55271d(0x18c)](_0x55271d(0x192)+_0x5ce3f3);}}export function createSecureDirectory(_0x424be3){const _0x1b8b3f=a64_0x20c6;!a64_0x46c93a[_0x1b8b3f(0x186)](_0x424be3)&&(a64_0x46c93a[_0x1b8b3f(0x182)](_0x424be3,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x424be3));}export function validateSecureFilePermissions(_0x26043c){const _0x51dbc6=a64_0x20c6;try{const _0x3b0fe9=a64_0x46c93a[_0x51dbc6(0x181)](_0x26043c),_0x4d16a7=_0x3b0fe9['mode']&0x1ff,_0x5bc41c=(_0x4d16a7&0x3f)!==0x0;if(_0x5bc41c)return console['warn']('Warning:\x20'+_0x26043c+_0x51dbc6(0x188)+_0x4d16a7[_0x51dbc6(0x18e)](0x8)+').\x20'+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}function a64_0x20c6(_0x327c61,_0x4cbe7c){const _0x38afe8=a64_0x38af();return a64_0x20c6=function(_0x20c67c,_0x364653){_0x20c67c=_0x20c67c-0x17e;let _0x2e36ee=_0x38afe8[_0x20c67c];return _0x2e36ee;},a64_0x20c6(_0x327c61,_0x4cbe7c);}export function writeSecureFile(_0x21359a,_0x4d4fb5){const _0x200ec1=a64_0x20c6,_0x22fbcc=a64_0x4eca69['dirname'](_0x21359a);createSecureDirectory(_0x22fbcc),a64_0x46c93a[_0x200ec1(0x18d)](_0x21359a,_0x4d4fb5,{'mode':0x180}),setSecureFilePermissions(_0x21359a);}function a64_0x38af(){const _0x2c5ff4=['mkdirSync','191303primVX','519ijboKP','300erxgid','existsSync','58553fOcZTj','\x20has\x20insecure\x20permissions\x20(','4014dPxawv','3775496vtoCVo','10752fkZVDt','warn','writeFileSync','toString','6832460GkUiNR','13968HwPQkd','76BYSpmH','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','chmodSync','6324mVSXbH','30770apDLms','statSync'];a64_0x38af=function(){return _0x2c5ff4;};return a64_0x38af();}
@@ -1 +1 @@
1
- function a65_0x84ef(_0x4acad1,_0x568107){const _0x29b0d6=a65_0x29b0();return a65_0x84ef=function(_0x84ef0c,_0x363262){_0x84ef0c=_0x84ef0c-0x19c;let _0x45e3f7=_0x29b0d6[_0x84ef0c];return _0x45e3f7;},a65_0x84ef(_0x4acad1,_0x568107);}(function(_0x5667dd,_0x76efc7){const _0x41fc12=a65_0x84ef,_0x1bf4de=_0x5667dd();while(!![]){try{const _0x25d159=-parseInt(_0x41fc12(0x1a4))/0x1+-parseInt(_0x41fc12(0x1a3))/0x2+parseInt(_0x41fc12(0x1a9))/0x3*(parseInt(_0x41fc12(0x19c))/0x4)+-parseInt(_0x41fc12(0x19f))/0x5+parseInt(_0x41fc12(0x1a5))/0x6*(-parseInt(_0x41fc12(0x1a6))/0x7)+-parseInt(_0x41fc12(0x19d))/0x8+parseInt(_0x41fc12(0x1a0))/0x9;if(_0x25d159===_0x76efc7)break;else _0x1bf4de['push'](_0x1bf4de['shift']());}catch(_0x24d7a0){_0x1bf4de['push'](_0x1bf4de['shift']());}}}(a65_0x29b0,0x5bf93));export function detectFormatFromExtension(_0x4ea9b3){const _0x475223=a65_0x84ef,_0x57afc7=_0x4ea9b3['toLowerCase']()['split']('.')[_0x475223(0x1a1)]();switch(_0x57afc7){case _0x475223(0x1a8):return'json';case _0x475223(0x1aa):return'jsonl';case _0x475223(0x19e):case'tab':return _0x475223(0x19e);case _0x475223(0x1a7):case'text':return _0x475223(0x1a2);default:return undefined;}}function a65_0x29b0(){const _0x3125f5=['jsonl','634620tmdSaE','1145160NqwbYa','tsv','1045765ZhAbvp','15677523dyBHgR','pop','table','602158aMJOtA','404817dyqepx','50802tGzrhb','385HSEtQc','txt','json','3ZnXHHC'];a65_0x29b0=function(){return _0x3125f5;};return a65_0x29b0();}export function resolveOutputFormat(_0x50192e,_0x444b4a,_0x49ab67){if(_0x50192e)return _0x50192e;if(_0x444b4a){const _0x54f0b6=detectFormatFromExtension(_0x444b4a);if(_0x54f0b6)return _0x54f0b6;}return _0x49ab67;}
1
+ (function(_0x2fb33c,_0x57e00e){const _0x25aab2=a65_0x40d1,_0x1b3e2f=_0x2fb33c();while(!![]){try{const _0x17e9de=parseInt(_0x25aab2(0xa2))/0x1+parseInt(_0x25aab2(0xa9))/0x2+-parseInt(_0x25aab2(0xa6))/0x3+parseInt(_0x25aab2(0x9f))/0x4+-parseInt(_0x25aab2(0xaa))/0x5+parseInt(_0x25aab2(0x9c))/0x6+parseInt(_0x25aab2(0xa0))/0x7;if(_0x17e9de===_0x57e00e)break;else _0x1b3e2f['push'](_0x1b3e2f['shift']());}catch(_0xb8776a){_0x1b3e2f['push'](_0x1b3e2f['shift']());}}}(a65_0x3c21,0x817f8));function a65_0x40d1(_0x4ceb4e,_0x3ac816){const _0x3c2116=a65_0x3c21();return a65_0x40d1=function(_0x40d1e2,_0x4e7ea0){_0x40d1e2=_0x40d1e2-0x9c;let _0x217b74=_0x3c2116[_0x40d1e2];return _0x217b74;},a65_0x40d1(_0x4ceb4e,_0x3ac816);}export function detectFormatFromExtension(_0xacb16c){const _0x40a305=a65_0x40d1,_0x3b4516=_0xacb16c[_0x40a305(0xa3)]()[_0x40a305(0xa7)]('.')['pop']();switch(_0x3b4516){case _0x40a305(0x9e):return'json';case _0x40a305(0xa8):return _0x40a305(0xa8);case'tsv':case _0x40a305(0x9d):return _0x40a305(0xa5);case _0x40a305(0xa4):case'text':return _0x40a305(0xa1);default:return undefined;}}export function resolveOutputFormat(_0x2c9e08,_0x227385,_0x1a66ed){if(_0x2c9e08)return _0x2c9e08;if(_0x227385){const _0x4444d2=detectFormatFromExtension(_0x227385);if(_0x4444d2)return _0x4444d2;}return _0x1a66ed;}function a65_0x3c21(){const _0x239bb9=['1975053ZxBQyu','split','jsonl','284778YuLbxt','5009650WIINuW','5083728usCeCc','tab','json','1687984cxJJlU','515767emJLzt','table','705351tdMJax','toLowerCase','txt','tsv'];a65_0x3c21=function(){return _0x239bb9;};return a65_0x3c21();}
@@ -1 +1 @@
1
- (function(_0x2f9634,_0x525f2d){const _0x5c4538=a66_0x3a5f,_0xaa86ab=_0x2f9634();while(!![]){try{const _0x40311f=-parseInt(_0x5c4538(0x15d))/0x1+-parseInt(_0x5c4538(0x132))/0x2*(parseInt(_0x5c4538(0x139))/0x3)+-parseInt(_0x5c4538(0x148))/0x4*(parseInt(_0x5c4538(0x153))/0x5)+-parseInt(_0x5c4538(0x14d))/0x6*(parseInt(_0x5c4538(0x147))/0x7)+-parseInt(_0x5c4538(0x15c))/0x8*(parseInt(_0x5c4538(0x146))/0x9)+-parseInt(_0x5c4538(0x13d))/0xa+-parseInt(_0x5c4538(0x138))/0xb*(-parseInt(_0x5c4538(0x163))/0xc);if(_0x40311f===_0x525f2d)break;else _0xaa86ab['push'](_0xaa86ab['shift']());}catch(_0x51516a){_0xaa86ab['push'](_0xaa86ab['shift']());}}}(a66_0x46a3,0x1e053));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';function a66_0x3a5f(_0xb3db9,_0x2facc7){const _0x46a304=a66_0x46a3();return a66_0x3a5f=function(_0x3a5f33,_0x1be485){_0x3a5f33=_0x3a5f33-0x130;let _0xad4037=_0x46a304[_0x3a5f33];return _0xad4037;},a66_0x3a5f(_0xb3db9,_0x2facc7);}function a66_0x46a3(){const _0x3631d8=['columns','26556duBZlM','data','length','\x20rows\x20(','table','toISOString','slice','0\x20B','18982dmooOj','date','repeat','\x20shown)','double','min','2321VsKZUd','9aeUqrq','jsonl','toLowerCase','log','64380OhEArQ','join','number','test','stringify','reduce','row','entries','stdout','9LOpZHd','188258hrXDug','4744XQHLwF','substring','padEnd','pow','array','18upeZQI','bool','toString','max','No\x20rows\x20returned','object','355knEQjO','toFixed','map','name','replace','push','int','type','startsWith','546384aEgUfE','75883aEZHnA','string','forEach','floor','boolean'];a66_0x46a3=function(){return _0x3631d8;};return a66_0x46a3();}import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x5cf104=a66_0x3a5f;return process[_0x5cf104(0x145)][_0x5cf104(0x162)]||Infinity;}export function formatAsTable(_0x322adf,_0x2c61d0=DEFAULT_MAX_DISPLAY_ROWS,_0x497385=![],_0x508ba1={}){const _0x47ee9e=a66_0x3a5f;if(_0x322adf[_0x47ee9e(0x164)][_0x47ee9e(0x165)]===0x0)return _0x47ee9e(0x151);const _0x171f03=_0x322adf[_0x47ee9e(0x162)][_0x47ee9e(0x155)](_0x3b1d36=>_0x3b1d36[_0x47ee9e(0x156)]),_0x37190b=_0x322adf[_0x47ee9e(0x162)][_0x47ee9e(0x155)](_0x35a7ec=>simplifyType(_0x35a7ec[_0x47ee9e(0x15a)])),_0xca9443=_0x322adf[_0x47ee9e(0x164)]['slice'](0x0,_0x2c61d0),_0x4199fa=_0x322adf[_0x47ee9e(0x164)][_0x47ee9e(0x165)],_0x28d29f=_0x4199fa>_0x2c61d0,_0x3f9a2a=[],_0x352838=getTerminalWidth(),_0x59493a=_0x352838!==Infinity,_0x12c3a0=0x32;let _0x13d790=_0x171f03[_0x47ee9e(0x155)]((_0x3cf9a4,_0x1b001d)=>{const _0x4447d6=_0x47ee9e,_0x14c8f0=stringWidth(_0x37190b[_0x1b001d]),_0x7a7eb9=Math[_0x4447d6(0x150)](..._0xca9443[_0x4447d6(0x155)](_0x386458=>{const _0x13edca=_0x386458[_0x3cf9a4];return stringWidth(formatValue(_0x13edca));})),_0x32ac39=Math[_0x4447d6(0x150)](stringWidth(_0x3cf9a4),_0x14c8f0,_0x7a7eb9);return _0x497385?_0x32ac39:Math[_0x4447d6(0x137)](_0x32ac39,_0x12c3a0);});if(_0x59493a&&!_0x497385&&_0x171f03[_0x47ee9e(0x165)]>0x0){const _0x52551d=_0x166b25=>{let _0x16cdea=0x1;for(const _0x16aa83 of _0x166b25){_0x16cdea+=_0x16aa83+0x3;}return _0x16cdea+0x1;};let _0x46cab4=_0x52551d(_0x13d790);if(_0x46cab4>_0x352838){const _0x5b0cb3=0x3;for(let _0x22aad0=_0x13d790[_0x47ee9e(0x165)]-0x1;_0x22aad0>=0x0;_0x22aad0--){_0x46cab4=_0x52551d(_0x13d790);if(_0x46cab4<=_0x352838)break;const _0x169b17=_0x13d790[_0x22aad0],_0x22cb1=_0x46cab4-_0x352838,_0x428e50=_0x169b17-_0x5b0cb3,_0x5935b5=Math[_0x47ee9e(0x137)](_0x22cb1,_0x428e50);_0x5935b5>0x0&&(_0x13d790[_0x22aad0]=_0x169b17-_0x5935b5);}}}const _0x4b8487=_0x171f03,_0x2a8f8f=_0x37190b,_0x392412=_0x13d790,_0x3cf7bf=_0x13d790;_0x3f9a2a[_0x47ee9e(0x158)](colorBorder('┌'+_0x3cf7bf[_0x47ee9e(0x155)](_0x4a005a=>'─'[_0x47ee9e(0x134)](_0x4a005a+0x2))[_0x47ee9e(0x13e)]('┬')+'┐',_0x508ba1));const _0x58711c=_0x4b8487[_0x47ee9e(0x155)]((_0x254224,_0x484e24)=>centerAlign(_0x254224,_0x392412[_0x484e24]));_0x3f9a2a['push'](colorBorder('│',_0x508ba1)+'\x20'+_0x58711c['join']('\x20'+colorBorder('│',_0x508ba1)+'\x20')+'\x20'+colorBorder('│',_0x508ba1));const _0x315d10=_0x2a8f8f[_0x47ee9e(0x155)]((_0x23dc9d,_0x2b14f9)=>colorType(centerAlign(_0x23dc9d,_0x392412[_0x2b14f9]),_0x508ba1));_0x3f9a2a[_0x47ee9e(0x158)](colorBorder('│',_0x508ba1)+'\x20'+_0x315d10[_0x47ee9e(0x13e)]('\x20'+colorBorder('│',_0x508ba1)+'\x20')+'\x20'+colorBorder('│',_0x508ba1)),_0x3f9a2a['push'](colorBorder('├'+_0x3cf7bf[_0x47ee9e(0x155)](_0x2e1717=>'─'[_0x47ee9e(0x134)](_0x2e1717+0x2))[_0x47ee9e(0x13e)]('┼')+'┤',_0x508ba1));const _0x422455=(_0x1fea11,_0x3bb1b2)=>{const _0x30b925=_0x47ee9e,_0xf0344b=stringWidth(_0x1fea11);if(_0xf0344b<=_0x3bb1b2)return _0x1fea11;let _0x4db0ff=_0x1fea11;while(stringWidth(_0x4db0ff+'…')>_0x3bb1b2&&_0x4db0ff['length']>0x0){_0x4db0ff=_0x4db0ff[_0x30b925(0x130)](0x0,-0x1);}return _0x4db0ff+'…';};_0xca9443['forEach'](_0x158546=>{const _0x1dced0=_0x47ee9e,_0xe0d562=_0x171f03[_0x1dced0(0x155)]((_0x4b5334,_0x2cfdd5)=>{const _0x263239=_0x1dced0,_0x4daf3a=_0x158546[_0x4b5334],_0x409108=formatValue(_0x4daf3a),_0x18f8f3=_0x392412[_0x2cfdd5],_0x15c31c=_0x422455(_0x409108,_0x18f8f3),_0x560e4a=typeof _0x4daf3a===_0x263239(0x13f)||typeof _0x4daf3a===_0x263239(0x15e)&&/^-?\d+$/[_0x263239(0x140)](_0x4daf3a);return _0x560e4a?padStart(_0x15c31c,_0x18f8f3):padEnd(_0x15c31c,_0x18f8f3);});_0x3f9a2a[_0x1dced0(0x158)](colorBorder('│',_0x508ba1)+'\x20'+_0xe0d562[_0x1dced0(0x13e)]('\x20'+colorBorder('│',_0x508ba1)+'\x20')+'\x20'+colorBorder('│',_0x508ba1));});const _0x3e6818=_0x3cf7bf[_0x47ee9e(0x142)]((_0x50d5cd,_0x4d648b)=>_0x50d5cd+_0x4d648b+0x3,-0x1);_0x3f9a2a[_0x47ee9e(0x158)](colorBorder('├'+_0x3cf7bf[_0x47ee9e(0x155)](_0x2566d8=>'─'[_0x47ee9e(0x134)](_0x2566d8+0x2))[_0x47ee9e(0x13e)]('┴')+'┤',_0x508ba1));let _0x53a93e;_0x28d29f?_0x53a93e=_0x4199fa+_0x47ee9e(0x166)+_0x2c61d0+_0x47ee9e(0x135):_0x53a93e=_0x4199fa+'\x20row'+(_0x4199fa===0x1?'':'s');const _0x1c8d3d=_0x53a93e[_0x47ee9e(0x14a)](_0x3e6818-0x2);return _0x3f9a2a['push'](colorBorder('│',_0x508ba1)+'\x20'+_0x1c8d3d+'\x20'+colorBorder('│',_0x508ba1)),_0x3f9a2a['push'](colorBorder('└'+'─'[_0x47ee9e(0x134)](_0x3e6818)+'┘',_0x508ba1)),_0x3f9a2a[_0x47ee9e(0x13e)]('\x0a');}function simplifyType(_0x214c45){const _0xcf082b=a66_0x3a5f,_0x3dc2b8={'varchar':'string','bigint':'long','integer':_0xcf082b(0x159),'double':_0xcf082b(0x136),'boolean':_0xcf082b(0x14e),'date':_0xcf082b(0x133),'timestamp':'timestamp','array':_0xcf082b(0x14c),'map':'map','row':_0xcf082b(0x143)},_0x22683e=_0x214c45[_0xcf082b(0x13b)]();for(const [_0x574bd6,_0x17eabe]of Object[_0xcf082b(0x144)](_0x3dc2b8)){if(_0x22683e[_0xcf082b(0x15b)](_0x574bd6))return _0x17eabe;}return _0x214c45[_0xcf082b(0x165)]>0xa?_0x214c45[_0xcf082b(0x149)](0x0,0xa):_0x214c45;}export function formatAsJSON(_0x29e9f5,_0x3924d7={}){const _0x18ba62=a66_0x3a5f;if(_0x29e9f5[_0x18ba62(0x164)][_0x18ba62(0x165)]===0x0)return'[]';if(shouldUseColor(_0x3924d7))return colorizeJSON(_0x29e9f5['data'],_0x3924d7);const _0x3293aa=_0x29e9f5[_0x18ba62(0x164)][_0x18ba62(0x155)](_0x4e2665=>'\x20\x20'+JSON[_0x18ba62(0x141)](_0x4e2665));return'[\x0a'+_0x3293aa[_0x18ba62(0x13e)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x4f561a,_0x181525={}){const _0x1f99d3=a66_0x3a5f;if(_0x4f561a[_0x1f99d3(0x164)]['length']===0x0)return'';if(shouldUseColor(_0x181525))return _0x4f561a[_0x1f99d3(0x164)][_0x1f99d3(0x155)](_0x4144df=>colorizeJSONCompact(_0x4144df,_0x181525))[_0x1f99d3(0x13e)]('\x0a');return _0x4f561a[_0x1f99d3(0x164)][_0x1f99d3(0x155)](_0x115b58=>JSON[_0x1f99d3(0x141)](_0x115b58))['join']('\x0a');}export function formatAsTSV(_0x21a7ef){const _0x17b9c9=a66_0x3a5f;if(_0x21a7ef[_0x17b9c9(0x164)][_0x17b9c9(0x165)]===0x0)return'';const _0xeda379=[],_0x1d93e0=_0x21a7ef[_0x17b9c9(0x162)][_0x17b9c9(0x155)](_0x44dbc3=>_0x44dbc3['name']);return _0xeda379['push'](_0x1d93e0[_0x17b9c9(0x13e)]('\x09')),_0x21a7ef[_0x17b9c9(0x164)][_0x17b9c9(0x15f)](_0x2458e4=>{const _0x49819a=_0x17b9c9,_0x11275a=_0x1d93e0['map'](_0x435967=>{const _0x3fd3ec=_0x2458e4[_0x435967];return formatValueForTSV(_0x3fd3ec);});_0xeda379[_0x49819a(0x158)](_0x11275a['join']('\x09'));}),_0xeda379[_0x17b9c9(0x13e)]('\x0a');}function formatValue(_0x273c8f){const _0x3d80c6=a66_0x3a5f;if(_0x273c8f===null||_0x273c8f===undefined)return'';if(typeof _0x273c8f===_0x3d80c6(0x15e)){const _0x35e845=_0x273c8f[_0x3d80c6(0x157)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x3d80c6(0x157)](/\t/g,'\x5ct');return _0x35e845;}if(typeof _0x273c8f===_0x3d80c6(0x13f))return String(_0x273c8f);if(typeof _0x273c8f===_0x3d80c6(0x161))return _0x273c8f?'true':'false';if(_0x273c8f instanceof Date)return _0x273c8f['toISOString']();if(typeof _0x273c8f===_0x3d80c6(0x152))return JSON['stringify'](_0x273c8f);return String(_0x273c8f);}function formatValueForTSV(_0x5b260d){const _0x99892c=a66_0x3a5f;if(_0x5b260d===null||_0x5b260d===undefined)return'';if(typeof _0x5b260d===_0x99892c(0x15e))return _0x5b260d['replace'](/\t/g,'\x5ct')[_0x99892c(0x157)](/\n/g,'\x5cn');if(typeof _0x5b260d===_0x99892c(0x13f)||typeof _0x5b260d===_0x99892c(0x161))return String(_0x5b260d);if(_0x5b260d instanceof Date)return _0x5b260d[_0x99892c(0x168)]();if(typeof _0x5b260d==='object')return JSON[_0x99892c(0x141)](_0x5b260d);return String(_0x5b260d);}export function formatQueryResult(_0x245b0e,_0x3fd211){const _0xc902fc=a66_0x3a5f;switch(_0x3fd211){case _0xc902fc(0x167):return formatAsTable(_0x245b0e);case'json':return formatAsJSON(_0x245b0e);case _0xc902fc(0x13a):return formatAsJSONL(_0x245b0e);case'tsv':return formatAsTSV(_0x245b0e);default:return formatAsJSON(_0x245b0e);}}export function formatBytes(_0x39cbd2){const _0x237fbe=a66_0x3a5f;if(_0x39cbd2===0x0)return _0x237fbe(0x131);const _0x3c236e=['B','KB','MB','GB','TB'],_0x50acec=0x400,_0x2ad9f8=Math[_0x237fbe(0x160)](Math[_0x237fbe(0x13c)](_0x39cbd2)/Math[_0x237fbe(0x13c)](_0x50acec)),_0x58820e=_0x39cbd2/Math[_0x237fbe(0x14b)](_0x50acec,_0x2ad9f8),_0x326449=_0x58820e>=0xa?0x1:0x2;return _0x58820e[_0x237fbe(0x154)](_0x326449)+'\x20'+_0x3c236e[_0x2ad9f8];}export function formatRows(_0x3b3dbe){const _0x39c493=a66_0x3a5f;if(_0x3b3dbe==null)return'-';if(_0x3b3dbe===0x0)return'0';if(_0x3b3dbe<0x3e8)return _0x3b3dbe[_0x39c493(0x14f)]();const _0x32a9e3=['','K','M','B','T'],_0x387337=0x3e8,_0x9fc854=Math[_0x39c493(0x160)](Math['log'](_0x3b3dbe)/Math['log'](_0x387337)),_0x1e6ace=_0x3b3dbe/Math[_0x39c493(0x14b)](_0x387337,_0x9fc854),_0x257e64=_0x1e6ace>=0xa?0x1:0x2;return''+_0x1e6ace[_0x39c493(0x154)](_0x257e64)+_0x32a9e3[_0x9fc854];}
1
+ (function(_0x3923a1,_0x26cf2a){const _0x19d9ed=a66_0x2bfe,_0x3862c4=_0x3923a1();while(!![]){try{const _0x2dbc41=-parseInt(_0x19d9ed(0xae))/0x1*(-parseInt(_0x19d9ed(0x87))/0x2)+parseInt(_0x19d9ed(0xa9))/0x3*(parseInt(_0x19d9ed(0x9c))/0x4)+parseInt(_0x19d9ed(0xa1))/0x5+-parseInt(_0x19d9ed(0xa6))/0x6+-parseInt(_0x19d9ed(0xaf))/0x7*(parseInt(_0x19d9ed(0xa8))/0x8)+parseInt(_0x19d9ed(0xab))/0x9*(-parseInt(_0x19d9ed(0xb4))/0xa)+-parseInt(_0x19d9ed(0xb8))/0xb;if(_0x2dbc41===_0x26cf2a)break;else _0x3862c4['push'](_0x3862c4['shift']());}catch(_0x5f38b2){_0x3862c4['push'](_0x3862c4['shift']());}}}(a66_0x4f63,0x80dd0));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x269da4=a66_0x2bfe;return process[_0x269da4(0x89)][_0x269da4(0x94)]||Infinity;}export function formatAsTable(_0x3c2f49,_0x113f29=DEFAULT_MAX_DISPLAY_ROWS,_0x403e3f=![],_0x5c010c={}){const _0x122602=a66_0x2bfe;if(_0x3c2f49['data'][_0x122602(0xb7)]===0x0)return _0x122602(0xb1);const _0x490229=_0x3c2f49[_0x122602(0x94)][_0x122602(0x99)](_0x5481d5=>_0x5481d5[_0x122602(0x9e)]),_0x1fe576=_0x3c2f49['columns'][_0x122602(0x99)](_0xfc5133=>simplifyType(_0xfc5133['type'])),_0x30732c=_0x3c2f49['data'][_0x122602(0x9d)](0x0,_0x113f29),_0x429278=_0x3c2f49[_0x122602(0xb2)][_0x122602(0xb7)],_0x2d7b67=_0x429278>_0x113f29,_0x3ddb42=[],_0x2099ae=getTerminalWidth(),_0x3dec96=_0x2099ae!==Infinity,_0xcd40ff=0x32;let _0x1dcb97=_0x490229['map']((_0x520154,_0xe17fdb)=>{const _0x188faa=_0x122602,_0x5c121e=stringWidth(_0x1fe576[_0xe17fdb]),_0x20d988=Math['max'](..._0x30732c['map'](_0x43a641=>{const _0x527267=_0x43a641[_0x520154];return stringWidth(formatValue(_0x527267));})),_0x324f60=Math[_0x188faa(0x8d)](stringWidth(_0x520154),_0x5c121e,_0x20d988);return _0x403e3f?_0x324f60:Math[_0x188faa(0x8f)](_0x324f60,_0xcd40ff);});if(_0x3dec96&&!_0x403e3f&&_0x490229[_0x122602(0xb7)]>0x0){const _0x2b8f81=_0x2973eb=>{let _0x537a97=0x1;for(const _0x234324 of _0x2973eb){_0x537a97+=_0x234324+0x3;}return _0x537a97+0x1;};let _0x24baac=_0x2b8f81(_0x1dcb97);if(_0x24baac>_0x2099ae){const _0x14449a=0x3;for(let _0x3dea4a=_0x1dcb97[_0x122602(0xb7)]-0x1;_0x3dea4a>=0x0;_0x3dea4a--){_0x24baac=_0x2b8f81(_0x1dcb97);if(_0x24baac<=_0x2099ae)break;const _0x5e81fd=_0x1dcb97[_0x3dea4a],_0x258956=_0x24baac-_0x2099ae,_0x241f26=_0x5e81fd-_0x14449a,_0x291eb5=Math[_0x122602(0x8f)](_0x258956,_0x241f26);_0x291eb5>0x0&&(_0x1dcb97[_0x3dea4a]=_0x5e81fd-_0x291eb5);}}}const _0x3dec6d=_0x490229,_0x53a9a0=_0x1fe576,_0x635751=_0x1dcb97,_0x57a1ae=_0x1dcb97;_0x3ddb42[_0x122602(0xb6)](colorBorder('┌'+_0x57a1ae['map'](_0x2a9ab6=>'─'[_0x122602(0x98)](_0x2a9ab6+0x2))[_0x122602(0x85)]('┬')+'┐',_0x5c010c));const _0xc371f7=_0x3dec6d[_0x122602(0x99)]((_0x4f5a12,_0x377273)=>centerAlign(_0x4f5a12,_0x635751[_0x377273]));_0x3ddb42[_0x122602(0xb6)](colorBorder('│',_0x5c010c)+'\x20'+_0xc371f7[_0x122602(0x85)]('\x20'+colorBorder('│',_0x5c010c)+'\x20')+'\x20'+colorBorder('│',_0x5c010c));const _0x43c18a=_0x53a9a0[_0x122602(0x99)]((_0x39aea8,_0x587f87)=>colorType(centerAlign(_0x39aea8,_0x635751[_0x587f87]),_0x5c010c));_0x3ddb42[_0x122602(0xb6)](colorBorder('│',_0x5c010c)+'\x20'+_0x43c18a[_0x122602(0x85)]('\x20'+colorBorder('│',_0x5c010c)+'\x20')+'\x20'+colorBorder('│',_0x5c010c)),_0x3ddb42[_0x122602(0xb6)](colorBorder('├'+_0x57a1ae[_0x122602(0x99)](_0x4c87cc=>'─'[_0x122602(0x98)](_0x4c87cc+0x2))['join']('┼')+'┤',_0x5c010c));const _0xba9cc3=(_0x35df09,_0x53b103)=>{const _0x335cf1=_0x122602,_0x43cbe7=stringWidth(_0x35df09);if(_0x43cbe7<=_0x53b103)return _0x35df09;let _0x2a72ac=_0x35df09;while(stringWidth(_0x2a72ac+'…')>_0x53b103&&_0x2a72ac[_0x335cf1(0xb7)]>0x0){_0x2a72ac=_0x2a72ac[_0x335cf1(0x9d)](0x0,-0x1);}return _0x2a72ac+'…';};_0x30732c['forEach'](_0x30e959=>{const _0x38b913=_0x122602,_0x40b594=_0x490229[_0x38b913(0x99)]((_0x499f49,_0x438a1c)=>{const _0x32aad5=_0x38b913,_0x5b3e37=_0x30e959[_0x499f49],_0x8508fc=formatValue(_0x5b3e37),_0x2158a0=_0x635751[_0x438a1c],_0x4d5694=_0xba9cc3(_0x8508fc,_0x2158a0),_0x2c78b6=typeof _0x5b3e37===_0x32aad5(0xb9)||typeof _0x5b3e37===_0x32aad5(0x90)&&/^-?\d+$/[_0x32aad5(0x8c)](_0x5b3e37);return _0x2c78b6?padStart(_0x4d5694,_0x2158a0):padEnd(_0x4d5694,_0x2158a0);});_0x3ddb42[_0x38b913(0xb6)](colorBorder('│',_0x5c010c)+'\x20'+_0x40b594[_0x38b913(0x85)]('\x20'+colorBorder('│',_0x5c010c)+'\x20')+'\x20'+colorBorder('│',_0x5c010c));});const _0x5b6dd7=_0x57a1ae[_0x122602(0xb0)]((_0xf238bc,_0x347317)=>_0xf238bc+_0x347317+0x3,-0x1);_0x3ddb42[_0x122602(0xb6)](colorBorder('├'+_0x57a1ae['map'](_0xe26c91=>'─'[_0x122602(0x98)](_0xe26c91+0x2))[_0x122602(0x85)]('┴')+'┤',_0x5c010c));let _0x22dd92;_0x2d7b67?_0x22dd92=_0x429278+'\x20rows\x20('+_0x113f29+'\x20shown)':_0x22dd92=_0x429278+'\x20row'+(_0x429278===0x1?'':'s');const _0x1cbd1d=_0x22dd92[_0x122602(0x86)](_0x5b6dd7-0x2);return _0x3ddb42[_0x122602(0xb6)](colorBorder('│',_0x5c010c)+'\x20'+_0x1cbd1d+'\x20'+colorBorder('│',_0x5c010c)),_0x3ddb42[_0x122602(0xb6)](colorBorder('└'+'─'['repeat'](_0x5b6dd7)+'┘',_0x5c010c)),_0x3ddb42['join']('\x0a');}function simplifyType(_0x3c1de7){const _0x4d45ee=a66_0x2bfe,_0x263f49={'varchar':_0x4d45ee(0x90),'bigint':'long','integer':_0x4d45ee(0x93),'double':_0x4d45ee(0xac),'boolean':'bool','date':'date','timestamp':_0x4d45ee(0xb5),'array':_0x4d45ee(0x96),'map':_0x4d45ee(0x99),'row':'row'},_0x2608b1=_0x3c1de7[_0x4d45ee(0xa0)]();for(const [_0x33793c,_0x48ffd1]of Object[_0x4d45ee(0x95)](_0x263f49)){if(_0x2608b1[_0x4d45ee(0xa2)](_0x33793c))return _0x48ffd1;}return _0x3c1de7[_0x4d45ee(0xb7)]>0xa?_0x3c1de7[_0x4d45ee(0xa5)](0x0,0xa):_0x3c1de7;}export function formatAsJSON(_0x45c17f,_0x40d721={}){const _0x20aef9=a66_0x2bfe;if(_0x45c17f[_0x20aef9(0xb2)][_0x20aef9(0xb7)]===0x0)return'[]';if(shouldUseColor(_0x40d721))return colorizeJSON(_0x45c17f[_0x20aef9(0xb2)],_0x40d721);const _0x4f6a79=_0x45c17f[_0x20aef9(0xb2)]['map'](_0x1f5406=>'\x20\x20'+JSON[_0x20aef9(0x9f)](_0x1f5406));return'[\x0a'+_0x4f6a79[_0x20aef9(0x85)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x3638de,_0x436e1c={}){const _0x8ce599=a66_0x2bfe;if(_0x3638de[_0x8ce599(0xb2)]['length']===0x0)return'';if(shouldUseColor(_0x436e1c))return _0x3638de[_0x8ce599(0xb2)][_0x8ce599(0x99)](_0x331f53=>colorizeJSONCompact(_0x331f53,_0x436e1c))[_0x8ce599(0x85)]('\x0a');return _0x3638de['data']['map'](_0x23805f=>JSON['stringify'](_0x23805f))[_0x8ce599(0x85)]('\x0a');}function a66_0x2bfe(_0x5f2c8f,_0x35266a){const _0x4f6375=a66_0x4f63();return a66_0x2bfe=function(_0x2bfece,_0x503ade){_0x2bfece=_0x2bfece-0x85;let _0x58baf4=_0x4f6375[_0x2bfece];return _0x58baf4;},a66_0x2bfe(_0x5f2c8f,_0x35266a);}export function formatAsTSV(_0x1c543b){const _0xae313f=a66_0x2bfe;if(_0x1c543b['data']['length']===0x0)return'';const _0x45a173=[],_0x1e38a5=_0x1c543b['columns']['map'](_0xb37719=>_0xb37719[_0xae313f(0x9e)]);return _0x45a173['push'](_0x1e38a5['join']('\x09')),_0x1c543b['data'][_0xae313f(0x9a)](_0x599860=>{const _0x5ef1c4=_0xae313f,_0x3fe019=_0x1e38a5['map'](_0x23ffb6=>{const _0x4249f1=_0x599860[_0x23ffb6];return formatValueForTSV(_0x4249f1);});_0x45a173[_0x5ef1c4(0xb6)](_0x3fe019[_0x5ef1c4(0x85)]('\x09'));}),_0x45a173[_0xae313f(0x85)]('\x0a');}function formatValue(_0x4d153f){const _0x2c93cf=a66_0x2bfe;if(_0x4d153f===null||_0x4d153f===undefined)return'';if(typeof _0x4d153f==='string'){const _0xde4066=_0x4d153f[_0x2c93cf(0xa3)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x2c93cf(0xa3)](/\t/g,'\x5ct');return _0xde4066;}if(typeof _0x4d153f==='number')return String(_0x4d153f);if(typeof _0x4d153f===_0x2c93cf(0xb3))return _0x4d153f?_0x2c93cf(0x8e):_0x2c93cf(0xaa);if(_0x4d153f instanceof Date)return _0x4d153f[_0x2c93cf(0x92)]();if(typeof _0x4d153f==='object')return JSON['stringify'](_0x4d153f);return String(_0x4d153f);}function a66_0x4f63(){const _0x5ac6c6=['max','true','min','string','json','toISOString','int','columns','entries','array','table','repeat','map','forEach','object','16gQgaLw','slice','name','stringify','toLowerCase','3756310bTjDIO','startsWith','replace','log','substring','1256394zhIiKE','floor','16Czaqhm','56097ntbuWU','false','2943OorheA','double','tsv','125237ftGRuP','2167235EtxBHX','reduce','No\x20rows\x20returned','data','boolean','760mnwlfw','timestamp','push','length','4913359rIsQCv','number','join','padEnd','16tnXoiq','pow','stdout','jsonl','toString','test'];a66_0x4f63=function(){return _0x5ac6c6;};return a66_0x4f63();}function formatValueForTSV(_0x107a99){const _0x4483d5=a66_0x2bfe;if(_0x107a99===null||_0x107a99===undefined)return'';if(typeof _0x107a99===_0x4483d5(0x90))return _0x107a99[_0x4483d5(0xa3)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x107a99===_0x4483d5(0xb9)||typeof _0x107a99==='boolean')return String(_0x107a99);if(_0x107a99 instanceof Date)return _0x107a99['toISOString']();if(typeof _0x107a99===_0x4483d5(0x9b))return JSON[_0x4483d5(0x9f)](_0x107a99);return String(_0x107a99);}export function formatQueryResult(_0x3f35aa,_0xa6512d){const _0x533a17=a66_0x2bfe;switch(_0xa6512d){case _0x533a17(0x97):return formatAsTable(_0x3f35aa);case _0x533a17(0x91):return formatAsJSON(_0x3f35aa);case _0x533a17(0x8a):return formatAsJSONL(_0x3f35aa);case _0x533a17(0xad):return formatAsTSV(_0x3f35aa);default:return formatAsJSON(_0x3f35aa);}}export function formatBytes(_0x516240){const _0x5937ed=a66_0x2bfe;if(_0x516240===0x0)return'0\x20B';const _0x37cf29=['B','KB','MB','GB','TB'],_0x257e8d=0x400,_0x12b3c6=Math[_0x5937ed(0xa7)](Math['log'](_0x516240)/Math[_0x5937ed(0xa4)](_0x257e8d)),_0x4c3b77=_0x516240/Math[_0x5937ed(0x88)](_0x257e8d,_0x12b3c6),_0x33cddc=_0x4c3b77>=0xa?0x1:0x2;return _0x4c3b77['toFixed'](_0x33cddc)+'\x20'+_0x37cf29[_0x12b3c6];}export function formatRows(_0x1b5d04){const _0x5b4bcc=a66_0x2bfe;if(_0x1b5d04==null)return'-';if(_0x1b5d04===0x0)return'0';if(_0x1b5d04<0x3e8)return _0x1b5d04[_0x5b4bcc(0x8b)]();const _0x5f3325=['','K','M','B','T'],_0x1c7458=0x3e8,_0x29a535=Math['floor'](Math[_0x5b4bcc(0xa4)](_0x1b5d04)/Math[_0x5b4bcc(0xa4)](_0x1c7458)),_0x555e05=_0x1b5d04/Math[_0x5b4bcc(0x88)](_0x1c7458,_0x29a535),_0x548abb=_0x555e05>=0xa?0x1:0x2;return''+_0x555e05['toFixed'](_0x548abb)+_0x5f3325[_0x29a535];}
@@ -1 +1 @@
1
- (function(_0x593cdb,_0x246d3e){const _0x12d334=a67_0x2806,_0xc1b648=_0x593cdb();while(!![]){try{const _0x53319e=-parseInt(_0x12d334(0x16d))/0x1*(parseInt(_0x12d334(0x168))/0x2)+-parseInt(_0x12d334(0x166))/0x3+-parseInt(_0x12d334(0x160))/0x4*(parseInt(_0x12d334(0x172))/0x5)+parseInt(_0x12d334(0x164))/0x6+-parseInt(_0x12d334(0x16e))/0x7*(parseInt(_0x12d334(0x15f))/0x8)+-parseInt(_0x12d334(0x16f))/0x9*(parseInt(_0x12d334(0x174))/0xa)+parseInt(_0x12d334(0x161))/0xb;if(_0x53319e===_0x246d3e)break;else _0xc1b648['push'](_0xc1b648['shift']());}catch(_0x538376){_0xc1b648['push'](_0xc1b648['shift']());}}}(a67_0x249f,0x4b0bd));import{readFile}from'fs/promises';function a67_0x249f(){const _0x541f01=['Invalid\x20JSON\x20string:\x20','code','Permission\x20denied\x20reading\x20file:\x20','\x27:\x20','131AEGiMm','28JgJnLp','31743wBQSGk','PERMISSION_DENIED','ENOENT','5pVGpAj','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','1380kkOmYP','NOT_FOUND','INVALID_ARGUMENT','File\x20not\x20found:\x20','message','1027352PsfXKB','1161556XUAtys','23768195SqYUjX','Failed\x20to\x20load\x20JSON:\x20','Invalid\x20JSON\x20in\x20file\x20\x27','961230XjGSBw','parse','661155UbtTaV','INTERNAL','7670DKJvBU'];a67_0x249f=function(){return _0x541f01;};return a67_0x249f();}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x17da99,_0x23caf6){const _0x5a0899=a67_0x2806;try{if(_0x23caf6){const _0x14ffed=await readFile(_0x17da99,'utf-8');try{return JSON['parse'](_0x14ffed);}catch(_0x167453){throw new SDKError(ErrorCode[_0x5a0899(0x176)],_0x5a0899(0x163)+_0x17da99+_0x5a0899(0x16c)+(_0x167453 instanceof Error?_0x167453[_0x5a0899(0x178)]:String(_0x167453)));}}else try{return JSON[_0x5a0899(0x165)](_0x17da99);}catch(_0x282faf){throw new SDKError(ErrorCode[_0x5a0899(0x176)],_0x5a0899(0x169)+(_0x282faf instanceof Error?_0x282faf['message']:String(_0x282faf)));}}catch(_0x26badb){if(_0x26badb instanceof SDKError)throw _0x26badb;if(_0x26badb instanceof Error&&_0x5a0899(0x16a)in _0x26badb){const _0x2a91e2=_0x26badb;if(_0x2a91e2[_0x5a0899(0x16a)]===_0x5a0899(0x171))throw new SDKError(ErrorCode[_0x5a0899(0x175)],_0x5a0899(0x177)+_0x17da99);else{if(_0x2a91e2['code']==='EACCES')throw new SDKError(ErrorCode[_0x5a0899(0x170)],_0x5a0899(0x16b)+_0x17da99);}}throw new SDKError(ErrorCode[_0x5a0899(0x167)],_0x5a0899(0x162)+(_0x26badb instanceof Error?_0x26badb['message']:String(_0x26badb)));}}function a67_0x2806(_0x29c65b,_0x9154b5){const _0x249fe5=a67_0x249f();return a67_0x2806=function(_0x2806c8,_0x405c01){_0x2806c8=_0x2806c8-0x15f;let _0x184b09=_0x249fe5[_0x2806c8];return _0x184b09;},a67_0x2806(_0x29c65b,_0x9154b5);}export async function loadJSONFromOptions(_0x599a94,_0x25e4fc){const _0x5c9340=a67_0x2806;if(_0x599a94&&_0x25e4fc)throw new SDKError(ErrorCode[_0x5c9340(0x176)],_0x5c9340(0x173));if(_0x599a94)return await loadJSON(_0x599a94,![]);if(_0x25e4fc)return await loadJSON(_0x25e4fc,!![]);return undefined;}
1
+ function a67_0x3b6b(){const _0x14461b=['287xxPWOa','626298uYOnPq','message','code','utf-8','Failed\x20to\x20load\x20JSON:\x20','299272iIZeLG','8airIbg','File\x20not\x20found:\x20','\x27:\x20','190cIEuly','NOT_FOUND','ENOENT','1888146bDUsqD','1130MGdJuW','parse','54681lcxfuZ','EACCES','335790dxYTkx','PERMISSION_DENIED','INTERNAL','772ZncURT','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','41970ZopTfu','INVALID_ARGUMENT'];a67_0x3b6b=function(){return _0x14461b;};return a67_0x3b6b();}(function(_0x399103,_0x1ffc82){const _0x172935=a67_0x2905,_0x5919c9=_0x399103();while(!![]){try{const _0x336a60=-parseInt(_0x172935(0x132))/0x1*(parseInt(_0x172935(0x12e))/0x2)+parseInt(_0x172935(0x133))/0x3+-parseInt(_0x172935(0x138))/0x4+parseInt(_0x172935(0x13c))/0x5*(-parseInt(_0x172935(0x130))/0x6)+parseInt(_0x172935(0x12b))/0x7+-parseInt(_0x172935(0x139))/0x8*(parseInt(_0x172935(0x13f))/0x9)+-parseInt(_0x172935(0x140))/0xa*(-parseInt(_0x172935(0x129))/0xb);if(_0x336a60===_0x1ffc82)break;else _0x5919c9['push'](_0x5919c9['shift']());}catch(_0x1e7768){_0x5919c9['push'](_0x5919c9['shift']());}}}(a67_0x3b6b,0x26647));import{readFile}from'fs/promises';function a67_0x2905(_0x2e3b99,_0x21b48e){const _0x3b6bdd=a67_0x3b6b();return a67_0x2905=function(_0x290559,_0x4a36bc){_0x290559=_0x290559-0x129;let _0x1fe970=_0x3b6bdd[_0x290559];return _0x1fe970;},a67_0x2905(_0x2e3b99,_0x21b48e);}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x25e261,_0x3b0889){const _0x145da9=a67_0x2905;try{if(_0x3b0889){const _0x402f2e=await readFile(_0x25e261,_0x145da9(0x136));try{return JSON[_0x145da9(0x141)](_0x402f2e);}catch(_0x4de53e){throw new SDKError(ErrorCode[_0x145da9(0x131)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x25e261+_0x145da9(0x13b)+(_0x4de53e instanceof Error?_0x4de53e[_0x145da9(0x134)]:String(_0x4de53e)));}}else try{return JSON[_0x145da9(0x141)](_0x25e261);}catch(_0x507d3d){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20JSON\x20string:\x20'+(_0x507d3d instanceof Error?_0x507d3d[_0x145da9(0x134)]:String(_0x507d3d)));}}catch(_0x5c64fa){if(_0x5c64fa instanceof SDKError)throw _0x5c64fa;if(_0x5c64fa instanceof Error&&'code'in _0x5c64fa){const _0x353419=_0x5c64fa;if(_0x353419[_0x145da9(0x135)]===_0x145da9(0x13e))throw new SDKError(ErrorCode[_0x145da9(0x13d)],_0x145da9(0x13a)+_0x25e261);else{if(_0x353419[_0x145da9(0x135)]===_0x145da9(0x12a))throw new SDKError(ErrorCode[_0x145da9(0x12c)],'Permission\x20denied\x20reading\x20file:\x20'+_0x25e261);}}throw new SDKError(ErrorCode[_0x145da9(0x12d)],_0x145da9(0x137)+(_0x5c64fa instanceof Error?_0x5c64fa[_0x145da9(0x134)]:String(_0x5c64fa)));}}export async function loadJSONFromOptions(_0x3692cf,_0x2014de){const _0x523064=a67_0x2905;if(_0x3692cf&&_0x2014de)throw new SDKError(ErrorCode[_0x523064(0x131)],_0x523064(0x12f));if(_0x3692cf)return await loadJSON(_0x3692cf,![]);if(_0x2014de)return await loadJSON(_0x2014de,!![]);return undefined;}
@@ -1 +1 @@
1
- (function(_0x2480d0,_0x492545){const _0xf9f570=a68_0x12c7,_0x259f32=_0x2480d0();while(!![]){try{const _0xee0e87=-parseInt(_0xf9f570(0x106))/0x1+-parseInt(_0xf9f570(0x104))/0x2*(-parseInt(_0xf9f570(0x105))/0x3)+-parseInt(_0xf9f570(0xff))/0x4*(-parseInt(_0xf9f570(0x100))/0x5)+parseInt(_0xf9f570(0x109))/0x6+-parseInt(_0xf9f570(0x103))/0x7+-parseInt(_0xf9f570(0x101))/0x8+-parseInt(_0xf9f570(0x108))/0x9*(parseInt(_0xf9f570(0x102))/0xa);if(_0xee0e87===_0x492545)break;else _0x259f32['push'](_0x259f32['shift']());}catch(_0x4fa9b2){_0x259f32['push'](_0x259f32['shift']());}}}(a68_0x506e,0x767f8));const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':'claude-4.5-sonnet'};function a68_0x506e(){const _0x5ab6c7=['4HsjNvn','4096315fLACvb','1327496aIUXUp','140JAZBPm','3833543vMCBnL','10814HIVeDU','243MYBIct','392576MDPkxx','match','361215VBheyW','5377140GaShcO','toLowerCase'];a68_0x506e=function(){return _0x5ab6c7;};return a68_0x506e();}export function extractModelAlias(_0x57d0cd){const _0x48b0ef=a68_0x12c7,_0x573803=_0x57d0cd[_0x48b0ef(0x107)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x573803)return _0x573803[0x1][_0x48b0ef(0x10a)]();return _0x57d0cd;}function a68_0x12c7(_0x289802,_0x436866){const _0x506e98=a68_0x506e();return a68_0x12c7=function(_0x12c7eb,_0x354793){_0x12c7eb=_0x12c7eb-0xff;let _0x1fa163=_0x506e98[_0x12c7eb];return _0x1fa163;},a68_0x12c7(_0x289802,_0x436866);}export function resolveModelAlias(_0x38149e){return MODEL_ALIASES[_0x38149e['toLowerCase']()]||_0x38149e;}export function getModelAliases(){return{...MODEL_ALIASES};}
1
+ const a68_0x480721=a68_0x4225;(function(_0x4cc833,_0x211398){const _0x18449a=a68_0x4225,_0x113ba3=_0x4cc833();while(!![]){try{const _0x5a423c=-parseInt(_0x18449a(0x129))/0x1+-parseInt(_0x18449a(0x123))/0x2+-parseInt(_0x18449a(0x12b))/0x3*(-parseInt(_0x18449a(0x12a))/0x4)+parseInt(_0x18449a(0x126))/0x5*(-parseInt(_0x18449a(0x12c))/0x6)+parseInt(_0x18449a(0x122))/0x7+-parseInt(_0x18449a(0x121))/0x8*(-parseInt(_0x18449a(0x124))/0x9)+parseInt(_0x18449a(0x128))/0xa;if(_0x5a423c===_0x211398)break;else _0x113ba3['push'](_0x113ba3['shift']());}catch(_0x353620){_0x113ba3['push'](_0x113ba3['shift']());}}}(a68_0x3526,0x88b2d));const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':a68_0x480721(0x125)};export function extractModelAlias(_0x29c62b){const _0x5b2115=a68_0x480721,_0x1d8848=_0x29c62b[_0x5b2115(0x127)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x1d8848)return _0x1d8848[0x1][_0x5b2115(0x12d)]();return _0x29c62b;}export function resolveModelAlias(_0x41b356){const _0x48c71a=a68_0x480721;return MODEL_ALIASES[_0x41b356[_0x48c71a(0x12d)]()]||_0x41b356;}function a68_0x4225(_0x351a8d,_0x445064){const _0x352678=a68_0x3526();return a68_0x4225=function(_0x422516,_0x2b87ba){_0x422516=_0x422516-0x121;let _0x5318d1=_0x352678[_0x422516];return _0x5318d1;},a68_0x4225(_0x351a8d,_0x445064);}export function getModelAliases(){return{...MODEL_ALIASES};}function a68_0x3526(){const _0x1f4a80=['toLowerCase','392944fMNqRx','6253282kmgwSp','1807914qTQBIR','9JrYmNE','claude-4.5-sonnet','120srWGsW','match','16458050DhavAe','1020143PTcGcg','24MNNBuy','488496xixogv','270306EZngOJ'];a68_0x3526=function(){return _0x1f4a80;};return a68_0x3526();}
@@ -1 +1 @@
1
- function a69_0x2ebf(_0x57aa08,_0x4946f7){const _0x405a9c=a69_0x405a();return a69_0x2ebf=function(_0x2ebff6,_0x375e82){_0x2ebff6=_0x2ebff6-0xed;let _0x3b8f83=_0x405a9c[_0x2ebff6];return _0x3b8f83;},a69_0x2ebf(_0x57aa08,_0x4946f7);}(function(_0x45672a,_0x1cd833){const _0x4d9d6a=a69_0x2ebf,_0x5e23b5=_0x45672a();while(!![]){try{const _0x4b0b09=parseInt(_0x4d9d6a(0xfa))/0x1+-parseInt(_0x4d9d6a(0xf9))/0x2+-parseInt(_0x4d9d6a(0xf8))/0x3+parseInt(_0x4d9d6a(0xf4))/0x4*(parseInt(_0x4d9d6a(0xfb))/0x5)+parseInt(_0x4d9d6a(0xf1))/0x6*(parseInt(_0x4d9d6a(0xef))/0x7)+-parseInt(_0x4d9d6a(0xf3))/0x8*(parseInt(_0x4d9d6a(0xfc))/0x9)+parseInt(_0x4d9d6a(0xee))/0xa;if(_0x4b0b09===_0x1cd833)break;else _0x5e23b5['push'](_0x5e23b5['shift']());}catch(_0x5a2d1e){_0x5e23b5['push'](_0x5e23b5['shift']());}}}(a69_0x405a,0x667d6));export function validateLimitOption(_0x24e4b3){const _0x154cf1=a69_0x2ebf;if(!Number[_0x154cf1(0xf2)](_0x24e4b3))return{'isValid':![],'error':_0x154cf1(0xed)+_0x24e4b3+_0x154cf1(0xf5)};if(_0x24e4b3<=0x0)return{'isValid':![],'error':_0x154cf1(0xed)+_0x24e4b3+_0x154cf1(0xf0)};return{'isValid':!![],'value':_0x24e4b3};}function a69_0x405a(){const _0x200204=['.\x20Must\x20be\x20a\x20positive\x20number.','Invalid\x20limit\x20value:\x20','11200570phWyIu','119lJqqXn','.\x20Must\x20be\x20a\x20positive\x20integer.','62178BDNrTr','isInteger','8344JAOuJa','869948IlGAQz','.\x20Must\x20be\x20an\x20integer.','Invalid\x20timeout\x20value:\x20','number','2484156EEtBBL','875510QDWjXD','173933psmIXF','15doquQe','3771FNIAzo'];a69_0x405a=function(){return _0x200204;};return a69_0x405a();}export function validateTimeoutOption(_0x57823f,_0x540801=0x1e){const _0x526727=a69_0x2ebf;if(_0x57823f===undefined)return{'isValid':!![],'value':_0x540801};const _0x36b92a=typeof _0x57823f===_0x526727(0xf7)?_0x57823f:parseFloat(_0x57823f);if(isNaN(_0x36b92a))return{'isValid':![],'error':_0x526727(0xf6)+_0x57823f+'.\x20Must\x20be\x20a\x20number.'};if(_0x36b92a<=0x0)return{'isValid':![],'error':_0x526727(0xf6)+_0x36b92a+_0x526727(0xfd)};return{'isValid':!![],'value':_0x36b92a};}
1
+ (function(_0xabd6d1,_0x5b2ad5){const _0x474d25=a69_0x240a,_0x5c4d13=_0xabd6d1();while(!![]){try{const _0x5bbe0e=parseInt(_0x474d25(0xda))/0x1+parseInt(_0x474d25(0xe0))/0x2*(parseInt(_0x474d25(0xe6))/0x3)+-parseInt(_0x474d25(0xea))/0x4*(-parseInt(_0x474d25(0xde))/0x5)+-parseInt(_0x474d25(0xe4))/0x6*(-parseInt(_0x474d25(0xe1))/0x7)+-parseInt(_0x474d25(0xdc))/0x8+parseInt(_0x474d25(0xdb))/0x9+-parseInt(_0x474d25(0xe9))/0xa*(parseInt(_0x474d25(0xe3))/0xb);if(_0x5bbe0e===_0x5b2ad5)break;else _0x5c4d13['push'](_0x5c4d13['shift']());}catch(_0x208445){_0x5c4d13['push'](_0x5c4d13['shift']());}}}(a69_0x3bdb,0xa3501));function a69_0x3bdb(){const _0x44015e=['1963880QCDTWd','isInteger','5DWCmmM','.\x20Must\x20be\x20a\x20number.','46giTpEN','21XZukJJ','Invalid\x20limit\x20value:\x20','22epubKJ','2635368BVGmMn','Invalid\x20timeout\x20value:\x20','102AjFSZV','.\x20Must\x20be\x20a\x20positive\x20number.','number','10085170dmWZlD','1146916fzTgAY','.\x20Must\x20be\x20an\x20integer.','1294243znXcdH','288090EqTZLz'];a69_0x3bdb=function(){return _0x44015e;};return a69_0x3bdb();}function a69_0x240a(_0x1335a5,_0x220569){const _0x3bdbf3=a69_0x3bdb();return a69_0x240a=function(_0x240a29,_0xadd990){_0x240a29=_0x240a29-0xd9;let _0x519df9=_0x3bdbf3[_0x240a29];return _0x519df9;},a69_0x240a(_0x1335a5,_0x220569);}export function validateLimitOption(_0x126655){const _0x426185=a69_0x240a;if(!Number[_0x426185(0xdd)](_0x126655))return{'isValid':![],'error':_0x426185(0xe2)+_0x126655+_0x426185(0xd9)};if(_0x126655<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x126655+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x126655};}export function validateTimeoutOption(_0x1ac8b3,_0x16bcc4=0x1e){const _0x253689=a69_0x240a;if(_0x1ac8b3===undefined)return{'isValid':!![],'value':_0x16bcc4};const _0x8d80cd=typeof _0x1ac8b3===_0x253689(0xe8)?_0x1ac8b3:parseFloat(_0x1ac8b3);if(isNaN(_0x8d80cd))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x1ac8b3+_0x253689(0xdf)};if(_0x8d80cd<=0x0)return{'isValid':![],'error':_0x253689(0xe5)+_0x8d80cd+_0x253689(0xe7)};return{'isValid':!![],'value':_0x8d80cd};}
@@ -1 +1 @@
1
- (function(_0x511aa0,_0x322f08){const _0x234918=a70_0x4a88,_0x2b8e81=_0x511aa0();while(!![]){try{const _0x59b5b9=-parseInt(_0x234918(0x1ca))/0x1*(-parseInt(_0x234918(0x1d2))/0x2)+parseInt(_0x234918(0x1d3))/0x3*(-parseInt(_0x234918(0x1cf))/0x4)+parseInt(_0x234918(0x1d1))/0x5+-parseInt(_0x234918(0x1dd))/0x6*(parseInt(_0x234918(0x1d7))/0x7)+-parseInt(_0x234918(0x1d9))/0x8*(-parseInt(_0x234918(0x1d8))/0x9)+-parseInt(_0x234918(0x1cd))/0xa+-parseInt(_0x234918(0x1d0))/0xb*(parseInt(_0x234918(0x1cc))/0xc);if(_0x59b5b9===_0x322f08)break;else _0x2b8e81['push'](_0x2b8e81['shift']());}catch(_0x5adbd2){_0x2b8e81['push'](_0x2b8e81['shift']());}}}(a70_0x4ad6,0xdc3a5));function a70_0x4ad6(){const _0x3e91b1=['24QzNOPq','close','EADDRINUSE','No\x20available\x20port\x20found\x20between\x20','7746fYEPYS','error','31091LNPYfi','once','12SaiLus','12874920hrnyXB','listen','4CELirv','9219683IeWAMo','7114725CQoccP','92XUTOrQ','391902xTvCzm','code','\x20and\x20','0.0.0.0','7777suVyst','5218506ZiiaXF'];a70_0x4ad6=function(){return _0x3e91b1;};return a70_0x4ad6();}import{createServer}from'node:net';function a70_0x4a88(_0x4e84e2,_0x37fb10){const _0x4ad653=a70_0x4ad6();return a70_0x4a88=function(_0x4a8815,_0x3d0006){_0x4a8815=_0x4a8815-0x1ca;let _0x1f9633=_0x4ad653[_0x4a8815];return _0x1f9633;},a70_0x4a88(_0x4e84e2,_0x37fb10);}export async function isPortAvailable(_0x3e60a0){return new Promise(_0x3e59c0=>{const _0x5354d2=a70_0x4a88,_0x2d481c=createServer();_0x2d481c[_0x5354d2(0x1cb)](_0x5354d2(0x1de),_0x10a7aa=>{const _0x1e2497=_0x5354d2;_0x10a7aa[_0x1e2497(0x1d4)]===_0x1e2497(0x1db)?_0x3e59c0(![]):_0x3e59c0(![]);}),_0x2d481c[_0x5354d2(0x1cb)]('listening',()=>{const _0x38b846=_0x5354d2;_0x2d481c[_0x38b846(0x1da)](),_0x3e59c0(!![]);}),_0x2d481c[_0x5354d2(0x1ce)](_0x3e60a0,_0x5354d2(0x1d6));});}export async function findAvailablePort(_0x4a1dfa=0xfa0,_0xac7d90=0x64){const _0x5c9875=a70_0x4a88;for(let _0x15b8c1=0x0;_0x15b8c1<_0xac7d90;_0x15b8c1++){const _0x25ed01=_0x4a1dfa+_0x15b8c1;if(await isPortAvailable(_0x25ed01))return _0x25ed01;}throw new Error(_0x5c9875(0x1dc)+_0x4a1dfa+_0x5c9875(0x1d5)+(_0x4a1dfa+_0xac7d90-0x1));}
1
+ (function(_0x1c7685,_0x4c6da8){const _0x5cb5c2=a70_0x750f,_0x4c1e7a=_0x1c7685();while(!![]){try{const _0x3c861f=-parseInt(_0x5cb5c2(0x106))/0x1+parseInt(_0x5cb5c2(0x111))/0x2*(parseInt(_0x5cb5c2(0x102))/0x3)+parseInt(_0x5cb5c2(0x10b))/0x4+-parseInt(_0x5cb5c2(0x10c))/0x5*(-parseInt(_0x5cb5c2(0x10d))/0x6)+parseInt(_0x5cb5c2(0x107))/0x7*(-parseInt(_0x5cb5c2(0x10a))/0x8)+-parseInt(_0x5cb5c2(0x105))/0x9*(parseInt(_0x5cb5c2(0x10f))/0xa)+parseInt(_0x5cb5c2(0x109))/0xb*(-parseInt(_0x5cb5c2(0x108))/0xc);if(_0x3c861f===_0x4c6da8)break;else _0x4c1e7a['push'](_0x4c1e7a['shift']());}catch(_0x611ee6){_0x4c1e7a['push'](_0x4c1e7a['shift']());}}}(a70_0xdd43,0x2e0e8));import{createServer}from'node:net';function a70_0xdd43(){const _0x54ffdf=['listen','2xXpkaE','close','933159Izwgjf','listening','No\x20available\x20port\x20found\x20between\x20','9biZDTK','25475fuLSiH','133QRHnPl','516iSBKoo','42658dnpgRb','110056sAKEoF','887884tlbjCD','5MITHUy','1898934aPQbHo','\x20and\x20','2072530JnzEiR'];a70_0xdd43=function(){return _0x54ffdf;};return a70_0xdd43();}function a70_0x750f(_0x2c205d,_0xdeb6e9){const _0xdd4310=a70_0xdd43();return a70_0x750f=function(_0x750f92,_0x22c120){_0x750f92=_0x750f92-0x101;let _0x4ec427=_0xdd4310[_0x750f92];return _0x4ec427;},a70_0x750f(_0x2c205d,_0xdeb6e9);}export async function isPortAvailable(_0x25236b){return new Promise(_0xab9b3f=>{const _0x3e5390=a70_0x750f,_0x408d75=createServer();_0x408d75['once']('error',_0x34c613=>{_0x34c613['code']==='EADDRINUSE'?_0xab9b3f(![]):_0xab9b3f(![]);}),_0x408d75['once'](_0x3e5390(0x103),()=>{const _0x3d6f51=_0x3e5390;_0x408d75[_0x3d6f51(0x101)](),_0xab9b3f(!![]);}),_0x408d75[_0x3e5390(0x110)](_0x25236b,'0.0.0.0');});}export async function findAvailablePort(_0x2ca7ff=0xfa0,_0x4c8492=0x64){const _0x60a7a0=a70_0x750f;for(let _0x1e6a3e=0x0;_0x1e6a3e<_0x4c8492;_0x1e6a3e++){const _0x6245dc=_0x2ca7ff+_0x1e6a3e;if(await isPortAvailable(_0x6245dc))return _0x6245dc;}throw new Error(_0x60a7a0(0x104)+_0x2ca7ff+_0x60a7a0(0x10e)+(_0x2ca7ff+_0x4c8492-0x1));}
@@ -1 +1 @@
1
- function a71_0x278d(_0x23dffc,_0x4d7392){const _0x2c0ced=a71_0x2c0c();return a71_0x278d=function(_0x278ddc,_0x15ebba){_0x278ddc=_0x278ddc-0xa4;let _0x4e8f01=_0x2c0ced[_0x278ddc];return _0x4e8f01;},a71_0x278d(_0x23dffc,_0x4d7392);}const a71_0x239ba0=a71_0x278d;(function(_0x34ff38,_0x3218df){const _0x4c3b68=a71_0x278d,_0x26a329=_0x34ff38();while(!![]){try{const _0x4491c5=parseInt(_0x4c3b68(0xbc))/0x1+-parseInt(_0x4c3b68(0xbd))/0x2*(parseInt(_0x4c3b68(0xb3))/0x3)+-parseInt(_0x4c3b68(0xb2))/0x4*(parseInt(_0x4c3b68(0xb4))/0x5)+-parseInt(_0x4c3b68(0xca))/0x6*(-parseInt(_0x4c3b68(0xac))/0x7)+parseInt(_0x4c3b68(0xc8))/0x8*(-parseInt(_0x4c3b68(0xa5))/0x9)+parseInt(_0x4c3b68(0xaa))/0xa*(-parseInt(_0x4c3b68(0xc6))/0xb)+parseInt(_0x4c3b68(0xc4))/0xc*(parseInt(_0x4c3b68(0xab))/0xd);if(_0x4491c5===_0x3218df)break;else _0x26a329['push'](_0x26a329['shift']());}catch(_0x55d8be){_0x26a329['push'](_0x26a329['shift']());}}}(a71_0x2c0c,0xcaa1e));import{execSync}from'node:child_process';function a71_0x2c0c(){const _0x58b6d1=['utf-8','wmic\x20process\x20where\x20ProcessId=','dash','ppid','fish','36092digRNG','66XWbEYu','765izEMzP','replace','error','comm','pwsh','win32','ksh','toLowerCase','1084348kixEGD','49460raGPLr','csh','pid','\x20-o\x20ppid=,comm=','tcsh','trim','DEBUG','2339208TJWAKY','pop','33pUDKki','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','8381328amZoKK','\x20on\x20Windows:','403878dGBPcJ',',\x20using\x20fallback','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','elvish','env','xonsh','bash','9IKOZpl','platform','split','join','length','4880210RqlbJY','234XwZtxZ','70YnLygX'];a71_0x2c0c=function(){return _0x58b6d1;};return a71_0x2c0c();}const SHELL_NAMES=new Set([a71_0x239ba0(0xa4),'zsh','sh',a71_0x239ba0(0xb1),a71_0x239ba0(0xba),a71_0x239ba0(0xc1),a71_0x239ba0(0xbe),a71_0x239ba0(0xaf),a71_0x239ba0(0xb8),'powershell','nu','ion',a71_0x239ba0(0xcd),a71_0x239ba0(0xcf)]);function getProcessInfoWindows(_0x2579c6){const _0x30b838=a71_0x239ba0;try{const _0x171994=execSync(_0x30b838(0xae)+_0x2579c6+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':_0x30b838(0xad),'windowsHide':!![]})['trim'](),_0x272e06=_0x171994[_0x30b838(0xa7)]('\x0a')['filter'](_0x5a9e49=>_0x5a9e49[_0x30b838(0xc2)]());if(_0x272e06[_0x30b838(0xa9)]<0x2)return null;const _0x48c628=_0x272e06[_0x272e06['length']-0x1][_0x30b838(0xa7)](',');if(_0x48c628[_0x30b838(0xa9)]<0x3)return null;const _0x339ac1=_0x48c628[0x1]?.[_0x30b838(0xc2)]()||'',_0x12d126=parseInt(_0x48c628[0x2]?.['trim']()||'0',0xa);if(isNaN(_0x12d126)||!_0x339ac1)return null;return{'pid':_0x2579c6,'ppid':_0x12d126,'comm':_0x339ac1[_0x30b838(0xb5)](/\.exe$/i,'')};}catch(_0x17e800){return process[_0x30b838(0xce)]['DEBUG']&&console[_0x30b838(0xb6)](_0x30b838(0xcc)+_0x2579c6+_0x30b838(0xc9),_0x17e800),null;}}function getProcessInfoPosix(_0x38df30){const _0x2c8dae=a71_0x239ba0;try{const _0x9d0939=execSync('ps\x20-p\x20'+_0x38df30+_0x2c8dae(0xc0),{'encoding':_0x2c8dae(0xad)})[_0x2c8dae(0xc2)](),[_0x8dbc09,..._0x420ecb]=_0x9d0939[_0x2c8dae(0xa7)](/\s+/),_0x3102c9=parseInt(_0x8dbc09,0xa),_0x359c1f=_0x420ecb[_0x2c8dae(0xa8)]('\x20');if(isNaN(_0x3102c9))return null;return{'pid':_0x38df30,'ppid':_0x3102c9,'comm':_0x359c1f};}catch(_0x4a3168){return process[_0x2c8dae(0xce)][_0x2c8dae(0xc3)]&&console[_0x2c8dae(0xb6)](_0x2c8dae(0xcc)+_0x38df30+'\x20on\x20POSIX:',_0x4a3168),null;}}function getProcessInfo(_0x4e4c40){const _0xafea9e=a71_0x239ba0;if(process[_0xafea9e(0xa6)]===_0xafea9e(0xb9))return getProcessInfoWindows(_0x4e4c40);return getProcessInfoPosix(_0x4e4c40);}function isShell(_0x30d966){const _0x397eed=a71_0x239ba0,_0x45fac7=_0x30d966[_0x397eed(0xb5)](/^-/,'')[_0x397eed(0xa7)]('/')[_0x397eed(0xc5)]()||'';return SHELL_NAMES['has'](_0x45fac7[_0x397eed(0xbb)]());}let cachedShellPID;function findShellPID(){const _0x59e634=a71_0x239ba0;let _0x4ee2ba=process[_0x59e634(0xb0)];const _0x1e37ae=0xa;let _0x4d69d9=0x0;while(_0x4d69d9<_0x1e37ae){const _0x48e053=getProcessInfo(_0x4ee2ba);if(!_0x48e053){process[_0x59e634(0xce)][_0x59e634(0xc3)]&&console['error']('Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20'+_0x4ee2ba+_0x59e634(0xcb));break;}if(isShell(_0x48e053[_0x59e634(0xb7)]))return _0x48e053[_0x59e634(0xbf)];if(_0x48e053[_0x59e634(0xb0)]===0x0||_0x48e053[_0x59e634(0xb0)]===0x1){if(isShell(_0x48e053[_0x59e634(0xb7)]))return _0x48e053['pid'];break;}_0x4ee2ba=_0x48e053[_0x59e634(0xb0)],_0x4d69d9++;}return process[_0x59e634(0xce)][_0x59e634(0xc3)]&&console[_0x59e634(0xb6)](_0x59e634(0xc7)),process[_0x59e634(0xb0)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x5e2274){try{return process['kill'](_0x5e2274,0x0),!![];}catch{return![];}}
1
+ const a71_0x5f2dec=a71_0x5f04;function a71_0x5f04(_0x237d41,_0x558eec){const _0x30b121=a71_0x30b1();return a71_0x5f04=function(_0x5f040d,_0x59544c){_0x5f040d=_0x5f040d-0xdc;let _0x2a834c=_0x30b121[_0x5f040d];return _0x2a834c;},a71_0x5f04(_0x237d41,_0x558eec);}(function(_0x5c5a80,_0x22dc43){const _0x1fa96e=a71_0x5f04,_0xf0db97=_0x5c5a80();while(!![]){try{const _0x364330=-parseInt(_0x1fa96e(0xe8))/0x1*(-parseInt(_0x1fa96e(0xe9))/0x2)+parseInt(_0x1fa96e(0xf0))/0x3*(parseInt(_0x1fa96e(0xe1))/0x4)+parseInt(_0x1fa96e(0xec))/0x5*(parseInt(_0x1fa96e(0xef))/0x6)+parseInt(_0x1fa96e(0xf5))/0x7+parseInt(_0x1fa96e(0xe5))/0x8+parseInt(_0x1fa96e(0xed))/0x9*(parseInt(_0x1fa96e(0xf3))/0xa)+-parseInt(_0x1fa96e(0x102))/0xb;if(_0x364330===_0x22dc43)break;else _0xf0db97['push'](_0xf0db97['shift']());}catch(_0x59850b){_0xf0db97['push'](_0xf0db97['shift']());}}}(a71_0x30b1,0xdfe4d));import{execSync}from'node:child_process';const SHELL_NAMES=new Set(['bash','zsh','sh',a71_0x5f2dec(0x101),a71_0x5f2dec(0xeb),a71_0x5f2dec(0xea),'csh','dash',a71_0x5f2dec(0xe7),a71_0x5f2dec(0xfd),'nu',a71_0x5f2dec(0xf8),'elvish',a71_0x5f2dec(0xe2)]);function getProcessInfoWindows(_0x52622c){const _0x75a9ce=a71_0x5f2dec;try{const _0x58c163=execSync(_0x75a9ce(0xf9)+_0x52622c+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':_0x75a9ce(0xfe),'windowsHide':!![]})[_0x75a9ce(0xdc)](),_0x296b69=_0x58c163[_0x75a9ce(0xf2)]('\x0a')['filter'](_0x1f0faf=>_0x1f0faf[_0x75a9ce(0xdc)]());if(_0x296b69[_0x75a9ce(0xe0)]<0x2)return null;const _0x571e20=_0x296b69[_0x296b69[_0x75a9ce(0xe0)]-0x1]['split'](',');if(_0x571e20['length']<0x3)return null;const _0x204dab=_0x571e20[0x1]?.['trim']()||'',_0x14f718=parseInt(_0x571e20[0x2]?.[_0x75a9ce(0xdc)]()||'0',0xa);if(isNaN(_0x14f718)||!_0x204dab)return null;return{'pid':_0x52622c,'ppid':_0x14f718,'comm':_0x204dab[_0x75a9ce(0x100)](/\.exe$/i,'')};}catch(_0x57a380){return process[_0x75a9ce(0xe3)][_0x75a9ce(0xf7)]&&console[_0x75a9ce(0xe4)](_0x75a9ce(0xee)+_0x52622c+_0x75a9ce(0xfc),_0x57a380),null;}}function getProcessInfoPosix(_0x4eed0b){const _0x21d57a=a71_0x5f2dec;try{const _0x1695df=execSync('ps\x20-p\x20'+_0x4eed0b+_0x21d57a(0xf6),{'encoding':_0x21d57a(0xfe)})['trim'](),[_0x51b3c1,..._0x1a3871]=_0x1695df[_0x21d57a(0xf2)](/\s+/),_0x536661=parseInt(_0x51b3c1,0xa),_0x440897=_0x1a3871[_0x21d57a(0xdf)]('\x20');if(isNaN(_0x536661))return null;return{'pid':_0x4eed0b,'ppid':_0x536661,'comm':_0x440897};}catch(_0x1345ea){return process[_0x21d57a(0xe3)][_0x21d57a(0xf7)]&&console[_0x21d57a(0xe4)]('Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20'+_0x4eed0b+_0x21d57a(0xfb),_0x1345ea),null;}}function getProcessInfo(_0xe6c011){const _0x5b0cc1=a71_0x5f2dec;if(process[_0x5b0cc1(0xdd)]==='win32')return getProcessInfoWindows(_0xe6c011);return getProcessInfoPosix(_0xe6c011);}function isShell(_0x5d3ff3){const _0x442c04=a71_0x5f2dec,_0x3beda9=_0x5d3ff3['replace'](/^-/,'')[_0x442c04(0xf2)]('/')[_0x442c04(0xf4)]()||'';return SHELL_NAMES[_0x442c04(0xe6)](_0x3beda9['toLowerCase']());}let cachedShellPID;function findShellPID(){const _0x392c65=a71_0x5f2dec;let _0x5bb661=process[_0x392c65(0xf1)];const _0x460b00=0xa;let _0x51efe4=0x0;while(_0x51efe4<_0x460b00){const _0x3d78f3=getProcessInfo(_0x5bb661);if(!_0x3d78f3){process[_0x392c65(0xe3)][_0x392c65(0xf7)]&&console[_0x392c65(0xe4)]('Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20'+_0x5bb661+_0x392c65(0xfa));break;}if(isShell(_0x3d78f3[_0x392c65(0xde)]))return _0x3d78f3[_0x392c65(0xff)];if(_0x3d78f3[_0x392c65(0xf1)]===0x0||_0x3d78f3[_0x392c65(0xf1)]===0x1){if(isShell(_0x3d78f3[_0x392c65(0xde)]))return _0x3d78f3[_0x392c65(0xff)];break;}_0x5bb661=_0x3d78f3['ppid'],_0x51efe4++;}return process['env']['DEBUG']&&console[_0x392c65(0xe4)](_0x392c65(0x103)),process[_0x392c65(0xf1)];}function a71_0x30b1(){const _0x5e7479=['join','length','668zAQsfg','xonsh','env','error','11483976qwUEIE','has','pwsh','1141OZHLmU','414kEKafK','tcsh','ksh','5JUOCgI','14994deBhIw','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','7562154BNvfXJ','19374ZXqmVB','ppid','split','5180NgeEOu','pop','10299170ieSnxo','\x20-o\x20ppid=,comm=','DEBUG','ion','wmic\x20process\x20where\x20ProcessId=',',\x20using\x20fallback','\x20on\x20POSIX:','\x20on\x20Windows:','powershell','utf-8','pid','replace','fish','59705338JeFEvC','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','trim','platform','comm'];a71_0x30b1=function(){return _0x5e7479;};return a71_0x30b1();}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x3003af){try{return process['kill'](_0x3003af,0x0),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x4f2dd1,_0x235884){const _0xd1de7b=a72_0x53af,_0x244cba=_0x4f2dd1();while(!![]){try{const _0x5cb53c=parseInt(_0xd1de7b(0x144))/0x1+-parseInt(_0xd1de7b(0x147))/0x2+-parseInt(_0xd1de7b(0x14d))/0x3+parseInt(_0xd1de7b(0x149))/0x4*(parseInt(_0xd1de7b(0x143))/0x5)+-parseInt(_0xd1de7b(0x145))/0x6+-parseInt(_0xd1de7b(0x14e))/0x7*(parseInt(_0xd1de7b(0x14a))/0x8)+parseInt(_0xd1de7b(0x148))/0x9;if(_0x5cb53c===_0x235884)break;else _0x244cba['push'](_0x244cba['shift']());}catch(_0x1cd704){_0x244cba['push'](_0x244cba['shift']());}}}(a72_0xfb4c,0xd3abf));function a72_0x53af(_0x57d02c,_0x3376a4){const _0xfb4c60=a72_0xfb4c();return a72_0x53af=function(_0x53afe0,_0x4f401b){_0x53afe0=_0x53afe0-0x143;let _0xa87248=_0xfb4c60[_0x53afe0];return _0xa87248;},a72_0x53af(_0x57d02c,_0x3376a4);}import*as a72_0x2b281e from'readline';export async function confirm(_0x252f09){const _0x3f3e01=a72_0x53af,_0x1be14a=a72_0x2b281e[_0x3f3e01(0x146)]({'input':process[_0x3f3e01(0x14c)],'output':process['stdout']});return new Promise(_0x2d1b38=>{const _0x32581d=_0x3f3e01;_0x1be14a[_0x32581d(0x14b)](_0x252f09+'\x20(y/N):\x20',_0x5e8510=>{const _0x2d91d2=_0x32581d;_0x1be14a[_0x2d91d2(0x150)](),_0x2d1b38(_0x5e8510['toLowerCase']()==='y'||_0x5e8510[_0x2d91d2(0x14f)]()==='yes');});});}function a72_0xfb4c(){const _0x4eb36d=['close','12605oUnJpR','1286230WGMDSh','7422246DrTfCb','createInterface','2696274sVACcZ','26252433RtzQsk','1436ONGtnu','5690984rsmfBF','question','stdin','699825pSnWJc','14pfDEnB','toLowerCase'];a72_0xfb4c=function(){return _0x4eb36d;};return a72_0xfb4c();}
1
+ (function(_0xc30db7,_0xfd336a){const _0x3350fd=a72_0x5118,_0x4896d5=_0xc30db7();while(!![]){try{const _0x9c0157=parseInt(_0x3350fd(0x1b3))/0x1*(parseInt(_0x3350fd(0x1ad))/0x2)+parseInt(_0x3350fd(0x1b7))/0x3*(-parseInt(_0x3350fd(0x1a7))/0x4)+-parseInt(_0x3350fd(0x1b8))/0x5*(parseInt(_0x3350fd(0x1b2))/0x6)+parseInt(_0x3350fd(0x1ab))/0x7+parseInt(_0x3350fd(0x1ac))/0x8+-parseInt(_0x3350fd(0x1a9))/0x9+-parseInt(_0x3350fd(0x1aa))/0xa*(-parseInt(_0x3350fd(0x1ae))/0xb);if(_0x9c0157===_0xfd336a)break;else _0x4896d5['push'](_0x4896d5['shift']());}catch(_0x55709e){_0x4896d5['push'](_0x4896d5['shift']());}}}(a72_0x561e,0x8f0f7));import*as a72_0x1eeb4a from'readline';function a72_0x5118(_0x48b8ea,_0x2523eb){const _0x561eb9=a72_0x561e();return a72_0x5118=function(_0x5118f6,_0x4f37b4){_0x5118f6=_0x5118f6-0x1a7;let _0x148be4=_0x561eb9[_0x5118f6];return _0x148be4;},a72_0x5118(_0x48b8ea,_0x2523eb);}export async function confirm(_0x420b4c){const _0x46b9fe=a72_0x5118,_0x4c18bc=a72_0x1eeb4a[_0x46b9fe(0x1af)]({'input':process[_0x46b9fe(0x1a8)],'output':process[_0x46b9fe(0x1b1)]});return new Promise(_0x5aecf6=>{const _0x411814=_0x46b9fe;_0x4c18bc['question'](_0x420b4c+_0x411814(0x1b5),_0x4b7624=>{const _0xa6534b=_0x411814;_0x4c18bc[_0xa6534b(0x1b6)](),_0x5aecf6(_0x4b7624[_0xa6534b(0x1b4)]()==='y'||_0x4b7624[_0xa6534b(0x1b4)]()===_0xa6534b(0x1b0));});});}function a72_0x561e(){const _0x22bf00=['9361629FCVQOJ','2722730sKsGGl','1845529cxEngF','6447864kAjNdq','16CakXBO','11XfHsle','createInterface','yes','stdout','402mZlhGg','103804ARLxXz','toLowerCase','\x20(y/N):\x20','close','3171iMNllG','31925cXEyMd','448MhjYfF','stdin'];a72_0x561e=function(){return _0x22bf00;};return a72_0x561e();}