@treasuredata/tdx 2026.5.0 → 2026.5.1

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 (240) 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.d.ts +9 -0
  32. package/dist/commands/journey-command.d.ts.map +1 -1
  33. package/dist/commands/journey-command.js +1 -1
  34. package/dist/commands/journey-command.js.map +1 -1
  35. package/dist/commands/journey-validate-command.js +1 -1
  36. package/dist/commands/llm-command.js +1 -1
  37. package/dist/commands/mcp-command.js +1 -1
  38. package/dist/commands/parent-segment-command.js +1 -1
  39. package/dist/commands/policy-command.js +1 -1
  40. package/dist/commands/profile-command.js +1 -1
  41. package/dist/commands/profiles-command.js +1 -1
  42. package/dist/commands/query-command.js +1 -1
  43. package/dist/commands/schedule-command.js +1 -1
  44. package/dist/commands/segment-command.js +1 -1
  45. package/dist/commands/segment-create-command.js +1 -1
  46. package/dist/commands/segment-fields-command.js +1 -1
  47. package/dist/commands/segment-pull-command.js +1 -1
  48. package/dist/commands/segment-push-command.js +1 -1
  49. package/dist/commands/segment-update-command.js +1 -1
  50. package/dist/commands/segment-use-command.js +1 -1
  51. package/dist/commands/segment-validate-command.js +1 -1
  52. package/dist/commands/segments.js +1 -1
  53. package/dist/commands/show.js +1 -1
  54. package/dist/commands/status-command.js +1 -1
  55. package/dist/commands/table-deleted.js +1 -1
  56. package/dist/commands/tables.js +1 -1
  57. package/dist/commands/unset-command.js +1 -1
  58. package/dist/commands/upgrade-command.js +1 -1
  59. package/dist/commands/use-command.js +1 -1
  60. package/dist/commands/user-command.js +1 -1
  61. package/dist/commands/work-command.js +1 -1
  62. package/dist/commands/workflow-command.js +1 -1
  63. package/dist/core/auth.js +1 -1
  64. package/dist/core/command-output.js +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/connection-cache.js +1 -1
  67. package/dist/core/constants.js +1 -1
  68. package/dist/core/credential-cache.js +1 -1
  69. package/dist/core/global-context.js +1 -1
  70. package/dist/core/keychain.js +1 -1
  71. package/dist/core/oauth-keychain.js +1 -1
  72. package/dist/core/oauth.js +1 -1
  73. package/dist/core/profile.js +1 -1
  74. package/dist/core/project-config.js +1 -1
  75. package/dist/core/session.js +1 -1
  76. package/dist/core/user-cache.js +1 -1
  77. package/dist/core/version.js +1 -1
  78. package/dist/index.js +1 -1
  79. package/dist/mcp/server.js +1 -1
  80. package/dist/mcp/tools/index.js +1 -1
  81. package/dist/mcp/tools/tdx-run.js +1 -1
  82. package/dist/mcp/tools/tdx-search.js +1 -1
  83. package/dist/mcp/tools/work-create-item.js +1 -1
  84. package/dist/mcp/utils.js +1 -1
  85. package/dist/proxy/claude-usage-tracker.js +1 -1
  86. package/dist/proxy/passthrough-server.js +1 -1
  87. package/dist/proxy/sse-usage-parser.js +1 -1
  88. package/dist/sdk/agent/agent-config.js +1 -1
  89. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  90. package/dist/sdk/agent/agent-yaml.js +1 -1
  91. package/dist/sdk/agent/test/evaluator.js +1 -1
  92. package/dist/sdk/agent/test/executor.js +1 -1
  93. package/dist/sdk/agent/test/index.js +1 -1
  94. package/dist/sdk/agent/test/output.js +1 -1
  95. package/dist/sdk/agent/test/parser.js +1 -1
  96. package/dist/sdk/agent/tool-target-registry.js +1 -1
  97. package/dist/sdk/api.js +1 -1
  98. package/dist/sdk/cas/cas-api-client.js +1 -1
  99. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  100. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  101. package/dist/sdk/cas/index.js +1 -1
  102. package/dist/sdk/cas/pull-workflow.js +1 -1
  103. package/dist/sdk/cas/push-workflow.js +1 -1
  104. package/dist/sdk/client/cdp-api-client.d.ts +8 -1
  105. package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
  106. package/dist/sdk/client/cdp-api-client.js +1 -1
  107. package/dist/sdk/client/cdp-api-client.js.map +1 -1
  108. package/dist/sdk/client/delivery-api-client.js +1 -1
  109. package/dist/sdk/client/endpoints.js +1 -1
  110. package/dist/sdk/client/engage-api-client.js +1 -1
  111. package/dist/sdk/client/http-client.js +1 -1
  112. package/dist/sdk/client/llm-api-client.js +1 -1
  113. package/dist/sdk/client/oauth-refresh.js +1 -1
  114. package/dist/sdk/client/rate-limiter.js +1 -1
  115. package/dist/sdk/client/td-api-client.js +1 -1
  116. package/dist/sdk/client/trino-api-client.js +1 -1
  117. package/dist/sdk/client/workflow-client.js +1 -1
  118. package/dist/sdk/connection-validator.js +1 -1
  119. package/dist/sdk/connection.js +1 -1
  120. package/dist/sdk/delivery.js +1 -1
  121. package/dist/sdk/engage/campaign-pull.js +1 -1
  122. package/dist/sdk/engage/campaign-push.js +1 -1
  123. package/dist/sdk/engage/campaign-validator.js +1 -1
  124. package/dist/sdk/engage/campaign-yaml.js +1 -1
  125. package/dist/sdk/engage/template-pull.js +1 -1
  126. package/dist/sdk/engage/template-push.js +1 -1
  127. package/dist/sdk/engage/template-validator.js +1 -1
  128. package/dist/sdk/engage/template-yaml.js +1 -1
  129. package/dist/sdk/engage/types/campaign-def.js +1 -1
  130. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  131. package/dist/sdk/engage/types/template-schema.js +1 -1
  132. package/dist/sdk/engage.js +1 -1
  133. package/dist/sdk/errors.js +1 -1
  134. package/dist/sdk/index.js +1 -1
  135. package/dist/sdk/io/index.js +1 -1
  136. package/dist/sdk/io/node-filesystem.js +1 -1
  137. package/dist/sdk/job.js +1 -1
  138. package/dist/sdk/journey.d.ts +8 -1
  139. package/dist/sdk/journey.d.ts.map +1 -1
  140. package/dist/sdk/journey.js +1 -1
  141. package/dist/sdk/journey.js.map +1 -1
  142. package/dist/sdk/llm/chat-cache.js +1 -1
  143. package/dist/sdk/llm/index.js +1 -1
  144. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  145. package/dist/sdk/llm/model-factors.js +1 -1
  146. package/dist/sdk/llm/user-settings.js +1 -1
  147. package/dist/sdk/personalization.js +1 -1
  148. package/dist/sdk/policy.js +1 -1
  149. package/dist/sdk/query/deleted-table-validation.js +1 -1
  150. package/dist/sdk/query/index.js +1 -1
  151. package/dist/sdk/query/sql-parser.js +1 -1
  152. package/dist/sdk/realtime.js +1 -1
  153. package/dist/sdk/schedule.js +1 -1
  154. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  155. package/dist/sdk/segment/fields-display.js +1 -1
  156. package/dist/sdk/segment/file-discovery.js +1 -1
  157. package/dist/sdk/segment/journey-utils.js +1 -1
  158. package/dist/sdk/segment/journey-validator.js +1 -1
  159. package/dist/sdk/segment/journey-yaml.js +1 -1
  160. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  161. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  162. package/dist/sdk/segment/pull-workflow.js +1 -1
  163. package/dist/sdk/segment/push-recovery.js +1 -1
  164. package/dist/sdk/segment/push-workflow.js +1 -1
  165. package/dist/sdk/segment/resolution-context.js +1 -1
  166. package/dist/sdk/segment/segment-path-parser.js +1 -1
  167. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  168. package/dist/sdk/segment/segment-validator.js +1 -1
  169. package/dist/sdk/segment/target-resolution.js +1 -1
  170. package/dist/sdk/segment/tdx-config.js +1 -1
  171. package/dist/sdk/segment/types/activation-schema.js +1 -1
  172. package/dist/sdk/segment/types/journey-def.js +1 -1
  173. package/dist/sdk/segment/types/journey-schema.js +1 -1
  174. package/dist/sdk/segment/types/segment-def.js +1 -1
  175. package/dist/sdk/segment/types/segment-schema.js +1 -1
  176. package/dist/sdk/segment/validate-files.js +1 -1
  177. package/dist/sdk/segment/yaml-validator.js +1 -1
  178. package/dist/sdk/segment.js +1 -1
  179. package/dist/sdk/types/cdp.d.ts +19 -0
  180. package/dist/sdk/types/cdp.d.ts.map +1 -1
  181. package/dist/sdk/types/index.d.ts +1 -1
  182. package/dist/sdk/types/index.d.ts.map +1 -1
  183. package/dist/sdk/types/index.js +1 -1
  184. package/dist/sdk/types/index.js.map +1 -1
  185. package/dist/sdk/types/progress.js +1 -1
  186. package/dist/sdk/types/workspace.js +1 -1
  187. package/dist/sdk/user.js +1 -1
  188. package/dist/sdk/util/format-detector.js +1 -1
  189. package/dist/sdk/util/formatters.js +1 -1
  190. package/dist/sdk/util/index.js +1 -1
  191. package/dist/sdk/util/paginate.js +1 -1
  192. package/dist/sdk/util/tree-formatter.js +1 -1
  193. package/dist/sdk/workflow/archive-validation.js +1 -1
  194. package/dist/sdk/workflow/clone-workflow.js +1 -1
  195. package/dist/sdk/workflow/index.js +1 -1
  196. package/dist/sdk/workflow/pull-workflow.js +1 -1
  197. package/dist/sdk/workflow/push-workflow.js +1 -1
  198. package/dist/sdk/workflow/task-graph.js +1 -1
  199. package/dist/sdk/workflow/tdx-config.js +1 -1
  200. package/dist/sdk/workflow/workflow-utils.js +1 -1
  201. package/dist/sdk/workspace/access-tracker.js +1 -1
  202. package/dist/sdk/workspace/frontmatter.js +1 -1
  203. package/dist/sdk/workspace/git.js +1 -1
  204. package/dist/sdk/workspace/index.js +1 -1
  205. package/dist/sdk/workspace/templates.js +1 -1
  206. package/dist/sdk/workspace/weekly.js +1 -1
  207. package/dist/sdk/workspace/wikilinks.js +1 -1
  208. package/dist/test-utils/command-runner.js +1 -1
  209. package/dist/test-utils/factories.js +1 -1
  210. package/dist/test-utils/fixtures.js +1 -1
  211. package/dist/test-utils/http-mock.js +1 -1
  212. package/dist/test-utils/index.js +1 -1
  213. package/dist/utils/async.js +1 -1
  214. package/dist/utils/colors.js +1 -1
  215. package/dist/utils/diff.js +1 -1
  216. package/dist/utils/file-permissions.js +1 -1
  217. package/dist/utils/file-reader.js +1 -1
  218. package/dist/utils/github-releases.js +1 -1
  219. package/dist/utils/global-cache.js +1 -1
  220. package/dist/utils/json-loader.js +1 -1
  221. package/dist/utils/local-cache.js +1 -1
  222. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  223. package/dist/utils/logger/formatters/index.js +1 -1
  224. package/dist/utils/logger/handlers/console-handler.js +1 -1
  225. package/dist/utils/logger/handlers/file-handler.js +1 -1
  226. package/dist/utils/logger/handlers/index.js +1 -1
  227. package/dist/utils/logger/handlers/null-handler.js +1 -1
  228. package/dist/utils/logger/index.js +1 -1
  229. package/dist/utils/logger/logger.js +1 -1
  230. package/dist/utils/logger/types.js +1 -1
  231. package/dist/utils/option-validation.js +1 -1
  232. package/dist/utils/process.js +1 -1
  233. package/dist/utils/prompt.js +1 -1
  234. package/dist/utils/spinner.js +1 -1
  235. package/dist/utils/sse-parser.js +1 -1
  236. package/dist/utils/string-utils.js +1 -1
  237. package/dist/utils/table-ref-parser.js +1 -1
  238. package/dist/utils/tdx-logger.js +1 -1
  239. package/dist/utils/version-check.js +1 -1
  240. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x410442,_0x582016){const _0x24d380=a149_0x4ad7,_0x5911ec=_0x410442();while(!![]){try{const _0x211ea7=-parseInt(_0x24d380(0x124))/0x1+-parseInt(_0x24d380(0xfb))/0x2+-parseInt(_0x24d380(0x137))/0x3+parseInt(_0x24d380(0x129))/0x4+-parseInt(_0x24d380(0x175))/0x5+-parseInt(_0x24d380(0x181))/0x6+-parseInt(_0x24d380(0x116))/0x7*(-parseInt(_0x24d380(0x172))/0x8);if(_0x211ea7===_0x582016)break;else _0x5911ec['push'](_0x5911ec['shift']());}catch(_0x23cee4){_0x5911ec['push'](_0x5911ec['shift']());}}}(a149_0x1bc7,0x9cae3));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1001f9,_0x383a9d,_0x3da4fe,_0x24c6cf,_0x43eb9b,_0x1cb37f){const _0x477a59=a149_0x4ad7;return{'level':_0x1001f9,'path':_0x383a9d,'code':_0x3da4fe,'message':_0x24c6cf,'location':getLocationFromPath(_0x43eb9b[_0x477a59(0xf4)],_0x43eb9b[_0x477a59(0x15a)],pathToArray(_0x1cb37f??_0x383a9d))};}function validateVersionStructure(_0x3c342a,_0xcb990b){const _0x295f82=a149_0x4ad7,_0x3edcca=[];return _0x3c342a[_0x295f82(0xd6)]>MAX_STAGES&&_0x3edcca[_0x295f82(0x152)](createIssue(_0x295f82(0xf2),_0x295f82(0x102),_0x295f82(0x11b),_0x295f82(0xf0)+_0x3c342a['length']+_0x295f82(0x109)+MAX_STAGES,_0xcb990b)),_0x3edcca;}function validateStageStructure(_0x53a00b,_0x48d83d,_0x33fccc,_0x426aca){const _0x442109=a149_0x4ad7,_0x57db43=[],_0x1bc803=_0x442109(0x11e)+_0x48d83d+']';_0x48d83d===0x0&&!_0x53a00b[_0x442109(0xdf)]&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf2),_0x1bc803+_0x442109(0x17d),_0x442109(0x13f),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xdb),_0x426aca,_0x1bc803));const _0x5e3f34=_0x48d83d===_0x33fccc-0x1;!_0x5e3f34&&!_0x53a00b[_0x442109(0x166)]&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf2),_0x1bc803+_0x442109(0x114),_0x442109(0xfc),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xf7),_0x426aca,_0x1bc803));(!_0x53a00b[_0x442109(0xd4)]||_0x53a00b['exit_criteria']['length']===0x0)&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf3),_0x1bc803+_0x442109(0x183),_0x442109(0x156),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x426aca,_0x1bc803));const _0x116b96=_0x53a00b['steps']?.[_0x442109(0xd6)]??0x0;if(_0x116b96===0x0)_0x57db43[_0x442109(0x152)](createIssue('error',_0x1bc803+_0x442109(0xea),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0x53a00b[_0x442109(0x17a)]+_0x442109(0x157),_0x426aca,_0x1bc803+_0x442109(0xea)));else{if(_0x116b96===0x1)_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf3),_0x1bc803+_0x442109(0xea),_0x442109(0x134),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xdd),_0x426aca,_0x1bc803+'.steps'));else _0x116b96<=0x3&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf3),_0x1bc803+_0x442109(0xea),_0x442109(0x185),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xd9)+_0x116b96+_0x442109(0x164),_0x426aca,_0x1bc803+_0x442109(0xea)));}return _0x57db43;}function validateStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f){const _0x19e97a=a149_0x4ad7,_0x1e5a44=[];if(_0xebc6cd[_0x19e97a(0x130)]===_0x19e97a(0x151))return _0xebc6cd[_0x19e97a(0x15d)]&&_0x1e5a44['push'](createIssue(_0x19e97a(0xf2),_0xecf011+'.next','END_STEP_HAS_NEXT_OR_WITH',_0x19e97a(0x186)+_0xebc6cd['name']+_0x19e97a(0x13c),_0x551c4e)),_0x19e97a(0xff)in _0xebc6cd&&_0xebc6cd[_0x19e97a(0xff)]!==undefined&&_0x1e5a44[_0x19e97a(0x152)](createIssue(_0x19e97a(0xf2),_0xecf011+'.with','END_STEP_HAS_NEXT_OR_WITH',_0x19e97a(0x186)+_0xebc6cd[_0x19e97a(0x17a)]+_0x19e97a(0x17f),_0x551c4e)),_0x1e5a44;_0xebc6cd[_0x19e97a(0x15d)]&&(_0x551c4e[_0x19e97a(0x170)]&&!_0x551c4e[_0x19e97a(0x170)][_0x19e97a(0x105)](_0xebc6cd[_0x19e97a(0x15d)])&&_0x1e5a44[_0x19e97a(0x152)](createIssue('error',_0xecf011+_0x19e97a(0xe4),_0x19e97a(0x165),_0x19e97a(0x141)+_0xebc6cd[_0x19e97a(0x15d)]+'\x27',_0x551c4e)));switch(_0xebc6cd[_0x19e97a(0x130)]){case _0x19e97a(0x145):_0x1e5a44[_0x19e97a(0x152)](...validateWaitStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f));break;case _0x19e97a(0x106):_0x1e5a44[_0x19e97a(0x152)](...validateActivationStep(_0xebc6cd,_0xecf011,_0x551c4e));break;case _0x19e97a(0x140):_0x1e5a44['push'](...validateDecisionPointStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f));break;case _0x19e97a(0xf5):_0x1e5a44[_0x19e97a(0x152)](...validateAbTestStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f));break;case'jump':_0x1e5a44['push'](...validateJumpStep(_0xebc6cd,_0xecf011,_0x551c4e));break;}return _0x1e5a44;}function validateWaitStep(_0x226742,_0x2a4c1c,_0x556b18,_0x4b5426){const _0x5b5df8=a149_0x4ad7,_0x488847=[];if(!_0x226742[_0x5b5df8(0xff)])return _0x488847[_0x5b5df8(0x152)](createIssue(_0x5b5df8(0xf2),_0x2a4c1c+_0x5b5df8(0x10b),_0x5b5df8(0xf9),_0x5b5df8(0x158),_0x556b18,_0x2a4c1c)),_0x488847;if(_0x226742['with'][_0x5b5df8(0x18a)]){const _0x235897=_0x226742[_0x5b5df8(0xff)][_0x5b5df8(0x18a)];if(_0x235897['segment']){_0x556b18[_0x5b5df8(0x173)]?.[_0x5b5df8(0x14d)](_0x235897[_0x5b5df8(0x142)]);!_0x235897['segment'][_0x5b5df8(0xf6)](_0x5b5df8(0x104))&&(_0x556b18[_0x5b5df8(0xd5)]&&!_0x556b18[_0x5b5df8(0xd5)][_0x5b5df8(0x105)](_0x235897[_0x5b5df8(0x142)])&&_0x488847[_0x5b5df8(0x152)](createIssue(_0x5b5df8(0xf2),_0x2a4c1c+_0x5b5df8(0x136),_0x5b5df8(0x169),_0x5b5df8(0x12f)+_0x235897[_0x5b5df8(0x142)]+_0x5b5df8(0x184),_0x556b18)));_0x235897[_0x5b5df8(0x15d)]&&_0x556b18['stepNames']&&!_0x556b18[_0x5b5df8(0x170)]['has'](_0x235897[_0x5b5df8(0x15d)])&&_0x488847['push'](createIssue('error',_0x2a4c1c+_0x5b5df8(0x10c),'INVALID_NEXT_REFERENCE',_0x5b5df8(0x13a)+_0x235897['next']+'\x27',_0x556b18));_0x235897['timeout']?.[_0x5b5df8(0x15d)]&&_0x556b18[_0x5b5df8(0x170)]&&!_0x556b18[_0x5b5df8(0x170)][_0x5b5df8(0x105)](_0x235897[_0x5b5df8(0x17e)]['next'])&&_0x488847['push'](createIssue(_0x5b5df8(0xf2),_0x2a4c1c+'.with.condition.timeout.next',_0x5b5df8(0x165),_0x5b5df8(0x187)+_0x235897[_0x5b5df8(0x17e)][_0x5b5df8(0x15d)]+'\x27',_0x556b18));const _0x2e092b=_0x235897[_0x5b5df8(0x15d)]||_0x226742[_0x5b5df8(0x15d)],_0x4566dd=_0x235897['timeout']?.[_0x5b5df8(0x15d)]||_0x226742['next'];if(_0x2e092b){const _0x2e590a=_0x4b5426['get'](_0x2e092b);_0x2e590a?.[_0x5b5df8(0x130)]===_0x5b5df8(0x14b)&&_0x488847[_0x5b5df8(0x152)](createIssue('warning',_0x2a4c1c+_0x5b5df8(0x10c),'BRANCH_DIRECTLY_TO_MERGE',_0x5b5df8(0x155)+_0x2e092b+_0x5b5df8(0x161),_0x556b18,_0x2a4c1c+_0x5b5df8(0x110)));}if(_0x4566dd){const _0x64255c=_0x4b5426[_0x5b5df8(0x10f)](_0x4566dd);_0x64255c?.[_0x5b5df8(0x130)]===_0x5b5df8(0x14b)&&_0x488847[_0x5b5df8(0x152)](createIssue(_0x5b5df8(0xf3),_0x2a4c1c+_0x5b5df8(0x180),_0x5b5df8(0x14f),_0x5b5df8(0x174)+_0x4566dd+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x556b18,_0x2a4c1c+_0x5b5df8(0x125)));}}}return _0x488847;}function validateActivationStep(_0x1d6df6,_0x584e77,_0x34ab4f){const _0x1829b8=a149_0x4ad7,_0x50ae57=[];if(!_0x1d6df6[_0x1829b8(0xff)]?.['activation'])return _0x50ae57[_0x1829b8(0x152)](createIssue(_0x1829b8(0xf2),_0x584e77+_0x1829b8(0x120),'MISSING_ACTIVATION_REF','Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x34ab4f,_0x584e77)),_0x50ae57;const _0x2ad385=_0x1d6df6[_0x1829b8(0xff)][_0x1829b8(0x106)];return _0x34ab4f[_0x1829b8(0x100)]&&!_0x2ad385['startsWith'](_0x1829b8(0x104))&&(!_0x34ab4f['activationKeys']['has'](_0x2ad385)&&_0x50ae57['push'](createIssue(_0x1829b8(0xf2),_0x584e77+_0x1829b8(0x120),_0x1829b8(0x107),_0x1829b8(0x12d)+_0x2ad385+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x34ab4f))),_0x50ae57;}function validateDecisionPointStep(_0xa79897,_0x56e809,_0x63bf62,_0x5d9d56){const _0x5e1f40=a149_0x4ad7,_0x2faa38=[];if(!_0xa79897['with']?.['branches']||_0xa79897['with'][_0x5e1f40(0xda)]['length']===0x0)return _0x2faa38['push'](createIssue('error',_0x56e809+_0x5e1f40(0x13e),'MISSING_CONDITIONS',_0x5e1f40(0xeb),_0x63bf62,_0x56e809)),_0x2faa38;for(let _0x2a4ef6=0x0;_0x2a4ef6<_0xa79897[_0x5e1f40(0xff)][_0x5e1f40(0xda)][_0x5e1f40(0xd6)];_0x2a4ef6++){const _0x394cc2=_0xa79897[_0x5e1f40(0xff)][_0x5e1f40(0xda)][_0x2a4ef6],_0x53beb7=_0x56e809+_0x5e1f40(0xe6)+_0x2a4ef6+']';_0x394cc2['segment']&&!_0x394cc2[_0x5e1f40(0x139)]&&(_0x63bf62[_0x5e1f40(0x173)]?.['add'](_0x394cc2[_0x5e1f40(0x142)]),!_0x394cc2[_0x5e1f40(0x142)]['startsWith'](_0x5e1f40(0x104))&&(_0x63bf62[_0x5e1f40(0xd5)]&&!_0x63bf62[_0x5e1f40(0xd5)]['has'](_0x394cc2['segment'])&&_0x2faa38[_0x5e1f40(0x152)](createIssue(_0x5e1f40(0xf2),_0x53beb7+_0x5e1f40(0x113),_0x5e1f40(0x169),_0x5e1f40(0x138)+_0x394cc2[_0x5e1f40(0x142)]+'\x27',_0x63bf62))));_0x394cc2[_0x5e1f40(0x15d)]&&_0x63bf62[_0x5e1f40(0x170)]&&!_0x63bf62['stepNames'][_0x5e1f40(0x105)](_0x394cc2[_0x5e1f40(0x15d)])&&_0x2faa38[_0x5e1f40(0x152)](createIssue(_0x5e1f40(0xf2),_0x53beb7+_0x5e1f40(0xe4),_0x5e1f40(0x165),_0x5e1f40(0xf8)+_0x394cc2[_0x5e1f40(0x15d)]+'\x27',_0x63bf62));if(_0x394cc2[_0x5e1f40(0x15d)]){const _0x2d33ab=_0x5d9d56[_0x5e1f40(0x10f)](_0x394cc2['next']);_0x2d33ab?.['type']===_0x5e1f40(0x14b)&&_0x2faa38[_0x5e1f40(0x152)](createIssue(_0x5e1f40(0xf3),_0x53beb7+_0x5e1f40(0xe4),'BRANCH_DIRECTLY_TO_MERGE','Decision\x20branch\x20\x27'+_0x394cc2[_0x5e1f40(0x17a)]+_0x5e1f40(0x126)+_0x394cc2['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x63bf62));}}return _0x2faa38;}function validateAbTestStep(_0x27099c,_0x57df7d,_0x54c2eb,_0x4b2ea1){const _0x4de4f7=a149_0x4ad7,_0x3ec8ea=[];if(!_0x27099c[_0x4de4f7(0xff)]?.[_0x4de4f7(0x15c)]||_0x27099c[_0x4de4f7(0xff)][_0x4de4f7(0x15c)]['length']===0x0)return _0x3ec8ea['push'](createIssue('error',_0x57df7d+_0x4de4f7(0xe9),_0x4de4f7(0x118),_0x4de4f7(0x163),_0x54c2eb,_0x57df7d)),_0x3ec8ea;const _0x387e74=_0x27099c[_0x4de4f7(0xff)][_0x4de4f7(0x15c)][_0x4de4f7(0x150)]((_0x345f30,_0x42dfea)=>_0x345f30+(_0x42dfea[_0x4de4f7(0x176)]||0x0),0x0);Math[_0x4de4f7(0x144)](_0x387e74-0x64)>0.01&&_0x3ec8ea[_0x4de4f7(0x152)](createIssue(_0x4de4f7(0xf2),_0x57df7d+_0x4de4f7(0xe9),_0x4de4f7(0xd7),_0x4de4f7(0x12c)+_0x387e74+'%)',_0x54c2eb));for(let _0x4b6d33=0x0;_0x4b6d33<_0x27099c[_0x4de4f7(0xff)][_0x4de4f7(0x15c)][_0x4de4f7(0xd6)];_0x4b6d33++){const _0x576db4=_0x27099c['with'][_0x4de4f7(0x15c)][_0x4b6d33],_0x36f9b0=_0x57df7d+'.with.variants['+_0x4b6d33+']';_0x576db4['next']&&_0x54c2eb[_0x4de4f7(0x170)]&&!_0x54c2eb['stepNames']['has'](_0x576db4[_0x4de4f7(0x15d)])&&_0x3ec8ea['push'](createIssue(_0x4de4f7(0xf2),_0x36f9b0+_0x4de4f7(0xe4),_0x4de4f7(0x165),_0x4de4f7(0x11c)+_0x576db4['next']+'\x27',_0x54c2eb));if(_0x576db4[_0x4de4f7(0x15d)]){const _0x5c4a05=_0x4b2ea1[_0x4de4f7(0x10f)](_0x576db4['next']);_0x5c4a05?.[_0x4de4f7(0x130)]===_0x4de4f7(0x14b)&&_0x3ec8ea[_0x4de4f7(0x152)](createIssue('warning',_0x36f9b0+'.next',_0x4de4f7(0x14f),_0x4de4f7(0xfa)+_0x576db4['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x576db4[_0x4de4f7(0x15d)]+_0x4de4f7(0x179),_0x54c2eb));}}return _0x3ec8ea;}function a149_0x4ad7(_0x6f968,_0x578306){_0x6f968=_0x6f968-0xd4;const _0x1bc7a0=a149_0x1bc7();let _0x4ad781=_0x1bc7a0[_0x6f968];return _0x4ad781;}function validateJumpStep(_0x46477c,_0x20a9f6,_0x26be4b){const _0x44928b=a149_0x4ad7,_0x532a42=[];if(!_0x46477c[_0x44928b(0xff)]?.[_0x44928b(0x162)])return _0x532a42[_0x44928b(0x152)](createIssue(_0x44928b(0xf2),_0x20a9f6+'.with.target','INVALID_JUMP_TARGET','Jump\x20step\x20requires\x20a\x20target',_0x26be4b,_0x20a9f6)),_0x532a42;return(!_0x46477c[_0x44928b(0xff)]['target'][_0x44928b(0xe8)]||!_0x46477c[_0x44928b(0xff)]['target']['stage'])&&_0x532a42['push'](createIssue('error',_0x20a9f6+'.with.target','INVALID_JUMP_TARGET',_0x44928b(0xe0),_0x26be4b)),_0x532a42;}function buildConvergenceMap(_0x1bb051){const _0x1d0c79=a149_0x4ad7,_0xd8d982=new Map();function _0xc380bb(_0x1da804,_0x2737b4){const _0x283452=a149_0x4ad7,_0xbbb67=_0xd8d982['get'](_0x1da804)||[];_0xbbb67['push'](_0x2737b4),_0xd8d982[_0x283452(0x13d)](_0x1da804,_0xbbb67);}for(const _0x1a0be2 of _0x1bb051){_0x1a0be2[_0x1d0c79(0x15d)]&&_0xc380bb(_0x1a0be2[_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':_0x1d0c79(0xe5)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'});if(_0x1a0be2[_0x1d0c79(0x130)]==='decision_point'&&_0x1a0be2[_0x1d0c79(0xff)]?.['branches'])for(const _0x4a42fa of _0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0xda)]){_0x4a42fa['next']&&_0xc380bb(_0x4a42fa[_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':_0x1d0c79(0x177)+_0x4a42fa[_0x1d0c79(0x17a)]+_0x1d0c79(0x127)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'});}if(_0x1a0be2['type']===_0x1d0c79(0xf5)&&_0x1a0be2[_0x1d0c79(0xff)]?.[_0x1d0c79(0x15c)])for(const _0x3a20fd of _0x1a0be2[_0x1d0c79(0xff)]['variants']){_0x3a20fd[_0x1d0c79(0x15d)]&&_0xc380bb(_0x3a20fd[_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':_0x1d0c79(0x11f)+_0x3a20fd['name']+_0x1d0c79(0x127)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'});}_0x1a0be2[_0x1d0c79(0x130)]==='wait'&&_0x1a0be2[_0x1d0c79(0xff)]?.['condition']&&(_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)][_0x1d0c79(0x15d)]&&_0xc380bb(_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)][_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':'condition\x20of\x20\x27'+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'}),_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)][_0x1d0c79(0x17e)]?.['next']&&_0xc380bb(_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)]['timeout'][_0x1d0c79(0x15d)],{'stepName':_0x1a0be2['name'],'description':_0x1d0c79(0x16d)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'}));}return _0xd8d982;}function validateFlowControl(_0x3168e3,_0x4f2004,_0x20ad12){const _0x508b9d=a149_0x4ad7,_0x196eda=[],_0x1ed826=_0x508b9d(0x11e)+_0x4f2004+']',_0x4f9aba=_0x3168e3[_0x508b9d(0x16b)]||[];if(_0x4f9aba['length']===0x0)return _0x196eda;const _0x5257de=new Map();for(const _0x357ce9 of _0x4f9aba){_0x357ce9['name']&&_0x5257de['set'](_0x357ce9[_0x508b9d(0x17a)],_0x357ce9);}const _0x2ddd79=buildConvergenceMap(_0x4f9aba),_0x586ab9=_0x4f9aba[_0x508b9d(0x182)](_0x264959=>_0x264959[_0x508b9d(0x130)]===_0x508b9d(0x151));!_0x586ab9&&_0x196eda[_0x508b9d(0x152)](createIssue('error',_0x1ed826+_0x508b9d(0xea),'MISSING_END_STEP',_0x508b9d(0x143)+_0x3168e3[_0x508b9d(0x17a)]+_0x508b9d(0x14e),_0x20ad12));for(const [_0x574664,_0x481773]of _0x2ddd79){const _0x282830=_0x5257de['get'](_0x574664);if(!_0x282830)continue;if(_0x481773['length']>0x1&&_0x282830[_0x508b9d(0x130)]!==_0x508b9d(0x14b)){const _0x47460a=_0x481773[_0x508b9d(0x17b)](_0x17791e=>_0x17791e[_0x508b9d(0xfe)])[_0x508b9d(0x10d)](',\x20');_0x196eda['push'](createIssue(_0x508b9d(0xf2),_0x1ed826+_0x508b9d(0xea),_0x508b9d(0x12a),_0x508b9d(0x13b)+_0x574664+_0x508b9d(0x149)+_0x47460a+_0x508b9d(0xee),_0x20ad12));}_0x481773[_0x508b9d(0xd6)]===0x1&&_0x282830['type']===_0x508b9d(0x14b)&&_0x196eda['push'](createIssue(_0x508b9d(0xf3),_0x1ed826+_0x508b9d(0xea),_0x508b9d(0x117),_0x508b9d(0xdc)+_0x574664+_0x508b9d(0x11a)+_0x481773[0x0][_0x508b9d(0xfe)]+_0x508b9d(0x14c),_0x20ad12));}for(const _0x443709 of _0x4f9aba){if(_0x443709[_0x508b9d(0x130)]===_0x508b9d(0x14b)&&_0x443709[_0x508b9d(0x15d)]){const _0x5bda69=_0x5257de[_0x508b9d(0x10f)](_0x443709[_0x508b9d(0x15d)]);_0x5bda69?.[_0x508b9d(0x130)]===_0x508b9d(0x14b)&&_0x196eda[_0x508b9d(0x152)](createIssue(_0x508b9d(0xf2),_0x1ed826+_0x508b9d(0xea),'MERGE_TO_MERGE_CHAIN',_0x508b9d(0xdc)+_0x443709['name']+_0x508b9d(0x12e)+_0x443709['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x20ad12));}}return _0x196eda;}function validateCriteria(_0x4c9d1f,_0x1d4dfb,_0x338a60){const _0x5e95eb=a149_0x4ad7,_0x2f0475=[];return _0x4c9d1f['segment']&&(_0x338a60['referencedSegments']?.[_0x5e95eb(0x14d)](_0x4c9d1f[_0x5e95eb(0x142)]),!_0x4c9d1f[_0x5e95eb(0x142)][_0x5e95eb(0xf6)](_0x5e95eb(0x104))&&(_0x338a60[_0x5e95eb(0xd5)]&&!_0x338a60['embeddedSegments'][_0x5e95eb(0x105)](_0x4c9d1f[_0x5e95eb(0x142)])&&_0x2f0475[_0x5e95eb(0x152)](createIssue(_0x5e95eb(0xf2),_0x1d4dfb+_0x5e95eb(0x113),_0x5e95eb(0x169),_0x5e95eb(0x154)+_0x4c9d1f[_0x5e95eb(0x142)]+'\x27',_0x338a60)))),_0x2f0475;}function validateEmbeddedSegment(_0x59380c,_0x4f9d11,_0x17af16){const _0x660a10=a149_0x4ad7,_0x12a3ff=[];return _0x59380c[_0x660a10(0x111)]&&_0x12a3ff['push'](...validateRuleDef(_0x59380c[_0x660a10(0x111)],_0x4f9d11+'.rule',_0x17af16)),_0x12a3ff;}function validateStage(_0x4e467a,_0x6e2e8a,_0x524c99,_0x174909){const _0x139619=a149_0x4ad7,_0x236a72=[],_0xaac7ad=_0x139619(0x11e)+_0x6e2e8a+']',_0x1f2a67=new Map(),_0x1db093=new Map();if(_0x4e467a[_0x139619(0x16b)]){for(let _0x5df55b=0x0;_0x5df55b<_0x4e467a[_0x139619(0x16b)][_0x139619(0xd6)];_0x5df55b++){const _0x8caabe=_0x4e467a[_0x139619(0x16b)][_0x5df55b];_0x8caabe[_0x139619(0x17a)]&&_0x1f2a67[_0x139619(0x13d)](_0x8caabe[_0x139619(0x17a)],_0x8caabe);}for(let _0x5cfdf2=0x0;_0x5cfdf2<_0x4e467a['steps'][_0x139619(0xd6)];_0x5cfdf2++){const _0x333621=_0x4e467a[_0x139619(0x16b)][_0x5cfdf2],_0x105bf2=_0xaac7ad+'.steps['+_0x5cfdf2+']';if(_0x333621[_0x139619(0x17a)]){if(_0x1db093[_0x139619(0x105)](_0x333621[_0x139619(0x17a)])){const _0x522976=_0x1db093['get'](_0x333621['name']);_0x236a72[_0x139619(0x152)](createIssue('error',_0x105bf2+_0x139619(0xed),_0x139619(0x132),_0x139619(0x115)+_0x333621['name']+_0x139619(0xd8)+_0x522976+'])',_0x174909));}else _0x1db093['set'](_0x333621['name'],_0x5cfdf2);}_0x236a72['push'](...validateStep(_0x333621,_0x105bf2,_0x174909,_0x1f2a67));}}_0x4e467a[_0x139619(0xdf)]&&_0x236a72['push'](...validateCriteria(_0x4e467a[_0x139619(0xdf)],_0xaac7ad+_0x139619(0x17d),_0x174909));if(_0x4e467a[_0x139619(0xd4)])for(let _0x2645cb=0x0;_0x2645cb<_0x4e467a[_0x139619(0xd4)]['length'];_0x2645cb++){_0x236a72[_0x139619(0x152)](...validateCriteria(_0x4e467a[_0x139619(0xd4)][_0x2645cb],_0xaac7ad+'.exit_criteria['+_0x2645cb+']',_0x174909));}return _0x4e467a[_0x139619(0x166)]&&_0x236a72[_0x139619(0x152)](...validateCriteria(_0x4e467a[_0x139619(0x166)],_0xaac7ad+_0x139619(0x114),_0x174909)),_0x236a72[_0x139619(0x152)](...validateStageStructure(_0x4e467a,_0x6e2e8a,_0x524c99,_0x174909)),_0x236a72[_0x139619(0x152)](...validateFlowControl(_0x4e467a,_0x6e2e8a,_0x174909)),_0x236a72;}function validateStagesForVersion(_0x5c78ec,_0x51b80d,_0x1840f3,_0x1b250a,_0x79b83f,_0x1906db,_0x27bfcc){const _0x3c59a1=a149_0x4ad7;if(_0x5c78ec['length']===0x0){_0x79b83f['push']({'level':_0x3c59a1(0xf2),'path':_0x1b250a+_0x3c59a1(0x102),'code':'MISSING_STAGES','message':_0x3c59a1(0x11d),'location':getLocationFromPath(_0x1840f3[_0x3c59a1(0xf4)],_0x1840f3['source'],['stages'])});return;}const _0x35c609=new Set();for(const _0x2ee7ad of _0x5c78ec){if(_0x2ee7ad[_0x3c59a1(0x16b)])for(const _0x2738ee of _0x2ee7ad[_0x3c59a1(0x16b)]){_0x2738ee['name']&&_0x35c609[_0x3c59a1(0x14d)](_0x2738ee['name']);}}const _0x2a32eb={..._0x1840f3,'stepNames':_0x35c609},_0x52d2ac=validateVersionStructure(_0x5c78ec,_0x2a32eb);for(const _0x1c51ad of _0x52d2ac){const _0x9238a0=_0x1b250a?{..._0x1c51ad,'path':''+_0x1b250a+_0x1c51ad[_0x3c59a1(0x10a)]}:_0x1c51ad;if(_0x9238a0[_0x3c59a1(0x146)]===_0x3c59a1(0xf2))_0x79b83f[_0x3c59a1(0x152)](_0x9238a0);else _0x1906db['push'](_0x9238a0);}for(let _0x4355fc=0x0;_0x4355fc<_0x5c78ec['length'];_0x4355fc++){const _0x194194=validateStage(_0x5c78ec[_0x4355fc],_0x4355fc,_0x5c78ec[_0x3c59a1(0xd6)],_0x2a32eb);for(const _0x1caa43 of _0x194194){const _0xb42a0c=_0x1b250a?{..._0x1caa43,'path':''+_0x1b250a+_0x1caa43[_0x3c59a1(0x10a)]}:_0x1caa43;if(_0xb42a0c[_0x3c59a1(0x146)]===_0x3c59a1(0xf2))_0x79b83f[_0x3c59a1(0x152)](_0xb42a0c);else _0x1906db[_0x3c59a1(0x152)](_0xb42a0c);}}if(_0x51b80d[_0x3c59a1(0x160)]){const _0x1b489d=_0x27bfcc?.[_0x3c59a1(0x17c)]?'goal':_0x1b250a+_0x3c59a1(0x160),_0x192bf5=validateCriteria(_0x51b80d[_0x3c59a1(0x160)],_0x1b489d,_0x2a32eb);for(const _0x372aa8 of _0x192bf5){if(_0x372aa8[_0x3c59a1(0x146)]===_0x3c59a1(0xf2))_0x79b83f[_0x3c59a1(0x152)](_0x372aa8);else _0x1906db[_0x3c59a1(0x152)](_0x372aa8);}}}function extractVersionIndex(_0x1fbac5){const _0x1b38f5=a149_0x4ad7,_0x4fd5dd=_0x1fbac5[_0x1b38f5(0x15b)](/^journeys\[(\d+)\]\./);return _0x4fd5dd?_0x4fd5dd[0x1]:undefined;}function a149_0x1bc7(){const _0x35df44=['excluded','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','set','.with.branches','MISSING_ENTRY_CRITERIA','decision_point','Step\x20references\x20non-existent\x20step\x20\x27','segment','Stage\x20\x27','abs','wait','level','version','.type','\x27\x20(from:\x20','size','merge',').\x20Merge\x20is\x20unnecessary.','add','\x27\x20has\x20no\x20end\x20step','BRANCH_DIRECTLY_TO_MERGE','reduce','end','push','filter','Criteria\x20references\x20undefined\x20segment\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','MISSING_EXIT_CRITERIA','\x27\x20has\x20no\x20steps','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','indices','source','match','variants','next','MISSING_STAGES','MISSING_NAME','goal','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','target','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x20steps\x20(may\x20be\x20too\x20simple)','INVALID_NEXT_REFERENCE','milestone','endsWith','message','MISSING_SEGMENT_REFERENCE','symbol','steps','Journey\x20name\x20is\x20required','timeout\x20of\x20\x27','issues','latest','stepNames','JOURNEY_SCHEMA_ERROR','448MDLiJX','referencedSegments','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','2949245VNiksk','percentage','branch\x20\x27','safeParse','\x27\x20with\x20no\x20action\x20in\x20between','name','map','goalIsInherited','.entry_criteria','timeout','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','.with.condition.timeout.next','2992818toYHbb','some','.exit_criteria','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','FEW_STEPS','End\x20step\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','journeys','skipSchema','condition','exit_criteria','embeddedSegments','length','INVALID_AB_TEST_PERCENTAGES','\x27\x20(first\x20defined\x20at\x20steps[','\x27\x20has\x20only\x20','branches','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','Merge\x20step\x20\x27','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','MISSING_GOAL','entry_criteria','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','versions[','data','ACTIVATION_SCHEMA_ERROR','.next','step\x20\x27','.with.branches[','includes','journey','.with.variants','.steps','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','launched','.name',').\x20Use\x20a\x20merge\x20step.','activations','Journey\x20has\x20','segments.','error','warning','document','ab_test','startsWith','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','MISSING_WAIT_PARAMS','A/B\x20test\x20variant\x20\x27','2059334rAIvyR','MISSING_MILESTONE','\x20with\x20latest:\x20true','description','with','activationKeys','\x20(across\x20','stages','journeys[','ref:','has','activation','MISSING_ACTIVATION_DEFINITION','keys','\x20stages\x20but\x20maximum\x20is\x20','path','.with','.with.condition.next','join','UNUSED_EMBEDDED_SEGMENT','get','.with.condition','rule','Embedded\x20segment\x20\x27','.segment','.milestone','Duplicate\x20step\x20name\x20\x27','538132GDUrWr','SINGLE_INPUT_MERGE','MISSING_CONDITIONS','entries','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','TOO_MANY_STAGES','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','stages[','variant\x20\x27','.with.activation','sort','journey\x20entry','replace','979586eJNSls','.with.condition.timeout','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20of\x20\x27','journeys,\x20stages,\x20or\x20versions','179536QnEZET','CONVERGENCE_WITHOUT_MERGE','Journey\x20has\x20no\x20goal\x20defined','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','type','segments','DUPLICATE_STEP_NAME','versions','INSUFFICIENT_STEPS','\x20versions)','.with.condition.segment','1830816QmvANm','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'];a149_0x1bc7=function(){return _0x35df44;};return a149_0x1bc7();}function deduplicateAcrossVersions(_0x4ec366){const _0x2aad5d=a149_0x4ad7,_0x4c9fc2=new Map();for(let _0x20be3f=0x0;_0x20be3f<_0x4ec366[_0x2aad5d(0xd6)];_0x20be3f++){const _0x5e3564=_0x4ec366[_0x20be3f]['code']+':'+_0x4ec366[_0x20be3f][_0x2aad5d(0x168)],_0x58ce17=extractVersionIndex(_0x4ec366[_0x20be3f][_0x2aad5d(0x10a)]),_0x1c7c64=_0x4c9fc2[_0x2aad5d(0x10f)](_0x5e3564);if(_0x1c7c64){_0x1c7c64[_0x2aad5d(0x159)][_0x2aad5d(0x152)](_0x20be3f);if(_0x58ce17)_0x1c7c64[_0x2aad5d(0x133)]['add'](_0x58ce17);}else _0x4c9fc2[_0x2aad5d(0x13d)](_0x5e3564,{'indices':[_0x20be3f],'versions':new Set(_0x58ce17?[_0x58ce17]:[])});}const _0x3b8056=new Set();for(const {indices:_0x3640f3,versions:_0x593420}of _0x4c9fc2['values']()){if(_0x593420[_0x2aad5d(0x14a)]<=0x1)continue;const _0x3304f7=_0x4ec366[_0x3640f3[0x0]];_0x3304f7['path']=_0x3304f7[_0x2aad5d(0x10a)][_0x2aad5d(0x123)](/^journeys\[\d+\]\./,''),_0x3304f7['message']=_0x3304f7[_0x2aad5d(0x168)]+_0x2aad5d(0x101)+_0x593420[_0x2aad5d(0x14a)]+_0x2aad5d(0x135);for(let _0x29d585=0x1;_0x29d585<_0x3640f3[_0x2aad5d(0xd6)];_0x29d585++){_0x3b8056[_0x2aad5d(0x14d)](_0x3640f3[_0x29d585]);}}const _0x1cb448=[..._0x3b8056][_0x2aad5d(0x121)]((_0x59aa52,_0x23a14d)=>_0x23a14d-_0x59aa52);for(const _0x274aa4 of _0x1cb448){_0x4ec366['splice'](_0x274aa4,0x1);}}export function validateJourneyDef(_0x2c8cf5,_0x4960b8={},_0x557e75={}){const _0x292b86=a149_0x4ad7;if(_0x557e75[_0x292b86(0x189)])return runJourneySemanticChecks(_0x2c8cf5,_0x4960b8);const _0x84993c=JourneyDefSchema[_0x292b86(0x178)](_0x2c8cf5);if(_0x84993c['success'])return runJourneySemanticChecks(_0x84993c[_0x292b86(0xe2)],_0x4960b8);return zodErrorsToJourneyValidationResult(_0x84993c[_0x292b86(0xf2)],_0x4960b8);}function zodErrorsToJourneyValidationResult(_0x2a22f1,_0x208658){const _0x31698d=a149_0x4ad7,_0x3cebd9=flattenZodIssues(_0x2a22f1[_0x31698d(0x16e)]),_0x4c7070=_0x3cebd9[_0x31698d(0x17b)](_0x1a19c7=>{const _0x6b2c14=_0x31698d,_0x54c45f=formatZodPath(_0x1a19c7[_0x6b2c14(0x10a)]),_0x4e2a3b=mapJourneyZodIssueToCode(_0x1a19c7,_0x54c45f),_0x5a30c3=getLocationFromPath(_0x208658[_0x6b2c14(0xf4)],_0x208658['source'],_0x1a19c7['path'][_0x6b2c14(0x17b)](_0x414655=>typeof _0x414655===_0x6b2c14(0x16a)?String(_0x414655):_0x414655));return{'level':_0x6b2c14(0xf2),'path':_0x54c45f,'code':_0x4e2a3b,'message':_0x1a19c7['message'],..._0x5a30c3&&{'location':_0x5a30c3}};});return{'valid':![],'errors':_0x4c7070,'warnings':[]};}function mapJourneyZodIssueToCode(_0x1d8271,_0x323692){const _0x5727f1=a149_0x4ad7;if(_0x323692===_0x5727f1(0x17a))return'MISSING_NAME';if(_0x323692[_0x5727f1(0x167)](_0x5727f1(0x148))&&_0x323692['includes'](_0x5727f1(0x16b)))return'JOURNEY_SCHEMA_ERROR';if(_0x323692===_0x5727f1(0x102)||_0x323692['endsWith']('.stages'))return _0x5727f1(0x15e);if(_0x323692===''&&_0x1d8271[_0x5727f1(0x168)][_0x5727f1(0xe7)](_0x5727f1(0x128)))return _0x5727f1(0x15e);if(_0x323692['includes'](_0x5727f1(0x106)))return _0x5727f1(0xe3);return _0x5727f1(0x171);}function runJourneySemanticChecks(_0x3b60d2,_0x337573){const _0x34ec41=a149_0x4ad7,_0xfd880f=[],_0x59364d=[];(!_0x3b60d2[_0x34ec41(0x17a)]||_0x3b60d2[_0x34ec41(0x17a)]['trim']()==='')&&_0xfd880f[_0x34ec41(0x152)]({'level':_0x34ec41(0xf2),'path':'name','code':_0x34ec41(0x15f),'message':_0x34ec41(0x16c),'location':getLocationFromPath(_0x337573[_0x34ec41(0xf4)],_0x337573['source'],[_0x34ec41(0x17a)])});const _0x1df933=new Set();if(_0x3b60d2[_0x34ec41(0x131)])for(const _0x2448ae of Object[_0x34ec41(0x108)](_0x3b60d2['segments'])){_0x1df933['add'](_0x2448ae);}const _0x50675b=new Set();if(_0x3b60d2[_0x34ec41(0xef)])for(const _0x874c8a of Object[_0x34ec41(0x108)](_0x3b60d2[_0x34ec41(0xef)])){_0x50675b[_0x34ec41(0x14d)](_0x874c8a);}const _0x215ed7=new Set(),_0x4f4cef={..._0x337573,'embeddedSegments':_0x1df933,'referencedSegments':_0x215ed7,'activationKeys':_0x50675b[_0x34ec41(0x14a)]>0x0?_0x50675b:undefined};if(_0x3b60d2[_0x34ec41(0x131)])for(const [_0x15fcaa,_0x4cd444]of Object[_0x34ec41(0x119)](_0x3b60d2['segments'])){const _0x505261=validateEmbeddedSegment(_0x4cd444,_0x34ec41(0xf1)+_0x15fcaa,_0x4f4cef);for(const _0x146b5b of _0x505261){if(_0x146b5b[_0x34ec41(0x146)]===_0x34ec41(0xf2))_0xfd880f['push'](_0x146b5b);else _0x59364d[_0x34ec41(0x152)](_0x146b5b);}}const _0x4855b9=!!_0x3b60d2['goal'],_0x2d5521=_0x3b60d2[_0x34ec41(0x188)]?.['every'](_0x3261a2=>!!_0x3261a2['goal'])??![];!_0x4855b9&&!_0x2d5521&&_0x59364d[_0x34ec41(0x152)]({'level':'warning','path':'goal','code':_0x34ec41(0xde),'message':_0x34ec41(0x12b),'location':getLocationFromPath(_0x337573[_0x34ec41(0xf4)],_0x337573[_0x34ec41(0x15a)],[_0x34ec41(0x160)])});const _0x5d3dd6=_0x3b60d2['journeys']??_0x3b60d2[_0x34ec41(0x133)];if(_0x5d3dd6&&_0x5d3dd6[_0x34ec41(0x153)](_0xba7d34=>_0xba7d34[_0x34ec41(0x16f)]===!![])['length']>0x1){const _0x28daf4=_0x3b60d2[_0x34ec41(0x188)]?_0x34ec41(0x188):_0x34ec41(0x133);_0xfd880f[_0x34ec41(0x152)]({'level':_0x34ec41(0xf2),'path':_0x28daf4,'code':'DUPLICATE_LATEST','message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x28daf4===_0x34ec41(0x188)?_0x34ec41(0x122):_0x34ec41(0x147))+_0x34ec41(0xfd),'location':getLocationFromPath(_0x337573['document'],_0x337573[_0x34ec41(0x15a)],[_0x28daf4])});}if(_0x3b60d2['journeys']&&_0x3b60d2[_0x34ec41(0x188)][_0x34ec41(0xd6)]>0x0)for(let _0x569fca=0x0;_0x569fca<_0x3b60d2[_0x34ec41(0x188)][_0x34ec41(0xd6)];_0x569fca++){const _0x57cd27=_0x3b60d2[_0x34ec41(0x188)][_0x569fca];if(_0x3b60d2[_0x34ec41(0x188)][_0x34ec41(0xd6)]>0x1&&_0x57cd27['state']===_0x34ec41(0xec))continue;const _0x2feaad=_0x57cd27[_0x34ec41(0x102)]||[],_0x379d73=_0x34ec41(0x103)+_0x569fca+'].',_0x18a358=!!_0x57cd27[_0x34ec41(0x160)],_0x9d76c8=_0x18a358?{..._0x3b60d2,'goal':_0x57cd27[_0x34ec41(0x160)]}:_0x3b60d2;validateStagesForVersion(_0x2feaad,_0x9d76c8,_0x4f4cef,_0x379d73,_0xfd880f,_0x59364d,{'goalIsInherited':!_0x18a358});}else{if(_0x3b60d2[_0x34ec41(0x133)]&&_0x3b60d2[_0x34ec41(0x133)][_0x34ec41(0xd6)]>0x0)for(let _0x29ca26=0x0;_0x29ca26<_0x3b60d2[_0x34ec41(0x133)][_0x34ec41(0xd6)];_0x29ca26++){const _0x1a9a4a=_0x3b60d2[_0x34ec41(0x133)][_0x29ca26];if(_0x3b60d2[_0x34ec41(0x133)]['length']>0x1&&_0x1a9a4a['state']==='launched')continue;const _0x5df079=_0x1a9a4a[_0x34ec41(0x102)]||[],_0x2759b2=_0x34ec41(0xe1)+_0x29ca26+'].';validateStagesForVersion(_0x5df079,_0x3b60d2,_0x4f4cef,_0x2759b2,_0xfd880f,_0x59364d);}else{const _0xe41143=_0x3b60d2[_0x34ec41(0x102)]||[];validateStagesForVersion(_0xe41143,_0x3b60d2,_0x4f4cef,'',_0xfd880f,_0x59364d);}}_0x3b60d2['journeys']&&_0x3b60d2[_0x34ec41(0x188)]['length']>0x1&&(deduplicateAcrossVersions(_0xfd880f),deduplicateAcrossVersions(_0x59364d));for(const _0x43f473 of _0x1df933){!_0x215ed7[_0x34ec41(0x105)](_0x43f473)&&!_0x43f473[_0x34ec41(0xf6)]('excluded_')&&_0x59364d['push']({'level':_0x34ec41(0xf3),'path':_0x34ec41(0xf1)+_0x43f473,'code':_0x34ec41(0x10e),'message':_0x34ec41(0x112)+_0x43f473+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x337573['document'],_0x337573[_0x34ec41(0x15a)],[_0x34ec41(0x131),_0x43f473])});}return{'valid':_0xfd880f[_0x34ec41(0xd6)]===0x0,'errors':_0xfd880f,'warnings':_0x59364d};}
1
+ (function(_0x2f24d2,_0x1bc835){const _0xa92776=a149_0x13c0,_0x4dcdad=_0x2f24d2();while(!![]){try{const _0x6e839f=-parseInt(_0xa92776(0x173))/0x1*(parseInt(_0xa92776(0x1ed))/0x2)+parseInt(_0xa92776(0x198))/0x3+parseInt(_0xa92776(0x1a9))/0x4*(-parseInt(_0xa92776(0x19c))/0x5)+-parseInt(_0xa92776(0x1eb))/0x6*(parseInt(_0xa92776(0x1b3))/0x7)+-parseInt(_0xa92776(0x1cd))/0x8*(-parseInt(_0xa92776(0x1d8))/0x9)+parseInt(_0xa92776(0x218))/0xa*(-parseInt(_0xa92776(0x1ca))/0xb)+parseInt(_0xa92776(0x17d))/0xc;if(_0x6e839f===_0x1bc835)break;else _0x4dcdad['push'](_0x4dcdad['shift']());}catch(_0x106dc9){_0x4dcdad['push'](_0x4dcdad['shift']());}}}(a149_0x5191,0x82d25));function a149_0x13c0(_0xb8c440,_0x25b00f){_0xb8c440=_0xb8c440-0x16f;const _0x519121=a149_0x5191();let _0x13c027=_0x519121[_0xb8c440];return _0x13c027;}import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5d9296,_0xbe4592,_0x527712,_0x33f469,_0x1fdf57,_0x25c16c){const _0x4c93df=a149_0x13c0;return{'level':_0x5d9296,'path':_0xbe4592,'code':_0x527712,'message':_0x33f469,'location':getLocationFromPath(_0x1fdf57[_0x4c93df(0x193)],_0x1fdf57[_0x4c93df(0x1db)],pathToArray(_0x25c16c??_0xbe4592))};}function validateVersionStructure(_0x562380,_0x5538e5){const _0x1af6df=a149_0x13c0,_0x38d516=[];return _0x562380[_0x1af6df(0x227)]>MAX_STAGES&&_0x38d516[_0x1af6df(0x16f)](createIssue(_0x1af6df(0x229),_0x1af6df(0x189),'TOO_MANY_STAGES','Journey\x20has\x20'+_0x562380[_0x1af6df(0x227)]+_0x1af6df(0x21e)+MAX_STAGES,_0x5538e5)),_0x38d516;}function validateStageStructure(_0x27350c,_0x30b1fa,_0x263787,_0x285919){const _0x40f007=a149_0x13c0,_0x5dfb28=[],_0x5235c8=_0x40f007(0x217)+_0x30b1fa+']';_0x30b1fa===0x0&&!_0x27350c['entry_criteria']&&_0x5dfb28[_0x40f007(0x16f)](createIssue(_0x40f007(0x229),_0x5235c8+_0x40f007(0x216),_0x40f007(0x1c9),_0x40f007(0x1c4)+_0x27350c[_0x40f007(0x206)]+_0x40f007(0x183),_0x285919,_0x5235c8));const _0x30f831=_0x30b1fa===_0x263787-0x1;!_0x30f831&&!_0x27350c['milestone']&&_0x5dfb28[_0x40f007(0x16f)](createIssue(_0x40f007(0x229),_0x5235c8+_0x40f007(0x1e0),_0x40f007(0x1a3),'Stage\x20\x27'+_0x27350c[_0x40f007(0x206)]+_0x40f007(0x172),_0x285919,_0x5235c8));(!_0x27350c['exit_criteria']||_0x27350c[_0x40f007(0x181)][_0x40f007(0x227)]===0x0)&&_0x5dfb28[_0x40f007(0x16f)](createIssue(_0x40f007(0x214),_0x5235c8+'.exit_criteria',_0x40f007(0x226),_0x40f007(0x1c4)+_0x27350c[_0x40f007(0x206)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x285919,_0x5235c8));const _0x15b7e7=_0x27350c[_0x40f007(0x1c0)]?.[_0x40f007(0x227)]??0x0;if(_0x15b7e7===0x0)_0x5dfb28[_0x40f007(0x16f)](createIssue('error',_0x5235c8+'.steps',_0x40f007(0x22b),'Stage\x20\x27'+_0x27350c[_0x40f007(0x206)]+_0x40f007(0x1d3),_0x285919,_0x5235c8+_0x40f007(0x20a)));else{if(_0x15b7e7===0x1)_0x5dfb28[_0x40f007(0x16f)](createIssue(_0x40f007(0x214),_0x5235c8+_0x40f007(0x20a),_0x40f007(0x22b),_0x40f007(0x1c4)+_0x27350c[_0x40f007(0x206)]+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x285919,_0x5235c8+_0x40f007(0x20a)));else _0x15b7e7<=0x3&&_0x5dfb28[_0x40f007(0x16f)](createIssue(_0x40f007(0x214),_0x5235c8+'.steps',_0x40f007(0x1c3),_0x40f007(0x1c4)+_0x27350c[_0x40f007(0x206)]+_0x40f007(0x1a0)+_0x15b7e7+_0x40f007(0x20f),_0x285919,_0x5235c8+_0x40f007(0x20a)));}return _0x5dfb28;}function validateStep(_0x151598,_0x1fa7ba,_0x279740,_0x587f2a){const _0xb037e9=a149_0x13c0,_0x51b1a3=[];if(_0x151598[_0xb037e9(0x19b)]==='end')return _0x151598[_0xb037e9(0x199)]&&_0x51b1a3['push'](createIssue(_0xb037e9(0x229),_0x1fa7ba+_0xb037e9(0x1de),_0xb037e9(0x190),_0xb037e9(0x20e)+_0x151598[_0xb037e9(0x206)]+_0xb037e9(0x1fc),_0x279740)),_0xb037e9(0x1d0)in _0x151598&&_0x151598['with']!==undefined&&_0x51b1a3[_0xb037e9(0x16f)](createIssue('error',_0x1fa7ba+_0xb037e9(0x1d6),'END_STEP_HAS_NEXT_OR_WITH',_0xb037e9(0x20e)+_0x151598['name']+_0xb037e9(0x1be),_0x279740)),_0x51b1a3;_0x151598[_0xb037e9(0x199)]&&(_0x279740[_0xb037e9(0x1d5)]&&!_0x279740['stepNames']['has'](_0x151598[_0xb037e9(0x199)])&&_0x51b1a3[_0xb037e9(0x16f)](createIssue(_0xb037e9(0x229),_0x1fa7ba+'.next',_0xb037e9(0x1b7),_0xb037e9(0x204)+_0x151598[_0xb037e9(0x199)]+'\x27',_0x279740)));switch(_0x151598[_0xb037e9(0x19b)]){case _0xb037e9(0x1b4):_0x51b1a3[_0xb037e9(0x16f)](...validateWaitStep(_0x151598,_0x1fa7ba,_0x279740,_0x587f2a));break;case _0xb037e9(0x1c5):_0x51b1a3[_0xb037e9(0x16f)](...validateActivationStep(_0x151598,_0x1fa7ba,_0x279740));break;case _0xb037e9(0x1b9):_0x51b1a3[_0xb037e9(0x16f)](...validateDecisionPointStep(_0x151598,_0x1fa7ba,_0x279740,_0x587f2a));break;case _0xb037e9(0x1a5):_0x51b1a3[_0xb037e9(0x16f)](...validateAbTestStep(_0x151598,_0x1fa7ba,_0x279740,_0x587f2a));break;case'jump':_0x51b1a3[_0xb037e9(0x16f)](...validateJumpStep(_0x151598,_0x1fa7ba,_0x279740));break;}return _0x51b1a3;}function validateWaitStep(_0x59ef2e,_0x197fb2,_0x233f00,_0x55f697){const _0x4c268c=a149_0x13c0,_0x5ad966=[];if(!_0x59ef2e[_0x4c268c(0x1d0)])return _0x5ad966[_0x4c268c(0x16f)](createIssue(_0x4c268c(0x229),_0x197fb2+'.with','MISSING_WAIT_PARAMS',_0x4c268c(0x1fa),_0x233f00,_0x197fb2)),_0x5ad966;if(_0x59ef2e['with'][_0x4c268c(0x18b)]){const _0x5ea4ed=_0x59ef2e[_0x4c268c(0x1d0)][_0x4c268c(0x18b)];if(_0x5ea4ed[_0x4c268c(0x1a2)]){_0x233f00[_0x4c268c(0x20c)]?.[_0x4c268c(0x179)](_0x5ea4ed[_0x4c268c(0x1a2)]);!_0x5ea4ed[_0x4c268c(0x1a2)][_0x4c268c(0x195)]('ref:')&&(_0x233f00[_0x4c268c(0x194)]&&!_0x233f00[_0x4c268c(0x194)][_0x4c268c(0x1fe)](_0x5ea4ed[_0x4c268c(0x1a2)])&&_0x5ad966[_0x4c268c(0x16f)](createIssue(_0x4c268c(0x229),_0x197fb2+_0x4c268c(0x1e6),_0x4c268c(0x1ad),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x5ea4ed[_0x4c268c(0x1a2)]+_0x4c268c(0x1a7),_0x233f00)));_0x5ea4ed[_0x4c268c(0x199)]&&_0x233f00[_0x4c268c(0x1d5)]&&!_0x233f00[_0x4c268c(0x1d5)][_0x4c268c(0x1fe)](_0x5ea4ed[_0x4c268c(0x199)])&&_0x5ad966[_0x4c268c(0x16f)](createIssue(_0x4c268c(0x229),_0x197fb2+_0x4c268c(0x17e),_0x4c268c(0x1b7),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x5ea4ed[_0x4c268c(0x199)]+'\x27',_0x233f00));_0x5ea4ed[_0x4c268c(0x213)]?.[_0x4c268c(0x199)]&&_0x233f00[_0x4c268c(0x1d5)]&&!_0x233f00[_0x4c268c(0x1d5)]['has'](_0x5ea4ed[_0x4c268c(0x213)][_0x4c268c(0x199)])&&_0x5ad966[_0x4c268c(0x16f)](createIssue('error',_0x197fb2+_0x4c268c(0x207),_0x4c268c(0x1b7),_0x4c268c(0x21f)+_0x5ea4ed['timeout'][_0x4c268c(0x199)]+'\x27',_0x233f00));const _0x58f4dc=_0x5ea4ed[_0x4c268c(0x199)]||_0x59ef2e[_0x4c268c(0x199)],_0x8bc091=_0x5ea4ed[_0x4c268c(0x213)]?.['next']||_0x59ef2e[_0x4c268c(0x199)];if(_0x58f4dc){const _0x3f4f45=_0x55f697[_0x4c268c(0x1cc)](_0x58f4dc);_0x3f4f45?.[_0x4c268c(0x19b)]===_0x4c268c(0x1f3)&&_0x5ad966[_0x4c268c(0x16f)](createIssue('warning',_0x197fb2+_0x4c268c(0x17e),_0x4c268c(0x1af),_0x4c268c(0x20b)+_0x58f4dc+_0x4c268c(0x1ee),_0x233f00,_0x197fb2+_0x4c268c(0x1f5)));}if(_0x8bc091){const _0x558f5a=_0x55f697[_0x4c268c(0x1cc)](_0x8bc091);_0x558f5a?.['type']===_0x4c268c(0x1f3)&&_0x5ad966[_0x4c268c(0x16f)](createIssue(_0x4c268c(0x214),_0x197fb2+'.with.condition.timeout.next',_0x4c268c(0x1af),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x8bc091+_0x4c268c(0x1ee),_0x233f00,_0x197fb2+_0x4c268c(0x20d)));}}}return _0x5ad966;}function validateActivationStep(_0x2211d3,_0x3cbb68,_0x3d43ed){const _0x1ab069=a149_0x13c0,_0x23a5cb=[];if(!_0x2211d3[_0x1ab069(0x1d0)]?.['activation'])return _0x23a5cb['push'](createIssue(_0x1ab069(0x229),_0x3cbb68+'.with.activation','MISSING_ACTIVATION_REF',_0x1ab069(0x180),_0x3d43ed,_0x3cbb68)),_0x23a5cb;const _0x22ce68=_0x2211d3[_0x1ab069(0x1d0)]['activation'];return _0x3d43ed[_0x1ab069(0x17f)]&&!_0x22ce68['startsWith'](_0x1ab069(0x175))&&(!_0x3d43ed[_0x1ab069(0x17f)][_0x1ab069(0x1fe)](_0x22ce68)&&_0x23a5cb['push'](createIssue(_0x1ab069(0x229),_0x3cbb68+'.with.activation',_0x1ab069(0x205),_0x1ab069(0x1f1)+_0x22ce68+_0x1ab069(0x1b5),_0x3d43ed))),_0x23a5cb;}function validateDecisionPointStep(_0x286091,_0x5ed8b7,_0x1b667c,_0x2d3261){const _0x5dffd7=a149_0x13c0,_0x47fdb4=[];if(!_0x286091[_0x5dffd7(0x1d0)]?.[_0x5dffd7(0x1e4)]||_0x286091['with'][_0x5dffd7(0x1e4)]['length']===0x0)return _0x47fdb4[_0x5dffd7(0x16f)](createIssue(_0x5dffd7(0x229),_0x5ed8b7+_0x5dffd7(0x210),_0x5dffd7(0x1f8),_0x5dffd7(0x171),_0x1b667c,_0x5ed8b7)),_0x47fdb4;for(let _0x2e9cd4=0x0;_0x2e9cd4<_0x286091[_0x5dffd7(0x1d0)][_0x5dffd7(0x1e4)][_0x5dffd7(0x227)];_0x2e9cd4++){const _0x256949=_0x286091[_0x5dffd7(0x1d0)][_0x5dffd7(0x1e4)][_0x2e9cd4],_0x2cbe0d=_0x5ed8b7+_0x5dffd7(0x18d)+_0x2e9cd4+']';_0x256949[_0x5dffd7(0x1a2)]&&!_0x256949[_0x5dffd7(0x196)]&&(_0x1b667c['referencedSegments']?.[_0x5dffd7(0x179)](_0x256949[_0x5dffd7(0x1a2)]),!_0x256949[_0x5dffd7(0x1a2)][_0x5dffd7(0x195)]('ref:')&&(_0x1b667c[_0x5dffd7(0x194)]&&!_0x1b667c[_0x5dffd7(0x194)][_0x5dffd7(0x1fe)](_0x256949['segment'])&&_0x47fdb4[_0x5dffd7(0x16f)](createIssue(_0x5dffd7(0x229),_0x2cbe0d+_0x5dffd7(0x1da),_0x5dffd7(0x1ad),_0x5dffd7(0x1f6)+_0x256949[_0x5dffd7(0x1a2)]+'\x27',_0x1b667c))));_0x256949['next']&&_0x1b667c[_0x5dffd7(0x1d5)]&&!_0x1b667c[_0x5dffd7(0x1d5)]['has'](_0x256949['next'])&&_0x47fdb4[_0x5dffd7(0x16f)](createIssue(_0x5dffd7(0x229),_0x2cbe0d+'.next',_0x5dffd7(0x1b7),_0x5dffd7(0x1d2)+_0x256949['next']+'\x27',_0x1b667c));if(_0x256949[_0x5dffd7(0x199)]){const _0x1e428f=_0x2d3261[_0x5dffd7(0x1cc)](_0x256949[_0x5dffd7(0x199)]);_0x1e428f?.[_0x5dffd7(0x19b)]===_0x5dffd7(0x1f3)&&_0x47fdb4[_0x5dffd7(0x16f)](createIssue('warning',_0x2cbe0d+'.next',_0x5dffd7(0x1af),_0x5dffd7(0x19e)+_0x256949[_0x5dffd7(0x206)]+_0x5dffd7(0x202)+_0x256949[_0x5dffd7(0x199)]+_0x5dffd7(0x1b2),_0x1b667c));}}return _0x47fdb4;}function validateAbTestStep(_0x4d199c,_0x278591,_0x6b0ee5,_0x478d08){const _0x38d396=a149_0x13c0,_0xe88e95=[];if(!_0x4d199c[_0x38d396(0x1d0)]?.[_0x38d396(0x21a)]||_0x4d199c[_0x38d396(0x1d0)][_0x38d396(0x21a)][_0x38d396(0x227)]===0x0)return _0xe88e95['push'](createIssue('error',_0x278591+_0x38d396(0x1bd),_0x38d396(0x1f8),_0x38d396(0x1e8),_0x6b0ee5,_0x278591)),_0xe88e95;const _0x192039=_0x4d199c[_0x38d396(0x1d0)][_0x38d396(0x21a)][_0x38d396(0x209)]((_0x4044ee,_0x4ba2ab)=>_0x4044ee+(_0x4ba2ab[_0x38d396(0x223)]||0x0),0x0);Math[_0x38d396(0x176)](_0x192039-0x64)>0.01&&_0xe88e95[_0x38d396(0x16f)](createIssue(_0x38d396(0x229),_0x278591+'.with.variants',_0x38d396(0x212),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x192039+'%)',_0x6b0ee5));for(let _0x184a41=0x0;_0x184a41<_0x4d199c[_0x38d396(0x1d0)][_0x38d396(0x21a)][_0x38d396(0x227)];_0x184a41++){const _0xb2db57=_0x4d199c[_0x38d396(0x1d0)][_0x38d396(0x21a)][_0x184a41],_0x513ffc=_0x278591+'.with.variants['+_0x184a41+']';_0xb2db57[_0x38d396(0x199)]&&_0x6b0ee5['stepNames']&&!_0x6b0ee5[_0x38d396(0x1d5)][_0x38d396(0x1fe)](_0xb2db57[_0x38d396(0x199)])&&_0xe88e95['push'](createIssue('error',_0x513ffc+_0x38d396(0x1de),_0x38d396(0x1b7),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0xb2db57[_0x38d396(0x199)]+'\x27',_0x6b0ee5));if(_0xb2db57[_0x38d396(0x199)]){const _0x53c96=_0x478d08[_0x38d396(0x1cc)](_0xb2db57[_0x38d396(0x199)]);_0x53c96?.[_0x38d396(0x19b)]===_0x38d396(0x1f3)&&_0xe88e95[_0x38d396(0x16f)](createIssue(_0x38d396(0x214),_0x513ffc+_0x38d396(0x1de),_0x38d396(0x1af),_0x38d396(0x1ba)+_0xb2db57['name']+_0x38d396(0x202)+_0xb2db57['next']+_0x38d396(0x1b2),_0x6b0ee5));}}return _0xe88e95;}function validateJumpStep(_0x411d9d,_0x4fb793,_0x3109c3){const _0x4a5761=a149_0x13c0,_0x20b0ff=[];if(!_0x411d9d[_0x4a5761(0x1d0)]?.[_0x4a5761(0x191)])return _0x20b0ff[_0x4a5761(0x16f)](createIssue(_0x4a5761(0x229),_0x4fb793+_0x4a5761(0x18a),_0x4a5761(0x1f9),_0x4a5761(0x197),_0x3109c3,_0x4fb793)),_0x20b0ff;return(!_0x411d9d[_0x4a5761(0x1d0)]['target']['journey']||!_0x411d9d['with'][_0x4a5761(0x191)]['stage'])&&_0x20b0ff[_0x4a5761(0x16f)](createIssue(_0x4a5761(0x229),_0x4fb793+_0x4a5761(0x18a),'INVALID_JUMP_TARGET',_0x4a5761(0x1fb),_0x3109c3)),_0x20b0ff;}function buildConvergenceMap(_0x137893){const _0x4024d0=a149_0x13c0,_0x183378=new Map();function _0x4a3475(_0x532a48,_0x312498){const _0x29906b=a149_0x13c0,_0x201e6c=_0x183378[_0x29906b(0x1cc)](_0x532a48)||[];_0x201e6c[_0x29906b(0x16f)](_0x312498),_0x183378['set'](_0x532a48,_0x201e6c);}for(const _0x4c3227 of _0x137893){_0x4c3227[_0x4024d0(0x199)]&&_0x4a3475(_0x4c3227[_0x4024d0(0x199)],{'stepName':_0x4c3227[_0x4024d0(0x206)],'description':'step\x20\x27'+_0x4c3227[_0x4024d0(0x206)]+'\x27'});if(_0x4c3227[_0x4024d0(0x19b)]===_0x4024d0(0x1b9)&&_0x4c3227['with']?.[_0x4024d0(0x1e4)])for(const _0x2e33ba of _0x4c3227[_0x4024d0(0x1d0)][_0x4024d0(0x1e4)]){_0x2e33ba[_0x4024d0(0x199)]&&_0x4a3475(_0x2e33ba['next'],{'stepName':_0x4c3227[_0x4024d0(0x206)],'description':_0x4024d0(0x174)+_0x2e33ba['name']+'\x27\x20of\x20\x27'+_0x4c3227[_0x4024d0(0x206)]+'\x27'});}if(_0x4c3227[_0x4024d0(0x19b)]===_0x4024d0(0x1a5)&&_0x4c3227[_0x4024d0(0x1d0)]?.['variants'])for(const _0x92b6c3 of _0x4c3227['with'][_0x4024d0(0x21a)]){_0x92b6c3[_0x4024d0(0x199)]&&_0x4a3475(_0x92b6c3[_0x4024d0(0x199)],{'stepName':_0x4c3227[_0x4024d0(0x206)],'description':_0x4024d0(0x1fd)+_0x92b6c3[_0x4024d0(0x206)]+_0x4024d0(0x1a6)+_0x4c3227['name']+'\x27'});}_0x4c3227['type']===_0x4024d0(0x1b4)&&_0x4c3227[_0x4024d0(0x1d0)]?.['condition']&&(_0x4c3227[_0x4024d0(0x1d0)][_0x4024d0(0x18b)]['next']&&_0x4a3475(_0x4c3227['with'][_0x4024d0(0x18b)][_0x4024d0(0x199)],{'stepName':_0x4c3227[_0x4024d0(0x206)],'description':_0x4024d0(0x19a)+_0x4c3227['name']+'\x27'}),_0x4c3227[_0x4024d0(0x1d0)]['condition'][_0x4024d0(0x213)]?.[_0x4024d0(0x199)]&&_0x4a3475(_0x4c3227[_0x4024d0(0x1d0)][_0x4024d0(0x18b)]['timeout'][_0x4024d0(0x199)],{'stepName':_0x4c3227[_0x4024d0(0x206)],'description':_0x4024d0(0x1f4)+_0x4c3227[_0x4024d0(0x206)]+'\x27'}));}return _0x183378;}function validateFlowControl(_0x2dff6d,_0x296b85,_0x1758a7){const _0xbfa734=a149_0x13c0,_0x85944b=[],_0x264579=_0xbfa734(0x217)+_0x296b85+']',_0x4d7ffd=_0x2dff6d['steps']||[];if(_0x4d7ffd['length']===0x0)return _0x85944b;const _0x5c6621=new Map();for(const _0x61cdbe of _0x4d7ffd){_0x61cdbe[_0xbfa734(0x206)]&&_0x5c6621[_0xbfa734(0x1bf)](_0x61cdbe['name'],_0x61cdbe);}const _0x2366a0=buildConvergenceMap(_0x4d7ffd),_0x43b189=_0x4d7ffd[_0xbfa734(0x221)](_0x85cfc7=>_0x85cfc7[_0xbfa734(0x19b)]===_0xbfa734(0x1c7));!_0x43b189&&_0x85944b[_0xbfa734(0x16f)](createIssue(_0xbfa734(0x229),_0x264579+_0xbfa734(0x20a),_0xbfa734(0x17b),_0xbfa734(0x1c4)+_0x2dff6d[_0xbfa734(0x206)]+'\x27\x20has\x20no\x20end\x20step',_0x1758a7));for(const [_0x314550,_0x33a223]of _0x2366a0){const _0x2c55e6=_0x5c6621[_0xbfa734(0x1cc)](_0x314550);if(!_0x2c55e6)continue;if(_0x33a223[_0xbfa734(0x227)]>0x1&&_0x2c55e6[_0xbfa734(0x19b)]!=='merge'){const _0x32f812=_0x33a223[_0xbfa734(0x1ab)](_0x37c69b=>_0x37c69b['description'])[_0xbfa734(0x1e3)](',\x20');_0x85944b[_0xbfa734(0x16f)](createIssue('error',_0x264579+_0xbfa734(0x20a),_0xbfa734(0x222),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x314550+_0xbfa734(0x192)+_0x32f812+_0xbfa734(0x185),_0x1758a7));}_0x33a223['length']===0x1&&_0x2c55e6['type']===_0xbfa734(0x1f3)&&_0x85944b[_0xbfa734(0x16f)](createIssue(_0xbfa734(0x214),_0x264579+_0xbfa734(0x20a),_0xbfa734(0x1e7),'Merge\x20step\x20\x27'+_0x314550+_0xbfa734(0x21b)+_0x33a223[0x0][_0xbfa734(0x1c8)]+_0xbfa734(0x203),_0x1758a7));}for(const _0xdfc044 of _0x4d7ffd){if(_0xdfc044[_0xbfa734(0x19b)]===_0xbfa734(0x1f3)&&_0xdfc044[_0xbfa734(0x199)]){const _0x39519a=_0x5c6621[_0xbfa734(0x1cc)](_0xdfc044[_0xbfa734(0x199)]);_0x39519a?.[_0xbfa734(0x19b)]===_0xbfa734(0x1f3)&&_0x85944b[_0xbfa734(0x16f)](createIssue(_0xbfa734(0x229),_0x264579+_0xbfa734(0x20a),_0xbfa734(0x1bc),_0xbfa734(0x1ea)+_0xdfc044[_0xbfa734(0x206)]+_0xbfa734(0x220)+_0xdfc044[_0xbfa734(0x199)]+_0xbfa734(0x1ce),_0x1758a7));}}return _0x85944b;}function validateCriteria(_0x1ff41c,_0x1ac827,_0x316794){const _0x412694=a149_0x13c0,_0x541664=[];return _0x1ff41c[_0x412694(0x1a2)]&&(_0x316794['referencedSegments']?.[_0x412694(0x179)](_0x1ff41c[_0x412694(0x1a2)]),!_0x1ff41c[_0x412694(0x1a2)][_0x412694(0x195)]('ref:')&&(_0x316794[_0x412694(0x194)]&&!_0x316794[_0x412694(0x194)][_0x412694(0x1fe)](_0x1ff41c[_0x412694(0x1a2)])&&_0x541664['push'](createIssue(_0x412694(0x229),_0x1ac827+_0x412694(0x1da),_0x412694(0x1ad),_0x412694(0x1b0)+_0x1ff41c[_0x412694(0x1a2)]+'\x27',_0x316794)))),_0x541664;}function validateEmbeddedSegment(_0x5d0c02,_0x6378cc,_0x449da8){const _0x544a1b=a149_0x13c0,_0x437ce8=[];return _0x5d0c02[_0x544a1b(0x21c)]&&_0x437ce8['push'](...validateRuleDef(_0x5d0c02[_0x544a1b(0x21c)],_0x6378cc+_0x544a1b(0x1c2),_0x449da8)),_0x437ce8;}function validateStage(_0x2d1c7b,_0x20c22f,_0x486447,_0x190694){const _0x59da13=a149_0x13c0,_0x3d0c8d=[],_0x3e0c1d=_0x59da13(0x217)+_0x20c22f+']',_0x5c6fa1=new Map(),_0x28335b=new Map();if(_0x2d1c7b[_0x59da13(0x1c0)]){for(let _0x24e5e6=0x0;_0x24e5e6<_0x2d1c7b[_0x59da13(0x1c0)]['length'];_0x24e5e6++){const _0x1cdfa9=_0x2d1c7b[_0x59da13(0x1c0)][_0x24e5e6];_0x1cdfa9[_0x59da13(0x206)]&&_0x5c6fa1[_0x59da13(0x1bf)](_0x1cdfa9[_0x59da13(0x206)],_0x1cdfa9);}for(let _0x3780b0=0x0;_0x3780b0<_0x2d1c7b[_0x59da13(0x1c0)][_0x59da13(0x227)];_0x3780b0++){const _0x3481eb=_0x2d1c7b['steps'][_0x3780b0],_0x59d428=_0x3e0c1d+_0x59da13(0x18f)+_0x3780b0+']';if(_0x3481eb[_0x59da13(0x206)]){if(_0x28335b[_0x59da13(0x1fe)](_0x3481eb[_0x59da13(0x206)])){const _0x516ff8=_0x28335b[_0x59da13(0x1cc)](_0x3481eb[_0x59da13(0x206)]);_0x3d0c8d[_0x59da13(0x16f)](createIssue('error',_0x59d428+_0x59da13(0x1d1),_0x59da13(0x1ac),_0x59da13(0x177)+_0x3481eb[_0x59da13(0x206)]+_0x59da13(0x1c1)+_0x516ff8+'])',_0x190694));}else _0x28335b[_0x59da13(0x1bf)](_0x3481eb[_0x59da13(0x206)],_0x3780b0);}_0x3d0c8d[_0x59da13(0x16f)](...validateStep(_0x3481eb,_0x59d428,_0x190694,_0x5c6fa1));}}_0x2d1c7b[_0x59da13(0x1ff)]&&_0x3d0c8d[_0x59da13(0x16f)](...validateCriteria(_0x2d1c7b[_0x59da13(0x1ff)],_0x3e0c1d+'.entry_criteria',_0x190694));if(_0x2d1c7b[_0x59da13(0x181)])for(let _0x2ffb90=0x0;_0x2ffb90<_0x2d1c7b[_0x59da13(0x181)][_0x59da13(0x227)];_0x2ffb90++){_0x3d0c8d[_0x59da13(0x16f)](...validateCriteria(_0x2d1c7b[_0x59da13(0x181)][_0x2ffb90],_0x3e0c1d+'.exit_criteria['+_0x2ffb90+']',_0x190694));}return _0x2d1c7b[_0x59da13(0x17c)]&&_0x3d0c8d[_0x59da13(0x16f)](...validateCriteria(_0x2d1c7b[_0x59da13(0x17c)],_0x3e0c1d+'.milestone',_0x190694)),_0x3d0c8d[_0x59da13(0x16f)](...validateStageStructure(_0x2d1c7b,_0x20c22f,_0x486447,_0x190694)),_0x3d0c8d[_0x59da13(0x16f)](...validateFlowControl(_0x2d1c7b,_0x20c22f,_0x190694)),_0x3d0c8d;}function validateStagesForVersion(_0x442f47,_0x552689,_0x4bf257,_0x70966a,_0x221a3c,_0x577e14,_0x5e4dc9){const _0x1501f6=a149_0x13c0;if(_0x442f47[_0x1501f6(0x227)]===0x0){_0x221a3c[_0x1501f6(0x16f)]({'level':_0x1501f6(0x229),'path':_0x70966a+_0x1501f6(0x189),'code':_0x1501f6(0x1dd),'message':_0x1501f6(0x1d9),'location':getLocationFromPath(_0x4bf257['document'],_0x4bf257[_0x1501f6(0x1db)],['stages'])});return;}const _0x24b3f4=new Set();for(const _0x2143be of _0x442f47){if(_0x2143be['steps'])for(const _0x5793b7 of _0x2143be[_0x1501f6(0x1c0)]){_0x5793b7[_0x1501f6(0x206)]&&_0x24b3f4[_0x1501f6(0x179)](_0x5793b7['name']);}}const _0x584efd={..._0x4bf257,'stepNames':_0x24b3f4},_0x1fe9a9=validateVersionStructure(_0x442f47,_0x584efd);for(const _0x25794a of _0x1fe9a9){const _0x5c0226=_0x70966a?{..._0x25794a,'path':''+_0x70966a+_0x25794a[_0x1501f6(0x1c6)]}:_0x25794a;if(_0x5c0226[_0x1501f6(0x182)]===_0x1501f6(0x229))_0x221a3c['push'](_0x5c0226);else _0x577e14[_0x1501f6(0x16f)](_0x5c0226);}for(let _0x136e94=0x0;_0x136e94<_0x442f47[_0x1501f6(0x227)];_0x136e94++){const _0x577a05=validateStage(_0x442f47[_0x136e94],_0x136e94,_0x442f47['length'],_0x584efd);for(const _0x54fb26 of _0x577a05){const _0x457dfb=_0x70966a?{..._0x54fb26,'path':''+_0x70966a+_0x54fb26[_0x1501f6(0x1c6)]}:_0x54fb26;if(_0x457dfb['level']===_0x1501f6(0x229))_0x221a3c['push'](_0x457dfb);else _0x577e14[_0x1501f6(0x16f)](_0x457dfb);}}if(_0x552689[_0x1501f6(0x1cb)]){const _0x41e7b6=_0x5e4dc9?.[_0x1501f6(0x1ae)]?'goal':_0x70966a+_0x1501f6(0x1cb),_0x1dc84e=validateCriteria(_0x552689[_0x1501f6(0x1cb)],_0x41e7b6,_0x584efd);for(const _0x15172d of _0x1dc84e){if(_0x15172d[_0x1501f6(0x182)]===_0x1501f6(0x229))_0x221a3c[_0x1501f6(0x16f)](_0x15172d);else _0x577e14[_0x1501f6(0x16f)](_0x15172d);}}}function extractVersionIndex(_0x4b6b80){const _0x3c3436=a149_0x13c0,_0x557f7c=_0x4b6b80[_0x3c3436(0x18c)](/^journeys\[(\d+)\]\./);return _0x557f7c?_0x557f7c[0x1]:undefined;}function deduplicateAcrossVersions(_0x1e5b72){const _0x442f1e=a149_0x13c0,_0x33ee18=new Map();for(let _0x24e1e5=0x0;_0x24e1e5<_0x1e5b72[_0x442f1e(0x227)];_0x24e1e5++){const _0x288c31=_0x1e5b72[_0x24e1e5][_0x442f1e(0x1df)]+':'+_0x1e5b72[_0x24e1e5]['message'],_0x2c6932=extractVersionIndex(_0x1e5b72[_0x24e1e5][_0x442f1e(0x1c6)]),_0x33abf6=_0x33ee18['get'](_0x288c31);if(_0x33abf6){_0x33abf6[_0x442f1e(0x1ec)]['push'](_0x24e1e5);if(_0x2c6932)_0x33abf6[_0x442f1e(0x1f0)]['add'](_0x2c6932);}else _0x33ee18['set'](_0x288c31,{'indices':[_0x24e1e5],'versions':new Set(_0x2c6932?[_0x2c6932]:[])});}const _0x28c35e=new Set();for(const {indices:_0x324c43,versions:_0x1977c8}of _0x33ee18[_0x442f1e(0x1e1)]()){if(_0x1977c8[_0x442f1e(0x1e2)]<=0x1)continue;const _0x3ec8d6=_0x1e5b72[_0x324c43[0x0]];_0x3ec8d6[_0x442f1e(0x1c6)]=_0x3ec8d6['path'][_0x442f1e(0x225)](/^journeys\[\d+\]\./,''),_0x3ec8d6[_0x442f1e(0x1a8)]=_0x3ec8d6[_0x442f1e(0x1a8)]+_0x442f1e(0x1aa)+_0x1977c8['size']+'\x20versions)';for(let _0x273297=0x1;_0x273297<_0x324c43[_0x442f1e(0x227)];_0x273297++){_0x28c35e[_0x442f1e(0x179)](_0x324c43[_0x273297]);}}const _0x1b06cc=[..._0x28c35e][_0x442f1e(0x1f2)]((_0x16d367,_0x438829)=>_0x438829-_0x16d367);for(const _0x3b7ca6 of _0x1b06cc){_0x1e5b72[_0x442f1e(0x1e9)](_0x3b7ca6,0x1);}}export function validateJourneyDef(_0x222c7a,_0x2e9c13={},_0x3dc363={}){const _0x57582d=a149_0x13c0;if(_0x3dc363[_0x57582d(0x1ef)])return runJourneySemanticChecks(_0x222c7a,_0x2e9c13);const _0x3727d0=JourneyDefSchema[_0x57582d(0x1f7)](_0x222c7a);if(_0x3727d0[_0x57582d(0x1cf)])return runJourneySemanticChecks(_0x3727d0[_0x57582d(0x188)],_0x2e9c13);return zodErrorsToJourneyValidationResult(_0x3727d0[_0x57582d(0x229)],_0x2e9c13);}function zodErrorsToJourneyValidationResult(_0x5ea40f,_0xf02024){const _0x3be1f7=a149_0x13c0,_0x1c0f10=flattenZodIssues(_0x5ea40f[_0x3be1f7(0x18e)]),_0x1893e8=_0x1c0f10[_0x3be1f7(0x1ab)](_0x396875=>{const _0x50d69f=_0x3be1f7,_0x39048a=formatZodPath(_0x396875[_0x50d69f(0x1c6)]),_0x4fde4b=mapJourneyZodIssueToCode(_0x396875,_0x39048a),_0x465e43=getLocationFromPath(_0xf02024[_0x50d69f(0x193)],_0xf02024[_0x50d69f(0x1db)],_0x396875[_0x50d69f(0x1c6)][_0x50d69f(0x1ab)](_0x5b2571=>typeof _0x5b2571==='symbol'?String(_0x5b2571):_0x5b2571));return{'level':_0x50d69f(0x229),'path':_0x39048a,'code':_0x4fde4b,'message':_0x396875[_0x50d69f(0x1a8)],..._0x465e43&&{'location':_0x465e43}};});return{'valid':![],'errors':_0x1893e8,'warnings':[]};}function a149_0x5191(){const _0x419cb0=['some','CONVERGENCE_WITHOUT_MERGE','percentage','journeys','replace','MISSING_EXIT_CRITERIA','length','Journey\x20can\x20have\x20at\x20most\x20one\x20','error','JOURNEY_SCHEMA_ERROR','INSUFFICIENT_STEPS','push','excluded_','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','721ktjYMK','branch\x20\x27','ref:','abs','Duplicate\x20step\x20name\x20\x27','journeys[','add','includes','MISSING_END_STEP','milestone','24132552ZzDsiz','.with.condition.next','activationKeys','Activation\x20step\x20requires\x20an\x20activation\x20reference','exit_criteria','level','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','entries',').\x20Use\x20a\x20merge\x20step.','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','keys','data','stages','.with.target','condition','match','.with.branches[','issues','.steps[','END_STEP_HAS_NEXT_OR_WITH','target','\x27\x20(from:\x20','document','embeddedSegments','startsWith','excluded','Jump\x20step\x20requires\x20a\x20target','2074902QhHshV','next','condition\x20of\x20\x27','type','215ZeIEtH','every','Decision\x20branch\x20\x27','MISSING_GOAL','\x27\x20has\x20only\x20','version','segment','MISSING_MILESTONE','launched','ab_test','\x27\x20of\x20\x27','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','message','77644CnbzOb','\x20(across\x20','map','DUPLICATE_STEP_NAME','MISSING_SEGMENT_REFERENCE','goalIsInherited','BRANCH_DIRECTLY_TO_MERGE','Criteria\x20references\x20undefined\x20segment\x20\x27','endsWith','\x27\x20with\x20no\x20action\x20in\x20between','28yiXpnA','wait','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.stages','INVALID_NEXT_REFERENCE','segments.','decision_point','A/B\x20test\x20variant\x20\x27','activations','MERGE_TO_MERGE_CHAIN','.with.variants','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','set','steps','\x27\x20(first\x20defined\x20at\x20steps[','.rule','FEW_STEPS','Stage\x20\x27','activation','path','end','description','MISSING_ENTRY_CRITERIA','11lyCoVZ','goal','get','539264zgoSLR','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','success','with','.name','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','\x27\x20has\x20no\x20steps','DUPLICATE_LATEST','stepNames','.with','filter','63ntxost','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','.segment','source','journeys,\x20stages,\x20or\x20versions','MISSING_STAGES','.next','code','.milestone','values','size','join','branches','state','.with.condition.segment','SINGLE_INPUT_MERGE','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','splice','Merge\x20step\x20\x27','915066tLsdJO','indices','974jYwrad','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','skipSchema','versions','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','sort','merge','timeout\x20of\x20\x27','.with.condition','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','safeParse','MISSING_CONDITIONS','INVALID_JUMP_TARGET','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','variant\x20\x27','has','entry_criteria','journey\x20entry','MISSING_NAME','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27',').\x20Merge\x20is\x20unnecessary.','Step\x20references\x20non-existent\x20step\x20\x27','MISSING_ACTIVATION_DEFINITION','name','.with.condition.timeout.next','Journey\x20has\x20no\x20goal\x20defined','reduce','.steps','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','referencedSegments','.with.condition.timeout','End\x20step\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','.with.branches','Journey\x20name\x20is\x20required','INVALID_AB_TEST_PERCENTAGES','timeout','warning','Embedded\x20segment\x20\x27','.entry_criteria','stages[','8428470SjeFIa','segments','variants','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','rule','latest','\x20stages\x20but\x20maximum\x20is\x20','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'];a149_0x5191=function(){return _0x419cb0;};return a149_0x5191();}function mapJourneyZodIssueToCode(_0x1872ca,_0x1cdd64){const _0x30102f=a149_0x13c0;if(_0x1cdd64===_0x30102f(0x206))return _0x30102f(0x201);if(_0x1cdd64[_0x30102f(0x1b1)]('.type')&&_0x1cdd64[_0x30102f(0x17a)](_0x30102f(0x1c0)))return'JOURNEY_SCHEMA_ERROR';if(_0x1cdd64==='stages'||_0x1cdd64['endsWith'](_0x30102f(0x1b6)))return'MISSING_STAGES';if(_0x1cdd64===''&&_0x1872ca[_0x30102f(0x1a8)][_0x30102f(0x17a)](_0x30102f(0x1dc)))return _0x30102f(0x1dd);if(_0x1cdd64[_0x30102f(0x17a)]('activation'))return'ACTIVATION_SCHEMA_ERROR';return _0x30102f(0x22a);}function runJourneySemanticChecks(_0x50d987,_0x4c1ab2){const _0x22b3c5=a149_0x13c0,_0x14f802=[],_0x43ef60=[];(!_0x50d987[_0x22b3c5(0x206)]||_0x50d987[_0x22b3c5(0x206)]['trim']()==='')&&_0x14f802[_0x22b3c5(0x16f)]({'level':'error','path':'name','code':_0x22b3c5(0x201),'message':_0x22b3c5(0x211),'location':getLocationFromPath(_0x4c1ab2[_0x22b3c5(0x193)],_0x4c1ab2[_0x22b3c5(0x1db)],['name'])});const _0x35f0ec=new Set();if(_0x50d987['segments'])for(const _0x3668d3 of Object[_0x22b3c5(0x187)](_0x50d987['segments'])){_0x35f0ec[_0x22b3c5(0x179)](_0x3668d3);}const _0x5bf483=new Set();if(_0x50d987[_0x22b3c5(0x1bb)])for(const _0x384cc4 of Object[_0x22b3c5(0x187)](_0x50d987[_0x22b3c5(0x1bb)])){_0x5bf483['add'](_0x384cc4);}const _0x5d67ef=new Set(),_0x5d3ed6={..._0x4c1ab2,'embeddedSegments':_0x35f0ec,'referencedSegments':_0x5d67ef,'activationKeys':_0x5bf483[_0x22b3c5(0x1e2)]>0x0?_0x5bf483:undefined};if(_0x50d987[_0x22b3c5(0x219)])for(const [_0x385b7a,_0x586514]of Object[_0x22b3c5(0x184)](_0x50d987[_0x22b3c5(0x219)])){const _0x9e933a=validateEmbeddedSegment(_0x586514,_0x22b3c5(0x1b8)+_0x385b7a,_0x5d3ed6);for(const _0x516d4d of _0x9e933a){if(_0x516d4d[_0x22b3c5(0x182)]==='error')_0x14f802[_0x22b3c5(0x16f)](_0x516d4d);else _0x43ef60[_0x22b3c5(0x16f)](_0x516d4d);}}const _0x104cff=!!_0x50d987[_0x22b3c5(0x1cb)],_0x3b9e31=_0x50d987[_0x22b3c5(0x224)]?.[_0x22b3c5(0x19d)](_0x3f1df8=>!!_0x3f1df8[_0x22b3c5(0x1cb)])??![];!_0x104cff&&!_0x3b9e31&&_0x43ef60[_0x22b3c5(0x16f)]({'level':_0x22b3c5(0x214),'path':_0x22b3c5(0x1cb),'code':_0x22b3c5(0x19f),'message':_0x22b3c5(0x208),'location':getLocationFromPath(_0x4c1ab2[_0x22b3c5(0x193)],_0x4c1ab2[_0x22b3c5(0x1db)],[_0x22b3c5(0x1cb)])});const _0x152747=_0x50d987[_0x22b3c5(0x224)]??_0x50d987[_0x22b3c5(0x1f0)];if(_0x152747&&_0x152747[_0x22b3c5(0x1d7)](_0xdf4032=>_0xdf4032[_0x22b3c5(0x21d)]===!![])['length']>0x1){const _0x1a9b1c=_0x50d987[_0x22b3c5(0x224)]?_0x22b3c5(0x224):_0x22b3c5(0x1f0);_0x14f802['push']({'level':_0x22b3c5(0x229),'path':_0x1a9b1c,'code':_0x22b3c5(0x1d4),'message':_0x22b3c5(0x228)+(_0x1a9b1c===_0x22b3c5(0x224)?_0x22b3c5(0x200):_0x22b3c5(0x1a1))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x4c1ab2[_0x22b3c5(0x193)],_0x4c1ab2['source'],[_0x1a9b1c])});}if(_0x50d987['journeys']&&_0x50d987[_0x22b3c5(0x224)][_0x22b3c5(0x227)]>0x0)for(let _0x9ba7e2=0x0;_0x9ba7e2<_0x50d987[_0x22b3c5(0x224)][_0x22b3c5(0x227)];_0x9ba7e2++){const _0x1e9f44=_0x50d987[_0x22b3c5(0x224)][_0x9ba7e2];if(_0x50d987[_0x22b3c5(0x224)][_0x22b3c5(0x227)]>0x1&&_0x1e9f44[_0x22b3c5(0x1e5)]===_0x22b3c5(0x1a4))continue;const _0x41d2c3=_0x1e9f44[_0x22b3c5(0x189)]||[],_0x44a237=_0x22b3c5(0x178)+_0x9ba7e2+'].',_0x3db962=!!_0x1e9f44['goal'],_0x29295e=_0x3db962?{..._0x50d987,'goal':_0x1e9f44[_0x22b3c5(0x1cb)]}:_0x50d987;validateStagesForVersion(_0x41d2c3,_0x29295e,_0x5d3ed6,_0x44a237,_0x14f802,_0x43ef60,{'goalIsInherited':!_0x3db962});}else{if(_0x50d987[_0x22b3c5(0x1f0)]&&_0x50d987[_0x22b3c5(0x1f0)][_0x22b3c5(0x227)]>0x0)for(let _0x59d5e4=0x0;_0x59d5e4<_0x50d987[_0x22b3c5(0x1f0)][_0x22b3c5(0x227)];_0x59d5e4++){const _0x760412=_0x50d987['versions'][_0x59d5e4];if(_0x50d987['versions'][_0x22b3c5(0x227)]>0x1&&_0x760412[_0x22b3c5(0x1e5)]===_0x22b3c5(0x1a4))continue;const _0x2eabdd=_0x760412[_0x22b3c5(0x189)]||[],_0xfd055b='versions['+_0x59d5e4+'].';validateStagesForVersion(_0x2eabdd,_0x50d987,_0x5d3ed6,_0xfd055b,_0x14f802,_0x43ef60);}else{const _0x3dacec=_0x50d987[_0x22b3c5(0x189)]||[];validateStagesForVersion(_0x3dacec,_0x50d987,_0x5d3ed6,'',_0x14f802,_0x43ef60);}}_0x50d987[_0x22b3c5(0x224)]&&_0x50d987[_0x22b3c5(0x224)][_0x22b3c5(0x227)]>0x1&&(deduplicateAcrossVersions(_0x14f802),deduplicateAcrossVersions(_0x43ef60));for(const _0x17735e of _0x35f0ec){!_0x5d67ef[_0x22b3c5(0x1fe)](_0x17735e)&&!_0x17735e[_0x22b3c5(0x195)](_0x22b3c5(0x170))&&_0x43ef60[_0x22b3c5(0x16f)]({'level':_0x22b3c5(0x214),'path':'segments.'+_0x17735e,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x22b3c5(0x215)+_0x17735e+_0x22b3c5(0x186),'location':getLocationFromPath(_0x4c1ab2[_0x22b3c5(0x193)],_0x4c1ab2[_0x22b3c5(0x1db)],[_0x22b3c5(0x219),_0x17735e])});}return{'valid':_0x14f802['length']===0x0,'errors':_0x14f802,'warnings':_0x43ef60};}
@@ -1 +1 @@
1
- (function(_0x2af8a4,_0x122b6e){const _0x2fafc6=a150_0x43fb,_0x4e493d=_0x2af8a4();while(!![]){try{const _0x7fbd60=-parseInt(_0x2fafc6(0x20a))/0x1*(-parseInt(_0x2fafc6(0x20e))/0x2)+parseInt(_0x2fafc6(0x185))/0x3+-parseInt(_0x2fafc6(0x1f8))/0x4+-parseInt(_0x2fafc6(0x205))/0x5*(parseInt(_0x2fafc6(0x20b))/0x6)+-parseInt(_0x2fafc6(0x16a))/0x7*(-parseInt(_0x2fafc6(0x1e5))/0x8)+-parseInt(_0x2fafc6(0x19e))/0x9+parseInt(_0x2fafc6(0x15f))/0xa*(parseInt(_0x2fafc6(0x19a))/0xb);if(_0x7fbd60===_0x122b6e)break;else _0x4e493d['push'](_0x4e493d['shift']());}catch(_0x2c8a98){_0x4e493d['push'](_0x4e493d['shift']());}}}(a150_0x54da,0xbc25d));import*as a150_0xd81d27 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x13dee1){const _0x40e8f5=a150_0x43fb,_0x1bd920=_0x13dee1[_0x40e8f5(0x1a3)]();if(_0x1bd920===_0x40e8f5(0x19f)||_0x1bd920===_0x40e8f5(0x203))return _0x40e8f5(0x203);if(_0x1bd920==='weeks'||_0x1bd920===_0x40e8f5(0x16e))return _0x40e8f5(0x16e);return _0x13dee1;}export function journeyResponseToDefSync(_0x2050f3){const _0x5df6ab=a150_0x43fb,_0x4913ac=_0x2050f3['attributes'],_0x416893=_0x4913ac[_0x5df6ab(0x208)]||_0x4913ac[_0x5df6ab(0x15e)],_0xd46591={'stages':_0x4913ac[_0x5df6ab(0x1df)][_0x5df6ab(0x182)](convertApiStageToYaml),'id':_0x2050f3['id']};_0x4913ac[_0x5df6ab(0x16c)]&&(_0xd46591[_0x5df6ab(0x16c)]=convertApiCriteriaToYaml(_0x4913ac[_0x5df6ab(0x16c)]));_0x4913ac[_0x5df6ab(0x15e)]&&_0x4913ac[_0x5df6ab(0x15e)]!==_0x416893&&(_0xd46591[_0x5df6ab(0x1ff)]=_0x4913ac[_0x5df6ab(0x15e)]);_0x4913ac[_0x5df6ab(0x1e6)]!==undefined&&(_0xd46591['version_number']=_0x4913ac['versionNumber']);_0x4913ac[_0x5df6ab(0x17f)]&&(_0xd46591[_0x5df6ab(0x17f)]=_0x4913ac['state']===_0x5df6ab(0x1c6)?_0x5df6ab(0x1c6):_0x5df6ab(0x181));const _0x31a231={'type':_0x5df6ab(0x1b3),'name':_0x416893,'journeys':[_0xd46591]};_0x4913ac[_0x5df6ab(0x1fb)]&&(_0x31a231[_0x5df6ab(0x1fb)]=_0x4913ac[_0x5df6ab(0x1fb)]);_0x4913ac[_0x5df6ab(0x16c)]&&(_0x31a231[_0x5df6ab(0x16c)]=convertApiCriteriaToYaml(_0x4913ac['goal']));if(_0x4913ac[_0x5df6ab(0x1ba)])_0x31a231[_0x5df6ab(0x1d1)]=_0x4913ac[_0x5df6ab(0x1ba)];else _0x4913ac[_0x5df6ab(0x1f0)]!==undefined&&(_0x31a231[_0x5df6ab(0x1d1)]=_0x4913ac[_0x5df6ab(0x1f0)]?_0x5df6ab(0x169):_0x5df6ab(0x1b4));return _0x4913ac['journeyBundleId']&&(_0x31a231['bundle_id']=_0x4913ac['journeyBundleId']),_0x4913ac['journeyBundleName']&&(_0x31a231[_0x5df6ab(0x210)]=_0x4913ac['journeyBundleName']),_0x2050f3[_0x5df6ab(0x209)]?.[_0x5df6ab(0x1fc)]?.['data']?.['id']&&(_0x31a231[_0x5df6ab(0x216)]=_0x2050f3[_0x5df6ab(0x209)][_0x5df6ab(0x1fc)]['data']['id']),_0x31a231;}export async function journeyResponseToDef(_0x53c802,_0x4c25dc){const _0x471e14=a150_0x43fb,_0x1bd2f3=journeyResponseToDefSync(_0x53c802);if(!_0x4c25dc)return _0x1bd2f3;const _0x196d68=new Set();collectSegmentIdsFromJourney(_0x1bd2f3,_0x196d68);const _0x4ede8c=new Set();collectActivationIdsFromJourney(_0x1bd2f3,_0x4ede8c);const _0x23f46d={},_0x1dca85=new Map();for(const _0x214a21 of Array[_0x471e14(0x18f)](_0x196d68)[_0x471e14(0x219)]()){if(_0x4c25dc[_0x471e14(0x1b9)]){const _0x35cbcf=await _0x4c25dc['resolveSegment'](_0x214a21);if(_0x35cbcf[_0x471e14(0x1f9)]){_0x1dca85[_0x471e14(0x1c1)](_0x214a21,_0x35cbcf[_0x471e14(0x15e)]);if(_0x35cbcf['definition']){const _0x1a5553={..._0x35cbcf[_0x471e14(0x162)],'rule':deepSortObject(_0x35cbcf[_0x471e14(0x162)][_0x471e14(0x17b)])};_0x23f46d[_0x35cbcf['name']]=_0x1a5553;}}else _0x1dca85[_0x471e14(0x1c1)](_0x214a21,makeSegmentRef(_0x35cbcf[_0x471e14(0x15e)]));}else{if(_0x4c25dc['resolveSegmentName']){const _0x636f28=await _0x4c25dc[_0x471e14(0x1a4)](_0x214a21);_0x1dca85[_0x471e14(0x1c1)](_0x214a21,_0x636f28);}}}const _0x26adcd={},_0x2bd971=new Map();for(const _0x2e9df7 of Array[_0x471e14(0x18f)](_0x4ede8c)['sort']()){if(_0x4c25dc[_0x471e14(0x1cd)]){const _0x29addd=await _0x4c25dc[_0x471e14(0x1cd)](_0x2e9df7);_0x29addd['isJourneyLocal']?(_0x2bd971['set'](_0x2e9df7,_0x29addd[_0x471e14(0x15e)]),_0x29addd[_0x471e14(0x162)]&&(_0x26adcd[_0x29addd[_0x471e14(0x15e)]]=_0x29addd[_0x471e14(0x162)])):_0x2bd971[_0x471e14(0x1c1)](_0x2e9df7,makeSegmentRef(_0x29addd[_0x471e14(0x15e)]));}else{if(_0x4c25dc[_0x471e14(0x1b5)]){const _0x1798bf=await _0x4c25dc[_0x471e14(0x1b5)](_0x2e9df7);_0x2bd971[_0x471e14(0x1c1)](_0x2e9df7,_0x1798bf);}}}_0x1dca85[_0x471e14(0x206)]>0x0&&replaceSegmentIdsInJourney(_0x1bd2f3,_0x1dca85);_0x2bd971['size']>0x0&&replaceActivationIdsInJourney(_0x1bd2f3,_0x2bd971);if(_0x4c25dc[_0x471e14(0x189)]){const _0x3e31ab=[];collectJumpTargetsFromJourney(_0x1bd2f3,_0x3e31ab);if(_0x3e31ab['length']>0x0){const _0x212588=new Map();for(const _0x53cd14 of _0x3e31ab){try{const _0x37c196=await _0x4c25dc[_0x471e14(0x189)](_0x53cd14[_0x471e14(0x20c)],_0x53cd14['stageId']);_0x212588[_0x471e14(0x1c1)](_0x53cd14['journeyId']+':'+_0x53cd14[_0x471e14(0x1ea)],_0x37c196);}catch{}}_0x212588[_0x471e14(0x206)]>0x0&&replaceJumpTargetsInJourney(_0x1bd2f3,_0x212588);}}return Object[_0x471e14(0x1ce)](_0x23f46d)['length']>0x0&&(_0x1bd2f3[_0x471e14(0x1c3)]=_0x23f46d),Object[_0x471e14(0x1ce)](_0x26adcd)[_0x471e14(0x196)]>0x0&&(_0x1bd2f3['activations']=_0x26adcd),_0x1bd2f3;}function collectSegmentIdsFromJourney(_0x31d8c9,_0xa644bc){const _0x1093fa=a150_0x43fb;_0x31d8c9[_0x1093fa(0x16c)]?.['segment']&&_0xa644bc[_0x1093fa(0x161)](_0x31d8c9[_0x1093fa(0x16c)][_0x1093fa(0x1c0)]);const _0x4cd7e4=_0xd7d213=>{const _0x3668b0=_0x1093fa;for(const _0x525d56 of _0xd7d213){_0x525d56['entry_criteria']?.[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x525d56[_0x3668b0(0x1ad)]['segment']);if(_0x525d56['exit_criteria'])for(const _0x1621f0 of _0x525d56[_0x3668b0(0x1af)]){_0x1621f0[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x1621f0[_0x3668b0(0x1c0)]);}_0x525d56[_0x3668b0(0x1a2)]?.[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x525d56['milestone'][_0x3668b0(0x1c0)]);if(_0x525d56['steps'])for(const _0x860d74 of _0x525d56[_0x3668b0(0x186)]){if(_0x860d74[_0x3668b0(0x213)]===_0x3668b0(0x17c)){const _0x1481f9=_0x860d74;for(const _0x3f0691 of _0x1481f9[_0x3668b0(0x1c5)][_0x3668b0(0x1a5)]){_0x3f0691[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x3f0691[_0x3668b0(0x1c0)]);}}else{if(_0x860d74[_0x3668b0(0x213)]===_0x3668b0(0x20f)){const _0x59cdd3=_0x860d74;_0x59cdd3[_0x3668b0(0x1c5)][_0x3668b0(0x1a9)]?.[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x59cdd3[_0x3668b0(0x1c5)][_0x3668b0(0x1a9)][_0x3668b0(0x1c0)]);}}}}};if(_0x31d8c9[_0x1093fa(0x1bc)])for(const _0x20b4e7 of _0x31d8c9['journeys']){_0x20b4e7['goal']?.['segment']&&_0xa644bc[_0x1093fa(0x161)](_0x20b4e7[_0x1093fa(0x16c)][_0x1093fa(0x1c0)]),_0x4cd7e4(_0x20b4e7['stages']);}_0x31d8c9[_0x1093fa(0x1d4)]&&_0x4cd7e4(_0x31d8c9['stages']);if(_0x31d8c9[_0x1093fa(0x1de)])for(const _0x36167d of _0x31d8c9[_0x1093fa(0x1de)]){_0x4cd7e4(_0x36167d[_0x1093fa(0x1d4)]);}}function a150_0x54da(){const _0x474415=['journeyActivationStepId','segments','unit','with','launched','unique_id','resolveActivationId','trim','behavior','schedule','variants','resolveActivation','keys','journeyStageId','wait_until','reentry','duration','entries','stages','segments:','null','end','isArray','uuid','attributes','merge','Entry\x20Criteria','all','versions','journeyStages','journeys:','next','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','conditions','bundle_id','56bRGmZp','versionNumber','Jump','percentage','JOURNEY_SYNTAX_ERROR','stageId','excluded','target','\x20\x20\x20\x20type:\x20And\x0a','find','Wait\x201\x20Day','allowReentry','WaitStep','resolveStageId','ab_test','exitCriteria','Duration','excludedPath','match','5679392XsYUyB','isJourneyLocal','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','description','parentFolder','\x20\x20\x20\x20conditions:\x0a','activations:','version','segmentId','all_columns','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','day','reentry:','108425KBgapR','size','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','journeyBundleName','relationships','145698SZlWgI','366UOrsya','journeyId','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','6muECJg','wait','bundle_name','Journey\x20description','goal-segment','type','timedOutPath','conditionSegmentId','folder_id','daysOfWeek','includes','sort','object','Condition','has','test','Goal\x20Achieved','randomUUID','moveAfter','Composite','name','10zYfsaH','ABTest','add','definition','DaysOfTheWeek','stage','activation_template_id','DecisionPoint','notification','\x27:\x20','reentry_always','198359ZBVuMx','entryCriteria','goal','customized_split','week','customizedSplit','journeyBundleId','exitCriterias','jump','version_number','latest','activations','*Max\x20wait\x20','resolveEmbeddedSegmentId','root_step','waitStepType','waitUntilDate','rule','decision_point','waitStep','conditionTimeoutUnit','state','embedded','draft','map','startsWith','filter','3335286hTnDvm','steps','uniqueId','stageName','resolveJumpTarget','journeyName','Met\x20condition(s)','connector_config','waitCondition','waitStepUnit','from','rootStep','Send\x20Notification','days_of_week','resolveEmbeddedActivationId','\x20\x20\x20\x20type:\x20','conditionTimeoutDuration','length','values','Unknown\x20segment\x20\x22','AbTest','33925639iTJBQC','Stage\x201','Activation','ref','11862702InRTQR','days','And','columns','milestone','toLowerCase','resolveSegmentName','branches','Date','\x20\x20rule:\x0a','push','condition','resolveJourneyId','Variant','activation','entry_criteria','resolveSegmentId','exit_criteria','segment_id','stringify','get','journey','no_reentry','resolveActivationName','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','timeout','Merge','resolveSegment','reentryMode','slice','journeys','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','Expected\x20format:\x0a','End','segment','set'];a150_0x54da=function(){return _0x474415;};return a150_0x54da();}function replaceSegmentIdsInJourney(_0x2039f7,_0x1c885d){const _0x274e75=a150_0x43fb,_0x43d99b=_0x443d80=>_0x1c885d[_0x274e75(0x1b2)](_0x443d80)||_0x443d80;_0x2039f7['goal']?.['segment']&&(_0x2039f7[_0x274e75(0x16c)][_0x274e75(0x1c0)]=_0x43d99b(_0x2039f7[_0x274e75(0x16c)][_0x274e75(0x1c0)]));const _0x210c54=_0x147e86=>{const _0x39ec43=_0x274e75;for(const _0x3b6114 of _0x147e86){_0x3b6114[_0x39ec43(0x1ad)]?.['segment']&&(_0x3b6114[_0x39ec43(0x1ad)][_0x39ec43(0x1c0)]=_0x43d99b(_0x3b6114['entry_criteria'][_0x39ec43(0x1c0)]));if(_0x3b6114['exit_criteria'])for(const _0x4d26ea of _0x3b6114[_0x39ec43(0x1af)]){_0x4d26ea[_0x39ec43(0x1c0)]&&(_0x4d26ea[_0x39ec43(0x1c0)]=_0x43d99b(_0x4d26ea['segment']));}_0x3b6114['milestone']?.[_0x39ec43(0x1c0)]&&(_0x3b6114[_0x39ec43(0x1a2)][_0x39ec43(0x1c0)]=_0x43d99b(_0x3b6114[_0x39ec43(0x1a2)][_0x39ec43(0x1c0)]));if(_0x3b6114[_0x39ec43(0x186)])for(const _0x247001 of _0x3b6114['steps']){if(_0x247001[_0x39ec43(0x213)]===_0x39ec43(0x17c)){const _0x46962e=_0x247001;for(const _0x3dea40 of _0x46962e['with']['branches']){_0x3dea40[_0x39ec43(0x1c0)]&&(_0x3dea40[_0x39ec43(0x1c0)]=_0x43d99b(_0x3dea40[_0x39ec43(0x1c0)]));}}else{if(_0x247001['type']==='wait'){const _0x569bfa=_0x247001;_0x569bfa[_0x39ec43(0x1c5)][_0x39ec43(0x1a9)]?.[_0x39ec43(0x1c0)]&&(_0x569bfa[_0x39ec43(0x1c5)][_0x39ec43(0x1a9)][_0x39ec43(0x1c0)]=_0x43d99b(_0x569bfa[_0x39ec43(0x1c5)][_0x39ec43(0x1a9)][_0x39ec43(0x1c0)]));}}}}};if(_0x2039f7[_0x274e75(0x1bc)])for(const _0x5030d6 of _0x2039f7[_0x274e75(0x1bc)]){_0x5030d6[_0x274e75(0x16c)]?.[_0x274e75(0x1c0)]&&(_0x5030d6[_0x274e75(0x16c)][_0x274e75(0x1c0)]=_0x43d99b(_0x5030d6['goal']['segment'])),_0x210c54(_0x5030d6['stages']);}_0x2039f7['stages']&&_0x210c54(_0x2039f7[_0x274e75(0x1d4)]);if(_0x2039f7[_0x274e75(0x1de)])for(const _0x5c3292 of _0x2039f7[_0x274e75(0x1de)]){_0x210c54(_0x5c3292['stages']);}}function collectActivationIdsFromJourney(_0x2595d3,_0x910b8b){const _0x49148a=a150_0x43fb,_0x35ad24=_0x1f1eb0=>{const _0x2fe264=a150_0x43fb;for(const _0x5d4c0f of _0x1f1eb0){if(_0x5d4c0f[_0x2fe264(0x186)])for(const _0x567d37 of _0x5d4c0f[_0x2fe264(0x186)]){if(_0x567d37[_0x2fe264(0x213)]===_0x2fe264(0x1ac)){const _0x251523=_0x567d37;_0x251523[_0x2fe264(0x1c5)][_0x2fe264(0x1ac)]&&/^\d+$/['test'](_0x251523[_0x2fe264(0x1c5)][_0x2fe264(0x1ac)])&&_0x910b8b[_0x2fe264(0x161)](_0x251523[_0x2fe264(0x1c5)][_0x2fe264(0x1ac)]);}}}};if(_0x2595d3[_0x49148a(0x1bc)])for(const _0x49a446 of _0x2595d3[_0x49148a(0x1bc)]){_0x35ad24(_0x49a446['stages']);}_0x2595d3['stages']&&_0x35ad24(_0x2595d3['stages']);if(_0x2595d3[_0x49148a(0x1de)])for(const _0x1668e6 of _0x2595d3[_0x49148a(0x1de)]){_0x35ad24(_0x1668e6[_0x49148a(0x1d4)]);}}function replaceActivationIdsInJourney(_0x5cb14d,_0x32e0db){const _0x234b48=a150_0x43fb,_0x1d25fd=_0x4e9ed0=>_0x32e0db['get'](_0x4e9ed0)||_0x4e9ed0,_0x5d129b=_0xbe130f=>{const _0x431114=a150_0x43fb;for(const _0x1b25a5 of _0xbe130f){if(_0x1b25a5[_0x431114(0x186)])for(const _0x150e6d of _0x1b25a5['steps']){if(_0x150e6d[_0x431114(0x213)]===_0x431114(0x1ac)){const _0x3def5d=_0x150e6d;_0x3def5d['with'][_0x431114(0x1ac)]&&(_0x3def5d[_0x431114(0x1c5)][_0x431114(0x1ac)]=_0x1d25fd(_0x3def5d[_0x431114(0x1c5)][_0x431114(0x1ac)]));}}}};if(_0x5cb14d[_0x234b48(0x1bc)])for(const _0x383760 of _0x5cb14d[_0x234b48(0x1bc)]){_0x5d129b(_0x383760[_0x234b48(0x1d4)]);}_0x5cb14d[_0x234b48(0x1d4)]&&_0x5d129b(_0x5cb14d[_0x234b48(0x1d4)]);if(_0x5cb14d[_0x234b48(0x1de)])for(const _0x3edbda of _0x5cb14d[_0x234b48(0x1de)]){_0x5d129b(_0x3edbda[_0x234b48(0x1d4)]);}}function collectJumpTargetsFromJourney(_0x99e308,_0x33afde){const _0x29e173=a150_0x43fb,_0x3adaa3=new Set(),_0x26e2fa=_0x42fd45=>{const _0x3f16b5=a150_0x43fb;for(const _0x10fce6 of _0x42fd45){if(_0x10fce6[_0x3f16b5(0x186)])for(const _0x519ff5 of _0x10fce6['steps']){if(_0x519ff5[_0x3f16b5(0x213)]==='jump'){const _0x48555f=_0x519ff5,_0x457537=_0x48555f['with'][_0x3f16b5(0x1ec)];if(_0x457537[_0x3f16b5(0x1b3)]&&_0x457537[_0x3f16b5(0x164)]&&/^\d+$/[_0x3f16b5(0x21d)](_0x457537[_0x3f16b5(0x1b3)])&&/^\d+$/[_0x3f16b5(0x21d)](_0x457537[_0x3f16b5(0x164)])){const _0x33a5cf=_0x457537[_0x3f16b5(0x1b3)]+':'+_0x457537[_0x3f16b5(0x164)];!_0x3adaa3[_0x3f16b5(0x21c)](_0x33a5cf)&&(_0x3adaa3['add'](_0x33a5cf),_0x33afde[_0x3f16b5(0x1a8)]({'journeyId':_0x457537['journey'],'stageId':_0x457537['stage']}));}}}}};if(_0x99e308[_0x29e173(0x1bc)])for(const _0x32b073 of _0x99e308[_0x29e173(0x1bc)]){_0x26e2fa(_0x32b073[_0x29e173(0x1d4)]);}_0x99e308[_0x29e173(0x1d4)]&&_0x26e2fa(_0x99e308[_0x29e173(0x1d4)]);if(_0x99e308[_0x29e173(0x1de)])for(const _0x26d24c of _0x99e308['versions']){_0x26e2fa(_0x26d24c[_0x29e173(0x1d4)]);}}function replaceJumpTargetsInJourney(_0x334149,_0x16878){const _0x4449a4=a150_0x43fb,_0x101ca7=_0x20e3c0=>{const _0x53f8d1=a150_0x43fb;for(const _0x33e2dc of _0x20e3c0){if(_0x33e2dc['steps'])for(const _0x76dd54 of _0x33e2dc[_0x53f8d1(0x186)]){if(_0x76dd54['type']==='jump'){const _0x4ced21=_0x76dd54,_0x553509=_0x4ced21[_0x53f8d1(0x1c5)][_0x53f8d1(0x1ec)],_0x55dbea=_0x553509[_0x53f8d1(0x1b3)]+':'+_0x553509['stage'],_0x4687a0=_0x16878['get'](_0x55dbea);_0x4687a0&&(_0x553509[_0x53f8d1(0x1b3)]=_0x4687a0[_0x53f8d1(0x18a)],_0x553509['stage']=_0x4687a0[_0x53f8d1(0x188)]);}}}};if(_0x334149[_0x4449a4(0x1bc)])for(const _0x4750d0 of _0x334149[_0x4449a4(0x1bc)]){_0x101ca7(_0x4750d0['stages']);}_0x334149[_0x4449a4(0x1d4)]&&_0x101ca7(_0x334149[_0x4449a4(0x1d4)]);if(_0x334149[_0x4449a4(0x1de)])for(const _0x52a010 of _0x334149[_0x4449a4(0x1de)]){_0x101ca7(_0x52a010[_0x4449a4(0x1d4)]);}}function generateReadableStepName(_0x20e9cf,_0x49a0c3){const _0x2cdca5=a150_0x43fb;if(_0x20e9cf[_0x2cdca5(0x15e)]&&_0x20e9cf['name']!==_0x20e9cf[_0x2cdca5(0x213)]){const _0xc513eb=_0x20e9cf[_0x2cdca5(0x15e)][_0x2cdca5(0x1c9)]();if(_0xc513eb&&/[a-z0-9\p{L}]/iu[_0x2cdca5(0x21d)](_0xc513eb))return _0xc513eb;}const _0x1ad19a=_0x20e9cf[_0x2cdca5(0x213)]['toLowerCase']()['replace'](/step$/i,'');return _0x1ad19a+'_'+(_0x49a0c3+0x1);}function getStepNextRefs(_0x2d66d5){const _0x4da12a=a150_0x43fb,_0x30f049=[];if(_0x2d66d5[_0x4da12a(0x1e1)])_0x30f049[_0x4da12a(0x1a8)](_0x2d66d5[_0x4da12a(0x1e1)]);if(_0x2d66d5['branches'])for(const _0x2a4639 of _0x2d66d5[_0x4da12a(0x1a5)]){if(_0x2a4639['next'])_0x30f049[_0x4da12a(0x1a8)](_0x2a4639[_0x4da12a(0x1e1)]);}if(_0x2d66d5[_0x4da12a(0x1cc)])for(const _0x439cdf of _0x2d66d5[_0x4da12a(0x1cc)]){if(_0x439cdf['next'])_0x30f049[_0x4da12a(0x1a8)](_0x439cdf[_0x4da12a(0x1e1)]);}if(_0x2d66d5[_0x4da12a(0x1e3)])for(const _0x435acd of _0x2d66d5['conditions']){if(_0x435acd[_0x4da12a(0x1e1)])_0x30f049[_0x4da12a(0x1a8)](_0x435acd[_0x4da12a(0x1e1)]);}return _0x30f049;}function parseJumpTargetDisplayName(_0x4909d2){const _0x1469e6=a150_0x43fb,_0xe20a2d=_0x4909d2[_0x1469e6(0x1f7)](/^(.+?)\s*\(([^/)]+)/);if(!_0xe20a2d)return undefined;const _0x2bb389=_0xe20a2d[0x1][_0x1469e6(0x1c9)](),_0xd351fc=_0xe20a2d[0x2][_0x1469e6(0x1c9)]();if(!_0x2bb389||!_0xd351fc)return undefined;return{'stageName':_0x2bb389,'journeyName':_0xd351fc};}function orderStepsFromRoot(_0x3fc439,_0x415d18){const _0x50208e=a150_0x43fb,_0x6e06a3=Object[_0x50208e(0x1d3)](_0x3fc439);if(_0x6e06a3['length']===0x0)return[];const _0x47e282=new Set(_0x6e06a3[_0x50208e(0x182)](([_0x58fdcf])=>_0x58fdcf)),_0x1c1bc7=new Set();for(const [,_0x101da7]of _0x6e06a3){for(const _0x84a6be of getStepNextRefs(_0x101da7)){if(_0x47e282[_0x50208e(0x21c)](_0x84a6be))_0x1c1bc7[_0x50208e(0x161)](_0x84a6be);}}let _0x5264f0=_0x415d18&&_0x47e282[_0x50208e(0x21c)](_0x415d18)?_0x415d18:undefined;if(!_0x5264f0){const _0x1fb7cd=_0x6e06a3[_0x50208e(0x184)](([_0x4e6a0a])=>!_0x1c1bc7[_0x50208e(0x21c)](_0x4e6a0a));_0x1fb7cd[_0x50208e(0x196)]>0x0?_0x5264f0=_0x1fb7cd[0x0][0x0]:_0x5264f0=_0x6e06a3[0x0][0x0];}const _0x538171=[],_0x1af064=new Set(),_0x2ba4b1=[_0x5264f0];while(_0x2ba4b1[_0x50208e(0x196)]>0x0){const _0x244aed=_0x2ba4b1['shift']();if(_0x1af064[_0x50208e(0x21c)](_0x244aed))continue;_0x1af064[_0x50208e(0x161)](_0x244aed);const _0x20eaf=_0x3fc439[_0x244aed];if(!_0x20eaf)continue;_0x538171['push']({'uuid':_0x244aed,'step':_0x20eaf});for(const _0x404df7 of getStepNextRefs(_0x20eaf)){_0x47e282[_0x50208e(0x21c)](_0x404df7)&&!_0x1af064[_0x50208e(0x21c)](_0x404df7)&&_0x2ba4b1['push'](_0x404df7);}}for(const [_0x234fc8,_0x1fe4b0]of _0x6e06a3){!_0x1af064['has'](_0x234fc8)&&_0x538171[_0x50208e(0x1a8)]({'uuid':_0x234fc8,'step':_0x1fe4b0});}return _0x538171;}function resolveStepReferences(_0x17d856,_0x4686da,_0x48824a,_0x2999f0){const _0x11c0ce=a150_0x43fb;if(_0x17d856['type']!==_0x11c0ce(0x1d7)){_0x17d856['next']&&_0x2999f0[_0x11c0ce(0x21c)](_0x17d856['next'])&&(_0x17d856[_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0x17d856['next']));const _0x5db693=_0x4686da+0x1;if(_0x5db693<_0x48824a[_0x11c0ce(0x196)]){const _0x55f3c2=_0x2999f0[_0x11c0ce(0x1b2)](_0x48824a[_0x5db693][_0x11c0ce(0x1d9)]);_0x17d856[_0x11c0ce(0x1e1)]===_0x55f3c2&&delete _0x17d856[_0x11c0ce(0x1e1)];}}if(_0x17d856[_0x11c0ce(0x213)]===_0x11c0ce(0x17c))for(const _0x2c187a of _0x17d856[_0x11c0ce(0x1c5)][_0x11c0ce(0x1a5)]){_0x2c187a[_0x11c0ce(0x1e1)]&&_0x2999f0[_0x11c0ce(0x21c)](_0x2c187a['next'])&&(_0x2c187a[_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0x2c187a[_0x11c0ce(0x1e1)]));}if(_0x17d856[_0x11c0ce(0x213)]===_0x11c0ce(0x1f3))for(const _0x4415a1 of _0x17d856[_0x11c0ce(0x1c5)][_0x11c0ce(0x1cc)]){_0x4415a1['next']&&_0x2999f0[_0x11c0ce(0x21c)](_0x4415a1['next'])&&(_0x4415a1[_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0x4415a1[_0x11c0ce(0x1e1)]));}if(_0x17d856[_0x11c0ce(0x213)]===_0x11c0ce(0x20f)&&_0x17d856[_0x11c0ce(0x1c5)]['condition']){const _0xb0bb1b=_0x17d856[_0x11c0ce(0x1c5)][_0x11c0ce(0x1a9)];_0xb0bb1b[_0x11c0ce(0x1e1)]&&_0x2999f0['has'](_0xb0bb1b['next'])&&(_0xb0bb1b['next']=_0x2999f0['get'](_0xb0bb1b[_0x11c0ce(0x1e1)])),_0xb0bb1b[_0x11c0ce(0x1b7)]?.[_0x11c0ce(0x1e1)]&&_0x2999f0[_0x11c0ce(0x21c)](_0xb0bb1b['timeout'][_0x11c0ce(0x1e1)])&&(_0xb0bb1b['timeout'][_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0xb0bb1b[_0x11c0ce(0x1b7)]['next']));}}function convertApiStageToYaml(_0x22e955){const _0x2fad78=a150_0x43fb,_0x4b8b95={'name':_0x22e955[_0x2fad78(0x15e)]};_0x22e955['id']&&(_0x4b8b95['id']=_0x22e955['id']);_0x22e955[_0x2fad78(0x1fb)]&&(_0x4b8b95[_0x2fad78(0x1fb)]=_0x22e955[_0x2fad78(0x1fb)]);_0x22e955[_0x2fad78(0x16b)]&&(_0x4b8b95[_0x2fad78(0x1ad)]=convertApiCriteriaToYaml(_0x22e955[_0x2fad78(0x16b)]));_0x22e955['exitCriterias']&&_0x22e955[_0x2fad78(0x171)][_0x2fad78(0x196)]>0x0&&(_0x4b8b95[_0x2fad78(0x1af)]=_0x22e955[_0x2fad78(0x171)][_0x2fad78(0x182)](convertApiCriteriaToYaml));_0x22e955[_0x2fad78(0x1a2)]&&(_0x4b8b95[_0x2fad78(0x1a2)]=convertApiCriteriaToYaml(_0x22e955[_0x2fad78(0x1a2)]));if(_0x22e955[_0x2fad78(0x186)]&&Object[_0x2fad78(0x1ce)](_0x22e955[_0x2fad78(0x186)])['length']>0x0){const _0xabeef1=orderStepsFromRoot(_0x22e955['steps'],_0x22e955['rootStep']),_0x47100c=new Map(),_0x3e3b5e=new Set();for(let _0x18f23f=0x0;_0x18f23f<_0xabeef1[_0x2fad78(0x196)];_0x18f23f++){const {uuid:_0x35d657,step:_0x49155e}=_0xabeef1[_0x18f23f];let _0x73d221=generateReadableStepName(_0x49155e,_0x18f23f),_0x45d56d=_0x73d221,_0x4712a7=0x2;while(_0x3e3b5e['has'](_0x45d56d)){_0x45d56d=_0x73d221+'_'+_0x4712a7,_0x4712a7++;}_0x3e3b5e['add'](_0x45d56d),_0x47100c['set'](_0x35d657,_0x45d56d);}_0x4b8b95['steps']=_0xabeef1[_0x2fad78(0x182)](({uuid:_0x434f25,step:_0x54a06e},_0x52bd10)=>{const _0x2e95f4=_0x2fad78,_0x21716f=convertApiStepToYaml(_0x54a06e,_0x47100c[_0x2e95f4(0x1b2)](_0x434f25));return resolveStepReferences(_0x21716f,_0x52bd10,_0xabeef1,_0x47100c),_0x21716f;});}return _0x4b8b95;}function convertApiCriteriaToYaml(_0x2e8bae){const _0x26ec38=a150_0x43fb,_0x3e12c5={'name':_0x2e8bae[_0x26ec38(0x15e)],'segment':_0x2e8bae['segmentId']};_0x2e8bae[_0x26ec38(0x1fb)]&&(_0x3e12c5[_0x26ec38(0x1fb)]=_0x2e8bae['description']);if(_0x2e8bae[_0x26ec38(0x1ec)]){let _0x1dae96=_0x2e8bae[_0x26ec38(0x1ec)]['journeyId'],_0x518444=_0x2e8bae[_0x26ec38(0x1ec)][_0x26ec38(0x1cf)];if(_0x2e8bae[_0x26ec38(0x1ec)][_0x26ec38(0x18a)]){const _0x1761ba=parseJumpTargetDisplayName(_0x2e8bae['target'][_0x26ec38(0x18a)]);_0x1761ba&&(_0x518444=_0x1761ba[_0x26ec38(0x188)],_0x1dae96=_0x1761ba[_0x26ec38(0x18a)]);}_0x3e12c5[_0x26ec38(0x1ec)]={'journey':_0x1dae96,'stage':_0x518444},_0x2e8bae[_0x26ec38(0x1ec)]['journeyBundleId']&&(_0x3e12c5[_0x26ec38(0x1ec)][_0x26ec38(0x1e4)]=_0x2e8bae[_0x26ec38(0x1ec)][_0x26ec38(0x170)]);}return _0x3e12c5;}function convertApiStepToYaml(_0x2644d2,_0x3b27de){const _0x55e75c=a150_0x43fb;switch(_0x2644d2[_0x55e75c(0x213)]){case _0x55e75c(0x1f1):{const _0xbde687={};if(_0x2644d2[_0x55e75c(0x179)]===_0x55e75c(0x1f5)&&_0x2644d2[_0x55e75c(0x17d)]!==undefined)_0xbde687[_0x55e75c(0x1d2)]=_0x2644d2[_0x55e75c(0x17d)],_0xbde687[_0x55e75c(0x1c4)]=_0x2644d2[_0x55e75c(0x18e)];else{if(_0x2644d2[_0x55e75c(0x179)]===_0x55e75c(0x1a6)&&_0x2644d2[_0x55e75c(0x17a)])_0xbde687[_0x55e75c(0x1d0)]=_0x2644d2[_0x55e75c(0x17a)];else{if(_0x2644d2['waitStepType']==='DaysOfTheWeek'&&_0x2644d2['daysOfWeek'])_0xbde687[_0x55e75c(0x192)]=_0x2644d2['daysOfWeek'];else{if(_0x2644d2[_0x55e75c(0x179)]===_0x55e75c(0x21b)){if(_0x2644d2[_0x55e75c(0x1e3)]&&_0x2644d2[_0x55e75c(0x1e3)][_0x55e75c(0x196)]>0x0){const _0x3ba653=_0x2644d2['conditions']['find'](_0xaf8d55=>!_0xaf8d55[_0x55e75c(0x214)]),_0x198a9a=_0x2644d2[_0x55e75c(0x1e3)]['find'](_0x188e81=>_0x188e81['timedOutPath']);_0x3ba653?.['segmentId']&&(_0xbde687[_0x55e75c(0x1a9)]={'segment':_0x3ba653['segmentId'],..._0x3ba653[_0x55e75c(0x1e1)]?{'next':_0x3ba653['next']}:{}},_0x198a9a&&_0x198a9a[_0x55e75c(0x15c)]!==undefined&&_0x198a9a[_0x55e75c(0x1c4)]&&(_0xbde687[_0x55e75c(0x1a9)][_0x55e75c(0x1b7)]={'duration':_0x198a9a[_0x55e75c(0x15c)],'unit':_0x198a9a[_0x55e75c(0x1c4)],..._0x198a9a['next']?{'next':_0x198a9a[_0x55e75c(0x1e1)]}:{}}));}else _0x2644d2['conditionSegmentId']&&(_0xbde687[_0x55e75c(0x1a9)]={'segment':_0x2644d2[_0x55e75c(0x215)]},_0x2644d2['conditionTimeoutDuration']!==undefined&&_0x2644d2[_0x55e75c(0x17e)]&&(_0xbde687['condition']['timeout']={'duration':_0x2644d2[_0x55e75c(0x195)],'unit':_0x2644d2[_0x55e75c(0x17e)]}));}}}}const _0x63e6fe={'type':_0x55e75c(0x20f),'name':_0x3b27de,..._0x2644d2['next']?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{},'with':_0xbde687};return _0x63e6fe;}case'Activation':{const _0x31a977={'type':'activation','name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{},'with':{'activation':_0x2644d2[_0x55e75c(0x1c2)]||''}};return _0x31a977;}case'DecisionPoint':{const _0x547293={'type':_0x55e75c(0x17c),'name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2['next']}:{},'with':{'branches':(_0x2644d2['branches']||[])[_0x55e75c(0x182)](_0x62e4cf=>({'name':_0x62e4cf[_0x55e75c(0x15e)],'segment':_0x62e4cf['segmentId'],'excluded':_0x62e4cf[_0x55e75c(0x1f6)],..._0x62e4cf[_0x55e75c(0x1e1)]?{'next':_0x62e4cf[_0x55e75c(0x1e1)]}:{}}))}};return _0x547293;}case'ABTest':case _0x55e75c(0x199):case _0x55e75c(0x1ab):{const _0x46bbff=_0x2644d2['variants']||(_0x2644d2[_0x55e75c(0x1a5)]||[])[_0x55e75c(0x182)](_0xf04a10=>({'name':_0xf04a10[_0x55e75c(0x15e)],'percentage':0x0,'next':_0xf04a10[_0x55e75c(0x1e1)]})),_0x361633={'type':_0x55e75c(0x1f3),'name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2['next']}:{},'with':{'customized_split':_0x2644d2[_0x55e75c(0x16f)],'unique_id':_0x2644d2[_0x55e75c(0x187)],'variants':_0x46bbff[_0x55e75c(0x182)](_0x5dd3b5=>({'name':_0x5dd3b5[_0x55e75c(0x15e)],'percentage':_0x5dd3b5['percentage'],..._0x5dd3b5[_0x55e75c(0x1e1)]?{'next':_0x5dd3b5[_0x55e75c(0x1e1)]}:{}}))}};return _0x361633;}case _0x55e75c(0x1b8):{const _0x2c7f11={'type':'merge','name':_0x3b27de,..._0x2644d2['next']?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{}};return _0x2c7f11;}case'Jump':{let _0x5474be='',_0x5ad88f='',_0x29f9b4;if(_0x2644d2['target']){_0x5474be=_0x2644d2['target']['journeyId'],_0x5ad88f=_0x2644d2[_0x55e75c(0x1ec)][_0x55e75c(0x1cf)],_0x29f9b4=_0x2644d2[_0x55e75c(0x1ec)][_0x55e75c(0x170)];if(_0x2644d2['target'][_0x55e75c(0x18a)]){const _0x1a60e9=parseJumpTargetDisplayName(_0x2644d2[_0x55e75c(0x1ec)][_0x55e75c(0x18a)]);_0x1a60e9&&(_0x5ad88f=_0x1a60e9['stageName'],_0x5474be=_0x1a60e9[_0x55e75c(0x18a)]);}}const _0x5606ac={'type':'jump','name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{},'with':{'target':{'journey':_0x5474be,'stage':_0x5ad88f,..._0x29f9b4?{'bundle_id':_0x29f9b4}:{}}}};return _0x5606ac;}case _0x55e75c(0x1bf):{const _0x5134a7={'type':_0x55e75c(0x1d7),'name':_0x3b27de};return _0x5134a7;}default:{const _0x582566={'type':_0x55e75c(0x1d7),'name':_0x3b27de};return _0x582566;}}}export async function journeyDefToRequest(_0x3b618,_0x5d2c37,_0x59b1d2){const _0x57beb1=a150_0x43fb,_0x3f9edb=_0x3b618[_0x57beb1(0x1d4)]||getActiveStages(_0x3b618),_0x4d01ec=isJourneysArrayMode(_0x3b618)||isMultiVersionMode(_0x3b618)?getLatestJourneyEntry(_0x3b618):undefined,_0x4cfd35=_0x4d01ec?.[_0x57beb1(0x1ff)]??_0x3b618[_0x57beb1(0x15e)],_0xb004d=_0x3b618['segments']||{},_0x3e8add=_0x3b618[_0x57beb1(0x175)]||{},_0x145a93={'type':'journey','attributes':{'name':_0x4cfd35,'audienceId':_0x5d2c37,'journeyStages':await Promise['all'](_0x3f9edb['map'](_0x3e255b=>convertYamlStageToApi(_0x3e255b,_0x59b1d2,_0xb004d,_0x3e8add)))}},_0x4cb136=_0x4d01ec?.['id']??_0x3b618['id'];_0x4cb136&&(_0x145a93['id']=_0x4cb136);_0x3b618['description']&&(_0x145a93[_0x57beb1(0x1da)]['description']=_0x3b618[_0x57beb1(0x1fb)]);const _0x5868b6=getEffectiveGoal(_0x3b618);_0x5868b6&&(_0x145a93['attributes'][_0x57beb1(0x16c)]=await convertYamlCriteriaToApi(_0x5868b6,_0x59b1d2,_0xb004d));const _0x126960=getEffectiveReentry(_0x3b618);return _0x126960&&(_0x145a93['attributes'][_0x57beb1(0x1ba)]=_0x126960,_0x145a93[_0x57beb1(0x1da)][_0x57beb1(0x1f0)]=_0x126960!==_0x57beb1(0x1b4)),_0x3b618[_0x57beb1(0x216)]&&(_0x145a93['relationships']={'parentFolder':{'data':{'id':_0x3b618[_0x57beb1(0x216)],'type':'folder'}}}),_0x145a93;}async function convertYamlStageToApi(_0x103e1f,_0x4da3e8,_0x454821={},_0x275f68={}){const _0x18be03=a150_0x43fb,_0x23f8df={'name':_0x103e1f['name']};_0x103e1f['id']&&(_0x23f8df['id']=_0x103e1f['id']);_0x103e1f['description']&&(_0x23f8df[_0x18be03(0x1fb)]=_0x103e1f['description']);_0x103e1f[_0x18be03(0x1ad)]&&(_0x23f8df['entryCriteria']=await convertYamlCriteriaToApi(_0x103e1f[_0x18be03(0x1ad)],_0x4da3e8,_0x454821));_0x103e1f[_0x18be03(0x1af)]&&_0x103e1f[_0x18be03(0x1af)][_0x18be03(0x196)]>0x0&&(_0x23f8df[_0x18be03(0x171)]=await Promise[_0x18be03(0x1dd)](_0x103e1f[_0x18be03(0x1af)]['map'](_0x34e544=>convertYamlCriteriaToApi(_0x34e544,_0x4da3e8,_0x454821))));_0x103e1f['milestone']&&(_0x23f8df[_0x18be03(0x1a2)]=await convertYamlCriteriaToApi(_0x103e1f[_0x18be03(0x1a2)],_0x4da3e8,_0x454821));if(_0x103e1f[_0x18be03(0x186)]&&_0x103e1f[_0x18be03(0x186)][_0x18be03(0x196)]>0x0){const _0x19379a={},_0x3f2fde=_0x103e1f[_0x18be03(0x186)][_0x18be03(0x182)]((_0xc97fee,_0x2637c3)=>{const _0x328b1c=_0x18be03,_0x2edf38=_0xc97fee[_0x328b1c(0x1d9)]||generateUUID(),_0xa1b943=_0xc97fee[_0x328b1c(0x15e)]||_0xc97fee[_0x328b1c(0x213)]+'_'+_0x2637c3;return _0x19379a[_0xa1b943]=_0x2edf38,{..._0xc97fee,'name':_0xa1b943};});_0x23f8df[_0x18be03(0x190)]=_0x19379a[_0x3f2fde[0x0][_0x18be03(0x15e)]],_0x23f8df[_0x18be03(0x186)]={};for(let _0x1ada29=0x0;_0x1ada29<_0x3f2fde[_0x18be03(0x196)];_0x1ada29++){const _0x184077=_0x3f2fde[_0x1ada29],_0x4ccc94=_0x19379a[_0x184077[_0x18be03(0x15e)]],_0x52fa1c=!_0x184077[_0x18be03(0x1e1)]&&_0x1ada29<_0x3f2fde[_0x18be03(0x196)]-0x1&&_0x184077[_0x18be03(0x213)]!=='end'?_0x3f2fde[_0x1ada29+0x1]['name']:_0x184077['next'],_0x36eaba=_0x52fa1c!==_0x184077['next']?{..._0x184077,'next':_0x52fa1c}:_0x184077;_0x23f8df[_0x18be03(0x186)][_0x4ccc94]=await convertYamlStepToApi(_0x36eaba,_0x4da3e8,_0x454821,_0x19379a,_0x275f68);}}else _0x103e1f[_0x18be03(0x178)]&&(_0x23f8df[_0x18be03(0x190)]=_0x103e1f[_0x18be03(0x178)]);return _0x23f8df;}async function convertYamlCriteriaToApi(_0x577443,_0x5c52aa,_0x24b4d8={}){const _0x1cf33e=a150_0x43fb;let _0x3efa82=_0x577443[_0x1cf33e(0x1c0)];if(_0x3efa82&&!/^\d+$/['test'](_0x3efa82)){const _0x80ef37=parseSegmentRef(_0x3efa82);if(_0x80ef37[_0x1cf33e(0x213)]==='ref')_0x5c52aa?.['resolveSegmentId']&&(_0x3efa82=await _0x5c52aa[_0x1cf33e(0x1ae)](_0x80ef37[_0x1cf33e(0x15e)]));else{if(_0x80ef37['type']===_0x1cf33e(0x180)&&_0x24b4d8[_0x80ef37[_0x1cf33e(0x15e)]])_0x5c52aa?.[_0x1cf33e(0x177)]&&(_0x3efa82=await _0x5c52aa[_0x1cf33e(0x177)](_0x80ef37[_0x1cf33e(0x15e)],_0x24b4d8[_0x80ef37[_0x1cf33e(0x15e)]]));else _0x5c52aa?.[_0x1cf33e(0x1ae)]&&(_0x3efa82=await _0x5c52aa[_0x1cf33e(0x1ae)](_0x80ef37[_0x1cf33e(0x15e)]));}}const _0x2e26ce={'name':_0x577443[_0x1cf33e(0x15e)],'segmentId':_0x3efa82};_0x577443[_0x1cf33e(0x1fb)]&&(_0x2e26ce[_0x1cf33e(0x1fb)]=_0x577443[_0x1cf33e(0x1fb)]);if(_0x577443['target']){const _0x2e7bd0=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x1b3)],_0x24f693=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x164)];let _0x463c1b=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x1b3)];_0x5c52aa?.[_0x1cf33e(0x1aa)]&&!/^\d+$/['test'](_0x463c1b)&&(_0x463c1b=await _0x5c52aa[_0x1cf33e(0x1aa)](_0x463c1b));let _0x15e86e=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x164)];_0x5c52aa?.[_0x1cf33e(0x1f2)]&&!/^\d+$/['test'](_0x15e86e)&&(_0x15e86e=await _0x5c52aa[_0x1cf33e(0x1f2)](_0x463c1b,_0x15e86e));const _0xeff91e=!/^\d+$/['test'](_0x2e7bd0)&&!isLocalJourneyRef(_0x2e7bd0)?formatApiJourneyName(_0x2e7bd0,_0x24f693):undefined;_0x2e26ce[_0x1cf33e(0x1ec)]={'journeyId':_0x463c1b,'journeyStageId':_0x15e86e,'journeyName':_0xeff91e,'confirmed':!![]},_0x577443['target'][_0x1cf33e(0x1e4)]&&(_0x2e26ce[_0x1cf33e(0x1ec)][_0x1cf33e(0x170)]=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x1e4)]);}return _0x2e26ce;}async function convertYamlStepToApi(_0x580d76,_0x17e1c2,_0x5b4cc3={},_0x2f492f={},_0x92d818={}){const _0x115a4a=a150_0x43fb,_0x45ae78=async _0x436479=>{const _0x346635=a150_0x43fb;if(/^\d+$/[_0x346635(0x21d)](_0x436479))return _0x436479;const _0x3dae1f=parseSegmentRef(_0x436479);if(_0x3dae1f[_0x346635(0x213)]===_0x346635(0x19d)){if(_0x17e1c2?.[_0x346635(0x1ae)])return await _0x17e1c2['resolveSegmentId'](_0x3dae1f[_0x346635(0x15e)]);}else{if(_0x3dae1f[_0x346635(0x213)]===_0x346635(0x180)&&_0x5b4cc3[_0x3dae1f[_0x346635(0x15e)]]){if(_0x17e1c2?.[_0x346635(0x177)])return await _0x17e1c2['resolveEmbeddedSegmentId'](_0x3dae1f[_0x346635(0x15e)],_0x5b4cc3[_0x3dae1f[_0x346635(0x15e)]]);}else{if(_0x17e1c2?.[_0x346635(0x1ae)])return await _0x17e1c2[_0x346635(0x1ae)](_0x3dae1f[_0x346635(0x15e)]);}}return _0x436479;},_0x543c21=async _0x3a0e8a=>{const _0x117fe4=a150_0x43fb;if(/^\d+$/[_0x117fe4(0x21d)](_0x3a0e8a))return _0x3a0e8a;const _0x1bb6ab=parseSegmentRef(_0x3a0e8a);if(_0x1bb6ab[_0x117fe4(0x213)]===_0x117fe4(0x19d)){if(_0x17e1c2?.[_0x117fe4(0x1c8)])return await _0x17e1c2[_0x117fe4(0x1c8)](_0x1bb6ab[_0x117fe4(0x15e)]);return _0x1bb6ab[_0x117fe4(0x15e)];}else{if(_0x1bb6ab[_0x117fe4(0x213)]===_0x117fe4(0x180)&&_0x92d818[_0x1bb6ab['name']]){if(_0x17e1c2?.[_0x117fe4(0x193)])return await _0x17e1c2[_0x117fe4(0x193)](_0x1bb6ab[_0x117fe4(0x15e)],_0x92d818[_0x1bb6ab['name']]);if(_0x17e1c2?.[_0x117fe4(0x1c8)])return await _0x17e1c2[_0x117fe4(0x1c8)](_0x1bb6ab[_0x117fe4(0x15e)]);}else{if(_0x17e1c2?.[_0x117fe4(0x1c8)])return await _0x17e1c2[_0x117fe4(0x1c8)](_0x1bb6ab[_0x117fe4(0x15e)]);}}return _0x3a0e8a;},_0x3894d3=_0x4103b4=>{if(!_0x4103b4)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x4103b4))return _0x4103b4;return _0x2f492f[_0x4103b4]||_0x4103b4;};switch(_0x580d76[_0x115a4a(0x213)]){case _0x115a4a(0x20f):{const _0x4b71b7=_0x580d76,_0x2454ed=_0x4b71b7[_0x115a4a(0x1c5)],_0x26fd74={'type':_0x115a4a(0x1f1),'name':_0x4b71b7[_0x115a4a(0x15e)],'next':_0x3894d3(_0x4b71b7[_0x115a4a(0x1e1)])};if(_0x2454ed['duration']!==undefined&&_0x2454ed['unit'])_0x26fd74[_0x115a4a(0x179)]='Duration',_0x26fd74['waitStep']=_0x2454ed[_0x115a4a(0x1d2)],_0x26fd74['waitStepUnit']=normalizeWaitUnit(_0x2454ed[_0x115a4a(0x1c4)]);else{if(_0x2454ed[_0x115a4a(0x1d0)])_0x26fd74[_0x115a4a(0x179)]=_0x115a4a(0x1a6),_0x26fd74[_0x115a4a(0x17a)]=_0x2454ed['wait_until'];else{if(_0x2454ed[_0x115a4a(0x192)])_0x26fd74[_0x115a4a(0x179)]=_0x115a4a(0x163),_0x26fd74[_0x115a4a(0x217)]=_0x2454ed[_0x115a4a(0x192)];else{if(_0x2454ed[_0x115a4a(0x1a9)]){_0x26fd74[_0x115a4a(0x179)]=_0x115a4a(0x21b);const _0x565782=await _0x45ae78(_0x2454ed[_0x115a4a(0x1a9)]['segment']),_0x33b2c6=_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)]?.['next']!==undefined;if(_0x33b2c6){const _0x24fd35=[];_0x24fd35[_0x115a4a(0x1a8)]({'id':generateUUID(),'segmentId':_0x565782,'timedOutPath':![],'name':_0x115a4a(0x18b),'next':_0x3894d3(_0x2454ed[_0x115a4a(0x1a9)]['next']??_0x4b71b7[_0x115a4a(0x1e1)])});if(_0x2454ed[_0x115a4a(0x1a9)]['timeout']){const _0x28416d=_0x2454ed['condition'][_0x115a4a(0x1b7)][_0x115a4a(0x1d2)],_0xc074f7=normalizeWaitUnit(_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)][_0x115a4a(0x1c4)]);_0x24fd35[_0x115a4a(0x1a8)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x115a4a(0x176)+_0x28416d+'\x20'+_0xc074f7,'moveAfter':_0x28416d,'unit':_0xc074f7,'next':_0x3894d3(_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)][_0x115a4a(0x1e1)])});}_0x26fd74[_0x115a4a(0x1e3)]=_0x24fd35,delete _0x26fd74[_0x115a4a(0x1e1)];}else _0x26fd74['conditionSegmentId']=_0x565782,_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)]&&(_0x26fd74['conditionTimeoutDuration']=_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)][_0x115a4a(0x1d2)],_0x2454ed[_0x115a4a(0x1a9)]['timeout'][_0x115a4a(0x1c4)]&&(_0x26fd74[_0x115a4a(0x17e)]=normalizeWaitUnit(_0x2454ed['condition']['timeout'][_0x115a4a(0x1c4)])));}}}}return _0x26fd74;}case _0x115a4a(0x1ac):{const _0x2ac622=_0x580d76,_0x2af198=_0x2ac622[_0x115a4a(0x1c5)]['activation'],_0x210e86=await _0x543c21(_0x2af198);return{'type':_0x115a4a(0x19c),'name':_0x2ac622[_0x115a4a(0x15e)],'journeyActivationStepId':_0x210e86,'next':_0x3894d3(_0x2ac622['next'])};}case _0x115a4a(0x17c):{const _0x5b8a82=_0x580d76,_0x206461=_0x5b8a82[_0x115a4a(0x1c5)][_0x115a4a(0x1a5)];return{'type':_0x115a4a(0x166),'name':_0x5b8a82[_0x115a4a(0x15e)],'branches':await Promise[_0x115a4a(0x1dd)](_0x206461['map'](async _0x4494eb=>{const _0x1d4bcc=_0x115a4a;let _0x3dd5fd='';if(!_0x4494eb[_0x1d4bcc(0x1eb)]){const _0x46776b=_0x4494eb[_0x1d4bcc(0x1c0)]||_0x4494eb[_0x1d4bcc(0x1b0)]||'';_0x3dd5fd=_0x46776b?await _0x45ae78(_0x46776b):'';}return{'id':crypto[_0x1d4bcc(0x21f)](),'name':_0x4494eb[_0x1d4bcc(0x15e)],'description':null,'segmentId':_0x3dd5fd,'excludedPath':_0x4494eb[_0x1d4bcc(0x1eb)]??![],'next':_0x3894d3(_0x4494eb[_0x1d4bcc(0x1e1)])};})),'next':_0x3894d3(_0x5b8a82[_0x115a4a(0x1e1)])};}case _0x115a4a(0x1f3):{const _0x3bdfa7=_0x580d76,_0x16a960=_0x3bdfa7[_0x115a4a(0x1c5)];return{'type':_0x115a4a(0x160),'name':_0x3bdfa7[_0x115a4a(0x15e)],'customizedSplit':_0x16a960['customized_split'],'uniqueId':_0x16a960['unique_id'],'variants':_0x16a960['variants'][_0x115a4a(0x182)](_0x367455=>({'id':_0x367455['id']||generateUUID(),'name':_0x367455[_0x115a4a(0x15e)],'percentage':_0x367455[_0x115a4a(0x1e8)],'next':_0x3894d3(_0x367455[_0x115a4a(0x1e1)])})),'next':_0x3894d3(_0x3bdfa7[_0x115a4a(0x1e1)])};}case _0x115a4a(0x1db):return{'type':_0x115a4a(0x1b8),'name':_0x580d76[_0x115a4a(0x15e)],'next':_0x3894d3(_0x580d76[_0x115a4a(0x1e1)])};case _0x115a4a(0x172):{const _0x5dc2ba=_0x580d76,_0x231fc1=_0x5dc2ba['with'][_0x115a4a(0x1ec)],_0x2088e5=_0x231fc1[_0x115a4a(0x1b3)],_0x1bb398=_0x231fc1[_0x115a4a(0x164)];let _0x43aed3=_0x231fc1['journey'];_0x17e1c2?.[_0x115a4a(0x1aa)]&&!/^\d+$/[_0x115a4a(0x21d)](_0x43aed3)&&(_0x43aed3=await _0x17e1c2[_0x115a4a(0x1aa)](_0x43aed3));let _0x485300=_0x231fc1[_0x115a4a(0x164)];_0x17e1c2?.[_0x115a4a(0x1f2)]&&!/^\d+$/[_0x115a4a(0x21d)](_0x485300)&&(_0x485300=await _0x17e1c2[_0x115a4a(0x1f2)](_0x43aed3,_0x485300));const _0x59c338=!/^\d+$/[_0x115a4a(0x21d)](_0x2088e5)&&!isLocalJourneyRef(_0x2088e5)?formatApiJourneyName(_0x2088e5,_0x1bb398):undefined;return{'type':_0x115a4a(0x1e7),'name':_0x5dc2ba[_0x115a4a(0x15e)],'target':{'journeyId':_0x43aed3,'journeyStageId':_0x485300,'journeyBundleId':_0x231fc1[_0x115a4a(0x1e4)],'journeyName':_0x59c338,'confirmed':!![]},'next':_0x3894d3(_0x5dc2ba[_0x115a4a(0x1e1)])};}case _0x115a4a(0x1d7):return{'type':_0x115a4a(0x1bf),'name':_0x580d76[_0x115a4a(0x15e)]};default:{const _0x25d4ff=_0x580d76;return{'type':_0x115a4a(0x1bf),'name':_0x25d4ff[_0x115a4a(0x15e)]};}}}export function toYamlString(_0x3f9cba){const _0x5d70fa=a150_0x43fb,_0x3485f7=stripInternalFields(_0x3f9cba),_0x4fff74=a150_0xd81d27[_0x5d70fa(0x1b1)](_0x3485f7,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x5d70fa(0x1d6)}),_0x452079=[_0x5d70fa(0x1d5),_0x5d70fa(0x1fe),'goal:',_0x5d70fa(0x204),_0x5d70fa(0x1e0),'stages:','versions:'];let _0xa1e65b=_0x4fff74;for(const _0x5566a2 of _0x452079){_0xa1e65b=_0xa1e65b['replace'](new RegExp('^('+_0x5566a2+')','m'),(_0x247119,_0x48d0ae,_0x16fb48)=>{if(_0x16fb48===0x0||_0xa1e65b[_0x16fb48-0x1]==='\x0a'&&_0xa1e65b[_0x16fb48-0x2]==='\x0a')return _0x48d0ae;return'\x0a'+_0x48d0ae;});}return _0xa1e65b;}function stripInternalFields(_0x59d2d4){const _0x30386a=a150_0x43fb,{id:_0x35ae1c,folder_id:_0x205f38,bundle_id:_0x182cbf,bundle_name:_0x100467,version:_0x35abb9,allow_reentry:_0x27c105,..._0x2e7e6f}=_0x59d2d4;return _0x2e7e6f[_0x30386a(0x1bc)]&&(_0x2e7e6f[_0x30386a(0x1bc)]=_0x2e7e6f[_0x30386a(0x1bc)][_0x30386a(0x182)](_0x55ccee=>{const _0x5a98ad=_0x30386a,{id:_0x1d2be6,..._0xa3568a}=_0x55ccee;return{..._0xa3568a,'stages':_0xa3568a['stages'][_0x5a98ad(0x182)](stripStageInternalFields),..._0x55ccee[_0x5a98ad(0x174)]===!![]?{'latest':!![]}:{},..._0x2e7e6f[_0x5a98ad(0x1bc)][_0x5a98ad(0x196)]===0x1&&_0xa3568a[_0x5a98ad(0x1ff)]==='v1'?{'version':undefined}:{}};})),_0x2e7e6f[_0x30386a(0x1d4)]&&(_0x2e7e6f[_0x30386a(0x1d4)]=_0x2e7e6f[_0x30386a(0x1d4)][_0x30386a(0x182)](stripStageInternalFields)),_0x2e7e6f[_0x30386a(0x1de)]&&(_0x2e7e6f[_0x30386a(0x1de)]=_0x2e7e6f[_0x30386a(0x1de)]['map'](_0x26fa71=>{const _0x15b356=_0x30386a,{id:_0x19c1ce,..._0x577666}=_0x26fa71;return{..._0x577666,'stages':_0x577666['stages']['map'](stripStageInternalFields),..._0x26fa71[_0x15b356(0x174)]===!![]?{'latest':!![]}:{}};})),_0x2e7e6f;}function stripStageInternalFields(_0x1bd323){const {id:_0x1d51f2,..._0x486c7c}=_0x1bd323;return _0x486c7c;}export function parseYamlString(_0x580fe4){return safeParseYaml(_0x580fe4,JourneyDefSchema);}export function isJourneyDef(_0x415ece){const _0x8d89cf=a150_0x43fb;return typeof _0x415ece===_0x8d89cf(0x21a)&&_0x415ece!==null&&_0x8d89cf(0x213)in _0x415ece&&_0x415ece[_0x8d89cf(0x213)]==='journey';}export function generateTemplate(_0x5218b9,_0x2cdf10){const _0x1c5601=a150_0x43fb,_0x569def={'type':_0x1c5601(0x1b3),'name':_0x5218b9,'description':_0x1c5601(0x211),'reentry':_0x1c5601(0x1b4),'goal':{'name':_0x1c5601(0x21e),'segment':_0x1c5601(0x212)},'stages':[{'name':_0x1c5601(0x19b),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':_0x1c5601(0x1dc),'segment':_0x2cdf10},'steps':[{'type':_0x1c5601(0x20f),'name':_0x1c5601(0x1ef),'with':{'duration':0x1,'unit':_0x1c5601(0x203)}},{'type':_0x1c5601(0x1ac),'name':_0x1c5601(0x191),'with':{'activation':'your-activation-name'}},{'type':_0x1c5601(0x1d7),'name':'Stage\x20Complete'}]}]};return toYamlString(_0x569def);}function generateUUID(){const _0x550829=a150_0x43fb;return crypto[_0x550829(0x21f)]();}export const SEGMENT_REF_PREFIX='ref:';export function parseSegmentRef(_0x1a8697){const _0x3d2781=a150_0x43fb;if(_0x1a8697[_0x3d2781(0x183)](SEGMENT_REF_PREFIX))return{'type':'ref','name':_0x1a8697[_0x3d2781(0x1bb)](SEGMENT_REF_PREFIX[_0x3d2781(0x196)])};if(/^\d+$/[_0x3d2781(0x21d)](_0x1a8697))return{'type':'id','name':_0x1a8697};return{'type':_0x3d2781(0x180),'name':_0x1a8697};}export function makeSegmentRef(_0x4dc8c9){return''+SEGMENT_REF_PREFIX+_0x4dc8c9;}export function isExternalSegmentRef(_0x2217f2){const _0x311e03=a150_0x43fb;return _0x2217f2[_0x311e03(0x183)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x1e3d52){const _0x4a4d43=a150_0x43fb;return!!(_0x1e3d52[_0x4a4d43(0x1bc)]&&_0x1e3d52['journeys']['length']>0x0);}export function isMultiVersionMode(_0x58cc6b){const _0x4a425f=a150_0x43fb;return!!(_0x58cc6b[_0x4a425f(0x1de)]&&_0x58cc6b[_0x4a425f(0x1de)][_0x4a425f(0x196)]>0x0);}export function isSingleVersionMode(_0x4e6b51){const _0x3d6ddb=a150_0x43fb;return!!(_0x4e6b51[_0x3d6ddb(0x1d4)]&&_0x4e6b51[_0x3d6ddb(0x1d4)][_0x3d6ddb(0x196)]>0x0);}export function hasMultipleVersions(_0x4824a0){const _0x486542=a150_0x43fb;if(isJourneysArrayMode(_0x4824a0))return(_0x4824a0[_0x486542(0x1bc)]?.[_0x486542(0x196)]||0x0)>0x1;if(isMultiVersionMode(_0x4824a0))return(_0x4824a0[_0x486542(0x1de)]?.[_0x486542(0x196)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x5de638){const _0x5b727a=a150_0x43fb;if(isJourneysArrayMode(_0x5de638))return _0x5de638;if(isSingleVersionMode(_0x5de638)){const {stages:_0x789f37,id:_0x32e216,version:_0x24c9d6,version_number:_0x5c54cd,..._0x48257d}=_0x5de638;return{..._0x48257d,'journeys':[{'version':_0x24c9d6||'v1','stages':_0x789f37||[],'id':_0x32e216,'version_number':_0x5c54cd}]};}if(isMultiVersionMode(_0x5de638)){const {versions:_0x2bdbc1,..._0x52372d}=_0x5de638;return{..._0x52372d,'journeys':(_0x2bdbc1||[])[_0x5b727a(0x182)](_0x1a12fa=>({'version':_0x1a12fa[_0x5b727a(0x15e)],'state':_0x1a12fa[_0x5b727a(0x17f)],'latest':_0x1a12fa['latest'],'stages':_0x1a12fa[_0x5b727a(0x1d4)],'id':_0x1a12fa['id'],'version_number':_0x1a12fa['version_number']}))};}return _0x5de638;}export function normalizeJourneyDef(_0x4f4e30,_0x541148){const _0x51b6dd=a150_0x43fb,_0x25891d=normalizeToJourneysFormat(_0x4f4e30),_0x102edd=_0x541148?.[_0x51b6dd(0x1c3)]?Object['keys'](_0x541148[_0x51b6dd(0x1c3)]):undefined,_0x3484fa=_0x541148?.[_0x51b6dd(0x175)]?Object[_0x51b6dd(0x1ce)](_0x541148[_0x51b6dd(0x175)]):undefined;return{'type':_0x51b6dd(0x1b3),'name':_0x25891d[_0x51b6dd(0x15e)],..._0x25891d[_0x51b6dd(0x1fb)]!==undefined&&{'description':_0x25891d[_0x51b6dd(0x1fb)]},..._0x25891d[_0x51b6dd(0x16c)]&&{'goal':normalizeJourneyCriteria(_0x25891d['goal'])},..._0x25891d[_0x51b6dd(0x1d1)]!==undefined&&{'reentry':_0x25891d[_0x51b6dd(0x1d1)]},..._0x25891d['segments']&&{'segments':normalizeEmbeddedSegments(_0x25891d[_0x51b6dd(0x1c3)],_0x102edd)},..._0x25891d['activations']&&{'activations':normalizeEmbeddedActivations(_0x25891d[_0x51b6dd(0x175)],_0x3484fa)},..._0x25891d[_0x51b6dd(0x1bc)]&&{'journeys':_0x25891d[_0x51b6dd(0x1bc)]['map'](_0x527694=>normalizeJourneyEntry(_0x527694,_0x25891d['journeys']['length']===0x1))}};}function normalizeJourneyEntry(_0x2555af,_0x15815a){const _0x1138b2=a150_0x43fb;return{...!_0x15815a&&_0x2555af[_0x1138b2(0x1ff)]!==undefined&&{'version':_0x2555af['version']},..._0x2555af['state']!==undefined&&{'state':_0x2555af[_0x1138b2(0x17f)]},...!_0x15815a&&_0x2555af[_0x1138b2(0x174)]!==undefined&&{'latest':_0x2555af['latest']},..._0x2555af[_0x1138b2(0x173)]!==undefined&&{'version_number':_0x2555af['version_number']},..._0x2555af['goal']&&{'goal':normalizeJourneyCriteria(_0x2555af['goal'])},..._0x2555af[_0x1138b2(0x1d1)]!==undefined&&{'reentry':_0x2555af[_0x1138b2(0x1d1)]},'stages':_0x2555af[_0x1138b2(0x1d4)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0x32a6dd){const _0x4e6fdf=a150_0x43fb;return{'name':_0x32a6dd[_0x4e6fdf(0x15e)],..._0x32a6dd[_0x4e6fdf(0x1fb)]!==undefined&&{'description':_0x32a6dd[_0x4e6fdf(0x1fb)]},..._0x32a6dd['entry_criteria']&&{'entry_criteria':normalizeJourneyCriteria(_0x32a6dd[_0x4e6fdf(0x1ad)])},..._0x32a6dd[_0x4e6fdf(0x1af)]&&{'exit_criteria':_0x32a6dd['exit_criteria'][_0x4e6fdf(0x182)](normalizeJourneyCriteria)},..._0x32a6dd['milestone']&&{'milestone':normalizeJourneyCriteria(_0x32a6dd[_0x4e6fdf(0x1a2)])},..._0x32a6dd[_0x4e6fdf(0x186)]&&{'steps':normalizeStepsWithImplicitNext(_0x32a6dd[_0x4e6fdf(0x186)])}};}function normalizeStepsWithImplicitNext(_0x555c72){const _0x4292ec=a150_0x43fb;return _0x555c72[_0x4292ec(0x182)]((_0x1dc744,_0x4fb92c)=>{const _0x3dabbc=_0x4292ec,_0x3008dc=_0x4fb92c<_0x555c72['length']-0x1?_0x555c72[_0x4fb92c+0x1][_0x3dabbc(0x15e)]:undefined;return normalizeJourneyStep(_0x1dc744,_0x3008dc);});}function normalizeJourneyCriteria(_0x43c079){const _0x5f4e43=a150_0x43fb;return{'name':_0x43c079['name'],..._0x43c079['description']!==undefined&&{'description':_0x43c079[_0x5f4e43(0x1fb)]},'segment':_0x43c079[_0x5f4e43(0x1c0)],..._0x43c079['target']&&{'target':normalizeJumpTarget(_0x43c079[_0x5f4e43(0x1ec)])}};}function normalizeJourneyStep(_0x41504c,_0xe68832){const _0x5b6d0c=a150_0x43fb,_0x471af0=_0x41504c['next']!==undefined&&_0x41504c[_0x5b6d0c(0x1e1)]!==_0xe68832,_0x465da5={'type':_0x41504c[_0x5b6d0c(0x213)],'name':_0x41504c['name'],..._0x471af0&&{'next':_0x41504c[_0x5b6d0c(0x1e1)]}};if(_0x5b6d0c(0x1c5)in _0x41504c&&_0x41504c[_0x5b6d0c(0x1c5)])return{..._0x465da5,'with':normalizeStepParams(_0x41504c[_0x5b6d0c(0x213)],_0x41504c[_0x5b6d0c(0x1c5)])};return _0x465da5;}function normalizeStepParams(_0x5bf9e0,_0x5ec225){const _0x44c605=a150_0x43fb;switch(_0x5bf9e0){case _0x44c605(0x20f):{const _0x316a26=_0x5ec225;let _0x4f99aa;return _0x316a26[_0x44c605(0x1a9)]&&(_0x4f99aa={'segment':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1c0)],..._0x316a26[_0x44c605(0x1a9)]['next']!==undefined&&{'next':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1e1)]},..._0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1b7)]&&{'timeout':{'duration':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1b7)]['duration'],'unit':_0x316a26[_0x44c605(0x1a9)]['timeout']['unit'],..._0x316a26[_0x44c605(0x1a9)]['timeout'][_0x44c605(0x1e1)]!==undefined&&{'next':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1b7)][_0x44c605(0x1e1)]}}}}),{..._0x316a26[_0x44c605(0x1d2)]!==undefined&&{'duration':_0x316a26[_0x44c605(0x1d2)]},..._0x316a26['unit']!==undefined&&{'unit':_0x316a26[_0x44c605(0x1c4)]},..._0x316a26['wait_until']!==undefined&&{'wait_until':_0x316a26[_0x44c605(0x1d0)]},..._0x316a26['days_of_week']!==undefined&&{'days_of_week':_0x316a26[_0x44c605(0x192)]},..._0x4f99aa&&{'condition':_0x4f99aa}};}case _0x44c605(0x1ac):{const _0x403f52=_0x5ec225;return{'activation':_0x403f52[_0x44c605(0x1ac)]};}case _0x44c605(0x17c):{const _0x4f635b=_0x5ec225;return{'branches':_0x4f635b['branches'][_0x44c605(0x182)](normalizeDecisionBranch)};}case _0x44c605(0x1f3):{const _0x65525f=_0x5ec225;return{..._0x65525f[_0x44c605(0x16d)]!==undefined&&{'customized_split':_0x65525f[_0x44c605(0x16d)]},..._0x65525f['unique_id']!==undefined&&{'unique_id':_0x65525f[_0x44c605(0x1c7)]},'variants':_0x65525f[_0x44c605(0x1cc)][_0x44c605(0x182)](normalizeAbTestVariant)};}case _0x44c605(0x172):{const _0xad1260=_0x5ec225;return{'target':normalizeJumpTarget(_0xad1260['target'])};}default:return _0x5ec225;}}function normalizeDecisionBranch(_0x5012b0){const _0x33a319=a150_0x43fb;return{'name':_0x5012b0[_0x33a319(0x15e)],..._0x5012b0['segment']!==undefined&&{'segment':_0x5012b0['segment']},..._0x5012b0[_0x33a319(0x1eb)]!==undefined&&{'excluded':_0x5012b0[_0x33a319(0x1eb)]},..._0x5012b0['next']!==undefined&&{'next':_0x5012b0[_0x33a319(0x1e1)]}};}function normalizeAbTestVariant(_0xdac08c){const _0x1de183=a150_0x43fb;return{..._0xdac08c['id']!==undefined&&{'id':_0xdac08c['id']},'name':_0xdac08c[_0x1de183(0x15e)],'percentage':_0xdac08c[_0x1de183(0x1e8)],..._0xdac08c['next']!==undefined&&{'next':_0xdac08c['next']}};}function normalizeJumpTarget(_0x2f4c71){const _0x380493=a150_0x43fb;return{'journey':_0x2f4c71[_0x380493(0x1b3)],'stage':_0x2f4c71[_0x380493(0x164)],..._0x2f4c71[_0x380493(0x1e4)]!==undefined&&{'bundle_id':_0x2f4c71[_0x380493(0x1e4)]}};}function normalizeEmbeddedSegments(_0x5bc0cc,_0x6a0902){const _0x2b0400=a150_0x43fb,_0x2578dc={},_0x52c524=Object['keys'](_0x5bc0cc),_0x5de08f=_0x6a0902?[..._0x6a0902[_0x2b0400(0x184)](_0x47b2b4=>_0x52c524['includes'](_0x47b2b4)),..._0x52c524[_0x2b0400(0x184)](_0x11cea3=>!_0x6a0902[_0x2b0400(0x218)](_0x11cea3))['sort']()]:_0x52c524[_0x2b0400(0x219)]();for(const _0x4a9caf of _0x5de08f){const _0x476d58=_0x5bc0cc[_0x4a9caf];if(_0x476d58[_0x2b0400(0x17b)]){const _0x2b9424=_0x476d58[_0x2b0400(0x17b)];if(_0x2b9424[_0x2b0400(0x213)]!==_0x2b0400(0x1a0)&&_0x2b9424[_0x2b0400(0x213)]!=='Or'&&_0x2b9424[_0x2b0400(0x213)]!==_0x2b0400(0x15d)){const _0x5f29c3=_0x2b9424[_0x2b0400(0x213)]??'(missing)';throw new SDKError(ErrorCode[_0x2b0400(0x1e9)],_0x2b0400(0x202)+_0x4a9caf+_0x2b0400(0x168)+('rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27'+_0x5f29c3+'\x27.\x0a')+_0x2b0400(0x1be)+_0x2b0400(0x1a7)+_0x2b0400(0x1ed)+_0x2b0400(0x1fd)+_0x2b0400(0x20d)+_0x2b0400(0x1bd)+_0x2b0400(0x1b6));}if(!_0x2b9424[_0x2b0400(0x1e3)]||!Array['isArray'](_0x2b9424[_0x2b0400(0x1e3)]))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x2b0400(0x202)+_0x4a9caf+_0x2b0400(0x168)+_0x2b0400(0x1fa)+_0x2b0400(0x1be)+_0x2b0400(0x1a7)+(_0x2b0400(0x194)+_0x2b9424[_0x2b0400(0x213)]+'\x0a')+_0x2b0400(0x1fd)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x2b0400(0x1bd)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}_0x2578dc[_0x4a9caf]={..._0x476d58[_0x2b0400(0x1fb)]&&_0x476d58[_0x2b0400(0x1fb)][_0x2b0400(0x1c9)]()&&{'description':_0x476d58[_0x2b0400(0x1fb)]},..._0x476d58['rule']&&{'rule':deepSortObject(_0x476d58[_0x2b0400(0x17b)])}};}return _0x2578dc;}function normalizeEmbeddedActivations(_0x2b145c,_0x405ea9){const _0x1ca433=a150_0x43fb,_0x31ffc6={},_0x5a4e2c=Object['keys'](_0x2b145c),_0x492bb2=_0x405ea9?[..._0x405ea9[_0x1ca433(0x184)](_0x3b4f9c=>_0x5a4e2c[_0x1ca433(0x218)](_0x3b4f9c)),..._0x5a4e2c[_0x1ca433(0x184)](_0x4d9357=>!_0x405ea9['includes'](_0x4d9357))[_0x1ca433(0x219)]()]:_0x5a4e2c[_0x1ca433(0x219)]();for(const _0xc0a9f0 of _0x492bb2){const _0x2f1896=_0x2b145c[_0xc0a9f0];_0x31ffc6[_0xc0a9f0]={'name':_0x2f1896[_0x1ca433(0x15e)],'connection':_0x2f1896['connection'],..._0x2f1896['description']!==undefined&&{'description':_0x2f1896['description']},..._0x2f1896[_0x1ca433(0x201)]!==undefined&&{'all_columns':_0x2f1896['all_columns']},..._0x2f1896[_0x1ca433(0x1a1)]!==undefined&&{'columns':_0x2f1896[_0x1ca433(0x1a1)]},..._0x2f1896['behavior']!==undefined&&{'behavior':_0x2f1896[_0x1ca433(0x1ca)]},..._0x2f1896['schedule']!==undefined&&{'schedule':_0x2f1896[_0x1ca433(0x1cb)]},..._0x2f1896['notification']!==undefined&&{'notification':_0x2f1896[_0x1ca433(0x167)]},..._0x2f1896[_0x1ca433(0x18c)]!==undefined&&{'connector_config':_0x2f1896[_0x1ca433(0x18c)]},..._0x2f1896['activation_template_id']!==undefined&&{'activation_template_id':_0x2f1896[_0x1ca433(0x165)]}};}return _0x31ffc6;}function a150_0x43fb(_0x2cd43a,_0x5058b1){_0x2cd43a=_0x2cd43a-0x15c;const _0x54daa4=a150_0x54da();let _0x43fb52=_0x54daa4[_0x2cd43a];return _0x43fb52;}export function getActiveStages(_0x301e46){const _0x5cce0f=a150_0x43fb;if(isJourneysArrayMode(_0x301e46)){const _0x35997b=_0x301e46[_0x5cce0f(0x1bc)]||[],_0x2dee13=_0x35997b[_0x5cce0f(0x1ee)](_0x3aa739=>_0x3aa739['latest']===!![])||_0x35997b[0x0];return _0x2dee13?.[_0x5cce0f(0x1d4)]||[];}if(isSingleVersionMode(_0x301e46))return _0x301e46[_0x5cce0f(0x1d4)]||[];if(isMultiVersionMode(_0x301e46)){const _0x1cf1fb=_0x301e46[_0x5cce0f(0x1de)]||[],_0xf9a3f0=_0x1cf1fb[_0x5cce0f(0x1ee)](_0xc9e6f4=>_0xc9e6f4['latest']===!![])||_0x1cf1fb[0x0];return _0xf9a3f0?.[_0x5cce0f(0x1d4)]||[];}return[];}export function getLatestJourneyEntry(_0x4bedaa){const _0x47943d=a150_0x43fb;if(isJourneysArrayMode(_0x4bedaa)){const _0x1391bf=_0x4bedaa[_0x47943d(0x1bc)]||[];return _0x1391bf[_0x47943d(0x1ee)](_0x2efed3=>_0x2efed3[_0x47943d(0x174)]===!![])||_0x1391bf[0x0];}if(isMultiVersionMode(_0x4bedaa)){const _0xd9e749=_0x4bedaa['versions']||[],_0x46add3=_0xd9e749[_0x47943d(0x1ee)](_0x159d98=>_0x159d98['latest']===!![])||_0xd9e749[0x0];if(_0x46add3)return{'version':_0x46add3[_0x47943d(0x15e)],'state':_0x46add3['state'],'latest':_0x46add3[_0x47943d(0x174)],'stages':_0x46add3[_0x47943d(0x1d4)],'id':_0x46add3['id'],'version_number':_0x46add3[_0x47943d(0x173)]};}if(isSingleVersionMode(_0x4bedaa))return{'version':_0x4bedaa[_0x47943d(0x1ff)]||'v1','state':_0x47943d(0x181),'stages':_0x4bedaa[_0x47943d(0x1d4)]||[],'id':_0x4bedaa['id'],'version_number':_0x4bedaa[_0x47943d(0x173)],'goal':_0x4bedaa[_0x47943d(0x16c)],'reentry':_0x4bedaa['reentry']};return undefined;}export function getLatestVersion(_0x190cbd){const _0x3be1e0=a150_0x43fb;if(!isMultiVersionMode(_0x190cbd))return undefined;const _0x53f477=_0x190cbd[_0x3be1e0(0x1de)]||[];return _0x53f477[_0x3be1e0(0x1ee)](_0x294f25=>_0x294f25[_0x3be1e0(0x174)]===!![])||_0x53f477[0x0];}export function getEffectiveGoal(_0x2bfdec){const _0x3e42fa=a150_0x43fb,_0x569f75=getLatestJourneyEntry(_0x2bfdec);return _0x569f75?.[_0x3e42fa(0x16c)]||_0x2bfdec[_0x3e42fa(0x16c)];}export function getEffectiveReentry(_0x499755){const _0x70a2d7=getLatestJourneyEntry(_0x499755);return _0x70a2d7?.['reentry']||_0x499755['reentry'];}export function collectSegmentRefs(_0x95272a){const _0x1e78c0=a150_0x43fb,_0x2a6944=new Set();_0x95272a[_0x1e78c0(0x16c)]?.[_0x1e78c0(0x1c0)]&&_0x2a6944[_0x1e78c0(0x161)](_0x95272a['goal']['segment']);const _0x43c603=_0x536678=>{const _0x38f4a3=_0x1e78c0;for(const _0x28d6bb of _0x536678){_0x28d6bb[_0x38f4a3(0x1ad)]?.[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x28d6bb[_0x38f4a3(0x1ad)][_0x38f4a3(0x1c0)]);if(_0x28d6bb[_0x38f4a3(0x1af)])for(const _0x31772a of _0x28d6bb[_0x38f4a3(0x1af)]){_0x31772a[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x31772a[_0x38f4a3(0x1c0)]);}_0x28d6bb[_0x38f4a3(0x1a2)]?.[_0x38f4a3(0x1c0)]&&_0x2a6944['add'](_0x28d6bb[_0x38f4a3(0x1a2)][_0x38f4a3(0x1c0)]);if(_0x28d6bb[_0x38f4a3(0x186)])for(const _0x592cea of _0x28d6bb[_0x38f4a3(0x186)]){if(_0x592cea[_0x38f4a3(0x213)]===_0x38f4a3(0x17c)){const _0x32a944=_0x592cea;for(const _0x186e7f of _0x32a944[_0x38f4a3(0x1c5)][_0x38f4a3(0x1a5)]){_0x186e7f[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x186e7f[_0x38f4a3(0x1c0)]);}}else{if(_0x592cea[_0x38f4a3(0x213)]===_0x38f4a3(0x20f)){const _0x6c0d88=_0x592cea;_0x6c0d88[_0x38f4a3(0x1c5)][_0x38f4a3(0x1a9)]?.[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x6c0d88[_0x38f4a3(0x1c5)][_0x38f4a3(0x1a9)][_0x38f4a3(0x1c0)]);}}}}};_0x95272a[_0x1e78c0(0x1d4)]&&_0x43c603(_0x95272a[_0x1e78c0(0x1d4)]);if(_0x95272a[_0x1e78c0(0x1de)])for(const _0xcc5ee0 of _0x95272a['versions']){_0x43c603(_0xcc5ee0['stages']);}return _0x2a6944;}export function validateSegmentRefs(_0x4924b9){const _0x5afac1=a150_0x43fb,_0x5aab9f=[],_0xafb211=collectSegmentRefs(_0x4924b9),_0x123a71=new Set(Object[_0x5afac1(0x1ce)](_0x4924b9[_0x5afac1(0x1c3)]||{}));for(const _0x414936 of _0xafb211){const _0x59a7e0=parseSegmentRef(_0x414936);_0x59a7e0[_0x5afac1(0x213)]===_0x5afac1(0x180)&&!_0x123a71[_0x5afac1(0x21c)](_0x59a7e0[_0x5afac1(0x15e)])&&_0x5aab9f[_0x5afac1(0x1a8)](_0x5afac1(0x198)+_0x59a7e0[_0x5afac1(0x15e)]+_0x5afac1(0x207)+_0x59a7e0[_0x5afac1(0x15e)]+_0x5afac1(0x1e2));}return _0x5aab9f;}export function collectSegmentIdsFromJourneyApi(_0x1719e5){const _0x3b70fe=a150_0x43fb,_0xbdb437=new Set();_0x1719e5[_0x3b70fe(0x1da)][_0x3b70fe(0x16c)]?.[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x1719e5['attributes'][_0x3b70fe(0x16c)][_0x3b70fe(0x200)]);const _0x17f9cb=_0x1719e5[_0x3b70fe(0x1da)][_0x3b70fe(0x1df)];if(Array[_0x3b70fe(0x1d8)](_0x17f9cb))for(const _0x480b58 of _0x17f9cb){_0x480b58['entryCriteria']?.[_0x3b70fe(0x200)]&&_0xbdb437['add'](_0x480b58[_0x3b70fe(0x16b)]['segmentId']);const _0x261f78=_0x480b58[_0x3b70fe(0x171)]??_0x480b58[_0x3b70fe(0x1f4)];if(Array[_0x3b70fe(0x1d8)](_0x261f78))for(const _0x291eea of _0x261f78){_0x291eea[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x291eea['segmentId']);}_0x480b58[_0x3b70fe(0x1a2)]?.[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x480b58[_0x3b70fe(0x1a2)][_0x3b70fe(0x200)]);if(_0x480b58[_0x3b70fe(0x186)]&&typeof _0x480b58[_0x3b70fe(0x186)]===_0x3b70fe(0x21a)){const _0x1e7603=Array['isArray'](_0x480b58[_0x3b70fe(0x186)])?_0x480b58[_0x3b70fe(0x186)]:Object[_0x3b70fe(0x197)](_0x480b58[_0x3b70fe(0x186)]);for(const _0x1a4a43 of _0x1e7603){_0x1a4a43[_0x3b70fe(0x18d)]?.[_0x3b70fe(0x200)]&&_0xbdb437['add'](_0x1a4a43[_0x3b70fe(0x18d)][_0x3b70fe(0x200)]);const _0x32a8e9=_0x1a4a43;_0x32a8e9[_0x3b70fe(0x215)]&&_0xbdb437[_0x3b70fe(0x161)](_0x32a8e9[_0x3b70fe(0x215)]);if(Array[_0x3b70fe(0x1d8)](_0x32a8e9[_0x3b70fe(0x1e3)]))for(const _0x36d0de of _0x32a8e9[_0x3b70fe(0x1e3)]){_0x36d0de['segmentId']&&_0xbdb437[_0x3b70fe(0x161)](_0x36d0de[_0x3b70fe(0x200)]);}if(Array[_0x3b70fe(0x1d8)](_0x1a4a43['branches']))for(const _0x1e3bdf of _0x1a4a43[_0x3b70fe(0x1a5)]){_0x1e3bdf[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x1e3bdf[_0x3b70fe(0x200)]);}}}}return _0xbdb437;}
1
+ const a150_0x3e352b=a150_0x2222;(function(_0x35ed06,_0x5bd933){const _0x700c55=a150_0x2222,_0x455301=_0x35ed06();while(!![]){try{const _0x221d22=parseInt(_0x700c55(0x15f))/0x1*(parseInt(_0x700c55(0x1b8))/0x2)+parseInt(_0x700c55(0x170))/0x3*(parseInt(_0x700c55(0x19b))/0x4)+-parseInt(_0x700c55(0x17c))/0x5+-parseInt(_0x700c55(0x16c))/0x6*(parseInt(_0x700c55(0x147))/0x7)+parseInt(_0x700c55(0x13f))/0x8*(parseInt(_0x700c55(0x14a))/0x9)+-parseInt(_0x700c55(0x1eb))/0xa*(-parseInt(_0x700c55(0x15e))/0xb)+-parseInt(_0x700c55(0x1b6))/0xc;if(_0x221d22===_0x5bd933)break;else _0x455301['push'](_0x455301['shift']());}catch(_0x528b59){_0x455301['push'](_0x455301['shift']());}}}(a150_0x373f,0x1adf8));import*as a150_0x2939a5 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x41505a){const _0x67887d=a150_0x2222,_0x361cb=_0x41505a['toLowerCase']();if(_0x361cb===_0x67887d(0x16d)||_0x361cb===_0x67887d(0x1bc))return _0x67887d(0x1bc);if(_0x361cb===_0x67887d(0x16b)||_0x361cb==='week')return _0x67887d(0x1d3);return _0x41505a;}export function journeyResponseToDefSync(_0x18d79f){const _0xc4ad52=a150_0x2222,_0x4b9d64=_0x18d79f['attributes'],_0x4670c2=_0x4b9d64[_0xc4ad52(0x1a5)]||_0x4b9d64[_0xc4ad52(0x1e5)],_0x5ee21e={'stages':_0x4b9d64['journeyStages'][_0xc4ad52(0x13b)](convertApiStageToYaml),'id':_0x18d79f['id']};_0x4b9d64[_0xc4ad52(0x1e6)]&&(_0x5ee21e[_0xc4ad52(0x1e6)]=convertApiCriteriaToYaml(_0x4b9d64[_0xc4ad52(0x1e6)]));_0x4b9d64[_0xc4ad52(0x1e5)]&&_0x4b9d64[_0xc4ad52(0x1e5)]!==_0x4670c2&&(_0x5ee21e['version']=_0x4b9d64[_0xc4ad52(0x1e5)]);_0x4b9d64[_0xc4ad52(0x19a)]!==undefined&&(_0x5ee21e[_0xc4ad52(0x1ef)]=_0x4b9d64['versionNumber']);_0x4b9d64[_0xc4ad52(0x15a)]&&(_0x5ee21e[_0xc4ad52(0x15a)]=_0x4b9d64[_0xc4ad52(0x15a)]===_0xc4ad52(0x13c)?'launched':_0xc4ad52(0x1cc));const _0x212848={'type':_0xc4ad52(0x12f),'name':_0x4670c2,'journeys':[_0x5ee21e]};_0x4b9d64[_0xc4ad52(0x172)]&&(_0x212848['description']=_0x4b9d64[_0xc4ad52(0x172)]);_0x4b9d64[_0xc4ad52(0x1e6)]&&(_0x212848['goal']=convertApiCriteriaToYaml(_0x4b9d64[_0xc4ad52(0x1e6)]));if(_0x4b9d64[_0xc4ad52(0x154)])_0x212848[_0xc4ad52(0x135)]=_0x4b9d64[_0xc4ad52(0x154)];else _0x4b9d64[_0xc4ad52(0x1dc)]!==undefined&&(_0x212848['reentry']=_0x4b9d64[_0xc4ad52(0x1dc)]?_0xc4ad52(0x1d7):_0xc4ad52(0x19e));return _0x4b9d64[_0xc4ad52(0x15b)]&&(_0x212848[_0xc4ad52(0x169)]=_0x4b9d64['journeyBundleId']),_0x4b9d64[_0xc4ad52(0x1a5)]&&(_0x212848[_0xc4ad52(0x1b0)]=_0x4b9d64['journeyBundleName']),_0x18d79f[_0xc4ad52(0x186)]?.[_0xc4ad52(0x132)]?.['data']?.['id']&&(_0x212848[_0xc4ad52(0x191)]=_0x18d79f['relationships'][_0xc4ad52(0x132)][_0xc4ad52(0x18a)]['id']),_0x212848;}export async function journeyResponseToDef(_0x3af978,_0x57237b){const _0x421e69=a150_0x2222,_0x5a0804=journeyResponseToDefSync(_0x3af978);if(!_0x57237b)return _0x5a0804;const _0x16dbdf=new Set();collectSegmentIdsFromJourney(_0x5a0804,_0x16dbdf);const _0x32b92e=new Set();collectActivationIdsFromJourney(_0x5a0804,_0x32b92e);const _0x800ef0={},_0x44a875=new Map();for(const _0x5d02a0 of Array[_0x421e69(0x16e)](_0x16dbdf)[_0x421e69(0x1ae)]()){if(_0x57237b[_0x421e69(0x15c)]){const _0x53e313=await _0x57237b[_0x421e69(0x15c)](_0x5d02a0);if(_0x53e313[_0x421e69(0x1b2)]){_0x44a875[_0x421e69(0x13a)](_0x5d02a0,_0x53e313[_0x421e69(0x1e5)]);if(_0x53e313[_0x421e69(0x14b)]){const _0xdafd37={..._0x53e313['definition'],'rule':deepSortObject(_0x53e313[_0x421e69(0x14b)][_0x421e69(0x171)])};_0x800ef0[_0x53e313[_0x421e69(0x1e5)]]=_0xdafd37;}}else _0x44a875[_0x421e69(0x13a)](_0x5d02a0,makeSegmentRef(_0x53e313['name']));}else{if(_0x57237b[_0x421e69(0x1e8)]){const _0x337e3b=await _0x57237b[_0x421e69(0x1e8)](_0x5d02a0);_0x44a875[_0x421e69(0x13a)](_0x5d02a0,_0x337e3b);}}}const _0x1603c6={},_0x379833=new Map();for(const _0x4071bc of Array[_0x421e69(0x16e)](_0x32b92e)[_0x421e69(0x1ae)]()){if(_0x57237b[_0x421e69(0x1d6)]){const _0x546fdf=await _0x57237b[_0x421e69(0x1d6)](_0x4071bc);_0x546fdf['isJourneyLocal']?(_0x379833['set'](_0x4071bc,_0x546fdf['name']),_0x546fdf[_0x421e69(0x14b)]&&(_0x1603c6[_0x546fdf['name']]=_0x546fdf[_0x421e69(0x14b)])):_0x379833[_0x421e69(0x13a)](_0x4071bc,makeSegmentRef(_0x546fdf['name']));}else{if(_0x57237b['resolveActivationName']){const _0x39d335=await _0x57237b[_0x421e69(0x195)](_0x4071bc);_0x379833['set'](_0x4071bc,_0x39d335);}}}_0x44a875[_0x421e69(0x1ac)]>0x0&&replaceSegmentIdsInJourney(_0x5a0804,_0x44a875);_0x379833[_0x421e69(0x1ac)]>0x0&&replaceActivationIdsInJourney(_0x5a0804,_0x379833);if(_0x57237b[_0x421e69(0x1b3)]){const _0x403453=[];collectJumpTargetsFromJourney(_0x5a0804,_0x403453);if(_0x403453['length']>0x0){const _0x16b72f=new Map();for(const _0x1e3f96 of _0x403453){try{const _0x3d3a50=await _0x57237b[_0x421e69(0x1b3)](_0x1e3f96['journeyId'],_0x1e3f96[_0x421e69(0x196)]);_0x16b72f[_0x421e69(0x13a)](_0x1e3f96[_0x421e69(0x1ab)]+':'+_0x1e3f96[_0x421e69(0x196)],_0x3d3a50);}catch{}}_0x16b72f['size']>0x0&&replaceJumpTargetsInJourney(_0x5a0804,_0x16b72f);}}return Object[_0x421e69(0x1c4)](_0x800ef0)['length']>0x0&&(_0x5a0804[_0x421e69(0x1bd)]=_0x800ef0),Object['keys'](_0x1603c6)[_0x421e69(0x1e0)]>0x0&&(_0x5a0804[_0x421e69(0x1a2)]=_0x1603c6),_0x5a0804;}function collectSegmentIdsFromJourney(_0x363b84,_0x229fdd){const _0x3fa089=a150_0x2222;_0x363b84['goal']?.[_0x3fa089(0x18d)]&&_0x229fdd[_0x3fa089(0x1ce)](_0x363b84[_0x3fa089(0x1e6)][_0x3fa089(0x18d)]);const _0x49f6df=_0x59dbb7=>{const _0x5bc538=_0x3fa089;for(const _0x34aa96 of _0x59dbb7){_0x34aa96[_0x5bc538(0x1db)]?.[_0x5bc538(0x18d)]&&_0x229fdd['add'](_0x34aa96[_0x5bc538(0x1db)]['segment']);if(_0x34aa96[_0x5bc538(0x14e)])for(const _0x299192 of _0x34aa96[_0x5bc538(0x14e)]){_0x299192[_0x5bc538(0x18d)]&&_0x229fdd['add'](_0x299192[_0x5bc538(0x18d)]);}_0x34aa96[_0x5bc538(0x1c2)]?.[_0x5bc538(0x18d)]&&_0x229fdd[_0x5bc538(0x1ce)](_0x34aa96[_0x5bc538(0x1c2)][_0x5bc538(0x18d)]);if(_0x34aa96['steps'])for(const _0x3d8951 of _0x34aa96[_0x5bc538(0x1ec)]){if(_0x3d8951['type']==='decision_point'){const _0x494375=_0x3d8951;for(const _0x503e1f of _0x494375['with']['branches']){_0x503e1f[_0x5bc538(0x18d)]&&_0x229fdd[_0x5bc538(0x1ce)](_0x503e1f[_0x5bc538(0x18d)]);}}else{if(_0x3d8951[_0x5bc538(0x1d0)]===_0x5bc538(0x12d)){const _0x33cb56=_0x3d8951;_0x33cb56['with'][_0x5bc538(0x136)]?.['segment']&&_0x229fdd[_0x5bc538(0x1ce)](_0x33cb56[_0x5bc538(0x144)][_0x5bc538(0x136)][_0x5bc538(0x18d)]);}}}}};if(_0x363b84[_0x3fa089(0x19c)])for(const _0x1eda63 of _0x363b84['journeys']){_0x1eda63[_0x3fa089(0x1e6)]?.[_0x3fa089(0x18d)]&&_0x229fdd['add'](_0x1eda63[_0x3fa089(0x1e6)][_0x3fa089(0x18d)]),_0x49f6df(_0x1eda63[_0x3fa089(0x15d)]);}_0x363b84[_0x3fa089(0x15d)]&&_0x49f6df(_0x363b84['stages']);if(_0x363b84[_0x3fa089(0x1e2)])for(const _0x13c4c5 of _0x363b84[_0x3fa089(0x1e2)]){_0x49f6df(_0x13c4c5[_0x3fa089(0x15d)]);}}function replaceSegmentIdsInJourney(_0x74a773,_0x924daf){const _0x4eeeee=a150_0x2222,_0x3548b9=_0x1b2423=>_0x924daf['get'](_0x1b2423)||_0x1b2423;_0x74a773[_0x4eeeee(0x1e6)]?.[_0x4eeeee(0x18d)]&&(_0x74a773[_0x4eeeee(0x1e6)][_0x4eeeee(0x18d)]=_0x3548b9(_0x74a773[_0x4eeeee(0x1e6)][_0x4eeeee(0x18d)]));const _0x346349=_0x56a2f4=>{const _0x170016=_0x4eeeee;for(const _0x1c7f8b of _0x56a2f4){_0x1c7f8b[_0x170016(0x1db)]?.[_0x170016(0x18d)]&&(_0x1c7f8b[_0x170016(0x1db)]['segment']=_0x3548b9(_0x1c7f8b[_0x170016(0x1db)]['segment']));if(_0x1c7f8b[_0x170016(0x14e)])for(const _0x2f4c23 of _0x1c7f8b[_0x170016(0x14e)]){_0x2f4c23[_0x170016(0x18d)]&&(_0x2f4c23[_0x170016(0x18d)]=_0x3548b9(_0x2f4c23['segment']));}_0x1c7f8b['milestone']?.[_0x170016(0x18d)]&&(_0x1c7f8b[_0x170016(0x1c2)][_0x170016(0x18d)]=_0x3548b9(_0x1c7f8b[_0x170016(0x1c2)][_0x170016(0x18d)]));if(_0x1c7f8b[_0x170016(0x1ec)])for(const _0x2e4cd0 of _0x1c7f8b[_0x170016(0x1ec)]){if(_0x2e4cd0[_0x170016(0x1d0)]===_0x170016(0x161)){const _0x3c4cda=_0x2e4cd0;for(const _0x11170d of _0x3c4cda['with'][_0x170016(0x14d)]){_0x11170d[_0x170016(0x18d)]&&(_0x11170d[_0x170016(0x18d)]=_0x3548b9(_0x11170d[_0x170016(0x18d)]));}}else{if(_0x2e4cd0[_0x170016(0x1d0)]===_0x170016(0x12d)){const _0xb9ccf7=_0x2e4cd0;_0xb9ccf7['with'][_0x170016(0x136)]?.['segment']&&(_0xb9ccf7[_0x170016(0x144)][_0x170016(0x136)][_0x170016(0x18d)]=_0x3548b9(_0xb9ccf7[_0x170016(0x144)][_0x170016(0x136)]['segment']));}}}}};if(_0x74a773[_0x4eeeee(0x19c)])for(const _0x25453e of _0x74a773[_0x4eeeee(0x19c)]){_0x25453e['goal']?.[_0x4eeeee(0x18d)]&&(_0x25453e[_0x4eeeee(0x1e6)][_0x4eeeee(0x18d)]=_0x3548b9(_0x25453e[_0x4eeeee(0x1e6)]['segment'])),_0x346349(_0x25453e[_0x4eeeee(0x15d)]);}_0x74a773[_0x4eeeee(0x15d)]&&_0x346349(_0x74a773[_0x4eeeee(0x15d)]);if(_0x74a773[_0x4eeeee(0x1e2)])for(const _0x5452fa of _0x74a773[_0x4eeeee(0x1e2)]){_0x346349(_0x5452fa[_0x4eeeee(0x15d)]);}}function collectActivationIdsFromJourney(_0x1ca1ae,_0x463ff1){const _0x5c9b79=a150_0x2222,_0x5f02bb=_0x388bc5=>{const _0x24ea26=a150_0x2222;for(const _0x28497d of _0x388bc5){if(_0x28497d[_0x24ea26(0x1ec)])for(const _0x54d3f0 of _0x28497d['steps']){if(_0x54d3f0[_0x24ea26(0x1d0)]===_0x24ea26(0x17a)){const _0x217fff=_0x54d3f0;_0x217fff[_0x24ea26(0x144)][_0x24ea26(0x17a)]&&/^\d+$/['test'](_0x217fff[_0x24ea26(0x144)][_0x24ea26(0x17a)])&&_0x463ff1[_0x24ea26(0x1ce)](_0x217fff[_0x24ea26(0x144)][_0x24ea26(0x17a)]);}}}};if(_0x1ca1ae[_0x5c9b79(0x19c)])for(const _0x5c87fb of _0x1ca1ae[_0x5c9b79(0x19c)]){_0x5f02bb(_0x5c87fb['stages']);}_0x1ca1ae[_0x5c9b79(0x15d)]&&_0x5f02bb(_0x1ca1ae[_0x5c9b79(0x15d)]);if(_0x1ca1ae[_0x5c9b79(0x1e2)])for(const _0x9a76d2 of _0x1ca1ae[_0x5c9b79(0x1e2)]){_0x5f02bb(_0x9a76d2['stages']);}}function replaceActivationIdsInJourney(_0x14b508,_0x3e9d8a){const _0x3add41=a150_0x2222,_0x5867c3=_0x569fe5=>_0x3e9d8a[_0x3add41(0x17e)](_0x569fe5)||_0x569fe5,_0x1cc3bb=_0x1261ef=>{const _0x2daecb=_0x3add41;for(const _0x1dc8fe of _0x1261ef){if(_0x1dc8fe[_0x2daecb(0x1ec)])for(const _0x28a8ac of _0x1dc8fe[_0x2daecb(0x1ec)]){if(_0x28a8ac[_0x2daecb(0x1d0)]===_0x2daecb(0x17a)){const _0x1337e8=_0x28a8ac;_0x1337e8[_0x2daecb(0x144)]['activation']&&(_0x1337e8[_0x2daecb(0x144)][_0x2daecb(0x17a)]=_0x5867c3(_0x1337e8['with']['activation']));}}}};if(_0x14b508['journeys'])for(const _0x4c4122 of _0x14b508[_0x3add41(0x19c)]){_0x1cc3bb(_0x4c4122[_0x3add41(0x15d)]);}_0x14b508[_0x3add41(0x15d)]&&_0x1cc3bb(_0x14b508['stages']);if(_0x14b508[_0x3add41(0x1e2)])for(const _0x3403b2 of _0x14b508[_0x3add41(0x1e2)]){_0x1cc3bb(_0x3403b2[_0x3add41(0x15d)]);}}function collectJumpTargetsFromJourney(_0x135018,_0x45ba73){const _0x161662=a150_0x2222,_0x387418=new Set(),_0x4abf8a=_0x236eb8=>{const _0x150ade=a150_0x2222;for(const _0x2d832f of _0x236eb8){if(_0x2d832f[_0x150ade(0x1ec)])for(const _0x20cb20 of _0x2d832f[_0x150ade(0x1ec)]){if(_0x20cb20['type']===_0x150ade(0x1c0)){const _0x43e107=_0x20cb20,_0x21b4e5=_0x43e107[_0x150ade(0x144)][_0x150ade(0x174)];if(_0x21b4e5[_0x150ade(0x12f)]&&_0x21b4e5['stage']&&/^\d+$/['test'](_0x21b4e5[_0x150ade(0x12f)])&&/^\d+$/[_0x150ade(0x1dd)](_0x21b4e5['stage'])){const _0x363282=_0x21b4e5[_0x150ade(0x12f)]+':'+_0x21b4e5[_0x150ade(0x1bf)];!_0x387418['has'](_0x363282)&&(_0x387418[_0x150ade(0x1ce)](_0x363282),_0x45ba73[_0x150ade(0x164)]({'journeyId':_0x21b4e5['journey'],'stageId':_0x21b4e5[_0x150ade(0x1bf)]}));}}}}};if(_0x135018[_0x161662(0x19c)])for(const _0x55fc37 of _0x135018[_0x161662(0x19c)]){_0x4abf8a(_0x55fc37['stages']);}_0x135018[_0x161662(0x15d)]&&_0x4abf8a(_0x135018[_0x161662(0x15d)]);if(_0x135018[_0x161662(0x1e2)])for(const _0x1da606 of _0x135018['versions']){_0x4abf8a(_0x1da606[_0x161662(0x15d)]);}}function replaceJumpTargetsInJourney(_0x5e2176,_0x43399a){const _0x42a8e7=a150_0x2222,_0x5bfffe=_0x43de47=>{const _0x4994c6=a150_0x2222;for(const _0x4f5bcd of _0x43de47){if(_0x4f5bcd['steps'])for(const _0x166739 of _0x4f5bcd['steps']){if(_0x166739[_0x4994c6(0x1d0)]==='jump'){const _0x1295f6=_0x166739,_0x33aa07=_0x1295f6['with'][_0x4994c6(0x174)],_0x43a4f8=_0x33aa07[_0x4994c6(0x12f)]+':'+_0x33aa07[_0x4994c6(0x1bf)],_0x52656b=_0x43399a['get'](_0x43a4f8);_0x52656b&&(_0x33aa07[_0x4994c6(0x12f)]=_0x52656b[_0x4994c6(0x1d4)],_0x33aa07[_0x4994c6(0x1bf)]=_0x52656b[_0x4994c6(0x1cb)]);}}}};if(_0x5e2176['journeys'])for(const _0x473046 of _0x5e2176['journeys']){_0x5bfffe(_0x473046[_0x42a8e7(0x15d)]);}_0x5e2176['stages']&&_0x5bfffe(_0x5e2176['stages']);if(_0x5e2176[_0x42a8e7(0x1e2)])for(const _0x1e60ab of _0x5e2176['versions']){_0x5bfffe(_0x1e60ab[_0x42a8e7(0x15d)]);}}function generateReadableStepName(_0x28ff65,_0x212277){const _0x472fa3=a150_0x2222;if(_0x28ff65[_0x472fa3(0x1e5)]&&_0x28ff65[_0x472fa3(0x1e5)]!==_0x28ff65[_0x472fa3(0x1d0)]){const _0x14a12f=_0x28ff65[_0x472fa3(0x1e5)][_0x472fa3(0x159)]();if(_0x14a12f&&/[a-z0-9\p{L}]/iu[_0x472fa3(0x1dd)](_0x14a12f))return _0x14a12f;}const _0x243455=_0x28ff65['type'][_0x472fa3(0x182)]()['replace'](/step$/i,'');return _0x243455+'_'+(_0x212277+0x1);}function getStepNextRefs(_0x618cf0){const _0x1f3488=a150_0x2222,_0x56c15b=[];if(_0x618cf0['next'])_0x56c15b['push'](_0x618cf0[_0x1f3488(0x175)]);if(_0x618cf0[_0x1f3488(0x14d)])for(const _0x1af4d9 of _0x618cf0[_0x1f3488(0x14d)]){if(_0x1af4d9[_0x1f3488(0x175)])_0x56c15b['push'](_0x1af4d9[_0x1f3488(0x175)]);}if(_0x618cf0[_0x1f3488(0x17b)])for(const _0x24f534 of _0x618cf0['variants']){if(_0x24f534[_0x1f3488(0x175)])_0x56c15b[_0x1f3488(0x164)](_0x24f534['next']);}if(_0x618cf0[_0x1f3488(0x163)])for(const _0x4ed932 of _0x618cf0[_0x1f3488(0x163)]){if(_0x4ed932[_0x1f3488(0x175)])_0x56c15b[_0x1f3488(0x164)](_0x4ed932[_0x1f3488(0x175)]);}return _0x56c15b;}function parseJumpTargetDisplayName(_0x300374){const _0x1818f4=a150_0x2222,_0x3697d2=_0x300374[_0x1818f4(0x17d)](/^(.+?)\s*\(([^/)]+)/);if(!_0x3697d2)return undefined;const _0xd7dc7=_0x3697d2[0x1][_0x1818f4(0x159)](),_0x29e213=_0x3697d2[0x2][_0x1818f4(0x159)]();if(!_0xd7dc7||!_0x29e213)return undefined;return{'stageName':_0xd7dc7,'journeyName':_0x29e213};}function a150_0x2222(_0x2f6cca,_0x55bd14){_0x2f6cca=_0x2f6cca-0x12c;const _0x373f17=a150_0x373f();let _0x222213=_0x373f17[_0x2f6cca];return _0x222213;}function orderStepsFromRoot(_0x2ba115,_0x3d6be7){const _0x1ab06f=a150_0x2222,_0x2d0a48=Object[_0x1ab06f(0x156)](_0x2ba115);if(_0x2d0a48[_0x1ab06f(0x1e0)]===0x0)return[];const _0x1e3c03=new Set(_0x2d0a48['map'](([_0x26a1ee])=>_0x26a1ee)),_0x1cec49=new Set();for(const [,_0x5e5203]of _0x2d0a48){for(const _0x43fac1 of getStepNextRefs(_0x5e5203)){if(_0x1e3c03[_0x1ab06f(0x141)](_0x43fac1))_0x1cec49[_0x1ab06f(0x1ce)](_0x43fac1);}}let _0x180f7d=_0x3d6be7&&_0x1e3c03[_0x1ab06f(0x141)](_0x3d6be7)?_0x3d6be7:undefined;if(!_0x180f7d){const _0x11354b=_0x2d0a48['filter'](([_0x5834bd])=>!_0x1cec49['has'](_0x5834bd));_0x11354b[_0x1ab06f(0x1e0)]>0x0?_0x180f7d=_0x11354b[0x0][0x0]:_0x180f7d=_0x2d0a48[0x0][0x0];}const _0x242d14=[],_0x55a9f7=new Set(),_0x1ba61a=[_0x180f7d];while(_0x1ba61a[_0x1ab06f(0x1e0)]>0x0){const _0xf0c762=_0x1ba61a[_0x1ab06f(0x146)]();if(_0x55a9f7[_0x1ab06f(0x141)](_0xf0c762))continue;_0x55a9f7[_0x1ab06f(0x1ce)](_0xf0c762);const _0x5f2a63=_0x2ba115[_0xf0c762];if(!_0x5f2a63)continue;_0x242d14[_0x1ab06f(0x164)]({'uuid':_0xf0c762,'step':_0x5f2a63});for(const _0x33faef of getStepNextRefs(_0x5f2a63)){_0x1e3c03[_0x1ab06f(0x141)](_0x33faef)&&!_0x55a9f7[_0x1ab06f(0x141)](_0x33faef)&&_0x1ba61a[_0x1ab06f(0x164)](_0x33faef);}}for(const [_0xa738e3,_0x42e324]of _0x2d0a48){!_0x55a9f7[_0x1ab06f(0x141)](_0xa738e3)&&_0x242d14[_0x1ab06f(0x164)]({'uuid':_0xa738e3,'step':_0x42e324});}return _0x242d14;}function resolveStepReferences(_0x5eedbf,_0x191258,_0x5f3fd8,_0x272af7){const _0x408596=a150_0x2222;if(_0x5eedbf[_0x408596(0x1d0)]!==_0x408596(0x14c)){_0x5eedbf[_0x408596(0x175)]&&_0x272af7[_0x408596(0x141)](_0x5eedbf[_0x408596(0x175)])&&(_0x5eedbf[_0x408596(0x175)]=_0x272af7['get'](_0x5eedbf['next']));const _0xdc3758=_0x191258+0x1;if(_0xdc3758<_0x5f3fd8[_0x408596(0x1e0)]){const _0x585772=_0x272af7[_0x408596(0x17e)](_0x5f3fd8[_0xdc3758]['uuid']);_0x5eedbf[_0x408596(0x175)]===_0x585772&&delete _0x5eedbf[_0x408596(0x175)];}}if(_0x5eedbf['type']===_0x408596(0x161))for(const _0x518b62 of _0x5eedbf['with'][_0x408596(0x14d)]){_0x518b62[_0x408596(0x175)]&&_0x272af7[_0x408596(0x141)](_0x518b62['next'])&&(_0x518b62[_0x408596(0x175)]=_0x272af7[_0x408596(0x17e)](_0x518b62[_0x408596(0x175)]));}if(_0x5eedbf[_0x408596(0x1d0)]===_0x408596(0x1e1))for(const _0xf3dfe3 of _0x5eedbf[_0x408596(0x144)][_0x408596(0x17b)]){_0xf3dfe3['next']&&_0x272af7[_0x408596(0x141)](_0xf3dfe3[_0x408596(0x175)])&&(_0xf3dfe3[_0x408596(0x175)]=_0x272af7['get'](_0xf3dfe3[_0x408596(0x175)]));}if(_0x5eedbf['type']==='wait'&&_0x5eedbf[_0x408596(0x144)][_0x408596(0x136)]){const _0x37bd1f=_0x5eedbf[_0x408596(0x144)][_0x408596(0x136)];_0x37bd1f['next']&&_0x272af7[_0x408596(0x141)](_0x37bd1f[_0x408596(0x175)])&&(_0x37bd1f[_0x408596(0x175)]=_0x272af7[_0x408596(0x17e)](_0x37bd1f[_0x408596(0x175)])),_0x37bd1f[_0x408596(0x176)]?.[_0x408596(0x175)]&&_0x272af7[_0x408596(0x141)](_0x37bd1f['timeout']['next'])&&(_0x37bd1f['timeout'][_0x408596(0x175)]=_0x272af7['get'](_0x37bd1f[_0x408596(0x176)][_0x408596(0x175)]));}}function convertApiStageToYaml(_0x2aad64){const _0x5a0941=a150_0x2222,_0x319036={'name':_0x2aad64[_0x5a0941(0x1e5)]};_0x2aad64['id']&&(_0x319036['id']=_0x2aad64['id']);_0x2aad64[_0x5a0941(0x172)]&&(_0x319036[_0x5a0941(0x172)]=_0x2aad64[_0x5a0941(0x172)]);_0x2aad64['entryCriteria']&&(_0x319036[_0x5a0941(0x1db)]=convertApiCriteriaToYaml(_0x2aad64[_0x5a0941(0x1ca)]));_0x2aad64[_0x5a0941(0x13d)]&&_0x2aad64[_0x5a0941(0x13d)][_0x5a0941(0x1e0)]>0x0&&(_0x319036['exit_criteria']=_0x2aad64[_0x5a0941(0x13d)][_0x5a0941(0x13b)](convertApiCriteriaToYaml));_0x2aad64['milestone']&&(_0x319036[_0x5a0941(0x1c2)]=convertApiCriteriaToYaml(_0x2aad64[_0x5a0941(0x1c2)]));if(_0x2aad64[_0x5a0941(0x1ec)]&&Object['keys'](_0x2aad64[_0x5a0941(0x1ec)])['length']>0x0){const _0x4e42e7=orderStepsFromRoot(_0x2aad64[_0x5a0941(0x1ec)],_0x2aad64['rootStep']),_0xf6e7a9=new Map(),_0x1ecc3b=new Set();for(let _0x322822=0x0;_0x322822<_0x4e42e7[_0x5a0941(0x1e0)];_0x322822++){const {uuid:_0x12a819,step:_0x21f244}=_0x4e42e7[_0x322822];let _0x38cd0e=generateReadableStepName(_0x21f244,_0x322822),_0x1780a2=_0x38cd0e,_0x314aad=0x2;while(_0x1ecc3b[_0x5a0941(0x141)](_0x1780a2)){_0x1780a2=_0x38cd0e+'_'+_0x314aad,_0x314aad++;}_0x1ecc3b[_0x5a0941(0x1ce)](_0x1780a2),_0xf6e7a9[_0x5a0941(0x13a)](_0x12a819,_0x1780a2);}_0x319036[_0x5a0941(0x1ec)]=_0x4e42e7[_0x5a0941(0x13b)](({uuid:_0x68ca50,step:_0x2f607b},_0x3a4292)=>{const _0x4c737d=_0x5a0941,_0x3059d4=convertApiStepToYaml(_0x2f607b,_0xf6e7a9[_0x4c737d(0x17e)](_0x68ca50));return resolveStepReferences(_0x3059d4,_0x3a4292,_0x4e42e7,_0xf6e7a9),_0x3059d4;});}return _0x319036;}function convertApiCriteriaToYaml(_0x1b1484){const _0x59f6f8=a150_0x2222,_0x3cedb7={'name':_0x1b1484['name'],'segment':_0x1b1484['segmentId']};_0x1b1484['description']&&(_0x3cedb7[_0x59f6f8(0x172)]=_0x1b1484[_0x59f6f8(0x172)]);if(_0x1b1484[_0x59f6f8(0x174)]){let _0xd03a28=_0x1b1484[_0x59f6f8(0x174)][_0x59f6f8(0x1ab)],_0xed9078=_0x1b1484[_0x59f6f8(0x174)][_0x59f6f8(0x189)];if(_0x1b1484['target'][_0x59f6f8(0x1d4)]){const _0x21176c=parseJumpTargetDisplayName(_0x1b1484[_0x59f6f8(0x174)][_0x59f6f8(0x1d4)]);_0x21176c&&(_0xed9078=_0x21176c[_0x59f6f8(0x1cb)],_0xd03a28=_0x21176c['journeyName']);}_0x3cedb7[_0x59f6f8(0x174)]={'journey':_0xd03a28,'stage':_0xed9078},_0x1b1484['target']['journeyBundleId']&&(_0x3cedb7[_0x59f6f8(0x174)][_0x59f6f8(0x169)]=_0x1b1484[_0x59f6f8(0x174)]['journeyBundleId']);}return _0x3cedb7;}function convertApiStepToYaml(_0x427156,_0x138e49){const _0x251216=a150_0x2222;switch(_0x427156[_0x251216(0x1d0)]){case'WaitStep':{const _0x55d1d5={};if(_0x427156[_0x251216(0x194)]===_0x251216(0x160)&&_0x427156[_0x251216(0x142)]!==undefined)_0x55d1d5[_0x251216(0x192)]=_0x427156[_0x251216(0x142)],_0x55d1d5[_0x251216(0x1c6)]=_0x427156[_0x251216(0x137)];else{if(_0x427156[_0x251216(0x194)]==='Date'&&_0x427156['waitUntilDate'])_0x55d1d5['wait_until']=_0x427156['waitUntilDate'];else{if(_0x427156['waitStepType']==='DaysOfTheWeek'&&_0x427156[_0x251216(0x1c9)])_0x55d1d5[_0x251216(0x197)]=_0x427156[_0x251216(0x1c9)];else{if(_0x427156[_0x251216(0x194)]===_0x251216(0x1a4)){if(_0x427156[_0x251216(0x163)]&&_0x427156[_0x251216(0x163)]['length']>0x0){const _0x4f5ce9=_0x427156[_0x251216(0x163)][_0x251216(0x1d1)](_0xf62a8b=>!_0xf62a8b[_0x251216(0x173)]),_0x13618c=_0x427156[_0x251216(0x163)][_0x251216(0x1d1)](_0x36b30f=>_0x36b30f[_0x251216(0x173)]);_0x4f5ce9?.['segmentId']&&(_0x55d1d5[_0x251216(0x136)]={'segment':_0x4f5ce9[_0x251216(0x131)],..._0x4f5ce9['next']?{'next':_0x4f5ce9[_0x251216(0x175)]}:{}},_0x13618c&&_0x13618c[_0x251216(0x1b5)]!==undefined&&_0x13618c['unit']&&(_0x55d1d5[_0x251216(0x136)][_0x251216(0x176)]={'duration':_0x13618c[_0x251216(0x1b5)],'unit':_0x13618c['unit'],..._0x13618c['next']?{'next':_0x13618c[_0x251216(0x175)]}:{}}));}else _0x427156[_0x251216(0x1d2)]&&(_0x55d1d5[_0x251216(0x136)]={'segment':_0x427156['conditionSegmentId']},_0x427156[_0x251216(0x181)]!==undefined&&_0x427156[_0x251216(0x155)]&&(_0x55d1d5[_0x251216(0x136)]['timeout']={'duration':_0x427156['conditionTimeoutDuration'],'unit':_0x427156[_0x251216(0x155)]}));}}}}const _0x13337e={'type':_0x251216(0x12d),'name':_0x138e49,..._0x427156['next']?{'next':_0x427156[_0x251216(0x175)]}:{},'with':_0x55d1d5};return _0x13337e;}case _0x251216(0x1da):{const _0x4b77f4={'type':_0x251216(0x17a),'name':_0x138e49,..._0x427156[_0x251216(0x175)]?{'next':_0x427156[_0x251216(0x175)]}:{},'with':{'activation':_0x427156[_0x251216(0x1cf)]||''}};return _0x4b77f4;}case _0x251216(0x1a6):{const _0x291f8f={'type':_0x251216(0x161),'name':_0x138e49,..._0x427156[_0x251216(0x175)]?{'next':_0x427156[_0x251216(0x175)]}:{},'with':{'branches':(_0x427156['branches']||[])[_0x251216(0x13b)](_0x3aabda=>({'name':_0x3aabda[_0x251216(0x1e5)],'segment':_0x3aabda['segmentId'],'excluded':_0x3aabda['excludedPath'],..._0x3aabda[_0x251216(0x175)]?{'next':_0x3aabda['next']}:{}}))}};return _0x291f8f;}case'ABTest':case'AbTest':case _0x251216(0x1b4):{const _0x42061f=_0x427156['variants']||(_0x427156[_0x251216(0x14d)]||[])[_0x251216(0x13b)](_0x340fcd=>({'name':_0x340fcd[_0x251216(0x1e5)],'percentage':0x0,'next':_0x340fcd[_0x251216(0x175)]})),_0x5e6725={'type':_0x251216(0x1e1),'name':_0x138e49,..._0x427156[_0x251216(0x175)]?{'next':_0x427156[_0x251216(0x175)]}:{},'with':{'customized_split':_0x427156[_0x251216(0x177)],'unique_id':_0x427156[_0x251216(0x1b9)],'variants':_0x42061f[_0x251216(0x13b)](_0x3fd634=>({'name':_0x3fd634[_0x251216(0x1e5)],'percentage':_0x3fd634[_0x251216(0x1ba)],..._0x3fd634['next']?{'next':_0x3fd634[_0x251216(0x175)]}:{}}))}};return _0x5e6725;}case _0x251216(0x185):{const _0x1ae358={'type':_0x251216(0x1a0),'name':_0x138e49,..._0x427156['next']?{'next':_0x427156[_0x251216(0x175)]}:{}};return _0x1ae358;}case'Jump':{let _0x3dc91f='',_0x2985a8='',_0x742a4a;if(_0x427156[_0x251216(0x174)]){_0x3dc91f=_0x427156[_0x251216(0x174)][_0x251216(0x1ab)],_0x2985a8=_0x427156[_0x251216(0x174)][_0x251216(0x189)],_0x742a4a=_0x427156[_0x251216(0x174)]['journeyBundleId'];if(_0x427156[_0x251216(0x174)][_0x251216(0x1d4)]){const _0x3566d1=parseJumpTargetDisplayName(_0x427156[_0x251216(0x174)]['journeyName']);_0x3566d1&&(_0x2985a8=_0x3566d1['stageName'],_0x3dc91f=_0x3566d1[_0x251216(0x1d4)]);}}const _0x29d9c8={'type':'jump','name':_0x138e49,..._0x427156['next']?{'next':_0x427156[_0x251216(0x175)]}:{},'with':{'target':{'journey':_0x3dc91f,'stage':_0x2985a8,..._0x742a4a?{'bundle_id':_0x742a4a}:{}}}};return _0x29d9c8;}case'End':{const _0x3584df={'type':_0x251216(0x14c),'name':_0x138e49};return _0x3584df;}default:{const _0x9f0cb1={'type':_0x251216(0x14c),'name':_0x138e49};return _0x9f0cb1;}}}export async function journeyDefToRequest(_0x36a8f5,_0x2cf21c,_0x4559ad){const _0x2a8c70=a150_0x2222,_0x419db5=_0x36a8f5[_0x2a8c70(0x15d)]||getActiveStages(_0x36a8f5),_0x5331cf=isJourneysArrayMode(_0x36a8f5)||isMultiVersionMode(_0x36a8f5)?getLatestJourneyEntry(_0x36a8f5):undefined,_0x3b43be=_0x5331cf?.[_0x2a8c70(0x140)]??_0x36a8f5[_0x2a8c70(0x1e5)],_0x2d0336=_0x36a8f5[_0x2a8c70(0x1bd)]||{},_0x57a9f6=_0x36a8f5['activations']||{},_0x2d8059={'type':'journey','attributes':{'name':_0x3b43be,'audienceId':_0x2cf21c,'journeyStages':await Promise['all'](_0x419db5[_0x2a8c70(0x13b)](_0x3feda7=>convertYamlStageToApi(_0x3feda7,_0x4559ad,_0x2d0336,_0x57a9f6)))}},_0x2c37ec=_0x5331cf?.['id']??_0x36a8f5['id'];_0x2c37ec&&(_0x2d8059['id']=_0x2c37ec);_0x36a8f5[_0x2a8c70(0x172)]&&(_0x2d8059['attributes']['description']=_0x36a8f5['description']);const _0x3e712d=getEffectiveGoal(_0x36a8f5);_0x3e712d&&(_0x2d8059['attributes'][_0x2a8c70(0x1e6)]=await convertYamlCriteriaToApi(_0x3e712d,_0x4559ad,_0x2d0336));const _0x4efd56=getEffectiveReentry(_0x36a8f5);return _0x4efd56&&(_0x2d8059[_0x2a8c70(0x1c5)][_0x2a8c70(0x154)]=_0x4efd56,_0x2d8059['attributes']['allowReentry']=_0x4efd56!==_0x2a8c70(0x19e)),_0x36a8f5['folder_id']&&(_0x2d8059['relationships']={'parentFolder':{'data':{'id':_0x36a8f5[_0x2a8c70(0x191)],'type':_0x2a8c70(0x133)}}}),_0x2d8059;}async function convertYamlStageToApi(_0x1c7bf1,_0x35c286,_0x301633={},_0x4991ad={}){const _0x35944c=a150_0x2222,_0x82d11c={'name':_0x1c7bf1[_0x35944c(0x1e5)]};_0x1c7bf1['id']&&(_0x82d11c['id']=_0x1c7bf1['id']);_0x1c7bf1['description']&&(_0x82d11c['description']=_0x1c7bf1['description']);_0x1c7bf1[_0x35944c(0x1db)]&&(_0x82d11c[_0x35944c(0x1ca)]=await convertYamlCriteriaToApi(_0x1c7bf1['entry_criteria'],_0x35c286,_0x301633));_0x1c7bf1[_0x35944c(0x14e)]&&_0x1c7bf1[_0x35944c(0x14e)][_0x35944c(0x1e0)]>0x0&&(_0x82d11c[_0x35944c(0x13d)]=await Promise[_0x35944c(0x180)](_0x1c7bf1[_0x35944c(0x14e)][_0x35944c(0x13b)](_0x5d5592=>convertYamlCriteriaToApi(_0x5d5592,_0x35c286,_0x301633))));_0x1c7bf1[_0x35944c(0x1c2)]&&(_0x82d11c['milestone']=await convertYamlCriteriaToApi(_0x1c7bf1[_0x35944c(0x1c2)],_0x35c286,_0x301633));if(_0x1c7bf1[_0x35944c(0x1ec)]&&_0x1c7bf1[_0x35944c(0x1ec)]['length']>0x0){const _0x1abd4e={},_0x1cf99a=_0x1c7bf1[_0x35944c(0x1ec)][_0x35944c(0x13b)]((_0x42419f,_0x2165fa)=>{const _0x17adcc=_0x35944c,_0x8bef88=_0x42419f[_0x17adcc(0x178)]||generateUUID(),_0x1fd9e5=_0x42419f[_0x17adcc(0x1e5)]||_0x42419f[_0x17adcc(0x1d0)]+'_'+_0x2165fa;return _0x1abd4e[_0x1fd9e5]=_0x8bef88,{..._0x42419f,'name':_0x1fd9e5};});_0x82d11c[_0x35944c(0x130)]=_0x1abd4e[_0x1cf99a[0x0][_0x35944c(0x1e5)]],_0x82d11c[_0x35944c(0x1ec)]={};for(let _0xb13943=0x0;_0xb13943<_0x1cf99a['length'];_0xb13943++){const _0x42c1ae=_0x1cf99a[_0xb13943],_0x17c9a5=_0x1abd4e[_0x42c1ae[_0x35944c(0x1e5)]],_0x34f33d=!_0x42c1ae['next']&&_0xb13943<_0x1cf99a[_0x35944c(0x1e0)]-0x1&&_0x42c1ae[_0x35944c(0x1d0)]!==_0x35944c(0x14c)?_0x1cf99a[_0xb13943+0x1][_0x35944c(0x1e5)]:_0x42c1ae[_0x35944c(0x175)],_0x423da4=_0x34f33d!==_0x42c1ae[_0x35944c(0x175)]?{..._0x42c1ae,'next':_0x34f33d}:_0x42c1ae;_0x82d11c['steps'][_0x17c9a5]=await convertYamlStepToApi(_0x423da4,_0x35c286,_0x301633,_0x1abd4e,_0x4991ad);}}else _0x1c7bf1[_0x35944c(0x1c7)]&&(_0x82d11c[_0x35944c(0x130)]=_0x1c7bf1[_0x35944c(0x1c7)]);return _0x82d11c;}async function convertYamlCriteriaToApi(_0x35eb5d,_0x10082e,_0x227139={}){const _0x2ce3aa=a150_0x2222;let _0x5cb0f4=_0x35eb5d['segment'];if(_0x5cb0f4&&!/^\d+$/[_0x2ce3aa(0x1dd)](_0x5cb0f4)){const _0x101608=parseSegmentRef(_0x5cb0f4);if(_0x101608[_0x2ce3aa(0x1d0)]===_0x2ce3aa(0x18b))_0x10082e?.[_0x2ce3aa(0x145)]&&(_0x5cb0f4=await _0x10082e[_0x2ce3aa(0x145)](_0x101608[_0x2ce3aa(0x1e5)]));else{if(_0x101608['type']===_0x2ce3aa(0x16a)&&_0x227139[_0x101608[_0x2ce3aa(0x1e5)]])_0x10082e?.[_0x2ce3aa(0x167)]&&(_0x5cb0f4=await _0x10082e['resolveEmbeddedSegmentId'](_0x101608[_0x2ce3aa(0x1e5)],_0x227139[_0x101608[_0x2ce3aa(0x1e5)]]));else _0x10082e?.[_0x2ce3aa(0x145)]&&(_0x5cb0f4=await _0x10082e[_0x2ce3aa(0x145)](_0x101608[_0x2ce3aa(0x1e5)]));}}const _0x36fc54={'name':_0x35eb5d['name'],'segmentId':_0x5cb0f4};_0x35eb5d[_0x2ce3aa(0x172)]&&(_0x36fc54[_0x2ce3aa(0x172)]=_0x35eb5d[_0x2ce3aa(0x172)]);if(_0x35eb5d[_0x2ce3aa(0x174)]){const _0x3331b6=_0x35eb5d[_0x2ce3aa(0x174)][_0x2ce3aa(0x12f)],_0x4ea970=_0x35eb5d[_0x2ce3aa(0x174)][_0x2ce3aa(0x1bf)];let _0x320159=_0x35eb5d['target'][_0x2ce3aa(0x12f)];_0x10082e?.[_0x2ce3aa(0x1ad)]&&!/^\d+$/[_0x2ce3aa(0x1dd)](_0x320159)&&(_0x320159=await _0x10082e[_0x2ce3aa(0x1ad)](_0x320159));let _0x41e843=_0x35eb5d[_0x2ce3aa(0x174)]['stage'];_0x10082e?.[_0x2ce3aa(0x1de)]&&!/^\d+$/[_0x2ce3aa(0x1dd)](_0x41e843)&&(_0x41e843=await _0x10082e[_0x2ce3aa(0x1de)](_0x320159,_0x41e843));const _0x4abd31=!/^\d+$/[_0x2ce3aa(0x1dd)](_0x3331b6)&&!isLocalJourneyRef(_0x3331b6)?formatApiJourneyName(_0x3331b6,_0x4ea970):undefined;_0x36fc54['target']={'journeyId':_0x320159,'journeyStageId':_0x41e843,'journeyName':_0x4abd31,'confirmed':!![]},_0x35eb5d[_0x2ce3aa(0x174)][_0x2ce3aa(0x169)]&&(_0x36fc54[_0x2ce3aa(0x174)]['journeyBundleId']=_0x35eb5d[_0x2ce3aa(0x174)][_0x2ce3aa(0x169)]);}return _0x36fc54;}async function convertYamlStepToApi(_0x4d6b85,_0xe02ec2,_0x4ad8ee={},_0x1dd2e2={},_0xaa5ef5={}){const _0x498eae=a150_0x2222,_0x17ff90=async _0x2137a3=>{const _0x43812e=a150_0x2222;if(/^\d+$/[_0x43812e(0x1dd)](_0x2137a3))return _0x2137a3;const _0x39b808=parseSegmentRef(_0x2137a3);if(_0x39b808[_0x43812e(0x1d0)]===_0x43812e(0x18b)){if(_0xe02ec2?.[_0x43812e(0x145)])return await _0xe02ec2[_0x43812e(0x145)](_0x39b808['name']);}else{if(_0x39b808['type']==='embedded'&&_0x4ad8ee[_0x39b808[_0x43812e(0x1e5)]]){if(_0xe02ec2?.[_0x43812e(0x167)])return await _0xe02ec2[_0x43812e(0x167)](_0x39b808['name'],_0x4ad8ee[_0x39b808[_0x43812e(0x1e5)]]);}else{if(_0xe02ec2?.[_0x43812e(0x145)])return await _0xe02ec2[_0x43812e(0x145)](_0x39b808[_0x43812e(0x1e5)]);}}return _0x2137a3;},_0x4e2caf=async _0x1434a7=>{const _0x4ba770=a150_0x2222;if(/^\d+$/[_0x4ba770(0x1dd)](_0x1434a7))return _0x1434a7;const _0x26263d=parseSegmentRef(_0x1434a7);if(_0x26263d['type']===_0x4ba770(0x18b)){if(_0xe02ec2?.[_0x4ba770(0x166)])return await _0xe02ec2[_0x4ba770(0x166)](_0x26263d[_0x4ba770(0x1e5)]);return _0x26263d[_0x4ba770(0x1e5)];}else{if(_0x26263d[_0x4ba770(0x1d0)]===_0x4ba770(0x16a)&&_0xaa5ef5[_0x26263d[_0x4ba770(0x1e5)]]){if(_0xe02ec2?.[_0x4ba770(0x139)])return await _0xe02ec2[_0x4ba770(0x139)](_0x26263d['name'],_0xaa5ef5[_0x26263d[_0x4ba770(0x1e5)]]);if(_0xe02ec2?.[_0x4ba770(0x166)])return await _0xe02ec2[_0x4ba770(0x166)](_0x26263d[_0x4ba770(0x1e5)]);}else{if(_0xe02ec2?.['resolveActivationId'])return await _0xe02ec2[_0x4ba770(0x166)](_0x26263d[_0x4ba770(0x1e5)]);}}return _0x1434a7;},_0x2ac8de=_0x522cec=>{const _0x1ea6cb=a150_0x2222;if(!_0x522cec)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x1ea6cb(0x1dd)](_0x522cec))return _0x522cec;return _0x1dd2e2[_0x522cec]||_0x522cec;};switch(_0x4d6b85[_0x498eae(0x1d0)]){case _0x498eae(0x12d):{const _0x714b96=_0x4d6b85,_0x278352=_0x714b96[_0x498eae(0x144)],_0x526213={'type':'WaitStep','name':_0x714b96[_0x498eae(0x1e5)],'next':_0x2ac8de(_0x714b96[_0x498eae(0x175)])};if(_0x278352['duration']!==undefined&&_0x278352[_0x498eae(0x1c6)])_0x526213[_0x498eae(0x194)]='Duration',_0x526213[_0x498eae(0x142)]=_0x278352[_0x498eae(0x192)],_0x526213[_0x498eae(0x137)]=normalizeWaitUnit(_0x278352['unit']);else{if(_0x278352[_0x498eae(0x199)])_0x526213[_0x498eae(0x194)]='Date',_0x526213['waitUntilDate']=_0x278352[_0x498eae(0x199)];else{if(_0x278352['days_of_week'])_0x526213[_0x498eae(0x194)]=_0x498eae(0x18c),_0x526213['daysOfWeek']=_0x278352[_0x498eae(0x197)];else{if(_0x278352[_0x498eae(0x136)]){_0x526213[_0x498eae(0x194)]=_0x498eae(0x1a4);const _0x48e0eb=await _0x17ff90(_0x278352['condition']['segment']),_0x3a5a78=_0x278352[_0x498eae(0x136)][_0x498eae(0x176)]?.[_0x498eae(0x175)]!==undefined;if(_0x3a5a78){const _0x5d6e19=[];_0x5d6e19['push']({'id':generateUUID(),'segmentId':_0x48e0eb,'timedOutPath':![],'name':_0x498eae(0x18f),'next':_0x2ac8de(_0x278352[_0x498eae(0x136)]['next']??_0x714b96[_0x498eae(0x175)])});if(_0x278352[_0x498eae(0x136)][_0x498eae(0x176)]){const _0x20e81b=_0x278352[_0x498eae(0x136)]['timeout'][_0x498eae(0x192)],_0x4cb4f6=normalizeWaitUnit(_0x278352['condition'][_0x498eae(0x176)][_0x498eae(0x1c6)]);_0x5d6e19[_0x498eae(0x164)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x498eae(0x198)+_0x20e81b+'\x20'+_0x4cb4f6,'moveAfter':_0x20e81b,'unit':_0x4cb4f6,'next':_0x2ac8de(_0x278352[_0x498eae(0x136)]['timeout'][_0x498eae(0x175)])});}_0x526213[_0x498eae(0x163)]=_0x5d6e19,delete _0x526213[_0x498eae(0x175)];}else _0x526213[_0x498eae(0x1d2)]=_0x48e0eb,_0x278352['condition'][_0x498eae(0x176)]&&(_0x526213[_0x498eae(0x181)]=_0x278352[_0x498eae(0x136)][_0x498eae(0x176)][_0x498eae(0x192)],_0x278352[_0x498eae(0x136)]['timeout'][_0x498eae(0x1c6)]&&(_0x526213[_0x498eae(0x155)]=normalizeWaitUnit(_0x278352[_0x498eae(0x136)]['timeout'][_0x498eae(0x1c6)])));}}}}return _0x526213;}case _0x498eae(0x17a):{const _0x582370=_0x4d6b85,_0x582474=_0x582370['with']['activation'],_0x2054f2=await _0x4e2caf(_0x582474);return{'type':_0x498eae(0x1da),'name':_0x582370[_0x498eae(0x1e5)],'journeyActivationStepId':_0x2054f2,'next':_0x2ac8de(_0x582370[_0x498eae(0x175)])};}case _0x498eae(0x161):{const _0x5be6cb=_0x4d6b85,_0x40f6d1=_0x5be6cb[_0x498eae(0x144)][_0x498eae(0x14d)];return{'type':_0x498eae(0x1a6),'name':_0x5be6cb['name'],'branches':await Promise[_0x498eae(0x180)](_0x40f6d1[_0x498eae(0x13b)](async _0xfdbe80=>{const _0x4eaafc=_0x498eae;let _0x54971f='';if(!_0xfdbe80['excluded']){const _0x18113d=_0xfdbe80[_0x4eaafc(0x18d)]||_0xfdbe80['segment_id']||'';_0x54971f=_0x18113d?await _0x17ff90(_0x18113d):'';}return{'id':crypto[_0x4eaafc(0x1e4)](),'name':_0xfdbe80[_0x4eaafc(0x1e5)],'description':null,'segmentId':_0x54971f,'excludedPath':_0xfdbe80[_0x4eaafc(0x153)]??![],'next':_0x2ac8de(_0xfdbe80[_0x4eaafc(0x175)])};})),'next':_0x2ac8de(_0x5be6cb[_0x498eae(0x175)])};}case _0x498eae(0x1e1):{const _0x3f2f3b=_0x4d6b85,_0x4ff845=_0x3f2f3b[_0x498eae(0x144)];return{'type':_0x498eae(0x150),'name':_0x3f2f3b[_0x498eae(0x1e5)],'customizedSplit':_0x4ff845[_0x498eae(0x1aa)],'uniqueId':_0x4ff845['unique_id'],'variants':_0x4ff845['variants'][_0x498eae(0x13b)](_0x369de0=>({'id':_0x369de0['id']||generateUUID(),'name':_0x369de0[_0x498eae(0x1e5)],'percentage':_0x369de0['percentage'],'next':_0x2ac8de(_0x369de0[_0x498eae(0x175)])})),'next':_0x2ac8de(_0x3f2f3b[_0x498eae(0x175)])};}case _0x498eae(0x1a0):return{'type':_0x498eae(0x185),'name':_0x4d6b85[_0x498eae(0x1e5)],'next':_0x2ac8de(_0x4d6b85[_0x498eae(0x175)])};case _0x498eae(0x1c0):{const _0x5a7a59=_0x4d6b85,_0x2dac4f=_0x5a7a59[_0x498eae(0x144)][_0x498eae(0x174)],_0x1730fe=_0x2dac4f[_0x498eae(0x12f)],_0x5d1764=_0x2dac4f['stage'];let _0x445c0a=_0x2dac4f['journey'];_0xe02ec2?.[_0x498eae(0x1ad)]&&!/^\d+$/[_0x498eae(0x1dd)](_0x445c0a)&&(_0x445c0a=await _0xe02ec2[_0x498eae(0x1ad)](_0x445c0a));let _0x4f7239=_0x2dac4f[_0x498eae(0x1bf)];_0xe02ec2?.['resolveStageId']&&!/^\d+$/['test'](_0x4f7239)&&(_0x4f7239=await _0xe02ec2['resolveStageId'](_0x445c0a,_0x4f7239));const _0x57786e=!/^\d+$/['test'](_0x1730fe)&&!isLocalJourneyRef(_0x1730fe)?formatApiJourneyName(_0x1730fe,_0x5d1764):undefined;return{'type':'Jump','name':_0x5a7a59[_0x498eae(0x1e5)],'target':{'journeyId':_0x445c0a,'journeyStageId':_0x4f7239,'journeyBundleId':_0x2dac4f[_0x498eae(0x169)],'journeyName':_0x57786e,'confirmed':!![]},'next':_0x2ac8de(_0x5a7a59['next'])};}case _0x498eae(0x14c):return{'type':_0x498eae(0x1c8),'name':_0x4d6b85[_0x498eae(0x1e5)]};default:{const _0x65f354=_0x4d6b85;return{'type':_0x498eae(0x1c8),'name':_0x65f354[_0x498eae(0x1e5)]};}}}function a150_0x373f(){const _0x2e2c1f=['resolveEmbeddedActivationId','set','map','launched','exitCriterias','isArray','141616XoSwmJ','version','has','waitStep','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','with','resolveSegmentId','shift','1904TUyYUI','versions:','connection','27qzxsAZ','definition','end','branches','exit_criteria','activation_template_id','ABTest','And','values','excluded','reentryMode','conditionTimeoutUnit','entries','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','Entry\x20Criteria','trim','state','journeyBundleId','resolveSegment','stages','33hbvgmL','104311ZFfrIU','Duration','decision_point','goal-segment','conditions','push','Expected\x20format:\x0a','resolveActivationId','resolveEmbeddedSegmentId','rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27','bundle_id','embedded','weeks','942GjmMAk','days','from','ref:','6696mmDJvV','rule','description','timedOutPath','target','next','timeout','customizedSplit','uuid','behavior','activation','variants','841980kXzNDk','match','get','object','all','conditionTimeoutDuration','toLowerCase','Goal\x20Achieved','exitCriteria','Merge','relationships','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','reentry:','journeyStageId','data','ref','DaysOfTheWeek','segment','includes','Met\x20condition(s)','Journey\x20description','folder_id','duration','(missing)','waitStepType','resolveActivationName','stageId','days_of_week','*Max\x20wait\x20','wait_until','versionNumber','112LdagVh','journeys','Composite','no_reentry','\x27:\x20','merge','schedule','activations','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','Condition','journeyBundleName','DecisionPoint','slice','startsWith','\x20\x20\x20\x20type:\x20And\x0a','customized_split','journeyId','size','resolveJourneyId','sort','Stage\x20Complete','bundle_name','columns','isJourneyLocal','resolveJumpTarget','Variant','moveAfter','2145684uHKpMm','\x20\x20\x20\x20type:\x20','4KUwQTE','uniqueId','percentage','your-activation-name','day','segments','\x20\x20\x20\x20conditions:\x0a','stage','jump','journeyStages','milestone','JOURNEY_SYNTAX_ERROR','keys','attributes','unit','root_step','End','daysOfWeek','entryCriteria','stageName','draft','connector_config','add','journeyActivationStepId','type','find','conditionSegmentId','week','journeyName','latest','resolveActivation','reentry_always','\x20\x20rule:\x0a','waitCondition','Activation','entry_criteria','allowReentry','test','resolveStageId','stringify','length','ab_test','versions','journeys:','randomUUID','name','goal','replace','resolveSegmentName','segments:','First\x20stage\x20of\x20the\x20journey','585850LcVbXE','steps','all_columns','filter','version_number','notification','wait','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','journey','rootStep','segmentId','parentFolder','folder','unique_id','reentry','condition','waitStepUnit','Send\x20Notification'];a150_0x373f=function(){return _0x2e2c1f;};return a150_0x373f();}export function toYamlString(_0x1540dc){const _0x4cfd5d=a150_0x2222,_0x946812=stripInternalFields(_0x1540dc),_0x18413c=a150_0x2939a5[_0x4cfd5d(0x1df)](_0x946812,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x425b9c=[_0x4cfd5d(0x1e9),'activations:','goal:',_0x4cfd5d(0x188),_0x4cfd5d(0x1e3),'stages:',_0x4cfd5d(0x148)];let _0x2fcb33=_0x18413c;for(const _0x4c8dc0 of _0x425b9c){_0x2fcb33=_0x2fcb33[_0x4cfd5d(0x1e7)](new RegExp('^('+_0x4c8dc0+')','m'),(_0x2cb905,_0x346ecc,_0x5efdff)=>{if(_0x5efdff===0x0||_0x2fcb33[_0x5efdff-0x1]==='\x0a'&&_0x2fcb33[_0x5efdff-0x2]==='\x0a')return _0x346ecc;return'\x0a'+_0x346ecc;});}return _0x2fcb33;}function stripInternalFields(_0x4ede0b){const _0x23815f=a150_0x2222,{id:_0x2f6131,folder_id:_0x566944,bundle_id:_0x135d41,bundle_name:_0x508ee0,version:_0x406bf3,allow_reentry:_0x157034,..._0x1b39d7}=_0x4ede0b;return _0x1b39d7[_0x23815f(0x19c)]&&(_0x1b39d7[_0x23815f(0x19c)]=_0x1b39d7[_0x23815f(0x19c)][_0x23815f(0x13b)](_0x17231b=>{const _0x139841=_0x23815f,{id:_0x2d76b5,..._0xbc153b}=_0x17231b;return{..._0xbc153b,'stages':_0xbc153b[_0x139841(0x15d)][_0x139841(0x13b)](stripStageInternalFields),..._0x17231b[_0x139841(0x1d5)]===!![]?{'latest':!![]}:{},..._0x1b39d7['journeys']['length']===0x1&&_0xbc153b[_0x139841(0x140)]==='v1'?{'version':undefined}:{}};})),_0x1b39d7[_0x23815f(0x15d)]&&(_0x1b39d7[_0x23815f(0x15d)]=_0x1b39d7['stages']['map'](stripStageInternalFields)),_0x1b39d7[_0x23815f(0x1e2)]&&(_0x1b39d7[_0x23815f(0x1e2)]=_0x1b39d7[_0x23815f(0x1e2)][_0x23815f(0x13b)](_0x4fd15e=>{const _0x139b0d=_0x23815f,{id:_0x4a556,..._0x12a2f0}=_0x4fd15e;return{..._0x12a2f0,'stages':_0x12a2f0[_0x139b0d(0x15d)]['map'](stripStageInternalFields),..._0x4fd15e[_0x139b0d(0x1d5)]===!![]?{'latest':!![]}:{}};})),_0x1b39d7;}function stripStageInternalFields(_0x4d44b8){const {id:_0x1b4998,..._0xe917b}=_0x4d44b8;return _0xe917b;}export function parseYamlString(_0x1289ae){return safeParseYaml(_0x1289ae,JourneyDefSchema);}export function isJourneyDef(_0x172002){const _0x280589=a150_0x2222;return typeof _0x172002===_0x280589(0x17f)&&_0x172002!==null&&'type'in _0x172002&&_0x172002['type']===_0x280589(0x12f);}export function generateTemplate(_0x18b5af,_0x2d55ee){const _0x4ff53c=a150_0x2222,_0x4bfea7={'type':_0x4ff53c(0x12f),'name':_0x18b5af,'description':_0x4ff53c(0x190),'reentry':_0x4ff53c(0x19e),'goal':{'name':_0x4ff53c(0x183),'segment':_0x4ff53c(0x162)},'stages':[{'name':'Stage\x201','description':_0x4ff53c(0x1ea),'entry_criteria':{'name':_0x4ff53c(0x158),'segment':_0x2d55ee},'steps':[{'type':_0x4ff53c(0x12d),'name':'Wait\x201\x20Day','with':{'duration':0x1,'unit':_0x4ff53c(0x1bc)}},{'type':'activation','name':_0x4ff53c(0x138),'with':{'activation':_0x4ff53c(0x1bb)}},{'type':_0x4ff53c(0x14c),'name':_0x4ff53c(0x1af)}]}]};return toYamlString(_0x4bfea7);}function generateUUID(){const _0x532159=a150_0x2222;return crypto[_0x532159(0x1e4)]();}export const SEGMENT_REF_PREFIX=a150_0x3e352b(0x16f);export function parseSegmentRef(_0x2b04d7){const _0x34c3eb=a150_0x3e352b;if(_0x2b04d7[_0x34c3eb(0x1a8)](SEGMENT_REF_PREFIX))return{'type':_0x34c3eb(0x18b),'name':_0x2b04d7[_0x34c3eb(0x1a7)](SEGMENT_REF_PREFIX[_0x34c3eb(0x1e0)])};if(/^\d+$/[_0x34c3eb(0x1dd)](_0x2b04d7))return{'type':'id','name':_0x2b04d7};return{'type':'embedded','name':_0x2b04d7};}export function makeSegmentRef(_0x4b115a){return''+SEGMENT_REF_PREFIX+_0x4b115a;}export function isExternalSegmentRef(_0x5410db){const _0xa04936=a150_0x3e352b;return _0x5410db[_0xa04936(0x1a8)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x2d8b38){const _0x1bb086=a150_0x3e352b;return!!(_0x2d8b38[_0x1bb086(0x19c)]&&_0x2d8b38[_0x1bb086(0x19c)][_0x1bb086(0x1e0)]>0x0);}export function isMultiVersionMode(_0x1d716a){return!!(_0x1d716a['versions']&&_0x1d716a['versions']['length']>0x0);}export function isSingleVersionMode(_0x355d8d){const _0x190600=a150_0x3e352b;return!!(_0x355d8d[_0x190600(0x15d)]&&_0x355d8d[_0x190600(0x15d)][_0x190600(0x1e0)]>0x0);}export function hasMultipleVersions(_0x180905){const _0x176061=a150_0x3e352b;if(isJourneysArrayMode(_0x180905))return(_0x180905[_0x176061(0x19c)]?.['length']||0x0)>0x1;if(isMultiVersionMode(_0x180905))return(_0x180905[_0x176061(0x1e2)]?.[_0x176061(0x1e0)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x4b5ff2){const _0x5bffa4=a150_0x3e352b;if(isJourneysArrayMode(_0x4b5ff2))return _0x4b5ff2;if(isSingleVersionMode(_0x4b5ff2)){const {stages:_0x11976d,id:_0x3234ed,version:_0x1e0ed4,version_number:_0x404c66,..._0x54ea3b}=_0x4b5ff2;return{..._0x54ea3b,'journeys':[{'version':_0x1e0ed4||'v1','stages':_0x11976d||[],'id':_0x3234ed,'version_number':_0x404c66}]};}if(isMultiVersionMode(_0x4b5ff2)){const {versions:_0x23f713,..._0x5d184d}=_0x4b5ff2;return{..._0x5d184d,'journeys':(_0x23f713||[])[_0x5bffa4(0x13b)](_0x44937e=>({'version':_0x44937e[_0x5bffa4(0x1e5)],'state':_0x44937e[_0x5bffa4(0x15a)],'latest':_0x44937e[_0x5bffa4(0x1d5)],'stages':_0x44937e[_0x5bffa4(0x15d)],'id':_0x44937e['id'],'version_number':_0x44937e[_0x5bffa4(0x1ef)]}))};}return _0x4b5ff2;}export function normalizeJourneyDef(_0x3cb586,_0x1d5d05){const _0x31a454=a150_0x3e352b,_0x27c98d=normalizeToJourneysFormat(_0x3cb586),_0x56c0bc=_0x1d5d05?.['segments']?Object['keys'](_0x1d5d05[_0x31a454(0x1bd)]):undefined,_0x60efc8=_0x1d5d05?.[_0x31a454(0x1a2)]?Object['keys'](_0x1d5d05[_0x31a454(0x1a2)]):undefined;return{'type':'journey','name':_0x27c98d[_0x31a454(0x1e5)],..._0x27c98d[_0x31a454(0x172)]!==undefined&&{'description':_0x27c98d[_0x31a454(0x172)]},..._0x27c98d[_0x31a454(0x1e6)]&&{'goal':normalizeJourneyCriteria(_0x27c98d[_0x31a454(0x1e6)])},..._0x27c98d['reentry']!==undefined&&{'reentry':_0x27c98d[_0x31a454(0x135)]},..._0x27c98d[_0x31a454(0x1bd)]&&{'segments':normalizeEmbeddedSegments(_0x27c98d['segments'],_0x56c0bc)},..._0x27c98d[_0x31a454(0x1a2)]&&{'activations':normalizeEmbeddedActivations(_0x27c98d[_0x31a454(0x1a2)],_0x60efc8)},..._0x27c98d[_0x31a454(0x19c)]&&{'journeys':_0x27c98d[_0x31a454(0x19c)][_0x31a454(0x13b)](_0x205e61=>normalizeJourneyEntry(_0x205e61,_0x27c98d['journeys'][_0x31a454(0x1e0)]===0x1))}};}function normalizeJourneyEntry(_0x135dac,_0x4b37ce){const _0x5c8c8c=a150_0x3e352b;return{...!_0x4b37ce&&_0x135dac[_0x5c8c8c(0x140)]!==undefined&&{'version':_0x135dac[_0x5c8c8c(0x140)]},..._0x135dac[_0x5c8c8c(0x15a)]!==undefined&&{'state':_0x135dac[_0x5c8c8c(0x15a)]},...!_0x4b37ce&&_0x135dac[_0x5c8c8c(0x1d5)]!==undefined&&{'latest':_0x135dac[_0x5c8c8c(0x1d5)]},..._0x135dac[_0x5c8c8c(0x1ef)]!==undefined&&{'version_number':_0x135dac[_0x5c8c8c(0x1ef)]},..._0x135dac[_0x5c8c8c(0x1e6)]&&{'goal':normalizeJourneyCriteria(_0x135dac[_0x5c8c8c(0x1e6)])},..._0x135dac[_0x5c8c8c(0x135)]!==undefined&&{'reentry':_0x135dac['reentry']},'stages':_0x135dac[_0x5c8c8c(0x15d)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0x3bfd00){const _0x1c35a6=a150_0x3e352b;return{'name':_0x3bfd00[_0x1c35a6(0x1e5)],..._0x3bfd00[_0x1c35a6(0x172)]!==undefined&&{'description':_0x3bfd00[_0x1c35a6(0x172)]},..._0x3bfd00[_0x1c35a6(0x1db)]&&{'entry_criteria':normalizeJourneyCriteria(_0x3bfd00[_0x1c35a6(0x1db)])},..._0x3bfd00[_0x1c35a6(0x14e)]&&{'exit_criteria':_0x3bfd00[_0x1c35a6(0x14e)][_0x1c35a6(0x13b)](normalizeJourneyCriteria)},..._0x3bfd00[_0x1c35a6(0x1c2)]&&{'milestone':normalizeJourneyCriteria(_0x3bfd00[_0x1c35a6(0x1c2)])},..._0x3bfd00[_0x1c35a6(0x1ec)]&&{'steps':normalizeStepsWithImplicitNext(_0x3bfd00[_0x1c35a6(0x1ec)])}};}function normalizeStepsWithImplicitNext(_0xa83b54){return _0xa83b54['map']((_0x5699e4,_0x48a101)=>{const _0x39c027=a150_0x2222,_0x2e8bdc=_0x48a101<_0xa83b54[_0x39c027(0x1e0)]-0x1?_0xa83b54[_0x48a101+0x1][_0x39c027(0x1e5)]:undefined;return normalizeJourneyStep(_0x5699e4,_0x2e8bdc);});}function normalizeJourneyCriteria(_0x1425f9){const _0x4d123f=a150_0x3e352b;return{'name':_0x1425f9[_0x4d123f(0x1e5)],..._0x1425f9[_0x4d123f(0x172)]!==undefined&&{'description':_0x1425f9[_0x4d123f(0x172)]},'segment':_0x1425f9[_0x4d123f(0x18d)],..._0x1425f9['target']&&{'target':normalizeJumpTarget(_0x1425f9[_0x4d123f(0x174)])}};}function normalizeJourneyStep(_0x579757,_0x163a9e){const _0x3221f9=a150_0x3e352b,_0x5a742e=_0x579757[_0x3221f9(0x175)]!==undefined&&_0x579757[_0x3221f9(0x175)]!==_0x163a9e,_0x2fbbf0={'type':_0x579757[_0x3221f9(0x1d0)],'name':_0x579757[_0x3221f9(0x1e5)],..._0x5a742e&&{'next':_0x579757['next']}};if(_0x3221f9(0x144)in _0x579757&&_0x579757[_0x3221f9(0x144)])return{..._0x2fbbf0,'with':normalizeStepParams(_0x579757[_0x3221f9(0x1d0)],_0x579757[_0x3221f9(0x144)])};return _0x2fbbf0;}function normalizeStepParams(_0x3078a1,_0x3af14d){const _0x574728=a150_0x3e352b;switch(_0x3078a1){case _0x574728(0x12d):{const _0x33e2d3=_0x3af14d;let _0x16771c;return _0x33e2d3[_0x574728(0x136)]&&(_0x16771c={'segment':_0x33e2d3[_0x574728(0x136)][_0x574728(0x18d)],..._0x33e2d3[_0x574728(0x136)]['next']!==undefined&&{'next':_0x33e2d3[_0x574728(0x136)]['next']},..._0x33e2d3['condition']['timeout']&&{'timeout':{'duration':_0x33e2d3[_0x574728(0x136)][_0x574728(0x176)][_0x574728(0x192)],'unit':_0x33e2d3['condition'][_0x574728(0x176)][_0x574728(0x1c6)],..._0x33e2d3[_0x574728(0x136)][_0x574728(0x176)][_0x574728(0x175)]!==undefined&&{'next':_0x33e2d3[_0x574728(0x136)][_0x574728(0x176)][_0x574728(0x175)]}}}}),{..._0x33e2d3['duration']!==undefined&&{'duration':_0x33e2d3[_0x574728(0x192)]},..._0x33e2d3[_0x574728(0x1c6)]!==undefined&&{'unit':_0x33e2d3['unit']},..._0x33e2d3[_0x574728(0x199)]!==undefined&&{'wait_until':_0x33e2d3[_0x574728(0x199)]},..._0x33e2d3[_0x574728(0x197)]!==undefined&&{'days_of_week':_0x33e2d3[_0x574728(0x197)]},..._0x16771c&&{'condition':_0x16771c}};}case'activation':{const _0x6b56d7=_0x3af14d;return{'activation':_0x6b56d7[_0x574728(0x17a)]};}case _0x574728(0x161):{const _0x3600bc=_0x3af14d;return{'branches':_0x3600bc[_0x574728(0x14d)][_0x574728(0x13b)](normalizeDecisionBranch)};}case'ab_test':{const _0x11df4a=_0x3af14d;return{..._0x11df4a[_0x574728(0x1aa)]!==undefined&&{'customized_split':_0x11df4a['customized_split']},..._0x11df4a[_0x574728(0x134)]!==undefined&&{'unique_id':_0x11df4a['unique_id']},'variants':_0x11df4a[_0x574728(0x17b)][_0x574728(0x13b)](normalizeAbTestVariant)};}case _0x574728(0x1c0):{const _0x3c447a=_0x3af14d;return{'target':normalizeJumpTarget(_0x3c447a['target'])};}default:return _0x3af14d;}}function normalizeDecisionBranch(_0xd194de){const _0x5b0cbe=a150_0x3e352b;return{'name':_0xd194de[_0x5b0cbe(0x1e5)],..._0xd194de[_0x5b0cbe(0x18d)]!==undefined&&{'segment':_0xd194de[_0x5b0cbe(0x18d)]},..._0xd194de[_0x5b0cbe(0x153)]!==undefined&&{'excluded':_0xd194de[_0x5b0cbe(0x153)]},..._0xd194de[_0x5b0cbe(0x175)]!==undefined&&{'next':_0xd194de[_0x5b0cbe(0x175)]}};}function normalizeAbTestVariant(_0x42fd40){const _0x36bf03=a150_0x3e352b;return{..._0x42fd40['id']!==undefined&&{'id':_0x42fd40['id']},'name':_0x42fd40['name'],'percentage':_0x42fd40[_0x36bf03(0x1ba)],..._0x42fd40[_0x36bf03(0x175)]!==undefined&&{'next':_0x42fd40[_0x36bf03(0x175)]}};}function normalizeJumpTarget(_0x92c078){const _0x54998f=a150_0x3e352b;return{'journey':_0x92c078[_0x54998f(0x12f)],'stage':_0x92c078[_0x54998f(0x1bf)],..._0x92c078[_0x54998f(0x169)]!==undefined&&{'bundle_id':_0x92c078[_0x54998f(0x169)]}};}function normalizeEmbeddedSegments(_0x2b054b,_0x40567e){const _0x52abd2=a150_0x3e352b,_0x3d1621={},_0x477434=Object[_0x52abd2(0x1c4)](_0x2b054b),_0x988dfa=_0x40567e?[..._0x40567e['filter'](_0xdb4bbc=>_0x477434[_0x52abd2(0x18e)](_0xdb4bbc)),..._0x477434[_0x52abd2(0x1ee)](_0x1b11dd=>!_0x40567e[_0x52abd2(0x18e)](_0x1b11dd))[_0x52abd2(0x1ae)]()]:_0x477434[_0x52abd2(0x1ae)]();for(const _0x13a211 of _0x988dfa){const _0x146cfc=_0x2b054b[_0x13a211];if(_0x146cfc[_0x52abd2(0x171)]){const _0x14f92d=_0x146cfc[_0x52abd2(0x171)];if(_0x14f92d[_0x52abd2(0x1d0)]!==_0x52abd2(0x151)&&_0x14f92d[_0x52abd2(0x1d0)]!=='Or'&&_0x14f92d[_0x52abd2(0x1d0)]!==_0x52abd2(0x19d)){const _0x4b1489=_0x14f92d[_0x52abd2(0x1d0)]??_0x52abd2(0x193);throw new SDKError(ErrorCode[_0x52abd2(0x1c3)],_0x52abd2(0x187)+_0x13a211+_0x52abd2(0x19f)+(_0x52abd2(0x168)+_0x4b1489+'\x27.\x0a')+_0x52abd2(0x165)+_0x52abd2(0x1d8)+_0x52abd2(0x1a9)+_0x52abd2(0x1be)+_0x52abd2(0x12e)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x14f92d[_0x52abd2(0x163)]||!Array[_0x52abd2(0x13e)](_0x14f92d['conditions']))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x52abd2(0x187)+_0x13a211+'\x27:\x20'+_0x52abd2(0x157)+_0x52abd2(0x165)+_0x52abd2(0x1d8)+(_0x52abd2(0x1b7)+_0x14f92d[_0x52abd2(0x1d0)]+'\x0a')+'\x20\x20\x20\x20conditions:\x0a'+_0x52abd2(0x12e)+_0x52abd2(0x1a3)+_0x52abd2(0x143));}_0x3d1621[_0x13a211]={..._0x146cfc[_0x52abd2(0x172)]&&_0x146cfc[_0x52abd2(0x172)]['trim']()&&{'description':_0x146cfc[_0x52abd2(0x172)]},..._0x146cfc['rule']&&{'rule':deepSortObject(_0x146cfc[_0x52abd2(0x171)])}};}return _0x3d1621;}function normalizeEmbeddedActivations(_0x55abb4,_0xd9687d){const _0x4f899b=a150_0x3e352b,_0x33ddbf={},_0x2e27de=Object[_0x4f899b(0x1c4)](_0x55abb4),_0x52830b=_0xd9687d?[..._0xd9687d[_0x4f899b(0x1ee)](_0x55dc83=>_0x2e27de[_0x4f899b(0x18e)](_0x55dc83)),..._0x2e27de[_0x4f899b(0x1ee)](_0xa47477=>!_0xd9687d[_0x4f899b(0x18e)](_0xa47477))['sort']()]:_0x2e27de[_0x4f899b(0x1ae)]();for(const _0x3b9d02 of _0x52830b){const _0x7bf511=_0x55abb4[_0x3b9d02];_0x33ddbf[_0x3b9d02]={'name':_0x7bf511[_0x4f899b(0x1e5)],'connection':_0x7bf511[_0x4f899b(0x149)],..._0x7bf511[_0x4f899b(0x172)]!==undefined&&{'description':_0x7bf511[_0x4f899b(0x172)]},..._0x7bf511[_0x4f899b(0x1ed)]!==undefined&&{'all_columns':_0x7bf511[_0x4f899b(0x1ed)]},..._0x7bf511[_0x4f899b(0x1b1)]!==undefined&&{'columns':_0x7bf511[_0x4f899b(0x1b1)]},..._0x7bf511[_0x4f899b(0x179)]!==undefined&&{'behavior':_0x7bf511[_0x4f899b(0x179)]},..._0x7bf511['schedule']!==undefined&&{'schedule':_0x7bf511[_0x4f899b(0x1a1)]},..._0x7bf511[_0x4f899b(0x12c)]!==undefined&&{'notification':_0x7bf511['notification']},..._0x7bf511['connector_config']!==undefined&&{'connector_config':_0x7bf511[_0x4f899b(0x1cd)]},..._0x7bf511[_0x4f899b(0x14f)]!==undefined&&{'activation_template_id':_0x7bf511['activation_template_id']}};}return _0x33ddbf;}export function getActiveStages(_0x4311b4){const _0x1b9240=a150_0x3e352b;if(isJourneysArrayMode(_0x4311b4)){const _0xb4e247=_0x4311b4[_0x1b9240(0x19c)]||[],_0x409887=_0xb4e247[_0x1b9240(0x1d1)](_0x2d53a7=>_0x2d53a7['latest']===!![])||_0xb4e247[0x0];return _0x409887?.['stages']||[];}if(isSingleVersionMode(_0x4311b4))return _0x4311b4['stages']||[];if(isMultiVersionMode(_0x4311b4)){const _0xa91b70=_0x4311b4['versions']||[],_0x23d5f6=_0xa91b70[_0x1b9240(0x1d1)](_0x2e3837=>_0x2e3837[_0x1b9240(0x1d5)]===!![])||_0xa91b70[0x0];return _0x23d5f6?.['stages']||[];}return[];}export function getLatestJourneyEntry(_0x4a4aca){const _0x1f3445=a150_0x3e352b;if(isJourneysArrayMode(_0x4a4aca)){const _0x20523e=_0x4a4aca[_0x1f3445(0x19c)]||[];return _0x20523e[_0x1f3445(0x1d1)](_0x4dead1=>_0x4dead1[_0x1f3445(0x1d5)]===!![])||_0x20523e[0x0];}if(isMultiVersionMode(_0x4a4aca)){const _0x2fec50=_0x4a4aca[_0x1f3445(0x1e2)]||[],_0x13292d=_0x2fec50[_0x1f3445(0x1d1)](_0x3bbc30=>_0x3bbc30[_0x1f3445(0x1d5)]===!![])||_0x2fec50[0x0];if(_0x13292d)return{'version':_0x13292d[_0x1f3445(0x1e5)],'state':_0x13292d[_0x1f3445(0x15a)],'latest':_0x13292d[_0x1f3445(0x1d5)],'stages':_0x13292d['stages'],'id':_0x13292d['id'],'version_number':_0x13292d[_0x1f3445(0x1ef)]};}if(isSingleVersionMode(_0x4a4aca))return{'version':_0x4a4aca[_0x1f3445(0x140)]||'v1','state':_0x1f3445(0x1cc),'stages':_0x4a4aca['stages']||[],'id':_0x4a4aca['id'],'version_number':_0x4a4aca['version_number'],'goal':_0x4a4aca[_0x1f3445(0x1e6)],'reentry':_0x4a4aca[_0x1f3445(0x135)]};return undefined;}export function getLatestVersion(_0x279edf){const _0x42fd74=a150_0x3e352b;if(!isMultiVersionMode(_0x279edf))return undefined;const _0x5207c8=_0x279edf[_0x42fd74(0x1e2)]||[];return _0x5207c8[_0x42fd74(0x1d1)](_0x324a46=>_0x324a46['latest']===!![])||_0x5207c8[0x0];}export function getEffectiveGoal(_0x49d2bf){const _0x2d7938=a150_0x3e352b,_0x56dde8=getLatestJourneyEntry(_0x49d2bf);return _0x56dde8?.['goal']||_0x49d2bf[_0x2d7938(0x1e6)];}export function getEffectiveReentry(_0x23b1cf){const _0x5da91e=a150_0x3e352b,_0x1ab8ae=getLatestJourneyEntry(_0x23b1cf);return _0x1ab8ae?.[_0x5da91e(0x135)]||_0x23b1cf[_0x5da91e(0x135)];}export function collectSegmentRefs(_0x9c5d77){const _0x61d6b=a150_0x3e352b,_0x2ecaac=new Set();_0x9c5d77['goal']?.[_0x61d6b(0x18d)]&&_0x2ecaac[_0x61d6b(0x1ce)](_0x9c5d77[_0x61d6b(0x1e6)][_0x61d6b(0x18d)]);const _0x11df0e=_0x190baf=>{const _0x392348=_0x61d6b;for(const _0x53124d of _0x190baf){_0x53124d[_0x392348(0x1db)]?.[_0x392348(0x18d)]&&_0x2ecaac[_0x392348(0x1ce)](_0x53124d[_0x392348(0x1db)][_0x392348(0x18d)]);if(_0x53124d[_0x392348(0x14e)])for(const _0x43139b of _0x53124d['exit_criteria']){_0x43139b[_0x392348(0x18d)]&&_0x2ecaac[_0x392348(0x1ce)](_0x43139b[_0x392348(0x18d)]);}_0x53124d[_0x392348(0x1c2)]?.[_0x392348(0x18d)]&&_0x2ecaac[_0x392348(0x1ce)](_0x53124d['milestone'][_0x392348(0x18d)]);if(_0x53124d[_0x392348(0x1ec)])for(const _0x24f764 of _0x53124d[_0x392348(0x1ec)]){if(_0x24f764[_0x392348(0x1d0)]===_0x392348(0x161)){const _0x82a805=_0x24f764;for(const _0xd39ff4 of _0x82a805[_0x392348(0x144)][_0x392348(0x14d)]){_0xd39ff4[_0x392348(0x18d)]&&_0x2ecaac[_0x392348(0x1ce)](_0xd39ff4[_0x392348(0x18d)]);}}else{if(_0x24f764['type']===_0x392348(0x12d)){const _0x45182c=_0x24f764;_0x45182c[_0x392348(0x144)][_0x392348(0x136)]?.[_0x392348(0x18d)]&&_0x2ecaac[_0x392348(0x1ce)](_0x45182c[_0x392348(0x144)][_0x392348(0x136)]['segment']);}}}}};_0x9c5d77[_0x61d6b(0x15d)]&&_0x11df0e(_0x9c5d77[_0x61d6b(0x15d)]);if(_0x9c5d77['versions'])for(const _0x32390e of _0x9c5d77[_0x61d6b(0x1e2)]){_0x11df0e(_0x32390e['stages']);}return _0x2ecaac;}export function validateSegmentRefs(_0x3c9677){const _0x5ab995=a150_0x3e352b,_0x138b3f=[],_0x12ff28=collectSegmentRefs(_0x3c9677),_0x28c06b=new Set(Object['keys'](_0x3c9677[_0x5ab995(0x1bd)]||{}));for(const _0x3d783a of _0x12ff28){const _0xfd3dfa=parseSegmentRef(_0x3d783a);_0xfd3dfa[_0x5ab995(0x1d0)]==='embedded'&&!_0x28c06b['has'](_0xfd3dfa[_0x5ab995(0x1e5)])&&_0x138b3f[_0x5ab995(0x164)]('Unknown\x20segment\x20\x22'+_0xfd3dfa[_0x5ab995(0x1e5)]+'\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:'+_0xfd3dfa[_0x5ab995(0x1e5)]+'\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.');}return _0x138b3f;}export function collectSegmentIdsFromJourneyApi(_0x1d19cc){const _0xd41e96=a150_0x3e352b,_0x4673f9=new Set();_0x1d19cc[_0xd41e96(0x1c5)][_0xd41e96(0x1e6)]?.['segmentId']&&_0x4673f9['add'](_0x1d19cc['attributes']['goal']['segmentId']);const _0x5e4879=_0x1d19cc[_0xd41e96(0x1c5)][_0xd41e96(0x1c1)];if(Array['isArray'](_0x5e4879))for(const _0x18671c of _0x5e4879){_0x18671c['entryCriteria']?.['segmentId']&&_0x4673f9['add'](_0x18671c['entryCriteria'][_0xd41e96(0x131)]);const _0x58c554=_0x18671c[_0xd41e96(0x13d)]??_0x18671c[_0xd41e96(0x184)];if(Array[_0xd41e96(0x13e)](_0x58c554))for(const _0x1dfa7b of _0x58c554){_0x1dfa7b['segmentId']&&_0x4673f9[_0xd41e96(0x1ce)](_0x1dfa7b[_0xd41e96(0x131)]);}_0x18671c[_0xd41e96(0x1c2)]?.[_0xd41e96(0x131)]&&_0x4673f9[_0xd41e96(0x1ce)](_0x18671c[_0xd41e96(0x1c2)][_0xd41e96(0x131)]);if(_0x18671c[_0xd41e96(0x1ec)]&&typeof _0x18671c[_0xd41e96(0x1ec)]===_0xd41e96(0x17f)){const _0x2dbdf0=Array['isArray'](_0x18671c[_0xd41e96(0x1ec)])?_0x18671c[_0xd41e96(0x1ec)]:Object[_0xd41e96(0x152)](_0x18671c['steps']);for(const _0x3cfa33 of _0x2dbdf0){_0x3cfa33[_0xd41e96(0x1d9)]?.['segmentId']&&_0x4673f9[_0xd41e96(0x1ce)](_0x3cfa33[_0xd41e96(0x1d9)][_0xd41e96(0x131)]);const _0x21c3a9=_0x3cfa33;_0x21c3a9[_0xd41e96(0x1d2)]&&_0x4673f9[_0xd41e96(0x1ce)](_0x21c3a9[_0xd41e96(0x1d2)]);if(Array[_0xd41e96(0x13e)](_0x21c3a9[_0xd41e96(0x163)]))for(const _0x428e19 of _0x21c3a9[_0xd41e96(0x163)]){_0x428e19['segmentId']&&_0x4673f9[_0xd41e96(0x1ce)](_0x428e19[_0xd41e96(0x131)]);}if(Array[_0xd41e96(0x13e)](_0x3cfa33[_0xd41e96(0x14d)]))for(const _0x24c3ae of _0x3cfa33['branches']){_0x24c3ae[_0xd41e96(0x131)]&&_0x4673f9[_0xd41e96(0x1ce)](_0x24c3ae[_0xd41e96(0x131)]);}}}}return _0x4673f9;}
@@ -1 +1 @@
1
- const a151_0x5b3758=a151_0x930a;(function(_0x2acf36,_0x4c931a){const _0x4430ff=a151_0x930a,_0x42471f=_0x2acf36();while(!![]){try{const _0x130e24=-parseInt(_0x4430ff(0x1e4))/0x1*(-parseInt(_0x4430ff(0x1e1))/0x2)+-parseInt(_0x4430ff(0x1ca))/0x3+parseInt(_0x4430ff(0x1ea))/0x4*(-parseInt(_0x4430ff(0x1f3))/0x5)+parseInt(_0x4430ff(0x1e8))/0x6*(parseInt(_0x4430ff(0x1c7))/0x7)+parseInt(_0x4430ff(0x1e7))/0x8+parseInt(_0x4430ff(0x1f1))/0x9*(parseInt(_0x4430ff(0x1c5))/0xa)+parseInt(_0x4430ff(0x1e0))/0xb;if(_0x130e24===_0x4c931a)break;else _0x42471f['push'](_0x42471f['shift']());}catch(_0x1bd280){_0x42471f['push'](_0x42471f['shift']());}}}(a151_0x5ce6,0x53fc5));export const DEFAULT_TIME_RANGE=a151_0x5b3758(0x1de);export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x1cedf1,_0x38c17f,_0x441b56){const _0xae657=a151_0x5b3758,_0x121958=_0x441b56&&_0x441b56['length']>0x0?_0x441b56[_0xae657(0x1d6)](',\x20'):'*';return _0xae657(0x1db)+_0x121958+_0xae657(0x1cc)+_0x1cedf1+'.'+_0x38c17f+_0xae657(0x1df);}export function generateMasterCountSQL(_0x30c66c){const _0x50ef1e=a151_0x5b3758,{database:_0x379b5e,table:_0x1b1b1c}=_0x30c66c[_0x50ef1e(0x1bb)];return _0x50ef1e(0x1bf)+_0x379b5e+'.'+_0x1b1b1c;}export function generateMasterSampleSQL(_0x3c6872,_0x590b08=0x5){const _0x5dbb48=a151_0x5b3758,{database:_0x4d3fac,table:_0x1d5e39}=_0x3c6872[_0x5dbb48(0x1bb)];return'SELECT\x20*\x20FROM\x20'+_0x4d3fac+'.'+_0x1d5e39+'\x20LIMIT\x20'+_0x590b08;}function a151_0x930a(_0x55c7fd,_0x58dbf4){_0x55c7fd=_0x55c7fd-0x1b9;const _0x5ce6d5=a151_0x5ce6();let _0x930a2=_0x5ce6d5[_0x55c7fd];return _0x930a2;}export function generateAttributeCoverageSQL(_0x21dfcb,_0x4a860f){const _0xa624d8=a151_0x5b3758,_0x43a45e=_0x21dfcb[_0xa624d8(0x1bb)];return('\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20'+_0x43a45e[_0xa624d8(0x1e5)]+'.'+_0x43a45e[_0xa624d8(0x1c3)]+_0xa624d8(0x1cd)+_0x4a860f[_0xa624d8(0x1ec)][_0xa624d8(0x1e5)]+'.'+_0x4a860f[_0xa624d8(0x1ec)][_0xa624d8(0x1c3)]+_0xa624d8(0x1ef)+_0x4a860f[_0xa624d8(0x1d6)][_0xa624d8(0x1be)]+_0xa624d8(0x1c9)+_0x4a860f[_0xa624d8(0x1d6)][_0xa624d8(0x1c4)]+_0xa624d8(0x1d9)+_0x4a860f[_0xa624d8(0x1d6)][_0xa624d8(0x1c4)]+_0xa624d8(0x1c0))['trim']();}export function generateBehaviorStatsSQL(_0x5f5867,_0x864d51,_0x5e5f98=DEFAULT_TIME_RANGE){const _0x48956f=a151_0x5b3758,_0x19d6bb=_0x5f5867[_0x48956f(0x1bb)];return(_0x48956f(0x1d1)+_0x864d51[_0x48956f(0x1d6)][_0x48956f(0x1be)]+_0x48956f(0x1e6)+_0x19d6bb[_0x48956f(0x1e5)]+'.'+_0x19d6bb['table']+'\x20m\x0aJOIN\x20'+_0x864d51['source'][_0x48956f(0x1e5)]+'.'+_0x864d51[_0x48956f(0x1ec)][_0x48956f(0x1c3)]+_0x48956f(0x1c1)+_0x864d51[_0x48956f(0x1d6)][_0x48956f(0x1be)]+_0x48956f(0x1cf)+_0x864d51[_0x48956f(0x1d6)][_0x48956f(0x1c4)]+_0x48956f(0x1dd)+_0x5e5f98+'\x27)\x0a')[_0x48956f(0x1c8)]();}export function generateAttributeSampleSQL(_0x4460c7,_0x5a864b,_0x1696d4=0x5){const _0x3b12ff=a151_0x5b3758,_0x21b1cf=_0x4460c7['master'],_0x4f11f4=_0x5a864b[_0x3b12ff(0x1d6)][_0x3b12ff(0x1be)],_0x48b1d6=_0x5a864b[_0x3b12ff(0x1cb)][_0x3b12ff(0x1e2)](_0x1f0fff=>'a.'+_0x1f0fff[_0x3b12ff(0x1bd)])[_0x3b12ff(0x1d6)](',\x20');return(_0x3b12ff(0x1c2)+_0x4f11f4+',\x20'+_0x48b1d6+_0x3b12ff(0x1ed)+_0x21b1cf[_0x3b12ff(0x1e5)]+'.'+_0x21b1cf[_0x3b12ff(0x1c3)]+_0x3b12ff(0x1d3)+_0x5a864b[_0x3b12ff(0x1ec)][_0x3b12ff(0x1e5)]+'.'+_0x5a864b['source']['table']+_0x3b12ff(0x1ef)+_0x5a864b['join'][_0x3b12ff(0x1be)]+_0x3b12ff(0x1c9)+_0x5a864b[_0x3b12ff(0x1d6)][_0x3b12ff(0x1c4)]+_0x3b12ff(0x1b9)+_0x1696d4+'\x0a')[_0x3b12ff(0x1c8)]();}export function generateBehaviorSampleSQL(_0x21c6d8,_0x4ab0af,_0x1c512d=0x5,_0x5783ce=DEFAULT_TIME_RANGE){const _0x21afa8=a151_0x5b3758,_0x15f22f=_0x21c6d8[_0x21afa8(0x1bb)],_0x37e26a=_0x4ab0af[_0x21afa8(0x1d6)][_0x21afa8(0x1be)];let _0x3d3514;if(_0x4ab0af[_0x21afa8(0x1ba)])_0x3d3514=_0x21afa8(0x1c6);else _0x4ab0af['columns']&&_0x4ab0af[_0x21afa8(0x1cb)]['length']>0x0?_0x3d3514=_0x4ab0af[_0x21afa8(0x1cb)][_0x21afa8(0x1e2)](_0x2e8ed9=>'b.'+_0x2e8ed9[_0x21afa8(0x1bd)])['join'](',\x20'):_0x3d3514=_0x21afa8(0x1c6);return('\x0aSELECT\x20m.'+_0x37e26a+',\x20'+_0x3d3514+_0x21afa8(0x1ed)+_0x15f22f['database']+'.'+_0x15f22f['table']+_0x21afa8(0x1d3)+_0x4ab0af[_0x21afa8(0x1ec)][_0x21afa8(0x1e5)]+'.'+_0x4ab0af['source']['table']+_0x21afa8(0x1c1)+_0x4ab0af[_0x21afa8(0x1d6)][_0x21afa8(0x1be)]+'\x20=\x20b.'+_0x4ab0af['join']['child_key']+'\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27'+_0x5783ce+'\x27)\x0aLIMIT\x20'+_0x1c512d+'\x0a')['trim']();}function quoteIdentifier(_0xa7830f){if(/[\s\-\.\#\[\]\(\)]|^[0-9]/['test'](_0xa7830f))return'\x22'+_0xa7830f['replace'](/"/g,'\x22\x22')+'\x22';return _0xa7830f;}export function generateEnrichedSQL(_0x2e126e,_0x2b4b0e=0x5){const _0x5bb4ad=a151_0x5b3758,_0x3391f4=_0x2e126e[_0x5bb4ad(0x1bb)],_0x52065c=_0x2e126e['attributes']||[];if(_0x52065c[_0x5bb4ad(0x1e3)]===0x0)return _0x5bb4ad(0x1da)+_0x3391f4[_0x5bb4ad(0x1e5)]+'.'+_0x3391f4[_0x5bb4ad(0x1c3)]+_0x5bb4ad(0x1f2)+_0x2b4b0e;const _0x2d4eb9=['m.*'],_0x4c4b39=[];return _0x52065c[_0x5bb4ad(0x1d8)]((_0x116024,_0x3b3004)=>{const _0x34632a=_0x5bb4ad,_0x3bd0d2='a'+_0x3b3004;_0x116024[_0x34632a(0x1cb)]['forEach'](_0x1f7ce5=>{const _0x5db38c=_0x34632a,_0x3a9cec=quoteIdentifier(_0x1f7ce5[_0x5db38c(0x1d4)]||_0x1f7ce5['column']);_0x2d4eb9['push'](_0x3bd0d2+'.'+_0x1f7ce5[_0x5db38c(0x1bd)]+_0x5db38c(0x1d2)+_0x3a9cec);}),_0x4c4b39[_0x34632a(0x1ee)](_0x34632a(0x1f0)+_0x116024[_0x34632a(0x1ec)][_0x34632a(0x1e5)]+'.'+_0x116024['source']['table']+'\x20'+_0x3bd0d2+_0x34632a(0x1ce)+_0x116024[_0x34632a(0x1d6)]['parent_key']+_0x34632a(0x1e9)+_0x3bd0d2+'.'+_0x116024['join'][_0x34632a(0x1c4)]);}),(_0x5bb4ad(0x1dc)+_0x2d4eb9['join'](',\x20')+_0x5bb4ad(0x1ed)+_0x3391f4[_0x5bb4ad(0x1e5)]+'.'+_0x3391f4[_0x5bb4ad(0x1c3)]+_0x5bb4ad(0x1d0)+_0x4c4b39[_0x5bb4ad(0x1d6)]('\x0a')+_0x5bb4ad(0x1b9)+_0x2b4b0e+'\x0a')['trim']();}export function generateAttributeSchemaSQL(_0x33d98b,_0x470864){const _0x15132a=a151_0x5b3758,_0x39783f=_0x33d98b[_0x15132a(0x1bb)],_0x4b778a=_0x470864[_0x15132a(0x1d6)][_0x15132a(0x1be)],_0x1b15a9=_0x470864[_0x15132a(0x1cb)][_0x15132a(0x1e2)](_0x37efc5=>'a.'+_0x37efc5[_0x15132a(0x1bd)])[_0x15132a(0x1d6)](',\x20');return('\x0aSELECT\x20m.'+_0x4b778a+',\x20'+_0x1b15a9+'\x0aFROM\x20'+_0x39783f['database']+'.'+_0x39783f[_0x15132a(0x1c3)]+_0x15132a(0x1d3)+_0x470864[_0x15132a(0x1ec)]['database']+'.'+_0x470864[_0x15132a(0x1ec)][_0x15132a(0x1c3)]+'\x20a\x0a\x20\x20ON\x20m.'+_0x470864[_0x15132a(0x1d6)]['parent_key']+'\x20=\x20a.'+_0x470864[_0x15132a(0x1d6)][_0x15132a(0x1c4)]+_0x15132a(0x1eb))[_0x15132a(0x1c8)]();}export function generateBehaviorSchemaSQL(_0x5e0860,_0xfc31e){const _0x38abfc=a151_0x5b3758,_0x5a6e3c=_0x5e0860[_0x38abfc(0x1bb)],_0x239882=_0xfc31e['join']['parent_key'];let _0x378a5e;if(_0xfc31e[_0x38abfc(0x1ba)])_0x378a5e=_0x38abfc(0x1c6);else _0xfc31e['columns']&&_0xfc31e[_0x38abfc(0x1cb)][_0x38abfc(0x1e3)]>0x0?_0x378a5e=_0xfc31e[_0x38abfc(0x1cb)]['map'](_0x5b2903=>'b.'+_0x5b2903['column'])[_0x38abfc(0x1d6)](',\x20'):_0x378a5e='b.*';return(_0x38abfc(0x1c2)+_0x239882+',\x20'+_0x378a5e+_0x38abfc(0x1ed)+_0x5a6e3c['database']+'.'+_0x5a6e3c[_0x38abfc(0x1c3)]+'\x20m\x0aJOIN\x20'+_0xfc31e['source'][_0x38abfc(0x1e5)]+'.'+_0xfc31e[_0x38abfc(0x1ec)][_0x38abfc(0x1c3)]+'\x20b\x0a\x20\x20ON\x20m.'+_0xfc31e['join'][_0x38abfc(0x1be)]+_0x38abfc(0x1cf)+_0xfc31e['join'][_0x38abfc(0x1c4)]+_0x38abfc(0x1eb))[_0x38abfc(0x1c8)]();}function a151_0x5ce6(){const _0x4c4d48=['column','parent_key','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','\x20IS\x20NOT\x20NULL\x0a','\x20b\x0a\x20\x20ON\x20m.','\x0aSELECT\x20m.','table','child_key','112400Qrvrbk','b.*','6839HUzpRD','trim','\x20=\x20a.','1795365ECsMCP','columns','\x20FROM\x20','\x20m\x0aLEFT\x20JOIN\x20','\x0a\x20\x20ON\x20m.','\x20=\x20b.','\x20m\x0a','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','\x20AS\x20','\x20m\x0aJOIN\x20','label','toLowerCase','join','(all\x20columns)','forEach','\x0aWHERE\x20a.','SELECT\x20*\x20FROM\x20','SELECT\x20','\x0aSELECT\x20','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','-1d','\x20LIMIT\x200','2947065QMZsJt','32056jawfIx','map','length','20mGiAXU','database',')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20','3657648cxqzFx','510CDqaZB','\x20=\x20','204INULpX','\x0aLIMIT\x200\x0a','source','\x0aFROM\x20','push','\x20a\x0a\x20\x20ON\x20m.','LEFT\x20JOIN\x20','315zffRBf','\x20LIMIT\x20','56830PvIziP','\x0aLIMIT\x20','all_columns','master','name'];a151_0x5ce6=function(){return _0x4c4d48;};return a151_0x5ce6();}export function getAttributeColumns(_0x5cfbcd){const _0x17ade2=a151_0x5b3758;return _0x5cfbcd[_0x17ade2(0x1cb)][_0x17ade2(0x1e2)](_0x4fe251=>({'label':_0x4fe251[_0x17ade2(0x1d4)]||_0x4fe251[_0x17ade2(0x1bd)],'column':_0x4fe251[_0x17ade2(0x1bd)]}));}export function getBehaviorColumns(_0x447288){const _0x316771=a151_0x5b3758;if(_0x447288['all_columns'])return[{'label':'(all\x20columns)','column':'*'}];if(_0x447288[_0x316771(0x1cb)]&&_0x447288[_0x316771(0x1cb)][_0x316771(0x1e3)]>0x0)return _0x447288[_0x316771(0x1cb)]['map'](_0x143e04=>({'label':_0x143e04[_0x316771(0x1d4)]||_0x143e04[_0x316771(0x1bd)],'column':_0x143e04['column']}));return[{'label':_0x316771(0x1d7),'column':'*'}];}export function findAttributeByName(_0x3cb6c4,_0x5a50ac){return _0x3cb6c4['attributes']?.['find'](_0xf7a6ad=>_0xf7a6ad['name']['toLowerCase']()===_0x5a50ac['toLowerCase']());}export function findBehaviorByName(_0x2f821f,_0x5047c0){const _0x1710c4=a151_0x5b3758;return _0x2f821f['behaviors']?.['find'](_0x6bab50=>_0x6bab50[_0x1710c4(0x1bc)]['toLowerCase']()===_0x5047c0[_0x1710c4(0x1d5)]());}
1
+ const a151_0x423f21=a151_0x4b96;(function(_0x380165,_0x53822e){const _0x5d2c77=a151_0x4b96,_0x34a620=_0x380165();while(!![]){try{const _0x37e9bb=parseInt(_0x5d2c77(0x170))/0x1*(-parseInt(_0x5d2c77(0x14a))/0x2)+-parseInt(_0x5d2c77(0x14c))/0x3+parseInt(_0x5d2c77(0x178))/0x4+parseInt(_0x5d2c77(0x160))/0x5+-parseInt(_0x5d2c77(0x16f))/0x6*(-parseInt(_0x5d2c77(0x166))/0x7)+-parseInt(_0x5d2c77(0x155))/0x8*(-parseInt(_0x5d2c77(0x143))/0x9)+-parseInt(_0x5d2c77(0x17e))/0xa;if(_0x37e9bb===_0x53822e)break;else _0x34a620['push'](_0x34a620['shift']());}catch(_0x3435a0){_0x34a620['push'](_0x34a620['shift']());}}}(a151_0x174b,0xc89bb));export const DEFAULT_TIME_RANGE=a151_0x423f21(0x14f);export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x2f7337,_0x35f548,_0x3f1843){const _0x5d60b8=a151_0x423f21,_0x516c42=_0x3f1843&&_0x3f1843['length']>0x0?_0x3f1843[_0x5d60b8(0x157)](',\x20'):'*';return _0x5d60b8(0x15e)+_0x516c42+_0x5d60b8(0x142)+_0x2f7337+'.'+_0x35f548+_0x5d60b8(0x175);}export function generateMasterCountSQL(_0x3054d8){const _0x27b84d=a151_0x423f21,{database:_0x5dbaf8,table:_0x225f45}=_0x3054d8[_0x27b84d(0x167)];return _0x27b84d(0x14d)+_0x5dbaf8+'.'+_0x225f45;}export function generateMasterSampleSQL(_0x3c2461,_0x10ec2d=0x5){const _0x3150b8=a151_0x423f21,{database:_0xf57bc5,table:_0x3af52b}=_0x3c2461['master'];return'SELECT\x20*\x20FROM\x20'+_0xf57bc5+'.'+_0x3af52b+_0x3150b8(0x15b)+_0x10ec2d;}export function generateAttributeCoverageSQL(_0x83c55f,_0x7740ee){const _0x4ed119=a151_0x423f21,_0x187593=_0x83c55f[_0x4ed119(0x167)];return(_0x4ed119(0x179)+_0x187593['database']+'.'+_0x187593[_0x4ed119(0x144)]+_0x4ed119(0x161)+_0x7740ee[_0x4ed119(0x169)][_0x4ed119(0x150)]+'.'+_0x7740ee[_0x4ed119(0x169)][_0x4ed119(0x144)]+_0x4ed119(0x164)+_0x7740ee[_0x4ed119(0x157)][_0x4ed119(0x171)]+_0x4ed119(0x151)+_0x7740ee[_0x4ed119(0x157)][_0x4ed119(0x148)]+_0x4ed119(0x145)+_0x7740ee[_0x4ed119(0x157)]['child_key']+'\x20IS\x20NOT\x20NULL\x0a')[_0x4ed119(0x16a)]();}export function generateBehaviorStatsSQL(_0x37116e,_0x788da,_0x538e50=DEFAULT_TIME_RANGE){const _0x18ce64=a151_0x423f21,_0x3652b5=_0x37116e[_0x18ce64(0x167)];return('\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.'+_0x788da[_0x18ce64(0x157)][_0x18ce64(0x171)]+_0x18ce64(0x17a)+_0x3652b5[_0x18ce64(0x150)]+'.'+_0x3652b5[_0x18ce64(0x144)]+_0x18ce64(0x153)+_0x788da[_0x18ce64(0x169)]['database']+'.'+_0x788da[_0x18ce64(0x169)][_0x18ce64(0x144)]+'\x20b\x0a\x20\x20ON\x20m.'+_0x788da[_0x18ce64(0x157)][_0x18ce64(0x171)]+'\x20=\x20b.'+_0x788da['join'][_0x18ce64(0x148)]+'\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27'+_0x538e50+_0x18ce64(0x16b))[_0x18ce64(0x16a)]();}export function generateAttributeSampleSQL(_0x37653b,_0x2be3cd,_0x27f24a=0x5){const _0x1c49a5=a151_0x423f21,_0xdcb55e=_0x37653b['master'],_0x310a28=_0x2be3cd[_0x1c49a5(0x157)][_0x1c49a5(0x171)],_0x2f9758=_0x2be3cd[_0x1c49a5(0x165)][_0x1c49a5(0x173)](_0x4aebb9=>'a.'+_0x4aebb9[_0x1c49a5(0x177)])[_0x1c49a5(0x157)](',\x20');return(_0x1c49a5(0x14b)+_0x310a28+',\x20'+_0x2f9758+_0x1c49a5(0x16d)+_0xdcb55e['database']+'.'+_0xdcb55e['table']+_0x1c49a5(0x153)+_0x2be3cd[_0x1c49a5(0x169)][_0x1c49a5(0x150)]+'.'+_0x2be3cd[_0x1c49a5(0x169)][_0x1c49a5(0x144)]+_0x1c49a5(0x164)+_0x2be3cd['join'][_0x1c49a5(0x171)]+_0x1c49a5(0x151)+_0x2be3cd[_0x1c49a5(0x157)][_0x1c49a5(0x148)]+_0x1c49a5(0x17b)+_0x27f24a+'\x0a')[_0x1c49a5(0x16a)]();}export function generateBehaviorSampleSQL(_0x249c50,_0x491df3,_0x39a9a9=0x5,_0x1635b5=DEFAULT_TIME_RANGE){const _0x7ca69b=a151_0x423f21,_0x5260e8=_0x249c50[_0x7ca69b(0x167)],_0x46d73e=_0x491df3[_0x7ca69b(0x157)][_0x7ca69b(0x171)];let _0x396f5e;if(_0x491df3[_0x7ca69b(0x162)])_0x396f5e=_0x7ca69b(0x15a);else _0x491df3[_0x7ca69b(0x165)]&&_0x491df3[_0x7ca69b(0x165)][_0x7ca69b(0x174)]>0x0?_0x396f5e=_0x491df3[_0x7ca69b(0x165)][_0x7ca69b(0x173)](_0x1e391f=>'b.'+_0x1e391f['column'])['join'](',\x20'):_0x396f5e=_0x7ca69b(0x15a);return(_0x7ca69b(0x14b)+_0x46d73e+',\x20'+_0x396f5e+_0x7ca69b(0x16d)+_0x5260e8[_0x7ca69b(0x150)]+'.'+_0x5260e8[_0x7ca69b(0x144)]+_0x7ca69b(0x153)+_0x491df3[_0x7ca69b(0x169)][_0x7ca69b(0x150)]+'.'+_0x491df3[_0x7ca69b(0x169)][_0x7ca69b(0x144)]+_0x7ca69b(0x176)+_0x491df3[_0x7ca69b(0x157)][_0x7ca69b(0x171)]+'\x20=\x20b.'+_0x491df3['join'][_0x7ca69b(0x148)]+_0x7ca69b(0x154)+_0x1635b5+'\x27)\x0aLIMIT\x20'+_0x39a9a9+'\x0a')['trim']();}function quoteIdentifier(_0x2d8921){const _0x4969fd=a151_0x423f21;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/['test'](_0x2d8921))return'\x22'+_0x2d8921[_0x4969fd(0x156)](/"/g,'\x22\x22')+'\x22';return _0x2d8921;}function a151_0x4b96(_0x2515c8,_0x2590c7){_0x2515c8=_0x2515c8-0x141;const _0x174bbf=a151_0x174b();let _0x4b96d0=_0x174bbf[_0x2515c8];return _0x4b96d0;}export function generateEnrichedSQL(_0xd30795,_0x5a51f8=0x5){const _0x44a50d=a151_0x423f21,_0xbb6c35=_0xd30795[_0x44a50d(0x167)],_0x3ac8a2=_0xd30795[_0x44a50d(0x15c)]||[];if(_0x3ac8a2[_0x44a50d(0x174)]===0x0)return _0x44a50d(0x17d)+_0xbb6c35[_0x44a50d(0x150)]+'.'+_0xbb6c35['table']+_0x44a50d(0x15b)+_0x5a51f8;const _0xb3cb0=[_0x44a50d(0x163)],_0x51bf56=[];return _0x3ac8a2['forEach']((_0x46adcb,_0x5d9e40)=>{const _0x55798d=_0x44a50d,_0x456dbf='a'+_0x5d9e40;_0x46adcb[_0x55798d(0x165)][_0x55798d(0x141)](_0x16c0ce=>{const _0x4f988e=_0x55798d,_0x5d3457=quoteIdentifier(_0x16c0ce[_0x4f988e(0x15d)]||_0x16c0ce['column']);_0xb3cb0[_0x4f988e(0x14e)](_0x456dbf+'.'+_0x16c0ce[_0x4f988e(0x177)]+_0x4f988e(0x16c)+_0x5d3457);}),_0x51bf56[_0x55798d(0x14e)](_0x55798d(0x172)+_0x46adcb['source'][_0x55798d(0x150)]+'.'+_0x46adcb[_0x55798d(0x169)]['table']+'\x20'+_0x456dbf+_0x55798d(0x16e)+_0x46adcb['join'][_0x55798d(0x171)]+_0x55798d(0x149)+_0x456dbf+'.'+_0x46adcb[_0x55798d(0x157)][_0x55798d(0x148)]);}),(_0x44a50d(0x146)+_0xb3cb0[_0x44a50d(0x157)](',\x20')+'\x0aFROM\x20'+_0xbb6c35[_0x44a50d(0x150)]+'.'+_0xbb6c35[_0x44a50d(0x144)]+'\x20m\x0a'+_0x51bf56[_0x44a50d(0x157)]('\x0a')+'\x0aLIMIT\x20'+_0x5a51f8+'\x0a')[_0x44a50d(0x16a)]();}export function generateAttributeSchemaSQL(_0xee2bd6,_0x217a51){const _0x55e363=a151_0x423f21,_0x15d922=_0xee2bd6['master'],_0x28a3d6=_0x217a51[_0x55e363(0x157)][_0x55e363(0x171)],_0x4ba01f=_0x217a51[_0x55e363(0x165)][_0x55e363(0x173)](_0xe82779=>'a.'+_0xe82779['column'])[_0x55e363(0x157)](',\x20');return(_0x55e363(0x14b)+_0x28a3d6+',\x20'+_0x4ba01f+_0x55e363(0x16d)+_0x15d922[_0x55e363(0x150)]+'.'+_0x15d922[_0x55e363(0x144)]+_0x55e363(0x153)+_0x217a51[_0x55e363(0x169)]['database']+'.'+_0x217a51[_0x55e363(0x169)]['table']+_0x55e363(0x164)+_0x217a51[_0x55e363(0x157)][_0x55e363(0x171)]+_0x55e363(0x151)+_0x217a51[_0x55e363(0x157)][_0x55e363(0x148)]+_0x55e363(0x152))[_0x55e363(0x16a)]();}export function generateBehaviorSchemaSQL(_0x2a8157,_0x1d2753){const _0x2749b0=a151_0x423f21,_0x1b0178=_0x2a8157[_0x2749b0(0x167)],_0x541c0a=_0x1d2753[_0x2749b0(0x157)][_0x2749b0(0x171)];let _0x3abb9d;if(_0x1d2753[_0x2749b0(0x162)])_0x3abb9d=_0x2749b0(0x15a);else _0x1d2753[_0x2749b0(0x165)]&&_0x1d2753[_0x2749b0(0x165)][_0x2749b0(0x174)]>0x0?_0x3abb9d=_0x1d2753['columns'][_0x2749b0(0x173)](_0x44bb28=>'b.'+_0x44bb28['column'])['join'](',\x20'):_0x3abb9d=_0x2749b0(0x15a);return(_0x2749b0(0x14b)+_0x541c0a+',\x20'+_0x3abb9d+_0x2749b0(0x16d)+_0x1b0178[_0x2749b0(0x150)]+'.'+_0x1b0178[_0x2749b0(0x144)]+_0x2749b0(0x153)+_0x1d2753[_0x2749b0(0x169)][_0x2749b0(0x150)]+'.'+_0x1d2753[_0x2749b0(0x169)][_0x2749b0(0x144)]+_0x2749b0(0x176)+_0x1d2753[_0x2749b0(0x157)][_0x2749b0(0x171)]+_0x2749b0(0x15f)+_0x1d2753[_0x2749b0(0x157)][_0x2749b0(0x148)]+_0x2749b0(0x152))[_0x2749b0(0x16a)]();}export function getAttributeColumns(_0x2cfab9){const _0x39c026=a151_0x423f21;return _0x2cfab9['columns'][_0x39c026(0x173)](_0x2a41c2=>({'label':_0x2a41c2[_0x39c026(0x15d)]||_0x2a41c2[_0x39c026(0x177)],'column':_0x2a41c2[_0x39c026(0x177)]}));}export function getBehaviorColumns(_0x3e6b9f){const _0x4598ae=a151_0x423f21;if(_0x3e6b9f['all_columns'])return[{'label':'(all\x20columns)','column':'*'}];if(_0x3e6b9f[_0x4598ae(0x165)]&&_0x3e6b9f[_0x4598ae(0x165)][_0x4598ae(0x174)]>0x0)return _0x3e6b9f[_0x4598ae(0x165)][_0x4598ae(0x173)](_0x320807=>({'label':_0x320807[_0x4598ae(0x15d)]||_0x320807[_0x4598ae(0x177)],'column':_0x320807[_0x4598ae(0x177)]}));return[{'label':_0x4598ae(0x159),'column':'*'}];}export function findAttributeByName(_0x1fb991,_0x2903ca){const _0x1ab954=a151_0x423f21;return _0x1fb991[_0x1ab954(0x15c)]?.[_0x1ab954(0x158)](_0xd96943=>_0xd96943[_0x1ab954(0x168)][_0x1ab954(0x17c)]()===_0x2903ca['toLowerCase']());}export function findBehaviorByName(_0x5d746e,_0x3bb76c){const _0x1b2a89=a151_0x423f21;return _0x5d746e[_0x1b2a89(0x147)]?.['find'](_0x19e75b=>_0x19e75b[_0x1b2a89(0x168)]['toLowerCase']()===_0x3bb76c['toLowerCase']());}function a151_0x174b(){const _0x4cf432=[')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20','\x0aLIMIT\x20','toLowerCase','SELECT\x20*\x20FROM\x20','9354080AsOHGz','forEach','\x20FROM\x20','18ShlUlA','table','\x0aWHERE\x20a.','\x0aSELECT\x20','behaviors','child_key','\x20=\x20','2mcaSmR','\x0aSELECT\x20m.','3595857HRCpLT','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','push','-1d','database','\x20=\x20a.','\x0aLIMIT\x200\x0a','\x20m\x0aJOIN\x20','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','4229432FbkZmK','replace','join','find','(all\x20columns)','b.*','\x20LIMIT\x20','attributes','label','SELECT\x20','\x20=\x20b.','7808940pDaYsZ','\x20m\x0aLEFT\x20JOIN\x20','all_columns','m.*','\x20a\x0a\x20\x20ON\x20m.','columns','7mRDIZX','master','name','source','trim','\x27)\x0a','\x20AS\x20','\x0aFROM\x20','\x0a\x20\x20ON\x20m.','5297394sFaToS','984479TIwoqf','parent_key','LEFT\x20JOIN\x20','map','length','\x20LIMIT\x200','\x20b\x0a\x20\x20ON\x20m.','column','1752608RWcNfy','\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20'];a151_0x174b=function(){return _0x4cf432;};return a151_0x174b();}