@treasuredata/tdx 2026.3.25 → 2026.3.26

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 (206) 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.d.ts +5 -0
  156. package/dist/sdk/segment.d.ts.map +1 -1
  157. package/dist/sdk/segment.js +1 -1
  158. package/dist/sdk/segment.js.map +1 -1
  159. package/dist/sdk/types/index.js +1 -1
  160. package/dist/sdk/types/progress.js +1 -1
  161. package/dist/sdk/user.js +1 -1
  162. package/dist/sdk/util/format-detector.js +1 -1
  163. package/dist/sdk/util/formatters.js +1 -1
  164. package/dist/sdk/util/index.js +1 -1
  165. package/dist/sdk/util/paginate.js +1 -1
  166. package/dist/sdk/util/tree-formatter.js +1 -1
  167. package/dist/sdk/workflow/archive-validation.js +1 -1
  168. package/dist/sdk/workflow/clone-workflow.js +1 -1
  169. package/dist/sdk/workflow/index.js +1 -1
  170. package/dist/sdk/workflow/pull-workflow.js +1 -1
  171. package/dist/sdk/workflow/push-workflow.js +1 -1
  172. package/dist/sdk/workflow/tdx-config.js +1 -1
  173. package/dist/sdk/workflow/workflow-utils.js +1 -1
  174. package/dist/test-utils/command-runner.js +1 -1
  175. package/dist/test-utils/factories.js +1 -1
  176. package/dist/test-utils/fixtures.js +1 -1
  177. package/dist/test-utils/http-mock.js +1 -1
  178. package/dist/test-utils/index.js +1 -1
  179. package/dist/utils/async.js +1 -1
  180. package/dist/utils/colors.js +1 -1
  181. package/dist/utils/diff.js +1 -1
  182. package/dist/utils/file-permissions.js +1 -1
  183. package/dist/utils/file-reader.js +1 -1
  184. package/dist/utils/github-releases.js +1 -1
  185. package/dist/utils/global-cache.js +1 -1
  186. package/dist/utils/json-loader.js +1 -1
  187. package/dist/utils/local-cache.js +1 -1
  188. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  189. package/dist/utils/logger/formatters/index.js +1 -1
  190. package/dist/utils/logger/handlers/console-handler.js +1 -1
  191. package/dist/utils/logger/handlers/file-handler.js +1 -1
  192. package/dist/utils/logger/handlers/index.js +1 -1
  193. package/dist/utils/logger/handlers/null-handler.js +1 -1
  194. package/dist/utils/logger/index.js +1 -1
  195. package/dist/utils/logger/logger.js +1 -1
  196. package/dist/utils/logger/types.js +1 -1
  197. package/dist/utils/option-validation.js +1 -1
  198. package/dist/utils/process.js +1 -1
  199. package/dist/utils/prompt.js +1 -1
  200. package/dist/utils/spinner.js +1 -1
  201. package/dist/utils/sse-parser.js +1 -1
  202. package/dist/utils/string-utils.js +1 -1
  203. package/dist/utils/table-ref-parser.js +1 -1
  204. package/dist/utils/tdx-logger.js +1 -1
  205. package/dist/utils/version-check.js +1 -1
  206. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x4da9f6,_0x4bf69c){const _0x2e5c85=a133_0x4fb7,_0x221d4d=_0x4da9f6();while(!![]){try{const _0x4efad5=parseInt(_0x2e5c85(0xbb))/0x1*(parseInt(_0x2e5c85(0x9e))/0x2)+-parseInt(_0x2e5c85(0xc0))/0x3*(parseInt(_0x2e5c85(0x99))/0x4)+-parseInt(_0x2e5c85(0xae))/0x5*(parseInt(_0x2e5c85(0xb9))/0x6)+parseInt(_0x2e5c85(0x9f))/0x7+parseInt(_0x2e5c85(0xbe))/0x8+parseInt(_0x2e5c85(0xbc))/0x9+parseInt(_0x2e5c85(0x9d))/0xa;if(_0x4efad5===_0x4bf69c)break;else _0x221d4d['push'](_0x221d4d['shift']());}catch(_0x3ebf32){_0x221d4d['push'](_0x221d4d['shift']());}}}(a133_0x50c0,0x5332c));import a133_0x3c1ba0 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a133_0x4fb7(_0x3c3214,_0x793085){_0x3c3214=_0x3c3214-0x92;const _0x50c0ca=a133_0x50c0();let _0x4fb7d0=_0x50c0ca[_0x3c3214];return _0x4fb7d0;}export function buildSchemaResult(_0x50f921){const _0x4573ff=a133_0x4fb7,_0x13b171=_0x50f921[_0x4573ff(0xaf)][_0x4573ff(0x97)](_0x2bf7ad=>({'column_name':_0x2bf7ad[_0x4573ff(0x96)],'column_type':_0x2bf7ad[_0x4573ff(0x94)],'null':_0x4573ff(0xc6),'key':null,'default':null,'extra':null}));return{..._0x50f921,'columns':[{'name':_0x4573ff(0xc1),'type':'varchar'},{'name':'column_type','type':_0x4573ff(0x9c)},{'name':'null','type':_0x4573ff(0x9c)},{'name':_0x4573ff(0xad),'type':_0x4573ff(0x9c)},{'name':_0x4573ff(0x92),'type':'varchar'},{'name':'extra','type':_0x4573ff(0x9c)}],'data':_0x13b171};}export async function executeSchemaQuery(_0x36f1fb,_0x3cc713,_0x361265){const _0x19349e=a133_0x4fb7,_0x2118a3=_0x36f1fb[_0x19349e(0xb4)]()[_0x19349e(0x95)](/;+$/,''),_0x59dbe8='SELECT\x20*\x20FROM\x20(\x0a'+_0x2118a3+_0x19349e(0xb1);_0x361265[_0x19349e(0xb6)]&&console['error']('Schema\x20query:\x0a'+_0x59dbe8);const _0x3899af=await withProgressSpinner(_0x19349e(0xab),async _0x2a309b=>{const _0xa03c18=_0x19349e,_0x34debc=await _0x3cc713[_0xa03c18(0xb5)]['execute'](_0x59dbe8,{'catalog':'td','schema':_0xa03c18(0xaa),'onJobId':_0x3c726f=>{const _0x18d686=_0xa03c18;_0x2a309b[_0x18d686(0xa2)](_0x3c726f);}});return _0x34debc;},{'verbose':_0x361265[_0x19349e(0xb6)]});return buildSchemaResult(_0x3899af['data']);}function columnName(_0x505714){const _0xcedd51=a133_0x4fb7;return _0x505714[_0xcedd51(0x9a)]||_0x505714[_0xcedd51(0xa5)]||_0x505714['name'];}function formatFieldLine(_0x1b3ac9,_0x4af355,_0x18cd2e){const _0x3e5cb6=a133_0x4fb7,_0x4bd836=_0x1b3ac9!==_0x4af355?'\x20'+a133_0x3c1ba0[_0x3e5cb6(0xa9)]('('+_0x4af355+')'):'';return _0x3e5cb6(0x93)+_0x1b3ac9+_0x4bd836+':\x20'+a133_0x3c1ba0[_0x3e5cb6(0xba)](_0x18cd2e);}function a133_0x50c0(){const _0x329010=['localeCompare','setJobId','tableName','set','parentColumn','error','parentTableName','size','dim','information_schema','Fetching\x20schema...','attribute','key','15ZMScSd','columns','bold','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','fields','some','trim','query','verbose','entries','displayName','739362GfTLVD','cyan','23HgYbUP','2068065UpbbEW','push','166912VNJsrw','length','6BthNZo','column_name','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','source','filter','sort','YES','Behaviors','default','\x20\x20\x20\x20','type','replace','name','map','startsWith','1304936PBPbBe','matrixColumnName','Unknown','varchar','10281270FrIwjw','5740anpdEq','127001EvJaSN','matrixTableName'];a133_0x50c0=function(){return _0x329010;};return a133_0x50c0();}function sortByColumnName(_0xb67195){const _0x5d85bd=a133_0x4fb7;return[..._0xb67195][_0x5d85bd(0xc5)]((_0x29f587,_0x363e3c)=>columnName(_0x29f587)['localeCompare'](columnName(_0x363e3c)));}export function displayFieldsHumanReadable(_0x5f1e6f,_0x31da6e){const _0x26f1e3=a133_0x4fb7,_0x5c654e=_0x5f1e6f[_0x26f1e3(0xc4)](_0x4a234b=>_0x4a234b[_0x26f1e3(0xc3)]===_0x26f1e3(0xac)),_0x572ab1=_0x5f1e6f[_0x26f1e3(0xc4)](_0x416ff8=>_0x416ff8[_0x26f1e3(0xc3)]==='behavior'),_0x549372=new Map();for(const _0x972ddd of _0x5c654e){const _0x5b4a04=_0x972ddd['groupingName']||_0x972ddd[_0x26f1e3(0xa7)]||'Unknown',_0x1d9544=_0x549372['get'](_0x5b4a04);_0x1d9544?_0x1d9544['fields']['push'](_0x972ddd):_0x549372[_0x26f1e3(0xa4)](_0x5b4a04,{'displayName':_0x5b4a04,'tableName':_0x972ddd[_0x26f1e3(0xa7)],'fields':[_0x972ddd]});}const _0x11f420=new Map();for(const _0x18f54d of _0x572ab1){const _0x3c207c=_0x18f54d['behaviorName']||_0x26f1e3(0x9b),_0x2fc512=_0x11f420['get'](_0x3c207c)||[];_0x2fc512[_0x26f1e3(0xbd)](_0x18f54d),_0x11f420[_0x26f1e3(0xa4)](_0x3c207c,_0x2fc512);}console['error']('\x0a'+a133_0x3c1ba0[_0x26f1e3(0xb0)](_0x31da6e));if(_0x549372[_0x26f1e3(0xa8)]>0x0){console[_0x26f1e3(0xa6)]('\x0a'+a133_0x3c1ba0['dim']('Attributes'));const _0x92e9=[..._0x549372[_0x26f1e3(0xb7)]()][_0x26f1e3(0xc5)]((_0x355972,_0x5b5f08)=>_0x355972[0x0][_0x26f1e3(0xa1)](_0x5b5f08[0x0]));for(const [,_0x295aa1]of _0x92e9){const _0xf7327d=_0x295aa1['tableName']&&_0x295aa1[_0x26f1e3(0xa3)]!==_0x295aa1[_0x26f1e3(0xb8)]?'\x20'+a133_0x3c1ba0[_0x26f1e3(0xa9)]('('+_0x295aa1['tableName']+')'):'';console['error']('\x20\x20'+a133_0x3c1ba0['bold'](_0x295aa1[_0x26f1e3(0xb8)])+_0xf7327d);for(const _0x4cbefc of sortByColumnName(_0x295aa1[_0x26f1e3(0xb2)])){console[_0x26f1e3(0xa6)](formatFieldLine(columnName(_0x4cbefc),_0x4cbefc[_0x26f1e3(0x96)],_0x4cbefc[_0x26f1e3(0x94)]));}}}if(_0x11f420[_0x26f1e3(0xa8)]>0x0){console[_0x26f1e3(0xa6)]('\x0a'+a133_0x3c1ba0[_0x26f1e3(0xa9)](_0x26f1e3(0xc7)));const _0x561362=[..._0x11f420[_0x26f1e3(0xb7)]()][_0x26f1e3(0xc5)]((_0x5425aa,_0x462c45)=>_0x5425aa[0x0][_0x26f1e3(0xa1)](_0x462c45[0x0]));for(const [_0x19d595,_0x203412]of _0x561362){const _0x439c61=_0x203412[0x0],_0x440dc2=_0x439c61?.['matrixTableName'];if(_0x440dc2){const _0x4d297c=_0x440dc2!==_0x19d595?'\x20'+a133_0x3c1ba0['dim']('('+_0x19d595+')'):'';console[_0x26f1e3(0xa6)]('\x20\x20'+a133_0x3c1ba0[_0x26f1e3(0xb0)](_0x440dc2)+_0x4d297c);}else{const _0x2cb1f4=_0x439c61?.[_0x26f1e3(0xa7)]||'';console[_0x26f1e3(0xa6)]('\x20\x20'+a133_0x3c1ba0[_0x26f1e3(0xb0)](_0x19d595)+(_0x2cb1f4?'\x20'+a133_0x3c1ba0[_0x26f1e3(0xa9)]('('+_0x2cb1f4+')'):''));}for(const _0x25b3cd of sortByColumnName(_0x203412)){const _0x3e809f=_0x25b3cd['name'][_0x26f1e3(0x98)](_0x19d595+'.')?_0x25b3cd[_0x26f1e3(0x96)]['slice'](_0x19d595[_0x26f1e3(0xbf)]+0x1):_0x25b3cd[_0x26f1e3(0x96)];console[_0x26f1e3(0xa6)](formatFieldLine(columnName(_0x25b3cd),_0x3e809f,_0x25b3cd[_0x26f1e3(0x94)]));}}}const _0x2fad1d=_0x5f1e6f[_0x26f1e3(0xb3)](_0x5bfff6=>_0x5bfff6[_0x26f1e3(0x9a)]||_0x5bfff6[_0x26f1e3(0xa0)]);_0x2fad1d&&(console[_0x26f1e3(0xa6)]('\x0a'+a133_0x3c1ba0[_0x26f1e3(0xa9)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console[_0x26f1e3(0xa6)](a133_0x3c1ba0[_0x26f1e3(0xa9)](_0x26f1e3(0xc2)))),console[_0x26f1e3(0xa6)]('');}
1
+ (function(_0x1262d2,_0x2c8ef2){const _0x55b074=a133_0x2fad,_0x21c617=_0x1262d2();while(!![]){try{const _0x5750aa=parseInt(_0x55b074(0x1ad))/0x1*(-parseInt(_0x55b074(0x1c5))/0x2)+parseInt(_0x55b074(0x1a1))/0x3+-parseInt(_0x55b074(0x1ce))/0x4+parseInt(_0x55b074(0x1a3))/0x5*(parseInt(_0x55b074(0x1c6))/0x6)+-parseInt(_0x55b074(0x1bb))/0x7*(-parseInt(_0x55b074(0x1a4))/0x8)+parseInt(_0x55b074(0x197))/0x9+-parseInt(_0x55b074(0x1c0))/0xa;if(_0x5750aa===_0x2c8ef2)break;else _0x21c617['push'](_0x21c617['shift']());}catch(_0x3e9f6f){_0x21c617['push'](_0x21c617['shift']());}}}(a133_0x1335,0x82386));import a133_0x51633a from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a133_0x2fad(_0x45bbc4,_0x1bf09d){_0x45bbc4=_0x45bbc4-0x197;const _0x13359a=a133_0x1335();let _0x2fad97=_0x13359a[_0x45bbc4];return _0x2fad97;}function a133_0x1335(){const _0x2af966=['Behaviors','\x20\x20\x20\x20','2501274XDECvp','name','5041095OAyowz','856RRYGYs','extra','cyan','null','set','sort','filter','source','parentColumn','1kyoIZV','some','get','entries','column_type','dim','matrixColumnName','YES','groupingName','matrixTableName','localeCompare','slice','tableName','column_name','18158cTXNZw','Attributes','varchar','displayName','execute','11322170dlqbwB','query','startsWith','error','bold','798736eBafvv','6SNiVfY','attribute','type','trim','Fetching\x20schema...','verbose','size','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','2349204VUijeQ','push','Unknown','4794597mTzTwu','parentTableName','data','key','fields','length','replace','map'];a133_0x1335=function(){return _0x2af966;};return a133_0x1335();}export function buildSchemaResult(_0x2e7542){const _0x1fd647=a133_0x2fad,_0x5ea898=_0x2e7542['columns'][_0x1fd647(0x19e)](_0x28ef41=>({'column_name':_0x28ef41[_0x1fd647(0x1a2)],'column_type':_0x28ef41['type'],'null':_0x1fd647(0x1b4),'key':null,'default':null,'extra':null}));return{..._0x2e7542,'columns':[{'name':_0x1fd647(0x1ba),'type':'varchar'},{'name':_0x1fd647(0x1b1),'type':_0x1fd647(0x1bd)},{'name':_0x1fd647(0x1a7),'type':'varchar'},{'name':_0x1fd647(0x19a),'type':_0x1fd647(0x1bd)},{'name':'default','type':_0x1fd647(0x1bd)},{'name':_0x1fd647(0x1a5),'type':'varchar'}],'data':_0x5ea898};}export async function executeSchemaQuery(_0x12d665,_0x169959,_0x1417c5){const _0x69bc28=a133_0x2fad,_0x21af9c=_0x12d665[_0x69bc28(0x1c9)]()[_0x69bc28(0x19d)](/;+$/,''),_0x58cdb5='SELECT\x20*\x20FROM\x20(\x0a'+_0x21af9c+_0x69bc28(0x1cd);_0x1417c5[_0x69bc28(0x1cb)]&&console[_0x69bc28(0x1c3)]('Schema\x20query:\x0a'+_0x58cdb5);const _0x149b60=await withProgressSpinner(_0x69bc28(0x1ca),async _0x134607=>{const _0x36506b=_0x69bc28,_0x1c82a0=await _0x169959[_0x36506b(0x1c1)][_0x36506b(0x1bf)](_0x58cdb5,{'catalog':'td','schema':'information_schema','onJobId':_0xe23a18=>{_0x134607['setJobId'](_0xe23a18);}});return _0x1c82a0;},{'verbose':_0x1417c5[_0x69bc28(0x1cb)]});return buildSchemaResult(_0x149b60[_0x69bc28(0x199)]);}function columnName(_0xa60323){const _0x31309b=a133_0x2fad;return _0xa60323[_0x31309b(0x1b3)]||_0xa60323[_0x31309b(0x1ac)]||_0xa60323[_0x31309b(0x1a2)];}function formatFieldLine(_0x45c8f9,_0x22a0b8,_0x451175){const _0x1e8f33=a133_0x2fad,_0x4b9e3a=_0x45c8f9!==_0x22a0b8?'\x20'+a133_0x51633a[_0x1e8f33(0x1b2)]('('+_0x22a0b8+')'):'';return _0x1e8f33(0x1a0)+_0x45c8f9+_0x4b9e3a+':\x20'+a133_0x51633a[_0x1e8f33(0x1a6)](_0x451175);}function sortByColumnName(_0x39ba96){const _0x1024c5=a133_0x2fad;return[..._0x39ba96]['sort']((_0x4ddc81,_0x44dcdf)=>columnName(_0x4ddc81)[_0x1024c5(0x1b7)](columnName(_0x44dcdf)));}export function displayFieldsHumanReadable(_0x4c48c0,_0x23e578){const _0x1601d5=a133_0x2fad,_0x5f08ba=_0x4c48c0[_0x1601d5(0x1aa)](_0x5dc907=>_0x5dc907[_0x1601d5(0x1ab)]===_0x1601d5(0x1c7)),_0x358145=_0x4c48c0[_0x1601d5(0x1aa)](_0x4e12df=>_0x4e12df[_0x1601d5(0x1ab)]==='behavior'),_0x500f2f=new Map();for(const _0x29fa9c of _0x5f08ba){const _0x460a7c=_0x29fa9c[_0x1601d5(0x1b5)]||_0x29fa9c[_0x1601d5(0x198)]||_0x1601d5(0x1d0),_0x53dda4=_0x500f2f[_0x1601d5(0x1af)](_0x460a7c);_0x53dda4?_0x53dda4['fields'][_0x1601d5(0x1cf)](_0x29fa9c):_0x500f2f[_0x1601d5(0x1a8)](_0x460a7c,{'displayName':_0x460a7c,'tableName':_0x29fa9c[_0x1601d5(0x198)],'fields':[_0x29fa9c]});}const _0x1275fb=new Map();for(const _0x494e34 of _0x358145){const _0x1a3f29=_0x494e34['behaviorName']||_0x1601d5(0x1d0),_0x579f8c=_0x1275fb[_0x1601d5(0x1af)](_0x1a3f29)||[];_0x579f8c[_0x1601d5(0x1cf)](_0x494e34),_0x1275fb[_0x1601d5(0x1a8)](_0x1a3f29,_0x579f8c);}console[_0x1601d5(0x1c3)]('\x0a'+a133_0x51633a[_0x1601d5(0x1c4)](_0x23e578));if(_0x500f2f[_0x1601d5(0x1cc)]>0x0){console[_0x1601d5(0x1c3)]('\x0a'+a133_0x51633a[_0x1601d5(0x1b2)](_0x1601d5(0x1bc)));const _0x6c8b13=[..._0x500f2f['entries']()][_0x1601d5(0x1a9)]((_0x57a19e,_0x1d68ed)=>_0x57a19e[0x0][_0x1601d5(0x1b7)](_0x1d68ed[0x0]));for(const [,_0x513fe0]of _0x6c8b13){const _0x798d20=_0x513fe0[_0x1601d5(0x1b9)]&&_0x513fe0[_0x1601d5(0x1b9)]!==_0x513fe0[_0x1601d5(0x1be)]?'\x20'+a133_0x51633a[_0x1601d5(0x1b2)]('('+_0x513fe0['tableName']+')'):'';console[_0x1601d5(0x1c3)]('\x20\x20'+a133_0x51633a[_0x1601d5(0x1c4)](_0x513fe0[_0x1601d5(0x1be)])+_0x798d20);for(const _0x55af6c of sortByColumnName(_0x513fe0[_0x1601d5(0x19b)])){console['error'](formatFieldLine(columnName(_0x55af6c),_0x55af6c[_0x1601d5(0x1a2)],_0x55af6c['type']));}}}if(_0x1275fb[_0x1601d5(0x1cc)]>0x0){console['error']('\x0a'+a133_0x51633a[_0x1601d5(0x1b2)](_0x1601d5(0x19f)));const _0x29d1c4=[..._0x1275fb[_0x1601d5(0x1b0)]()][_0x1601d5(0x1a9)]((_0x268e50,_0x479527)=>_0x268e50[0x0][_0x1601d5(0x1b7)](_0x479527[0x0]));for(const [_0x5d388f,_0x3d6dea]of _0x29d1c4){const _0x207bb6=_0x3d6dea[0x0],_0x22a535=_0x207bb6?.[_0x1601d5(0x1b6)];if(_0x22a535){const _0x52c748=_0x22a535!==_0x5d388f?'\x20'+a133_0x51633a[_0x1601d5(0x1b2)]('('+_0x5d388f+')'):'';console[_0x1601d5(0x1c3)]('\x20\x20'+a133_0x51633a[_0x1601d5(0x1c4)](_0x22a535)+_0x52c748);}else{const _0x14c3a1=_0x207bb6?.[_0x1601d5(0x198)]||'';console[_0x1601d5(0x1c3)]('\x20\x20'+a133_0x51633a['bold'](_0x5d388f)+(_0x14c3a1?'\x20'+a133_0x51633a['dim']('('+_0x14c3a1+')'):''));}for(const _0x126731 of sortByColumnName(_0x3d6dea)){const _0x2a0da4=_0x126731[_0x1601d5(0x1a2)][_0x1601d5(0x1c2)](_0x5d388f+'.')?_0x126731[_0x1601d5(0x1a2)][_0x1601d5(0x1b8)](_0x5d388f[_0x1601d5(0x19c)]+0x1):_0x126731[_0x1601d5(0x1a2)];console[_0x1601d5(0x1c3)](formatFieldLine(columnName(_0x126731),_0x2a0da4,_0x126731[_0x1601d5(0x1c8)]));}}}const _0x5213d0=_0x4c48c0[_0x1601d5(0x1ae)](_0x58b5b0=>_0x58b5b0[_0x1601d5(0x1b3)]||_0x58b5b0[_0x1601d5(0x1b6)]);_0x5213d0&&(console[_0x1601d5(0x1c3)]('\x0a'+a133_0x51633a[_0x1601d5(0x1b2)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console['error'](a133_0x51633a[_0x1601d5(0x1b2)]('\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.'))),console[_0x1601d5(0x1c3)]('');}
@@ -1 +1 @@
1
- function a134_0x2bdb(){const _0xf4fb85=['push','1020184AyEgGO','56140RNfRhV','1534824iaLMAJ','.yaml','306WbQSFm','endsWith','365624BkNXrk','16pNJYsO','name','extname','1285653UYnUrD','.yml','toLowerCase','dirname','550CiMXhe','26210BbuNxQ','1225371kELece','map','isDirectory','4YUKyrg'];a134_0x2bdb=function(){return _0xf4fb85;};return a134_0x2bdb();}(function(_0x54a124,_0x2636b7){const _0x211c1c=a134_0x1755,_0x1ec76f=_0x54a124();while(!![]){try{const _0x22e9b4=parseInt(_0x211c1c(0x7e))/0x1+-parseInt(_0x211c1c(0x8d))/0x2+-parseInt(_0x211c1c(0x82))/0x3*(-parseInt(_0x211c1c(0x8b))/0x4)+parseInt(_0x211c1c(0x79))/0x5*(-parseInt(_0x211c1c(0x7c))/0x6)+parseInt(_0x211c1c(0x88))/0x7+parseInt(_0x211c1c(0x7f))/0x8*(parseInt(_0x211c1c(0x7a))/0x9)+-parseInt(_0x211c1c(0x87))/0xa*(-parseInt(_0x211c1c(0x86))/0xb);if(_0x22e9b4===_0x2636b7)break;else _0x1ec76f['push'](_0x1ec76f['shift']());}catch(_0x39073d){_0x1ec76f['push'](_0x1ec76f['shift']());}}}(a134_0x2bdb,0x578e6));import{readdirSync,statSync}from'fs';import a134_0x2fb13d from'path';export function findYamlFiles(_0x5c39f6){const _0x29039d=[];function _0x4969fc(_0xf279ab){const _0x78ba61=a134_0x1755,_0x382ddb=readdirSync(_0xf279ab,{'withFileTypes':!![]});for(const _0x2858aa of _0x382ddb){const _0x36a669=a134_0x2fb13d['join'](_0xf279ab,_0x2858aa['name']);if(_0x2858aa[_0x78ba61(0x8a)]())_0x4969fc(_0x36a669);else(_0x2858aa['name'][_0x78ba61(0x7d)](_0x78ba61(0x83))||_0x2858aa[_0x78ba61(0x80)][_0x78ba61(0x7d)](_0x78ba61(0x7b)))&&_0x29039d[_0x78ba61(0x8c)](_0x36a669);}}return _0x4969fc(_0x5c39f6),_0x29039d;}function a134_0x1755(_0x59b6cd,_0x5f5751){_0x59b6cd=_0x59b6cd-0x79;const _0x2bdb40=a134_0x2bdb();let _0x175509=_0x2bdb40[_0x59b6cd];return _0x175509;}export function discoverYamlFiles(_0x208ee8){const _0x9c878=a134_0x1755,_0x1c78cf=findYamlFiles(_0x208ee8);return _0x1c78cf[_0x9c878(0x89)](_0x517362=>{const _0x327cd7=_0x9c878,_0x5c89bd=a134_0x2fb13d['relative'](_0x208ee8,_0x517362),_0x3324d7=a134_0x2fb13d[_0x327cd7(0x85)](_0x5c89bd);return{'absolutePath':_0x517362,'relativePath':_0x5c89bd,'folderPath':_0x3324d7==='.'?'':_0x3324d7};});}export function isYamlFile(_0x331b8c){const _0x279a35=a134_0x1755;try{const _0x32157f=statSync(_0x331b8c);if(!_0x32157f['isFile']())return![];const _0x124f70=a134_0x2fb13d[_0x279a35(0x81)](_0x331b8c)[_0x279a35(0x84)]();return _0x124f70==='.yml'||_0x124f70===_0x279a35(0x7b);}catch{return![];}}
1
+ (function(_0x4e8406,_0x273206){const _0x37a257=a134_0xcaa7,_0x496660=_0x4e8406();while(!![]){try{const _0x4a7f99=-parseInt(_0x37a257(0x1d8))/0x1*(parseInt(_0x37a257(0x1de))/0x2)+-parseInt(_0x37a257(0x1d6))/0x3+parseInt(_0x37a257(0x1dd))/0x4*(parseInt(_0x37a257(0x1e5))/0x5)+parseInt(_0x37a257(0x1d4))/0x6+-parseInt(_0x37a257(0x1e9))/0x7*(-parseInt(_0x37a257(0x1d7))/0x8)+-parseInt(_0x37a257(0x1d9))/0x9*(parseInt(_0x37a257(0x1dc))/0xa)+-parseInt(_0x37a257(0x1e1))/0xb*(-parseInt(_0x37a257(0x1db))/0xc);if(_0x4a7f99===_0x273206)break;else _0x496660['push'](_0x496660['shift']());}catch(_0x181240){_0x496660['push'](_0x496660['shift']());}}}(a134_0x31f8,0x846d7));import{readdirSync,statSync}from'fs';function a134_0xcaa7(_0x4df764,_0x1ea059){_0x4df764=_0x4df764-0x1d4;const _0x31f805=a134_0x31f8();let _0xcaa72b=_0x31f805[_0x4df764];return _0xcaa72b;}import a134_0x13460e from'path';export function findYamlFiles(_0x42a718){const _0x1f6cc0=[];function _0x4da879(_0x128b6b){const _0xd404e=a134_0xcaa7,_0x39b2ee=readdirSync(_0x128b6b,{'withFileTypes':!![]});for(const _0x28bf26 of _0x39b2ee){const _0x56575f=a134_0x13460e['join'](_0x128b6b,_0x28bf26['name']);if(_0x28bf26[_0xd404e(0x1e3)]())_0x4da879(_0x56575f);else(_0x28bf26[_0xd404e(0x1d5)][_0xd404e(0x1e7)](_0xd404e(0x1da))||_0x28bf26[_0xd404e(0x1d5)][_0xd404e(0x1e7)](_0xd404e(0x1e4)))&&_0x1f6cc0[_0xd404e(0x1ea)](_0x56575f);}}return _0x4da879(_0x42a718),_0x1f6cc0;}function a134_0x31f8(){const _0x205389=['push','1614192IjBukq','name','3170187ilzYxf','6417416Nmrljg','19VLDtxS','253629YsPMKh','.yml','60bnHaUW','230RigMHM','660dKlhEz','108452ZyMBip','isFile','dirname','4522661OcPSbS','relative','isDirectory','.yaml','4565FvFdQY','toLowerCase','endsWith','map','7RTJjbO'];a134_0x31f8=function(){return _0x205389;};return a134_0x31f8();}export function discoverYamlFiles(_0x1c7d2f){const _0x20ba98=a134_0xcaa7,_0x581815=findYamlFiles(_0x1c7d2f);return _0x581815[_0x20ba98(0x1e8)](_0x178633=>{const _0x41826e=_0x20ba98,_0x3138c5=a134_0x13460e[_0x41826e(0x1e2)](_0x1c7d2f,_0x178633),_0xc2464=a134_0x13460e[_0x41826e(0x1e0)](_0x3138c5);return{'absolutePath':_0x178633,'relativePath':_0x3138c5,'folderPath':_0xc2464==='.'?'':_0xc2464};});}export function isYamlFile(_0x27b1a4){const _0x526365=a134_0xcaa7;try{const _0x44401f=statSync(_0x27b1a4);if(!_0x44401f[_0x526365(0x1df)]())return![];const _0x456f0f=a134_0x13460e['extname'](_0x27b1a4)[_0x526365(0x1e6)]();return _0x456f0f===_0x526365(0x1da)||_0x456f0f===_0x526365(0x1e4);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x7187d0,_0x2b84cc){const _0x3f43a2=a135_0x5714,_0x1261db=_0x7187d0();while(!![]){try{const _0x3e17e0=parseInt(_0x3f43a2(0x10e))/0x1+-parseInt(_0x3f43a2(0x11e))/0x2+parseInt(_0x3f43a2(0xf1))/0x3*(parseInt(_0x3f43a2(0x107))/0x4)+parseInt(_0x3f43a2(0x112))/0x5+-parseInt(_0x3f43a2(0x121))/0x6+parseInt(_0x3f43a2(0xeb))/0x7*(parseInt(_0x3f43a2(0xe3))/0x8)+-parseInt(_0x3f43a2(0x106))/0x9*(-parseInt(_0x3f43a2(0xec))/0xa);if(_0x3e17e0===_0x2b84cc)break;else _0x1261db['push'](_0x1261db['shift']());}catch(_0x1f33fd){_0x1261db['push'](_0x1261db['shift']());}}}(a135_0xb82c,0x61c55));function a135_0xb82c(){const _0x12c2f8=['string','type','milestone','.yaml','replace','14661PuGhEA','36HqxPio','steps','notification','segment','activation_template_id','exclude','behavior','317957UvkGZC','keys','toLowerCase','versions','1763180EGPEke','goal','version_number','isArray','entry_criteria','slice','object','some','nameMapping','journeyBundleName','item','version','486648NbkCSw','stringify','from','3218904ArNWXe','rule','schedule','entries','activation','join','startsWith','yaml','.yml','description','bundle_name','map','endsWith','set','with','journey','null','push','condition','get','has','204328cplClo','length','include','merged','decision_point','branches','conditions','sort','28yRPgUK','2190XbtRLS','stages','exit_criteria','trim','all_columns','16923ADESJs','connection','segments','name','attributes','launched','bundle_id','match','journeyStages','state','activations','index','connector_config','wait','journeys','columns'];a135_0xb82c=function(){return _0x12c2f8;};return a135_0xb82c();}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x3b6131){const _0x4a8cac=a135_0x5714;return _0x3b6131['toLowerCase']()['replace'](/\s+/g,'_')[_0x4a8cac(0x105)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x4a8cac(0x105)](/_+/g,'_')[_0x4a8cac(0x105)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x52d0ab){const _0x5af210=a135_0x5714,_0x21bab6=_0x52d0ab[_0x5af210(0xf8)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x21bab6){const _0xdc34d9=_0x21bab6[0x1]['toLowerCase'](),_0x3890aa=_0x21bab6[0x2],_0x53b11d=_0x3890aa['replace'](/-/g,'')['slice'](0x0,0x4)[_0x5af210(0x110)]();return _0xdc34d9+'_'+_0x53b11d;}const _0xdbd496=_0x52d0ab['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0xdbd496){const _0x52381c=_0xdbd496[0x1],_0x2bbbe2=_0xdbd496[0x2]['toLowerCase'](),_0xf7346=_0x52381c[_0x5af210(0x105)](/-/g,'')['slice'](0x0,0x4)[_0x5af210(0x110)]();return _0x2bbbe2+'_'+_0xf7346;}return undefined;}function stableStringify(_0x48207c){const _0x5e2c8b=a135_0x5714;if(Array[_0x5e2c8b(0x115)](_0x48207c))return'['+_0x48207c['map'](_0x52e6dc=>stableStringify(_0x52e6dc))[_0x5e2c8b(0x126)](',')+']';if(_0x48207c&&typeof _0x48207c===_0x5e2c8b(0x118)){const _0x26028d=_0x48207c,_0x3ee475=Object[_0x5e2c8b(0x10f)](_0x26028d)[_0x5e2c8b(0xea)](),_0x152fc1=_0x3ee475[_0x5e2c8b(0x12c)](_0x2e28d9=>'\x22'+_0x2e28d9+'\x22:'+stableStringify(_0x26028d[_0x2e28d9]));return'{'+_0x152fc1[_0x5e2c8b(0x126)](',')+'}';}const _0xf47bce=JSON[_0x5e2c8b(0x11f)](_0x48207c);return _0xf47bce===undefined?_0x5e2c8b(0xde):_0xf47bce;}export function consolidateActivationsByContent(_0x47e6ca){const _0x2d862b=a135_0x5714,_0x26293d={},_0x3e768c=new Map(),_0x36d4e6=new Map();for(const _0x836c10 of _0x47e6ca){if(!_0x836c10)continue;for(const [_0x379903,_0x5e5f41]of Object['entries'](_0x836c10)){const _0x366a3a={'name':_0x5e5f41['name'],'connection':_0x5e5f41[_0x2d862b(0xf2)],..._0x5e5f41[_0x2d862b(0xf0)]!==undefined&&{'all_columns':_0x5e5f41[_0x2d862b(0xf0)]},..._0x5e5f41[_0x2d862b(0x100)]!==undefined&&{'columns':_0x5e5f41[_0x2d862b(0x100)]},..._0x5e5f41['behavior']!==undefined&&{'behavior':_0x5e5f41[_0x2d862b(0x10d)]},..._0x5e5f41[_0x2d862b(0x123)]!==undefined&&{'schedule':_0x5e5f41['schedule']},..._0x5e5f41['notification']!==undefined&&{'notification':_0x5e5f41[_0x2d862b(0x109)]},..._0x5e5f41[_0x2d862b(0xfd)]!==undefined&&{'connector_config':_0x5e5f41[_0x2d862b(0xfd)]},..._0x5e5f41[_0x2d862b(0x10b)]!==undefined&&{'activation_template_id':_0x5e5f41['activation_template_id']}},_0x23937b=stableStringify(_0x366a3a),_0x5b2d27=_0x36d4e6[_0x2d862b(0xe1)](_0x23937b);_0x5b2d27?_0x3e768c[_0x2d862b(0x12e)](_0x379903,_0x5b2d27):(_0x26293d[_0x379903]=_0x5e5f41,_0x3e768c['set'](_0x379903,_0x379903),_0x36d4e6['set'](_0x23937b,_0x379903));}}return{'merged':_0x26293d,'nameMapping':_0x3e768c};}export function updateActivationReferences(_0xa6ed31,_0x3761ba){const _0xea8053=a135_0x5714;if(!_0xa6ed31)return;for(const _0x44a8e5 of _0xa6ed31){if(!_0x44a8e5[_0xea8053(0x108)])continue;for(const _0x221411 of _0x44a8e5['steps']){if(_0x221411[_0xea8053(0x102)]===_0xea8053(0x125)&&_0x221411[_0xea8053(0xdc)]?.[_0xea8053(0x125)]){const _0x2338dc=_0x3761ba['get'](_0x221411[_0xea8053(0xdc)][_0xea8053(0x125)]);_0x2338dc&&_0x2338dc!==_0x221411[_0xea8053(0xdc)][_0xea8053(0x125)]&&(_0x221411[_0xea8053(0xdc)][_0xea8053(0x125)]=_0x2338dc);}}}}export function consolidateSegmentsByContent(_0x5a1f6e,_0x21eaed){const _0x48cb7f=a135_0x5714,_0x1c598f={},_0xf112e5=new Map(),_0x4bde9c=new Map();for(const _0x2ee0a0 of _0x5a1f6e){if(!_0x2ee0a0)continue;for(const [_0x35a3af,_0x2f028a]of Object[_0x48cb7f(0x124)](_0x2ee0a0)){if(!_0x2f028a[_0x48cb7f(0x122)]){_0x1c598f[_0x35a3af]=_0x2f028a,_0xf112e5[_0x48cb7f(0x12e)](_0x35a3af,_0x35a3af);continue;}const _0x215d3e=_0x2f028a[_0x48cb7f(0x12a)]&&_0x2f028a[_0x48cb7f(0x12a)][_0x48cb7f(0xef)]()?_0x2f028a[_0x48cb7f(0x12a)]:undefined,_0x2cdc16=JSON[_0x48cb7f(0x11f)]({'description':_0x215d3e,'rule':deepSortObject(_0x2f028a[_0x48cb7f(0x122)])}),_0x34f4dd=_0x4bde9c[_0x48cb7f(0xe1)](_0x2cdc16);if(_0x34f4dd){const _0x254ca4={..._0x2f028a['description']!==undefined&&{'description':_0x2f028a[_0x48cb7f(0x12a)]},'rule':_0x2f028a[_0x48cb7f(0x122)]?deepSortObject(_0x2f028a[_0x48cb7f(0x122)]):_0x2f028a[_0x48cb7f(0x122)]};if(_0x35a3af<_0x34f4dd){_0x1c598f[_0x35a3af]=_0x254ca4,delete _0x1c598f[_0x34f4dd];for(const [_0x5348a6,_0x5c05b0]of _0xf112e5['entries']()){_0x5c05b0===_0x34f4dd&&_0xf112e5[_0x48cb7f(0x12e)](_0x5348a6,_0x35a3af);}_0xf112e5['set'](_0x35a3af,_0x35a3af),_0x4bde9c[_0x48cb7f(0x12e)](_0x2cdc16,_0x35a3af);}else _0x1c598f[_0x34f4dd]=_0x254ca4,_0xf112e5[_0x48cb7f(0x12e)](_0x35a3af,_0x34f4dd);}else{let _0x2aa0e0=_0x35a3af;if(_0x21eaed){const _0x34d9b8=_0x21eaed[_0x48cb7f(0xe1)](_0x2cdc16);_0x34d9b8&&_0x34d9b8[_0x48cb7f(0xe4)]>0x0&&(_0x2aa0e0=_0x34d9b8[_0x48cb7f(0x117)]()[_0x48cb7f(0xea)]()[0x0]);}const _0x308904={..._0x2f028a[_0x48cb7f(0x12a)]!==undefined&&{'description':_0x2f028a[_0x48cb7f(0x12a)]},'rule':_0x2f028a['rule']?deepSortObject(_0x2f028a[_0x48cb7f(0x122)]):_0x2f028a[_0x48cb7f(0x122)]};_0x1c598f[_0x2aa0e0]=_0x308904,_0xf112e5[_0x48cb7f(0x12e)](_0x35a3af,_0x2aa0e0),_0x4bde9c['set'](_0x2cdc16,_0x2aa0e0);}}}return{'merged':_0x1c598f,'nameMapping':_0xf112e5};}export function updateSegmentReferences(_0x235e57,_0x39b3c2){const _0x9c91d0=a135_0x5714;if(!_0x235e57)return;for(const _0x22e472 of _0x235e57){if(_0x22e472[_0x9c91d0(0x116)]?.[_0x9c91d0(0x10a)]){const _0x1577ea=_0x39b3c2['get'](_0x22e472[_0x9c91d0(0x116)][_0x9c91d0(0x10a)]);_0x1577ea&&(_0x22e472[_0x9c91d0(0x116)][_0x9c91d0(0x10a)]=_0x1577ea);}if(_0x22e472['exit_criteria'])for(const _0xd17b34 of _0x22e472[_0x9c91d0(0xee)]){if(_0xd17b34['segment']){const _0x325731=_0x39b3c2[_0x9c91d0(0xe1)](_0xd17b34['segment']);_0x325731&&(_0xd17b34[_0x9c91d0(0x10a)]=_0x325731);}}if(_0x22e472[_0x9c91d0(0x103)]?.[_0x9c91d0(0x10a)]){const _0x7ebfaf=_0x39b3c2['get'](_0x22e472[_0x9c91d0(0x103)][_0x9c91d0(0x10a)]);_0x7ebfaf&&(_0x22e472[_0x9c91d0(0x103)]['segment']=_0x7ebfaf);}if(_0x22e472[_0x9c91d0(0x108)])for(const _0x3e6395 of _0x22e472[_0x9c91d0(0x108)]){if(_0x3e6395['type']===_0x9c91d0(0xe7)&&_0x3e6395[_0x9c91d0(0xdc)]?.[_0x9c91d0(0xe8)])for(const _0x138a15 of _0x3e6395[_0x9c91d0(0xdc)]['branches']){if(_0x138a15[_0x9c91d0(0x10a)]){const _0x29a51c=_0x39b3c2[_0x9c91d0(0xe1)](_0x138a15['segment']);_0x29a51c&&(_0x138a15[_0x9c91d0(0x10a)]=_0x29a51c);}}if(_0x3e6395[_0x9c91d0(0x102)]==='wait'&&_0x3e6395[_0x9c91d0(0xdc)]?.[_0x9c91d0(0xe0)]?.['segment']){const _0x287b40=_0x39b3c2[_0x9c91d0(0xe1)](_0x3e6395[_0x9c91d0(0xdc)][_0x9c91d0(0xe0)]['segment']);_0x287b40&&(_0x3e6395[_0x9c91d0(0xdc)][_0x9c91d0(0xe0)][_0x9c91d0(0x10a)]=_0x287b40);}}}}function a135_0x5714(_0xe5a5ed,_0x517a2d){_0xe5a5ed=_0xe5a5ed-0xdc;const _0xb82ce2=a135_0xb82c();let _0x5714e8=_0xb82ce2[_0xe5a5ed];return _0x5714e8;}export function updateSegmentRefsInSegments(_0x32eca1,_0x4b3baf){const _0x4d048d=a135_0x5714;for(const _0x480b12 of Object['values'](_0x32eca1)){_0x480b12['rule']&&updateSegmentRefsInRule(_0x480b12[_0x4d048d(0x122)],_0x4b3baf);}}function updateSegmentRefsInRule(_0xc21a6d,_0x54c99a){const _0x58e3d7=a135_0x5714;if(_0xc21a6d===null||typeof _0xc21a6d!=='object')return;if(Array[_0x58e3d7(0x115)](_0xc21a6d)){for(const _0x5a8492 of _0xc21a6d){updateSegmentRefsInRule(_0x5a8492,_0x54c99a);}return;}const _0x581d4e=_0xc21a6d;if((_0x581d4e[_0x58e3d7(0x102)]===_0x58e3d7(0xe5)||_0x581d4e[_0x58e3d7(0x102)]===_0x58e3d7(0x10c))&&typeof _0x581d4e[_0x58e3d7(0x10a)]===_0x58e3d7(0x101)){const _0x45f477=_0x54c99a[_0x58e3d7(0xe1)](_0x581d4e[_0x58e3d7(0x10a)]);_0x45f477&&(_0x581d4e[_0x58e3d7(0x10a)]=_0x45f477);}if(_0x581d4e[_0x58e3d7(0xe9)]&&Array[_0x58e3d7(0x115)](_0x581d4e[_0x58e3d7(0xe9)]))for(const _0x2abc91 of _0x581d4e[_0x58e3d7(0xe9)]){updateSegmentRefsInRule(_0x2abc91,_0x54c99a);}}export function buildJourneysArray(_0x640cc1,_0x5f2ffd){const _0x2891af=a135_0x5714;return _0x640cc1[_0x2891af(0x12c)](_0x2a7f69=>{const _0x40420d=_0x2891af,_0xc32cf=_0x5f2ffd?_0x2a7f69[_0x40420d(0x11c)]['id']===_0x5f2ffd:_0x640cc1[_0x40420d(0xe4)]===0x1,_0x17b5c0=_0x2a7f69[_0x40420d(0x128)][_0x40420d(0xff)]?.[0x0],_0x34b60a=_0x17b5c0?.[_0x40420d(0x113)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0x113)],_0x5e8479={'version':_0x17b5c0?.[_0x40420d(0x11d)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0x11d)]||_0x2a7f69[_0x40420d(0x11c)]['name'],'state':_0x2a7f69[_0x40420d(0x11c)][_0x40420d(0xfa)]===_0x40420d(0xf6)?'launched':'draft','stages':_0x17b5c0?.[_0x40420d(0xed)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0xed)]||[],'id':_0x17b5c0?.['id']||_0x2a7f69[_0x40420d(0x128)]['id'],'version_number':_0x17b5c0?.[_0x40420d(0x114)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0x114)]};return _0x34b60a&&(_0x5e8479['goal']=_0x34b60a),_0xc32cf&&(_0x5e8479['latest']=!![]),_0x5e8479;});}export function buildMergedJourneyDef(_0x49fe86,_0x1c2805,_0x1cd7ea){const _0x46885a=a135_0x5714,_0x20d5e1=_0x49fe86[0x0]['yaml'],_0x5d0ca2=buildJourneysArray(_0x49fe86,_0x1cd7ea),{merged:_0x280fc5,nameMapping:_0x2b61af}=consolidateSegmentsByContent(_0x49fe86[_0x46885a(0x12c)](_0x16d958=>_0x16d958[_0x46885a(0x128)][_0x46885a(0xf3)]),_0x1c2805);updateSegmentRefsInSegments(_0x280fc5,_0x2b61af);const _0x2bfc51=Array[_0x46885a(0x120)](_0x2b61af[_0x46885a(0x124)]())['some'](([_0x562acc,_0x595711])=>_0x562acc!==_0x595711&&_0x562acc[_0x46885a(0x127)](_0x46885a(0x116)));let _0x5ad1e0=_0x280fc5,_0x52f960=new Map();if(_0x2bfc51){const _0x225d87=consolidateSegmentsByContent([_0x280fc5],_0x1c2805);_0x5ad1e0=_0x225d87[_0x46885a(0xe6)],_0x52f960=_0x225d87[_0x46885a(0x11a)];}const _0x477c59=new Map(_0x2b61af);for(const [_0x526825,_0x4fc413]of _0x52f960[_0x46885a(0x124)]()){_0x477c59[_0x46885a(0x12e)](_0x526825,_0x4fc413);}for(const [_0x36e89e,_0x15b562]of _0x477c59[_0x46885a(0x124)]()){let _0x5964ec=_0x15b562,_0x500835=0x0;while(_0x477c59[_0x46885a(0xe2)](_0x5964ec)&&_0x477c59['get'](_0x5964ec)!==_0x5964ec&&_0x500835<MAX_MAPPING_CHAIN_DEPTH){_0x5964ec=_0x477c59['get'](_0x5964ec),_0x500835++;}_0x5964ec!==_0x15b562&&_0x477c59['set'](_0x36e89e,_0x5964ec);}for(const _0x31b092 of _0x5d0ca2){updateSegmentReferences(_0x31b092['stages'],_0x477c59);}const {merged:_0x5ce14d,nameMapping:_0x22ef9e}=consolidateActivationsByContent(_0x49fe86[_0x46885a(0x12c)](_0xb5a5c2=>_0xb5a5c2[_0x46885a(0x128)][_0x46885a(0xfb)]));for(const _0x36e8ea of _0x5d0ca2){updateActivationReferences(_0x36e8ea['stages'],_0x22ef9e);}let _0x562251=_0x20d5e1[_0x46885a(0x113)];if(_0x562251?.[_0x46885a(0x10a)]){const _0x2bf616=_0x477c59['get'](_0x562251['segment']);_0x2bf616&&(_0x562251={..._0x562251,'segment':_0x2bf616});}for(const _0x2b1a2b of _0x5d0ca2){if(_0x2b1a2b[_0x46885a(0x113)]?.['segment']){const _0x43b034=_0x477c59[_0x46885a(0xe1)](_0x2b1a2b[_0x46885a(0x113)][_0x46885a(0x10a)]);_0x43b034&&(_0x2b1a2b[_0x46885a(0x113)]={..._0x2b1a2b[_0x46885a(0x113)],'segment':_0x43b034});}}return _0x5d0ca2[_0x46885a(0x119)](_0x18c1f0=>_0x18c1f0[_0x46885a(0x113)])&&(_0x562251=undefined),{'type':_0x46885a(0xdd),'name':_0x20d5e1[_0x46885a(0xf4)],'description':_0x20d5e1[_0x46885a(0x12a)],'goal':_0x562251,'reentry':_0x20d5e1['reentry'],'segments':Object[_0x46885a(0x10f)](_0x5ad1e0)[_0x46885a(0xe4)]>0x0?_0x5ad1e0:undefined,'activations':Object['keys'](_0x5ce14d)[_0x46885a(0xe4)]>0x0?_0x5ce14d:undefined,'journeys':_0x5d0ca2,'bundle_id':_0x20d5e1[_0x46885a(0xf7)],'bundle_name':_0x20d5e1[_0x46885a(0x12b)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x29c8c0,_0x27b28d,_0x3a8a69,_0x1a0616){const _0x4e1a4d=a135_0x5714,_0x689475=_0x29c8c0+':'+_0x27b28d,_0x258d4f=_0x3a8a69[_0x4e1a4d(0xe1)](_0x689475);if(_0x258d4f)return _0x258d4f;const _0xa1fbb0=await _0x1a0616(_0x29c8c0),_0x53c9bc=_0xa1fbb0[_0x4e1a4d(0xf5)][_0x4e1a4d(0x11b)]||_0xa1fbb0[_0x4e1a4d(0xf5)][_0x4e1a4d(0xf4)],_0x222139=_0xa1fbb0[_0x4e1a4d(0xf5)][_0x4e1a4d(0xf9)]['find'](_0x2520a0=>String(_0x2520a0['id'])===String(_0x27b28d)),_0x330825=_0x222139?.[_0x4e1a4d(0xf4)]||_0x27b28d,_0x11183e={'journeyName':_0x53c9bc,'stageName':_0x330825};return _0x3a8a69[_0x4e1a4d(0x12e)](_0x689475,_0x11183e),_0x11183e;}export function formatApiJourneyName(_0x126465,_0x649e6f){return _0x649e6f+'\x20('+_0x126465+')';}export function isLocalJourneyRef(_0x25611e){const _0x47a002=a135_0x5714;return _0x25611e[_0x47a002(0x12d)](_0x47a002(0x129))||_0x25611e['endsWith'](_0x47a002(0x104));}export function buildLocalRuleToNameMapping(_0x597c3e){const _0x48ed8e=a135_0x5714,_0x3eb53c=new Map();if(!_0x597c3e)return _0x3eb53c;for(const [_0x5e6c22,_0x46a9c9]of Object[_0x48ed8e(0x124)](_0x597c3e)){if(_0x46a9c9[_0x48ed8e(0x122)]){const _0x5a0991=serializeRule(_0x46a9c9[_0x48ed8e(0x122)]),_0x46ef90=_0x3eb53c[_0x48ed8e(0xe1)](_0x5a0991)||[];_0x46ef90[_0x48ed8e(0xdf)](_0x5e6c22),_0x3eb53c[_0x48ed8e(0x12e)](_0x5a0991,_0x46ef90);}}return _0x3eb53c;}export function buildLocalRuleToNameMappingFromJourney(_0x1d5704){const _0x466ba1=a135_0x5714,_0x241087=_0x1d5704[_0x466ba1(0xf3)];if(!_0x241087)return new Map();const _0x313866=collectSegmentUsageCounts(_0x1d5704),_0x514d49=new Map();let _0x14130f=0x0;for(const [_0xb7b0a3,_0x3e04f4]of Object[_0x466ba1(0x124)](_0x241087)){if(!_0x3e04f4[_0x466ba1(0x122)]){_0x14130f++;continue;}const _0x217566=serializeRule(_0x3e04f4[_0x466ba1(0x122)]),_0x172583=_0x514d49[_0x466ba1(0xe1)](_0x217566)||[];_0x172583[_0x466ba1(0xdf)]({'name':_0xb7b0a3,'index':_0x14130f}),_0x514d49[_0x466ba1(0x12e)](_0x217566,_0x172583),_0x14130f++;}const _0x5aa541=new Map();for(const [_0x24eb7d,_0x28799c]of _0x514d49){const _0x48c3af=_0x28799c[_0x466ba1(0x117)]()[_0x466ba1(0xea)]((_0x1961c1,_0x5bd638)=>{const _0x12e790=_0x466ba1,_0x390413=_0x313866[_0x12e790(0xe1)](_0x1961c1[_0x12e790(0xf4)])||0x0,_0x5d892d=_0x313866[_0x12e790(0xe1)](_0x5bd638['name'])||0x0;if(_0x390413!==_0x5d892d)return _0x5d892d-_0x390413;return _0x1961c1[_0x12e790(0xfc)]-_0x5bd638['index'];})[_0x466ba1(0x12c)](_0x1dc0e7=>_0x1dc0e7[_0x466ba1(0xf4)]);_0x5aa541[_0x466ba1(0x12e)](_0x24eb7d,_0x48c3af);}return _0x5aa541;}export function collectSegmentUsageCounts(_0x207e6f){const _0x4a2006=a135_0x5714,_0xf23499=new Map(),_0x103842=_0x5c8fb3=>{const _0x5027ca=a135_0x5714;if(!_0x5c8fb3)return;_0xf23499[_0x5027ca(0x12e)](_0x5c8fb3,(_0xf23499[_0x5027ca(0xe1)](_0x5c8fb3)||0x0)+0x1);},_0x14e32c=_0x28862c=>{const _0x3bed56=a135_0x5714;for(const _0x5b4528 of _0x28862c){_0x103842(_0x5b4528[_0x3bed56(0x116)]?.[_0x3bed56(0x10a)]);if(_0x5b4528['exit_criteria'])for(const _0x271d4d of _0x5b4528[_0x3bed56(0xee)]){_0x103842(_0x271d4d[_0x3bed56(0x10a)]);}_0x103842(_0x5b4528[_0x3bed56(0x103)]?.[_0x3bed56(0x10a)]);if(_0x5b4528[_0x3bed56(0x108)])for(const _0x4ea2d1 of _0x5b4528[_0x3bed56(0x108)]){if(_0x4ea2d1[_0x3bed56(0x102)]==='decision_point')for(const _0x1e7e3a of _0x4ea2d1[_0x3bed56(0xdc)]['branches']){_0x103842(_0x1e7e3a['segment']);}else _0x4ea2d1[_0x3bed56(0x102)]===_0x3bed56(0xfe)&&_0x103842(_0x4ea2d1['with'][_0x3bed56(0xe0)]?.[_0x3bed56(0x10a)]);}}};_0x103842(_0x207e6f[_0x4a2006(0x113)]?.[_0x4a2006(0x10a)]);if(_0x207e6f[_0x4a2006(0xff)])for(const _0xbb78ce of _0x207e6f[_0x4a2006(0xff)]){_0x103842(_0xbb78ce['goal']?.[_0x4a2006(0x10a)]),_0x14e32c(_0xbb78ce['stages']);}_0x207e6f[_0x4a2006(0xed)]&&_0x14e32c(_0x207e6f[_0x4a2006(0xed)]);if(_0x207e6f['versions'])for(const _0x5ddcdf of _0x207e6f[_0x4a2006(0x111)]){_0x14e32c(_0x5ddcdf[_0x4a2006(0xed)]);}return _0xf23499;}
1
+ (function(_0x156796,_0xbcffa5){const _0x2fb7e4=a135_0x3cb2,_0x56d42f=_0x156796();while(!![]){try{const _0x1ea5eb=parseInt(_0x2fb7e4(0x109))/0x1+parseInt(_0x2fb7e4(0x10e))/0x2*(parseInt(_0x2fb7e4(0x108))/0x3)+parseInt(_0x2fb7e4(0xe1))/0x4+parseInt(_0x2fb7e4(0x103))/0x5+parseInt(_0x2fb7e4(0xce))/0x6+-parseInt(_0x2fb7e4(0x101))/0x7*(parseInt(_0x2fb7e4(0x113))/0x8)+-parseInt(_0x2fb7e4(0xef))/0x9;if(_0x1ea5eb===_0xbcffa5)break;else _0x56d42f['push'](_0x56d42f['shift']());}catch(_0x2f6c77){_0x56d42f['push'](_0x56d42f['shift']());}}}(a135_0x470a,0xc4795));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x29f899){const _0x2c0618=a135_0x3cb2;return _0x29f899[_0x2c0618(0xe8)]()[_0x2c0618(0xe7)](/\s+/g,'_')[_0x2c0618(0xe7)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x2c0618(0xe7)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3a07d9){const _0x330064=a135_0x3cb2,_0x13dead=_0x3a07d9[_0x330064(0xc6)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x13dead){const _0x6c3b71=_0x13dead[0x1][_0x330064(0xe8)](),_0x5483f9=_0x13dead[0x2],_0x25a3fb=_0x5483f9[_0x330064(0xe7)](/-/g,'')[_0x330064(0xd8)](0x0,0x4)[_0x330064(0xe8)]();return _0x6c3b71+'_'+_0x25a3fb;}const _0x27917c=_0x3a07d9['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x27917c){const _0x4644c0=_0x27917c[0x1],_0x3a17a3=_0x27917c[0x2]['toLowerCase'](),_0x22cc23=_0x4644c0[_0x330064(0xe7)](/-/g,'')[_0x330064(0xd8)](0x0,0x4)[_0x330064(0xe8)]();return _0x3a17a3+'_'+_0x22cc23;}return undefined;}function stableStringify(_0x6402c2){const _0x1e8edc=a135_0x3cb2;if(Array['isArray'](_0x6402c2))return'['+_0x6402c2['map'](_0x1d902e=>stableStringify(_0x1d902e))['join'](',')+']';if(_0x6402c2&&typeof _0x6402c2===_0x1e8edc(0xfe)){const _0x41c9f0=_0x6402c2,_0x2b4c4e=Object['keys'](_0x41c9f0)[_0x1e8edc(0x100)](),_0x55f65b=_0x2b4c4e[_0x1e8edc(0x106)](_0x57f835=>'\x22'+_0x57f835+'\x22:'+stableStringify(_0x41c9f0[_0x57f835]));return'{'+_0x55f65b[_0x1e8edc(0xcd)](',')+'}';}const _0x1451fc=JSON['stringify'](_0x6402c2);return _0x1451fc===undefined?'null':_0x1451fc;}export function consolidateActivationsByContent(_0x148ced){const _0x37fe02=a135_0x3cb2,_0x3bd37c={},_0x448302=new Map(),_0x496bc6=new Map();for(const _0x3c1641 of _0x148ced){if(!_0x3c1641)continue;for(const [_0x4f5b5d,_0x5a3913]of Object[_0x37fe02(0xd0)](_0x3c1641)){const _0x1e66b8={'name':_0x5a3913[_0x37fe02(0x105)],'connection':_0x5a3913[_0x37fe02(0xf9)],..._0x5a3913[_0x37fe02(0x111)]!==undefined&&{'all_columns':_0x5a3913['all_columns']},..._0x5a3913[_0x37fe02(0xd3)]!==undefined&&{'columns':_0x5a3913['columns']},..._0x5a3913[_0x37fe02(0xd9)]!==undefined&&{'behavior':_0x5a3913['behavior']},..._0x5a3913[_0x37fe02(0xdb)]!==undefined&&{'schedule':_0x5a3913['schedule']},..._0x5a3913[_0x37fe02(0xeb)]!==undefined&&{'notification':_0x5a3913['notification']},..._0x5a3913[_0x37fe02(0x114)]!==undefined&&{'connector_config':_0x5a3913[_0x37fe02(0x114)]},..._0x5a3913[_0x37fe02(0xf3)]!==undefined&&{'activation_template_id':_0x5a3913[_0x37fe02(0xf3)]}},_0x1011a7=stableStringify(_0x1e66b8),_0x457bd3=_0x496bc6['get'](_0x1011a7);_0x457bd3?_0x448302['set'](_0x4f5b5d,_0x457bd3):(_0x3bd37c[_0x4f5b5d]=_0x5a3913,_0x448302[_0x37fe02(0xcb)](_0x4f5b5d,_0x4f5b5d),_0x496bc6['set'](_0x1011a7,_0x4f5b5d));}}return{'merged':_0x3bd37c,'nameMapping':_0x448302};}export function updateActivationReferences(_0xbe06e9,_0x5da3a3){const _0x5e3c5f=a135_0x3cb2;if(!_0xbe06e9)return;for(const _0x3d9ace of _0xbe06e9){if(!_0x3d9ace[_0x5e3c5f(0xe6)])continue;for(const _0x9c9da0 of _0x3d9ace[_0x5e3c5f(0xe6)]){if(_0x9c9da0[_0x5e3c5f(0x104)]===_0x5e3c5f(0x112)&&_0x9c9da0[_0x5e3c5f(0x10c)]?.['activation']){const _0x41c596=_0x5da3a3[_0x5e3c5f(0x110)](_0x9c9da0['with'][_0x5e3c5f(0x112)]);_0x41c596&&_0x41c596!==_0x9c9da0[_0x5e3c5f(0x10c)][_0x5e3c5f(0x112)]&&(_0x9c9da0[_0x5e3c5f(0x10c)]['activation']=_0x41c596);}}}}export function consolidateSegmentsByContent(_0x5ac199,_0x4787ef){const _0x310ef0=a135_0x3cb2,_0x3cac05={},_0x11cb32=new Map(),_0x45541d=new Map();for(const _0x7fb2b3 of _0x5ac199){if(!_0x7fb2b3)continue;for(const [_0xd9b14f,_0x4713e1]of Object[_0x310ef0(0xd0)](_0x7fb2b3)){if(!_0x4713e1[_0x310ef0(0xe2)]){_0x3cac05[_0xd9b14f]=_0x4713e1,_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0xd9b14f);continue;}const _0x58e2e1=_0x4713e1[_0x310ef0(0xf7)]&&_0x4713e1[_0x310ef0(0xf7)][_0x310ef0(0xdf)]()?_0x4713e1[_0x310ef0(0xf7)]:undefined,_0x312966=JSON['stringify']({'description':_0x58e2e1,'rule':deepSortObject(_0x4713e1['rule'])}),_0x25284f=_0x45541d['get'](_0x312966);if(_0x25284f){const _0x5a3bea={..._0x4713e1[_0x310ef0(0xf7)]!==undefined&&{'description':_0x4713e1[_0x310ef0(0xf7)]},'rule':_0x4713e1[_0x310ef0(0xe2)]?deepSortObject(_0x4713e1['rule']):_0x4713e1[_0x310ef0(0xe2)]};if(_0xd9b14f<_0x25284f){_0x3cac05[_0xd9b14f]=_0x5a3bea,delete _0x3cac05[_0x25284f];for(const [_0x28ece9,_0x240d02]of _0x11cb32['entries']()){_0x240d02===_0x25284f&&_0x11cb32[_0x310ef0(0xcb)](_0x28ece9,_0xd9b14f);}_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0xd9b14f),_0x45541d[_0x310ef0(0xcb)](_0x312966,_0xd9b14f);}else _0x3cac05[_0x25284f]=_0x5a3bea,_0x11cb32['set'](_0xd9b14f,_0x25284f);}else{let _0x222490=_0xd9b14f;if(_0x4787ef){const _0x4630a9=_0x4787ef[_0x310ef0(0x110)](_0x312966);_0x4630a9&&_0x4630a9[_0x310ef0(0xca)]>0x0&&(_0x222490=_0x4630a9[_0x310ef0(0xd8)]()[_0x310ef0(0x100)]()[0x0]);}const _0x44a038={..._0x4713e1[_0x310ef0(0xf7)]!==undefined&&{'description':_0x4713e1[_0x310ef0(0xf7)]},'rule':_0x4713e1['rule']?deepSortObject(_0x4713e1[_0x310ef0(0xe2)]):_0x4713e1[_0x310ef0(0xe2)]};_0x3cac05[_0x222490]=_0x44a038,_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0x222490),_0x45541d[_0x310ef0(0xcb)](_0x312966,_0x222490);}}}return{'merged':_0x3cac05,'nameMapping':_0x11cb32};}export function updateSegmentReferences(_0x455d21,_0x56729c){const _0x140b04=a135_0x3cb2;if(!_0x455d21)return;for(const _0x35dc18 of _0x455d21){if(_0x35dc18[_0x140b04(0x10d)]?.[_0x140b04(0xfd)]){const _0x5c252d=_0x56729c[_0x140b04(0x110)](_0x35dc18['entry_criteria'][_0x140b04(0xfd)]);_0x5c252d&&(_0x35dc18[_0x140b04(0x10d)][_0x140b04(0xfd)]=_0x5c252d);}if(_0x35dc18[_0x140b04(0xf0)])for(const _0x5d03f8 of _0x35dc18[_0x140b04(0xf0)]){if(_0x5d03f8['segment']){const _0x398505=_0x56729c[_0x140b04(0x110)](_0x5d03f8['segment']);_0x398505&&(_0x5d03f8[_0x140b04(0xfd)]=_0x398505);}}if(_0x35dc18[_0x140b04(0xdd)]?.[_0x140b04(0xfd)]){const _0x34543c=_0x56729c[_0x140b04(0x110)](_0x35dc18[_0x140b04(0xdd)]['segment']);_0x34543c&&(_0x35dc18[_0x140b04(0xdd)][_0x140b04(0xfd)]=_0x34543c);}if(_0x35dc18[_0x140b04(0xe6)])for(const _0x34477e of _0x35dc18[_0x140b04(0xe6)]){if(_0x34477e[_0x140b04(0x104)]===_0x140b04(0xf5)&&_0x34477e[_0x140b04(0x10c)]?.[_0x140b04(0xc9)])for(const _0x52efe9 of _0x34477e[_0x140b04(0x10c)][_0x140b04(0xc9)]){if(_0x52efe9['segment']){const _0x373f09=_0x56729c['get'](_0x52efe9[_0x140b04(0xfd)]);_0x373f09&&(_0x52efe9['segment']=_0x373f09);}}if(_0x34477e[_0x140b04(0x104)]===_0x140b04(0xcf)&&_0x34477e['with']?.[_0x140b04(0xf8)]?.[_0x140b04(0xfd)]){const _0x191e6b=_0x56729c[_0x140b04(0x110)](_0x34477e[_0x140b04(0x10c)][_0x140b04(0xf8)]['segment']);_0x191e6b&&(_0x34477e[_0x140b04(0x10c)][_0x140b04(0xf8)][_0x140b04(0xfd)]=_0x191e6b);}}}}export function updateSegmentRefsInSegments(_0x2a0014,_0x36457c){const _0x3ceddd=a135_0x3cb2;for(const _0x2c9f5e of Object[_0x3ceddd(0xcc)](_0x2a0014)){_0x2c9f5e[_0x3ceddd(0xe2)]&&updateSegmentRefsInRule(_0x2c9f5e[_0x3ceddd(0xe2)],_0x36457c);}}function updateSegmentRefsInRule(_0x1f275b,_0x1972ef){const _0x25987b=a135_0x3cb2;if(_0x1f275b===null||typeof _0x1f275b!=='object')return;if(Array[_0x25987b(0xe4)](_0x1f275b)){for(const _0x34f21e of _0x1f275b){updateSegmentRefsInRule(_0x34f21e,_0x1972ef);}return;}const _0x493f24=_0x1f275b;if((_0x493f24[_0x25987b(0x104)]===_0x25987b(0xdc)||_0x493f24[_0x25987b(0x104)]===_0x25987b(0xff))&&typeof _0x493f24[_0x25987b(0xfd)]===_0x25987b(0xd2)){const _0x563a51=_0x1972ef[_0x25987b(0x110)](_0x493f24[_0x25987b(0xfd)]);_0x563a51&&(_0x493f24[_0x25987b(0xfd)]=_0x563a51);}if(_0x493f24[_0x25987b(0xd6)]&&Array[_0x25987b(0xe4)](_0x493f24[_0x25987b(0xd6)]))for(const _0x122e1d of _0x493f24[_0x25987b(0xd6)]){updateSegmentRefsInRule(_0x122e1d,_0x1972ef);}}export function buildJourneysArray(_0x388409,_0x39e3e4){const _0x39cbfd=a135_0x3cb2;return _0x388409[_0x39cbfd(0x106)](_0x2f1fc8=>{const _0x28bbb9=_0x39cbfd,_0x233a2f=_0x39e3e4?_0x2f1fc8['item']['id']===_0x39e3e4:_0x388409[_0x28bbb9(0xca)]===0x1,_0x1f480d=_0x2f1fc8[_0x28bbb9(0xfa)]['journeys']?.[0x0],_0x3e4b5e=_0x1f480d?.[_0x28bbb9(0xea)]||_0x2f1fc8['yaml']['goal'],_0x2f228c={'version':_0x1f480d?.[_0x28bbb9(0xd1)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0xd1)]||_0x2f1fc8['item'][_0x28bbb9(0x105)],'state':_0x2f1fc8[_0x28bbb9(0xc7)][_0x28bbb9(0xe3)]===_0x28bbb9(0xed)?_0x28bbb9(0xed):'draft','stages':_0x1f480d?.[_0x28bbb9(0xe0)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0xe0)]||[],'id':_0x1f480d?.['id']||_0x2f1fc8['yaml']['id'],'version_number':_0x1f480d?.[_0x28bbb9(0x107)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0x107)]};return _0x3e4b5e&&(_0x2f228c[_0x28bbb9(0xea)]=_0x3e4b5e),_0x233a2f&&(_0x2f228c[_0x28bbb9(0x10a)]=!![]),_0x2f228c;});}function a135_0x470a(){const _0x3850cc=['.yaml','schedule','include','milestone','nameMapping','trim','stages','2492008JpjODB','rule','state','isArray','journeyBundleName','steps','replace','toLowerCase','activations','goal','notification','some','launched','segments','21931992YRqCmW','exit_criteria','journey','startsWith','activation_template_id','merged','decision_point','versions','description','condition','connection','yaml','endsWith','journeys','segment','object','exclude','sort','411019hOAtbk','reentry','6327465GsaQVy','type','name','map','version_number','3IPcLev','114864NDNDra','latest','index','with','entry_criteria','3056306UZaeGx','find','get','all_columns','activation','40xFSGIu','connector_config','attributes','match','item','push','branches','length','set','values','join','22308lvooOB','wait','entries','version','string','columns','bundle_name','keys','conditions','journeyStages','slice','behavior'];a135_0x470a=function(){return _0x3850cc;};return a135_0x470a();}export function buildMergedJourneyDef(_0x39f1bc,_0x1bd2a1,_0x570e6b){const _0x116ff4=a135_0x3cb2,_0x7e912d=_0x39f1bc[0x0][_0x116ff4(0xfa)],_0x355705=buildJourneysArray(_0x39f1bc,_0x570e6b),{merged:_0x39088c,nameMapping:_0xc810bc}=consolidateSegmentsByContent(_0x39f1bc[_0x116ff4(0x106)](_0xe23daa=>_0xe23daa[_0x116ff4(0xfa)][_0x116ff4(0xee)]),_0x1bd2a1);updateSegmentRefsInSegments(_0x39088c,_0xc810bc);const _0x5bb843=Array['from'](_0xc810bc[_0x116ff4(0xd0)]())[_0x116ff4(0xec)](([_0xef2474,_0x2fafa4])=>_0xef2474!==_0x2fafa4&&_0xef2474[_0x116ff4(0xf2)](_0x116ff4(0x10d)));let _0xe7cb62=_0x39088c,_0x43dd94=new Map();if(_0x5bb843){const _0x32de54=consolidateSegmentsByContent([_0x39088c],_0x1bd2a1);_0xe7cb62=_0x32de54[_0x116ff4(0xf4)],_0x43dd94=_0x32de54[_0x116ff4(0xde)];}const _0xae68e2=new Map(_0xc810bc);for(const [_0x4df204,_0xbcfc98]of _0x43dd94['entries']()){_0xae68e2[_0x116ff4(0xcb)](_0x4df204,_0xbcfc98);}for(const [_0x53da5d,_0x5d497a]of _0xae68e2[_0x116ff4(0xd0)]()){let _0x24f7c1=_0x5d497a,_0xfd400d=0x0;while(_0xae68e2['has'](_0x24f7c1)&&_0xae68e2[_0x116ff4(0x110)](_0x24f7c1)!==_0x24f7c1&&_0xfd400d<MAX_MAPPING_CHAIN_DEPTH){_0x24f7c1=_0xae68e2[_0x116ff4(0x110)](_0x24f7c1),_0xfd400d++;}_0x24f7c1!==_0x5d497a&&_0xae68e2[_0x116ff4(0xcb)](_0x53da5d,_0x24f7c1);}for(const _0x28ccea of _0x355705){updateSegmentReferences(_0x28ccea[_0x116ff4(0xe0)],_0xae68e2);}const {merged:_0x5f003b,nameMapping:_0x17f539}=consolidateActivationsByContent(_0x39f1bc[_0x116ff4(0x106)](_0x1c8f5e=>_0x1c8f5e[_0x116ff4(0xfa)][_0x116ff4(0xe9)]));for(const _0x22b9cc of _0x355705){updateActivationReferences(_0x22b9cc[_0x116ff4(0xe0)],_0x17f539);}let _0x557401=_0x7e912d[_0x116ff4(0xea)];if(_0x557401?.[_0x116ff4(0xfd)]){const _0x28151c=_0xae68e2[_0x116ff4(0x110)](_0x557401['segment']);_0x28151c&&(_0x557401={..._0x557401,'segment':_0x28151c});}for(const _0x285783 of _0x355705){if(_0x285783[_0x116ff4(0xea)]?.[_0x116ff4(0xfd)]){const _0x4150a4=_0xae68e2[_0x116ff4(0x110)](_0x285783[_0x116ff4(0xea)]['segment']);_0x4150a4&&(_0x285783[_0x116ff4(0xea)]={..._0x285783['goal'],'segment':_0x4150a4});}}return _0x355705[_0x116ff4(0xec)](_0x3cc21c=>_0x3cc21c['goal'])&&(_0x557401=undefined),{'type':_0x116ff4(0xf1),'name':_0x7e912d[_0x116ff4(0x105)],'description':_0x7e912d[_0x116ff4(0xf7)],'goal':_0x557401,'reentry':_0x7e912d[_0x116ff4(0x102)],'segments':Object['keys'](_0xe7cb62)[_0x116ff4(0xca)]>0x0?_0xe7cb62:undefined,'activations':Object[_0x116ff4(0xd5)](_0x5f003b)['length']>0x0?_0x5f003b:undefined,'journeys':_0x355705,'bundle_id':_0x7e912d['bundle_id'],'bundle_name':_0x7e912d[_0x116ff4(0xd4)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x45f02f,_0x2bda16,_0x9aa672,_0x165def){const _0x56e713=a135_0x3cb2,_0x3a1047=_0x45f02f+':'+_0x2bda16,_0xb53b87=_0x9aa672['get'](_0x3a1047);if(_0xb53b87)return _0xb53b87;const _0x4427be=await _0x165def(_0x45f02f),_0x4e0db5=_0x4427be[_0x56e713(0xc5)][_0x56e713(0xe5)]||_0x4427be[_0x56e713(0xc5)][_0x56e713(0x105)],_0x103d37=_0x4427be[_0x56e713(0xc5)][_0x56e713(0xd7)][_0x56e713(0x10f)](_0x23d535=>String(_0x23d535['id'])===String(_0x2bda16)),_0x3b3476=_0x103d37?.['name']||_0x2bda16,_0x2dac5d={'journeyName':_0x4e0db5,'stageName':_0x3b3476};return _0x9aa672[_0x56e713(0xcb)](_0x3a1047,_0x2dac5d),_0x2dac5d;}export function formatApiJourneyName(_0x2c787a,_0x4c2028){return _0x4c2028+'\x20('+_0x2c787a+')';}export function isLocalJourneyRef(_0x3ef607){const _0x32ae55=a135_0x3cb2;return _0x3ef607['endsWith']('.yml')||_0x3ef607[_0x32ae55(0xfb)](_0x32ae55(0xda));}export function buildLocalRuleToNameMapping(_0x16bb9a){const _0x56661f=a135_0x3cb2,_0x157f1d=new Map();if(!_0x16bb9a)return _0x157f1d;for(const [_0x2362c4,_0x122d7d]of Object[_0x56661f(0xd0)](_0x16bb9a)){if(_0x122d7d[_0x56661f(0xe2)]){const _0x33df81=serializeRule(_0x122d7d['rule']),_0x59b828=_0x157f1d[_0x56661f(0x110)](_0x33df81)||[];_0x59b828[_0x56661f(0xc8)](_0x2362c4),_0x157f1d[_0x56661f(0xcb)](_0x33df81,_0x59b828);}}return _0x157f1d;}function a135_0x3cb2(_0x3ad7c1,_0x1fea78){_0x3ad7c1=_0x3ad7c1-0xc5;const _0x470a2d=a135_0x470a();let _0x3cb242=_0x470a2d[_0x3ad7c1];return _0x3cb242;}export function buildLocalRuleToNameMappingFromJourney(_0x185824){const _0x56d2ec=a135_0x3cb2,_0x4dfb4d=_0x185824[_0x56d2ec(0xee)];if(!_0x4dfb4d)return new Map();const _0x13843f=collectSegmentUsageCounts(_0x185824),_0x2a7764=new Map();let _0x11725f=0x0;for(const [_0x417cdb,_0x17de31]of Object[_0x56d2ec(0xd0)](_0x4dfb4d)){if(!_0x17de31[_0x56d2ec(0xe2)]){_0x11725f++;continue;}const _0x221fe6=serializeRule(_0x17de31['rule']),_0x5a9f88=_0x2a7764['get'](_0x221fe6)||[];_0x5a9f88[_0x56d2ec(0xc8)]({'name':_0x417cdb,'index':_0x11725f}),_0x2a7764['set'](_0x221fe6,_0x5a9f88),_0x11725f++;}const _0x423808=new Map();for(const [_0x406e1f,_0x116bad]of _0x2a7764){const _0x3c4741=_0x116bad['slice']()['sort']((_0x419519,_0x57861c)=>{const _0x54b276=_0x56d2ec,_0x1c7abe=_0x13843f[_0x54b276(0x110)](_0x419519[_0x54b276(0x105)])||0x0,_0x4e121f=_0x13843f[_0x54b276(0x110)](_0x57861c[_0x54b276(0x105)])||0x0;if(_0x1c7abe!==_0x4e121f)return _0x4e121f-_0x1c7abe;return _0x419519[_0x54b276(0x10b)]-_0x57861c[_0x54b276(0x10b)];})['map'](_0x406be9=>_0x406be9[_0x56d2ec(0x105)]);_0x423808['set'](_0x406e1f,_0x3c4741);}return _0x423808;}export function collectSegmentUsageCounts(_0x2c27c9){const _0x4fc91f=a135_0x3cb2,_0x153601=new Map(),_0x3ac6d1=_0x3e2adf=>{const _0x46b63e=a135_0x3cb2;if(!_0x3e2adf)return;_0x153601[_0x46b63e(0xcb)](_0x3e2adf,(_0x153601['get'](_0x3e2adf)||0x0)+0x1);},_0x45905f=_0x3bccc8=>{const _0x410dc8=a135_0x3cb2;for(const _0xa1ff02 of _0x3bccc8){_0x3ac6d1(_0xa1ff02[_0x410dc8(0x10d)]?.[_0x410dc8(0xfd)]);if(_0xa1ff02[_0x410dc8(0xf0)])for(const _0x21319f of _0xa1ff02[_0x410dc8(0xf0)]){_0x3ac6d1(_0x21319f[_0x410dc8(0xfd)]);}_0x3ac6d1(_0xa1ff02[_0x410dc8(0xdd)]?.['segment']);if(_0xa1ff02[_0x410dc8(0xe6)])for(const _0x1bfc21 of _0xa1ff02[_0x410dc8(0xe6)]){if(_0x1bfc21[_0x410dc8(0x104)]==='decision_point')for(const _0x8f9796 of _0x1bfc21[_0x410dc8(0x10c)]['branches']){_0x3ac6d1(_0x8f9796[_0x410dc8(0xfd)]);}else _0x1bfc21[_0x410dc8(0x104)]===_0x410dc8(0xcf)&&_0x3ac6d1(_0x1bfc21[_0x410dc8(0x10c)][_0x410dc8(0xf8)]?.[_0x410dc8(0xfd)]);}}};_0x3ac6d1(_0x2c27c9[_0x4fc91f(0xea)]?.[_0x4fc91f(0xfd)]);if(_0x2c27c9[_0x4fc91f(0xfc)])for(const _0x37b468 of _0x2c27c9[_0x4fc91f(0xfc)]){_0x3ac6d1(_0x37b468[_0x4fc91f(0xea)]?.[_0x4fc91f(0xfd)]),_0x45905f(_0x37b468[_0x4fc91f(0xe0)]);}_0x2c27c9[_0x4fc91f(0xe0)]&&_0x45905f(_0x2c27c9[_0x4fc91f(0xe0)]);if(_0x2c27c9[_0x4fc91f(0xf6)])for(const _0x4cebf6 of _0x2c27c9[_0x4fc91f(0xf6)]){_0x45905f(_0x4cebf6[_0x4fc91f(0xe0)]);}return _0x153601;}
@@ -1 +1 @@
1
- (function(_0x25c75e,_0x51871b){const _0x2ebb49=a136_0x1625,_0x34c1b5=_0x25c75e();while(!![]){try{const _0x269a30=parseInt(_0x2ebb49(0x133))/0x1+parseInt(_0x2ebb49(0x17d))/0x2*(parseInt(_0x2ebb49(0xf6))/0x3)+-parseInt(_0x2ebb49(0xfd))/0x4+parseInt(_0x2ebb49(0x12f))/0x5+parseInt(_0x2ebb49(0xef))/0x6*(parseInt(_0x2ebb49(0x162))/0x7)+-parseInt(_0x2ebb49(0x171))/0x8+-parseInt(_0x2ebb49(0x1a4))/0x9*(-parseInt(_0x2ebb49(0x156))/0xa);if(_0x269a30===_0x51871b)break;else _0x34c1b5['push'](_0x34c1b5['shift']());}catch(_0x5ecc5d){_0x34c1b5['push'](_0x34c1b5['shift']());}}}(a136_0xfbdd,0xd0e9c));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x3e49ca,_0x500b2e,_0x69eb3e,_0x35029b,_0x191748,_0x2344f5){const _0x1caced=a136_0x1625;return{'level':_0x3e49ca,'path':_0x500b2e,'code':_0x69eb3e,'message':_0x35029b,'location':getLocationFromPath(_0x191748[_0x1caced(0x153)],_0x191748[_0x1caced(0x14f)],pathToArray(_0x2344f5??_0x500b2e))};}function validateVersionStructure(_0x19277d,_0x4eb764){const _0x5255df=a136_0x1625,_0x3c5da6=[];return _0x19277d[_0x5255df(0x184)]>MAX_STAGES&&_0x3c5da6[_0x5255df(0x137)](createIssue(_0x5255df(0x121),_0x5255df(0x17e),_0x5255df(0x15f),_0x5255df(0x18b)+_0x19277d[_0x5255df(0x184)]+_0x5255df(0x12b)+MAX_STAGES,_0x4eb764)),_0x3c5da6;}function validateStageStructure(_0x164633,_0x3c30d7,_0x4dac86,_0x2502c7){const _0x281361=a136_0x1625,_0x4bb8d6=[],_0x5501e9=_0x281361(0x15d)+_0x3c30d7+']';_0x3c30d7===0x0&&!_0x164633[_0x281361(0x180)]&&_0x4bb8d6['push'](createIssue(_0x281361(0x121),_0x5501e9+_0x281361(0x168),'MISSING_ENTRY_CRITERIA',_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x15a),_0x2502c7,_0x5501e9));const _0x32db11=_0x3c30d7===_0x4dac86-0x1;!_0x32db11&&!_0x164633[_0x281361(0x19d)]&&_0x4bb8d6[_0x281361(0x137)](createIssue(_0x281361(0x121),_0x5501e9+'.milestone',_0x281361(0x164),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x169),_0x2502c7,_0x5501e9));(!_0x164633[_0x281361(0x176)]||_0x164633[_0x281361(0x176)][_0x281361(0x184)]===0x0)&&_0x4bb8d6[_0x281361(0x137)](createIssue('warning',_0x5501e9+_0x281361(0x1a1),'MISSING_EXIT_CRITERIA',_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0xfc),_0x2502c7,_0x5501e9));const _0x2c9984=_0x164633['steps']?.[_0x281361(0x184)]??0x0;if(_0x2c9984===0x0)_0x4bb8d6['push'](createIssue(_0x281361(0x121),_0x5501e9+_0x281361(0x13e),_0x281361(0x13c),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x178),_0x2502c7,_0x5501e9+_0x281361(0x13e)));else{if(_0x2c9984===0x1)_0x4bb8d6[_0x281361(0x137)](createIssue(_0x281361(0x163),_0x5501e9+_0x281361(0x13e),_0x281361(0x13c),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x1a0),_0x2502c7,_0x5501e9+_0x281361(0x13e)));else _0x2c9984<=0x3&&_0x4bb8d6[_0x281361(0x137)](createIssue(_0x281361(0x163),_0x5501e9+_0x281361(0x13e),_0x281361(0x12e),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x181)+_0x2c9984+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x2502c7,_0x5501e9+'.steps'));}return _0x4bb8d6;}function validateStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977){const _0x8f8948=a136_0x1625,_0x4cafa5=[];if(_0x473bb6[_0x8f8948(0x105)]===_0x8f8948(0x16f))return _0x473bb6[_0x8f8948(0x187)]&&_0x4cafa5[_0x8f8948(0x137)](createIssue('error',_0x1721fa+_0x8f8948(0x17f),_0x8f8948(0x19e),_0x8f8948(0x198)+_0x473bb6[_0x8f8948(0x14b)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x1b205f)),'with'in _0x473bb6&&_0x473bb6[_0x8f8948(0x112)]!==undefined&&_0x4cafa5[_0x8f8948(0x137)](createIssue('error',_0x1721fa+_0x8f8948(0x193),_0x8f8948(0x19e),_0x8f8948(0x198)+_0x473bb6[_0x8f8948(0x14b)]+_0x8f8948(0x1a3),_0x1b205f)),_0x4cafa5;_0x473bb6['next']&&(_0x1b205f[_0x8f8948(0x158)]&&!_0x1b205f[_0x8f8948(0x158)][_0x8f8948(0x159)](_0x473bb6[_0x8f8948(0x187)])&&_0x4cafa5[_0x8f8948(0x137)](createIssue('error',_0x1721fa+_0x8f8948(0x17f),_0x8f8948(0x11c),_0x8f8948(0x102)+_0x473bb6[_0x8f8948(0x187)]+'\x27',_0x1b205f)));switch(_0x473bb6[_0x8f8948(0x105)]){case _0x8f8948(0x106):_0x4cafa5[_0x8f8948(0x137)](...validateWaitStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977));break;case _0x8f8948(0x145):_0x4cafa5['push'](...validateActivationStep(_0x473bb6,_0x1721fa,_0x1b205f));break;case'decision_point':_0x4cafa5[_0x8f8948(0x137)](...validateDecisionPointStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977));break;case'ab_test':_0x4cafa5['push'](...validateAbTestStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977));break;case _0x8f8948(0x142):_0x4cafa5[_0x8f8948(0x137)](...validateJumpStep(_0x473bb6,_0x1721fa,_0x1b205f));break;}return _0x4cafa5;}function validateWaitStep(_0x341d90,_0x19a182,_0x1ae900,_0x1d05d4){const _0x2685ab=a136_0x1625,_0x470dac=[];if(!_0x341d90['with'])return _0x470dac['push'](createIssue(_0x2685ab(0x121),_0x19a182+_0x2685ab(0x193),_0x2685ab(0x146),_0x2685ab(0x13b),_0x1ae900,_0x19a182)),_0x470dac;if(_0x341d90[_0x2685ab(0x112)]['condition']){const _0x47f28c=_0x341d90[_0x2685ab(0x112)]['condition'];if(_0x47f28c[_0x2685ab(0x138)]){_0x1ae900[_0x2685ab(0x127)]?.['add'](_0x47f28c['segment']);!_0x47f28c[_0x2685ab(0x138)][_0x2685ab(0x182)](_0x2685ab(0x130))&&(_0x1ae900[_0x2685ab(0x18f)]&&!_0x1ae900[_0x2685ab(0x18f)]['has'](_0x47f28c['segment'])&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x121),_0x19a182+_0x2685ab(0x141),_0x2685ab(0x177),_0x2685ab(0x19b)+_0x47f28c[_0x2685ab(0x138)]+_0x2685ab(0x129),_0x1ae900)));_0x47f28c[_0x2685ab(0x187)]&&_0x1ae900[_0x2685ab(0x158)]&&!_0x1ae900[_0x2685ab(0x158)][_0x2685ab(0x159)](_0x47f28c['next'])&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x121),_0x19a182+'.with.condition.next','INVALID_NEXT_REFERENCE',_0x2685ab(0x14d)+_0x47f28c[_0x2685ab(0x187)]+'\x27',_0x1ae900));_0x47f28c['timeout']?.['next']&&_0x1ae900[_0x2685ab(0x158)]&&!_0x1ae900[_0x2685ab(0x158)][_0x2685ab(0x159)](_0x47f28c['timeout'][_0x2685ab(0x187)])&&_0x470dac[_0x2685ab(0x137)](createIssue('error',_0x19a182+'.with.condition.timeout.next',_0x2685ab(0x11c),_0x2685ab(0x185)+_0x47f28c[_0x2685ab(0x132)]['next']+'\x27',_0x1ae900));const _0x4e4b47=_0x47f28c['next']||_0x341d90['next'],_0x95cc70=_0x47f28c[_0x2685ab(0x132)]?.['next']||_0x341d90[_0x2685ab(0x187)];if(_0x4e4b47){const _0x317beb=_0x1d05d4['get'](_0x4e4b47);_0x317beb?.['type']==='merge'&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x163),_0x19a182+_0x2685ab(0x17c),_0x2685ab(0x16d),_0x2685ab(0x172)+_0x4e4b47+_0x2685ab(0x13a),_0x1ae900,_0x19a182+_0x2685ab(0x128)));}if(_0x95cc70){const _0x2d9ac8=_0x1d05d4['get'](_0x95cc70);_0x2d9ac8?.[_0x2685ab(0x105)]===_0x2685ab(0x19c)&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x163),_0x19a182+_0x2685ab(0xfe),_0x2685ab(0x16d),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x95cc70+_0x2685ab(0x13a),_0x1ae900,_0x19a182+_0x2685ab(0x110)));}}}return _0x470dac;}function validateActivationStep(_0x1d4874,_0x1132fc,_0x39727f){const _0x1c7c8c=a136_0x1625,_0x5c9a71=[];if(!_0x1d4874[_0x1c7c8c(0x112)]?.[_0x1c7c8c(0x145)])return _0x5c9a71[_0x1c7c8c(0x137)](createIssue(_0x1c7c8c(0x121),_0x1132fc+_0x1c7c8c(0x11e),'MISSING_ACTIVATION_REF',_0x1c7c8c(0x166),_0x39727f,_0x1132fc)),_0x5c9a71;const _0x107a5f=_0x1d4874[_0x1c7c8c(0x112)][_0x1c7c8c(0x145)];return _0x39727f[_0x1c7c8c(0xf2)]&&!_0x107a5f[_0x1c7c8c(0x182)](_0x1c7c8c(0x130))&&(!_0x39727f[_0x1c7c8c(0xf2)]['has'](_0x107a5f)&&_0x5c9a71['push'](createIssue(_0x1c7c8c(0x121),_0x1132fc+_0x1c7c8c(0x11e),_0x1c7c8c(0xf7),_0x1c7c8c(0x134)+_0x107a5f+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x39727f))),_0x5c9a71;}function validateDecisionPointStep(_0xe5eade,_0x19190c,_0x57b1d8,_0x87b135){const _0xcda343=a136_0x1625,_0x1a5d1d=[];if(!_0xe5eade[_0xcda343(0x112)]?.['branches']||_0xe5eade[_0xcda343(0x112)][_0xcda343(0x10e)][_0xcda343(0x184)]===0x0)return _0x1a5d1d['push'](createIssue(_0xcda343(0x121),_0x19190c+_0xcda343(0xf1),_0xcda343(0x10d),_0xcda343(0x136),_0x57b1d8,_0x19190c)),_0x1a5d1d;for(let _0x10f532=0x0;_0x10f532<_0xe5eade[_0xcda343(0x112)][_0xcda343(0x10e)]['length'];_0x10f532++){const _0x43226c=_0xe5eade[_0xcda343(0x112)][_0xcda343(0x10e)][_0x10f532],_0x349f46=_0x19190c+_0xcda343(0x140)+_0x10f532+']';_0x43226c[_0xcda343(0x138)]&&!_0x43226c[_0xcda343(0x117)]&&(_0x57b1d8['referencedSegments']?.['add'](_0x43226c[_0xcda343(0x138)]),!_0x43226c[_0xcda343(0x138)][_0xcda343(0x182)](_0xcda343(0x130))&&(_0x57b1d8['embeddedSegments']&&!_0x57b1d8[_0xcda343(0x18f)][_0xcda343(0x159)](_0x43226c[_0xcda343(0x138)])&&_0x1a5d1d[_0xcda343(0x137)](createIssue('error',_0x349f46+'.segment','MISSING_SEGMENT_REFERENCE',_0xcda343(0x16a)+_0x43226c[_0xcda343(0x138)]+'\x27',_0x57b1d8))));_0x43226c[_0xcda343(0x187)]&&_0x57b1d8[_0xcda343(0x158)]&&!_0x57b1d8['stepNames']['has'](_0x43226c[_0xcda343(0x187)])&&_0x1a5d1d[_0xcda343(0x137)](createIssue('error',_0x349f46+_0xcda343(0x17f),'INVALID_NEXT_REFERENCE',_0xcda343(0x19f)+_0x43226c[_0xcda343(0x187)]+'\x27',_0x57b1d8));if(_0x43226c[_0xcda343(0x187)]){const _0x4b1bd5=_0x87b135[_0xcda343(0x155)](_0x43226c['next']);_0x4b1bd5?.[_0xcda343(0x105)]===_0xcda343(0x19c)&&_0x1a5d1d['push'](createIssue(_0xcda343(0x163),_0x349f46+'.next',_0xcda343(0x16d),_0xcda343(0x144)+_0x43226c[_0xcda343(0x14b)]+_0xcda343(0xfa)+_0x43226c[_0xcda343(0x187)]+_0xcda343(0x126),_0x57b1d8));}}return _0x1a5d1d;}function validateAbTestStep(_0x7254b8,_0x632cbc,_0x185eb4,_0x5df10e){const _0x590107=a136_0x1625,_0x30d4a3=[];if(!_0x7254b8[_0x590107(0x112)]?.[_0x590107(0x18d)]||_0x7254b8[_0x590107(0x112)][_0x590107(0x18d)][_0x590107(0x184)]===0x0)return _0x30d4a3[_0x590107(0x137)](createIssue(_0x590107(0x121),_0x632cbc+_0x590107(0x186),'MISSING_CONDITIONS',_0x590107(0x16e),_0x185eb4,_0x632cbc)),_0x30d4a3;const _0x543c45=_0x7254b8['with'][_0x590107(0x18d)][_0x590107(0x16b)]((_0x25131d,_0x1aea13)=>_0x25131d+(_0x1aea13[_0x590107(0x12c)]||0x0),0x0);Math['abs'](_0x543c45-0x64)>0.01&&_0x30d4a3[_0x590107(0x137)](createIssue(_0x590107(0x121),_0x632cbc+_0x590107(0x186),'INVALID_AB_TEST_PERCENTAGES',_0x590107(0x175)+_0x543c45+'%)',_0x185eb4));for(let _0x3016eb=0x0;_0x3016eb<_0x7254b8[_0x590107(0x112)][_0x590107(0x18d)][_0x590107(0x184)];_0x3016eb++){const _0x14e199=_0x7254b8['with'][_0x590107(0x18d)][_0x3016eb],_0x5a636a=_0x632cbc+_0x590107(0x122)+_0x3016eb+']';_0x14e199['next']&&_0x185eb4['stepNames']&&!_0x185eb4[_0x590107(0x158)][_0x590107(0x159)](_0x14e199[_0x590107(0x187)])&&_0x30d4a3[_0x590107(0x137)](createIssue('error',_0x5a636a+_0x590107(0x17f),_0x590107(0x11c),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x14e199[_0x590107(0x187)]+'\x27',_0x185eb4));if(_0x14e199[_0x590107(0x187)]){const _0x90d5c0=_0x5df10e[_0x590107(0x155)](_0x14e199['next']);_0x90d5c0?.['type']==='merge'&&_0x30d4a3[_0x590107(0x137)](createIssue(_0x590107(0x163),_0x5a636a+_0x590107(0x17f),_0x590107(0x16d),_0x590107(0x17a)+_0x14e199['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x14e199[_0x590107(0x187)]+_0x590107(0x126),_0x185eb4));}}return _0x30d4a3;}function validateJumpStep(_0x3c382a,_0x2420c4,_0x37d88b){const _0x485ea6=a136_0x1625,_0x1e5e1f=[];if(!_0x3c382a[_0x485ea6(0x112)]?.[_0x485ea6(0x11b)])return _0x1e5e1f[_0x485ea6(0x137)](createIssue('error',_0x2420c4+_0x485ea6(0x196),_0x485ea6(0x115),'Jump\x20step\x20requires\x20a\x20target',_0x37d88b,_0x2420c4)),_0x1e5e1f;return(!_0x3c382a[_0x485ea6(0x112)][_0x485ea6(0x11b)][_0x485ea6(0x199)]||!_0x3c382a['with'][_0x485ea6(0x11b)][_0x485ea6(0x139)])&&_0x1e5e1f[_0x485ea6(0x137)](createIssue('error',_0x2420c4+_0x485ea6(0x196),_0x485ea6(0x115),_0x485ea6(0x191),_0x37d88b)),_0x1e5e1f;}function buildConvergenceMap(_0x1d0e4f){const _0x30ace5=a136_0x1625,_0x54e2fc=new Map();function _0x5d2778(_0x414faa,_0x358d81){const _0xae4883=a136_0x1625,_0x23f96b=_0x54e2fc[_0xae4883(0x155)](_0x414faa)||[];_0x23f96b[_0xae4883(0x137)](_0x358d81),_0x54e2fc[_0xae4883(0x135)](_0x414faa,_0x23f96b);}for(const _0x3e2980 of _0x1d0e4f){_0x3e2980[_0x30ace5(0x187)]&&_0x5d2778(_0x3e2980[_0x30ace5(0x187)],{'stepName':_0x3e2980['name'],'description':'step\x20\x27'+_0x3e2980['name']+'\x27'});if(_0x3e2980['type']==='decision_point'&&_0x3e2980[_0x30ace5(0x112)]?.[_0x30ace5(0x10e)])for(const _0x473238 of _0x3e2980[_0x30ace5(0x112)]['branches']){_0x473238[_0x30ace5(0x187)]&&_0x5d2778(_0x473238[_0x30ace5(0x187)],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0x179)+_0x473238['name']+_0x30ace5(0x111)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'});}if(_0x3e2980['type']===_0x30ace5(0x167)&&_0x3e2980['with']?.['variants'])for(const _0x46ff1c of _0x3e2980[_0x30ace5(0x112)]['variants']){_0x46ff1c['next']&&_0x5d2778(_0x46ff1c[_0x30ace5(0x187)],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0x157)+_0x46ff1c[_0x30ace5(0x14b)]+_0x30ace5(0x111)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'});}_0x3e2980[_0x30ace5(0x105)]===_0x30ace5(0x106)&&_0x3e2980['with']?.[_0x30ace5(0x147)]&&(_0x3e2980['with'][_0x30ace5(0x147)][_0x30ace5(0x187)]&&_0x5d2778(_0x3e2980[_0x30ace5(0x112)][_0x30ace5(0x147)]['next'],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0xf5)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'}),_0x3e2980[_0x30ace5(0x112)]['condition'][_0x30ace5(0x132)]?.[_0x30ace5(0x187)]&&_0x5d2778(_0x3e2980['with'][_0x30ace5(0x147)][_0x30ace5(0x132)]['next'],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0x109)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'}));}return _0x54e2fc;}function validateFlowControl(_0x5e4458,_0x4bbef2,_0x362af1){const _0x44b9c5=a136_0x1625,_0x178257=[],_0x20e494=_0x44b9c5(0x15d)+_0x4bbef2+']',_0xdbc74=_0x5e4458[_0x44b9c5(0xf4)]||[];if(_0xdbc74['length']===0x0)return _0x178257;const _0x3d4f4c=new Map();for(const _0x1539a0 of _0xdbc74){_0x1539a0[_0x44b9c5(0x14b)]&&_0x3d4f4c[_0x44b9c5(0x135)](_0x1539a0['name'],_0x1539a0);}const _0xf09095=buildConvergenceMap(_0xdbc74),_0x100b9c=_0xdbc74[_0x44b9c5(0x149)](_0x21dda3=>_0x21dda3[_0x44b9c5(0x105)]===_0x44b9c5(0x16f));!_0x100b9c&&_0x178257[_0x44b9c5(0x137)](createIssue(_0x44b9c5(0x121),_0x20e494+_0x44b9c5(0x13e),'MISSING_END_STEP',_0x44b9c5(0x161)+_0x5e4458[_0x44b9c5(0x14b)]+_0x44b9c5(0x150),_0x362af1));for(const [_0x3c559c,_0x1a8d5e]of _0xf09095){const _0x256e05=_0x3d4f4c[_0x44b9c5(0x155)](_0x3c559c);if(!_0x256e05)continue;if(_0x1a8d5e[_0x44b9c5(0x184)]>0x1&&_0x256e05[_0x44b9c5(0x105)]!=='merge'){const _0x3c61f3=_0x1a8d5e[_0x44b9c5(0x188)](_0x7a0435=>_0x7a0435[_0x44b9c5(0x104)])[_0x44b9c5(0x189)](',\x20');_0x178257[_0x44b9c5(0x137)](createIssue(_0x44b9c5(0x121),_0x20e494+_0x44b9c5(0x13e),'CONVERGENCE_WITHOUT_MERGE',_0x44b9c5(0x194)+_0x3c559c+_0x44b9c5(0x100)+_0x3c61f3+_0x44b9c5(0x119),_0x362af1));}_0x1a8d5e[_0x44b9c5(0x184)]===0x1&&_0x256e05[_0x44b9c5(0x105)]===_0x44b9c5(0x19c)&&_0x178257[_0x44b9c5(0x137)](createIssue(_0x44b9c5(0x163),_0x20e494+'.steps',_0x44b9c5(0x13d),'Merge\x20step\x20\x27'+_0x3c559c+_0x44b9c5(0x15e)+_0x1a8d5e[0x0][_0x44b9c5(0x104)]+_0x44b9c5(0x118),_0x362af1));}for(const _0x110bb0 of _0xdbc74){if(_0x110bb0[_0x44b9c5(0x105)]===_0x44b9c5(0x19c)&&_0x110bb0[_0x44b9c5(0x187)]){const _0x107619=_0x3d4f4c[_0x44b9c5(0x155)](_0x110bb0[_0x44b9c5(0x187)]);_0x107619?.['type']===_0x44b9c5(0x19c)&&_0x178257[_0x44b9c5(0x137)](createIssue('error',_0x20e494+'.steps','MERGE_TO_MERGE_CHAIN','Merge\x20step\x20\x27'+_0x110bb0[_0x44b9c5(0x14b)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x110bb0[_0x44b9c5(0x187)]+_0x44b9c5(0x15c),_0x362af1));}}return _0x178257;}function validateCriteria(_0x247996,_0x4d2da0,_0x3db9f0){const _0x28bf72=a136_0x1625,_0x5acaf9=[];return _0x247996[_0x28bf72(0x138)]&&(_0x3db9f0[_0x28bf72(0x127)]?.[_0x28bf72(0xfb)](_0x247996[_0x28bf72(0x138)]),!_0x247996[_0x28bf72(0x138)][_0x28bf72(0x182)](_0x28bf72(0x130))&&(_0x3db9f0[_0x28bf72(0x18f)]&&!_0x3db9f0['embeddedSegments'][_0x28bf72(0x159)](_0x247996[_0x28bf72(0x138)])&&_0x5acaf9[_0x28bf72(0x137)](createIssue('error',_0x4d2da0+_0x28bf72(0x19a),_0x28bf72(0x177),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x247996[_0x28bf72(0x138)]+'\x27',_0x3db9f0)))),_0x5acaf9;}function validateEmbeddedSegment(_0x3d6d13,_0x4a5281,_0x4ea483){const _0x255950=a136_0x1625,_0x3ee037=[];return _0x3d6d13[_0x255950(0x165)]&&_0x3ee037['push'](...validateRuleDef(_0x3d6d13[_0x255950(0x165)],_0x4a5281+'.rule',_0x4ea483)),_0x3ee037;}function validateStage(_0x4888a7,_0x3d9d0d,_0xf26e58,_0x2fde37){const _0x34f3db=a136_0x1625,_0x2e301c=[],_0x2933ca=_0x34f3db(0x15d)+_0x3d9d0d+']',_0x158bde=new Map(),_0x52dbbd=new Map();if(_0x4888a7[_0x34f3db(0xf4)]){for(let _0x353fdb=0x0;_0x353fdb<_0x4888a7[_0x34f3db(0xf4)]['length'];_0x353fdb++){const _0x264822=_0x4888a7[_0x34f3db(0xf4)][_0x353fdb];_0x264822['name']&&_0x158bde[_0x34f3db(0x135)](_0x264822['name'],_0x264822);}for(let _0xa836a7=0x0;_0xa836a7<_0x4888a7[_0x34f3db(0xf4)][_0x34f3db(0x184)];_0xa836a7++){const _0x51cd86=_0x4888a7[_0x34f3db(0xf4)][_0xa836a7],_0xaabbab=_0x2933ca+_0x34f3db(0x18a)+_0xa836a7+']';if(_0x51cd86[_0x34f3db(0x14b)]){if(_0x52dbbd[_0x34f3db(0x159)](_0x51cd86['name'])){const _0x40dd8e=_0x52dbbd['get'](_0x51cd86[_0x34f3db(0x14b)]);_0x2e301c['push'](createIssue(_0x34f3db(0x121),_0xaabbab+'.name',_0x34f3db(0x18c),'Duplicate\x20step\x20name\x20\x27'+_0x51cd86[_0x34f3db(0x14b)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x40dd8e+'])',_0x2fde37));}else _0x52dbbd[_0x34f3db(0x135)](_0x51cd86[_0x34f3db(0x14b)],_0xa836a7);}_0x2e301c[_0x34f3db(0x137)](...validateStep(_0x51cd86,_0xaabbab,_0x2fde37,_0x158bde));}}_0x4888a7['entry_criteria']&&_0x2e301c[_0x34f3db(0x137)](...validateCriteria(_0x4888a7[_0x34f3db(0x180)],_0x2933ca+_0x34f3db(0x168),_0x2fde37));if(_0x4888a7[_0x34f3db(0x176)])for(let _0x47fe2a=0x0;_0x47fe2a<_0x4888a7[_0x34f3db(0x176)][_0x34f3db(0x184)];_0x47fe2a++){_0x2e301c['push'](...validateCriteria(_0x4888a7[_0x34f3db(0x176)][_0x47fe2a],_0x2933ca+_0x34f3db(0x197)+_0x47fe2a+']',_0x2fde37));}return _0x4888a7[_0x34f3db(0x19d)]&&_0x2e301c[_0x34f3db(0x137)](...validateCriteria(_0x4888a7[_0x34f3db(0x19d)],_0x2933ca+_0x34f3db(0xff),_0x2fde37)),_0x2e301c[_0x34f3db(0x137)](...validateStageStructure(_0x4888a7,_0x3d9d0d,_0xf26e58,_0x2fde37)),_0x2e301c[_0x34f3db(0x137)](...validateFlowControl(_0x4888a7,_0x3d9d0d,_0x2fde37)),_0x2e301c;}function validateStagesForVersion(_0x2648f7,_0x4a67f0,_0x1d5ce8,_0x17b79a,_0x5c069c,_0x41f2d5,_0x354961){const _0x304e36=a136_0x1625;if(_0x2648f7[_0x304e36(0x184)]===0x0){_0x5c069c[_0x304e36(0x137)]({'level':_0x304e36(0x121),'path':_0x17b79a+_0x304e36(0x17e),'code':_0x304e36(0xf0),'message':_0x304e36(0x173),'location':getLocationFromPath(_0x1d5ce8['document'],_0x1d5ce8[_0x304e36(0x14f)],[_0x304e36(0x17e)])});return;}const _0x1d815f=new Set();for(const _0x5455af of _0x2648f7){if(_0x5455af[_0x304e36(0xf4)])for(const _0x243413 of _0x5455af['steps']){_0x243413[_0x304e36(0x14b)]&&_0x1d815f['add'](_0x243413[_0x304e36(0x14b)]);}}const _0x3a5989={..._0x1d5ce8,'stepNames':_0x1d815f},_0x387712=validateVersionStructure(_0x2648f7,_0x3a5989);for(const _0x374938 of _0x387712){const _0x4c75f7=_0x17b79a?{..._0x374938,'path':''+_0x17b79a+_0x374938[_0x304e36(0x10c)]}:_0x374938;if(_0x4c75f7[_0x304e36(0x103)]===_0x304e36(0x121))_0x5c069c[_0x304e36(0x137)](_0x4c75f7);else _0x41f2d5['push'](_0x4c75f7);}for(let _0xb38ae8=0x0;_0xb38ae8<_0x2648f7[_0x304e36(0x184)];_0xb38ae8++){const _0x5717aa=validateStage(_0x2648f7[_0xb38ae8],_0xb38ae8,_0x2648f7['length'],_0x3a5989);for(const _0x73dc00 of _0x5717aa){const _0x1d684a=_0x17b79a?{..._0x73dc00,'path':''+_0x17b79a+_0x73dc00[_0x304e36(0x10c)]}:_0x73dc00;if(_0x1d684a[_0x304e36(0x103)]===_0x304e36(0x121))_0x5c069c[_0x304e36(0x137)](_0x1d684a);else _0x41f2d5['push'](_0x1d684a);}}if(_0x4a67f0['goal']){const _0x428d11=_0x354961?.[_0x304e36(0x160)]?_0x304e36(0x16c):_0x17b79a+_0x304e36(0x16c),_0x3836cc=validateCriteria(_0x4a67f0[_0x304e36(0x16c)],_0x428d11,_0x3a5989);for(const _0x499172 of _0x3836cc){if(_0x499172['level']==='error')_0x5c069c[_0x304e36(0x137)](_0x499172);else _0x41f2d5['push'](_0x499172);}}}function a136_0x1625(_0x28dc2a,_0x5658a4){_0x28dc2a=_0x28dc2a-0xef;const _0xfbdd71=a136_0xfbdd();let _0x162568=_0xfbdd71[_0x28dc2a];return _0x162568;}function extractVersionIndex(_0x253fce){const _0x4e18a0=_0x253fce['match'](/^journeys\[(\d+)\]\./);return _0x4e18a0?_0x4e18a0[0x1]:undefined;}function a136_0xfbdd(){const _0x32d81d=['Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','\x20(across\x20','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','exit_criteria','MISSING_SEGMENT_REFERENCE','\x27\x20has\x20no\x20steps','branch\x20\x27','A/B\x20test\x20variant\x20\x27','keys','.with.condition.next','3682aoulNA','stages','.next','entry_criteria','\x27\x20has\x20only\x20','startsWith','symbol','length','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','.with.variants','next','map','join','.steps[','Journey\x20has\x20','DUPLICATE_STEP_NAME','variants','ACTIVATION_SCHEMA_ERROR','embeddedSegments','code','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','MISSING_NAME','.with','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','JOURNEY_SCHEMA_ERROR','.with.target','.exit_criteria[','End\x20step\x20\x27','journey','.segment','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','merge','milestone','END_STEP_HAS_NEXT_OR_WITH','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.exit_criteria','versions','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','91953gPsRAu','6474lsPOUI','MISSING_STAGES','.with.branches','activationKeys','journeys','steps','condition\x20of\x20\x27','723iOIzov','MISSING_ACTIVATION_DEFINITION','\x20versions)','segments','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','add','\x27\x20has\x20no\x20exit_criteria\x20defined','3370940wvOjoj','.with.condition.timeout.next','.milestone','\x27\x20(from:\x20','values','Step\x20references\x20non-existent\x20step\x20\x27','level','description','type','wait','indices','.stages','timeout\x20of\x20\x27','versions[','entries','path','MISSING_CONDITIONS','branches','every','.with.condition.timeout','\x27\x20of\x20\x27','with','message','segments.','INVALID_JUMP_TARGET','.type','excluded',').\x20Merge\x20is\x20unnecessary.',').\x20Use\x20a\x20merge\x20step.','UNUSED_EMBEDDED_SEGMENT','target','INVALID_NEXT_REFERENCE','safeParse','.with.activation','journey\x20entry','Journey\x20name\x20is\x20required','error','.with.variants[','state','excluded_','data','\x27\x20with\x20no\x20action\x20in\x20between','referencedSegments','.with.condition','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Journey\x20can\x20have\x20at\x20most\x20one\x20','\x20stages\x20but\x20maximum\x20is\x20','percentage','Journey\x20has\x20no\x20goal\x20defined','FEW_STEPS','1124280CnbUvH','ref:','includes','timeout','155749nXzCRA','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','set','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','push','segment','stage','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','INSUFFICIENT_STEPS','SINGLE_INPUT_MERGE','.steps','\x20with\x20latest:\x20true','.with.branches[','.with.condition.segment','jump','version','Decision\x20branch\x20\x27','activation','MISSING_WAIT_PARAMS','condition','trim','some','size','name','issues','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','activations','source','\x27\x20has\x20no\x20end\x20step','endsWith','latest','document','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','get','970MXpbJK','variant\x20\x27','stepNames','has','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','journeys[','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','stages[','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','TOO_MANY_STAGES','goalIsInherited','Stage\x20\x27','9457mHSXCw','warning','MISSING_MILESTONE','rule','Activation\x20step\x20requires\x20an\x20activation\x20reference','ab_test','.entry_criteria','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','reduce','goal','BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','end','filter','12596968djwrLP'];a136_0xfbdd=function(){return _0x32d81d;};return a136_0xfbdd();}function deduplicateAcrossVersions(_0xf71619){const _0x7f8f23=a136_0x1625,_0x281100=new Map();for(let _0x5b31fb=0x0;_0x5b31fb<_0xf71619[_0x7f8f23(0x184)];_0x5b31fb++){const _0x508d14=_0xf71619[_0x5b31fb][_0x7f8f23(0x190)]+':'+_0xf71619[_0x5b31fb][_0x7f8f23(0x113)],_0x51ade9=extractVersionIndex(_0xf71619[_0x5b31fb][_0x7f8f23(0x10c)]),_0x5b783c=_0x281100[_0x7f8f23(0x155)](_0x508d14);if(_0x5b783c){_0x5b783c[_0x7f8f23(0x107)][_0x7f8f23(0x137)](_0x5b31fb);if(_0x51ade9)_0x5b783c[_0x7f8f23(0x1a2)][_0x7f8f23(0xfb)](_0x51ade9);}else _0x281100[_0x7f8f23(0x135)](_0x508d14,{'indices':[_0x5b31fb],'versions':new Set(_0x51ade9?[_0x51ade9]:[])});}const _0x33db56=new Set();for(const {indices:_0x5ec9d8,versions:_0x54bc5c}of _0x281100[_0x7f8f23(0x101)]()){if(_0x54bc5c[_0x7f8f23(0x14a)]<=0x1)continue;const _0x2d6507=_0xf71619[_0x5ec9d8[0x0]];_0x2d6507['path']=_0x2d6507[_0x7f8f23(0x10c)]['replace'](/^journeys\[\d+\]\./,''),_0x2d6507['message']=_0x2d6507[_0x7f8f23(0x113)]+_0x7f8f23(0x174)+_0x54bc5c['size']+_0x7f8f23(0xf8);for(let _0x54d812=0x1;_0x54d812<_0x5ec9d8[_0x7f8f23(0x184)];_0x54d812++){_0x33db56['add'](_0x5ec9d8[_0x54d812]);}}const _0x5890b8=[..._0x33db56]['sort']((_0x51e088,_0x46c0ec)=>_0x46c0ec-_0x51e088);for(const _0x32d488 of _0x5890b8){_0xf71619['splice'](_0x32d488,0x1);}}export function validateJourneyDef(_0x5cf3ee,_0x3572e7={},_0x5b16db={}){const _0x52d6d6=a136_0x1625;if(_0x5b16db['skipSchema'])return runJourneySemanticChecks(_0x5cf3ee,_0x3572e7);const _0x5adf02=JourneyDefSchema[_0x52d6d6(0x11d)](_0x5cf3ee);if(_0x5adf02['success'])return runJourneySemanticChecks(_0x5adf02[_0x52d6d6(0x125)],_0x3572e7);return zodErrorsToJourneyValidationResult(_0x5adf02[_0x52d6d6(0x121)],_0x3572e7);}function zodErrorsToJourneyValidationResult(_0x378a87,_0x3ba53a){const _0x33a4e4=a136_0x1625,_0x462c29=flattenZodIssues(_0x378a87[_0x33a4e4(0x14c)]),_0xc9af1e=_0x462c29[_0x33a4e4(0x188)](_0x182ce2=>{const _0x21d872=_0x33a4e4,_0xb5dacd=formatZodPath(_0x182ce2[_0x21d872(0x10c)]),_0x25a8c9=mapJourneyZodIssueToCode(_0x182ce2,_0xb5dacd),_0x5b9968=getLocationFromPath(_0x3ba53a['document'],_0x3ba53a[_0x21d872(0x14f)],_0x182ce2['path'][_0x21d872(0x188)](_0x158307=>typeof _0x158307===_0x21d872(0x183)?String(_0x158307):_0x158307));return{'level':_0x21d872(0x121),'path':_0xb5dacd,'code':_0x25a8c9,'message':_0x182ce2['message'],..._0x5b9968&&{'location':_0x5b9968}};});return{'valid':![],'errors':_0xc9af1e,'warnings':[]};}function mapJourneyZodIssueToCode(_0x141ef8,_0x1bff38){const _0x35eb46=a136_0x1625;if(_0x1bff38===_0x35eb46(0x14b))return _0x35eb46(0x192);if(_0x1bff38[_0x35eb46(0x151)](_0x35eb46(0x116))&&_0x1bff38['includes'](_0x35eb46(0xf4)))return'JOURNEY_SCHEMA_ERROR';if(_0x1bff38===_0x35eb46(0x17e)||_0x1bff38[_0x35eb46(0x151)](_0x35eb46(0x108)))return _0x35eb46(0xf0);if(_0x1bff38===''&&_0x141ef8['message'][_0x35eb46(0x131)]('journeys,\x20stages,\x20or\x20versions'))return _0x35eb46(0xf0);if(_0x1bff38[_0x35eb46(0x131)]('activation'))return _0x35eb46(0x18e);return _0x35eb46(0x195);}function runJourneySemanticChecks(_0x217df4,_0x4097e3){const _0xbc7abf=a136_0x1625,_0x5d1970=[],_0x3acc39=[];(!_0x217df4[_0xbc7abf(0x14b)]||_0x217df4[_0xbc7abf(0x14b)][_0xbc7abf(0x148)]()==='')&&_0x5d1970[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x121),'path':'name','code':_0xbc7abf(0x192),'message':_0xbc7abf(0x120),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3['source'],[_0xbc7abf(0x14b)])});const _0x3d8c7d=new Set();if(_0x217df4[_0xbc7abf(0xf9)])for(const _0x107598 of Object[_0xbc7abf(0x17b)](_0x217df4[_0xbc7abf(0xf9)])){_0x3d8c7d[_0xbc7abf(0xfb)](_0x107598);}const _0x3fee57=new Set();if(_0x217df4['activations'])for(const _0x1c6276 of Object[_0xbc7abf(0x17b)](_0x217df4[_0xbc7abf(0x14e)])){_0x3fee57[_0xbc7abf(0xfb)](_0x1c6276);}const _0x2716c6=new Set(),_0x18db2d={..._0x4097e3,'embeddedSegments':_0x3d8c7d,'referencedSegments':_0x2716c6,'activationKeys':_0x3fee57[_0xbc7abf(0x14a)]>0x0?_0x3fee57:undefined};if(_0x217df4[_0xbc7abf(0xf9)])for(const [_0x2d927a,_0x803c58]of Object[_0xbc7abf(0x10b)](_0x217df4[_0xbc7abf(0xf9)])){const _0x24926e=validateEmbeddedSegment(_0x803c58,_0xbc7abf(0x114)+_0x2d927a,_0x18db2d);for(const _0x12f977 of _0x24926e){if(_0x12f977[_0xbc7abf(0x103)]==='error')_0x5d1970[_0xbc7abf(0x137)](_0x12f977);else _0x3acc39[_0xbc7abf(0x137)](_0x12f977);}}const _0x36f055=!!_0x217df4[_0xbc7abf(0x16c)],_0x533bec=_0x217df4[_0xbc7abf(0xf3)]?.[_0xbc7abf(0x10f)](_0x4d0451=>!!_0x4d0451[_0xbc7abf(0x16c)])??![];!_0x36f055&&!_0x533bec&&_0x3acc39[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x163),'path':'goal','code':'MISSING_GOAL','message':_0xbc7abf(0x12d),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3[_0xbc7abf(0x14f)],[_0xbc7abf(0x16c)])});const _0x3c4e2e=_0x217df4[_0xbc7abf(0xf3)]??_0x217df4[_0xbc7abf(0x1a2)];if(_0x3c4e2e&&_0x3c4e2e[_0xbc7abf(0x170)](_0x126d3c=>_0x126d3c[_0xbc7abf(0x152)]===!![])[_0xbc7abf(0x184)]>0x1){const _0xfe4038=_0x217df4['journeys']?_0xbc7abf(0xf3):_0xbc7abf(0x1a2);_0x5d1970[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x121),'path':_0xfe4038,'code':'DUPLICATE_LATEST','message':_0xbc7abf(0x12a)+(_0xfe4038===_0xbc7abf(0xf3)?_0xbc7abf(0x11f):_0xbc7abf(0x143))+_0xbc7abf(0x13f),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3[_0xbc7abf(0x14f)],[_0xfe4038])});}if(_0x217df4['journeys']&&_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)]>0x0)for(let _0x28fd7a=0x0;_0x28fd7a<_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)];_0x28fd7a++){const _0x60659b=_0x217df4[_0xbc7abf(0xf3)][_0x28fd7a];if(_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)]>0x1&&_0x60659b[_0xbc7abf(0x123)]==='launched')continue;const _0x151d44=_0x60659b[_0xbc7abf(0x17e)]||[],_0x448c7d=_0xbc7abf(0x15b)+_0x28fd7a+'].',_0x1aaefe=!!_0x60659b['goal'],_0x1f7832=_0x1aaefe?{..._0x217df4,'goal':_0x60659b['goal']}:_0x217df4;validateStagesForVersion(_0x151d44,_0x1f7832,_0x18db2d,_0x448c7d,_0x5d1970,_0x3acc39,{'goalIsInherited':!_0x1aaefe});}else{if(_0x217df4['versions']&&_0x217df4[_0xbc7abf(0x1a2)][_0xbc7abf(0x184)]>0x0)for(let _0xd5088f=0x0;_0xd5088f<_0x217df4[_0xbc7abf(0x1a2)][_0xbc7abf(0x184)];_0xd5088f++){const _0x4fc608=_0x217df4[_0xbc7abf(0x1a2)][_0xd5088f];if(_0x217df4[_0xbc7abf(0x1a2)]['length']>0x1&&_0x4fc608[_0xbc7abf(0x123)]==='launched')continue;const _0x5a364a=_0x4fc608['stages']||[],_0x1899df=_0xbc7abf(0x10a)+_0xd5088f+'].';validateStagesForVersion(_0x5a364a,_0x217df4,_0x18db2d,_0x1899df,_0x5d1970,_0x3acc39);}else{const _0x5c6060=_0x217df4[_0xbc7abf(0x17e)]||[];validateStagesForVersion(_0x5c6060,_0x217df4,_0x18db2d,'',_0x5d1970,_0x3acc39);}}_0x217df4[_0xbc7abf(0xf3)]&&_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)]>0x1&&(deduplicateAcrossVersions(_0x5d1970),deduplicateAcrossVersions(_0x3acc39));for(const _0x115397 of _0x3d8c7d){!_0x2716c6[_0xbc7abf(0x159)](_0x115397)&&!_0x115397[_0xbc7abf(0x182)](_0xbc7abf(0x124))&&_0x3acc39[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x163),'path':_0xbc7abf(0x114)+_0x115397,'code':_0xbc7abf(0x11a),'message':'Embedded\x20segment\x20\x27'+_0x115397+_0xbc7abf(0x154),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3[_0xbc7abf(0x14f)],[_0xbc7abf(0xf9),_0x115397])});}return{'valid':_0x5d1970[_0xbc7abf(0x184)]===0x0,'errors':_0x5d1970,'warnings':_0x3acc39};}
1
+ function a136_0x13a2(_0x7de224,_0x574ae2){_0x7de224=_0x7de224-0xb9;const _0x12d45f=a136_0x12d4();let _0x13a2d0=_0x12d45f[_0x7de224];return _0x13a2d0;}(function(_0x5a44fd,_0x4a3bf3){const _0x316868=a136_0x13a2,_0x5238c6=_0x5a44fd();while(!![]){try{const _0x2ac50d=parseInt(_0x316868(0xd7))/0x1*(-parseInt(_0x316868(0x165))/0x2)+-parseInt(_0x316868(0x11a))/0x3*(-parseInt(_0x316868(0xdd))/0x4)+parseInt(_0x316868(0x15a))/0x5*(parseInt(_0x316868(0xeb))/0x6)+parseInt(_0x316868(0x105))/0x7*(-parseInt(_0x316868(0x15d))/0x8)+parseInt(_0x316868(0x11d))/0x9*(parseInt(_0x316868(0xf4))/0xa)+-parseInt(_0x316868(0x115))/0xb+parseInt(_0x316868(0x144))/0xc;if(_0x2ac50d===_0x4a3bf3)break;else _0x5238c6['push'](_0x5238c6['shift']());}catch(_0x5d7412){_0x5238c6['push'](_0x5238c6['shift']());}}}(a136_0x12d4,0x247b1));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5e0de4,_0x513b02,_0x4520c0,_0x7bcd1d,_0x507489,_0xc5ec80){const _0x4365e0=a136_0x13a2;return{'level':_0x5e0de4,'path':_0x513b02,'code':_0x4520c0,'message':_0x7bcd1d,'location':getLocationFromPath(_0x507489[_0x4365e0(0xd8)],_0x507489[_0x4365e0(0xff)],pathToArray(_0xc5ec80??_0x513b02))};}function validateVersionStructure(_0x573d48,_0x64e70b){const _0x1d6490=a136_0x13a2,_0x50158e=[];return _0x573d48[_0x1d6490(0xe3)]>MAX_STAGES&&_0x50158e[_0x1d6490(0x160)](createIssue(_0x1d6490(0x152),'stages',_0x1d6490(0x10e),'Journey\x20has\x20'+_0x573d48[_0x1d6490(0xe3)]+_0x1d6490(0x13a)+MAX_STAGES,_0x64e70b)),_0x50158e;}function validateStageStructure(_0x2e87c9,_0x2da397,_0x5be2df,_0x59f70b){const _0x3e7210=a136_0x13a2,_0x4b859d=[],_0x1c09e4=_0x3e7210(0x164)+_0x2da397+']';_0x2da397===0x0&&!_0x2e87c9[_0x3e7210(0xfa)]&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x152),_0x1c09e4+_0x3e7210(0x146),_0x3e7210(0x124),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x59f70b,_0x1c09e4));const _0x5d0fc4=_0x2da397===_0x5be2df-0x1;!_0x5d0fc4&&!_0x2e87c9[_0x3e7210(0x113)]&&_0x4b859d['push'](createIssue(_0x3e7210(0x152),_0x1c09e4+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x2e87c9[_0x3e7210(0x135)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x59f70b,_0x1c09e4));(!_0x2e87c9['exit_criteria']||_0x2e87c9[_0x3e7210(0xce)]['length']===0x0)&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+'.exit_criteria',_0x3e7210(0xbc),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+_0x3e7210(0xec),_0x59f70b,_0x1c09e4));const _0x41dfdd=_0x2e87c9[_0x3e7210(0xfc)]?.[_0x3e7210(0xe3)]??0x0;if(_0x41dfdd===0x0)_0x4b859d[_0x3e7210(0x160)](createIssue('error',_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0xc6),'Stage\x20\x27'+_0x2e87c9['name']+_0x3e7210(0xf6),_0x59f70b,_0x1c09e4+_0x3e7210(0x12f)));else{if(_0x41dfdd===0x1)_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0xc6),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+_0x3e7210(0xe7),_0x59f70b,_0x1c09e4+_0x3e7210(0x12f)));else _0x41dfdd<=0x3&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0x170),_0x3e7210(0x171)+_0x2e87c9['name']+_0x3e7210(0x163)+_0x41dfdd+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x59f70b,_0x1c09e4+'.steps'));}return _0x4b859d;}function validateStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63){const _0x5118ee=a136_0x13a2,_0x3f962f=[];if(_0x28c5fd[_0x5118ee(0x168)]===_0x5118ee(0x102))return _0x28c5fd['next']&&_0x3f962f[_0x5118ee(0x160)](createIssue('error',_0x38547c+_0x5118ee(0xea),_0x5118ee(0x137),'End\x20step\x20\x27'+_0x28c5fd['name']+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x4c4acc)),'with'in _0x28c5fd&&_0x28c5fd[_0x5118ee(0x10a)]!==undefined&&_0x3f962f['push'](createIssue(_0x5118ee(0x152),_0x38547c+'.with',_0x5118ee(0x137),'End\x20step\x20\x27'+_0x28c5fd[_0x5118ee(0x135)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x4c4acc)),_0x3f962f;_0x28c5fd[_0x5118ee(0xc5)]&&(_0x4c4acc[_0x5118ee(0x11e)]&&!_0x4c4acc[_0x5118ee(0x11e)]['has'](_0x28c5fd[_0x5118ee(0xc5)])&&_0x3f962f[_0x5118ee(0x160)](createIssue(_0x5118ee(0x152),_0x38547c+_0x5118ee(0xea),_0x5118ee(0xd1),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x28c5fd[_0x5118ee(0xc5)]+'\x27',_0x4c4acc)));switch(_0x28c5fd['type']){case'wait':_0x3f962f[_0x5118ee(0x160)](...validateWaitStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case _0x5118ee(0x11b):_0x3f962f['push'](...validateActivationStep(_0x28c5fd,_0x38547c,_0x4c4acc));break;case _0x5118ee(0x133):_0x3f962f[_0x5118ee(0x160)](...validateDecisionPointStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case'ab_test':_0x3f962f['push'](...validateAbTestStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case _0x5118ee(0xd0):_0x3f962f[_0x5118ee(0x160)](...validateJumpStep(_0x28c5fd,_0x38547c,_0x4c4acc));break;}return _0x3f962f;}function validateWaitStep(_0xf312de,_0x20b7a8,_0x247fea,_0x4933e1){const _0x4ecbd3=a136_0x13a2,_0x15b37c=[];if(!_0xf312de['with'])return _0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0xee),_0x4ecbd3(0x159),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x247fea,_0x20b7a8)),_0x15b37c;if(_0xf312de[_0x4ecbd3(0x10a)][_0x4ecbd3(0x140)]){const _0x442a79=_0xf312de['with'][_0x4ecbd3(0x140)];if(_0x442a79[_0x4ecbd3(0xcb)]){_0x247fea[_0x4ecbd3(0xcd)]?.[_0x4ecbd3(0x108)](_0x442a79[_0x4ecbd3(0xcb)]);!_0x442a79[_0x4ecbd3(0xcb)][_0x4ecbd3(0x11f)](_0x4ecbd3(0x147))&&(_0x247fea[_0x4ecbd3(0xbf)]&&!_0x247fea[_0x4ecbd3(0xbf)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0xcb)])&&_0x15b37c['push'](createIssue('error',_0x20b7a8+_0x4ecbd3(0xd9),_0x4ecbd3(0xf2),_0x4ecbd3(0x100)+_0x442a79[_0x4ecbd3(0xcb)]+_0x4ecbd3(0x132),_0x247fea)));_0x442a79[_0x4ecbd3(0xc5)]&&_0x247fea[_0x4ecbd3(0x11e)]&&!_0x247fea[_0x4ecbd3(0x11e)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0xc5)])&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0x15b),_0x4ecbd3(0xd1),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x442a79['next']+'\x27',_0x247fea));_0x442a79['timeout']?.[_0x4ecbd3(0xc5)]&&_0x247fea[_0x4ecbd3(0x11e)]&&!_0x247fea[_0x4ecbd3(0x11e)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0x151)][_0x4ecbd3(0xc5)])&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0x156),_0x4ecbd3(0xd1),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x442a79[_0x4ecbd3(0x151)]['next']+'\x27',_0x247fea));const _0x2f8db7=_0x442a79[_0x4ecbd3(0xc5)]||_0xf312de['next'],_0x3be367=_0x442a79[_0x4ecbd3(0x151)]?.[_0x4ecbd3(0xc5)]||_0xf312de['next'];if(_0x2f8db7){const _0x2cadab=_0x4933e1[_0x4ecbd3(0xe2)](_0x2f8db7);_0x2cadab?.[_0x4ecbd3(0x168)]===_0x4ecbd3(0xbd)&&_0x15b37c[_0x4ecbd3(0x160)](createIssue('warning',_0x20b7a8+'.with.condition.next',_0x4ecbd3(0x161),_0x4ecbd3(0x14f)+_0x2f8db7+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x247fea,_0x20b7a8+_0x4ecbd3(0xd3)));}if(_0x3be367){const _0xbcf0d1=_0x4933e1[_0x4ecbd3(0xe2)](_0x3be367);_0xbcf0d1?.['type']==='merge'&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x172),_0x20b7a8+_0x4ecbd3(0x156),_0x4ecbd3(0x161),_0x4ecbd3(0x120)+_0x3be367+_0x4ecbd3(0x12a),_0x247fea,_0x20b7a8+'.with.condition.timeout'));}}}return _0x15b37c;}function validateActivationStep(_0x1ece99,_0x3d3af5,_0x56d1ff){const _0x39b961=a136_0x13a2,_0x520480=[];if(!_0x1ece99['with']?.[_0x39b961(0x11b)])return _0x520480[_0x39b961(0x160)](createIssue(_0x39b961(0x152),_0x3d3af5+_0x39b961(0xe5),'MISSING_ACTIVATION_REF',_0x39b961(0xdf),_0x56d1ff,_0x3d3af5)),_0x520480;const _0x3354ae=_0x1ece99[_0x39b961(0x10a)][_0x39b961(0x11b)];return _0x56d1ff['activationKeys']&&!_0x3354ae[_0x39b961(0x11f)](_0x39b961(0x147))&&(!_0x56d1ff[_0x39b961(0x14d)][_0x39b961(0x169)](_0x3354ae)&&_0x520480[_0x39b961(0x160)](createIssue(_0x39b961(0x152),_0x3d3af5+_0x39b961(0xe5),_0x39b961(0x149),_0x39b961(0x167)+_0x3354ae+_0x39b961(0x104),_0x56d1ff))),_0x520480;}function validateDecisionPointStep(_0x887287,_0x438739,_0x2ce5d5,_0x25e679){const _0x4549ab=a136_0x13a2,_0x2cfd42=[];if(!_0x887287['with']?.[_0x4549ab(0x117)]||_0x887287[_0x4549ab(0x10a)]['branches'][_0x4549ab(0xe3)]===0x0)return _0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x438739+_0x4549ab(0x118),_0x4549ab(0xed),_0x4549ab(0x10c),_0x2ce5d5,_0x438739)),_0x2cfd42;for(let _0x4572a7=0x0;_0x4572a7<_0x887287[_0x4549ab(0x10a)]['branches'][_0x4549ab(0xe3)];_0x4572a7++){const _0x374498=_0x887287['with']['branches'][_0x4572a7],_0x4013f9=_0x438739+_0x4549ab(0x12e)+_0x4572a7+']';_0x374498[_0x4549ab(0xcb)]&&!_0x374498['excluded']&&(_0x2ce5d5['referencedSegments']?.[_0x4549ab(0x108)](_0x374498['segment']),!_0x374498['segment'][_0x4549ab(0x11f)](_0x4549ab(0x147))&&(_0x2ce5d5[_0x4549ab(0xbf)]&&!_0x2ce5d5[_0x4549ab(0xbf)][_0x4549ab(0x169)](_0x374498[_0x4549ab(0xcb)])&&_0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x4013f9+'.segment',_0x4549ab(0xf2),_0x4549ab(0x13b)+_0x374498[_0x4549ab(0xcb)]+'\x27',_0x2ce5d5))));_0x374498['next']&&_0x2ce5d5['stepNames']&&!_0x2ce5d5[_0x4549ab(0x11e)][_0x4549ab(0x169)](_0x374498[_0x4549ab(0xc5)])&&_0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x4013f9+_0x4549ab(0xea),_0x4549ab(0xd1),_0x4549ab(0xba)+_0x374498[_0x4549ab(0xc5)]+'\x27',_0x2ce5d5));if(_0x374498[_0x4549ab(0xc5)]){const _0x46fe62=_0x25e679['get'](_0x374498[_0x4549ab(0xc5)]);_0x46fe62?.[_0x4549ab(0x168)]===_0x4549ab(0xbd)&&_0x2cfd42[_0x4549ab(0x160)](createIssue('warning',_0x4013f9+_0x4549ab(0xea),_0x4549ab(0x161),_0x4549ab(0x116)+_0x374498[_0x4549ab(0x135)]+_0x4549ab(0xe6)+_0x374498[_0x4549ab(0xc5)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x2ce5d5));}}return _0x2cfd42;}function validateAbTestStep(_0x1e432a,_0x429a00,_0x21e63f,_0x4fb5fa){const _0x35f92b=a136_0x13a2,_0x191a4f=[];if(!_0x1e432a[_0x35f92b(0x10a)]?.[_0x35f92b(0x13d)]||_0x1e432a[_0x35f92b(0x10a)][_0x35f92b(0x13d)][_0x35f92b(0xe3)]===0x0)return _0x191a4f[_0x35f92b(0x160)](createIssue(_0x35f92b(0x152),_0x429a00+_0x35f92b(0x148),_0x35f92b(0xed),_0x35f92b(0x162),_0x21e63f,_0x429a00)),_0x191a4f;const _0x1ba5dc=_0x1e432a[_0x35f92b(0x10a)]['variants'][_0x35f92b(0x112)]((_0x19a664,_0x936c04)=>_0x19a664+(_0x936c04[_0x35f92b(0x14a)]||0x0),0x0);Math['abs'](_0x1ba5dc-0x64)>0.01&&_0x191a4f[_0x35f92b(0x160)](createIssue('error',_0x429a00+_0x35f92b(0x148),'INVALID_AB_TEST_PERCENTAGES',_0x35f92b(0xf7)+_0x1ba5dc+'%)',_0x21e63f));for(let _0x142ff6=0x0;_0x142ff6<_0x1e432a['with']['variants']['length'];_0x142ff6++){const _0x26e044=_0x1e432a[_0x35f92b(0x10a)]['variants'][_0x142ff6],_0x511fa1=_0x429a00+'.with.variants['+_0x142ff6+']';_0x26e044[_0x35f92b(0xc5)]&&_0x21e63f[_0x35f92b(0x11e)]&&!_0x21e63f[_0x35f92b(0x11e)][_0x35f92b(0x169)](_0x26e044['next'])&&_0x191a4f['push'](createIssue(_0x35f92b(0x152),_0x511fa1+_0x35f92b(0xea),_0x35f92b(0xd1),_0x35f92b(0xef)+_0x26e044[_0x35f92b(0xc5)]+'\x27',_0x21e63f));if(_0x26e044[_0x35f92b(0xc5)]){const _0x3eb2ad=_0x4fb5fa[_0x35f92b(0xe2)](_0x26e044[_0x35f92b(0xc5)]);_0x3eb2ad?.['type']===_0x35f92b(0xbd)&&_0x191a4f[_0x35f92b(0x160)](createIssue(_0x35f92b(0x172),_0x511fa1+_0x35f92b(0xea),'BRANCH_DIRECTLY_TO_MERGE',_0x35f92b(0xe4)+_0x26e044[_0x35f92b(0x135)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x26e044['next']+_0x35f92b(0xc7),_0x21e63f));}}return _0x191a4f;}function validateJumpStep(_0x253b8f,_0x51c842,_0x6a8777){const _0x53bd73=a136_0x13a2,_0x5f5240=[];if(!_0x253b8f[_0x53bd73(0x10a)]?.[_0x53bd73(0x114)])return _0x5f5240[_0x53bd73(0x160)](createIssue(_0x53bd73(0x152),_0x51c842+_0x53bd73(0x127),_0x53bd73(0x143),_0x53bd73(0xc2),_0x6a8777,_0x51c842)),_0x5f5240;return(!_0x253b8f[_0x53bd73(0x10a)][_0x53bd73(0x114)][_0x53bd73(0xfb)]||!_0x253b8f['with'][_0x53bd73(0x114)][_0x53bd73(0xc3)])&&_0x5f5240[_0x53bd73(0x160)](createIssue('error',_0x51c842+_0x53bd73(0x127),_0x53bd73(0x143),_0x53bd73(0xc4),_0x6a8777)),_0x5f5240;}function buildConvergenceMap(_0x586a64){const _0x185d2f=a136_0x13a2,_0x8b091b=new Map();function _0x4da082(_0x3b80f9,_0x512b1f){const _0x52ad36=a136_0x13a2,_0x2e51ff=_0x8b091b[_0x52ad36(0xe2)](_0x3b80f9)||[];_0x2e51ff[_0x52ad36(0x160)](_0x512b1f),_0x8b091b[_0x52ad36(0x16a)](_0x3b80f9,_0x2e51ff);}for(const _0x1c090e of _0x586a64){_0x1c090e[_0x185d2f(0xc5)]&&_0x4da082(_0x1c090e['next'],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0xbb)+_0x1c090e[_0x185d2f(0x135)]+'\x27'});if(_0x1c090e['type']===_0x185d2f(0x133)&&_0x1c090e[_0x185d2f(0x10a)]?.['branches'])for(const _0x3aee88 of _0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x117)]){_0x3aee88[_0x185d2f(0xc5)]&&_0x4da082(_0x3aee88[_0x185d2f(0xc5)],{'stepName':_0x1c090e[_0x185d2f(0x135)],'description':_0x185d2f(0x173)+_0x3aee88[_0x185d2f(0x135)]+_0x185d2f(0xd6)+_0x1c090e['name']+'\x27'});}if(_0x1c090e[_0x185d2f(0x168)]===_0x185d2f(0xc1)&&_0x1c090e[_0x185d2f(0x10a)]?.[_0x185d2f(0x13d)])for(const _0x82edb2 of _0x1c090e['with'][_0x185d2f(0x13d)]){_0x82edb2['next']&&_0x4da082(_0x82edb2[_0x185d2f(0xc5)],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0xe9)+_0x82edb2[_0x185d2f(0x135)]+_0x185d2f(0xd6)+_0x1c090e['name']+'\x27'});}_0x1c090e['type']===_0x185d2f(0x155)&&_0x1c090e[_0x185d2f(0x10a)]?.[_0x185d2f(0x140)]&&(_0x1c090e['with'][_0x185d2f(0x140)]['next']&&_0x4da082(_0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x140)][_0x185d2f(0xc5)],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0x10b)+_0x1c090e[_0x185d2f(0x135)]+'\x27'}),_0x1c090e['with'][_0x185d2f(0x140)][_0x185d2f(0x151)]?.[_0x185d2f(0xc5)]&&_0x4da082(_0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x140)]['timeout'][_0x185d2f(0xc5)],{'stepName':_0x1c090e[_0x185d2f(0x135)],'description':_0x185d2f(0x13f)+_0x1c090e[_0x185d2f(0x135)]+'\x27'}));}return _0x8b091b;}function validateFlowControl(_0x8c2260,_0xb62833,_0x3457be){const _0x1ec21e=a136_0x13a2,_0x1d1109=[],_0x452419=_0x1ec21e(0x164)+_0xb62833+']',_0x3e7e1d=_0x8c2260[_0x1ec21e(0xfc)]||[];if(_0x3e7e1d[_0x1ec21e(0xe3)]===0x0)return _0x1d1109;const _0x4be2ce=new Map();for(const _0x3c22ab of _0x3e7e1d){_0x3c22ab[_0x1ec21e(0x135)]&&_0x4be2ce[_0x1ec21e(0x16a)](_0x3c22ab[_0x1ec21e(0x135)],_0x3c22ab);}const _0x302b6a=buildConvergenceMap(_0x3e7e1d),_0x1d103d=_0x3e7e1d[_0x1ec21e(0x153)](_0x50554b=>_0x50554b['type']===_0x1ec21e(0x102));!_0x1d103d&&_0x1d1109[_0x1ec21e(0x160)](createIssue(_0x1ec21e(0x152),_0x452419+'.steps',_0x1ec21e(0x109),_0x1ec21e(0x171)+_0x8c2260[_0x1ec21e(0x135)]+'\x27\x20has\x20no\x20end\x20step',_0x3457be));for(const [_0x3f24ad,_0x275133]of _0x302b6a){const _0x111a9a=_0x4be2ce[_0x1ec21e(0xe2)](_0x3f24ad);if(!_0x111a9a)continue;if(_0x275133[_0x1ec21e(0xe3)]>0x1&&_0x111a9a[_0x1ec21e(0x168)]!==_0x1ec21e(0xbd)){const _0x5ce961=_0x275133[_0x1ec21e(0x126)](_0x12c0d5=>_0x12c0d5['description'])[_0x1ec21e(0xf8)](',\x20');_0x1d1109[_0x1ec21e(0x160)](createIssue('error',_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x103),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x3f24ad+'\x27\x20(from:\x20'+_0x5ce961+_0x1ec21e(0xd5),_0x3457be));}_0x275133[_0x1ec21e(0xe3)]===0x1&&_0x111a9a[_0x1ec21e(0x168)]===_0x1ec21e(0xbd)&&_0x1d1109[_0x1ec21e(0x160)](createIssue('warning',_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x16e),'Merge\x20step\x20\x27'+_0x3f24ad+_0x1ec21e(0x139)+_0x275133[0x0][_0x1ec21e(0x106)]+_0x1ec21e(0xf5),_0x3457be));}for(const _0x4f9162 of _0x3e7e1d){if(_0x4f9162[_0x1ec21e(0x168)]==='merge'&&_0x4f9162['next']){const _0x375816=_0x4be2ce[_0x1ec21e(0xe2)](_0x4f9162[_0x1ec21e(0xc5)]);_0x375816?.['type']==='merge'&&_0x1d1109[_0x1ec21e(0x160)](createIssue(_0x1ec21e(0x152),_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x14c),_0x1ec21e(0x11c)+_0x4f9162[_0x1ec21e(0x135)]+_0x1ec21e(0x16d)+_0x4f9162[_0x1ec21e(0xc5)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x3457be));}}return _0x1d1109;}function validateCriteria(_0x1f3c73,_0x502daf,_0x397b52){const _0x47bb0f=a136_0x13a2,_0x341c6f=[];return _0x1f3c73[_0x47bb0f(0xcb)]&&(_0x397b52[_0x47bb0f(0xcd)]?.[_0x47bb0f(0x108)](_0x1f3c73['segment']),!_0x1f3c73['segment'][_0x47bb0f(0x11f)](_0x47bb0f(0x147))&&(_0x397b52[_0x47bb0f(0xbf)]&&!_0x397b52['embeddedSegments'][_0x47bb0f(0x169)](_0x1f3c73[_0x47bb0f(0xcb)])&&_0x341c6f[_0x47bb0f(0x160)](createIssue(_0x47bb0f(0x152),_0x502daf+_0x47bb0f(0x119),'MISSING_SEGMENT_REFERENCE',_0x47bb0f(0xcf)+_0x1f3c73[_0x47bb0f(0xcb)]+'\x27',_0x397b52)))),_0x341c6f;}function a136_0x12d4(){const _0x37e600=['end','CONVERGENCE_WITHOUT_MERGE','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','7IbrLmz','description','version','add','MISSING_END_STEP','with','condition\x20of\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','journeys','TOO_MANY_STAGES','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','journeys,\x20stages,\x20or\x20versions','.exit_criteria[','reduce','milestone','target','7722smhjAI','Decision\x20branch\x20\x27','branches','.with.branches','.segment','1869yzaOhK','activation','Merge\x20step\x20\x27','407556DliRaf','stepNames','startsWith','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','includes','\x20with\x20latest:\x20true','DUPLICATE_STEP_NAME','MISSING_ENTRY_CRITERIA','endsWith','map','.with.target','versions','Duplicate\x20step\x20name\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','excluded_','every','DUPLICATE_LATEST','.with.branches[','.steps','ACTIVATION_SCHEMA_ERROR','segments.','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','decision_point','path','name','code','END_STEP_HAS_NEXT_OR_WITH','Embedded\x20segment\x20\x27','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','\x20stages\x20but\x20maximum\x20is\x20','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','variants','values','timeout\x20of\x20\x27','condition','entries','message','INVALID_JUMP_TARGET','911124DUbnrT','goalIsInherited','.entry_criteria','ref:','.with.variants','MISSING_ACTIVATION_DEFINITION','percentage','skipSchema','MERGE_TO_MERGE_CHAIN','activationKeys','replace','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','state','timeout','error','some','\x20(across\x20','wait','.with.condition.timeout.next','sort','goal','MISSING_WAIT_PARAMS','596850wLIzID','.with.condition.next','stages','1148504qZOqav','.rule','indices','push','BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x27\x20has\x20only\x20','stages[','2zLvmyA','trim','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','type','has','set','keys','rule','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','SINGLE_INPUT_MERGE','size','FEW_STEPS','Stage\x20\x27','warning','branch\x20\x27','segments','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','step\x20\x27','MISSING_EXIT_CRITERIA','merge','\x20versions)','embeddedSegments','MISSING_GOAL','ab_test','Jump\x20step\x20requires\x20a\x20target','stage','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','next','INSUFFICIENT_STEPS','\x27\x20with\x20no\x20action\x20in\x20between','.steps[','Journey\x20can\x20have\x20at\x20most\x20one\x20','versions[','segment','journeys[','referencedSegments','exit_criteria','Criteria\x20references\x20undefined\x20segment\x20\x27','jump','INVALID_NEXT_REFERENCE','success','.with.condition','match',').\x20Use\x20a\x20merge\x20step.','\x27\x20of\x20\x27','190522PGXEKu','document','.with.condition.segment','filter','activations','UNUSED_EMBEDDED_SEGMENT','692TmRAHt','JOURNEY_SCHEMA_ERROR','Activation\x20step\x20requires\x20an\x20activation\x20reference','launched','journey\x20entry','get','length','A/B\x20test\x20variant\x20\x27','.with.activation','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.type','variant\x20\x27','.next','6eWLazz','\x27\x20has\x20no\x20exit_criteria\x20defined','MISSING_CONDITIONS','.with','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','.name','data','MISSING_SEGMENT_REFERENCE','\x27\x20(first\x20defined\x20at\x20steps[','40olttiy',').\x20Merge\x20is\x20unnecessary.','\x27\x20has\x20no\x20steps','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','join','level','entry_criteria','journey','steps','latest','Journey\x20has\x20no\x20goal\x20defined','source','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','MISSING_NAME'];a136_0x12d4=function(){return _0x37e600;};return a136_0x12d4();}function validateEmbeddedSegment(_0x953c7a,_0x572493,_0x1a9d9c){const _0x39ba14=a136_0x13a2,_0x1da567=[];return _0x953c7a['rule']&&_0x1da567[_0x39ba14(0x160)](...validateRuleDef(_0x953c7a[_0x39ba14(0x16c)],_0x572493+_0x39ba14(0x15e),_0x1a9d9c)),_0x1da567;}function validateStage(_0x47919d,_0x57e907,_0x44dc8f,_0x1160da){const _0x57367a=a136_0x13a2,_0x3c1e2c=[],_0x476b20='stages['+_0x57e907+']',_0x308d19=new Map(),_0x2f7487=new Map();if(_0x47919d['steps']){for(let _0x488717=0x0;_0x488717<_0x47919d[_0x57367a(0xfc)]['length'];_0x488717++){const _0x26bc94=_0x47919d[_0x57367a(0xfc)][_0x488717];_0x26bc94[_0x57367a(0x135)]&&_0x308d19['set'](_0x26bc94[_0x57367a(0x135)],_0x26bc94);}for(let _0x11847f=0x0;_0x11847f<_0x47919d[_0x57367a(0xfc)]['length'];_0x11847f++){const _0x599d43=_0x47919d[_0x57367a(0xfc)][_0x11847f],_0x3b26c1=_0x476b20+_0x57367a(0xc8)+_0x11847f+']';if(_0x599d43['name']){if(_0x2f7487[_0x57367a(0x169)](_0x599d43[_0x57367a(0x135)])){const _0x1c8f52=_0x2f7487['get'](_0x599d43['name']);_0x3c1e2c['push'](createIssue(_0x57367a(0x152),_0x3b26c1+_0x57367a(0xf0),_0x57367a(0x123),_0x57367a(0x129)+_0x599d43[_0x57367a(0x135)]+_0x57367a(0xf3)+_0x1c8f52+'])',_0x1160da));}else _0x2f7487['set'](_0x599d43[_0x57367a(0x135)],_0x11847f);}_0x3c1e2c['push'](...validateStep(_0x599d43,_0x3b26c1,_0x1160da,_0x308d19));}}_0x47919d[_0x57367a(0xfa)]&&_0x3c1e2c['push'](...validateCriteria(_0x47919d[_0x57367a(0xfa)],_0x476b20+'.entry_criteria',_0x1160da));if(_0x47919d[_0x57367a(0xce)])for(let _0x3d41a3=0x0;_0x3d41a3<_0x47919d[_0x57367a(0xce)][_0x57367a(0xe3)];_0x3d41a3++){_0x3c1e2c['push'](...validateCriteria(_0x47919d['exit_criteria'][_0x3d41a3],_0x476b20+_0x57367a(0x111)+_0x3d41a3+']',_0x1160da));}return _0x47919d[_0x57367a(0x113)]&&_0x3c1e2c[_0x57367a(0x160)](...validateCriteria(_0x47919d['milestone'],_0x476b20+'.milestone',_0x1160da)),_0x3c1e2c[_0x57367a(0x160)](...validateStageStructure(_0x47919d,_0x57e907,_0x44dc8f,_0x1160da)),_0x3c1e2c[_0x57367a(0x160)](...validateFlowControl(_0x47919d,_0x57e907,_0x1160da)),_0x3c1e2c;}function validateStagesForVersion(_0x30abda,_0x54274a,_0x2356c8,_0x2ce700,_0x437449,_0xcc5117,_0x488799){const _0x329119=a136_0x13a2;if(_0x30abda['length']===0x0){_0x437449['push']({'level':_0x329119(0x152),'path':_0x2ce700+'stages','code':'MISSING_STAGES','message':_0x329119(0x13c),'location':getLocationFromPath(_0x2356c8[_0x329119(0xd8)],_0x2356c8[_0x329119(0xff)],[_0x329119(0x15c)])});return;}const _0x1a8a61=new Set();for(const _0x4a2fe8 of _0x30abda){if(_0x4a2fe8[_0x329119(0xfc)])for(const _0x1d8d91 of _0x4a2fe8[_0x329119(0xfc)]){_0x1d8d91[_0x329119(0x135)]&&_0x1a8a61['add'](_0x1d8d91[_0x329119(0x135)]);}}const _0x2f149c={..._0x2356c8,'stepNames':_0x1a8a61},_0x47c2bb=validateVersionStructure(_0x30abda,_0x2f149c);for(const _0x32acf0 of _0x47c2bb){const _0x3f882d=_0x2ce700?{..._0x32acf0,'path':''+_0x2ce700+_0x32acf0['path']}:_0x32acf0;if(_0x3f882d[_0x329119(0xf9)]===_0x329119(0x152))_0x437449['push'](_0x3f882d);else _0xcc5117[_0x329119(0x160)](_0x3f882d);}for(let _0x21ea69=0x0;_0x21ea69<_0x30abda['length'];_0x21ea69++){const _0x49f1bc=validateStage(_0x30abda[_0x21ea69],_0x21ea69,_0x30abda[_0x329119(0xe3)],_0x2f149c);for(const _0x15a464 of _0x49f1bc){const _0x15a160=_0x2ce700?{..._0x15a464,'path':''+_0x2ce700+_0x15a464[_0x329119(0x134)]}:_0x15a464;if(_0x15a160[_0x329119(0xf9)]===_0x329119(0x152))_0x437449[_0x329119(0x160)](_0x15a160);else _0xcc5117[_0x329119(0x160)](_0x15a160);}}if(_0x54274a[_0x329119(0x158)]){const _0x123cc6=_0x488799?.[_0x329119(0x145)]?'goal':_0x2ce700+_0x329119(0x158),_0x5cc9b3=validateCriteria(_0x54274a[_0x329119(0x158)],_0x123cc6,_0x2f149c);for(const _0x3e226d of _0x5cc9b3){if(_0x3e226d[_0x329119(0xf9)]===_0x329119(0x152))_0x437449[_0x329119(0x160)](_0x3e226d);else _0xcc5117['push'](_0x3e226d);}}}function extractVersionIndex(_0x4a7f07){const _0x40ec26=a136_0x13a2,_0x411926=_0x4a7f07[_0x40ec26(0xd4)](/^journeys\[(\d+)\]\./);return _0x411926?_0x411926[0x1]:undefined;}function deduplicateAcrossVersions(_0x214b6a){const _0x268e7b=a136_0x13a2,_0x1089d5=new Map();for(let _0xfff140=0x0;_0xfff140<_0x214b6a[_0x268e7b(0xe3)];_0xfff140++){const _0x409344=_0x214b6a[_0xfff140][_0x268e7b(0x136)]+':'+_0x214b6a[_0xfff140]['message'],_0x417020=extractVersionIndex(_0x214b6a[_0xfff140][_0x268e7b(0x134)]),_0x320202=_0x1089d5[_0x268e7b(0xe2)](_0x409344);if(_0x320202){_0x320202[_0x268e7b(0x15f)][_0x268e7b(0x160)](_0xfff140);if(_0x417020)_0x320202[_0x268e7b(0x128)][_0x268e7b(0x108)](_0x417020);}else _0x1089d5[_0x268e7b(0x16a)](_0x409344,{'indices':[_0xfff140],'versions':new Set(_0x417020?[_0x417020]:[])});}const _0x33d665=new Set();for(const {indices:_0x574317,versions:_0x438b4d}of _0x1089d5[_0x268e7b(0x13e)]()){if(_0x438b4d['size']<=0x1)continue;const _0x401f57=_0x214b6a[_0x574317[0x0]];_0x401f57[_0x268e7b(0x134)]=_0x401f57[_0x268e7b(0x134)][_0x268e7b(0x14e)](/^journeys\[\d+\]\./,''),_0x401f57['message']=_0x401f57[_0x268e7b(0x142)]+_0x268e7b(0x154)+_0x438b4d[_0x268e7b(0x16f)]+_0x268e7b(0xbe);for(let _0x41b064=0x1;_0x41b064<_0x574317[_0x268e7b(0xe3)];_0x41b064++){_0x33d665[_0x268e7b(0x108)](_0x574317[_0x41b064]);}}const _0x4fd4be=[..._0x33d665][_0x268e7b(0x157)]((_0x183ede,_0x428d35)=>_0x428d35-_0x183ede);for(const _0x578f89 of _0x4fd4be){_0x214b6a['splice'](_0x578f89,0x1);}}export function validateJourneyDef(_0x145096,_0x3300f6={},_0x1c804f={}){const _0x1db158=a136_0x13a2;if(_0x1c804f[_0x1db158(0x14b)])return runJourneySemanticChecks(_0x145096,_0x3300f6);const _0x1fed16=JourneyDefSchema['safeParse'](_0x145096);if(_0x1fed16[_0x1db158(0xd2)])return runJourneySemanticChecks(_0x1fed16[_0x1db158(0xf1)],_0x3300f6);return zodErrorsToJourneyValidationResult(_0x1fed16[_0x1db158(0x152)],_0x3300f6);}function zodErrorsToJourneyValidationResult(_0x3347a8,_0x182c33){const _0x24c353=flattenZodIssues(_0x3347a8['issues']),_0x172fbd=_0x24c353['map'](_0x28b8c9=>{const _0x722a1a=a136_0x13a2,_0x27af04=formatZodPath(_0x28b8c9[_0x722a1a(0x134)]),_0x433587=mapJourneyZodIssueToCode(_0x28b8c9,_0x27af04),_0x2742ef=getLocationFromPath(_0x182c33['document'],_0x182c33[_0x722a1a(0xff)],_0x28b8c9[_0x722a1a(0x134)][_0x722a1a(0x126)](_0x46a7f6=>typeof _0x46a7f6==='symbol'?String(_0x46a7f6):_0x46a7f6));return{'level':_0x722a1a(0x152),'path':_0x27af04,'code':_0x433587,'message':_0x28b8c9[_0x722a1a(0x142)],..._0x2742ef&&{'location':_0x2742ef}};});return{'valid':![],'errors':_0x172fbd,'warnings':[]};}function mapJourneyZodIssueToCode(_0x50e3bf,_0x4b5027){const _0x5856f5=a136_0x13a2;if(_0x4b5027===_0x5856f5(0x135))return _0x5856f5(0x101);if(_0x4b5027[_0x5856f5(0x125)](_0x5856f5(0xe8))&&_0x4b5027[_0x5856f5(0x121)](_0x5856f5(0xfc)))return _0x5856f5(0xde);if(_0x4b5027===_0x5856f5(0x15c)||_0x4b5027[_0x5856f5(0x125)]('.stages'))return'MISSING_STAGES';if(_0x4b5027===''&&_0x50e3bf[_0x5856f5(0x142)]['includes'](_0x5856f5(0x110)))return'MISSING_STAGES';if(_0x4b5027['includes'](_0x5856f5(0x11b)))return _0x5856f5(0x130);return _0x5856f5(0xde);}function runJourneySemanticChecks(_0x24e0f0,_0x3fe184){const _0xb30f3e=a136_0x13a2,_0x1dad6e=[],_0x31604e=[];(!_0x24e0f0['name']||_0x24e0f0['name'][_0xb30f3e(0x166)]()==='')&&_0x1dad6e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x152),'path':_0xb30f3e(0x135),'code':_0xb30f3e(0x101),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],[_0xb30f3e(0x135)])});const _0x2b3963=new Set();if(_0x24e0f0[_0xb30f3e(0xb9)])for(const _0x3d630d of Object[_0xb30f3e(0x16b)](_0x24e0f0['segments'])){_0x2b3963[_0xb30f3e(0x108)](_0x3d630d);}const _0x3e4f97=new Set();if(_0x24e0f0[_0xb30f3e(0xdb)])for(const _0x2353fe of Object[_0xb30f3e(0x16b)](_0x24e0f0['activations'])){_0x3e4f97[_0xb30f3e(0x108)](_0x2353fe);}const _0x3c29c1=new Set(),_0x2ccb08={..._0x3fe184,'embeddedSegments':_0x2b3963,'referencedSegments':_0x3c29c1,'activationKeys':_0x3e4f97[_0xb30f3e(0x16f)]>0x0?_0x3e4f97:undefined};if(_0x24e0f0[_0xb30f3e(0xb9)])for(const [_0x11b99e,_0x24245e]of Object[_0xb30f3e(0x141)](_0x24e0f0[_0xb30f3e(0xb9)])){const _0x44ba2a=validateEmbeddedSegment(_0x24245e,_0xb30f3e(0x131)+_0x11b99e,_0x2ccb08);for(const _0x104107 of _0x44ba2a){if(_0x104107['level']===_0xb30f3e(0x152))_0x1dad6e[_0xb30f3e(0x160)](_0x104107);else _0x31604e[_0xb30f3e(0x160)](_0x104107);}}const _0x3f7c52=!!_0x24e0f0['goal'],_0x3af83d=_0x24e0f0[_0xb30f3e(0x10d)]?.[_0xb30f3e(0x12c)](_0x266764=>!!_0x266764['goal'])??![];!_0x3f7c52&&!_0x3af83d&&_0x31604e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x172),'path':_0xb30f3e(0x158),'code':_0xb30f3e(0xc0),'message':_0xb30f3e(0xfe),'location':getLocationFromPath(_0x3fe184['document'],_0x3fe184['source'],['goal'])});const _0x31cb1e=_0x24e0f0[_0xb30f3e(0x10d)]??_0x24e0f0[_0xb30f3e(0x128)];if(_0x31cb1e&&_0x31cb1e[_0xb30f3e(0xda)](_0x5a77f8=>_0x5a77f8[_0xb30f3e(0xfd)]===!![])['length']>0x1){const _0x17abff=_0x24e0f0[_0xb30f3e(0x10d)]?_0xb30f3e(0x10d):_0xb30f3e(0x128);_0x1dad6e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x152),'path':_0x17abff,'code':_0xb30f3e(0x12d),'message':_0xb30f3e(0xc9)+(_0x17abff===_0xb30f3e(0x10d)?_0xb30f3e(0xe1):_0xb30f3e(0x107))+_0xb30f3e(0x122),'location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],[_0x17abff])});}if(_0x24e0f0[_0xb30f3e(0x10d)]&&_0x24e0f0['journeys'][_0xb30f3e(0xe3)]>0x0)for(let _0x351a12=0x0;_0x351a12<_0x24e0f0['journeys'][_0xb30f3e(0xe3)];_0x351a12++){const _0x58db71=_0x24e0f0[_0xb30f3e(0x10d)][_0x351a12];if(_0x24e0f0[_0xb30f3e(0x10d)]['length']>0x1&&_0x58db71['state']===_0xb30f3e(0xe0))continue;const _0x570bcb=_0x58db71[_0xb30f3e(0x15c)]||[],_0x48babe=_0xb30f3e(0xcc)+_0x351a12+'].',_0x3b839b=!!_0x58db71[_0xb30f3e(0x158)],_0x47a7c0=_0x3b839b?{..._0x24e0f0,'goal':_0x58db71[_0xb30f3e(0x158)]}:_0x24e0f0;validateStagesForVersion(_0x570bcb,_0x47a7c0,_0x2ccb08,_0x48babe,_0x1dad6e,_0x31604e,{'goalIsInherited':!_0x3b839b});}else{if(_0x24e0f0['versions']&&_0x24e0f0[_0xb30f3e(0x128)][_0xb30f3e(0xe3)]>0x0)for(let _0x2bd166=0x0;_0x2bd166<_0x24e0f0['versions']['length'];_0x2bd166++){const _0x4a4512=_0x24e0f0['versions'][_0x2bd166];if(_0x24e0f0[_0xb30f3e(0x128)]['length']>0x1&&_0x4a4512[_0xb30f3e(0x150)]===_0xb30f3e(0xe0))continue;const _0x5e89a6=_0x4a4512[_0xb30f3e(0x15c)]||[],_0x21f407=_0xb30f3e(0xca)+_0x2bd166+'].';validateStagesForVersion(_0x5e89a6,_0x24e0f0,_0x2ccb08,_0x21f407,_0x1dad6e,_0x31604e);}else{const _0x38b0fc=_0x24e0f0['stages']||[];validateStagesForVersion(_0x38b0fc,_0x24e0f0,_0x2ccb08,'',_0x1dad6e,_0x31604e);}}_0x24e0f0[_0xb30f3e(0x10d)]&&_0x24e0f0[_0xb30f3e(0x10d)][_0xb30f3e(0xe3)]>0x1&&(deduplicateAcrossVersions(_0x1dad6e),deduplicateAcrossVersions(_0x31604e));for(const _0x4ea2ad of _0x2b3963){!_0x3c29c1[_0xb30f3e(0x169)](_0x4ea2ad)&&!_0x4ea2ad[_0xb30f3e(0x11f)](_0xb30f3e(0x12b))&&_0x31604e['push']({'level':_0xb30f3e(0x172),'path':_0xb30f3e(0x131)+_0x4ea2ad,'code':_0xb30f3e(0xdc),'message':_0xb30f3e(0x138)+_0x4ea2ad+_0xb30f3e(0x10f),'location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],['segments',_0x4ea2ad])});}return{'valid':_0x1dad6e[_0xb30f3e(0xe3)]===0x0,'errors':_0x1dad6e,'warnings':_0x31604e};}