@treasuredata/tdx 2026.6.5 → 2026.7.0

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 (264) 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.d.ts.map +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/command.js.map +1 -1
  21. package/dist/commands/connection-command.js +1 -1
  22. package/dist/commands/databases.d.ts.map +1 -1
  23. package/dist/commands/databases.js +1 -1
  24. package/dist/commands/databases.js.map +1 -1
  25. package/dist/commands/delivery-command.js +1 -1
  26. package/dist/commands/describe.js +1 -1
  27. package/dist/commands/engage-campaign-pull-command.js +1 -1
  28. package/dist/commands/engage-campaign-push-command.js +1 -1
  29. package/dist/commands/engage-campaign-validate-command.js +1 -1
  30. package/dist/commands/engage-command.js +1 -1
  31. package/dist/commands/engage-template-pull-command.js +1 -1
  32. package/dist/commands/engage-template-push-command.js +1 -1
  33. package/dist/commands/engage-template-validate-command.js +1 -1
  34. package/dist/commands/job-command.js +1 -1
  35. package/dist/commands/journey-command.js +1 -1
  36. package/dist/commands/journey-command.js.map +1 -1
  37. package/dist/commands/journey-validate-command.js +1 -1
  38. package/dist/commands/llm-command.js +1 -1
  39. package/dist/commands/mcp-command.js +1 -1
  40. package/dist/commands/parent-segment-command.js +1 -1
  41. package/dist/commands/policy-command.js +1 -1
  42. package/dist/commands/profile-command.js +1 -1
  43. package/dist/commands/profiles-command.js +1 -1
  44. package/dist/commands/query-command.js +1 -1
  45. package/dist/commands/schedule-command.js +1 -1
  46. package/dist/commands/segment-command.js +1 -1
  47. package/dist/commands/segment-create-command.js +1 -1
  48. package/dist/commands/segment-fields-command.js +1 -1
  49. package/dist/commands/segment-move-command.d.ts +7 -0
  50. package/dist/commands/segment-move-command.d.ts.map +1 -1
  51. package/dist/commands/segment-move-command.js +1 -1
  52. package/dist/commands/segment-move-command.js.map +1 -1
  53. package/dist/commands/segment-pull-command.js +1 -1
  54. package/dist/commands/segment-push-command.js +1 -1
  55. package/dist/commands/segment-update-command.js +1 -1
  56. package/dist/commands/segment-use-command.js +1 -1
  57. package/dist/commands/segment-validate-command.js +1 -1
  58. package/dist/commands/segments.d.ts +9 -0
  59. package/dist/commands/segments.d.ts.map +1 -1
  60. package/dist/commands/segments.js +1 -1
  61. package/dist/commands/segments.js.map +1 -1
  62. package/dist/commands/show.js +1 -1
  63. package/dist/commands/status-command.js +1 -1
  64. package/dist/commands/table-deleted.js +1 -1
  65. package/dist/commands/tables.js +1 -1
  66. package/dist/commands/unset-command.js +1 -1
  67. package/dist/commands/upgrade-command.js +1 -1
  68. package/dist/commands/use-command.js +1 -1
  69. package/dist/commands/user-command.js +1 -1
  70. package/dist/commands/work-command.js +1 -1
  71. package/dist/commands/workflow-command.js +1 -1
  72. package/dist/core/auth.js +1 -1
  73. package/dist/core/command-output.d.ts.map +1 -1
  74. package/dist/core/command-output.js +1 -1
  75. package/dist/core/command-output.js.map +1 -1
  76. package/dist/core/config.js +1 -1
  77. package/dist/core/connection-cache.js +1 -1
  78. package/dist/core/constants.js +1 -1
  79. package/dist/core/credential-cache.js +1 -1
  80. package/dist/core/global-context.js +1 -1
  81. package/dist/core/keychain.js +1 -1
  82. package/dist/core/oauth-keychain.js +1 -1
  83. package/dist/core/oauth.js +1 -1
  84. package/dist/core/profile.js +1 -1
  85. package/dist/core/project-config.js +1 -1
  86. package/dist/core/session.js +1 -1
  87. package/dist/core/user-cache.js +1 -1
  88. package/dist/core/version.js +1 -1
  89. package/dist/index.js +1 -1
  90. package/dist/mcp/server.js +1 -1
  91. package/dist/mcp/tools/index.js +1 -1
  92. package/dist/mcp/tools/tdx-run.js +1 -1
  93. package/dist/mcp/tools/tdx-search.js +1 -1
  94. package/dist/mcp/tools/work-create-item.js +1 -1
  95. package/dist/mcp/utils.js +1 -1
  96. package/dist/proxy/claude-usage-tracker.js +1 -1
  97. package/dist/proxy/passthrough-server.js +1 -1
  98. package/dist/proxy/sse-usage-parser.js +1 -1
  99. package/dist/sdk/agent/agent-config.js +1 -1
  100. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  101. package/dist/sdk/agent/agent-yaml.js +1 -1
  102. package/dist/sdk/agent/test/evaluator.js +1 -1
  103. package/dist/sdk/agent/test/executor.js +1 -1
  104. package/dist/sdk/agent/test/index.js +1 -1
  105. package/dist/sdk/agent/test/output.js +1 -1
  106. package/dist/sdk/agent/test/parser.js +1 -1
  107. package/dist/sdk/agent/tool-target-registry.js +1 -1
  108. package/dist/sdk/api.js +1 -1
  109. package/dist/sdk/cas/cas-api-client.js +1 -1
  110. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  111. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  112. package/dist/sdk/cas/index.js +1 -1
  113. package/dist/sdk/cas/pull-workflow.js +1 -1
  114. package/dist/sdk/cas/push-workflow.js +1 -1
  115. package/dist/sdk/client/cdp-api-client.js +1 -1
  116. package/dist/sdk/client/delivery-api-client.js +1 -1
  117. package/dist/sdk/client/endpoints.js +1 -1
  118. package/dist/sdk/client/engage-api-client.js +1 -1
  119. package/dist/sdk/client/http-client.js +1 -1
  120. package/dist/sdk/client/llm-api-client.js +1 -1
  121. package/dist/sdk/client/oauth-refresh.js +1 -1
  122. package/dist/sdk/client/rate-limiter.js +1 -1
  123. package/dist/sdk/client/td-api-client.js +1 -1
  124. package/dist/sdk/client/trino-api-client.js +1 -1
  125. package/dist/sdk/client/workflow-client.js +1 -1
  126. package/dist/sdk/connection-validator.js +1 -1
  127. package/dist/sdk/connection.js +1 -1
  128. package/dist/sdk/delivery.js +1 -1
  129. package/dist/sdk/engage/campaign-pull.js +1 -1
  130. package/dist/sdk/engage/campaign-push.js +1 -1
  131. package/dist/sdk/engage/campaign-validator.js +1 -1
  132. package/dist/sdk/engage/campaign-yaml.js +1 -1
  133. package/dist/sdk/engage/template-pull.js +1 -1
  134. package/dist/sdk/engage/template-push.js +1 -1
  135. package/dist/sdk/engage/template-validator.js +1 -1
  136. package/dist/sdk/engage/template-yaml.js +1 -1
  137. package/dist/sdk/engage/types/campaign-def.js +1 -1
  138. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  139. package/dist/sdk/engage/types/template-schema.js +1 -1
  140. package/dist/sdk/engage.js +1 -1
  141. package/dist/sdk/errors.js +1 -1
  142. package/dist/sdk/index.d.ts +1 -1
  143. package/dist/sdk/index.d.ts.map +1 -1
  144. package/dist/sdk/index.js +1 -1
  145. package/dist/sdk/index.js.map +1 -1
  146. package/dist/sdk/io/index.js +1 -1
  147. package/dist/sdk/io/node-filesystem.js +1 -1
  148. package/dist/sdk/job.js +1 -1
  149. package/dist/sdk/journey.js +1 -1
  150. package/dist/sdk/llm/chat-cache.js +1 -1
  151. package/dist/sdk/llm/index.js +1 -1
  152. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  153. package/dist/sdk/llm/model-factors.js +1 -1
  154. package/dist/sdk/llm/user-settings.js +1 -1
  155. package/dist/sdk/personalization.js +1 -1
  156. package/dist/sdk/policy.js +1 -1
  157. package/dist/sdk/query/deleted-table-validation.js +1 -1
  158. package/dist/sdk/query/index.js +1 -1
  159. package/dist/sdk/query/sql-parser.js +1 -1
  160. package/dist/sdk/realtime.js +1 -1
  161. package/dist/sdk/schedule.js +1 -1
  162. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  163. package/dist/sdk/segment/fields-display.js +1 -1
  164. package/dist/sdk/segment/file-discovery.js +1 -1
  165. package/dist/sdk/segment/journey-utils.js +1 -1
  166. package/dist/sdk/segment/journey-validator.js +1 -1
  167. package/dist/sdk/segment/journey-yaml.d.ts +6 -2
  168. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  169. package/dist/sdk/segment/journey-yaml.js +1 -1
  170. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  171. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  172. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  173. package/dist/sdk/segment/pull-workflow.js +1 -1
  174. package/dist/sdk/segment/push-recovery.js +1 -1
  175. package/dist/sdk/segment/push-workflow.js +1 -1
  176. package/dist/sdk/segment/push-workflow.js.map +1 -1
  177. package/dist/sdk/segment/resolution-context.js +1 -1
  178. package/dist/sdk/segment/segment-path-parser.d.ts.map +1 -1
  179. package/dist/sdk/segment/segment-path-parser.js +1 -1
  180. package/dist/sdk/segment/segment-path-parser.js.map +1 -1
  181. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  182. package/dist/sdk/segment/segment-validator.js +1 -1
  183. package/dist/sdk/segment/target-resolution.js +1 -1
  184. package/dist/sdk/segment/tdx-config.js +1 -1
  185. package/dist/sdk/segment/types/activation-schema.js +1 -1
  186. package/dist/sdk/segment/types/journey-def.js +1 -1
  187. package/dist/sdk/segment/types/journey-schema.js +1 -1
  188. package/dist/sdk/segment/types/segment-def.js +1 -1
  189. package/dist/sdk/segment/types/segment-schema.js +1 -1
  190. package/dist/sdk/segment/validate-files.d.ts +2 -5
  191. package/dist/sdk/segment/validate-files.d.ts.map +1 -1
  192. package/dist/sdk/segment/validate-files.js +1 -1
  193. package/dist/sdk/segment/validate-files.js.map +1 -1
  194. package/dist/sdk/segment/yaml-validator.js +1 -1
  195. package/dist/sdk/segment.d.ts +55 -1
  196. package/dist/sdk/segment.d.ts.map +1 -1
  197. package/dist/sdk/segment.js +1 -1
  198. package/dist/sdk/segment.js.map +1 -1
  199. package/dist/sdk/types/cdp.d.ts +21 -0
  200. package/dist/sdk/types/cdp.d.ts.map +1 -1
  201. package/dist/sdk/types/index.js +1 -1
  202. package/dist/sdk/types/progress.js +1 -1
  203. package/dist/sdk/types/workspace.js +1 -1
  204. package/dist/sdk/user.js +1 -1
  205. package/dist/sdk/util/format-detector.js +1 -1
  206. package/dist/sdk/util/formatters.js +1 -1
  207. package/dist/sdk/util/index.js +1 -1
  208. package/dist/sdk/util/paginate.js +1 -1
  209. package/dist/sdk/util/tree-formatter.js +1 -1
  210. package/dist/sdk/util/tree-search.d.ts +35 -0
  211. package/dist/sdk/util/tree-search.d.ts.map +1 -0
  212. package/dist/sdk/util/tree-search.js +1 -0
  213. package/dist/sdk/util/tree-search.js.map +1 -0
  214. package/dist/sdk/workflow/archive-validation.js +1 -1
  215. package/dist/sdk/workflow/clone-workflow.js +1 -1
  216. package/dist/sdk/workflow/index.js +1 -1
  217. package/dist/sdk/workflow/pull-workflow.js +1 -1
  218. package/dist/sdk/workflow/push-workflow.js +1 -1
  219. package/dist/sdk/workflow/task-graph.js +1 -1
  220. package/dist/sdk/workflow/tdx-config.js +1 -1
  221. package/dist/sdk/workflow/workflow-utils.js +1 -1
  222. package/dist/sdk/workspace/access-tracker.js +1 -1
  223. package/dist/sdk/workspace/frontmatter.js +1 -1
  224. package/dist/sdk/workspace/git.js +1 -1
  225. package/dist/sdk/workspace/index.js +1 -1
  226. package/dist/sdk/workspace/templates.js +1 -1
  227. package/dist/sdk/workspace/weekly.js +1 -1
  228. package/dist/sdk/workspace/wikilinks.js +1 -1
  229. package/dist/test-utils/command-runner.js +1 -1
  230. package/dist/test-utils/factories.js +1 -1
  231. package/dist/test-utils/fixtures.js +1 -1
  232. package/dist/test-utils/http-mock.js +1 -1
  233. package/dist/test-utils/index.js +1 -1
  234. package/dist/utils/async.js +1 -1
  235. package/dist/utils/colors.js +1 -1
  236. package/dist/utils/diff.js +1 -1
  237. package/dist/utils/file-permissions.js +1 -1
  238. package/dist/utils/file-reader.js +1 -1
  239. package/dist/utils/github-releases.js +1 -1
  240. package/dist/utils/global-cache.js +1 -1
  241. package/dist/utils/json-loader.js +1 -1
  242. package/dist/utils/local-cache.js +1 -1
  243. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  244. package/dist/utils/logger/formatters/index.js +1 -1
  245. package/dist/utils/logger/handlers/console-handler.js +1 -1
  246. package/dist/utils/logger/handlers/file-handler.js +1 -1
  247. package/dist/utils/logger/handlers/index.js +1 -1
  248. package/dist/utils/logger/handlers/null-handler.js +1 -1
  249. package/dist/utils/logger/index.js +1 -1
  250. package/dist/utils/logger/logger.js +1 -1
  251. package/dist/utils/logger/types.js +1 -1
  252. package/dist/utils/option-validation.js +1 -1
  253. package/dist/utils/process.d.ts +6 -0
  254. package/dist/utils/process.d.ts.map +1 -1
  255. package/dist/utils/process.js +1 -1
  256. package/dist/utils/process.js.map +1 -1
  257. package/dist/utils/prompt.js +1 -1
  258. package/dist/utils/spinner.js +1 -1
  259. package/dist/utils/sse-parser.js +1 -1
  260. package/dist/utils/string-utils.js +1 -1
  261. package/dist/utils/table-ref-parser.js +1 -1
  262. package/dist/utils/tdx-logger.js +1 -1
  263. package/dist/utils/version-check.js +1 -1
  264. package/package.json +1 -1
@@ -1 +1 @@
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
+ const a133_0x671937=a133_0x5194;(function(_0x15aa4c,_0x855510){const _0x354da0=a133_0x5194,_0x1223b4=_0x15aa4c();while(!![]){try{const _0x116659=-parseInt(_0x354da0(0xd8))/0x1*(parseInt(_0x354da0(0x101))/0x2)+parseInt(_0x354da0(0xb2))/0x3*(parseInt(_0x354da0(0xc8))/0x4)+parseInt(_0x354da0(0xf0))/0x5+parseInt(_0x354da0(0x114))/0x6*(parseInt(_0x354da0(0x12c))/0x7)+parseInt(_0x354da0(0xb3))/0x8+-parseInt(_0x354da0(0x11e))/0x9+-parseInt(_0x354da0(0x105))/0xa*(parseInt(_0x354da0(0x102))/0xb);if(_0x116659===_0x855510)break;else _0x1223b4['push'](_0x1223b4['shift']());}catch(_0x3a7c66){_0x1223b4['push'](_0x1223b4['shift']());}}}(a133_0x411f,0xee9ec));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x5c792f){const _0x16c14d=a133_0x5194;return _0x5c792f['journeyBundleId']??_0x5c792f[_0x16c14d(0xf6)]?.[_0x16c14d(0xf5)]??undefined;}function getVersionNumber(_0x6a866b){const _0x466924=a133_0x5194;return _0x6a866b[_0x466924(0xbe)]??_0x6a866b[_0x466924(0xf6)]?.[_0x466924(0xbe)]??0x0;}function getState(_0x1833e0){const _0x292d08=a133_0x5194;return _0x1833e0[_0x292d08(0x126)]??_0x1833e0[_0x292d08(0xf6)]?.[_0x292d08(0x126)];}export function deduplicateJourneysByBundle(_0x5c8821){const _0x16f6c3=a133_0x5194,_0x5ede98=new Map();let _0x2f6181=0x0;for(const _0x45e4d4 of _0x5c8821){const _0x544b06=getBundleId(_0x45e4d4);if(!_0x544b06){const _0x5c7b69=_0x16f6c3(0x130)+(_0x45e4d4['id']??_0x16f6c3(0xdb)+_0x2f6181++);_0x5ede98['set'](_0x5c7b69,_0x45e4d4);continue;}const _0x1c435c=_0x5ede98['get'](_0x544b06);if(!_0x1c435c)_0x5ede98[_0x16f6c3(0xf8)](_0x544b06,_0x45e4d4);else{const _0x4aa8bb=getState(_0x1c435c)==='launched',_0x45a8df=getState(_0x45e4d4)===_0x16f6c3(0x125);if(_0x45a8df&&!_0x4aa8bb)_0x5ede98[_0x16f6c3(0xf8)](_0x544b06,_0x45e4d4);else{if(!_0x45a8df&&_0x4aa8bb){}else{const _0x1fb976=getVersionNumber(_0x1c435c),_0x7a09da=getVersionNumber(_0x45e4d4);_0x7a09da>_0x1fb976&&_0x5ede98[_0x16f6c3(0xf8)](_0x544b06,_0x45e4d4);}}}}return Array[_0x16f6c3(0x116)](_0x5ede98['values']());}const VALID_JOURNEY_STATES=new Set([a133_0x671937(0x10b),a133_0x671937(0xc2),'launched']);export function parseJourneyState(_0x15d4d8){const _0x550549=a133_0x671937;if(typeof _0x15d4d8===_0x550549(0xba)&&VALID_JOURNEY_STATES[_0x550549(0x133)](_0x15d4d8))return _0x15d4d8;return _0x550549(0x10b);}export function entityToJourneyListItem(_0x48ecce,_0x1b4743){const _0xb776eb=a133_0x671937,_0x181a2e=_0x48ecce['attributes'];return{'id':_0x48ecce['id'],'name':_0x181a2e[_0xb776eb(0xc5)]??'','journeyBundleName':_0x181a2e[_0xb776eb(0xed)]??_0x181a2e[_0xb776eb(0xc5)]??'','journeyBundleId':_0x181a2e[_0xb776eb(0xf5)]??'','versionNumber':_0x181a2e['versionNumber'],'description':_0x181a2e[_0xb776eb(0xbd)]??null,'state':parseJourneyState(_0x181a2e[_0xb776eb(0x126)]),'paused':_0x181a2e[_0xb776eb(0xe2)]??![],'audienceId':_0x1b4743,'folderId':_0x181a2e['segmentFolderId']??_0x48ecce[_0xb776eb(0xab)]?.['parentFolder']?.[_0xb776eb(0x104)]?.['id']??null,'createdAt':_0x181a2e[_0xb776eb(0x118)]??'','updatedAt':_0x181a2e[_0xb776eb(0xaf)]??''};}function convertToColumnId(_0x24c92c){const _0x4a0189=a133_0x671937;return _0x24c92c[_0x4a0189(0x12e)](/-/g,'_');}function getStepEntries(_0x3c89b6){const _0x430fdf=a133_0x671937;if(!_0x3c89b6)return[];if(Array[_0x430fdf(0x12f)](_0x3c89b6))return _0x3c89b6['map'](_0x4b1dba=>[_0x4b1dba['id'],_0x4b1dba]);return Object[_0x430fdf(0x11b)](_0x3c89b6);}function a133_0x5194(_0x6dd4a6,_0x11a8bb){_0x6dd4a6=_0x6dd4a6-0xa9;const _0x411f48=a133_0x411f();let _0x519476=_0x411f48[_0x6dd4a6];return _0x519476;}export function flattenJourneyActivation(_0x56b8bf){const {activationParams:_0x40c685,activationId:_0x26cb0e,runAfterJourneyRefresh:_0x4fee49}=_0x56b8bf['attributes'];return{'id':_0x56b8bf['id'],'activationId':_0x26cb0e,'runAfterJourneyRefresh':_0x4fee49,..._0x40c685};}function col(_0x4883a2,_0x3f2446={}){const _0x41e553=a133_0x671937;return{'column':_0x4883a2,'direction':null,'stageIndex':null,'stageName':null,'category':_0x41e553(0xf4),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x3f2446};}export function generateColumnMapping(_0x193ae9){const _0x5a2335=a133_0x671937,_0x4beb26=[];_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xc4))),_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xe1),{'direction':'in','category':_0x5a2335(0xbc)})),_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0x119),{'direction':_0x5a2335(0xfd),'category':_0x5a2335(0xbc)}));_0x193ae9[_0x5a2335(0xf6)]['goal']&&_0x4beb26[_0x5a2335(0x135)](col('intime_goal',{'direction':'in','category':_0x5a2335(0x12b),'detail':_0x193ae9[_0x5a2335(0xf6)][_0x5a2335(0x12b)][_0x5a2335(0xc5)]||null}));const _0xdcb32f=_0x193ae9[_0x5a2335(0xf6)][_0x5a2335(0xd5)]||[];for(let _0x179d75=0x0;_0x179d75<_0xdcb32f[_0x5a2335(0x132)];_0x179d75++){const _0x4e7a56=_0xdcb32f[_0x179d75],_0x4aa482=_0x4e7a56[_0x5a2335(0xc5)],_0x5ede02={'stageIndex':_0x179d75,'stageName':_0x4aa482},_0x4f5c52=_0x4e7a56[_0x5a2335(0x10a)]?.[_0x5a2335(0xc5)]||null;_0x4beb26[_0x5a2335(0x135)](col('intime_stage_'+_0x179d75,{..._0x5ede02,'direction':'in','category':_0x5a2335(0xcc),'detail':_0x4f5c52})),_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xd9)+_0x179d75,{..._0x5ede02,'direction':_0x5a2335(0xfd),'category':_0x5a2335(0xcc),'detail':_0x4f5c52}));_0x4e7a56[_0x5a2335(0xfb)]&&_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xe7)+_0x179d75+_0x5a2335(0xcb),{..._0x5ede02,'direction':'in','category':_0x5a2335(0xfb),'detail':_0x4e7a56[_0x5a2335(0xfb)][_0x5a2335(0xc5)]||null}));const _0x371364=_0x4e7a56[_0x5a2335(0x122)]||_0x4e7a56['exitCriteria']||[];for(let _0x487dc4=0x0;_0x487dc4<_0x371364[_0x5a2335(0x132)];_0x487dc4++){_0x4beb26['push'](col('intime_stage_'+_0x179d75+'_exit_'+_0x487dc4,{..._0x5ede02,'direction':'in','category':'exit_criteria','detail':_0x371364[_0x487dc4][_0x5a2335(0xc5)]||null}));}const _0x50e90f=getStepEntries(_0x4e7a56[_0x5a2335(0xe3)]);for(const [_0x567a74,_0xa9b7d3]of _0x50e90f){const _0x55ec2e=convertToColumnId(_0x567a74),_0xfb0033=_0xa9b7d3['type']||null,_0x38de1f=_0xa9b7d3[_0x5a2335(0xc5)]||null,_0x95ea7={..._0x5ede02,'stepType':_0xfb0033,'stepName':_0x38de1f,'stepId':_0x567a74};_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xe7)+_0x179d75+'_'+_0x55ec2e,{..._0x95ea7,'direction':'in','category':_0x5a2335(0xd3)})),_0x4beb26['push'](col(_0x5a2335(0xd9)+_0x179d75+'_'+_0x55ec2e,{..._0x95ea7,'direction':_0x5a2335(0xfd),'category':'step'}));if(_0xa9b7d3[_0x5a2335(0xa9)]===_0x5a2335(0xb5)&&_0xa9b7d3[_0x5a2335(0xdf)])for(const _0x1b7bb1 of _0xa9b7d3[_0x5a2335(0xdf)]){_0x1b7bb1['segmentId']&&_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xe7)+_0x179d75+'_'+_0x55ec2e+'_'+_0x1b7bb1[_0x5a2335(0xfc)],{..._0x95ea7,'direction':'in','category':_0x5a2335(0xdd),'detail':_0x1b7bb1[_0x5a2335(0xc5)]||(_0x1b7bb1[_0x5a2335(0x12d)]?_0x5a2335(0xd4):null)}));}if((_0xa9b7d3[_0x5a2335(0xa9)]==='AbTest'||_0xa9b7d3[_0x5a2335(0xa9)]===_0x5a2335(0xc6))&&_0xa9b7d3['variants'])for(const _0x389d3c of _0xa9b7d3[_0x5a2335(0xc3)]){_0x389d3c['id']&&_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xe7)+_0x179d75+'_'+_0x55ec2e+'_variant_'+convertToColumnId(_0x389d3c['id']),{..._0x95ea7,'direction':'in','category':'variant','detail':_0x389d3c[_0x5a2335(0xc5)]||null}));}if(_0xa9b7d3['type']===_0x5a2335(0xe8)||_0xa9b7d3[_0x5a2335(0xa9)]===_0x5a2335(0xde)){const _0x383360=[];if(_0xa9b7d3['conditionSegmentId'])_0x383360[_0x5a2335(0x135)](_0xa9b7d3[_0x5a2335(0x11f)]);else{if(Array[_0x5a2335(0x12f)](_0xa9b7d3['conditions']))for(const _0x2114ca of _0xa9b7d3[_0x5a2335(0xf7)]){_0x2114ca[_0x5a2335(0xfc)]&&!_0x2114ca[_0x5a2335(0xfe)]&&_0x383360[_0x5a2335(0x135)](_0x2114ca[_0x5a2335(0xfc)]);}else _0xa9b7d3['waitCondition']?.[_0x5a2335(0xfc)]&&_0x383360[_0x5a2335(0x135)](_0xa9b7d3['waitCondition'][_0x5a2335(0xfc)]);}for(const _0x40639e of _0x383360){_0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0xe7)+_0x179d75+'_'+_0x55ec2e+'_'+_0x40639e,{..._0x95ea7,'direction':'in','category':'branch'}));}}}}return _0x4beb26[_0x5a2335(0x135)](col(_0x5a2335(0x11d))),_0x4beb26;}export function aggregateJourneyHistory(_0x58981f){const _0x8e15b=a133_0x671937,_0x470142=_0x58981f[_0x8e15b(0x134)]((_0x3a0119,_0x2bb971)=>_0x3a0119+(_0x2bb971['entryInflux']??0x0),0x0),_0x3a9dbe=_0x58981f['reduce']((_0x1186e0,_0x557fd2)=>_0x1186e0+(_0x557fd2[_0x8e15b(0xce)]??0x0),0x0),_0x18debf=_0x58981f['reduce']((_0x3f0c96,_0x2870ce)=>_0x3f0c96+((_0x2870ce[_0x8e15b(0xca)]??0x0)+(_0x2870ce[_0x8e15b(0xb9)]??0x0)),0x0),_0x5c1699=_0x58981f[_0x58981f['length']-0x1];return{'size':_0x5c1699?.[_0x8e15b(0x100)]??0x0,'entered':_0x470142,'goal_achieved':_0x3a9dbe,'completion_rate':_0x3a9dbe&&_0x470142?_0x3a9dbe/_0x470142*0x64:0x0,'exit_or_jump':_0x18debf,'exit_or_jump_rate':_0x18debf&&_0x470142?_0x18debf/_0x470142*0x64:0x0};}export function aggregateStageHistory(_0x54f379){const _0x2fedf8=a133_0x671937,_0x592461=_0x54f379[_0x2fedf8(0x134)]((_0xce8d5d,_0x4d0181)=>_0xce8d5d+(_0x4d0181[_0x2fedf8(0xbf)]??0x0),0x0),_0x57de41=_0x54f379[_0x2fedf8(0x134)]((_0x5a27af,_0x48a21e)=>_0x5a27af+(_0x48a21e[_0x2fedf8(0x129)]??0x0),0x0),_0x38bdd3=_0x54f379[_0x2fedf8(0x134)]((_0x424da7,_0x556bf5)=>_0x424da7+((_0x556bf5[_0x2fedf8(0xca)]??0x0)+(_0x556bf5[_0x2fedf8(0xb9)]??0x0)),0x0),_0x13fe7a=_0x54f379[_0x54f379['length']-0x1];return{'size':_0x13fe7a?.[_0x2fedf8(0x100)]??0x0,'entered':_0x592461,'milestone':_0x57de41,'milestone_rate':_0x57de41&&_0x592461?_0x57de41/_0x592461*0x64:0x0,'exit_or_jump':_0x38bdd3,'exit_or_jump_rate':_0x38bdd3&&_0x592461?_0x38bdd3/_0x592461*0x64:0x0};}export function assembleJourneyStats(_0x4d97f6,_0x483354){const _0x4ac229=a133_0x671937,_0x221998=!!(_0x483354?.['from']||_0x483354?.['to'])&&!!_0x4d97f6[_0x4ac229(0x108)]?.['length'];if(_0x221998){const _0x5b4410=aggregateJourneyHistory(_0x4d97f6[_0x4ac229(0x108)]),_0x54e17c={'journey_id':_0x4d97f6[_0x4ac229(0xbb)],..._0x483354?.['from']&&{'from':_0x483354[_0x4ac229(0x116)]},..._0x483354?.['to']&&{'to':_0x483354['to']},..._0x5b4410};return _0x483354?.[_0x4ac229(0xf2)]&&(_0x54e17c[_0x4ac229(0x108)]=_0x4d97f6['history']),_0x54e17c;}return{'journey_id':_0x4d97f6[_0x4ac229(0xbb)],'size':_0x4d97f6[_0x4ac229(0x100)],'entered':_0x4d97f6['enteredSize'],'goal_achieved':_0x4d97f6[_0x4ac229(0xc9)],'completion_rate':_0x4d97f6[_0x4ac229(0x121)],'exit_or_jump':_0x4d97f6['exitOrJumpSize'],'exit_or_jump_rate':_0x4d97f6[_0x4ac229(0xfa)]};}export function formatVersionsFromBundle(_0x504ef7){const _0x33be8a=a133_0x671937,_0x57ec5b=_0x504ef7[_0x33be8a(0xc1)][_0x33be8a(0xb4)](_0x3e2ac1=>({'journeyId':_0x3e2ac1['id'],'versionNumber':_0x3e2ac1[_0x33be8a(0xf6)][_0x33be8a(0xbe)]??0x0,'name':_0x3e2ac1['attributes'][_0x33be8a(0xc5)],'state':_0x3e2ac1[_0x33be8a(0xf6)][_0x33be8a(0x126)],'paused':_0x3e2ac1['attributes']['paused'],'createdAt':_0x3e2ac1[_0x33be8a(0xf6)][_0x33be8a(0x118)],'updatedAt':_0x3e2ac1['attributes'][_0x33be8a(0xaf)]}));return _0x57ec5b[_0x33be8a(0x131)]((_0x4913a5,_0x44bd7a)=>_0x4913a5[_0x33be8a(0xbe)]-_0x44bd7a['versionNumber']),_0x57ec5b;}export function synthesizePreBundleVersion(_0x5f0ebd){const _0x150558=a133_0x671937;return{'journeyId':_0x5f0ebd['id'],'versionNumber':0x1,'name':_0x5f0ebd[_0x150558(0xf6)][_0x150558(0xc5)],'state':_0x5f0ebd[_0x150558(0xf6)][_0x150558(0x126)],'paused':_0x5f0ebd[_0x150558(0xf6)]['paused'],'createdAt':_0x5f0ebd[_0x150558(0xf6)]['createdAt'],'updatedAt':_0x5f0ebd[_0x150558(0xf6)][_0x150558(0xaf)]};}export function buildStageNameMap(_0x3c474e){const _0xb7abaa=a133_0x671937;return new Map(_0x3c474e['attributes'][_0xb7abaa(0xd5)]?.[_0xb7abaa(0xb4)](_0x23cd03=>[_0x23cd03['id'],_0x23cd03['name']])??[]);}function a133_0x411f(){const _0x25d4bd=['string','journeyId','journey','description','versionNumber','entryInflux','journeyStageId','journeys','simulation','variants','cdp_customer_id','name','ABTest','getJourneyActivation','4ZOcUpT','goalSize','exitInflux','_milestone','stage','resolveRootFolderId','goalInflux','listVersions','listEntitiesByFolder','listActivations','limit','step','Excluded\x20profiles','journeyStages','listJourneys','createVersion','5NrJczl','outtime_stage_','lastVersionNumber','idx-','filter','branch','Wait','branches','audienceId','intime_journey','paused','steps','listJourneyActivations','get','run','intime_stage_','WaitStep','includeAllVersions','runJourney','create','getActivationSankeyChart','journeyBundleName','Journey\x20activation\x20step\x20not\x20found:\x20','updateJourney','933175CelbXd','getColumnMapping','includeHistory','pause','fixed','journeyBundleId','attributes','conditions','set','latestJourneyId','exitOrJumpRate','milestone','segmentId','out','timedOutPath','all','size','172340HOwNEq','1220549DNkxrl','getConversionSankeyChart','data','210kBZiAq','JOURNEY_NOT_FOUND','pauseJourney','history','getJourneyBundle','entryCriteria','draft','toLowerCase','listJourneysFromParentSegment','activationStepsById','listJourneysWithDetails','createJourney','getJourneyStatistics','getJourney','Journey\x20not\x20found:\x20','419436wMcpnk','listJourneysWithDetailsFromParentSegment','from','createJourneyVersion','createdAt','outtime_journey','applyVersionDeduplication','entries','getBundle','time','9323514hOFrZB','conditionSegmentId','getLatestJourneyId','completionRate','exitCriterias','resumeJourney','update','launched','state','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','folder-segment','milestoneInflux','createActivation','goal','119RuiDzj','excluded','replace','isArray','no-bundle-','sort','length','has','reduce','push','NOT_FOUND','type','resolveJourneyId','relationships','activation','listJourneysWithFolders','getStatistics','updatedAt','client','journey_','4376472wiJriD','15523696PTGwQd','map','DecisionPoint','fetchTrafficRaw','conversion','cdp_audience_','jumpInflux'];a133_0x411f=function(){return _0x25d4bd;};return a133_0x411f();}export class JourneySDK{['client'];constructor(_0x45c2c0){const _0x542e75=a133_0x671937;this[_0x542e75(0xb0)]=new CDPApiClient(_0x45c2c0);}[a133_0x671937(0x11a)](_0x27f3e9,_0x6b2aab){return _0x6b2aab?_0x27f3e9:deduplicateJourneysByBundle(_0x27f3e9);}async['resolveRootFolderId'](_0x40b1a0){const _0x4060b3=a133_0x671937,_0x561be6=await this[_0x4060b3(0xb0)]['getParentSegmentFull'](_0x40b1a0);return _0x561be6['rootFolderId']??undefined;}async[a133_0x671937(0x10f)](_0x24541b,_0x4d71aa){const _0x12b7ab=a133_0x671937;try{const _0x2b965a=await this[_0x12b7ab(0xb0)][_0x12b7ab(0x10f)](_0x24541b);return{'journeys':this[_0x12b7ab(0x11a)](_0x2b965a['journeys'],_0x4d71aa),'activationStepsById':_0x2b965a[_0x12b7ab(0x10e)]};}catch(_0xabe59d){if(isHttp404Error(_0xabe59d))return{'journeys':[],'activationStepsById':new Map()};throw _0xabe59d;}}async[a133_0x671937(0x10d)](_0x5de9b0,_0x31e443,_0x2a0da3){const _0x53675a=a133_0x671937;let _0x31b4dd=_0x31e443;if(!_0x31b4dd)try{_0x31b4dd=await this[_0x53675a(0xcd)](_0x5de9b0);}catch(_0x112154){if(isHttp404Error(_0x112154))return[];throw _0x112154;}if(!_0x31b4dd)return[];let _0x3b8ed0;if(_0x2a0da3?.[_0x53675a(0xe9)])_0x3b8ed0=await this[_0x53675a(0xb0)][_0x53675a(0xd6)](_0x31b4dd);else{const _0x23fcc2=await this[_0x53675a(0xb0)][_0x53675a(0xd0)](_0x31b4dd,0x20,![]),_0x3d6118=_0x23fcc2[_0x53675a(0x104)],_0xe974ce=_0x3d6118[_0x53675a(0xdc)](_0x528e0a=>_0x528e0a['type']==='journey');_0x3b8ed0=_0xe974ce[_0x53675a(0xb4)](_0x37c63d=>entityToJourneyListItem(_0x37c63d,_0x5de9b0));}return this['applyVersionDeduplication'](_0x3b8ed0,_0x2a0da3?.[_0x53675a(0xe9)]);}async[a133_0x671937(0xad)](_0x301b11,_0x3f2027,_0x1d2873){const _0x13e2b9=a133_0x671937;if(!_0x3f2027)return{'journeys':[],'folders':[]};const _0x5f56c4=await this['client'][_0x13e2b9(0xd0)](_0x3f2027,0x20,![]),_0x31eb2d=_0x5f56c4['data'],_0x1439b6=_0x31eb2d[_0x13e2b9(0xdc)](_0x1861ff=>_0x1861ff[_0x13e2b9(0xa9)]===_0x13e2b9(0x128)&&_0x1861ff['id']!==_0x3f2027),_0x404fa4=_0x1439b6[_0x13e2b9(0xb4)](_0x2be7fd=>({'id':_0x2be7fd['id'],'name':_0x2be7fd[_0x13e2b9(0xf6)][_0x13e2b9(0xc5)]})),_0x419249=_0x31eb2d[_0x13e2b9(0xdc)](_0x3d3ece=>_0x3d3ece[_0x13e2b9(0xa9)]==='journey'),_0x436afe=_0x419249[_0x13e2b9(0xb4)](_0x11bf9b=>entityToJourneyListItem(_0x11bf9b,_0x301b11));return{'journeys':this[_0x13e2b9(0x11a)](_0x436afe,_0x1d2873?.[_0x13e2b9(0xe9)]),'folders':_0x404fa4};}async[a133_0x671937(0x115)](_0x546c8e,_0x18881b){const _0x5af9e8=a133_0x671937;let _0x1972d2;try{_0x1972d2=await this['resolveRootFolderId'](_0x546c8e);}catch(_0x546583){if(isHttp404Error(_0x546583))return{'journeys':[],'activationStepsById':new Map()};throw _0x546583;}if(!_0x1972d2)return{'journeys':[],'activationStepsById':new Map()};const _0x30a46b=await this['listJourneysWithDetails'](_0x1972d2,_0x18881b?.[_0x5af9e8(0xe9)]);return{'journeys':this[_0x5af9e8(0x11a)](_0x30a46b[_0x5af9e8(0xc1)],_0x18881b?.[_0x5af9e8(0xe9)]),'activationStepsById':_0x30a46b['activationStepsById']};}async[a133_0x671937(0x112)](_0x4f1a61){const _0x1cca40=a133_0x671937;try{return await this[_0x1cca40(0xb0)][_0x1cca40(0x112)](_0x4f1a61);}catch(_0x29efaa){if(isHttp404Error(_0x29efaa))throw new SDKError(ErrorCode[_0x1cca40(0x106)],_0x1cca40(0x113)+_0x4f1a61,_0x29efaa);throw _0x29efaa;}}async[a133_0x671937(0xaa)](_0x47e721,_0x289210){const _0x452c39=a133_0x671937,_0x5ad39a=await this[_0x452c39(0x10d)](_0x47e721),_0x449aaa=_0x5ad39a['find'](_0x5bbe39=>_0x5bbe39[_0x452c39(0xed)][_0x452c39(0x10c)]()===_0x289210[_0x452c39(0x10c)]());if(!_0x449aaa)throw new SDKError(ErrorCode[_0x452c39(0x106)],_0x452c39(0x113)+_0x289210,undefined,{'helpText':_0x452c39(0x127)});return _0x449aaa['id'];}async[a133_0x671937(0xae)](_0x505a5a,_0x1d6ad2){const _0x34849f=a133_0x671937;try{return await this[_0x34849f(0xb0)][_0x34849f(0x111)](_0x505a5a,_0x1d6ad2);}catch(_0x3653f5){if(isHttp404Error(_0x3653f5))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x505a5a,_0x3653f5);throw _0x3653f5;}}async['getTrafficData'](_0x459093,_0x121928){const _0x3846d7=a133_0x671937,_0x5cd471={'from':_0x121928?.[_0x3846d7(0x116)],'to':_0x121928?.['to'],'limit':_0x121928?.[_0x3846d7(0xd2)]},_0x3976df=_0x121928?.[_0x3846d7(0xa9)]!=='conversion';try{const [_0x1a2a90,_0x2802c0]=await Promise[_0x3846d7(0xff)]([this[_0x3846d7(0xb6)](_0x459093,_0x121928?.[_0x3846d7(0xa9)],_0x5cd471),_0x3976df?this[_0x3846d7(0x112)](_0x459093):undefined]);if(_0x1a2a90[_0x3846d7(0xac)]&&_0x2802c0){const _0x44e980=buildStageNameMap(_0x2802c0);_0x1a2a90[_0x3846d7(0xac)]=_0x1a2a90['activation'][_0x3846d7(0xb4)](_0x14843a=>({..._0x14843a,'journeyStageName':_0x44e980[_0x3846d7(0xe5)](_0x14843a['journeyStageId'])??_0x14843a[_0x3846d7(0xc0)]}));}return _0x1a2a90;}catch(_0x2cfddf){if(isHttp404Error(_0x2cfddf))throw new SDKError(ErrorCode[_0x3846d7(0x106)],'Journey\x20not\x20found:\x20'+_0x459093,_0x2cfddf);throw _0x2cfddf;}}async[a133_0x671937(0xb6)](_0x19daa4,_0x30e3a9,_0x3af8c3){const _0x52181c=a133_0x671937;if(_0x30e3a9===_0x52181c(0xb7)){const _0x1b3289=await this[_0x52181c(0xb0)][_0x52181c(0x103)](_0x19daa4,_0x3af8c3);return{'conversion':_0x1b3289};}if(_0x30e3a9===_0x52181c(0xac)){const _0x44740c=await this[_0x52181c(0xb0)]['getActivationSankeyChart'](_0x19daa4,_0x3af8c3);return{'activation':_0x44740c};}const [_0x3cba8c,_0xaf0b15]=await Promise['all']([this[_0x52181c(0xb0)][_0x52181c(0x103)](_0x19daa4,_0x3af8c3),this[_0x52181c(0xb0)][_0x52181c(0xec)](_0x19daa4,_0x3af8c3)]);return{'conversion':_0x3cba8c,'activation':_0xaf0b15};}async[a133_0x671937(0xf3)](_0x31dcc3){const _0x3c4022=a133_0x671937;try{return await this[_0x3c4022(0xb0)][_0x3c4022(0x107)](_0x31dcc3);}catch(_0x78bb48){if(isHttp404Error(_0x78bb48))throw new SDKError(ErrorCode[_0x3c4022(0x106)],_0x3c4022(0x113)+_0x31dcc3,_0x78bb48);throw _0x78bb48;}}async['resume'](_0x251405){const _0x2f9138=a133_0x671937;try{return await this['client'][_0x2f9138(0x123)](_0x251405);}catch(_0x19944c){if(isHttp404Error(_0x19944c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x251405,_0x19944c);throw _0x19944c;}}async[a133_0x671937(0xe6)](_0x3a905d){const _0x2491b0=a133_0x671937;try{return await this[_0x2491b0(0xb0)][_0x2491b0(0xea)](_0x3a905d);}catch(_0x28572a){if(isHttp404Error(_0x28572a))throw new SDKError(ErrorCode[_0x2491b0(0x106)],_0x2491b0(0x113)+_0x3a905d,_0x28572a);throw _0x28572a;}}async[a133_0x671937(0xeb)](_0x1eaaa6){const _0x667955=a133_0x671937;return await this[_0x667955(0xb0)][_0x667955(0x110)](_0x1eaaa6);}async[a133_0x671937(0x124)](_0x253f70,_0x218a96){const _0x1348e8=a133_0x671937;try{return await this[_0x1348e8(0xb0)][_0x1348e8(0xef)](_0x253f70,_0x218a96);}catch(_0x1dd142){if(isHttp404Error(_0x1dd142))throw new SDKError(ErrorCode[_0x1348e8(0x106)],_0x1348e8(0x113)+_0x253f70,_0x1dd142);throw _0x1dd142;}}async['getActivation'](_0x38985b,_0x1e3867){const _0x2bea82=a133_0x671937;try{return await this[_0x2bea82(0xb0)][_0x2bea82(0xc7)](_0x38985b,_0x1e3867);}catch(_0x5b7c36){if(isHttp404Error(_0x5b7c36))throw new SDKError(ErrorCode[_0x2bea82(0x136)],_0x2bea82(0xee)+_0x1e3867+'\x20in\x20journey\x20'+_0x38985b,_0x5b7c36);throw _0x5b7c36;}}async['listActivations'](_0x586d92){const _0x4efaed=a133_0x671937;try{return await this['client'][_0x4efaed(0xe4)](_0x586d92);}catch(_0x33eebe){if(isHttp404Error(_0x33eebe))return[];throw _0x33eebe;}}async['listActivationsFlat'](_0x2ab19e){const _0x407cd1=a133_0x671937,_0x53b06a=await this[_0x407cd1(0xd1)](_0x2ab19e);return _0x53b06a[_0x407cd1(0xb4)](flattenJourneyActivation);}async[a133_0x671937(0x12a)](_0x459238,_0x3f6025){const _0x29d0b0=a133_0x671937;return await this[_0x29d0b0(0xb0)]['createJourneyActivation'](_0x459238,_0x3f6025);}async[a133_0x671937(0xf1)](_0x2a58e2){const _0x538b95=a133_0x671937,_0x14cae6=await this['getJourney'](_0x2a58e2),_0x3ee5eb=generateColumnMapping(_0x14cae6);return{'journeyId':_0x14cae6['id'],'journeyName':_0x14cae6[_0x538b95(0xf6)][_0x538b95(0xc5)],'database':_0x538b95(0xb8)+_0x14cae6[_0x538b95(0xf6)][_0x538b95(0xe0)],'table':_0x538b95(0xb1)+_0x14cae6['id'],'columns':_0x3ee5eb};}async[a133_0x671937(0x11c)](_0x35fe73){const _0x2e6a30=a133_0x671937;return this[_0x2e6a30(0xb0)]['getJourneyBundle'](_0x35fe73);}async[a133_0x671937(0x120)](_0x8cf8ea){const _0xcb9aa2=a133_0x671937;if(!_0x8cf8ea)return undefined;try{const _0x52da21=await this[_0xcb9aa2(0x11c)](_0x8cf8ea);return _0x52da21[_0xcb9aa2(0xf9)];}catch{return undefined;}}async[a133_0x671937(0xcf)](_0xad750b){const _0x3e3ad8=a133_0x671937,_0x3aa0cf=await this[_0x3e3ad8(0x112)](_0xad750b),_0x11db08=_0x3aa0cf['attributes'][_0x3e3ad8(0xf5)];if(!_0x11db08)return{'bundleId':'','bundleName':_0x3aa0cf['attributes'][_0x3e3ad8(0xc5)],'bundleDescription':_0x3aa0cf[_0x3e3ad8(0xf6)]['description']??null,'latestJourneyId':_0x3aa0cf['id'],'versions':[synthesizePreBundleVersion(_0x3aa0cf)]};const _0x8cbebe=await this[_0x3e3ad8(0x11c)](_0x11db08);return{'bundleId':_0x11db08,'bundleName':_0x8cbebe[_0x3e3ad8(0xc5)],'bundleDescription':_0x8cbebe['description']??null,'latestJourneyId':_0x8cbebe['latestJourneyId'],'versions':formatVersionsFromBundle(_0x8cbebe)};}async[a133_0x671937(0xd7)](_0x51111c){const _0x730cdb=a133_0x671937,_0x1790d0=await this[_0x730cdb(0x112)](_0x51111c),_0x1da2dd=_0x1790d0[_0x730cdb(0xf6)][_0x730cdb(0xf5)];if(!_0x1da2dd)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x730cdb(0xb0)]['checkJourneyAppendable'](_0x1da2dd);const _0x2349a3=await this[_0x730cdb(0xb0)][_0x730cdb(0x109)](_0x1da2dd),_0x2868a9=_0x2349a3[_0x730cdb(0xc5)]+'\x20v'+(_0x2349a3[_0x730cdb(0xda)]+0x1);return this[_0x730cdb(0xb0)][_0x730cdb(0x117)](_0x1da2dd,{'sourceId':_0x51111c,'attributes':{'name':_0x2868a9}});}}
@@ -1 +1 @@
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']();}
1
+ function a134_0x2e61(_0x50c3a8,_0x34a114){_0x50c3a8=_0x50c3a8-0x13b;const _0x5c2cf3=a134_0x5c2c();let _0x2e619d=_0x5c2cf3[_0x50c3a8];return _0x2e619d;}const a134_0x55fa16=a134_0x2e61;function a134_0x5c2c(){const _0x28e1b5=['143TkuzuF','4JMIPKR','3783592TIdVwY','llm/chat','clear','7218126EGaTGh','2013070EhAztD','read','2949534QLEfhF','77912ximkOb','15hRUDwr','write','990730hZstJT','200685DKAqar','14duMakw'];a134_0x5c2c=function(){return _0x28e1b5;};return a134_0x5c2c();}(function(_0x1e84bb,_0x2e2012){const _0x12523a=a134_0x2e61,_0x96fe4d=_0x1e84bb();while(!![]){try{const _0x2d16eb=parseInt(_0x12523a(0x13c))/0x1+parseInt(_0x12523a(0x147))/0x2*(parseInt(_0x12523a(0x148))/0x3)+parseInt(_0x12523a(0x13f))/0x4*(parseInt(_0x12523a(0x13b))/0x5)+-parseInt(_0x12523a(0x143))/0x6+parseInt(_0x12523a(0x13d))/0x7*(-parseInt(_0x12523a(0x140))/0x8)+-parseInt(_0x12523a(0x146))/0x9+-parseInt(_0x12523a(0x144))/0xa*(-parseInt(_0x12523a(0x13e))/0xb);if(_0x2d16eb===_0x2e2012)break;else _0x96fe4d['push'](_0x96fe4d['shift']());}catch(_0x45185b){_0x96fe4d['push'](_0x96fe4d['shift']());}}}(a134_0x5c2c,0xb3305));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache('last_chat_id',a134_0x55fa16(0x141));export function saveLastChatId(_0x14d985){const _0x52f259=a134_0x55fa16;chatIdCache[_0x52f259(0x149)](_0x14d985);}export function loadLastChatId(){const _0x132bc7=a134_0x55fa16;return chatIdCache[_0x132bc7(0x145)]();}export function clearLastChatId(){const _0xffa234=a134_0x55fa16;chatIdCache[_0xffa234(0x142)]();}