@treasuredata/tdx 0.8.5 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.js +1 -1
  11. package/dist/client/trino-api-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/api-command.js +1 -1
  15. package/dist/commands/auth-command.js +1 -1
  16. package/dist/commands/chat-command.js +1 -1
  17. package/dist/commands/claude-command.d.ts +1 -0
  18. package/dist/commands/claude-command.d.ts.map +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-command.js.map +1 -1
  21. package/dist/commands/claude-statusline-command.js +1 -1
  22. package/dist/commands/claude-usage-command.js +1 -1
  23. package/dist/commands/command.js +1 -1
  24. package/dist/commands/connection-command.js +1 -1
  25. package/dist/commands/context-command.js +1 -1
  26. package/dist/commands/databases.js +1 -1
  27. package/dist/commands/describe.js +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/llm-proxy.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/segment-command.js +1 -1
  37. package/dist/commands/segment-create-command.js +1 -1
  38. package/dist/commands/segment-fields-command.js +1 -1
  39. package/dist/commands/segment-pull-command.js +1 -1
  40. package/dist/commands/segment-push-command.js +1 -1
  41. package/dist/commands/segment-update-command.js +1 -1
  42. package/dist/commands/segment-use-command.js +1 -1
  43. package/dist/commands/segments.js +1 -1
  44. package/dist/commands/show.js +1 -1
  45. package/dist/commands/tables.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/config.js +1 -1
  51. package/dist/core/connection-cache.js +1 -1
  52. package/dist/core/credential-cache.js +1 -1
  53. package/dist/core/global-context.js +1 -1
  54. package/dist/core/keychain.js +1 -1
  55. package/dist/core/profile.js +1 -1
  56. package/dist/core/project-config.js +1 -1
  57. package/dist/core/session.js +1 -1
  58. package/dist/core/user-cache.js +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/proxy/anthropic-adapter.js +1 -1
  61. package/dist/proxy/claude-usage-tracker.js +1 -1
  62. package/dist/proxy/context-signature.js +1 -1
  63. package/dist/proxy/conversation-utils.js +1 -1
  64. package/dist/proxy/server.js +1 -1
  65. package/dist/proxy/session-cache.js +1 -1
  66. package/dist/sdk/api.js +1 -1
  67. package/dist/sdk/connection.js +1 -1
  68. package/dist/sdk/engage.js +1 -1
  69. package/dist/sdk/errors.js +1 -1
  70. package/dist/sdk/index.js +1 -1
  71. package/dist/sdk/job.js +1 -1
  72. package/dist/sdk/journey.js +1 -1
  73. package/dist/sdk/llm.js +1 -1
  74. package/dist/sdk/query.js +1 -1
  75. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  76. package/dist/sdk/segment/journey-yaml.js +1 -1
  77. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  78. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  79. package/dist/sdk/segment.js +1 -1
  80. package/dist/sdk/user.js +1 -1
  81. package/dist/sdk/workflow.js +1 -1
  82. package/dist/types/endpoints.js +1 -1
  83. package/dist/types/index.js +1 -1
  84. package/dist/utils/agent-ref-parser.js +1 -1
  85. package/dist/utils/async.js +1 -1
  86. package/dist/utils/chat-cache.js +1 -1
  87. package/dist/utils/colors.js +1 -1
  88. package/dist/utils/command-output.js +1 -1
  89. package/dist/utils/constants.js +1 -1
  90. package/dist/utils/diff.js +1 -1
  91. package/dist/utils/fields-display.js +1 -1
  92. package/dist/utils/file-permissions.js +1 -1
  93. package/dist/utils/format-detector.js +1 -1
  94. package/dist/utils/formatters.js +1 -1
  95. package/dist/utils/json-loader.js +1 -1
  96. package/dist/utils/llm-backup-utils.js +1 -1
  97. package/dist/utils/model-aliases.js +1 -1
  98. package/dist/utils/model-factors.js +1 -1
  99. package/dist/utils/option-validation.js +1 -1
  100. package/dist/utils/port.js +1 -1
  101. package/dist/utils/process.js +1 -1
  102. package/dist/utils/prompt.js +1 -1
  103. package/dist/utils/segment-path-parser.js +1 -1
  104. package/dist/utils/segment-ref-parser.js +1 -1
  105. package/dist/utils/spinner.js +1 -1
  106. package/dist/utils/sql-parser.js +1 -1
  107. package/dist/utils/sse-parser.js +1 -1
  108. package/dist/utils/string-utils.js +1 -1
  109. package/dist/utils/table-ref-parser.js +1 -1
  110. package/dist/utils/tdx-config.js +1 -1
  111. package/dist/utils/tdx-logger.js +1 -1
  112. package/dist/utils/tree-formatter.js +1 -1
  113. package/dist/utils/version-check.js +1 -1
  114. package/dist/utils/workflow-utils.js +1 -1
  115. package/package.json +1 -1
@@ -1 +1 @@
1
- const a74_0x3f4b6b=a74_0x4023;(function(_0x151747,_0x215e64){const _0x4b759c=a74_0x4023,_0x5126a5=_0x151747();while(!![]){try{const _0x412c48=-parseInt(_0x4b759c(0x23d))/0x1+parseInt(_0x4b759c(0x206))/0x2*(parseInt(_0x4b759c(0x1e0))/0x3)+-parseInt(_0x4b759c(0x20c))/0x4*(-parseInt(_0x4b759c(0x21b))/0x5)+-parseInt(_0x4b759c(0x234))/0x6*(-parseInt(_0x4b759c(0x233))/0x7)+-parseInt(_0x4b759c(0x23b))/0x8*(parseInt(_0x4b759c(0x243))/0x9)+-parseInt(_0x4b759c(0x217))/0xa+-parseInt(_0x4b759c(0x1d9))/0xb*(-parseInt(_0x4b759c(0x25c))/0xc);if(_0x412c48===_0x215e64)break;else _0x5126a5['push'](_0x5126a5['shift']());}catch(_0x4a2207){_0x5126a5['push'](_0x5126a5['shift']());}}}(a74_0x4d45,0x8aab4));function a74_0x4023(_0x2d182c,_0x5915b2){_0x2d182c=_0x2d182c-0x1d7;const _0x4d45e5=a74_0x4d45();let _0x4023a3=_0x4d45e5[_0x2d182c];return _0x4023a3;}import{CDPApiClient}from'../client/cdp-api-client.js';import{TrinoApiClient}from'../client/trino-api-client.js';import{SDKError,ErrorCode}from'./errors.js';import{parsePath}from'../utils/segment-path-parser.js';function a74_0x4d45(){const _0xae2d1c=['interval','find','332508ceuSKU','Folder\x20not\x20found:\x20','Validating\x20master\x20table:\x20','Validating\x20all\x20behaviors\x20in\x20parallel...','SEGMENT_NOT_FOUND','length','getSegmentSQL','deleteActivation','rootFolderId','\x27\x20not\x20found\x20in\x20','resolveParentId','listUnified','484fAPzlh','master','trinoClient','message','totalEvents','updateSegmentById','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','980097bakvnX','updateParent','matchedCount','updateParentSegment','getParentSegment','allValid','data','getAudienceAttributes','Validating\x20behavior:\x20','getAudienceBehaviors','schemaValid','\x20in\x20parent\x20','getParentFull','Behavior\x20\x27','Fetching\x20enriched\x20master\x20data...','listSegmentFolders','segment','segmentFolderId','createParentSegment','schemaError','map','client','customerPercent','createActivation','Counting\x20master\x20table\x20rows...','Path\x20cannot\x20be\x20empty','updateSegment','getActivation','then','resolveFolderId','row_count','runParentSegment','executeQuery','listParents','child_key','push','Child\x20segment\x20not\x20found:\x20','runParent','4Kpnvhq','description','Parent\x20segment\x20not\x20found:\x20','error','INVALID_ARGUMENT','coveragePercent','136kqQAnO','getParentSegmentSQL','Calculating\x20coverage\x20for:\x20','segments','attribute','Fetching\x20master\x20sample\x20data...','validateParentYaml','Validating\x20all\x20attributes\x20in\x20parallel...','pushParentYaml','Enriched\x20query:\x20','resolveParentIdOrName','627150TuKHRy','rowCount','sampleData','table','19990dsWyAK','filter','parentColumn','parent_key','source','logger','Fetching\x20sample\x20data\x20for:\x20','folder','join','listParentSegments','parentFolderId','listFolders','getParentSegmentFull','Validating\x20attribute:\x20','schema','enriched','deleteSegment','type','Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...','createSegmentFolder','Resource\x20\x27','population','string','updatedAt','7hPVLof','2249874BPWmqB','isAbsolute','\x27:\x20','behaviors','updateActivation','name','getParentSQL','7554744AhhYph','traversePath','808459kyXQME','\x27\x20not\x20found\x20in\x20path','previewParentYaml','test','some','parent','9GQAPLv','\x27\x20not\x20found','all','createFolder','database','attributes','matched_count','parentTableName','getSegment','getParent','ambiguous','createParent',')\x20exceeded','Attribute\x20\x27','listSegments','Folder\x20\x27','resolveSegmentId','behavior','createdAt','Segment\x20\x27','Master\x20table:\x20','createSegment','pullParentYaml'];a74_0x4d45=function(){return _0xae2d1c;};return a74_0x4d45();}import{apiToYaml,yamlToApi,toYamlString,parseYamlString}from'./segment/parent-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{DEFAULT_TIME_RANGE,DEFAULT_SAMPLE_LIMIT,generateSchemaValidationSQL,generateMasterCountSQL,generateMasterSampleSQL,generateAttributeCoverageSQL,generateBehaviorStatsSQL,generateAttributeSampleSQL,generateBehaviorSampleSQL,generateEnrichedSQL,generateAttributeSchemaSQL,generateBehaviorSchemaSQL,findAttributeByName,findBehaviorByName,getAttributeColumns,getBehaviorColumns}from'./segment/parent-segment-preview.js';export class SegmentSDK{[a74_0x3f4b6b(0x1f5)];['trinoClient'];constructor(_0x10d83b){const _0xb31d50=a74_0x3f4b6b;this[_0xb31d50(0x1f5)]=new CDPApiClient(_0x10d83b,_0x10d83b['logger']),this[_0xb31d50(0x1db)]=new TrinoApiClient(_0x10d83b,_0x10d83b[_0xb31d50(0x220)]);}async[a74_0x3f4b6b(0x201)](){const _0x38d7c3=a74_0x3f4b6b;return await this[_0x38d7c3(0x1f5)][_0x38d7c3(0x224)]();}async[a74_0x3f4b6b(0x24c)](_0x3acbb6){const _0x39f63a=a74_0x3f4b6b;return await this[_0x39f63a(0x1f5)][_0x39f63a(0x1e4)](_0x3acbb6);}async['listSegments'](_0x5bcf7f){const _0x36c97a=a74_0x3f4b6b;return await this[_0x36c97a(0x1f5)][_0x36c97a(0x251)](_0x5bcf7f);}async[a74_0x3f4b6b(0x24b)](_0x4046fe,_0xd5e33c){const _0x5217ee=a74_0x3f4b6b;return await this[_0x5217ee(0x1f5)][_0x5217ee(0x24b)](_0x4046fe,_0xd5e33c);}async['listFolders'](_0x293dec){const _0x12f5f6=a74_0x3f4b6b;return await this[_0x12f5f6(0x1f5)][_0x12f5f6(0x1ef)](_0x293dec);}async['getFolder'](_0x39421a){return await this['client']['getSegmentFolder'](_0x39421a);}async['listActivations'](_0x127f31,_0x305aad){const _0x2750d3=a74_0x3f4b6b;return await this[_0x2750d3(0x1f5)]['listActivations'](_0x127f31,_0x305aad);}async[a74_0x3f4b6b(0x1fb)](_0x2b1804,_0x47cdfe,_0x22b2ec){const _0x305a04=a74_0x3f4b6b;return await this[_0x305a04(0x1f5)][_0x305a04(0x1fb)](_0x2b1804,_0x47cdfe,_0x22b2ec);}async[a74_0x3f4b6b(0x1f7)](_0x52fe56,_0x512482,_0x3c9b74){const _0x5b347d=a74_0x3f4b6b;return await this[_0x5b347d(0x1f5)][_0x5b347d(0x1f7)](_0x52fe56,_0x512482,_0x3c9b74);}async[a74_0x3f4b6b(0x238)](_0x3d0f91,_0x5efe96,_0x49964e,_0x1486f1){const _0x699d8e=a74_0x3f4b6b;return await this['client'][_0x699d8e(0x238)](_0x3d0f91,_0x5efe96,_0x49964e,_0x1486f1);}async[a74_0x3f4b6b(0x263)](_0x5ddeda,_0xca3ed7,_0x31de7c){return await this['client']['deleteActivation'](_0x5ddeda,_0xca3ed7,_0x31de7c);}async[a74_0x3f4b6b(0x23a)](_0x5be89c){const _0x332f2b=a74_0x3f4b6b;return await this[_0x332f2b(0x1f5)][_0x332f2b(0x20d)](_0x5be89c);}async['getSegmentSQL'](_0x2939a8,_0x4b2afc){const _0x2c02f2=a74_0x3f4b6b;return await this[_0x2c02f2(0x1f5)][_0x2c02f2(0x262)](_0x2939a8,_0x4b2afc);}async[a74_0x3f4b6b(0x1d7)](_0x2cc776){const _0x4cc010=a74_0x3f4b6b,_0x40e30e=await this['listParents'](),_0x3e286f=_0x40e30e[_0x4cc010(0x25b)](_0x42fff2=>_0x42fff2[_0x4cc010(0x248)][_0x4cc010(0x239)]===_0x2cc776);if(!_0x3e286f)throw new SDKError(ErrorCode[_0x4cc010(0x260)],_0x4cc010(0x208)+_0x2cc776);return _0x3e286f['id'];}async[a74_0x3f4b6b(0x205)](_0x2365f6){const _0x3f54a8=a74_0x3f4b6b;let _0x267341=_0x2365f6;return!/^\d+$/[_0x3f54a8(0x240)](_0x2365f6)&&(_0x267341=await this['resolveParentId'](_0x2365f6)),await this[_0x3f54a8(0x1f5)][_0x3f54a8(0x1ff)](_0x267341);}async[a74_0x3f4b6b(0x253)](_0x40ad97,_0x426c0e){const _0x189ee5=a74_0x3f4b6b,_0x2ca415=await this['listSegments'](_0x40ad97),_0x23de40=_0x2ca415['find'](_0x59567c=>_0x59567c['name']===_0x426c0e);if(!_0x23de40)throw new SDKError(ErrorCode[_0x189ee5(0x260)],_0x189ee5(0x204)+_0x426c0e+_0x189ee5(0x1eb)+_0x40ad97);return _0x23de40['id'];}async[a74_0x3f4b6b(0x1fd)](_0x26f3f8,_0xafc5ed){const _0x4a3891=a74_0x3f4b6b,_0x330de2=await this['listFolders'](_0x26f3f8),_0x56fb98=_0x330de2['find'](_0x7a8920=>_0x7a8920['name']===_0xafc5ed);if(!_0x56fb98)throw new SDKError(ErrorCode[_0x4a3891(0x260)],_0x4a3891(0x25d)+_0xafc5ed+_0x4a3891(0x1eb)+_0x26f3f8);return _0x56fb98['id'];}async['listFields'](_0x245bcb){const _0x165de2=a74_0x3f4b6b,_0x5922e7=await this['resolveParentIdOrName'](_0x245bcb),[_0x489d58,_0x11d199]=await Promise[_0x165de2(0x245)]([this[_0x165de2(0x1f5)][_0x165de2(0x1e7)](_0x5922e7),this[_0x165de2(0x1f5)][_0x165de2(0x1e9)](_0x5922e7)]),_0x33dc76=[];for(const _0x478000 of _0x489d58){_0x33dc76[_0x165de2(0x203)]({'name':_0x478000['name'],'type':_0x478000['type'],'source':_0x165de2(0x210),'parentDatabaseName':_0x478000['parentDatabaseName'],'parentTableName':_0x478000[_0x165de2(0x24a)],'parentColumn':_0x478000[_0x165de2(0x21d)],'groupingName':_0x478000['groupingName']??undefined});}for(const _0x2f297c of _0x11d199){const _0x5ce71c=_0x2f297c[_0x165de2(0x239)];if(_0x2f297c[_0x165de2(0x229)]&&Array['isArray'](_0x2f297c['schema']))for(const _0x5e9e7d of _0x2f297c[_0x165de2(0x229)]){_0x5e9e7d[_0x165de2(0x239)]&&_0x5e9e7d[_0x165de2(0x22c)]&&_0x33dc76[_0x165de2(0x203)]({'name':_0x5ce71c+'.'+_0x5e9e7d[_0x165de2(0x239)],'type':_0x5e9e7d[_0x165de2(0x22c)],'source':'behavior','behaviorName':_0x5ce71c,'parentDatabaseName':_0x2f297c['parentDatabaseName'],'parentTableName':_0x2f297c[_0x165de2(0x24a)],'parentColumn':_0x5e9e7d['parentColumn']});}}return _0x33dc76;}async[a74_0x3f4b6b(0x24e)](_0x25628a){const _0x3a4b30=a74_0x3f4b6b;return await this[_0x3a4b30(0x1f5)][_0x3a4b30(0x1f2)](_0x25628a);}async[a74_0x3f4b6b(0x1e1)](_0x32f3f9,_0x2797a4){const _0x2b2689=a74_0x3f4b6b,_0x4edc39=await this[_0x2b2689(0x216)](_0x32f3f9);return await this[_0x2b2689(0x1f5)][_0x2b2689(0x1e3)](_0x4edc39,_0x2797a4);}async[a74_0x3f4b6b(0x1ec)](_0x2e9e72){const _0x1c5c05=a74_0x3f4b6b,_0x36f115=await this[_0x1c5c05(0x216)](_0x2e9e72);return await this['client'][_0x1c5c05(0x227)](_0x36f115);}async[a74_0x3f4b6b(0x259)](_0x19497c){const _0x6f0e47=a74_0x3f4b6b,_0x229888=await this[_0x6f0e47(0x1ec)](_0x19497c),_0x3806ec=apiToYaml(_0x229888);return toYamlString(_0x3806ec);}async[a74_0x3f4b6b(0x214)](_0x52ef6e){const _0x24a050=a74_0x3f4b6b,_0x1da560=typeof _0x52ef6e===_0x24a050(0x231)?parseYamlString(_0x52ef6e):_0x52ef6e,_0x2b3fee=yamlToApi(_0x1da560);let _0x44fa26=null,_0x2bc263='';try{_0x44fa26=await this[_0x24a050(0x1ec)](_0x1da560[_0x24a050(0x239)]);const _0x22a72f=apiToYaml(_0x44fa26);_0x2bc263=toYamlString(_0x22a72f);}catch{}const _0x240b0b=toYamlString(_0x1da560),_0x4c0a1f=generateDiff(_0x2bc263,_0x240b0b),_0x8fd986=formatDiffWithColors(_0x4c0a1f),_0x190051=_0x44fa26===null,_0x12e443=hasChanges(_0x4c0a1f),_0x4929ec={'isNew':_0x190051,'id':_0x44fa26?.['id']||'','name':_0x1da560[_0x24a050(0x239)],'diff':_0x4c0a1f,'diffFormatted':_0x8fd986,'hasChanges':_0x12e443},_0x1f4c44=async()=>{const _0x7ef8ca=_0x24a050;return _0x190051?await this[_0x7ef8ca(0x24e)](_0x2b3fee):await this[_0x7ef8ca(0x1e1)](_0x44fa26['id'],_0x2b3fee);};return{..._0x4929ec,'apply':_0x1f4c44};}async[a74_0x3f4b6b(0x212)](_0xc324e7,_0x3c3df5={}){const _0x2e4b5d=a74_0x3f4b6b,_0x11fbf9=typeof _0xc324e7===_0x2e4b5d(0x231)?parseYamlString(_0xc324e7):_0xc324e7,_0x159946=[];let _0x12f927=!![];const _0x120cd9=_0x30c489=>_0x3c3df5['onProgress']?.(_0x30c489),_0x263a71={'name':_0x11fbf9[_0x2e4b5d(0x239)],'master':{'database':_0x11fbf9[_0x2e4b5d(0x1da)][_0x2e4b5d(0x247)],'table':_0x11fbf9[_0x2e4b5d(0x1da)][_0x2e4b5d(0x21a)],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x159946,'allValid':!![]},_0x5c54e1=async _0x371e46=>{const _0x1aa754=_0x2e4b5d;try{const _0x59ed3e=await this[_0x1aa754(0x1db)][_0x1aa754(0x200)](_0x371e46);return{'data':_0x59ed3e['data']};}catch(_0x446be0){const _0x9baff2=_0x446be0 instanceof Error?_0x446be0[_0x1aa754(0x1dc)]:String(_0x446be0);return{'data':[],'error':_0x9baff2};}};_0x120cd9(_0x2e4b5d(0x25e)+_0x11fbf9[_0x2e4b5d(0x1da)][_0x2e4b5d(0x247)]+'.'+_0x11fbf9[_0x2e4b5d(0x1da)][_0x2e4b5d(0x21a)]);const _0x62b1b9=generateSchemaValidationSQL(_0x11fbf9['master'][_0x2e4b5d(0x247)],_0x11fbf9[_0x2e4b5d(0x1da)][_0x2e4b5d(0x21a)]),_0x40d2fd=await _0x5c54e1(_0x62b1b9);if(_0x40d2fd[_0x2e4b5d(0x209)])_0x263a71[_0x2e4b5d(0x1da)][_0x2e4b5d(0x1ea)]=![],_0x263a71[_0x2e4b5d(0x1da)][_0x2e4b5d(0x1f3)]=_0x40d2fd[_0x2e4b5d(0x209)],_0x159946['push'](_0x2e4b5d(0x257)+_0x40d2fd['error']),_0x12f927=![];else{_0x263a71[_0x2e4b5d(0x1da)][_0x2e4b5d(0x1ea)]=!![],_0x120cd9(_0x2e4b5d(0x1f8));const _0xa06773=await _0x5c54e1(generateMasterCountSQL(_0x11fbf9));!_0xa06773[_0x2e4b5d(0x209)]&&_0xa06773[_0x2e4b5d(0x1e6)][_0x2e4b5d(0x261)]>0x0&&(_0x263a71[_0x2e4b5d(0x1da)][_0x2e4b5d(0x218)]=_0xa06773['data'][0x0][_0x2e4b5d(0x1fe)]);}if(_0x3c3df5[_0x2e4b5d(0x1da)])return _0x263a71['allValid']=_0x12f927,_0x263a71;const _0x29f569=async _0xc26408=>{const _0x16ec7e=_0x2e4b5d,_0x43d8de={'name':_0xc26408[_0x16ec7e(0x239)],'database':_0xc26408[_0x16ec7e(0x21f)]['database'],'table':_0xc26408[_0x16ec7e(0x21f)][_0x16ec7e(0x21a)],'joinKey':_0xc26408['join'][_0x16ec7e(0x202)],'foreignKey':_0xc26408['join'][_0x16ec7e(0x21e)],'columns':getAttributeColumns(_0xc26408),'schemaValid':![]};_0x120cd9(_0x16ec7e(0x228)+_0xc26408[_0x16ec7e(0x239)]);const _0x3954dc=await _0x5c54e1(generateAttributeSchemaSQL(_0x11fbf9,_0xc26408));if(_0x3954dc[_0x16ec7e(0x209)])_0x43d8de[_0x16ec7e(0x1f3)]=_0x3954dc['error'];else{_0x43d8de[_0x16ec7e(0x1ea)]=!![],_0x120cd9(_0x16ec7e(0x20e)+_0xc26408[_0x16ec7e(0x239)]);const _0x255682=await _0x5c54e1(generateAttributeCoverageSQL(_0x11fbf9,_0xc26408));!_0x255682[_0x16ec7e(0x209)]&&_0x255682[_0x16ec7e(0x1e6)]['length']>0x0&&(_0x43d8de[_0x16ec7e(0x1e2)]=_0x255682[_0x16ec7e(0x1e6)][0x0][_0x16ec7e(0x249)],_0x263a71[_0x16ec7e(0x1da)][_0x16ec7e(0x218)]&&_0x263a71['master'][_0x16ec7e(0x218)]>0x0&&(_0x43d8de[_0x16ec7e(0x20b)]=_0x43d8de[_0x16ec7e(0x1e2)]/_0x263a71[_0x16ec7e(0x1da)][_0x16ec7e(0x218)]*0x64));}return _0x43d8de;},_0x410f12=async(_0x37dab9,_0x8b968)=>{const _0x1c875f=_0x2e4b5d,_0x4c7157={'name':_0x37dab9[_0x1c875f(0x239)],'database':_0x37dab9['source'][_0x1c875f(0x247)],'table':_0x37dab9[_0x1c875f(0x21f)][_0x1c875f(0x21a)],'joinKey':_0x37dab9['join']['child_key'],'foreignKey':_0x37dab9[_0x1c875f(0x223)]['parent_key'],'columns':getBehaviorColumns(_0x37dab9),'schemaValid':![]};_0x120cd9(_0x1c875f(0x1e8)+_0x37dab9[_0x1c875f(0x239)]);const _0x3f366b=await _0x5c54e1(generateBehaviorSchemaSQL(_0x11fbf9,_0x37dab9));if(_0x3f366b['error'])_0x4c7157['schemaError']=_0x3f366b[_0x1c875f(0x209)];else{_0x4c7157['schemaValid']=!![],_0x120cd9('Calculating\x20statistics\x20for:\x20'+_0x37dab9[_0x1c875f(0x239)]+'\x20('+_0x8b968+')');const _0x287c39=await _0x5c54e1(generateBehaviorStatsSQL(_0x11fbf9,_0x37dab9,_0x8b968));!_0x287c39['error']&&_0x287c39['data'][_0x1c875f(0x261)]>0x0&&(_0x4c7157['customersWithEvents']=_0x287c39['data'][0x0]['customers_with_events'],_0x4c7157[_0x1c875f(0x1dd)]=_0x287c39['data'][0x0]['total_events'],_0x263a71[_0x1c875f(0x1da)][_0x1c875f(0x218)]&&_0x263a71['master'][_0x1c875f(0x218)]>0x0&&(_0x4c7157[_0x1c875f(0x1f6)]=_0x4c7157['customersWithEvents']/_0x263a71['master']['rowCount']*0x64));}return _0x4c7157;},_0x543309=(_0x1ece46,_0x1fa823)=>{const _0x557957=_0x2e4b5d;_0x263a71[_0x557957(0x248)]=_0x1ece46,_0x263a71['behaviors']=_0x1fa823;for(const _0x1e2179 of _0x1ece46){!_0x1e2179['schemaValid']&&(_0x159946[_0x557957(0x203)](_0x557957(0x250)+_0x1e2179[_0x557957(0x239)]+_0x557957(0x236)+_0x1e2179[_0x557957(0x1f3)]),_0x12f927=![]);}for(const _0x3b48a2 of _0x1fa823){!_0x3b48a2[_0x557957(0x1ea)]&&(_0x159946[_0x557957(0x203)](_0x557957(0x1ed)+_0x3b48a2[_0x557957(0x239)]+'\x27:\x20'+_0x3b48a2[_0x557957(0x1f3)]),_0x12f927=![]);}},_0x54ea56=_0x3c3df5[_0x2e4b5d(0x25a)]||DEFAULT_TIME_RANGE;if(typeof _0x3c3df5[_0x2e4b5d(0x210)]===_0x2e4b5d(0x231)){const _0x36d3c3=findAttributeByName(_0x11fbf9,_0x3c3df5['attribute']);if(!_0x36d3c3)throw new SDKError(ErrorCode[_0x2e4b5d(0x260)],_0x2e4b5d(0x250)+_0x3c3df5[_0x2e4b5d(0x210)]+_0x2e4b5d(0x244));const _0x2ad5e1=await _0x29f569(_0x36d3c3);return _0x543309([_0x2ad5e1],[]),_0x263a71[_0x2e4b5d(0x1e5)]=_0x12f927,_0x263a71;}if(_0x3c3df5[_0x2e4b5d(0x210)]===!![]){_0x120cd9(_0x2e4b5d(0x213));const _0x543604=await Promise[_0x2e4b5d(0x245)]((_0x11fbf9[_0x2e4b5d(0x248)]||[])['map'](_0x3669de=>_0x29f569(_0x3669de)));return _0x543309(_0x543604,[]),_0x263a71[_0x2e4b5d(0x1e5)]=_0x12f927,_0x263a71;}if(typeof _0x3c3df5[_0x2e4b5d(0x254)]==='string'){const _0x503102=findBehaviorByName(_0x11fbf9,_0x3c3df5[_0x2e4b5d(0x254)]);if(!_0x503102)throw new SDKError(ErrorCode[_0x2e4b5d(0x260)],_0x2e4b5d(0x1ed)+_0x3c3df5['behavior']+_0x2e4b5d(0x244));const _0x3b30a1=await _0x410f12(_0x503102,_0x54ea56);return _0x543309([],[_0x3b30a1]),_0x263a71[_0x2e4b5d(0x1e5)]=_0x12f927,_0x263a71;}if(_0x3c3df5[_0x2e4b5d(0x254)]===!![]){_0x120cd9(_0x2e4b5d(0x25f));const _0x567cab=await Promise[_0x2e4b5d(0x245)]((_0x11fbf9[_0x2e4b5d(0x237)]||[])[_0x2e4b5d(0x1f4)](_0x34de2c=>_0x410f12(_0x34de2c,_0x54ea56)));return _0x543309([],_0x567cab),_0x263a71[_0x2e4b5d(0x1e5)]=_0x12f927,_0x263a71;}if(_0x3c3df5[_0x2e4b5d(0x22a)]){_0x120cd9('Validating\x20all\x20attributes\x20in\x20parallel...');const _0x3e12aa=await Promise['all']((_0x11fbf9['attributes']||[])[_0x2e4b5d(0x1f4)](_0x5d2bdf=>_0x29f569(_0x5d2bdf)));return _0x543309(_0x3e12aa,[]),_0x263a71[_0x2e4b5d(0x1e5)]=_0x12f927,_0x263a71;}_0x120cd9(_0x2e4b5d(0x22d));const [_0x32442d,_0x2f9e3b]=await Promise[_0x2e4b5d(0x245)]([Promise[_0x2e4b5d(0x245)]((_0x11fbf9[_0x2e4b5d(0x248)]||[])[_0x2e4b5d(0x1f4)](_0x523fbc=>_0x29f569(_0x523fbc))),Promise[_0x2e4b5d(0x245)]((_0x11fbf9[_0x2e4b5d(0x237)]||[])[_0x2e4b5d(0x1f4)](_0xdee172=>_0x410f12(_0xdee172,_0x54ea56)))]);return _0x543309(_0x32442d,_0x2f9e3b),_0x263a71[_0x2e4b5d(0x1e5)]=_0x12f927,_0x263a71;}async[a74_0x3f4b6b(0x23f)](_0x27ad69,_0x3b6543={}){const _0x547cde=a74_0x3f4b6b,_0x219dd2=typeof _0x27ad69==='string'?parseYamlString(_0x27ad69):_0x27ad69,_0x4c3482=[];let _0x3e7b3a=!![];const _0x57599e=_0x3778c3=>_0x3b6543['onProgress']?.(_0x3778c3),_0x14a1df={'name':_0x219dd2[_0x547cde(0x239)],'master':{'database':_0x219dd2[_0x547cde(0x1da)][_0x547cde(0x247)],'table':_0x219dd2[_0x547cde(0x1da)][_0x547cde(0x21a)],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0x4c3482,'allValid':!![]},_0x44d785=async _0x4e4673=>{const _0x3eab41=_0x547cde;try{const _0x23fdab=await this[_0x3eab41(0x1db)][_0x3eab41(0x200)](_0x4e4673);return{'data':_0x23fdab['data']};}catch(_0x3599b1){const _0x36c40f=_0x3599b1 instanceof Error?_0x3599b1['message']:String(_0x3599b1);return{'data':[],'error':_0x36c40f};}};if(_0x3b6543['master']){_0x57599e(_0x547cde(0x211));const _0x10b694=generateMasterSampleSQL(_0x219dd2,DEFAULT_SAMPLE_LIMIT),_0x4ff307=await _0x44d785(_0x10b694);return!_0x4ff307[_0x547cde(0x209)]?_0x14a1df[_0x547cde(0x219)]=_0x4ff307[_0x547cde(0x1e6)]:(_0x4c3482['push'](_0x547cde(0x257)+_0x4ff307[_0x547cde(0x209)]),_0x3e7b3a=![]),_0x14a1df[_0x547cde(0x1e5)]=_0x3e7b3a,_0x14a1df;}if(_0x3b6543[_0x547cde(0x210)]){const _0xc137ae=findAttributeByName(_0x219dd2,_0x3b6543[_0x547cde(0x210)]);if(!_0xc137ae)throw new SDKError(ErrorCode[_0x547cde(0x260)],_0x547cde(0x250)+_0x3b6543[_0x547cde(0x210)]+_0x547cde(0x244));_0x57599e('Fetching\x20sample\x20data\x20for:\x20'+_0xc137ae[_0x547cde(0x239)]);const _0x58f7fe=generateAttributeSampleSQL(_0x219dd2,_0xc137ae,DEFAULT_SAMPLE_LIMIT),_0x342c3b=await _0x44d785(_0x58f7fe);return!_0x342c3b['error']?_0x14a1df[_0x547cde(0x219)]=_0x342c3b[_0x547cde(0x1e6)]:(_0x4c3482[_0x547cde(0x203)](_0x547cde(0x250)+_0xc137ae[_0x547cde(0x239)]+_0x547cde(0x236)+_0x342c3b[_0x547cde(0x209)]),_0x3e7b3a=![]),_0x14a1df[_0x547cde(0x1e5)]=_0x3e7b3a,_0x14a1df;}if(_0x3b6543['behavior']){const _0x3b25c4=findBehaviorByName(_0x219dd2,_0x3b6543[_0x547cde(0x254)]);if(!_0x3b25c4)throw new SDKError(ErrorCode[_0x547cde(0x260)],_0x547cde(0x1ed)+_0x3b6543[_0x547cde(0x254)]+_0x547cde(0x244));const _0x15c2a7=_0x3b6543[_0x547cde(0x25a)]||DEFAULT_TIME_RANGE;_0x57599e(_0x547cde(0x221)+_0x3b25c4['name']+'\x20('+_0x15c2a7+')');const _0x1fa6d8=generateBehaviorSampleSQL(_0x219dd2,_0x3b25c4,DEFAULT_SAMPLE_LIMIT,_0x15c2a7),_0x22258a=await _0x44d785(_0x1fa6d8);return!_0x22258a['error']?_0x14a1df['sampleData']=_0x22258a['data']:(_0x4c3482['push'](_0x547cde(0x1ed)+_0x3b25c4[_0x547cde(0x239)]+_0x547cde(0x236)+_0x22258a[_0x547cde(0x209)]),_0x3e7b3a=![]),_0x14a1df[_0x547cde(0x1e5)]=_0x3e7b3a,_0x14a1df;}if(_0x3b6543[_0x547cde(0x22a)]){_0x57599e(_0x547cde(0x1ee));const _0x1b4b4c=generateEnrichedSQL(_0x219dd2,DEFAULT_SAMPLE_LIMIT),_0x1be5bc=await _0x44d785(_0x1b4b4c);return!_0x1be5bc[_0x547cde(0x209)]?_0x14a1df[_0x547cde(0x219)]=_0x1be5bc['data']:(_0x4c3482[_0x547cde(0x203)](_0x547cde(0x215)+_0x1be5bc[_0x547cde(0x209)]),_0x3e7b3a=![]),_0x14a1df[_0x547cde(0x1e5)]=_0x3e7b3a,_0x14a1df;}return _0x14a1df[_0x547cde(0x1e5)]=_0x3e7b3a,_0x14a1df;}async[a74_0x3f4b6b(0x258)](_0x59bf1c,_0x3a650b){return await this['client']['createSegment'](_0x59bf1c,_0x3a650b);}async[a74_0x3f4b6b(0x1de)](_0x5b6380,_0x33b1d0,_0x15e251){const _0x1ddd9c=a74_0x3f4b6b;return await this[_0x1ddd9c(0x1f5)][_0x1ddd9c(0x1fa)](_0x5b6380,_0x33b1d0,_0x15e251);}async[a74_0x3f4b6b(0x22b)](_0x3770db){return await this['client']['deleteSegment'](_0x3770db);}async[a74_0x3f4b6b(0x246)](_0x20fded,_0x201657){const _0x48075b=a74_0x3f4b6b,_0x510426=await this['resolveParentIdOrName'](_0x20fded);return await this[_0x48075b(0x1f5)][_0x48075b(0x22e)](_0x510426,_0x201657);}async['resolveParentIdOrName'](_0x5559d4){const _0x15ba3b=a74_0x3f4b6b;if(/^\d+$/[_0x15ba3b(0x240)](_0x5559d4))return _0x5559d4;return await this[_0x15ba3b(0x1d7)](_0x5559d4);}async['detectResourceType'](_0x40ae3b,_0x11f292){const _0x2f0b45=a74_0x3f4b6b,[_0x13c351,_0x2cb5e4]=await Promise[_0x2f0b45(0x245)]([this['resolveFolderId'](_0x40ae3b,_0x11f292)[_0x2f0b45(0x1fc)](()=>!![])['catch'](()=>![]),this[_0x2f0b45(0x253)](_0x40ae3b,_0x11f292)[_0x2f0b45(0x1fc)](()=>!![])['catch'](()=>![])]);if(_0x13c351&&_0x2cb5e4)return _0x2f0b45(0x24d);else{if(_0x13c351)return'folder';else{if(_0x2cb5e4)return _0x2f0b45(0x1f0);}}throw new SDKError(ErrorCode[_0x2f0b45(0x260)],_0x2f0b45(0x22f)+_0x11f292+'\x27\x20not\x20found\x20in\x20parent\x20segment');}async['detectResourceTypeInFolder'](_0x14f108,_0x328725,_0x2f4ff4){const _0xea4a83=a74_0x3f4b6b,[_0x4a9a54,_0x36af75]=await Promise['all']([this[_0xea4a83(0x226)](_0x14f108),this[_0xea4a83(0x251)](_0x14f108)]),_0x3ab390=_0x2f4ff4?_0x4a9a54[_0xea4a83(0x21c)](_0x3ff235=>_0x3ff235[_0xea4a83(0x225)]===_0x2f4ff4):_0x4a9a54['filter'](_0x30909e=>!_0x30909e[_0xea4a83(0x225)]),_0x339ed4=_0x2f4ff4?_0x36af75['filter'](_0x382219=>_0x382219['segmentFolderId']===_0x2f4ff4):_0x36af75[_0xea4a83(0x21c)](_0x248ab8=>!_0x248ab8[_0xea4a83(0x1f1)]),_0x24cdce=_0x3ab390[_0xea4a83(0x241)](_0x363dfc=>_0x363dfc['name']===_0x328725),_0x289f79=_0x339ed4['some'](_0x442cf3=>_0x442cf3[_0xea4a83(0x239)]===_0x328725);if(_0x24cdce&&_0x289f79)return _0xea4a83(0x24d);else{if(_0x24cdce)return _0xea4a83(0x222);else{if(_0x289f79)return _0xea4a83(0x1f0);}}throw new SDKError(ErrorCode[_0xea4a83(0x260)],_0xea4a83(0x22f)+_0x328725+_0xea4a83(0x265)+(_0x2f4ff4?_0xea4a83(0x222):'parent\x20segment'));}async[a74_0x3f4b6b(0x23c)](_0x1b3178){const _0x447dc4=a74_0x3f4b6b;if(_0x1b3178['length']===0x0)throw new SDKError(ErrorCode[_0x447dc4(0x20a)],_0x447dc4(0x1f9));const _0x34fb7c=_0x1b3178[0x0],_0x1569fa=await this['resolveParentId'](_0x34fb7c);if(_0x1b3178['length']===0x1)return{'parentId':_0x1569fa,'parentName':_0x34fb7c,'type':_0x447dc4(0x242),'fullPath':_0x34fb7c};const _0xdb1242=await this['getParentFull'](_0x1569fa),_0x10d162=_0xdb1242[_0x447dc4(0x264)],_0x1438ae=[];let _0x5062c9=_0x10d162;for(let _0x2be06a=0x1;_0x2be06a<_0x1b3178[_0x447dc4(0x261)]-0x1;_0x2be06a++){const _0x575940=_0x1b3178[_0x2be06a],_0x13a7eb=await this['listFolders'](_0x1569fa),_0x58d6e6=_0x5062c9?_0x13a7eb[_0x447dc4(0x25b)](_0x4497f1=>_0x4497f1['name']===_0x575940&&_0x4497f1['parentFolderId']===_0x5062c9):_0x13a7eb['find'](_0x2c9919=>_0x2c9919[_0x447dc4(0x239)]===_0x575940&&!_0x2c9919[_0x447dc4(0x225)]);if(!_0x58d6e6)throw new SDKError(ErrorCode[_0x447dc4(0x260)],_0x447dc4(0x252)+_0x575940+_0x447dc4(0x23e));_0x1438ae[_0x447dc4(0x203)](_0x575940),_0x5062c9=_0x58d6e6['id'];}const _0x4559d4=_0x1b3178[_0x1b3178[_0x447dc4(0x261)]-0x1],_0x4b3403=await this['detectResourceTypeInFolder'](_0x1569fa,_0x4559d4,_0x5062c9);if(_0x4b3403===_0x447dc4(0x24d)||_0x4b3403===_0x447dc4(0x222)){const _0x4dc2c2=await this[_0x447dc4(0x226)](_0x1569fa),_0x45f320=_0x5062c9?_0x4dc2c2[_0x447dc4(0x25b)](_0x577d99=>_0x577d99[_0x447dc4(0x239)]===_0x4559d4&&_0x577d99[_0x447dc4(0x225)]===_0x5062c9):_0x4dc2c2[_0x447dc4(0x25b)](_0x44fd8d=>_0x44fd8d['name']===_0x4559d4&&!_0x44fd8d[_0x447dc4(0x225)]);if(!_0x45f320)throw new SDKError(ErrorCode[_0x447dc4(0x260)],'Folder\x20\x27'+_0x4559d4+_0x447dc4(0x244));return _0x1438ae[_0x447dc4(0x203)](_0x4559d4),{'parentId':_0x1569fa,'parentName':_0x34fb7c,'folderId':_0x45f320['id'],'folderPath':_0x1438ae,'type':_0x447dc4(0x222),'fullPath':_0x1b3178['join']('/')};}else{const _0x4153fa=await this[_0x447dc4(0x251)](_0x1569fa),_0x22e92a=_0x5062c9?_0x4153fa[_0x447dc4(0x25b)](_0xfaf53=>_0xfaf53[_0x447dc4(0x239)]===_0x4559d4&&_0xfaf53[_0x447dc4(0x1f1)]===_0x5062c9):_0x4153fa[_0x447dc4(0x25b)](_0x3c2d9e=>_0x3c2d9e[_0x447dc4(0x239)]===_0x4559d4&&!_0x3c2d9e[_0x447dc4(0x1f1)]);if(!_0x22e92a)throw new SDKError(ErrorCode[_0x447dc4(0x260)],_0x447dc4(0x256)+_0x4559d4+_0x447dc4(0x244));return{'parentId':_0x1569fa,'parentName':_0x34fb7c,'folderId':_0x5062c9,'folderPath':_0x1438ae['length']>0x0?_0x1438ae:undefined,'segmentId':_0x22e92a['id'],'segmentName':_0x4559d4,'type':'segment','fullPath':_0x1b3178['join']('/')};}}async['resolvePathToResource'](_0x3c34e6){const _0x434f70=a74_0x3f4b6b,_0x57ca8f=parsePath(_0x3c34e6);if(!_0x57ca8f[_0x434f70(0x235)])throw new SDKError(ErrorCode[_0x434f70(0x20a)],_0x434f70(0x1df));return await this[_0x434f70(0x23c)](_0x57ca8f[_0x434f70(0x20f)]);}async[a74_0x3f4b6b(0x1d8)](_0x4dbdb2,_0x141628){const _0x47db35=a74_0x3f4b6b,[_0x5862b,_0x320eea]=await Promise[_0x47db35(0x245)]([this[_0x47db35(0x226)](_0x4dbdb2),this[_0x47db35(0x251)](_0x4dbdb2)]);if(_0x141628){const _0x3ddfd6=_0x5862b['filter'](_0x19463a=>_0x19463a[_0x47db35(0x225)]===_0x141628),_0xae9139=_0x320eea[_0x47db35(0x21c)](_0xda3558=>_0xda3558[_0x47db35(0x1f1)]===_0x141628);return{'folders':_0x3ddfd6,'segments':_0xae9139};}const _0x4aa06f=await this['getParentFull'](_0x4dbdb2),_0x281454=_0x4aa06f[_0x47db35(0x264)];if(_0x281454){const _0x43b5df=_0x5862b[_0x47db35(0x21c)](_0x4856ea=>_0x4856ea[_0x47db35(0x225)]===_0x281454),_0x4cc869=_0x320eea[_0x47db35(0x21c)](_0x5440e6=>_0x5440e6[_0x47db35(0x1f1)]===_0x281454);return{'folders':_0x43b5df,'segments':_0x4cc869};}const _0x10198e=_0x5862b[_0x47db35(0x21c)](_0x146ae5=>!_0x146ae5[_0x47db35(0x225)]),_0x504502=_0x320eea[_0x47db35(0x21c)](_0xe6a4c7=>!_0xe6a4c7['segmentFolderId']);return{'folders':_0x10198e,'segments':_0x504502};}async['listRecursive'](_0x1a4f06,_0x58f971,_0x20d395=0x0,_0x142b05=0xa){const _0x48f4ae=a74_0x3f4b6b;if(_0x20d395>=_0x142b05)throw new SDKError(ErrorCode[_0x48f4ae(0x20a)],'Maximum\x20recursion\x20depth\x20('+_0x142b05+_0x48f4ae(0x24f));const {folders:_0x4d6a75,segments:_0xb38834}=await this[_0x48f4ae(0x1d8)](_0x1a4f06,_0x58f971),_0xadc5bd=[];for(const _0x3f001d of _0x4d6a75){const _0x43d99f=await this['listRecursive'](_0x1a4f06,_0x3f001d['id'],_0x20d395+0x1,_0x142b05);_0xadc5bd[_0x48f4ae(0x203)]({'type':_0x48f4ae(0x222),'id':_0x3f001d['id'],'name':_0x3f001d[_0x48f4ae(0x239)],'children':_0x43d99f['length']>0x0?_0x43d99f:undefined,'metadata':{'description':_0x3f001d[_0x48f4ae(0x207)]||undefined,'folderCount':_0x43d99f['filter'](_0x4964bc=>_0x4964bc[_0x48f4ae(0x22c)]===_0x48f4ae(0x222))['length'],'segmentCount':_0x43d99f[_0x48f4ae(0x21c)](_0x5df4a1=>_0x5df4a1[_0x48f4ae(0x22c)]===_0x48f4ae(0x1f0))['length'],'createdAt':_0x3f001d[_0x48f4ae(0x255)],'updatedAt':_0x3f001d[_0x48f4ae(0x232)]}});}for(const _0x595087 of _0xb38834){_0xadc5bd[_0x48f4ae(0x203)]({'type':_0x48f4ae(0x1f0),'id':_0x595087['id'],'name':_0x595087[_0x48f4ae(0x239)],'population':_0x595087[_0x48f4ae(0x230)],'metadata':{'description':_0x595087[_0x48f4ae(0x207)],'createdAt':_0x595087[_0x48f4ae(0x255)],'updatedAt':_0x595087[_0x48f4ae(0x232)]}});}return _0xadc5bd;}}
1
+ const a74_0xb59eb3=a74_0xf500;(function(_0x3071e4,_0x3756a3){const _0x2a23ee=a74_0xf500,_0x122489=_0x3071e4();while(!![]){try{const _0x274116=-parseInt(_0x2a23ee(0x17a))/0x1*(-parseInt(_0x2a23ee(0x179))/0x2)+-parseInt(_0x2a23ee(0x19b))/0x3+-parseInt(_0x2a23ee(0x1c8))/0x4*(-parseInt(_0x2a23ee(0x1c1))/0x5)+-parseInt(_0x2a23ee(0x1c2))/0x6+parseInt(_0x2a23ee(0x1cb))/0x7+parseInt(_0x2a23ee(0x1b9))/0x8*(-parseInt(_0x2a23ee(0x186))/0x9)+parseInt(_0x2a23ee(0x170))/0xa*(-parseInt(_0x2a23ee(0x1b1))/0xb);if(_0x274116===_0x3756a3)break;else _0x122489['push'](_0x122489['shift']());}catch(_0x5a07fb){_0x122489['push'](_0x122489['shift']());}}}(a74_0x327e,0x7abde));import{CDPApiClient}from'../client/cdp-api-client.js';function a74_0xf500(_0x180ad4,_0xa7dec7){_0x180ad4=_0x180ad4-0x144;const _0x327ecb=a74_0x327e();let _0xf5008c=_0x327ecb[_0x180ad4];return _0xf5008c;}import{TrinoApiClient}from'../client/trino-api-client.js';import{SDKError,ErrorCode}from'./errors.js';import{parsePath}from'../utils/segment-path-parser.js';import{apiToYaml,yamlToApi,toYamlString,parseYamlString}from'./segment/parent-segment-yaml.js';function a74_0x327e(){const _0x169a92=['rowCount','length','Behavior\x20\x27','map','Path\x20cannot\x20be\x20empty','\x27\x20not\x20found\x20in\x20path','getParent','groupingName','resolvePathToResource','rootFolderId','listFields','all','updateSegment','join','listRecursive','listParents','parent\x20segment','push','\x27\x20not\x20found','getParentFull','parentTableName','total_events','data','Master\x20table:\x20','Folder\x20\x27','source','previewParentYaml','description','Validating\x20master\x20table:\x20','resolveParentId','ambiguous','updatedAt','\x27\x20not\x20found\x20in\x20parent\x20segment','string','Fetching\x20sample\x20data\x20for:\x20','parent','catch','behaviors','totalEvents','interval','Maximum\x20recursion\x20depth\x20(','createParent','984690BZteYU','Parent\x20segment\x20not\x20found:\x20','schema','attribute','parentFolderId','executeQuery','Folder\x20not\x20found:\x20','customersWithEvents','enriched','1276deyEdf','883kLZbyj','behavior','Counting\x20master\x20table\x20rows...','find','listFolders','\x20in\x20parent\x20','database','getParentSQL','getAudienceAttributes','schemaValid','runParent','master','19566pBUGqZ','Fetching\x20master\x20sample\x20data...','getSegmentSQL','Validating\x20attribute:\x20',')\x20exceeded','Resource\x20\x27','isAbsolute','createFolder','customers_with_events','Enriched\x20query:\x20','Validating\x20all\x20behaviors\x20in\x20parallel...','attributes','updateParent','getActivation','\x27:\x20','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','matched_count','segments','allValid','createdAt','segmentFolderId','1713417mTyLMM','getFolder','Fetching\x20enriched\x20master\x20data...','sampleData','SEGMENT_NOT_FOUND','createActivation','Calculating\x20statistics\x20for:\x20','segment','Validating\x20all\x20attributes\x20in\x20parallel...','listUnified','row_count','table','logger','parentColumn','folder','message','coveragePercent','schemaError','Attribute\x20\x27','test','detectResourceTypeInFolder','client','121hbGhQD','detectResourceType','trinoClient','updateSegmentById','listSegments','error','createSegment','deleteActivation','176KUOBsE','name','filter','listParentSegments','\x27\x20not\x20found\x20in\x20','child_key','Validating\x20behavior:\x20','INVALID_ARGUMENT','932390CIfCCD','1228578PWAMII','isArray','updateParentSegment','listActivations','resolveFolderId','type','20OyjpnD','resolveParentIdOrName','customerPercent','6397265qXZVcC','updateActivation','parentDatabaseName','resolveSegmentId','onProgress','listSegmentFolders','getSegment','then','parent_key','Segment\x20\x27'];a74_0x327e=function(){return _0x169a92;};return a74_0x327e();}import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{DEFAULT_TIME_RANGE,DEFAULT_SAMPLE_LIMIT,generateSchemaValidationSQL,generateMasterCountSQL,generateMasterSampleSQL,generateAttributeCoverageSQL,generateBehaviorStatsSQL,generateAttributeSampleSQL,generateBehaviorSampleSQL,generateEnrichedSQL,generateAttributeSchemaSQL,generateBehaviorSchemaSQL,findAttributeByName,findBehaviorByName,getAttributeColumns,getBehaviorColumns}from'./segment/parent-segment-preview.js';export class SegmentSDK{['client'];[a74_0xb59eb3(0x1b3)];constructor(_0x4df81e){const _0x3c24bb=a74_0xb59eb3;this[_0x3c24bb(0x1b0)]=new CDPApiClient(_0x4df81e,_0x4df81e[_0x3c24bb(0x1a7)]),this['trinoClient']=new TrinoApiClient(_0x4df81e,_0x4df81e[_0x3c24bb(0x1a7)]);}async[a74_0xb59eb3(0x155)](){const _0x43baf6=a74_0xb59eb3;return await this[_0x43baf6(0x1b0)][_0x43baf6(0x1bc)]();}async[a74_0xb59eb3(0x14c)](_0x5f2580){return await this['client']['getParentSegment'](_0x5f2580);}async[a74_0xb59eb3(0x1b5)](_0x41bcac){const _0x591eb3=a74_0xb59eb3;return await this[_0x591eb3(0x1b0)][_0x591eb3(0x1b5)](_0x41bcac);}async[a74_0xb59eb3(0x1d1)](_0x461f67,_0x239f9f){const _0x4df7ed=a74_0xb59eb3;return await this[_0x4df7ed(0x1b0)]['getSegment'](_0x461f67,_0x239f9f);}async[a74_0xb59eb3(0x17e)](_0x32feb6){const _0x5cfe83=a74_0xb59eb3;return await this['client'][_0x5cfe83(0x1d0)](_0x32feb6);}async[a74_0xb59eb3(0x19c)](_0x1c587c){const _0x176d0b=a74_0xb59eb3;return await this[_0x176d0b(0x1b0)]['getSegmentFolder'](_0x1c587c);}async[a74_0xb59eb3(0x1c5)](_0x3ccc43,_0x383f5c){const _0x3046b2=a74_0xb59eb3;return await this[_0x3046b2(0x1b0)]['listActivations'](_0x3ccc43,_0x383f5c);}async[a74_0xb59eb3(0x193)](_0x1cf57f,_0x336bc9,_0x1d51a2){const _0x34a3d0=a74_0xb59eb3;return await this[_0x34a3d0(0x1b0)]['getActivation'](_0x1cf57f,_0x336bc9,_0x1d51a2);}async[a74_0xb59eb3(0x1a0)](_0x461ed5,_0x3ba1ba,_0x327b05){const _0x46a3e6=a74_0xb59eb3;return await this[_0x46a3e6(0x1b0)][_0x46a3e6(0x1a0)](_0x461ed5,_0x3ba1ba,_0x327b05);}async[a74_0xb59eb3(0x1cc)](_0x197a8b,_0x59d76b,_0x3bd0a0,_0x166c4f){const _0x5c8526=a74_0xb59eb3;return await this[_0x5c8526(0x1b0)]['updateActivation'](_0x197a8b,_0x59d76b,_0x3bd0a0,_0x166c4f);}async[a74_0xb59eb3(0x1b8)](_0x1ca4ab,_0x5d170b,_0x4a4a41){const _0x431b54=a74_0xb59eb3;return await this['client'][_0x431b54(0x1b8)](_0x1ca4ab,_0x5d170b,_0x4a4a41);}async[a74_0xb59eb3(0x181)](_0x25fc52){const _0x4e9dc1=a74_0xb59eb3;return await this[_0x4e9dc1(0x1b0)]['getParentSegmentSQL'](_0x25fc52);}async[a74_0xb59eb3(0x188)](_0x8d97,_0x11e75f){const _0x19825a=a74_0xb59eb3;return await this['client'][_0x19825a(0x188)](_0x8d97,_0x11e75f);}async[a74_0xb59eb3(0x163)](_0xbfdfd9){const _0x419503=a74_0xb59eb3,_0x1f4b3d=await this['listParents'](),_0x48c7a3=_0x1f4b3d['find'](_0x58cab5=>_0x58cab5[_0x419503(0x191)][_0x419503(0x1ba)]===_0xbfdfd9);if(!_0x48c7a3)throw new SDKError(ErrorCode[_0x419503(0x19f)],_0x419503(0x171)+_0xbfdfd9);return _0x48c7a3['id'];}async[a74_0xb59eb3(0x184)](_0xb5a547){const _0x10281a=a74_0xb59eb3;let _0x238fe7=_0xb5a547;return!/^\d+$/[_0x10281a(0x1ae)](_0xb5a547)&&(_0x238fe7=await this[_0x10281a(0x163)](_0xb5a547)),await this['client']['runParentSegment'](_0x238fe7);}async['resolveSegmentId'](_0x91fa65,_0x41ddd3){const _0x11a502=a74_0xb59eb3,_0x30c11e=await this[_0x11a502(0x1b5)](_0x91fa65),_0x32dcbf=_0x30c11e[_0x11a502(0x17d)](_0x4d7b7d=>_0x4d7b7d[_0x11a502(0x1ba)]===_0x41ddd3);if(!_0x32dcbf)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Child\x20segment\x20not\x20found:\x20'+_0x41ddd3+_0x11a502(0x17f)+_0x91fa65);return _0x32dcbf['id'];}async[a74_0xb59eb3(0x1c6)](_0x330a60,_0x410240){const _0x3f7c3b=a74_0xb59eb3,_0x15edb7=await this[_0x3f7c3b(0x17e)](_0x330a60),_0x1ac0a1=_0x15edb7[_0x3f7c3b(0x17d)](_0x58de19=>_0x58de19[_0x3f7c3b(0x1ba)]===_0x410240);if(!_0x1ac0a1)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x3f7c3b(0x176)+_0x410240+'\x20in\x20parent\x20'+_0x330a60);return _0x1ac0a1['id'];}async[a74_0xb59eb3(0x150)](_0x15b67f){const _0x4934d9=a74_0xb59eb3,_0x2b11ce=await this[_0x4934d9(0x1c9)](_0x15b67f),[_0x3684a9,_0xbaa208]=await Promise['all']([this['client'][_0x4934d9(0x182)](_0x2b11ce),this['client']['getAudienceBehaviors'](_0x2b11ce)]),_0x459f0c=[];for(const _0x63e840 of _0x3684a9){_0x459f0c[_0x4934d9(0x157)]({'name':_0x63e840['name'],'type':_0x63e840['type'],'source':_0x4934d9(0x173),'parentDatabaseName':_0x63e840[_0x4934d9(0x1cd)],'parentTableName':_0x63e840[_0x4934d9(0x15a)],'parentColumn':_0x63e840[_0x4934d9(0x1a8)],'groupingName':_0x63e840[_0x4934d9(0x14d)]??undefined});}for(const _0x463d57 of _0xbaa208){const _0xa2c770=_0x463d57['name'];if(_0x463d57[_0x4934d9(0x172)]&&Array[_0x4934d9(0x1c3)](_0x463d57[_0x4934d9(0x172)]))for(const _0x3edb3a of _0x463d57[_0x4934d9(0x172)]){_0x3edb3a['name']&&_0x3edb3a[_0x4934d9(0x1c7)]&&_0x459f0c[_0x4934d9(0x157)]({'name':_0xa2c770+'.'+_0x3edb3a['name'],'type':_0x3edb3a[_0x4934d9(0x1c7)],'source':_0x4934d9(0x17b),'behaviorName':_0xa2c770,'parentDatabaseName':_0x463d57['parentDatabaseName'],'parentTableName':_0x463d57[_0x4934d9(0x15a)],'parentColumn':_0x3edb3a[_0x4934d9(0x1a8)]});}}return _0x459f0c;}async[a74_0xb59eb3(0x16f)](_0x5c3c02){return await this['client']['createParentSegment'](_0x5c3c02);}async[a74_0xb59eb3(0x192)](_0x69c9fd,_0x3125c1){const _0x3375d0=a74_0xb59eb3,_0x183169=await this[_0x3375d0(0x1c9)](_0x69c9fd);return await this['client'][_0x3375d0(0x1c4)](_0x183169,_0x3125c1);}async['getParentFull'](_0x490376){const _0x306c46=a74_0xb59eb3,_0x157f30=await this[_0x306c46(0x1c9)](_0x490376);return await this[_0x306c46(0x1b0)]['getParentSegmentFull'](_0x157f30);}async['pullParentYaml'](_0x1b9295){const _0xd54353=await this['getParentFull'](_0x1b9295),_0x3c3db5=apiToYaml(_0xd54353);return toYamlString(_0x3c3db5);}async['pushParentYaml'](_0xdd6ecf){const _0x2eb129=a74_0xb59eb3,_0xee768f=typeof _0xdd6ecf===_0x2eb129(0x167)?parseYamlString(_0xdd6ecf):_0xdd6ecf,_0x17d8dc=yamlToApi(_0xee768f);let _0x224d76=null,_0x3b8508='';try{_0x224d76=await this[_0x2eb129(0x159)](_0xee768f[_0x2eb129(0x1ba)]);const _0x346e82=apiToYaml(_0x224d76);_0x3b8508=toYamlString(_0x346e82);}catch{}const _0x132a90=toYamlString(_0xee768f),_0x28db4c=generateDiff(_0x3b8508,_0x132a90),_0x36ba1e=formatDiffWithColors(_0x28db4c),_0x5b4af2=_0x224d76===null,_0x5ccdb4=hasChanges(_0x28db4c),_0x51e844={'isNew':_0x5b4af2,'id':_0x224d76?.['id']||'','name':_0xee768f[_0x2eb129(0x1ba)],'diff':_0x28db4c,'diffFormatted':_0x36ba1e,'hasChanges':_0x5ccdb4},_0x48f02b=async()=>{const _0x5f33af=_0x2eb129;return _0x5b4af2?await this[_0x5f33af(0x16f)](_0x17d8dc):await this[_0x5f33af(0x192)](_0x224d76['id'],_0x17d8dc);};return{..._0x51e844,'apply':_0x48f02b};}async['validateParentYaml'](_0x1ff555,_0x5de632={}){const _0x29b1c3=a74_0xb59eb3,_0xa94cc=typeof _0x1ff555===_0x29b1c3(0x167)?parseYamlString(_0x1ff555):_0x1ff555,_0x88ad51=[];let _0x1622f9=!![];const _0x44ee02=_0x3f9192=>_0x5de632[_0x29b1c3(0x1cf)]?.(_0x3f9192),_0x244671={'name':_0xa94cc[_0x29b1c3(0x1ba)],'master':{'database':_0xa94cc[_0x29b1c3(0x185)][_0x29b1c3(0x180)],'table':_0xa94cc[_0x29b1c3(0x185)]['table'],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x88ad51,'allValid':!![]},_0x304ac2=async _0x5e7163=>{const _0x4aeb7f=_0x29b1c3;try{const _0x804ef3=await this['trinoClient'][_0x4aeb7f(0x175)](_0x5e7163);return{'data':_0x804ef3['data']};}catch(_0x27f1f2){const _0xa4de12=_0x27f1f2 instanceof Error?_0x27f1f2[_0x4aeb7f(0x1aa)]:String(_0x27f1f2);return{'data':[],'error':_0xa4de12};}};_0x44ee02(_0x29b1c3(0x162)+_0xa94cc['master'][_0x29b1c3(0x180)]+'.'+_0xa94cc[_0x29b1c3(0x185)]['table']);const _0x5b62db=generateSchemaValidationSQL(_0xa94cc[_0x29b1c3(0x185)]['database'],_0xa94cc[_0x29b1c3(0x185)]['table']),_0x3ea223=await _0x304ac2(_0x5b62db);if(_0x3ea223[_0x29b1c3(0x1b6)])_0x244671['master'][_0x29b1c3(0x183)]=![],_0x244671['master'][_0x29b1c3(0x1ac)]=_0x3ea223[_0x29b1c3(0x1b6)],_0x88ad51[_0x29b1c3(0x157)]('Master\x20table:\x20'+_0x3ea223[_0x29b1c3(0x1b6)]),_0x1622f9=![];else{_0x244671[_0x29b1c3(0x185)]['schemaValid']=!![],_0x44ee02(_0x29b1c3(0x17c));const _0x151599=await _0x304ac2(generateMasterCountSQL(_0xa94cc));!_0x151599['error']&&_0x151599[_0x29b1c3(0x15c)][_0x29b1c3(0x147)]>0x0&&(_0x244671['master'][_0x29b1c3(0x146)]=_0x151599[_0x29b1c3(0x15c)][0x0][_0x29b1c3(0x1a5)]);}if(_0x5de632[_0x29b1c3(0x185)])return _0x244671['allValid']=_0x1622f9,_0x244671;const _0x3db0cb=async _0x8bc90b=>{const _0x39e551=_0x29b1c3,_0x2169dc={'name':_0x8bc90b[_0x39e551(0x1ba)],'database':_0x8bc90b[_0x39e551(0x15f)][_0x39e551(0x180)],'table':_0x8bc90b[_0x39e551(0x15f)][_0x39e551(0x1a6)],'joinKey':_0x8bc90b[_0x39e551(0x153)][_0x39e551(0x1be)],'foreignKey':_0x8bc90b[_0x39e551(0x153)][_0x39e551(0x144)],'columns':getAttributeColumns(_0x8bc90b),'schemaValid':![]};_0x44ee02(_0x39e551(0x189)+_0x8bc90b[_0x39e551(0x1ba)]);const _0x42a8f1=await _0x304ac2(generateAttributeSchemaSQL(_0xa94cc,_0x8bc90b));if(_0x42a8f1['error'])_0x2169dc['schemaError']=_0x42a8f1[_0x39e551(0x1b6)];else{_0x2169dc[_0x39e551(0x183)]=!![],_0x44ee02('Calculating\x20coverage\x20for:\x20'+_0x8bc90b[_0x39e551(0x1ba)]);const _0x452705=await _0x304ac2(generateAttributeCoverageSQL(_0xa94cc,_0x8bc90b));!_0x452705['error']&&_0x452705[_0x39e551(0x15c)][_0x39e551(0x147)]>0x0&&(_0x2169dc['matchedCount']=_0x452705[_0x39e551(0x15c)][0x0][_0x39e551(0x196)],_0x244671['master'][_0x39e551(0x146)]&&_0x244671[_0x39e551(0x185)][_0x39e551(0x146)]>0x0&&(_0x2169dc[_0x39e551(0x1ab)]=_0x2169dc['matchedCount']/_0x244671['master']['rowCount']*0x64));}return _0x2169dc;},_0x49758a=async(_0x431783,_0xe11481)=>{const _0x3d4ec0=_0x29b1c3,_0x5d00c2={'name':_0x431783['name'],'database':_0x431783[_0x3d4ec0(0x15f)][_0x3d4ec0(0x180)],'table':_0x431783[_0x3d4ec0(0x15f)][_0x3d4ec0(0x1a6)],'joinKey':_0x431783['join'][_0x3d4ec0(0x1be)],'foreignKey':_0x431783[_0x3d4ec0(0x153)][_0x3d4ec0(0x144)],'columns':getBehaviorColumns(_0x431783),'schemaValid':![]};_0x44ee02(_0x3d4ec0(0x1bf)+_0x431783['name']);const _0x4c180f=await _0x304ac2(generateBehaviorSchemaSQL(_0xa94cc,_0x431783));if(_0x4c180f[_0x3d4ec0(0x1b6)])_0x5d00c2[_0x3d4ec0(0x1ac)]=_0x4c180f[_0x3d4ec0(0x1b6)];else{_0x5d00c2[_0x3d4ec0(0x183)]=!![],_0x44ee02(_0x3d4ec0(0x1a1)+_0x431783[_0x3d4ec0(0x1ba)]+'\x20('+_0xe11481+')');const _0xde56fb=await _0x304ac2(generateBehaviorStatsSQL(_0xa94cc,_0x431783,_0xe11481));!_0xde56fb[_0x3d4ec0(0x1b6)]&&_0xde56fb['data']['length']>0x0&&(_0x5d00c2[_0x3d4ec0(0x177)]=_0xde56fb[_0x3d4ec0(0x15c)][0x0][_0x3d4ec0(0x18e)],_0x5d00c2[_0x3d4ec0(0x16c)]=_0xde56fb[_0x3d4ec0(0x15c)][0x0][_0x3d4ec0(0x15b)],_0x244671[_0x3d4ec0(0x185)][_0x3d4ec0(0x146)]&&_0x244671[_0x3d4ec0(0x185)]['rowCount']>0x0&&(_0x5d00c2[_0x3d4ec0(0x1ca)]=_0x5d00c2[_0x3d4ec0(0x177)]/_0x244671[_0x3d4ec0(0x185)]['rowCount']*0x64));}return _0x5d00c2;},_0x3c261=(_0x5d1b38,_0x3f0dd4)=>{const _0x1d41ce=_0x29b1c3;_0x244671[_0x1d41ce(0x191)]=_0x5d1b38,_0x244671[_0x1d41ce(0x16b)]=_0x3f0dd4;for(const _0x57dc2c of _0x5d1b38){!_0x57dc2c['schemaValid']&&(_0x88ad51['push'](_0x1d41ce(0x1ad)+_0x57dc2c[_0x1d41ce(0x1ba)]+_0x1d41ce(0x194)+_0x57dc2c[_0x1d41ce(0x1ac)]),_0x1622f9=![]);}for(const _0x218625 of _0x3f0dd4){!_0x218625[_0x1d41ce(0x183)]&&(_0x88ad51[_0x1d41ce(0x157)]('Behavior\x20\x27'+_0x218625[_0x1d41ce(0x1ba)]+_0x1d41ce(0x194)+_0x218625[_0x1d41ce(0x1ac)]),_0x1622f9=![]);}},_0x35c7ee=_0x5de632['interval']||DEFAULT_TIME_RANGE;if(typeof _0x5de632[_0x29b1c3(0x173)]===_0x29b1c3(0x167)){const _0x234d47=findAttributeByName(_0xa94cc,_0x5de632[_0x29b1c3(0x173)]);if(!_0x234d47)throw new SDKError(ErrorCode[_0x29b1c3(0x19f)],_0x29b1c3(0x1ad)+_0x5de632[_0x29b1c3(0x173)]+_0x29b1c3(0x158));const _0x134cbb=await _0x3db0cb(_0x234d47);return _0x3c261([_0x134cbb],[]),_0x244671[_0x29b1c3(0x198)]=_0x1622f9,_0x244671;}if(_0x5de632[_0x29b1c3(0x173)]===!![]){_0x44ee02('Validating\x20all\x20attributes\x20in\x20parallel...');const _0x9b893c=await Promise['all']((_0xa94cc['attributes']||[])[_0x29b1c3(0x149)](_0x3a5021=>_0x3db0cb(_0x3a5021)));return _0x3c261(_0x9b893c,[]),_0x244671['allValid']=_0x1622f9,_0x244671;}if(typeof _0x5de632[_0x29b1c3(0x17b)]===_0x29b1c3(0x167)){const _0x4b5165=findBehaviorByName(_0xa94cc,_0x5de632[_0x29b1c3(0x17b)]);if(!_0x4b5165)throw new SDKError(ErrorCode[_0x29b1c3(0x19f)],_0x29b1c3(0x148)+_0x5de632[_0x29b1c3(0x17b)]+_0x29b1c3(0x158));const _0x5df828=await _0x49758a(_0x4b5165,_0x35c7ee);return _0x3c261([],[_0x5df828]),_0x244671[_0x29b1c3(0x198)]=_0x1622f9,_0x244671;}if(_0x5de632[_0x29b1c3(0x17b)]===!![]){_0x44ee02(_0x29b1c3(0x190));const _0x4836fe=await Promise[_0x29b1c3(0x151)]((_0xa94cc[_0x29b1c3(0x16b)]||[])[_0x29b1c3(0x149)](_0x4c788a=>_0x49758a(_0x4c788a,_0x35c7ee)));return _0x3c261([],_0x4836fe),_0x244671['allValid']=_0x1622f9,_0x244671;}if(_0x5de632[_0x29b1c3(0x178)]){_0x44ee02(_0x29b1c3(0x1a3));const _0x420300=await Promise[_0x29b1c3(0x151)]((_0xa94cc[_0x29b1c3(0x191)]||[])[_0x29b1c3(0x149)](_0x32ec6b=>_0x3db0cb(_0x32ec6b)));return _0x3c261(_0x420300,[]),_0x244671['allValid']=_0x1622f9,_0x244671;}_0x44ee02('Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...');const [_0x216762,_0x4a8624]=await Promise[_0x29b1c3(0x151)]([Promise[_0x29b1c3(0x151)]((_0xa94cc[_0x29b1c3(0x191)]||[])['map'](_0x517b11=>_0x3db0cb(_0x517b11))),Promise[_0x29b1c3(0x151)]((_0xa94cc[_0x29b1c3(0x16b)]||[])[_0x29b1c3(0x149)](_0x161f4b=>_0x49758a(_0x161f4b,_0x35c7ee)))]);return _0x3c261(_0x216762,_0x4a8624),_0x244671[_0x29b1c3(0x198)]=_0x1622f9,_0x244671;}async[a74_0xb59eb3(0x160)](_0x36b958,_0x52648e={}){const _0x3bb44f=a74_0xb59eb3,_0x943327=typeof _0x36b958==='string'?parseYamlString(_0x36b958):_0x36b958,_0x1387b4=[];let _0x52cae1=!![];const _0x43b30e=_0xa47f92=>_0x52648e['onProgress']?.(_0xa47f92),_0x2eb8e8={'name':_0x943327['name'],'master':{'database':_0x943327[_0x3bb44f(0x185)][_0x3bb44f(0x180)],'table':_0x943327[_0x3bb44f(0x185)][_0x3bb44f(0x1a6)],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0x1387b4,'allValid':!![]},_0x2dc3ad=async _0x151577=>{const _0xfc0391=_0x3bb44f;try{const _0x55889b=await this[_0xfc0391(0x1b3)][_0xfc0391(0x175)](_0x151577);return{'data':_0x55889b[_0xfc0391(0x15c)]};}catch(_0x29ce8f){const _0x149cec=_0x29ce8f instanceof Error?_0x29ce8f[_0xfc0391(0x1aa)]:String(_0x29ce8f);return{'data':[],'error':_0x149cec};}};if(_0x52648e[_0x3bb44f(0x185)]){_0x43b30e(_0x3bb44f(0x187));const _0x577a67=generateMasterSampleSQL(_0x943327,DEFAULT_SAMPLE_LIMIT),_0x391086=await _0x2dc3ad(_0x577a67);return!_0x391086['error']?_0x2eb8e8[_0x3bb44f(0x19e)]=_0x391086[_0x3bb44f(0x15c)]:(_0x1387b4['push'](_0x3bb44f(0x15d)+_0x391086[_0x3bb44f(0x1b6)]),_0x52cae1=![]),_0x2eb8e8['allValid']=_0x52cae1,_0x2eb8e8;}if(_0x52648e[_0x3bb44f(0x173)]){const _0x39d005=findAttributeByName(_0x943327,_0x52648e[_0x3bb44f(0x173)]);if(!_0x39d005)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x3bb44f(0x1ad)+_0x52648e[_0x3bb44f(0x173)]+'\x27\x20not\x20found');_0x43b30e(_0x3bb44f(0x168)+_0x39d005[_0x3bb44f(0x1ba)]);const _0x4d3cd5=generateAttributeSampleSQL(_0x943327,_0x39d005,DEFAULT_SAMPLE_LIMIT),_0x3b26e5=await _0x2dc3ad(_0x4d3cd5);return!_0x3b26e5[_0x3bb44f(0x1b6)]?_0x2eb8e8[_0x3bb44f(0x19e)]=_0x3b26e5['data']:(_0x1387b4[_0x3bb44f(0x157)](_0x3bb44f(0x1ad)+_0x39d005['name']+_0x3bb44f(0x194)+_0x3b26e5[_0x3bb44f(0x1b6)]),_0x52cae1=![]),_0x2eb8e8[_0x3bb44f(0x198)]=_0x52cae1,_0x2eb8e8;}if(_0x52648e[_0x3bb44f(0x17b)]){const _0x3fa924=findBehaviorByName(_0x943327,_0x52648e[_0x3bb44f(0x17b)]);if(!_0x3fa924)throw new SDKError(ErrorCode[_0x3bb44f(0x19f)],_0x3bb44f(0x148)+_0x52648e[_0x3bb44f(0x17b)]+_0x3bb44f(0x158));const _0x597746=_0x52648e[_0x3bb44f(0x16d)]||DEFAULT_TIME_RANGE;_0x43b30e('Fetching\x20sample\x20data\x20for:\x20'+_0x3fa924[_0x3bb44f(0x1ba)]+'\x20('+_0x597746+')');const _0x2798db=generateBehaviorSampleSQL(_0x943327,_0x3fa924,DEFAULT_SAMPLE_LIMIT,_0x597746),_0x661101=await _0x2dc3ad(_0x2798db);return!_0x661101[_0x3bb44f(0x1b6)]?_0x2eb8e8[_0x3bb44f(0x19e)]=_0x661101[_0x3bb44f(0x15c)]:(_0x1387b4['push']('Behavior\x20\x27'+_0x3fa924['name']+_0x3bb44f(0x194)+_0x661101[_0x3bb44f(0x1b6)]),_0x52cae1=![]),_0x2eb8e8[_0x3bb44f(0x198)]=_0x52cae1,_0x2eb8e8;}if(_0x52648e[_0x3bb44f(0x178)]){_0x43b30e(_0x3bb44f(0x19d));const _0x12f8f3=generateEnrichedSQL(_0x943327,DEFAULT_SAMPLE_LIMIT),_0x2a1d6a=await _0x2dc3ad(_0x12f8f3);return!_0x2a1d6a['error']?_0x2eb8e8[_0x3bb44f(0x19e)]=_0x2a1d6a[_0x3bb44f(0x15c)]:(_0x1387b4[_0x3bb44f(0x157)](_0x3bb44f(0x18f)+_0x2a1d6a[_0x3bb44f(0x1b6)]),_0x52cae1=![]),_0x2eb8e8[_0x3bb44f(0x198)]=_0x52cae1,_0x2eb8e8;}return _0x2eb8e8[_0x3bb44f(0x198)]=_0x52cae1,_0x2eb8e8;}async[a74_0xb59eb3(0x1b7)](_0x491346,_0x136a9e){const _0x59f700=a74_0xb59eb3;return await this[_0x59f700(0x1b0)]['createSegment'](_0x491346,_0x136a9e);}async[a74_0xb59eb3(0x1b4)](_0x3211d6,_0x3f51bc,_0x159bd5){const _0x5a02b8=a74_0xb59eb3;return await this['client'][_0x5a02b8(0x152)](_0x3211d6,_0x3f51bc,_0x159bd5);}async['deleteSegment'](_0x52476d){const _0x3890f3=a74_0xb59eb3;return await this[_0x3890f3(0x1b0)]['deleteSegment'](_0x52476d);}async[a74_0xb59eb3(0x18d)](_0x45163d,_0xddeac8){const _0x4292c5=a74_0xb59eb3,_0x333668=await this['resolveParentIdOrName'](_0x45163d);return await this[_0x4292c5(0x1b0)]['createSegmentFolder'](_0x333668,_0xddeac8);}async[a74_0xb59eb3(0x1c9)](_0x5043dc){const _0x5aedd2=a74_0xb59eb3;if(/^\d+$/[_0x5aedd2(0x1ae)](_0x5043dc))return _0x5043dc;return await this[_0x5aedd2(0x163)](_0x5043dc);}async[a74_0xb59eb3(0x1b2)](_0x1599f2,_0x1bab0f){const _0x4cd338=a74_0xb59eb3,[_0x4cff57,_0x151477]=await Promise['all']([this['resolveFolderId'](_0x1599f2,_0x1bab0f)[_0x4cd338(0x1d2)](()=>!![])[_0x4cd338(0x16a)](()=>![]),this[_0x4cd338(0x1ce)](_0x1599f2,_0x1bab0f)['then'](()=>!![])[_0x4cd338(0x16a)](()=>![])]);if(_0x4cff57&&_0x151477)return _0x4cd338(0x164);else{if(_0x4cff57)return _0x4cd338(0x1a9);else{if(_0x151477)return _0x4cd338(0x1a2);}}throw new SDKError(ErrorCode[_0x4cd338(0x19f)],_0x4cd338(0x18b)+_0x1bab0f+_0x4cd338(0x166));}async[a74_0xb59eb3(0x1af)](_0x87929c,_0x5ade58,_0xbc1e7c){const _0x195ccb=a74_0xb59eb3,[_0x122e64,_0x5bf3db]=await Promise['all']([this['listFolders'](_0x87929c),this[_0x195ccb(0x1b5)](_0x87929c)]),_0x12825a=_0xbc1e7c?_0x122e64[_0x195ccb(0x1bb)](_0x3c6472=>_0x3c6472[_0x195ccb(0x174)]===_0xbc1e7c):_0x122e64[_0x195ccb(0x1bb)](_0x52b63c=>!_0x52b63c[_0x195ccb(0x174)]),_0x2767af=_0xbc1e7c?_0x5bf3db[_0x195ccb(0x1bb)](_0x28b63c=>_0x28b63c[_0x195ccb(0x19a)]===_0xbc1e7c):_0x5bf3db[_0x195ccb(0x1bb)](_0x16b2fe=>!_0x16b2fe[_0x195ccb(0x19a)]),_0x2da38c=_0x12825a['some'](_0x88b009=>_0x88b009[_0x195ccb(0x1ba)]===_0x5ade58),_0x51d574=_0x2767af['some'](_0x528594=>_0x528594['name']===_0x5ade58);if(_0x2da38c&&_0x51d574)return _0x195ccb(0x164);else{if(_0x2da38c)return'folder';else{if(_0x51d574)return _0x195ccb(0x1a2);}}throw new SDKError(ErrorCode[_0x195ccb(0x19f)],_0x195ccb(0x18b)+_0x5ade58+_0x195ccb(0x1bd)+(_0xbc1e7c?_0x195ccb(0x1a9):_0x195ccb(0x156)));}async['traversePath'](_0x1442e2){const _0x4ae1b7=a74_0xb59eb3;if(_0x1442e2['length']===0x0)throw new SDKError(ErrorCode[_0x4ae1b7(0x1c0)],_0x4ae1b7(0x14a));const _0x5e2591=_0x1442e2[0x0],_0x2e0429=await this[_0x4ae1b7(0x163)](_0x5e2591);if(_0x1442e2[_0x4ae1b7(0x147)]===0x1)return{'parentId':_0x2e0429,'parentName':_0x5e2591,'type':_0x4ae1b7(0x169),'fullPath':_0x5e2591};const _0x594ffd=await this['getParentFull'](_0x2e0429),_0x4014e0=_0x594ffd[_0x4ae1b7(0x14f)],_0x15b63b=[];let _0x6632c5=_0x4014e0;for(let _0x1740fe=0x1;_0x1740fe<_0x1442e2[_0x4ae1b7(0x147)]-0x1;_0x1740fe++){const _0x473d82=_0x1442e2[_0x1740fe],_0x5801e7=await this[_0x4ae1b7(0x17e)](_0x2e0429),_0x3f5f7b=_0x6632c5?_0x5801e7[_0x4ae1b7(0x17d)](_0x447549=>_0x447549[_0x4ae1b7(0x1ba)]===_0x473d82&&_0x447549[_0x4ae1b7(0x174)]===_0x6632c5):_0x5801e7['find'](_0x73bd06=>_0x73bd06[_0x4ae1b7(0x1ba)]===_0x473d82&&!_0x73bd06[_0x4ae1b7(0x174)]);if(!_0x3f5f7b)throw new SDKError(ErrorCode[_0x4ae1b7(0x19f)],'Folder\x20\x27'+_0x473d82+_0x4ae1b7(0x14b));_0x15b63b['push'](_0x473d82),_0x6632c5=_0x3f5f7b['id'];}const _0x4a0bc5=_0x1442e2[_0x1442e2['length']-0x1],_0x5e086d=await this[_0x4ae1b7(0x1af)](_0x2e0429,_0x4a0bc5,_0x6632c5);if(_0x5e086d===_0x4ae1b7(0x164)||_0x5e086d===_0x4ae1b7(0x1a9)){const _0x228732=await this['listFolders'](_0x2e0429),_0x3e90be=_0x6632c5?_0x228732[_0x4ae1b7(0x17d)](_0x369766=>_0x369766['name']===_0x4a0bc5&&_0x369766['parentFolderId']===_0x6632c5):_0x228732[_0x4ae1b7(0x17d)](_0x21351b=>_0x21351b[_0x4ae1b7(0x1ba)]===_0x4a0bc5&&!_0x21351b[_0x4ae1b7(0x174)]);if(!_0x3e90be)throw new SDKError(ErrorCode[_0x4ae1b7(0x19f)],_0x4ae1b7(0x15e)+_0x4a0bc5+_0x4ae1b7(0x158));return _0x15b63b['push'](_0x4a0bc5),{'parentId':_0x2e0429,'parentName':_0x5e2591,'folderId':_0x3e90be['id'],'folderPath':_0x15b63b,'type':'folder','fullPath':_0x1442e2[_0x4ae1b7(0x153)]('/')};}else{const _0x496380=await this[_0x4ae1b7(0x1b5)](_0x2e0429),_0x33d4b2=_0x6632c5?_0x496380[_0x4ae1b7(0x17d)](_0xe563b4=>_0xe563b4[_0x4ae1b7(0x1ba)]===_0x4a0bc5&&_0xe563b4[_0x4ae1b7(0x19a)]===_0x6632c5):_0x496380[_0x4ae1b7(0x17d)](_0x4d6ea4=>_0x4d6ea4['name']===_0x4a0bc5&&!_0x4d6ea4['segmentFolderId']);if(!_0x33d4b2)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x4ae1b7(0x145)+_0x4a0bc5+_0x4ae1b7(0x158));return{'parentId':_0x2e0429,'parentName':_0x5e2591,'folderId':_0x6632c5,'folderPath':_0x15b63b['length']>0x0?_0x15b63b:undefined,'segmentId':_0x33d4b2['id'],'segmentName':_0x4a0bc5,'type':'segment','fullPath':_0x1442e2['join']('/')};}}async[a74_0xb59eb3(0x14e)](_0x3a6b66){const _0x9d1055=a74_0xb59eb3,_0xd0e9f3=parsePath(_0x3a6b66);if(!_0xd0e9f3[_0x9d1055(0x18c)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x9d1055(0x195));return await this['traversePath'](_0xd0e9f3[_0x9d1055(0x197)]);}async[a74_0xb59eb3(0x1a4)](_0x44b9f9,_0x1d504f){const _0x4a46ab=a74_0xb59eb3,[_0x243bee,_0x2d183c]=await Promise['all']([this['listFolders'](_0x44b9f9),this[_0x4a46ab(0x1b5)](_0x44b9f9)]);if(_0x1d504f){const _0x5b2aca=_0x243bee['filter'](_0x56de61=>_0x56de61[_0x4a46ab(0x174)]===_0x1d504f),_0x1e274e=_0x2d183c[_0x4a46ab(0x1bb)](_0x3bb192=>_0x3bb192[_0x4a46ab(0x19a)]===_0x1d504f);return{'folders':_0x5b2aca,'segments':_0x1e274e};}const _0x2a6dd7=await this[_0x4a46ab(0x159)](_0x44b9f9),_0x4cbd98=_0x2a6dd7[_0x4a46ab(0x14f)];if(_0x4cbd98){const _0x3c0476=_0x243bee[_0x4a46ab(0x1bb)](_0x23b53c=>_0x23b53c[_0x4a46ab(0x174)]===_0x4cbd98),_0x10692f=_0x2d183c['filter'](_0xedda86=>_0xedda86[_0x4a46ab(0x19a)]===_0x4cbd98);return{'folders':_0x3c0476,'segments':_0x10692f};}const _0x2b1792=_0x243bee['filter'](_0x136311=>!_0x136311[_0x4a46ab(0x174)]),_0x180cd8=_0x2d183c['filter'](_0x50c7fa=>!_0x50c7fa[_0x4a46ab(0x19a)]);return{'folders':_0x2b1792,'segments':_0x180cd8};}async['listRecursive'](_0x216a9b,_0x8f6a89,_0x183a8c=0x0,_0x4b9abc=0xa){const _0x3b30ff=a74_0xb59eb3;if(_0x183a8c>=_0x4b9abc)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x3b30ff(0x16e)+_0x4b9abc+_0x3b30ff(0x18a));const {folders:_0x4e7564,segments:_0x1e9357}=await this[_0x3b30ff(0x1a4)](_0x216a9b,_0x8f6a89),_0x21e54a=[];for(const _0x1dc213 of _0x4e7564){const _0x4fe458=await this[_0x3b30ff(0x154)](_0x216a9b,_0x1dc213['id'],_0x183a8c+0x1,_0x4b9abc);_0x21e54a[_0x3b30ff(0x157)]({'type':_0x3b30ff(0x1a9),'id':_0x1dc213['id'],'name':_0x1dc213['name'],'children':_0x4fe458[_0x3b30ff(0x147)]>0x0?_0x4fe458:undefined,'metadata':{'description':_0x1dc213[_0x3b30ff(0x161)]||undefined,'folderCount':_0x4fe458[_0x3b30ff(0x1bb)](_0x438e9e=>_0x438e9e[_0x3b30ff(0x1c7)]===_0x3b30ff(0x1a9))[_0x3b30ff(0x147)],'segmentCount':_0x4fe458['filter'](_0x354a22=>_0x354a22[_0x3b30ff(0x1c7)]===_0x3b30ff(0x1a2))[_0x3b30ff(0x147)],'createdAt':_0x1dc213[_0x3b30ff(0x199)],'updatedAt':_0x1dc213[_0x3b30ff(0x165)]}});}for(const _0x20f684 of _0x1e9357){_0x21e54a[_0x3b30ff(0x157)]({'type':_0x3b30ff(0x1a2),'id':_0x20f684['id'],'name':_0x20f684[_0x3b30ff(0x1ba)],'population':_0x20f684['population'],'metadata':{'description':_0x20f684[_0x3b30ff(0x161)],'createdAt':_0x20f684[_0x3b30ff(0x199)],'updatedAt':_0x20f684[_0x3b30ff(0x165)]}});}return _0x21e54a;}}
package/dist/sdk/user.js CHANGED
@@ -1 +1 @@
1
- function a75_0x2bbf(){const _0xa071c=['413294cPUtzQ','buildUserMaps','findByEmail','24HNrfup','default','810tfIuuB','3115735IwYOew','1093750aMyAQi','buildEmailToIdMap','2mgeLjD','list','630340lniIcz','email','toLowerCase','profile','2002839HuLESH','map','clearCache','731504bONhwZ','find','client','findById','buildIdToEmailMap','20408azhoJA'];a75_0x2bbf=function(){return _0xa071c;};return a75_0x2bbf();}function a75_0x407c(_0x30da7d,_0x19699c){_0x30da7d=_0x30da7d-0x17d;const _0x2bbf09=a75_0x2bbf();let _0x407c16=_0x2bbf09[_0x30da7d];return _0x407c16;}const a75_0x4ebe63=a75_0x407c;(function(_0x3d5bc2,_0x9c89f0){const _0x7fceef=a75_0x407c,_0xa1b8c0=_0x3d5bc2();while(!![]){try{const _0x2b51c8=parseInt(_0x7fceef(0x17e))/0x1*(-parseInt(_0x7fceef(0x18d))/0x2)+parseInt(_0x7fceef(0x184))/0x3+-parseInt(_0x7fceef(0x187))/0x4+-parseInt(_0x7fceef(0x193))/0x5+parseInt(_0x7fceef(0x190))/0x6*(parseInt(_0x7fceef(0x194))/0x7)+-parseInt(_0x7fceef(0x18c))/0x8*(-parseInt(_0x7fceef(0x192))/0x9)+parseInt(_0x7fceef(0x180))/0xa;if(_0x2b51c8===_0x9c89f0)break;else _0xa1b8c0['push'](_0xa1b8c0['shift']());}catch(_0x2da46a){_0xa1b8c0['push'](_0xa1b8c0['shift']());}}}(a75_0x2bbf,0x59560));import{TDApiClient}from'../client/td-api-client.js';import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';export class UserSDK{['client'];[a75_0x4ebe63(0x183)];constructor(_0x4fceb7){const _0x1237b5=a75_0x4ebe63;this[_0x1237b5(0x189)]=new TDApiClient(_0x4fceb7,_0x4fceb7['logger']),this[_0x1237b5(0x183)]=_0x4fceb7[_0x1237b5(0x183)]||_0x1237b5(0x191);}async['getCurrent'](){return await this['client']['getUserInfo']();}async[a75_0x4ebe63(0x17f)](_0x86f7cd=![]){const _0x244e53=a75_0x4ebe63;if(!_0x86f7cd){const _0x1963a7=loadCachedUsers(this[_0x244e53(0x183)]);if(_0x1963a7)return _0x1963a7;}const _0x1057bb=await this['client']['listUsers']();return saveCachedUsers(this[_0x244e53(0x183)],_0x1057bb),_0x1057bb;}[a75_0x4ebe63(0x186)](){const _0x1e6247=a75_0x4ebe63;clearUserCache(this[_0x1e6247(0x183)]);}async[a75_0x4ebe63(0x18f)](_0x34df21){const _0x2be445=a75_0x4ebe63,_0x50f234=await this[_0x2be445(0x17f)]();return _0x50f234[_0x2be445(0x188)](_0xd26d32=>_0xd26d32[_0x2be445(0x181)][_0x2be445(0x182)]()===_0x34df21['toLowerCase']());}async[a75_0x4ebe63(0x18a)](_0x3822a2){const _0x4d7073=a75_0x4ebe63,_0x5bc026=await this[_0x4d7073(0x17f)]();return _0x5bc026['find'](_0x483608=>_0x483608['id']===_0x3822a2);}async[a75_0x4ebe63(0x17d)](){const _0x6261a6=a75_0x4ebe63,_0x50a51e=await this[_0x6261a6(0x17f)]();return new Map(_0x50a51e['map'](_0x39f54d=>[_0x39f54d[_0x6261a6(0x181)][_0x6261a6(0x182)](),_0x39f54d['id']]));}async[a75_0x4ebe63(0x18b)](){const _0x693ab1=a75_0x4ebe63,_0x47d24c=await this['list']();return new Map(_0x47d24c[_0x693ab1(0x185)](_0x34f35d=>[_0x34f35d['id'],_0x34f35d['email']]));}async[a75_0x4ebe63(0x18e)](){const _0x42dc62=a75_0x4ebe63,_0x2dc065=await this[_0x42dc62(0x17f)]();return{'emailToId':new Map(_0x2dc065[_0x42dc62(0x185)](_0xbc0da1=>[_0xbc0da1[_0x42dc62(0x181)]['toLowerCase'](),_0xbc0da1['id']])),'idToEmail':new Map(_0x2dc065[_0x42dc62(0x185)](_0x2f61c7=>[_0x2f61c7['id'],_0x2f61c7['email']]))};}}
1
+ const a75_0xe79a36=a75_0x1cd5;(function(_0x436503,_0x1ed1c8){const _0x3409e9=a75_0x1cd5,_0x1af5b9=_0x436503();while(!![]){try{const _0x3673c2=parseInt(_0x3409e9(0x9b))/0x1+-parseInt(_0x3409e9(0x8e))/0x2*(-parseInt(_0x3409e9(0x97))/0x3)+parseInt(_0x3409e9(0x93))/0x4*(parseInt(_0x3409e9(0x9f))/0x5)+-parseInt(_0x3409e9(0x8b))/0x6+parseInt(_0x3409e9(0x92))/0x7*(-parseInt(_0x3409e9(0x8a))/0x8)+-parseInt(_0x3409e9(0xa1))/0x9*(-parseInt(_0x3409e9(0x8f))/0xa)+parseInt(_0x3409e9(0x89))/0xb*(-parseInt(_0x3409e9(0x88))/0xc);if(_0x3673c2===_0x1ed1c8)break;else _0x1af5b9['push'](_0x1af5b9['shift']());}catch(_0x2a7a93){_0x1af5b9['push'](_0x1af5b9['shift']());}}}(a75_0x42a6,0xd8921));import{TDApiClient}from'../client/td-api-client.js';function a75_0x1cd5(_0x509f01,_0x287e59){_0x509f01=_0x509f01-0x86;const _0x42a60d=a75_0x42a6();let _0x1cd5be=_0x42a60d[_0x509f01];return _0x1cd5be;}function a75_0x42a6(){const _0x383a05=['profile','buildUserMaps','list','605jVWTIB','map','11510415kwGIqS','getCurrent','findByEmail','4315524IgCfJa','22dSHtuk','64gTgaGq','4837938MLTPoE','logger','buildEmailToIdMap','4jsKnNn','10GFAIEo','findById','listUsers','1248730OpxfTC','10092LSUNTe','default','email','buildIdToEmailMap','1653459qhNBMK','client','find','toLowerCase','1153246BbKxrr'];a75_0x42a6=function(){return _0x383a05;};return a75_0x42a6();}import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';export class UserSDK{[a75_0xe79a36(0x98)];[a75_0xe79a36(0x9c)];constructor(_0x2f8979){const _0x39e891=a75_0xe79a36;this[_0x39e891(0x98)]=new TDApiClient(_0x2f8979,_0x2f8979[_0x39e891(0x8c)]),this[_0x39e891(0x9c)]=_0x2f8979[_0x39e891(0x9c)]||_0x39e891(0x94);}async[a75_0xe79a36(0x86)](){const _0x51793e=a75_0xe79a36;return await this[_0x51793e(0x98)]['getUserInfo']();}async[a75_0xe79a36(0x9e)](_0x326ff2=![]){const _0x2015ff=a75_0xe79a36;if(!_0x326ff2){const _0x38ae5a=loadCachedUsers(this[_0x2015ff(0x9c)]);if(_0x38ae5a)return _0x38ae5a;}const _0x11ac95=await this[_0x2015ff(0x98)][_0x2015ff(0x91)]();return saveCachedUsers(this[_0x2015ff(0x9c)],_0x11ac95),_0x11ac95;}['clearCache'](){const _0x4630e5=a75_0xe79a36;clearUserCache(this[_0x4630e5(0x9c)]);}async[a75_0xe79a36(0x87)](_0x189f2e){const _0x526256=a75_0xe79a36,_0x419de1=await this[_0x526256(0x9e)]();return _0x419de1[_0x526256(0x99)](_0x124506=>_0x124506[_0x526256(0x95)][_0x526256(0x9a)]()===_0x189f2e[_0x526256(0x9a)]());}async[a75_0xe79a36(0x90)](_0x411cae){const _0x460b84=a75_0xe79a36,_0x26c7b3=await this[_0x460b84(0x9e)]();return _0x26c7b3[_0x460b84(0x99)](_0x151d7d=>_0x151d7d['id']===_0x411cae);}async[a75_0xe79a36(0x8d)](){const _0x17b75c=a75_0xe79a36,_0x2d697c=await this[_0x17b75c(0x9e)]();return new Map(_0x2d697c[_0x17b75c(0xa0)](_0x23277c=>[_0x23277c[_0x17b75c(0x95)][_0x17b75c(0x9a)](),_0x23277c['id']]));}async[a75_0xe79a36(0x96)](){const _0x58f31b=a75_0xe79a36,_0x38ca07=await this[_0x58f31b(0x9e)]();return new Map(_0x38ca07[_0x58f31b(0xa0)](_0x51c16d=>[_0x51c16d['id'],_0x51c16d[_0x58f31b(0x95)]]));}async[a75_0xe79a36(0x9d)](){const _0x296570=a75_0xe79a36,_0xabfb1f=await this[_0x296570(0x9e)]();return{'emailToId':new Map(_0xabfb1f['map'](_0x28bebe=>[_0x28bebe[_0x296570(0x95)]['toLowerCase'](),_0x28bebe['id']])),'idToEmail':new Map(_0xabfb1f[_0x296570(0xa0)](_0x956ab1=>[_0x956ab1['id'],_0x956ab1[_0x296570(0x95)]]))};}}
@@ -1 +1 @@
1
- const a76_0x395fa5=a76_0x5cd5;(function(_0x416303,_0x2c4000){const _0x29e99b=a76_0x5cd5,_0xf95abb=_0x416303();while(!![]){try{const _0x34e8f0=parseInt(_0x29e99b(0xe6))/0x1*(parseInt(_0x29e99b(0xa5))/0x2)+parseInt(_0x29e99b(0xa6))/0x3+parseInt(_0x29e99b(0xa2))/0x4+parseInt(_0x29e99b(0xb7))/0x5+-parseInt(_0x29e99b(0xa8))/0x6+parseInt(_0x29e99b(0xd5))/0x7*(parseInt(_0x29e99b(0x8a))/0x8)+-parseInt(_0x29e99b(0xe2))/0x9;if(_0x34e8f0===_0x2c4000)break;else _0xf95abb['push'](_0xf95abb['shift']());}catch(_0x4aa46a){_0xf95abb['push'](_0xf95abb['shift']());}}}(a76_0x5a4a,0x52309));import{WorkflowApiClient}from'../client/workflow-client.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowSDK{static [a76_0x395fa5(0xdd)]=/^\d+$/;[a76_0x395fa5(0xbd)];constructor(_0x5ae5e0){const _0x5a9dfb=a76_0x395fa5;this[_0x5a9dfb(0xbd)]=new WorkflowApiClient(_0x5ae5e0,_0x5ae5e0['logger']);}async[a76_0x395fa5(0xfa)](_0x4cf382){const _0x228055=a76_0x395fa5;if(WorkflowSDK['NUMERIC_ID_PATTERN'][_0x228055(0xc5)](_0x4cf382))return{'id':_0x4cf382,'name':_0x4cf382};const _0x36c07d=await this[_0x228055(0xbd)][_0x228055(0x90)]({'name_pattern':_0x4cf382}),_0x30e393=_0x36c07d[_0x228055(0xf8)][_0x228055(0xd7)](_0x4030f6=>_0x4030f6[_0x228055(0xd1)]===_0x4cf382);if(!_0x30e393)throw new Error(_0x228055(0xbc)+_0x4cf382);return{'id':_0x30e393['id'],'name':_0x30e393[_0x228055(0xd1)]};}async['projects'](_0xcd63e5,_0x428d6a){const _0x323508=a76_0x395fa5,_0x52cba5=await this[_0x323508(0xbd)][_0x323508(0x90)]({'name_pattern':_0xcd63e5,..._0x428d6a});return _0x52cba5[_0x323508(0xf8)]['map'](_0x524874=>({..._0x524874,'project_id':_0x524874['id'],'project_name':_0x524874[_0x323508(0xd1)]}));}async[a76_0x395fa5(0xe9)](_0x2d87dc,_0x2cb5f7){const _0x1f60a3=a76_0x395fa5,_0x201e06=await this[_0x1f60a3(0xbd)]['listWorkflows']({'project_name':_0x2d87dc,..._0x2cb5f7});return _0x201e06[_0x1f60a3(0xf8)][_0x1f60a3(0xb6)](_0x5d465d=>({'project_id':_0x5d465d[_0x1f60a3(0x9a)]?.['id'],'project_name':_0x5d465d['project']?.[_0x1f60a3(0xd1)],'workflow_id':_0x5d465d['id'],'workflow_name':_0x5d465d['name'],'revision':_0x5d465d['revision'],'timezone':_0x5d465d['timezone'],'config':_0x5d465d[_0x1f60a3(0xee)],'id':_0x5d465d['id'],'name':_0x5d465d[_0x1f60a3(0xd1)],'project':_0x5d465d['project']}));}async['sessions'](_0x208751){const _0x481d0e=a76_0x395fa5;let _0x124e73;if(_0x208751?.['projectName']){let _0x44f5b7,_0x1ead40=![];while(!_0x1ead40){const _0x4cf7dc=await this['client'][_0x481d0e(0x90)]({'limit':0x64,'last_id':_0x44f5b7}),_0xe49a71=_0x4cf7dc[_0x481d0e(0xf8)][_0x481d0e(0xd7)](_0x121a24=>_0x121a24['name']===_0x208751[_0x481d0e(0xf3)]);if(_0xe49a71){_0x124e73=_0xe49a71['id'],_0x1ead40=!![];break;}if(!_0x4cf7dc[_0x481d0e(0xcc)]||_0x4cf7dc['data'][_0x481d0e(0xa0)]===0x0)break;_0x44f5b7=_0x4cf7dc[_0x481d0e(0xcc)];}if(!_0x124e73)throw new Error(_0x481d0e(0xbc)+_0x208751[_0x481d0e(0xf3)]);}const _0x1e1763=await this[_0x481d0e(0xbd)][_0x481d0e(0xe1)]({'project_id':_0x124e73,'project_name':_0x208751?.['projectName'],'workflow_name':_0x208751?.[_0x481d0e(0xe8)],'status':_0x208751?.['status'],'from_time':_0x208751?.[_0x481d0e(0xd6)],'to_time':_0x208751?.[_0x481d0e(0xe5)],'limit':_0x208751?.['limit'],'last_id':_0x208751?.[_0x481d0e(0xe0)]});return _0x1e1763[_0x481d0e(0xf8)][_0x481d0e(0xb6)](_0x40fbab=>({'project_id':_0x40fbab[_0x481d0e(0x9a)]?.['id'],'project_name':_0x40fbab[_0x481d0e(0x9a)]?.[_0x481d0e(0xd1)],'workflow_id':_0x40fbab[_0x481d0e(0x96)]?.['id'],'workflow_name':_0x40fbab['workflow']?.['name'],'session_id':_0x40fbab['id'],'sessionUuid':_0x40fbab[_0x481d0e(0xa1)],'sessionTime':_0x40fbab[_0x481d0e(0xf9)],'lastAttempt':_0x40fbab[_0x481d0e(0x9f)],'id':_0x40fbab['id'],'project':_0x40fbab[_0x481d0e(0x9a)],'workflow':_0x40fbab[_0x481d0e(0x96)]}));}async[a76_0x395fa5(0x97)](_0x46ee94){const _0x526810=a76_0x395fa5,_0x22512f=await this['client']['listAttempts']({'project_name':_0x46ee94?.[_0x526810(0xf3)],'workflow_name':_0x46ee94?.['workflowName'],'include_retried':_0x46ee94?.[_0x526810(0xc0)],'limit':_0x46ee94?.[_0x526810(0xc8)],'last_id':_0x46ee94?.[_0x526810(0xe0)]});return _0x22512f['data'][_0x526810(0xb6)](_0x12c628=>({'project_id':_0x12c628[_0x526810(0x9a)]?.['id'],'project_name':_0x12c628['project']?.['name'],'workflow_id':_0x12c628[_0x526810(0x96)]?.['id'],'workflow_name':_0x12c628[_0x526810(0x96)]?.[_0x526810(0xd1)],'session_id':_0x12c628[_0x526810(0x9d)],'sessionUuid':_0x12c628[_0x526810(0xa1)],'sessionTime':_0x12c628[_0x526810(0xf9)],'attempt_id':_0x12c628['id'],'attempt_index':_0x12c628['index'],'retryAttemptName':_0x12c628['retryAttemptName'],'done':_0x12c628[_0x526810(0xea)],'success':_0x12c628[_0x526810(0xdb)],'cancelRequested':_0x12c628['cancelRequested'],'params':_0x12c628[_0x526810(0x98)],'createdAt':_0x12c628[_0x526810(0xbf)],'finishedAt':_0x12c628[_0x526810(0xf2)],'id':_0x12c628['id'],'index':_0x12c628[_0x526810(0xb2)],'project':_0x12c628[_0x526810(0x9a)],'workflow':_0x12c628[_0x526810(0x96)]}));}async['attempt'](_0x3a4a7e){const _0x3b2882=a76_0x395fa5,_0x1c2338=await this['client'][_0x3b2882(0xc7)](_0x3a4a7e);return _0x1c2338;}async['tasks'](_0x56d0ae,_0x4fb9c2=![]){const _0x1caffc=a76_0x395fa5,_0x242360=await this[_0x1caffc(0xbd)][_0x1caffc(0xab)](_0x56d0ae,_0x4fb9c2);return _0x242360[_0x1caffc(0xb6)](_0x434b31=>({'task_id':_0x434b31['id'],'task_name':_0x434b31[_0x1caffc(0xa9)],'parentId':_0x434b31['parentId'],'config':_0x434b31[_0x1caffc(0xee)],'upstreams':_0x434b31['upstreams'],'state':_0x434b31[_0x1caffc(0xd0)],'exportParams':_0x434b31[_0x1caffc(0x8b)],'storeParams':_0x434b31[_0x1caffc(0xaa)],'stateParams':_0x434b31[_0x1caffc(0xf7)],'updatedAt':_0x434b31[_0x1caffc(0xd8)],'retryAt':_0x434b31[_0x1caffc(0x8e)],'startedAt':_0x434b31[_0x1caffc(0x95)],'error':_0x434b31[_0x1caffc(0xc2)],'isGroup':_0x434b31[_0x1caffc(0xae)],'id':_0x434b31['id'],'fullName':_0x434b31[_0x1caffc(0xa9)]}));}async[a76_0x395fa5(0xcd)](_0x344b9c,_0x4efa86){const _0x29448e=a76_0x395fa5;return await this[_0x29448e(0xbd)][_0x29448e(0xba)](_0x344b9c,_0x4efa86);}async['logs'](_0x29d532,_0x9f9548){const _0x4efbe0=a76_0x395fa5,_0x1ef751=await import('zlib'),{promisify:_0x3d6e2d}=await import(_0x4efbe0(0xb1)),_0x364a8a=_0x3d6e2d(_0x1ef751[_0x4efbe0(0xe4)]),_0x16605a=await this[_0x4efbe0(0xbd)][_0x4efbe0(0xba)](_0x29d532,_0x9f9548);if(_0x16605a[_0x4efbe0(0xa0)]===0x0)return'';const _0x3db1a8=[];for(const _0x73e741 of _0x16605a){if(!_0x73e741[_0x4efbe0(0xad)])continue;const _0x5726b8=await fetch(_0x73e741['direct']);if(!_0x5726b8['ok'])throw new Error('Failed\x20to\x20download\x20log\x20file:\x20'+_0x5726b8[_0x4efbe0(0xde)]);const _0x46aea6=Buffer[_0x4efbe0(0xc3)](await _0x5726b8['arrayBuffer']()),_0x2fa5db=await _0x364a8a(_0x46aea6);_0x3db1a8[_0x4efbe0(0xda)](_0x2fa5db[_0x4efbe0(0x9b)](_0x4efbe0(0xeb)));}return _0x3db1a8[_0x4efbe0(0x8d)]('\x0a');}async[a76_0x395fa5(0xbb)](_0x2ace80,_0x25da62){const _0x122bdc=a76_0x395fa5,_0x2fe6bc=await this[_0x122bdc(0xbd)][_0x122bdc(0xdf)](_0x2ace80,_0x25da62);return _0x2fe6bc?.[_0x122bdc(0xa4)]??_0x122bdc(0x92);}async[a76_0x395fa5(0xd3)](_0x4ba814,_0x474ec5){const _0x3b6846=a76_0x395fa5,_0x476ee2=await this[_0x3b6846(0xbd)][_0x3b6846(0xd3)](_0x4ba814,{'from_task':_0x474ec5?.[_0x3b6846(0xaf)],'retry_params':_0x474ec5?.[_0x3b6846(0xed)]});return{'attemptId':_0x476ee2['id'],'sessionId':_0x476ee2[_0x3b6846(0x9d)]};}async[a76_0x395fa5(0xe3)](_0x30d39c,_0x1ae336){const _0x2cc28a=a76_0x395fa5,_0x4a6603=await this[_0x2cc28a(0xbd)]['retryAttempt'](_0x30d39c,{'resume_from':_0x1ae336?.['resumeFrom'],'retry_params':_0x1ae336?.[_0x2cc28a(0xed)],'force':_0x1ae336?.[_0x2cc28a(0xf6)]});return{'attemptId':_0x4a6603['id'],'sessionId':_0x4a6603[_0x2cc28a(0x9d)]};}async[a76_0x395fa5(0xb4)](_0x1629a2,_0x40e091={},_0x5e7ccc){const _0x39935f=a76_0x395fa5,_0x29f0e9=_0x1629a2[_0x39935f(0xc4)]('.');let _0x279b54,_0x41422e;if(_0x29f0e9===-0x1)throw new Error(_0x39935f(0xb0));_0x279b54=_0x1629a2[_0x39935f(0xd4)](0x0,_0x29f0e9),_0x41422e=_0x1629a2[_0x39935f(0xd4)](_0x29f0e9+0x1);if(!_0x279b54||!_0x41422e)throw new Error(_0x39935f(0x9e)+_0x1629a2+_0x39935f(0x91));const _0x31073e=_0x5e7ccc?.[_0x39935f(0xf9)]||new Date()['toISOString']();return await this[_0x39935f(0xbd)]['startAttempt']({'projectName':_0x279b54,'workflowName':_0x41422e,'sessionTime':_0x31073e,'params':_0x40e091});}async[a76_0x395fa5(0xd9)](_0x279ce9,_0x52a4ca,_0x5a2135){const _0x2e905e=a76_0x395fa5,{promises:_0x12e34b}=await import('fs'),_0x376372=await import(_0x2e905e(0xb5)),_0x1bc1a5=await import('os'),_0x2a8fd6=await import(_0x2e905e(0xf1)),{id:_0x5518bc,name:_0xfea2e0}=await this[_0x2e905e(0xfa)](_0x279ce9),_0x535f8c=_0x1bc1a5[_0x2e905e(0x9c)](),_0x8acf1c=_0x376372[_0x2e905e(0x8d)](_0x535f8c,_0x2e905e(0xf0)+_0x5518bc+'-'+Date[_0x2e905e(0xdc)]()+_0x2e905e(0xb9));try{await this[_0x2e905e(0xbd)][_0x2e905e(0xb3)](_0x5518bc,_0x8acf1c,_0x5a2135?.['revision']);const _0x228646=_0x376372[_0x2e905e(0x8d)](_0x52a4ca,_0xfea2e0);await _0x12e34b[_0x2e905e(0x99)](_0x228646,{'recursive':!![]}),await _0x2a8fd6['extract']({'file':_0x8acf1c,'cwd':_0x228646,'gzip':!![]});const _0x2c54a2=async _0x16325b=>{const _0xaf708e=_0x2e905e;let _0x2b5a83=0x0;const _0x2fe175=await _0x12e34b['readdir'](_0x16325b,{'withFileTypes':!![]});for(const _0x46859a of _0x2fe175){const _0x395a62=_0x376372['join'](_0x16325b,_0x46859a[_0xaf708e(0xd1)]);if(_0x46859a[_0xaf708e(0xa3)]())_0x2b5a83++;else _0x46859a[_0xaf708e(0xcf)]()&&(_0x2b5a83+=await _0x2c54a2(_0x395a62));}return _0x2b5a83;},_0x44c9dc=await _0x2c54a2(_0x228646);return{'projectName':_0xfea2e0,'revision':_0x5a2135?.['revision']||_0x2e905e(0xc1),'filesExtracted':_0x44c9dc};}finally{try{await _0x12e34b[_0x2e905e(0xac)](_0x8acf1c);}catch{}}}async[a76_0x395fa5(0xda)](_0x475195,_0x382a4d){const _0x2003b8=a76_0x395fa5,{promises:_0x2c06cf}=await import('fs'),_0x27c88c=await import(_0x2003b8(0xb5)),_0x3e293d=await import(_0x2003b8(0xf1)),_0x4473ce=_0x382a4d?.['projectName']||_0x27c88c[_0x2003b8(0xbe)](_0x475195),_0x138aa9=_0x382a4d?.[_0x2003b8(0xec)]||new Date()[_0x2003b8(0xcb)]()[_0x2003b8(0xc9)](/[:.]/g,'-');try{await _0x2c06cf[_0x2003b8(0x8f)](_0x475195);}catch{throw new Error(_0x2003b8(0xf4)+_0x475195);}if(!_0x382a4d?.['skipValidation']){const _0x37a914=await _0x2c06cf[_0x2003b8(0x8c)](_0x475195),_0x29f54c=_0x37a914[_0x2003b8(0xe7)](_0x506c73=>_0x506c73[_0x2003b8(0x94)](WORKFLOW_FILE_EXTENSION));if(_0x29f54c[_0x2003b8(0xa0)]===0x0)throw new Error(_0x2003b8(0xa7)+WORKFLOW_FILE_EXTENSION+_0x2003b8(0xf5));for(const _0x595920 of _0x29f54c){const _0x51232a=_0x27c88c[_0x2003b8(0x8d)](_0x475195,_0x595920);try{await _0x2c06cf[_0x2003b8(0x8f)](_0x51232a);}catch{throw new Error(_0x2003b8(0x93)+_0x595920);}}}const _0x416cfc=async(_0x18d9e1,_0x4c4d13='')=>{const _0x46a60f=_0x2003b8,_0x5d41ae=await _0x2c06cf[_0x46a60f(0x8c)](_0x18d9e1,{'withFileTypes':!![]}),_0x515c5b=[];for(const _0x522b06 of _0x5d41ae){const _0x2ee4cf=_0x27c88c['join'](_0x4c4d13,_0x522b06[_0x46a60f(0xd1)]),_0x686fe1=_0x27c88c[_0x46a60f(0x8d)](_0x18d9e1,_0x522b06[_0x46a60f(0xd1)]);if(!shouldIncludeInArchive(_0x522b06[_0x46a60f(0xd1)]))continue;_0x522b06[_0x46a60f(0xcf)]()?_0x515c5b[_0x46a60f(0xda)](...await _0x416cfc(_0x686fe1,_0x2ee4cf)):_0x515c5b[_0x46a60f(0xda)](_0x2ee4cf);}return _0x515c5b;},_0x24d1ff=await _0x416cfc(_0x475195),_0x305a76=await import('os'),_0x1ae73b=_0x305a76[_0x2003b8(0x9c)](),_0x4845b0=_0x27c88c[_0x2003b8(0x8d)](_0x1ae73b,_0x2003b8(0xd2)+Date[_0x2003b8(0xdc)]()+'.tar.gz');try{await _0x3e293d[_0x2003b8(0xef)]({'file':_0x4845b0,'gzip':!![],'cwd':_0x475195,'portable':!![]},_0x24d1ff);const _0x456579=await this[_0x2003b8(0xbd)][_0x2003b8(0xca)](_0x4473ce,_0x138aa9,_0x4845b0,{'scheduleFrom':_0x382a4d?.[_0x2003b8(0xce)],'clearSchedule':_0x382a4d?.['clearSchedule'],'clearScheduleAll':_0x382a4d?.['clearScheduleAll']});return{'projectId':_0x456579['id'],'projectName':_0x456579[_0x2003b8(0xd1)],'revision':_0x456579[_0x2003b8(0xec)]};}finally{try{await _0x2c06cf[_0x2003b8(0xac)](_0x4845b0);}catch{}}}async[a76_0x395fa5(0xb8)](_0x3d2f3c){const _0x39a306=a76_0x395fa5,{id:_0x3fcadd}=await this[_0x39a306(0xfa)](_0x3d2f3c),_0x401a97=await this[_0x39a306(0xbd)][_0x39a306(0xc6)](_0x3fcadd);return{'projectId':_0x401a97['id'],'projectName':_0x401a97[_0x39a306(0xd1)]};}}function a76_0x5cd5(_0x81d1df,_0x467b64){_0x81d1df=_0x81d1df-0x8a;const _0x5a4a9a=a76_0x5a4a();let _0x5cd53e=_0x5a4a9a[_0x81d1df];return _0x5cd53e;}function a76_0x5a4a(){const _0xf07183=['isDirectory','state','name','tdx-workflow-push-','retrySession','substring','260197nemuDx','fromTime','find','updatedAt','download','push','success','now','NUMERIC_ID_PATTERN','status','killAttempt','last_id','listSessions','21037257JIZWUx','retryAttempt','gunzip','toTime','7CMSIeR','filter','workflowName','workflows','done','utf-8','revision','retryParams','config','create','tdx-workflow-','tar','finishedAt','projectName','Project\x20directory\x20not\x20found:\x20','\x20workflow\x20files\x20found\x20in\x20project\x20directory','force','stateParams','data','sessionTime','resolveProjectId','120dUMbrA','exportParams','readdir','join','retryAt','access','listProjects','.\x20Expected\x20\x22project.workflow\x22','Kill\x20request\x20accepted','Cannot\x20read\x20workflow\x20file:\x20','endsWith','startedAt','workflow','attempts','params','mkdir','project','toString','tmpdir','sessionId','Invalid\x20workflow\x20format:\x20','lastAttempt','length','sessionUuid','2153436vQnwdG','isFile','message','181394iyHNlI','1992048WnXzzR','No\x20','761142ZNtEUk','fullName','storeParams','getAttemptTasks','unlink','direct','isGroup','fromTask','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','util','index','downloadProjectArchive','run','path','map','2030800JBYHeD','delete','.tar.gz','listLogFiles','kill','Project\x20not\x20found:\x20','client','basename','createdAt','includeRetried','latest','error','from','indexOf','test','deleteProject','getAttempt','limit','replace','uploadProjectArchive','toISOString','lastId','logFiles','scheduleFrom'];a76_0x5a4a=function(){return _0xf07183;};return a76_0x5a4a();}
1
+ function a76_0x4dbd(_0x36b040,_0x22c6e9){_0x36b040=_0x36b040-0x1ab;const _0x392bec=a76_0x392b();let _0x4dbdca=_0x392bec[_0x36b040];return _0x4dbdca;}const a76_0x49062f=a76_0x4dbd;(function(_0x2c25b2,_0x25d041){const _0x45675d=a76_0x4dbd,_0x1ed1b8=_0x2c25b2();while(!![]){try{const _0x4fa270=-parseInt(_0x45675d(0x1b8))/0x1*(-parseInt(_0x45675d(0x1c2))/0x2)+parseInt(_0x45675d(0x1d0))/0x3+-parseInt(_0x45675d(0x1db))/0x4+parseInt(_0x45675d(0x1cd))/0x5+-parseInt(_0x45675d(0x1ee))/0x6+-parseInt(_0x45675d(0x1c6))/0x7+-parseInt(_0x45675d(0x1f5))/0x8*(parseInt(_0x45675d(0x1f4))/0x9);if(_0x4fa270===_0x25d041)break;else _0x1ed1b8['push'](_0x1ed1b8['shift']());}catch(_0x5ad269){_0x1ed1b8['push'](_0x1ed1b8['shift']());}}}(a76_0x392b,0xafdbb));import{WorkflowApiClient}from'../client/workflow-client.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowSDK{static ['NUMERIC_ID_PATTERN']=/^\d+$/;[a76_0x49062f(0x20a)];constructor(_0x563e76){const _0x56e2fa=a76_0x49062f;this[_0x56e2fa(0x20a)]=new WorkflowApiClient(_0x563e76,_0x563e76[_0x56e2fa(0x1ec)]);}async['resolveProjectId'](_0x8b4c1a){const _0x5ad7d4=a76_0x49062f;if(WorkflowSDK[_0x5ad7d4(0x1bd)][_0x5ad7d4(0x208)](_0x8b4c1a))return{'id':_0x8b4c1a,'name':_0x8b4c1a};const _0x3fccde=await this[_0x5ad7d4(0x20a)][_0x5ad7d4(0x1bf)]({'name_pattern':_0x8b4c1a}),_0x18d641=_0x3fccde[_0x5ad7d4(0x1e5)]['find'](_0x492df3=>_0x492df3[_0x5ad7d4(0x1d6)]===_0x8b4c1a);if(!_0x18d641)throw new Error(_0x5ad7d4(0x1fe)+_0x8b4c1a);return{'id':_0x18d641['id'],'name':_0x18d641['name']};}async[a76_0x49062f(0x1d8)](_0x3ffbc2,_0x66773f){const _0x37d0c0=a76_0x49062f,_0x52c49c=await this[_0x37d0c0(0x20a)][_0x37d0c0(0x1bf)]({'name_pattern':_0x3ffbc2,..._0x66773f});return _0x52c49c[_0x37d0c0(0x1e5)][_0x37d0c0(0x1b9)](_0x39276b=>({..._0x39276b,'project_id':_0x39276b['id'],'project_name':_0x39276b[_0x37d0c0(0x1d6)]}));}async[a76_0x49062f(0x1fc)](_0x2f06c3,_0x33de5e){const _0x9536c0=a76_0x49062f,_0x1350e4=await this['client'][_0x9536c0(0x1fa)]({'project_name':_0x2f06c3,..._0x33de5e});return _0x1350e4[_0x9536c0(0x1e5)][_0x9536c0(0x1b9)](_0x29bc44=>({'project_id':_0x29bc44[_0x9536c0(0x1e3)]?.['id'],'project_name':_0x29bc44[_0x9536c0(0x1e3)]?.[_0x9536c0(0x1d6)],'workflow_id':_0x29bc44['id'],'workflow_name':_0x29bc44[_0x9536c0(0x1d6)],'revision':_0x29bc44[_0x9536c0(0x1b2)],'timezone':_0x29bc44[_0x9536c0(0x1b6)],'config':_0x29bc44['config'],'id':_0x29bc44['id'],'name':_0x29bc44[_0x9536c0(0x1d6)],'project':_0x29bc44['project']}));}async[a76_0x49062f(0x1bb)](_0x3c1f5f){const _0x21dc3c=a76_0x49062f;let _0x4a6b51;if(_0x3c1f5f?.[_0x21dc3c(0x1af)]){let _0x4b43ce,_0x3881f5=![];while(!_0x3881f5){const _0x232291=await this['client'][_0x21dc3c(0x1bf)]({'limit':0x64,'last_id':_0x4b43ce}),_0x34f592=_0x232291[_0x21dc3c(0x1e5)][_0x21dc3c(0x1c3)](_0x1b6323=>_0x1b6323[_0x21dc3c(0x1d6)]===_0x3c1f5f[_0x21dc3c(0x1af)]);if(_0x34f592){_0x4a6b51=_0x34f592['id'],_0x3881f5=!![];break;}if(!_0x232291[_0x21dc3c(0x1e2)]||_0x232291[_0x21dc3c(0x1e5)][_0x21dc3c(0x1f9)]===0x0)break;_0x4b43ce=_0x232291[_0x21dc3c(0x1e2)];}if(!_0x4a6b51)throw new Error('Project\x20not\x20found:\x20'+_0x3c1f5f['projectName']);}const _0x17b09a=await this['client']['listSessions']({'project_id':_0x4a6b51,'project_name':_0x3c1f5f?.[_0x21dc3c(0x1af)],'workflow_name':_0x3c1f5f?.[_0x21dc3c(0x1be)],'status':_0x3c1f5f?.[_0x21dc3c(0x1dd)],'from_time':_0x3c1f5f?.['fromTime'],'to_time':_0x3c1f5f?.['toTime'],'limit':_0x3c1f5f?.[_0x21dc3c(0x1ac)],'last_id':_0x3c1f5f?.[_0x21dc3c(0x1d5)]});return _0x17b09a[_0x21dc3c(0x1e5)]['map'](_0xa777c4=>({'project_id':_0xa777c4[_0x21dc3c(0x1e3)]?.['id'],'project_name':_0xa777c4[_0x21dc3c(0x1e3)]?.[_0x21dc3c(0x1d6)],'workflow_id':_0xa777c4['workflow']?.['id'],'workflow_name':_0xa777c4[_0x21dc3c(0x1e9)]?.[_0x21dc3c(0x1d6)],'session_id':_0xa777c4['id'],'sessionUuid':_0xa777c4[_0x21dc3c(0x1d7)],'sessionTime':_0xa777c4[_0x21dc3c(0x1b0)],'lastAttempt':_0xa777c4[_0x21dc3c(0x1b7)],'id':_0xa777c4['id'],'project':_0xa777c4[_0x21dc3c(0x1e3)],'workflow':_0xa777c4[_0x21dc3c(0x1e9)]}));}async[a76_0x49062f(0x1c4)](_0x5c4c05){const _0x31ea6f=a76_0x49062f,_0x5836ca=await this[_0x31ea6f(0x20a)][_0x31ea6f(0x1da)]({'project_name':_0x5c4c05?.[_0x31ea6f(0x1af)],'workflow_name':_0x5c4c05?.[_0x31ea6f(0x1be)],'include_retried':_0x5c4c05?.[_0x31ea6f(0x209)],'limit':_0x5c4c05?.[_0x31ea6f(0x1ac)],'last_id':_0x5c4c05?.[_0x31ea6f(0x1d5)]});return _0x5836ca[_0x31ea6f(0x1e5)][_0x31ea6f(0x1b9)](_0x432b3c=>({'project_id':_0x432b3c[_0x31ea6f(0x1e3)]?.['id'],'project_name':_0x432b3c[_0x31ea6f(0x1e3)]?.[_0x31ea6f(0x1d6)],'workflow_id':_0x432b3c[_0x31ea6f(0x1e9)]?.['id'],'workflow_name':_0x432b3c[_0x31ea6f(0x1e9)]?.['name'],'session_id':_0x432b3c[_0x31ea6f(0x1b5)],'sessionUuid':_0x432b3c[_0x31ea6f(0x1d7)],'sessionTime':_0x432b3c[_0x31ea6f(0x1b0)],'attempt_id':_0x432b3c['id'],'attempt_index':_0x432b3c['index'],'retryAttemptName':_0x432b3c[_0x31ea6f(0x1b4)],'done':_0x432b3c[_0x31ea6f(0x1fb)],'success':_0x432b3c[_0x31ea6f(0x1e6)],'cancelRequested':_0x432b3c[_0x31ea6f(0x1ae)],'params':_0x432b3c[_0x31ea6f(0x1f3)],'createdAt':_0x432b3c[_0x31ea6f(0x1c9)],'finishedAt':_0x432b3c[_0x31ea6f(0x1ad)],'id':_0x432b3c['id'],'index':_0x432b3c[_0x31ea6f(0x1c1)],'project':_0x432b3c[_0x31ea6f(0x1e3)],'workflow':_0x432b3c['workflow']}));}async[a76_0x49062f(0x1f7)](_0x43776d){const _0x5532bb=a76_0x49062f,_0xe7c34f=await this[_0x5532bb(0x20a)][_0x5532bb(0x20f)](_0x43776d);return _0xe7c34f;}async[a76_0x49062f(0x1ed)](_0x539d30,_0x4bd9df=![]){const _0x73064d=a76_0x49062f,_0x2b8e78=await this[_0x73064d(0x20a)][_0x73064d(0x214)](_0x539d30,_0x4bd9df);return _0x2b8e78['map'](_0x3b7ca0=>({'task_id':_0x3b7ca0['id'],'task_name':_0x3b7ca0[_0x73064d(0x1ef)],'parentId':_0x3b7ca0[_0x73064d(0x1e7)],'config':_0x3b7ca0[_0x73064d(0x1f2)],'upstreams':_0x3b7ca0[_0x73064d(0x1c0)],'state':_0x3b7ca0[_0x73064d(0x1d4)],'exportParams':_0x3b7ca0['exportParams'],'storeParams':_0x3b7ca0[_0x73064d(0x1e4)],'stateParams':_0x3b7ca0['stateParams'],'updatedAt':_0x3b7ca0[_0x73064d(0x205)],'retryAt':_0x3b7ca0[_0x73064d(0x1dc)],'startedAt':_0x3b7ca0['startedAt'],'error':_0x3b7ca0[_0x73064d(0x1df)],'isGroup':_0x3b7ca0[_0x73064d(0x1ce)],'id':_0x3b7ca0['id'],'fullName':_0x3b7ca0[_0x73064d(0x1ef)]}));}async[a76_0x49062f(0x200)](_0x36c653,_0x2ec1a6){const _0x35c6cc=a76_0x49062f;return await this[_0x35c6cc(0x20a)][_0x35c6cc(0x1ea)](_0x36c653,_0x2ec1a6);}async['logs'](_0x19109d,_0x47e2b4){const _0x59777b=a76_0x49062f,_0x1ab32f=await import(_0x59777b(0x1f8)),{promisify:_0xdab664}=await import('util'),_0x1c7b51=_0xdab664(_0x1ab32f[_0x59777b(0x204)]),_0x340b30=await this[_0x59777b(0x20a)][_0x59777b(0x1ea)](_0x19109d,_0x47e2b4);if(_0x340b30['length']===0x0)return'';const _0x28484a=[];for(const _0x1cced5 of _0x340b30){if(!_0x1cced5['direct'])continue;const _0x4772de=await fetch(_0x1cced5['direct']);if(!_0x4772de['ok'])throw new Error('Failed\x20to\x20download\x20log\x20file:\x20'+_0x4772de['status']);const _0x54479d=Buffer[_0x59777b(0x211)](await _0x4772de[_0x59777b(0x1cc)]()),_0x3504fd=await _0x1c7b51(_0x54479d);_0x28484a[_0x59777b(0x1d3)](_0x3504fd[_0x59777b(0x20c)](_0x59777b(0x1d1)));}return _0x28484a[_0x59777b(0x1bc)]('\x0a');}async[a76_0x49062f(0x207)](_0x49fc35,_0x2b9939){const _0x133b7a=a76_0x49062f,_0x47be7d=await this[_0x133b7a(0x20a)][_0x133b7a(0x1b1)](_0x49fc35,_0x2b9939);return _0x47be7d?.[_0x133b7a(0x206)]??'Kill\x20request\x20accepted';}async[a76_0x49062f(0x201)](_0x595acd,_0x2e3f32){const _0x432ef4=a76_0x49062f,_0x3614f0=await this[_0x432ef4(0x20a)]['retrySession'](_0x595acd,{'from_task':_0x2e3f32?.[_0x432ef4(0x20b)],'retry_params':_0x2e3f32?.['retryParams']});return{'attemptId':_0x3614f0['id'],'sessionId':_0x3614f0['sessionId']};}async[a76_0x49062f(0x1e8)](_0x412929,_0xfd029e){const _0x2d500a=a76_0x49062f,_0x46ccb7=await this[_0x2d500a(0x20a)][_0x2d500a(0x1e8)](_0x412929,{'resume_from':_0xfd029e?.['resumeFrom'],'retry_params':_0xfd029e?.['retryParams'],'force':_0xfd029e?.[_0x2d500a(0x1eb)]});return{'attemptId':_0x46ccb7['id'],'sessionId':_0x46ccb7[_0x2d500a(0x1b5)]};}async['run'](_0x4d8ddd,_0x218d93={},_0x341e00){const _0x42c85a=a76_0x49062f,_0x3e4442=_0x4d8ddd['indexOf']('.');let _0x3a6981,_0x51dfea;if(_0x3e4442===-0x1)throw new Error(_0x42c85a(0x1d9));_0x3a6981=_0x4d8ddd[_0x42c85a(0x1e0)](0x0,_0x3e4442),_0x51dfea=_0x4d8ddd[_0x42c85a(0x1e0)](_0x3e4442+0x1);if(!_0x3a6981||!_0x51dfea)throw new Error(_0x42c85a(0x20d)+_0x4d8ddd+_0x42c85a(0x1cb));const _0x596951=_0x341e00?.[_0x42c85a(0x1b0)]||new Date()[_0x42c85a(0x212)]();return await this[_0x42c85a(0x20a)]['startAttempt']({'projectName':_0x3a6981,'workflowName':_0x51dfea,'sessionTime':_0x596951,'params':_0x218d93});}async['download'](_0x45a27b,_0xd9d07f,_0x413164){const _0x7f4619=a76_0x49062f,{promises:_0x38f0cf}=await import('fs'),_0x2ed26a=await import(_0x7f4619(0x20e)),_0x12026b=await import('os'),_0xdfef83=await import(_0x7f4619(0x202)),{id:_0x423306,name:_0x201248}=await this['resolveProjectId'](_0x45a27b),_0x5b1238=_0x12026b[_0x7f4619(0x1d2)](),_0x1050e0=_0x2ed26a[_0x7f4619(0x1bc)](_0x5b1238,_0x7f4619(0x1ab)+_0x423306+'-'+Date[_0x7f4619(0x1c8)]()+_0x7f4619(0x215));try{await this[_0x7f4619(0x20a)][_0x7f4619(0x1de)](_0x423306,_0x1050e0,_0x413164?.[_0x7f4619(0x1b2)]);const _0x2535de=_0x2ed26a[_0x7f4619(0x1bc)](_0xd9d07f,_0x201248);await _0x38f0cf[_0x7f4619(0x1cf)](_0x2535de,{'recursive':!![]}),await _0xdfef83['extract']({'file':_0x1050e0,'cwd':_0x2535de,'gzip':!![]});const _0x1510e5=async _0x31c07c=>{const _0x57f430=_0x7f4619;let _0x1477fb=0x0;const _0x1f674f=await _0x38f0cf[_0x57f430(0x1b3)](_0x31c07c,{'withFileTypes':!![]});for(const _0x94a505 of _0x1f674f){const _0x2a7493=_0x2ed26a[_0x57f430(0x1bc)](_0x31c07c,_0x94a505[_0x57f430(0x1d6)]);if(_0x94a505[_0x57f430(0x1e1)]())_0x1477fb++;else _0x94a505[_0x57f430(0x210)]()&&(_0x1477fb+=await _0x1510e5(_0x2a7493));}return _0x1477fb;},_0xe3e561=await _0x1510e5(_0x2535de);return{'projectName':_0x201248,'revision':_0x413164?.[_0x7f4619(0x1b2)]||'latest','filesExtracted':_0xe3e561};}finally{try{await _0x38f0cf[_0x7f4619(0x1f1)](_0x1050e0);}catch{}}}async[a76_0x49062f(0x1d3)](_0x2a13fe,_0x317c6f){const _0x5ebf0b=a76_0x49062f,{promises:_0x497751}=await import('fs'),_0x5cbfa7=await import(_0x5ebf0b(0x20e)),_0x2961f3=await import(_0x5ebf0b(0x202)),_0x275c4a=_0x317c6f?.[_0x5ebf0b(0x1af)]||_0x5cbfa7[_0x5ebf0b(0x1f6)](_0x2a13fe),_0x503f71=_0x317c6f?.[_0x5ebf0b(0x1b2)]||new Date()[_0x5ebf0b(0x212)]()['replace'](/[:.]/g,'-');try{await _0x497751[_0x5ebf0b(0x1c5)](_0x2a13fe);}catch{throw new Error(_0x5ebf0b(0x1c7)+_0x2a13fe);}if(!_0x317c6f?.['skipValidation']){const _0x15ade9=await _0x497751['readdir'](_0x2a13fe),_0x2b09cd=_0x15ade9[_0x5ebf0b(0x1fd)](_0x497863=>_0x497863['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x2b09cd['length']===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20project\x20directory');for(const _0x9fefd7 of _0x2b09cd){const _0x17cb64=_0x5cbfa7[_0x5ebf0b(0x1bc)](_0x2a13fe,_0x9fefd7);try{await _0x497751[_0x5ebf0b(0x1c5)](_0x17cb64);}catch{throw new Error('Cannot\x20read\x20workflow\x20file:\x20'+_0x9fefd7);}}}const _0x428ba7=async(_0xa00b02,_0x3cb588='')=>{const _0x16e04f=_0x5ebf0b,_0x2889ca=await _0x497751[_0x16e04f(0x1b3)](_0xa00b02,{'withFileTypes':!![]}),_0x22897e=[];for(const _0x4dc1c7 of _0x2889ca){const _0x1cd1f2=_0x5cbfa7['join'](_0x3cb588,_0x4dc1c7[_0x16e04f(0x1d6)]),_0x172496=_0x5cbfa7[_0x16e04f(0x1bc)](_0xa00b02,_0x4dc1c7[_0x16e04f(0x1d6)]);if(!shouldIncludeInArchive(_0x4dc1c7[_0x16e04f(0x1d6)]))continue;_0x4dc1c7[_0x16e04f(0x210)]()?_0x22897e[_0x16e04f(0x1d3)](...await _0x428ba7(_0x172496,_0x1cd1f2)):_0x22897e['push'](_0x1cd1f2);}return _0x22897e;},_0x2c3297=await _0x428ba7(_0x2a13fe),_0x39ac7b=await import('os'),_0x1910b0=_0x39ac7b[_0x5ebf0b(0x1d2)](),_0x2b9c3a=_0x5cbfa7[_0x5ebf0b(0x1bc)](_0x1910b0,_0x5ebf0b(0x1ba)+Date[_0x5ebf0b(0x1c8)]()+_0x5ebf0b(0x215));try{await _0x2961f3[_0x5ebf0b(0x1ca)]({'file':_0x2b9c3a,'gzip':!![],'cwd':_0x2a13fe,'portable':!![]},_0x2c3297);const _0x5dc2ad=await this['client'][_0x5ebf0b(0x1ff)](_0x275c4a,_0x503f71,_0x2b9c3a,{'scheduleFrom':_0x317c6f?.[_0x5ebf0b(0x203)],'clearSchedule':_0x317c6f?.['clearSchedule'],'clearScheduleAll':_0x317c6f?.['clearScheduleAll']});return{'projectId':_0x5dc2ad['id'],'projectName':_0x5dc2ad['name'],'revision':_0x5dc2ad[_0x5ebf0b(0x1b2)]};}finally{try{await _0x497751[_0x5ebf0b(0x1f1)](_0x2b9c3a);}catch{}}}async['delete'](_0x46f8ba){const _0x43375b=a76_0x49062f,{id:_0x453c2d}=await this[_0x43375b(0x213)](_0x46f8ba),_0x3f1cab=await this[_0x43375b(0x20a)][_0x43375b(0x1f0)](_0x453c2d);return{'projectId':_0x3f1cab['id'],'projectName':_0x3f1cab['name']};}}function a76_0x392b(){const _0x395541=['push','state','last_id','name','sessionUuid','projects','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','listAttempts','493364UzbWov','retryAt','status','downloadProjectArchive','error','substring','isFile','lastId','project','storeParams','data','success','parentId','retryAttempt','workflow','listLogFiles','force','logger','tasks','4938732tlpBEV','fullName','deleteProject','unlink','config','params','9DIjHRq','4864792CwXjBv','basename','attempt','zlib','length','listWorkflows','done','workflows','filter','Project\x20not\x20found:\x20','uploadProjectArchive','logFiles','retrySession','tar','scheduleFrom','gunzip','updatedAt','message','kill','test','includeRetried','client','fromTask','toString','Invalid\x20workflow\x20format:\x20','path','getAttempt','isDirectory','from','toISOString','resolveProjectId','getAttemptTasks','.tar.gz','tdx-workflow-','limit','finishedAt','cancelRequested','projectName','sessionTime','killAttempt','revision','readdir','retryAttemptName','sessionId','timezone','lastAttempt','1gjBxoL','map','tdx-workflow-push-','sessions','join','NUMERIC_ID_PATTERN','workflowName','listProjects','upstreams','index','2293096QEduon','find','attempts','access','6175757xVDHeP','Project\x20directory\x20not\x20found:\x20','now','createdAt','create','.\x20Expected\x20\x22project.workflow\x22','arrayBuffer','4207120NaSFBM','isGroup','mkdir','3507468ivIzsw','utf-8','tmpdir'];a76_0x392b=function(){return _0x395541;};return a76_0x392b();}
@@ -1 +1 @@
1
- const a81_0x50a92b=a81_0x5390;(function(_0x17eca3,_0x11d5e9){const _0x566c6a=a81_0x5390,_0x12c473=_0x17eca3();while(!![]){try{const _0x46a218=-parseInt(_0x566c6a(0x176))/0x1+-parseInt(_0x566c6a(0x1c0))/0x2+-parseInt(_0x566c6a(0x1a3))/0x3*(parseInt(_0x566c6a(0x1b2))/0x4)+-parseInt(_0x566c6a(0x1b6))/0x5+-parseInt(_0x566c6a(0x187))/0x6*(parseInt(_0x566c6a(0x19d))/0x7)+parseInt(_0x566c6a(0x188))/0x8*(-parseInt(_0x566c6a(0x189))/0x9)+-parseInt(_0x566c6a(0x198))/0xa*(-parseInt(_0x566c6a(0x1c3))/0xb);if(_0x46a218===_0x11d5e9)break;else _0x12c473['push'](_0x12c473['shift']());}catch(_0x318efc){_0x12c473['push'](_0x12c473['shift']());}}}(a81_0x16e4,0x72df9));export const TD_ENDPOINTS={'us01':a81_0x50a92b(0x18a),'jp01':a81_0x50a92b(0x194),'eu01':a81_0x50a92b(0x1c4),'ap02':a81_0x50a92b(0x17d),'ap03':a81_0x50a92b(0x196),'dev-us01':a81_0x50a92b(0x1b0),'dev-eu01':a81_0x50a92b(0x182),'stg-us01':a81_0x50a92b(0x185),'stg-jp01':a81_0x50a92b(0x1b7),'stg-ap03':a81_0x50a92b(0x1a8)};export const CDP_ENDPOINTS={'us01':'https://api-cdp.treasuredata.com','jp01':a81_0x50a92b(0x195),'eu01':a81_0x50a92b(0x179),'ap02':a81_0x50a92b(0x183),'ap03':a81_0x50a92b(0x1a0),'dev-us01':a81_0x50a92b(0x19f),'dev-eu01':a81_0x50a92b(0x199),'stg-us01':'https://api-staging-cdp.us01.treasuredata.com','stg-jp01':a81_0x50a92b(0x178),'stg-ap03':a81_0x50a92b(0x1bd)};export const WORKFLOW_ENDPOINTS={'us01':a81_0x50a92b(0x1a5),'jp01':a81_0x50a92b(0x19a),'eu01':a81_0x50a92b(0x1c8),'ap02':a81_0x50a92b(0x192),'ap03':a81_0x50a92b(0x1ab),'dev-us01':a81_0x50a92b(0x17c),'dev-eu01':'https://api-development-workflow.eu01.treasuredata.com','stg-us01':a81_0x50a92b(0x1bf),'stg-jp01':a81_0x50a92b(0x18f),'stg-ap03':a81_0x50a92b(0x175)};export const TRINO_ENDPOINTS={'us01':a81_0x50a92b(0x19e),'jp01':a81_0x50a92b(0x1b9),'eu01':a81_0x50a92b(0x1b8),'ap02':a81_0x50a92b(0x18e),'ap03':a81_0x50a92b(0x1ba),'dev-us01':'https://api-development-presto.treasuredata.com','dev-eu01':a81_0x50a92b(0x184),'stg-us01':a81_0x50a92b(0x19c),'stg-jp01':'https://api-staging-presto.treasuredata.co.jp','stg-ap03':a81_0x50a92b(0x1a7)};export const LLM_ENDPOINTS={'us01':a81_0x50a92b(0x1b5),'jp01':a81_0x50a92b(0x1b1),'eu01':a81_0x50a92b(0x180),'ap02':'https://llm-api.ap02.treasuredata.com','ap03':a81_0x50a92b(0x197),'dev-us01':a81_0x50a92b(0x1b4),'dev-eu01':a81_0x50a92b(0x190),'stg-us01':a81_0x50a92b(0x193),'stg-jp01':a81_0x50a92b(0x1a1),'stg-ap03':a81_0x50a92b(0x1a9)};export const ENGAGE_ENDPOINTS={'us01':a81_0x50a92b(0x1be),'jp01':a81_0x50a92b(0x1b3),'eu01':a81_0x50a92b(0x1c1),'ap02':a81_0x50a92b(0x18b),'ap03':a81_0x50a92b(0x17f),'dev-us01':'https://engage-api-development.us01.treasuredata.com','dev-eu01':a81_0x50a92b(0x1ac),'stg-us01':a81_0x50a92b(0x17a),'stg-jp01':a81_0x50a92b(0x1a4),'stg-ap03':'https://engage-api-staging.ap03.treasuredata.com'};export const CONSOLE_ENDPOINTS={'us01':a81_0x50a92b(0x17e),'jp01':a81_0x50a92b(0x1c2),'eu01':a81_0x50a92b(0x177),'ap02':a81_0x50a92b(0x191),'ap03':'https://console.ap03.treasuredata.com','dev-us01':a81_0x50a92b(0x186),'dev-eu01':a81_0x50a92b(0x1a2),'stg-us01':a81_0x50a92b(0x1bb),'stg-jp01':a81_0x50a92b(0x1a6),'stg-ap03':a81_0x50a92b(0x1c9)};export const CONSOLE_NEXT_ENDPOINTS={'us01':a81_0x50a92b(0x1aa),'jp01':'https://console-next.treasuredata.co.jp','eu01':a81_0x50a92b(0x1c6),'ap02':a81_0x50a92b(0x1ae),'ap03':a81_0x50a92b(0x17b),'dev-us01':a81_0x50a92b(0x1af),'dev-eu01':a81_0x50a92b(0x18d),'stg-us01':a81_0x50a92b(0x18c),'stg-jp01':a81_0x50a92b(0x1c5),'stg-ap03':a81_0x50a92b(0x181)};export function getConsoleUrl(_0x62d025,_0x37997d){const _0x4341ff=a81_0x50a92b,_0x3d1ad2=CONSOLE_ENDPOINTS[_0x62d025]||_0x4341ff(0x19b)+_0x62d025+_0x4341ff(0x1c7);return _0x37997d?''+_0x3d1ad2+_0x37997d:_0x3d1ad2;}function a81_0x16e4(){const _0x52b63f=['https://api.ap02.treasuredata.com','https://console.treasuredata.com','https://engage-api.ap03.treasuredata.com','https://llm-api.eu01.treasuredata.com','https://console-staging-next.ap03.treasuredata.com','https://api-development.eu01.treasuredata.com','https://api-cdp.ap02.treasuredata.com','https://api-development-presto.eu01.treasuredata.com','https://api-staging.us01.treasuredata.com','https://console-development.treasuredata.com','12vQvSAe','8rWWqqQ','7023015nZxEdj','https://api.treasuredata.com','https://engage-api.ap02.treasuredata.com','https://console-staging-next.us01.treasuredata.com','https://console-development-next.eu01.treasuredata.com','https://api-presto.ap02.treasuredata.com','https://api-staging-workflow.treasuredata.co.jp','https://llm-api-development.eu01.treasuredata.com','https://console.ap02.treasuredata.com','https://api-workflow.ap02.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://api.treasuredata.co.jp','https://api-cdp.treasuredata.co.jp','https://api.ap03.treasuredata.com','https://llm-api.ap03.treasuredata.com','10pVyYJX','https://api-development-cdp.eu01.treasuredata.com','https://api-workflow.treasuredata.co.jp','https://console.','https://api-staging-presto.treasuredata.com','1259482slwUvD','https://api-presto.treasuredata.com','https://api-development-cdp.us01.treasuredata.com','https://api-cdp.ap03.treasuredata.com','https://llm-api-staging.treasuredata.co.jp','https://console-development.eu01.treasuredata.com','2268618ZPgNoM','https://engage-api-staging.treasuredata.co.jp','https://api-workflow.treasuredata.com','https://console-staging.treasuredata.co.jp','https://api-staging-presto.ap03.treasuredata.com','https://api-staging.ap03.treasuredata.com','https://llm-api-staging.ap03.treasuredata.com','https://console-next.us01.treasuredata.com','https://api-workflow.ap03.treasuredata.com','https://engage-api-development.eu01.treasuredata.com','https://console-next.','https://console-next.ap02.treasuredata.com','https://console-development-next.us01.treasuredata.com','https://api-development.treasuredata.com','https://llm-api.treasuredata.co.jp','4xPiJSu','https://engage-api.treasuredata.co.jp','https://llm-api-development.us01.treasuredata.com','https://llm-api.treasuredata.com','2296810eioXCX','https://api-staging.treasuredata.co.jp','https://api-presto.eu01.treasuredata.com','https://api-presto.treasuredata.co.jp','https://api-presto.ap03.treasuredata.com','https://console-staging.us01.treasuredata.com','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://api-staging-cdp.ap03.treasuredata.com','https://engage-api.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','895420GOxuht','https://engage-api.eu01.treasuredata.com','https://console.treasuredata.co.jp','45802823khFZyi','https://api.eu01.treasuredata.com','https://console-staging-next.treasuredata.co.jp','https://console-next.eu01.treasuredata.com','.treasuredata.com','https://api-workflow.eu01.treasuredata.com','https://console-staging.ap03.treasuredata.com','https://api-staging-workflow.ap03.treasuredata.com','889907fZYhVa','https://console.eu01.treasuredata.com','https://api-staging-cdp.treasuredata.co.jp','https://api-cdp.eu01.treasuredata.com','https://engage-api-staging.us01.treasuredata.com','https://console-next.ap03.treasuredata.com','https://api-development-workflow.us01.treasuredata.com'];a81_0x16e4=function(){return _0x52b63f;};return a81_0x16e4();}function a81_0x5390(_0x1f4ac7,_0x289a2d){_0x1f4ac7=_0x1f4ac7-0x175;const _0x16e4d0=a81_0x16e4();let _0x5390ce=_0x16e4d0[_0x1f4ac7];return _0x5390ce;}export function getConsoleNextUrl(_0x54e8cb,_0x25aae0){const _0x20b549=a81_0x50a92b,_0x3712b8=CONSOLE_NEXT_ENDPOINTS[_0x54e8cb]||_0x20b549(0x1ad)+_0x54e8cb+'.treasuredata.com';return _0x25aae0?''+_0x3712b8+_0x25aae0:_0x3712b8;}export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS,'engage':ENGAGE_ENDPOINTS};export function getEndpoint(_0xa0e336,_0x565e0f='td'){const _0x3c24c9=a81_0x50a92b,_0x219831=API_ENDPOINTS[_0x565e0f]?.[_0xa0e336];if(!_0x219831)throw new Error(_0x3c24c9(0x1bc)+_0x565e0f+'\x27\x20and\x20site\x20\x27'+_0xa0e336+'\x27');return _0x219831;}
1
+ const a81_0x59e590=a81_0x4f5b;(function(_0x572e54,_0x577f80){const _0xd46aab=a81_0x4f5b,_0x117b4b=_0x572e54();while(!![]){try{const _0x4e5a30=parseInt(_0xd46aab(0x11b))/0x1*(parseInt(_0xd46aab(0x136))/0x2)+parseInt(_0xd46aab(0x10e))/0x3+parseInt(_0xd46aab(0x149))/0x4*(parseInt(_0xd46aab(0x145))/0x5)+parseInt(_0xd46aab(0x14d))/0x6+-parseInt(_0xd46aab(0x153))/0x7*(parseInt(_0xd46aab(0x147))/0x8)+-parseInt(_0xd46aab(0x124))/0x9+-parseInt(_0xd46aab(0x141))/0xa*(parseInt(_0xd46aab(0x14e))/0xb);if(_0x4e5a30===_0x577f80)break;else _0x117b4b['push'](_0x117b4b['shift']());}catch(_0xf1f23a){_0x117b4b['push'](_0x117b4b['shift']());}}}(a81_0x3a92,0x9ddb3));export const TD_ENDPOINTS={'us01':a81_0x59e590(0x140),'jp01':a81_0x59e590(0x152),'eu01':a81_0x59e590(0x155),'ap02':a81_0x59e590(0x127),'ap03':a81_0x59e590(0x12c),'dev-us01':a81_0x59e590(0x13e),'dev-eu01':a81_0x59e590(0x13b),'stg-us01':a81_0x59e590(0x143),'stg-jp01':a81_0x59e590(0x130),'stg-ap03':a81_0x59e590(0x142)};function a81_0x4f5b(_0x43663a,_0x1e5e95){_0x43663a=_0x43663a-0x10e;const _0x3a922c=a81_0x3a92();let _0x4f5b9d=_0x3a922c[_0x43663a];return _0x4f5b9d;}export const CDP_ENDPOINTS={'us01':a81_0x59e590(0x12a),'jp01':'https://api-cdp.treasuredata.co.jp','eu01':a81_0x59e590(0x113),'ap02':a81_0x59e590(0x156),'ap03':'https://api-cdp.ap03.treasuredata.com','dev-us01':a81_0x59e590(0x11a),'dev-eu01':'https://api-development-cdp.eu01.treasuredata.com','stg-us01':a81_0x59e590(0x134),'stg-jp01':a81_0x59e590(0x138),'stg-ap03':'https://api-staging-cdp.ap03.treasuredata.com'};export const WORKFLOW_ENDPOINTS={'us01':a81_0x59e590(0x133),'jp01':a81_0x59e590(0x12b),'eu01':a81_0x59e590(0x15d),'ap02':a81_0x59e590(0x114),'ap03':a81_0x59e590(0x12e),'dev-us01':a81_0x59e590(0x135),'dev-eu01':a81_0x59e590(0x116),'stg-us01':a81_0x59e590(0x110),'stg-jp01':a81_0x59e590(0x144),'stg-ap03':a81_0x59e590(0x11d)};function a81_0x3a92(){const _0x45ccb2=['https://api-development-presto.eu01.treasuredata.com','https://api-development.eu01.treasuredata.com','https://console-next.ap03.treasuredata.com','https://engage-api-development.eu01.treasuredata.com','https://api-development.treasuredata.com','https://console-next.','https://api.treasuredata.com','1670hQIKii','https://api-staging.ap03.treasuredata.com','https://api-staging.us01.treasuredata.com','https://api-staging-workflow.treasuredata.co.jp','249700eXgTjA','https://api-presto.treasuredata.com','528512pvEaQE','https://llm-api.ap02.treasuredata.com','76ibdzkq','https://engage-api.ap02.treasuredata.com','https://llm-api-staging.treasuredata.co.jp','https://console.ap02.treasuredata.com','7384422ClHdaw','74327CiaQJm','https://console-development.eu01.treasuredata.com','.treasuredata.com','https://console.','https://api.treasuredata.co.jp','49qeUOLE','https://console-development-next.us01.treasuredata.com','https://api.eu01.treasuredata.com','https://api-cdp.ap02.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://engage-api-staging.treasuredata.co.jp','https://api-staging-presto.treasuredata.com','https://api-presto.ap03.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-workflow.eu01.treasuredata.com','673164MBAnJH','\x27\x20and\x20site\x20\x27','https://api-staging-workflow.us01.treasuredata.com','https://console-staging-next.us01.treasuredata.com','https://console.treasuredata.com','https://api-cdp.eu01.treasuredata.com','https://api-workflow.ap02.treasuredata.com','https://console-staging-next.treasuredata.co.jp','https://api-development-workflow.eu01.treasuredata.com','https://engage-api.treasuredata.com','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://engage-api-staging.ap03.treasuredata.com','https://api-development-cdp.us01.treasuredata.com','1403ZyAIwb','https://llm-api.eu01.treasuredata.com','https://api-staging-workflow.ap03.treasuredata.com','https://console-next.us01.treasuredata.com','https://console-next.eu01.treasuredata.com','https://engage-api.eu01.treasuredata.com','https://engage-api.treasuredata.co.jp','https://engage-api-staging.us01.treasuredata.com','https://console-staging-next.ap03.treasuredata.com','7900740GPhVzS','https://console-development-next.eu01.treasuredata.com','https://engage-api-development.us01.treasuredata.com','https://api.ap02.treasuredata.com','https://llm-api.treasuredata.co.jp','https://console-staging.us01.treasuredata.com','https://api-cdp.treasuredata.com','https://api-workflow.treasuredata.co.jp','https://api.ap03.treasuredata.com','https://console-staging.ap03.treasuredata.com','https://api-workflow.ap03.treasuredata.com','https://llm-api-development.us01.treasuredata.com','https://api-staging.treasuredata.co.jp','https://console.treasuredata.co.jp','https://console-next.ap02.treasuredata.com','https://api-workflow.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','https://api-development-workflow.us01.treasuredata.com','1014iVqISm','https://llm-api-development.eu01.treasuredata.com','https://api-staging-cdp.treasuredata.co.jp','https://llm-api.treasuredata.com'];a81_0x3a92=function(){return _0x45ccb2;};return a81_0x3a92();}export const TRINO_ENDPOINTS={'us01':a81_0x59e590(0x146),'jp01':'https://api-presto.treasuredata.co.jp','eu01':'https://api-presto.eu01.treasuredata.com','ap02':'https://api-presto.ap02.treasuredata.com','ap03':a81_0x59e590(0x15b),'dev-us01':'https://api-development-presto.treasuredata.com','dev-eu01':a81_0x59e590(0x13a),'stg-us01':a81_0x59e590(0x15a),'stg-jp01':'https://api-staging-presto.treasuredata.co.jp','stg-ap03':a81_0x59e590(0x157)};export const LLM_ENDPOINTS={'us01':a81_0x59e590(0x139),'jp01':a81_0x59e590(0x128),'eu01':a81_0x59e590(0x11c),'ap02':a81_0x59e590(0x148),'ap03':a81_0x59e590(0x15c),'dev-us01':a81_0x59e590(0x12f),'dev-eu01':a81_0x59e590(0x137),'stg-us01':a81_0x59e590(0x158),'stg-jp01':a81_0x59e590(0x14b),'stg-ap03':'https://llm-api-staging.ap03.treasuredata.com'};export const ENGAGE_ENDPOINTS={'us01':a81_0x59e590(0x117),'jp01':a81_0x59e590(0x121),'eu01':a81_0x59e590(0x120),'ap02':a81_0x59e590(0x14a),'ap03':'https://engage-api.ap03.treasuredata.com','dev-us01':a81_0x59e590(0x126),'dev-eu01':a81_0x59e590(0x13d),'stg-us01':a81_0x59e590(0x122),'stg-jp01':a81_0x59e590(0x159),'stg-ap03':a81_0x59e590(0x119)};export const CONSOLE_ENDPOINTS={'us01':a81_0x59e590(0x112),'jp01':a81_0x59e590(0x131),'eu01':'https://console.eu01.treasuredata.com','ap02':a81_0x59e590(0x14c),'ap03':'https://console.ap03.treasuredata.com','dev-us01':'https://console-development.treasuredata.com','dev-eu01':a81_0x59e590(0x14f),'stg-us01':a81_0x59e590(0x129),'stg-jp01':'https://console-staging.treasuredata.co.jp','stg-ap03':a81_0x59e590(0x12d)};export const CONSOLE_NEXT_ENDPOINTS={'us01':a81_0x59e590(0x11e),'jp01':'https://console-next.treasuredata.co.jp','eu01':a81_0x59e590(0x11f),'ap02':a81_0x59e590(0x132),'ap03':a81_0x59e590(0x13c),'dev-us01':a81_0x59e590(0x154),'dev-eu01':a81_0x59e590(0x125),'stg-us01':a81_0x59e590(0x111),'stg-jp01':a81_0x59e590(0x115),'stg-ap03':a81_0x59e590(0x123)};export function getConsoleUrl(_0x46a56e,_0x4d8d7d){const _0x4645e3=a81_0x59e590,_0x7280f5=CONSOLE_ENDPOINTS[_0x46a56e]||_0x4645e3(0x151)+_0x46a56e+_0x4645e3(0x150);return _0x4d8d7d?''+_0x7280f5+_0x4d8d7d:_0x7280f5;}export function getConsoleNextUrl(_0x22d076,_0x5cd50a){const _0x42a77e=a81_0x59e590,_0x17c684=CONSOLE_NEXT_ENDPOINTS[_0x22d076]||_0x42a77e(0x13f)+_0x22d076+'.treasuredata.com';return _0x5cd50a?''+_0x17c684+_0x5cd50a:_0x17c684;}export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS,'engage':ENGAGE_ENDPOINTS};export function getEndpoint(_0x387624,_0x513104='td'){const _0x107bb0=a81_0x59e590,_0x402910=API_ENDPOINTS[_0x513104]?.[_0x387624];if(!_0x402910)throw new Error(_0x107bb0(0x118)+_0x513104+_0x107bb0(0x10f)+_0x387624+'\x27');return _0x402910;}
@@ -1 +1 @@
1
- const a83_0xfc8504=a83_0x200c;(function(_0x3c0df1,_0x3252d6){const _0x4a30e0=a83_0x200c,_0x528b42=_0x3c0df1();while(!![]){try{const _0x49e4e3=-parseInt(_0x4a30e0(0x126))/0x1*(parseInt(_0x4a30e0(0x121))/0x2)+parseInt(_0x4a30e0(0x12c))/0x3*(-parseInt(_0x4a30e0(0x125))/0x4)+parseInt(_0x4a30e0(0x123))/0x5*(-parseInt(_0x4a30e0(0x12a))/0x6)+-parseInt(_0x4a30e0(0x120))/0x7+-parseInt(_0x4a30e0(0x129))/0x8*(-parseInt(_0x4a30e0(0x128))/0x9)+parseInt(_0x4a30e0(0x12b))/0xa*(parseInt(_0x4a30e0(0x12d))/0xb)+parseInt(_0x4a30e0(0x127))/0xc;if(_0x49e4e3===_0x3252d6)break;else _0x528b42['push'](_0x528b42['shift']());}catch(_0x1d3d53){_0x528b42['push'](_0x528b42['shift']());}}}(a83_0x5c86,0xc7222));function a83_0x5c86(){const _0x151614=['8VXrszg','439ZiWIDb','22279848cPkyWO','306CwUMtz','246128fYEcHQ','6xaMOBB','320BCdEvc','1130244BKoecc','215127MXPbrI','1414168zMXQem','4654ZikgoL','us01','3678995rbYzXt','jp01'];a83_0x5c86=function(){return _0x151614;};return a83_0x5c86();}function a83_0x200c(_0x54c602,_0x374fc5){_0x54c602=_0x54c602-0x120;const _0x5c864d=a83_0x5c86();let _0x200c9e=_0x5c864d[_0x54c602];return _0x200c9e;}export const SITE_ALIASES={'us':a83_0xfc8504(0x122),'aws':a83_0xfc8504(0x122),'jp':a83_0xfc8504(0x124),'aws-tokyo':a83_0xfc8504(0x124),'dev':'dev-us01','stg':'stg-us01'};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
1
+ function a83_0x5b63(){const _0x5a9fa0=['1910CCjSCS','3177UKPpnA','840375uvciJT','3379232sreiDn','37390DIjLjC','us01','jp01','2564ZnlpLu','5578296SyFrGW','5293687DmvZdV','722zzhTcr','dev-us01','stg-us01','6732zkeMCY'];a83_0x5b63=function(){return _0x5a9fa0;};return a83_0x5b63();}const a83_0x22e0bc=a83_0x1db6;(function(_0x5134ab,_0x595d51){const _0x16ba6c=a83_0x1db6,_0x523719=_0x5134ab();while(!![]){try{const _0xec55cd=parseInt(_0x16ba6c(0x137))/0x1+parseInt(_0x16ba6c(0x13f))/0x2*(-parseInt(_0x16ba6c(0x142))/0x3)+parseInt(_0x16ba6c(0x13c))/0x4*(-parseInt(_0x16ba6c(0x143))/0x5)+-parseInt(_0x16ba6c(0x13d))/0x6+parseInt(_0x16ba6c(0x13e))/0x7+-parseInt(_0x16ba6c(0x138))/0x8+-parseInt(_0x16ba6c(0x136))/0x9*(-parseInt(_0x16ba6c(0x139))/0xa);if(_0xec55cd===_0x595d51)break;else _0x523719['push'](_0x523719['shift']());}catch(_0x37b259){_0x523719['push'](_0x523719['shift']());}}}(a83_0x5b63,0x7c5e9));export const SITE_ALIASES={'us':a83_0x22e0bc(0x13a),'aws':'us01','jp':a83_0x22e0bc(0x13b),'aws-tokyo':a83_0x22e0bc(0x13b),'dev':a83_0x22e0bc(0x140),'stg':a83_0x22e0bc(0x141)};function a83_0x1db6(_0x3c1136,_0x245155){_0x3c1136=_0x3c1136-0x136;const _0x5b63ec=a83_0x5b63();let _0x1db6b5=_0x5b63ec[_0x3c1136];return _0x1db6b5;}export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
@@ -1 +1 @@
1
- function a88_0x2dcf(_0x488a7f,_0x730666){_0x488a7f=_0x488a7f-0x7c;const _0x483aa4=a88_0x483a();let _0x2dcf99=_0x483aa4[_0x488a7f];return _0x2dcf99;}(function(_0x359658,_0x4f9ba8){const _0x4e6fcc=a88_0x2dcf,_0x25e6b2=_0x359658();while(!![]){try{const _0xd70d01=-parseInt(_0x4e6fcc(0x88))/0x1*(-parseInt(_0x4e6fcc(0x82))/0x2)+-parseInt(_0x4e6fcc(0x87))/0x3+-parseInt(_0x4e6fcc(0x81))/0x4+-parseInt(_0x4e6fcc(0x7e))/0x5+parseInt(_0x4e6fcc(0x83))/0x6+parseInt(_0x4e6fcc(0x85))/0x7*(-parseInt(_0x4e6fcc(0x89))/0x8)+parseInt(_0x4e6fcc(0x8b))/0x9;if(_0xd70d01===_0x4f9ba8)break;else _0x25e6b2['push'](_0x25e6b2['shift']());}catch(_0x3bdd7d){_0x25e6b2['push'](_0x25e6b2['shift']());}}}(a88_0x483a,0x6f878));export function parseAgentRef(_0x2cfbf9){const _0x429ad2=a88_0x2dcf;if(!_0x2cfbf9||_0x2cfbf9[_0x429ad2(0x7f)]()==='')throw new Error(_0x429ad2(0x7c));const _0x44fbf7=_0x2cfbf9[_0x429ad2(0x7f)](),_0x33eebf=_0x44fbf7[_0x429ad2(0x7d)]('/');if(_0x33eebf[_0x429ad2(0x84)]===0x1)return{'projectName':_0x33eebf[0x0],'agentName':undefined};else{if(_0x33eebf[_0x429ad2(0x84)]===0x2){const [_0x3edd3e,_0x4b527d]=_0x33eebf;if(!_0x3edd3e||_0x3edd3e[_0x429ad2(0x7f)]()==='')throw new Error(_0x429ad2(0x8a));if(!_0x4b527d||_0x4b527d['trim']()==='')throw new Error(_0x429ad2(0x80));return{'projectName':_0x3edd3e[_0x429ad2(0x7f)](),'agentName':_0x4b527d[_0x429ad2(0x7f)]()};}else throw new Error('Invalid\x20agent\x20reference\x20format:\x20'+_0x2cfbf9+_0x429ad2(0x86));}}function a88_0x483a(){const _0x44bbb4=['trim','Agent\x20name\x20cannot\x20be\x20empty','3088536INInPb','19948YOfSJV','878496PIkpku','length','37919CXZZVa','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','2488533XyOnJp','81UasEOZ','80BYQPsp','Project\x20name\x20cannot\x20be\x20empty','13140999QYmdfq','Agent\x20reference\x20cannot\x20be\x20empty','split','1508910SmNDlr'];a88_0x483a=function(){return _0x44bbb4;};return a88_0x483a();}
1
+ function a88_0x35d9(){const _0x18f6b8=['2565420vjSoMN','trim','16FnAvBW','Invalid\x20agent\x20reference\x20format:\x20','1931457obdJzP','574063iuBrjo','2681572qOGTLb','split','Project\x20name\x20cannot\x20be\x20empty','944168AKMYCI','125260AGeOYZ','3152724VZsrYy','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','length','Agent\x20name\x20cannot\x20be\x20empty'];a88_0x35d9=function(){return _0x18f6b8;};return a88_0x35d9();}(function(_0x4cdce3,_0x1c9b7a){const _0xdeea9d=a88_0x2528,_0x28d322=_0x4cdce3();while(!![]){try{const _0x28f984=parseInt(_0xdeea9d(0xad))/0x1+parseInt(_0xdeea9d(0xac))/0x2+parseInt(_0xdeea9d(0xa7))/0x3+-parseInt(_0xdeea9d(0xa9))/0x4+-parseInt(_0xdeea9d(0xa3))/0x5+parseInt(_0xdeea9d(0xae))/0x6+-parseInt(_0xdeea9d(0xa8))/0x7*(parseInt(_0xdeea9d(0xa5))/0x8);if(_0x28f984===_0x1c9b7a)break;else _0x28d322['push'](_0x28d322['shift']());}catch(_0x1a3844){_0x28d322['push'](_0x28d322['shift']());}}}(a88_0x35d9,0x66532));function a88_0x2528(_0x420632,_0x9297a6){_0x420632=_0x420632-0xa2;const _0x35d96c=a88_0x35d9();let _0x252844=_0x35d96c[_0x420632];return _0x252844;}export function parseAgentRef(_0x16e10a){const _0x3cc382=a88_0x2528;if(!_0x16e10a||_0x16e10a[_0x3cc382(0xa4)]()==='')throw new Error('Agent\x20reference\x20cannot\x20be\x20empty');const _0x38f7f5=_0x16e10a[_0x3cc382(0xa4)](),_0x14eae1=_0x38f7f5[_0x3cc382(0xaa)]('/');if(_0x14eae1['length']===0x1)return{'projectName':_0x14eae1[0x0],'agentName':undefined};else{if(_0x14eae1[_0x3cc382(0xb0)]===0x2){const [_0x2061bc,_0x5e69b1]=_0x14eae1;if(!_0x2061bc||_0x2061bc[_0x3cc382(0xa4)]()==='')throw new Error(_0x3cc382(0xab));if(!_0x5e69b1||_0x5e69b1[_0x3cc382(0xa4)]()==='')throw new Error(_0x3cc382(0xa2));return{'projectName':_0x2061bc[_0x3cc382(0xa4)](),'agentName':_0x5e69b1[_0x3cc382(0xa4)]()};}else throw new Error(_0x3cc382(0xa6)+_0x16e10a+_0x3cc382(0xaf));}}
@@ -1 +1 @@
1
- (function(_0x41c763,_0x4d040a){const _0x54f35f=a89_0x317d,_0x5d5788=_0x41c763();while(!![]){try{const _0x46a2c2=parseInt(_0x54f35f(0xf0))/0x1*(parseInt(_0x54f35f(0xe9))/0x2)+parseInt(_0x54f35f(0xe8))/0x3*(-parseInt(_0x54f35f(0xee))/0x4)+parseInt(_0x54f35f(0xeb))/0x5+parseInt(_0x54f35f(0xe3))/0x6*(-parseInt(_0x54f35f(0xea))/0x7)+parseInt(_0x54f35f(0xe5))/0x8*(parseInt(_0x54f35f(0xef))/0x9)+-parseInt(_0x54f35f(0xe2))/0xa+-parseInt(_0x54f35f(0xec))/0xb*(-parseInt(_0x54f35f(0xe6))/0xc);if(_0x46a2c2===_0x4d040a)break;else _0x5d5788['push'](_0x5d5788['shift']());}catch(_0x5c000e){_0x5d5788['push'](_0x5d5788['shift']());}}}(a89_0x5dfe,0x5885e));function a89_0x317d(_0x313d50,_0x4852b9){_0x313d50=_0x313d50-0xe2;const _0x5dfeee=a89_0x5dfe();let _0x317d77=_0x5dfeee[_0x313d50];return _0x317d77;}function a89_0x5dfe(){const _0x4b7db3=['4179472lSReRG','push','210524OkZWhW','2888370uIRQdN','677171JTxDDn','2975610pDEkzF','15642hNbHCJ','slice','8zOOnXJ','12KjxbTS','map','33jterHf','2NVStBn','1554dxsBsY','2198965HczCWr'];a89_0x5dfe=function(){return _0x4b7db3;};return a89_0x5dfe();}export async function batchAsync(_0x5a49f2,_0x387d6a,_0x2a2fa5=0xa){const _0x140df4=a89_0x317d,_0x2b38db=[];for(let _0x2717b7=0x0;_0x2717b7<_0x5a49f2['length'];_0x2717b7+=_0x2a2fa5){const _0xe1ef9b=_0x5a49f2[_0x140df4(0xe4)](_0x2717b7,_0x2717b7+_0x2a2fa5),_0x1c6c5d=await Promise['all'](_0xe1ef9b[_0x140df4(0xe7)](_0x387d6a));_0x2b38db[_0x140df4(0xed)](..._0x1c6c5d);}return _0x2b38db;}
1
+ (function(_0x5e79ee,_0x3e08a2){const _0x1ae288=a89_0x579c,_0x327c06=_0x5e79ee();while(!![]){try{const _0x41e12c=parseInt(_0x1ae288(0x132))/0x1+-parseInt(_0x1ae288(0x12c))/0x2*(-parseInt(_0x1ae288(0x133))/0x3)+parseInt(_0x1ae288(0x139))/0x4+-parseInt(_0x1ae288(0x130))/0x5*(-parseInt(_0x1ae288(0x12e))/0x6)+parseInt(_0x1ae288(0x137))/0x7*(-parseInt(_0x1ae288(0x12d))/0x8)+-parseInt(_0x1ae288(0x136))/0x9+-parseInt(_0x1ae288(0x134))/0xa;if(_0x41e12c===_0x3e08a2)break;else _0x327c06['push'](_0x327c06['shift']());}catch(_0x25fac1){_0x327c06['push'](_0x327c06['shift']());}}}(a89_0x5bf6,0x675b5));export async function batchAsync(_0x1802f3,_0x4f0e3b,_0x14bbcd=0xa){const _0x3837df=a89_0x579c,_0xe3c61=[];for(let _0x26e43d=0x0;_0x26e43d<_0x1802f3[_0x3837df(0x138)];_0x26e43d+=_0x14bbcd){const _0xc3067=_0x1802f3[_0x3837df(0x131)](_0x26e43d,_0x26e43d+_0x14bbcd),_0x3a0c83=await Promise[_0x3837df(0x12f)](_0xc3067[_0x3837df(0x135)](_0x4f0e3b));_0xe3c61[_0x3837df(0x12b)](..._0x3a0c83);}return _0xe3c61;}function a89_0x579c(_0x5f4988,_0xf912e8){_0x5f4988=_0x5f4988-0x12b;const _0x5bf660=a89_0x5bf6();let _0x579c5=_0x5bf660[_0x5f4988];return _0x579c5;}function a89_0x5bf6(){const _0x294626=['all','45pxRMsN','slice','453501iMwrtc','102bqvOUM','3220510jqkDON','map','6564258dtzNmJ','68831KuJZqc','length','2629908yJgXCH','push','202rMhrOw','376cyjrZZ','548334WRMyNX'];a89_0x5bf6=function(){return _0x294626;};return a89_0x5bf6();}
@@ -1 +1 @@
1
- (function(_0x38a1bb,_0x371b2f){const _0x38b5a7=a90_0x243f,_0x1cbda8=_0x38a1bb();while(!![]){try{const _0x2123bc=-parseInt(_0x38b5a7(0x7f))/0x1*(parseInt(_0x38b5a7(0x74))/0x2)+parseInt(_0x38b5a7(0x83))/0x3+parseInt(_0x38b5a7(0x79))/0x4+-parseInt(_0x38b5a7(0x7c))/0x5*(parseInt(_0x38b5a7(0x7a))/0x6)+parseInt(_0x38b5a7(0x81))/0x7*(parseInt(_0x38b5a7(0x7e))/0x8)+parseInt(_0x38b5a7(0x75))/0x9*(parseInt(_0x38b5a7(0x82))/0xa)+-parseInt(_0x38b5a7(0x78))/0xb;if(_0x2123bc===_0x371b2f)break;else _0x1cbda8['push'](_0x1cbda8['shift']());}catch(_0x444d66){_0x1cbda8['push'](_0x1cbda8['shift']());}}}(a90_0x35bc,0xa47e7));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x49a518=a90_0x243f;return join(process[_0x49a518(0x80)](),_0x49a518(0x7b),_0x49a518(0x77));}function getLastChatIdPath(){const _0x2820a2=a90_0x243f;return join(getCacheDir(),_0x2820a2(0x7d));}function a90_0x35bc(){const _0x9d7aaf=['7916552dyQgYG','60TBoFwS','3122691gAAGCp','14mPvmRd','261KMAZXS','utf-8','tdx','15370630gHQJzL','2266652OtYazy','830280DxhypY','.cache','5NjZmTx','last_chat_id','8rKVeOf','75599JDgxrb','cwd'];a90_0x35bc=function(){return _0x9d7aaf;};return a90_0x35bc();}function ensureCacheDir(){const _0x21592b=getCacheDir();!existsSync(_0x21592b)&&mkdirSync(_0x21592b,{'recursive':!![]});}export function saveLastChatId(_0x194651){const _0x40b558=a90_0x243f;ensureCacheDir();const _0x2a2fba=getLastChatIdPath();writeFileSync(_0x2a2fba,_0x194651,_0x40b558(0x76));}function a90_0x243f(_0xd67fb0,_0x4b0195){_0xd67fb0=_0xd67fb0-0x74;const _0x35bce4=a90_0x35bc();let _0x243f1e=_0x35bce4[_0xd67fb0];return _0x243f1e;}export function loadLastChatId(){const _0x1a4fbc=getLastChatIdPath();if(!existsSync(_0x1a4fbc))return undefined;try{const _0xda1d86=readFileSync(_0x1a4fbc,'utf-8')['trim']();return _0xda1d86||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x5d8387=a90_0x243f,_0x30c90d=getLastChatIdPath();if(existsSync(_0x30c90d))try{writeFileSync(_0x30c90d,'',_0x5d8387(0x76));}catch{}}
1
+ (function(_0x50aec5,_0x1af1c9){const _0x265d9d=a90_0x23f9,_0xbf7c99=_0x50aec5();while(!![]){try{const _0x24e8b1=-parseInt(_0x265d9d(0x12a))/0x1*(parseInt(_0x265d9d(0x127))/0x2)+parseInt(_0x265d9d(0x124))/0x3+-parseInt(_0x265d9d(0x125))/0x4*(parseInt(_0x265d9d(0x120))/0x5)+-parseInt(_0x265d9d(0x12c))/0x6+parseInt(_0x265d9d(0x12d))/0x7*(-parseInt(_0x265d9d(0x12b))/0x8)+parseInt(_0x265d9d(0x128))/0x9*(parseInt(_0x265d9d(0x11e))/0xa)+-parseInt(_0x265d9d(0x122))/0xb*(-parseInt(_0x265d9d(0x121))/0xc);if(_0x24e8b1===_0x1af1c9)break;else _0xbf7c99['push'](_0xbf7c99['shift']());}catch(_0x3c85be){_0xbf7c99['push'](_0xbf7c99['shift']());}}}(a90_0x85b4,0x288e3));function a90_0x23f9(_0xafaf66,_0xb43936){_0xafaf66=_0xafaf66-0x11d;const _0x85b437=a90_0x85b4();let _0x23f966=_0x85b437[_0xafaf66];return _0x23f966;}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x45798b=a90_0x23f9;return join(process[_0x45798b(0x123)](),_0x45798b(0x11f),_0x45798b(0x11d));}function a90_0x85b4(){const _0x165b0a=['521572joPaYJ','trim','6QGbAkF','493335cYqgUi','utf-8','57949VYCmYO','88ImAkHd','969732UqCQJc','53795xUJLHE','tdx','20TTQvaI','.cache','5NLehrT','1120176TwzZXb','44SvXAGm','cwd','700470bwBagS'];a90_0x85b4=function(){return _0x165b0a;};return a90_0x85b4();}function getLastChatIdPath(){return join(getCacheDir(),'last_chat_id');}function ensureCacheDir(){const _0x1387be=getCacheDir();!existsSync(_0x1387be)&&mkdirSync(_0x1387be,{'recursive':!![]});}export function saveLastChatId(_0x25c34c){ensureCacheDir();const _0x4848f2=getLastChatIdPath();writeFileSync(_0x4848f2,_0x25c34c,'utf-8');}export function loadLastChatId(){const _0x281823=a90_0x23f9,_0x22e1a3=getLastChatIdPath();if(!existsSync(_0x22e1a3))return undefined;try{const _0x580c2a=readFileSync(_0x22e1a3,_0x281823(0x129))[_0x281823(0x126)]();return _0x580c2a||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0xec2aca=getLastChatIdPath();if(existsSync(_0xec2aca))try{writeFileSync(_0xec2aca,'','utf-8');}catch{}}
@@ -1 +1 @@
1
- function a91_0x1083(_0x4bab79,_0x126174){_0x4bab79=_0x4bab79-0xfb;const _0x4b07bd=a91_0x4b07();let _0x1083cf=_0x4b07bd[_0x4bab79];return _0x1083cf;}(function(_0x134019,_0x1cfd2b){const _0x37f665=a91_0x1083,_0x298d71=_0x134019();while(!![]){try{const _0x20cbd4=parseInt(_0x37f665(0x104))/0x1*(parseInt(_0x37f665(0x117))/0x2)+parseInt(_0x37f665(0x115))/0x3*(-parseInt(_0x37f665(0xff))/0x4)+-parseInt(_0x37f665(0x10a))/0x5*(-parseInt(_0x37f665(0x112))/0x6)+-parseInt(_0x37f665(0x103))/0x7*(-parseInt(_0x37f665(0xfb))/0x8)+parseInt(_0x37f665(0xfe))/0x9+parseInt(_0x37f665(0x11b))/0xa*(-parseInt(_0x37f665(0x119))/0xb)+-parseInt(_0x37f665(0xfd))/0xc;if(_0x20cbd4===_0x1cfd2b)break;else _0x298d71['push'](_0x298d71['shift']());}catch(_0x4c4ca2){_0x298d71['push'](_0x298d71['shift']());}}}(a91_0x4b07,0x8bad5));import{Chalk}from'chalk';function a91_0x4b07(){const _0x38f1d3=['dim','join','isTTY','11274HrjxNI','stringify','entries','57LXjYkz','noColor','36394ziQhht','object','11680361fQzbKL','null','10XiXogB','32DDEVCk','env','10670232MsvUVW','6513597ivLavK','15556kfeTSK','yellow','NO_COLOR','blue','1311198lqWOLd','50QVFTzr','cyan','map','number','length','stdout','570WrKHKc','boolean','repeat','string','isArray'];a91_0x4b07=function(){return _0x38f1d3;};return a91_0x4b07();}export function shouldUseColor(_0x50491f={}){const _0x58b892=a91_0x1083;if(_0x50491f[_0x58b892(0x116)]===!![])return![];if(_0x50491f['color']===!![])return!![];if(process[_0x58b892(0xfc)][_0x58b892(0x101)]!==undefined)return![];return process[_0x58b892(0x109)][_0x58b892(0x111)]??![];}export function getChalk(_0xcf05dd={}){if(shouldUseColor(_0xcf05dd))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x3fa2af,_0x5f3f46={}){return getChalk(_0x5f3f46)['dim'](_0x3fa2af);}export function colorHeader(_0x284fcf,_0x490f3e={}){const _0x5b5d1d=a91_0x1083;return getChalk(_0x490f3e)[_0x5b5d1d(0x105)](_0x284fcf);}export function colorType(_0xb9d75e,_0x95d02={}){const _0x15412a=a91_0x1083;return getChalk(_0x95d02)[_0x15412a(0x10f)](_0xb9d75e);}export function colorJSONKey(_0x58c215,_0x4f6c9e={}){const _0x4f8d2e=a91_0x1083;return getChalk(_0x4f6c9e)[_0x4f8d2e(0x102)](_0x58c215);}export function colorJSONString(_0x262852,_0x194876={}){return getChalk(_0x194876)['green'](_0x262852);}export function colorJSONNumber(_0x139ae0,_0x243041={}){const _0x55d174=a91_0x1083;return getChalk(_0x243041)[_0x55d174(0x105)](_0x139ae0);}export function colorJSONBoolean(_0x4d95bd,_0x5b8384={}){const _0x358468=a91_0x1083;return getChalk(_0x5b8384)[_0x358468(0x100)](_0x4d95bd);}export function colorJSONNull(_0x110098,_0x4b7217={}){const _0x1d72a8=a91_0x1083;return getChalk(_0x4b7217)[_0x1d72a8(0x10f)](_0x110098);}export function colorizeJSONCompact(_0x4edfa7,_0x3c28de={}){const _0x3c26c6=a91_0x1083;if(!shouldUseColor(_0x3c28de))return JSON[_0x3c26c6(0x113)](_0x4edfa7);if(_0x4edfa7===null)return colorJSONNull(_0x3c26c6(0x11a),_0x3c28de);if(typeof _0x4edfa7==='boolean')return colorJSONBoolean(String(_0x4edfa7),_0x3c28de);if(typeof _0x4edfa7===_0x3c26c6(0x107))return colorJSONNumber(String(_0x4edfa7),_0x3c28de);if(typeof _0x4edfa7===_0x3c26c6(0x10d))return colorJSONString(JSON[_0x3c26c6(0x113)](_0x4edfa7),_0x3c28de);if(Array[_0x3c26c6(0x10e)](_0x4edfa7)){if(_0x4edfa7[_0x3c26c6(0x108)]===0x0)return'[]';const _0x5b150c=_0x4edfa7[_0x3c26c6(0x106)](_0xc24d72=>colorizeJSONCompact(_0xc24d72,_0x3c28de));return'['+_0x5b150c[_0x3c26c6(0x110)](',')+']';}if(typeof _0x4edfa7===_0x3c26c6(0x118)){const _0x4bf64a=Object[_0x3c26c6(0x114)](_0x4edfa7);if(_0x4bf64a[_0x3c26c6(0x108)]===0x0)return'{}';const _0x9b83c4=_0x4bf64a[_0x3c26c6(0x106)](([_0x166ddb,_0x2f8b7a])=>{const _0x82869c=_0x3c26c6,_0x2aca23=colorJSONKey(JSON[_0x82869c(0x113)](_0x166ddb),_0x3c28de),_0x2ae775=colorizeJSONCompact(_0x2f8b7a,_0x3c28de);return _0x2aca23+':'+_0x2ae775;});return'{'+_0x9b83c4[_0x3c26c6(0x110)](',')+'}';}return String(_0x4edfa7);}export function colorizeJSON(_0x5053ce,_0x1d6459={},_0x24f955=0x0){const _0x38e3db=a91_0x1083;if(!shouldUseColor(_0x1d6459))return JSON[_0x38e3db(0x113)](_0x5053ce,null,0x2);const _0x259fb5='\x20'[_0x38e3db(0x10c)](_0x24f955),_0x48f2bd=_0x24f955+0x2;if(_0x5053ce===null)return colorJSONNull(_0x38e3db(0x11a),_0x1d6459);if(typeof _0x5053ce===_0x38e3db(0x10b))return colorJSONBoolean(String(_0x5053ce),_0x1d6459);if(typeof _0x5053ce===_0x38e3db(0x107))return colorJSONNumber(String(_0x5053ce),_0x1d6459);if(typeof _0x5053ce==='string')return colorJSONString(JSON[_0x38e3db(0x113)](_0x5053ce),_0x1d6459);if(Array[_0x38e3db(0x10e)](_0x5053ce)){if(_0x5053ce[_0x38e3db(0x108)]===0x0)return'[]';const _0x55982d=_0x5053ce[_0x38e3db(0x106)](_0x31e23c=>{const _0x4f3e6f=_0x38e3db,_0x330490=colorizeJSON(_0x31e23c,_0x1d6459,_0x48f2bd);return''+'\x20'[_0x4f3e6f(0x10c)](_0x48f2bd)+_0x330490;});return'[\x0a'+_0x55982d[_0x38e3db(0x110)](',\x0a')+('\x0a'+_0x259fb5+']');}if(typeof _0x5053ce===_0x38e3db(0x118)){const _0x36e2ce=Object[_0x38e3db(0x114)](_0x5053ce);if(_0x36e2ce[_0x38e3db(0x108)]===0x0)return'{}';const _0x224bcb=_0x36e2ce[_0x38e3db(0x106)](([_0x50bd2d,_0x44d9c8])=>{const _0x1f3865=_0x38e3db,_0x2712cd=colorJSONKey(JSON[_0x1f3865(0x113)](_0x50bd2d),_0x1d6459),_0x86fd23=colorizeJSON(_0x44d9c8,_0x1d6459,_0x48f2bd);return''+'\x20'[_0x1f3865(0x10c)](_0x48f2bd)+_0x2712cd+':\x20'+_0x86fd23;});return'{\x0a'+_0x224bcb[_0x38e3db(0x110)](',\x0a')+('\x0a'+_0x259fb5+'}');}return String(_0x5053ce);}
1
+ (function(_0x16bc67,_0x10a299){const _0x1f4efb=a91_0x4733,_0x190f60=_0x16bc67();while(!![]){try{const _0x299112=parseInt(_0x1f4efb(0x1bb))/0x1+-parseInt(_0x1f4efb(0x1bf))/0x2+-parseInt(_0x1f4efb(0x1c9))/0x3+-parseInt(_0x1f4efb(0x1cd))/0x4*(parseInt(_0x1f4efb(0x1c7))/0x5)+parseInt(_0x1f4efb(0x1cb))/0x6*(-parseInt(_0x1f4efb(0x1b2))/0x7)+parseInt(_0x1f4efb(0x1b9))/0x8+parseInt(_0x1f4efb(0x1c6))/0x9;if(_0x299112===_0x10a299)break;else _0x190f60['push'](_0x190f60['shift']());}catch(_0x28d8e2){_0x190f60['push'](_0x190f60['shift']());}}}(a91_0x6987,0x6a0b2));import{Chalk}from'chalk';export function shouldUseColor(_0x6aadff={}){const _0x2295d8=a91_0x4733;if(_0x6aadff[_0x2295d8(0x1c5)]===!![])return![];if(_0x6aadff[_0x2295d8(0x1b5)]===!![])return!![];if(process[_0x2295d8(0x1bc)][_0x2295d8(0x1b3)]!==undefined)return![];return process['stdout'][_0x2295d8(0x1b8)]??![];}export function getChalk(_0x3d3109={}){if(shouldUseColor(_0x3d3109))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x192011,_0x5c88={}){return getChalk(_0x5c88)['dim'](_0x192011);}export function colorHeader(_0x35c109,_0x57d1e6={}){const _0x1ff8b2=a91_0x4733;return getChalk(_0x57d1e6)[_0x1ff8b2(0x1bd)](_0x35c109);}export function colorType(_0x17555a,_0xe41fcf={}){const _0xa6141c=a91_0x4733;return getChalk(_0xe41fcf)[_0xa6141c(0x1b7)](_0x17555a);}function a91_0x6987(){const _0x14bbc3=['number','stringify','noColor','9545409WfbPUV','45555ZssAlW','blue','913371mkvGEE','yellow','6FpcfkH','string','112ybDOzf','map','repeat','4102777HiyoKF','NO_COLOR','boolean','color','null','dim','isTTY','2648744TBMSoY','green','757836kdjXYq','env','cyan','isArray','1139000NWWMNn','join','entries','length'];a91_0x6987=function(){return _0x14bbc3;};return a91_0x6987();}function a91_0x4733(_0x5405cb,_0x146eec){_0x5405cb=_0x5405cb-0x1b1;const _0x69876e=a91_0x6987();let _0x473368=_0x69876e[_0x5405cb];return _0x473368;}export function colorJSONKey(_0x531e24,_0x661d05={}){const _0x428f4b=a91_0x4733;return getChalk(_0x661d05)[_0x428f4b(0x1c8)](_0x531e24);}export function colorJSONString(_0x44e175,_0x3ada49={}){const _0x59b77c=a91_0x4733;return getChalk(_0x3ada49)[_0x59b77c(0x1ba)](_0x44e175);}export function colorJSONNumber(_0x36cd20,_0x556ff9={}){const _0x12e5f1=a91_0x4733;return getChalk(_0x556ff9)[_0x12e5f1(0x1bd)](_0x36cd20);}export function colorJSONBoolean(_0x35e3ef,_0x7636f6={}){const _0x23dbaa=a91_0x4733;return getChalk(_0x7636f6)[_0x23dbaa(0x1ca)](_0x35e3ef);}export function colorJSONNull(_0x4e6258,_0x57b811={}){const _0xac9f81=a91_0x4733;return getChalk(_0x57b811)[_0xac9f81(0x1b7)](_0x4e6258);}export function colorizeJSONCompact(_0x10db12,_0x2dd7e6={}){const _0xa327c2=a91_0x4733;if(!shouldUseColor(_0x2dd7e6))return JSON[_0xa327c2(0x1c4)](_0x10db12);if(_0x10db12===null)return colorJSONNull(_0xa327c2(0x1b6),_0x2dd7e6);if(typeof _0x10db12==='boolean')return colorJSONBoolean(String(_0x10db12),_0x2dd7e6);if(typeof _0x10db12===_0xa327c2(0x1c3))return colorJSONNumber(String(_0x10db12),_0x2dd7e6);if(typeof _0x10db12===_0xa327c2(0x1cc))return colorJSONString(JSON[_0xa327c2(0x1c4)](_0x10db12),_0x2dd7e6);if(Array[_0xa327c2(0x1be)](_0x10db12)){if(_0x10db12[_0xa327c2(0x1c2)]===0x0)return'[]';const _0xe746f6=_0x10db12[_0xa327c2(0x1ce)](_0x17230e=>colorizeJSONCompact(_0x17230e,_0x2dd7e6));return'['+_0xe746f6['join'](',')+']';}if(typeof _0x10db12==='object'){const _0x100b1f=Object[_0xa327c2(0x1c1)](_0x10db12);if(_0x100b1f[_0xa327c2(0x1c2)]===0x0)return'{}';const _0xa7de64=_0x100b1f[_0xa327c2(0x1ce)](([_0x5c88fa,_0x1aa011])=>{const _0x3c6ead=colorJSONKey(JSON['stringify'](_0x5c88fa),_0x2dd7e6),_0x1361f8=colorizeJSONCompact(_0x1aa011,_0x2dd7e6);return _0x3c6ead+':'+_0x1361f8;});return'{'+_0xa7de64[_0xa327c2(0x1c0)](',')+'}';}return String(_0x10db12);}export function colorizeJSON(_0x2d353c,_0x2f6ae8={},_0x5a3d3f=0x0){const _0x3c58e9=a91_0x4733;if(!shouldUseColor(_0x2f6ae8))return JSON['stringify'](_0x2d353c,null,0x2);const _0x2e35a3='\x20'[_0x3c58e9(0x1b1)](_0x5a3d3f),_0x3d09f0=_0x5a3d3f+0x2;if(_0x2d353c===null)return colorJSONNull('null',_0x2f6ae8);if(typeof _0x2d353c===_0x3c58e9(0x1b4))return colorJSONBoolean(String(_0x2d353c),_0x2f6ae8);if(typeof _0x2d353c===_0x3c58e9(0x1c3))return colorJSONNumber(String(_0x2d353c),_0x2f6ae8);if(typeof _0x2d353c===_0x3c58e9(0x1cc))return colorJSONString(JSON[_0x3c58e9(0x1c4)](_0x2d353c),_0x2f6ae8);if(Array['isArray'](_0x2d353c)){if(_0x2d353c[_0x3c58e9(0x1c2)]===0x0)return'[]';const _0x34a7d7=_0x2d353c[_0x3c58e9(0x1ce)](_0x34bd72=>{const _0x5216d0=_0x3c58e9,_0x2f93a2=colorizeJSON(_0x34bd72,_0x2f6ae8,_0x3d09f0);return''+'\x20'[_0x5216d0(0x1b1)](_0x3d09f0)+_0x2f93a2;});return'[\x0a'+_0x34a7d7[_0x3c58e9(0x1c0)](',\x0a')+('\x0a'+_0x2e35a3+']');}if(typeof _0x2d353c==='object'){const _0x5df531=Object[_0x3c58e9(0x1c1)](_0x2d353c);if(_0x5df531[_0x3c58e9(0x1c2)]===0x0)return'{}';const _0x4c9318=_0x5df531[_0x3c58e9(0x1ce)](([_0x2509f0,_0x420a01])=>{const _0x57944c=_0x3c58e9,_0x491df9=colorJSONKey(JSON[_0x57944c(0x1c4)](_0x2509f0),_0x2f6ae8),_0x3a913e=colorizeJSON(_0x420a01,_0x2f6ae8,_0x3d09f0);return''+'\x20'[_0x57944c(0x1b1)](_0x3d09f0)+_0x491df9+':\x20'+_0x3a913e;});return'{\x0a'+_0x4c9318[_0x3c58e9(0x1c0)](',\x0a')+('\x0a'+_0x2e35a3+'}');}return String(_0x2d353c);}
@@ -1 +1 @@
1
- function a92_0x3ac2(){const _0x3b33fa=['bigint','cmdout','number','query','3015693MPfWfb','params','678164upGOxe','push','pipe','[Object]','5YhaWVp','[error]','varchar','format','padEnd','21GBsTXw','trim','entries','2141PNDkms','close','tsv','resolve','Results\x20saved\x20to\x20','forEach','jsonl','stderr','boolean','[query]','FINISHED','[logs]','limit','cyan','rule','577000NVzpOd','720264TrmMLM','string','[rule]','170730XBmsum','920388QQxnOd','json','join','output','blue','─┬─','bold','358bSTQvT','stringify','yellow','isTTY','log','isInteger','max','error','repeat','[params]','length','-FXRSn','stdin','split','less','object','map','red','filter','write','table','inherit','noColor','keys','debug'];a92_0x3ac2=function(){return _0x3b33fa;};return a92_0x3ac2();}(function(_0x49b5c1,_0x317b95){const _0x20b465=a92_0x1e7b,_0x1b0f77=_0x49b5c1();while(!![]){try{const _0x32cb05=parseInt(_0x20b465(0x19a))/0x1*(parseInt(_0x20b465(0x1b5))/0x2)+-parseInt(_0x20b465(0x1ae))/0x3+-parseInt(_0x20b465(0x18e))/0x4*(-parseInt(_0x20b465(0x192))/0x5)+-parseInt(_0x20b465(0x1ad))/0x6+-parseInt(_0x20b465(0x197))/0x7*(-parseInt(_0x20b465(0x1aa))/0x8)+-parseInt(_0x20b465(0x1d2))/0x9+parseInt(_0x20b465(0x1a9))/0xa;if(_0x32cb05===_0x317b95)break;else _0x1b0f77['push'](_0x1b0f77['shift']());}catch(_0x47aad0){_0x1b0f77['push'](_0x1b0f77['shift']());}}}(a92_0x3ac2,0x3354b));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a92_0x2f8b32 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function isStructuredFormat(_0x4efa77){const _0xe30d43=a92_0x1e7b;return _0x4efa77['format']===_0xe30d43(0x1af)||_0x4efa77[_0xe30d43(0x195)]===_0xe30d43(0x1a0)||_0x4efa77['format']==='tsv'||_0x4efa77[_0xe30d43(0x195)]===_0xe30d43(0x1c9)||_0x4efa77[_0xe30d43(0x1af)]===!![]||_0x4efa77[_0xe30d43(0x1a0)]===!![]||_0x4efa77[_0xe30d43(0x19c)]===!![]||_0x4efa77[_0xe30d43(0x1c9)]===!![];}export function parseOutputOptions(_0x151b5f){const _0x3edad0=a92_0x1e7b;return{'format':_0x151b5f['format']||'table','output':_0x151b5f[_0x3edad0(0x1b1)]||'','limit':_0x151b5f[_0x3edad0(0x1a6)],'color':_0x151b5f['color'],'noColor':_0x151b5f[_0x3edad0(0x1cb)]};}function convertSDKResultToQueryResult(_0x1643d8){const _0x5616a2=a92_0x1e7b,_0x1a821c=[];if(_0x1643d8[_0x5616a2(0x1bf)]>0x0){const _0x5cd7a2=_0x1643d8[0x0];for(const [_0x3b0e3d,_0x1e5fdb]of Object[_0x5616a2(0x199)](_0x5cd7a2)){let _0x4ca888=_0x5616a2(0x194);if(typeof _0x1e5fdb==='number')_0x4ca888=Number[_0x5616a2(0x1ba)](_0x1e5fdb)?_0x5616a2(0x1ce):'double';else{if(typeof _0x1e5fdb===_0x5616a2(0x1a2))_0x4ca888=_0x5616a2(0x1a2);else _0x1e5fdb===null&&(_0x4ca888=_0x5616a2(0x194));}_0x1a821c[_0x5616a2(0x18f)]({'name':_0x3b0e3d,'type':_0x4ca888});}}return{'queryId':'sdk-result','columns':_0x1a821c,'data':_0x1643d8,'stats':{'state':_0x5616a2(0x1a4),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1643d8[_0x5616a2(0x1bf)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x1dac8d,_0x70671d){const _0x22081c=convertSDKResultToQueryResult(_0x1dac8d);return formatQueryOutput(_0x22081c,_0x70671d);}export async function formatQueryOutput(_0x7b820b,_0xe9b3c){const _0x163cc8=a92_0x1e7b,{format:_0x4a708a,limit:_0x2571c8,output:_0x116c06,color:_0x397788,noColor:_0x4fa709}=_0xe9b3c,_0x2a7c4e=Boolean(_0x116c06)&&!_0x397788,_0x1db32f={'color':_0x397788,'noColor':_0x4fa709||_0x2a7c4e};if(_0x4a708a===_0x163cc8(0x1c9)){const _0x2cc09d=shouldUseLess(_0x4a708a,_0x116c06);return formatAsTable(_0x7b820b,_0x2571c8,_0x2cc09d,_0x1db32f);}else{if(_0x4a708a==='json')return formatAsJSON(_0x7b820b,_0x1db32f);else return _0x4a708a==='jsonl'?formatAsJSONL(_0x7b820b,_0x1db32f):formatQueryResult(_0x7b820b,_0x4a708a);}}function shouldUseLess(_0xf5faa4,_0x398ac8){const _0x3d4f69=a92_0x1e7b;return _0xf5faa4===_0x3d4f69(0x1c9)&&process['stdout'][_0x3d4f69(0x1b8)]&&!_0x398ac8;}function a92_0x1e7b(_0x3145cd,_0x1d953f){_0x3145cd=_0x3145cd-0x18d;const _0x3ac213=a92_0x3ac2();let _0x1e7b3a=_0x3ac213[_0x3145cd];return _0x1e7b3a;}export function resolveOutputOptions(_0x539a45){const _0x17c80a=a92_0x1e7b,_0x2bbcf8=resolveOutputFormat(_0x539a45[_0x17c80a(0x195)],_0x539a45[_0x17c80a(0x1b1)],_0x17c80a(0x1c9));let _0x47f40c=typeof _0x539a45[_0x17c80a(0x1a6)]===_0x17c80a(0x1d0)?_0x539a45[_0x17c80a(0x1a6)]:parseInt(_0x539a45[_0x17c80a(0x1a6)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x1ff18d=_0x539a45['output']||'';return shouldUseLess(_0x2bbcf8,_0x1ff18d)&&(_0x47f40c=Infinity),{'format':_0x2bbcf8,'output':_0x1ff18d,'limit':_0x47f40c,'color':_0x539a45['color'],'noColor':_0x539a45[_0x17c80a(0x1cb)]};}export function writeOutput(_0x25b350,_0x5e4289,_0x1eab09){const _0x58ad55=a92_0x1e7b;return _0x5e4289?(writeFileSync(_0x5e4289,_0x25b350),console[_0x58ad55(0x1bc)](_0x58ad55(0x19e)+_0x5e4289),Promise[_0x58ad55(0x19d)]()):shouldUseLess(_0x1eab09||'','')?new Promise(_0x27755f=>{const _0x136658=_0x58ad55,_0x466153=spawn(_0x136658(0x1c3),[_0x136658(0x1c0)],{'stdio':[_0x136658(0x190),_0x136658(0x1ca),_0x136658(0x1ca)]});let _0xefdc8c=![];_0x466153['on']('error',()=>{const _0x32c725=_0x136658;!_0xefdc8c&&(_0xefdc8c=!![],console[_0x32c725(0x1b9)](_0x25b350),_0x27755f());}),_0x466153['on'](_0x136658(0x19b),()=>{!_0xefdc8c&&(_0xefdc8c=!![],_0x27755f());}),_0x466153['on']('spawn',()=>{const _0x75f016=_0x136658;!_0xefdc8c&&_0x466153[_0x75f016(0x1c1)]&&(_0x466153[_0x75f016(0x1c1)]['on'](_0x75f016(0x1bc),()=>{}),_0x466153[_0x75f016(0x1c1)][_0x75f016(0x1c8)](_0x25b350),_0x466153['stdin']['end']());}),!_0x466153['stdin']&&(!_0xefdc8c&&(_0xefdc8c=!![],console[_0x136658(0x1b9)](_0x25b350),_0x27755f()));}):(console[_0x58ad55(0x1b9)](_0x25b350),Promise[_0x58ad55(0x19d)]());}export async function handleSDKOutput(_0x3e3497,_0x388504){const _0x49a6be=a92_0x1e7b,_0x194df5=resolveOutputOptions(_0x388504),_0x8fe83b=await formatSDKOutput(_0x3e3497,_0x194df5);await writeOutput(_0x8fe83b,_0x194df5[_0x49a6be(0x1b1)]||undefined,_0x194df5['format']);}export async function handleQueryOutput(_0x2733a5,_0x3b6fa8){const _0x4cd655=resolveOutputOptions(_0x3b6fa8),_0x343971=await formatQueryOutput(_0x2733a5,_0x4cd655);await writeOutput(_0x343971,_0x4cd655['output']||undefined,_0x4cd655['format']);}async function formatSingleObject(_0x2dc78d,_0x1451b5){const _0x4ef6e8=a92_0x1e7b,{format:_0x12b2d4,color:_0x1e495c,noColor:_0x4649b0}=_0x1451b5,_0x2a88af={'color':_0x1e495c,'noColor':_0x4649b0};if(_0x12b2d4==='json'){if(shouldUseColor(_0x2a88af))return colorizeJSON(_0x2dc78d,_0x2a88af);return JSON[_0x4ef6e8(0x1b6)](_0x2dc78d,null,0x2);}else{if(_0x12b2d4===_0x4ef6e8(0x1a0)){if(shouldUseColor(_0x2a88af))return colorizeJSONCompact(_0x2dc78d,_0x2a88af);return JSON['stringify'](_0x2dc78d);}else{if(_0x12b2d4===_0x4ef6e8(0x19c))return Object[_0x4ef6e8(0x199)](_0x2dc78d)[_0x4ef6e8(0x1c5)](([_0xa04803,_0x541264])=>_0xa04803+'\x09'+_0x541264)['join']('\x0a');else{const _0x396202=Object[_0x4ef6e8(0x199)](_0x2dc78d);if(_0x396202[_0x4ef6e8(0x1bf)]===0x0)return'No\x20data';const _0x4a8fd5=_0x2dc78d[_0x4ef6e8(0x1cd)],_0x2e2637=_0x2dc78d[_0x4ef6e8(0x1d1)],_0x132573=_0x2dc78d[_0x4ef6e8(0x18d)],_0x510dbc=_0x2dc78d[_0x4ef6e8(0x1a8)],_0x3e8f02=_0x2e2637?typeof _0x2e2637===_0x4ef6e8(0x1ab)?_0x2e2637:JSON['stringify'](_0x2e2637,null,0x2):undefined,_0x209640=_0x132573&&Object[_0x4ef6e8(0x1cc)](_0x132573)['length']>0x0?JSON[_0x4ef6e8(0x1b6)](_0x132573,null,0x2):undefined,_0x3c96dd=_0x510dbc&&Object['keys'](_0x510dbc)[_0x4ef6e8(0x1bf)]>0x0?JSON[_0x4ef6e8(0x1b6)](_0x510dbc,null,0x2):undefined,_0x220692=_0x396202[_0x4ef6e8(0x1c7)](([_0x5e6167])=>_0x5e6167!==_0x4ef6e8(0x1cd)&&_0x5e6167!==_0x4ef6e8(0x1d1)&&_0x5e6167!=='params'&&_0x5e6167!==_0x4ef6e8(0x1a8)),_0x127bc7=Math[_0x4ef6e8(0x1bb)](..._0x220692[_0x4ef6e8(0x1c5)](([_0x5237d0])=>_0x5237d0[_0x4ef6e8(0x1bf)])),_0x34bea4=Math[_0x4ef6e8(0x1bb)](..._0x220692[_0x4ef6e8(0x1c5)](([,_0x5b8af0])=>{const _0x45cbc3=_0x4ef6e8;try{const _0x2c106b=_0x5b8af0===null||_0x5b8af0===undefined?'':typeof _0x5b8af0===_0x45cbc3(0x1c4)?JSON['stringify'](_0x5b8af0):String(_0x5b8af0),_0x41f8d5=_0x2c106b[_0x45cbc3(0x1c2)]('\x0a');return Math['max'](..._0x41f8d5['map'](_0x1532ef=>_0x1532ef[_0x45cbc3(0x1bf)]),0x0);}catch{return 0x0;}}),0x14),_0x4526c6=[];_0x4526c6[_0x4ef6e8(0x18f)](colorBorder('┌─'+'─'[_0x4ef6e8(0x1bd)](_0x127bc7)+_0x4ef6e8(0x1b3)+'─'[_0x4ef6e8(0x1bd)](_0x34bea4)+'─┐',_0x2a88af)),_0x220692[_0x4ef6e8(0x19f)](([_0x33813b,_0x5bb5ed])=>{const _0xef218c=_0x4ef6e8;let _0x7f378;try{_0x7f378=_0x5bb5ed===null||_0x5bb5ed===undefined?'':typeof _0x5bb5ed===_0xef218c(0x1c4)?JSON[_0xef218c(0x1b6)](_0x5bb5ed):String(_0x5bb5ed);}catch{_0x7f378=_0xef218c(0x191);}const _0x3698d5=_0x33813b[_0xef218c(0x196)](_0x127bc7),_0x4fbb4a=_0x7f378['split']('\x0a');_0x4fbb4a['forEach']((_0xdda270,_0x3b1bee)=>{const _0x469ba8=_0xef218c,_0x554d5f=colorBorder('│',_0x2a88af);_0x3b1bee===0x0?_0x4526c6['push'](_0x554d5f+'\x20'+_0x3698d5+'\x20'+_0x554d5f+'\x20'+_0xdda270[_0x469ba8(0x196)](_0x34bea4)+'\x20'+_0x554d5f):_0x4526c6[_0x469ba8(0x18f)](_0x554d5f+'\x20'+'\x20'[_0x469ba8(0x1bd)](_0x127bc7)+'\x20'+_0x554d5f+'\x20'+_0xdda270[_0x469ba8(0x196)](_0x34bea4)+'\x20'+_0x554d5f);});}),_0x4526c6[_0x4ef6e8(0x18f)](colorBorder('└─'+'─'[_0x4ef6e8(0x1bd)](_0x127bc7)+'─┴─'+'─'[_0x4ef6e8(0x1bd)](_0x34bea4)+'─┘',_0x2a88af));_0x3e8f02&&(_0x4526c6[_0x4ef6e8(0x18f)](''),_0x4526c6[_0x4ef6e8(0x18f)](String(a92_0x2f8b32[_0x4ef6e8(0x1b7)][_0x4ef6e8(0x1b4)](_0x4ef6e8(0x1a3)))),_0x4526c6['push'](_0x3e8f02));_0x209640&&(_0x4526c6[_0x4ef6e8(0x18f)](''),_0x4526c6['push'](String(a92_0x2f8b32[_0x4ef6e8(0x1b2)]['bold'](_0x4ef6e8(0x1be)))),_0x4526c6[_0x4ef6e8(0x18f)](_0x209640));_0x3c96dd&&(_0x4526c6['push'](''),_0x4526c6[_0x4ef6e8(0x18f)](String(a92_0x2f8b32['magenta'][_0x4ef6e8(0x1b4)](_0x4ef6e8(0x1ac)))),_0x4526c6['push'](_0x3c96dd));if(_0x4a8fd5){if(_0x4a8fd5[_0x4ef6e8(0x1a1)]){_0x4526c6[_0x4ef6e8(0x18f)](''),_0x4526c6[_0x4ef6e8(0x18f)](String(a92_0x2f8b32[_0x4ef6e8(0x1c6)][_0x4ef6e8(0x1b4)](_0x4ef6e8(0x193))));const _0x598088=_0x4a8fd5['stderr'][_0x4ef6e8(0x1c2)]('\x0a');_0x598088[_0x4ef6e8(0x19f)](_0x4a5910=>{const _0x58c5e6=_0x4ef6e8;_0x4a5910['trim']()&&_0x4526c6[_0x58c5e6(0x18f)](_0x4a5910);});}if(_0x4a8fd5[_0x4ef6e8(0x1cf)]){_0x4526c6[_0x4ef6e8(0x18f)](''),_0x4526c6[_0x4ef6e8(0x18f)](String(a92_0x2f8b32[_0x4ef6e8(0x1a7)]['bold'](_0x4ef6e8(0x1a5))));const _0x14a222=_0x4a8fd5[_0x4ef6e8(0x1cf)]['split']('\x0a');_0x14a222[_0x4ef6e8(0x19f)](_0x55cbca=>{const _0x2bef86=_0x4ef6e8;_0x55cbca[_0x2bef86(0x198)]()&&_0x4526c6['push'](_0x55cbca);});}}return _0x4526c6[_0x4ef6e8(0x1b0)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x6b4c7e,_0x4d9970){const _0x4a70aa=a92_0x1e7b;if(_0x4d9970[_0x4a70aa(0x195)]===_0x4a70aa(0x1c9)){await handleSDKOutput([_0x6b4c7e],_0x4d9970);return;}const _0x37a5f6=resolveOutputOptions(_0x4d9970),_0x33bdd9=await formatSingleObject(_0x6b4c7e,_0x37a5f6);await writeOutput(_0x33bdd9,_0x37a5f6[_0x4a70aa(0x1b1)]||undefined,_0x37a5f6[_0x4a70aa(0x195)]);}
1
+ (function(_0x34925c,_0x463e72){const _0x31a757=a92_0x2367,_0x3040ec=_0x34925c();while(!![]){try{const _0x3ac92f=parseInt(_0x31a757(0x15f))/0x1+-parseInt(_0x31a757(0x189))/0x2+-parseInt(_0x31a757(0x18b))/0x3*(parseInt(_0x31a757(0x169))/0x4)+-parseInt(_0x31a757(0x185))/0x5*(-parseInt(_0x31a757(0x17c))/0x6)+-parseInt(_0x31a757(0x16f))/0x7+parseInt(_0x31a757(0x167))/0x8*(parseInt(_0x31a757(0x180))/0x9)+-parseInt(_0x31a757(0x17e))/0xa;if(_0x3ac92f===_0x463e72)break;else _0x3040ec['push'](_0x3040ec['shift']());}catch(_0x35a623){_0x3040ec['push'](_0x3040ec['shift']());}}}(a92_0x1855,0xb4d74));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a92_0x1855(){const _0x24101b=['padEnd','query','1617742DbWErx','inherit','bigint','string','json','[error]','resolve','jsonl','tsv','trim','limit','number','─┬─','6bATpuc','noColor','7580350KqTuQR','yellow','1918467HoIFip','isTTY','map','stdin','color','7001935AcBhTj','forEach','format','double','1406562CzMAEj','max','9VLsmpJ','stringify','repeat','[logs]','less','object','table','isInteger','stderr','log','cyan','[query]','blue','filter','debug','end','split','Results\x20saved\x20to\x20','FINISHED','pipe','length','cmdout','rule','No\x20data','boolean','906537jErxIq','error','red','varchar','join','magenta','spawn','bold','24TsVTXF','close','684356ydhtqu','output','push','entries'];a92_0x1855=function(){return _0x24101b;};return a92_0x1855();}import a92_0x3b1f0a from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function isStructuredFormat(_0x578be3){const _0xee4bb1=a92_0x2367;return _0x578be3[_0xee4bb1(0x187)]===_0xee4bb1(0x173)||_0x578be3[_0xee4bb1(0x187)]===_0xee4bb1(0x176)||_0x578be3[_0xee4bb1(0x187)]===_0xee4bb1(0x177)||_0x578be3[_0xee4bb1(0x187)]===_0xee4bb1(0x14c)||_0x578be3[_0xee4bb1(0x173)]===!![]||_0x578be3[_0xee4bb1(0x176)]===!![]||_0x578be3['tsv']===!![]||_0x578be3[_0xee4bb1(0x14c)]===!![];}export function parseOutputOptions(_0x5e8699){const _0x52b182=a92_0x2367;return{'format':_0x5e8699[_0x52b182(0x187)]||'table','output':_0x5e8699[_0x52b182(0x16a)]||'','limit':_0x5e8699[_0x52b182(0x179)],'color':_0x5e8699[_0x52b182(0x184)],'noColor':_0x5e8699[_0x52b182(0x17d)]};}function convertSDKResultToQueryResult(_0x158d67){const _0x55e895=a92_0x2367,_0x1a85b2=[];if(_0x158d67[_0x55e895(0x15a)]>0x0){const _0x4fb3eb=_0x158d67[0x0];for(const [_0x58dd75,_0x15fc51]of Object['entries'](_0x4fb3eb)){let _0x507966=_0x55e895(0x162);if(typeof _0x15fc51===_0x55e895(0x17a))_0x507966=Number[_0x55e895(0x14d)](_0x15fc51)?_0x55e895(0x171):_0x55e895(0x188);else{if(typeof _0x15fc51===_0x55e895(0x15e))_0x507966='boolean';else _0x15fc51===null&&(_0x507966=_0x55e895(0x162));}_0x1a85b2[_0x55e895(0x16b)]({'name':_0x58dd75,'type':_0x507966});}}return{'queryId':'sdk-result','columns':_0x1a85b2,'data':_0x158d67,'stats':{'state':_0x55e895(0x158),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x158d67[_0x55e895(0x15a)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x1db1fe,_0x244876){const _0x33ca1e=convertSDKResultToQueryResult(_0x1db1fe);return formatQueryOutput(_0x33ca1e,_0x244876);}function a92_0x2367(_0x5c1aaf,_0x2c0e82){_0x5c1aaf=_0x5c1aaf-0x14a;const _0x18555e=a92_0x1855();let _0x236701=_0x18555e[_0x5c1aaf];return _0x236701;}export async function formatQueryOutput(_0x74b873,_0x1a6dda){const _0xc58d04=a92_0x2367,{format:_0x3cf5eb,limit:_0x14ba7a,output:_0x560f0d,color:_0x489d86,noColor:_0x249194}=_0x1a6dda,_0x5433ea=Boolean(_0x560f0d)&&!_0x489d86,_0x965aca={'color':_0x489d86,'noColor':_0x249194||_0x5433ea};if(_0x3cf5eb===_0xc58d04(0x14c)){const _0x4c8ca9=shouldUseLess(_0x3cf5eb,_0x560f0d);return formatAsTable(_0x74b873,_0x14ba7a,_0x4c8ca9,_0x965aca);}else{if(_0x3cf5eb===_0xc58d04(0x173))return formatAsJSON(_0x74b873,_0x965aca);else return _0x3cf5eb===_0xc58d04(0x176)?formatAsJSONL(_0x74b873,_0x965aca):formatQueryResult(_0x74b873,_0x3cf5eb);}}function shouldUseLess(_0x43a1fa,_0x4faae4){const _0x101d3d=a92_0x2367;return _0x43a1fa===_0x101d3d(0x14c)&&process['stdout'][_0x101d3d(0x181)]&&!_0x4faae4;}export function resolveOutputOptions(_0x1be3a7){const _0x565d07=a92_0x2367,_0x3be37a=resolveOutputFormat(_0x1be3a7[_0x565d07(0x187)],_0x1be3a7[_0x565d07(0x16a)],_0x565d07(0x14c));let _0x3a94bd=typeof _0x1be3a7['limit']===_0x565d07(0x17a)?_0x1be3a7[_0x565d07(0x179)]:parseInt(_0x1be3a7[_0x565d07(0x179)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x352d61=_0x1be3a7['output']||'';return shouldUseLess(_0x3be37a,_0x352d61)&&(_0x3a94bd=Infinity),{'format':_0x3be37a,'output':_0x352d61,'limit':_0x3a94bd,'color':_0x1be3a7[_0x565d07(0x184)],'noColor':_0x1be3a7[_0x565d07(0x17d)]};}export function writeOutput(_0x1672aa,_0x30e54b,_0xe9e98c){const _0x3be1df=a92_0x2367;return _0x30e54b?(writeFileSync(_0x30e54b,_0x1672aa),console[_0x3be1df(0x160)](_0x3be1df(0x157)+_0x30e54b),Promise[_0x3be1df(0x175)]()):shouldUseLess(_0xe9e98c||'','')?new Promise(_0x36ed2d=>{const _0x5750d6=_0x3be1df,_0x20f417=spawn(_0x5750d6(0x14a),['-FXRSn'],{'stdio':[_0x5750d6(0x159),'inherit',_0x5750d6(0x170)]});let _0x264002=![];_0x20f417['on'](_0x5750d6(0x160),()=>{const _0x45f444=_0x5750d6;!_0x264002&&(_0x264002=!![],console[_0x45f444(0x14f)](_0x1672aa),_0x36ed2d());}),_0x20f417['on'](_0x5750d6(0x168),()=>{!_0x264002&&(_0x264002=!![],_0x36ed2d());}),_0x20f417['on'](_0x5750d6(0x165),()=>{const _0x252173=_0x5750d6;!_0x264002&&_0x20f417[_0x252173(0x183)]&&(_0x20f417[_0x252173(0x183)]['on'](_0x252173(0x160),()=>{}),_0x20f417['stdin']['write'](_0x1672aa),_0x20f417[_0x252173(0x183)][_0x252173(0x155)]());}),!_0x20f417['stdin']&&(!_0x264002&&(_0x264002=!![],console[_0x5750d6(0x14f)](_0x1672aa),_0x36ed2d()));}):(console[_0x3be1df(0x14f)](_0x1672aa),Promise[_0x3be1df(0x175)]());}export async function handleSDKOutput(_0x4b5554,_0x516cc2){const _0x4945e8=a92_0x2367,_0x9e4bfd=resolveOutputOptions(_0x516cc2),_0x191db0=await formatSDKOutput(_0x4b5554,_0x9e4bfd);await writeOutput(_0x191db0,_0x9e4bfd['output']||undefined,_0x9e4bfd[_0x4945e8(0x187)]);}export async function handleQueryOutput(_0x21d310,_0x2e4857){const _0x49bc73=a92_0x2367,_0x4c7bd9=resolveOutputOptions(_0x2e4857),_0x134bc5=await formatQueryOutput(_0x21d310,_0x4c7bd9);await writeOutput(_0x134bc5,_0x4c7bd9[_0x49bc73(0x16a)]||undefined,_0x4c7bd9[_0x49bc73(0x187)]);}async function formatSingleObject(_0x54047e,_0x2cc147){const _0x10a512=a92_0x2367,{format:_0x1118c6,color:_0xa1ed50,noColor:_0x3668d0}=_0x2cc147,_0x428003={'color':_0xa1ed50,'noColor':_0x3668d0};if(_0x1118c6===_0x10a512(0x173)){if(shouldUseColor(_0x428003))return colorizeJSON(_0x54047e,_0x428003);return JSON[_0x10a512(0x18c)](_0x54047e,null,0x2);}else{if(_0x1118c6==='jsonl'){if(shouldUseColor(_0x428003))return colorizeJSONCompact(_0x54047e,_0x428003);return JSON[_0x10a512(0x18c)](_0x54047e);}else{if(_0x1118c6==='tsv')return Object[_0x10a512(0x16c)](_0x54047e)[_0x10a512(0x182)](([_0x5d0432,_0x297873])=>_0x5d0432+'\x09'+_0x297873)[_0x10a512(0x163)]('\x0a');else{const _0x25e421=Object[_0x10a512(0x16c)](_0x54047e);if(_0x25e421[_0x10a512(0x15a)]===0x0)return _0x10a512(0x15d);const _0x1aa2e3=_0x54047e['debug'],_0x28fb51=_0x54047e[_0x10a512(0x16e)],_0x48ad19=_0x54047e['params'],_0x229b5e=_0x54047e[_0x10a512(0x15c)],_0x4ed44b=_0x28fb51?typeof _0x28fb51===_0x10a512(0x172)?_0x28fb51:JSON['stringify'](_0x28fb51,null,0x2):undefined,_0x5a2a36=_0x48ad19&&Object['keys'](_0x48ad19)['length']>0x0?JSON[_0x10a512(0x18c)](_0x48ad19,null,0x2):undefined,_0x4f7d28=_0x229b5e&&Object['keys'](_0x229b5e)[_0x10a512(0x15a)]>0x0?JSON[_0x10a512(0x18c)](_0x229b5e,null,0x2):undefined,_0x3f58bd=_0x25e421[_0x10a512(0x153)](([_0x47061d])=>_0x47061d!==_0x10a512(0x154)&&_0x47061d!==_0x10a512(0x16e)&&_0x47061d!=='params'&&_0x47061d!==_0x10a512(0x15c)),_0x46eb47=Math[_0x10a512(0x18a)](..._0x3f58bd['map'](([_0x1df6b9])=>_0x1df6b9[_0x10a512(0x15a)])),_0x5b1ef7=Math['max'](..._0x3f58bd[_0x10a512(0x182)](([,_0x36d535])=>{const _0x16b1ac=_0x10a512;try{const _0x58f191=_0x36d535===null||_0x36d535===undefined?'':typeof _0x36d535===_0x16b1ac(0x14b)?JSON['stringify'](_0x36d535):String(_0x36d535),_0x496681=_0x58f191[_0x16b1ac(0x156)]('\x0a');return Math[_0x16b1ac(0x18a)](..._0x496681[_0x16b1ac(0x182)](_0x2ce910=>_0x2ce910[_0x16b1ac(0x15a)]),0x0);}catch{return 0x0;}}),0x14),_0x41d65d=[];_0x41d65d[_0x10a512(0x16b)](colorBorder('┌─'+'─'['repeat'](_0x46eb47)+_0x10a512(0x17b)+'─'['repeat'](_0x5b1ef7)+'─┐',_0x428003)),_0x3f58bd[_0x10a512(0x186)](([_0x5d2b09,_0x1fe945])=>{const _0x554510=_0x10a512;let _0x2cce9b;try{_0x2cce9b=_0x1fe945===null||_0x1fe945===undefined?'':typeof _0x1fe945==='object'?JSON[_0x554510(0x18c)](_0x1fe945):String(_0x1fe945);}catch{_0x2cce9b='[Object]';}const _0x229b7e=_0x5d2b09['padEnd'](_0x46eb47),_0x1763b1=_0x2cce9b['split']('\x0a');_0x1763b1['forEach']((_0x56ae88,_0x4767e6)=>{const _0x4e8c=_0x554510,_0x99b4cd=colorBorder('│',_0x428003);_0x4767e6===0x0?_0x41d65d[_0x4e8c(0x16b)](_0x99b4cd+'\x20'+_0x229b7e+'\x20'+_0x99b4cd+'\x20'+_0x56ae88['padEnd'](_0x5b1ef7)+'\x20'+_0x99b4cd):_0x41d65d[_0x4e8c(0x16b)](_0x99b4cd+'\x20'+'\x20'['repeat'](_0x46eb47)+'\x20'+_0x99b4cd+'\x20'+_0x56ae88[_0x4e8c(0x16d)](_0x5b1ef7)+'\x20'+_0x99b4cd);});}),_0x41d65d[_0x10a512(0x16b)](colorBorder('└─'+'─'[_0x10a512(0x18d)](_0x46eb47)+'─┴─'+'─'[_0x10a512(0x18d)](_0x5b1ef7)+'─┘',_0x428003));_0x4ed44b&&(_0x41d65d[_0x10a512(0x16b)](''),_0x41d65d[_0x10a512(0x16b)](String(a92_0x3b1f0a[_0x10a512(0x17f)][_0x10a512(0x166)](_0x10a512(0x151)))),_0x41d65d['push'](_0x4ed44b));_0x5a2a36&&(_0x41d65d[_0x10a512(0x16b)](''),_0x41d65d[_0x10a512(0x16b)](String(a92_0x3b1f0a[_0x10a512(0x152)][_0x10a512(0x166)]('[params]'))),_0x41d65d[_0x10a512(0x16b)](_0x5a2a36));_0x4f7d28&&(_0x41d65d[_0x10a512(0x16b)](''),_0x41d65d['push'](String(a92_0x3b1f0a[_0x10a512(0x164)]['bold']('[rule]'))),_0x41d65d['push'](_0x4f7d28));if(_0x1aa2e3){if(_0x1aa2e3[_0x10a512(0x14e)]){_0x41d65d[_0x10a512(0x16b)](''),_0x41d65d[_0x10a512(0x16b)](String(a92_0x3b1f0a[_0x10a512(0x161)][_0x10a512(0x166)](_0x10a512(0x174))));const _0xfa0148=_0x1aa2e3[_0x10a512(0x14e)][_0x10a512(0x156)]('\x0a');_0xfa0148[_0x10a512(0x186)](_0x472f38=>{const _0x242fbc=_0x10a512;_0x472f38[_0x242fbc(0x178)]()&&_0x41d65d[_0x242fbc(0x16b)](_0x472f38);});}if(_0x1aa2e3[_0x10a512(0x15b)]){_0x41d65d[_0x10a512(0x16b)](''),_0x41d65d[_0x10a512(0x16b)](String(a92_0x3b1f0a[_0x10a512(0x150)][_0x10a512(0x166)](_0x10a512(0x18e))));const _0x3db825=_0x1aa2e3[_0x10a512(0x15b)][_0x10a512(0x156)]('\x0a');_0x3db825[_0x10a512(0x186)](_0x3721b6=>{const _0x3fb029=_0x10a512;_0x3721b6[_0x3fb029(0x178)]()&&_0x41d65d[_0x3fb029(0x16b)](_0x3721b6);});}}return _0x41d65d[_0x10a512(0x163)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x1f26f5,_0x45369d){const _0x55b463=a92_0x2367;if(_0x45369d[_0x55b463(0x187)]===_0x55b463(0x14c)){await handleSDKOutput([_0x1f26f5],_0x45369d);return;}const _0x5b27b5=resolveOutputOptions(_0x45369d),_0x477bd4=await formatSingleObject(_0x1f26f5,_0x5b27b5);await writeOutput(_0x477bd4,_0x5b27b5[_0x55b463(0x16a)]||undefined,_0x5b27b5[_0x55b463(0x187)]);}
@@ -1 +1 @@
1
- function a93_0x2c9b(){const _0x3ea652=['5TnycOd','1032918URofUx','12sNoDzJ','711042kymUaZ','10OuWtSI','368308jAdVvy','720189nUvibU','4350536DABAZp','3480399cxfaqQ','number','703122VtNtHN'];a93_0x2c9b=function(){return _0x3ea652;};return a93_0x2c9b();}function a93_0x404a(_0x102f1f,_0x2a2791){_0x102f1f=_0x102f1f-0x119;const _0x2c9b97=a93_0x2c9b();let _0x404a5b=_0x2c9b97[_0x102f1f];return _0x404a5b;}(function(_0x28e0c0,_0x429f99){const _0x348ce2=a93_0x404a,_0x3c7633=_0x28e0c0();while(!![]){try{const _0x32388a=parseInt(_0x348ce2(0x122))/0x1+parseInt(_0x348ce2(0x120))/0x2+-parseInt(_0x348ce2(0x123))/0x3*(-parseInt(_0x348ce2(0x11f))/0x4)+-parseInt(_0x348ce2(0x11d))/0x5*(parseInt(_0x348ce2(0x11e))/0x6)+parseInt(_0x348ce2(0x11c))/0x7+-parseInt(_0x348ce2(0x119))/0x8+-parseInt(_0x348ce2(0x11a))/0x9*(parseInt(_0x348ce2(0x121))/0xa);if(_0x32388a===_0x429f99)break;else _0x3c7633['push'](_0x3c7633['shift']());}catch(_0x442c40){_0x3c7633['push'](_0x3c7633['shift']());}}}(a93_0x2c9b,0x6bdb7));export const DEFAULT_DISPLAY_LIMIT=0x28;export const DEFAULT_LISTING_LIMIT=0x2710;export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x46e7fc,_0x192ce5){const _0x3726ed=a93_0x404a;if(_0x46e7fc===undefined)return _0x192ce5;if(typeof _0x46e7fc===_0x3726ed(0x11b))return _0x46e7fc;return parseInt(_0x46e7fc,0xa);}
1
+ (function(_0x14d5e7,_0x4f7c47){const _0xec1c36=a93_0x419b,_0x14f258=_0x14d5e7();while(!![]){try{const _0x1fa815=parseInt(_0xec1c36(0x13f))/0x1*(parseInt(_0xec1c36(0x138))/0x2)+-parseInt(_0xec1c36(0x13d))/0x3*(parseInt(_0xec1c36(0x139))/0x4)+parseInt(_0xec1c36(0x13c))/0x5+-parseInt(_0xec1c36(0x13b))/0x6+-parseInt(_0xec1c36(0x140))/0x7*(-parseInt(_0xec1c36(0x137))/0x8)+parseInt(_0xec1c36(0x136))/0x9*(parseInt(_0xec1c36(0x13e))/0xa)+-parseInt(_0xec1c36(0x13a))/0xb;if(_0x1fa815===_0x4f7c47)break;else _0x14f258['push'](_0x14f258['shift']());}catch(_0x156376){_0x14f258['push'](_0x14f258['shift']());}}}(a93_0x4294,0x4c1c1));function a93_0x419b(_0x1fbce1,_0x356290){_0x1fbce1=_0x1fbce1-0x136;const _0x429445=a93_0x4294();let _0x419b79=_0x429445[_0x1fbce1];return _0x419b79;}export const DEFAULT_DISPLAY_LIMIT=0x28;export const DEFAULT_LISTING_LIMIT=0x2710;function a93_0x4294(){const _0x40c6a7=['92603bzqMwy','2474613GvgIxy','16zRtgfe','20jwQope','4ufkzxG','4872197aEfyhP','195984reUqcB','1436300PDkIJW','1267527CfRbIe','10gjNNaX','62117IIgsCl'];a93_0x4294=function(){return _0x40c6a7;};return a93_0x4294();}export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x4e61c1,_0x206e59){if(_0x4e61c1===undefined)return _0x206e59;if(typeof _0x4e61c1==='number')return _0x4e61c1;return parseInt(_0x4e61c1,0xa);}
@@ -1 +1 @@
1
- (function(_0xfa2094,_0x32a2ad){const _0x1e5f64=a94_0x4ac2,_0x5e765d=_0xfa2094();while(!![]){try{const _0x3eaa41=parseInt(_0x1e5f64(0x204))/0x1+parseInt(_0x1e5f64(0x200))/0x2+parseInt(_0x1e5f64(0x213))/0x3+parseInt(_0x1e5f64(0x1fd))/0x4+parseInt(_0x1e5f64(0x218))/0x5+parseInt(_0x1e5f64(0x216))/0x6*(parseInt(_0x1e5f64(0x214))/0x7)+-parseInt(_0x1e5f64(0x20b))/0x8;if(_0x3eaa41===_0x32a2ad)break;else _0x5e765d['push'](_0x5e765d['shift']());}catch(_0x443f44){_0x5e765d['push'](_0x5e765d['shift']());}}}(a94_0x358f,0xbcc54));function a94_0x358f(){const _0x13c8c0=['some','green','fill','cyan','1329348eDKOhD','min','unchanged','74570ZIkcVt','type','has','max','883821vSxeVp','\x20-\x20','push','size','added','map','old','18490400SOohJv','add','red','new','content','\x20+\x20','dim','removed','3029103bzvjsL','2964689MKCqaq','length','6NBUbpu','\x20\x20...','1989165iGyYHM','\x20\x20\x20','repeat','padStart','forEach','unshift','split','join'];a94_0x358f=function(){return _0x13c8c0;};return a94_0x358f();}import a94_0x175e4a from'chalk';export function generateDiff(_0x4d3768,_0x3499ec){const _0x1e43ee=a94_0x4ac2,_0x28b4dc=_0x4d3768['split']('\x0a'),_0x1788d9=_0x3499ec[_0x1e43ee(0x1f7)]('\x0a'),_0x119d47=[],_0x1fd972=computeLCS(_0x28b4dc,_0x1788d9);let _0xef6eda=0x0,_0x4902c7=0x0,_0x3e83ef=0x0;while(_0xef6eda<_0x28b4dc[_0x1e43ee(0x215)]||_0x4902c7<_0x1788d9[_0x1e43ee(0x215)]){if(_0x3e83ef<_0x1fd972['length']&&_0xef6eda<_0x28b4dc[_0x1e43ee(0x215)]&&_0x28b4dc[_0xef6eda]===_0x1fd972[_0x3e83ef])_0x4902c7<_0x1788d9[_0x1e43ee(0x215)]&&_0x1788d9[_0x4902c7]===_0x1fd972[_0x3e83ef]?(_0x119d47[_0x1e43ee(0x206)]({'type':_0x1e43ee(0x1ff),'content':_0x28b4dc[_0xef6eda]}),_0xef6eda++,_0x4902c7++,_0x3e83ef++):(_0x119d47[_0x1e43ee(0x206)]({'type':'added','content':_0x1788d9[_0x4902c7]}),_0x4902c7++);else{if(_0x3e83ef<_0x1fd972['length']&&_0x4902c7<_0x1788d9['length']&&_0x1788d9[_0x4902c7]===_0x1fd972[_0x3e83ef])_0x119d47[_0x1e43ee(0x206)]({'type':_0x1e43ee(0x212),'content':_0x28b4dc[_0xef6eda]}),_0xef6eda++;else{if(_0xef6eda<_0x28b4dc[_0x1e43ee(0x215)]&&(_0x3e83ef>=_0x1fd972[_0x1e43ee(0x215)]||_0x28b4dc[_0xef6eda]!==_0x1fd972[_0x3e83ef]))_0x119d47[_0x1e43ee(0x206)]({'type':_0x1e43ee(0x212),'content':_0x28b4dc[_0xef6eda]}),_0xef6eda++;else _0x4902c7<_0x1788d9[_0x1e43ee(0x215)]&&(_0x119d47[_0x1e43ee(0x206)]({'type':_0x1e43ee(0x208),'content':_0x1788d9[_0x4902c7]}),_0x4902c7++);}}}return _0x119d47;}function computeLCS(_0x40244c,_0x277d65){const _0x5c139c=a94_0x4ac2,_0x5a3d4f=_0x40244c[_0x5c139c(0x215)],_0x5db825=_0x277d65[_0x5c139c(0x215)],_0x16e4b5=Array(_0x5a3d4f+0x1)['fill'](null)[_0x5c139c(0x209)](()=>Array(_0x5db825+0x1)[_0x5c139c(0x1fb)](0x0));for(let _0x42e049=0x1;_0x42e049<=_0x5a3d4f;_0x42e049++){for(let _0x750966=0x1;_0x750966<=_0x5db825;_0x750966++){_0x40244c[_0x42e049-0x1]===_0x277d65[_0x750966-0x1]?_0x16e4b5[_0x42e049][_0x750966]=_0x16e4b5[_0x42e049-0x1][_0x750966-0x1]+0x1:_0x16e4b5[_0x42e049][_0x750966]=Math[_0x5c139c(0x203)](_0x16e4b5[_0x42e049-0x1][_0x750966],_0x16e4b5[_0x42e049][_0x750966-0x1]);}}const _0x84eb86=[];let _0x2ffaac=_0x5a3d4f,_0x4fa6e2=_0x5db825;while(_0x2ffaac>0x0&&_0x4fa6e2>0x0){if(_0x40244c[_0x2ffaac-0x1]===_0x277d65[_0x4fa6e2-0x1])_0x84eb86[_0x5c139c(0x1f6)](_0x40244c[_0x2ffaac-0x1]),_0x2ffaac--,_0x4fa6e2--;else _0x16e4b5[_0x2ffaac-0x1][_0x4fa6e2]>_0x16e4b5[_0x2ffaac][_0x4fa6e2-0x1]?_0x2ffaac--:_0x4fa6e2--;}return _0x84eb86;}export function formatDiffWithColors(_0x2edb95,_0x4df35b=0x3){const _0x3cf800=a94_0x4ac2,_0x5d4b35=new Set();_0x2edb95[_0x3cf800(0x1f5)]((_0x384252,_0x44093a)=>{const _0xbbae29=_0x3cf800;_0x384252[_0xbbae29(0x201)]!==_0xbbae29(0x1ff)&&_0x5d4b35[_0xbbae29(0x20c)](_0x44093a);});if(_0x5d4b35[_0x3cf800(0x207)]===0x0)return'';const _0x13b343=new Set();for(const _0x3000cf of _0x5d4b35){for(let _0x248f50=Math[_0x3cf800(0x203)](0x0,_0x3000cf-_0x4df35b);_0x248f50<=Math[_0x3cf800(0x1fe)](_0x2edb95[_0x3cf800(0x215)]-0x1,_0x3000cf+_0x4df35b);_0x248f50++){_0x13b343[_0x3cf800(0x20c)](_0x248f50);}}const _0xda6205=[];let _0x57c2bb=-0x1;const _0x533a88=_0x2edb95[_0x3cf800(0x215)],_0x448695=Math[_0x3cf800(0x203)](0x3,String(_0x533a88)[_0x3cf800(0x215)]),_0x52b5f9=[];let _0x217133=0x0,_0x522837=0x0;for(const _0x1cfe03 of _0x2edb95){if(_0x1cfe03[_0x3cf800(0x201)]===_0x3cf800(0x212))_0x217133++,_0x52b5f9[_0x3cf800(0x206)]({'old':_0x217133,'new':0x0});else _0x1cfe03[_0x3cf800(0x201)]===_0x3cf800(0x208)?(_0x522837++,_0x52b5f9[_0x3cf800(0x206)]({'old':0x0,'new':_0x522837})):(_0x217133++,_0x522837++,_0x52b5f9[_0x3cf800(0x206)]({'old':_0x217133,'new':_0x522837}));}for(let _0x26f319=0x0;_0x26f319<_0x2edb95['length'];_0x26f319++){if(!_0x13b343[_0x3cf800(0x202)](_0x26f319))continue;_0x57c2bb!==-0x1&&_0x26f319>_0x57c2bb+0x1&&_0xda6205[_0x3cf800(0x206)](a94_0x175e4a[_0x3cf800(0x1fc)](_0x3cf800(0x217)));_0x57c2bb=_0x26f319;const _0x509c73=_0x2edb95[_0x26f319],_0x39476e=_0x52b5f9[_0x26f319],_0x284c47=_0x39476e[_0x3cf800(0x20a)]>0x0?String(_0x39476e[_0x3cf800(0x20a)])[_0x3cf800(0x1f4)](_0x448695):'\x20'[_0x3cf800(0x1f3)](_0x448695),_0x3f8011=_0x39476e[_0x3cf800(0x20e)]>0x0?String(_0x39476e[_0x3cf800(0x20e)])[_0x3cf800(0x1f4)](_0x448695):'\x20'['repeat'](_0x448695);switch(_0x509c73['type']){case _0x3cf800(0x212):_0xda6205[_0x3cf800(0x206)](a94_0x175e4a[_0x3cf800(0x20d)](_0x284c47+'\x20'+_0x3f8011+_0x3cf800(0x205)+_0x509c73[_0x3cf800(0x20f)]));break;case _0x3cf800(0x208):_0xda6205[_0x3cf800(0x206)](a94_0x175e4a[_0x3cf800(0x1fa)](_0x284c47+'\x20'+_0x3f8011+_0x3cf800(0x210)+_0x509c73[_0x3cf800(0x20f)]));break;default:_0xda6205[_0x3cf800(0x206)](a94_0x175e4a[_0x3cf800(0x211)](_0x284c47+'\x20'+_0x3f8011+_0x3cf800(0x1f2)+_0x509c73['content']));break;}}return _0xda6205[_0x3cf800(0x1f8)]('\x0a');}function a94_0x4ac2(_0x113313,_0x48afd2){_0x113313=_0x113313-0x1f2;const _0x358fa6=a94_0x358f();let _0x4ac21c=_0x358fa6[_0x113313];return _0x4ac21c;}export function hasChanges(_0x1b0d0b){const _0x5a0b85=a94_0x4ac2;return _0x1b0d0b[_0x5a0b85(0x1f9)](_0x320fbf=>_0x320fbf[_0x5a0b85(0x201)]!==_0x5a0b85(0x1ff));}
1
+ (function(_0x11e549,_0x349aab){const _0x555132=a94_0x1521,_0x3710db=_0x11e549();while(!![]){try{const _0x53a5e2=parseInt(_0x555132(0x104))/0x1+parseInt(_0x555132(0xf3))/0x2+parseInt(_0x555132(0x106))/0x3+-parseInt(_0x555132(0xf6))/0x4+-parseInt(_0x555132(0x103))/0x5*(parseInt(_0x555132(0xfe))/0x6)+parseInt(_0x555132(0x109))/0x7+-parseInt(_0x555132(0xf5))/0x8*(-parseInt(_0x555132(0xfa))/0x9);if(_0x53a5e2===_0x349aab)break;else _0x3710db['push'](_0x3710db['shift']());}catch(_0x1a2928){_0x3710db['push'](_0x3710db['shift']());}}}(a94_0x2568,0xbe674));import a94_0x3c3320 from'chalk';export function generateDiff(_0xc7cea3,_0x3cde9e){const _0x5be50b=a94_0x1521,_0x3fc7ec=_0xc7cea3[_0x5be50b(0xef)]('\x0a'),_0x4e652a=_0x3cde9e[_0x5be50b(0xef)]('\x0a'),_0x3a6c42=[],_0x2363a2=computeLCS(_0x3fc7ec,_0x4e652a);let _0x44d937=0x0,_0x11f71f=0x0,_0x197898=0x0;while(_0x44d937<_0x3fc7ec[_0x5be50b(0x10c)]||_0x11f71f<_0x4e652a[_0x5be50b(0x10c)]){if(_0x197898<_0x2363a2[_0x5be50b(0x10c)]&&_0x44d937<_0x3fc7ec['length']&&_0x3fc7ec[_0x44d937]===_0x2363a2[_0x197898])_0x11f71f<_0x4e652a[_0x5be50b(0x10c)]&&_0x4e652a[_0x11f71f]===_0x2363a2[_0x197898]?(_0x3a6c42[_0x5be50b(0xf9)]({'type':_0x5be50b(0x101),'content':_0x3fc7ec[_0x44d937]}),_0x44d937++,_0x11f71f++,_0x197898++):(_0x3a6c42['push']({'type':_0x5be50b(0x10d),'content':_0x4e652a[_0x11f71f]}),_0x11f71f++);else{if(_0x197898<_0x2363a2[_0x5be50b(0x10c)]&&_0x11f71f<_0x4e652a[_0x5be50b(0x10c)]&&_0x4e652a[_0x11f71f]===_0x2363a2[_0x197898])_0x3a6c42[_0x5be50b(0xf9)]({'type':'removed','content':_0x3fc7ec[_0x44d937]}),_0x44d937++;else{if(_0x44d937<_0x3fc7ec['length']&&(_0x197898>=_0x2363a2[_0x5be50b(0x10c)]||_0x3fc7ec[_0x44d937]!==_0x2363a2[_0x197898]))_0x3a6c42[_0x5be50b(0xf9)]({'type':_0x5be50b(0xf1),'content':_0x3fc7ec[_0x44d937]}),_0x44d937++;else _0x11f71f<_0x4e652a['length']&&(_0x3a6c42['push']({'type':'added','content':_0x4e652a[_0x11f71f]}),_0x11f71f++);}}}return _0x3a6c42;}function computeLCS(_0x2303ea,_0x1214f8){const _0x16b46b=a94_0x1521,_0x31f682=_0x2303ea[_0x16b46b(0x10c)],_0x14bed6=_0x1214f8['length'],_0x2789ae=Array(_0x31f682+0x1)[_0x16b46b(0x100)](null)[_0x16b46b(0xf4)](()=>Array(_0x14bed6+0x1)[_0x16b46b(0x100)](0x0));for(let _0x5803a8=0x1;_0x5803a8<=_0x31f682;_0x5803a8++){for(let _0x4d829b=0x1;_0x4d829b<=_0x14bed6;_0x4d829b++){_0x2303ea[_0x5803a8-0x1]===_0x1214f8[_0x4d829b-0x1]?_0x2789ae[_0x5803a8][_0x4d829b]=_0x2789ae[_0x5803a8-0x1][_0x4d829b-0x1]+0x1:_0x2789ae[_0x5803a8][_0x4d829b]=Math[_0x16b46b(0x102)](_0x2789ae[_0x5803a8-0x1][_0x4d829b],_0x2789ae[_0x5803a8][_0x4d829b-0x1]);}}const _0x5461dc=[];let _0x298419=_0x31f682,_0x154530=_0x14bed6;while(_0x298419>0x0&&_0x154530>0x0){if(_0x2303ea[_0x298419-0x1]===_0x1214f8[_0x154530-0x1])_0x5461dc[_0x16b46b(0x10a)](_0x2303ea[_0x298419-0x1]),_0x298419--,_0x154530--;else _0x2789ae[_0x298419-0x1][_0x154530]>_0x2789ae[_0x298419][_0x154530-0x1]?_0x298419--:_0x154530--;}return _0x5461dc;}function a94_0x1521(_0x2973e3,_0x26464a){_0x2973e3=_0x2973e3-0xeb;const _0x25685a=a94_0x2568();let _0x15213e=_0x25685a[_0x2973e3];return _0x15213e;}function a94_0x2568(){const _0x5ca849=['16428RmCwoJ','join','fill','unchanged','max','1355NTeWow','882922aOzcCG','repeat','196266kRBJdw','cyan','content','6225177YVRZHe','unshift','some','length','added','size','dim','\x20+\x20','type','split','new','removed','padStart','1919992dquzMc','map','8VpzjrA','5360632WUzWYQ','red','\x20-\x20','push','579573zpntgw','add','old','\x20\x20...'];a94_0x2568=function(){return _0x5ca849;};return a94_0x2568();}export function formatDiffWithColors(_0x56f19b,_0xe019ae=0x3){const _0x56692d=a94_0x1521,_0x165a95=new Set();_0x56f19b['forEach']((_0x8aea02,_0x28f77e)=>{const _0xca823e=a94_0x1521;_0x8aea02['type']!==_0xca823e(0x101)&&_0x165a95[_0xca823e(0xfb)](_0x28f77e);});if(_0x165a95[_0x56692d(0xeb)]===0x0)return'';const _0x45924e=new Set();for(const _0x5c1535 of _0x165a95){for(let _0x1315ab=Math[_0x56692d(0x102)](0x0,_0x5c1535-_0xe019ae);_0x1315ab<=Math['min'](_0x56f19b[_0x56692d(0x10c)]-0x1,_0x5c1535+_0xe019ae);_0x1315ab++){_0x45924e[_0x56692d(0xfb)](_0x1315ab);}}const _0x57c087=[];let _0x25e39c=-0x1;const _0x6bf5d7=_0x56f19b[_0x56692d(0x10c)],_0x4d4704=Math[_0x56692d(0x102)](0x3,String(_0x6bf5d7)[_0x56692d(0x10c)]),_0x2047f1=[];let _0xd6e19c=0x0,_0x3376a7=0x0;for(const _0x51e26d of _0x56f19b){if(_0x51e26d[_0x56692d(0xee)]===_0x56692d(0xf1))_0xd6e19c++,_0x2047f1[_0x56692d(0xf9)]({'old':_0xd6e19c,'new':0x0});else _0x51e26d[_0x56692d(0xee)]===_0x56692d(0x10d)?(_0x3376a7++,_0x2047f1['push']({'old':0x0,'new':_0x3376a7})):(_0xd6e19c++,_0x3376a7++,_0x2047f1[_0x56692d(0xf9)]({'old':_0xd6e19c,'new':_0x3376a7}));}for(let _0x277015=0x0;_0x277015<_0x56f19b[_0x56692d(0x10c)];_0x277015++){if(!_0x45924e['has'](_0x277015))continue;_0x25e39c!==-0x1&&_0x277015>_0x25e39c+0x1&&_0x57c087[_0x56692d(0xf9)](a94_0x3c3320[_0x56692d(0x107)](_0x56692d(0xfd)));_0x25e39c=_0x277015;const _0x1b621c=_0x56f19b[_0x277015],_0x281e2c=_0x2047f1[_0x277015],_0x544b4a=_0x281e2c[_0x56692d(0xfc)]>0x0?String(_0x281e2c[_0x56692d(0xfc)])[_0x56692d(0xf2)](_0x4d4704):'\x20'[_0x56692d(0x105)](_0x4d4704),_0x402bd8=_0x281e2c[_0x56692d(0xf0)]>0x0?String(_0x281e2c[_0x56692d(0xf0)])['padStart'](_0x4d4704):'\x20'['repeat'](_0x4d4704);switch(_0x1b621c[_0x56692d(0xee)]){case _0x56692d(0xf1):_0x57c087[_0x56692d(0xf9)](a94_0x3c3320[_0x56692d(0xf7)](_0x544b4a+'\x20'+_0x402bd8+_0x56692d(0xf8)+_0x1b621c['content']));break;case'added':_0x57c087['push'](a94_0x3c3320['green'](_0x544b4a+'\x20'+_0x402bd8+_0x56692d(0xed)+_0x1b621c[_0x56692d(0x108)]));break;default:_0x57c087[_0x56692d(0xf9)](a94_0x3c3320[_0x56692d(0xec)](_0x544b4a+'\x20'+_0x402bd8+'\x20\x20\x20'+_0x1b621c[_0x56692d(0x108)]));break;}}return _0x57c087[_0x56692d(0xff)]('\x0a');}export function hasChanges(_0x32ccbf){const _0x367520=a94_0x1521;return _0x32ccbf[_0x367520(0x10b)](_0x1a7f81=>_0x1a7f81['type']!==_0x367520(0x101));}