@treasuredata/tdx 2026.3.22 → 2026.3.23

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 (203) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/claude-statusline-command.js +1 -1
  14. package/dist/commands/claude-usage-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/connection-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/delivery-command.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-campaign-pull-command.js +1 -1
  21. package/dist/commands/engage-campaign-push-command.js +1 -1
  22. package/dist/commands/engage-campaign-validate-command.js +1 -1
  23. package/dist/commands/engage-command.js +1 -1
  24. package/dist/commands/engage-template-pull-command.js +1 -1
  25. package/dist/commands/engage-template-push-command.js +1 -1
  26. package/dist/commands/engage-template-validate-command.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/journey-validate-command.js +1 -1
  30. package/dist/commands/llm-command.js +1 -1
  31. package/dist/commands/mcp-command.js +1 -1
  32. package/dist/commands/parent-segment-command.js +1 -1
  33. package/dist/commands/policy-command.js +1 -1
  34. package/dist/commands/profile-command.js +1 -1
  35. package/dist/commands/profiles-command.js +1 -1
  36. package/dist/commands/query-command.js +1 -1
  37. package/dist/commands/schedule-command.js +1 -1
  38. package/dist/commands/segment-command.js +1 -1
  39. package/dist/commands/segment-create-command.js +1 -1
  40. package/dist/commands/segment-fields-command.js +1 -1
  41. package/dist/commands/segment-pull-command.js +1 -1
  42. package/dist/commands/segment-push-command.js +1 -1
  43. package/dist/commands/segment-update-command.js +1 -1
  44. package/dist/commands/segment-use-command.js +1 -1
  45. package/dist/commands/segment-validate-command.js +1 -1
  46. package/dist/commands/segments.js +1 -1
  47. package/dist/commands/show.js +1 -1
  48. package/dist/commands/status-command.js +1 -1
  49. package/dist/commands/tables.js +1 -1
  50. package/dist/commands/unset-command.js +1 -1
  51. package/dist/commands/upgrade-command.js +1 -1
  52. package/dist/commands/use-command.js +1 -1
  53. package/dist/commands/user-command.js +1 -1
  54. package/dist/commands/workflow-command.js +1 -1
  55. package/dist/core/auth.js +1 -1
  56. package/dist/core/command-output.js +1 -1
  57. package/dist/core/config.js +1 -1
  58. package/dist/core/connection-cache.js +1 -1
  59. package/dist/core/constants.js +1 -1
  60. package/dist/core/credential-cache.js +1 -1
  61. package/dist/core/global-context.js +1 -1
  62. package/dist/core/keychain.js +1 -1
  63. package/dist/core/oauth-keychain.js +1 -1
  64. package/dist/core/oauth.js +1 -1
  65. package/dist/core/profile.js +1 -1
  66. package/dist/core/project-config.js +1 -1
  67. package/dist/core/session.js +1 -1
  68. package/dist/core/user-cache.js +1 -1
  69. package/dist/core/version.js +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/mcp/server.js +1 -1
  72. package/dist/mcp/tools/index.js +1 -1
  73. package/dist/mcp/tools/tdx-run.js +1 -1
  74. package/dist/mcp/tools/tdx-search.js +1 -1
  75. package/dist/mcp/utils.js +1 -1
  76. package/dist/proxy/claude-usage-tracker.js +1 -1
  77. package/dist/proxy/passthrough-server.js +1 -1
  78. package/dist/proxy/sse-usage-parser.js +1 -1
  79. package/dist/sdk/agent/agent-config.js +1 -1
  80. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  81. package/dist/sdk/agent/agent-yaml.js +1 -1
  82. package/dist/sdk/agent/test/evaluator.js +1 -1
  83. package/dist/sdk/agent/test/executor.js +1 -1
  84. package/dist/sdk/agent/test/index.js +1 -1
  85. package/dist/sdk/agent/test/output.js +1 -1
  86. package/dist/sdk/agent/test/parser.js +1 -1
  87. package/dist/sdk/agent/tool-target-registry.js +1 -1
  88. package/dist/sdk/api.js +1 -1
  89. package/dist/sdk/client/cdp-api-client.js +1 -1
  90. package/dist/sdk/client/delivery-api-client.js +1 -1
  91. package/dist/sdk/client/endpoints.js +1 -1
  92. package/dist/sdk/client/engage-api-client.js +1 -1
  93. package/dist/sdk/client/http-client.js +1 -1
  94. package/dist/sdk/client/llm-api-client.js +1 -1
  95. package/dist/sdk/client/oauth-refresh.js +1 -1
  96. package/dist/sdk/client/rate-limiter.js +1 -1
  97. package/dist/sdk/client/td-api-client.js +1 -1
  98. package/dist/sdk/client/trino-api-client.js +1 -1
  99. package/dist/sdk/client/workflow-client.js +1 -1
  100. package/dist/sdk/connection-validator.js +1 -1
  101. package/dist/sdk/connection.js +1 -1
  102. package/dist/sdk/delivery.js +1 -1
  103. package/dist/sdk/engage/campaign-pull.js +1 -1
  104. package/dist/sdk/engage/campaign-push.js +1 -1
  105. package/dist/sdk/engage/campaign-validator.js +1 -1
  106. package/dist/sdk/engage/campaign-yaml.js +1 -1
  107. package/dist/sdk/engage/template-pull.js +1 -1
  108. package/dist/sdk/engage/template-push.js +1 -1
  109. package/dist/sdk/engage/template-validator.js +1 -1
  110. package/dist/sdk/engage/template-yaml.js +1 -1
  111. package/dist/sdk/engage/types/campaign-def.js +1 -1
  112. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  113. package/dist/sdk/engage/types/template-schema.js +1 -1
  114. package/dist/sdk/engage.js +1 -1
  115. package/dist/sdk/errors.js +1 -1
  116. package/dist/sdk/index.js +1 -1
  117. package/dist/sdk/io/index.js +1 -1
  118. package/dist/sdk/io/node-filesystem.js +1 -1
  119. package/dist/sdk/job.js +1 -1
  120. package/dist/sdk/journey.js +1 -1
  121. package/dist/sdk/llm/chat-cache.js +1 -1
  122. package/dist/sdk/llm/index.js +1 -1
  123. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  124. package/dist/sdk/llm/model-factors.js +1 -1
  125. package/dist/sdk/personalization.js +1 -1
  126. package/dist/sdk/policy.js +1 -1
  127. package/dist/sdk/query/index.js +1 -1
  128. package/dist/sdk/query/sql-parser.js +1 -1
  129. package/dist/sdk/realtime.js +1 -1
  130. package/dist/sdk/schedule.js +1 -1
  131. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  132. package/dist/sdk/segment/fields-display.js +1 -1
  133. package/dist/sdk/segment/file-discovery.js +1 -1
  134. package/dist/sdk/segment/journey-utils.js +1 -1
  135. package/dist/sdk/segment/journey-validator.js +1 -1
  136. package/dist/sdk/segment/journey-yaml.js +1 -1
  137. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  138. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  139. package/dist/sdk/segment/pull-workflow.js +1 -1
  140. package/dist/sdk/segment/push-recovery.js +1 -1
  141. package/dist/sdk/segment/push-workflow.js +1 -1
  142. package/dist/sdk/segment/resolution-context.js +1 -1
  143. package/dist/sdk/segment/segment-path-parser.js +1 -1
  144. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  145. package/dist/sdk/segment/segment-validator.js +1 -1
  146. package/dist/sdk/segment/target-resolution.js +1 -1
  147. package/dist/sdk/segment/tdx-config.js +1 -1
  148. package/dist/sdk/segment/types/activation-schema.js +1 -1
  149. package/dist/sdk/segment/types/journey-def.js +1 -1
  150. package/dist/sdk/segment/types/journey-schema.js +1 -1
  151. package/dist/sdk/segment/types/segment-def.js +1 -1
  152. package/dist/sdk/segment/types/segment-schema.js +1 -1
  153. package/dist/sdk/segment/validate-files.js +1 -1
  154. package/dist/sdk/segment/yaml-validator.js +1 -1
  155. package/dist/sdk/segment.js +1 -1
  156. package/dist/sdk/types/index.js +1 -1
  157. package/dist/sdk/types/progress.js +1 -1
  158. package/dist/sdk/user.js +1 -1
  159. package/dist/sdk/util/format-detector.js +1 -1
  160. package/dist/sdk/util/formatters.js +1 -1
  161. package/dist/sdk/util/index.js +1 -1
  162. package/dist/sdk/util/paginate.js +1 -1
  163. package/dist/sdk/util/tree-formatter.js +1 -1
  164. package/dist/sdk/workflow/archive-validation.js +1 -1
  165. package/dist/sdk/workflow/clone-workflow.js +1 -1
  166. package/dist/sdk/workflow/index.js +1 -1
  167. package/dist/sdk/workflow/pull-workflow.js +1 -1
  168. package/dist/sdk/workflow/push-workflow.js +1 -1
  169. package/dist/sdk/workflow/tdx-config.js +1 -1
  170. package/dist/sdk/workflow/workflow-utils.js +1 -1
  171. package/dist/test-utils/command-runner.js +1 -1
  172. package/dist/test-utils/factories.js +1 -1
  173. package/dist/test-utils/fixtures.js +1 -1
  174. package/dist/test-utils/http-mock.js +1 -1
  175. package/dist/test-utils/index.js +1 -1
  176. package/dist/utils/async.js +1 -1
  177. package/dist/utils/colors.js +1 -1
  178. package/dist/utils/diff.js +1 -1
  179. package/dist/utils/file-permissions.js +1 -1
  180. package/dist/utils/file-reader.js +1 -1
  181. package/dist/utils/github-releases.js +1 -1
  182. package/dist/utils/global-cache.js +1 -1
  183. package/dist/utils/json-loader.js +1 -1
  184. package/dist/utils/local-cache.js +1 -1
  185. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  186. package/dist/utils/logger/formatters/index.js +1 -1
  187. package/dist/utils/logger/handlers/console-handler.js +1 -1
  188. package/dist/utils/logger/handlers/file-handler.js +1 -1
  189. package/dist/utils/logger/handlers/index.js +1 -1
  190. package/dist/utils/logger/handlers/null-handler.js +1 -1
  191. package/dist/utils/logger/index.js +1 -1
  192. package/dist/utils/logger/logger.js +1 -1
  193. package/dist/utils/logger/types.js +1 -1
  194. package/dist/utils/option-validation.js +1 -1
  195. package/dist/utils/process.js +1 -1
  196. package/dist/utils/prompt.js +1 -1
  197. package/dist/utils/spinner.js +1 -1
  198. package/dist/utils/sse-parser.js +1 -1
  199. package/dist/utils/string-utils.js +1 -1
  200. package/dist/utils/table-ref-parser.js +1 -1
  201. package/dist/utils/tdx-logger.js +1 -1
  202. package/dist/utils/version-check.js +1 -1
  203. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x54b73d,_0xa4bc8f){const _0x5c0c64=a133_0x2358,_0x1ec143=_0x54b73d();while(!![]){try{const _0x1f36da=-parseInt(_0x5c0c64(0x142))/0x1*(-parseInt(_0x5c0c64(0x125))/0x2)+parseInt(_0x5c0c64(0x12f))/0x3+parseInt(_0x5c0c64(0x146))/0x4+-parseInt(_0x5c0c64(0x121))/0x5+parseInt(_0x5c0c64(0x149))/0x6*(-parseInt(_0x5c0c64(0x157))/0x7)+parseInt(_0x5c0c64(0x155))/0x8+parseInt(_0x5c0c64(0x14c))/0x9;if(_0x1f36da===_0xa4bc8f)break;else _0x1ec143['push'](_0x1ec143['shift']());}catch(_0x223391){_0x1ec143['push'](_0x1ec143['shift']());}}}(a133_0x57bd,0x84128));function a133_0x57bd(){const _0x56faa5=['localeCompare','push','5251509anEPoF','query','startsWith','dim','set','Fetching\x20schema...','sort','columns','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','2219864CEpTrN','size','7YKBtUB','attribute','bold','4041930nMSZqb','matrixTableName','name','error','202nviOeg','\x20\x20\x20\x20','entries','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','behavior','length','get','key','parentColumn','parentTableName','974466WRjHMf','Schema\x20query:\x0a','tableName','displayName','trim','data','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','slice','information_schema','type','fields','behaviorName','SELECT\x20*\x20FROM\x20(\x0a','execute','column_type','source','Unknown','matrixColumnName','filter','53jdAJyG','cyan','Attributes','YES','2386104zTShAT','varchar','verbose','2629986IrIGUO'];a133_0x57bd=function(){return _0x56faa5;};return a133_0x57bd();}import a133_0x21b61c from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x1fc80f){const _0x522f3d=a133_0x2358,_0x241644=_0x1fc80f[_0x522f3d(0x153)]['map'](_0x46b8b2=>({'column_name':_0x46b8b2[_0x522f3d(0x123)],'column_type':_0x46b8b2[_0x522f3d(0x138)],'null':_0x522f3d(0x145),'key':null,'default':null,'extra':null}));return{..._0x1fc80f,'columns':[{'name':'column_name','type':_0x522f3d(0x147)},{'name':_0x522f3d(0x13d),'type':'varchar'},{'name':'null','type':_0x522f3d(0x147)},{'name':_0x522f3d(0x12c),'type':_0x522f3d(0x147)},{'name':'default','type':_0x522f3d(0x147)},{'name':'extra','type':_0x522f3d(0x147)}],'data':_0x241644};}export async function executeSchemaQuery(_0x36023a,_0x157d67,_0x15b2c3){const _0x37cfef=a133_0x2358,_0x51d1a5=_0x36023a[_0x37cfef(0x133)]()['replace'](/;+$/,''),_0x180ced=_0x37cfef(0x13b)+_0x51d1a5+_0x37cfef(0x154);_0x15b2c3['verbose']&&console[_0x37cfef(0x124)](_0x37cfef(0x130)+_0x180ced);const _0x4b578b=await withProgressSpinner(_0x37cfef(0x151),async _0x3ec583=>{const _0x3d8966=_0x37cfef,_0x5673a8=await _0x157d67[_0x3d8966(0x14d)][_0x3d8966(0x13c)](_0x180ced,{'catalog':'td','schema':_0x3d8966(0x137),'onJobId':_0x38779a=>{_0x3ec583['setJobId'](_0x38779a);}});return _0x5673a8;},{'verbose':_0x15b2c3[_0x37cfef(0x148)]});return buildSchemaResult(_0x4b578b[_0x37cfef(0x134)]);}function columnName(_0x280387){const _0x56d46b=a133_0x2358;return _0x280387[_0x56d46b(0x140)]||_0x280387[_0x56d46b(0x12d)]||_0x280387[_0x56d46b(0x123)];}function formatFieldLine(_0x1cb341,_0x5ecda2,_0x375293){const _0x1436bf=a133_0x2358,_0x7fd8c6=_0x1cb341!==_0x5ecda2?'\x20'+a133_0x21b61c[_0x1436bf(0x14f)]('('+_0x5ecda2+')'):'';return _0x1436bf(0x126)+_0x1cb341+_0x7fd8c6+':\x20'+a133_0x21b61c[_0x1436bf(0x143)](_0x375293);}function sortByColumnName(_0x464b54){const _0x379e03=a133_0x2358;return[..._0x464b54][_0x379e03(0x152)]((_0x38b72c,_0x4f0030)=>columnName(_0x38b72c)[_0x379e03(0x14a)](columnName(_0x4f0030)));}function a133_0x2358(_0x17ff14,_0x1b4d37){_0x17ff14=_0x17ff14-0x121;const _0x57bd9d=a133_0x57bd();let _0x2358e1=_0x57bd9d[_0x17ff14];return _0x2358e1;}export function displayFieldsHumanReadable(_0x5230c3,_0x44ebe4){const _0xafc7d9=a133_0x2358,_0x57cac4=_0x5230c3['filter'](_0xfc5941=>_0xfc5941[_0xafc7d9(0x13e)]===_0xafc7d9(0x158)),_0x3a8598=_0x5230c3[_0xafc7d9(0x141)](_0x439354=>_0x439354[_0xafc7d9(0x13e)]===_0xafc7d9(0x129)),_0x1e2627=new Map();for(const _0x126b20 of _0x57cac4){const _0x2cce4c=_0x126b20['groupingName']||_0x126b20[_0xafc7d9(0x12e)]||_0xafc7d9(0x13f),_0x388361=_0x1e2627[_0xafc7d9(0x12b)](_0x2cce4c);_0x388361?_0x388361[_0xafc7d9(0x139)][_0xafc7d9(0x14b)](_0x126b20):_0x1e2627[_0xafc7d9(0x150)](_0x2cce4c,{'displayName':_0x2cce4c,'tableName':_0x126b20[_0xafc7d9(0x12e)],'fields':[_0x126b20]});}const _0x516667=new Map();for(const _0x561c91 of _0x3a8598){const _0x20ba8d=_0x561c91[_0xafc7d9(0x13a)]||_0xafc7d9(0x13f),_0x91dccd=_0x516667[_0xafc7d9(0x12b)](_0x20ba8d)||[];_0x91dccd[_0xafc7d9(0x14b)](_0x561c91),_0x516667[_0xafc7d9(0x150)](_0x20ba8d,_0x91dccd);}console['error']('\x0a'+a133_0x21b61c[_0xafc7d9(0x159)](_0x44ebe4));if(_0x1e2627[_0xafc7d9(0x156)]>0x0){console['error']('\x0a'+a133_0x21b61c['dim'](_0xafc7d9(0x144)));const _0x434f67=[..._0x1e2627[_0xafc7d9(0x127)]()][_0xafc7d9(0x152)]((_0x542ded,_0x3cfe25)=>_0x542ded[0x0][_0xafc7d9(0x14a)](_0x3cfe25[0x0]));for(const [,_0x10af5e]of _0x434f67){const _0x406937=_0x10af5e[_0xafc7d9(0x131)]&&_0x10af5e[_0xafc7d9(0x131)]!==_0x10af5e[_0xafc7d9(0x132)]?'\x20'+a133_0x21b61c[_0xafc7d9(0x14f)]('('+_0x10af5e[_0xafc7d9(0x131)]+')'):'';console[_0xafc7d9(0x124)]('\x20\x20'+a133_0x21b61c['bold'](_0x10af5e[_0xafc7d9(0x132)])+_0x406937);for(const _0x79004d of sortByColumnName(_0x10af5e['fields'])){console[_0xafc7d9(0x124)](formatFieldLine(columnName(_0x79004d),_0x79004d[_0xafc7d9(0x123)],_0x79004d[_0xafc7d9(0x138)]));}}}if(_0x516667[_0xafc7d9(0x156)]>0x0){console['error']('\x0a'+a133_0x21b61c['dim']('Behaviors'));const _0x4be0db=[..._0x516667[_0xafc7d9(0x127)]()][_0xafc7d9(0x152)]((_0x38c3b9,_0x1780ec)=>_0x38c3b9[0x0]['localeCompare'](_0x1780ec[0x0]));for(const [_0x68cf5e,_0x231ec4]of _0x4be0db){const _0x2c23a5=_0x231ec4[0x0],_0x2be17e=_0x2c23a5?.['matrixTableName'];if(_0x2be17e){const _0xd5c3ce=_0x2be17e!==_0x68cf5e?'\x20'+a133_0x21b61c[_0xafc7d9(0x14f)]('('+_0x68cf5e+')'):'';console['error']('\x20\x20'+a133_0x21b61c['bold'](_0x2be17e)+_0xd5c3ce);}else{const _0x125c1b=_0x2c23a5?.[_0xafc7d9(0x12e)]||'';console[_0xafc7d9(0x124)]('\x20\x20'+a133_0x21b61c[_0xafc7d9(0x159)](_0x68cf5e)+(_0x125c1b?'\x20'+a133_0x21b61c[_0xafc7d9(0x14f)]('('+_0x125c1b+')'):''));}for(const _0x451d96 of sortByColumnName(_0x231ec4)){const _0x220cd4=_0x451d96[_0xafc7d9(0x123)][_0xafc7d9(0x14e)](_0x68cf5e+'.')?_0x451d96[_0xafc7d9(0x123)][_0xafc7d9(0x136)](_0x68cf5e[_0xafc7d9(0x12a)]+0x1):_0x451d96['name'];console[_0xafc7d9(0x124)](formatFieldLine(columnName(_0x451d96),_0x220cd4,_0x451d96[_0xafc7d9(0x138)]));}}}const _0x1d0183=_0x5230c3['some'](_0x559984=>_0x559984['matrixColumnName']||_0x559984[_0xafc7d9(0x122)]);_0x1d0183&&(console['error']('\x0a'+a133_0x21b61c[_0xafc7d9(0x14f)](_0xafc7d9(0x135))),console[_0xafc7d9(0x124)](a133_0x21b61c[_0xafc7d9(0x14f)](_0xafc7d9(0x128)))),console[_0xafc7d9(0x124)]('');}
1
+ (function(_0x4c7435,_0x1fd1aa){const _0x3f1140=a133_0xd68b,_0x5ad13d=_0x4c7435();while(!![]){try{const _0x7f5264=-parseInt(_0x3f1140(0x150))/0x1+parseInt(_0x3f1140(0x176))/0x2*(parseInt(_0x3f1140(0x160))/0x3)+-parseInt(_0x3f1140(0x155))/0x4+parseInt(_0x3f1140(0x174))/0x5*(parseInt(_0x3f1140(0x14f))/0x6)+-parseInt(_0x3f1140(0x167))/0x7+parseInt(_0x3f1140(0x15f))/0x8*(parseInt(_0x3f1140(0x173))/0x9)+-parseInt(_0x3f1140(0x166))/0xa*(-parseInt(_0x3f1140(0x14e))/0xb);if(_0x7f5264===_0x1fd1aa)break;else _0x5ad13d['push'](_0x5ad13d['shift']());}catch(_0x2e24f6){_0x5ad13d['push'](_0x5ad13d['shift']());}}}(a133_0x26ab,0x60e20));function a133_0x26ab(){const _0x6505a5=['sort','columns','entries','filter','SELECT\x20*\x20FROM\x20(\x0a','9105294VfFixx','269592CrUPgu','784644iTaDxg','startsWith','\x20\x20\x20\x20','key','Fetching\x20schema...','971180JSHNrl','information_schema','push','cyan','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','query','trim','execute','source','fields','363080gSImLy','29469zdiryi','type','length','matrixColumnName','verbose','tableName','10UFIrHu','3365187ERhkXU','size','matrixTableName','map','Attributes','default','displayName','varchar','some','replace','name','column_name','90rhNBrr','65mhTuRD','set','8ypCbMF','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','parentTableName','error','localeCompare','bold','behavior','behaviorName','Unknown','get','null','dim'];a133_0x26ab=function(){return _0x6505a5;};return a133_0x26ab();}import a133_0x2e1e07 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x1845bb){const _0x2535ea=a133_0xd68b,_0x363afc=_0x1845bb[_0x2535ea(0x183)][_0x2535ea(0x16a)](_0x5678ce=>({'column_name':_0x5678ce[_0x2535ea(0x171)],'column_type':_0x5678ce[_0x2535ea(0x161)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x1845bb,'columns':[{'name':_0x2535ea(0x172),'type':_0x2535ea(0x16e)},{'name':'column_type','type':_0x2535ea(0x16e)},{'name':_0x2535ea(0x180),'type':_0x2535ea(0x16e)},{'name':_0x2535ea(0x153),'type':_0x2535ea(0x16e)},{'name':_0x2535ea(0x16c),'type':_0x2535ea(0x16e)},{'name':'extra','type':'varchar'}],'data':_0x363afc};}export async function executeSchemaQuery(_0x5bd971,_0x4f602b,_0x3c0f3e){const _0x1f739d=a133_0xd68b,_0x55c67a=_0x5bd971[_0x1f739d(0x15b)]()[_0x1f739d(0x170)](/;+$/,''),_0x5c3670=_0x1f739d(0x14d)+_0x55c67a+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0x3c0f3e[_0x1f739d(0x164)]&&console['error']('Schema\x20query:\x0a'+_0x5c3670);const _0x18e3c4=await withProgressSpinner(_0x1f739d(0x154),async _0x3516cd=>{const _0xa541d0=_0x1f739d,_0x1e8c36=await _0x4f602b[_0xa541d0(0x15a)][_0xa541d0(0x15c)](_0x5c3670,{'catalog':'td','schema':_0xa541d0(0x156),'onJobId':_0x4c7c94=>{_0x3516cd['setJobId'](_0x4c7c94);}});return _0x1e8c36;},{'verbose':_0x3c0f3e['verbose']});return buildSchemaResult(_0x18e3c4['data']);}function columnName(_0x18bfe6){const _0x893ff9=a133_0xd68b;return _0x18bfe6[_0x893ff9(0x163)]||_0x18bfe6['parentColumn']||_0x18bfe6[_0x893ff9(0x171)];}function a133_0xd68b(_0x49deca,_0x41ddc9){_0x49deca=_0x49deca-0x14d;const _0x26ab1a=a133_0x26ab();let _0xd68bb5=_0x26ab1a[_0x49deca];return _0xd68bb5;}function formatFieldLine(_0x4a4edb,_0x395030,_0x2dc089){const _0x3509d4=a133_0xd68b,_0x3e3d8a=_0x4a4edb!==_0x395030?'\x20'+a133_0x2e1e07['dim']('('+_0x395030+')'):'';return _0x3509d4(0x152)+_0x4a4edb+_0x3e3d8a+':\x20'+a133_0x2e1e07[_0x3509d4(0x158)](_0x2dc089);}function sortByColumnName(_0x4aafd0){const _0x2e6390=a133_0xd68b;return[..._0x4aafd0][_0x2e6390(0x182)]((_0x38d478,_0x170300)=>columnName(_0x38d478)[_0x2e6390(0x17a)](columnName(_0x170300)));}export function displayFieldsHumanReadable(_0x23a8e0,_0x551266){const _0x1435b6=a133_0xd68b,_0x34421f=_0x23a8e0['filter'](_0x31907b=>_0x31907b[_0x1435b6(0x15d)]==='attribute'),_0x4c9b76=_0x23a8e0[_0x1435b6(0x185)](_0x198226=>_0x198226[_0x1435b6(0x15d)]===_0x1435b6(0x17c)),_0x3d8926=new Map();for(const _0x2a299a of _0x34421f){const _0x20948f=_0x2a299a['groupingName']||_0x2a299a[_0x1435b6(0x178)]||'Unknown',_0x33a4bf=_0x3d8926[_0x1435b6(0x17f)](_0x20948f);_0x33a4bf?_0x33a4bf[_0x1435b6(0x15e)][_0x1435b6(0x157)](_0x2a299a):_0x3d8926[_0x1435b6(0x175)](_0x20948f,{'displayName':_0x20948f,'tableName':_0x2a299a[_0x1435b6(0x178)],'fields':[_0x2a299a]});}const _0x33e078=new Map();for(const _0x914ce1 of _0x4c9b76){const _0x213b9b=_0x914ce1[_0x1435b6(0x17d)]||_0x1435b6(0x17e),_0xb1a7f8=_0x33e078[_0x1435b6(0x17f)](_0x213b9b)||[];_0xb1a7f8[_0x1435b6(0x157)](_0x914ce1),_0x33e078['set'](_0x213b9b,_0xb1a7f8);}console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x551266));if(_0x3d8926['size']>0x0){console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07[_0x1435b6(0x181)](_0x1435b6(0x16b)));const _0x135e7c=[..._0x3d8926[_0x1435b6(0x184)]()][_0x1435b6(0x182)]((_0x46761f,_0x330024)=>_0x46761f[0x0][_0x1435b6(0x17a)](_0x330024[0x0]));for(const [,_0x52e647]of _0x135e7c){const _0x4961c7=_0x52e647['tableName']&&_0x52e647[_0x1435b6(0x165)]!==_0x52e647['displayName']?'\x20'+a133_0x2e1e07[_0x1435b6(0x181)]('('+_0x52e647[_0x1435b6(0x165)]+')'):'';console['error']('\x20\x20'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x52e647[_0x1435b6(0x16d)])+_0x4961c7);for(const _0x10aa05 of sortByColumnName(_0x52e647['fields'])){console[_0x1435b6(0x179)](formatFieldLine(columnName(_0x10aa05),_0x10aa05[_0x1435b6(0x171)],_0x10aa05[_0x1435b6(0x161)]));}}}if(_0x33e078[_0x1435b6(0x168)]>0x0){console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07['dim']('Behaviors'));const _0x6ab04a=[..._0x33e078['entries']()][_0x1435b6(0x182)]((_0x3e03ff,_0x57cb79)=>_0x3e03ff[0x0][_0x1435b6(0x17a)](_0x57cb79[0x0]));for(const [_0x228776,_0x6cf595]of _0x6ab04a){const _0x4d48c9=_0x6cf595[0x0],_0x5d7bc1=_0x4d48c9?.[_0x1435b6(0x169)];if(_0x5d7bc1){const _0x112019=_0x5d7bc1!==_0x228776?'\x20'+a133_0x2e1e07['dim']('('+_0x228776+')'):'';console[_0x1435b6(0x179)]('\x20\x20'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x5d7bc1)+_0x112019);}else{const _0x11d639=_0x4d48c9?.[_0x1435b6(0x178)]||'';console[_0x1435b6(0x179)]('\x20\x20'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x228776)+(_0x11d639?'\x20'+a133_0x2e1e07[_0x1435b6(0x181)]('('+_0x11d639+')'):''));}for(const _0x2334de of sortByColumnName(_0x6cf595)){const _0x86ba11=_0x2334de[_0x1435b6(0x171)][_0x1435b6(0x151)](_0x228776+'.')?_0x2334de[_0x1435b6(0x171)]['slice'](_0x228776[_0x1435b6(0x162)]+0x1):_0x2334de[_0x1435b6(0x171)];console[_0x1435b6(0x179)](formatFieldLine(columnName(_0x2334de),_0x86ba11,_0x2334de['type']));}}}const _0x3d2ec9=_0x23a8e0[_0x1435b6(0x16f)](_0x2be3ef=>_0x2be3ef['matrixColumnName']||_0x2be3ef[_0x1435b6(0x169)]);_0x3d2ec9&&(console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07[_0x1435b6(0x181)](_0x1435b6(0x177))),console[_0x1435b6(0x179)](a133_0x2e1e07[_0x1435b6(0x181)](_0x1435b6(0x159)))),console['error']('');}
@@ -1 +1 @@
1
- function a134_0x1aff(_0x23e98e,_0x1f5037){_0x23e98e=_0x23e98e-0xea;const _0x3ec546=a134_0x3ec5();let _0x1aff21=_0x3ec546[_0x23e98e];return _0x1aff21;}(function(_0x104880,_0x57b4b3){const _0x49f450=a134_0x1aff,_0x11184d=_0x104880();while(!![]){try{const _0x1a9320=-parseInt(_0x49f450(0xeb))/0x1+-parseInt(_0x49f450(0xf7))/0x2*(parseInt(_0x49f450(0xf5))/0x3)+-parseInt(_0x49f450(0xed))/0x4*(parseInt(_0x49f450(0xfd))/0x5)+-parseInt(_0x49f450(0xec))/0x6*(parseInt(_0x49f450(0xf1))/0x7)+-parseInt(_0x49f450(0xf4))/0x8+-parseInt(_0x49f450(0xf3))/0x9*(parseInt(_0x49f450(0xef))/0xa)+parseInt(_0x49f450(0xf2))/0xb*(parseInt(_0x49f450(0xfb))/0xc);if(_0x1a9320===_0x57b4b3)break;else _0x11184d['push'](_0x11184d['shift']());}catch(_0x5b64a5){_0x11184d['push'](_0x11184d['shift']());}}}(a134_0x3ec5,0x5c29b));import{readdirSync,statSync}from'fs';import a134_0x417cf7 from'path';export function findYamlFiles(_0x4b27c5){const _0x3e8b05=[];function _0x2b89c4(_0x473a58){const _0x496567=a134_0x1aff,_0x1e6b04=readdirSync(_0x473a58,{'withFileTypes':!![]});for(const _0x248651 of _0x1e6b04){const _0x531f69=a134_0x417cf7['join'](_0x473a58,_0x248651[_0x496567(0xee)]);if(_0x248651['isDirectory']())_0x2b89c4(_0x531f69);else(_0x248651[_0x496567(0xee)][_0x496567(0xf9)]('.yml')||_0x248651[_0x496567(0xee)][_0x496567(0xf9)](_0x496567(0xf0)))&&_0x3e8b05[_0x496567(0xfc)](_0x531f69);}}return _0x2b89c4(_0x4b27c5),_0x3e8b05;}function a134_0x3ec5(){const _0x5b542d=['map','endsWith','extname','792ktRCif','push','425FgetPJ','isFile','.yml','172559zbNjtn','4369548TSCYXs','32692IkKNAK','name','138540BUBuuT','.yaml','7ZyBCiu','549197vKDdcJ','297YNYZJw','5552096XrfBss','512901WRAdCr','relative','2tbJVOv'];a134_0x3ec5=function(){return _0x5b542d;};return a134_0x3ec5();}export function discoverYamlFiles(_0x2bed13){const _0x1d9ed6=a134_0x1aff,_0x528667=findYamlFiles(_0x2bed13);return _0x528667[_0x1d9ed6(0xf8)](_0x39bc64=>{const _0x183c7a=_0x1d9ed6,_0x365d58=a134_0x417cf7[_0x183c7a(0xf6)](_0x2bed13,_0x39bc64),_0xf6c3f9=a134_0x417cf7['dirname'](_0x365d58);return{'absolutePath':_0x39bc64,'relativePath':_0x365d58,'folderPath':_0xf6c3f9==='.'?'':_0xf6c3f9};});}export function isYamlFile(_0x244428){const _0xbdf417=a134_0x1aff;try{const _0x166d04=statSync(_0x244428);if(!_0x166d04[_0xbdf417(0xfe)]())return![];const _0x5d9109=a134_0x417cf7[_0xbdf417(0xfa)](_0x244428)['toLowerCase']();return _0x5d9109===_0xbdf417(0xea)||_0x5d9109==='.yaml';}catch{return![];}}
1
+ function a134_0x4416(_0x6deb89,_0x11b2e6){_0x6deb89=_0x6deb89-0xbb;const _0xa110ab=a134_0xa110();let _0x4416d0=_0xa110ab[_0x6deb89];return _0x4416d0;}function a134_0xa110(){const _0x3fe340=['9chyuxd','65922PjtWoT','70NuNxGA','map','9debeld','105682ZzcTHL','name','566930SBsYdY','.yml','121649LCTRPm','toLowerCase','252WfbfzH','14171zYHBqX','relative','dirname','8iUgAFE','.yaml','611191EnviVs','287504JzZmDB','endsWith'];a134_0xa110=function(){return _0x3fe340;};return a134_0xa110();}(function(_0x1bd058,_0x27f94f){const _0x106b29=a134_0x4416,_0x2e58b6=_0x1bd058();while(!![]){try{const _0x25cd93=-parseInt(_0x106b29(0xcd))/0x1+parseInt(_0x106b29(0xc6))/0x2*(parseInt(_0x106b29(0xc5))/0x3)+-parseInt(_0x106b29(0xbf))/0x4+parseInt(_0x106b29(0xc3))/0x5*(-parseInt(_0x106b29(0xc2))/0x6)+-parseInt(_0x106b29(0xbe))/0x7*(parseInt(_0x106b29(0xbc))/0x8)+parseInt(_0x106b29(0xc1))/0x9*(parseInt(_0x106b29(0xc8))/0xa)+parseInt(_0x106b29(0xca))/0xb*(parseInt(_0x106b29(0xcc))/0xc);if(_0x25cd93===_0x27f94f)break;else _0x2e58b6['push'](_0x2e58b6['shift']());}catch(_0x4c8bbc){_0x2e58b6['push'](_0x2e58b6['shift']());}}}(a134_0xa110,0x1d5d5));import{readdirSync,statSync}from'fs';import a134_0x3c80e7 from'path';export function findYamlFiles(_0x9901){const _0x5dce64=[];function _0x23ebff(_0x22cba6){const _0x4c1b33=a134_0x4416,_0x43a876=readdirSync(_0x22cba6,{'withFileTypes':!![]});for(const _0x1272d3 of _0x43a876){const _0x6675c4=a134_0x3c80e7['join'](_0x22cba6,_0x1272d3['name']);if(_0x1272d3['isDirectory']())_0x23ebff(_0x6675c4);else(_0x1272d3[_0x4c1b33(0xc7)][_0x4c1b33(0xc0)]('.yml')||_0x1272d3[_0x4c1b33(0xc7)]['endsWith'](_0x4c1b33(0xbd)))&&_0x5dce64['push'](_0x6675c4);}}return _0x23ebff(_0x9901),_0x5dce64;}export function discoverYamlFiles(_0x373a8b){const _0xea7c1c=a134_0x4416,_0x44173d=findYamlFiles(_0x373a8b);return _0x44173d[_0xea7c1c(0xc4)](_0x39fe80=>{const _0x199dfb=_0xea7c1c,_0x1b74de=a134_0x3c80e7[_0x199dfb(0xce)](_0x373a8b,_0x39fe80),_0x43395c=a134_0x3c80e7[_0x199dfb(0xbb)](_0x1b74de);return{'absolutePath':_0x39fe80,'relativePath':_0x1b74de,'folderPath':_0x43395c==='.'?'':_0x43395c};});}export function isYamlFile(_0x281aaf){const _0xf4375c=a134_0x4416;try{const _0x436bdb=statSync(_0x281aaf);if(!_0x436bdb['isFile']())return![];const _0x4286d5=a134_0x3c80e7['extname'](_0x281aaf)[_0xf4375c(0xcb)]();return _0x4286d5===_0xf4375c(0xc9)||_0x4286d5===_0xf4375c(0xbd);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x287ec2,_0x4f29f5){const _0x5375c4=a135_0x2159,_0x713cd3=_0x287ec2();while(!![]){try{const _0x47e91a=parseInt(_0x5375c4(0x1ec))/0x1+-parseInt(_0x5375c4(0x1ba))/0x2*(-parseInt(_0x5375c4(0x1bf))/0x3)+-parseInt(_0x5375c4(0x1b0))/0x4+-parseInt(_0x5375c4(0x1dc))/0x5*(-parseInt(_0x5375c4(0x1e8))/0x6)+parseInt(_0x5375c4(0x1bb))/0x7*(-parseInt(_0x5375c4(0x1db))/0x8)+parseInt(_0x5375c4(0x1a3))/0x9*(parseInt(_0x5375c4(0x1d7))/0xa)+parseInt(_0x5375c4(0x1c4))/0xb*(-parseInt(_0x5375c4(0x1c8))/0xc);if(_0x47e91a===_0x4f29f5)break;else _0x713cd3['push'](_0x713cd3['shift']());}catch(_0x57c799){_0x713cd3['push'](_0x713cd3['shift']());}}}(a135_0x448b,0x3371e));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x11b867){const _0x2c2587=a135_0x2159;return _0x11b867['toLowerCase']()[_0x2c2587(0x1ce)](/\s+/g,'_')[_0x2c2587(0x1ce)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x2c2587(0x1ce)](/_+/g,'_')[_0x2c2587(0x1ce)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5baab7){const _0x12859f=a135_0x2159,_0x532cb8=_0x5baab7['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x532cb8){const _0xc9bd1d=_0x532cb8[0x1][_0x12859f(0x1ea)](),_0xaa4333=_0x532cb8[0x2],_0x258b24=_0xaa4333['replace'](/-/g,'')['slice'](0x0,0x4)[_0x12859f(0x1ea)]();return _0xc9bd1d+'_'+_0x258b24;}const _0x4ba45e=_0x5baab7[_0x12859f(0x19e)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x4ba45e){const _0x22473f=_0x4ba45e[0x1],_0x2e21cb=_0x4ba45e[0x2][_0x12859f(0x1ea)](),_0x24afcb=_0x22473f[_0x12859f(0x1ce)](/-/g,'')[_0x12859f(0x1b8)](0x0,0x4)[_0x12859f(0x1ea)]();return _0x2e21cb+'_'+_0x24afcb;}return undefined;}function stableStringify(_0x112a7a){const _0x5d1b6e=a135_0x2159;if(Array[_0x5d1b6e(0x1e4)](_0x112a7a))return'['+_0x112a7a[_0x5d1b6e(0x1cc)](_0x2ed6c0=>stableStringify(_0x2ed6c0))[_0x5d1b6e(0x1a8)](',')+']';if(_0x112a7a&&typeof _0x112a7a==='object'){const _0x272abe=_0x112a7a,_0x5a9512=Object['keys'](_0x272abe)[_0x5d1b6e(0x1e7)](),_0x400b29=_0x5a9512['map'](_0x545707=>'\x22'+_0x545707+'\x22:'+stableStringify(_0x272abe[_0x545707]));return'{'+_0x400b29['join'](',')+'}';}const _0x26236b=JSON[_0x5d1b6e(0x1b3)](_0x112a7a);return _0x26236b===undefined?_0x5d1b6e(0x1c3):_0x26236b;}export function consolidateActivationsByContent(_0x880ad4){const _0x4aee44=a135_0x2159,_0x351e14={},_0x4b2793=new Map(),_0x342806=new Map();for(const _0x1710d2 of _0x880ad4){if(!_0x1710d2)continue;for(const [_0x48603c,_0x261af8]of Object['entries'](_0x1710d2)){const _0x536ece={'name':_0x261af8['name'],'connection':_0x261af8[_0x4aee44(0x1b4)],..._0x261af8[_0x4aee44(0x1d1)]!==undefined&&{'all_columns':_0x261af8['all_columns']},..._0x261af8['columns']!==undefined&&{'columns':_0x261af8[_0x4aee44(0x1e2)]},..._0x261af8[_0x4aee44(0x1aa)]!==undefined&&{'behavior':_0x261af8[_0x4aee44(0x1aa)]},..._0x261af8[_0x4aee44(0x1b2)]!==undefined&&{'schedule':_0x261af8['schedule']},..._0x261af8['notification']!==undefined&&{'notification':_0x261af8['notification']},..._0x261af8['connector_config']!==undefined&&{'connector_config':_0x261af8[_0x4aee44(0x1a0)]},..._0x261af8[_0x4aee44(0x1c6)]!==undefined&&{'activation_template_id':_0x261af8[_0x4aee44(0x1c6)]}},_0x2604d2=stableStringify(_0x536ece),_0x535821=_0x342806[_0x4aee44(0x1a1)](_0x2604d2);_0x535821?_0x4b2793['set'](_0x48603c,_0x535821):(_0x351e14[_0x48603c]=_0x261af8,_0x4b2793[_0x4aee44(0x1c5)](_0x48603c,_0x48603c),_0x342806[_0x4aee44(0x1c5)](_0x2604d2,_0x48603c));}}return{'merged':_0x351e14,'nameMapping':_0x4b2793};}export function updateActivationReferences(_0x34f5cf,_0x24d9bd){const _0x27f55d=a135_0x2159;if(!_0x34f5cf)return;for(const _0x23ab52 of _0x34f5cf){if(!_0x23ab52[_0x27f55d(0x199)])continue;for(const _0x213695 of _0x23ab52[_0x27f55d(0x199)]){if(_0x213695['type']===_0x27f55d(0x1b6)&&_0x213695[_0x27f55d(0x1da)]?.[_0x27f55d(0x1b6)]){const _0x242fdf=_0x24d9bd[_0x27f55d(0x1a1)](_0x213695[_0x27f55d(0x1da)]['activation']);_0x242fdf&&_0x242fdf!==_0x213695[_0x27f55d(0x1da)]['activation']&&(_0x213695[_0x27f55d(0x1da)][_0x27f55d(0x1b6)]=_0x242fdf);}}}}export function consolidateSegmentsByContent(_0x2539f1,_0x1706bc){const _0x21ebeb=a135_0x2159,_0x14458e={},_0x465b92=new Map(),_0x5d46fe=new Map();for(const _0x4c2b21 of _0x2539f1){if(!_0x4c2b21)continue;for(const [_0x156355,_0x313bf7]of Object[_0x21ebeb(0x1d2)](_0x4c2b21)){if(!_0x313bf7[_0x21ebeb(0x1e3)]){_0x14458e[_0x156355]=_0x313bf7,_0x465b92[_0x21ebeb(0x1c5)](_0x156355,_0x156355);continue;}const _0x373fda=_0x313bf7[_0x21ebeb(0x1be)]&&_0x313bf7[_0x21ebeb(0x1be)][_0x21ebeb(0x19f)]()?_0x313bf7[_0x21ebeb(0x1be)]:undefined,_0x18b2fc=JSON[_0x21ebeb(0x1b3)]({'description':_0x373fda,'rule':deepSortObject(_0x313bf7['rule'])}),_0x181503=_0x5d46fe['get'](_0x18b2fc);if(_0x181503){const _0x5a37c6={..._0x313bf7[_0x21ebeb(0x1be)]!==undefined&&{'description':_0x313bf7[_0x21ebeb(0x1be)]},'rule':_0x313bf7[_0x21ebeb(0x1e3)]?deepSortObject(_0x313bf7[_0x21ebeb(0x1e3)]):_0x313bf7[_0x21ebeb(0x1e3)]};if(_0x156355<_0x181503){_0x14458e[_0x156355]=_0x5a37c6,delete _0x14458e[_0x181503];for(const [_0x5f6c2a,_0x58c7cc]of _0x465b92[_0x21ebeb(0x1d2)]()){_0x58c7cc===_0x181503&&_0x465b92[_0x21ebeb(0x1c5)](_0x5f6c2a,_0x156355);}_0x465b92[_0x21ebeb(0x1c5)](_0x156355,_0x156355),_0x5d46fe[_0x21ebeb(0x1c5)](_0x18b2fc,_0x156355);}else _0x14458e[_0x181503]=_0x5a37c6,_0x465b92[_0x21ebeb(0x1c5)](_0x156355,_0x181503);}else{let _0x66cb08=_0x156355;if(_0x1706bc){const _0x5656b7=_0x1706bc[_0x21ebeb(0x1a1)](_0x18b2fc);_0x5656b7&&_0x5656b7[_0x21ebeb(0x1c7)]>0x0&&(_0x66cb08=_0x5656b7[_0x21ebeb(0x1b8)]()['sort']()[0x0]);}const _0xcf27e6={..._0x313bf7['description']!==undefined&&{'description':_0x313bf7[_0x21ebeb(0x1be)]},'rule':_0x313bf7[_0x21ebeb(0x1e3)]?deepSortObject(_0x313bf7[_0x21ebeb(0x1e3)]):_0x313bf7[_0x21ebeb(0x1e3)]};_0x14458e[_0x66cb08]=_0xcf27e6,_0x465b92[_0x21ebeb(0x1c5)](_0x156355,_0x66cb08),_0x5d46fe[_0x21ebeb(0x1c5)](_0x18b2fc,_0x66cb08);}}}return{'merged':_0x14458e,'nameMapping':_0x465b92};}export function updateSegmentReferences(_0x87aa68,_0x146a4d){const _0x350935=a135_0x2159;if(!_0x87aa68)return;for(const _0x1c9b17 of _0x87aa68){if(_0x1c9b17[_0x350935(0x1eb)]?.[_0x350935(0x19a)]){const _0x347968=_0x146a4d[_0x350935(0x1a1)](_0x1c9b17['entry_criteria'][_0x350935(0x19a)]);_0x347968&&(_0x1c9b17[_0x350935(0x1eb)][_0x350935(0x19a)]=_0x347968);}if(_0x1c9b17[_0x350935(0x1bd)])for(const _0x247226 of _0x1c9b17[_0x350935(0x1bd)]){if(_0x247226[_0x350935(0x19a)]){const _0x4e18b5=_0x146a4d[_0x350935(0x1a1)](_0x247226['segment']);_0x4e18b5&&(_0x247226['segment']=_0x4e18b5);}}if(_0x1c9b17[_0x350935(0x1e9)]?.[_0x350935(0x19a)]){const _0x764d5a=_0x146a4d[_0x350935(0x1a1)](_0x1c9b17['milestone'][_0x350935(0x19a)]);_0x764d5a&&(_0x1c9b17[_0x350935(0x1e9)][_0x350935(0x19a)]=_0x764d5a);}if(_0x1c9b17[_0x350935(0x199)])for(const _0x47294e of _0x1c9b17['steps']){if(_0x47294e['type']==='decision_point'&&_0x47294e[_0x350935(0x1da)]?.[_0x350935(0x1b7)])for(const _0x512b07 of _0x47294e[_0x350935(0x1da)][_0x350935(0x1b7)]){if(_0x512b07[_0x350935(0x19a)]){const _0x5c5166=_0x146a4d[_0x350935(0x1a1)](_0x512b07[_0x350935(0x19a)]);_0x5c5166&&(_0x512b07[_0x350935(0x19a)]=_0x5c5166);}}if(_0x47294e[_0x350935(0x1ad)]===_0x350935(0x1d4)&&_0x47294e[_0x350935(0x1da)]?.[_0x350935(0x1df)]?.[_0x350935(0x19a)]){const _0x4f8258=_0x146a4d[_0x350935(0x1a1)](_0x47294e['with'][_0x350935(0x1df)][_0x350935(0x19a)]);_0x4f8258&&(_0x47294e[_0x350935(0x1da)][_0x350935(0x1df)][_0x350935(0x19a)]=_0x4f8258);}}}}export function updateSegmentRefsInSegments(_0x508742,_0x2c7a0d){const _0x4558e3=a135_0x2159;for(const _0xb846b3 of Object[_0x4558e3(0x1a6)](_0x508742)){_0xb846b3[_0x4558e3(0x1e3)]&&updateSegmentRefsInRule(_0xb846b3[_0x4558e3(0x1e3)],_0x2c7a0d);}}function updateSegmentRefsInRule(_0x108c0a,_0x49e93e){const _0x526e7d=a135_0x2159;if(_0x108c0a===null||typeof _0x108c0a!==_0x526e7d(0x1ac))return;if(Array['isArray'](_0x108c0a)){for(const _0xe6c89b of _0x108c0a){updateSegmentRefsInRule(_0xe6c89b,_0x49e93e);}return;}const _0x6f9d2a=_0x108c0a;if((_0x6f9d2a['type']===_0x526e7d(0x1c2)||_0x6f9d2a[_0x526e7d(0x1ad)]===_0x526e7d(0x1e1))&&typeof _0x6f9d2a[_0x526e7d(0x19a)]===_0x526e7d(0x1c1)){const _0x380adc=_0x49e93e['get'](_0x6f9d2a[_0x526e7d(0x19a)]);_0x380adc&&(_0x6f9d2a[_0x526e7d(0x19a)]=_0x380adc);}if(_0x6f9d2a[_0x526e7d(0x1cb)]&&Array[_0x526e7d(0x1e4)](_0x6f9d2a[_0x526e7d(0x1cb)]))for(const _0x134fad of _0x6f9d2a[_0x526e7d(0x1cb)]){updateSegmentRefsInRule(_0x134fad,_0x49e93e);}}export function buildJourneysArray(_0x1cc177,_0x298750){const _0x3a399d=a135_0x2159;return _0x1cc177[_0x3a399d(0x1cc)](_0x127b77=>{const _0x147648=_0x3a399d,_0x16c014=_0x298750?_0x127b77[_0x147648(0x1a5)]['id']===_0x298750:_0x1cc177[_0x147648(0x1c7)]===0x1,_0x5a3def=_0x127b77[_0x147648(0x1dd)]['journeys']?.[0x0],_0x3f4d01=_0x5a3def?.[_0x147648(0x1d6)]||_0x127b77['yaml'][_0x147648(0x1d6)],_0x3481f5={'version':_0x5a3def?.[_0x147648(0x1e5)]||_0x127b77[_0x147648(0x1dd)][_0x147648(0x1e5)]||_0x127b77[_0x147648(0x1a5)][_0x147648(0x1b9)],'state':_0x127b77[_0x147648(0x1a5)][_0x147648(0x1bc)]===_0x147648(0x1ae)?_0x147648(0x1ae):'draft','stages':_0x5a3def?.[_0x147648(0x1ca)]||_0x127b77[_0x147648(0x1dd)]['stages']||[],'id':_0x5a3def?.['id']||_0x127b77[_0x147648(0x1dd)]['id'],'version_number':_0x5a3def?.[_0x147648(0x1a2)]||_0x127b77[_0x147648(0x1dd)][_0x147648(0x1a2)]};return _0x3f4d01&&(_0x3481f5[_0x147648(0x1d6)]=_0x3f4d01),_0x16c014&&(_0x3481f5[_0x147648(0x1d9)]=!![]),_0x3481f5;});}export function buildMergedJourneyDef(_0xa176d,_0xbcb054,_0x506fc2){const _0x328a87=a135_0x2159,_0x4c8a5e=_0xa176d[0x0][_0x328a87(0x1dd)],_0x540fa6=buildJourneysArray(_0xa176d,_0x506fc2),{merged:_0x1d9522,nameMapping:_0xc1f99c}=consolidateSegmentsByContent(_0xa176d[_0x328a87(0x1cc)](_0x5d43eb=>_0x5d43eb[_0x328a87(0x1dd)]['segments']),_0xbcb054);updateSegmentRefsInSegments(_0x1d9522,_0xc1f99c);const _0x183b98=Array[_0x328a87(0x19c)](_0xc1f99c[_0x328a87(0x1d2)]())[_0x328a87(0x1b1)](([_0x33c7f9,_0x4b91cf])=>_0x33c7f9!==_0x4b91cf&&_0x33c7f9[_0x328a87(0x1ab)](_0x328a87(0x1eb)));let _0x51f37f=_0x1d9522,_0x1121de=new Map();if(_0x183b98){const _0x465255=consolidateSegmentsByContent([_0x1d9522],_0xbcb054);_0x51f37f=_0x465255[_0x328a87(0x19d)],_0x1121de=_0x465255['nameMapping'];}const _0x13c397=new Map(_0xc1f99c);for(const [_0x56ad59,_0x3742d7]of _0x1121de[_0x328a87(0x1d2)]()){_0x13c397[_0x328a87(0x1c5)](_0x56ad59,_0x3742d7);}for(const [_0x2eac0e,_0x4ba82b]of _0x13c397[_0x328a87(0x1d2)]()){let _0x470ccb=_0x4ba82b,_0x5672f3=0x0;while(_0x13c397['has'](_0x470ccb)&&_0x13c397[_0x328a87(0x1a1)](_0x470ccb)!==_0x470ccb&&_0x5672f3<MAX_MAPPING_CHAIN_DEPTH){_0x470ccb=_0x13c397[_0x328a87(0x1a1)](_0x470ccb),_0x5672f3++;}_0x470ccb!==_0x4ba82b&&_0x13c397[_0x328a87(0x1c5)](_0x2eac0e,_0x470ccb);}for(const _0x512b02 of _0x540fa6){updateSegmentReferences(_0x512b02[_0x328a87(0x1ca)],_0x13c397);}const {merged:_0x2fcded,nameMapping:_0x1b4a53}=consolidateActivationsByContent(_0xa176d[_0x328a87(0x1cc)](_0xb60b7=>_0xb60b7[_0x328a87(0x1dd)][_0x328a87(0x1cf)]));for(const _0x3bf5d2 of _0x540fa6){updateActivationReferences(_0x3bf5d2[_0x328a87(0x1ca)],_0x1b4a53);}let _0x23abcd=_0x4c8a5e[_0x328a87(0x1d6)];if(_0x23abcd?.[_0x328a87(0x19a)]){const _0x43c26a=_0x13c397[_0x328a87(0x1a1)](_0x23abcd[_0x328a87(0x19a)]);_0x43c26a&&(_0x23abcd={..._0x23abcd,'segment':_0x43c26a});}for(const _0xa37cd1 of _0x540fa6){if(_0xa37cd1[_0x328a87(0x1d6)]?.[_0x328a87(0x19a)]){const _0x33792c=_0x13c397[_0x328a87(0x1a1)](_0xa37cd1[_0x328a87(0x1d6)][_0x328a87(0x19a)]);_0x33792c&&(_0xa37cd1[_0x328a87(0x1d6)]={..._0xa37cd1['goal'],'segment':_0x33792c});}}return _0x540fa6[_0x328a87(0x1b1)](_0x58fef3=>_0x58fef3[_0x328a87(0x1d6)])&&(_0x23abcd=undefined),{'type':_0x328a87(0x1a7),'name':_0x4c8a5e['name'],'description':_0x4c8a5e[_0x328a87(0x1be)],'goal':_0x23abcd,'reentry':_0x4c8a5e[_0x328a87(0x1d0)],'segments':Object[_0x328a87(0x19b)](_0x51f37f)['length']>0x0?_0x51f37f:undefined,'activations':Object[_0x328a87(0x19b)](_0x2fcded)[_0x328a87(0x1c7)]>0x0?_0x2fcded:undefined,'journeys':_0x540fa6,'bundle_id':_0x4c8a5e['bundle_id'],'bundle_name':_0x4c8a5e[_0x328a87(0x1b5)]};}export function createJumpTargetCache(){return new Map();}function a135_0x448b(){const _0x346d85=['set','activation_template_id','length','336dFiGSo','versions','stages','conditions','map','.yaml','replace','activations','reentry','all_columns','entries','segments','wait','journeyStages','goal','90kjcaUQ','push','latest','with','8WEpbMB','5isCQnm','yaml','decision_point','condition','attributes','exclude','columns','rule','isArray','version','find','sort','2502678TVqtwO','milestone','toLowerCase','entry_criteria','383881bhtZBn','steps','segment','keys','from','merged','match','trim','connector_config','get','version_number','245070QxaBHo','journeyBundleName','item','values','journey','join','.yml','behavior','startsWith','object','type','launched','index','1078880xWoaiX','some','schedule','stringify','connection','bundle_name','activation','branches','slice','name','30826OZucLl','2347982UnSAGB','state','exit_criteria','description','36lzEDwI','endsWith','string','include','null','163097dwUbDO'];a135_0x448b=function(){return _0x346d85;};return a135_0x448b();}export async function resolveJumpTarget(_0x586b92,_0x2a30e5,_0x55aed6,_0x963640){const _0x57195b=a135_0x2159,_0x4ab3a5=_0x586b92+':'+_0x2a30e5,_0x4868cd=_0x55aed6[_0x57195b(0x1a1)](_0x4ab3a5);if(_0x4868cd)return _0x4868cd;const _0xfd6b31=await _0x963640(_0x586b92),_0x15228a=_0xfd6b31['attributes'][_0x57195b(0x1a4)]||_0xfd6b31[_0x57195b(0x1e0)][_0x57195b(0x1b9)],_0xb0990d=_0xfd6b31[_0x57195b(0x1e0)][_0x57195b(0x1d5)][_0x57195b(0x1e6)](_0x5ba822=>String(_0x5ba822['id'])===String(_0x2a30e5)),_0x1dc22f=_0xb0990d?.[_0x57195b(0x1b9)]||_0x2a30e5,_0x31437f={'journeyName':_0x15228a,'stageName':_0x1dc22f};return _0x55aed6[_0x57195b(0x1c5)](_0x4ab3a5,_0x31437f),_0x31437f;}function a135_0x2159(_0x4216aa,_0x1e3c4c){_0x4216aa=_0x4216aa-0x199;const _0x448b1b=a135_0x448b();let _0x2159e0=_0x448b1b[_0x4216aa];return _0x2159e0;}export function formatApiJourneyName(_0x4b3b06,_0x1519ae){return _0x1519ae+'\x20('+_0x4b3b06+')';}export function isLocalJourneyRef(_0x447a81){const _0x59f4e0=a135_0x2159;return _0x447a81[_0x59f4e0(0x1c0)](_0x59f4e0(0x1a9))||_0x447a81[_0x59f4e0(0x1c0)](_0x59f4e0(0x1cd));}export function buildLocalRuleToNameMapping(_0x309e57){const _0x21bca9=a135_0x2159,_0x3f7564=new Map();if(!_0x309e57)return _0x3f7564;for(const [_0x2896f4,_0x2724e5]of Object[_0x21bca9(0x1d2)](_0x309e57)){if(_0x2724e5[_0x21bca9(0x1e3)]){const _0x5360b1=serializeRule(_0x2724e5[_0x21bca9(0x1e3)]),_0x14f6dc=_0x3f7564['get'](_0x5360b1)||[];_0x14f6dc[_0x21bca9(0x1d8)](_0x2896f4),_0x3f7564[_0x21bca9(0x1c5)](_0x5360b1,_0x14f6dc);}}return _0x3f7564;}export function buildLocalRuleToNameMappingFromJourney(_0x24c579){const _0x1e355e=a135_0x2159,_0x1deff6=_0x24c579[_0x1e355e(0x1d3)];if(!_0x1deff6)return new Map();const _0x43709e=collectSegmentUsageCounts(_0x24c579),_0x4c1d3e=new Map();let _0x28adc1=0x0;for(const [_0x1b7dd1,_0x23e8ca]of Object['entries'](_0x1deff6)){if(!_0x23e8ca['rule']){_0x28adc1++;continue;}const _0x2fed3d=serializeRule(_0x23e8ca[_0x1e355e(0x1e3)]),_0x254ce3=_0x4c1d3e[_0x1e355e(0x1a1)](_0x2fed3d)||[];_0x254ce3['push']({'name':_0x1b7dd1,'index':_0x28adc1}),_0x4c1d3e[_0x1e355e(0x1c5)](_0x2fed3d,_0x254ce3),_0x28adc1++;}const _0x35282b=new Map();for(const [_0x2a29a7,_0x2c6ab8]of _0x4c1d3e){const _0x2bc5c0=_0x2c6ab8[_0x1e355e(0x1b8)]()[_0x1e355e(0x1e7)]((_0x17d5ad,_0x5e1bc1)=>{const _0x19519d=_0x1e355e,_0x507de1=_0x43709e['get'](_0x17d5ad[_0x19519d(0x1b9)])||0x0,_0x13f9f9=_0x43709e[_0x19519d(0x1a1)](_0x5e1bc1[_0x19519d(0x1b9)])||0x0;if(_0x507de1!==_0x13f9f9)return _0x13f9f9-_0x507de1;return _0x17d5ad[_0x19519d(0x1af)]-_0x5e1bc1['index'];})[_0x1e355e(0x1cc)](_0x585102=>_0x585102[_0x1e355e(0x1b9)]);_0x35282b[_0x1e355e(0x1c5)](_0x2a29a7,_0x2bc5c0);}return _0x35282b;}export function collectSegmentUsageCounts(_0x577809){const _0x3f2feb=a135_0x2159,_0x148072=new Map(),_0x5c1302=_0x3f0969=>{const _0x29c540=a135_0x2159;if(!_0x3f0969)return;_0x148072[_0x29c540(0x1c5)](_0x3f0969,(_0x148072[_0x29c540(0x1a1)](_0x3f0969)||0x0)+0x1);},_0x1dcaf2=_0x186499=>{const _0x3e0aec=a135_0x2159;for(const _0x1af1c3 of _0x186499){_0x5c1302(_0x1af1c3[_0x3e0aec(0x1eb)]?.[_0x3e0aec(0x19a)]);if(_0x1af1c3['exit_criteria'])for(const _0x568956 of _0x1af1c3[_0x3e0aec(0x1bd)]){_0x5c1302(_0x568956[_0x3e0aec(0x19a)]);}_0x5c1302(_0x1af1c3[_0x3e0aec(0x1e9)]?.[_0x3e0aec(0x19a)]);if(_0x1af1c3['steps'])for(const _0x4c3776 of _0x1af1c3['steps']){if(_0x4c3776['type']===_0x3e0aec(0x1de))for(const _0x472014 of _0x4c3776[_0x3e0aec(0x1da)][_0x3e0aec(0x1b7)]){_0x5c1302(_0x472014[_0x3e0aec(0x19a)]);}else _0x4c3776[_0x3e0aec(0x1ad)]===_0x3e0aec(0x1d4)&&_0x5c1302(_0x4c3776['with'][_0x3e0aec(0x1df)]?.['segment']);}}};_0x5c1302(_0x577809[_0x3f2feb(0x1d6)]?.[_0x3f2feb(0x19a)]);if(_0x577809['journeys'])for(const _0x545568 of _0x577809['journeys']){_0x5c1302(_0x545568['goal']?.[_0x3f2feb(0x19a)]),_0x1dcaf2(_0x545568[_0x3f2feb(0x1ca)]);}_0x577809[_0x3f2feb(0x1ca)]&&_0x1dcaf2(_0x577809[_0x3f2feb(0x1ca)]);if(_0x577809['versions'])for(const _0x1fb450 of _0x577809[_0x3f2feb(0x1c9)]){_0x1dcaf2(_0x1fb450['stages']);}return _0x148072;}
1
+ (function(_0x1a9cb1,_0x510f1b){const _0x4f517f=a135_0x5508,_0xea41e9=_0x1a9cb1();while(!![]){try{const _0x4b46ce=parseInt(_0x4f517f(0x173))/0x1+parseInt(_0x4f517f(0x1a0))/0x2+-parseInt(_0x4f517f(0x168))/0x3*(-parseInt(_0x4f517f(0x163))/0x4)+-parseInt(_0x4f517f(0x179))/0x5+parseInt(_0x4f517f(0x182))/0x6*(parseInt(_0x4f517f(0x198))/0x7)+parseInt(_0x4f517f(0x170))/0x8+parseInt(_0x4f517f(0x189))/0x9*(-parseInt(_0x4f517f(0x166))/0xa);if(_0x4b46ce===_0x510f1b)break;else _0xea41e9['push'](_0xea41e9['shift']());}catch(_0x1e5e20){_0xea41e9['push'](_0xea41e9['shift']());}}}(a135_0x271f,0xaad2c));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x35eb6c){const _0x1456fe=a135_0x5508;return _0x35eb6c['toLowerCase']()[_0x1456fe(0x1a5)](/\s+/g,'_')[_0x1456fe(0x1a5)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x1456fe(0x1a5)](/_+/g,'_')[_0x1456fe(0x1a5)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5c77a0){const _0x1e5b7b=a135_0x5508,_0x1c8172=_0x5c77a0['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x1c8172){const _0x129aea=_0x1c8172[0x1][_0x1e5b7b(0x178)](),_0x4c62bd=_0x1c8172[0x2],_0x38254a=_0x4c62bd['replace'](/-/g,'')[_0x1e5b7b(0x185)](0x0,0x4)[_0x1e5b7b(0x178)]();return _0x129aea+'_'+_0x38254a;}const _0x36d556=_0x5c77a0[_0x1e5b7b(0x17f)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x36d556){const _0x2fc388=_0x36d556[0x1],_0x42c408=_0x36d556[0x2][_0x1e5b7b(0x178)](),_0x3bd85d=_0x2fc388['replace'](/-/g,'')['slice'](0x0,0x4)[_0x1e5b7b(0x178)]();return _0x42c408+'_'+_0x3bd85d;}return undefined;}function stableStringify(_0x655006){const _0x209757=a135_0x5508;if(Array[_0x209757(0x18e)](_0x655006))return'['+_0x655006[_0x209757(0x172)](_0x58dca8=>stableStringify(_0x58dca8))[_0x209757(0x18f)](',')+']';if(_0x655006&&typeof _0x655006===_0x209757(0x176)){const _0x57ce81=_0x655006,_0x4ce3d3=Object['keys'](_0x57ce81)[_0x209757(0x191)](),_0x125f35=_0x4ce3d3[_0x209757(0x172)](_0x30b615=>'\x22'+_0x30b615+'\x22:'+stableStringify(_0x57ce81[_0x30b615]));return'{'+_0x125f35[_0x209757(0x18f)](',')+'}';}const _0x4e92fb=JSON[_0x209757(0x1a4)](_0x655006);return _0x4e92fb===undefined?_0x209757(0x164):_0x4e92fb;}export function consolidateActivationsByContent(_0x88af0){const _0x19e537=a135_0x5508,_0x576483={},_0x1d6e9c=new Map(),_0x11a0c0=new Map();for(const _0x440ca8 of _0x88af0){if(!_0x440ca8)continue;for(const [_0x2fc042,_0x42f80]of Object[_0x19e537(0x19e)](_0x440ca8)){const _0x263a7a={'name':_0x42f80[_0x19e537(0x196)],'connection':_0x42f80[_0x19e537(0x1a2)],..._0x42f80[_0x19e537(0x183)]!==undefined&&{'all_columns':_0x42f80['all_columns']},..._0x42f80[_0x19e537(0x16c)]!==undefined&&{'columns':_0x42f80[_0x19e537(0x16c)]},..._0x42f80[_0x19e537(0x188)]!==undefined&&{'behavior':_0x42f80[_0x19e537(0x188)]},..._0x42f80[_0x19e537(0x194)]!==undefined&&{'schedule':_0x42f80['schedule']},..._0x42f80[_0x19e537(0x187)]!==undefined&&{'notification':_0x42f80[_0x19e537(0x187)]},..._0x42f80['connector_config']!==undefined&&{'connector_config':_0x42f80[_0x19e537(0x1a8)]},..._0x42f80['activation_template_id']!==undefined&&{'activation_template_id':_0x42f80['activation_template_id']}},_0x40efa9=stableStringify(_0x263a7a),_0x216dfd=_0x11a0c0['get'](_0x40efa9);_0x216dfd?_0x1d6e9c[_0x19e537(0x1ae)](_0x2fc042,_0x216dfd):(_0x576483[_0x2fc042]=_0x42f80,_0x1d6e9c[_0x19e537(0x1ae)](_0x2fc042,_0x2fc042),_0x11a0c0[_0x19e537(0x1ae)](_0x40efa9,_0x2fc042));}}return{'merged':_0x576483,'nameMapping':_0x1d6e9c};}export function updateActivationReferences(_0xff27bb,_0x17f870){const _0x32bbb6=a135_0x5508;if(!_0xff27bb)return;for(const _0x5bebde of _0xff27bb){if(!_0x5bebde['steps'])continue;for(const _0x1a4d6d of _0x5bebde['steps']){if(_0x1a4d6d[_0x32bbb6(0x18c)]===_0x32bbb6(0x1ab)&&_0x1a4d6d[_0x32bbb6(0x16b)]?.[_0x32bbb6(0x1ab)]){const _0x406476=_0x17f870[_0x32bbb6(0x199)](_0x1a4d6d[_0x32bbb6(0x16b)][_0x32bbb6(0x1ab)]);_0x406476&&_0x406476!==_0x1a4d6d['with'][_0x32bbb6(0x1ab)]&&(_0x1a4d6d[_0x32bbb6(0x16b)][_0x32bbb6(0x1ab)]=_0x406476);}}}}export function consolidateSegmentsByContent(_0xf3b6b0,_0x356301){const _0x1877b7=a135_0x5508,_0x15b835={},_0x5590be=new Map(),_0x285517=new Map();for(const _0x3c912c of _0xf3b6b0){if(!_0x3c912c)continue;for(const [_0xcafea2,_0x3e179d]of Object[_0x1877b7(0x19e)](_0x3c912c)){if(!_0x3e179d[_0x1877b7(0x17e)]){_0x15b835[_0xcafea2]=_0x3e179d,_0x5590be[_0x1877b7(0x1ae)](_0xcafea2,_0xcafea2);continue;}const _0x52929a=_0x3e179d[_0x1877b7(0x190)]&&_0x3e179d[_0x1877b7(0x190)][_0x1877b7(0x193)]()?_0x3e179d[_0x1877b7(0x190)]:undefined,_0x23d7fc=JSON[_0x1877b7(0x1a4)]({'description':_0x52929a,'rule':deepSortObject(_0x3e179d[_0x1877b7(0x17e)])}),_0x26685f=_0x285517['get'](_0x23d7fc);if(_0x26685f){const _0x136e98={..._0x3e179d[_0x1877b7(0x190)]!==undefined&&{'description':_0x3e179d[_0x1877b7(0x190)]},'rule':_0x3e179d[_0x1877b7(0x17e)]?deepSortObject(_0x3e179d[_0x1877b7(0x17e)]):_0x3e179d[_0x1877b7(0x17e)]};if(_0xcafea2<_0x26685f){_0x15b835[_0xcafea2]=_0x136e98,delete _0x15b835[_0x26685f];for(const [_0x4fc167,_0x385c22]of _0x5590be[_0x1877b7(0x19e)]()){_0x385c22===_0x26685f&&_0x5590be['set'](_0x4fc167,_0xcafea2);}_0x5590be['set'](_0xcafea2,_0xcafea2),_0x285517['set'](_0x23d7fc,_0xcafea2);}else _0x15b835[_0x26685f]=_0x136e98,_0x5590be[_0x1877b7(0x1ae)](_0xcafea2,_0x26685f);}else{let _0x5efd51=_0xcafea2;if(_0x356301){const _0x283788=_0x356301[_0x1877b7(0x199)](_0x23d7fc);_0x283788&&_0x283788[_0x1877b7(0x17a)]>0x0&&(_0x5efd51=_0x283788[_0x1877b7(0x185)]()[_0x1877b7(0x191)]()[0x0]);}const _0x472be8={..._0x3e179d[_0x1877b7(0x190)]!==undefined&&{'description':_0x3e179d[_0x1877b7(0x190)]},'rule':_0x3e179d['rule']?deepSortObject(_0x3e179d[_0x1877b7(0x17e)]):_0x3e179d['rule']};_0x15b835[_0x5efd51]=_0x472be8,_0x5590be[_0x1877b7(0x1ae)](_0xcafea2,_0x5efd51),_0x285517[_0x1877b7(0x1ae)](_0x23d7fc,_0x5efd51);}}}return{'merged':_0x15b835,'nameMapping':_0x5590be};}export function updateSegmentReferences(_0x564219,_0x46bea1){const _0x4c6658=a135_0x5508;if(!_0x564219)return;for(const _0x3ef78f of _0x564219){if(_0x3ef78f[_0x4c6658(0x184)]?.[_0x4c6658(0x1a7)]){const _0x3c16be=_0x46bea1[_0x4c6658(0x199)](_0x3ef78f[_0x4c6658(0x184)][_0x4c6658(0x1a7)]);_0x3c16be&&(_0x3ef78f[_0x4c6658(0x184)]['segment']=_0x3c16be);}if(_0x3ef78f[_0x4c6658(0x19b)])for(const _0x35f993 of _0x3ef78f[_0x4c6658(0x19b)]){if(_0x35f993[_0x4c6658(0x1a7)]){const _0x5d21f3=_0x46bea1[_0x4c6658(0x199)](_0x35f993['segment']);_0x5d21f3&&(_0x35f993[_0x4c6658(0x1a7)]=_0x5d21f3);}}if(_0x3ef78f[_0x4c6658(0x180)]?.['segment']){const _0x12c28c=_0x46bea1[_0x4c6658(0x199)](_0x3ef78f[_0x4c6658(0x180)][_0x4c6658(0x1a7)]);_0x12c28c&&(_0x3ef78f['milestone'][_0x4c6658(0x1a7)]=_0x12c28c);}if(_0x3ef78f['steps'])for(const _0xe6cef5 of _0x3ef78f[_0x4c6658(0x186)]){if(_0xe6cef5['type']==='decision_point'&&_0xe6cef5[_0x4c6658(0x16b)]?.[_0x4c6658(0x181)])for(const _0x3ef27d of _0xe6cef5[_0x4c6658(0x16b)]['branches']){if(_0x3ef27d[_0x4c6658(0x1a7)]){const _0x29a7f8=_0x46bea1[_0x4c6658(0x199)](_0x3ef27d[_0x4c6658(0x1a7)]);_0x29a7f8&&(_0x3ef27d[_0x4c6658(0x1a7)]=_0x29a7f8);}}if(_0xe6cef5['type']===_0x4c6658(0x177)&&_0xe6cef5['with']?.[_0x4c6658(0x18b)]?.[_0x4c6658(0x1a7)]){const _0x32826f=_0x46bea1[_0x4c6658(0x199)](_0xe6cef5[_0x4c6658(0x16b)]['condition'][_0x4c6658(0x1a7)]);_0x32826f&&(_0xe6cef5['with'][_0x4c6658(0x18b)][_0x4c6658(0x1a7)]=_0x32826f);}}}}function a135_0x271f(){const _0x1ff158=['join','description','sort','version','trim','schedule','bundle_id','name','include','7IlPqpI','get','reentry','exit_criteria','keys','journey','entries','has','2696342JZOCwb','latest','connection','some','stringify','replace','find','segment','connector_config','segments','bundle_name','activation','journeys','item','set','attributes','yaml','.yaml','28nsxAKy','null','activations','10umjoDB','draft','88383LfvzFZ','string','goal','with','columns','startsWith','conditions','launched','1798728erIpSh','push','map','1090737wdVZAN','journeyStages','stages','object','wait','toLowerCase','1541145CFfgNC','length','exclude','merged','journeyBundleName','rule','match','milestone','branches','4732656aBZTcA','all_columns','entry_criteria','slice','steps','notification','behavior','23857479zzhxiI','version_number','condition','type','index','isArray'];a135_0x271f=function(){return _0x1ff158;};return a135_0x271f();}export function updateSegmentRefsInSegments(_0x5b50e1,_0xf331aa){const _0x267a62=a135_0x5508;for(const _0x285ec3 of Object['values'](_0x5b50e1)){_0x285ec3[_0x267a62(0x17e)]&&updateSegmentRefsInRule(_0x285ec3[_0x267a62(0x17e)],_0xf331aa);}}function updateSegmentRefsInRule(_0x15bc64,_0x3e2796){const _0x2915dd=a135_0x5508;if(_0x15bc64===null||typeof _0x15bc64!==_0x2915dd(0x176))return;if(Array[_0x2915dd(0x18e)](_0x15bc64)){for(const _0x1a5602 of _0x15bc64){updateSegmentRefsInRule(_0x1a5602,_0x3e2796);}return;}const _0xa0a01d=_0x15bc64;if((_0xa0a01d['type']===_0x2915dd(0x197)||_0xa0a01d[_0x2915dd(0x18c)]===_0x2915dd(0x17b))&&typeof _0xa0a01d[_0x2915dd(0x1a7)]===_0x2915dd(0x169)){const _0x3c7384=_0x3e2796[_0x2915dd(0x199)](_0xa0a01d['segment']);_0x3c7384&&(_0xa0a01d[_0x2915dd(0x1a7)]=_0x3c7384);}if(_0xa0a01d[_0x2915dd(0x16e)]&&Array[_0x2915dd(0x18e)](_0xa0a01d[_0x2915dd(0x16e)]))for(const _0x47013c of _0xa0a01d[_0x2915dd(0x16e)]){updateSegmentRefsInRule(_0x47013c,_0x3e2796);}}export function buildJourneysArray(_0x3e7d54,_0x5672a5){const _0x21e132=a135_0x5508;return _0x3e7d54[_0x21e132(0x172)](_0x49072a=>{const _0x3bd81a=_0x21e132,_0x5a34f9=_0x5672a5?_0x49072a[_0x3bd81a(0x1ad)]['id']===_0x5672a5:_0x3e7d54[_0x3bd81a(0x17a)]===0x1,_0x13bd4e=_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x1ac)]?.[0x0],_0x44a469=_0x13bd4e?.[_0x3bd81a(0x16a)]||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x16a)],_0x2f2e2a={'version':_0x13bd4e?.[_0x3bd81a(0x192)]||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x192)]||_0x49072a[_0x3bd81a(0x1ad)][_0x3bd81a(0x196)],'state':_0x49072a['item']['state']===_0x3bd81a(0x16f)?_0x3bd81a(0x16f):_0x3bd81a(0x167),'stages':_0x13bd4e?.['stages']||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x175)]||[],'id':_0x13bd4e?.['id']||_0x49072a['yaml']['id'],'version_number':_0x13bd4e?.[_0x3bd81a(0x18a)]||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x18a)]};return _0x44a469&&(_0x2f2e2a['goal']=_0x44a469),_0x5a34f9&&(_0x2f2e2a[_0x3bd81a(0x1a1)]=!![]),_0x2f2e2a;});}export function buildMergedJourneyDef(_0x3844db,_0x37e808,_0x3f84d7){const _0xa65d3=a135_0x5508,_0xd045ed=_0x3844db[0x0][_0xa65d3(0x161)],_0x5f27d2=buildJourneysArray(_0x3844db,_0x3f84d7),{merged:_0x2094e5,nameMapping:_0x22ffdc}=consolidateSegmentsByContent(_0x3844db[_0xa65d3(0x172)](_0x225d52=>_0x225d52[_0xa65d3(0x161)][_0xa65d3(0x1a9)]),_0x37e808);updateSegmentRefsInSegments(_0x2094e5,_0x22ffdc);const _0x3ddd2b=Array['from'](_0x22ffdc[_0xa65d3(0x19e)]())[_0xa65d3(0x1a3)](([_0x98fec6,_0x5db429])=>_0x98fec6!==_0x5db429&&_0x98fec6[_0xa65d3(0x16d)](_0xa65d3(0x184)));let _0x5796b6=_0x2094e5,_0x48d46e=new Map();if(_0x3ddd2b){const _0x23f43d=consolidateSegmentsByContent([_0x2094e5],_0x37e808);_0x5796b6=_0x23f43d[_0xa65d3(0x17c)],_0x48d46e=_0x23f43d['nameMapping'];}const _0x4da1e3=new Map(_0x22ffdc);for(const [_0x423e16,_0x22520d]of _0x48d46e[_0xa65d3(0x19e)]()){_0x4da1e3[_0xa65d3(0x1ae)](_0x423e16,_0x22520d);}for(const [_0x21ca1a,_0x5a7a09]of _0x4da1e3[_0xa65d3(0x19e)]()){let _0x49c42f=_0x5a7a09,_0x37bc19=0x0;while(_0x4da1e3[_0xa65d3(0x19f)](_0x49c42f)&&_0x4da1e3[_0xa65d3(0x199)](_0x49c42f)!==_0x49c42f&&_0x37bc19<MAX_MAPPING_CHAIN_DEPTH){_0x49c42f=_0x4da1e3[_0xa65d3(0x199)](_0x49c42f),_0x37bc19++;}_0x49c42f!==_0x5a7a09&&_0x4da1e3[_0xa65d3(0x1ae)](_0x21ca1a,_0x49c42f);}for(const _0x4d3ccc of _0x5f27d2){updateSegmentReferences(_0x4d3ccc[_0xa65d3(0x175)],_0x4da1e3);}const {merged:_0x38e991,nameMapping:_0xe88e35}=consolidateActivationsByContent(_0x3844db[_0xa65d3(0x172)](_0x207ca1=>_0x207ca1[_0xa65d3(0x161)][_0xa65d3(0x165)]));for(const _0x2c2f0e of _0x5f27d2){updateActivationReferences(_0x2c2f0e[_0xa65d3(0x175)],_0xe88e35);}let _0x13eb2f=_0xd045ed[_0xa65d3(0x16a)];if(_0x13eb2f?.[_0xa65d3(0x1a7)]){const _0x125b46=_0x4da1e3[_0xa65d3(0x199)](_0x13eb2f[_0xa65d3(0x1a7)]);_0x125b46&&(_0x13eb2f={..._0x13eb2f,'segment':_0x125b46});}for(const _0x11ea3d of _0x5f27d2){if(_0x11ea3d[_0xa65d3(0x16a)]?.[_0xa65d3(0x1a7)]){const _0x318150=_0x4da1e3[_0xa65d3(0x199)](_0x11ea3d[_0xa65d3(0x16a)][_0xa65d3(0x1a7)]);_0x318150&&(_0x11ea3d[_0xa65d3(0x16a)]={..._0x11ea3d[_0xa65d3(0x16a)],'segment':_0x318150});}}return _0x5f27d2[_0xa65d3(0x1a3)](_0x4f6d9b=>_0x4f6d9b[_0xa65d3(0x16a)])&&(_0x13eb2f=undefined),{'type':_0xa65d3(0x19d),'name':_0xd045ed['name'],'description':_0xd045ed[_0xa65d3(0x190)],'goal':_0x13eb2f,'reentry':_0xd045ed[_0xa65d3(0x19a)],'segments':Object[_0xa65d3(0x19c)](_0x5796b6)['length']>0x0?_0x5796b6:undefined,'activations':Object[_0xa65d3(0x19c)](_0x38e991)[_0xa65d3(0x17a)]>0x0?_0x38e991:undefined,'journeys':_0x5f27d2,'bundle_id':_0xd045ed[_0xa65d3(0x195)],'bundle_name':_0xd045ed[_0xa65d3(0x1aa)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x52375c,_0x2a27d9,_0x39b44a,_0x21c8cf){const _0xbbf167=a135_0x5508,_0x13d39a=_0x52375c+':'+_0x2a27d9,_0x42eb67=_0x39b44a[_0xbbf167(0x199)](_0x13d39a);if(_0x42eb67)return _0x42eb67;const _0x2cb88a=await _0x21c8cf(_0x52375c),_0x14a052=_0x2cb88a[_0xbbf167(0x160)][_0xbbf167(0x17d)]||_0x2cb88a[_0xbbf167(0x160)]['name'],_0x16b08f=_0x2cb88a[_0xbbf167(0x160)][_0xbbf167(0x174)][_0xbbf167(0x1a6)](_0x2e8f66=>String(_0x2e8f66['id'])===String(_0x2a27d9)),_0x35985f=_0x16b08f?.['name']||_0x2a27d9,_0x22fbf6={'journeyName':_0x14a052,'stageName':_0x35985f};return _0x39b44a[_0xbbf167(0x1ae)](_0x13d39a,_0x22fbf6),_0x22fbf6;}export function formatApiJourneyName(_0x9aae3b,_0x2191ee){return _0x2191ee+'\x20('+_0x9aae3b+')';}export function isLocalJourneyRef(_0x475358){const _0x219d8b=a135_0x5508;return _0x475358['endsWith']('.yml')||_0x475358['endsWith'](_0x219d8b(0x162));}export function buildLocalRuleToNameMapping(_0x11fa5e){const _0x28a073=a135_0x5508,_0x12f8bd=new Map();if(!_0x11fa5e)return _0x12f8bd;for(const [_0x1dbb01,_0x336ddc]of Object['entries'](_0x11fa5e)){if(_0x336ddc['rule']){const _0x1204d8=serializeRule(_0x336ddc[_0x28a073(0x17e)]),_0x23aff6=_0x12f8bd[_0x28a073(0x199)](_0x1204d8)||[];_0x23aff6[_0x28a073(0x171)](_0x1dbb01),_0x12f8bd['set'](_0x1204d8,_0x23aff6);}}return _0x12f8bd;}export function buildLocalRuleToNameMappingFromJourney(_0x1e821d){const _0x1d79eb=a135_0x5508,_0x1fa9bc=_0x1e821d[_0x1d79eb(0x1a9)];if(!_0x1fa9bc)return new Map();const _0x583414=collectSegmentUsageCounts(_0x1e821d),_0x27f1fc=new Map();let _0x38fb7e=0x0;for(const [_0x584f73,_0x105277]of Object[_0x1d79eb(0x19e)](_0x1fa9bc)){if(!_0x105277[_0x1d79eb(0x17e)]){_0x38fb7e++;continue;}const _0x1ba5d5=serializeRule(_0x105277[_0x1d79eb(0x17e)]),_0x58652b=_0x27f1fc[_0x1d79eb(0x199)](_0x1ba5d5)||[];_0x58652b[_0x1d79eb(0x171)]({'name':_0x584f73,'index':_0x38fb7e}),_0x27f1fc[_0x1d79eb(0x1ae)](_0x1ba5d5,_0x58652b),_0x38fb7e++;}const _0x1001e1=new Map();for(const [_0x42de12,_0x582d71]of _0x27f1fc){const _0x40d562=_0x582d71['slice']()[_0x1d79eb(0x191)]((_0x210ece,_0xedc478)=>{const _0xa921aa=_0x1d79eb,_0x8ee21b=_0x583414[_0xa921aa(0x199)](_0x210ece[_0xa921aa(0x196)])||0x0,_0x4fd4d3=_0x583414[_0xa921aa(0x199)](_0xedc478[_0xa921aa(0x196)])||0x0;if(_0x8ee21b!==_0x4fd4d3)return _0x4fd4d3-_0x8ee21b;return _0x210ece[_0xa921aa(0x18d)]-_0xedc478['index'];})[_0x1d79eb(0x172)](_0x2dc7a8=>_0x2dc7a8['name']);_0x1001e1[_0x1d79eb(0x1ae)](_0x42de12,_0x40d562);}return _0x1001e1;}function a135_0x5508(_0x1f6f1d,_0x52f063){_0x1f6f1d=_0x1f6f1d-0x160;const _0x271ffb=a135_0x271f();let _0x5508b4=_0x271ffb[_0x1f6f1d];return _0x5508b4;}export function collectSegmentUsageCounts(_0x8c8981){const _0x47d3af=a135_0x5508,_0x485d26=new Map(),_0x55e44e=_0x3a88b6=>{const _0xa8544b=a135_0x5508;if(!_0x3a88b6)return;_0x485d26['set'](_0x3a88b6,(_0x485d26[_0xa8544b(0x199)](_0x3a88b6)||0x0)+0x1);},_0x20894d=_0x401787=>{const _0x4e0d1c=a135_0x5508;for(const _0x209d37 of _0x401787){_0x55e44e(_0x209d37['entry_criteria']?.[_0x4e0d1c(0x1a7)]);if(_0x209d37[_0x4e0d1c(0x19b)])for(const _0x348342 of _0x209d37['exit_criteria']){_0x55e44e(_0x348342['segment']);}_0x55e44e(_0x209d37[_0x4e0d1c(0x180)]?.[_0x4e0d1c(0x1a7)]);if(_0x209d37[_0x4e0d1c(0x186)])for(const _0x28d253 of _0x209d37[_0x4e0d1c(0x186)]){if(_0x28d253[_0x4e0d1c(0x18c)]==='decision_point')for(const _0x2a7861 of _0x28d253[_0x4e0d1c(0x16b)]['branches']){_0x55e44e(_0x2a7861[_0x4e0d1c(0x1a7)]);}else _0x28d253[_0x4e0d1c(0x18c)]===_0x4e0d1c(0x177)&&_0x55e44e(_0x28d253[_0x4e0d1c(0x16b)][_0x4e0d1c(0x18b)]?.[_0x4e0d1c(0x1a7)]);}}};_0x55e44e(_0x8c8981[_0x47d3af(0x16a)]?.['segment']);if(_0x8c8981[_0x47d3af(0x1ac)])for(const _0x2f9af9 of _0x8c8981[_0x47d3af(0x1ac)]){_0x55e44e(_0x2f9af9['goal']?.[_0x47d3af(0x1a7)]),_0x20894d(_0x2f9af9[_0x47d3af(0x175)]);}_0x8c8981[_0x47d3af(0x175)]&&_0x20894d(_0x8c8981[_0x47d3af(0x175)]);if(_0x8c8981['versions'])for(const _0x56f623 of _0x8c8981['versions']){_0x20894d(_0x56f623[_0x47d3af(0x175)]);}return _0x485d26;}
@@ -1 +1 @@
1
- (function(_0x54a319,_0x3cbb9c){const _0x2aa886=a136_0x1779,_0x1959d2=_0x54a319();while(!![]){try{const _0x566686=parseInt(_0x2aa886(0x197))/0x1*(-parseInt(_0x2aa886(0x135))/0x2)+parseInt(_0x2aa886(0x1ab))/0x3+parseInt(_0x2aa886(0x129))/0x4+parseInt(_0x2aa886(0x166))/0x5+parseInt(_0x2aa886(0x193))/0x6*(parseInt(_0x2aa886(0x1b8))/0x7)+parseInt(_0x2aa886(0x16b))/0x8*(parseInt(_0x2aa886(0x15c))/0x9)+-parseInt(_0x2aa886(0x15b))/0xa;if(_0x566686===_0x3cbb9c)break;else _0x1959d2['push'](_0x1959d2['shift']());}catch(_0x2a4f6b){_0x1959d2['push'](_0x1959d2['shift']());}}}(a136_0x23ae,0xac69a));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x3569d0,_0x1cc71c,_0x4b1816,_0x4b5e4a,_0x45bf8c,_0x4380aa){const _0x512fff=a136_0x1779;return{'level':_0x3569d0,'path':_0x1cc71c,'code':_0x4b1816,'message':_0x4b5e4a,'location':getLocationFromPath(_0x45bf8c[_0x512fff(0x180)],_0x45bf8c[_0x512fff(0x196)],pathToArray(_0x4380aa??_0x1cc71c))};}function validateVersionStructure(_0x2899de,_0x47c6ee){const _0x40f387=a136_0x1779,_0x578e90=[];return _0x2899de[_0x40f387(0x1da)]>MAX_STAGES&&_0x578e90[_0x40f387(0x162)](createIssue(_0x40f387(0x18e),_0x40f387(0x1a3),_0x40f387(0x1bb),_0x40f387(0x172)+_0x2899de[_0x40f387(0x1da)]+_0x40f387(0x1c4)+MAX_STAGES,_0x47c6ee)),_0x578e90;}function validateStageStructure(_0x5228f4,_0x18231d,_0x563778,_0x127d63){const _0x2a1ceb=a136_0x1779,_0xe7d39b=[],_0x5d5075=_0x2a1ceb(0x149)+_0x18231d+']';_0x18231d===0x0&&!_0x5228f4[_0x2a1ceb(0x17e)]&&_0xe7d39b[_0x2a1ceb(0x162)](createIssue(_0x2a1ceb(0x18e),_0x5d5075+_0x2a1ceb(0x169),'MISSING_ENTRY_CRITERIA',_0x2a1ceb(0x1cb)+_0x5228f4[_0x2a1ceb(0x194)]+_0x2a1ceb(0x1c7),_0x127d63,_0x5d5075));const _0xa75cab=_0x18231d===_0x563778-0x1;!_0xa75cab&&!_0x5228f4[_0x2a1ceb(0x1df)]&&_0xe7d39b[_0x2a1ceb(0x162)](createIssue(_0x2a1ceb(0x18e),_0x5d5075+_0x2a1ceb(0x1c9),_0x2a1ceb(0x130),_0x2a1ceb(0x1cb)+_0x5228f4[_0x2a1ceb(0x194)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x127d63,_0x5d5075));(!_0x5228f4[_0x2a1ceb(0x12f)]||_0x5228f4[_0x2a1ceb(0x12f)][_0x2a1ceb(0x1da)]===0x0)&&_0xe7d39b['push'](createIssue(_0x2a1ceb(0x14a),_0x5d5075+'.exit_criteria',_0x2a1ceb(0x1ce),'Stage\x20\x27'+_0x5228f4[_0x2a1ceb(0x194)]+_0x2a1ceb(0x1c5),_0x127d63,_0x5d5075));const _0x429c61=_0x5228f4[_0x2a1ceb(0x1d3)]?.[_0x2a1ceb(0x1da)]??0x0;if(_0x429c61===0x0)_0xe7d39b['push'](createIssue(_0x2a1ceb(0x18e),_0x5d5075+_0x2a1ceb(0x16e),_0x2a1ceb(0x13a),_0x2a1ceb(0x1cb)+_0x5228f4[_0x2a1ceb(0x194)]+'\x27\x20has\x20no\x20steps',_0x127d63,_0x5d5075+'.steps'));else{if(_0x429c61===0x1)_0xe7d39b[_0x2a1ceb(0x162)](createIssue(_0x2a1ceb(0x14a),_0x5d5075+_0x2a1ceb(0x16e),_0x2a1ceb(0x13a),_0x2a1ceb(0x1cb)+_0x5228f4[_0x2a1ceb(0x194)]+_0x2a1ceb(0x134),_0x127d63,_0x5d5075+'.steps'));else _0x429c61<=0x3&&_0xe7d39b[_0x2a1ceb(0x162)](createIssue('warning',_0x5d5075+_0x2a1ceb(0x16e),'FEW_STEPS','Stage\x20\x27'+_0x5228f4['name']+_0x2a1ceb(0x16a)+_0x429c61+_0x2a1ceb(0x192),_0x127d63,_0x5d5075+'.steps'));}return _0xe7d39b;}function validateStep(_0x5bb5e7,_0x27e3f5,_0x261a5f,_0x2c9ed0){const _0x9303d6=a136_0x1779,_0x17c01e=[];if(_0x5bb5e7['type']===_0x9303d6(0x1dd))return _0x5bb5e7['next']&&_0x17c01e[_0x9303d6(0x162)](createIssue(_0x9303d6(0x18e),_0x27e3f5+_0x9303d6(0x1db),_0x9303d6(0x19a),_0x9303d6(0x167)+_0x5bb5e7[_0x9303d6(0x194)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x261a5f)),_0x9303d6(0x14c)in _0x5bb5e7&&_0x5bb5e7[_0x9303d6(0x14c)]!==undefined&&_0x17c01e[_0x9303d6(0x162)](createIssue(_0x9303d6(0x18e),_0x27e3f5+_0x9303d6(0x1b7),_0x9303d6(0x19a),'End\x20step\x20\x27'+_0x5bb5e7['name']+_0x9303d6(0x1c0),_0x261a5f)),_0x17c01e;_0x5bb5e7[_0x9303d6(0x13c)]&&(_0x261a5f[_0x9303d6(0x144)]&&!_0x261a5f[_0x9303d6(0x144)][_0x9303d6(0x146)](_0x5bb5e7[_0x9303d6(0x13c)])&&_0x17c01e[_0x9303d6(0x162)](createIssue(_0x9303d6(0x18e),_0x27e3f5+_0x9303d6(0x1db),'INVALID_NEXT_REFERENCE',_0x9303d6(0x198)+_0x5bb5e7[_0x9303d6(0x13c)]+'\x27',_0x261a5f)));switch(_0x5bb5e7[_0x9303d6(0x12e)]){case _0x9303d6(0x15d):_0x17c01e['push'](...validateWaitStep(_0x5bb5e7,_0x27e3f5,_0x261a5f,_0x2c9ed0));break;case'activation':_0x17c01e[_0x9303d6(0x162)](...validateActivationStep(_0x5bb5e7,_0x27e3f5,_0x261a5f));break;case'decision_point':_0x17c01e[_0x9303d6(0x162)](...validateDecisionPointStep(_0x5bb5e7,_0x27e3f5,_0x261a5f,_0x2c9ed0));break;case _0x9303d6(0x137):_0x17c01e[_0x9303d6(0x162)](...validateAbTestStep(_0x5bb5e7,_0x27e3f5,_0x261a5f,_0x2c9ed0));break;case _0x9303d6(0x1a2):_0x17c01e[_0x9303d6(0x162)](...validateJumpStep(_0x5bb5e7,_0x27e3f5,_0x261a5f));break;}return _0x17c01e;}function validateWaitStep(_0x41bc82,_0x35b0df,_0x4ee3f5,_0x2f9971){const _0x3391af=a136_0x1779,_0x4e81ed=[];if(!_0x41bc82[_0x3391af(0x14c)])return _0x4e81ed[_0x3391af(0x162)](createIssue(_0x3391af(0x18e),_0x35b0df+_0x3391af(0x1b7),'MISSING_WAIT_PARAMS','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x4ee3f5,_0x35b0df)),_0x4e81ed;if(_0x41bc82[_0x3391af(0x14c)][_0x3391af(0x174)]){const _0x498e7d=_0x41bc82['with'][_0x3391af(0x174)];if(_0x498e7d[_0x3391af(0x15f)]){_0x4ee3f5[_0x3391af(0x14b)]?.[_0x3391af(0x133)](_0x498e7d[_0x3391af(0x15f)]);!_0x498e7d[_0x3391af(0x15f)][_0x3391af(0x186)]('ref:')&&(_0x4ee3f5[_0x3391af(0x175)]&&!_0x4ee3f5[_0x3391af(0x175)]['has'](_0x498e7d['segment'])&&_0x4e81ed[_0x3391af(0x162)](createIssue(_0x3391af(0x18e),_0x35b0df+_0x3391af(0x1be),_0x3391af(0x142),_0x3391af(0x13b)+_0x498e7d[_0x3391af(0x15f)]+_0x3391af(0x18c),_0x4ee3f5)));_0x498e7d['next']&&_0x4ee3f5[_0x3391af(0x144)]&&!_0x4ee3f5[_0x3391af(0x144)]['has'](_0x498e7d[_0x3391af(0x13c)])&&_0x4e81ed[_0x3391af(0x162)](createIssue('error',_0x35b0df+_0x3391af(0x1d1),'INVALID_NEXT_REFERENCE',_0x3391af(0x195)+_0x498e7d[_0x3391af(0x13c)]+'\x27',_0x4ee3f5));_0x498e7d[_0x3391af(0x17a)]?.[_0x3391af(0x13c)]&&_0x4ee3f5[_0x3391af(0x144)]&&!_0x4ee3f5[_0x3391af(0x144)][_0x3391af(0x146)](_0x498e7d[_0x3391af(0x17a)]['next'])&&_0x4e81ed['push'](createIssue('error',_0x35b0df+_0x3391af(0x199),_0x3391af(0x160),_0x3391af(0x15e)+_0x498e7d[_0x3391af(0x17a)][_0x3391af(0x13c)]+'\x27',_0x4ee3f5));const _0x4c1096=_0x498e7d[_0x3391af(0x13c)]||_0x41bc82[_0x3391af(0x13c)],_0x48abb3=_0x498e7d[_0x3391af(0x17a)]?.[_0x3391af(0x13c)]||_0x41bc82[_0x3391af(0x13c)];if(_0x4c1096){const _0x2e4328=_0x2f9971[_0x3391af(0x1d8)](_0x4c1096);_0x2e4328?.[_0x3391af(0x12e)]==='merge'&&_0x4e81ed['push'](createIssue('warning',_0x35b0df+_0x3391af(0x1d1),_0x3391af(0x1d4),_0x3391af(0x12d)+_0x4c1096+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x4ee3f5,_0x35b0df+_0x3391af(0x1ac)));}if(_0x48abb3){const _0x32f328=_0x2f9971[_0x3391af(0x1d8)](_0x48abb3);_0x32f328?.[_0x3391af(0x12e)]===_0x3391af(0x1a4)&&_0x4e81ed[_0x3391af(0x162)](createIssue(_0x3391af(0x14a),_0x35b0df+_0x3391af(0x199),_0x3391af(0x1d4),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x48abb3+_0x3391af(0x131),_0x4ee3f5,_0x35b0df+_0x3391af(0x14f)));}}}return _0x4e81ed;}function validateActivationStep(_0x3e9762,_0x169a9f,_0x27c3ec){const _0xe11898=a136_0x1779,_0x12b7a7=[];if(!_0x3e9762[_0xe11898(0x14c)]?.['activation'])return _0x12b7a7[_0xe11898(0x162)](createIssue(_0xe11898(0x18e),_0x169a9f+_0xe11898(0x1b6),_0xe11898(0x1ba),_0xe11898(0x1cf),_0x27c3ec,_0x169a9f)),_0x12b7a7;const _0x5c0e56=_0x3e9762['with']['activation'];return _0x27c3ec['activationKeys']&&!_0x5c0e56[_0xe11898(0x186)]('ref:')&&(!_0x27c3ec[_0xe11898(0x18a)][_0xe11898(0x146)](_0x5c0e56)&&_0x12b7a7[_0xe11898(0x162)](createIssue(_0xe11898(0x18e),_0x169a9f+'.with.activation',_0xe11898(0x1b2),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x5c0e56+_0xe11898(0x145),_0x27c3ec))),_0x12b7a7;}function validateDecisionPointStep(_0x2daeb3,_0x37f8e6,_0x1bea6b,_0x2e9e2e){const _0x8b9fdf=a136_0x1779,_0x5d22fc=[];if(!_0x2daeb3['with']?.['branches']||_0x2daeb3['with'][_0x8b9fdf(0x158)][_0x8b9fdf(0x1da)]===0x0)return _0x5d22fc[_0x8b9fdf(0x162)](createIssue(_0x8b9fdf(0x18e),_0x37f8e6+_0x8b9fdf(0x1b0),_0x8b9fdf(0x1af),_0x8b9fdf(0x188),_0x1bea6b,_0x37f8e6)),_0x5d22fc;for(let _0x491551=0x0;_0x491551<_0x2daeb3[_0x8b9fdf(0x14c)]['branches'][_0x8b9fdf(0x1da)];_0x491551++){const _0x17711c=_0x2daeb3[_0x8b9fdf(0x14c)][_0x8b9fdf(0x158)][_0x491551],_0x148649=_0x37f8e6+_0x8b9fdf(0x151)+_0x491551+']';_0x17711c[_0x8b9fdf(0x15f)]&&!_0x17711c[_0x8b9fdf(0x179)]&&(_0x1bea6b['referencedSegments']?.[_0x8b9fdf(0x133)](_0x17711c[_0x8b9fdf(0x15f)]),!_0x17711c['segment'][_0x8b9fdf(0x186)](_0x8b9fdf(0x16c))&&(_0x1bea6b['embeddedSegments']&&!_0x1bea6b[_0x8b9fdf(0x175)]['has'](_0x17711c['segment'])&&_0x5d22fc['push'](createIssue(_0x8b9fdf(0x18e),_0x148649+_0x8b9fdf(0x1ad),_0x8b9fdf(0x142),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x17711c['segment']+'\x27',_0x1bea6b))));_0x17711c['next']&&_0x1bea6b[_0x8b9fdf(0x144)]&&!_0x1bea6b[_0x8b9fdf(0x144)][_0x8b9fdf(0x146)](_0x17711c['next'])&&_0x5d22fc['push'](createIssue('error',_0x148649+_0x8b9fdf(0x1db),_0x8b9fdf(0x160),_0x8b9fdf(0x1a0)+_0x17711c[_0x8b9fdf(0x13c)]+'\x27',_0x1bea6b));if(_0x17711c[_0x8b9fdf(0x13c)]){const _0x26c11f=_0x2e9e2e[_0x8b9fdf(0x1d8)](_0x17711c[_0x8b9fdf(0x13c)]);_0x26c11f?.[_0x8b9fdf(0x12e)]==='merge'&&_0x5d22fc['push'](createIssue(_0x8b9fdf(0x14a),_0x148649+_0x8b9fdf(0x1db),'BRANCH_DIRECTLY_TO_MERGE',_0x8b9fdf(0x19c)+_0x17711c['name']+_0x8b9fdf(0x13d)+_0x17711c[_0x8b9fdf(0x13c)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x1bea6b));}}return _0x5d22fc;}function validateAbTestStep(_0x5a3176,_0x3abd81,_0x8b0f2e,_0x1eacf4){const _0x5ed1cc=a136_0x1779,_0x4a2137=[];if(!_0x5a3176[_0x5ed1cc(0x14c)]?.[_0x5ed1cc(0x12b)]||_0x5a3176[_0x5ed1cc(0x14c)]['variants'][_0x5ed1cc(0x1da)]===0x0)return _0x4a2137[_0x5ed1cc(0x162)](createIssue(_0x5ed1cc(0x18e),_0x3abd81+'.with.variants',_0x5ed1cc(0x1af),_0x5ed1cc(0x128),_0x8b0f2e,_0x3abd81)),_0x4a2137;const _0x1dcfc7=_0x5a3176[_0x5ed1cc(0x14c)][_0x5ed1cc(0x12b)]['reduce']((_0x189819,_0x32eb1c)=>_0x189819+(_0x32eb1c['percentage']||0x0),0x0);Math['abs'](_0x1dcfc7-0x64)>0.01&&_0x4a2137[_0x5ed1cc(0x162)](createIssue(_0x5ed1cc(0x18e),_0x3abd81+_0x5ed1cc(0x168),_0x5ed1cc(0x154),_0x5ed1cc(0x1b5)+_0x1dcfc7+'%)',_0x8b0f2e));for(let _0x12171c=0x0;_0x12171c<_0x5a3176['with'][_0x5ed1cc(0x12b)]['length'];_0x12171c++){const _0x161f43=_0x5a3176[_0x5ed1cc(0x14c)][_0x5ed1cc(0x12b)][_0x12171c],_0x23f165=_0x3abd81+_0x5ed1cc(0x1c1)+_0x12171c+']';_0x161f43['next']&&_0x8b0f2e['stepNames']&&!_0x8b0f2e['stepNames'][_0x5ed1cc(0x146)](_0x161f43['next'])&&_0x4a2137[_0x5ed1cc(0x162)](createIssue(_0x5ed1cc(0x18e),_0x23f165+_0x5ed1cc(0x1db),_0x5ed1cc(0x160),_0x5ed1cc(0x189)+_0x161f43[_0x5ed1cc(0x13c)]+'\x27',_0x8b0f2e));if(_0x161f43[_0x5ed1cc(0x13c)]){const _0x293ca2=_0x1eacf4[_0x5ed1cc(0x1d8)](_0x161f43[_0x5ed1cc(0x13c)]);_0x293ca2?.[_0x5ed1cc(0x12e)]===_0x5ed1cc(0x1a4)&&_0x4a2137['push'](createIssue(_0x5ed1cc(0x14a),_0x23f165+_0x5ed1cc(0x1db),'BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20variant\x20\x27'+_0x161f43[_0x5ed1cc(0x194)]+_0x5ed1cc(0x13d)+_0x161f43[_0x5ed1cc(0x13c)]+_0x5ed1cc(0x177),_0x8b0f2e));}}return _0x4a2137;}function validateJumpStep(_0x43e0c1,_0x331f6e,_0x4fb42f){const _0xfdc000=a136_0x1779,_0x5bc4b2=[];if(!_0x43e0c1[_0xfdc000(0x14c)]?.['target'])return _0x5bc4b2[_0xfdc000(0x162)](createIssue(_0xfdc000(0x18e),_0x331f6e+_0xfdc000(0x148),'INVALID_JUMP_TARGET','Jump\x20step\x20requires\x20a\x20target',_0x4fb42f,_0x331f6e)),_0x5bc4b2;return(!_0x43e0c1[_0xfdc000(0x14c)][_0xfdc000(0x1d2)]['journey']||!_0x43e0c1[_0xfdc000(0x14c)][_0xfdc000(0x1d2)][_0xfdc000(0x181)])&&_0x5bc4b2[_0xfdc000(0x162)](createIssue(_0xfdc000(0x18e),_0x331f6e+_0xfdc000(0x148),'INVALID_JUMP_TARGET',_0xfdc000(0x19f),_0x4fb42f)),_0x5bc4b2;}function buildConvergenceMap(_0x2e98b2){const _0x47e7d4=a136_0x1779,_0x1a93a7=new Map();function _0x3ea60b(_0x3b80c6,_0x575ec9){const _0x3546bd=a136_0x1779,_0x3fbdc4=_0x1a93a7[_0x3546bd(0x1d8)](_0x3b80c6)||[];_0x3fbdc4[_0x3546bd(0x162)](_0x575ec9),_0x1a93a7[_0x3546bd(0x16d)](_0x3b80c6,_0x3fbdc4);}for(const _0x36385a of _0x2e98b2){_0x36385a[_0x47e7d4(0x13c)]&&_0x3ea60b(_0x36385a['next'],{'stepName':_0x36385a[_0x47e7d4(0x194)],'description':_0x47e7d4(0x156)+_0x36385a[_0x47e7d4(0x194)]+'\x27'});if(_0x36385a['type']===_0x47e7d4(0x1a9)&&_0x36385a[_0x47e7d4(0x14c)]?.[_0x47e7d4(0x158)])for(const _0x1d2114 of _0x36385a[_0x47e7d4(0x14c)][_0x47e7d4(0x158)]){_0x1d2114['next']&&_0x3ea60b(_0x1d2114[_0x47e7d4(0x13c)],{'stepName':_0x36385a[_0x47e7d4(0x194)],'description':_0x47e7d4(0x14e)+_0x1d2114['name']+_0x47e7d4(0x1cd)+_0x36385a[_0x47e7d4(0x194)]+'\x27'});}if(_0x36385a[_0x47e7d4(0x12e)]===_0x47e7d4(0x137)&&_0x36385a[_0x47e7d4(0x14c)]?.[_0x47e7d4(0x12b)])for(const _0x1ed5d1 of _0x36385a[_0x47e7d4(0x14c)][_0x47e7d4(0x12b)]){_0x1ed5d1[_0x47e7d4(0x13c)]&&_0x3ea60b(_0x1ed5d1[_0x47e7d4(0x13c)],{'stepName':_0x36385a['name'],'description':_0x47e7d4(0x139)+_0x1ed5d1[_0x47e7d4(0x194)]+'\x27\x20of\x20\x27'+_0x36385a[_0x47e7d4(0x194)]+'\x27'});}_0x36385a['type']===_0x47e7d4(0x15d)&&_0x36385a[_0x47e7d4(0x14c)]?.[_0x47e7d4(0x174)]&&(_0x36385a[_0x47e7d4(0x14c)][_0x47e7d4(0x174)]['next']&&_0x3ea60b(_0x36385a['with'][_0x47e7d4(0x174)][_0x47e7d4(0x13c)],{'stepName':_0x36385a[_0x47e7d4(0x194)],'description':'condition\x20of\x20\x27'+_0x36385a[_0x47e7d4(0x194)]+'\x27'}),_0x36385a['with']['condition'][_0x47e7d4(0x17a)]?.['next']&&_0x3ea60b(_0x36385a['with'][_0x47e7d4(0x174)][_0x47e7d4(0x17a)][_0x47e7d4(0x13c)],{'stepName':_0x36385a['name'],'description':_0x47e7d4(0x1bc)+_0x36385a[_0x47e7d4(0x194)]+'\x27'}));}return _0x1a93a7;}function a136_0x23ae(){const _0x485101=['\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','Merge\x20step\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','610854PiEBXo','name','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','source','1pHPEQZ','Step\x20references\x20non-existent\x20step\x20\x27','.with.condition.timeout.next','END_STEP_HAS_NEXT_OR_WITH','keys','Decision\x20branch\x20\x27','SINGLE_INPUT_MERGE','version','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','Journey\x20has\x20no\x20goal\x20defined','jump','stages','merge','Duplicate\x20step\x20name\x20\x27','data','DUPLICATE_LATEST','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','decision_point','versions[','2012793KQALwO','.with.condition','.segment','rule','MISSING_CONDITIONS','.with.branches','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','MISSING_ACTIVATION_DEFINITION','.name','\x27\x20has\x20no\x20end\x20step','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','.with.activation','.with','42uupfgf','launched','MISSING_ACTIVATION_REF','TOO_MANY_STAGES','timeout\x20of\x20\x27','DUPLICATE_STEP_NAME','.with.condition.segment','endsWith','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','.with.variants[','goalIsInherited','MISSING_END_STEP','\x20stages\x20but\x20maximum\x20is\x20','\x27\x20has\x20no\x20exit_criteria\x20defined','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','MISSING_GOAL','.milestone',').\x20Merge\x20is\x20unnecessary.','Stage\x20\x27','level','\x27\x20of\x20\x27','MISSING_EXIT_CRITERIA','Activation\x20step\x20requires\x20an\x20activation\x20reference','trim','.with.condition.next','target','steps','BRANCH_DIRECTLY_TO_MERGE','Journey\x20can\x20have\x20at\x20most\x20one\x20','Journey\x20name\x20is\x20required','Embedded\x20segment\x20\x27','get','state','length','.next','match','end','.stages','milestone','indices','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','1873036tIPGso','journeys','variants','JOURNEY_SCHEMA_ERROR','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','type','exit_criteria','MISSING_MILESTONE','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','activation','add','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','2166940FNYMYV','segments.','ab_test','safeParse','variant\x20\x27','INSUFFICIENT_STEPS','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','next','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','values','journeys[','excluded_','map','MISSING_SEGMENT_REFERENCE','UNUSED_EMBEDDED_SEGMENT','stepNames','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','has','activations','.with.target','stages[','warning','referencedSegments','with','\x27\x20(from:\x20','branch\x20\x27','.with.condition.timeout','sort','.with.branches[',').\x20Use\x20a\x20merge\x20step.','description','INVALID_AB_TEST_PERCENTAGES','.steps[','step\x20\x27','success','branches','replace','skipSchema','13670690PDtDXO','95868klYSnd','wait','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','segment','INVALID_NEXT_REFERENCE','includes','push','segments','code','filter','3198765RyuZDz','End\x20step\x20\x27','.with.variants','.entry_criteria','\x27\x20has\x20only\x20','576NQwfls','ref:','set','.steps','path','MISSING_NAME','symbol','Journey\x20has\x20','MISSING_STAGES','condition','embeddedSegments','versions','\x27\x20with\x20no\x20action\x20in\x20between','some','excluded','timeout','journeys,\x20stages,\x20or\x20versions','\x20(across\x20','MERGE_TO_MERGE_CHAIN','entry_criteria','.exit_criteria[','document','stage','goal','issues','.rule','size','startsWith','\x27\x20(first\x20defined\x20at\x20steps[','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','activationKeys','every','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','message','error','Criteria\x20references\x20undefined\x20segment\x20\x27'];a136_0x23ae=function(){return _0x485101;};return a136_0x23ae();}function validateFlowControl(_0x565a26,_0x24a479,_0x2c69db){const _0x44cf50=a136_0x1779,_0x6d007f=[],_0x508a29='stages['+_0x24a479+']',_0x27235a=_0x565a26[_0x44cf50(0x1d3)]||[];if(_0x27235a[_0x44cf50(0x1da)]===0x0)return _0x6d007f;const _0x217f6c=new Map();for(const _0x5b954d of _0x27235a){_0x5b954d[_0x44cf50(0x194)]&&_0x217f6c[_0x44cf50(0x16d)](_0x5b954d[_0x44cf50(0x194)],_0x5b954d);}const _0x303759=buildConvergenceMap(_0x27235a),_0x164fbe=_0x27235a[_0x44cf50(0x178)](_0x54ecef=>_0x54ecef[_0x44cf50(0x12e)]===_0x44cf50(0x1dd));!_0x164fbe&&_0x6d007f[_0x44cf50(0x162)](createIssue(_0x44cf50(0x18e),_0x508a29+_0x44cf50(0x16e),_0x44cf50(0x1c3),_0x44cf50(0x1cb)+_0x565a26[_0x44cf50(0x194)]+_0x44cf50(0x1b4),_0x2c69db));for(const [_0xa0570b,_0x41630f]of _0x303759){const _0x4ddc80=_0x217f6c['get'](_0xa0570b);if(!_0x4ddc80)continue;if(_0x41630f[_0x44cf50(0x1da)]>0x1&&_0x4ddc80[_0x44cf50(0x12e)]!=='merge'){const _0x8f38aa=_0x41630f[_0x44cf50(0x141)](_0x318b0b=>_0x318b0b[_0x44cf50(0x153)])['join'](',\x20');_0x6d007f[_0x44cf50(0x162)](createIssue(_0x44cf50(0x18e),_0x508a29+_0x44cf50(0x16e),'CONVERGENCE_WITHOUT_MERGE',_0x44cf50(0x127)+_0xa0570b+_0x44cf50(0x14d)+_0x8f38aa+_0x44cf50(0x152),_0x2c69db));}_0x41630f[_0x44cf50(0x1da)]===0x1&&_0x4ddc80[_0x44cf50(0x12e)]==='merge'&&_0x6d007f[_0x44cf50(0x162)](createIssue(_0x44cf50(0x14a),_0x508a29+_0x44cf50(0x16e),_0x44cf50(0x19d),_0x44cf50(0x191)+_0xa0570b+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x41630f[0x0][_0x44cf50(0x153)]+_0x44cf50(0x1ca),_0x2c69db));}for(const _0x79e0db of _0x27235a){if(_0x79e0db[_0x44cf50(0x12e)]===_0x44cf50(0x1a4)&&_0x79e0db[_0x44cf50(0x13c)]){const _0x14621b=_0x217f6c[_0x44cf50(0x1d8)](_0x79e0db['next']);_0x14621b?.[_0x44cf50(0x12e)]===_0x44cf50(0x1a4)&&_0x6d007f[_0x44cf50(0x162)](createIssue(_0x44cf50(0x18e),_0x508a29+_0x44cf50(0x16e),_0x44cf50(0x17d),_0x44cf50(0x191)+_0x79e0db['name']+_0x44cf50(0x190)+_0x79e0db[_0x44cf50(0x13c)]+_0x44cf50(0x1a8),_0x2c69db));}}return _0x6d007f;}function a136_0x1779(_0x599d84,_0x22f252){_0x599d84=_0x599d84-0x127;const _0x23ae4c=a136_0x23ae();let _0x17799e=_0x23ae4c[_0x599d84];return _0x17799e;}function validateCriteria(_0x526f2e,_0x43b47f,_0x9dd6b0){const _0x35c617=a136_0x1779,_0x101b60=[];return _0x526f2e['segment']&&(_0x9dd6b0['referencedSegments']?.[_0x35c617(0x133)](_0x526f2e[_0x35c617(0x15f)]),!_0x526f2e['segment'][_0x35c617(0x186)]('ref:')&&(_0x9dd6b0['embeddedSegments']&&!_0x9dd6b0[_0x35c617(0x175)][_0x35c617(0x146)](_0x526f2e[_0x35c617(0x15f)])&&_0x101b60[_0x35c617(0x162)](createIssue(_0x35c617(0x18e),_0x43b47f+'.segment',_0x35c617(0x142),_0x35c617(0x18f)+_0x526f2e['segment']+'\x27',_0x9dd6b0)))),_0x101b60;}function validateEmbeddedSegment(_0x58f9fe,_0x55ff1f,_0xaec407){const _0x13d25c=a136_0x1779,_0x11627d=[];return _0x58f9fe['rule']&&_0x11627d[_0x13d25c(0x162)](...validateRuleDef(_0x58f9fe[_0x13d25c(0x1ae)],_0x55ff1f+_0x13d25c(0x184),_0xaec407)),_0x11627d;}function validateStage(_0x4f8a63,_0x318c8c,_0x12b720,_0x25e826){const _0x29c85d=a136_0x1779,_0x289e93=[],_0x2d1a55='stages['+_0x318c8c+']',_0x16f81e=new Map(),_0x57fb6e=new Map();if(_0x4f8a63[_0x29c85d(0x1d3)]){for(let _0x302c80=0x0;_0x302c80<_0x4f8a63[_0x29c85d(0x1d3)][_0x29c85d(0x1da)];_0x302c80++){const _0x3479df=_0x4f8a63[_0x29c85d(0x1d3)][_0x302c80];_0x3479df['name']&&_0x16f81e[_0x29c85d(0x16d)](_0x3479df[_0x29c85d(0x194)],_0x3479df);}for(let _0x36df8f=0x0;_0x36df8f<_0x4f8a63[_0x29c85d(0x1d3)][_0x29c85d(0x1da)];_0x36df8f++){const _0x59e47c=_0x4f8a63[_0x29c85d(0x1d3)][_0x36df8f],_0x48811d=_0x2d1a55+_0x29c85d(0x155)+_0x36df8f+']';if(_0x59e47c[_0x29c85d(0x194)]){if(_0x57fb6e['has'](_0x59e47c[_0x29c85d(0x194)])){const _0x40cf28=_0x57fb6e['get'](_0x59e47c[_0x29c85d(0x194)]);_0x289e93[_0x29c85d(0x162)](createIssue(_0x29c85d(0x18e),_0x48811d+_0x29c85d(0x1b3),_0x29c85d(0x1bd),_0x29c85d(0x1a5)+_0x59e47c[_0x29c85d(0x194)]+_0x29c85d(0x187)+_0x40cf28+'])',_0x25e826));}else _0x57fb6e[_0x29c85d(0x16d)](_0x59e47c['name'],_0x36df8f);}_0x289e93[_0x29c85d(0x162)](...validateStep(_0x59e47c,_0x48811d,_0x25e826,_0x16f81e));}}_0x4f8a63['entry_criteria']&&_0x289e93['push'](...validateCriteria(_0x4f8a63['entry_criteria'],_0x2d1a55+'.entry_criteria',_0x25e826));if(_0x4f8a63['exit_criteria'])for(let _0x43644f=0x0;_0x43644f<_0x4f8a63['exit_criteria']['length'];_0x43644f++){_0x289e93[_0x29c85d(0x162)](...validateCriteria(_0x4f8a63[_0x29c85d(0x12f)][_0x43644f],_0x2d1a55+_0x29c85d(0x17f)+_0x43644f+']',_0x25e826));}return _0x4f8a63[_0x29c85d(0x1df)]&&_0x289e93['push'](...validateCriteria(_0x4f8a63['milestone'],_0x2d1a55+_0x29c85d(0x1c9),_0x25e826)),_0x289e93['push'](...validateStageStructure(_0x4f8a63,_0x318c8c,_0x12b720,_0x25e826)),_0x289e93[_0x29c85d(0x162)](...validateFlowControl(_0x4f8a63,_0x318c8c,_0x25e826)),_0x289e93;}function validateStagesForVersion(_0x487732,_0x5ece82,_0x373aef,_0x15ab3e,_0x4257b4,_0xdf7e9d,_0x28ef1a){const _0xff8ab3=a136_0x1779;if(_0x487732[_0xff8ab3(0x1da)]===0x0){_0x4257b4[_0xff8ab3(0x162)]({'level':'error','path':_0x15ab3e+_0xff8ab3(0x1a3),'code':'MISSING_STAGES','message':_0xff8ab3(0x1b1),'location':getLocationFromPath(_0x373aef[_0xff8ab3(0x180)],_0x373aef[_0xff8ab3(0x196)],[_0xff8ab3(0x1a3)])});return;}const _0x4286c9=new Set();for(const _0x243941 of _0x487732){if(_0x243941[_0xff8ab3(0x1d3)])for(const _0x2f51c3 of _0x243941[_0xff8ab3(0x1d3)]){_0x2f51c3[_0xff8ab3(0x194)]&&_0x4286c9[_0xff8ab3(0x133)](_0x2f51c3[_0xff8ab3(0x194)]);}}const _0x1282c3={..._0x373aef,'stepNames':_0x4286c9},_0xf87c6c=validateVersionStructure(_0x487732,_0x1282c3);for(const _0x5492ba of _0xf87c6c){const _0x34d0e9=_0x15ab3e?{..._0x5492ba,'path':''+_0x15ab3e+_0x5492ba[_0xff8ab3(0x16f)]}:_0x5492ba;if(_0x34d0e9[_0xff8ab3(0x1cc)]==='error')_0x4257b4[_0xff8ab3(0x162)](_0x34d0e9);else _0xdf7e9d[_0xff8ab3(0x162)](_0x34d0e9);}for(let _0x122d6b=0x0;_0x122d6b<_0x487732[_0xff8ab3(0x1da)];_0x122d6b++){const _0x4e7739=validateStage(_0x487732[_0x122d6b],_0x122d6b,_0x487732[_0xff8ab3(0x1da)],_0x1282c3);for(const _0x5b3996 of _0x4e7739){const _0x327249=_0x15ab3e?{..._0x5b3996,'path':''+_0x15ab3e+_0x5b3996['path']}:_0x5b3996;if(_0x327249[_0xff8ab3(0x1cc)]==='error')_0x4257b4[_0xff8ab3(0x162)](_0x327249);else _0xdf7e9d[_0xff8ab3(0x162)](_0x327249);}}if(_0x5ece82['goal']){const _0x38abb=_0x28ef1a?.[_0xff8ab3(0x1c2)]?_0xff8ab3(0x182):_0x15ab3e+_0xff8ab3(0x182),_0x2a7af3=validateCriteria(_0x5ece82['goal'],_0x38abb,_0x1282c3);for(const _0x4d76e3 of _0x2a7af3){if(_0x4d76e3[_0xff8ab3(0x1cc)]===_0xff8ab3(0x18e))_0x4257b4[_0xff8ab3(0x162)](_0x4d76e3);else _0xdf7e9d[_0xff8ab3(0x162)](_0x4d76e3);}}}function extractVersionIndex(_0x444113){const _0x48f770=a136_0x1779,_0x43fcbd=_0x444113[_0x48f770(0x1dc)](/^journeys\[(\d+)\]\./);return _0x43fcbd?_0x43fcbd[0x1]:undefined;}function deduplicateAcrossVersions(_0xc1306b){const _0x56cc99=a136_0x1779,_0x2cc581=new Map();for(let _0x1f9ca4=0x0;_0x1f9ca4<_0xc1306b[_0x56cc99(0x1da)];_0x1f9ca4++){const _0x2982e1=_0xc1306b[_0x1f9ca4][_0x56cc99(0x164)]+':'+_0xc1306b[_0x1f9ca4][_0x56cc99(0x18d)],_0x4ed9d4=extractVersionIndex(_0xc1306b[_0x1f9ca4][_0x56cc99(0x16f)]),_0x45c815=_0x2cc581[_0x56cc99(0x1d8)](_0x2982e1);if(_0x45c815){_0x45c815[_0x56cc99(0x1e0)][_0x56cc99(0x162)](_0x1f9ca4);if(_0x4ed9d4)_0x45c815[_0x56cc99(0x176)]['add'](_0x4ed9d4);}else _0x2cc581[_0x56cc99(0x16d)](_0x2982e1,{'indices':[_0x1f9ca4],'versions':new Set(_0x4ed9d4?[_0x4ed9d4]:[])});}const _0x4d7d68=new Set();for(const {indices:_0x1b873b,versions:_0x5f20f2}of _0x2cc581[_0x56cc99(0x13e)]()){if(_0x5f20f2[_0x56cc99(0x185)]<=0x1)continue;const _0x2ecce9=_0xc1306b[_0x1b873b[0x0]];_0x2ecce9[_0x56cc99(0x16f)]=_0x2ecce9['path'][_0x56cc99(0x159)](/^journeys\[\d+\]\./,''),_0x2ecce9[_0x56cc99(0x18d)]=_0x2ecce9[_0x56cc99(0x18d)]+_0x56cc99(0x17c)+_0x5f20f2[_0x56cc99(0x185)]+'\x20versions)';for(let _0x471fd5=0x1;_0x471fd5<_0x1b873b[_0x56cc99(0x1da)];_0x471fd5++){_0x4d7d68[_0x56cc99(0x133)](_0x1b873b[_0x471fd5]);}}const _0x1cf320=[..._0x4d7d68][_0x56cc99(0x150)]((_0x1f4164,_0xd6a280)=>_0xd6a280-_0x1f4164);for(const _0x57f3c4 of _0x1cf320){_0xc1306b['splice'](_0x57f3c4,0x1);}}export function validateJourneyDef(_0x1424d2,_0x4e8d07={},_0x12e844={}){const _0xd1d852=a136_0x1779;if(_0x12e844[_0xd1d852(0x15a)])return runJourneySemanticChecks(_0x1424d2,_0x4e8d07);const _0x3ba911=JourneyDefSchema[_0xd1d852(0x138)](_0x1424d2);if(_0x3ba911[_0xd1d852(0x157)])return runJourneySemanticChecks(_0x3ba911[_0xd1d852(0x1a6)],_0x4e8d07);return zodErrorsToJourneyValidationResult(_0x3ba911[_0xd1d852(0x18e)],_0x4e8d07);}function zodErrorsToJourneyValidationResult(_0x3c23f7,_0x4c1cc2){const _0x55b0fd=a136_0x1779,_0x538cf0=flattenZodIssues(_0x3c23f7[_0x55b0fd(0x183)]),_0xe4bae=_0x538cf0[_0x55b0fd(0x141)](_0x1abd80=>{const _0x4704dc=_0x55b0fd,_0x8b4e45=formatZodPath(_0x1abd80[_0x4704dc(0x16f)]),_0x4bb0b6=mapJourneyZodIssueToCode(_0x1abd80,_0x8b4e45),_0x5d1320=getLocationFromPath(_0x4c1cc2[_0x4704dc(0x180)],_0x4c1cc2['source'],_0x1abd80[_0x4704dc(0x16f)][_0x4704dc(0x141)](_0x3f097d=>typeof _0x3f097d===_0x4704dc(0x171)?String(_0x3f097d):_0x3f097d));return{'level':_0x4704dc(0x18e),'path':_0x8b4e45,'code':_0x4bb0b6,'message':_0x1abd80[_0x4704dc(0x18d)],..._0x5d1320&&{'location':_0x5d1320}};});return{'valid':![],'errors':_0xe4bae,'warnings':[]};}function mapJourneyZodIssueToCode(_0xb00f57,_0x2e3329){const _0x1f9573=a136_0x1779;if(_0x2e3329===_0x1f9573(0x194))return _0x1f9573(0x170);if(_0x2e3329[_0x1f9573(0x1bf)]('.type')&&_0x2e3329['includes'](_0x1f9573(0x1d3)))return _0x1f9573(0x12c);if(_0x2e3329===_0x1f9573(0x1a3)||_0x2e3329['endsWith'](_0x1f9573(0x1de)))return'MISSING_STAGES';if(_0x2e3329===''&&_0xb00f57['message'][_0x1f9573(0x161)](_0x1f9573(0x17b)))return _0x1f9573(0x173);if(_0x2e3329[_0x1f9573(0x161)](_0x1f9573(0x132)))return'ACTIVATION_SCHEMA_ERROR';return _0x1f9573(0x12c);}function runJourneySemanticChecks(_0x577df4,_0x52a196){const _0x4192b7=a136_0x1779,_0xc91716=[],_0x19fe8e=[];(!_0x577df4[_0x4192b7(0x194)]||_0x577df4[_0x4192b7(0x194)][_0x4192b7(0x1d0)]()==='')&&_0xc91716[_0x4192b7(0x162)]({'level':_0x4192b7(0x18e),'path':_0x4192b7(0x194),'code':'MISSING_NAME','message':_0x4192b7(0x1d6),'location':getLocationFromPath(_0x52a196['document'],_0x52a196['source'],[_0x4192b7(0x194)])});const _0x2444be=new Set();if(_0x577df4['segments'])for(const _0x20c3c7 of Object[_0x4192b7(0x19b)](_0x577df4[_0x4192b7(0x163)])){_0x2444be[_0x4192b7(0x133)](_0x20c3c7);}const _0x24ab67=new Set();if(_0x577df4[_0x4192b7(0x147)])for(const _0x82f496 of Object[_0x4192b7(0x19b)](_0x577df4[_0x4192b7(0x147)])){_0x24ab67['add'](_0x82f496);}const _0x24dae3=new Set(),_0x2562df={..._0x52a196,'embeddedSegments':_0x2444be,'referencedSegments':_0x24dae3,'activationKeys':_0x24ab67[_0x4192b7(0x185)]>0x0?_0x24ab67:undefined};if(_0x577df4[_0x4192b7(0x163)])for(const [_0x733e97,_0x17a38b]of Object['entries'](_0x577df4[_0x4192b7(0x163)])){const _0x948306=validateEmbeddedSegment(_0x17a38b,_0x4192b7(0x136)+_0x733e97,_0x2562df);for(const _0x2e500b of _0x948306){if(_0x2e500b['level']===_0x4192b7(0x18e))_0xc91716[_0x4192b7(0x162)](_0x2e500b);else _0x19fe8e[_0x4192b7(0x162)](_0x2e500b);}}const _0x212018=!!_0x577df4[_0x4192b7(0x182)],_0x3f442f=_0x577df4['journeys']?.[_0x4192b7(0x18b)](_0x340818=>!!_0x340818[_0x4192b7(0x182)])??![];!_0x212018&&!_0x3f442f&&_0x19fe8e[_0x4192b7(0x162)]({'level':_0x4192b7(0x14a),'path':_0x4192b7(0x182),'code':_0x4192b7(0x1c8),'message':_0x4192b7(0x1a1),'location':getLocationFromPath(_0x52a196['document'],_0x52a196[_0x4192b7(0x196)],[_0x4192b7(0x182)])});const _0x18a430=_0x577df4[_0x4192b7(0x12a)]??_0x577df4[_0x4192b7(0x176)];if(_0x18a430&&_0x18a430[_0x4192b7(0x165)](_0x4d5e2f=>_0x4d5e2f['latest']===!![])[_0x4192b7(0x1da)]>0x1){const _0x124e2f=_0x577df4[_0x4192b7(0x12a)]?_0x4192b7(0x12a):_0x4192b7(0x176);_0xc91716[_0x4192b7(0x162)]({'level':'error','path':_0x124e2f,'code':_0x4192b7(0x1a7),'message':_0x4192b7(0x1d5)+(_0x124e2f==='journeys'?'journey\x20entry':_0x4192b7(0x19e))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x52a196[_0x4192b7(0x180)],_0x52a196['source'],[_0x124e2f])});}if(_0x577df4[_0x4192b7(0x12a)]&&_0x577df4[_0x4192b7(0x12a)][_0x4192b7(0x1da)]>0x0)for(let _0x33209d=0x0;_0x33209d<_0x577df4[_0x4192b7(0x12a)][_0x4192b7(0x1da)];_0x33209d++){const _0x5742b1=_0x577df4[_0x4192b7(0x12a)][_0x33209d];if(_0x577df4[_0x4192b7(0x12a)][_0x4192b7(0x1da)]>0x1&&_0x5742b1[_0x4192b7(0x1d9)]===_0x4192b7(0x1b9))continue;const _0x714794=_0x5742b1[_0x4192b7(0x1a3)]||[],_0x44fe82=_0x4192b7(0x13f)+_0x33209d+'].',_0x2a0926=!!_0x5742b1[_0x4192b7(0x182)],_0x35fcc7=_0x2a0926?{..._0x577df4,'goal':_0x5742b1['goal']}:_0x577df4;validateStagesForVersion(_0x714794,_0x35fcc7,_0x2562df,_0x44fe82,_0xc91716,_0x19fe8e,{'goalIsInherited':!_0x2a0926});}else{if(_0x577df4[_0x4192b7(0x176)]&&_0x577df4[_0x4192b7(0x176)][_0x4192b7(0x1da)]>0x0)for(let _0x48f6e4=0x0;_0x48f6e4<_0x577df4[_0x4192b7(0x176)][_0x4192b7(0x1da)];_0x48f6e4++){const _0x147f50=_0x577df4['versions'][_0x48f6e4];if(_0x577df4[_0x4192b7(0x176)][_0x4192b7(0x1da)]>0x1&&_0x147f50[_0x4192b7(0x1d9)]===_0x4192b7(0x1b9))continue;const _0x119128=_0x147f50[_0x4192b7(0x1a3)]||[],_0x235bcd=_0x4192b7(0x1aa)+_0x48f6e4+'].';validateStagesForVersion(_0x119128,_0x577df4,_0x2562df,_0x235bcd,_0xc91716,_0x19fe8e);}else{const _0xd8d3b1=_0x577df4[_0x4192b7(0x1a3)]||[];validateStagesForVersion(_0xd8d3b1,_0x577df4,_0x2562df,'',_0xc91716,_0x19fe8e);}}_0x577df4[_0x4192b7(0x12a)]&&_0x577df4[_0x4192b7(0x12a)]['length']>0x1&&(deduplicateAcrossVersions(_0xc91716),deduplicateAcrossVersions(_0x19fe8e));for(const _0x37953f of _0x2444be){!_0x24dae3[_0x4192b7(0x146)](_0x37953f)&&!_0x37953f[_0x4192b7(0x186)](_0x4192b7(0x140))&&_0x19fe8e[_0x4192b7(0x162)]({'level':_0x4192b7(0x14a),'path':_0x4192b7(0x136)+_0x37953f,'code':_0x4192b7(0x143),'message':_0x4192b7(0x1d7)+_0x37953f+_0x4192b7(0x1c6),'location':getLocationFromPath(_0x52a196['document'],_0x52a196['source'],['segments',_0x37953f])});}return{'valid':_0xc91716[_0x4192b7(0x1da)]===0x0,'errors':_0xc91716,'warnings':_0x19fe8e};}
1
+ (function(_0x285eff,_0x4ffb15){const _0x59dece=a136_0x43e8,_0x119971=_0x285eff();while(!![]){try{const _0x4f690f=parseInt(_0x59dece(0x164))/0x1+parseInt(_0x59dece(0xf8))/0x2*(parseInt(_0x59dece(0x160))/0x3)+-parseInt(_0x59dece(0x11c))/0x4*(parseInt(_0x59dece(0x139))/0x5)+-parseInt(_0x59dece(0x115))/0x6+-parseInt(_0x59dece(0x16b))/0x7+-parseInt(_0x59dece(0x1a8))/0x8*(parseInt(_0x59dece(0x120))/0x9)+parseInt(_0x59dece(0x138))/0xa;if(_0x4f690f===_0x4ffb15)break;else _0x119971['push'](_0x119971['shift']());}catch(_0x5e0d4a){_0x119971['push'](_0x119971['shift']());}}}(a136_0x3e32,0xee344));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5c71cc,_0x37bc24,_0x301579,_0x28986d,_0x397714,_0x4115ba){const _0x512576=a136_0x43e8;return{'level':_0x5c71cc,'path':_0x37bc24,'code':_0x301579,'message':_0x28986d,'location':getLocationFromPath(_0x397714[_0x512576(0x17b)],_0x397714[_0x512576(0x108)],pathToArray(_0x4115ba??_0x37bc24))};}function validateVersionStructure(_0x2a9a3b,_0x117538){const _0x3a53ab=a136_0x43e8,_0x2582a1=[];return _0x2a9a3b[_0x3a53ab(0x135)]>MAX_STAGES&&_0x2582a1[_0x3a53ab(0xfd)](createIssue(_0x3a53ab(0x13b),_0x3a53ab(0xfa),_0x3a53ab(0x144),_0x3a53ab(0x15d)+_0x2a9a3b[_0x3a53ab(0x135)]+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x117538)),_0x2582a1;}function a136_0x43e8(_0x2f14bd,_0x5867e4){_0x2f14bd=_0x2f14bd-0xf5;const _0x3e32d2=a136_0x3e32();let _0x43e8c6=_0x3e32d2[_0x2f14bd];return _0x43e8c6;}function validateStageStructure(_0x29ec7f,_0x2a7e1d,_0x515ee0,_0x201c4f){const _0x5cd894=a136_0x43e8,_0xa08753=[],_0x1092a0='stages['+_0x2a7e1d+']';_0x2a7e1d===0x0&&!_0x29ec7f[_0x5cd894(0x192)]&&_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x13b),_0x1092a0+_0x5cd894(0x191),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x172),_0x201c4f,_0x1092a0));const _0xfafad6=_0x2a7e1d===_0x515ee0-0x1;!_0xfafad6&&!_0x29ec7f['milestone']&&_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x13b),_0x1092a0+_0x5cd894(0x14a),'MISSING_MILESTONE',_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x193),_0x201c4f,_0x1092a0));(!_0x29ec7f['exit_criteria']||_0x29ec7f['exit_criteria'][_0x5cd894(0x135)]===0x0)&&_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x163),_0x1092a0+_0x5cd894(0x11a),'MISSING_EXIT_CRITERIA',_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x201c4f,_0x1092a0));const _0x2d38c9=_0x29ec7f[_0x5cd894(0xfe)]?.[_0x5cd894(0x135)]??0x0;if(_0x2d38c9===0x0)_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x13b),_0x1092a0+_0x5cd894(0x12e),'INSUFFICIENT_STEPS',_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x18d),_0x201c4f,_0x1092a0+_0x5cd894(0x12e)));else{if(_0x2d38c9===0x1)_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x163),_0x1092a0+_0x5cd894(0x12e),_0x5cd894(0x159),_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x1a9),_0x201c4f,_0x1092a0+_0x5cd894(0x12e)));else _0x2d38c9<=0x3&&_0xa08753[_0x5cd894(0xfd)](createIssue('warning',_0x1092a0+'.steps',_0x5cd894(0x131),_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x16f)+_0x2d38c9+_0x5cd894(0x17d),_0x201c4f,_0x1092a0+_0x5cd894(0x12e)));}return _0xa08753;}function validateStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740){const _0x163de4=a136_0x43e8,_0x41f805=[];if(_0x16c51b[_0x163de4(0x154)]===_0x163de4(0x187))return _0x16c51b['next']&&_0x41f805[_0x163de4(0xfd)](createIssue('error',_0xebeb9a+_0x163de4(0x14e),_0x163de4(0x146),_0x163de4(0x100)+_0x16c51b[_0x163de4(0x198)]+_0x163de4(0x1a0),_0x4d7328)),'with'in _0x16c51b&&_0x16c51b[_0x163de4(0xf9)]!==undefined&&_0x41f805[_0x163de4(0xfd)](createIssue('error',_0xebeb9a+_0x163de4(0x10e),_0x163de4(0x146),_0x163de4(0x100)+_0x16c51b[_0x163de4(0x198)]+_0x163de4(0x19d),_0x4d7328)),_0x41f805;_0x16c51b['next']&&(_0x4d7328[_0x163de4(0x185)]&&!_0x4d7328['stepNames'][_0x163de4(0x109)](_0x16c51b['next'])&&_0x41f805[_0x163de4(0xfd)](createIssue(_0x163de4(0x13b),_0xebeb9a+_0x163de4(0x14e),_0x163de4(0x13c),_0x163de4(0x13f)+_0x16c51b['next']+'\x27',_0x4d7328)));switch(_0x16c51b[_0x163de4(0x154)]){case _0x163de4(0x133):_0x41f805['push'](...validateWaitStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740));break;case _0x163de4(0x189):_0x41f805['push'](...validateActivationStep(_0x16c51b,_0xebeb9a,_0x4d7328));break;case _0x163de4(0x1a2):_0x41f805[_0x163de4(0xfd)](...validateDecisionPointStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740));break;case _0x163de4(0x12b):_0x41f805[_0x163de4(0xfd)](...validateAbTestStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740));break;case _0x163de4(0xf6):_0x41f805[_0x163de4(0xfd)](...validateJumpStep(_0x16c51b,_0xebeb9a,_0x4d7328));break;}return _0x41f805;}function validateWaitStep(_0x796af3,_0x496fa7,_0x288eb1,_0x1e17ad){const _0x4b01d4=a136_0x43e8,_0x50eb74=[];if(!_0x796af3[_0x4b01d4(0xf9)])return _0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+_0x4b01d4(0x10e),_0x4b01d4(0x11b),_0x4b01d4(0x10d),_0x288eb1,_0x496fa7)),_0x50eb74;if(_0x796af3[_0x4b01d4(0xf9)][_0x4b01d4(0x1a5)]){const _0x5b3d6e=_0x796af3[_0x4b01d4(0xf9)][_0x4b01d4(0x1a5)];if(_0x5b3d6e['segment']){_0x288eb1[_0x4b01d4(0x127)]?.[_0x4b01d4(0x103)](_0x5b3d6e[_0x4b01d4(0x167)]);!_0x5b3d6e['segment'][_0x4b01d4(0x107)](_0x4b01d4(0x134))&&(_0x288eb1[_0x4b01d4(0x1a1)]&&!_0x288eb1[_0x4b01d4(0x1a1)][_0x4b01d4(0x109)](_0x5b3d6e['segment'])&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+'.with.condition.segment',_0x4b01d4(0x125),_0x4b01d4(0x19c)+_0x5b3d6e[_0x4b01d4(0x167)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x288eb1)));_0x5b3d6e[_0x4b01d4(0x14d)]&&_0x288eb1[_0x4b01d4(0x185)]&&!_0x288eb1['stepNames']['has'](_0x5b3d6e[_0x4b01d4(0x14d)])&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+_0x4b01d4(0x168),_0x4b01d4(0x13c),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x5b3d6e[_0x4b01d4(0x14d)]+'\x27',_0x288eb1));_0x5b3d6e['timeout']?.[_0x4b01d4(0x14d)]&&_0x288eb1[_0x4b01d4(0x185)]&&!_0x288eb1[_0x4b01d4(0x185)][_0x4b01d4(0x109)](_0x5b3d6e[_0x4b01d4(0x110)]['next'])&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+_0x4b01d4(0x121),_0x4b01d4(0x13c),_0x4b01d4(0x182)+_0x5b3d6e[_0x4b01d4(0x110)][_0x4b01d4(0x14d)]+'\x27',_0x288eb1));const _0x31c21a=_0x5b3d6e['next']||_0x796af3[_0x4b01d4(0x14d)],_0x18c282=_0x5b3d6e[_0x4b01d4(0x110)]?.[_0x4b01d4(0x14d)]||_0x796af3['next'];if(_0x31c21a){const _0x22f59b=_0x1e17ad[_0x4b01d4(0x173)](_0x31c21a);_0x22f59b?.[_0x4b01d4(0x154)]===_0x4b01d4(0x175)&&_0x50eb74['push'](createIssue(_0x4b01d4(0x163),_0x496fa7+'.with.condition.next',_0x4b01d4(0x180),_0x4b01d4(0xf5)+_0x31c21a+_0x4b01d4(0x132),_0x288eb1,_0x496fa7+'.with.condition'));}if(_0x18c282){const _0x2aaedf=_0x1e17ad[_0x4b01d4(0x173)](_0x18c282);_0x2aaedf?.['type']===_0x4b01d4(0x175)&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x163),_0x496fa7+_0x4b01d4(0x121),_0x4b01d4(0x180),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x18c282+_0x4b01d4(0x132),_0x288eb1,_0x496fa7+_0x4b01d4(0x179)));}}}return _0x50eb74;}function validateActivationStep(_0x1f69b0,_0x15fac0,_0x375ff4){const _0x1fa35a=a136_0x43e8,_0x11c465=[];if(!_0x1f69b0[_0x1fa35a(0xf9)]?.[_0x1fa35a(0x189)])return _0x11c465['push'](createIssue(_0x1fa35a(0x13b),_0x15fac0+_0x1fa35a(0x1a7),_0x1fa35a(0x1ae),_0x1fa35a(0x162),_0x375ff4,_0x15fac0)),_0x11c465;const _0x4d26a8=_0x1f69b0[_0x1fa35a(0xf9)]['activation'];return _0x375ff4[_0x1fa35a(0x17a)]&&!_0x4d26a8[_0x1fa35a(0x107)](_0x1fa35a(0x134))&&(!_0x375ff4['activationKeys'][_0x1fa35a(0x109)](_0x4d26a8)&&_0x11c465[_0x1fa35a(0xfd)](createIssue('error',_0x15fac0+_0x1fa35a(0x1a7),_0x1fa35a(0x113),_0x1fa35a(0x15c)+_0x4d26a8+_0x1fa35a(0x150),_0x375ff4))),_0x11c465;}function validateDecisionPointStep(_0x3c67ea,_0x387599,_0x3139eb,_0x25ec5e){const _0x3bd4e6=a136_0x43e8,_0x4e28cb=[];if(!_0x3c67ea[_0x3bd4e6(0xf9)]?.[_0x3bd4e6(0x15f)]||_0x3c67ea['with'][_0x3bd4e6(0x15f)][_0x3bd4e6(0x135)]===0x0)return _0x4e28cb[_0x3bd4e6(0xfd)](createIssue('error',_0x387599+_0x3bd4e6(0x11d),_0x3bd4e6(0x176),_0x3bd4e6(0xff),_0x3139eb,_0x387599)),_0x4e28cb;for(let _0xbb7a21=0x0;_0xbb7a21<_0x3c67ea[_0x3bd4e6(0xf9)][_0x3bd4e6(0x15f)][_0x3bd4e6(0x135)];_0xbb7a21++){const _0x5bd965=_0x3c67ea[_0x3bd4e6(0xf9)][_0x3bd4e6(0x15f)][_0xbb7a21],_0x207058=_0x387599+'.with.branches['+_0xbb7a21+']';_0x5bd965['segment']&&!_0x5bd965[_0x3bd4e6(0x112)]&&(_0x3139eb['referencedSegments']?.[_0x3bd4e6(0x103)](_0x5bd965[_0x3bd4e6(0x167)]),!_0x5bd965[_0x3bd4e6(0x167)][_0x3bd4e6(0x107)](_0x3bd4e6(0x134))&&(_0x3139eb[_0x3bd4e6(0x1a1)]&&!_0x3139eb[_0x3bd4e6(0x1a1)][_0x3bd4e6(0x109)](_0x5bd965[_0x3bd4e6(0x167)])&&_0x4e28cb['push'](createIssue('error',_0x207058+_0x3bd4e6(0x122),_0x3bd4e6(0x125),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x5bd965['segment']+'\x27',_0x3139eb))));_0x5bd965[_0x3bd4e6(0x14d)]&&_0x3139eb[_0x3bd4e6(0x185)]&&!_0x3139eb[_0x3bd4e6(0x185)][_0x3bd4e6(0x109)](_0x5bd965[_0x3bd4e6(0x14d)])&&_0x4e28cb[_0x3bd4e6(0xfd)](createIssue(_0x3bd4e6(0x13b),_0x207058+_0x3bd4e6(0x14e),_0x3bd4e6(0x13c),_0x3bd4e6(0x186)+_0x5bd965[_0x3bd4e6(0x14d)]+'\x27',_0x3139eb));if(_0x5bd965[_0x3bd4e6(0x14d)]){const _0x5290b7=_0x25ec5e[_0x3bd4e6(0x173)](_0x5bd965[_0x3bd4e6(0x14d)]);_0x5290b7?.['type']===_0x3bd4e6(0x175)&&_0x4e28cb[_0x3bd4e6(0xfd)](createIssue(_0x3bd4e6(0x163),_0x207058+'.next',_0x3bd4e6(0x180),_0x3bd4e6(0x152)+_0x5bd965[_0x3bd4e6(0x198)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5bd965['next']+_0x3bd4e6(0x11e),_0x3139eb));}}return _0x4e28cb;}function validateAbTestStep(_0x393e65,_0x1435ae,_0x5bf8da,_0x28328c){const _0x1464dd=a136_0x43e8,_0x4a0a34=[];if(!_0x393e65[_0x1464dd(0xf9)]?.[_0x1464dd(0x111)]||_0x393e65['with'][_0x1464dd(0x111)][_0x1464dd(0x135)]===0x0)return _0x4a0a34[_0x1464dd(0xfd)](createIssue(_0x1464dd(0x13b),_0x1435ae+_0x1464dd(0x140),_0x1464dd(0x176),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x5bf8da,_0x1435ae)),_0x4a0a34;const _0x3c9e20=_0x393e65[_0x1464dd(0xf9)]['variants'][_0x1464dd(0x1aa)]((_0x500fc7,_0x579cae)=>_0x500fc7+(_0x579cae[_0x1464dd(0x18c)]||0x0),0x0);Math[_0x1464dd(0x177)](_0x3c9e20-0x64)>0.01&&_0x4a0a34[_0x1464dd(0xfd)](createIssue(_0x1464dd(0x13b),_0x1435ae+_0x1464dd(0x140),'INVALID_AB_TEST_PERCENTAGES',_0x1464dd(0x129)+_0x3c9e20+'%)',_0x5bf8da));for(let _0x216a4a=0x0;_0x216a4a<_0x393e65[_0x1464dd(0xf9)][_0x1464dd(0x111)][_0x1464dd(0x135)];_0x216a4a++){const _0x16227b=_0x393e65[_0x1464dd(0xf9)][_0x1464dd(0x111)][_0x216a4a],_0x42af05=_0x1435ae+_0x1464dd(0x181)+_0x216a4a+']';_0x16227b[_0x1464dd(0x14d)]&&_0x5bf8da[_0x1464dd(0x185)]&&!_0x5bf8da[_0x1464dd(0x185)][_0x1464dd(0x109)](_0x16227b['next'])&&_0x4a0a34[_0x1464dd(0xfd)](createIssue(_0x1464dd(0x13b),_0x42af05+_0x1464dd(0x14e),_0x1464dd(0x13c),_0x1464dd(0x11f)+_0x16227b[_0x1464dd(0x14d)]+'\x27',_0x5bf8da));if(_0x16227b['next']){const _0x26795a=_0x28328c[_0x1464dd(0x173)](_0x16227b['next']);_0x26795a?.[_0x1464dd(0x154)]==='merge'&&_0x4a0a34[_0x1464dd(0xfd)](createIssue('warning',_0x42af05+_0x1464dd(0x14e),_0x1464dd(0x180),_0x1464dd(0x161)+_0x16227b[_0x1464dd(0x198)]+_0x1464dd(0x17f)+_0x16227b[_0x1464dd(0x14d)]+_0x1464dd(0x11e),_0x5bf8da));}}return _0x4a0a34;}function validateJumpStep(_0x37178e,_0x3c11ad,_0x344b36){const _0x10cedd=a136_0x43e8,_0x140204=[];if(!_0x37178e[_0x10cedd(0xf9)]?.[_0x10cedd(0x149)])return _0x140204['push'](createIssue(_0x10cedd(0x13b),_0x3c11ad+_0x10cedd(0x156),'INVALID_JUMP_TARGET',_0x10cedd(0x184),_0x344b36,_0x3c11ad)),_0x140204;return(!_0x37178e[_0x10cedd(0xf9)][_0x10cedd(0x149)][_0x10cedd(0x195)]||!_0x37178e[_0x10cedd(0xf9)][_0x10cedd(0x149)][_0x10cedd(0x116)])&&_0x140204[_0x10cedd(0xfd)](createIssue(_0x10cedd(0x13b),_0x3c11ad+'.with.target',_0x10cedd(0x169),_0x10cedd(0x118),_0x344b36)),_0x140204;}function buildConvergenceMap(_0x5b18f2){const _0x138aac=a136_0x43e8,_0x461d41=new Map();function _0x211733(_0x188ca9,_0x3d0048){const _0x2b452d=a136_0x43e8,_0x2732e7=_0x461d41[_0x2b452d(0x173)](_0x188ca9)||[];_0x2732e7[_0x2b452d(0xfd)](_0x3d0048),_0x461d41['set'](_0x188ca9,_0x2732e7);}for(const _0x574457 of _0x5b18f2){_0x574457[_0x138aac(0x14d)]&&_0x211733(_0x574457[_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x123)+_0x574457[_0x138aac(0x198)]+'\x27'});if(_0x574457[_0x138aac(0x154)]==='decision_point'&&_0x574457[_0x138aac(0xf9)]?.[_0x138aac(0x15f)])for(const _0x176086 of _0x574457[_0x138aac(0xf9)]['branches']){_0x176086[_0x138aac(0x14d)]&&_0x211733(_0x176086[_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x137)+_0x176086[_0x138aac(0x198)]+_0x138aac(0x183)+_0x574457['name']+'\x27'});}if(_0x574457['type']===_0x138aac(0x12b)&&_0x574457['with']?.[_0x138aac(0x111)])for(const _0x4531b2 of _0x574457[_0x138aac(0xf9)]['variants']){_0x4531b2[_0x138aac(0x14d)]&&_0x211733(_0x4531b2[_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x10b)+_0x4531b2[_0x138aac(0x198)]+_0x138aac(0x183)+_0x574457[_0x138aac(0x198)]+'\x27'});}_0x574457[_0x138aac(0x154)]==='wait'&&_0x574457[_0x138aac(0xf9)]?.[_0x138aac(0x1a5)]&&(_0x574457[_0x138aac(0xf9)][_0x138aac(0x1a5)]['next']&&_0x211733(_0x574457['with']['condition'][_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x10a)+_0x574457['name']+'\x27'}),_0x574457[_0x138aac(0xf9)][_0x138aac(0x1a5)]['timeout']?.[_0x138aac(0x14d)]&&_0x211733(_0x574457['with'][_0x138aac(0x1a5)][_0x138aac(0x110)][_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x12c)+_0x574457[_0x138aac(0x198)]+'\x27'}));}return _0x461d41;}function validateFlowControl(_0x18b54e,_0x12fa4e,_0xef76d7){const _0x12b6bb=a136_0x43e8,_0x4b862d=[],_0x475d02='stages['+_0x12fa4e+']',_0x399c60=_0x18b54e[_0x12b6bb(0xfe)]||[];if(_0x399c60['length']===0x0)return _0x4b862d;const _0x15f144=new Map();for(const _0x515ed7 of _0x399c60){_0x515ed7[_0x12b6bb(0x198)]&&_0x15f144[_0x12b6bb(0x142)](_0x515ed7['name'],_0x515ed7);}const _0x513bfd=buildConvergenceMap(_0x399c60),_0x2b3654=_0x399c60['some'](_0x10396a=>_0x10396a['type']===_0x12b6bb(0x187));!_0x2b3654&&_0x4b862d['push'](createIssue(_0x12b6bb(0x13b),_0x475d02+'.steps',_0x12b6bb(0x117),_0x12b6bb(0xf7)+_0x18b54e[_0x12b6bb(0x198)]+_0x12b6bb(0x1a3),_0xef76d7));for(const [_0x1c6641,_0x3e97d7]of _0x513bfd){const _0x2e5039=_0x15f144[_0x12b6bb(0x173)](_0x1c6641);if(!_0x2e5039)continue;if(_0x3e97d7[_0x12b6bb(0x135)]>0x1&&_0x2e5039[_0x12b6bb(0x154)]!=='merge'){const _0x4f2315=_0x3e97d7['map'](_0x12a5f8=>_0x12a5f8[_0x12b6bb(0x165)])[_0x12b6bb(0x16e)](',\x20');_0x4b862d[_0x12b6bb(0xfd)](createIssue('error',_0x475d02+_0x12b6bb(0x12e),'CONVERGENCE_WITHOUT_MERGE',_0x12b6bb(0x130)+_0x1c6641+'\x27\x20(from:\x20'+_0x4f2315+_0x12b6bb(0x157),_0xef76d7));}_0x3e97d7[_0x12b6bb(0x135)]===0x1&&_0x2e5039[_0x12b6bb(0x154)]==='merge'&&_0x4b862d[_0x12b6bb(0xfd)](createIssue(_0x12b6bb(0x163),_0x475d02+_0x12b6bb(0x12e),_0x12b6bb(0x13e),_0x12b6bb(0x151)+_0x1c6641+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x3e97d7[0x0][_0x12b6bb(0x165)]+_0x12b6bb(0x14f),_0xef76d7));}for(const _0xed4bce of _0x399c60){if(_0xed4bce[_0x12b6bb(0x154)]===_0x12b6bb(0x175)&&_0xed4bce[_0x12b6bb(0x14d)]){const _0x4dd36a=_0x15f144['get'](_0xed4bce[_0x12b6bb(0x14d)]);_0x4dd36a?.[_0x12b6bb(0x154)]===_0x12b6bb(0x175)&&_0x4b862d['push'](createIssue('error',_0x475d02+'.steps',_0x12b6bb(0x126),_0x12b6bb(0x151)+_0xed4bce[_0x12b6bb(0x198)]+_0x12b6bb(0x18a)+_0xed4bce[_0x12b6bb(0x14d)]+_0x12b6bb(0x119),_0xef76d7));}}return _0x4b862d;}function validateCriteria(_0xe19640,_0x3fc47f,_0x352926){const _0x1a699c=a136_0x43e8,_0x14216a=[];return _0xe19640[_0x1a699c(0x167)]&&(_0x352926['referencedSegments']?.[_0x1a699c(0x103)](_0xe19640[_0x1a699c(0x167)]),!_0xe19640[_0x1a699c(0x167)][_0x1a699c(0x107)]('ref:')&&(_0x352926[_0x1a699c(0x1a1)]&&!_0x352926['embeddedSegments'][_0x1a699c(0x109)](_0xe19640[_0x1a699c(0x167)])&&_0x14216a[_0x1a699c(0xfd)](createIssue(_0x1a699c(0x13b),_0x3fc47f+_0x1a699c(0x122),_0x1a699c(0x125),_0x1a699c(0x18f)+_0xe19640[_0x1a699c(0x167)]+'\x27',_0x352926)))),_0x14216a;}function validateEmbeddedSegment(_0x1307ca,_0x345c53,_0x4f2516){const _0x4ae5ba=a136_0x43e8,_0x1cf3f4=[];return _0x1307ca[_0x4ae5ba(0x190)]&&_0x1cf3f4[_0x4ae5ba(0xfd)](...validateRuleDef(_0x1307ca[_0x4ae5ba(0x190)],_0x345c53+_0x4ae5ba(0x105),_0x4f2516)),_0x1cf3f4;}function validateStage(_0x479b07,_0x346110,_0x3e8e31,_0x1c5f6f){const _0x26fc11=a136_0x43e8,_0x2e4628=[],_0x4a9140='stages['+_0x346110+']',_0x1a9652=new Map(),_0x5ed6de=new Map();if(_0x479b07['steps']){for(let _0x5e089e=0x0;_0x5e089e<_0x479b07[_0x26fc11(0xfe)][_0x26fc11(0x135)];_0x5e089e++){const _0x215ab2=_0x479b07[_0x26fc11(0xfe)][_0x5e089e];_0x215ab2[_0x26fc11(0x198)]&&_0x1a9652[_0x26fc11(0x142)](_0x215ab2[_0x26fc11(0x198)],_0x215ab2);}for(let _0x39541d=0x0;_0x39541d<_0x479b07[_0x26fc11(0xfe)]['length'];_0x39541d++){const _0x279c46=_0x479b07[_0x26fc11(0xfe)][_0x39541d],_0x4fd9cb=_0x4a9140+_0x26fc11(0x16a)+_0x39541d+']';if(_0x279c46[_0x26fc11(0x198)]){if(_0x5ed6de[_0x26fc11(0x109)](_0x279c46[_0x26fc11(0x198)])){const _0x1a5f68=_0x5ed6de[_0x26fc11(0x173)](_0x279c46[_0x26fc11(0x198)]);_0x2e4628['push'](createIssue(_0x26fc11(0x13b),_0x4fd9cb+_0x26fc11(0x101),_0x26fc11(0x197),'Duplicate\x20step\x20name\x20\x27'+_0x279c46[_0x26fc11(0x198)]+_0x26fc11(0x145)+_0x1a5f68+'])',_0x1c5f6f));}else _0x5ed6de['set'](_0x279c46[_0x26fc11(0x198)],_0x39541d);}_0x2e4628[_0x26fc11(0xfd)](...validateStep(_0x279c46,_0x4fd9cb,_0x1c5f6f,_0x1a9652));}}_0x479b07[_0x26fc11(0x192)]&&_0x2e4628[_0x26fc11(0xfd)](...validateCriteria(_0x479b07[_0x26fc11(0x192)],_0x4a9140+_0x26fc11(0x191),_0x1c5f6f));if(_0x479b07[_0x26fc11(0xfc)])for(let _0x4675e2=0x0;_0x4675e2<_0x479b07[_0x26fc11(0xfc)][_0x26fc11(0x135)];_0x4675e2++){_0x2e4628['push'](...validateCriteria(_0x479b07['exit_criteria'][_0x4675e2],_0x4a9140+'.exit_criteria['+_0x4675e2+']',_0x1c5f6f));}return _0x479b07[_0x26fc11(0x106)]&&_0x2e4628[_0x26fc11(0xfd)](...validateCriteria(_0x479b07[_0x26fc11(0x106)],_0x4a9140+_0x26fc11(0x14a),_0x1c5f6f)),_0x2e4628['push'](...validateStageStructure(_0x479b07,_0x346110,_0x3e8e31,_0x1c5f6f)),_0x2e4628[_0x26fc11(0xfd)](...validateFlowControl(_0x479b07,_0x346110,_0x1c5f6f)),_0x2e4628;}function validateStagesForVersion(_0x458f0a,_0x5b4740,_0x5aa506,_0x28a1e6,_0x1dd6c6,_0x3c5bdd,_0x48a097){const _0x2138de=a136_0x43e8;if(_0x458f0a['length']===0x0){_0x1dd6c6[_0x2138de(0xfd)]({'level':_0x2138de(0x13b),'path':_0x28a1e6+_0x2138de(0xfa),'code':_0x2138de(0x10f),'message':_0x2138de(0x13a),'location':getLocationFromPath(_0x5aa506[_0x2138de(0x17b)],_0x5aa506[_0x2138de(0x108)],['stages'])});return;}const _0x1ff9a1=new Set();for(const _0x2ae7df of _0x458f0a){if(_0x2ae7df[_0x2138de(0xfe)])for(const _0x449784 of _0x2ae7df[_0x2138de(0xfe)]){_0x449784['name']&&_0x1ff9a1[_0x2138de(0x103)](_0x449784[_0x2138de(0x198)]);}}const _0x4eaf7f={..._0x5aa506,'stepNames':_0x1ff9a1},_0x42df02=validateVersionStructure(_0x458f0a,_0x4eaf7f);for(const _0x2aaa4c of _0x42df02){const _0xdb016a=_0x28a1e6?{..._0x2aaa4c,'path':''+_0x28a1e6+_0x2aaa4c[_0x2138de(0x19b)]}:_0x2aaa4c;if(_0xdb016a[_0x2138de(0x12a)]==='error')_0x1dd6c6[_0x2138de(0xfd)](_0xdb016a);else _0x3c5bdd['push'](_0xdb016a);}for(let _0x54b17c=0x0;_0x54b17c<_0x458f0a[_0x2138de(0x135)];_0x54b17c++){const _0x2b0755=validateStage(_0x458f0a[_0x54b17c],_0x54b17c,_0x458f0a[_0x2138de(0x135)],_0x4eaf7f);for(const _0xa7b7a6 of _0x2b0755){const _0x161f52=_0x28a1e6?{..._0xa7b7a6,'path':''+_0x28a1e6+_0xa7b7a6[_0x2138de(0x19b)]}:_0xa7b7a6;if(_0x161f52[_0x2138de(0x12a)]===_0x2138de(0x13b))_0x1dd6c6['push'](_0x161f52);else _0x3c5bdd[_0x2138de(0xfd)](_0x161f52);}}if(_0x5b4740[_0x2138de(0x158)]){const _0x820c8d=_0x48a097?.['goalIsInherited']?_0x2138de(0x158):_0x28a1e6+'goal',_0xccc321=validateCriteria(_0x5b4740[_0x2138de(0x158)],_0x820c8d,_0x4eaf7f);for(const _0x551fce of _0xccc321){if(_0x551fce['level']===_0x2138de(0x13b))_0x1dd6c6[_0x2138de(0xfd)](_0x551fce);else _0x3c5bdd[_0x2138de(0xfd)](_0x551fce);}}}function extractVersionIndex(_0x41c27c){const _0x3f3e3f=a136_0x43e8,_0x286f6c=_0x41c27c[_0x3f3e3f(0x136)](/^journeys\[(\d+)\]\./);return _0x286f6c?_0x286f6c[0x1]:undefined;}function deduplicateAcrossVersions(_0x224064){const _0x26e62c=a136_0x43e8,_0xba7cba=new Map();for(let _0x38a60e=0x0;_0x38a60e<_0x224064[_0x26e62c(0x135)];_0x38a60e++){const _0x426aaa=_0x224064[_0x38a60e][_0x26e62c(0x19e)]+':'+_0x224064[_0x38a60e][_0x26e62c(0xfb)],_0x503ee2=extractVersionIndex(_0x224064[_0x38a60e][_0x26e62c(0x19b)]),_0x25f6cb=_0xba7cba[_0x26e62c(0x173)](_0x426aaa);if(_0x25f6cb){_0x25f6cb[_0x26e62c(0x1a6)][_0x26e62c(0xfd)](_0x38a60e);if(_0x503ee2)_0x25f6cb['versions'][_0x26e62c(0x103)](_0x503ee2);}else _0xba7cba[_0x26e62c(0x142)](_0x426aaa,{'indices':[_0x38a60e],'versions':new Set(_0x503ee2?[_0x503ee2]:[])});}const _0x3de14a=new Set();for(const {indices:_0x501ba4,versions:_0x24f382}of _0xba7cba[_0x26e62c(0x1ab)]()){if(_0x24f382[_0x26e62c(0x170)]<=0x1)continue;const _0xefdd10=_0x224064[_0x501ba4[0x0]];_0xefdd10[_0x26e62c(0x19b)]=_0xefdd10[_0x26e62c(0x19b)][_0x26e62c(0x18e)](/^journeys\[\d+\]\./,''),_0xefdd10[_0x26e62c(0xfb)]=_0xefdd10[_0x26e62c(0xfb)]+_0x26e62c(0x1ac)+_0x24f382[_0x26e62c(0x170)]+_0x26e62c(0x19f);for(let _0x3eae5d=0x1;_0x3eae5d<_0x501ba4[_0x26e62c(0x135)];_0x3eae5d++){_0x3de14a[_0x26e62c(0x103)](_0x501ba4[_0x3eae5d]);}}const _0x307445=[..._0x3de14a][_0x26e62c(0x13d)]((_0x4a41f7,_0x370dce)=>_0x370dce-_0x4a41f7);for(const _0x3e2ab4 of _0x307445){_0x224064[_0x26e62c(0x15b)](_0x3e2ab4,0x1);}}export function validateJourneyDef(_0x13b7b3,_0x49c6b6={},_0x3f99bc={}){const _0x117480=a136_0x43e8;if(_0x3f99bc[_0x117480(0x14c)])return runJourneySemanticChecks(_0x13b7b3,_0x49c6b6);const _0x1eb3e3=JourneyDefSchema[_0x117480(0x18b)](_0x13b7b3);if(_0x1eb3e3['success'])return runJourneySemanticChecks(_0x1eb3e3[_0x117480(0x196)],_0x49c6b6);return zodErrorsToJourneyValidationResult(_0x1eb3e3[_0x117480(0x13b)],_0x49c6b6);}function zodErrorsToJourneyValidationResult(_0x291a07,_0x19b161){const _0x56d047=a136_0x43e8,_0x322f6d=flattenZodIssues(_0x291a07[_0x56d047(0x174)]),_0x40ac83=_0x322f6d['map'](_0x2ca54b=>{const _0x8a12f6=_0x56d047,_0x55ad40=formatZodPath(_0x2ca54b[_0x8a12f6(0x19b)]),_0x5757c8=mapJourneyZodIssueToCode(_0x2ca54b,_0x55ad40),_0x26d24c=getLocationFromPath(_0x19b161['document'],_0x19b161[_0x8a12f6(0x108)],_0x2ca54b[_0x8a12f6(0x19b)][_0x8a12f6(0x15a)](_0x4055bf=>typeof _0x4055bf==='symbol'?String(_0x4055bf):_0x4055bf));return{'level':_0x8a12f6(0x13b),'path':_0x55ad40,'code':_0x5757c8,'message':_0x2ca54b[_0x8a12f6(0xfb)],..._0x26d24c&&{'location':_0x26d24c}};});return{'valid':![],'errors':_0x40ac83,'warnings':[]};}function mapJourneyZodIssueToCode(_0x416a98,_0x53997d){const _0x4b04ee=a136_0x43e8;if(_0x53997d===_0x4b04ee(0x198))return _0x4b04ee(0x104);if(_0x53997d[_0x4b04ee(0x153)](_0x4b04ee(0x1a4))&&_0x53997d[_0x4b04ee(0x147)]('steps'))return _0x4b04ee(0x128);if(_0x53997d===_0x4b04ee(0xfa)||_0x53997d[_0x4b04ee(0x153)](_0x4b04ee(0x155)))return _0x4b04ee(0x10f);if(_0x53997d===''&&_0x416a98[_0x4b04ee(0xfb)][_0x4b04ee(0x147)](_0x4b04ee(0x14b)))return _0x4b04ee(0x10f);if(_0x53997d[_0x4b04ee(0x147)](_0x4b04ee(0x189)))return _0x4b04ee(0x12f);return _0x4b04ee(0x128);}function a136_0x3e32(){const _0x374a64=['.with.variants','filter','set','journey\x20entry','TOO_MANY_STAGES','\x27\x20(first\x20defined\x20at\x20steps[','END_STEP_HAS_NEXT_OR_WITH','includes','entries','target','.milestone','journeys,\x20stages,\x20or\x20versions','skipSchema','next','.next',').\x20Merge\x20is\x20unnecessary.','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','Merge\x20step\x20\x27','Decision\x20branch\x20\x27','endsWith','type','.stages','.with.target',').\x20Use\x20a\x20merge\x20step.','goal','INSUFFICIENT_STEPS','map','splice','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Journey\x20has\x20','keys','branches','3vYYMol','A/B\x20test\x20variant\x20\x27','Activation\x20step\x20requires\x20an\x20activation\x20reference','warning','665107hPsRor','description','launched','segment','.with.condition.next','INVALID_JUMP_TARGET','.steps[','5270825JLrlmD','Embedded\x20segment\x20\x27','segments.','join','\x27\x20has\x20only\x20','size','versions','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','get','issues','merge','MISSING_CONDITIONS','abs','activations','.with.condition.timeout','activationKeys','document','\x20with\x20latest:\x20true','\x20steps\x20(may\x20be\x20too\x20simple)','latest','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','BRANCH_DIRECTLY_TO_MERGE','.with.variants[','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','\x27\x20of\x20\x27','Jump\x20step\x20requires\x20a\x20target','stepNames','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','end','UNUSED_EMBEDDED_SEGMENT','activation','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','safeParse','percentage','\x27\x20has\x20no\x20steps','replace','Criteria\x20references\x20undefined\x20segment\x20\x27','rule','.entry_criteria','entry_criteria','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','segments','journey','data','DUPLICATE_STEP_NAME','name','trim','Journey\x20can\x20have\x20at\x20most\x20one\x20','path','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','code','\x20versions)','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','embeddedSegments','decision_point','\x27\x20has\x20no\x20end\x20step','.type','condition','indices','.with.activation','1850864iceKNr','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','reduce','values','\x20(across\x20','excluded_','MISSING_ACTIVATION_REF','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','jump','Stage\x20\x27','3523714RLmbZF','with','stages','message','exit_criteria','push','steps','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','End\x20step\x20\x27','.name','state','add','MISSING_NAME','.rule','milestone','startsWith','source','has','condition\x20of\x20\x27','variant\x20\x27','Journey\x20name\x20is\x20required','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','.with','MISSING_STAGES','timeout','variants','excluded','MISSING_ACTIVATION_DEFINITION','journeys[','2622378kjlPvZ','stage','MISSING_END_STEP','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','.exit_criteria','MISSING_WAIT_PARAMS','40PKZzRI','.with.branches','\x27\x20with\x20no\x20action\x20in\x20between','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','9WrzXUh','.with.condition.timeout.next','.segment','step\x20\x27','every','MISSING_SEGMENT_REFERENCE','MERGE_TO_MERGE_CHAIN','referencedSegments','JOURNEY_SCHEMA_ERROR','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','level','ab_test','timeout\x20of\x20\x27','journeys','.steps','ACTIVATION_SCHEMA_ERROR','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','FEW_STEPS','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','wait','ref:','length','match','branch\x20\x27','1930960mGLrXs','111490ZIUucX','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','error','INVALID_NEXT_REFERENCE','sort','SINGLE_INPUT_MERGE','Step\x20references\x20non-existent\x20step\x20\x27'];a136_0x3e32=function(){return _0x374a64;};return a136_0x3e32();}function runJourneySemanticChecks(_0x8102c2,_0x2911ed){const _0x18c0f9=a136_0x43e8,_0x5e7597=[],_0x3307a9=[];(!_0x8102c2['name']||_0x8102c2[_0x18c0f9(0x198)][_0x18c0f9(0x199)]()==='')&&_0x5e7597[_0x18c0f9(0xfd)]({'level':_0x18c0f9(0x13b),'path':_0x18c0f9(0x198),'code':_0x18c0f9(0x104),'message':_0x18c0f9(0x10c),'location':getLocationFromPath(_0x2911ed[_0x18c0f9(0x17b)],_0x2911ed[_0x18c0f9(0x108)],[_0x18c0f9(0x198)])});const _0x2bca13=new Set();if(_0x8102c2[_0x18c0f9(0x194)])for(const _0x550896 of Object[_0x18c0f9(0x15e)](_0x8102c2[_0x18c0f9(0x194)])){_0x2bca13[_0x18c0f9(0x103)](_0x550896);}const _0x3ec87f=new Set();if(_0x8102c2[_0x18c0f9(0x178)])for(const _0x255292 of Object[_0x18c0f9(0x15e)](_0x8102c2[_0x18c0f9(0x178)])){_0x3ec87f[_0x18c0f9(0x103)](_0x255292);}const _0x159b8e=new Set(),_0x3585b2={..._0x2911ed,'embeddedSegments':_0x2bca13,'referencedSegments':_0x159b8e,'activationKeys':_0x3ec87f['size']>0x0?_0x3ec87f:undefined};if(_0x8102c2[_0x18c0f9(0x194)])for(const [_0x21c92a,_0x52573f]of Object[_0x18c0f9(0x148)](_0x8102c2[_0x18c0f9(0x194)])){const _0x23f178=validateEmbeddedSegment(_0x52573f,_0x18c0f9(0x16d)+_0x21c92a,_0x3585b2);for(const _0x135b6c of _0x23f178){if(_0x135b6c[_0x18c0f9(0x12a)]===_0x18c0f9(0x13b))_0x5e7597[_0x18c0f9(0xfd)](_0x135b6c);else _0x3307a9[_0x18c0f9(0xfd)](_0x135b6c);}}const _0x225023=!!_0x8102c2[_0x18c0f9(0x158)],_0x16058c=_0x8102c2[_0x18c0f9(0x12d)]?.[_0x18c0f9(0x124)](_0x21e110=>!!_0x21e110[_0x18c0f9(0x158)])??![];!_0x225023&&!_0x16058c&&_0x3307a9[_0x18c0f9(0xfd)]({'level':_0x18c0f9(0x163),'path':'goal','code':'MISSING_GOAL','message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x2911ed[_0x18c0f9(0x17b)],_0x2911ed[_0x18c0f9(0x108)],[_0x18c0f9(0x158)])});const _0x6e8a1e=_0x8102c2[_0x18c0f9(0x12d)]??_0x8102c2[_0x18c0f9(0x171)];if(_0x6e8a1e&&_0x6e8a1e[_0x18c0f9(0x141)](_0x209599=>_0x209599[_0x18c0f9(0x17e)]===!![])[_0x18c0f9(0x135)]>0x1){const _0x1c4266=_0x8102c2[_0x18c0f9(0x12d)]?_0x18c0f9(0x12d):_0x18c0f9(0x171);_0x5e7597['push']({'level':'error','path':_0x1c4266,'code':'DUPLICATE_LATEST','message':_0x18c0f9(0x19a)+(_0x1c4266===_0x18c0f9(0x12d)?_0x18c0f9(0x143):'version')+_0x18c0f9(0x17c),'location':getLocationFromPath(_0x2911ed[_0x18c0f9(0x17b)],_0x2911ed['source'],[_0x1c4266])});}if(_0x8102c2[_0x18c0f9(0x12d)]&&_0x8102c2[_0x18c0f9(0x12d)][_0x18c0f9(0x135)]>0x0)for(let _0x429dac=0x0;_0x429dac<_0x8102c2[_0x18c0f9(0x12d)][_0x18c0f9(0x135)];_0x429dac++){const _0x459b30=_0x8102c2[_0x18c0f9(0x12d)][_0x429dac];if(_0x8102c2[_0x18c0f9(0x12d)]['length']>0x1&&_0x459b30[_0x18c0f9(0x102)]==='launched')continue;const _0x1f006b=_0x459b30['stages']||[],_0x4f5621=_0x18c0f9(0x114)+_0x429dac+'].',_0x5702d1=!!_0x459b30['goal'],_0xf211b0=_0x5702d1?{..._0x8102c2,'goal':_0x459b30[_0x18c0f9(0x158)]}:_0x8102c2;validateStagesForVersion(_0x1f006b,_0xf211b0,_0x3585b2,_0x4f5621,_0x5e7597,_0x3307a9,{'goalIsInherited':!_0x5702d1});}else{if(_0x8102c2[_0x18c0f9(0x171)]&&_0x8102c2['versions'][_0x18c0f9(0x135)]>0x0)for(let _0x2ce532=0x0;_0x2ce532<_0x8102c2[_0x18c0f9(0x171)]['length'];_0x2ce532++){const _0x41f3bb=_0x8102c2['versions'][_0x2ce532];if(_0x8102c2[_0x18c0f9(0x171)][_0x18c0f9(0x135)]>0x1&&_0x41f3bb['state']===_0x18c0f9(0x166))continue;const _0x43f2d6=_0x41f3bb[_0x18c0f9(0xfa)]||[],_0x3aa38f='versions['+_0x2ce532+'].';validateStagesForVersion(_0x43f2d6,_0x8102c2,_0x3585b2,_0x3aa38f,_0x5e7597,_0x3307a9);}else{const _0x50293c=_0x8102c2[_0x18c0f9(0xfa)]||[];validateStagesForVersion(_0x50293c,_0x8102c2,_0x3585b2,'',_0x5e7597,_0x3307a9);}}_0x8102c2[_0x18c0f9(0x12d)]&&_0x8102c2['journeys'][_0x18c0f9(0x135)]>0x1&&(deduplicateAcrossVersions(_0x5e7597),deduplicateAcrossVersions(_0x3307a9));for(const _0x157ce1 of _0x2bca13){!_0x159b8e['has'](_0x157ce1)&&!_0x157ce1[_0x18c0f9(0x107)](_0x18c0f9(0x1ad))&&_0x3307a9['push']({'level':_0x18c0f9(0x163),'path':_0x18c0f9(0x16d)+_0x157ce1,'code':_0x18c0f9(0x188),'message':_0x18c0f9(0x16c)+_0x157ce1+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x2911ed['document'],_0x2911ed['source'],['segments',_0x157ce1])});}return{'valid':_0x5e7597[_0x18c0f9(0x135)]===0x0,'errors':_0x5e7597,'warnings':_0x3307a9};}