@treasuredata/tdx 2026.7.6 → 2026.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.d.ts.map +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/api-command.js.map +1 -1
- package/dist/commands/auth-command.d.ts +9 -0
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts +10 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.d.ts +8 -0
- package/dist/commands/command.d.ts.map +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/command.js.map +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-always-on-campaign-pull-command.d.ts +16 -0
- package/dist/commands/engage-always-on-campaign-pull-command.d.ts.map +1 -0
- package/dist/commands/engage-always-on-campaign-pull-command.js +1 -0
- package/dist/commands/engage-always-on-campaign-pull-command.js.map +1 -0
- package/dist/commands/engage-always-on-campaign-push-command.d.ts +16 -0
- package/dist/commands/engage-always-on-campaign-push-command.d.ts.map +1 -0
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -0
- package/dist/commands/engage-always-on-campaign-push-command.js.map +1 -0
- package/dist/commands/engage-always-on-campaign-validate-command.d.ts +16 -0
- package/dist/commands/engage-always-on-campaign-validate-command.d.ts.map +1 -0
- package/dist/commands/engage-always-on-campaign-validate-command.js +1 -0
- package/dist/commands/engage-always-on-campaign-validate-command.js.map +1 -0
- 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 +1 -1
- package/dist/commands/engage-command.js +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.js +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/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profile-command.js.map +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-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.d.ts.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/status-command.js.map +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +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 +35 -1
- 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/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/site-mismatch.d.ts +68 -0
- package/dist/core/site-mismatch.d.ts.map +1 -0
- package/dist/core/site-mismatch.js +1 -0
- package/dist/core/site-mismatch.js.map +1 -0
- package/dist/core/user-cache.js +1 -1
- 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/tools/work-create-item.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/auth-token.d.ts +23 -0
- package/dist/sdk/auth-token.d.ts.map +1 -0
- package/dist/sdk/auth-token.js +1 -0
- package/dist/sdk/auth-token.js.map +1 -0
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/validate-files.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.d.ts +1 -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/oauth-refresh.js +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/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.d.ts +7 -4
- package/dist/sdk/connection-validator.d.ts.map +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection-validator.js.map +1 -1
- package/dist/sdk/connection.d.ts +15 -0
- package/dist/sdk/connection.d.ts.map +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/connection.js.map +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/always-on-campaign-pull.d.ts +66 -0
- package/dist/sdk/engage/always-on-campaign-pull.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-pull.js +1 -0
- package/dist/sdk/engage/always-on-campaign-pull.js.map +1 -0
- package/dist/sdk/engage/always-on-campaign-push.d.ts +93 -0
- package/dist/sdk/engage/always-on-campaign-push.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-push.js +1 -0
- package/dist/sdk/engage/always-on-campaign-push.js.map +1 -0
- package/dist/sdk/engage/always-on-campaign-validator.d.ts +18 -0
- package/dist/sdk/engage/always-on-campaign-validator.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -0
- package/dist/sdk/engage/always-on-campaign-validator.js.map +1 -0
- package/dist/sdk/engage/always-on-campaign-yaml.d.ts +62 -0
- package/dist/sdk/engage/always-on-campaign-yaml.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-yaml.js +1 -0
- package/dist/sdk/engage/always-on-campaign-yaml.js.map +1 -0
- 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/campaign-yaml.js.map +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/always-on-campaign-schema.d.ts +125 -0
- package/dist/sdk/engage/types/always-on-campaign-schema.d.ts.map +1 -0
- package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -0
- package/dist/sdk/engage/types/always-on-campaign-schema.js.map +1 -0
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.d.ts +8 -8
- package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js.map +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.d.ts +20 -0
- 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.d.ts +13 -2
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +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.js +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.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +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/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +12 -2
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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/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.d.ts +6 -1
- package/dist/sdk/segment/validate-files.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +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 +31 -5
- 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/progress.js +1 -1
- package/dist/sdk/types/workspace.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.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.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.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.d.ts +6 -0
- package/dist/test-utils/factories.d.ts.map +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/factories.js.map +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.d.ts +1 -1
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.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/proxy-fetch.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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2df73b,_0x4a3d00){const _0x5af4dd=a161_0x4ec2,_0x5e3a6c=_0x2df73b();while(!![]){try{const _0x46dee3=parseInt(_0x5af4dd(0x11b))/0x1+parseInt(_0x5af4dd(0x11d))/0x2*(parseInt(_0x5af4dd(0x128))/0x3)+-parseInt(_0x5af4dd(0x119))/0x4+parseInt(_0x5af4dd(0x11a))/0x5+parseInt(_0x5af4dd(0x125))/0x6+-parseInt(_0x5af4dd(0x11f))/0x7*(parseInt(_0x5af4dd(0x124))/0x8)+parseInt(_0x5af4dd(0x118))/0x9*(-parseInt(_0x5af4dd(0x11c))/0xa);if(_0x46dee3===_0x4a3d00)break;else _0x5e3a6c['push'](_0x5e3a6c['shift']());}catch(_0x3c2154){_0x5e3a6c['push'](_0x5e3a6c['shift']());}}}(a161_0x3ca4,0xc83f9));import{readdirSync,statSync}from'fs';function a161_0x4ec2(_0x2b69ff,_0x519507){_0x2b69ff=_0x2b69ff-0x117;const _0x3ca45b=a161_0x3ca4();let _0x4ec2eb=_0x3ca45b[_0x2b69ff];return _0x4ec2eb;}import a161_0x1fa1c4 from'path';function a161_0x3ca4(){const _0x5edd77=['.yaml','toLowerCase','isDirectory','.yml','18472yHHLfN','9259662NarTBL','isFile','name','12YzagPW','endsWith','replace','join','18YejOzo','2189416MgMKQZ','6487740nKvJlO','1268901cjkFsU','13647820wykHHw','61820EuGupS','map','413VKYbTY'];a161_0x3ca4=function(){return _0x5edd77;};return a161_0x3ca4();}export function findYamlFiles(_0x36536a){const _0x3e7f69=[];function _0xa85213(_0x27347c){const _0x2f95f6=a161_0x4ec2,_0x55dec5=readdirSync(_0x27347c,{'withFileTypes':!![]});for(const _0x122fb of _0x55dec5){const _0x6df5d=a161_0x1fa1c4[_0x2f95f6(0x117)](_0x27347c,_0x122fb['name']);if(_0x122fb[_0x2f95f6(0x122)]())_0xa85213(_0x6df5d);else(_0x122fb['name'][_0x2f95f6(0x129)](_0x2f95f6(0x123))||_0x122fb[_0x2f95f6(0x127)][_0x2f95f6(0x129)]('.yaml'))&&_0x3e7f69['push'](_0x6df5d);}}return _0xa85213(_0x36536a),_0x3e7f69;}export function discoverYamlFiles(_0x1a8bd3){const _0x11699f=a161_0x4ec2,_0x1a0b87=findYamlFiles(_0x1a8bd3);return _0x1a0b87[_0x11699f(0x11e)](_0x1c4508=>{const _0x4bd21e=_0x11699f,_0x44c864=a161_0x1fa1c4['relative'](_0x1a8bd3,_0x1c4508),_0x34c872=a161_0x1fa1c4['dirname'](_0x44c864);return{'absolutePath':_0x1c4508,'relativePath':_0x44c864,'folderPath':_0x34c872==='.'?'':_0x34c872[_0x4bd21e(0x12a)](/\\/g,'/')};});}export function isYamlFile(_0x5a28b0){const _0x52d3c5=a161_0x4ec2;try{const _0x4dfb4d=statSync(_0x5a28b0);if(!_0x4dfb4d[_0x52d3c5(0x126)]())return![];const _0x3da5a7=a161_0x1fa1c4['extname'](_0x5a28b0)[_0x52d3c5(0x121)]();return _0x3da5a7==='.yml'||_0x3da5a7===_0x52d3c5(0x120);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2c5f0f,_0x3d65ea){const _0x1714ee=a152_0x38a0,_0x28202c=_0x2c5f0f();while(!![]){try{const _0x334403=-parseInt(_0x1714ee(0xd3))/0x1*(parseInt(_0x1714ee(0x103))/0x2)+parseInt(_0x1714ee(0xcb))/0x3*(parseInt(_0x1714ee(0x10e))/0x4)+-parseInt(_0x1714ee(0xd8))/0x5*(parseInt(_0x1714ee(0x116))/0x6)+parseInt(_0x1714ee(0x10d))/0x7*(-parseInt(_0x1714ee(0xc8))/0x8)+parseInt(_0x1714ee(0xde))/0x9*(-parseInt(_0x1714ee(0xdf))/0xa)+-parseInt(_0x1714ee(0xca))/0xb+-parseInt(_0x1714ee(0xf5))/0xc*(-parseInt(_0x1714ee(0x109))/0xd);if(_0x334403===_0x3d65ea)break;else _0x28202c['push'](_0x28202c['shift']());}catch(_0x1dcf03){_0x28202c['push'](_0x28202c['shift']());}}}(a152_0x3016,0x7ff8f));function a152_0x38a0(_0x582743,_0x2e8ecd){_0x582743=_0x582743-0xc8;const _0x3016da=a152_0x3016();let _0x38a0ec=_0x3016da[_0x582743];return _0x38a0ec;}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x2a64da){const _0x5b8722=a152_0x38a0;return _0x2a64da[_0x5b8722(0xd2)]()[_0x5b8722(0xfe)](/\s+/g,'_')[_0x5b8722(0xfe)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x5b8722(0xfe)](/^_|_$/g,'');}export function generateJourneyLocalName(_0xcf682e){const _0x66e8c1=a152_0x38a0,_0x1a1df0=_0xcf682e['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x1a1df0){const _0x111b4c=_0x1a1df0[0x1][_0x66e8c1(0xd2)](),_0x52af89=_0x1a1df0[0x2],_0x1dac7d=_0x52af89[_0x66e8c1(0xfe)](/-/g,'')[_0x66e8c1(0xcd)](0x0,0x4)['toLowerCase']();return _0x111b4c+'_'+_0x1dac7d;}const _0x5d1a40=_0xcf682e[_0x66e8c1(0xdb)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x5d1a40){const _0x38c721=_0x5d1a40[0x1],_0x43cc87=_0x5d1a40[0x2][_0x66e8c1(0xd2)](),_0x4317fa=_0x38c721[_0x66e8c1(0xfe)](/-/g,'')[_0x66e8c1(0xcd)](0x0,0x4)[_0x66e8c1(0xd2)]();return _0x43cc87+'_'+_0x4317fa;}return undefined;}function stableStringify(_0x18161f){const _0x77b544=a152_0x38a0;if(Array[_0x77b544(0xd7)](_0x18161f))return'['+_0x18161f[_0x77b544(0xed)](_0x3a1985=>stableStringify(_0x3a1985))['join'](',')+']';if(_0x18161f&&typeof _0x18161f==='object'){const _0x2d7982=_0x18161f,_0x1fe607=Object[_0x77b544(0xe7)](_0x2d7982)['sort'](),_0x49cb0d=_0x1fe607[_0x77b544(0xed)](_0x555ebe=>'\x22'+_0x555ebe+'\x22:'+stableStringify(_0x2d7982[_0x555ebe]));return'{'+_0x49cb0d[_0x77b544(0xd0)](',')+'}';}const _0x158c34=JSON['stringify'](_0x18161f);return _0x158c34===undefined?_0x77b544(0x113):_0x158c34;}export function consolidateActivationsByContent(_0x3337c9){const _0x3bba8d=a152_0x38a0,_0x4724a6={},_0x25e09a=new Map(),_0x4154af=new Map();for(const _0x130c00 of _0x3337c9){if(!_0x130c00)continue;for(const [_0x426c75,_0x5895f5]of Object[_0x3bba8d(0x100)](_0x130c00)){const _0x5bfa85={'name':_0x5895f5[_0x3bba8d(0xfd)],'connection':_0x5895f5[_0x3bba8d(0xe4)],..._0x5895f5[_0x3bba8d(0x114)]!==undefined&&{'all_columns':_0x5895f5[_0x3bba8d(0x114)]},..._0x5895f5['columns']!==undefined&&{'columns':_0x5895f5[_0x3bba8d(0xdd)]},..._0x5895f5[_0x3bba8d(0xd1)]!==undefined&&{'behavior':_0x5895f5[_0x3bba8d(0xd1)]},..._0x5895f5[_0x3bba8d(0xe2)]!==undefined&&{'schedule':_0x5895f5[_0x3bba8d(0xe2)]},..._0x5895f5[_0x3bba8d(0xdc)]!==undefined&&{'notification':_0x5895f5[_0x3bba8d(0xdc)]},..._0x5895f5['connector_config']!==undefined&&{'connector_config':_0x5895f5['connector_config']},..._0x5895f5['activation_template_id']!==undefined&&{'activation_template_id':_0x5895f5[_0x3bba8d(0xc9)]}},_0xd3476b=stableStringify(_0x5bfa85),_0x1562e6=_0x4154af[_0x3bba8d(0xfa)](_0xd3476b);_0x1562e6?_0x25e09a['set'](_0x426c75,_0x1562e6):(_0x4724a6[_0x426c75]=_0x5895f5,_0x25e09a['set'](_0x426c75,_0x426c75),_0x4154af[_0x3bba8d(0xd6)](_0xd3476b,_0x426c75));}}return{'merged':_0x4724a6,'nameMapping':_0x25e09a};}export function updateActivationReferences(_0x37d39f,_0x2d5032){const _0x225991=a152_0x38a0;if(!_0x37d39f)return;for(const _0x8bda9b of _0x37d39f){if(!_0x8bda9b[_0x225991(0x105)])continue;for(const _0x1c47ca of _0x8bda9b[_0x225991(0x105)]){if(_0x1c47ca[_0x225991(0xef)]==='activation'&&_0x1c47ca['with']?.['activation']){const _0x2392db=_0x2d5032[_0x225991(0xfa)](_0x1c47ca[_0x225991(0x104)][_0x225991(0xcf)]);_0x2392db&&_0x2392db!==_0x1c47ca[_0x225991(0x104)][_0x225991(0xcf)]&&(_0x1c47ca[_0x225991(0x104)][_0x225991(0xcf)]=_0x2392db);}}}}export function consolidateSegmentsByContent(_0x2176d0,_0x28f5bd){const _0x13ec49=a152_0x38a0,_0x2a5724={},_0x1067d4=new Map(),_0x4c4bb3=new Map();for(const _0xbfc147 of _0x2176d0){if(!_0xbfc147)continue;for(const [_0x47839e,_0xfd078b]of Object['entries'](_0xbfc147)){if(!_0xfd078b[_0x13ec49(0xe3)]){_0x2a5724[_0x47839e]=_0xfd078b,_0x1067d4[_0x13ec49(0xd6)](_0x47839e,_0x47839e);continue;}const _0x1c07fe=_0xfd078b[_0x13ec49(0xee)]&&_0xfd078b[_0x13ec49(0xee)][_0x13ec49(0x115)]()?_0xfd078b[_0x13ec49(0xee)]:undefined,_0x12ee11=JSON[_0x13ec49(0xe0)]({'description':_0x1c07fe,'rule':deepSortObject(_0xfd078b[_0x13ec49(0xe3)])}),_0x347312=_0x4c4bb3[_0x13ec49(0xfa)](_0x12ee11);if(_0x347312){const _0x56de11={..._0xfd078b['description']!==undefined&&{'description':_0xfd078b['description']},'rule':_0xfd078b[_0x13ec49(0xe3)]?deepSortObject(_0xfd078b['rule']):_0xfd078b[_0x13ec49(0xe3)]};if(_0x47839e<_0x347312){_0x2a5724[_0x47839e]=_0x56de11,delete _0x2a5724[_0x347312];for(const [_0x36b649,_0x52ced]of _0x1067d4[_0x13ec49(0x100)]()){_0x52ced===_0x347312&&_0x1067d4['set'](_0x36b649,_0x47839e);}_0x1067d4[_0x13ec49(0xd6)](_0x47839e,_0x47839e),_0x4c4bb3[_0x13ec49(0xd6)](_0x12ee11,_0x47839e);}else _0x2a5724[_0x347312]=_0x56de11,_0x1067d4[_0x13ec49(0xd6)](_0x47839e,_0x347312);}else{let _0x4fbf17=_0x47839e;if(_0x28f5bd){const _0x4c4ac7=_0x28f5bd[_0x13ec49(0xfa)](_0x12ee11);_0x4c4ac7&&_0x4c4ac7[_0x13ec49(0x107)]>0x0&&(_0x4fbf17=_0x4c4ac7[_0x13ec49(0xcd)]()[_0x13ec49(0xe5)]()[0x0]);}const _0x52ec26={..._0xfd078b[_0x13ec49(0xee)]!==undefined&&{'description':_0xfd078b[_0x13ec49(0xee)]},'rule':_0xfd078b[_0x13ec49(0xe3)]?deepSortObject(_0xfd078b[_0x13ec49(0xe3)]):_0xfd078b[_0x13ec49(0xe3)]};_0x2a5724[_0x4fbf17]=_0x52ec26,_0x1067d4[_0x13ec49(0xd6)](_0x47839e,_0x4fbf17),_0x4c4bb3[_0x13ec49(0xd6)](_0x12ee11,_0x4fbf17);}}}return{'merged':_0x2a5724,'nameMapping':_0x1067d4};}export function updateSegmentReferences(_0x960bed,_0xc423f){const _0x172c01=a152_0x38a0;if(!_0x960bed)return;for(const _0x18bda5 of _0x960bed){if(_0x18bda5[_0x172c01(0x117)]?.['segment']){const _0x391e09=_0xc423f[_0x172c01(0xfa)](_0x18bda5[_0x172c01(0x117)][_0x172c01(0xf4)]);_0x391e09&&(_0x18bda5[_0x172c01(0x117)]['segment']=_0x391e09);}if(_0x18bda5[_0x172c01(0x10c)])for(const _0x3b7689 of _0x18bda5[_0x172c01(0x10c)]){if(_0x3b7689[_0x172c01(0xf4)]){const _0x10d747=_0xc423f[_0x172c01(0xfa)](_0x3b7689['segment']);_0x10d747&&(_0x3b7689[_0x172c01(0xf4)]=_0x10d747);}}if(_0x18bda5[_0x172c01(0xea)]?.['segment']){const _0xc87875=_0xc423f[_0x172c01(0xfa)](_0x18bda5[_0x172c01(0xea)][_0x172c01(0xf4)]);_0xc87875&&(_0x18bda5[_0x172c01(0xea)][_0x172c01(0xf4)]=_0xc87875);}if(_0x18bda5[_0x172c01(0x105)])for(const _0x38d0b2 of _0x18bda5['steps']){if(_0x38d0b2[_0x172c01(0xef)]==='decision_point'&&_0x38d0b2[_0x172c01(0x104)]?.[_0x172c01(0x101)])for(const _0x52acdd of _0x38d0b2[_0x172c01(0x104)][_0x172c01(0x101)]){if(_0x52acdd[_0x172c01(0xf4)]){const _0x2e89fc=_0xc423f[_0x172c01(0xfa)](_0x52acdd['segment']);_0x2e89fc&&(_0x52acdd['segment']=_0x2e89fc);}}if(_0x38d0b2['type']===_0x172c01(0xf2)&&_0x38d0b2[_0x172c01(0x104)]?.[_0x172c01(0xf1)]?.[_0x172c01(0xf4)]){const _0x5374f8=_0xc423f[_0x172c01(0xfa)](_0x38d0b2[_0x172c01(0x104)][_0x172c01(0xf1)][_0x172c01(0xf4)]);_0x5374f8&&(_0x38d0b2[_0x172c01(0x104)][_0x172c01(0xf1)][_0x172c01(0xf4)]=_0x5374f8);}}}}export function updateSegmentRefsInSegments(_0x53e66e,_0x2b4704){const _0x1ca4c7=a152_0x38a0;for(const _0xf4d194 of Object[_0x1ca4c7(0x106)](_0x53e66e)){_0xf4d194[_0x1ca4c7(0xe3)]&&updateSegmentRefsInRule(_0xf4d194[_0x1ca4c7(0xe3)],_0x2b4704);}}function updateSegmentRefsInRule(_0x25b77c,_0x435d1a){const _0x498207=a152_0x38a0;if(_0x25b77c===null||typeof _0x25b77c!==_0x498207(0xfb))return;if(Array[_0x498207(0xd7)](_0x25b77c)){for(const _0x6fefb4 of _0x25b77c){updateSegmentRefsInRule(_0x6fefb4,_0x435d1a);}return;}const _0x4056bf=_0x25b77c;if((_0x4056bf['type']==='include'||_0x4056bf[_0x498207(0xef)]==='exclude')&&typeof _0x4056bf[_0x498207(0xf4)]===_0x498207(0x102)){const _0x38fc7d=_0x435d1a[_0x498207(0xfa)](_0x4056bf[_0x498207(0xf4)]);_0x38fc7d&&(_0x4056bf[_0x498207(0xf4)]=_0x38fc7d);}if(_0x4056bf[_0x498207(0x10b)]&&Array[_0x498207(0xd7)](_0x4056bf[_0x498207(0x10b)]))for(const _0x304cbf of _0x4056bf[_0x498207(0x10b)]){updateSegmentRefsInRule(_0x304cbf,_0x435d1a);}}export function buildJourneysArray(_0x2f18cf,_0xac1546){const _0x461212=a152_0x38a0;return _0x2f18cf[_0x461212(0xed)](_0x31d86c=>{const _0x4cfacc=_0x461212,_0x347e03=_0xac1546?_0x31d86c['item']['id']===_0xac1546:_0x2f18cf[_0x4cfacc(0x107)]===0x1,_0x108af3=_0x31d86c[_0x4cfacc(0xec)]['journeys']?.[0x0],_0x7f839f=_0x108af3?.[_0x4cfacc(0x10a)]||_0x31d86c[_0x4cfacc(0xec)][_0x4cfacc(0x10a)],_0x3b5243={'version':_0x108af3?.['version']||_0x31d86c[_0x4cfacc(0xec)][_0x4cfacc(0x110)]||_0x31d86c[_0x4cfacc(0xe6)][_0x4cfacc(0xfd)],'state':_0x31d86c[_0x4cfacc(0xe6)][_0x4cfacc(0xff)]===_0x4cfacc(0xd9)?_0x4cfacc(0xd9):_0x4cfacc(0xf3),'stages':_0x108af3?.[_0x4cfacc(0xe8)]||_0x31d86c[_0x4cfacc(0xec)][_0x4cfacc(0xe8)]||[],'id':_0x108af3?.['id']||_0x31d86c[_0x4cfacc(0xec)]['id'],'version_number':_0x108af3?.[_0x4cfacc(0xfc)]||_0x31d86c[_0x4cfacc(0xec)][_0x4cfacc(0xfc)]};return _0x7f839f&&(_0x3b5243[_0x4cfacc(0x10a)]=_0x7f839f),_0x347e03&&(_0x3b5243['latest']=!![]),_0x3b5243;});}export function buildMergedJourneyDef(_0x1b1a8c,_0x211e96,_0x535726){const _0x441516=a152_0x38a0,_0x24e434=_0x1b1a8c[0x0][_0x441516(0xec)],_0x5ef9ed=buildJourneysArray(_0x1b1a8c,_0x535726),{merged:_0x167354,nameMapping:_0x424021}=consolidateSegmentsByContent(_0x1b1a8c['map'](_0x31e35f=>_0x31e35f[_0x441516(0xec)]['segments']),_0x211e96);updateSegmentRefsInSegments(_0x167354,_0x424021);const _0x23353b=Array['from'](_0x424021[_0x441516(0x100)]())['some'](([_0x24b1f5,_0x2f3a9b])=>_0x24b1f5!==_0x2f3a9b&&_0x24b1f5[_0x441516(0xd4)](_0x441516(0x117)));let _0x3c7557=_0x167354,_0x36d59a=new Map();if(_0x23353b){const _0x554138=consolidateSegmentsByContent([_0x167354],_0x211e96);_0x3c7557=_0x554138[_0x441516(0x118)],_0x36d59a=_0x554138['nameMapping'];}const _0x23b8b9=new Map(_0x424021);for(const [_0x2057ef,_0x250d02]of _0x36d59a[_0x441516(0x100)]()){_0x23b8b9[_0x441516(0xd6)](_0x2057ef,_0x250d02);}for(const [_0x1f1087,_0xccc070]of _0x23b8b9['entries']()){let _0x5270fa=_0xccc070,_0x4b4326=0x0;while(_0x23b8b9[_0x441516(0xce)](_0x5270fa)&&_0x23b8b9[_0x441516(0xfa)](_0x5270fa)!==_0x5270fa&&_0x4b4326<MAX_MAPPING_CHAIN_DEPTH){_0x5270fa=_0x23b8b9[_0x441516(0xfa)](_0x5270fa),_0x4b4326++;}_0x5270fa!==_0xccc070&&_0x23b8b9[_0x441516(0xd6)](_0x1f1087,_0x5270fa);}for(const _0x525d5f of _0x5ef9ed){updateSegmentReferences(_0x525d5f[_0x441516(0xe8)],_0x23b8b9);}const {merged:_0x44e58a,nameMapping:_0x4b22a3}=consolidateActivationsByContent(_0x1b1a8c['map'](_0x1cc982=>_0x1cc982[_0x441516(0xec)][_0x441516(0xf7)]));for(const _0x37fdc3 of _0x5ef9ed){updateActivationReferences(_0x37fdc3['stages'],_0x4b22a3);}let _0x345bfb=_0x24e434[_0x441516(0x10a)];if(_0x345bfb?.['segment']){const _0x494fe0=_0x23b8b9[_0x441516(0xfa)](_0x345bfb[_0x441516(0xf4)]);_0x494fe0&&(_0x345bfb={..._0x345bfb,'segment':_0x494fe0});}for(const _0x59c49f of _0x5ef9ed){if(_0x59c49f[_0x441516(0x10a)]?.[_0x441516(0xf4)]){const _0xd5bd36=_0x23b8b9[_0x441516(0xfa)](_0x59c49f[_0x441516(0x10a)][_0x441516(0xf4)]);_0xd5bd36&&(_0x59c49f[_0x441516(0x10a)]={..._0x59c49f[_0x441516(0x10a)],'segment':_0xd5bd36});}}return _0x5ef9ed[_0x441516(0xe1)](_0xa21fa3=>_0xa21fa3[_0x441516(0x10a)])&&(_0x345bfb=undefined),{'type':_0x441516(0xf9),'name':_0x24e434[_0x441516(0xfd)],'description':_0x24e434['description'],'goal':_0x345bfb,'reentry':_0x24e434[_0x441516(0x108)],'segments':Object[_0x441516(0xe7)](_0x3c7557)[_0x441516(0x107)]>0x0?_0x3c7557:undefined,'activations':Object[_0x441516(0xe7)](_0x44e58a)[_0x441516(0x107)]>0x0?_0x44e58a:undefined,'journeys':_0x5ef9ed,'bundle_id':_0x24e434['bundle_id'],'bundle_name':_0x24e434[_0x441516(0xeb)]};}export function createJumpTargetCache(){return new Map();}function a152_0x3016(){const _0x506466=['map','description','type','attributes','condition','wait','draft','segment','12wmJoxe','versions','activations','decision_point','journey','get','object','version_number','name','replace','state','entries','branches','string','32RTFmPR','with','steps','values','length','reentry','22672195tYDOGP','goal','conditions','exit_criteria','7iVCEEM','32RDZpQC','index','version','journeyBundleName','endsWith','null','all_columns','trim','12yHZVYH','entry_criteria','merged','4211896kMWaxN','activation_template_id','1471547TdOdXK','146877fMQuXf','.yml','slice','has','activation','join','behavior','toLowerCase','14107HoGyAB','startsWith','push','set','isArray','193345rTPhBE','launched','segments','match','notification','columns','972297OLVLUt','60QAUCeJ','stringify','some','schedule','rule','connection','sort','item','keys','stages','journeys','milestone','bundle_name','yaml'];a152_0x3016=function(){return _0x506466;};return a152_0x3016();}export async function resolveJumpTarget(_0x540839,_0x104d9f,_0x5080d0,_0x2c2e53){const _0x5decf0=a152_0x38a0,_0x4ebf20=_0x540839+':'+_0x104d9f,_0x4099c5=_0x5080d0[_0x5decf0(0xfa)](_0x4ebf20);if(_0x4099c5)return _0x4099c5;const _0x30bfa7=await _0x2c2e53(_0x540839),_0x1356f8=_0x30bfa7[_0x5decf0(0xf0)][_0x5decf0(0x111)]||_0x30bfa7[_0x5decf0(0xf0)][_0x5decf0(0xfd)],_0x230d77=_0x30bfa7[_0x5decf0(0xf0)]['journeyStages']['find'](_0x27eb1e=>String(_0x27eb1e['id'])===String(_0x104d9f)),_0x560c0a=_0x230d77?.[_0x5decf0(0xfd)]||_0x104d9f,_0x4f59a7={'journeyName':_0x1356f8,'stageName':_0x560c0a};return _0x5080d0['set'](_0x4ebf20,_0x4f59a7),_0x4f59a7;}export function formatApiJourneyName(_0x368605,_0x5b4bef){return _0x5b4bef+'\x20('+_0x368605+')';}export function isLocalJourneyRef(_0x2605bf){const _0x11883d=a152_0x38a0;return _0x2605bf[_0x11883d(0x112)](_0x11883d(0xcc))||_0x2605bf[_0x11883d(0x112)]('.yaml');}export function buildLocalRuleToNameMapping(_0x3d534f){const _0x440333=a152_0x38a0,_0x552a7c=new Map();if(!_0x3d534f)return _0x552a7c;for(const [_0x336304,_0x352101]of Object[_0x440333(0x100)](_0x3d534f)){if(_0x352101['rule']){const _0x97a542=serializeRule(_0x352101[_0x440333(0xe3)]),_0x4851f7=_0x552a7c[_0x440333(0xfa)](_0x97a542)||[];_0x4851f7[_0x440333(0xd5)](_0x336304),_0x552a7c[_0x440333(0xd6)](_0x97a542,_0x4851f7);}}return _0x552a7c;}export function buildLocalRuleToNameMappingFromJourney(_0x3931e5){const _0x8263a1=a152_0x38a0,_0x1917ac=_0x3931e5[_0x8263a1(0xda)];if(!_0x1917ac)return new Map();const _0x236f9e=collectSegmentUsageCounts(_0x3931e5),_0x20b7ce=new Map();let _0xfa1580=0x0;for(const [_0x5c80de,_0x461ed0]of Object['entries'](_0x1917ac)){if(!_0x461ed0[_0x8263a1(0xe3)]){_0xfa1580++;continue;}const _0x231247=serializeRule(_0x461ed0['rule']),_0x2484dc=_0x20b7ce[_0x8263a1(0xfa)](_0x231247)||[];_0x2484dc['push']({'name':_0x5c80de,'index':_0xfa1580}),_0x20b7ce['set'](_0x231247,_0x2484dc),_0xfa1580++;}const _0x402a74=new Map();for(const [_0x2b3b38,_0x59891f]of _0x20b7ce){const _0x5a3616=_0x59891f[_0x8263a1(0xcd)]()[_0x8263a1(0xe5)]((_0x4b94e7,_0xa43c8c)=>{const _0x4f8d1f=_0x8263a1,_0x533dd9=_0x236f9e[_0x4f8d1f(0xfa)](_0x4b94e7[_0x4f8d1f(0xfd)])||0x0,_0x1fc2d5=_0x236f9e[_0x4f8d1f(0xfa)](_0xa43c8c[_0x4f8d1f(0xfd)])||0x0;if(_0x533dd9!==_0x1fc2d5)return _0x1fc2d5-_0x533dd9;return _0x4b94e7[_0x4f8d1f(0x10f)]-_0xa43c8c[_0x4f8d1f(0x10f)];})[_0x8263a1(0xed)](_0x15b39f=>_0x15b39f[_0x8263a1(0xfd)]);_0x402a74['set'](_0x2b3b38,_0x5a3616);}return _0x402a74;}export function collectSegmentUsageCounts(_0x3aa248){const _0x1e7620=a152_0x38a0,_0x594f79=new Map(),_0x1352a3=_0x7cdeee=>{const _0x8872d3=a152_0x38a0;if(!_0x7cdeee)return;_0x594f79[_0x8872d3(0xd6)](_0x7cdeee,(_0x594f79[_0x8872d3(0xfa)](_0x7cdeee)||0x0)+0x1);},_0xf36510=_0x588448=>{const _0x59682d=a152_0x38a0;for(const _0x32f44f of _0x588448){_0x1352a3(_0x32f44f[_0x59682d(0x117)]?.[_0x59682d(0xf4)]);if(_0x32f44f[_0x59682d(0x10c)])for(const _0x26eeae of _0x32f44f[_0x59682d(0x10c)]){_0x1352a3(_0x26eeae['segment']);}_0x1352a3(_0x32f44f[_0x59682d(0xea)]?.[_0x59682d(0xf4)]);if(_0x32f44f[_0x59682d(0x105)])for(const _0x4f4d92 of _0x32f44f[_0x59682d(0x105)]){if(_0x4f4d92[_0x59682d(0xef)]===_0x59682d(0xf8))for(const _0x4ce89e of _0x4f4d92['with'][_0x59682d(0x101)]){_0x1352a3(_0x4ce89e[_0x59682d(0xf4)]);}else _0x4f4d92[_0x59682d(0xef)]===_0x59682d(0xf2)&&_0x1352a3(_0x4f4d92['with'][_0x59682d(0xf1)]?.[_0x59682d(0xf4)]);}}};_0x1352a3(_0x3aa248['goal']?.[_0x1e7620(0xf4)]);if(_0x3aa248[_0x1e7620(0xe9)])for(const _0x9952f1 of _0x3aa248[_0x1e7620(0xe9)]){_0x1352a3(_0x9952f1[_0x1e7620(0x10a)]?.[_0x1e7620(0xf4)]),_0xf36510(_0x9952f1[_0x1e7620(0xe8)]);}_0x3aa248['stages']&&_0xf36510(_0x3aa248[_0x1e7620(0xe8)]);if(_0x3aa248[_0x1e7620(0xf6)])for(const _0x3b3db3 of _0x3aa248['versions']){_0xf36510(_0x3b3db3[_0x1e7620(0xe8)]);}return _0x594f79;}
|
|
1
|
+
(function(_0x783ca3,_0x59c3ec){const _0x191054=a162_0x1514,_0x358e34=_0x783ca3();while(!![]){try{const _0x36133c=-parseInt(_0x191054(0x1f6))/0x1+-parseInt(_0x191054(0x22f))/0x2+-parseInt(_0x191054(0x22c))/0x3*(parseInt(_0x191054(0x241))/0x4)+-parseInt(_0x191054(0x22b))/0x5+-parseInt(_0x191054(0x212))/0x6*(parseInt(_0x191054(0x228))/0x7)+-parseInt(_0x191054(0x234))/0x8+-parseInt(_0x191054(0x23d))/0x9*(-parseInt(_0x191054(0x1fa))/0xa);if(_0x36133c===_0x59c3ec)break;else _0x358e34['push'](_0x358e34['shift']());}catch(_0x3ebe03){_0x358e34['push'](_0x358e34['shift']());}}}(a162_0x5d35,0x68987));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x207f6d){const _0x3bb7fa=a162_0x1514;return _0x207f6d[_0x3bb7fa(0x1f7)]()[_0x3bb7fa(0x213)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x3bb7fa(0x213)](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x525293){const _0x56991b=a162_0x1514,_0x31154d=_0x525293[_0x56991b(0x221)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x31154d){const _0x4a9a8d=_0x31154d[0x1][_0x56991b(0x1f7)](),_0x35eb44=_0x31154d[0x2],_0x282c69=_0x35eb44[_0x56991b(0x213)](/-/g,'')[_0x56991b(0x236)](0x0,0x4)[_0x56991b(0x1f7)]();return _0x4a9a8d+'_'+_0x282c69;}const _0x3b96cd=_0x525293[_0x56991b(0x221)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x3b96cd){const _0x596172=_0x3b96cd[0x1],_0x31c68f=_0x3b96cd[0x2][_0x56991b(0x1f7)](),_0x192e20=_0x596172[_0x56991b(0x213)](/-/g,'')[_0x56991b(0x236)](0x0,0x4)['toLowerCase']();return _0x31c68f+'_'+_0x192e20;}return undefined;}function stableStringify(_0x17f435){const _0x3a0ed6=a162_0x1514;if(Array['isArray'](_0x17f435))return'['+_0x17f435['map'](_0x47ac8e=>stableStringify(_0x47ac8e))['join'](',')+']';if(_0x17f435&&typeof _0x17f435==='object'){const _0x405910=_0x17f435,_0x5c58d0=Object[_0x3a0ed6(0x245)](_0x405910)[_0x3a0ed6(0x242)](),_0x25a8b6=_0x5c58d0[_0x3a0ed6(0x227)](_0x8d0207=>'\x22'+_0x8d0207+'\x22:'+stableStringify(_0x405910[_0x8d0207]));return'{'+_0x25a8b6[_0x3a0ed6(0x225)](',')+'}';}const _0x46347d=JSON[_0x3a0ed6(0x204)](_0x17f435);return _0x46347d===undefined?'null':_0x46347d;}export function consolidateActivationsByContent(_0x4a446a){const _0x44f345=a162_0x1514,_0x1eb6df={},_0x816212=new Map(),_0x5da60b=new Map();for(const _0x18e736 of _0x4a446a){if(!_0x18e736)continue;for(const [_0xd4d916,_0x54d8bd]of Object['entries'](_0x18e736)){const _0x23a380={'name':_0x54d8bd[_0x44f345(0x219)],'connection':_0x54d8bd[_0x44f345(0x237)],..._0x54d8bd[_0x44f345(0x1ff)]!==undefined&&{'all_columns':_0x54d8bd[_0x44f345(0x1ff)]},..._0x54d8bd['columns']!==undefined&&{'columns':_0x54d8bd[_0x44f345(0x20b)]},..._0x54d8bd[_0x44f345(0x203)]!==undefined&&{'behavior':_0x54d8bd['behavior']},..._0x54d8bd['schedule']!==undefined&&{'schedule':_0x54d8bd[_0x44f345(0x21b)]},..._0x54d8bd[_0x44f345(0x20d)]!==undefined&&{'notification':_0x54d8bd[_0x44f345(0x20d)]},..._0x54d8bd['connector_config']!==undefined&&{'connector_config':_0x54d8bd[_0x44f345(0x216)]},..._0x54d8bd[_0x44f345(0x202)]!==undefined&&{'activation_template_id':_0x54d8bd['activation_template_id']}},_0x6bee4e=stableStringify(_0x23a380),_0x2db461=_0x5da60b['get'](_0x6bee4e);_0x2db461?_0x816212['set'](_0xd4d916,_0x2db461):(_0x1eb6df[_0xd4d916]=_0x54d8bd,_0x816212[_0x44f345(0x231)](_0xd4d916,_0xd4d916),_0x5da60b['set'](_0x6bee4e,_0xd4d916));}}return{'merged':_0x1eb6df,'nameMapping':_0x816212};}export function updateActivationReferences(_0x48a96c,_0x3e86fc){const _0x3bf050=a162_0x1514;if(!_0x48a96c)return;for(const _0x12f4d9 of _0x48a96c){if(!_0x12f4d9[_0x3bf050(0x206)])continue;for(const _0x420b46 of _0x12f4d9[_0x3bf050(0x206)]){if(_0x420b46['type']==='activation'&&_0x420b46[_0x3bf050(0x1fd)]?.[_0x3bf050(0x201)]){const _0x34ad07=_0x3e86fc[_0x3bf050(0x224)](_0x420b46[_0x3bf050(0x1fd)][_0x3bf050(0x201)]);_0x34ad07&&_0x34ad07!==_0x420b46[_0x3bf050(0x1fd)]['activation']&&(_0x420b46['with'][_0x3bf050(0x201)]=_0x34ad07);}}}}export function consolidateSegmentsByContent(_0x27a075,_0x57a533){const _0x2c1db6=a162_0x1514,_0x255801={},_0x2e269e=new Map(),_0x35ba83=new Map();for(const _0x272699 of _0x27a075){if(!_0x272699)continue;for(const [_0x8d91e8,_0x5d9e12]of Object[_0x2c1db6(0x1f9)](_0x272699)){if(!_0x5d9e12[_0x2c1db6(0x226)]){_0x255801[_0x8d91e8]=_0x5d9e12,_0x2e269e[_0x2c1db6(0x231)](_0x8d91e8,_0x8d91e8);continue;}const _0x59632b=_0x5d9e12[_0x2c1db6(0x215)]&&_0x5d9e12['description'][_0x2c1db6(0x20a)]()?_0x5d9e12[_0x2c1db6(0x215)]:undefined,_0x3c66ed=JSON[_0x2c1db6(0x204)]({'description':_0x59632b,'rule':deepSortObject(_0x5d9e12[_0x2c1db6(0x226)])}),_0x4e59a6=_0x35ba83[_0x2c1db6(0x224)](_0x3c66ed);if(_0x4e59a6){const _0x2398b5={..._0x5d9e12['description']!==undefined&&{'description':_0x5d9e12[_0x2c1db6(0x215)]},'rule':_0x5d9e12['rule']?deepSortObject(_0x5d9e12[_0x2c1db6(0x226)]):_0x5d9e12['rule']};if(_0x8d91e8<_0x4e59a6){_0x255801[_0x8d91e8]=_0x2398b5,delete _0x255801[_0x4e59a6];for(const [_0x53436c,_0x1507c3]of _0x2e269e[_0x2c1db6(0x1f9)]()){_0x1507c3===_0x4e59a6&&_0x2e269e[_0x2c1db6(0x231)](_0x53436c,_0x8d91e8);}_0x2e269e[_0x2c1db6(0x231)](_0x8d91e8,_0x8d91e8),_0x35ba83[_0x2c1db6(0x231)](_0x3c66ed,_0x8d91e8);}else _0x255801[_0x4e59a6]=_0x2398b5,_0x2e269e[_0x2c1db6(0x231)](_0x8d91e8,_0x4e59a6);}else{let _0x3430d5=_0x8d91e8;if(_0x57a533){const _0x456b6f=_0x57a533[_0x2c1db6(0x224)](_0x3c66ed);_0x456b6f&&_0x456b6f[_0x2c1db6(0x220)]>0x0&&(_0x3430d5=_0x456b6f['slice']()[_0x2c1db6(0x242)]()[0x0]);}const _0x28fce5={..._0x5d9e12[_0x2c1db6(0x215)]!==undefined&&{'description':_0x5d9e12[_0x2c1db6(0x215)]},'rule':_0x5d9e12[_0x2c1db6(0x226)]?deepSortObject(_0x5d9e12[_0x2c1db6(0x226)]):_0x5d9e12['rule']};_0x255801[_0x3430d5]=_0x28fce5,_0x2e269e['set'](_0x8d91e8,_0x3430d5),_0x35ba83[_0x2c1db6(0x231)](_0x3c66ed,_0x3430d5);}}}return{'merged':_0x255801,'nameMapping':_0x2e269e};}export function updateSegmentReferences(_0x184f25,_0x558c59){const _0x4d2283=a162_0x1514;if(!_0x184f25)return;for(const _0x583438 of _0x184f25){if(_0x583438[_0x4d2283(0x1fc)]?.[_0x4d2283(0x1f4)]){const _0x48a412=_0x558c59[_0x4d2283(0x224)](_0x583438[_0x4d2283(0x1fc)][_0x4d2283(0x1f4)]);_0x48a412&&(_0x583438[_0x4d2283(0x1fc)]['segment']=_0x48a412);}if(_0x583438[_0x4d2283(0x21c)])for(const _0x494fcd of _0x583438[_0x4d2283(0x21c)]){if(_0x494fcd[_0x4d2283(0x1f4)]){const _0xf6db28=_0x558c59['get'](_0x494fcd[_0x4d2283(0x1f4)]);_0xf6db28&&(_0x494fcd[_0x4d2283(0x1f4)]=_0xf6db28);}}if(_0x583438['milestone']?.[_0x4d2283(0x1f4)]){const _0xadb31e=_0x558c59['get'](_0x583438['milestone']['segment']);_0xadb31e&&(_0x583438[_0x4d2283(0x207)]['segment']=_0xadb31e);}if(_0x583438[_0x4d2283(0x206)])for(const _0x41d7c1 of _0x583438[_0x4d2283(0x206)]){if(_0x41d7c1['type']===_0x4d2283(0x21f)&&_0x41d7c1[_0x4d2283(0x1fd)]?.[_0x4d2283(0x244)])for(const _0x261860 of _0x41d7c1[_0x4d2283(0x1fd)]['branches']){if(_0x261860[_0x4d2283(0x1f4)]){const _0x3983d4=_0x558c59[_0x4d2283(0x224)](_0x261860[_0x4d2283(0x1f4)]);_0x3983d4&&(_0x261860[_0x4d2283(0x1f4)]=_0x3983d4);}}if(_0x41d7c1['type']===_0x4d2283(0x211)&&_0x41d7c1[_0x4d2283(0x1fd)]?.[_0x4d2283(0x233)]?.[_0x4d2283(0x1f4)]){const _0x4781de=_0x558c59[_0x4d2283(0x224)](_0x41d7c1[_0x4d2283(0x1fd)]['condition'][_0x4d2283(0x1f4)]);_0x4781de&&(_0x41d7c1[_0x4d2283(0x1fd)]['condition'][_0x4d2283(0x1f4)]=_0x4781de);}}}}export function updateSegmentRefsInSegments(_0x3364f0,_0x2cbfd9){const _0xf87bcb=a162_0x1514;for(const _0x5a94a7 of Object[_0xf87bcb(0x23c)](_0x3364f0)){_0x5a94a7['rule']&&updateSegmentRefsInRule(_0x5a94a7[_0xf87bcb(0x226)],_0x2cbfd9);}}function updateSegmentRefsInRule(_0x5436e7,_0x33144f){const _0xe450e3=a162_0x1514;if(_0x5436e7===null||typeof _0x5436e7!==_0xe450e3(0x239))return;if(Array[_0xe450e3(0x218)](_0x5436e7)){for(const _0x515254 of _0x5436e7){updateSegmentRefsInRule(_0x515254,_0x33144f);}return;}const _0x141b74=_0x5436e7;if((_0x141b74[_0xe450e3(0x232)]===_0xe450e3(0x209)||_0x141b74['type']===_0xe450e3(0x214))&&typeof _0x141b74['segment']===_0xe450e3(0x1fe)){const _0x2c0f83=_0x33144f[_0xe450e3(0x224)](_0x141b74[_0xe450e3(0x1f4)]);_0x2c0f83&&(_0x141b74['segment']=_0x2c0f83);}if(_0x141b74[_0xe450e3(0x223)]&&Array[_0xe450e3(0x218)](_0x141b74[_0xe450e3(0x223)]))for(const _0x2e51a4 of _0x141b74[_0xe450e3(0x223)]){updateSegmentRefsInRule(_0x2e51a4,_0x33144f);}}function a162_0x1514(_0x11e6f2,_0x2bdc2c){_0x11e6f2=_0x11e6f2-0x1f3;const _0x5d3574=a162_0x5d35();let _0x151403=_0x5d3574[_0x11e6f2];return _0x151403;}export function buildJourneysArray(_0x144c0d,_0x381771){const _0x91c1d2=a162_0x1514;return _0x144c0d[_0x91c1d2(0x227)](_0x49761a=>{const _0x191b9e=_0x91c1d2,_0x7aa686=_0x381771?_0x49761a[_0x191b9e(0x1f3)]['id']===_0x381771:_0x144c0d[_0x191b9e(0x220)]===0x1,_0x6b3822=_0x49761a[_0x191b9e(0x22e)][_0x191b9e(0x217)]?.[0x0],_0x59ba43=_0x6b3822?.['goal']||_0x49761a[_0x191b9e(0x22e)][_0x191b9e(0x235)],_0x67e3a6={'version':_0x6b3822?.[_0x191b9e(0x230)]||_0x49761a[_0x191b9e(0x22e)][_0x191b9e(0x230)]||_0x49761a[_0x191b9e(0x1f3)][_0x191b9e(0x219)],'state':_0x49761a['item'][_0x191b9e(0x240)]===_0x191b9e(0x243)?'launched':_0x191b9e(0x229),'stages':_0x6b3822?.['stages']||_0x49761a[_0x191b9e(0x22e)][_0x191b9e(0x1fb)]||[],'id':_0x6b3822?.['id']||_0x49761a[_0x191b9e(0x22e)]['id'],'version_number':_0x6b3822?.[_0x191b9e(0x210)]||_0x49761a[_0x191b9e(0x22e)][_0x191b9e(0x210)]};return _0x59ba43&&(_0x67e3a6[_0x191b9e(0x235)]=_0x59ba43),_0x7aa686&&(_0x67e3a6[_0x191b9e(0x205)]=!![]),_0x67e3a6;});}export function buildMergedJourneyDef(_0x568abf,_0x15e1a9,_0xaa2945){const _0x1b43be=a162_0x1514,_0x423e9f=_0x568abf[0x0][_0x1b43be(0x22e)],_0x14b653=buildJourneysArray(_0x568abf,_0xaa2945),{merged:_0x541209,nameMapping:_0x5b9e0d}=consolidateSegmentsByContent(_0x568abf['map'](_0x448a87=>_0x448a87[_0x1b43be(0x22e)][_0x1b43be(0x200)]),_0x15e1a9);updateSegmentRefsInSegments(_0x541209,_0x5b9e0d);const _0x4389f4=Array[_0x1b43be(0x23e)](_0x5b9e0d[_0x1b43be(0x1f9)]())[_0x1b43be(0x21a)](([_0x25d632,_0x14480b])=>_0x25d632!==_0x14480b&&_0x25d632[_0x1b43be(0x208)](_0x1b43be(0x1fc)));let _0x16b7e8=_0x541209,_0x13fa4f=new Map();if(_0x4389f4){const _0x25538a=consolidateSegmentsByContent([_0x541209],_0x15e1a9);_0x16b7e8=_0x25538a['merged'],_0x13fa4f=_0x25538a[_0x1b43be(0x21d)];}const _0x97a3b2=new Map(_0x5b9e0d);for(const [_0x4a539d,_0x1616b8]of _0x13fa4f[_0x1b43be(0x1f9)]()){_0x97a3b2[_0x1b43be(0x231)](_0x4a539d,_0x1616b8);}for(const [_0x2fd1c0,_0x41fcc0]of _0x97a3b2['entries']()){let _0x6f778d=_0x41fcc0,_0x56bce6=0x0;while(_0x97a3b2['has'](_0x6f778d)&&_0x97a3b2[_0x1b43be(0x224)](_0x6f778d)!==_0x6f778d&&_0x56bce6<MAX_MAPPING_CHAIN_DEPTH){_0x6f778d=_0x97a3b2[_0x1b43be(0x224)](_0x6f778d),_0x56bce6++;}_0x6f778d!==_0x41fcc0&&_0x97a3b2[_0x1b43be(0x231)](_0x2fd1c0,_0x6f778d);}for(const _0x14b4b5 of _0x14b653){updateSegmentReferences(_0x14b4b5[_0x1b43be(0x1fb)],_0x97a3b2);}const {merged:_0x11f5d4,nameMapping:_0xfb9b5d}=consolidateActivationsByContent(_0x568abf[_0x1b43be(0x227)](_0x3d1083=>_0x3d1083[_0x1b43be(0x22e)][_0x1b43be(0x238)]));for(const _0x4bc871 of _0x14b653){updateActivationReferences(_0x4bc871['stages'],_0xfb9b5d);}let _0x2adb50=_0x423e9f[_0x1b43be(0x235)];if(_0x2adb50?.['segment']){const _0x49d90e=_0x97a3b2[_0x1b43be(0x224)](_0x2adb50['segment']);_0x49d90e&&(_0x2adb50={..._0x2adb50,'segment':_0x49d90e});}for(const _0x561922 of _0x14b653){if(_0x561922[_0x1b43be(0x235)]?.[_0x1b43be(0x1f4)]){const _0x549568=_0x97a3b2[_0x1b43be(0x224)](_0x561922[_0x1b43be(0x235)][_0x1b43be(0x1f4)]);_0x549568&&(_0x561922[_0x1b43be(0x235)]={..._0x561922[_0x1b43be(0x235)],'segment':_0x549568});}}return _0x14b653[_0x1b43be(0x21a)](_0x4894c9=>_0x4894c9[_0x1b43be(0x235)])&&(_0x2adb50=undefined),{'type':_0x1b43be(0x23f),'name':_0x423e9f[_0x1b43be(0x219)],'description':_0x423e9f[_0x1b43be(0x215)],'goal':_0x2adb50,'reentry':_0x423e9f[_0x1b43be(0x1f5)],'segments':Object[_0x1b43be(0x245)](_0x16b7e8)[_0x1b43be(0x220)]>0x0?_0x16b7e8:undefined,'activations':Object[_0x1b43be(0x245)](_0x11f5d4)[_0x1b43be(0x220)]>0x0?_0x11f5d4:undefined,'journeys':_0x14b653,'bundle_id':_0x423e9f[_0x1b43be(0x20c)],'bundle_name':_0x423e9f[_0x1b43be(0x20f)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x15de71,_0x4cc589,_0x1044f8,_0x174d6f){const _0x3ab63f=a162_0x1514,_0x4ee82d=_0x15de71+':'+_0x4cc589,_0x2238b7=_0x1044f8[_0x3ab63f(0x224)](_0x4ee82d);if(_0x2238b7)return _0x2238b7;const _0x305fc9=await _0x174d6f(_0x15de71),_0xaa2e3=_0x305fc9['attributes'][_0x3ab63f(0x21e)]||_0x305fc9[_0x3ab63f(0x23a)][_0x3ab63f(0x219)],_0xccd960=_0x305fc9[_0x3ab63f(0x23a)]['journeyStages'][_0x3ab63f(0x22d)](_0x106a99=>String(_0x106a99['id'])===String(_0x4cc589)),_0x2f77b2=_0xccd960?.[_0x3ab63f(0x219)]||_0x4cc589,_0x278285={'journeyName':_0xaa2e3,'stageName':_0x2f77b2};return _0x1044f8['set'](_0x4ee82d,_0x278285),_0x278285;}function a162_0x5d35(){const _0x308214=['entry_criteria','with','string','all_columns','segments','activation','activation_template_id','behavior','stringify','latest','steps','milestone','startsWith','include','trim','columns','bundle_id','notification','push','bundle_name','version_number','wait','6hIjrxV','replace','exclude','description','connector_config','journeys','isArray','name','some','schedule','exit_criteria','nameMapping','journeyBundleName','decision_point','length','match','index','conditions','get','join','rule','map','5607938IEIqTj','draft','.yaml','2239165enXDOj','1422XTNQoh','find','yaml','1556382Bmorya','version','set','type','condition','1859664EWrvpH','goal','slice','connection','activations','object','attributes','endsWith','values','4687569mSnyYh','from','journey','state','6988CyHXQx','sort','launched','branches','keys','item','segment','reentry','129770cExEao','toLowerCase','versions','entries','70KDWyVg','stages'];a162_0x5d35=function(){return _0x308214;};return a162_0x5d35();}export function formatApiJourneyName(_0x468b4f,_0x5c084c){return _0x5c084c+'\x20('+_0x468b4f+')';}export function isLocalJourneyRef(_0x4cabe7){const _0x51f9b9=a162_0x1514;return _0x4cabe7['endsWith']('.yml')||_0x4cabe7[_0x51f9b9(0x23b)](_0x51f9b9(0x22a));}export function buildLocalRuleToNameMapping(_0x212dd5){const _0x48dd58=a162_0x1514,_0x40d675=new Map();if(!_0x212dd5)return _0x40d675;for(const [_0x4808d2,_0x3ede27]of Object['entries'](_0x212dd5)){if(_0x3ede27[_0x48dd58(0x226)]){const _0x52b482=serializeRule(_0x3ede27[_0x48dd58(0x226)]),_0x5c3959=_0x40d675['get'](_0x52b482)||[];_0x5c3959[_0x48dd58(0x20e)](_0x4808d2),_0x40d675[_0x48dd58(0x231)](_0x52b482,_0x5c3959);}}return _0x40d675;}export function buildLocalRuleToNameMappingFromJourney(_0x3d5452){const _0x43c120=a162_0x1514,_0xfaaa27=_0x3d5452[_0x43c120(0x200)];if(!_0xfaaa27)return new Map();const _0x3ffc0c=collectSegmentUsageCounts(_0x3d5452),_0x1e1dfc=new Map();let _0xa8380f=0x0;for(const [_0x353ac5,_0x294f2d]of Object[_0x43c120(0x1f9)](_0xfaaa27)){if(!_0x294f2d['rule']){_0xa8380f++;continue;}const _0x4f8268=serializeRule(_0x294f2d[_0x43c120(0x226)]),_0x591a79=_0x1e1dfc[_0x43c120(0x224)](_0x4f8268)||[];_0x591a79['push']({'name':_0x353ac5,'index':_0xa8380f}),_0x1e1dfc[_0x43c120(0x231)](_0x4f8268,_0x591a79),_0xa8380f++;}const _0x3bfd66=new Map();for(const [_0x107389,_0x27c7fa]of _0x1e1dfc){const _0xab4977=_0x27c7fa['slice']()['sort']((_0x2b3e85,_0x3a0023)=>{const _0xded64=_0x43c120,_0x2f717e=_0x3ffc0c[_0xded64(0x224)](_0x2b3e85[_0xded64(0x219)])||0x0,_0xae7fe9=_0x3ffc0c[_0xded64(0x224)](_0x3a0023[_0xded64(0x219)])||0x0;if(_0x2f717e!==_0xae7fe9)return _0xae7fe9-_0x2f717e;return _0x2b3e85[_0xded64(0x222)]-_0x3a0023['index'];})[_0x43c120(0x227)](_0x317667=>_0x317667[_0x43c120(0x219)]);_0x3bfd66[_0x43c120(0x231)](_0x107389,_0xab4977);}return _0x3bfd66;}export function collectSegmentUsageCounts(_0xff4a0e){const _0x4b7a9b=a162_0x1514,_0x2abc83=new Map(),_0x9f66c9=_0x201587=>{const _0x4c24bc=a162_0x1514;if(!_0x201587)return;_0x2abc83[_0x4c24bc(0x231)](_0x201587,(_0x2abc83[_0x4c24bc(0x224)](_0x201587)||0x0)+0x1);},_0x18034a=_0xe4fbb6=>{const _0xcbbd23=a162_0x1514;for(const _0x2adff6 of _0xe4fbb6){_0x9f66c9(_0x2adff6[_0xcbbd23(0x1fc)]?.[_0xcbbd23(0x1f4)]);if(_0x2adff6[_0xcbbd23(0x21c)])for(const _0x366f7e of _0x2adff6[_0xcbbd23(0x21c)]){_0x9f66c9(_0x366f7e[_0xcbbd23(0x1f4)]);}_0x9f66c9(_0x2adff6[_0xcbbd23(0x207)]?.[_0xcbbd23(0x1f4)]);if(_0x2adff6[_0xcbbd23(0x206)])for(const _0x24e04f of _0x2adff6[_0xcbbd23(0x206)]){if(_0x24e04f[_0xcbbd23(0x232)]===_0xcbbd23(0x21f))for(const _0x40d33b of _0x24e04f[_0xcbbd23(0x1fd)][_0xcbbd23(0x244)]){_0x9f66c9(_0x40d33b[_0xcbbd23(0x1f4)]);}else _0x24e04f[_0xcbbd23(0x232)]===_0xcbbd23(0x211)&&_0x9f66c9(_0x24e04f[_0xcbbd23(0x1fd)][_0xcbbd23(0x233)]?.['segment']);}}};_0x9f66c9(_0xff4a0e[_0x4b7a9b(0x235)]?.[_0x4b7a9b(0x1f4)]);if(_0xff4a0e[_0x4b7a9b(0x217)])for(const _0x30ce2d of _0xff4a0e[_0x4b7a9b(0x217)]){_0x9f66c9(_0x30ce2d['goal']?.[_0x4b7a9b(0x1f4)]),_0x18034a(_0x30ce2d[_0x4b7a9b(0x1fb)]);}_0xff4a0e[_0x4b7a9b(0x1fb)]&&_0x18034a(_0xff4a0e[_0x4b7a9b(0x1fb)]);if(_0xff4a0e[_0x4b7a9b(0x1f8)])for(const _0x22973c of _0xff4a0e[_0x4b7a9b(0x1f8)]){_0x18034a(_0x22973c[_0x4b7a9b(0x1fb)]);}return _0x2abc83;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x36917c,_0x124b6b){const _0x4ca16a=a153_0x2129,_0x115de=_0x36917c();while(!![]){try{const _0x2207d4=parseInt(_0x4ca16a(0x24f))/0x1+parseInt(_0x4ca16a(0x1bf))/0x2+parseInt(_0x4ca16a(0x240))/0x3*(parseInt(_0x4ca16a(0x1bd))/0x4)+parseInt(_0x4ca16a(0x1b6))/0x5+parseInt(_0x4ca16a(0x201))/0x6+-parseInt(_0x4ca16a(0x228))/0x7*(parseInt(_0x4ca16a(0x243))/0x8)+-parseInt(_0x4ca16a(0x1eb))/0x9*(parseInt(_0x4ca16a(0x1ae))/0xa);if(_0x2207d4===_0x124b6b)break;else _0x115de['push'](_0x115de['shift']());}catch(_0x7d9971){_0x115de['push'](_0x115de['shift']());}}}(a153_0x58e0,0xb8e17));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1ba54a,_0x16efdb,_0x78bca0,_0x3e6707,_0x2c4113,_0x410d9f){const _0x5cdf0e=a153_0x2129;return{'level':_0x1ba54a,'path':_0x16efdb,'code':_0x78bca0,'message':_0x3e6707,'location':getLocationFromPath(_0x2c4113['document'],_0x2c4113[_0x5cdf0e(0x21a)],pathToArray(_0x410d9f??_0x16efdb))};}function validateVersionStructure(_0x183971,_0x3bc5b0){const _0x5b9b76=a153_0x2129,_0x1ff20d=[];return _0x183971[_0x5b9b76(0x207)]>MAX_STAGES&&_0x1ff20d['push'](createIssue(_0x5b9b76(0x247),_0x5b9b76(0x25e),'TOO_MANY_STAGES','Journey\x20has\x20'+_0x183971[_0x5b9b76(0x207)]+_0x5b9b76(0x200)+MAX_STAGES,_0x3bc5b0)),_0x1ff20d;}function validateStageStructure(_0xa06c55,_0x1fa109,_0x48ae69,_0x4e2f7){const _0x97538e=a153_0x2129,_0x41c858=[],_0x4e749c=_0x97538e(0x1af)+_0x1fa109+']';_0x1fa109===0x0&&!_0xa06c55[_0x97538e(0x1e5)]&&_0x41c858[_0x97538e(0x208)](createIssue(_0x97538e(0x247),_0x4e749c+_0x97538e(0x1ac),_0x97538e(0x224),'Stage\x20\x27'+_0xa06c55['name']+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x4e2f7,_0x4e749c));const _0x28a8b4=_0x1fa109===_0x48ae69-0x1;!_0x28a8b4&&!_0xa06c55[_0x97538e(0x1e2)]&&_0x41c858[_0x97538e(0x208)](createIssue(_0x97538e(0x247),_0x4e749c+_0x97538e(0x21d),'MISSING_MILESTONE',_0x97538e(0x255)+_0xa06c55['name']+_0x97538e(0x209),_0x4e2f7,_0x4e749c));(!_0xa06c55[_0x97538e(0x20d)]||_0xa06c55[_0x97538e(0x20d)][_0x97538e(0x207)]===0x0)&&_0x41c858[_0x97538e(0x208)](createIssue(_0x97538e(0x24c),_0x4e749c+_0x97538e(0x1e3),'MISSING_EXIT_CRITERIA',_0x97538e(0x255)+_0xa06c55[_0x97538e(0x256)]+_0x97538e(0x1fb),_0x4e2f7,_0x4e749c));const _0x507170=_0xa06c55[_0x97538e(0x213)]?.[_0x97538e(0x207)]??0x0;if(_0x507170===0x0)_0x41c858[_0x97538e(0x208)](createIssue(_0x97538e(0x247),_0x4e749c+_0x97538e(0x24b),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0xa06c55[_0x97538e(0x256)]+_0x97538e(0x211),_0x4e2f7,_0x4e749c+_0x97538e(0x24b)));else{if(_0x507170===0x1)_0x41c858[_0x97538e(0x208)](createIssue('warning',_0x4e749c+'.steps',_0x97538e(0x1fe),_0x97538e(0x255)+_0xa06c55['name']+_0x97538e(0x1e8),_0x4e2f7,_0x4e749c+_0x97538e(0x24b)));else _0x507170<=0x3&&_0x41c858[_0x97538e(0x208)](createIssue('warning',_0x4e749c+'.steps','FEW_STEPS',_0x97538e(0x255)+_0xa06c55[_0x97538e(0x256)]+_0x97538e(0x1b0)+_0x507170+_0x97538e(0x1ea),_0x4e2f7,_0x4e749c+_0x97538e(0x24b)));}return _0x41c858;}function validateStep(_0x2b205d,_0x532a83,_0x542537,_0x2ceef6){const _0x2656a7=a153_0x2129,_0x131597=[];if(_0x2b205d['type']===_0x2656a7(0x1c3))return _0x2b205d[_0x2656a7(0x21c)]&&_0x131597['push'](createIssue('error',_0x532a83+'.next',_0x2656a7(0x1bb),_0x2656a7(0x1db)+_0x2b205d[_0x2656a7(0x256)]+_0x2656a7(0x1f6),_0x542537)),_0x2656a7(0x1da)in _0x2b205d&&_0x2b205d[_0x2656a7(0x1da)]!==undefined&&_0x131597[_0x2656a7(0x208)](createIssue('error',_0x532a83+'.with',_0x2656a7(0x1bb),_0x2656a7(0x1db)+_0x2b205d['name']+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x542537)),_0x131597;_0x2b205d[_0x2656a7(0x21c)]&&(_0x542537[_0x2656a7(0x239)]&&!_0x542537[_0x2656a7(0x239)][_0x2656a7(0x1c4)](_0x2b205d[_0x2656a7(0x21c)])&&_0x131597[_0x2656a7(0x208)](createIssue(_0x2656a7(0x247),_0x532a83+'.next',_0x2656a7(0x1e1),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x2b205d[_0x2656a7(0x21c)]+'\x27',_0x542537)));switch(_0x2b205d[_0x2656a7(0x20a)]){case'wait':_0x131597[_0x2656a7(0x208)](...validateWaitStep(_0x2b205d,_0x532a83,_0x542537,_0x2ceef6));break;case _0x2656a7(0x1d3):_0x131597[_0x2656a7(0x208)](...validateActivationStep(_0x2b205d,_0x532a83,_0x542537));break;case _0x2656a7(0x217):_0x131597[_0x2656a7(0x208)](...validateDecisionPointStep(_0x2b205d,_0x532a83,_0x542537,_0x2ceef6));break;case _0x2656a7(0x252):_0x131597[_0x2656a7(0x208)](...validateAbTestStep(_0x2b205d,_0x532a83,_0x542537,_0x2ceef6));break;case _0x2656a7(0x1ab):_0x131597[_0x2656a7(0x208)](...validateJumpStep(_0x2b205d,_0x532a83,_0x542537));break;}return _0x131597;}function validateWaitStep(_0x2e41b5,_0x52789c,_0x3e02f6,_0xe7687d){const _0x599dc5=a153_0x2129,_0x38b695=[];if(!_0x2e41b5[_0x599dc5(0x1da)])return _0x38b695[_0x599dc5(0x208)](createIssue(_0x599dc5(0x247),_0x52789c+_0x599dc5(0x1ff),_0x599dc5(0x22f),_0x599dc5(0x1e4),_0x3e02f6,_0x52789c)),_0x38b695;if(_0x2e41b5[_0x599dc5(0x1da)][_0x599dc5(0x1b5)]){const _0x3e5435=_0x2e41b5[_0x599dc5(0x1da)][_0x599dc5(0x1b5)];if(_0x3e5435[_0x599dc5(0x1ad)]){_0x3e02f6[_0x599dc5(0x23d)]?.[_0x599dc5(0x1d1)](_0x3e5435['segment']);!_0x3e5435['segment']['startsWith'](_0x599dc5(0x232))&&(_0x3e02f6[_0x599dc5(0x1b1)]&&!_0x3e02f6['embeddedSegments'][_0x599dc5(0x1c4)](_0x3e5435['segment'])&&_0x38b695[_0x599dc5(0x208)](createIssue(_0x599dc5(0x247),_0x52789c+'.with.condition.segment',_0x599dc5(0x225),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x3e5435[_0x599dc5(0x1ad)]+_0x599dc5(0x1df),_0x3e02f6)));_0x3e5435[_0x599dc5(0x21c)]&&_0x3e02f6[_0x599dc5(0x239)]&&!_0x3e02f6[_0x599dc5(0x239)][_0x599dc5(0x1c4)](_0x3e5435[_0x599dc5(0x21c)])&&_0x38b695[_0x599dc5(0x208)](createIssue(_0x599dc5(0x247),_0x52789c+_0x599dc5(0x254),_0x599dc5(0x1e1),_0x599dc5(0x1dd)+_0x3e5435[_0x599dc5(0x21c)]+'\x27',_0x3e02f6));_0x3e5435[_0x599dc5(0x202)]?.['next']&&_0x3e02f6[_0x599dc5(0x239)]&&!_0x3e02f6[_0x599dc5(0x239)][_0x599dc5(0x1c4)](_0x3e5435[_0x599dc5(0x202)][_0x599dc5(0x21c)])&&_0x38b695[_0x599dc5(0x208)](createIssue('error',_0x52789c+_0x599dc5(0x258),_0x599dc5(0x1e1),_0x599dc5(0x246)+_0x3e5435[_0x599dc5(0x202)][_0x599dc5(0x21c)]+'\x27',_0x3e02f6));const _0x2dae17=_0x3e5435[_0x599dc5(0x21c)]||_0x2e41b5['next'],_0x584980=_0x3e5435['timeout']?.[_0x599dc5(0x21c)]||_0x2e41b5[_0x599dc5(0x21c)];if(_0x2dae17){const _0x262f1c=_0xe7687d[_0x599dc5(0x1b3)](_0x2dae17);_0x262f1c?.[_0x599dc5(0x20a)]==='merge'&&_0x38b695[_0x599dc5(0x208)](createIssue(_0x599dc5(0x24c),_0x52789c+_0x599dc5(0x254),_0x599dc5(0x1c1),_0x599dc5(0x21f)+_0x2dae17+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x3e02f6,_0x52789c+_0x599dc5(0x1aa)));}if(_0x584980){const _0x117a63=_0xe7687d[_0x599dc5(0x1b3)](_0x584980);_0x117a63?.[_0x599dc5(0x20a)]===_0x599dc5(0x1ba)&&_0x38b695[_0x599dc5(0x208)](createIssue(_0x599dc5(0x24c),_0x52789c+'.with.condition.timeout.next',_0x599dc5(0x1c1),_0x599dc5(0x1b7)+_0x584980+_0x599dc5(0x24d),_0x3e02f6,_0x52789c+_0x599dc5(0x1f0)));}}}return _0x38b695;}function validateActivationStep(_0x1fbb14,_0x239c78,_0x197999){const _0x448664=a153_0x2129,_0xd0e5a7=[];if(!_0x1fbb14[_0x448664(0x1da)]?.['activation'])return _0xd0e5a7[_0x448664(0x208)](createIssue(_0x448664(0x247),_0x239c78+_0x448664(0x1ca),_0x448664(0x1f3),_0x448664(0x219),_0x197999,_0x239c78)),_0xd0e5a7;const _0x3c034b=_0x1fbb14[_0x448664(0x1da)]['activation'];return _0x197999[_0x448664(0x1d9)]&&!_0x3c034b[_0x448664(0x1fa)](_0x448664(0x232))&&(!_0x197999['activationKeys'][_0x448664(0x1c4)](_0x3c034b)&&_0xd0e5a7[_0x448664(0x208)](createIssue(_0x448664(0x247),_0x239c78+_0x448664(0x1ca),_0x448664(0x229),_0x448664(0x1cc)+_0x3c034b+_0x448664(0x22e),_0x197999))),_0xd0e5a7;}function validateDecisionPointStep(_0x3a1fd9,_0x3a1381,_0x5e73af,_0x5808e7){const _0x8621dd=a153_0x2129,_0x3157d6=[];if(!_0x3a1fd9[_0x8621dd(0x1da)]?.[_0x8621dd(0x234)]||_0x3a1fd9[_0x8621dd(0x1da)]['branches']['length']===0x0)return _0x3157d6['push'](createIssue('error',_0x3a1381+'.with.branches',_0x8621dd(0x25d),_0x8621dd(0x1e9),_0x5e73af,_0x3a1381)),_0x3157d6;for(let _0x4d9777=0x0;_0x4d9777<_0x3a1fd9[_0x8621dd(0x1da)][_0x8621dd(0x234)][_0x8621dd(0x207)];_0x4d9777++){const _0x38647f=_0x3a1fd9[_0x8621dd(0x1da)][_0x8621dd(0x234)][_0x4d9777],_0x5a80a7=_0x3a1381+_0x8621dd(0x1c9)+_0x4d9777+']';_0x38647f[_0x8621dd(0x1ad)]&&!_0x38647f[_0x8621dd(0x1d8)]&&(_0x5e73af[_0x8621dd(0x23d)]?.['add'](_0x38647f[_0x8621dd(0x1ad)]),!_0x38647f[_0x8621dd(0x1ad)][_0x8621dd(0x1fa)]('ref:')&&(_0x5e73af[_0x8621dd(0x1b1)]&&!_0x5e73af[_0x8621dd(0x1b1)][_0x8621dd(0x1c4)](_0x38647f[_0x8621dd(0x1ad)])&&_0x3157d6[_0x8621dd(0x208)](createIssue(_0x8621dd(0x247),_0x5a80a7+_0x8621dd(0x1e6),_0x8621dd(0x225),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x38647f[_0x8621dd(0x1ad)]+'\x27',_0x5e73af))));_0x38647f[_0x8621dd(0x21c)]&&_0x5e73af[_0x8621dd(0x239)]&&!_0x5e73af[_0x8621dd(0x239)][_0x8621dd(0x1c4)](_0x38647f[_0x8621dd(0x21c)])&&_0x3157d6[_0x8621dd(0x208)](createIssue('error',_0x5a80a7+_0x8621dd(0x1b9),_0x8621dd(0x1e1),_0x8621dd(0x20f)+_0x38647f[_0x8621dd(0x21c)]+'\x27',_0x5e73af));if(_0x38647f[_0x8621dd(0x21c)]){const _0x1c5a87=_0x5808e7[_0x8621dd(0x1b3)](_0x38647f[_0x8621dd(0x21c)]);_0x1c5a87?.[_0x8621dd(0x20a)]===_0x8621dd(0x1ba)&&_0x3157d6['push'](createIssue(_0x8621dd(0x24c),_0x5a80a7+'.next','BRANCH_DIRECTLY_TO_MERGE',_0x8621dd(0x244)+_0x38647f[_0x8621dd(0x256)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x38647f[_0x8621dd(0x21c)]+_0x8621dd(0x212),_0x5e73af));}}return _0x3157d6;}function validateAbTestStep(_0x2e21bc,_0x17342a,_0x30507b,_0x25f9b5){const _0x12133f=a153_0x2129,_0x116c84=[];if(!_0x2e21bc[_0x12133f(0x1da)]?.[_0x12133f(0x24e)]||_0x2e21bc[_0x12133f(0x1da)][_0x12133f(0x24e)][_0x12133f(0x207)]===0x0)return _0x116c84[_0x12133f(0x208)](createIssue('error',_0x17342a+_0x12133f(0x1c7),_0x12133f(0x25d),_0x12133f(0x218),_0x30507b,_0x17342a)),_0x116c84;const _0xa2cca2=_0x2e21bc[_0x12133f(0x1da)][_0x12133f(0x24e)]['reduce']((_0x5ec823,_0x33efd9)=>_0x5ec823+(_0x33efd9[_0x12133f(0x231)]||0x0),0x0);Math[_0x12133f(0x227)](_0xa2cca2-0x64)>0.01&&_0x116c84[_0x12133f(0x208)](createIssue(_0x12133f(0x247),_0x17342a+_0x12133f(0x1c7),_0x12133f(0x230),_0x12133f(0x1be)+_0xa2cca2+'%)',_0x30507b));for(let _0x147abd=0x0;_0x147abd<_0x2e21bc[_0x12133f(0x1da)]['variants'][_0x12133f(0x207)];_0x147abd++){const _0x59e00b=_0x2e21bc[_0x12133f(0x1da)][_0x12133f(0x24e)][_0x147abd],_0x3bd411=_0x17342a+_0x12133f(0x23a)+_0x147abd+']';_0x59e00b[_0x12133f(0x21c)]&&_0x30507b[_0x12133f(0x239)]&&!_0x30507b[_0x12133f(0x239)][_0x12133f(0x1c4)](_0x59e00b[_0x12133f(0x21c)])&&_0x116c84['push'](createIssue('error',_0x3bd411+_0x12133f(0x1b9),_0x12133f(0x1e1),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x59e00b[_0x12133f(0x21c)]+'\x27',_0x30507b));if(_0x59e00b[_0x12133f(0x21c)]){const _0x341398=_0x25f9b5[_0x12133f(0x1b3)](_0x59e00b[_0x12133f(0x21c)]);_0x341398?.['type']==='merge'&&_0x116c84['push'](createIssue('warning',_0x3bd411+'.next',_0x12133f(0x1c1),'A/B\x20test\x20variant\x20\x27'+_0x59e00b[_0x12133f(0x256)]+_0x12133f(0x25a)+_0x59e00b[_0x12133f(0x21c)]+_0x12133f(0x212),_0x30507b));}}return _0x116c84;}function validateJumpStep(_0x31639a,_0x4fd649,_0x41c49b){const _0x1293e6=a153_0x2129,_0x429545=[];if(!_0x31639a[_0x1293e6(0x1da)]?.[_0x1293e6(0x1c6)])return _0x429545['push'](createIssue('error',_0x4fd649+_0x1293e6(0x1cb),_0x1293e6(0x23f),_0x1293e6(0x204),_0x41c49b,_0x4fd649)),_0x429545;return(!_0x31639a[_0x1293e6(0x1da)]['target'][_0x1293e6(0x1e7)]||!_0x31639a[_0x1293e6(0x1da)][_0x1293e6(0x1c6)][_0x1293e6(0x1f5)])&&_0x429545[_0x1293e6(0x208)](createIssue(_0x1293e6(0x247),_0x4fd649+_0x1293e6(0x1cb),_0x1293e6(0x23f),_0x1293e6(0x1ed),_0x41c49b)),_0x429545;}function buildConvergenceMap(_0x4056eb){const _0x298ebe=a153_0x2129,_0x386069=new Map();function _0x3c276b(_0x1d906b,_0x14e0f1){const _0x39b087=a153_0x2129,_0x160235=_0x386069[_0x39b087(0x1b3)](_0x1d906b)||[];_0x160235[_0x39b087(0x208)](_0x14e0f1),_0x386069[_0x39b087(0x21b)](_0x1d906b,_0x160235);}for(const _0x538e7d of _0x4056eb){_0x538e7d[_0x298ebe(0x21c)]&&_0x3c276b(_0x538e7d[_0x298ebe(0x21c)],{'stepName':_0x538e7d[_0x298ebe(0x256)],'description':_0x298ebe(0x222)+_0x538e7d['name']+'\x27'});if(_0x538e7d[_0x298ebe(0x20a)]==='decision_point'&&_0x538e7d[_0x298ebe(0x1da)]?.[_0x298ebe(0x234)])for(const _0x2a41f7 of _0x538e7d[_0x298ebe(0x1da)][_0x298ebe(0x234)]){_0x2a41f7['next']&&_0x3c276b(_0x2a41f7[_0x298ebe(0x21c)],{'stepName':_0x538e7d[_0x298ebe(0x256)],'description':_0x298ebe(0x237)+_0x2a41f7[_0x298ebe(0x256)]+_0x298ebe(0x1ee)+_0x538e7d['name']+'\x27'});}if(_0x538e7d['type']==='ab_test'&&_0x538e7d[_0x298ebe(0x1da)]?.['variants'])for(const _0x590966 of _0x538e7d['with'][_0x298ebe(0x24e)]){_0x590966[_0x298ebe(0x21c)]&&_0x3c276b(_0x590966[_0x298ebe(0x21c)],{'stepName':_0x538e7d['name'],'description':'variant\x20\x27'+_0x590966[_0x298ebe(0x256)]+_0x298ebe(0x1ee)+_0x538e7d[_0x298ebe(0x256)]+'\x27'});}_0x538e7d[_0x298ebe(0x20a)]===_0x298ebe(0x22b)&&_0x538e7d['with']?.['condition']&&(_0x538e7d[_0x298ebe(0x1da)][_0x298ebe(0x1b5)][_0x298ebe(0x21c)]&&_0x3c276b(_0x538e7d[_0x298ebe(0x1da)][_0x298ebe(0x1b5)][_0x298ebe(0x21c)],{'stepName':_0x538e7d['name'],'description':_0x298ebe(0x1f4)+_0x538e7d[_0x298ebe(0x256)]+'\x27'}),_0x538e7d[_0x298ebe(0x1da)]['condition'][_0x298ebe(0x202)]?.[_0x298ebe(0x21c)]&&_0x3c276b(_0x538e7d[_0x298ebe(0x1da)][_0x298ebe(0x1b5)][_0x298ebe(0x202)]['next'],{'stepName':_0x538e7d[_0x298ebe(0x256)],'description':_0x298ebe(0x259)+_0x538e7d[_0x298ebe(0x256)]+'\x27'}));}return _0x386069;}function validateFlowControl(_0xf57e77,_0x42a0bd,_0x11ed96){const _0x3d8db1=a153_0x2129,_0x325195=[],_0x14a4de=_0x3d8db1(0x1af)+_0x42a0bd+']',_0x550076=_0xf57e77[_0x3d8db1(0x213)]||[];if(_0x550076[_0x3d8db1(0x207)]===0x0)return _0x325195;const _0x1e0699=new Map();for(const _0x304495 of _0x550076){_0x304495[_0x3d8db1(0x256)]&&_0x1e0699[_0x3d8db1(0x21b)](_0x304495[_0x3d8db1(0x256)],_0x304495);}const _0x377454=buildConvergenceMap(_0x550076),_0xb5aa0b=_0x550076[_0x3d8db1(0x1d2)](_0x117ac0=>_0x117ac0[_0x3d8db1(0x20a)]===_0x3d8db1(0x1c3));!_0xb5aa0b&&_0x325195[_0x3d8db1(0x208)](createIssue('error',_0x14a4de+_0x3d8db1(0x24b),_0x3d8db1(0x1f1),'Stage\x20\x27'+_0xf57e77['name']+_0x3d8db1(0x25f),_0x11ed96));for(const [_0x249ef0,_0x38c6bf]of _0x377454){const _0x2fe4f7=_0x1e0699[_0x3d8db1(0x1b3)](_0x249ef0);if(!_0x2fe4f7)continue;if(_0x38c6bf[_0x3d8db1(0x207)]>0x1&&_0x2fe4f7[_0x3d8db1(0x20a)]!==_0x3d8db1(0x1ba)){const _0x4ff5f4=_0x38c6bf[_0x3d8db1(0x21e)](_0xb2e50a=>_0xb2e50a[_0x3d8db1(0x1ce)])['join'](',\x20');_0x325195[_0x3d8db1(0x208)](createIssue(_0x3d8db1(0x247),_0x14a4de+_0x3d8db1(0x24b),'CONVERGENCE_WITHOUT_MERGE',_0x3d8db1(0x236)+_0x249ef0+'\x27\x20(from:\x20'+_0x4ff5f4+_0x3d8db1(0x1c2),_0x11ed96));}_0x38c6bf[_0x3d8db1(0x207)]===0x1&&_0x2fe4f7[_0x3d8db1(0x20a)]==='merge'&&_0x325195[_0x3d8db1(0x208)](createIssue('warning',_0x14a4de+_0x3d8db1(0x24b),_0x3d8db1(0x20c),_0x3d8db1(0x1ef)+_0x249ef0+_0x3d8db1(0x251)+_0x38c6bf[0x0][_0x3d8db1(0x1ce)]+').\x20Merge\x20is\x20unnecessary.',_0x11ed96));}for(const _0x550891 of _0x550076){if(_0x550891[_0x3d8db1(0x20a)]===_0x3d8db1(0x1ba)&&_0x550891[_0x3d8db1(0x21c)]){const _0x5bfa0d=_0x1e0699['get'](_0x550891[_0x3d8db1(0x21c)]);_0x5bfa0d?.['type']===_0x3d8db1(0x1ba)&&_0x325195[_0x3d8db1(0x208)](createIssue(_0x3d8db1(0x247),_0x14a4de+_0x3d8db1(0x24b),_0x3d8db1(0x210),_0x3d8db1(0x1ef)+_0x550891[_0x3d8db1(0x256)]+_0x3d8db1(0x1f2)+_0x550891[_0x3d8db1(0x21c)]+_0x3d8db1(0x235),_0x11ed96));}}return _0x325195;}function validateCriteria(_0x177476,_0x466e87,_0x5c9570){const _0x54b6be=a153_0x2129,_0x430d8b=[];return _0x177476['segment']&&(_0x5c9570[_0x54b6be(0x23d)]?.[_0x54b6be(0x1d1)](_0x177476[_0x54b6be(0x1ad)]),!_0x177476[_0x54b6be(0x1ad)][_0x54b6be(0x1fa)](_0x54b6be(0x232))&&(_0x5c9570['embeddedSegments']&&!_0x5c9570[_0x54b6be(0x1b1)][_0x54b6be(0x1c4)](_0x177476[_0x54b6be(0x1ad)])&&_0x430d8b[_0x54b6be(0x208)](createIssue('error',_0x466e87+_0x54b6be(0x1e6),_0x54b6be(0x225),_0x54b6be(0x245)+_0x177476[_0x54b6be(0x1ad)]+'\x27',_0x5c9570)))),_0x430d8b;}function a153_0x2129(_0x1a9646,_0x42409c){_0x1a9646=_0x1a9646-0x1aa;const _0x58e0a6=a153_0x58e0();let _0x212961=_0x58e0a6[_0x1a9646];return _0x212961;}function validateEmbeddedSegment(_0x15f686,_0x17acec,_0x3a7d7f){const _0x409ef8=a153_0x2129,_0x218523=[];return _0x15f686[_0x409ef8(0x23c)]&&_0x218523['push'](...validateRuleDef(_0x15f686[_0x409ef8(0x23c)],_0x17acec+'.rule',_0x3a7d7f)),_0x218523;}function validateStage(_0x5cf69f,_0x3632d2,_0x40db9a,_0x339322){const _0x2c8be1=a153_0x2129,_0x3e3375=[],_0x1ff470=_0x2c8be1(0x1af)+_0x3632d2+']',_0x574142=new Map(),_0x2f204=new Map();if(_0x5cf69f[_0x2c8be1(0x213)]){for(let _0x455f7b=0x0;_0x455f7b<_0x5cf69f['steps'][_0x2c8be1(0x207)];_0x455f7b++){const _0x44653a=_0x5cf69f[_0x2c8be1(0x213)][_0x455f7b];_0x44653a['name']&&_0x574142[_0x2c8be1(0x21b)](_0x44653a['name'],_0x44653a);}for(let _0x53ab13=0x0;_0x53ab13<_0x5cf69f[_0x2c8be1(0x213)][_0x2c8be1(0x207)];_0x53ab13++){const _0x52db84=_0x5cf69f[_0x2c8be1(0x213)][_0x53ab13],_0x2ebad5=_0x1ff470+_0x2c8be1(0x203)+_0x53ab13+']';if(_0x52db84[_0x2c8be1(0x256)]){if(_0x2f204[_0x2c8be1(0x1c4)](_0x52db84[_0x2c8be1(0x256)])){const _0xeaa1c1=_0x2f204[_0x2c8be1(0x1b3)](_0x52db84[_0x2c8be1(0x256)]);_0x3e3375[_0x2c8be1(0x208)](createIssue('error',_0x2ebad5+_0x2c8be1(0x1cd),_0x2c8be1(0x1b8),_0x2c8be1(0x1de)+_0x52db84[_0x2c8be1(0x256)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0xeaa1c1+'])',_0x339322));}else _0x2f204[_0x2c8be1(0x21b)](_0x52db84['name'],_0x53ab13);}_0x3e3375[_0x2c8be1(0x208)](...validateStep(_0x52db84,_0x2ebad5,_0x339322,_0x574142));}}_0x5cf69f['entry_criteria']&&_0x3e3375['push'](...validateCriteria(_0x5cf69f[_0x2c8be1(0x1e5)],_0x1ff470+_0x2c8be1(0x1ac),_0x339322));if(_0x5cf69f['exit_criteria'])for(let _0x478041=0x0;_0x478041<_0x5cf69f[_0x2c8be1(0x20d)]['length'];_0x478041++){_0x3e3375[_0x2c8be1(0x208)](...validateCriteria(_0x5cf69f[_0x2c8be1(0x20d)][_0x478041],_0x1ff470+_0x2c8be1(0x241)+_0x478041+']',_0x339322));}return _0x5cf69f[_0x2c8be1(0x1e2)]&&_0x3e3375[_0x2c8be1(0x208)](...validateCriteria(_0x5cf69f[_0x2c8be1(0x1e2)],_0x1ff470+'.milestone',_0x339322)),_0x3e3375[_0x2c8be1(0x208)](...validateStageStructure(_0x5cf69f,_0x3632d2,_0x40db9a,_0x339322)),_0x3e3375[_0x2c8be1(0x208)](...validateFlowControl(_0x5cf69f,_0x3632d2,_0x339322)),_0x3e3375;}function validateStagesForVersion(_0x1add61,_0x52a814,_0x6d2a1,_0x10d1c4,_0x4134c4,_0x54432e,_0x130ded){const _0x23d6da=a153_0x2129;if(_0x1add61['length']===0x0){_0x4134c4[_0x23d6da(0x208)]({'level':_0x23d6da(0x247),'path':_0x10d1c4+_0x23d6da(0x25e),'code':_0x23d6da(0x1cf),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x6d2a1['document'],_0x6d2a1[_0x23d6da(0x21a)],[_0x23d6da(0x25e)])});return;}const _0x4a1165=new Set();for(const _0x148631 of _0x1add61){if(_0x148631[_0x23d6da(0x213)])for(const _0x44b106 of _0x148631[_0x23d6da(0x213)]){_0x44b106[_0x23d6da(0x256)]&&_0x4a1165['add'](_0x44b106['name']);}}const _0x1a95d3={..._0x6d2a1,'stepNames':_0x4a1165},_0x1e6b92=validateVersionStructure(_0x1add61,_0x1a95d3);for(const _0x428d0d of _0x1e6b92){const _0x3a56cd=_0x10d1c4?{..._0x428d0d,'path':''+_0x10d1c4+_0x428d0d[_0x23d6da(0x1f7)]}:_0x428d0d;if(_0x3a56cd[_0x23d6da(0x1f9)]==='error')_0x4134c4[_0x23d6da(0x208)](_0x3a56cd);else _0x54432e['push'](_0x3a56cd);}for(let _0x489f09=0x0;_0x489f09<_0x1add61[_0x23d6da(0x207)];_0x489f09++){const _0x2426bc=validateStage(_0x1add61[_0x489f09],_0x489f09,_0x1add61[_0x23d6da(0x207)],_0x1a95d3);for(const _0x36783c of _0x2426bc){const _0x20dd09=_0x10d1c4?{..._0x36783c,'path':''+_0x10d1c4+_0x36783c['path']}:_0x36783c;if(_0x20dd09[_0x23d6da(0x1f9)]===_0x23d6da(0x247))_0x4134c4[_0x23d6da(0x208)](_0x20dd09);else _0x54432e['push'](_0x20dd09);}}if(_0x52a814['goal']){const _0x3672ad=_0x130ded?.[_0x23d6da(0x214)]?_0x23d6da(0x25c):_0x10d1c4+'goal',_0x2b650a=validateCriteria(_0x52a814[_0x23d6da(0x25c)],_0x3672ad,_0x1a95d3);for(const _0x58c862 of _0x2b650a){if(_0x58c862[_0x23d6da(0x1f9)]===_0x23d6da(0x247))_0x4134c4[_0x23d6da(0x208)](_0x58c862);else _0x54432e[_0x23d6da(0x208)](_0x58c862);}}}function extractVersionIndex(_0xb83cce){const _0x330285=_0xb83cce['match'](/^journeys\[(\d+)\]\./);return _0x330285?_0x330285[0x1]:undefined;}function deduplicateAcrossVersions(_0x3f06c6){const _0x5d5f78=a153_0x2129,_0x2151fe=new Map();for(let _0x2a2a16=0x0;_0x2a2a16<_0x3f06c6['length'];_0x2a2a16++){const _0x4aff6e=_0x3f06c6[_0x2a2a16]['code']+':'+_0x3f06c6[_0x2a2a16][_0x5d5f78(0x248)],_0x2be5cc=extractVersionIndex(_0x3f06c6[_0x2a2a16][_0x5d5f78(0x1f7)]),_0x99e5d3=_0x2151fe[_0x5d5f78(0x1b3)](_0x4aff6e);if(_0x99e5d3){_0x99e5d3['indices'][_0x5d5f78(0x208)](_0x2a2a16);if(_0x2be5cc)_0x99e5d3[_0x5d5f78(0x1d4)][_0x5d5f78(0x1d1)](_0x2be5cc);}else _0x2151fe[_0x5d5f78(0x21b)](_0x4aff6e,{'indices':[_0x2a2a16],'versions':new Set(_0x2be5cc?[_0x2be5cc]:[])});}const _0x3b2bc0=new Set();for(const {indices:_0x5cc7ad,versions:_0x3a72eb}of _0x2151fe[_0x5d5f78(0x1dc)]()){if(_0x3a72eb[_0x5d5f78(0x1fd)]<=0x1)continue;const _0x49e034=_0x3f06c6[_0x5cc7ad[0x0]];_0x49e034[_0x5d5f78(0x1f7)]=_0x49e034[_0x5d5f78(0x1f7)][_0x5d5f78(0x238)](/^journeys\[\d+\]\./,''),_0x49e034[_0x5d5f78(0x248)]=_0x49e034[_0x5d5f78(0x248)]+'\x20(across\x20'+_0x3a72eb[_0x5d5f78(0x1fd)]+_0x5d5f78(0x1b4);for(let _0x1b1011=0x1;_0x1b1011<_0x5cc7ad[_0x5d5f78(0x207)];_0x1b1011++){_0x3b2bc0['add'](_0x5cc7ad[_0x1b1011]);}}const _0x5987c4=[..._0x3b2bc0][_0x5d5f78(0x1c0)]((_0x3cfa68,_0x114ad1)=>_0x114ad1-_0x3cfa68);for(const _0xd4a3bb of _0x5987c4){_0x3f06c6[_0x5d5f78(0x233)](_0xd4a3bb,0x1);}}export function validateJourneyDef(_0x5c3714,_0xef640c={},_0x75b1ce={}){const _0x8c4e78=a153_0x2129;if(_0x75b1ce[_0x8c4e78(0x223)])return runJourneySemanticChecks(_0x5c3714,_0xef640c);const _0x5b7bc4=JourneyDefSchema['safeParse'](_0x5c3714);if(_0x5b7bc4['success'])return runJourneySemanticChecks(_0x5b7bc4[_0x8c4e78(0x23b)],_0xef640c);return zodErrorsToJourneyValidationResult(_0x5b7bc4['error'],_0xef640c);}function a153_0x58e0(){const _0x52cacf=['variants','340846OutQyu','JOURNEY_SCHEMA_ERROR','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','ab_test','ACTIVATION_SCHEMA_ERROR','.with.condition.next','Stage\x20\x27','name','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.with.condition.timeout.next','timeout\x20of\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','trim','goal','MISSING_CONDITIONS','stages','\x27\x20has\x20no\x20end\x20step','.with.condition','jump','.entry_criteria','segment','10YbXjkF','stages[','\x27\x20has\x20only\x20','embeddedSegments','journey\x20entry','get','\x20versions)','condition','1287365WYsZfE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','DUPLICATE_STEP_NAME','.next','merge','END_STEP_HAS_NEXT_OR_WITH','\x20with\x20latest:\x20true','1948wCDRkQ','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','2516134gTlcgl','sort','BRANCH_DIRECTLY_TO_MERGE',').\x20Use\x20a\x20merge\x20step.','end','has','Journey\x20has\x20no\x20goal\x20defined','target','.with.variants','journeys','.with.branches[','.with.activation','.with.target','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','.name','description','MISSING_STAGES','latest','add','some','activation','versions','excluded_','segments','.stages','excluded','activationKeys','with','End\x20step\x20\x27','values','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','Duplicate\x20step\x20name\x20\x27','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','entries','INVALID_NEXT_REFERENCE','milestone','.exit_criteria','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','entry_criteria','.segment','journey','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','\x20steps\x20(may\x20be\x20too\x20simple)','16560981JxVhOS','journeys[','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x27\x20of\x20\x27','Merge\x20step\x20\x27','.with.condition.timeout','MISSING_END_STEP','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','MISSING_ACTIVATION_REF','condition\x20of\x20\x27','stage','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','path','document','level','startsWith','\x27\x20has\x20no\x20exit_criteria\x20defined','keys','size','INSUFFICIENT_STEPS','.with','\x20stages\x20but\x20maximum\x20is\x20','7655070lzCFMS','timeout','.steps[','Jump\x20step\x20requires\x20a\x20target','endsWith','Journey\x20can\x20have\x20at\x20most\x20one\x20','length','push','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','type','journeys,\x20stages,\x20or\x20versions','SINGLE_INPUT_MERGE','exit_criteria','every','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','MERGE_TO_MERGE_CHAIN','\x27\x20has\x20no\x20steps','\x27\x20with\x20no\x20action\x20in\x20between','steps','goalIsInherited','symbol','launched','decision_point','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','Activation\x20step\x20requires\x20an\x20activation\x20reference','source','set','next','.milestone','map','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','includes','state','step\x20\x27','skipSchema','MISSING_ENTRY_CRITERIA','MISSING_SEGMENT_REFERENCE','UNUSED_EMBEDDED_SEGMENT','abs','7555219AEDQOy','MISSING_ACTIVATION_DEFINITION','Journey\x20name\x20is\x20required','wait','Embedded\x20segment\x20\x27','activations','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','MISSING_WAIT_PARAMS','INVALID_AB_TEST_PERCENTAGES','percentage','ref:','splice','branches','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','branch\x20\x27','replace','stepNames','.with.variants[','data','rule','referencedSegments','MISSING_NAME','INVALID_JUMP_TARGET','3354RMGrUD','.exit_criteria[','version','8qEsMat','Decision\x20branch\x20\x27','Criteria\x20references\x20undefined\x20segment\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','error','message','versions[','filter','.steps','warning','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.'];a153_0x58e0=function(){return _0x52cacf;};return a153_0x58e0();}function zodErrorsToJourneyValidationResult(_0x12c88c,_0x1141f4){const _0x3bc8b0=a153_0x2129,_0x328080=flattenZodIssues(_0x12c88c['issues']),_0x6cb0f1=_0x328080[_0x3bc8b0(0x21e)](_0x5684b5=>{const _0x3f6620=_0x3bc8b0,_0x10d390=formatZodPath(_0x5684b5[_0x3f6620(0x1f7)]),_0x11f670=mapJourneyZodIssueToCode(_0x5684b5,_0x10d390),_0x53c6ec=getLocationFromPath(_0x1141f4[_0x3f6620(0x1f8)],_0x1141f4['source'],_0x5684b5[_0x3f6620(0x1f7)][_0x3f6620(0x21e)](_0x2651e3=>typeof _0x2651e3===_0x3f6620(0x215)?String(_0x2651e3):_0x2651e3));return{'level':_0x3f6620(0x247),'path':_0x10d390,'code':_0x11f670,'message':_0x5684b5[_0x3f6620(0x248)],..._0x53c6ec&&{'location':_0x53c6ec}};});return{'valid':![],'errors':_0x6cb0f1,'warnings':[]};}function mapJourneyZodIssueToCode(_0x3c6c9e,_0x1da803){const _0x56579c=a153_0x2129;if(_0x1da803===_0x56579c(0x256))return'MISSING_NAME';if(_0x1da803[_0x56579c(0x205)]('.type')&&_0x1da803[_0x56579c(0x220)](_0x56579c(0x213)))return _0x56579c(0x250);if(_0x1da803==='stages'||_0x1da803[_0x56579c(0x205)](_0x56579c(0x1d7)))return _0x56579c(0x1cf);if(_0x1da803===''&&_0x3c6c9e[_0x56579c(0x248)][_0x56579c(0x220)](_0x56579c(0x20b)))return _0x56579c(0x1cf);if(_0x1da803[_0x56579c(0x220)](_0x56579c(0x1d3)))return _0x56579c(0x253);return _0x56579c(0x250);}function runJourneySemanticChecks(_0x5b9a89,_0x1de925){const _0x52551c=a153_0x2129,_0x2e3e11=[],_0x292107=[];(!_0x5b9a89[_0x52551c(0x256)]||_0x5b9a89[_0x52551c(0x256)][_0x52551c(0x25b)]()==='')&&_0x2e3e11['push']({'level':_0x52551c(0x247),'path':_0x52551c(0x256),'code':_0x52551c(0x23e),'message':_0x52551c(0x22a),'location':getLocationFromPath(_0x1de925['document'],_0x1de925[_0x52551c(0x21a)],[_0x52551c(0x256)])});const _0xa1c706=new Set();if(_0x5b9a89[_0x52551c(0x1d6)])for(const _0x4b8cc8 of Object[_0x52551c(0x1fc)](_0x5b9a89[_0x52551c(0x1d6)])){_0xa1c706[_0x52551c(0x1d1)](_0x4b8cc8);}const _0x467a68=new Set();if(_0x5b9a89[_0x52551c(0x22d)])for(const _0x1321cb of Object[_0x52551c(0x1fc)](_0x5b9a89['activations'])){_0x467a68[_0x52551c(0x1d1)](_0x1321cb);}const _0x4e5ab9=new Set(),_0x4ac765={..._0x1de925,'embeddedSegments':_0xa1c706,'referencedSegments':_0x4e5ab9,'activationKeys':_0x467a68[_0x52551c(0x1fd)]>0x0?_0x467a68:undefined};if(_0x5b9a89[_0x52551c(0x1d6)])for(const [_0x408e7f,_0x36adff]of Object[_0x52551c(0x1e0)](_0x5b9a89[_0x52551c(0x1d6)])){const _0xcc1576=validateEmbeddedSegment(_0x36adff,'segments.'+_0x408e7f,_0x4ac765);for(const _0xc869cb of _0xcc1576){if(_0xc869cb['level']===_0x52551c(0x247))_0x2e3e11[_0x52551c(0x208)](_0xc869cb);else _0x292107[_0x52551c(0x208)](_0xc869cb);}}const _0x2ae23d=!!_0x5b9a89[_0x52551c(0x25c)],_0x7701eb=_0x5b9a89[_0x52551c(0x1c8)]?.[_0x52551c(0x20e)](_0x4763f3=>!!_0x4763f3[_0x52551c(0x25c)])??![];!_0x2ae23d&&!_0x7701eb&&_0x292107[_0x52551c(0x208)]({'level':'warning','path':_0x52551c(0x25c),'code':'MISSING_GOAL','message':_0x52551c(0x1c5),'location':getLocationFromPath(_0x1de925[_0x52551c(0x1f8)],_0x1de925[_0x52551c(0x21a)],[_0x52551c(0x25c)])});const _0x2e89c8=_0x5b9a89[_0x52551c(0x1c8)]??_0x5b9a89['versions'];if(_0x2e89c8&&_0x2e89c8[_0x52551c(0x24a)](_0x9b5414=>_0x9b5414[_0x52551c(0x1d0)]===!![])[_0x52551c(0x207)]>0x1){const _0xf97cd4=_0x5b9a89['journeys']?_0x52551c(0x1c8):_0x52551c(0x1d4);_0x2e3e11[_0x52551c(0x208)]({'level':_0x52551c(0x247),'path':_0xf97cd4,'code':'DUPLICATE_LATEST','message':_0x52551c(0x206)+(_0xf97cd4===_0x52551c(0x1c8)?_0x52551c(0x1b2):_0x52551c(0x242))+_0x52551c(0x1bc),'location':getLocationFromPath(_0x1de925[_0x52551c(0x1f8)],_0x1de925[_0x52551c(0x21a)],[_0xf97cd4])});}if(_0x5b9a89['journeys']&&_0x5b9a89[_0x52551c(0x1c8)][_0x52551c(0x207)]>0x0)for(let _0x14e53f=0x0;_0x14e53f<_0x5b9a89[_0x52551c(0x1c8)]['length'];_0x14e53f++){const _0x17ef7d=_0x5b9a89[_0x52551c(0x1c8)][_0x14e53f];if(_0x5b9a89[_0x52551c(0x1c8)]['length']>0x1&&_0x17ef7d[_0x52551c(0x221)]===_0x52551c(0x216))continue;const _0x3ac5a8=_0x17ef7d[_0x52551c(0x25e)]||[],_0x17fbd1=_0x52551c(0x1ec)+_0x14e53f+'].',_0x4cb790=!!_0x17ef7d[_0x52551c(0x25c)],_0x59abdb=_0x4cb790?{..._0x5b9a89,'goal':_0x17ef7d['goal']}:_0x5b9a89;validateStagesForVersion(_0x3ac5a8,_0x59abdb,_0x4ac765,_0x17fbd1,_0x2e3e11,_0x292107,{'goalIsInherited':!_0x4cb790});}else{if(_0x5b9a89[_0x52551c(0x1d4)]&&_0x5b9a89[_0x52551c(0x1d4)][_0x52551c(0x207)]>0x0)for(let _0x54f7ca=0x0;_0x54f7ca<_0x5b9a89[_0x52551c(0x1d4)][_0x52551c(0x207)];_0x54f7ca++){const _0x48680d=_0x5b9a89[_0x52551c(0x1d4)][_0x54f7ca];if(_0x5b9a89[_0x52551c(0x1d4)][_0x52551c(0x207)]>0x1&&_0x48680d[_0x52551c(0x221)]===_0x52551c(0x216))continue;const _0x41a676=_0x48680d[_0x52551c(0x25e)]||[],_0x4cbd7c=_0x52551c(0x249)+_0x54f7ca+'].';validateStagesForVersion(_0x41a676,_0x5b9a89,_0x4ac765,_0x4cbd7c,_0x2e3e11,_0x292107);}else{const _0x531b6b=_0x5b9a89['stages']||[];validateStagesForVersion(_0x531b6b,_0x5b9a89,_0x4ac765,'',_0x2e3e11,_0x292107);}}_0x5b9a89['journeys']&&_0x5b9a89['journeys'][_0x52551c(0x207)]>0x1&&(deduplicateAcrossVersions(_0x2e3e11),deduplicateAcrossVersions(_0x292107));for(const _0x5cdf14 of _0xa1c706){!_0x4e5ab9[_0x52551c(0x1c4)](_0x5cdf14)&&!_0x5cdf14[_0x52551c(0x1fa)](_0x52551c(0x1d5))&&_0x292107[_0x52551c(0x208)]({'level':_0x52551c(0x24c),'path':'segments.'+_0x5cdf14,'code':_0x52551c(0x226),'message':_0x52551c(0x22c)+_0x5cdf14+_0x52551c(0x257),'location':getLocationFromPath(_0x1de925[_0x52551c(0x1f8)],_0x1de925['source'],['segments',_0x5cdf14])});}return{'valid':_0x2e3e11[_0x52551c(0x207)]===0x0,'errors':_0x2e3e11,'warnings':_0x292107};}
|
|
1
|
+
(function(_0x38dc9a,_0x46b3cd){const _0x53dafd=a163_0x4f07,_0x1a698a=_0x38dc9a();while(!![]){try{const _0x57b333=-parseInt(_0x53dafd(0x128))/0x1*(parseInt(_0x53dafd(0x14a))/0x2)+-parseInt(_0x53dafd(0x1b9))/0x3*(-parseInt(_0x53dafd(0x17b))/0x4)+parseInt(_0x53dafd(0x181))/0x5*(parseInt(_0x53dafd(0x17e))/0x6)+-parseInt(_0x53dafd(0x157))/0x7*(-parseInt(_0x53dafd(0x130))/0x8)+parseInt(_0x53dafd(0x118))/0x9+-parseInt(_0x53dafd(0x16e))/0xa+-parseInt(_0x53dafd(0x138))/0xb;if(_0x57b333===_0x46b3cd)break;else _0x1a698a['push'](_0x1a698a['shift']());}catch(_0x35e3af){_0x1a698a['push'](_0x1a698a['shift']());}}}(a163_0x352a,0x3921a));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x18272c,_0x13f327,_0x99b9e1,_0x23c25f,_0x3056f5,_0x5dbf82){const _0x1f958c=a163_0x4f07;return{'level':_0x18272c,'path':_0x13f327,'code':_0x99b9e1,'message':_0x23c25f,'location':getLocationFromPath(_0x3056f5['document'],_0x3056f5[_0x1f958c(0x186)],pathToArray(_0x5dbf82??_0x13f327))};}function validateVersionStructure(_0xecd4bb,_0x177e54){const _0x4312bc=a163_0x4f07,_0x21b568=[];return _0xecd4bb[_0x4312bc(0x151)]>MAX_STAGES&&_0x21b568[_0x4312bc(0x126)](createIssue('error',_0x4312bc(0x14e),'TOO_MANY_STAGES',_0x4312bc(0x112)+_0xecd4bb[_0x4312bc(0x151)]+_0x4312bc(0x19d)+MAX_STAGES,_0x177e54)),_0x21b568;}function validateStageStructure(_0x3adb7b,_0x2fdad9,_0x19dc9e,_0xc3634e){const _0xa24424=a163_0x4f07,_0x4d9dab=[],_0x513566=_0xa24424(0x15e)+_0x2fdad9+']';_0x2fdad9===0x0&&!_0x3adb7b['entry_criteria']&&_0x4d9dab[_0xa24424(0x126)](createIssue(_0xa24424(0x12e),_0x513566+'.entry_criteria',_0xa24424(0x19c),_0xa24424(0x149)+_0x3adb7b[_0xa24424(0x147)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0xc3634e,_0x513566));const _0x2f94b6=_0x2fdad9===_0x19dc9e-0x1;!_0x2f94b6&&!_0x3adb7b[_0xa24424(0x1a7)]&&_0x4d9dab[_0xa24424(0x126)](createIssue('error',_0x513566+'.milestone',_0xa24424(0x129),_0xa24424(0x149)+_0x3adb7b['name']+_0xa24424(0x145),_0xc3634e,_0x513566));(!_0x3adb7b[_0xa24424(0x10e)]||_0x3adb7b[_0xa24424(0x10e)]['length']===0x0)&&_0x4d9dab[_0xa24424(0x126)](createIssue(_0xa24424(0x187),_0x513566+_0xa24424(0x177),_0xa24424(0x170),_0xa24424(0x149)+_0x3adb7b[_0xa24424(0x147)]+_0xa24424(0x155),_0xc3634e,_0x513566));const _0x22f27b=_0x3adb7b['steps']?.[_0xa24424(0x151)]??0x0;if(_0x22f27b===0x0)_0x4d9dab[_0xa24424(0x126)](createIssue(_0xa24424(0x12e),_0x513566+_0xa24424(0x18a),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0x3adb7b['name']+_0xa24424(0x189),_0xc3634e,_0x513566+_0xa24424(0x18a)));else{if(_0x22f27b===0x1)_0x4d9dab[_0xa24424(0x126)](createIssue(_0xa24424(0x187),_0x513566+'.steps',_0xa24424(0x132),_0xa24424(0x149)+_0x3adb7b[_0xa24424(0x147)]+_0xa24424(0x1a8),_0xc3634e,_0x513566+_0xa24424(0x18a)));else _0x22f27b<=0x3&&_0x4d9dab[_0xa24424(0x126)](createIssue(_0xa24424(0x187),_0x513566+_0xa24424(0x18a),_0xa24424(0x169),_0xa24424(0x149)+_0x3adb7b[_0xa24424(0x147)]+'\x27\x20has\x20only\x20'+_0x22f27b+_0xa24424(0x18c),_0xc3634e,_0x513566+_0xa24424(0x18a)));}return _0x4d9dab;}function validateStep(_0x1833b4,_0x59bf27,_0x2c243c,_0x15a72e){const _0x5238b1=a163_0x4f07,_0x2890e5=[];if(_0x1833b4['type']===_0x5238b1(0x136))return _0x1833b4[_0x5238b1(0x11d)]&&_0x2890e5[_0x5238b1(0x126)](createIssue(_0x5238b1(0x12e),_0x59bf27+_0x5238b1(0x1bc),_0x5238b1(0x14c),_0x5238b1(0x15c)+_0x1833b4['name']+_0x5238b1(0x17f),_0x2c243c)),_0x5238b1(0x11b)in _0x1833b4&&_0x1833b4[_0x5238b1(0x11b)]!==undefined&&_0x2890e5[_0x5238b1(0x126)](createIssue(_0x5238b1(0x12e),_0x59bf27+_0x5238b1(0x172),_0x5238b1(0x14c),_0x5238b1(0x15c)+_0x1833b4[_0x5238b1(0x147)]+_0x5238b1(0x11e),_0x2c243c)),_0x2890e5;_0x1833b4[_0x5238b1(0x11d)]&&(_0x2c243c['stepNames']&&!_0x2c243c[_0x5238b1(0x160)][_0x5238b1(0x17c)](_0x1833b4[_0x5238b1(0x11d)])&&_0x2890e5['push'](createIssue(_0x5238b1(0x12e),_0x59bf27+_0x5238b1(0x1bc),_0x5238b1(0x184),_0x5238b1(0x176)+_0x1833b4[_0x5238b1(0x11d)]+'\x27',_0x2c243c)));switch(_0x1833b4[_0x5238b1(0x15b)]){case'wait':_0x2890e5[_0x5238b1(0x126)](...validateWaitStep(_0x1833b4,_0x59bf27,_0x2c243c,_0x15a72e));break;case'activation':_0x2890e5[_0x5238b1(0x126)](...validateActivationStep(_0x1833b4,_0x59bf27,_0x2c243c));break;case _0x5238b1(0x19f):_0x2890e5[_0x5238b1(0x126)](...validateDecisionPointStep(_0x1833b4,_0x59bf27,_0x2c243c,_0x15a72e));break;case _0x5238b1(0x13b):_0x2890e5['push'](...validateAbTestStep(_0x1833b4,_0x59bf27,_0x2c243c,_0x15a72e));break;case _0x5238b1(0x10b):_0x2890e5[_0x5238b1(0x126)](...validateJumpStep(_0x1833b4,_0x59bf27,_0x2c243c));break;}return _0x2890e5;}function a163_0x352a(){const _0x169440=['sort','steps','every','timeout','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','branch\x20\x27','goal','MISSING_NAME','MISSING_ENTRY_CRITERIA','\x20stages\x20but\x20maximum\x20is\x20',').\x20Merge\x20is\x20unnecessary.','decision_point','.steps[','Merge\x20step\x20\x27','journey\x20entry','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','embeddedSegments','wait','merge','milestone','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','segment','step\x20\x27','message','.with.variants[','.with.condition.next','.milestone','variant\x20\x27','rule','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','target',').\x20Use\x20a\x20merge\x20step.','.with.activation','\x27\x20of\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20(first\x20defined\x20at\x20steps[','2193ekzmec','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','.exit_criteria[','.next','journey','entries','CONVERGENCE_WITHOUT_MERGE','Criteria\x20references\x20undefined\x20segment\x20\x27','.type','referencedSegments','.with.condition.timeout','jump','abs','launched','exit_criteria','A/B\x20test\x20variant\x20\x27','MISSING_GOAL','get','Journey\x20has\x20','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','activationKeys','\x27\x20has\x20no\x20end\x20step','Decision\x20branch\x20\x27','.with.condition.timeout.next','820413KkVwJw','timeout\x20of\x20\x27','\x27\x20(from:\x20','with','keys','next','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','data','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','endsWith','INVALID_AB_TEST_PERCENTAGES','version','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','.with.condition.segment','push','variants','32TWHflG','MISSING_MILESTONE','.with.condition','MISSING_END_STEP','versions[','replace','error','add','3401456bUILpH','values','INSUFFICIENT_STEPS','MISSING_SEGMENT_REFERENCE','.stages','INVALID_JUMP_TARGET','end','includes','1122693UvFmdb','description','journeys[','ab_test','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','Journey\x20can\x20have\x20at\x20most\x20one\x20','MISSING_STAGES','document','indices','\x20(across\x20','.name','Jump\x20step\x20requires\x20a\x20target','condition\x20of\x20\x27','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','name','activation','Stage\x20\x27','23214kaAiIf','segments.','END_STEP_HAS_NEXT_OR_WITH','join','stages','match','level','length','some','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','.with.variants','\x27\x20has\x20no\x20exit_criteria\x20defined','.with.target','7TxOeAL','segments','branches','startsWith','type','End\x20step\x20\x27','MISSING_WAIT_PARAMS','stages[','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','stepNames','\x27\x20with\x20no\x20action\x20in\x20between','set','path','condition','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','excluded','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','FEW_STEPS','journeys','.segment','success','Embedded\x20segment\x20\x27','1125470tyMFkv','ref:','MISSING_EXIT_CRITERIA','SINGLE_INPUT_MERGE','.with','DUPLICATE_LATEST','MISSING_ACTIVATION_DEFINITION','filter','Step\x20references\x20non-existent\x20step\x20\x27','.exit_criteria','\x20versions)','activations','size','836tZSuIn','has','code','2346gOWgCh','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','state','1930xQqQbI','entry_criteria','versions','INVALID_NEXT_REFERENCE','map','source','warning','BRANCH_DIRECTLY_TO_MERGE','\x27\x20has\x20no\x20steps','.steps','Journey\x20has\x20no\x20goal\x20defined','\x20steps\x20(may\x20be\x20too\x20simple)','DUPLICATE_STEP_NAME','latest','JOURNEY_SCHEMA_ERROR','MISSING_CONDITIONS','journeys,\x20stages,\x20or\x20versions','trim','Activation\x20step\x20requires\x20an\x20activation\x20reference'];a163_0x352a=function(){return _0x169440;};return a163_0x352a();}function validateWaitStep(_0x329987,_0x4dd1b6,_0x2c25c5,_0x256523){const _0x133fe1=a163_0x4f07,_0x658bfb=[];if(!_0x329987[_0x133fe1(0x11b)])return _0x658bfb['push'](createIssue('error',_0x4dd1b6+_0x133fe1(0x172),_0x133fe1(0x15d),_0x133fe1(0x13c),_0x2c25c5,_0x4dd1b6)),_0x658bfb;if(_0x329987[_0x133fe1(0x11b)][_0x133fe1(0x164)]){const _0x3fa4c0=_0x329987[_0x133fe1(0x11b)]['condition'];if(_0x3fa4c0['segment']){_0x2c25c5[_0x133fe1(0x109)]?.[_0x133fe1(0x12f)](_0x3fa4c0[_0x133fe1(0x1aa)]);!_0x3fa4c0[_0x133fe1(0x1aa)][_0x133fe1(0x15a)](_0x133fe1(0x16f))&&(_0x2c25c5[_0x133fe1(0x1a4)]&&!_0x2c25c5[_0x133fe1(0x1a4)][_0x133fe1(0x17c)](_0x3fa4c0['segment'])&&_0x658bfb['push'](createIssue(_0x133fe1(0x12e),_0x4dd1b6+_0x133fe1(0x125),_0x133fe1(0x133),_0x133fe1(0x15f)+_0x3fa4c0[_0x133fe1(0x1aa)]+_0x133fe1(0x1b2),_0x2c25c5)));_0x3fa4c0['next']&&_0x2c25c5[_0x133fe1(0x160)]&&!_0x2c25c5[_0x133fe1(0x160)][_0x133fe1(0x17c)](_0x3fa4c0[_0x133fe1(0x11d)])&&_0x658bfb[_0x133fe1(0x126)](createIssue('error',_0x4dd1b6+_0x133fe1(0x1ae),_0x133fe1(0x184),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x3fa4c0[_0x133fe1(0x11d)]+'\x27',_0x2c25c5));_0x3fa4c0[_0x133fe1(0x197)]?.[_0x133fe1(0x11d)]&&_0x2c25c5[_0x133fe1(0x160)]&&!_0x2c25c5[_0x133fe1(0x160)]['has'](_0x3fa4c0[_0x133fe1(0x197)]['next'])&&_0x658bfb[_0x133fe1(0x126)](createIssue(_0x133fe1(0x12e),_0x4dd1b6+_0x133fe1(0x117),'INVALID_NEXT_REFERENCE','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x3fa4c0[_0x133fe1(0x197)][_0x133fe1(0x11d)]+'\x27',_0x2c25c5));const _0x522c90=_0x3fa4c0[_0x133fe1(0x11d)]||_0x329987[_0x133fe1(0x11d)],_0x4e3784=_0x3fa4c0[_0x133fe1(0x197)]?.['next']||_0x329987[_0x133fe1(0x11d)];if(_0x522c90){const _0x2f2799=_0x256523[_0x133fe1(0x111)](_0x522c90);_0x2f2799?.[_0x133fe1(0x15b)]===_0x133fe1(0x1a6)&&_0x658bfb[_0x133fe1(0x126)](createIssue(_0x133fe1(0x187),_0x4dd1b6+'.with.condition.next',_0x133fe1(0x188),_0x133fe1(0x1b7)+_0x522c90+_0x133fe1(0x120),_0x2c25c5,_0x4dd1b6+_0x133fe1(0x12a)));}if(_0x4e3784){const _0x2a0f6a=_0x256523[_0x133fe1(0x111)](_0x4e3784);_0x2a0f6a?.[_0x133fe1(0x15b)]===_0x133fe1(0x1a6)&&_0x658bfb[_0x133fe1(0x126)](createIssue('warning',_0x4dd1b6+'.with.condition.timeout.next',_0x133fe1(0x188),_0x133fe1(0x168)+_0x4e3784+_0x133fe1(0x120),_0x2c25c5,_0x4dd1b6+_0x133fe1(0x10a)));}}}return _0x658bfb;}function a163_0x4f07(_0x4f01ac,_0x242ea0){_0x4f01ac=_0x4f01ac-0x108;const _0x352a3e=a163_0x352a();let _0x4f073c=_0x352a3e[_0x4f01ac];return _0x4f073c;}function validateActivationStep(_0x11bde2,_0x4751c1,_0x43b316){const _0x5c1ebb=a163_0x4f07,_0x2d3df4=[];if(!_0x11bde2['with']?.[_0x5c1ebb(0x148)])return _0x2d3df4[_0x5c1ebb(0x126)](createIssue(_0x5c1ebb(0x12e),_0x4751c1+_0x5c1ebb(0x1b5),'MISSING_ACTIVATION_REF',_0x5c1ebb(0x193),_0x43b316,_0x4751c1)),_0x2d3df4;const _0x1acf11=_0x11bde2[_0x5c1ebb(0x11b)]['activation'];return _0x43b316[_0x5c1ebb(0x114)]&&!_0x1acf11[_0x5c1ebb(0x15a)](_0x5c1ebb(0x16f))&&(!_0x43b316['activationKeys'][_0x5c1ebb(0x17c)](_0x1acf11)&&_0x2d3df4['push'](createIssue('error',_0x4751c1+_0x5c1ebb(0x1b5),_0x5c1ebb(0x174),_0x5c1ebb(0x1a9)+_0x1acf11+_0x5c1ebb(0x165),_0x43b316))),_0x2d3df4;}function validateDecisionPointStep(_0x48303b,_0x2a4f57,_0xbed5a2,_0x3d6c3c){const _0x16578a=a163_0x4f07,_0x196501=[];if(!_0x48303b[_0x16578a(0x11b)]?.[_0x16578a(0x159)]||_0x48303b[_0x16578a(0x11b)][_0x16578a(0x159)][_0x16578a(0x151)]===0x0)return _0x196501[_0x16578a(0x126)](createIssue(_0x16578a(0x12e),_0x2a4f57+'.with.branches',_0x16578a(0x190),_0x16578a(0x153),_0xbed5a2,_0x2a4f57)),_0x196501;for(let _0x54b6ad=0x0;_0x54b6ad<_0x48303b[_0x16578a(0x11b)]['branches'][_0x16578a(0x151)];_0x54b6ad++){const _0x1be1ce=_0x48303b[_0x16578a(0x11b)][_0x16578a(0x159)][_0x54b6ad],_0x40d611=_0x2a4f57+'.with.branches['+_0x54b6ad+']';_0x1be1ce['segment']&&!_0x1be1ce[_0x16578a(0x166)]&&(_0xbed5a2[_0x16578a(0x109)]?.[_0x16578a(0x12f)](_0x1be1ce[_0x16578a(0x1aa)]),!_0x1be1ce[_0x16578a(0x1aa)]['startsWith'](_0x16578a(0x16f))&&(_0xbed5a2[_0x16578a(0x1a4)]&&!_0xbed5a2[_0x16578a(0x1a4)]['has'](_0x1be1ce[_0x16578a(0x1aa)])&&_0x196501['push'](createIssue(_0x16578a(0x12e),_0x40d611+'.segment',_0x16578a(0x133),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x1be1ce[_0x16578a(0x1aa)]+'\x27',_0xbed5a2))));_0x1be1ce[_0x16578a(0x11d)]&&_0xbed5a2[_0x16578a(0x160)]&&!_0xbed5a2[_0x16578a(0x160)][_0x16578a(0x17c)](_0x1be1ce[_0x16578a(0x11d)])&&_0x196501[_0x16578a(0x126)](createIssue('error',_0x40d611+_0x16578a(0x1bc),_0x16578a(0x184),'Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x1be1ce[_0x16578a(0x11d)]+'\x27',_0xbed5a2));if(_0x1be1ce[_0x16578a(0x11d)]){const _0x39f875=_0x3d6c3c['get'](_0x1be1ce['next']);_0x39f875?.[_0x16578a(0x15b)]==='merge'&&_0x196501['push'](createIssue(_0x16578a(0x187),_0x40d611+_0x16578a(0x1bc),_0x16578a(0x188),_0x16578a(0x116)+_0x1be1ce[_0x16578a(0x147)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x1be1ce[_0x16578a(0x11d)]+_0x16578a(0x161),_0xbed5a2));}}return _0x196501;}function validateAbTestStep(_0x5c6f0b,_0xc7366f,_0x2dbeab,_0x4ae806){const _0x584a31=a163_0x4f07,_0x475da6=[];if(!_0x5c6f0b[_0x584a31(0x11b)]?.['variants']||_0x5c6f0b[_0x584a31(0x11b)][_0x584a31(0x127)][_0x584a31(0x151)]===0x0)return _0x475da6[_0x584a31(0x126)](createIssue(_0x584a31(0x12e),_0xc7366f+_0x584a31(0x154),'MISSING_CONDITIONS',_0x584a31(0x146),_0x2dbeab,_0xc7366f)),_0x475da6;const _0x21e1cd=_0x5c6f0b[_0x584a31(0x11b)]['variants']['reduce']((_0x29462f,_0xad7c3b)=>_0x29462f+(_0xad7c3b['percentage']||0x0),0x0);Math[_0x584a31(0x10c)](_0x21e1cd-0x64)>0.01&&_0x475da6[_0x584a31(0x126)](createIssue(_0x584a31(0x12e),_0xc7366f+_0x584a31(0x154),_0x584a31(0x122),_0x584a31(0x198)+_0x21e1cd+'%)',_0x2dbeab));for(let _0x10a127=0x0;_0x10a127<_0x5c6f0b[_0x584a31(0x11b)][_0x584a31(0x127)][_0x584a31(0x151)];_0x10a127++){const _0x1635c1=_0x5c6f0b[_0x584a31(0x11b)]['variants'][_0x10a127],_0x22f6d0=_0xc7366f+_0x584a31(0x1ad)+_0x10a127+']';_0x1635c1[_0x584a31(0x11d)]&&_0x2dbeab[_0x584a31(0x160)]&&!_0x2dbeab[_0x584a31(0x160)][_0x584a31(0x17c)](_0x1635c1[_0x584a31(0x11d)])&&_0x475da6[_0x584a31(0x126)](createIssue(_0x584a31(0x12e),_0x22f6d0+_0x584a31(0x1bc),_0x584a31(0x184),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x1635c1[_0x584a31(0x11d)]+'\x27',_0x2dbeab));if(_0x1635c1[_0x584a31(0x11d)]){const _0x53bc36=_0x4ae806[_0x584a31(0x111)](_0x1635c1['next']);_0x53bc36?.[_0x584a31(0x15b)]===_0x584a31(0x1a6)&&_0x475da6[_0x584a31(0x126)](createIssue(_0x584a31(0x187),_0x22f6d0+'.next',_0x584a31(0x188),_0x584a31(0x10f)+_0x1635c1[_0x584a31(0x147)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x1635c1[_0x584a31(0x11d)]+_0x584a31(0x161),_0x2dbeab));}}return _0x475da6;}function validateJumpStep(_0x28faf3,_0x24418f,_0x28c8ea){const _0x174feb=a163_0x4f07,_0x188c27=[];if(!_0x28faf3[_0x174feb(0x11b)]?.['target'])return _0x188c27[_0x174feb(0x126)](createIssue(_0x174feb(0x12e),_0x24418f+_0x174feb(0x156),_0x174feb(0x135),_0x174feb(0x143),_0x28c8ea,_0x24418f)),_0x188c27;return(!_0x28faf3['with'][_0x174feb(0x1b3)][_0x174feb(0x1bd)]||!_0x28faf3[_0x174feb(0x11b)]['target']['stage'])&&_0x188c27[_0x174feb(0x126)](createIssue(_0x174feb(0x12e),_0x24418f+_0x174feb(0x156),_0x174feb(0x135),_0x174feb(0x113),_0x28c8ea)),_0x188c27;}function buildConvergenceMap(_0x388dcf){const _0x54b0a1=a163_0x4f07,_0x3a2bd2=new Map();function _0x2986ff(_0x215809,_0xf4e04a){const _0x57e72c=a163_0x4f07,_0x479600=_0x3a2bd2[_0x57e72c(0x111)](_0x215809)||[];_0x479600['push'](_0xf4e04a),_0x3a2bd2[_0x57e72c(0x162)](_0x215809,_0x479600);}for(const _0x3a7b67 of _0x388dcf){_0x3a7b67[_0x54b0a1(0x11d)]&&_0x2986ff(_0x3a7b67[_0x54b0a1(0x11d)],{'stepName':_0x3a7b67[_0x54b0a1(0x147)],'description':_0x54b0a1(0x1ab)+_0x3a7b67[_0x54b0a1(0x147)]+'\x27'});if(_0x3a7b67[_0x54b0a1(0x15b)]===_0x54b0a1(0x19f)&&_0x3a7b67[_0x54b0a1(0x11b)]?.[_0x54b0a1(0x159)])for(const _0xbdbb59 of _0x3a7b67[_0x54b0a1(0x11b)]['branches']){_0xbdbb59[_0x54b0a1(0x11d)]&&_0x2986ff(_0xbdbb59['next'],{'stepName':_0x3a7b67[_0x54b0a1(0x147)],'description':_0x54b0a1(0x199)+_0xbdbb59[_0x54b0a1(0x147)]+_0x54b0a1(0x1b6)+_0x3a7b67[_0x54b0a1(0x147)]+'\x27'});}if(_0x3a7b67[_0x54b0a1(0x15b)]==='ab_test'&&_0x3a7b67['with']?.['variants'])for(const _0x4f8e88 of _0x3a7b67['with']['variants']){_0x4f8e88[_0x54b0a1(0x11d)]&&_0x2986ff(_0x4f8e88['next'],{'stepName':_0x3a7b67['name'],'description':_0x54b0a1(0x1b0)+_0x4f8e88['name']+'\x27\x20of\x20\x27'+_0x3a7b67['name']+'\x27'});}_0x3a7b67[_0x54b0a1(0x15b)]===_0x54b0a1(0x1a5)&&_0x3a7b67[_0x54b0a1(0x11b)]?.[_0x54b0a1(0x164)]&&(_0x3a7b67['with'][_0x54b0a1(0x164)][_0x54b0a1(0x11d)]&&_0x2986ff(_0x3a7b67[_0x54b0a1(0x11b)][_0x54b0a1(0x164)][_0x54b0a1(0x11d)],{'stepName':_0x3a7b67[_0x54b0a1(0x147)],'description':_0x54b0a1(0x144)+_0x3a7b67['name']+'\x27'}),_0x3a7b67[_0x54b0a1(0x11b)][_0x54b0a1(0x164)][_0x54b0a1(0x197)]?.[_0x54b0a1(0x11d)]&&_0x2986ff(_0x3a7b67['with'][_0x54b0a1(0x164)]['timeout']['next'],{'stepName':_0x3a7b67[_0x54b0a1(0x147)],'description':_0x54b0a1(0x119)+_0x3a7b67[_0x54b0a1(0x147)]+'\x27'}));}return _0x3a2bd2;}function validateFlowControl(_0x535ac9,_0xcca268,_0x5af296){const _0x5719d3=a163_0x4f07,_0x2632dd=[],_0x459206=_0x5719d3(0x15e)+_0xcca268+']',_0x48b59c=_0x535ac9['steps']||[];if(_0x48b59c['length']===0x0)return _0x2632dd;const _0x55b286=new Map();for(const _0xde8b40 of _0x48b59c){_0xde8b40[_0x5719d3(0x147)]&&_0x55b286[_0x5719d3(0x162)](_0xde8b40[_0x5719d3(0x147)],_0xde8b40);}const _0x4f2e45=buildConvergenceMap(_0x48b59c),_0x30d466=_0x48b59c[_0x5719d3(0x152)](_0x2f1f11=>_0x2f1f11['type']===_0x5719d3(0x136));!_0x30d466&&_0x2632dd[_0x5719d3(0x126)](createIssue(_0x5719d3(0x12e),_0x459206+'.steps',_0x5719d3(0x12b),_0x5719d3(0x149)+_0x535ac9[_0x5719d3(0x147)]+_0x5719d3(0x115),_0x5af296));for(const [_0x42572d,_0x1ba424]of _0x4f2e45){const _0x41e845=_0x55b286[_0x5719d3(0x111)](_0x42572d);if(!_0x41e845)continue;if(_0x1ba424[_0x5719d3(0x151)]>0x1&&_0x41e845[_0x5719d3(0x15b)]!==_0x5719d3(0x1a6)){const _0x1d739f=_0x1ba424['map'](_0xec5689=>_0xec5689[_0x5719d3(0x139)])[_0x5719d3(0x14d)](',\x20');_0x2632dd['push'](createIssue('error',_0x459206+_0x5719d3(0x18a),_0x5719d3(0x1bf),_0x5719d3(0x124)+_0x42572d+_0x5719d3(0x11a)+_0x1d739f+_0x5719d3(0x1b4),_0x5af296));}_0x1ba424[_0x5719d3(0x151)]===0x1&&_0x41e845[_0x5719d3(0x15b)]===_0x5719d3(0x1a6)&&_0x2632dd[_0x5719d3(0x126)](createIssue(_0x5719d3(0x187),_0x459206+_0x5719d3(0x18a),_0x5719d3(0x171),_0x5719d3(0x1a1)+_0x42572d+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x1ba424[0x0][_0x5719d3(0x139)]+_0x5719d3(0x19e),_0x5af296));}for(const _0x3cf228 of _0x48b59c){if(_0x3cf228[_0x5719d3(0x15b)]===_0x5719d3(0x1a6)&&_0x3cf228[_0x5719d3(0x11d)]){const _0x4f0341=_0x55b286[_0x5719d3(0x111)](_0x3cf228[_0x5719d3(0x11d)]);_0x4f0341?.['type']==='merge'&&_0x2632dd[_0x5719d3(0x126)](createIssue(_0x5719d3(0x12e),_0x459206+_0x5719d3(0x18a),'MERGE_TO_MERGE_CHAIN',_0x5719d3(0x1a1)+_0x3cf228['name']+_0x5719d3(0x167)+_0x3cf228['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x5af296));}}return _0x2632dd;}function validateCriteria(_0x4e4709,_0x2db0b1,_0x505560){const _0x1a87eb=a163_0x4f07,_0x1b39a8=[];return _0x4e4709['segment']&&(_0x505560[_0x1a87eb(0x109)]?.[_0x1a87eb(0x12f)](_0x4e4709['segment']),!_0x4e4709[_0x1a87eb(0x1aa)][_0x1a87eb(0x15a)](_0x1a87eb(0x16f))&&(_0x505560[_0x1a87eb(0x1a4)]&&!_0x505560[_0x1a87eb(0x1a4)]['has'](_0x4e4709[_0x1a87eb(0x1aa)])&&_0x1b39a8[_0x1a87eb(0x126)](createIssue('error',_0x2db0b1+_0x1a87eb(0x16b),_0x1a87eb(0x133),_0x1a87eb(0x1c0)+_0x4e4709[_0x1a87eb(0x1aa)]+'\x27',_0x505560)))),_0x1b39a8;}function validateEmbeddedSegment(_0x28130e,_0x228d7c,_0x2588b8){const _0x510694=a163_0x4f07,_0x4b97d3=[];return _0x28130e[_0x510694(0x1b1)]&&_0x4b97d3[_0x510694(0x126)](...validateRuleDef(_0x28130e['rule'],_0x228d7c+'.rule',_0x2588b8)),_0x4b97d3;}function validateStage(_0xf28bfb,_0x1da6e2,_0x5eb187,_0x5a8bef){const _0x4854ab=a163_0x4f07,_0x52b265=[],_0x36ddac=_0x4854ab(0x15e)+_0x1da6e2+']',_0x4560fe=new Map(),_0x2e089f=new Map();if(_0xf28bfb[_0x4854ab(0x195)]){for(let _0x15852d=0x0;_0x15852d<_0xf28bfb[_0x4854ab(0x195)]['length'];_0x15852d++){const _0x23b1d9=_0xf28bfb[_0x4854ab(0x195)][_0x15852d];_0x23b1d9[_0x4854ab(0x147)]&&_0x4560fe['set'](_0x23b1d9[_0x4854ab(0x147)],_0x23b1d9);}for(let _0xfaedd6=0x0;_0xfaedd6<_0xf28bfb['steps'][_0x4854ab(0x151)];_0xfaedd6++){const _0x41f7a3=_0xf28bfb[_0x4854ab(0x195)][_0xfaedd6],_0x26a18a=_0x36ddac+_0x4854ab(0x1a0)+_0xfaedd6+']';if(_0x41f7a3['name']){if(_0x2e089f[_0x4854ab(0x17c)](_0x41f7a3[_0x4854ab(0x147)])){const _0xb4d420=_0x2e089f[_0x4854ab(0x111)](_0x41f7a3[_0x4854ab(0x147)]);_0x52b265['push'](createIssue(_0x4854ab(0x12e),_0x26a18a+_0x4854ab(0x142),_0x4854ab(0x18d),'Duplicate\x20step\x20name\x20\x27'+_0x41f7a3[_0x4854ab(0x147)]+_0x4854ab(0x1b8)+_0xb4d420+'])',_0x5a8bef));}else _0x2e089f[_0x4854ab(0x162)](_0x41f7a3[_0x4854ab(0x147)],_0xfaedd6);}_0x52b265['push'](...validateStep(_0x41f7a3,_0x26a18a,_0x5a8bef,_0x4560fe));}}_0xf28bfb[_0x4854ab(0x182)]&&_0x52b265[_0x4854ab(0x126)](...validateCriteria(_0xf28bfb[_0x4854ab(0x182)],_0x36ddac+'.entry_criteria',_0x5a8bef));if(_0xf28bfb[_0x4854ab(0x10e)])for(let _0x2d7a50=0x0;_0x2d7a50<_0xf28bfb['exit_criteria'][_0x4854ab(0x151)];_0x2d7a50++){_0x52b265[_0x4854ab(0x126)](...validateCriteria(_0xf28bfb['exit_criteria'][_0x2d7a50],_0x36ddac+_0x4854ab(0x1bb)+_0x2d7a50+']',_0x5a8bef));}return _0xf28bfb[_0x4854ab(0x1a7)]&&_0x52b265[_0x4854ab(0x126)](...validateCriteria(_0xf28bfb['milestone'],_0x36ddac+_0x4854ab(0x1af),_0x5a8bef)),_0x52b265[_0x4854ab(0x126)](...validateStageStructure(_0xf28bfb,_0x1da6e2,_0x5eb187,_0x5a8bef)),_0x52b265[_0x4854ab(0x126)](...validateFlowControl(_0xf28bfb,_0x1da6e2,_0x5a8bef)),_0x52b265;}function validateStagesForVersion(_0x35bcf4,_0x4cc327,_0x4ee4a8,_0x2e608e,_0x4b7439,_0x18760a,_0x191062){const _0x275021=a163_0x4f07;if(_0x35bcf4[_0x275021(0x151)]===0x0){_0x4b7439['push']({'level':_0x275021(0x12e),'path':_0x2e608e+_0x275021(0x14e),'code':_0x275021(0x13e),'message':_0x275021(0x1ba),'location':getLocationFromPath(_0x4ee4a8[_0x275021(0x13f)],_0x4ee4a8['source'],[_0x275021(0x14e)])});return;}const _0x3de3c2=new Set();for(const _0x4b9dbb of _0x35bcf4){if(_0x4b9dbb[_0x275021(0x195)])for(const _0x5c3afe of _0x4b9dbb[_0x275021(0x195)]){_0x5c3afe[_0x275021(0x147)]&&_0x3de3c2[_0x275021(0x12f)](_0x5c3afe[_0x275021(0x147)]);}}const _0x1e1af0={..._0x4ee4a8,'stepNames':_0x3de3c2},_0x3726d3=validateVersionStructure(_0x35bcf4,_0x1e1af0);for(const _0x5b755b of _0x3726d3){const _0x4c1f07=_0x2e608e?{..._0x5b755b,'path':''+_0x2e608e+_0x5b755b[_0x275021(0x163)]}:_0x5b755b;if(_0x4c1f07[_0x275021(0x150)]==='error')_0x4b7439[_0x275021(0x126)](_0x4c1f07);else _0x18760a[_0x275021(0x126)](_0x4c1f07);}for(let _0x44fba9=0x0;_0x44fba9<_0x35bcf4[_0x275021(0x151)];_0x44fba9++){const _0x450c9d=validateStage(_0x35bcf4[_0x44fba9],_0x44fba9,_0x35bcf4[_0x275021(0x151)],_0x1e1af0);for(const _0x531183 of _0x450c9d){const _0x15292a=_0x2e608e?{..._0x531183,'path':''+_0x2e608e+_0x531183['path']}:_0x531183;if(_0x15292a[_0x275021(0x150)]===_0x275021(0x12e))_0x4b7439[_0x275021(0x126)](_0x15292a);else _0x18760a[_0x275021(0x126)](_0x15292a);}}if(_0x4cc327[_0x275021(0x19a)]){const _0x431e9b=_0x191062?.['goalIsInherited']?'goal':_0x2e608e+_0x275021(0x19a),_0x128478=validateCriteria(_0x4cc327[_0x275021(0x19a)],_0x431e9b,_0x1e1af0);for(const _0x115a02 of _0x128478){if(_0x115a02[_0x275021(0x150)]===_0x275021(0x12e))_0x4b7439[_0x275021(0x126)](_0x115a02);else _0x18760a[_0x275021(0x126)](_0x115a02);}}}function extractVersionIndex(_0x40851a){const _0x3e23a1=a163_0x4f07,_0x479af1=_0x40851a[_0x3e23a1(0x14f)](/^journeys\[(\d+)\]\./);return _0x479af1?_0x479af1[0x1]:undefined;}function deduplicateAcrossVersions(_0x16d4f1){const _0xded83a=a163_0x4f07,_0x2135e3=new Map();for(let _0x35b986=0x0;_0x35b986<_0x16d4f1['length'];_0x35b986++){const _0x2ef88e=_0x16d4f1[_0x35b986][_0xded83a(0x17d)]+':'+_0x16d4f1[_0x35b986][_0xded83a(0x1ac)],_0x241ee0=extractVersionIndex(_0x16d4f1[_0x35b986]['path']),_0x434b3b=_0x2135e3[_0xded83a(0x111)](_0x2ef88e);if(_0x434b3b){_0x434b3b[_0xded83a(0x140)]['push'](_0x35b986);if(_0x241ee0)_0x434b3b['versions']['add'](_0x241ee0);}else _0x2135e3[_0xded83a(0x162)](_0x2ef88e,{'indices':[_0x35b986],'versions':new Set(_0x241ee0?[_0x241ee0]:[])});}const _0x182a81=new Set();for(const {indices:_0x2234ec,versions:_0x25b9e8}of _0x2135e3[_0xded83a(0x131)]()){if(_0x25b9e8[_0xded83a(0x17a)]<=0x1)continue;const _0x4a1cf9=_0x16d4f1[_0x2234ec[0x0]];_0x4a1cf9[_0xded83a(0x163)]=_0x4a1cf9[_0xded83a(0x163)][_0xded83a(0x12d)](/^journeys\[\d+\]\./,''),_0x4a1cf9['message']=_0x4a1cf9[_0xded83a(0x1ac)]+_0xded83a(0x141)+_0x25b9e8[_0xded83a(0x17a)]+_0xded83a(0x178);for(let _0x7b8163=0x1;_0x7b8163<_0x2234ec[_0xded83a(0x151)];_0x7b8163++){_0x182a81[_0xded83a(0x12f)](_0x2234ec[_0x7b8163]);}}const _0x2efacb=[..._0x182a81][_0xded83a(0x194)]((_0x488ea7,_0x52cb27)=>_0x52cb27-_0x488ea7);for(const _0x5b708b of _0x2efacb){_0x16d4f1['splice'](_0x5b708b,0x1);}}export function validateJourneyDef(_0xb06164,_0x388b39={},_0xdebc81={}){const _0xd803d=a163_0x4f07;if(_0xdebc81['skipSchema'])return runJourneySemanticChecks(_0xb06164,_0x388b39);const _0x4e0002=JourneyDefSchema['safeParse'](_0xb06164);if(_0x4e0002[_0xd803d(0x16c)])return runJourneySemanticChecks(_0x4e0002[_0xd803d(0x11f)],_0x388b39);return zodErrorsToJourneyValidationResult(_0x4e0002[_0xd803d(0x12e)],_0x388b39);}function zodErrorsToJourneyValidationResult(_0x355193,_0xde6aeb){const _0x2b9faa=a163_0x4f07,_0x5a8771=flattenZodIssues(_0x355193['issues']),_0x275b5c=_0x5a8771[_0x2b9faa(0x185)](_0x20cd56=>{const _0x20a9d6=_0x2b9faa,_0x512f84=formatZodPath(_0x20cd56[_0x20a9d6(0x163)]),_0x4d6f44=mapJourneyZodIssueToCode(_0x20cd56,_0x512f84),_0x3d067d=getLocationFromPath(_0xde6aeb['document'],_0xde6aeb[_0x20a9d6(0x186)],_0x20cd56[_0x20a9d6(0x163)][_0x20a9d6(0x185)](_0x434774=>typeof _0x434774==='symbol'?String(_0x434774):_0x434774));return{'level':'error','path':_0x512f84,'code':_0x4d6f44,'message':_0x20cd56['message'],..._0x3d067d&&{'location':_0x3d067d}};});return{'valid':![],'errors':_0x275b5c,'warnings':[]};}function mapJourneyZodIssueToCode(_0x398a69,_0x428b7b){const _0xe9660b=a163_0x4f07;if(_0x428b7b===_0xe9660b(0x147))return _0xe9660b(0x19b);if(_0x428b7b['endsWith'](_0xe9660b(0x108))&&_0x428b7b[_0xe9660b(0x137)](_0xe9660b(0x195)))return _0xe9660b(0x18f);if(_0x428b7b==='stages'||_0x428b7b[_0xe9660b(0x121)](_0xe9660b(0x134)))return _0xe9660b(0x13e);if(_0x428b7b===''&&_0x398a69['message']['includes'](_0xe9660b(0x191)))return _0xe9660b(0x13e);if(_0x428b7b[_0xe9660b(0x137)](_0xe9660b(0x148)))return'ACTIVATION_SCHEMA_ERROR';return _0xe9660b(0x18f);}function runJourneySemanticChecks(_0x17ba6d,_0x390d72){const _0x3b317d=a163_0x4f07,_0x352afe=[],_0x2405f3=[];(!_0x17ba6d[_0x3b317d(0x147)]||_0x17ba6d[_0x3b317d(0x147)][_0x3b317d(0x192)]()==='')&&_0x352afe[_0x3b317d(0x126)]({'level':'error','path':_0x3b317d(0x147),'code':_0x3b317d(0x19b),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x390d72['document'],_0x390d72[_0x3b317d(0x186)],[_0x3b317d(0x147)])});const _0x4f0cf3=new Set();if(_0x17ba6d['segments'])for(const _0x3af4ed of Object[_0x3b317d(0x11c)](_0x17ba6d[_0x3b317d(0x158)])){_0x4f0cf3[_0x3b317d(0x12f)](_0x3af4ed);}const _0x19526d=new Set();if(_0x17ba6d[_0x3b317d(0x179)])for(const _0xd932ea of Object['keys'](_0x17ba6d['activations'])){_0x19526d[_0x3b317d(0x12f)](_0xd932ea);}const _0x4db627=new Set(),_0x1b9ebe={..._0x390d72,'embeddedSegments':_0x4f0cf3,'referencedSegments':_0x4db627,'activationKeys':_0x19526d[_0x3b317d(0x17a)]>0x0?_0x19526d:undefined};if(_0x17ba6d[_0x3b317d(0x158)])for(const [_0x4c18b3,_0x29761d]of Object[_0x3b317d(0x1be)](_0x17ba6d['segments'])){const _0x3fe121=validateEmbeddedSegment(_0x29761d,_0x3b317d(0x14b)+_0x4c18b3,_0x1b9ebe);for(const _0x494a3f of _0x3fe121){if(_0x494a3f[_0x3b317d(0x150)]==='error')_0x352afe['push'](_0x494a3f);else _0x2405f3[_0x3b317d(0x126)](_0x494a3f);}}const _0x35a8e0=!!_0x17ba6d[_0x3b317d(0x19a)],_0x547019=_0x17ba6d[_0x3b317d(0x16a)]?.[_0x3b317d(0x196)](_0x47bc82=>!!_0x47bc82[_0x3b317d(0x19a)])??![];!_0x35a8e0&&!_0x547019&&_0x2405f3[_0x3b317d(0x126)]({'level':_0x3b317d(0x187),'path':'goal','code':_0x3b317d(0x110),'message':_0x3b317d(0x18b),'location':getLocationFromPath(_0x390d72['document'],_0x390d72[_0x3b317d(0x186)],[_0x3b317d(0x19a)])});const _0x475b6d=_0x17ba6d[_0x3b317d(0x16a)]??_0x17ba6d['versions'];if(_0x475b6d&&_0x475b6d[_0x3b317d(0x175)](_0x575063=>_0x575063[_0x3b317d(0x18e)]===!![])[_0x3b317d(0x151)]>0x1){const _0x4b6ee1=_0x17ba6d[_0x3b317d(0x16a)]?_0x3b317d(0x16a):_0x3b317d(0x183);_0x352afe[_0x3b317d(0x126)]({'level':'error','path':_0x4b6ee1,'code':_0x3b317d(0x173),'message':_0x3b317d(0x13d)+(_0x4b6ee1===_0x3b317d(0x16a)?_0x3b317d(0x1a2):_0x3b317d(0x123))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x390d72[_0x3b317d(0x13f)],_0x390d72[_0x3b317d(0x186)],[_0x4b6ee1])});}if(_0x17ba6d[_0x3b317d(0x16a)]&&_0x17ba6d['journeys'][_0x3b317d(0x151)]>0x0)for(let _0x23a287=0x0;_0x23a287<_0x17ba6d['journeys'][_0x3b317d(0x151)];_0x23a287++){const _0x4869e6=_0x17ba6d[_0x3b317d(0x16a)][_0x23a287];if(_0x17ba6d[_0x3b317d(0x16a)][_0x3b317d(0x151)]>0x1&&_0x4869e6[_0x3b317d(0x180)]===_0x3b317d(0x10d))continue;const _0x1054a9=_0x4869e6[_0x3b317d(0x14e)]||[],_0x504cc9=_0x3b317d(0x13a)+_0x23a287+'].',_0x2e3fde=!!_0x4869e6['goal'],_0x31d110=_0x2e3fde?{..._0x17ba6d,'goal':_0x4869e6[_0x3b317d(0x19a)]}:_0x17ba6d;validateStagesForVersion(_0x1054a9,_0x31d110,_0x1b9ebe,_0x504cc9,_0x352afe,_0x2405f3,{'goalIsInherited':!_0x2e3fde});}else{if(_0x17ba6d['versions']&&_0x17ba6d['versions'][_0x3b317d(0x151)]>0x0)for(let _0x2f36c7=0x0;_0x2f36c7<_0x17ba6d[_0x3b317d(0x183)][_0x3b317d(0x151)];_0x2f36c7++){const _0x384b57=_0x17ba6d['versions'][_0x2f36c7];if(_0x17ba6d[_0x3b317d(0x183)][_0x3b317d(0x151)]>0x1&&_0x384b57[_0x3b317d(0x180)]===_0x3b317d(0x10d))continue;const _0x1f5083=_0x384b57[_0x3b317d(0x14e)]||[],_0x25f387=_0x3b317d(0x12c)+_0x2f36c7+'].';validateStagesForVersion(_0x1f5083,_0x17ba6d,_0x1b9ebe,_0x25f387,_0x352afe,_0x2405f3);}else{const _0x410020=_0x17ba6d[_0x3b317d(0x14e)]||[];validateStagesForVersion(_0x410020,_0x17ba6d,_0x1b9ebe,'',_0x352afe,_0x2405f3);}}_0x17ba6d[_0x3b317d(0x16a)]&&_0x17ba6d['journeys']['length']>0x1&&(deduplicateAcrossVersions(_0x352afe),deduplicateAcrossVersions(_0x2405f3));for(const _0x10dc6d of _0x4f0cf3){!_0x4db627[_0x3b317d(0x17c)](_0x10dc6d)&&!_0x10dc6d[_0x3b317d(0x15a)]('excluded_')&&_0x2405f3[_0x3b317d(0x126)]({'level':_0x3b317d(0x187),'path':_0x3b317d(0x14b)+_0x10dc6d,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x3b317d(0x16d)+_0x10dc6d+_0x3b317d(0x1a3),'location':getLocationFromPath(_0x390d72[_0x3b317d(0x13f)],_0x390d72[_0x3b317d(0x186)],[_0x3b317d(0x158),_0x10dc6d])});}return{'valid':_0x352afe[_0x3b317d(0x151)]===0x0,'errors':_0x352afe,'warnings':_0x2405f3};}
|