@treasuredata/tdx 2026.6.4 → 2026.6.5

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 (241) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.js +1 -1
  16. package/dist/commands/claude-statusline-command.js +1 -1
  17. package/dist/commands/claude-usage-command.js +1 -1
  18. package/dist/commands/command.js +1 -1
  19. package/dist/commands/connection-command.js +1 -1
  20. package/dist/commands/databases.js +1 -1
  21. package/dist/commands/delivery-command.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-command.js +1 -1
  27. package/dist/commands/engage-template-pull-command.js +1 -1
  28. package/dist/commands/engage-template-push-command.js +1 -1
  29. package/dist/commands/engage-template-validate-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/journey-command.js +1 -1
  32. package/dist/commands/journey-validate-command.js +1 -1
  33. package/dist/commands/llm-command.js +1 -1
  34. package/dist/commands/mcp-command.js +1 -1
  35. package/dist/commands/parent-segment-command.js +1 -1
  36. package/dist/commands/policy-command.js +1 -1
  37. package/dist/commands/profile-command.js +1 -1
  38. package/dist/commands/profiles-command.js +1 -1
  39. package/dist/commands/query-command.js +1 -1
  40. package/dist/commands/schedule-command.js +1 -1
  41. package/dist/commands/segment-command.js +1 -1
  42. package/dist/commands/segment-create-command.js +1 -1
  43. package/dist/commands/segment-fields-command.js +1 -1
  44. package/dist/commands/segment-move-command.d.ts +19 -0
  45. package/dist/commands/segment-move-command.d.ts.map +1 -0
  46. package/dist/commands/segment-move-command.js +1 -0
  47. package/dist/commands/segment-move-command.js.map +1 -0
  48. package/dist/commands/segment-pull-command.js +1 -1
  49. package/dist/commands/segment-push-command.js +1 -1
  50. package/dist/commands/segment-update-command.js +1 -1
  51. package/dist/commands/segment-use-command.js +1 -1
  52. package/dist/commands/segment-validate-command.js +1 -1
  53. package/dist/commands/segments.js +1 -1
  54. package/dist/commands/show.js +1 -1
  55. package/dist/commands/status-command.js +1 -1
  56. package/dist/commands/table-deleted.js +1 -1
  57. package/dist/commands/tables.js +1 -1
  58. package/dist/commands/unset-command.js +1 -1
  59. package/dist/commands/upgrade-command.js +1 -1
  60. package/dist/commands/use-command.js +1 -1
  61. package/dist/commands/user-command.js +1 -1
  62. package/dist/commands/work-command.js +1 -1
  63. package/dist/commands/workflow-command.js +1 -1
  64. package/dist/core/auth.js +1 -1
  65. package/dist/core/command-output.js +1 -1
  66. package/dist/core/config.js +1 -1
  67. package/dist/core/connection-cache.js +1 -1
  68. package/dist/core/constants.js +1 -1
  69. package/dist/core/credential-cache.js +1 -1
  70. package/dist/core/global-context.js +1 -1
  71. package/dist/core/keychain.js +1 -1
  72. package/dist/core/oauth-keychain.js +1 -1
  73. package/dist/core/oauth.js +1 -1
  74. package/dist/core/profile.js +1 -1
  75. package/dist/core/project-config.js +1 -1
  76. package/dist/core/session.js +1 -1
  77. package/dist/core/user-cache.js +1 -1
  78. package/dist/core/version.js +1 -1
  79. package/dist/index.js +1 -1
  80. package/dist/mcp/server.js +1 -1
  81. package/dist/mcp/tools/index.js +1 -1
  82. package/dist/mcp/tools/tdx-run.js +1 -1
  83. package/dist/mcp/tools/tdx-search.js +1 -1
  84. package/dist/mcp/tools/work-create-item.js +1 -1
  85. package/dist/mcp/utils.js +1 -1
  86. package/dist/proxy/claude-usage-tracker.js +1 -1
  87. package/dist/proxy/passthrough-server.js +1 -1
  88. package/dist/proxy/sse-usage-parser.js +1 -1
  89. package/dist/sdk/agent/agent-config.js +1 -1
  90. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  91. package/dist/sdk/agent/agent-yaml.js +1 -1
  92. package/dist/sdk/agent/test/evaluator.js +1 -1
  93. package/dist/sdk/agent/test/executor.js +1 -1
  94. package/dist/sdk/agent/test/index.js +1 -1
  95. package/dist/sdk/agent/test/output.js +1 -1
  96. package/dist/sdk/agent/test/parser.js +1 -1
  97. package/dist/sdk/agent/tool-target-registry.js +1 -1
  98. package/dist/sdk/api.js +1 -1
  99. package/dist/sdk/cas/cas-api-client.js +1 -1
  100. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  101. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  102. package/dist/sdk/cas/index.js +1 -1
  103. package/dist/sdk/cas/pull-workflow.js +1 -1
  104. package/dist/sdk/cas/push-workflow.js +1 -1
  105. package/dist/sdk/client/cdp-api-client.d.ts +18 -0
  106. package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
  107. package/dist/sdk/client/cdp-api-client.js +1 -1
  108. package/dist/sdk/client/cdp-api-client.js.map +1 -1
  109. package/dist/sdk/client/delivery-api-client.js +1 -1
  110. package/dist/sdk/client/endpoints.js +1 -1
  111. package/dist/sdk/client/engage-api-client.js +1 -1
  112. package/dist/sdk/client/http-client.js +1 -1
  113. package/dist/sdk/client/llm-api-client.js +1 -1
  114. package/dist/sdk/client/oauth-refresh.js +1 -1
  115. package/dist/sdk/client/rate-limiter.js +1 -1
  116. package/dist/sdk/client/td-api-client.js +1 -1
  117. package/dist/sdk/client/trino-api-client.js +1 -1
  118. package/dist/sdk/client/workflow-client.js +1 -1
  119. package/dist/sdk/connection-validator.js +1 -1
  120. package/dist/sdk/connection.js +1 -1
  121. package/dist/sdk/delivery.js +1 -1
  122. package/dist/sdk/engage/campaign-pull.js +1 -1
  123. package/dist/sdk/engage/campaign-push.js +1 -1
  124. package/dist/sdk/engage/campaign-validator.js +1 -1
  125. package/dist/sdk/engage/campaign-yaml.js +1 -1
  126. package/dist/sdk/engage/template-pull.js +1 -1
  127. package/dist/sdk/engage/template-push.js +1 -1
  128. package/dist/sdk/engage/template-validator.js +1 -1
  129. package/dist/sdk/engage/template-yaml.js +1 -1
  130. package/dist/sdk/engage/types/campaign-def.js +1 -1
  131. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  132. package/dist/sdk/engage/types/template-schema.js +1 -1
  133. package/dist/sdk/engage.js +1 -1
  134. package/dist/sdk/errors.js +1 -1
  135. package/dist/sdk/index.js +1 -1
  136. package/dist/sdk/io/index.js +1 -1
  137. package/dist/sdk/io/node-filesystem.js +1 -1
  138. package/dist/sdk/job.js +1 -1
  139. package/dist/sdk/journey.js +1 -1
  140. package/dist/sdk/llm/chat-cache.js +1 -1
  141. package/dist/sdk/llm/index.js +1 -1
  142. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  143. package/dist/sdk/llm/model-factors.js +1 -1
  144. package/dist/sdk/llm/user-settings.js +1 -1
  145. package/dist/sdk/personalization.js +1 -1
  146. package/dist/sdk/policy.js +1 -1
  147. package/dist/sdk/query/deleted-table-validation.js +1 -1
  148. package/dist/sdk/query/index.js +1 -1
  149. package/dist/sdk/query/sql-parser.js +1 -1
  150. package/dist/sdk/realtime.js +1 -1
  151. package/dist/sdk/schedule.js +1 -1
  152. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  153. package/dist/sdk/segment/fields-display.js +1 -1
  154. package/dist/sdk/segment/file-discovery.js +1 -1
  155. package/dist/sdk/segment/journey-utils.js +1 -1
  156. package/dist/sdk/segment/journey-validator.js +1 -1
  157. package/dist/sdk/segment/journey-yaml.js +1 -1
  158. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  159. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  160. package/dist/sdk/segment/pull-workflow.js +1 -1
  161. package/dist/sdk/segment/push-recovery.js +1 -1
  162. package/dist/sdk/segment/push-workflow.js +1 -1
  163. package/dist/sdk/segment/resolution-context.js +1 -1
  164. package/dist/sdk/segment/segment-path-parser.js +1 -1
  165. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  166. package/dist/sdk/segment/segment-validator.js +1 -1
  167. package/dist/sdk/segment/target-resolution.js +1 -1
  168. package/dist/sdk/segment/tdx-config.js +1 -1
  169. package/dist/sdk/segment/types/activation-schema.js +1 -1
  170. package/dist/sdk/segment/types/journey-def.js +1 -1
  171. package/dist/sdk/segment/types/journey-schema.js +1 -1
  172. package/dist/sdk/segment/types/segment-def.js +1 -1
  173. package/dist/sdk/segment/types/segment-schema.js +1 -1
  174. package/dist/sdk/segment/validate-files.js +1 -1
  175. package/dist/sdk/segment/yaml-validator.js +1 -1
  176. package/dist/sdk/segment.d.ts +28 -1
  177. package/dist/sdk/segment.d.ts.map +1 -1
  178. package/dist/sdk/segment.js +1 -1
  179. package/dist/sdk/segment.js.map +1 -1
  180. package/dist/sdk/types/cdp.d.ts +15 -0
  181. package/dist/sdk/types/cdp.d.ts.map +1 -1
  182. package/dist/sdk/types/index.d.ts +1 -1
  183. package/dist/sdk/types/index.d.ts.map +1 -1
  184. package/dist/sdk/types/index.js +1 -1
  185. package/dist/sdk/types/index.js.map +1 -1
  186. package/dist/sdk/types/progress.js +1 -1
  187. package/dist/sdk/types/workspace.js +1 -1
  188. package/dist/sdk/user.js +1 -1
  189. package/dist/sdk/util/format-detector.js +1 -1
  190. package/dist/sdk/util/formatters.js +1 -1
  191. package/dist/sdk/util/index.js +1 -1
  192. package/dist/sdk/util/paginate.js +1 -1
  193. package/dist/sdk/util/tree-formatter.js +1 -1
  194. package/dist/sdk/workflow/archive-validation.js +1 -1
  195. package/dist/sdk/workflow/clone-workflow.js +1 -1
  196. package/dist/sdk/workflow/index.js +1 -1
  197. package/dist/sdk/workflow/pull-workflow.js +1 -1
  198. package/dist/sdk/workflow/push-workflow.js +1 -1
  199. package/dist/sdk/workflow/task-graph.js +1 -1
  200. package/dist/sdk/workflow/tdx-config.js +1 -1
  201. package/dist/sdk/workflow/workflow-utils.js +1 -1
  202. package/dist/sdk/workspace/access-tracker.js +1 -1
  203. package/dist/sdk/workspace/frontmatter.js +1 -1
  204. package/dist/sdk/workspace/git.js +1 -1
  205. package/dist/sdk/workspace/index.js +1 -1
  206. package/dist/sdk/workspace/templates.js +1 -1
  207. package/dist/sdk/workspace/weekly.js +1 -1
  208. package/dist/sdk/workspace/wikilinks.js +1 -1
  209. package/dist/test-utils/command-runner.js +1 -1
  210. package/dist/test-utils/factories.js +1 -1
  211. package/dist/test-utils/fixtures.js +1 -1
  212. package/dist/test-utils/http-mock.js +1 -1
  213. package/dist/test-utils/index.js +1 -1
  214. package/dist/utils/async.js +1 -1
  215. package/dist/utils/colors.js +1 -1
  216. package/dist/utils/diff.js +1 -1
  217. package/dist/utils/file-permissions.js +1 -1
  218. package/dist/utils/file-reader.js +1 -1
  219. package/dist/utils/github-releases.js +1 -1
  220. package/dist/utils/global-cache.js +1 -1
  221. package/dist/utils/json-loader.js +1 -1
  222. package/dist/utils/local-cache.js +1 -1
  223. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  224. package/dist/utils/logger/formatters/index.js +1 -1
  225. package/dist/utils/logger/handlers/console-handler.js +1 -1
  226. package/dist/utils/logger/handlers/file-handler.js +1 -1
  227. package/dist/utils/logger/handlers/index.js +1 -1
  228. package/dist/utils/logger/handlers/null-handler.js +1 -1
  229. package/dist/utils/logger/index.js +1 -1
  230. package/dist/utils/logger/logger.js +1 -1
  231. package/dist/utils/logger/types.js +1 -1
  232. package/dist/utils/option-validation.js +1 -1
  233. package/dist/utils/process.js +1 -1
  234. package/dist/utils/prompt.js +1 -1
  235. package/dist/utils/spinner.js +1 -1
  236. package/dist/utils/sse-parser.js +1 -1
  237. package/dist/utils/string-utils.js +1 -1
  238. package/dist/utils/table-ref-parser.js +1 -1
  239. package/dist/utils/tdx-logger.js +1 -1
  240. package/dist/utils/version-check.js +1 -1
  241. package/package.json +1 -1
@@ -1 +1 @@
1
- const a132_0x1f1d12=a132_0x7e6c;(function(_0x543f98,_0x454d8f){const _0x23b047=a132_0x7e6c,_0x36ea76=_0x543f98();while(!![]){try{const _0x1f7b20=-parseInt(_0x23b047(0xc1))/0x1+-parseInt(_0x23b047(0xf8))/0x2*(parseInt(_0x23b047(0xe2))/0x3)+-parseInt(_0x23b047(0x11c))/0x4+parseInt(_0x23b047(0x103))/0x5+parseInt(_0x23b047(0xf5))/0x6+parseInt(_0x23b047(0x11e))/0x7+-parseInt(_0x23b047(0xb3))/0x8;if(_0x1f7b20===_0x454d8f)break;else _0x36ea76['push'](_0x36ea76['shift']());}catch(_0x280e40){_0x36ea76['push'](_0x36ea76['shift']());}}}(a132_0x591f,0x6bde5));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x1b4f13){const _0x124b61=a132_0x7e6c;return _0x1b4f13[_0x124b61(0x126)]??_0x1b4f13['attributes']?.[_0x124b61(0x126)]??undefined;}function getVersionNumber(_0x1e0d2b){const _0x5812f4=a132_0x7e6c;return _0x1e0d2b[_0x5812f4(0xcf)]??_0x1e0d2b[_0x5812f4(0xb0)]?.[_0x5812f4(0xcf)]??0x0;}function getState(_0x554679){const _0xd3060c=a132_0x7e6c;return _0x554679[_0xd3060c(0xc7)]??_0x554679['attributes']?.[_0xd3060c(0xc7)];}export function deduplicateJourneysByBundle(_0x3aaacb){const _0x37a47e=a132_0x7e6c,_0x2db565=new Map();let _0x17cf78=0x0;for(const _0x5dbed5 of _0x3aaacb){const _0x19a1bb=getBundleId(_0x5dbed5);if(!_0x19a1bb){const _0x467d74='no-bundle-'+(_0x5dbed5['id']??_0x37a47e(0xab)+_0x17cf78++);_0x2db565[_0x37a47e(0x11a)](_0x467d74,_0x5dbed5);continue;}const _0x5f41c8=_0x2db565[_0x37a47e(0xaf)](_0x19a1bb);if(!_0x5f41c8)_0x2db565['set'](_0x19a1bb,_0x5dbed5);else{const _0x10ac0b=getState(_0x5f41c8)==='launched',_0x1c87ae=getState(_0x5dbed5)===_0x37a47e(0xb7);if(_0x1c87ae&&!_0x10ac0b)_0x2db565[_0x37a47e(0x11a)](_0x19a1bb,_0x5dbed5);else{if(!_0x1c87ae&&_0x10ac0b){}else{const _0x374a90=getVersionNumber(_0x5f41c8),_0x1f943a=getVersionNumber(_0x5dbed5);_0x1f943a>_0x374a90&&_0x2db565[_0x37a47e(0x11a)](_0x19a1bb,_0x5dbed5);}}}}return Array[_0x37a47e(0x120)](_0x2db565['values']());}const VALID_JOURNEY_STATES=new Set(['draft','simulation',a132_0x1f1d12(0xb7)]);export function parseJourneyState(_0x37e973){const _0x2cd056=a132_0x1f1d12;if(typeof _0x37e973===_0x2cd056(0xed)&&VALID_JOURNEY_STATES[_0x2cd056(0xa9)](_0x37e973))return _0x37e973;return _0x2cd056(0xbb);}export function entityToJourneyListItem(_0x638a29,_0x46aae8){const _0x3700ed=a132_0x1f1d12,_0x194bfd=_0x638a29[_0x3700ed(0xb0)];return{'id':_0x638a29['id'],'name':_0x194bfd[_0x3700ed(0xd2)]??'','journeyBundleName':_0x194bfd[_0x3700ed(0xdb)]??_0x194bfd[_0x3700ed(0xd2)]??'','journeyBundleId':_0x194bfd['journeyBundleId']??'','versionNumber':_0x194bfd['versionNumber'],'description':_0x194bfd['description']??null,'state':parseJourneyState(_0x194bfd['state']),'paused':_0x194bfd['paused']??![],'audienceId':_0x46aae8,'folderId':_0x194bfd[_0x3700ed(0x11f)]??_0x638a29[_0x3700ed(0xd8)]?.[_0x3700ed(0xc8)]?.[_0x3700ed(0x10b)]?.['id']??null,'createdAt':_0x194bfd[_0x3700ed(0x106)]??'','updatedAt':_0x194bfd[_0x3700ed(0x125)]??''};}function convertToColumnId(_0x405cf5){const _0x28256b=a132_0x1f1d12;return _0x405cf5[_0x28256b(0xf1)](/-/g,'_');}function getStepEntries(_0x3db5f0){const _0x5a44ab=a132_0x1f1d12;if(!_0x3db5f0)return[];if(Array[_0x5a44ab(0x117)](_0x3db5f0))return _0x3db5f0[_0x5a44ab(0xdd)](_0x57a604=>[_0x57a604['id'],_0x57a604]);return Object[_0x5a44ab(0x129)](_0x3db5f0);}export function flattenJourneyActivation(_0xc518e1){const _0x2ac684=a132_0x1f1d12,{activationParams:_0x25297a,activationId:_0xc735bf,runAfterJourneyRefresh:_0x5cf8a7}=_0xc518e1[_0x2ac684(0xb0)];return{'id':_0xc518e1['id'],'activationId':_0xc735bf,'runAfterJourneyRefresh':_0x5cf8a7,..._0x25297a};}function col(_0x1797a1,_0x2a32f3={}){const _0xe56e21=a132_0x1f1d12;return{'column':_0x1797a1,'direction':null,'stageIndex':null,'stageName':null,'category':_0xe56e21(0xc6),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x2a32f3};}export function generateColumnMapping(_0xe96aeb){const _0x5bfbf7=a132_0x1f1d12,_0x31a9dc=[];_0x31a9dc['push'](col(_0x5bfbf7(0xc4))),_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xca),{'direction':'in','category':_0x5bfbf7(0xb5)})),_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xac),{'direction':_0x5bfbf7(0x119),'category':_0x5bfbf7(0xb5)}));_0xe96aeb[_0x5bfbf7(0xb0)][_0x5bfbf7(0x114)]&&_0x31a9dc[_0x5bfbf7(0xae)](col('intime_goal',{'direction':'in','category':_0x5bfbf7(0x114),'detail':_0xe96aeb['attributes']['goal'][_0x5bfbf7(0xd2)]||null}));const _0x2ade57=_0xe96aeb[_0x5bfbf7(0xb0)][_0x5bfbf7(0x118)]||[];for(let _0x41af5f=0x0;_0x41af5f<_0x2ade57['length'];_0x41af5f++){const _0x2c99ee=_0x2ade57[_0x41af5f],_0x3df43e=_0x2c99ee[_0x5bfbf7(0xd2)],_0x39c08b={'stageIndex':_0x41af5f,'stageName':_0x3df43e},_0x3d1635=_0x2c99ee['entryCriteria']?.['name']||null;_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f,{..._0x39c08b,'direction':'in','category':_0x5bfbf7(0xfb),'detail':_0x3d1635})),_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0x104)+_0x41af5f,{..._0x39c08b,'direction':_0x5bfbf7(0x119),'category':_0x5bfbf7(0xfb),'detail':_0x3d1635}));_0x2c99ee[_0x5bfbf7(0x11d)]&&_0x31a9dc['push'](col(_0x5bfbf7(0xe1)+_0x41af5f+'_milestone',{..._0x39c08b,'direction':'in','category':_0x5bfbf7(0x11d),'detail':_0x2c99ee[_0x5bfbf7(0x11d)][_0x5bfbf7(0xd2)]||null}));const _0x54269f=_0x2c99ee[_0x5bfbf7(0x10c)]||_0x2c99ee[_0x5bfbf7(0xaa)]||[];for(let _0x301c4f=0x0;_0x301c4f<_0x54269f[_0x5bfbf7(0xf4)];_0x301c4f++){_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+_0x5bfbf7(0x12c)+_0x301c4f,{..._0x39c08b,'direction':'in','category':'exit_criteria','detail':_0x54269f[_0x301c4f][_0x5bfbf7(0xd2)]||null}));}const _0x50e6c2=getStepEntries(_0x2c99ee[_0x5bfbf7(0x108)]);for(const [_0x3bd70a,_0xf778e6]of _0x50e6c2){const _0x23f491=convertToColumnId(_0x3bd70a),_0x2d3f79=_0xf778e6['type']||null,_0x59293c=_0xf778e6[_0x5bfbf7(0xd2)]||null,_0x553957={..._0x39c08b,'stepType':_0x2d3f79,'stepName':_0x59293c,'stepId':_0x3bd70a};_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+'_'+_0x23f491,{..._0x553957,'direction':'in','category':_0x5bfbf7(0xc5)})),_0x31a9dc['push'](col(_0x5bfbf7(0x104)+_0x41af5f+'_'+_0x23f491,{..._0x553957,'direction':_0x5bfbf7(0x119),'category':_0x5bfbf7(0xc5)}));if(_0xf778e6['type']==='DecisionPoint'&&_0xf778e6[_0x5bfbf7(0xc9)])for(const _0x5410fc of _0xf778e6[_0x5bfbf7(0xc9)]){_0x5410fc['segmentId']&&_0x31a9dc[_0x5bfbf7(0xae)](col('intime_stage_'+_0x41af5f+'_'+_0x23f491+'_'+_0x5410fc['segmentId'],{..._0x553957,'direction':'in','category':_0x5bfbf7(0x112),'detail':_0x5410fc['name']||(_0x5410fc['excluded']?'Excluded\x20profiles':null)}));}if((_0xf778e6['type']==='AbTest'||_0xf778e6[_0x5bfbf7(0x109)]===_0x5bfbf7(0xdc))&&_0xf778e6['variants'])for(const _0x34c8da of _0xf778e6[_0x5bfbf7(0xf2)]){_0x34c8da['id']&&_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+'_'+_0x23f491+'_variant_'+convertToColumnId(_0x34c8da['id']),{..._0x553957,'direction':'in','category':_0x5bfbf7(0xb9),'detail':_0x34c8da[_0x5bfbf7(0xd2)]||null}));}if(_0xf778e6['type']===_0x5bfbf7(0xe0)||_0xf778e6[_0x5bfbf7(0x109)]==='Wait'){const _0x5b7e8c=[];if(_0xf778e6[_0x5bfbf7(0xe9)])_0x5b7e8c[_0x5bfbf7(0xae)](_0xf778e6[_0x5bfbf7(0xe9)]);else{if(Array[_0x5bfbf7(0x117)](_0xf778e6['conditions']))for(const _0xfce195 of _0xf778e6[_0x5bfbf7(0x105)]){_0xfce195['segmentId']&&!_0xfce195[_0x5bfbf7(0xbf)]&&_0x5b7e8c[_0x5bfbf7(0xae)](_0xfce195[_0x5bfbf7(0x101)]);}else _0xf778e6[_0x5bfbf7(0xfe)]?.[_0x5bfbf7(0x101)]&&_0x5b7e8c[_0x5bfbf7(0xae)](_0xf778e6[_0x5bfbf7(0xfe)][_0x5bfbf7(0x101)]);}for(const _0x158666 of _0x5b7e8c){_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+'_'+_0x23f491+'_'+_0x158666,{..._0x553957,'direction':'in','category':_0x5bfbf7(0x112)}));}}}}return _0x31a9dc[_0x5bfbf7(0xae)](col('time')),_0x31a9dc;}export function aggregateJourneyHistory(_0x4fbc70){const _0x3fe870=a132_0x1f1d12,_0xa734e6=_0x4fbc70[_0x3fe870(0xe8)]((_0x59a943,_0x438d84)=>_0x59a943+(_0x438d84['entryInflux']??0x0),0x0),_0x33928f=_0x4fbc70[_0x3fe870(0xe8)]((_0x35b2a9,_0x52bd0d)=>_0x35b2a9+(_0x52bd0d[_0x3fe870(0xc3)]??0x0),0x0),_0x29f0ab=_0x4fbc70[_0x3fe870(0xe8)]((_0x2d4bde,_0x36804e)=>_0x2d4bde+((_0x36804e['exitInflux']??0x0)+(_0x36804e[_0x3fe870(0x10f)]??0x0)),0x0),_0x2c5d7f=_0x4fbc70[_0x4fbc70['length']-0x1];return{'size':_0x2c5d7f?.[_0x3fe870(0xee)]??0x0,'entered':_0xa734e6,'goal_achieved':_0x33928f,'completion_rate':_0x33928f&&_0xa734e6?_0x33928f/_0xa734e6*0x64:0x0,'exit_or_jump':_0x29f0ab,'exit_or_jump_rate':_0x29f0ab&&_0xa734e6?_0x29f0ab/_0xa734e6*0x64:0x0};}export function aggregateStageHistory(_0x467b71){const _0x454b3c=a132_0x1f1d12,_0x26a7f7=_0x467b71[_0x454b3c(0xe8)]((_0x41e0d1,_0x5c5579)=>_0x41e0d1+(_0x5c5579['entryInflux']??0x0),0x0),_0x34ddb1=_0x467b71[_0x454b3c(0xe8)]((_0x44fbeb,_0x1fe17f)=>_0x44fbeb+(_0x1fe17f[_0x454b3c(0x121)]??0x0),0x0),_0x374bda=_0x467b71[_0x454b3c(0xe8)]((_0xbfbf2c,_0x52b7e9)=>_0xbfbf2c+((_0x52b7e9[_0x454b3c(0x10e)]??0x0)+(_0x52b7e9[_0x454b3c(0x10f)]??0x0)),0x0),_0x101dd0=_0x467b71[_0x467b71[_0x454b3c(0xf4)]-0x1];return{'size':_0x101dd0?.['size']??0x0,'entered':_0x26a7f7,'milestone':_0x34ddb1,'milestone_rate':_0x34ddb1&&_0x26a7f7?_0x34ddb1/_0x26a7f7*0x64:0x0,'exit_or_jump':_0x374bda,'exit_or_jump_rate':_0x374bda&&_0x26a7f7?_0x374bda/_0x26a7f7*0x64:0x0};}export function assembleJourneyStats(_0x5b75e4,_0x566f17){const _0x124f48=a132_0x1f1d12,_0x35c638=!!(_0x566f17?.[_0x124f48(0x120)]||_0x566f17?.['to'])&&!!_0x5b75e4[_0x124f48(0xb1)]?.['length'];if(_0x35c638){const _0x49cb0d=aggregateJourneyHistory(_0x5b75e4[_0x124f48(0xb1)]),_0x333258={'journey_id':_0x5b75e4['journeyId'],..._0x566f17?.[_0x124f48(0x120)]&&{'from':_0x566f17[_0x124f48(0x120)]},..._0x566f17?.['to']&&{'to':_0x566f17['to']},..._0x49cb0d};return _0x566f17?.[_0x124f48(0x12b)]&&(_0x333258[_0x124f48(0xb1)]=_0x5b75e4[_0x124f48(0xb1)]),_0x333258;}return{'journey_id':_0x5b75e4[_0x124f48(0x130)],'size':_0x5b75e4[_0x124f48(0xee)],'entered':_0x5b75e4[_0x124f48(0xd7)],'goal_achieved':_0x5b75e4['goalSize'],'completion_rate':_0x5b75e4[_0x124f48(0x110)],'exit_or_jump':_0x5b75e4[_0x124f48(0xe5)],'exit_or_jump_rate':_0x5b75e4[_0x124f48(0xb6)]};}export function formatVersionsFromBundle(_0x1e1835){const _0x97a372=a132_0x1f1d12,_0x3c43f0=_0x1e1835[_0x97a372(0x113)]['map'](_0x56f9ba=>({'journeyId':_0x56f9ba['id'],'versionNumber':_0x56f9ba['attributes']['versionNumber']??0x0,'name':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0xd2)],'state':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0xc7)],'paused':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0xef)],'createdAt':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0x106)],'updatedAt':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0x125)]}));return _0x3c43f0['sort']((_0x113e2b,_0x36040b)=>_0x113e2b[_0x97a372(0xcf)]-_0x36040b[_0x97a372(0xcf)]),_0x3c43f0;}function a132_0x7e6c(_0x16c18b,_0x4ac58f){_0x16c18b=_0x16c18b-0xa7;const _0x591f47=a132_0x591f();let _0x7e6cf2=_0x591f47[_0x16c18b];return _0x7e6cf2;}export function synthesizePreBundleVersion(_0x40f9a4){const _0x1eb648=a132_0x1f1d12;return{'journeyId':_0x40f9a4['id'],'versionNumber':0x1,'name':_0x40f9a4[_0x1eb648(0xb0)][_0x1eb648(0xd2)],'state':_0x40f9a4['attributes']['state'],'paused':_0x40f9a4[_0x1eb648(0xb0)]['paused'],'createdAt':_0x40f9a4[_0x1eb648(0xb0)][_0x1eb648(0x106)],'updatedAt':_0x40f9a4[_0x1eb648(0xb0)][_0x1eb648(0x125)]};}function a132_0x591f(){const _0x5a4e6c=['listEntitiesByFolder','isArray','journeyStages','out','set','cdp_audience_','2029496gSmJXR','milestone','6124034wFCfUF','segmentFolderId','from','milestoneInflux','toLowerCase','NOT_FOUND','JOURNEY_NOT_FOUND','updatedAt','journeyBundleId','activationStepsById','Journey\x20not\x20found:\x20','entries','runJourney','includeHistory','_exit_','createJourney','getTrafficData','listActivations','journeyId','getJourneyStatistics','createVersion','has','exitCriteria','idx-','outtime_journey','journeyStageId','push','get','attributes','history','getParentSegmentFull','2411408CAvEvo','getBundle','journey','exitOrJumpRate','launched','audienceId','variant','listJourneyActivations','draft','description','getJourneyActivation','listJourneysWithFolders','timedOutPath','limit','318844wJywNs','listJourneysWithDetailsFromParentSegment','goalInflux','cdp_customer_id','step','fixed','state','parentFolder','branches','intime_journey','run','applyVersionDeduplication','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','folder-segment','versionNumber','all','listJourneysWithDetails','name','fetchTrafficRaw','getJourney','pause','includeAllVersions','enteredSize','relationships','getColumnMapping','activation','journeyBundleName','ABTest','map','resumeJourney','resume','WaitStep','intime_stage_','18168gDWluB','\x20in\x20journey\x20','listJourneysFromParentSegment','exitOrJumpSize','create','Journey\x20activation\x20step\x20not\x20found:\x20','reduce','conditionSegmentId','latestJourneyId','resolveJourneyId','createActivation','string','size','paused','getActivationSankeyChart','replace','variants','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','length','3321228rWfoBZ','checkJourneyAppendable','resolveRootFolderId','94myEeaI','listVersions','INVALID_ARGUMENT','stage','listActivationsFlat','getJourneyBundle','waitCondition','getConversionSankeyChart','client','segmentId','journey_','2128525mNjVYv','outtime_stage_','conditions','createdAt','lastVersionNumber','steps','type','filter','data','exitCriterias','createJourneyActivation','exitInflux','jumpInflux','completionRate','getStatistics','branch','journeys','goal','update'];a132_0x591f=function(){return _0x5a4e6c;};return a132_0x591f();}export function buildStageNameMap(_0x2924e0){const _0x5196eb=a132_0x1f1d12;return new Map(_0x2924e0['attributes'][_0x5196eb(0x118)]?.[_0x5196eb(0xdd)](_0x518052=>[_0x518052['id'],_0x518052[_0x5196eb(0xd2)]])??[]);}export class JourneySDK{[a132_0x1f1d12(0x100)];constructor(_0x1d7413){this['client']=new CDPApiClient(_0x1d7413);}[a132_0x1f1d12(0xcc)](_0x4d7edd,_0x5d7f0f){return _0x5d7f0f?_0x4d7edd:deduplicateJourneysByBundle(_0x4d7edd);}async[a132_0x1f1d12(0xf7)](_0x53bdeb){const _0x43e950=a132_0x1f1d12,_0x589e22=await this[_0x43e950(0x100)][_0x43e950(0xb2)](_0x53bdeb);return _0x589e22['rootFolderId']??undefined;}async[a132_0x1f1d12(0xd1)](_0x362449,_0xa56688){const _0x306e58=a132_0x1f1d12;try{const _0x1d286f=await this[_0x306e58(0x100)]['listJourneysWithDetails'](_0x362449);return{'journeys':this[_0x306e58(0xcc)](_0x1d286f[_0x306e58(0x113)],_0xa56688),'activationStepsById':_0x1d286f[_0x306e58(0x127)]};}catch(_0x565c10){if(isHttp404Error(_0x565c10))return{'journeys':[],'activationStepsById':new Map()};throw _0x565c10;}}async[a132_0x1f1d12(0xe4)](_0xffd2e9,_0x324024,_0xdeeb64){const _0x325943=a132_0x1f1d12;let _0x1bb2c4=_0x324024;if(!_0x1bb2c4)try{_0x1bb2c4=await this[_0x325943(0xf7)](_0xffd2e9);}catch(_0x5443b7){if(isHttp404Error(_0x5443b7))return[];throw _0x5443b7;}if(!_0x1bb2c4)return[];let _0x59fd29;if(_0xdeeb64?.[_0x325943(0xd6)])_0x59fd29=await this['client']['listJourneys'](_0x1bb2c4);else{const _0x1b3170=await this[_0x325943(0x100)]['listEntitiesByFolder'](_0x1bb2c4,0x20,![]),_0x1577d7=_0x1b3170[_0x325943(0x10b)],_0x30ad78=_0x1577d7['filter'](_0x1230d2=>_0x1230d2['type']===_0x325943(0xb5));_0x59fd29=_0x30ad78[_0x325943(0xdd)](_0x3908d7=>entityToJourneyListItem(_0x3908d7,_0xffd2e9));}return this[_0x325943(0xcc)](_0x59fd29,_0xdeeb64?.[_0x325943(0xd6)]);}async[a132_0x1f1d12(0xbe)](_0x489712,_0x29ca3b,_0x27d9c2){const _0xcec559=a132_0x1f1d12;if(!_0x29ca3b)return{'journeys':[],'folders':[]};const _0x18e0af=await this[_0xcec559(0x100)][_0xcec559(0x116)](_0x29ca3b,0x20,![]),_0x64159d=_0x18e0af[_0xcec559(0x10b)],_0x5284c8=_0x64159d[_0xcec559(0x10a)](_0x4c04de=>_0x4c04de['type']===_0xcec559(0xce)&&_0x4c04de['id']!==_0x29ca3b),_0xadfe13=_0x5284c8[_0xcec559(0xdd)](_0x324625=>({'id':_0x324625['id'],'name':_0x324625[_0xcec559(0xb0)][_0xcec559(0xd2)]})),_0x4ef20e=_0x64159d[_0xcec559(0x10a)](_0x145180=>_0x145180[_0xcec559(0x109)]===_0xcec559(0xb5)),_0x4730ed=_0x4ef20e[_0xcec559(0xdd)](_0x10a700=>entityToJourneyListItem(_0x10a700,_0x489712));return{'journeys':this[_0xcec559(0xcc)](_0x4730ed,_0x27d9c2?.['includeAllVersions']),'folders':_0xadfe13};}async[a132_0x1f1d12(0xc2)](_0x1f515f,_0x575846){const _0xe4301=a132_0x1f1d12;let _0x139e38;try{_0x139e38=await this[_0xe4301(0xf7)](_0x1f515f);}catch(_0x385c45){if(isHttp404Error(_0x385c45))return{'journeys':[],'activationStepsById':new Map()};throw _0x385c45;}if(!_0x139e38)return{'journeys':[],'activationStepsById':new Map()};const _0xe83674=await this[_0xe4301(0xd1)](_0x139e38,_0x575846?.[_0xe4301(0xd6)]);return{'journeys':this['applyVersionDeduplication'](_0xe83674['journeys'],_0x575846?.['includeAllVersions']),'activationStepsById':_0xe83674[_0xe4301(0x127)]};}async['getJourney'](_0x23d33a){const _0x3b0f19=a132_0x1f1d12;try{return await this['client'][_0x3b0f19(0xd4)](_0x23d33a);}catch(_0x1bdd7c){if(isHttp404Error(_0x1bdd7c))throw new SDKError(ErrorCode[_0x3b0f19(0x124)],_0x3b0f19(0x128)+_0x23d33a,_0x1bdd7c);throw _0x1bdd7c;}}async[a132_0x1f1d12(0xeb)](_0x38f915,_0x9cce35){const _0x28fd8d=a132_0x1f1d12,_0x498d35=await this[_0x28fd8d(0xe4)](_0x38f915),_0x1fddc8=_0x498d35['find'](_0x372bb6=>_0x372bb6['journeyBundleName'][_0x28fd8d(0x122)]()===_0x9cce35[_0x28fd8d(0x122)]());if(!_0x1fddc8)throw new SDKError(ErrorCode[_0x28fd8d(0x124)],_0x28fd8d(0x128)+_0x9cce35,undefined,{'helpText':_0x28fd8d(0xf3)});return _0x1fddc8['id'];}async[a132_0x1f1d12(0x111)](_0x7f1b84,_0x2180f5){const _0x37a151=a132_0x1f1d12;try{return await this[_0x37a151(0x100)][_0x37a151(0xa7)](_0x7f1b84,_0x2180f5);}catch(_0x4eb207){if(isHttp404Error(_0x4eb207))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x37a151(0x128)+_0x7f1b84,_0x4eb207);throw _0x4eb207;}}async[a132_0x1f1d12(0x12e)](_0x21ae2c,_0x2c357f){const _0x4409e1=a132_0x1f1d12,_0x109856={'from':_0x2c357f?.['from'],'to':_0x2c357f?.['to'],'limit':_0x2c357f?.[_0x4409e1(0xc0)]},_0x445c01=_0x2c357f?.['type']!=='conversion';try{const [_0x5df7bc,_0x2abf7d]=await Promise[_0x4409e1(0xd0)]([this[_0x4409e1(0xd3)](_0x21ae2c,_0x2c357f?.[_0x4409e1(0x109)],_0x109856),_0x445c01?this[_0x4409e1(0xd4)](_0x21ae2c):undefined]);if(_0x5df7bc['activation']&&_0x2abf7d){const _0x53ee60=buildStageNameMap(_0x2abf7d);_0x5df7bc['activation']=_0x5df7bc[_0x4409e1(0xda)][_0x4409e1(0xdd)](_0x5440b9=>({..._0x5440b9,'journeyStageName':_0x53ee60[_0x4409e1(0xaf)](_0x5440b9['journeyStageId'])??_0x5440b9[_0x4409e1(0xad)]}));}return _0x5df7bc;}catch(_0x258105){if(isHttp404Error(_0x258105))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x4409e1(0x128)+_0x21ae2c,_0x258105);throw _0x258105;}}async[a132_0x1f1d12(0xd3)](_0x15f9cd,_0x1762b4,_0xd366a0){const _0x1046ce=a132_0x1f1d12;if(_0x1762b4==='conversion'){const _0x1b865a=await this[_0x1046ce(0x100)][_0x1046ce(0xff)](_0x15f9cd,_0xd366a0);return{'conversion':_0x1b865a};}if(_0x1762b4===_0x1046ce(0xda)){const _0x5e93ad=await this[_0x1046ce(0x100)]['getActivationSankeyChart'](_0x15f9cd,_0xd366a0);return{'activation':_0x5e93ad};}const [_0x196f1f,_0x40b194]=await Promise['all']([this['client'][_0x1046ce(0xff)](_0x15f9cd,_0xd366a0),this['client'][_0x1046ce(0xf0)](_0x15f9cd,_0xd366a0)]);return{'conversion':_0x196f1f,'activation':_0x40b194};}async[a132_0x1f1d12(0xd5)](_0x478adb){const _0x23bb66=a132_0x1f1d12;try{return await this['client']['pauseJourney'](_0x478adb);}catch(_0x57137e){if(isHttp404Error(_0x57137e))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x23bb66(0x128)+_0x478adb,_0x57137e);throw _0x57137e;}}async[a132_0x1f1d12(0xdf)](_0x43862f){const _0x417ad0=a132_0x1f1d12;try{return await this[_0x417ad0(0x100)][_0x417ad0(0xde)](_0x43862f);}catch(_0x47fd6c){if(isHttp404Error(_0x47fd6c))throw new SDKError(ErrorCode[_0x417ad0(0x124)],_0x417ad0(0x128)+_0x43862f,_0x47fd6c);throw _0x47fd6c;}}async[a132_0x1f1d12(0xcb)](_0x2fc52f){const _0x33e634=a132_0x1f1d12;try{return await this[_0x33e634(0x100)][_0x33e634(0x12a)](_0x2fc52f);}catch(_0xf2902){if(isHttp404Error(_0xf2902))throw new SDKError(ErrorCode[_0x33e634(0x124)],_0x33e634(0x128)+_0x2fc52f,_0xf2902);throw _0xf2902;}}async[a132_0x1f1d12(0xe6)](_0x5097dd){const _0x59c387=a132_0x1f1d12;return await this['client'][_0x59c387(0x12d)](_0x5097dd);}async[a132_0x1f1d12(0x115)](_0x4955ba,_0x5a1f27){const _0x359a41=a132_0x1f1d12;try{return await this['client']['updateJourney'](_0x4955ba,_0x5a1f27);}catch(_0x74fe73){if(isHttp404Error(_0x74fe73))throw new SDKError(ErrorCode[_0x359a41(0x124)],'Journey\x20not\x20found:\x20'+_0x4955ba,_0x74fe73);throw _0x74fe73;}}async['getActivation'](_0x23e263,_0x44aa0c){const _0xc6d497=a132_0x1f1d12;try{return await this[_0xc6d497(0x100)][_0xc6d497(0xbd)](_0x23e263,_0x44aa0c);}catch(_0x41f400){if(isHttp404Error(_0x41f400))throw new SDKError(ErrorCode[_0xc6d497(0x123)],_0xc6d497(0xe7)+_0x44aa0c+_0xc6d497(0xe3)+_0x23e263,_0x41f400);throw _0x41f400;}}async[a132_0x1f1d12(0x12f)](_0x485acc){const _0x15cfaa=a132_0x1f1d12;try{return await this[_0x15cfaa(0x100)][_0x15cfaa(0xba)](_0x485acc);}catch(_0x1c86e0){if(isHttp404Error(_0x1c86e0))return[];throw _0x1c86e0;}}async[a132_0x1f1d12(0xfc)](_0x5d24a3){const _0x345d3a=a132_0x1f1d12,_0x3d14c1=await this['listActivations'](_0x5d24a3);return _0x3d14c1[_0x345d3a(0xdd)](flattenJourneyActivation);}async[a132_0x1f1d12(0xec)](_0x4bbcc5,_0x4df852){const _0x12ec25=a132_0x1f1d12;return await this[_0x12ec25(0x100)][_0x12ec25(0x10d)](_0x4bbcc5,_0x4df852);}async[a132_0x1f1d12(0xd9)](_0x3de6d8){const _0xa0a1a7=a132_0x1f1d12,_0x424506=await this[_0xa0a1a7(0xd4)](_0x3de6d8),_0x5936ad=generateColumnMapping(_0x424506);return{'journeyId':_0x424506['id'],'journeyName':_0x424506[_0xa0a1a7(0xb0)][_0xa0a1a7(0xd2)],'database':_0xa0a1a7(0x11b)+_0x424506[_0xa0a1a7(0xb0)][_0xa0a1a7(0xb8)],'table':_0xa0a1a7(0x102)+_0x424506['id'],'columns':_0x5936ad};}async[a132_0x1f1d12(0xb4)](_0x519b76){const _0x364317=a132_0x1f1d12;return this[_0x364317(0x100)]['getJourneyBundle'](_0x519b76);}async['getLatestJourneyId'](_0x5d83ce){const _0x42893c=a132_0x1f1d12;if(!_0x5d83ce)return undefined;try{const _0x1bd4d1=await this[_0x42893c(0xb4)](_0x5d83ce);return _0x1bd4d1[_0x42893c(0xea)];}catch{return undefined;}}async[a132_0x1f1d12(0xf9)](_0x35e57c){const _0x459070=a132_0x1f1d12,_0x91b5c6=await this[_0x459070(0xd4)](_0x35e57c),_0x1d44fb=_0x91b5c6[_0x459070(0xb0)][_0x459070(0x126)];if(!_0x1d44fb)return{'bundleId':'','bundleName':_0x91b5c6[_0x459070(0xb0)][_0x459070(0xd2)],'bundleDescription':_0x91b5c6[_0x459070(0xb0)][_0x459070(0xbc)]??null,'latestJourneyId':_0x91b5c6['id'],'versions':[synthesizePreBundleVersion(_0x91b5c6)]};const _0x14dba9=await this['getBundle'](_0x1d44fb);return{'bundleId':_0x1d44fb,'bundleName':_0x14dba9[_0x459070(0xd2)],'bundleDescription':_0x14dba9[_0x459070(0xbc)]??null,'latestJourneyId':_0x14dba9[_0x459070(0xea)],'versions':formatVersionsFromBundle(_0x14dba9)};}async[a132_0x1f1d12(0xa8)](_0x15e12c){const _0x52891f=a132_0x1f1d12,_0x5daf10=await this[_0x52891f(0xd4)](_0x15e12c),_0x19192a=_0x5daf10['attributes'][_0x52891f(0x126)];if(!_0x19192a)throw new SDKError(ErrorCode[_0x52891f(0xfa)],_0x52891f(0xcd));await this[_0x52891f(0x100)][_0x52891f(0xf6)](_0x19192a);const _0x2d9a93=await this[_0x52891f(0x100)][_0x52891f(0xfd)](_0x19192a),_0x3b8ccf=_0x2d9a93[_0x52891f(0xd2)]+'\x20v'+(_0x2d9a93[_0x52891f(0x107)]+0x1);return this[_0x52891f(0x100)]['createJourneyVersion'](_0x19192a,{'sourceId':_0x15e12c,'attributes':{'name':_0x3b8ccf}});}}
1
+ const a133_0x4b2581=a133_0x3df1;(function(_0x513be7,_0x39440a){const _0x24a14e=a133_0x3df1,_0x11edf5=_0x513be7();while(!![]){try{const _0x1876d9=-parseInt(_0x24a14e(0x121))/0x1*(-parseInt(_0x24a14e(0x9c))/0x2)+-parseInt(_0x24a14e(0x111))/0x3+-parseInt(_0x24a14e(0x127))/0x4*(parseInt(_0x24a14e(0xbb))/0x5)+parseInt(_0x24a14e(0xfc))/0x6*(parseInt(_0x24a14e(0xf0))/0x7)+parseInt(_0x24a14e(0xdd))/0x8*(-parseInt(_0x24a14e(0xe2))/0x9)+-parseInt(_0x24a14e(0xff))/0xa*(parseInt(_0x24a14e(0xb2))/0xb)+parseInt(_0x24a14e(0x114))/0xc*(parseInt(_0x24a14e(0x103))/0xd);if(_0x1876d9===_0x39440a)break;else _0x11edf5['push'](_0x11edf5['shift']());}catch(_0x530942){_0x11edf5['push'](_0x11edf5['shift']());}}}(a133_0x2465,0xd9585));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function a133_0x3df1(_0x322955,_0x4167f7){_0x322955=_0x322955-0x99;const _0x24654d=a133_0x2465();let _0x3df1e2=_0x24654d[_0x322955];return _0x3df1e2;}function getBundleId(_0x5728fd){const _0x590259=a133_0x3df1;return _0x5728fd[_0x590259(0xb0)]??_0x5728fd[_0x590259(0xd0)]?.['journeyBundleId']??undefined;}function getVersionNumber(_0x19c089){const _0x551e1a=a133_0x3df1;return _0x19c089[_0x551e1a(0xb1)]??_0x19c089[_0x551e1a(0xd0)]?.['versionNumber']??0x0;}function getState(_0x1d0002){const _0x2f0389=a133_0x3df1;return _0x1d0002[_0x2f0389(0x113)]??_0x1d0002['attributes']?.[_0x2f0389(0x113)];}export function deduplicateJourneysByBundle(_0xd900c4){const _0x5e2be8=a133_0x3df1,_0x3013a6=new Map();let _0x457aca=0x0;for(const _0x3d3753 of _0xd900c4){const _0x36b313=getBundleId(_0x3d3753);if(!_0x36b313){const _0x3149a3='no-bundle-'+(_0x3d3753['id']??_0x5e2be8(0xa3)+_0x457aca++);_0x3013a6[_0x5e2be8(0x112)](_0x3149a3,_0x3d3753);continue;}const _0x173649=_0x3013a6['get'](_0x36b313);if(!_0x173649)_0x3013a6[_0x5e2be8(0x112)](_0x36b313,_0x3d3753);else{const _0x1ee907=getState(_0x173649)===_0x5e2be8(0xd9),_0x456593=getState(_0x3d3753)===_0x5e2be8(0xd9);if(_0x456593&&!_0x1ee907)_0x3013a6[_0x5e2be8(0x112)](_0x36b313,_0x3d3753);else{if(!_0x456593&&_0x1ee907){}else{const _0x5d3571=getVersionNumber(_0x173649),_0x147f37=getVersionNumber(_0x3d3753);_0x147f37>_0x5d3571&&_0x3013a6[_0x5e2be8(0x112)](_0x36b313,_0x3d3753);}}}}return Array[_0x5e2be8(0xe1)](_0x3013a6['values']());}const VALID_JOURNEY_STATES=new Set([a133_0x4b2581(0xa0),'simulation',a133_0x4b2581(0xd9)]);export function parseJourneyState(_0x52756c){const _0x4b8c1c=a133_0x4b2581;if(typeof _0x52756c===_0x4b8c1c(0xb5)&&VALID_JOURNEY_STATES[_0x4b8c1c(0x122)](_0x52756c))return _0x52756c;return'draft';}export function entityToJourneyListItem(_0x11a5b4,_0x1f2408){const _0x15a877=a133_0x4b2581,_0x1197c1=_0x11a5b4[_0x15a877(0xd0)];return{'id':_0x11a5b4['id'],'name':_0x1197c1['name']??'','journeyBundleName':_0x1197c1[_0x15a877(0xb9)]??_0x1197c1[_0x15a877(0xe7)]??'','journeyBundleId':_0x1197c1['journeyBundleId']??'','versionNumber':_0x1197c1['versionNumber'],'description':_0x1197c1[_0x15a877(0xa5)]??null,'state':parseJourneyState(_0x1197c1[_0x15a877(0x113)]),'paused':_0x1197c1[_0x15a877(0xbe)]??![],'audienceId':_0x1f2408,'folderId':_0x1197c1[_0x15a877(0x118)]??_0x11a5b4[_0x15a877(0xd3)]?.['parentFolder']?.[_0x15a877(0xfb)]?.['id']??null,'createdAt':_0x1197c1['createdAt']??'','updatedAt':_0x1197c1[_0x15a877(0xed)]??''};}function convertToColumnId(_0x511491){const _0x33fb33=a133_0x4b2581;return _0x511491[_0x33fb33(0xde)](/-/g,'_');}function getStepEntries(_0x2c9589){const _0x13cd4e=a133_0x4b2581;if(!_0x2c9589)return[];if(Array['isArray'](_0x2c9589))return _0x2c9589[_0x13cd4e(0x106)](_0x2450cf=>[_0x2450cf['id'],_0x2450cf]);return Object[_0x13cd4e(0xf5)](_0x2c9589);}export function flattenJourneyActivation(_0x5c2045){const {activationParams:_0x4d5a48,activationId:_0x5b013a,runAfterJourneyRefresh:_0x11fffb}=_0x5c2045['attributes'];return{'id':_0x5c2045['id'],'activationId':_0x5b013a,'runAfterJourneyRefresh':_0x11fffb,..._0x4d5a48};}function col(_0x5a505b,_0x157256={}){const _0x3821f8=a133_0x4b2581;return{'column':_0x5a505b,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3821f8(0xcd),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x157256};}function a133_0x2465(){const _0x1beed7=['exitOrJumpSize','length','4cmwXvs','client','includeAllVersions','exitCriteria','draft','entryCriteria','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','idx-','ABTest','description','activationStepsById','variants','journeyId','getBundle','time','intime_stage_','journeyStages','step','WaitStep','stage','journeyBundleId','versionNumber','11CToBzT','latestJourneyId','JOURNEY_NOT_FOUND','string','updateJourney','intime_goal','audienceId','journeyBundleName','type','4947300wMQZUB','getActivationSankeyChart','getJourneyActivation','paused','listEntitiesByFolder','createActivation','milestone','createdAt','reduce','journey_','resolveRootFolderId','_milestone','runJourney','update','entryInflux','cdp_audience_','getTrafficData','activation','fixed','branches','pauseJourney','attributes','INVALID_ARGUMENT','toLowerCase','relationships','applyVersionDeduplication','size','listActivations','listJourneysWithDetailsFromParentSegment','jumpInflux','launched','listVersions','history','conditions','59344Hsrrsj','replace','outtime_journey','outtime_stage_','from','36DqkHra','folder-segment','resume','includeHistory','resumeJourney','name','exit_criteria','getParentSegmentFull','isArray','variant','limit','updatedAt','getColumnMapping','create','7DGXLbg','getStatistics','getLatestJourneyId','branch','goal','entries','steps','filter','Journey\x20activation\x20step\x20not\x20found:\x20','listJourneysWithDetails','createJourneyActivation','data','418344yjkgyQ','get','sort','11126370TkjVco','find','fetchTrafficRaw','createJourneyVersion','4892134hDdPfy','listJourneys','exitInflux','map','conditionSegmentId','resolveJourneyId','push','conversion','journey','checkJourneyAppendable','listActivationsFlat','out','goalInflux','all','840780cMnUcS','set','state','72YlpVEV','exitCriterias','journeyStageId','cdp_customer_id','segmentFolderId','getActivation','getConversionSankeyChart','AbTest','getJourneyBundle','_variant_','DecisionPoint','createJourney','waitCondition','487321lxQXQw','has','getJourney','segmentId','run','Journey\x20not\x20found:\x20','4WSlNwJ','journeys'];a133_0x2465=function(){return _0x1beed7;};return a133_0x2465();}export function generateColumnMapping(_0x5c3091){const _0x5ed5fc=a133_0x4b2581,_0x190194=[];_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0x117))),_0x190194[_0x5ed5fc(0x109)](col('intime_journey',{'direction':'in','category':_0x5ed5fc(0x10b)})),_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0xdf),{'direction':_0x5ed5fc(0x10e),'category':_0x5ed5fc(0x10b)}));_0x5c3091[_0x5ed5fc(0xd0)][_0x5ed5fc(0xf4)]&&_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0xb7),{'direction':'in','category':_0x5ed5fc(0xf4),'detail':_0x5c3091[_0x5ed5fc(0xd0)][_0x5ed5fc(0xf4)][_0x5ed5fc(0xe7)]||null}));const _0x4d7528=_0x5c3091[_0x5ed5fc(0xd0)][_0x5ed5fc(0xac)]||[];for(let _0x2f15c4=0x0;_0x2f15c4<_0x4d7528[_0x5ed5fc(0x9b)];_0x2f15c4++){const _0x4bc179=_0x4d7528[_0x2f15c4],_0x621d76=_0x4bc179[_0x5ed5fc(0xe7)],_0x5a0590={'stageIndex':_0x2f15c4,'stageName':_0x621d76},_0x4d10a4=_0x4bc179[_0x5ed5fc(0xa1)]?.[_0x5ed5fc(0xe7)]||null;_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0xab)+_0x2f15c4,{..._0x5a0590,'direction':'in','category':_0x5ed5fc(0xaf),'detail':_0x4d10a4})),_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0xe0)+_0x2f15c4,{..._0x5a0590,'direction':'out','category':'stage','detail':_0x4d10a4}));_0x4bc179['milestone']&&_0x190194[_0x5ed5fc(0x109)](col('intime_stage_'+_0x2f15c4+_0x5ed5fc(0xc6),{..._0x5a0590,'direction':'in','category':_0x5ed5fc(0xc1),'detail':_0x4bc179[_0x5ed5fc(0xc1)]['name']||null}));const _0x5acba7=_0x4bc179[_0x5ed5fc(0x115)]||_0x4bc179[_0x5ed5fc(0x9f)]||[];for(let _0x7832d9=0x0;_0x7832d9<_0x5acba7[_0x5ed5fc(0x9b)];_0x7832d9++){_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0xab)+_0x2f15c4+'_exit_'+_0x7832d9,{..._0x5a0590,'direction':'in','category':_0x5ed5fc(0xe8),'detail':_0x5acba7[_0x7832d9][_0x5ed5fc(0xe7)]||null}));}const _0x17e271=getStepEntries(_0x4bc179[_0x5ed5fc(0xf6)]);for(const [_0x44a705,_0x32b714]of _0x17e271){const _0x3a50a4=convertToColumnId(_0x44a705),_0xf2dba3=_0x32b714[_0x5ed5fc(0xba)]||null,_0x432b9f=_0x32b714[_0x5ed5fc(0xe7)]||null,_0x4c6220={..._0x5a0590,'stepType':_0xf2dba3,'stepName':_0x432b9f,'stepId':_0x44a705};_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0xab)+_0x2f15c4+'_'+_0x3a50a4,{..._0x4c6220,'direction':'in','category':_0x5ed5fc(0xad)})),_0x190194['push'](col('outtime_stage_'+_0x2f15c4+'_'+_0x3a50a4,{..._0x4c6220,'direction':_0x5ed5fc(0x10e),'category':_0x5ed5fc(0xad)}));if(_0x32b714[_0x5ed5fc(0xba)]===_0x5ed5fc(0x11e)&&_0x32b714[_0x5ed5fc(0xce)])for(const _0x33d9f1 of _0x32b714['branches']){_0x33d9f1[_0x5ed5fc(0x124)]&&_0x190194[_0x5ed5fc(0x109)](col('intime_stage_'+_0x2f15c4+'_'+_0x3a50a4+'_'+_0x33d9f1['segmentId'],{..._0x4c6220,'direction':'in','category':_0x5ed5fc(0xf3),'detail':_0x33d9f1[_0x5ed5fc(0xe7)]||(_0x33d9f1['excluded']?'Excluded\x20profiles':null)}));}if((_0x32b714[_0x5ed5fc(0xba)]===_0x5ed5fc(0x11b)||_0x32b714[_0x5ed5fc(0xba)]===_0x5ed5fc(0xa4))&&_0x32b714[_0x5ed5fc(0xa7)])for(const _0x4bb100 of _0x32b714[_0x5ed5fc(0xa7)]){_0x4bb100['id']&&_0x190194['push'](col(_0x5ed5fc(0xab)+_0x2f15c4+'_'+_0x3a50a4+_0x5ed5fc(0x11d)+convertToColumnId(_0x4bb100['id']),{..._0x4c6220,'direction':'in','category':_0x5ed5fc(0xeb),'detail':_0x4bb100['name']||null}));}if(_0x32b714[_0x5ed5fc(0xba)]===_0x5ed5fc(0xae)||_0x32b714['type']==='Wait'){const _0x1d5d50=[];if(_0x32b714['conditionSegmentId'])_0x1d5d50[_0x5ed5fc(0x109)](_0x32b714[_0x5ed5fc(0x107)]);else{if(Array[_0x5ed5fc(0xea)](_0x32b714[_0x5ed5fc(0xdc)]))for(const _0x383da8 of _0x32b714[_0x5ed5fc(0xdc)]){_0x383da8[_0x5ed5fc(0x124)]&&!_0x383da8['timedOutPath']&&_0x1d5d50['push'](_0x383da8[_0x5ed5fc(0x124)]);}else _0x32b714['waitCondition']?.[_0x5ed5fc(0x124)]&&_0x1d5d50[_0x5ed5fc(0x109)](_0x32b714[_0x5ed5fc(0x120)]['segmentId']);}for(const _0x256f8f of _0x1d5d50){_0x190194[_0x5ed5fc(0x109)](col(_0x5ed5fc(0xab)+_0x2f15c4+'_'+_0x3a50a4+'_'+_0x256f8f,{..._0x4c6220,'direction':'in','category':_0x5ed5fc(0xf3)}));}}}}return _0x190194['push'](col(_0x5ed5fc(0xaa))),_0x190194;}export function aggregateJourneyHistory(_0x4ec590){const _0x1cb28d=a133_0x4b2581,_0xd5e622=_0x4ec590[_0x1cb28d(0xc3)]((_0x5179e1,_0x36a359)=>_0x5179e1+(_0x36a359[_0x1cb28d(0xc9)]??0x0),0x0),_0x2a0fcd=_0x4ec590[_0x1cb28d(0xc3)]((_0x573acb,_0x32b778)=>_0x573acb+(_0x32b778[_0x1cb28d(0x10f)]??0x0),0x0),_0x3a729a=_0x4ec590[_0x1cb28d(0xc3)]((_0x5c5c6b,_0x38999c)=>_0x5c5c6b+((_0x38999c['exitInflux']??0x0)+(_0x38999c[_0x1cb28d(0xd8)]??0x0)),0x0),_0x440c6f=_0x4ec590[_0x4ec590[_0x1cb28d(0x9b)]-0x1];return{'size':_0x440c6f?.['size']??0x0,'entered':_0xd5e622,'goal_achieved':_0x2a0fcd,'completion_rate':_0x2a0fcd&&_0xd5e622?_0x2a0fcd/_0xd5e622*0x64:0x0,'exit_or_jump':_0x3a729a,'exit_or_jump_rate':_0x3a729a&&_0xd5e622?_0x3a729a/_0xd5e622*0x64:0x0};}export function aggregateStageHistory(_0x1f34b4){const _0x105688=a133_0x4b2581,_0x202b4d=_0x1f34b4[_0x105688(0xc3)]((_0x14daca,_0x3a3dc4)=>_0x14daca+(_0x3a3dc4[_0x105688(0xc9)]??0x0),0x0),_0x465b42=_0x1f34b4[_0x105688(0xc3)]((_0x196d2e,_0x3bed00)=>_0x196d2e+(_0x3bed00['milestoneInflux']??0x0),0x0),_0x44f066=_0x1f34b4[_0x105688(0xc3)]((_0x36af03,_0x281877)=>_0x36af03+((_0x281877[_0x105688(0x105)]??0x0)+(_0x281877[_0x105688(0xd8)]??0x0)),0x0),_0x25bc06=_0x1f34b4[_0x1f34b4['length']-0x1];return{'size':_0x25bc06?.['size']??0x0,'entered':_0x202b4d,'milestone':_0x465b42,'milestone_rate':_0x465b42&&_0x202b4d?_0x465b42/_0x202b4d*0x64:0x0,'exit_or_jump':_0x44f066,'exit_or_jump_rate':_0x44f066&&_0x202b4d?_0x44f066/_0x202b4d*0x64:0x0};}export function assembleJourneyStats(_0x511598,_0x2519a6){const _0x554e4f=a133_0x4b2581,_0xb83a23=!!(_0x2519a6?.['from']||_0x2519a6?.['to'])&&!!_0x511598[_0x554e4f(0xdb)]?.[_0x554e4f(0x9b)];if(_0xb83a23){const _0x5e29ed=aggregateJourneyHistory(_0x511598[_0x554e4f(0xdb)]),_0x54278d={'journey_id':_0x511598[_0x554e4f(0xa8)],..._0x2519a6?.[_0x554e4f(0xe1)]&&{'from':_0x2519a6['from']},..._0x2519a6?.['to']&&{'to':_0x2519a6['to']},..._0x5e29ed};return _0x2519a6?.[_0x554e4f(0xe5)]&&(_0x54278d[_0x554e4f(0xdb)]=_0x511598[_0x554e4f(0xdb)]),_0x54278d;}return{'journey_id':_0x511598['journeyId'],'size':_0x511598[_0x554e4f(0xd5)],'entered':_0x511598['enteredSize'],'goal_achieved':_0x511598['goalSize'],'completion_rate':_0x511598['completionRate'],'exit_or_jump':_0x511598[_0x554e4f(0x9a)],'exit_or_jump_rate':_0x511598['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x5e64ac){const _0x4de213=a133_0x4b2581,_0x1a9c25=_0x5e64ac[_0x4de213(0x99)][_0x4de213(0x106)](_0xd86d55=>({'journeyId':_0xd86d55['id'],'versionNumber':_0xd86d55[_0x4de213(0xd0)][_0x4de213(0xb1)]??0x0,'name':_0xd86d55['attributes']['name'],'state':_0xd86d55[_0x4de213(0xd0)]['state'],'paused':_0xd86d55[_0x4de213(0xd0)]['paused'],'createdAt':_0xd86d55[_0x4de213(0xd0)][_0x4de213(0xc2)],'updatedAt':_0xd86d55[_0x4de213(0xd0)][_0x4de213(0xed)]}));return _0x1a9c25[_0x4de213(0xfe)]((_0x1eee18,_0x3e3493)=>_0x1eee18['versionNumber']-_0x3e3493[_0x4de213(0xb1)]),_0x1a9c25;}export function synthesizePreBundleVersion(_0x112e0d){const _0x5c7606=a133_0x4b2581;return{'journeyId':_0x112e0d['id'],'versionNumber':0x1,'name':_0x112e0d[_0x5c7606(0xd0)]['name'],'state':_0x112e0d['attributes'][_0x5c7606(0x113)],'paused':_0x112e0d[_0x5c7606(0xd0)]['paused'],'createdAt':_0x112e0d[_0x5c7606(0xd0)][_0x5c7606(0xc2)],'updatedAt':_0x112e0d[_0x5c7606(0xd0)][_0x5c7606(0xed)]};}export function buildStageNameMap(_0x13ac0b){const _0x37a8f1=a133_0x4b2581;return new Map(_0x13ac0b['attributes'][_0x37a8f1(0xac)]?.[_0x37a8f1(0x106)](_0x13c3a0=>[_0x13c3a0['id'],_0x13c3a0['name']])??[]);}export class JourneySDK{['client'];constructor(_0x198532){const _0x3abf70=a133_0x4b2581;this[_0x3abf70(0x9d)]=new CDPApiClient(_0x198532);}['applyVersionDeduplication'](_0x160950,_0x1501a8){return _0x1501a8?_0x160950:deduplicateJourneysByBundle(_0x160950);}async['resolveRootFolderId'](_0x32861c){const _0x3ab659=a133_0x4b2581,_0x4d1123=await this[_0x3ab659(0x9d)][_0x3ab659(0xe9)](_0x32861c);return _0x4d1123['rootFolderId']??undefined;}async[a133_0x4b2581(0xf9)](_0x468275,_0x4a2a35){const _0x19f9cf=a133_0x4b2581;try{const _0x58937c=await this[_0x19f9cf(0x9d)][_0x19f9cf(0xf9)](_0x468275);return{'journeys':this[_0x19f9cf(0xd4)](_0x58937c['journeys'],_0x4a2a35),'activationStepsById':_0x58937c[_0x19f9cf(0xa6)]};}catch(_0x15cf60){if(isHttp404Error(_0x15cf60))return{'journeys':[],'activationStepsById':new Map()};throw _0x15cf60;}}async['listJourneysFromParentSegment'](_0x35230b,_0x16fe1e,_0x484386){const _0x4a7e65=a133_0x4b2581;let _0x25c846=_0x16fe1e;if(!_0x25c846)try{_0x25c846=await this[_0x4a7e65(0xc5)](_0x35230b);}catch(_0x3417f1){if(isHttp404Error(_0x3417f1))return[];throw _0x3417f1;}if(!_0x25c846)return[];let _0x5a1894;if(_0x484386?.[_0x4a7e65(0x9e)])_0x5a1894=await this[_0x4a7e65(0x9d)][_0x4a7e65(0x104)](_0x25c846);else{const _0x1863e6=await this[_0x4a7e65(0x9d)][_0x4a7e65(0xbf)](_0x25c846,0x20,![]),_0x254a9d=_0x1863e6[_0x4a7e65(0xfb)],_0x388c25=_0x254a9d[_0x4a7e65(0xf7)](_0x505922=>_0x505922[_0x4a7e65(0xba)]==='journey');_0x5a1894=_0x388c25[_0x4a7e65(0x106)](_0x11a8e3=>entityToJourneyListItem(_0x11a8e3,_0x35230b));}return this[_0x4a7e65(0xd4)](_0x5a1894,_0x484386?.[_0x4a7e65(0x9e)]);}async['listJourneysWithFolders'](_0x9be87b,_0x2d7897,_0xc83207){const _0x52deec=a133_0x4b2581;if(!_0x2d7897)return{'journeys':[],'folders':[]};const _0x33053b=await this['client'][_0x52deec(0xbf)](_0x2d7897,0x20,![]),_0x34ee2d=_0x33053b[_0x52deec(0xfb)],_0x32e1cc=_0x34ee2d['filter'](_0x127b08=>_0x127b08['type']===_0x52deec(0xe3)&&_0x127b08['id']!==_0x2d7897),_0x1a9aec=_0x32e1cc['map'](_0x2d48d2=>({'id':_0x2d48d2['id'],'name':_0x2d48d2[_0x52deec(0xd0)][_0x52deec(0xe7)]})),_0x2b2427=_0x34ee2d['filter'](_0x56ec50=>_0x56ec50[_0x52deec(0xba)]===_0x52deec(0x10b)),_0x485b1c=_0x2b2427[_0x52deec(0x106)](_0x4e1ff4=>entityToJourneyListItem(_0x4e1ff4,_0x9be87b));return{'journeys':this[_0x52deec(0xd4)](_0x485b1c,_0xc83207?.['includeAllVersions']),'folders':_0x1a9aec};}async[a133_0x4b2581(0xd7)](_0xc4f51,_0x53b6be){const _0x39c371=a133_0x4b2581;let _0x248a19;try{_0x248a19=await this[_0x39c371(0xc5)](_0xc4f51);}catch(_0x1cc67a){if(isHttp404Error(_0x1cc67a))return{'journeys':[],'activationStepsById':new Map()};throw _0x1cc67a;}if(!_0x248a19)return{'journeys':[],'activationStepsById':new Map()};const _0x5f413a=await this['listJourneysWithDetails'](_0x248a19,_0x53b6be?.[_0x39c371(0x9e)]);return{'journeys':this[_0x39c371(0xd4)](_0x5f413a[_0x39c371(0x99)],_0x53b6be?.['includeAllVersions']),'activationStepsById':_0x5f413a[_0x39c371(0xa6)]};}async[a133_0x4b2581(0x123)](_0x100a33){const _0x519b7a=a133_0x4b2581;try{return await this['client'][_0x519b7a(0x123)](_0x100a33);}catch(_0x57e0cc){if(isHttp404Error(_0x57e0cc))throw new SDKError(ErrorCode[_0x519b7a(0xb4)],_0x519b7a(0x126)+_0x100a33,_0x57e0cc);throw _0x57e0cc;}}async[a133_0x4b2581(0x108)](_0x3a6019,_0x55ec98){const _0x53a29b=a133_0x4b2581,_0x457a1=await this['listJourneysFromParentSegment'](_0x3a6019),_0x741fc8=_0x457a1[_0x53a29b(0x100)](_0xadb0a3=>_0xadb0a3[_0x53a29b(0xb9)][_0x53a29b(0xd2)]()===_0x55ec98[_0x53a29b(0xd2)]());if(!_0x741fc8)throw new SDKError(ErrorCode[_0x53a29b(0xb4)],_0x53a29b(0x126)+_0x55ec98,undefined,{'helpText':_0x53a29b(0xa2)});return _0x741fc8['id'];}async[a133_0x4b2581(0xf1)](_0xff5c6a,_0x216031){const _0x462487=a133_0x4b2581;try{return await this['client']['getJourneyStatistics'](_0xff5c6a,_0x216031);}catch(_0xc579f0){if(isHttp404Error(_0xc579f0))throw new SDKError(ErrorCode[_0x462487(0xb4)],_0x462487(0x126)+_0xff5c6a,_0xc579f0);throw _0xc579f0;}}async[a133_0x4b2581(0xcb)](_0x43b50a,_0x428d97){const _0x3069b0=a133_0x4b2581,_0x281b23={'from':_0x428d97?.[_0x3069b0(0xe1)],'to':_0x428d97?.['to'],'limit':_0x428d97?.[_0x3069b0(0xec)]},_0x23cea0=_0x428d97?.['type']!==_0x3069b0(0x10a);try{const [_0x3364d4,_0x31e812]=await Promise[_0x3069b0(0x110)]([this[_0x3069b0(0x101)](_0x43b50a,_0x428d97?.['type'],_0x281b23),_0x23cea0?this[_0x3069b0(0x123)](_0x43b50a):undefined]);if(_0x3364d4[_0x3069b0(0xcc)]&&_0x31e812){const _0x2e93d1=buildStageNameMap(_0x31e812);_0x3364d4['activation']=_0x3364d4[_0x3069b0(0xcc)][_0x3069b0(0x106)](_0x20adc1=>({..._0x20adc1,'journeyStageName':_0x2e93d1[_0x3069b0(0xfd)](_0x20adc1[_0x3069b0(0x116)])??_0x20adc1[_0x3069b0(0x116)]}));}return _0x3364d4;}catch(_0x2458d4){if(isHttp404Error(_0x2458d4))throw new SDKError(ErrorCode[_0x3069b0(0xb4)],_0x3069b0(0x126)+_0x43b50a,_0x2458d4);throw _0x2458d4;}}async[a133_0x4b2581(0x101)](_0x1668ef,_0x5cff34,_0x16a6be){const _0x5a3f5b=a133_0x4b2581;if(_0x5cff34===_0x5a3f5b(0x10a)){const _0x4debc0=await this[_0x5a3f5b(0x9d)][_0x5a3f5b(0x11a)](_0x1668ef,_0x16a6be);return{'conversion':_0x4debc0};}if(_0x5cff34===_0x5a3f5b(0xcc)){const _0x8e8f39=await this[_0x5a3f5b(0x9d)][_0x5a3f5b(0xbc)](_0x1668ef,_0x16a6be);return{'activation':_0x8e8f39};}const [_0x2b7a7,_0x3bacd3]=await Promise[_0x5a3f5b(0x110)]([this['client'][_0x5a3f5b(0x11a)](_0x1668ef,_0x16a6be),this[_0x5a3f5b(0x9d)][_0x5a3f5b(0xbc)](_0x1668ef,_0x16a6be)]);return{'conversion':_0x2b7a7,'activation':_0x3bacd3};}async['pause'](_0x1a8057){const _0x311b7b=a133_0x4b2581;try{return await this['client'][_0x311b7b(0xcf)](_0x1a8057);}catch(_0xa098eb){if(isHttp404Error(_0xa098eb))throw new SDKError(ErrorCode[_0x311b7b(0xb4)],_0x311b7b(0x126)+_0x1a8057,_0xa098eb);throw _0xa098eb;}}async[a133_0x4b2581(0xe4)](_0x11d5d9){const _0x10309f=a133_0x4b2581;try{return await this[_0x10309f(0x9d)][_0x10309f(0xe6)](_0x11d5d9);}catch(_0x5a3d7a){if(isHttp404Error(_0x5a3d7a))throw new SDKError(ErrorCode[_0x10309f(0xb4)],_0x10309f(0x126)+_0x11d5d9,_0x5a3d7a);throw _0x5a3d7a;}}async[a133_0x4b2581(0x125)](_0x255138){const _0x558404=a133_0x4b2581;try{return await this['client'][_0x558404(0xc7)](_0x255138);}catch(_0xbff39b){if(isHttp404Error(_0xbff39b))throw new SDKError(ErrorCode[_0x558404(0xb4)],_0x558404(0x126)+_0x255138,_0xbff39b);throw _0xbff39b;}}async[a133_0x4b2581(0xef)](_0x2d2157){const _0x2e45b5=a133_0x4b2581;return await this[_0x2e45b5(0x9d)][_0x2e45b5(0x11f)](_0x2d2157);}async[a133_0x4b2581(0xc8)](_0x232c82,_0x12d05f){const _0x21da24=a133_0x4b2581;try{return await this['client'][_0x21da24(0xb6)](_0x232c82,_0x12d05f);}catch(_0x449f0a){if(isHttp404Error(_0x449f0a))throw new SDKError(ErrorCode[_0x21da24(0xb4)],_0x21da24(0x126)+_0x232c82,_0x449f0a);throw _0x449f0a;}}async[a133_0x4b2581(0x119)](_0x24fd22,_0x4c4d21){const _0x27917e=a133_0x4b2581;try{return await this[_0x27917e(0x9d)][_0x27917e(0xbd)](_0x24fd22,_0x4c4d21);}catch(_0x547fe9){if(isHttp404Error(_0x547fe9))throw new SDKError(ErrorCode['NOT_FOUND'],_0x27917e(0xf8)+_0x4c4d21+'\x20in\x20journey\x20'+_0x24fd22,_0x547fe9);throw _0x547fe9;}}async[a133_0x4b2581(0xd6)](_0x2f575b){const _0x432e49=a133_0x4b2581;try{return await this[_0x432e49(0x9d)]['listJourneyActivations'](_0x2f575b);}catch(_0x470fcf){if(isHttp404Error(_0x470fcf))return[];throw _0x470fcf;}}async[a133_0x4b2581(0x10d)](_0x4f55d8){const _0x357b11=a133_0x4b2581,_0x8f0bae=await this[_0x357b11(0xd6)](_0x4f55d8);return _0x8f0bae[_0x357b11(0x106)](flattenJourneyActivation);}async[a133_0x4b2581(0xc0)](_0x3c35e4,_0x2ccabd){const _0x272a5a=a133_0x4b2581;return await this[_0x272a5a(0x9d)][_0x272a5a(0xfa)](_0x3c35e4,_0x2ccabd);}async[a133_0x4b2581(0xee)](_0x1790a7){const _0x527f6e=a133_0x4b2581,_0x4ef2c7=await this[_0x527f6e(0x123)](_0x1790a7),_0x1347d6=generateColumnMapping(_0x4ef2c7);return{'journeyId':_0x4ef2c7['id'],'journeyName':_0x4ef2c7['attributes'][_0x527f6e(0xe7)],'database':_0x527f6e(0xca)+_0x4ef2c7[_0x527f6e(0xd0)][_0x527f6e(0xb8)],'table':_0x527f6e(0xc4)+_0x4ef2c7['id'],'columns':_0x1347d6};}async[a133_0x4b2581(0xa9)](_0x48ae0c){const _0x1201a2=a133_0x4b2581;return this[_0x1201a2(0x9d)][_0x1201a2(0x11c)](_0x48ae0c);}async[a133_0x4b2581(0xf2)](_0x2b0a04){const _0x2fec9f=a133_0x4b2581;if(!_0x2b0a04)return undefined;try{const _0x82e288=await this[_0x2fec9f(0xa9)](_0x2b0a04);return _0x82e288[_0x2fec9f(0xb3)];}catch{return undefined;}}async[a133_0x4b2581(0xda)](_0x2344f5){const _0x15a10b=a133_0x4b2581,_0x504bd4=await this['getJourney'](_0x2344f5),_0x2e67f3=_0x504bd4[_0x15a10b(0xd0)]['journeyBundleId'];if(!_0x2e67f3)return{'bundleId':'','bundleName':_0x504bd4[_0x15a10b(0xd0)][_0x15a10b(0xe7)],'bundleDescription':_0x504bd4[_0x15a10b(0xd0)]['description']??null,'latestJourneyId':_0x504bd4['id'],'versions':[synthesizePreBundleVersion(_0x504bd4)]};const _0x1a770c=await this[_0x15a10b(0xa9)](_0x2e67f3);return{'bundleId':_0x2e67f3,'bundleName':_0x1a770c['name'],'bundleDescription':_0x1a770c['description']??null,'latestJourneyId':_0x1a770c[_0x15a10b(0xb3)],'versions':formatVersionsFromBundle(_0x1a770c)};}async['createVersion'](_0x294d09){const _0x2dff45=a133_0x4b2581,_0x436858=await this[_0x2dff45(0x123)](_0x294d09),_0x37ec78=_0x436858[_0x2dff45(0xd0)]['journeyBundleId'];if(!_0x37ec78)throw new SDKError(ErrorCode[_0x2dff45(0xd1)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x2dff45(0x9d)][_0x2dff45(0x10c)](_0x37ec78);const _0x98f042=await this[_0x2dff45(0x9d)][_0x2dff45(0x11c)](_0x37ec78),_0x453eb0=_0x98f042[_0x2dff45(0xe7)]+'\x20v'+(_0x98f042['lastVersionNumber']+0x1);return this['client'][_0x2dff45(0x102)](_0x37ec78,{'sourceId':_0x294d09,'attributes':{'name':_0x453eb0}});}}
@@ -1 +1 @@
1
- const a133_0x6e4249=a133_0x2c89;(function(_0x48e6d9,_0x4ab56b){const _0x2710f5=a133_0x2c89,_0x596c4f=_0x48e6d9();while(!![]){try{const _0xe89e35=-parseInt(_0x2710f5(0x130))/0x1+-parseInt(_0x2710f5(0x12f))/0x2*(parseInt(_0x2710f5(0x12d))/0x3)+-parseInt(_0x2710f5(0x128))/0x4+-parseInt(_0x2710f5(0x12c))/0x5*(-parseInt(_0x2710f5(0x126))/0x6)+parseInt(_0x2710f5(0x129))/0x7+parseInt(_0x2710f5(0x12b))/0x8*(-parseInt(_0x2710f5(0x127))/0x9)+parseInt(_0x2710f5(0x12a))/0xa;if(_0xe89e35===_0x4ab56b)break;else _0x596c4f['push'](_0x596c4f['shift']());}catch(_0x500abd){_0x596c4f['push'](_0x596c4f['shift']());}}}(a133_0x4eba,0x7a28c));import{createTextCache}from'../../utils/local-cache.js';function a133_0x4eba(){const _0x15a41b=['575187pNAoCI','write','6rWEfIV','904720eMzezB','last_chat_id','llm/chat','clear','6VZsXxH','9htczdd','1833816nsRtNQ','1630370HYnRmz','22440630vOimMC','7322984CKsDYp','4385625xDPVGM'];a133_0x4eba=function(){return _0x15a41b;};return a133_0x4eba();}const chatIdCache=createTextCache(a133_0x6e4249(0x131),a133_0x6e4249(0x132));export function saveLastChatId(_0x238053){const _0x2d5e0f=a133_0x6e4249;chatIdCache[_0x2d5e0f(0x12e)](_0x238053);}function a133_0x2c89(_0xbf67b1,_0x4147fe){_0xbf67b1=_0xbf67b1-0x125;const _0x4eba35=a133_0x4eba();let _0x2c896c=_0x4eba35[_0xbf67b1];return _0x2c896c;}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0x56e035=a133_0x6e4249;chatIdCache[_0x56e035(0x125)]();}
1
+ function a134_0x60f7(_0x266306,_0x4b9fa9){_0x266306=_0x266306-0xd7;const _0x2c72a5=a134_0x2c72();let _0x60f707=_0x2c72a5[_0x266306];return _0x60f707;}const a134_0x1f787f=a134_0x60f7;(function(_0xf578a5,_0x54ae27){const _0x5ee122=a134_0x60f7,_0x33913b=_0xf578a5();while(!![]){try{const _0x2a94a0=parseInt(_0x5ee122(0xdc))/0x1*(parseInt(_0x5ee122(0xe4))/0x2)+parseInt(_0x5ee122(0xe5))/0x3*(parseInt(_0x5ee122(0xd7))/0x4)+-parseInt(_0x5ee122(0xdf))/0x5+-parseInt(_0x5ee122(0xe3))/0x6*(parseInt(_0x5ee122(0xdb))/0x7)+-parseInt(_0x5ee122(0xde))/0x8*(parseInt(_0x5ee122(0xe1))/0x9)+-parseInt(_0x5ee122(0xd9))/0xa*(parseInt(_0x5ee122(0xdd))/0xb)+parseInt(_0x5ee122(0xda))/0xc;if(_0x2a94a0===_0x54ae27)break;else _0x33913b['push'](_0x33913b['shift']());}catch(_0x25716f){_0x33913b['push'](_0x33913b['shift']());}}}(a134_0x2c72,0xb19f0));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache('last_chat_id',a134_0x1f787f(0xe0));export function saveLastChatId(_0x4abd20){const _0x15f53a=a134_0x1f787f;chatIdCache[_0x15f53a(0xd8)](_0x4abd20);}function a134_0x2c72(){const _0x47e38f=['9189rfVDSl','507859KWjoWt','32lekBkx','3220705JoAIEQ','llm/chat','1113318iXUyQN','read','156MecVOW','214ossNNj','12381htQlYD','940ubBybL','write','120UiqpdV','16623876GSzdMo','247121aPuANw'];a134_0x2c72=function(){return _0x47e38f;};return a134_0x2c72();}export function loadLastChatId(){const _0x5533bc=a134_0x1f787f;return chatIdCache[_0x5533bc(0xe2)]();}export function clearLastChatId(){chatIdCache['clear']();}