@treasuredata/tdx 0.29.5 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.d.ts.map +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/databases.js.map +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.d.ts +97 -1
- package/dist/commands/engage-command.d.ts.map +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-command.js.map +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.d.ts.map +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/job-command.js.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.d.ts.map +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/tables.js.map +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.d.ts +8 -5
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/auth.js.map +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.d.ts +38 -6
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.d.ts +1 -0
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.d.ts +3 -3
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/api.js.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js.map +1 -1
- package/dist/sdk/client/endpoints.d.ts +16 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.d.ts +47 -1
- package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/engage-api-client.js.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js.map +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/td-api-client.js.map +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js.map +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/client/workflow-client.js.map +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.d.ts +95 -4
- package/dist/sdk/engage.d.ts.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/engage.js.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +10 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.d.ts +2 -0
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/personalization.js.map +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/realtime.js.map +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/engage.d.ts +119 -0
- package/dist/sdk/types/engage.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.d.ts +1 -0
- package/dist/sdk/util/index.d.ts.map +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/index.js.map +1 -1
- package/dist/sdk/util/paginate.d.ts +18 -0
- package/dist/sdk/util/paginate.d.ts.map +1 -0
- package/dist/sdk/util/paginate.js +1 -0
- package/dist/sdk/util/paginate.js.map +1 -0
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c5fda,_0x5c2073){const _0xec0b2=a127_0x2d32,_0x9801c4=_0x4c5fda();while(!![]){try{const _0x149933=parseInt(_0xec0b2(0xd9))/0x1+-parseInt(_0xec0b2(0xbb))/0x2+parseInt(_0xec0b2(0xd8))/0x3*(parseInt(_0xec0b2(0xc9))/0x4)+-parseInt(_0xec0b2(0xcf))/0x5*(-parseInt(_0xec0b2(0xb0))/0x6)+parseInt(_0xec0b2(0xbe))/0x7+parseInt(_0xec0b2(0xc4))/0x8+parseInt(_0xec0b2(0xc6))/0x9*(-parseInt(_0xec0b2(0xba))/0xa);if(_0x149933===_0x5c2073)break;else _0x9801c4['push'](_0x9801c4['shift']());}catch(_0x1153eb){_0x9801c4['push'](_0x9801c4['shift']());}}}(a127_0x390a,0xdd073));import a127_0x3d0dca from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a127_0x2d32(_0x519919,_0x1a03d6){_0x519919=_0x519919-0xb0;const _0x390a6f=a127_0x390a();let _0x2d32b5=_0x390a6f[_0x519919];return _0x2d32b5;}export function buildSchemaResult(_0x4e053a){const _0x4147ab=a127_0x2d32,_0x5e4fbd=_0x4e053a[_0x4147ab(0xd5)][_0x4147ab(0xb9)](_0x3cc71a=>({'column_name':_0x3cc71a[_0x4147ab(0xb5)],'column_type':_0x3cc71a[_0x4147ab(0xda)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x4e053a,'columns':[{'name':_0x4147ab(0xe1),'type':_0x4147ab(0xdc)},{'name':_0x4147ab(0xd2),'type':_0x4147ab(0xdc)},{'name':_0x4147ab(0xdb),'type':_0x4147ab(0xdc)},{'name':'key','type':_0x4147ab(0xdc)},{'name':_0x4147ab(0xd3),'type':_0x4147ab(0xdc)},{'name':'extra','type':_0x4147ab(0xdc)}],'data':_0x5e4fbd};}export async function executeSchemaQuery(_0x4832d0,_0x402829,_0x35eb64){const _0x22dd35=a127_0x2d32,_0x32f503=_0x4832d0[_0x22dd35(0xb2)]()['replace'](/;+$/,''),_0x107308=_0x22dd35(0xde)+_0x32f503+_0x22dd35(0xb4);_0x35eb64['verbose']&&console[_0x22dd35(0xb8)](_0x22dd35(0xc5)+_0x107308);const _0x5cf972=await withProgressSpinner(_0x22dd35(0xca),async _0x4aed6f=>{const _0x450eb6=_0x22dd35,_0x1a25a5=await _0x402829['query']['execute'](_0x107308,{'catalog':'td','schema':_0x450eb6(0xdf),'onJobId':_0x3f4ab2=>{const _0x4a9d19=_0x450eb6;_0x4aed6f[_0x4a9d19(0xe2)](_0x3f4ab2);}});return _0x1a25a5;},{'verbose':_0x35eb64[_0x22dd35(0xe0)]});return buildSchemaResult(_0x5cf972[_0x22dd35(0xb3)]);}function columnName(_0x48f7dd){const _0x4fd825=a127_0x2d32;return _0x48f7dd[_0x4fd825(0xc0)]||_0x48f7dd['parentColumn']||_0x48f7dd[_0x4fd825(0xb5)];}function formatFieldLine(_0x46e1df,_0x58712c,_0x58ff25){const _0x777b69=a127_0x2d32,_0x59cdaf=_0x46e1df!==_0x58712c?'\x20'+a127_0x3d0dca['dim']('('+_0x58712c+')'):'';return _0x777b69(0xcd)+_0x46e1df+_0x59cdaf+':\x20'+a127_0x3d0dca[_0x777b69(0xd7)](_0x58ff25);}function a127_0x390a(){const _0xc2db1a=['get','groupingName','startsWith','24OtWDPW','entries','trim','data','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','name','tableName','Attributes','error','map','430MzSiDf','2121986fPqbuW','dim','push','7299747BSOvSl','filter','matrixColumnName','Behaviors','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','bold','2890880hkzOtk','Schema\x20query:\x0a','634761ZtLelG','localeCompare','displayName','4NBKCGu','Fetching\x20schema...','Unknown','source','\x20\x20\x20\x20','attribute','1958870hGeyld','fields','behaviorName','column_type','default','set','columns','parentTableName','cyan','2002452qplFXk','1360310KZvGkV','type','null','varchar','matrixTableName','SELECT\x20*\x20FROM\x20(\x0a','information_schema','verbose','column_name','setJobId'];a127_0x390a=function(){return _0xc2db1a;};return a127_0x390a();}function sortByColumnName(_0x33aa84){const _0x4b8ba4=a127_0x2d32;return[..._0x33aa84]['sort']((_0x252e95,_0x39757d)=>columnName(_0x252e95)[_0x4b8ba4(0xc7)](columnName(_0x39757d)));}export function displayFieldsHumanReadable(_0xbd90b1,_0x448476){const _0x2d0087=a127_0x2d32,_0x35863d=_0xbd90b1[_0x2d0087(0xbf)](_0x162a96=>_0x162a96[_0x2d0087(0xcc)]===_0x2d0087(0xce)),_0x3f6306=_0xbd90b1[_0x2d0087(0xbf)](_0x12d934=>_0x12d934[_0x2d0087(0xcc)]==='behavior'),_0x28d238=new Map();for(const _0x5d1ade of _0x35863d){const _0x53f922=_0x5d1ade[_0x2d0087(0xe4)]||_0x5d1ade['parentTableName']||_0x2d0087(0xcb),_0x2d554f=_0x28d238[_0x2d0087(0xe3)](_0x53f922);_0x2d554f?_0x2d554f[_0x2d0087(0xd0)][_0x2d0087(0xbd)](_0x5d1ade):_0x28d238[_0x2d0087(0xd4)](_0x53f922,{'displayName':_0x53f922,'tableName':_0x5d1ade[_0x2d0087(0xd6)],'fields':[_0x5d1ade]});}const _0x2a6a79=new Map();for(const _0x4d85ef of _0x3f6306){const _0x517abe=_0x4d85ef[_0x2d0087(0xd1)]||_0x2d0087(0xcb),_0x2a24a3=_0x2a6a79[_0x2d0087(0xe3)](_0x517abe)||[];_0x2a24a3[_0x2d0087(0xbd)](_0x4d85ef),_0x2a6a79[_0x2d0087(0xd4)](_0x517abe,_0x2a24a3);}console[_0x2d0087(0xb8)]('\x0a'+a127_0x3d0dca[_0x2d0087(0xc3)](_0x448476));if(_0x28d238['size']>0x0){console['error']('\x0a'+a127_0x3d0dca['dim'](_0x2d0087(0xb7)));const _0x8410fa=[..._0x28d238[_0x2d0087(0xb1)]()]['sort']((_0x59ff72,_0x404556)=>_0x59ff72[0x0][_0x2d0087(0xc7)](_0x404556[0x0]));for(const [,_0x3a1009]of _0x8410fa){const _0x103872=_0x3a1009[_0x2d0087(0xb6)]&&_0x3a1009['tableName']!==_0x3a1009[_0x2d0087(0xc8)]?'\x20'+a127_0x3d0dca[_0x2d0087(0xbc)]('('+_0x3a1009[_0x2d0087(0xb6)]+')'):'';console[_0x2d0087(0xb8)]('\x20\x20'+a127_0x3d0dca[_0x2d0087(0xc3)](_0x3a1009[_0x2d0087(0xc8)])+_0x103872);for(const _0x412e31 of sortByColumnName(_0x3a1009[_0x2d0087(0xd0)])){console[_0x2d0087(0xb8)](formatFieldLine(columnName(_0x412e31),_0x412e31[_0x2d0087(0xb5)],_0x412e31['type']));}}}if(_0x2a6a79['size']>0x0){console[_0x2d0087(0xb8)]('\x0a'+a127_0x3d0dca['dim'](_0x2d0087(0xc1)));const _0x4ea62a=[..._0x2a6a79['entries']()]['sort']((_0x1e41c9,_0x48cc43)=>_0x1e41c9[0x0][_0x2d0087(0xc7)](_0x48cc43[0x0]));for(const [_0xb5578f,_0x48c247]of _0x4ea62a){const _0xcc283e=_0x48c247[0x0],_0x41b7af=_0xcc283e?.['matrixTableName'];if(_0x41b7af){const _0xef18e3=_0x41b7af!==_0xb5578f?'\x20'+a127_0x3d0dca[_0x2d0087(0xbc)]('('+_0xb5578f+')'):'';console[_0x2d0087(0xb8)]('\x20\x20'+a127_0x3d0dca[_0x2d0087(0xc3)](_0x41b7af)+_0xef18e3);}else{const _0x329147=_0xcc283e?.[_0x2d0087(0xd6)]||'';console[_0x2d0087(0xb8)]('\x20\x20'+a127_0x3d0dca['bold'](_0xb5578f)+(_0x329147?'\x20'+a127_0x3d0dca[_0x2d0087(0xbc)]('('+_0x329147+')'):''));}for(const _0x136b8b of sortByColumnName(_0x48c247)){const _0x555474=_0x136b8b[_0x2d0087(0xb5)][_0x2d0087(0xe5)](_0xb5578f+'.')?_0x136b8b['name']['slice'](_0xb5578f['length']+0x1):_0x136b8b[_0x2d0087(0xb5)];console['error'](formatFieldLine(columnName(_0x136b8b),_0x555474,_0x136b8b['type']));}}}const _0x543ff7=_0xbd90b1['some'](_0x1dbe0c=>_0x1dbe0c[_0x2d0087(0xc0)]||_0x1dbe0c[_0x2d0087(0xdd)]);_0x543ff7&&(console['error']('\x0a'+a127_0x3d0dca[_0x2d0087(0xbc)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console[_0x2d0087(0xb8)](a127_0x3d0dca['dim'](_0x2d0087(0xc2)))),console['error']('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x547950,_0x28f886){const _0x174330=a128_0xb948,_0x35e576=_0x547950();while(!![]){try{const _0x347800=parseInt(_0x174330(0x8b))/0x1+-parseInt(_0x174330(0x80))/0x2*(parseInt(_0x174330(0x82))/0x3)+-parseInt(_0x174330(0x85))/0x4+parseInt(_0x174330(0x89))/0x5*(parseInt(_0x174330(0x7c))/0x6)+parseInt(_0x174330(0x86))/0x7*(parseInt(_0x174330(0x91))/0x8)+parseInt(_0x174330(0x8f))/0x9*(-parseInt(_0x174330(0x83))/0xa)+parseInt(_0x174330(0x8a))/0xb;if(_0x347800===_0x28f886)break;else _0x35e576['push'](_0x35e576['shift']());}catch(_0x4117bf){_0x35e576['push'](_0x35e576['shift']());}}}(a128_0x30ad,0x9b860));import{readdirSync,statSync}from'fs';import a128_0x49e958 from'path';function a128_0x30ad(){const _0x357e8e=['.yaml','428056VJQays','2058xjDOun','isFile','relative','push','21288JmkHfG','.yml','345pqvSaO','777900KTVGwn','name','3552140TqoUjw','161IPETuw','endsWith','join','1505nFHnhz','16985166whVBeS','882379EIAwHf','map','isDirectory','toLowerCase','117NWjOIv'];a128_0x30ad=function(){return _0x357e8e;};return a128_0x30ad();}export function findYamlFiles(_0x92a020){const _0x310fa7=[];function _0x1e7910(_0x511881){const _0x1d4ac0=a128_0xb948,_0x3f4ebc=readdirSync(_0x511881,{'withFileTypes':!![]});for(const _0x360323 of _0x3f4ebc){const _0x39dc61=a128_0x49e958[_0x1d4ac0(0x88)](_0x511881,_0x360323[_0x1d4ac0(0x84)]);if(_0x360323[_0x1d4ac0(0x8d)]())_0x1e7910(_0x39dc61);else(_0x360323['name'][_0x1d4ac0(0x87)](_0x1d4ac0(0x81))||_0x360323[_0x1d4ac0(0x84)]['endsWith'](_0x1d4ac0(0x90)))&&_0x310fa7[_0x1d4ac0(0x7f)](_0x39dc61);}}return _0x1e7910(_0x92a020),_0x310fa7;}export function discoverYamlFiles(_0x180f49){const _0x5bc626=a128_0xb948,_0x1f5852=findYamlFiles(_0x180f49);return _0x1f5852[_0x5bc626(0x8c)](_0xd89c39=>{const _0x2f1ee0=_0x5bc626,_0x9f57f2=a128_0x49e958[_0x2f1ee0(0x7e)](_0x180f49,_0xd89c39),_0x52b330=a128_0x49e958['dirname'](_0x9f57f2);return{'absolutePath':_0xd89c39,'relativePath':_0x9f57f2,'folderPath':_0x52b330==='.'?'':_0x52b330};});}function a128_0xb948(_0x4eb23c,_0x28457){_0x4eb23c=_0x4eb23c-0x7c;const _0x30ad78=a128_0x30ad();let _0xb948be=_0x30ad78[_0x4eb23c];return _0xb948be;}export function isYamlFile(_0x24eba1){const _0x5e9bc9=a128_0xb948;try{const _0x4431ba=statSync(_0x24eba1);if(!_0x4431ba[_0x5e9bc9(0x7d)]())return![];const _0x52fb7a=a128_0x49e958['extname'](_0x24eba1)[_0x5e9bc9(0x8e)]();return _0x52fb7a===_0x5e9bc9(0x81)||_0x52fb7a==='.yaml';}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4db1e5,_0x4ca498){const _0x1c704a=a129_0x5dab,_0x30b4bd=_0x4db1e5();while(!![]){try{const _0x45136a=parseInt(_0x1c704a(0x220))/0x1*(-parseInt(_0x1c704a(0x216))/0x2)+-parseInt(_0x1c704a(0x1f5))/0x3*(-parseInt(_0x1c704a(0x217))/0x4)+parseInt(_0x1c704a(0x20d))/0x5*(-parseInt(_0x1c704a(0x1f3))/0x6)+-parseInt(_0x1c704a(0x1e9))/0x7*(-parseInt(_0x1c704a(0x205))/0x8)+parseInt(_0x1c704a(0x1f1))/0x9+parseInt(_0x1c704a(0x237))/0xa+parseInt(_0x1c704a(0x202))/0xb*(-parseInt(_0x1c704a(0x1f4))/0xc);if(_0x45136a===_0x4ca498)break;else _0x30b4bd['push'](_0x30b4bd['shift']());}catch(_0xb630a8){_0x30b4bd['push'](_0x30b4bd['shift']());}}}(a129_0x4c76,0x4148d));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x10bc61){const _0x4faa20=a129_0x5dab;return _0x10bc61['toLowerCase']()[_0x4faa20(0x22d)](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')[_0x4faa20(0x22d)](/_+/g,'_')[_0x4faa20(0x22d)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x434144){const _0x460ab7=a129_0x5dab,_0x424053=_0x434144['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x424053){const _0x1f2f05=_0x424053[0x1][_0x460ab7(0x236)](),_0x56404f=_0x424053[0x2],_0x414219=_0x56404f[_0x460ab7(0x22d)](/-/g,'')[_0x460ab7(0x209)](0x0,0x4)['toLowerCase']();return _0x1f2f05+'_'+_0x414219;}const _0x5b52cb=_0x434144[_0x460ab7(0x1ec)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x5b52cb){const _0x50a5dc=_0x5b52cb[0x1],_0x447a6c=_0x5b52cb[0x2][_0x460ab7(0x236)](),_0x18d869=_0x50a5dc['replace'](/-/g,'')[_0x460ab7(0x209)](0x0,0x4)[_0x460ab7(0x236)]();return _0x447a6c+'_'+_0x18d869;}return undefined;}function stableStringify(_0x1ee258){const _0x48c6e5=a129_0x5dab;if(Array[_0x48c6e5(0x21d)](_0x1ee258))return'['+_0x1ee258['map'](_0x1772ca=>stableStringify(_0x1772ca))[_0x48c6e5(0x21a)](',')+']';if(_0x1ee258&&typeof _0x1ee258==='object'){const _0x3e7ad4=_0x1ee258,_0xd44283=Object[_0x48c6e5(0x1f8)](_0x3e7ad4)[_0x48c6e5(0x21f)](),_0x53b1fa=_0xd44283[_0x48c6e5(0x21b)](_0x5790ec=>'\x22'+_0x5790ec+'\x22:'+stableStringify(_0x3e7ad4[_0x5790ec]));return'{'+_0x53b1fa[_0x48c6e5(0x21a)](',')+'}';}const _0x3c0874=JSON[_0x48c6e5(0x212)](_0x1ee258);return _0x3c0874===undefined?'null':_0x3c0874;}export function consolidateActivationsByContent(_0x2bf961){const _0x13b96b=a129_0x5dab,_0x2011fd={},_0x46eb2f=new Map(),_0x3db589=new Map();for(const _0x24be08 of _0x2bf961){if(!_0x24be08)continue;for(const [_0x318f05,_0x2f393c]of Object[_0x13b96b(0x234)](_0x24be08)){const _0x406b71={'connection':_0x2f393c[_0x13b96b(0x200)],..._0x2f393c[_0x13b96b(0x215)]!==undefined&&{'all_columns':_0x2f393c[_0x13b96b(0x215)]},..._0x2f393c[_0x13b96b(0x204)]!==undefined&&{'columns':_0x2f393c[_0x13b96b(0x204)]},..._0x2f393c[_0x13b96b(0x1fb)]!==undefined&&{'behavior':_0x2f393c[_0x13b96b(0x1fb)]},..._0x2f393c['schedule']!==undefined&&{'schedule':_0x2f393c[_0x13b96b(0x235)]},..._0x2f393c[_0x13b96b(0x238)]!==undefined&&{'notification':_0x2f393c['notification']},..._0x2f393c[_0x13b96b(0x208)]!==undefined&&{'connector_config':_0x2f393c['connector_config']},..._0x2f393c[_0x13b96b(0x20c)]!==undefined&&{'activation_template_id':_0x2f393c[_0x13b96b(0x20c)]}},_0x1b2209=stableStringify(_0x406b71),_0x71e6e1=_0x3db589['get'](_0x1b2209);_0x71e6e1?_0x46eb2f['set'](_0x318f05,_0x71e6e1):(_0x2011fd[_0x318f05]=_0x2f393c,_0x46eb2f[_0x13b96b(0x20e)](_0x318f05,_0x318f05),_0x3db589[_0x13b96b(0x20e)](_0x1b2209,_0x318f05));}}return{'merged':_0x2011fd,'nameMapping':_0x46eb2f};}export function updateActivationReferences(_0x4843f5,_0x1ebceb){const _0x46d6da=a129_0x5dab;if(!_0x4843f5)return;for(const _0x4975ff of _0x4843f5){if(!_0x4975ff[_0x46d6da(0x221)])continue;for(const _0x815fb7 of _0x4975ff['steps']){if(_0x815fb7[_0x46d6da(0x1ff)]===_0x46d6da(0x20a)&&_0x815fb7[_0x46d6da(0x210)]?.[_0x46d6da(0x20a)]){const _0x4a5ff5=_0x1ebceb[_0x46d6da(0x233)](_0x815fb7[_0x46d6da(0x210)][_0x46d6da(0x20a)]);_0x4a5ff5&&_0x4a5ff5!==_0x815fb7[_0x46d6da(0x210)][_0x46d6da(0x20a)]&&(_0x815fb7[_0x46d6da(0x210)][_0x46d6da(0x20a)]=_0x4a5ff5);}}}}export function consolidateSegmentsByContent(_0x3b9714,_0x5ac6cd){const _0x1db7e6=a129_0x5dab,_0x57691c={},_0x244476=new Map(),_0x569db0=new Map();for(const _0x211535 of _0x3b9714){if(!_0x211535)continue;for(const [_0x3a593f,_0x306b1d]of Object[_0x1db7e6(0x234)](_0x211535)){if(!_0x306b1d[_0x1db7e6(0x1eb)]){_0x57691c[_0x3a593f]=_0x306b1d,_0x244476[_0x1db7e6(0x20e)](_0x3a593f,_0x3a593f);continue;}const _0x5a82f2=_0x306b1d[_0x1db7e6(0x229)]&&_0x306b1d[_0x1db7e6(0x229)]['trim']()?_0x306b1d[_0x1db7e6(0x229)]:undefined,_0x4354a3=JSON[_0x1db7e6(0x212)]({'description':_0x5a82f2,'rule':deepSortObject(_0x306b1d[_0x1db7e6(0x1eb)])}),_0x4d852c=_0x569db0[_0x1db7e6(0x233)](_0x4354a3);if(_0x4d852c){const _0x913b12={..._0x306b1d[_0x1db7e6(0x229)]!==undefined&&{'description':_0x306b1d['description']},'rule':_0x306b1d[_0x1db7e6(0x1eb)]?deepSortObject(_0x306b1d[_0x1db7e6(0x1eb)]):_0x306b1d[_0x1db7e6(0x1eb)]};if(_0x3a593f<_0x4d852c){_0x57691c[_0x3a593f]=_0x913b12,delete _0x57691c[_0x4d852c];for(const [_0x16b01f,_0x3cf231]of _0x244476[_0x1db7e6(0x234)]()){_0x3cf231===_0x4d852c&&_0x244476[_0x1db7e6(0x20e)](_0x16b01f,_0x3a593f);}_0x244476[_0x1db7e6(0x20e)](_0x3a593f,_0x3a593f),_0x569db0['set'](_0x4354a3,_0x3a593f);}else _0x57691c[_0x4d852c]=_0x913b12,_0x244476[_0x1db7e6(0x20e)](_0x3a593f,_0x4d852c);}else{let _0x36bc8c=_0x3a593f;if(_0x5ac6cd){const _0x59789d=_0x5ac6cd[_0x1db7e6(0x233)](_0x4354a3);_0x59789d&&_0x59789d[_0x1db7e6(0x219)]>0x0&&(_0x36bc8c=_0x59789d[_0x1db7e6(0x209)]()[_0x1db7e6(0x21f)]()[0x0]);}const _0x2b9b52={..._0x306b1d[_0x1db7e6(0x229)]!==undefined&&{'description':_0x306b1d[_0x1db7e6(0x229)]},'rule':_0x306b1d[_0x1db7e6(0x1eb)]?deepSortObject(_0x306b1d[_0x1db7e6(0x1eb)]):_0x306b1d[_0x1db7e6(0x1eb)]};_0x57691c[_0x36bc8c]=_0x2b9b52,_0x244476['set'](_0x3a593f,_0x36bc8c),_0x569db0[_0x1db7e6(0x20e)](_0x4354a3,_0x36bc8c);}}}return{'merged':_0x57691c,'nameMapping':_0x244476};}export function updateSegmentReferences(_0x3a76dd,_0x38847f){const _0x3ff554=a129_0x5dab;if(!_0x3a76dd)return;for(const _0x50b26a of _0x3a76dd){if(_0x50b26a[_0x3ff554(0x213)]?.[_0x3ff554(0x228)]){const _0x2e37b7=_0x38847f['get'](_0x50b26a[_0x3ff554(0x213)][_0x3ff554(0x228)]);_0x2e37b7&&(_0x50b26a[_0x3ff554(0x213)][_0x3ff554(0x228)]=_0x2e37b7);}if(_0x50b26a[_0x3ff554(0x218)])for(const _0x309656 of _0x50b26a[_0x3ff554(0x218)]){if(_0x309656['segment']){const _0x37d24c=_0x38847f[_0x3ff554(0x233)](_0x309656[_0x3ff554(0x228)]);_0x37d24c&&(_0x309656[_0x3ff554(0x228)]=_0x37d24c);}}if(_0x50b26a[_0x3ff554(0x1ee)]?.[_0x3ff554(0x228)]){const _0x50a386=_0x38847f[_0x3ff554(0x233)](_0x50b26a[_0x3ff554(0x1ee)][_0x3ff554(0x228)]);_0x50a386&&(_0x50b26a['milestone']['segment']=_0x50a386);}if(_0x50b26a[_0x3ff554(0x221)])for(const _0x5b0fc9 of _0x50b26a[_0x3ff554(0x221)]){if(_0x5b0fc9[_0x3ff554(0x1ff)]===_0x3ff554(0x21c)&&_0x5b0fc9['with']?.['branches'])for(const _0xa3e9cb of _0x5b0fc9[_0x3ff554(0x210)][_0x3ff554(0x227)]){if(_0xa3e9cb[_0x3ff554(0x228)]){const _0x3fd4a6=_0x38847f['get'](_0xa3e9cb[_0x3ff554(0x228)]);_0x3fd4a6&&(_0xa3e9cb[_0x3ff554(0x228)]=_0x3fd4a6);}}if(_0x5b0fc9[_0x3ff554(0x1ff)]==='wait'&&_0x5b0fc9[_0x3ff554(0x210)]?.[_0x3ff554(0x1ea)]?.[_0x3ff554(0x228)]){const _0x109960=_0x38847f[_0x3ff554(0x233)](_0x5b0fc9[_0x3ff554(0x210)]['condition'][_0x3ff554(0x228)]);_0x109960&&(_0x5b0fc9[_0x3ff554(0x210)][_0x3ff554(0x1ea)][_0x3ff554(0x228)]=_0x109960);}}}}export function updateSegmentRefsInSegments(_0x21f40c,_0x2699bf){const _0x556b8e=a129_0x5dab;for(const _0xf211 of Object[_0x556b8e(0x225)](_0x21f40c)){_0xf211['rule']&&updateSegmentRefsInRule(_0xf211[_0x556b8e(0x1eb)],_0x2699bf);}}function a129_0x5dab(_0x11d48f,_0x47331e){_0x11d48f=_0x11d48f-0x1e7;const _0x4c7657=a129_0x4c76();let _0x5dab1c=_0x4c7657[_0x11d48f];return _0x5dab1c;}function updateSegmentRefsInRule(_0x1efc01,_0x3178ff){const _0x988521=a129_0x5dab;if(_0x1efc01===null||typeof _0x1efc01!=='object')return;if(Array[_0x988521(0x21d)](_0x1efc01)){for(const _0x2a4506 of _0x1efc01){updateSegmentRefsInRule(_0x2a4506,_0x3178ff);}return;}const _0x14a1a8=_0x1efc01;if((_0x14a1a8['type']==='include'||_0x14a1a8[_0x988521(0x1ff)]==='exclude')&&typeof _0x14a1a8[_0x988521(0x228)]===_0x988521(0x20b)){const _0x14ad21=_0x3178ff['get'](_0x14a1a8[_0x988521(0x228)]);_0x14ad21&&(_0x14a1a8['segment']=_0x14ad21);}if(_0x14a1a8['conditions']&&Array[_0x988521(0x21d)](_0x14a1a8[_0x988521(0x22f)]))for(const _0x9c8ff0 of _0x14a1a8['conditions']){updateSegmentRefsInRule(_0x9c8ff0,_0x3178ff);}}export function buildJourneysArray(_0x27f92b,_0x166301){return _0x27f92b['map'](_0x5c0355=>{const _0x29b619=a129_0x5dab,_0x6e113c=_0x166301?_0x5c0355[_0x29b619(0x1ef)]['id']===_0x166301:_0x27f92b[_0x29b619(0x219)]===0x1,_0x23aa50=_0x5c0355[_0x29b619(0x22c)][_0x29b619(0x22b)]?.[0x0],_0x1d7ae2=_0x23aa50?.['goal']||_0x5c0355['yaml']['goal'],_0x4f0206={'version':_0x23aa50?.[_0x29b619(0x1f6)]||_0x5c0355[_0x29b619(0x22c)][_0x29b619(0x1f6)]||_0x5c0355[_0x29b619(0x1ef)][_0x29b619(0x206)],'state':_0x5c0355[_0x29b619(0x1ef)][_0x29b619(0x1ed)]===_0x29b619(0x20f)?_0x29b619(0x20f):_0x29b619(0x223),'stages':_0x23aa50?.[_0x29b619(0x1e8)]||_0x5c0355[_0x29b619(0x22c)][_0x29b619(0x1e8)]||[],'id':_0x23aa50?.['id']||_0x5c0355[_0x29b619(0x22c)]['id'],'version_number':_0x23aa50?.[_0x29b619(0x1f0)]||_0x5c0355[_0x29b619(0x22c)][_0x29b619(0x1f0)]};return _0x1d7ae2&&(_0x4f0206[_0x29b619(0x230)]=_0x1d7ae2),_0x6e113c&&(_0x4f0206[_0x29b619(0x207)]=!![]),_0x4f0206;});}export function buildMergedJourneyDef(_0x5347d1,_0x3a7a98,_0x3cf9c9){const _0x32013e=a129_0x5dab,_0x128de4=_0x5347d1[0x0][_0x32013e(0x22c)],_0x49bb91=buildJourneysArray(_0x5347d1,_0x3cf9c9),{merged:_0x3b5a0e,nameMapping:_0x2763d4}=consolidateSegmentsByContent(_0x5347d1['map'](_0x58999e=>_0x58999e[_0x32013e(0x22c)][_0x32013e(0x211)]),_0x3a7a98);updateSegmentRefsInSegments(_0x3b5a0e,_0x2763d4);const _0x28d6e0=Array[_0x32013e(0x203)](_0x2763d4[_0x32013e(0x234)]())['some'](([_0x50ecfb,_0x17957b])=>_0x50ecfb!==_0x17957b&&_0x50ecfb['startsWith']('entry_criteria'));let _0x4e2f18=_0x3b5a0e,_0x113f99=new Map();if(_0x28d6e0){const _0x532f3a=consolidateSegmentsByContent([_0x3b5a0e],_0x3a7a98);_0x4e2f18=_0x532f3a[_0x32013e(0x1f9)],_0x113f99=_0x532f3a[_0x32013e(0x1f2)];}const _0xfcaf02=new Map(_0x2763d4);for(const [_0x46a58d,_0x398c4d]of _0x113f99['entries']()){_0xfcaf02[_0x32013e(0x20e)](_0x46a58d,_0x398c4d);}for(const [_0x794035,_0x30fa2d]of _0xfcaf02[_0x32013e(0x234)]()){let _0xf6d58b=_0x30fa2d,_0x283c2e=0x0;while(_0xfcaf02[_0x32013e(0x22a)](_0xf6d58b)&&_0xfcaf02['get'](_0xf6d58b)!==_0xf6d58b&&_0x283c2e<MAX_MAPPING_CHAIN_DEPTH){_0xf6d58b=_0xfcaf02[_0x32013e(0x233)](_0xf6d58b),_0x283c2e++;}_0xf6d58b!==_0x30fa2d&&_0xfcaf02[_0x32013e(0x20e)](_0x794035,_0xf6d58b);}for(const _0x5df80f of _0x49bb91){updateSegmentReferences(_0x5df80f[_0x32013e(0x1e8)],_0xfcaf02);}const {merged:_0x48df64,nameMapping:_0x6596c2}=consolidateActivationsByContent(_0x5347d1['map'](_0x3cf7f0=>_0x3cf7f0[_0x32013e(0x22c)][_0x32013e(0x226)]));for(const _0x4ba393 of _0x49bb91){updateActivationReferences(_0x4ba393[_0x32013e(0x1e8)],_0x6596c2);}let _0x5c2ac8=_0x128de4['goal'];if(_0x5c2ac8?.[_0x32013e(0x228)]){const _0x36f5c7=_0xfcaf02['get'](_0x5c2ac8[_0x32013e(0x228)]);_0x36f5c7&&(_0x5c2ac8={..._0x5c2ac8,'segment':_0x36f5c7});}for(const _0x7d98f8 of _0x49bb91){if(_0x7d98f8[_0x32013e(0x230)]?.[_0x32013e(0x228)]){const _0x4c361f=_0xfcaf02[_0x32013e(0x233)](_0x7d98f8[_0x32013e(0x230)]['segment']);_0x4c361f&&(_0x7d98f8[_0x32013e(0x230)]={..._0x7d98f8[_0x32013e(0x230)],'segment':_0x4c361f});}}return _0x49bb91[_0x32013e(0x201)](_0x4601c9=>_0x4601c9[_0x32013e(0x230)])&&(_0x5c2ac8=undefined),{'type':_0x32013e(0x214),'name':_0x128de4[_0x32013e(0x206)],'description':_0x128de4[_0x32013e(0x229)],'goal':_0x5c2ac8,'reentry':_0x128de4[_0x32013e(0x1fc)],'segments':Object[_0x32013e(0x1f8)](_0x4e2f18)['length']>0x0?_0x4e2f18:undefined,'activations':Object[_0x32013e(0x1f8)](_0x48df64)[_0x32013e(0x219)]>0x0?_0x48df64:undefined,'journeys':_0x49bb91,'bundle_id':_0x128de4[_0x32013e(0x1fd)],'bundle_name':_0x128de4[_0x32013e(0x1f7)]};}export function createJumpTargetCache(){return new Map();}function a129_0x4c76(){const _0x6d5b9b=['index','push','stages','7IZjKev','condition','rule','match','state','milestone','item','version_number','2431917lKVUyu','nameMapping','6cLybPp','190092eWoSjk','15PzSVvy','version','bundle_name','keys','merged','attributes','behavior','reentry','bundle_id','endsWith','type','connection','some','374wCibPA','from','columns','2984728tOAQjY','name','latest','connector_config','slice','activation','string','activation_template_id','1448345jdbRng','set','launched','with','segments','stringify','entry_criteria','journey','all_columns','14jCeBqs','427520hlvrXN','exit_criteria','length','join','map','decision_point','isArray','wait','sort','33057YiXuIZ','steps','journeyBundleName','draft','journeyStages','values','activations','branches','segment','description','has','journeys','yaml','replace','versions','conditions','goal','find','.yml','get','entries','schedule','toLowerCase','1493630gPecSd','notification'];a129_0x4c76=function(){return _0x6d5b9b;};return a129_0x4c76();}export async function resolveJumpTarget(_0x4335b8,_0x192716,_0x2de91e,_0x1eb988){const _0x2dc3f8=a129_0x5dab,_0x5befb3=_0x4335b8+':'+_0x192716,_0x199980=_0x2de91e[_0x2dc3f8(0x233)](_0x5befb3);if(_0x199980)return _0x199980;const _0x44aaf8=await _0x1eb988(_0x4335b8),_0x35f973=_0x44aaf8[_0x2dc3f8(0x1fa)][_0x2dc3f8(0x222)]||_0x44aaf8[_0x2dc3f8(0x1fa)][_0x2dc3f8(0x206)],_0x2598b5=_0x44aaf8[_0x2dc3f8(0x1fa)][_0x2dc3f8(0x224)][_0x2dc3f8(0x231)](_0x26de64=>String(_0x26de64['id'])===String(_0x192716)),_0x38ce0e=_0x2598b5?.['name']||_0x192716,_0x10bcbd={'journeyName':_0x35f973,'stageName':_0x38ce0e};return _0x2de91e[_0x2dc3f8(0x20e)](_0x5befb3,_0x10bcbd),_0x10bcbd;}export function formatApiJourneyName(_0x23ad81,_0x10c685){return _0x10c685+'\x20('+_0x23ad81+')';}export function isLocalJourneyRef(_0x1cdc71){const _0x11e837=a129_0x5dab;return _0x1cdc71[_0x11e837(0x1fe)](_0x11e837(0x232))||_0x1cdc71[_0x11e837(0x1fe)]('.yaml');}export function buildLocalRuleToNameMapping(_0x251408){const _0x373237=a129_0x5dab,_0x4b8652=new Map();if(!_0x251408)return _0x4b8652;for(const [_0x3c98a6,_0x12002d]of Object[_0x373237(0x234)](_0x251408)){if(_0x12002d[_0x373237(0x1eb)]){const _0x4ca934=serializeRule(_0x12002d[_0x373237(0x1eb)]),_0x295f89=_0x4b8652[_0x373237(0x233)](_0x4ca934)||[];_0x295f89[_0x373237(0x1e7)](_0x3c98a6),_0x4b8652['set'](_0x4ca934,_0x295f89);}}return _0x4b8652;}export function buildLocalRuleToNameMappingFromJourney(_0x20d7f8){const _0x51f404=a129_0x5dab,_0x2e615e=_0x20d7f8[_0x51f404(0x211)];if(!_0x2e615e)return new Map();const _0x535e1b=collectSegmentUsageCounts(_0x20d7f8),_0x17de8d=new Map();let _0x44e144=0x0;for(const [_0x215e81,_0x257b2e]of Object['entries'](_0x2e615e)){if(!_0x257b2e[_0x51f404(0x1eb)]){_0x44e144++;continue;}const _0x83e9f5=serializeRule(_0x257b2e[_0x51f404(0x1eb)]),_0x4dd619=_0x17de8d[_0x51f404(0x233)](_0x83e9f5)||[];_0x4dd619['push']({'name':_0x215e81,'index':_0x44e144}),_0x17de8d[_0x51f404(0x20e)](_0x83e9f5,_0x4dd619),_0x44e144++;}const _0x6303a6=new Map();for(const [_0x883111,_0x2d76f4]of _0x17de8d){const _0x22afe1=_0x2d76f4[_0x51f404(0x209)]()[_0x51f404(0x21f)]((_0x2fd4c1,_0x3ecea6)=>{const _0x559f2f=_0x51f404,_0x1ba8cc=_0x535e1b[_0x559f2f(0x233)](_0x2fd4c1['name'])||0x0,_0x36d3e7=_0x535e1b[_0x559f2f(0x233)](_0x3ecea6[_0x559f2f(0x206)])||0x0;if(_0x1ba8cc!==_0x36d3e7)return _0x36d3e7-_0x1ba8cc;return _0x2fd4c1['index']-_0x3ecea6[_0x559f2f(0x239)];})[_0x51f404(0x21b)](_0x284ffe=>_0x284ffe[_0x51f404(0x206)]);_0x6303a6[_0x51f404(0x20e)](_0x883111,_0x22afe1);}return _0x6303a6;}export function collectSegmentUsageCounts(_0x5d3f66){const _0x56d2e7=a129_0x5dab,_0x3b4aa8=new Map(),_0x417001=_0x53876b=>{const _0x49367b=a129_0x5dab;if(!_0x53876b)return;_0x3b4aa8[_0x49367b(0x20e)](_0x53876b,(_0x3b4aa8[_0x49367b(0x233)](_0x53876b)||0x0)+0x1);},_0x5c7b0a=_0x34a983=>{const _0x4e0ebb=a129_0x5dab;for(const _0x6cdd2d of _0x34a983){_0x417001(_0x6cdd2d['entry_criteria']?.['segment']);if(_0x6cdd2d[_0x4e0ebb(0x218)])for(const _0x40c24b of _0x6cdd2d[_0x4e0ebb(0x218)]){_0x417001(_0x40c24b[_0x4e0ebb(0x228)]);}_0x417001(_0x6cdd2d['milestone']?.[_0x4e0ebb(0x228)]);if(_0x6cdd2d[_0x4e0ebb(0x221)])for(const _0x1fa751 of _0x6cdd2d[_0x4e0ebb(0x221)]){if(_0x1fa751[_0x4e0ebb(0x1ff)]===_0x4e0ebb(0x21c))for(const _0x2d7dac of _0x1fa751[_0x4e0ebb(0x210)][_0x4e0ebb(0x227)]){_0x417001(_0x2d7dac[_0x4e0ebb(0x228)]);}else _0x1fa751[_0x4e0ebb(0x1ff)]===_0x4e0ebb(0x21e)&&_0x417001(_0x1fa751['with'][_0x4e0ebb(0x1ea)]?.[_0x4e0ebb(0x228)]);}}};_0x417001(_0x5d3f66[_0x56d2e7(0x230)]?.[_0x56d2e7(0x228)]);if(_0x5d3f66[_0x56d2e7(0x22b)])for(const _0x185d4a of _0x5d3f66[_0x56d2e7(0x22b)]){_0x417001(_0x185d4a[_0x56d2e7(0x230)]?.[_0x56d2e7(0x228)]),_0x5c7b0a(_0x185d4a[_0x56d2e7(0x1e8)]);}_0x5d3f66[_0x56d2e7(0x1e8)]&&_0x5c7b0a(_0x5d3f66['stages']);if(_0x5d3f66[_0x56d2e7(0x22e)])for(const _0x2922f2 of _0x5d3f66['versions']){_0x5c7b0a(_0x2922f2[_0x56d2e7(0x1e8)]);}return _0x3b4aa8;}
|
|
1
|
+
(function(_0x324b3d,_0x7bcaf0){const _0x5c5301=a129_0x4d38,_0x2f27ea=_0x324b3d();while(!![]){try{const _0x377c32=-parseInt(_0x5c5301(0xb4))/0x1*(-parseInt(_0x5c5301(0xc3))/0x2)+-parseInt(_0x5c5301(0xac))/0x3+-parseInt(_0x5c5301(0xaa))/0x4*(-parseInt(_0x5c5301(0x99))/0x5)+parseInt(_0x5c5301(0x97))/0x6+-parseInt(_0x5c5301(0x84))/0x7*(-parseInt(_0x5c5301(0x89))/0x8)+parseInt(_0x5c5301(0x90))/0x9+-parseInt(_0x5c5301(0xbf))/0xa;if(_0x377c32===_0x7bcaf0)break;else _0x2f27ea['push'](_0x2f27ea['shift']());}catch(_0x20dcec){_0x2f27ea['push'](_0x2f27ea['shift']());}}}(a129_0x21db,0x6aefd));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x2ab68f){const _0x519ce6=a129_0x4d38;return _0x2ab68f[_0x519ce6(0x80)]()[_0x519ce6(0x7d)](/\s+/g,'_')[_0x519ce6(0x7d)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')[_0x519ce6(0x7d)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x597735){const _0x293f12=a129_0x4d38,_0x41f748=_0x597735['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x41f748){const _0x173f2d=_0x41f748[0x1][_0x293f12(0x80)](),_0x1dd1a4=_0x41f748[0x2],_0xbab37e=_0x1dd1a4[_0x293f12(0x7d)](/-/g,'')[_0x293f12(0x91)](0x0,0x4)[_0x293f12(0x80)]();return _0x173f2d+'_'+_0xbab37e;}const _0x47c901=_0x597735['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x47c901){const _0xb1c8d9=_0x47c901[0x1],_0x228ba8=_0x47c901[0x2][_0x293f12(0x80)](),_0x5c1870=_0xb1c8d9[_0x293f12(0x7d)](/-/g,'')['slice'](0x0,0x4)[_0x293f12(0x80)]();return _0x228ba8+'_'+_0x5c1870;}return undefined;}function a129_0x4d38(_0x1decbc,_0x4a83a3){_0x1decbc=_0x1decbc-0x79;const _0x21dbd1=a129_0x21db();let _0x4d3820=_0x21dbd1[_0x1decbc];return _0x4d3820;}function stableStringify(_0x451692){const _0x4b1da2=a129_0x4d38;if(Array['isArray'](_0x451692))return'['+_0x451692[_0x4b1da2(0xa9)](_0x299888=>stableStringify(_0x299888))[_0x4b1da2(0x7e)](',')+']';if(_0x451692&&typeof _0x451692===_0x4b1da2(0x98)){const _0x5bdb4b=_0x451692,_0x290ba8=Object['keys'](_0x5bdb4b)[_0x4b1da2(0x96)](),_0x3db996=_0x290ba8['map'](_0x36365b=>'\x22'+_0x36365b+'\x22:'+stableStringify(_0x5bdb4b[_0x36365b]));return'{'+_0x3db996[_0x4b1da2(0x7e)](',')+'}';}const _0x78671d=JSON[_0x4b1da2(0x7f)](_0x451692);return _0x78671d===undefined?'null':_0x78671d;}export function consolidateActivationsByContent(_0x482d37){const _0x329c07=a129_0x4d38,_0xe42fe5={},_0xd50269=new Map(),_0x3746b1=new Map();for(const _0x1cf607 of _0x482d37){if(!_0x1cf607)continue;for(const [_0x455f63,_0x1d5022]of Object[_0x329c07(0xbb)](_0x1cf607)){const _0x270171={'connection':_0x1d5022[_0x329c07(0x85)],..._0x1d5022[_0x329c07(0x88)]!==undefined&&{'all_columns':_0x1d5022[_0x329c07(0x88)]},..._0x1d5022[_0x329c07(0xc7)]!==undefined&&{'columns':_0x1d5022[_0x329c07(0xc7)]},..._0x1d5022[_0x329c07(0xa1)]!==undefined&&{'behavior':_0x1d5022[_0x329c07(0xa1)]},..._0x1d5022[_0x329c07(0xab)]!==undefined&&{'schedule':_0x1d5022[_0x329c07(0xab)]},..._0x1d5022[_0x329c07(0x8c)]!==undefined&&{'notification':_0x1d5022['notification']},..._0x1d5022[_0x329c07(0x8a)]!==undefined&&{'connector_config':_0x1d5022[_0x329c07(0x8a)]},..._0x1d5022[_0x329c07(0xbc)]!==undefined&&{'activation_template_id':_0x1d5022[_0x329c07(0xbc)]}},_0x4f6666=stableStringify(_0x270171),_0x5b40b6=_0x3746b1[_0x329c07(0xbe)](_0x4f6666);_0x5b40b6?_0xd50269[_0x329c07(0x83)](_0x455f63,_0x5b40b6):(_0xe42fe5[_0x455f63]=_0x1d5022,_0xd50269['set'](_0x455f63,_0x455f63),_0x3746b1[_0x329c07(0x83)](_0x4f6666,_0x455f63));}}return{'merged':_0xe42fe5,'nameMapping':_0xd50269};}export function updateActivationReferences(_0x1c549b,_0x50bd17){const _0xe971aa=a129_0x4d38;if(!_0x1c549b)return;for(const _0x5f2f8d of _0x1c549b){if(!_0x5f2f8d[_0xe971aa(0x82)])continue;for(const _0x24dac9 of _0x5f2f8d[_0xe971aa(0x82)]){if(_0x24dac9[_0xe971aa(0x9f)]===_0xe971aa(0x86)&&_0x24dac9[_0xe971aa(0x94)]?.[_0xe971aa(0x86)]){const _0x5ec835=_0x50bd17['get'](_0x24dac9['with'][_0xe971aa(0x86)]);_0x5ec835&&_0x5ec835!==_0x24dac9['with']['activation']&&(_0x24dac9[_0xe971aa(0x94)][_0xe971aa(0x86)]=_0x5ec835);}}}}export function consolidateSegmentsByContent(_0x3c2f19,_0x4cd3f3){const _0x1ef99b=a129_0x4d38,_0x25dda4={},_0xaa1b81=new Map(),_0x4df7c5=new Map();for(const _0xc5606b of _0x3c2f19){if(!_0xc5606b)continue;for(const [_0x3f5c42,_0x38feb1]of Object['entries'](_0xc5606b)){if(!_0x38feb1[_0x1ef99b(0x9d)]){_0x25dda4[_0x3f5c42]=_0x38feb1,_0xaa1b81['set'](_0x3f5c42,_0x3f5c42);continue;}const _0x16c9f6=_0x38feb1[_0x1ef99b(0x9b)]&&_0x38feb1['description'][_0x1ef99b(0x95)]()?_0x38feb1[_0x1ef99b(0x9b)]:undefined,_0x2ee88f=JSON[_0x1ef99b(0x7f)]({'description':_0x16c9f6,'rule':deepSortObject(_0x38feb1[_0x1ef99b(0x9d)])}),_0x4e2e0e=_0x4df7c5['get'](_0x2ee88f);if(_0x4e2e0e){const _0x5e8cdd={..._0x38feb1['description']!==undefined&&{'description':_0x38feb1[_0x1ef99b(0x9b)]},'rule':_0x38feb1[_0x1ef99b(0x9d)]?deepSortObject(_0x38feb1[_0x1ef99b(0x9d)]):_0x38feb1[_0x1ef99b(0x9d)]};if(_0x3f5c42<_0x4e2e0e){_0x25dda4[_0x3f5c42]=_0x5e8cdd,delete _0x25dda4[_0x4e2e0e];for(const [_0x48c940,_0xa33c82]of _0xaa1b81[_0x1ef99b(0xbb)]()){_0xa33c82===_0x4e2e0e&&_0xaa1b81['set'](_0x48c940,_0x3f5c42);}_0xaa1b81['set'](_0x3f5c42,_0x3f5c42),_0x4df7c5[_0x1ef99b(0x83)](_0x2ee88f,_0x3f5c42);}else _0x25dda4[_0x4e2e0e]=_0x5e8cdd,_0xaa1b81[_0x1ef99b(0x83)](_0x3f5c42,_0x4e2e0e);}else{let _0x3da2c3=_0x3f5c42;if(_0x4cd3f3){const _0x17490e=_0x4cd3f3['get'](_0x2ee88f);_0x17490e&&_0x17490e['length']>0x0&&(_0x3da2c3=_0x17490e[_0x1ef99b(0x91)]()[_0x1ef99b(0x96)]()[0x0]);}const _0x359882={..._0x38feb1['description']!==undefined&&{'description':_0x38feb1[_0x1ef99b(0x9b)]},'rule':_0x38feb1['rule']?deepSortObject(_0x38feb1[_0x1ef99b(0x9d)]):_0x38feb1[_0x1ef99b(0x9d)]};_0x25dda4[_0x3da2c3]=_0x359882,_0xaa1b81[_0x1ef99b(0x83)](_0x3f5c42,_0x3da2c3),_0x4df7c5['set'](_0x2ee88f,_0x3da2c3);}}}return{'merged':_0x25dda4,'nameMapping':_0xaa1b81};}export function updateSegmentReferences(_0xf51b33,_0x171cc5){const _0xe313bd=a129_0x4d38;if(!_0xf51b33)return;for(const _0x58d726 of _0xf51b33){if(_0x58d726[_0xe313bd(0x8d)]?.[_0xe313bd(0x9e)]){const _0x33a8bb=_0x171cc5['get'](_0x58d726['entry_criteria']['segment']);_0x33a8bb&&(_0x58d726['entry_criteria'][_0xe313bd(0x9e)]=_0x33a8bb);}if(_0x58d726[_0xe313bd(0xa8)])for(const _0x18d78a of _0x58d726['exit_criteria']){if(_0x18d78a['segment']){const _0x4ec93f=_0x171cc5[_0xe313bd(0xbe)](_0x18d78a['segment']);_0x4ec93f&&(_0x18d78a[_0xe313bd(0x9e)]=_0x4ec93f);}}if(_0x58d726[_0xe313bd(0xba)]?.['segment']){const _0x4ef1a9=_0x171cc5[_0xe313bd(0xbe)](_0x58d726['milestone']['segment']);_0x4ef1a9&&(_0x58d726['milestone'][_0xe313bd(0x9e)]=_0x4ef1a9);}if(_0x58d726[_0xe313bd(0x82)])for(const _0x2165ac of _0x58d726['steps']){if(_0x2165ac['type']===_0xe313bd(0x81)&&_0x2165ac[_0xe313bd(0x94)]?.['branches'])for(const _0x5cbaf9 of _0x2165ac[_0xe313bd(0x94)][_0xe313bd(0xc0)]){if(_0x5cbaf9[_0xe313bd(0x9e)]){const _0x5c0be7=_0x171cc5[_0xe313bd(0xbe)](_0x5cbaf9['segment']);_0x5c0be7&&(_0x5cbaf9[_0xe313bd(0x9e)]=_0x5c0be7);}}if(_0x2165ac['type']===_0xe313bd(0x79)&&_0x2165ac['with']?.[_0xe313bd(0x9a)]?.['segment']){const _0x23db1e=_0x171cc5[_0xe313bd(0xbe)](_0x2165ac[_0xe313bd(0x94)][_0xe313bd(0x9a)][_0xe313bd(0x9e)]);_0x23db1e&&(_0x2165ac[_0xe313bd(0x94)][_0xe313bd(0x9a)][_0xe313bd(0x9e)]=_0x23db1e);}}}}export function updateSegmentRefsInSegments(_0x35d1cb,_0x146a74){const _0x4ddc66=a129_0x4d38;for(const _0x167971 of Object[_0x4ddc66(0xb8)](_0x35d1cb)){_0x167971[_0x4ddc66(0x9d)]&&updateSegmentRefsInRule(_0x167971[_0x4ddc66(0x9d)],_0x146a74);}}function updateSegmentRefsInRule(_0x4f6a3f,_0x27c394){const _0x22de7d=a129_0x4d38;if(_0x4f6a3f===null||typeof _0x4f6a3f!=='object')return;if(Array[_0x22de7d(0x7c)](_0x4f6a3f)){for(const _0x2f132e of _0x4f6a3f){updateSegmentRefsInRule(_0x2f132e,_0x27c394);}return;}const _0x34d89a=_0x4f6a3f;if((_0x34d89a[_0x22de7d(0x9f)]==='include'||_0x34d89a[_0x22de7d(0x9f)]==='exclude')&&typeof _0x34d89a[_0x22de7d(0x9e)]===_0x22de7d(0xb3)){const _0x1152f0=_0x27c394['get'](_0x34d89a[_0x22de7d(0x9e)]);_0x1152f0&&(_0x34d89a[_0x22de7d(0x9e)]=_0x1152f0);}if(_0x34d89a[_0x22de7d(0xa7)]&&Array[_0x22de7d(0x7c)](_0x34d89a[_0x22de7d(0xa7)]))for(const _0x126887 of _0x34d89a['conditions']){updateSegmentRefsInRule(_0x126887,_0x27c394);}}export function buildJourneysArray(_0x30c40e,_0x3b6ae5){const _0x14064a=a129_0x4d38;return _0x30c40e[_0x14064a(0xa9)](_0xde2e97=>{const _0x1510ec=_0x14064a,_0x165196=_0x3b6ae5?_0xde2e97[_0x1510ec(0xc6)]['id']===_0x3b6ae5:_0x30c40e[_0x1510ec(0x92)]===0x1,_0x46f28e=_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0xa0)]?.[0x0],_0x785aca=_0x46f28e?.['goal']||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0x8b)],_0x132dff={'version':_0x46f28e?.[_0x1510ec(0x87)]||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0x87)]||_0xde2e97['item'][_0x1510ec(0xb5)],'state':_0xde2e97[_0x1510ec(0xc6)][_0x1510ec(0xc5)]===_0x1510ec(0x7b)?_0x1510ec(0x7b):_0x1510ec(0xb7),'stages':_0x46f28e?.['stages']||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0xb0)]||[],'id':_0x46f28e?.['id']||_0xde2e97[_0x1510ec(0xa2)]['id'],'version_number':_0x46f28e?.[_0x1510ec(0xbd)]||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0xbd)]};return _0x785aca&&(_0x132dff[_0x1510ec(0x8b)]=_0x785aca),_0x165196&&(_0x132dff['latest']=!![]),_0x132dff;});}export function buildMergedJourneyDef(_0x3af249,_0x17606c,_0x700d07){const _0x383e2c=a129_0x4d38,_0x25b8d9=_0x3af249[0x0][_0x383e2c(0xa2)],_0x2f51b5=buildJourneysArray(_0x3af249,_0x700d07),{merged:_0x5776e0,nameMapping:_0x443154}=consolidateSegmentsByContent(_0x3af249[_0x383e2c(0xa9)](_0x3db9ec=>_0x3db9ec[_0x383e2c(0xa2)]['segments']),_0x17606c);updateSegmentRefsInSegments(_0x5776e0,_0x443154);const _0x35086e=Array[_0x383e2c(0x7a)](_0x443154[_0x383e2c(0xbb)]())[_0x383e2c(0x8e)](([_0x24de5a,_0x4c2f21])=>_0x24de5a!==_0x4c2f21&&_0x24de5a[_0x383e2c(0xaf)](_0x383e2c(0x8d)));let _0x27845e=_0x5776e0,_0x4b3eaf=new Map();if(_0x35086e){const _0x41701b=consolidateSegmentsByContent([_0x5776e0],_0x17606c);_0x27845e=_0x41701b[_0x383e2c(0xb6)],_0x4b3eaf=_0x41701b[_0x383e2c(0xb1)];}const _0x3791ae=new Map(_0x443154);for(const [_0x2ea3b6,_0x3ac82a]of _0x4b3eaf[_0x383e2c(0xbb)]()){_0x3791ae[_0x383e2c(0x83)](_0x2ea3b6,_0x3ac82a);}for(const [_0xa2884d,_0x5c51ea]of _0x3791ae[_0x383e2c(0xbb)]()){let _0x3cb645=_0x5c51ea,_0x2ae1c6=0x0;while(_0x3791ae[_0x383e2c(0xc4)](_0x3cb645)&&_0x3791ae['get'](_0x3cb645)!==_0x3cb645&&_0x2ae1c6<MAX_MAPPING_CHAIN_DEPTH){_0x3cb645=_0x3791ae[_0x383e2c(0xbe)](_0x3cb645),_0x2ae1c6++;}_0x3cb645!==_0x5c51ea&&_0x3791ae['set'](_0xa2884d,_0x3cb645);}for(const _0x8dc3a8 of _0x2f51b5){updateSegmentReferences(_0x8dc3a8[_0x383e2c(0xb0)],_0x3791ae);}const {merged:_0x5a0a23,nameMapping:_0x24cb45}=consolidateActivationsByContent(_0x3af249[_0x383e2c(0xa9)](_0xfeee61=>_0xfeee61[_0x383e2c(0xa2)][_0x383e2c(0xb9)]));for(const _0xfdae58 of _0x2f51b5){updateActivationReferences(_0xfdae58['stages'],_0x24cb45);}let _0x4de288=_0x25b8d9[_0x383e2c(0x8b)];if(_0x4de288?.[_0x383e2c(0x9e)]){const _0x38630f=_0x3791ae['get'](_0x4de288['segment']);_0x38630f&&(_0x4de288={..._0x4de288,'segment':_0x38630f});}for(const _0x1e7ee6 of _0x2f51b5){if(_0x1e7ee6[_0x383e2c(0x8b)]?.['segment']){const _0x29faed=_0x3791ae[_0x383e2c(0xbe)](_0x1e7ee6[_0x383e2c(0x8b)][_0x383e2c(0x9e)]);_0x29faed&&(_0x1e7ee6[_0x383e2c(0x8b)]={..._0x1e7ee6[_0x383e2c(0x8b)],'segment':_0x29faed});}}return _0x2f51b5[_0x383e2c(0x8e)](_0x28ce54=>_0x28ce54['goal'])&&(_0x4de288=undefined),{'type':_0x383e2c(0xc2),'name':_0x25b8d9[_0x383e2c(0xb5)],'description':_0x25b8d9[_0x383e2c(0x9b)],'goal':_0x4de288,'reentry':_0x25b8d9['reentry'],'segments':Object[_0x383e2c(0x9c)](_0x27845e)[_0x383e2c(0x92)]>0x0?_0x27845e:undefined,'activations':Object[_0x383e2c(0x9c)](_0x5a0a23)['length']>0x0?_0x5a0a23:undefined,'journeys':_0x2f51b5,'bundle_id':_0x25b8d9[_0x383e2c(0x8f)],'bundle_name':_0x25b8d9[_0x383e2c(0x93)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x98f7aa,_0x364983,_0x587eba,_0x5cce40){const _0x245f1f=a129_0x4d38,_0x50bb4b=_0x98f7aa+':'+_0x364983,_0xf04eaf=_0x587eba[_0x245f1f(0xbe)](_0x50bb4b);if(_0xf04eaf)return _0xf04eaf;const _0xb7bbba=await _0x5cce40(_0x98f7aa),_0x20e011=_0xb7bbba[_0x245f1f(0xc1)]['journeyBundleName']||_0xb7bbba[_0x245f1f(0xc1)][_0x245f1f(0xb5)],_0x5f2203=_0xb7bbba[_0x245f1f(0xc1)][_0x245f1f(0xa6)]['find'](_0x4eecfd=>String(_0x4eecfd['id'])===String(_0x364983)),_0x1a6706=_0x5f2203?.[_0x245f1f(0xb5)]||_0x364983,_0x9b06dd={'journeyName':_0x20e011,'stageName':_0x1a6706};return _0x587eba[_0x245f1f(0x83)](_0x50bb4b,_0x9b06dd),_0x9b06dd;}export function formatApiJourneyName(_0x59e221,_0x189a46){return _0x189a46+'\x20('+_0x59e221+')';}export function isLocalJourneyRef(_0x406f51){const _0x575d68=a129_0x4d38;return _0x406f51[_0x575d68(0xa3)](_0x575d68(0xa4))||_0x406f51[_0x575d68(0xa3)](_0x575d68(0xa5));}export function buildLocalRuleToNameMapping(_0x98e066){const _0x27f1ff=a129_0x4d38,_0x13c49a=new Map();if(!_0x98e066)return _0x13c49a;for(const [_0x193686,_0x2704b5]of Object[_0x27f1ff(0xbb)](_0x98e066)){if(_0x2704b5['rule']){const _0x433d5d=serializeRule(_0x2704b5[_0x27f1ff(0x9d)]),_0x3ad95b=_0x13c49a['get'](_0x433d5d)||[];_0x3ad95b[_0x27f1ff(0xad)](_0x193686),_0x13c49a[_0x27f1ff(0x83)](_0x433d5d,_0x3ad95b);}}return _0x13c49a;}export function buildLocalRuleToNameMappingFromJourney(_0x4a56d2){const _0x1aa856=a129_0x4d38,_0x4d1704=_0x4a56d2[_0x1aa856(0xb2)];if(!_0x4d1704)return new Map();const _0x1ddeac=collectSegmentUsageCounts(_0x4a56d2),_0x514dbe=new Map();let _0xadd54f=0x0;for(const [_0x177288,_0x4d17af]of Object[_0x1aa856(0xbb)](_0x4d1704)){if(!_0x4d17af['rule']){_0xadd54f++;continue;}const _0x1019e0=serializeRule(_0x4d17af[_0x1aa856(0x9d)]),_0x4e07ad=_0x514dbe[_0x1aa856(0xbe)](_0x1019e0)||[];_0x4e07ad[_0x1aa856(0xad)]({'name':_0x177288,'index':_0xadd54f}),_0x514dbe['set'](_0x1019e0,_0x4e07ad),_0xadd54f++;}const _0x361e9c=new Map();for(const [_0x5bc06c,_0x4967f6]of _0x514dbe){const _0x2e1d4d=_0x4967f6['slice']()[_0x1aa856(0x96)]((_0x257ea2,_0x5931f3)=>{const _0xd1c705=_0x1aa856,_0x3740a1=_0x1ddeac[_0xd1c705(0xbe)](_0x257ea2['name'])||0x0,_0x4a36de=_0x1ddeac['get'](_0x5931f3[_0xd1c705(0xb5)])||0x0;if(_0x3740a1!==_0x4a36de)return _0x4a36de-_0x3740a1;return _0x257ea2[_0xd1c705(0xae)]-_0x5931f3['index'];})[_0x1aa856(0xa9)](_0x324451=>_0x324451[_0x1aa856(0xb5)]);_0x361e9c[_0x1aa856(0x83)](_0x5bc06c,_0x2e1d4d);}return _0x361e9c;}export function collectSegmentUsageCounts(_0x2e294f){const _0x214891=a129_0x4d38,_0x532ab9=new Map(),_0x5d8655=_0x559912=>{const _0x1162f3=a129_0x4d38;if(!_0x559912)return;_0x532ab9[_0x1162f3(0x83)](_0x559912,(_0x532ab9[_0x1162f3(0xbe)](_0x559912)||0x0)+0x1);},_0x14e0d7=_0x56bba7=>{const _0x2004ea=a129_0x4d38;for(const _0x1ec6cc of _0x56bba7){_0x5d8655(_0x1ec6cc['entry_criteria']?.[_0x2004ea(0x9e)]);if(_0x1ec6cc['exit_criteria'])for(const _0x4c5a92 of _0x1ec6cc[_0x2004ea(0xa8)]){_0x5d8655(_0x4c5a92['segment']);}_0x5d8655(_0x1ec6cc['milestone']?.[_0x2004ea(0x9e)]);if(_0x1ec6cc['steps'])for(const _0x4f2016 of _0x1ec6cc['steps']){if(_0x4f2016[_0x2004ea(0x9f)]===_0x2004ea(0x81))for(const _0xa6e04d of _0x4f2016['with']['branches']){_0x5d8655(_0xa6e04d['segment']);}else _0x4f2016['type']===_0x2004ea(0x79)&&_0x5d8655(_0x4f2016[_0x2004ea(0x94)][_0x2004ea(0x9a)]?.['segment']);}}};_0x5d8655(_0x2e294f[_0x214891(0x8b)]?.[_0x214891(0x9e)]);if(_0x2e294f['journeys'])for(const _0x5f4f47 of _0x2e294f[_0x214891(0xa0)]){_0x5d8655(_0x5f4f47[_0x214891(0x8b)]?.[_0x214891(0x9e)]),_0x14e0d7(_0x5f4f47['stages']);}_0x2e294f[_0x214891(0xb0)]&&_0x14e0d7(_0x2e294f[_0x214891(0xb0)]);if(_0x2e294f['versions'])for(const _0x3af53c of _0x2e294f['versions']){_0x14e0d7(_0x3af53c[_0x214891(0xb0)]);}return _0x532ab9;}function a129_0x21db(){const _0x527e9e=['slice','length','bundle_name','with','trim','sort','1463940UaoZFD','object','1932220sbknJR','condition','description','keys','rule','segment','type','journeys','behavior','yaml','endsWith','.yml','.yaml','journeyStages','conditions','exit_criteria','map','8nfkddK','schedule','234567fNqDxA','push','index','startsWith','stages','nameMapping','segments','string','8RNdYil','name','merged','draft','values','activations','milestone','entries','activation_template_id','version_number','get','11664560rcnTgC','branches','attributes','journey','125596qEVUwX','has','state','item','columns','wait','from','launched','isArray','replace','join','stringify','toLowerCase','decision_point','steps','set','56lQGjVz','connection','activation','version','all_columns','142952duCVmM','connector_config','goal','notification','entry_criteria','some','bundle_id','183996PZxLbL'];a129_0x21db=function(){return _0x527e9e;};return a129_0x21db();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3bda37,_0x152325){const _0x2363d3=a130_0x420c,_0x2bffa6=_0x3bda37();while(!![]){try{const _0x17af9d=parseInt(_0x2363d3(0x1eb))/0x1+parseInt(_0x2363d3(0x180))/0x2+parseInt(_0x2363d3(0x1dd))/0x3*(parseInt(_0x2363d3(0x1a4))/0x4)+-parseInt(_0x2363d3(0x20a))/0x5*(-parseInt(_0x2363d3(0x1bf))/0x6)+-parseInt(_0x2363d3(0x190))/0x7*(-parseInt(_0x2363d3(0x184))/0x8)+parseInt(_0x2363d3(0x1be))/0x9+-parseInt(_0x2363d3(0x1d2))/0xa;if(_0x17af9d===_0x152325)break;else _0x2bffa6['push'](_0x2bffa6['shift']());}catch(_0x3dc293){_0x2bffa6['push'](_0x2bffa6['shift']());}}}(a130_0x4d7d,0xe10fb));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5e451d,_0x59e22c,_0x14f620,_0x580b3d,_0x3b51e7,_0x2a464a){const _0x1ebb37=a130_0x420c;return{'level':_0x5e451d,'path':_0x59e22c,'code':_0x14f620,'message':_0x580b3d,'location':getLocationFromPath(_0x3b51e7['document'],_0x3b51e7[_0x1ebb37(0x1de)],pathToArray(_0x2a464a??_0x59e22c))};}function validateVersionStructure(_0x47c67e,_0x39a044){const _0x6f60e2=a130_0x420c,_0xdfba10=[];return _0x47c67e[_0x6f60e2(0x1b3)]>MAX_STAGES&&_0xdfba10[_0x6f60e2(0x188)](createIssue(_0x6f60e2(0x1b7),'stages',_0x6f60e2(0x1f9),'Journey\x20has\x20'+_0x47c67e['length']+_0x6f60e2(0x18a)+MAX_STAGES,_0x39a044)),_0xdfba10;}function validateStageStructure(_0x5458b1,_0x5dd426,_0x2aeca7,_0x57aad4){const _0x206a88=a130_0x420c,_0x1c2336=[],_0x319e83=_0x206a88(0x210)+_0x5dd426+']';_0x5dd426===0x0&&!_0x5458b1[_0x206a88(0x1a7)]&&_0x1c2336[_0x206a88(0x188)](createIssue(_0x206a88(0x1b7),_0x319e83+_0x206a88(0x1d1),_0x206a88(0x216),_0x206a88(0x21c)+_0x5458b1['name']+_0x206a88(0x1af),_0x57aad4,_0x319e83));const _0x1900a3=_0x5dd426===_0x2aeca7-0x1;!_0x1900a3&&!_0x5458b1[_0x206a88(0x215)]&&_0x1c2336[_0x206a88(0x188)](createIssue(_0x206a88(0x1b7),_0x319e83+'.milestone',_0x206a88(0x196),'Stage\x20\x27'+_0x5458b1[_0x206a88(0x1b2)]+_0x206a88(0x1b1),_0x57aad4,_0x319e83));(!_0x5458b1[_0x206a88(0x1c6)]||_0x5458b1['exit_criteria'][_0x206a88(0x1b3)]===0x0)&&_0x1c2336[_0x206a88(0x188)](createIssue(_0x206a88(0x21f),_0x319e83+_0x206a88(0x1b5),_0x206a88(0x1b8),_0x206a88(0x21c)+_0x5458b1[_0x206a88(0x1b2)]+_0x206a88(0x1e5),_0x57aad4,_0x319e83));const _0x3541c4=_0x5458b1[_0x206a88(0x211)]?.[_0x206a88(0x1b3)]??0x0;if(_0x3541c4===0x0)_0x1c2336[_0x206a88(0x188)](createIssue(_0x206a88(0x1b7),_0x319e83+_0x206a88(0x1db),_0x206a88(0x1c8),_0x206a88(0x21c)+_0x5458b1[_0x206a88(0x1b2)]+'\x27\x20has\x20no\x20steps',_0x57aad4,_0x319e83+_0x206a88(0x1db)));else{if(_0x3541c4===0x1)_0x1c2336[_0x206a88(0x188)](createIssue(_0x206a88(0x21f),_0x319e83+_0x206a88(0x1db),_0x206a88(0x1c8),_0x206a88(0x21c)+_0x5458b1[_0x206a88(0x1b2)]+_0x206a88(0x1d0),_0x57aad4,_0x319e83+_0x206a88(0x1db)));else _0x3541c4<=0x3&&_0x1c2336[_0x206a88(0x188)](createIssue('warning',_0x319e83+_0x206a88(0x1db),_0x206a88(0x20d),_0x206a88(0x21c)+_0x5458b1[_0x206a88(0x1b2)]+_0x206a88(0x193)+_0x3541c4+_0x206a88(0x174),_0x57aad4,_0x319e83+_0x206a88(0x1db)));}return _0x1c2336;}function validateStep(_0x18fd8a,_0x4d73d1,_0x397e49,_0x5944ff){const _0x5ab8aa=a130_0x420c,_0x409eb4=[];if(_0x18fd8a['type']===_0x5ab8aa(0x176))return _0x18fd8a[_0x5ab8aa(0x20f)]&&_0x409eb4[_0x5ab8aa(0x188)](createIssue(_0x5ab8aa(0x1b7),_0x4d73d1+'.next',_0x5ab8aa(0x1ef),_0x5ab8aa(0x1ae)+_0x18fd8a[_0x5ab8aa(0x1b2)]+_0x5ab8aa(0x1cc),_0x397e49)),_0x5ab8aa(0x1ed)in _0x18fd8a&&_0x18fd8a[_0x5ab8aa(0x1ed)]!==undefined&&_0x409eb4[_0x5ab8aa(0x188)](createIssue(_0x5ab8aa(0x1b7),_0x4d73d1+'.with',_0x5ab8aa(0x1ef),'End\x20step\x20\x27'+_0x18fd8a[_0x5ab8aa(0x1b2)]+_0x5ab8aa(0x203),_0x397e49)),_0x409eb4;_0x18fd8a['next']&&(_0x397e49['stepNames']&&!_0x397e49[_0x5ab8aa(0x200)][_0x5ab8aa(0x205)](_0x18fd8a[_0x5ab8aa(0x20f)])&&_0x409eb4[_0x5ab8aa(0x188)](createIssue('error',_0x4d73d1+_0x5ab8aa(0x21b),_0x5ab8aa(0x17c),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x18fd8a[_0x5ab8aa(0x20f)]+'\x27',_0x397e49)));switch(_0x18fd8a[_0x5ab8aa(0x189)]){case _0x5ab8aa(0x1df):_0x409eb4['push'](...validateWaitStep(_0x18fd8a,_0x4d73d1,_0x397e49,_0x5944ff));break;case _0x5ab8aa(0x18e):_0x409eb4['push'](...validateActivationStep(_0x18fd8a,_0x4d73d1,_0x397e49));break;case _0x5ab8aa(0x1e6):_0x409eb4['push'](...validateDecisionPointStep(_0x18fd8a,_0x4d73d1,_0x397e49,_0x5944ff));break;case'ab_test':_0x409eb4['push'](...validateAbTestStep(_0x18fd8a,_0x4d73d1,_0x397e49,_0x5944ff));break;case'jump':_0x409eb4[_0x5ab8aa(0x188)](...validateJumpStep(_0x18fd8a,_0x4d73d1,_0x397e49));break;}return _0x409eb4;}function validateWaitStep(_0x5a826f,_0x3225bd,_0x4a7142,_0x4e97cc){const _0x18a8ce=a130_0x420c,_0x10bc39=[];if(!_0x5a826f['with'])return _0x10bc39[_0x18a8ce(0x188)](createIssue(_0x18a8ce(0x1b7),_0x3225bd+_0x18a8ce(0x1a2),_0x18a8ce(0x1e0),_0x18a8ce(0x1a0),_0x4a7142,_0x3225bd)),_0x10bc39;if(_0x5a826f[_0x18a8ce(0x1ed)]['condition']){const _0x41aa08=_0x5a826f[_0x18a8ce(0x1ed)][_0x18a8ce(0x19f)];if(_0x41aa08[_0x18a8ce(0x1f8)]){_0x4a7142[_0x18a8ce(0x1f7)]?.[_0x18a8ce(0x1ba)](_0x41aa08[_0x18a8ce(0x1f8)]);!_0x41aa08[_0x18a8ce(0x1f8)]['startsWith'](_0x18a8ce(0x1d4))&&(_0x4a7142[_0x18a8ce(0x201)]&&!_0x4a7142[_0x18a8ce(0x201)][_0x18a8ce(0x205)](_0x41aa08[_0x18a8ce(0x1f8)])&&_0x10bc39[_0x18a8ce(0x188)](createIssue(_0x18a8ce(0x1b7),_0x3225bd+'.with.condition.segment','MISSING_SEGMENT_REFERENCE',_0x18a8ce(0x1ac)+_0x41aa08[_0x18a8ce(0x1f8)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x4a7142)));_0x41aa08['next']&&_0x4a7142['stepNames']&&!_0x4a7142[_0x18a8ce(0x200)]['has'](_0x41aa08['next'])&&_0x10bc39[_0x18a8ce(0x188)](createIssue('error',_0x3225bd+_0x18a8ce(0x20b),_0x18a8ce(0x17c),_0x18a8ce(0x1c3)+_0x41aa08['next']+'\x27',_0x4a7142));_0x41aa08[_0x18a8ce(0x21e)]?.['next']&&_0x4a7142[_0x18a8ce(0x200)]&&!_0x4a7142[_0x18a8ce(0x200)][_0x18a8ce(0x205)](_0x41aa08[_0x18a8ce(0x21e)][_0x18a8ce(0x20f)])&&_0x10bc39[_0x18a8ce(0x188)](createIssue(_0x18a8ce(0x1b7),_0x3225bd+'.with.condition.timeout.next',_0x18a8ce(0x17c),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x41aa08[_0x18a8ce(0x21e)][_0x18a8ce(0x20f)]+'\x27',_0x4a7142));const _0x306fc9=_0x41aa08[_0x18a8ce(0x20f)]||_0x5a826f[_0x18a8ce(0x20f)],_0x40592a=_0x41aa08['timeout']?.[_0x18a8ce(0x20f)]||_0x5a826f[_0x18a8ce(0x20f)];if(_0x306fc9){const _0x12edf0=_0x4e97cc[_0x18a8ce(0x1e7)](_0x306fc9);_0x12edf0?.['type']==='merge'&&_0x10bc39[_0x18a8ce(0x188)](createIssue(_0x18a8ce(0x21f),_0x3225bd+_0x18a8ce(0x20b),'BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x306fc9+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x4a7142,_0x3225bd+'.with.condition'));}if(_0x40592a){const _0x3dd131=_0x4e97cc[_0x18a8ce(0x1e7)](_0x40592a);_0x3dd131?.[_0x18a8ce(0x189)]===_0x18a8ce(0x202)&&_0x10bc39['push'](createIssue(_0x18a8ce(0x21f),_0x3225bd+'.with.condition.timeout.next',_0x18a8ce(0x1e9),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x40592a+_0x18a8ce(0x1dc),_0x4a7142,_0x3225bd+_0x18a8ce(0x20e)));}}}return _0x10bc39;}function validateActivationStep(_0x316bf2,_0x2aabd5,_0x2cde8c){const _0x97fbbb=a130_0x420c,_0x27d763=[];if(!_0x316bf2[_0x97fbbb(0x1ed)]?.['activation'])return _0x27d763[_0x97fbbb(0x188)](createIssue(_0x97fbbb(0x1b7),_0x2aabd5+'.with.activation',_0x97fbbb(0x213),_0x97fbbb(0x1c2),_0x2cde8c,_0x2aabd5)),_0x27d763;const _0x4c2d91=_0x316bf2[_0x97fbbb(0x1ed)][_0x97fbbb(0x18e)];return _0x2cde8c[_0x97fbbb(0x217)]&&!_0x4c2d91[_0x97fbbb(0x1d8)](_0x97fbbb(0x1d4))&&(!_0x2cde8c['activationKeys'][_0x97fbbb(0x205)](_0x4c2d91)&&_0x27d763[_0x97fbbb(0x188)](createIssue(_0x97fbbb(0x1b7),_0x2aabd5+_0x97fbbb(0x192),_0x97fbbb(0x1e8),_0x97fbbb(0x212)+_0x4c2d91+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x2cde8c))),_0x27d763;}function validateDecisionPointStep(_0x309079,_0x54e237,_0x50fede,_0x3222f9){const _0x449bf6=a130_0x420c,_0xd19b9a=[];if(!_0x309079[_0x449bf6(0x1ed)]?.['branches']||_0x309079[_0x449bf6(0x1ed)][_0x449bf6(0x1d5)][_0x449bf6(0x1b3)]===0x0)return _0xd19b9a[_0x449bf6(0x188)](createIssue(_0x449bf6(0x1b7),_0x54e237+_0x449bf6(0x1cf),_0x449bf6(0x1e2),_0x449bf6(0x1c5),_0x50fede,_0x54e237)),_0xd19b9a;for(let _0x47c9ff=0x0;_0x47c9ff<_0x309079[_0x449bf6(0x1ed)][_0x449bf6(0x1d5)]['length'];_0x47c9ff++){const _0x4ad4d5=_0x309079[_0x449bf6(0x1ed)][_0x449bf6(0x1d5)][_0x47c9ff],_0x2fae08=_0x54e237+_0x449bf6(0x182)+_0x47c9ff+']';_0x4ad4d5[_0x449bf6(0x1f8)]&&!_0x4ad4d5[_0x449bf6(0x20c)]&&(_0x50fede[_0x449bf6(0x1f7)]?.[_0x449bf6(0x1ba)](_0x4ad4d5[_0x449bf6(0x1f8)]),!_0x4ad4d5[_0x449bf6(0x1f8)]['startsWith']('ref:')&&(_0x50fede[_0x449bf6(0x201)]&&!_0x50fede[_0x449bf6(0x201)][_0x449bf6(0x205)](_0x4ad4d5[_0x449bf6(0x1f8)])&&_0xd19b9a[_0x449bf6(0x188)](createIssue(_0x449bf6(0x1b7),_0x2fae08+_0x449bf6(0x1c0),'MISSING_SEGMENT_REFERENCE',_0x449bf6(0x175)+_0x4ad4d5[_0x449bf6(0x1f8)]+'\x27',_0x50fede))));_0x4ad4d5[_0x449bf6(0x20f)]&&_0x50fede['stepNames']&&!_0x50fede['stepNames'][_0x449bf6(0x205)](_0x4ad4d5[_0x449bf6(0x20f)])&&_0xd19b9a[_0x449bf6(0x188)](createIssue(_0x449bf6(0x1b7),_0x2fae08+_0x449bf6(0x21b),'INVALID_NEXT_REFERENCE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x4ad4d5[_0x449bf6(0x20f)]+'\x27',_0x50fede));if(_0x4ad4d5[_0x449bf6(0x20f)]){const _0x468ac2=_0x3222f9[_0x449bf6(0x1e7)](_0x4ad4d5['next']);_0x468ac2?.[_0x449bf6(0x189)]==='merge'&&_0xd19b9a[_0x449bf6(0x188)](createIssue(_0x449bf6(0x21f),_0x2fae08+_0x449bf6(0x21b),_0x449bf6(0x1e9),'Decision\x20branch\x20\x27'+_0x4ad4d5[_0x449bf6(0x1b2)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x4ad4d5[_0x449bf6(0x20f)]+_0x449bf6(0x1a1),_0x50fede));}}return _0xd19b9a;}function validateAbTestStep(_0x23eb34,_0x130e43,_0x4946f5,_0xc095da){const _0x2dfdfc=a130_0x420c,_0xf21193=[];if(!_0x23eb34[_0x2dfdfc(0x1ed)]?.[_0x2dfdfc(0x191)]||_0x23eb34['with']['variants'][_0x2dfdfc(0x1b3)]===0x0)return _0xf21193[_0x2dfdfc(0x188)](createIssue(_0x2dfdfc(0x1b7),_0x130e43+_0x2dfdfc(0x19b),_0x2dfdfc(0x1e2),_0x2dfdfc(0x1bb),_0x4946f5,_0x130e43)),_0xf21193;const _0x1ad4f4=_0x23eb34['with'][_0x2dfdfc(0x191)][_0x2dfdfc(0x21d)]((_0x2e022e,_0xf024ea)=>_0x2e022e+(_0xf024ea['percentage']||0x0),0x0);Math[_0x2dfdfc(0x1b4)](_0x1ad4f4-0x64)>0.01&&_0xf21193[_0x2dfdfc(0x188)](createIssue(_0x2dfdfc(0x1b7),_0x130e43+_0x2dfdfc(0x19b),_0x2dfdfc(0x1a8),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x1ad4f4+'%)',_0x4946f5));for(let _0x31447b=0x0;_0x31447b<_0x23eb34[_0x2dfdfc(0x1ed)][_0x2dfdfc(0x191)][_0x2dfdfc(0x1b3)];_0x31447b++){const _0x4b8d3b=_0x23eb34['with'][_0x2dfdfc(0x191)][_0x31447b],_0x19032b=_0x130e43+_0x2dfdfc(0x1a3)+_0x31447b+']';_0x4b8d3b[_0x2dfdfc(0x20f)]&&_0x4946f5['stepNames']&&!_0x4946f5[_0x2dfdfc(0x200)][_0x2dfdfc(0x205)](_0x4b8d3b[_0x2dfdfc(0x20f)])&&_0xf21193[_0x2dfdfc(0x188)](createIssue('error',_0x19032b+'.next',_0x2dfdfc(0x17c),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x4b8d3b[_0x2dfdfc(0x20f)]+'\x27',_0x4946f5));if(_0x4b8d3b[_0x2dfdfc(0x20f)]){const _0x1b3a79=_0xc095da[_0x2dfdfc(0x1e7)](_0x4b8d3b[_0x2dfdfc(0x20f)]);_0x1b3a79?.[_0x2dfdfc(0x189)]==='merge'&&_0xf21193[_0x2dfdfc(0x188)](createIssue(_0x2dfdfc(0x21f),_0x19032b+_0x2dfdfc(0x21b),_0x2dfdfc(0x1e9),_0x2dfdfc(0x1f4)+_0x4b8d3b[_0x2dfdfc(0x1b2)]+_0x2dfdfc(0x204)+_0x4b8d3b[_0x2dfdfc(0x20f)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x4946f5));}}return _0xf21193;}function a130_0x4d7d(){const _0x6447cc=['length','abs','.exit_criteria','keys','error','MISSING_EXIT_CRITERIA','\x20(across\x20','add','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','some','issues','7296255edOEoI','12BOnxPV','.segment','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','Activation\x20step\x20requires\x20an\x20activation\x20reference','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','Embedded\x20segment\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','exit_criteria','skipSchema','INSUFFICIENT_STEPS','MERGE_TO_MERGE_CHAIN','MISSING_STAGES','document','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','Jump\x20step\x20requires\x20a\x20target','UNUSED_EMBEDDED_SEGMENT','.with.branches','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.entry_criteria','48027910DkzwZS','launched','ref:','branches','safeParse','description','startsWith','.steps[','map','.steps','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','777291RvnPIx','source','wait','MISSING_WAIT_PARAMS','success','MISSING_CONDITIONS','\x27\x20(first\x20defined\x20at\x20steps[','.type','\x27\x20has\x20no\x20exit_criteria\x20defined','decision_point','get','MISSING_ACTIVATION_DEFINITION','BRANCH_DIRECTLY_TO_MERGE','.milestone','794582TYpWoi','versions','with','timeout\x20of\x20\x27','END_STEP_HAS_NEXT_OR_WITH','target','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','level','SINGLE_INPUT_MERGE','A/B\x20test\x20variant\x20\x27','includes','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','referencedSegments','segment','TOO_MANY_STAGES','JOURNEY_SCHEMA_ERROR','DUPLICATE_STEP_NAME','segments.','every','path',').\x20Merge\x20is\x20unnecessary.','stepNames','embeddedSegments','merge','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','has','stages','.with.target','step\x20\x27','rule','4035845XdRUTh','.with.condition.next','excluded','FEW_STEPS','.with.condition.timeout','next','stages[','steps','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','MISSING_ACTIVATION_REF','versions[','milestone','MISSING_ENTRY_CRITERIA','activationKeys','symbol','MISSING_GOAL','segments','.next','Stage\x20\x27','reduce','timeout','warning','replace','excluded_','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','journey','\x20steps\x20(may\x20be\x20too\x20simple)','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','end','version','data','latest','condition\x20of\x20\x27','set','INVALID_NEXT_REFERENCE','ab_test','MISSING_END_STEP','goal','1493770hkKgBc','size','.with.branches[','\x20with\x20latest:\x20true','13864SmWXbI','state','sort','Journey\x20has\x20no\x20goal\x20defined','push','type','\x20stages\x20but\x20maximum\x20is\x20','stage','join','journeys[','activation','DUPLICATE_LATEST','6055QFiNiu','variants','.with.activation','\x27\x20has\x20only\x20','.rule','code','MISSING_MILESTONE','journey\x20entry',').\x20Use\x20a\x20merge\x20step.','splice','.name','.with.variants','endsWith','journeys','\x27\x20has\x20no\x20end\x20step','condition','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','\x27\x20with\x20no\x20action\x20in\x20between','.with','.with.variants[','4ARWqhs','trim','.exit_criteria[','entry_criteria','INVALID_AB_TEST_PERCENTAGES','Merge\x20step\x20\x27','message','variant\x20\x27','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','indices','End\x20step\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','activations','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','name'];a130_0x4d7d=function(){return _0x6447cc;};return a130_0x4d7d();}function validateJumpStep(_0x41b36e,_0x2e41e5,_0x47deec){const _0x51b635=a130_0x420c,_0x557836=[];if(!_0x41b36e[_0x51b635(0x1ed)]?.['target'])return _0x557836[_0x51b635(0x188)](createIssue(_0x51b635(0x1b7),_0x2e41e5+_0x51b635(0x207),'INVALID_JUMP_TARGET',_0x51b635(0x1cd),_0x47deec,_0x2e41e5)),_0x557836;return(!_0x41b36e[_0x51b635(0x1ed)][_0x51b635(0x1f0)][_0x51b635(0x173)]||!_0x41b36e[_0x51b635(0x1ed)][_0x51b635(0x1f0)][_0x51b635(0x18b)])&&_0x557836[_0x51b635(0x188)](createIssue(_0x51b635(0x1b7),_0x2e41e5+_0x51b635(0x207),'INVALID_JUMP_TARGET','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x47deec)),_0x557836;}function buildConvergenceMap(_0x2baf0d){const _0x5e6a17=a130_0x420c,_0x9df35f=new Map();function _0x13f241(_0x144581,_0x24a6a3){const _0x1d3360=a130_0x420c,_0x147969=_0x9df35f[_0x1d3360(0x1e7)](_0x144581)||[];_0x147969['push'](_0x24a6a3),_0x9df35f['set'](_0x144581,_0x147969);}for(const _0x528ac7 of _0x2baf0d){_0x528ac7['next']&&_0x13f241(_0x528ac7[_0x5e6a17(0x20f)],{'stepName':_0x528ac7[_0x5e6a17(0x1b2)],'description':_0x5e6a17(0x208)+_0x528ac7[_0x5e6a17(0x1b2)]+'\x27'});if(_0x528ac7[_0x5e6a17(0x189)]==='decision_point'&&_0x528ac7[_0x5e6a17(0x1ed)]?.[_0x5e6a17(0x1d5)])for(const _0x23eaa3 of _0x528ac7[_0x5e6a17(0x1ed)]['branches']){_0x23eaa3[_0x5e6a17(0x20f)]&&_0x13f241(_0x23eaa3[_0x5e6a17(0x20f)],{'stepName':_0x528ac7['name'],'description':'branch\x20\x27'+_0x23eaa3[_0x5e6a17(0x1b2)]+'\x27\x20of\x20\x27'+_0x528ac7['name']+'\x27'});}if(_0x528ac7[_0x5e6a17(0x189)]===_0x5e6a17(0x17d)&&_0x528ac7[_0x5e6a17(0x1ed)]?.[_0x5e6a17(0x191)])for(const _0x5e1796 of _0x528ac7['with'][_0x5e6a17(0x191)]){_0x5e1796[_0x5e6a17(0x20f)]&&_0x13f241(_0x5e1796[_0x5e6a17(0x20f)],{'stepName':_0x528ac7[_0x5e6a17(0x1b2)],'description':_0x5e6a17(0x1ab)+_0x5e1796[_0x5e6a17(0x1b2)]+'\x27\x20of\x20\x27'+_0x528ac7[_0x5e6a17(0x1b2)]+'\x27'});}_0x528ac7[_0x5e6a17(0x189)]===_0x5e6a17(0x1df)&&_0x528ac7['with']?.[_0x5e6a17(0x19f)]&&(_0x528ac7['with'][_0x5e6a17(0x19f)][_0x5e6a17(0x20f)]&&_0x13f241(_0x528ac7['with'][_0x5e6a17(0x19f)][_0x5e6a17(0x20f)],{'stepName':_0x528ac7['name'],'description':_0x5e6a17(0x17a)+_0x528ac7[_0x5e6a17(0x1b2)]+'\x27'}),_0x528ac7[_0x5e6a17(0x1ed)][_0x5e6a17(0x19f)]['timeout']?.[_0x5e6a17(0x20f)]&&_0x13f241(_0x528ac7['with']['condition'][_0x5e6a17(0x21e)][_0x5e6a17(0x20f)],{'stepName':_0x528ac7[_0x5e6a17(0x1b2)],'description':_0x5e6a17(0x1ee)+_0x528ac7[_0x5e6a17(0x1b2)]+'\x27'}));}return _0x9df35f;}function validateFlowControl(_0x4f88d8,_0x52e15c,_0x153f29){const _0xaf6b35=a130_0x420c,_0x54e35a=[],_0x452cdf=_0xaf6b35(0x210)+_0x52e15c+']',_0x37cf18=_0x4f88d8[_0xaf6b35(0x211)]||[];if(_0x37cf18[_0xaf6b35(0x1b3)]===0x0)return _0x54e35a;const _0x24adb3=new Map();for(const _0x4b6d63 of _0x37cf18){_0x4b6d63[_0xaf6b35(0x1b2)]&&_0x24adb3[_0xaf6b35(0x17b)](_0x4b6d63[_0xaf6b35(0x1b2)],_0x4b6d63);}const _0x1895e4=buildConvergenceMap(_0x37cf18),_0x5caac2=_0x37cf18[_0xaf6b35(0x1bc)](_0x3f8b92=>_0x3f8b92['type']===_0xaf6b35(0x176));!_0x5caac2&&_0x54e35a[_0xaf6b35(0x188)](createIssue(_0xaf6b35(0x1b7),_0x452cdf+_0xaf6b35(0x1db),_0xaf6b35(0x17e),_0xaf6b35(0x21c)+_0x4f88d8[_0xaf6b35(0x1b2)]+_0xaf6b35(0x19e),_0x153f29));for(const [_0x4a6c9a,_0x211c45]of _0x1895e4){const _0x73b57b=_0x24adb3[_0xaf6b35(0x1e7)](_0x4a6c9a);if(!_0x73b57b)continue;if(_0x211c45['length']>0x1&&_0x73b57b['type']!==_0xaf6b35(0x202)){const _0x1e90b8=_0x211c45[_0xaf6b35(0x1da)](_0x54c740=>_0x54c740[_0xaf6b35(0x1d7)])[_0xaf6b35(0x18c)](',\x20');_0x54e35a[_0xaf6b35(0x188)](createIssue(_0xaf6b35(0x1b7),_0x452cdf+_0xaf6b35(0x1db),'CONVERGENCE_WITHOUT_MERGE',_0xaf6b35(0x171)+_0x4a6c9a+'\x27\x20(from:\x20'+_0x1e90b8+_0xaf6b35(0x198),_0x153f29));}_0x211c45[_0xaf6b35(0x1b3)]===0x1&&_0x73b57b[_0xaf6b35(0x189)]===_0xaf6b35(0x202)&&_0x54e35a[_0xaf6b35(0x188)](createIssue(_0xaf6b35(0x21f),_0x452cdf+_0xaf6b35(0x1db),_0xaf6b35(0x1f3),'Merge\x20step\x20\x27'+_0x4a6c9a+_0xaf6b35(0x1f6)+_0x211c45[0x0][_0xaf6b35(0x1d7)]+_0xaf6b35(0x1ff),_0x153f29));}for(const _0x526b30 of _0x37cf18){if(_0x526b30[_0xaf6b35(0x189)]===_0xaf6b35(0x202)&&_0x526b30['next']){const _0x3659d3=_0x24adb3[_0xaf6b35(0x1e7)](_0x526b30[_0xaf6b35(0x20f)]);_0x3659d3?.['type']===_0xaf6b35(0x202)&&_0x54e35a[_0xaf6b35(0x188)](createIssue(_0xaf6b35(0x1b7),_0x452cdf+_0xaf6b35(0x1db),_0xaf6b35(0x1c9),_0xaf6b35(0x1a9)+_0x526b30['name']+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x526b30['next']+_0xaf6b35(0x1f1),_0x153f29));}}return _0x54e35a;}function validateCriteria(_0xf43523,_0x4c6270,_0x4ec971){const _0x336c34=a130_0x420c,_0x671006=[];return _0xf43523[_0x336c34(0x1f8)]&&(_0x4ec971[_0x336c34(0x1f7)]?.[_0x336c34(0x1ba)](_0xf43523[_0x336c34(0x1f8)]),!_0xf43523[_0x336c34(0x1f8)][_0x336c34(0x1d8)](_0x336c34(0x1d4))&&(_0x4ec971[_0x336c34(0x201)]&&!_0x4ec971['embeddedSegments'][_0x336c34(0x205)](_0xf43523[_0x336c34(0x1f8)])&&_0x671006[_0x336c34(0x188)](createIssue('error',_0x4c6270+_0x336c34(0x1c0),'MISSING_SEGMENT_REFERENCE','Criteria\x20references\x20undefined\x20segment\x20\x27'+_0xf43523[_0x336c34(0x1f8)]+'\x27',_0x4ec971)))),_0x671006;}function validateEmbeddedSegment(_0x38fa0c,_0x3e9c68,_0xe2096a){const _0x18642c=a130_0x420c,_0x2229bd=[];return _0x38fa0c[_0x18642c(0x209)]&&_0x2229bd[_0x18642c(0x188)](...validateRuleDef(_0x38fa0c['rule'],_0x3e9c68+_0x18642c(0x194),_0xe2096a)),_0x2229bd;}function validateStage(_0x7ce415,_0x54852f,_0xce459a,_0x396cbd){const _0x4ce470=a130_0x420c,_0x4ab71c=[],_0x32736d='stages['+_0x54852f+']',_0x49a136=new Map(),_0x25cefc=new Map();if(_0x7ce415[_0x4ce470(0x211)]){for(let _0x489bf3=0x0;_0x489bf3<_0x7ce415['steps'][_0x4ce470(0x1b3)];_0x489bf3++){const _0x3978f6=_0x7ce415[_0x4ce470(0x211)][_0x489bf3];_0x3978f6[_0x4ce470(0x1b2)]&&_0x49a136['set'](_0x3978f6[_0x4ce470(0x1b2)],_0x3978f6);}for(let _0x5a219f=0x0;_0x5a219f<_0x7ce415['steps'][_0x4ce470(0x1b3)];_0x5a219f++){const _0x2f98d4=_0x7ce415['steps'][_0x5a219f],_0x1b8b2d=_0x32736d+_0x4ce470(0x1d9)+_0x5a219f+']';if(_0x2f98d4['name']){if(_0x25cefc[_0x4ce470(0x205)](_0x2f98d4['name'])){const _0x2ce45b=_0x25cefc['get'](_0x2f98d4['name']);_0x4ab71c[_0x4ce470(0x188)](createIssue('error',_0x1b8b2d+_0x4ce470(0x19a),_0x4ce470(0x1fb),'Duplicate\x20step\x20name\x20\x27'+_0x2f98d4[_0x4ce470(0x1b2)]+_0x4ce470(0x1e3)+_0x2ce45b+'])',_0x396cbd));}else _0x25cefc[_0x4ce470(0x17b)](_0x2f98d4[_0x4ce470(0x1b2)],_0x5a219f);}_0x4ab71c[_0x4ce470(0x188)](...validateStep(_0x2f98d4,_0x1b8b2d,_0x396cbd,_0x49a136));}}_0x7ce415['entry_criteria']&&_0x4ab71c[_0x4ce470(0x188)](...validateCriteria(_0x7ce415['entry_criteria'],_0x32736d+_0x4ce470(0x1d1),_0x396cbd));if(_0x7ce415[_0x4ce470(0x1c6)])for(let _0x1e5b6c=0x0;_0x1e5b6c<_0x7ce415[_0x4ce470(0x1c6)]['length'];_0x1e5b6c++){_0x4ab71c['push'](...validateCriteria(_0x7ce415[_0x4ce470(0x1c6)][_0x1e5b6c],_0x32736d+_0x4ce470(0x1a6)+_0x1e5b6c+']',_0x396cbd));}return _0x7ce415['milestone']&&_0x4ab71c[_0x4ce470(0x188)](...validateCriteria(_0x7ce415['milestone'],_0x32736d+_0x4ce470(0x1ea),_0x396cbd)),_0x4ab71c['push'](...validateStageStructure(_0x7ce415,_0x54852f,_0xce459a,_0x396cbd)),_0x4ab71c[_0x4ce470(0x188)](...validateFlowControl(_0x7ce415,_0x54852f,_0x396cbd)),_0x4ab71c;}function validateStagesForVersion(_0x167b9e,_0x1eeecd,_0x441bd6,_0x492b27,_0x46634c,_0x598848,_0xd5677){const _0x283b98=a130_0x420c;if(_0x167b9e[_0x283b98(0x1b3)]===0x0){_0x46634c[_0x283b98(0x188)]({'level':_0x283b98(0x1b7),'path':_0x492b27+_0x283b98(0x206),'code':_0x283b98(0x1ca),'message':_0x283b98(0x1c1),'location':getLocationFromPath(_0x441bd6[_0x283b98(0x1cb)],_0x441bd6['source'],[_0x283b98(0x206)])});return;}const _0x5b8ff8=new Set();for(const _0x34f40d of _0x167b9e){if(_0x34f40d[_0x283b98(0x211)])for(const _0x15cb43 of _0x34f40d[_0x283b98(0x211)]){_0x15cb43[_0x283b98(0x1b2)]&&_0x5b8ff8['add'](_0x15cb43[_0x283b98(0x1b2)]);}}const _0xbb4eaa={..._0x441bd6,'stepNames':_0x5b8ff8},_0x27fe27=validateVersionStructure(_0x167b9e,_0xbb4eaa);for(const _0x2f8f3c of _0x27fe27){const _0x2ecbad=_0x492b27?{..._0x2f8f3c,'path':''+_0x492b27+_0x2f8f3c[_0x283b98(0x1fe)]}:_0x2f8f3c;if(_0x2ecbad[_0x283b98(0x1f2)]==='error')_0x46634c[_0x283b98(0x188)](_0x2ecbad);else _0x598848[_0x283b98(0x188)](_0x2ecbad);}for(let _0x595ee8=0x0;_0x595ee8<_0x167b9e[_0x283b98(0x1b3)];_0x595ee8++){const _0x187d08=validateStage(_0x167b9e[_0x595ee8],_0x595ee8,_0x167b9e[_0x283b98(0x1b3)],_0xbb4eaa);for(const _0x52c410 of _0x187d08){const _0x457e44=_0x492b27?{..._0x52c410,'path':''+_0x492b27+_0x52c410['path']}:_0x52c410;if(_0x457e44[_0x283b98(0x1f2)]===_0x283b98(0x1b7))_0x46634c[_0x283b98(0x188)](_0x457e44);else _0x598848[_0x283b98(0x188)](_0x457e44);}}if(_0x1eeecd[_0x283b98(0x17f)]){const _0x17e669=_0xd5677?.['goalIsInherited']?'goal':_0x492b27+_0x283b98(0x17f),_0xd8de89=validateCriteria(_0x1eeecd[_0x283b98(0x17f)],_0x17e669,_0xbb4eaa);for(const _0x2907fb of _0xd8de89){if(_0x2907fb['level']==='error')_0x46634c[_0x283b98(0x188)](_0x2907fb);else _0x598848[_0x283b98(0x188)](_0x2907fb);}}}function extractVersionIndex(_0x138da3){const _0x291c12=_0x138da3['match'](/^journeys\[(\d+)\]\./);return _0x291c12?_0x291c12[0x1]:undefined;}function deduplicateAcrossVersions(_0x540476){const _0x27214f=a130_0x420c,_0x498d45=new Map();for(let _0x4a4705=0x0;_0x4a4705<_0x540476[_0x27214f(0x1b3)];_0x4a4705++){const _0x2288cc=_0x540476[_0x4a4705][_0x27214f(0x195)]+':'+_0x540476[_0x4a4705][_0x27214f(0x1aa)],_0x1f493b=extractVersionIndex(_0x540476[_0x4a4705][_0x27214f(0x1fe)]),_0x460614=_0x498d45[_0x27214f(0x1e7)](_0x2288cc);if(_0x460614){_0x460614[_0x27214f(0x1ad)][_0x27214f(0x188)](_0x4a4705);if(_0x1f493b)_0x460614[_0x27214f(0x1ec)]['add'](_0x1f493b);}else _0x498d45[_0x27214f(0x17b)](_0x2288cc,{'indices':[_0x4a4705],'versions':new Set(_0x1f493b?[_0x1f493b]:[])});}const _0x218173=new Set();for(const {indices:_0x5a4990,versions:_0x30bbeb}of _0x498d45['values']()){if(_0x30bbeb[_0x27214f(0x181)]<=0x1)continue;const _0xec830b=_0x540476[_0x5a4990[0x0]];_0xec830b['path']=_0xec830b[_0x27214f(0x1fe)][_0x27214f(0x220)](/^journeys\[\d+\]\./,''),_0xec830b['message']=_0xec830b[_0x27214f(0x1aa)]+_0x27214f(0x1b9)+_0x30bbeb[_0x27214f(0x181)]+'\x20versions)';for(let _0x210673=0x1;_0x210673<_0x5a4990['length'];_0x210673++){_0x218173[_0x27214f(0x1ba)](_0x5a4990[_0x210673]);}}const _0x470341=[..._0x218173][_0x27214f(0x186)]((_0x45bc6b,_0x17221b)=>_0x17221b-_0x45bc6b);for(const _0x1654e5 of _0x470341){_0x540476[_0x27214f(0x199)](_0x1654e5,0x1);}}function a130_0x420c(_0xbea8ee,_0x4df8aa){_0xbea8ee=_0xbea8ee-0x170;const _0x4d7d08=a130_0x4d7d();let _0x420c4b=_0x4d7d08[_0xbea8ee];return _0x420c4b;}export function validateJourneyDef(_0x1689ce,_0x552225={},_0x2993ce={}){const _0x55f279=a130_0x420c;if(_0x2993ce[_0x55f279(0x1c7)])return runJourneySemanticChecks(_0x1689ce,_0x552225);const _0x3a20f0=JourneyDefSchema[_0x55f279(0x1d6)](_0x1689ce);if(_0x3a20f0[_0x55f279(0x1e1)])return runJourneySemanticChecks(_0x3a20f0[_0x55f279(0x178)],_0x552225);return zodErrorsToJourneyValidationResult(_0x3a20f0[_0x55f279(0x1b7)],_0x552225);}function zodErrorsToJourneyValidationResult(_0x294bbe,_0x4f5286){const _0x3571ab=a130_0x420c,_0x1222d2=flattenZodIssues(_0x294bbe[_0x3571ab(0x1bd)]),_0x3dc496=_0x1222d2[_0x3571ab(0x1da)](_0x2824c9=>{const _0x2f66d1=_0x3571ab,_0x3c5b29=formatZodPath(_0x2824c9[_0x2f66d1(0x1fe)]),_0x3c0c72=mapJourneyZodIssueToCode(_0x2824c9,_0x3c5b29),_0x1c9502=getLocationFromPath(_0x4f5286[_0x2f66d1(0x1cb)],_0x4f5286[_0x2f66d1(0x1de)],_0x2824c9[_0x2f66d1(0x1fe)][_0x2f66d1(0x1da)](_0x1427fa=>typeof _0x1427fa===_0x2f66d1(0x218)?String(_0x1427fa):_0x1427fa));return{'level':_0x2f66d1(0x1b7),'path':_0x3c5b29,'code':_0x3c0c72,'message':_0x2824c9['message'],..._0x1c9502&&{'location':_0x1c9502}};});return{'valid':![],'errors':_0x3dc496,'warnings':[]};}function mapJourneyZodIssueToCode(_0xcd4208,_0x2b3bd9){const _0x580809=a130_0x420c;if(_0x2b3bd9===_0x580809(0x1b2))return'MISSING_NAME';if(_0x2b3bd9[_0x580809(0x19c)](_0x580809(0x1e4))&&_0x2b3bd9[_0x580809(0x1f5)]('steps'))return _0x580809(0x1fa);if(_0x2b3bd9===_0x580809(0x206)||_0x2b3bd9[_0x580809(0x19c)]('.stages'))return _0x580809(0x1ca);if(_0x2b3bd9===''&&_0xcd4208[_0x580809(0x1aa)][_0x580809(0x1f5)]('journeys,\x20stages,\x20or\x20versions'))return _0x580809(0x1ca);if(_0x2b3bd9[_0x580809(0x1f5)](_0x580809(0x18e)))return'ACTIVATION_SCHEMA_ERROR';return _0x580809(0x1fa);}function runJourneySemanticChecks(_0x1fd51b,_0x20ceab){const _0x4a387d=a130_0x420c,_0x12eeff=[],_0x1a0eda=[];(!_0x1fd51b[_0x4a387d(0x1b2)]||_0x1fd51b[_0x4a387d(0x1b2)][_0x4a387d(0x1a5)]()==='')&&_0x12eeff[_0x4a387d(0x188)]({'level':_0x4a387d(0x1b7),'path':_0x4a387d(0x1b2),'code':'MISSING_NAME','message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x20ceab['document'],_0x20ceab[_0x4a387d(0x1de)],[_0x4a387d(0x1b2)])});const _0x1516af=new Set();if(_0x1fd51b[_0x4a387d(0x21a)])for(const _0x57bf10 of Object[_0x4a387d(0x1b6)](_0x1fd51b[_0x4a387d(0x21a)])){_0x1516af[_0x4a387d(0x1ba)](_0x57bf10);}const _0x211418=new Set();if(_0x1fd51b['activations'])for(const _0x163268 of Object[_0x4a387d(0x1b6)](_0x1fd51b[_0x4a387d(0x1b0)])){_0x211418['add'](_0x163268);}const _0x4492c7=new Set(),_0x569e4b={..._0x20ceab,'embeddedSegments':_0x1516af,'referencedSegments':_0x4492c7,'activationKeys':_0x211418['size']>0x0?_0x211418:undefined};if(_0x1fd51b[_0x4a387d(0x21a)])for(const [_0x9c25fc,_0x5f001e]of Object['entries'](_0x1fd51b[_0x4a387d(0x21a)])){const _0x1d860d=validateEmbeddedSegment(_0x5f001e,'segments.'+_0x9c25fc,_0x569e4b);for(const _0x1cca74 of _0x1d860d){if(_0x1cca74[_0x4a387d(0x1f2)]===_0x4a387d(0x1b7))_0x12eeff[_0x4a387d(0x188)](_0x1cca74);else _0x1a0eda[_0x4a387d(0x188)](_0x1cca74);}}const _0x192958=!!_0x1fd51b[_0x4a387d(0x17f)],_0x2acd79=_0x1fd51b[_0x4a387d(0x19d)]?.[_0x4a387d(0x1fd)](_0x56e406=>!!_0x56e406[_0x4a387d(0x17f)])??![];!_0x192958&&!_0x2acd79&&_0x1a0eda[_0x4a387d(0x188)]({'level':'warning','path':_0x4a387d(0x17f),'code':_0x4a387d(0x219),'message':_0x4a387d(0x187),'location':getLocationFromPath(_0x20ceab[_0x4a387d(0x1cb)],_0x20ceab[_0x4a387d(0x1de)],['goal'])});const _0x52ee5e=_0x1fd51b[_0x4a387d(0x19d)]??_0x1fd51b[_0x4a387d(0x1ec)];if(_0x52ee5e&&_0x52ee5e['filter'](_0x4914e8=>_0x4914e8[_0x4a387d(0x179)]===!![])[_0x4a387d(0x1b3)]>0x1){const _0x2aaaf5=_0x1fd51b[_0x4a387d(0x19d)]?'journeys':'versions';_0x12eeff['push']({'level':_0x4a387d(0x1b7),'path':_0x2aaaf5,'code':_0x4a387d(0x18f),'message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x2aaaf5===_0x4a387d(0x19d)?_0x4a387d(0x197):_0x4a387d(0x177))+_0x4a387d(0x183),'location':getLocationFromPath(_0x20ceab['document'],_0x20ceab[_0x4a387d(0x1de)],[_0x2aaaf5])});}if(_0x1fd51b[_0x4a387d(0x19d)]&&_0x1fd51b[_0x4a387d(0x19d)][_0x4a387d(0x1b3)]>0x0)for(let _0x4a7297=0x0;_0x4a7297<_0x1fd51b['journeys'][_0x4a387d(0x1b3)];_0x4a7297++){const _0x5537a3=_0x1fd51b[_0x4a387d(0x19d)][_0x4a7297];if(_0x1fd51b[_0x4a387d(0x19d)][_0x4a387d(0x1b3)]>0x1&&_0x5537a3[_0x4a387d(0x185)]==='launched')continue;const _0x4ad9d3=_0x5537a3[_0x4a387d(0x206)]||[],_0x518224=_0x4a387d(0x18d)+_0x4a7297+'].',_0xd87256=!!_0x5537a3[_0x4a387d(0x17f)],_0x5dd843=_0xd87256?{..._0x1fd51b,'goal':_0x5537a3[_0x4a387d(0x17f)]}:_0x1fd51b;validateStagesForVersion(_0x4ad9d3,_0x5dd843,_0x569e4b,_0x518224,_0x12eeff,_0x1a0eda,{'goalIsInherited':!_0xd87256});}else{if(_0x1fd51b[_0x4a387d(0x1ec)]&&_0x1fd51b[_0x4a387d(0x1ec)][_0x4a387d(0x1b3)]>0x0)for(let _0xcf6c68=0x0;_0xcf6c68<_0x1fd51b[_0x4a387d(0x1ec)][_0x4a387d(0x1b3)];_0xcf6c68++){const _0x13ce4a=_0x1fd51b[_0x4a387d(0x1ec)][_0xcf6c68];if(_0x1fd51b[_0x4a387d(0x1ec)][_0x4a387d(0x1b3)]>0x1&&_0x13ce4a[_0x4a387d(0x185)]===_0x4a387d(0x1d3))continue;const _0x67f78b=_0x13ce4a[_0x4a387d(0x206)]||[],_0x564940=_0x4a387d(0x214)+_0xcf6c68+'].';validateStagesForVersion(_0x67f78b,_0x1fd51b,_0x569e4b,_0x564940,_0x12eeff,_0x1a0eda);}else{const _0x104150=_0x1fd51b[_0x4a387d(0x206)]||[];validateStagesForVersion(_0x104150,_0x1fd51b,_0x569e4b,'',_0x12eeff,_0x1a0eda);}}_0x1fd51b[_0x4a387d(0x19d)]&&_0x1fd51b[_0x4a387d(0x19d)][_0x4a387d(0x1b3)]>0x1&&(deduplicateAcrossVersions(_0x12eeff),deduplicateAcrossVersions(_0x1a0eda));for(const _0x7b4655 of _0x1516af){!_0x4492c7[_0x4a387d(0x205)](_0x7b4655)&&!_0x7b4655[_0x4a387d(0x1d8)](_0x4a387d(0x170))&&_0x1a0eda[_0x4a387d(0x188)]({'level':_0x4a387d(0x21f),'path':_0x4a387d(0x1fc)+_0x7b4655,'code':_0x4a387d(0x1ce),'message':_0x4a387d(0x1c4)+_0x7b4655+_0x4a387d(0x172),'location':getLocationFromPath(_0x20ceab[_0x4a387d(0x1cb)],_0x20ceab[_0x4a387d(0x1de)],[_0x4a387d(0x21a),_0x7b4655])});}return{'valid':_0x12eeff[_0x4a387d(0x1b3)]===0x0,'errors':_0x12eeff,'warnings':_0x1a0eda};}
|
|
1
|
+
(function(_0x4f5bd5,_0x3a6554){const _0x4f45cb=a130_0x1f76,_0x19903a=_0x4f5bd5();while(!![]){try{const _0x3301ab=-parseInt(_0x4f45cb(0x157))/0x1+-parseInt(_0x4f45cb(0x182))/0x2+parseInt(_0x4f45cb(0x154))/0x3+parseInt(_0x4f45cb(0x1b1))/0x4*(parseInt(_0x4f45cb(0x1b8))/0x5)+-parseInt(_0x4f45cb(0x165))/0x6+parseInt(_0x4f45cb(0x1e6))/0x7*(parseInt(_0x4f45cb(0x205))/0x8)+-parseInt(_0x4f45cb(0x1a7))/0x9*(-parseInt(_0x4f45cb(0x1f1))/0xa);if(_0x3301ab===_0x3a6554)break;else _0x19903a['push'](_0x19903a['shift']());}catch(_0x17253e){_0x19903a['push'](_0x19903a['shift']());}}}(a130_0x1e7d,0xea6dc));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0xfc0ed3,_0xf6d5e1,_0x40a09a,_0x27dc23,_0xdb9d4a,_0x1d85c9){const _0x30ee37=a130_0x1f76;return{'level':_0xfc0ed3,'path':_0xf6d5e1,'code':_0x40a09a,'message':_0x27dc23,'location':getLocationFromPath(_0xdb9d4a[_0x30ee37(0x1dd)],_0xdb9d4a[_0x30ee37(0x15e)],pathToArray(_0x1d85c9??_0xf6d5e1))};}function validateVersionStructure(_0x3cebae,_0x55e815){const _0xf47585=a130_0x1f76,_0x173ba2=[];return _0x3cebae[_0xf47585(0x18a)]>MAX_STAGES&&_0x173ba2['push'](createIssue('error',_0xf47585(0x1b4),_0xf47585(0x1e3),_0xf47585(0x19f)+_0x3cebae[_0xf47585(0x18a)]+_0xf47585(0x1ee)+MAX_STAGES,_0x55e815)),_0x173ba2;}function validateStageStructure(_0x37f1a1,_0x59242a,_0x25c143,_0x37dc34){const _0x26548c=a130_0x1f76,_0xc7faa1=[],_0xb7d7d8=_0x26548c(0x1c0)+_0x59242a+']';_0x59242a===0x0&&!_0x37f1a1[_0x26548c(0x171)]&&_0xc7faa1[_0x26548c(0x1c4)](createIssue('error',_0xb7d7d8+_0x26548c(0x18c),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x170),_0x37dc34,_0xb7d7d8));const _0x180e90=_0x59242a===_0x25c143-0x1;!_0x180e90&&!_0x37f1a1[_0x26548c(0x186)]&&_0xc7faa1['push'](createIssue(_0x26548c(0x1fa),_0xb7d7d8+_0x26548c(0x156),_0x26548c(0x1e9),'Stage\x20\x27'+_0x37f1a1['name']+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x37dc34,_0xb7d7d8));(!_0x37f1a1[_0x26548c(0x178)]||_0x37f1a1['exit_criteria'][_0x26548c(0x18a)]===0x0)&&_0xc7faa1[_0x26548c(0x1c4)](createIssue(_0x26548c(0x17f),_0xb7d7d8+_0x26548c(0x167),_0x26548c(0x175),_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x1af),_0x37dc34,_0xb7d7d8));const _0x3d27a4=_0x37f1a1[_0x26548c(0x1f7)]?.[_0x26548c(0x18a)]??0x0;if(_0x3d27a4===0x0)_0xc7faa1[_0x26548c(0x1c4)](createIssue('error',_0xb7d7d8+_0x26548c(0x1b2),_0x26548c(0x166),_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x188),_0x37dc34,_0xb7d7d8+'.steps'));else{if(_0x3d27a4===0x1)_0xc7faa1[_0x26548c(0x1c4)](createIssue(_0x26548c(0x17f),_0xb7d7d8+_0x26548c(0x1b2),_0x26548c(0x166),_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x189),_0x37dc34,_0xb7d7d8+_0x26548c(0x1b2)));else _0x3d27a4<=0x3&&_0xc7faa1[_0x26548c(0x1c4)](createIssue('warning',_0xb7d7d8+_0x26548c(0x1b2),'FEW_STEPS',_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x160)+_0x3d27a4+_0x26548c(0x15a),_0x37dc34,_0xb7d7d8+_0x26548c(0x1b2)));}return _0xc7faa1;}function validateStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210){const _0x1d7068=a130_0x1f76,_0x507db3=[];if(_0x4bc0ff['type']===_0x1d7068(0x1f6))return _0x4bc0ff[_0x1d7068(0x172)]&&_0x507db3[_0x1d7068(0x1c4)](createIssue('error',_0x4a26aa+_0x1d7068(0x1c8),_0x1d7068(0x185),'End\x20step\x20\x27'+_0x4bc0ff[_0x1d7068(0x190)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x3f5aef)),_0x1d7068(0x1ef)in _0x4bc0ff&&_0x4bc0ff[_0x1d7068(0x1ef)]!==undefined&&_0x507db3[_0x1d7068(0x1c4)](createIssue(_0x1d7068(0x1fa),_0x4a26aa+'.with','END_STEP_HAS_NEXT_OR_WITH',_0x1d7068(0x1c6)+_0x4bc0ff[_0x1d7068(0x190)]+_0x1d7068(0x152),_0x3f5aef)),_0x507db3;_0x4bc0ff[_0x1d7068(0x172)]&&(_0x3f5aef[_0x1d7068(0x197)]&&!_0x3f5aef[_0x1d7068(0x197)][_0x1d7068(0x1e2)](_0x4bc0ff[_0x1d7068(0x172)])&&_0x507db3['push'](createIssue('error',_0x4a26aa+_0x1d7068(0x1c8),_0x1d7068(0x1a3),_0x1d7068(0x169)+_0x4bc0ff[_0x1d7068(0x172)]+'\x27',_0x3f5aef)));switch(_0x4bc0ff[_0x1d7068(0x17a)]){case _0x1d7068(0x1a6):_0x507db3['push'](...validateWaitStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210));break;case _0x1d7068(0x19b):_0x507db3[_0x1d7068(0x1c4)](...validateActivationStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef));break;case'decision_point':_0x507db3[_0x1d7068(0x1c4)](...validateDecisionPointStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210));break;case _0x1d7068(0x1ff):_0x507db3[_0x1d7068(0x1c4)](...validateAbTestStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210));break;case'jump':_0x507db3[_0x1d7068(0x1c4)](...validateJumpStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef));break;}return _0x507db3;}function validateWaitStep(_0x1d50b6,_0x3fc45e,_0x434585,_0x3c8c54){const _0x311002=a130_0x1f76,_0x360742=[];if(!_0x1d50b6[_0x311002(0x1ef)])return _0x360742[_0x311002(0x1c4)](createIssue(_0x311002(0x1fa),_0x3fc45e+'.with',_0x311002(0x1cf),_0x311002(0x192),_0x434585,_0x3fc45e)),_0x360742;if(_0x1d50b6[_0x311002(0x1ef)][_0x311002(0x1ba)]){const _0x26b705=_0x1d50b6[_0x311002(0x1ef)]['condition'];if(_0x26b705[_0x311002(0x1a8)]){_0x434585[_0x311002(0x195)]?.[_0x311002(0x191)](_0x26b705['segment']);!_0x26b705[_0x311002(0x1a8)][_0x311002(0x1bd)]('ref:')&&(_0x434585[_0x311002(0x181)]&&!_0x434585[_0x311002(0x181)][_0x311002(0x1e2)](_0x26b705['segment'])&&_0x360742['push'](createIssue(_0x311002(0x1fa),_0x3fc45e+'.with.condition.segment','MISSING_SEGMENT_REFERENCE',_0x311002(0x1ec)+_0x26b705[_0x311002(0x1a8)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x434585)));_0x26b705[_0x311002(0x172)]&&_0x434585[_0x311002(0x197)]&&!_0x434585[_0x311002(0x197)]['has'](_0x26b705[_0x311002(0x172)])&&_0x360742['push'](createIssue(_0x311002(0x1fa),_0x3fc45e+_0x311002(0x173),'INVALID_NEXT_REFERENCE','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x26b705[_0x311002(0x172)]+'\x27',_0x434585));_0x26b705[_0x311002(0x1dc)]?.[_0x311002(0x172)]&&_0x434585['stepNames']&&!_0x434585['stepNames'][_0x311002(0x1e2)](_0x26b705[_0x311002(0x1dc)][_0x311002(0x172)])&&_0x360742[_0x311002(0x1c4)](createIssue(_0x311002(0x1fa),_0x3fc45e+_0x311002(0x19d),_0x311002(0x1a3),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x26b705[_0x311002(0x1dc)][_0x311002(0x172)]+'\x27',_0x434585));const _0x39fae4=_0x26b705['next']||_0x1d50b6[_0x311002(0x172)],_0x180a5c=_0x26b705[_0x311002(0x1dc)]?.[_0x311002(0x172)]||_0x1d50b6['next'];if(_0x39fae4){const _0x59a868=_0x3c8c54[_0x311002(0x18e)](_0x39fae4);_0x59a868?.[_0x311002(0x17a)]===_0x311002(0x14f)&&_0x360742['push'](createIssue(_0x311002(0x17f),_0x3fc45e+_0x311002(0x173),_0x311002(0x16e),_0x311002(0x163)+_0x39fae4+_0x311002(0x183),_0x434585,_0x3fc45e+_0x311002(0x1d7)));}if(_0x180a5c){const _0x213b66=_0x3c8c54[_0x311002(0x18e)](_0x180a5c);_0x213b66?.[_0x311002(0x17a)]==='merge'&&_0x360742['push'](createIssue('warning',_0x3fc45e+_0x311002(0x19d),_0x311002(0x16e),_0x311002(0x159)+_0x180a5c+_0x311002(0x183),_0x434585,_0x3fc45e+_0x311002(0x16a)));}}}return _0x360742;}function validateActivationStep(_0x3f9907,_0x7a6658,_0x9b0c1c){const _0x49937f=a130_0x1f76,_0x545ba1=[];if(!_0x3f9907['with']?.[_0x49937f(0x19b)])return _0x545ba1[_0x49937f(0x1c4)](createIssue(_0x49937f(0x1fa),_0x7a6658+'.with.activation',_0x49937f(0x1cb),_0x49937f(0x1aa),_0x9b0c1c,_0x7a6658)),_0x545ba1;const _0x5ad141=_0x3f9907[_0x49937f(0x1ef)][_0x49937f(0x19b)];return _0x9b0c1c[_0x49937f(0x1e4)]&&!_0x5ad141[_0x49937f(0x1bd)](_0x49937f(0x200))&&(!_0x9b0c1c[_0x49937f(0x1e4)]['has'](_0x5ad141)&&_0x545ba1['push'](createIssue(_0x49937f(0x1fa),_0x7a6658+_0x49937f(0x1b9),_0x49937f(0x153),_0x49937f(0x199)+_0x5ad141+_0x49937f(0x1d0),_0x9b0c1c))),_0x545ba1;}function validateDecisionPointStep(_0x3a9529,_0x538676,_0x268d5c,_0x2ab617){const _0x31e457=a130_0x1f76,_0x465387=[];if(!_0x3a9529[_0x31e457(0x1ef)]?.[_0x31e457(0x18b)]||_0x3a9529[_0x31e457(0x1ef)][_0x31e457(0x18b)][_0x31e457(0x18a)]===0x0)return _0x465387[_0x31e457(0x1c4)](createIssue(_0x31e457(0x1fa),_0x538676+'.with.branches',_0x31e457(0x1c2),_0x31e457(0x155),_0x268d5c,_0x538676)),_0x465387;for(let _0x58fc8a=0x0;_0x58fc8a<_0x3a9529[_0x31e457(0x1ef)][_0x31e457(0x18b)][_0x31e457(0x18a)];_0x58fc8a++){const _0xb50cbb=_0x3a9529[_0x31e457(0x1ef)]['branches'][_0x58fc8a],_0x2922e6=_0x538676+'.with.branches['+_0x58fc8a+']';_0xb50cbb[_0x31e457(0x1a8)]&&!_0xb50cbb[_0x31e457(0x15c)]&&(_0x268d5c[_0x31e457(0x195)]?.[_0x31e457(0x191)](_0xb50cbb[_0x31e457(0x1a8)]),!_0xb50cbb[_0x31e457(0x1a8)][_0x31e457(0x1bd)]('ref:')&&(_0x268d5c[_0x31e457(0x181)]&&!_0x268d5c[_0x31e457(0x181)][_0x31e457(0x1e2)](_0xb50cbb['segment'])&&_0x465387['push'](createIssue(_0x31e457(0x1fa),_0x2922e6+_0x31e457(0x1ab),_0x31e457(0x18d),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0xb50cbb[_0x31e457(0x1a8)]+'\x27',_0x268d5c))));_0xb50cbb['next']&&_0x268d5c['stepNames']&&!_0x268d5c[_0x31e457(0x197)][_0x31e457(0x1e2)](_0xb50cbb['next'])&&_0x465387['push'](createIssue(_0x31e457(0x1fa),_0x2922e6+_0x31e457(0x1c8),'INVALID_NEXT_REFERENCE',_0x31e457(0x1bc)+_0xb50cbb[_0x31e457(0x172)]+'\x27',_0x268d5c));if(_0xb50cbb[_0x31e457(0x172)]){const _0x2d1a1e=_0x2ab617[_0x31e457(0x18e)](_0xb50cbb[_0x31e457(0x172)]);_0x2d1a1e?.[_0x31e457(0x17a)]===_0x31e457(0x14f)&&_0x465387[_0x31e457(0x1c4)](createIssue(_0x31e457(0x17f),_0x2922e6+_0x31e457(0x1c8),_0x31e457(0x16e),_0x31e457(0x1b7)+_0xb50cbb[_0x31e457(0x190)]+_0x31e457(0x1a1)+_0xb50cbb['next']+_0x31e457(0x1a2),_0x268d5c));}}return _0x465387;}function validateAbTestStep(_0x1c9647,_0x3a2b0d,_0x751b9c,_0x58bcda){const _0x352d32=a130_0x1f76,_0x5247b9=[];if(!_0x1c9647[_0x352d32(0x1ef)]?.['variants']||_0x1c9647[_0x352d32(0x1ef)]['variants'][_0x352d32(0x18a)]===0x0)return _0x5247b9['push'](createIssue(_0x352d32(0x1fa),_0x3a2b0d+_0x352d32(0x1f0),'MISSING_CONDITIONS',_0x352d32(0x168),_0x751b9c,_0x3a2b0d)),_0x5247b9;const _0x175b7f=_0x1c9647[_0x352d32(0x1ef)][_0x352d32(0x1d4)][_0x352d32(0x1d8)]((_0x3c6938,_0x98dcb8)=>_0x3c6938+(_0x98dcb8[_0x352d32(0x187)]||0x0),0x0);Math[_0x352d32(0x14e)](_0x175b7f-0x64)>0.01&&_0x5247b9[_0x352d32(0x1c4)](createIssue(_0x352d32(0x1fa),_0x3a2b0d+_0x352d32(0x1f0),_0x352d32(0x196),_0x352d32(0x1a4)+_0x175b7f+'%)',_0x751b9c));for(let _0x25d695=0x0;_0x25d695<_0x1c9647[_0x352d32(0x1ef)][_0x352d32(0x1d4)][_0x352d32(0x18a)];_0x25d695++){const _0x3a12d6=_0x1c9647[_0x352d32(0x1ef)][_0x352d32(0x1d4)][_0x25d695],_0x11a164=_0x3a2b0d+_0x352d32(0x1fc)+_0x25d695+']';_0x3a12d6[_0x352d32(0x172)]&&_0x751b9c['stepNames']&&!_0x751b9c[_0x352d32(0x197)][_0x352d32(0x1e2)](_0x3a12d6[_0x352d32(0x172)])&&_0x5247b9[_0x352d32(0x1c4)](createIssue(_0x352d32(0x1fa),_0x11a164+'.next','INVALID_NEXT_REFERENCE',_0x352d32(0x1b6)+_0x3a12d6[_0x352d32(0x172)]+'\x27',_0x751b9c));if(_0x3a12d6[_0x352d32(0x172)]){const _0x41a93d=_0x58bcda['get'](_0x3a12d6[_0x352d32(0x172)]);_0x41a93d?.[_0x352d32(0x17a)]===_0x352d32(0x14f)&&_0x5247b9[_0x352d32(0x1c4)](createIssue('warning',_0x11a164+_0x352d32(0x1c8),_0x352d32(0x16e),'A/B\x20test\x20variant\x20\x27'+_0x3a12d6['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x3a12d6[_0x352d32(0x172)]+_0x352d32(0x1a2),_0x751b9c));}}return _0x5247b9;}function validateJumpStep(_0x204efd,_0xb4a55e,_0x2684c4){const _0x4a2fd3=a130_0x1f76,_0x187f31=[];if(!_0x204efd['with']?.[_0x4a2fd3(0x1f8)])return _0x187f31[_0x4a2fd3(0x1c4)](createIssue(_0x4a2fd3(0x1fa),_0xb4a55e+_0x4a2fd3(0x16f),_0x4a2fd3(0x1c1),_0x4a2fd3(0x1d9),_0x2684c4,_0xb4a55e)),_0x187f31;return(!_0x204efd[_0x4a2fd3(0x1ef)]['target'][_0x4a2fd3(0x1eb)]||!_0x204efd[_0x4a2fd3(0x1ef)][_0x4a2fd3(0x1f8)]['stage'])&&_0x187f31[_0x4a2fd3(0x1c4)](createIssue(_0x4a2fd3(0x1fa),_0xb4a55e+_0x4a2fd3(0x16f),_0x4a2fd3(0x1c1),_0x4a2fd3(0x1ed),_0x2684c4)),_0x187f31;}function buildConvergenceMap(_0x7307b9){const _0x585c12=a130_0x1f76,_0x29f1fe=new Map();function _0x1e963b(_0x4ea07a,_0x4e5195){const _0x7d07c2=a130_0x1f76,_0x54aba4=_0x29f1fe[_0x7d07c2(0x18e)](_0x4ea07a)||[];_0x54aba4[_0x7d07c2(0x1c4)](_0x4e5195),_0x29f1fe[_0x7d07c2(0x177)](_0x4ea07a,_0x54aba4);}for(const _0x1f8248 of _0x7307b9){_0x1f8248[_0x585c12(0x172)]&&_0x1e963b(_0x1f8248[_0x585c12(0x172)],{'stepName':_0x1f8248[_0x585c12(0x190)],'description':'step\x20\x27'+_0x1f8248[_0x585c12(0x190)]+'\x27'});if(_0x1f8248[_0x585c12(0x17a)]===_0x585c12(0x204)&&_0x1f8248['with']?.[_0x585c12(0x18b)])for(const _0x1cb205 of _0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x18b)]){_0x1cb205[_0x585c12(0x172)]&&_0x1e963b(_0x1cb205[_0x585c12(0x172)],{'stepName':_0x1f8248['name'],'description':'branch\x20\x27'+_0x1cb205[_0x585c12(0x190)]+_0x585c12(0x1da)+_0x1f8248[_0x585c12(0x190)]+'\x27'});}if(_0x1f8248[_0x585c12(0x17a)]==='ab_test'&&_0x1f8248[_0x585c12(0x1ef)]?.[_0x585c12(0x1d4)])for(const _0x26392c of _0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1d4)]){_0x26392c[_0x585c12(0x172)]&&_0x1e963b(_0x26392c['next'],{'stepName':_0x1f8248[_0x585c12(0x190)],'description':_0x585c12(0x1f2)+_0x26392c[_0x585c12(0x190)]+_0x585c12(0x1da)+_0x1f8248[_0x585c12(0x190)]+'\x27'});}_0x1f8248[_0x585c12(0x17a)]==='wait'&&_0x1f8248['with']?.['condition']&&(_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x172)]&&_0x1e963b(_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x172)],{'stepName':_0x1f8248['name'],'description':_0x585c12(0x164)+_0x1f8248[_0x585c12(0x190)]+'\x27'}),_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x1dc)]?.[_0x585c12(0x172)]&&_0x1e963b(_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x1dc)]['next'],{'stepName':_0x1f8248[_0x585c12(0x190)],'description':_0x585c12(0x16b)+_0x1f8248[_0x585c12(0x190)]+'\x27'}));}return _0x29f1fe;}function validateFlowControl(_0x63b72b,_0x1b5ce5,_0x2fd4cd){const _0x46b349=a130_0x1f76,_0x4a0de9=[],_0x25b2eb='stages['+_0x1b5ce5+']',_0x262b9a=_0x63b72b[_0x46b349(0x1f7)]||[];if(_0x262b9a[_0x46b349(0x18a)]===0x0)return _0x4a0de9;const _0x23dd3b=new Map();for(const _0x4ad538 of _0x262b9a){_0x4ad538[_0x46b349(0x190)]&&_0x23dd3b[_0x46b349(0x177)](_0x4ad538['name'],_0x4ad538);}const _0x3e868b=buildConvergenceMap(_0x262b9a),_0x44ac3d=_0x262b9a[_0x46b349(0x1ac)](_0x2b3641=>_0x2b3641['type']===_0x46b349(0x1f6));!_0x44ac3d&&_0x4a0de9['push'](createIssue('error',_0x25b2eb+_0x46b349(0x1b2),_0x46b349(0x16d),_0x46b349(0x16c)+_0x63b72b[_0x46b349(0x190)]+_0x46b349(0x1fe),_0x2fd4cd));for(const [_0x26113a,_0x332765]of _0x3e868b){const _0x445f5d=_0x23dd3b[_0x46b349(0x18e)](_0x26113a);if(!_0x445f5d)continue;if(_0x332765['length']>0x1&&_0x445f5d[_0x46b349(0x17a)]!==_0x46b349(0x14f)){const _0x1849ba=_0x332765[_0x46b349(0x1df)](_0x1622f9=>_0x1622f9[_0x46b349(0x1e5)])[_0x46b349(0x161)](',\x20');_0x4a0de9[_0x46b349(0x1c4)](createIssue(_0x46b349(0x1fa),_0x25b2eb+_0x46b349(0x1b2),_0x46b349(0x1fd),_0x46b349(0x193)+_0x26113a+_0x46b349(0x1ea)+_0x1849ba+_0x46b349(0x180),_0x2fd4cd));}_0x332765[_0x46b349(0x18a)]===0x1&&_0x445f5d[_0x46b349(0x17a)]===_0x46b349(0x14f)&&_0x4a0de9[_0x46b349(0x1c4)](createIssue('warning',_0x25b2eb+_0x46b349(0x1b2),_0x46b349(0x1c7),_0x46b349(0x1a0)+_0x26113a+_0x46b349(0x1c3)+_0x332765[0x0][_0x46b349(0x1e5)]+_0x46b349(0x1a5),_0x2fd4cd));}for(const _0x3c17c5 of _0x262b9a){if(_0x3c17c5['type']===_0x46b349(0x14f)&&_0x3c17c5[_0x46b349(0x172)]){const _0x2ddba3=_0x23dd3b[_0x46b349(0x18e)](_0x3c17c5['next']);_0x2ddba3?.[_0x46b349(0x17a)]===_0x46b349(0x14f)&&_0x4a0de9[_0x46b349(0x1c4)](createIssue('error',_0x25b2eb+'.steps',_0x46b349(0x1c9),_0x46b349(0x1a0)+_0x3c17c5['name']+_0x46b349(0x202)+_0x3c17c5[_0x46b349(0x172)]+_0x46b349(0x194),_0x2fd4cd));}}return _0x4a0de9;}function validateCriteria(_0x49385e,_0x26c67f,_0x4e4c3d){const _0x1830d6=a130_0x1f76,_0xf3a0c4=[];return _0x49385e['segment']&&(_0x4e4c3d[_0x1830d6(0x195)]?.['add'](_0x49385e[_0x1830d6(0x1a8)]),!_0x49385e[_0x1830d6(0x1a8)][_0x1830d6(0x1bd)](_0x1830d6(0x200))&&(_0x4e4c3d[_0x1830d6(0x181)]&&!_0x4e4c3d[_0x1830d6(0x181)][_0x1830d6(0x1e2)](_0x49385e[_0x1830d6(0x1a8)])&&_0xf3a0c4[_0x1830d6(0x1c4)](createIssue(_0x1830d6(0x1fa),_0x26c67f+'.segment',_0x1830d6(0x18d),_0x1830d6(0x19e)+_0x49385e[_0x1830d6(0x1a8)]+'\x27',_0x4e4c3d)))),_0xf3a0c4;}function a130_0x1e7d(){const _0x268369=['MISSING_ACTIVATION_REF','ACTIVATION_SCHEMA_ERROR','success','code','MISSING_WAIT_PARAMS','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','MISSING_STAGES','DUPLICATE_STEP_NAME','entries','variants','message','issues','.with.condition','reduce','Jump\x20step\x20requires\x20a\x20target','\x27\x20of\x20\x27','DUPLICATE_LATEST','timeout','document','UNUSED_EMBEDDED_SEGMENT','map','state','.type','has','TOO_MANY_STAGES','activationKeys','description','7sEnPJf','journeys[','.exit_criteria[','MISSING_MILESTONE','\x27\x20(from:\x20','journey','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x20stages\x20but\x20maximum\x20is\x20','with','.with.variants','5278920EFvjOx','variant\x20\x27','.rule','size','journey\x20entry','end','steps','target','every','error','segments','.with.variants[','CONVERGENCE_WITHOUT_MERGE','\x27\x20has\x20no\x20end\x20step','ab_test','ref:','\x27\x20(first\x20defined\x20at\x20steps[','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','safeParse','decision_point','305912kDLYpj','versions','skipSchema','abs','merge','endsWith','excluded_','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','MISSING_ACTIVATION_DEFINITION','722493xGlPEh','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','.milestone','325744OBvwQT','filter','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','journeys,\x20stages,\x20or\x20versions','excluded','Journey\x20can\x20have\x20at\x20most\x20one\x20','source','keys','\x27\x20has\x20only\x20','join','launched','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','condition\x20of\x20\x27','3811572QeFPSG','INSUFFICIENT_STEPS','.exit_criteria','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','Step\x20references\x20non-existent\x20step\x20\x27','.with.condition.timeout','timeout\x20of\x20\x27','Stage\x20\x27','MISSING_END_STEP','BRANCH_DIRECTLY_TO_MERGE','.with.target','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','entry_criteria','next','.with.condition.next','replace','MISSING_EXIT_CRITERIA','\x20with\x20latest:\x20true','set','exit_criteria','.name','type','path','Duplicate\x20step\x20name\x20\x27','goal','sort','warning',').\x20Use\x20a\x20merge\x20step.','embeddedSegments','1150464tjazan','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','END_STEP_HAS_NEXT_OR_WITH','milestone','percentage','\x27\x20has\x20no\x20steps','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','length','branches','.entry_criteria','MISSING_SEGMENT_REFERENCE','get','.stages','name','add','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','referencedSegments','INVALID_AB_TEST_PERCENTAGES','stepNames','splice','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','segments.','activation','\x20(across\x20','.with.condition.timeout.next','Criteria\x20references\x20undefined\x20segment\x20\x27','Journey\x20has\x20','Merge\x20step\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20with\x20no\x20action\x20in\x20between','INVALID_NEXT_REFERENCE','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20',').\x20Merge\x20is\x20unnecessary.','wait','9hElMiL','segment','includes','Activation\x20step\x20requires\x20an\x20activation\x20reference','.segment','some','activations','symbol','\x27\x20has\x20no\x20exit_criteria\x20defined','journeys','4WUryVr','.steps','versions[','stages','level','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','Decision\x20branch\x20\x27','8447480WsgSNb','.with.activation','condition','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','startsWith','\x20versions)','JOURNEY_SCHEMA_ERROR','stages[','INVALID_JUMP_TARGET','MISSING_CONDITIONS','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','push','MISSING_NAME','End\x20step\x20\x27','SINGLE_INPUT_MERGE','.next','MERGE_TO_MERGE_CHAIN','rule'];a130_0x1e7d=function(){return _0x268369;};return a130_0x1e7d();}function validateEmbeddedSegment(_0x518005,_0x37de55,_0x49b12f){const _0x5eced0=a130_0x1f76,_0x4bf592=[];return _0x518005[_0x5eced0(0x1ca)]&&_0x4bf592['push'](...validateRuleDef(_0x518005[_0x5eced0(0x1ca)],_0x37de55+_0x5eced0(0x1f3),_0x49b12f)),_0x4bf592;}function validateStage(_0x5e3f57,_0x1896a9,_0x17a140,_0x2bcae7){const _0x287f17=a130_0x1f76,_0x3d391a=[],_0xcf1b36='stages['+_0x1896a9+']',_0x3154b0=new Map(),_0xa9fa67=new Map();if(_0x5e3f57[_0x287f17(0x1f7)]){for(let _0x4dca3d=0x0;_0x4dca3d<_0x5e3f57[_0x287f17(0x1f7)]['length'];_0x4dca3d++){const _0x1c67d2=_0x5e3f57[_0x287f17(0x1f7)][_0x4dca3d];_0x1c67d2[_0x287f17(0x190)]&&_0x3154b0[_0x287f17(0x177)](_0x1c67d2['name'],_0x1c67d2);}for(let _0x550825=0x0;_0x550825<_0x5e3f57[_0x287f17(0x1f7)]['length'];_0x550825++){const _0x39fe22=_0x5e3f57[_0x287f17(0x1f7)][_0x550825],_0x17b658=_0xcf1b36+'.steps['+_0x550825+']';if(_0x39fe22[_0x287f17(0x190)]){if(_0xa9fa67[_0x287f17(0x1e2)](_0x39fe22[_0x287f17(0x190)])){const _0x2a3221=_0xa9fa67[_0x287f17(0x18e)](_0x39fe22[_0x287f17(0x190)]);_0x3d391a[_0x287f17(0x1c4)](createIssue(_0x287f17(0x1fa),_0x17b658+_0x287f17(0x179),_0x287f17(0x1d2),_0x287f17(0x17c)+_0x39fe22[_0x287f17(0x190)]+_0x287f17(0x201)+_0x2a3221+'])',_0x2bcae7));}else _0xa9fa67['set'](_0x39fe22[_0x287f17(0x190)],_0x550825);}_0x3d391a['push'](...validateStep(_0x39fe22,_0x17b658,_0x2bcae7,_0x3154b0));}}_0x5e3f57[_0x287f17(0x171)]&&_0x3d391a[_0x287f17(0x1c4)](...validateCriteria(_0x5e3f57[_0x287f17(0x171)],_0xcf1b36+'.entry_criteria',_0x2bcae7));if(_0x5e3f57[_0x287f17(0x178)])for(let _0x42aeeb=0x0;_0x42aeeb<_0x5e3f57[_0x287f17(0x178)][_0x287f17(0x18a)];_0x42aeeb++){_0x3d391a['push'](...validateCriteria(_0x5e3f57[_0x287f17(0x178)][_0x42aeeb],_0xcf1b36+_0x287f17(0x1e8)+_0x42aeeb+']',_0x2bcae7));}return _0x5e3f57[_0x287f17(0x186)]&&_0x3d391a[_0x287f17(0x1c4)](...validateCriteria(_0x5e3f57['milestone'],_0xcf1b36+_0x287f17(0x156),_0x2bcae7)),_0x3d391a[_0x287f17(0x1c4)](...validateStageStructure(_0x5e3f57,_0x1896a9,_0x17a140,_0x2bcae7)),_0x3d391a[_0x287f17(0x1c4)](...validateFlowControl(_0x5e3f57,_0x1896a9,_0x2bcae7)),_0x3d391a;}function validateStagesForVersion(_0x98f234,_0x2a2b5e,_0x54af12,_0x15bf29,_0x29077b,_0x56a8be,_0x424df6){const _0x4b7d9c=a130_0x1f76;if(_0x98f234[_0x4b7d9c(0x18a)]===0x0){_0x29077b[_0x4b7d9c(0x1c4)]({'level':_0x4b7d9c(0x1fa),'path':_0x15bf29+'stages','code':_0x4b7d9c(0x1d1),'message':_0x4b7d9c(0x1bb),'location':getLocationFromPath(_0x54af12[_0x4b7d9c(0x1dd)],_0x54af12[_0x4b7d9c(0x15e)],[_0x4b7d9c(0x1b4)])});return;}const _0x342f2c=new Set();for(const _0x1cef87 of _0x98f234){if(_0x1cef87[_0x4b7d9c(0x1f7)])for(const _0x2ba890 of _0x1cef87[_0x4b7d9c(0x1f7)]){_0x2ba890[_0x4b7d9c(0x190)]&&_0x342f2c['add'](_0x2ba890[_0x4b7d9c(0x190)]);}}const _0x50bca3={..._0x54af12,'stepNames':_0x342f2c},_0x113cd3=validateVersionStructure(_0x98f234,_0x50bca3);for(const _0x4be201 of _0x113cd3){const _0x50d9a3=_0x15bf29?{..._0x4be201,'path':''+_0x15bf29+_0x4be201[_0x4b7d9c(0x17b)]}:_0x4be201;if(_0x50d9a3['level']==='error')_0x29077b['push'](_0x50d9a3);else _0x56a8be[_0x4b7d9c(0x1c4)](_0x50d9a3);}for(let _0x2aa24c=0x0;_0x2aa24c<_0x98f234[_0x4b7d9c(0x18a)];_0x2aa24c++){const _0x325cc1=validateStage(_0x98f234[_0x2aa24c],_0x2aa24c,_0x98f234[_0x4b7d9c(0x18a)],_0x50bca3);for(const _0x37b12e of _0x325cc1){const _0x55bf1c=_0x15bf29?{..._0x37b12e,'path':''+_0x15bf29+_0x37b12e[_0x4b7d9c(0x17b)]}:_0x37b12e;if(_0x55bf1c['level']===_0x4b7d9c(0x1fa))_0x29077b[_0x4b7d9c(0x1c4)](_0x55bf1c);else _0x56a8be[_0x4b7d9c(0x1c4)](_0x55bf1c);}}if(_0x2a2b5e[_0x4b7d9c(0x17d)]){const _0x404c77=_0x424df6?.['goalIsInherited']?_0x4b7d9c(0x17d):_0x15bf29+_0x4b7d9c(0x17d),_0xe8db2c=validateCriteria(_0x2a2b5e[_0x4b7d9c(0x17d)],_0x404c77,_0x50bca3);for(const _0x4ff5f0 of _0xe8db2c){if(_0x4ff5f0[_0x4b7d9c(0x1b5)]===_0x4b7d9c(0x1fa))_0x29077b[_0x4b7d9c(0x1c4)](_0x4ff5f0);else _0x56a8be[_0x4b7d9c(0x1c4)](_0x4ff5f0);}}}function a130_0x1f76(_0x28314d,_0x5f1762){_0x28314d=_0x28314d-0x14d;const _0x1e7dd0=a130_0x1e7d();let _0x1f76c5=_0x1e7dd0[_0x28314d];return _0x1f76c5;}function extractVersionIndex(_0x4e1ec7){const _0x420ad9=_0x4e1ec7['match'](/^journeys\[(\d+)\]\./);return _0x420ad9?_0x420ad9[0x1]:undefined;}function deduplicateAcrossVersions(_0x5ea50a){const _0x4a331b=a130_0x1f76,_0x1ee446=new Map();for(let _0x195c9f=0x0;_0x195c9f<_0x5ea50a[_0x4a331b(0x18a)];_0x195c9f++){const _0x337545=_0x5ea50a[_0x195c9f][_0x4a331b(0x1ce)]+':'+_0x5ea50a[_0x195c9f][_0x4a331b(0x1d5)],_0x394330=extractVersionIndex(_0x5ea50a[_0x195c9f][_0x4a331b(0x17b)]),_0x518895=_0x1ee446[_0x4a331b(0x18e)](_0x337545);if(_0x518895){_0x518895['indices'][_0x4a331b(0x1c4)](_0x195c9f);if(_0x394330)_0x518895[_0x4a331b(0x206)][_0x4a331b(0x191)](_0x394330);}else _0x1ee446[_0x4a331b(0x177)](_0x337545,{'indices':[_0x195c9f],'versions':new Set(_0x394330?[_0x394330]:[])});}const _0x33992d=new Set();for(const {indices:_0x12589b,versions:_0x33d769}of _0x1ee446['values']()){if(_0x33d769[_0x4a331b(0x1f4)]<=0x1)continue;const _0x5246cc=_0x5ea50a[_0x12589b[0x0]];_0x5246cc['path']=_0x5246cc[_0x4a331b(0x17b)][_0x4a331b(0x174)](/^journeys\[\d+\]\./,''),_0x5246cc[_0x4a331b(0x1d5)]=_0x5246cc[_0x4a331b(0x1d5)]+_0x4a331b(0x19c)+_0x33d769[_0x4a331b(0x1f4)]+_0x4a331b(0x1be);for(let _0x353102=0x1;_0x353102<_0x12589b[_0x4a331b(0x18a)];_0x353102++){_0x33992d[_0x4a331b(0x191)](_0x12589b[_0x353102]);}}const _0x39fd79=[..._0x33992d][_0x4a331b(0x17e)]((_0x1405e5,_0x45fedb)=>_0x45fedb-_0x1405e5);for(const _0x58635f of _0x39fd79){_0x5ea50a[_0x4a331b(0x198)](_0x58635f,0x1);}}export function validateJourneyDef(_0x583d8,_0x170944={},_0x203d36={}){const _0x41a1e0=a130_0x1f76;if(_0x203d36[_0x41a1e0(0x14d)])return runJourneySemanticChecks(_0x583d8,_0x170944);const _0x17b2a3=JourneyDefSchema[_0x41a1e0(0x203)](_0x583d8);if(_0x17b2a3[_0x41a1e0(0x1cd)])return runJourneySemanticChecks(_0x17b2a3['data'],_0x170944);return zodErrorsToJourneyValidationResult(_0x17b2a3[_0x41a1e0(0x1fa)],_0x170944);}function zodErrorsToJourneyValidationResult(_0x3324d5,_0x317340){const _0x57b1c0=a130_0x1f76,_0x3c9079=flattenZodIssues(_0x3324d5[_0x57b1c0(0x1d6)]),_0x420cbc=_0x3c9079['map'](_0x119f8d=>{const _0x2b92d1=_0x57b1c0,_0x15b924=formatZodPath(_0x119f8d[_0x2b92d1(0x17b)]),_0x487ee8=mapJourneyZodIssueToCode(_0x119f8d,_0x15b924),_0x75cb4f=getLocationFromPath(_0x317340[_0x2b92d1(0x1dd)],_0x317340[_0x2b92d1(0x15e)],_0x119f8d[_0x2b92d1(0x17b)]['map'](_0x2f1c0f=>typeof _0x2f1c0f===_0x2b92d1(0x1ae)?String(_0x2f1c0f):_0x2f1c0f));return{'level':_0x2b92d1(0x1fa),'path':_0x15b924,'code':_0x487ee8,'message':_0x119f8d[_0x2b92d1(0x1d5)],..._0x75cb4f&&{'location':_0x75cb4f}};});return{'valid':![],'errors':_0x420cbc,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2b76d6,_0xdefc6c){const _0x243a38=a130_0x1f76;if(_0xdefc6c===_0x243a38(0x190))return _0x243a38(0x1c5);if(_0xdefc6c[_0x243a38(0x150)](_0x243a38(0x1e1))&&_0xdefc6c[_0x243a38(0x1a9)]('steps'))return _0x243a38(0x1bf);if(_0xdefc6c==='stages'||_0xdefc6c[_0x243a38(0x150)](_0x243a38(0x18f)))return'MISSING_STAGES';if(_0xdefc6c===''&&_0x2b76d6[_0x243a38(0x1d5)]['includes'](_0x243a38(0x15b)))return'MISSING_STAGES';if(_0xdefc6c[_0x243a38(0x1a9)](_0x243a38(0x19b)))return _0x243a38(0x1cc);return _0x243a38(0x1bf);}function runJourneySemanticChecks(_0x3cbfa5,_0x333a2c){const _0x4241ef=a130_0x1f76,_0x59c6dc=[],_0x1a60c0=[];(!_0x3cbfa5[_0x4241ef(0x190)]||_0x3cbfa5[_0x4241ef(0x190)]['trim']()==='')&&_0x59c6dc[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x1fa),'path':_0x4241ef(0x190),'code':_0x4241ef(0x1c5),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x333a2c[_0x4241ef(0x1dd)],_0x333a2c[_0x4241ef(0x15e)],[_0x4241ef(0x190)])});const _0x2083ff=new Set();if(_0x3cbfa5['segments'])for(const _0x5c4cc0 of Object[_0x4241ef(0x15f)](_0x3cbfa5['segments'])){_0x2083ff[_0x4241ef(0x191)](_0x5c4cc0);}const _0x306a35=new Set();if(_0x3cbfa5[_0x4241ef(0x1ad)])for(const _0x29dae0 of Object['keys'](_0x3cbfa5['activations'])){_0x306a35[_0x4241ef(0x191)](_0x29dae0);}const _0x4874d2=new Set(),_0x52febb={..._0x333a2c,'embeddedSegments':_0x2083ff,'referencedSegments':_0x4874d2,'activationKeys':_0x306a35[_0x4241ef(0x1f4)]>0x0?_0x306a35:undefined};if(_0x3cbfa5['segments'])for(const [_0x206c02,_0x5dbe71]of Object[_0x4241ef(0x1d3)](_0x3cbfa5[_0x4241ef(0x1fb)])){const _0x35a116=validateEmbeddedSegment(_0x5dbe71,_0x4241ef(0x19a)+_0x206c02,_0x52febb);for(const _0x3c205d of _0x35a116){if(_0x3c205d[_0x4241ef(0x1b5)]===_0x4241ef(0x1fa))_0x59c6dc[_0x4241ef(0x1c4)](_0x3c205d);else _0x1a60c0[_0x4241ef(0x1c4)](_0x3c205d);}}const _0x3f1000=!!_0x3cbfa5['goal'],_0x1ac9e0=_0x3cbfa5[_0x4241ef(0x1b0)]?.[_0x4241ef(0x1f9)](_0xdc2df2=>!!_0xdc2df2[_0x4241ef(0x17d)])??![];!_0x3f1000&&!_0x1ac9e0&&_0x1a60c0[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x17f),'path':_0x4241ef(0x17d),'code':'MISSING_GOAL','message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x333a2c['document'],_0x333a2c['source'],[_0x4241ef(0x17d)])});const _0x20e52f=_0x3cbfa5[_0x4241ef(0x1b0)]??_0x3cbfa5['versions'];if(_0x20e52f&&_0x20e52f[_0x4241ef(0x158)](_0x26d744=>_0x26d744['latest']===!![])['length']>0x1){const _0x413a01=_0x3cbfa5[_0x4241ef(0x1b0)]?_0x4241ef(0x1b0):'versions';_0x59c6dc[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x1fa),'path':_0x413a01,'code':_0x4241ef(0x1db),'message':_0x4241ef(0x15d)+(_0x413a01===_0x4241ef(0x1b0)?_0x4241ef(0x1f5):'version')+_0x4241ef(0x176),'location':getLocationFromPath(_0x333a2c[_0x4241ef(0x1dd)],_0x333a2c[_0x4241ef(0x15e)],[_0x413a01])});}if(_0x3cbfa5[_0x4241ef(0x1b0)]&&_0x3cbfa5[_0x4241ef(0x1b0)]['length']>0x0)for(let _0x5b486f=0x0;_0x5b486f<_0x3cbfa5[_0x4241ef(0x1b0)][_0x4241ef(0x18a)];_0x5b486f++){const _0x270b3e=_0x3cbfa5[_0x4241ef(0x1b0)][_0x5b486f];if(_0x3cbfa5[_0x4241ef(0x1b0)][_0x4241ef(0x18a)]>0x1&&_0x270b3e[_0x4241ef(0x1e0)]===_0x4241ef(0x162))continue;const _0x27a0a9=_0x270b3e[_0x4241ef(0x1b4)]||[],_0x273301=_0x4241ef(0x1e7)+_0x5b486f+'].',_0x57332e=!!_0x270b3e['goal'],_0x3d22a2=_0x57332e?{..._0x3cbfa5,'goal':_0x270b3e[_0x4241ef(0x17d)]}:_0x3cbfa5;validateStagesForVersion(_0x27a0a9,_0x3d22a2,_0x52febb,_0x273301,_0x59c6dc,_0x1a60c0,{'goalIsInherited':!_0x57332e});}else{if(_0x3cbfa5[_0x4241ef(0x206)]&&_0x3cbfa5[_0x4241ef(0x206)][_0x4241ef(0x18a)]>0x0)for(let _0x75a481=0x0;_0x75a481<_0x3cbfa5[_0x4241ef(0x206)][_0x4241ef(0x18a)];_0x75a481++){const _0x2c708a=_0x3cbfa5['versions'][_0x75a481];if(_0x3cbfa5['versions']['length']>0x1&&_0x2c708a[_0x4241ef(0x1e0)]===_0x4241ef(0x162))continue;const _0x264d5f=_0x2c708a['stages']||[],_0x4ab165=_0x4241ef(0x1b3)+_0x75a481+'].';validateStagesForVersion(_0x264d5f,_0x3cbfa5,_0x52febb,_0x4ab165,_0x59c6dc,_0x1a60c0);}else{const _0x167207=_0x3cbfa5['stages']||[];validateStagesForVersion(_0x167207,_0x3cbfa5,_0x52febb,'',_0x59c6dc,_0x1a60c0);}}_0x3cbfa5[_0x4241ef(0x1b0)]&&_0x3cbfa5[_0x4241ef(0x1b0)][_0x4241ef(0x18a)]>0x1&&(deduplicateAcrossVersions(_0x59c6dc),deduplicateAcrossVersions(_0x1a60c0));for(const _0x3ba670 of _0x2083ff){!_0x4874d2[_0x4241ef(0x1e2)](_0x3ba670)&&!_0x3ba670['startsWith'](_0x4241ef(0x151))&&_0x1a60c0[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x17f),'path':_0x4241ef(0x19a)+_0x3ba670,'code':_0x4241ef(0x1de),'message':'Embedded\x20segment\x20\x27'+_0x3ba670+_0x4241ef(0x184),'location':getLocationFromPath(_0x333a2c['document'],_0x333a2c['source'],[_0x4241ef(0x1fb),_0x3ba670])});}return{'valid':_0x59c6dc['length']===0x0,'errors':_0x59c6dc,'warnings':_0x1a60c0};}
|