@treasuredata/tdx 0.9.7 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +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/agent-command.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.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/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/journey-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/agent/agent-yaml.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.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/journey-yaml.d.ts +36 -7
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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-config.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/journey-utils.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
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b44a2,_0x4861e1){const _0x49a7de=a99_0x4c79,_0x580a31=_0x4b44a2();while(!![]){try{const _0x4dff4a=-parseInt(_0x49a7de(0x1ab))/0x1+parseInt(_0x49a7de(0x1a4))/0x2*(parseInt(_0x49a7de(0x199))/0x3)+-parseInt(_0x49a7de(0x1a9))/0x4+-parseInt(_0x49a7de(0x192))/0x5+parseInt(_0x49a7de(0x19d))/0x6*(parseInt(_0x49a7de(0x1b5))/0x7)+-parseInt(_0x49a7de(0x197))/0x8+parseInt(_0x49a7de(0x191))/0x9*(-parseInt(_0x49a7de(0x1b7))/0xa);if(_0x4dff4a===_0x4861e1)break;else _0x580a31['push'](_0x580a31['shift']());}catch(_0x4a4fb8){_0x580a31['push'](_0x580a31['shift']());}}}(a99_0x1d61,0xd9a90));import a99_0x265658 from'chalk';export function generateDiff(_0x3d82ff,_0x282f11){const _0x3761f7=a99_0x4c79,_0x802749=_0x3d82ff[_0x3761f7(0x1b6)]('\x0a'),_0x12ce82=_0x282f11[_0x3761f7(0x1b6)]('\x0a'),_0x4d7ff8=[],_0x47dccf=computeLCS(_0x802749,_0x12ce82);let _0x5ef41c=0x0,_0x27382d=0x0,_0x39d88c=0x0;while(_0x5ef41c<_0x802749[_0x3761f7(0x1a0)]||_0x27382d<_0x12ce82[_0x3761f7(0x1a0)]){if(_0x39d88c<_0x47dccf[_0x3761f7(0x1a0)]&&_0x5ef41c<_0x802749[_0x3761f7(0x1a0)]&&_0x802749[_0x5ef41c]===_0x47dccf[_0x39d88c])_0x27382d<_0x12ce82['length']&&_0x12ce82[_0x27382d]===_0x47dccf[_0x39d88c]?(_0x4d7ff8[_0x3761f7(0x19f)]({'type':_0x3761f7(0x1a6),'content':_0x802749[_0x5ef41c]}),_0x5ef41c++,_0x27382d++,_0x39d88c++):(_0x4d7ff8['push']({'type':'added','content':_0x12ce82[_0x27382d]}),_0x27382d++);else{if(_0x39d88c<_0x47dccf['length']&&_0x27382d<_0x12ce82[_0x3761f7(0x1a0)]&&_0x12ce82[_0x27382d]===_0x47dccf[_0x39d88c])_0x4d7ff8['push']({'type':'removed','content':_0x802749[_0x5ef41c]}),_0x5ef41c++;else{if(_0x5ef41c<_0x802749[_0x3761f7(0x1a0)]&&(_0x39d88c>=_0x47dccf[_0x3761f7(0x1a0)]||_0x802749[_0x5ef41c]!==_0x47dccf[_0x39d88c]))_0x4d7ff8[_0x3761f7(0x19f)]({'type':'removed','content':_0x802749[_0x5ef41c]}),_0x5ef41c++;else _0x27382d<_0x12ce82[_0x3761f7(0x1a0)]&&(_0x4d7ff8[_0x3761f7(0x19f)]({'type':'added','content':_0x12ce82[_0x27382d]}),_0x27382d++);}}}return _0x4d7ff8;}function a99_0x4c79(_0x4fc4c1,_0xc5aedc){_0x4fc4c1=_0x4fc4c1-0x191;const _0x1d6178=a99_0x1d61();let _0x4c79a1=_0x1d6178[_0x4fc4c1];return _0x4c79a1;}function computeLCS(_0x2369fd,_0x28f793){const _0x3f0e72=a99_0x4c79,_0x316d9e=_0x2369fd[_0x3f0e72(0x1a0)],_0x40957d=_0x28f793[_0x3f0e72(0x1a0)],_0x3e004f=Array(_0x316d9e+0x1)[_0x3f0e72(0x194)](null)[_0x3f0e72(0x198)](()=>Array(_0x40957d+0x1)[_0x3f0e72(0x194)](0x0));for(let _0xd44fc3=0x1;_0xd44fc3<=_0x316d9e;_0xd44fc3++){for(let _0x2241e4=0x1;_0x2241e4<=_0x40957d;_0x2241e4++){_0x2369fd[_0xd44fc3-0x1]===_0x28f793[_0x2241e4-0x1]?_0x3e004f[_0xd44fc3][_0x2241e4]=_0x3e004f[_0xd44fc3-0x1][_0x2241e4-0x1]+0x1:_0x3e004f[_0xd44fc3][_0x2241e4]=Math['max'](_0x3e004f[_0xd44fc3-0x1][_0x2241e4],_0x3e004f[_0xd44fc3][_0x2241e4-0x1]);}}const _0x55435c=[];let _0x4ff404=_0x316d9e,_0x1af4f9=_0x40957d;while(_0x4ff404>0x0&&_0x1af4f9>0x0){if(_0x2369fd[_0x4ff404-0x1]===_0x28f793[_0x1af4f9-0x1])_0x55435c['unshift'](_0x2369fd[_0x4ff404-0x1]),_0x4ff404--,_0x1af4f9--;else _0x3e004f[_0x4ff404-0x1][_0x1af4f9]>_0x3e004f[_0x4ff404][_0x1af4f9-0x1]?_0x4ff404--:_0x1af4f9--;}return _0x55435c;}export function formatDiffWithColors(_0x521ff5,_0x240b05=0x3){const _0x25a8fa=a99_0x4c79,_0x2fcfbe=new Set();_0x521ff5[_0x25a8fa(0x19b)]((_0x56a498,_0x1457c3)=>{const _0x2caa37=_0x25a8fa;_0x56a498[_0x2caa37(0x1a1)]!=='unchanged'&&_0x2fcfbe[_0x2caa37(0x1b4)](_0x1457c3);});if(_0x2fcfbe[_0x25a8fa(0x1ad)]===0x0)return'';const _0x3a52da=new Set();for(const _0x1d511e of _0x2fcfbe){for(let _0x37608f=Math['max'](0x0,_0x1d511e-_0x240b05);_0x37608f<=Math[_0x25a8fa(0x1ac)](_0x521ff5[_0x25a8fa(0x1a0)]-0x1,_0x1d511e+_0x240b05);_0x37608f++){_0x3a52da[_0x25a8fa(0x1b4)](_0x37608f);}}const _0x1d8526=[];let _0x550007=-0x1;const _0x57a111=_0x521ff5['length'],_0x22cb39=Math[_0x25a8fa(0x1ae)](0x3,String(_0x57a111)['length']),_0x5680a8=[];let _0x2c65c4=0x0,_0x3b2861=0x0;for(const _0x24c8b8 of _0x521ff5){if(_0x24c8b8[_0x25a8fa(0x1a1)]==='removed')_0x2c65c4++,_0x5680a8[_0x25a8fa(0x19f)]({'old':_0x2c65c4,'new':0x0});else _0x24c8b8[_0x25a8fa(0x1a1)]===_0x25a8fa(0x1a7)?(_0x3b2861++,_0x5680a8[_0x25a8fa(0x19f)]({'old':0x0,'new':_0x3b2861})):(_0x2c65c4++,_0x3b2861++,_0x5680a8[_0x25a8fa(0x19f)]({'old':_0x2c65c4,'new':_0x3b2861}));}for(let _0x18eea5=0x0;_0x18eea5<_0x521ff5[_0x25a8fa(0x1a0)];_0x18eea5++){if(!_0x3a52da[_0x25a8fa(0x19a)](_0x18eea5))continue;_0x550007!==-0x1&&_0x18eea5>_0x550007+0x1&&_0x1d8526[_0x25a8fa(0x19f)](a99_0x265658[_0x25a8fa(0x193)](_0x25a8fa(0x1a3)));_0x550007=_0x18eea5;const _0x3b576c=_0x521ff5[_0x18eea5],_0x3810e0=_0x5680a8[_0x18eea5],_0x169b0e=_0x3810e0['old']>0x0?String(_0x3810e0[_0x25a8fa(0x1af)])[_0x25a8fa(0x1a8)](_0x22cb39):'\x20'[_0x25a8fa(0x1b2)](_0x22cb39),_0x3fcd3d=_0x3810e0[_0x25a8fa(0x19c)]>0x0?String(_0x3810e0[_0x25a8fa(0x19c)])[_0x25a8fa(0x1a8)](_0x22cb39):'\x20'[_0x25a8fa(0x1b2)](_0x22cb39);switch(_0x3b576c['type']){case _0x25a8fa(0x196):_0x1d8526[_0x25a8fa(0x19f)](a99_0x265658[_0x25a8fa(0x195)](_0x169b0e+'\x20'+_0x3fcd3d+_0x25a8fa(0x1a5)+_0x3b576c['content']));break;case'added':_0x1d8526[_0x25a8fa(0x19f)](a99_0x265658[_0x25a8fa(0x1b3)](_0x169b0e+'\x20'+_0x3fcd3d+'\x20+\x20'+_0x3b576c['content']));break;default:_0x1d8526[_0x25a8fa(0x19f)](a99_0x265658[_0x25a8fa(0x1b1)](_0x169b0e+'\x20'+_0x3fcd3d+_0x25a8fa(0x19e)+_0x3b576c[_0x25a8fa(0x1aa)]));break;}}return _0x1d8526[_0x25a8fa(0x1a2)]('\x0a');}function a99_0x1d61(){const _0x55a631=['some','dim','repeat','green','add','71351wIdfCD','split','2142410IbgeBG','45kYkZwO','1859070SNujpa','cyan','fill','red','removed','1661912qhKgZo','map','16509iIkDIW','has','forEach','new','750JBZvnL','\x20\x20\x20','push','length','type','join','\x20\x20...','614LmaBmH','\x20-\x20','unchanged','added','padStart','115828eprMNs','content','392295gGYAwi','min','size','max','old'];a99_0x1d61=function(){return _0x55a631;};return a99_0x1d61();}export function hasChanges(_0x354e19){const _0x533783=a99_0x4c79;return _0x354e19[_0x533783(0x1b0)](_0x37ad1b=>_0x37ad1b[_0x533783(0x1a1)]!==_0x533783(0x1a6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3bd0b0,_0x457bd8){const _0xac576a=a100_0x38fe,_0x409a29=_0x3bd0b0();while(!![]){try{const _0x32383c=parseInt(_0xac576a(0x158))/0x1+parseInt(_0xac576a(0x15a))/0x2+-parseInt(_0xac576a(0x16a))/0x3*(-parseInt(_0xac576a(0x147))/0x4)+-parseInt(_0xac576a(0x156))/0x5*(parseInt(_0xac576a(0x152))/0x6)+-parseInt(_0xac576a(0x14c))/0x7+-parseInt(_0xac576a(0x14b))/0x8+parseInt(_0xac576a(0x14d))/0x9*(parseInt(_0xac576a(0x16c))/0xa);if(_0x32383c===_0x457bd8)break;else _0x409a29['push'](_0x409a29['shift']());}catch(_0x4a5bb3){_0x409a29['push'](_0x409a29['shift']());}}}(a100_0x1c20,0x2cdb0));import a100_0x31f689 from'chalk';function a100_0x1c20(){const _0x3f2310=['varchar','verbose','dim','information_schema','push','column_type','SELECT\x20*\x20FROM\x20(\x0a','Attributes','attribute','filter','cyan','135580ujkLbT','null','behaviorName','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','692968MAGRsK','812742aELJjA','9nRJjyH','default','data','execute','tableName','41394ahfpRO','entries','query','key','235sPnPIk','type','141189nhLjIB','name','713902wPpMka','columns','parentTableName','startsWith','size','extra','bold','localeCompare','fields','Unknown','behavior','parentColumn','get','source','sort','map','18VqdcIw','groupingName','91980THoVDN','displayName','replace','Fetching\x20schema...','YES','setJobId','trim','error'];a100_0x1c20=function(){return _0x3f2310;};return a100_0x1c20();}function a100_0x38fe(_0x59d4d9,_0x21316e){_0x59d4d9=_0x59d4d9-0x143;const _0x1c20e0=a100_0x1c20();let _0x38fe3a=_0x1c20e0[_0x59d4d9];return _0x38fe3a;}import{withQuerySpinner}from'./spinner.js';export function buildSchemaResult(_0x543b61){const _0x243e89=a100_0x38fe,_0x360d91=_0x543b61[_0x243e89(0x15b)][_0x243e89(0x169)](_0x30e62a=>({'column_name':_0x30e62a['name'],'column_type':_0x30e62a[_0x243e89(0x157)],'null':_0x243e89(0x170),'key':null,'default':null,'extra':null}));return{..._0x543b61,'columns':[{'name':'column_name','type':_0x243e89(0x174)},{'name':_0x243e89(0x179),'type':_0x243e89(0x174)},{'name':_0x243e89(0x148),'type':_0x243e89(0x174)},{'name':_0x243e89(0x155),'type':'varchar'},{'name':_0x243e89(0x14e),'type':'varchar'},{'name':_0x243e89(0x15f),'type':_0x243e89(0x174)}],'data':_0x360d91};}export async function executeSchemaQuery(_0x574144,_0x59656d,_0x5144a3){const _0x1430db=a100_0x38fe,_0xeaa57e=_0x574144[_0x1430db(0x172)]()[_0x1430db(0x16e)](/;+$/,''),_0x3f64ca=_0x1430db(0x17a)+_0xeaa57e+_0x1430db(0x14a);_0x5144a3[_0x1430db(0x175)]&&console['error']('Schema\x20query:\x0a'+_0x3f64ca);const _0x2a9420=await withQuerySpinner(_0x1430db(0x16f),async _0x21e0ac=>{const _0x543109=_0x1430db,_0x3c7500=await _0x59656d[_0x543109(0x154)][_0x543109(0x150)](_0x3f64ca,{'catalog':'td','schema':_0x543109(0x177),'onJobId':_0x248b73=>{const _0x2ab742=_0x543109;_0x21e0ac[_0x2ab742(0x171)](_0x248b73);}});return _0x3c7500;},{'verbose':_0x5144a3['verbose']});return buildSchemaResult(_0x2a9420[_0x1430db(0x14f)]);}export function displayFieldsHumanReadable(_0xfa600f,_0x36f09d){const _0x2a15ec=a100_0x38fe,_0x135a7e=_0xfa600f[_0x2a15ec(0x145)](_0x3eaf12=>_0x3eaf12[_0x2a15ec(0x167)]===_0x2a15ec(0x144)),_0x5e7bee=_0xfa600f[_0x2a15ec(0x145)](_0x138f40=>_0x138f40[_0x2a15ec(0x167)]===_0x2a15ec(0x164)),_0x110cdf=new Map();for(const _0x3aec56 of _0x135a7e){const _0x6e41a0=_0x3aec56[_0x2a15ec(0x16b)]||_0x3aec56[_0x2a15ec(0x15c)]||_0x2a15ec(0x163),_0x1eecbd=_0x110cdf[_0x2a15ec(0x166)](_0x6e41a0);_0x1eecbd?_0x1eecbd[_0x2a15ec(0x162)][_0x2a15ec(0x178)](_0x3aec56):_0x110cdf['set'](_0x6e41a0,{'displayName':_0x6e41a0,'tableName':_0x3aec56[_0x2a15ec(0x15c)],'fields':[_0x3aec56]});}const _0x29d9a4=new Map();for(const _0x79f3 of _0x5e7bee){const _0x5a52a5=_0x79f3[_0x2a15ec(0x149)]||'Unknown',_0x38cb11=_0x29d9a4['get'](_0x5a52a5)||[];_0x38cb11['push'](_0x79f3),_0x29d9a4['set'](_0x5a52a5,_0x38cb11);}console[_0x2a15ec(0x173)]('\x0a'+a100_0x31f689[_0x2a15ec(0x160)](_0x36f09d));if(_0x110cdf[_0x2a15ec(0x15e)]>0x0){console[_0x2a15ec(0x173)]('\x0a'+a100_0x31f689[_0x2a15ec(0x176)](_0x2a15ec(0x143)));const _0x5c0452=[..._0x110cdf['entries']()][_0x2a15ec(0x168)]((_0x4a0743,_0x34d246)=>_0x4a0743[0x0][_0x2a15ec(0x161)](_0x34d246[0x0]));for(const [,_0x10ed88]of _0x5c0452){const _0x51521b=_0x10ed88[_0x2a15ec(0x151)]&&_0x10ed88[_0x2a15ec(0x151)]!==_0x10ed88[_0x2a15ec(0x16d)]?'\x20'+a100_0x31f689[_0x2a15ec(0x176)]('('+_0x10ed88[_0x2a15ec(0x151)]+')'):'';console[_0x2a15ec(0x173)]('\x20\x20'+a100_0x31f689[_0x2a15ec(0x160)](_0x10ed88['displayName'])+_0x51521b);const _0x412dfb=[..._0x10ed88[_0x2a15ec(0x162)]][_0x2a15ec(0x168)]((_0xc2e5df,_0xb552b4)=>_0xc2e5df['name'][_0x2a15ec(0x161)](_0xb552b4['name']));for(const _0x878f9a of _0x412dfb){const _0x148f5a=_0x878f9a['parentColumn']&&_0x878f9a['parentColumn']!==_0x878f9a[_0x2a15ec(0x159)]?'\x20'+a100_0x31f689['dim']('('+_0x878f9a[_0x2a15ec(0x165)]+')'):'';console[_0x2a15ec(0x173)]('\x20\x20\x20\x20'+_0x878f9a['name']+_0x148f5a+':\x20'+a100_0x31f689[_0x2a15ec(0x146)](_0x878f9a['type']));}}}if(_0x29d9a4[_0x2a15ec(0x15e)]>0x0){console['error']('\x0a'+a100_0x31f689[_0x2a15ec(0x176)]('Behaviors'));const _0x4c3abc=[..._0x29d9a4[_0x2a15ec(0x153)]()][_0x2a15ec(0x168)]((_0x39e5e5,_0x126c34)=>_0x39e5e5[0x0][_0x2a15ec(0x161)](_0x126c34[0x0]));for(const [_0x37c775,_0x141509]of _0x4c3abc){const _0x17e412=_0x141509[0x0],_0x480714=_0x17e412?.[_0x2a15ec(0x15c)]||'';console[_0x2a15ec(0x173)]('\x20\x20'+a100_0x31f689[_0x2a15ec(0x160)](_0x37c775)+(_0x480714?'\x20'+a100_0x31f689[_0x2a15ec(0x176)]('('+_0x480714+')'):''));const _0x4cee3c=[..._0x141509]['sort']((_0x2cba66,_0x33c2c6)=>_0x2cba66['name'][_0x2a15ec(0x161)](_0x33c2c6[_0x2a15ec(0x159)]));for(const _0x5417e4 of _0x4cee3c){const _0xe789e3=_0x5417e4[_0x2a15ec(0x159)][_0x2a15ec(0x15d)](_0x37c775+'.')?_0x5417e4[_0x2a15ec(0x159)]['slice'](_0x37c775['length']+0x1):_0x5417e4[_0x2a15ec(0x159)],_0x3cded8=_0x5417e4[_0x2a15ec(0x165)]&&_0x5417e4[_0x2a15ec(0x165)]!==_0xe789e3?'\x20'+a100_0x31f689['dim']('('+_0x5417e4[_0x2a15ec(0x165)]+')'):'';console[_0x2a15ec(0x173)]('\x20\x20\x20\x20'+_0xe789e3+_0x3cded8+':\x20'+a100_0x31f689[_0x2a15ec(0x146)](_0x5417e4[_0x2a15ec(0x157)]));}}}console[_0x2a15ec(0x173)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x515810,_0x11c61f){const _0x48ee95=a101_0x4660,_0x1912fe=_0x515810();while(!![]){try{const _0xe2bf30=-parseInt(_0x48ee95(0x8f))/0x1+-parseInt(_0x48ee95(0x95))/0x2*(parseInt(_0x48ee95(0x97))/0x3)+-parseInt(_0x48ee95(0x8d))/0x4+-parseInt(_0x48ee95(0x9a))/0x5*(parseInt(_0x48ee95(0x8c))/0x6)+-parseInt(_0x48ee95(0x92))/0x7+parseInt(_0x48ee95(0x9b))/0x8*(parseInt(_0x48ee95(0x90))/0x9)+parseInt(_0x48ee95(0x9c))/0xa;if(_0xe2bf30===_0x11c61f)break;else _0x1912fe['push'](_0x1912fe['shift']());}catch(_0xc008c5){_0x1912fe['push'](_0x1912fe['shift']());}}}(a101_0x525b,0xe2eb4));import*as a101_0x3bfc5e from'node:fs';import*as a101_0x112a38 from'node:path';export function setSecureFilePermissions(_0x1bf5b9){const _0x1bca0a=a101_0x4660;try{a101_0x3bfc5e[_0x1bca0a(0x9e)](_0x1bf5b9,0x180);}catch{console[_0x1bca0a(0x89)](_0x1bca0a(0x8b)+_0x1bf5b9);}}export function setSecureDirectoryPermissions(_0x1a85cb){const _0x4771e2=a101_0x4660;try{a101_0x3bfc5e[_0x4771e2(0x9e)](_0x1a85cb,0x1c0);}catch{console[_0x4771e2(0x89)](_0x4771e2(0x8b)+_0x1a85cb);}}export function createSecureDirectory(_0x5273e8){const _0x4befb3=a101_0x4660;!a101_0x3bfc5e[_0x4befb3(0x9d)](_0x5273e8)&&(a101_0x3bfc5e[_0x4befb3(0x8a)](_0x5273e8,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x5273e8));}function a101_0x525b(){const _0xa5d45c=['30yBGASv','1488876mtmPdC','Should\x20be\x200600\x20or\x20more\x20restrictive.','1126257imVSxR','4159953pQrqPu','statSync','1669423qACpfT','\x20has\x20insecure\x20permissions\x20(','mode','3661206jfKXPt','toString','3JRTfSq',').\x20','Warning:\x20','1408225eGgtBp','16syWwxl','49808190cnurtW','existsSync','chmodSync','dirname','warn','mkdirSync','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'];a101_0x525b=function(){return _0xa5d45c;};return a101_0x525b();}export function validateSecureFilePermissions(_0x70dfad){const _0x54b985=a101_0x4660;try{const _0x3851ad=a101_0x3bfc5e[_0x54b985(0x91)](_0x70dfad),_0x484725=_0x3851ad[_0x54b985(0x94)]&0x1ff,_0x4d904f=(_0x484725&0x3f)!==0x0;if(_0x4d904f)return console[_0x54b985(0x89)](_0x54b985(0x99)+_0x70dfad+_0x54b985(0x93)+_0x484725[_0x54b985(0x96)](0x8)+_0x54b985(0x98)+_0x54b985(0x8e)),![];return!![];}catch{return!![];}}function a101_0x4660(_0x115fd2,_0x1e3163){_0x115fd2=_0x115fd2-0x88;const _0x525ba5=a101_0x525b();let _0x466048=_0x525ba5[_0x115fd2];return _0x466048;}export function writeSecureFile(_0x6bc136,_0x5e795d){const _0x24f3a8=a101_0x4660,_0x1287c4=a101_0x112a38[_0x24f3a8(0x88)](_0x6bc136);createSecureDirectory(_0x1287c4),a101_0x3bfc5e['writeFileSync'](_0x6bc136,_0x5e795d,{'mode':0x180}),setSecureFilePermissions(_0x6bc136);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a102_0x5b12(_0x56b24f,_0x295e9c){_0x56b24f=_0x56b24f-0x70;const _0x3525ca=a102_0x3525();let _0x5b1283=_0x3525ca[_0x56b24f];return _0x5b1283;}(function(_0x4dc0be,_0x329da0){const _0x449311=a102_0x5b12,_0xdd9a7f=_0x4dc0be();while(!![]){try{const _0x1d5502=-parseInt(_0x449311(0x7a))/0x1+parseInt(_0x449311(0x73))/0x2*(parseInt(_0x449311(0x7f))/0x3)+-parseInt(_0x449311(0x76))/0x4+parseInt(_0x449311(0x77))/0x5*(parseInt(_0x449311(0x81))/0x6)+-parseInt(_0x449311(0x78))/0x7*(-parseInt(_0x449311(0x75))/0x8)+parseInt(_0x449311(0x80))/0x9+-parseInt(_0x449311(0x7e))/0xa;if(_0x1d5502===_0x329da0)break;else _0xdd9a7f['push'](_0xdd9a7f['shift']());}catch(_0x445a8a){_0xdd9a7f['push'](_0xdd9a7f['shift']());}}}(a102_0x3525,0xa7414));export function detectFormatFromExtension(_0x587cb9){const _0x416ac4=a102_0x5b12,_0x31950a=_0x587cb9[_0x416ac4(0x7b)]()[_0x416ac4(0x72)]('.')[_0x416ac4(0x79)]();switch(_0x31950a){case _0x416ac4(0x74):return'json';case _0x416ac4(0x82):return _0x416ac4(0x82);case _0x416ac4(0x70):case _0x416ac4(0x71):return _0x416ac4(0x70);case _0x416ac4(0x7d):case'text':return _0x416ac4(0x7c);default:return undefined;}}function a102_0x3525(){const _0x38ca3d=['8tmyQoR','1561968NxSzba','95SLgMXm','9264703xKvNXa','pop','509887UHXWUh','toLowerCase','table','txt','31866860QgdWdM','51FtzZeG','12056265pkSQYq','255072GffQzC','jsonl','tsv','tab','split','153094cxGQDo','json'];a102_0x3525=function(){return _0x38ca3d;};return a102_0x3525();}export function resolveOutputFormat(_0x2fdc47,_0x10aa09,_0x3d97b0){if(_0x2fdc47)return _0x2fdc47;if(_0x10aa09){const _0x4ac7db=detectFormatFromExtension(_0x10aa09);if(_0x4ac7db)return _0x4ac7db;}return _0x3d97b0;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x154f3e,_0x4f01bb){const _0x467f05=a103_0x2544,_0x2f3959=_0x154f3e();while(!![]){try{const _0x57a89c=parseInt(_0x467f05(0x1e5))/0x1*(parseInt(_0x467f05(0x1e9))/0x2)+parseInt(_0x467f05(0x1be))/0x3*(-parseInt(_0x467f05(0x1d7))/0x4)+parseInt(_0x467f05(0x1dd))/0x5+parseInt(_0x467f05(0x1ca))/0x6*(-parseInt(_0x467f05(0x1cf))/0x7)+-parseInt(_0x467f05(0x1c0))/0x8*(parseInt(_0x467f05(0x1c6))/0x9)+-parseInt(_0x467f05(0x1f1))/0xa*(parseInt(_0x467f05(0x1d8))/0xb)+-parseInt(_0x467f05(0x1d9))/0xc*(-parseInt(_0x467f05(0x1de))/0xd);if(_0x57a89c===_0x4f01bb)break;else _0x2f3959['push'](_0x2f3959['shift']());}catch(_0x30e814){_0x2f3959['push'](_0x2f3959['shift']());}}}(a103_0x305d,0x77da8));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 a103_0x2544(_0x115574,_0x362071){_0x115574=_0x115574-0x1bb;const _0x305d89=a103_0x305d();let _0x254464=_0x305d89[_0x115574];return _0x254464;}function a103_0x305d(){const _0x2cd659=['187HJHDDt','260412DyImVj','boolean','jsonl','max','474720MNaWTj','1105JLcUkn','map','\x20rows\x20(','test','padEnd','\x20shown)','toString','2xwQUdi','stringify','double','bool','445508ZGHqUW','replace','toLowerCase','number','\x20row','forEach','0\x20B','push','298040oDIKCq','toFixed','No\x20rows\x20returned','reduce','slice','repeat','3dnwGxb','tsv','46456plZldV','row','long','array','substring','columns','207hKpgHN','timestamp','stdout','string','3311754xWJQHS','toISOString','log','name','join','7ylKRbb','int','floor','false','object','length','min','data','2807716PZidgx'];a103_0x305d=function(){return _0x2cd659;};return a103_0x305d();}function getTerminalWidth(){const _0x462677=a103_0x2544;return process[_0x462677(0x1c8)][_0x462677(0x1c5)]||Infinity;}export function formatAsTable(_0x54a1cb,_0x2d2470=DEFAULT_MAX_DISPLAY_ROWS,_0x22c8f2=![],_0x127a23={}){const _0x4a5a8b=a103_0x2544;if(_0x54a1cb['data'][_0x4a5a8b(0x1d4)]===0x0)return _0x4a5a8b(0x1f3);const _0x14d9f9=_0x54a1cb[_0x4a5a8b(0x1c5)][_0x4a5a8b(0x1df)](_0x2e4a07=>_0x2e4a07['name']),_0x56ff39=_0x54a1cb[_0x4a5a8b(0x1c5)][_0x4a5a8b(0x1df)](_0x13405d=>simplifyType(_0x13405d['type'])),_0x3572ce=_0x54a1cb['data'][_0x4a5a8b(0x1bc)](0x0,_0x2d2470),_0x593ba1=_0x54a1cb[_0x4a5a8b(0x1d6)][_0x4a5a8b(0x1d4)],_0x181d91=_0x593ba1>_0x2d2470,_0x3272a6=[],_0x3fa931=getTerminalWidth(),_0x4349f1=_0x3fa931!==Infinity,_0x284b44=0x32;let _0x18f28d=_0x14d9f9[_0x4a5a8b(0x1df)]((_0x1506e8,_0x3b99f4)=>{const _0x2b84b6=_0x4a5a8b,_0x577b08=stringWidth(_0x56ff39[_0x3b99f4]),_0x1d458c=Math[_0x2b84b6(0x1dc)](..._0x3572ce[_0x2b84b6(0x1df)](_0x399b8b=>{const _0x498f0d=_0x399b8b[_0x1506e8];return stringWidth(formatValue(_0x498f0d));})),_0x15c147=Math[_0x2b84b6(0x1dc)](stringWidth(_0x1506e8),_0x577b08,_0x1d458c);return _0x22c8f2?_0x15c147:Math['min'](_0x15c147,_0x284b44);});if(_0x4349f1&&!_0x22c8f2&&_0x14d9f9['length']>0x0){const _0x246c86=_0x1e98c0=>{let _0x1997a8=0x1;for(const _0x18eeea of _0x1e98c0){_0x1997a8+=_0x18eeea+0x3;}return _0x1997a8+0x1;};let _0x3acde9=_0x246c86(_0x18f28d);if(_0x3acde9>_0x3fa931){const _0x96e94b=0x3;for(let _0x311949=_0x18f28d[_0x4a5a8b(0x1d4)]-0x1;_0x311949>=0x0;_0x311949--){_0x3acde9=_0x246c86(_0x18f28d);if(_0x3acde9<=_0x3fa931)break;const _0x328214=_0x18f28d[_0x311949],_0x36dddd=_0x3acde9-_0x3fa931,_0x531117=_0x328214-_0x96e94b,_0x3e6ddf=Math[_0x4a5a8b(0x1d5)](_0x36dddd,_0x531117);_0x3e6ddf>0x0&&(_0x18f28d[_0x311949]=_0x328214-_0x3e6ddf);}}}const _0x358301=_0x14d9f9,_0x41487e=_0x56ff39,_0x1985a8=_0x18f28d,_0x1fd95c=_0x18f28d;_0x3272a6[_0x4a5a8b(0x1f0)](colorBorder('┌'+_0x1fd95c[_0x4a5a8b(0x1df)](_0x398439=>'─'[_0x4a5a8b(0x1bd)](_0x398439+0x2))['join']('┬')+'┐',_0x127a23));const _0x45b7a1=_0x358301[_0x4a5a8b(0x1df)]((_0x326f77,_0x1d8ba1)=>centerAlign(_0x326f77,_0x1985a8[_0x1d8ba1]));_0x3272a6['push'](colorBorder('│',_0x127a23)+'\x20'+_0x45b7a1['join']('\x20'+colorBorder('│',_0x127a23)+'\x20')+'\x20'+colorBorder('│',_0x127a23));const _0x4f9acf=_0x41487e[_0x4a5a8b(0x1df)]((_0x221960,_0x4b7d1d)=>colorType(centerAlign(_0x221960,_0x1985a8[_0x4b7d1d]),_0x127a23));_0x3272a6[_0x4a5a8b(0x1f0)](colorBorder('│',_0x127a23)+'\x20'+_0x4f9acf[_0x4a5a8b(0x1ce)]('\x20'+colorBorder('│',_0x127a23)+'\x20')+'\x20'+colorBorder('│',_0x127a23)),_0x3272a6[_0x4a5a8b(0x1f0)](colorBorder('├'+_0x1fd95c[_0x4a5a8b(0x1df)](_0x65c7e7=>'─'[_0x4a5a8b(0x1bd)](_0x65c7e7+0x2))[_0x4a5a8b(0x1ce)]('┼')+'┤',_0x127a23));const _0x150bdc=(_0x1c346f,_0x5996ae)=>{const _0x47f401=_0x4a5a8b,_0xc96755=stringWidth(_0x1c346f);if(_0xc96755<=_0x5996ae)return _0x1c346f;let _0x42b1d4=_0x1c346f;while(stringWidth(_0x42b1d4+'…')>_0x5996ae&&_0x42b1d4['length']>0x0){_0x42b1d4=_0x42b1d4[_0x47f401(0x1bc)](0x0,-0x1);}return _0x42b1d4+'…';};_0x3572ce[_0x4a5a8b(0x1ee)](_0x24969a=>{const _0x82cf95=_0x4a5a8b,_0x10b211=_0x14d9f9[_0x82cf95(0x1df)]((_0x3ceabc,_0x205fea)=>{const _0x30db7e=_0x82cf95,_0x24d05d=_0x24969a[_0x3ceabc],_0x568fb3=formatValue(_0x24d05d),_0x188115=_0x1985a8[_0x205fea],_0x5b7b02=_0x150bdc(_0x568fb3,_0x188115),_0x5583ce=typeof _0x24d05d===_0x30db7e(0x1ec)||typeof _0x24d05d===_0x30db7e(0x1c9)&&/^-?\d+$/[_0x30db7e(0x1e1)](_0x24d05d);return _0x5583ce?padStart(_0x5b7b02,_0x188115):padEnd(_0x5b7b02,_0x188115);});_0x3272a6[_0x82cf95(0x1f0)](colorBorder('│',_0x127a23)+'\x20'+_0x10b211['join']('\x20'+colorBorder('│',_0x127a23)+'\x20')+'\x20'+colorBorder('│',_0x127a23));});const _0x3f0b1d=_0x1fd95c[_0x4a5a8b(0x1bb)]((_0x2e942e,_0x3e47a2)=>_0x2e942e+_0x3e47a2+0x3,-0x1);_0x3272a6[_0x4a5a8b(0x1f0)](colorBorder('├'+_0x1fd95c[_0x4a5a8b(0x1df)](_0x3c16cc=>'─'[_0x4a5a8b(0x1bd)](_0x3c16cc+0x2))[_0x4a5a8b(0x1ce)]('┴')+'┤',_0x127a23));let _0x2863dd;_0x181d91?_0x2863dd=_0x593ba1+_0x4a5a8b(0x1e0)+_0x2d2470+_0x4a5a8b(0x1e3):_0x2863dd=_0x593ba1+_0x4a5a8b(0x1ed)+(_0x593ba1===0x1?'':'s');const _0x32187e=_0x2863dd[_0x4a5a8b(0x1e2)](_0x3f0b1d-0x2);return _0x3272a6[_0x4a5a8b(0x1f0)](colorBorder('│',_0x127a23)+'\x20'+_0x32187e+'\x20'+colorBorder('│',_0x127a23)),_0x3272a6[_0x4a5a8b(0x1f0)](colorBorder('└'+'─'[_0x4a5a8b(0x1bd)](_0x3f0b1d)+'┘',_0x127a23)),_0x3272a6[_0x4a5a8b(0x1ce)]('\x0a');}function simplifyType(_0x15e55f){const _0x7ea09c=a103_0x2544,_0x1fffd6={'varchar':_0x7ea09c(0x1c9),'bigint':_0x7ea09c(0x1c2),'integer':_0x7ea09c(0x1d0),'double':_0x7ea09c(0x1e7),'boolean':_0x7ea09c(0x1e8),'date':'date','timestamp':_0x7ea09c(0x1c7),'array':_0x7ea09c(0x1c3),'map':_0x7ea09c(0x1df),'row':_0x7ea09c(0x1c1)},_0x344f2b=_0x15e55f[_0x7ea09c(0x1eb)]();for(const [_0x1b8873,_0x50d57c]of Object['entries'](_0x1fffd6)){if(_0x344f2b['startsWith'](_0x1b8873))return _0x50d57c;}return _0x15e55f[_0x7ea09c(0x1d4)]>0xa?_0x15e55f[_0x7ea09c(0x1c4)](0x0,0xa):_0x15e55f;}export function formatAsJSON(_0x1602cb,_0x2a7ae1={}){const _0x2b127d=a103_0x2544;if(_0x1602cb[_0x2b127d(0x1d6)][_0x2b127d(0x1d4)]===0x0)return'[]';if(shouldUseColor(_0x2a7ae1))return colorizeJSON(_0x1602cb['data'],_0x2a7ae1);const _0x39682b=_0x1602cb[_0x2b127d(0x1d6)][_0x2b127d(0x1df)](_0x4cff7a=>'\x20\x20'+JSON[_0x2b127d(0x1e6)](_0x4cff7a));return'[\x0a'+_0x39682b[_0x2b127d(0x1ce)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x4196ea,_0x4fed78={}){const _0xdae9f3=a103_0x2544;if(_0x4196ea['data'][_0xdae9f3(0x1d4)]===0x0)return'';if(shouldUseColor(_0x4fed78))return _0x4196ea[_0xdae9f3(0x1d6)][_0xdae9f3(0x1df)](_0x5c320f=>colorizeJSONCompact(_0x5c320f,_0x4fed78))[_0xdae9f3(0x1ce)]('\x0a');return _0x4196ea[_0xdae9f3(0x1d6)][_0xdae9f3(0x1df)](_0x1f8ffd=>JSON[_0xdae9f3(0x1e6)](_0x1f8ffd))[_0xdae9f3(0x1ce)]('\x0a');}export function formatAsTSV(_0x5328b3){const _0x166f1a=a103_0x2544;if(_0x5328b3[_0x166f1a(0x1d6)][_0x166f1a(0x1d4)]===0x0)return'';const _0x5cf893=[],_0x4571cb=_0x5328b3[_0x166f1a(0x1c5)]['map'](_0x125b49=>_0x125b49[_0x166f1a(0x1cd)]);return _0x5cf893[_0x166f1a(0x1f0)](_0x4571cb[_0x166f1a(0x1ce)]('\x09')),_0x5328b3['data'][_0x166f1a(0x1ee)](_0x53005b=>{const _0x556dab=_0x166f1a,_0x3f1723=_0x4571cb[_0x556dab(0x1df)](_0x5e5bba=>{const _0x1169ad=_0x53005b[_0x5e5bba];return formatValueForTSV(_0x1169ad);});_0x5cf893['push'](_0x3f1723['join']('\x09'));}),_0x5cf893[_0x166f1a(0x1ce)]('\x0a');}function formatValue(_0x5352ab){const _0x2c7b31=a103_0x2544;if(_0x5352ab===null||_0x5352ab===undefined)return'';if(typeof _0x5352ab===_0x2c7b31(0x1c9)){const _0x22ceff=_0x5352ab[_0x2c7b31(0x1ea)](/\n/g,'\x5cn')[_0x2c7b31(0x1ea)](/\r/g,'\x5cr')[_0x2c7b31(0x1ea)](/\t/g,'\x5ct');return _0x22ceff;}if(typeof _0x5352ab==='number')return String(_0x5352ab);if(typeof _0x5352ab==='boolean')return _0x5352ab?'true':_0x2c7b31(0x1d2);if(_0x5352ab instanceof Date)return _0x5352ab['toISOString']();if(typeof _0x5352ab===_0x2c7b31(0x1d3))return JSON['stringify'](_0x5352ab);return String(_0x5352ab);}function formatValueForTSV(_0x4a6842){const _0xeaece4=a103_0x2544;if(_0x4a6842===null||_0x4a6842===undefined)return'';if(typeof _0x4a6842===_0xeaece4(0x1c9))return _0x4a6842[_0xeaece4(0x1ea)](/\t/g,'\x5ct')[_0xeaece4(0x1ea)](/\n/g,'\x5cn');if(typeof _0x4a6842===_0xeaece4(0x1ec)||typeof _0x4a6842===_0xeaece4(0x1da))return String(_0x4a6842);if(_0x4a6842 instanceof Date)return _0x4a6842[_0xeaece4(0x1cb)]();if(typeof _0x4a6842===_0xeaece4(0x1d3))return JSON[_0xeaece4(0x1e6)](_0x4a6842);return String(_0x4a6842);}export function formatQueryResult(_0x287932,_0x4aca25){const _0x50a857=a103_0x2544;switch(_0x4aca25){case'table':return formatAsTable(_0x287932);case'json':return formatAsJSON(_0x287932);case _0x50a857(0x1db):return formatAsJSONL(_0x287932);case _0x50a857(0x1bf):return formatAsTSV(_0x287932);default:return formatAsJSON(_0x287932);}}export function formatBytes(_0x5479dc){const _0x8d191a=a103_0x2544;if(_0x5479dc===0x0)return _0x8d191a(0x1ef);const _0x426fa4=['B','KB','MB','GB','TB'],_0x370b2a=0x400,_0x59cfbc=Math[_0x8d191a(0x1d1)](Math['log'](_0x5479dc)/Math[_0x8d191a(0x1cc)](_0x370b2a)),_0x5b45da=_0x5479dc/Math['pow'](_0x370b2a,_0x59cfbc),_0x19a4cf=_0x5b45da>=0xa?0x1:0x2;return _0x5b45da[_0x8d191a(0x1f2)](_0x19a4cf)+'\x20'+_0x426fa4[_0x59cfbc];}export function formatRows(_0x2cdafa){const _0x5a8570=a103_0x2544;if(_0x2cdafa==null)return'-';if(_0x2cdafa===0x0)return'0';if(_0x2cdafa<0x3e8)return _0x2cdafa[_0x5a8570(0x1e4)]();const _0x179397=['','K','M','B','T'],_0x475a92=0x3e8,_0xd8b497=Math['floor'](Math[_0x5a8570(0x1cc)](_0x2cdafa)/Math['log'](_0x475a92)),_0x538151=_0x2cdafa/Math['pow'](_0x475a92,_0xd8b497),_0x1b03b8=_0x538151>=0xa?0x1:0x2;return''+_0x538151['toFixed'](_0x1b03b8)+_0x179397[_0xd8b497];}
|
|
1
|
+
(function(_0x44bb8e,_0x557f1f){const _0x57317c=a103_0x2a82,_0x24e9ed=_0x44bb8e();while(!![]){try{const _0x2bb092=-parseInt(_0x57317c(0x101))/0x1*(parseInt(_0x57317c(0x128))/0x2)+-parseInt(_0x57317c(0x114))/0x3*(-parseInt(_0x57317c(0x10e))/0x4)+parseInt(_0x57317c(0x110))/0x5+parseInt(_0x57317c(0xfe))/0x6*(-parseInt(_0x57317c(0xf6))/0x7)+parseInt(_0x57317c(0x124))/0x8+-parseInt(_0x57317c(0x104))/0x9*(parseInt(_0x57317c(0x117))/0xa)+parseInt(_0x57317c(0x12c))/0xb*(parseInt(_0x57317c(0x121))/0xc);if(_0x2bb092===_0x557f1f)break;else _0x24e9ed['push'](_0x24e9ed['shift']());}catch(_0x35bec3){_0x24e9ed['push'](_0x24e9ed['shift']());}}}(a103_0x9349,0x2f284));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 _0x580648=a103_0x2a82;return process[_0x580648(0x12b)]['columns']||Infinity;}function a103_0x9349(){const _0x5177a5=['push','jsonl','timestamp','max','entries','397908kbfRhJ','toFixed','true','892056GrKbdJ','replace','repeat','object','4676qKzylK','false','substring','stdout','110DVoOiZ','log','23954AIGakV','test','number','toISOString','toLowerCase','columns','row','long','426wlYLwJ','forEach','string','139KQgsdl','table','\x20rows\x20(','20187vpCnoP','pow','startsWith','min','0\x20B','stringify','bool','slice','type','length','7740ARCDcq','data','1576660WcSbhf','floor','name','tsv','258xsnrMF','join','date','730ZfmGha','No\x20rows\x20returned','map','\x20row','int'];a103_0x9349=function(){return _0x5177a5;};return a103_0x9349();}export function formatAsTable(_0x10760a,_0x3f7f52=DEFAULT_MAX_DISPLAY_ROWS,_0x3dd773=![],_0x25623e={}){const _0x49a09d=a103_0x2a82;if(_0x10760a[_0x49a09d(0x10f)][_0x49a09d(0x10d)]===0x0)return _0x49a09d(0x118);const _0xfeeb55=_0x10760a[_0x49a09d(0xfb)][_0x49a09d(0x119)](_0xcf712a=>_0xcf712a[_0x49a09d(0x112)]),_0x4ab811=_0x10760a[_0x49a09d(0xfb)][_0x49a09d(0x119)](_0x4e66f6=>simplifyType(_0x4e66f6[_0x49a09d(0x10c)])),_0x5acc12=_0x10760a['data'][_0x49a09d(0x10b)](0x0,_0x3f7f52),_0xb737dd=_0x10760a[_0x49a09d(0x10f)][_0x49a09d(0x10d)],_0x5ab3f7=_0xb737dd>_0x3f7f52,_0x210041=[],_0x5bd595=getTerminalWidth(),_0xbe9491=_0x5bd595!==Infinity,_0x15831c=0x32;let _0x49791f=_0xfeeb55[_0x49a09d(0x119)]((_0x1660af,_0x5b5d91)=>{const _0x4b6792=_0x49a09d,_0x2f1674=stringWidth(_0x4ab811[_0x5b5d91]),_0x577288=Math[_0x4b6792(0x11f)](..._0x5acc12[_0x4b6792(0x119)](_0x404907=>{const _0x5ae099=_0x404907[_0x1660af];return stringWidth(formatValue(_0x5ae099));})),_0x2fcead=Math['max'](stringWidth(_0x1660af),_0x2f1674,_0x577288);return _0x3dd773?_0x2fcead:Math[_0x4b6792(0x107)](_0x2fcead,_0x15831c);});if(_0xbe9491&&!_0x3dd773&&_0xfeeb55[_0x49a09d(0x10d)]>0x0){const _0x418807=_0x417041=>{let _0x4918a0=0x1;for(const _0x4c4313 of _0x417041){_0x4918a0+=_0x4c4313+0x3;}return _0x4918a0+0x1;};let _0x2193b4=_0x418807(_0x49791f);if(_0x2193b4>_0x5bd595){const _0x40d5f1=0x3;for(let _0x1f0d55=_0x49791f[_0x49a09d(0x10d)]-0x1;_0x1f0d55>=0x0;_0x1f0d55--){_0x2193b4=_0x418807(_0x49791f);if(_0x2193b4<=_0x5bd595)break;const _0x6e9a5a=_0x49791f[_0x1f0d55],_0x453927=_0x2193b4-_0x5bd595,_0x3c9299=_0x6e9a5a-_0x40d5f1,_0x472987=Math[_0x49a09d(0x107)](_0x453927,_0x3c9299);_0x472987>0x0&&(_0x49791f[_0x1f0d55]=_0x6e9a5a-_0x472987);}}}const _0x468c34=_0xfeeb55,_0x2efa3d=_0x4ab811,_0x5e52a3=_0x49791f,_0x1c7ac2=_0x49791f;_0x210041[_0x49a09d(0x11c)](colorBorder('┌'+_0x1c7ac2['map'](_0xb716b5=>'─'['repeat'](_0xb716b5+0x2))[_0x49a09d(0x115)]('┬')+'┐',_0x25623e));const _0x1aca93=_0x468c34[_0x49a09d(0x119)]((_0x1b41eb,_0x35fff7)=>centerAlign(_0x1b41eb,_0x5e52a3[_0x35fff7]));_0x210041[_0x49a09d(0x11c)](colorBorder('│',_0x25623e)+'\x20'+_0x1aca93[_0x49a09d(0x115)]('\x20'+colorBorder('│',_0x25623e)+'\x20')+'\x20'+colorBorder('│',_0x25623e));const _0x23e36c=_0x2efa3d[_0x49a09d(0x119)]((_0x4dfc25,_0x5c18b4)=>colorType(centerAlign(_0x4dfc25,_0x5e52a3[_0x5c18b4]),_0x25623e));_0x210041['push'](colorBorder('│',_0x25623e)+'\x20'+_0x23e36c[_0x49a09d(0x115)]('\x20'+colorBorder('│',_0x25623e)+'\x20')+'\x20'+colorBorder('│',_0x25623e)),_0x210041['push'](colorBorder('├'+_0x1c7ac2[_0x49a09d(0x119)](_0x2f1a0e=>'─'['repeat'](_0x2f1a0e+0x2))[_0x49a09d(0x115)]('┼')+'┤',_0x25623e));const _0x5babed=(_0x5af477,_0x193203)=>{const _0x183b5b=_0x49a09d,_0x348924=stringWidth(_0x5af477);if(_0x348924<=_0x193203)return _0x5af477;let _0x1fdfd7=_0x5af477;while(stringWidth(_0x1fdfd7+'…')>_0x193203&&_0x1fdfd7[_0x183b5b(0x10d)]>0x0){_0x1fdfd7=_0x1fdfd7[_0x183b5b(0x10b)](0x0,-0x1);}return _0x1fdfd7+'…';};_0x5acc12[_0x49a09d(0xff)](_0x2db2c9=>{const _0x5a1f5e=_0x49a09d,_0x349da2=_0xfeeb55['map']((_0x389cc8,_0x49c28f)=>{const _0x334db2=a103_0x2a82,_0x235afe=_0x2db2c9[_0x389cc8],_0x6fe0bb=formatValue(_0x235afe),_0x45aea3=_0x5e52a3[_0x49c28f],_0x4b11ed=_0x5babed(_0x6fe0bb,_0x45aea3),_0x170458=typeof _0x235afe===_0x334db2(0xf8)||typeof _0x235afe===_0x334db2(0x100)&&/^-?\d+$/[_0x334db2(0xf7)](_0x235afe);return _0x170458?padStart(_0x4b11ed,_0x45aea3):padEnd(_0x4b11ed,_0x45aea3);});_0x210041[_0x5a1f5e(0x11c)](colorBorder('│',_0x25623e)+'\x20'+_0x349da2['join']('\x20'+colorBorder('│',_0x25623e)+'\x20')+'\x20'+colorBorder('│',_0x25623e));});const _0x2091b5=_0x1c7ac2['reduce']((_0x133033,_0x1dafbe)=>_0x133033+_0x1dafbe+0x3,-0x1);_0x210041[_0x49a09d(0x11c)](colorBorder('├'+_0x1c7ac2[_0x49a09d(0x119)](_0x496abb=>'─'['repeat'](_0x496abb+0x2))['join']('┴')+'┤',_0x25623e));let _0x3ea224;_0x5ab3f7?_0x3ea224=_0xb737dd+_0x49a09d(0x103)+_0x3f7f52+'\x20shown)':_0x3ea224=_0xb737dd+_0x49a09d(0x11a)+(_0xb737dd===0x1?'':'s');const _0x21717d=_0x3ea224['padEnd'](_0x2091b5-0x2);return _0x210041[_0x49a09d(0x11c)](colorBorder('│',_0x25623e)+'\x20'+_0x21717d+'\x20'+colorBorder('│',_0x25623e)),_0x210041[_0x49a09d(0x11c)](colorBorder('└'+'─'[_0x49a09d(0x126)](_0x2091b5)+'┘',_0x25623e)),_0x210041[_0x49a09d(0x115)]('\x0a');}function simplifyType(_0x19d63c){const _0x943ed8=a103_0x2a82,_0x2ca5db={'varchar':'string','bigint':_0x943ed8(0xfd),'integer':_0x943ed8(0x11b),'double':'double','boolean':_0x943ed8(0x10a),'date':_0x943ed8(0x116),'timestamp':_0x943ed8(0x11e),'array':'array','map':_0x943ed8(0x119),'row':_0x943ed8(0xfc)},_0x23d4a0=_0x19d63c[_0x943ed8(0xfa)]();for(const [_0x2369f3,_0x1d1964]of Object[_0x943ed8(0x120)](_0x2ca5db)){if(_0x23d4a0[_0x943ed8(0x106)](_0x2369f3))return _0x1d1964;}return _0x19d63c[_0x943ed8(0x10d)]>0xa?_0x19d63c[_0x943ed8(0x12a)](0x0,0xa):_0x19d63c;}export function formatAsJSON(_0x3981b1,_0x4f0843={}){const _0x1c15ed=a103_0x2a82;if(_0x3981b1['data'][_0x1c15ed(0x10d)]===0x0)return'[]';if(shouldUseColor(_0x4f0843))return colorizeJSON(_0x3981b1[_0x1c15ed(0x10f)],_0x4f0843);const _0x464899=_0x3981b1[_0x1c15ed(0x10f)]['map'](_0x215fad=>'\x20\x20'+JSON[_0x1c15ed(0x109)](_0x215fad));return'[\x0a'+_0x464899[_0x1c15ed(0x115)](',\x0a')+'\x0a]';}function a103_0x2a82(_0x3bf607,_0xbd7044){_0x3bf607=_0x3bf607-0xf6;const _0x934923=a103_0x9349();let _0x2a829a=_0x934923[_0x3bf607];return _0x2a829a;}export function formatAsJSONL(_0xd9f644,_0x3f74c7={}){const _0x5301a0=a103_0x2a82;if(_0xd9f644[_0x5301a0(0x10f)][_0x5301a0(0x10d)]===0x0)return'';if(shouldUseColor(_0x3f74c7))return _0xd9f644[_0x5301a0(0x10f)][_0x5301a0(0x119)](_0x32e33b=>colorizeJSONCompact(_0x32e33b,_0x3f74c7))['join']('\x0a');return _0xd9f644[_0x5301a0(0x10f)]['map'](_0x3964eb=>JSON[_0x5301a0(0x109)](_0x3964eb))['join']('\x0a');}export function formatAsTSV(_0x4e20ff){const _0x50374f=a103_0x2a82;if(_0x4e20ff[_0x50374f(0x10f)]['length']===0x0)return'';const _0x265d81=[],_0x4d437c=_0x4e20ff[_0x50374f(0xfb)]['map'](_0x187044=>_0x187044[_0x50374f(0x112)]);return _0x265d81['push'](_0x4d437c[_0x50374f(0x115)]('\x09')),_0x4e20ff[_0x50374f(0x10f)][_0x50374f(0xff)](_0x56361f=>{const _0x8baf3=_0x50374f,_0x58c798=_0x4d437c[_0x8baf3(0x119)](_0x13f86b=>{const _0x3d1abe=_0x56361f[_0x13f86b];return formatValueForTSV(_0x3d1abe);});_0x265d81[_0x8baf3(0x11c)](_0x58c798[_0x8baf3(0x115)]('\x09'));}),_0x265d81['join']('\x0a');}function formatValue(_0x4f16b7){const _0x390a57=a103_0x2a82;if(_0x4f16b7===null||_0x4f16b7===undefined)return'';if(typeof _0x4f16b7==='string'){const _0x52f604=_0x4f16b7[_0x390a57(0x125)](/\n/g,'\x5cn')[_0x390a57(0x125)](/\r/g,'\x5cr')[_0x390a57(0x125)](/\t/g,'\x5ct');return _0x52f604;}if(typeof _0x4f16b7==='number')return String(_0x4f16b7);if(typeof _0x4f16b7==='boolean')return _0x4f16b7?_0x390a57(0x123):_0x390a57(0x129);if(_0x4f16b7 instanceof Date)return _0x4f16b7['toISOString']();if(typeof _0x4f16b7===_0x390a57(0x127))return JSON[_0x390a57(0x109)](_0x4f16b7);return String(_0x4f16b7);}function formatValueForTSV(_0x3d88dd){const _0x40f2d0=a103_0x2a82;if(_0x3d88dd===null||_0x3d88dd===undefined)return'';if(typeof _0x3d88dd==='string')return _0x3d88dd['replace'](/\t/g,'\x5ct')[_0x40f2d0(0x125)](/\n/g,'\x5cn');if(typeof _0x3d88dd===_0x40f2d0(0xf8)||typeof _0x3d88dd==='boolean')return String(_0x3d88dd);if(_0x3d88dd instanceof Date)return _0x3d88dd[_0x40f2d0(0xf9)]();if(typeof _0x3d88dd==='object')return JSON['stringify'](_0x3d88dd);return String(_0x3d88dd);}export function formatQueryResult(_0x2dfe37,_0xf83513){const _0x1943cf=a103_0x2a82;switch(_0xf83513){case _0x1943cf(0x102):return formatAsTable(_0x2dfe37);case'json':return formatAsJSON(_0x2dfe37);case _0x1943cf(0x11d):return formatAsJSONL(_0x2dfe37);case _0x1943cf(0x113):return formatAsTSV(_0x2dfe37);default:return formatAsJSON(_0x2dfe37);}}export function formatBytes(_0x468e3d){const _0xb99e6b=a103_0x2a82;if(_0x468e3d===0x0)return _0xb99e6b(0x108);const _0x491a3e=['B','KB','MB','GB','TB'],_0x2d97d7=0x400,_0x31d0b1=Math['floor'](Math['log'](_0x468e3d)/Math['log'](_0x2d97d7)),_0x4869a9=_0x468e3d/Math[_0xb99e6b(0x105)](_0x2d97d7,_0x31d0b1),_0x2dae03=_0x4869a9>=0xa?0x1:0x2;return _0x4869a9[_0xb99e6b(0x122)](_0x2dae03)+'\x20'+_0x491a3e[_0x31d0b1];}export function formatRows(_0x34d2a6){const _0x5d91fa=a103_0x2a82;if(_0x34d2a6==null)return'-';if(_0x34d2a6===0x0)return'0';if(_0x34d2a6<0x3e8)return _0x34d2a6['toString']();const _0xc5e500=['','K','M','B','T'],_0x401e3a=0x3e8,_0x42972f=Math[_0x5d91fa(0x111)](Math[_0x5d91fa(0x12d)](_0x34d2a6)/Math[_0x5d91fa(0x12d)](_0x401e3a)),_0x3888a0=_0x34d2a6/Math[_0x5d91fa(0x105)](_0x401e3a,_0x42972f),_0x2393ad=_0x3888a0>=0xa?0x1:0x2;return''+_0x3888a0[_0x5d91fa(0x122)](_0x2393ad)+_0xc5e500[_0x42972f];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b7046,_0x4fc290){const _0x282afc=a104_0xa73d,_0xbd10eb=_0x4b7046();while(!![]){try{const _0x4e2cbe=-parseInt(_0x282afc(0xb5))/0x1+parseInt(_0x282afc(0xcd))/0x2+-parseInt(_0x282afc(0xd5))/0x3*(parseInt(_0x282afc(0xb6))/0x4)+-parseInt(_0x282afc(0xc7))/0x5+parseInt(_0x282afc(0xb2))/0x6+-parseInt(_0x282afc(0xd3))/0x7+parseInt(_0x282afc(0xcc))/0x8*(parseInt(_0x282afc(0xb0))/0x9);if(_0x4e2cbe===_0x4fc290)break;else _0xbd10eb['push'](_0xbd10eb['shift']());}catch(_0x4ce257){_0xbd10eb['push'](_0xbd10eb['shift']());}}}(a104_0x5240,0xe8f81));export const SEGMENT_KIND_JOURNEY=0x3;export function sanitizeYamlKey(_0xa37ccd){const _0x470f63=a104_0xa73d;return _0xa37ccd[_0x470f63(0xc9)]()[_0x470f63(0xd0)](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')[_0x470f63(0xd0)](/_+/g,'_')[_0x470f63(0xd0)](/^_|_$/g,'');}function a104_0xa73d(_0x32f03a,_0x29bb50){_0x32f03a=_0x32f03a-0xad;const _0x524070=a104_0x5240();let _0xa73d37=_0x524070[_0x32f03a];return _0xa73d37;}export function generateJourneyLocalName(_0x10ba6a){const _0x342e62=a104_0xa73d,_0x1b1f01=_0x10ba6a['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x1b1f01){const _0x3885ff=_0x1b1f01[0x1][_0x342e62(0xc9)](),_0x1aad84=_0x1b1f01[0x2],_0x505ce8=_0x1aad84[_0x342e62(0xd0)](/-/g,'')[_0x342e62(0xbc)](0x0,0x4)[_0x342e62(0xc9)]();return _0x3885ff+'_'+_0x505ce8;}const _0x5308f9=_0x10ba6a[_0x342e62(0xae)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x5308f9){const _0x1c04f2=_0x5308f9[0x1],_0x32ba86=_0x5308f9[0x2][_0x342e62(0xc9)](),_0x4c42e1=_0x1c04f2[_0x342e62(0xd0)](/-/g,'')[_0x342e62(0xbc)](0x0,0x4)[_0x342e62(0xc9)]();return _0x32ba86+'_'+_0x4c42e1;}return undefined;}export function consolidateActivationsByContent(_0x1926fc){const _0x5e7146=a104_0xa73d,_0x56433b={},_0xe59e68=new Map(),_0x42ad53=new Map();for(const _0x23b3d2 of _0x1926fc){if(!_0x23b3d2)continue;for(const [_0x2ad98c,_0x3c2166]of Object['entries'](_0x23b3d2)){const _0x227bc8=JSON['stringify']({'name':_0x3c2166['name'],'connection':_0x3c2166[_0x5e7146(0xba)],'connector_config':_0x3c2166['connector_config']}),_0xbc63b9=_0x42ad53['get'](_0x227bc8);_0xbc63b9?_0xe59e68['set'](_0x2ad98c,_0xbc63b9):(_0x56433b[_0x2ad98c]=_0x3c2166,_0xe59e68[_0x5e7146(0xca)](_0x2ad98c,_0x2ad98c),_0x42ad53[_0x5e7146(0xca)](_0x227bc8,_0x2ad98c));}}return{'merged':_0x56433b,'nameMapping':_0xe59e68};}function a104_0x5240(){const _0x242f6f=['.yml','slice','max','version_number','state','bundle_name','map','journey','endsWith','goal','bundle_id','journeyStages','746360TVdGjI','type','toLowerCase','set','keys','16RAmfDd','912896CmEfSa','latest','item','replace','launched','with','3999618CRnwaf','steps','4773015irIPAE','journeys','segments','name','attributes','find','.yaml','yaml','match','activation','9047637bbhvAa','versionNumber','6553824CvrDzG','get','stages','293446AOmhbi','4PRBSmb','description','reentry','version','connection'];a104_0x5240=function(){return _0x242f6f;};return a104_0x5240();}export function updateActivationReferences(_0x2e2388,_0x1a8523){const _0x48a451=a104_0xa73d;if(!_0x2e2388)return;for(const _0x12ba51 of _0x2e2388){if(!_0x12ba51[_0x48a451(0xd4)])continue;for(const _0x35cbf4 of _0x12ba51['steps']){if(_0x35cbf4[_0x48a451(0xc8)]==='activation'&&_0x35cbf4[_0x48a451(0xd2)]?.['activation']){const _0x3d3012=_0x1a8523['get'](_0x35cbf4[_0x48a451(0xd2)][_0x48a451(0xaf)]);_0x3d3012&&_0x3d3012!==_0x35cbf4[_0x48a451(0xd2)][_0x48a451(0xaf)]&&(_0x35cbf4[_0x48a451(0xd2)]['activation']=_0x3d3012);}}}}export function buildJourneysArray(_0x1c3c79){const _0x354824=a104_0xa73d,_0x4cc10c=Math[_0x354824(0xbd)](..._0x1c3c79[_0x354824(0xc1)](_0x5f35cb=>_0x5f35cb[_0x354824(0xcf)][_0x354824(0xb1)]||0x0));return _0x1c3c79[_0x354824(0xc1)](_0x46b00c=>{const _0x25e7b3=_0x354824,_0x1e677a=(_0x46b00c[_0x25e7b3(0xcf)][_0x25e7b3(0xb1)]||0x0)===_0x4cc10c,_0x3e2548=_0x46b00c[_0x25e7b3(0xad)][_0x25e7b3(0xd6)]?.[0x0],_0x2571db={'version':_0x3e2548?.[_0x25e7b3(0xb9)]||_0x46b00c['yaml'][_0x25e7b3(0xb9)]||_0x46b00c[_0x25e7b3(0xcf)][_0x25e7b3(0xd8)],'state':_0x46b00c['item'][_0x25e7b3(0xbf)]===_0x25e7b3(0xd1)?'launched':'draft','stages':_0x3e2548?.[_0x25e7b3(0xb4)]||_0x46b00c[_0x25e7b3(0xad)][_0x25e7b3(0xb4)]||[],'id':_0x3e2548?.['id']||_0x46b00c[_0x25e7b3(0xad)]['id'],'version_number':_0x3e2548?.['version_number']||_0x46b00c[_0x25e7b3(0xad)][_0x25e7b3(0xbe)]};return _0x1e677a&&(_0x2571db[_0x25e7b3(0xce)]=!![]),_0x2571db;});}export function buildMergedJourneyYaml(_0x257f75){const _0x22f95a=a104_0xa73d,_0x1c034e=_0x257f75[0x0][_0x22f95a(0xad)],_0x2fb128=buildJourneysArray(_0x257f75),{merged:_0x37cd8a,nameMapping:_0x51cbcd}=consolidateActivationsByContent(_0x257f75[_0x22f95a(0xc1)](_0x270877=>_0x270877[_0x22f95a(0xad)]['activations']));for(const _0x414983 of _0x2fb128){updateActivationReferences(_0x414983[_0x22f95a(0xb4)],_0x51cbcd);}return{'type':_0x22f95a(0xc2),'name':_0x1c034e[_0x22f95a(0xd8)],'description':_0x1c034e[_0x22f95a(0xb7)],'goal':_0x1c034e[_0x22f95a(0xc4)],'reentry':_0x1c034e[_0x22f95a(0xb8)],'segments':_0x1c034e[_0x22f95a(0xd7)],'activations':Object[_0x22f95a(0xcb)](_0x37cd8a)['length']>0x0?_0x37cd8a:undefined,'journeys':_0x2fb128,'bundle_id':_0x1c034e[_0x22f95a(0xc5)],'bundle_name':_0x1c034e[_0x22f95a(0xc0)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x5bea01,_0x159ac2,_0x5283a0,_0x36377c){const _0x55ab0a=a104_0xa73d,_0x205545=_0x5bea01+':'+_0x159ac2,_0x1a377a=_0x5283a0[_0x55ab0a(0xb3)](_0x205545);if(_0x1a377a)return _0x1a377a;const _0x530c90=await _0x36377c(_0x5bea01),_0x1516e5=_0x530c90[_0x55ab0a(0xd9)]['journeyBundleName']||_0x530c90[_0x55ab0a(0xd9)][_0x55ab0a(0xd8)],_0x202253=_0x530c90[_0x55ab0a(0xd9)][_0x55ab0a(0xc6)][_0x55ab0a(0xda)](_0x4b632f=>_0x4b632f['id']===_0x159ac2),_0x512f68=_0x202253?.[_0x55ab0a(0xd8)]||_0x159ac2,_0x5309cc={'journeyName':_0x1516e5,'stageName':_0x512f68};return _0x5283a0[_0x55ab0a(0xca)](_0x205545,_0x5309cc),_0x5309cc;}export function formatApiJourneyName(_0x57e949,_0x20396e){return _0x20396e+'\x20('+_0x57e949+')';}export function isLocalJourneyRef(_0x2d2513){const _0x594cab=a104_0xa73d;return _0x2d2513[_0x594cab(0xc3)](_0x594cab(0xbb))||_0x2d2513[_0x594cab(0xc3)](_0x594cab(0xdb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ae847,_0x1ec8ec){const _0x2bd46f=a105_0x5786,_0x219125=_0x4ae847();while(!![]){try{const _0x5b59ec=-parseInt(_0x2bd46f(0x14f))/0x1+parseInt(_0x2bd46f(0x147))/0x2+parseInt(_0x2bd46f(0x148))/0x3+-parseInt(_0x2bd46f(0x15b))/0x4+-parseInt(_0x2bd46f(0x14c))/0x5+-parseInt(_0x2bd46f(0x155))/0x6*(-parseInt(_0x2bd46f(0x15a))/0x7)+parseInt(_0x2bd46f(0x149))/0x8;if(_0x5b59ec===_0x1ec8ec)break;else _0x219125['push'](_0x219125['shift']());}catch(_0x502a8b){_0x219125['push'](_0x219125['shift']());}}}(a105_0x8227,0x57727));import{readFile}from'fs/promises';function a105_0x5786(_0x46ef36,_0x3aba39){_0x46ef36=_0x46ef36-0x147;const _0x82272f=a105_0x8227();let _0x57860a=_0x82272f[_0x46ef36];return _0x57860a;}function a105_0x8227(){const _0x59a75d=['EACCES','Failed\x20to\x20load\x20JSON:\x20','\x27:\x20','parse','949710wDQABe','INVALID_ARGUMENT','utf-8','Permission\x20denied\x20reading\x20file:\x20','PERMISSION_DENIED','7eDCicZ','1548140ufMCWC','778120DMRDoj','2082975SgKbxU','3682440RWYRde','File\x20not\x20found:\x20','message','2887475ZQyRyX','INTERNAL','NOT_FOUND','379262bsqGOU','code'];a105_0x8227=function(){return _0x59a75d;};return a105_0x8227();}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x44ac7a,_0x2c0eb0){const _0x350052=a105_0x5786;try{if(_0x2c0eb0){const _0xd4a18e=await readFile(_0x44ac7a,_0x350052(0x157));try{return JSON[_0x350052(0x154)](_0xd4a18e);}catch(_0xfc75d6){throw new SDKError(ErrorCode[_0x350052(0x156)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x44ac7a+_0x350052(0x153)+(_0xfc75d6 instanceof Error?_0xfc75d6['message']:String(_0xfc75d6)));}}else try{return JSON[_0x350052(0x154)](_0x44ac7a);}catch(_0x114c32){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20JSON\x20string:\x20'+(_0x114c32 instanceof Error?_0x114c32[_0x350052(0x14b)]:String(_0x114c32)));}}catch(_0x382d6b){if(_0x382d6b instanceof SDKError)throw _0x382d6b;if(_0x382d6b instanceof Error&&_0x350052(0x150)in _0x382d6b){const _0xadafe2=_0x382d6b;if(_0xadafe2[_0x350052(0x150)]==='ENOENT')throw new SDKError(ErrorCode[_0x350052(0x14e)],_0x350052(0x14a)+_0x44ac7a);else{if(_0xadafe2[_0x350052(0x150)]===_0x350052(0x151))throw new SDKError(ErrorCode[_0x350052(0x159)],_0x350052(0x158)+_0x44ac7a);}}throw new SDKError(ErrorCode[_0x350052(0x14d)],_0x350052(0x152)+(_0x382d6b instanceof Error?_0x382d6b[_0x350052(0x14b)]:String(_0x382d6b)));}}export async function loadJSONFromOptions(_0x4256c2,_0x56a14f){const _0x1c4153=a105_0x5786;if(_0x4256c2&&_0x56a14f)throw new SDKError(ErrorCode[_0x1c4153(0x156)],'Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.');if(_0x4256c2)return await loadJSON(_0x4256c2,![]);if(_0x56a14f)return await loadJSON(_0x56a14f,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3570d9,_0x568b4e){const _0x41fcde=a106_0x2f30,_0x4c389d=_0x3570d9();while(!![]){try{const _0xf76c8e=parseInt(_0x41fcde(0x9b))/0x1+parseInt(_0x41fcde(0x9d))/0x2*(-parseInt(_0x41fcde(0x96))/0x3)+-parseInt(_0x41fcde(0xa1))/0x4*(-parseInt(_0x41fcde(0xa3))/0x5)+-parseInt(_0x41fcde(0xa2))/0x6*(parseInt(_0x41fcde(0x98))/0x7)+-parseInt(_0x41fcde(0xa7))/0x8+-parseInt(_0x41fcde(0x9e))/0x9*(-parseInt(_0x41fcde(0xa5))/0xa)+-parseInt(_0x41fcde(0xa4))/0xb*(parseInt(_0x41fcde(0x99))/0xc);if(_0xf76c8e===_0x568b4e)break;else _0x4c389d['push'](_0x4c389d['shift']());}catch(_0x1dd851){_0x4c389d['push'](_0x4c389d['shift']());}}}(a106_0x5093,0x44ae9));export function canCreateAgent(_0x5f3a71,_0x22dcb5){const _0x38bb1f=a106_0x2f30;for(const _0x2eca7d of _0x5f3a71[_0x38bb1f(0x9f)][_0x38bb1f(0x9c)]){if(_0x2eca7d['targetAgentId']&&!_0x22dcb5['has'](_0x2eca7d[_0x38bb1f(0x9a)]))return![];}return!![];}export function remapToolIds(_0x4a1e34,_0x6885b6,_0x364287){const _0x239492=a106_0x2f30;return _0x4a1e34['map'](_0x3b8e38=>({..._0x3b8e38,'targetKnowledgeBaseId':_0x3b8e38[_0x239492(0xa6)]?_0x6885b6[_0x239492(0x97)](_0x3b8e38['targetKnowledgeBaseId'])||_0x3b8e38[_0x239492(0xa6)]:undefined,'targetAgentId':_0x3b8e38[_0x239492(0x9a)]?_0x364287[_0x239492(0x97)](_0x3b8e38['targetAgentId'])||_0x3b8e38[_0x239492(0x9a)]:undefined}));}function a106_0x2f30(_0x1fc98b,_0x5b0923){_0x1fc98b=_0x1fc98b-0x96;const _0x5093a6=a106_0x5093();let _0x2f308c=_0x5093a6[_0x1fc98b];return _0x2f308c;}export function remapVariableIds(_0x25ce08,_0x599f41){const _0x48e36d=a106_0x2f30;return _0x25ce08[_0x48e36d(0xa0)](_0x52235e=>({..._0x52235e,'targetKnowledgeBaseId':_0x599f41[_0x48e36d(0x97)](_0x52235e['targetKnowledgeBaseId'])||_0x52235e[_0x48e36d(0xa6)]}));}function a106_0x5093(){const _0x4a3a02=['attributes','map','143924ikgrTI','3930RCGPWo','5KTvuha','1099219wqJiuc','779230ZrWHsH','targetKnowledgeBaseId','269784kVUXEG','262533yoUrxP','get','595bvNdrW','12WyHlYC','targetAgentId','132563CXUbXE','tools','2UCiKAv','45RPrRse'];a106_0x5093=function(){return _0x4a3a02;};return a106_0x5093();}export function isSupportedBackupVersion(_0x4e5211){return _0x4e5211==='1.0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a107_0x2e46ca=a107_0x2d40;(function(_0xd16ef8,_0x2b73fa){const _0x3ad8e9=a107_0x2d40,_0x27145c=_0xd16ef8();while(!![]){try{const _0x5de2de=parseInt(_0x3ad8e9(0x74))/0x1*(parseInt(_0x3ad8e9(0x6c))/0x2)+parseInt(_0x3ad8e9(0x6b))/0x3*(-parseInt(_0x3ad8e9(0x76))/0x4)+parseInt(_0x3ad8e9(0x77))/0x5*(-parseInt(_0x3ad8e9(0x6d))/0x6)+parseInt(_0x3ad8e9(0x78))/0x7+-parseInt(_0x3ad8e9(0x70))/0x8*(parseInt(_0x3ad8e9(0x72))/0x9)+-parseInt(_0x3ad8e9(0x6e))/0xa+parseInt(_0x3ad8e9(0x6f))/0xb;if(_0x5de2de===_0x2b73fa)break;else _0x27145c['push'](_0x27145c['shift']());}catch(_0x27b9fa){_0x27145c['push'](_0x27145c['shift']());}}}(a107_0x35bb,0x319ac));function a107_0x35bb(){const _0x2a3403=['36lgPxIw','20OAaNWe','2266467FYBKqS','21267hAJDba','10706ruHAzq','227310vULulx','2164720qhMcMy','3855808RlnMGn','8lvpVCW','claude-4.5-sonnet','2232747DphkQy','claude-4.5-haiku','39OhQNQF','toLowerCase'];a107_0x35bb=function(){return _0x2a3403;};return a107_0x35bb();}const MODEL_ALIASES={'haiku':a107_0x2e46ca(0x73),'sonnet':a107_0x2e46ca(0x71)};export function extractModelAlias(_0x2a75e3){const _0xa6b0ec=a107_0x2e46ca,_0x231ea0=_0x2a75e3['match'](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x231ea0)return _0x231ea0[0x1][_0xa6b0ec(0x75)]();return _0x2a75e3;}function a107_0x2d40(_0x5fe28f,_0x627650){_0x5fe28f=_0x5fe28f-0x6b;const _0x35bbdc=a107_0x35bb();let _0x2d4011=_0x35bbdc[_0x5fe28f];return _0x2d4011;}export function resolveModelAlias(_0x2d560a){const _0x5bdb14=a107_0x2e46ca;return MODEL_ALIASES[_0x2d560a[_0x5bdb14(0x75)]()]||_0x2d560a;}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3b2550,_0x25c8d4){const _0x28cb44=a108_0x3766,_0x3bbd41=_0x3b2550();while(!![]){try{const _0x4f9c62=-parseInt(_0x28cb44(0xfb))/0x1+parseInt(_0x28cb44(0xf8))/0x2*(parseInt(_0x28cb44(0xf5))/0x3)+parseInt(_0x28cb44(0xf9))/0x4*(-parseInt(_0x28cb44(0x102))/0x5)+-parseInt(_0x28cb44(0xfd))/0x6+parseInt(_0x28cb44(0x109))/0x7*(-parseInt(_0x28cb44(0x107))/0x8)+parseInt(_0x28cb44(0x100))/0x9+parseInt(_0x28cb44(0x101))/0xa;if(_0x4f9c62===_0x25c8d4)break;else _0x3bbd41['push'](_0x3bbd41['shift']());}catch(_0x242f4c){_0x3bbd41['push'](_0x3bbd41['shift']());}}}(a108_0x53ba,0x1b3d8));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(_0x5ca80e){const _0x1a6c81=a108_0x3766,_0x3a11d8=_0x5ca80e[_0x1a6c81(0x108)]();if(MODEL_FACTORS[_0x3a11d8])return MODEL_FACTORS[_0x3a11d8];if(_0x3a11d8['includes'](_0x1a6c81(0x10a)))return MODEL_FACTORS['sonnet'];if(_0x3a11d8[_0x1a6c81(0xf7)](_0x1a6c81(0xfc)))return MODEL_FACTORS[_0x1a6c81(0xfc)];if(_0x3a11d8['includes'](_0x1a6c81(0xff)))return MODEL_FACTORS['opus'];return MODEL_FACTORS[_0x1a6c81(0x10a)];}function a108_0x3766(_0x542f74,_0x1dab38){_0x542f74=_0x542f74-0xf5;const _0x53ba19=a108_0x53ba();let _0x376647=_0x53ba19[_0x542f74];return _0x376647;}export function getContextLimit(_0x400d91){const _0x11d3af=a108_0x3766,_0x566def=_0x400d91[_0x11d3af(0x108)]();if(_0x566def[_0x11d3af(0xf7)]('sonnet'))return CONTEXT_LIMITS[_0x11d3af(0x10a)];if(_0x566def[_0x11d3af(0xf7)](_0x11d3af(0xfc)))return CONTEXT_LIMITS['haiku'];if(_0x566def[_0x11d3af(0xf7)](_0x11d3af(0xff)))return CONTEXT_LIMITS['opus'];return CONTEXT_LIMITS[_0x11d3af(0x106)];}export function calculateChatUnit(_0x3e5e3a,_0x1a4707,_0x455d5c){return(_0x3e5e3a+_0x1a4707)/0x1388*_0x455d5c;}export function calculateCredits(_0x42dc67){return _0x42dc67/0x2904;}export function getModelDisplayName(_0x2095bb){const _0x3ecdb8=a108_0x3766,_0x279a06=_0x2095bb[_0x3ecdb8(0x108)]();if(_0x279a06[_0x3ecdb8(0xf7)](_0x3ecdb8(0x10a))){if(_0x279a06[_0x3ecdb8(0xf7)](_0x3ecdb8(0x10b))||_0x279a06[_0x3ecdb8(0xf7)](_0x3ecdb8(0xfa)))return'Sonnet\x204.5';return _0x3ecdb8(0x105);}if(_0x279a06['includes'](_0x3ecdb8(0xfc))){if(_0x279a06['includes']('4-5')||_0x279a06[_0x3ecdb8(0xf7)](_0x3ecdb8(0xfa)))return _0x3ecdb8(0x103);return'Haiku\x204';}if(_0x279a06[_0x3ecdb8(0xf7)](_0x3ecdb8(0xff))){if(_0x279a06['includes']('4-5')||_0x279a06[_0x3ecdb8(0xf7)](_0x3ecdb8(0xfa)))return _0x3ecdb8(0xfe);return'Opus\x204';}return'Claude';}export function formatTokenCount(_0x4cbcab){const _0x1941da=a108_0x3766;return _0x4cbcab[_0x1941da(0xf6)](_0x1941da(0x10c));}export function calculateContextPercentage(_0x3dee8b,_0x281d1c){const _0x13c1e7=a108_0x3766,_0x58d902=getContextLimit(_0x281d1c);return Math[_0x13c1e7(0x104)](_0x3dee8b/_0x58d902*0x64);}function a108_0x53ba(){const _0x367504=['375284PHvIlZ','4.5','70049MBaHAD','haiku','1254798swfrZy','Opus\x204.5','opus','1458117GCafaz','4090690PNvved','5OoCLpE','Haiku\x204.5','round','Sonnet\x204','default','8GQYvSv','toLowerCase','1103690KiNzPX','sonnet','4-5','en-US','213501DIAHTk','toLocaleString','includes','2NGivbR'];a108_0x53ba=function(){return _0x367504;};return a108_0x53ba();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a109_0x5963(_0x2aa158,_0x26504c){_0x2aa158=_0x2aa158-0x10f;const _0x756e29=a109_0x756e();let _0x596344=_0x756e29[_0x2aa158];return _0x596344;}function a109_0x756e(){const _0x28a854=['235976iUEOdw','Invalid\x20limit\x20value:\x20','22CUJbhE','459830pSBDOD','4EnEFBM','953103hcfoNb','1522215eizZQj','number','isInteger','3921590ddabgo','.\x20Must\x20be\x20a\x20number.','Invalid\x20timeout\x20value:\x20','6wJYCos','.\x20Must\x20be\x20an\x20integer.','358244noXWyy','63yDxmnm','4202505sgqxYy'];a109_0x756e=function(){return _0x28a854;};return a109_0x756e();}(function(_0x1ad115,_0x40dbe5){const _0x44d16c=a109_0x5963,_0x2613e0=_0x1ad115();while(!![]){try{const _0xcde460=parseInt(_0x44d16c(0x111))/0x1+-parseInt(_0x44d16c(0x11c))/0x2+parseInt(_0x44d16c(0x113))/0x3*(-parseInt(_0x44d16c(0x112))/0x4)+parseInt(_0x44d16c(0x114))/0x5*(-parseInt(_0x44d16c(0x11a))/0x6)+-parseInt(_0x44d16c(0x11d))/0x7*(-parseInt(_0x44d16c(0x11f))/0x8)+-parseInt(_0x44d16c(0x11e))/0x9+parseInt(_0x44d16c(0x117))/0xa*(parseInt(_0x44d16c(0x110))/0xb);if(_0xcde460===_0x40dbe5)break;else _0x2613e0['push'](_0x2613e0['shift']());}catch(_0x4fcbea){_0x2613e0['push'](_0x2613e0['shift']());}}}(a109_0x756e,0x3af02));export function validateLimitOption(_0x5cb164){const _0xd0bb62=a109_0x5963;if(!Number[_0xd0bb62(0x116)](_0x5cb164))return{'isValid':![],'error':_0xd0bb62(0x10f)+_0x5cb164+_0xd0bb62(0x11b)};if(_0x5cb164<=0x0)return{'isValid':![],'error':_0xd0bb62(0x10f)+_0x5cb164+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x5cb164};}export function validateTimeoutOption(_0x5de7b6,_0x40c81a=0x1e){const _0x3c8b78=a109_0x5963;if(_0x5de7b6===undefined)return{'isValid':!![],'value':_0x40c81a};const _0x4bd977=typeof _0x5de7b6===_0x3c8b78(0x115)?_0x5de7b6:parseFloat(_0x5de7b6);if(isNaN(_0x4bd977))return{'isValid':![],'error':_0x3c8b78(0x119)+_0x5de7b6+_0x3c8b78(0x118)};if(_0x4bd977<=0x0)return{'isValid':![],'error':_0x3c8b78(0x119)+_0x4bd977+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x4bd977};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a110_0x1b09(_0x587170,_0x5a5537){_0x587170=_0x587170-0x1dd;const _0x3e4b9a=a110_0x3e4b();let _0x1b09c8=_0x3e4b9a[_0x587170];return _0x1b09c8;}(function(_0xe40825,_0x36e453){const _0x3cc4eb=a110_0x1b09,_0xf9f96e=_0xe40825();while(!![]){try{const _0x441b76=parseInt(_0x3cc4eb(0x1e6))/0x1+parseInt(_0x3cc4eb(0x1de))/0x2*(parseInt(_0x3cc4eb(0x1e0))/0x3)+parseInt(_0x3cc4eb(0x1e4))/0x4+-parseInt(_0x3cc4eb(0x1e8))/0x5+parseInt(_0x3cc4eb(0x1ea))/0x6*(parseInt(_0x3cc4eb(0x1e9))/0x7)+parseInt(_0x3cc4eb(0x1e5))/0x8+-parseInt(_0x3cc4eb(0x1e3))/0x9;if(_0x441b76===_0x36e453)break;else _0xf9f96e['push'](_0xf9f96e['shift']());}catch(_0x3c70ef){_0xf9f96e['push'](_0xf9f96e['shift']());}}}(a110_0x3e4b,0x35f90));import{createServer}from'node:net';function a110_0x3e4b(){const _0x3ff398=['error','3ujvkTb','once','listening','7917327YdHwvy','1749828ZxTizg','1623464XMHocA','318421zQoxCf','listen','869115hNdrJP','14tdDGTl','182742RNglJU','\x20and\x20','code','close','0.0.0.0','EADDRINUSE','No\x20available\x20port\x20found\x20between\x20','509746Wnovrb'];a110_0x3e4b=function(){return _0x3ff398;};return a110_0x3e4b();}export async function isPortAvailable(_0xf88ef0){return new Promise(_0x350fe8=>{const _0x22fdab=a110_0x1b09,_0x274e0d=createServer();_0x274e0d[_0x22fdab(0x1e1)](_0x22fdab(0x1df),_0x910ce6=>{const _0x28829c=_0x22fdab;_0x910ce6[_0x28829c(0x1ec)]===_0x28829c(0x1ef)?_0x350fe8(![]):_0x350fe8(![]);}),_0x274e0d['once'](_0x22fdab(0x1e2),()=>{const _0x3f59e7=_0x22fdab;_0x274e0d[_0x3f59e7(0x1ed)](),_0x350fe8(!![]);}),_0x274e0d[_0x22fdab(0x1e7)](_0xf88ef0,_0x22fdab(0x1ee));});}export async function findAvailablePort(_0x3115d4=0xfa0,_0x512b55=0x64){const _0x2b6a7a=a110_0x1b09;for(let _0x584c80=0x0;_0x584c80<_0x512b55;_0x584c80++){const _0x59fbed=_0x3115d4+_0x584c80;if(await isPortAvailable(_0x59fbed))return _0x59fbed;}throw new Error(_0x2b6a7a(0x1dd)+_0x3115d4+_0x2b6a7a(0x1eb)+(_0x3115d4+_0x512b55-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a111_0x4a19(){const _0x1a0ef4=['ppid','pid','has','ksh','platform','wmic\x20process\x20where\x20ProcessId=','20pGjOwr','toLowerCase','utf-8','ps\x20-p\x20','elvish','108227LQaXUx','cursor','filter','2051514SywBWt','41154OWAaZL','trim','xonsh','length','split','10547504mfjFGh','1050fnGFyP','zsh','xdg-open','fish','claude','dash','ignore','\x20-o\x20ppid=,comm=','isInteger','join','2866484NstRNw','12314943pHuuDs','3225088qMHfti','752IrPgxd','comm','replace','win32','code','darwin','pop','pipe','1bmKvMz'];a111_0x4a19=function(){return _0x1a0ef4;};return a111_0x4a19();}const a111_0xc2f4b8=a111_0x465b;(function(_0x389043,_0x3deb4c){const _0x2b917a=a111_0x465b,_0xb76fd=_0x389043();while(!![]){try{const _0x4effa4=-parseInt(_0x2b917a(0xe3))/0x1*(-parseInt(_0x2b917a(0xd8))/0x2)+parseInt(_0x2b917a(0xc7))/0x3+-parseInt(_0x2b917a(0xda))/0x4+parseInt(_0x2b917a(0xce))/0x5*(parseInt(_0x2b917a(0xc8))/0x6)+parseInt(_0x2b917a(0xc4))/0x7*(-parseInt(_0x2b917a(0xdb))/0x8)+parseInt(_0x2b917a(0xd9))/0x9+parseInt(_0x2b917a(0xbf))/0xa*(-parseInt(_0x2b917a(0xcd))/0xb);if(_0x4effa4===_0x3deb4c)break;else _0xb76fd['push'](_0xb76fd['shift']());}catch(_0x5a66e9){_0xb76fd['push'](_0xb76fd['shift']());}}}(a111_0x4a19,0xb6baf));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set(['bash',a111_0xc2f4b8(0xcf),'sh',a111_0xc2f4b8(0xd1),a111_0xc2f4b8(0xbc),'tcsh','csh',a111_0xc2f4b8(0xd3),'pwsh','powershell','nu','ion',a111_0xc2f4b8(0xc3),a111_0xc2f4b8(0xca)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a111_0xc2f4b8(0xd2),a111_0xc2f4b8(0xdf),a111_0xc2f4b8(0xc5)]);function getProcessInfoWindows(_0x3ec071){const _0x3a8419=a111_0xc2f4b8;try{if(!Number[_0x3a8419(0xd6)](_0x3ec071)||_0x3ec071<=0x0)return null;const _0x397a29=execSync(_0x3a8419(0xbe)+_0x3ec071+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':_0x3a8419(0xc1),'windowsHide':!![]})[_0x3a8419(0xc9)](),_0x2f3016=_0x397a29[_0x3a8419(0xcc)]('\x0a')[_0x3a8419(0xc6)](_0x3138bd=>_0x3138bd[_0x3a8419(0xc9)]());if(_0x2f3016[_0x3a8419(0xcb)]<0x2)return null;const _0xb96f97=_0x2f3016[_0x2f3016[_0x3a8419(0xcb)]-0x1][_0x3a8419(0xcc)](',');if(_0xb96f97[_0x3a8419(0xcb)]<0x3)return null;const _0x1eebcd=_0xb96f97[0x1]?.[_0x3a8419(0xc9)]()||'',_0x569050=parseInt(_0xb96f97[0x2]?.[_0x3a8419(0xc9)]()||'0',0xa);if(isNaN(_0x569050)||!_0x1eebcd)return null;return{'pid':_0x3ec071,'ppid':_0x569050,'comm':_0x1eebcd[_0x3a8419(0xdd)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x20c670){const _0x3217f2=a111_0xc2f4b8;try{const _0x4d766b=0x400000;if(!Number[_0x3217f2(0xd6)](_0x20c670)||_0x20c670<=0x0||_0x20c670>_0x4d766b)return null;const _0x1400f3=execSync(_0x3217f2(0xc2)+_0x20c670+_0x3217f2(0xd5),{'encoding':_0x3217f2(0xc1),'stdio':_0x3217f2(0xe2)})[_0x3217f2(0xc9)](),[_0x39c0db,..._0x714ad1]=_0x1400f3[_0x3217f2(0xcc)](/\s+/),_0x457eb6=parseInt(_0x39c0db,0xa),_0x5d9c4c=_0x714ad1[_0x3217f2(0xd7)]('\x20');if(isNaN(_0x457eb6))return null;return{'pid':_0x20c670,'ppid':_0x457eb6,'comm':_0x5d9c4c};}catch{return null;}}function getProcessInfo(_0x71c830){const _0x379c31=a111_0xc2f4b8;if(process['platform']===_0x379c31(0xde))return getProcessInfoWindows(_0x71c830);return getProcessInfoPosix(_0x71c830);}function getBasename(_0xc3e5d0){const _0x5215d7=a111_0xc2f4b8;return _0xc3e5d0[_0x5215d7(0xdd)](/^-/,'')[_0x5215d7(0xcc)]('/')[_0x5215d7(0xe1)]()?.[_0x5215d7(0xc0)]()||'';}function a111_0x465b(_0x39facf,_0x6eb082){_0x39facf=_0x39facf-0xba;const _0x4a19f9=a111_0x4a19();let _0x465b9a=_0x4a19f9[_0x39facf];return _0x465b9a;}function isShell(_0x4090d8){const _0x2f32bf=a111_0xc2f4b8;return SHELL_NAMES[_0x2f32bf(0xbb)](getBasename(_0x4090d8));}function isEphemeralShellSpawner(_0x4220e9){const _0x5900b3=a111_0xc2f4b8;return EPHEMERAL_SHELL_SPAWNERS[_0x5900b3(0xbb)](getBasename(_0x4220e9));}let cachedShellPID;function findShellPID(){const _0x228809=a111_0xc2f4b8;if(process['ppid']===undefined)return process[_0x228809(0xba)];let _0x1b9914=process[_0x228809(0xe4)];const _0x3b9e0c=0xa;let _0x2a5b8e=0x0;while(_0x2a5b8e<_0x3b9e0c){const _0x3d4617=getProcessInfo(_0x1b9914);if(!_0x3d4617)break;if(isShell(_0x3d4617['comm'])){const _0x3ef496=getProcessInfo(_0x3d4617[_0x228809(0xe4)]);if(_0x3ef496&&isEphemeralShellSpawner(_0x3ef496[_0x228809(0xdc)])){_0x1b9914=_0x3d4617[_0x228809(0xe4)],_0x2a5b8e++;continue;}return _0x3d4617[_0x228809(0xba)];}if(_0x3d4617[_0x228809(0xe4)]===0x0||_0x3d4617[_0x228809(0xe4)]===0x1){if(isShell(_0x3d4617[_0x228809(0xdc)]))return _0x3d4617[_0x228809(0xba)];break;}_0x1b9914=_0x3d4617[_0x228809(0xe4)],_0x2a5b8e++;}return process[_0x228809(0xe4)]!==undefined?process['ppid']:process[_0x228809(0xba)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x19ca0d){const _0xdc7697=a111_0xc2f4b8;if(!Number[_0xdc7697(0xd6)](_0x19ca0d)||_0x19ca0d<=0x0)return![];try{return process['kill'](_0x19ca0d,0x0),!![];}catch{return![];}}export function openBrowser(_0x178050){const _0x2f3ada=a111_0xc2f4b8,_0x5a4549=process[_0x2f3ada(0xbd)],_0x46f48e=_0x5a4549===_0x2f3ada(0xe0)?'open':_0x5a4549==='win32'?'start':_0x2f3ada(0xd0);spawn(_0x46f48e,[_0x178050],{'detached':!![],'stdio':_0x2f3ada(0xd4)})['unref']();}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a112_0x533b(_0xbe1c8d,_0x10a0e1){_0xbe1c8d=_0xbe1c8d-0x159;const _0x50ba4d=a112_0x50ba();let _0x533b1a=_0x50ba4d[_0xbe1c8d];return _0x533b1a;}(function(_0x35a410,_0x167ad1){const _0x5c88ab=a112_0x533b,_0x5aa1f5=_0x35a410();while(!![]){try{const _0x5e912b=-parseInt(_0x5c88ab(0x15b))/0x1*(-parseInt(_0x5c88ab(0x167))/0x2)+parseInt(_0x5c88ab(0x16d))/0x3*(parseInt(_0x5c88ab(0x15c))/0x4)+-parseInt(_0x5c88ab(0x163))/0x5*(parseInt(_0x5c88ab(0x159))/0x6)+parseInt(_0x5c88ab(0x15f))/0x7+-parseInt(_0x5c88ab(0x170))/0x8*(parseInt(_0x5c88ab(0x16c))/0x9)+-parseInt(_0x5c88ab(0x162))/0xa+parseInt(_0x5c88ab(0x16a))/0xb;if(_0x5e912b===_0x167ad1)break;else _0x5aa1f5['push'](_0x5aa1f5['shift']());}catch(_0x3ba7f6){_0x5aa1f5['push'](_0x5aa1f5['shift']());}}}(a112_0x50ba,0x9c3e2));import*as a112_0x370e19 from'readline';function a112_0x50ba(){const _0x5ef25d=['yes','exit','8506890oVZNTh','3420180fZHgTq','utf8','resume','createInterface','879362Shiwuj','toLowerCase','\x20(y/N):\x20','17616357tOlzjz','stderr','2280357OAYqdc','27396bZdYlH','data','isTTY','40kUDWLV','removeListener','stdin','stdout','6wCBXzj','pause','1nRQyZG','208eUWmJJ','setEncoding','write','6478696bHquYP'];a112_0x50ba=function(){return _0x5ef25d;};return a112_0x50ba();}export async function confirm(_0x15268c){const _0x14dfc6=a112_0x533b,_0x409403=a112_0x370e19[_0x14dfc6(0x166)]({'input':process[_0x14dfc6(0x172)],'output':process[_0x14dfc6(0x173)]});return new Promise(_0x34dff3=>{const _0x57eeda=_0x14dfc6;_0x409403['question'](_0x15268c+_0x57eeda(0x169),_0x14c6c2=>{const _0x5df3f5=_0x57eeda;_0x409403['close'](),_0x34dff3(_0x14c6c2['toLowerCase']()==='y'||_0x14c6c2[_0x5df3f5(0x168)]()===_0x5df3f5(0x160));});});}export async function confirmKey(_0x1b39b2){const _0x285ed6=a112_0x533b;if(!process[_0x285ed6(0x172)][_0x285ed6(0x16f)])return![];return process[_0x285ed6(0x16b)][_0x285ed6(0x15e)](_0x1b39b2+'\x20[y/N]\x20'),new Promise(_0x44d08d=>{const _0x107b10=_0x285ed6,_0x4cd637=process['stdin'];_0x4cd637['setRawMode'](!![]),_0x4cd637[_0x107b10(0x165)](),_0x4cd637[_0x107b10(0x15d)](_0x107b10(0x164));const _0x935e14=_0x527aed=>{const _0x2aed6d=_0x107b10;_0x4cd637['setRawMode'](![]),_0x4cd637[_0x2aed6d(0x15a)](),_0x4cd637[_0x2aed6d(0x171)](_0x2aed6d(0x16e),_0x935e14);if(_0x527aed==='\x1b'){process[_0x2aed6d(0x16b)][_0x2aed6d(0x15e)]('\x0a'),_0x44d08d(![]);return;}_0x527aed==='\x03'&&(process[_0x2aed6d(0x16b)][_0x2aed6d(0x15e)]('\x0a'),process[_0x2aed6d(0x161)](0x82));if(_0x527aed[_0x2aed6d(0x168)]()==='y'){process[_0x2aed6d(0x16b)][_0x2aed6d(0x15e)]('y\x0a'),_0x44d08d(!![]);return;}process['stderr'][_0x2aed6d(0x15e)]('\x0a'),_0x44d08d(![]);};_0x4cd637['on']('data',_0x935e14);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a113_0x3a6e(_0x80b8e3,_0x451914){_0x80b8e3=_0x80b8e3-0x76;const _0x4a38d2=a113_0x4a38();let _0x3a6e11=_0x4a38d2[_0x80b8e3];return _0x3a6e11;}(function(_0x4974f5,_0x563f48){const _0x250946=a113_0x3a6e,_0x2006db=_0x4974f5();while(!![]){try{const _0x3dbd70=parseInt(_0x250946(0x7d))/0x1*(parseInt(_0x250946(0x98))/0x2)+parseInt(_0x250946(0x87))/0x3+-parseInt(_0x250946(0x89))/0x4+-parseInt(_0x250946(0x9c))/0x5*(-parseInt(_0x250946(0x8b))/0x6)+parseInt(_0x250946(0x8f))/0x7+parseInt(_0x250946(0x9a))/0x8+-parseInt(_0x250946(0x77))/0x9;if(_0x3dbd70===_0x563f48)break;else _0x2006db['push'](_0x2006db['shift']());}catch(_0x510ad0){_0x2006db['push'](_0x2006db['shift']());}}}(a113_0x4a38,0xe8b36));import{existsSync,readFileSync}from'fs';import a113_0x1e19b6 from'path';function a113_0x4a38(){const _0x5ef2dd=['relative','1684645PHwsLE','pop','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','7516638MmhiMV','parent_segment','utf-8','Path\x20attempts\x20to\x20navigate\x20above\x20root','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','segments','734KoMFZW','isAbsolute','push','resolve','slice','Path\x20cannot\x20be\x20empty','split','Cannot\x20navigate\x20above\x20root','endsWith','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','1501512KZvfqK','trim','6727828ksLTMo','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','24KgTjQz','substring','journey','dirname','1142855vmlBcK','parse','startsWith','raw','filter','join','name','length','.yaml','1702TVgngs','test','6673296fUFGbz'];a113_0x4a38=function(){return _0x5ef2dd;};return a113_0x4a38();}import{parse as a113_0x59039e}from'yaml';export function parsePath(_0x4ea1a6){const _0x1c4b0a=a113_0x3a6e;if(!_0x4ea1a6||_0x4ea1a6['trim']()==='')throw new Error(_0x1c4b0a(0x82));const _0x2b633d=_0x4ea1a6[_0x1c4b0a(0x88)]();if(_0x2b633d==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x4ea1a6};const _0x48ccaa=_0x2b633d[_0x1c4b0a(0x91)]('/')?_0x2b633d[_0x1c4b0a(0x8c)](0x1):_0x2b633d,_0x160aad=_0x48ccaa[_0x1c4b0a(0x83)]('/')[_0x1c4b0a(0x93)](_0x412000=>_0x412000!=='');if(_0x160aad[_0x1c4b0a(0x96)]===0x0)throw new Error(_0x1c4b0a(0x7b));const _0x40c6e9=_0x2b633d['startsWith']('/')||!isRelativePathSegment(_0x160aad[0x0]);for(const _0x2797f2 of _0x160aad){validatePathSegment(_0x2797f2);}return{'segments':_0x160aad,'isAbsolute':_0x40c6e9,'raw':_0x4ea1a6};}function isRelativePathSegment(_0x4ff78a){return _0x4ff78a==='.'||_0x4ff78a==='..';}function validatePathSegment(_0x556b5a){const _0xca2f12=a113_0x3a6e;if(_0x556b5a==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x556b5a==='.'||_0x556b5a==='..')return;if(/[\x00-\x1F\x7F]/[_0xca2f12(0x99)](_0x556b5a))throw new Error(_0xca2f12(0x8a)+_0x556b5a);if(_0x556b5a!==_0x556b5a[_0xca2f12(0x88)]()){}}export function validatePath(_0x31e4f1){const _0x4918ba=a113_0x3a6e;if(_0x31e4f1['segments']['length']===0x0&&!_0x31e4f1[_0x4918ba(0x7e)])throw new Error('Relative\x20path\x20cannot\x20be\x20empty');if(_0x31e4f1['isAbsolute']){if(_0x31e4f1[_0x4918ba(0x7c)][0x0]==='..')throw new Error(_0x4918ba(0x86));let _0x4c221c=0x0;for(const _0x49650e of _0x31e4f1[_0x4918ba(0x7c)]){if(_0x49650e==='..'){if(_0x4c221c===0x0)throw new Error(_0x4918ba(0x7a));_0x4c221c--;}else _0x49650e!=='.'&&_0x4c221c++;}}}export function joinPaths(_0x5cb42b,_0x4cabea){const _0x1042da=a113_0x3a6e;if(!_0x5cb42b||_0x5cb42b==='/')return _0x4cabea;if(!_0x4cabea||_0x4cabea==='.')return _0x5cb42b;if(_0x4cabea['startsWith']('/'))return _0x4cabea;const _0x25f953=parsePath(_0x5cb42b),_0x1c9dc0=parsePath(_0x4cabea),_0x446bf6=[..._0x25f953[_0x1042da(0x7c)]];for(const _0x400103 of _0x1c9dc0[_0x1042da(0x7c)]){if(_0x400103==='.')continue;else{if(_0x400103==='..'){if(_0x446bf6[_0x1042da(0x96)]===0x0)throw new Error(_0x1042da(0x84));_0x446bf6['pop']();}else _0x446bf6[_0x1042da(0x7f)](_0x400103);}}const _0x495fd2=_0x446bf6[_0x1042da(0x94)]('/');return _0x25f953[_0x1042da(0x92)][_0x1042da(0x91)]('/')?'/'+_0x495fd2:_0x495fd2;}export function normalizePath(_0x4abdd4){const _0x5ea785=a113_0x3a6e,_0x5e596f=parsePath(_0x4abdd4),_0x383c97=[];for(const _0x4a0d31 of _0x5e596f[_0x5ea785(0x7c)]){if(_0x4a0d31==='.')continue;else{if(_0x4a0d31==='..'){if(_0x383c97[_0x5ea785(0x96)]===0x0){if(_0x5e596f[_0x5ea785(0x7e)])throw new Error(_0x5ea785(0x84));_0x383c97[_0x5ea785(0x7f)]('..');}else _0x383c97[_0x383c97['length']-0x1]==='..'?_0x383c97['push']('..'):_0x383c97[_0x5ea785(0x9d)]();}else _0x383c97[_0x5ea785(0x7f)](_0x4a0d31);}}if(_0x383c97['length']===0x0)return _0x5e596f[_0x5ea785(0x7e)]?'/':'.';const _0xa7250e=_0x383c97[_0x5ea785(0x94)]('/');return _0x5e596f['raw']['startsWith']('/')?'/'+_0xa7250e:_0xa7250e;}export function getParentPath(_0x350d6d){const _0x4950cc=a113_0x3a6e,_0x3fa07e=parsePath(_0x350d6d);if(_0x3fa07e[_0x4950cc(0x7c)][_0x4950cc(0x96)]<=0x1)return'/';const _0x283772=_0x3fa07e[_0x4950cc(0x7c)][_0x4950cc(0x81)](0x0,-0x1)[_0x4950cc(0x94)]('/');return _0x3fa07e[_0x4950cc(0x92)]['startsWith']('/')?'/'+_0x283772:_0x283772;}export function getBaseName(_0x14ebe8){const _0x25c4cd=a113_0x3a6e,_0x5138eb=parsePath(_0x14ebe8);return _0x5138eb[_0x25c4cd(0x7c)][_0x5138eb[_0x25c4cd(0x7c)][_0x25c4cd(0x96)]-0x1]||'';}export function isChildPath(_0x283243,_0x4e012c){const _0x530110=a113_0x3a6e,_0x503357=parsePath(_0x283243),_0x41bbde=parsePath(_0x4e012c);if(_0x503357[_0x530110(0x7c)][_0x530110(0x96)]<=_0x41bbde['segments'][_0x530110(0x96)])return![];for(let _0x10ba56=0x0;_0x10ba56<_0x41bbde[_0x530110(0x7c)][_0x530110(0x96)];_0x10ba56++){if(_0x503357[_0x530110(0x7c)][_0x10ba56]!==_0x41bbde[_0x530110(0x7c)][_0x10ba56])return![];}return!![];}export function splitPath(_0x1bf20a){const _0x509082=a113_0x3a6e,_0x102511=parsePath(_0x1bf20a);if(_0x102511[_0x509082(0x7c)]['length']===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x102511[_0x509082(0x7c)][_0x509082(0x96)]===0x1)return{'parent':_0x102511[_0x509082(0x7c)][0x0]};return{'parent':_0x102511[_0x509082(0x7c)][0x0],'child':_0x102511[_0x509082(0x7c)][_0x509082(0x81)](0x1)['join']('/')};}export function isYamlFilePath(_0x4d7f2f){const _0x1a4e66=a113_0x3a6e;return _0x4d7f2f['endsWith']('.yml')||_0x4d7f2f[_0x1a4e66(0x85)](_0x1a4e66(0x97));}export function resolveYamlFilePath(_0x34b773){const _0x10201a=a113_0x3a6e,_0x594352=a113_0x1e19b6[_0x10201a(0x80)](_0x34b773);if(!existsSync(_0x594352))throw new Error('File\x20not\x20found:\x20'+_0x34b773);let _0x1f8e44=a113_0x1e19b6[_0x10201a(0x8e)](_0x594352),_0x4b13c4=null,_0x1d8539=null;const _0x3590a3=a113_0x1e19b6[_0x10201a(0x90)](_0x1f8e44)['root'];while(_0x1f8e44!==_0x3590a3){const _0x1378e1=a113_0x1e19b6[_0x10201a(0x94)](_0x1f8e44,'tdx.json');if(existsSync(_0x1378e1)){_0x4b13c4=_0x1378e1,_0x1d8539=_0x1f8e44;break;}_0x1f8e44=a113_0x1e19b6[_0x10201a(0x8e)](_0x1f8e44);}if(!_0x4b13c4||!_0x1d8539)throw new Error('No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x34b773);const _0x96838=readFileSync(_0x4b13c4,_0x10201a(0x79)),_0x1a61b1=JSON[_0x10201a(0x90)](_0x96838),_0x2ba599=_0x1a61b1[_0x10201a(0x78)];if(!_0x2ba599)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x26c91b=readFileSync(_0x594352,_0x10201a(0x79)),_0x9d33fd=a113_0x59039e(_0x26c91b),_0x75c9c3=_0x9d33fd[_0x10201a(0x95)];if(!_0x75c9c3)throw new Error(_0x10201a(0x76)+_0x34b773);const _0x41eaae=_0x9d33fd['type']===_0x10201a(0x8d)?'journey':'segment',_0x5634db=a113_0x1e19b6[_0x10201a(0x9b)](_0x1d8539,_0x594352),_0x2ee95e=a113_0x1e19b6[_0x10201a(0x8e)](_0x5634db),_0x114eb3=_0x2ee95e==='.'?'':_0x2ee95e['replace'](/\\/g,'/'),_0x56e686=_0x114eb3?_0x2ba599+'/'+_0x114eb3+'/'+_0x75c9c3:_0x2ba599+'/'+_0x75c9c3;return{'parentSegment':_0x2ba599,'segmentName':_0x75c9c3,'folderPath':_0x114eb3,'fullPath':_0x56e686,'resourceType':_0x41eaae};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a114_0x4b37(){const _0x5db3be=['84gytLLg','1035602OpMavm','Invalid\x20segment\x20reference\x20format:\x20','substring','12212thwBQx','1TMNavc','1000qNqGCw','2685wXwHls','1988467pYiRpU','111393neukNE','indexOf','5985231MlvGuR','286209YvbZcv','6RMoTsU','.\x20Child\x20name\x20cannot\x20be\x20empty','10sBMdbz','20418563mhKjUo'];a114_0x4b37=function(){return _0x5db3be;};return a114_0x4b37();}(function(_0x523277,_0x11b76d){const _0x17d504=a114_0x3998,_0xb3e35=_0x523277();while(!![]){try{const _0x1225c1=parseInt(_0x17d504(0xda))/0x1*(-parseInt(_0x17d504(0xd6))/0x2)+-parseInt(_0x17d504(0xd0))/0x3+parseInt(_0x17d504(0xd9))/0x4*(-parseInt(_0x17d504(0xdc))/0x5)+-parseInt(_0x17d504(0xd1))/0x6*(-parseInt(_0x17d504(0xcf))/0x7)+parseInt(_0x17d504(0xdb))/0x8*(parseInt(_0x17d504(0xcd))/0x9)+parseInt(_0x17d504(0xd3))/0xa*(parseInt(_0x17d504(0xd4))/0xb)+parseInt(_0x17d504(0xd5))/0xc*(-parseInt(_0x17d504(0xdd))/0xd);if(_0x1225c1===_0x11b76d)break;else _0xb3e35['push'](_0xb3e35['shift']());}catch(_0x23e492){_0xb3e35['push'](_0xb3e35['shift']());}}}(a114_0x4b37,0xe4465));function a114_0x3998(_0xa3ecad,_0xf8c4da){_0xa3ecad=_0xa3ecad-0xcd;const _0x4b3768=a114_0x4b37();let _0x399821=_0x4b3768[_0xa3ecad];return _0x399821;}export function parseSegmentRef(_0x4c27ac){const _0x64acea=a114_0x3998,_0x3e1314=_0x4c27ac[_0x64acea(0xce)]('/');if(_0x3e1314===-0x1)return{'parentId':_0x4c27ac};if(_0x3e1314===0x0)throw new Error(_0x64acea(0xd7)+_0x4c27ac+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x5f1a9a=_0x4c27ac[_0x64acea(0xd8)](0x0,_0x3e1314),_0x2722e6=_0x4c27ac[_0x64acea(0xd8)](_0x3e1314+0x1);if(_0x2722e6==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x4c27ac+_0x64acea(0xd2));return{'parentId':_0x5f1a9a,'childId':_0x2722e6};}
|