@treasuredata/tdx 2026.3.22 → 2026.3.24

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(_0xed096,_0x1bd72f){const _0x3c9f40=a133_0x2db7,_0xca7345=_0xed096();while(!![]){try{const _0x44f555=parseInt(_0x3c9f40(0x1c9))/0x1+-parseInt(_0x3c9f40(0x1b9))/0x2+-parseInt(_0x3c9f40(0x198))/0x3+-parseInt(_0x3c9f40(0x19c))/0x4*(-parseInt(_0x3c9f40(0x194))/0x5)+-parseInt(_0x3c9f40(0x1a2))/0x6+parseInt(_0x3c9f40(0x1ba))/0x7+parseInt(_0x3c9f40(0x1a9))/0x8*(-parseInt(_0x3c9f40(0x1b6))/0x9);if(_0x44f555===_0x1bd72f)break;else _0xca7345['push'](_0xca7345['shift']());}catch(_0x3ad4ce){_0xca7345['push'](_0xca7345['shift']());}}}(a133_0x5363,0x8aa4d));import a133_0x1d3e4a from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x168fad){const _0x5fa08e=a133_0x2db7,_0xae0c3a=_0x168fad['columns'][_0x5fa08e(0x1cb)](_0x28bc47=>({'column_name':_0x28bc47[_0x5fa08e(0x1c3)],'column_type':_0x28bc47[_0x5fa08e(0x1a3)],'null':_0x5fa08e(0x1c2),'key':null,'default':null,'extra':null}));return{..._0x168fad,'columns':[{'name':_0x5fa08e(0x1ae),'type':_0x5fa08e(0x1b1)},{'name':_0x5fa08e(0x19a),'type':_0x5fa08e(0x1b1)},{'name':_0x5fa08e(0x1ad),'type':_0x5fa08e(0x1b1)},{'name':_0x5fa08e(0x1a6),'type':'varchar'},{'name':_0x5fa08e(0x1b8),'type':_0x5fa08e(0x1b1)},{'name':_0x5fa08e(0x1cc),'type':_0x5fa08e(0x1b1)}],'data':_0xae0c3a};}export async function executeSchemaQuery(_0x9218bc,_0x3b16b4,_0x345568){const _0x2c4188=a133_0x2db7,_0x3f5351=_0x9218bc[_0x2c4188(0x1b4)]()[_0x2c4188(0x1b3)](/;+$/,''),_0x213611=_0x2c4188(0x19d)+_0x3f5351+_0x2c4188(0x1b2);_0x345568[_0x2c4188(0x199)]&&console[_0x2c4188(0x1c7)]('Schema\x20query:\x0a'+_0x213611);const _0x2a5577=await withProgressSpinner(_0x2c4188(0x1c4),async _0x2f1a23=>{const _0x4f103f=_0x2c4188,_0x426656=await _0x3b16b4['query'][_0x4f103f(0x19b)](_0x213611,{'catalog':'td','schema':_0x4f103f(0x1c5),'onJobId':_0x5585cf=>{const _0xa2fa11=_0x4f103f;_0x2f1a23[_0xa2fa11(0x1be)](_0x5585cf);}});return _0x426656;},{'verbose':_0x345568[_0x2c4188(0x199)]});return buildSchemaResult(_0x2a5577[_0x2c4188(0x1a1)]);}function a133_0x5363(){const _0xd8be94=['429351zjgbWh','matrixColumnName','map','extra','source','fields','slice','length','1185yCTQIk','localeCompare','some','parentTableName','2466390RgDLqw','verbose','column_type','execute','18868ucOCUB','SELECT\x20*\x20FROM\x20(\x0a','get','groupingName','push','data','1272036qrCQdx','type','startsWith','tableName','key','filter','sort','61448aVdzRa','entries','Attributes','matrixTableName','null','column_name','parentColumn','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','varchar','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','replace','trim','displayName','603cHzzYt','bold','default','250600dMpwEh','4862676enFjlx','set','cyan','size','setJobId','dim','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','Behaviors','YES','name','Fetching\x20schema...','information_schema','behaviorName','error','Unknown'];a133_0x5363=function(){return _0xd8be94;};return a133_0x5363();}function columnName(_0x3335ff){const _0x39bbd8=a133_0x2db7;return _0x3335ff[_0x39bbd8(0x1ca)]||_0x3335ff[_0x39bbd8(0x1af)]||_0x3335ff[_0x39bbd8(0x1c3)];}function a133_0x2db7(_0x18244c,_0x2ea86c){_0x18244c=_0x18244c-0x193;const _0x53635e=a133_0x5363();let _0x2db7b1=_0x53635e[_0x18244c];return _0x2db7b1;}function formatFieldLine(_0x30b9e7,_0x31a907,_0x459d43){const _0x258d57=a133_0x2db7,_0x3cefe0=_0x30b9e7!==_0x31a907?'\x20'+a133_0x1d3e4a[_0x258d57(0x1bf)]('('+_0x31a907+')'):'';return'\x20\x20\x20\x20'+_0x30b9e7+_0x3cefe0+':\x20'+a133_0x1d3e4a[_0x258d57(0x1bc)](_0x459d43);}function sortByColumnName(_0x509d7b){const _0x2a5215=a133_0x2db7;return[..._0x509d7b][_0x2a5215(0x1a8)]((_0x5633ef,_0x43a287)=>columnName(_0x5633ef)[_0x2a5215(0x195)](columnName(_0x43a287)));}export function displayFieldsHumanReadable(_0x1dc780,_0x4a7915){const _0xbf976d=a133_0x2db7,_0x1201dd=_0x1dc780[_0xbf976d(0x1a7)](_0x1ee3ac=>_0x1ee3ac['source']==='attribute'),_0x5ea931=_0x1dc780[_0xbf976d(0x1a7)](_0x52ce74=>_0x52ce74[_0xbf976d(0x1cd)]==='behavior'),_0x145aa6=new Map();for(const _0xa5215d of _0x1201dd){const _0x49fe3e=_0xa5215d[_0xbf976d(0x19f)]||_0xa5215d[_0xbf976d(0x197)]||_0xbf976d(0x1c8),_0x31f67c=_0x145aa6[_0xbf976d(0x19e)](_0x49fe3e);_0x31f67c?_0x31f67c['fields'][_0xbf976d(0x1a0)](_0xa5215d):_0x145aa6[_0xbf976d(0x1bb)](_0x49fe3e,{'displayName':_0x49fe3e,'tableName':_0xa5215d[_0xbf976d(0x197)],'fields':[_0xa5215d]});}const _0x4e4bf5=new Map();for(const _0x216df8 of _0x5ea931){const _0x404317=_0x216df8[_0xbf976d(0x1c6)]||_0xbf976d(0x1c8),_0x2a646b=_0x4e4bf5[_0xbf976d(0x19e)](_0x404317)||[];_0x2a646b[_0xbf976d(0x1a0)](_0x216df8),_0x4e4bf5[_0xbf976d(0x1bb)](_0x404317,_0x2a646b);}console[_0xbf976d(0x1c7)]('\x0a'+a133_0x1d3e4a['bold'](_0x4a7915));if(_0x145aa6[_0xbf976d(0x1bd)]>0x0){console[_0xbf976d(0x1c7)]('\x0a'+a133_0x1d3e4a[_0xbf976d(0x1bf)](_0xbf976d(0x1ab)));const _0x25d422=[..._0x145aa6['entries']()][_0xbf976d(0x1a8)]((_0x25b3e9,_0xad2afc)=>_0x25b3e9[0x0][_0xbf976d(0x195)](_0xad2afc[0x0]));for(const [,_0x145c6e]of _0x25d422){const _0x31d006=_0x145c6e[_0xbf976d(0x1a5)]&&_0x145c6e[_0xbf976d(0x1a5)]!==_0x145c6e[_0xbf976d(0x1b5)]?'\x20'+a133_0x1d3e4a[_0xbf976d(0x1bf)]('('+_0x145c6e['tableName']+')'):'';console['error']('\x20\x20'+a133_0x1d3e4a[_0xbf976d(0x1b7)](_0x145c6e[_0xbf976d(0x1b5)])+_0x31d006);for(const _0x427fda of sortByColumnName(_0x145c6e[_0xbf976d(0x1ce)])){console[_0xbf976d(0x1c7)](formatFieldLine(columnName(_0x427fda),_0x427fda['name'],_0x427fda['type']));}}}if(_0x4e4bf5[_0xbf976d(0x1bd)]>0x0){console['error']('\x0a'+a133_0x1d3e4a[_0xbf976d(0x1bf)](_0xbf976d(0x1c1)));const _0x2683bd=[..._0x4e4bf5[_0xbf976d(0x1aa)]()]['sort']((_0xcafdde,_0x2d6b6d)=>_0xcafdde[0x0]['localeCompare'](_0x2d6b6d[0x0]));for(const [_0x2cad7a,_0x39836d]of _0x2683bd){const _0x345c4e=_0x39836d[0x0],_0x50f2e7=_0x345c4e?.[_0xbf976d(0x1ac)];if(_0x50f2e7){const _0x4bc8a8=_0x50f2e7!==_0x2cad7a?'\x20'+a133_0x1d3e4a[_0xbf976d(0x1bf)]('('+_0x2cad7a+')'):'';console[_0xbf976d(0x1c7)]('\x20\x20'+a133_0x1d3e4a[_0xbf976d(0x1b7)](_0x50f2e7)+_0x4bc8a8);}else{const _0xbb37f6=_0x345c4e?.[_0xbf976d(0x197)]||'';console['error']('\x20\x20'+a133_0x1d3e4a[_0xbf976d(0x1b7)](_0x2cad7a)+(_0xbb37f6?'\x20'+a133_0x1d3e4a['dim']('('+_0xbb37f6+')'):''));}for(const _0x13778d of sortByColumnName(_0x39836d)){const _0x292464=_0x13778d['name'][_0xbf976d(0x1a4)](_0x2cad7a+'.')?_0x13778d[_0xbf976d(0x1c3)][_0xbf976d(0x1cf)](_0x2cad7a[_0xbf976d(0x193)]+0x1):_0x13778d['name'];console['error'](formatFieldLine(columnName(_0x13778d),_0x292464,_0x13778d[_0xbf976d(0x1a3)]));}}}const _0xb4ab46=_0x1dc780[_0xbf976d(0x196)](_0x1c9bc4=>_0x1c9bc4['matrixColumnName']||_0x1c9bc4['matrixTableName']);_0xb4ab46&&(console['error']('\x0a'+a133_0x1d3e4a[_0xbf976d(0x1bf)](_0xbf976d(0x1c0))),console[_0xbf976d(0x1c7)](a133_0x1d3e4a[_0xbf976d(0x1bf)](_0xbf976d(0x1b0)))),console[_0xbf976d(0x1c7)]('');}
@@ -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(_0x22f7fa,_0x469b30){const _0x1b3b71=a134_0x2ca7,_0x4356e2=_0x22f7fa();while(!![]){try{const _0x5bd267=-parseInt(_0x1b3b71(0x1fc))/0x1+parseInt(_0x1b3b71(0x1f2))/0x2*(-parseInt(_0x1b3b71(0x1f3))/0x3)+parseInt(_0x1b3b71(0x1f6))/0x4+-parseInt(_0x1b3b71(0x1e8))/0x5*(-parseInt(_0x1b3b71(0x1fe))/0x6)+-parseInt(_0x1b3b71(0x1ed))/0x7*(-parseInt(_0x1b3b71(0x1f0))/0x8)+parseInt(_0x1b3b71(0x1fd))/0x9*(parseInt(_0x1b3b71(0x1f5))/0xa)+parseInt(_0x1b3b71(0x1ff))/0xb*(-parseInt(_0x1b3b71(0x1e9))/0xc);if(_0x5bd267===_0x469b30)break;else _0x4356e2['push'](_0x4356e2['shift']());}catch(_0x10bcc1){_0x4356e2['push'](_0x4356e2['shift']());}}}(a134_0x5897,0x3dd14));import{readdirSync,statSync}from'fs';import a134_0x232077 from'path';export function findYamlFiles(_0x3b29c9){const _0x2681a6=[];function _0x1b605d(_0x34c91d){const _0x401db2=a134_0x2ca7,_0x3462c4=readdirSync(_0x34c91d,{'withFileTypes':!![]});for(const _0x5a7aa4 of _0x3462c4){const _0x221638=a134_0x232077[_0x401db2(0x1fa)](_0x34c91d,_0x5a7aa4[_0x401db2(0x1fb)]);if(_0x5a7aa4['isDirectory']())_0x1b605d(_0x221638);else(_0x5a7aa4[_0x401db2(0x1fb)][_0x401db2(0x1eb)](_0x401db2(0x1f4))||_0x5a7aa4[_0x401db2(0x1fb)][_0x401db2(0x1eb)](_0x401db2(0x1f1)))&&_0x2681a6[_0x401db2(0x1ef)](_0x221638);}}return _0x1b605d(_0x3b29c9),_0x2681a6;}export function discoverYamlFiles(_0x427d74){const _0x3eb3a5=a134_0x2ca7,_0x575e68=findYamlFiles(_0x427d74);return _0x575e68[_0x3eb3a5(0x1ee)](_0x30898d=>{const _0x467353=_0x3eb3a5,_0x15b265=a134_0x232077[_0x467353(0x1ec)](_0x427d74,_0x30898d),_0x174d0d=a134_0x232077[_0x467353(0x1f7)](_0x15b265);return{'absolutePath':_0x30898d,'relativePath':_0x15b265,'folderPath':_0x174d0d==='.'?'':_0x174d0d};});}function a134_0x2ca7(_0x54304c,_0x479e75){_0x54304c=_0x54304c-0x1e8;const _0x589746=a134_0x5897();let _0x2ca74f=_0x589746[_0x54304c];return _0x2ca74f;}export function isYamlFile(_0x161f84){const _0x5671e3=a134_0x2ca7;try{const _0x597ff0=statSync(_0x161f84);if(!_0x597ff0[_0x5671e3(0x1f8)]())return![];const _0x138a28=a134_0x232077[_0x5671e3(0x1ea)](_0x161f84)[_0x5671e3(0x1f9)]();return _0x138a28==='.yml'||_0x138a28===_0x5671e3(0x1f1);}catch{return![];}}function a134_0x5897(){const _0x506c44=['2907hBptiK','90BcWOcD','898392wdnkzv','29765FlBFcO','84ECVoYI','extname','endsWith','relative','7AbQLiN','map','push','2563960iboyav','.yaml','8xzEbjO','42249SwgjpI','.yml','5890agMTLy','1560808iKLIaW','dirname','isFile','toLowerCase','join','name','108999wtuDTu'];a134_0x5897=function(){return _0x506c44;};return a134_0x5897();}
@@ -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(_0x45992f,_0x1b6e01){const _0x475b1e=a135_0x1d4e,_0x45a5d9=_0x45992f();while(!![]){try{const _0x3baf29=parseInt(_0x475b1e(0x1d4))/0x1+parseInt(_0x475b1e(0x1c2))/0x2+-parseInt(_0x475b1e(0x1e9))/0x3+parseInt(_0x475b1e(0x1cc))/0x4+parseInt(_0x475b1e(0x1f1))/0x5+-parseInt(_0x475b1e(0x1e4))/0x6*(parseInt(_0x475b1e(0x1be))/0x7)+parseInt(_0x475b1e(0x1d7))/0x8;if(_0x3baf29===_0x1b6e01)break;else _0x45a5d9['push'](_0x45a5d9['shift']());}catch(_0x53f52e){_0x45a5d9['push'](_0x45a5d9['shift']());}}}(a135_0xc712,0xbad6f));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x5f3f3b){const _0x546966=a135_0x1d4e;return _0x5f3f3b[_0x546966(0x1ca)]()[_0x546966(0x1cf)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x546966(0x1cf)](/_+/g,'_')[_0x546966(0x1cf)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x4fe8c7){const _0x45bec6=a135_0x1d4e,_0x2ad7f0=_0x4fe8c7['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2ad7f0){const _0x17af61=_0x2ad7f0[0x1]['toLowerCase'](),_0xb9bab2=_0x2ad7f0[0x2],_0x5b1540=_0xb9bab2[_0x45bec6(0x1cf)](/-/g,'')[_0x45bec6(0x1ee)](0x0,0x4)[_0x45bec6(0x1ca)]();return _0x17af61+'_'+_0x5b1540;}const _0x9d62c3=_0x4fe8c7[_0x45bec6(0x1dc)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x9d62c3){const _0x5ef2e4=_0x9d62c3[0x1],_0x4f5c5e=_0x9d62c3[0x2][_0x45bec6(0x1ca)](),_0x4830ff=_0x5ef2e4[_0x45bec6(0x1cf)](/-/g,'')[_0x45bec6(0x1ee)](0x0,0x4)[_0x45bec6(0x1ca)]();return _0x4f5c5e+'_'+_0x4830ff;}return undefined;}function a135_0x1d4e(_0x5a85c6,_0x5431e1){_0x5a85c6=_0x5a85c6-0x1b5;const _0xc7123c=a135_0xc712();let _0x1d4ef3=_0xc7123c[_0x5a85c6];return _0x1d4ef3;}function stableStringify(_0x220dce){const _0x28f1ae=a135_0x1d4e;if(Array['isArray'](_0x220dce))return'['+_0x220dce[_0x28f1ae(0x1f2)](_0x27966b=>stableStringify(_0x27966b))['join'](',')+']';if(_0x220dce&&typeof _0x220dce==='object'){const _0x175abd=_0x220dce,_0x50b258=Object[_0x28f1ae(0x1b6)](_0x175abd)[_0x28f1ae(0x1fd)](),_0x47e226=_0x50b258[_0x28f1ae(0x1f2)](_0x3f6fee=>'\x22'+_0x3f6fee+'\x22:'+stableStringify(_0x175abd[_0x3f6fee]));return'{'+_0x47e226[_0x28f1ae(0x1e3)](',')+'}';}const _0x4018e2=JSON[_0x28f1ae(0x1fb)](_0x220dce);return _0x4018e2===undefined?_0x28f1ae(0x1f6):_0x4018e2;}export function consolidateActivationsByContent(_0x21b939){const _0x34f29c=a135_0x1d4e,_0x5daf4e={},_0x407644=new Map(),_0x223c3e=new Map();for(const _0x4540b3 of _0x21b939){if(!_0x4540b3)continue;for(const [_0x82655a,_0xdd0679]of Object[_0x34f29c(0x1d2)](_0x4540b3)){const _0x23c7cc={'name':_0xdd0679[_0x34f29c(0x1f8)],'connection':_0xdd0679['connection'],..._0xdd0679[_0x34f29c(0x1c8)]!==undefined&&{'all_columns':_0xdd0679['all_columns']},..._0xdd0679['columns']!==undefined&&{'columns':_0xdd0679[_0x34f29c(0x204)]},..._0xdd0679['behavior']!==undefined&&{'behavior':_0xdd0679[_0x34f29c(0x1df)]},..._0xdd0679[_0x34f29c(0x1c4)]!==undefined&&{'schedule':_0xdd0679[_0x34f29c(0x1c4)]},..._0xdd0679[_0x34f29c(0x1c5)]!==undefined&&{'notification':_0xdd0679[_0x34f29c(0x1c5)]},..._0xdd0679[_0x34f29c(0x205)]!==undefined&&{'connector_config':_0xdd0679[_0x34f29c(0x205)]},..._0xdd0679[_0x34f29c(0x1e5)]!==undefined&&{'activation_template_id':_0xdd0679[_0x34f29c(0x1e5)]}},_0x1cd83e=stableStringify(_0x23c7cc),_0x365c74=_0x223c3e[_0x34f29c(0x1ed)](_0x1cd83e);_0x365c74?_0x407644[_0x34f29c(0x1d1)](_0x82655a,_0x365c74):(_0x5daf4e[_0x82655a]=_0xdd0679,_0x407644[_0x34f29c(0x1d1)](_0x82655a,_0x82655a),_0x223c3e[_0x34f29c(0x1d1)](_0x1cd83e,_0x82655a));}}return{'merged':_0x5daf4e,'nameMapping':_0x407644};}export function updateActivationReferences(_0x318289,_0x112e7e){const _0x18850e=a135_0x1d4e;if(!_0x318289)return;for(const _0xba058a of _0x318289){if(!_0xba058a[_0x18850e(0x1bd)])continue;for(const _0x225168 of _0xba058a[_0x18850e(0x1bd)]){if(_0x225168[_0x18850e(0x1ba)]===_0x18850e(0x1d5)&&_0x225168[_0x18850e(0x1cd)]?.[_0x18850e(0x1d5)]){const _0x1b80cc=_0x112e7e[_0x18850e(0x1ed)](_0x225168[_0x18850e(0x1cd)][_0x18850e(0x1d5)]);_0x1b80cc&&_0x1b80cc!==_0x225168['with'][_0x18850e(0x1d5)]&&(_0x225168[_0x18850e(0x1cd)]['activation']=_0x1b80cc);}}}}export function consolidateSegmentsByContent(_0x45ca87,_0x569cad){const _0x40c6dc=a135_0x1d4e,_0x290716={},_0xab7728=new Map(),_0x3478bc=new Map();for(const _0x44fa83 of _0x45ca87){if(!_0x44fa83)continue;for(const [_0x4f1f91,_0x5dca0a]of Object[_0x40c6dc(0x1d2)](_0x44fa83)){if(!_0x5dca0a[_0x40c6dc(0x1e7)]){_0x290716[_0x4f1f91]=_0x5dca0a,_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x4f1f91);continue;}const _0x4a986c=_0x5dca0a[_0x40c6dc(0x1d3)]&&_0x5dca0a[_0x40c6dc(0x1d3)][_0x40c6dc(0x1c9)]()?_0x5dca0a[_0x40c6dc(0x1d3)]:undefined,_0x4d227b=JSON['stringify']({'description':_0x4a986c,'rule':deepSortObject(_0x5dca0a['rule'])}),_0x2319f3=_0x3478bc['get'](_0x4d227b);if(_0x2319f3){const _0x4154c5={..._0x5dca0a[_0x40c6dc(0x1d3)]!==undefined&&{'description':_0x5dca0a[_0x40c6dc(0x1d3)]},'rule':_0x5dca0a['rule']?deepSortObject(_0x5dca0a[_0x40c6dc(0x1e7)]):_0x5dca0a[_0x40c6dc(0x1e7)]};if(_0x4f1f91<_0x2319f3){_0x290716[_0x4f1f91]=_0x4154c5,delete _0x290716[_0x2319f3];for(const [_0x18b295,_0x224779]of _0xab7728[_0x40c6dc(0x1d2)]()){_0x224779===_0x2319f3&&_0xab7728['set'](_0x18b295,_0x4f1f91);}_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x4f1f91),_0x3478bc['set'](_0x4d227b,_0x4f1f91);}else _0x290716[_0x2319f3]=_0x4154c5,_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x2319f3);}else{let _0x3a4dec=_0x4f1f91;if(_0x569cad){const _0x45c784=_0x569cad[_0x40c6dc(0x1ed)](_0x4d227b);_0x45c784&&_0x45c784[_0x40c6dc(0x1bc)]>0x0&&(_0x3a4dec=_0x45c784[_0x40c6dc(0x1ee)]()[_0x40c6dc(0x1fd)]()[0x0]);}const _0x48ba0b={..._0x5dca0a[_0x40c6dc(0x1d3)]!==undefined&&{'description':_0x5dca0a[_0x40c6dc(0x1d3)]},'rule':_0x5dca0a[_0x40c6dc(0x1e7)]?deepSortObject(_0x5dca0a[_0x40c6dc(0x1e7)]):_0x5dca0a[_0x40c6dc(0x1e7)]};_0x290716[_0x3a4dec]=_0x48ba0b,_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x3a4dec),_0x3478bc[_0x40c6dc(0x1d1)](_0x4d227b,_0x3a4dec);}}}return{'merged':_0x290716,'nameMapping':_0xab7728};}export function updateSegmentReferences(_0x4a99f6,_0x5dad0a){const _0x47bc07=a135_0x1d4e;if(!_0x4a99f6)return;for(const _0x1acf1d of _0x4a99f6){if(_0x1acf1d[_0x47bc07(0x1ef)]?.['segment']){const _0x246bd8=_0x5dad0a['get'](_0x1acf1d[_0x47bc07(0x1ef)][_0x47bc07(0x203)]);_0x246bd8&&(_0x1acf1d['entry_criteria'][_0x47bc07(0x203)]=_0x246bd8);}if(_0x1acf1d['exit_criteria'])for(const _0x1a326c of _0x1acf1d[_0x47bc07(0x1f5)]){if(_0x1a326c[_0x47bc07(0x203)]){const _0x211db2=_0x5dad0a[_0x47bc07(0x1ed)](_0x1a326c[_0x47bc07(0x203)]);_0x211db2&&(_0x1a326c[_0x47bc07(0x203)]=_0x211db2);}}if(_0x1acf1d[_0x47bc07(0x1b7)]?.['segment']){const _0x2f0999=_0x5dad0a[_0x47bc07(0x1ed)](_0x1acf1d[_0x47bc07(0x1b7)]['segment']);_0x2f0999&&(_0x1acf1d[_0x47bc07(0x1b7)][_0x47bc07(0x203)]=_0x2f0999);}if(_0x1acf1d[_0x47bc07(0x1bd)])for(const _0x22cb4f of _0x1acf1d[_0x47bc07(0x1bd)]){if(_0x22cb4f[_0x47bc07(0x1ba)]===_0x47bc07(0x1bb)&&_0x22cb4f[_0x47bc07(0x1cd)]?.['branches'])for(const _0xef23d1 of _0x22cb4f[_0x47bc07(0x1cd)][_0x47bc07(0x1b8)]){if(_0xef23d1['segment']){const _0x325f0b=_0x5dad0a['get'](_0xef23d1[_0x47bc07(0x203)]);_0x325f0b&&(_0xef23d1[_0x47bc07(0x203)]=_0x325f0b);}}if(_0x22cb4f[_0x47bc07(0x1ba)]===_0x47bc07(0x1c6)&&_0x22cb4f[_0x47bc07(0x1cd)]?.[_0x47bc07(0x1fe)]?.[_0x47bc07(0x203)]){const _0x3561c3=_0x5dad0a[_0x47bc07(0x1ed)](_0x22cb4f[_0x47bc07(0x1cd)][_0x47bc07(0x1fe)][_0x47bc07(0x203)]);_0x3561c3&&(_0x22cb4f[_0x47bc07(0x1cd)][_0x47bc07(0x1fe)][_0x47bc07(0x203)]=_0x3561c3);}}}}export function updateSegmentRefsInSegments(_0x5a5dde,_0x5b7ff7){const _0x111fee=a135_0x1d4e;for(const _0x59c424 of Object[_0x111fee(0x1d8)](_0x5a5dde)){_0x59c424['rule']&&updateSegmentRefsInRule(_0x59c424['rule'],_0x5b7ff7);}}function updateSegmentRefsInRule(_0x1e3643,_0x438426){const _0x2b8844=a135_0x1d4e;if(_0x1e3643===null||typeof _0x1e3643!==_0x2b8844(0x1f3))return;if(Array[_0x2b8844(0x1d9)](_0x1e3643)){for(const _0x12b1de of _0x1e3643){updateSegmentRefsInRule(_0x12b1de,_0x438426);}return;}const _0x5a872f=_0x1e3643;if((_0x5a872f[_0x2b8844(0x1ba)]===_0x2b8844(0x1c1)||_0x5a872f[_0x2b8844(0x1ba)]==='exclude')&&typeof _0x5a872f[_0x2b8844(0x203)]===_0x2b8844(0x1f7)){const _0x3c1732=_0x438426['get'](_0x5a872f[_0x2b8844(0x203)]);_0x3c1732&&(_0x5a872f['segment']=_0x3c1732);}if(_0x5a872f[_0x2b8844(0x1db)]&&Array[_0x2b8844(0x1d9)](_0x5a872f[_0x2b8844(0x1db)]))for(const _0x3c36f3 of _0x5a872f[_0x2b8844(0x1db)]){updateSegmentRefsInRule(_0x3c36f3,_0x438426);}}export function buildJourneysArray(_0x11c169,_0x50a1f4){const _0x514d4d=a135_0x1d4e;return _0x11c169[_0x514d4d(0x1f2)](_0x26af10=>{const _0x5da277=_0x514d4d,_0x1e4251=_0x50a1f4?_0x26af10['item']['id']===_0x50a1f4:_0x11c169['length']===0x1,_0x32dfc5=_0x26af10[_0x5da277(0x1cb)]['journeys']?.[0x0],_0x3a42e4=_0x32dfc5?.[_0x5da277(0x1f4)]||_0x26af10['yaml'][_0x5da277(0x1f4)],_0x26d772={'version':_0x32dfc5?.[_0x5da277(0x1c0)]||_0x26af10['yaml'][_0x5da277(0x1c0)]||_0x26af10[_0x5da277(0x1f0)][_0x5da277(0x1f8)],'state':_0x26af10[_0x5da277(0x1f0)][_0x5da277(0x1dd)]===_0x5da277(0x1eb)?_0x5da277(0x1eb):_0x5da277(0x1f9),'stages':_0x32dfc5?.[_0x5da277(0x1ce)]||_0x26af10[_0x5da277(0x1cb)][_0x5da277(0x1ce)]||[],'id':_0x32dfc5?.['id']||_0x26af10[_0x5da277(0x1cb)]['id'],'version_number':_0x32dfc5?.[_0x5da277(0x1e1)]||_0x26af10[_0x5da277(0x1cb)]['version_number']};return _0x3a42e4&&(_0x26d772[_0x5da277(0x1f4)]=_0x3a42e4),_0x1e4251&&(_0x26d772['latest']=!![]),_0x26d772;});}export function buildMergedJourneyDef(_0x503b72,_0x5f2602,_0x1748b8){const _0x2b8b9a=a135_0x1d4e,_0x5ad76e=_0x503b72[0x0][_0x2b8b9a(0x1cb)],_0x3f88f8=buildJourneysArray(_0x503b72,_0x1748b8),{merged:_0x48aefa,nameMapping:_0x2f9d83}=consolidateSegmentsByContent(_0x503b72['map'](_0x4f7f85=>_0x4f7f85['yaml']['segments']),_0x5f2602);updateSegmentRefsInSegments(_0x48aefa,_0x2f9d83);const _0x54dc2f=Array['from'](_0x2f9d83[_0x2b8b9a(0x1d2)]())[_0x2b8b9a(0x1ff)](([_0x3afa42,_0x442e85])=>_0x3afa42!==_0x442e85&&_0x3afa42[_0x2b8b9a(0x1ea)]('entry_criteria'));let _0x4cbe6e=_0x48aefa,_0x221268=new Map();if(_0x54dc2f){const _0x55cd80=consolidateSegmentsByContent([_0x48aefa],_0x5f2602);_0x4cbe6e=_0x55cd80[_0x2b8b9a(0x1e2)],_0x221268=_0x55cd80[_0x2b8b9a(0x202)];}const _0x1cfd88=new Map(_0x2f9d83);for(const [_0x355f82,_0x241539]of _0x221268[_0x2b8b9a(0x1d2)]()){_0x1cfd88[_0x2b8b9a(0x1d1)](_0x355f82,_0x241539);}for(const [_0x2e2627,_0xe44073]of _0x1cfd88[_0x2b8b9a(0x1d2)]()){let _0x3d5aae=_0xe44073,_0xcbbdb8=0x0;while(_0x1cfd88[_0x2b8b9a(0x1d0)](_0x3d5aae)&&_0x1cfd88[_0x2b8b9a(0x1ed)](_0x3d5aae)!==_0x3d5aae&&_0xcbbdb8<MAX_MAPPING_CHAIN_DEPTH){_0x3d5aae=_0x1cfd88[_0x2b8b9a(0x1ed)](_0x3d5aae),_0xcbbdb8++;}_0x3d5aae!==_0xe44073&&_0x1cfd88[_0x2b8b9a(0x1d1)](_0x2e2627,_0x3d5aae);}for(const _0x368982 of _0x3f88f8){updateSegmentReferences(_0x368982['stages'],_0x1cfd88);}const {merged:_0x4275a6,nameMapping:_0x38fe27}=consolidateActivationsByContent(_0x503b72[_0x2b8b9a(0x1f2)](_0x41f5d7=>_0x41f5d7[_0x2b8b9a(0x1cb)][_0x2b8b9a(0x1de)]));for(const _0x585ae1 of _0x3f88f8){updateActivationReferences(_0x585ae1[_0x2b8b9a(0x1ce)],_0x38fe27);}let _0x1de5cc=_0x5ad76e[_0x2b8b9a(0x1f4)];if(_0x1de5cc?.[_0x2b8b9a(0x203)]){const _0xa4a877=_0x1cfd88['get'](_0x1de5cc[_0x2b8b9a(0x203)]);_0xa4a877&&(_0x1de5cc={..._0x1de5cc,'segment':_0xa4a877});}for(const _0x2d57dc of _0x3f88f8){if(_0x2d57dc[_0x2b8b9a(0x1f4)]?.[_0x2b8b9a(0x203)]){const _0x1c9910=_0x1cfd88['get'](_0x2d57dc[_0x2b8b9a(0x1f4)][_0x2b8b9a(0x203)]);_0x1c9910&&(_0x2d57dc[_0x2b8b9a(0x1f4)]={..._0x2d57dc[_0x2b8b9a(0x1f4)],'segment':_0x1c9910});}}return _0x3f88f8[_0x2b8b9a(0x1ff)](_0xb56694=>_0xb56694[_0x2b8b9a(0x1f4)])&&(_0x1de5cc=undefined),{'type':_0x2b8b9a(0x1d6),'name':_0x5ad76e[_0x2b8b9a(0x1f8)],'description':_0x5ad76e[_0x2b8b9a(0x1d3)],'goal':_0x1de5cc,'reentry':_0x5ad76e[_0x2b8b9a(0x1b9)],'segments':Object[_0x2b8b9a(0x1b6)](_0x4cbe6e)[_0x2b8b9a(0x1bc)]>0x0?_0x4cbe6e:undefined,'activations':Object[_0x2b8b9a(0x1b6)](_0x4275a6)[_0x2b8b9a(0x1bc)]>0x0?_0x4275a6:undefined,'journeys':_0x3f88f8,'bundle_id':_0x5ad76e[_0x2b8b9a(0x1bf)],'bundle_name':_0x5ad76e[_0x2b8b9a(0x1fa)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x1a99f9,_0x476019,_0x59df8b,_0x3b69fb){const _0x337e17=a135_0x1d4e,_0x48c78b=_0x1a99f9+':'+_0x476019,_0xce7fe0=_0x59df8b['get'](_0x48c78b);if(_0xce7fe0)return _0xce7fe0;const _0x2bc6b9=await _0x3b69fb(_0x1a99f9),_0x4b4999=_0x2bc6b9[_0x337e17(0x1c3)][_0x337e17(0x1e0)]||_0x2bc6b9[_0x337e17(0x1c3)][_0x337e17(0x1f8)],_0x2682ff=_0x2bc6b9[_0x337e17(0x1c3)][_0x337e17(0x1da)][_0x337e17(0x1e6)](_0x1a7c88=>String(_0x1a7c88['id'])===String(_0x476019)),_0x5296b2=_0x2682ff?.[_0x337e17(0x1f8)]||_0x476019,_0x10d560={'journeyName':_0x4b4999,'stageName':_0x5296b2};return _0x59df8b[_0x337e17(0x1d1)](_0x48c78b,_0x10d560),_0x10d560;}export function formatApiJourneyName(_0x20c2d8,_0x148ecf){return _0x148ecf+'\x20('+_0x20c2d8+')';}export function isLocalJourneyRef(_0x52a35d){const _0x205764=a135_0x1d4e;return _0x52a35d[_0x205764(0x1fc)](_0x205764(0x200))||_0x52a35d[_0x205764(0x1fc)]('.yaml');}export function buildLocalRuleToNameMapping(_0x5ef646){const _0x5a1353=a135_0x1d4e,_0x129e58=new Map();if(!_0x5ef646)return _0x129e58;for(const [_0x519edc,_0x4aa517]of Object['entries'](_0x5ef646)){if(_0x4aa517[_0x5a1353(0x1e7)]){const _0x431e61=serializeRule(_0x4aa517[_0x5a1353(0x1e7)]),_0x296115=_0x129e58[_0x5a1353(0x1ed)](_0x431e61)||[];_0x296115['push'](_0x519edc),_0x129e58[_0x5a1353(0x1d1)](_0x431e61,_0x296115);}}return _0x129e58;}function a135_0xc712(){const _0x1289cf=['exit_criteria','null','string','name','draft','bundle_name','stringify','endsWith','sort','condition','some','.yml','journeys','nameMapping','segment','columns','connector_config','versions','keys','milestone','branches','reentry','type','decision_point','length','steps','56ZWcvup','bundle_id','version','include','1315090TDicDA','attributes','schedule','notification','wait','segments','all_columns','trim','toLowerCase','yaml','2844568EnEspD','with','stages','replace','has','set','entries','description','842854XuqGTf','activation','journey','4971824KpHlxr','values','isArray','journeyStages','conditions','match','state','activations','behavior','journeyBundleName','version_number','merged','join','1117884kgIlJT','activation_template_id','find','rule','push','4207194OYMRmJ','startsWith','launched','index','get','slice','entry_criteria','item','4125930GYuhWH','map','object','goal'];a135_0xc712=function(){return _0x1289cf;};return a135_0xc712();}export function buildLocalRuleToNameMappingFromJourney(_0x2e87cc){const _0x41c023=a135_0x1d4e,_0x1baabd=_0x2e87cc[_0x41c023(0x1c7)];if(!_0x1baabd)return new Map();const _0x56fa4d=collectSegmentUsageCounts(_0x2e87cc),_0x3442ed=new Map();let _0x4d46a9=0x0;for(const [_0xfdcb4a,_0x1da1c2]of Object[_0x41c023(0x1d2)](_0x1baabd)){if(!_0x1da1c2[_0x41c023(0x1e7)]){_0x4d46a9++;continue;}const _0x5bb318=serializeRule(_0x1da1c2['rule']),_0xe11aaa=_0x3442ed['get'](_0x5bb318)||[];_0xe11aaa[_0x41c023(0x1e8)]({'name':_0xfdcb4a,'index':_0x4d46a9}),_0x3442ed[_0x41c023(0x1d1)](_0x5bb318,_0xe11aaa),_0x4d46a9++;}const _0x403c73=new Map();for(const [_0x1b85ea,_0x3eca36]of _0x3442ed){const _0xc12191=_0x3eca36[_0x41c023(0x1ee)]()[_0x41c023(0x1fd)]((_0x19c783,_0x42ccd7)=>{const _0x43a976=_0x41c023,_0x3a03ad=_0x56fa4d[_0x43a976(0x1ed)](_0x19c783['name'])||0x0,_0x8b5498=_0x56fa4d[_0x43a976(0x1ed)](_0x42ccd7[_0x43a976(0x1f8)])||0x0;if(_0x3a03ad!==_0x8b5498)return _0x8b5498-_0x3a03ad;return _0x19c783['index']-_0x42ccd7[_0x43a976(0x1ec)];})['map'](_0x1bcc41=>_0x1bcc41['name']);_0x403c73[_0x41c023(0x1d1)](_0x1b85ea,_0xc12191);}return _0x403c73;}export function collectSegmentUsageCounts(_0x3d370c){const _0x1a5646=a135_0x1d4e,_0x2fc249=new Map(),_0x7af3a3=_0x227a13=>{const _0x461aae=a135_0x1d4e;if(!_0x227a13)return;_0x2fc249[_0x461aae(0x1d1)](_0x227a13,(_0x2fc249[_0x461aae(0x1ed)](_0x227a13)||0x0)+0x1);},_0x3f3859=_0x203193=>{const _0x547802=a135_0x1d4e;for(const _0xdcfe39 of _0x203193){_0x7af3a3(_0xdcfe39[_0x547802(0x1ef)]?.[_0x547802(0x203)]);if(_0xdcfe39[_0x547802(0x1f5)])for(const _0x34206d of _0xdcfe39['exit_criteria']){_0x7af3a3(_0x34206d[_0x547802(0x203)]);}_0x7af3a3(_0xdcfe39[_0x547802(0x1b7)]?.[_0x547802(0x203)]);if(_0xdcfe39['steps'])for(const _0x5f5d7c of _0xdcfe39[_0x547802(0x1bd)]){if(_0x5f5d7c[_0x547802(0x1ba)]===_0x547802(0x1bb))for(const _0xae4bd2 of _0x5f5d7c['with'][_0x547802(0x1b8)]){_0x7af3a3(_0xae4bd2['segment']);}else _0x5f5d7c[_0x547802(0x1ba)]===_0x547802(0x1c6)&&_0x7af3a3(_0x5f5d7c['with'][_0x547802(0x1fe)]?.[_0x547802(0x203)]);}}};_0x7af3a3(_0x3d370c['goal']?.['segment']);if(_0x3d370c[_0x1a5646(0x201)])for(const _0x2c4129 of _0x3d370c[_0x1a5646(0x201)]){_0x7af3a3(_0x2c4129[_0x1a5646(0x1f4)]?.[_0x1a5646(0x203)]),_0x3f3859(_0x2c4129[_0x1a5646(0x1ce)]);}_0x3d370c[_0x1a5646(0x1ce)]&&_0x3f3859(_0x3d370c[_0x1a5646(0x1ce)]);if(_0x3d370c[_0x1a5646(0x1b5)])for(const _0x1cc3ff of _0x3d370c[_0x1a5646(0x1b5)]){_0x3f3859(_0x1cc3ff[_0x1a5646(0x1ce)]);}return _0x2fc249;}
@@ -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(_0x131a02,_0x454ab5){const _0xc46b86=a136_0x4746,_0x25937a=_0x131a02();while(!![]){try{const _0x57b62b=-parseInt(_0xc46b86(0x16f))/0x1*(-parseInt(_0xc46b86(0x1ad))/0x2)+-parseInt(_0xc46b86(0x11f))/0x3+-parseInt(_0xc46b86(0x184))/0x4+parseInt(_0xc46b86(0x105))/0x5*(-parseInt(_0xc46b86(0x187))/0x6)+-parseInt(_0xc46b86(0x130))/0x7+parseInt(_0xc46b86(0x15d))/0x8*(-parseInt(_0xc46b86(0x181))/0x9)+parseInt(_0xc46b86(0x149))/0xa*(parseInt(_0xc46b86(0x16b))/0xb);if(_0x57b62b===_0x454ab5)break;else _0x25937a['push'](_0x25937a['shift']());}catch(_0x170b7f){_0x25937a['push'](_0x25937a['shift']());}}}(a136_0x29fe,0xcb588));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x46bd3c,_0x4175c0,_0x212ce0,_0x318ee1,_0x2f24d9,_0x1d522e){const _0x290bdb=a136_0x4746;return{'level':_0x46bd3c,'path':_0x4175c0,'code':_0x212ce0,'message':_0x318ee1,'location':getLocationFromPath(_0x2f24d9[_0x290bdb(0xff)],_0x2f24d9[_0x290bdb(0xfa)],pathToArray(_0x1d522e??_0x4175c0))};}function validateVersionStructure(_0x194d5c,_0x40b6e9){const _0x1e64c0=a136_0x4746,_0x204d3e=[];return _0x194d5c[_0x1e64c0(0x13c)]>MAX_STAGES&&_0x204d3e[_0x1e64c0(0x19a)](createIssue(_0x1e64c0(0xf8),_0x1e64c0(0x14b),_0x1e64c0(0x192),_0x1e64c0(0x117)+_0x194d5c['length']+_0x1e64c0(0x199)+MAX_STAGES,_0x40b6e9)),_0x204d3e;}function validateStageStructure(_0x318c40,_0xb07a99,_0x1007b4,_0x49da17){const _0x12b30f=a136_0x4746,_0x38f7e2=[],_0x54f62a='stages['+_0xb07a99+']';_0xb07a99===0x0&&!_0x318c40[_0x12b30f(0x154)]&&_0x38f7e2[_0x12b30f(0x19a)](createIssue('error',_0x54f62a+_0x12b30f(0x17c),_0x12b30f(0x108),'Stage\x20\x27'+_0x318c40[_0x12b30f(0x112)]+_0x12b30f(0x143),_0x49da17,_0x54f62a));const _0x30f4c1=_0xb07a99===_0x1007b4-0x1;!_0x30f4c1&&!_0x318c40[_0x12b30f(0x186)]&&_0x38f7e2['push'](createIssue(_0x12b30f(0xf8),_0x54f62a+_0x12b30f(0x122),'MISSING_MILESTONE','Stage\x20\x27'+_0x318c40['name']+_0x12b30f(0x119),_0x49da17,_0x54f62a));(!_0x318c40[_0x12b30f(0x19f)]||_0x318c40[_0x12b30f(0x19f)][_0x12b30f(0x13c)]===0x0)&&_0x38f7e2['push'](createIssue(_0x12b30f(0x193),_0x54f62a+_0x12b30f(0x12c),_0x12b30f(0x13e),_0x12b30f(0x144)+_0x318c40[_0x12b30f(0x112)]+_0x12b30f(0x172),_0x49da17,_0x54f62a));const _0x453ab7=_0x318c40[_0x12b30f(0x178)]?.[_0x12b30f(0x13c)]??0x0;if(_0x453ab7===0x0)_0x38f7e2[_0x12b30f(0x19a)](createIssue(_0x12b30f(0xf8),_0x54f62a+'.steps',_0x12b30f(0x10e),'Stage\x20\x27'+_0x318c40[_0x12b30f(0x112)]+_0x12b30f(0x1b3),_0x49da17,_0x54f62a+'.steps'));else{if(_0x453ab7===0x1)_0x38f7e2[_0x12b30f(0x19a)](createIssue(_0x12b30f(0x193),_0x54f62a+_0x12b30f(0x182),_0x12b30f(0x10e),_0x12b30f(0x144)+_0x318c40[_0x12b30f(0x112)]+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x49da17,_0x54f62a+_0x12b30f(0x182)));else _0x453ab7<=0x3&&_0x38f7e2['push'](createIssue(_0x12b30f(0x193),_0x54f62a+'.steps',_0x12b30f(0x198),_0x12b30f(0x144)+_0x318c40[_0x12b30f(0x112)]+'\x27\x20has\x20only\x20'+_0x453ab7+_0x12b30f(0x171),_0x49da17,_0x54f62a+_0x12b30f(0x182)));}return _0x38f7e2;}function validateStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9){const _0x4d315d=a136_0x4746,_0x1dccd5=[];if(_0x1bfa63[_0x4d315d(0x1ac)]==='end')return _0x1bfa63[_0x4d315d(0x106)]&&_0x1dccd5[_0x4d315d(0x19a)](createIssue(_0x4d315d(0xf8),_0x15e82a+_0x4d315d(0x127),_0x4d315d(0x17e),_0x4d315d(0x141)+_0x1bfa63[_0x4d315d(0x112)]+_0x4d315d(0x18a),_0x2e4b82)),_0x4d315d(0x164)in _0x1bfa63&&_0x1bfa63['with']!==undefined&&_0x1dccd5[_0x4d315d(0x19a)](createIssue('error',_0x15e82a+_0x4d315d(0x11a),_0x4d315d(0x17e),_0x4d315d(0x141)+_0x1bfa63[_0x4d315d(0x112)]+_0x4d315d(0x12d),_0x2e4b82)),_0x1dccd5;_0x1bfa63[_0x4d315d(0x106)]&&(_0x2e4b82[_0x4d315d(0x132)]&&!_0x2e4b82[_0x4d315d(0x132)]['has'](_0x1bfa63[_0x4d315d(0x106)])&&_0x1dccd5[_0x4d315d(0x19a)](createIssue(_0x4d315d(0xf8),_0x15e82a+_0x4d315d(0x127),'INVALID_NEXT_REFERENCE',_0x4d315d(0xfc)+_0x1bfa63[_0x4d315d(0x106)]+'\x27',_0x2e4b82)));switch(_0x1bfa63[_0x4d315d(0x1ac)]){case'wait':_0x1dccd5[_0x4d315d(0x19a)](...validateWaitStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9));break;case _0x4d315d(0x103):_0x1dccd5[_0x4d315d(0x19a)](...validateActivationStep(_0x1bfa63,_0x15e82a,_0x2e4b82));break;case _0x4d315d(0x14c):_0x1dccd5[_0x4d315d(0x19a)](...validateDecisionPointStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9));break;case _0x4d315d(0x17d):_0x1dccd5['push'](...validateAbTestStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9));break;case _0x4d315d(0x177):_0x1dccd5[_0x4d315d(0x19a)](...validateJumpStep(_0x1bfa63,_0x15e82a,_0x2e4b82));break;}return _0x1dccd5;}function validateWaitStep(_0x4d0687,_0x1caecd,_0x24efa0,_0x3f906e){const _0x432c39=a136_0x4746,_0x1a3222=[];if(!_0x4d0687[_0x432c39(0x164)])return _0x1a3222['push'](createIssue('error',_0x1caecd+_0x432c39(0x11a),'MISSING_WAIT_PARAMS',_0x432c39(0x125),_0x24efa0,_0x1caecd)),_0x1a3222;if(_0x4d0687[_0x432c39(0x164)][_0x432c39(0x128)]){const _0x4d5652=_0x4d0687[_0x432c39(0x164)][_0x432c39(0x128)];if(_0x4d5652['segment']){_0x24efa0['referencedSegments']?.[_0x432c39(0x18b)](_0x4d5652[_0x432c39(0x19c)]);!_0x4d5652[_0x432c39(0x19c)][_0x432c39(0x191)](_0x432c39(0x174))&&(_0x24efa0[_0x432c39(0x115)]&&!_0x24efa0[_0x432c39(0x115)][_0x432c39(0x11c)](_0x4d5652['segment'])&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0xf8),_0x1caecd+'.with.condition.segment',_0x432c39(0x142),_0x432c39(0xfe)+_0x4d5652[_0x432c39(0x19c)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x24efa0)));_0x4d5652[_0x432c39(0x106)]&&_0x24efa0['stepNames']&&!_0x24efa0[_0x432c39(0x132)][_0x432c39(0x11c)](_0x4d5652[_0x432c39(0x106)])&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0xf8),_0x1caecd+'.with.condition.next',_0x432c39(0x12b),_0x432c39(0x1a4)+_0x4d5652[_0x432c39(0x106)]+'\x27',_0x24efa0));_0x4d5652[_0x432c39(0x15e)]?.[_0x432c39(0x106)]&&_0x24efa0[_0x432c39(0x132)]&&!_0x24efa0['stepNames'][_0x432c39(0x11c)](_0x4d5652['timeout'][_0x432c39(0x106)])&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0xf8),_0x1caecd+_0x432c39(0x14e),_0x432c39(0x12b),_0x432c39(0x14d)+_0x4d5652[_0x432c39(0x15e)][_0x432c39(0x106)]+'\x27',_0x24efa0));const _0x1cea35=_0x4d5652[_0x432c39(0x106)]||_0x4d0687['next'],_0x23db97=_0x4d5652[_0x432c39(0x15e)]?.[_0x432c39(0x106)]||_0x4d0687['next'];if(_0x1cea35){const _0x552f89=_0x3f906e[_0x432c39(0x140)](_0x1cea35);_0x552f89?.['type']===_0x432c39(0x19e)&&_0x1a3222[_0x432c39(0x19a)](createIssue('warning',_0x1caecd+'.with.condition.next',_0x432c39(0x113),_0x432c39(0x152)+_0x1cea35+_0x432c39(0x16e),_0x24efa0,_0x1caecd+_0x432c39(0x157)));}if(_0x23db97){const _0x471222=_0x3f906e[_0x432c39(0x140)](_0x23db97);_0x471222?.[_0x432c39(0x1ac)]===_0x432c39(0x19e)&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0x193),_0x1caecd+_0x432c39(0x14e),'BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x23db97+_0x432c39(0x16e),_0x24efa0,_0x1caecd+_0x432c39(0x163)));}}}return _0x1a3222;}function validateActivationStep(_0x4ae950,_0x1a054d,_0x5e0f75){const _0x5315d5=a136_0x4746,_0x9236e6=[];if(!_0x4ae950[_0x5315d5(0x164)]?.[_0x5315d5(0x103)])return _0x9236e6[_0x5315d5(0x19a)](createIssue(_0x5315d5(0xf8),_0x1a054d+_0x5315d5(0x18c),_0x5315d5(0x17a),_0x5315d5(0x13f),_0x5e0f75,_0x1a054d)),_0x9236e6;const _0x12fa33=_0x4ae950[_0x5315d5(0x164)][_0x5315d5(0x103)];return _0x5e0f75[_0x5315d5(0x155)]&&!_0x12fa33[_0x5315d5(0x191)]('ref:')&&(!_0x5e0f75[_0x5315d5(0x155)][_0x5315d5(0x11c)](_0x12fa33)&&_0x9236e6[_0x5315d5(0x19a)](createIssue(_0x5315d5(0xf8),_0x1a054d+'.with.activation',_0x5315d5(0x11e),_0x5315d5(0xfb)+_0x12fa33+_0x5315d5(0xf7),_0x5e0f75))),_0x9236e6;}function validateDecisionPointStep(_0x210265,_0x3a1215,_0x34afa0,_0xffe9e4){const _0xdb95b4=a136_0x4746,_0x10d816=[];if(!_0x210265['with']?.['branches']||_0x210265[_0xdb95b4(0x164)][_0xdb95b4(0x1a0)][_0xdb95b4(0x13c)]===0x0)return _0x10d816[_0xdb95b4(0x19a)](createIssue('error',_0x3a1215+_0xdb95b4(0x1aa),_0xdb95b4(0x1a3),_0xdb95b4(0x12e),_0x34afa0,_0x3a1215)),_0x10d816;for(let _0x186f4b=0x0;_0x186f4b<_0x210265[_0xdb95b4(0x164)][_0xdb95b4(0x1a0)][_0xdb95b4(0x13c)];_0x186f4b++){const _0x1b44fc=_0x210265[_0xdb95b4(0x164)][_0xdb95b4(0x1a0)][_0x186f4b],_0x18f4e0=_0x3a1215+'.with.branches['+_0x186f4b+']';_0x1b44fc[_0xdb95b4(0x19c)]&&!_0x1b44fc[_0xdb95b4(0x196)]&&(_0x34afa0[_0xdb95b4(0x1af)]?.['add'](_0x1b44fc[_0xdb95b4(0x19c)]),!_0x1b44fc[_0xdb95b4(0x19c)][_0xdb95b4(0x191)](_0xdb95b4(0x174))&&(_0x34afa0[_0xdb95b4(0x115)]&&!_0x34afa0[_0xdb95b4(0x115)]['has'](_0x1b44fc[_0xdb95b4(0x19c)])&&_0x10d816['push'](createIssue(_0xdb95b4(0xf8),_0x18f4e0+_0xdb95b4(0x15a),_0xdb95b4(0x142),_0xdb95b4(0x169)+_0x1b44fc[_0xdb95b4(0x19c)]+'\x27',_0x34afa0))));_0x1b44fc['next']&&_0x34afa0[_0xdb95b4(0x132)]&&!_0x34afa0['stepNames']['has'](_0x1b44fc['next'])&&_0x10d816[_0xdb95b4(0x19a)](createIssue(_0xdb95b4(0xf8),_0x18f4e0+_0xdb95b4(0x127),_0xdb95b4(0x12b),_0xdb95b4(0x161)+_0x1b44fc[_0xdb95b4(0x106)]+'\x27',_0x34afa0));if(_0x1b44fc[_0xdb95b4(0x106)]){const _0x20adcd=_0xffe9e4['get'](_0x1b44fc[_0xdb95b4(0x106)]);_0x20adcd?.['type']==='merge'&&_0x10d816[_0xdb95b4(0x19a)](createIssue(_0xdb95b4(0x193),_0x18f4e0+'.next',_0xdb95b4(0x113),_0xdb95b4(0x135)+_0x1b44fc[_0xdb95b4(0x112)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x1b44fc[_0xdb95b4(0x106)]+_0xdb95b4(0x16d),_0x34afa0));}}return _0x10d816;}function validateAbTestStep(_0x2838ff,_0x136737,_0x2bc685,_0x133dc7){const _0x4cae74=a136_0x4746,_0x5480ae=[];if(!_0x2838ff['with']?.[_0x4cae74(0x138)]||_0x2838ff[_0x4cae74(0x164)][_0x4cae74(0x138)][_0x4cae74(0x13c)]===0x0)return _0x5480ae[_0x4cae74(0x19a)](createIssue(_0x4cae74(0xf8),_0x136737+'.with.variants','MISSING_CONDITIONS',_0x4cae74(0x1a6),_0x2bc685,_0x136737)),_0x5480ae;const _0xa75ffa=_0x2838ff[_0x4cae74(0x164)][_0x4cae74(0x138)][_0x4cae74(0x137)]((_0x50eabf,_0x2ee06a)=>_0x50eabf+(_0x2ee06a[_0x4cae74(0x194)]||0x0),0x0);Math[_0x4cae74(0x146)](_0xa75ffa-0x64)>0.01&&_0x5480ae[_0x4cae74(0x19a)](createIssue(_0x4cae74(0xf8),_0x136737+_0x4cae74(0x121),_0x4cae74(0x13a),_0x4cae74(0x118)+_0xa75ffa+'%)',_0x2bc685));for(let _0x145d4=0x0;_0x145d4<_0x2838ff[_0x4cae74(0x164)][_0x4cae74(0x138)]['length'];_0x145d4++){const _0x257b2b=_0x2838ff['with'][_0x4cae74(0x138)][_0x145d4],_0x17ce77=_0x136737+_0x4cae74(0xf9)+_0x145d4+']';_0x257b2b[_0x4cae74(0x106)]&&_0x2bc685[_0x4cae74(0x132)]&&!_0x2bc685[_0x4cae74(0x132)]['has'](_0x257b2b[_0x4cae74(0x106)])&&_0x5480ae[_0x4cae74(0x19a)](createIssue(_0x4cae74(0xf8),_0x17ce77+'.next','INVALID_NEXT_REFERENCE',_0x4cae74(0x136)+_0x257b2b[_0x4cae74(0x106)]+'\x27',_0x2bc685));if(_0x257b2b[_0x4cae74(0x106)]){const _0x34f5fd=_0x133dc7[_0x4cae74(0x140)](_0x257b2b[_0x4cae74(0x106)]);_0x34f5fd?.[_0x4cae74(0x1ac)]===_0x4cae74(0x19e)&&_0x5480ae[_0x4cae74(0x19a)](createIssue('warning',_0x17ce77+_0x4cae74(0x127),_0x4cae74(0x113),_0x4cae74(0x111)+_0x257b2b['name']+_0x4cae74(0x131)+_0x257b2b[_0x4cae74(0x106)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x2bc685));}}return _0x5480ae;}function validateJumpStep(_0x49d31a,_0x22acb3,_0x52fb19){const _0x5541d1=a136_0x4746,_0x9f2bf1=[];if(!_0x49d31a[_0x5541d1(0x164)]?.[_0x5541d1(0x10b)])return _0x9f2bf1[_0x5541d1(0x19a)](createIssue(_0x5541d1(0xf8),_0x22acb3+'.with.target',_0x5541d1(0x16c),'Jump\x20step\x20requires\x20a\x20target',_0x52fb19,_0x22acb3)),_0x9f2bf1;return(!_0x49d31a[_0x5541d1(0x164)][_0x5541d1(0x10b)][_0x5541d1(0x1a2)]||!_0x49d31a['with'][_0x5541d1(0x10b)]['stage'])&&_0x9f2bf1[_0x5541d1(0x19a)](createIssue(_0x5541d1(0xf8),_0x22acb3+_0x5541d1(0x158),'INVALID_JUMP_TARGET','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x52fb19)),_0x9f2bf1;}function a136_0x4746(_0x444066,_0x1466d7){_0x444066=_0x444066-0xf6;const _0x29fe6d=a136_0x29fe();let _0x474606=_0x29fe6d[_0x444066];return _0x474606;}function buildConvergenceMap(_0x7b604a){const _0x2b8fb4=a136_0x4746,_0x33a0ef=new Map();function _0x15694c(_0x414f75,_0x1be307){const _0x2b26b8=a136_0x4746,_0x4e9238=_0x33a0ef['get'](_0x414f75)||[];_0x4e9238[_0x2b26b8(0x19a)](_0x1be307),_0x33a0ef['set'](_0x414f75,_0x4e9238);}for(const _0x2e9cc1 of _0x7b604a){_0x2e9cc1[_0x2b8fb4(0x106)]&&_0x15694c(_0x2e9cc1[_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1[_0x2b8fb4(0x112)],'description':_0x2b8fb4(0x185)+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'});if(_0x2e9cc1['type']===_0x2b8fb4(0x14c)&&_0x2e9cc1['with']?.[_0x2b8fb4(0x1a0)])for(const _0x2db319 of _0x2e9cc1[_0x2b8fb4(0x164)]['branches']){_0x2db319[_0x2b8fb4(0x106)]&&_0x15694c(_0x2db319[_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1['name'],'description':_0x2b8fb4(0x179)+_0x2db319[_0x2b8fb4(0x112)]+'\x27\x20of\x20\x27'+_0x2e9cc1['name']+'\x27'});}if(_0x2e9cc1[_0x2b8fb4(0x1ac)]==='ab_test'&&_0x2e9cc1[_0x2b8fb4(0x164)]?.[_0x2b8fb4(0x138)])for(const _0x2bf525 of _0x2e9cc1[_0x2b8fb4(0x164)][_0x2b8fb4(0x138)]){_0x2bf525[_0x2b8fb4(0x106)]&&_0x15694c(_0x2bf525[_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1[_0x2b8fb4(0x112)],'description':_0x2b8fb4(0x162)+_0x2bf525[_0x2b8fb4(0x112)]+'\x27\x20of\x20\x27'+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'});}_0x2e9cc1['type']==='wait'&&_0x2e9cc1[_0x2b8fb4(0x164)]?.[_0x2b8fb4(0x128)]&&(_0x2e9cc1['with'][_0x2b8fb4(0x128)][_0x2b8fb4(0x106)]&&_0x15694c(_0x2e9cc1['with'][_0x2b8fb4(0x128)][_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1['name'],'description':_0x2b8fb4(0x175)+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'}),_0x2e9cc1[_0x2b8fb4(0x164)]['condition'][_0x2b8fb4(0x15e)]?.[_0x2b8fb4(0x106)]&&_0x15694c(_0x2e9cc1['with'][_0x2b8fb4(0x128)][_0x2b8fb4(0x15e)][_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1[_0x2b8fb4(0x112)],'description':_0x2b8fb4(0x188)+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'}));}return _0x33a0ef;}function validateFlowControl(_0x859d67,_0x389715,_0xbdb004){const _0xdfc5b6=a136_0x4746,_0x3af3ee=[],_0x421dad='stages['+_0x389715+']',_0x4247ca=_0x859d67[_0xdfc5b6(0x178)]||[];if(_0x4247ca[_0xdfc5b6(0x13c)]===0x0)return _0x3af3ee;const _0x110d1d=new Map();for(const _0x3bb5d5 of _0x4247ca){_0x3bb5d5[_0xdfc5b6(0x112)]&&_0x110d1d[_0xdfc5b6(0x15b)](_0x3bb5d5[_0xdfc5b6(0x112)],_0x3bb5d5);}const _0x231f7b=buildConvergenceMap(_0x4247ca),_0x13361b=_0x4247ca['some'](_0x36c9ab=>_0x36c9ab[_0xdfc5b6(0x1ac)]===_0xdfc5b6(0x11d));!_0x13361b&&_0x3af3ee[_0xdfc5b6(0x19a)](createIssue(_0xdfc5b6(0xf8),_0x421dad+_0xdfc5b6(0x182),_0xdfc5b6(0x12a),_0xdfc5b6(0x144)+_0x859d67[_0xdfc5b6(0x112)]+_0xdfc5b6(0x10c),_0xbdb004));for(const [_0x3da213,_0x19849a]of _0x231f7b){const _0x2fc060=_0x110d1d['get'](_0x3da213);if(!_0x2fc060)continue;if(_0x19849a['length']>0x1&&_0x2fc060[_0xdfc5b6(0x1ac)]!=='merge'){const _0xcc920d=_0x19849a[_0xdfc5b6(0x173)](_0x151413=>_0x151413[_0xdfc5b6(0x19b)])[_0xdfc5b6(0x13b)](',\x20');_0x3af3ee[_0xdfc5b6(0x19a)](createIssue('error',_0x421dad+'.steps',_0xdfc5b6(0x124),_0xdfc5b6(0x166)+_0x3da213+'\x27\x20(from:\x20'+_0xcc920d+_0xdfc5b6(0x13d),_0xbdb004));}_0x19849a[_0xdfc5b6(0x13c)]===0x1&&_0x2fc060[_0xdfc5b6(0x1ac)]===_0xdfc5b6(0x19e)&&_0x3af3ee['push'](createIssue(_0xdfc5b6(0x193),_0x421dad+'.steps',_0xdfc5b6(0x14a),'Merge\x20step\x20\x27'+_0x3da213+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x19849a[0x0][_0xdfc5b6(0x19b)]+_0xdfc5b6(0x165),_0xbdb004));}for(const _0xdd1dc4 of _0x4247ca){if(_0xdd1dc4[_0xdfc5b6(0x1ac)]===_0xdfc5b6(0x19e)&&_0xdd1dc4[_0xdfc5b6(0x106)]){const _0x276ffa=_0x110d1d[_0xdfc5b6(0x140)](_0xdd1dc4[_0xdfc5b6(0x106)]);_0x276ffa?.['type']===_0xdfc5b6(0x19e)&&_0x3af3ee['push'](createIssue(_0xdfc5b6(0xf8),_0x421dad+'.steps',_0xdfc5b6(0x10f),_0xdfc5b6(0x102)+_0xdd1dc4[_0xdfc5b6(0x112)]+_0xdfc5b6(0x147)+_0xdd1dc4['next']+_0xdfc5b6(0x116),_0xbdb004));}}return _0x3af3ee;}function validateCriteria(_0x3bf108,_0x36d2a0,_0x2f4191){const _0x2e9fa4=a136_0x4746,_0xde641a=[];return _0x3bf108[_0x2e9fa4(0x19c)]&&(_0x2f4191[_0x2e9fa4(0x1af)]?.['add'](_0x3bf108[_0x2e9fa4(0x19c)]),!_0x3bf108['segment'][_0x2e9fa4(0x191)](_0x2e9fa4(0x174))&&(_0x2f4191[_0x2e9fa4(0x115)]&&!_0x2f4191[_0x2e9fa4(0x115)]['has'](_0x3bf108[_0x2e9fa4(0x19c)])&&_0xde641a[_0x2e9fa4(0x19a)](createIssue('error',_0x36d2a0+'.segment',_0x2e9fa4(0x142),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x3bf108['segment']+'\x27',_0x2f4191)))),_0xde641a;}function validateEmbeddedSegment(_0x5182a1,_0x1f6165,_0x330fba){const _0x4be60f=a136_0x4746,_0x3e5c76=[];return _0x5182a1[_0x4be60f(0x160)]&&_0x3e5c76['push'](...validateRuleDef(_0x5182a1['rule'],_0x1f6165+_0x4be60f(0x123),_0x330fba)),_0x3e5c76;}function validateStage(_0x198e41,_0x7bcb58,_0x14103b,_0x137fc4){const _0x47c6f0=a136_0x4746,_0x30d01a=[],_0x21e3b=_0x47c6f0(0x114)+_0x7bcb58+']',_0x1a6dc7=new Map(),_0x75206c=new Map();if(_0x198e41['steps']){for(let _0x226aa0=0x0;_0x226aa0<_0x198e41[_0x47c6f0(0x178)][_0x47c6f0(0x13c)];_0x226aa0++){const _0x88a2b6=_0x198e41['steps'][_0x226aa0];_0x88a2b6[_0x47c6f0(0x112)]&&_0x1a6dc7[_0x47c6f0(0x15b)](_0x88a2b6[_0x47c6f0(0x112)],_0x88a2b6);}for(let _0x15997d=0x0;_0x15997d<_0x198e41[_0x47c6f0(0x178)][_0x47c6f0(0x13c)];_0x15997d++){const _0x59de6e=_0x198e41[_0x47c6f0(0x178)][_0x15997d],_0x228ee8=_0x21e3b+_0x47c6f0(0x183)+_0x15997d+']';if(_0x59de6e[_0x47c6f0(0x112)]){if(_0x75206c[_0x47c6f0(0x11c)](_0x59de6e[_0x47c6f0(0x112)])){const _0x31fc7d=_0x75206c['get'](_0x59de6e[_0x47c6f0(0x112)]);_0x30d01a[_0x47c6f0(0x19a)](createIssue('error',_0x228ee8+_0x47c6f0(0x1a1),'DUPLICATE_STEP_NAME',_0x47c6f0(0x15f)+_0x59de6e['name']+'\x27\x20(first\x20defined\x20at\x20steps['+_0x31fc7d+'])',_0x137fc4));}else _0x75206c['set'](_0x59de6e[_0x47c6f0(0x112)],_0x15997d);}_0x30d01a[_0x47c6f0(0x19a)](...validateStep(_0x59de6e,_0x228ee8,_0x137fc4,_0x1a6dc7));}}_0x198e41[_0x47c6f0(0x154)]&&_0x30d01a[_0x47c6f0(0x19a)](...validateCriteria(_0x198e41[_0x47c6f0(0x154)],_0x21e3b+_0x47c6f0(0x17c),_0x137fc4));if(_0x198e41[_0x47c6f0(0x19f)])for(let _0x114eeb=0x0;_0x114eeb<_0x198e41[_0x47c6f0(0x19f)]['length'];_0x114eeb++){_0x30d01a[_0x47c6f0(0x19a)](...validateCriteria(_0x198e41['exit_criteria'][_0x114eeb],_0x21e3b+_0x47c6f0(0x18d)+_0x114eeb+']',_0x137fc4));}return _0x198e41['milestone']&&_0x30d01a[_0x47c6f0(0x19a)](...validateCriteria(_0x198e41[_0x47c6f0(0x186)],_0x21e3b+_0x47c6f0(0x122),_0x137fc4)),_0x30d01a[_0x47c6f0(0x19a)](...validateStageStructure(_0x198e41,_0x7bcb58,_0x14103b,_0x137fc4)),_0x30d01a['push'](...validateFlowControl(_0x198e41,_0x7bcb58,_0x137fc4)),_0x30d01a;}function a136_0x29fe(){const _0x3eeeec=['MISSING_ACTIVATION_DEFINITION','1177668iNSyug','\x20versions)','.with.variants','.milestone','.rule','CONVERGENCE_WITHOUT_MERGE','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','ACTIVATION_SCHEMA_ERROR','.next','condition','Journey\x20has\x20no\x20goal\x20defined','MISSING_END_STEP','INVALID_NEXT_REFERENCE','.exit_criteria','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','\x20with\x20latest:\x20true','8549254BnRLzj','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','stepNames','includes','.stages','Decision\x20branch\x20\x27','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','reduce','variants','launched','INVALID_AB_TEST_PERCENTAGES','join','length',').\x20Use\x20a\x20merge\x20step.','MISSING_EXIT_CRITERIA','Activation\x20step\x20requires\x20an\x20activation\x20reference','get','End\x20step\x20\x27','MISSING_SEGMENT_REFERENCE','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','Stage\x20\x27','goal','abs','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','endsWith','10DIQxsn','SINGLE_INPUT_MERGE','stages','decision_point','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','.with.condition.timeout.next','entries','sort','indices','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','segments.','entry_criteria','activationKeys','JOURNEY_SCHEMA_ERROR','.with.condition','.with.target','journeys','.segment','set','DUPLICATE_LATEST','830800XriLME','timeout','Duplicate\x20step\x20name\x20\x27','rule','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','variant\x20\x27','.with.condition.timeout','with',').\x20Merge\x20is\x20unnecessary.','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','values','UNUSED_EMBEDDED_SEGMENT','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','match','32403129KejJgI','INVALID_JUMP_TARGET','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','1dsdXol','message','\x20steps\x20(may\x20be\x20too\x20simple)','\x27\x20has\x20no\x20exit_criteria\x20defined','map','ref:','condition\x20of\x20\x27','.type','jump','steps','branch\x20\x27','MISSING_ACTIVATION_REF','code','.entry_criteria','ab_test','END_STEP_HAS_NEXT_OR_WITH','goalIsInherited','splice','63YkOuMU','.steps','.steps[','1408508eYUvrx','step\x20\x27','milestone','53292xrSKro','timeout\x20of\x20\x27','excluded_','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','add','.with.activation','.exit_criteria[','journey\x20entry','safeParse','latest','startsWith','TOO_MANY_STAGES','warning','percentage','state','excluded','versions','FEW_STEPS','\x20stages\x20but\x20maximum\x20is\x20','push','description','segment','Journey\x20can\x20have\x20at\x20most\x20one\x20','merge','exit_criteria','branches','.name','journey','MISSING_CONDITIONS','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','filter','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','Journey\x20name\x20is\x20required','level','MISSING_STAGES','.with.branches','symbol','type','2954404ueMaLL','keys','referencedSegments','journeys[','MISSING_NAME','trim','\x27\x20has\x20no\x20steps','success','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','error','.with.variants[','source','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','document','issues','activations','Merge\x20step\x20\x27','activation','\x20(across\x20','505PDjipe','next','replace','MISSING_ENTRY_CRITERIA','skipSchema','size','target','\x27\x20has\x20no\x20end\x20step','segments','INSUFFICIENT_STEPS','MERGE_TO_MERGE_CHAIN','versions[','A/B\x20test\x20variant\x20\x27','name','BRANCH_DIRECTLY_TO_MERGE','stages[','embeddedSegments','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','Journey\x20has\x20','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','.with','path','has','end'];a136_0x29fe=function(){return _0x3eeeec;};return a136_0x29fe();}function validateStagesForVersion(_0x1a31d1,_0x295ab5,_0x258061,_0x568e36,_0x450a27,_0x35d037,_0x53f5e3){const _0x2ce0f7=a136_0x4746;if(_0x1a31d1['length']===0x0){_0x450a27['push']({'level':_0x2ce0f7(0xf8),'path':_0x568e36+_0x2ce0f7(0x14b),'code':_0x2ce0f7(0x1a9),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x258061[_0x2ce0f7(0xff)],_0x258061[_0x2ce0f7(0xfa)],[_0x2ce0f7(0x14b)])});return;}const _0x500cd6=new Set();for(const _0x181a8e of _0x1a31d1){if(_0x181a8e[_0x2ce0f7(0x178)])for(const _0x428843 of _0x181a8e[_0x2ce0f7(0x178)]){_0x428843[_0x2ce0f7(0x112)]&&_0x500cd6[_0x2ce0f7(0x18b)](_0x428843[_0x2ce0f7(0x112)]);}}const _0x3ba24e={..._0x258061,'stepNames':_0x500cd6},_0x1e93d9=validateVersionStructure(_0x1a31d1,_0x3ba24e);for(const _0x2db914 of _0x1e93d9){const _0x46ec54=_0x568e36?{..._0x2db914,'path':''+_0x568e36+_0x2db914[_0x2ce0f7(0x11b)]}:_0x2db914;if(_0x46ec54[_0x2ce0f7(0x1a8)]===_0x2ce0f7(0xf8))_0x450a27[_0x2ce0f7(0x19a)](_0x46ec54);else _0x35d037[_0x2ce0f7(0x19a)](_0x46ec54);}for(let _0x34b207=0x0;_0x34b207<_0x1a31d1[_0x2ce0f7(0x13c)];_0x34b207++){const _0x37e941=validateStage(_0x1a31d1[_0x34b207],_0x34b207,_0x1a31d1[_0x2ce0f7(0x13c)],_0x3ba24e);for(const _0x230053 of _0x37e941){const _0xc62fa3=_0x568e36?{..._0x230053,'path':''+_0x568e36+_0x230053[_0x2ce0f7(0x11b)]}:_0x230053;if(_0xc62fa3[_0x2ce0f7(0x1a8)]===_0x2ce0f7(0xf8))_0x450a27[_0x2ce0f7(0x19a)](_0xc62fa3);else _0x35d037[_0x2ce0f7(0x19a)](_0xc62fa3);}}if(_0x295ab5[_0x2ce0f7(0x145)]){const _0x13e6a7=_0x53f5e3?.[_0x2ce0f7(0x17f)]?_0x2ce0f7(0x145):_0x568e36+_0x2ce0f7(0x145),_0x17c0c7=validateCriteria(_0x295ab5[_0x2ce0f7(0x145)],_0x13e6a7,_0x3ba24e);for(const _0x3eadc0 of _0x17c0c7){if(_0x3eadc0[_0x2ce0f7(0x1a8)]==='error')_0x450a27[_0x2ce0f7(0x19a)](_0x3eadc0);else _0x35d037[_0x2ce0f7(0x19a)](_0x3eadc0);}}}function extractVersionIndex(_0x404b25){const _0x4bc46d=a136_0x4746,_0xce0859=_0x404b25[_0x4bc46d(0x16a)](/^journeys\[(\d+)\]\./);return _0xce0859?_0xce0859[0x1]:undefined;}function deduplicateAcrossVersions(_0x144340){const _0x3e0c05=a136_0x4746,_0xf94a4f=new Map();for(let _0x1b236b=0x0;_0x1b236b<_0x144340[_0x3e0c05(0x13c)];_0x1b236b++){const _0x1d0073=_0x144340[_0x1b236b][_0x3e0c05(0x17b)]+':'+_0x144340[_0x1b236b][_0x3e0c05(0x170)],_0x4e2b09=extractVersionIndex(_0x144340[_0x1b236b][_0x3e0c05(0x11b)]),_0x143fb9=_0xf94a4f['get'](_0x1d0073);if(_0x143fb9){_0x143fb9[_0x3e0c05(0x151)]['push'](_0x1b236b);if(_0x4e2b09)_0x143fb9[_0x3e0c05(0x197)][_0x3e0c05(0x18b)](_0x4e2b09);}else _0xf94a4f[_0x3e0c05(0x15b)](_0x1d0073,{'indices':[_0x1b236b],'versions':new Set(_0x4e2b09?[_0x4e2b09]:[])});}const _0x429aa2=new Set();for(const {indices:_0x32804d,versions:_0x4b3b71}of _0xf94a4f[_0x3e0c05(0x167)]()){if(_0x4b3b71[_0x3e0c05(0x10a)]<=0x1)continue;const _0x11fe67=_0x144340[_0x32804d[0x0]];_0x11fe67[_0x3e0c05(0x11b)]=_0x11fe67[_0x3e0c05(0x11b)][_0x3e0c05(0x107)](/^journeys\[\d+\]\./,''),_0x11fe67[_0x3e0c05(0x170)]=_0x11fe67[_0x3e0c05(0x170)]+_0x3e0c05(0x104)+_0x4b3b71[_0x3e0c05(0x10a)]+_0x3e0c05(0x120);for(let _0xf8196a=0x1;_0xf8196a<_0x32804d[_0x3e0c05(0x13c)];_0xf8196a++){_0x429aa2['add'](_0x32804d[_0xf8196a]);}}const _0x57bde5=[..._0x429aa2][_0x3e0c05(0x150)]((_0x3ad263,_0x3c5df2)=>_0x3c5df2-_0x3ad263);for(const _0x385365 of _0x57bde5){_0x144340[_0x3e0c05(0x180)](_0x385365,0x1);}}export function validateJourneyDef(_0x1aa381,_0x181c28={},_0x14e3d7={}){const _0x2b34f5=a136_0x4746;if(_0x14e3d7[_0x2b34f5(0x109)])return runJourneySemanticChecks(_0x1aa381,_0x181c28);const _0x790415=JourneyDefSchema[_0x2b34f5(0x18f)](_0x1aa381);if(_0x790415[_0x2b34f5(0xf6)])return runJourneySemanticChecks(_0x790415['data'],_0x181c28);return zodErrorsToJourneyValidationResult(_0x790415[_0x2b34f5(0xf8)],_0x181c28);}function zodErrorsToJourneyValidationResult(_0x5da33b,_0x5b7e29){const _0x906b2c=a136_0x4746,_0x45d61c=flattenZodIssues(_0x5da33b[_0x906b2c(0x100)]),_0x1cfb66=_0x45d61c[_0x906b2c(0x173)](_0x2840b5=>{const _0x17224e=_0x906b2c,_0x1d4106=formatZodPath(_0x2840b5[_0x17224e(0x11b)]),_0x1e9571=mapJourneyZodIssueToCode(_0x2840b5,_0x1d4106),_0x53da3c=getLocationFromPath(_0x5b7e29[_0x17224e(0xff)],_0x5b7e29[_0x17224e(0xfa)],_0x2840b5[_0x17224e(0x11b)][_0x17224e(0x173)](_0x4904d5=>typeof _0x4904d5===_0x17224e(0x1ab)?String(_0x4904d5):_0x4904d5));return{'level':_0x17224e(0xf8),'path':_0x1d4106,'code':_0x1e9571,'message':_0x2840b5[_0x17224e(0x170)],..._0x53da3c&&{'location':_0x53da3c}};});return{'valid':![],'errors':_0x1cfb66,'warnings':[]};}function mapJourneyZodIssueToCode(_0x4cd4b5,_0x2da88a){const _0x235c63=a136_0x4746;if(_0x2da88a===_0x235c63(0x112))return _0x235c63(0x1b1);if(_0x2da88a['endsWith'](_0x235c63(0x176))&&_0x2da88a[_0x235c63(0x133)](_0x235c63(0x178)))return _0x235c63(0x156);if(_0x2da88a===_0x235c63(0x14b)||_0x2da88a[_0x235c63(0x148)](_0x235c63(0x134)))return _0x235c63(0x1a9);if(_0x2da88a===''&&_0x4cd4b5[_0x235c63(0x170)]['includes']('journeys,\x20stages,\x20or\x20versions'))return'MISSING_STAGES';if(_0x2da88a[_0x235c63(0x133)](_0x235c63(0x103)))return _0x235c63(0x126);return _0x235c63(0x156);}function runJourneySemanticChecks(_0x2645ef,_0x4450a3){const _0x2c61c6=a136_0x4746,_0xccbd8e=[],_0x558b20=[];(!_0x2645ef[_0x2c61c6(0x112)]||_0x2645ef['name'][_0x2c61c6(0x1b2)]()==='')&&_0xccbd8e[_0x2c61c6(0x19a)]({'level':_0x2c61c6(0xf8),'path':_0x2c61c6(0x112),'code':_0x2c61c6(0x1b1),'message':_0x2c61c6(0x1a7),'location':getLocationFromPath(_0x4450a3[_0x2c61c6(0xff)],_0x4450a3[_0x2c61c6(0xfa)],[_0x2c61c6(0x112)])});const _0x4e3265=new Set();if(_0x2645ef[_0x2c61c6(0x10d)])for(const _0x272faa of Object[_0x2c61c6(0x1ae)](_0x2645ef[_0x2c61c6(0x10d)])){_0x4e3265['add'](_0x272faa);}const _0x4d3054=new Set();if(_0x2645ef[_0x2c61c6(0x101)])for(const _0x5048ea of Object['keys'](_0x2645ef['activations'])){_0x4d3054[_0x2c61c6(0x18b)](_0x5048ea);}const _0x2488be=new Set(),_0x51d10f={..._0x4450a3,'embeddedSegments':_0x4e3265,'referencedSegments':_0x2488be,'activationKeys':_0x4d3054[_0x2c61c6(0x10a)]>0x0?_0x4d3054:undefined};if(_0x2645ef[_0x2c61c6(0x10d)])for(const [_0x51120a,_0x234f5a]of Object[_0x2c61c6(0x14f)](_0x2645ef[_0x2c61c6(0x10d)])){const _0x13065c=validateEmbeddedSegment(_0x234f5a,_0x2c61c6(0x153)+_0x51120a,_0x51d10f);for(const _0x53fa8e of _0x13065c){if(_0x53fa8e[_0x2c61c6(0x1a8)]===_0x2c61c6(0xf8))_0xccbd8e[_0x2c61c6(0x19a)](_0x53fa8e);else _0x558b20[_0x2c61c6(0x19a)](_0x53fa8e);}}const _0x5b2518=!!_0x2645ef['goal'],_0x52ed9a=_0x2645ef['journeys']?.['every'](_0x4dd875=>!!_0x4dd875[_0x2c61c6(0x145)])??![];!_0x5b2518&&!_0x52ed9a&&_0x558b20[_0x2c61c6(0x19a)]({'level':'warning','path':_0x2c61c6(0x145),'code':'MISSING_GOAL','message':_0x2c61c6(0x129),'location':getLocationFromPath(_0x4450a3[_0x2c61c6(0xff)],_0x4450a3['source'],[_0x2c61c6(0x145)])});const _0x258503=_0x2645ef[_0x2c61c6(0x159)]??_0x2645ef['versions'];if(_0x258503&&_0x258503[_0x2c61c6(0x1a5)](_0x227571=>_0x227571[_0x2c61c6(0x190)]===!![])['length']>0x1){const _0x359254=_0x2645ef['journeys']?_0x2c61c6(0x159):_0x2c61c6(0x197);_0xccbd8e[_0x2c61c6(0x19a)]({'level':_0x2c61c6(0xf8),'path':_0x359254,'code':_0x2c61c6(0x15c),'message':_0x2c61c6(0x19d)+(_0x359254===_0x2c61c6(0x159)?_0x2c61c6(0x18e):'version')+_0x2c61c6(0x12f),'location':getLocationFromPath(_0x4450a3['document'],_0x4450a3[_0x2c61c6(0xfa)],[_0x359254])});}if(_0x2645ef['journeys']&&_0x2645ef['journeys'][_0x2c61c6(0x13c)]>0x0)for(let _0x21da7d=0x0;_0x21da7d<_0x2645ef[_0x2c61c6(0x159)][_0x2c61c6(0x13c)];_0x21da7d++){const _0xac125d=_0x2645ef['journeys'][_0x21da7d];if(_0x2645ef['journeys']['length']>0x1&&_0xac125d[_0x2c61c6(0x195)]===_0x2c61c6(0x139))continue;const _0x773ce3=_0xac125d['stages']||[],_0x14004f=_0x2c61c6(0x1b0)+_0x21da7d+'].',_0x5cc703=!!_0xac125d['goal'],_0x25cd9b=_0x5cc703?{..._0x2645ef,'goal':_0xac125d[_0x2c61c6(0x145)]}:_0x2645ef;validateStagesForVersion(_0x773ce3,_0x25cd9b,_0x51d10f,_0x14004f,_0xccbd8e,_0x558b20,{'goalIsInherited':!_0x5cc703});}else{if(_0x2645ef['versions']&&_0x2645ef[_0x2c61c6(0x197)]['length']>0x0)for(let _0x40a5a3=0x0;_0x40a5a3<_0x2645ef[_0x2c61c6(0x197)][_0x2c61c6(0x13c)];_0x40a5a3++){const _0x4b402a=_0x2645ef[_0x2c61c6(0x197)][_0x40a5a3];if(_0x2645ef[_0x2c61c6(0x197)][_0x2c61c6(0x13c)]>0x1&&_0x4b402a[_0x2c61c6(0x195)]===_0x2c61c6(0x139))continue;const _0x5d6728=_0x4b402a['stages']||[],_0x20e556=_0x2c61c6(0x110)+_0x40a5a3+'].';validateStagesForVersion(_0x5d6728,_0x2645ef,_0x51d10f,_0x20e556,_0xccbd8e,_0x558b20);}else{const _0x1ff1c3=_0x2645ef[_0x2c61c6(0x14b)]||[];validateStagesForVersion(_0x1ff1c3,_0x2645ef,_0x51d10f,'',_0xccbd8e,_0x558b20);}}_0x2645ef[_0x2c61c6(0x159)]&&_0x2645ef[_0x2c61c6(0x159)]['length']>0x1&&(deduplicateAcrossVersions(_0xccbd8e),deduplicateAcrossVersions(_0x558b20));for(const _0x1323cf of _0x4e3265){!_0x2488be[_0x2c61c6(0x11c)](_0x1323cf)&&!_0x1323cf[_0x2c61c6(0x191)](_0x2c61c6(0x189))&&_0x558b20['push']({'level':_0x2c61c6(0x193),'path':_0x2c61c6(0x153)+_0x1323cf,'code':_0x2c61c6(0x168),'message':'Embedded\x20segment\x20\x27'+_0x1323cf+_0x2c61c6(0xfd),'location':getLocationFromPath(_0x4450a3[_0x2c61c6(0xff)],_0x4450a3[_0x2c61c6(0xfa)],[_0x2c61c6(0x10d),_0x1323cf])});}return{'valid':_0xccbd8e[_0x2c61c6(0x13c)]===0x0,'errors':_0xccbd8e,'warnings':_0x558b20};}