@treasuredata/tdx 2026.5.0 → 2026.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.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.d.ts +9 -0
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +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/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/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.js +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.js +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/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/cas/cas-api-client.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/client/cdp-api-client.d.ts +8 -1
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +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.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +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.d.ts +8 -1
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/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.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/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/segment-validator.js.map +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +19 -0
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/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/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.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x410442,_0x582016){const _0x24d380=a149_0x4ad7,_0x5911ec=_0x410442();while(!![]){try{const _0x211ea7=-parseInt(_0x24d380(0x124))/0x1+-parseInt(_0x24d380(0xfb))/0x2+-parseInt(_0x24d380(0x137))/0x3+parseInt(_0x24d380(0x129))/0x4+-parseInt(_0x24d380(0x175))/0x5+-parseInt(_0x24d380(0x181))/0x6+-parseInt(_0x24d380(0x116))/0x7*(-parseInt(_0x24d380(0x172))/0x8);if(_0x211ea7===_0x582016)break;else _0x5911ec['push'](_0x5911ec['shift']());}catch(_0x23cee4){_0x5911ec['push'](_0x5911ec['shift']());}}}(a149_0x1bc7,0x9cae3));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1001f9,_0x383a9d,_0x3da4fe,_0x24c6cf,_0x43eb9b,_0x1cb37f){const _0x477a59=a149_0x4ad7;return{'level':_0x1001f9,'path':_0x383a9d,'code':_0x3da4fe,'message':_0x24c6cf,'location':getLocationFromPath(_0x43eb9b[_0x477a59(0xf4)],_0x43eb9b[_0x477a59(0x15a)],pathToArray(_0x1cb37f??_0x383a9d))};}function validateVersionStructure(_0x3c342a,_0xcb990b){const _0x295f82=a149_0x4ad7,_0x3edcca=[];return _0x3c342a[_0x295f82(0xd6)]>MAX_STAGES&&_0x3edcca[_0x295f82(0x152)](createIssue(_0x295f82(0xf2),_0x295f82(0x102),_0x295f82(0x11b),_0x295f82(0xf0)+_0x3c342a['length']+_0x295f82(0x109)+MAX_STAGES,_0xcb990b)),_0x3edcca;}function validateStageStructure(_0x53a00b,_0x48d83d,_0x33fccc,_0x426aca){const _0x442109=a149_0x4ad7,_0x57db43=[],_0x1bc803=_0x442109(0x11e)+_0x48d83d+']';_0x48d83d===0x0&&!_0x53a00b[_0x442109(0xdf)]&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf2),_0x1bc803+_0x442109(0x17d),_0x442109(0x13f),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xdb),_0x426aca,_0x1bc803));const _0x5e3f34=_0x48d83d===_0x33fccc-0x1;!_0x5e3f34&&!_0x53a00b[_0x442109(0x166)]&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf2),_0x1bc803+_0x442109(0x114),_0x442109(0xfc),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xf7),_0x426aca,_0x1bc803));(!_0x53a00b[_0x442109(0xd4)]||_0x53a00b['exit_criteria']['length']===0x0)&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf3),_0x1bc803+_0x442109(0x183),_0x442109(0x156),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x426aca,_0x1bc803));const _0x116b96=_0x53a00b['steps']?.[_0x442109(0xd6)]??0x0;if(_0x116b96===0x0)_0x57db43[_0x442109(0x152)](createIssue('error',_0x1bc803+_0x442109(0xea),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0x53a00b[_0x442109(0x17a)]+_0x442109(0x157),_0x426aca,_0x1bc803+_0x442109(0xea)));else{if(_0x116b96===0x1)_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf3),_0x1bc803+_0x442109(0xea),_0x442109(0x134),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xdd),_0x426aca,_0x1bc803+'.steps'));else _0x116b96<=0x3&&_0x57db43[_0x442109(0x152)](createIssue(_0x442109(0xf3),_0x1bc803+_0x442109(0xea),_0x442109(0x185),_0x442109(0x143)+_0x53a00b[_0x442109(0x17a)]+_0x442109(0xd9)+_0x116b96+_0x442109(0x164),_0x426aca,_0x1bc803+_0x442109(0xea)));}return _0x57db43;}function validateStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f){const _0x19e97a=a149_0x4ad7,_0x1e5a44=[];if(_0xebc6cd[_0x19e97a(0x130)]===_0x19e97a(0x151))return _0xebc6cd[_0x19e97a(0x15d)]&&_0x1e5a44['push'](createIssue(_0x19e97a(0xf2),_0xecf011+'.next','END_STEP_HAS_NEXT_OR_WITH',_0x19e97a(0x186)+_0xebc6cd['name']+_0x19e97a(0x13c),_0x551c4e)),_0x19e97a(0xff)in _0xebc6cd&&_0xebc6cd[_0x19e97a(0xff)]!==undefined&&_0x1e5a44[_0x19e97a(0x152)](createIssue(_0x19e97a(0xf2),_0xecf011+'.with','END_STEP_HAS_NEXT_OR_WITH',_0x19e97a(0x186)+_0xebc6cd[_0x19e97a(0x17a)]+_0x19e97a(0x17f),_0x551c4e)),_0x1e5a44;_0xebc6cd[_0x19e97a(0x15d)]&&(_0x551c4e[_0x19e97a(0x170)]&&!_0x551c4e[_0x19e97a(0x170)][_0x19e97a(0x105)](_0xebc6cd[_0x19e97a(0x15d)])&&_0x1e5a44[_0x19e97a(0x152)](createIssue('error',_0xecf011+_0x19e97a(0xe4),_0x19e97a(0x165),_0x19e97a(0x141)+_0xebc6cd[_0x19e97a(0x15d)]+'\x27',_0x551c4e)));switch(_0xebc6cd[_0x19e97a(0x130)]){case _0x19e97a(0x145):_0x1e5a44[_0x19e97a(0x152)](...validateWaitStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f));break;case _0x19e97a(0x106):_0x1e5a44[_0x19e97a(0x152)](...validateActivationStep(_0xebc6cd,_0xecf011,_0x551c4e));break;case _0x19e97a(0x140):_0x1e5a44['push'](...validateDecisionPointStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f));break;case _0x19e97a(0xf5):_0x1e5a44[_0x19e97a(0x152)](...validateAbTestStep(_0xebc6cd,_0xecf011,_0x551c4e,_0x565e0f));break;case'jump':_0x1e5a44['push'](...validateJumpStep(_0xebc6cd,_0xecf011,_0x551c4e));break;}return _0x1e5a44;}function validateWaitStep(_0x226742,_0x2a4c1c,_0x556b18,_0x4b5426){const _0x5b5df8=a149_0x4ad7,_0x488847=[];if(!_0x226742[_0x5b5df8(0xff)])return _0x488847[_0x5b5df8(0x152)](createIssue(_0x5b5df8(0xf2),_0x2a4c1c+_0x5b5df8(0x10b),_0x5b5df8(0xf9),_0x5b5df8(0x158),_0x556b18,_0x2a4c1c)),_0x488847;if(_0x226742['with'][_0x5b5df8(0x18a)]){const _0x235897=_0x226742[_0x5b5df8(0xff)][_0x5b5df8(0x18a)];if(_0x235897['segment']){_0x556b18[_0x5b5df8(0x173)]?.[_0x5b5df8(0x14d)](_0x235897[_0x5b5df8(0x142)]);!_0x235897['segment'][_0x5b5df8(0xf6)](_0x5b5df8(0x104))&&(_0x556b18[_0x5b5df8(0xd5)]&&!_0x556b18[_0x5b5df8(0xd5)][_0x5b5df8(0x105)](_0x235897[_0x5b5df8(0x142)])&&_0x488847[_0x5b5df8(0x152)](createIssue(_0x5b5df8(0xf2),_0x2a4c1c+_0x5b5df8(0x136),_0x5b5df8(0x169),_0x5b5df8(0x12f)+_0x235897[_0x5b5df8(0x142)]+_0x5b5df8(0x184),_0x556b18)));_0x235897[_0x5b5df8(0x15d)]&&_0x556b18['stepNames']&&!_0x556b18[_0x5b5df8(0x170)]['has'](_0x235897[_0x5b5df8(0x15d)])&&_0x488847['push'](createIssue('error',_0x2a4c1c+_0x5b5df8(0x10c),'INVALID_NEXT_REFERENCE',_0x5b5df8(0x13a)+_0x235897['next']+'\x27',_0x556b18));_0x235897['timeout']?.[_0x5b5df8(0x15d)]&&_0x556b18[_0x5b5df8(0x170)]&&!_0x556b18[_0x5b5df8(0x170)][_0x5b5df8(0x105)](_0x235897[_0x5b5df8(0x17e)]['next'])&&_0x488847['push'](createIssue(_0x5b5df8(0xf2),_0x2a4c1c+'.with.condition.timeout.next',_0x5b5df8(0x165),_0x5b5df8(0x187)+_0x235897[_0x5b5df8(0x17e)][_0x5b5df8(0x15d)]+'\x27',_0x556b18));const _0x2e092b=_0x235897[_0x5b5df8(0x15d)]||_0x226742[_0x5b5df8(0x15d)],_0x4566dd=_0x235897['timeout']?.[_0x5b5df8(0x15d)]||_0x226742['next'];if(_0x2e092b){const _0x2e590a=_0x4b5426['get'](_0x2e092b);_0x2e590a?.[_0x5b5df8(0x130)]===_0x5b5df8(0x14b)&&_0x488847[_0x5b5df8(0x152)](createIssue('warning',_0x2a4c1c+_0x5b5df8(0x10c),'BRANCH_DIRECTLY_TO_MERGE',_0x5b5df8(0x155)+_0x2e092b+_0x5b5df8(0x161),_0x556b18,_0x2a4c1c+_0x5b5df8(0x110)));}if(_0x4566dd){const _0x64255c=_0x4b5426[_0x5b5df8(0x10f)](_0x4566dd);_0x64255c?.[_0x5b5df8(0x130)]===_0x5b5df8(0x14b)&&_0x488847[_0x5b5df8(0x152)](createIssue(_0x5b5df8(0xf3),_0x2a4c1c+_0x5b5df8(0x180),_0x5b5df8(0x14f),_0x5b5df8(0x174)+_0x4566dd+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x556b18,_0x2a4c1c+_0x5b5df8(0x125)));}}}return _0x488847;}function validateActivationStep(_0x1d6df6,_0x584e77,_0x34ab4f){const _0x1829b8=a149_0x4ad7,_0x50ae57=[];if(!_0x1d6df6[_0x1829b8(0xff)]?.['activation'])return _0x50ae57[_0x1829b8(0x152)](createIssue(_0x1829b8(0xf2),_0x584e77+_0x1829b8(0x120),'MISSING_ACTIVATION_REF','Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x34ab4f,_0x584e77)),_0x50ae57;const _0x2ad385=_0x1d6df6[_0x1829b8(0xff)][_0x1829b8(0x106)];return _0x34ab4f[_0x1829b8(0x100)]&&!_0x2ad385['startsWith'](_0x1829b8(0x104))&&(!_0x34ab4f['activationKeys']['has'](_0x2ad385)&&_0x50ae57['push'](createIssue(_0x1829b8(0xf2),_0x584e77+_0x1829b8(0x120),_0x1829b8(0x107),_0x1829b8(0x12d)+_0x2ad385+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x34ab4f))),_0x50ae57;}function validateDecisionPointStep(_0xa79897,_0x56e809,_0x63bf62,_0x5d9d56){const _0x5e1f40=a149_0x4ad7,_0x2faa38=[];if(!_0xa79897['with']?.['branches']||_0xa79897['with'][_0x5e1f40(0xda)]['length']===0x0)return _0x2faa38['push'](createIssue('error',_0x56e809+_0x5e1f40(0x13e),'MISSING_CONDITIONS',_0x5e1f40(0xeb),_0x63bf62,_0x56e809)),_0x2faa38;for(let _0x2a4ef6=0x0;_0x2a4ef6<_0xa79897[_0x5e1f40(0xff)][_0x5e1f40(0xda)][_0x5e1f40(0xd6)];_0x2a4ef6++){const _0x394cc2=_0xa79897[_0x5e1f40(0xff)][_0x5e1f40(0xda)][_0x2a4ef6],_0x53beb7=_0x56e809+_0x5e1f40(0xe6)+_0x2a4ef6+']';_0x394cc2['segment']&&!_0x394cc2[_0x5e1f40(0x139)]&&(_0x63bf62[_0x5e1f40(0x173)]?.['add'](_0x394cc2[_0x5e1f40(0x142)]),!_0x394cc2[_0x5e1f40(0x142)]['startsWith'](_0x5e1f40(0x104))&&(_0x63bf62[_0x5e1f40(0xd5)]&&!_0x63bf62[_0x5e1f40(0xd5)]['has'](_0x394cc2['segment'])&&_0x2faa38[_0x5e1f40(0x152)](createIssue(_0x5e1f40(0xf2),_0x53beb7+_0x5e1f40(0x113),_0x5e1f40(0x169),_0x5e1f40(0x138)+_0x394cc2[_0x5e1f40(0x142)]+'\x27',_0x63bf62))));_0x394cc2[_0x5e1f40(0x15d)]&&_0x63bf62[_0x5e1f40(0x170)]&&!_0x63bf62['stepNames'][_0x5e1f40(0x105)](_0x394cc2[_0x5e1f40(0x15d)])&&_0x2faa38[_0x5e1f40(0x152)](createIssue(_0x5e1f40(0xf2),_0x53beb7+_0x5e1f40(0xe4),_0x5e1f40(0x165),_0x5e1f40(0xf8)+_0x394cc2[_0x5e1f40(0x15d)]+'\x27',_0x63bf62));if(_0x394cc2[_0x5e1f40(0x15d)]){const _0x2d33ab=_0x5d9d56[_0x5e1f40(0x10f)](_0x394cc2['next']);_0x2d33ab?.['type']===_0x5e1f40(0x14b)&&_0x2faa38[_0x5e1f40(0x152)](createIssue(_0x5e1f40(0xf3),_0x53beb7+_0x5e1f40(0xe4),'BRANCH_DIRECTLY_TO_MERGE','Decision\x20branch\x20\x27'+_0x394cc2[_0x5e1f40(0x17a)]+_0x5e1f40(0x126)+_0x394cc2['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x63bf62));}}return _0x2faa38;}function validateAbTestStep(_0x27099c,_0x57df7d,_0x54c2eb,_0x4b2ea1){const _0x4de4f7=a149_0x4ad7,_0x3ec8ea=[];if(!_0x27099c[_0x4de4f7(0xff)]?.[_0x4de4f7(0x15c)]||_0x27099c[_0x4de4f7(0xff)][_0x4de4f7(0x15c)]['length']===0x0)return _0x3ec8ea['push'](createIssue('error',_0x57df7d+_0x4de4f7(0xe9),_0x4de4f7(0x118),_0x4de4f7(0x163),_0x54c2eb,_0x57df7d)),_0x3ec8ea;const _0x387e74=_0x27099c[_0x4de4f7(0xff)][_0x4de4f7(0x15c)][_0x4de4f7(0x150)]((_0x345f30,_0x42dfea)=>_0x345f30+(_0x42dfea[_0x4de4f7(0x176)]||0x0),0x0);Math[_0x4de4f7(0x144)](_0x387e74-0x64)>0.01&&_0x3ec8ea[_0x4de4f7(0x152)](createIssue(_0x4de4f7(0xf2),_0x57df7d+_0x4de4f7(0xe9),_0x4de4f7(0xd7),_0x4de4f7(0x12c)+_0x387e74+'%)',_0x54c2eb));for(let _0x4b6d33=0x0;_0x4b6d33<_0x27099c[_0x4de4f7(0xff)][_0x4de4f7(0x15c)][_0x4de4f7(0xd6)];_0x4b6d33++){const _0x576db4=_0x27099c['with'][_0x4de4f7(0x15c)][_0x4b6d33],_0x36f9b0=_0x57df7d+'.with.variants['+_0x4b6d33+']';_0x576db4['next']&&_0x54c2eb[_0x4de4f7(0x170)]&&!_0x54c2eb['stepNames']['has'](_0x576db4[_0x4de4f7(0x15d)])&&_0x3ec8ea['push'](createIssue(_0x4de4f7(0xf2),_0x36f9b0+_0x4de4f7(0xe4),_0x4de4f7(0x165),_0x4de4f7(0x11c)+_0x576db4['next']+'\x27',_0x54c2eb));if(_0x576db4[_0x4de4f7(0x15d)]){const _0x5c4a05=_0x4b2ea1[_0x4de4f7(0x10f)](_0x576db4['next']);_0x5c4a05?.[_0x4de4f7(0x130)]===_0x4de4f7(0x14b)&&_0x3ec8ea[_0x4de4f7(0x152)](createIssue('warning',_0x36f9b0+'.next',_0x4de4f7(0x14f),_0x4de4f7(0xfa)+_0x576db4['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x576db4[_0x4de4f7(0x15d)]+_0x4de4f7(0x179),_0x54c2eb));}}return _0x3ec8ea;}function a149_0x4ad7(_0x6f968,_0x578306){_0x6f968=_0x6f968-0xd4;const _0x1bc7a0=a149_0x1bc7();let _0x4ad781=_0x1bc7a0[_0x6f968];return _0x4ad781;}function validateJumpStep(_0x46477c,_0x20a9f6,_0x26be4b){const _0x44928b=a149_0x4ad7,_0x532a42=[];if(!_0x46477c[_0x44928b(0xff)]?.[_0x44928b(0x162)])return _0x532a42[_0x44928b(0x152)](createIssue(_0x44928b(0xf2),_0x20a9f6+'.with.target','INVALID_JUMP_TARGET','Jump\x20step\x20requires\x20a\x20target',_0x26be4b,_0x20a9f6)),_0x532a42;return(!_0x46477c[_0x44928b(0xff)]['target'][_0x44928b(0xe8)]||!_0x46477c[_0x44928b(0xff)]['target']['stage'])&&_0x532a42['push'](createIssue('error',_0x20a9f6+'.with.target','INVALID_JUMP_TARGET',_0x44928b(0xe0),_0x26be4b)),_0x532a42;}function buildConvergenceMap(_0x1bb051){const _0x1d0c79=a149_0x4ad7,_0xd8d982=new Map();function _0xc380bb(_0x1da804,_0x2737b4){const _0x283452=a149_0x4ad7,_0xbbb67=_0xd8d982['get'](_0x1da804)||[];_0xbbb67['push'](_0x2737b4),_0xd8d982[_0x283452(0x13d)](_0x1da804,_0xbbb67);}for(const _0x1a0be2 of _0x1bb051){_0x1a0be2[_0x1d0c79(0x15d)]&&_0xc380bb(_0x1a0be2[_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':_0x1d0c79(0xe5)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'});if(_0x1a0be2[_0x1d0c79(0x130)]==='decision_point'&&_0x1a0be2[_0x1d0c79(0xff)]?.['branches'])for(const _0x4a42fa of _0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0xda)]){_0x4a42fa['next']&&_0xc380bb(_0x4a42fa[_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':_0x1d0c79(0x177)+_0x4a42fa[_0x1d0c79(0x17a)]+_0x1d0c79(0x127)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'});}if(_0x1a0be2['type']===_0x1d0c79(0xf5)&&_0x1a0be2[_0x1d0c79(0xff)]?.[_0x1d0c79(0x15c)])for(const _0x3a20fd of _0x1a0be2[_0x1d0c79(0xff)]['variants']){_0x3a20fd[_0x1d0c79(0x15d)]&&_0xc380bb(_0x3a20fd[_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':_0x1d0c79(0x11f)+_0x3a20fd['name']+_0x1d0c79(0x127)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'});}_0x1a0be2[_0x1d0c79(0x130)]==='wait'&&_0x1a0be2[_0x1d0c79(0xff)]?.['condition']&&(_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)][_0x1d0c79(0x15d)]&&_0xc380bb(_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)][_0x1d0c79(0x15d)],{'stepName':_0x1a0be2[_0x1d0c79(0x17a)],'description':'condition\x20of\x20\x27'+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'}),_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)][_0x1d0c79(0x17e)]?.['next']&&_0xc380bb(_0x1a0be2[_0x1d0c79(0xff)][_0x1d0c79(0x18a)]['timeout'][_0x1d0c79(0x15d)],{'stepName':_0x1a0be2['name'],'description':_0x1d0c79(0x16d)+_0x1a0be2[_0x1d0c79(0x17a)]+'\x27'}));}return _0xd8d982;}function validateFlowControl(_0x3168e3,_0x4f2004,_0x20ad12){const _0x508b9d=a149_0x4ad7,_0x196eda=[],_0x1ed826=_0x508b9d(0x11e)+_0x4f2004+']',_0x4f9aba=_0x3168e3[_0x508b9d(0x16b)]||[];if(_0x4f9aba['length']===0x0)return _0x196eda;const _0x5257de=new Map();for(const _0x357ce9 of _0x4f9aba){_0x357ce9['name']&&_0x5257de['set'](_0x357ce9[_0x508b9d(0x17a)],_0x357ce9);}const _0x2ddd79=buildConvergenceMap(_0x4f9aba),_0x586ab9=_0x4f9aba[_0x508b9d(0x182)](_0x264959=>_0x264959[_0x508b9d(0x130)]===_0x508b9d(0x151));!_0x586ab9&&_0x196eda[_0x508b9d(0x152)](createIssue('error',_0x1ed826+_0x508b9d(0xea),'MISSING_END_STEP',_0x508b9d(0x143)+_0x3168e3[_0x508b9d(0x17a)]+_0x508b9d(0x14e),_0x20ad12));for(const [_0x574664,_0x481773]of _0x2ddd79){const _0x282830=_0x5257de['get'](_0x574664);if(!_0x282830)continue;if(_0x481773['length']>0x1&&_0x282830[_0x508b9d(0x130)]!==_0x508b9d(0x14b)){const _0x47460a=_0x481773[_0x508b9d(0x17b)](_0x17791e=>_0x17791e[_0x508b9d(0xfe)])[_0x508b9d(0x10d)](',\x20');_0x196eda['push'](createIssue(_0x508b9d(0xf2),_0x1ed826+_0x508b9d(0xea),_0x508b9d(0x12a),_0x508b9d(0x13b)+_0x574664+_0x508b9d(0x149)+_0x47460a+_0x508b9d(0xee),_0x20ad12));}_0x481773[_0x508b9d(0xd6)]===0x1&&_0x282830['type']===_0x508b9d(0x14b)&&_0x196eda['push'](createIssue(_0x508b9d(0xf3),_0x1ed826+_0x508b9d(0xea),_0x508b9d(0x117),_0x508b9d(0xdc)+_0x574664+_0x508b9d(0x11a)+_0x481773[0x0][_0x508b9d(0xfe)]+_0x508b9d(0x14c),_0x20ad12));}for(const _0x443709 of _0x4f9aba){if(_0x443709[_0x508b9d(0x130)]===_0x508b9d(0x14b)&&_0x443709[_0x508b9d(0x15d)]){const _0x5bda69=_0x5257de[_0x508b9d(0x10f)](_0x443709[_0x508b9d(0x15d)]);_0x5bda69?.[_0x508b9d(0x130)]===_0x508b9d(0x14b)&&_0x196eda[_0x508b9d(0x152)](createIssue(_0x508b9d(0xf2),_0x1ed826+_0x508b9d(0xea),'MERGE_TO_MERGE_CHAIN',_0x508b9d(0xdc)+_0x443709['name']+_0x508b9d(0x12e)+_0x443709['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x20ad12));}}return _0x196eda;}function validateCriteria(_0x4c9d1f,_0x1d4dfb,_0x338a60){const _0x5e95eb=a149_0x4ad7,_0x2f0475=[];return _0x4c9d1f['segment']&&(_0x338a60['referencedSegments']?.[_0x5e95eb(0x14d)](_0x4c9d1f[_0x5e95eb(0x142)]),!_0x4c9d1f[_0x5e95eb(0x142)][_0x5e95eb(0xf6)](_0x5e95eb(0x104))&&(_0x338a60[_0x5e95eb(0xd5)]&&!_0x338a60['embeddedSegments'][_0x5e95eb(0x105)](_0x4c9d1f[_0x5e95eb(0x142)])&&_0x2f0475[_0x5e95eb(0x152)](createIssue(_0x5e95eb(0xf2),_0x1d4dfb+_0x5e95eb(0x113),_0x5e95eb(0x169),_0x5e95eb(0x154)+_0x4c9d1f[_0x5e95eb(0x142)]+'\x27',_0x338a60)))),_0x2f0475;}function validateEmbeddedSegment(_0x59380c,_0x4f9d11,_0x17af16){const _0x660a10=a149_0x4ad7,_0x12a3ff=[];return _0x59380c[_0x660a10(0x111)]&&_0x12a3ff['push'](...validateRuleDef(_0x59380c[_0x660a10(0x111)],_0x4f9d11+'.rule',_0x17af16)),_0x12a3ff;}function validateStage(_0x4e467a,_0x6e2e8a,_0x524c99,_0x174909){const _0x139619=a149_0x4ad7,_0x236a72=[],_0xaac7ad=_0x139619(0x11e)+_0x6e2e8a+']',_0x1f2a67=new Map(),_0x1db093=new Map();if(_0x4e467a[_0x139619(0x16b)]){for(let _0x5df55b=0x0;_0x5df55b<_0x4e467a[_0x139619(0x16b)][_0x139619(0xd6)];_0x5df55b++){const _0x8caabe=_0x4e467a[_0x139619(0x16b)][_0x5df55b];_0x8caabe[_0x139619(0x17a)]&&_0x1f2a67[_0x139619(0x13d)](_0x8caabe[_0x139619(0x17a)],_0x8caabe);}for(let _0x5cfdf2=0x0;_0x5cfdf2<_0x4e467a['steps'][_0x139619(0xd6)];_0x5cfdf2++){const _0x333621=_0x4e467a[_0x139619(0x16b)][_0x5cfdf2],_0x105bf2=_0xaac7ad+'.steps['+_0x5cfdf2+']';if(_0x333621[_0x139619(0x17a)]){if(_0x1db093[_0x139619(0x105)](_0x333621[_0x139619(0x17a)])){const _0x522976=_0x1db093['get'](_0x333621['name']);_0x236a72[_0x139619(0x152)](createIssue('error',_0x105bf2+_0x139619(0xed),_0x139619(0x132),_0x139619(0x115)+_0x333621['name']+_0x139619(0xd8)+_0x522976+'])',_0x174909));}else _0x1db093['set'](_0x333621['name'],_0x5cfdf2);}_0x236a72['push'](...validateStep(_0x333621,_0x105bf2,_0x174909,_0x1f2a67));}}_0x4e467a[_0x139619(0xdf)]&&_0x236a72['push'](...validateCriteria(_0x4e467a[_0x139619(0xdf)],_0xaac7ad+_0x139619(0x17d),_0x174909));if(_0x4e467a[_0x139619(0xd4)])for(let _0x2645cb=0x0;_0x2645cb<_0x4e467a[_0x139619(0xd4)]['length'];_0x2645cb++){_0x236a72[_0x139619(0x152)](...validateCriteria(_0x4e467a[_0x139619(0xd4)][_0x2645cb],_0xaac7ad+'.exit_criteria['+_0x2645cb+']',_0x174909));}return _0x4e467a[_0x139619(0x166)]&&_0x236a72[_0x139619(0x152)](...validateCriteria(_0x4e467a[_0x139619(0x166)],_0xaac7ad+_0x139619(0x114),_0x174909)),_0x236a72[_0x139619(0x152)](...validateStageStructure(_0x4e467a,_0x6e2e8a,_0x524c99,_0x174909)),_0x236a72[_0x139619(0x152)](...validateFlowControl(_0x4e467a,_0x6e2e8a,_0x174909)),_0x236a72;}function validateStagesForVersion(_0x5c78ec,_0x51b80d,_0x1840f3,_0x1b250a,_0x79b83f,_0x1906db,_0x27bfcc){const _0x3c59a1=a149_0x4ad7;if(_0x5c78ec['length']===0x0){_0x79b83f['push']({'level':_0x3c59a1(0xf2),'path':_0x1b250a+_0x3c59a1(0x102),'code':'MISSING_STAGES','message':_0x3c59a1(0x11d),'location':getLocationFromPath(_0x1840f3[_0x3c59a1(0xf4)],_0x1840f3['source'],['stages'])});return;}const _0x35c609=new Set();for(const _0x2ee7ad of _0x5c78ec){if(_0x2ee7ad[_0x3c59a1(0x16b)])for(const _0x2738ee of _0x2ee7ad[_0x3c59a1(0x16b)]){_0x2738ee['name']&&_0x35c609[_0x3c59a1(0x14d)](_0x2738ee['name']);}}const _0x2a32eb={..._0x1840f3,'stepNames':_0x35c609},_0x52d2ac=validateVersionStructure(_0x5c78ec,_0x2a32eb);for(const _0x1c51ad of _0x52d2ac){const _0x9238a0=_0x1b250a?{..._0x1c51ad,'path':''+_0x1b250a+_0x1c51ad[_0x3c59a1(0x10a)]}:_0x1c51ad;if(_0x9238a0[_0x3c59a1(0x146)]===_0x3c59a1(0xf2))_0x79b83f[_0x3c59a1(0x152)](_0x9238a0);else _0x1906db['push'](_0x9238a0);}for(let _0x4355fc=0x0;_0x4355fc<_0x5c78ec['length'];_0x4355fc++){const _0x194194=validateStage(_0x5c78ec[_0x4355fc],_0x4355fc,_0x5c78ec[_0x3c59a1(0xd6)],_0x2a32eb);for(const _0x1caa43 of _0x194194){const _0xb42a0c=_0x1b250a?{..._0x1caa43,'path':''+_0x1b250a+_0x1caa43[_0x3c59a1(0x10a)]}:_0x1caa43;if(_0xb42a0c[_0x3c59a1(0x146)]===_0x3c59a1(0xf2))_0x79b83f[_0x3c59a1(0x152)](_0xb42a0c);else _0x1906db[_0x3c59a1(0x152)](_0xb42a0c);}}if(_0x51b80d[_0x3c59a1(0x160)]){const _0x1b489d=_0x27bfcc?.[_0x3c59a1(0x17c)]?'goal':_0x1b250a+_0x3c59a1(0x160),_0x192bf5=validateCriteria(_0x51b80d[_0x3c59a1(0x160)],_0x1b489d,_0x2a32eb);for(const _0x372aa8 of _0x192bf5){if(_0x372aa8[_0x3c59a1(0x146)]===_0x3c59a1(0xf2))_0x79b83f[_0x3c59a1(0x152)](_0x372aa8);else _0x1906db[_0x3c59a1(0x152)](_0x372aa8);}}}function extractVersionIndex(_0x1fbac5){const _0x1b38f5=a149_0x4ad7,_0x4fd5dd=_0x1fbac5[_0x1b38f5(0x15b)](/^journeys\[(\d+)\]\./);return _0x4fd5dd?_0x4fd5dd[0x1]:undefined;}function a149_0x1bc7(){const _0x35df44=['excluded','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','set','.with.branches','MISSING_ENTRY_CRITERIA','decision_point','Step\x20references\x20non-existent\x20step\x20\x27','segment','Stage\x20\x27','abs','wait','level','version','.type','\x27\x20(from:\x20','size','merge',').\x20Merge\x20is\x20unnecessary.','add','\x27\x20has\x20no\x20end\x20step','BRANCH_DIRECTLY_TO_MERGE','reduce','end','push','filter','Criteria\x20references\x20undefined\x20segment\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','MISSING_EXIT_CRITERIA','\x27\x20has\x20no\x20steps','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','indices','source','match','variants','next','MISSING_STAGES','MISSING_NAME','goal','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','target','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x20steps\x20(may\x20be\x20too\x20simple)','INVALID_NEXT_REFERENCE','milestone','endsWith','message','MISSING_SEGMENT_REFERENCE','symbol','steps','Journey\x20name\x20is\x20required','timeout\x20of\x20\x27','issues','latest','stepNames','JOURNEY_SCHEMA_ERROR','448MDLiJX','referencedSegments','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','2949245VNiksk','percentage','branch\x20\x27','safeParse','\x27\x20with\x20no\x20action\x20in\x20between','name','map','goalIsInherited','.entry_criteria','timeout','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','.with.condition.timeout.next','2992818toYHbb','some','.exit_criteria','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','FEW_STEPS','End\x20step\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','journeys','skipSchema','condition','exit_criteria','embeddedSegments','length','INVALID_AB_TEST_PERCENTAGES','\x27\x20(first\x20defined\x20at\x20steps[','\x27\x20has\x20only\x20','branches','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','Merge\x20step\x20\x27','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','MISSING_GOAL','entry_criteria','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','versions[','data','ACTIVATION_SCHEMA_ERROR','.next','step\x20\x27','.with.branches[','includes','journey','.with.variants','.steps','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','launched','.name',').\x20Use\x20a\x20merge\x20step.','activations','Journey\x20has\x20','segments.','error','warning','document','ab_test','startsWith','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','MISSING_WAIT_PARAMS','A/B\x20test\x20variant\x20\x27','2059334rAIvyR','MISSING_MILESTONE','\x20with\x20latest:\x20true','description','with','activationKeys','\x20(across\x20','stages','journeys[','ref:','has','activation','MISSING_ACTIVATION_DEFINITION','keys','\x20stages\x20but\x20maximum\x20is\x20','path','.with','.with.condition.next','join','UNUSED_EMBEDDED_SEGMENT','get','.with.condition','rule','Embedded\x20segment\x20\x27','.segment','.milestone','Duplicate\x20step\x20name\x20\x27','538132GDUrWr','SINGLE_INPUT_MERGE','MISSING_CONDITIONS','entries','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','TOO_MANY_STAGES','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','stages[','variant\x20\x27','.with.activation','sort','journey\x20entry','replace','979586eJNSls','.with.condition.timeout','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20of\x20\x27','journeys,\x20stages,\x20or\x20versions','179536QnEZET','CONVERGENCE_WITHOUT_MERGE','Journey\x20has\x20no\x20goal\x20defined','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','type','segments','DUPLICATE_STEP_NAME','versions','INSUFFICIENT_STEPS','\x20versions)','.with.condition.segment','1830816QmvANm','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'];a149_0x1bc7=function(){return _0x35df44;};return a149_0x1bc7();}function deduplicateAcrossVersions(_0x4ec366){const _0x2aad5d=a149_0x4ad7,_0x4c9fc2=new Map();for(let _0x20be3f=0x0;_0x20be3f<_0x4ec366[_0x2aad5d(0xd6)];_0x20be3f++){const _0x5e3564=_0x4ec366[_0x20be3f]['code']+':'+_0x4ec366[_0x20be3f][_0x2aad5d(0x168)],_0x58ce17=extractVersionIndex(_0x4ec366[_0x20be3f][_0x2aad5d(0x10a)]),_0x1c7c64=_0x4c9fc2[_0x2aad5d(0x10f)](_0x5e3564);if(_0x1c7c64){_0x1c7c64[_0x2aad5d(0x159)][_0x2aad5d(0x152)](_0x20be3f);if(_0x58ce17)_0x1c7c64[_0x2aad5d(0x133)]['add'](_0x58ce17);}else _0x4c9fc2[_0x2aad5d(0x13d)](_0x5e3564,{'indices':[_0x20be3f],'versions':new Set(_0x58ce17?[_0x58ce17]:[])});}const _0x3b8056=new Set();for(const {indices:_0x3640f3,versions:_0x593420}of _0x4c9fc2['values']()){if(_0x593420[_0x2aad5d(0x14a)]<=0x1)continue;const _0x3304f7=_0x4ec366[_0x3640f3[0x0]];_0x3304f7['path']=_0x3304f7[_0x2aad5d(0x10a)][_0x2aad5d(0x123)](/^journeys\[\d+\]\./,''),_0x3304f7['message']=_0x3304f7[_0x2aad5d(0x168)]+_0x2aad5d(0x101)+_0x593420[_0x2aad5d(0x14a)]+_0x2aad5d(0x135);for(let _0x29d585=0x1;_0x29d585<_0x3640f3[_0x2aad5d(0xd6)];_0x29d585++){_0x3b8056[_0x2aad5d(0x14d)](_0x3640f3[_0x29d585]);}}const _0x1cb448=[..._0x3b8056][_0x2aad5d(0x121)]((_0x59aa52,_0x23a14d)=>_0x23a14d-_0x59aa52);for(const _0x274aa4 of _0x1cb448){_0x4ec366['splice'](_0x274aa4,0x1);}}export function validateJourneyDef(_0x2c8cf5,_0x4960b8={},_0x557e75={}){const _0x292b86=a149_0x4ad7;if(_0x557e75[_0x292b86(0x189)])return runJourneySemanticChecks(_0x2c8cf5,_0x4960b8);const _0x84993c=JourneyDefSchema[_0x292b86(0x178)](_0x2c8cf5);if(_0x84993c['success'])return runJourneySemanticChecks(_0x84993c[_0x292b86(0xe2)],_0x4960b8);return zodErrorsToJourneyValidationResult(_0x84993c[_0x292b86(0xf2)],_0x4960b8);}function zodErrorsToJourneyValidationResult(_0x2a22f1,_0x208658){const _0x31698d=a149_0x4ad7,_0x3cebd9=flattenZodIssues(_0x2a22f1[_0x31698d(0x16e)]),_0x4c7070=_0x3cebd9[_0x31698d(0x17b)](_0x1a19c7=>{const _0x6b2c14=_0x31698d,_0x54c45f=formatZodPath(_0x1a19c7[_0x6b2c14(0x10a)]),_0x4e2a3b=mapJourneyZodIssueToCode(_0x1a19c7,_0x54c45f),_0x5a30c3=getLocationFromPath(_0x208658[_0x6b2c14(0xf4)],_0x208658['source'],_0x1a19c7['path'][_0x6b2c14(0x17b)](_0x414655=>typeof _0x414655===_0x6b2c14(0x16a)?String(_0x414655):_0x414655));return{'level':_0x6b2c14(0xf2),'path':_0x54c45f,'code':_0x4e2a3b,'message':_0x1a19c7['message'],..._0x5a30c3&&{'location':_0x5a30c3}};});return{'valid':![],'errors':_0x4c7070,'warnings':[]};}function mapJourneyZodIssueToCode(_0x1d8271,_0x323692){const _0x5727f1=a149_0x4ad7;if(_0x323692===_0x5727f1(0x17a))return'MISSING_NAME';if(_0x323692[_0x5727f1(0x167)](_0x5727f1(0x148))&&_0x323692['includes'](_0x5727f1(0x16b)))return'JOURNEY_SCHEMA_ERROR';if(_0x323692===_0x5727f1(0x102)||_0x323692['endsWith']('.stages'))return _0x5727f1(0x15e);if(_0x323692===''&&_0x1d8271[_0x5727f1(0x168)][_0x5727f1(0xe7)](_0x5727f1(0x128)))return _0x5727f1(0x15e);if(_0x323692['includes'](_0x5727f1(0x106)))return _0x5727f1(0xe3);return _0x5727f1(0x171);}function runJourneySemanticChecks(_0x3b60d2,_0x337573){const _0x34ec41=a149_0x4ad7,_0xfd880f=[],_0x59364d=[];(!_0x3b60d2[_0x34ec41(0x17a)]||_0x3b60d2[_0x34ec41(0x17a)]['trim']()==='')&&_0xfd880f[_0x34ec41(0x152)]({'level':_0x34ec41(0xf2),'path':'name','code':_0x34ec41(0x15f),'message':_0x34ec41(0x16c),'location':getLocationFromPath(_0x337573[_0x34ec41(0xf4)],_0x337573['source'],[_0x34ec41(0x17a)])});const _0x1df933=new Set();if(_0x3b60d2[_0x34ec41(0x131)])for(const _0x2448ae of Object[_0x34ec41(0x108)](_0x3b60d2['segments'])){_0x1df933['add'](_0x2448ae);}const _0x50675b=new Set();if(_0x3b60d2[_0x34ec41(0xef)])for(const _0x874c8a of Object[_0x34ec41(0x108)](_0x3b60d2[_0x34ec41(0xef)])){_0x50675b[_0x34ec41(0x14d)](_0x874c8a);}const _0x215ed7=new Set(),_0x4f4cef={..._0x337573,'embeddedSegments':_0x1df933,'referencedSegments':_0x215ed7,'activationKeys':_0x50675b[_0x34ec41(0x14a)]>0x0?_0x50675b:undefined};if(_0x3b60d2[_0x34ec41(0x131)])for(const [_0x15fcaa,_0x4cd444]of Object[_0x34ec41(0x119)](_0x3b60d2['segments'])){const _0x505261=validateEmbeddedSegment(_0x4cd444,_0x34ec41(0xf1)+_0x15fcaa,_0x4f4cef);for(const _0x146b5b of _0x505261){if(_0x146b5b[_0x34ec41(0x146)]===_0x34ec41(0xf2))_0xfd880f['push'](_0x146b5b);else _0x59364d[_0x34ec41(0x152)](_0x146b5b);}}const _0x4855b9=!!_0x3b60d2['goal'],_0x2d5521=_0x3b60d2[_0x34ec41(0x188)]?.['every'](_0x3261a2=>!!_0x3261a2['goal'])??![];!_0x4855b9&&!_0x2d5521&&_0x59364d[_0x34ec41(0x152)]({'level':'warning','path':'goal','code':_0x34ec41(0xde),'message':_0x34ec41(0x12b),'location':getLocationFromPath(_0x337573[_0x34ec41(0xf4)],_0x337573[_0x34ec41(0x15a)],[_0x34ec41(0x160)])});const _0x5d3dd6=_0x3b60d2['journeys']??_0x3b60d2[_0x34ec41(0x133)];if(_0x5d3dd6&&_0x5d3dd6[_0x34ec41(0x153)](_0xba7d34=>_0xba7d34[_0x34ec41(0x16f)]===!![])['length']>0x1){const _0x28daf4=_0x3b60d2[_0x34ec41(0x188)]?_0x34ec41(0x188):_0x34ec41(0x133);_0xfd880f[_0x34ec41(0x152)]({'level':_0x34ec41(0xf2),'path':_0x28daf4,'code':'DUPLICATE_LATEST','message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x28daf4===_0x34ec41(0x188)?_0x34ec41(0x122):_0x34ec41(0x147))+_0x34ec41(0xfd),'location':getLocationFromPath(_0x337573['document'],_0x337573[_0x34ec41(0x15a)],[_0x28daf4])});}if(_0x3b60d2['journeys']&&_0x3b60d2[_0x34ec41(0x188)][_0x34ec41(0xd6)]>0x0)for(let _0x569fca=0x0;_0x569fca<_0x3b60d2[_0x34ec41(0x188)][_0x34ec41(0xd6)];_0x569fca++){const _0x57cd27=_0x3b60d2[_0x34ec41(0x188)][_0x569fca];if(_0x3b60d2[_0x34ec41(0x188)][_0x34ec41(0xd6)]>0x1&&_0x57cd27['state']===_0x34ec41(0xec))continue;const _0x2feaad=_0x57cd27[_0x34ec41(0x102)]||[],_0x379d73=_0x34ec41(0x103)+_0x569fca+'].',_0x18a358=!!_0x57cd27[_0x34ec41(0x160)],_0x9d76c8=_0x18a358?{..._0x3b60d2,'goal':_0x57cd27[_0x34ec41(0x160)]}:_0x3b60d2;validateStagesForVersion(_0x2feaad,_0x9d76c8,_0x4f4cef,_0x379d73,_0xfd880f,_0x59364d,{'goalIsInherited':!_0x18a358});}else{if(_0x3b60d2[_0x34ec41(0x133)]&&_0x3b60d2[_0x34ec41(0x133)][_0x34ec41(0xd6)]>0x0)for(let _0x29ca26=0x0;_0x29ca26<_0x3b60d2[_0x34ec41(0x133)][_0x34ec41(0xd6)];_0x29ca26++){const _0x1a9a4a=_0x3b60d2[_0x34ec41(0x133)][_0x29ca26];if(_0x3b60d2[_0x34ec41(0x133)]['length']>0x1&&_0x1a9a4a['state']==='launched')continue;const _0x5df079=_0x1a9a4a[_0x34ec41(0x102)]||[],_0x2759b2=_0x34ec41(0xe1)+_0x29ca26+'].';validateStagesForVersion(_0x5df079,_0x3b60d2,_0x4f4cef,_0x2759b2,_0xfd880f,_0x59364d);}else{const _0xe41143=_0x3b60d2[_0x34ec41(0x102)]||[];validateStagesForVersion(_0xe41143,_0x3b60d2,_0x4f4cef,'',_0xfd880f,_0x59364d);}}_0x3b60d2['journeys']&&_0x3b60d2[_0x34ec41(0x188)]['length']>0x1&&(deduplicateAcrossVersions(_0xfd880f),deduplicateAcrossVersions(_0x59364d));for(const _0x43f473 of _0x1df933){!_0x215ed7[_0x34ec41(0x105)](_0x43f473)&&!_0x43f473[_0x34ec41(0xf6)]('excluded_')&&_0x59364d['push']({'level':_0x34ec41(0xf3),'path':_0x34ec41(0xf1)+_0x43f473,'code':_0x34ec41(0x10e),'message':_0x34ec41(0x112)+_0x43f473+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x337573['document'],_0x337573[_0x34ec41(0x15a)],[_0x34ec41(0x131),_0x43f473])});}return{'valid':_0xfd880f[_0x34ec41(0xd6)]===0x0,'errors':_0xfd880f,'warnings':_0x59364d};}
|
|
1
|
+
(function(_0x3faa1d,_0x2eb65d){const _0x4b2766=a149_0x3263,_0x215c28=_0x3faa1d();while(!![]){try{const _0x2845c4=parseInt(_0x4b2766(0x1ee))/0x1*(-parseInt(_0x4b2766(0x24f))/0x2)+parseInt(_0x4b2766(0x279))/0x3*(-parseInt(_0x4b2766(0x229))/0x4)+-parseInt(_0x4b2766(0x262))/0x5+-parseInt(_0x4b2766(0x252))/0x6*(-parseInt(_0x4b2766(0x208))/0x7)+parseInt(_0x4b2766(0x245))/0x8+parseInt(_0x4b2766(0x214))/0x9*(parseInt(_0x4b2766(0x221))/0xa)+parseInt(_0x4b2766(0x280))/0xb*(-parseInt(_0x4b2766(0x22e))/0xc);if(_0x2845c4===_0x2eb65d)break;else _0x215c28['push'](_0x215c28['shift']());}catch(_0x31f60b){_0x215c28['push'](_0x215c28['shift']());}}}(a149_0x1968,0x62ddf));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x72628a,_0x428369,_0x282fc4,_0x1cd0eb,_0x89356b,_0xe8c465){const _0x5aa806=a149_0x3263;return{'level':_0x72628a,'path':_0x428369,'code':_0x282fc4,'message':_0x1cd0eb,'location':getLocationFromPath(_0x89356b[_0x5aa806(0x26d)],_0x89356b['source'],pathToArray(_0xe8c465??_0x428369))};}function validateVersionStructure(_0x1c4dca,_0x1c1291){const _0x3a0f40=a149_0x3263,_0x27a2ab=[];return _0x1c4dca[_0x3a0f40(0x1e2)]>MAX_STAGES&&_0x27a2ab['push'](createIssue(_0x3a0f40(0x230),_0x3a0f40(0x269),_0x3a0f40(0x1f5),_0x3a0f40(0x281)+_0x1c4dca[_0x3a0f40(0x1e2)]+_0x3a0f40(0x1fd)+MAX_STAGES,_0x1c1291)),_0x27a2ab;}function validateStageStructure(_0x2dd963,_0x740cfb,_0x46a895,_0x31fb8b){const _0x31f5b6=a149_0x3263,_0x5477ba=[],_0x135608=_0x31f5b6(0x21b)+_0x740cfb+']';_0x740cfb===0x0&&!_0x2dd963[_0x31f5b6(0x1dc)]&&_0x5477ba['push'](createIssue(_0x31f5b6(0x230),_0x135608+_0x31f5b6(0x277),_0x31f5b6(0x273),_0x31f5b6(0x256)+_0x2dd963[_0x31f5b6(0x28a)]+_0x31f5b6(0x21e),_0x31fb8b,_0x135608));const _0x38de37=_0x740cfb===_0x46a895-0x1;!_0x38de37&&!_0x2dd963[_0x31f5b6(0x26a)]&&_0x5477ba[_0x31f5b6(0x285)](createIssue(_0x31f5b6(0x230),_0x135608+_0x31f5b6(0x249),_0x31f5b6(0x23b),_0x31f5b6(0x256)+_0x2dd963['name']+_0x31f5b6(0x250),_0x31fb8b,_0x135608));(!_0x2dd963[_0x31f5b6(0x261)]||_0x2dd963[_0x31f5b6(0x261)][_0x31f5b6(0x1e2)]===0x0)&&_0x5477ba[_0x31f5b6(0x285)](createIssue(_0x31f5b6(0x27d),_0x135608+'.exit_criteria',_0x31f5b6(0x22d),_0x31f5b6(0x256)+_0x2dd963[_0x31f5b6(0x28a)]+_0x31f5b6(0x1dd),_0x31fb8b,_0x135608));const _0x71753=_0x2dd963['steps']?.[_0x31f5b6(0x1e2)]??0x0;if(_0x71753===0x0)_0x5477ba['push'](createIssue(_0x31f5b6(0x230),_0x135608+_0x31f5b6(0x1f1),_0x31f5b6(0x217),'Stage\x20\x27'+_0x2dd963[_0x31f5b6(0x28a)]+_0x31f5b6(0x27b),_0x31fb8b,_0x135608+_0x31f5b6(0x1f1)));else{if(_0x71753===0x1)_0x5477ba[_0x31f5b6(0x285)](createIssue(_0x31f5b6(0x27d),_0x135608+_0x31f5b6(0x1f1),'INSUFFICIENT_STEPS',_0x31f5b6(0x256)+_0x2dd963[_0x31f5b6(0x28a)]+_0x31f5b6(0x1d6),_0x31fb8b,_0x135608+'.steps'));else _0x71753<=0x3&&_0x5477ba[_0x31f5b6(0x285)](createIssue('warning',_0x135608+_0x31f5b6(0x1f1),_0x31f5b6(0x1fa),'Stage\x20\x27'+_0x2dd963['name']+_0x31f5b6(0x24c)+_0x71753+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x31fb8b,_0x135608+_0x31f5b6(0x1f1)));}return _0x5477ba;}function validateStep(_0x146f24,_0x50ccdd,_0x2c55b3,_0x531422){const _0x2273a5=a149_0x3263,_0xa40e15=[];if(_0x146f24[_0x2273a5(0x1f7)]===_0x2273a5(0x21f))return _0x146f24[_0x2273a5(0x288)]&&_0xa40e15[_0x2273a5(0x285)](createIssue(_0x2273a5(0x230),_0x50ccdd+'.next',_0x2273a5(0x1f0),'End\x20step\x20\x27'+_0x146f24[_0x2273a5(0x28a)]+_0x2273a5(0x1eb),_0x2c55b3)),_0x2273a5(0x1ec)in _0x146f24&&_0x146f24['with']!==undefined&&_0xa40e15[_0x2273a5(0x285)](createIssue(_0x2273a5(0x230),_0x50ccdd+'.with',_0x2273a5(0x1f0),_0x2273a5(0x24d)+_0x146f24[_0x2273a5(0x28a)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x2c55b3)),_0xa40e15;_0x146f24[_0x2273a5(0x288)]&&(_0x2c55b3[_0x2273a5(0x215)]&&!_0x2c55b3['stepNames'][_0x2273a5(0x289)](_0x146f24[_0x2273a5(0x288)])&&_0xa40e15[_0x2273a5(0x285)](createIssue(_0x2273a5(0x230),_0x50ccdd+_0x2273a5(0x21c),_0x2273a5(0x20f),_0x2273a5(0x239)+_0x146f24[_0x2273a5(0x288)]+'\x27',_0x2c55b3)));switch(_0x146f24['type']){case _0x2273a5(0x266):_0xa40e15[_0x2273a5(0x285)](...validateWaitStep(_0x146f24,_0x50ccdd,_0x2c55b3,_0x531422));break;case _0x2273a5(0x1e4):_0xa40e15[_0x2273a5(0x285)](...validateActivationStep(_0x146f24,_0x50ccdd,_0x2c55b3));break;case'decision_point':_0xa40e15['push'](...validateDecisionPointStep(_0x146f24,_0x50ccdd,_0x2c55b3,_0x531422));break;case _0x2273a5(0x1f8):_0xa40e15[_0x2273a5(0x285)](...validateAbTestStep(_0x146f24,_0x50ccdd,_0x2c55b3,_0x531422));break;case'jump':_0xa40e15[_0x2273a5(0x285)](...validateJumpStep(_0x146f24,_0x50ccdd,_0x2c55b3));break;}return _0xa40e15;}function validateWaitStep(_0x3de9f2,_0x4a7d03,_0x234aff,_0x911db2){const _0x30b2dc=a149_0x3263,_0x1ba215=[];if(!_0x3de9f2[_0x30b2dc(0x1ec)])return _0x1ba215[_0x30b2dc(0x285)](createIssue(_0x30b2dc(0x230),_0x4a7d03+_0x30b2dc(0x27c),_0x30b2dc(0x260),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x234aff,_0x4a7d03)),_0x1ba215;if(_0x3de9f2['with'][_0x30b2dc(0x1fc)]){const _0xf50376=_0x3de9f2[_0x30b2dc(0x1ec)][_0x30b2dc(0x1fc)];if(_0xf50376[_0x30b2dc(0x200)]){_0x234aff[_0x30b2dc(0x1d5)]?.['add'](_0xf50376['segment']);!_0xf50376[_0x30b2dc(0x200)]['startsWith'](_0x30b2dc(0x20e))&&(_0x234aff[_0x30b2dc(0x235)]&&!_0x234aff['embeddedSegments'][_0x30b2dc(0x289)](_0xf50376[_0x30b2dc(0x200)])&&_0x1ba215['push'](createIssue(_0x30b2dc(0x230),_0x4a7d03+_0x30b2dc(0x25c),'MISSING_SEGMENT_REFERENCE',_0x30b2dc(0x204)+_0xf50376[_0x30b2dc(0x200)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x234aff)));_0xf50376[_0x30b2dc(0x288)]&&_0x234aff[_0x30b2dc(0x215)]&&!_0x234aff[_0x30b2dc(0x215)][_0x30b2dc(0x289)](_0xf50376[_0x30b2dc(0x288)])&&_0x1ba215[_0x30b2dc(0x285)](createIssue('error',_0x4a7d03+_0x30b2dc(0x24a),_0x30b2dc(0x20f),_0x30b2dc(0x1e8)+_0xf50376[_0x30b2dc(0x288)]+'\x27',_0x234aff));_0xf50376[_0x30b2dc(0x267)]?.[_0x30b2dc(0x288)]&&_0x234aff['stepNames']&&!_0x234aff[_0x30b2dc(0x215)]['has'](_0xf50376[_0x30b2dc(0x267)][_0x30b2dc(0x288)])&&_0x1ba215['push'](createIssue(_0x30b2dc(0x230),_0x4a7d03+_0x30b2dc(0x28b),_0x30b2dc(0x20f),_0x30b2dc(0x26b)+_0xf50376['timeout'][_0x30b2dc(0x288)]+'\x27',_0x234aff));const _0x1e0d25=_0xf50376['next']||_0x3de9f2[_0x30b2dc(0x288)],_0x2033e6=_0xf50376[_0x30b2dc(0x267)]?.[_0x30b2dc(0x288)]||_0x3de9f2[_0x30b2dc(0x288)];if(_0x1e0d25){const _0x40b847=_0x911db2[_0x30b2dc(0x254)](_0x1e0d25);_0x40b847?.[_0x30b2dc(0x1f7)]===_0x30b2dc(0x232)&&_0x1ba215[_0x30b2dc(0x285)](createIssue(_0x30b2dc(0x27d),_0x4a7d03+_0x30b2dc(0x24a),_0x30b2dc(0x218),_0x30b2dc(0x1df)+_0x1e0d25+_0x30b2dc(0x284),_0x234aff,_0x4a7d03+'.with.condition'));}if(_0x2033e6){const _0x4d62e6=_0x911db2[_0x30b2dc(0x254)](_0x2033e6);_0x4d62e6?.[_0x30b2dc(0x1f7)]===_0x30b2dc(0x232)&&_0x1ba215[_0x30b2dc(0x285)](createIssue('warning',_0x4a7d03+'.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE',_0x30b2dc(0x1d9)+_0x2033e6+_0x30b2dc(0x284),_0x234aff,_0x4a7d03+_0x30b2dc(0x253)));}}}return _0x1ba215;}function validateActivationStep(_0x27e5c2,_0x1509d8,_0x870ddf){const _0x44a2a8=a149_0x3263,_0x398fe3=[];if(!_0x27e5c2[_0x44a2a8(0x1ec)]?.['activation'])return _0x398fe3[_0x44a2a8(0x285)](createIssue(_0x44a2a8(0x230),_0x1509d8+'.with.activation',_0x44a2a8(0x270),_0x44a2a8(0x1e1),_0x870ddf,_0x1509d8)),_0x398fe3;const _0x561481=_0x27e5c2[_0x44a2a8(0x1ec)][_0x44a2a8(0x1e4)];return _0x870ddf[_0x44a2a8(0x1e0)]&&!_0x561481[_0x44a2a8(0x22f)](_0x44a2a8(0x20e))&&(!_0x870ddf[_0x44a2a8(0x1e0)][_0x44a2a8(0x289)](_0x561481)&&_0x398fe3['push'](createIssue(_0x44a2a8(0x230),_0x1509d8+_0x44a2a8(0x243),_0x44a2a8(0x26e),_0x44a2a8(0x1db)+_0x561481+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x870ddf))),_0x398fe3;}function validateDecisionPointStep(_0x5dcd30,_0x3a505e,_0x5da65c,_0x15e68d){const _0x8fa257=a149_0x3263,_0x7db044=[];if(!_0x5dcd30[_0x8fa257(0x1ec)]?.[_0x8fa257(0x227)]||_0x5dcd30[_0x8fa257(0x1ec)][_0x8fa257(0x227)][_0x8fa257(0x1e2)]===0x0)return _0x7db044['push'](createIssue(_0x8fa257(0x230),_0x3a505e+'.with.branches','MISSING_CONDITIONS',_0x8fa257(0x24b),_0x5da65c,_0x3a505e)),_0x7db044;for(let _0x57dd07=0x0;_0x57dd07<_0x5dcd30[_0x8fa257(0x1ec)][_0x8fa257(0x227)][_0x8fa257(0x1e2)];_0x57dd07++){const _0x2c89c1=_0x5dcd30[_0x8fa257(0x1ec)][_0x8fa257(0x227)][_0x57dd07],_0x21609d=_0x3a505e+_0x8fa257(0x287)+_0x57dd07+']';_0x2c89c1['segment']&&!_0x2c89c1[_0x8fa257(0x20c)]&&(_0x5da65c['referencedSegments']?.['add'](_0x2c89c1['segment']),!_0x2c89c1[_0x8fa257(0x200)][_0x8fa257(0x22f)](_0x8fa257(0x20e))&&(_0x5da65c[_0x8fa257(0x235)]&&!_0x5da65c[_0x8fa257(0x235)][_0x8fa257(0x289)](_0x2c89c1['segment'])&&_0x7db044[_0x8fa257(0x285)](createIssue('error',_0x21609d+_0x8fa257(0x278),'MISSING_SEGMENT_REFERENCE',_0x8fa257(0x231)+_0x2c89c1[_0x8fa257(0x200)]+'\x27',_0x5da65c))));_0x2c89c1[_0x8fa257(0x288)]&&_0x5da65c[_0x8fa257(0x215)]&&!_0x5da65c[_0x8fa257(0x215)]['has'](_0x2c89c1[_0x8fa257(0x288)])&&_0x7db044[_0x8fa257(0x285)](createIssue('error',_0x21609d+_0x8fa257(0x21c),_0x8fa257(0x20f),_0x8fa257(0x202)+_0x2c89c1[_0x8fa257(0x288)]+'\x27',_0x5da65c));if(_0x2c89c1[_0x8fa257(0x288)]){const _0x5994d9=_0x15e68d[_0x8fa257(0x254)](_0x2c89c1['next']);_0x5994d9?.[_0x8fa257(0x1f7)]===_0x8fa257(0x232)&&_0x7db044['push'](createIssue('warning',_0x21609d+_0x8fa257(0x21c),'BRANCH_DIRECTLY_TO_MERGE',_0x8fa257(0x22a)+_0x2c89c1['name']+_0x8fa257(0x1fb)+_0x2c89c1['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x5da65c));}}return _0x7db044;}function validateAbTestStep(_0x17e8d3,_0x256c9c,_0x565d1c,_0x4bd430){const _0x303aff=a149_0x3263,_0x443995=[];if(!_0x17e8d3[_0x303aff(0x1ec)]?.[_0x303aff(0x25f)]||_0x17e8d3[_0x303aff(0x1ec)]['variants'][_0x303aff(0x1e2)]===0x0)return _0x443995[_0x303aff(0x285)](createIssue(_0x303aff(0x230),_0x256c9c+_0x303aff(0x1f4),'MISSING_CONDITIONS',_0x303aff(0x23e),_0x565d1c,_0x256c9c)),_0x443995;const _0x15a4bd=_0x17e8d3[_0x303aff(0x1ec)]['variants'][_0x303aff(0x1ef)]((_0x326c7c,_0x19eb3a)=>_0x326c7c+(_0x19eb3a['percentage']||0x0),0x0);Math[_0x303aff(0x225)](_0x15a4bd-0x64)>0.01&&_0x443995[_0x303aff(0x285)](createIssue(_0x303aff(0x230),_0x256c9c+_0x303aff(0x1f4),_0x303aff(0x1e3),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x15a4bd+'%)',_0x565d1c));for(let _0x56b040=0x0;_0x56b040<_0x17e8d3['with'][_0x303aff(0x25f)][_0x303aff(0x1e2)];_0x56b040++){const _0x356558=_0x17e8d3[_0x303aff(0x1ec)][_0x303aff(0x25f)][_0x56b040],_0x4e1659=_0x256c9c+'.with.variants['+_0x56b040+']';_0x356558[_0x303aff(0x288)]&&_0x565d1c[_0x303aff(0x215)]&&!_0x565d1c['stepNames'][_0x303aff(0x289)](_0x356558[_0x303aff(0x288)])&&_0x443995[_0x303aff(0x285)](createIssue(_0x303aff(0x230),_0x4e1659+_0x303aff(0x21c),_0x303aff(0x20f),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x356558[_0x303aff(0x288)]+'\x27',_0x565d1c));if(_0x356558[_0x303aff(0x288)]){const _0x5f0a95=_0x4bd430['get'](_0x356558['next']);_0x5f0a95?.[_0x303aff(0x1f7)]===_0x303aff(0x232)&&_0x443995[_0x303aff(0x285)](createIssue(_0x303aff(0x27d),_0x4e1659+_0x303aff(0x21c),_0x303aff(0x218),_0x303aff(0x1de)+_0x356558[_0x303aff(0x28a)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x356558[_0x303aff(0x288)]+_0x303aff(0x1da),_0x565d1c));}}return _0x443995;}function a149_0x3263(_0x2cd727,_0x38040a){_0x2cd727=_0x2cd727-0x1d4;const _0x196813=a149_0x1968();let _0x326307=_0x196813[_0x2cd727];return _0x326307;}function validateJumpStep(_0x366510,_0x269b62,_0x201387){const _0x106305=a149_0x3263,_0x4f79f=[];if(!_0x366510[_0x106305(0x1ec)]?.[_0x106305(0x219)])return _0x4f79f[_0x106305(0x285)](createIssue(_0x106305(0x230),_0x269b62+_0x106305(0x1d7),_0x106305(0x1ed),_0x106305(0x228),_0x201387,_0x269b62)),_0x4f79f;return(!_0x366510[_0x106305(0x1ec)]['target'][_0x106305(0x20d)]||!_0x366510[_0x106305(0x1ec)][_0x106305(0x219)]['stage'])&&_0x4f79f[_0x106305(0x285)](createIssue(_0x106305(0x230),_0x269b62+_0x106305(0x1d7),_0x106305(0x1ed),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x201387)),_0x4f79f;}function buildConvergenceMap(_0x21a92f){const _0x437b23=a149_0x3263,_0x4915bf=new Map();function _0x5632f1(_0x2dea1d,_0x572e4f){const _0x5bd67d=a149_0x3263,_0x16caaf=_0x4915bf[_0x5bd67d(0x254)](_0x2dea1d)||[];_0x16caaf[_0x5bd67d(0x285)](_0x572e4f),_0x4915bf['set'](_0x2dea1d,_0x16caaf);}for(const _0x4f87b0 of _0x21a92f){_0x4f87b0[_0x437b23(0x288)]&&_0x5632f1(_0x4f87b0['next'],{'stepName':_0x4f87b0[_0x437b23(0x28a)],'description':_0x437b23(0x210)+_0x4f87b0['name']+'\x27'});if(_0x4f87b0[_0x437b23(0x1f7)]===_0x437b23(0x246)&&_0x4f87b0['with']?.[_0x437b23(0x227)])for(const _0x547038 of _0x4f87b0[_0x437b23(0x1ec)]['branches']){_0x547038[_0x437b23(0x288)]&&_0x5632f1(_0x547038[_0x437b23(0x288)],{'stepName':_0x4f87b0[_0x437b23(0x28a)],'description':_0x437b23(0x263)+_0x547038[_0x437b23(0x28a)]+_0x437b23(0x1e7)+_0x4f87b0[_0x437b23(0x28a)]+'\x27'});}if(_0x4f87b0[_0x437b23(0x1f7)]===_0x437b23(0x1f8)&&_0x4f87b0[_0x437b23(0x1ec)]?.['variants'])for(const _0x1066e6 of _0x4f87b0[_0x437b23(0x1ec)][_0x437b23(0x25f)]){_0x1066e6[_0x437b23(0x288)]&&_0x5632f1(_0x1066e6[_0x437b23(0x288)],{'stepName':_0x4f87b0['name'],'description':_0x437b23(0x1f3)+_0x1066e6[_0x437b23(0x28a)]+_0x437b23(0x1e7)+_0x4f87b0['name']+'\x27'});}_0x4f87b0[_0x437b23(0x1f7)]===_0x437b23(0x266)&&_0x4f87b0[_0x437b23(0x1ec)]?.[_0x437b23(0x1fc)]&&(_0x4f87b0['with'][_0x437b23(0x1fc)][_0x437b23(0x288)]&&_0x5632f1(_0x4f87b0[_0x437b23(0x1ec)][_0x437b23(0x1fc)][_0x437b23(0x288)],{'stepName':_0x4f87b0[_0x437b23(0x28a)],'description':_0x437b23(0x25a)+_0x4f87b0[_0x437b23(0x28a)]+'\x27'}),_0x4f87b0['with'][_0x437b23(0x1fc)][_0x437b23(0x267)]?.[_0x437b23(0x288)]&&_0x5632f1(_0x4f87b0[_0x437b23(0x1ec)][_0x437b23(0x1fc)][_0x437b23(0x267)][_0x437b23(0x288)],{'stepName':_0x4f87b0[_0x437b23(0x28a)],'description':'timeout\x20of\x20\x27'+_0x4f87b0[_0x437b23(0x28a)]+'\x27'}));}return _0x4915bf;}function validateFlowControl(_0x2416f0,_0x227d61,_0x56d095){const _0x1141ad=a149_0x3263,_0x516dbc=[],_0x5a70e4=_0x1141ad(0x21b)+_0x227d61+']',_0x9e8b2d=_0x2416f0[_0x1141ad(0x268)]||[];if(_0x9e8b2d[_0x1141ad(0x1e2)]===0x0)return _0x516dbc;const _0x6162fa=new Map();for(const _0x2690b0 of _0x9e8b2d){_0x2690b0[_0x1141ad(0x28a)]&&_0x6162fa[_0x1141ad(0x234)](_0x2690b0[_0x1141ad(0x28a)],_0x2690b0);}const _0xcc8c3c=buildConvergenceMap(_0x9e8b2d),_0x850d1a=_0x9e8b2d[_0x1141ad(0x220)](_0x15362b=>_0x15362b[_0x1141ad(0x1f7)]===_0x1141ad(0x21f));!_0x850d1a&&_0x516dbc['push'](createIssue(_0x1141ad(0x230),_0x5a70e4+_0x1141ad(0x1f1),_0x1141ad(0x209),_0x1141ad(0x256)+_0x2416f0[_0x1141ad(0x28a)]+_0x1141ad(0x213),_0x56d095));for(const [_0x354a97,_0x2204f4]of _0xcc8c3c){const _0x17143f=_0x6162fa[_0x1141ad(0x254)](_0x354a97);if(!_0x17143f)continue;if(_0x2204f4[_0x1141ad(0x1e2)]>0x1&&_0x17143f[_0x1141ad(0x1f7)]!=='merge'){const _0x11fb8a=_0x2204f4[_0x1141ad(0x248)](_0x30c61c=>_0x30c61c[_0x1141ad(0x1f6)])[_0x1141ad(0x1f2)](',\x20');_0x516dbc['push'](createIssue('error',_0x5a70e4+'.steps',_0x1141ad(0x241),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x354a97+'\x27\x20(from:\x20'+_0x11fb8a+_0x1141ad(0x258),_0x56d095));}_0x2204f4[_0x1141ad(0x1e2)]===0x1&&_0x17143f[_0x1141ad(0x1f7)]===_0x1141ad(0x232)&&_0x516dbc[_0x1141ad(0x285)](createIssue(_0x1141ad(0x27d),_0x5a70e4+'.steps',_0x1141ad(0x274),_0x1141ad(0x207)+_0x354a97+_0x1141ad(0x22c)+_0x2204f4[0x0]['description']+_0x1141ad(0x282),_0x56d095));}for(const _0x4de012 of _0x9e8b2d){if(_0x4de012['type']===_0x1141ad(0x232)&&_0x4de012[_0x1141ad(0x288)]){const _0x2ec020=_0x6162fa[_0x1141ad(0x254)](_0x4de012[_0x1141ad(0x288)]);_0x2ec020?.[_0x1141ad(0x1f7)]==='merge'&&_0x516dbc[_0x1141ad(0x285)](createIssue(_0x1141ad(0x230),_0x5a70e4+_0x1141ad(0x1f1),_0x1141ad(0x1fe),_0x1141ad(0x207)+_0x4de012['name']+_0x1141ad(0x22b)+_0x4de012[_0x1141ad(0x288)]+_0x1141ad(0x1e6),_0x56d095));}}return _0x516dbc;}function a149_0x1968(){const _0x364c34=['stages[','.next','journeys[','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','end','some','487280PJSSsv','MISSING_GOAL','goal','sort','abs','\x27\x20(first\x20defined\x20at\x20steps[','branches','Jump\x20step\x20requires\x20a\x20target','27376YoMEhO','Decision\x20branch\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','MISSING_EXIT_CRITERIA','12YRdAOh','startsWith','error','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','merge','size','set','embeddedSegments','indices','goalIsInherited','journeys,\x20stages,\x20or\x20versions','Step\x20references\x20non-existent\x20step\x20\x27','segments.','MISSING_MILESTONE','code','activations','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','symbol','splice','CONVERGENCE_WITHOUT_MERGE','values','.with.activation','level','1044880KfhZAR','decision_point','issues','map','.milestone','.with.condition.next','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','\x27\x20has\x20only\x20','End\x20step\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','2YOdsLF','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','endsWith','132pwGVGy','.with.condition.timeout','get','journey\x20entry','Stage\x20\x27','\x20with\x20latest:\x20true',').\x20Use\x20a\x20merge\x20step.','replace','condition\x20of\x20\x27','ACTIVATION_SCHEMA_ERROR','.with.condition.segment','Journey\x20has\x20no\x20goal\x20defined','data','variants','MISSING_WAIT_PARAMS','exit_criteria','3030875QMCaYt','branch\x20\x27','path','segments','wait','timeout','steps','stages','milestone','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','launched','document','MISSING_ACTIVATION_DEFINITION','Journey\x20name\x20is\x20required','MISSING_ACTIVATION_REF','MISSING_NAME','versions','MISSING_ENTRY_CRITERIA','SINGLE_INPUT_MERGE','filter','add','.entry_criteria','.segment','9bDobaf','MISSING_STAGES','\x27\x20has\x20no\x20steps','.with','warning','Duplicate\x20step\x20name\x20\x27','includes','2177263ZlNYNI','Journey\x20has\x20',').\x20Merge\x20is\x20unnecessary.','source','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','push','Criteria\x20references\x20undefined\x20segment\x20\x27','.with.branches[','next','has','name','.with.condition.timeout.next','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','referencedSegments','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.target','trim','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20with\x20no\x20action\x20in\x20between','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','entry_criteria','\x27\x20has\x20no\x20exit_criteria\x20defined','A/B\x20test\x20variant\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','activationKeys','Activation\x20step\x20requires\x20an\x20activation\x20reference','length','INVALID_AB_TEST_PERCENTAGES','activation','JOURNEY_SCHEMA_ERROR','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','\x27\x20of\x20\x27','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','version','journeys','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','with','INVALID_JUMP_TARGET','211213uggdOo','reduce','END_STEP_HAS_NEXT_OR_WITH','.steps','join','variant\x20\x27','.with.variants','TOO_MANY_STAGES','description','type','ab_test','skipSchema','FEW_STEPS','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','condition','\x20stages\x20but\x20maximum\x20is\x20','MERGE_TO_MERGE_CHAIN','message','segment','.steps[','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','Journey\x20can\x20have\x20at\x20most\x20one\x20','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','MISSING_SEGMENT_REFERENCE','.rule','Merge\x20step\x20\x27','184317dLcJJB','MISSING_END_STEP','state','keys','excluded','journey','ref:','INVALID_NEXT_REFERENCE','step\x20\x27','safeParse','DUPLICATE_STEP_NAME','\x27\x20has\x20no\x20end\x20step','135xOndiV','stepNames','Embedded\x20segment\x20\x27','INSUFFICIENT_STEPS','BRANCH_DIRECTLY_TO_MERGE','target','entries'];a149_0x1968=function(){return _0x364c34;};return a149_0x1968();}function validateCriteria(_0x599c04,_0xac3ca8,_0x25eda1){const _0x3f9769=a149_0x3263,_0x1db34c=[];return _0x599c04['segment']&&(_0x25eda1[_0x3f9769(0x1d5)]?.[_0x3f9769(0x276)](_0x599c04[_0x3f9769(0x200)]),!_0x599c04['segment'][_0x3f9769(0x22f)](_0x3f9769(0x20e))&&(_0x25eda1[_0x3f9769(0x235)]&&!_0x25eda1[_0x3f9769(0x235)][_0x3f9769(0x289)](_0x599c04[_0x3f9769(0x200)])&&_0x1db34c[_0x3f9769(0x285)](createIssue('error',_0xac3ca8+_0x3f9769(0x278),_0x3f9769(0x205),_0x3f9769(0x286)+_0x599c04[_0x3f9769(0x200)]+'\x27',_0x25eda1)))),_0x1db34c;}function validateEmbeddedSegment(_0x36e4c1,_0x336d59,_0x5a25a6){const _0x328544=a149_0x3263,_0x12ebca=[];return _0x36e4c1['rule']&&_0x12ebca[_0x328544(0x285)](...validateRuleDef(_0x36e4c1['rule'],_0x336d59+_0x328544(0x206),_0x5a25a6)),_0x12ebca;}function validateStage(_0x360469,_0x23bcf1,_0x1a70c4,_0x2af485){const _0x3f7173=a149_0x3263,_0x5e2207=[],_0x395a94='stages['+_0x23bcf1+']',_0x38939b=new Map(),_0x4c7c26=new Map();if(_0x360469[_0x3f7173(0x268)]){for(let _0x3a8930=0x0;_0x3a8930<_0x360469['steps'][_0x3f7173(0x1e2)];_0x3a8930++){const _0x302bf6=_0x360469[_0x3f7173(0x268)][_0x3a8930];_0x302bf6['name']&&_0x38939b[_0x3f7173(0x234)](_0x302bf6['name'],_0x302bf6);}for(let _0x5256d8=0x0;_0x5256d8<_0x360469[_0x3f7173(0x268)]['length'];_0x5256d8++){const _0xab65c1=_0x360469[_0x3f7173(0x268)][_0x5256d8],_0x26247f=_0x395a94+_0x3f7173(0x201)+_0x5256d8+']';if(_0xab65c1[_0x3f7173(0x28a)]){if(_0x4c7c26[_0x3f7173(0x289)](_0xab65c1[_0x3f7173(0x28a)])){const _0x139392=_0x4c7c26['get'](_0xab65c1[_0x3f7173(0x28a)]);_0x5e2207[_0x3f7173(0x285)](createIssue(_0x3f7173(0x230),_0x26247f+'.name',_0x3f7173(0x212),_0x3f7173(0x27e)+_0xab65c1['name']+_0x3f7173(0x226)+_0x139392+'])',_0x2af485));}else _0x4c7c26['set'](_0xab65c1[_0x3f7173(0x28a)],_0x5256d8);}_0x5e2207['push'](...validateStep(_0xab65c1,_0x26247f,_0x2af485,_0x38939b));}}_0x360469['entry_criteria']&&_0x5e2207[_0x3f7173(0x285)](...validateCriteria(_0x360469[_0x3f7173(0x1dc)],_0x395a94+'.entry_criteria',_0x2af485));if(_0x360469[_0x3f7173(0x261)])for(let _0x4fe8e7=0x0;_0x4fe8e7<_0x360469[_0x3f7173(0x261)][_0x3f7173(0x1e2)];_0x4fe8e7++){_0x5e2207[_0x3f7173(0x285)](...validateCriteria(_0x360469[_0x3f7173(0x261)][_0x4fe8e7],_0x395a94+'.exit_criteria['+_0x4fe8e7+']',_0x2af485));}return _0x360469[_0x3f7173(0x26a)]&&_0x5e2207['push'](...validateCriteria(_0x360469[_0x3f7173(0x26a)],_0x395a94+_0x3f7173(0x249),_0x2af485)),_0x5e2207[_0x3f7173(0x285)](...validateStageStructure(_0x360469,_0x23bcf1,_0x1a70c4,_0x2af485)),_0x5e2207[_0x3f7173(0x285)](...validateFlowControl(_0x360469,_0x23bcf1,_0x2af485)),_0x5e2207;}function validateStagesForVersion(_0x538a75,_0x20f12f,_0x2dffb6,_0x524fd0,_0x767fac,_0x4c564a,_0x42fd89){const _0x2c3f2d=a149_0x3263;if(_0x538a75[_0x2c3f2d(0x1e2)]===0x0){_0x767fac['push']({'level':_0x2c3f2d(0x230),'path':_0x524fd0+_0x2c3f2d(0x269),'code':_0x2c3f2d(0x27a),'message':_0x2c3f2d(0x24e),'location':getLocationFromPath(_0x2dffb6[_0x2c3f2d(0x26d)],_0x2dffb6[_0x2c3f2d(0x283)],[_0x2c3f2d(0x269)])});return;}const _0x5d5b6f=new Set();for(const _0x98eaee of _0x538a75){if(_0x98eaee[_0x2c3f2d(0x268)])for(const _0x194e04 of _0x98eaee[_0x2c3f2d(0x268)]){_0x194e04[_0x2c3f2d(0x28a)]&&_0x5d5b6f[_0x2c3f2d(0x276)](_0x194e04[_0x2c3f2d(0x28a)]);}}const _0x484b79={..._0x2dffb6,'stepNames':_0x5d5b6f},_0x15bb17=validateVersionStructure(_0x538a75,_0x484b79);for(const _0x3f1aa1 of _0x15bb17){const _0x56ec06=_0x524fd0?{..._0x3f1aa1,'path':''+_0x524fd0+_0x3f1aa1['path']}:_0x3f1aa1;if(_0x56ec06[_0x2c3f2d(0x244)]==='error')_0x767fac[_0x2c3f2d(0x285)](_0x56ec06);else _0x4c564a[_0x2c3f2d(0x285)](_0x56ec06);}for(let _0x1783b7=0x0;_0x1783b7<_0x538a75[_0x2c3f2d(0x1e2)];_0x1783b7++){const _0x5bfc67=validateStage(_0x538a75[_0x1783b7],_0x1783b7,_0x538a75[_0x2c3f2d(0x1e2)],_0x484b79);for(const _0x103c83 of _0x5bfc67){const _0x2b6646=_0x524fd0?{..._0x103c83,'path':''+_0x524fd0+_0x103c83[_0x2c3f2d(0x264)]}:_0x103c83;if(_0x2b6646[_0x2c3f2d(0x244)]===_0x2c3f2d(0x230))_0x767fac[_0x2c3f2d(0x285)](_0x2b6646);else _0x4c564a['push'](_0x2b6646);}}if(_0x20f12f[_0x2c3f2d(0x223)]){const _0x262283=_0x42fd89?.[_0x2c3f2d(0x237)]?'goal':_0x524fd0+_0x2c3f2d(0x223),_0x2ff36d=validateCriteria(_0x20f12f[_0x2c3f2d(0x223)],_0x262283,_0x484b79);for(const _0x5dc6ce of _0x2ff36d){if(_0x5dc6ce['level']===_0x2c3f2d(0x230))_0x767fac[_0x2c3f2d(0x285)](_0x5dc6ce);else _0x4c564a[_0x2c3f2d(0x285)](_0x5dc6ce);}}}function extractVersionIndex(_0x127fc8){const _0x54381b=_0x127fc8['match'](/^journeys\[(\d+)\]\./);return _0x54381b?_0x54381b[0x1]:undefined;}function deduplicateAcrossVersions(_0x3f43d4){const _0x4dccdf=a149_0x3263,_0x5ce3d3=new Map();for(let _0x38c3ed=0x0;_0x38c3ed<_0x3f43d4[_0x4dccdf(0x1e2)];_0x38c3ed++){const _0x488551=_0x3f43d4[_0x38c3ed][_0x4dccdf(0x23c)]+':'+_0x3f43d4[_0x38c3ed][_0x4dccdf(0x1ff)],_0x4055b1=extractVersionIndex(_0x3f43d4[_0x38c3ed][_0x4dccdf(0x264)]),_0x20c371=_0x5ce3d3[_0x4dccdf(0x254)](_0x488551);if(_0x20c371){_0x20c371[_0x4dccdf(0x236)][_0x4dccdf(0x285)](_0x38c3ed);if(_0x4055b1)_0x20c371['versions'][_0x4dccdf(0x276)](_0x4055b1);}else _0x5ce3d3['set'](_0x488551,{'indices':[_0x38c3ed],'versions':new Set(_0x4055b1?[_0x4055b1]:[])});}const _0xf19cec=new Set();for(const {indices:_0x2935f8,versions:_0x22b000}of _0x5ce3d3[_0x4dccdf(0x242)]()){if(_0x22b000['size']<=0x1)continue;const _0x355ee5=_0x3f43d4[_0x2935f8[0x0]];_0x355ee5[_0x4dccdf(0x264)]=_0x355ee5[_0x4dccdf(0x264)][_0x4dccdf(0x259)](/^journeys\[\d+\]\./,''),_0x355ee5[_0x4dccdf(0x1ff)]=_0x355ee5['message']+'\x20(across\x20'+_0x22b000[_0x4dccdf(0x233)]+'\x20versions)';for(let _0x1dbb15=0x1;_0x1dbb15<_0x2935f8[_0x4dccdf(0x1e2)];_0x1dbb15++){_0xf19cec[_0x4dccdf(0x276)](_0x2935f8[_0x1dbb15]);}}const _0x5db863=[..._0xf19cec][_0x4dccdf(0x224)]((_0x86a8ad,_0x444211)=>_0x444211-_0x86a8ad);for(const _0x2c30e5 of _0x5db863){_0x3f43d4[_0x4dccdf(0x240)](_0x2c30e5,0x1);}}export function validateJourneyDef(_0x59e7b6,_0x5384ff={},_0x594707={}){const _0x1efc95=a149_0x3263;if(_0x594707[_0x1efc95(0x1f9)])return runJourneySemanticChecks(_0x59e7b6,_0x5384ff);const _0x1b4122=JourneyDefSchema[_0x1efc95(0x211)](_0x59e7b6);if(_0x1b4122['success'])return runJourneySemanticChecks(_0x1b4122[_0x1efc95(0x25e)],_0x5384ff);return zodErrorsToJourneyValidationResult(_0x1b4122[_0x1efc95(0x230)],_0x5384ff);}function zodErrorsToJourneyValidationResult(_0x23d477,_0x2766d8){const _0x3197d8=a149_0x3263,_0x521d40=flattenZodIssues(_0x23d477[_0x3197d8(0x247)]),_0x587100=_0x521d40[_0x3197d8(0x248)](_0xfd5cf4=>{const _0x52538f=_0x3197d8,_0x331c77=formatZodPath(_0xfd5cf4[_0x52538f(0x264)]),_0x24bfc6=mapJourneyZodIssueToCode(_0xfd5cf4,_0x331c77),_0x5a71e8=getLocationFromPath(_0x2766d8[_0x52538f(0x26d)],_0x2766d8['source'],_0xfd5cf4[_0x52538f(0x264)][_0x52538f(0x248)](_0xbbc0fe=>typeof _0xbbc0fe===_0x52538f(0x23f)?String(_0xbbc0fe):_0xbbc0fe));return{'level':'error','path':_0x331c77,'code':_0x24bfc6,'message':_0xfd5cf4[_0x52538f(0x1ff)],..._0x5a71e8&&{'location':_0x5a71e8}};});return{'valid':![],'errors':_0x587100,'warnings':[]};}function mapJourneyZodIssueToCode(_0x5af97f,_0x40b100){const _0x4f8705=a149_0x3263;if(_0x40b100===_0x4f8705(0x28a))return'MISSING_NAME';if(_0x40b100['endsWith']('.type')&&_0x40b100[_0x4f8705(0x27f)](_0x4f8705(0x268)))return _0x4f8705(0x1e5);if(_0x40b100===_0x4f8705(0x269)||_0x40b100[_0x4f8705(0x251)]('.stages'))return'MISSING_STAGES';if(_0x40b100===''&&_0x5af97f[_0x4f8705(0x1ff)][_0x4f8705(0x27f)](_0x4f8705(0x238)))return _0x4f8705(0x27a);if(_0x40b100[_0x4f8705(0x27f)](_0x4f8705(0x1e4)))return _0x4f8705(0x25b);return _0x4f8705(0x1e5);}function runJourneySemanticChecks(_0x17614e,_0x2588cb){const _0xfd02f8=a149_0x3263,_0xb1077=[],_0x2bbeb2=[];(!_0x17614e['name']||_0x17614e[_0xfd02f8(0x28a)][_0xfd02f8(0x1d8)]()==='')&&_0xb1077[_0xfd02f8(0x285)]({'level':_0xfd02f8(0x230),'path':'name','code':_0xfd02f8(0x271),'message':_0xfd02f8(0x26f),'location':getLocationFromPath(_0x2588cb[_0xfd02f8(0x26d)],_0x2588cb['source'],[_0xfd02f8(0x28a)])});const _0x3a2d7c=new Set();if(_0x17614e[_0xfd02f8(0x265)])for(const _0x48b4f6 of Object[_0xfd02f8(0x20b)](_0x17614e['segments'])){_0x3a2d7c['add'](_0x48b4f6);}const _0x522275=new Set();if(_0x17614e[_0xfd02f8(0x23d)])for(const _0x3907f1 of Object[_0xfd02f8(0x20b)](_0x17614e[_0xfd02f8(0x23d)])){_0x522275[_0xfd02f8(0x276)](_0x3907f1);}const _0xcbdfc0=new Set(),_0x322275={..._0x2588cb,'embeddedSegments':_0x3a2d7c,'referencedSegments':_0xcbdfc0,'activationKeys':_0x522275[_0xfd02f8(0x233)]>0x0?_0x522275:undefined};if(_0x17614e['segments'])for(const [_0xf8a7ee,_0x350d07]of Object[_0xfd02f8(0x21a)](_0x17614e[_0xfd02f8(0x265)])){const _0xecdfb6=validateEmbeddedSegment(_0x350d07,_0xfd02f8(0x23a)+_0xf8a7ee,_0x322275);for(const _0x2c122a of _0xecdfb6){if(_0x2c122a[_0xfd02f8(0x244)]===_0xfd02f8(0x230))_0xb1077[_0xfd02f8(0x285)](_0x2c122a);else _0x2bbeb2[_0xfd02f8(0x285)](_0x2c122a);}}const _0x3bd80d=!!_0x17614e[_0xfd02f8(0x223)],_0x30151f=_0x17614e['journeys']?.['every'](_0x232a02=>!!_0x232a02[_0xfd02f8(0x223)])??![];!_0x3bd80d&&!_0x30151f&&_0x2bbeb2[_0xfd02f8(0x285)]({'level':'warning','path':_0xfd02f8(0x223),'code':_0xfd02f8(0x222),'message':_0xfd02f8(0x25d),'location':getLocationFromPath(_0x2588cb[_0xfd02f8(0x26d)],_0x2588cb[_0xfd02f8(0x283)],['goal'])});const _0x502a1c=_0x17614e[_0xfd02f8(0x1ea)]??_0x17614e[_0xfd02f8(0x272)];if(_0x502a1c&&_0x502a1c[_0xfd02f8(0x275)](_0x601193=>_0x601193['latest']===!![])['length']>0x1){const _0x5834ca=_0x17614e[_0xfd02f8(0x1ea)]?_0xfd02f8(0x1ea):_0xfd02f8(0x272);_0xb1077[_0xfd02f8(0x285)]({'level':_0xfd02f8(0x230),'path':_0x5834ca,'code':'DUPLICATE_LATEST','message':_0xfd02f8(0x203)+(_0x5834ca===_0xfd02f8(0x1ea)?_0xfd02f8(0x255):_0xfd02f8(0x1e9))+_0xfd02f8(0x257),'location':getLocationFromPath(_0x2588cb['document'],_0x2588cb['source'],[_0x5834ca])});}if(_0x17614e[_0xfd02f8(0x1ea)]&&_0x17614e[_0xfd02f8(0x1ea)][_0xfd02f8(0x1e2)]>0x0)for(let _0x596e53=0x0;_0x596e53<_0x17614e[_0xfd02f8(0x1ea)][_0xfd02f8(0x1e2)];_0x596e53++){const _0x4f5b33=_0x17614e[_0xfd02f8(0x1ea)][_0x596e53];if(_0x17614e[_0xfd02f8(0x1ea)]['length']>0x1&&_0x4f5b33[_0xfd02f8(0x20a)]===_0xfd02f8(0x26c))continue;const _0x9a9dd1=_0x4f5b33[_0xfd02f8(0x269)]||[],_0x110d27=_0xfd02f8(0x21d)+_0x596e53+'].',_0x322b99=!!_0x4f5b33[_0xfd02f8(0x223)],_0x330968=_0x322b99?{..._0x17614e,'goal':_0x4f5b33[_0xfd02f8(0x223)]}:_0x17614e;validateStagesForVersion(_0x9a9dd1,_0x330968,_0x322275,_0x110d27,_0xb1077,_0x2bbeb2,{'goalIsInherited':!_0x322b99});}else{if(_0x17614e[_0xfd02f8(0x272)]&&_0x17614e[_0xfd02f8(0x272)][_0xfd02f8(0x1e2)]>0x0)for(let _0x56543a=0x0;_0x56543a<_0x17614e[_0xfd02f8(0x272)][_0xfd02f8(0x1e2)];_0x56543a++){const _0x25ec67=_0x17614e['versions'][_0x56543a];if(_0x17614e[_0xfd02f8(0x272)][_0xfd02f8(0x1e2)]>0x1&&_0x25ec67['state']===_0xfd02f8(0x26c))continue;const _0x342dae=_0x25ec67[_0xfd02f8(0x269)]||[],_0x380f59='versions['+_0x56543a+'].';validateStagesForVersion(_0x342dae,_0x17614e,_0x322275,_0x380f59,_0xb1077,_0x2bbeb2);}else{const _0x287340=_0x17614e[_0xfd02f8(0x269)]||[];validateStagesForVersion(_0x287340,_0x17614e,_0x322275,'',_0xb1077,_0x2bbeb2);}}_0x17614e[_0xfd02f8(0x1ea)]&&_0x17614e[_0xfd02f8(0x1ea)][_0xfd02f8(0x1e2)]>0x1&&(deduplicateAcrossVersions(_0xb1077),deduplicateAcrossVersions(_0x2bbeb2));for(const _0x274e60 of _0x3a2d7c){!_0xcbdfc0['has'](_0x274e60)&&!_0x274e60[_0xfd02f8(0x22f)]('excluded_')&&_0x2bbeb2[_0xfd02f8(0x285)]({'level':'warning','path':_0xfd02f8(0x23a)+_0x274e60,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0xfd02f8(0x216)+_0x274e60+_0xfd02f8(0x1d4),'location':getLocationFromPath(_0x2588cb[_0xfd02f8(0x26d)],_0x2588cb[_0xfd02f8(0x283)],[_0xfd02f8(0x265),_0x274e60])});}return{'valid':_0xb1077['length']===0x0,'errors':_0xb1077,'warnings':_0x2bbeb2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2af8a4,_0x122b6e){const _0x2fafc6=a150_0x43fb,_0x4e493d=_0x2af8a4();while(!![]){try{const _0x7fbd60=-parseInt(_0x2fafc6(0x20a))/0x1*(-parseInt(_0x2fafc6(0x20e))/0x2)+parseInt(_0x2fafc6(0x185))/0x3+-parseInt(_0x2fafc6(0x1f8))/0x4+-parseInt(_0x2fafc6(0x205))/0x5*(parseInt(_0x2fafc6(0x20b))/0x6)+-parseInt(_0x2fafc6(0x16a))/0x7*(-parseInt(_0x2fafc6(0x1e5))/0x8)+-parseInt(_0x2fafc6(0x19e))/0x9+parseInt(_0x2fafc6(0x15f))/0xa*(parseInt(_0x2fafc6(0x19a))/0xb);if(_0x7fbd60===_0x122b6e)break;else _0x4e493d['push'](_0x4e493d['shift']());}catch(_0x2c8a98){_0x4e493d['push'](_0x4e493d['shift']());}}}(a150_0x54da,0xbc25d));import*as a150_0xd81d27 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x13dee1){const _0x40e8f5=a150_0x43fb,_0x1bd920=_0x13dee1[_0x40e8f5(0x1a3)]();if(_0x1bd920===_0x40e8f5(0x19f)||_0x1bd920===_0x40e8f5(0x203))return _0x40e8f5(0x203);if(_0x1bd920==='weeks'||_0x1bd920===_0x40e8f5(0x16e))return _0x40e8f5(0x16e);return _0x13dee1;}export function journeyResponseToDefSync(_0x2050f3){const _0x5df6ab=a150_0x43fb,_0x4913ac=_0x2050f3['attributes'],_0x416893=_0x4913ac[_0x5df6ab(0x208)]||_0x4913ac[_0x5df6ab(0x15e)],_0xd46591={'stages':_0x4913ac[_0x5df6ab(0x1df)][_0x5df6ab(0x182)](convertApiStageToYaml),'id':_0x2050f3['id']};_0x4913ac[_0x5df6ab(0x16c)]&&(_0xd46591[_0x5df6ab(0x16c)]=convertApiCriteriaToYaml(_0x4913ac[_0x5df6ab(0x16c)]));_0x4913ac[_0x5df6ab(0x15e)]&&_0x4913ac[_0x5df6ab(0x15e)]!==_0x416893&&(_0xd46591[_0x5df6ab(0x1ff)]=_0x4913ac[_0x5df6ab(0x15e)]);_0x4913ac[_0x5df6ab(0x1e6)]!==undefined&&(_0xd46591['version_number']=_0x4913ac['versionNumber']);_0x4913ac[_0x5df6ab(0x17f)]&&(_0xd46591[_0x5df6ab(0x17f)]=_0x4913ac['state']===_0x5df6ab(0x1c6)?_0x5df6ab(0x1c6):_0x5df6ab(0x181));const _0x31a231={'type':_0x5df6ab(0x1b3),'name':_0x416893,'journeys':[_0xd46591]};_0x4913ac[_0x5df6ab(0x1fb)]&&(_0x31a231[_0x5df6ab(0x1fb)]=_0x4913ac[_0x5df6ab(0x1fb)]);_0x4913ac[_0x5df6ab(0x16c)]&&(_0x31a231[_0x5df6ab(0x16c)]=convertApiCriteriaToYaml(_0x4913ac['goal']));if(_0x4913ac[_0x5df6ab(0x1ba)])_0x31a231[_0x5df6ab(0x1d1)]=_0x4913ac[_0x5df6ab(0x1ba)];else _0x4913ac[_0x5df6ab(0x1f0)]!==undefined&&(_0x31a231[_0x5df6ab(0x1d1)]=_0x4913ac[_0x5df6ab(0x1f0)]?_0x5df6ab(0x169):_0x5df6ab(0x1b4));return _0x4913ac['journeyBundleId']&&(_0x31a231['bundle_id']=_0x4913ac['journeyBundleId']),_0x4913ac['journeyBundleName']&&(_0x31a231[_0x5df6ab(0x210)]=_0x4913ac['journeyBundleName']),_0x2050f3[_0x5df6ab(0x209)]?.[_0x5df6ab(0x1fc)]?.['data']?.['id']&&(_0x31a231[_0x5df6ab(0x216)]=_0x2050f3[_0x5df6ab(0x209)][_0x5df6ab(0x1fc)]['data']['id']),_0x31a231;}export async function journeyResponseToDef(_0x53c802,_0x4c25dc){const _0x471e14=a150_0x43fb,_0x1bd2f3=journeyResponseToDefSync(_0x53c802);if(!_0x4c25dc)return _0x1bd2f3;const _0x196d68=new Set();collectSegmentIdsFromJourney(_0x1bd2f3,_0x196d68);const _0x4ede8c=new Set();collectActivationIdsFromJourney(_0x1bd2f3,_0x4ede8c);const _0x23f46d={},_0x1dca85=new Map();for(const _0x214a21 of Array[_0x471e14(0x18f)](_0x196d68)[_0x471e14(0x219)]()){if(_0x4c25dc[_0x471e14(0x1b9)]){const _0x35cbcf=await _0x4c25dc['resolveSegment'](_0x214a21);if(_0x35cbcf[_0x471e14(0x1f9)]){_0x1dca85[_0x471e14(0x1c1)](_0x214a21,_0x35cbcf[_0x471e14(0x15e)]);if(_0x35cbcf['definition']){const _0x1a5553={..._0x35cbcf[_0x471e14(0x162)],'rule':deepSortObject(_0x35cbcf[_0x471e14(0x162)][_0x471e14(0x17b)])};_0x23f46d[_0x35cbcf['name']]=_0x1a5553;}}else _0x1dca85[_0x471e14(0x1c1)](_0x214a21,makeSegmentRef(_0x35cbcf[_0x471e14(0x15e)]));}else{if(_0x4c25dc['resolveSegmentName']){const _0x636f28=await _0x4c25dc[_0x471e14(0x1a4)](_0x214a21);_0x1dca85[_0x471e14(0x1c1)](_0x214a21,_0x636f28);}}}const _0x26adcd={},_0x2bd971=new Map();for(const _0x2e9df7 of Array[_0x471e14(0x18f)](_0x4ede8c)['sort']()){if(_0x4c25dc[_0x471e14(0x1cd)]){const _0x29addd=await _0x4c25dc[_0x471e14(0x1cd)](_0x2e9df7);_0x29addd['isJourneyLocal']?(_0x2bd971['set'](_0x2e9df7,_0x29addd[_0x471e14(0x15e)]),_0x29addd[_0x471e14(0x162)]&&(_0x26adcd[_0x29addd[_0x471e14(0x15e)]]=_0x29addd[_0x471e14(0x162)])):_0x2bd971[_0x471e14(0x1c1)](_0x2e9df7,makeSegmentRef(_0x29addd[_0x471e14(0x15e)]));}else{if(_0x4c25dc[_0x471e14(0x1b5)]){const _0x1798bf=await _0x4c25dc[_0x471e14(0x1b5)](_0x2e9df7);_0x2bd971[_0x471e14(0x1c1)](_0x2e9df7,_0x1798bf);}}}_0x1dca85[_0x471e14(0x206)]>0x0&&replaceSegmentIdsInJourney(_0x1bd2f3,_0x1dca85);_0x2bd971['size']>0x0&&replaceActivationIdsInJourney(_0x1bd2f3,_0x2bd971);if(_0x4c25dc[_0x471e14(0x189)]){const _0x3e31ab=[];collectJumpTargetsFromJourney(_0x1bd2f3,_0x3e31ab);if(_0x3e31ab['length']>0x0){const _0x212588=new Map();for(const _0x53cd14 of _0x3e31ab){try{const _0x37c196=await _0x4c25dc[_0x471e14(0x189)](_0x53cd14[_0x471e14(0x20c)],_0x53cd14['stageId']);_0x212588[_0x471e14(0x1c1)](_0x53cd14['journeyId']+':'+_0x53cd14[_0x471e14(0x1ea)],_0x37c196);}catch{}}_0x212588[_0x471e14(0x206)]>0x0&&replaceJumpTargetsInJourney(_0x1bd2f3,_0x212588);}}return Object[_0x471e14(0x1ce)](_0x23f46d)['length']>0x0&&(_0x1bd2f3[_0x471e14(0x1c3)]=_0x23f46d),Object[_0x471e14(0x1ce)](_0x26adcd)[_0x471e14(0x196)]>0x0&&(_0x1bd2f3['activations']=_0x26adcd),_0x1bd2f3;}function collectSegmentIdsFromJourney(_0x31d8c9,_0xa644bc){const _0x1093fa=a150_0x43fb;_0x31d8c9[_0x1093fa(0x16c)]?.['segment']&&_0xa644bc[_0x1093fa(0x161)](_0x31d8c9[_0x1093fa(0x16c)][_0x1093fa(0x1c0)]);const _0x4cd7e4=_0xd7d213=>{const _0x3668b0=_0x1093fa;for(const _0x525d56 of _0xd7d213){_0x525d56['entry_criteria']?.[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x525d56[_0x3668b0(0x1ad)]['segment']);if(_0x525d56['exit_criteria'])for(const _0x1621f0 of _0x525d56[_0x3668b0(0x1af)]){_0x1621f0[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x1621f0[_0x3668b0(0x1c0)]);}_0x525d56[_0x3668b0(0x1a2)]?.[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x525d56['milestone'][_0x3668b0(0x1c0)]);if(_0x525d56['steps'])for(const _0x860d74 of _0x525d56[_0x3668b0(0x186)]){if(_0x860d74[_0x3668b0(0x213)]===_0x3668b0(0x17c)){const _0x1481f9=_0x860d74;for(const _0x3f0691 of _0x1481f9[_0x3668b0(0x1c5)][_0x3668b0(0x1a5)]){_0x3f0691[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x3f0691[_0x3668b0(0x1c0)]);}}else{if(_0x860d74[_0x3668b0(0x213)]===_0x3668b0(0x20f)){const _0x59cdd3=_0x860d74;_0x59cdd3[_0x3668b0(0x1c5)][_0x3668b0(0x1a9)]?.[_0x3668b0(0x1c0)]&&_0xa644bc[_0x3668b0(0x161)](_0x59cdd3[_0x3668b0(0x1c5)][_0x3668b0(0x1a9)][_0x3668b0(0x1c0)]);}}}}};if(_0x31d8c9[_0x1093fa(0x1bc)])for(const _0x20b4e7 of _0x31d8c9['journeys']){_0x20b4e7['goal']?.['segment']&&_0xa644bc[_0x1093fa(0x161)](_0x20b4e7[_0x1093fa(0x16c)][_0x1093fa(0x1c0)]),_0x4cd7e4(_0x20b4e7['stages']);}_0x31d8c9[_0x1093fa(0x1d4)]&&_0x4cd7e4(_0x31d8c9['stages']);if(_0x31d8c9[_0x1093fa(0x1de)])for(const _0x36167d of _0x31d8c9[_0x1093fa(0x1de)]){_0x4cd7e4(_0x36167d[_0x1093fa(0x1d4)]);}}function a150_0x54da(){const _0x474415=['journeyActivationStepId','segments','unit','with','launched','unique_id','resolveActivationId','trim','behavior','schedule','variants','resolveActivation','keys','journeyStageId','wait_until','reentry','duration','entries','stages','segments:','null','end','isArray','uuid','attributes','merge','Entry\x20Criteria','all','versions','journeyStages','journeys:','next','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','conditions','bundle_id','56bRGmZp','versionNumber','Jump','percentage','JOURNEY_SYNTAX_ERROR','stageId','excluded','target','\x20\x20\x20\x20type:\x20And\x0a','find','Wait\x201\x20Day','allowReentry','WaitStep','resolveStageId','ab_test','exitCriteria','Duration','excludedPath','match','5679392XsYUyB','isJourneyLocal','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','description','parentFolder','\x20\x20\x20\x20conditions:\x0a','activations:','version','segmentId','all_columns','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','day','reentry:','108425KBgapR','size','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','journeyBundleName','relationships','145698SZlWgI','366UOrsya','journeyId','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','6muECJg','wait','bundle_name','Journey\x20description','goal-segment','type','timedOutPath','conditionSegmentId','folder_id','daysOfWeek','includes','sort','object','Condition','has','test','Goal\x20Achieved','randomUUID','moveAfter','Composite','name','10zYfsaH','ABTest','add','definition','DaysOfTheWeek','stage','activation_template_id','DecisionPoint','notification','\x27:\x20','reentry_always','198359ZBVuMx','entryCriteria','goal','customized_split','week','customizedSplit','journeyBundleId','exitCriterias','jump','version_number','latest','activations','*Max\x20wait\x20','resolveEmbeddedSegmentId','root_step','waitStepType','waitUntilDate','rule','decision_point','waitStep','conditionTimeoutUnit','state','embedded','draft','map','startsWith','filter','3335286hTnDvm','steps','uniqueId','stageName','resolveJumpTarget','journeyName','Met\x20condition(s)','connector_config','waitCondition','waitStepUnit','from','rootStep','Send\x20Notification','days_of_week','resolveEmbeddedActivationId','\x20\x20\x20\x20type:\x20','conditionTimeoutDuration','length','values','Unknown\x20segment\x20\x22','AbTest','33925639iTJBQC','Stage\x201','Activation','ref','11862702InRTQR','days','And','columns','milestone','toLowerCase','resolveSegmentName','branches','Date','\x20\x20rule:\x0a','push','condition','resolveJourneyId','Variant','activation','entry_criteria','resolveSegmentId','exit_criteria','segment_id','stringify','get','journey','no_reentry','resolveActivationName','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','timeout','Merge','resolveSegment','reentryMode','slice','journeys','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','Expected\x20format:\x0a','End','segment','set'];a150_0x54da=function(){return _0x474415;};return a150_0x54da();}function replaceSegmentIdsInJourney(_0x2039f7,_0x1c885d){const _0x274e75=a150_0x43fb,_0x43d99b=_0x443d80=>_0x1c885d[_0x274e75(0x1b2)](_0x443d80)||_0x443d80;_0x2039f7['goal']?.['segment']&&(_0x2039f7[_0x274e75(0x16c)][_0x274e75(0x1c0)]=_0x43d99b(_0x2039f7[_0x274e75(0x16c)][_0x274e75(0x1c0)]));const _0x210c54=_0x147e86=>{const _0x39ec43=_0x274e75;for(const _0x3b6114 of _0x147e86){_0x3b6114[_0x39ec43(0x1ad)]?.['segment']&&(_0x3b6114[_0x39ec43(0x1ad)][_0x39ec43(0x1c0)]=_0x43d99b(_0x3b6114['entry_criteria'][_0x39ec43(0x1c0)]));if(_0x3b6114['exit_criteria'])for(const _0x4d26ea of _0x3b6114[_0x39ec43(0x1af)]){_0x4d26ea[_0x39ec43(0x1c0)]&&(_0x4d26ea[_0x39ec43(0x1c0)]=_0x43d99b(_0x4d26ea['segment']));}_0x3b6114['milestone']?.[_0x39ec43(0x1c0)]&&(_0x3b6114[_0x39ec43(0x1a2)][_0x39ec43(0x1c0)]=_0x43d99b(_0x3b6114[_0x39ec43(0x1a2)][_0x39ec43(0x1c0)]));if(_0x3b6114[_0x39ec43(0x186)])for(const _0x247001 of _0x3b6114['steps']){if(_0x247001[_0x39ec43(0x213)]===_0x39ec43(0x17c)){const _0x46962e=_0x247001;for(const _0x3dea40 of _0x46962e['with']['branches']){_0x3dea40[_0x39ec43(0x1c0)]&&(_0x3dea40[_0x39ec43(0x1c0)]=_0x43d99b(_0x3dea40[_0x39ec43(0x1c0)]));}}else{if(_0x247001['type']==='wait'){const _0x569bfa=_0x247001;_0x569bfa[_0x39ec43(0x1c5)][_0x39ec43(0x1a9)]?.[_0x39ec43(0x1c0)]&&(_0x569bfa[_0x39ec43(0x1c5)][_0x39ec43(0x1a9)][_0x39ec43(0x1c0)]=_0x43d99b(_0x569bfa[_0x39ec43(0x1c5)][_0x39ec43(0x1a9)][_0x39ec43(0x1c0)]));}}}}};if(_0x2039f7[_0x274e75(0x1bc)])for(const _0x5030d6 of _0x2039f7[_0x274e75(0x1bc)]){_0x5030d6[_0x274e75(0x16c)]?.[_0x274e75(0x1c0)]&&(_0x5030d6[_0x274e75(0x16c)][_0x274e75(0x1c0)]=_0x43d99b(_0x5030d6['goal']['segment'])),_0x210c54(_0x5030d6['stages']);}_0x2039f7['stages']&&_0x210c54(_0x2039f7[_0x274e75(0x1d4)]);if(_0x2039f7[_0x274e75(0x1de)])for(const _0x5c3292 of _0x2039f7[_0x274e75(0x1de)]){_0x210c54(_0x5c3292['stages']);}}function collectActivationIdsFromJourney(_0x2595d3,_0x910b8b){const _0x49148a=a150_0x43fb,_0x35ad24=_0x1f1eb0=>{const _0x2fe264=a150_0x43fb;for(const _0x5d4c0f of _0x1f1eb0){if(_0x5d4c0f[_0x2fe264(0x186)])for(const _0x567d37 of _0x5d4c0f[_0x2fe264(0x186)]){if(_0x567d37[_0x2fe264(0x213)]===_0x2fe264(0x1ac)){const _0x251523=_0x567d37;_0x251523[_0x2fe264(0x1c5)][_0x2fe264(0x1ac)]&&/^\d+$/['test'](_0x251523[_0x2fe264(0x1c5)][_0x2fe264(0x1ac)])&&_0x910b8b[_0x2fe264(0x161)](_0x251523[_0x2fe264(0x1c5)][_0x2fe264(0x1ac)]);}}}};if(_0x2595d3[_0x49148a(0x1bc)])for(const _0x49a446 of _0x2595d3[_0x49148a(0x1bc)]){_0x35ad24(_0x49a446['stages']);}_0x2595d3['stages']&&_0x35ad24(_0x2595d3['stages']);if(_0x2595d3[_0x49148a(0x1de)])for(const _0x1668e6 of _0x2595d3[_0x49148a(0x1de)]){_0x35ad24(_0x1668e6[_0x49148a(0x1d4)]);}}function replaceActivationIdsInJourney(_0x5cb14d,_0x32e0db){const _0x234b48=a150_0x43fb,_0x1d25fd=_0x4e9ed0=>_0x32e0db['get'](_0x4e9ed0)||_0x4e9ed0,_0x5d129b=_0xbe130f=>{const _0x431114=a150_0x43fb;for(const _0x1b25a5 of _0xbe130f){if(_0x1b25a5[_0x431114(0x186)])for(const _0x150e6d of _0x1b25a5['steps']){if(_0x150e6d[_0x431114(0x213)]===_0x431114(0x1ac)){const _0x3def5d=_0x150e6d;_0x3def5d['with'][_0x431114(0x1ac)]&&(_0x3def5d[_0x431114(0x1c5)][_0x431114(0x1ac)]=_0x1d25fd(_0x3def5d[_0x431114(0x1c5)][_0x431114(0x1ac)]));}}}};if(_0x5cb14d[_0x234b48(0x1bc)])for(const _0x383760 of _0x5cb14d[_0x234b48(0x1bc)]){_0x5d129b(_0x383760[_0x234b48(0x1d4)]);}_0x5cb14d[_0x234b48(0x1d4)]&&_0x5d129b(_0x5cb14d[_0x234b48(0x1d4)]);if(_0x5cb14d[_0x234b48(0x1de)])for(const _0x3edbda of _0x5cb14d[_0x234b48(0x1de)]){_0x5d129b(_0x3edbda[_0x234b48(0x1d4)]);}}function collectJumpTargetsFromJourney(_0x99e308,_0x33afde){const _0x29e173=a150_0x43fb,_0x3adaa3=new Set(),_0x26e2fa=_0x42fd45=>{const _0x3f16b5=a150_0x43fb;for(const _0x10fce6 of _0x42fd45){if(_0x10fce6[_0x3f16b5(0x186)])for(const _0x519ff5 of _0x10fce6['steps']){if(_0x519ff5[_0x3f16b5(0x213)]==='jump'){const _0x48555f=_0x519ff5,_0x457537=_0x48555f['with'][_0x3f16b5(0x1ec)];if(_0x457537[_0x3f16b5(0x1b3)]&&_0x457537[_0x3f16b5(0x164)]&&/^\d+$/[_0x3f16b5(0x21d)](_0x457537[_0x3f16b5(0x1b3)])&&/^\d+$/[_0x3f16b5(0x21d)](_0x457537[_0x3f16b5(0x164)])){const _0x33a5cf=_0x457537[_0x3f16b5(0x1b3)]+':'+_0x457537[_0x3f16b5(0x164)];!_0x3adaa3[_0x3f16b5(0x21c)](_0x33a5cf)&&(_0x3adaa3['add'](_0x33a5cf),_0x33afde[_0x3f16b5(0x1a8)]({'journeyId':_0x457537['journey'],'stageId':_0x457537['stage']}));}}}}};if(_0x99e308[_0x29e173(0x1bc)])for(const _0x32b073 of _0x99e308[_0x29e173(0x1bc)]){_0x26e2fa(_0x32b073[_0x29e173(0x1d4)]);}_0x99e308[_0x29e173(0x1d4)]&&_0x26e2fa(_0x99e308[_0x29e173(0x1d4)]);if(_0x99e308[_0x29e173(0x1de)])for(const _0x26d24c of _0x99e308['versions']){_0x26e2fa(_0x26d24c[_0x29e173(0x1d4)]);}}function replaceJumpTargetsInJourney(_0x334149,_0x16878){const _0x4449a4=a150_0x43fb,_0x101ca7=_0x20e3c0=>{const _0x53f8d1=a150_0x43fb;for(const _0x33e2dc of _0x20e3c0){if(_0x33e2dc['steps'])for(const _0x76dd54 of _0x33e2dc[_0x53f8d1(0x186)]){if(_0x76dd54['type']==='jump'){const _0x4ced21=_0x76dd54,_0x553509=_0x4ced21[_0x53f8d1(0x1c5)][_0x53f8d1(0x1ec)],_0x55dbea=_0x553509[_0x53f8d1(0x1b3)]+':'+_0x553509['stage'],_0x4687a0=_0x16878['get'](_0x55dbea);_0x4687a0&&(_0x553509[_0x53f8d1(0x1b3)]=_0x4687a0[_0x53f8d1(0x18a)],_0x553509['stage']=_0x4687a0[_0x53f8d1(0x188)]);}}}};if(_0x334149[_0x4449a4(0x1bc)])for(const _0x4750d0 of _0x334149[_0x4449a4(0x1bc)]){_0x101ca7(_0x4750d0['stages']);}_0x334149[_0x4449a4(0x1d4)]&&_0x101ca7(_0x334149[_0x4449a4(0x1d4)]);if(_0x334149[_0x4449a4(0x1de)])for(const _0x52a010 of _0x334149[_0x4449a4(0x1de)]){_0x101ca7(_0x52a010[_0x4449a4(0x1d4)]);}}function generateReadableStepName(_0x20e9cf,_0x49a0c3){const _0x2cdca5=a150_0x43fb;if(_0x20e9cf[_0x2cdca5(0x15e)]&&_0x20e9cf['name']!==_0x20e9cf[_0x2cdca5(0x213)]){const _0xc513eb=_0x20e9cf[_0x2cdca5(0x15e)][_0x2cdca5(0x1c9)]();if(_0xc513eb&&/[a-z0-9\p{L}]/iu[_0x2cdca5(0x21d)](_0xc513eb))return _0xc513eb;}const _0x1ad19a=_0x20e9cf[_0x2cdca5(0x213)]['toLowerCase']()['replace'](/step$/i,'');return _0x1ad19a+'_'+(_0x49a0c3+0x1);}function getStepNextRefs(_0x2d66d5){const _0x4da12a=a150_0x43fb,_0x30f049=[];if(_0x2d66d5[_0x4da12a(0x1e1)])_0x30f049[_0x4da12a(0x1a8)](_0x2d66d5[_0x4da12a(0x1e1)]);if(_0x2d66d5['branches'])for(const _0x2a4639 of _0x2d66d5[_0x4da12a(0x1a5)]){if(_0x2a4639['next'])_0x30f049[_0x4da12a(0x1a8)](_0x2a4639[_0x4da12a(0x1e1)]);}if(_0x2d66d5[_0x4da12a(0x1cc)])for(const _0x439cdf of _0x2d66d5[_0x4da12a(0x1cc)]){if(_0x439cdf['next'])_0x30f049[_0x4da12a(0x1a8)](_0x439cdf[_0x4da12a(0x1e1)]);}if(_0x2d66d5[_0x4da12a(0x1e3)])for(const _0x435acd of _0x2d66d5['conditions']){if(_0x435acd[_0x4da12a(0x1e1)])_0x30f049[_0x4da12a(0x1a8)](_0x435acd[_0x4da12a(0x1e1)]);}return _0x30f049;}function parseJumpTargetDisplayName(_0x4909d2){const _0x1469e6=a150_0x43fb,_0xe20a2d=_0x4909d2[_0x1469e6(0x1f7)](/^(.+?)\s*\(([^/)]+)/);if(!_0xe20a2d)return undefined;const _0x2bb389=_0xe20a2d[0x1][_0x1469e6(0x1c9)](),_0xd351fc=_0xe20a2d[0x2][_0x1469e6(0x1c9)]();if(!_0x2bb389||!_0xd351fc)return undefined;return{'stageName':_0x2bb389,'journeyName':_0xd351fc};}function orderStepsFromRoot(_0x3fc439,_0x415d18){const _0x50208e=a150_0x43fb,_0x6e06a3=Object[_0x50208e(0x1d3)](_0x3fc439);if(_0x6e06a3['length']===0x0)return[];const _0x47e282=new Set(_0x6e06a3[_0x50208e(0x182)](([_0x58fdcf])=>_0x58fdcf)),_0x1c1bc7=new Set();for(const [,_0x101da7]of _0x6e06a3){for(const _0x84a6be of getStepNextRefs(_0x101da7)){if(_0x47e282[_0x50208e(0x21c)](_0x84a6be))_0x1c1bc7[_0x50208e(0x161)](_0x84a6be);}}let _0x5264f0=_0x415d18&&_0x47e282[_0x50208e(0x21c)](_0x415d18)?_0x415d18:undefined;if(!_0x5264f0){const _0x1fb7cd=_0x6e06a3[_0x50208e(0x184)](([_0x4e6a0a])=>!_0x1c1bc7[_0x50208e(0x21c)](_0x4e6a0a));_0x1fb7cd[_0x50208e(0x196)]>0x0?_0x5264f0=_0x1fb7cd[0x0][0x0]:_0x5264f0=_0x6e06a3[0x0][0x0];}const _0x538171=[],_0x1af064=new Set(),_0x2ba4b1=[_0x5264f0];while(_0x2ba4b1[_0x50208e(0x196)]>0x0){const _0x244aed=_0x2ba4b1['shift']();if(_0x1af064[_0x50208e(0x21c)](_0x244aed))continue;_0x1af064[_0x50208e(0x161)](_0x244aed);const _0x20eaf=_0x3fc439[_0x244aed];if(!_0x20eaf)continue;_0x538171['push']({'uuid':_0x244aed,'step':_0x20eaf});for(const _0x404df7 of getStepNextRefs(_0x20eaf)){_0x47e282[_0x50208e(0x21c)](_0x404df7)&&!_0x1af064[_0x50208e(0x21c)](_0x404df7)&&_0x2ba4b1['push'](_0x404df7);}}for(const [_0x234fc8,_0x1fe4b0]of _0x6e06a3){!_0x1af064['has'](_0x234fc8)&&_0x538171[_0x50208e(0x1a8)]({'uuid':_0x234fc8,'step':_0x1fe4b0});}return _0x538171;}function resolveStepReferences(_0x17d856,_0x4686da,_0x48824a,_0x2999f0){const _0x11c0ce=a150_0x43fb;if(_0x17d856['type']!==_0x11c0ce(0x1d7)){_0x17d856['next']&&_0x2999f0[_0x11c0ce(0x21c)](_0x17d856['next'])&&(_0x17d856[_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0x17d856['next']));const _0x5db693=_0x4686da+0x1;if(_0x5db693<_0x48824a[_0x11c0ce(0x196)]){const _0x55f3c2=_0x2999f0[_0x11c0ce(0x1b2)](_0x48824a[_0x5db693][_0x11c0ce(0x1d9)]);_0x17d856[_0x11c0ce(0x1e1)]===_0x55f3c2&&delete _0x17d856[_0x11c0ce(0x1e1)];}}if(_0x17d856[_0x11c0ce(0x213)]===_0x11c0ce(0x17c))for(const _0x2c187a of _0x17d856[_0x11c0ce(0x1c5)][_0x11c0ce(0x1a5)]){_0x2c187a[_0x11c0ce(0x1e1)]&&_0x2999f0[_0x11c0ce(0x21c)](_0x2c187a['next'])&&(_0x2c187a[_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0x2c187a[_0x11c0ce(0x1e1)]));}if(_0x17d856[_0x11c0ce(0x213)]===_0x11c0ce(0x1f3))for(const _0x4415a1 of _0x17d856[_0x11c0ce(0x1c5)][_0x11c0ce(0x1cc)]){_0x4415a1['next']&&_0x2999f0[_0x11c0ce(0x21c)](_0x4415a1['next'])&&(_0x4415a1[_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0x4415a1[_0x11c0ce(0x1e1)]));}if(_0x17d856[_0x11c0ce(0x213)]===_0x11c0ce(0x20f)&&_0x17d856[_0x11c0ce(0x1c5)]['condition']){const _0xb0bb1b=_0x17d856[_0x11c0ce(0x1c5)][_0x11c0ce(0x1a9)];_0xb0bb1b[_0x11c0ce(0x1e1)]&&_0x2999f0['has'](_0xb0bb1b['next'])&&(_0xb0bb1b['next']=_0x2999f0['get'](_0xb0bb1b[_0x11c0ce(0x1e1)])),_0xb0bb1b[_0x11c0ce(0x1b7)]?.[_0x11c0ce(0x1e1)]&&_0x2999f0[_0x11c0ce(0x21c)](_0xb0bb1b['timeout'][_0x11c0ce(0x1e1)])&&(_0xb0bb1b['timeout'][_0x11c0ce(0x1e1)]=_0x2999f0[_0x11c0ce(0x1b2)](_0xb0bb1b[_0x11c0ce(0x1b7)]['next']));}}function convertApiStageToYaml(_0x22e955){const _0x2fad78=a150_0x43fb,_0x4b8b95={'name':_0x22e955[_0x2fad78(0x15e)]};_0x22e955['id']&&(_0x4b8b95['id']=_0x22e955['id']);_0x22e955[_0x2fad78(0x1fb)]&&(_0x4b8b95[_0x2fad78(0x1fb)]=_0x22e955[_0x2fad78(0x1fb)]);_0x22e955[_0x2fad78(0x16b)]&&(_0x4b8b95[_0x2fad78(0x1ad)]=convertApiCriteriaToYaml(_0x22e955[_0x2fad78(0x16b)]));_0x22e955['exitCriterias']&&_0x22e955[_0x2fad78(0x171)][_0x2fad78(0x196)]>0x0&&(_0x4b8b95[_0x2fad78(0x1af)]=_0x22e955[_0x2fad78(0x171)][_0x2fad78(0x182)](convertApiCriteriaToYaml));_0x22e955[_0x2fad78(0x1a2)]&&(_0x4b8b95[_0x2fad78(0x1a2)]=convertApiCriteriaToYaml(_0x22e955[_0x2fad78(0x1a2)]));if(_0x22e955[_0x2fad78(0x186)]&&Object[_0x2fad78(0x1ce)](_0x22e955[_0x2fad78(0x186)])['length']>0x0){const _0xabeef1=orderStepsFromRoot(_0x22e955['steps'],_0x22e955['rootStep']),_0x47100c=new Map(),_0x3e3b5e=new Set();for(let _0x18f23f=0x0;_0x18f23f<_0xabeef1[_0x2fad78(0x196)];_0x18f23f++){const {uuid:_0x35d657,step:_0x49155e}=_0xabeef1[_0x18f23f];let _0x73d221=generateReadableStepName(_0x49155e,_0x18f23f),_0x45d56d=_0x73d221,_0x4712a7=0x2;while(_0x3e3b5e['has'](_0x45d56d)){_0x45d56d=_0x73d221+'_'+_0x4712a7,_0x4712a7++;}_0x3e3b5e['add'](_0x45d56d),_0x47100c['set'](_0x35d657,_0x45d56d);}_0x4b8b95['steps']=_0xabeef1[_0x2fad78(0x182)](({uuid:_0x434f25,step:_0x54a06e},_0x52bd10)=>{const _0x2e95f4=_0x2fad78,_0x21716f=convertApiStepToYaml(_0x54a06e,_0x47100c[_0x2e95f4(0x1b2)](_0x434f25));return resolveStepReferences(_0x21716f,_0x52bd10,_0xabeef1,_0x47100c),_0x21716f;});}return _0x4b8b95;}function convertApiCriteriaToYaml(_0x2e8bae){const _0x26ec38=a150_0x43fb,_0x3e12c5={'name':_0x2e8bae[_0x26ec38(0x15e)],'segment':_0x2e8bae['segmentId']};_0x2e8bae[_0x26ec38(0x1fb)]&&(_0x3e12c5[_0x26ec38(0x1fb)]=_0x2e8bae['description']);if(_0x2e8bae[_0x26ec38(0x1ec)]){let _0x1dae96=_0x2e8bae[_0x26ec38(0x1ec)]['journeyId'],_0x518444=_0x2e8bae[_0x26ec38(0x1ec)][_0x26ec38(0x1cf)];if(_0x2e8bae[_0x26ec38(0x1ec)][_0x26ec38(0x18a)]){const _0x1761ba=parseJumpTargetDisplayName(_0x2e8bae['target'][_0x26ec38(0x18a)]);_0x1761ba&&(_0x518444=_0x1761ba[_0x26ec38(0x188)],_0x1dae96=_0x1761ba[_0x26ec38(0x18a)]);}_0x3e12c5[_0x26ec38(0x1ec)]={'journey':_0x1dae96,'stage':_0x518444},_0x2e8bae[_0x26ec38(0x1ec)]['journeyBundleId']&&(_0x3e12c5[_0x26ec38(0x1ec)][_0x26ec38(0x1e4)]=_0x2e8bae[_0x26ec38(0x1ec)][_0x26ec38(0x170)]);}return _0x3e12c5;}function convertApiStepToYaml(_0x2644d2,_0x3b27de){const _0x55e75c=a150_0x43fb;switch(_0x2644d2[_0x55e75c(0x213)]){case _0x55e75c(0x1f1):{const _0xbde687={};if(_0x2644d2[_0x55e75c(0x179)]===_0x55e75c(0x1f5)&&_0x2644d2[_0x55e75c(0x17d)]!==undefined)_0xbde687[_0x55e75c(0x1d2)]=_0x2644d2[_0x55e75c(0x17d)],_0xbde687[_0x55e75c(0x1c4)]=_0x2644d2[_0x55e75c(0x18e)];else{if(_0x2644d2[_0x55e75c(0x179)]===_0x55e75c(0x1a6)&&_0x2644d2[_0x55e75c(0x17a)])_0xbde687[_0x55e75c(0x1d0)]=_0x2644d2[_0x55e75c(0x17a)];else{if(_0x2644d2['waitStepType']==='DaysOfTheWeek'&&_0x2644d2['daysOfWeek'])_0xbde687[_0x55e75c(0x192)]=_0x2644d2['daysOfWeek'];else{if(_0x2644d2[_0x55e75c(0x179)]===_0x55e75c(0x21b)){if(_0x2644d2[_0x55e75c(0x1e3)]&&_0x2644d2[_0x55e75c(0x1e3)][_0x55e75c(0x196)]>0x0){const _0x3ba653=_0x2644d2['conditions']['find'](_0xaf8d55=>!_0xaf8d55[_0x55e75c(0x214)]),_0x198a9a=_0x2644d2[_0x55e75c(0x1e3)]['find'](_0x188e81=>_0x188e81['timedOutPath']);_0x3ba653?.['segmentId']&&(_0xbde687[_0x55e75c(0x1a9)]={'segment':_0x3ba653['segmentId'],..._0x3ba653[_0x55e75c(0x1e1)]?{'next':_0x3ba653['next']}:{}},_0x198a9a&&_0x198a9a[_0x55e75c(0x15c)]!==undefined&&_0x198a9a[_0x55e75c(0x1c4)]&&(_0xbde687[_0x55e75c(0x1a9)][_0x55e75c(0x1b7)]={'duration':_0x198a9a[_0x55e75c(0x15c)],'unit':_0x198a9a[_0x55e75c(0x1c4)],..._0x198a9a['next']?{'next':_0x198a9a[_0x55e75c(0x1e1)]}:{}}));}else _0x2644d2['conditionSegmentId']&&(_0xbde687[_0x55e75c(0x1a9)]={'segment':_0x2644d2[_0x55e75c(0x215)]},_0x2644d2['conditionTimeoutDuration']!==undefined&&_0x2644d2[_0x55e75c(0x17e)]&&(_0xbde687['condition']['timeout']={'duration':_0x2644d2[_0x55e75c(0x195)],'unit':_0x2644d2[_0x55e75c(0x17e)]}));}}}}const _0x63e6fe={'type':_0x55e75c(0x20f),'name':_0x3b27de,..._0x2644d2['next']?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{},'with':_0xbde687};return _0x63e6fe;}case'Activation':{const _0x31a977={'type':'activation','name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{},'with':{'activation':_0x2644d2[_0x55e75c(0x1c2)]||''}};return _0x31a977;}case'DecisionPoint':{const _0x547293={'type':_0x55e75c(0x17c),'name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2['next']}:{},'with':{'branches':(_0x2644d2['branches']||[])[_0x55e75c(0x182)](_0x62e4cf=>({'name':_0x62e4cf[_0x55e75c(0x15e)],'segment':_0x62e4cf['segmentId'],'excluded':_0x62e4cf[_0x55e75c(0x1f6)],..._0x62e4cf[_0x55e75c(0x1e1)]?{'next':_0x62e4cf[_0x55e75c(0x1e1)]}:{}}))}};return _0x547293;}case'ABTest':case _0x55e75c(0x199):case _0x55e75c(0x1ab):{const _0x46bbff=_0x2644d2['variants']||(_0x2644d2[_0x55e75c(0x1a5)]||[])[_0x55e75c(0x182)](_0xf04a10=>({'name':_0xf04a10[_0x55e75c(0x15e)],'percentage':0x0,'next':_0xf04a10[_0x55e75c(0x1e1)]})),_0x361633={'type':_0x55e75c(0x1f3),'name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2['next']}:{},'with':{'customized_split':_0x2644d2[_0x55e75c(0x16f)],'unique_id':_0x2644d2[_0x55e75c(0x187)],'variants':_0x46bbff[_0x55e75c(0x182)](_0x5dd3b5=>({'name':_0x5dd3b5[_0x55e75c(0x15e)],'percentage':_0x5dd3b5['percentage'],..._0x5dd3b5[_0x55e75c(0x1e1)]?{'next':_0x5dd3b5[_0x55e75c(0x1e1)]}:{}}))}};return _0x361633;}case _0x55e75c(0x1b8):{const _0x2c7f11={'type':'merge','name':_0x3b27de,..._0x2644d2['next']?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{}};return _0x2c7f11;}case'Jump':{let _0x5474be='',_0x5ad88f='',_0x29f9b4;if(_0x2644d2['target']){_0x5474be=_0x2644d2['target']['journeyId'],_0x5ad88f=_0x2644d2[_0x55e75c(0x1ec)][_0x55e75c(0x1cf)],_0x29f9b4=_0x2644d2[_0x55e75c(0x1ec)][_0x55e75c(0x170)];if(_0x2644d2['target'][_0x55e75c(0x18a)]){const _0x1a60e9=parseJumpTargetDisplayName(_0x2644d2[_0x55e75c(0x1ec)][_0x55e75c(0x18a)]);_0x1a60e9&&(_0x5ad88f=_0x1a60e9['stageName'],_0x5474be=_0x1a60e9[_0x55e75c(0x18a)]);}}const _0x5606ac={'type':'jump','name':_0x3b27de,..._0x2644d2[_0x55e75c(0x1e1)]?{'next':_0x2644d2[_0x55e75c(0x1e1)]}:{},'with':{'target':{'journey':_0x5474be,'stage':_0x5ad88f,..._0x29f9b4?{'bundle_id':_0x29f9b4}:{}}}};return _0x5606ac;}case _0x55e75c(0x1bf):{const _0x5134a7={'type':_0x55e75c(0x1d7),'name':_0x3b27de};return _0x5134a7;}default:{const _0x582566={'type':_0x55e75c(0x1d7),'name':_0x3b27de};return _0x582566;}}}export async function journeyDefToRequest(_0x3b618,_0x5d2c37,_0x59b1d2){const _0x57beb1=a150_0x43fb,_0x3f9edb=_0x3b618[_0x57beb1(0x1d4)]||getActiveStages(_0x3b618),_0x4d01ec=isJourneysArrayMode(_0x3b618)||isMultiVersionMode(_0x3b618)?getLatestJourneyEntry(_0x3b618):undefined,_0x4cfd35=_0x4d01ec?.[_0x57beb1(0x1ff)]??_0x3b618[_0x57beb1(0x15e)],_0xb004d=_0x3b618['segments']||{},_0x3e8add=_0x3b618[_0x57beb1(0x175)]||{},_0x145a93={'type':'journey','attributes':{'name':_0x4cfd35,'audienceId':_0x5d2c37,'journeyStages':await Promise['all'](_0x3f9edb['map'](_0x3e255b=>convertYamlStageToApi(_0x3e255b,_0x59b1d2,_0xb004d,_0x3e8add)))}},_0x4cb136=_0x4d01ec?.['id']??_0x3b618['id'];_0x4cb136&&(_0x145a93['id']=_0x4cb136);_0x3b618['description']&&(_0x145a93[_0x57beb1(0x1da)]['description']=_0x3b618[_0x57beb1(0x1fb)]);const _0x5868b6=getEffectiveGoal(_0x3b618);_0x5868b6&&(_0x145a93['attributes'][_0x57beb1(0x16c)]=await convertYamlCriteriaToApi(_0x5868b6,_0x59b1d2,_0xb004d));const _0x126960=getEffectiveReentry(_0x3b618);return _0x126960&&(_0x145a93['attributes'][_0x57beb1(0x1ba)]=_0x126960,_0x145a93[_0x57beb1(0x1da)][_0x57beb1(0x1f0)]=_0x126960!==_0x57beb1(0x1b4)),_0x3b618[_0x57beb1(0x216)]&&(_0x145a93['relationships']={'parentFolder':{'data':{'id':_0x3b618[_0x57beb1(0x216)],'type':'folder'}}}),_0x145a93;}async function convertYamlStageToApi(_0x103e1f,_0x4da3e8,_0x454821={},_0x275f68={}){const _0x18be03=a150_0x43fb,_0x23f8df={'name':_0x103e1f['name']};_0x103e1f['id']&&(_0x23f8df['id']=_0x103e1f['id']);_0x103e1f['description']&&(_0x23f8df[_0x18be03(0x1fb)]=_0x103e1f['description']);_0x103e1f[_0x18be03(0x1ad)]&&(_0x23f8df['entryCriteria']=await convertYamlCriteriaToApi(_0x103e1f[_0x18be03(0x1ad)],_0x4da3e8,_0x454821));_0x103e1f[_0x18be03(0x1af)]&&_0x103e1f[_0x18be03(0x1af)][_0x18be03(0x196)]>0x0&&(_0x23f8df[_0x18be03(0x171)]=await Promise[_0x18be03(0x1dd)](_0x103e1f[_0x18be03(0x1af)]['map'](_0x34e544=>convertYamlCriteriaToApi(_0x34e544,_0x4da3e8,_0x454821))));_0x103e1f['milestone']&&(_0x23f8df[_0x18be03(0x1a2)]=await convertYamlCriteriaToApi(_0x103e1f[_0x18be03(0x1a2)],_0x4da3e8,_0x454821));if(_0x103e1f[_0x18be03(0x186)]&&_0x103e1f[_0x18be03(0x186)][_0x18be03(0x196)]>0x0){const _0x19379a={},_0x3f2fde=_0x103e1f[_0x18be03(0x186)][_0x18be03(0x182)]((_0xc97fee,_0x2637c3)=>{const _0x328b1c=_0x18be03,_0x2edf38=_0xc97fee[_0x328b1c(0x1d9)]||generateUUID(),_0xa1b943=_0xc97fee[_0x328b1c(0x15e)]||_0xc97fee[_0x328b1c(0x213)]+'_'+_0x2637c3;return _0x19379a[_0xa1b943]=_0x2edf38,{..._0xc97fee,'name':_0xa1b943};});_0x23f8df[_0x18be03(0x190)]=_0x19379a[_0x3f2fde[0x0][_0x18be03(0x15e)]],_0x23f8df[_0x18be03(0x186)]={};for(let _0x1ada29=0x0;_0x1ada29<_0x3f2fde[_0x18be03(0x196)];_0x1ada29++){const _0x184077=_0x3f2fde[_0x1ada29],_0x4ccc94=_0x19379a[_0x184077[_0x18be03(0x15e)]],_0x52fa1c=!_0x184077[_0x18be03(0x1e1)]&&_0x1ada29<_0x3f2fde[_0x18be03(0x196)]-0x1&&_0x184077[_0x18be03(0x213)]!=='end'?_0x3f2fde[_0x1ada29+0x1]['name']:_0x184077['next'],_0x36eaba=_0x52fa1c!==_0x184077['next']?{..._0x184077,'next':_0x52fa1c}:_0x184077;_0x23f8df[_0x18be03(0x186)][_0x4ccc94]=await convertYamlStepToApi(_0x36eaba,_0x4da3e8,_0x454821,_0x19379a,_0x275f68);}}else _0x103e1f[_0x18be03(0x178)]&&(_0x23f8df[_0x18be03(0x190)]=_0x103e1f[_0x18be03(0x178)]);return _0x23f8df;}async function convertYamlCriteriaToApi(_0x577443,_0x5c52aa,_0x24b4d8={}){const _0x1cf33e=a150_0x43fb;let _0x3efa82=_0x577443[_0x1cf33e(0x1c0)];if(_0x3efa82&&!/^\d+$/['test'](_0x3efa82)){const _0x80ef37=parseSegmentRef(_0x3efa82);if(_0x80ef37[_0x1cf33e(0x213)]==='ref')_0x5c52aa?.['resolveSegmentId']&&(_0x3efa82=await _0x5c52aa[_0x1cf33e(0x1ae)](_0x80ef37[_0x1cf33e(0x15e)]));else{if(_0x80ef37['type']===_0x1cf33e(0x180)&&_0x24b4d8[_0x80ef37[_0x1cf33e(0x15e)]])_0x5c52aa?.[_0x1cf33e(0x177)]&&(_0x3efa82=await _0x5c52aa[_0x1cf33e(0x177)](_0x80ef37[_0x1cf33e(0x15e)],_0x24b4d8[_0x80ef37[_0x1cf33e(0x15e)]]));else _0x5c52aa?.[_0x1cf33e(0x1ae)]&&(_0x3efa82=await _0x5c52aa[_0x1cf33e(0x1ae)](_0x80ef37[_0x1cf33e(0x15e)]));}}const _0x2e26ce={'name':_0x577443[_0x1cf33e(0x15e)],'segmentId':_0x3efa82};_0x577443[_0x1cf33e(0x1fb)]&&(_0x2e26ce[_0x1cf33e(0x1fb)]=_0x577443[_0x1cf33e(0x1fb)]);if(_0x577443['target']){const _0x2e7bd0=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x1b3)],_0x24f693=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x164)];let _0x463c1b=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x1b3)];_0x5c52aa?.[_0x1cf33e(0x1aa)]&&!/^\d+$/['test'](_0x463c1b)&&(_0x463c1b=await _0x5c52aa[_0x1cf33e(0x1aa)](_0x463c1b));let _0x15e86e=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x164)];_0x5c52aa?.[_0x1cf33e(0x1f2)]&&!/^\d+$/['test'](_0x15e86e)&&(_0x15e86e=await _0x5c52aa[_0x1cf33e(0x1f2)](_0x463c1b,_0x15e86e));const _0xeff91e=!/^\d+$/['test'](_0x2e7bd0)&&!isLocalJourneyRef(_0x2e7bd0)?formatApiJourneyName(_0x2e7bd0,_0x24f693):undefined;_0x2e26ce[_0x1cf33e(0x1ec)]={'journeyId':_0x463c1b,'journeyStageId':_0x15e86e,'journeyName':_0xeff91e,'confirmed':!![]},_0x577443['target'][_0x1cf33e(0x1e4)]&&(_0x2e26ce[_0x1cf33e(0x1ec)][_0x1cf33e(0x170)]=_0x577443[_0x1cf33e(0x1ec)][_0x1cf33e(0x1e4)]);}return _0x2e26ce;}async function convertYamlStepToApi(_0x580d76,_0x17e1c2,_0x5b4cc3={},_0x2f492f={},_0x92d818={}){const _0x115a4a=a150_0x43fb,_0x45ae78=async _0x436479=>{const _0x346635=a150_0x43fb;if(/^\d+$/[_0x346635(0x21d)](_0x436479))return _0x436479;const _0x3dae1f=parseSegmentRef(_0x436479);if(_0x3dae1f[_0x346635(0x213)]===_0x346635(0x19d)){if(_0x17e1c2?.[_0x346635(0x1ae)])return await _0x17e1c2['resolveSegmentId'](_0x3dae1f[_0x346635(0x15e)]);}else{if(_0x3dae1f[_0x346635(0x213)]===_0x346635(0x180)&&_0x5b4cc3[_0x3dae1f[_0x346635(0x15e)]]){if(_0x17e1c2?.[_0x346635(0x177)])return await _0x17e1c2['resolveEmbeddedSegmentId'](_0x3dae1f[_0x346635(0x15e)],_0x5b4cc3[_0x3dae1f[_0x346635(0x15e)]]);}else{if(_0x17e1c2?.[_0x346635(0x1ae)])return await _0x17e1c2[_0x346635(0x1ae)](_0x3dae1f[_0x346635(0x15e)]);}}return _0x436479;},_0x543c21=async _0x3a0e8a=>{const _0x117fe4=a150_0x43fb;if(/^\d+$/[_0x117fe4(0x21d)](_0x3a0e8a))return _0x3a0e8a;const _0x1bb6ab=parseSegmentRef(_0x3a0e8a);if(_0x1bb6ab[_0x117fe4(0x213)]===_0x117fe4(0x19d)){if(_0x17e1c2?.[_0x117fe4(0x1c8)])return await _0x17e1c2[_0x117fe4(0x1c8)](_0x1bb6ab[_0x117fe4(0x15e)]);return _0x1bb6ab[_0x117fe4(0x15e)];}else{if(_0x1bb6ab[_0x117fe4(0x213)]===_0x117fe4(0x180)&&_0x92d818[_0x1bb6ab['name']]){if(_0x17e1c2?.[_0x117fe4(0x193)])return await _0x17e1c2[_0x117fe4(0x193)](_0x1bb6ab[_0x117fe4(0x15e)],_0x92d818[_0x1bb6ab['name']]);if(_0x17e1c2?.[_0x117fe4(0x1c8)])return await _0x17e1c2[_0x117fe4(0x1c8)](_0x1bb6ab[_0x117fe4(0x15e)]);}else{if(_0x17e1c2?.[_0x117fe4(0x1c8)])return await _0x17e1c2[_0x117fe4(0x1c8)](_0x1bb6ab[_0x117fe4(0x15e)]);}}return _0x3a0e8a;},_0x3894d3=_0x4103b4=>{if(!_0x4103b4)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x4103b4))return _0x4103b4;return _0x2f492f[_0x4103b4]||_0x4103b4;};switch(_0x580d76[_0x115a4a(0x213)]){case _0x115a4a(0x20f):{const _0x4b71b7=_0x580d76,_0x2454ed=_0x4b71b7[_0x115a4a(0x1c5)],_0x26fd74={'type':_0x115a4a(0x1f1),'name':_0x4b71b7[_0x115a4a(0x15e)],'next':_0x3894d3(_0x4b71b7[_0x115a4a(0x1e1)])};if(_0x2454ed['duration']!==undefined&&_0x2454ed['unit'])_0x26fd74[_0x115a4a(0x179)]='Duration',_0x26fd74['waitStep']=_0x2454ed[_0x115a4a(0x1d2)],_0x26fd74['waitStepUnit']=normalizeWaitUnit(_0x2454ed[_0x115a4a(0x1c4)]);else{if(_0x2454ed[_0x115a4a(0x1d0)])_0x26fd74[_0x115a4a(0x179)]=_0x115a4a(0x1a6),_0x26fd74[_0x115a4a(0x17a)]=_0x2454ed['wait_until'];else{if(_0x2454ed[_0x115a4a(0x192)])_0x26fd74[_0x115a4a(0x179)]=_0x115a4a(0x163),_0x26fd74[_0x115a4a(0x217)]=_0x2454ed[_0x115a4a(0x192)];else{if(_0x2454ed[_0x115a4a(0x1a9)]){_0x26fd74[_0x115a4a(0x179)]=_0x115a4a(0x21b);const _0x565782=await _0x45ae78(_0x2454ed[_0x115a4a(0x1a9)]['segment']),_0x33b2c6=_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)]?.['next']!==undefined;if(_0x33b2c6){const _0x24fd35=[];_0x24fd35[_0x115a4a(0x1a8)]({'id':generateUUID(),'segmentId':_0x565782,'timedOutPath':![],'name':_0x115a4a(0x18b),'next':_0x3894d3(_0x2454ed[_0x115a4a(0x1a9)]['next']??_0x4b71b7[_0x115a4a(0x1e1)])});if(_0x2454ed[_0x115a4a(0x1a9)]['timeout']){const _0x28416d=_0x2454ed['condition'][_0x115a4a(0x1b7)][_0x115a4a(0x1d2)],_0xc074f7=normalizeWaitUnit(_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)][_0x115a4a(0x1c4)]);_0x24fd35[_0x115a4a(0x1a8)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x115a4a(0x176)+_0x28416d+'\x20'+_0xc074f7,'moveAfter':_0x28416d,'unit':_0xc074f7,'next':_0x3894d3(_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)][_0x115a4a(0x1e1)])});}_0x26fd74[_0x115a4a(0x1e3)]=_0x24fd35,delete _0x26fd74[_0x115a4a(0x1e1)];}else _0x26fd74['conditionSegmentId']=_0x565782,_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)]&&(_0x26fd74['conditionTimeoutDuration']=_0x2454ed[_0x115a4a(0x1a9)][_0x115a4a(0x1b7)][_0x115a4a(0x1d2)],_0x2454ed[_0x115a4a(0x1a9)]['timeout'][_0x115a4a(0x1c4)]&&(_0x26fd74[_0x115a4a(0x17e)]=normalizeWaitUnit(_0x2454ed['condition']['timeout'][_0x115a4a(0x1c4)])));}}}}return _0x26fd74;}case _0x115a4a(0x1ac):{const _0x2ac622=_0x580d76,_0x2af198=_0x2ac622[_0x115a4a(0x1c5)]['activation'],_0x210e86=await _0x543c21(_0x2af198);return{'type':_0x115a4a(0x19c),'name':_0x2ac622[_0x115a4a(0x15e)],'journeyActivationStepId':_0x210e86,'next':_0x3894d3(_0x2ac622['next'])};}case _0x115a4a(0x17c):{const _0x5b8a82=_0x580d76,_0x206461=_0x5b8a82[_0x115a4a(0x1c5)][_0x115a4a(0x1a5)];return{'type':_0x115a4a(0x166),'name':_0x5b8a82[_0x115a4a(0x15e)],'branches':await Promise[_0x115a4a(0x1dd)](_0x206461['map'](async _0x4494eb=>{const _0x1d4bcc=_0x115a4a;let _0x3dd5fd='';if(!_0x4494eb[_0x1d4bcc(0x1eb)]){const _0x46776b=_0x4494eb[_0x1d4bcc(0x1c0)]||_0x4494eb[_0x1d4bcc(0x1b0)]||'';_0x3dd5fd=_0x46776b?await _0x45ae78(_0x46776b):'';}return{'id':crypto[_0x1d4bcc(0x21f)](),'name':_0x4494eb[_0x1d4bcc(0x15e)],'description':null,'segmentId':_0x3dd5fd,'excludedPath':_0x4494eb[_0x1d4bcc(0x1eb)]??![],'next':_0x3894d3(_0x4494eb[_0x1d4bcc(0x1e1)])};})),'next':_0x3894d3(_0x5b8a82[_0x115a4a(0x1e1)])};}case _0x115a4a(0x1f3):{const _0x3bdfa7=_0x580d76,_0x16a960=_0x3bdfa7[_0x115a4a(0x1c5)];return{'type':_0x115a4a(0x160),'name':_0x3bdfa7[_0x115a4a(0x15e)],'customizedSplit':_0x16a960['customized_split'],'uniqueId':_0x16a960['unique_id'],'variants':_0x16a960['variants'][_0x115a4a(0x182)](_0x367455=>({'id':_0x367455['id']||generateUUID(),'name':_0x367455[_0x115a4a(0x15e)],'percentage':_0x367455[_0x115a4a(0x1e8)],'next':_0x3894d3(_0x367455[_0x115a4a(0x1e1)])})),'next':_0x3894d3(_0x3bdfa7[_0x115a4a(0x1e1)])};}case _0x115a4a(0x1db):return{'type':_0x115a4a(0x1b8),'name':_0x580d76[_0x115a4a(0x15e)],'next':_0x3894d3(_0x580d76[_0x115a4a(0x1e1)])};case _0x115a4a(0x172):{const _0x5dc2ba=_0x580d76,_0x231fc1=_0x5dc2ba['with'][_0x115a4a(0x1ec)],_0x2088e5=_0x231fc1[_0x115a4a(0x1b3)],_0x1bb398=_0x231fc1[_0x115a4a(0x164)];let _0x43aed3=_0x231fc1['journey'];_0x17e1c2?.[_0x115a4a(0x1aa)]&&!/^\d+$/[_0x115a4a(0x21d)](_0x43aed3)&&(_0x43aed3=await _0x17e1c2[_0x115a4a(0x1aa)](_0x43aed3));let _0x485300=_0x231fc1[_0x115a4a(0x164)];_0x17e1c2?.[_0x115a4a(0x1f2)]&&!/^\d+$/[_0x115a4a(0x21d)](_0x485300)&&(_0x485300=await _0x17e1c2[_0x115a4a(0x1f2)](_0x43aed3,_0x485300));const _0x59c338=!/^\d+$/[_0x115a4a(0x21d)](_0x2088e5)&&!isLocalJourneyRef(_0x2088e5)?formatApiJourneyName(_0x2088e5,_0x1bb398):undefined;return{'type':_0x115a4a(0x1e7),'name':_0x5dc2ba[_0x115a4a(0x15e)],'target':{'journeyId':_0x43aed3,'journeyStageId':_0x485300,'journeyBundleId':_0x231fc1[_0x115a4a(0x1e4)],'journeyName':_0x59c338,'confirmed':!![]},'next':_0x3894d3(_0x5dc2ba[_0x115a4a(0x1e1)])};}case _0x115a4a(0x1d7):return{'type':_0x115a4a(0x1bf),'name':_0x580d76[_0x115a4a(0x15e)]};default:{const _0x25d4ff=_0x580d76;return{'type':_0x115a4a(0x1bf),'name':_0x25d4ff[_0x115a4a(0x15e)]};}}}export function toYamlString(_0x3f9cba){const _0x5d70fa=a150_0x43fb,_0x3485f7=stripInternalFields(_0x3f9cba),_0x4fff74=a150_0xd81d27[_0x5d70fa(0x1b1)](_0x3485f7,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x5d70fa(0x1d6)}),_0x452079=[_0x5d70fa(0x1d5),_0x5d70fa(0x1fe),'goal:',_0x5d70fa(0x204),_0x5d70fa(0x1e0),'stages:','versions:'];let _0xa1e65b=_0x4fff74;for(const _0x5566a2 of _0x452079){_0xa1e65b=_0xa1e65b['replace'](new RegExp('^('+_0x5566a2+')','m'),(_0x247119,_0x48d0ae,_0x16fb48)=>{if(_0x16fb48===0x0||_0xa1e65b[_0x16fb48-0x1]==='\x0a'&&_0xa1e65b[_0x16fb48-0x2]==='\x0a')return _0x48d0ae;return'\x0a'+_0x48d0ae;});}return _0xa1e65b;}function stripInternalFields(_0x59d2d4){const _0x30386a=a150_0x43fb,{id:_0x35ae1c,folder_id:_0x205f38,bundle_id:_0x182cbf,bundle_name:_0x100467,version:_0x35abb9,allow_reentry:_0x27c105,..._0x2e7e6f}=_0x59d2d4;return _0x2e7e6f[_0x30386a(0x1bc)]&&(_0x2e7e6f[_0x30386a(0x1bc)]=_0x2e7e6f[_0x30386a(0x1bc)][_0x30386a(0x182)](_0x55ccee=>{const _0x5a98ad=_0x30386a,{id:_0x1d2be6,..._0xa3568a}=_0x55ccee;return{..._0xa3568a,'stages':_0xa3568a['stages'][_0x5a98ad(0x182)](stripStageInternalFields),..._0x55ccee[_0x5a98ad(0x174)]===!![]?{'latest':!![]}:{},..._0x2e7e6f[_0x5a98ad(0x1bc)][_0x5a98ad(0x196)]===0x1&&_0xa3568a[_0x5a98ad(0x1ff)]==='v1'?{'version':undefined}:{}};})),_0x2e7e6f[_0x30386a(0x1d4)]&&(_0x2e7e6f[_0x30386a(0x1d4)]=_0x2e7e6f[_0x30386a(0x1d4)][_0x30386a(0x182)](stripStageInternalFields)),_0x2e7e6f[_0x30386a(0x1de)]&&(_0x2e7e6f[_0x30386a(0x1de)]=_0x2e7e6f[_0x30386a(0x1de)]['map'](_0x26fa71=>{const _0x15b356=_0x30386a,{id:_0x19c1ce,..._0x577666}=_0x26fa71;return{..._0x577666,'stages':_0x577666['stages']['map'](stripStageInternalFields),..._0x26fa71[_0x15b356(0x174)]===!![]?{'latest':!![]}:{}};})),_0x2e7e6f;}function stripStageInternalFields(_0x1bd323){const {id:_0x1d51f2,..._0x486c7c}=_0x1bd323;return _0x486c7c;}export function parseYamlString(_0x580fe4){return safeParseYaml(_0x580fe4,JourneyDefSchema);}export function isJourneyDef(_0x415ece){const _0x8d89cf=a150_0x43fb;return typeof _0x415ece===_0x8d89cf(0x21a)&&_0x415ece!==null&&_0x8d89cf(0x213)in _0x415ece&&_0x415ece[_0x8d89cf(0x213)]==='journey';}export function generateTemplate(_0x5218b9,_0x2cdf10){const _0x1c5601=a150_0x43fb,_0x569def={'type':_0x1c5601(0x1b3),'name':_0x5218b9,'description':_0x1c5601(0x211),'reentry':_0x1c5601(0x1b4),'goal':{'name':_0x1c5601(0x21e),'segment':_0x1c5601(0x212)},'stages':[{'name':_0x1c5601(0x19b),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':_0x1c5601(0x1dc),'segment':_0x2cdf10},'steps':[{'type':_0x1c5601(0x20f),'name':_0x1c5601(0x1ef),'with':{'duration':0x1,'unit':_0x1c5601(0x203)}},{'type':_0x1c5601(0x1ac),'name':_0x1c5601(0x191),'with':{'activation':'your-activation-name'}},{'type':_0x1c5601(0x1d7),'name':'Stage\x20Complete'}]}]};return toYamlString(_0x569def);}function generateUUID(){const _0x550829=a150_0x43fb;return crypto[_0x550829(0x21f)]();}export const SEGMENT_REF_PREFIX='ref:';export function parseSegmentRef(_0x1a8697){const _0x3d2781=a150_0x43fb;if(_0x1a8697[_0x3d2781(0x183)](SEGMENT_REF_PREFIX))return{'type':'ref','name':_0x1a8697[_0x3d2781(0x1bb)](SEGMENT_REF_PREFIX[_0x3d2781(0x196)])};if(/^\d+$/[_0x3d2781(0x21d)](_0x1a8697))return{'type':'id','name':_0x1a8697};return{'type':_0x3d2781(0x180),'name':_0x1a8697};}export function makeSegmentRef(_0x4dc8c9){return''+SEGMENT_REF_PREFIX+_0x4dc8c9;}export function isExternalSegmentRef(_0x2217f2){const _0x311e03=a150_0x43fb;return _0x2217f2[_0x311e03(0x183)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x1e3d52){const _0x4a4d43=a150_0x43fb;return!!(_0x1e3d52[_0x4a4d43(0x1bc)]&&_0x1e3d52['journeys']['length']>0x0);}export function isMultiVersionMode(_0x58cc6b){const _0x4a425f=a150_0x43fb;return!!(_0x58cc6b[_0x4a425f(0x1de)]&&_0x58cc6b[_0x4a425f(0x1de)][_0x4a425f(0x196)]>0x0);}export function isSingleVersionMode(_0x4e6b51){const _0x3d6ddb=a150_0x43fb;return!!(_0x4e6b51[_0x3d6ddb(0x1d4)]&&_0x4e6b51[_0x3d6ddb(0x1d4)][_0x3d6ddb(0x196)]>0x0);}export function hasMultipleVersions(_0x4824a0){const _0x486542=a150_0x43fb;if(isJourneysArrayMode(_0x4824a0))return(_0x4824a0[_0x486542(0x1bc)]?.[_0x486542(0x196)]||0x0)>0x1;if(isMultiVersionMode(_0x4824a0))return(_0x4824a0[_0x486542(0x1de)]?.[_0x486542(0x196)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x5de638){const _0x5b727a=a150_0x43fb;if(isJourneysArrayMode(_0x5de638))return _0x5de638;if(isSingleVersionMode(_0x5de638)){const {stages:_0x789f37,id:_0x32e216,version:_0x24c9d6,version_number:_0x5c54cd,..._0x48257d}=_0x5de638;return{..._0x48257d,'journeys':[{'version':_0x24c9d6||'v1','stages':_0x789f37||[],'id':_0x32e216,'version_number':_0x5c54cd}]};}if(isMultiVersionMode(_0x5de638)){const {versions:_0x2bdbc1,..._0x52372d}=_0x5de638;return{..._0x52372d,'journeys':(_0x2bdbc1||[])[_0x5b727a(0x182)](_0x1a12fa=>({'version':_0x1a12fa[_0x5b727a(0x15e)],'state':_0x1a12fa[_0x5b727a(0x17f)],'latest':_0x1a12fa['latest'],'stages':_0x1a12fa[_0x5b727a(0x1d4)],'id':_0x1a12fa['id'],'version_number':_0x1a12fa['version_number']}))};}return _0x5de638;}export function normalizeJourneyDef(_0x4f4e30,_0x541148){const _0x51b6dd=a150_0x43fb,_0x25891d=normalizeToJourneysFormat(_0x4f4e30),_0x102edd=_0x541148?.[_0x51b6dd(0x1c3)]?Object['keys'](_0x541148[_0x51b6dd(0x1c3)]):undefined,_0x3484fa=_0x541148?.[_0x51b6dd(0x175)]?Object[_0x51b6dd(0x1ce)](_0x541148[_0x51b6dd(0x175)]):undefined;return{'type':_0x51b6dd(0x1b3),'name':_0x25891d[_0x51b6dd(0x15e)],..._0x25891d[_0x51b6dd(0x1fb)]!==undefined&&{'description':_0x25891d[_0x51b6dd(0x1fb)]},..._0x25891d[_0x51b6dd(0x16c)]&&{'goal':normalizeJourneyCriteria(_0x25891d['goal'])},..._0x25891d[_0x51b6dd(0x1d1)]!==undefined&&{'reentry':_0x25891d[_0x51b6dd(0x1d1)]},..._0x25891d['segments']&&{'segments':normalizeEmbeddedSegments(_0x25891d[_0x51b6dd(0x1c3)],_0x102edd)},..._0x25891d['activations']&&{'activations':normalizeEmbeddedActivations(_0x25891d[_0x51b6dd(0x175)],_0x3484fa)},..._0x25891d[_0x51b6dd(0x1bc)]&&{'journeys':_0x25891d[_0x51b6dd(0x1bc)]['map'](_0x527694=>normalizeJourneyEntry(_0x527694,_0x25891d['journeys']['length']===0x1))}};}function normalizeJourneyEntry(_0x2555af,_0x15815a){const _0x1138b2=a150_0x43fb;return{...!_0x15815a&&_0x2555af[_0x1138b2(0x1ff)]!==undefined&&{'version':_0x2555af['version']},..._0x2555af['state']!==undefined&&{'state':_0x2555af[_0x1138b2(0x17f)]},...!_0x15815a&&_0x2555af[_0x1138b2(0x174)]!==undefined&&{'latest':_0x2555af['latest']},..._0x2555af[_0x1138b2(0x173)]!==undefined&&{'version_number':_0x2555af['version_number']},..._0x2555af['goal']&&{'goal':normalizeJourneyCriteria(_0x2555af['goal'])},..._0x2555af[_0x1138b2(0x1d1)]!==undefined&&{'reentry':_0x2555af[_0x1138b2(0x1d1)]},'stages':_0x2555af[_0x1138b2(0x1d4)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0x32a6dd){const _0x4e6fdf=a150_0x43fb;return{'name':_0x32a6dd[_0x4e6fdf(0x15e)],..._0x32a6dd[_0x4e6fdf(0x1fb)]!==undefined&&{'description':_0x32a6dd[_0x4e6fdf(0x1fb)]},..._0x32a6dd['entry_criteria']&&{'entry_criteria':normalizeJourneyCriteria(_0x32a6dd[_0x4e6fdf(0x1ad)])},..._0x32a6dd[_0x4e6fdf(0x1af)]&&{'exit_criteria':_0x32a6dd['exit_criteria'][_0x4e6fdf(0x182)](normalizeJourneyCriteria)},..._0x32a6dd['milestone']&&{'milestone':normalizeJourneyCriteria(_0x32a6dd[_0x4e6fdf(0x1a2)])},..._0x32a6dd[_0x4e6fdf(0x186)]&&{'steps':normalizeStepsWithImplicitNext(_0x32a6dd[_0x4e6fdf(0x186)])}};}function normalizeStepsWithImplicitNext(_0x555c72){const _0x4292ec=a150_0x43fb;return _0x555c72[_0x4292ec(0x182)]((_0x1dc744,_0x4fb92c)=>{const _0x3dabbc=_0x4292ec,_0x3008dc=_0x4fb92c<_0x555c72['length']-0x1?_0x555c72[_0x4fb92c+0x1][_0x3dabbc(0x15e)]:undefined;return normalizeJourneyStep(_0x1dc744,_0x3008dc);});}function normalizeJourneyCriteria(_0x43c079){const _0x5f4e43=a150_0x43fb;return{'name':_0x43c079['name'],..._0x43c079['description']!==undefined&&{'description':_0x43c079[_0x5f4e43(0x1fb)]},'segment':_0x43c079[_0x5f4e43(0x1c0)],..._0x43c079['target']&&{'target':normalizeJumpTarget(_0x43c079[_0x5f4e43(0x1ec)])}};}function normalizeJourneyStep(_0x41504c,_0xe68832){const _0x5b6d0c=a150_0x43fb,_0x471af0=_0x41504c['next']!==undefined&&_0x41504c[_0x5b6d0c(0x1e1)]!==_0xe68832,_0x465da5={'type':_0x41504c[_0x5b6d0c(0x213)],'name':_0x41504c['name'],..._0x471af0&&{'next':_0x41504c[_0x5b6d0c(0x1e1)]}};if(_0x5b6d0c(0x1c5)in _0x41504c&&_0x41504c[_0x5b6d0c(0x1c5)])return{..._0x465da5,'with':normalizeStepParams(_0x41504c[_0x5b6d0c(0x213)],_0x41504c[_0x5b6d0c(0x1c5)])};return _0x465da5;}function normalizeStepParams(_0x5bf9e0,_0x5ec225){const _0x44c605=a150_0x43fb;switch(_0x5bf9e0){case _0x44c605(0x20f):{const _0x316a26=_0x5ec225;let _0x4f99aa;return _0x316a26[_0x44c605(0x1a9)]&&(_0x4f99aa={'segment':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1c0)],..._0x316a26[_0x44c605(0x1a9)]['next']!==undefined&&{'next':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1e1)]},..._0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1b7)]&&{'timeout':{'duration':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1b7)]['duration'],'unit':_0x316a26[_0x44c605(0x1a9)]['timeout']['unit'],..._0x316a26[_0x44c605(0x1a9)]['timeout'][_0x44c605(0x1e1)]!==undefined&&{'next':_0x316a26[_0x44c605(0x1a9)][_0x44c605(0x1b7)][_0x44c605(0x1e1)]}}}}),{..._0x316a26[_0x44c605(0x1d2)]!==undefined&&{'duration':_0x316a26[_0x44c605(0x1d2)]},..._0x316a26['unit']!==undefined&&{'unit':_0x316a26[_0x44c605(0x1c4)]},..._0x316a26['wait_until']!==undefined&&{'wait_until':_0x316a26[_0x44c605(0x1d0)]},..._0x316a26['days_of_week']!==undefined&&{'days_of_week':_0x316a26[_0x44c605(0x192)]},..._0x4f99aa&&{'condition':_0x4f99aa}};}case _0x44c605(0x1ac):{const _0x403f52=_0x5ec225;return{'activation':_0x403f52[_0x44c605(0x1ac)]};}case _0x44c605(0x17c):{const _0x4f635b=_0x5ec225;return{'branches':_0x4f635b['branches'][_0x44c605(0x182)](normalizeDecisionBranch)};}case _0x44c605(0x1f3):{const _0x65525f=_0x5ec225;return{..._0x65525f[_0x44c605(0x16d)]!==undefined&&{'customized_split':_0x65525f[_0x44c605(0x16d)]},..._0x65525f['unique_id']!==undefined&&{'unique_id':_0x65525f[_0x44c605(0x1c7)]},'variants':_0x65525f[_0x44c605(0x1cc)][_0x44c605(0x182)](normalizeAbTestVariant)};}case _0x44c605(0x172):{const _0xad1260=_0x5ec225;return{'target':normalizeJumpTarget(_0xad1260['target'])};}default:return _0x5ec225;}}function normalizeDecisionBranch(_0x5012b0){const _0x33a319=a150_0x43fb;return{'name':_0x5012b0[_0x33a319(0x15e)],..._0x5012b0['segment']!==undefined&&{'segment':_0x5012b0['segment']},..._0x5012b0[_0x33a319(0x1eb)]!==undefined&&{'excluded':_0x5012b0[_0x33a319(0x1eb)]},..._0x5012b0['next']!==undefined&&{'next':_0x5012b0[_0x33a319(0x1e1)]}};}function normalizeAbTestVariant(_0xdac08c){const _0x1de183=a150_0x43fb;return{..._0xdac08c['id']!==undefined&&{'id':_0xdac08c['id']},'name':_0xdac08c[_0x1de183(0x15e)],'percentage':_0xdac08c[_0x1de183(0x1e8)],..._0xdac08c['next']!==undefined&&{'next':_0xdac08c['next']}};}function normalizeJumpTarget(_0x2f4c71){const _0x380493=a150_0x43fb;return{'journey':_0x2f4c71[_0x380493(0x1b3)],'stage':_0x2f4c71[_0x380493(0x164)],..._0x2f4c71[_0x380493(0x1e4)]!==undefined&&{'bundle_id':_0x2f4c71[_0x380493(0x1e4)]}};}function normalizeEmbeddedSegments(_0x5bc0cc,_0x6a0902){const _0x2b0400=a150_0x43fb,_0x2578dc={},_0x52c524=Object['keys'](_0x5bc0cc),_0x5de08f=_0x6a0902?[..._0x6a0902[_0x2b0400(0x184)](_0x47b2b4=>_0x52c524['includes'](_0x47b2b4)),..._0x52c524[_0x2b0400(0x184)](_0x11cea3=>!_0x6a0902[_0x2b0400(0x218)](_0x11cea3))['sort']()]:_0x52c524[_0x2b0400(0x219)]();for(const _0x4a9caf of _0x5de08f){const _0x476d58=_0x5bc0cc[_0x4a9caf];if(_0x476d58[_0x2b0400(0x17b)]){const _0x2b9424=_0x476d58[_0x2b0400(0x17b)];if(_0x2b9424[_0x2b0400(0x213)]!==_0x2b0400(0x1a0)&&_0x2b9424[_0x2b0400(0x213)]!=='Or'&&_0x2b9424[_0x2b0400(0x213)]!==_0x2b0400(0x15d)){const _0x5f29c3=_0x2b9424[_0x2b0400(0x213)]??'(missing)';throw new SDKError(ErrorCode[_0x2b0400(0x1e9)],_0x2b0400(0x202)+_0x4a9caf+_0x2b0400(0x168)+('rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27'+_0x5f29c3+'\x27.\x0a')+_0x2b0400(0x1be)+_0x2b0400(0x1a7)+_0x2b0400(0x1ed)+_0x2b0400(0x1fd)+_0x2b0400(0x20d)+_0x2b0400(0x1bd)+_0x2b0400(0x1b6));}if(!_0x2b9424[_0x2b0400(0x1e3)]||!Array['isArray'](_0x2b9424[_0x2b0400(0x1e3)]))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x2b0400(0x202)+_0x4a9caf+_0x2b0400(0x168)+_0x2b0400(0x1fa)+_0x2b0400(0x1be)+_0x2b0400(0x1a7)+(_0x2b0400(0x194)+_0x2b9424[_0x2b0400(0x213)]+'\x0a')+_0x2b0400(0x1fd)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x2b0400(0x1bd)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}_0x2578dc[_0x4a9caf]={..._0x476d58[_0x2b0400(0x1fb)]&&_0x476d58[_0x2b0400(0x1fb)][_0x2b0400(0x1c9)]()&&{'description':_0x476d58[_0x2b0400(0x1fb)]},..._0x476d58['rule']&&{'rule':deepSortObject(_0x476d58[_0x2b0400(0x17b)])}};}return _0x2578dc;}function normalizeEmbeddedActivations(_0x2b145c,_0x405ea9){const _0x1ca433=a150_0x43fb,_0x31ffc6={},_0x5a4e2c=Object['keys'](_0x2b145c),_0x492bb2=_0x405ea9?[..._0x405ea9[_0x1ca433(0x184)](_0x3b4f9c=>_0x5a4e2c[_0x1ca433(0x218)](_0x3b4f9c)),..._0x5a4e2c[_0x1ca433(0x184)](_0x4d9357=>!_0x405ea9['includes'](_0x4d9357))[_0x1ca433(0x219)]()]:_0x5a4e2c[_0x1ca433(0x219)]();for(const _0xc0a9f0 of _0x492bb2){const _0x2f1896=_0x2b145c[_0xc0a9f0];_0x31ffc6[_0xc0a9f0]={'name':_0x2f1896[_0x1ca433(0x15e)],'connection':_0x2f1896['connection'],..._0x2f1896['description']!==undefined&&{'description':_0x2f1896['description']},..._0x2f1896[_0x1ca433(0x201)]!==undefined&&{'all_columns':_0x2f1896['all_columns']},..._0x2f1896[_0x1ca433(0x1a1)]!==undefined&&{'columns':_0x2f1896[_0x1ca433(0x1a1)]},..._0x2f1896['behavior']!==undefined&&{'behavior':_0x2f1896[_0x1ca433(0x1ca)]},..._0x2f1896['schedule']!==undefined&&{'schedule':_0x2f1896[_0x1ca433(0x1cb)]},..._0x2f1896['notification']!==undefined&&{'notification':_0x2f1896[_0x1ca433(0x167)]},..._0x2f1896[_0x1ca433(0x18c)]!==undefined&&{'connector_config':_0x2f1896[_0x1ca433(0x18c)]},..._0x2f1896['activation_template_id']!==undefined&&{'activation_template_id':_0x2f1896[_0x1ca433(0x165)]}};}return _0x31ffc6;}function a150_0x43fb(_0x2cd43a,_0x5058b1){_0x2cd43a=_0x2cd43a-0x15c;const _0x54daa4=a150_0x54da();let _0x43fb52=_0x54daa4[_0x2cd43a];return _0x43fb52;}export function getActiveStages(_0x301e46){const _0x5cce0f=a150_0x43fb;if(isJourneysArrayMode(_0x301e46)){const _0x35997b=_0x301e46[_0x5cce0f(0x1bc)]||[],_0x2dee13=_0x35997b[_0x5cce0f(0x1ee)](_0x3aa739=>_0x3aa739['latest']===!![])||_0x35997b[0x0];return _0x2dee13?.[_0x5cce0f(0x1d4)]||[];}if(isSingleVersionMode(_0x301e46))return _0x301e46[_0x5cce0f(0x1d4)]||[];if(isMultiVersionMode(_0x301e46)){const _0x1cf1fb=_0x301e46[_0x5cce0f(0x1de)]||[],_0xf9a3f0=_0x1cf1fb[_0x5cce0f(0x1ee)](_0xc9e6f4=>_0xc9e6f4['latest']===!![])||_0x1cf1fb[0x0];return _0xf9a3f0?.[_0x5cce0f(0x1d4)]||[];}return[];}export function getLatestJourneyEntry(_0x4bedaa){const _0x47943d=a150_0x43fb;if(isJourneysArrayMode(_0x4bedaa)){const _0x1391bf=_0x4bedaa[_0x47943d(0x1bc)]||[];return _0x1391bf[_0x47943d(0x1ee)](_0x2efed3=>_0x2efed3[_0x47943d(0x174)]===!![])||_0x1391bf[0x0];}if(isMultiVersionMode(_0x4bedaa)){const _0xd9e749=_0x4bedaa['versions']||[],_0x46add3=_0xd9e749[_0x47943d(0x1ee)](_0x159d98=>_0x159d98['latest']===!![])||_0xd9e749[0x0];if(_0x46add3)return{'version':_0x46add3[_0x47943d(0x15e)],'state':_0x46add3['state'],'latest':_0x46add3[_0x47943d(0x174)],'stages':_0x46add3[_0x47943d(0x1d4)],'id':_0x46add3['id'],'version_number':_0x46add3[_0x47943d(0x173)]};}if(isSingleVersionMode(_0x4bedaa))return{'version':_0x4bedaa[_0x47943d(0x1ff)]||'v1','state':_0x47943d(0x181),'stages':_0x4bedaa[_0x47943d(0x1d4)]||[],'id':_0x4bedaa['id'],'version_number':_0x4bedaa[_0x47943d(0x173)],'goal':_0x4bedaa[_0x47943d(0x16c)],'reentry':_0x4bedaa['reentry']};return undefined;}export function getLatestVersion(_0x190cbd){const _0x3be1e0=a150_0x43fb;if(!isMultiVersionMode(_0x190cbd))return undefined;const _0x53f477=_0x190cbd[_0x3be1e0(0x1de)]||[];return _0x53f477[_0x3be1e0(0x1ee)](_0x294f25=>_0x294f25[_0x3be1e0(0x174)]===!![])||_0x53f477[0x0];}export function getEffectiveGoal(_0x2bfdec){const _0x3e42fa=a150_0x43fb,_0x569f75=getLatestJourneyEntry(_0x2bfdec);return _0x569f75?.[_0x3e42fa(0x16c)]||_0x2bfdec[_0x3e42fa(0x16c)];}export function getEffectiveReentry(_0x499755){const _0x70a2d7=getLatestJourneyEntry(_0x499755);return _0x70a2d7?.['reentry']||_0x499755['reentry'];}export function collectSegmentRefs(_0x95272a){const _0x1e78c0=a150_0x43fb,_0x2a6944=new Set();_0x95272a[_0x1e78c0(0x16c)]?.[_0x1e78c0(0x1c0)]&&_0x2a6944[_0x1e78c0(0x161)](_0x95272a['goal']['segment']);const _0x43c603=_0x536678=>{const _0x38f4a3=_0x1e78c0;for(const _0x28d6bb of _0x536678){_0x28d6bb[_0x38f4a3(0x1ad)]?.[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x28d6bb[_0x38f4a3(0x1ad)][_0x38f4a3(0x1c0)]);if(_0x28d6bb[_0x38f4a3(0x1af)])for(const _0x31772a of _0x28d6bb[_0x38f4a3(0x1af)]){_0x31772a[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x31772a[_0x38f4a3(0x1c0)]);}_0x28d6bb[_0x38f4a3(0x1a2)]?.[_0x38f4a3(0x1c0)]&&_0x2a6944['add'](_0x28d6bb[_0x38f4a3(0x1a2)][_0x38f4a3(0x1c0)]);if(_0x28d6bb[_0x38f4a3(0x186)])for(const _0x592cea of _0x28d6bb[_0x38f4a3(0x186)]){if(_0x592cea[_0x38f4a3(0x213)]===_0x38f4a3(0x17c)){const _0x32a944=_0x592cea;for(const _0x186e7f of _0x32a944[_0x38f4a3(0x1c5)][_0x38f4a3(0x1a5)]){_0x186e7f[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x186e7f[_0x38f4a3(0x1c0)]);}}else{if(_0x592cea[_0x38f4a3(0x213)]===_0x38f4a3(0x20f)){const _0x6c0d88=_0x592cea;_0x6c0d88[_0x38f4a3(0x1c5)][_0x38f4a3(0x1a9)]?.[_0x38f4a3(0x1c0)]&&_0x2a6944[_0x38f4a3(0x161)](_0x6c0d88[_0x38f4a3(0x1c5)][_0x38f4a3(0x1a9)][_0x38f4a3(0x1c0)]);}}}}};_0x95272a[_0x1e78c0(0x1d4)]&&_0x43c603(_0x95272a[_0x1e78c0(0x1d4)]);if(_0x95272a[_0x1e78c0(0x1de)])for(const _0xcc5ee0 of _0x95272a['versions']){_0x43c603(_0xcc5ee0['stages']);}return _0x2a6944;}export function validateSegmentRefs(_0x4924b9){const _0x5afac1=a150_0x43fb,_0x5aab9f=[],_0xafb211=collectSegmentRefs(_0x4924b9),_0x123a71=new Set(Object[_0x5afac1(0x1ce)](_0x4924b9[_0x5afac1(0x1c3)]||{}));for(const _0x414936 of _0xafb211){const _0x59a7e0=parseSegmentRef(_0x414936);_0x59a7e0[_0x5afac1(0x213)]===_0x5afac1(0x180)&&!_0x123a71[_0x5afac1(0x21c)](_0x59a7e0[_0x5afac1(0x15e)])&&_0x5aab9f[_0x5afac1(0x1a8)](_0x5afac1(0x198)+_0x59a7e0[_0x5afac1(0x15e)]+_0x5afac1(0x207)+_0x59a7e0[_0x5afac1(0x15e)]+_0x5afac1(0x1e2));}return _0x5aab9f;}export function collectSegmentIdsFromJourneyApi(_0x1719e5){const _0x3b70fe=a150_0x43fb,_0xbdb437=new Set();_0x1719e5[_0x3b70fe(0x1da)][_0x3b70fe(0x16c)]?.[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x1719e5['attributes'][_0x3b70fe(0x16c)][_0x3b70fe(0x200)]);const _0x17f9cb=_0x1719e5[_0x3b70fe(0x1da)][_0x3b70fe(0x1df)];if(Array[_0x3b70fe(0x1d8)](_0x17f9cb))for(const _0x480b58 of _0x17f9cb){_0x480b58['entryCriteria']?.[_0x3b70fe(0x200)]&&_0xbdb437['add'](_0x480b58[_0x3b70fe(0x16b)]['segmentId']);const _0x261f78=_0x480b58[_0x3b70fe(0x171)]??_0x480b58[_0x3b70fe(0x1f4)];if(Array[_0x3b70fe(0x1d8)](_0x261f78))for(const _0x291eea of _0x261f78){_0x291eea[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x291eea['segmentId']);}_0x480b58[_0x3b70fe(0x1a2)]?.[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x480b58[_0x3b70fe(0x1a2)][_0x3b70fe(0x200)]);if(_0x480b58[_0x3b70fe(0x186)]&&typeof _0x480b58[_0x3b70fe(0x186)]===_0x3b70fe(0x21a)){const _0x1e7603=Array['isArray'](_0x480b58[_0x3b70fe(0x186)])?_0x480b58[_0x3b70fe(0x186)]:Object[_0x3b70fe(0x197)](_0x480b58[_0x3b70fe(0x186)]);for(const _0x1a4a43 of _0x1e7603){_0x1a4a43[_0x3b70fe(0x18d)]?.[_0x3b70fe(0x200)]&&_0xbdb437['add'](_0x1a4a43[_0x3b70fe(0x18d)][_0x3b70fe(0x200)]);const _0x32a8e9=_0x1a4a43;_0x32a8e9[_0x3b70fe(0x215)]&&_0xbdb437[_0x3b70fe(0x161)](_0x32a8e9[_0x3b70fe(0x215)]);if(Array[_0x3b70fe(0x1d8)](_0x32a8e9[_0x3b70fe(0x1e3)]))for(const _0x36d0de of _0x32a8e9[_0x3b70fe(0x1e3)]){_0x36d0de['segmentId']&&_0xbdb437[_0x3b70fe(0x161)](_0x36d0de[_0x3b70fe(0x200)]);}if(Array[_0x3b70fe(0x1d8)](_0x1a4a43['branches']))for(const _0x1e3bdf of _0x1a4a43[_0x3b70fe(0x1a5)]){_0x1e3bdf[_0x3b70fe(0x200)]&&_0xbdb437[_0x3b70fe(0x161)](_0x1e3bdf[_0x3b70fe(0x200)]);}}}}return _0xbdb437;}
|
|
1
|
+
const a150_0x1eb89e=a150_0x2299;(function(_0x30ff54,_0xdde782){const _0x4e3c67=a150_0x2299,_0xae5209=_0x30ff54();while(!![]){try{const _0x25438f=-parseInt(_0x4e3c67(0x12b))/0x1+-parseInt(_0x4e3c67(0xbd))/0x2+parseInt(_0x4e3c67(0x12d))/0x3*(-parseInt(_0x4e3c67(0xa6))/0x4)+parseInt(_0x4e3c67(0x108))/0x5+parseInt(_0x4e3c67(0xbe))/0x6*(-parseInt(_0x4e3c67(0xcf))/0x7)+-parseInt(_0x4e3c67(0xa0))/0x8+parseInt(_0x4e3c67(0xcd))/0x9;if(_0x25438f===_0xdde782)break;else _0xae5209['push'](_0xae5209['shift']());}catch(_0x424945){_0xae5209['push'](_0xae5209['shift']());}}}(a150_0x2bce,0x8161c));import*as a150_0x43ba91 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x82d898){const _0x631cd=a150_0x2299,_0x4ab131=_0x82d898[_0x631cd(0xbc)]();if(_0x4ab131===_0x631cd(0xed)||_0x4ab131===_0x631cd(0xd8))return'day';if(_0x4ab131===_0x631cd(0x87)||_0x4ab131===_0x631cd(0xc3))return _0x631cd(0xc3);return _0x82d898;}export function journeyResponseToDefSync(_0x5da6af){const _0x38095b=a150_0x2299,_0x2ce4dd=_0x5da6af[_0x38095b(0x86)],_0x185a40=_0x2ce4dd['journeyBundleName']||_0x2ce4dd[_0x38095b(0xe1)],_0x3a381c={'stages':_0x2ce4dd[_0x38095b(0xbf)][_0x38095b(0x106)](convertApiStageToYaml),'id':_0x5da6af['id']};_0x2ce4dd[_0x38095b(0xff)]&&(_0x3a381c[_0x38095b(0xff)]=convertApiCriteriaToYaml(_0x2ce4dd['goal']));_0x2ce4dd[_0x38095b(0xe1)]&&_0x2ce4dd['name']!==_0x185a40&&(_0x3a381c[_0x38095b(0x88)]=_0x2ce4dd[_0x38095b(0xe1)]);_0x2ce4dd[_0x38095b(0xfc)]!==undefined&&(_0x3a381c[_0x38095b(0xaf)]=_0x2ce4dd[_0x38095b(0xfc)]);_0x2ce4dd[_0x38095b(0xae)]&&(_0x3a381c[_0x38095b(0xae)]=_0x2ce4dd[_0x38095b(0xae)]===_0x38095b(0x11f)?_0x38095b(0x11f):_0x38095b(0xb4));const _0x5bb385={'type':_0x38095b(0x10b),'name':_0x185a40,'journeys':[_0x3a381c]};_0x2ce4dd['description']&&(_0x5bb385['description']=_0x2ce4dd[_0x38095b(0xaa)]);_0x2ce4dd[_0x38095b(0xff)]&&(_0x5bb385[_0x38095b(0xff)]=convertApiCriteriaToYaml(_0x2ce4dd[_0x38095b(0xff)]));if(_0x2ce4dd[_0x38095b(0xf6)])_0x5bb385['reentry']=_0x2ce4dd['reentryMode'];else _0x2ce4dd[_0x38095b(0xab)]!==undefined&&(_0x5bb385['reentry']=_0x2ce4dd[_0x38095b(0xab)]?_0x38095b(0x10a):'no_reentry');return _0x2ce4dd[_0x38095b(0xd3)]&&(_0x5bb385[_0x38095b(0x128)]=_0x2ce4dd['journeyBundleId']),_0x2ce4dd[_0x38095b(0x125)]&&(_0x5bb385[_0x38095b(0xd0)]=_0x2ce4dd[_0x38095b(0x125)]),_0x5da6af[_0x38095b(0xe4)]?.[_0x38095b(0x8b)]?.[_0x38095b(0x105)]?.['id']&&(_0x5bb385[_0x38095b(0x115)]=_0x5da6af['relationships'][_0x38095b(0x8b)][_0x38095b(0x105)]['id']),_0x5bb385;}export async function journeyResponseToDef(_0x273cb5,_0x53b814){const _0x1f2b72=a150_0x2299,_0x51a798=journeyResponseToDefSync(_0x273cb5);if(!_0x53b814)return _0x51a798;const _0x82c6bd=new Set();collectSegmentIdsFromJourney(_0x51a798,_0x82c6bd);const _0x4227d7=new Set();collectActivationIdsFromJourney(_0x51a798,_0x4227d7);const _0x19392f={},_0xd81295=new Map();for(const _0x5f0438 of Array[_0x1f2b72(0x138)](_0x82c6bd)['sort']()){if(_0x53b814[_0x1f2b72(0x80)]){const _0x732fa=await _0x53b814[_0x1f2b72(0x80)](_0x5f0438);if(_0x732fa[_0x1f2b72(0x10c)]){_0xd81295['set'](_0x5f0438,_0x732fa['name']);if(_0x732fa[_0x1f2b72(0xa7)]){const _0x5dffab={..._0x732fa[_0x1f2b72(0xa7)],'rule':deepSortObject(_0x732fa[_0x1f2b72(0xa7)]['rule'])};_0x19392f[_0x732fa['name']]=_0x5dffab;}}else _0xd81295[_0x1f2b72(0xc8)](_0x5f0438,makeSegmentRef(_0x732fa[_0x1f2b72(0xe1)]));}else{if(_0x53b814['resolveSegmentName']){const _0x577c9e=await _0x53b814[_0x1f2b72(0xac)](_0x5f0438);_0xd81295[_0x1f2b72(0xc8)](_0x5f0438,_0x577c9e);}}}const _0xb5d75f={},_0x215b65=new Map();for(const _0x577fd5 of Array[_0x1f2b72(0x138)](_0x4227d7)[_0x1f2b72(0x94)]()){if(_0x53b814[_0x1f2b72(0x13d)]){const _0x13f17f=await _0x53b814[_0x1f2b72(0x13d)](_0x577fd5);_0x13f17f[_0x1f2b72(0x10c)]?(_0x215b65['set'](_0x577fd5,_0x13f17f[_0x1f2b72(0xe1)]),_0x13f17f[_0x1f2b72(0xa7)]&&(_0xb5d75f[_0x13f17f[_0x1f2b72(0xe1)]]=_0x13f17f[_0x1f2b72(0xa7)])):_0x215b65['set'](_0x577fd5,makeSegmentRef(_0x13f17f[_0x1f2b72(0xe1)]));}else{if(_0x53b814['resolveActivationName']){const _0x4c16d5=await _0x53b814[_0x1f2b72(0x9d)](_0x577fd5);_0x215b65[_0x1f2b72(0xc8)](_0x577fd5,_0x4c16d5);}}}_0xd81295[_0x1f2b72(0x103)]>0x0&&replaceSegmentIdsInJourney(_0x51a798,_0xd81295);_0x215b65['size']>0x0&&replaceActivationIdsInJourney(_0x51a798,_0x215b65);if(_0x53b814[_0x1f2b72(0x8c)]){const _0x34fa6b=[];collectJumpTargetsFromJourney(_0x51a798,_0x34fa6b);if(_0x34fa6b[_0x1f2b72(0x114)]>0x0){const _0x143622=new Map();for(const _0x2b5abd of _0x34fa6b){try{const _0x40f32e=await _0x53b814['resolveJumpTarget'](_0x2b5abd[_0x1f2b72(0xc7)],_0x2b5abd[_0x1f2b72(0xca)]);_0x143622[_0x1f2b72(0xc8)](_0x2b5abd['journeyId']+':'+_0x2b5abd[_0x1f2b72(0xca)],_0x40f32e);}catch{}}_0x143622['size']>0x0&&replaceJumpTargetsInJourney(_0x51a798,_0x143622);}}return Object[_0x1f2b72(0xc0)](_0x19392f)[_0x1f2b72(0x114)]>0x0&&(_0x51a798[_0x1f2b72(0xdf)]=_0x19392f),Object[_0x1f2b72(0xc0)](_0xb5d75f)[_0x1f2b72(0x114)]>0x0&&(_0x51a798[_0x1f2b72(0xde)]=_0xb5d75f),_0x51a798;}function collectSegmentIdsFromJourney(_0x46d4b6,_0x35a635){const _0x186d5c=a150_0x2299;_0x46d4b6[_0x186d5c(0xff)]?.[_0x186d5c(0xeb)]&&_0x35a635[_0x186d5c(0x9b)](_0x46d4b6[_0x186d5c(0xff)][_0x186d5c(0xeb)]);const _0x18a0ef=_0x5769f0=>{const _0x1da53f=_0x186d5c;for(const _0x538504 of _0x5769f0){_0x538504[_0x1da53f(0xfe)]?.['segment']&&_0x35a635[_0x1da53f(0x9b)](_0x538504[_0x1da53f(0xfe)][_0x1da53f(0xeb)]);if(_0x538504[_0x1da53f(0x12a)])for(const _0x56f308 of _0x538504[_0x1da53f(0x12a)]){_0x56f308[_0x1da53f(0xeb)]&&_0x35a635['add'](_0x56f308[_0x1da53f(0xeb)]);}_0x538504['milestone']?.['segment']&&_0x35a635['add'](_0x538504['milestone']['segment']);if(_0x538504[_0x1da53f(0x127)])for(const _0x3ec4ea of _0x538504[_0x1da53f(0x127)]){if(_0x3ec4ea[_0x1da53f(0x9f)]==='decision_point'){const _0x56e37d=_0x3ec4ea;for(const _0x3e2040 of _0x56e37d[_0x1da53f(0xd1)][_0x1da53f(0xdd)]){_0x3e2040[_0x1da53f(0xeb)]&&_0x35a635[_0x1da53f(0x9b)](_0x3e2040[_0x1da53f(0xeb)]);}}else{if(_0x3ec4ea['type']===_0x1da53f(0xcc)){const _0x184f96=_0x3ec4ea;_0x184f96[_0x1da53f(0xd1)][_0x1da53f(0xc9)]?.[_0x1da53f(0xeb)]&&_0x35a635[_0x1da53f(0x9b)](_0x184f96[_0x1da53f(0xd1)][_0x1da53f(0xc9)]['segment']);}}}}};if(_0x46d4b6['journeys'])for(const _0x17056e of _0x46d4b6['journeys']){_0x17056e[_0x186d5c(0xff)]?.[_0x186d5c(0xeb)]&&_0x35a635[_0x186d5c(0x9b)](_0x17056e[_0x186d5c(0xff)][_0x186d5c(0xeb)]),_0x18a0ef(_0x17056e[_0x186d5c(0xe3)]);}_0x46d4b6[_0x186d5c(0xe3)]&&_0x18a0ef(_0x46d4b6[_0x186d5c(0xe3)]);if(_0x46d4b6[_0x186d5c(0x98)])for(const _0x2a1fbd of _0x46d4b6[_0x186d5c(0x98)]){_0x18a0ef(_0x2a1fbd[_0x186d5c(0xe3)]);}}function replaceSegmentIdsInJourney(_0x584487,_0xf04c74){const _0x1b670a=a150_0x2299,_0x353a82=_0xb1cf6f=>_0xf04c74['get'](_0xb1cf6f)||_0xb1cf6f;_0x584487[_0x1b670a(0xff)]?.[_0x1b670a(0xeb)]&&(_0x584487[_0x1b670a(0xff)][_0x1b670a(0xeb)]=_0x353a82(_0x584487[_0x1b670a(0xff)][_0x1b670a(0xeb)]));const _0x4bfadd=_0x468cc2=>{const _0x346497=_0x1b670a;for(const _0x4cb3a8 of _0x468cc2){_0x4cb3a8[_0x346497(0xfe)]?.[_0x346497(0xeb)]&&(_0x4cb3a8['entry_criteria'][_0x346497(0xeb)]=_0x353a82(_0x4cb3a8[_0x346497(0xfe)]['segment']));if(_0x4cb3a8[_0x346497(0x12a)])for(const _0x53f840 of _0x4cb3a8['exit_criteria']){_0x53f840[_0x346497(0xeb)]&&(_0x53f840[_0x346497(0xeb)]=_0x353a82(_0x53f840[_0x346497(0xeb)]));}_0x4cb3a8[_0x346497(0x123)]?.[_0x346497(0xeb)]&&(_0x4cb3a8[_0x346497(0x123)]['segment']=_0x353a82(_0x4cb3a8[_0x346497(0x123)][_0x346497(0xeb)]));if(_0x4cb3a8[_0x346497(0x127)])for(const _0x43ed26 of _0x4cb3a8['steps']){if(_0x43ed26[_0x346497(0x9f)]==='decision_point'){const _0x30b972=_0x43ed26;for(const _0x11c2df of _0x30b972['with']['branches']){_0x11c2df[_0x346497(0xeb)]&&(_0x11c2df[_0x346497(0xeb)]=_0x353a82(_0x11c2df['segment']));}}else{if(_0x43ed26['type']===_0x346497(0xcc)){const _0x31766d=_0x43ed26;_0x31766d['with'][_0x346497(0xc9)]?.[_0x346497(0xeb)]&&(_0x31766d[_0x346497(0xd1)][_0x346497(0xc9)]['segment']=_0x353a82(_0x31766d['with'][_0x346497(0xc9)][_0x346497(0xeb)]));}}}}};if(_0x584487[_0x1b670a(0x95)])for(const _0x5c4dda of _0x584487[_0x1b670a(0x95)]){_0x5c4dda[_0x1b670a(0xff)]?.[_0x1b670a(0xeb)]&&(_0x5c4dda[_0x1b670a(0xff)][_0x1b670a(0xeb)]=_0x353a82(_0x5c4dda[_0x1b670a(0xff)][_0x1b670a(0xeb)])),_0x4bfadd(_0x5c4dda[_0x1b670a(0xe3)]);}_0x584487['stages']&&_0x4bfadd(_0x584487[_0x1b670a(0xe3)]);if(_0x584487[_0x1b670a(0x98)])for(const _0x55398b of _0x584487[_0x1b670a(0x98)]){_0x4bfadd(_0x55398b['stages']);}}function collectActivationIdsFromJourney(_0xbe334,_0x262bc0){const _0x72a6a1=a150_0x2299,_0x4ae883=_0x9608=>{const _0x560040=a150_0x2299;for(const _0x3d98d1 of _0x9608){if(_0x3d98d1[_0x560040(0x127)])for(const _0x514042 of _0x3d98d1[_0x560040(0x127)]){if(_0x514042[_0x560040(0x9f)]===_0x560040(0x101)){const _0x6e6dbd=_0x514042;_0x6e6dbd[_0x560040(0xd1)][_0x560040(0x101)]&&/^\d+$/['test'](_0x6e6dbd[_0x560040(0xd1)][_0x560040(0x101)])&&_0x262bc0[_0x560040(0x9b)](_0x6e6dbd[_0x560040(0xd1)][_0x560040(0x101)]);}}}};if(_0xbe334[_0x72a6a1(0x95)])for(const _0x131a1f of _0xbe334['journeys']){_0x4ae883(_0x131a1f[_0x72a6a1(0xe3)]);}_0xbe334[_0x72a6a1(0xe3)]&&_0x4ae883(_0xbe334[_0x72a6a1(0xe3)]);if(_0xbe334['versions'])for(const _0x299bf3 of _0xbe334['versions']){_0x4ae883(_0x299bf3['stages']);}}function replaceActivationIdsInJourney(_0x4848cf,_0x42115b){const _0x410a7e=a150_0x2299,_0x33e673=_0x3a8ce4=>_0x42115b[_0x410a7e(0xd7)](_0x3a8ce4)||_0x3a8ce4,_0xc32aa2=_0x40aa4d=>{const _0xb7cef4=_0x410a7e;for(const _0xa6adde of _0x40aa4d){if(_0xa6adde[_0xb7cef4(0x127)])for(const _0x2f0b93 of _0xa6adde[_0xb7cef4(0x127)]){if(_0x2f0b93['type']==='activation'){const _0x4d5620=_0x2f0b93;_0x4d5620[_0xb7cef4(0xd1)][_0xb7cef4(0x101)]&&(_0x4d5620[_0xb7cef4(0xd1)][_0xb7cef4(0x101)]=_0x33e673(_0x4d5620['with'][_0xb7cef4(0x101)]));}}}};if(_0x4848cf[_0x410a7e(0x95)])for(const _0x26989f of _0x4848cf[_0x410a7e(0x95)]){_0xc32aa2(_0x26989f[_0x410a7e(0xe3)]);}_0x4848cf['stages']&&_0xc32aa2(_0x4848cf[_0x410a7e(0xe3)]);if(_0x4848cf['versions'])for(const _0x4c6c75 of _0x4848cf[_0x410a7e(0x98)]){_0xc32aa2(_0x4c6c75[_0x410a7e(0xe3)]);}}function collectJumpTargetsFromJourney(_0x1bc160,_0x20c579){const _0x1dfb78=a150_0x2299,_0x15dc3b=new Set(),_0x394512=_0x5c6970=>{const _0x1ecb0b=a150_0x2299;for(const _0x4a3620 of _0x5c6970){if(_0x4a3620[_0x1ecb0b(0x127)])for(const _0x57578b of _0x4a3620['steps']){if(_0x57578b[_0x1ecb0b(0x9f)]==='jump'){const _0x414301=_0x57578b,_0x293fb7=_0x414301['with'][_0x1ecb0b(0xa1)];if(_0x293fb7[_0x1ecb0b(0x10b)]&&_0x293fb7[_0x1ecb0b(0xce)]&&/^\d+$/[_0x1ecb0b(0x13a)](_0x293fb7[_0x1ecb0b(0x10b)])&&/^\d+$/[_0x1ecb0b(0x13a)](_0x293fb7['stage'])){const _0x4fc115=_0x293fb7['journey']+':'+_0x293fb7[_0x1ecb0b(0xce)];!_0x15dc3b['has'](_0x4fc115)&&(_0x15dc3b['add'](_0x4fc115),_0x20c579[_0x1ecb0b(0xd9)]({'journeyId':_0x293fb7[_0x1ecb0b(0x10b)],'stageId':_0x293fb7[_0x1ecb0b(0xce)]}));}}}}};if(_0x1bc160[_0x1dfb78(0x95)])for(const _0x4e8f67 of _0x1bc160[_0x1dfb78(0x95)]){_0x394512(_0x4e8f67[_0x1dfb78(0xe3)]);}_0x1bc160['stages']&&_0x394512(_0x1bc160[_0x1dfb78(0xe3)]);if(_0x1bc160[_0x1dfb78(0x98)])for(const _0x5baa7e of _0x1bc160[_0x1dfb78(0x98)]){_0x394512(_0x5baa7e[_0x1dfb78(0xe3)]);}}function replaceJumpTargetsInJourney(_0x1691f4,_0x38a25d){const _0x2c97d4=a150_0x2299,_0x577a66=_0x1158d0=>{const _0x41cd74=a150_0x2299;for(const _0x3fa5c4 of _0x1158d0){if(_0x3fa5c4[_0x41cd74(0x127)])for(const _0x4704d4 of _0x3fa5c4[_0x41cd74(0x127)]){if(_0x4704d4[_0x41cd74(0x9f)]===_0x41cd74(0x111)){const _0x1149db=_0x4704d4,_0x1c4f39=_0x1149db['with'][_0x41cd74(0xa1)],_0x1e52de=_0x1c4f39[_0x41cd74(0x10b)]+':'+_0x1c4f39['stage'],_0xf22b9f=_0x38a25d[_0x41cd74(0xd7)](_0x1e52de);_0xf22b9f&&(_0x1c4f39[_0x41cd74(0x10b)]=_0xf22b9f[_0x41cd74(0xf0)],_0x1c4f39[_0x41cd74(0xce)]=_0xf22b9f['stageName']);}}}};if(_0x1691f4['journeys'])for(const _0x41d00a of _0x1691f4[_0x2c97d4(0x95)]){_0x577a66(_0x41d00a[_0x2c97d4(0xe3)]);}_0x1691f4[_0x2c97d4(0xe3)]&&_0x577a66(_0x1691f4[_0x2c97d4(0xe3)]);if(_0x1691f4[_0x2c97d4(0x98)])for(const _0x53c648 of _0x1691f4[_0x2c97d4(0x98)]){_0x577a66(_0x53c648[_0x2c97d4(0xe3)]);}}function generateReadableStepName(_0x13ac5b,_0x40e322){const _0x7eefdc=a150_0x2299;if(_0x13ac5b[_0x7eefdc(0xe1)]&&_0x13ac5b[_0x7eefdc(0xe1)]!==_0x13ac5b[_0x7eefdc(0x9f)]){const _0x50981c=_0x13ac5b[_0x7eefdc(0xe1)][_0x7eefdc(0x107)]();if(_0x50981c&&/[a-z0-9\p{L}]/iu[_0x7eefdc(0x13a)](_0x50981c))return _0x50981c;}const _0x4007ee=_0x13ac5b[_0x7eefdc(0x9f)]['toLowerCase']()[_0x7eefdc(0x99)](/step$/i,'');return _0x4007ee+'_'+(_0x40e322+0x1);}function getStepNextRefs(_0x10fb5f){const _0x2e5c7c=a150_0x2299,_0x12327d=[];if(_0x10fb5f['next'])_0x12327d[_0x2e5c7c(0xd9)](_0x10fb5f[_0x2e5c7c(0xa5)]);if(_0x10fb5f['branches'])for(const _0x242a2d of _0x10fb5f[_0x2e5c7c(0xdd)]){if(_0x242a2d[_0x2e5c7c(0xa5)])_0x12327d[_0x2e5c7c(0xd9)](_0x242a2d['next']);}if(_0x10fb5f[_0x2e5c7c(0xf5)])for(const _0x4d5a03 of _0x10fb5f[_0x2e5c7c(0xf5)]){if(_0x4d5a03['next'])_0x12327d[_0x2e5c7c(0xd9)](_0x4d5a03[_0x2e5c7c(0xa5)]);}if(_0x10fb5f[_0x2e5c7c(0x124)])for(const _0x44146b of _0x10fb5f[_0x2e5c7c(0x124)]){if(_0x44146b['next'])_0x12327d[_0x2e5c7c(0xd9)](_0x44146b[_0x2e5c7c(0xa5)]);}return _0x12327d;}function parseJumpTargetDisplayName(_0xa97544){const _0x49598c=a150_0x2299,_0x1ccd61=_0xa97544['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0x1ccd61)return undefined;const _0x2cc98c=_0x1ccd61[0x1][_0x49598c(0x107)](),_0x4f3604=_0x1ccd61[0x2][_0x49598c(0x107)]();if(!_0x2cc98c||!_0x4f3604)return undefined;return{'stageName':_0x2cc98c,'journeyName':_0x4f3604};}function orderStepsFromRoot(_0x2161af,_0x4e9db0){const _0x43f43f=a150_0x2299,_0x432c0c=Object[_0x43f43f(0xb9)](_0x2161af);if(_0x432c0c[_0x43f43f(0x114)]===0x0)return[];const _0xc7722f=new Set(_0x432c0c[_0x43f43f(0x106)](([_0x294ffe])=>_0x294ffe)),_0x5a16fa=new Set();for(const [,_0x1e8248]of _0x432c0c){for(const _0x1e504d of getStepNextRefs(_0x1e8248)){if(_0xc7722f[_0x43f43f(0xf3)](_0x1e504d))_0x5a16fa['add'](_0x1e504d);}}let _0x3d98f0=_0x4e9db0&&_0xc7722f['has'](_0x4e9db0)?_0x4e9db0:undefined;if(!_0x3d98f0){const _0x2f13ff=_0x432c0c[_0x43f43f(0xc2)](([_0x332eea])=>!_0x5a16fa[_0x43f43f(0xf3)](_0x332eea));_0x2f13ff[_0x43f43f(0x114)]>0x0?_0x3d98f0=_0x2f13ff[0x0][0x0]:_0x3d98f0=_0x432c0c[0x0][0x0];}const _0x45b5cc=[],_0x531ea2=new Set(),_0x59d553=[_0x3d98f0];while(_0x59d553['length']>0x0){const _0x4267a6=_0x59d553['shift']();if(_0x531ea2[_0x43f43f(0xf3)](_0x4267a6))continue;_0x531ea2[_0x43f43f(0x9b)](_0x4267a6);const _0x5d072b=_0x2161af[_0x4267a6];if(!_0x5d072b)continue;_0x45b5cc[_0x43f43f(0xd9)]({'uuid':_0x4267a6,'step':_0x5d072b});for(const _0x3c39f0 of getStepNextRefs(_0x5d072b)){_0xc7722f['has'](_0x3c39f0)&&!_0x531ea2[_0x43f43f(0xf3)](_0x3c39f0)&&_0x59d553[_0x43f43f(0xd9)](_0x3c39f0);}}for(const [_0x3c9309,_0x450034]of _0x432c0c){!_0x531ea2[_0x43f43f(0xf3)](_0x3c9309)&&_0x45b5cc[_0x43f43f(0xd9)]({'uuid':_0x3c9309,'step':_0x450034});}return _0x45b5cc;}function resolveStepReferences(_0xb60606,_0x3760a3,_0x4be164,_0x3f9088){const _0xae4bfc=a150_0x2299;if(_0xb60606[_0xae4bfc(0x9f)]!==_0xae4bfc(0x10d)){_0xb60606[_0xae4bfc(0xa5)]&&_0x3f9088[_0xae4bfc(0xf3)](_0xb60606['next'])&&(_0xb60606[_0xae4bfc(0xa5)]=_0x3f9088[_0xae4bfc(0xd7)](_0xb60606[_0xae4bfc(0xa5)]));const _0xd5cc83=_0x3760a3+0x1;if(_0xd5cc83<_0x4be164[_0xae4bfc(0x114)]){const _0x41c32d=_0x3f9088[_0xae4bfc(0xd7)](_0x4be164[_0xd5cc83]['uuid']);_0xb60606[_0xae4bfc(0xa5)]===_0x41c32d&&delete _0xb60606['next'];}}if(_0xb60606['type']==='decision_point')for(const _0x3a8d4c of _0xb60606[_0xae4bfc(0xd1)][_0xae4bfc(0xdd)]){_0x3a8d4c['next']&&_0x3f9088[_0xae4bfc(0xf3)](_0x3a8d4c[_0xae4bfc(0xa5)])&&(_0x3a8d4c[_0xae4bfc(0xa5)]=_0x3f9088[_0xae4bfc(0xd7)](_0x3a8d4c[_0xae4bfc(0xa5)]));}if(_0xb60606[_0xae4bfc(0x9f)]==='ab_test')for(const _0x44a6e8 of _0xb60606['with'][_0xae4bfc(0xf5)]){_0x44a6e8['next']&&_0x3f9088[_0xae4bfc(0xf3)](_0x44a6e8[_0xae4bfc(0xa5)])&&(_0x44a6e8['next']=_0x3f9088[_0xae4bfc(0xd7)](_0x44a6e8['next']));}if(_0xb60606[_0xae4bfc(0x9f)]===_0xae4bfc(0xcc)&&_0xb60606[_0xae4bfc(0xd1)][_0xae4bfc(0xc9)]){const _0x1f0a8b=_0xb60606[_0xae4bfc(0xd1)][_0xae4bfc(0xc9)];_0x1f0a8b['next']&&_0x3f9088[_0xae4bfc(0xf3)](_0x1f0a8b[_0xae4bfc(0xa5)])&&(_0x1f0a8b[_0xae4bfc(0xa5)]=_0x3f9088['get'](_0x1f0a8b[_0xae4bfc(0xa5)])),_0x1f0a8b[_0xae4bfc(0xd2)]?.[_0xae4bfc(0xa5)]&&_0x3f9088[_0xae4bfc(0xf3)](_0x1f0a8b[_0xae4bfc(0xd2)][_0xae4bfc(0xa5)])&&(_0x1f0a8b[_0xae4bfc(0xd2)]['next']=_0x3f9088[_0xae4bfc(0xd7)](_0x1f0a8b[_0xae4bfc(0xd2)][_0xae4bfc(0xa5)]));}}function convertApiStageToYaml(_0x5cfea9){const _0x53ca7a=a150_0x2299,_0xc56d48={'name':_0x5cfea9[_0x53ca7a(0xe1)]};_0x5cfea9['id']&&(_0xc56d48['id']=_0x5cfea9['id']);_0x5cfea9[_0x53ca7a(0xaa)]&&(_0xc56d48[_0x53ca7a(0xaa)]=_0x5cfea9[_0x53ca7a(0xaa)]);_0x5cfea9[_0x53ca7a(0xb7)]&&(_0xc56d48['entry_criteria']=convertApiCriteriaToYaml(_0x5cfea9[_0x53ca7a(0xb7)]));_0x5cfea9['exitCriterias']&&_0x5cfea9[_0x53ca7a(0x11a)][_0x53ca7a(0x114)]>0x0&&(_0xc56d48[_0x53ca7a(0x12a)]=_0x5cfea9[_0x53ca7a(0x11a)][_0x53ca7a(0x106)](convertApiCriteriaToYaml));_0x5cfea9[_0x53ca7a(0x123)]&&(_0xc56d48['milestone']=convertApiCriteriaToYaml(_0x5cfea9[_0x53ca7a(0x123)]));if(_0x5cfea9[_0x53ca7a(0x127)]&&Object[_0x53ca7a(0xc0)](_0x5cfea9[_0x53ca7a(0x127)])['length']>0x0){const _0x514c8f=orderStepsFromRoot(_0x5cfea9[_0x53ca7a(0x127)],_0x5cfea9[_0x53ca7a(0x83)]),_0x1bb749=new Map(),_0x33be87=new Set();for(let _0x4bbb25=0x0;_0x4bbb25<_0x514c8f[_0x53ca7a(0x114)];_0x4bbb25++){const {uuid:_0x5938c3,step:_0x262d1b}=_0x514c8f[_0x4bbb25];let _0x5c035a=generateReadableStepName(_0x262d1b,_0x4bbb25),_0x9ab3b=_0x5c035a,_0x22aedd=0x2;while(_0x33be87[_0x53ca7a(0xf3)](_0x9ab3b)){_0x9ab3b=_0x5c035a+'_'+_0x22aedd,_0x22aedd++;}_0x33be87['add'](_0x9ab3b),_0x1bb749[_0x53ca7a(0xc8)](_0x5938c3,_0x9ab3b);}_0xc56d48[_0x53ca7a(0x127)]=_0x514c8f[_0x53ca7a(0x106)](({uuid:_0x17b68e,step:_0x551c67},_0x32ab55)=>{const _0x15ecdd=convertApiStepToYaml(_0x551c67,_0x1bb749['get'](_0x17b68e));return resolveStepReferences(_0x15ecdd,_0x32ab55,_0x514c8f,_0x1bb749),_0x15ecdd;});}return _0xc56d48;}function convertApiCriteriaToYaml(_0x5e9226){const _0x56700c=a150_0x2299,_0x4c886f={'name':_0x5e9226[_0x56700c(0xe1)],'segment':_0x5e9226['segmentId']};_0x5e9226['description']&&(_0x4c886f['description']=_0x5e9226[_0x56700c(0xaa)]);if(_0x5e9226[_0x56700c(0xa1)]){let _0xb26ce1=_0x5e9226[_0x56700c(0xa1)][_0x56700c(0xc7)],_0x3bb2be=_0x5e9226['target'][_0x56700c(0x84)];if(_0x5e9226['target'][_0x56700c(0xf0)]){const _0x5252a2=parseJumpTargetDisplayName(_0x5e9226[_0x56700c(0xa1)][_0x56700c(0xf0)]);_0x5252a2&&(_0x3bb2be=_0x5252a2['stageName'],_0xb26ce1=_0x5252a2[_0x56700c(0xf0)]);}_0x4c886f[_0x56700c(0xa1)]={'journey':_0xb26ce1,'stage':_0x3bb2be},_0x5e9226[_0x56700c(0xa1)][_0x56700c(0xd3)]&&(_0x4c886f[_0x56700c(0xa1)][_0x56700c(0x128)]=_0x5e9226[_0x56700c(0xa1)][_0x56700c(0xd3)]);}return _0x4c886f;}function convertApiStepToYaml(_0x50c017,_0x1f961c){const _0x55fc8c=a150_0x2299;switch(_0x50c017['type']){case _0x55fc8c(0xb3):{const _0x35ff3f={};if(_0x50c017['waitStepType']===_0x55fc8c(0x10e)&&_0x50c017[_0x55fc8c(0x118)]!==undefined)_0x35ff3f[_0x55fc8c(0x122)]=_0x50c017[_0x55fc8c(0x118)],_0x35ff3f[_0x55fc8c(0xa2)]=_0x50c017[_0x55fc8c(0xf2)];else{if(_0x50c017[_0x55fc8c(0xb5)]===_0x55fc8c(0xa4)&&_0x50c017[_0x55fc8c(0xe6)])_0x35ff3f['wait_until']=_0x50c017[_0x55fc8c(0xe6)];else{if(_0x50c017[_0x55fc8c(0xb5)]===_0x55fc8c(0x135)&&_0x50c017['daysOfWeek'])_0x35ff3f[_0x55fc8c(0x113)]=_0x50c017['daysOfWeek'];else{if(_0x50c017[_0x55fc8c(0xb5)]===_0x55fc8c(0x7f)){if(_0x50c017[_0x55fc8c(0x124)]&&_0x50c017['conditions'][_0x55fc8c(0x114)]>0x0){const _0x3db991=_0x50c017[_0x55fc8c(0x124)][_0x55fc8c(0xfd)](_0x291e21=>!_0x291e21[_0x55fc8c(0xb1)]),_0x5227be=_0x50c017[_0x55fc8c(0x124)][_0x55fc8c(0xfd)](_0x229b62=>_0x229b62['timedOutPath']);_0x3db991?.[_0x55fc8c(0x9a)]&&(_0x35ff3f[_0x55fc8c(0xc9)]={'segment':_0x3db991[_0x55fc8c(0x9a)],..._0x3db991['next']?{'next':_0x3db991[_0x55fc8c(0xa5)]}:{}},_0x5227be&&_0x5227be[_0x55fc8c(0x8d)]!==undefined&&_0x5227be['unit']&&(_0x35ff3f[_0x55fc8c(0xc9)][_0x55fc8c(0xd2)]={'duration':_0x5227be[_0x55fc8c(0x8d)],'unit':_0x5227be[_0x55fc8c(0xa2)],..._0x5227be[_0x55fc8c(0xa5)]?{'next':_0x5227be[_0x55fc8c(0xa5)]}:{}}));}else _0x50c017[_0x55fc8c(0xe8)]&&(_0x35ff3f['condition']={'segment':_0x50c017[_0x55fc8c(0xe8)]},_0x50c017[_0x55fc8c(0x102)]!==undefined&&_0x50c017['conditionTimeoutUnit']&&(_0x35ff3f['condition']['timeout']={'duration':_0x50c017[_0x55fc8c(0x102)],'unit':_0x50c017['conditionTimeoutUnit']}));}}}}const _0x3697b3={'type':_0x55fc8c(0xcc),'name':_0x1f961c,..._0x50c017[_0x55fc8c(0xa5)]?{'next':_0x50c017[_0x55fc8c(0xa5)]}:{},'with':_0x35ff3f};return _0x3697b3;}case _0x55fc8c(0xfb):{const _0x54ead4={'type':_0x55fc8c(0x101),'name':_0x1f961c,..._0x50c017[_0x55fc8c(0xa5)]?{'next':_0x50c017[_0x55fc8c(0xa5)]}:{},'with':{'activation':_0x50c017[_0x55fc8c(0x132)]||''}};return _0x54ead4;}case _0x55fc8c(0xba):{const _0x39bb0a={'type':_0x55fc8c(0x104),'name':_0x1f961c,..._0x50c017[_0x55fc8c(0xa5)]?{'next':_0x50c017[_0x55fc8c(0xa5)]}:{},'with':{'branches':(_0x50c017[_0x55fc8c(0xdd)]||[])[_0x55fc8c(0x106)](_0x213f94=>({'name':_0x213f94[_0x55fc8c(0xe1)],'segment':_0x213f94[_0x55fc8c(0x9a)],'excluded':_0x213f94['excludedPath'],..._0x213f94['next']?{'next':_0x213f94[_0x55fc8c(0xa5)]}:{}}))}};return _0x39bb0a;}case _0x55fc8c(0x12e):case _0x55fc8c(0x137):case _0x55fc8c(0xc1):{const _0x2cca7b=_0x50c017[_0x55fc8c(0xf5)]||(_0x50c017[_0x55fc8c(0xdd)]||[])['map'](_0x51512a=>({'name':_0x51512a[_0x55fc8c(0xe1)],'percentage':0x0,'next':_0x51512a[_0x55fc8c(0xa5)]})),_0x14b6a2={'type':_0x55fc8c(0xf9),'name':_0x1f961c,..._0x50c017['next']?{'next':_0x50c017[_0x55fc8c(0xa5)]}:{},'with':{'customized_split':_0x50c017[_0x55fc8c(0x89)],'unique_id':_0x50c017[_0x55fc8c(0xc4)],'variants':_0x2cca7b[_0x55fc8c(0x106)](_0x175fb0=>({'name':_0x175fb0['name'],'percentage':_0x175fb0[_0x55fc8c(0x139)],..._0x175fb0[_0x55fc8c(0xa5)]?{'next':_0x175fb0['next']}:{}}))}};return _0x14b6a2;}case _0x55fc8c(0xc6):{const _0x11fdd3={'type':_0x55fc8c(0x8a),'name':_0x1f961c,..._0x50c017[_0x55fc8c(0xa5)]?{'next':_0x50c017[_0x55fc8c(0xa5)]}:{}};return _0x11fdd3;}case'Jump':{let _0x39e5cf='',_0xb657cf='',_0x44a961;if(_0x50c017[_0x55fc8c(0xa1)]){_0x39e5cf=_0x50c017[_0x55fc8c(0xa1)]['journeyId'],_0xb657cf=_0x50c017[_0x55fc8c(0xa1)][_0x55fc8c(0x84)],_0x44a961=_0x50c017[_0x55fc8c(0xa1)][_0x55fc8c(0xd3)];if(_0x50c017[_0x55fc8c(0xa1)]['journeyName']){const _0x395725=parseJumpTargetDisplayName(_0x50c017['target'][_0x55fc8c(0xf0)]);_0x395725&&(_0xb657cf=_0x395725[_0x55fc8c(0x9c)],_0x39e5cf=_0x395725[_0x55fc8c(0xf0)]);}}const _0x213483={'type':'jump','name':_0x1f961c,..._0x50c017[_0x55fc8c(0xa5)]?{'next':_0x50c017[_0x55fc8c(0xa5)]}:{},'with':{'target':{'journey':_0x39e5cf,'stage':_0xb657cf,..._0x44a961?{'bundle_id':_0x44a961}:{}}}};return _0x213483;}case _0x55fc8c(0x117):{const _0x366c1d={'type':_0x55fc8c(0x10d),'name':_0x1f961c};return _0x366c1d;}default:{const _0x4eea5e={'type':_0x55fc8c(0x10d),'name':_0x1f961c};return _0x4eea5e;}}}export async function journeyDefToRequest(_0x443b1b,_0x439105,_0x40870f){const _0x4213d0=a150_0x2299,_0x10700a=_0x443b1b['stages']||getActiveStages(_0x443b1b),_0x5a0560=isJourneysArrayMode(_0x443b1b)||isMultiVersionMode(_0x443b1b)?getLatestJourneyEntry(_0x443b1b):undefined,_0x509c37=_0x5a0560?.['version']??_0x443b1b[_0x4213d0(0xe1)],_0x2e32ef=_0x443b1b[_0x4213d0(0xdf)]||{},_0x2db8f7=_0x443b1b[_0x4213d0(0xde)]||{},_0x9e85b1={'type':_0x4213d0(0x10b),'attributes':{'name':_0x509c37,'audienceId':_0x439105,'journeyStages':await Promise[_0x4213d0(0xe9)](_0x10700a[_0x4213d0(0x106)](_0xa77388=>convertYamlStageToApi(_0xa77388,_0x40870f,_0x2e32ef,_0x2db8f7)))}},_0x1d7378=_0x5a0560?.['id']??_0x443b1b['id'];_0x1d7378&&(_0x9e85b1['id']=_0x1d7378);_0x443b1b['description']&&(_0x9e85b1['attributes'][_0x4213d0(0xaa)]=_0x443b1b[_0x4213d0(0xaa)]);const _0x3e0986=getEffectiveGoal(_0x443b1b);_0x3e0986&&(_0x9e85b1['attributes']['goal']=await convertYamlCriteriaToApi(_0x3e0986,_0x40870f,_0x2e32ef));const _0x5eef1a=getEffectiveReentry(_0x443b1b);return _0x5eef1a&&(_0x9e85b1[_0x4213d0(0x86)][_0x4213d0(0xf6)]=_0x5eef1a,_0x9e85b1['attributes'][_0x4213d0(0xab)]=_0x5eef1a!=='no_reentry'),_0x443b1b['folder_id']&&(_0x9e85b1[_0x4213d0(0xe4)]={'parentFolder':{'data':{'id':_0x443b1b[_0x4213d0(0x115)],'type':_0x4213d0(0xcb)}}}),_0x9e85b1;}async function convertYamlStageToApi(_0x16610e,_0x436f34,_0x2ec3ea={},_0x415647={}){const _0xf1b19b=a150_0x2299,_0x147d47={'name':_0x16610e[_0xf1b19b(0xe1)]};_0x16610e['id']&&(_0x147d47['id']=_0x16610e['id']);_0x16610e[_0xf1b19b(0xaa)]&&(_0x147d47['description']=_0x16610e[_0xf1b19b(0xaa)]);_0x16610e[_0xf1b19b(0xfe)]&&(_0x147d47[_0xf1b19b(0xb7)]=await convertYamlCriteriaToApi(_0x16610e[_0xf1b19b(0xfe)],_0x436f34,_0x2ec3ea));_0x16610e[_0xf1b19b(0x12a)]&&_0x16610e[_0xf1b19b(0x12a)][_0xf1b19b(0x114)]>0x0&&(_0x147d47['exitCriterias']=await Promise['all'](_0x16610e['exit_criteria'][_0xf1b19b(0x106)](_0x25feba=>convertYamlCriteriaToApi(_0x25feba,_0x436f34,_0x2ec3ea))));_0x16610e['milestone']&&(_0x147d47['milestone']=await convertYamlCriteriaToApi(_0x16610e[_0xf1b19b(0x123)],_0x436f34,_0x2ec3ea));if(_0x16610e[_0xf1b19b(0x127)]&&_0x16610e[_0xf1b19b(0x127)][_0xf1b19b(0x114)]>0x0){const _0x5079c0={},_0x5d2a70=_0x16610e[_0xf1b19b(0x127)][_0xf1b19b(0x106)]((_0x19e26d,_0x3e091f)=>{const _0x597b46=_0xf1b19b,_0x189863=_0x19e26d['uuid']||generateUUID(),_0x132f78=_0x19e26d[_0x597b46(0xe1)]||_0x19e26d[_0x597b46(0x9f)]+'_'+_0x3e091f;return _0x5079c0[_0x132f78]=_0x189863,{..._0x19e26d,'name':_0x132f78};});_0x147d47[_0xf1b19b(0x83)]=_0x5079c0[_0x5d2a70[0x0]['name']],_0x147d47['steps']={};for(let _0x51fbc5=0x0;_0x51fbc5<_0x5d2a70[_0xf1b19b(0x114)];_0x51fbc5++){const _0x1d64fa=_0x5d2a70[_0x51fbc5],_0x5546cb=_0x5079c0[_0x1d64fa[_0xf1b19b(0xe1)]],_0x50f8e6=!_0x1d64fa[_0xf1b19b(0xa5)]&&_0x51fbc5<_0x5d2a70[_0xf1b19b(0x114)]-0x1&&_0x1d64fa[_0xf1b19b(0x9f)]!==_0xf1b19b(0x10d)?_0x5d2a70[_0x51fbc5+0x1][_0xf1b19b(0xe1)]:_0x1d64fa[_0xf1b19b(0xa5)],_0x54a0b9=_0x50f8e6!==_0x1d64fa['next']?{..._0x1d64fa,'next':_0x50f8e6}:_0x1d64fa;_0x147d47[_0xf1b19b(0x127)][_0x5546cb]=await convertYamlStepToApi(_0x54a0b9,_0x436f34,_0x2ec3ea,_0x5079c0,_0x415647);}}else _0x16610e[_0xf1b19b(0x81)]&&(_0x147d47['rootStep']=_0x16610e['root_step']);return _0x147d47;}async function convertYamlCriteriaToApi(_0x2c7b95,_0x516002,_0x5758b1={}){const _0x58dd79=a150_0x2299;let _0x5448aa=_0x2c7b95[_0x58dd79(0xeb)];if(_0x5448aa&&!/^\d+$/[_0x58dd79(0x13a)](_0x5448aa)){const _0x16b1c8=parseSegmentRef(_0x5448aa);if(_0x16b1c8['type']===_0x58dd79(0x13c))_0x516002?.[_0x58dd79(0x11d)]&&(_0x5448aa=await _0x516002['resolveSegmentId'](_0x16b1c8[_0x58dd79(0xe1)]));else{if(_0x16b1c8[_0x58dd79(0x9f)]===_0x58dd79(0xb0)&&_0x5758b1[_0x16b1c8[_0x58dd79(0xe1)]])_0x516002?.[_0x58dd79(0x97)]&&(_0x5448aa=await _0x516002[_0x58dd79(0x97)](_0x16b1c8['name'],_0x5758b1[_0x16b1c8[_0x58dd79(0xe1)]]));else _0x516002?.['resolveSegmentId']&&(_0x5448aa=await _0x516002[_0x58dd79(0x11d)](_0x16b1c8[_0x58dd79(0xe1)]));}}const _0x443556={'name':_0x2c7b95['name'],'segmentId':_0x5448aa};_0x2c7b95['description']&&(_0x443556[_0x58dd79(0xaa)]=_0x2c7b95[_0x58dd79(0xaa)]);if(_0x2c7b95[_0x58dd79(0xa1)]){const _0x5ecdc0=_0x2c7b95[_0x58dd79(0xa1)][_0x58dd79(0x10b)],_0x54e1ed=_0x2c7b95['target'][_0x58dd79(0xce)];let _0x31eaf7=_0x2c7b95[_0x58dd79(0xa1)]['journey'];_0x516002?.[_0x58dd79(0xb6)]&&!/^\d+$/[_0x58dd79(0x13a)](_0x31eaf7)&&(_0x31eaf7=await _0x516002['resolveJourneyId'](_0x31eaf7));let _0x8e4905=_0x2c7b95[_0x58dd79(0xa1)][_0x58dd79(0xce)];_0x516002?.['resolveStageId']&&!/^\d+$/[_0x58dd79(0x13a)](_0x8e4905)&&(_0x8e4905=await _0x516002[_0x58dd79(0x82)](_0x31eaf7,_0x8e4905));const _0x1c2599=!/^\d+$/[_0x58dd79(0x13a)](_0x5ecdc0)&&!isLocalJourneyRef(_0x5ecdc0)?formatApiJourneyName(_0x5ecdc0,_0x54e1ed):undefined;_0x443556[_0x58dd79(0xa1)]={'journeyId':_0x31eaf7,'journeyStageId':_0x8e4905,'journeyName':_0x1c2599,'confirmed':!![]},_0x2c7b95[_0x58dd79(0xa1)][_0x58dd79(0x128)]&&(_0x443556[_0x58dd79(0xa1)][_0x58dd79(0xd3)]=_0x2c7b95['target'][_0x58dd79(0x128)]);}return _0x443556;}async function convertYamlStepToApi(_0x469cfc,_0x5c45a9,_0x3ad46a={},_0x4c6e39={},_0x49f9dc={}){const _0xa37f1e=a150_0x2299,_0x375f24=async _0x3ec728=>{const _0x311ff1=a150_0x2299;if(/^\d+$/[_0x311ff1(0x13a)](_0x3ec728))return _0x3ec728;const _0x3e06e7=parseSegmentRef(_0x3ec728);if(_0x3e06e7[_0x311ff1(0x9f)]===_0x311ff1(0x13c)){if(_0x5c45a9?.[_0x311ff1(0x11d)])return await _0x5c45a9[_0x311ff1(0x11d)](_0x3e06e7[_0x311ff1(0xe1)]);}else{if(_0x3e06e7[_0x311ff1(0x9f)]===_0x311ff1(0xb0)&&_0x3ad46a[_0x3e06e7[_0x311ff1(0xe1)]]){if(_0x5c45a9?.[_0x311ff1(0x97)])return await _0x5c45a9[_0x311ff1(0x97)](_0x3e06e7[_0x311ff1(0xe1)],_0x3ad46a[_0x3e06e7[_0x311ff1(0xe1)]]);}else{if(_0x5c45a9?.[_0x311ff1(0x11d)])return await _0x5c45a9['resolveSegmentId'](_0x3e06e7[_0x311ff1(0xe1)]);}}return _0x3ec728;},_0x4b5497=async _0x20f9c2=>{const _0x5df7a3=a150_0x2299;if(/^\d+$/[_0x5df7a3(0x13a)](_0x20f9c2))return _0x20f9c2;const _0x59194c=parseSegmentRef(_0x20f9c2);if(_0x59194c[_0x5df7a3(0x9f)]===_0x5df7a3(0x13c)){if(_0x5c45a9?.[_0x5df7a3(0x130)])return await _0x5c45a9['resolveActivationId'](_0x59194c[_0x5df7a3(0xe1)]);return _0x59194c[_0x5df7a3(0xe1)];}else{if(_0x59194c[_0x5df7a3(0x9f)]===_0x5df7a3(0xb0)&&_0x49f9dc[_0x59194c[_0x5df7a3(0xe1)]]){if(_0x5c45a9?.[_0x5df7a3(0x120)])return await _0x5c45a9[_0x5df7a3(0x120)](_0x59194c['name'],_0x49f9dc[_0x59194c['name']]);if(_0x5c45a9?.[_0x5df7a3(0x130)])return await _0x5c45a9[_0x5df7a3(0x130)](_0x59194c['name']);}else{if(_0x5c45a9?.['resolveActivationId'])return await _0x5c45a9[_0x5df7a3(0x130)](_0x59194c[_0x5df7a3(0xe1)]);}}return _0x20f9c2;},_0x151f25=_0xbdb4ac=>{const _0x13a8a0=a150_0x2299;if(!_0xbdb4ac)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x13a8a0(0x13a)](_0xbdb4ac))return _0xbdb4ac;return _0x4c6e39[_0xbdb4ac]||_0xbdb4ac;};switch(_0x469cfc[_0xa37f1e(0x9f)]){case _0xa37f1e(0xcc):{const _0x5705b1=_0x469cfc,_0x5dfc0a=_0x5705b1[_0xa37f1e(0xd1)],_0x39e064={'type':_0xa37f1e(0xb3),'name':_0x5705b1['name'],'next':_0x151f25(_0x5705b1['next'])};if(_0x5dfc0a[_0xa37f1e(0x122)]!==undefined&&_0x5dfc0a[_0xa37f1e(0xa2)])_0x39e064[_0xa37f1e(0xb5)]=_0xa37f1e(0x10e),_0x39e064[_0xa37f1e(0x118)]=_0x5dfc0a[_0xa37f1e(0x122)],_0x39e064['waitStepUnit']=normalizeWaitUnit(_0x5dfc0a[_0xa37f1e(0xa2)]);else{if(_0x5dfc0a['wait_until'])_0x39e064['waitStepType']='Date',_0x39e064[_0xa37f1e(0xe6)]=_0x5dfc0a['wait_until'];else{if(_0x5dfc0a[_0xa37f1e(0x113)])_0x39e064[_0xa37f1e(0xb5)]='DaysOfTheWeek',_0x39e064[_0xa37f1e(0x85)]=_0x5dfc0a[_0xa37f1e(0x113)];else{if(_0x5dfc0a[_0xa37f1e(0xc9)]){_0x39e064['waitStepType']='Condition';const _0x5cf685=await _0x375f24(_0x5dfc0a[_0xa37f1e(0xc9)]['segment']),_0x3c7e41=_0x5dfc0a[_0xa37f1e(0xc9)][_0xa37f1e(0xd2)]?.['next']!==undefined;if(_0x3c7e41){const _0x45c2f0=[];_0x45c2f0[_0xa37f1e(0xd9)]({'id':generateUUID(),'segmentId':_0x5cf685,'timedOutPath':![],'name':_0xa37f1e(0x90),'next':_0x151f25(_0x5dfc0a[_0xa37f1e(0xc9)]['next']??_0x5705b1['next'])});if(_0x5dfc0a[_0xa37f1e(0xc9)][_0xa37f1e(0xd2)]){const _0x29d190=_0x5dfc0a[_0xa37f1e(0xc9)][_0xa37f1e(0xd2)][_0xa37f1e(0x122)],_0x3f44d3=normalizeWaitUnit(_0x5dfc0a[_0xa37f1e(0xc9)][_0xa37f1e(0xd2)][_0xa37f1e(0xa2)]);_0x45c2f0[_0xa37f1e(0xd9)]({'id':generateUUID(),'timedOutPath':!![],'name':'*Max\x20wait\x20'+_0x29d190+'\x20'+_0x3f44d3,'moveAfter':_0x29d190,'unit':_0x3f44d3,'next':_0x151f25(_0x5dfc0a[_0xa37f1e(0xc9)][_0xa37f1e(0xd2)][_0xa37f1e(0xa5)])});}_0x39e064[_0xa37f1e(0x124)]=_0x45c2f0,delete _0x39e064[_0xa37f1e(0xa5)];}else _0x39e064['conditionSegmentId']=_0x5cf685,_0x5dfc0a[_0xa37f1e(0xc9)][_0xa37f1e(0xd2)]&&(_0x39e064[_0xa37f1e(0x102)]=_0x5dfc0a['condition'][_0xa37f1e(0xd2)][_0xa37f1e(0x122)],_0x5dfc0a[_0xa37f1e(0xc9)]['timeout'][_0xa37f1e(0xa2)]&&(_0x39e064[_0xa37f1e(0xdb)]=normalizeWaitUnit(_0x5dfc0a[_0xa37f1e(0xc9)]['timeout'][_0xa37f1e(0xa2)])));}}}}return _0x39e064;}case'activation':{const _0x18dca1=_0x469cfc,_0x55a31c=_0x18dca1[_0xa37f1e(0xd1)][_0xa37f1e(0x101)],_0x5ad523=await _0x4b5497(_0x55a31c);return{'type':'Activation','name':_0x18dca1['name'],'journeyActivationStepId':_0x5ad523,'next':_0x151f25(_0x18dca1[_0xa37f1e(0xa5)])};}case'decision_point':{const _0xbb7775=_0x469cfc,_0x11e467=_0xbb7775[_0xa37f1e(0xd1)]['branches'];return{'type':'DecisionPoint','name':_0xbb7775[_0xa37f1e(0xe1)],'branches':await Promise[_0xa37f1e(0xe9)](_0x11e467[_0xa37f1e(0x106)](async _0x6f63a7=>{const _0x29e95e=_0xa37f1e;let _0x44515a='';if(!_0x6f63a7[_0x29e95e(0xb2)]){const _0x3f1c1d=_0x6f63a7['segment']||_0x6f63a7[_0x29e95e(0x92)]||'';_0x44515a=_0x3f1c1d?await _0x375f24(_0x3f1c1d):'';}return{'id':crypto[_0x29e95e(0x121)](),'name':_0x6f63a7[_0x29e95e(0xe1)],'description':null,'segmentId':_0x44515a,'excludedPath':_0x6f63a7[_0x29e95e(0xb2)]??![],'next':_0x151f25(_0x6f63a7[_0x29e95e(0xa5)])};})),'next':_0x151f25(_0xbb7775[_0xa37f1e(0xa5)])};}case _0xa37f1e(0xf9):{const _0x5b0477=_0x469cfc,_0x5da4e8=_0x5b0477[_0xa37f1e(0xd1)];return{'type':_0xa37f1e(0x12e),'name':_0x5b0477[_0xa37f1e(0xe1)],'customizedSplit':_0x5da4e8[_0xa37f1e(0x96)],'uniqueId':_0x5da4e8[_0xa37f1e(0x109)],'variants':_0x5da4e8[_0xa37f1e(0xf5)][_0xa37f1e(0x106)](_0x52ac32=>({'id':_0x52ac32['id']||generateUUID(),'name':_0x52ac32['name'],'percentage':_0x52ac32[_0xa37f1e(0x139)],'next':_0x151f25(_0x52ac32[_0xa37f1e(0xa5)])})),'next':_0x151f25(_0x5b0477[_0xa37f1e(0xa5)])};}case _0xa37f1e(0x8a):return{'type':_0xa37f1e(0xc6),'name':_0x469cfc[_0xa37f1e(0xe1)],'next':_0x151f25(_0x469cfc['next'])};case'jump':{const _0x44776e=_0x469cfc,_0x1ccf56=_0x44776e['with'][_0xa37f1e(0xa1)],_0x505ee7=_0x1ccf56[_0xa37f1e(0x10b)],_0x4feb33=_0x1ccf56[_0xa37f1e(0xce)];let _0x165cdd=_0x1ccf56['journey'];_0x5c45a9?.[_0xa37f1e(0xb6)]&&!/^\d+$/[_0xa37f1e(0x13a)](_0x165cdd)&&(_0x165cdd=await _0x5c45a9[_0xa37f1e(0xb6)](_0x165cdd));let _0x190078=_0x1ccf56[_0xa37f1e(0xce)];_0x5c45a9?.[_0xa37f1e(0x82)]&&!/^\d+$/[_0xa37f1e(0x13a)](_0x190078)&&(_0x190078=await _0x5c45a9[_0xa37f1e(0x82)](_0x165cdd,_0x190078));const _0x50794f=!/^\d+$/[_0xa37f1e(0x13a)](_0x505ee7)&&!isLocalJourneyRef(_0x505ee7)?formatApiJourneyName(_0x505ee7,_0x4feb33):undefined;return{'type':_0xa37f1e(0xa8),'name':_0x44776e[_0xa37f1e(0xe1)],'target':{'journeyId':_0x165cdd,'journeyStageId':_0x190078,'journeyBundleId':_0x1ccf56[_0xa37f1e(0x128)],'journeyName':_0x50794f,'confirmed':!![]},'next':_0x151f25(_0x44776e['next'])};}case _0xa37f1e(0x10d):return{'type':'End','name':_0x469cfc[_0xa37f1e(0xe1)]};default:{const _0x7eedb=_0x469cfc;return{'type':_0xa37f1e(0x117),'name':_0x7eedb[_0xa37f1e(0xe1)]};}}}export function toYamlString(_0x32004d){const _0x560004=a150_0x2299,_0x259894=stripInternalFields(_0x32004d),_0x2ac039=a150_0x43ba91[_0x560004(0xef)](_0x259894,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x560004(0x110)}),_0x3c6f15=[_0x560004(0xe5),_0x560004(0x134),_0x560004(0x116),_0x560004(0xf7),_0x560004(0x93),_0x560004(0x100),_0x560004(0xee)];let _0x3c1e4e=_0x2ac039;for(const _0x46df6b of _0x3c6f15){_0x3c1e4e=_0x3c1e4e['replace'](new RegExp('^('+_0x46df6b+')','m'),(_0x178bb4,_0x8727a1,_0x1e522d)=>{if(_0x1e522d===0x0||_0x3c1e4e[_0x1e522d-0x1]==='\x0a'&&_0x3c1e4e[_0x1e522d-0x2]==='\x0a')return _0x8727a1;return'\x0a'+_0x8727a1;});}return _0x3c1e4e;}function stripInternalFields(_0x1f5ebd){const _0x21879c=a150_0x2299,{id:_0x50b659,folder_id:_0x5cd130,bundle_id:_0x26c5a8,bundle_name:_0x198ce2,version:_0x26b931,allow_reentry:_0x3c91db,..._0x3557d4}=_0x1f5ebd;return _0x3557d4['journeys']&&(_0x3557d4['journeys']=_0x3557d4['journeys'][_0x21879c(0x106)](_0xf227c7=>{const _0x24de5d=_0x21879c,{id:_0x2e4cc8,..._0x5aa899}=_0xf227c7;return{..._0x5aa899,'stages':_0x5aa899[_0x24de5d(0xe3)]['map'](stripStageInternalFields),..._0xf227c7[_0x24de5d(0xea)]===!![]?{'latest':!![]}:{},..._0x3557d4[_0x24de5d(0x95)][_0x24de5d(0x114)]===0x1&&_0x5aa899[_0x24de5d(0x88)]==='v1'?{'version':undefined}:{}};})),_0x3557d4['stages']&&(_0x3557d4['stages']=_0x3557d4[_0x21879c(0xe3)][_0x21879c(0x106)](stripStageInternalFields)),_0x3557d4[_0x21879c(0x98)]&&(_0x3557d4[_0x21879c(0x98)]=_0x3557d4[_0x21879c(0x98)][_0x21879c(0x106)](_0x330b34=>{const _0x510d7a=_0x21879c,{id:_0x4e63aa,..._0xef07b6}=_0x330b34;return{..._0xef07b6,'stages':_0xef07b6[_0x510d7a(0xe3)][_0x510d7a(0x106)](stripStageInternalFields),..._0x330b34[_0x510d7a(0xea)]===!![]?{'latest':!![]}:{}};})),_0x3557d4;}function stripStageInternalFields(_0x4b7941){const {id:_0x59d3ac,..._0x5ea652}=_0x4b7941;return _0x5ea652;}export function parseYamlString(_0x5d3ef1){return safeParseYaml(_0x5d3ef1,JourneyDefSchema);}export function isJourneyDef(_0xb85d8e){const _0x3f57d9=a150_0x2299;return typeof _0xb85d8e==='object'&&_0xb85d8e!==null&&_0x3f57d9(0x9f)in _0xb85d8e&&_0xb85d8e[_0x3f57d9(0x9f)]===_0x3f57d9(0x10b);}export function generateTemplate(_0x44e627,_0x228edc){const _0x55733e=a150_0x2299,_0x10ebfc={'type':_0x55733e(0x10b),'name':_0x44e627,'description':_0x55733e(0xc5),'reentry':_0x55733e(0x9e),'goal':{'name':_0x55733e(0x126),'segment':'goal-segment'},'stages':[{'name':_0x55733e(0x10f),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':'Entry\x20Criteria','segment':_0x228edc},'steps':[{'type':_0x55733e(0xcc),'name':'Wait\x201\x20Day','with':{'duration':0x1,'unit':_0x55733e(0xd8)}},{'type':_0x55733e(0x101),'name':_0x55733e(0xec),'with':{'activation':'your-activation-name'}},{'type':'end','name':_0x55733e(0x112)}]}]};return toYamlString(_0x10ebfc);}function generateUUID(){return crypto['randomUUID']();}export const SEGMENT_REF_PREFIX=a150_0x1eb89e(0xda);export function parseSegmentRef(_0x5f0200){const _0x3fdca3=a150_0x1eb89e;if(_0x5f0200[_0x3fdca3(0x11b)](SEGMENT_REF_PREFIX))return{'type':_0x3fdca3(0x13c),'name':_0x5f0200[_0x3fdca3(0x8e)](SEGMENT_REF_PREFIX[_0x3fdca3(0x114)])};if(/^\d+$/[_0x3fdca3(0x13a)](_0x5f0200))return{'type':'id','name':_0x5f0200};return{'type':_0x3fdca3(0xb0),'name':_0x5f0200};}export function makeSegmentRef(_0x9b7058){return''+SEGMENT_REF_PREFIX+_0x9b7058;}export function isExternalSegmentRef(_0x4f7508){const _0xcdab90=a150_0x1eb89e;return _0x4f7508[_0xcdab90(0x11b)](SEGMENT_REF_PREFIX);}function a150_0x2bce(){const _0x16b532=['journeyStageId','daysOfWeek','attributes','weeks','version','customizedSplit','merge','parentFolder','resolveJumpTarget','moveAfter','slice','values','Met\x20condition(s)','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','segment_id','journeys:','sort','journeys','customized_split','resolveEmbeddedSegmentId','versions','replace','segmentId','add','stageName','resolveActivationName','no_reentry','type','5965720djNgXh','target','unit','Expected\x20format:\x0a','Date','next','24dKbvOR','definition','Jump','isArray','description','allowReentry','resolveSegmentName','rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27','state','version_number','embedded','timedOutPath','excluded','WaitStep','draft','waitStepType','resolveJourneyId','entryCriteria','object','entries','DecisionPoint','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','toLowerCase','384318kxxRlI','71382QQQVZP','journeyStages','keys','Variant','filter','week','uniqueId','Journey\x20description','Merge','journeyId','set','condition','stageId','folder','wait','30586095qCIGoM','stage','350ZHgwzV','bundle_name','with','timeout','journeyBundleId','reentry','wait_until','behavior','get','day','push','ref:','conditionTimeoutUnit','waitCondition','branches','activations','segments','connector_config','name','includes','stages','relationships','segments:','waitUntilDate','\x20\x20\x20\x20type:\x20And\x0a','conditionSegmentId','all','latest','segment','Send\x20Notification','days','versions:','stringify','journeyName','\x20\x20\x20\x20conditions:\x0a','waitStepUnit','has','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','variants','reentryMode','reentry:','JOURNEY_SYNTAX_ERROR','ab_test','\x27:\x20','Activation','versionNumber','find','entry_criteria','goal','stages:','activation','conditionTimeoutDuration','size','decision_point','data','map','trim','442815uaDyOc','unique_id','reentry_always','journey','isJourneyLocal','end','Duration','Stage\x201','null','jump','Stage\x20Complete','days_of_week','length','folder_id','goal:','End','waitStep','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','exitCriterias','startsWith','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','resolveSegmentId','Composite','launched','resolveEmbeddedActivationId','randomUUID','duration','milestone','conditions','journeyBundleName','Goal\x20Achieved','steps','bundle_id','activation_template_id','exit_criteria','450552MPfIli','\x20\x20rule:\x0a','486897diTRvg','ABTest','notification','resolveActivationId','all_columns','journeyActivationStepId','rule','activations:','DaysOfTheWeek','Unknown\x20segment\x20\x22','AbTest','from','percentage','test','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','ref','resolveActivation','columns','Condition','resolveSegment','root_step','resolveStageId','rootStep'];a150_0x2bce=function(){return _0x16b532;};return a150_0x2bce();}export function isJourneysArrayMode(_0x1384bc){const _0x1afe32=a150_0x1eb89e;return!!(_0x1384bc['journeys']&&_0x1384bc[_0x1afe32(0x95)]['length']>0x0);}export function isMultiVersionMode(_0x52513d){const _0x5f1c4f=a150_0x1eb89e;return!!(_0x52513d[_0x5f1c4f(0x98)]&&_0x52513d[_0x5f1c4f(0x98)][_0x5f1c4f(0x114)]>0x0);}export function isSingleVersionMode(_0x5f8bf2){const _0x2a4d31=a150_0x1eb89e;return!!(_0x5f8bf2[_0x2a4d31(0xe3)]&&_0x5f8bf2[_0x2a4d31(0xe3)][_0x2a4d31(0x114)]>0x0);}export function hasMultipleVersions(_0x368940){const _0x17929b=a150_0x1eb89e;if(isJourneysArrayMode(_0x368940))return(_0x368940[_0x17929b(0x95)]?.[_0x17929b(0x114)]||0x0)>0x1;if(isMultiVersionMode(_0x368940))return(_0x368940[_0x17929b(0x98)]?.[_0x17929b(0x114)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x45fce7){const _0x384b6b=a150_0x1eb89e;if(isJourneysArrayMode(_0x45fce7))return _0x45fce7;if(isSingleVersionMode(_0x45fce7)){const {stages:_0x20756f,id:_0x51a782,version:_0x284b88,version_number:_0x238d6e,..._0x5c8958}=_0x45fce7;return{..._0x5c8958,'journeys':[{'version':_0x284b88||'v1','stages':_0x20756f||[],'id':_0x51a782,'version_number':_0x238d6e}]};}if(isMultiVersionMode(_0x45fce7)){const {versions:_0x172b03,..._0x5df644}=_0x45fce7;return{..._0x5df644,'journeys':(_0x172b03||[])['map'](_0x4b8a02=>({'version':_0x4b8a02[_0x384b6b(0xe1)],'state':_0x4b8a02[_0x384b6b(0xae)],'latest':_0x4b8a02[_0x384b6b(0xea)],'stages':_0x4b8a02['stages'],'id':_0x4b8a02['id'],'version_number':_0x4b8a02['version_number']}))};}return _0x45fce7;}export function normalizeJourneyDef(_0x42d566,_0x31aa8c){const _0x1f2ed6=a150_0x1eb89e,_0x12da74=normalizeToJourneysFormat(_0x42d566),_0x5c4a6e=_0x31aa8c?.[_0x1f2ed6(0xdf)]?Object[_0x1f2ed6(0xc0)](_0x31aa8c['segments']):undefined,_0x581bca=_0x31aa8c?.[_0x1f2ed6(0xde)]?Object[_0x1f2ed6(0xc0)](_0x31aa8c['activations']):undefined;return{'type':'journey','name':_0x12da74['name'],..._0x12da74[_0x1f2ed6(0xaa)]!==undefined&&{'description':_0x12da74['description']},..._0x12da74[_0x1f2ed6(0xff)]&&{'goal':normalizeJourneyCriteria(_0x12da74['goal'])},..._0x12da74['reentry']!==undefined&&{'reentry':_0x12da74['reentry']},..._0x12da74[_0x1f2ed6(0xdf)]&&{'segments':normalizeEmbeddedSegments(_0x12da74[_0x1f2ed6(0xdf)],_0x5c4a6e)},..._0x12da74[_0x1f2ed6(0xde)]&&{'activations':normalizeEmbeddedActivations(_0x12da74[_0x1f2ed6(0xde)],_0x581bca)},..._0x12da74[_0x1f2ed6(0x95)]&&{'journeys':_0x12da74['journeys'][_0x1f2ed6(0x106)](_0x3ac59a=>normalizeJourneyEntry(_0x3ac59a,_0x12da74['journeys'][_0x1f2ed6(0x114)]===0x1))}};}function normalizeJourneyEntry(_0x1197bc,_0x3fff1a){const _0x45468e=a150_0x1eb89e;return{...!_0x3fff1a&&_0x1197bc[_0x45468e(0x88)]!==undefined&&{'version':_0x1197bc[_0x45468e(0x88)]},..._0x1197bc[_0x45468e(0xae)]!==undefined&&{'state':_0x1197bc['state']},...!_0x3fff1a&&_0x1197bc['latest']!==undefined&&{'latest':_0x1197bc[_0x45468e(0xea)]},..._0x1197bc['version_number']!==undefined&&{'version_number':_0x1197bc[_0x45468e(0xaf)]},..._0x1197bc[_0x45468e(0xff)]&&{'goal':normalizeJourneyCriteria(_0x1197bc[_0x45468e(0xff)])},..._0x1197bc['reentry']!==undefined&&{'reentry':_0x1197bc[_0x45468e(0xd4)]},'stages':_0x1197bc[_0x45468e(0xe3)][_0x45468e(0x106)](normalizeJourneyStage)};}function a150_0x2299(_0xe8f9ea,_0x118d41){_0xe8f9ea=_0xe8f9ea-0x7e;const _0x2bce5f=a150_0x2bce();let _0x2299b2=_0x2bce5f[_0xe8f9ea];return _0x2299b2;}function normalizeJourneyStage(_0x12a8e1){const _0xe5593b=a150_0x1eb89e;return{'name':_0x12a8e1[_0xe5593b(0xe1)],..._0x12a8e1['description']!==undefined&&{'description':_0x12a8e1['description']},..._0x12a8e1[_0xe5593b(0xfe)]&&{'entry_criteria':normalizeJourneyCriteria(_0x12a8e1[_0xe5593b(0xfe)])},..._0x12a8e1[_0xe5593b(0x12a)]&&{'exit_criteria':_0x12a8e1[_0xe5593b(0x12a)]['map'](normalizeJourneyCriteria)},..._0x12a8e1['milestone']&&{'milestone':normalizeJourneyCriteria(_0x12a8e1[_0xe5593b(0x123)])},..._0x12a8e1[_0xe5593b(0x127)]&&{'steps':normalizeStepsWithImplicitNext(_0x12a8e1[_0xe5593b(0x127)])}};}function normalizeStepsWithImplicitNext(_0x97f082){const _0x1ecc02=a150_0x1eb89e;return _0x97f082[_0x1ecc02(0x106)]((_0x3860bf,_0x4bed0c)=>{const _0x1d89cb=_0x1ecc02,_0x1bd96a=_0x4bed0c<_0x97f082[_0x1d89cb(0x114)]-0x1?_0x97f082[_0x4bed0c+0x1][_0x1d89cb(0xe1)]:undefined;return normalizeJourneyStep(_0x3860bf,_0x1bd96a);});}function normalizeJourneyCriteria(_0x4f2333){const _0x2f1022=a150_0x1eb89e;return{'name':_0x4f2333[_0x2f1022(0xe1)],..._0x4f2333[_0x2f1022(0xaa)]!==undefined&&{'description':_0x4f2333['description']},'segment':_0x4f2333[_0x2f1022(0xeb)],..._0x4f2333['target']&&{'target':normalizeJumpTarget(_0x4f2333['target'])}};}function normalizeJourneyStep(_0x376d64,_0x21032c){const _0x25b813=a150_0x1eb89e,_0x534680=_0x376d64[_0x25b813(0xa5)]!==undefined&&_0x376d64['next']!==_0x21032c,_0xfdc3d1={'type':_0x376d64[_0x25b813(0x9f)],'name':_0x376d64[_0x25b813(0xe1)],..._0x534680&&{'next':_0x376d64[_0x25b813(0xa5)]}};if('with'in _0x376d64&&_0x376d64[_0x25b813(0xd1)])return{..._0xfdc3d1,'with':normalizeStepParams(_0x376d64[_0x25b813(0x9f)],_0x376d64['with'])};return _0xfdc3d1;}function normalizeStepParams(_0x1abad6,_0x268ebf){const _0x222f51=a150_0x1eb89e;switch(_0x1abad6){case'wait':{const _0x39a45e=_0x268ebf;let _0x17920a;return _0x39a45e[_0x222f51(0xc9)]&&(_0x17920a={'segment':_0x39a45e['condition'][_0x222f51(0xeb)],..._0x39a45e[_0x222f51(0xc9)][_0x222f51(0xa5)]!==undefined&&{'next':_0x39a45e[_0x222f51(0xc9)][_0x222f51(0xa5)]},..._0x39a45e[_0x222f51(0xc9)][_0x222f51(0xd2)]&&{'timeout':{'duration':_0x39a45e['condition'][_0x222f51(0xd2)][_0x222f51(0x122)],'unit':_0x39a45e[_0x222f51(0xc9)]['timeout'][_0x222f51(0xa2)],..._0x39a45e[_0x222f51(0xc9)][_0x222f51(0xd2)][_0x222f51(0xa5)]!==undefined&&{'next':_0x39a45e[_0x222f51(0xc9)]['timeout']['next']}}}}),{..._0x39a45e['duration']!==undefined&&{'duration':_0x39a45e[_0x222f51(0x122)]},..._0x39a45e[_0x222f51(0xa2)]!==undefined&&{'unit':_0x39a45e[_0x222f51(0xa2)]},..._0x39a45e[_0x222f51(0xd5)]!==undefined&&{'wait_until':_0x39a45e[_0x222f51(0xd5)]},..._0x39a45e['days_of_week']!==undefined&&{'days_of_week':_0x39a45e[_0x222f51(0x113)]},..._0x17920a&&{'condition':_0x17920a}};}case _0x222f51(0x101):{const _0x34782d=_0x268ebf;return{'activation':_0x34782d[_0x222f51(0x101)]};}case'decision_point':{const _0x3753ab=_0x268ebf;return{'branches':_0x3753ab['branches'][_0x222f51(0x106)](normalizeDecisionBranch)};}case _0x222f51(0xf9):{const _0x197f02=_0x268ebf;return{..._0x197f02[_0x222f51(0x96)]!==undefined&&{'customized_split':_0x197f02['customized_split']},..._0x197f02['unique_id']!==undefined&&{'unique_id':_0x197f02[_0x222f51(0x109)]},'variants':_0x197f02[_0x222f51(0xf5)][_0x222f51(0x106)](normalizeAbTestVariant)};}case _0x222f51(0x111):{const _0x4e0e4b=_0x268ebf;return{'target':normalizeJumpTarget(_0x4e0e4b[_0x222f51(0xa1)])};}default:return _0x268ebf;}}function normalizeDecisionBranch(_0x234f56){const _0x5729ba=a150_0x1eb89e;return{'name':_0x234f56[_0x5729ba(0xe1)],..._0x234f56[_0x5729ba(0xeb)]!==undefined&&{'segment':_0x234f56['segment']},..._0x234f56['excluded']!==undefined&&{'excluded':_0x234f56[_0x5729ba(0xb2)]},..._0x234f56[_0x5729ba(0xa5)]!==undefined&&{'next':_0x234f56['next']}};}function normalizeAbTestVariant(_0x4a5780){const _0x2f6293=a150_0x1eb89e;return{..._0x4a5780['id']!==undefined&&{'id':_0x4a5780['id']},'name':_0x4a5780['name'],'percentage':_0x4a5780[_0x2f6293(0x139)],..._0x4a5780[_0x2f6293(0xa5)]!==undefined&&{'next':_0x4a5780[_0x2f6293(0xa5)]}};}function normalizeJumpTarget(_0x51f891){const _0x142deb=a150_0x1eb89e;return{'journey':_0x51f891[_0x142deb(0x10b)],'stage':_0x51f891[_0x142deb(0xce)],..._0x51f891[_0x142deb(0x128)]!==undefined&&{'bundle_id':_0x51f891[_0x142deb(0x128)]}};}function normalizeEmbeddedSegments(_0x214c40,_0x4e982d){const _0x2edc2c=a150_0x1eb89e,_0x266f99={},_0x49207e=Object[_0x2edc2c(0xc0)](_0x214c40),_0x28678e=_0x4e982d?[..._0x4e982d[_0x2edc2c(0xc2)](_0x3eb784=>_0x49207e[_0x2edc2c(0xe2)](_0x3eb784)),..._0x49207e[_0x2edc2c(0xc2)](_0x3a5b36=>!_0x4e982d[_0x2edc2c(0xe2)](_0x3a5b36))[_0x2edc2c(0x94)]()]:_0x49207e[_0x2edc2c(0x94)]();for(const _0x4bbe6e of _0x28678e){const _0x62e3bd=_0x214c40[_0x4bbe6e];if(_0x62e3bd[_0x2edc2c(0x133)]){const _0x4c42ba=_0x62e3bd['rule'];if(_0x4c42ba[_0x2edc2c(0x9f)]!=='And'&&_0x4c42ba['type']!=='Or'&&_0x4c42ba[_0x2edc2c(0x9f)]!==_0x2edc2c(0x11e)){const _0x202d81=_0x4c42ba['type']??'(missing)';throw new SDKError(ErrorCode[_0x2edc2c(0xf8)],_0x2edc2c(0x91)+_0x4bbe6e+_0x2edc2c(0xfa)+(_0x2edc2c(0xad)+_0x202d81+'\x27.\x0a')+_0x2edc2c(0xa3)+'\x20\x20rule:\x0a'+_0x2edc2c(0xe7)+'\x20\x20\x20\x20conditions:\x0a'+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x2edc2c(0x11c)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x4c42ba[_0x2edc2c(0x124)]||!Array[_0x2edc2c(0xa9)](_0x4c42ba[_0x2edc2c(0x124)]))throw new SDKError(ErrorCode[_0x2edc2c(0xf8)],_0x2edc2c(0x91)+_0x4bbe6e+_0x2edc2c(0xfa)+_0x2edc2c(0x13b)+'Expected\x20format:\x0a'+_0x2edc2c(0x12c)+('\x20\x20\x20\x20type:\x20'+_0x4c42ba[_0x2edc2c(0x9f)]+'\x0a')+_0x2edc2c(0xf1)+_0x2edc2c(0xbb)+_0x2edc2c(0x11c)+_0x2edc2c(0x119));}_0x266f99[_0x4bbe6e]={..._0x62e3bd['description']&&_0x62e3bd[_0x2edc2c(0xaa)][_0x2edc2c(0x107)]()&&{'description':_0x62e3bd[_0x2edc2c(0xaa)]},..._0x62e3bd[_0x2edc2c(0x133)]&&{'rule':deepSortObject(_0x62e3bd[_0x2edc2c(0x133)])}};}return _0x266f99;}function normalizeEmbeddedActivations(_0x33bca3,_0x2d920d){const _0x38dc15=a150_0x1eb89e,_0x4d0247={},_0x200024=Object[_0x38dc15(0xc0)](_0x33bca3),_0x1360cb=_0x2d920d?[..._0x2d920d['filter'](_0x51eec3=>_0x200024[_0x38dc15(0xe2)](_0x51eec3)),..._0x200024['filter'](_0x1032f4=>!_0x2d920d[_0x38dc15(0xe2)](_0x1032f4))[_0x38dc15(0x94)]()]:_0x200024['sort']();for(const _0x27e0f3 of _0x1360cb){const _0x537347=_0x33bca3[_0x27e0f3];_0x4d0247[_0x27e0f3]={'name':_0x537347[_0x38dc15(0xe1)],'connection':_0x537347['connection'],..._0x537347[_0x38dc15(0xaa)]!==undefined&&{'description':_0x537347[_0x38dc15(0xaa)]},..._0x537347[_0x38dc15(0x131)]!==undefined&&{'all_columns':_0x537347[_0x38dc15(0x131)]},..._0x537347['columns']!==undefined&&{'columns':_0x537347[_0x38dc15(0x7e)]},..._0x537347[_0x38dc15(0xd6)]!==undefined&&{'behavior':_0x537347[_0x38dc15(0xd6)]},..._0x537347['schedule']!==undefined&&{'schedule':_0x537347['schedule']},..._0x537347[_0x38dc15(0x12f)]!==undefined&&{'notification':_0x537347['notification']},..._0x537347[_0x38dc15(0xe0)]!==undefined&&{'connector_config':_0x537347[_0x38dc15(0xe0)]},..._0x537347[_0x38dc15(0x129)]!==undefined&&{'activation_template_id':_0x537347['activation_template_id']}};}return _0x4d0247;}export function getActiveStages(_0x57254c){const _0x4aa0cd=a150_0x1eb89e;if(isJourneysArrayMode(_0x57254c)){const _0x143dc8=_0x57254c[_0x4aa0cd(0x95)]||[],_0x1312af=_0x143dc8[_0x4aa0cd(0xfd)](_0x147a13=>_0x147a13[_0x4aa0cd(0xea)]===!![])||_0x143dc8[0x0];return _0x1312af?.[_0x4aa0cd(0xe3)]||[];}if(isSingleVersionMode(_0x57254c))return _0x57254c[_0x4aa0cd(0xe3)]||[];if(isMultiVersionMode(_0x57254c)){const _0x234ad7=_0x57254c[_0x4aa0cd(0x98)]||[],_0xe840cc=_0x234ad7['find'](_0x2ba9fb=>_0x2ba9fb[_0x4aa0cd(0xea)]===!![])||_0x234ad7[0x0];return _0xe840cc?.[_0x4aa0cd(0xe3)]||[];}return[];}export function getLatestJourneyEntry(_0x26805f){const _0x49040c=a150_0x1eb89e;if(isJourneysArrayMode(_0x26805f)){const _0x3b144c=_0x26805f[_0x49040c(0x95)]||[];return _0x3b144c['find'](_0x1590a4=>_0x1590a4[_0x49040c(0xea)]===!![])||_0x3b144c[0x0];}if(isMultiVersionMode(_0x26805f)){const _0x3df41a=_0x26805f[_0x49040c(0x98)]||[],_0xbd90c7=_0x3df41a[_0x49040c(0xfd)](_0x1b1337=>_0x1b1337['latest']===!![])||_0x3df41a[0x0];if(_0xbd90c7)return{'version':_0xbd90c7[_0x49040c(0xe1)],'state':_0xbd90c7[_0x49040c(0xae)],'latest':_0xbd90c7[_0x49040c(0xea)],'stages':_0xbd90c7[_0x49040c(0xe3)],'id':_0xbd90c7['id'],'version_number':_0xbd90c7[_0x49040c(0xaf)]};}if(isSingleVersionMode(_0x26805f))return{'version':_0x26805f[_0x49040c(0x88)]||'v1','state':'draft','stages':_0x26805f[_0x49040c(0xe3)]||[],'id':_0x26805f['id'],'version_number':_0x26805f['version_number'],'goal':_0x26805f[_0x49040c(0xff)],'reentry':_0x26805f[_0x49040c(0xd4)]};return undefined;}export function getLatestVersion(_0x7c6f1a){const _0x321f75=a150_0x1eb89e;if(!isMultiVersionMode(_0x7c6f1a))return undefined;const _0x225070=_0x7c6f1a[_0x321f75(0x98)]||[];return _0x225070[_0x321f75(0xfd)](_0x316056=>_0x316056[_0x321f75(0xea)]===!![])||_0x225070[0x0];}export function getEffectiveGoal(_0x7b9c05){const _0x3ec3e0=a150_0x1eb89e,_0x2dcb44=getLatestJourneyEntry(_0x7b9c05);return _0x2dcb44?.[_0x3ec3e0(0xff)]||_0x7b9c05[_0x3ec3e0(0xff)];}export function getEffectiveReentry(_0x1c3168){const _0xaba194=a150_0x1eb89e,_0x33b814=getLatestJourneyEntry(_0x1c3168);return _0x33b814?.['reentry']||_0x1c3168[_0xaba194(0xd4)];}export function collectSegmentRefs(_0x1924ea){const _0x5dc79f=a150_0x1eb89e,_0x5af624=new Set();_0x1924ea['goal']?.[_0x5dc79f(0xeb)]&&_0x5af624[_0x5dc79f(0x9b)](_0x1924ea['goal'][_0x5dc79f(0xeb)]);const _0x98371d=_0x532855=>{const _0x2f6bad=_0x5dc79f;for(const _0xcfd5d6 of _0x532855){_0xcfd5d6[_0x2f6bad(0xfe)]?.[_0x2f6bad(0xeb)]&&_0x5af624[_0x2f6bad(0x9b)](_0xcfd5d6['entry_criteria'][_0x2f6bad(0xeb)]);if(_0xcfd5d6[_0x2f6bad(0x12a)])for(const _0x161628 of _0xcfd5d6[_0x2f6bad(0x12a)]){_0x161628[_0x2f6bad(0xeb)]&&_0x5af624[_0x2f6bad(0x9b)](_0x161628[_0x2f6bad(0xeb)]);}_0xcfd5d6[_0x2f6bad(0x123)]?.[_0x2f6bad(0xeb)]&&_0x5af624[_0x2f6bad(0x9b)](_0xcfd5d6[_0x2f6bad(0x123)][_0x2f6bad(0xeb)]);if(_0xcfd5d6['steps'])for(const _0x183c20 of _0xcfd5d6[_0x2f6bad(0x127)]){if(_0x183c20[_0x2f6bad(0x9f)]===_0x2f6bad(0x104)){const _0x5c415f=_0x183c20;for(const _0x51dfef of _0x5c415f[_0x2f6bad(0xd1)][_0x2f6bad(0xdd)]){_0x51dfef[_0x2f6bad(0xeb)]&&_0x5af624[_0x2f6bad(0x9b)](_0x51dfef[_0x2f6bad(0xeb)]);}}else{if(_0x183c20['type']==='wait'){const _0x4029d0=_0x183c20;_0x4029d0[_0x2f6bad(0xd1)][_0x2f6bad(0xc9)]?.[_0x2f6bad(0xeb)]&&_0x5af624['add'](_0x4029d0[_0x2f6bad(0xd1)][_0x2f6bad(0xc9)][_0x2f6bad(0xeb)]);}}}}};_0x1924ea['stages']&&_0x98371d(_0x1924ea[_0x5dc79f(0xe3)]);if(_0x1924ea[_0x5dc79f(0x98)])for(const _0x117596 of _0x1924ea[_0x5dc79f(0x98)]){_0x98371d(_0x117596[_0x5dc79f(0xe3)]);}return _0x5af624;}export function validateSegmentRefs(_0x3a78b0){const _0x324e4c=a150_0x1eb89e,_0x50444c=[],_0x748fec=collectSegmentRefs(_0x3a78b0),_0x1610a5=new Set(Object[_0x324e4c(0xc0)](_0x3a78b0['segments']||{}));for(const _0x3d68c7 of _0x748fec){const _0x118c63=parseSegmentRef(_0x3d68c7);_0x118c63[_0x324e4c(0x9f)]===_0x324e4c(0xb0)&&!_0x1610a5[_0x324e4c(0xf3)](_0x118c63['name'])&&_0x50444c[_0x324e4c(0xd9)](_0x324e4c(0x136)+_0x118c63[_0x324e4c(0xe1)]+_0x324e4c(0xf4)+_0x118c63[_0x324e4c(0xe1)]+'\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.');}return _0x50444c;}export function collectSegmentIdsFromJourneyApi(_0x156d1d){const _0x4024c5=a150_0x1eb89e,_0x1f4fef=new Set();_0x156d1d['attributes'][_0x4024c5(0xff)]?.[_0x4024c5(0x9a)]&&_0x1f4fef['add'](_0x156d1d[_0x4024c5(0x86)][_0x4024c5(0xff)]['segmentId']);const _0x30be9c=_0x156d1d['attributes'][_0x4024c5(0xbf)];if(Array[_0x4024c5(0xa9)](_0x30be9c))for(const _0x3add7c of _0x30be9c){_0x3add7c[_0x4024c5(0xb7)]?.[_0x4024c5(0x9a)]&&_0x1f4fef[_0x4024c5(0x9b)](_0x3add7c['entryCriteria'][_0x4024c5(0x9a)]);const _0x1f7732=_0x3add7c[_0x4024c5(0x11a)]??_0x3add7c['exitCriteria'];if(Array[_0x4024c5(0xa9)](_0x1f7732))for(const _0x30eee5 of _0x1f7732){_0x30eee5[_0x4024c5(0x9a)]&&_0x1f4fef[_0x4024c5(0x9b)](_0x30eee5[_0x4024c5(0x9a)]);}_0x3add7c[_0x4024c5(0x123)]?.[_0x4024c5(0x9a)]&&_0x1f4fef[_0x4024c5(0x9b)](_0x3add7c['milestone']['segmentId']);if(_0x3add7c[_0x4024c5(0x127)]&&typeof _0x3add7c[_0x4024c5(0x127)]===_0x4024c5(0xb8)){const _0x533eea=Array[_0x4024c5(0xa9)](_0x3add7c[_0x4024c5(0x127)])?_0x3add7c[_0x4024c5(0x127)]:Object[_0x4024c5(0x8f)](_0x3add7c[_0x4024c5(0x127)]);for(const _0x5ca2bd of _0x533eea){_0x5ca2bd[_0x4024c5(0xdc)]?.[_0x4024c5(0x9a)]&&_0x1f4fef['add'](_0x5ca2bd[_0x4024c5(0xdc)][_0x4024c5(0x9a)]);const _0x8012b9=_0x5ca2bd;_0x8012b9['conditionSegmentId']&&_0x1f4fef[_0x4024c5(0x9b)](_0x8012b9[_0x4024c5(0xe8)]);if(Array[_0x4024c5(0xa9)](_0x8012b9[_0x4024c5(0x124)]))for(const _0xae89a8 of _0x8012b9[_0x4024c5(0x124)]){_0xae89a8[_0x4024c5(0x9a)]&&_0x1f4fef[_0x4024c5(0x9b)](_0xae89a8[_0x4024c5(0x9a)]);}if(Array[_0x4024c5(0xa9)](_0x5ca2bd['branches']))for(const _0x5ef334 of _0x5ca2bd[_0x4024c5(0xdd)]){_0x5ef334[_0x4024c5(0x9a)]&&_0x1f4fef['add'](_0x5ef334[_0x4024c5(0x9a)]);}}}}return _0x1f4fef;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x28aa55,_0x22ec55){const _0x2ef84b=a151_0x3e66,_0x5aac10=_0x28aa55();while(!![]){try{const _0x3952cb=parseInt(_0x2ef84b(0x1ae))/0x1*(parseInt(_0x2ef84b(0x1b1))/0x2)+parseInt(_0x2ef84b(0x1af))/0x3*(-parseInt(_0x2ef84b(0x197))/0x4)+parseInt(_0x2ef84b(0x1ad))/0x5*(-parseInt(_0x2ef84b(0x1c6))/0x6)+-parseInt(_0x2ef84b(0x1c4))/0x7+parseInt(_0x2ef84b(0x1ab))/0x8*(-parseInt(_0x2ef84b(0x1ac))/0x9)+parseInt(_0x2ef84b(0x1b2))/0xa+parseInt(_0x2ef84b(0x19f))/0xb*(parseInt(_0x2ef84b(0x198))/0xc);if(_0x3952cb===_0x22ec55)break;else _0x5aac10['push'](_0x5aac10['shift']());}catch(_0x33a094){_0x5aac10['push'](_0x5aac10['shift']());}}}(a151_0x2012,0x6644a));function a151_0x3e66(_0x5f1b4f,_0x185bbe){_0x5f1b4f=_0x5f1b4f-0x190;const _0x2012f1=a151_0x2012();let _0x3e66aa=_0x2012f1[_0x5f1b4f];return _0x3e66aa;}export const DEFAULT_TIME_RANGE='-1d';function a151_0x2012(){const _0x4449db=['\x20a\x0a\x20\x20ON\x20m.','\x20b\x0a\x20\x20ON\x20m.','\x0aSELECT\x20','\x20m\x0a','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','1973139VuGIBC','behaviors','896814hCCJXX','\x0aSELECT\x20m.','master','child_key','push','name','\x0a\x20\x20ON\x20m.','columns','\x20=\x20a.','\x20AS\x20','database','map','table','\x0aFROM\x20','914036xwJWwZ','9389748XIOksA','\x0aWHERE\x20a.','length','\x20m\x0aLEFT\x20JOIN\x20','toLowerCase','b.*','\x20LIMIT\x20','11KiakxV','column','source','attributes','all_columns','\x0aLIMIT\x200\x0a','label','\x20IS\x20NOT\x20NULL\x0a','\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20','join','(all\x20columns)','parent_key','41904gCxfRD','459HLobXL','20IFMKPA','10421kaOFUO','9kAKnRz','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','138eWBXVj','7497800hdgfqA','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','m.*','\x27)\x0a',')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20','forEach','find','replace','\x0aLIMIT\x20','\x20=\x20b.','trim','\x20m\x0aJOIN\x20','SELECT\x20*\x20FROM\x20'];a151_0x2012=function(){return _0x4449db;};return a151_0x2012();}export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x68f412,_0x32fdab,_0x14a99f){const _0x64ff1=a151_0x3e66,_0x1062a1=_0x14a99f&&_0x14a99f[_0x64ff1(0x19a)]>0x0?_0x14a99f[_0x64ff1(0x1a8)](',\x20'):'*';return'SELECT\x20'+_0x1062a1+'\x20FROM\x20'+_0x68f412+'.'+_0x32fdab+'\x20LIMIT\x200';}export function generateMasterCountSQL(_0x5564d0){const _0x2d3e47=a151_0x3e66,{database:_0x83bb57,table:_0x39f35b}=_0x5564d0[_0x2d3e47(0x1c8)];return _0x2d3e47(0x1b3)+_0x83bb57+'.'+_0x39f35b;}export function generateMasterSampleSQL(_0x1e4d7c,_0x3565f4=0x5){const _0x4d2136=a151_0x3e66,{database:_0x272e2b,table:_0x56d745}=_0x1e4d7c['master'];return _0x4d2136(0x1be)+_0x272e2b+'.'+_0x56d745+'\x20LIMIT\x20'+_0x3565f4;}export function generateAttributeCoverageSQL(_0x157ea7,_0x561d50){const _0x14db50=a151_0x3e66,_0x581b30=_0x157ea7[_0x14db50(0x1c8)];return(_0x14db50(0x1a7)+_0x581b30[_0x14db50(0x193)]+'.'+_0x581b30[_0x14db50(0x195)]+_0x14db50(0x19b)+_0x561d50[_0x14db50(0x1a1)][_0x14db50(0x193)]+'.'+_0x561d50[_0x14db50(0x1a1)][_0x14db50(0x195)]+'\x20a\x0a\x20\x20ON\x20m.'+_0x561d50['join'][_0x14db50(0x1aa)]+_0x14db50(0x191)+_0x561d50['join'][_0x14db50(0x1c9)]+_0x14db50(0x199)+_0x561d50[_0x14db50(0x1a8)][_0x14db50(0x1c9)]+_0x14db50(0x1a6))['trim']();}export function generateBehaviorStatsSQL(_0x567142,_0xe26411,_0x412a1f=DEFAULT_TIME_RANGE){const _0x511c73=a151_0x3e66,_0x2254e6=_0x567142[_0x511c73(0x1c8)];return(_0x511c73(0x1c3)+_0xe26411[_0x511c73(0x1a8)]['parent_key']+_0x511c73(0x1b6)+_0x2254e6[_0x511c73(0x193)]+'.'+_0x2254e6['table']+_0x511c73(0x1bd)+_0xe26411['source']['database']+'.'+_0xe26411['source'][_0x511c73(0x195)]+'\x20b\x0a\x20\x20ON\x20m.'+_0xe26411['join'][_0x511c73(0x1aa)]+_0x511c73(0x1bb)+_0xe26411['join']['child_key']+_0x511c73(0x1b0)+_0x412a1f+_0x511c73(0x1b5))[_0x511c73(0x1bc)]();}export function generateAttributeSampleSQL(_0x212498,_0x1ac830,_0x5610d3=0x5){const _0x433ab8=a151_0x3e66,_0x41ca7d=_0x212498[_0x433ab8(0x1c8)],_0x7c0e27=_0x1ac830[_0x433ab8(0x1a8)][_0x433ab8(0x1aa)],_0x5abf16=_0x1ac830[_0x433ab8(0x190)][_0x433ab8(0x194)](_0x3b40a3=>'a.'+_0x3b40a3['column'])[_0x433ab8(0x1a8)](',\x20');return(_0x433ab8(0x1c7)+_0x7c0e27+',\x20'+_0x5abf16+'\x0aFROM\x20'+_0x41ca7d[_0x433ab8(0x193)]+'.'+_0x41ca7d[_0x433ab8(0x195)]+_0x433ab8(0x1bd)+_0x1ac830['source'][_0x433ab8(0x193)]+'.'+_0x1ac830[_0x433ab8(0x1a1)]['table']+_0x433ab8(0x1bf)+_0x1ac830[_0x433ab8(0x1a8)][_0x433ab8(0x1aa)]+'\x20=\x20a.'+_0x1ac830[_0x433ab8(0x1a8)][_0x433ab8(0x1c9)]+_0x433ab8(0x1ba)+_0x5610d3+'\x0a')[_0x433ab8(0x1bc)]();}export function generateBehaviorSampleSQL(_0x5ea81a,_0xa6855a,_0x4e12ae=0x5,_0x512d05=DEFAULT_TIME_RANGE){const _0x4d3470=a151_0x3e66,_0x5b8de2=_0x5ea81a[_0x4d3470(0x1c8)],_0x3194d3=_0xa6855a[_0x4d3470(0x1a8)][_0x4d3470(0x1aa)];let _0x1a1fee;if(_0xa6855a[_0x4d3470(0x1a3)])_0x1a1fee=_0x4d3470(0x19d);else _0xa6855a[_0x4d3470(0x190)]&&_0xa6855a['columns']['length']>0x0?_0x1a1fee=_0xa6855a[_0x4d3470(0x190)][_0x4d3470(0x194)](_0x5b132a=>'b.'+_0x5b132a[_0x4d3470(0x1a0)])[_0x4d3470(0x1a8)](',\x20'):_0x1a1fee='b.*';return('\x0aSELECT\x20m.'+_0x3194d3+',\x20'+_0x1a1fee+'\x0aFROM\x20'+_0x5b8de2[_0x4d3470(0x193)]+'.'+_0x5b8de2[_0x4d3470(0x195)]+'\x20m\x0aJOIN\x20'+_0xa6855a[_0x4d3470(0x1a1)]['database']+'.'+_0xa6855a[_0x4d3470(0x1a1)][_0x4d3470(0x195)]+_0x4d3470(0x1c0)+_0xa6855a['join'][_0x4d3470(0x1aa)]+_0x4d3470(0x1bb)+_0xa6855a[_0x4d3470(0x1a8)]['child_key']+'\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27'+_0x512d05+'\x27)\x0aLIMIT\x20'+_0x4e12ae+'\x0a')[_0x4d3470(0x1bc)]();}function quoteIdentifier(_0x5658a7){const _0x105023=a151_0x3e66;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/['test'](_0x5658a7))return'\x22'+_0x5658a7[_0x105023(0x1b9)](/"/g,'\x22\x22')+'\x22';return _0x5658a7;}export function generateEnrichedSQL(_0x5d97c7,_0x4f3ca1=0x5){const _0x14725f=a151_0x3e66,_0x51e7b2=_0x5d97c7[_0x14725f(0x1c8)],_0x4d5fde=_0x5d97c7[_0x14725f(0x1a2)]||[];if(_0x4d5fde[_0x14725f(0x19a)]===0x0)return _0x14725f(0x1be)+_0x51e7b2[_0x14725f(0x193)]+'.'+_0x51e7b2[_0x14725f(0x195)]+_0x14725f(0x19e)+_0x4f3ca1;const _0x26e30b=[_0x14725f(0x1b4)],_0x1d4d4b=[];return _0x4d5fde['forEach']((_0x4612d5,_0x4c0da1)=>{const _0x2f273c=_0x14725f,_0xf9e535='a'+_0x4c0da1;_0x4612d5[_0x2f273c(0x190)][_0x2f273c(0x1b7)](_0x525387=>{const _0x29a383=_0x2f273c,_0xf6824a=quoteIdentifier(_0x525387[_0x29a383(0x1a5)]||_0x525387['column']);_0x26e30b[_0x29a383(0x1ca)](_0xf9e535+'.'+_0x525387['column']+_0x29a383(0x192)+_0xf6824a);}),_0x1d4d4b[_0x2f273c(0x1ca)]('LEFT\x20JOIN\x20'+_0x4612d5['source'][_0x2f273c(0x193)]+'.'+_0x4612d5[_0x2f273c(0x1a1)][_0x2f273c(0x195)]+'\x20'+_0xf9e535+_0x2f273c(0x1cc)+_0x4612d5[_0x2f273c(0x1a8)][_0x2f273c(0x1aa)]+'\x20=\x20'+_0xf9e535+'.'+_0x4612d5['join'][_0x2f273c(0x1c9)]);}),(_0x14725f(0x1c1)+_0x26e30b[_0x14725f(0x1a8)](',\x20')+_0x14725f(0x196)+_0x51e7b2[_0x14725f(0x193)]+'.'+_0x51e7b2[_0x14725f(0x195)]+_0x14725f(0x1c2)+_0x1d4d4b['join']('\x0a')+_0x14725f(0x1ba)+_0x4f3ca1+'\x0a')[_0x14725f(0x1bc)]();}export function generateAttributeSchemaSQL(_0x322779,_0x5099de){const _0x273945=a151_0x3e66,_0x3ae7b0=_0x322779[_0x273945(0x1c8)],_0x5a232d=_0x5099de[_0x273945(0x1a8)][_0x273945(0x1aa)],_0x550125=_0x5099de[_0x273945(0x190)][_0x273945(0x194)](_0x331be4=>'a.'+_0x331be4[_0x273945(0x1a0)])[_0x273945(0x1a8)](',\x20');return(_0x273945(0x1c7)+_0x5a232d+',\x20'+_0x550125+_0x273945(0x196)+_0x3ae7b0[_0x273945(0x193)]+'.'+_0x3ae7b0[_0x273945(0x195)]+_0x273945(0x1bd)+_0x5099de['source']['database']+'.'+_0x5099de[_0x273945(0x1a1)][_0x273945(0x195)]+'\x20a\x0a\x20\x20ON\x20m.'+_0x5099de['join'][_0x273945(0x1aa)]+_0x273945(0x191)+_0x5099de[_0x273945(0x1a8)][_0x273945(0x1c9)]+'\x0aLIMIT\x200\x0a')[_0x273945(0x1bc)]();}export function generateBehaviorSchemaSQL(_0x22a674,_0x3a459d){const _0x1a2ecc=a151_0x3e66,_0x5e6784=_0x22a674[_0x1a2ecc(0x1c8)],_0x1e21ed=_0x3a459d['join'][_0x1a2ecc(0x1aa)];let _0x16c0b9;if(_0x3a459d['all_columns'])_0x16c0b9=_0x1a2ecc(0x19d);else _0x3a459d[_0x1a2ecc(0x190)]&&_0x3a459d[_0x1a2ecc(0x190)]['length']>0x0?_0x16c0b9=_0x3a459d[_0x1a2ecc(0x190)]['map'](_0x2c8287=>'b.'+_0x2c8287[_0x1a2ecc(0x1a0)])[_0x1a2ecc(0x1a8)](',\x20'):_0x16c0b9='b.*';return(_0x1a2ecc(0x1c7)+_0x1e21ed+',\x20'+_0x16c0b9+_0x1a2ecc(0x196)+_0x5e6784['database']+'.'+_0x5e6784[_0x1a2ecc(0x195)]+_0x1a2ecc(0x1bd)+_0x3a459d['source'][_0x1a2ecc(0x193)]+'.'+_0x3a459d['source']['table']+_0x1a2ecc(0x1c0)+_0x3a459d['join'][_0x1a2ecc(0x1aa)]+'\x20=\x20b.'+_0x3a459d[_0x1a2ecc(0x1a8)]['child_key']+_0x1a2ecc(0x1a4))['trim']();}export function getAttributeColumns(_0x193c2b){const _0x30b148=a151_0x3e66;return _0x193c2b['columns'][_0x30b148(0x194)](_0x49ded9=>({'label':_0x49ded9[_0x30b148(0x1a5)]||_0x49ded9['column'],'column':_0x49ded9[_0x30b148(0x1a0)]}));}export function getBehaviorColumns(_0x9b2603){const _0x20dea7=a151_0x3e66;if(_0x9b2603['all_columns'])return[{'label':_0x20dea7(0x1a9),'column':'*'}];if(_0x9b2603['columns']&&_0x9b2603[_0x20dea7(0x190)]['length']>0x0)return _0x9b2603['columns'][_0x20dea7(0x194)](_0x284ca0=>({'label':_0x284ca0[_0x20dea7(0x1a5)]||_0x284ca0['column'],'column':_0x284ca0[_0x20dea7(0x1a0)]}));return[{'label':_0x20dea7(0x1a9),'column':'*'}];}export function findAttributeByName(_0xbb427e,_0x2128d4){const _0x350b1c=a151_0x3e66;return _0xbb427e['attributes']?.[_0x350b1c(0x1b8)](_0x50d220=>_0x50d220[_0x350b1c(0x1cb)]['toLowerCase']()===_0x2128d4[_0x350b1c(0x19c)]());}export function findBehaviorByName(_0x2a2932,_0x549991){const _0x530d72=a151_0x3e66;return _0x2a2932[_0x530d72(0x1c5)]?.[_0x530d72(0x1b8)](_0xcb5103=>_0xcb5103['name'][_0x530d72(0x19c)]()===_0x549991[_0x530d72(0x19c)]());}
|