@treasuredata/tdx 2026.4.15 → 2026.4.16
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.js +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.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.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.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.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.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/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/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(_0x23e391,_0x5818a2){const _0x5f23f0=a146_0x542a,_0x36bc6f=_0x23e391();while(!![]){try{const _0x38d513=parseInt(_0x5f23f0(0x215))/0x1*(parseInt(_0x5f23f0(0x188))/0x2)+-parseInt(_0x5f23f0(0x217))/0x3+parseInt(_0x5f23f0(0x178))/0x4+-parseInt(_0x5f23f0(0x203))/0x5+parseInt(_0x5f23f0(0x20b))/0x6+-parseInt(_0x5f23f0(0x1ea))/0x7*(-parseInt(_0x5f23f0(0x1c7))/0x8)+-parseInt(_0x5f23f0(0x18f))/0x9*(parseInt(_0x5f23f0(0x1aa))/0xa);if(_0x38d513===_0x5818a2)break;else _0x36bc6f['push'](_0x36bc6f['shift']());}catch(_0x58da68){_0x36bc6f['push'](_0x36bc6f['shift']());}}}(a146_0x5cb2,0xbbe77));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x211906,_0x4a1d32,_0x34660e,_0x41174c,_0x663688,_0x1315f8){const _0x289c61=a146_0x542a;return{'level':_0x211906,'path':_0x4a1d32,'code':_0x34660e,'message':_0x41174c,'location':getLocationFromPath(_0x663688[_0x289c61(0x1f4)],_0x663688['source'],pathToArray(_0x1315f8??_0x4a1d32))};}function validateVersionStructure(_0x5bcc6b,_0x1a22d5){const _0x31dae2=a146_0x542a,_0x54ca9e=[];return _0x5bcc6b['length']>MAX_STAGES&&_0x54ca9e[_0x31dae2(0x20d)](createIssue('error','stages',_0x31dae2(0x1eb),_0x31dae2(0x1f1)+_0x5bcc6b[_0x31dae2(0x223)]+_0x31dae2(0x179)+MAX_STAGES,_0x1a22d5)),_0x54ca9e;}function validateStageStructure(_0x4716c2,_0x3914ea,_0x18889e,_0x4c179f){const _0x2418be=a146_0x542a,_0x39dabd=[],_0x559ab1=_0x2418be(0x1f5)+_0x3914ea+']';_0x3914ea===0x0&&!_0x4716c2[_0x2418be(0x1ee)]&&_0x39dabd['push'](createIssue(_0x2418be(0x205),_0x559ab1+_0x2418be(0x1fa),'MISSING_ENTRY_CRITERIA',_0x2418be(0x172)+_0x4716c2[_0x2418be(0x1c4)]+_0x2418be(0x1c6),_0x4c179f,_0x559ab1));const _0x42183e=_0x3914ea===_0x18889e-0x1;!_0x42183e&&!_0x4716c2[_0x2418be(0x202)]&&_0x39dabd[_0x2418be(0x20d)](createIssue(_0x2418be(0x205),_0x559ab1+'.milestone',_0x2418be(0x1b0),_0x2418be(0x172)+_0x4716c2[_0x2418be(0x1c4)]+_0x2418be(0x1a2),_0x4c179f,_0x559ab1));(!_0x4716c2[_0x2418be(0x1d1)]||_0x4716c2[_0x2418be(0x1d1)]['length']===0x0)&&_0x39dabd[_0x2418be(0x20d)](createIssue(_0x2418be(0x195),_0x559ab1+_0x2418be(0x1a5),_0x2418be(0x19f),_0x2418be(0x172)+_0x4716c2['name']+_0x2418be(0x201),_0x4c179f,_0x559ab1));const _0x3a3a5e=_0x4716c2['steps']?.[_0x2418be(0x223)]??0x0;if(_0x3a3a5e===0x0)_0x39dabd[_0x2418be(0x20d)](createIssue('error',_0x559ab1+_0x2418be(0x175),'INSUFFICIENT_STEPS',_0x2418be(0x172)+_0x4716c2[_0x2418be(0x1c4)]+_0x2418be(0x21d),_0x4c179f,_0x559ab1+_0x2418be(0x175)));else{if(_0x3a3a5e===0x1)_0x39dabd['push'](createIssue(_0x2418be(0x195),_0x559ab1+_0x2418be(0x175),_0x2418be(0x1c3),_0x2418be(0x172)+_0x4716c2[_0x2418be(0x1c4)]+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x4c179f,_0x559ab1+_0x2418be(0x175)));else _0x3a3a5e<=0x3&&_0x39dabd[_0x2418be(0x20d)](createIssue('warning',_0x559ab1+_0x2418be(0x175),'FEW_STEPS',_0x2418be(0x172)+_0x4716c2['name']+'\x27\x20has\x20only\x20'+_0x3a3a5e+_0x2418be(0x189),_0x4c179f,_0x559ab1+_0x2418be(0x175)));}return _0x39dabd;}function validateStep(_0x5186c8,_0x113b86,_0x5d36e1,_0x6d2dd1){const _0x592194=a146_0x542a,_0x17f30c=[];if(_0x5186c8[_0x592194(0x184)]===_0x592194(0x190))return _0x5186c8['next']&&_0x17f30c[_0x592194(0x20d)](createIssue('error',_0x113b86+_0x592194(0x21e),_0x592194(0x209),'End\x20step\x20\x27'+_0x5186c8[_0x592194(0x1c4)]+_0x592194(0x218),_0x5d36e1)),_0x592194(0x1a6)in _0x5186c8&&_0x5186c8[_0x592194(0x1a6)]!==undefined&&_0x17f30c[_0x592194(0x20d)](createIssue(_0x592194(0x205),_0x113b86+_0x592194(0x1fe),'END_STEP_HAS_NEXT_OR_WITH',_0x592194(0x18a)+_0x5186c8[_0x592194(0x1c4)]+_0x592194(0x1c1),_0x5d36e1)),_0x17f30c;_0x5186c8['next']&&(_0x5d36e1[_0x592194(0x213)]&&!_0x5d36e1[_0x592194(0x213)][_0x592194(0x1ad)](_0x5186c8[_0x592194(0x1f2)])&&_0x17f30c[_0x592194(0x20d)](createIssue(_0x592194(0x205),_0x113b86+_0x592194(0x21e),_0x592194(0x186),_0x592194(0x1a9)+_0x5186c8[_0x592194(0x1f2)]+'\x27',_0x5d36e1)));switch(_0x5186c8['type']){case _0x592194(0x19a):_0x17f30c[_0x592194(0x20d)](...validateWaitStep(_0x5186c8,_0x113b86,_0x5d36e1,_0x6d2dd1));break;case _0x592194(0x1fc):_0x17f30c['push'](...validateActivationStep(_0x5186c8,_0x113b86,_0x5d36e1));break;case _0x592194(0x1db):_0x17f30c['push'](...validateDecisionPointStep(_0x5186c8,_0x113b86,_0x5d36e1,_0x6d2dd1));break;case _0x592194(0x1ac):_0x17f30c[_0x592194(0x20d)](...validateAbTestStep(_0x5186c8,_0x113b86,_0x5d36e1,_0x6d2dd1));break;case _0x592194(0x1e3):_0x17f30c[_0x592194(0x20d)](...validateJumpStep(_0x5186c8,_0x113b86,_0x5d36e1));break;}return _0x17f30c;}function validateWaitStep(_0x5ddc31,_0x30589c,_0x3ae597,_0x4b0ea6){const _0x185f08=a146_0x542a,_0x5c75b9=[];if(!_0x5ddc31[_0x185f08(0x1a6)])return _0x5c75b9[_0x185f08(0x20d)](createIssue(_0x185f08(0x205),_0x30589c+_0x185f08(0x1fe),_0x185f08(0x21a),_0x185f08(0x222),_0x3ae597,_0x30589c)),_0x5c75b9;if(_0x5ddc31[_0x185f08(0x1a6)]['condition']){const _0x53392f=_0x5ddc31[_0x185f08(0x1a6)][_0x185f08(0x18d)];if(_0x53392f['segment']){_0x3ae597[_0x185f08(0x207)]?.[_0x185f08(0x1cd)](_0x53392f[_0x185f08(0x211)]);!_0x53392f['segment'][_0x185f08(0x17b)]('ref:')&&(_0x3ae597[_0x185f08(0x1cf)]&&!_0x3ae597[_0x185f08(0x1cf)][_0x185f08(0x1ad)](_0x53392f['segment'])&&_0x5c75b9[_0x185f08(0x20d)](createIssue('error',_0x30589c+_0x185f08(0x1ec),_0x185f08(0x1b5),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x53392f[_0x185f08(0x211)]+_0x185f08(0x1e5),_0x3ae597)));_0x53392f[_0x185f08(0x1f2)]&&_0x3ae597[_0x185f08(0x213)]&&!_0x3ae597[_0x185f08(0x213)]['has'](_0x53392f[_0x185f08(0x1f2)])&&_0x5c75b9[_0x185f08(0x20d)](createIssue(_0x185f08(0x205),_0x30589c+_0x185f08(0x1ba),'INVALID_NEXT_REFERENCE',_0x185f08(0x1d9)+_0x53392f['next']+'\x27',_0x3ae597));_0x53392f[_0x185f08(0x212)]?.[_0x185f08(0x1f2)]&&_0x3ae597['stepNames']&&!_0x3ae597['stepNames']['has'](_0x53392f[_0x185f08(0x212)][_0x185f08(0x1f2)])&&_0x5c75b9[_0x185f08(0x20d)](createIssue('error',_0x30589c+'.with.condition.timeout.next',_0x185f08(0x186),_0x185f08(0x20c)+_0x53392f[_0x185f08(0x212)][_0x185f08(0x1f2)]+'\x27',_0x3ae597));const _0x4c53cd=_0x53392f[_0x185f08(0x1f2)]||_0x5ddc31['next'],_0x10c193=_0x53392f[_0x185f08(0x212)]?.[_0x185f08(0x1f2)]||_0x5ddc31[_0x185f08(0x1f2)];if(_0x4c53cd){const _0xce9220=_0x4b0ea6[_0x185f08(0x1f8)](_0x4c53cd);_0xce9220?.[_0x185f08(0x184)]==='merge'&&_0x5c75b9[_0x185f08(0x20d)](createIssue(_0x185f08(0x195),_0x30589c+_0x185f08(0x1ba),'BRANCH_DIRECTLY_TO_MERGE',_0x185f08(0x1b9)+_0x4c53cd+_0x185f08(0x1b6),_0x3ae597,_0x30589c+_0x185f08(0x196)));}if(_0x10c193){const _0x20f4d5=_0x4b0ea6[_0x185f08(0x1f8)](_0x10c193);_0x20f4d5?.[_0x185f08(0x184)]==='merge'&&_0x5c75b9['push'](createIssue('warning',_0x30589c+'.with.condition.timeout.next',_0x185f08(0x1dd),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x10c193+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x3ae597,_0x30589c+_0x185f08(0x1af)));}}}return _0x5c75b9;}function validateActivationStep(_0x38204f,_0x48b57e,_0x2f724b){const _0x35107f=a146_0x542a,_0x2c542d=[];if(!_0x38204f[_0x35107f(0x1a6)]?.[_0x35107f(0x1fc)])return _0x2c542d[_0x35107f(0x20d)](createIssue(_0x35107f(0x205),_0x48b57e+_0x35107f(0x21f),_0x35107f(0x1a8),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x2f724b,_0x48b57e)),_0x2c542d;const _0x21bafe=_0x38204f[_0x35107f(0x1a6)][_0x35107f(0x1fc)];return _0x2f724b[_0x35107f(0x171)]&&!_0x21bafe[_0x35107f(0x17b)](_0x35107f(0x1a3))&&(!_0x2f724b[_0x35107f(0x171)][_0x35107f(0x1ad)](_0x21bafe)&&_0x2c542d[_0x35107f(0x20d)](createIssue('error',_0x48b57e+_0x35107f(0x21f),_0x35107f(0x1c0),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x21bafe+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x2f724b))),_0x2c542d;}function validateDecisionPointStep(_0x8d6cc3,_0x58a4df,_0x10f1cf,_0x2e6b95){const _0x110cd7=a146_0x542a,_0x45b066=[];if(!_0x8d6cc3[_0x110cd7(0x1a6)]?.['branches']||_0x8d6cc3[_0x110cd7(0x1a6)][_0x110cd7(0x1a4)][_0x110cd7(0x223)]===0x0)return _0x45b066['push'](createIssue(_0x110cd7(0x205),_0x58a4df+_0x110cd7(0x1e4),_0x110cd7(0x199),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x10f1cf,_0x58a4df)),_0x45b066;for(let _0x4f6278=0x0;_0x4f6278<_0x8d6cc3[_0x110cd7(0x1a6)][_0x110cd7(0x1a4)][_0x110cd7(0x223)];_0x4f6278++){const _0x2a5c40=_0x8d6cc3[_0x110cd7(0x1a6)][_0x110cd7(0x1a4)][_0x4f6278],_0x2909fd=_0x58a4df+_0x110cd7(0x200)+_0x4f6278+']';_0x2a5c40['segment']&&!_0x2a5c40[_0x110cd7(0x20e)]&&(_0x10f1cf[_0x110cd7(0x207)]?.[_0x110cd7(0x1cd)](_0x2a5c40['segment']),!_0x2a5c40['segment'][_0x110cd7(0x17b)](_0x110cd7(0x1a3))&&(_0x10f1cf[_0x110cd7(0x1cf)]&&!_0x10f1cf[_0x110cd7(0x1cf)][_0x110cd7(0x1ad)](_0x2a5c40[_0x110cd7(0x211)])&&_0x45b066[_0x110cd7(0x20d)](createIssue('error',_0x2909fd+'.segment','MISSING_SEGMENT_REFERENCE',_0x110cd7(0x19d)+_0x2a5c40[_0x110cd7(0x211)]+'\x27',_0x10f1cf))));_0x2a5c40[_0x110cd7(0x1f2)]&&_0x10f1cf[_0x110cd7(0x213)]&&!_0x10f1cf[_0x110cd7(0x213)][_0x110cd7(0x1ad)](_0x2a5c40[_0x110cd7(0x1f2)])&&_0x45b066[_0x110cd7(0x20d)](createIssue('error',_0x2909fd+_0x110cd7(0x21e),_0x110cd7(0x186),_0x110cd7(0x1ce)+_0x2a5c40[_0x110cd7(0x1f2)]+'\x27',_0x10f1cf));if(_0x2a5c40['next']){const _0x234123=_0x2e6b95[_0x110cd7(0x1f8)](_0x2a5c40[_0x110cd7(0x1f2)]);_0x234123?.[_0x110cd7(0x184)]===_0x110cd7(0x1b7)&&_0x45b066[_0x110cd7(0x20d)](createIssue(_0x110cd7(0x195),_0x2909fd+'.next',_0x110cd7(0x1dd),'Decision\x20branch\x20\x27'+_0x2a5c40[_0x110cd7(0x1c4)]+_0x110cd7(0x1a1)+_0x2a5c40[_0x110cd7(0x1f2)]+_0x110cd7(0x216),_0x10f1cf));}}return _0x45b066;}function validateAbTestStep(_0x47c05d,_0xd4e111,_0x3646b5,_0x55d938){const _0xbfde77=a146_0x542a,_0x532c03=[];if(!_0x47c05d[_0xbfde77(0x1a6)]?.[_0xbfde77(0x1c9)]||_0x47c05d['with'][_0xbfde77(0x1c9)][_0xbfde77(0x223)]===0x0)return _0x532c03[_0xbfde77(0x20d)](createIssue(_0xbfde77(0x205),_0xd4e111+_0xbfde77(0x1bf),_0xbfde77(0x199),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x3646b5,_0xd4e111)),_0x532c03;const _0x5f54a9=_0x47c05d[_0xbfde77(0x1a6)][_0xbfde77(0x1c9)][_0xbfde77(0x204)]((_0x15e524,_0x80a55e)=>_0x15e524+(_0x80a55e[_0xbfde77(0x1c5)]||0x0),0x0);Math[_0xbfde77(0x185)](_0x5f54a9-0x64)>0.01&&_0x532c03[_0xbfde77(0x20d)](createIssue(_0xbfde77(0x205),_0xd4e111+_0xbfde77(0x1bf),'INVALID_AB_TEST_PERCENTAGES',_0xbfde77(0x181)+_0x5f54a9+'%)',_0x3646b5));for(let _0x5b0249=0x0;_0x5b0249<_0x47c05d[_0xbfde77(0x1a6)][_0xbfde77(0x1c9)][_0xbfde77(0x223)];_0x5b0249++){const _0x526900=_0x47c05d['with'][_0xbfde77(0x1c9)][_0x5b0249],_0x32ad83=_0xd4e111+_0xbfde77(0x1b3)+_0x5b0249+']';_0x526900[_0xbfde77(0x1f2)]&&_0x3646b5[_0xbfde77(0x213)]&&!_0x3646b5[_0xbfde77(0x213)][_0xbfde77(0x1ad)](_0x526900[_0xbfde77(0x1f2)])&&_0x532c03[_0xbfde77(0x20d)](createIssue(_0xbfde77(0x205),_0x32ad83+_0xbfde77(0x21e),'INVALID_NEXT_REFERENCE',_0xbfde77(0x1d6)+_0x526900[_0xbfde77(0x1f2)]+'\x27',_0x3646b5));if(_0x526900['next']){const _0xb13646=_0x55d938[_0xbfde77(0x1f8)](_0x526900[_0xbfde77(0x1f2)]);_0xb13646?.[_0xbfde77(0x184)]==='merge'&&_0x532c03[_0xbfde77(0x20d)](createIssue(_0xbfde77(0x195),_0x32ad83+_0xbfde77(0x21e),_0xbfde77(0x1dd),_0xbfde77(0x1ed)+_0x526900[_0xbfde77(0x1c4)]+_0xbfde77(0x1a1)+_0x526900[_0xbfde77(0x1f2)]+_0xbfde77(0x216),_0x3646b5));}}return _0x532c03;}function validateJumpStep(_0x48f1fb,_0x5df4ce,_0x266a60){const _0x42129b=a146_0x542a,_0x51df0d=[];if(!_0x48f1fb[_0x42129b(0x1a6)]?.['target'])return _0x51df0d[_0x42129b(0x20d)](createIssue(_0x42129b(0x205),_0x5df4ce+'.with.target',_0x42129b(0x1cc),_0x42129b(0x214),_0x266a60,_0x5df4ce)),_0x51df0d;return(!_0x48f1fb[_0x42129b(0x1a6)][_0x42129b(0x1d7)][_0x42129b(0x187)]||!_0x48f1fb['with'][_0x42129b(0x1d7)][_0x42129b(0x19b)])&&_0x51df0d[_0x42129b(0x20d)](createIssue('error',_0x5df4ce+_0x42129b(0x17c),_0x42129b(0x1cc),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x266a60)),_0x51df0d;}function buildConvergenceMap(_0x4addcc){const _0x5ca6b6=a146_0x542a,_0x3dcd4a=new Map();function _0x2f9798(_0x47a6fe,_0x4a823b){const _0x4652b5=a146_0x542a,_0x33295e=_0x3dcd4a['get'](_0x47a6fe)||[];_0x33295e[_0x4652b5(0x20d)](_0x4a823b),_0x3dcd4a[_0x4652b5(0x1bd)](_0x47a6fe,_0x33295e);}for(const _0x1aa5d9 of _0x4addcc){_0x1aa5d9[_0x5ca6b6(0x1f2)]&&_0x2f9798(_0x1aa5d9[_0x5ca6b6(0x1f2)],{'stepName':_0x1aa5d9['name'],'description':_0x5ca6b6(0x1c8)+_0x1aa5d9['name']+'\x27'});if(_0x1aa5d9['type']===_0x5ca6b6(0x1db)&&_0x1aa5d9[_0x5ca6b6(0x1a6)]?.[_0x5ca6b6(0x1a4)])for(const _0x40aeff of _0x1aa5d9[_0x5ca6b6(0x1a6)][_0x5ca6b6(0x1a4)]){_0x40aeff['next']&&_0x2f9798(_0x40aeff[_0x5ca6b6(0x1f2)],{'stepName':_0x1aa5d9[_0x5ca6b6(0x1c4)],'description':_0x5ca6b6(0x1fb)+_0x40aeff['name']+_0x5ca6b6(0x17e)+_0x1aa5d9[_0x5ca6b6(0x1c4)]+'\x27'});}if(_0x1aa5d9['type']===_0x5ca6b6(0x1ac)&&_0x1aa5d9[_0x5ca6b6(0x1a6)]?.['variants'])for(const _0x34b71f of _0x1aa5d9[_0x5ca6b6(0x1a6)][_0x5ca6b6(0x1c9)]){_0x34b71f[_0x5ca6b6(0x1f2)]&&_0x2f9798(_0x34b71f['next'],{'stepName':_0x1aa5d9[_0x5ca6b6(0x1c4)],'description':_0x5ca6b6(0x183)+_0x34b71f[_0x5ca6b6(0x1c4)]+_0x5ca6b6(0x17e)+_0x1aa5d9[_0x5ca6b6(0x1c4)]+'\x27'});}_0x1aa5d9['type']===_0x5ca6b6(0x19a)&&_0x1aa5d9[_0x5ca6b6(0x1a6)]?.['condition']&&(_0x1aa5d9[_0x5ca6b6(0x1a6)][_0x5ca6b6(0x18d)]['next']&&_0x2f9798(_0x1aa5d9['with'][_0x5ca6b6(0x18d)]['next'],{'stepName':_0x1aa5d9[_0x5ca6b6(0x1c4)],'description':_0x5ca6b6(0x173)+_0x1aa5d9[_0x5ca6b6(0x1c4)]+'\x27'}),_0x1aa5d9[_0x5ca6b6(0x1a6)][_0x5ca6b6(0x18d)][_0x5ca6b6(0x212)]?.[_0x5ca6b6(0x1f2)]&&_0x2f9798(_0x1aa5d9[_0x5ca6b6(0x1a6)]['condition'][_0x5ca6b6(0x212)][_0x5ca6b6(0x1f2)],{'stepName':_0x1aa5d9['name'],'description':'timeout\x20of\x20\x27'+_0x1aa5d9[_0x5ca6b6(0x1c4)]+'\x27'}));}return _0x3dcd4a;}function validateFlowControl(_0x4df6e5,_0x3c6f89,_0x1b4a8b){const _0x21f304=a146_0x542a,_0xf39bf3=[],_0x1223c5=_0x21f304(0x1f5)+_0x3c6f89+']',_0x54336b=_0x4df6e5[_0x21f304(0x182)]||[];if(_0x54336b[_0x21f304(0x223)]===0x0)return _0xf39bf3;const _0xfc200=new Map();for(const _0x97c846 of _0x54336b){_0x97c846[_0x21f304(0x1c4)]&&_0xfc200[_0x21f304(0x1bd)](_0x97c846[_0x21f304(0x1c4)],_0x97c846);}const _0x3e2f92=buildConvergenceMap(_0x54336b),_0x3ae387=_0x54336b[_0x21f304(0x194)](_0x1a0a68=>_0x1a0a68[_0x21f304(0x184)]==='end');!_0x3ae387&&_0xf39bf3['push'](createIssue('error',_0x1223c5+_0x21f304(0x175),_0x21f304(0x1e8),_0x21f304(0x172)+_0x4df6e5[_0x21f304(0x1c4)]+'\x27\x20has\x20no\x20end\x20step',_0x1b4a8b));for(const [_0x5df69d,_0x2d4b19]of _0x3e2f92){const _0x14a3e0=_0xfc200[_0x21f304(0x1f8)](_0x5df69d);if(!_0x14a3e0)continue;if(_0x2d4b19[_0x21f304(0x223)]>0x1&&_0x14a3e0[_0x21f304(0x184)]!=='merge'){const _0x5a7894=_0x2d4b19[_0x21f304(0x1d4)](_0x172b48=>_0x172b48['description'])[_0x21f304(0x1f3)](',\x20');_0xf39bf3[_0x21f304(0x20d)](createIssue(_0x21f304(0x205),_0x1223c5+'.steps',_0x21f304(0x1d2),_0x21f304(0x18e)+_0x5df69d+_0x21f304(0x1da)+_0x5a7894+').\x20Use\x20a\x20merge\x20step.',_0x1b4a8b));}_0x2d4b19[_0x21f304(0x223)]===0x1&&_0x14a3e0['type']==='merge'&&_0xf39bf3[_0x21f304(0x20d)](createIssue(_0x21f304(0x195),_0x1223c5+'.steps','SINGLE_INPUT_MERGE',_0x21f304(0x21c)+_0x5df69d+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x2d4b19[0x0][_0x21f304(0x1fd)]+_0x21f304(0x177),_0x1b4a8b));}for(const _0x327069 of _0x54336b){if(_0x327069[_0x21f304(0x184)]===_0x21f304(0x1b7)&&_0x327069['next']){const _0xd1cff4=_0xfc200[_0x21f304(0x1f8)](_0x327069[_0x21f304(0x1f2)]);_0xd1cff4?.[_0x21f304(0x184)]===_0x21f304(0x1b7)&&_0xf39bf3[_0x21f304(0x20d)](createIssue(_0x21f304(0x205),_0x1223c5+_0x21f304(0x175),_0x21f304(0x193),_0x21f304(0x21c)+_0x327069[_0x21f304(0x1c4)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x327069[_0x21f304(0x1f2)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x1b4a8b));}}return _0xf39bf3;}function validateCriteria(_0xfd33d5,_0x666050,_0x461df0){const _0x531cd2=a146_0x542a,_0x3824a9=[];return _0xfd33d5[_0x531cd2(0x211)]&&(_0x461df0['referencedSegments']?.['add'](_0xfd33d5[_0x531cd2(0x211)]),!_0xfd33d5[_0x531cd2(0x211)][_0x531cd2(0x17b)](_0x531cd2(0x1a3))&&(_0x461df0[_0x531cd2(0x1cf)]&&!_0x461df0[_0x531cd2(0x1cf)][_0x531cd2(0x1ad)](_0xfd33d5[_0x531cd2(0x211)])&&_0x3824a9['push'](createIssue('error',_0x666050+_0x531cd2(0x19c),_0x531cd2(0x1b5),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0xfd33d5[_0x531cd2(0x211)]+'\x27',_0x461df0)))),_0x3824a9;}function validateEmbeddedSegment(_0x29dacd,_0x3bbb17,_0x2c4cda){const _0x190ded=a146_0x542a,_0x2a95e1=[];return _0x29dacd[_0x190ded(0x1ae)]&&_0x2a95e1[_0x190ded(0x20d)](...validateRuleDef(_0x29dacd[_0x190ded(0x1ae)],_0x3bbb17+_0x190ded(0x191),_0x2c4cda)),_0x2a95e1;}function validateStage(_0x5c994a,_0x51541d,_0x2dff40,_0x4ae49b){const _0x34d5ef=a146_0x542a,_0x1efb2b=[],_0x180cfa=_0x34d5ef(0x1f5)+_0x51541d+']',_0x192f81=new Map(),_0x2b5233=new Map();if(_0x5c994a[_0x34d5ef(0x182)]){for(let _0x3ff142=0x0;_0x3ff142<_0x5c994a[_0x34d5ef(0x182)][_0x34d5ef(0x223)];_0x3ff142++){const _0x1ec44=_0x5c994a[_0x34d5ef(0x182)][_0x3ff142];_0x1ec44[_0x34d5ef(0x1c4)]&&_0x192f81[_0x34d5ef(0x1bd)](_0x1ec44[_0x34d5ef(0x1c4)],_0x1ec44);}for(let _0x5abd1a=0x0;_0x5abd1a<_0x5c994a[_0x34d5ef(0x182)][_0x34d5ef(0x223)];_0x5abd1a++){const _0x36ff18=_0x5c994a[_0x34d5ef(0x182)][_0x5abd1a],_0x410f0c=_0x180cfa+_0x34d5ef(0x198)+_0x5abd1a+']';if(_0x36ff18['name']){if(_0x2b5233[_0x34d5ef(0x1ad)](_0x36ff18[_0x34d5ef(0x1c4)])){const _0x1dd85e=_0x2b5233['get'](_0x36ff18['name']);_0x1efb2b['push'](createIssue(_0x34d5ef(0x205),_0x410f0c+'.name',_0x34d5ef(0x1ff),_0x34d5ef(0x1d5)+_0x36ff18[_0x34d5ef(0x1c4)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x1dd85e+'])',_0x4ae49b));}else _0x2b5233[_0x34d5ef(0x1bd)](_0x36ff18['name'],_0x5abd1a);}_0x1efb2b[_0x34d5ef(0x20d)](...validateStep(_0x36ff18,_0x410f0c,_0x4ae49b,_0x192f81));}}_0x5c994a[_0x34d5ef(0x1ee)]&&_0x1efb2b[_0x34d5ef(0x20d)](...validateCriteria(_0x5c994a[_0x34d5ef(0x1ee)],_0x180cfa+_0x34d5ef(0x1fa),_0x4ae49b));if(_0x5c994a['exit_criteria'])for(let _0x153fdf=0x0;_0x153fdf<_0x5c994a[_0x34d5ef(0x1d1)][_0x34d5ef(0x223)];_0x153fdf++){_0x1efb2b[_0x34d5ef(0x20d)](...validateCriteria(_0x5c994a[_0x34d5ef(0x1d1)][_0x153fdf],_0x180cfa+'.exit_criteria['+_0x153fdf+']',_0x4ae49b));}return _0x5c994a[_0x34d5ef(0x202)]&&_0x1efb2b[_0x34d5ef(0x20d)](...validateCriteria(_0x5c994a[_0x34d5ef(0x202)],_0x180cfa+_0x34d5ef(0x1de),_0x4ae49b)),_0x1efb2b[_0x34d5ef(0x20d)](...validateStageStructure(_0x5c994a,_0x51541d,_0x2dff40,_0x4ae49b)),_0x1efb2b['push'](...validateFlowControl(_0x5c994a,_0x51541d,_0x4ae49b)),_0x1efb2b;}function validateStagesForVersion(_0x15ffbb,_0x2d4fc3,_0x24a586,_0x433ee1,_0x3792f1,_0x17dfe0,_0x199f91){const _0x30202a=a146_0x542a;if(_0x15ffbb[_0x30202a(0x223)]===0x0){_0x3792f1[_0x30202a(0x20d)]({'level':'error','path':_0x433ee1+_0x30202a(0x192),'code':'MISSING_STAGES','message':_0x30202a(0x1f6),'location':getLocationFromPath(_0x24a586[_0x30202a(0x1f4)],_0x24a586[_0x30202a(0x1be)],['stages'])});return;}const _0x51826e=new Set();for(const _0x138f69 of _0x15ffbb){if(_0x138f69[_0x30202a(0x182)])for(const _0x2d064b of _0x138f69['steps']){_0x2d064b[_0x30202a(0x1c4)]&&_0x51826e[_0x30202a(0x1cd)](_0x2d064b[_0x30202a(0x1c4)]);}}const _0x1cfe91={..._0x24a586,'stepNames':_0x51826e},_0xe32a15=validateVersionStructure(_0x15ffbb,_0x1cfe91);for(const _0x156eba of _0xe32a15){const _0x226daf=_0x433ee1?{..._0x156eba,'path':''+_0x433ee1+_0x156eba['path']}:_0x156eba;if(_0x226daf[_0x30202a(0x1b1)]===_0x30202a(0x205))_0x3792f1[_0x30202a(0x20d)](_0x226daf);else _0x17dfe0[_0x30202a(0x20d)](_0x226daf);}for(let _0x228dd6=0x0;_0x228dd6<_0x15ffbb[_0x30202a(0x223)];_0x228dd6++){const _0x5b5f91=validateStage(_0x15ffbb[_0x228dd6],_0x228dd6,_0x15ffbb[_0x30202a(0x223)],_0x1cfe91);for(const _0x247f67 of _0x5b5f91){const _0x55ff95=_0x433ee1?{..._0x247f67,'path':''+_0x433ee1+_0x247f67[_0x30202a(0x1dc)]}:_0x247f67;if(_0x55ff95[_0x30202a(0x1b1)]==='error')_0x3792f1[_0x30202a(0x20d)](_0x55ff95);else _0x17dfe0[_0x30202a(0x20d)](_0x55ff95);}}if(_0x2d4fc3[_0x30202a(0x1c2)]){const _0x2ac26c=_0x199f91?.[_0x30202a(0x1d8)]?'goal':_0x433ee1+_0x30202a(0x1c2),_0x2e3781=validateCriteria(_0x2d4fc3[_0x30202a(0x1c2)],_0x2ac26c,_0x1cfe91);for(const _0x799139 of _0x2e3781){if(_0x799139[_0x30202a(0x1b1)]===_0x30202a(0x205))_0x3792f1[_0x30202a(0x20d)](_0x799139);else _0x17dfe0[_0x30202a(0x20d)](_0x799139);}}}function extractVersionIndex(_0x333977){const _0x3fad78=a146_0x542a,_0x10c7b7=_0x333977[_0x3fad78(0x1a7)](/^journeys\[(\d+)\]\./);return _0x10c7b7?_0x10c7b7[0x1]:undefined;}function deduplicateAcrossVersions(_0x174db8){const _0x368859=a146_0x542a,_0x50f923=new Map();for(let _0x53f456=0x0;_0x53f456<_0x174db8[_0x368859(0x223)];_0x53f456++){const _0x2712ca=_0x174db8[_0x53f456][_0x368859(0x1f0)]+':'+_0x174db8[_0x53f456][_0x368859(0x1d0)],_0x127f04=extractVersionIndex(_0x174db8[_0x53f456][_0x368859(0x1dc)]),_0x41d7a2=_0x50f923[_0x368859(0x1f8)](_0x2712ca);if(_0x41d7a2){_0x41d7a2['indices'][_0x368859(0x20d)](_0x53f456);if(_0x127f04)_0x41d7a2[_0x368859(0x17a)][_0x368859(0x1cd)](_0x127f04);}else _0x50f923[_0x368859(0x1bd)](_0x2712ca,{'indices':[_0x53f456],'versions':new Set(_0x127f04?[_0x127f04]:[])});}const _0x4e154f=new Set();for(const {indices:_0x3b59f0,versions:_0x3837a2}of _0x50f923[_0x368859(0x180)]()){if(_0x3837a2[_0x368859(0x210)]<=0x1)continue;const _0x5c1972=_0x174db8[_0x3b59f0[0x0]];_0x5c1972['path']=_0x5c1972[_0x368859(0x1dc)][_0x368859(0x1ef)](/^journeys\[\d+\]\./,''),_0x5c1972[_0x368859(0x1d0)]=_0x5c1972[_0x368859(0x1d0)]+_0x368859(0x1ca)+_0x3837a2[_0x368859(0x210)]+'\x20versions)';for(let _0x20e01c=0x1;_0x20e01c<_0x3b59f0[_0x368859(0x223)];_0x20e01c++){_0x4e154f[_0x368859(0x1cd)](_0x3b59f0[_0x20e01c]);}}const _0x50348e=[..._0x4e154f][_0x368859(0x208)]((_0x387ad3,_0x37eb5f)=>_0x37eb5f-_0x387ad3);for(const _0x47830d of _0x50348e){_0x174db8['splice'](_0x47830d,0x1);}}function a146_0x5cb2(){const _0x360c89=['steps','variant\x20\x27','type','abs','INVALID_NEXT_REFERENCE','journey','194bwdWcm','\x20steps\x20(may\x20be\x20too\x20simple)','End\x20step\x20\x27','MISSING_STAGES','journeys[','condition','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','45aQIgHR','end','.rule','stages','MERGE_TO_MERGE_CHAIN','some','warning','.with.condition','issues','.steps[','MISSING_CONDITIONS','wait','stage','.segment','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','skipSchema','MISSING_EXIT_CRITERIA','segments','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','ref:','branches','.exit_criteria','with','match','MISSING_ACTIVATION_REF','Step\x20references\x20non-existent\x20step\x20\x27','272630gtWlQG','segments.','ab_test','has','rule','.with.condition.timeout','MISSING_MILESTONE','level','entries','.with.variants[','excluded_','MISSING_SEGMENT_REFERENCE','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','merge','endsWith','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.condition.next','ACTIVATION_SCHEMA_ERROR','journey\x20entry','set','source','.with.variants','MISSING_ACTIVATION_DEFINITION','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','goal','INSUFFICIENT_STEPS','name','percentage','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','2378840waqxau','step\x20\x27','variants','\x20(across\x20','.type','INVALID_JUMP_TARGET','add','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','embeddedSegments','message','exit_criteria','CONVERGENCE_WITHOUT_MERGE','state','map','Duplicate\x20step\x20name\x20\x27','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','target','goalIsInherited','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','\x27\x20(from:\x20','decision_point','path','BRANCH_DIRECTLY_TO_MERGE','.milestone','MISSING_NAME','Journey\x20can\x20have\x20at\x20most\x20one\x20','filter','every','jump','.with.branches','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','data','keys','MISSING_END_STEP','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','21lLrIFV','TOO_MANY_STAGES','.with.condition.segment','A/B\x20test\x20variant\x20\x27','entry_criteria','replace','code','Journey\x20has\x20','next','join','document','stages[','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','includes','get','UNUSED_EMBEDDED_SEGMENT','.entry_criteria','branch\x20\x27','activation','description','.with','DUPLICATE_STEP_NAME','.with.branches[','\x27\x20has\x20no\x20exit_criteria\x20defined','milestone','5359715ypcMDx','reduce','error','journeys,\x20stages,\x20or\x20versions','referencedSegments','sort','END_STEP_HAS_NEXT_OR_WITH','activations','4284558SwUELs','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','push','excluded','journeys','size','segment','timeout','stepNames','Jump\x20step\x20requires\x20a\x20target','6599dHvzbV','\x27\x20with\x20no\x20action\x20in\x20between','4521027eEbtGc','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','versions[','MISSING_WAIT_PARAMS','version','Merge\x20step\x20\x27','\x27\x20has\x20no\x20steps','.next','.with.activation','trim','launched','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','length','activationKeys','Stage\x20\x27','condition\x20of\x20\x27','Journey\x20name\x20is\x20required','.steps','symbol',').\x20Merge\x20is\x20unnecessary.','4954644WcMRqW','\x20stages\x20but\x20maximum\x20is\x20','versions','startsWith','.with.target','safeParse','\x27\x20of\x20\x27','latest','values','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'];a146_0x5cb2=function(){return _0x360c89;};return a146_0x5cb2();}export function validateJourneyDef(_0xc8df14,_0x1602e7={},_0x30f4f2={}){const _0x1f940d=a146_0x542a;if(_0x30f4f2[_0x1f940d(0x19e)])return runJourneySemanticChecks(_0xc8df14,_0x1602e7);const _0x5240fa=JourneyDefSchema[_0x1f940d(0x17d)](_0xc8df14);if(_0x5240fa['success'])return runJourneySemanticChecks(_0x5240fa[_0x1f940d(0x1e6)],_0x1602e7);return zodErrorsToJourneyValidationResult(_0x5240fa[_0x1f940d(0x205)],_0x1602e7);}function zodErrorsToJourneyValidationResult(_0x4abbf3,_0x5c0491){const _0x191b84=a146_0x542a,_0x42a81b=flattenZodIssues(_0x4abbf3[_0x191b84(0x197)]),_0x3b7cd1=_0x42a81b['map'](_0x1bce98=>{const _0x9c26e5=_0x191b84,_0x48a18d=formatZodPath(_0x1bce98[_0x9c26e5(0x1dc)]),_0x17e285=mapJourneyZodIssueToCode(_0x1bce98,_0x48a18d),_0x272e04=getLocationFromPath(_0x5c0491[_0x9c26e5(0x1f4)],_0x5c0491[_0x9c26e5(0x1be)],_0x1bce98[_0x9c26e5(0x1dc)][_0x9c26e5(0x1d4)](_0x24b375=>typeof _0x24b375===_0x9c26e5(0x176)?String(_0x24b375):_0x24b375));return{'level':'error','path':_0x48a18d,'code':_0x17e285,'message':_0x1bce98[_0x9c26e5(0x1d0)],..._0x272e04&&{'location':_0x272e04}};});return{'valid':![],'errors':_0x3b7cd1,'warnings':[]};}function a146_0x542a(_0x39182d,_0x13b499){_0x39182d=_0x39182d-0x171;const _0x5cb2b8=a146_0x5cb2();let _0x542ac4=_0x5cb2b8[_0x39182d];return _0x542ac4;}function mapJourneyZodIssueToCode(_0x57c325,_0x3f6dd9){const _0x478adc=a146_0x542a;if(_0x3f6dd9===_0x478adc(0x1c4))return'MISSING_NAME';if(_0x3f6dd9['endsWith'](_0x478adc(0x1cb))&&_0x3f6dd9[_0x478adc(0x1f7)]('steps'))return'JOURNEY_SCHEMA_ERROR';if(_0x3f6dd9==='stages'||_0x3f6dd9[_0x478adc(0x1b8)]('.stages'))return _0x478adc(0x18b);if(_0x3f6dd9===''&&_0x57c325['message'][_0x478adc(0x1f7)](_0x478adc(0x206)))return _0x478adc(0x18b);if(_0x3f6dd9['includes'](_0x478adc(0x1fc)))return _0x478adc(0x1bb);return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0xdbe528,_0x1750d8){const _0x4e65c0=a146_0x542a,_0x31e064=[],_0x5ba1c9=[];(!_0xdbe528[_0x4e65c0(0x1c4)]||_0xdbe528[_0x4e65c0(0x1c4)][_0x4e65c0(0x220)]()==='')&&_0x31e064[_0x4e65c0(0x20d)]({'level':_0x4e65c0(0x205),'path':_0x4e65c0(0x1c4),'code':_0x4e65c0(0x1df),'message':_0x4e65c0(0x174),'location':getLocationFromPath(_0x1750d8[_0x4e65c0(0x1f4)],_0x1750d8[_0x4e65c0(0x1be)],['name'])});const _0x367a63=new Set();if(_0xdbe528['segments'])for(const _0x1faa26 of Object[_0x4e65c0(0x1e7)](_0xdbe528[_0x4e65c0(0x1a0)])){_0x367a63[_0x4e65c0(0x1cd)](_0x1faa26);}const _0x3032ad=new Set();if(_0xdbe528[_0x4e65c0(0x20a)])for(const _0x16a2c9 of Object[_0x4e65c0(0x1e7)](_0xdbe528[_0x4e65c0(0x20a)])){_0x3032ad[_0x4e65c0(0x1cd)](_0x16a2c9);}const _0x2b09bc=new Set(),_0x166c3a={..._0x1750d8,'embeddedSegments':_0x367a63,'referencedSegments':_0x2b09bc,'activationKeys':_0x3032ad['size']>0x0?_0x3032ad:undefined};if(_0xdbe528[_0x4e65c0(0x1a0)])for(const [_0x2ae077,_0x35cb47]of Object[_0x4e65c0(0x1b2)](_0xdbe528[_0x4e65c0(0x1a0)])){const _0x5b6333=validateEmbeddedSegment(_0x35cb47,_0x4e65c0(0x1ab)+_0x2ae077,_0x166c3a);for(const _0x5ca7d7 of _0x5b6333){if(_0x5ca7d7['level']===_0x4e65c0(0x205))_0x31e064[_0x4e65c0(0x20d)](_0x5ca7d7);else _0x5ba1c9[_0x4e65c0(0x20d)](_0x5ca7d7);}}const _0x2330a5=!!_0xdbe528[_0x4e65c0(0x1c2)],_0x3b3044=_0xdbe528[_0x4e65c0(0x20f)]?.[_0x4e65c0(0x1e2)](_0x4ab04c=>!!_0x4ab04c[_0x4e65c0(0x1c2)])??![];!_0x2330a5&&!_0x3b3044&&_0x5ba1c9['push']({'level':_0x4e65c0(0x195),'path':_0x4e65c0(0x1c2),'code':'MISSING_GOAL','message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x1750d8['document'],_0x1750d8[_0x4e65c0(0x1be)],[_0x4e65c0(0x1c2)])});const _0x9ad63=_0xdbe528[_0x4e65c0(0x20f)]??_0xdbe528[_0x4e65c0(0x17a)];if(_0x9ad63&&_0x9ad63[_0x4e65c0(0x1e1)](_0x4db4fa=>_0x4db4fa[_0x4e65c0(0x17f)]===!![])[_0x4e65c0(0x223)]>0x1){const _0x3e1f2f=_0xdbe528[_0x4e65c0(0x20f)]?'journeys':_0x4e65c0(0x17a);_0x31e064[_0x4e65c0(0x20d)]({'level':_0x4e65c0(0x205),'path':_0x3e1f2f,'code':'DUPLICATE_LATEST','message':_0x4e65c0(0x1e0)+(_0x3e1f2f===_0x4e65c0(0x20f)?_0x4e65c0(0x1bc):_0x4e65c0(0x21b))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x1750d8[_0x4e65c0(0x1f4)],_0x1750d8[_0x4e65c0(0x1be)],[_0x3e1f2f])});}if(_0xdbe528[_0x4e65c0(0x20f)]&&_0xdbe528['journeys'][_0x4e65c0(0x223)]>0x0)for(let _0x5c8983=0x0;_0x5c8983<_0xdbe528[_0x4e65c0(0x20f)][_0x4e65c0(0x223)];_0x5c8983++){const _0x5c57b5=_0xdbe528['journeys'][_0x5c8983];if(_0xdbe528[_0x4e65c0(0x20f)]['length']>0x1&&_0x5c57b5['state']===_0x4e65c0(0x221))continue;const _0x1de728=_0x5c57b5[_0x4e65c0(0x192)]||[],_0x1f1eb9=_0x4e65c0(0x18c)+_0x5c8983+'].',_0x5403a9=!!_0x5c57b5[_0x4e65c0(0x1c2)],_0x58b31c=_0x5403a9?{..._0xdbe528,'goal':_0x5c57b5[_0x4e65c0(0x1c2)]}:_0xdbe528;validateStagesForVersion(_0x1de728,_0x58b31c,_0x166c3a,_0x1f1eb9,_0x31e064,_0x5ba1c9,{'goalIsInherited':!_0x5403a9});}else{if(_0xdbe528[_0x4e65c0(0x17a)]&&_0xdbe528[_0x4e65c0(0x17a)][_0x4e65c0(0x223)]>0x0)for(let _0x818a31=0x0;_0x818a31<_0xdbe528[_0x4e65c0(0x17a)][_0x4e65c0(0x223)];_0x818a31++){const _0x1e027c=_0xdbe528[_0x4e65c0(0x17a)][_0x818a31];if(_0xdbe528['versions'][_0x4e65c0(0x223)]>0x1&&_0x1e027c[_0x4e65c0(0x1d3)]==='launched')continue;const _0x53aa43=_0x1e027c[_0x4e65c0(0x192)]||[],_0x17c34c=_0x4e65c0(0x219)+_0x818a31+'].';validateStagesForVersion(_0x53aa43,_0xdbe528,_0x166c3a,_0x17c34c,_0x31e064,_0x5ba1c9);}else{const _0x18035f=_0xdbe528['stages']||[];validateStagesForVersion(_0x18035f,_0xdbe528,_0x166c3a,'',_0x31e064,_0x5ba1c9);}}_0xdbe528[_0x4e65c0(0x20f)]&&_0xdbe528[_0x4e65c0(0x20f)][_0x4e65c0(0x223)]>0x1&&(deduplicateAcrossVersions(_0x31e064),deduplicateAcrossVersions(_0x5ba1c9));for(const _0x3bf992 of _0x367a63){!_0x2b09bc[_0x4e65c0(0x1ad)](_0x3bf992)&&!_0x3bf992[_0x4e65c0(0x17b)](_0x4e65c0(0x1b4))&&_0x5ba1c9[_0x4e65c0(0x20d)]({'level':_0x4e65c0(0x195),'path':'segments.'+_0x3bf992,'code':_0x4e65c0(0x1f9),'message':'Embedded\x20segment\x20\x27'+_0x3bf992+_0x4e65c0(0x1e9),'location':getLocationFromPath(_0x1750d8[_0x4e65c0(0x1f4)],_0x1750d8[_0x4e65c0(0x1be)],[_0x4e65c0(0x1a0),_0x3bf992])});}return{'valid':_0x31e064[_0x4e65c0(0x223)]===0x0,'errors':_0x31e064,'warnings':_0x5ba1c9};}
|
|
1
|
+
(function(_0x5baf8d,_0x4e7c86){const _0x2591f7=a146_0x4f36,_0xf70980=_0x5baf8d();while(!![]){try{const _0x439b8a=-parseInt(_0x2591f7(0x15f))/0x1*(parseInt(_0x2591f7(0x140))/0x2)+-parseInt(_0x2591f7(0x196))/0x3*(-parseInt(_0x2591f7(0x17d))/0x4)+parseInt(_0x2591f7(0x193))/0x5*(parseInt(_0x2591f7(0x127))/0x6)+parseInt(_0x2591f7(0x178))/0x7+parseInt(_0x2591f7(0x17a))/0x8*(parseInt(_0x2591f7(0x16c))/0x9)+parseInt(_0x2591f7(0x118))/0xa+parseInt(_0x2591f7(0x115))/0xb*(-parseInt(_0x2591f7(0x13d))/0xc);if(_0x439b8a===_0x4e7c86)break;else _0xf70980['push'](_0xf70980['shift']());}catch(_0x36ea2d){_0xf70980['push'](_0xf70980['shift']());}}}(a146_0x2362,0xad3ce));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1d4774,_0x1038b6,_0x38fdb9,_0x49d77c,_0x6f8e4d,_0x386a04){const _0x1aa346=a146_0x4f36;return{'level':_0x1d4774,'path':_0x1038b6,'code':_0x38fdb9,'message':_0x49d77c,'location':getLocationFromPath(_0x6f8e4d['document'],_0x6f8e4d[_0x1aa346(0x17b)],pathToArray(_0x386a04??_0x1038b6))};}function validateVersionStructure(_0x435f0c,_0x5c790a){const _0x39ddaf=a146_0x4f36,_0x23f6e4=[];return _0x435f0c[_0x39ddaf(0x105)]>MAX_STAGES&&_0x23f6e4['push'](createIssue(_0x39ddaf(0x10d),_0x39ddaf(0x1b9),_0x39ddaf(0x134),_0x39ddaf(0x18f)+_0x435f0c['length']+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x5c790a)),_0x23f6e4;}function validateStageStructure(_0x247547,_0x135d8f,_0x48f0c5,_0xaad58e){const _0x22d84c=a146_0x4f36,_0x17c62f=[],_0x3c5f91=_0x22d84c(0x19b)+_0x135d8f+']';_0x135d8f===0x0&&!_0x247547[_0x22d84c(0x1a0)]&&_0x17c62f['push'](createIssue('error',_0x3c5f91+_0x22d84c(0x18c),_0x22d84c(0x14d),_0x22d84c(0x131)+_0x247547[_0x22d84c(0x132)]+_0x22d84c(0x174),_0xaad58e,_0x3c5f91));const _0x1de5f2=_0x135d8f===_0x48f0c5-0x1;!_0x1de5f2&&!_0x247547[_0x22d84c(0x1bd)]&&_0x17c62f[_0x22d84c(0x163)](createIssue('error',_0x3c5f91+_0x22d84c(0x1c0),_0x22d84c(0x117),'Stage\x20\x27'+_0x247547[_0x22d84c(0x132)]+_0x22d84c(0x1ab),_0xaad58e,_0x3c5f91));(!_0x247547[_0x22d84c(0x14c)]||_0x247547[_0x22d84c(0x14c)][_0x22d84c(0x105)]===0x0)&&_0x17c62f[_0x22d84c(0x163)](createIssue('warning',_0x3c5f91+'.exit_criteria',_0x22d84c(0x11e),_0x22d84c(0x131)+_0x247547[_0x22d84c(0x132)]+_0x22d84c(0x12d),_0xaad58e,_0x3c5f91));const _0x1be19b=_0x247547[_0x22d84c(0x156)]?.[_0x22d84c(0x105)]??0x0;if(_0x1be19b===0x0)_0x17c62f[_0x22d84c(0x163)](createIssue(_0x22d84c(0x10d),_0x3c5f91+_0x22d84c(0x197),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0x247547['name']+_0x22d84c(0x152),_0xaad58e,_0x3c5f91+_0x22d84c(0x197)));else{if(_0x1be19b===0x1)_0x17c62f[_0x22d84c(0x163)](createIssue(_0x22d84c(0x199),_0x3c5f91+_0x22d84c(0x197),_0x22d84c(0x124),_0x22d84c(0x131)+_0x247547['name']+_0x22d84c(0x18a),_0xaad58e,_0x3c5f91+_0x22d84c(0x197)));else _0x1be19b<=0x3&&_0x17c62f[_0x22d84c(0x163)](createIssue(_0x22d84c(0x199),_0x3c5f91+_0x22d84c(0x197),'FEW_STEPS',_0x22d84c(0x131)+_0x247547[_0x22d84c(0x132)]+_0x22d84c(0x1a6)+_0x1be19b+_0x22d84c(0x147),_0xaad58e,_0x3c5f91+'.steps'));}return _0x17c62f;}function validateStep(_0x356bb4,_0x49b54d,_0x1e7faa,_0x322226){const _0xb64c3f=a146_0x4f36,_0x5a72b9=[];if(_0x356bb4[_0xb64c3f(0x142)]===_0xb64c3f(0x1b6))return _0x356bb4[_0xb64c3f(0x102)]&&_0x5a72b9['push'](createIssue('error',_0x49b54d+'.next','END_STEP_HAS_NEXT_OR_WITH',_0xb64c3f(0x10f)+_0x356bb4[_0xb64c3f(0x132)]+_0xb64c3f(0x15d),_0x1e7faa)),_0xb64c3f(0x122)in _0x356bb4&&_0x356bb4[_0xb64c3f(0x122)]!==undefined&&_0x5a72b9[_0xb64c3f(0x163)](createIssue(_0xb64c3f(0x10d),_0x49b54d+_0xb64c3f(0x185),_0xb64c3f(0x135),_0xb64c3f(0x10f)+_0x356bb4[_0xb64c3f(0x132)]+_0xb64c3f(0x138),_0x1e7faa)),_0x5a72b9;_0x356bb4[_0xb64c3f(0x102)]&&(_0x1e7faa[_0xb64c3f(0x175)]&&!_0x1e7faa[_0xb64c3f(0x175)][_0xb64c3f(0x16d)](_0x356bb4[_0xb64c3f(0x102)])&&_0x5a72b9[_0xb64c3f(0x163)](createIssue(_0xb64c3f(0x10d),_0x49b54d+_0xb64c3f(0x10e),_0xb64c3f(0x18e),_0xb64c3f(0x108)+_0x356bb4[_0xb64c3f(0x102)]+'\x27',_0x1e7faa)));switch(_0x356bb4[_0xb64c3f(0x142)]){case _0xb64c3f(0x182):_0x5a72b9['push'](...validateWaitStep(_0x356bb4,_0x49b54d,_0x1e7faa,_0x322226));break;case _0xb64c3f(0x137):_0x5a72b9[_0xb64c3f(0x163)](...validateActivationStep(_0x356bb4,_0x49b54d,_0x1e7faa));break;case _0xb64c3f(0x16a):_0x5a72b9['push'](...validateDecisionPointStep(_0x356bb4,_0x49b54d,_0x1e7faa,_0x322226));break;case _0xb64c3f(0x136):_0x5a72b9[_0xb64c3f(0x163)](...validateAbTestStep(_0x356bb4,_0x49b54d,_0x1e7faa,_0x322226));break;case'jump':_0x5a72b9['push'](...validateJumpStep(_0x356bb4,_0x49b54d,_0x1e7faa));break;}return _0x5a72b9;}function validateWaitStep(_0x220f7a,_0x2eb4b1,_0x117c41,_0x1b169f){const _0x555cab=a146_0x4f36,_0x502126=[];if(!_0x220f7a[_0x555cab(0x122)])return _0x502126[_0x555cab(0x163)](createIssue('error',_0x2eb4b1+'.with','MISSING_WAIT_PARAMS',_0x555cab(0x107),_0x117c41,_0x2eb4b1)),_0x502126;if(_0x220f7a[_0x555cab(0x122)][_0x555cab(0x11a)]){const _0x2c9a59=_0x220f7a[_0x555cab(0x122)][_0x555cab(0x11a)];if(_0x2c9a59[_0x555cab(0x166)]){_0x117c41['referencedSegments']?.['add'](_0x2c9a59[_0x555cab(0x166)]);!_0x2c9a59[_0x555cab(0x166)][_0x555cab(0x172)](_0x555cab(0x168))&&(_0x117c41[_0x555cab(0x177)]&&!_0x117c41[_0x555cab(0x177)][_0x555cab(0x16d)](_0x2c9a59['segment'])&&_0x502126[_0x555cab(0x163)](createIssue('error',_0x2eb4b1+_0x555cab(0x145),_0x555cab(0x125),_0x555cab(0x17c)+_0x2c9a59[_0x555cab(0x166)]+_0x555cab(0x1bf),_0x117c41)));_0x2c9a59[_0x555cab(0x102)]&&_0x117c41[_0x555cab(0x175)]&&!_0x117c41['stepNames'][_0x555cab(0x16d)](_0x2c9a59[_0x555cab(0x102)])&&_0x502126[_0x555cab(0x163)](createIssue(_0x555cab(0x10d),_0x2eb4b1+_0x555cab(0x114),_0x555cab(0x18e),_0x555cab(0x116)+_0x2c9a59[_0x555cab(0x102)]+'\x27',_0x117c41));_0x2c9a59['timeout']?.[_0x555cab(0x102)]&&_0x117c41[_0x555cab(0x175)]&&!_0x117c41[_0x555cab(0x175)][_0x555cab(0x16d)](_0x2c9a59[_0x555cab(0x160)][_0x555cab(0x102)])&&_0x502126['push'](createIssue('error',_0x2eb4b1+_0x555cab(0x10b),_0x555cab(0x18e),_0x555cab(0x198)+_0x2c9a59[_0x555cab(0x160)]['next']+'\x27',_0x117c41));const _0x28a901=_0x2c9a59['next']||_0x220f7a[_0x555cab(0x102)],_0x323907=_0x2c9a59[_0x555cab(0x160)]?.[_0x555cab(0x102)]||_0x220f7a[_0x555cab(0x102)];if(_0x28a901){const _0x448801=_0x1b169f[_0x555cab(0x151)](_0x28a901);_0x448801?.['type']===_0x555cab(0x155)&&_0x502126[_0x555cab(0x163)](createIssue(_0x555cab(0x199),_0x2eb4b1+_0x555cab(0x114),_0x555cab(0x1ad),_0x555cab(0x19d)+_0x28a901+_0x555cab(0x17e),_0x117c41,_0x2eb4b1+_0x555cab(0x171)));}if(_0x323907){const _0x146161=_0x1b169f['get'](_0x323907);_0x146161?.[_0x555cab(0x142)]===_0x555cab(0x155)&&_0x502126[_0x555cab(0x163)](createIssue('warning',_0x2eb4b1+'.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE',_0x555cab(0x133)+_0x323907+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x117c41,_0x2eb4b1+_0x555cab(0x164)));}}}return _0x502126;}function validateActivationStep(_0x4cd54d,_0x1a682f,_0x526f71){const _0x49b572=a146_0x4f36,_0x302aa8=[];if(!_0x4cd54d[_0x49b572(0x122)]?.['activation'])return _0x302aa8[_0x49b572(0x163)](createIssue('error',_0x1a682f+_0x49b572(0x15c),'MISSING_ACTIVATION_REF',_0x49b572(0x10c),_0x526f71,_0x1a682f)),_0x302aa8;const _0x46f30=_0x4cd54d[_0x49b572(0x122)][_0x49b572(0x137)];return _0x526f71['activationKeys']&&!_0x46f30[_0x49b572(0x172)]('ref:')&&(!_0x526f71[_0x49b572(0x192)][_0x49b572(0x16d)](_0x46f30)&&_0x302aa8['push'](createIssue(_0x49b572(0x10d),_0x1a682f+_0x49b572(0x15c),_0x49b572(0x191),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x46f30+_0x49b572(0x100),_0x526f71))),_0x302aa8;}function validateDecisionPointStep(_0x120462,_0x3e48b2,_0x35481d,_0x480f66){const _0x47e21a=a146_0x4f36,_0x4c39da=[];if(!_0x120462[_0x47e21a(0x122)]?.[_0x47e21a(0x11c)]||_0x120462['with'][_0x47e21a(0x11c)][_0x47e21a(0x105)]===0x0)return _0x4c39da[_0x47e21a(0x163)](createIssue(_0x47e21a(0x10d),_0x3e48b2+_0x47e21a(0x159),_0x47e21a(0x14f),_0x47e21a(0x180),_0x35481d,_0x3e48b2)),_0x4c39da;for(let _0x4aadc7=0x0;_0x4aadc7<_0x120462['with']['branches'][_0x47e21a(0x105)];_0x4aadc7++){const _0x10092a=_0x120462[_0x47e21a(0x122)][_0x47e21a(0x11c)][_0x4aadc7],_0x5a2788=_0x3e48b2+_0x47e21a(0x184)+_0x4aadc7+']';_0x10092a[_0x47e21a(0x166)]&&!_0x10092a[_0x47e21a(0x13a)]&&(_0x35481d[_0x47e21a(0x12e)]?.[_0x47e21a(0x189)](_0x10092a['segment']),!_0x10092a[_0x47e21a(0x166)]['startsWith'](_0x47e21a(0x168))&&(_0x35481d[_0x47e21a(0x177)]&&!_0x35481d[_0x47e21a(0x177)]['has'](_0x10092a[_0x47e21a(0x166)])&&_0x4c39da['push'](createIssue(_0x47e21a(0x10d),_0x5a2788+_0x47e21a(0x1b2),_0x47e21a(0x125),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x10092a[_0x47e21a(0x166)]+'\x27',_0x35481d))));_0x10092a[_0x47e21a(0x102)]&&_0x35481d[_0x47e21a(0x175)]&&!_0x35481d[_0x47e21a(0x175)][_0x47e21a(0x16d)](_0x10092a['next'])&&_0x4c39da['push'](createIssue(_0x47e21a(0x10d),_0x5a2788+'.next','INVALID_NEXT_REFERENCE',_0x47e21a(0x18d)+_0x10092a[_0x47e21a(0x102)]+'\x27',_0x35481d));if(_0x10092a[_0x47e21a(0x102)]){const _0x64b4bd=_0x480f66['get'](_0x10092a[_0x47e21a(0x102)]);_0x64b4bd?.[_0x47e21a(0x142)]===_0x47e21a(0x155)&&_0x4c39da[_0x47e21a(0x163)](createIssue(_0x47e21a(0x199),_0x5a2788+'.next','BRANCH_DIRECTLY_TO_MERGE',_0x47e21a(0x1be)+_0x10092a[_0x47e21a(0x132)]+_0x47e21a(0x19c)+_0x10092a[_0x47e21a(0x102)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x35481d));}}return _0x4c39da;}function validateAbTestStep(_0x3fb938,_0x5c70de,_0x32a844,_0x2372c3){const _0x481c1a=a146_0x4f36,_0xf34ee7=[];if(!_0x3fb938[_0x481c1a(0x122)]?.[_0x481c1a(0x101)]||_0x3fb938['with'][_0x481c1a(0x101)][_0x481c1a(0x105)]===0x0)return _0xf34ee7[_0x481c1a(0x163)](createIssue(_0x481c1a(0x10d),_0x5c70de+_0x481c1a(0x1a7),_0x481c1a(0x14f),_0x481c1a(0x1b0),_0x32a844,_0x5c70de)),_0xf34ee7;const _0x3d8d00=_0x3fb938[_0x481c1a(0x122)]['variants'][_0x481c1a(0x19e)]((_0x2bec56,_0xd3beb0)=>_0x2bec56+(_0xd3beb0[_0x481c1a(0x141)]||0x0),0x0);Math[_0x481c1a(0x1b1)](_0x3d8d00-0x64)>0.01&&_0xf34ee7['push'](createIssue(_0x481c1a(0x10d),_0x5c70de+'.with.variants',_0x481c1a(0x157),_0x481c1a(0x1a9)+_0x3d8d00+'%)',_0x32a844));for(let _0x3d84b9=0x0;_0x3d84b9<_0x3fb938['with'][_0x481c1a(0x101)][_0x481c1a(0x105)];_0x3d84b9++){const _0x2d367f=_0x3fb938[_0x481c1a(0x122)][_0x481c1a(0x101)][_0x3d84b9],_0x46f282=_0x5c70de+_0x481c1a(0x173)+_0x3d84b9+']';_0x2d367f['next']&&_0x32a844['stepNames']&&!_0x32a844[_0x481c1a(0x175)]['has'](_0x2d367f['next'])&&_0xf34ee7[_0x481c1a(0x163)](createIssue(_0x481c1a(0x10d),_0x46f282+_0x481c1a(0x10e),_0x481c1a(0x18e),_0x481c1a(0x126)+_0x2d367f[_0x481c1a(0x102)]+'\x27',_0x32a844));if(_0x2d367f[_0x481c1a(0x102)]){const _0x5cec5c=_0x2372c3[_0x481c1a(0x151)](_0x2d367f['next']);_0x5cec5c?.[_0x481c1a(0x142)]===_0x481c1a(0x155)&&_0xf34ee7['push'](createIssue('warning',_0x46f282+_0x481c1a(0x10e),_0x481c1a(0x1ad),'A/B\x20test\x20variant\x20\x27'+_0x2d367f[_0x481c1a(0x132)]+_0x481c1a(0x19c)+_0x2d367f['next']+_0x481c1a(0x1ae),_0x32a844));}}return _0xf34ee7;}function validateJumpStep(_0xeee6f8,_0x5254bd,_0x9a3d0){const _0x54172d=a146_0x4f36,_0x7f6a13=[];if(!_0xeee6f8[_0x54172d(0x122)]?.['target'])return _0x7f6a13[_0x54172d(0x163)](createIssue(_0x54172d(0x10d),_0x5254bd+'.with.target',_0x54172d(0x158),_0x54172d(0x188),_0x9a3d0,_0x5254bd)),_0x7f6a13;return(!_0xeee6f8['with'][_0x54172d(0x183)][_0x54172d(0x18b)]||!_0xeee6f8[_0x54172d(0x122)][_0x54172d(0x183)][_0x54172d(0x162)])&&_0x7f6a13['push'](createIssue('error',_0x5254bd+_0x54172d(0x11f),_0x54172d(0x158),_0x54172d(0x128),_0x9a3d0)),_0x7f6a13;}function buildConvergenceMap(_0xe72302){const _0x2436f5=a146_0x4f36,_0x475352=new Map();function _0x5f562c(_0x1fcbcd,_0x238f1f){const _0x503ee9=a146_0x4f36,_0x5dd1d0=_0x475352['get'](_0x1fcbcd)||[];_0x5dd1d0[_0x503ee9(0x163)](_0x238f1f),_0x475352[_0x503ee9(0x150)](_0x1fcbcd,_0x5dd1d0);}for(const _0x4248f0 of _0xe72302){_0x4248f0[_0x2436f5(0x102)]&&_0x5f562c(_0x4248f0[_0x2436f5(0x102)],{'stepName':_0x4248f0[_0x2436f5(0x132)],'description':'step\x20\x27'+_0x4248f0['name']+'\x27'});if(_0x4248f0[_0x2436f5(0x142)]===_0x2436f5(0x16a)&&_0x4248f0[_0x2436f5(0x122)]?.[_0x2436f5(0x11c)])for(const _0x3af683 of _0x4248f0[_0x2436f5(0x122)]['branches']){_0x3af683[_0x2436f5(0x102)]&&_0x5f562c(_0x3af683[_0x2436f5(0x102)],{'stepName':_0x4248f0[_0x2436f5(0x132)],'description':_0x2436f5(0x12a)+_0x3af683[_0x2436f5(0x132)]+'\x27\x20of\x20\x27'+_0x4248f0[_0x2436f5(0x132)]+'\x27'});}if(_0x4248f0['type']===_0x2436f5(0x136)&&_0x4248f0[_0x2436f5(0x122)]?.[_0x2436f5(0x101)])for(const _0x5b72dd of _0x4248f0[_0x2436f5(0x122)]['variants']){_0x5b72dd[_0x2436f5(0x102)]&&_0x5f562c(_0x5b72dd[_0x2436f5(0x102)],{'stepName':_0x4248f0[_0x2436f5(0x132)],'description':'variant\x20\x27'+_0x5b72dd[_0x2436f5(0x132)]+_0x2436f5(0x13f)+_0x4248f0[_0x2436f5(0x132)]+'\x27'});}_0x4248f0['type']===_0x2436f5(0x182)&&_0x4248f0['with']?.[_0x2436f5(0x11a)]&&(_0x4248f0['with'][_0x2436f5(0x11a)]['next']&&_0x5f562c(_0x4248f0[_0x2436f5(0x122)][_0x2436f5(0x11a)][_0x2436f5(0x102)],{'stepName':_0x4248f0['name'],'description':_0x2436f5(0x165)+_0x4248f0[_0x2436f5(0x132)]+'\x27'}),_0x4248f0[_0x2436f5(0x122)][_0x2436f5(0x11a)]['timeout']?.[_0x2436f5(0x102)]&&_0x5f562c(_0x4248f0[_0x2436f5(0x122)][_0x2436f5(0x11a)][_0x2436f5(0x160)][_0x2436f5(0x102)],{'stepName':_0x4248f0['name'],'description':_0x2436f5(0x1b4)+_0x4248f0[_0x2436f5(0x132)]+'\x27'}));}return _0x475352;}function a146_0x2362(){const _0x1be466=['Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','Jump\x20step\x20requires\x20a\x20target','add','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','journey','.entry_criteria','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','INVALID_NEXT_REFERENCE','Journey\x20has\x20','.stages','MISSING_ACTIVATION_DEFINITION','activationKeys','1131265XjxfIz','MISSING_GOAL','journey\x20entry','6xsJAtq','.steps','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','warning','\x27\x20has\x20no\x20end\x20step','stages[','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','reduce','indices','entry_criteria','JOURNEY_SCHEMA_ERROR','journeys,\x20stages,\x20or\x20versions','rule','some','latest','\x27\x20has\x20only\x20','.with.variants','MERGE_TO_MERGE_CHAIN','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','versions','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Journey\x20can\x20have\x20at\x20most\x20one\x20','BRANCH_DIRECTLY_TO_MERGE','\x27\x20with\x20no\x20action\x20in\x20between','filter','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','abs','.segment','level','timeout\x20of\x20\x27','map','end','every','ACTIVATION_SCHEMA_ERROR','stages','version','endsWith','replace','milestone','Decision\x20branch\x20\x27','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','.milestone','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','variants','next',').\x20Merge\x20is\x20unnecessary.','document','length','journeys[','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','Step\x20references\x20non-existent\x20step\x20\x27','segments','match','.with.condition.timeout.next','Activation\x20step\x20requires\x20an\x20activation\x20reference','error','.next','End\x20step\x20\x27','includes','DUPLICATE_LATEST','.steps[','journeys','.with.condition.next','40680618HjwxIp','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MISSING_MILESTONE','10888040JmWITU','excluded_','condition','\x27\x20(from:\x20','branches','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','MISSING_EXIT_CRITERIA','.with.target',').\x20Use\x20a\x20merge\x20step.','issues','with','goal','INSUFFICIENT_STEPS','MISSING_SEGMENT_REFERENCE','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','12FUaSBm','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','branch\x20\x27','success','SINGLE_INPUT_MERGE','\x27\x20has\x20no\x20exit_criteria\x20defined','referencedSegments','safeParse','goalIsInherited','Stage\x20\x27','name','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','TOO_MANY_STAGES','END_STEP_HAS_NEXT_OR_WITH','ab_test','activation','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','.rule','excluded','path','splice','12ucbXRl','activations','\x27\x20of\x20\x27','2pETLlf','percentage','type','message','join','.with.condition.segment','.name','\x20steps\x20(may\x20be\x20too\x20simple)','skipSchema','keys','UNUSED_EMBEDDED_SEGMENT','Merge\x20step\x20\x27','exit_criteria','MISSING_ENTRY_CRITERIA','Criteria\x20references\x20undefined\x20segment\x20\x27','MISSING_CONDITIONS','set','get','\x27\x20has\x20no\x20steps','versions[','entries','merge','steps','INVALID_AB_TEST_PERCENTAGES','INVALID_JUMP_TARGET','.with.branches','sort','Journey\x20has\x20no\x20goal\x20defined','.with.activation','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','.exit_criteria[','12959wHTiGg','timeout','size','stage','push','.with.condition.timeout','condition\x20of\x20\x27','segment','MISSING_END_STEP','ref:','MISSING_STAGES','decision_point','\x20with\x20latest:\x20true','4093308UzFSRO','has','data','MISSING_NAME','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','.with.condition','startsWith','.with.variants[','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','stepNames','\x20(across\x20','embeddedSegments','7521969hcDeBd','state','16FsuPqZ','source','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','1790556AggNEO','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','\x27\x20(first\x20defined\x20at\x20steps[','wait','target','.with.branches[','.with','DUPLICATE_STEP_NAME'];a146_0x2362=function(){return _0x1be466;};return a146_0x2362();}function validateFlowControl(_0x236f3e,_0x52e0ab,_0xec7d3c){const _0x55eb99=a146_0x4f36,_0x1d2550=[],_0x5358ce=_0x55eb99(0x19b)+_0x52e0ab+']',_0x30a7c2=_0x236f3e['steps']||[];if(_0x30a7c2[_0x55eb99(0x105)]===0x0)return _0x1d2550;const _0x204987=new Map();for(const _0x34c2d0 of _0x30a7c2){_0x34c2d0[_0x55eb99(0x132)]&&_0x204987[_0x55eb99(0x150)](_0x34c2d0[_0x55eb99(0x132)],_0x34c2d0);}const _0x526a8c=buildConvergenceMap(_0x30a7c2),_0x3efc58=_0x30a7c2[_0x55eb99(0x1a4)](_0x4c7617=>_0x4c7617[_0x55eb99(0x142)]==='end');!_0x3efc58&&_0x1d2550[_0x55eb99(0x163)](createIssue('error',_0x5358ce+_0x55eb99(0x197),_0x55eb99(0x167),_0x55eb99(0x131)+_0x236f3e[_0x55eb99(0x132)]+_0x55eb99(0x19a),_0xec7d3c));for(const [_0x4bf2f5,_0x3ecfd4]of _0x526a8c){const _0x5bf947=_0x204987[_0x55eb99(0x151)](_0x4bf2f5);if(!_0x5bf947)continue;if(_0x3ecfd4[_0x55eb99(0x105)]>0x1&&_0x5bf947[_0x55eb99(0x142)]!==_0x55eb99(0x155)){const _0x17afd0=_0x3ecfd4['map'](_0x5bff0c=>_0x5bff0c['description'])[_0x55eb99(0x144)](',\x20');_0x1d2550[_0x55eb99(0x163)](createIssue(_0x55eb99(0x10d),_0x5358ce+_0x55eb99(0x197),'CONVERGENCE_WITHOUT_MERGE',_0x55eb99(0x187)+_0x4bf2f5+_0x55eb99(0x11b)+_0x17afd0+_0x55eb99(0x120),_0xec7d3c));}_0x3ecfd4['length']===0x1&&_0x5bf947[_0x55eb99(0x142)]===_0x55eb99(0x155)&&_0x1d2550[_0x55eb99(0x163)](createIssue(_0x55eb99(0x199),_0x5358ce+_0x55eb99(0x197),_0x55eb99(0x12c),_0x55eb99(0x14b)+_0x4bf2f5+_0x55eb99(0x170)+_0x3ecfd4[0x0]['description']+_0x55eb99(0x103),_0xec7d3c));}for(const _0x3fff8c of _0x30a7c2){if(_0x3fff8c[_0x55eb99(0x142)]===_0x55eb99(0x155)&&_0x3fff8c[_0x55eb99(0x102)]){const _0x51327e=_0x204987['get'](_0x3fff8c[_0x55eb99(0x102)]);_0x51327e?.[_0x55eb99(0x142)]===_0x55eb99(0x155)&&_0x1d2550[_0x55eb99(0x163)](createIssue(_0x55eb99(0x10d),_0x5358ce+'.steps',_0x55eb99(0x1a8),_0x55eb99(0x14b)+_0x3fff8c[_0x55eb99(0x132)]+_0x55eb99(0x17f)+_0x3fff8c[_0x55eb99(0x102)]+_0x55eb99(0x11d),_0xec7d3c));}}return _0x1d2550;}function validateCriteria(_0x1960f7,_0x5a8334,_0x115d1a){const _0x1aaf1e=a146_0x4f36,_0x4ae3fd=[];return _0x1960f7[_0x1aaf1e(0x166)]&&(_0x115d1a['referencedSegments']?.[_0x1aaf1e(0x189)](_0x1960f7['segment']),!_0x1960f7[_0x1aaf1e(0x166)][_0x1aaf1e(0x172)]('ref:')&&(_0x115d1a['embeddedSegments']&&!_0x115d1a['embeddedSegments'][_0x1aaf1e(0x16d)](_0x1960f7['segment'])&&_0x4ae3fd[_0x1aaf1e(0x163)](createIssue(_0x1aaf1e(0x10d),_0x5a8334+_0x1aaf1e(0x1b2),_0x1aaf1e(0x125),_0x1aaf1e(0x14e)+_0x1960f7[_0x1aaf1e(0x166)]+'\x27',_0x115d1a)))),_0x4ae3fd;}function validateEmbeddedSegment(_0x591045,_0x263014,_0x4199c0){const _0x4424ea=a146_0x4f36,_0x35c212=[];return _0x591045['rule']&&_0x35c212['push'](...validateRuleDef(_0x591045[_0x4424ea(0x1a3)],_0x263014+_0x4424ea(0x139),_0x4199c0)),_0x35c212;}function validateStage(_0x52d2c6,_0x200851,_0x5b4f8f,_0x50be2a){const _0x4f1829=a146_0x4f36,_0xb80d34=[],_0x284bc9=_0x4f1829(0x19b)+_0x200851+']',_0x4688e7=new Map(),_0x1e7f9d=new Map();if(_0x52d2c6[_0x4f1829(0x156)]){for(let _0x5636b0=0x0;_0x5636b0<_0x52d2c6[_0x4f1829(0x156)][_0x4f1829(0x105)];_0x5636b0++){const _0x3d57f3=_0x52d2c6['steps'][_0x5636b0];_0x3d57f3['name']&&_0x4688e7[_0x4f1829(0x150)](_0x3d57f3['name'],_0x3d57f3);}for(let _0x52e20d=0x0;_0x52e20d<_0x52d2c6[_0x4f1829(0x156)][_0x4f1829(0x105)];_0x52e20d++){const _0x16e694=_0x52d2c6['steps'][_0x52e20d],_0x18be3c=_0x284bc9+_0x4f1829(0x112)+_0x52e20d+']';if(_0x16e694[_0x4f1829(0x132)]){if(_0x1e7f9d['has'](_0x16e694['name'])){const _0x133586=_0x1e7f9d['get'](_0x16e694[_0x4f1829(0x132)]);_0xb80d34[_0x4f1829(0x163)](createIssue('error',_0x18be3c+_0x4f1829(0x146),_0x4f1829(0x186),'Duplicate\x20step\x20name\x20\x27'+_0x16e694['name']+_0x4f1829(0x181)+_0x133586+'])',_0x50be2a));}else _0x1e7f9d[_0x4f1829(0x150)](_0x16e694['name'],_0x52e20d);}_0xb80d34['push'](...validateStep(_0x16e694,_0x18be3c,_0x50be2a,_0x4688e7));}}_0x52d2c6['entry_criteria']&&_0xb80d34['push'](...validateCriteria(_0x52d2c6[_0x4f1829(0x1a0)],_0x284bc9+_0x4f1829(0x18c),_0x50be2a));if(_0x52d2c6['exit_criteria'])for(let _0x14cbf8=0x0;_0x14cbf8<_0x52d2c6['exit_criteria'][_0x4f1829(0x105)];_0x14cbf8++){_0xb80d34['push'](...validateCriteria(_0x52d2c6[_0x4f1829(0x14c)][_0x14cbf8],_0x284bc9+_0x4f1829(0x15e)+_0x14cbf8+']',_0x50be2a));}return _0x52d2c6[_0x4f1829(0x1bd)]&&_0xb80d34['push'](...validateCriteria(_0x52d2c6['milestone'],_0x284bc9+_0x4f1829(0x1c0),_0x50be2a)),_0xb80d34['push'](...validateStageStructure(_0x52d2c6,_0x200851,_0x5b4f8f,_0x50be2a)),_0xb80d34[_0x4f1829(0x163)](...validateFlowControl(_0x52d2c6,_0x200851,_0x50be2a)),_0xb80d34;}function validateStagesForVersion(_0x13eedb,_0x4488c0,_0x54b4fe,_0x582df3,_0x85349e,_0x25dda9,_0x4c9759){const _0x319cf9=a146_0x4f36;if(_0x13eedb[_0x319cf9(0x105)]===0x0){_0x85349e[_0x319cf9(0x163)]({'level':_0x319cf9(0x10d),'path':_0x582df3+_0x319cf9(0x1b9),'code':_0x319cf9(0x169),'message':_0x319cf9(0x129),'location':getLocationFromPath(_0x54b4fe[_0x319cf9(0x104)],_0x54b4fe[_0x319cf9(0x17b)],[_0x319cf9(0x1b9)])});return;}const _0x2e0708=new Set();for(const _0x3f293f of _0x13eedb){if(_0x3f293f['steps'])for(const _0x186271 of _0x3f293f[_0x319cf9(0x156)]){_0x186271[_0x319cf9(0x132)]&&_0x2e0708[_0x319cf9(0x189)](_0x186271['name']);}}const _0x45c2c2={..._0x54b4fe,'stepNames':_0x2e0708},_0x184a7a=validateVersionStructure(_0x13eedb,_0x45c2c2);for(const _0x15be7b of _0x184a7a){const _0x2cce47=_0x582df3?{..._0x15be7b,'path':''+_0x582df3+_0x15be7b[_0x319cf9(0x13b)]}:_0x15be7b;if(_0x2cce47['level']===_0x319cf9(0x10d))_0x85349e[_0x319cf9(0x163)](_0x2cce47);else _0x25dda9['push'](_0x2cce47);}for(let _0x28c31a=0x0;_0x28c31a<_0x13eedb[_0x319cf9(0x105)];_0x28c31a++){const _0x351329=validateStage(_0x13eedb[_0x28c31a],_0x28c31a,_0x13eedb[_0x319cf9(0x105)],_0x45c2c2);for(const _0x525bd2 of _0x351329){const _0x1e867c=_0x582df3?{..._0x525bd2,'path':''+_0x582df3+_0x525bd2[_0x319cf9(0x13b)]}:_0x525bd2;if(_0x1e867c[_0x319cf9(0x1b3)]===_0x319cf9(0x10d))_0x85349e['push'](_0x1e867c);else _0x25dda9['push'](_0x1e867c);}}if(_0x4488c0['goal']){const _0x4cb534=_0x4c9759?.[_0x319cf9(0x130)]?'goal':_0x582df3+'goal',_0x1fa99b=validateCriteria(_0x4488c0[_0x319cf9(0x123)],_0x4cb534,_0x45c2c2);for(const _0x2f3ffa of _0x1fa99b){if(_0x2f3ffa[_0x319cf9(0x1b3)]===_0x319cf9(0x10d))_0x85349e['push'](_0x2f3ffa);else _0x25dda9[_0x319cf9(0x163)](_0x2f3ffa);}}}function extractVersionIndex(_0x41fbad){const _0x4d45e3=a146_0x4f36,_0x1e6cd3=_0x41fbad[_0x4d45e3(0x10a)](/^journeys\[(\d+)\]\./);return _0x1e6cd3?_0x1e6cd3[0x1]:undefined;}function deduplicateAcrossVersions(_0xc6fc67){const _0x5186b4=a146_0x4f36,_0x2ac1a7=new Map();for(let _0x27abfb=0x0;_0x27abfb<_0xc6fc67[_0x5186b4(0x105)];_0x27abfb++){const _0x2fa2cb=_0xc6fc67[_0x27abfb]['code']+':'+_0xc6fc67[_0x27abfb][_0x5186b4(0x143)],_0x8dd928=extractVersionIndex(_0xc6fc67[_0x27abfb][_0x5186b4(0x13b)]),_0x1faaa1=_0x2ac1a7[_0x5186b4(0x151)](_0x2fa2cb);if(_0x1faaa1){_0x1faaa1[_0x5186b4(0x19f)]['push'](_0x27abfb);if(_0x8dd928)_0x1faaa1[_0x5186b4(0x1aa)][_0x5186b4(0x189)](_0x8dd928);}else _0x2ac1a7[_0x5186b4(0x150)](_0x2fa2cb,{'indices':[_0x27abfb],'versions':new Set(_0x8dd928?[_0x8dd928]:[])});}const _0x645df5=new Set();for(const {indices:_0x455eb4,versions:_0x2b101e}of _0x2ac1a7['values']()){if(_0x2b101e[_0x5186b4(0x161)]<=0x1)continue;const _0x3102de=_0xc6fc67[_0x455eb4[0x0]];_0x3102de[_0x5186b4(0x13b)]=_0x3102de[_0x5186b4(0x13b)][_0x5186b4(0x1bc)](/^journeys\[\d+\]\./,''),_0x3102de[_0x5186b4(0x143)]=_0x3102de[_0x5186b4(0x143)]+_0x5186b4(0x176)+_0x2b101e[_0x5186b4(0x161)]+'\x20versions)';for(let _0x4b7329=0x1;_0x4b7329<_0x455eb4[_0x5186b4(0x105)];_0x4b7329++){_0x645df5['add'](_0x455eb4[_0x4b7329]);}}const _0x87e8fc=[..._0x645df5][_0x5186b4(0x15a)]((_0x22ce56,_0x392e59)=>_0x392e59-_0x22ce56);for(const _0x3cb2d5 of _0x87e8fc){_0xc6fc67[_0x5186b4(0x13c)](_0x3cb2d5,0x1);}}export function validateJourneyDef(_0x245ac7,_0xf34bb2={},_0x17e2a0={}){const _0x59e967=a146_0x4f36;if(_0x17e2a0[_0x59e967(0x148)])return runJourneySemanticChecks(_0x245ac7,_0xf34bb2);const _0x3220e8=JourneyDefSchema[_0x59e967(0x12f)](_0x245ac7);if(_0x3220e8[_0x59e967(0x12b)])return runJourneySemanticChecks(_0x3220e8[_0x59e967(0x16e)],_0xf34bb2);return zodErrorsToJourneyValidationResult(_0x3220e8[_0x59e967(0x10d)],_0xf34bb2);}function zodErrorsToJourneyValidationResult(_0x4cfbcd,_0x58981c){const _0x25d55f=a146_0x4f36,_0x3cbc7f=flattenZodIssues(_0x4cfbcd[_0x25d55f(0x121)]),_0x4d723d=_0x3cbc7f[_0x25d55f(0x1b5)](_0xb86f04=>{const _0x37c482=_0x25d55f,_0x106680=formatZodPath(_0xb86f04['path']),_0x4aca91=mapJourneyZodIssueToCode(_0xb86f04,_0x106680),_0x152153=getLocationFromPath(_0x58981c[_0x37c482(0x104)],_0x58981c[_0x37c482(0x17b)],_0xb86f04['path'][_0x37c482(0x1b5)](_0x41d75c=>typeof _0x41d75c==='symbol'?String(_0x41d75c):_0x41d75c));return{'level':_0x37c482(0x10d),'path':_0x106680,'code':_0x4aca91,'message':_0xb86f04[_0x37c482(0x143)],..._0x152153&&{'location':_0x152153}};});return{'valid':![],'errors':_0x4d723d,'warnings':[]};}function a146_0x4f36(_0x16d0a3,_0x4ff2ec){_0x16d0a3=_0x16d0a3-0x100;const _0x2362cd=a146_0x2362();let _0x4f362b=_0x2362cd[_0x16d0a3];return _0x4f362b;}function mapJourneyZodIssueToCode(_0xc53454,_0x20c8da){const _0x38ca20=a146_0x4f36;if(_0x20c8da===_0x38ca20(0x132))return'MISSING_NAME';if(_0x20c8da[_0x38ca20(0x1bb)]('.type')&&_0x20c8da[_0x38ca20(0x110)]('steps'))return _0x38ca20(0x1a1);if(_0x20c8da===_0x38ca20(0x1b9)||_0x20c8da[_0x38ca20(0x1bb)](_0x38ca20(0x190)))return _0x38ca20(0x169);if(_0x20c8da===''&&_0xc53454['message'][_0x38ca20(0x110)](_0x38ca20(0x1a2)))return _0x38ca20(0x169);if(_0x20c8da[_0x38ca20(0x110)](_0x38ca20(0x137)))return _0x38ca20(0x1b8);return _0x38ca20(0x1a1);}function runJourneySemanticChecks(_0x101508,_0x595d94){const _0x4ffd77=a146_0x4f36,_0x1927f1=[],_0x235801=[];(!_0x101508[_0x4ffd77(0x132)]||_0x101508[_0x4ffd77(0x132)]['trim']()==='')&&_0x1927f1[_0x4ffd77(0x163)]({'level':_0x4ffd77(0x10d),'path':_0x4ffd77(0x132),'code':_0x4ffd77(0x16f),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x595d94[_0x4ffd77(0x104)],_0x595d94[_0x4ffd77(0x17b)],[_0x4ffd77(0x132)])});const _0x2bf202=new Set();if(_0x101508[_0x4ffd77(0x109)])for(const _0x37fe14 of Object[_0x4ffd77(0x149)](_0x101508[_0x4ffd77(0x109)])){_0x2bf202[_0x4ffd77(0x189)](_0x37fe14);}const _0x43bd5e=new Set();if(_0x101508['activations'])for(const _0x5850ad of Object[_0x4ffd77(0x149)](_0x101508[_0x4ffd77(0x13e)])){_0x43bd5e[_0x4ffd77(0x189)](_0x5850ad);}const _0x32a3aa=new Set(),_0x5a3128={..._0x595d94,'embeddedSegments':_0x2bf202,'referencedSegments':_0x32a3aa,'activationKeys':_0x43bd5e[_0x4ffd77(0x161)]>0x0?_0x43bd5e:undefined};if(_0x101508[_0x4ffd77(0x109)])for(const [_0x268056,_0x5c5646]of Object[_0x4ffd77(0x154)](_0x101508[_0x4ffd77(0x109)])){const _0x3862b4=validateEmbeddedSegment(_0x5c5646,'segments.'+_0x268056,_0x5a3128);for(const _0x35b079 of _0x3862b4){if(_0x35b079[_0x4ffd77(0x1b3)]==='error')_0x1927f1[_0x4ffd77(0x163)](_0x35b079);else _0x235801[_0x4ffd77(0x163)](_0x35b079);}}const _0x51cc75=!!_0x101508['goal'],_0x1d5755=_0x101508['journeys']?.[_0x4ffd77(0x1b7)](_0xe7220e=>!!_0xe7220e['goal'])??![];!_0x51cc75&&!_0x1d5755&&_0x235801[_0x4ffd77(0x163)]({'level':'warning','path':_0x4ffd77(0x123),'code':_0x4ffd77(0x194),'message':_0x4ffd77(0x15b),'location':getLocationFromPath(_0x595d94['document'],_0x595d94[_0x4ffd77(0x17b)],[_0x4ffd77(0x123)])});const _0x5cd111=_0x101508['journeys']??_0x101508[_0x4ffd77(0x1aa)];if(_0x5cd111&&_0x5cd111[_0x4ffd77(0x1af)](_0x38ede6=>_0x38ede6[_0x4ffd77(0x1a5)]===!![])['length']>0x1){const _0x532a44=_0x101508[_0x4ffd77(0x113)]?_0x4ffd77(0x113):_0x4ffd77(0x1aa);_0x1927f1[_0x4ffd77(0x163)]({'level':_0x4ffd77(0x10d),'path':_0x532a44,'code':_0x4ffd77(0x111),'message':_0x4ffd77(0x1ac)+(_0x532a44==='journeys'?_0x4ffd77(0x195):_0x4ffd77(0x1ba))+_0x4ffd77(0x16b),'location':getLocationFromPath(_0x595d94[_0x4ffd77(0x104)],_0x595d94[_0x4ffd77(0x17b)],[_0x532a44])});}if(_0x101508[_0x4ffd77(0x113)]&&_0x101508[_0x4ffd77(0x113)]['length']>0x0)for(let _0x187b96=0x0;_0x187b96<_0x101508[_0x4ffd77(0x113)][_0x4ffd77(0x105)];_0x187b96++){const _0x5c9588=_0x101508[_0x4ffd77(0x113)][_0x187b96];if(_0x101508['journeys'][_0x4ffd77(0x105)]>0x1&&_0x5c9588[_0x4ffd77(0x179)]==='launched')continue;const _0xf19d47=_0x5c9588[_0x4ffd77(0x1b9)]||[],_0x1ecf88=_0x4ffd77(0x106)+_0x187b96+'].',_0x461140=!!_0x5c9588[_0x4ffd77(0x123)],_0x3cd140=_0x461140?{..._0x101508,'goal':_0x5c9588[_0x4ffd77(0x123)]}:_0x101508;validateStagesForVersion(_0xf19d47,_0x3cd140,_0x5a3128,_0x1ecf88,_0x1927f1,_0x235801,{'goalIsInherited':!_0x461140});}else{if(_0x101508[_0x4ffd77(0x1aa)]&&_0x101508['versions'][_0x4ffd77(0x105)]>0x0)for(let _0x58431b=0x0;_0x58431b<_0x101508[_0x4ffd77(0x1aa)]['length'];_0x58431b++){const _0x30764d=_0x101508['versions'][_0x58431b];if(_0x101508[_0x4ffd77(0x1aa)][_0x4ffd77(0x105)]>0x1&&_0x30764d['state']==='launched')continue;const _0x517717=_0x30764d[_0x4ffd77(0x1b9)]||[],_0x286588=_0x4ffd77(0x153)+_0x58431b+'].';validateStagesForVersion(_0x517717,_0x101508,_0x5a3128,_0x286588,_0x1927f1,_0x235801);}else{const _0x564912=_0x101508[_0x4ffd77(0x1b9)]||[];validateStagesForVersion(_0x564912,_0x101508,_0x5a3128,'',_0x1927f1,_0x235801);}}_0x101508[_0x4ffd77(0x113)]&&_0x101508[_0x4ffd77(0x113)][_0x4ffd77(0x105)]>0x1&&(deduplicateAcrossVersions(_0x1927f1),deduplicateAcrossVersions(_0x235801));for(const _0x3c05da of _0x2bf202){!_0x32a3aa[_0x4ffd77(0x16d)](_0x3c05da)&&!_0x3c05da[_0x4ffd77(0x172)](_0x4ffd77(0x119))&&_0x235801[_0x4ffd77(0x163)]({'level':'warning','path':'segments.'+_0x3c05da,'code':_0x4ffd77(0x14a),'message':'Embedded\x20segment\x20\x27'+_0x3c05da+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x595d94[_0x4ffd77(0x104)],_0x595d94['source'],[_0x4ffd77(0x109),_0x3c05da])});}return{'valid':_0x1927f1[_0x4ffd77(0x105)]===0x0,'errors':_0x1927f1,'warnings':_0x235801};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a147_0x39f191=a147_0x43d7;(function(_0x163446,_0x34c4c0){const _0x52b6a1=a147_0x43d7,_0x5696d2=_0x163446();while(!![]){try{const _0xb4e3fc=parseInt(_0x52b6a1(0xf2))/0x1*(-parseInt(_0x52b6a1(0x11d))/0x2)+parseInt(_0x52b6a1(0x173))/0x3+parseInt(_0x52b6a1(0x10b))/0x4+parseInt(_0x52b6a1(0x172))/0x5+parseInt(_0x52b6a1(0x190))/0x6+-parseInt(_0x52b6a1(0x19a))/0x7+parseInt(_0x52b6a1(0x125))/0x8*(-parseInt(_0x52b6a1(0x13e))/0x9);if(_0xb4e3fc===_0x34c4c0)break;else _0x5696d2['push'](_0x5696d2['shift']());}catch(_0x397b78){_0x5696d2['push'](_0x5696d2['shift']());}}}(a147_0xd8f8,0xd3935));import*as a147_0x252908 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(_0x47c837){const _0x5e1ade=a147_0x43d7,_0xa272b9=_0x47c837[_0x5e1ade(0xea)]();if(_0xa272b9===_0x5e1ade(0x12d)||_0xa272b9==='day')return _0x5e1ade(0x109);if(_0xa272b9===_0x5e1ade(0x128)||_0xa272b9===_0x5e1ade(0xe5))return'week';return _0x47c837;}export function journeyResponseToDefSync(_0x4d97e6){const _0x2db2bb=a147_0x43d7,_0x343494=_0x4d97e6[_0x2db2bb(0xfa)],_0x4c290e=_0x343494[_0x2db2bb(0x174)]||_0x343494[_0x2db2bb(0x15d)],_0x40e76a={'stages':_0x343494[_0x2db2bb(0x168)][_0x2db2bb(0xeb)](convertApiStageToYaml),'id':_0x4d97e6['id']};_0x343494[_0x2db2bb(0x144)]&&(_0x40e76a[_0x2db2bb(0x144)]=convertApiCriteriaToYaml(_0x343494[_0x2db2bb(0x144)]));_0x343494['name']&&_0x343494['name']!==_0x4c290e&&(_0x40e76a[_0x2db2bb(0x147)]=_0x343494[_0x2db2bb(0x15d)]);_0x343494[_0x2db2bb(0xfd)]!==undefined&&(_0x40e76a['version_number']=_0x343494[_0x2db2bb(0xfd)]);_0x343494[_0x2db2bb(0x19b)]&&(_0x40e76a['state']=_0x343494[_0x2db2bb(0x19b)]===_0x2db2bb(0x197)?'launched':'draft');const _0x48042a={'type':_0x2db2bb(0x156),'name':_0x4c290e,'journeys':[_0x40e76a]};_0x343494[_0x2db2bb(0x102)]&&(_0x48042a['description']=_0x343494[_0x2db2bb(0x102)]);_0x343494[_0x2db2bb(0x144)]&&(_0x48042a[_0x2db2bb(0x144)]=convertApiCriteriaToYaml(_0x343494[_0x2db2bb(0x144)]));if(_0x343494['reentryMode'])_0x48042a[_0x2db2bb(0x195)]=_0x343494[_0x2db2bb(0xf8)];else _0x343494[_0x2db2bb(0x13d)]!==undefined&&(_0x48042a[_0x2db2bb(0x195)]=_0x343494[_0x2db2bb(0x13d)]?_0x2db2bb(0x16e):_0x2db2bb(0x154));return _0x343494['journeyBundleId']&&(_0x48042a['bundle_id']=_0x343494[_0x2db2bb(0x14d)]),_0x343494[_0x2db2bb(0x174)]&&(_0x48042a['bundle_name']=_0x343494[_0x2db2bb(0x174)]),_0x4d97e6[_0x2db2bb(0x1a0)]?.[_0x2db2bb(0x133)]?.['data']?.['id']&&(_0x48042a[_0x2db2bb(0x166)]=_0x4d97e6['relationships']['parentFolder'][_0x2db2bb(0x189)]['id']),_0x48042a;}export async function journeyResponseToDef(_0x585475,_0x57771a){const _0x4de4ea=a147_0x43d7,_0x5c6f1a=journeyResponseToDefSync(_0x585475);if(!_0x57771a)return _0x5c6f1a;const _0x5c90fc=new Set();collectSegmentIdsFromJourney(_0x5c6f1a,_0x5c90fc);const _0xb9ebe4=new Set();collectActivationIdsFromJourney(_0x5c6f1a,_0xb9ebe4);const _0x44941d={},_0x1a277d=new Map();for(const _0x3475f4 of Array[_0x4de4ea(0x117)](_0x5c90fc)[_0x4de4ea(0x199)]()){if(_0x57771a[_0x4de4ea(0x101)]){const _0x32f9d6=await _0x57771a[_0x4de4ea(0x101)](_0x3475f4);if(_0x32f9d6[_0x4de4ea(0xed)]){_0x1a277d['set'](_0x3475f4,_0x32f9d6[_0x4de4ea(0x15d)]);if(_0x32f9d6['definition']){const _0x40422a={..._0x32f9d6['definition'],'rule':deepSortObject(_0x32f9d6[_0x4de4ea(0x15a)][_0x4de4ea(0x15f)])};_0x44941d[_0x32f9d6[_0x4de4ea(0x15d)]]=_0x40422a;}}else _0x1a277d[_0x4de4ea(0x18f)](_0x3475f4,makeSegmentRef(_0x32f9d6[_0x4de4ea(0x15d)]));}else{if(_0x57771a[_0x4de4ea(0x176)]){const _0x568250=await _0x57771a[_0x4de4ea(0x176)](_0x3475f4);_0x1a277d[_0x4de4ea(0x18f)](_0x3475f4,_0x568250);}}}const _0x119ecf={},_0x360b87=new Map();for(const _0x281606 of Array[_0x4de4ea(0x117)](_0xb9ebe4)['sort']()){if(_0x57771a[_0x4de4ea(0x193)]){const _0x59a066=await _0x57771a[_0x4de4ea(0x193)](_0x281606);_0x59a066[_0x4de4ea(0xed)]?(_0x360b87[_0x4de4ea(0x18f)](_0x281606,_0x59a066['name']),_0x59a066[_0x4de4ea(0x15a)]&&(_0x119ecf[_0x59a066[_0x4de4ea(0x15d)]]=_0x59a066[_0x4de4ea(0x15a)])):_0x360b87[_0x4de4ea(0x18f)](_0x281606,makeSegmentRef(_0x59a066[_0x4de4ea(0x15d)]));}else{if(_0x57771a[_0x4de4ea(0x17e)]){const _0x5bd9bf=await _0x57771a['resolveActivationName'](_0x281606);_0x360b87[_0x4de4ea(0x18f)](_0x281606,_0x5bd9bf);}}}_0x1a277d[_0x4de4ea(0x188)]>0x0&&replaceSegmentIdsInJourney(_0x5c6f1a,_0x1a277d);_0x360b87[_0x4de4ea(0x188)]>0x0&&replaceActivationIdsInJourney(_0x5c6f1a,_0x360b87);if(_0x57771a[_0x4de4ea(0xf6)]){const _0x21b8be=[];collectJumpTargetsFromJourney(_0x5c6f1a,_0x21b8be);if(_0x21b8be[_0x4de4ea(0x104)]>0x0){const _0x824a33=new Map();for(const _0x348494 of _0x21b8be){try{const _0x53acd2=await _0x57771a[_0x4de4ea(0xf6)](_0x348494[_0x4de4ea(0x170)],_0x348494['stageId']);_0x824a33[_0x4de4ea(0x18f)](_0x348494[_0x4de4ea(0x170)]+':'+_0x348494[_0x4de4ea(0x18c)],_0x53acd2);}catch{}}_0x824a33['size']>0x0&&replaceJumpTargetsInJourney(_0x5c6f1a,_0x824a33);}}return Object[_0x4de4ea(0x158)](_0x44941d)['length']>0x0&&(_0x5c6f1a[_0x4de4ea(0x126)]=_0x44941d),Object[_0x4de4ea(0x158)](_0x119ecf)[_0x4de4ea(0x104)]>0x0&&(_0x5c6f1a[_0x4de4ea(0x171)]=_0x119ecf),_0x5c6f1a;}function a147_0x43d7(_0x1438a5,_0x406e48){_0x1438a5=_0x1438a5-0xe2;const _0xd8f8b4=a147_0xd8f8();let _0x43d7e5=_0xd8f8b4[_0x1438a5];return _0x43d7e5;}function collectSegmentIdsFromJourney(_0x32167f,_0x259198){const _0x589a54=a147_0x43d7;_0x32167f[_0x589a54(0x144)]?.[_0x589a54(0x146)]&&_0x259198[_0x589a54(0x140)](_0x32167f['goal'][_0x589a54(0x146)]);const _0x4e6814=_0x1cb599=>{const _0x2fac27=_0x589a54;for(const _0x5b3456 of _0x1cb599){_0x5b3456[_0x2fac27(0x11e)]?.[_0x2fac27(0x146)]&&_0x259198[_0x2fac27(0x140)](_0x5b3456[_0x2fac27(0x11e)][_0x2fac27(0x146)]);if(_0x5b3456[_0x2fac27(0x14a)])for(const _0x264998 of _0x5b3456['exit_criteria']){_0x264998[_0x2fac27(0x146)]&&_0x259198[_0x2fac27(0x140)](_0x264998['segment']);}_0x5b3456[_0x2fac27(0x191)]?.['segment']&&_0x259198[_0x2fac27(0x140)](_0x5b3456[_0x2fac27(0x191)][_0x2fac27(0x146)]);if(_0x5b3456['steps'])for(const _0x5c4803 of _0x5b3456[_0x2fac27(0xfc)]){if(_0x5c4803[_0x2fac27(0x19f)]===_0x2fac27(0x181)){const _0xd22a20=_0x5c4803;for(const _0x3936c2 of _0xd22a20['with'][_0x2fac27(0xe3)]){_0x3936c2[_0x2fac27(0x146)]&&_0x259198['add'](_0x3936c2[_0x2fac27(0x146)]);}}else{if(_0x5c4803[_0x2fac27(0x19f)]==='wait'){const _0x2cacc9=_0x5c4803;_0x2cacc9['with'][_0x2fac27(0x16b)]?.[_0x2fac27(0x146)]&&_0x259198[_0x2fac27(0x140)](_0x2cacc9[_0x2fac27(0x186)][_0x2fac27(0x16b)][_0x2fac27(0x146)]);}}}}};if(_0x32167f[_0x589a54(0x162)])for(const _0x1a4810 of _0x32167f[_0x589a54(0x162)]){_0x1a4810[_0x589a54(0x144)]?.[_0x589a54(0x146)]&&_0x259198[_0x589a54(0x140)](_0x1a4810['goal'][_0x589a54(0x146)]),_0x4e6814(_0x1a4810[_0x589a54(0xec)]);}_0x32167f['stages']&&_0x4e6814(_0x32167f['stages']);if(_0x32167f[_0x589a54(0x12c)])for(const _0x22593b of _0x32167f['versions']){_0x4e6814(_0x22593b['stages']);}}function replaceSegmentIdsInJourney(_0xbc63c7,_0x490fd5){const _0x514160=a147_0x43d7,_0x173f48=_0xe2b522=>_0x490fd5[_0x514160(0x194)](_0xe2b522)||_0xe2b522;_0xbc63c7[_0x514160(0x144)]?.[_0x514160(0x146)]&&(_0xbc63c7['goal'][_0x514160(0x146)]=_0x173f48(_0xbc63c7[_0x514160(0x144)][_0x514160(0x146)]));const _0x2fec26=_0x43eb72=>{const _0x1a324e=_0x514160;for(const _0x22377d of _0x43eb72){_0x22377d[_0x1a324e(0x11e)]?.[_0x1a324e(0x146)]&&(_0x22377d[_0x1a324e(0x11e)]['segment']=_0x173f48(_0x22377d[_0x1a324e(0x11e)]['segment']));if(_0x22377d[_0x1a324e(0x14a)])for(const _0x54474a of _0x22377d['exit_criteria']){_0x54474a[_0x1a324e(0x146)]&&(_0x54474a[_0x1a324e(0x146)]=_0x173f48(_0x54474a[_0x1a324e(0x146)]));}_0x22377d['milestone']?.['segment']&&(_0x22377d[_0x1a324e(0x191)]['segment']=_0x173f48(_0x22377d['milestone'][_0x1a324e(0x146)]));if(_0x22377d['steps'])for(const _0x3cc8e8 of _0x22377d[_0x1a324e(0xfc)]){if(_0x3cc8e8[_0x1a324e(0x19f)]==='decision_point'){const _0x1e66c4=_0x3cc8e8;for(const _0x23d51c of _0x1e66c4[_0x1a324e(0x186)]['branches']){_0x23d51c[_0x1a324e(0x146)]&&(_0x23d51c['segment']=_0x173f48(_0x23d51c[_0x1a324e(0x146)]));}}else{if(_0x3cc8e8['type']===_0x1a324e(0x167)){const _0x234697=_0x3cc8e8;_0x234697[_0x1a324e(0x186)][_0x1a324e(0x16b)]?.[_0x1a324e(0x146)]&&(_0x234697['with']['condition']['segment']=_0x173f48(_0x234697[_0x1a324e(0x186)][_0x1a324e(0x16b)][_0x1a324e(0x146)]));}}}}};if(_0xbc63c7[_0x514160(0x162)])for(const _0x537065 of _0xbc63c7[_0x514160(0x162)]){_0x537065[_0x514160(0x144)]?.[_0x514160(0x146)]&&(_0x537065['goal']['segment']=_0x173f48(_0x537065['goal']['segment'])),_0x2fec26(_0x537065[_0x514160(0xec)]);}_0xbc63c7['stages']&&_0x2fec26(_0xbc63c7[_0x514160(0xec)]);if(_0xbc63c7[_0x514160(0x12c)])for(const _0x6fab82 of _0xbc63c7[_0x514160(0x12c)]){_0x2fec26(_0x6fab82['stages']);}}function collectActivationIdsFromJourney(_0x12f655,_0x452fc4){const _0x237a30=a147_0x43d7,_0x2065d8=_0x1ffc61=>{const _0xb3ec28=a147_0x43d7;for(const _0x59e6d3 of _0x1ffc61){if(_0x59e6d3['steps'])for(const _0x3ed727 of _0x59e6d3[_0xb3ec28(0xfc)]){if(_0x3ed727[_0xb3ec28(0x19f)]===_0xb3ec28(0x113)){const _0x2176e2=_0x3ed727;_0x2176e2[_0xb3ec28(0x186)][_0xb3ec28(0x113)]&&/^\d+$/['test'](_0x2176e2[_0xb3ec28(0x186)][_0xb3ec28(0x113)])&&_0x452fc4[_0xb3ec28(0x140)](_0x2176e2['with'][_0xb3ec28(0x113)]);}}}};if(_0x12f655[_0x237a30(0x162)])for(const _0xba5b85 of _0x12f655['journeys']){_0x2065d8(_0xba5b85[_0x237a30(0xec)]);}_0x12f655[_0x237a30(0xec)]&&_0x2065d8(_0x12f655[_0x237a30(0xec)]);if(_0x12f655[_0x237a30(0x12c)])for(const _0x567a9a of _0x12f655[_0x237a30(0x12c)]){_0x2065d8(_0x567a9a[_0x237a30(0xec)]);}}function replaceActivationIdsInJourney(_0x5742f6,_0x1c6e1f){const _0x4ca7ab=a147_0x43d7,_0x34f252=_0x3c5ebd=>_0x1c6e1f['get'](_0x3c5ebd)||_0x3c5ebd,_0x38d9e4=_0x1b1a04=>{const _0x110811=a147_0x43d7;for(const _0xe3f12a of _0x1b1a04){if(_0xe3f12a[_0x110811(0xfc)])for(const _0x2a4b35 of _0xe3f12a['steps']){if(_0x2a4b35[_0x110811(0x19f)]===_0x110811(0x113)){const _0x4d808e=_0x2a4b35;_0x4d808e['with']['activation']&&(_0x4d808e[_0x110811(0x186)][_0x110811(0x113)]=_0x34f252(_0x4d808e[_0x110811(0x186)]['activation']));}}}};if(_0x5742f6['journeys'])for(const _0x2e04e9 of _0x5742f6[_0x4ca7ab(0x162)]){_0x38d9e4(_0x2e04e9[_0x4ca7ab(0xec)]);}_0x5742f6[_0x4ca7ab(0xec)]&&_0x38d9e4(_0x5742f6[_0x4ca7ab(0xec)]);if(_0x5742f6[_0x4ca7ab(0x12c)])for(const _0x560f08 of _0x5742f6['versions']){_0x38d9e4(_0x560f08['stages']);}}function collectJumpTargetsFromJourney(_0x598d65,_0x3f47ce){const _0xfaf490=a147_0x43d7,_0x16d8ff=new Set(),_0x58b4f1=_0x4dcf87=>{const _0x3c77ab=a147_0x43d7;for(const _0x4017ba of _0x4dcf87){if(_0x4017ba['steps'])for(const _0x270408 of _0x4017ba[_0x3c77ab(0xfc)]){if(_0x270408['type']===_0x3c77ab(0x151)){const _0x4d8400=_0x270408,_0x32b26e=_0x4d8400[_0x3c77ab(0x186)][_0x3c77ab(0x11a)];if(_0x32b26e['journey']&&_0x32b26e[_0x3c77ab(0x129)]&&/^\d+$/[_0x3c77ab(0x196)](_0x32b26e[_0x3c77ab(0x156)])&&/^\d+$/[_0x3c77ab(0x196)](_0x32b26e['stage'])){const _0xb96d0=_0x32b26e[_0x3c77ab(0x156)]+':'+_0x32b26e['stage'];!_0x16d8ff[_0x3c77ab(0x112)](_0xb96d0)&&(_0x16d8ff[_0x3c77ab(0x140)](_0xb96d0),_0x3f47ce[_0x3c77ab(0x15e)]({'journeyId':_0x32b26e['journey'],'stageId':_0x32b26e['stage']}));}}}}};if(_0x598d65[_0xfaf490(0x162)])for(const _0x3caa20 of _0x598d65[_0xfaf490(0x162)]){_0x58b4f1(_0x3caa20[_0xfaf490(0xec)]);}_0x598d65[_0xfaf490(0xec)]&&_0x58b4f1(_0x598d65[_0xfaf490(0xec)]);if(_0x598d65[_0xfaf490(0x12c)])for(const _0x1d875b of _0x598d65['versions']){_0x58b4f1(_0x1d875b[_0xfaf490(0xec)]);}}function replaceJumpTargetsInJourney(_0x21d7e4,_0x476e27){const _0x31543b=a147_0x43d7,_0x1e7f5c=_0xaa800a=>{const _0x5225be=a147_0x43d7;for(const _0x15d873 of _0xaa800a){if(_0x15d873[_0x5225be(0xfc)])for(const _0x3fbf67 of _0x15d873['steps']){if(_0x3fbf67[_0x5225be(0x19f)]===_0x5225be(0x151)){const _0x22a6e7=_0x3fbf67,_0x16e064=_0x22a6e7[_0x5225be(0x186)][_0x5225be(0x11a)],_0x3a09e6=_0x16e064['journey']+':'+_0x16e064[_0x5225be(0x129)],_0x2a1ecb=_0x476e27['get'](_0x3a09e6);_0x2a1ecb&&(_0x16e064['journey']=_0x2a1ecb['journeyName'],_0x16e064[_0x5225be(0x129)]=_0x2a1ecb['stageName']);}}}};if(_0x21d7e4[_0x31543b(0x162)])for(const _0x13db64 of _0x21d7e4[_0x31543b(0x162)]){_0x1e7f5c(_0x13db64[_0x31543b(0xec)]);}_0x21d7e4[_0x31543b(0xec)]&&_0x1e7f5c(_0x21d7e4[_0x31543b(0xec)]);if(_0x21d7e4[_0x31543b(0x12c)])for(const _0x18e0d9 of _0x21d7e4[_0x31543b(0x12c)]){_0x1e7f5c(_0x18e0d9[_0x31543b(0xec)]);}}function generateReadableStepName(_0x15a249,_0x2721ba){const _0x4144fa=a147_0x43d7;if(_0x15a249[_0x4144fa(0x15d)]&&_0x15a249[_0x4144fa(0x15d)]!==_0x15a249[_0x4144fa(0x19f)]){const _0x275182=_0x15a249[_0x4144fa(0x15d)][_0x4144fa(0x18d)]();if(_0x275182&&/[a-z0-9\p{L}]/iu[_0x4144fa(0x196)](_0x275182))return _0x275182;}const _0xcad1a=_0x15a249[_0x4144fa(0x19f)][_0x4144fa(0xea)]()[_0x4144fa(0x17a)](/step$/i,'');return _0xcad1a+'_'+(_0x2721ba+0x1);}function getStepNextRefs(_0x28185b){const _0x2e680a=a147_0x43d7,_0x1e3a30=[];if(_0x28185b[_0x2e680a(0x11c)])_0x1e3a30[_0x2e680a(0x15e)](_0x28185b[_0x2e680a(0x11c)]);if(_0x28185b[_0x2e680a(0xe3)])for(const _0x50ee1c of _0x28185b['branches']){if(_0x50ee1c[_0x2e680a(0x11c)])_0x1e3a30[_0x2e680a(0x15e)](_0x50ee1c[_0x2e680a(0x11c)]);}if(_0x28185b['variants'])for(const _0x394c84 of _0x28185b[_0x2e680a(0x131)]){if(_0x394c84[_0x2e680a(0x11c)])_0x1e3a30[_0x2e680a(0x15e)](_0x394c84[_0x2e680a(0x11c)]);}if(_0x28185b[_0x2e680a(0xe6)])for(const _0x326d64 of _0x28185b[_0x2e680a(0xe6)]){if(_0x326d64[_0x2e680a(0x11c)])_0x1e3a30['push'](_0x326d64['next']);}return _0x1e3a30;}function parseJumpTargetDisplayName(_0x4bb896){const _0xdd419=a147_0x43d7,_0x181bf3=_0x4bb896['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0x181bf3)return undefined;const _0x5f405a=_0x181bf3[0x1]['trim'](),_0x13806d=_0x181bf3[0x2][_0xdd419(0x18d)]();if(!_0x5f405a||!_0x13806d)return undefined;return{'stageName':_0x5f405a,'journeyName':_0x13806d};}function orderStepsFromRoot(_0x30a88f,_0x208efe){const _0x3eed1d=a147_0x43d7,_0x1513a5=Object[_0x3eed1d(0x17f)](_0x30a88f);if(_0x1513a5[_0x3eed1d(0x104)]===0x0)return[];const _0x2058f3=new Set(_0x1513a5[_0x3eed1d(0xeb)](([_0x38784b])=>_0x38784b)),_0x3525aa=new Set();for(const [,_0x1d8845]of _0x1513a5){for(const _0x53602c of getStepNextRefs(_0x1d8845)){if(_0x2058f3[_0x3eed1d(0x112)](_0x53602c))_0x3525aa[_0x3eed1d(0x140)](_0x53602c);}}let _0x5b1c27=_0x208efe&&_0x2058f3[_0x3eed1d(0x112)](_0x208efe)?_0x208efe:undefined;if(!_0x5b1c27){const _0x4a071a=_0x1513a5[_0x3eed1d(0x185)](([_0x1336c4])=>!_0x3525aa[_0x3eed1d(0x112)](_0x1336c4));_0x4a071a[_0x3eed1d(0x104)]>0x0?_0x5b1c27=_0x4a071a[0x0][0x0]:_0x5b1c27=_0x1513a5[0x0][0x0];}const _0x17e7fa=[],_0x2365df=new Set(),_0x14c4c1=[_0x5b1c27];while(_0x14c4c1[_0x3eed1d(0x104)]>0x0){const _0x5541c8=_0x14c4c1[_0x3eed1d(0x108)]();if(_0x2365df[_0x3eed1d(0x112)](_0x5541c8))continue;_0x2365df[_0x3eed1d(0x140)](_0x5541c8);const _0x5bfceb=_0x30a88f[_0x5541c8];if(!_0x5bfceb)continue;_0x17e7fa[_0x3eed1d(0x15e)]({'uuid':_0x5541c8,'step':_0x5bfceb});for(const _0x3b1cfa of getStepNextRefs(_0x5bfceb)){_0x2058f3[_0x3eed1d(0x112)](_0x3b1cfa)&&!_0x2365df[_0x3eed1d(0x112)](_0x3b1cfa)&&_0x14c4c1[_0x3eed1d(0x15e)](_0x3b1cfa);}}for(const [_0x21156f,_0x533c0c]of _0x1513a5){!_0x2365df['has'](_0x21156f)&&_0x17e7fa[_0x3eed1d(0x15e)]({'uuid':_0x21156f,'step':_0x533c0c});}return _0x17e7fa;}function resolveStepReferences(_0x24c4e2,_0x18ab8f,_0x255568,_0x13c3c6){const _0xf56197=a147_0x43d7;if(_0x24c4e2[_0xf56197(0x19f)]!==_0xf56197(0x135)){_0x24c4e2[_0xf56197(0x11c)]&&_0x13c3c6[_0xf56197(0x112)](_0x24c4e2[_0xf56197(0x11c)])&&(_0x24c4e2['next']=_0x13c3c6[_0xf56197(0x194)](_0x24c4e2[_0xf56197(0x11c)]));const _0x1ab8d8=_0x18ab8f+0x1;if(_0x1ab8d8<_0x255568[_0xf56197(0x104)]){const _0x1584ff=_0x13c3c6[_0xf56197(0x194)](_0x255568[_0x1ab8d8]['uuid']);_0x24c4e2[_0xf56197(0x11c)]===_0x1584ff&&delete _0x24c4e2[_0xf56197(0x11c)];}}if(_0x24c4e2[_0xf56197(0x19f)]===_0xf56197(0x181))for(const _0x24d0bd of _0x24c4e2[_0xf56197(0x186)][_0xf56197(0xe3)]){_0x24d0bd['next']&&_0x13c3c6['has'](_0x24d0bd['next'])&&(_0x24d0bd[_0xf56197(0x11c)]=_0x13c3c6[_0xf56197(0x194)](_0x24d0bd[_0xf56197(0x11c)]));}if(_0x24c4e2[_0xf56197(0x19f)]===_0xf56197(0x121))for(const _0x2c2cf2 of _0x24c4e2['with']['variants']){_0x2c2cf2[_0xf56197(0x11c)]&&_0x13c3c6[_0xf56197(0x112)](_0x2c2cf2[_0xf56197(0x11c)])&&(_0x2c2cf2[_0xf56197(0x11c)]=_0x13c3c6['get'](_0x2c2cf2[_0xf56197(0x11c)]));}if(_0x24c4e2[_0xf56197(0x19f)]===_0xf56197(0x167)&&_0x24c4e2[_0xf56197(0x186)][_0xf56197(0x16b)]){const _0x3fc693=_0x24c4e2[_0xf56197(0x186)][_0xf56197(0x16b)];_0x3fc693['next']&&_0x13c3c6[_0xf56197(0x112)](_0x3fc693['next'])&&(_0x3fc693[_0xf56197(0x11c)]=_0x13c3c6[_0xf56197(0x194)](_0x3fc693['next'])),_0x3fc693['timeout']?.[_0xf56197(0x11c)]&&_0x13c3c6[_0xf56197(0x112)](_0x3fc693[_0xf56197(0x124)]['next'])&&(_0x3fc693[_0xf56197(0x124)]['next']=_0x13c3c6[_0xf56197(0x194)](_0x3fc693[_0xf56197(0x124)]['next']));}}function convertApiStageToYaml(_0x28d796){const _0xbeb023=a147_0x43d7,_0x462d8a={'name':_0x28d796['name']};_0x28d796['id']&&(_0x462d8a['id']=_0x28d796['id']);_0x28d796[_0xbeb023(0x102)]&&(_0x462d8a['description']=_0x28d796['description']);_0x28d796[_0xbeb023(0x10e)]&&(_0x462d8a[_0xbeb023(0x11e)]=convertApiCriteriaToYaml(_0x28d796[_0xbeb023(0x10e)]));_0x28d796[_0xbeb023(0x18e)]&&_0x28d796['exitCriterias'][_0xbeb023(0x104)]>0x0&&(_0x462d8a[_0xbeb023(0x14a)]=_0x28d796[_0xbeb023(0x18e)]['map'](convertApiCriteriaToYaml));_0x28d796[_0xbeb023(0x191)]&&(_0x462d8a[_0xbeb023(0x191)]=convertApiCriteriaToYaml(_0x28d796[_0xbeb023(0x191)]));if(_0x28d796[_0xbeb023(0xfc)]&&Object[_0xbeb023(0x158)](_0x28d796[_0xbeb023(0xfc)])[_0xbeb023(0x104)]>0x0){const _0x2303ce=orderStepsFromRoot(_0x28d796[_0xbeb023(0xfc)],_0x28d796[_0xbeb023(0x16d)]),_0x5ec05a=new Map(),_0x25c25a=new Set();for(let _0x33a733=0x0;_0x33a733<_0x2303ce[_0xbeb023(0x104)];_0x33a733++){const {uuid:_0xe41276,step:_0x2deb57}=_0x2303ce[_0x33a733];let _0x3591e6=generateReadableStepName(_0x2deb57,_0x33a733),_0x57a3a7=_0x3591e6,_0x240162=0x2;while(_0x25c25a[_0xbeb023(0x112)](_0x57a3a7)){_0x57a3a7=_0x3591e6+'_'+_0x240162,_0x240162++;}_0x25c25a[_0xbeb023(0x140)](_0x57a3a7),_0x5ec05a[_0xbeb023(0x18f)](_0xe41276,_0x57a3a7);}_0x462d8a[_0xbeb023(0xfc)]=_0x2303ce[_0xbeb023(0xeb)](({uuid:_0x33540b,step:_0x517e09},_0x3a5944)=>{const _0x40b95a=_0xbeb023,_0x4e97d7=convertApiStepToYaml(_0x517e09,_0x5ec05a[_0x40b95a(0x194)](_0x33540b));return resolveStepReferences(_0x4e97d7,_0x3a5944,_0x2303ce,_0x5ec05a),_0x4e97d7;});}return _0x462d8a;}function convertApiCriteriaToYaml(_0x430f21){const _0x53f857=a147_0x43d7,_0xe177c2={'name':_0x430f21[_0x53f857(0x15d)],'segment':_0x430f21['segmentId']};_0x430f21['description']&&(_0xe177c2['description']=_0x430f21[_0x53f857(0x102)]);if(_0x430f21[_0x53f857(0x11a)]){let _0x28361d=_0x430f21['target'][_0x53f857(0x170)],_0x47b2b9=_0x430f21[_0x53f857(0x11a)][_0x53f857(0x17b)];if(_0x430f21[_0x53f857(0x11a)]['journeyName']){const _0x59fbb6=parseJumpTargetDisplayName(_0x430f21['target'][_0x53f857(0x15c)]);_0x59fbb6&&(_0x47b2b9=_0x59fbb6[_0x53f857(0x12f)],_0x28361d=_0x59fbb6[_0x53f857(0x15c)]);}_0xe177c2['target']={'journey':_0x28361d,'stage':_0x47b2b9},_0x430f21[_0x53f857(0x11a)][_0x53f857(0x14d)]&&(_0xe177c2[_0x53f857(0x11a)][_0x53f857(0x155)]=_0x430f21[_0x53f857(0x11a)][_0x53f857(0x14d)]);}return _0xe177c2;}function convertApiStepToYaml(_0x51f5e7,_0x17ef24){const _0xb9b9d6=a147_0x43d7;switch(_0x51f5e7['type']){case _0xb9b9d6(0x148):{const _0x4c475e={};if(_0x51f5e7[_0xb9b9d6(0x192)]===_0xb9b9d6(0x10d)&&_0x51f5e7['waitStep']!==undefined)_0x4c475e['duration']=_0x51f5e7[_0xb9b9d6(0x19c)],_0x4c475e[_0xb9b9d6(0xf5)]=_0x51f5e7['waitStepUnit'];else{if(_0x51f5e7[_0xb9b9d6(0x192)]===_0xb9b9d6(0x178)&&_0x51f5e7[_0xb9b9d6(0x12e)])_0x4c475e['wait_until']=_0x51f5e7['waitUntilDate'];else{if(_0x51f5e7[_0xb9b9d6(0x192)]==='DaysOfTheWeek'&&_0x51f5e7[_0xb9b9d6(0x165)])_0x4c475e[_0xb9b9d6(0x116)]=_0x51f5e7[_0xb9b9d6(0x165)];else{if(_0x51f5e7[_0xb9b9d6(0x192)]===_0xb9b9d6(0x19e)){if(_0x51f5e7[_0xb9b9d6(0xe6)]&&_0x51f5e7['conditions'][_0xb9b9d6(0x104)]>0x0){const _0xf33742=_0x51f5e7[_0xb9b9d6(0xe6)]['find'](_0x46d3bf=>!_0x46d3bf[_0xb9b9d6(0xee)]),_0x15ef49=_0x51f5e7[_0xb9b9d6(0xe6)]['find'](_0x3649fb=>_0x3649fb[_0xb9b9d6(0xee)]);_0xf33742?.[_0xb9b9d6(0x106)]&&(_0x4c475e[_0xb9b9d6(0x16b)]={'segment':_0xf33742[_0xb9b9d6(0x106)],..._0xf33742[_0xb9b9d6(0x11c)]?{'next':_0xf33742[_0xb9b9d6(0x11c)]}:{}},_0x15ef49&&_0x15ef49[_0xb9b9d6(0x1a1)]!==undefined&&_0x15ef49[_0xb9b9d6(0xf5)]&&(_0x4c475e['condition']['timeout']={'duration':_0x15ef49[_0xb9b9d6(0x1a1)],'unit':_0x15ef49['unit'],..._0x15ef49['next']?{'next':_0x15ef49[_0xb9b9d6(0x11c)]}:{}}));}else _0x51f5e7[_0xb9b9d6(0x182)]&&(_0x4c475e[_0xb9b9d6(0x16b)]={'segment':_0x51f5e7[_0xb9b9d6(0x182)]},_0x51f5e7[_0xb9b9d6(0x105)]!==undefined&&_0x51f5e7[_0xb9b9d6(0x142)]&&(_0x4c475e[_0xb9b9d6(0x16b)]['timeout']={'duration':_0x51f5e7[_0xb9b9d6(0x105)],'unit':_0x51f5e7[_0xb9b9d6(0x142)]}));}}}}const _0x47c313={'type':_0xb9b9d6(0x167),'name':_0x17ef24,..._0x51f5e7[_0xb9b9d6(0x11c)]?{'next':_0x51f5e7[_0xb9b9d6(0x11c)]}:{},'with':_0x4c475e};return _0x47c313;}case'Activation':{const _0x2e3a57={'type':_0xb9b9d6(0x113),'name':_0x17ef24,..._0x51f5e7[_0xb9b9d6(0x11c)]?{'next':_0x51f5e7[_0xb9b9d6(0x11c)]}:{},'with':{'activation':_0x51f5e7[_0xb9b9d6(0x132)]||''}};return _0x2e3a57;}case _0xb9b9d6(0x111):{const _0x565201={'type':_0xb9b9d6(0x181),'name':_0x17ef24,..._0x51f5e7[_0xb9b9d6(0x11c)]?{'next':_0x51f5e7[_0xb9b9d6(0x11c)]}:{},'with':{'branches':(_0x51f5e7[_0xb9b9d6(0xe3)]||[])['map'](_0x5471ad=>({'name':_0x5471ad[_0xb9b9d6(0x15d)],'segment':_0x5471ad['segmentId'],'excluded':_0x5471ad['excludedPath'],..._0x5471ad[_0xb9b9d6(0x11c)]?{'next':_0x5471ad[_0xb9b9d6(0x11c)]}:{}}))}};return _0x565201;}case'ABTest':case _0xb9b9d6(0x159):case _0xb9b9d6(0x1a2):{const _0x180fc7=_0x51f5e7[_0xb9b9d6(0x131)]||(_0x51f5e7[_0xb9b9d6(0xe3)]||[])[_0xb9b9d6(0xeb)](_0x2e2c32=>({'name':_0x2e2c32['name'],'percentage':0x0,'next':_0x2e2c32['next']})),_0x4cc042={'type':_0xb9b9d6(0x121),'name':_0x17ef24,..._0x51f5e7[_0xb9b9d6(0x11c)]?{'next':_0x51f5e7['next']}:{},'with':{'customized_split':_0x51f5e7[_0xb9b9d6(0x17c)],'unique_id':_0x51f5e7['uniqueId'],'variants':_0x180fc7[_0xb9b9d6(0xeb)](_0x53a019=>({'name':_0x53a019['name'],'percentage':_0x53a019[_0xb9b9d6(0x145)],..._0x53a019[_0xb9b9d6(0x11c)]?{'next':_0x53a019[_0xb9b9d6(0x11c)]}:{}}))}};return _0x4cc042;}case _0xb9b9d6(0x139):{const _0x46ed90={'type':'merge','name':_0x17ef24,..._0x51f5e7[_0xb9b9d6(0x11c)]?{'next':_0x51f5e7[_0xb9b9d6(0x11c)]}:{}};return _0x46ed90;}case _0xb9b9d6(0x11b):{let _0x2635d0='',_0x5f343f='',_0x10ea35;if(_0x51f5e7[_0xb9b9d6(0x11a)]){_0x2635d0=_0x51f5e7[_0xb9b9d6(0x11a)][_0xb9b9d6(0x170)],_0x5f343f=_0x51f5e7['target']['journeyStageId'],_0x10ea35=_0x51f5e7[_0xb9b9d6(0x11a)][_0xb9b9d6(0x14d)];if(_0x51f5e7['target'][_0xb9b9d6(0x15c)]){const _0x42298c=parseJumpTargetDisplayName(_0x51f5e7[_0xb9b9d6(0x11a)][_0xb9b9d6(0x15c)]);_0x42298c&&(_0x5f343f=_0x42298c[_0xb9b9d6(0x12f)],_0x2635d0=_0x42298c[_0xb9b9d6(0x15c)]);}}const _0x3c83fd={'type':_0xb9b9d6(0x151),'name':_0x17ef24,..._0x51f5e7['next']?{'next':_0x51f5e7[_0xb9b9d6(0x11c)]}:{},'with':{'target':{'journey':_0x2635d0,'stage':_0x5f343f,..._0x10ea35?{'bundle_id':_0x10ea35}:{}}}};return _0x3c83fd;}case'End':{const _0x5de87e={'type':_0xb9b9d6(0x135),'name':_0x17ef24};return _0x5de87e;}default:{const _0x511847={'type':_0xb9b9d6(0x135),'name':_0x17ef24};return _0x511847;}}}export async function journeyDefToRequest(_0x113e82,_0x3398e6,_0x4f68a2){const _0x1d61ec=a147_0x43d7,_0x2c30b3=_0x113e82[_0x1d61ec(0xec)]||getActiveStages(_0x113e82),_0x412bdc=isJourneysArrayMode(_0x113e82)||isMultiVersionMode(_0x113e82)?getLatestJourneyEntry(_0x113e82):undefined,_0x3849c0=_0x412bdc?.[_0x1d61ec(0x147)]??_0x113e82[_0x1d61ec(0x15d)],_0x14dd26=_0x113e82[_0x1d61ec(0x126)]||{},_0x5931e1=_0x113e82[_0x1d61ec(0x171)]||{},_0x26aa0a={'type':_0x1d61ec(0x156),'attributes':{'name':_0x3849c0,'audienceId':_0x3398e6,'journeyStages':await Promise[_0x1d61ec(0xf9)](_0x2c30b3['map'](_0x3bb914=>convertYamlStageToApi(_0x3bb914,_0x4f68a2,_0x14dd26,_0x5931e1)))}},_0x406aaa=_0x412bdc?.['id']??_0x113e82['id'];_0x406aaa&&(_0x26aa0a['id']=_0x406aaa);_0x113e82[_0x1d61ec(0x102)]&&(_0x26aa0a[_0x1d61ec(0xfa)]['description']=_0x113e82['description']);const _0x24468e=getEffectiveGoal(_0x113e82);_0x24468e&&(_0x26aa0a[_0x1d61ec(0xfa)][_0x1d61ec(0x144)]=await convertYamlCriteriaToApi(_0x24468e,_0x4f68a2,_0x14dd26));const _0x1b9ed5=getEffectiveReentry(_0x113e82);return _0x1b9ed5&&(_0x26aa0a[_0x1d61ec(0xfa)]['reentryMode']=_0x1b9ed5,_0x26aa0a[_0x1d61ec(0xfa)][_0x1d61ec(0x13d)]=_0x1b9ed5!==_0x1d61ec(0x154)),_0x113e82[_0x1d61ec(0x166)]&&(_0x26aa0a[_0x1d61ec(0x1a0)]={'parentFolder':{'data':{'id':_0x113e82['folder_id'],'type':'folder'}}}),_0x26aa0a;}async function convertYamlStageToApi(_0x343a5c,_0x27c9de,_0x3e729d={},_0x20c43a={}){const _0x4a9ccd=a147_0x43d7,_0x2905bc={'name':_0x343a5c[_0x4a9ccd(0x15d)]};_0x343a5c['id']&&(_0x2905bc['id']=_0x343a5c['id']);_0x343a5c[_0x4a9ccd(0x102)]&&(_0x2905bc[_0x4a9ccd(0x102)]=_0x343a5c[_0x4a9ccd(0x102)]);_0x343a5c[_0x4a9ccd(0x11e)]&&(_0x2905bc[_0x4a9ccd(0x10e)]=await convertYamlCriteriaToApi(_0x343a5c[_0x4a9ccd(0x11e)],_0x27c9de,_0x3e729d));_0x343a5c[_0x4a9ccd(0x14a)]&&_0x343a5c[_0x4a9ccd(0x14a)][_0x4a9ccd(0x104)]>0x0&&(_0x2905bc[_0x4a9ccd(0x18e)]=await Promise[_0x4a9ccd(0xf9)](_0x343a5c[_0x4a9ccd(0x14a)][_0x4a9ccd(0xeb)](_0x122e37=>convertYamlCriteriaToApi(_0x122e37,_0x27c9de,_0x3e729d))));_0x343a5c[_0x4a9ccd(0x191)]&&(_0x2905bc[_0x4a9ccd(0x191)]=await convertYamlCriteriaToApi(_0x343a5c[_0x4a9ccd(0x191)],_0x27c9de,_0x3e729d));if(_0x343a5c[_0x4a9ccd(0xfc)]&&_0x343a5c[_0x4a9ccd(0xfc)][_0x4a9ccd(0x104)]>0x0){const _0x662204={},_0x59480a=_0x343a5c[_0x4a9ccd(0xfc)][_0x4a9ccd(0xeb)]((_0x18c069,_0x1b36ce)=>{const _0x36c596=_0x4a9ccd,_0x18d61b=_0x18c069[_0x36c596(0x179)]||generateUUID(),_0x170125=_0x18c069[_0x36c596(0x15d)]||_0x18c069[_0x36c596(0x19f)]+'_'+_0x1b36ce;return _0x662204[_0x170125]=_0x18d61b,{..._0x18c069,'name':_0x170125};});_0x2905bc['rootStep']=_0x662204[_0x59480a[0x0]['name']],_0x2905bc[_0x4a9ccd(0xfc)]={};for(let _0x302c62=0x0;_0x302c62<_0x59480a[_0x4a9ccd(0x104)];_0x302c62++){const _0xd6b223=_0x59480a[_0x302c62],_0x5b459b=_0x662204[_0xd6b223[_0x4a9ccd(0x15d)]],_0x1723fc=!_0xd6b223[_0x4a9ccd(0x11c)]&&_0x302c62<_0x59480a[_0x4a9ccd(0x104)]-0x1&&_0xd6b223['type']!==_0x4a9ccd(0x135)?_0x59480a[_0x302c62+0x1]['name']:_0xd6b223[_0x4a9ccd(0x11c)],_0x28bab7=_0x1723fc!==_0xd6b223[_0x4a9ccd(0x11c)]?{..._0xd6b223,'next':_0x1723fc}:_0xd6b223;_0x2905bc[_0x4a9ccd(0xfc)][_0x5b459b]=await convertYamlStepToApi(_0x28bab7,_0x27c9de,_0x3e729d,_0x662204,_0x20c43a);}}else _0x343a5c[_0x4a9ccd(0xf0)]&&(_0x2905bc[_0x4a9ccd(0x16d)]=_0x343a5c[_0x4a9ccd(0xf0)]);return _0x2905bc;}async function convertYamlCriteriaToApi(_0x462225,_0x123e31,_0x129adf={}){const _0x99e59b=a147_0x43d7;let _0x471177=_0x462225[_0x99e59b(0x146)];if(_0x471177&&!/^\d+$/['test'](_0x471177)){const _0x5776a4=parseSegmentRef(_0x471177);if(_0x5776a4[_0x99e59b(0x19f)]===_0x99e59b(0x177))_0x123e31?.[_0x99e59b(0xff)]&&(_0x471177=await _0x123e31[_0x99e59b(0xff)](_0x5776a4[_0x99e59b(0x15d)]));else{if(_0x5776a4['type']===_0x99e59b(0x157)&&_0x129adf[_0x5776a4[_0x99e59b(0x15d)]])_0x123e31?.[_0x99e59b(0x16f)]&&(_0x471177=await _0x123e31[_0x99e59b(0x16f)](_0x5776a4[_0x99e59b(0x15d)],_0x129adf[_0x5776a4[_0x99e59b(0x15d)]]));else _0x123e31?.[_0x99e59b(0xff)]&&(_0x471177=await _0x123e31['resolveSegmentId'](_0x5776a4[_0x99e59b(0x15d)]));}}const _0x128917={'name':_0x462225[_0x99e59b(0x15d)],'segmentId':_0x471177};_0x462225['description']&&(_0x128917[_0x99e59b(0x102)]=_0x462225[_0x99e59b(0x102)]);if(_0x462225[_0x99e59b(0x11a)]){const _0x4219bb=_0x462225['target']['journey'],_0x435ba5=_0x462225['target'][_0x99e59b(0x129)];let _0x4773c1=_0x462225['target'][_0x99e59b(0x156)];_0x123e31?.[_0x99e59b(0x16a)]&&!/^\d+$/['test'](_0x4773c1)&&(_0x4773c1=await _0x123e31[_0x99e59b(0x16a)](_0x4773c1));let _0x487f91=_0x462225[_0x99e59b(0x11a)]['stage'];_0x123e31?.['resolveStageId']&&!/^\d+$/[_0x99e59b(0x196)](_0x487f91)&&(_0x487f91=await _0x123e31[_0x99e59b(0xfb)](_0x4773c1,_0x487f91));const _0x3fa85b=!/^\d+$/[_0x99e59b(0x196)](_0x4219bb)&&!isLocalJourneyRef(_0x4219bb)?formatApiJourneyName(_0x4219bb,_0x435ba5):undefined;_0x128917['target']={'journeyId':_0x4773c1,'journeyStageId':_0x487f91,'journeyName':_0x3fa85b,'confirmed':!![]},_0x462225[_0x99e59b(0x11a)][_0x99e59b(0x155)]&&(_0x128917[_0x99e59b(0x11a)][_0x99e59b(0x14d)]=_0x462225['target'][_0x99e59b(0x155)]);}return _0x128917;}async function convertYamlStepToApi(_0x1d8b1b,_0x256a2d,_0x526553={},_0x3cc987={},_0x3fd032={}){const _0x3c3c46=a147_0x43d7,_0x4c0f25=async _0xeb9f82=>{const _0x751e07=a147_0x43d7;if(/^\d+$/['test'](_0xeb9f82))return _0xeb9f82;const _0x45727b=parseSegmentRef(_0xeb9f82);if(_0x45727b[_0x751e07(0x19f)]==='ref'){if(_0x256a2d?.[_0x751e07(0xff)])return await _0x256a2d[_0x751e07(0xff)](_0x45727b['name']);}else{if(_0x45727b['type']===_0x751e07(0x157)&&_0x526553[_0x45727b['name']]){if(_0x256a2d?.[_0x751e07(0x16f)])return await _0x256a2d[_0x751e07(0x16f)](_0x45727b[_0x751e07(0x15d)],_0x526553[_0x45727b[_0x751e07(0x15d)]]);}else{if(_0x256a2d?.[_0x751e07(0xff)])return await _0x256a2d[_0x751e07(0xff)](_0x45727b[_0x751e07(0x15d)]);}}return _0xeb9f82;},_0xc68427=async _0x4d168a=>{const _0x59b3f0=a147_0x43d7;if(/^\d+$/['test'](_0x4d168a))return _0x4d168a;const _0x273fab=parseSegmentRef(_0x4d168a);if(_0x273fab[_0x59b3f0(0x19f)]===_0x59b3f0(0x177)){if(_0x256a2d?.['resolveActivationId'])return await _0x256a2d[_0x59b3f0(0x130)](_0x273fab[_0x59b3f0(0x15d)]);return _0x273fab[_0x59b3f0(0x15d)];}else{if(_0x273fab[_0x59b3f0(0x19f)]===_0x59b3f0(0x157)&&_0x3fd032[_0x273fab['name']]){if(_0x256a2d?.['resolveEmbeddedActivationId'])return await _0x256a2d[_0x59b3f0(0x180)](_0x273fab[_0x59b3f0(0x15d)],_0x3fd032[_0x273fab['name']]);if(_0x256a2d?.[_0x59b3f0(0x130)])return await _0x256a2d['resolveActivationId'](_0x273fab['name']);}else{if(_0x256a2d?.[_0x59b3f0(0x130)])return await _0x256a2d['resolveActivationId'](_0x273fab['name']);}}return _0x4d168a;},_0x4ba639=_0x5938c8=>{const _0x3cbe64=a147_0x43d7;if(!_0x5938c8)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x3cbe64(0x196)](_0x5938c8))return _0x5938c8;return _0x3cc987[_0x5938c8]||_0x5938c8;};switch(_0x1d8b1b[_0x3c3c46(0x19f)]){case _0x3c3c46(0x167):{const _0x593689=_0x1d8b1b,_0x2044ac=_0x593689['with'],_0x503762={'type':'WaitStep','name':_0x593689[_0x3c3c46(0x15d)],'next':_0x4ba639(_0x593689[_0x3c3c46(0x11c)])};if(_0x2044ac[_0x3c3c46(0x13b)]!==undefined&&_0x2044ac[_0x3c3c46(0xf5)])_0x503762[_0x3c3c46(0x192)]=_0x3c3c46(0x10d),_0x503762[_0x3c3c46(0x19c)]=_0x2044ac[_0x3c3c46(0x13b)],_0x503762['waitStepUnit']=normalizeWaitUnit(_0x2044ac[_0x3c3c46(0xf5)]);else{if(_0x2044ac[_0x3c3c46(0x114)])_0x503762[_0x3c3c46(0x192)]=_0x3c3c46(0x178),_0x503762[_0x3c3c46(0x12e)]=_0x2044ac[_0x3c3c46(0x114)];else{if(_0x2044ac[_0x3c3c46(0x116)])_0x503762[_0x3c3c46(0x192)]=_0x3c3c46(0xf7),_0x503762[_0x3c3c46(0x165)]=_0x2044ac[_0x3c3c46(0x116)];else{if(_0x2044ac[_0x3c3c46(0x16b)]){_0x503762[_0x3c3c46(0x192)]=_0x3c3c46(0x19e);const _0x94807e=await _0x4c0f25(_0x2044ac[_0x3c3c46(0x16b)][_0x3c3c46(0x146)]),_0x26fa65=_0x2044ac[_0x3c3c46(0x16b)]['timeout']?.[_0x3c3c46(0x11c)]!==undefined;if(_0x26fa65){const _0x5971dd=[];_0x5971dd[_0x3c3c46(0x15e)]({'id':generateUUID(),'segmentId':_0x94807e,'timedOutPath':![],'name':_0x3c3c46(0x143),'next':_0x4ba639(_0x2044ac[_0x3c3c46(0x16b)][_0x3c3c46(0x11c)]??_0x593689[_0x3c3c46(0x11c)])});if(_0x2044ac[_0x3c3c46(0x16b)]['timeout']){const _0x1f1423=_0x2044ac[_0x3c3c46(0x16b)][_0x3c3c46(0x124)]['duration'],_0x49aa78=normalizeWaitUnit(_0x2044ac['condition'][_0x3c3c46(0x124)][_0x3c3c46(0xf5)]);_0x5971dd['push']({'id':generateUUID(),'timedOutPath':!![],'name':'*Max\x20wait\x20'+_0x1f1423+'\x20'+_0x49aa78,'moveAfter':_0x1f1423,'unit':_0x49aa78,'next':_0x4ba639(_0x2044ac['condition'][_0x3c3c46(0x124)][_0x3c3c46(0x11c)])});}_0x503762[_0x3c3c46(0xe6)]=_0x5971dd,delete _0x503762[_0x3c3c46(0x11c)];}else _0x503762[_0x3c3c46(0x182)]=_0x94807e,_0x2044ac[_0x3c3c46(0x16b)]['timeout']&&(_0x503762[_0x3c3c46(0x105)]=_0x2044ac[_0x3c3c46(0x16b)]['timeout'][_0x3c3c46(0x13b)],_0x2044ac['condition']['timeout'][_0x3c3c46(0xf5)]&&(_0x503762[_0x3c3c46(0x142)]=normalizeWaitUnit(_0x2044ac[_0x3c3c46(0x16b)][_0x3c3c46(0x124)]['unit'])));}}}}return _0x503762;}case _0x3c3c46(0x113):{const _0x3f07d1=_0x1d8b1b,_0x494ded=_0x3f07d1['with'][_0x3c3c46(0x113)],_0x4b0ed5=await _0xc68427(_0x494ded);return{'type':'Activation','name':_0x3f07d1['name'],'journeyActivationStepId':_0x4b0ed5,'next':_0x4ba639(_0x3f07d1[_0x3c3c46(0x11c)])};}case'decision_point':{const _0xf2c320=_0x1d8b1b,_0x677b1b=_0xf2c320['with'][_0x3c3c46(0xe3)];return{'type':'DecisionPoint','name':_0xf2c320[_0x3c3c46(0x15d)],'branches':await Promise[_0x3c3c46(0xf9)](_0x677b1b[_0x3c3c46(0xeb)](async _0x369b2c=>{const _0x147958=_0x3c3c46;let _0x445319='';if(!_0x369b2c[_0x147958(0x10c)]){const _0x40042a=_0x369b2c['segment']||_0x369b2c['segment_id']||'';_0x445319=_0x40042a?await _0x4c0f25(_0x40042a):'';}return{'id':crypto[_0x147958(0x16c)](),'name':_0x369b2c[_0x147958(0x15d)],'description':null,'segmentId':_0x445319,'excludedPath':_0x369b2c['excluded']??![],'next':_0x4ba639(_0x369b2c[_0x147958(0x11c)])};})),'next':_0x4ba639(_0xf2c320[_0x3c3c46(0x11c)])};}case'ab_test':{const _0x32bda1=_0x1d8b1b,_0x2dc89e=_0x32bda1[_0x3c3c46(0x186)];return{'type':_0x3c3c46(0xe8),'name':_0x32bda1[_0x3c3c46(0x15d)],'customizedSplit':_0x2dc89e[_0x3c3c46(0x163)],'uniqueId':_0x2dc89e[_0x3c3c46(0x118)],'variants':_0x2dc89e[_0x3c3c46(0x131)][_0x3c3c46(0xeb)](_0x2cd1b4=>({'id':_0x2cd1b4['id']||generateUUID(),'name':_0x2cd1b4[_0x3c3c46(0x15d)],'percentage':_0x2cd1b4['percentage'],'next':_0x4ba639(_0x2cd1b4[_0x3c3c46(0x11c)])})),'next':_0x4ba639(_0x32bda1[_0x3c3c46(0x11c)])};}case _0x3c3c46(0xef):return{'type':'Merge','name':_0x1d8b1b['name'],'next':_0x4ba639(_0x1d8b1b[_0x3c3c46(0x11c)])};case _0x3c3c46(0x151):{const _0x5d4df4=_0x1d8b1b,_0x585773=_0x5d4df4[_0x3c3c46(0x186)][_0x3c3c46(0x11a)],_0x4c9739=_0x585773[_0x3c3c46(0x156)],_0x5a7a87=_0x585773[_0x3c3c46(0x129)];let _0x38c435=_0x585773[_0x3c3c46(0x156)];_0x256a2d?.['resolveJourneyId']&&!/^\d+$/[_0x3c3c46(0x196)](_0x38c435)&&(_0x38c435=await _0x256a2d[_0x3c3c46(0x16a)](_0x38c435));let _0x233eb9=_0x585773['stage'];_0x256a2d?.['resolveStageId']&&!/^\d+$/[_0x3c3c46(0x196)](_0x233eb9)&&(_0x233eb9=await _0x256a2d['resolveStageId'](_0x38c435,_0x233eb9));const _0x3c10a9=!/^\d+$/['test'](_0x4c9739)&&!isLocalJourneyRef(_0x4c9739)?formatApiJourneyName(_0x4c9739,_0x5a7a87):undefined;return{'type':'Jump','name':_0x5d4df4[_0x3c3c46(0x15d)],'target':{'journeyId':_0x38c435,'journeyStageId':_0x233eb9,'journeyBundleId':_0x585773['bundle_id'],'journeyName':_0x3c10a9,'confirmed':!![]},'next':_0x4ba639(_0x5d4df4[_0x3c3c46(0x11c)])};}case _0x3c3c46(0x135):return{'type':_0x3c3c46(0x175),'name':_0x1d8b1b[_0x3c3c46(0x15d)]};default:{const _0x1c7d47=_0x1d8b1b;return{'type':'End','name':_0x1c7d47[_0x3c3c46(0x15d)]};}}}export function toYamlString(_0x1da14e){const _0x26a219=a147_0x43d7,_0x3e8657=stripInternalFields(_0x1da14e),_0x1ec3bf=a147_0x252908[_0x26a219(0x10a)](_0x3e8657,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x5f0509=['segments:','activations:',_0x26a219(0x15b),_0x26a219(0x141),_0x26a219(0x138),_0x26a219(0x123),_0x26a219(0x119)];let _0x3839d5=_0x1ec3bf;for(const _0x48c71e of _0x5f0509){_0x3839d5=_0x3839d5[_0x26a219(0x17a)](new RegExp('^('+_0x48c71e+')','m'),(_0x10566d,_0xfa3b6c,_0x164b45)=>{if(_0x164b45===0x0||_0x3839d5[_0x164b45-0x1]==='\x0a'&&_0x3839d5[_0x164b45-0x2]==='\x0a')return _0xfa3b6c;return'\x0a'+_0xfa3b6c;});}return _0x3839d5;}function stripInternalFields(_0x3d6084){const _0x30478b=a147_0x43d7,{id:_0x58164a,folder_id:_0x90aa5e,bundle_id:_0x8463c4,bundle_name:_0x40c41a,version:_0x4f70cd,allow_reentry:_0x2db585,..._0x3188a1}=_0x3d6084;return _0x3188a1['journeys']&&(_0x3188a1[_0x30478b(0x162)]=_0x3188a1['journeys']['map'](_0x56cc61=>{const _0x59cc00=_0x30478b,{id:_0x120977,..._0xa30621}=_0x56cc61;return{..._0xa30621,'stages':_0xa30621[_0x59cc00(0xec)][_0x59cc00(0xeb)](stripStageInternalFields),..._0x56cc61[_0x59cc00(0xfe)]===!![]?{'latest':!![]}:{},..._0x3188a1['journeys'][_0x59cc00(0x104)]===0x1&&_0xa30621[_0x59cc00(0x147)]==='v1'?{'version':undefined}:{}};})),_0x3188a1['stages']&&(_0x3188a1[_0x30478b(0xec)]=_0x3188a1[_0x30478b(0xec)][_0x30478b(0xeb)](stripStageInternalFields)),_0x3188a1[_0x30478b(0x12c)]&&(_0x3188a1['versions']=_0x3188a1[_0x30478b(0x12c)]['map'](_0x5b89d5=>{const _0x153237=_0x30478b,{id:_0x4fed48,..._0x4d0647}=_0x5b89d5;return{..._0x4d0647,'stages':_0x4d0647[_0x153237(0xec)][_0x153237(0xeb)](stripStageInternalFields),..._0x5b89d5[_0x153237(0xfe)]===!![]?{'latest':!![]}:{}};})),_0x3188a1;}function stripStageInternalFields(_0x572d67){const {id:_0x2e140a,..._0x2b387e}=_0x572d67;return _0x2b387e;}export function parseYamlString(_0x2540c5){return safeParseYaml(_0x2540c5,JourneyDefSchema);}export function isJourneyDef(_0x265936){const _0x5d4221=a147_0x43d7;return typeof _0x265936===_0x5d4221(0x14e)&&_0x265936!==null&&_0x5d4221(0x19f)in _0x265936&&_0x265936[_0x5d4221(0x19f)]===_0x5d4221(0x156);}export function generateTemplate(_0x4330cc,_0x1f8fe6){const _0x4ec9e3=a147_0x43d7,_0x3fd6b7={'type':'journey','name':_0x4330cc,'description':_0x4ec9e3(0xe4),'reentry':_0x4ec9e3(0x154),'goal':{'name':_0x4ec9e3(0xe2),'segment':_0x4ec9e3(0x13a)},'stages':[{'name':_0x4ec9e3(0x18a),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':'Entry\x20Criteria','segment':_0x1f8fe6},'steps':[{'type':_0x4ec9e3(0x167),'name':'Wait\x201\x20Day','with':{'duration':0x1,'unit':_0x4ec9e3(0x109)}},{'type':_0x4ec9e3(0x113),'name':_0x4ec9e3(0x183),'with':{'activation':_0x4ec9e3(0x14b)}},{'type':_0x4ec9e3(0x135),'name':_0x4ec9e3(0x187)}]}]};return toYamlString(_0x3fd6b7);}function generateUUID(){const _0x173394=a147_0x43d7;return crypto[_0x173394(0x16c)]();}export const SEGMENT_REF_PREFIX=a147_0x39f191(0x13f);export function parseSegmentRef(_0x58ca57){const _0x4cdd6a=a147_0x39f191;if(_0x58ca57[_0x4cdd6a(0x134)](SEGMENT_REF_PREFIX))return{'type':_0x4cdd6a(0x177),'name':_0x58ca57[_0x4cdd6a(0xf3)](SEGMENT_REF_PREFIX[_0x4cdd6a(0x104)])};if(/^\d+$/[_0x4cdd6a(0x196)](_0x58ca57))return{'type':'id','name':_0x58ca57};return{'type':'embedded','name':_0x58ca57};}export function makeSegmentRef(_0x5261c8){return''+SEGMENT_REF_PREFIX+_0x5261c8;}export function isExternalSegmentRef(_0xadb818){const _0x2f815c=a147_0x39f191;return _0xadb818[_0x2f815c(0x134)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x4aa456){const _0xb0bdfb=a147_0x39f191;return!!(_0x4aa456[_0xb0bdfb(0x162)]&&_0x4aa456[_0xb0bdfb(0x162)]['length']>0x0);}export function isMultiVersionMode(_0x4900fe){const _0x3e7ecf=a147_0x39f191;return!!(_0x4900fe[_0x3e7ecf(0x12c)]&&_0x4900fe['versions'][_0x3e7ecf(0x104)]>0x0);}export function isSingleVersionMode(_0x563fce){const _0x14ea5e=a147_0x39f191;return!!(_0x563fce[_0x14ea5e(0xec)]&&_0x563fce[_0x14ea5e(0xec)][_0x14ea5e(0x104)]>0x0);}function a147_0xd8f8(){const _0x411ab9=['rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','daysOfWeek','folder_id','wait','journeyStages','draft','resolveJourneyId','condition','randomUUID','rootStep','reentry_always','resolveEmbeddedSegmentId','journeyId','activations','7576855ApHLpK','3878367cTbJFE','journeyBundleName','End','resolveSegmentName','ref','Date','uuid','replace','journeyStageId','customizedSplit','columns','resolveActivationName','entries','resolveEmbeddedActivationId','decision_point','conditionSegmentId','Send\x20Notification','connector_config','filter','with','Stage\x20Complete','size','data','Stage\x201','\x20\x20\x20\x20conditions:\x0a','stageId','trim','exitCriterias','set','3677220QLMLuF','milestone','waitStepType','resolveActivation','get','reentry','test','launched','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','sort','5718587yypGPe','state','waitStep','\x20\x20\x20\x20type:\x20','Condition','type','relationships','moveAfter','Variant','Goal\x20Achieved','branches','Journey\x20description','week','conditions','version_number','ABTest','(missing)','toLowerCase','map','stages','isJourneyLocal','timedOutPath','merge','root_step','activation_template_id','1sSCGVK','slice','behavior','unit','resolveJumpTarget','DaysOfTheWeek','reentryMode','all','attributes','resolveStageId','steps','versionNumber','latest','resolveSegmentId','Unknown\x20segment\x20\x22','resolveSegment','description','includes','length','conditionTimeoutDuration','segmentId','notification','shift','day','stringify','228636YMWqog','excluded','Duration','entryCriteria','\x20\x20\x20\x20type:\x20And\x0a','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','DecisionPoint','has','activation','wait_until','waitCondition','days_of_week','from','unique_id','versions:','target','Jump','next','1360002QHRsqe','entry_criteria','isArray','\x27.\x0a','ab_test','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','stages:','timeout','40904SJruKh','segments','\x20\x20rule:\x0a','weeks','stage','\x27:\x20','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','versions','days','waitUntilDate','stageName','resolveActivationId','variants','journeyActivationStepId','parentFolder','startsWith','end','schedule','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','journeys:','Merge','goal-segment','duration','values','allowReentry','1962HTiOqc','ref:','add','reentry:','conditionTimeoutUnit','Met\x20condition(s)','goal','percentage','segment','version','WaitStep','all_columns','exit_criteria','your-activation-name','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','journeyBundleId','object','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','connection','jump','find','JOURNEY_SYNTAX_ERROR','no_reentry','bundle_id','journey','embedded','keys','AbTest','definition','goal:','journeyName','name','push','rule','Expected\x20format:\x0a','exitCriteria','journeys','customized_split'];a147_0xd8f8=function(){return _0x411ab9;};return a147_0xd8f8();}export function hasMultipleVersions(_0x398e45){const _0x240d87=a147_0x39f191;if(isJourneysArrayMode(_0x398e45))return(_0x398e45['journeys']?.[_0x240d87(0x104)]||0x0)>0x1;if(isMultiVersionMode(_0x398e45))return(_0x398e45[_0x240d87(0x12c)]?.[_0x240d87(0x104)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x1669d1){const _0xd8a509=a147_0x39f191;if(isJourneysArrayMode(_0x1669d1))return _0x1669d1;if(isSingleVersionMode(_0x1669d1)){const {stages:_0x26f09e,id:_0x52d511,version:_0x1087d4,version_number:_0x322167,..._0xf824e0}=_0x1669d1;return{..._0xf824e0,'journeys':[{'version':_0x1087d4||'v1','stages':_0x26f09e||[],'id':_0x52d511,'version_number':_0x322167}]};}if(isMultiVersionMode(_0x1669d1)){const {versions:_0x45bbad,..._0x123f41}=_0x1669d1;return{..._0x123f41,'journeys':(_0x45bbad||[])[_0xd8a509(0xeb)](_0x46ee15=>({'version':_0x46ee15[_0xd8a509(0x15d)],'state':_0x46ee15[_0xd8a509(0x19b)],'latest':_0x46ee15[_0xd8a509(0xfe)],'stages':_0x46ee15[_0xd8a509(0xec)],'id':_0x46ee15['id'],'version_number':_0x46ee15[_0xd8a509(0xe7)]}))};}return _0x1669d1;}export function normalizeJourneyDef(_0x125f1f,_0x194c8d){const _0xce172d=a147_0x39f191,_0x1fb6eb=normalizeToJourneysFormat(_0x125f1f),_0xd30cfd=_0x194c8d?.[_0xce172d(0x126)]?Object[_0xce172d(0x158)](_0x194c8d[_0xce172d(0x126)]):undefined,_0x4872dc=_0x194c8d?.['activations']?Object[_0xce172d(0x158)](_0x194c8d['activations']):undefined;return{'type':_0xce172d(0x156),'name':_0x1fb6eb[_0xce172d(0x15d)],..._0x1fb6eb['description']!==undefined&&{'description':_0x1fb6eb['description']},..._0x1fb6eb[_0xce172d(0x144)]&&{'goal':normalizeJourneyCriteria(_0x1fb6eb[_0xce172d(0x144)])},..._0x1fb6eb[_0xce172d(0x195)]!==undefined&&{'reentry':_0x1fb6eb['reentry']},..._0x1fb6eb[_0xce172d(0x126)]&&{'segments':normalizeEmbeddedSegments(_0x1fb6eb[_0xce172d(0x126)],_0xd30cfd)},..._0x1fb6eb[_0xce172d(0x171)]&&{'activations':normalizeEmbeddedActivations(_0x1fb6eb[_0xce172d(0x171)],_0x4872dc)},..._0x1fb6eb[_0xce172d(0x162)]&&{'journeys':_0x1fb6eb['journeys'][_0xce172d(0xeb)](_0x9ff2e2=>normalizeJourneyEntry(_0x9ff2e2,_0x1fb6eb['journeys'][_0xce172d(0x104)]===0x1))}};}function normalizeJourneyEntry(_0x276a0f,_0x1840c6){const _0x5a50c3=a147_0x39f191;return{...!_0x1840c6&&_0x276a0f[_0x5a50c3(0x147)]!==undefined&&{'version':_0x276a0f[_0x5a50c3(0x147)]},..._0x276a0f[_0x5a50c3(0x19b)]!==undefined&&{'state':_0x276a0f['state']},...!_0x1840c6&&_0x276a0f['latest']!==undefined&&{'latest':_0x276a0f[_0x5a50c3(0xfe)]},..._0x276a0f[_0x5a50c3(0xe7)]!==undefined&&{'version_number':_0x276a0f[_0x5a50c3(0xe7)]},..._0x276a0f['goal']&&{'goal':normalizeJourneyCriteria(_0x276a0f[_0x5a50c3(0x144)])},..._0x276a0f[_0x5a50c3(0x195)]!==undefined&&{'reentry':_0x276a0f[_0x5a50c3(0x195)]},'stages':_0x276a0f[_0x5a50c3(0xec)][_0x5a50c3(0xeb)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x551321){const _0x26389c=a147_0x39f191;return{'name':_0x551321[_0x26389c(0x15d)],..._0x551321[_0x26389c(0x102)]!==undefined&&{'description':_0x551321[_0x26389c(0x102)]},..._0x551321[_0x26389c(0x11e)]&&{'entry_criteria':normalizeJourneyCriteria(_0x551321['entry_criteria'])},..._0x551321[_0x26389c(0x14a)]&&{'exit_criteria':_0x551321[_0x26389c(0x14a)][_0x26389c(0xeb)](normalizeJourneyCriteria)},..._0x551321[_0x26389c(0x191)]&&{'milestone':normalizeJourneyCriteria(_0x551321['milestone'])},..._0x551321[_0x26389c(0xfc)]&&{'steps':normalizeStepsWithImplicitNext(_0x551321['steps'])}};}function normalizeStepsWithImplicitNext(_0x26cbb3){return _0x26cbb3['map']((_0x9312a5,_0x4bf198)=>{const _0x2a9f9e=a147_0x43d7,_0x149c9c=_0x4bf198<_0x26cbb3[_0x2a9f9e(0x104)]-0x1?_0x26cbb3[_0x4bf198+0x1][_0x2a9f9e(0x15d)]:undefined;return normalizeJourneyStep(_0x9312a5,_0x149c9c);});}function normalizeJourneyCriteria(_0x565296){const _0x507063=a147_0x39f191;return{'name':_0x565296[_0x507063(0x15d)],..._0x565296[_0x507063(0x102)]!==undefined&&{'description':_0x565296[_0x507063(0x102)]},'segment':_0x565296[_0x507063(0x146)],..._0x565296[_0x507063(0x11a)]&&{'target':normalizeJumpTarget(_0x565296[_0x507063(0x11a)])}};}function normalizeJourneyStep(_0x2f5b9a,_0x3dedfc){const _0x15dea8=a147_0x39f191,_0x48ad31=_0x2f5b9a[_0x15dea8(0x11c)]!==undefined&&_0x2f5b9a['next']!==_0x3dedfc,_0x585c2c={'type':_0x2f5b9a[_0x15dea8(0x19f)],'name':_0x2f5b9a[_0x15dea8(0x15d)],..._0x48ad31&&{'next':_0x2f5b9a['next']}};if('with'in _0x2f5b9a&&_0x2f5b9a[_0x15dea8(0x186)])return{..._0x585c2c,'with':normalizeStepParams(_0x2f5b9a[_0x15dea8(0x19f)],_0x2f5b9a[_0x15dea8(0x186)])};return _0x585c2c;}function normalizeStepParams(_0x4de32a,_0x2d7dcd){const _0x388583=a147_0x39f191;switch(_0x4de32a){case _0x388583(0x167):{const _0x2e8930=_0x2d7dcd;let _0x1d9383;return _0x2e8930[_0x388583(0x16b)]&&(_0x1d9383={'segment':_0x2e8930[_0x388583(0x16b)][_0x388583(0x146)],..._0x2e8930[_0x388583(0x16b)][_0x388583(0x11c)]!==undefined&&{'next':_0x2e8930[_0x388583(0x16b)][_0x388583(0x11c)]},..._0x2e8930[_0x388583(0x16b)]['timeout']&&{'timeout':{'duration':_0x2e8930[_0x388583(0x16b)][_0x388583(0x124)][_0x388583(0x13b)],'unit':_0x2e8930['condition'][_0x388583(0x124)][_0x388583(0xf5)],..._0x2e8930[_0x388583(0x16b)][_0x388583(0x124)][_0x388583(0x11c)]!==undefined&&{'next':_0x2e8930[_0x388583(0x16b)]['timeout'][_0x388583(0x11c)]}}}}),{..._0x2e8930['duration']!==undefined&&{'duration':_0x2e8930['duration']},..._0x2e8930[_0x388583(0xf5)]!==undefined&&{'unit':_0x2e8930[_0x388583(0xf5)]},..._0x2e8930[_0x388583(0x114)]!==undefined&&{'wait_until':_0x2e8930[_0x388583(0x114)]},..._0x2e8930[_0x388583(0x116)]!==undefined&&{'days_of_week':_0x2e8930[_0x388583(0x116)]},..._0x1d9383&&{'condition':_0x1d9383}};}case _0x388583(0x113):{const _0x3a57ec=_0x2d7dcd;return{'activation':_0x3a57ec[_0x388583(0x113)]};}case _0x388583(0x181):{const _0x73a116=_0x2d7dcd;return{'branches':_0x73a116['branches'][_0x388583(0xeb)](normalizeDecisionBranch)};}case'ab_test':{const _0x583491=_0x2d7dcd;return{..._0x583491[_0x388583(0x163)]!==undefined&&{'customized_split':_0x583491['customized_split']},..._0x583491[_0x388583(0x118)]!==undefined&&{'unique_id':_0x583491['unique_id']},'variants':_0x583491['variants'][_0x388583(0xeb)](normalizeAbTestVariant)};}case _0x388583(0x151):{const _0x1d0f5a=_0x2d7dcd;return{'target':normalizeJumpTarget(_0x1d0f5a[_0x388583(0x11a)])};}default:return _0x2d7dcd;}}function normalizeDecisionBranch(_0x28831d){const _0x423a04=a147_0x39f191;return{'name':_0x28831d['name'],..._0x28831d['segment']!==undefined&&{'segment':_0x28831d[_0x423a04(0x146)]},..._0x28831d['excluded']!==undefined&&{'excluded':_0x28831d[_0x423a04(0x10c)]},..._0x28831d[_0x423a04(0x11c)]!==undefined&&{'next':_0x28831d[_0x423a04(0x11c)]}};}function normalizeAbTestVariant(_0x48c858){const _0x3da2ad=a147_0x39f191;return{..._0x48c858['id']!==undefined&&{'id':_0x48c858['id']},'name':_0x48c858[_0x3da2ad(0x15d)],'percentage':_0x48c858[_0x3da2ad(0x145)],..._0x48c858[_0x3da2ad(0x11c)]!==undefined&&{'next':_0x48c858[_0x3da2ad(0x11c)]}};}function normalizeJumpTarget(_0x5cc8b4){const _0xc52a22=a147_0x39f191;return{'journey':_0x5cc8b4[_0xc52a22(0x156)],'stage':_0x5cc8b4[_0xc52a22(0x129)],..._0x5cc8b4['bundle_id']!==undefined&&{'bundle_id':_0x5cc8b4['bundle_id']}};}function normalizeEmbeddedSegments(_0xdd2cc9,_0x5cc579){const _0x50e1a8=a147_0x39f191,_0x52fe0b={},_0x58543d=Object[_0x50e1a8(0x158)](_0xdd2cc9),_0x448bea=_0x5cc579?[..._0x5cc579[_0x50e1a8(0x185)](_0x4618d4=>_0x58543d[_0x50e1a8(0x103)](_0x4618d4)),..._0x58543d['filter'](_0xcd1710=>!_0x5cc579['includes'](_0xcd1710))[_0x50e1a8(0x199)]()]:_0x58543d[_0x50e1a8(0x199)]();for(const _0x4b641f of _0x448bea){const _0x5f0c4e=_0xdd2cc9[_0x4b641f];if(_0x5f0c4e['rule']){const _0x4262b3=_0x5f0c4e['rule'];if(_0x4262b3[_0x50e1a8(0x19f)]!=='And'&&_0x4262b3[_0x50e1a8(0x19f)]!=='Or'){const _0xc08313=_0x4262b3[_0x50e1a8(0x19f)]??_0x50e1a8(0xe9);throw new SDKError(ErrorCode[_0x50e1a8(0x153)],_0x50e1a8(0x14c)+_0x4b641f+_0x50e1a8(0x12a)+(_0x50e1a8(0x137)+_0xc08313+_0x50e1a8(0x120))+_0x50e1a8(0x160)+_0x50e1a8(0x127)+_0x50e1a8(0x10f)+_0x50e1a8(0x18b)+_0x50e1a8(0x122)+_0x50e1a8(0x110)+_0x50e1a8(0x12b));}if(!_0x4262b3[_0x50e1a8(0xe6)]||!Array[_0x50e1a8(0x11f)](_0x4262b3[_0x50e1a8(0xe6)]))throw new SDKError(ErrorCode[_0x50e1a8(0x153)],'Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27'+_0x4b641f+'\x27:\x20'+_0x50e1a8(0x164)+'Expected\x20format:\x0a'+_0x50e1a8(0x127)+(_0x50e1a8(0x19d)+_0x4262b3['type']+'\x0a')+'\x20\x20\x20\x20conditions:\x0a'+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x50e1a8(0x110)+_0x50e1a8(0x12b));}_0x52fe0b[_0x4b641f]={..._0x5f0c4e[_0x50e1a8(0x102)]&&_0x5f0c4e[_0x50e1a8(0x102)][_0x50e1a8(0x18d)]()&&{'description':_0x5f0c4e[_0x50e1a8(0x102)]},..._0x5f0c4e[_0x50e1a8(0x15f)]&&{'rule':deepSortObject(_0x5f0c4e['rule'])}};}return _0x52fe0b;}function normalizeEmbeddedActivations(_0x5eaea3,_0x227b58){const _0x3210fd=a147_0x39f191,_0xbe06c={},_0x38ba05=Object[_0x3210fd(0x158)](_0x5eaea3),_0x45268d=_0x227b58?[..._0x227b58['filter'](_0x509fd5=>_0x38ba05[_0x3210fd(0x103)](_0x509fd5)),..._0x38ba05[_0x3210fd(0x185)](_0x315336=>!_0x227b58[_0x3210fd(0x103)](_0x315336))['sort']()]:_0x38ba05[_0x3210fd(0x199)]();for(const _0x26a6bd of _0x45268d){const _0x14ccf5=_0x5eaea3[_0x26a6bd];_0xbe06c[_0x26a6bd]={'name':_0x14ccf5[_0x3210fd(0x15d)],'connection':_0x14ccf5[_0x3210fd(0x150)],..._0x14ccf5[_0x3210fd(0x102)]!==undefined&&{'description':_0x14ccf5['description']},..._0x14ccf5[_0x3210fd(0x149)]!==undefined&&{'all_columns':_0x14ccf5[_0x3210fd(0x149)]},..._0x14ccf5[_0x3210fd(0x17d)]!==undefined&&{'columns':_0x14ccf5[_0x3210fd(0x17d)]},..._0x14ccf5['behavior']!==undefined&&{'behavior':_0x14ccf5[_0x3210fd(0xf4)]},..._0x14ccf5[_0x3210fd(0x136)]!==undefined&&{'schedule':_0x14ccf5[_0x3210fd(0x136)]},..._0x14ccf5[_0x3210fd(0x107)]!==undefined&&{'notification':_0x14ccf5[_0x3210fd(0x107)]},..._0x14ccf5[_0x3210fd(0x184)]!==undefined&&{'connector_config':_0x14ccf5[_0x3210fd(0x184)]},..._0x14ccf5['activation_template_id']!==undefined&&{'activation_template_id':_0x14ccf5[_0x3210fd(0xf1)]}};}return _0xbe06c;}export function getActiveStages(_0x3a934d){const _0x4c878c=a147_0x39f191;if(isJourneysArrayMode(_0x3a934d)){const _0x55018d=_0x3a934d[_0x4c878c(0x162)]||[],_0x3caea8=_0x55018d[_0x4c878c(0x152)](_0x259cdd=>_0x259cdd[_0x4c878c(0xfe)]===!![])||_0x55018d[0x0];return _0x3caea8?.[_0x4c878c(0xec)]||[];}if(isSingleVersionMode(_0x3a934d))return _0x3a934d[_0x4c878c(0xec)]||[];if(isMultiVersionMode(_0x3a934d)){const _0x1b2fec=_0x3a934d[_0x4c878c(0x12c)]||[],_0x26de59=_0x1b2fec[_0x4c878c(0x152)](_0x43a1c6=>_0x43a1c6[_0x4c878c(0xfe)]===!![])||_0x1b2fec[0x0];return _0x26de59?.['stages']||[];}return[];}export function getLatestJourneyEntry(_0xea406b){const _0x3cf886=a147_0x39f191;if(isJourneysArrayMode(_0xea406b)){const _0x5793f3=_0xea406b[_0x3cf886(0x162)]||[];return _0x5793f3[_0x3cf886(0x152)](_0x14f902=>_0x14f902['latest']===!![])||_0x5793f3[0x0];}if(isMultiVersionMode(_0xea406b)){const _0x2e14e7=_0xea406b[_0x3cf886(0x12c)]||[],_0x173a45=_0x2e14e7[_0x3cf886(0x152)](_0x53988b=>_0x53988b[_0x3cf886(0xfe)]===!![])||_0x2e14e7[0x0];if(_0x173a45)return{'version':_0x173a45[_0x3cf886(0x15d)],'state':_0x173a45['state'],'latest':_0x173a45['latest'],'stages':_0x173a45[_0x3cf886(0xec)],'id':_0x173a45['id'],'version_number':_0x173a45['version_number']};}if(isSingleVersionMode(_0xea406b))return{'version':_0xea406b['version']||'v1','state':_0x3cf886(0x169),'stages':_0xea406b[_0x3cf886(0xec)]||[],'id':_0xea406b['id'],'version_number':_0xea406b[_0x3cf886(0xe7)],'goal':_0xea406b[_0x3cf886(0x144)],'reentry':_0xea406b[_0x3cf886(0x195)]};return undefined;}export function getLatestVersion(_0x5950ec){const _0x9b5366=a147_0x39f191;if(!isMultiVersionMode(_0x5950ec))return undefined;const _0x2f5328=_0x5950ec[_0x9b5366(0x12c)]||[];return _0x2f5328[_0x9b5366(0x152)](_0x349cec=>_0x349cec[_0x9b5366(0xfe)]===!![])||_0x2f5328[0x0];}export function getEffectiveGoal(_0x1b0b93){const _0x30a440=a147_0x39f191,_0x5befe5=getLatestJourneyEntry(_0x1b0b93);return _0x5befe5?.['goal']||_0x1b0b93[_0x30a440(0x144)];}export function getEffectiveReentry(_0x438781){const _0x4c5fe3=a147_0x39f191,_0x3d48a6=getLatestJourneyEntry(_0x438781);return _0x3d48a6?.['reentry']||_0x438781[_0x4c5fe3(0x195)];}export function collectSegmentRefs(_0xcd34c0){const _0x14f721=a147_0x39f191,_0x13cfb0=new Set();_0xcd34c0[_0x14f721(0x144)]?.['segment']&&_0x13cfb0[_0x14f721(0x140)](_0xcd34c0['goal'][_0x14f721(0x146)]);const _0x1a5063=_0x31db14=>{const _0x40372a=_0x14f721;for(const _0x2d8445 of _0x31db14){_0x2d8445['entry_criteria']?.[_0x40372a(0x146)]&&_0x13cfb0[_0x40372a(0x140)](_0x2d8445[_0x40372a(0x11e)][_0x40372a(0x146)]);if(_0x2d8445[_0x40372a(0x14a)])for(const _0x151dd7 of _0x2d8445['exit_criteria']){_0x151dd7[_0x40372a(0x146)]&&_0x13cfb0[_0x40372a(0x140)](_0x151dd7[_0x40372a(0x146)]);}_0x2d8445[_0x40372a(0x191)]?.['segment']&&_0x13cfb0[_0x40372a(0x140)](_0x2d8445['milestone']['segment']);if(_0x2d8445[_0x40372a(0xfc)])for(const _0x5505f4 of _0x2d8445[_0x40372a(0xfc)]){if(_0x5505f4[_0x40372a(0x19f)]===_0x40372a(0x181)){const _0x2331df=_0x5505f4;for(const _0x10feda of _0x2331df[_0x40372a(0x186)][_0x40372a(0xe3)]){_0x10feda['segment']&&_0x13cfb0['add'](_0x10feda[_0x40372a(0x146)]);}}else{if(_0x5505f4[_0x40372a(0x19f)]===_0x40372a(0x167)){const _0x52b6eb=_0x5505f4;_0x52b6eb[_0x40372a(0x186)][_0x40372a(0x16b)]?.[_0x40372a(0x146)]&&_0x13cfb0[_0x40372a(0x140)](_0x52b6eb['with'][_0x40372a(0x16b)][_0x40372a(0x146)]);}}}}};_0xcd34c0['stages']&&_0x1a5063(_0xcd34c0[_0x14f721(0xec)]);if(_0xcd34c0[_0x14f721(0x12c)])for(const _0x1f4c3b of _0xcd34c0[_0x14f721(0x12c)]){_0x1a5063(_0x1f4c3b[_0x14f721(0xec)]);}return _0x13cfb0;}export function validateSegmentRefs(_0x5b62a2){const _0x2a7696=a147_0x39f191,_0x2b0d4a=[],_0x3e3558=collectSegmentRefs(_0x5b62a2),_0xf71eb9=new Set(Object[_0x2a7696(0x158)](_0x5b62a2['segments']||{}));for(const _0x4882f7 of _0x3e3558){const _0x5e0a02=parseSegmentRef(_0x4882f7);_0x5e0a02['type']===_0x2a7696(0x157)&&!_0xf71eb9[_0x2a7696(0x112)](_0x5e0a02[_0x2a7696(0x15d)])&&_0x2b0d4a[_0x2a7696(0x15e)](_0x2a7696(0x100)+_0x5e0a02[_0x2a7696(0x15d)]+_0x2a7696(0x14f)+_0x5e0a02[_0x2a7696(0x15d)]+_0x2a7696(0x198));}return _0x2b0d4a;}export function collectSegmentIdsFromJourneyApi(_0x2d5e37){const _0x3717d3=a147_0x39f191,_0x5502d2=new Set();_0x2d5e37[_0x3717d3(0xfa)][_0x3717d3(0x144)]?.[_0x3717d3(0x106)]&&_0x5502d2[_0x3717d3(0x140)](_0x2d5e37[_0x3717d3(0xfa)][_0x3717d3(0x144)][_0x3717d3(0x106)]);const _0x2c9fd4=_0x2d5e37[_0x3717d3(0xfa)][_0x3717d3(0x168)];if(Array['isArray'](_0x2c9fd4))for(const _0xe1ac61 of _0x2c9fd4){_0xe1ac61[_0x3717d3(0x10e)]?.[_0x3717d3(0x106)]&&_0x5502d2[_0x3717d3(0x140)](_0xe1ac61['entryCriteria'][_0x3717d3(0x106)]);const _0x17fdf9=_0xe1ac61['exitCriterias']??_0xe1ac61[_0x3717d3(0x161)];if(Array[_0x3717d3(0x11f)](_0x17fdf9))for(const _0x33896b of _0x17fdf9){_0x33896b['segmentId']&&_0x5502d2['add'](_0x33896b[_0x3717d3(0x106)]);}_0xe1ac61[_0x3717d3(0x191)]?.[_0x3717d3(0x106)]&&_0x5502d2[_0x3717d3(0x140)](_0xe1ac61[_0x3717d3(0x191)][_0x3717d3(0x106)]);if(_0xe1ac61[_0x3717d3(0xfc)]&&typeof _0xe1ac61[_0x3717d3(0xfc)]===_0x3717d3(0x14e)){const _0x4b0abe=Array['isArray'](_0xe1ac61[_0x3717d3(0xfc)])?_0xe1ac61[_0x3717d3(0xfc)]:Object[_0x3717d3(0x13c)](_0xe1ac61[_0x3717d3(0xfc)]);for(const _0x42362d of _0x4b0abe){_0x42362d[_0x3717d3(0x115)]?.['segmentId']&&_0x5502d2['add'](_0x42362d['waitCondition'][_0x3717d3(0x106)]);const _0x258853=_0x42362d;_0x258853['conditionSegmentId']&&_0x5502d2[_0x3717d3(0x140)](_0x258853[_0x3717d3(0x182)]);if(Array[_0x3717d3(0x11f)](_0x258853[_0x3717d3(0xe6)]))for(const _0x5bb58e of _0x258853[_0x3717d3(0xe6)]){_0x5bb58e[_0x3717d3(0x106)]&&_0x5502d2[_0x3717d3(0x140)](_0x5bb58e[_0x3717d3(0x106)]);}if(Array['isArray'](_0x42362d['branches']))for(const _0x1834a7 of _0x42362d[_0x3717d3(0xe3)]){_0x1834a7['segmentId']&&_0x5502d2['add'](_0x1834a7['segmentId']);}}}}return _0x5502d2;}
|
|
1
|
+
const a147_0x21078b=a147_0x156b;(function(_0x165b9f,_0x3f2baa){const _0x1c9a05=a147_0x156b,_0x1f38cc=_0x165b9f();while(!![]){try{const _0x5eb60f=parseInt(_0x1c9a05(0x173))/0x1*(-parseInt(_0x1c9a05(0x1d4))/0x2)+-parseInt(_0x1c9a05(0x222))/0x3*(parseInt(_0x1c9a05(0x20b))/0x4)+-parseInt(_0x1c9a05(0x1ca))/0x5+-parseInt(_0x1c9a05(0x200))/0x6*(-parseInt(_0x1c9a05(0x1d0))/0x7)+-parseInt(_0x1c9a05(0x1fb))/0x8+parseInt(_0x1c9a05(0x1c0))/0x9*(-parseInt(_0x1c9a05(0x177))/0xa)+parseInt(_0x1c9a05(0x1fd))/0xb*(parseInt(_0x1c9a05(0x182))/0xc);if(_0x5eb60f===_0x3f2baa)break;else _0x1f38cc['push'](_0x1f38cc['shift']());}catch(_0x325d2f){_0x1f38cc['push'](_0x1f38cc['shift']());}}}(a147_0x1b2a,0xcda73));import*as a147_0x1e9c98 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(_0x2ce4c2){const _0x5da004=a147_0x156b,_0x7c2ecd=_0x2ce4c2[_0x5da004(0x1d6)]();if(_0x7c2ecd==='days'||_0x7c2ecd===_0x5da004(0x171))return'day';if(_0x7c2ecd===_0x5da004(0x1c6)||_0x7c2ecd===_0x5da004(0x183))return _0x5da004(0x183);return _0x2ce4c2;}export function journeyResponseToDefSync(_0x548ca0){const _0xc98bae=a147_0x156b,_0x2692f4=_0x548ca0[_0xc98bae(0x1b1)],_0x507959=_0x2692f4[_0xc98bae(0x1fc)]||_0x2692f4['name'],_0x180ab4={'stages':_0x2692f4[_0xc98bae(0x1fa)][_0xc98bae(0x217)](convertApiStageToYaml),'id':_0x548ca0['id']};_0x2692f4[_0xc98bae(0x21f)]&&(_0x180ab4[_0xc98bae(0x21f)]=convertApiCriteriaToYaml(_0x2692f4[_0xc98bae(0x21f)]));_0x2692f4['name']&&_0x2692f4['name']!==_0x507959&&(_0x180ab4[_0xc98bae(0x202)]=_0x2692f4[_0xc98bae(0x1de)]);_0x2692f4['versionNumber']!==undefined&&(_0x180ab4[_0xc98bae(0x1ec)]=_0x2692f4['versionNumber']);_0x2692f4[_0xc98bae(0x20f)]&&(_0x180ab4[_0xc98bae(0x20f)]=_0x2692f4[_0xc98bae(0x20f)]===_0xc98bae(0x176)?_0xc98bae(0x176):'draft');const _0x64e8cb={'type':_0xc98bae(0x19b),'name':_0x507959,'journeys':[_0x180ab4]};_0x2692f4[_0xc98bae(0x1b5)]&&(_0x64e8cb[_0xc98bae(0x1b5)]=_0x2692f4[_0xc98bae(0x1b5)]);_0x2692f4[_0xc98bae(0x21f)]&&(_0x64e8cb[_0xc98bae(0x21f)]=convertApiCriteriaToYaml(_0x2692f4[_0xc98bae(0x21f)]));if(_0x2692f4[_0xc98bae(0x1b6)])_0x64e8cb['reentry']=_0x2692f4[_0xc98bae(0x1b6)];else _0x2692f4[_0xc98bae(0x1a6)]!==undefined&&(_0x64e8cb['reentry']=_0x2692f4[_0xc98bae(0x1a6)]?_0xc98bae(0x1f6):_0xc98bae(0x1d8));return _0x2692f4['journeyBundleId']&&(_0x64e8cb[_0xc98bae(0x207)]=_0x2692f4[_0xc98bae(0x225)]),_0x2692f4[_0xc98bae(0x1fc)]&&(_0x64e8cb[_0xc98bae(0x209)]=_0x2692f4[_0xc98bae(0x1fc)]),_0x548ca0['relationships']?.['parentFolder']?.[_0xc98bae(0x181)]?.['id']&&(_0x64e8cb[_0xc98bae(0x17e)]=_0x548ca0[_0xc98bae(0x174)][_0xc98bae(0x19e)]['data']['id']),_0x64e8cb;}export async function journeyResponseToDef(_0x2acaab,_0x5387b7){const _0xff3e2d=a147_0x156b,_0x31eab8=journeyResponseToDefSync(_0x2acaab);if(!_0x5387b7)return _0x31eab8;const _0x534045=new Set();collectSegmentIdsFromJourney(_0x31eab8,_0x534045);const _0x2cb078=new Set();collectActivationIdsFromJourney(_0x31eab8,_0x2cb078);const _0x59908d={},_0x307ea7=new Map();for(const _0x116c78 of Array['from'](_0x534045)[_0xff3e2d(0x214)]()){if(_0x5387b7[_0xff3e2d(0x223)]){const _0x28650e=await _0x5387b7[_0xff3e2d(0x223)](_0x116c78);if(_0x28650e['isJourneyLocal']){_0x307ea7[_0xff3e2d(0x1d9)](_0x116c78,_0x28650e[_0xff3e2d(0x1de)]);if(_0x28650e['definition']){const _0x4f883f={..._0x28650e['definition'],'rule':deepSortObject(_0x28650e[_0xff3e2d(0x180)]['rule'])};_0x59908d[_0x28650e[_0xff3e2d(0x1de)]]=_0x4f883f;}}else _0x307ea7[_0xff3e2d(0x1d9)](_0x116c78,makeSegmentRef(_0x28650e['name']));}else{if(_0x5387b7[_0xff3e2d(0x1ea)]){const _0x5b78dd=await _0x5387b7[_0xff3e2d(0x1ea)](_0x116c78);_0x307ea7[_0xff3e2d(0x1d9)](_0x116c78,_0x5b78dd);}}}const _0x5de633={},_0x468f09=new Map();for(const _0x419c92 of Array['from'](_0x2cb078)[_0xff3e2d(0x214)]()){if(_0x5387b7[_0xff3e2d(0x1a5)]){const _0x1b9fb6=await _0x5387b7[_0xff3e2d(0x1a5)](_0x419c92);_0x1b9fb6['isJourneyLocal']?(_0x468f09[_0xff3e2d(0x1d9)](_0x419c92,_0x1b9fb6['name']),_0x1b9fb6['definition']&&(_0x5de633[_0x1b9fb6[_0xff3e2d(0x1de)]]=_0x1b9fb6[_0xff3e2d(0x180)])):_0x468f09[_0xff3e2d(0x1d9)](_0x419c92,makeSegmentRef(_0x1b9fb6[_0xff3e2d(0x1de)]));}else{if(_0x5387b7['resolveActivationName']){const _0x199706=await _0x5387b7[_0xff3e2d(0x210)](_0x419c92);_0x468f09[_0xff3e2d(0x1d9)](_0x419c92,_0x199706);}}}_0x307ea7[_0xff3e2d(0x17a)]>0x0&&replaceSegmentIdsInJourney(_0x31eab8,_0x307ea7);_0x468f09[_0xff3e2d(0x17a)]>0x0&&replaceActivationIdsInJourney(_0x31eab8,_0x468f09);if(_0x5387b7['resolveJumpTarget']){const _0x27a5eb=[];collectJumpTargetsFromJourney(_0x31eab8,_0x27a5eb);if(_0x27a5eb[_0xff3e2d(0x1ab)]>0x0){const _0x100686=new Map();for(const _0x565767 of _0x27a5eb){try{const _0x2360c9=await _0x5387b7[_0xff3e2d(0x226)](_0x565767[_0xff3e2d(0x21a)],_0x565767['stageId']);_0x100686['set'](_0x565767['journeyId']+':'+_0x565767[_0xff3e2d(0x216)],_0x2360c9);}catch{}}_0x100686['size']>0x0&&replaceJumpTargetsInJourney(_0x31eab8,_0x100686);}}return Object['keys'](_0x59908d)['length']>0x0&&(_0x31eab8['segments']=_0x59908d),Object['keys'](_0x5de633)[_0xff3e2d(0x1ab)]>0x0&&(_0x31eab8[_0xff3e2d(0x19f)]=_0x5de633),_0x31eab8;}function collectSegmentIdsFromJourney(_0x356a54,_0x3a98ea){const _0x4639e6=a147_0x156b;_0x356a54[_0x4639e6(0x21f)]?.[_0x4639e6(0x204)]&&_0x3a98ea[_0x4639e6(0x16d)](_0x356a54[_0x4639e6(0x21f)]['segment']);const _0x34e2ba=_0xbca5cf=>{const _0x28585c=_0x4639e6;for(const _0x529042 of _0xbca5cf){_0x529042['entry_criteria']?.['segment']&&_0x3a98ea['add'](_0x529042[_0x28585c(0x1d3)][_0x28585c(0x204)]);if(_0x529042[_0x28585c(0x18f)])for(const _0x2792a1 of _0x529042['exit_criteria']){_0x2792a1[_0x28585c(0x204)]&&_0x3a98ea[_0x28585c(0x16d)](_0x2792a1[_0x28585c(0x204)]);}_0x529042[_0x28585c(0x1e4)]?.['segment']&&_0x3a98ea[_0x28585c(0x16d)](_0x529042['milestone'][_0x28585c(0x204)]);if(_0x529042[_0x28585c(0x17f)])for(const _0x33cc5c of _0x529042[_0x28585c(0x17f)]){if(_0x33cc5c[_0x28585c(0x1dd)]===_0x28585c(0x1c3)){const _0x487a4c=_0x33cc5c;for(const _0xbfcd06 of _0x487a4c[_0x28585c(0x1b9)][_0x28585c(0x1ee)]){_0xbfcd06[_0x28585c(0x204)]&&_0x3a98ea[_0x28585c(0x16d)](_0xbfcd06[_0x28585c(0x204)]);}}else{if(_0x33cc5c[_0x28585c(0x1dd)]===_0x28585c(0x1e8)){const _0x938423=_0x33cc5c;_0x938423['with']['condition']?.['segment']&&_0x3a98ea[_0x28585c(0x16d)](_0x938423[_0x28585c(0x1b9)][_0x28585c(0x1b0)][_0x28585c(0x204)]);}}}}};if(_0x356a54[_0x4639e6(0x1e7)])for(const _0x499061 of _0x356a54[_0x4639e6(0x1e7)]){_0x499061['goal']?.[_0x4639e6(0x204)]&&_0x3a98ea[_0x4639e6(0x16d)](_0x499061[_0x4639e6(0x21f)][_0x4639e6(0x204)]),_0x34e2ba(_0x499061[_0x4639e6(0x1d7)]);}_0x356a54[_0x4639e6(0x1d7)]&&_0x34e2ba(_0x356a54['stages']);if(_0x356a54['versions'])for(const _0x8c8b5f of _0x356a54[_0x4639e6(0x21b)]){_0x34e2ba(_0x8c8b5f[_0x4639e6(0x1d7)]);}}function replaceSegmentIdsInJourney(_0x344b1b,_0x5dba22){const _0x38e5e5=a147_0x156b,_0x569568=_0x1af9b8=>_0x5dba22[_0x38e5e5(0x1a1)](_0x1af9b8)||_0x1af9b8;_0x344b1b['goal']?.[_0x38e5e5(0x204)]&&(_0x344b1b[_0x38e5e5(0x21f)][_0x38e5e5(0x204)]=_0x569568(_0x344b1b[_0x38e5e5(0x21f)]['segment']));const _0x50e3e7=_0x47457a=>{const _0x187582=_0x38e5e5;for(const _0x15fd5d of _0x47457a){_0x15fd5d[_0x187582(0x1d3)]?.['segment']&&(_0x15fd5d[_0x187582(0x1d3)][_0x187582(0x204)]=_0x569568(_0x15fd5d[_0x187582(0x1d3)][_0x187582(0x204)]));if(_0x15fd5d[_0x187582(0x18f)])for(const _0x4d8392 of _0x15fd5d[_0x187582(0x18f)]){_0x4d8392['segment']&&(_0x4d8392['segment']=_0x569568(_0x4d8392[_0x187582(0x204)]));}_0x15fd5d[_0x187582(0x1e4)]?.[_0x187582(0x204)]&&(_0x15fd5d[_0x187582(0x1e4)]['segment']=_0x569568(_0x15fd5d[_0x187582(0x1e4)]['segment']));if(_0x15fd5d[_0x187582(0x17f)])for(const _0x18dc84 of _0x15fd5d['steps']){if(_0x18dc84[_0x187582(0x1dd)]===_0x187582(0x1c3)){const _0xd9f5a0=_0x18dc84;for(const _0x242a1d of _0xd9f5a0[_0x187582(0x1b9)][_0x187582(0x1ee)]){_0x242a1d[_0x187582(0x204)]&&(_0x242a1d[_0x187582(0x204)]=_0x569568(_0x242a1d[_0x187582(0x204)]));}}else{if(_0x18dc84[_0x187582(0x1dd)]===_0x187582(0x1e8)){const _0x2eda9c=_0x18dc84;_0x2eda9c[_0x187582(0x1b9)][_0x187582(0x1b0)]?.[_0x187582(0x204)]&&(_0x2eda9c[_0x187582(0x1b9)][_0x187582(0x1b0)][_0x187582(0x204)]=_0x569568(_0x2eda9c[_0x187582(0x1b9)]['condition'][_0x187582(0x204)]));}}}}};if(_0x344b1b[_0x38e5e5(0x1e7)])for(const _0x165a7c of _0x344b1b['journeys']){_0x165a7c['goal']?.[_0x38e5e5(0x204)]&&(_0x165a7c['goal'][_0x38e5e5(0x204)]=_0x569568(_0x165a7c[_0x38e5e5(0x21f)][_0x38e5e5(0x204)])),_0x50e3e7(_0x165a7c['stages']);}_0x344b1b['stages']&&_0x50e3e7(_0x344b1b['stages']);if(_0x344b1b[_0x38e5e5(0x21b)])for(const _0xd39081 of _0x344b1b['versions']){_0x50e3e7(_0xd39081[_0x38e5e5(0x1d7)]);}}function collectActivationIdsFromJourney(_0x29abcc,_0x21b782){const _0x59591b=a147_0x156b,_0x21323f=_0x19dd4c=>{const _0x58e22c=a147_0x156b;for(const _0x44ede9 of _0x19dd4c){if(_0x44ede9[_0x58e22c(0x17f)])for(const _0x38000e of _0x44ede9[_0x58e22c(0x17f)]){if(_0x38000e['type']===_0x58e22c(0x1c5)){const _0xf5b9c4=_0x38000e;_0xf5b9c4[_0x58e22c(0x1b9)][_0x58e22c(0x1c5)]&&/^\d+$/[_0x58e22c(0x1df)](_0xf5b9c4['with'][_0x58e22c(0x1c5)])&&_0x21b782[_0x58e22c(0x16d)](_0xf5b9c4[_0x58e22c(0x1b9)][_0x58e22c(0x1c5)]);}}}};if(_0x29abcc['journeys'])for(const _0x4755a5 of _0x29abcc[_0x59591b(0x1e7)]){_0x21323f(_0x4755a5[_0x59591b(0x1d7)]);}_0x29abcc[_0x59591b(0x1d7)]&&_0x21323f(_0x29abcc[_0x59591b(0x1d7)]);if(_0x29abcc[_0x59591b(0x21b)])for(const _0x43ac81 of _0x29abcc[_0x59591b(0x21b)]){_0x21323f(_0x43ac81[_0x59591b(0x1d7)]);}}function replaceActivationIdsInJourney(_0x263c41,_0x59f0e6){const _0x350d80=a147_0x156b,_0x4ac9e0=_0x55a32b=>_0x59f0e6[_0x350d80(0x1a1)](_0x55a32b)||_0x55a32b,_0x215df3=_0x2c62a9=>{const _0x141728=_0x350d80;for(const _0x4121de of _0x2c62a9){if(_0x4121de['steps'])for(const _0x1e6e2c of _0x4121de[_0x141728(0x17f)]){if(_0x1e6e2c[_0x141728(0x1dd)]===_0x141728(0x1c5)){const _0x24e04d=_0x1e6e2c;_0x24e04d[_0x141728(0x1b9)][_0x141728(0x1c5)]&&(_0x24e04d[_0x141728(0x1b9)]['activation']=_0x4ac9e0(_0x24e04d[_0x141728(0x1b9)][_0x141728(0x1c5)]));}}}};if(_0x263c41[_0x350d80(0x1e7)])for(const _0x6c1d38 of _0x263c41['journeys']){_0x215df3(_0x6c1d38[_0x350d80(0x1d7)]);}_0x263c41['stages']&&_0x215df3(_0x263c41[_0x350d80(0x1d7)]);if(_0x263c41['versions'])for(const _0x2efaad of _0x263c41[_0x350d80(0x21b)]){_0x215df3(_0x2efaad[_0x350d80(0x1d7)]);}}function collectJumpTargetsFromJourney(_0xdf01d6,_0x595d44){const _0x177aaf=a147_0x156b,_0x1aeb19=new Set(),_0x440f89=_0x157b3f=>{const _0x3b8919=a147_0x156b;for(const _0x235611 of _0x157b3f){if(_0x235611[_0x3b8919(0x17f)])for(const _0x50f039 of _0x235611['steps']){if(_0x50f039['type']===_0x3b8919(0x192)){const _0x52ed6b=_0x50f039,_0x3e237c=_0x52ed6b[_0x3b8919(0x1b9)][_0x3b8919(0x18c)];if(_0x3e237c[_0x3b8919(0x19b)]&&_0x3e237c[_0x3b8919(0x188)]&&/^\d+$/[_0x3b8919(0x1df)](_0x3e237c[_0x3b8919(0x19b)])&&/^\d+$/[_0x3b8919(0x1df)](_0x3e237c[_0x3b8919(0x188)])){const _0x1634ec=_0x3e237c['journey']+':'+_0x3e237c[_0x3b8919(0x188)];!_0x1aeb19['has'](_0x1634ec)&&(_0x1aeb19[_0x3b8919(0x16d)](_0x1634ec),_0x595d44['push']({'journeyId':_0x3e237c[_0x3b8919(0x19b)],'stageId':_0x3e237c[_0x3b8919(0x188)]}));}}}}};if(_0xdf01d6[_0x177aaf(0x1e7)])for(const _0x51bed8 of _0xdf01d6[_0x177aaf(0x1e7)]){_0x440f89(_0x51bed8['stages']);}_0xdf01d6[_0x177aaf(0x1d7)]&&_0x440f89(_0xdf01d6[_0x177aaf(0x1d7)]);if(_0xdf01d6[_0x177aaf(0x21b)])for(const _0x45c670 of _0xdf01d6[_0x177aaf(0x21b)]){_0x440f89(_0x45c670[_0x177aaf(0x1d7)]);}}function replaceJumpTargetsInJourney(_0x7638fe,_0x3ff438){const _0x13f458=a147_0x156b,_0x5b95fd=_0x228727=>{const _0x3bb2d3=a147_0x156b;for(const _0x2a0d22 of _0x228727){if(_0x2a0d22['steps'])for(const _0x4715d0 of _0x2a0d22[_0x3bb2d3(0x17f)]){if(_0x4715d0[_0x3bb2d3(0x1dd)]===_0x3bb2d3(0x192)){const _0x99cfc5=_0x4715d0,_0x562fab=_0x99cfc5[_0x3bb2d3(0x1b9)][_0x3bb2d3(0x18c)],_0x1ccdeb=_0x562fab['journey']+':'+_0x562fab['stage'],_0xed68f7=_0x3ff438[_0x3bb2d3(0x1a1)](_0x1ccdeb);_0xed68f7&&(_0x562fab[_0x3bb2d3(0x19b)]=_0xed68f7[_0x3bb2d3(0x1e3)],_0x562fab['stage']=_0xed68f7[_0x3bb2d3(0x191)]);}}}};if(_0x7638fe[_0x13f458(0x1e7)])for(const _0x429122 of _0x7638fe[_0x13f458(0x1e7)]){_0x5b95fd(_0x429122[_0x13f458(0x1d7)]);}_0x7638fe[_0x13f458(0x1d7)]&&_0x5b95fd(_0x7638fe[_0x13f458(0x1d7)]);if(_0x7638fe[_0x13f458(0x21b)])for(const _0x26fe52 of _0x7638fe[_0x13f458(0x21b)]){_0x5b95fd(_0x26fe52[_0x13f458(0x1d7)]);}}function generateReadableStepName(_0x3ac71c,_0x34798c){const _0x4f39ab=a147_0x156b;if(_0x3ac71c[_0x4f39ab(0x1de)]&&_0x3ac71c[_0x4f39ab(0x1de)]!==_0x3ac71c['type']){const _0x1d6d57=_0x3ac71c[_0x4f39ab(0x1de)][_0x4f39ab(0x199)]();if(_0x1d6d57&&/[a-z0-9\p{L}]/iu[_0x4f39ab(0x1df)](_0x1d6d57))return _0x1d6d57;}const _0x12dc9b=_0x3ac71c['type'][_0x4f39ab(0x1d6)]()[_0x4f39ab(0x19c)](/step$/i,'');return _0x12dc9b+'_'+(_0x34798c+0x1);}function getStepNextRefs(_0x235a06){const _0x1b00b0=a147_0x156b,_0x221aa4=[];if(_0x235a06['next'])_0x221aa4[_0x1b00b0(0x1db)](_0x235a06[_0x1b00b0(0x1c8)]);if(_0x235a06[_0x1b00b0(0x1ee)])for(const _0xd70d86 of _0x235a06['branches']){if(_0xd70d86[_0x1b00b0(0x1c8)])_0x221aa4[_0x1b00b0(0x1db)](_0xd70d86['next']);}if(_0x235a06[_0x1b00b0(0x187)])for(const _0x17216a of _0x235a06[_0x1b00b0(0x187)]){if(_0x17216a[_0x1b00b0(0x1c8)])_0x221aa4[_0x1b00b0(0x1db)](_0x17216a[_0x1b00b0(0x1c8)]);}if(_0x235a06['conditions'])for(const _0x5df082 of _0x235a06[_0x1b00b0(0x1aa)]){if(_0x5df082[_0x1b00b0(0x1c8)])_0x221aa4[_0x1b00b0(0x1db)](_0x5df082[_0x1b00b0(0x1c8)]);}return _0x221aa4;}function parseJumpTargetDisplayName(_0x3918eb){const _0x33d185=a147_0x156b,_0x4528eb=_0x3918eb['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0x4528eb)return undefined;const _0xb4b035=_0x4528eb[0x1][_0x33d185(0x199)](),_0xb174ea=_0x4528eb[0x2][_0x33d185(0x199)]();if(!_0xb4b035||!_0xb174ea)return undefined;return{'stageName':_0xb4b035,'journeyName':_0xb174ea};}function orderStepsFromRoot(_0x8303e4,_0x44a95d){const _0x2464c7=a147_0x156b,_0x15670d=Object[_0x2464c7(0x1dc)](_0x8303e4);if(_0x15670d[_0x2464c7(0x1ab)]===0x0)return[];const _0x428e3d=new Set(_0x15670d[_0x2464c7(0x217)](([_0x1aa4fd])=>_0x1aa4fd)),_0x3a5f7f=new Set();for(const [,_0x507a97]of _0x15670d){for(const _0x99708e of getStepNextRefs(_0x507a97)){if(_0x428e3d[_0x2464c7(0x1e5)](_0x99708e))_0x3a5f7f[_0x2464c7(0x16d)](_0x99708e);}}let _0x1cf8ab=_0x44a95d&&_0x428e3d[_0x2464c7(0x1e5)](_0x44a95d)?_0x44a95d:undefined;if(!_0x1cf8ab){const _0x3d86b0=_0x15670d[_0x2464c7(0x172)](([_0x389934])=>!_0x3a5f7f[_0x2464c7(0x1e5)](_0x389934));_0x3d86b0['length']>0x0?_0x1cf8ab=_0x3d86b0[0x0][0x0]:_0x1cf8ab=_0x15670d[0x0][0x0];}const _0x59e5e7=[],_0x3930d1=new Set(),_0x459546=[_0x1cf8ab];while(_0x459546[_0x2464c7(0x1ab)]>0x0){const _0x4f5c96=_0x459546[_0x2464c7(0x203)]();if(_0x3930d1['has'](_0x4f5c96))continue;_0x3930d1[_0x2464c7(0x16d)](_0x4f5c96);const _0x34047e=_0x8303e4[_0x4f5c96];if(!_0x34047e)continue;_0x59e5e7[_0x2464c7(0x1db)]({'uuid':_0x4f5c96,'step':_0x34047e});for(const _0xba2411 of getStepNextRefs(_0x34047e)){_0x428e3d[_0x2464c7(0x1e5)](_0xba2411)&&!_0x3930d1[_0x2464c7(0x1e5)](_0xba2411)&&_0x459546[_0x2464c7(0x1db)](_0xba2411);}}for(const [_0x13f79a,_0x44d88e]of _0x15670d){!_0x3930d1[_0x2464c7(0x1e5)](_0x13f79a)&&_0x59e5e7[_0x2464c7(0x1db)]({'uuid':_0x13f79a,'step':_0x44d88e});}return _0x59e5e7;}function resolveStepReferences(_0x3348dc,_0x5ed7a1,_0x4ff81e,_0x4b14d9){const _0x5cdf4c=a147_0x156b;if(_0x3348dc['type']!==_0x5cdf4c(0x1bd)){_0x3348dc['next']&&_0x4b14d9[_0x5cdf4c(0x1e5)](_0x3348dc['next'])&&(_0x3348dc['next']=_0x4b14d9[_0x5cdf4c(0x1a1)](_0x3348dc[_0x5cdf4c(0x1c8)]));const _0x5855ff=_0x5ed7a1+0x1;if(_0x5855ff<_0x4ff81e[_0x5cdf4c(0x1ab)]){const _0x2f9e93=_0x4b14d9[_0x5cdf4c(0x1a1)](_0x4ff81e[_0x5855ff][_0x5cdf4c(0x184)]);_0x3348dc['next']===_0x2f9e93&&delete _0x3348dc[_0x5cdf4c(0x1c8)];}}if(_0x3348dc[_0x5cdf4c(0x1dd)]===_0x5cdf4c(0x1c3))for(const _0x598945 of _0x3348dc[_0x5cdf4c(0x1b9)][_0x5cdf4c(0x1ee)]){_0x598945[_0x5cdf4c(0x1c8)]&&_0x4b14d9['has'](_0x598945[_0x5cdf4c(0x1c8)])&&(_0x598945['next']=_0x4b14d9['get'](_0x598945[_0x5cdf4c(0x1c8)]));}if(_0x3348dc[_0x5cdf4c(0x1dd)]===_0x5cdf4c(0x201))for(const _0x4ea46f of _0x3348dc['with']['variants']){_0x4ea46f[_0x5cdf4c(0x1c8)]&&_0x4b14d9[_0x5cdf4c(0x1e5)](_0x4ea46f['next'])&&(_0x4ea46f[_0x5cdf4c(0x1c8)]=_0x4b14d9['get'](_0x4ea46f['next']));}if(_0x3348dc[_0x5cdf4c(0x1dd)]===_0x5cdf4c(0x1e8)&&_0x3348dc[_0x5cdf4c(0x1b9)][_0x5cdf4c(0x1b0)]){const _0x155468=_0x3348dc['with'][_0x5cdf4c(0x1b0)];_0x155468[_0x5cdf4c(0x1c8)]&&_0x4b14d9[_0x5cdf4c(0x1e5)](_0x155468[_0x5cdf4c(0x1c8)])&&(_0x155468[_0x5cdf4c(0x1c8)]=_0x4b14d9['get'](_0x155468[_0x5cdf4c(0x1c8)])),_0x155468[_0x5cdf4c(0x1d2)]?.[_0x5cdf4c(0x1c8)]&&_0x4b14d9['has'](_0x155468['timeout'][_0x5cdf4c(0x1c8)])&&(_0x155468['timeout'][_0x5cdf4c(0x1c8)]=_0x4b14d9[_0x5cdf4c(0x1a1)](_0x155468['timeout'][_0x5cdf4c(0x1c8)]));}}function convertApiStageToYaml(_0x3c5299){const _0xcb535c=a147_0x156b,_0x2706a3={'name':_0x3c5299[_0xcb535c(0x1de)]};_0x3c5299['id']&&(_0x2706a3['id']=_0x3c5299['id']);_0x3c5299['description']&&(_0x2706a3['description']=_0x3c5299[_0xcb535c(0x1b5)]);_0x3c5299[_0xcb535c(0x20a)]&&(_0x2706a3[_0xcb535c(0x1d3)]=convertApiCriteriaToYaml(_0x3c5299[_0xcb535c(0x20a)]));_0x3c5299[_0xcb535c(0x1ba)]&&_0x3c5299['exitCriterias'][_0xcb535c(0x1ab)]>0x0&&(_0x2706a3[_0xcb535c(0x18f)]=_0x3c5299[_0xcb535c(0x1ba)][_0xcb535c(0x217)](convertApiCriteriaToYaml));_0x3c5299['milestone']&&(_0x2706a3[_0xcb535c(0x1e4)]=convertApiCriteriaToYaml(_0x3c5299[_0xcb535c(0x1e4)]));if(_0x3c5299['steps']&&Object[_0xcb535c(0x193)](_0x3c5299[_0xcb535c(0x17f)])[_0xcb535c(0x1ab)]>0x0){const _0x10795a=orderStepsFromRoot(_0x3c5299[_0xcb535c(0x17f)],_0x3c5299[_0xcb535c(0x1c9)]),_0x5d1ffc=new Map(),_0x33327b=new Set();for(let _0x45736d=0x0;_0x45736d<_0x10795a[_0xcb535c(0x1ab)];_0x45736d++){const {uuid:_0x1853ee,step:_0x593ea4}=_0x10795a[_0x45736d];let _0x1ad23a=generateReadableStepName(_0x593ea4,_0x45736d),_0xa91f12=_0x1ad23a,_0x26ed37=0x2;while(_0x33327b['has'](_0xa91f12)){_0xa91f12=_0x1ad23a+'_'+_0x26ed37,_0x26ed37++;}_0x33327b[_0xcb535c(0x16d)](_0xa91f12),_0x5d1ffc[_0xcb535c(0x1d9)](_0x1853ee,_0xa91f12);}_0x2706a3[_0xcb535c(0x17f)]=_0x10795a[_0xcb535c(0x217)](({uuid:_0x51e2ea,step:_0x35d8f5},_0x39f20a)=>{const _0xe8bfa4=_0xcb535c,_0x2867ec=convertApiStepToYaml(_0x35d8f5,_0x5d1ffc[_0xe8bfa4(0x1a1)](_0x51e2ea));return resolveStepReferences(_0x2867ec,_0x39f20a,_0x10795a,_0x5d1ffc),_0x2867ec;});}return _0x2706a3;}function convertApiCriteriaToYaml(_0x2792c3){const _0x1d9ca6=a147_0x156b,_0x122867={'name':_0x2792c3[_0x1d9ca6(0x1de)],'segment':_0x2792c3['segmentId']};_0x2792c3[_0x1d9ca6(0x1b5)]&&(_0x122867['description']=_0x2792c3[_0x1d9ca6(0x1b5)]);if(_0x2792c3[_0x1d9ca6(0x18c)]){let _0x1bbcf3=_0x2792c3[_0x1d9ca6(0x18c)][_0x1d9ca6(0x21a)],_0x515f96=_0x2792c3['target'][_0x1d9ca6(0x189)];if(_0x2792c3[_0x1d9ca6(0x18c)][_0x1d9ca6(0x1e3)]){const _0x3e0678=parseJumpTargetDisplayName(_0x2792c3[_0x1d9ca6(0x18c)]['journeyName']);_0x3e0678&&(_0x515f96=_0x3e0678[_0x1d9ca6(0x191)],_0x1bbcf3=_0x3e0678['journeyName']);}_0x122867['target']={'journey':_0x1bbcf3,'stage':_0x515f96},_0x2792c3['target']['journeyBundleId']&&(_0x122867[_0x1d9ca6(0x18c)]['bundle_id']=_0x2792c3[_0x1d9ca6(0x18c)][_0x1d9ca6(0x225)]);}return _0x122867;}function convertApiStepToYaml(_0x59afeb,_0x3944d3){const _0x405a8a=a147_0x156b;switch(_0x59afeb['type']){case _0x405a8a(0x215):{const _0x4f35fc={};if(_0x59afeb[_0x405a8a(0x17b)]===_0x405a8a(0x1c1)&&_0x59afeb['waitStep']!==undefined)_0x4f35fc['duration']=_0x59afeb['waitStep'],_0x4f35fc['unit']=_0x59afeb['waitStepUnit'];else{if(_0x59afeb['waitStepType']===_0x405a8a(0x205)&&_0x59afeb[_0x405a8a(0x1f0)])_0x4f35fc[_0x405a8a(0x21e)]=_0x59afeb[_0x405a8a(0x1f0)];else{if(_0x59afeb[_0x405a8a(0x17b)]===_0x405a8a(0x1be)&&_0x59afeb[_0x405a8a(0x224)])_0x4f35fc[_0x405a8a(0x213)]=_0x59afeb[_0x405a8a(0x224)];else{if(_0x59afeb[_0x405a8a(0x17b)]==='Condition'){if(_0x59afeb[_0x405a8a(0x1aa)]&&_0x59afeb[_0x405a8a(0x1aa)][_0x405a8a(0x1ab)]>0x0){const _0x9bf820=_0x59afeb[_0x405a8a(0x1aa)][_0x405a8a(0x197)](_0x21c10e=>!_0x21c10e[_0x405a8a(0x1a4)]),_0x45fd8e=_0x59afeb[_0x405a8a(0x1aa)][_0x405a8a(0x197)](_0x274306=>_0x274306['timedOutPath']);_0x9bf820?.[_0x405a8a(0x18a)]&&(_0x4f35fc[_0x405a8a(0x1b0)]={'segment':_0x9bf820[_0x405a8a(0x18a)],..._0x9bf820[_0x405a8a(0x1c8)]?{'next':_0x9bf820[_0x405a8a(0x1c8)]}:{}},_0x45fd8e&&_0x45fd8e[_0x405a8a(0x1cf)]!==undefined&&_0x45fd8e[_0x405a8a(0x1bc)]&&(_0x4f35fc['condition'][_0x405a8a(0x1d2)]={'duration':_0x45fd8e[_0x405a8a(0x1cf)],'unit':_0x45fd8e['unit'],..._0x45fd8e[_0x405a8a(0x1c8)]?{'next':_0x45fd8e[_0x405a8a(0x1c8)]}:{}}));}else _0x59afeb['conditionSegmentId']&&(_0x4f35fc[_0x405a8a(0x1b0)]={'segment':_0x59afeb[_0x405a8a(0x211)]},_0x59afeb['conditionTimeoutDuration']!==undefined&&_0x59afeb[_0x405a8a(0x1a9)]&&(_0x4f35fc[_0x405a8a(0x1b0)]['timeout']={'duration':_0x59afeb['conditionTimeoutDuration'],'unit':_0x59afeb[_0x405a8a(0x1a9)]}));}}}}const _0x20713a={'type':'wait','name':_0x3944d3,..._0x59afeb['next']?{'next':_0x59afeb['next']}:{},'with':_0x4f35fc};return _0x20713a;}case _0x405a8a(0x1a0):{const _0x5ec400={'type':_0x405a8a(0x1c5),'name':_0x3944d3,..._0x59afeb[_0x405a8a(0x1c8)]?{'next':_0x59afeb[_0x405a8a(0x1c8)]}:{},'with':{'activation':_0x59afeb[_0x405a8a(0x196)]||''}};return _0x5ec400;}case'DecisionPoint':{const _0x12a535={'type':_0x405a8a(0x1c3),'name':_0x3944d3,..._0x59afeb['next']?{'next':_0x59afeb[_0x405a8a(0x1c8)]}:{},'with':{'branches':(_0x59afeb[_0x405a8a(0x1ee)]||[])[_0x405a8a(0x217)](_0x2d16a9=>({'name':_0x2d16a9[_0x405a8a(0x1de)],'segment':_0x2d16a9[_0x405a8a(0x18a)],'excluded':_0x2d16a9['excludedPath'],..._0x2d16a9['next']?{'next':_0x2d16a9[_0x405a8a(0x1c8)]}:{}}))}};return _0x12a535;}case _0x405a8a(0x1c2):case _0x405a8a(0x1b2):case'Variant':{const _0x526753=_0x59afeb[_0x405a8a(0x187)]||(_0x59afeb[_0x405a8a(0x1ee)]||[])[_0x405a8a(0x217)](_0x4d4d2d=>({'name':_0x4d4d2d[_0x405a8a(0x1de)],'percentage':0x0,'next':_0x4d4d2d[_0x405a8a(0x1c8)]})),_0x3667b8={'type':'ab_test','name':_0x3944d3,..._0x59afeb[_0x405a8a(0x1c8)]?{'next':_0x59afeb[_0x405a8a(0x1c8)]}:{},'with':{'customized_split':_0x59afeb[_0x405a8a(0x1a7)],'unique_id':_0x59afeb[_0x405a8a(0x1cb)],'variants':_0x526753['map'](_0x385565=>({'name':_0x385565[_0x405a8a(0x1de)],'percentage':_0x385565['percentage'],..._0x385565[_0x405a8a(0x1c8)]?{'next':_0x385565[_0x405a8a(0x1c8)]}:{}}))}};return _0x3667b8;}case _0x405a8a(0x19d):{const _0x36cf34={'type':_0x405a8a(0x1c4),'name':_0x3944d3,..._0x59afeb[_0x405a8a(0x1c8)]?{'next':_0x59afeb[_0x405a8a(0x1c8)]}:{}};return _0x36cf34;}case'Jump':{let _0x4f4559='',_0x187240='',_0x38ec75;if(_0x59afeb[_0x405a8a(0x18c)]){_0x4f4559=_0x59afeb[_0x405a8a(0x18c)][_0x405a8a(0x21a)],_0x187240=_0x59afeb[_0x405a8a(0x18c)][_0x405a8a(0x189)],_0x38ec75=_0x59afeb[_0x405a8a(0x18c)][_0x405a8a(0x225)];if(_0x59afeb[_0x405a8a(0x18c)][_0x405a8a(0x1e3)]){const _0x4e282a=parseJumpTargetDisplayName(_0x59afeb[_0x405a8a(0x18c)]['journeyName']);_0x4e282a&&(_0x187240=_0x4e282a[_0x405a8a(0x191)],_0x4f4559=_0x4e282a[_0x405a8a(0x1e3)]);}}const _0x49176e={'type':_0x405a8a(0x192),'name':_0x3944d3,..._0x59afeb[_0x405a8a(0x1c8)]?{'next':_0x59afeb[_0x405a8a(0x1c8)]}:{},'with':{'target':{'journey':_0x4f4559,'stage':_0x187240,..._0x38ec75?{'bundle_id':_0x38ec75}:{}}}};return _0x49176e;}case _0x405a8a(0x1cc):{const _0x156129={'type':_0x405a8a(0x1bd),'name':_0x3944d3};return _0x156129;}default:{const _0x1c5cbf={'type':_0x405a8a(0x1bd),'name':_0x3944d3};return _0x1c5cbf;}}}export async function journeyDefToRequest(_0x21b978,_0x2dd795,_0xf15d8){const _0x104dbf=a147_0x156b,_0x3763b6=_0x21b978['stages']||getActiveStages(_0x21b978),_0x58ba79=isJourneysArrayMode(_0x21b978)||isMultiVersionMode(_0x21b978)?getLatestJourneyEntry(_0x21b978):undefined,_0x2cf405=_0x58ba79?.[_0x104dbf(0x202)]??_0x21b978[_0x104dbf(0x1de)],_0x227827=_0x21b978[_0x104dbf(0x1e9)]||{},_0x5e6e28=_0x21b978[_0x104dbf(0x19f)]||{},_0x2ca28c={'type':_0x104dbf(0x19b),'attributes':{'name':_0x2cf405,'audienceId':_0x2dd795,'journeyStages':await Promise[_0x104dbf(0x1ac)](_0x3763b6[_0x104dbf(0x217)](_0x332f81=>convertYamlStageToApi(_0x332f81,_0xf15d8,_0x227827,_0x5e6e28)))}},_0x585685=_0x58ba79?.['id']??_0x21b978['id'];_0x585685&&(_0x2ca28c['id']=_0x585685);_0x21b978[_0x104dbf(0x1b5)]&&(_0x2ca28c['attributes'][_0x104dbf(0x1b5)]=_0x21b978['description']);const _0x51ce81=getEffectiveGoal(_0x21b978);_0x51ce81&&(_0x2ca28c[_0x104dbf(0x1b1)]['goal']=await convertYamlCriteriaToApi(_0x51ce81,_0xf15d8,_0x227827));const _0x2b8905=getEffectiveReentry(_0x21b978);return _0x2b8905&&(_0x2ca28c[_0x104dbf(0x1b1)][_0x104dbf(0x1b6)]=_0x2b8905,_0x2ca28c['attributes'][_0x104dbf(0x1a6)]=_0x2b8905!==_0x104dbf(0x1d8)),_0x21b978[_0x104dbf(0x17e)]&&(_0x2ca28c[_0x104dbf(0x174)]={'parentFolder':{'data':{'id':_0x21b978[_0x104dbf(0x17e)],'type':'folder'}}}),_0x2ca28c;}async function convertYamlStageToApi(_0x5e0013,_0x1b5c1e,_0x58851c={},_0x4b89fe={}){const _0x520e10=a147_0x156b,_0x32b09f={'name':_0x5e0013[_0x520e10(0x1de)]};_0x5e0013['id']&&(_0x32b09f['id']=_0x5e0013['id']);_0x5e0013[_0x520e10(0x1b5)]&&(_0x32b09f[_0x520e10(0x1b5)]=_0x5e0013[_0x520e10(0x1b5)]);_0x5e0013['entry_criteria']&&(_0x32b09f[_0x520e10(0x20a)]=await convertYamlCriteriaToApi(_0x5e0013[_0x520e10(0x1d3)],_0x1b5c1e,_0x58851c));_0x5e0013[_0x520e10(0x18f)]&&_0x5e0013[_0x520e10(0x18f)]['length']>0x0&&(_0x32b09f['exitCriterias']=await Promise[_0x520e10(0x1ac)](_0x5e0013[_0x520e10(0x18f)]['map'](_0x33e5e0=>convertYamlCriteriaToApi(_0x33e5e0,_0x1b5c1e,_0x58851c))));_0x5e0013[_0x520e10(0x1e4)]&&(_0x32b09f[_0x520e10(0x1e4)]=await convertYamlCriteriaToApi(_0x5e0013['milestone'],_0x1b5c1e,_0x58851c));if(_0x5e0013[_0x520e10(0x17f)]&&_0x5e0013[_0x520e10(0x17f)][_0x520e10(0x1ab)]>0x0){const _0x36ccdc={},_0x3f11db=_0x5e0013[_0x520e10(0x17f)][_0x520e10(0x217)]((_0x3add33,_0x3cfea2)=>{const _0x403e95=_0x520e10,_0x14b574=_0x3add33[_0x403e95(0x184)]||generateUUID(),_0x8081eb=_0x3add33[_0x403e95(0x1de)]||_0x3add33[_0x403e95(0x1dd)]+'_'+_0x3cfea2;return _0x36ccdc[_0x8081eb]=_0x14b574,{..._0x3add33,'name':_0x8081eb};});_0x32b09f[_0x520e10(0x1c9)]=_0x36ccdc[_0x3f11db[0x0][_0x520e10(0x1de)]],_0x32b09f['steps']={};for(let _0x308df7=0x0;_0x308df7<_0x3f11db[_0x520e10(0x1ab)];_0x308df7++){const _0x33b6d6=_0x3f11db[_0x308df7],_0x3d4397=_0x36ccdc[_0x33b6d6[_0x520e10(0x1de)]],_0x4ff592=!_0x33b6d6[_0x520e10(0x1c8)]&&_0x308df7<_0x3f11db['length']-0x1&&_0x33b6d6[_0x520e10(0x1dd)]!==_0x520e10(0x1bd)?_0x3f11db[_0x308df7+0x1]['name']:_0x33b6d6[_0x520e10(0x1c8)],_0x46087d=_0x4ff592!==_0x33b6d6['next']?{..._0x33b6d6,'next':_0x4ff592}:_0x33b6d6;_0x32b09f[_0x520e10(0x17f)][_0x3d4397]=await convertYamlStepToApi(_0x46087d,_0x1b5c1e,_0x58851c,_0x36ccdc,_0x4b89fe);}}else _0x5e0013[_0x520e10(0x198)]&&(_0x32b09f[_0x520e10(0x1c9)]=_0x5e0013['root_step']);return _0x32b09f;}async function convertYamlCriteriaToApi(_0x221f48,_0x191741,_0x4bbc6a={}){const _0x56f605=a147_0x156b;let _0x44161a=_0x221f48[_0x56f605(0x204)];if(_0x44161a&&!/^\d+$/[_0x56f605(0x1df)](_0x44161a)){const _0x5f1473=parseSegmentRef(_0x44161a);if(_0x5f1473[_0x56f605(0x1dd)]===_0x56f605(0x20c))_0x191741?.[_0x56f605(0x206)]&&(_0x44161a=await _0x191741[_0x56f605(0x206)](_0x5f1473[_0x56f605(0x1de)]));else{if(_0x5f1473[_0x56f605(0x1dd)]===_0x56f605(0x1f7)&&_0x4bbc6a[_0x5f1473[_0x56f605(0x1de)]])_0x191741?.[_0x56f605(0x19a)]&&(_0x44161a=await _0x191741[_0x56f605(0x19a)](_0x5f1473['name'],_0x4bbc6a[_0x5f1473[_0x56f605(0x1de)]]));else _0x191741?.[_0x56f605(0x206)]&&(_0x44161a=await _0x191741[_0x56f605(0x206)](_0x5f1473['name']));}}const _0x4d160f={'name':_0x221f48[_0x56f605(0x1de)],'segmentId':_0x44161a};_0x221f48[_0x56f605(0x1b5)]&&(_0x4d160f[_0x56f605(0x1b5)]=_0x221f48['description']);if(_0x221f48[_0x56f605(0x18c)]){const _0x2f6984=_0x221f48[_0x56f605(0x18c)][_0x56f605(0x19b)],_0x445ef4=_0x221f48['target'][_0x56f605(0x188)];let _0x12f527=_0x221f48['target'][_0x56f605(0x19b)];_0x191741?.[_0x56f605(0x1b8)]&&!/^\d+$/[_0x56f605(0x1df)](_0x12f527)&&(_0x12f527=await _0x191741['resolveJourneyId'](_0x12f527));let _0x691a4c=_0x221f48[_0x56f605(0x18c)][_0x56f605(0x188)];_0x191741?.['resolveStageId']&&!/^\d+$/['test'](_0x691a4c)&&(_0x691a4c=await _0x191741[_0x56f605(0x16c)](_0x12f527,_0x691a4c));const _0x3cf65a=!/^\d+$/['test'](_0x2f6984)&&!isLocalJourneyRef(_0x2f6984)?formatApiJourneyName(_0x2f6984,_0x445ef4):undefined;_0x4d160f[_0x56f605(0x18c)]={'journeyId':_0x12f527,'journeyStageId':_0x691a4c,'journeyName':_0x3cf65a,'confirmed':!![]},_0x221f48['target'][_0x56f605(0x207)]&&(_0x4d160f[_0x56f605(0x18c)][_0x56f605(0x225)]=_0x221f48[_0x56f605(0x18c)]['bundle_id']);}return _0x4d160f;}async function convertYamlStepToApi(_0x3b8c64,_0x43ef3f,_0x2cda7b={},_0x4a5494={},_0x1afc0a={}){const _0x3979a6=a147_0x156b,_0x5da310=async _0x20a5aa=>{const _0x560a56=a147_0x156b;if(/^\d+$/[_0x560a56(0x1df)](_0x20a5aa))return _0x20a5aa;const _0x482223=parseSegmentRef(_0x20a5aa);if(_0x482223[_0x560a56(0x1dd)]==='ref'){if(_0x43ef3f?.[_0x560a56(0x206)])return await _0x43ef3f[_0x560a56(0x206)](_0x482223[_0x560a56(0x1de)]);}else{if(_0x482223[_0x560a56(0x1dd)]===_0x560a56(0x1f7)&&_0x2cda7b[_0x482223[_0x560a56(0x1de)]]){if(_0x43ef3f?.[_0x560a56(0x19a)])return await _0x43ef3f[_0x560a56(0x19a)](_0x482223[_0x560a56(0x1de)],_0x2cda7b[_0x482223['name']]);}else{if(_0x43ef3f?.[_0x560a56(0x206)])return await _0x43ef3f[_0x560a56(0x206)](_0x482223['name']);}}return _0x20a5aa;},_0x2924a6=async _0x489077=>{const _0x403bbf=a147_0x156b;if(/^\d+$/[_0x403bbf(0x1df)](_0x489077))return _0x489077;const _0x32948e=parseSegmentRef(_0x489077);if(_0x32948e[_0x403bbf(0x1dd)]===_0x403bbf(0x20c)){if(_0x43ef3f?.[_0x403bbf(0x1cd)])return await _0x43ef3f[_0x403bbf(0x1cd)](_0x32948e['name']);return _0x32948e[_0x403bbf(0x1de)];}else{if(_0x32948e['type']===_0x403bbf(0x1f7)&&_0x1afc0a[_0x32948e[_0x403bbf(0x1de)]]){if(_0x43ef3f?.['resolveEmbeddedActivationId'])return await _0x43ef3f[_0x403bbf(0x1f8)](_0x32948e[_0x403bbf(0x1de)],_0x1afc0a[_0x32948e[_0x403bbf(0x1de)]]);if(_0x43ef3f?.[_0x403bbf(0x1cd)])return await _0x43ef3f[_0x403bbf(0x1cd)](_0x32948e[_0x403bbf(0x1de)]);}else{if(_0x43ef3f?.[_0x403bbf(0x1cd)])return await _0x43ef3f[_0x403bbf(0x1cd)](_0x32948e[_0x403bbf(0x1de)]);}}return _0x489077;},_0x520894=_0x454a84=>{const _0x3c9bef=a147_0x156b;if(!_0x454a84)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x3c9bef(0x1df)](_0x454a84))return _0x454a84;return _0x4a5494[_0x454a84]||_0x454a84;};switch(_0x3b8c64['type']){case _0x3979a6(0x1e8):{const _0x38c715=_0x3b8c64,_0x22d37e=_0x38c715[_0x3979a6(0x1b9)],_0x5c7e7b={'type':_0x3979a6(0x215),'name':_0x38c715[_0x3979a6(0x1de)],'next':_0x520894(_0x38c715[_0x3979a6(0x1c8)])};if(_0x22d37e[_0x3979a6(0x1ce)]!==undefined&&_0x22d37e[_0x3979a6(0x1bc)])_0x5c7e7b[_0x3979a6(0x17b)]=_0x3979a6(0x1c1),_0x5c7e7b[_0x3979a6(0x16f)]=_0x22d37e['duration'],_0x5c7e7b[_0x3979a6(0x1bb)]=normalizeWaitUnit(_0x22d37e[_0x3979a6(0x1bc)]);else{if(_0x22d37e[_0x3979a6(0x21e)])_0x5c7e7b[_0x3979a6(0x17b)]='Date',_0x5c7e7b['waitUntilDate']=_0x22d37e[_0x3979a6(0x21e)];else{if(_0x22d37e[_0x3979a6(0x213)])_0x5c7e7b[_0x3979a6(0x17b)]=_0x3979a6(0x1be),_0x5c7e7b[_0x3979a6(0x224)]=_0x22d37e['days_of_week'];else{if(_0x22d37e['condition']){_0x5c7e7b[_0x3979a6(0x17b)]=_0x3979a6(0x1eb);const _0x1df5c3=await _0x5da310(_0x22d37e[_0x3979a6(0x1b0)][_0x3979a6(0x204)]),_0x4e3234=_0x22d37e['condition'][_0x3979a6(0x1d2)]?.[_0x3979a6(0x1c8)]!==undefined;if(_0x4e3234){const _0x3c1795=[];_0x3c1795[_0x3979a6(0x1db)]({'id':generateUUID(),'segmentId':_0x1df5c3,'timedOutPath':![],'name':'Met\x20condition(s)','next':_0x520894(_0x22d37e['condition'][_0x3979a6(0x1c8)]??_0x38c715[_0x3979a6(0x1c8)])});if(_0x22d37e[_0x3979a6(0x1b0)][_0x3979a6(0x1d2)]){const _0x28d0cc=_0x22d37e[_0x3979a6(0x1b0)][_0x3979a6(0x1d2)][_0x3979a6(0x1ce)],_0x5e741a=normalizeWaitUnit(_0x22d37e[_0x3979a6(0x1b0)]['timeout'][_0x3979a6(0x1bc)]);_0x3c1795[_0x3979a6(0x1db)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x3979a6(0x20d)+_0x28d0cc+'\x20'+_0x5e741a,'moveAfter':_0x28d0cc,'unit':_0x5e741a,'next':_0x520894(_0x22d37e[_0x3979a6(0x1b0)][_0x3979a6(0x1d2)]['next'])});}_0x5c7e7b['conditions']=_0x3c1795,delete _0x5c7e7b[_0x3979a6(0x1c8)];}else _0x5c7e7b[_0x3979a6(0x211)]=_0x1df5c3,_0x22d37e[_0x3979a6(0x1b0)]['timeout']&&(_0x5c7e7b['conditionTimeoutDuration']=_0x22d37e['condition'][_0x3979a6(0x1d2)][_0x3979a6(0x1ce)],_0x22d37e[_0x3979a6(0x1b0)][_0x3979a6(0x1d2)][_0x3979a6(0x1bc)]&&(_0x5c7e7b[_0x3979a6(0x1a9)]=normalizeWaitUnit(_0x22d37e[_0x3979a6(0x1b0)][_0x3979a6(0x1d2)]['unit'])));}}}}return _0x5c7e7b;}case _0x3979a6(0x1c5):{const _0x3da1bb=_0x3b8c64,_0x5e986e=_0x3da1bb['with'][_0x3979a6(0x1c5)],_0x21ee48=await _0x2924a6(_0x5e986e);return{'type':_0x3979a6(0x1a0),'name':_0x3da1bb[_0x3979a6(0x1de)],'journeyActivationStepId':_0x21ee48,'next':_0x520894(_0x3da1bb[_0x3979a6(0x1c8)])};}case _0x3979a6(0x1c3):{const _0x5f1a97=_0x3b8c64,_0x534328=_0x5f1a97[_0x3979a6(0x1b9)]['branches'];return{'type':_0x3979a6(0x1a2),'name':_0x5f1a97[_0x3979a6(0x1de)],'branches':await Promise[_0x3979a6(0x1ac)](_0x534328[_0x3979a6(0x217)](async _0x41029f=>{const _0x8a62fd=_0x3979a6;let _0x703ab6='';if(!_0x41029f[_0x8a62fd(0x185)]){const _0x5b00d6=_0x41029f['segment']||_0x41029f[_0x8a62fd(0x1e2)]||'';_0x703ab6=_0x5b00d6?await _0x5da310(_0x5b00d6):'';}return{'id':crypto[_0x8a62fd(0x208)](),'name':_0x41029f['name'],'description':null,'segmentId':_0x703ab6,'excludedPath':_0x41029f[_0x8a62fd(0x185)]??![],'next':_0x520894(_0x41029f[_0x8a62fd(0x1c8)])};})),'next':_0x520894(_0x5f1a97[_0x3979a6(0x1c8)])};}case _0x3979a6(0x201):{const _0x96ca0d=_0x3b8c64,_0x2f0d2f=_0x96ca0d[_0x3979a6(0x1b9)];return{'type':_0x3979a6(0x1c2),'name':_0x96ca0d[_0x3979a6(0x1de)],'customizedSplit':_0x2f0d2f[_0x3979a6(0x179)],'uniqueId':_0x2f0d2f[_0x3979a6(0x1f5)],'variants':_0x2f0d2f[_0x3979a6(0x187)][_0x3979a6(0x217)](_0x4ce791=>({'id':_0x4ce791['id']||generateUUID(),'name':_0x4ce791[_0x3979a6(0x1de)],'percentage':_0x4ce791['percentage'],'next':_0x520894(_0x4ce791['next'])})),'next':_0x520894(_0x96ca0d[_0x3979a6(0x1c8)])};}case _0x3979a6(0x1c4):return{'type':_0x3979a6(0x19d),'name':_0x3b8c64[_0x3979a6(0x1de)],'next':_0x520894(_0x3b8c64[_0x3979a6(0x1c8)])};case _0x3979a6(0x192):{const _0x311115=_0x3b8c64,_0x1c9cd5=_0x311115[_0x3979a6(0x1b9)][_0x3979a6(0x18c)],_0x7cf944=_0x1c9cd5[_0x3979a6(0x19b)],_0x5e00da=_0x1c9cd5['stage'];let _0x1fe23e=_0x1c9cd5[_0x3979a6(0x19b)];_0x43ef3f?.[_0x3979a6(0x1b8)]&&!/^\d+$/['test'](_0x1fe23e)&&(_0x1fe23e=await _0x43ef3f[_0x3979a6(0x1b8)](_0x1fe23e));let _0x2fbf79=_0x1c9cd5['stage'];_0x43ef3f?.[_0x3979a6(0x16c)]&&!/^\d+$/['test'](_0x2fbf79)&&(_0x2fbf79=await _0x43ef3f[_0x3979a6(0x16c)](_0x1fe23e,_0x2fbf79));const _0x5eb4b5=!/^\d+$/[_0x3979a6(0x1df)](_0x7cf944)&&!isLocalJourneyRef(_0x7cf944)?formatApiJourneyName(_0x7cf944,_0x5e00da):undefined;return{'type':'Jump','name':_0x311115[_0x3979a6(0x1de)],'target':{'journeyId':_0x1fe23e,'journeyStageId':_0x2fbf79,'journeyBundleId':_0x1c9cd5[_0x3979a6(0x207)],'journeyName':_0x5eb4b5,'confirmed':!![]},'next':_0x520894(_0x311115[_0x3979a6(0x1c8)])};}case _0x3979a6(0x1bd):return{'type':_0x3979a6(0x1cc),'name':_0x3b8c64[_0x3979a6(0x1de)]};default:{const _0x53a486=_0x3b8c64;return{'type':_0x3979a6(0x1cc),'name':_0x53a486[_0x3979a6(0x1de)]};}}}export function toYamlString(_0x5f4690){const _0x546131=a147_0x156b,_0xfa6f15=stripInternalFields(_0x5f4690),_0x35c2c3=a147_0x1e9c98[_0x546131(0x1a8)](_0xfa6f15,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x546131(0x1b4)}),_0x1524dc=[_0x546131(0x16e),_0x546131(0x1ed),_0x546131(0x1ef),'reentry:',_0x546131(0x194),'stages:',_0x546131(0x1d5)];let _0x4d1e42=_0x35c2c3;for(const _0x150806 of _0x1524dc){_0x4d1e42=_0x4d1e42['replace'](new RegExp('^('+_0x150806+')','m'),(_0x203bac,_0x5cec96,_0x4d74c1)=>{if(_0x4d74c1===0x0||_0x4d1e42[_0x4d74c1-0x1]==='\x0a'&&_0x4d1e42[_0x4d74c1-0x2]==='\x0a')return _0x5cec96;return'\x0a'+_0x5cec96;});}return _0x4d1e42;}function stripInternalFields(_0x3f9ed8){const _0x2e7104=a147_0x156b,{id:_0xf191d0,folder_id:_0x1fbfe6,bundle_id:_0x2fd4dd,bundle_name:_0x501acf,version:_0x7b1260,allow_reentry:_0x4ebb9f,..._0x300ada}=_0x3f9ed8;return _0x300ada[_0x2e7104(0x1e7)]&&(_0x300ada['journeys']=_0x300ada[_0x2e7104(0x1e7)][_0x2e7104(0x217)](_0x57ce3e=>{const _0x169966=_0x2e7104,{id:_0x13bf3f,..._0x5841d8}=_0x57ce3e;return{..._0x5841d8,'stages':_0x5841d8[_0x169966(0x1d7)][_0x169966(0x217)](stripStageInternalFields),..._0x57ce3e[_0x169966(0x1ad)]===!![]?{'latest':!![]}:{},..._0x300ada['journeys'][_0x169966(0x1ab)]===0x1&&_0x5841d8[_0x169966(0x202)]==='v1'?{'version':undefined}:{}};})),_0x300ada[_0x2e7104(0x1d7)]&&(_0x300ada[_0x2e7104(0x1d7)]=_0x300ada['stages']['map'](stripStageInternalFields)),_0x300ada[_0x2e7104(0x21b)]&&(_0x300ada[_0x2e7104(0x21b)]=_0x300ada[_0x2e7104(0x21b)][_0x2e7104(0x217)](_0x41bd8e=>{const _0x452f90=_0x2e7104,{id:_0x31f047,..._0x552358}=_0x41bd8e;return{..._0x552358,'stages':_0x552358['stages'][_0x452f90(0x217)](stripStageInternalFields),..._0x41bd8e[_0x452f90(0x1ad)]===!![]?{'latest':!![]}:{}};})),_0x300ada;}function stripStageInternalFields(_0x3af5c1){const {id:_0x2046a2,..._0x41ae36}=_0x3af5c1;return _0x41ae36;}export function parseYamlString(_0x2e8ccc){return safeParseYaml(_0x2e8ccc,JourneyDefSchema);}export function isJourneyDef(_0x159fcc){const _0x2e5c75=a147_0x156b;return typeof _0x159fcc===_0x2e5c75(0x18d)&&_0x159fcc!==null&&_0x2e5c75(0x1dd)in _0x159fcc&&_0x159fcc[_0x2e5c75(0x1dd)]===_0x2e5c75(0x19b);}export function generateTemplate(_0x38bc85,_0x20355){const _0x3f00b7=a147_0x156b,_0x569220={'type':_0x3f00b7(0x19b),'name':_0x38bc85,'description':_0x3f00b7(0x190),'reentry':_0x3f00b7(0x1d8),'goal':{'name':'Goal\x20Achieved','segment':_0x3f00b7(0x195)},'stages':[{'name':_0x3f00b7(0x1e0),'description':_0x3f00b7(0x186),'entry_criteria':{'name':'Entry\x20Criteria','segment':_0x20355},'steps':[{'type':_0x3f00b7(0x1e8),'name':_0x3f00b7(0x17c),'with':{'duration':0x1,'unit':_0x3f00b7(0x171)}},{'type':_0x3f00b7(0x1c5),'name':_0x3f00b7(0x1f2),'with':{'activation':_0x3f00b7(0x1ae)}},{'type':'end','name':_0x3f00b7(0x1bf)}]}]};return toYamlString(_0x569220);}function generateUUID(){const _0xe87b56=a147_0x156b;return crypto[_0xe87b56(0x208)]();}export const SEGMENT_REF_PREFIX=a147_0x21078b(0x218);export function parseSegmentRef(_0xaa0607){const _0x49e0aa=a147_0x21078b;if(_0xaa0607[_0x49e0aa(0x220)](SEGMENT_REF_PREFIX))return{'type':_0x49e0aa(0x20c),'name':_0xaa0607['slice'](SEGMENT_REF_PREFIX['length'])};if(/^\d+$/['test'](_0xaa0607))return{'type':'id','name':_0xaa0607};return{'type':_0x49e0aa(0x1f7),'name':_0xaa0607};}export function makeSegmentRef(_0x503129){return''+SEGMENT_REF_PREFIX+_0x503129;}export function isExternalSegmentRef(_0x16964e){const _0x546225=a147_0x21078b;return _0x16964e[_0x546225(0x220)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0xc4679f){const _0xcbb1cf=a147_0x21078b;return!!(_0xc4679f['journeys']&&_0xc4679f['journeys'][_0xcbb1cf(0x1ab)]>0x0);}export function isMultiVersionMode(_0x475a1a){const _0x1f42f6=a147_0x21078b;return!!(_0x475a1a[_0x1f42f6(0x21b)]&&_0x475a1a['versions'][_0x1f42f6(0x1ab)]>0x0);}export function isSingleVersionMode(_0x5c864d){const _0x3f1aaf=a147_0x21078b;return!!(_0x5c864d[_0x3f1aaf(0x1d7)]&&_0x5c864d['stages'][_0x3f1aaf(0x1ab)]>0x0);}export function hasMultipleVersions(_0xb8227a){const _0x382bd3=a147_0x21078b;if(isJourneysArrayMode(_0xb8227a))return(_0xb8227a[_0x382bd3(0x1e7)]?.[_0x382bd3(0x1ab)]||0x0)>0x1;if(isMultiVersionMode(_0xb8227a))return(_0xb8227a[_0x382bd3(0x21b)]?.[_0x382bd3(0x1ab)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x3ed851){const _0x39a6a6=a147_0x21078b;if(isJourneysArrayMode(_0x3ed851))return _0x3ed851;if(isSingleVersionMode(_0x3ed851)){const {stages:_0x45b298,id:_0x325707,version:_0x33f739,version_number:_0x6c3831,..._0x351169}=_0x3ed851;return{..._0x351169,'journeys':[{'version':_0x33f739||'v1','stages':_0x45b298||[],'id':_0x325707,'version_number':_0x6c3831}]};}if(isMultiVersionMode(_0x3ed851)){const {versions:_0x29c09e,..._0x3abee6}=_0x3ed851;return{..._0x3abee6,'journeys':(_0x29c09e||[])[_0x39a6a6(0x217)](_0x2b062d=>({'version':_0x2b062d['name'],'state':_0x2b062d['state'],'latest':_0x2b062d[_0x39a6a6(0x1ad)],'stages':_0x2b062d[_0x39a6a6(0x1d7)],'id':_0x2b062d['id'],'version_number':_0x2b062d['version_number']}))};}return _0x3ed851;}export function normalizeJourneyDef(_0x5e1d83,_0xce0d5d){const _0x287eec=a147_0x21078b,_0xc1516e=normalizeToJourneysFormat(_0x5e1d83),_0x5b5d8e=_0xce0d5d?.['segments']?Object[_0x287eec(0x193)](_0xce0d5d[_0x287eec(0x1e9)]):undefined,_0x5868e6=_0xce0d5d?.[_0x287eec(0x19f)]?Object[_0x287eec(0x193)](_0xce0d5d['activations']):undefined;return{'type':'journey','name':_0xc1516e[_0x287eec(0x1de)],..._0xc1516e[_0x287eec(0x1b5)]!==undefined&&{'description':_0xc1516e[_0x287eec(0x1b5)]},..._0xc1516e[_0x287eec(0x21f)]&&{'goal':normalizeJourneyCriteria(_0xc1516e[_0x287eec(0x21f)])},..._0xc1516e[_0x287eec(0x21c)]!==undefined&&{'reentry':_0xc1516e[_0x287eec(0x21c)]},..._0xc1516e['segments']&&{'segments':normalizeEmbeddedSegments(_0xc1516e[_0x287eec(0x1e9)],_0x5b5d8e)},..._0xc1516e[_0x287eec(0x19f)]&&{'activations':normalizeEmbeddedActivations(_0xc1516e[_0x287eec(0x19f)],_0x5868e6)},..._0xc1516e[_0x287eec(0x1e7)]&&{'journeys':_0xc1516e[_0x287eec(0x1e7)][_0x287eec(0x217)](_0x3e95f3=>normalizeJourneyEntry(_0x3e95f3,_0xc1516e['journeys'][_0x287eec(0x1ab)]===0x1))}};}function a147_0x1b2a(){const _0x223860=['replace','Merge','parentFolder','activations','Activation','get','DecisionPoint','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','timedOutPath','resolveActivation','allowReentry','customizedSplit','stringify','conditionTimeoutUnit','conditions','length','all','latest','your-activation-name','notification','condition','attributes','AbTest','rule','null','description','reentryMode','all_columns','resolveJourneyId','with','exitCriterias','waitStepUnit','unit','end','DaysOfTheWeek','Stage\x20Complete','71541JvJRqj','Duration','ABTest','decision_point','merge','activation','weeks','schedule','next','rootStep','304025ekxDOo','uniqueId','End','resolveActivationId','duration','moveAfter','7qnRyWY','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','timeout','entry_criteria','2968SfUlWf','versions:','toLowerCase','stages','no_reentry','set','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','push','entries','type','name','test','Stage\x201','(missing)','segment_id','journeyName','milestone','has','Expected\x20format:\x0a','journeys','wait','segments','resolveSegmentName','Condition','version_number','activations:','branches','goal:','waitUntilDate','\x20\x20\x20\x20conditions:\x0a','Send\x20Notification','isArray','\x20\x20rule:\x0a','unique_id','reentry_always','embedded','resolveEmbeddedActivationId','\x27.\x0a','journeyStages','10805600jXBJls','journeyBundleName','540397nZmjSA','activation_template_id','\x20\x20\x20\x20type:\x20And\x0a','7238298ynxtRY','ab_test','version','shift','segment','Date','resolveSegmentId','bundle_id','randomUUID','bundle_name','entryCriteria','45032bQgHQI','ref','*Max\x20wait\x20','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','state','resolveActivationName','conditionSegmentId','includes','days_of_week','sort','WaitStep','stageId','map','ref:','\x27:\x20','journeyId','versions','reentry','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','wait_until','goal','startsWith','connector_config','447eJdfke','resolveSegment','daysOfWeek','journeyBundleId','resolveJumpTarget','resolveStageId','add','segments:','waitStep','\x20\x20\x20\x20type:\x20','day','filter','559IPSFOD','relationships','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','launched','40jcTcRm','columns','customized_split','size','waitStepType','Wait\x201\x20Day','behavior','folder_id','steps','definition','data','876oQzZrZ','week','uuid','excluded','First\x20stage\x20of\x20the\x20journey','variants','stage','journeyStageId','segmentId','waitCondition','target','object','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','exit_criteria','Journey\x20description','stageName','jump','keys','journeys:','goal-segment','journeyActivationStepId','find','root_step','trim','resolveEmbeddedSegmentId','journey'];a147_0x1b2a=function(){return _0x223860;};return a147_0x1b2a();}function normalizeJourneyEntry(_0x4d4529,_0x7313db){const _0x2bb6ef=a147_0x21078b;return{...!_0x7313db&&_0x4d4529[_0x2bb6ef(0x202)]!==undefined&&{'version':_0x4d4529[_0x2bb6ef(0x202)]},..._0x4d4529[_0x2bb6ef(0x20f)]!==undefined&&{'state':_0x4d4529[_0x2bb6ef(0x20f)]},...!_0x7313db&&_0x4d4529[_0x2bb6ef(0x1ad)]!==undefined&&{'latest':_0x4d4529['latest']},..._0x4d4529[_0x2bb6ef(0x1ec)]!==undefined&&{'version_number':_0x4d4529['version_number']},..._0x4d4529[_0x2bb6ef(0x21f)]&&{'goal':normalizeJourneyCriteria(_0x4d4529['goal'])},..._0x4d4529[_0x2bb6ef(0x21c)]!==undefined&&{'reentry':_0x4d4529[_0x2bb6ef(0x21c)]},'stages':_0x4d4529[_0x2bb6ef(0x1d7)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0xf0eff6){const _0xd26428=a147_0x21078b;return{'name':_0xf0eff6['name'],..._0xf0eff6[_0xd26428(0x1b5)]!==undefined&&{'description':_0xf0eff6[_0xd26428(0x1b5)]},..._0xf0eff6['entry_criteria']&&{'entry_criteria':normalizeJourneyCriteria(_0xf0eff6[_0xd26428(0x1d3)])},..._0xf0eff6[_0xd26428(0x18f)]&&{'exit_criteria':_0xf0eff6[_0xd26428(0x18f)][_0xd26428(0x217)](normalizeJourneyCriteria)},..._0xf0eff6[_0xd26428(0x1e4)]&&{'milestone':normalizeJourneyCriteria(_0xf0eff6[_0xd26428(0x1e4)])},..._0xf0eff6[_0xd26428(0x17f)]&&{'steps':normalizeStepsWithImplicitNext(_0xf0eff6[_0xd26428(0x17f)])}};}function normalizeStepsWithImplicitNext(_0x4fbd61){return _0x4fbd61['map']((_0x26cc87,_0x5acc04)=>{const _0x15622d=a147_0x156b,_0xb0700e=_0x5acc04<_0x4fbd61[_0x15622d(0x1ab)]-0x1?_0x4fbd61[_0x5acc04+0x1][_0x15622d(0x1de)]:undefined;return normalizeJourneyStep(_0x26cc87,_0xb0700e);});}function normalizeJourneyCriteria(_0x149b6b){const _0x5c7169=a147_0x21078b;return{'name':_0x149b6b[_0x5c7169(0x1de)],..._0x149b6b['description']!==undefined&&{'description':_0x149b6b['description']},'segment':_0x149b6b[_0x5c7169(0x204)],..._0x149b6b[_0x5c7169(0x18c)]&&{'target':normalizeJumpTarget(_0x149b6b[_0x5c7169(0x18c)])}};}function normalizeJourneyStep(_0x5e2aa7,_0x3a39dc){const _0x29eb74=a147_0x21078b,_0x294d9d=_0x5e2aa7[_0x29eb74(0x1c8)]!==undefined&&_0x5e2aa7[_0x29eb74(0x1c8)]!==_0x3a39dc,_0x22964e={'type':_0x5e2aa7['type'],'name':_0x5e2aa7[_0x29eb74(0x1de)],..._0x294d9d&&{'next':_0x5e2aa7[_0x29eb74(0x1c8)]}};if('with'in _0x5e2aa7&&_0x5e2aa7[_0x29eb74(0x1b9)])return{..._0x22964e,'with':normalizeStepParams(_0x5e2aa7[_0x29eb74(0x1dd)],_0x5e2aa7['with'])};return _0x22964e;}function normalizeStepParams(_0x318250,_0x5bb963){const _0x38883d=a147_0x21078b;switch(_0x318250){case _0x38883d(0x1e8):{const _0x4b6bf3=_0x5bb963;let _0x611df0;return _0x4b6bf3['condition']&&(_0x611df0={'segment':_0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x204)],..._0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x1c8)]!==undefined&&{'next':_0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x1c8)]},..._0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x1d2)]&&{'timeout':{'duration':_0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x1d2)][_0x38883d(0x1ce)],'unit':_0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x1d2)][_0x38883d(0x1bc)],..._0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x1d2)][_0x38883d(0x1c8)]!==undefined&&{'next':_0x4b6bf3[_0x38883d(0x1b0)][_0x38883d(0x1d2)]['next']}}}}),{..._0x4b6bf3[_0x38883d(0x1ce)]!==undefined&&{'duration':_0x4b6bf3[_0x38883d(0x1ce)]},..._0x4b6bf3['unit']!==undefined&&{'unit':_0x4b6bf3[_0x38883d(0x1bc)]},..._0x4b6bf3['wait_until']!==undefined&&{'wait_until':_0x4b6bf3[_0x38883d(0x21e)]},..._0x4b6bf3[_0x38883d(0x213)]!==undefined&&{'days_of_week':_0x4b6bf3[_0x38883d(0x213)]},..._0x611df0&&{'condition':_0x611df0}};}case _0x38883d(0x1c5):{const _0x254acd=_0x5bb963;return{'activation':_0x254acd[_0x38883d(0x1c5)]};}case _0x38883d(0x1c3):{const _0x3a5d5a=_0x5bb963;return{'branches':_0x3a5d5a[_0x38883d(0x1ee)][_0x38883d(0x217)](normalizeDecisionBranch)};}case'ab_test':{const _0x70cbc7=_0x5bb963;return{..._0x70cbc7['customized_split']!==undefined&&{'customized_split':_0x70cbc7[_0x38883d(0x179)]},..._0x70cbc7[_0x38883d(0x1f5)]!==undefined&&{'unique_id':_0x70cbc7[_0x38883d(0x1f5)]},'variants':_0x70cbc7[_0x38883d(0x187)][_0x38883d(0x217)](normalizeAbTestVariant)};}case'jump':{const _0x1f8b9a=_0x5bb963;return{'target':normalizeJumpTarget(_0x1f8b9a['target'])};}default:return _0x5bb963;}}function normalizeDecisionBranch(_0x57c917){const _0x128e3=a147_0x21078b;return{'name':_0x57c917['name'],..._0x57c917['segment']!==undefined&&{'segment':_0x57c917[_0x128e3(0x204)]},..._0x57c917['excluded']!==undefined&&{'excluded':_0x57c917[_0x128e3(0x185)]},..._0x57c917[_0x128e3(0x1c8)]!==undefined&&{'next':_0x57c917[_0x128e3(0x1c8)]}};}function normalizeAbTestVariant(_0x42c20b){const _0x3495e1=a147_0x21078b;return{..._0x42c20b['id']!==undefined&&{'id':_0x42c20b['id']},'name':_0x42c20b[_0x3495e1(0x1de)],'percentage':_0x42c20b['percentage'],..._0x42c20b[_0x3495e1(0x1c8)]!==undefined&&{'next':_0x42c20b[_0x3495e1(0x1c8)]}};}function normalizeJumpTarget(_0x464e4c){const _0x58c14c=a147_0x21078b;return{'journey':_0x464e4c[_0x58c14c(0x19b)],'stage':_0x464e4c['stage'],..._0x464e4c['bundle_id']!==undefined&&{'bundle_id':_0x464e4c[_0x58c14c(0x207)]}};}function normalizeEmbeddedSegments(_0x151609,_0x16abf2){const _0x53479b=a147_0x21078b,_0x2dc680={},_0x4acd93=Object[_0x53479b(0x193)](_0x151609),_0xef854=_0x16abf2?[..._0x16abf2[_0x53479b(0x172)](_0x34c9a9=>_0x4acd93[_0x53479b(0x212)](_0x34c9a9)),..._0x4acd93['filter'](_0x1e3ee8=>!_0x16abf2[_0x53479b(0x212)](_0x1e3ee8))['sort']()]:_0x4acd93['sort']();for(const _0x5284ad of _0xef854){const _0x41710d=_0x151609[_0x5284ad];if(_0x41710d['rule']){const _0x4b76cc=_0x41710d[_0x53479b(0x1b3)];if(_0x4b76cc[_0x53479b(0x1dd)]!=='And'&&_0x4b76cc['type']!=='Or'){const _0x587d93=_0x4b76cc['type']??_0x53479b(0x1e1);throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x53479b(0x1a3)+_0x5284ad+_0x53479b(0x219)+(_0x53479b(0x1da)+_0x587d93+_0x53479b(0x1f9))+_0x53479b(0x1e6)+_0x53479b(0x1f4)+_0x53479b(0x1ff)+_0x53479b(0x1f1)+_0x53479b(0x18e)+_0x53479b(0x21d)+_0x53479b(0x20e));}if(!_0x4b76cc[_0x53479b(0x1aa)]||!Array['isArray'](_0x4b76cc[_0x53479b(0x1aa)]))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x53479b(0x1a3)+_0x5284ad+_0x53479b(0x219)+_0x53479b(0x175)+_0x53479b(0x1e6)+_0x53479b(0x1f4)+(_0x53479b(0x170)+_0x4b76cc[_0x53479b(0x1dd)]+'\x0a')+'\x20\x20\x20\x20conditions:\x0a'+_0x53479b(0x18e)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x53479b(0x20e));}_0x2dc680[_0x5284ad]={..._0x41710d[_0x53479b(0x1b5)]&&_0x41710d['description'][_0x53479b(0x199)]()&&{'description':_0x41710d[_0x53479b(0x1b5)]},..._0x41710d[_0x53479b(0x1b3)]&&{'rule':deepSortObject(_0x41710d[_0x53479b(0x1b3)])}};}return _0x2dc680;}function normalizeEmbeddedActivations(_0x15a2d6,_0x2af66c){const _0x504529=a147_0x21078b,_0x50b692={},_0x18da7e=Object[_0x504529(0x193)](_0x15a2d6),_0x20b2d3=_0x2af66c?[..._0x2af66c[_0x504529(0x172)](_0x1108ac=>_0x18da7e[_0x504529(0x212)](_0x1108ac)),..._0x18da7e[_0x504529(0x172)](_0x39c6b7=>!_0x2af66c['includes'](_0x39c6b7))['sort']()]:_0x18da7e[_0x504529(0x214)]();for(const _0x5ab496 of _0x20b2d3){const _0x1af6f4=_0x15a2d6[_0x5ab496];_0x50b692[_0x5ab496]={'name':_0x1af6f4['name'],'connection':_0x1af6f4['connection'],..._0x1af6f4[_0x504529(0x1b5)]!==undefined&&{'description':_0x1af6f4[_0x504529(0x1b5)]},..._0x1af6f4[_0x504529(0x1b7)]!==undefined&&{'all_columns':_0x1af6f4[_0x504529(0x1b7)]},..._0x1af6f4[_0x504529(0x178)]!==undefined&&{'columns':_0x1af6f4[_0x504529(0x178)]},..._0x1af6f4[_0x504529(0x17d)]!==undefined&&{'behavior':_0x1af6f4[_0x504529(0x17d)]},..._0x1af6f4[_0x504529(0x1c7)]!==undefined&&{'schedule':_0x1af6f4[_0x504529(0x1c7)]},..._0x1af6f4[_0x504529(0x1af)]!==undefined&&{'notification':_0x1af6f4[_0x504529(0x1af)]},..._0x1af6f4[_0x504529(0x221)]!==undefined&&{'connector_config':_0x1af6f4[_0x504529(0x221)]},..._0x1af6f4[_0x504529(0x1fe)]!==undefined&&{'activation_template_id':_0x1af6f4[_0x504529(0x1fe)]}};}return _0x50b692;}export function getActiveStages(_0x32a7de){const _0x28cc41=a147_0x21078b;if(isJourneysArrayMode(_0x32a7de)){const _0x20b70b=_0x32a7de[_0x28cc41(0x1e7)]||[],_0x1868b6=_0x20b70b[_0x28cc41(0x197)](_0x43a216=>_0x43a216[_0x28cc41(0x1ad)]===!![])||_0x20b70b[0x0];return _0x1868b6?.[_0x28cc41(0x1d7)]||[];}if(isSingleVersionMode(_0x32a7de))return _0x32a7de['stages']||[];if(isMultiVersionMode(_0x32a7de)){const _0x397731=_0x32a7de[_0x28cc41(0x21b)]||[],_0x5d1b42=_0x397731[_0x28cc41(0x197)](_0x114e6e=>_0x114e6e[_0x28cc41(0x1ad)]===!![])||_0x397731[0x0];return _0x5d1b42?.[_0x28cc41(0x1d7)]||[];}return[];}export function getLatestJourneyEntry(_0x4f3fc3){const _0x3f7c1b=a147_0x21078b;if(isJourneysArrayMode(_0x4f3fc3)){const _0x1913b1=_0x4f3fc3[_0x3f7c1b(0x1e7)]||[];return _0x1913b1[_0x3f7c1b(0x197)](_0x93ff18=>_0x93ff18[_0x3f7c1b(0x1ad)]===!![])||_0x1913b1[0x0];}if(isMultiVersionMode(_0x4f3fc3)){const _0x1ad8e7=_0x4f3fc3[_0x3f7c1b(0x21b)]||[],_0x46fad9=_0x1ad8e7[_0x3f7c1b(0x197)](_0x19a47a=>_0x19a47a[_0x3f7c1b(0x1ad)]===!![])||_0x1ad8e7[0x0];if(_0x46fad9)return{'version':_0x46fad9['name'],'state':_0x46fad9[_0x3f7c1b(0x20f)],'latest':_0x46fad9['latest'],'stages':_0x46fad9[_0x3f7c1b(0x1d7)],'id':_0x46fad9['id'],'version_number':_0x46fad9[_0x3f7c1b(0x1ec)]};}if(isSingleVersionMode(_0x4f3fc3))return{'version':_0x4f3fc3[_0x3f7c1b(0x202)]||'v1','state':'draft','stages':_0x4f3fc3[_0x3f7c1b(0x1d7)]||[],'id':_0x4f3fc3['id'],'version_number':_0x4f3fc3[_0x3f7c1b(0x1ec)],'goal':_0x4f3fc3[_0x3f7c1b(0x21f)],'reentry':_0x4f3fc3[_0x3f7c1b(0x21c)]};return undefined;}export function getLatestVersion(_0x4d0489){const _0x7d3829=a147_0x21078b;if(!isMultiVersionMode(_0x4d0489))return undefined;const _0x3db89f=_0x4d0489[_0x7d3829(0x21b)]||[];return _0x3db89f[_0x7d3829(0x197)](_0x1c4845=>_0x1c4845[_0x7d3829(0x1ad)]===!![])||_0x3db89f[0x0];}function a147_0x156b(_0x87e820,_0x5bac62){_0x87e820=_0x87e820-0x16c;const _0x1b2ac5=a147_0x1b2a();let _0x156b1c=_0x1b2ac5[_0x87e820];return _0x156b1c;}export function getEffectiveGoal(_0x1e6619){const _0x4d1380=a147_0x21078b,_0xf5231b=getLatestJourneyEntry(_0x1e6619);return _0xf5231b?.[_0x4d1380(0x21f)]||_0x1e6619[_0x4d1380(0x21f)];}export function getEffectiveReentry(_0x55fdc7){const _0x3e043a=a147_0x21078b,_0x26d5fd=getLatestJourneyEntry(_0x55fdc7);return _0x26d5fd?.[_0x3e043a(0x21c)]||_0x55fdc7[_0x3e043a(0x21c)];}export function collectSegmentRefs(_0x18237d){const _0x5c4bfc=a147_0x21078b,_0x2d065a=new Set();_0x18237d['goal']?.[_0x5c4bfc(0x204)]&&_0x2d065a[_0x5c4bfc(0x16d)](_0x18237d[_0x5c4bfc(0x21f)][_0x5c4bfc(0x204)]);const _0x579255=_0x56eed0=>{const _0x4c46a0=_0x5c4bfc;for(const _0x30940a of _0x56eed0){_0x30940a[_0x4c46a0(0x1d3)]?.['segment']&&_0x2d065a[_0x4c46a0(0x16d)](_0x30940a[_0x4c46a0(0x1d3)]['segment']);if(_0x30940a['exit_criteria'])for(const _0x21f28e of _0x30940a[_0x4c46a0(0x18f)]){_0x21f28e[_0x4c46a0(0x204)]&&_0x2d065a[_0x4c46a0(0x16d)](_0x21f28e[_0x4c46a0(0x204)]);}_0x30940a[_0x4c46a0(0x1e4)]?.[_0x4c46a0(0x204)]&&_0x2d065a['add'](_0x30940a[_0x4c46a0(0x1e4)][_0x4c46a0(0x204)]);if(_0x30940a[_0x4c46a0(0x17f)])for(const _0x318839 of _0x30940a[_0x4c46a0(0x17f)]){if(_0x318839[_0x4c46a0(0x1dd)]===_0x4c46a0(0x1c3)){const _0x3ab993=_0x318839;for(const _0x4a338c of _0x3ab993[_0x4c46a0(0x1b9)]['branches']){_0x4a338c[_0x4c46a0(0x204)]&&_0x2d065a[_0x4c46a0(0x16d)](_0x4a338c['segment']);}}else{if(_0x318839[_0x4c46a0(0x1dd)]===_0x4c46a0(0x1e8)){const _0x1d00dd=_0x318839;_0x1d00dd[_0x4c46a0(0x1b9)][_0x4c46a0(0x1b0)]?.[_0x4c46a0(0x204)]&&_0x2d065a[_0x4c46a0(0x16d)](_0x1d00dd[_0x4c46a0(0x1b9)][_0x4c46a0(0x1b0)]['segment']);}}}}};_0x18237d[_0x5c4bfc(0x1d7)]&&_0x579255(_0x18237d['stages']);if(_0x18237d[_0x5c4bfc(0x21b)])for(const _0xb84901 of _0x18237d[_0x5c4bfc(0x21b)]){_0x579255(_0xb84901['stages']);}return _0x2d065a;}export function validateSegmentRefs(_0x334bfd){const _0x24a19b=a147_0x21078b,_0x551617=[],_0x13eed4=collectSegmentRefs(_0x334bfd),_0x5db76f=new Set(Object[_0x24a19b(0x193)](_0x334bfd[_0x24a19b(0x1e9)]||{}));for(const _0xf54074 of _0x13eed4){const _0x303faa=parseSegmentRef(_0xf54074);_0x303faa[_0x24a19b(0x1dd)]==='embedded'&&!_0x5db76f[_0x24a19b(0x1e5)](_0x303faa[_0x24a19b(0x1de)])&&_0x551617[_0x24a19b(0x1db)]('Unknown\x20segment\x20\x22'+_0x303faa['name']+_0x24a19b(0x1d1)+_0x303faa[_0x24a19b(0x1de)]+'\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.');}return _0x551617;}export function collectSegmentIdsFromJourneyApi(_0x4534f8){const _0x4c4992=a147_0x21078b,_0x5a8a4d=new Set();_0x4534f8[_0x4c4992(0x1b1)][_0x4c4992(0x21f)]?.[_0x4c4992(0x18a)]&&_0x5a8a4d[_0x4c4992(0x16d)](_0x4534f8[_0x4c4992(0x1b1)]['goal'][_0x4c4992(0x18a)]);const _0x27cd38=_0x4534f8[_0x4c4992(0x1b1)][_0x4c4992(0x1fa)];if(Array[_0x4c4992(0x1f3)](_0x27cd38))for(const _0x4b28a5 of _0x27cd38){_0x4b28a5[_0x4c4992(0x20a)]?.[_0x4c4992(0x18a)]&&_0x5a8a4d['add'](_0x4b28a5[_0x4c4992(0x20a)][_0x4c4992(0x18a)]);const _0x363f73=_0x4b28a5['exitCriterias']??_0x4b28a5['exitCriteria'];if(Array[_0x4c4992(0x1f3)](_0x363f73))for(const _0x464860 of _0x363f73){_0x464860[_0x4c4992(0x18a)]&&_0x5a8a4d[_0x4c4992(0x16d)](_0x464860[_0x4c4992(0x18a)]);}_0x4b28a5['milestone']?.[_0x4c4992(0x18a)]&&_0x5a8a4d[_0x4c4992(0x16d)](_0x4b28a5['milestone'][_0x4c4992(0x18a)]);if(_0x4b28a5[_0x4c4992(0x17f)]&&typeof _0x4b28a5[_0x4c4992(0x17f)]===_0x4c4992(0x18d)){const _0x3096f4=Array[_0x4c4992(0x1f3)](_0x4b28a5[_0x4c4992(0x17f)])?_0x4b28a5['steps']:Object['values'](_0x4b28a5[_0x4c4992(0x17f)]);for(const _0x3aaa7e of _0x3096f4){_0x3aaa7e['waitCondition']?.[_0x4c4992(0x18a)]&&_0x5a8a4d[_0x4c4992(0x16d)](_0x3aaa7e[_0x4c4992(0x18b)]['segmentId']);const _0x16ee0b=_0x3aaa7e;_0x16ee0b[_0x4c4992(0x211)]&&_0x5a8a4d['add'](_0x16ee0b[_0x4c4992(0x211)]);if(Array[_0x4c4992(0x1f3)](_0x16ee0b['conditions']))for(const _0x12aa6b of _0x16ee0b[_0x4c4992(0x1aa)]){_0x12aa6b[_0x4c4992(0x18a)]&&_0x5a8a4d[_0x4c4992(0x16d)](_0x12aa6b['segmentId']);}if(Array['isArray'](_0x3aaa7e['branches']))for(const _0x5c07c4 of _0x3aaa7e[_0x4c4992(0x1ee)]){_0x5c07c4['segmentId']&&_0x5a8a4d['add'](_0x5c07c4[_0x4c4992(0x18a)]);}}}}return _0x5a8a4d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x4dd79f=a148_0x42b2;(function(_0x193a06,_0x145b4e){const _0x40fb7d=a148_0x42b2,_0x31c62b=_0x193a06();while(!![]){try{const _0x15b54a=-parseInt(_0x40fb7d(0x15b))/0x1+-parseInt(_0x40fb7d(0x162))/0x2+-parseInt(_0x40fb7d(0x15d))/0x3*(parseInt(_0x40fb7d(0x165))/0x4)+-parseInt(_0x40fb7d(0x17b))/0x5+-parseInt(_0x40fb7d(0x184))/0x6+parseInt(_0x40fb7d(0x17f))/0x7+parseInt(_0x40fb7d(0x172))/0x8*(parseInt(_0x40fb7d(0x16f))/0x9);if(_0x15b54a===_0x145b4e)break;else _0x31c62b['push'](_0x31c62b['shift']());}catch(_0x430510){_0x31c62b['push'](_0x31c62b['shift']());}}}(a148_0x136e,0xe9cef));function a148_0x42b2(_0x5d6561,_0x4186ac){_0x5d6561=_0x5d6561-0x14a;const _0x136edd=a148_0x136e();let _0x42b28b=_0x136edd[_0x5d6561];return _0x42b28b;}export const DEFAULT_TIME_RANGE=a148_0x4dd79f(0x164);function a148_0x136e(){const _0x3772f2=['\x20IS\x20NOT\x20NULL\x0a','push','length','behaviors','\x20m\x0aJOIN\x20','find','map','\x20AS\x20','\x20=\x20a.','\x20b\x0a\x20\x20ON\x20m.','columns','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','table','\x20=\x20','841141qidcHl','\x0aLIMIT\x20','3232512IOaxJF','all_columns','forEach','parent_key','m.*','1679286xcAFxB','\x0aSELECT\x20','-1d','4IMpZPg','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','child_key','database','test','trim','\x20LIMIT\x200','LEFT\x20JOIN\x20','\x0aFROM\x20','\x20a\x0a\x20\x20ON\x20m.','54mLlUfm','(all\x20columns)','\x0aSELECT\x20m.','6533544LwriFP','attributes','\x20LIMIT\x20','master','SELECT\x20*\x20FROM\x20','\x20FROM\x20','b.*','source','column','552420ZGQupn','name','\x0aLIMIT\x200\x0a','join','774186hSUpNi','label','\x27)\x0a','\x0aWHERE\x20a.','SELECT\x20','7105830XHidvE','\x20=\x20b.','\x20m\x0a','toLowerCase','\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20'];a148_0x136e=function(){return _0x3772f2;};return a148_0x136e();}export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x1203bb,_0x473604,_0x3da288){const _0x20162=a148_0x4dd79f,_0x1b5881=_0x3da288&&_0x3da288[_0x20162(0x14f)]>0x0?_0x3da288[_0x20162(0x17e)](',\x20'):'*';return _0x20162(0x183)+_0x1b5881+_0x20162(0x177)+_0x1203bb+'.'+_0x473604+_0x20162(0x16b);}export function generateMasterCountSQL(_0x2033be){const _0x540c1d=a148_0x4dd79f,{database:_0x524145,table:_0x1f630d}=_0x2033be[_0x540c1d(0x175)];return'SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20'+_0x524145+'.'+_0x1f630d;}export function generateMasterSampleSQL(_0x1da2a4,_0x58ac10=0x5){const _0x1e03b8=a148_0x4dd79f,{database:_0x5510f3,table:_0x44aa6c}=_0x1da2a4[_0x1e03b8(0x175)];return _0x1e03b8(0x176)+_0x5510f3+'.'+_0x44aa6c+_0x1e03b8(0x174)+_0x58ac10;}export function generateAttributeCoverageSQL(_0x3fd70b,_0x9207){const _0x508119=a148_0x4dd79f,_0x36a3e8=_0x3fd70b[_0x508119(0x175)];return(_0x508119(0x14c)+_0x36a3e8[_0x508119(0x168)]+'.'+_0x36a3e8[_0x508119(0x159)]+'\x20m\x0aLEFT\x20JOIN\x20'+_0x9207[_0x508119(0x179)][_0x508119(0x168)]+'.'+_0x9207['source'][_0x508119(0x159)]+_0x508119(0x16e)+_0x9207[_0x508119(0x17e)]['parent_key']+_0x508119(0x155)+_0x9207['join'][_0x508119(0x167)]+_0x508119(0x182)+_0x9207[_0x508119(0x17e)][_0x508119(0x167)]+_0x508119(0x14d))[_0x508119(0x16a)]();}export function generateBehaviorStatsSQL(_0x2beda2,_0x188c0d,_0x17ce1d=DEFAULT_TIME_RANGE){const _0x3a1edc=a148_0x4dd79f,_0x267692=_0x2beda2[_0x3a1edc(0x175)];return(_0x3a1edc(0x158)+_0x188c0d[_0x3a1edc(0x17e)][_0x3a1edc(0x160)]+')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20'+_0x267692[_0x3a1edc(0x168)]+'.'+_0x267692[_0x3a1edc(0x159)]+_0x3a1edc(0x151)+_0x188c0d[_0x3a1edc(0x179)][_0x3a1edc(0x168)]+'.'+_0x188c0d[_0x3a1edc(0x179)][_0x3a1edc(0x159)]+_0x3a1edc(0x156)+_0x188c0d[_0x3a1edc(0x17e)]['parent_key']+_0x3a1edc(0x185)+_0x188c0d['join'][_0x3a1edc(0x167)]+_0x3a1edc(0x166)+_0x17ce1d+_0x3a1edc(0x181))['trim']();}export function generateAttributeSampleSQL(_0xb556b3,_0x25b5aa,_0x2d07a4=0x5){const _0x409e2a=a148_0x4dd79f,_0x4d62e5=_0xb556b3[_0x409e2a(0x175)],_0x50e801=_0x25b5aa[_0x409e2a(0x17e)]['parent_key'],_0x54f70e=_0x25b5aa[_0x409e2a(0x157)][_0x409e2a(0x153)](_0x210bf9=>'a.'+_0x210bf9[_0x409e2a(0x17a)])[_0x409e2a(0x17e)](',\x20');return(_0x409e2a(0x171)+_0x50e801+',\x20'+_0x54f70e+_0x409e2a(0x16d)+_0x4d62e5[_0x409e2a(0x168)]+'.'+_0x4d62e5[_0x409e2a(0x159)]+'\x20m\x0aJOIN\x20'+_0x25b5aa[_0x409e2a(0x179)][_0x409e2a(0x168)]+'.'+_0x25b5aa['source']['table']+_0x409e2a(0x16e)+_0x25b5aa[_0x409e2a(0x17e)][_0x409e2a(0x160)]+_0x409e2a(0x155)+_0x25b5aa[_0x409e2a(0x17e)][_0x409e2a(0x167)]+_0x409e2a(0x15c)+_0x2d07a4+'\x0a')[_0x409e2a(0x16a)]();}export function generateBehaviorSampleSQL(_0x386917,_0x1907ff,_0x5be1dd=0x5,_0x14ebf1=DEFAULT_TIME_RANGE){const _0x504942=a148_0x4dd79f,_0x393c45=_0x386917[_0x504942(0x175)],_0x3020af=_0x1907ff[_0x504942(0x17e)]['parent_key'];let _0x389a44;if(_0x1907ff[_0x504942(0x15e)])_0x389a44='b.*';else _0x1907ff['columns']&&_0x1907ff[_0x504942(0x157)]['length']>0x0?_0x389a44=_0x1907ff[_0x504942(0x157)]['map'](_0x2a27ad=>'b.'+_0x2a27ad[_0x504942(0x17a)])['join'](',\x20'):_0x389a44=_0x504942(0x178);return('\x0aSELECT\x20m.'+_0x3020af+',\x20'+_0x389a44+'\x0aFROM\x20'+_0x393c45[_0x504942(0x168)]+'.'+_0x393c45['table']+_0x504942(0x151)+_0x1907ff[_0x504942(0x179)][_0x504942(0x168)]+'.'+_0x1907ff[_0x504942(0x179)][_0x504942(0x159)]+'\x20b\x0a\x20\x20ON\x20m.'+_0x1907ff[_0x504942(0x17e)]['parent_key']+_0x504942(0x185)+_0x1907ff[_0x504942(0x17e)][_0x504942(0x167)]+_0x504942(0x166)+_0x14ebf1+'\x27)\x0aLIMIT\x20'+_0x5be1dd+'\x0a')[_0x504942(0x16a)]();}function quoteIdentifier(_0x481d76){const _0x491496=a148_0x4dd79f;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/[_0x491496(0x169)](_0x481d76))return'\x22'+_0x481d76['replace'](/"/g,'\x22\x22')+'\x22';return _0x481d76;}export function generateEnrichedSQL(_0xd3081e,_0x315ad2=0x5){const _0x446e88=a148_0x4dd79f,_0x5ec52d=_0xd3081e[_0x446e88(0x175)],_0x4c2d45=_0xd3081e[_0x446e88(0x173)]||[];if(_0x4c2d45[_0x446e88(0x14f)]===0x0)return'SELECT\x20*\x20FROM\x20'+_0x5ec52d[_0x446e88(0x168)]+'.'+_0x5ec52d[_0x446e88(0x159)]+_0x446e88(0x174)+_0x315ad2;const _0x402b97=[_0x446e88(0x161)],_0x5d50fd=[];return _0x4c2d45[_0x446e88(0x15f)]((_0x957747,_0x4233d9)=>{const _0xca3a0c=_0x446e88,_0x266080='a'+_0x4233d9;_0x957747[_0xca3a0c(0x157)][_0xca3a0c(0x15f)](_0x2b184a=>{const _0x3bc4e0=_0xca3a0c,_0x4a438b=quoteIdentifier(_0x2b184a['label']||_0x2b184a[_0x3bc4e0(0x17a)]);_0x402b97[_0x3bc4e0(0x14e)](_0x266080+'.'+_0x2b184a[_0x3bc4e0(0x17a)]+_0x3bc4e0(0x154)+_0x4a438b);}),_0x5d50fd[_0xca3a0c(0x14e)](_0xca3a0c(0x16c)+_0x957747['source']['database']+'.'+_0x957747[_0xca3a0c(0x179)][_0xca3a0c(0x159)]+'\x20'+_0x266080+'\x0a\x20\x20ON\x20m.'+_0x957747['join'][_0xca3a0c(0x160)]+_0xca3a0c(0x15a)+_0x266080+'.'+_0x957747[_0xca3a0c(0x17e)]['child_key']);}),(_0x446e88(0x163)+_0x402b97[_0x446e88(0x17e)](',\x20')+_0x446e88(0x16d)+_0x5ec52d[_0x446e88(0x168)]+'.'+_0x5ec52d[_0x446e88(0x159)]+_0x446e88(0x14a)+_0x5d50fd['join']('\x0a')+_0x446e88(0x15c)+_0x315ad2+'\x0a')[_0x446e88(0x16a)]();}export function generateAttributeSchemaSQL(_0x16b78b,_0x562386){const _0x2f9f75=a148_0x4dd79f,_0x164cf9=_0x16b78b['master'],_0x43cb05=_0x562386['join']['parent_key'],_0x4acbfc=_0x562386[_0x2f9f75(0x157)][_0x2f9f75(0x153)](_0x554232=>'a.'+_0x554232[_0x2f9f75(0x17a)])[_0x2f9f75(0x17e)](',\x20');return(_0x2f9f75(0x171)+_0x43cb05+',\x20'+_0x4acbfc+'\x0aFROM\x20'+_0x164cf9[_0x2f9f75(0x168)]+'.'+_0x164cf9['table']+_0x2f9f75(0x151)+_0x562386[_0x2f9f75(0x179)]['database']+'.'+_0x562386[_0x2f9f75(0x179)]['table']+_0x2f9f75(0x16e)+_0x562386[_0x2f9f75(0x17e)][_0x2f9f75(0x160)]+_0x2f9f75(0x155)+_0x562386[_0x2f9f75(0x17e)][_0x2f9f75(0x167)]+_0x2f9f75(0x17d))[_0x2f9f75(0x16a)]();}export function generateBehaviorSchemaSQL(_0xc8d08a,_0xd843d6){const _0x546d5d=a148_0x4dd79f,_0x430cbc=_0xc8d08a[_0x546d5d(0x175)],_0x4aa3e0=_0xd843d6[_0x546d5d(0x17e)][_0x546d5d(0x160)];let _0xa8052e;if(_0xd843d6[_0x546d5d(0x15e)])_0xa8052e=_0x546d5d(0x178);else _0xd843d6[_0x546d5d(0x157)]&&_0xd843d6[_0x546d5d(0x157)][_0x546d5d(0x14f)]>0x0?_0xa8052e=_0xd843d6[_0x546d5d(0x157)]['map'](_0x20f50f=>'b.'+_0x20f50f[_0x546d5d(0x17a)])['join'](',\x20'):_0xa8052e='b.*';return(_0x546d5d(0x171)+_0x4aa3e0+',\x20'+_0xa8052e+'\x0aFROM\x20'+_0x430cbc[_0x546d5d(0x168)]+'.'+_0x430cbc[_0x546d5d(0x159)]+'\x20m\x0aJOIN\x20'+_0xd843d6['source'][_0x546d5d(0x168)]+'.'+_0xd843d6[_0x546d5d(0x179)][_0x546d5d(0x159)]+'\x20b\x0a\x20\x20ON\x20m.'+_0xd843d6['join'][_0x546d5d(0x160)]+_0x546d5d(0x185)+_0xd843d6[_0x546d5d(0x17e)]['child_key']+'\x0aLIMIT\x200\x0a')[_0x546d5d(0x16a)]();}export function getAttributeColumns(_0x4d987a){const _0x392531=a148_0x4dd79f;return _0x4d987a['columns']['map'](_0x2bd498=>({'label':_0x2bd498['label']||_0x2bd498[_0x392531(0x17a)],'column':_0x2bd498[_0x392531(0x17a)]}));}export function getBehaviorColumns(_0x1b8c9c){const _0x2394cb=a148_0x4dd79f;if(_0x1b8c9c['all_columns'])return[{'label':_0x2394cb(0x170),'column':'*'}];if(_0x1b8c9c['columns']&&_0x1b8c9c[_0x2394cb(0x157)]['length']>0x0)return _0x1b8c9c[_0x2394cb(0x157)][_0x2394cb(0x153)](_0x5d8e58=>({'label':_0x5d8e58[_0x2394cb(0x180)]||_0x5d8e58[_0x2394cb(0x17a)],'column':_0x5d8e58['column']}));return[{'label':_0x2394cb(0x170),'column':'*'}];}export function findAttributeByName(_0x3677b1,_0x28027c){const _0x359008=a148_0x4dd79f;return _0x3677b1[_0x359008(0x173)]?.[_0x359008(0x152)](_0x1a5569=>_0x1a5569[_0x359008(0x17c)][_0x359008(0x14b)]()===_0x28027c[_0x359008(0x14b)]());}export function findBehaviorByName(_0x47f7cd,_0xc35ef8){const _0x3bca55=a148_0x4dd79f;return _0x47f7cd[_0x3bca55(0x150)]?.[_0x3bca55(0x152)](_0x23f672=>_0x23f672[_0x3bca55(0x17c)][_0x3bca55(0x14b)]()===_0xc35ef8[_0x3bca55(0x14b)]());}
|