@treasuredata/tdx 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/engage-api-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/fields-display.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/model-factors.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-config.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37b035,_0xbf8297){const _0x132979=a92_0x20ea,_0x2dbe5c=_0x37b035();while(!![]){try{const _0x5613c6=-parseInt(_0x132979(0xf8))/0x1*(parseInt(_0x132979(0x10b))/0x2)+-parseInt(_0x132979(0xeb))/0x3+parseInt(_0x132979(0x10e))/0x4+parseInt(_0x132979(0xec))/0x5*(-parseInt(_0x132979(0x110))/0x6)+parseInt(_0x132979(0x105))/0x7+-parseInt(_0x132979(0x119))/0x8*(-parseInt(_0x132979(0x10a))/0x9)+-parseInt(_0x132979(0xf0))/0xa*(-parseInt(_0x132979(0x103))/0xb);if(_0x5613c6===_0xbf8297)break;else _0x2dbe5c['push'](_0x2dbe5c['shift']());}catch(_0x48fcae){_0x2dbe5c['push'](_0x2dbe5c['shift']());}}}(a92_0x32ef,0x4fa04));import a92_0x405b5c from'chalk';import{withQuerySpinner}from'./spinner.js';export function buildSchemaResult(_0x3eef61){const _0x577490=a92_0x20ea,_0x3ac7b1=_0x3eef61[_0x577490(0xf2)][_0x577490(0xfd)](_0x2d7e56=>({'column_name':_0x2d7e56[_0x577490(0x113)],'column_type':_0x2d7e56[_0x577490(0xea)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x3eef61,'columns':[{'name':'column_name','type':'varchar'},{'name':_0x577490(0x11e),'type':_0x577490(0x102)},{'name':_0x577490(0xf1),'type':_0x577490(0x102)},{'name':_0x577490(0xe8),'type':_0x577490(0x102)},{'name':_0x577490(0xf9),'type':'varchar'},{'name':_0x577490(0x118),'type':'varchar'}],'data':_0x3ac7b1};}export async function executeSchemaQuery(_0x373035,_0x537d94,_0x2cb31e){const _0xa6bd=a92_0x20ea,_0xcc0515=_0x373035[_0xa6bd(0x11b)]()[_0xa6bd(0xfb)](/;+$/,''),_0x59e13c='SELECT\x20*\x20FROM\x20(\x0a'+_0xcc0515+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0x2cb31e[_0xa6bd(0xed)]&&console[_0xa6bd(0xff)](_0xa6bd(0xfa)+_0x59e13c);const _0x3416af=await withQuerySpinner(_0xa6bd(0xf7),async _0x1d5022=>{const _0x18288b=_0xa6bd,_0x285862=await _0x537d94['query'][_0x18288b(0x10c)](_0x59e13c,{'catalog':'td','schema':_0x18288b(0x111),'onJobId':_0x30bef4=>{const _0x4d2f36=_0x18288b;_0x1d5022[_0x4d2f36(0x100)](_0x30bef4);}});return _0x285862;},{'verbose':_0x2cb31e[_0xa6bd(0xed)]});return buildSchemaResult(_0x3416af[_0xa6bd(0x11a)]);}export function displayFieldsHumanReadable(_0xa4bd67,_0x350a4b){const _0x3f5450=a92_0x20ea,_0x1ad233=_0xa4bd67[_0x3f5450(0x107)](_0x7e6f94=>_0x7e6f94[_0x3f5450(0x117)]===_0x3f5450(0xf6)),_0x5eaec8=_0xa4bd67[_0x3f5450(0x107)](_0x117fee=>_0x117fee[_0x3f5450(0x117)]===_0x3f5450(0x10f)),_0xcd5f9=new Map();for(const _0x294ba9 of _0x1ad233){const _0x3b82e5=_0x294ba9[_0x3f5450(0x10d)]||_0x294ba9[_0x3f5450(0x115)]||_0x3f5450(0xfc),_0x55751e=_0xcd5f9['get'](_0x3b82e5);_0x55751e?_0x55751e[_0x3f5450(0x108)][_0x3f5450(0xef)](_0x294ba9):_0xcd5f9[_0x3f5450(0x11d)](_0x3b82e5,{'displayName':_0x3b82e5,'tableName':_0x294ba9['parentTableName'],'fields':[_0x294ba9]});}const _0x1b01bb=new Map();for(const _0x46931a of _0x5eaec8){const _0x31edc7=_0x46931a[_0x3f5450(0xe9)]||_0x3f5450(0xfc),_0x1d89d5=_0x1b01bb[_0x3f5450(0x114)](_0x31edc7)||[];_0x1d89d5[_0x3f5450(0xef)](_0x46931a),_0x1b01bb['set'](_0x31edc7,_0x1d89d5);}console[_0x3f5450(0xff)]('\x0a'+a92_0x405b5c['bold'](_0x350a4b));if(_0xcd5f9[_0x3f5450(0xf5)]>0x0){console[_0x3f5450(0xff)]('\x0a'+a92_0x405b5c[_0x3f5450(0x11c)](_0x3f5450(0x116)));const _0x599afe=[..._0xcd5f9[_0x3f5450(0xf3)]()][_0x3f5450(0x101)]((_0x2c2316,_0x50a06f)=>_0x2c2316[0x0][_0x3f5450(0x109)](_0x50a06f[0x0]));for(const [,_0x255202]of _0x599afe){const _0xa904f0=_0x255202[_0x3f5450(0x112)]&&_0x255202[_0x3f5450(0x112)]!==_0x255202[_0x3f5450(0x104)]?'\x20'+a92_0x405b5c[_0x3f5450(0x11c)]('('+_0x255202[_0x3f5450(0x112)]+')'):'';console[_0x3f5450(0xff)]('\x20\x20'+a92_0x405b5c['bold'](_0x255202[_0x3f5450(0x104)])+_0xa904f0);const _0x4a592c=[..._0x255202['fields']][_0x3f5450(0x101)]((_0x5e4fc7,_0x2d3adb)=>_0x5e4fc7[_0x3f5450(0x113)][_0x3f5450(0x109)](_0x2d3adb['name']));for(const _0x29e519 of _0x4a592c){const _0x3977d0=_0x29e519[_0x3f5450(0x106)]&&_0x29e519[_0x3f5450(0x106)]!==_0x29e519[_0x3f5450(0x113)]?'\x20'+a92_0x405b5c['dim']('('+_0x29e519[_0x3f5450(0x106)]+')'):'';console[_0x3f5450(0xff)]('\x20\x20\x20\x20'+_0x29e519[_0x3f5450(0x113)]+_0x3977d0+':\x20'+a92_0x405b5c['cyan'](_0x29e519[_0x3f5450(0xea)]));}}}if(_0x1b01bb[_0x3f5450(0xf5)]>0x0){console['error']('\x0a'+a92_0x405b5c[_0x3f5450(0x11c)]('Behaviors'));const _0x5e9e7b=[..._0x1b01bb['entries']()][_0x3f5450(0x101)]((_0x269c63,_0x25b126)=>_0x269c63[0x0]['localeCompare'](_0x25b126[0x0]));for(const [_0x48cc8f,_0x30108d]of _0x5e9e7b){const _0x1a67d1=_0x30108d[0x0],_0x23cd2d=_0x1a67d1?.['parentTableName']||'';console[_0x3f5450(0xff)]('\x20\x20'+a92_0x405b5c['bold'](_0x48cc8f)+(_0x23cd2d?'\x20'+a92_0x405b5c[_0x3f5450(0x11c)]('('+_0x23cd2d+')'):''));const _0x101e99=[..._0x30108d]['sort']((_0x4bd865,_0x192bae)=>_0x4bd865[_0x3f5450(0x113)]['localeCompare'](_0x192bae[_0x3f5450(0x113)]));for(const _0x39358b of _0x101e99){const _0x1c4762=_0x39358b[_0x3f5450(0x113)][_0x3f5450(0xee)](_0x48cc8f+'.')?_0x39358b[_0x3f5450(0x113)]['slice'](_0x48cc8f[_0x3f5450(0xfe)]+0x1):_0x39358b[_0x3f5450(0x113)],_0x5d68ec=_0x39358b[_0x3f5450(0x106)]&&_0x39358b[_0x3f5450(0x106)]!==_0x1c4762?'\x20'+a92_0x405b5c[_0x3f5450(0x11c)]('('+_0x39358b[_0x3f5450(0x106)]+')'):'';console['error']('\x20\x20\x20\x20'+_0x1c4762+_0x5d68ec+':\x20'+a92_0x405b5c[_0x3f5450(0xf4)](_0x39358b[_0x3f5450(0xea)]));}}}console['error']('');}function a92_0x20ea(_0x3c96d1,_0x493f20){_0x3c96d1=_0x3c96d1-0xe8;const _0x32ef87=a92_0x32ef();let _0x20ead3=_0x32ef87[_0x3c96d1];return _0x20ead3;}function a92_0x32ef(){const _0x952e2b=['21745nXugRY','verbose','startsWith','push','10RQVjEp','null','columns','entries','cyan','size','attribute','Fetching\x20schema...','1FVWYsF','default','Schema\x20query:\x0a','replace','Unknown','map','length','error','setJobId','sort','varchar','322432vJNNbR','displayName','4527418NvtsBY','parentColumn','filter','fields','localeCompare','71802pwVYze','1214006riFUjL','execute','groupingName','2370716HFCGLx','behavior','372mYbyYT','information_schema','tableName','name','get','parentTableName','Attributes','source','extra','104oThrce','data','trim','dim','set','column_type','key','behaviorName','type','509070IHXeEY'];a92_0x32ef=function(){return _0x952e2b;};return a92_0x32ef();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a93_0x3531(_0x3660f5,_0xb30301){_0x3660f5=_0x3660f5-0xf4;const _0x19f955=a93_0x19f9();let _0x353184=_0x19f955[_0x3660f5];return _0x353184;}(function(_0x17a46d,_0x5d48d4){const _0x5a9393=a93_0x3531,_0x3b4480=_0x17a46d();while(!![]){try{const _0x100ccc=-parseInt(_0x5a9393(0x107))/0x1*(-parseInt(_0x5a9393(0x105))/0x2)+parseInt(_0x5a9393(0xff))/0x3+parseInt(_0x5a9393(0xfa))/0x4+-parseInt(_0x5a9393(0xf9))/0x5*(parseInt(_0x5a9393(0x101))/0x6)+-parseInt(_0x5a9393(0x100))/0x7*(-parseInt(_0x5a9393(0x108))/0x8)+-parseInt(_0x5a9393(0xfc))/0x9*(parseInt(_0x5a9393(0xfd))/0xa)+-parseInt(_0x5a9393(0x104))/0xb;if(_0x100ccc===_0x5d48d4)break;else _0x3b4480['push'](_0x3b4480['shift']());}catch(_0x4cd611){_0x3b4480['push'](_0x3b4480['shift']());}}}(a93_0x19f9,0xa8fbb));import*as a93_0x1130bc from'node:fs';import*as a93_0x2d03e7 from'node:path';export function setSecureFilePermissions(_0xbaf3e8){const _0x33ac3e=a93_0x3531;try{a93_0x1130bc[_0x33ac3e(0x109)](_0xbaf3e8,0x180);}catch{console['warn'](_0x33ac3e(0xf6)+_0xbaf3e8);}}function a93_0x19f9(){const _0x5b0659=['2795utxnbQ','752488kZoUwc','Warning:\x20','3096mnKrdk','19110gvxLZa','dirname','3111873CzOVXz','35htSQjg','660qDGQDx',').\x20','existsSync','12725493PdXAZc','4272soTeqt','Should\x20be\x200600\x20or\x20more\x20restrictive.','194bxrlao','1484952geMZqQ','chmodSync','toString','mkdirSync','statSync','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','\x20has\x20insecure\x20permissions\x20(','warn'];a93_0x19f9=function(){return _0x5b0659;};return a93_0x19f9();}export function setSecureDirectoryPermissions(_0x3d9a5f){const _0x16d225=a93_0x3531;try{a93_0x1130bc['chmodSync'](_0x3d9a5f,0x1c0);}catch{console[_0x16d225(0xf8)](_0x16d225(0xf6)+_0x3d9a5f);}}export function createSecureDirectory(_0x574522){const _0x43f1b4=a93_0x3531;!a93_0x1130bc[_0x43f1b4(0x103)](_0x574522)&&(a93_0x1130bc[_0x43f1b4(0xf4)](_0x574522,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x574522));}export function validateSecureFilePermissions(_0x568ece){const _0x4ba5ff=a93_0x3531;try{const _0x28fad3=a93_0x1130bc[_0x4ba5ff(0xf5)](_0x568ece),_0x5147f9=_0x28fad3['mode']&0x1ff,_0x4e4805=(_0x5147f9&0x3f)!==0x0;if(_0x4e4805)return console[_0x4ba5ff(0xf8)](_0x4ba5ff(0xfb)+_0x568ece+_0x4ba5ff(0xf7)+_0x5147f9[_0x4ba5ff(0x10a)](0x8)+_0x4ba5ff(0x102)+_0x4ba5ff(0x106)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x82d14c,_0x1bb3a8){const _0x18c87d=a93_0x3531,_0x1c8406=a93_0x2d03e7[_0x18c87d(0xfe)](_0x82d14c);createSecureDirectory(_0x1c8406),a93_0x1130bc['writeFileSync'](_0x82d14c,_0x1bb3a8,{'mode':0x180}),setSecureFilePermissions(_0x82d14c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22ca52,_0x18b544){const _0x5de9da=a94_0x50a3,_0xbf686c=_0x22ca52();while(!![]){try{const _0x53d49d=parseInt(_0x5de9da(0x19f))/0x1+parseInt(_0x5de9da(0x1aa))/0x2*(-parseInt(_0x5de9da(0x1a7))/0x3)+-parseInt(_0x5de9da(0x1ae))/0x4*(parseInt(_0x5de9da(0x1a6))/0x5)+parseInt(_0x5de9da(0x1a5))/0x6*(parseInt(_0x5de9da(0x1a9))/0x7)+-parseInt(_0x5de9da(0x1a8))/0x8+-parseInt(_0x5de9da(0x1a1))/0x9*(-parseInt(_0x5de9da(0x1ab))/0xa)+parseInt(_0x5de9da(0x1a0))/0xb;if(_0x53d49d===_0x18b544)break;else _0xbf686c['push'](_0xbf686c['shift']());}catch(_0x4234a7){_0xbf686c['push'](_0xbf686c['shift']());}}}(a94_0xc9dc,0x419e6));export function detectFormatFromExtension(_0x394bbe){const _0x43c7b4=a94_0x50a3,_0x3e0452=_0x394bbe[_0x43c7b4(0x19d)]()[_0x43c7b4(0x1a2)]('.')[_0x43c7b4(0x19e)]();switch(_0x3e0452){case _0x43c7b4(0x1b0):return _0x43c7b4(0x1b0);case _0x43c7b4(0x1a4):return'jsonl';case _0x43c7b4(0x1ad):case'tab':return _0x43c7b4(0x1ad);case _0x43c7b4(0x1ac):case _0x43c7b4(0x1a3):return _0x43c7b4(0x1af);default:return undefined;}}export function resolveOutputFormat(_0x29353c,_0x36a88c,_0x3fc0bd){if(_0x29353c)return _0x29353c;if(_0x36a88c){const _0x1badb9=detectFormatFromExtension(_0x36a88c);if(_0x1badb9)return _0x1badb9;}return _0x3fc0bd;}function a94_0x50a3(_0x2394a1,_0x516a04){_0x2394a1=_0x2394a1-0x19d;const _0xc9dc08=a94_0xc9dc();let _0x50a3a6=_0xc9dc08[_0x2394a1];return _0x50a3a6;}function a94_0xc9dc(){const _0x24717a=['6xZQiPj','10gqMuVx','8193LwIvuz','1034032hKUQiU','1373022wOBieS','102uzGbIe','336090LEJbWj','txt','tsv','835932ienOIT','table','json','toLowerCase','pop','441395CHGflL','1276880ukOPAg','54WoFjvr','split','text','jsonl'];a94_0xc9dc=function(){return _0x24717a;};return a94_0xc9dc();}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x57732c,_0x381292){const _0x123d46=a95_0x370b,_0x5ed461=_0x57732c();while(!![]){try{const _0xf16a90=parseInt(_0x123d46(0x162))/0x1+-parseInt(_0x123d46(0x171))/0x2*(parseInt(_0x123d46(0x16c))/0x3)+-parseInt(_0x123d46(0x173))/0x4*(parseInt(_0x123d46(0x15d))/0x5)+parseInt(_0x123d46(0x15e))/0x6*(parseInt(_0x123d46(0x17c))/0x7)+-parseInt(_0x123d46(0x187))/0x8*(-parseInt(_0x123d46(0x166))/0x9)+-parseInt(_0x123d46(0x17a))/0xa*(parseInt(_0x123d46(0x16a))/0xb)+parseInt(_0x123d46(0x168))/0xc;if(_0xf16a90===_0x381292)break;else _0x5ed461['push'](_0x5ed461['shift']());}catch(_0x8f793d){_0x5ed461['push'](_0x5ed461['shift']());}}}(a95_0x2811,0x350f0));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 _0x2940dc=a95_0x370b;return process[_0x2940dc(0x181)][_0x2940dc(0x175)]||Infinity;}export function formatAsTable(_0xd3b166,_0x47254f=DEFAULT_MAX_DISPLAY_ROWS,_0x384b9e=![],_0x385117={}){const _0x3f7628=a95_0x370b;if(_0xd3b166[_0x3f7628(0x170)][_0x3f7628(0x172)]===0x0)return _0x3f7628(0x16e);const _0x338439=_0xd3b166[_0x3f7628(0x175)][_0x3f7628(0x17e)](_0x1ca9df=>_0x1ca9df[_0x3f7628(0x186)]),_0x42a338=_0xd3b166[_0x3f7628(0x175)][_0x3f7628(0x17e)](_0x3c1499=>simplifyType(_0x3c1499['type'])),_0x327495=_0xd3b166['data']['slice'](0x0,_0x47254f),_0xcb452c=_0xd3b166[_0x3f7628(0x170)][_0x3f7628(0x172)],_0x44c05b=_0xcb452c>_0x47254f,_0xbd9161=[],_0x5c62f5=getTerminalWidth(),_0x424cdc=_0x5c62f5!==Infinity,_0x34cc78=0x32;let _0x1f8751=_0x338439[_0x3f7628(0x17e)]((_0x245e9d,_0x288b10)=>{const _0x1058fd=_0x3f7628,_0x45ecf2=stringWidth(_0x42a338[_0x288b10]),_0x4e47ad=Math['max'](..._0x327495[_0x1058fd(0x17e)](_0x29ca85=>{const _0x4ce867=_0x29ca85[_0x245e9d];return stringWidth(formatValue(_0x4ce867));})),_0x17c15d=Math['max'](stringWidth(_0x245e9d),_0x45ecf2,_0x4e47ad);return _0x384b9e?_0x17c15d:Math[_0x1058fd(0x15f)](_0x17c15d,_0x34cc78);});if(_0x424cdc&&!_0x384b9e&&_0x338439[_0x3f7628(0x172)]>0x0){const _0x3e03b0=_0x52fb28=>{let _0x55d642=0x1;for(const _0x3690e3 of _0x52fb28){_0x55d642+=_0x3690e3+0x3;}return _0x55d642+0x1;};let _0x48cf78=_0x3e03b0(_0x1f8751);if(_0x48cf78>_0x5c62f5){const _0x1079d9=0x3;for(let _0x5973ea=_0x1f8751[_0x3f7628(0x172)]-0x1;_0x5973ea>=0x0;_0x5973ea--){_0x48cf78=_0x3e03b0(_0x1f8751);if(_0x48cf78<=_0x5c62f5)break;const _0x3fafb1=_0x1f8751[_0x5973ea],_0x6614a3=_0x48cf78-_0x5c62f5,_0x4da8f8=_0x3fafb1-_0x1079d9,_0x647a16=Math[_0x3f7628(0x15f)](_0x6614a3,_0x4da8f8);_0x647a16>0x0&&(_0x1f8751[_0x5973ea]=_0x3fafb1-_0x647a16);}}}const _0x5a8842=_0x338439,_0x274deb=_0x42a338,_0x226468=_0x1f8751,_0x4056d6=_0x1f8751;_0xbd9161[_0x3f7628(0x164)](colorBorder('┌'+_0x4056d6[_0x3f7628(0x17e)](_0x31d203=>'─'['repeat'](_0x31d203+0x2))[_0x3f7628(0x161)]('┬')+'┐',_0x385117));const _0x50e8bc=_0x5a8842[_0x3f7628(0x17e)]((_0x3d45c2,_0x41a332)=>centerAlign(_0x3d45c2,_0x226468[_0x41a332]));_0xbd9161['push'](colorBorder('│',_0x385117)+'\x20'+_0x50e8bc['join']('\x20'+colorBorder('│',_0x385117)+'\x20')+'\x20'+colorBorder('│',_0x385117));const _0x4612f0=_0x274deb['map']((_0xdfccee,_0x5c5046)=>colorType(centerAlign(_0xdfccee,_0x226468[_0x5c5046]),_0x385117));_0xbd9161[_0x3f7628(0x164)](colorBorder('│',_0x385117)+'\x20'+_0x4612f0[_0x3f7628(0x161)]('\x20'+colorBorder('│',_0x385117)+'\x20')+'\x20'+colorBorder('│',_0x385117)),_0xbd9161[_0x3f7628(0x164)](colorBorder('├'+_0x4056d6[_0x3f7628(0x17e)](_0x34ae26=>'─'[_0x3f7628(0x17d)](_0x34ae26+0x2))['join']('┼')+'┤',_0x385117));const _0x2b4103=(_0x36eb88,_0x2d44a2)=>{const _0x1b23fb=stringWidth(_0x36eb88);if(_0x1b23fb<=_0x2d44a2)return _0x36eb88;let _0x1c4ac0=_0x36eb88;while(stringWidth(_0x1c4ac0+'…')>_0x2d44a2&&_0x1c4ac0['length']>0x0){_0x1c4ac0=_0x1c4ac0['slice'](0x0,-0x1);}return _0x1c4ac0+'…';};_0x327495[_0x3f7628(0x188)](_0xed347d=>{const _0x549d14=_0x3f7628,_0x3e5f81=_0x338439[_0x549d14(0x17e)]((_0x576443,_0x549d62)=>{const _0x5f0679=_0xed347d[_0x576443],_0x291232=formatValue(_0x5f0679),_0x2357d6=_0x226468[_0x549d62],_0x46e51c=_0x2b4103(_0x291232,_0x2357d6),_0x49f682=typeof _0x5f0679==='number'||typeof _0x5f0679==='string'&&/^-?\d+$/['test'](_0x5f0679);return _0x49f682?padStart(_0x46e51c,_0x2357d6):padEnd(_0x46e51c,_0x2357d6);});_0xbd9161[_0x549d14(0x164)](colorBorder('│',_0x385117)+'\x20'+_0x3e5f81['join']('\x20'+colorBorder('│',_0x385117)+'\x20')+'\x20'+colorBorder('│',_0x385117));});const _0x35fe46=_0x4056d6[_0x3f7628(0x180)]((_0x5aa7e5,_0x4a5433)=>_0x5aa7e5+_0x4a5433+0x3,-0x1);_0xbd9161[_0x3f7628(0x164)](colorBorder('├'+_0x4056d6[_0x3f7628(0x17e)](_0x36c232=>'─'[_0x3f7628(0x17d)](_0x36c232+0x2))[_0x3f7628(0x161)]('┴')+'┤',_0x385117));let _0x9511e6;_0x44c05b?_0x9511e6=_0xcb452c+_0x3f7628(0x17b)+_0x47254f+_0x3f7628(0x185):_0x9511e6=_0xcb452c+_0x3f7628(0x18a)+(_0xcb452c===0x1?'':'s');const _0x3b3a47=_0x9511e6[_0x3f7628(0x169)](_0x35fe46-0x2);return _0xbd9161[_0x3f7628(0x164)](colorBorder('│',_0x385117)+'\x20'+_0x3b3a47+'\x20'+colorBorder('│',_0x385117)),_0xbd9161[_0x3f7628(0x164)](colorBorder('└'+'─'[_0x3f7628(0x17d)](_0x35fe46)+'┘',_0x385117)),_0xbd9161['join']('\x0a');}function simplifyType(_0x176666){const _0x438735=a95_0x370b,_0x3f592a={'varchar':'string','bigint':_0x438735(0x18c),'integer':_0x438735(0x189),'double':_0x438735(0x167),'boolean':'bool','date':'date','timestamp':_0x438735(0x18e),'array':'array','map':_0x438735(0x17e),'row':_0x438735(0x177)},_0x592dc4=_0x176666['toLowerCase']();for(const [_0x2e640a,_0x35c65c]of Object[_0x438735(0x16b)](_0x3f592a)){if(_0x592dc4['startsWith'](_0x2e640a))return _0x35c65c;}return _0x176666[_0x438735(0x172)]>0xa?_0x176666[_0x438735(0x17f)](0x0,0xa):_0x176666;}export function formatAsJSON(_0x1cff32,_0x1cddb9={}){const _0x340979=a95_0x370b;if(_0x1cff32['data'][_0x340979(0x172)]===0x0)return'[]';if(shouldUseColor(_0x1cddb9))return colorizeJSON(_0x1cff32[_0x340979(0x170)],_0x1cddb9);const _0x38de13=_0x1cff32[_0x340979(0x170)][_0x340979(0x17e)](_0x21dc66=>'\x20\x20'+JSON[_0x340979(0x179)](_0x21dc66));return'[\x0a'+_0x38de13[_0x340979(0x161)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x11d557,_0x231c97={}){const _0x1ba94f=a95_0x370b;if(_0x11d557[_0x1ba94f(0x170)][_0x1ba94f(0x172)]===0x0)return'';if(shouldUseColor(_0x231c97))return _0x11d557[_0x1ba94f(0x170)][_0x1ba94f(0x17e)](_0x386fa0=>colorizeJSONCompact(_0x386fa0,_0x231c97))['join']('\x0a');return _0x11d557[_0x1ba94f(0x170)][_0x1ba94f(0x17e)](_0x37e610=>JSON[_0x1ba94f(0x179)](_0x37e610))[_0x1ba94f(0x161)]('\x0a');}export function formatAsTSV(_0x4e67c0){const _0x58fc21=a95_0x370b;if(_0x4e67c0['data']['length']===0x0)return'';const _0x5986ad=[],_0x148aaf=_0x4e67c0[_0x58fc21(0x175)][_0x58fc21(0x17e)](_0xe360c4=>_0xe360c4['name']);return _0x5986ad[_0x58fc21(0x164)](_0x148aaf['join']('\x09')),_0x4e67c0[_0x58fc21(0x170)][_0x58fc21(0x188)](_0x5400d6=>{const _0x41e804=_0x58fc21,_0x390947=_0x148aaf[_0x41e804(0x17e)](_0x1e84f1=>{const _0x33c5c9=_0x5400d6[_0x1e84f1];return formatValueForTSV(_0x33c5c9);});_0x5986ad['push'](_0x390947[_0x41e804(0x161)]('\x09'));}),_0x5986ad[_0x58fc21(0x161)]('\x0a');}function formatValue(_0x433d8a){const _0x1dbc15=a95_0x370b;if(_0x433d8a===null||_0x433d8a===undefined)return'';if(typeof _0x433d8a===_0x1dbc15(0x165)){const _0x493525=_0x433d8a[_0x1dbc15(0x16f)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x1dbc15(0x16f)](/\t/g,'\x5ct');return _0x493525;}if(typeof _0x433d8a===_0x1dbc15(0x160))return String(_0x433d8a);if(typeof _0x433d8a===_0x1dbc15(0x176))return _0x433d8a?'true':_0x1dbc15(0x183);if(_0x433d8a instanceof Date)return _0x433d8a[_0x1dbc15(0x18b)]();if(typeof _0x433d8a===_0x1dbc15(0x15b))return JSON['stringify'](_0x433d8a);return String(_0x433d8a);}function a95_0x370b(_0x4c84b1,_0x400d3a){_0x4c84b1=_0x4c84b1-0x15b;const _0x2811c8=a95_0x2811();let _0x370b8a=_0x2811c8[_0x4c84b1];return _0x370b8a;}function formatValueForTSV(_0x3c24db){const _0x37210d=a95_0x370b;if(_0x3c24db===null||_0x3c24db===undefined)return'';if(typeof _0x3c24db===_0x37210d(0x165))return _0x3c24db['replace'](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x3c24db===_0x37210d(0x160)||typeof _0x3c24db==='boolean')return String(_0x3c24db);if(_0x3c24db instanceof Date)return _0x3c24db[_0x37210d(0x18b)]();if(typeof _0x3c24db===_0x37210d(0x15b))return JSON['stringify'](_0x3c24db);return String(_0x3c24db);}export function formatQueryResult(_0xa4541f,_0x1ca9d2){const _0xc6ff8e=a95_0x370b;switch(_0x1ca9d2){case'table':return formatAsTable(_0xa4541f);case _0xc6ff8e(0x18d):return formatAsJSON(_0xa4541f);case _0xc6ff8e(0x184):return formatAsJSONL(_0xa4541f);case'tsv':return formatAsTSV(_0xa4541f);default:return formatAsJSON(_0xa4541f);}}function a95_0x2811(){const _0x19ce65=['112okcMsv','forEach','int','\x20row','toISOString','long','json','timestamp','object','pow','4625AQUgGl','132378fMKncC','min','number','join','25356FnhhAX','0\x20B','push','string','24147iameFA','double','9279804objwSn','padEnd','2304698bMNdGs','entries','3jfcapD','log','No\x20rows\x20returned','replace','data','679686rKdkWB','length','1064dIkTTe','toFixed','columns','boolean','row','toString','stringify','10OwguTx','\x20rows\x20(','56ZoulnT','repeat','map','substring','reduce','stdout','floor','false','jsonl','\x20shown)','name'];a95_0x2811=function(){return _0x19ce65;};return a95_0x2811();}export function formatBytes(_0x154238){const _0x1410d6=a95_0x370b;if(_0x154238===0x0)return _0x1410d6(0x163);const _0x45dbe7=['B','KB','MB','GB','TB'],_0x4db9f9=0x400,_0x2f52c3=Math[_0x1410d6(0x182)](Math[_0x1410d6(0x16d)](_0x154238)/Math[_0x1410d6(0x16d)](_0x4db9f9)),_0x2d0305=_0x154238/Math[_0x1410d6(0x15c)](_0x4db9f9,_0x2f52c3),_0x5d186b=_0x2d0305>=0xa?0x1:0x2;return _0x2d0305['toFixed'](_0x5d186b)+'\x20'+_0x45dbe7[_0x2f52c3];}export function formatRows(_0x1105c1){const _0x61317=a95_0x370b;if(_0x1105c1==null)return'-';if(_0x1105c1===0x0)return'0';if(_0x1105c1<0x3e8)return _0x1105c1[_0x61317(0x178)]();const _0x145639=['','K','M','B','T'],_0x382823=0x3e8,_0x30ea84=Math[_0x61317(0x182)](Math[_0x61317(0x16d)](_0x1105c1)/Math[_0x61317(0x16d)](_0x382823)),_0x25b7aa=_0x1105c1/Math[_0x61317(0x15c)](_0x382823,_0x30ea84),_0x3fc061=_0x25b7aa>=0xa?0x1:0x2;return''+_0x25b7aa[_0x61317(0x174)](_0x3fc061)+_0x145639[_0x30ea84];}
|
|
1
|
+
(function(_0x45f593,_0x5d9b0e){const _0x3dfdb8=a95_0x57a5,_0x353026=_0x45f593();while(!![]){try{const _0xe52263=parseInt(_0x3dfdb8(0x1ea))/0x1+parseInt(_0x3dfdb8(0x1fd))/0x2+-parseInt(_0x3dfdb8(0x201))/0x3+-parseInt(_0x3dfdb8(0x1fb))/0x4*(-parseInt(_0x3dfdb8(0x1ed))/0x5)+-parseInt(_0x3dfdb8(0x20d))/0x6+-parseInt(_0x3dfdb8(0x1f8))/0x7+parseInt(_0x3dfdb8(0x1f9))/0x8*(parseInt(_0x3dfdb8(0x1f7))/0x9);if(_0xe52263===_0x5d9b0e)break;else _0x353026['push'](_0x353026['shift']());}catch(_0xeeb99b){_0x353026['push'](_0x353026['shift']());}}}(a95_0x1f07,0xd1b64));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 _0x5214fb=a95_0x57a5;return process[_0x5214fb(0x208)][_0x5214fb(0x211)]||Infinity;}export function formatAsTable(_0x3f4131,_0x159bbf=DEFAULT_MAX_DISPLAY_ROWS,_0x2c28a6=![],_0xc907b6={}){const _0x4b1d8f=a95_0x57a5;if(_0x3f4131[_0x4b1d8f(0x1ef)]['length']===0x0)return _0x4b1d8f(0x200);const _0x1eee47=_0x3f4131[_0x4b1d8f(0x211)]['map'](_0x2451be=>_0x2451be[_0x4b1d8f(0x1f2)]),_0x518a7d=_0x3f4131[_0x4b1d8f(0x211)]['map'](_0x535ab8=>simplifyType(_0x535ab8[_0x4b1d8f(0x1e3)])),_0x580fa5=_0x3f4131['data'][_0x4b1d8f(0x1fc)](0x0,_0x159bbf),_0x2d1d95=_0x3f4131['data'][_0x4b1d8f(0x1ee)],_0x9e97c5=_0x2d1d95>_0x159bbf,_0x291b96=[],_0x1611f3=getTerminalWidth(),_0x5b5a07=_0x1611f3!==Infinity,_0xf99dce=0x32;let _0x13bec5=_0x1eee47[_0x4b1d8f(0x1de)]((_0x57a709,_0x13d7d7)=>{const _0x4e26c6=_0x4b1d8f,_0x203372=stringWidth(_0x518a7d[_0x13d7d7]),_0x30c231=Math[_0x4e26c6(0x1f1)](..._0x580fa5[_0x4e26c6(0x1de)](_0x197af6=>{const _0x2f0234=_0x197af6[_0x57a709];return stringWidth(formatValue(_0x2f0234));})),_0x11b07a=Math['max'](stringWidth(_0x57a709),_0x203372,_0x30c231);return _0x2c28a6?_0x11b07a:Math[_0x4e26c6(0x206)](_0x11b07a,_0xf99dce);});if(_0x5b5a07&&!_0x2c28a6&&_0x1eee47['length']>0x0){const _0x4e4f48=_0x4cc603=>{let _0x19ef2e=0x1;for(const _0x425927 of _0x4cc603){_0x19ef2e+=_0x425927+0x3;}return _0x19ef2e+0x1;};let _0xa7c5c4=_0x4e4f48(_0x13bec5);if(_0xa7c5c4>_0x1611f3){const _0x1e87c5=0x3;for(let _0x5a3fd8=_0x13bec5[_0x4b1d8f(0x1ee)]-0x1;_0x5a3fd8>=0x0;_0x5a3fd8--){_0xa7c5c4=_0x4e4f48(_0x13bec5);if(_0xa7c5c4<=_0x1611f3)break;const _0x88a49c=_0x13bec5[_0x5a3fd8],_0x4ce5a2=_0xa7c5c4-_0x1611f3,_0x2f2776=_0x88a49c-_0x1e87c5,_0x5c6bbd=Math[_0x4b1d8f(0x206)](_0x4ce5a2,_0x2f2776);_0x5c6bbd>0x0&&(_0x13bec5[_0x5a3fd8]=_0x88a49c-_0x5c6bbd);}}}const _0x4846ad=_0x1eee47,_0x1609a1=_0x518a7d,_0x419570=_0x13bec5,_0x33f5b4=_0x13bec5;_0x291b96[_0x4b1d8f(0x209)](colorBorder('┌'+_0x33f5b4[_0x4b1d8f(0x1de)](_0x55cb7e=>'─'[_0x4b1d8f(0x20b)](_0x55cb7e+0x2))[_0x4b1d8f(0x1e5)]('┬')+'┐',_0xc907b6));const _0x3746b2=_0x4846ad[_0x4b1d8f(0x1de)]((_0x8cb66f,_0x3bd55e)=>centerAlign(_0x8cb66f,_0x419570[_0x3bd55e]));_0x291b96[_0x4b1d8f(0x209)](colorBorder('│',_0xc907b6)+'\x20'+_0x3746b2['join']('\x20'+colorBorder('│',_0xc907b6)+'\x20')+'\x20'+colorBorder('│',_0xc907b6));const _0x5ecde4=_0x1609a1[_0x4b1d8f(0x1de)]((_0x22ed58,_0x2a123d)=>colorType(centerAlign(_0x22ed58,_0x419570[_0x2a123d]),_0xc907b6));_0x291b96[_0x4b1d8f(0x209)](colorBorder('│',_0xc907b6)+'\x20'+_0x5ecde4[_0x4b1d8f(0x1e5)]('\x20'+colorBorder('│',_0xc907b6)+'\x20')+'\x20'+colorBorder('│',_0xc907b6)),_0x291b96[_0x4b1d8f(0x209)](colorBorder('├'+_0x33f5b4[_0x4b1d8f(0x1de)](_0x5f4e03=>'─'[_0x4b1d8f(0x20b)](_0x5f4e03+0x2))[_0x4b1d8f(0x1e5)]('┼')+'┤',_0xc907b6));const _0xea3d42=(_0x2adf5b,_0x3bd978)=>{const _0x1a4c34=_0x4b1d8f,_0x4c5389=stringWidth(_0x2adf5b);if(_0x4c5389<=_0x3bd978)return _0x2adf5b;let _0x2feef6=_0x2adf5b;while(stringWidth(_0x2feef6+'…')>_0x3bd978&&_0x2feef6[_0x1a4c34(0x1ee)]>0x0){_0x2feef6=_0x2feef6['slice'](0x0,-0x1);}return _0x2feef6+'…';};_0x580fa5[_0x4b1d8f(0x203)](_0x3b19c8=>{const _0x2afeeb=_0x4b1d8f,_0x2b2c26=_0x1eee47[_0x2afeeb(0x1de)]((_0x1a45cb,_0x380bbf)=>{const _0x4ce84c=_0x2afeeb,_0x2942c9=_0x3b19c8[_0x1a45cb],_0x465b6b=formatValue(_0x2942c9),_0x2671c9=_0x419570[_0x380bbf],_0x490aa7=_0xea3d42(_0x465b6b,_0x2671c9),_0x3becdd=typeof _0x2942c9==='number'||typeof _0x2942c9===_0x4ce84c(0x1f6)&&/^-?\d+$/[_0x4ce84c(0x1d9)](_0x2942c9);return _0x3becdd?padStart(_0x490aa7,_0x2671c9):padEnd(_0x490aa7,_0x2671c9);});_0x291b96['push'](colorBorder('│',_0xc907b6)+'\x20'+_0x2b2c26[_0x2afeeb(0x1e5)]('\x20'+colorBorder('│',_0xc907b6)+'\x20')+'\x20'+colorBorder('│',_0xc907b6));});const _0x302fea=_0x33f5b4[_0x4b1d8f(0x1dd)]((_0x5df0bb,_0x39bc9a)=>_0x5df0bb+_0x39bc9a+0x3,-0x1);_0x291b96[_0x4b1d8f(0x209)](colorBorder('├'+_0x33f5b4['map'](_0x355539=>'─'[_0x4b1d8f(0x20b)](_0x355539+0x2))[_0x4b1d8f(0x1e5)]('┴')+'┤',_0xc907b6));let _0x1dc0ab;_0x9e97c5?_0x1dc0ab=_0x2d1d95+_0x4b1d8f(0x1f3)+_0x159bbf+_0x4b1d8f(0x1f0):_0x1dc0ab=_0x2d1d95+_0x4b1d8f(0x1e8)+(_0x2d1d95===0x1?'':'s');const _0x3245ad=_0x1dc0ab[_0x4b1d8f(0x1f4)](_0x302fea-0x2);return _0x291b96['push'](colorBorder('│',_0xc907b6)+'\x20'+_0x3245ad+'\x20'+colorBorder('│',_0xc907b6)),_0x291b96[_0x4b1d8f(0x209)](colorBorder('└'+'─'[_0x4b1d8f(0x20b)](_0x302fea)+'┘',_0xc907b6)),_0x291b96['join']('\x0a');}function simplifyType(_0x2b9b49){const _0x12ee7d=a95_0x57a5,_0x559068={'varchar':_0x12ee7d(0x1f6),'bigint':_0x12ee7d(0x1e0),'integer':_0x12ee7d(0x207),'double':_0x12ee7d(0x20c),'boolean':_0x12ee7d(0x1e1),'date':_0x12ee7d(0x1e2),'timestamp':_0x12ee7d(0x205),'array':'array','map':_0x12ee7d(0x1de),'row':_0x12ee7d(0x1e7)},_0x7dfde9=_0x2b9b49[_0x12ee7d(0x1f5)]();for(const [_0x1664c3,_0x3a01fe]of Object[_0x12ee7d(0x204)](_0x559068)){if(_0x7dfde9[_0x12ee7d(0x20e)](_0x1664c3))return _0x3a01fe;}return _0x2b9b49[_0x12ee7d(0x1ee)]>0xa?_0x2b9b49[_0x12ee7d(0x1e4)](0x0,0xa):_0x2b9b49;}export function formatAsJSON(_0xb34da0,_0x5a2acb={}){const _0x40c997=a95_0x57a5;if(_0xb34da0[_0x40c997(0x1ef)][_0x40c997(0x1ee)]===0x0)return'[]';if(shouldUseColor(_0x5a2acb))return colorizeJSON(_0xb34da0[_0x40c997(0x1ef)],_0x5a2acb);const _0x41e4c2=_0xb34da0[_0x40c997(0x1ef)][_0x40c997(0x1de)](_0xa54174=>'\x20\x20'+JSON[_0x40c997(0x202)](_0xa54174));return'[\x0a'+_0x41e4c2[_0x40c997(0x1e5)](',\x0a')+'\x0a]';}function a95_0x57a5(_0x1ec234,_0x2e7f6b){_0x1ec234=_0x1ec234-0x1d8;const _0x1f07ba=a95_0x1f07();let _0x57a526=_0x1f07ba[_0x1ec234];return _0x57a526;}export function formatAsJSONL(_0x283ce4,_0x411a10={}){const _0x58a060=a95_0x57a5;if(_0x283ce4['data'][_0x58a060(0x1ee)]===0x0)return'';if(shouldUseColor(_0x411a10))return _0x283ce4[_0x58a060(0x1ef)][_0x58a060(0x1de)](_0x4a2b87=>colorizeJSONCompact(_0x4a2b87,_0x411a10))[_0x58a060(0x1e5)]('\x0a');return _0x283ce4[_0x58a060(0x1ef)][_0x58a060(0x1de)](_0x428692=>JSON[_0x58a060(0x202)](_0x428692))[_0x58a060(0x1e5)]('\x0a');}export function formatAsTSV(_0x522d71){const _0x551722=a95_0x57a5;if(_0x522d71[_0x551722(0x1ef)][_0x551722(0x1ee)]===0x0)return'';const _0x3b71fc=[],_0x38573d=_0x522d71[_0x551722(0x211)][_0x551722(0x1de)](_0x4d58c7=>_0x4d58c7['name']);return _0x3b71fc[_0x551722(0x209)](_0x38573d[_0x551722(0x1e5)]('\x09')),_0x522d71[_0x551722(0x1ef)][_0x551722(0x203)](_0x565547=>{const _0x348e70=_0x551722,_0x4dea34=_0x38573d[_0x348e70(0x1de)](_0xb16da8=>{const _0x24bb61=_0x565547[_0xb16da8];return formatValueForTSV(_0x24bb61);});_0x3b71fc[_0x348e70(0x209)](_0x4dea34[_0x348e70(0x1e5)]('\x09'));}),_0x3b71fc['join']('\x0a');}function formatValue(_0x111e63){const _0x19bc85=a95_0x57a5;if(_0x111e63===null||_0x111e63===undefined)return'';if(typeof _0x111e63==='string'){const _0x39db10=_0x111e63[_0x19bc85(0x1da)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x19bc85(0x1da)](/\t/g,'\x5ct');return _0x39db10;}if(typeof _0x111e63===_0x19bc85(0x1ff))return String(_0x111e63);if(typeof _0x111e63===_0x19bc85(0x1fe))return _0x111e63?'true':_0x19bc85(0x20f);if(_0x111e63 instanceof Date)return _0x111e63[_0x19bc85(0x1e9)]();if(typeof _0x111e63==='object')return JSON[_0x19bc85(0x202)](_0x111e63);return String(_0x111e63);}function formatValueForTSV(_0x547a69){const _0x3f48e6=a95_0x57a5;if(_0x547a69===null||_0x547a69===undefined)return'';if(typeof _0x547a69===_0x3f48e6(0x1f6))return _0x547a69['replace'](/\t/g,'\x5ct')[_0x3f48e6(0x1da)](/\n/g,'\x5cn');if(typeof _0x547a69===_0x3f48e6(0x1ff)||typeof _0x547a69==='boolean')return String(_0x547a69);if(_0x547a69 instanceof Date)return _0x547a69['toISOString']();if(typeof _0x547a69===_0x3f48e6(0x1df))return JSON[_0x3f48e6(0x202)](_0x547a69);return String(_0x547a69);}export function formatQueryResult(_0x128dfa,_0x50dca5){const _0x25de9c=a95_0x57a5;switch(_0x50dca5){case _0x25de9c(0x1eb):return formatAsTable(_0x128dfa);case _0x25de9c(0x1db):return formatAsJSON(_0x128dfa);case _0x25de9c(0x1ec):return formatAsJSONL(_0x128dfa);case _0x25de9c(0x210):return formatAsTSV(_0x128dfa);default:return formatAsJSON(_0x128dfa);}}export function formatBytes(_0x5a0e7e){const _0x2cedb7=a95_0x57a5;if(_0x5a0e7e===0x0)return'0\x20B';const _0x40d100=['B','KB','MB','GB','TB'],_0xceb716=0x400,_0x668d51=Math['floor'](Math[_0x2cedb7(0x1e6)](_0x5a0e7e)/Math['log'](_0xceb716)),_0x59ec9e=_0x5a0e7e/Math[_0x2cedb7(0x20a)](_0xceb716,_0x668d51),_0xb77ef8=_0x59ec9e>=0xa?0x1:0x2;return _0x59ec9e[_0x2cedb7(0x1fa)](_0xb77ef8)+'\x20'+_0x40d100[_0x668d51];}function a95_0x1f07(){const _0x2affcf=['length','data','\x20shown)','max','name','\x20rows\x20(','padEnd','toLowerCase','string','9WmOMMM','4053266MXwOdF','998024OSoHeu','toFixed','6052144ZwLIOd','slice','1448400IyEDja','boolean','number','No\x20rows\x20returned','4540080tDJTye','stringify','forEach','entries','timestamp','min','int','stdout','push','pow','repeat','double','5202630NhNLYU','startsWith','false','tsv','columns','toString','test','replace','json','floor','reduce','map','object','long','bool','date','type','substring','join','log','row','\x20row','toISOString','1456494WyymaD','table','jsonl','5OIZDKT'];a95_0x1f07=function(){return _0x2affcf;};return a95_0x1f07();}export function formatRows(_0x456ed0){const _0x29ad71=a95_0x57a5;if(_0x456ed0==null)return'-';if(_0x456ed0===0x0)return'0';if(_0x456ed0<0x3e8)return _0x456ed0[_0x29ad71(0x1d8)]();const _0x1eb6f6=['','K','M','B','T'],_0x4bcd19=0x3e8,_0x1f5b33=Math[_0x29ad71(0x1dc)](Math[_0x29ad71(0x1e6)](_0x456ed0)/Math[_0x29ad71(0x1e6)](_0x4bcd19)),_0x582884=_0x456ed0/Math[_0x29ad71(0x20a)](_0x4bcd19,_0x1f5b33),_0x52cbbf=_0x582884>=0xa?0x1:0x2;return''+_0x582884['toFixed'](_0x52cbbf)+_0x1eb6f6[_0x1f5b33];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a96_0x59d0(){const _0x45f9f7=['2426600zOIXLb','ENOENT','933369QZCBHI','PERMISSION_DENIED','296pCjmRB','725000mSvwYg','EACCES','6486oDZDZl','\x27:\x20','1074042KfkoOB','153YXzlWE','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','message','4370597wOwypw','parse','File\x20not\x20found:\x20','INVALID_ARGUMENT','code','NOT_FOUND','Invalid\x20JSON\x20string:\x20','Invalid\x20JSON\x20in\x20file\x20\x27','5398086zJWaJw'];a96_0x59d0=function(){return _0x45f9f7;};return a96_0x59d0();}function a96_0x37b3(_0xd92099,_0x515612){_0xd92099=_0xd92099-0x19a;const _0x59d03f=a96_0x59d0();let _0x37b34c=_0x59d03f[_0xd92099];return _0x37b34c;}(function(_0x52a859,_0xb501e7){const _0x270bda=a96_0x37b3,_0x2efb48=_0x52a859();while(!![]){try{const _0x367ef6=parseInt(_0x270bda(0x1a0))/0x1+parseInt(_0x270bda(0x1a7))/0x2+parseInt(_0x270bda(0x1a5))/0x3*(-parseInt(_0x270bda(0x1a2))/0x4)+parseInt(_0x270bda(0x19e))/0x5+parseInt(_0x270bda(0x19d))/0x6+-parseInt(_0x270bda(0x1ab))/0x7+-parseInt(_0x270bda(0x1a3))/0x8*(parseInt(_0x270bda(0x1a8))/0x9);if(_0x367ef6===_0xb501e7)break;else _0x2efb48['push'](_0x2efb48['shift']());}catch(_0x273bec){_0x2efb48['push'](_0x2efb48['shift']());}}}(a96_0x59d0,0x817e7));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x1d3664,_0x68bda4){const _0x1881b8=a96_0x37b3;try{if(_0x68bda4){const _0x4206ec=await readFile(_0x1d3664,'utf-8');try{return JSON['parse'](_0x4206ec);}catch(_0x8d6f37){throw new SDKError(ErrorCode[_0x1881b8(0x1ae)],_0x1881b8(0x19c)+_0x1d3664+_0x1881b8(0x1a6)+(_0x8d6f37 instanceof Error?_0x8d6f37[_0x1881b8(0x1aa)]:String(_0x8d6f37)));}}else try{return JSON[_0x1881b8(0x1ac)](_0x1d3664);}catch(_0x307f2e){throw new SDKError(ErrorCode[_0x1881b8(0x1ae)],_0x1881b8(0x19b)+(_0x307f2e instanceof Error?_0x307f2e[_0x1881b8(0x1aa)]:String(_0x307f2e)));}}catch(_0xeded0e){if(_0xeded0e instanceof SDKError)throw _0xeded0e;if(_0xeded0e instanceof Error&&_0x1881b8(0x1af)in _0xeded0e){const _0x574b0d=_0xeded0e;if(_0x574b0d[_0x1881b8(0x1af)]===_0x1881b8(0x19f))throw new SDKError(ErrorCode[_0x1881b8(0x19a)],_0x1881b8(0x1ad)+_0x1d3664);else{if(_0x574b0d[_0x1881b8(0x1af)]===_0x1881b8(0x1a4))throw new SDKError(ErrorCode[_0x1881b8(0x1a1)],'Permission\x20denied\x20reading\x20file:\x20'+_0x1d3664);}}throw new SDKError(ErrorCode['INTERNAL'],'Failed\x20to\x20load\x20JSON:\x20'+(_0xeded0e instanceof Error?_0xeded0e[_0x1881b8(0x1aa)]:String(_0xeded0e)));}}export async function loadJSONFromOptions(_0x2e115c,_0xb42380){const _0x343d59=a96_0x37b3;if(_0x2e115c&&_0xb42380)throw new SDKError(ErrorCode[_0x343d59(0x1ae)],_0x343d59(0x1a9));if(_0x2e115c)return await loadJSON(_0x2e115c,![]);if(_0xb42380)return await loadJSON(_0xb42380,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1f1336,_0x2281ad){const _0x5912da=a97_0x24c6,_0x2dbf06=_0x1f1336();while(!![]){try{const _0x4dc390=parseInt(_0x5912da(0x8e))/0x1*(parseInt(_0x5912da(0x91))/0x2)+-parseInt(_0x5912da(0x90))/0x3+-parseInt(_0x5912da(0x9c))/0x4+parseInt(_0x5912da(0x9d))/0x5*(-parseInt(_0x5912da(0x9b))/0x6)+parseInt(_0x5912da(0x93))/0x7+parseInt(_0x5912da(0x94))/0x8*(parseInt(_0x5912da(0x99))/0x9)+parseInt(_0x5912da(0x8d))/0xa*(parseInt(_0x5912da(0x92))/0xb);if(_0x4dc390===_0x2281ad)break;else _0x2dbf06['push'](_0x2dbf06['shift']());}catch(_0xbaa0d1){_0x2dbf06['push'](_0x2dbf06['shift']());}}}(a97_0x185d,0x261b7));export function canCreateAgent(_0x3e8bb6,_0x3b010d){const _0x4e8ffb=a97_0x24c6;for(const _0x14b776 of _0x3e8bb6['attributes'][_0x4e8ffb(0x96)]){if(_0x14b776[_0x4e8ffb(0x97)]&&!_0x3b010d['has'](_0x14b776['targetAgentId']))return![];}return!![];}function a97_0x24c6(_0x3ddb1e,_0x49bbb7){_0x3ddb1e=_0x3ddb1e-0x8d;const _0x185d20=a97_0x185d();let _0x24c67a=_0x185d20[_0x3ddb1e];return _0x24c67a;}export function remapToolIds(_0x542c86,_0x50949e,_0x258019){const _0x29412a=a97_0x24c6;return _0x542c86[_0x29412a(0x8f)](_0x36d217=>({..._0x36d217,'targetKnowledgeBaseId':_0x36d217[_0x29412a(0x95)]?_0x50949e[_0x29412a(0x98)](_0x36d217[_0x29412a(0x95)])||_0x36d217[_0x29412a(0x95)]:undefined,'targetAgentId':_0x36d217[_0x29412a(0x97)]?_0x258019[_0x29412a(0x98)](_0x36d217[_0x29412a(0x97)])||_0x36d217[_0x29412a(0x97)]:undefined}));}export function remapVariableIds(_0x2cede5,_0x104356){const _0x24f160=a97_0x24c6;return _0x2cede5[_0x24f160(0x8f)](_0xd90c93=>({..._0xd90c93,'targetKnowledgeBaseId':_0x104356[_0x24f160(0x98)](_0xd90c93[_0x24f160(0x95)])||_0xd90c93[_0x24f160(0x95)]}));}function a97_0x185d(){const _0x37d55a=['11620DPRKqe','671AhgQqd','424809SlQcAw','8EeUmhy','targetKnowledgeBaseId','tools','targetAgentId','get','1932273JIWMTN','1.0','6MyxEpG','723804pnAIWI','131855NryDbx','34010eMNFTX','18kBhxmN','map','672048bFLWjB'];a97_0x185d=function(){return _0x37d55a;};return a97_0x185d();}export function isSupportedBackupVersion(_0x1cb481){const _0x46ce4c=a97_0x24c6;return _0x1cb481===_0x46ce4c(0x9a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0x5c9c(_0x4d9c68,_0x1325a5){_0x4d9c68=_0x4d9c68-0x128;const _0x388a2b=a98_0x388a();let _0x5c9cbd=_0x388a2b[_0x4d9c68];return _0x5c9cbd;}const a98_0x8e2da1=a98_0x5c9c;function a98_0x388a(){const _0x16ce25=['2290PsxUoK','3lSkTCx','toLowerCase','match','3031wczfED','932868OeuTew','29358fekmee','46323znhOPd','5172CDeHEP','2428360fnFUVr','394693CQugMa','claude-4.5-haiku','claude-4.5-sonnet','983555CYJnMB'];a98_0x388a=function(){return _0x16ce25;};return a98_0x388a();}(function(_0xe4db94,_0x4caf0e){const _0x5063ca=a98_0x5c9c,_0x33fd97=_0xe4db94();while(!![]){try{const _0x27d04b=-parseInt(_0x5063ca(0x12b))/0x1+parseInt(_0x5063ca(0x135))/0x2+parseInt(_0x5063ca(0x130))/0x3*(-parseInt(_0x5063ca(0x134))/0x4)+-parseInt(_0x5063ca(0x12e))/0x5+-parseInt(_0x5063ca(0x129))/0x6*(parseInt(_0x5063ca(0x133))/0x7)+parseInt(_0x5063ca(0x12a))/0x8+-parseInt(_0x5063ca(0x128))/0x9*(-parseInt(_0x5063ca(0x12f))/0xa);if(_0x27d04b===_0x4caf0e)break;else _0x33fd97['push'](_0x33fd97['shift']());}catch(_0x1df619){_0x33fd97['push'](_0x33fd97['shift']());}}}(a98_0x388a,0x4900c));const MODEL_ALIASES={'haiku':a98_0x8e2da1(0x12c),'sonnet':a98_0x8e2da1(0x12d)};export function extractModelAlias(_0x44942d){const _0x350157=a98_0x8e2da1,_0x1930d5=_0x44942d[_0x350157(0x132)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x1930d5)return _0x1930d5[0x1][_0x350157(0x131)]();return _0x44942d;}export function resolveModelAlias(_0x164d49){return MODEL_ALIASES[_0x164d49['toLowerCase']()]||_0x164d49;}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x521ca2,_0x5bb8a7){const _0x4125e4=a99_0x293c,_0x4df880=_0x521ca2();while(!![]){try{const _0x39c7e4=-parseInt(_0x4125e4(0xdb))/0x1+-parseInt(_0x4125e4(0xe5))/0x2+-parseInt(_0x4125e4(0xdc))/0x3*(-parseInt(_0x4125e4(0xe0))/0x4)+parseInt(_0x4125e4(0xee))/0x5*(parseInt(_0x4125e4(0xd7))/0x6)+-parseInt(_0x4125e4(0xd8))/0x7+parseInt(_0x4125e4(0xe9))/0x8*(parseInt(_0x4125e4(0xe1))/0x9)+parseInt(_0x4125e4(0xda))/0xa*(parseInt(_0x4125e4(0xe3))/0xb);if(_0x39c7e4===_0x5bb8a7)break;else _0x4df880['push'](_0x4df880['shift']());}catch(_0x1fbfae){_0x4df880['push'](_0x4df880['shift']());}}}(a99_0x2f6d,0x4df9b));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x181105){const _0x55ebc0=a99_0x293c,_0xa8d4d6=_0x181105[_0x55ebc0(0xd9)]();if(MODEL_FACTORS[_0xa8d4d6])return MODEL_FACTORS[_0xa8d4d6];if(_0xa8d4d6[_0x55ebc0(0xe4)](_0x55ebc0(0xeb)))return MODEL_FACTORS[_0x55ebc0(0xeb)];if(_0xa8d4d6[_0x55ebc0(0xe4)](_0x55ebc0(0xe7)))return MODEL_FACTORS['haiku'];if(_0xa8d4d6[_0x55ebc0(0xe4)]('opus'))return MODEL_FACTORS[_0x55ebc0(0xe2)];return MODEL_FACTORS[_0x55ebc0(0xeb)];}export function getContextLimit(_0x26f0a4){const _0x3ea101=a99_0x293c,_0x557671=_0x26f0a4[_0x3ea101(0xd9)]();if(_0x557671['includes'](_0x3ea101(0xeb)))return CONTEXT_LIMITS[_0x3ea101(0xeb)];if(_0x557671['includes'](_0x3ea101(0xe7)))return CONTEXT_LIMITS[_0x3ea101(0xe7)];if(_0x557671[_0x3ea101(0xe4)](_0x3ea101(0xe2)))return CONTEXT_LIMITS[_0x3ea101(0xe2)];return CONTEXT_LIMITS[_0x3ea101(0xe6)];}function a99_0x2f6d(){const _0x191281=['957442tyhUFd','default','haiku','Opus\x204','1384xgPiZm','4-5','sonnet','en-US','Opus\x204.5','5BVHlVa','4.5','Haiku\x204.5','347034OWKQiD','1290625Aldbbn','toLowerCase','6070cOYklv','228496LjdzCt','3ksGKjB','Sonnet\x204.5','round','Claude','1858172pmxOAf','23697DbvHlu','opus','4224kHTDNI','includes'];a99_0x2f6d=function(){return _0x191281;};return a99_0x2f6d();}function a99_0x293c(_0x12a5d8,_0x30ec08){_0x12a5d8=_0x12a5d8-0xd6;const _0x2f6d63=a99_0x2f6d();let _0x293c57=_0x2f6d63[_0x12a5d8];return _0x293c57;}export function calculateChatUnit(_0xdd2c6f,_0x4b08bd,_0x5c13a1){return(_0xdd2c6f+_0x4b08bd)/0x1388*_0x5c13a1;}export function calculateCredits(_0x2dd457){return _0x2dd457/0x2904;}export function getModelDisplayName(_0x14f1d5){const _0x3955a2=a99_0x293c,_0x462250=_0x14f1d5['toLowerCase']();if(_0x462250[_0x3955a2(0xe4)]('sonnet')){if(_0x462250[_0x3955a2(0xe4)](_0x3955a2(0xea))||_0x462250[_0x3955a2(0xe4)]('4.5'))return _0x3955a2(0xdd);return'Sonnet\x204';}if(_0x462250[_0x3955a2(0xe4)](_0x3955a2(0xe7))){if(_0x462250['includes'](_0x3955a2(0xea))||_0x462250['includes'](_0x3955a2(0xef)))return _0x3955a2(0xd6);return'Haiku\x204';}if(_0x462250[_0x3955a2(0xe4)](_0x3955a2(0xe2))){if(_0x462250['includes'](_0x3955a2(0xea))||_0x462250['includes'](_0x3955a2(0xef)))return _0x3955a2(0xed);return _0x3955a2(0xe8);}return _0x3955a2(0xdf);}export function formatTokenCount(_0x289903){const _0x52c624=a99_0x293c;return _0x289903['toLocaleString'](_0x52c624(0xec));}export function calculateContextPercentage(_0x6f5bb8,_0x450fac){const _0x12a71f=a99_0x293c,_0x484bc4=getContextLimit(_0x450fac);return Math[_0x12a71f(0xde)](_0x6f5bb8/_0x484bc4*0x64);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f518e,_0xf9d55f){const _0x3603a2=a100_0x33aa,_0x46d202=_0x3f518e();while(!![]){try{const _0x5300e9=parseInt(_0x3603a2(0x128))/0x1+-parseInt(_0x3603a2(0x11c))/0x2+-parseInt(_0x3603a2(0x120))/0x3+-parseInt(_0x3603a2(0x119))/0x4*(-parseInt(_0x3603a2(0x123))/0x5)+-parseInt(_0x3603a2(0x124))/0x6*(-parseInt(_0x3603a2(0x11e))/0x7)+-parseInt(_0x3603a2(0x129))/0x8*(parseInt(_0x3603a2(0x127))/0x9)+-parseInt(_0x3603a2(0x122))/0xa*(-parseInt(_0x3603a2(0x11d))/0xb);if(_0x5300e9===_0xf9d55f)break;else _0x46d202['push'](_0x46d202['shift']());}catch(_0x1a46d6){_0x46d202['push'](_0x46d202['shift']());}}}(a100_0x1f4d,0x71f32));export function validateLimitOption(_0x141aab){const _0x2b08de=a100_0x33aa;if(!Number['isInteger'](_0x141aab))return{'isValid':![],'error':_0x2b08de(0x11f)+_0x141aab+_0x2b08de(0x11b)};if(_0x141aab<=0x0)return{'isValid':![],'error':_0x2b08de(0x11f)+_0x141aab+_0x2b08de(0x121)};return{'isValid':!![],'value':_0x141aab};}function a100_0x33aa(_0x119847,_0x2972b6){_0x119847=_0x119847-0x119;const _0x1f4d26=a100_0x1f4d();let _0x33aab6=_0x1f4d26[_0x119847];return _0x33aab6;}export function validateTimeoutOption(_0x2794a9,_0x44ff66=0x1e){const _0xfc8c15=a100_0x33aa;if(_0x2794a9===undefined)return{'isValid':!![],'value':_0x44ff66};const _0x235043=typeof _0x2794a9==='number'?_0x2794a9:parseFloat(_0x2794a9);if(isNaN(_0x235043))return{'isValid':![],'error':_0xfc8c15(0x126)+_0x2794a9+_0xfc8c15(0x125)};if(_0x235043<=0x0)return{'isValid':![],'error':_0xfc8c15(0x126)+_0x235043+_0xfc8c15(0x11a)};return{'isValid':!![],'value':_0x235043};}function a100_0x1f4d(){const _0x2080e9=['60683RFvHON','Invalid\x20limit\x20value:\x20','2662890bOyALM','.\x20Must\x20be\x20a\x20positive\x20integer.','790iNRnMk','1015zDJMuz','366otdMpZ','.\x20Must\x20be\x20a\x20number.','Invalid\x20timeout\x20value:\x20','63FPBaTG','77343zkOONZ','496328RoZDTT','6784YwwjuV','.\x20Must\x20be\x20a\x20positive\x20number.','.\x20Must\x20be\x20an\x20integer.','1372812hETeLz','212289KMLpor'];a100_0x1f4d=function(){return _0x2080e9;};return a100_0x1f4d();}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31cdfe,_0x523be8){const _0x159202=a101_0x314e,_0x12c6a2=_0x31cdfe();while(!![]){try{const _0x3e9a32=parseInt(_0x159202(0x13f))/0x1*(-parseInt(_0x159202(0x14d))/0x2)+-parseInt(_0x159202(0x13c))/0x3+parseInt(_0x159202(0x14b))/0x4*(-parseInt(_0x159202(0x13d))/0x5)+-parseInt(_0x159202(0x142))/0x6+-parseInt(_0x159202(0x145))/0x7+parseInt(_0x159202(0x144))/0x8*(-parseInt(_0x159202(0x141))/0x9)+parseInt(_0x159202(0x146))/0xa*(parseInt(_0x159202(0x140))/0xb);if(_0x3e9a32===_0x523be8)break;else _0x12c6a2['push'](_0x12c6a2['shift']());}catch(_0x4028ba){_0x12c6a2['push'](_0x12c6a2['shift']());}}}(a101_0x413e,0x5440f));function a101_0x314e(_0x3bd9aa,_0x5313b7){_0x3bd9aa=_0x3bd9aa-0x13c;const _0x413e02=a101_0x413e();let _0x314eba=_0x413e02[_0x3bd9aa];return _0x314eba;}import{createServer}from'node:net';function a101_0x413e(){const _0xc63860=['once','56RTaTyk','code','170YNSleb','273513MpCiKz','218070QztJQU','\x20and\x20','3461dEAZki','121iRVsfx','258858GOBapx','2370294cjpqoh','0.0.0.0','32zFzQug','3587619PTYuvq','2148790gjDyet','error','EADDRINUSE','listen'];a101_0x413e=function(){return _0xc63860;};return a101_0x413e();}export async function isPortAvailable(_0x143fb0){return new Promise(_0x18e60d=>{const _0x2ab8ab=a101_0x314e,_0x5baf6d=createServer();_0x5baf6d[_0x2ab8ab(0x14a)](_0x2ab8ab(0x147),_0x409c1c=>{const _0x7a9b08=_0x2ab8ab;_0x409c1c[_0x7a9b08(0x14c)]===_0x7a9b08(0x148)?_0x18e60d(![]):_0x18e60d(![]);}),_0x5baf6d[_0x2ab8ab(0x14a)]('listening',()=>{_0x5baf6d['close'](),_0x18e60d(!![]);}),_0x5baf6d[_0x2ab8ab(0x149)](_0x143fb0,_0x2ab8ab(0x143));});}export async function findAvailablePort(_0x3ab259=0xfa0,_0x4ae611=0x64){const _0x292093=a101_0x314e;for(let _0x4dc424=0x0;_0x4dc424<_0x4ae611;_0x4dc424++){const _0x1d6116=_0x3ab259+_0x4dc424;if(await isPortAvailable(_0x1d6116))return _0x1d6116;}throw new Error('No\x20available\x20port\x20found\x20between\x20'+_0x3ab259+_0x292093(0x13e)+(_0x3ab259+_0x4ae611-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x794313=a102_0x5998;(function(_0x3a8c88,_0x131ef9){const _0x1e7e09=a102_0x5998,_0x44df07=_0x3a8c88();while(!![]){try{const _0xb4316d=-parseInt(_0x1e7e09(0x109))/0x1*(-parseInt(_0x1e7e09(0xf8))/0x2)+-parseInt(_0x1e7e09(0x101))/0x3+parseInt(_0x1e7e09(0xe6))/0x4+parseInt(_0x1e7e09(0xe5))/0x5+-parseInt(_0x1e7e09(0xf0))/0x6+parseInt(_0x1e7e09(0xf6))/0x7+-parseInt(_0x1e7e09(0x102))/0x8;if(_0xb4316d===_0x131ef9)break;else _0x44df07['push'](_0x44df07['shift']());}catch(_0x13900a){_0x44df07['push'](_0x44df07['shift']());}}}(a102_0x1e23,0x273ce));import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a102_0x794313(0xec),a102_0x794313(0x106),'sh',a102_0x794313(0xfb),a102_0x794313(0xe1),a102_0x794313(0xe8),a102_0x794313(0xf3),a102_0x794313(0x10e),a102_0x794313(0x108),'powershell','nu','ion',a102_0x794313(0xf4),a102_0x794313(0x10c)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a102_0x794313(0x103),a102_0x794313(0xfe),a102_0x794313(0xf2)]);function a102_0x5998(_0x29c6ea,_0x4b556e){_0x29c6ea=_0x29c6ea-0xe1;const _0x1e23c2=a102_0x1e23();let _0x599850=_0x1e23c2[_0x29c6ea];return _0x599850;}function getProcessInfoWindows(_0x1e41f4){const _0x59f4f3=a102_0x794313;try{const _0x4c8dd3=execSync('wmic\x20process\x20where\x20ProcessId='+_0x1e41f4+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':_0x59f4f3(0xe4),'windowsHide':!![]})[_0x59f4f3(0xe7)](),_0x54e3e1=_0x4c8dd3['split']('\x0a')[_0x59f4f3(0xf5)](_0xdbb05e=>_0xdbb05e['trim']());if(_0x54e3e1[_0x59f4f3(0x105)]<0x2)return null;const _0x549ee0=_0x54e3e1[_0x54e3e1[_0x59f4f3(0x105)]-0x1][_0x59f4f3(0xfd)](',');if(_0x549ee0[_0x59f4f3(0x105)]<0x3)return null;const _0x5b760d=_0x549ee0[0x1]?.['trim']()||'',_0x4ff84c=parseInt(_0x549ee0[0x2]?.[_0x59f4f3(0xe7)]()||'0',0xa);if(isNaN(_0x4ff84c)||!_0x5b760d)return null;return{'pid':_0x1e41f4,'ppid':_0x4ff84c,'comm':_0x5b760d['replace'](/\.exe$/i,'')};}catch(_0x54051e){return process[_0x59f4f3(0x110)][_0x59f4f3(0x10d)]&&console[_0x59f4f3(0xf1)](_0x59f4f3(0xfa)+_0x1e41f4+_0x59f4f3(0xef),_0x54051e),null;}}function getProcessInfoPosix(_0xdafb68){const _0x1c4caf=a102_0x794313;try{const _0x4197f9=execSync(_0x1c4caf(0xfc)+_0xdafb68+_0x1c4caf(0xff),{'encoding':_0x1c4caf(0xe4)})[_0x1c4caf(0xe7)](),[_0x5a922f,..._0x16fba6]=_0x4197f9[_0x1c4caf(0xfd)](/\s+/),_0x324a56=parseInt(_0x5a922f,0xa),_0x3d9f44=_0x16fba6[_0x1c4caf(0x111)]('\x20');if(isNaN(_0x324a56))return null;return{'pid':_0xdafb68,'ppid':_0x324a56,'comm':_0x3d9f44};}catch(_0x3be435){return process[_0x1c4caf(0x110)]['DEBUG']&&console['error'](_0x1c4caf(0xfa)+_0xdafb68+_0x1c4caf(0xe9),_0x3be435),null;}}function getProcessInfo(_0x2f2ee5){const _0x25efed=a102_0x794313;if(process[_0x25efed(0xf7)]===_0x25efed(0xe2))return getProcessInfoWindows(_0x2f2ee5);return getProcessInfoPosix(_0x2f2ee5);}function getBasename(_0x23890e){const _0xc5f907=a102_0x794313;return _0x23890e[_0xc5f907(0x107)](/^-/,'')[_0xc5f907(0xfd)]('/')[_0xc5f907(0xee)]()?.['toLowerCase']()||'';}function a102_0x1e23(){const _0x46bbdc=['pop','\x20on\x20Windows:','1787682HUyOGy','error','cursor','csh','elvish','filter','888020mHOVuH','platform','50GTXGWp','pid','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','fish','ps\x20-p\x20','split','code','\x20-o\x20ppid=,comm=','Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20','64500diKLOB','1304000hMEpfR','claude',',\x20continuing\x20up','length','zsh','replace','pwsh','11667sCafyF',',\x20using\x20fallback','ppid','xonsh','DEBUG','dash','comm','env','join','ksh','win32','has','utf-8','503455avGSYm','495756UPJyxu','trim','tcsh','\x20on\x20POSIX:',')\x20spawned\x20by\x20','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','bash','kill'];a102_0x1e23=function(){return _0x46bbdc;};return a102_0x1e23();}function isShell(_0x58cfff){const _0x4bffb6=a102_0x794313;return SHELL_NAMES[_0x4bffb6(0xe3)](getBasename(_0x58cfff));}function isEphemeralShellSpawner(_0x3172e4){const _0x44a8c7=a102_0x794313;return EPHEMERAL_SHELL_SPAWNERS[_0x44a8c7(0xe3)](getBasename(_0x3172e4));}let cachedShellPID;function findShellPID(){const _0x1adfcc=a102_0x794313;let _0x570fb1=process['ppid'];const _0x2ee799=0xa;let _0x25eb33=0x0;while(_0x25eb33<_0x2ee799){const _0x58aab6=getProcessInfo(_0x570fb1);if(!_0x58aab6){process[_0x1adfcc(0x110)][_0x1adfcc(0x10d)]&&console[_0x1adfcc(0xf1)](_0x1adfcc(0x100)+_0x570fb1+_0x1adfcc(0x10a));break;}if(isShell(_0x58aab6[_0x1adfcc(0x10f)])){const _0x436721=getProcessInfo(_0x58aab6['ppid']);if(_0x436721&&isEphemeralShellSpawner(_0x436721[_0x1adfcc(0x10f)])){process[_0x1adfcc(0x110)][_0x1adfcc(0x10d)]&&console[_0x1adfcc(0xf1)]('Found\x20ephemeral\x20shell\x20'+_0x58aab6[_0x1adfcc(0xf9)]+'\x20('+_0x58aab6[_0x1adfcc(0x10f)]+_0x1adfcc(0xea)+_0x436721['comm']+_0x1adfcc(0x104));_0x570fb1=_0x58aab6['ppid'],_0x25eb33++;continue;}return _0x58aab6[_0x1adfcc(0xf9)];}if(_0x58aab6['ppid']===0x0||_0x58aab6['ppid']===0x1){if(isShell(_0x58aab6[_0x1adfcc(0x10f)]))return _0x58aab6[_0x1adfcc(0xf9)];break;}_0x570fb1=_0x58aab6[_0x1adfcc(0x10b)],_0x25eb33++;}return process[_0x1adfcc(0x110)][_0x1adfcc(0x10d)]&&console[_0x1adfcc(0xf1)](_0x1adfcc(0xeb)),process['ppid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x126205){const _0x2a700a=a102_0x794313;try{return process[_0x2a700a(0xed)](_0x126205,0x0),!![];}catch{return![];}}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a103_0x46a5(){const _0x2f1901=['removeListener','\x20[y/N]\x20','stderr','setRawMode','pause','157460UkHcyt','exit','createInterface','657dWFLAF','setEncoding','resume','stdin','47056009YWVcgI','toLowerCase','8789712RqADtZ','data','\x20(y/N):\x20','yes','stdout','4481924aDJVHY','396uCyFrW','240667CaowBH','isTTY','utf8','write','30deWIfe','5EkXRww','788561aWfxfk','4467jiJNDF','question'];a103_0x46a5=function(){return _0x2f1901;};return a103_0x46a5();}function a103_0x59e8(_0x513039,_0x43d9b7){_0x513039=_0x513039-0x1ef;const _0x46a53f=a103_0x46a5();let _0x59e899=_0x46a53f[_0x513039];return _0x59e899;}(function(_0x321371,_0x49b668){const _0x14326f=a103_0x59e8,_0x4c1626=_0x321371();while(!![]){try{const _0x41adab=-parseInt(_0x14326f(0x206))/0x1+-parseInt(_0x14326f(0x1ff))/0x2*(-parseInt(_0x14326f(0x207))/0x3)+parseInt(_0x14326f(0x1fe))/0x4*(-parseInt(_0x14326f(0x205))/0x5)+-parseInt(_0x14326f(0x204))/0x6*(-parseInt(_0x14326f(0x200))/0x7)+-parseInt(_0x14326f(0x1f9))/0x8+parseInt(_0x14326f(0x1f3))/0x9*(-parseInt(_0x14326f(0x1f0))/0xa)+parseInt(_0x14326f(0x1f7))/0xb;if(_0x41adab===_0x49b668)break;else _0x4c1626['push'](_0x4c1626['shift']());}catch(_0x3be637){_0x4c1626['push'](_0x4c1626['shift']());}}}(a103_0x46a5,0x8f644));import*as a103_0x47bfb7 from'readline';export async function confirm(_0x20ffaf){const _0x40953a=a103_0x59e8,_0x541e18=a103_0x47bfb7[_0x40953a(0x1f2)]({'input':process['stdin'],'output':process[_0x40953a(0x1fd)]});return new Promise(_0x1fb887=>{const _0x23ef74=_0x40953a;_0x541e18[_0x23ef74(0x208)](_0x20ffaf+_0x23ef74(0x1fb),_0x45e135=>{const _0x5e2824=_0x23ef74;_0x541e18['close'](),_0x1fb887(_0x45e135[_0x5e2824(0x1f8)]()==='y'||_0x45e135[_0x5e2824(0x1f8)]()===_0x5e2824(0x1fc));});});}export async function confirmKey(_0x36d3af){const _0x2b7fe9=a103_0x59e8;if(!process[_0x2b7fe9(0x1f6)][_0x2b7fe9(0x201)])return![];return process[_0x2b7fe9(0x20b)][_0x2b7fe9(0x203)](_0x36d3af+_0x2b7fe9(0x20a)),new Promise(_0x175802=>{const _0x2f73dc=_0x2b7fe9,_0x3529e2=process[_0x2f73dc(0x1f6)];_0x3529e2[_0x2f73dc(0x20c)](!![]),_0x3529e2[_0x2f73dc(0x1f5)](),_0x3529e2[_0x2f73dc(0x1f4)](_0x2f73dc(0x202));const _0x5b6b28=_0x9bd39b=>{const _0x122ccd=_0x2f73dc;_0x3529e2['setRawMode'](![]),_0x3529e2[_0x122ccd(0x1ef)](),_0x3529e2[_0x122ccd(0x209)](_0x122ccd(0x1fa),_0x5b6b28);if(_0x9bd39b==='\x1b'){process['stderr']['write']('\x0a'),_0x175802(![]);return;}_0x9bd39b==='\x03'&&(process['stderr'][_0x122ccd(0x203)]('\x0a'),process[_0x122ccd(0x1f1)](0x82));if(_0x9bd39b['toLowerCase']()==='y'){process[_0x122ccd(0x20b)][_0x122ccd(0x203)]('y\x0a'),_0x175802(!![]);return;}process[_0x122ccd(0x20b)]['write']('\x0a'),_0x175802(![]);};_0x3529e2['on'](_0x2f73dc(0x1fa),_0x5b6b28);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14d6eb,_0x43e16b){const _0x43d455=a104_0x2dfb,_0x491cb5=_0x14d6eb();while(!![]){try{const _0x19fcf4=-parseInt(_0x43d455(0x91))/0x1*(-parseInt(_0x43d455(0x9b))/0x2)+parseInt(_0x43d455(0x9f))/0x3+-parseInt(_0x43d455(0xa6))/0x4+-parseInt(_0x43d455(0xae))/0x5*(-parseInt(_0x43d455(0xa2))/0x6)+-parseInt(_0x43d455(0x90))/0x7*(parseInt(_0x43d455(0xaf))/0x8)+-parseInt(_0x43d455(0x8c))/0x9+-parseInt(_0x43d455(0xb0))/0xa*(parseInt(_0x43d455(0xab))/0xb);if(_0x19fcf4===_0x43e16b)break;else _0x491cb5['push'](_0x491cb5['shift']());}catch(_0x3836a0){_0x491cb5['push'](_0x491cb5['shift']());}}}(a104_0x3010,0x53c4a));import{existsSync,readFileSync}from'fs';import a104_0x3c04bb from'path';import{parse as a104_0x2ac202}from'yaml';export function parsePath(_0x5896f6){const _0x5ccd87=a104_0x2dfb;if(!_0x5896f6||_0x5896f6['trim']()==='')throw new Error(_0x5ccd87(0x98));const _0x8b1e91=_0x5896f6[_0x5ccd87(0x8e)]();if(_0x8b1e91==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x5896f6};const _0x349283=_0x8b1e91[_0x5ccd87(0x95)]('/')?_0x8b1e91['substring'](0x1):_0x8b1e91,_0x108cd5=_0x349283['split']('/')[_0x5ccd87(0xa4)](_0x32f387=>_0x32f387!=='');if(_0x108cd5[_0x5ccd87(0xa8)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x215790=_0x8b1e91[_0x5ccd87(0x95)]('/')||!isRelativePathSegment(_0x108cd5[0x0]);for(const _0x1eb33c of _0x108cd5){validatePathSegment(_0x1eb33c);}return{'segments':_0x108cd5,'isAbsolute':_0x215790,'raw':_0x5896f6};}function isRelativePathSegment(_0x1c972d){return _0x1c972d==='.'||_0x1c972d==='..';}function validatePathSegment(_0x15c3af){const _0xad7c30=a104_0x2dfb;if(_0x15c3af==='')throw new Error(_0xad7c30(0x8f));if(_0x15c3af==='.'||_0x15c3af==='..')return;if(/[\x00-\x1F\x7F]/[_0xad7c30(0x9d)](_0x15c3af))throw new Error(_0xad7c30(0x9e)+_0x15c3af);if(_0x15c3af!==_0x15c3af['trim']()){}}export function validatePath(_0x5b684a){const _0x2a0169=a104_0x2dfb;if(_0x5b684a[_0x2a0169(0xac)][_0x2a0169(0xa8)]===0x0&&!_0x5b684a[_0x2a0169(0xa0)])throw new Error(_0x2a0169(0x9a));if(_0x5b684a[_0x2a0169(0xa0)]){if(_0x5b684a['segments'][0x0]==='..')throw new Error(_0x2a0169(0xa3));let _0x480384=0x0;for(const _0x5b0041 of _0x5b684a[_0x2a0169(0xac)]){if(_0x5b0041==='..'){if(_0x480384===0x0)throw new Error(_0x2a0169(0x9c));_0x480384--;}else _0x5b0041!=='.'&&_0x480384++;}}}export function joinPaths(_0x3046a4,_0x2c7730){const _0x1f8e40=a104_0x2dfb;if(!_0x3046a4||_0x3046a4==='/')return _0x2c7730;if(!_0x2c7730||_0x2c7730==='.')return _0x3046a4;if(_0x2c7730['startsWith']('/'))return _0x2c7730;const _0x297cd6=parsePath(_0x3046a4),_0x529d97=parsePath(_0x2c7730),_0x52094d=[..._0x297cd6['segments']];for(const _0x8d2693 of _0x529d97['segments']){if(_0x8d2693==='.')continue;else{if(_0x8d2693==='..'){if(_0x52094d[_0x1f8e40(0xa8)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x52094d['pop']();}else _0x52094d['push'](_0x8d2693);}}const _0x9b290a=_0x52094d[_0x1f8e40(0x8d)]('/');return _0x297cd6[_0x1f8e40(0x99)][_0x1f8e40(0x95)]('/')?'/'+_0x9b290a:_0x9b290a;}export function normalizePath(_0x59fa0f){const _0x21cdb8=a104_0x2dfb,_0x2a77b6=parsePath(_0x59fa0f),_0x57979f=[];for(const _0x2a7f2a of _0x2a77b6[_0x21cdb8(0xac)]){if(_0x2a7f2a==='.')continue;else{if(_0x2a7f2a==='..'){if(_0x57979f[_0x21cdb8(0xa8)]===0x0){if(_0x2a77b6[_0x21cdb8(0xa0)])throw new Error('Cannot\x20navigate\x20above\x20root');_0x57979f[_0x21cdb8(0xb3)]('..');}else _0x57979f[_0x57979f[_0x21cdb8(0xa8)]-0x1]==='..'?_0x57979f[_0x21cdb8(0xb3)]('..'):_0x57979f[_0x21cdb8(0xb2)]();}else _0x57979f[_0x21cdb8(0xb3)](_0x2a7f2a);}}if(_0x57979f[_0x21cdb8(0xa8)]===0x0)return _0x2a77b6['isAbsolute']?'/':'.';const _0xb463de=_0x57979f[_0x21cdb8(0x8d)]('/');return _0x2a77b6[_0x21cdb8(0x99)][_0x21cdb8(0x95)]('/')?'/'+_0xb463de:_0xb463de;}function a104_0x2dfb(_0x4cb8b7,_0x11b3cf){_0x4cb8b7=_0x4cb8b7-0x8c;const _0x301028=a104_0x3010();let _0x2dfbff=_0x301028[_0x4cb8b7];return _0x2dfbff;}export function getParentPath(_0x52fd3c){const _0x34a63c=a104_0x2dfb,_0x46cd7b=parsePath(_0x52fd3c);if(_0x46cd7b[_0x34a63c(0xac)]['length']<=0x1)return'/';const _0x876844=_0x46cd7b[_0x34a63c(0xac)]['slice'](0x0,-0x1)[_0x34a63c(0x8d)]('/');return _0x46cd7b[_0x34a63c(0x99)][_0x34a63c(0x95)]('/')?'/'+_0x876844:_0x876844;}function a104_0x3010(){const _0x45d5b5=['startsWith','root','endsWith','Path\x20cannot\x20be\x20empty','raw','Relative\x20path\x20cannot\x20be\x20empty','8iYDATK','Path\x20attempts\x20to\x20navigate\x20above\x20root','test','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','1298355wxhtGh','isAbsolute','replace','66GuuuSO','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','filter','No\x20tdx.json\x20found\x20for\x20file:\x20','271216ioMpFf','tdx.json','length','Invalid\x20segment\x20YAML:\x20missing\x20name\x20field\x20in\x20','dirname','31669MEXMzP','segments','parent_segment','135475ANAUCq','105464yiQahM','1110bRhYpt','utf-8','pop','push','517338JQJlmk','join','trim','Path\x20segment\x20cannot\x20be\x20empty','217PKZLKh','116453MXTAKG','parse','slice','name'];a104_0x3010=function(){return _0x45d5b5;};return a104_0x3010();}export function getBaseName(_0x47d11a){const _0x163645=a104_0x2dfb,_0x59b0a2=parsePath(_0x47d11a);return _0x59b0a2['segments'][_0x59b0a2[_0x163645(0xac)][_0x163645(0xa8)]-0x1]||'';}export function isChildPath(_0x4191e3,_0x4c2f60){const _0x4d3258=a104_0x2dfb,_0x4f6207=parsePath(_0x4191e3),_0x4e21ea=parsePath(_0x4c2f60);if(_0x4f6207[_0x4d3258(0xac)][_0x4d3258(0xa8)]<=_0x4e21ea[_0x4d3258(0xac)][_0x4d3258(0xa8)])return![];for(let _0x478b8a=0x0;_0x478b8a<_0x4e21ea[_0x4d3258(0xac)][_0x4d3258(0xa8)];_0x478b8a++){if(_0x4f6207[_0x4d3258(0xac)][_0x478b8a]!==_0x4e21ea[_0x4d3258(0xac)][_0x478b8a])return![];}return!![];}export function splitPath(_0x30ad65){const _0x1fbfbe=a104_0x2dfb,_0x2183b5=parsePath(_0x30ad65);if(_0x2183b5['segments']['length']===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x2183b5[_0x1fbfbe(0xac)][_0x1fbfbe(0xa8)]===0x1)return{'parent':_0x2183b5[_0x1fbfbe(0xac)][0x0]};return{'parent':_0x2183b5[_0x1fbfbe(0xac)][0x0],'child':_0x2183b5[_0x1fbfbe(0xac)][_0x1fbfbe(0x93)](0x1)['join']('/')};}export function isYamlFilePath(_0x199e82){const _0x1fe99e=a104_0x2dfb;return _0x199e82[_0x1fe99e(0x97)]('.yml')||_0x199e82[_0x1fe99e(0x97)]('.yaml');}export function resolveYamlFilePath(_0x16c512){const _0x58207b=a104_0x2dfb,_0x4dc6fc=a104_0x3c04bb['resolve'](_0x16c512);if(!existsSync(_0x4dc6fc))throw new Error('File\x20not\x20found:\x20'+_0x16c512);let _0x26651d=a104_0x3c04bb[_0x58207b(0xaa)](_0x4dc6fc),_0x379470=null,_0x130cb7=null;const _0x176d4f=a104_0x3c04bb[_0x58207b(0x92)](_0x26651d)[_0x58207b(0x96)];while(_0x26651d!==_0x176d4f){const _0x14cbba=a104_0x3c04bb[_0x58207b(0x8d)](_0x26651d,_0x58207b(0xa7));if(existsSync(_0x14cbba)){_0x379470=_0x14cbba,_0x130cb7=_0x26651d;break;}_0x26651d=a104_0x3c04bb['dirname'](_0x26651d);}if(!_0x379470||!_0x130cb7)throw new Error(_0x58207b(0xa5)+_0x16c512);const _0x15ce8d=readFileSync(_0x379470,_0x58207b(0xb1)),_0x3a0ce6=JSON[_0x58207b(0x92)](_0x15ce8d),_0xe8b70e=_0x3a0ce6[_0x58207b(0xad)];if(!_0xe8b70e)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x5c1777=readFileSync(_0x4dc6fc,'utf-8'),_0x301976=a104_0x2ac202(_0x5c1777),_0x28b9e3=_0x301976[_0x58207b(0x94)];if(!_0x28b9e3)throw new Error(_0x58207b(0xa9)+_0x16c512);const _0x3c42bb=a104_0x3c04bb['relative'](_0x130cb7,_0x4dc6fc),_0x3e5567=a104_0x3c04bb[_0x58207b(0xaa)](_0x3c42bb),_0x2081b9=_0x3e5567==='.'?'':_0x3e5567[_0x58207b(0xa1)](/\\/g,'/'),_0x25f19e=_0x2081b9?_0xe8b70e+'/'+_0x2081b9+'/'+_0x28b9e3:_0xe8b70e+'/'+_0x28b9e3;return{'parentSegment':_0xe8b70e,'segmentName':_0x28b9e3,'folderPath':_0x2081b9,'fullPath':_0x25f19e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a105_0x4260(_0x4f0fd5,_0x172494){_0x4f0fd5=_0x4f0fd5-0x15a;const _0x3f6f3b=a105_0x3f6f();let _0x4260d4=_0x3f6f3b[_0x4f0fd5];return _0x4260d4;}function a105_0x3f6f(){const _0x3430fc=['43905TLMlDS','9445020AlYpNc','indexOf','783186voxTmc','35zltges','516312HhZXBe','448LEKbHE','Invalid\x20segment\x20reference\x20format:\x20','51JHUyCR','153080mYHRzq','substring','1413063Hfxsbe','9634dPnlFl'];a105_0x3f6f=function(){return _0x3430fc;};return a105_0x3f6f();}(function(_0x275886,_0x465ad6){const _0x189593=a105_0x4260,_0x22a6e6=_0x275886();while(!![]){try{const _0x59611e=parseInt(_0x189593(0x15e))/0x1*(parseInt(_0x189593(0x162))/0x2)+parseInt(_0x189593(0x166))/0x3+-parseInt(_0x189593(0x15c))/0x4*(-parseInt(_0x189593(0x163))/0x5)+parseInt(_0x189593(0x15b))/0x6+-parseInt(_0x189593(0x15a))/0x7*(-parseInt(_0x189593(0x15f))/0x8)+-parseInt(_0x189593(0x161))/0x9+-parseInt(_0x189593(0x164))/0xa;if(_0x59611e===_0x465ad6)break;else _0x22a6e6['push'](_0x22a6e6['shift']());}catch(_0x80ca0f){_0x22a6e6['push'](_0x22a6e6['shift']());}}}(a105_0x3f6f,0x8b433));export function parseSegmentRef(_0x37c2ea){const _0x2a0138=a105_0x4260,_0x128c26=_0x37c2ea[_0x2a0138(0x165)]('/');if(_0x128c26===-0x1)return{'parentId':_0x37c2ea};if(_0x128c26===0x0)throw new Error(_0x2a0138(0x15d)+_0x37c2ea+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x426b82=_0x37c2ea[_0x2a0138(0x160)](0x0,_0x128c26),_0x40bdd3=_0x37c2ea[_0x2a0138(0x160)](_0x128c26+0x1);if(_0x40bdd3==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x37c2ea+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x426b82,'childId':_0x40bdd3};}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3357f9,_0x492f63){const _0x29eaea=a106_0x59c6,_0x52c602=_0x3357f9();while(!![]){try{const _0x20258b=-parseInt(_0x29eaea(0x84))/0x1*(-parseInt(_0x29eaea(0x7e))/0x2)+parseInt(_0x29eaea(0x87))/0x3+parseInt(_0x29eaea(0x7c))/0x4+parseInt(_0x29eaea(0x7b))/0x5*(-parseInt(_0x29eaea(0x8f))/0x6)+parseInt(_0x29eaea(0x79))/0x7*(-parseInt(_0x29eaea(0x85))/0x8)+-parseInt(_0x29eaea(0x8a))/0x9+parseInt(_0x29eaea(0x92))/0xa*(parseInt(_0x29eaea(0x80))/0xb);if(_0x20258b===_0x492f63)break;else _0x52c602['push'](_0x52c602['shift']());}catch(_0x123aef){_0x52c602['push'](_0x52c602['shift']());}}}(a106_0x2bd0,0x18ee0));import a106_0x289f7b from'ora';export function createCommandSpinner(_0x36f245,_0xcce94c={}){const _0x14c0e9=a106_0x59c6,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0xcce94c;return a106_0x289f7b({'text':_0x36f245,'color':_0x14c0e9(0x89),'isEnabled':forceEnabled||process[_0x14c0e9(0x91)]['isTTY']&&!verbose});}function a106_0x59c6(_0x30eb6b,_0xffe021){_0x30eb6b=_0x30eb6b-0x79;const _0x2bd068=a106_0x2bd0();let _0x59c6b0=_0x2bd068[_0x30eb6b];return _0x59c6b0;}export async function withSpinner(_0x15fb67,_0x498c24,_0x289710={}){const _0x168747=a106_0x59c6,_0x3e3e30=_0x289710[_0x168747(0x7a)]??(()=>Date[_0x168747(0x81)]()),_0x160316=createCommandSpinner(_0x15fb67,_0x289710);_0x160316[_0x168747(0x88)]();const _0x4a73b0=_0x3e3e30();try{const _0x42f666=await _0x498c24(),_0x524632=_0x3e3e30()-_0x4a73b0;return _0x160316[_0x168747(0x8d)](),{'data':_0x42f666,'elapsedMs':_0x524632};}catch(_0x28f308){_0x160316[_0x168747(0x8d)]();throw _0x28f308;}}export async function withQuerySpinner(_0x4e0bd8,_0xe19d29,_0x271907={}){const _0x3600c7=a106_0x59c6,_0x4858a1=_0x271907[_0x3600c7(0x7a)]??(()=>Date['now']()),_0x3b008c=_0x271907[_0x3600c7(0x82)]??setInterval,_0x251e5f=createCommandSpinner(_0x4e0bd8,_0x271907);_0x251e5f[_0x3600c7(0x88)]();const _0x4c93ac=_0x4858a1(),_0x72922=_0x4e0bd8[_0x3600c7(0x8e)](_0x3600c7(0x93),''),_0x43645={},_0x5e35e7=()=>{const _0x3b137d=_0x3600c7;if(!_0x251e5f[_0x3b137d(0x86)])return;const _0x50b8b3=_0x4858a1()-_0x4c93ac,_0x4274ed=formatElapsed(_0x50b8b3),_0x1070f8=_0x43645[_0x3b137d(0x7d)]??_0x72922,_0x48e0cf=_0x43645[_0x3b137d(0x90)]?_0x3b137d(0x7f)+_0x43645[_0x3b137d(0x90)]+']':'',_0x211c30=_0x43645['extra']?'\x20'+_0x43645['extra']:'';_0x251e5f['text']=_0x1070f8+'\x20'+_0x4274ed+_0x211c30+_0x48e0cf;},_0x3de3df=_0x3b008c(()=>{_0x5e35e7();},0x3e8),_0xdee47b={'setPhase':_0x44daba=>{const _0x5c0910=_0x3600c7;_0x43645[_0x5c0910(0x7d)]=_0x44daba,_0x5e35e7();},'setJobId':_0xdb677c=>{const _0x4f33ea=_0x3600c7;_0x43645[_0x4f33ea(0x90)]=_0xdb677c,_0x5e35e7();},'setExtra':_0x6ece7a=>{const _0x50ff81=_0x3600c7;_0x43645[_0x50ff81(0x8c)]=_0x6ece7a,_0x5e35e7();}};_0x5e35e7();try{const _0x2c071e=await _0xe19d29(_0xdee47b),_0x1411d9=_0x4858a1()-_0x4c93ac;return{'data':_0x2c071e,'elapsedMs':_0x1411d9};}finally{clearInterval(_0x3de3df),_0x251e5f['stop']();}}export function formatElapsed(_0x21fa40){const _0xd59a52=a106_0x59c6,_0x37b562=Math[_0xd59a52(0x8b)](_0x21fa40/0x3e8);if(_0x37b562<0x3c)return(_0x21fa40/0x3e8)[_0xd59a52(0x83)](0x1)+'s';const _0x363627=Math[_0xd59a52(0x8b)](_0x37b562/0x3c),_0x238d4c=_0x37b562%0x3c;if(_0x363627<0x3c)return _0x363627+'m\x20'+_0x238d4c+'s';const _0x2fcc06=Math[_0xd59a52(0x8b)](_0x363627/0x3c),_0x49fc37=_0x363627%0x3c;return _0x2fcc06+'h\x20'+_0x49fc37+'m';}function a106_0x2bd0(){const _0x7e0c8=['10uojawj','188844DJGUTR','phase','287292OczfTF','\x20[Job\x20ID:\x20','1004641usKzas','now','intervalFactory','toFixed','1KrkdFY','8ttnxQH','isSpinning','474888YQaMYT','start','cyan','1091835nAvIIc','floor','extra','stop','replace','518124ssgpZS','jobId','stdout','10TZCfER','...','310443xgIjHW','clock'];a106_0x2bd0=function(){return _0x7e0c8;};return a106_0x2bd0();}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54ddc8,_0x8f4492){const _0x456ef7=a107_0x5276,_0x3f74e9=_0x54ddc8();while(!![]){try{const _0x5d1b73=-parseInt(_0x456ef7(0xfc))/0x1*(parseInt(_0x456ef7(0xfd))/0x2)+-parseInt(_0x456ef7(0x105))/0x3+parseInt(_0x456ef7(0x100))/0x4+parseInt(_0x456ef7(0xf4))/0x5+-parseInt(_0x456ef7(0x103))/0x6*(-parseInt(_0x456ef7(0xf3))/0x7)+-parseInt(_0x456ef7(0xf0))/0x8*(parseInt(_0x456ef7(0xf5))/0x9)+parseInt(_0x456ef7(0xef))/0xa;if(_0x5d1b73===_0x8f4492)break;else _0x3f74e9['push'](_0x3f74e9['shift']());}catch(_0x109550){_0x3f74e9['push'](_0x3f74e9['shift']());}}}(a107_0x5227,0x780d7));import{readFileSync}from'fs';export function stripSqlComments(_0x4e60e4){const _0x54006c=a107_0x5276;let _0x38bf2e=_0x4e60e4[_0x54006c(0xff)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x38bf2e=_0x38bf2e[_0x54006c(0xff)](/--.*$/gm,''),_0x38bf2e[_0x54006c(0xfa)]();}function a107_0x5276(_0x4623ae,_0x2ddf94){_0x4623ae=_0x4623ae-0xee;const _0x5227cb=a107_0x5227();let _0x5276eb=_0x5227cb[_0x4623ae];return _0x5276eb;}function a107_0x5227(){const _0x366e88=['601680aZpQDE','9171Batkbg','Content\x20contains\x20no\x20SQL\x20statements','utf-8','Error\x20reading\x20file\x20\x27','map','trim','File\x20\x27','1mTSVas','1821994mhSWTK','message','replace','851952EzzCNt','\x27\x20not\x20found','length','23052omygdp','\x27:\x20','2169603pYwePx','EACCES','Permission\x20denied\x20reading\x20file\x20\x27','19400550TCZcih','3088RnRMyD','toLowerCase','ENOENT','448vRFdru'];a107_0x5227=function(){return _0x366e88;};return a107_0x5227();}function isEscaped(_0x23e534,_0x30ff1b){let _0x297b2e=0x0;for(let _0x187942=_0x30ff1b-0x1;_0x187942>=0x0&&_0x23e534[_0x187942]==='\x5c';_0x187942--){_0x297b2e++;}return _0x297b2e%0x2===0x1;}export function splitSqlStatements(_0x2a8af4){const _0x28c8d9=a107_0x5276,_0x333949=stripSqlComments(_0x2a8af4);if(!_0x333949)throw new Error(_0x28c8d9(0xf6));const _0x28c26d=[];let _0x30fa0c='',_0x4405e5=![],_0x3541be=![],_0x4506af=![];for(let _0x35c47f=0x0;_0x35c47f<_0x2a8af4['length'];_0x35c47f++){const _0x57cd92=_0x2a8af4[_0x35c47f];if(_0x57cd92==='\x27'&&!isEscaped(_0x2a8af4,_0x35c47f)&&!_0x3541be&&!_0x4506af)_0x4405e5=!_0x4405e5;else{if(_0x57cd92==='\x22'&&!isEscaped(_0x2a8af4,_0x35c47f)&&!_0x4405e5&&!_0x4506af)_0x3541be=!_0x3541be;else _0x57cd92==='`'&&!isEscaped(_0x2a8af4,_0x35c47f)&&!_0x4405e5&&!_0x3541be&&(_0x4506af=!_0x4506af);}if(_0x57cd92===';'&&!_0x4405e5&&!_0x3541be&&!_0x4506af){const _0x390e97=_0x30fa0c['trim']();_0x390e97&&_0x28c26d['push'](_0x390e97),_0x30fa0c='';}else _0x30fa0c+=_0x57cd92;}const _0x16af29=_0x30fa0c['trim']();_0x16af29&&_0x28c26d['push'](_0x16af29);const _0x33d4ed=_0x28c26d[_0x28c8d9(0xf9)](_0x29eaa8=>_0x29eaa8[_0x28c8d9(0xfa)]())['filter'](_0x357b7a=>{const _0x5284ab=stripSqlComments(_0x357b7a);return _0x5284ab['length']>0x0;});if(_0x33d4ed[_0x28c8d9(0x102)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x33d4ed;}export function readFileContent(_0x5e8aca){const _0x2c402b=a107_0x5276;try{return readFileSync(_0x5e8aca,_0x2c402b(0xf7));}catch(_0x5bc167){const _0x2a06af=_0x5bc167['code'];if(_0x2a06af===_0x2c402b(0xf2))throw new Error(_0x2c402b(0xfb)+_0x5e8aca+_0x2c402b(0x101));else{if(_0x2a06af===_0x2c402b(0x106))throw new Error(_0x2c402b(0xee)+_0x5e8aca+'\x27');else throw new Error(_0x2c402b(0xf8)+_0x5e8aca+_0x2c402b(0x104)+_0x5bc167[_0x2c402b(0xfe)]);}}}export function readSqlStatementsFromFile(_0x3b9a90){const _0x1e1dd2=a107_0x5276,_0x36cffb=readFileContent(_0x3b9a90);try{return splitSqlStatements(_0x36cffb);}catch(_0x22ded5){throw new Error(_0x1e1dd2(0xfb)+_0x3b9a90+'\x27\x20'+_0x22ded5[_0x1e1dd2(0xfe)][_0x1e1dd2(0xf1)]());}}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x52efd5,_0x5188b1){const _0x3dbeb8=a108_0x1961,_0x273b72=_0x52efd5();while(!![]){try{const _0x36ac8d=parseInt(_0x3dbeb8(0xe0))/0x1+parseInt(_0x3dbeb8(0xf7))/0x2+parseInt(_0x3dbeb8(0xf8))/0x3+-parseInt(_0x3dbeb8(0xe9))/0x4*(parseInt(_0x3dbeb8(0xe1))/0x5)+-parseInt(_0x3dbeb8(0xf2))/0x6*(parseInt(_0x3dbeb8(0xf0))/0x7)+parseInt(_0x3dbeb8(0xe8))/0x8*(parseInt(_0x3dbeb8(0xdd))/0x9)+-parseInt(_0x3dbeb8(0xe2))/0xa*(-parseInt(_0x3dbeb8(0xea))/0xb);if(_0x36ac8d===_0x5188b1)break;else _0x273b72['push'](_0x273b72['shift']());}catch(_0x53ef05){_0x273b72['push'](_0x273b72['shift']());}}}(a108_0xd726,0x8c10e));function a108_0xd726(){const _0x51b586=['decode','startsWith','22344BEbWJA','2748395BBiMAq','20PouBpp','body','parse','[LLM\x20API\x20SSE]\x20','debug','split','2209784UjOuAp','4grqJRu','3995178rbRckW','Response\x20body\x20is\x20null','indexOf','event','pop','slice','56cKcrfq','trim','747276TbqAOH','releaseLock','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','data','read','1461618janYmS','263286NUrlRm','18UFMfwZ'];a108_0xd726=function(){return _0x51b586;};return a108_0xd726();}export async function*parseSSEStream(_0x498211,_0x33de2d){const _0x5e51c7=a108_0x1961;if(!_0x498211[_0x5e51c7(0xe3)])throw new Error(_0x5e51c7(0xeb));const _0x225798=_0x498211[_0x5e51c7(0xe3)]['getReader'](),_0x2a9bd3=new TextDecoder();let _0x2bb448='',_0x15d64b={};try{while(!![]){const {done:_0x1eac1f,value:_0x507217}=await _0x225798[_0x5e51c7(0xf6)]();if(_0x1eac1f){if(_0x15d64b[_0x5e51c7(0xf5)]){_0x33de2d?.[_0x5e51c7(0xe6)](_0x5e51c7(0xe5)+_0x15d64b[_0x5e51c7(0xf5)]);const _0x533ad5=parseSSEData(_0x15d64b['data']);yield _0x533ad5;}break;}_0x2bb448+=_0x2a9bd3[_0x5e51c7(0xde)](_0x507217,{'stream':!![]});const _0x138483=_0x2bb448[_0x5e51c7(0xe7)]('\x0a');_0x2bb448=_0x138483[_0x5e51c7(0xee)]()||'';for(const _0x22d02f of _0x138483){if(_0x22d02f[_0x5e51c7(0xf1)]()===''){if(_0x15d64b[_0x5e51c7(0xf5)]){_0x33de2d?.[_0x5e51c7(0xe6)](_0x5e51c7(0xe5)+_0x15d64b['data']);const _0x356091=parseSSEData(_0x15d64b[_0x5e51c7(0xf5)]);yield _0x356091,_0x15d64b={};}continue;}if(_0x22d02f[_0x5e51c7(0xdf)](':'))continue;const _0x16bab6=_0x22d02f[_0x5e51c7(0xec)](':');if(_0x16bab6===-0x1)continue;const _0x1b00ce=_0x22d02f['slice'](0x0,_0x16bab6);let _0x377815=_0x22d02f[_0x5e51c7(0xef)](_0x16bab6+0x1);_0x377815[_0x5e51c7(0xdf)]('\x20')&&(_0x377815=_0x377815[_0x5e51c7(0xef)](0x1));switch(_0x1b00ce){case _0x5e51c7(0xed):_0x15d64b[_0x5e51c7(0xed)]=_0x377815;break;case _0x5e51c7(0xf5):_0x15d64b[_0x5e51c7(0xf5)]=_0x15d64b['data']?_0x15d64b['data']+'\x0a'+_0x377815:_0x377815;break;case'id':_0x15d64b['id']=_0x377815;break;}}}}finally{_0x225798[_0x5e51c7(0xf3)]();}}function a108_0x1961(_0x2f6e98,_0x3e5afd){_0x2f6e98=_0x2f6e98-0xdd;const _0xd726=a108_0xd726();let _0x19613a=_0xd726[_0x2f6e98];return _0x19613a;}function parseSSEData(_0x274851){const _0x2ae25a=a108_0x1961;try{return JSON[_0x2ae25a(0xe4)](_0x274851);}catch(_0x28a33b){throw new Error(_0x2ae25a(0xf4)+_0x274851,{'cause':_0x28a33b});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32bed2,_0x266cf2){const _0x301a09=a109_0x1211,_0xafcbc1=_0x32bed2();while(!![]){try{const _0x4d8ce0=parseInt(_0x301a09(0x1b4))/0x1*(parseInt(_0x301a09(0x1c2))/0x2)+-parseInt(_0x301a09(0x1b1))/0x3*(-parseInt(_0x301a09(0x1b0))/0x4)+parseInt(_0x301a09(0x1b6))/0x5*(-parseInt(_0x301a09(0x1bf))/0x6)+parseInt(_0x301a09(0x1c1))/0x7+parseInt(_0x301a09(0x1b7))/0x8+parseInt(_0x301a09(0x1c0))/0x9*(parseInt(_0x301a09(0x1bb))/0xa)+parseInt(_0x301a09(0x1af))/0xb*(-parseInt(_0x301a09(0x1c5))/0xc);if(_0x4d8ce0===_0x266cf2)break;else _0xafcbc1['push'](_0xafcbc1['shift']());}catch(_0x3b73ca){_0xafcbc1['push'](_0xafcbc1['shift']());}}}(a109_0x3581,0xe8a6b));import a109_0x2fd2fc from'string-width';export function stringWidth(_0x414159){return a109_0x2fd2fc(_0x414159);}export function padEnd(_0x376bb1,_0x2c4813){const _0xafa9a1=a109_0x1211,_0x4c8e3=stringWidth(_0x376bb1);if(_0x4c8e3>=_0x2c4813)return _0x376bb1;return _0x376bb1+'\x20'[_0xafa9a1(0x1be)](_0x2c4813-_0x4c8e3);}export function padStart(_0x144eb9,_0x1824b5){const _0x7db62=a109_0x1211,_0x488759=stringWidth(_0x144eb9);if(_0x488759>=_0x1824b5)return _0x144eb9;return'\x20'[_0x7db62(0x1be)](_0x1824b5-_0x488759)+_0x144eb9;}export function centerAlign(_0x16bb4a,_0x1907dd){const _0x268041=a109_0x1211,_0x30e2dc=stringWidth(_0x16bb4a);if(_0x30e2dc>_0x1907dd){if(_0x1907dd<=0x1)return'…'[_0x268041(0x1bd)](0x0,_0x1907dd);let _0xd6990f=_0x16bb4a;while(stringWidth(_0xd6990f+'…')>_0x1907dd){_0xd6990f=_0xd6990f['slice'](0x0,-0x1);}return _0xd6990f+'…';}if(_0x30e2dc===_0x1907dd)return _0x16bb4a;const _0x268b51=_0x1907dd-_0x30e2dc,_0x2b35c4=Math[_0x268041(0x1b3)](_0x268b51/0x2),_0x38bcdf=_0x268b51-_0x2b35c4;return'\x20'['repeat'](_0x2b35c4)+_0x16bb4a+'\x20'[_0x268041(0x1be)](_0x38bcdf);}export function escapeStringLiteral(_0x4b175a){const _0x3bae2b=a109_0x1211;if(!_0x4b175a||_0x4b175a[_0x3bae2b(0x1b8)]()[_0x3bae2b(0x1b9)]===0x0)throw new Error(_0x3bae2b(0x1bc));const _0x276b67=_0x4b175a[_0x3bae2b(0x1c3)](/'/g,'\x27\x27');return'\x27'+_0x276b67+'\x27';}export function globToLike(_0x5af4e2){const _0x3c5d3d=a109_0x1211;let _0x32131c=_0x5af4e2['replace'](/\\/g,'\x5c\x5c')[_0x3c5d3d(0x1c3)](/%/g,'\x5c%')[_0x3c5d3d(0x1c3)](/_/g,'\x5c_');return _0x32131c=_0x32131c[_0x3c5d3d(0x1c3)](/\*/g,'%')[_0x3c5d3d(0x1c3)](/\?/g,'_'),_0x32131c;}export function buildLikePattern(_0x44d538){const _0xdf4772=a109_0x1211;if(!_0x44d538||_0x44d538[_0xdf4772(0x1b8)]()['length']===0x0)throw new Error(_0xdf4772(0x1b5));const _0x56e0c6=globToLike(_0x44d538),_0xc188d0=_0x56e0c6[_0xdf4772(0x1c3)](/'/g,'\x27\x27');return'\x27'+_0xc188d0+'\x27';}export function matchGlobPattern(_0x1d9256,_0x358711){const _0x44f11b=a109_0x1211,_0xb8e36e=_0x358711[_0x44f11b(0x1c3)](/[.+^${}()|[\]\\]/g,_0x44f11b(0x1ac))[_0x44f11b(0x1c3)](/\*/g,'.*')[_0x44f11b(0x1c3)](/\?/g,'.'),_0x3e8c33=new RegExp('^'+_0xb8e36e+'$');return _0x3e8c33[_0x44f11b(0x1ba)](_0x1d9256);}function a109_0x3581(){const _0x4c9f15=['Cannot\x20escape\x20empty\x20string\x20literal','substring','repeat','178806MxUhql','119457PkPQLR','4070507kLMhXD','129028AkxmdI','replace','toString','12qWjNls','\x5c$&','USER','USERNAME','22297792DuhOyR','4KCCXWJ','5137419mjfOXV','env','floor','7rHhyvV','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','90yoZJdc','5211200MKDBZt','trim','length','test','90NMxbVW'];a109_0x3581=function(){return _0x4c9f15;};return a109_0x3581();}function a109_0x1211(_0x7d2dca,_0x267f02){_0x7d2dca=_0x7d2dca-0x1ac;const _0x3581ba=a109_0x3581();let _0x12118f=_0x3581ba[_0x7d2dca];return _0x12118f;}export function getSanitizedUsername(){const _0x3a2eec=a109_0x1211,_0x247a20=process['env'][_0x3a2eec(0x1ad)]||process[_0x3a2eec(0x1b2)][_0x3a2eec(0x1ae)]||'unknown';return _0x247a20['replace'](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x5ea479=a109_0x1211,_0x5b51d6=Math[_0x5ea479(0x1b3)](Math['random']()*0xfffff);return _0x5b51d6[_0x5ea479(0x1c4)](0x10)['padStart'](0x5,'0');}
|