@treasuredata/tdx 0.26.0 → 0.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/personalization.js +1 -1
  99. package/dist/sdk/query/index.js +1 -1
  100. package/dist/sdk/query/sql-parser.js +1 -1
  101. package/dist/sdk/realtime.js +1 -1
  102. package/dist/sdk/schedule.js +1 -1
  103. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  104. package/dist/sdk/segment/fields-display.js +1 -1
  105. package/dist/sdk/segment/file-discovery.js +1 -1
  106. package/dist/sdk/segment/journey-utils.js +1 -1
  107. package/dist/sdk/segment/journey-validator.js +1 -1
  108. package/dist/sdk/segment/journey-yaml.js +1 -1
  109. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  110. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  111. package/dist/sdk/segment/pull-workflow.js +1 -1
  112. package/dist/sdk/segment/push-recovery.js +1 -1
  113. package/dist/sdk/segment/push-workflow.js +1 -1
  114. package/dist/sdk/segment/resolution-context.js +1 -1
  115. package/dist/sdk/segment/segment-path-parser.js +1 -1
  116. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  117. package/dist/sdk/segment/target-resolution.js +1 -1
  118. package/dist/sdk/segment/tdx-config.js +1 -1
  119. package/dist/sdk/segment/validate-files.js +1 -1
  120. package/dist/sdk/segment/yaml-validator.js +1 -1
  121. package/dist/sdk/segment.js +1 -1
  122. package/dist/sdk/types/index.js +1 -1
  123. package/dist/sdk/types/progress.js +1 -1
  124. package/dist/sdk/user.js +1 -1
  125. package/dist/sdk/util/format-detector.js +1 -1
  126. package/dist/sdk/util/formatters.js +1 -1
  127. package/dist/sdk/util/index.js +1 -1
  128. package/dist/sdk/util/tree-formatter.js +1 -1
  129. package/dist/sdk/workflow/archive-validation.js +1 -1
  130. package/dist/sdk/workflow/clone-workflow.js +1 -1
  131. package/dist/sdk/workflow/index.js +1 -1
  132. package/dist/sdk/workflow/pull-workflow.js +1 -1
  133. package/dist/sdk/workflow/push-workflow.js +1 -1
  134. package/dist/sdk/workflow/tdx-config.js +1 -1
  135. package/dist/sdk/workflow/workflow-utils.js +1 -1
  136. package/dist/test-utils/command-runner.js +1 -1
  137. package/dist/test-utils/factories.js +1 -1
  138. package/dist/test-utils/fixtures.js +1 -1
  139. package/dist/test-utils/http-mock.js +1 -1
  140. package/dist/test-utils/index.js +1 -1
  141. package/dist/utils/async.js +1 -1
  142. package/dist/utils/colors.js +1 -1
  143. package/dist/utils/diff.js +1 -1
  144. package/dist/utils/file-permissions.js +1 -1
  145. package/dist/utils/global-cache.js +1 -1
  146. package/dist/utils/json-loader.js +1 -1
  147. package/dist/utils/local-cache.d.ts +2 -1
  148. package/dist/utils/local-cache.d.ts.map +1 -1
  149. package/dist/utils/local-cache.js +1 -1
  150. package/dist/utils/local-cache.js.map +1 -1
  151. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  152. package/dist/utils/logger/formatters/index.js +1 -1
  153. package/dist/utils/logger/handlers/console-handler.js +1 -1
  154. package/dist/utils/logger/handlers/file-handler.js +1 -1
  155. package/dist/utils/logger/handlers/index.js +1 -1
  156. package/dist/utils/logger/handlers/null-handler.js +1 -1
  157. package/dist/utils/logger/index.js +1 -1
  158. package/dist/utils/logger/logger.js +1 -1
  159. package/dist/utils/logger/types.js +1 -1
  160. package/dist/utils/option-validation.js +1 -1
  161. package/dist/utils/port.js +1 -1
  162. package/dist/utils/process.js +1 -1
  163. package/dist/utils/prompt.js +1 -1
  164. package/dist/utils/spinner.js +1 -1
  165. package/dist/utils/sse-parser.js +1 -1
  166. package/dist/utils/string-utils.js +1 -1
  167. package/dist/utils/table-ref-parser.js +1 -1
  168. package/dist/utils/tdx-logger.js +1 -1
  169. package/dist/utils/version-check.js +1 -1
  170. package/package.json +1 -1
@@ -1 +1 @@
1
- const a119_0x239210=a119_0x5e52;function a119_0x5e52(_0x3542f1,_0x3defa3){_0x3542f1=_0x3542f1-0x14d;const _0x2fa9bd=a119_0x2fa9();let _0x5e52d6=_0x2fa9bd[_0x3542f1];return _0x5e52d6;}(function(_0x36f579,_0x5b1652){const _0x57168b=a119_0x5e52,_0x5cc8b7=_0x36f579();while(!![]){try{const _0x554619=parseInt(_0x57168b(0x156))/0x1+parseInt(_0x57168b(0x157))/0x2+parseInt(_0x57168b(0x15d))/0x3*(-parseInt(_0x57168b(0x14d))/0x4)+-parseInt(_0x57168b(0x159))/0x5*(parseInt(_0x57168b(0x165))/0x6)+parseInt(_0x57168b(0x14e))/0x7+parseInt(_0x57168b(0x150))/0x8+-parseInt(_0x57168b(0x15e))/0x9;if(_0x554619===_0x5b1652)break;else _0x5cc8b7['push'](_0x5cc8b7['shift']());}catch(_0x136bd8){_0x5cc8b7['push'](_0x5cc8b7['shift']());}}}(a119_0x2fa9,0x6ea0f));import{existsSync,readFileSync}from'fs';import a119_0x21c121 from'path';const TDX_CONFIG_FILE=a119_0x239210(0x15b),SEGMENTS_DIR=a119_0x239210(0x161);export function findTdxConfigPath(_0x551985=process['cwd']()){const _0xf520aa=a119_0x239210;let _0x18c111=a119_0x21c121['resolve'](_0x551985);const _0x15dae8=a119_0x21c121[_0xf520aa(0x151)](_0x18c111)[_0xf520aa(0x162)];while(_0x18c111!==_0x15dae8){const _0x1d9d31=a119_0x21c121[_0xf520aa(0x15c)](_0x18c111,TDX_CONFIG_FILE);if(existsSync(_0x1d9d31))return _0x1d9d31;_0x18c111=a119_0x21c121['dirname'](_0x18c111);}return null;}export function loadTdxConfig(_0x547b94){const _0x22702f=a119_0x239210,_0x4fc3ec=readFileSync(_0x547b94,'utf-8');let _0x8ce043;try{_0x8ce043=JSON[_0x22702f(0x151)](_0x4fc3ec);}catch{throw new Error(_0x22702f(0x160)+_0x547b94);}if(!_0x8ce043||typeof _0x8ce043!=='object')throw new Error(_0x22702f(0x163));const _0x932f89=_0x8ce043;if(!_0x932f89[_0x22702f(0x154)]||typeof _0x932f89['parent_segment']!==_0x22702f(0x15f))throw new Error(_0x22702f(0x14f));return{'parent_segment':_0x932f89[_0x22702f(0x154)]};}export function findTdxConfig(_0x3eb048=process[a119_0x239210(0x153)]()){const _0x4d80c6=findTdxConfigPath(_0x3eb048);if(!_0x4d80c6)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x35de16=loadTdxConfig(_0x4d80c6),_0x26b235=a119_0x21c121['dirname'](_0x4d80c6);return{'config':_0x35de16,'configPath':_0x4d80c6,'configDir':_0x26b235};}export function tryFindTdxConfig(_0x260bbd){try{return findTdxConfig(_0x260bbd);}catch{return null;}}export function getSegmentRootDir(_0xcc48f4,_0xfb0169=process[a119_0x239210(0x153)]()){const _0x4c7825=a119_0x239210;return a119_0x21c121[_0x4c7825(0x15c)](_0xfb0169,SEGMENTS_DIR,_0xcc48f4);}function a119_0x2fa9(){const _0x1ccf28=['cwd','parent_segment','relative','553717wQeSqV','1182688npDVCl','replace','667855AqBUeF','dirname','tdx.json','join','391371aKmdSo','11944692dFvYgl','string','Invalid\x20JSON\x20in\x20','segments','root','Invalid\x20tdx.json:\x20expected\x20object','startsWith','6JRLAIY','4LCLEsE','1319339oCJOmL','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','5686504TcKvzk','parse','resolve'];a119_0x2fa9=function(){return _0x1ccf28;};return a119_0x2fa9();}export function getTdxConfigPath(_0x363ddb,_0x11d735=process[a119_0x239210(0x153)]()){return a119_0x21c121['join'](getSegmentRootDir(_0x363ddb,_0x11d735),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0xf2bd0a,_0x69ff57){const _0xe14fe9=a119_0x239210,_0x3af951=a119_0x21c121[_0xe14fe9(0x152)](_0xf2bd0a),_0x2118c4=a119_0x21c121[_0xe14fe9(0x155)](_0x69ff57,_0x3af951);if(_0x2118c4[_0xe14fe9(0x164)]('..'))return'';return _0x2118c4;}export function localPathToTdFolderPath(_0x53d7d0){const _0x189fb4=a119_0x239210,_0x7909dc=a119_0x21c121[_0x189fb4(0x15a)](_0x53d7d0);if(_0x7909dc==='.'||_0x7909dc==='')return'';return _0x7909dc[_0x189fb4(0x158)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x3f3669,_0x39e4ec){if(!_0x3f3669)return _0x39e4ec;return a119_0x21c121['join'](_0x39e4ec,_0x3f3669);}export function createTdxConfigContent(_0x3b445b){const _0x2256f7={'parent_segment':_0x3b445b};return JSON['stringify'](_0x2256f7,null,0x2)+'\x0a';}
1
+ const a119_0x5ac105=a119_0x5699;(function(_0x1920bf,_0x2483be){const _0x19d48d=a119_0x5699,_0x41a278=_0x1920bf();while(!![]){try{const _0xe94bc3=parseInt(_0x19d48d(0xda))/0x1+parseInt(_0x19d48d(0xe9))/0x2+parseInt(_0x19d48d(0xf2))/0x3*(parseInt(_0x19d48d(0xdb))/0x4)+-parseInt(_0x19d48d(0xee))/0x5*(parseInt(_0x19d48d(0xe5))/0x6)+parseInt(_0x19d48d(0xe1))/0x7+-parseInt(_0x19d48d(0xf1))/0x8+-parseInt(_0x19d48d(0xeb))/0x9;if(_0xe94bc3===_0x2483be)break;else _0x41a278['push'](_0x41a278['shift']());}catch(_0xb7ea22){_0x41a278['push'](_0x41a278['shift']());}}}(a119_0x1acf,0x9a461));import{existsSync,readFileSync}from'fs';import a119_0x2c94c9 from'path';const TDX_CONFIG_FILE=a119_0x5ac105(0xdc),SEGMENTS_DIR=a119_0x5ac105(0xe0);export function findTdxConfigPath(_0x239c37=process[a119_0x5ac105(0xd9)]()){const _0x59980d=a119_0x5ac105;let _0x5e22d0=a119_0x2c94c9['resolve'](_0x239c37);const _0x47aff8=a119_0x2c94c9[_0x59980d(0xea)](_0x5e22d0)['root'];while(_0x5e22d0!==_0x47aff8){const _0x1b9c52=a119_0x2c94c9['join'](_0x5e22d0,TDX_CONFIG_FILE);if(existsSync(_0x1b9c52))return _0x1b9c52;_0x5e22d0=a119_0x2c94c9[_0x59980d(0xe7)](_0x5e22d0);}return null;}export function loadTdxConfig(_0x3240b0){const _0xc5d89f=a119_0x5ac105,_0x196a1c=readFileSync(_0x3240b0,_0xc5d89f(0xe4));let _0x21894b;try{_0x21894b=JSON['parse'](_0x196a1c);}catch{throw new Error(_0xc5d89f(0xef)+_0x3240b0);}if(!_0x21894b||typeof _0x21894b!==_0xc5d89f(0xed))throw new Error(_0xc5d89f(0xdf));const _0x5c7928=_0x21894b;if(!_0x5c7928[_0xc5d89f(0xec)]||typeof _0x5c7928[_0xc5d89f(0xec)]!==_0xc5d89f(0xe2))throw new Error(_0xc5d89f(0xe6));return{'parent_segment':_0x5c7928[_0xc5d89f(0xec)]};}export function findTdxConfig(_0x25c5aa=process['cwd']()){const _0x2f8478=a119_0x5ac105,_0x19b689=findTdxConfigPath(_0x25c5aa);if(!_0x19b689)throw new Error(_0x2f8478(0xe3));const _0x5bf4b8=loadTdxConfig(_0x19b689),_0x11351d=a119_0x2c94c9['dirname'](_0x19b689);return{'config':_0x5bf4b8,'configPath':_0x19b689,'configDir':_0x11351d};}export function tryFindTdxConfig(_0x3c6135){try{return findTdxConfig(_0x3c6135);}catch{return null;}}export function getSegmentRootDir(_0x20a645,_0x1eb45d=process[a119_0x5ac105(0xd9)]()){const _0x3f53bd=a119_0x5ac105;return a119_0x2c94c9[_0x3f53bd(0xde)](_0x1eb45d,SEGMENTS_DIR,_0x20a645);}export function getTdxConfigPath(_0x31405c,_0x199ab8=process[a119_0x5ac105(0xd9)]()){const _0x198efa=a119_0x5ac105;return a119_0x2c94c9[_0x198efa(0xde)](getSegmentRootDir(_0x31405c,_0x199ab8),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3b8972,_0x2d7004){const _0x51256d=a119_0x5ac105,_0x14259c=a119_0x2c94c9[_0x51256d(0xdd)](_0x3b8972),_0x1d0aa6=a119_0x2c94c9[_0x51256d(0xf0)](_0x2d7004,_0x14259c);if(_0x1d0aa6['startsWith']('..'))return'';return _0x1d0aa6;}export function localPathToTdFolderPath(_0x43b380){const _0x4343bf=a119_0x5ac105,_0x5193c9=a119_0x2c94c9[_0x4343bf(0xe7)](_0x43b380);if(_0x5193c9==='.'||_0x5193c9==='')return'';return _0x5193c9[_0x4343bf(0xe8)](/\\/g,'/');}function a119_0x5699(_0x4c13c2,_0x5beaf5){_0x4c13c2=_0x4c13c2-0xd9;const _0x1acfa=a119_0x1acf();let _0x56997e=_0x1acfa[_0x4c13c2];return _0x56997e;}function a119_0x1acf(){const _0x5e0f55=['1176yzktdl','tdx.json','resolve','join','Invalid\x20tdx.json:\x20expected\x20object','segments','3998981QsBTcP','string','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','utf-8','6870750pztYkS','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','dirname','replace','2012590NYMZqQ','parse','12313836kVOEZV','parent_segment','object','5iZkBJI','Invalid\x20JSON\x20in\x20','relative','1696752EOzEBb','6192RqsJrB','cwd','1172934bOOXeK'];a119_0x1acf=function(){return _0x5e0f55;};return a119_0x1acf();}export function tdFolderPathToLocalPath(_0x2a89d7,_0x14bb50){const _0x2d8374=a119_0x5ac105;if(!_0x2a89d7)return _0x14bb50;return a119_0x2c94c9[_0x2d8374(0xde)](_0x14bb50,_0x2a89d7);}export function createTdxConfigContent(_0x27eacd){const _0x29a20a={'parent_segment':_0x27eacd};return JSON['stringify'](_0x29a20a,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a123_0x4cfff1=a123_0x3bd5;function a123_0x3bd5(_0x470b5c,_0x56f7ea){_0x470b5c=_0x470b5c-0x1ce;const _0x10225a=a123_0x1022();let _0x3bd5be=_0x10225a[_0x470b5c];return _0x3bd5be;}(function(_0x5aa202,_0x676f1a){const _0x48adfd=a123_0x3bd5,_0x338ad9=_0x5aa202();while(!![]){try{const _0x204fed=parseInt(_0x48adfd(0x1da))/0x1*(parseInt(_0x48adfd(0x1d5))/0x2)+parseInt(_0x48adfd(0x1cf))/0x3*(-parseInt(_0x48adfd(0x1dc))/0x4)+-parseInt(_0x48adfd(0x1d1))/0x5+-parseInt(_0x48adfd(0x1d6))/0x6*(parseInt(_0x48adfd(0x1d0))/0x7)+-parseInt(_0x48adfd(0x1e3))/0x8*(-parseInt(_0x48adfd(0x1e4))/0x9)+-parseInt(_0x48adfd(0x1d8))/0xa+parseInt(_0x48adfd(0x1d9))/0xb*(parseInt(_0x48adfd(0x1d7))/0xc);if(_0x204fed===_0x676f1a)break;else _0x338ad9['push'](_0x338ad9['shift']());}catch(_0x35f31a){_0x338ad9['push'](_0x338ad9['shift']());}}}(a123_0x1022,0xa8abf));import{readFileSync}from'fs';import*as a123_0x4d227b from'path';import*as a123_0xaac63c from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';export function isJourneyDef(_0xd396d4){const _0x590a19=a123_0x3bd5;return typeof _0xd396d4==='object'&&_0xd396d4!==null&&'type'in _0xd396d4&&_0xd396d4[_0x590a19(0x1e7)]===_0x590a19(0x1ce);}export function isValidationResult(_0xa7fb91){const _0x41e4c7=a123_0x3bd5;return!(_0x41e4c7(0x1d2)in _0xa7fb91);}function a123_0x1022(){const _0xb8d7c1=['warnings','442412xFmXnD','map','result','basename','relative','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','filterType','128fLkVgh','41940oyPdrY','segment','error','type','journey','27FyaAms','6503BvkCmS','435900wniCpu','skipped','message','YAML\x20parse\x20error:\x20','2102hRPAig','5892UHVhFf','30221112fjFTIl','1899410iWBuzm','11cYibvd','269fTgOUD'];a123_0x1022=function(){return _0xb8d7c1;};return a123_0x1022();}export function createParseErrorResult(_0x1fd447,_0x57d1b6,_0x49c7a4,_0x1a608c,_0xed54da=a123_0x4cfff1(0x1e5)){const _0x39da14=a123_0x4cfff1;return{'filePath':_0x1fd447,'relativePath':_0x57d1b6,'source':_0x49c7a4,'result':{'valid':![],'errors':[{'level':_0x39da14(0x1e6),'path':'','code':'YAML_PARSE_ERROR','message':_0x1a608c}],'warnings':[]},'fileType':_0xed54da};}export function validateYamlFile(_0x4a2137,_0x284d9f,_0x56b9c8={}){const _0x23446a=a123_0x4cfff1,_0xca066a=a123_0x4d227b[_0x23446a(0x1e0)](_0x284d9f,_0x4a2137)||a123_0x4d227b[_0x23446a(0x1df)](_0x4a2137);try{const _0x2968bb=readFileSync(_0x4a2137,'utf-8'),_0x1a9e3b=a123_0xaac63c['parseDocument'](_0x2968bb),_0x1150e9=_0x1a9e3b['toJSON']();if(!_0x1150e9)return createParseErrorResult(_0x4a2137,_0xca066a,_0x2968bb,_0x23446a(0x1e1));const _0xcc1093=isJourneyDef(_0x1150e9)?_0x23446a(0x1ce):_0x23446a(0x1e5);if(_0x56b9c8[_0x23446a(0x1e2)]&&_0xcc1093!==_0x56b9c8[_0x23446a(0x1e2)])return{'filePath':_0x4a2137,'relativePath':_0xca066a,'skipped':!![],'reason':'not\x20a\x20'+_0x56b9c8[_0x23446a(0x1e2)]};const _0x5c394d={'source':_0x2968bb,'document':_0x1a9e3b},_0xa1a053=_0xcc1093==='journey'?validateJourneyDef(_0x1150e9,_0x5c394d):validateSegmentDef(_0x1150e9,_0x5c394d);return{'filePath':_0x4a2137,'relativePath':_0xca066a,'source':_0x2968bb,'result':_0xa1a053,'fileType':_0xcc1093};}catch(_0x27c21f){const _0x4b6890=_0x27c21f instanceof Error?_0x27c21f[_0x23446a(0x1d3)]:String(_0x27c21f);return createParseErrorResult(_0x4a2137,_0xca066a,'',_0x23446a(0x1d4)+_0x4b6890);}}export function validateYamlFiles(_0x4bca63,_0x21f960,_0x31262d={}){const _0x4fb524=a123_0x4cfff1;return _0x4bca63[_0x4fb524(0x1dd)](_0x200848=>validateYamlFile(_0x200848,_0x21f960,_0x31262d));}export function calculateSummary(_0x558a11){const _0x2e0b67=a123_0x4cfff1;let _0x34b608=0x0,_0x22e6ba=0x0,_0x86fe51=0x0,_0x34b42e=0x0;for(const _0x34f025 of _0x558a11){if(!isValidationResult(_0x34f025)){_0x34b42e++;continue;}_0x34f025[_0x2e0b67(0x1de)]['valid']?_0x34b608++:_0x22e6ba++,_0x86fe51+=_0x34f025[_0x2e0b67(0x1de)][_0x2e0b67(0x1db)]['length'];}return{'validCount':_0x34b608,'invalidCount':_0x22e6ba,'warningCount':_0x86fe51,'skippedCount':_0x34b42e,'hasErrors':_0x22e6ba>0x0};}
1
+ const a123_0x3e86b8=a123_0x6377;(function(_0x175ca4,_0x4d8869){const _0x457cfe=a123_0x6377,_0x47a73b=_0x175ca4();while(!![]){try{const _0x220aff=-parseInt(_0x457cfe(0x12b))/0x1*(parseInt(_0x457cfe(0x135))/0x2)+-parseInt(_0x457cfe(0x122))/0x3+-parseInt(_0x457cfe(0x12a))/0x4+parseInt(_0x457cfe(0x126))/0x5+parseInt(_0x457cfe(0x131))/0x6+-parseInt(_0x457cfe(0x12f))/0x7*(-parseInt(_0x457cfe(0x137))/0x8)+parseInt(_0x457cfe(0x136))/0x9;if(_0x220aff===_0x4d8869)break;else _0x47a73b['push'](_0x47a73b['shift']());}catch(_0xd7eac6){_0x47a73b['push'](_0x47a73b['shift']());}}}(a123_0x43e9,0xe87e6));import{readFileSync}from'fs';import*as a123_0x27b8fc from'path';import*as a123_0x2badfd from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';export function isJourneyDef(_0x4e32a4){const _0x3d4ea4=a123_0x6377;return typeof _0x4e32a4===_0x3d4ea4(0x12c)&&_0x4e32a4!==null&&'type'in _0x4e32a4&&_0x4e32a4[_0x3d4ea4(0x124)]===_0x3d4ea4(0x132);}export function isValidationResult(_0x537fec){const _0x52d2f0=a123_0x6377;return!(_0x52d2f0(0x12d)in _0x537fec);}export function createParseErrorResult(_0x3c08d9,_0x281723,_0x3472fb,_0x10779f,_0x2d33f9=a123_0x3e86b8(0x129)){return{'filePath':_0x3c08d9,'relativePath':_0x281723,'source':_0x3472fb,'result':{'valid':![],'errors':[{'level':'error','path':'','code':'YAML_PARSE_ERROR','message':_0x10779f}],'warnings':[]},'fileType':_0x2d33f9};}export function validateYamlFile(_0x135bd9,_0x14f0e9,_0x2ab412={}){const _0x52d74c=a123_0x3e86b8,_0x188711=a123_0x27b8fc[_0x52d74c(0x125)](_0x14f0e9,_0x135bd9)||a123_0x27b8fc[_0x52d74c(0x127)](_0x135bd9);try{const _0x4357b0=readFileSync(_0x135bd9,_0x52d74c(0x134)),_0xdb1a4d=a123_0x2badfd[_0x52d74c(0x121)](_0x4357b0),_0x279db7=_0xdb1a4d[_0x52d74c(0x133)]();if(!_0x279db7)return createParseErrorResult(_0x135bd9,_0x188711,_0x4357b0,_0x52d74c(0x123));const _0x21d936=isJourneyDef(_0x279db7)?'journey':'segment';if(_0x2ab412[_0x52d74c(0x11f)]&&_0x21d936!==_0x2ab412[_0x52d74c(0x11f)])return{'filePath':_0x135bd9,'relativePath':_0x188711,'skipped':!![],'reason':_0x52d74c(0x120)+_0x2ab412[_0x52d74c(0x11f)]};const _0x503dce={'source':_0x4357b0,'document':_0xdb1a4d},_0x303485=_0x21d936===_0x52d74c(0x132)?validateJourneyDef(_0x279db7,_0x503dce):validateSegmentDef(_0x279db7,_0x503dce);return{'filePath':_0x135bd9,'relativePath':_0x188711,'source':_0x4357b0,'result':_0x303485,'fileType':_0x21d936};}catch(_0x287f08){const _0xb76482=_0x287f08 instanceof Error?_0x287f08['message']:String(_0x287f08);return createParseErrorResult(_0x135bd9,_0x188711,'',_0x52d74c(0x12e)+_0xb76482);}}export function validateYamlFiles(_0x5a9f6f,_0x185c79,_0x4e4d96={}){const _0x59c7bc=a123_0x3e86b8;return _0x5a9f6f[_0x59c7bc(0x138)](_0x356c70=>validateYamlFile(_0x356c70,_0x185c79,_0x4e4d96));}function a123_0x6377(_0x4e9efc,_0x4c0126){_0x4e9efc=_0x4e9efc-0x11f;const _0x43e9e0=a123_0x43e9();let _0x637710=_0x43e9e0[_0x4e9efc];return _0x637710;}function a123_0x43e9(){const _0x31fe03=['1526892LAafdR','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','type','relative','1434555pHvaVS','basename','warnings','segment','6591120EnOzXC','179Jrkszw','object','skipped','YAML\x20parse\x20error:\x20','31738FOPUDE','length','3268266aORYOt','journey','toJSON','utf-8','16342shtLGN','28192221ZAqVab','1072lTKxFA','map','result','filterType','not\x20a\x20','parseDocument'];a123_0x43e9=function(){return _0x31fe03;};return a123_0x43e9();}export function calculateSummary(_0x191957){const _0x294a76=a123_0x3e86b8;let _0x96442d=0x0,_0x289164=0x0,_0xeeac7f=0x0,_0x4cd4e6=0x0;for(const _0x4bb1ae of _0x191957){if(!isValidationResult(_0x4bb1ae)){_0x4cd4e6++;continue;}_0x4bb1ae[_0x294a76(0x139)]['valid']?_0x96442d++:_0x289164++,_0xeeac7f+=_0x4bb1ae[_0x294a76(0x139)][_0x294a76(0x128)][_0x294a76(0x130)];}return{'validCount':_0x96442d,'invalidCount':_0x289164,'warningCount':_0xeeac7f,'skippedCount':_0x4cd4e6,'hasErrors':_0x289164>0x0};}
@@ -1 +1 @@
1
- const a124_0x5cb29f=a124_0x3ee6;(function(_0x2a4cd4,_0x29948f){const _0x67b51c=a124_0x3ee6,_0x47bca8=_0x2a4cd4();while(!![]){try{const _0x44e8d2=-parseInt(_0x67b51c(0x10f))/0x1*(-parseInt(_0x67b51c(0x12d))/0x2)+parseInt(_0x67b51c(0x105))/0x3+-parseInt(_0x67b51c(0x129))/0x4*(parseInt(_0x67b51c(0x104))/0x5)+-parseInt(_0x67b51c(0xfe))/0x6*(parseInt(_0x67b51c(0x14b))/0x7)+-parseInt(_0x67b51c(0x145))/0x8+-parseInt(_0x67b51c(0x111))/0x9+parseInt(_0x67b51c(0x11f))/0xa*(parseInt(_0x67b51c(0x143))/0xb);if(_0x44e8d2===_0x29948f)break;else _0x47bca8['push'](_0x47bca8['shift']());}catch(_0x2aa741){_0x47bca8['push'](_0x47bca8['shift']());}}}(a124_0x19b3,0x28878));import a124_0x151b3b from'chalk';function a124_0x19b3(){const _0x51a4bc=['Segment\x20name\x20is\x20required','Greater','TimeWithinPast','Less','line','some','Regexp','Rule\x20type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','match','max','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','\x27\x20requires\x20a\x20value','flatMap','6aWEJue','error','Contain','GreaterEqual','aggregation','Behavior','200150SWRsMQ','835212CUhtXf','TimeWithinNext','message','.conditions[','name','IsNull','pop','conditions','level','all','1VFpNUQ','Invalid\x20arrayMatching\x20value.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20atLeast/atMost/exactly.','416376ojyfOO','And','.filter','path','segment','warnings','Value','EndWith','INVALID_RULE_TYPE','EMPTY_ATTRIBUTE','\x20condition\x20must\x20have\x20a\x20segment\x20reference','object','padStart','exactly','736510IXWhoj','value','getIn','Equal','MISSING_OPERATOR_VALUE','attribute','source','length','MISSING_NAME','exclude','4ozFkkC','.value','Operator\x20\x27','include','41780EJKMta','Invalid\x20operator\x20type\x20\x27','contents','dim','\x20|\x20','TimeRange','code','NotEqual','yellow','type','operator','filter','range','MISSING_CONDITIONS','Invalid\x20arrayMatching.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20','isArray','Rule\x20must\x20have\x20a\x20conditions\x20array','.conditions','includes','location','.operator','LessEqual','77sHcVoe','trim','2423488sIgeBp','cyan','document','push','has','.attribute','1817291CiHlCW','.type','join','NotIn','\x20condition\x20must\x20have\x20a\x20conditions\x20array'];a124_0x19b3=function(){return _0x51a4bc;};return a124_0x19b3();}const VALID_OPERATOR_TYPES=new Set([a124_0x5cb29f(0x122),a124_0x5cb29f(0x134),a124_0x5cb29f(0x151),a124_0x5cb29f(0x101),a124_0x5cb29f(0x153),a124_0x5cb29f(0x142),'In',a124_0x5cb29f(0x14e),'Contain','StartWith',a124_0x5cb29f(0x118),a124_0x5cb29f(0x156),a124_0x5cb29f(0x10a),a124_0x5cb29f(0x152),a124_0x5cb29f(0x106),a124_0x5cb29f(0x132),'TimeToday','Between']),OPERATORS_REQUIRING_VALUE=new Set([a124_0x5cb29f(0x122),a124_0x5cb29f(0x134),'Greater',a124_0x5cb29f(0x101),a124_0x5cb29f(0x153),a124_0x5cb29f(0x142),'In',a124_0x5cb29f(0x14e),a124_0x5cb29f(0x100),'StartWith',a124_0x5cb29f(0x118),a124_0x5cb29f(0x156),a124_0x5cb29f(0x152),a124_0x5cb29f(0x106)]),OPERATORS_REQUIRING_UNIT=new Set([a124_0x5cb29f(0x152),'TimeWithinNext']);export function getLocationFromPath(_0x40683e,_0x3a6200,_0x114c0c){const _0x5b8ed1=a124_0x5cb29f;if(!_0x40683e||!_0x3a6200)return undefined;try{let _0x439359=_0x40683e[_0x5b8ed1(0x121)](_0x114c0c,!![]),_0x2640c3=[..._0x114c0c];while((!_0x439359||typeof _0x439359!==_0x5b8ed1(0x11c)||!(_0x5b8ed1(0x139)in _0x439359)||!_0x439359[_0x5b8ed1(0x139)])&&_0x2640c3['length']>0x0){_0x2640c3[_0x5b8ed1(0x10b)](),_0x439359=_0x2640c3[_0x5b8ed1(0x126)]>0x0?_0x40683e[_0x5b8ed1(0x121)](_0x2640c3,!![]):_0x40683e[_0x5b8ed1(0x12f)];}if(!_0x439359||typeof _0x439359!==_0x5b8ed1(0x11c)||!(_0x5b8ed1(0x139)in _0x439359)||!_0x439359['range'])return undefined;const [_0x6dacd6]=_0x439359[_0x5b8ed1(0x139)];return offsetToLocation(_0x3a6200,_0x6dacd6);}catch{return undefined;}}export function offsetToLocation(_0x2a6ccd,_0xcd9d94){const _0x2b9e0e=a124_0x5cb29f;let _0x268215=0x1,_0x4298a4=0x1;for(let _0x3b9c07=0x0;_0x3b9c07<_0xcd9d94&&_0x3b9c07<_0x2a6ccd[_0x2b9e0e(0x126)];_0x3b9c07++){_0x2a6ccd[_0x3b9c07]==='\x0a'?(_0x268215++,_0x4298a4=0x1):_0x4298a4++;}return{'line':_0x268215,'column':_0x4298a4,'offset':_0xcd9d94};}export function pathToArray(_0x174c9b){const _0x4a2950=a124_0x5cb29f;if(!_0x174c9b)return[];return _0x174c9b['split']('.')[_0x4a2950(0xfd)](_0x4c62c7=>{const _0x8bc408=_0x4a2950,_0x176209=_0x4c62c7[_0x8bc408(0x158)](/^(\w+)\[(\d+)\]$/);if(_0x176209)return[_0x176209[0x1],parseInt(_0x176209[0x2],0xa)];return[_0x4c62c7];});}export function validateRuleDef(_0x126ee9,_0x46a2f1,_0x4a3c78){const _0x40bd82=a124_0x5cb29f,_0x2263ad=[];if(!_0x126ee9)return _0x2263ad;_0x126ee9[_0x40bd82(0x136)]!==_0x40bd82(0x112)&&_0x126ee9[_0x40bd82(0x136)]!=='Or'&&_0x2263ad[_0x40bd82(0x148)]({'level':_0x40bd82(0xff),'path':_0x46a2f1+_0x40bd82(0x14c),'code':_0x40bd82(0x119),'message':_0x40bd82(0x157)+_0x126ee9[_0x40bd82(0x136)]+'\x27','location':getLocationFromPath(_0x4a3c78[_0x40bd82(0x147)],_0x4a3c78[_0x40bd82(0x125)],pathToArray(_0x46a2f1+'.type'))});if(!_0x126ee9[_0x40bd82(0x10c)]||!Array['isArray'](_0x126ee9[_0x40bd82(0x10c)]))return _0x2263ad[_0x40bd82(0x148)]({'level':_0x40bd82(0xff),'path':_0x46a2f1+_0x40bd82(0x13e),'code':_0x40bd82(0x13a),'message':_0x40bd82(0x13d),'location':getLocationFromPath(_0x4a3c78['document'],_0x4a3c78[_0x40bd82(0x125)],pathToArray(_0x46a2f1))}),_0x2263ad;for(let _0x2928cf=0x0;_0x2928cf<_0x126ee9['conditions'][_0x40bd82(0x126)];_0x2928cf++){const _0x3ef1e8=_0x126ee9[_0x40bd82(0x10c)][_0x2928cf],_0x3a5faa=_0x46a2f1+'.conditions['+_0x2928cf+']';_0x2263ad[_0x40bd82(0x148)](...validateCondition(_0x3ef1e8,_0x3a5faa,_0x4a3c78));}return _0x2263ad;}function validateCondition(_0x5793dc,_0x39461c,_0x976454){const _0x1a4c00=a124_0x5cb29f,_0x3a7b3e=[];if(!_0x5793dc||typeof _0x5793dc!==_0x1a4c00(0x11c))return _0x3a7b3e;if(_0x5793dc[_0x1a4c00(0x136)]===_0x1a4c00(0x112)||_0x5793dc['type']==='Or'){if(!_0x5793dc[_0x1a4c00(0x10c)]||!Array[_0x1a4c00(0x13c)](_0x5793dc[_0x1a4c00(0x10c)]))_0x3a7b3e[_0x1a4c00(0x148)]({'level':'error','path':_0x39461c+'.conditions','code':_0x1a4c00(0x13a),'message':_0x5793dc[_0x1a4c00(0x136)]+_0x1a4c00(0x14f),'location':getLocationFromPath(_0x976454[_0x1a4c00(0x147)],_0x976454[_0x1a4c00(0x125)],pathToArray(_0x39461c))});else for(let _0x1d86d6=0x0;_0x1d86d6<_0x5793dc[_0x1a4c00(0x10c)][_0x1a4c00(0x126)];_0x1d86d6++){_0x3a7b3e[_0x1a4c00(0x148)](...validateCondition(_0x5793dc['conditions'][_0x1d86d6],_0x39461c+_0x1a4c00(0x108)+_0x1d86d6+']',_0x976454));}return _0x3a7b3e;}if(_0x5793dc[_0x1a4c00(0x136)]===_0x1a4c00(0x12c)||_0x5793dc['type']===_0x1a4c00(0x128))return!_0x5793dc[_0x1a4c00(0x115)]&&_0x3a7b3e['push']({'level':_0x1a4c00(0xff),'path':_0x39461c+'.segment','code':'MISSING_SEGMENT_REFERENCE','message':_0x5793dc[_0x1a4c00(0x136)]+_0x1a4c00(0x11b),'location':getLocationFromPath(_0x976454[_0x1a4c00(0x147)],_0x976454['source'],pathToArray(_0x39461c))}),_0x3a7b3e;if(_0x5793dc[_0x1a4c00(0x136)]===_0x1a4c00(0x117)||_0x5793dc[_0x1a4c00(0x136)]===_0x1a4c00(0x103)){const _0x1b71b5=_0x5793dc,_0x4f3145=_0x1b71b5['source'],_0xe8f8a5=_0x1b71b5[_0x1a4c00(0x102)],_0xe32b86=_0x4f3145||_0xe8f8a5;(!_0x1b71b5[_0x1a4c00(0x124)]||_0x1b71b5[_0x1a4c00(0x124)]==='')&&!_0xe32b86&&_0x3a7b3e[_0x1a4c00(0x148)]({'level':'error','path':_0x39461c+_0x1a4c00(0x14a),'code':_0x1a4c00(0x11a),'message':'Attribute\x20name\x20cannot\x20be\x20empty','location':getLocationFromPath(_0x976454[_0x1a4c00(0x147)],_0x976454[_0x1a4c00(0x125)],pathToArray(_0x39461c+_0x1a4c00(0x14a)))}),_0x1b71b5[_0x1a4c00(0x137)]&&_0x3a7b3e[_0x1a4c00(0x148)](...validateOperator(_0x1b71b5['operator'],_0x39461c+_0x1a4c00(0x141),_0x976454)),_0x1b71b5['arrayMatching']!==undefined&&_0x3a7b3e[_0x1a4c00(0x148)](...validateArrayMatching(_0x1b71b5['arrayMatching'],_0x39461c+'.arrayMatching',_0x976454)),_0x1b71b5['filter']&&_0x3a7b3e['push'](...validateRuleDef(_0x1b71b5[_0x1a4c00(0x138)],_0x39461c+_0x1a4c00(0x113),_0x976454));}return _0x3a7b3e;}function validateOperator(_0x5acf80,_0x1bc38b,_0x24286c){const _0x50ad39=a124_0x5cb29f,_0x4cb1f7=[];if(!VALID_OPERATOR_TYPES[_0x50ad39(0x149)](_0x5acf80[_0x50ad39(0x136)]))return _0x4cb1f7[_0x50ad39(0x148)]({'level':_0x50ad39(0xff),'path':_0x1bc38b+_0x50ad39(0x14c),'code':'INVALID_OPERATOR_TYPE','message':_0x50ad39(0x12e)+_0x5acf80[_0x50ad39(0x136)]+'\x27.\x20Valid\x20types:\x20'+[...VALID_OPERATOR_TYPES][_0x50ad39(0x14d)](',\x20'),'location':getLocationFromPath(_0x24286c[_0x50ad39(0x147)],_0x24286c[_0x50ad39(0x125)],pathToArray(_0x1bc38b+_0x50ad39(0x14c)))}),_0x4cb1f7;return OPERATORS_REQUIRING_VALUE['has'](_0x5acf80[_0x50ad39(0x136)])&&((_0x5acf80[_0x50ad39(0x120)]===undefined||_0x5acf80[_0x50ad39(0x120)]===null)&&_0x4cb1f7[_0x50ad39(0x148)]({'level':_0x50ad39(0xff),'path':_0x1bc38b+_0x50ad39(0x12a),'code':_0x50ad39(0x123),'message':_0x50ad39(0x12b)+_0x5acf80['type']+_0x50ad39(0xfc),'location':getLocationFromPath(_0x24286c[_0x50ad39(0x147)],_0x24286c[_0x50ad39(0x125)],pathToArray(_0x1bc38b))})),_0x5acf80['type']==='Between'&&(_0x5acf80['min']===undefined&&_0x5acf80[_0x50ad39(0x159)]===undefined&&_0x4cb1f7[_0x50ad39(0x148)]({'level':_0x50ad39(0xff),'path':_0x1bc38b,'code':'MISSING_BETWEEN_BOUNDS','message':_0x50ad39(0xfb),'location':getLocationFromPath(_0x24286c[_0x50ad39(0x147)],_0x24286c[_0x50ad39(0x125)],pathToArray(_0x1bc38b))})),OPERATORS_REQUIRING_UNIT['has'](_0x5acf80[_0x50ad39(0x136)])&&(!_0x5acf80['unit']&&_0x5acf80[_0x50ad39(0x120)]!==undefined&&_0x4cb1f7[_0x50ad39(0x148)]({'level':_0x50ad39(0xff),'path':_0x1bc38b+'.unit','code':'MISSING_TIME_UNIT','message':_0x50ad39(0x12b)+_0x5acf80['type']+'\x27\x20requires\x20a\x20time\x20unit','location':getLocationFromPath(_0x24286c[_0x50ad39(0x147)],_0x24286c[_0x50ad39(0x125)],pathToArray(_0x1bc38b))})),_0x4cb1f7;}function a124_0x3ee6(_0x24a2ac,_0x2445d0){_0x24a2ac=_0x24a2ac-0xfb;const _0x19b317=a124_0x19b3();let _0x3ee65d=_0x19b317[_0x24a2ac];return _0x3ee65d;}function validateArrayMatching(_0x4fcede,_0x5bdcfd,_0x306600){const _0x23f01d=a124_0x5cb29f,_0x1dc9a1=[];if(_0x4fcede==='any'||_0x4fcede===_0x23f01d(0x10e))return _0x1dc9a1;if(typeof _0x4fcede===_0x23f01d(0x11c)){const _0x3ee341=Object['keys'](_0x4fcede),_0x1fe02e=['atLeast','atMost',_0x23f01d(0x11e)],_0x2c7cf6=_0x3ee341[_0x23f01d(0x155)](_0x3cdd3b=>_0x1fe02e[_0x23f01d(0x13f)](_0x3cdd3b));!_0x2c7cf6&&_0x1dc9a1[_0x23f01d(0x148)]({'level':_0x23f01d(0xff),'path':_0x5bdcfd,'code':'INVALID_ARRAY_MATCHING','message':_0x23f01d(0x13b)+_0x1fe02e[_0x23f01d(0x14d)]('/')+'.','location':getLocationFromPath(_0x306600['document'],_0x306600[_0x23f01d(0x125)],pathToArray(_0x5bdcfd))});}else _0x1dc9a1['push']({'level':_0x23f01d(0xff),'path':_0x5bdcfd,'code':'INVALID_ARRAY_MATCHING','message':_0x23f01d(0x110),'location':getLocationFromPath(_0x306600[_0x23f01d(0x147)],_0x306600[_0x23f01d(0x125)],pathToArray(_0x5bdcfd))});return _0x1dc9a1;}export function validateSegmentDef(_0x226185,_0x50f5ee={}){const _0x2a81af=a124_0x5cb29f,_0xc79a10=[],_0xe9460e=[];(!_0x226185[_0x2a81af(0x109)]||_0x226185[_0x2a81af(0x109)][_0x2a81af(0x144)]()==='')&&_0xc79a10['push']({'level':_0x2a81af(0xff),'path':_0x2a81af(0x109),'code':_0x2a81af(0x127),'message':_0x2a81af(0x150),'location':getLocationFromPath(_0x50f5ee['document'],_0x50f5ee[_0x2a81af(0x125)],[_0x2a81af(0x109)])});if(_0x226185['rule']){const _0x10d910=validateRuleDef(_0x226185['rule'],'rule',_0x50f5ee);for(const _0x4f112a of _0x10d910){_0x4f112a['level']===_0x2a81af(0xff)?_0xc79a10[_0x2a81af(0x148)](_0x4f112a):_0xe9460e[_0x2a81af(0x148)](_0x4f112a);}}return{'valid':_0xc79a10[_0x2a81af(0x126)]===0x0,'errors':_0xc79a10,'warnings':_0xe9460e};}export function formatIssueWithContext(_0x1c5f29,_0x2bb4c8,_0x59e22a){const _0x498e6b=a124_0x5cb29f,_0x4210cc=[],_0x28ebab=_0x1c5f29[_0x498e6b(0x10d)]==='error',_0x1e1ec6=_0x28ebab?a124_0x151b3b['red']:a124_0x151b3b[_0x498e6b(0x135)],_0x5c5333=_0x28ebab?a124_0x151b3b['red']:a124_0x151b3b[_0x498e6b(0x135)],_0x28ece0=_0x59e22a?a124_0x151b3b[_0x498e6b(0x146)](_0x59e22a+':'):'';if(_0x1c5f29['location']){const _0x26d2c6=a124_0x151b3b['cyan'](_0x1c5f29[_0x498e6b(0x140)][_0x498e6b(0x154)]+':'+_0x1c5f29[_0x498e6b(0x140)]['column']);_0x4210cc[_0x498e6b(0x148)](''+_0x28ece0+_0x26d2c6+':\x20'+_0x1e1ec6(_0x1c5f29[_0x498e6b(0x10d)])+'\x20'+_0x5c5333('['+_0x1c5f29['code']+']'));}else _0x4210cc['push'](''+_0x28ece0+a124_0x151b3b['dim'](_0x1c5f29[_0x498e6b(0x114)])+':\x20'+_0x1e1ec6(_0x1c5f29[_0x498e6b(0x10d)])+'\x20'+_0x5c5333('['+_0x1c5f29[_0x498e6b(0x133)]+']'));_0x4210cc[_0x498e6b(0x148)](_0x1c5f29[_0x498e6b(0x107)]);if(_0x1c5f29[_0x498e6b(0x140)]&&_0x2bb4c8){const _0x408f00=_0x2bb4c8['split']('\x0a'),{line:_0x1c9160,column:_0x101f30}=_0x1c5f29[_0x498e6b(0x140)],_0x3d59b9=Math[_0x498e6b(0x159)](0x1,_0x1c9160-0x1),_0x5222d5=Math['min'](_0x408f00[_0x498e6b(0x126)],_0x1c9160+0x1);_0x4210cc[_0x498e6b(0x148)]('');for(let _0x55af9f=_0x3d59b9;_0x55af9f<=_0x5222d5;_0x55af9f++){const _0x132bd3=_0x408f00[_0x55af9f-0x1]||'',_0x345f28=a124_0x151b3b[_0x498e6b(0x130)](_0x55af9f['toString']()[_0x498e6b(0x11d)](0x4)),_0x58e48a=a124_0x151b3b[_0x498e6b(0x130)](_0x498e6b(0x131));if(_0x55af9f===_0x1c9160){_0x4210cc[_0x498e6b(0x148)]('\x20\x20'+_0x345f28+_0x58e48a+_0x1e1ec6(_0x132bd3));const _0x56cb02='\x20'['repeat'](0x4+0x3+_0x101f30-0x1);_0x4210cc[_0x498e6b(0x148)]('\x20\x20'+_0x56cb02+_0x1e1ec6('^'));}else _0x4210cc['push']('\x20\x20'+_0x345f28+_0x58e48a+a124_0x151b3b[_0x498e6b(0x130)](_0x132bd3));}}return _0x4210cc[_0x498e6b(0x14d)]('\x0a');}export function formatValidationResult(_0x45114a,_0x15cfe3,_0x2f6f4d){const _0x12e061=a124_0x5cb29f,_0x9c312b=[];for(const _0x3c4ffc of _0x45114a['errors']){_0x9c312b[_0x12e061(0x148)](formatIssueWithContext(_0x3c4ffc,_0x15cfe3,_0x2f6f4d)),_0x9c312b[_0x12e061(0x148)]('');}for(const _0x80e260 of _0x45114a[_0x12e061(0x116)]){_0x9c312b[_0x12e061(0x148)](formatIssueWithContext(_0x80e260,_0x15cfe3,_0x2f6f4d)),_0x9c312b['push']('');}return _0x9c312b[_0x12e061(0x14d)]('\x0a');}
1
+ const a124_0x7e0389=a124_0x2f29;(function(_0x5a0093,_0x1b79b2){const _0x1b681c=a124_0x2f29,_0x229872=_0x5a0093();while(!![]){try{const _0x352c56=-parseInt(_0x1b681c(0x120))/0x1+parseInt(_0x1b681c(0xd0))/0x2+-parseInt(_0x1b681c(0x112))/0x3*(-parseInt(_0x1b681c(0x124))/0x4)+parseInt(_0x1b681c(0x110))/0x5+parseInt(_0x1b681c(0xd8))/0x6+-parseInt(_0x1b681c(0xf7))/0x7+-parseInt(_0x1b681c(0x113))/0x8;if(_0x352c56===_0x1b79b2)break;else _0x229872['push'](_0x229872['shift']());}catch(_0x5973b4){_0x229872['push'](_0x229872['shift']());}}}(a124_0x1365,0xa81d7));import a124_0x56729f from'chalk';const VALID_OPERATOR_TYPES=new Set([a124_0x7e0389(0x103),'NotEqual','Greater','GreaterEqual',a124_0x7e0389(0x11c),a124_0x7e0389(0x12a),'In',a124_0x7e0389(0x11e),a124_0x7e0389(0x10c),a124_0x7e0389(0xf1),a124_0x7e0389(0x111),'Regexp',a124_0x7e0389(0x109),a124_0x7e0389(0xe7),a124_0x7e0389(0xfc),a124_0x7e0389(0x121),a124_0x7e0389(0xca),a124_0x7e0389(0x129)]),OPERATORS_REQUIRING_VALUE=new Set([a124_0x7e0389(0x103),a124_0x7e0389(0xd5),a124_0x7e0389(0x101),a124_0x7e0389(0xc7),'Less',a124_0x7e0389(0x12a),'In',a124_0x7e0389(0x11e),'Contain',a124_0x7e0389(0xf1),a124_0x7e0389(0x111),a124_0x7e0389(0xdf),'TimeWithinPast',a124_0x7e0389(0xfc)]),OPERATORS_REQUIRING_UNIT=new Set([a124_0x7e0389(0xe7),a124_0x7e0389(0xfc)]);export function getLocationFromPath(_0x55afee,_0x3bf34b,_0x59a744){const _0x28cc41=a124_0x7e0389;if(!_0x55afee||!_0x3bf34b)return undefined;try{let _0x486078=_0x55afee[_0x28cc41(0x119)](_0x59a744,!![]),_0x518f24=[..._0x59a744];while((!_0x486078||typeof _0x486078!=='object'||!('range'in _0x486078)||!_0x486078['range'])&&_0x518f24[_0x28cc41(0x126)]>0x0){_0x518f24[_0x28cc41(0xd2)](),_0x486078=_0x518f24[_0x28cc41(0x126)]>0x0?_0x55afee['getIn'](_0x518f24,!![]):_0x55afee[_0x28cc41(0x10b)];}if(!_0x486078||typeof _0x486078!=='object'||!('range'in _0x486078)||!_0x486078[_0x28cc41(0xcc)])return undefined;const [_0x3b8225]=_0x486078['range'];return offsetToLocation(_0x3bf34b,_0x3b8225);}catch{return undefined;}}function a124_0x2f29(_0x1fd622,_0x244b9b){_0x1fd622=_0x1fd622-0xc0;const _0x136566=a124_0x1365();let _0x2f292d=_0x136566[_0x1fd622];return _0x2f292d;}export function offsetToLocation(_0x3eeb15,_0x1616b8){const _0x1409a1=a124_0x7e0389;let _0xa9e05a=0x1,_0x45c364=0x1;for(let _0xdc41f7=0x0;_0xdc41f7<_0x1616b8&&_0xdc41f7<_0x3eeb15[_0x1409a1(0x126)];_0xdc41f7++){_0x3eeb15[_0xdc41f7]==='\x0a'?(_0xa9e05a++,_0x45c364=0x1):_0x45c364++;}return{'line':_0xa9e05a,'column':_0x45c364,'offset':_0x1616b8};}export function pathToArray(_0x2efdff){const _0x5137b5=a124_0x7e0389;if(!_0x2efdff)return[];return _0x2efdff[_0x5137b5(0x122)]('.')[_0x5137b5(0xe6)](_0x1de864=>{const _0x54bdcb=_0x5137b5,_0x499399=_0x1de864[_0x54bdcb(0xc5)](/^(\w+)\[(\d+)\]$/);if(_0x499399)return[_0x499399[0x1],parseInt(_0x499399[0x2],0xa)];return[_0x1de864];});}function a124_0x1365(){const _0x5e45e6=['yellow','message','Value','Greater','.type','Equal','Behavior','warnings','push','operator','MISSING_SEGMENT_REFERENCE','IsNull','.attribute','contents','Contain','.filter','segment','And','5844925VivRUI','EndWith','192BukXOe','14043976LXeJeP','unit','dim','object','.operator','cyan','getIn','.unit','includes','Less','error','NotIn','Invalid\x20operator\x20type\x20\x27','616460ZeBwSN','TimeRange','split','errors','61768DEFmki','value','length','MISSING_NAME','line','Between','LessEqual','trim','Segment\x20name\x20is\x20required','\x20condition\x20must\x20have\x20a\x20segment\x20reference','MISSING_CONDITIONS','isArray','level','any','match','.arrayMatching','GreaterEqual','exactly','MISSING_OPERATOR_VALUE','TimeToday','\x27\x20requires\x20a\x20time\x20unit','range','filter','Rule\x20must\x20have\x20a\x20conditions\x20array','min','855116GdlWiR','MISSING_BETWEEN_BOUNDS','pop','aggregation','name','NotEqual','Rule\x20type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','join','6394422Asfjer','\x27.\x20Valid\x20types:\x20','all','conditions','repeat','.value','.conditions[','Regexp','some','Operator\x20\x27','Invalid\x20arrayMatching.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20','atMost','has','exclude','flatMap','TimeWithinPast','MISSING_TIME_UNIT','red','.segment','max','source','arrayMatching','type','code','.conditions','StartWith','attribute','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','rule','Invalid\x20arrayMatching\x20value.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20atLeast/atMost/exactly.','document','4130084onDMVR','location','column','Attribute\x20name\x20cannot\x20be\x20empty','INVALID_ARRAY_MATCHING','TimeWithinNext','\x27\x20requires\x20a\x20value'];a124_0x1365=function(){return _0x5e45e6;};return a124_0x1365();}export function validateRuleDef(_0x132565,_0x31a248,_0x52c292){const _0x2d1587=a124_0x7e0389,_0x4a13b2=[];if(!_0x132565)return _0x4a13b2;_0x132565[_0x2d1587(0xee)]!==_0x2d1587(0x10f)&&_0x132565['type']!=='Or'&&_0x4a13b2[_0x2d1587(0x106)]({'level':_0x2d1587(0x11d),'path':_0x31a248+'.type','code':'INVALID_RULE_TYPE','message':_0x2d1587(0xd6)+_0x132565['type']+'\x27','location':getLocationFromPath(_0x52c292[_0x2d1587(0xf6)],_0x52c292[_0x2d1587(0xec)],pathToArray(_0x31a248+_0x2d1587(0x102)))});if(!_0x132565['conditions']||!Array[_0x2d1587(0xc2)](_0x132565[_0x2d1587(0xdb)]))return _0x4a13b2[_0x2d1587(0x106)]({'level':_0x2d1587(0x11d),'path':_0x31a248+_0x2d1587(0xf0),'code':_0x2d1587(0xc1),'message':_0x2d1587(0xce),'location':getLocationFromPath(_0x52c292[_0x2d1587(0xf6)],_0x52c292['source'],pathToArray(_0x31a248))}),_0x4a13b2;for(let _0x4745f8=0x0;_0x4745f8<_0x132565[_0x2d1587(0xdb)][_0x2d1587(0x126)];_0x4745f8++){const _0x40f396=_0x132565['conditions'][_0x4745f8],_0x2d3e9c=_0x31a248+'.conditions['+_0x4745f8+']';_0x4a13b2[_0x2d1587(0x106)](...validateCondition(_0x40f396,_0x2d3e9c,_0x52c292));}return _0x4a13b2;}function validateCondition(_0x13f384,_0x274236,_0x183a83){const _0x2ad596=a124_0x7e0389,_0x13b5e8=[];if(!_0x13f384||typeof _0x13f384!==_0x2ad596(0x116))return _0x13b5e8;if(_0x13f384[_0x2ad596(0xee)]===_0x2ad596(0x10f)||_0x13f384['type']==='Or'){if(!_0x13f384[_0x2ad596(0xdb)]||!Array['isArray'](_0x13f384['conditions']))_0x13b5e8[_0x2ad596(0x106)]({'level':_0x2ad596(0x11d),'path':_0x274236+_0x2ad596(0xf0),'code':'MISSING_CONDITIONS','message':_0x13f384[_0x2ad596(0xee)]+'\x20condition\x20must\x20have\x20a\x20conditions\x20array','location':getLocationFromPath(_0x183a83[_0x2ad596(0xf6)],_0x183a83[_0x2ad596(0xec)],pathToArray(_0x274236))});else for(let _0x2914d8=0x0;_0x2914d8<_0x13f384[_0x2ad596(0xdb)][_0x2ad596(0x126)];_0x2914d8++){_0x13b5e8['push'](...validateCondition(_0x13f384[_0x2ad596(0xdb)][_0x2914d8],_0x274236+_0x2ad596(0xde)+_0x2914d8+']',_0x183a83));}return _0x13b5e8;}if(_0x13f384[_0x2ad596(0xee)]==='include'||_0x13f384[_0x2ad596(0xee)]===_0x2ad596(0xe5))return!_0x13f384[_0x2ad596(0x10e)]&&_0x13b5e8[_0x2ad596(0x106)]({'level':_0x2ad596(0x11d),'path':_0x274236+_0x2ad596(0xea),'code':_0x2ad596(0x108),'message':_0x13f384['type']+_0x2ad596(0xc0),'location':getLocationFromPath(_0x183a83[_0x2ad596(0xf6)],_0x183a83[_0x2ad596(0xec)],pathToArray(_0x274236))}),_0x13b5e8;if(_0x13f384[_0x2ad596(0xee)]===_0x2ad596(0x100)||_0x13f384['type']===_0x2ad596(0x104)){const _0x4d051a=_0x13f384,_0x5994ac=_0x4d051a[_0x2ad596(0xec)],_0x15b31d=_0x4d051a[_0x2ad596(0xd3)],_0x426a3f=_0x5994ac||_0x15b31d;(!_0x4d051a[_0x2ad596(0xf2)]||_0x4d051a[_0x2ad596(0xf2)]==='')&&!_0x426a3f&&_0x13b5e8['push']({'level':_0x2ad596(0x11d),'path':_0x274236+'.attribute','code':'EMPTY_ATTRIBUTE','message':_0x2ad596(0xfa),'location':getLocationFromPath(_0x183a83[_0x2ad596(0xf6)],_0x183a83[_0x2ad596(0xec)],pathToArray(_0x274236+_0x2ad596(0x10a)))}),_0x4d051a[_0x2ad596(0x107)]&&_0x13b5e8[_0x2ad596(0x106)](...validateOperator(_0x4d051a[_0x2ad596(0x107)],_0x274236+_0x2ad596(0x117),_0x183a83)),_0x4d051a['arrayMatching']!==undefined&&_0x13b5e8[_0x2ad596(0x106)](...validateArrayMatching(_0x4d051a[_0x2ad596(0xed)],_0x274236+_0x2ad596(0xc6),_0x183a83)),_0x4d051a[_0x2ad596(0xcd)]&&_0x13b5e8[_0x2ad596(0x106)](...validateRuleDef(_0x4d051a['filter'],_0x274236+_0x2ad596(0x10d),_0x183a83));}return _0x13b5e8;}function validateOperator(_0x4cc339,_0x2e01c1,_0x294a66){const _0x16f253=a124_0x7e0389,_0x158367=[];if(!VALID_OPERATOR_TYPES[_0x16f253(0xe4)](_0x4cc339[_0x16f253(0xee)]))return _0x158367[_0x16f253(0x106)]({'level':'error','path':_0x2e01c1+_0x16f253(0x102),'code':'INVALID_OPERATOR_TYPE','message':_0x16f253(0x11f)+_0x4cc339['type']+_0x16f253(0xd9)+[...VALID_OPERATOR_TYPES]['join'](',\x20'),'location':getLocationFromPath(_0x294a66[_0x16f253(0xf6)],_0x294a66['source'],pathToArray(_0x2e01c1+'.type'))}),_0x158367;return OPERATORS_REQUIRING_VALUE[_0x16f253(0xe4)](_0x4cc339['type'])&&((_0x4cc339[_0x16f253(0x125)]===undefined||_0x4cc339['value']===null)&&_0x158367[_0x16f253(0x106)]({'level':'error','path':_0x2e01c1+_0x16f253(0xdd),'code':_0x16f253(0xc9),'message':_0x16f253(0xe1)+_0x4cc339[_0x16f253(0xee)]+_0x16f253(0xfd),'location':getLocationFromPath(_0x294a66['document'],_0x294a66[_0x16f253(0xec)],pathToArray(_0x2e01c1))})),_0x4cc339[_0x16f253(0xee)]===_0x16f253(0x129)&&(_0x4cc339[_0x16f253(0xcf)]===undefined&&_0x4cc339[_0x16f253(0xeb)]===undefined&&_0x158367[_0x16f253(0x106)]({'level':_0x16f253(0x11d),'path':_0x2e01c1,'code':_0x16f253(0xd1),'message':_0x16f253(0xf3),'location':getLocationFromPath(_0x294a66['document'],_0x294a66[_0x16f253(0xec)],pathToArray(_0x2e01c1))})),OPERATORS_REQUIRING_UNIT[_0x16f253(0xe4)](_0x4cc339['type'])&&(!_0x4cc339[_0x16f253(0x114)]&&_0x4cc339[_0x16f253(0x125)]!==undefined&&_0x158367[_0x16f253(0x106)]({'level':_0x16f253(0x11d),'path':_0x2e01c1+_0x16f253(0x11a),'code':_0x16f253(0xe8),'message':_0x16f253(0xe1)+_0x4cc339[_0x16f253(0xee)]+_0x16f253(0xcb),'location':getLocationFromPath(_0x294a66[_0x16f253(0xf6)],_0x294a66[_0x16f253(0xec)],pathToArray(_0x2e01c1))})),_0x158367;}function validateArrayMatching(_0x290d7b,_0x4a3cb2,_0x3be02e){const _0x4570e7=a124_0x7e0389,_0x23cdcd=[];if(_0x290d7b===_0x4570e7(0xc4)||_0x290d7b===_0x4570e7(0xda))return _0x23cdcd;if(typeof _0x290d7b==='object'){const _0x5a38aa=Object['keys'](_0x290d7b),_0x52131d=['atLeast',_0x4570e7(0xe3),_0x4570e7(0xc8)],_0x57b434=_0x5a38aa[_0x4570e7(0xe0)](_0x280e8a=>_0x52131d[_0x4570e7(0x11b)](_0x280e8a));!_0x57b434&&_0x23cdcd[_0x4570e7(0x106)]({'level':_0x4570e7(0x11d),'path':_0x4a3cb2,'code':_0x4570e7(0xfb),'message':_0x4570e7(0xe2)+_0x52131d['join']('/')+'.','location':getLocationFromPath(_0x3be02e[_0x4570e7(0xf6)],_0x3be02e[_0x4570e7(0xec)],pathToArray(_0x4a3cb2))});}else _0x23cdcd[_0x4570e7(0x106)]({'level':_0x4570e7(0x11d),'path':_0x4a3cb2,'code':_0x4570e7(0xfb),'message':_0x4570e7(0xf5),'location':getLocationFromPath(_0x3be02e[_0x4570e7(0xf6)],_0x3be02e[_0x4570e7(0xec)],pathToArray(_0x4a3cb2))});return _0x23cdcd;}export function validateSegmentDef(_0x22d2d6,_0x37b621={}){const _0x4a7083=a124_0x7e0389,_0x18b8c4=[],_0x497e8b=[];(!_0x22d2d6[_0x4a7083(0xd4)]||_0x22d2d6[_0x4a7083(0xd4)][_0x4a7083(0x12b)]()==='')&&_0x18b8c4[_0x4a7083(0x106)]({'level':_0x4a7083(0x11d),'path':_0x4a7083(0xd4),'code':_0x4a7083(0x127),'message':_0x4a7083(0x12c),'location':getLocationFromPath(_0x37b621['document'],_0x37b621[_0x4a7083(0xec)],[_0x4a7083(0xd4)])});if(_0x22d2d6[_0x4a7083(0xf4)]){const _0x4b553f=validateRuleDef(_0x22d2d6[_0x4a7083(0xf4)],_0x4a7083(0xf4),_0x37b621);for(const _0x748cfc of _0x4b553f){_0x748cfc[_0x4a7083(0xc3)]==='error'?_0x18b8c4[_0x4a7083(0x106)](_0x748cfc):_0x497e8b[_0x4a7083(0x106)](_0x748cfc);}}return{'valid':_0x18b8c4['length']===0x0,'errors':_0x18b8c4,'warnings':_0x497e8b};}export function formatIssueWithContext(_0x1d6025,_0x44c836,_0x41e92e){const _0x21b478=a124_0x7e0389,_0x3fd83b=[],_0x2f2a96=_0x1d6025['level']===_0x21b478(0x11d),_0x36f6ab=_0x2f2a96?a124_0x56729f['red']:a124_0x56729f[_0x21b478(0xfe)],_0x4a46c1=_0x2f2a96?a124_0x56729f[_0x21b478(0xe9)]:a124_0x56729f[_0x21b478(0xfe)],_0x2fe78d=_0x41e92e?a124_0x56729f[_0x21b478(0x118)](_0x41e92e+':'):'';if(_0x1d6025[_0x21b478(0xf8)]){const _0x137a9f=a124_0x56729f['cyan'](_0x1d6025[_0x21b478(0xf8)][_0x21b478(0x128)]+':'+_0x1d6025[_0x21b478(0xf8)][_0x21b478(0xf9)]);_0x3fd83b[_0x21b478(0x106)](''+_0x2fe78d+_0x137a9f+':\x20'+_0x36f6ab(_0x1d6025[_0x21b478(0xc3)])+'\x20'+_0x4a46c1('['+_0x1d6025[_0x21b478(0xef)]+']'));}else _0x3fd83b['push'](''+_0x2fe78d+a124_0x56729f['dim'](_0x1d6025['path'])+':\x20'+_0x36f6ab(_0x1d6025[_0x21b478(0xc3)])+'\x20'+_0x4a46c1('['+_0x1d6025[_0x21b478(0xef)]+']'));_0x3fd83b['push'](_0x1d6025[_0x21b478(0xff)]);if(_0x1d6025[_0x21b478(0xf8)]&&_0x44c836){const _0x3a71f8=_0x44c836[_0x21b478(0x122)]('\x0a'),{line:_0x366729,column:_0x329aab}=_0x1d6025['location'],_0x84ced=Math[_0x21b478(0xeb)](0x1,_0x366729-0x1),_0x697568=Math[_0x21b478(0xcf)](_0x3a71f8[_0x21b478(0x126)],_0x366729+0x1);_0x3fd83b['push']('');for(let _0x2994a6=_0x84ced;_0x2994a6<=_0x697568;_0x2994a6++){const _0x12eef4=_0x3a71f8[_0x2994a6-0x1]||'',_0x5777dd=a124_0x56729f[_0x21b478(0x115)](_0x2994a6['toString']()['padStart'](0x4)),_0x5afb4c=a124_0x56729f[_0x21b478(0x115)]('\x20|\x20');if(_0x2994a6===_0x366729){_0x3fd83b[_0x21b478(0x106)]('\x20\x20'+_0x5777dd+_0x5afb4c+_0x36f6ab(_0x12eef4));const _0x41b52d='\x20'[_0x21b478(0xdc)](0x4+0x3+_0x329aab-0x1);_0x3fd83b[_0x21b478(0x106)]('\x20\x20'+_0x41b52d+_0x36f6ab('^'));}else _0x3fd83b[_0x21b478(0x106)]('\x20\x20'+_0x5777dd+_0x5afb4c+a124_0x56729f[_0x21b478(0x115)](_0x12eef4));}}return _0x3fd83b['join']('\x0a');}export function formatValidationResult(_0x43a970,_0x462719,_0x36bdbf){const _0x26c455=a124_0x7e0389,_0x2f7d15=[];for(const _0x2a50a3 of _0x43a970[_0x26c455(0x123)]){_0x2f7d15['push'](formatIssueWithContext(_0x2a50a3,_0x462719,_0x36bdbf)),_0x2f7d15[_0x26c455(0x106)]('');}for(const _0x47543a of _0x43a970[_0x26c455(0x105)]){_0x2f7d15[_0x26c455(0x106)](formatIssueWithContext(_0x47543a,_0x462719,_0x36bdbf)),_0x2f7d15[_0x26c455(0x106)]('');}return _0x2f7d15[_0x26c455(0xd7)]('\x0a');}
@@ -1 +1 @@
1
- const a125_0x4d692b=a125_0x2d63;(function(_0x1668eb,_0x47e4dd){const _0x11e4a9=a125_0x2d63,_0x2787a8=_0x1668eb();while(!![]){try{const _0x2ddc41=parseInt(_0x11e4a9(0x1c8))/0x1*(-parseInt(_0x11e4a9(0x143))/0x2)+parseInt(_0x11e4a9(0x1cd))/0x3*(parseInt(_0x11e4a9(0x167))/0x4)+-parseInt(_0x11e4a9(0x147))/0x5*(-parseInt(_0x11e4a9(0x16f))/0x6)+-parseInt(_0x11e4a9(0x1d2))/0x7*(parseInt(_0x11e4a9(0x12b))/0x8)+parseInt(_0x11e4a9(0x142))/0x9*(-parseInt(_0x11e4a9(0x1d5))/0xa)+parseInt(_0x11e4a9(0x1f4))/0xb*(parseInt(_0x11e4a9(0x1d1))/0xc)+-parseInt(_0x11e4a9(0x128))/0xd*(-parseInt(_0x11e4a9(0x165))/0xe);if(_0x2ddc41===_0x47e4dd)break;else _0x2787a8['push'](_0x2787a8['shift']());}catch(_0x1ddf4b){_0x2787a8['push'](_0x2787a8['shift']());}}}(a125_0x522c,0x58bdd));import{CDPApiClient}from'./client/cdp-api-client.js';import{TrinoApiClient}from'./client/trino-api-client.js';import{SDKError,ErrorCode}from'./errors.js';import{deduplicateJourneysByBundle,entityToJourneyListItem,parseJourneyState}from'./journey.js';import{parsePath}from'./segment/segment-path-parser.js';function a125_0x522c(){const _0x118851=['state','folder','set','\x27\x20not\x20found\x20in\x20parent\x20segment','Master\x20table:\x20','resolveFolderId','list','Fetching\x20master\x20sample\x20data...','listOutputTables','updatedAt','trigger_event','getEntityParentFolderId','Enriched\x20query:\x20','description','table','Segment\x20\x27','error','realtime','entityToFolder','\x20in\x20parent\x20','runParent','has','getTdxInstance','parentDatabaseName','join','realtimeDefToConfig','parent\x20segment','segment-realtime','segmentFolderId','personalizationServices','25pvYhIy','eventTables','Fetching\x20sample\x20data\x20for:\x20','validateParentYaml','RT\x20event\x20\x27','681CYzKpr','parentFolder','parent_key','batch_segments','12rrObDW','7eLktnM','isArray','versionNumber','132920vhJLQm','journey','getSegmentEntity','rootFolderId','resolvePathToResource','deleteActivation','source','Path\x20cannot\x20be\x20empty','\x27\x20not\x20found\x20in\x20','some','isEnabled','ambiguous','schema','connection','total_events','validateRealtimeConfig','buildTreeFromEntities','segment-batch','Child\x20segment\x20not\x20found:\x20','totalEvents','slice','customerPercent','name','Personalization\x20services\x20fetch\x20failed\x20for\x20parent\x20segment\x20','getBehaviorNames','schemaError','events','split','createJourneySegment','attributes','client','5805173uILTBE','segment','createParent','sourceTableError','allValid','database','personalization_services','createActivation','get','detectResourceTypeInFolder','208yzpQOG','pullParentYaml','buildTreeNodesForFolder','3346136VAfSTH','getActivation','debug','syncPersonalizationServices','entity','groupingName','onProgress','sampleData','single','getOutputDatabaseName','updateSegmentById','updateParent','column','all','listSegments','\x27\x20not\x20found\x20in\x20path','parent','createdAt','find','map','behaviors','delete','Validating\x20attribute:\x20','126Ekjyxy','54680yiwyxG','push','personalization','getSegment','8825VPqUyq','listFolders','resolveParentIdOrName','source_table','schemaValid','child_key','customers_with_events','catch','stitching_keys','getParentSegmentSQL','Validating\x20all\x20attributes\x20in\x20parallel...','createParentSegment','journeyBundleId','entityToSegment','customers','matched_count','enriched','pullSegments','Calculating\x20coverage\x20for:\x20','string','listParents','relationships','filter','id_stitching','isAbsolute','type','tdx.sdk.segment','getAudienceBehaviors','enrichDefWithRealtimeAndPersonalization','includes','536508ABDBAE','master','6040dpzagE','updateActivation','data','getParentFull','parentTableName','listActivations','getSegmentFolder','Folder\x20\x27','570DgCoOB','Parent\x20segment\x20not\x20found:\x20','population','Fetching\x20enriched\x20master\x20data...','attribute','idStitching','resolveParentId','Table','journeyBundleName','createSegmentFolder','keyColumns','Validating\x20behavior:\x20','updateSegment','getAudienceAttributes','createSegment','Counting\x20master\x20table\x20rows...','then','batchAttributes','SEGMENT_NOT_FOUND','Validating\x20all\x20behaviors\x20in\x20parallel...','sourceTableValid','criteria','customersWithEvents','Folder\x20not\x20found:\x20','sections','matchedCount','update','\x27\x20not\x20found','deleteSegment','source_field','previewParentYaml','getParent','primary_key','listRecursive','runParentSegment','Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...','rowCount','Resource\x20\x27','Attribute\x20\x27','trinoClient','ordered_set','parentColumn','behavior','counter','\x27:\x20','Validating\x20RT\x20event\x20source\x20tables...','resolveSegmentId','getSegmentSQL','length','message','Behavior\x20\x27','listEntitiesByFolder','_tdxInstance','parentFolderId','INVALID_ARGUMENT','executeQuery','listParentSegments','test','folder-segment'];a125_0x522c=function(){return _0x118851;};return a125_0x522c();}import{pullSegments as a125_0x501011}from'./segment/pull-workflow.js';import{apiToDef,defToApi,serializeDef,parseDef}from'./segment/parent-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';function a125_0x2d63(_0x37ab0b,_0x22d98e){_0x37ab0b=_0x37ab0b-0x128;const _0x522c23=a125_0x522c();let _0x2d6383=_0x522c23[_0x37ab0b];return _0x2d6383;}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';import{Logger}from'../utils/logger/index.js';const logger=Logger['of'](a125_0x4d692b(0x161));export class SegmentSDK{['client'];['trinoClient'];constructor(_0x45f271){const _0x4dd691=a125_0x4d692b;this[_0x4dd691(0x1f3)]=new CDPApiClient(_0x45f271),this[_0x4dd691(0x196)]=new TrinoApiClient(_0x45f271);}async[a125_0x4d692b(0x15b)](){const _0x398eca=a125_0x4d692b;return await this[_0x398eca(0x1f3)][_0x398eca(0x1a7)]();}async[a125_0x4d692b(0x18e)](_0x19cc7b){const _0x32b783=a125_0x4d692b;return await this[_0x32b783(0x1f3)]['getParentSegment'](_0x19cc7b);}async[a125_0x4d692b(0x139)](_0x4c9861){const _0x2d6cce=a125_0x4d692b;return await this[_0x2d6cce(0x1f3)]['listSegments'](_0x4c9861);}async[a125_0x4d692b(0x146)](_0x2bab65,_0x5a8b02){const _0x20bcbb=a125_0x4d692b;return await this[_0x20bcbb(0x1f3)][_0x20bcbb(0x146)](_0x2bab65,_0x5a8b02);}async[a125_0x4d692b(0x1d7)](_0x106846){const _0x39a10e=a125_0x4d692b;return await this[_0x39a10e(0x1f3)][_0x39a10e(0x1d7)](_0x106846);}async[a125_0x4d692b(0x148)](_0x4f2a55){const _0x5bfc5e=a125_0x4d692b;return await this[_0x5bfc5e(0x1f3)]['listSegmentFolders'](_0x4f2a55);}async['getFolder'](_0x4a2c7c){const _0x457f7d=a125_0x4d692b;return await this[_0x457f7d(0x1f3)][_0x457f7d(0x16d)](_0x4a2c7c);}async[a125_0x4d692b(0x16c)](_0x1bf829,_0x592090){const _0x42b70=a125_0x4d692b;return await this[_0x42b70(0x1f3)][_0x42b70(0x16c)](_0x1bf829,_0x592090);}async['getActivation'](_0x548ce4,_0x2c9933,_0x5e13d3){const _0x293214=a125_0x4d692b;return await this['client'][_0x293214(0x12c)](_0x548ce4,_0x2c9933,_0x5e13d3);}async[a125_0x4d692b(0x1fb)](_0x36a61d,_0x51c650,_0x16a7af){const _0x382a62=a125_0x4d692b;return await this[_0x382a62(0x1f3)][_0x382a62(0x1fb)](_0x36a61d,_0x51c650,_0x16a7af);}async[a125_0x4d692b(0x168)](_0x1ce156,_0x2b129e,_0x7cd1be,_0xacc532){const _0x25983e=a125_0x4d692b;return await this[_0x25983e(0x1f3)][_0x25983e(0x168)](_0x1ce156,_0x2b129e,_0x7cd1be,_0xacc532);}async['deleteActivation'](_0x541df3,_0x46f5b1,_0x4d8b12){const _0xb3d903=a125_0x4d692b;return await this[_0xb3d903(0x1f3)][_0xb3d903(0x1da)](_0x541df3,_0x46f5b1,_0x4d8b12);}async['getParentSQL'](_0x50ef79){const _0x5a6cc3=a125_0x4d692b;return await this[_0x5a6cc3(0x1f3)][_0x5a6cc3(0x150)](_0x50ef79);}['getOutputDatabaseName'](_0xe345f5){return'cdp_audience_'+_0xe345f5;}async[a125_0x4d692b(0x1b2)](_0x2e897d){const _0xb6ecc2=a125_0x4d692b,_0x5bf2a5=this[_0xb6ecc2(0x134)](_0x2e897d),_0xfbd672='SHOW\x20TABLES\x20IN\x20'+_0x5bf2a5,_0xc88479=await this['trinoClient'][_0xb6ecc2(0x1a6)](_0xfbd672,{'catalog':'td','schema':_0x5bf2a5});return _0xc88479[_0xb6ecc2(0x169)][_0xb6ecc2(0x13e)](_0x29d90a=>({'name':_0x29d90a[_0xb6ecc2(0x176)],'type':_0x29d90a['Table']===_0xb6ecc2(0x155)?_0xb6ecc2(0x155):'behavior'}));}async[a125_0x4d692b(0x1ed)](_0x921bf8){const _0x4dd92b=a125_0x4d692b,_0x2af81e=await this['client'][_0x4dd92b(0x162)](_0x921bf8);return _0x2af81e['map'](_0x4e4c5d=>_0x4e4c5d['name']);}async[a125_0x4d692b(0x19e)](_0x84d0c3,_0x41b40d){const _0xafe08c=a125_0x4d692b;return await this[_0xafe08c(0x1f3)]['getSegmentSQL'](_0x84d0c3,_0x41b40d);}async[a125_0x4d692b(0x175)](_0x5dd9fc){const _0x45d85e=a125_0x4d692b,_0x22ae5c=await this[_0x45d85e(0x15b)](),_0x64cebc=_0x22ae5c['find'](_0x4829c8=>_0x4829c8[_0x45d85e(0x1f2)]['name']===_0x5dd9fc);if(!_0x64cebc)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x45d85e(0x170)+_0x5dd9fc);return _0x64cebc['id'];}async[a125_0x4d692b(0x1be)](_0x4ed314){const _0xaaa299=a125_0x4d692b;let _0x43d07b=_0x4ed314;return!/^\d+$/[_0xaaa299(0x1a8)](_0x4ed314)&&(_0x43d07b=await this[_0xaaa299(0x175)](_0x4ed314)),await this[_0xaaa299(0x1f3)][_0xaaa299(0x191)](_0x43d07b);}async[a125_0x4d692b(0x19d)](_0x342d0c,_0x32f73d){const _0x3ed765=a125_0x4d692b,_0x391f7c=await this['listSegments'](_0x342d0c),_0x5c0051=_0x391f7c[_0x3ed765(0x13d)](_0x3bcf77=>_0x3bcf77[_0x3ed765(0x1eb)]===_0x32f73d);if(!_0x5c0051)throw new SDKError(ErrorCode[_0x3ed765(0x181)],_0x3ed765(0x1e7)+_0x32f73d+'\x20in\x20parent\x20'+_0x342d0c);return _0x5c0051['id'];}async[a125_0x4d692b(0x1af)](_0x177690,_0x3393eb){const _0x34f008=a125_0x4d692b,_0xcde2e4=await this['listFolders'](_0x177690),_0x32d5cc=_0xcde2e4[_0x34f008(0x13d)](_0x2d305e=>_0x2d305e[_0x34f008(0x1eb)]===_0x3393eb);if(!_0x32d5cc)throw new SDKError(ErrorCode[_0x34f008(0x181)],_0x34f008(0x186)+_0x3393eb+_0x34f008(0x1bd)+_0x177690);return _0x32d5cc['id'];}async['listFields'](_0x14fd90){const _0x8960df=a125_0x4d692b,_0x1f2acf=await this[_0x8960df(0x149)](_0x14fd90),[_0xdaffdd,_0x542f3d]=await Promise[_0x8960df(0x138)]([this['client'][_0x8960df(0x17c)](_0x1f2acf),this[_0x8960df(0x1f3)][_0x8960df(0x162)](_0x1f2acf)]),_0x4949dd=[];for(const _0x2e652b of _0xdaffdd){_0x4949dd['push']({'name':_0x2e652b[_0x8960df(0x1eb)],'type':_0x2e652b[_0x8960df(0x160)],'source':_0x8960df(0x173),'parentDatabaseName':_0x2e652b[_0x8960df(0x1c1)],'parentTableName':_0x2e652b[_0x8960df(0x16b)],'parentColumn':_0x2e652b[_0x8960df(0x198)],'groupingName':_0x2e652b[_0x8960df(0x130)]??undefined});}for(const _0x2dbc18 of _0x542f3d){const _0x225a3a=_0x2dbc18[_0x8960df(0x1eb)];if(_0x2dbc18[_0x8960df(0x1e1)]&&Array[_0x8960df(0x1d3)](_0x2dbc18[_0x8960df(0x1e1)]))for(const _0x5ea8c5 of _0x2dbc18[_0x8960df(0x1e1)]){_0x5ea8c5[_0x8960df(0x1eb)]&&_0x5ea8c5[_0x8960df(0x160)]&&_0x4949dd[_0x8960df(0x144)]({'name':_0x225a3a+'.'+_0x5ea8c5[_0x8960df(0x1eb)],'type':_0x5ea8c5['type'],'source':_0x8960df(0x199),'behaviorName':_0x225a3a,'parentDatabaseName':_0x2dbc18[_0x8960df(0x1c1)],'parentTableName':_0x2dbc18[_0x8960df(0x16b)],'parentColumn':_0x5ea8c5['parentColumn']});}}return _0x4949dd;}async[a125_0x4d692b(0x1f6)](_0x5772df){const _0x3962ea=a125_0x4d692b;return await this['client'][_0x3962ea(0x152)](_0x5772df);}async[a125_0x4d692b(0x136)](_0x181674,_0x5a6cd2){const _0x277e22=a125_0x4d692b,_0x2b1d6d=await this['resolveParentIdOrName'](_0x181674);return await this[_0x277e22(0x1f3)]['updateParentSegment'](_0x2b1d6d,_0x5a6cd2);}async[a125_0x4d692b(0x16a)](_0x2371f8){const _0x489119=a125_0x4d692b,_0x38de14=await this[_0x489119(0x149)](_0x2371f8);return await this['client']['getParentSegmentFull'](_0x38de14);}async[a125_0x4d692b(0x129)](_0x5b1ccb){const _0x52a0d0=a125_0x4d692b,_0x46662f=await this[_0x52a0d0(0x16a)](_0x5b1ccb),_0x2e962d=apiToDef(_0x46662f);return await this[_0x52a0d0(0x163)](_0x2e962d,_0x46662f['id']),serializeDef(_0x2e962d);}async['pushParentYaml'](_0x4e52a8){const _0x249c60=a125_0x4d692b,_0x5b003b=typeof _0x4e52a8===_0x249c60(0x15a)?parseDef(_0x4e52a8):_0x4e52a8,_0x2ba5f2=defToApi(_0x5b003b);let _0x21eed1=null,_0x2ed752='';try{_0x21eed1=await this[_0x249c60(0x16a)](_0x5b003b['name']);const _0x40fe03=apiToDef(_0x21eed1);await this[_0x249c60(0x163)](_0x40fe03,_0x21eed1['id']),_0x2ed752=serializeDef(_0x40fe03);}catch{}const _0x3aee0f=serializeDef(_0x5b003b),_0xb52de3=generateDiff(_0x2ed752,_0x3aee0f),_0x42d37d=formatDiffWithColors(_0xb52de3),_0x3b1e79=_0x21eed1===null,_0x1c51df=hasChanges(_0xb52de3),_0x4d5c26={'isNew':_0x3b1e79,'id':_0x21eed1?.['id']||'','name':_0x5b003b[_0x249c60(0x1eb)],'diff':_0xb52de3,'diffFormatted':_0x42d37d,'hasChanges':_0x1c51df},_0x3e6e1f=async()=>{const _0xb46e20=_0x249c60;let _0x36fb59;_0x3b1e79?_0x36fb59=await this['createParent'](_0x2ba5f2):_0x36fb59=await this['updateParent'](_0x21eed1['id'],_0x2ba5f2);const _0x548855=_0x36fb59['id']||_0x21eed1?.['id']||'';if(_0x5b003b[_0xb46e20(0x1bb)]&&_0x548855){const _0x2ee800=this['getTdxInstance'](),_0xa334c2=this['realtimeDefToConfig'](_0x5b003b[_0xb46e20(0x1bb)]);await _0x2ee800[_0xb46e20(0x1bb)]['updateConfig'](_0x548855,_0xa334c2);}if(_0x5b003b[_0xb46e20(0x1fa)]&&_0x5b003b[_0xb46e20(0x1fa)][_0xb46e20(0x19f)]>0x0&&_0x548855){const _0x1efda6=this[_0xb46e20(0x1c0)]();await this[_0xb46e20(0x12e)](_0x1efda6,_0x548855,_0x5b003b['personalization_services']);}return _0x36fb59;};return{..._0x4d5c26,'apply':_0x3e6e1f};}async[a125_0x4d692b(0x1cb)](_0x3dd469,_0x10d702={}){const _0x11a2e4=a125_0x4d692b,_0x2c962e=typeof _0x3dd469==='string'?parseDef(_0x3dd469):_0x3dd469,_0x8ce429=[];let _0x287474=!![];const _0x588a0e=_0x23a5c5=>_0x10d702[_0x11a2e4(0x131)]?.(_0x23a5c5),_0x59578e={'name':_0x2c962e['name'],'master':{'database':_0x2c962e[_0x11a2e4(0x166)][_0x11a2e4(0x1f9)],'table':_0x2c962e[_0x11a2e4(0x166)][_0x11a2e4(0x1b8)],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x8ce429,'allValid':!![]},_0x5cae06=async _0x5b2d65=>{const _0x250137=_0x11a2e4;try{const _0x24f2f6=await this['trinoClient'][_0x250137(0x1a6)](_0x5b2d65);return{'data':_0x24f2f6['data']};}catch(_0x144ff6){const _0x47d33b=_0x144ff6 instanceof Error?_0x144ff6['message']:String(_0x144ff6);return{'data':[],'error':_0x47d33b};}};if(_0x10d702[_0x11a2e4(0x1bb)]){_0x59578e[_0x11a2e4(0x1bb)]=await this['validateRealtimeConfig'](_0x2c962e,_0x5cae06,_0x588a0e);if(_0x59578e[_0x11a2e4(0x1bb)]['events'])for(const _0x461f07 of _0x59578e[_0x11a2e4(0x1bb)]['events']){_0x461f07[_0x11a2e4(0x1f7)]&&(_0x8ce429['push'](_0x11a2e4(0x1cc)+_0x461f07[_0x11a2e4(0x1eb)]+_0x11a2e4(0x19b)+_0x461f07[_0x11a2e4(0x1f7)]),_0x287474=![]);}return _0x59578e[_0x11a2e4(0x166)][_0x11a2e4(0x14b)]=!![],_0x59578e[_0x11a2e4(0x1f8)]=_0x287474,_0x59578e;}_0x588a0e('Validating\x20master\x20table:\x20'+_0x2c962e['master'][_0x11a2e4(0x1f9)]+'.'+_0x2c962e[_0x11a2e4(0x166)][_0x11a2e4(0x1b8)]);const _0x5eaa9c=generateSchemaValidationSQL(_0x2c962e[_0x11a2e4(0x166)][_0x11a2e4(0x1f9)],_0x2c962e[_0x11a2e4(0x166)]['table']),_0x25b387=await _0x5cae06(_0x5eaa9c);if(_0x25b387['error'])_0x59578e[_0x11a2e4(0x166)][_0x11a2e4(0x14b)]=![],_0x59578e[_0x11a2e4(0x166)][_0x11a2e4(0x1ee)]=_0x25b387[_0x11a2e4(0x1ba)],_0x8ce429['push'](_0x11a2e4(0x1ae)+_0x25b387[_0x11a2e4(0x1ba)]),_0x287474=![];else{_0x59578e[_0x11a2e4(0x166)][_0x11a2e4(0x14b)]=!![],_0x588a0e(_0x11a2e4(0x17e));const _0x27908c=await _0x5cae06(generateMasterCountSQL(_0x2c962e));!_0x27908c[_0x11a2e4(0x1ba)]&&_0x27908c[_0x11a2e4(0x169)]['length']>0x0&&(_0x59578e[_0x11a2e4(0x166)][_0x11a2e4(0x193)]=_0x27908c[_0x11a2e4(0x169)][0x0]['row_count']);}if(_0x10d702[_0x11a2e4(0x166)])return _0x59578e[_0x11a2e4(0x1f8)]=_0x287474,_0x59578e;const _0x380ba0=async _0x4e6887=>{const _0x4df312=_0x11a2e4,_0x238e03={'name':_0x4e6887['name'],'database':_0x4e6887[_0x4df312(0x1db)][_0x4df312(0x1f9)],'table':_0x4e6887[_0x4df312(0x1db)]['table'],'joinKey':_0x4e6887[_0x4df312(0x1c2)]['child_key'],'foreignKey':_0x4e6887[_0x4df312(0x1c2)][_0x4df312(0x1cf)],'columns':getAttributeColumns(_0x4e6887),'schemaValid':![]};_0x588a0e(_0x4df312(0x141)+_0x4e6887['name']);const _0x541e4d=await _0x5cae06(generateAttributeSchemaSQL(_0x2c962e,_0x4e6887));if(_0x541e4d[_0x4df312(0x1ba)])_0x238e03[_0x4df312(0x1ee)]=_0x541e4d[_0x4df312(0x1ba)];else{_0x238e03[_0x4df312(0x14b)]=!![],_0x588a0e(_0x4df312(0x159)+_0x4e6887[_0x4df312(0x1eb)]);const _0x2bed6c=await _0x5cae06(generateAttributeCoverageSQL(_0x2c962e,_0x4e6887));!_0x2bed6c[_0x4df312(0x1ba)]&&_0x2bed6c['data']['length']>0x0&&(_0x238e03['matchedCount']=_0x2bed6c[_0x4df312(0x169)][0x0][_0x4df312(0x156)],_0x59578e[_0x4df312(0x166)][_0x4df312(0x193)]&&_0x59578e[_0x4df312(0x166)][_0x4df312(0x193)]>0x0&&(_0x238e03['coveragePercent']=_0x238e03[_0x4df312(0x188)]/_0x59578e[_0x4df312(0x166)]['rowCount']*0x64));}return _0x238e03;},_0x53f792=async(_0x4d986a,_0x566c70)=>{const _0x3f8c2b=_0x11a2e4,_0x37aa2f={'name':_0x4d986a[_0x3f8c2b(0x1eb)],'database':_0x4d986a[_0x3f8c2b(0x1db)][_0x3f8c2b(0x1f9)],'table':_0x4d986a[_0x3f8c2b(0x1db)]['table'],'joinKey':_0x4d986a['join'][_0x3f8c2b(0x14c)],'foreignKey':_0x4d986a[_0x3f8c2b(0x1c2)][_0x3f8c2b(0x1cf)],'columns':getBehaviorColumns(_0x4d986a),'schemaValid':![]};_0x588a0e(_0x3f8c2b(0x17a)+_0x4d986a['name']);const _0x122d70=await _0x5cae06(generateBehaviorSchemaSQL(_0x2c962e,_0x4d986a));if(_0x122d70[_0x3f8c2b(0x1ba)])_0x37aa2f[_0x3f8c2b(0x1ee)]=_0x122d70[_0x3f8c2b(0x1ba)];else{_0x37aa2f[_0x3f8c2b(0x14b)]=!![],_0x588a0e('Calculating\x20statistics\x20for:\x20'+_0x4d986a[_0x3f8c2b(0x1eb)]+'\x20('+_0x566c70+')');const _0x3c3ee5=await _0x5cae06(generateBehaviorStatsSQL(_0x2c962e,_0x4d986a,_0x566c70));!_0x3c3ee5[_0x3f8c2b(0x1ba)]&&_0x3c3ee5[_0x3f8c2b(0x169)][_0x3f8c2b(0x19f)]>0x0&&(_0x37aa2f['customersWithEvents']=_0x3c3ee5['data'][0x0][_0x3f8c2b(0x14d)],_0x37aa2f[_0x3f8c2b(0x1e8)]=_0x3c3ee5[_0x3f8c2b(0x169)][0x0][_0x3f8c2b(0x1e3)],_0x59578e[_0x3f8c2b(0x166)][_0x3f8c2b(0x193)]&&_0x59578e[_0x3f8c2b(0x166)][_0x3f8c2b(0x193)]>0x0&&(_0x37aa2f[_0x3f8c2b(0x1ea)]=_0x37aa2f[_0x3f8c2b(0x185)]/_0x59578e[_0x3f8c2b(0x166)]['rowCount']*0x64));}return _0x37aa2f;},_0x537bf0=(_0x53bd71,_0x318e96)=>{const _0x102c70=_0x11a2e4;_0x59578e[_0x102c70(0x1f2)]=_0x53bd71,_0x59578e[_0x102c70(0x13f)]=_0x318e96;for(const _0x45e2d6 of _0x53bd71){!_0x45e2d6[_0x102c70(0x14b)]&&(_0x8ce429[_0x102c70(0x144)](_0x102c70(0x195)+_0x45e2d6[_0x102c70(0x1eb)]+'\x27:\x20'+_0x45e2d6[_0x102c70(0x1ee)]),_0x287474=![]);}for(const _0x47370a of _0x318e96){!_0x47370a[_0x102c70(0x14b)]&&(_0x8ce429['push'](_0x102c70(0x1a1)+_0x47370a['name']+_0x102c70(0x19b)+_0x47370a[_0x102c70(0x1ee)]),_0x287474=![]);}},_0x4d02ca=_0x10d702['interval']||DEFAULT_TIME_RANGE;if(typeof _0x10d702['attribute']===_0x11a2e4(0x15a)){const _0x51fdb4=findAttributeByName(_0x2c962e,_0x10d702[_0x11a2e4(0x173)]);if(!_0x51fdb4)throw new SDKError(ErrorCode[_0x11a2e4(0x181)],'Attribute\x20\x27'+_0x10d702[_0x11a2e4(0x173)]+_0x11a2e4(0x18a));const _0x32295c=await _0x380ba0(_0x51fdb4);return _0x537bf0([_0x32295c],[]),_0x59578e[_0x11a2e4(0x1f8)]=_0x287474,_0x59578e;}if(_0x10d702[_0x11a2e4(0x173)]===!![]){_0x588a0e(_0x11a2e4(0x151));const _0x21381d=await Promise['all']((_0x2c962e['attributes']||[])['map'](_0x1e1830=>_0x380ba0(_0x1e1830)));return _0x537bf0(_0x21381d,[]),_0x59578e[_0x11a2e4(0x1f8)]=_0x287474,_0x59578e;}if(typeof _0x10d702['behavior']==='string'){const _0x4cac7f=findBehaviorByName(_0x2c962e,_0x10d702[_0x11a2e4(0x199)]);if(!_0x4cac7f)throw new SDKError(ErrorCode[_0x11a2e4(0x181)],_0x11a2e4(0x1a1)+_0x10d702[_0x11a2e4(0x199)]+'\x27\x20not\x20found');const _0x3d9b0f=await _0x53f792(_0x4cac7f,_0x4d02ca);return _0x537bf0([],[_0x3d9b0f]),_0x59578e['allValid']=_0x287474,_0x59578e;}if(_0x10d702['behavior']===!![]){_0x588a0e(_0x11a2e4(0x182));const _0x46046d=await Promise[_0x11a2e4(0x138)]((_0x2c962e[_0x11a2e4(0x13f)]||[])['map'](_0x1308f7=>_0x53f792(_0x1308f7,_0x4d02ca)));return _0x537bf0([],_0x46046d),_0x59578e[_0x11a2e4(0x1f8)]=_0x287474,_0x59578e;}if(_0x10d702[_0x11a2e4(0x157)]){_0x588a0e(_0x11a2e4(0x151));const _0x5d9ff9=await Promise[_0x11a2e4(0x138)]((_0x2c962e[_0x11a2e4(0x1f2)]||[])['map'](_0x2d5f0e=>_0x380ba0(_0x2d5f0e)));return _0x537bf0(_0x5d9ff9,[]),_0x59578e[_0x11a2e4(0x1f8)]=_0x287474,_0x59578e;}_0x588a0e(_0x11a2e4(0x192));const [_0x40a54b,_0x22fb5a]=await Promise[_0x11a2e4(0x138)]([Promise[_0x11a2e4(0x138)]((_0x2c962e[_0x11a2e4(0x1f2)]||[])['map'](_0x411acf=>_0x380ba0(_0x411acf))),Promise[_0x11a2e4(0x138)]((_0x2c962e[_0x11a2e4(0x13f)]||[])['map'](_0x4d2112=>_0x53f792(_0x4d2112,_0x4d02ca)))]);_0x537bf0(_0x40a54b,_0x22fb5a);if(_0x2c962e['realtime']||_0x2c962e[_0x11a2e4(0x1fa)]){_0x59578e[_0x11a2e4(0x1bb)]=await this[_0x11a2e4(0x1e4)](_0x2c962e,_0x5cae06,_0x588a0e);if(_0x59578e['realtime'][_0x11a2e4(0x1ef)])for(const _0x202824 of _0x59578e[_0x11a2e4(0x1bb)][_0x11a2e4(0x1ef)]){_0x202824['sourceTableError']&&(_0x8ce429[_0x11a2e4(0x144)](_0x11a2e4(0x1cc)+_0x202824[_0x11a2e4(0x1eb)]+'\x27:\x20'+_0x202824[_0x11a2e4(0x1f7)]),_0x287474=![]);}}return _0x59578e[_0x11a2e4(0x1f8)]=_0x287474,_0x59578e;}async[a125_0x4d692b(0x18d)](_0x1593fe,_0x498701={}){const _0x4a0d48=a125_0x4d692b,_0x5bad56=typeof _0x1593fe===_0x4a0d48(0x15a)?parseDef(_0x1593fe):_0x1593fe,_0xb92658=[];let _0x25c1e1=!![];const _0x27c826=_0x4acdc2=>_0x498701[_0x4a0d48(0x131)]?.(_0x4acdc2),_0x383b3e={'name':_0x5bad56['name'],'master':{'database':_0x5bad56[_0x4a0d48(0x166)]['database'],'table':_0x5bad56[_0x4a0d48(0x166)][_0x4a0d48(0x1b8)],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0xb92658,'allValid':!![]},_0x320743=async _0x2dcbc4=>{const _0x2e9007=_0x4a0d48;try{const _0x5173f7=await this['trinoClient'][_0x2e9007(0x1a6)](_0x2dcbc4);return{'data':_0x5173f7[_0x2e9007(0x169)]};}catch(_0x564b9a){const _0x228305=_0x564b9a instanceof Error?_0x564b9a[_0x2e9007(0x1a0)]:String(_0x564b9a);return{'data':[],'error':_0x228305};}};if(_0x498701['master']){_0x27c826(_0x4a0d48(0x1b1));const _0x5d9eef=generateMasterSampleSQL(_0x5bad56,DEFAULT_SAMPLE_LIMIT),_0x57e986=await _0x320743(_0x5d9eef);return!_0x57e986[_0x4a0d48(0x1ba)]?_0x383b3e['sampleData']=_0x57e986[_0x4a0d48(0x169)]:(_0xb92658[_0x4a0d48(0x144)](_0x4a0d48(0x1ae)+_0x57e986['error']),_0x25c1e1=![]),_0x383b3e['allValid']=_0x25c1e1,_0x383b3e;}if(_0x498701[_0x4a0d48(0x173)]){const _0x56ae5d=findAttributeByName(_0x5bad56,_0x498701['attribute']);if(!_0x56ae5d)throw new SDKError(ErrorCode[_0x4a0d48(0x181)],_0x4a0d48(0x195)+_0x498701[_0x4a0d48(0x173)]+'\x27\x20not\x20found');_0x27c826(_0x4a0d48(0x1ca)+_0x56ae5d[_0x4a0d48(0x1eb)]);const _0x193885=generateAttributeSampleSQL(_0x5bad56,_0x56ae5d,DEFAULT_SAMPLE_LIMIT),_0x54cb84=await _0x320743(_0x193885);return!_0x54cb84[_0x4a0d48(0x1ba)]?_0x383b3e[_0x4a0d48(0x132)]=_0x54cb84['data']:(_0xb92658[_0x4a0d48(0x144)]('Attribute\x20\x27'+_0x56ae5d[_0x4a0d48(0x1eb)]+'\x27:\x20'+_0x54cb84['error']),_0x25c1e1=![]),_0x383b3e[_0x4a0d48(0x1f8)]=_0x25c1e1,_0x383b3e;}if(_0x498701[_0x4a0d48(0x199)]){const _0x34ccd5=findBehaviorByName(_0x5bad56,_0x498701[_0x4a0d48(0x199)]);if(!_0x34ccd5)throw new SDKError(ErrorCode[_0x4a0d48(0x181)],_0x4a0d48(0x1a1)+_0x498701[_0x4a0d48(0x199)]+_0x4a0d48(0x18a));const _0x39fe59=_0x498701['interval']||DEFAULT_TIME_RANGE;_0x27c826(_0x4a0d48(0x1ca)+_0x34ccd5['name']+'\x20('+_0x39fe59+')');const _0x15977e=generateBehaviorSampleSQL(_0x5bad56,_0x34ccd5,DEFAULT_SAMPLE_LIMIT,_0x39fe59),_0x43e541=await _0x320743(_0x15977e);return!_0x43e541[_0x4a0d48(0x1ba)]?_0x383b3e[_0x4a0d48(0x132)]=_0x43e541[_0x4a0d48(0x169)]:(_0xb92658[_0x4a0d48(0x144)]('Behavior\x20\x27'+_0x34ccd5['name']+_0x4a0d48(0x19b)+_0x43e541[_0x4a0d48(0x1ba)]),_0x25c1e1=![]),_0x383b3e['allValid']=_0x25c1e1,_0x383b3e;}if(_0x498701[_0x4a0d48(0x157)]){_0x27c826(_0x4a0d48(0x172));const _0x3457c4=generateEnrichedSQL(_0x5bad56,DEFAULT_SAMPLE_LIMIT),_0x55e0d1=await _0x320743(_0x3457c4);return!_0x55e0d1[_0x4a0d48(0x1ba)]?_0x383b3e[_0x4a0d48(0x132)]=_0x55e0d1[_0x4a0d48(0x169)]:(_0xb92658[_0x4a0d48(0x144)](_0x4a0d48(0x1b6)+_0x55e0d1[_0x4a0d48(0x1ba)]),_0x25c1e1=![]),_0x383b3e['allValid']=_0x25c1e1,_0x383b3e;}return _0x383b3e[_0x4a0d48(0x1f8)]=_0x25c1e1,_0x383b3e;}async[a125_0x4d692b(0x17d)](_0x31f34f,_0x2ac720){const _0x5b1c8b=a125_0x4d692b;return await this['client'][_0x5b1c8b(0x17d)](_0x31f34f,_0x2ac720);}async[a125_0x4d692b(0x1f1)](_0x11f22c){const _0x4e2a77=a125_0x4d692b;return await this[_0x4e2a77(0x1f3)][_0x4e2a77(0x1f1)](_0x11f22c);}async[a125_0x4d692b(0x135)](_0xd6bece,_0x3a48c7,_0x5cb603){const _0x40233a=a125_0x4d692b;return await this[_0x40233a(0x1f3)][_0x40233a(0x17b)](_0xd6bece,_0x3a48c7,_0x5cb603);}async[a125_0x4d692b(0x18b)](_0x24ec1d){const _0x239300=a125_0x4d692b;return await this[_0x239300(0x1f3)][_0x239300(0x18b)](_0x24ec1d);}async['createFolder'](_0x5edbce,_0xbfec86){const _0x2fb8eb=a125_0x4d692b,_0x530837=await this[_0x2fb8eb(0x149)](_0x5edbce);return await this['client'][_0x2fb8eb(0x178)](_0x530837,_0xbfec86);}async['resolveParentIdOrName'](_0x160151){const _0x57b24e=a125_0x4d692b;if(/^\d+$/[_0x57b24e(0x1a8)](_0x160151))return _0x160151;return await this[_0x57b24e(0x175)](_0x160151);}async['detectResourceType'](_0x17d9b6,_0x1546a2){const _0x24fdd9=a125_0x4d692b,[_0xa8f09a,_0x56b312]=await Promise[_0x24fdd9(0x138)]([this[_0x24fdd9(0x1af)](_0x17d9b6,_0x1546a2)[_0x24fdd9(0x17f)](()=>!![])[_0x24fdd9(0x14e)](()=>![]),this['resolveSegmentId'](_0x17d9b6,_0x1546a2)[_0x24fdd9(0x17f)](()=>!![])['catch'](()=>![])]);if(_0xa8f09a&&_0x56b312)return _0x24fdd9(0x1e0);else{if(_0xa8f09a)return'folder';else{if(_0x56b312)return'segment';}}throw new SDKError(ErrorCode[_0x24fdd9(0x181)],_0x24fdd9(0x194)+_0x1546a2+_0x24fdd9(0x1ad));}async[a125_0x4d692b(0x1fd)](_0x595d36,_0x3fb12f,_0x144d1c){const _0xd9e24c=a125_0x4d692b,[_0x5e40e8,_0x1d5c9a]=await Promise[_0xd9e24c(0x138)]([this[_0xd9e24c(0x148)](_0x595d36),this['listSegments'](_0x595d36)]),_0x11a866=_0x144d1c?_0x5e40e8[_0xd9e24c(0x15d)](_0x5c50b4=>_0x5c50b4[_0xd9e24c(0x1a4)]===_0x144d1c):_0x5e40e8[_0xd9e24c(0x15d)](_0x3bf4df=>!_0x3bf4df[_0xd9e24c(0x1a4)]),_0xea6c7e=_0x144d1c?_0x1d5c9a[_0xd9e24c(0x15d)](_0x488baa=>_0x488baa['segmentFolderId']===_0x144d1c):_0x1d5c9a[_0xd9e24c(0x15d)](_0x3ba752=>!_0x3ba752[_0xd9e24c(0x1c6)]),_0xf10aea=_0x11a866['some'](_0xff15e4=>_0xff15e4[_0xd9e24c(0x1eb)]===_0x3fb12f),_0x627a3a=_0xea6c7e[_0xd9e24c(0x1de)](_0x1ed11c=>_0x1ed11c[_0xd9e24c(0x1eb)]===_0x3fb12f);if(_0xf10aea&&_0x627a3a)return _0xd9e24c(0x1e0);else{if(_0xf10aea)return _0xd9e24c(0x1ab);else{if(_0x627a3a)return'segment';}}throw new SDKError(ErrorCode[_0xd9e24c(0x181)],_0xd9e24c(0x194)+_0x3fb12f+_0xd9e24c(0x1dd)+(_0x144d1c?_0xd9e24c(0x1ab):_0xd9e24c(0x1c4)));}async['traversePath'](_0x4ae7d7){const _0x5286f7=a125_0x4d692b;if(_0x4ae7d7[_0x5286f7(0x19f)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5286f7(0x1dc));const _0x1a9e51=_0x4ae7d7[0x0],_0x40d2b8=await this[_0x5286f7(0x175)](_0x1a9e51);if(_0x4ae7d7[_0x5286f7(0x19f)]===0x1)return{'parentId':_0x40d2b8,'parentName':_0x1a9e51,'type':_0x5286f7(0x13b),'fullPath':_0x1a9e51};const _0x3a56f0=await this['getParentFull'](_0x40d2b8),_0x35153e=_0x3a56f0['rootFolderId'],_0x272b6a=[];let _0x59551f=_0x35153e;for(let _0x4203ac=0x1;_0x4203ac<_0x4ae7d7['length']-0x1;_0x4203ac++){const _0x18b936=_0x4ae7d7[_0x4203ac],_0x5d0d4f=await this['listFolders'](_0x40d2b8),_0x45c436=_0x59551f?_0x5d0d4f['find'](_0x4bbdd8=>_0x4bbdd8[_0x5286f7(0x1eb)]===_0x18b936&&_0x4bbdd8[_0x5286f7(0x1a4)]===_0x59551f):_0x5d0d4f['find'](_0x39134c=>_0x39134c[_0x5286f7(0x1eb)]===_0x18b936&&!_0x39134c[_0x5286f7(0x1a4)]);if(!_0x45c436)throw new SDKError(ErrorCode[_0x5286f7(0x181)],_0x5286f7(0x16e)+_0x18b936+_0x5286f7(0x13a));_0x272b6a[_0x5286f7(0x144)](_0x18b936),_0x59551f=_0x45c436['id'];}const _0x25b0d5=_0x4ae7d7[_0x4ae7d7[_0x5286f7(0x19f)]-0x1],_0x306fd2=await this[_0x5286f7(0x1fd)](_0x40d2b8,_0x25b0d5,_0x59551f);if(_0x306fd2===_0x5286f7(0x1e0)||_0x306fd2===_0x5286f7(0x1ab)){const _0xbb2637=await this[_0x5286f7(0x148)](_0x40d2b8),_0x3f0870=_0x59551f?_0xbb2637['find'](_0x4b3dfd=>_0x4b3dfd[_0x5286f7(0x1eb)]===_0x25b0d5&&_0x4b3dfd[_0x5286f7(0x1a4)]===_0x59551f):_0xbb2637[_0x5286f7(0x13d)](_0x22ea42=>_0x22ea42[_0x5286f7(0x1eb)]===_0x25b0d5&&!_0x22ea42[_0x5286f7(0x1a4)]);if(!_0x3f0870)throw new SDKError(ErrorCode[_0x5286f7(0x181)],_0x5286f7(0x16e)+_0x25b0d5+_0x5286f7(0x18a));return _0x272b6a[_0x5286f7(0x144)](_0x25b0d5),{'parentId':_0x40d2b8,'parentName':_0x1a9e51,'folderId':_0x3f0870['id'],'folderPath':_0x272b6a,'type':_0x5286f7(0x1ab),'fullPath':_0x4ae7d7[_0x5286f7(0x1c2)]('/')};}else{const _0x190c45=await this[_0x5286f7(0x139)](_0x40d2b8),_0x22a07f=_0x59551f?_0x190c45[_0x5286f7(0x13d)](_0x525058=>_0x525058[_0x5286f7(0x1eb)]===_0x25b0d5&&_0x525058[_0x5286f7(0x1c6)]===_0x59551f):_0x190c45[_0x5286f7(0x13d)](_0x2f1a02=>_0x2f1a02[_0x5286f7(0x1eb)]===_0x25b0d5&&!_0x2f1a02[_0x5286f7(0x1c6)]);if(!_0x22a07f)throw new SDKError(ErrorCode[_0x5286f7(0x181)],_0x5286f7(0x1b9)+_0x25b0d5+_0x5286f7(0x18a));return{'parentId':_0x40d2b8,'parentName':_0x1a9e51,'folderId':_0x59551f,'folderPath':_0x272b6a[_0x5286f7(0x19f)]>0x0?_0x272b6a:undefined,'segmentId':_0x22a07f['id'],'segmentName':_0x25b0d5,'type':_0x5286f7(0x1f5),'fullPath':_0x4ae7d7[_0x5286f7(0x1c2)]('/')};}}async[a125_0x4d692b(0x1d9)](_0x471fb5){const _0x13fbef=a125_0x4d692b,_0x5b619b=parsePath(_0x471fb5);if(!_0x5b619b[_0x13fbef(0x15f)])throw new SDKError(ErrorCode[_0x13fbef(0x1a5)],'Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)');return await this['traversePath'](_0x5b619b['segments']);}async['listUnifiedWithJourneys'](_0x110a54,_0x38fab6){const _0x4423f6=a125_0x4d692b;let _0x2439b7=_0x38fab6;if(!_0x2439b7){const _0x1a897c=await this[_0x4423f6(0x16a)](_0x110a54);_0x2439b7=_0x1a897c[_0x4423f6(0x1d8)];}if(!_0x2439b7)return{'folders':[],'segments':[],'journeys':[]};const _0x1fdf83=await this[_0x4423f6(0x1f3)][_0x4423f6(0x1a2)](_0x2439b7,0x1,![]),_0x3acc63=_0x1fdf83[_0x4423f6(0x169)],_0x46c634=_0x3acc63[_0x4423f6(0x15d)](_0x382c8f=>{if(_0x382c8f['id']===_0x2439b7)return![];const _0x2f547e=this['getEntityParentFolderId'](_0x382c8f);return _0x2f547e===_0x2439b7||!_0x2f547e;}),_0x58a114=_0x46c634[_0x4423f6(0x15d)](_0x1b19c6=>_0x1b19c6['type']===_0x4423f6(0x1a9))[_0x4423f6(0x13e)](_0x4c61d5=>this[_0x4423f6(0x1bc)](_0x4c61d5,_0x110a54)),_0x26b957=_0x46c634['filter'](_0x53b53d=>_0x53b53d['type']===_0x4423f6(0x1e6)||_0x53b53d['type']===_0x4423f6(0x1c5))['map'](_0x58b19a=>this['entityToSegment'](_0x58b19a,_0x110a54)),_0x51f444=_0x46c634[_0x4423f6(0x15d)](_0x1ac24d=>_0x1ac24d[_0x4423f6(0x160)]===_0x4423f6(0x1d6)),_0x59e92f=_0x51f444['map'](_0x10e9c2=>({'journeyBundleId':_0x10e9c2[_0x4423f6(0x1f2)][_0x4423f6(0x153)],'versionNumber':_0x10e9c2[_0x4423f6(0x1f2)][_0x4423f6(0x1d4)],'id':_0x10e9c2['id'],'entity':_0x10e9c2})),_0x1ff862=deduplicateJourneysByBundle(_0x59e92f),_0x10620e=_0x1ff862[_0x4423f6(0x13e)](_0x565219=>entityToJourneyListItem(_0x565219['entity'],_0x110a54));return{'folders':_0x58a114,'segments':_0x26b957,'journeys':_0x10620e};}[a125_0x4d692b(0x1bc)](_0x1297ab,_0x6d3315){const _0x32d0bf=a125_0x4d692b;return{'audienceId':_0x6d3315,'id':_0x1297ab['id'],'name':_0x1297ab['attributes'][_0x32d0bf(0x1eb)],'parentFolderId':_0x1297ab['attributes'][_0x32d0bf(0x1a4)]??_0x1297ab[_0x32d0bf(0x15c)]?.[_0x32d0bf(0x1ce)]?.[_0x32d0bf(0x169)]?.['id']??null,'description':_0x1297ab[_0x32d0bf(0x1f2)][_0x32d0bf(0x1b7)]??null,'createdAt':_0x1297ab[_0x32d0bf(0x1f2)][_0x32d0bf(0x13c)],'updatedAt':_0x1297ab[_0x32d0bf(0x1f2)][_0x32d0bf(0x1b3)]};}[a125_0x4d692b(0x154)](_0x5f5545,_0x1e058d){const _0x1e3c43=a125_0x4d692b;return{'audienceId':_0x1e058d,'id':_0x5f5545['id'],'name':_0x5f5545[_0x1e3c43(0x1f2)]['name'],'description':_0x5f5545[_0x1e3c43(0x1f2)][_0x1e3c43(0x1b7)]??undefined,'realtime':_0x5f5545[_0x1e3c43(0x160)]==='segment-realtime','segmentFolderId':_0x5f5545[_0x1e3c43(0x1f2)][_0x1e3c43(0x1c6)]??_0x5f5545['relationships']?.[_0x1e3c43(0x1ce)]?.[_0x1e3c43(0x169)]?.['id']??undefined,'population':_0x5f5545['attributes'][_0x1e3c43(0x171)],'createdAt':_0x5f5545[_0x1e3c43(0x1f2)]['createdAt'],'updatedAt':_0x5f5545[_0x1e3c43(0x1f2)][_0x1e3c43(0x1b3)]};}async[a125_0x4d692b(0x190)](_0x183fad,_0x897433,_0x42ab45,_0x7e03bb=0xa){const _0x411256=a125_0x4d692b;let _0x242935=_0x897433;if(!_0x242935){const _0x48f4d0=await this[_0x411256(0x16a)](_0x183fad);_0x242935=_0x48f4d0['rootFolderId'];}if(!_0x242935)return[];const _0x32aeda=await this[_0x411256(0x1f3)][_0x411256(0x1a2)](_0x242935,_0x7e03bb,![]),_0x34d0c6=_0x32aeda[_0x411256(0x169)];return this[_0x411256(0x1e5)](_0x34d0c6,_0x242935);}[a125_0x4d692b(0x1e5)](_0x34ffa4,_0x429f50){const _0x4694e7=a125_0x4d692b,_0x2a881a=new Map();for(const _0x5c5d8c of _0x34ffa4){if(_0x5c5d8c[_0x4694e7(0x160)]===_0x4694e7(0x1a9)&&_0x5c5d8c['id']===_0x429f50)continue;const _0x91b1af=this['getEntityParentFolderId'](_0x5c5d8c)??_0x429f50;!_0x2a881a[_0x4694e7(0x1bf)](_0x91b1af)&&_0x2a881a[_0x4694e7(0x1ac)](_0x91b1af,[]),_0x2a881a[_0x4694e7(0x1fc)](_0x91b1af)[_0x4694e7(0x144)](_0x5c5d8c);}return this[_0x4694e7(0x12a)](_0x429f50,_0x2a881a);}[a125_0x4d692b(0x1b5)](_0x1f0428){const _0x60938c=a125_0x4d692b;if(_0x1f0428[_0x60938c(0x15c)]?.[_0x60938c(0x1ce)]?.['data']?.['id'])return _0x1f0428['relationships'][_0x60938c(0x1ce)][_0x60938c(0x169)]['id'];return _0x1f0428[_0x60938c(0x1f2)]['parentFolderId']??_0x1f0428[_0x60938c(0x1f2)][_0x60938c(0x1c6)]??undefined;}[a125_0x4d692b(0x12a)](_0x3b4471,_0x27082c){const _0xc63ee5=a125_0x4d692b,_0x160501=_0x27082c[_0xc63ee5(0x1fc)](_0x3b4471)??[],_0x51cb52=[],_0x1998bb=_0x160501['filter'](_0x5bc421=>_0x5bc421[_0xc63ee5(0x160)]===_0xc63ee5(0x1a9)),_0x50e40e=_0x160501[_0xc63ee5(0x15d)](_0x13c698=>_0x13c698[_0xc63ee5(0x160)]===_0xc63ee5(0x1e6)||_0x13c698['type']===_0xc63ee5(0x1c5)),_0x2847c1=_0x160501[_0xc63ee5(0x15d)](_0x2f71db=>_0x2f71db[_0xc63ee5(0x160)]===_0xc63ee5(0x1d6)),_0x216916=_0x2847c1['map'](_0x2e4454=>({'journeyBundleId':_0x2e4454[_0xc63ee5(0x1f2)]['journeyBundleId'],'versionNumber':_0x2e4454['attributes'][_0xc63ee5(0x1d4)],'id':_0x2e4454['id'],'entity':_0x2e4454})),_0xbc2d5a=deduplicateJourneysByBundle(_0x216916);for(const _0x57e1d5 of _0x1998bb){const _0x16e9fc=this[_0xc63ee5(0x12a)](_0x57e1d5['id'],_0x27082c);_0x51cb52[_0xc63ee5(0x144)]({'type':'folder','id':_0x57e1d5['id'],'name':_0x57e1d5['attributes'][_0xc63ee5(0x1eb)],'children':_0x16e9fc[_0xc63ee5(0x19f)]>0x0?_0x16e9fc:undefined,'metadata':{'description':_0x57e1d5['attributes']['description']??undefined,'folderCount':_0x16e9fc[_0xc63ee5(0x15d)](_0x36e521=>_0x36e521[_0xc63ee5(0x160)]===_0xc63ee5(0x1ab))[_0xc63ee5(0x19f)],'segmentCount':_0x16e9fc[_0xc63ee5(0x15d)](_0x2b46fc=>_0x2b46fc[_0xc63ee5(0x160)]===_0xc63ee5(0x1f5))[_0xc63ee5(0x19f)],'journeyCount':_0x16e9fc[_0xc63ee5(0x15d)](_0x15b568=>_0x15b568[_0xc63ee5(0x160)]===_0xc63ee5(0x1d6))[_0xc63ee5(0x19f)],'createdAt':_0x57e1d5[_0xc63ee5(0x1f2)]['createdAt'],'updatedAt':_0x57e1d5['attributes'][_0xc63ee5(0x1b3)]}});}for(const _0x44227e of _0x50e40e){_0x51cb52[_0xc63ee5(0x144)]({'type':_0xc63ee5(0x1f5),'id':_0x44227e['id'],'name':_0x44227e[_0xc63ee5(0x1f2)][_0xc63ee5(0x1eb)],'population':_0x44227e[_0xc63ee5(0x1f2)][_0xc63ee5(0x171)],'metadata':{'description':_0x44227e[_0xc63ee5(0x1f2)]['description']??undefined,'createdAt':_0x44227e[_0xc63ee5(0x1f2)]['createdAt'],'updatedAt':_0x44227e['attributes'][_0xc63ee5(0x1b3)]}});}for(const _0x540458 of _0xbc2d5a){const _0x8a27b4=_0x540458[_0xc63ee5(0x12f)];_0x51cb52[_0xc63ee5(0x144)]({'type':'journey','id':_0x8a27b4['id'],'name':_0x8a27b4[_0xc63ee5(0x1f2)][_0xc63ee5(0x177)]??_0x8a27b4[_0xc63ee5(0x1f2)][_0xc63ee5(0x1eb)]??'','state':parseJourneyState(_0x8a27b4[_0xc63ee5(0x1f2)][_0xc63ee5(0x1aa)]),'metadata':{}});}return _0x51cb52;}async[a125_0x4d692b(0x158)](_0x14b760,_0x4c0873={}){const _0x2d3759=a125_0x4d692b,_0x329238=this[_0x2d3759(0x1c0)](),_0x5d004a={'segment':_0x329238[_0x2d3759(0x1f5)],'journey':_0x329238['journey'],'user':_0x329238['user'],'connection':_0x329238[_0x2d3759(0x1e2)]};return a125_0x501011(_0x5d004a,_0x14b760,_0x4c0873);}async['validateRealtimeConfig'](_0x359cff,_0x3f20fd,_0x3f982d){const _0x9218b1=a125_0x4d692b,_0xe3b3d9=[_0x9218b1(0x133),_0x9218b1(0x19a),'set',_0x9218b1(0x197),_0x9218b1(0x1b0),'imported_batch'];let _0x3c15cb=![];try{const _0x3e7d95=this[_0x9218b1(0x1c0)](),_0x3a97fb=await this[_0x9218b1(0x175)](_0x359cff[_0x9218b1(0x1eb)]);_0x3c15cb=await _0x3e7d95[_0x9218b1(0x1bb)][_0x9218b1(0x1df)](_0x3a97fb);}catch{}const _0x263fb9={'enabled':_0x3c15cb};if(_0x359cff['realtime']){const _0x4972d4=_0x359cff[_0x9218b1(0x1bb)];_0x4972d4['events']&&_0x4972d4['events'][_0x9218b1(0x19f)]>0x0&&(_0x3f982d(_0x9218b1(0x19c)),_0x263fb9['events']=await Promise[_0x9218b1(0x138)](_0x4972d4['events'][_0x9218b1(0x13e)](async _0x5a37c2=>{const _0x577fa8=_0x9218b1,_0x1fc0c9={'name':_0x5a37c2['name'],'sourceTable':_0x5a37c2[_0x577fa8(0x14a)]};if(_0x5a37c2[_0x577fa8(0x14a)]){const _0x1b90bc=_0x5a37c2[_0x577fa8(0x14a)]['split']('.'),_0x520199=_0x1b90bc[0x0]||'',_0x2908d7=_0x1b90bc[0x1]||_0x1b90bc[0x0]||'';if(_0x520199&&_0x2908d7){const _0x191ff5=await _0x3f20fd(generateSchemaValidationSQL(_0x520199,_0x2908d7));_0x1fc0c9[_0x577fa8(0x183)]=!_0x191ff5[_0x577fa8(0x1ba)],_0x1fc0c9[_0x577fa8(0x1f7)]=_0x191ff5['error'];}}return _0x1fc0c9;}))),_0x4972d4['attributes']&&_0x4972d4[_0x9218b1(0x1f2)][_0x9218b1(0x19f)]>0x0&&(_0x263fb9[_0x9218b1(0x1f2)]=_0x4972d4['attributes']['map'](_0xaef890=>({'name':_0xaef890['name'],'type':_0xaef890[_0x9218b1(0x160)],'valid':_0xe3b3d9[_0x9218b1(0x164)](_0xaef890['type'])}))),_0x4972d4['id_stitching']&&(_0x263fb9[_0x9218b1(0x174)]={'primaryKey':_0x4972d4[_0x9218b1(0x15e)][_0x9218b1(0x18f)],'stitchingKeys':_0x4972d4[_0x9218b1(0x15e)]['stitching_keys']});}return _0x359cff[_0x9218b1(0x1fa)]&&_0x359cff[_0x9218b1(0x1fa)][_0x9218b1(0x19f)]>0x0&&(_0x263fb9[_0x9218b1(0x1c7)]=_0x359cff[_0x9218b1(0x1fa)][_0x9218b1(0x13e)](_0x3b40a5=>({'name':_0x3b40a5['name'],'valid':!!_0x3b40a5[_0x9218b1(0x1eb)]}))),_0x263fb9;}async[a125_0x4d692b(0x163)](_0x23f166,_0x2b77e6){const _0x3ee717=a125_0x4d692b,_0xd16987=this[_0x3ee717(0x1c0)](),_0x553dd7=await _0xd16987[_0x3ee717(0x1bb)]['isEnabled'](_0x2b77e6);if(!_0x553dd7)return;try{const _0x2a30dc=await _0xd16987[_0x3ee717(0x1bb)]['getConfig'](_0x2b77e6);_0x2a30dc&&Object['keys'](_0x2a30dc)[_0x3ee717(0x19f)]>0x0&&(_0x23f166['realtime']={},_0x2a30dc[_0x3ee717(0x1c9)]&&_0x2a30dc[_0x3ee717(0x1c9)][_0x3ee717(0x19f)]>0x0&&(_0x23f166['realtime'][_0x3ee717(0x1ef)]=_0x2a30dc[_0x3ee717(0x1c9)][_0x3ee717(0x13e)](_0x19e267=>({'name':_0x19e267[_0x3ee717(0x1b8)],'source_table':_0x19e267[_0x3ee717(0x1f9)]+'.'+_0x19e267[_0x3ee717(0x1b8)]}))),_0x2a30dc[_0x3ee717(0x180)]&&_0x2a30dc[_0x3ee717(0x180)][_0x3ee717(0x19f)]>0x0&&(_0x23f166['realtime']['attributes']=_0x2a30dc[_0x3ee717(0x180)]['map'](_0x4e9060=>({'name':_0x4e9060[_0x3ee717(0x1eb)],'type':'imported_batch','source_field':_0x4e9060[_0x3ee717(0x137)]}))),_0x2a30dc[_0x3ee717(0x179)]&&_0x2a30dc[_0x3ee717(0x179)][_0x3ee717(0x19f)]>0x0&&(_0x23f166[_0x3ee717(0x1bb)]['id_stitching']={'primary_key':_0x2a30dc[_0x3ee717(0x179)][0x0]['name'],'stitching_keys':_0x2a30dc[_0x3ee717(0x179)][_0x3ee717(0x1e9)](0x1)[_0x3ee717(0x13e)](_0xcdd0cf=>_0xcdd0cf[_0x3ee717(0x1eb)])}));}catch(_0x3791da){logger[_0x3ee717(0x12d)]('RT\x20config\x20fetch\x20failed\x20for\x20parent\x20segment\x20'+_0x2b77e6+':\x20'+_0x3791da);}try{const _0x148e6a=await _0xd16987[_0x3ee717(0x145)]['list'](_0x2b77e6);_0x148e6a&&_0x148e6a[_0x3ee717(0x19f)]>0x0&&(_0x23f166[_0x3ee717(0x1fa)]=_0x148e6a['map'](_0x1f15ae=>({'name':_0x1f15ae[_0x3ee717(0x1eb)],..._0x1f15ae['description']&&{'description':_0x1f15ae['description']},..._0x1f15ae[_0x3ee717(0x1b4)]&&{'trigger_event':_0x1f15ae[_0x3ee717(0x1b4)]},..._0x1f15ae[_0x3ee717(0x187)]&&_0x1f15ae[_0x3ee717(0x187)]['length']>0x0&&{'sections':_0x1f15ae[_0x3ee717(0x187)][_0x3ee717(0x13e)](_0x23f779=>({'name':_0x23f779[_0x3ee717(0x1eb)],..._0x23f779[_0x3ee717(0x184)]&&{'criteria':_0x23f779[_0x3ee717(0x184)]},..._0x23f779[_0x3ee717(0x1f2)]&&_0x23f779[_0x3ee717(0x1f2)]['length']>0x0&&{'attributes':_0x23f779[_0x3ee717(0x1f2)]},..._0x23f779['batch_segments']&&_0x23f779[_0x3ee717(0x1d0)]['length']>0x0&&{'batch_segments':_0x23f779[_0x3ee717(0x1d0)]}}))}})));}catch(_0x220962){logger['debug'](_0x3ee717(0x1ec)+_0x2b77e6+':\x20'+_0x220962);}}[a125_0x4d692b(0x1c3)](_0x3769c8){const _0x4890cc=a125_0x4d692b,_0x229266={};_0x3769c8['events']&&_0x3769c8['events'][_0x4890cc(0x19f)]>0x0&&(_0x229266[_0x4890cc(0x1c9)]=_0x3769c8[_0x4890cc(0x1ef)][_0x4890cc(0x15d)](_0x1458e2=>_0x1458e2[_0x4890cc(0x14a)])[_0x4890cc(0x13e)](_0x2b15f5=>{const _0x32d9ca=_0x4890cc,_0xb1d34f=_0x2b15f5[_0x32d9ca(0x14a)][_0x32d9ca(0x1f0)]('.');return{'database':_0xb1d34f[0x0]||'','table':_0xb1d34f[0x1]||_0xb1d34f[0x0]||''};}));_0x3769c8['attributes']&&_0x3769c8[_0x4890cc(0x1f2)][_0x4890cc(0x19f)]>0x0&&(_0x229266[_0x4890cc(0x180)]=_0x3769c8['attributes'][_0x4890cc(0x13e)](_0x51eed8=>({'column':_0x51eed8[_0x4890cc(0x18c)]||_0x51eed8[_0x4890cc(0x1eb)],'name':_0x51eed8[_0x4890cc(0x1eb)]})));if(_0x3769c8[_0x4890cc(0x15e)]){const _0x4cb4eb=[{'name':_0x3769c8[_0x4890cc(0x15e)][_0x4890cc(0x18f)]}];if(_0x3769c8['id_stitching'][_0x4890cc(0x14f)])for(const _0xc1430b of _0x3769c8[_0x4890cc(0x15e)][_0x4890cc(0x14f)]){_0x4cb4eb['push']({'name':_0xc1430b});}_0x229266[_0x4890cc(0x179)]=_0x4cb4eb;}return _0x229266;}async[a125_0x4d692b(0x12e)](_0x45dfd1,_0x433b78,_0x4036b1){const _0x59aa6c=a125_0x4d692b;let _0x43d83c=[];try{_0x43d83c=await _0x45dfd1[_0x59aa6c(0x145)][_0x59aa6c(0x1b0)](_0x433b78);}catch{}const _0x3d6272=new Map(_0x43d83c[_0x59aa6c(0x13e)](_0x17a664=>[_0x17a664[_0x59aa6c(0x1eb)],_0x17a664])),_0x42c2d8=new Map(_0x4036b1['map'](_0x1cfbbd=>[_0x1cfbbd['name'],_0x1cfbbd]));for(const _0x2c7c33 of _0x4036b1){const _0x136e8f=_0x3d6272[_0x59aa6c(0x1fc)](_0x2c7c33['name']),_0x24bba4={'name':_0x2c7c33[_0x59aa6c(0x1eb)],..._0x2c7c33[_0x59aa6c(0x1b7)]&&{'description':_0x2c7c33[_0x59aa6c(0x1b7)]},..._0x2c7c33['trigger_event']&&{'trigger_event':_0x2c7c33[_0x59aa6c(0x1b4)]},..._0x2c7c33[_0x59aa6c(0x187)]&&{'sections':_0x2c7c33[_0x59aa6c(0x187)][_0x59aa6c(0x13e)](_0x415c54=>({'name':_0x415c54[_0x59aa6c(0x1eb)],'criteria':_0x415c54[_0x59aa6c(0x184)]||'','attributes':_0x415c54['attributes']||[],'batch_segments':_0x415c54['batch_segments']||[]}))}};_0x136e8f?.['id']?await _0x45dfd1[_0x59aa6c(0x145)][_0x59aa6c(0x189)](_0x433b78,_0x136e8f['id'],_0x24bba4):await _0x45dfd1[_0x59aa6c(0x145)]['create'](_0x433b78,_0x24bba4);}for(const _0x2f352c of _0x43d83c){!_0x42c2d8[_0x59aa6c(0x1bf)](_0x2f352c[_0x59aa6c(0x1eb)])&&_0x2f352c['id']&&await _0x45dfd1[_0x59aa6c(0x145)][_0x59aa6c(0x140)](_0x433b78,_0x2f352c['id']);}}['getTdxInstance'](){const _0x1d0692=a125_0x4d692b;return this[_0x1d0692(0x1a3)];}}
1
+ const a125_0x1c7069=a125_0x4108;(function(_0x317565,_0x251111){const _0x3ea51f=a125_0x4108,_0x5d073d=_0x317565();while(!![]){try{const _0x2e38d5=-parseInt(_0x3ea51f(0x115))/0x1+parseInt(_0x3ea51f(0xe6))/0x2*(parseInt(_0x3ea51f(0x15a))/0x3)+parseInt(_0x3ea51f(0x12a))/0x4*(-parseInt(_0x3ea51f(0xc7))/0x5)+parseInt(_0x3ea51f(0xc9))/0x6*(-parseInt(_0x3ea51f(0x123))/0x7)+parseInt(_0x3ea51f(0x146))/0x8*(parseInt(_0x3ea51f(0xd5))/0x9)+parseInt(_0x3ea51f(0x133))/0xa*(parseInt(_0x3ea51f(0x120))/0xb)+parseInt(_0x3ea51f(0x139))/0xc*(parseInt(_0x3ea51f(0x129))/0xd);if(_0x2e38d5===_0x251111)break;else _0x5d073d['push'](_0x5d073d['shift']());}catch(_0x1fa5be){_0x5d073d['push'](_0x5d073d['shift']());}}}(a125_0x1b75,0xac306));import{CDPApiClient}from'./client/cdp-api-client.js';import{TrinoApiClient}from'./client/trino-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a125_0x1b75(){const _0x555094=['getSegmentEntity','getSegment','pullSegments','trinoClient','source_table','behaviors','getAudienceAttributes','getParent','personalization_services','updateActivation','stitching_keys','segment-batch','test','Master\x20table:\x20','createSegmentFolder','master','slice','getSegmentSQL','listSegmentFolders','Validating\x20attribute:\x20','trigger_event','message','5ypuopr','customersWithEvents','78HNOTsV','listActivations','some','child_key','criteria','relationships','set','enriched','listFolders','parentColumn','segment-realtime','name','27ToSrFI','all','parentFolder','onProgress','keyColumns','database','eventTables','client','\x27\x20not\x20found\x20in\x20','rootFolderId','sourceTableValid','has','getActivation','\x27:\x20','parent\x20segment','updateSegment','source','6AxStdK','resolveParentId','source_field','segmentFolderId','getBehaviorNames','listSegments','rowCount','buildTreeNodesForFolder','customers_with_events','createParentSegment','entity','ordered_set','realtimeDefToConfig','\x27\x20not\x20found','events','matchedCount','enrichDefWithRealtimeAndPersonalization','folder-segment','Folder\x20\x27','idStitching','single','journeyBundleId','get','parentTableName','string','allValid','schemaValid','Child\x20segment\x20not\x20found:\x20','sampleData','imported_batch','customers','folder','getConfig','updatedAt','Fetching\x20master\x20sample\x20data...','map','buildTreeFromEntities','Calculating\x20coverage\x20for:\x20','coveragePercent','resolveParentIdOrName','Fetching\x20sample\x20data\x20for:\x20','getAudienceBehaviors','isArray','getParentSegment','getEntityParentFolderId','\x27\x20not\x20found\x20in\x20parent\x20segment','attributes','16065RuVvre','schemaError','attribute','sections','length','data','Segment\x20\x27','split','pullParentYaml','getFolder','SHOW\x20TABLES\x20IN\x20','6514772uxbcNU','Calculating\x20statistics\x20for:\x20','Validating\x20RT\x20event\x20source\x20tables...','181314kutNvB','deleteSegment','join','parentFolderId','sourceTableError','pushParentYaml','17629066JnerJL','4670056VgBNKr','validateRealtimeConfig','interval','createParent','resolveSegmentId','Enriched\x20query:\x20','journey','listParents','entityToFolder','10KiEkHi','table','realtime','tdx.sdk.segment','isEnabled','createSegment','12omnnEj','Table','batchAttributes','runParentSegment','createFolder','updateParentSegment','executeQuery','behavior','schema','updateConfig','description','Validating\x20all\x20attributes\x20in\x20parallel...','SEGMENT_NOT_FOUND','198040VgFCQM','update','Path\x20cannot\x20be\x20empty','ambiguous','listFields','createJourneySegment','then','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','Resource\x20\x27','groupingName','total_events','getParentSegmentSQL','isAbsolute','Behavior\x20\x27','INVALID_ARGUMENT','deleteActivation','createdAt','previewParentYaml','listParentSegments','primary_key','202992CpnQKE','getParentFull','\x20in\x20parent\x20','Attribute\x20\x27','Counting\x20master\x20table\x20rows...','getParentSegmentFull','population','getSegmentFolder','filter','id_stitching','parent','list','connection','detectResourceType','segment','personalization','debug','push','find','parentDatabaseName','batch_segments','error','catch','validateParentYaml','getTdxInstance','listEntitiesByFolder','updateSegmentById','type','createActivation','Parent\x20segment\x20not\x20found:\x20','detectResourceTypeInFolder','listUnifiedWithJourneys','traversePath','entityToSegment','cdp_audience_','updateParent','_tdxInstance'];a125_0x1b75=function(){return _0x555094;};return a125_0x1b75();}import{deduplicateJourneysByBundle,entityToJourneyListItem,parseJourneyState}from'./journey.js';import{parsePath}from'./segment/segment-path-parser.js';import{pullSegments as a125_0x59ce03}from'./segment/pull-workflow.js';import{apiToDef,defToApi,serializeDef,parseDef}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';import{Logger}from'../utils/logger/index.js';const logger=Logger['of'](a125_0x1c7069(0x136));function a125_0x4108(_0x5d3a7b,_0x378d48){_0x5d3a7b=_0x5d3a7b-0xc1;const _0x1b75ab=a125_0x1b75();let _0x410883=_0x1b75ab[_0x5d3a7b];return _0x410883;}export class SegmentSDK{['client'];[a125_0x1c7069(0x182)];constructor(_0x1c8790){const _0x6509a9=a125_0x1c7069;this[_0x6509a9(0xdc)]=new CDPApiClient(_0x1c8790),this[_0x6509a9(0x182)]=new TrinoApiClient(_0x1c8790);}async[a125_0x1c7069(0x131)](){const _0x38e5a9=a125_0x1c7069;return await this[_0x38e5a9(0xdc)][_0x38e5a9(0x158)]();}async[a125_0x1c7069(0x186)](_0x5ac949){const _0xb45e3b=a125_0x1c7069;return await this['client'][_0xb45e3b(0x111)](_0x5ac949);}async['listSegments'](_0x1b2c27){const _0x3a2f2b=a125_0x1c7069;return await this[_0x3a2f2b(0xdc)][_0x3a2f2b(0xeb)](_0x1b2c27);}async[a125_0x1c7069(0x180)](_0x4371b2,_0xcf5435){const _0x146051=a125_0x1c7069;return await this[_0x146051(0xdc)][_0x146051(0x180)](_0x4371b2,_0xcf5435);}async[a125_0x1c7069(0x17f)](_0x4d5a40){const _0x31e540=a125_0x1c7069;return await this['client'][_0x31e540(0x17f)](_0x4d5a40);}async[a125_0x1c7069(0xd1)](_0x1d33ba){const _0x445581=a125_0x1c7069;return await this[_0x445581(0xdc)][_0x445581(0xc3)](_0x1d33ba);}async[a125_0x1c7069(0x11e)](_0x51bea6){const _0x531786=a125_0x1c7069;return await this[_0x531786(0xdc)][_0x531786(0x161)](_0x51bea6);}async[a125_0x1c7069(0xca)](_0x2c3ce3,_0xa8e406){const _0x5c96f6=a125_0x1c7069;return await this[_0x5c96f6(0xdc)][_0x5c96f6(0xca)](_0x2c3ce3,_0xa8e406);}async[a125_0x1c7069(0xe1)](_0x335c83,_0x307289,_0x4cd9eb){const _0x3e67aa=a125_0x1c7069;return await this['client'][_0x3e67aa(0xe1)](_0x335c83,_0x307289,_0x4cd9eb);}async[a125_0x1c7069(0x176)](_0x5ec72f,_0x294acf,_0x9aa208){const _0x2614b4=a125_0x1c7069;return await this[_0x2614b4(0xdc)][_0x2614b4(0x176)](_0x5ec72f,_0x294acf,_0x9aa208);}async['updateActivation'](_0x1c52cc,_0x597a86,_0x190479,_0x4db390){const _0x59bc54=a125_0x1c7069;return await this[_0x59bc54(0xdc)][_0x59bc54(0x188)](_0x1c52cc,_0x597a86,_0x190479,_0x4db390);}async[a125_0x1c7069(0x155)](_0x7e4383,_0xc720d3,_0x2a5a7d){const _0x35e229=a125_0x1c7069;return await this[_0x35e229(0xdc)][_0x35e229(0x155)](_0x7e4383,_0xc720d3,_0x2a5a7d);}async['getParentSQL'](_0x205495){const _0x38d79b=a125_0x1c7069;return await this[_0x38d79b(0xdc)][_0x38d79b(0x151)](_0x205495);}['getOutputDatabaseName'](_0x4174d2){const _0x2ceae3=a125_0x1c7069;return _0x2ceae3(0x17c)+_0x4174d2;}async['listOutputTables'](_0x3c736f){const _0xf2cbd=a125_0x1c7069,_0x2ed5e8=this['getOutputDatabaseName'](_0x3c736f),_0x51457a=_0xf2cbd(0x11f)+_0x2ed5e8,_0xfbe3fe=await this[_0xf2cbd(0x182)][_0xf2cbd(0x13f)](_0x51457a,{'catalog':'td','schema':_0x2ed5e8});return _0xfbe3fe[_0xf2cbd(0x11a)]['map'](_0x2aeecd=>({'name':_0x2aeecd[_0xf2cbd(0x13a)],'type':_0x2aeecd[_0xf2cbd(0x13a)]===_0xf2cbd(0x104)?_0xf2cbd(0x104):_0xf2cbd(0x140)}));}async[a125_0x1c7069(0xea)](_0x48d33d){const _0x4d7933=a125_0x1c7069,_0xda4fb5=await this[_0x4d7933(0xdc)][_0x4d7933(0x10f)](_0x48d33d);return _0xda4fb5[_0x4d7933(0x109)](_0x42dd6b=>_0x42dd6b['name']);}async[a125_0x1c7069(0xc2)](_0x422061,_0x35cbc0){const _0x11e5d5=a125_0x1c7069;return await this['client'][_0x11e5d5(0xc2)](_0x422061,_0x35cbc0);}async[a125_0x1c7069(0xe7)](_0x212484){const _0x20f155=a125_0x1c7069,_0x6e2299=await this['listParents'](),_0x25e995=_0x6e2299['find'](_0x340d3c=>_0x340d3c[_0x20f155(0x114)][_0x20f155(0xd4)]===_0x212484);if(!_0x25e995)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x20f155(0x177)+_0x212484);return _0x25e995['id'];}async['runParent'](_0x519042){const _0x46d9d0=a125_0x1c7069;let _0x312b68=_0x519042;return!/^\d+$/['test'](_0x519042)&&(_0x312b68=await this['resolveParentId'](_0x519042)),await this['client'][_0x46d9d0(0x13c)](_0x312b68);}async['resolveSegmentId'](_0x1bf378,_0x6909a5){const _0x31db7a=a125_0x1c7069,_0x4636ae=await this[_0x31db7a(0xeb)](_0x1bf378),_0x32cc5a=_0x4636ae[_0x31db7a(0x16c)](_0x1249ea=>_0x1249ea[_0x31db7a(0xd4)]===_0x6909a5);if(!_0x32cc5a)throw new SDKError(ErrorCode[_0x31db7a(0x145)],_0x31db7a(0x101)+_0x6909a5+'\x20in\x20parent\x20'+_0x1bf378);return _0x32cc5a['id'];}async['resolveFolderId'](_0x2b52e5,_0x334652){const _0x3960ec=a125_0x1c7069,_0x5d5a1b=await this[_0x3960ec(0xd1)](_0x2b52e5),_0x4459f1=_0x5d5a1b[_0x3960ec(0x16c)](_0x2504f3=>_0x2504f3[_0x3960ec(0xd4)]===_0x334652);if(!_0x4459f1)throw new SDKError(ErrorCode[_0x3960ec(0x145)],'Folder\x20not\x20found:\x20'+_0x334652+_0x3960ec(0x15c)+_0x2b52e5);return _0x4459f1['id'];}async[a125_0x1c7069(0x14a)](_0xce53a0){const _0x2190e3=a125_0x1c7069,_0x345606=await this['resolveParentIdOrName'](_0xce53a0),[_0x336d7c,_0x50ed66]=await Promise[_0x2190e3(0xd6)]([this[_0x2190e3(0xdc)][_0x2190e3(0x185)](_0x345606),this[_0x2190e3(0xdc)][_0x2190e3(0x10f)](_0x345606)]),_0x4afaf0=[];for(const _0x1f8e3e of _0x336d7c){_0x4afaf0[_0x2190e3(0x16b)]({'name':_0x1f8e3e['name'],'type':_0x1f8e3e[_0x2190e3(0x175)],'source':_0x2190e3(0x117),'parentDatabaseName':_0x1f8e3e[_0x2190e3(0x16d)],'parentTableName':_0x1f8e3e[_0x2190e3(0xfd)],'parentColumn':_0x1f8e3e[_0x2190e3(0xd2)],'groupingName':_0x1f8e3e[_0x2190e3(0x14f)]??undefined});}for(const _0x2c1b67 of _0x50ed66){const _0x39def1=_0x2c1b67['name'];if(_0x2c1b67[_0x2190e3(0x141)]&&Array[_0x2190e3(0x110)](_0x2c1b67[_0x2190e3(0x141)]))for(const _0x5807bf of _0x2c1b67[_0x2190e3(0x141)]){_0x5807bf['name']&&_0x5807bf[_0x2190e3(0x175)]&&_0x4afaf0[_0x2190e3(0x16b)]({'name':_0x39def1+'.'+_0x5807bf[_0x2190e3(0xd4)],'type':_0x5807bf[_0x2190e3(0x175)],'source':'behavior','behaviorName':_0x39def1,'parentDatabaseName':_0x2c1b67[_0x2190e3(0x16d)],'parentTableName':_0x2c1b67['parentTableName'],'parentColumn':_0x5807bf[_0x2190e3(0xd2)]});}}return _0x4afaf0;}async[a125_0x1c7069(0x12d)](_0x2b4d2f){const _0x59b340=a125_0x1c7069;return await this['client'][_0x59b340(0xef)](_0x2b4d2f);}async[a125_0x1c7069(0x17d)](_0xb73e0f,_0x37e638){const _0x1e3dac=a125_0x1c7069,_0x37b6f5=await this['resolveParentIdOrName'](_0xb73e0f);return await this[_0x1e3dac(0xdc)][_0x1e3dac(0x13e)](_0x37b6f5,_0x37e638);}async['getParentFull'](_0x4c389e){const _0x57541c=a125_0x1c7069,_0x19f016=await this['resolveParentIdOrName'](_0x4c389e);return await this[_0x57541c(0xdc)][_0x57541c(0x15f)](_0x19f016);}async[a125_0x1c7069(0x11d)](_0x22b7fe){const _0x2a7b0e=a125_0x1c7069,_0x327685=await this[_0x2a7b0e(0x15b)](_0x22b7fe),_0x283b5c=apiToDef(_0x327685);return await this[_0x2a7b0e(0xf6)](_0x283b5c,_0x327685['id']),serializeDef(_0x283b5c);}async[a125_0x1c7069(0x128)](_0x515d0d){const _0x4b09f7=a125_0x1c7069,_0x424579=typeof _0x515d0d==='string'?parseDef(_0x515d0d):_0x515d0d,_0x464ef5=defToApi(_0x424579);let _0x3b3124=null,_0x218381='';try{_0x3b3124=await this[_0x4b09f7(0x15b)](_0x424579[_0x4b09f7(0xd4)]);const _0x91a6a8=apiToDef(_0x3b3124);await this['enrichDefWithRealtimeAndPersonalization'](_0x91a6a8,_0x3b3124['id']),_0x218381=serializeDef(_0x91a6a8);}catch{}const _0x2feafc=serializeDef(_0x424579),_0xae40c2=generateDiff(_0x218381,_0x2feafc),_0x174190=formatDiffWithColors(_0xae40c2),_0x5abaaa=_0x3b3124===null,_0xe6ec24=hasChanges(_0xae40c2),_0x6562c9={'isNew':_0x5abaaa,'id':_0x3b3124?.['id']||'','name':_0x424579['name'],'diff':_0xae40c2,'diffFormatted':_0x174190,'hasChanges':_0xe6ec24},_0x50f1b2=async()=>{const _0x3c42c8=_0x4b09f7;let _0x214785;_0x5abaaa?_0x214785=await this[_0x3c42c8(0x12d)](_0x464ef5):_0x214785=await this[_0x3c42c8(0x17d)](_0x3b3124['id'],_0x464ef5);const _0x14ef7e=_0x214785['id']||_0x3b3124?.['id']||'';if(_0x424579[_0x3c42c8(0x135)]&&_0x14ef7e){const _0x3a4979=this['getTdxInstance'](),_0x3235d9=this['realtimeDefToConfig'](_0x424579[_0x3c42c8(0x135)]);await _0x3a4979['realtime'][_0x3c42c8(0x142)](_0x14ef7e,_0x3235d9);}if(_0x424579[_0x3c42c8(0x187)]&&_0x424579[_0x3c42c8(0x187)][_0x3c42c8(0x119)]>0x0&&_0x14ef7e){const _0x2e0a7c=this['getTdxInstance']();await this['syncPersonalizationServices'](_0x2e0a7c,_0x14ef7e,_0x424579[_0x3c42c8(0x187)]);}return _0x214785;};return{..._0x6562c9,'apply':_0x50f1b2};}async[a125_0x1c7069(0x171)](_0x5d7d05,_0x1f1794={}){const _0x3dc6fb=a125_0x1c7069,_0x416585=typeof _0x5d7d05===_0x3dc6fb(0xfe)?parseDef(_0x5d7d05):_0x5d7d05,_0x1ad269=[];let _0x197087=!![];const _0x48f832=_0x4306ba=>_0x1f1794[_0x3dc6fb(0xd8)]?.(_0x4306ba),_0x538ce9={'name':_0x416585[_0x3dc6fb(0xd4)],'master':{'database':_0x416585['master'][_0x3dc6fb(0xda)],'table':_0x416585['master'][_0x3dc6fb(0x134)],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x1ad269,'allValid':!![]},_0x4b4296=async _0x324d26=>{const _0xd9fd52=_0x3dc6fb;try{const _0x2997c9=await this[_0xd9fd52(0x182)]['executeQuery'](_0x324d26);return{'data':_0x2997c9[_0xd9fd52(0x11a)]};}catch(_0x3135a7){const _0xdb545e=_0x3135a7 instanceof Error?_0x3135a7['message']:String(_0x3135a7);return{'data':[],'error':_0xdb545e};}};if(_0x1f1794[_0x3dc6fb(0x135)]){_0x538ce9[_0x3dc6fb(0x135)]=await this[_0x3dc6fb(0x12b)](_0x416585,_0x4b4296,_0x48f832);if(_0x538ce9[_0x3dc6fb(0x135)][_0x3dc6fb(0xf4)])for(const _0x54e61a of _0x538ce9[_0x3dc6fb(0x135)][_0x3dc6fb(0xf4)]){_0x54e61a[_0x3dc6fb(0x127)]&&(_0x1ad269[_0x3dc6fb(0x16b)]('RT\x20event\x20\x27'+_0x54e61a[_0x3dc6fb(0xd4)]+_0x3dc6fb(0xe2)+_0x54e61a['sourceTableError']),_0x197087=![]);}return _0x538ce9[_0x3dc6fb(0x18e)][_0x3dc6fb(0x100)]=!![],_0x538ce9[_0x3dc6fb(0xff)]=_0x197087,_0x538ce9;}_0x48f832('Validating\x20master\x20table:\x20'+_0x416585[_0x3dc6fb(0x18e)][_0x3dc6fb(0xda)]+'.'+_0x416585[_0x3dc6fb(0x18e)][_0x3dc6fb(0x134)]);const _0xf6aa4=generateSchemaValidationSQL(_0x416585[_0x3dc6fb(0x18e)][_0x3dc6fb(0xda)],_0x416585[_0x3dc6fb(0x18e)][_0x3dc6fb(0x134)]),_0x4434e5=await _0x4b4296(_0xf6aa4);if(_0x4434e5['error'])_0x538ce9[_0x3dc6fb(0x18e)][_0x3dc6fb(0x100)]=![],_0x538ce9['master'][_0x3dc6fb(0x116)]=_0x4434e5['error'],_0x1ad269[_0x3dc6fb(0x16b)](_0x3dc6fb(0x18c)+_0x4434e5[_0x3dc6fb(0x16f)]),_0x197087=![];else{_0x538ce9[_0x3dc6fb(0x18e)][_0x3dc6fb(0x100)]=!![],_0x48f832(_0x3dc6fb(0x15e));const _0x4956d6=await _0x4b4296(generateMasterCountSQL(_0x416585));!_0x4956d6[_0x3dc6fb(0x16f)]&&_0x4956d6[_0x3dc6fb(0x11a)]['length']>0x0&&(_0x538ce9[_0x3dc6fb(0x18e)][_0x3dc6fb(0xec)]=_0x4956d6[_0x3dc6fb(0x11a)][0x0]['row_count']);}if(_0x1f1794[_0x3dc6fb(0x18e)])return _0x538ce9[_0x3dc6fb(0xff)]=_0x197087,_0x538ce9;const _0xa8c9b8=async _0x39b78e=>{const _0x3504f3=_0x3dc6fb,_0x345bcb={'name':_0x39b78e['name'],'database':_0x39b78e[_0x3504f3(0xe5)][_0x3504f3(0xda)],'table':_0x39b78e[_0x3504f3(0xe5)][_0x3504f3(0x134)],'joinKey':_0x39b78e[_0x3504f3(0x125)][_0x3504f3(0xcc)],'foreignKey':_0x39b78e[_0x3504f3(0x125)]['parent_key'],'columns':getAttributeColumns(_0x39b78e),'schemaValid':![]};_0x48f832(_0x3504f3(0xc4)+_0x39b78e['name']);const _0x4f3399=await _0x4b4296(generateAttributeSchemaSQL(_0x416585,_0x39b78e));if(_0x4f3399[_0x3504f3(0x16f)])_0x345bcb[_0x3504f3(0x116)]=_0x4f3399[_0x3504f3(0x16f)];else{_0x345bcb['schemaValid']=!![],_0x48f832(_0x3504f3(0x10b)+_0x39b78e[_0x3504f3(0xd4)]);const _0x4b9dd2=await _0x4b4296(generateAttributeCoverageSQL(_0x416585,_0x39b78e));!_0x4b9dd2[_0x3504f3(0x16f)]&&_0x4b9dd2[_0x3504f3(0x11a)][_0x3504f3(0x119)]>0x0&&(_0x345bcb[_0x3504f3(0xf5)]=_0x4b9dd2[_0x3504f3(0x11a)][0x0]['matched_count'],_0x538ce9[_0x3504f3(0x18e)][_0x3504f3(0xec)]&&_0x538ce9[_0x3504f3(0x18e)][_0x3504f3(0xec)]>0x0&&(_0x345bcb[_0x3504f3(0x10c)]=_0x345bcb[_0x3504f3(0xf5)]/_0x538ce9[_0x3504f3(0x18e)][_0x3504f3(0xec)]*0x64));}return _0x345bcb;},_0x5194d3=async(_0x22befa,_0xaa3d8e)=>{const _0x481f8a=_0x3dc6fb,_0x234d0f={'name':_0x22befa[_0x481f8a(0xd4)],'database':_0x22befa[_0x481f8a(0xe5)][_0x481f8a(0xda)],'table':_0x22befa[_0x481f8a(0xe5)]['table'],'joinKey':_0x22befa[_0x481f8a(0x125)][_0x481f8a(0xcc)],'foreignKey':_0x22befa[_0x481f8a(0x125)]['parent_key'],'columns':getBehaviorColumns(_0x22befa),'schemaValid':![]};_0x48f832('Validating\x20behavior:\x20'+_0x22befa[_0x481f8a(0xd4)]);const _0x2b8c58=await _0x4b4296(generateBehaviorSchemaSQL(_0x416585,_0x22befa));if(_0x2b8c58['error'])_0x234d0f[_0x481f8a(0x116)]=_0x2b8c58[_0x481f8a(0x16f)];else{_0x234d0f[_0x481f8a(0x100)]=!![],_0x48f832(_0x481f8a(0x121)+_0x22befa[_0x481f8a(0xd4)]+'\x20('+_0xaa3d8e+')');const _0x288daa=await _0x4b4296(generateBehaviorStatsSQL(_0x416585,_0x22befa,_0xaa3d8e));!_0x288daa[_0x481f8a(0x16f)]&&_0x288daa[_0x481f8a(0x11a)][_0x481f8a(0x119)]>0x0&&(_0x234d0f['customersWithEvents']=_0x288daa[_0x481f8a(0x11a)][0x0][_0x481f8a(0xee)],_0x234d0f['totalEvents']=_0x288daa['data'][0x0][_0x481f8a(0x150)],_0x538ce9[_0x481f8a(0x18e)][_0x481f8a(0xec)]&&_0x538ce9[_0x481f8a(0x18e)][_0x481f8a(0xec)]>0x0&&(_0x234d0f['customerPercent']=_0x234d0f[_0x481f8a(0xc8)]/_0x538ce9[_0x481f8a(0x18e)][_0x481f8a(0xec)]*0x64));}return _0x234d0f;},_0x431a7f=(_0x4e99bc,_0x4c8121)=>{const _0x130101=_0x3dc6fb;_0x538ce9['attributes']=_0x4e99bc,_0x538ce9[_0x130101(0x184)]=_0x4c8121;for(const _0x52e0b8 of _0x4e99bc){!_0x52e0b8[_0x130101(0x100)]&&(_0x1ad269['push'](_0x130101(0x15d)+_0x52e0b8[_0x130101(0xd4)]+'\x27:\x20'+_0x52e0b8['schemaError']),_0x197087=![]);}for(const _0x15db31 of _0x4c8121){!_0x15db31[_0x130101(0x100)]&&(_0x1ad269[_0x130101(0x16b)](_0x130101(0x153)+_0x15db31[_0x130101(0xd4)]+_0x130101(0xe2)+_0x15db31['schemaError']),_0x197087=![]);}},_0x495897=_0x1f1794[_0x3dc6fb(0x12c)]||DEFAULT_TIME_RANGE;if(typeof _0x1f1794[_0x3dc6fb(0x117)]===_0x3dc6fb(0xfe)){const _0x3d6510=findAttributeByName(_0x416585,_0x1f1794[_0x3dc6fb(0x117)]);if(!_0x3d6510)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x3dc6fb(0x15d)+_0x1f1794['attribute']+_0x3dc6fb(0xf3));const _0x464568=await _0xa8c9b8(_0x3d6510);return _0x431a7f([_0x464568],[]),_0x538ce9[_0x3dc6fb(0xff)]=_0x197087,_0x538ce9;}if(_0x1f1794['attribute']===!![]){_0x48f832(_0x3dc6fb(0x144));const _0x174f0d=await Promise[_0x3dc6fb(0xd6)]((_0x416585[_0x3dc6fb(0x114)]||[])['map'](_0x15fc31=>_0xa8c9b8(_0x15fc31)));return _0x431a7f(_0x174f0d,[]),_0x538ce9[_0x3dc6fb(0xff)]=_0x197087,_0x538ce9;}if(typeof _0x1f1794[_0x3dc6fb(0x140)]===_0x3dc6fb(0xfe)){const _0x197eed=findBehaviorByName(_0x416585,_0x1f1794[_0x3dc6fb(0x140)]);if(!_0x197eed)throw new SDKError(ErrorCode[_0x3dc6fb(0x145)],_0x3dc6fb(0x153)+_0x1f1794[_0x3dc6fb(0x140)]+_0x3dc6fb(0xf3));const _0x1a5200=await _0x5194d3(_0x197eed,_0x495897);return _0x431a7f([],[_0x1a5200]),_0x538ce9[_0x3dc6fb(0xff)]=_0x197087,_0x538ce9;}if(_0x1f1794[_0x3dc6fb(0x140)]===!![]){_0x48f832('Validating\x20all\x20behaviors\x20in\x20parallel...');const _0x970968=await Promise[_0x3dc6fb(0xd6)]((_0x416585[_0x3dc6fb(0x184)]||[])[_0x3dc6fb(0x109)](_0x5d9b15=>_0x5194d3(_0x5d9b15,_0x495897)));return _0x431a7f([],_0x970968),_0x538ce9['allValid']=_0x197087,_0x538ce9;}if(_0x1f1794[_0x3dc6fb(0xd0)]){_0x48f832(_0x3dc6fb(0x144));const _0x23a9d5=await Promise[_0x3dc6fb(0xd6)]((_0x416585['attributes']||[])[_0x3dc6fb(0x109)](_0x2f3f70=>_0xa8c9b8(_0x2f3f70)));return _0x431a7f(_0x23a9d5,[]),_0x538ce9['allValid']=_0x197087,_0x538ce9;}_0x48f832('Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...');const [_0x322e9c,_0x20ea9a]=await Promise[_0x3dc6fb(0xd6)]([Promise[_0x3dc6fb(0xd6)]((_0x416585['attributes']||[])['map'](_0xdf1dda=>_0xa8c9b8(_0xdf1dda))),Promise['all']((_0x416585[_0x3dc6fb(0x184)]||[])[_0x3dc6fb(0x109)](_0x5d4e3c=>_0x5194d3(_0x5d4e3c,_0x495897)))]);_0x431a7f(_0x322e9c,_0x20ea9a);if(_0x416585['realtime']||_0x416585[_0x3dc6fb(0x187)]){_0x538ce9[_0x3dc6fb(0x135)]=await this[_0x3dc6fb(0x12b)](_0x416585,_0x4b4296,_0x48f832);if(_0x538ce9[_0x3dc6fb(0x135)][_0x3dc6fb(0xf4)])for(const _0x8019a6 of _0x538ce9['realtime'][_0x3dc6fb(0xf4)]){_0x8019a6[_0x3dc6fb(0x127)]&&(_0x1ad269[_0x3dc6fb(0x16b)]('RT\x20event\x20\x27'+_0x8019a6['name']+'\x27:\x20'+_0x8019a6[_0x3dc6fb(0x127)]),_0x197087=![]);}}return _0x538ce9[_0x3dc6fb(0xff)]=_0x197087,_0x538ce9;}async[a125_0x1c7069(0x157)](_0x3a770a,_0x28cf3a={}){const _0x4d726a=a125_0x1c7069,_0x3435e2=typeof _0x3a770a===_0x4d726a(0xfe)?parseDef(_0x3a770a):_0x3a770a,_0x38ec1e=[];let _0x2ee087=!![];const _0x4050c0=_0x1ac606=>_0x28cf3a[_0x4d726a(0xd8)]?.(_0x1ac606),_0x173126={'name':_0x3435e2[_0x4d726a(0xd4)],'master':{'database':_0x3435e2[_0x4d726a(0x18e)][_0x4d726a(0xda)],'table':_0x3435e2[_0x4d726a(0x18e)][_0x4d726a(0x134)],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0x38ec1e,'allValid':!![]},_0x291420=async _0x2508f0=>{const _0x130f0e=_0x4d726a;try{const _0x52350d=await this[_0x130f0e(0x182)][_0x130f0e(0x13f)](_0x2508f0);return{'data':_0x52350d[_0x130f0e(0x11a)]};}catch(_0x3a2fd6){const _0x10c2bd=_0x3a2fd6 instanceof Error?_0x3a2fd6[_0x130f0e(0xc6)]:String(_0x3a2fd6);return{'data':[],'error':_0x10c2bd};}};if(_0x28cf3a[_0x4d726a(0x18e)]){_0x4050c0(_0x4d726a(0x108));const _0x76fdcf=generateMasterSampleSQL(_0x3435e2,DEFAULT_SAMPLE_LIMIT),_0x3f8908=await _0x291420(_0x76fdcf);return!_0x3f8908[_0x4d726a(0x16f)]?_0x173126[_0x4d726a(0x102)]=_0x3f8908[_0x4d726a(0x11a)]:(_0x38ec1e[_0x4d726a(0x16b)](_0x4d726a(0x18c)+_0x3f8908[_0x4d726a(0x16f)]),_0x2ee087=![]),_0x173126[_0x4d726a(0xff)]=_0x2ee087,_0x173126;}if(_0x28cf3a['attribute']){const _0x54261f=findAttributeByName(_0x3435e2,_0x28cf3a[_0x4d726a(0x117)]);if(!_0x54261f)throw new SDKError(ErrorCode[_0x4d726a(0x145)],'Attribute\x20\x27'+_0x28cf3a['attribute']+_0x4d726a(0xf3));_0x4050c0('Fetching\x20sample\x20data\x20for:\x20'+_0x54261f[_0x4d726a(0xd4)]);const _0x48b26e=generateAttributeSampleSQL(_0x3435e2,_0x54261f,DEFAULT_SAMPLE_LIMIT),_0x58235b=await _0x291420(_0x48b26e);return!_0x58235b[_0x4d726a(0x16f)]?_0x173126[_0x4d726a(0x102)]=_0x58235b[_0x4d726a(0x11a)]:(_0x38ec1e[_0x4d726a(0x16b)]('Attribute\x20\x27'+_0x54261f[_0x4d726a(0xd4)]+_0x4d726a(0xe2)+_0x58235b[_0x4d726a(0x16f)]),_0x2ee087=![]),_0x173126[_0x4d726a(0xff)]=_0x2ee087,_0x173126;}if(_0x28cf3a[_0x4d726a(0x140)]){const _0x1ddefc=findBehaviorByName(_0x3435e2,_0x28cf3a[_0x4d726a(0x140)]);if(!_0x1ddefc)throw new SDKError(ErrorCode[_0x4d726a(0x145)],_0x4d726a(0x153)+_0x28cf3a[_0x4d726a(0x140)]+_0x4d726a(0xf3));const _0x156c2b=_0x28cf3a['interval']||DEFAULT_TIME_RANGE;_0x4050c0(_0x4d726a(0x10e)+_0x1ddefc[_0x4d726a(0xd4)]+'\x20('+_0x156c2b+')');const _0x491462=generateBehaviorSampleSQL(_0x3435e2,_0x1ddefc,DEFAULT_SAMPLE_LIMIT,_0x156c2b),_0x1cc5e3=await _0x291420(_0x491462);return!_0x1cc5e3[_0x4d726a(0x16f)]?_0x173126[_0x4d726a(0x102)]=_0x1cc5e3[_0x4d726a(0x11a)]:(_0x38ec1e[_0x4d726a(0x16b)](_0x4d726a(0x153)+_0x1ddefc[_0x4d726a(0xd4)]+_0x4d726a(0xe2)+_0x1cc5e3[_0x4d726a(0x16f)]),_0x2ee087=![]),_0x173126[_0x4d726a(0xff)]=_0x2ee087,_0x173126;}if(_0x28cf3a['enriched']){_0x4050c0('Fetching\x20enriched\x20master\x20data...');const _0x40170e=generateEnrichedSQL(_0x3435e2,DEFAULT_SAMPLE_LIMIT),_0x12b74c=await _0x291420(_0x40170e);return!_0x12b74c[_0x4d726a(0x16f)]?_0x173126[_0x4d726a(0x102)]=_0x12b74c[_0x4d726a(0x11a)]:(_0x38ec1e['push'](_0x4d726a(0x12f)+_0x12b74c[_0x4d726a(0x16f)]),_0x2ee087=![]),_0x173126['allValid']=_0x2ee087,_0x173126;}return _0x173126[_0x4d726a(0xff)]=_0x2ee087,_0x173126;}async[a125_0x1c7069(0x138)](_0x1e6eb0,_0x1d9c49){const _0x2a9586=a125_0x1c7069;return await this[_0x2a9586(0xdc)][_0x2a9586(0x138)](_0x1e6eb0,_0x1d9c49);}async[a125_0x1c7069(0x14b)](_0xa63c3){const _0xa202cb=a125_0x1c7069;return await this[_0xa202cb(0xdc)][_0xa202cb(0x14b)](_0xa63c3);}async[a125_0x1c7069(0x174)](_0x51d698,_0x221581,_0x521e6d){const _0x50e929=a125_0x1c7069;return await this[_0x50e929(0xdc)][_0x50e929(0xe4)](_0x51d698,_0x221581,_0x521e6d);}async[a125_0x1c7069(0x124)](_0xbc90ee){const _0x386725=a125_0x1c7069;return await this[_0x386725(0xdc)][_0x386725(0x124)](_0xbc90ee);}async[a125_0x1c7069(0x13d)](_0x2e3b07,_0x5c8cf4){const _0x5c02a5=a125_0x1c7069,_0x247e57=await this[_0x5c02a5(0x10d)](_0x2e3b07);return await this[_0x5c02a5(0xdc)][_0x5c02a5(0x18d)](_0x247e57,_0x5c8cf4);}async[a125_0x1c7069(0x10d)](_0x5b0889){const _0x17e294=a125_0x1c7069;if(/^\d+$/[_0x17e294(0x18b)](_0x5b0889))return _0x5b0889;return await this['resolveParentId'](_0x5b0889);}async[a125_0x1c7069(0x167)](_0xb4f5a7,_0x16ac6b){const _0x197be9=a125_0x1c7069,[_0x25a06e,_0x401312]=await Promise[_0x197be9(0xd6)]([this['resolveFolderId'](_0xb4f5a7,_0x16ac6b)[_0x197be9(0x14c)](()=>!![])['catch'](()=>![]),this[_0x197be9(0x12e)](_0xb4f5a7,_0x16ac6b)[_0x197be9(0x14c)](()=>!![])[_0x197be9(0x170)](()=>![])]);if(_0x25a06e&&_0x401312)return'ambiguous';else{if(_0x25a06e)return _0x197be9(0x105);else{if(_0x401312)return _0x197be9(0x168);}}throw new SDKError(ErrorCode[_0x197be9(0x145)],_0x197be9(0x14e)+_0x16ac6b+_0x197be9(0x113));}async[a125_0x1c7069(0x178)](_0x5ba89f,_0xe23dfb,_0x4feeb6){const _0x410e67=a125_0x1c7069,[_0x4d0dd1,_0x128d05]=await Promise[_0x410e67(0xd6)]([this['listFolders'](_0x5ba89f),this[_0x410e67(0xeb)](_0x5ba89f)]),_0x3cf4c8=_0x4feeb6?_0x4d0dd1[_0x410e67(0x162)](_0x482542=>_0x482542[_0x410e67(0x126)]===_0x4feeb6):_0x4d0dd1[_0x410e67(0x162)](_0x51dc44=>!_0x51dc44['parentFolderId']),_0x17726e=_0x4feeb6?_0x128d05[_0x410e67(0x162)](_0x16db3c=>_0x16db3c[_0x410e67(0xe9)]===_0x4feeb6):_0x128d05['filter'](_0x32621b=>!_0x32621b[_0x410e67(0xe9)]),_0x5d07e4=_0x3cf4c8[_0x410e67(0xcb)](_0x2f8f70=>_0x2f8f70[_0x410e67(0xd4)]===_0xe23dfb),_0x2ef5a2=_0x17726e[_0x410e67(0xcb)](_0x53c67=>_0x53c67[_0x410e67(0xd4)]===_0xe23dfb);if(_0x5d07e4&&_0x2ef5a2)return _0x410e67(0x149);else{if(_0x5d07e4)return _0x410e67(0x105);else{if(_0x2ef5a2)return _0x410e67(0x168);}}throw new SDKError(ErrorCode[_0x410e67(0x145)],_0x410e67(0x14e)+_0xe23dfb+_0x410e67(0xdd)+(_0x4feeb6?'folder':_0x410e67(0xe3)));}async['traversePath'](_0x5c0a4e){const _0x4b68eb=a125_0x1c7069;if(_0x5c0a4e[_0x4b68eb(0x119)]===0x0)throw new SDKError(ErrorCode[_0x4b68eb(0x154)],_0x4b68eb(0x148));const _0x5c4f84=_0x5c0a4e[0x0],_0x10a8e4=await this[_0x4b68eb(0xe7)](_0x5c4f84);if(_0x5c0a4e[_0x4b68eb(0x119)]===0x1)return{'parentId':_0x10a8e4,'parentName':_0x5c4f84,'type':_0x4b68eb(0x164),'fullPath':_0x5c4f84};const _0x3ce908=await this[_0x4b68eb(0x15b)](_0x10a8e4),_0x54ddce=_0x3ce908[_0x4b68eb(0xde)],_0x5b814f=[];let _0x1742b3=_0x54ddce;for(let _0x1c71d5=0x1;_0x1c71d5<_0x5c0a4e[_0x4b68eb(0x119)]-0x1;_0x1c71d5++){const _0x278ff4=_0x5c0a4e[_0x1c71d5],_0x594ca9=await this[_0x4b68eb(0xd1)](_0x10a8e4),_0x4063f4=_0x1742b3?_0x594ca9[_0x4b68eb(0x16c)](_0x2f514b=>_0x2f514b[_0x4b68eb(0xd4)]===_0x278ff4&&_0x2f514b[_0x4b68eb(0x126)]===_0x1742b3):_0x594ca9[_0x4b68eb(0x16c)](_0x454b34=>_0x454b34[_0x4b68eb(0xd4)]===_0x278ff4&&!_0x454b34[_0x4b68eb(0x126)]);if(!_0x4063f4)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x4b68eb(0xf8)+_0x278ff4+'\x27\x20not\x20found\x20in\x20path');_0x5b814f[_0x4b68eb(0x16b)](_0x278ff4),_0x1742b3=_0x4063f4['id'];}const _0x533e35=_0x5c0a4e[_0x5c0a4e[_0x4b68eb(0x119)]-0x1],_0x3f402a=await this['detectResourceTypeInFolder'](_0x10a8e4,_0x533e35,_0x1742b3);if(_0x3f402a===_0x4b68eb(0x149)||_0x3f402a===_0x4b68eb(0x105)){const _0x3cfd4e=await this['listFolders'](_0x10a8e4),_0x1bd658=_0x1742b3?_0x3cfd4e['find'](_0xd3a26c=>_0xd3a26c[_0x4b68eb(0xd4)]===_0x533e35&&_0xd3a26c['parentFolderId']===_0x1742b3):_0x3cfd4e[_0x4b68eb(0x16c)](_0x4863c7=>_0x4863c7[_0x4b68eb(0xd4)]===_0x533e35&&!_0x4863c7[_0x4b68eb(0x126)]);if(!_0x1bd658)throw new SDKError(ErrorCode[_0x4b68eb(0x145)],_0x4b68eb(0xf8)+_0x533e35+_0x4b68eb(0xf3));return _0x5b814f[_0x4b68eb(0x16b)](_0x533e35),{'parentId':_0x10a8e4,'parentName':_0x5c4f84,'folderId':_0x1bd658['id'],'folderPath':_0x5b814f,'type':_0x4b68eb(0x105),'fullPath':_0x5c0a4e['join']('/')};}else{const _0x11eb95=await this['listSegments'](_0x10a8e4),_0x80e378=_0x1742b3?_0x11eb95[_0x4b68eb(0x16c)](_0x5cf1c0=>_0x5cf1c0[_0x4b68eb(0xd4)]===_0x533e35&&_0x5cf1c0[_0x4b68eb(0xe9)]===_0x1742b3):_0x11eb95[_0x4b68eb(0x16c)](_0x4b26ec=>_0x4b26ec[_0x4b68eb(0xd4)]===_0x533e35&&!_0x4b26ec[_0x4b68eb(0xe9)]);if(!_0x80e378)throw new SDKError(ErrorCode[_0x4b68eb(0x145)],_0x4b68eb(0x11b)+_0x533e35+'\x27\x20not\x20found');return{'parentId':_0x10a8e4,'parentName':_0x5c4f84,'folderId':_0x1742b3,'folderPath':_0x5b814f[_0x4b68eb(0x119)]>0x0?_0x5b814f:undefined,'segmentId':_0x80e378['id'],'segmentName':_0x533e35,'type':_0x4b68eb(0x168),'fullPath':_0x5c0a4e[_0x4b68eb(0x125)]('/')};}}async['resolvePathToResource'](_0x1168f0){const _0x1c1b90=a125_0x1c7069,_0x23e49e=parsePath(_0x1168f0);if(!_0x23e49e[_0x1c1b90(0x152)])throw new SDKError(ErrorCode[_0x1c1b90(0x154)],_0x1c1b90(0x14d));return await this[_0x1c1b90(0x17a)](_0x23e49e['segments']);}async[a125_0x1c7069(0x179)](_0x21898d,_0x2ccc6e){const _0x5871da=a125_0x1c7069;let _0x2fef00=_0x2ccc6e;if(!_0x2fef00){const _0x18c0bb=await this[_0x5871da(0x15b)](_0x21898d);_0x2fef00=_0x18c0bb['rootFolderId'];}if(!_0x2fef00)return{'folders':[],'segments':[],'journeys':[]};const _0x442cc4=await this['client'][_0x5871da(0x173)](_0x2fef00,0x1,![]),_0x212656=_0x442cc4[_0x5871da(0x11a)],_0x51ab8e=_0x212656[_0x5871da(0x162)](_0x47a88c=>{if(_0x47a88c['id']===_0x2fef00)return![];const _0x409d79=this['getEntityParentFolderId'](_0x47a88c);return _0x409d79===_0x2fef00||!_0x409d79;}),_0x135aa1=_0x51ab8e[_0x5871da(0x162)](_0x5248f1=>_0x5248f1[_0x5871da(0x175)]===_0x5871da(0xf7))[_0x5871da(0x109)](_0x2cf51e=>this[_0x5871da(0x132)](_0x2cf51e,_0x21898d)),_0x280964=_0x51ab8e['filter'](_0x24d240=>_0x24d240[_0x5871da(0x175)]==='segment-batch'||_0x24d240[_0x5871da(0x175)]===_0x5871da(0xd3))[_0x5871da(0x109)](_0x1ec080=>this[_0x5871da(0x17b)](_0x1ec080,_0x21898d)),_0x486779=_0x51ab8e['filter'](_0x46e4e2=>_0x46e4e2[_0x5871da(0x175)]===_0x5871da(0x130)),_0x293936=_0x486779[_0x5871da(0x109)](_0x459ce4=>({'journeyBundleId':_0x459ce4[_0x5871da(0x114)][_0x5871da(0xfb)],'versionNumber':_0x459ce4[_0x5871da(0x114)]['versionNumber'],'id':_0x459ce4['id'],'entity':_0x459ce4})),_0x3bb297=deduplicateJourneysByBundle(_0x293936),_0x67d585=_0x3bb297[_0x5871da(0x109)](_0x2c68d7=>entityToJourneyListItem(_0x2c68d7[_0x5871da(0xf0)],_0x21898d));return{'folders':_0x135aa1,'segments':_0x280964,'journeys':_0x67d585};}[a125_0x1c7069(0x132)](_0x2f3d67,_0xa376c7){const _0x1d6442=a125_0x1c7069;return{'audienceId':_0xa376c7,'id':_0x2f3d67['id'],'name':_0x2f3d67[_0x1d6442(0x114)]['name'],'parentFolderId':_0x2f3d67[_0x1d6442(0x114)][_0x1d6442(0x126)]??_0x2f3d67['relationships']?.[_0x1d6442(0xd7)]?.[_0x1d6442(0x11a)]?.['id']??null,'description':_0x2f3d67[_0x1d6442(0x114)][_0x1d6442(0x143)]??null,'createdAt':_0x2f3d67[_0x1d6442(0x114)][_0x1d6442(0x156)],'updatedAt':_0x2f3d67['attributes']['updatedAt']};}['entityToSegment'](_0x1be46c,_0x49041b){const _0x2ee4ac=a125_0x1c7069;return{'audienceId':_0x49041b,'id':_0x1be46c['id'],'name':_0x1be46c['attributes']['name'],'description':_0x1be46c[_0x2ee4ac(0x114)][_0x2ee4ac(0x143)]??undefined,'realtime':_0x1be46c[_0x2ee4ac(0x175)]==='segment-realtime','segmentFolderId':_0x1be46c[_0x2ee4ac(0x114)]['segmentFolderId']??_0x1be46c[_0x2ee4ac(0xce)]?.[_0x2ee4ac(0xd7)]?.[_0x2ee4ac(0x11a)]?.['id']??undefined,'population':_0x1be46c[_0x2ee4ac(0x114)][_0x2ee4ac(0x160)],'createdAt':_0x1be46c[_0x2ee4ac(0x114)][_0x2ee4ac(0x156)],'updatedAt':_0x1be46c[_0x2ee4ac(0x114)][_0x2ee4ac(0x107)]};}async['listRecursive'](_0x32aad9,_0x2dfb55,_0x4fdf6f,_0x3c7bcb=0xa){const _0x3d4c82=a125_0x1c7069;let _0x130a97=_0x2dfb55;if(!_0x130a97){const _0x330751=await this[_0x3d4c82(0x15b)](_0x32aad9);_0x130a97=_0x330751[_0x3d4c82(0xde)];}if(!_0x130a97)return[];const _0x3f890e=await this[_0x3d4c82(0xdc)]['listEntitiesByFolder'](_0x130a97,_0x3c7bcb,![]),_0x5da748=_0x3f890e[_0x3d4c82(0x11a)];return this['buildTreeFromEntities'](_0x5da748,_0x130a97);}[a125_0x1c7069(0x10a)](_0x2f9d96,_0x481388){const _0x4b7ab4=a125_0x1c7069,_0x3ecaaf=new Map();for(const _0x423a0f of _0x2f9d96){if(_0x423a0f['type']==='folder-segment'&&_0x423a0f['id']===_0x481388)continue;const _0x26c55f=this['getEntityParentFolderId'](_0x423a0f)??_0x481388;!_0x3ecaaf[_0x4b7ab4(0xe0)](_0x26c55f)&&_0x3ecaaf[_0x4b7ab4(0xcf)](_0x26c55f,[]),_0x3ecaaf[_0x4b7ab4(0xfc)](_0x26c55f)['push'](_0x423a0f);}return this[_0x4b7ab4(0xed)](_0x481388,_0x3ecaaf);}[a125_0x1c7069(0x112)](_0x284896){const _0x54a023=a125_0x1c7069;if(_0x284896['relationships']?.[_0x54a023(0xd7)]?.[_0x54a023(0x11a)]?.['id'])return _0x284896[_0x54a023(0xce)][_0x54a023(0xd7)][_0x54a023(0x11a)]['id'];return _0x284896[_0x54a023(0x114)][_0x54a023(0x126)]??_0x284896[_0x54a023(0x114)]['segmentFolderId']??undefined;}[a125_0x1c7069(0xed)](_0x153c12,_0x105b57){const _0x5e38e4=a125_0x1c7069,_0x3ecdd8=_0x105b57[_0x5e38e4(0xfc)](_0x153c12)??[],_0xd1bbe5=[],_0x3d4ff2=_0x3ecdd8[_0x5e38e4(0x162)](_0x37d283=>_0x37d283[_0x5e38e4(0x175)]==='folder-segment'),_0x5a6cf4=_0x3ecdd8[_0x5e38e4(0x162)](_0x5118fd=>_0x5118fd[_0x5e38e4(0x175)]===_0x5e38e4(0x18a)||_0x5118fd[_0x5e38e4(0x175)]==='segment-realtime'),_0x11d3b6=_0x3ecdd8[_0x5e38e4(0x162)](_0x43f86f=>_0x43f86f[_0x5e38e4(0x175)]===_0x5e38e4(0x130)),_0x42c72d=_0x11d3b6[_0x5e38e4(0x109)](_0x3e9269=>({'journeyBundleId':_0x3e9269[_0x5e38e4(0x114)][_0x5e38e4(0xfb)],'versionNumber':_0x3e9269[_0x5e38e4(0x114)]['versionNumber'],'id':_0x3e9269['id'],'entity':_0x3e9269})),_0x1ac4f5=deduplicateJourneysByBundle(_0x42c72d);for(const _0x4f1487 of _0x3d4ff2){const _0x3e569e=this['buildTreeNodesForFolder'](_0x4f1487['id'],_0x105b57);_0xd1bbe5[_0x5e38e4(0x16b)]({'type':_0x5e38e4(0x105),'id':_0x4f1487['id'],'name':_0x4f1487[_0x5e38e4(0x114)][_0x5e38e4(0xd4)],'children':_0x3e569e['length']>0x0?_0x3e569e:undefined,'metadata':{'description':_0x4f1487[_0x5e38e4(0x114)][_0x5e38e4(0x143)]??undefined,'folderCount':_0x3e569e[_0x5e38e4(0x162)](_0x2f6c81=>_0x2f6c81[_0x5e38e4(0x175)]===_0x5e38e4(0x105))[_0x5e38e4(0x119)],'segmentCount':_0x3e569e[_0x5e38e4(0x162)](_0x51a753=>_0x51a753['type']===_0x5e38e4(0x168))[_0x5e38e4(0x119)],'journeyCount':_0x3e569e[_0x5e38e4(0x162)](_0x4fcd52=>_0x4fcd52['type']==='journey')['length'],'createdAt':_0x4f1487[_0x5e38e4(0x114)][_0x5e38e4(0x156)],'updatedAt':_0x4f1487['attributes'][_0x5e38e4(0x107)]}});}for(const _0x534ea5 of _0x5a6cf4){_0xd1bbe5['push']({'type':'segment','id':_0x534ea5['id'],'name':_0x534ea5[_0x5e38e4(0x114)][_0x5e38e4(0xd4)],'population':_0x534ea5[_0x5e38e4(0x114)][_0x5e38e4(0x160)],'metadata':{'description':_0x534ea5[_0x5e38e4(0x114)][_0x5e38e4(0x143)]??undefined,'createdAt':_0x534ea5[_0x5e38e4(0x114)]['createdAt'],'updatedAt':_0x534ea5[_0x5e38e4(0x114)]['updatedAt']}});}for(const _0x28a127 of _0x1ac4f5){const _0x19228c=_0x28a127['entity'];_0xd1bbe5[_0x5e38e4(0x16b)]({'type':_0x5e38e4(0x130),'id':_0x19228c['id'],'name':_0x19228c['attributes']['journeyBundleName']??_0x19228c[_0x5e38e4(0x114)][_0x5e38e4(0xd4)]??'','state':parseJourneyState(_0x19228c['attributes']['state']),'metadata':{}});}return _0xd1bbe5;}async[a125_0x1c7069(0x181)](_0x22d83d,_0x1dfb2f={}){const _0x123daa=a125_0x1c7069,_0x1c9955=this[_0x123daa(0x172)](),_0x1e04ba={'segment':_0x1c9955[_0x123daa(0x168)],'journey':_0x1c9955[_0x123daa(0x130)],'user':_0x1c9955['user'],'connection':_0x1c9955[_0x123daa(0x166)]};return a125_0x59ce03(_0x1e04ba,_0x22d83d,_0x1dfb2f);}async[a125_0x1c7069(0x12b)](_0x49ea66,_0x1b2935,_0x1692cc){const _0x526cf1=a125_0x1c7069,_0x8291aa=[_0x526cf1(0xfa),'counter','set',_0x526cf1(0xf1),_0x526cf1(0x165),_0x526cf1(0x103)];let _0x14cda9=![];try{const _0x193d6a=this[_0x526cf1(0x172)](),_0x534950=await this[_0x526cf1(0xe7)](_0x49ea66['name']);_0x14cda9=await _0x193d6a[_0x526cf1(0x135)][_0x526cf1(0x137)](_0x534950);}catch{}const _0x4792e8={'enabled':_0x14cda9};if(_0x49ea66['realtime']){const _0x410adc=_0x49ea66[_0x526cf1(0x135)];_0x410adc['events']&&_0x410adc[_0x526cf1(0xf4)][_0x526cf1(0x119)]>0x0&&(_0x1692cc(_0x526cf1(0x122)),_0x4792e8[_0x526cf1(0xf4)]=await Promise[_0x526cf1(0xd6)](_0x410adc[_0x526cf1(0xf4)]['map'](async _0x16938d=>{const _0x3f53f5=_0x526cf1,_0x553371={'name':_0x16938d[_0x3f53f5(0xd4)],'sourceTable':_0x16938d['source_table']};if(_0x16938d[_0x3f53f5(0x183)]){const _0x5b7a1b=_0x16938d[_0x3f53f5(0x183)][_0x3f53f5(0x11c)]('.'),_0x28bde8=_0x5b7a1b[0x0]||'',_0x37db8a=_0x5b7a1b[0x1]||_0x5b7a1b[0x0]||'';if(_0x28bde8&&_0x37db8a){const _0x178240=await _0x1b2935(generateSchemaValidationSQL(_0x28bde8,_0x37db8a));_0x553371[_0x3f53f5(0xdf)]=!_0x178240[_0x3f53f5(0x16f)],_0x553371[_0x3f53f5(0x127)]=_0x178240[_0x3f53f5(0x16f)];}}return _0x553371;}))),_0x410adc[_0x526cf1(0x114)]&&_0x410adc[_0x526cf1(0x114)][_0x526cf1(0x119)]>0x0&&(_0x4792e8[_0x526cf1(0x114)]=_0x410adc[_0x526cf1(0x114)]['map'](_0x3befe9=>({'name':_0x3befe9[_0x526cf1(0xd4)],'type':_0x3befe9[_0x526cf1(0x175)],'valid':_0x8291aa['includes'](_0x3befe9[_0x526cf1(0x175)])}))),_0x410adc[_0x526cf1(0x163)]&&(_0x4792e8[_0x526cf1(0xf9)]={'primaryKey':_0x410adc[_0x526cf1(0x163)][_0x526cf1(0x159)],'stitchingKeys':_0x410adc[_0x526cf1(0x163)][_0x526cf1(0x189)]});}return _0x49ea66['personalization_services']&&_0x49ea66['personalization_services']['length']>0x0&&(_0x4792e8['personalizationServices']=_0x49ea66['personalization_services'][_0x526cf1(0x109)](_0xd20f25=>({'name':_0xd20f25['name'],'valid':!!_0xd20f25[_0x526cf1(0xd4)]}))),_0x4792e8;}async[a125_0x1c7069(0xf6)](_0xa29c5e,_0xa4033e){const _0xdbd8fc=a125_0x1c7069,_0x3c8d97=this[_0xdbd8fc(0x172)](),_0x19b96a=await _0x3c8d97[_0xdbd8fc(0x135)]['isEnabled'](_0xa4033e);if(!_0x19b96a)return;try{const _0x35c912=await _0x3c8d97['realtime'][_0xdbd8fc(0x106)](_0xa4033e);_0x35c912&&Object['keys'](_0x35c912)[_0xdbd8fc(0x119)]>0x0&&(_0xa29c5e[_0xdbd8fc(0x135)]={},_0x35c912[_0xdbd8fc(0xdb)]&&_0x35c912[_0xdbd8fc(0xdb)][_0xdbd8fc(0x119)]>0x0&&(_0xa29c5e[_0xdbd8fc(0x135)][_0xdbd8fc(0xf4)]=_0x35c912[_0xdbd8fc(0xdb)][_0xdbd8fc(0x109)](_0xd63bda=>({'name':_0xd63bda[_0xdbd8fc(0x134)],'source_table':_0xd63bda[_0xdbd8fc(0xda)]+'.'+_0xd63bda['table']}))),_0x35c912[_0xdbd8fc(0x13b)]&&_0x35c912['batchAttributes'][_0xdbd8fc(0x119)]>0x0&&(_0xa29c5e[_0xdbd8fc(0x135)]['attributes']=_0x35c912[_0xdbd8fc(0x13b)]['map'](_0x48d5ce=>({'name':_0x48d5ce[_0xdbd8fc(0xd4)],'type':_0xdbd8fc(0x103),'source_field':_0x48d5ce['column']}))),_0x35c912[_0xdbd8fc(0xd9)]&&_0x35c912['keyColumns'][_0xdbd8fc(0x119)]>0x0&&(_0xa29c5e[_0xdbd8fc(0x135)][_0xdbd8fc(0x163)]={'primary_key':_0x35c912[_0xdbd8fc(0xd9)][0x0][_0xdbd8fc(0xd4)],'stitching_keys':_0x35c912['keyColumns'][_0xdbd8fc(0xc1)](0x1)[_0xdbd8fc(0x109)](_0x232337=>_0x232337['name'])}));}catch(_0x59dbd1){logger[_0xdbd8fc(0x16a)]('RT\x20config\x20fetch\x20failed\x20for\x20parent\x20segment\x20'+_0xa4033e+':\x20'+_0x59dbd1);}try{const _0x11ce3e=await _0x3c8d97[_0xdbd8fc(0x169)]['list'](_0xa4033e);_0x11ce3e&&_0x11ce3e[_0xdbd8fc(0x119)]>0x0&&(_0xa29c5e[_0xdbd8fc(0x187)]=_0x11ce3e[_0xdbd8fc(0x109)](_0x1d179f=>({'name':_0x1d179f[_0xdbd8fc(0xd4)],..._0x1d179f[_0xdbd8fc(0x143)]&&{'description':_0x1d179f[_0xdbd8fc(0x143)]},..._0x1d179f[_0xdbd8fc(0xc5)]&&{'trigger_event':_0x1d179f['trigger_event']},..._0x1d179f[_0xdbd8fc(0x118)]&&_0x1d179f[_0xdbd8fc(0x118)][_0xdbd8fc(0x119)]>0x0&&{'sections':_0x1d179f['sections'][_0xdbd8fc(0x109)](_0x5a9f9b=>({'name':_0x5a9f9b['name'],..._0x5a9f9b[_0xdbd8fc(0xcd)]&&{'criteria':_0x5a9f9b[_0xdbd8fc(0xcd)]},..._0x5a9f9b[_0xdbd8fc(0x114)]&&_0x5a9f9b[_0xdbd8fc(0x114)][_0xdbd8fc(0x119)]>0x0&&{'attributes':_0x5a9f9b[_0xdbd8fc(0x114)]},..._0x5a9f9b['batch_segments']&&_0x5a9f9b['batch_segments'][_0xdbd8fc(0x119)]>0x0&&{'batch_segments':_0x5a9f9b[_0xdbd8fc(0x16e)]}}))}})));}catch(_0x1b1419){logger[_0xdbd8fc(0x16a)]('Personalization\x20services\x20fetch\x20failed\x20for\x20parent\x20segment\x20'+_0xa4033e+':\x20'+_0x1b1419);}}[a125_0x1c7069(0xf2)](_0x1b5da3){const _0x33591d=a125_0x1c7069,_0x4e635a={};_0x1b5da3[_0x33591d(0xf4)]&&_0x1b5da3[_0x33591d(0xf4)][_0x33591d(0x119)]>0x0&&(_0x4e635a[_0x33591d(0xdb)]=_0x1b5da3['events'][_0x33591d(0x162)](_0x1a6a02=>_0x1a6a02['source_table'])[_0x33591d(0x109)](_0x279d41=>{const _0x19c589=_0x33591d,_0x5b0f92=_0x279d41['source_table'][_0x19c589(0x11c)]('.');return{'database':_0x5b0f92[0x0]||'','table':_0x5b0f92[0x1]||_0x5b0f92[0x0]||''};}));_0x1b5da3[_0x33591d(0x114)]&&_0x1b5da3['attributes'][_0x33591d(0x119)]>0x0&&(_0x4e635a['batchAttributes']=_0x1b5da3[_0x33591d(0x114)][_0x33591d(0x109)](_0x3a001b=>({'column':_0x3a001b[_0x33591d(0xe8)]||_0x3a001b['name'],'name':_0x3a001b['name']})));if(_0x1b5da3[_0x33591d(0x163)]){const _0x395a8c=[{'name':_0x1b5da3['id_stitching'][_0x33591d(0x159)]}];if(_0x1b5da3['id_stitching'][_0x33591d(0x189)])for(const _0x2c3b9f of _0x1b5da3[_0x33591d(0x163)][_0x33591d(0x189)]){_0x395a8c[_0x33591d(0x16b)]({'name':_0x2c3b9f});}_0x4e635a['keyColumns']=_0x395a8c;}return _0x4e635a;}async['syncPersonalizationServices'](_0x50fcc8,_0x3bab03,_0x101c19){const _0x2f125e=a125_0x1c7069;let _0x25a4c8=[];try{_0x25a4c8=await _0x50fcc8[_0x2f125e(0x169)]['list'](_0x3bab03);}catch{}const _0x2ee914=new Map(_0x25a4c8[_0x2f125e(0x109)](_0x5b228f=>[_0x5b228f[_0x2f125e(0xd4)],_0x5b228f])),_0x7aa08c=new Map(_0x101c19['map'](_0x5d1630=>[_0x5d1630[_0x2f125e(0xd4)],_0x5d1630]));for(const _0x151fa8 of _0x101c19){const _0x1ca89d=_0x2ee914['get'](_0x151fa8['name']),_0x25ed4d={'name':_0x151fa8['name'],..._0x151fa8['description']&&{'description':_0x151fa8[_0x2f125e(0x143)]},..._0x151fa8[_0x2f125e(0xc5)]&&{'trigger_event':_0x151fa8[_0x2f125e(0xc5)]},..._0x151fa8[_0x2f125e(0x118)]&&{'sections':_0x151fa8[_0x2f125e(0x118)][_0x2f125e(0x109)](_0x103562=>({'name':_0x103562[_0x2f125e(0xd4)],'criteria':_0x103562['criteria']||'','attributes':_0x103562[_0x2f125e(0x114)]||[],'batch_segments':_0x103562['batch_segments']||[]}))}};_0x1ca89d?.['id']?await _0x50fcc8[_0x2f125e(0x169)][_0x2f125e(0x147)](_0x3bab03,_0x1ca89d['id'],_0x25ed4d):await _0x50fcc8[_0x2f125e(0x169)]['create'](_0x3bab03,_0x25ed4d);}for(const _0x4a42f9 of _0x25a4c8){!_0x7aa08c[_0x2f125e(0xe0)](_0x4a42f9[_0x2f125e(0xd4)])&&_0x4a42f9['id']&&await _0x50fcc8[_0x2f125e(0x169)]['delete'](_0x3bab03,_0x4a42f9['id']);}}['getTdxInstance'](){const _0x3f44c5=a125_0x1c7069;return this[_0x3f44c5(0x17e)];}}
@@ -1 +1 @@
1
- function a131_0x24e2(){const _0x5d4da4=['dev-us01','18iLVCve','5628qmBMPn','8922424BVtPgu','4628331JmeyNu','1410845IbJLsg','1063KwukoC','7945470tJddKz','1212ZNjoXm','us01','822owDdFK','jp01','18323140iYQBhU','8uvGoNN'];a131_0x24e2=function(){return _0x5d4da4;};return a131_0x24e2();}const a131_0x2cc2c8=a131_0x1f9c;(function(_0x547ce5,_0x3a535e){const _0x55e9c3=a131_0x1f9c,_0x1d038c=_0x547ce5();while(!![]){try{const _0x3b1dcb=-parseInt(_0x55e9c3(0x104))/0x1*(-parseInt(_0x55e9c3(0x108))/0x2)+-parseInt(_0x55e9c3(0x106))/0x3*(parseInt(_0x55e9c3(0x10e))/0x4)+parseInt(_0x55e9c3(0x103))/0x5*(-parseInt(_0x55e9c3(0x10d))/0x6)+-parseInt(_0x55e9c3(0x10f))/0x7+-parseInt(_0x55e9c3(0x10b))/0x8*(-parseInt(_0x55e9c3(0x110))/0x9)+parseInt(_0x55e9c3(0x105))/0xa+parseInt(_0x55e9c3(0x10a))/0xb;if(_0x3b1dcb===_0x3a535e)break;else _0x1d038c['push'](_0x1d038c['shift']());}catch(_0x5f2237){_0x1d038c['push'](_0x1d038c['shift']());}}}(a131_0x24e2,0xb03d0));export const SITE_ALIASES={'us':a131_0x2cc2c8(0x107),'aws':a131_0x2cc2c8(0x107),'jp':a131_0x2cc2c8(0x109),'aws-tokyo':a131_0x2cc2c8(0x109),'dev':a131_0x2cc2c8(0x10c),'stg':'stg-us01'};export{getEndpoint,API_ENDPOINTS}from'../client/endpoints.js';function a131_0x1f9c(_0xe5751c,_0xec88f4){_0xe5751c=_0xe5751c-0x103;const _0x24e2e8=a131_0x24e2();let _0x1f9cb0=_0x24e2e8[_0xe5751c];return _0x1f9cb0;}export{noopReporter}from'./progress.js';
1
+ function a131_0x2891(_0x3f893c,_0x59d854){_0x3f893c=_0x3f893c-0x154;const _0x180330=a131_0x1803();let _0x2891ea=_0x180330[_0x3f893c];return _0x2891ea;}const a131_0x46b35d=a131_0x2891;function a131_0x1803(){const _0xdb238e=['us01','56qyViTZ','dev-us01','jp01','5255YMsqRj','1902543LowLPP','14701778kghTIM','153wPYGvK','11WbUfmG','1922016VbsKDK','47614ToapMP','118810SGJfeN','665872xybtqN','1dIbdga','4dsGuNj','5022pTyVYq'];a131_0x1803=function(){return _0xdb238e;};return a131_0x1803();}(function(_0x57c5bd,_0x177577){const _0x1bd974=a131_0x2891,_0x3f8023=_0x57c5bd();while(!![]){try{const _0x3ea6ae=-parseInt(_0x1bd974(0x159))/0x1*(parseInt(_0x1bd974(0x158))/0x2)+-parseInt(_0x1bd974(0x161))/0x3*(-parseInt(_0x1bd974(0x15a))/0x4)+parseInt(_0x1bd974(0x160))/0x5*(-parseInt(_0x1bd974(0x15b))/0x6)+-parseInt(_0x1bd974(0x156))/0x7*(-parseInt(_0x1bd974(0x15d))/0x8)+-parseInt(_0x1bd974(0x163))/0x9*(parseInt(_0x1bd974(0x157))/0xa)+parseInt(_0x1bd974(0x154))/0xb*(parseInt(_0x1bd974(0x155))/0xc)+parseInt(_0x1bd974(0x162))/0xd;if(_0x3ea6ae===_0x177577)break;else _0x3f8023['push'](_0x3f8023['shift']());}catch(_0x5c3031){_0x3f8023['push'](_0x3f8023['shift']());}}}(a131_0x1803,0x884bd));export const SITE_ALIASES={'us':a131_0x46b35d(0x15c),'aws':a131_0x46b35d(0x15c),'jp':a131_0x46b35d(0x15f),'aws-tokyo':'jp01','dev':a131_0x46b35d(0x15e),'stg':'stg-us01'};export{getEndpoint,API_ENDPOINTS}from'../client/endpoints.js';export{noopReporter}from'./progress.js';
@@ -1 +1 @@
1
- (function(_0x1412c9,_0x725862){const _0x558ffb=a134_0x317e,_0x8fe111=_0x1412c9();while(!![]){try{const _0x36055f=parseInt(_0x558ffb(0x1d3))/0x1+-parseInt(_0x558ffb(0x1cd))/0x2+parseInt(_0x558ffb(0x1d4))/0x3*(parseInt(_0x558ffb(0x1d0))/0x4)+parseInt(_0x558ffb(0x1cc))/0x5*(parseInt(_0x558ffb(0x1ce))/0x6)+-parseInt(_0x558ffb(0x1cf))/0x7+parseInt(_0x558ffb(0x1d2))/0x8+-parseInt(_0x558ffb(0x1d1))/0x9;if(_0x36055f===_0x725862)break;else _0x8fe111['push'](_0x8fe111['shift']());}catch(_0x1e2c54){_0x8fe111['push'](_0x8fe111['shift']());}}}(a134_0x134d,0x4fbef));function a134_0x317e(_0x802fe5,_0x597f28){_0x802fe5=_0x802fe5-0x1cc;const _0x134dba=a134_0x134d();let _0x317ef4=_0x134dba[_0x802fe5];return _0x317ef4;}export const noopReporter={'update':()=>{}};function a134_0x134d(){const _0x273b9a=['180troeDx','3566232eivLIp','4163088otCjzq','189258dKgYBW','34785yeBuAV','5tHZNuX','1139416yPiwQS','635406uIJDVT','313075sBQRjY'];a134_0x134d=function(){return _0x273b9a;};return a134_0x134d();}
1
+ function a134_0x18ff(){const _0x5345f6=['5041720FvfGWD','8994TGufNk','1254770WmtAAX','441425TQugyQ','1533qlTuUg','474057QqyJdU','201259sJpdIR','1166886ukaWZF','20JtiYaQ'];a134_0x18ff=function(){return _0x5345f6;};return a134_0x18ff();}function a134_0x40c3(_0x2a8661,_0x8ca570){_0x2a8661=_0x2a8661-0x88;const _0x18ff50=a134_0x18ff();let _0x40c31b=_0x18ff50[_0x2a8661];return _0x40c31b;}(function(_0x13e57b,_0xd02713){const _0x5c40df=a134_0x40c3,_0x4d4885=_0x13e57b();while(!![]){try{const _0x152e8e=-parseInt(_0x5c40df(0x8b))/0x1+parseInt(_0x5c40df(0x90))/0x2+parseInt(_0x5c40df(0x8c))/0x3+parseInt(_0x5c40df(0x8d))/0x4*(parseInt(_0x5c40df(0x88))/0x5)+parseInt(_0x5c40df(0x8f))/0x6*(-parseInt(_0x5c40df(0x89))/0x7)+-parseInt(_0x5c40df(0x8e))/0x8+parseInt(_0x5c40df(0x8a))/0x9;if(_0x152e8e===_0xd02713)break;else _0x4d4885['push'](_0x4d4885['shift']());}catch(_0x4a54ae){_0x4d4885['push'](_0x4d4885['shift']());}}}(a134_0x18ff,0x559e2));export const noopReporter={'update':()=>{}};
package/dist/sdk/user.js CHANGED
@@ -1 +1 @@
1
- const a139_0x4b98bb=a139_0x26e6;function a139_0x4387(){const _0x2581f9=['list','getUserInfo','buildUserMaps','toLowerCase','175962QqHxkO','1115181fxVkBZ','profile','5484896whfRjM','map','find','1839830EAcFpH','listUsers','5786570BhzSAd','1252258DRghVJ','findById','default','9jMymjJ','buildIdToEmailMap','email','client','7860712yaMXVM','7iDKdSM','54SHvOAQ'];a139_0x4387=function(){return _0x2581f9;};return a139_0x4387();}function a139_0x26e6(_0x1bdbe6,_0x355ce5){_0x1bdbe6=_0x1bdbe6-0x1e7;const _0x43870f=a139_0x4387();let _0x26e67c=_0x43870f[_0x1bdbe6];return _0x26e67c;}(function(_0x2c3c82,_0x4c728b){const _0x4435c6=a139_0x26e6,_0x141208=_0x2c3c82();while(!![]){try{const _0x8586fb=parseInt(_0x4435c6(0x1f7))/0x1*(-parseInt(_0x4435c6(0x1fd))/0x2)+parseInt(_0x4435c6(0x1e7))/0x3+parseInt(_0x4435c6(0x1e9))/0x4+-parseInt(_0x4435c6(0x1ec))/0x5+parseInt(_0x4435c6(0x1f8))/0x6*(parseInt(_0x4435c6(0x1ef))/0x7)+parseInt(_0x4435c6(0x1f6))/0x8*(-parseInt(_0x4435c6(0x1f2))/0x9)+-parseInt(_0x4435c6(0x1ee))/0xa;if(_0x8586fb===_0x4c728b)break;else _0x141208['push'](_0x141208['shift']());}catch(_0xb2c4c5){_0x141208['push'](_0x141208['shift']());}}}(a139_0x4387,0xc53ee));import{TDApiClient}from'./client/td-api-client.js';import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';export class UserSDK{['client'];[a139_0x4b98bb(0x1e8)];constructor(_0xbb8b5a){const _0x44dfc4=a139_0x4b98bb;this[_0x44dfc4(0x1f5)]=new TDApiClient(_0xbb8b5a),this['profile']=_0xbb8b5a[_0x44dfc4(0x1e8)]||_0x44dfc4(0x1f1);}async['getCurrent'](){const _0x34476=a139_0x4b98bb;return await this['client'][_0x34476(0x1fa)]();}async['list'](_0x480ff2=![]){const _0x73047f=a139_0x4b98bb;if(!_0x480ff2){const _0x3623ca=loadCachedUsers(this[_0x73047f(0x1e8)]);if(_0x3623ca)return _0x3623ca;}const _0x292b00=await this[_0x73047f(0x1f5)][_0x73047f(0x1ed)]();return saveCachedUsers(this[_0x73047f(0x1e8)],_0x292b00),_0x292b00;}['clearCache'](){const _0x522687=a139_0x4b98bb;clearUserCache(this[_0x522687(0x1e8)]);}async['findByEmail'](_0x5566d4){const _0x2fec76=a139_0x4b98bb,_0x26315d=await this[_0x2fec76(0x1f9)]();return _0x26315d[_0x2fec76(0x1eb)](_0x5078d5=>_0x5078d5[_0x2fec76(0x1f4)][_0x2fec76(0x1fc)]()===_0x5566d4[_0x2fec76(0x1fc)]());}async[a139_0x4b98bb(0x1f0)](_0x3a2d7b){const _0x4620fa=await this['list']();return _0x4620fa['find'](_0x17cc8d=>_0x17cc8d['id']===_0x3a2d7b);}async['buildEmailToIdMap'](){const _0x4459bc=a139_0x4b98bb,_0x482818=await this[_0x4459bc(0x1f9)]();return new Map(_0x482818[_0x4459bc(0x1ea)](_0x1325d5=>[_0x1325d5[_0x4459bc(0x1f4)][_0x4459bc(0x1fc)](),_0x1325d5['id']]));}async[a139_0x4b98bb(0x1f3)](){const _0x1c66ff=a139_0x4b98bb,_0x2f7da4=await this[_0x1c66ff(0x1f9)]();return new Map(_0x2f7da4['map'](_0x360461=>[_0x360461['id'],_0x360461[_0x1c66ff(0x1f4)]]));}async[a139_0x4b98bb(0x1fb)](){const _0x2bc72e=a139_0x4b98bb,_0x29ff44=await this['list']();return{'emailToId':new Map(_0x29ff44[_0x2bc72e(0x1ea)](_0x303aeb=>[_0x303aeb['email'][_0x2bc72e(0x1fc)](),_0x303aeb['id']])),'idToEmail':new Map(_0x29ff44['map'](_0x1308ac=>[_0x1308ac['id'],_0x1308ac[_0x2bc72e(0x1f4)]]))};}}
1
+ const a139_0x4694ed=a139_0x496b;function a139_0x4b88(){const _0x2ca21e=['1584168EKJTzn','toLowerCase','20aBVFux','699164qAgLaI','default','find','260029ezmMcs','email','buildEmailToIdMap','findById','getCurrent','getUserInfo','list','103805jDfxSl','1037466klNwCF','977424GNzmch','844NSmsrT','5vKunPd','buildIdToEmailMap','client','findByEmail','listUsers','profile','map','30NUwxMi'];a139_0x4b88=function(){return _0x2ca21e;};return a139_0x4b88();}(function(_0x97ac36,_0x56ebbf){const _0x10a40e=a139_0x496b,_0x3d0153=_0x97ac36();while(!![]){try{const _0x451f3f=parseInt(_0x10a40e(0x91))/0x1+-parseInt(_0x10a40e(0x94))/0x2*(parseInt(_0x10a40e(0x9c))/0x3)+-parseInt(_0x10a40e(0xa0))/0x4*(-parseInt(_0x10a40e(0x95))/0x5)+-parseInt(_0x10a40e(0x93))/0x6+-parseInt(_0x10a40e(0xa3))/0x7+-parseInt(_0x10a40e(0x9d))/0x8+parseInt(_0x10a40e(0x92))/0x9*(parseInt(_0x10a40e(0x9f))/0xa);if(_0x451f3f===_0x56ebbf)break;else _0x3d0153['push'](_0x3d0153['shift']());}catch(_0x10b38d){_0x3d0153['push'](_0x3d0153['shift']());}}}(a139_0x4b88,0x1a164));function a139_0x496b(_0x1aff33,_0x35fda9){_0x1aff33=_0x1aff33-0x8c;const _0x4b887f=a139_0x4b88();let _0x496be9=_0x4b887f[_0x1aff33];return _0x496be9;}import{TDApiClient}from'./client/td-api-client.js';import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';export class UserSDK{[a139_0x4694ed(0x97)];[a139_0x4694ed(0x9a)];constructor(_0x1e2618){const _0x1712a3=a139_0x4694ed;this[_0x1712a3(0x97)]=new TDApiClient(_0x1e2618),this[_0x1712a3(0x9a)]=_0x1e2618[_0x1712a3(0x9a)]||_0x1712a3(0xa1);}async[a139_0x4694ed(0x8e)](){const _0x1a4c88=a139_0x4694ed;return await this[_0x1a4c88(0x97)][_0x1a4c88(0x8f)]();}async[a139_0x4694ed(0x90)](_0x4b3561=![]){const _0x10a164=a139_0x4694ed;if(!_0x4b3561){const _0xae5f07=loadCachedUsers(this['profile']);if(_0xae5f07)return _0xae5f07;}const _0x1177aa=await this[_0x10a164(0x97)][_0x10a164(0x99)]();return saveCachedUsers(this[_0x10a164(0x9a)],_0x1177aa),_0x1177aa;}['clearCache'](){const _0x48d546=a139_0x4694ed;clearUserCache(this[_0x48d546(0x9a)]);}async[a139_0x4694ed(0x98)](_0x355b93){const _0xed0d13=a139_0x4694ed,_0x179078=await this[_0xed0d13(0x90)]();return _0x179078[_0xed0d13(0xa2)](_0x2f3fa8=>_0x2f3fa8['email'][_0xed0d13(0x9e)]()===_0x355b93[_0xed0d13(0x9e)]());}async[a139_0x4694ed(0x8d)](_0x83d0aa){const _0x2aed72=a139_0x4694ed,_0x4077ff=await this[_0x2aed72(0x90)]();return _0x4077ff['find'](_0x2abfcf=>_0x2abfcf['id']===_0x83d0aa);}async[a139_0x4694ed(0x8c)](){const _0x5dd80d=a139_0x4694ed,_0x5d929b=await this[_0x5dd80d(0x90)]();return new Map(_0x5d929b[_0x5dd80d(0x9b)](_0x29e522=>[_0x29e522[_0x5dd80d(0xa4)][_0x5dd80d(0x9e)](),_0x29e522['id']]));}async[a139_0x4694ed(0x96)](){const _0x1b9191=a139_0x4694ed,_0x2d1c7b=await this[_0x1b9191(0x90)]();return new Map(_0x2d1c7b[_0x1b9191(0x9b)](_0x45b911=>[_0x45b911['id'],_0x45b911[_0x1b9191(0xa4)]]));}async['buildUserMaps'](){const _0x1adacb=a139_0x4694ed,_0x4c1efa=await this['list']();return{'emailToId':new Map(_0x4c1efa[_0x1adacb(0x9b)](_0x12ac36=>[_0x12ac36[_0x1adacb(0xa4)]['toLowerCase'](),_0x12ac36['id']])),'idToEmail':new Map(_0x4c1efa[_0x1adacb(0x9b)](_0x42e813=>[_0x42e813['id'],_0x42e813[_0x1adacb(0xa4)]]))};}}
@@ -1 +1 @@
1
- (function(_0xfa8d91,_0x2fa332){const _0x46de12=a140_0x2e56,_0x211653=_0xfa8d91();while(!![]){try{const _0x598289=-parseInt(_0x46de12(0x14f))/0x1*(parseInt(_0x46de12(0x141))/0x2)+parseInt(_0x46de12(0x143))/0x3*(-parseInt(_0x46de12(0x140))/0x4)+-parseInt(_0x46de12(0x14a))/0x5*(-parseInt(_0x46de12(0x147))/0x6)+-parseInt(_0x46de12(0x144))/0x7+-parseInt(_0x46de12(0x145))/0x8+-parseInt(_0x46de12(0x14c))/0x9+parseInt(_0x46de12(0x142))/0xa;if(_0x598289===_0x2fa332)break;else _0x211653['push'](_0x211653['shift']());}catch(_0x502072){_0x211653['push'](_0x211653['shift']());}}}(a140_0x1892,0x80aa4));function a140_0x2e56(_0x1673e5,_0x1c5249){_0x1673e5=_0x1673e5-0x13f;const _0x18929c=a140_0x1892();let _0x2e56b2=_0x18929c[_0x1673e5];return _0x2e56b2;}function a140_0x1892(){const _0x305972=['4707768VvYuxJ','table','66qnvxiE','jsonl','text','6735zxaNId','tsv','5410548XPwdYF','split','tab','38oOHOeL','json','toLowerCase','4pQMCWa','24458AMwQRj','24607610toxXLW','502791LoAdLB','886368JFkfbR'];a140_0x1892=function(){return _0x305972;};return a140_0x1892();}export function detectFormatFromExtension(_0x12eb2a){const _0x2f7209=a140_0x2e56,_0x1bee2f=_0x12eb2a[_0x2f7209(0x13f)]()[_0x2f7209(0x14d)]('.')['pop']();switch(_0x1bee2f){case _0x2f7209(0x150):return'json';case'jsonl':return _0x2f7209(0x148);case _0x2f7209(0x14b):case _0x2f7209(0x14e):return _0x2f7209(0x14b);case'txt':case _0x2f7209(0x149):return _0x2f7209(0x146);default:return undefined;}}export function resolveOutputFormat(_0x4fbe7d,_0x272653,_0x4339c4){if(_0x4fbe7d)return _0x4fbe7d;if(_0x272653){const _0x237da2=detectFormatFromExtension(_0x272653);if(_0x237da2)return _0x237da2;}return _0x4339c4;}
1
+ function a140_0x2a64(_0x5957fe,_0xc699ef){_0x5957fe=_0x5957fe-0xa5;const _0x5bc2b9=a140_0x5bc2();let _0x2a64f6=_0x5bc2b9[_0x5957fe];return _0x2a64f6;}function a140_0x5bc2(){const _0x2853cb=['24522vvNJEq','8TgbQmS','148emIaYR','7947110LoUtoy','text','tsv','json','jsonl','124314UVkwru','22epzGDC','table','601785ssSuKK','778797xGYzzf','toLowerCase','2841692xfUoAY','1320814COfXOu','tab','145xSQbCI'];a140_0x5bc2=function(){return _0x2853cb;};return a140_0x5bc2();}(function(_0x5aff7e,_0x32d20c){const _0xcc36c7=a140_0x2a64,_0x130628=_0x5aff7e();while(!![]){try{const _0x402ecd=-parseInt(_0xcc36c7(0xb4))/0x1+-parseInt(_0xcc36c7(0xa6))/0x2+-parseInt(_0xcc36c7(0xa9))/0x3*(-parseInt(_0xcc36c7(0xab))/0x4)+parseInt(_0xcc36c7(0xa8))/0x5*(-parseInt(_0xcc36c7(0xb1))/0x6)+parseInt(_0xcc36c7(0xa5))/0x7+-parseInt(_0xcc36c7(0xaa))/0x8*(parseInt(_0xcc36c7(0xb5))/0x9)+parseInt(_0xcc36c7(0xac))/0xa*(parseInt(_0xcc36c7(0xb2))/0xb);if(_0x402ecd===_0x32d20c)break;else _0x130628['push'](_0x130628['shift']());}catch(_0x41783b){_0x130628['push'](_0x130628['shift']());}}}(a140_0x5bc2,0x55050));export function detectFormatFromExtension(_0x564ff9){const _0x2547ac=a140_0x2a64,_0xc8e407=_0x564ff9[_0x2547ac(0xb6)]()['split']('.')['pop']();switch(_0xc8e407){case _0x2547ac(0xaf):return _0x2547ac(0xaf);case _0x2547ac(0xb0):return'jsonl';case _0x2547ac(0xae):case _0x2547ac(0xa7):return _0x2547ac(0xae);case'txt':case _0x2547ac(0xad):return _0x2547ac(0xb3);default:return undefined;}}export function resolveOutputFormat(_0xe075c1,_0x207c4f,_0x4c679f){if(_0xe075c1)return _0xe075c1;if(_0x207c4f){const _0x237820=detectFormatFromExtension(_0x207c4f);if(_0x237820)return _0x237820;}return _0x4c679f;}
@@ -1 +1 @@
1
- (function(_0x51da94,_0x2d0dad){const _0x52a3dd=a141_0x298e,_0x390948=_0x51da94();while(!![]){try{const _0xced73=-parseInt(_0x52a3dd(0x212))/0x1+parseInt(_0x52a3dd(0x1f2))/0x2+-parseInt(_0x52a3dd(0x1e9))/0x3*(parseInt(_0x52a3dd(0x1ee))/0x4)+-parseInt(_0x52a3dd(0x20e))/0x5+-parseInt(_0x52a3dd(0x202))/0x6+parseInt(_0x52a3dd(0x1fd))/0x7+parseInt(_0x52a3dd(0x1f3))/0x8;if(_0xced73===_0x2d0dad)break;else _0x390948['push'](_0x390948['shift']());}catch(_0xa2958f){_0x390948['push'](_0x390948['shift']());}}}(a141_0x4e7f,0xdadac));import{centerAlign,stringWidth,padEnd,padStart}from'../../utils/string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../../utils/colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x4720f8=a141_0x298e;return process[_0x4720f8(0x1f9)][_0x4720f8(0x1fa)]||Infinity;}export function formatAsTable(_0x201c75,_0x4dd058=DEFAULT_MAX_DISPLAY_ROWS,_0x4384cf=![],_0x649740={}){const _0x43d89c=a141_0x298e;if(_0x201c75[_0x43d89c(0x20a)][_0x43d89c(0x201)]===0x0)return'No\x20rows\x20returned';const _0x2612cd=_0x201c75[_0x43d89c(0x1fa)][_0x43d89c(0x1fb)](_0x3f066b=>_0x3f066b['name']),_0x17044c=_0x201c75[_0x43d89c(0x1fa)][_0x43d89c(0x1fb)](_0x4c0641=>simplifyType(_0x4c0641[_0x43d89c(0x200)])),_0x3490df=_0x201c75[_0x43d89c(0x20a)][_0x43d89c(0x1e5)](0x0,_0x4dd058),_0x585c93=_0x201c75[_0x43d89c(0x20a)]['length'],_0x3f3c48=_0x585c93>_0x4dd058,_0x3489b1=[],_0x43ad0e=getTerminalWidth(),_0x1511e5=_0x43ad0e!==Infinity,_0x584082=0x32;let _0x5aefac=_0x2612cd[_0x43d89c(0x1fb)]((_0x321437,_0x51e6e8)=>{const _0x2d69f7=_0x43d89c,_0x28a0ff=stringWidth(_0x17044c[_0x51e6e8]),_0xb12878=Math['max'](..._0x3490df[_0x2d69f7(0x1fb)](_0x254e69=>{const _0x545f58=_0x254e69[_0x321437];return stringWidth(formatValue(_0x545f58));})),_0x2c4c2=Math[_0x2d69f7(0x1f1)](stringWidth(_0x321437),_0x28a0ff,_0xb12878);return _0x4384cf?_0x2c4c2:Math[_0x2d69f7(0x205)](_0x2c4c2,_0x584082);});if(_0x1511e5&&!_0x4384cf&&_0x2612cd[_0x43d89c(0x201)]>0x0){const _0x6c7dba=_0x193353=>{let _0xe7bb6e=0x1;for(const _0x3a1014 of _0x193353){_0xe7bb6e+=_0x3a1014+0x3;}return _0xe7bb6e+0x1;};let _0x1118c0=_0x6c7dba(_0x5aefac);if(_0x1118c0>_0x43ad0e){const _0x4c732f=0x3;for(let _0x1165d2=_0x5aefac[_0x43d89c(0x201)]-0x1;_0x1165d2>=0x0;_0x1165d2--){_0x1118c0=_0x6c7dba(_0x5aefac);if(_0x1118c0<=_0x43ad0e)break;const _0x130852=_0x5aefac[_0x1165d2],_0x2ceff8=_0x1118c0-_0x43ad0e,_0x5ea1f2=_0x130852-_0x4c732f,_0x4df496=Math['min'](_0x2ceff8,_0x5ea1f2);_0x4df496>0x0&&(_0x5aefac[_0x1165d2]=_0x130852-_0x4df496);}}}const _0xb39a46=_0x2612cd,_0x4b6fa4=_0x17044c,_0x19b623=_0x5aefac,_0x469843=_0x5aefac;_0x3489b1[_0x43d89c(0x1f5)](colorBorder('┌'+_0x469843['map'](_0x8972d7=>'─'['repeat'](_0x8972d7+0x2))[_0x43d89c(0x1f0)]('┬')+'┐',_0x649740));const _0x1cee1a=_0xb39a46[_0x43d89c(0x1fb)]((_0x2b0399,_0x4bcfc3)=>centerAlign(_0x2b0399,_0x19b623[_0x4bcfc3]));_0x3489b1[_0x43d89c(0x1f5)](colorBorder('│',_0x649740)+'\x20'+_0x1cee1a['join']('\x20'+colorBorder('│',_0x649740)+'\x20')+'\x20'+colorBorder('│',_0x649740));const _0x286be5=_0x4b6fa4[_0x43d89c(0x1fb)]((_0x1a685a,_0x3b5a6b)=>colorType(centerAlign(_0x1a685a,_0x19b623[_0x3b5a6b]),_0x649740));_0x3489b1[_0x43d89c(0x1f5)](colorBorder('│',_0x649740)+'\x20'+_0x286be5[_0x43d89c(0x1f0)]('\x20'+colorBorder('│',_0x649740)+'\x20')+'\x20'+colorBorder('│',_0x649740)),_0x3489b1[_0x43d89c(0x1f5)](colorBorder('├'+_0x469843[_0x43d89c(0x1fb)](_0x575fc8=>'─'[_0x43d89c(0x1f6)](_0x575fc8+0x2))['join']('┼')+'┤',_0x649740));const _0x8ed295=(_0x13bb2d,_0x365354)=>{const _0x1b2ebc=_0x43d89c,_0x5b0b25=stringWidth(_0x13bb2d);if(_0x5b0b25<=_0x365354)return _0x13bb2d;let _0x5989b1=_0x13bb2d;while(stringWidth(_0x5989b1+'…')>_0x365354&&_0x5989b1[_0x1b2ebc(0x201)]>0x0){_0x5989b1=_0x5989b1[_0x1b2ebc(0x1e5)](0x0,-0x1);}return _0x5989b1+'…';};_0x3490df[_0x43d89c(0x207)](_0x40c6a6=>{const _0x10b850=_0x43d89c,_0x41db11=_0x2612cd[_0x10b850(0x1fb)]((_0x1eef51,_0x11b73f)=>{const _0x831c90=_0x10b850,_0x2467d4=_0x40c6a6[_0x1eef51],_0x31608a=formatValue(_0x2467d4),_0x254ecd=_0x19b623[_0x11b73f],_0x2d8c0e=_0x8ed295(_0x31608a,_0x254ecd),_0x34cf19=typeof _0x2467d4==='number'||typeof _0x2467d4===_0x831c90(0x1ed)&&/^-?\d+$/['test'](_0x2467d4);return _0x34cf19?padStart(_0x2d8c0e,_0x254ecd):padEnd(_0x2d8c0e,_0x254ecd);});_0x3489b1[_0x10b850(0x1f5)](colorBorder('│',_0x649740)+'\x20'+_0x41db11[_0x10b850(0x1f0)]('\x20'+colorBorder('│',_0x649740)+'\x20')+'\x20'+colorBorder('│',_0x649740));});const _0x353780=_0x469843[_0x43d89c(0x204)]((_0x2ee9a9,_0x2c9307)=>_0x2ee9a9+_0x2c9307+0x3,-0x1);_0x3489b1[_0x43d89c(0x1f5)](colorBorder('├'+_0x469843[_0x43d89c(0x1fb)](_0x2dee6e=>'─'[_0x43d89c(0x1f6)](_0x2dee6e+0x2))[_0x43d89c(0x1f0)]('┴')+'┤',_0x649740));let _0x5d2988;_0x3f3c48?_0x5d2988=_0x585c93+_0x43d89c(0x1ec)+_0x4dd058+_0x43d89c(0x203):_0x5d2988=_0x585c93+_0x43d89c(0x209)+(_0x585c93===0x1?'':'s');const _0x157cc3=_0x5d2988['padEnd'](_0x353780-0x2);return _0x3489b1['push'](colorBorder('│',_0x649740)+'\x20'+_0x157cc3+'\x20'+colorBorder('│',_0x649740)),_0x3489b1[_0x43d89c(0x1f5)](colorBorder('└'+'─'[_0x43d89c(0x1f6)](_0x353780)+'┘',_0x649740)),_0x3489b1[_0x43d89c(0x1f0)]('\x0a');}function simplifyType(_0x32ed83){const _0x1a1451=a141_0x298e,_0x23d8ed={'varchar':_0x1a1451(0x1ed),'bigint':'long','integer':_0x1a1451(0x1f7),'double':_0x1a1451(0x1f4),'boolean':_0x1a1451(0x214),'date':_0x1a1451(0x211),'timestamp':_0x1a1451(0x1e4),'array':_0x1a1451(0x20b),'map':'map','row':_0x1a1451(0x1ef)},_0x3244e7=_0x32ed83['toLowerCase']();for(const [_0x538666,_0x2fcc52]of Object['entries'](_0x23d8ed)){if(_0x3244e7[_0x1a1451(0x1fe)](_0x538666))return _0x2fcc52;}return _0x32ed83['length']>0xa?_0x32ed83['substring'](0x0,0xa):_0x32ed83;}export function formatAsJSON(_0x433eb6,_0x2d0e20={}){const _0x200a48=a141_0x298e;if(_0x433eb6[_0x200a48(0x20a)]['length']===0x0)return'[]';if(shouldUseColor(_0x2d0e20))return colorizeJSON(_0x433eb6['data'],_0x2d0e20);const _0x4899a3=_0x433eb6[_0x200a48(0x20a)][_0x200a48(0x1fb)](_0x2665e2=>'\x20\x20'+JSON[_0x200a48(0x213)](_0x2665e2));return'[\x0a'+_0x4899a3[_0x200a48(0x1f0)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x1aadc8,_0x5c528a={}){const _0x3c5c46=a141_0x298e;if(_0x1aadc8[_0x3c5c46(0x20a)][_0x3c5c46(0x201)]===0x0)return'';if(shouldUseColor(_0x5c528a))return _0x1aadc8[_0x3c5c46(0x20a)]['map'](_0x59ce41=>colorizeJSONCompact(_0x59ce41,_0x5c528a))[_0x3c5c46(0x1f0)]('\x0a');return _0x1aadc8[_0x3c5c46(0x20a)][_0x3c5c46(0x1fb)](_0x11755d=>JSON[_0x3c5c46(0x213)](_0x11755d))[_0x3c5c46(0x1f0)]('\x0a');}export function formatAsTSV(_0x546962){const _0x4a0a98=a141_0x298e;if(_0x546962['data'][_0x4a0a98(0x201)]===0x0)return'';const _0xfba84c=[],_0x349c47=_0x546962[_0x4a0a98(0x1fa)][_0x4a0a98(0x1fb)](_0x1a1894=>_0x1a1894[_0x4a0a98(0x1e6)]);return _0xfba84c[_0x4a0a98(0x1f5)](_0x349c47[_0x4a0a98(0x1f0)]('\x09')),_0x546962['data'][_0x4a0a98(0x207)](_0x41f51f=>{const _0x26d6f8=_0x4a0a98,_0x519925=_0x349c47[_0x26d6f8(0x1fb)](_0xb90a79=>{const _0x42fcdf=_0x41f51f[_0xb90a79];return formatValueForTSV(_0x42fcdf);});_0xfba84c[_0x26d6f8(0x1f5)](_0x519925['join']('\x09'));}),_0xfba84c[_0x4a0a98(0x1f0)]('\x0a');}function formatValue(_0x1d4dbe){const _0x5b3565=a141_0x298e;if(_0x1d4dbe===null||_0x1d4dbe===undefined)return'';if(typeof _0x1d4dbe===_0x5b3565(0x1ed)){const _0x274977=_0x1d4dbe[_0x5b3565(0x1ea)](/\n/g,'\x5cn')[_0x5b3565(0x1ea)](/\r/g,'\x5cr')[_0x5b3565(0x1ea)](/\t/g,'\x5ct');return _0x274977;}if(typeof _0x1d4dbe===_0x5b3565(0x206))return String(_0x1d4dbe);if(typeof _0x1d4dbe==='boolean')return _0x1d4dbe?_0x5b3565(0x1fc):_0x5b3565(0x1ff);if(_0x1d4dbe instanceof Date)return _0x1d4dbe[_0x5b3565(0x1eb)]();if(typeof _0x1d4dbe===_0x5b3565(0x20c))return JSON[_0x5b3565(0x213)](_0x1d4dbe);return String(_0x1d4dbe);}function formatValueForTSV(_0x493894){const _0x21ebf1=a141_0x298e;if(_0x493894===null||_0x493894===undefined)return'';if(typeof _0x493894==='string')return _0x493894[_0x21ebf1(0x1ea)](/\t/g,'\x5ct')[_0x21ebf1(0x1ea)](/\n/g,'\x5cn');if(typeof _0x493894===_0x21ebf1(0x206)||typeof _0x493894==='boolean')return String(_0x493894);if(_0x493894 instanceof Date)return _0x493894[_0x21ebf1(0x1eb)]();if(typeof _0x493894==='object')return JSON[_0x21ebf1(0x213)](_0x493894);return String(_0x493894);}export function formatQueryResult(_0xc97ed1,_0x4835c3){const _0x1dbf50=a141_0x298e;switch(_0x4835c3){case'table':return formatAsTable(_0xc97ed1);case _0x1dbf50(0x210):return formatAsJSON(_0xc97ed1);case _0x1dbf50(0x1e8):return formatAsJSONL(_0xc97ed1);case'tsv':return formatAsTSV(_0xc97ed1);default:return formatAsJSON(_0xc97ed1);}}export function formatBytes(_0x5418f8){const _0x19deb9=a141_0x298e;if(_0x5418f8===0x0)return'0\x20B';const _0x4923d8=['B','KB','MB','GB','TB'],_0x1c7598=0x400,_0x184468=Math['floor'](Math[_0x19deb9(0x1e3)](_0x5418f8)/Math['log'](_0x1c7598)),_0x2c0780=_0x5418f8/Math['pow'](_0x1c7598,_0x184468),_0x4f84c5=_0x2c0780>=0xa?0x1:0x2;return _0x2c0780[_0x19deb9(0x1f8)](_0x4f84c5)+'\x20'+_0x4923d8[_0x184468];}function a141_0x4e7f(){const _0x366006=['\x1b]8;;','jsonl','1643838lMEuSZ','replace','toISOString','\x20rows\x20(','string','8IFkcNb','row','join','max','2331790oyWOJa','14265496kxgVam','double','push','repeat','int','toFixed','stdout','columns','map','true','6946387eDkDwz','startsWith','false','type','length','2348046ZLVpDE','\x20shown)','reduce','min','number','forEach','floor','\x20row','data','array','object','isTTY','7260675dHjCTl','toString','json','date','105627espEaE','stringify','bool','pow','log','timestamp','slice','name'];a141_0x4e7f=function(){return _0x366006;};return a141_0x4e7f();}function a141_0x298e(_0x253f28,_0x49b25b){_0x253f28=_0x253f28-0x1e3;const _0x4e7fc2=a141_0x4e7f();let _0x298eaa=_0x4e7fc2[_0x253f28];return _0x298eaa;}export function formatRows(_0x27af6b){const _0x5838cf=a141_0x298e;if(_0x27af6b==null)return'-';if(_0x27af6b===0x0)return'0';if(_0x27af6b<0x3e8)return _0x27af6b[_0x5838cf(0x20f)]();const _0x1c70f0=['','K','M','B','T'],_0x282f19=0x3e8,_0xbc8234=Math[_0x5838cf(0x208)](Math[_0x5838cf(0x1e3)](_0x27af6b)/Math['log'](_0x282f19)),_0x8ee4d0=_0x27af6b/Math[_0x5838cf(0x215)](_0x282f19,_0xbc8234),_0x2d8b3e=_0x8ee4d0>=0xa?0x1:0x2;return''+_0x8ee4d0[_0x5838cf(0x1f8)](_0x2d8b3e)+_0x1c70f0[_0xbc8234];}export function hyperlink(_0x2d7a5c,_0x2f9197){const _0x1272d0=a141_0x298e;if(!process['stdout'][_0x1272d0(0x20d)])return _0x2d7a5c;return _0x1272d0(0x1e7)+_0x2f9197+'\x07'+_0x2d7a5c+'\x1b]8;;\x07';}
1
+ (function(_0x1e13d7,_0x117077){const _0x260c82=a141_0x26b7,_0x3aca4c=_0x1e13d7();while(!![]){try{const _0x3163b7=parseInt(_0x260c82(0x15f))/0x1*(-parseInt(_0x260c82(0x138))/0x2)+parseInt(_0x260c82(0x152))/0x3*(-parseInt(_0x260c82(0x147))/0x4)+-parseInt(_0x260c82(0x146))/0x5*(parseInt(_0x260c82(0x160))/0x6)+-parseInt(_0x260c82(0x14c))/0x7+-parseInt(_0x260c82(0x13a))/0x8*(parseInt(_0x260c82(0x16d))/0x9)+parseInt(_0x260c82(0x167))/0xa*(-parseInt(_0x260c82(0x166))/0xb)+parseInt(_0x260c82(0x171))/0xc*(parseInt(_0x260c82(0x15b))/0xd);if(_0x3163b7===_0x117077)break;else _0x3aca4c['push'](_0x3aca4c['shift']());}catch(_0x20dd0b){_0x3aca4c['push'](_0x3aca4c['shift']());}}}(a141_0x110a,0xaedfb));import{centerAlign,stringWidth,padEnd,padStart}from'../../utils/string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../../utils/colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x40d970=a141_0x26b7;return process['stdout'][_0x40d970(0x162)]||Infinity;}export function formatAsTable(_0x123be2,_0x3fedbb=DEFAULT_MAX_DISPLAY_ROWS,_0x3b8b43=![],_0x51bd3b={}){const _0xa48ef3=a141_0x26b7;if(_0x123be2[_0xa48ef3(0x15d)][_0xa48ef3(0x13c)]===0x0)return'No\x20rows\x20returned';const _0x447377=_0x123be2[_0xa48ef3(0x162)][_0xa48ef3(0x164)](_0x3dbe8c=>_0x3dbe8c[_0xa48ef3(0x159)]),_0x7f73c0=_0x123be2['columns'][_0xa48ef3(0x164)](_0x3ea25f=>simplifyType(_0x3ea25f[_0xa48ef3(0x150)])),_0x3f395c=_0x123be2[_0xa48ef3(0x15d)][_0xa48ef3(0x15a)](0x0,_0x3fedbb),_0x2d758d=_0x123be2[_0xa48ef3(0x15d)][_0xa48ef3(0x13c)],_0x14dcff=_0x2d758d>_0x3fedbb,_0x3739c5=[],_0x435e9f=getTerminalWidth(),_0x188240=_0x435e9f!==Infinity,_0x42a11d=0x32;let _0x5541ee=_0x447377[_0xa48ef3(0x164)]((_0x239c0a,_0x2ff313)=>{const _0xd6e3ca=_0xa48ef3,_0x517af3=stringWidth(_0x7f73c0[_0x2ff313]),_0x115f95=Math['max'](..._0x3f395c['map'](_0xd83aed=>{const _0x2fee84=_0xd83aed[_0x239c0a];return stringWidth(formatValue(_0x2fee84));})),_0x54f44b=Math[_0xd6e3ca(0x13b)](stringWidth(_0x239c0a),_0x517af3,_0x115f95);return _0x3b8b43?_0x54f44b:Math[_0xd6e3ca(0x16c)](_0x54f44b,_0x42a11d);});if(_0x188240&&!_0x3b8b43&&_0x447377['length']>0x0){const _0x20ba19=_0x5997c3=>{let _0x546f75=0x1;for(const _0x8c66b1 of _0x5997c3){_0x546f75+=_0x8c66b1+0x3;}return _0x546f75+0x1;};let _0x5eed33=_0x20ba19(_0x5541ee);if(_0x5eed33>_0x435e9f){const _0x557245=0x3;for(let _0x5558aa=_0x5541ee['length']-0x1;_0x5558aa>=0x0;_0x5558aa--){_0x5eed33=_0x20ba19(_0x5541ee);if(_0x5eed33<=_0x435e9f)break;const _0x34b4b8=_0x5541ee[_0x5558aa],_0x25cbb1=_0x5eed33-_0x435e9f,_0x72bc4c=_0x34b4b8-_0x557245,_0x23d915=Math[_0xa48ef3(0x16c)](_0x25cbb1,_0x72bc4c);_0x23d915>0x0&&(_0x5541ee[_0x5558aa]=_0x34b4b8-_0x23d915);}}}const _0x4d04b3=_0x447377,_0x9ca7f5=_0x7f73c0,_0x532a99=_0x5541ee,_0x3077cb=_0x5541ee;_0x3739c5[_0xa48ef3(0x145)](colorBorder('┌'+_0x3077cb[_0xa48ef3(0x164)](_0x6407b7=>'─'['repeat'](_0x6407b7+0x2))[_0xa48ef3(0x158)]('┬')+'┐',_0x51bd3b));const _0x2335f2=_0x4d04b3['map']((_0x2f0216,_0x1607cc)=>centerAlign(_0x2f0216,_0x532a99[_0x1607cc]));_0x3739c5[_0xa48ef3(0x145)](colorBorder('│',_0x51bd3b)+'\x20'+_0x2335f2['join']('\x20'+colorBorder('│',_0x51bd3b)+'\x20')+'\x20'+colorBorder('│',_0x51bd3b));const _0x43e4d0=_0x9ca7f5['map']((_0x1b2462,_0x3082a4)=>colorType(centerAlign(_0x1b2462,_0x532a99[_0x3082a4]),_0x51bd3b));_0x3739c5[_0xa48ef3(0x145)](colorBorder('│',_0x51bd3b)+'\x20'+_0x43e4d0[_0xa48ef3(0x158)]('\x20'+colorBorder('│',_0x51bd3b)+'\x20')+'\x20'+colorBorder('│',_0x51bd3b)),_0x3739c5['push'](colorBorder('├'+_0x3077cb[_0xa48ef3(0x164)](_0x3d6736=>'─'[_0xa48ef3(0x16a)](_0x3d6736+0x2))[_0xa48ef3(0x158)]('┼')+'┤',_0x51bd3b));const _0x23b19d=(_0x5dbe57,_0x2bf23e)=>{const _0x3fa000=_0xa48ef3,_0x3f5142=stringWidth(_0x5dbe57);if(_0x3f5142<=_0x2bf23e)return _0x5dbe57;let _0x155cb9=_0x5dbe57;while(stringWidth(_0x155cb9+'…')>_0x2bf23e&&_0x155cb9[_0x3fa000(0x13c)]>0x0){_0x155cb9=_0x155cb9['slice'](0x0,-0x1);}return _0x155cb9+'…';};_0x3f395c[_0xa48ef3(0x16e)](_0xdb4ef0=>{const _0x5862a5=_0xa48ef3,_0x20788f=_0x447377[_0x5862a5(0x164)]((_0x5447e4,_0x9a4303)=>{const _0x30ffc6=_0x5862a5,_0x23af96=_0xdb4ef0[_0x5447e4],_0x165940=formatValue(_0x23af96),_0x5c24f4=_0x532a99[_0x9a4303],_0x6d6914=_0x23b19d(_0x165940,_0x5c24f4),_0x4a8970=typeof _0x23af96==='number'||typeof _0x23af96===_0x30ffc6(0x14d)&&/^-?\d+$/['test'](_0x23af96);return _0x4a8970?padStart(_0x6d6914,_0x5c24f4):padEnd(_0x6d6914,_0x5c24f4);});_0x3739c5[_0x5862a5(0x145)](colorBorder('│',_0x51bd3b)+'\x20'+_0x20788f['join']('\x20'+colorBorder('│',_0x51bd3b)+'\x20')+'\x20'+colorBorder('│',_0x51bd3b));});const _0x1728ad=_0x3077cb[_0xa48ef3(0x153)]((_0x38bfdd,_0x29f180)=>_0x38bfdd+_0x29f180+0x3,-0x1);_0x3739c5[_0xa48ef3(0x145)](colorBorder('├'+_0x3077cb[_0xa48ef3(0x164)](_0x415548=>'─'['repeat'](_0x415548+0x2))[_0xa48ef3(0x158)]('┴')+'┤',_0x51bd3b));let _0x6ba361;_0x14dcff?_0x6ba361=_0x2d758d+'\x20rows\x20('+_0x3fedbb+_0xa48ef3(0x168):_0x6ba361=_0x2d758d+_0xa48ef3(0x140)+(_0x2d758d===0x1?'':'s');const _0x3fc1c3=_0x6ba361[_0xa48ef3(0x14e)](_0x1728ad-0x2);return _0x3739c5[_0xa48ef3(0x145)](colorBorder('│',_0x51bd3b)+'\x20'+_0x3fc1c3+'\x20'+colorBorder('│',_0x51bd3b)),_0x3739c5[_0xa48ef3(0x145)](colorBorder('└'+'─'[_0xa48ef3(0x16a)](_0x1728ad)+'┘',_0x51bd3b)),_0x3739c5[_0xa48ef3(0x158)]('\x0a');}function simplifyType(_0x2417f2){const _0x310c2f=a141_0x26b7,_0x250f1e={'varchar':_0x310c2f(0x14d),'bigint':_0x310c2f(0x149),'integer':'int','double':_0x310c2f(0x13e),'boolean':_0x310c2f(0x14a),'date':_0x310c2f(0x157),'timestamp':_0x310c2f(0x144),'array':_0x310c2f(0x169),'map':'map','row':'row'},_0x26ba8e=_0x2417f2['toLowerCase']();for(const [_0x731b6,_0x384c18]of Object[_0x310c2f(0x16b)](_0x250f1e)){if(_0x26ba8e[_0x310c2f(0x161)](_0x731b6))return _0x384c18;}return _0x2417f2['length']>0xa?_0x2417f2[_0x310c2f(0x14b)](0x0,0xa):_0x2417f2;}export function formatAsJSON(_0x458bc3,_0x25f0ea={}){const _0x59a88d=a141_0x26b7;if(_0x458bc3['data'][_0x59a88d(0x13c)]===0x0)return'[]';if(shouldUseColor(_0x25f0ea))return colorizeJSON(_0x458bc3['data'],_0x25f0ea);const _0x432836=_0x458bc3[_0x59a88d(0x15d)]['map'](_0x29b37c=>'\x20\x20'+JSON[_0x59a88d(0x15e)](_0x29b37c));return'[\x0a'+_0x432836[_0x59a88d(0x158)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x21e6b7,_0x4716aa={}){const _0x9abf6b=a141_0x26b7;if(_0x21e6b7[_0x9abf6b(0x15d)][_0x9abf6b(0x13c)]===0x0)return'';if(shouldUseColor(_0x4716aa))return _0x21e6b7[_0x9abf6b(0x15d)][_0x9abf6b(0x164)](_0x40b2e6=>colorizeJSONCompact(_0x40b2e6,_0x4716aa))[_0x9abf6b(0x158)]('\x0a');return _0x21e6b7[_0x9abf6b(0x15d)]['map'](_0x499f88=>JSON[_0x9abf6b(0x15e)](_0x499f88))[_0x9abf6b(0x158)]('\x0a');}function a141_0x26b7(_0x103f7a,_0x44c0e2){_0x103f7a=_0x103f7a-0x137;const _0x110a63=a141_0x110a();let _0x26b716=_0x110a63[_0x103f7a];return _0x26b716;}export function formatAsTSV(_0x59d744){const _0x4bf289=a141_0x26b7;if(_0x59d744[_0x4bf289(0x15d)]['length']===0x0)return'';const _0x3dfa7d=[],_0x247525=_0x59d744['columns'][_0x4bf289(0x164)](_0x161759=>_0x161759[_0x4bf289(0x159)]);return _0x3dfa7d['push'](_0x247525[_0x4bf289(0x158)]('\x09')),_0x59d744[_0x4bf289(0x15d)][_0x4bf289(0x16e)](_0x41df5b=>{const _0x1f8382=_0x4bf289,_0x3f5f8b=_0x247525[_0x1f8382(0x164)](_0x67a83c=>{const _0x37fc6a=_0x41df5b[_0x67a83c];return formatValueForTSV(_0x37fc6a);});_0x3dfa7d[_0x1f8382(0x145)](_0x3f5f8b['join']('\x09'));}),_0x3dfa7d['join']('\x0a');}function formatValue(_0x36dccf){const _0x47547c=a141_0x26b7;if(_0x36dccf===null||_0x36dccf===undefined)return'';if(typeof _0x36dccf===_0x47547c(0x14d)){const _0x29e74e=_0x36dccf['replace'](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')['replace'](/\t/g,'\x5ct');return _0x29e74e;}if(typeof _0x36dccf===_0x47547c(0x142))return String(_0x36dccf);if(typeof _0x36dccf===_0x47547c(0x143))return _0x36dccf?_0x47547c(0x13d):'false';if(_0x36dccf instanceof Date)return _0x36dccf[_0x47547c(0x13f)]();if(typeof _0x36dccf===_0x47547c(0x163))return JSON['stringify'](_0x36dccf);return String(_0x36dccf);}function formatValueForTSV(_0x130812){const _0x545572=a141_0x26b7;if(_0x130812===null||_0x130812===undefined)return'';if(typeof _0x130812===_0x545572(0x14d))return _0x130812[_0x545572(0x14f)](/\t/g,'\x5ct')[_0x545572(0x14f)](/\n/g,'\x5cn');if(typeof _0x130812===_0x545572(0x142)||typeof _0x130812===_0x545572(0x143))return String(_0x130812);if(_0x130812 instanceof Date)return _0x130812[_0x545572(0x13f)]();if(typeof _0x130812===_0x545572(0x163))return JSON[_0x545572(0x15e)](_0x130812);return String(_0x130812);}export function formatQueryResult(_0x15d06a,_0x3a3b57){const _0x3133e1=a141_0x26b7;switch(_0x3a3b57){case _0x3133e1(0x151):return formatAsTable(_0x15d06a);case _0x3133e1(0x170):return formatAsJSON(_0x15d06a);case _0x3133e1(0x137):return formatAsJSONL(_0x15d06a);case _0x3133e1(0x156):return formatAsTSV(_0x15d06a);default:return formatAsJSON(_0x15d06a);}}export function formatBytes(_0x36acb2){const _0x11d4c4=a141_0x26b7;if(_0x36acb2===0x0)return _0x11d4c4(0x141);const _0x56943c=['B','KB','MB','GB','TB'],_0x14d9c9=0x400,_0x9d0a30=Math[_0x11d4c4(0x15c)](Math[_0x11d4c4(0x154)](_0x36acb2)/Math[_0x11d4c4(0x154)](_0x14d9c9)),_0x59520c=_0x36acb2/Math[_0x11d4c4(0x139)](_0x14d9c9,_0x9d0a30),_0x380e9a=_0x59520c>=0xa?0x1:0x2;return _0x59520c[_0x11d4c4(0x165)](_0x380e9a)+'\x20'+_0x56943c[_0x9d0a30];}export function formatRows(_0x211bca){const _0x1399e7=a141_0x26b7;if(_0x211bca==null)return'-';if(_0x211bca===0x0)return'0';if(_0x211bca<0x3e8)return _0x211bca[_0x1399e7(0x148)]();const _0x23a06a=['','K','M','B','T'],_0x317ea6=0x3e8,_0x1ec5b0=Math['floor'](Math[_0x1399e7(0x154)](_0x211bca)/Math[_0x1399e7(0x154)](_0x317ea6)),_0x334e01=_0x211bca/Math['pow'](_0x317ea6,_0x1ec5b0),_0x3f4170=_0x334e01>=0xa?0x1:0x2;return''+_0x334e01[_0x1399e7(0x165)](_0x3f4170)+_0x23a06a[_0x1ec5b0];}export function hyperlink(_0x11100c,_0x36b1f1){const _0x28a5b0=a141_0x26b7;if(!process['stdout'][_0x28a5b0(0x155)])return _0x11100c;return'\x1b]8;;'+_0x36b1f1+'\x07'+_0x11100c+_0x28a5b0(0x16f);}function a141_0x110a(){const _0x170171=['217hjkSsN','102KAShuT','startsWith','columns','object','map','toFixed','11GknPcB','8502190pmEbRG','\x20shown)','array','repeat','entries','min','9TtAsKB','forEach','\x1b]8;;\x07','json','12UmNMxj','jsonl','3142HUPTXi','pow','424792ZDbqqi','max','length','true','double','toISOString','\x20row','0\x20B','number','boolean','timestamp','push','21155xxCEVC','16LrbThM','toString','long','bool','substring','7476546MUQUBY','string','padEnd','replace','type','table','884829lGxnLt','reduce','log','isTTY','tsv','date','join','name','slice','55643705BspIYk','floor','data','stringify'];a141_0x110a=function(){return _0x170171;};return a141_0x110a();}
@@ -1 +1 @@
1
- (function(_0x529503,_0x2a714e){var _0x1f84d0=a142_0x2eae,_0x370d89=_0x529503();while(!![]){try{var _0x510b44=-parseInt(_0x1f84d0(0x93))/0x1+parseInt(_0x1f84d0(0x8f))/0x2+parseInt(_0x1f84d0(0x90))/0x3+-parseInt(_0x1f84d0(0x94))/0x4*(-parseInt(_0x1f84d0(0x91))/0x5)+-parseInt(_0x1f84d0(0x92))/0x6+parseInt(_0x1f84d0(0x96))/0x7*(-parseInt(_0x1f84d0(0x95))/0x8)+parseInt(_0x1f84d0(0x8e))/0x9;if(_0x510b44===_0x2a714e)break;else _0x370d89['push'](_0x370d89['shift']());}catch(_0x16eb79){_0x370d89['push'](_0x370d89['shift']());}}}(a142_0x25d0,0x8ace6));export*from'./formatters.js';function a142_0x2eae(_0x579808,_0x5480e2){_0x579808=_0x579808-0x8e;var _0x25d004=a142_0x25d0();var _0x2eae75=_0x25d004[_0x579808];return _0x2eae75;}export*from'./format-detector.js';export*from'./tree-formatter.js';function a142_0x25d0(){var _0x68f3c9=['816267aMKXOA','1024280QXRxCk','477360wEIxCn','360707RPvZzA','8OVprql','1334848zBBvMn','42DDbvQi','10792179VhHPBK','258042przTuE'];a142_0x25d0=function(){return _0x68f3c9;};return a142_0x25d0();}
1
+ (function(_0x4fb2c6,_0x3fb3f8){var _0x50200e=a142_0x2f3d,_0x2521d4=_0x4fb2c6();while(!![]){try{var _0x4f1a23=-parseInt(_0x50200e(0x15f))/0x1+-parseInt(_0x50200e(0x15c))/0x2*(-parseInt(_0x50200e(0x161))/0x3)+parseInt(_0x50200e(0x15a))/0x4+parseInt(_0x50200e(0x158))/0x5*(-parseInt(_0x50200e(0x15e))/0x6)+-parseInt(_0x50200e(0x160))/0x7*(-parseInt(_0x50200e(0x162))/0x8)+-parseInt(_0x50200e(0x15b))/0x9*(-parseInt(_0x50200e(0x15d))/0xa)+parseInt(_0x50200e(0x159))/0xb;if(_0x4f1a23===_0x3fb3f8)break;else _0x2521d4['push'](_0x2521d4['shift']());}catch(_0xaf581a){_0x2521d4['push'](_0x2521d4['shift']());}}}(a142_0x585d,0x31ce1));export*from'./formatters.js';function a142_0x2f3d(_0x295ee5,_0x178b58){_0x295ee5=_0x295ee5-0x158;var _0x585d02=a142_0x585d();var _0x2f3d85=_0x585d02[_0x295ee5];return _0x2f3d85;}export*from'./format-detector.js';export*from'./tree-formatter.js';function a142_0x585d(){var _0x38510b=['492632PGBYiG','126rCEvzd','745466kmsGlw','108510TEtflE','2748POLTcu','397431EiOlpX','28qsBQXB','3uElFcl','315080lDvcZg','3140krBoFK','920821AfbJuK'];a142_0x585d=function(){return _0x38510b;};return a142_0x585d();}