@treasuredata/tdx 0.29.2 → 0.29.4
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/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.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/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/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/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/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/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/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/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/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-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/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/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/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/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.d.ts +17 -0
- package/dist/utils/github-releases.d.ts.map +1 -0
- package/dist/utils/github-releases.js +1 -0
- package/dist/utils/github-releases.js.map +1 -0
- 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
|
-
|
|
1
|
+
(function(_0x23ed7d,_0x5e5202){const _0x5c6bb6=a120_0x1d39,_0x17bb00=_0x23ed7d();while(!![]){try{const _0x3f8857=-parseInt(_0x5c6bb6(0x122))/0x1*(parseInt(_0x5c6bb6(0x12a))/0x2)+-parseInt(_0x5c6bb6(0x117))/0x3*(parseInt(_0x5c6bb6(0x126))/0x4)+parseInt(_0x5c6bb6(0x11e))/0x5*(-parseInt(_0x5c6bb6(0x12c))/0x6)+-parseInt(_0x5c6bb6(0x11b))/0x7*(-parseInt(_0x5c6bb6(0x119))/0x8)+parseInt(_0x5c6bb6(0x11c))/0x9*(parseInt(_0x5c6bb6(0x124))/0xa)+parseInt(_0x5c6bb6(0x11a))/0xb*(parseInt(_0x5c6bb6(0x11f))/0xc)+parseInt(_0x5c6bb6(0x11d))/0xd;if(_0x3f8857===_0x5e5202)break;else _0x17bb00['push'](_0x17bb00['shift']());}catch(_0x385e0c){_0x17bb00['push'](_0x17bb00['shift']());}}}(a120_0x5027,0x5b523));import{readdirSync,statSync}from'fs';function a120_0x1d39(_0x298b4f,_0x28bc32){_0x298b4f=_0x298b4f-0x117;const _0x502746=a120_0x5027();let _0x1d3928=_0x502746[_0x298b4f];return _0x1d3928;}function a120_0x5027(){const _0x458f86=['652201fNlZhT','116515Cyouzq','122058eHHzeP','1336036IxhImB','5EiIzlQ','12pPGQMs','endsWith','.yaml','391204LUtEXH','isFile','410wuYlhI','relative','88nlqFHA','.yml','join','name','2Toagha','push','664002tWHUlI','3447Zmfbun','dirname','88STJDpO'];a120_0x5027=function(){return _0x458f86;};return a120_0x5027();}import a120_0x2fd7d4 from'path';export function findYamlFiles(_0x13b410){const _0x127f71=[];function _0x34306e(_0x194c66){const _0x58f0ae=a120_0x1d39,_0x3ad1ea=readdirSync(_0x194c66,{'withFileTypes':!![]});for(const _0xb72535 of _0x3ad1ea){const _0x5e50cc=a120_0x2fd7d4[_0x58f0ae(0x128)](_0x194c66,_0xb72535[_0x58f0ae(0x129)]);if(_0xb72535['isDirectory']())_0x34306e(_0x5e50cc);else(_0xb72535[_0x58f0ae(0x129)][_0x58f0ae(0x120)](_0x58f0ae(0x127))||_0xb72535[_0x58f0ae(0x129)][_0x58f0ae(0x120)](_0x58f0ae(0x121)))&&_0x127f71[_0x58f0ae(0x12b)](_0x5e50cc);}}return _0x34306e(_0x13b410),_0x127f71;}export function discoverYamlFiles(_0x449851){const _0x354892=findYamlFiles(_0x449851);return _0x354892['map'](_0x292e48=>{const _0x49db21=a120_0x1d39,_0x3e1a12=a120_0x2fd7d4[_0x49db21(0x125)](_0x449851,_0x292e48),_0x5e1fad=a120_0x2fd7d4[_0x49db21(0x118)](_0x3e1a12);return{'absolutePath':_0x292e48,'relativePath':_0x3e1a12,'folderPath':_0x5e1fad==='.'?'':_0x5e1fad};});}export function isYamlFile(_0x15622f){const _0x2eab56=a120_0x1d39;try{const _0x54d705=statSync(_0x15622f);if(!_0x54d705[_0x2eab56(0x123)]())return![];const _0x2b0662=a120_0x2fd7d4['extname'](_0x15622f)['toLowerCase']();return _0x2b0662===_0x2eab56(0x127)||_0x2b0662===_0x2eab56(0x121);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a121_0x57c4(_0x27e997,_0x4df9b0){_0x27e997=_0x27e997-0x11c;const _0x5015d7=a121_0x5015();let _0x57c4fe=_0x5015d7[_0x27e997];return _0x57c4fe;}(function(_0x31195d,_0x5c883b){const _0x11bf05=a121_0x57c4,_0x3b463d=_0x31195d();while(!![]){try{const _0x1c58c2=-parseInt(_0x11bf05(0x11d))/0x1*(-parseInt(_0x11bf05(0x14e))/0x2)+parseInt(_0x11bf05(0x11c))/0x3*(-parseInt(_0x11bf05(0x122))/0x4)+parseInt(_0x11bf05(0x152))/0x5*(parseInt(_0x11bf05(0x160))/0x6)+-parseInt(_0x11bf05(0x157))/0x7+parseInt(_0x11bf05(0x12e))/0x8*(-parseInt(_0x11bf05(0x167))/0x9)+parseInt(_0x11bf05(0x16a))/0xa*(-parseInt(_0x11bf05(0x156))/0xb)+parseInt(_0x11bf05(0x161))/0xc*(parseInt(_0x11bf05(0x144))/0xd);if(_0x1c58c2===_0x5c883b)break;else _0x3b463d['push'](_0x3b463d['shift']());}catch(_0x835627){_0x3b463d['push'](_0x3b463d['shift']());}}}(a121_0x5015,0x8e442));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x556af8){const _0xd65f3b=a121_0x57c4;return _0x556af8[_0xd65f3b(0x125)]()['replace'](/\s+/g,'_')[_0xd65f3b(0x13d)](/[^a-z0-9_]/g,'')[_0xd65f3b(0x13d)](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5f36e5){const _0x50c221=a121_0x57c4,_0x5c37a0=_0x5f36e5[_0x50c221(0x15e)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5c37a0){const _0x3bef22=_0x5c37a0[0x1][_0x50c221(0x125)](),_0x61a8d=_0x5c37a0[0x2],_0x744aad=_0x61a8d['replace'](/-/g,'')[_0x50c221(0x159)](0x0,0x4)[_0x50c221(0x125)]();return _0x3bef22+'_'+_0x744aad;}const _0x2d34a8=_0x5f36e5[_0x50c221(0x15e)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x2d34a8){const _0x146d19=_0x2d34a8[0x1],_0x44fbbf=_0x2d34a8[0x2][_0x50c221(0x125)](),_0xefaafe=_0x146d19[_0x50c221(0x13d)](/-/g,'')['slice'](0x0,0x4)[_0x50c221(0x125)]();return _0x44fbbf+'_'+_0xefaafe;}return undefined;}function stableStringify(_0x5cb834){const _0x4d74cc=a121_0x57c4;if(Array[_0x4d74cc(0x138)](_0x5cb834))return'['+_0x5cb834['map'](_0x29e183=>stableStringify(_0x29e183))[_0x4d74cc(0x154)](',')+']';if(_0x5cb834&&typeof _0x5cb834===_0x4d74cc(0x126)){const _0x51b720=_0x5cb834,_0x486fb0=Object[_0x4d74cc(0x148)](_0x51b720)['sort'](),_0x1c76b2=_0x486fb0['map'](_0x20dabe=>'\x22'+_0x20dabe+'\x22:'+stableStringify(_0x51b720[_0x20dabe]));return'{'+_0x1c76b2[_0x4d74cc(0x154)](',')+'}';}const _0x4addee=JSON[_0x4d74cc(0x14c)](_0x5cb834);return _0x4addee===undefined?_0x4d74cc(0x165):_0x4addee;}export function consolidateActivationsByContent(_0x16699a){const _0xd54eb9=a121_0x57c4,_0x5ab303={},_0xa9be2e=new Map(),_0x19f1b5=new Map();for(const _0x1ab439 of _0x16699a){if(!_0x1ab439)continue;for(const [_0x4ecf74,_0x49958d]of Object[_0xd54eb9(0x15b)](_0x1ab439)){const _0x88b53b={'connection':_0x49958d[_0xd54eb9(0x121)],..._0x49958d[_0xd54eb9(0x15f)]!==undefined&&{'all_columns':_0x49958d[_0xd54eb9(0x15f)]},..._0x49958d[_0xd54eb9(0x146)]!==undefined&&{'columns':_0x49958d[_0xd54eb9(0x146)]},..._0x49958d[_0xd54eb9(0x164)]!==undefined&&{'behavior':_0x49958d[_0xd54eb9(0x164)]},..._0x49958d[_0xd54eb9(0x134)]!==undefined&&{'schedule':_0x49958d['schedule']},..._0x49958d[_0xd54eb9(0x12a)]!==undefined&&{'notification':_0x49958d[_0xd54eb9(0x12a)]},..._0x49958d[_0xd54eb9(0x128)]!==undefined&&{'connector_config':_0x49958d[_0xd54eb9(0x128)]},..._0x49958d[_0xd54eb9(0x168)]!==undefined&&{'activation_template_id':_0x49958d[_0xd54eb9(0x168)]}},_0x420272=stableStringify(_0x88b53b),_0x2e490c=_0x19f1b5[_0xd54eb9(0x11e)](_0x420272);_0x2e490c?_0xa9be2e[_0xd54eb9(0x163)](_0x4ecf74,_0x2e490c):(_0x5ab303[_0x4ecf74]=_0x49958d,_0xa9be2e[_0xd54eb9(0x163)](_0x4ecf74,_0x4ecf74),_0x19f1b5['set'](_0x420272,_0x4ecf74));}}return{'merged':_0x5ab303,'nameMapping':_0xa9be2e};}export function updateActivationReferences(_0x43e1db,_0x5ec942){const _0x41c012=a121_0x57c4;if(!_0x43e1db)return;for(const _0xd05149 of _0x43e1db){if(!_0xd05149[_0x41c012(0x130)])continue;for(const _0x588b80 of _0xd05149[_0x41c012(0x130)]){if(_0x588b80['type']===_0x41c012(0x147)&&_0x588b80['with']?.['activation']){const _0x36e59c=_0x5ec942[_0x41c012(0x11e)](_0x588b80[_0x41c012(0x140)][_0x41c012(0x147)]);_0x36e59c&&_0x36e59c!==_0x588b80['with'][_0x41c012(0x147)]&&(_0x588b80[_0x41c012(0x140)][_0x41c012(0x147)]=_0x36e59c);}}}}export function consolidateSegmentsByContent(_0x337804,_0x55d080){const _0xa606ec=a121_0x57c4,_0x1f2c4e={},_0x14c74e=new Map(),_0x24d9ac=new Map();for(const _0x3f25a0 of _0x337804){if(!_0x3f25a0)continue;for(const [_0x38fbd0,_0x554f0f]of Object[_0xa606ec(0x15b)](_0x3f25a0)){if(!_0x554f0f[_0xa606ec(0x169)]){_0x1f2c4e[_0x38fbd0]=_0x554f0f,_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x38fbd0);continue;}const _0x3e7cd8=_0x554f0f[_0xa606ec(0x15c)]&&_0x554f0f['description'][_0xa606ec(0x171)]()?_0x554f0f['description']:undefined,_0x51f369=JSON[_0xa606ec(0x14c)]({'description':_0x3e7cd8,'rule':deepSortObject(_0x554f0f[_0xa606ec(0x169)])}),_0x48dc87=_0x24d9ac[_0xa606ec(0x11e)](_0x51f369);if(_0x48dc87){const _0x2c5d20={..._0x554f0f[_0xa606ec(0x15c)]!==undefined&&{'description':_0x554f0f[_0xa606ec(0x15c)]},'rule':_0x554f0f[_0xa606ec(0x169)]?deepSortObject(_0x554f0f[_0xa606ec(0x169)]):_0x554f0f[_0xa606ec(0x169)]};if(_0x38fbd0<_0x48dc87){_0x1f2c4e[_0x38fbd0]=_0x2c5d20,delete _0x1f2c4e[_0x48dc87];for(const [_0x4e43d2,_0x36cefd]of _0x14c74e['entries']()){_0x36cefd===_0x48dc87&&_0x14c74e['set'](_0x4e43d2,_0x38fbd0);}_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x38fbd0),_0x24d9ac[_0xa606ec(0x163)](_0x51f369,_0x38fbd0);}else _0x1f2c4e[_0x48dc87]=_0x2c5d20,_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x48dc87);}else{let _0x282ef9=_0x38fbd0;if(_0x55d080){const _0x557b71=_0x55d080['get'](_0x51f369);_0x557b71&&_0x557b71['length']>0x0&&(_0x282ef9=_0x557b71[_0xa606ec(0x159)]()['sort']()[0x0]);}const _0x3ef41c={..._0x554f0f[_0xa606ec(0x15c)]!==undefined&&{'description':_0x554f0f[_0xa606ec(0x15c)]},'rule':_0x554f0f['rule']?deepSortObject(_0x554f0f['rule']):_0x554f0f[_0xa606ec(0x169)]};_0x1f2c4e[_0x282ef9]=_0x3ef41c,_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x282ef9),_0x24d9ac['set'](_0x51f369,_0x282ef9);}}}return{'merged':_0x1f2c4e,'nameMapping':_0x14c74e};}export function updateSegmentReferences(_0x2c1076,_0x153b34){const _0x24e5b4=a121_0x57c4;if(!_0x2c1076)return;for(const _0x423da5 of _0x2c1076){if(_0x423da5[_0x24e5b4(0x155)]?.['segment']){const _0x400d04=_0x153b34['get'](_0x423da5[_0x24e5b4(0x155)][_0x24e5b4(0x12d)]);_0x400d04&&(_0x423da5['entry_criteria'][_0x24e5b4(0x12d)]=_0x400d04);}if(_0x423da5[_0x24e5b4(0x12c)])for(const _0x1d1540 of _0x423da5[_0x24e5b4(0x12c)]){if(_0x1d1540[_0x24e5b4(0x12d)]){const _0x23d37d=_0x153b34[_0x24e5b4(0x11e)](_0x1d1540[_0x24e5b4(0x12d)]);_0x23d37d&&(_0x1d1540[_0x24e5b4(0x12d)]=_0x23d37d);}}if(_0x423da5[_0x24e5b4(0x12f)]?.['segment']){const _0x395f2b=_0x153b34[_0x24e5b4(0x11e)](_0x423da5[_0x24e5b4(0x12f)][_0x24e5b4(0x12d)]);_0x395f2b&&(_0x423da5[_0x24e5b4(0x12f)][_0x24e5b4(0x12d)]=_0x395f2b);}if(_0x423da5['steps'])for(const _0x56ff06 of _0x423da5[_0x24e5b4(0x130)]){if(_0x56ff06[_0x24e5b4(0x16e)]===_0x24e5b4(0x123)&&_0x56ff06['with']?.[_0x24e5b4(0x141)])for(const _0x4ff1ed of _0x56ff06[_0x24e5b4(0x140)][_0x24e5b4(0x141)]){if(_0x4ff1ed[_0x24e5b4(0x12d)]){const _0x2fc38e=_0x153b34[_0x24e5b4(0x11e)](_0x4ff1ed['segment']);_0x2fc38e&&(_0x4ff1ed[_0x24e5b4(0x12d)]=_0x2fc38e);}}if(_0x56ff06[_0x24e5b4(0x16e)]==='wait'&&_0x56ff06[_0x24e5b4(0x140)]?.[_0x24e5b4(0x13b)]?.[_0x24e5b4(0x12d)]){const _0x307448=_0x153b34[_0x24e5b4(0x11e)](_0x56ff06[_0x24e5b4(0x140)]['condition'][_0x24e5b4(0x12d)]);_0x307448&&(_0x56ff06[_0x24e5b4(0x140)][_0x24e5b4(0x13b)]['segment']=_0x307448);}}}}export function updateSegmentRefsInSegments(_0x23c011,_0x54e48e){const _0x30aff6=a121_0x57c4;for(const _0x2f7d9e of Object['values'](_0x23c011)){_0x2f7d9e[_0x30aff6(0x169)]&&updateSegmentRefsInRule(_0x2f7d9e[_0x30aff6(0x169)],_0x54e48e);}}function a121_0x5015(){const _0x3e6ecf=['wait','index','with','branches','activations','conditions','22735193fUeCBA','versions','columns','activation','keys','item','segments','draft','stringify','exclude','17566AfjIyc','yaml','length','version','34915TVEdEu','bundle_id','join','entry_criteria','1133BBOuAI','7232113qMiFSH','startsWith','slice','merged','entries','description','journeyStages','match','all_columns','234PbCWzf','12DhyRDt','nameMapping','set','behavior','null','include','105471HMIoCO','activation_template_id','rule','23060UReAvr','attributes','.yml','stages','type','push','bundle_name','trim','480EjWOXQ','131YyKfDG','get','find','launched','connection','24756MgQtxR','decision_point','has','toLowerCase','object','name','connector_config','journeys','notification','from','exit_criteria','segment','224JpSTRg','milestone','steps','version_number','some','state','schedule','journeyBundleName','.yaml','endsWith','isArray','string','map','condition','goal','replace'];a121_0x5015=function(){return _0x3e6ecf;};return a121_0x5015();}function updateSegmentRefsInRule(_0x17f5d1,_0x7a1eaa){const _0x4b38d4=a121_0x57c4;if(_0x17f5d1===null||typeof _0x17f5d1!=='object')return;if(Array[_0x4b38d4(0x138)](_0x17f5d1)){for(const _0x2333d4 of _0x17f5d1){updateSegmentRefsInRule(_0x2333d4,_0x7a1eaa);}return;}const _0x497a5d=_0x17f5d1;if((_0x497a5d[_0x4b38d4(0x16e)]===_0x4b38d4(0x166)||_0x497a5d['type']===_0x4b38d4(0x14d))&&typeof _0x497a5d[_0x4b38d4(0x12d)]===_0x4b38d4(0x139)){const _0x2c3e81=_0x7a1eaa[_0x4b38d4(0x11e)](_0x497a5d[_0x4b38d4(0x12d)]);_0x2c3e81&&(_0x497a5d['segment']=_0x2c3e81);}if(_0x497a5d[_0x4b38d4(0x143)]&&Array[_0x4b38d4(0x138)](_0x497a5d[_0x4b38d4(0x143)]))for(const _0x24b628 of _0x497a5d[_0x4b38d4(0x143)]){updateSegmentRefsInRule(_0x24b628,_0x7a1eaa);}}export function buildJourneysArray(_0x11c2e0,_0x3630ab){const _0x19b5be=a121_0x57c4;return _0x11c2e0[_0x19b5be(0x13a)](_0x324c04=>{const _0x44e6e7=_0x19b5be,_0x3ddf9b=_0x3630ab?_0x324c04['item']['id']===_0x3630ab:_0x11c2e0[_0x44e6e7(0x150)]===0x1,_0x1c8087=_0x324c04[_0x44e6e7(0x14f)][_0x44e6e7(0x129)]?.[0x0],_0x41e21b=_0x1c8087?.[_0x44e6e7(0x13c)]||_0x324c04['yaml'][_0x44e6e7(0x13c)],_0x147eca={'version':_0x1c8087?.[_0x44e6e7(0x151)]||_0x324c04['yaml'][_0x44e6e7(0x151)]||_0x324c04[_0x44e6e7(0x149)][_0x44e6e7(0x127)],'state':_0x324c04[_0x44e6e7(0x149)][_0x44e6e7(0x133)]===_0x44e6e7(0x120)?_0x44e6e7(0x120):_0x44e6e7(0x14b),'stages':_0x1c8087?.[_0x44e6e7(0x16d)]||_0x324c04[_0x44e6e7(0x14f)][_0x44e6e7(0x16d)]||[],'id':_0x1c8087?.['id']||_0x324c04[_0x44e6e7(0x14f)]['id'],'version_number':_0x1c8087?.[_0x44e6e7(0x131)]||_0x324c04[_0x44e6e7(0x14f)]['version_number']};return _0x41e21b&&(_0x147eca[_0x44e6e7(0x13c)]=_0x41e21b),_0x3ddf9b&&(_0x147eca['latest']=!![]),_0x147eca;});}export function buildMergedJourneyDef(_0x569510,_0x1e1e13,_0x1ed4d1){const _0x206327=a121_0x57c4,_0x2b02ee=_0x569510[0x0][_0x206327(0x14f)],_0xbec129=buildJourneysArray(_0x569510,_0x1ed4d1),{merged:_0xcd39c6,nameMapping:_0x18585a}=consolidateSegmentsByContent(_0x569510[_0x206327(0x13a)](_0x21d1e7=>_0x21d1e7[_0x206327(0x14f)][_0x206327(0x14a)]),_0x1e1e13);updateSegmentRefsInSegments(_0xcd39c6,_0x18585a);const _0x10eec9=Array[_0x206327(0x12b)](_0x18585a[_0x206327(0x15b)]())[_0x206327(0x132)](([_0x375136,_0x2f6ccf])=>_0x375136!==_0x2f6ccf&&_0x375136[_0x206327(0x158)](_0x206327(0x155)));let _0x2e5a82=_0xcd39c6,_0x18b60c=new Map();if(_0x10eec9){const _0x5a85a3=consolidateSegmentsByContent([_0xcd39c6],_0x1e1e13);_0x2e5a82=_0x5a85a3[_0x206327(0x15a)],_0x18b60c=_0x5a85a3[_0x206327(0x162)];}const _0x34f44d=new Map(_0x18585a);for(const [_0x12876f,_0x851df8]of _0x18b60c[_0x206327(0x15b)]()){_0x34f44d['set'](_0x12876f,_0x851df8);}for(const [_0x146b33,_0x2fc76e]of _0x34f44d[_0x206327(0x15b)]()){let _0x459b83=_0x2fc76e,_0x307c84=0x0;while(_0x34f44d[_0x206327(0x124)](_0x459b83)&&_0x34f44d[_0x206327(0x11e)](_0x459b83)!==_0x459b83&&_0x307c84<MAX_MAPPING_CHAIN_DEPTH){_0x459b83=_0x34f44d[_0x206327(0x11e)](_0x459b83),_0x307c84++;}_0x459b83!==_0x2fc76e&&_0x34f44d[_0x206327(0x163)](_0x146b33,_0x459b83);}for(const _0x222273 of _0xbec129){updateSegmentReferences(_0x222273[_0x206327(0x16d)],_0x34f44d);}const {merged:_0x1950d5,nameMapping:_0x5a53a8}=consolidateActivationsByContent(_0x569510[_0x206327(0x13a)](_0x47c6ae=>_0x47c6ae[_0x206327(0x14f)][_0x206327(0x142)]));for(const _0x2e7630 of _0xbec129){updateActivationReferences(_0x2e7630[_0x206327(0x16d)],_0x5a53a8);}let _0x337191=_0x2b02ee[_0x206327(0x13c)];if(_0x337191?.[_0x206327(0x12d)]){const _0x42cc8b=_0x34f44d[_0x206327(0x11e)](_0x337191['segment']);_0x42cc8b&&(_0x337191={..._0x337191,'segment':_0x42cc8b});}for(const _0x5ba4b5 of _0xbec129){if(_0x5ba4b5[_0x206327(0x13c)]?.[_0x206327(0x12d)]){const _0xb31bda=_0x34f44d['get'](_0x5ba4b5[_0x206327(0x13c)][_0x206327(0x12d)]);_0xb31bda&&(_0x5ba4b5['goal']={..._0x5ba4b5['goal'],'segment':_0xb31bda});}}return _0xbec129[_0x206327(0x132)](_0x5c344b=>_0x5c344b[_0x206327(0x13c)])&&(_0x337191=undefined),{'type':'journey','name':_0x2b02ee[_0x206327(0x127)],'description':_0x2b02ee[_0x206327(0x15c)],'goal':_0x337191,'reentry':_0x2b02ee['reentry'],'segments':Object[_0x206327(0x148)](_0x2e5a82)['length']>0x0?_0x2e5a82:undefined,'activations':Object[_0x206327(0x148)](_0x1950d5)[_0x206327(0x150)]>0x0?_0x1950d5:undefined,'journeys':_0xbec129,'bundle_id':_0x2b02ee[_0x206327(0x153)],'bundle_name':_0x2b02ee[_0x206327(0x170)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x4a3a7d,_0x3d7104,_0x4fa2fa,_0x46d1b4){const _0x421ab6=a121_0x57c4,_0x42f66b=_0x4a3a7d+':'+_0x3d7104,_0x44b157=_0x4fa2fa[_0x421ab6(0x11e)](_0x42f66b);if(_0x44b157)return _0x44b157;const _0x2f2692=await _0x46d1b4(_0x4a3a7d),_0x173938=_0x2f2692[_0x421ab6(0x16b)][_0x421ab6(0x135)]||_0x2f2692['attributes'][_0x421ab6(0x127)],_0x341a35=_0x2f2692[_0x421ab6(0x16b)][_0x421ab6(0x15d)][_0x421ab6(0x11f)](_0x15c147=>String(_0x15c147['id'])===String(_0x3d7104)),_0x4a4d89=_0x341a35?.['name']||_0x3d7104,_0x8e79b9={'journeyName':_0x173938,'stageName':_0x4a4d89};return _0x4fa2fa['set'](_0x42f66b,_0x8e79b9),_0x8e79b9;}export function formatApiJourneyName(_0xbad2bf,_0x1fde12){return _0x1fde12+'\x20('+_0xbad2bf+')';}export function isLocalJourneyRef(_0x4d5082){const _0x466932=a121_0x57c4;return _0x4d5082[_0x466932(0x137)](_0x466932(0x16c))||_0x4d5082[_0x466932(0x137)](_0x466932(0x136));}export function buildLocalRuleToNameMapping(_0x248228){const _0x2b2647=a121_0x57c4,_0x2f9b06=new Map();if(!_0x248228)return _0x2f9b06;for(const [_0x5d4941,_0x52144e]of Object['entries'](_0x248228)){if(_0x52144e['rule']){const _0x392d30=serializeRule(_0x52144e['rule']),_0x406968=_0x2f9b06['get'](_0x392d30)||[];_0x406968[_0x2b2647(0x16f)](_0x5d4941),_0x2f9b06[_0x2b2647(0x163)](_0x392d30,_0x406968);}}return _0x2f9b06;}export function buildLocalRuleToNameMappingFromJourney(_0xe5005){const _0x3afa0b=a121_0x57c4,_0x33644e=_0xe5005[_0x3afa0b(0x14a)];if(!_0x33644e)return new Map();const _0x4d5c72=collectSegmentUsageCounts(_0xe5005),_0x15a0a6=new Map();let _0x10cf9a=0x0;for(const [_0x7ca2b7,_0x290f59]of Object[_0x3afa0b(0x15b)](_0x33644e)){if(!_0x290f59[_0x3afa0b(0x169)]){_0x10cf9a++;continue;}const _0xf8c0db=serializeRule(_0x290f59[_0x3afa0b(0x169)]),_0x4b3232=_0x15a0a6['get'](_0xf8c0db)||[];_0x4b3232['push']({'name':_0x7ca2b7,'index':_0x10cf9a}),_0x15a0a6[_0x3afa0b(0x163)](_0xf8c0db,_0x4b3232),_0x10cf9a++;}const _0x2e3a2d=new Map();for(const [_0x1022b0,_0x5a2282]of _0x15a0a6){const _0x14f5e6=_0x5a2282[_0x3afa0b(0x159)]()['sort']((_0x382e49,_0x51631a)=>{const _0x49f995=_0x3afa0b,_0x253e71=_0x4d5c72[_0x49f995(0x11e)](_0x382e49[_0x49f995(0x127)])||0x0,_0x35d03c=_0x4d5c72['get'](_0x51631a['name'])||0x0;if(_0x253e71!==_0x35d03c)return _0x35d03c-_0x253e71;return _0x382e49[_0x49f995(0x13f)]-_0x51631a[_0x49f995(0x13f)];})['map'](_0x519ef2=>_0x519ef2[_0x3afa0b(0x127)]);_0x2e3a2d['set'](_0x1022b0,_0x14f5e6);}return _0x2e3a2d;}export function collectSegmentUsageCounts(_0x12dd65){const _0x2d8c5e=a121_0x57c4,_0x36e8db=new Map(),_0x14d362=_0x1b8348=>{const _0x5ba12e=a121_0x57c4;if(!_0x1b8348)return;_0x36e8db[_0x5ba12e(0x163)](_0x1b8348,(_0x36e8db[_0x5ba12e(0x11e)](_0x1b8348)||0x0)+0x1);},_0x3c32f4=_0x36e141=>{const _0x5e7687=a121_0x57c4;for(const _0x113f93 of _0x36e141){_0x14d362(_0x113f93[_0x5e7687(0x155)]?.[_0x5e7687(0x12d)]);if(_0x113f93[_0x5e7687(0x12c)])for(const _0x392647 of _0x113f93[_0x5e7687(0x12c)]){_0x14d362(_0x392647['segment']);}_0x14d362(_0x113f93['milestone']?.[_0x5e7687(0x12d)]);if(_0x113f93[_0x5e7687(0x130)])for(const _0x26ddb7 of _0x113f93[_0x5e7687(0x130)]){if(_0x26ddb7['type']===_0x5e7687(0x123))for(const _0x5c7eb3 of _0x26ddb7['with'][_0x5e7687(0x141)]){_0x14d362(_0x5c7eb3['segment']);}else _0x26ddb7[_0x5e7687(0x16e)]===_0x5e7687(0x13e)&&_0x14d362(_0x26ddb7[_0x5e7687(0x140)][_0x5e7687(0x13b)]?.[_0x5e7687(0x12d)]);}}};_0x14d362(_0x12dd65[_0x2d8c5e(0x13c)]?.[_0x2d8c5e(0x12d)]);if(_0x12dd65[_0x2d8c5e(0x129)])for(const _0x637f4e of _0x12dd65[_0x2d8c5e(0x129)]){_0x14d362(_0x637f4e[_0x2d8c5e(0x13c)]?.[_0x2d8c5e(0x12d)]),_0x3c32f4(_0x637f4e[_0x2d8c5e(0x16d)]);}_0x12dd65[_0x2d8c5e(0x16d)]&&_0x3c32f4(_0x12dd65['stages']);if(_0x12dd65[_0x2d8c5e(0x145)])for(const _0x5cc55a of _0x12dd65[_0x2d8c5e(0x145)]){_0x3c32f4(_0x5cc55a[_0x2d8c5e(0x16d)]);}return _0x36e8db;}
|
|
1
|
+
function a121_0x27f2(){const _0x1c086e=['replace','keys','columns','3972920mSWaHM','segment','1881356BdYukN','yaml','.yaml','1915050zRiuuL','exit_criteria','item','include','has','wait','reentry','decision_point','toLowerCase','journeyBundleName','values','push','journeyStages','notification','merged','startsWith','behavior','stages','isArray','find','connector_config','name','version','attributes','string','bundle_id','get','entry_criteria','trim','activations','482867QQOvJm','67RvNXFe','length','exclude','schedule','slice','type','version_number','some','entries','journeys','steps','journey','activation','1430091hMcfad','versions','with','match','description','milestone','state','stringify','endsWith','branches','conditions','null','segments','102AzgNCJ','rule','object','join','from','sort','nameMapping','20jmrnnI','12802bFSWXO','map','set','6883208YvgCKf','activation_template_id','index','goal','all_columns','connection','condition'];a121_0x27f2=function(){return _0x1c086e;};return a121_0x27f2();}(function(_0xcafc6a,_0x5e417e){const _0x3171eb=a121_0x14f8,_0x560c56=_0xcafc6a();while(!![]){try{const _0x30392f=parseInt(_0x3171eb(0xaa))/0x1*(parseInt(_0x3171eb(0xcc))/0x2)+parseInt(_0x3171eb(0x8b))/0x3+parseInt(_0x3171eb(0x88))/0x4+-parseInt(_0x3171eb(0x86))/0x5+-parseInt(_0x3171eb(0xc4))/0x6*(parseInt(_0x3171eb(0xa9))/0x7)+parseInt(_0x3171eb(0x7c))/0x8+-parseInt(_0x3171eb(0xb7))/0x9*(-parseInt(_0x3171eb(0xcb))/0xa);if(_0x30392f===_0x5e417e)break;else _0x560c56['push'](_0x560c56['shift']());}catch(_0x90675d){_0x560c56['push'](_0x560c56['shift']());}}}(a121_0x27f2,0xb6bce));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x21547e){const _0x5ef89c=a121_0x14f8;return _0x21547e[_0x5ef89c(0x93)]()[_0x5ef89c(0x83)](/\s+/g,'_')[_0x5ef89c(0x83)](/[^a-z0-9_]/g,'')[_0x5ef89c(0x83)](/_+/g,'_')[_0x5ef89c(0x83)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x38dcb0){const _0x21431a=a121_0x14f8,_0x570aaa=_0x38dcb0[_0x21431a(0xba)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x570aaa){const _0x19c524=_0x570aaa[0x1][_0x21431a(0x93)](),_0x3a95c0=_0x570aaa[0x2],_0x5ebfd4=_0x3a95c0[_0x21431a(0x83)](/-/g,'')[_0x21431a(0xae)](0x0,0x4)[_0x21431a(0x93)]();return _0x19c524+'_'+_0x5ebfd4;}const _0x5212fc=_0x38dcb0[_0x21431a(0xba)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x5212fc){const _0x53f01a=_0x5212fc[0x1],_0x679489=_0x5212fc[0x2][_0x21431a(0x93)](),_0x3889e6=_0x53f01a[_0x21431a(0x83)](/-/g,'')[_0x21431a(0xae)](0x0,0x4)[_0x21431a(0x93)]();return _0x679489+'_'+_0x3889e6;}return undefined;}function stableStringify(_0x3c889c){const _0x315ab6=a121_0x14f8;if(Array[_0x315ab6(0x9d)](_0x3c889c))return'['+_0x3c889c[_0x315ab6(0xcd)](_0x116525=>stableStringify(_0x116525))[_0x315ab6(0xc7)](',')+']';if(_0x3c889c&&typeof _0x3c889c===_0x315ab6(0xc6)){const _0x371f80=_0x3c889c,_0x5845ed=Object['keys'](_0x371f80)['sort'](),_0x185f9d=_0x5845ed['map'](_0x1276ee=>'\x22'+_0x1276ee+'\x22:'+stableStringify(_0x371f80[_0x1276ee]));return'{'+_0x185f9d['join'](',')+'}';}const _0x55c7fa=JSON[_0x315ab6(0xbe)](_0x3c889c);return _0x55c7fa===undefined?_0x315ab6(0xc2):_0x55c7fa;}export function consolidateActivationsByContent(_0x341ece){const _0x14bceb=a121_0x14f8,_0x1727e1={},_0x2f5488=new Map(),_0x5e3478=new Map();for(const _0x420f34 of _0x341ece){if(!_0x420f34)continue;for(const [_0x164fbd,_0x31954b]of Object[_0x14bceb(0xb2)](_0x420f34)){const _0xf0e68f={'connection':_0x31954b[_0x14bceb(0x81)],..._0x31954b[_0x14bceb(0x80)]!==undefined&&{'all_columns':_0x31954b['all_columns']},..._0x31954b[_0x14bceb(0x85)]!==undefined&&{'columns':_0x31954b[_0x14bceb(0x85)]},..._0x31954b[_0x14bceb(0x9b)]!==undefined&&{'behavior':_0x31954b[_0x14bceb(0x9b)]},..._0x31954b[_0x14bceb(0xad)]!==undefined&&{'schedule':_0x31954b[_0x14bceb(0xad)]},..._0x31954b[_0x14bceb(0x98)]!==undefined&&{'notification':_0x31954b['notification']},..._0x31954b[_0x14bceb(0x9f)]!==undefined&&{'connector_config':_0x31954b['connector_config']},..._0x31954b[_0x14bceb(0x7d)]!==undefined&&{'activation_template_id':_0x31954b['activation_template_id']}},_0x13bc1c=stableStringify(_0xf0e68f),_0x10a771=_0x5e3478[_0x14bceb(0xa5)](_0x13bc1c);_0x10a771?_0x2f5488[_0x14bceb(0x7b)](_0x164fbd,_0x10a771):(_0x1727e1[_0x164fbd]=_0x31954b,_0x2f5488[_0x14bceb(0x7b)](_0x164fbd,_0x164fbd),_0x5e3478[_0x14bceb(0x7b)](_0x13bc1c,_0x164fbd));}}return{'merged':_0x1727e1,'nameMapping':_0x2f5488};}export function updateActivationReferences(_0x963062,_0x2fefbd){const _0x2ecf54=a121_0x14f8;if(!_0x963062)return;for(const _0x59b1f4 of _0x963062){if(!_0x59b1f4[_0x2ecf54(0xb4)])continue;for(const _0x57d443 of _0x59b1f4[_0x2ecf54(0xb4)]){if(_0x57d443[_0x2ecf54(0xaf)]==='activation'&&_0x57d443['with']?.[_0x2ecf54(0xb6)]){const _0x8867a1=_0x2fefbd['get'](_0x57d443[_0x2ecf54(0xb9)][_0x2ecf54(0xb6)]);_0x8867a1&&_0x8867a1!==_0x57d443[_0x2ecf54(0xb9)][_0x2ecf54(0xb6)]&&(_0x57d443[_0x2ecf54(0xb9)][_0x2ecf54(0xb6)]=_0x8867a1);}}}}export function consolidateSegmentsByContent(_0x105ac3,_0x13321e){const _0x1cb06d=a121_0x14f8,_0x4ed0b5={},_0x471ca7=new Map(),_0x1a57af=new Map();for(const _0x4bae35 of _0x105ac3){if(!_0x4bae35)continue;for(const [_0x592121,_0x18a26b]of Object[_0x1cb06d(0xb2)](_0x4bae35)){if(!_0x18a26b[_0x1cb06d(0xc5)]){_0x4ed0b5[_0x592121]=_0x18a26b,_0x471ca7[_0x1cb06d(0x7b)](_0x592121,_0x592121);continue;}const _0x94783f=_0x18a26b[_0x1cb06d(0xbb)]&&_0x18a26b['description'][_0x1cb06d(0xa7)]()?_0x18a26b['description']:undefined,_0x4cfb73=JSON[_0x1cb06d(0xbe)]({'description':_0x94783f,'rule':deepSortObject(_0x18a26b[_0x1cb06d(0xc5)])}),_0x54676a=_0x1a57af[_0x1cb06d(0xa5)](_0x4cfb73);if(_0x54676a){const _0xbb6768={..._0x18a26b[_0x1cb06d(0xbb)]!==undefined&&{'description':_0x18a26b[_0x1cb06d(0xbb)]},'rule':_0x18a26b[_0x1cb06d(0xc5)]?deepSortObject(_0x18a26b[_0x1cb06d(0xc5)]):_0x18a26b[_0x1cb06d(0xc5)]};if(_0x592121<_0x54676a){_0x4ed0b5[_0x592121]=_0xbb6768,delete _0x4ed0b5[_0x54676a];for(const [_0x4abd80,_0x2a4113]of _0x471ca7[_0x1cb06d(0xb2)]()){_0x2a4113===_0x54676a&&_0x471ca7[_0x1cb06d(0x7b)](_0x4abd80,_0x592121);}_0x471ca7[_0x1cb06d(0x7b)](_0x592121,_0x592121),_0x1a57af['set'](_0x4cfb73,_0x592121);}else _0x4ed0b5[_0x54676a]=_0xbb6768,_0x471ca7['set'](_0x592121,_0x54676a);}else{let _0x308de8=_0x592121;if(_0x13321e){const _0x4817b1=_0x13321e[_0x1cb06d(0xa5)](_0x4cfb73);_0x4817b1&&_0x4817b1[_0x1cb06d(0xab)]>0x0&&(_0x308de8=_0x4817b1[_0x1cb06d(0xae)]()[_0x1cb06d(0xc9)]()[0x0]);}const _0x4adbf4={..._0x18a26b[_0x1cb06d(0xbb)]!==undefined&&{'description':_0x18a26b[_0x1cb06d(0xbb)]},'rule':_0x18a26b['rule']?deepSortObject(_0x18a26b[_0x1cb06d(0xc5)]):_0x18a26b[_0x1cb06d(0xc5)]};_0x4ed0b5[_0x308de8]=_0x4adbf4,_0x471ca7['set'](_0x592121,_0x308de8),_0x1a57af[_0x1cb06d(0x7b)](_0x4cfb73,_0x308de8);}}}return{'merged':_0x4ed0b5,'nameMapping':_0x471ca7};}export function updateSegmentReferences(_0x3da555,_0x1437d1){const _0x3f301a=a121_0x14f8;if(!_0x3da555)return;for(const _0xfcec4b of _0x3da555){if(_0xfcec4b[_0x3f301a(0xa6)]?.[_0x3f301a(0x87)]){const _0x5bc74a=_0x1437d1[_0x3f301a(0xa5)](_0xfcec4b['entry_criteria'][_0x3f301a(0x87)]);_0x5bc74a&&(_0xfcec4b[_0x3f301a(0xa6)][_0x3f301a(0x87)]=_0x5bc74a);}if(_0xfcec4b[_0x3f301a(0x8c)])for(const _0x19069e of _0xfcec4b[_0x3f301a(0x8c)]){if(_0x19069e[_0x3f301a(0x87)]){const _0xc4fdcd=_0x1437d1[_0x3f301a(0xa5)](_0x19069e[_0x3f301a(0x87)]);_0xc4fdcd&&(_0x19069e['segment']=_0xc4fdcd);}}if(_0xfcec4b[_0x3f301a(0xbc)]?.[_0x3f301a(0x87)]){const _0x32c67a=_0x1437d1[_0x3f301a(0xa5)](_0xfcec4b[_0x3f301a(0xbc)][_0x3f301a(0x87)]);_0x32c67a&&(_0xfcec4b[_0x3f301a(0xbc)]['segment']=_0x32c67a);}if(_0xfcec4b[_0x3f301a(0xb4)])for(const _0x85c362 of _0xfcec4b[_0x3f301a(0xb4)]){if(_0x85c362[_0x3f301a(0xaf)]===_0x3f301a(0x92)&&_0x85c362[_0x3f301a(0xb9)]?.['branches'])for(const _0x5de9f2 of _0x85c362[_0x3f301a(0xb9)]['branches']){if(_0x5de9f2['segment']){const _0x154031=_0x1437d1[_0x3f301a(0xa5)](_0x5de9f2[_0x3f301a(0x87)]);_0x154031&&(_0x5de9f2['segment']=_0x154031);}}if(_0x85c362[_0x3f301a(0xaf)]===_0x3f301a(0x90)&&_0x85c362[_0x3f301a(0xb9)]?.[_0x3f301a(0x82)]?.['segment']){const _0x4aae31=_0x1437d1[_0x3f301a(0xa5)](_0x85c362['with'][_0x3f301a(0x82)][_0x3f301a(0x87)]);_0x4aae31&&(_0x85c362[_0x3f301a(0xb9)][_0x3f301a(0x82)]['segment']=_0x4aae31);}}}}export function updateSegmentRefsInSegments(_0x3dc7a4,_0x7eca91){const _0x237f5d=a121_0x14f8;for(const _0x3d5da8 of Object[_0x237f5d(0x95)](_0x3dc7a4)){_0x3d5da8['rule']&&updateSegmentRefsInRule(_0x3d5da8['rule'],_0x7eca91);}}function updateSegmentRefsInRule(_0x6176b,_0x43c954){const _0x5556c5=a121_0x14f8;if(_0x6176b===null||typeof _0x6176b!==_0x5556c5(0xc6))return;if(Array[_0x5556c5(0x9d)](_0x6176b)){for(const _0x1ba019 of _0x6176b){updateSegmentRefsInRule(_0x1ba019,_0x43c954);}return;}const _0x531a8d=_0x6176b;if((_0x531a8d[_0x5556c5(0xaf)]===_0x5556c5(0x8e)||_0x531a8d[_0x5556c5(0xaf)]===_0x5556c5(0xac))&&typeof _0x531a8d['segment']===_0x5556c5(0xa3)){const _0xc65859=_0x43c954['get'](_0x531a8d[_0x5556c5(0x87)]);_0xc65859&&(_0x531a8d['segment']=_0xc65859);}if(_0x531a8d[_0x5556c5(0xc1)]&&Array[_0x5556c5(0x9d)](_0x531a8d[_0x5556c5(0xc1)]))for(const _0x3775ed of _0x531a8d[_0x5556c5(0xc1)]){updateSegmentRefsInRule(_0x3775ed,_0x43c954);}}export function buildJourneysArray(_0xae6db4,_0x509055){const _0xf64c80=a121_0x14f8;return _0xae6db4[_0xf64c80(0xcd)](_0x19e484=>{const _0x189aeb=_0xf64c80,_0x9300b8=_0x509055?_0x19e484[_0x189aeb(0x8d)]['id']===_0x509055:_0xae6db4['length']===0x1,_0x391e30=_0x19e484[_0x189aeb(0x89)][_0x189aeb(0xb3)]?.[0x0],_0x155c6d=_0x391e30?.[_0x189aeb(0x7f)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0x7f)],_0x13415c={'version':_0x391e30?.[_0x189aeb(0xa1)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0xa1)]||_0x19e484[_0x189aeb(0x8d)][_0x189aeb(0xa0)],'state':_0x19e484[_0x189aeb(0x8d)][_0x189aeb(0xbd)]==='launched'?'launched':'draft','stages':_0x391e30?.[_0x189aeb(0x9c)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0x9c)]||[],'id':_0x391e30?.['id']||_0x19e484[_0x189aeb(0x89)]['id'],'version_number':_0x391e30?.[_0x189aeb(0xb0)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0xb0)]};return _0x155c6d&&(_0x13415c['goal']=_0x155c6d),_0x9300b8&&(_0x13415c['latest']=!![]),_0x13415c;});}export function buildMergedJourneyDef(_0x926c46,_0x424498,_0x5aa899){const _0x4bd793=a121_0x14f8,_0x4ae81f=_0x926c46[0x0][_0x4bd793(0x89)],_0x40a3e9=buildJourneysArray(_0x926c46,_0x5aa899),{merged:_0xc24728,nameMapping:_0x4c73db}=consolidateSegmentsByContent(_0x926c46['map'](_0x2a474f=>_0x2a474f['yaml'][_0x4bd793(0xc3)]),_0x424498);updateSegmentRefsInSegments(_0xc24728,_0x4c73db);const _0xb86ae0=Array[_0x4bd793(0xc8)](_0x4c73db['entries']())[_0x4bd793(0xb1)](([_0x51a18a,_0x52d8cb])=>_0x51a18a!==_0x52d8cb&&_0x51a18a[_0x4bd793(0x9a)](_0x4bd793(0xa6)));let _0x49d9aa=_0xc24728,_0x1f9995=new Map();if(_0xb86ae0){const _0x1b0d3e=consolidateSegmentsByContent([_0xc24728],_0x424498);_0x49d9aa=_0x1b0d3e[_0x4bd793(0x99)],_0x1f9995=_0x1b0d3e[_0x4bd793(0xca)];}const _0x3a4a3a=new Map(_0x4c73db);for(const [_0x4f106b,_0x14115f]of _0x1f9995[_0x4bd793(0xb2)]()){_0x3a4a3a['set'](_0x4f106b,_0x14115f);}for(const [_0x19cd0c,_0x69ef]of _0x3a4a3a[_0x4bd793(0xb2)]()){let _0x29e8f9=_0x69ef,_0x537054=0x0;while(_0x3a4a3a[_0x4bd793(0x8f)](_0x29e8f9)&&_0x3a4a3a[_0x4bd793(0xa5)](_0x29e8f9)!==_0x29e8f9&&_0x537054<MAX_MAPPING_CHAIN_DEPTH){_0x29e8f9=_0x3a4a3a[_0x4bd793(0xa5)](_0x29e8f9),_0x537054++;}_0x29e8f9!==_0x69ef&&_0x3a4a3a[_0x4bd793(0x7b)](_0x19cd0c,_0x29e8f9);}for(const _0x52b13c of _0x40a3e9){updateSegmentReferences(_0x52b13c['stages'],_0x3a4a3a);}const {merged:_0x573287,nameMapping:_0xe62784}=consolidateActivationsByContent(_0x926c46[_0x4bd793(0xcd)](_0x5d02f3=>_0x5d02f3[_0x4bd793(0x89)][_0x4bd793(0xa8)]));for(const _0x1c0e7c of _0x40a3e9){updateActivationReferences(_0x1c0e7c[_0x4bd793(0x9c)],_0xe62784);}let _0x2c1298=_0x4ae81f[_0x4bd793(0x7f)];if(_0x2c1298?.[_0x4bd793(0x87)]){const _0x3e43b2=_0x3a4a3a['get'](_0x2c1298[_0x4bd793(0x87)]);_0x3e43b2&&(_0x2c1298={..._0x2c1298,'segment':_0x3e43b2});}for(const _0x3ba391 of _0x40a3e9){if(_0x3ba391[_0x4bd793(0x7f)]?.[_0x4bd793(0x87)]){const _0x520209=_0x3a4a3a[_0x4bd793(0xa5)](_0x3ba391[_0x4bd793(0x7f)][_0x4bd793(0x87)]);_0x520209&&(_0x3ba391['goal']={..._0x3ba391['goal'],'segment':_0x520209});}}return _0x40a3e9[_0x4bd793(0xb1)](_0x478523=>_0x478523[_0x4bd793(0x7f)])&&(_0x2c1298=undefined),{'type':_0x4bd793(0xb5),'name':_0x4ae81f[_0x4bd793(0xa0)],'description':_0x4ae81f[_0x4bd793(0xbb)],'goal':_0x2c1298,'reentry':_0x4ae81f[_0x4bd793(0x91)],'segments':Object[_0x4bd793(0x84)](_0x49d9aa)[_0x4bd793(0xab)]>0x0?_0x49d9aa:undefined,'activations':Object[_0x4bd793(0x84)](_0x573287)[_0x4bd793(0xab)]>0x0?_0x573287:undefined,'journeys':_0x40a3e9,'bundle_id':_0x4ae81f[_0x4bd793(0xa4)],'bundle_name':_0x4ae81f['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x9d1207,_0x266d36,_0x4ffb81,_0x3742c7){const _0x1dfc75=a121_0x14f8,_0x4f9f0f=_0x9d1207+':'+_0x266d36,_0x42e332=_0x4ffb81['get'](_0x4f9f0f);if(_0x42e332)return _0x42e332;const _0x4e7c76=await _0x3742c7(_0x9d1207),_0x12a9fb=_0x4e7c76[_0x1dfc75(0xa2)][_0x1dfc75(0x94)]||_0x4e7c76[_0x1dfc75(0xa2)][_0x1dfc75(0xa0)],_0x2135dc=_0x4e7c76[_0x1dfc75(0xa2)][_0x1dfc75(0x97)][_0x1dfc75(0x9e)](_0x41d7c9=>String(_0x41d7c9['id'])===String(_0x266d36)),_0x2b9884=_0x2135dc?.[_0x1dfc75(0xa0)]||_0x266d36,_0x72bfe2={'journeyName':_0x12a9fb,'stageName':_0x2b9884};return _0x4ffb81[_0x1dfc75(0x7b)](_0x4f9f0f,_0x72bfe2),_0x72bfe2;}export function formatApiJourneyName(_0x309396,_0x2355ab){return _0x2355ab+'\x20('+_0x309396+')';}export function isLocalJourneyRef(_0x49861c){const _0x15c105=a121_0x14f8;return _0x49861c[_0x15c105(0xbf)]('.yml')||_0x49861c[_0x15c105(0xbf)](_0x15c105(0x8a));}function a121_0x14f8(_0x5bb1f1,_0xdaa29){_0x5bb1f1=_0x5bb1f1-0x7b;const _0x27f2fc=a121_0x27f2();let _0x14f8e6=_0x27f2fc[_0x5bb1f1];return _0x14f8e6;}export function buildLocalRuleToNameMapping(_0x47c058){const _0x2c0da2=a121_0x14f8,_0x199a73=new Map();if(!_0x47c058)return _0x199a73;for(const [_0x796e11,_0x22f929]of Object[_0x2c0da2(0xb2)](_0x47c058)){if(_0x22f929[_0x2c0da2(0xc5)]){const _0x13d287=serializeRule(_0x22f929[_0x2c0da2(0xc5)]),_0x5d417d=_0x199a73['get'](_0x13d287)||[];_0x5d417d[_0x2c0da2(0x96)](_0x796e11),_0x199a73[_0x2c0da2(0x7b)](_0x13d287,_0x5d417d);}}return _0x199a73;}export function buildLocalRuleToNameMappingFromJourney(_0x1ce710){const _0x22fb3c=a121_0x14f8,_0x269d58=_0x1ce710[_0x22fb3c(0xc3)];if(!_0x269d58)return new Map();const _0xa0b95c=collectSegmentUsageCounts(_0x1ce710),_0x2be23c=new Map();let _0x2ac90f=0x0;for(const [_0x152570,_0x208e1d]of Object[_0x22fb3c(0xb2)](_0x269d58)){if(!_0x208e1d[_0x22fb3c(0xc5)]){_0x2ac90f++;continue;}const _0x41dd1c=serializeRule(_0x208e1d['rule']),_0x4c4461=_0x2be23c[_0x22fb3c(0xa5)](_0x41dd1c)||[];_0x4c4461[_0x22fb3c(0x96)]({'name':_0x152570,'index':_0x2ac90f}),_0x2be23c[_0x22fb3c(0x7b)](_0x41dd1c,_0x4c4461),_0x2ac90f++;}const _0x3b3278=new Map();for(const [_0x3270bc,_0x28bdbd]of _0x2be23c){const _0x1ade24=_0x28bdbd[_0x22fb3c(0xae)]()[_0x22fb3c(0xc9)]((_0x7fd4ea,_0x483bde)=>{const _0xdc0e57=_0x22fb3c,_0x4b9369=_0xa0b95c[_0xdc0e57(0xa5)](_0x7fd4ea[_0xdc0e57(0xa0)])||0x0,_0x59b0c9=_0xa0b95c[_0xdc0e57(0xa5)](_0x483bde[_0xdc0e57(0xa0)])||0x0;if(_0x4b9369!==_0x59b0c9)return _0x59b0c9-_0x4b9369;return _0x7fd4ea[_0xdc0e57(0x7e)]-_0x483bde['index'];})[_0x22fb3c(0xcd)](_0x52e228=>_0x52e228[_0x22fb3c(0xa0)]);_0x3b3278[_0x22fb3c(0x7b)](_0x3270bc,_0x1ade24);}return _0x3b3278;}export function collectSegmentUsageCounts(_0x1bde06){const _0x2a05c7=a121_0x14f8,_0x428a39=new Map(),_0x4a2bf0=_0x5036c3=>{const _0x45a6be=a121_0x14f8;if(!_0x5036c3)return;_0x428a39[_0x45a6be(0x7b)](_0x5036c3,(_0x428a39[_0x45a6be(0xa5)](_0x5036c3)||0x0)+0x1);},_0x593d7d=_0x35504b=>{const _0x293f17=a121_0x14f8;for(const _0x138a6d of _0x35504b){_0x4a2bf0(_0x138a6d[_0x293f17(0xa6)]?.[_0x293f17(0x87)]);if(_0x138a6d[_0x293f17(0x8c)])for(const _0x3fdf47 of _0x138a6d[_0x293f17(0x8c)]){_0x4a2bf0(_0x3fdf47[_0x293f17(0x87)]);}_0x4a2bf0(_0x138a6d[_0x293f17(0xbc)]?.[_0x293f17(0x87)]);if(_0x138a6d['steps'])for(const _0x4c6a6c of _0x138a6d[_0x293f17(0xb4)]){if(_0x4c6a6c[_0x293f17(0xaf)]===_0x293f17(0x92))for(const _0x260b61 of _0x4c6a6c[_0x293f17(0xb9)][_0x293f17(0xc0)]){_0x4a2bf0(_0x260b61[_0x293f17(0x87)]);}else _0x4c6a6c[_0x293f17(0xaf)]===_0x293f17(0x90)&&_0x4a2bf0(_0x4c6a6c[_0x293f17(0xb9)][_0x293f17(0x82)]?.[_0x293f17(0x87)]);}}};_0x4a2bf0(_0x1bde06[_0x2a05c7(0x7f)]?.[_0x2a05c7(0x87)]);if(_0x1bde06[_0x2a05c7(0xb3)])for(const _0x1eca36 of _0x1bde06[_0x2a05c7(0xb3)]){_0x4a2bf0(_0x1eca36[_0x2a05c7(0x7f)]?.['segment']),_0x593d7d(_0x1eca36[_0x2a05c7(0x9c)]);}_0x1bde06[_0x2a05c7(0x9c)]&&_0x593d7d(_0x1bde06[_0x2a05c7(0x9c)]);if(_0x1bde06[_0x2a05c7(0xb8)])for(const _0x5d3711 of _0x1bde06['versions']){_0x593d7d(_0x5d3711['stages']);}return _0x428a39;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xd7ada7,_0x361aed){const _0x30683c=a122_0x5645,_0x299c74=_0xd7ada7();while(!![]){try{const _0x23e23d=parseInt(_0x30683c(0x122))/0x1*(-parseInt(_0x30683c(0x12e))/0x2)+parseInt(_0x30683c(0x158))/0x3+-parseInt(_0x30683c(0x15d))/0x4*(parseInt(_0x30683c(0x13a))/0x5)+parseInt(_0x30683c(0x199))/0x6+parseInt(_0x30683c(0x157))/0x7*(-parseInt(_0x30683c(0x128))/0x8)+-parseInt(_0x30683c(0x16f))/0x9*(parseInt(_0x30683c(0x1a3))/0xa)+-parseInt(_0x30683c(0x16e))/0xb*(-parseInt(_0x30683c(0x136))/0xc);if(_0x23e23d===_0x361aed)break;else _0x299c74['push'](_0x299c74['shift']());}catch(_0x200311){_0x299c74['push'](_0x299c74['shift']());}}}(a122_0x4dc8,0x8981f));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x451843,_0x4d6a1d,_0x2dd702,_0x236022,_0xaed473,_0x296300){const _0x45ce91=a122_0x5645;return{'level':_0x451843,'path':_0x4d6a1d,'code':_0x2dd702,'message':_0x236022,'location':getLocationFromPath(_0xaed473[_0x45ce91(0x12c)],_0xaed473[_0x45ce91(0x1b5)],pathToArray(_0x296300??_0x4d6a1d))};}function a122_0x5645(_0x30aee,_0x1e125a){_0x30aee=_0x30aee-0x118;const _0x4dc85d=a122_0x4dc8();let _0x564569=_0x4dc85d[_0x30aee];return _0x564569;}function validateVersionStructure(_0x33c6a5,_0x3ca1d0){const _0x1fa586=a122_0x5645,_0x4427bc=[];return _0x33c6a5[_0x1fa586(0x142)]>MAX_STAGES&&_0x4427bc[_0x1fa586(0x12d)](createIssue(_0x1fa586(0x134),_0x1fa586(0x1a9),'TOO_MANY_STAGES',_0x1fa586(0x1cc)+_0x33c6a5[_0x1fa586(0x142)]+_0x1fa586(0x1c8)+MAX_STAGES,_0x3ca1d0)),_0x4427bc;}function validateStageStructure(_0x11b2f4,_0x548c54,_0x155cf6,_0x466a42){const _0x1c82fa=a122_0x5645,_0x3e8e8b=[],_0x1d234e='stages['+_0x548c54+']';_0x548c54===0x0&&!_0x11b2f4[_0x1c82fa(0x1d7)]&&_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x134),_0x1d234e+_0x1c82fa(0x1c2),_0x1c82fa(0x13d),_0x1c82fa(0x1a0)+_0x11b2f4[_0x1c82fa(0x13c)]+_0x1c82fa(0x1c4),_0x466a42,_0x1d234e));const _0x5a2ba5=_0x548c54===_0x155cf6-0x1;!_0x5a2ba5&&!_0x11b2f4[_0x1c82fa(0x15b)]&&_0x3e8e8b['push'](createIssue(_0x1c82fa(0x134),_0x1d234e+_0x1c82fa(0x141),_0x1c82fa(0x182),'Stage\x20\x27'+_0x11b2f4['name']+_0x1c82fa(0x180),_0x466a42,_0x1d234e));(!_0x11b2f4[_0x1c82fa(0x1be)]||_0x11b2f4[_0x1c82fa(0x1be)]['length']===0x0)&&_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x1b0),_0x1d234e+'.exit_criteria',_0x1c82fa(0x1a4),_0x1c82fa(0x1a0)+_0x11b2f4[_0x1c82fa(0x13c)]+_0x1c82fa(0x14e),_0x466a42,_0x1d234e));const _0x52e7af=_0x11b2f4[_0x1c82fa(0x1c0)]?.[_0x1c82fa(0x142)]??0x0;if(_0x52e7af===0x0)_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x134),_0x1d234e+_0x1c82fa(0x171),_0x1c82fa(0x1d4),_0x1c82fa(0x1a0)+_0x11b2f4[_0x1c82fa(0x13c)]+_0x1c82fa(0x1a6),_0x466a42,_0x1d234e+_0x1c82fa(0x171)));else{if(_0x52e7af===0x1)_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x1b0),_0x1d234e+_0x1c82fa(0x171),_0x1c82fa(0x1d4),_0x1c82fa(0x1a0)+_0x11b2f4['name']+_0x1c82fa(0x19c),_0x466a42,_0x1d234e+_0x1c82fa(0x171)));else _0x52e7af<=0x3&&_0x3e8e8b['push'](createIssue(_0x1c82fa(0x1b0),_0x1d234e+_0x1c82fa(0x171),_0x1c82fa(0x123),_0x1c82fa(0x1a0)+_0x11b2f4['name']+_0x1c82fa(0x166)+_0x52e7af+_0x1c82fa(0x167),_0x466a42,_0x1d234e+_0x1c82fa(0x171)));}return _0x3e8e8b;}function validateStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321){const _0x598a86=a122_0x5645,_0x119e5b=[];if(_0x1ac705[_0x598a86(0x154)]===_0x598a86(0x15e))return _0x1ac705['next']&&_0x119e5b[_0x598a86(0x12d)](createIssue(_0x598a86(0x134),_0x3ff9ac+_0x598a86(0x11e),_0x598a86(0x13b),_0x598a86(0x11a)+_0x1ac705[_0x598a86(0x13c)]+_0x598a86(0x11c),_0x3fcb6f)),'with'in _0x1ac705&&_0x1ac705[_0x598a86(0x163)]!==undefined&&_0x119e5b['push'](createIssue(_0x598a86(0x134),_0x3ff9ac+'.with',_0x598a86(0x13b),_0x598a86(0x11a)+_0x1ac705['name']+_0x598a86(0x1bf),_0x3fcb6f)),_0x119e5b;_0x1ac705[_0x598a86(0x193)]&&(_0x3fcb6f['stepNames']&&!_0x3fcb6f[_0x598a86(0x18a)][_0x598a86(0x1bb)](_0x1ac705[_0x598a86(0x193)])&&_0x119e5b['push'](createIssue(_0x598a86(0x134),_0x3ff9ac+_0x598a86(0x11e),_0x598a86(0x19f),_0x598a86(0x1b2)+_0x1ac705[_0x598a86(0x193)]+'\x27',_0x3fcb6f)));switch(_0x1ac705[_0x598a86(0x154)]){case'wait':_0x119e5b[_0x598a86(0x12d)](...validateWaitStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321));break;case'activation':_0x119e5b[_0x598a86(0x12d)](...validateActivationStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f));break;case _0x598a86(0x1c9):_0x119e5b[_0x598a86(0x12d)](...validateDecisionPointStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321));break;case'ab_test':_0x119e5b[_0x598a86(0x12d)](...validateAbTestStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321));break;case _0x598a86(0x11b):_0x119e5b[_0x598a86(0x12d)](...validateJumpStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f));break;}return _0x119e5b;}function validateWaitStep(_0x56bb06,_0x55f52e,_0x3b0137,_0x177f0e){const _0x2e4e7f=a122_0x5645,_0x5d8716=[];if(!_0x56bb06[_0x2e4e7f(0x163)])return _0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x134),_0x55f52e+_0x2e4e7f(0x164),_0x2e4e7f(0x16c),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x3b0137,_0x55f52e)),_0x5d8716;if(_0x56bb06['with'][_0x2e4e7f(0x120)]){const _0xc7de9e=_0x56bb06[_0x2e4e7f(0x163)][_0x2e4e7f(0x120)];if(_0xc7de9e[_0x2e4e7f(0x161)]){_0x3b0137[_0x2e4e7f(0x1d5)]?.[_0x2e4e7f(0x165)](_0xc7de9e[_0x2e4e7f(0x161)]);!_0xc7de9e[_0x2e4e7f(0x161)][_0x2e4e7f(0x1aa)](_0x2e4e7f(0x188))&&(_0x3b0137[_0x2e4e7f(0x187)]&&!_0x3b0137[_0x2e4e7f(0x187)]['has'](_0xc7de9e[_0x2e4e7f(0x161)])&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue('error',_0x55f52e+'.with.condition.segment',_0x2e4e7f(0x1ab),_0x2e4e7f(0x14d)+_0xc7de9e['segment']+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x3b0137)));_0xc7de9e[_0x2e4e7f(0x193)]&&_0x3b0137[_0x2e4e7f(0x18a)]&&!_0x3b0137[_0x2e4e7f(0x18a)]['has'](_0xc7de9e[_0x2e4e7f(0x193)])&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x134),_0x55f52e+_0x2e4e7f(0x19d),_0x2e4e7f(0x19f),_0x2e4e7f(0x194)+_0xc7de9e[_0x2e4e7f(0x193)]+'\x27',_0x3b0137));_0xc7de9e[_0x2e4e7f(0x1b7)]?.[_0x2e4e7f(0x193)]&&_0x3b0137[_0x2e4e7f(0x18a)]&&!_0x3b0137[_0x2e4e7f(0x18a)][_0x2e4e7f(0x1bb)](_0xc7de9e[_0x2e4e7f(0x1b7)][_0x2e4e7f(0x193)])&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x134),_0x55f52e+_0x2e4e7f(0x178),'INVALID_NEXT_REFERENCE',_0x2e4e7f(0x125)+_0xc7de9e[_0x2e4e7f(0x1b7)][_0x2e4e7f(0x193)]+'\x27',_0x3b0137));const _0x343600=_0xc7de9e['next']||_0x56bb06[_0x2e4e7f(0x193)],_0x5972e5=_0xc7de9e['timeout']?.[_0x2e4e7f(0x193)]||_0x56bb06[_0x2e4e7f(0x193)];if(_0x343600){const _0x3d6aae=_0x177f0e[_0x2e4e7f(0x14f)](_0x343600);_0x3d6aae?.[_0x2e4e7f(0x154)]===_0x2e4e7f(0x1cb)&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x1b0),_0x55f52e+'.with.condition.next','BRANCH_DIRECTLY_TO_MERGE',_0x2e4e7f(0x1cd)+_0x343600+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x3b0137,_0x55f52e+_0x2e4e7f(0x18b)));}if(_0x5972e5){const _0x420061=_0x177f0e[_0x2e4e7f(0x14f)](_0x5972e5);_0x420061?.[_0x2e4e7f(0x154)]===_0x2e4e7f(0x1cb)&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x1b0),_0x55f52e+'.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5972e5+_0x2e4e7f(0x17a),_0x3b0137,_0x55f52e+_0x2e4e7f(0x198)));}}}return _0x5d8716;}function validateActivationStep(_0x571d22,_0x262324,_0x340b7f){const _0xb25578=a122_0x5645,_0x236ded=[];if(!_0x571d22[_0xb25578(0x163)]?.[_0xb25578(0x1b8)])return _0x236ded[_0xb25578(0x12d)](createIssue(_0xb25578(0x134),_0x262324+_0xb25578(0x1af),_0xb25578(0x150),_0xb25578(0x181),_0x340b7f,_0x262324)),_0x236ded;const _0x21e9dd=_0x571d22[_0xb25578(0x163)][_0xb25578(0x1b8)];return _0x340b7f[_0xb25578(0x144)]&&!_0x21e9dd[_0xb25578(0x1aa)](_0xb25578(0x188))&&(!_0x340b7f[_0xb25578(0x144)][_0xb25578(0x1bb)](_0x21e9dd)&&_0x236ded['push'](createIssue('error',_0x262324+_0xb25578(0x1af),_0xb25578(0x168),_0xb25578(0x1b9)+_0x21e9dd+_0xb25578(0x17e),_0x340b7f))),_0x236ded;}function a122_0x4dc8(){const _0x1b47c9=['decision_point','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','merge','Journey\x20has\x20','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','MISSING_CONDITIONS','journey\x20entry','Merge\x20step\x20\x27','Jump\x20step\x20requires\x20a\x20target','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','CONVERGENCE_WITHOUT_MERGE','INSUFFICIENT_STEPS','referencedSegments','abs','entry_criteria','splice','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','End\x20step\x20\x27','jump','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','.name','.next','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','condition','description','208583hFtSyt','FEW_STEPS','A/B\x20test\x20variant\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','level','excluded_','666776ysDaEM','.rule','DUPLICATE_STEP_NAME','MISSING_GOAL','document','push','6hATiAg','BRANCH_DIRECTLY_TO_MERGE','.with.variants[','journeys,\x20stages,\x20or\x20versions','timeout\x20of\x20\x27','.steps[','error','MERGE_TO_MERGE_CHAIN','552GbwMUA','indices','every','join','85ifICiO','END_STEP_HAS_NEXT_OR_WITH','name','MISSING_ENTRY_CRITERIA','.type','message','ACTIVATION_SCHEMA_ERROR','.milestone','length','variants','activationKeys','Decision\x20branch\x20\x27','values','Criteria\x20references\x20undefined\x20segment\x20\x27','launched','target','replace','\x27\x20with\x20no\x20action\x20in\x20between','some','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','get','MISSING_ACTIVATION_REF','\x27\x20(from:\x20','wait','Journey\x20has\x20no\x20goal\x20defined','type','keys','branch\x20\x27','77ntIOEH','998568DDUFTw','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','versions[','milestone','map','19868dMEQFV','end','versions','includes','segment','segments.','with','.with','add','\x27\x20has\x20only\x20','\x20steps\x20(may\x20be\x20too\x20simple)','MISSING_ACTIVATION_DEFINITION','INVALID_JUMP_TARGET','latest','MISSING_NAME','MISSING_WAIT_PARAMS','goal','351351osXrpl','3277125qNILDU',').\x20Use\x20a\x20merge\x20step.','.steps','\x27\x20(first\x20defined\x20at\x20steps[','\x27\x20has\x20no\x20end\x20step','sort','endsWith','\x27\x20of\x20\x27','path','.with.condition.timeout.next','condition\x20of\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','safeParse',').\x20Merge\x20is\x20unnecessary.','.segment','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.with.branches','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Activation\x20step\x20requires\x20an\x20activation\x20reference','MISSING_MILESTONE','set','MISSING_STAGES','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','activations','embeddedSegments','ref:','entries','stepNames','.with.condition','rule','goalIsInherited','data','Journey\x20can\x20have\x20at\x20most\x20one\x20','stages[','branches','size','next','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','INVALID_AB_TEST_PERCENTAGES','reduce','symbol','.with.condition.timeout','4513314cqLaov','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','\x20with\x20latest:\x20true','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.condition.next','journeys','INVALID_NEXT_REFERENCE','Stage\x20\x27','.exit_criteria[','match','10WBYZUl','MISSING_EXIT_CRITERIA','SINGLE_INPUT_MERGE','\x27\x20has\x20no\x20steps','trim','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','stages','startsWith','MISSING_SEGMENT_REFERENCE','step\x20\x27','percentage','.with.branches[','.with.activation','warning','success','Step\x20references\x20non-existent\x20step\x20\x27','UNUSED_EMBEDDED_SEGMENT','\x20(across\x20','source','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','timeout','activation','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','has','skipSchema','version','exit_criteria','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','steps','MISSING_END_STEP','.entry_criteria','segments','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','.with.variants','.with.target','Duplicate\x20step\x20name\x20\x27','\x20stages\x20but\x20maximum\x20is\x20'];a122_0x4dc8=function(){return _0x1b47c9;};return a122_0x4dc8();}function validateDecisionPointStep(_0x4bf842,_0x4f52e5,_0x28b87,_0x369970){const _0x594c74=a122_0x5645,_0x44ac7d=[];if(!_0x4bf842[_0x594c74(0x163)]?.[_0x594c74(0x191)]||_0x4bf842[_0x594c74(0x163)][_0x594c74(0x191)][_0x594c74(0x142)]===0x0)return _0x44ac7d['push'](createIssue(_0x594c74(0x134),_0x4f52e5+_0x594c74(0x17f),_0x594c74(0x1ce),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x28b87,_0x4f52e5)),_0x44ac7d;for(let _0x5dc944=0x0;_0x5dc944<_0x4bf842[_0x594c74(0x163)][_0x594c74(0x191)][_0x594c74(0x142)];_0x5dc944++){const _0x19c32e=_0x4bf842['with'][_0x594c74(0x191)][_0x5dc944],_0x24fe38=_0x4f52e5+_0x594c74(0x1ae)+_0x5dc944+']';_0x19c32e[_0x594c74(0x161)]&&!_0x19c32e['excluded']&&(_0x28b87[_0x594c74(0x1d5)]?.[_0x594c74(0x165)](_0x19c32e[_0x594c74(0x161)]),!_0x19c32e[_0x594c74(0x161)][_0x594c74(0x1aa)](_0x594c74(0x188))&&(_0x28b87[_0x594c74(0x187)]&&!_0x28b87[_0x594c74(0x187)][_0x594c74(0x1bb)](_0x19c32e[_0x594c74(0x161)])&&_0x44ac7d[_0x594c74(0x12d)](createIssue(_0x594c74(0x134),_0x24fe38+_0x594c74(0x17d),_0x594c74(0x1ab),_0x594c74(0x11f)+_0x19c32e['segment']+'\x27',_0x28b87))));_0x19c32e[_0x594c74(0x193)]&&_0x28b87[_0x594c74(0x18a)]&&!_0x28b87[_0x594c74(0x18a)][_0x594c74(0x1bb)](_0x19c32e[_0x594c74(0x193)])&&_0x44ac7d[_0x594c74(0x12d)](createIssue(_0x594c74(0x134),_0x24fe38+_0x594c74(0x11e),'INVALID_NEXT_REFERENCE',_0x594c74(0x159)+_0x19c32e[_0x594c74(0x193)]+'\x27',_0x28b87));if(_0x19c32e[_0x594c74(0x193)]){const _0x3abc96=_0x369970[_0x594c74(0x14f)](_0x19c32e[_0x594c74(0x193)]);_0x3abc96?.[_0x594c74(0x154)]===_0x594c74(0x1cb)&&_0x44ac7d[_0x594c74(0x12d)](createIssue(_0x594c74(0x1b0),_0x24fe38+_0x594c74(0x11e),_0x594c74(0x12f),_0x594c74(0x145)+_0x19c32e[_0x594c74(0x13c)]+_0x594c74(0x1ca)+_0x19c32e[_0x594c74(0x193)]+_0x594c74(0x14b),_0x28b87));}}return _0x44ac7d;}function validateAbTestStep(_0x94109f,_0xc0668c,_0x22cc77,_0x18ab69){const _0x252b81=a122_0x5645,_0x37192e=[];if(!_0x94109f[_0x252b81(0x163)]?.[_0x252b81(0x143)]||_0x94109f['with'][_0x252b81(0x143)]['length']===0x0)return _0x37192e[_0x252b81(0x12d)](createIssue(_0x252b81(0x134),_0xc0668c+_0x252b81(0x1c5),_0x252b81(0x1ce),_0x252b81(0x1b6),_0x22cc77,_0xc0668c)),_0x37192e;const _0x2226fa=_0x94109f[_0x252b81(0x163)][_0x252b81(0x143)][_0x252b81(0x196)]((_0xeecd6a,_0x10ce4b)=>_0xeecd6a+(_0x10ce4b[_0x252b81(0x1ad)]||0x0),0x0);Math[_0x252b81(0x1d6)](_0x2226fa-0x64)>0.01&&_0x37192e['push'](createIssue('error',_0xc0668c+_0x252b81(0x1c5),_0x252b81(0x195),_0x252b81(0x1d2)+_0x2226fa+'%)',_0x22cc77));for(let _0x49f69a=0x0;_0x49f69a<_0x94109f[_0x252b81(0x163)][_0x252b81(0x143)]['length'];_0x49f69a++){const _0x43102a=_0x94109f['with'][_0x252b81(0x143)][_0x49f69a],_0x2e7a41=_0xc0668c+_0x252b81(0x130)+_0x49f69a+']';_0x43102a[_0x252b81(0x193)]&&_0x22cc77[_0x252b81(0x18a)]&&!_0x22cc77[_0x252b81(0x18a)][_0x252b81(0x1bb)](_0x43102a[_0x252b81(0x193)])&&_0x37192e[_0x252b81(0x12d)](createIssue(_0x252b81(0x134),_0x2e7a41+'.next',_0x252b81(0x19f),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x43102a[_0x252b81(0x193)]+'\x27',_0x22cc77));if(_0x43102a[_0x252b81(0x193)]){const _0x492fc9=_0x18ab69[_0x252b81(0x14f)](_0x43102a[_0x252b81(0x193)]);_0x492fc9?.[_0x252b81(0x154)]===_0x252b81(0x1cb)&&_0x37192e[_0x252b81(0x12d)](createIssue(_0x252b81(0x1b0),_0x2e7a41+_0x252b81(0x11e),_0x252b81(0x12f),_0x252b81(0x124)+_0x43102a[_0x252b81(0x13c)]+_0x252b81(0x1ca)+_0x43102a['next']+_0x252b81(0x14b),_0x22cc77));}}return _0x37192e;}function validateJumpStep(_0x48060b,_0x30de8a,_0x4a67f2){const _0x2cce01=a122_0x5645,_0x8f3216=[];if(!_0x48060b[_0x2cce01(0x163)]?.[_0x2cce01(0x149)])return _0x8f3216[_0x2cce01(0x12d)](createIssue(_0x2cce01(0x134),_0x30de8a+_0x2cce01(0x1c6),_0x2cce01(0x169),_0x2cce01(0x1d1),_0x4a67f2,_0x30de8a)),_0x8f3216;return(!_0x48060b[_0x2cce01(0x163)][_0x2cce01(0x149)]['journey']||!_0x48060b[_0x2cce01(0x163)][_0x2cce01(0x149)]['stage'])&&_0x8f3216['push'](createIssue(_0x2cce01(0x134),_0x30de8a+'.with.target',_0x2cce01(0x169),_0x2cce01(0x1ba),_0x4a67f2)),_0x8f3216;}function buildConvergenceMap(_0x56fff9){const _0x2a7df3=a122_0x5645,_0x1a3bfb=new Map();function _0xfd0ff6(_0x85cf9b,_0x1fd559){const _0x179be5=a122_0x5645,_0x323849=_0x1a3bfb['get'](_0x85cf9b)||[];_0x323849[_0x179be5(0x12d)](_0x1fd559),_0x1a3bfb['set'](_0x85cf9b,_0x323849);}for(const _0x563c7f of _0x56fff9){_0x563c7f[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x563c7f[_0x2a7df3(0x193)],{'stepName':_0x563c7f[_0x2a7df3(0x13c)],'description':_0x2a7df3(0x1ac)+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'});if(_0x563c7f[_0x2a7df3(0x154)]===_0x2a7df3(0x1c9)&&_0x563c7f[_0x2a7df3(0x163)]?.[_0x2a7df3(0x191)])for(const _0x227498 of _0x563c7f[_0x2a7df3(0x163)]['branches']){_0x227498[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x227498[_0x2a7df3(0x193)],{'stepName':_0x563c7f['name'],'description':_0x2a7df3(0x156)+_0x227498[_0x2a7df3(0x13c)]+_0x2a7df3(0x176)+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'});}if(_0x563c7f['type']==='ab_test'&&_0x563c7f[_0x2a7df3(0x163)]?.[_0x2a7df3(0x143)])for(const _0x1ba8f1 of _0x563c7f[_0x2a7df3(0x163)]['variants']){_0x1ba8f1[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x1ba8f1[_0x2a7df3(0x193)],{'stepName':_0x563c7f['name'],'description':'variant\x20\x27'+_0x1ba8f1[_0x2a7df3(0x13c)]+'\x27\x20of\x20\x27'+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'});}_0x563c7f['type']===_0x2a7df3(0x152)&&_0x563c7f[_0x2a7df3(0x163)]?.[_0x2a7df3(0x120)]&&(_0x563c7f['with'][_0x2a7df3(0x120)][_0x2a7df3(0x193)]&&_0xfd0ff6(_0x563c7f[_0x2a7df3(0x163)][_0x2a7df3(0x120)][_0x2a7df3(0x193)],{'stepName':_0x563c7f[_0x2a7df3(0x13c)],'description':_0x2a7df3(0x179)+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'}),_0x563c7f['with'][_0x2a7df3(0x120)][_0x2a7df3(0x1b7)]?.[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x563c7f[_0x2a7df3(0x163)][_0x2a7df3(0x120)]['timeout'][_0x2a7df3(0x193)],{'stepName':_0x563c7f[_0x2a7df3(0x13c)],'description':_0x2a7df3(0x132)+_0x563c7f['name']+'\x27'}));}return _0x1a3bfb;}function validateFlowControl(_0xd25271,_0x2f7ded,_0x30d0c5){const _0x36b975=a122_0x5645,_0x2694ae=[],_0xff4127='stages['+_0x2f7ded+']',_0x41ee87=_0xd25271[_0x36b975(0x1c0)]||[];if(_0x41ee87[_0x36b975(0x142)]===0x0)return _0x2694ae;const _0x1208ed=new Map();for(const _0x298383 of _0x41ee87){_0x298383[_0x36b975(0x13c)]&&_0x1208ed[_0x36b975(0x183)](_0x298383[_0x36b975(0x13c)],_0x298383);}const _0x57afbc=buildConvergenceMap(_0x41ee87),_0xd72d38=_0x41ee87[_0x36b975(0x14c)](_0x100347=>_0x100347[_0x36b975(0x154)]===_0x36b975(0x15e));!_0xd72d38&&_0x2694ae[_0x36b975(0x12d)](createIssue(_0x36b975(0x134),_0xff4127+_0x36b975(0x171),_0x36b975(0x1c1),'Stage\x20\x27'+_0xd25271[_0x36b975(0x13c)]+_0x36b975(0x173),_0x30d0c5));for(const [_0x1ec379,_0x204e93]of _0x57afbc){const _0x49ee22=_0x1208ed[_0x36b975(0x14f)](_0x1ec379);if(!_0x49ee22)continue;if(_0x204e93[_0x36b975(0x142)]>0x1&&_0x49ee22['type']!=='merge'){const _0x4e5b4c=_0x204e93[_0x36b975(0x15c)](_0x2c04c2=>_0x2c04c2['description'])[_0x36b975(0x139)](',\x20');_0x2694ae[_0x36b975(0x12d)](createIssue(_0x36b975(0x134),_0xff4127+_0x36b975(0x171),_0x36b975(0x1d3),_0x36b975(0x1a8)+_0x1ec379+_0x36b975(0x151)+_0x4e5b4c+_0x36b975(0x170),_0x30d0c5));}_0x204e93['length']===0x1&&_0x49ee22[_0x36b975(0x154)]===_0x36b975(0x1cb)&&_0x2694ae[_0x36b975(0x12d)](createIssue(_0x36b975(0x1b0),_0xff4127+_0x36b975(0x171),_0x36b975(0x1a5),_0x36b975(0x1d0)+_0x1ec379+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x204e93[0x0][_0x36b975(0x121)]+_0x36b975(0x17c),_0x30d0c5));}for(const _0x11998b of _0x41ee87){if(_0x11998b[_0x36b975(0x154)]==='merge'&&_0x11998b[_0x36b975(0x193)]){const _0x417460=_0x1208ed[_0x36b975(0x14f)](_0x11998b[_0x36b975(0x193)]);_0x417460?.['type']===_0x36b975(0x1cb)&&_0x2694ae['push'](createIssue('error',_0xff4127+_0x36b975(0x171),_0x36b975(0x135),_0x36b975(0x1d0)+_0x11998b[_0x36b975(0x13c)]+_0x36b975(0x185)+_0x11998b['next']+_0x36b975(0x19a),_0x30d0c5));}}return _0x2694ae;}function validateCriteria(_0x2bb902,_0x51755a,_0x53443d){const _0x3fffa9=a122_0x5645,_0x50f6e5=[];return _0x2bb902[_0x3fffa9(0x161)]&&(_0x53443d['referencedSegments']?.['add'](_0x2bb902[_0x3fffa9(0x161)]),!_0x2bb902[_0x3fffa9(0x161)][_0x3fffa9(0x1aa)](_0x3fffa9(0x188))&&(_0x53443d[_0x3fffa9(0x187)]&&!_0x53443d[_0x3fffa9(0x187)]['has'](_0x2bb902['segment'])&&_0x50f6e5[_0x3fffa9(0x12d)](createIssue(_0x3fffa9(0x134),_0x51755a+_0x3fffa9(0x17d),_0x3fffa9(0x1ab),_0x3fffa9(0x147)+_0x2bb902[_0x3fffa9(0x161)]+'\x27',_0x53443d)))),_0x50f6e5;}function validateEmbeddedSegment(_0x5372be,_0x221397,_0x39e8ad){const _0x5c4c9e=a122_0x5645,_0x470a7a=[];return _0x5372be[_0x5c4c9e(0x18c)]&&_0x470a7a[_0x5c4c9e(0x12d)](...validateRuleDef(_0x5372be[_0x5c4c9e(0x18c)],_0x221397+_0x5c4c9e(0x129),_0x39e8ad)),_0x470a7a;}function validateStage(_0x15ae7e,_0x171a57,_0x133989,_0x153bbd){const _0x3e2a58=a122_0x5645,_0x2f71f9=[],_0x4e014d=_0x3e2a58(0x190)+_0x171a57+']',_0x54e3a6=new Map(),_0x16e195=new Map();if(_0x15ae7e['steps']){for(let _0x579be1=0x0;_0x579be1<_0x15ae7e[_0x3e2a58(0x1c0)][_0x3e2a58(0x142)];_0x579be1++){const _0x4b506e=_0x15ae7e[_0x3e2a58(0x1c0)][_0x579be1];_0x4b506e[_0x3e2a58(0x13c)]&&_0x54e3a6[_0x3e2a58(0x183)](_0x4b506e['name'],_0x4b506e);}for(let _0x47e917=0x0;_0x47e917<_0x15ae7e[_0x3e2a58(0x1c0)][_0x3e2a58(0x142)];_0x47e917++){const _0x10eeef=_0x15ae7e['steps'][_0x47e917],_0x8b4455=_0x4e014d+_0x3e2a58(0x133)+_0x47e917+']';if(_0x10eeef[_0x3e2a58(0x13c)]){if(_0x16e195['has'](_0x10eeef['name'])){const _0x8dd1e=_0x16e195[_0x3e2a58(0x14f)](_0x10eeef[_0x3e2a58(0x13c)]);_0x2f71f9[_0x3e2a58(0x12d)](createIssue(_0x3e2a58(0x134),_0x8b4455+_0x3e2a58(0x11d),_0x3e2a58(0x12a),_0x3e2a58(0x1c7)+_0x10eeef[_0x3e2a58(0x13c)]+_0x3e2a58(0x172)+_0x8dd1e+'])',_0x153bbd));}else _0x16e195[_0x3e2a58(0x183)](_0x10eeef[_0x3e2a58(0x13c)],_0x47e917);}_0x2f71f9[_0x3e2a58(0x12d)](...validateStep(_0x10eeef,_0x8b4455,_0x153bbd,_0x54e3a6));}}_0x15ae7e[_0x3e2a58(0x1d7)]&&_0x2f71f9[_0x3e2a58(0x12d)](...validateCriteria(_0x15ae7e[_0x3e2a58(0x1d7)],_0x4e014d+_0x3e2a58(0x1c2),_0x153bbd));if(_0x15ae7e[_0x3e2a58(0x1be)])for(let _0x1c14bc=0x0;_0x1c14bc<_0x15ae7e[_0x3e2a58(0x1be)][_0x3e2a58(0x142)];_0x1c14bc++){_0x2f71f9[_0x3e2a58(0x12d)](...validateCriteria(_0x15ae7e[_0x3e2a58(0x1be)][_0x1c14bc],_0x4e014d+_0x3e2a58(0x1a1)+_0x1c14bc+']',_0x153bbd));}return _0x15ae7e[_0x3e2a58(0x15b)]&&_0x2f71f9[_0x3e2a58(0x12d)](...validateCriteria(_0x15ae7e[_0x3e2a58(0x15b)],_0x4e014d+_0x3e2a58(0x141),_0x153bbd)),_0x2f71f9[_0x3e2a58(0x12d)](...validateStageStructure(_0x15ae7e,_0x171a57,_0x133989,_0x153bbd)),_0x2f71f9[_0x3e2a58(0x12d)](...validateFlowControl(_0x15ae7e,_0x171a57,_0x153bbd)),_0x2f71f9;}function validateStagesForVersion(_0x4a29ec,_0x352100,_0x44e7b9,_0x57f34b,_0x221b88,_0x352a83,_0x6b9fcf){const _0x7bbe55=a122_0x5645;if(_0x4a29ec[_0x7bbe55(0x142)]===0x0){_0x221b88['push']({'level':_0x7bbe55(0x134),'path':_0x57f34b+_0x7bbe55(0x1a9),'code':_0x7bbe55(0x184),'message':_0x7bbe55(0x119),'location':getLocationFromPath(_0x44e7b9[_0x7bbe55(0x12c)],_0x44e7b9[_0x7bbe55(0x1b5)],[_0x7bbe55(0x1a9)])});return;}const _0x38b370=new Set();for(const _0x11a0c3 of _0x4a29ec){if(_0x11a0c3[_0x7bbe55(0x1c0)])for(const _0x7ebe1 of _0x11a0c3[_0x7bbe55(0x1c0)]){_0x7ebe1[_0x7bbe55(0x13c)]&&_0x38b370[_0x7bbe55(0x165)](_0x7ebe1['name']);}}const _0x9b7af={..._0x44e7b9,'stepNames':_0x38b370},_0x5cb89b=validateVersionStructure(_0x4a29ec,_0x9b7af);for(const _0x36d3b3 of _0x5cb89b){const _0x29d486=_0x57f34b?{..._0x36d3b3,'path':''+_0x57f34b+_0x36d3b3[_0x7bbe55(0x177)]}:_0x36d3b3;if(_0x29d486[_0x7bbe55(0x126)]==='error')_0x221b88[_0x7bbe55(0x12d)](_0x29d486);else _0x352a83[_0x7bbe55(0x12d)](_0x29d486);}for(let _0x52fa25=0x0;_0x52fa25<_0x4a29ec[_0x7bbe55(0x142)];_0x52fa25++){const _0x56583d=validateStage(_0x4a29ec[_0x52fa25],_0x52fa25,_0x4a29ec[_0x7bbe55(0x142)],_0x9b7af);for(const _0x3d90d5 of _0x56583d){const _0x59089f=_0x57f34b?{..._0x3d90d5,'path':''+_0x57f34b+_0x3d90d5['path']}:_0x3d90d5;if(_0x59089f[_0x7bbe55(0x126)]===_0x7bbe55(0x134))_0x221b88[_0x7bbe55(0x12d)](_0x59089f);else _0x352a83[_0x7bbe55(0x12d)](_0x59089f);}}if(_0x352100[_0x7bbe55(0x16d)]){const _0x249a9c=_0x6b9fcf?.[_0x7bbe55(0x18d)]?_0x7bbe55(0x16d):_0x57f34b+_0x7bbe55(0x16d),_0x3d3b19=validateCriteria(_0x352100[_0x7bbe55(0x16d)],_0x249a9c,_0x9b7af);for(const _0x5aca2c of _0x3d3b19){if(_0x5aca2c['level']==='error')_0x221b88[_0x7bbe55(0x12d)](_0x5aca2c);else _0x352a83[_0x7bbe55(0x12d)](_0x5aca2c);}}}function extractVersionIndex(_0x4718e5){const _0x4c600a=a122_0x5645,_0x38871d=_0x4718e5[_0x4c600a(0x1a2)](/^journeys\[(\d+)\]\./);return _0x38871d?_0x38871d[0x1]:undefined;}function deduplicateAcrossVersions(_0x6b6baf){const _0x572c18=a122_0x5645,_0x15ee2e=new Map();for(let _0x12bbb0=0x0;_0x12bbb0<_0x6b6baf[_0x572c18(0x142)];_0x12bbb0++){const _0x35552d=_0x6b6baf[_0x12bbb0]['code']+':'+_0x6b6baf[_0x12bbb0][_0x572c18(0x13f)],_0x28f33e=extractVersionIndex(_0x6b6baf[_0x12bbb0][_0x572c18(0x177)]),_0x29beda=_0x15ee2e[_0x572c18(0x14f)](_0x35552d);if(_0x29beda){_0x29beda[_0x572c18(0x137)]['push'](_0x12bbb0);if(_0x28f33e)_0x29beda[_0x572c18(0x15f)][_0x572c18(0x165)](_0x28f33e);}else _0x15ee2e[_0x572c18(0x183)](_0x35552d,{'indices':[_0x12bbb0],'versions':new Set(_0x28f33e?[_0x28f33e]:[])});}const _0x330ffc=new Set();for(const {indices:_0x124cd3,versions:_0x128db4}of _0x15ee2e[_0x572c18(0x146)]()){if(_0x128db4[_0x572c18(0x192)]<=0x1)continue;const _0x43b20c=_0x6b6baf[_0x124cd3[0x0]];_0x43b20c['path']=_0x43b20c[_0x572c18(0x177)][_0x572c18(0x14a)](/^journeys\[\d+\]\./,''),_0x43b20c[_0x572c18(0x13f)]=_0x43b20c[_0x572c18(0x13f)]+_0x572c18(0x1b4)+_0x128db4[_0x572c18(0x192)]+'\x20versions)';for(let _0x4bd494=0x1;_0x4bd494<_0x124cd3['length'];_0x4bd494++){_0x330ffc[_0x572c18(0x165)](_0x124cd3[_0x4bd494]);}}const _0x2692db=[..._0x330ffc][_0x572c18(0x174)]((_0x164afc,_0x4a3a89)=>_0x4a3a89-_0x164afc);for(const _0x5e17df of _0x2692db){_0x6b6baf[_0x572c18(0x118)](_0x5e17df,0x1);}}export function validateJourneyDef(_0x1fea81,_0x1e21fc={},_0x1ab4bb={}){const _0x138874=a122_0x5645;if(_0x1ab4bb[_0x138874(0x1bc)])return runJourneySemanticChecks(_0x1fea81,_0x1e21fc);const _0x1f1f3c=JourneyDefSchema[_0x138874(0x17b)](_0x1fea81);if(_0x1f1f3c[_0x138874(0x1b1)])return runJourneySemanticChecks(_0x1f1f3c[_0x138874(0x18e)],_0x1e21fc);return zodErrorsToJourneyValidationResult(_0x1f1f3c[_0x138874(0x134)],_0x1e21fc);}function zodErrorsToJourneyValidationResult(_0x91957,_0x2fd636){const _0x58e346=a122_0x5645,_0x5da144=flattenZodIssues(_0x91957['issues']),_0x2fc21f=_0x5da144[_0x58e346(0x15c)](_0x882afe=>{const _0x10f933=_0x58e346,_0x447bf8=formatZodPath(_0x882afe['path']),_0x34753d=mapJourneyZodIssueToCode(_0x882afe,_0x447bf8),_0x526e51=getLocationFromPath(_0x2fd636[_0x10f933(0x12c)],_0x2fd636[_0x10f933(0x1b5)],_0x882afe[_0x10f933(0x177)]['map'](_0x52e778=>typeof _0x52e778===_0x10f933(0x197)?String(_0x52e778):_0x52e778));return{'level':_0x10f933(0x134),'path':_0x447bf8,'code':_0x34753d,'message':_0x882afe[_0x10f933(0x13f)],..._0x526e51&&{'location':_0x526e51}};});return{'valid':![],'errors':_0x2fc21f,'warnings':[]};}function mapJourneyZodIssueToCode(_0x521baf,_0x162fa2){const _0x21bf01=a122_0x5645;if(_0x162fa2===_0x21bf01(0x13c))return _0x21bf01(0x16b);if(_0x162fa2[_0x21bf01(0x175)](_0x21bf01(0x13e))&&_0x162fa2[_0x21bf01(0x160)](_0x21bf01(0x1c0)))return'JOURNEY_SCHEMA_ERROR';if(_0x162fa2==='stages'||_0x162fa2[_0x21bf01(0x175)]('.stages'))return _0x21bf01(0x184);if(_0x162fa2===''&&_0x521baf['message']['includes'](_0x21bf01(0x131)))return _0x21bf01(0x184);if(_0x162fa2[_0x21bf01(0x160)]('activation'))return _0x21bf01(0x140);return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x2b9bdb,_0x252818){const _0x5f5c24=a122_0x5645,_0x518d83=[],_0x355b3b=[];(!_0x2b9bdb[_0x5f5c24(0x13c)]||_0x2b9bdb[_0x5f5c24(0x13c)][_0x5f5c24(0x1a7)]()==='')&&_0x518d83['push']({'level':_0x5f5c24(0x134),'path':_0x5f5c24(0x13c),'code':_0x5f5c24(0x16b),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818[_0x5f5c24(0x1b5)],[_0x5f5c24(0x13c)])});const _0x2d3a91=new Set();if(_0x2b9bdb[_0x5f5c24(0x1c3)])for(const _0x1d87fe of Object['keys'](_0x2b9bdb[_0x5f5c24(0x1c3)])){_0x2d3a91['add'](_0x1d87fe);}const _0x222423=new Set();if(_0x2b9bdb[_0x5f5c24(0x186)])for(const _0x530de3 of Object[_0x5f5c24(0x155)](_0x2b9bdb[_0x5f5c24(0x186)])){_0x222423['add'](_0x530de3);}const _0x13f6bb=new Set(),_0x3cf29f={..._0x252818,'embeddedSegments':_0x2d3a91,'referencedSegments':_0x13f6bb,'activationKeys':_0x222423[_0x5f5c24(0x192)]>0x0?_0x222423:undefined};if(_0x2b9bdb['segments'])for(const [_0x1a35fe,_0x533248]of Object[_0x5f5c24(0x189)](_0x2b9bdb['segments'])){const _0x37d0e5=validateEmbeddedSegment(_0x533248,_0x5f5c24(0x162)+_0x1a35fe,_0x3cf29f);for(const _0x360875 of _0x37d0e5){if(_0x360875['level']==='error')_0x518d83[_0x5f5c24(0x12d)](_0x360875);else _0x355b3b[_0x5f5c24(0x12d)](_0x360875);}}const _0x181254=!!_0x2b9bdb['goal'],_0x29b1d6=_0x2b9bdb['journeys']?.[_0x5f5c24(0x138)](_0xfcc879=>!!_0xfcc879['goal'])??![];!_0x181254&&!_0x29b1d6&&_0x355b3b['push']({'level':_0x5f5c24(0x1b0),'path':_0x5f5c24(0x16d),'code':_0x5f5c24(0x12b),'message':_0x5f5c24(0x153),'location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818['source'],[_0x5f5c24(0x16d)])});const _0xd88f72=_0x2b9bdb[_0x5f5c24(0x19e)]??_0x2b9bdb[_0x5f5c24(0x15f)];if(_0xd88f72&&_0xd88f72['filter'](_0xafc30c=>_0xafc30c[_0x5f5c24(0x16a)]===!![])[_0x5f5c24(0x142)]>0x1){const _0x5d1b27=_0x2b9bdb[_0x5f5c24(0x19e)]?'journeys':_0x5f5c24(0x15f);_0x518d83['push']({'level':_0x5f5c24(0x134),'path':_0x5d1b27,'code':'DUPLICATE_LATEST','message':_0x5f5c24(0x18f)+(_0x5d1b27===_0x5f5c24(0x19e)?_0x5f5c24(0x1cf):_0x5f5c24(0x1bd))+_0x5f5c24(0x19b),'location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818[_0x5f5c24(0x1b5)],[_0x5d1b27])});}if(_0x2b9bdb[_0x5f5c24(0x19e)]&&_0x2b9bdb['journeys']['length']>0x0)for(let _0x19ec41=0x0;_0x19ec41<_0x2b9bdb[_0x5f5c24(0x19e)][_0x5f5c24(0x142)];_0x19ec41++){const _0x1ce568=_0x2b9bdb['journeys'][_0x19ec41];if(_0x2b9bdb[_0x5f5c24(0x19e)][_0x5f5c24(0x142)]>0x1&&_0x1ce568['state']==='launched')continue;const _0x3c06e4=_0x1ce568[_0x5f5c24(0x1a9)]||[],_0x4f4bfc='journeys['+_0x19ec41+'].',_0x549ec4=!!_0x1ce568[_0x5f5c24(0x16d)],_0x51d1d6=_0x549ec4?{..._0x2b9bdb,'goal':_0x1ce568[_0x5f5c24(0x16d)]}:_0x2b9bdb;validateStagesForVersion(_0x3c06e4,_0x51d1d6,_0x3cf29f,_0x4f4bfc,_0x518d83,_0x355b3b,{'goalIsInherited':!_0x549ec4});}else{if(_0x2b9bdb[_0x5f5c24(0x15f)]&&_0x2b9bdb[_0x5f5c24(0x15f)][_0x5f5c24(0x142)]>0x0)for(let _0x239020=0x0;_0x239020<_0x2b9bdb[_0x5f5c24(0x15f)][_0x5f5c24(0x142)];_0x239020++){const _0x4f9d5a=_0x2b9bdb[_0x5f5c24(0x15f)][_0x239020];if(_0x2b9bdb[_0x5f5c24(0x15f)][_0x5f5c24(0x142)]>0x1&&_0x4f9d5a['state']===_0x5f5c24(0x148))continue;const _0x3ceb9e=_0x4f9d5a[_0x5f5c24(0x1a9)]||[],_0xf70c44=_0x5f5c24(0x15a)+_0x239020+'].';validateStagesForVersion(_0x3ceb9e,_0x2b9bdb,_0x3cf29f,_0xf70c44,_0x518d83,_0x355b3b);}else{const _0x26c319=_0x2b9bdb[_0x5f5c24(0x1a9)]||[];validateStagesForVersion(_0x26c319,_0x2b9bdb,_0x3cf29f,'',_0x518d83,_0x355b3b);}}_0x2b9bdb['journeys']&&_0x2b9bdb[_0x5f5c24(0x19e)][_0x5f5c24(0x142)]>0x1&&(deduplicateAcrossVersions(_0x518d83),deduplicateAcrossVersions(_0x355b3b));for(const _0x4cb47c of _0x2d3a91){!_0x13f6bb[_0x5f5c24(0x1bb)](_0x4cb47c)&&!_0x4cb47c[_0x5f5c24(0x1aa)](_0x5f5c24(0x127))&&_0x355b3b['push']({'level':_0x5f5c24(0x1b0),'path':'segments.'+_0x4cb47c,'code':_0x5f5c24(0x1b3),'message':'Embedded\x20segment\x20\x27'+_0x4cb47c+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818[_0x5f5c24(0x1b5)],[_0x5f5c24(0x1c3),_0x4cb47c])});}return{'valid':_0x518d83['length']===0x0,'errors':_0x518d83,'warnings':_0x355b3b};}
|
|
1
|
+
(function(_0x3cd3cb,_0x9f3d87){const _0x473cea=a122_0x48a1,_0x274d35=_0x3cd3cb();while(!![]){try{const _0x1fa2b8=-parseInt(_0x473cea(0x106))/0x1+-parseInt(_0x473cea(0x11e))/0x2+-parseInt(_0x473cea(0xf1))/0x3*(parseInt(_0x473cea(0x9e))/0x4)+parseInt(_0x473cea(0x13e))/0x5*(parseInt(_0x473cea(0x11f))/0x6)+-parseInt(_0x473cea(0xd9))/0x7+parseInt(_0x473cea(0x148))/0x8+parseInt(_0x473cea(0x146))/0x9*(parseInt(_0x473cea(0xfd))/0xa);if(_0x1fa2b8===_0x9f3d87)break;else _0x274d35['push'](_0x274d35['shift']());}catch(_0x3bd98b){_0x274d35['push'](_0x274d35['shift']());}}}(a122_0x588e,0xec14b));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x4195a9,_0x1dd882,_0x5c4c9e,_0x1957b9,_0x2266f6,_0x3e8af9){const _0x45bf6e=a122_0x48a1;return{'level':_0x4195a9,'path':_0x1dd882,'code':_0x5c4c9e,'message':_0x1957b9,'location':getLocationFromPath(_0x2266f6[_0x45bf6e(0xee)],_0x2266f6[_0x45bf6e(0xb0)],pathToArray(_0x3e8af9??_0x1dd882))};}function validateVersionStructure(_0x2ddd88,_0x17c2a3){const _0x3c765f=a122_0x48a1,_0x32d48b=[];return _0x2ddd88['length']>MAX_STAGES&&_0x32d48b[_0x3c765f(0xb5)](createIssue(_0x3c765f(0x103),'stages',_0x3c765f(0xdf),_0x3c765f(0x143)+_0x2ddd88[_0x3c765f(0xcf)]+_0x3c765f(0x126)+MAX_STAGES,_0x17c2a3)),_0x32d48b;}function validateStageStructure(_0x4b52cf,_0x1c7bc9,_0x5f001a,_0xbccd70){const _0x5703f5=a122_0x48a1,_0x1dcf8f=[],_0x464d09=_0x5703f5(0x108)+_0x1c7bc9+']';_0x1c7bc9===0x0&&!_0x4b52cf['entry_criteria']&&_0x1dcf8f[_0x5703f5(0xb5)](createIssue(_0x5703f5(0x103),_0x464d09+_0x5703f5(0xfc),_0x5703f5(0xbd),_0x5703f5(0xc4)+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0xa5),_0xbccd70,_0x464d09));const _0x5c86a7=_0x1c7bc9===_0x5f001a-0x1;!_0x5c86a7&&!_0x4b52cf[_0x5703f5(0xbb)]&&_0x1dcf8f[_0x5703f5(0xb5)](createIssue(_0x5703f5(0x103),_0x464d09+_0x5703f5(0xd8),_0x5703f5(0x139),_0x5703f5(0xc4)+_0x4b52cf['name']+_0x5703f5(0xaf),_0xbccd70,_0x464d09));(!_0x4b52cf[_0x5703f5(0xf4)]||_0x4b52cf[_0x5703f5(0xf4)][_0x5703f5(0xcf)]===0x0)&&_0x1dcf8f['push'](createIssue('warning',_0x464d09+_0x5703f5(0xd1),_0x5703f5(0xa6),_0x5703f5(0xc4)+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0x125),_0xbccd70,_0x464d09));const _0xf03448=_0x4b52cf[_0x5703f5(0x124)]?.[_0x5703f5(0xcf)]??0x0;if(_0xf03448===0x0)_0x1dcf8f[_0x5703f5(0xb5)](createIssue('error',_0x464d09+'.steps',_0x5703f5(0x147),'Stage\x20\x27'+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0x135),_0xbccd70,_0x464d09+_0x5703f5(0x118)));else{if(_0xf03448===0x1)_0x1dcf8f[_0x5703f5(0xb5)](createIssue(_0x5703f5(0x142),_0x464d09+'.steps',_0x5703f5(0x147),'Stage\x20\x27'+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0x11b),_0xbccd70,_0x464d09+_0x5703f5(0x118)));else _0xf03448<=0x3&&_0x1dcf8f['push'](createIssue('warning',_0x464d09+_0x5703f5(0x118),_0x5703f5(0x145),_0x5703f5(0xc4)+_0x4b52cf['name']+_0x5703f5(0x13d)+_0xf03448+_0x5703f5(0xcd),_0xbccd70,_0x464d09+_0x5703f5(0x118)));}return _0x1dcf8f;}function validateStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d){const _0x47b368=a122_0x48a1,_0x1d5628=[];if(_0x480cd1['type']===_0x47b368(0xc6))return _0x480cd1[_0x47b368(0x14b)]&&_0x1d5628['push'](createIssue(_0x47b368(0x103),_0x72ab33+_0x47b368(0xf2),_0x47b368(0xec),_0x47b368(0xbf)+_0x480cd1[_0x47b368(0x116)]+_0x47b368(0xbe),_0x4d6bc2)),'with'in _0x480cd1&&_0x480cd1['with']!==undefined&&_0x1d5628[_0x47b368(0xb5)](createIssue(_0x47b368(0x103),_0x72ab33+_0x47b368(0x112),'END_STEP_HAS_NEXT_OR_WITH',_0x47b368(0xbf)+_0x480cd1['name']+_0x47b368(0xdd),_0x4d6bc2)),_0x1d5628;_0x480cd1['next']&&(_0x4d6bc2[_0x47b368(0x99)]&&!_0x4d6bc2[_0x47b368(0x99)][_0x47b368(0xca)](_0x480cd1[_0x47b368(0x14b)])&&_0x1d5628[_0x47b368(0xb5)](createIssue('error',_0x72ab33+_0x47b368(0xf2),'INVALID_NEXT_REFERENCE','Step\x20references\x20non-existent\x20step\x20\x27'+_0x480cd1['next']+'\x27',_0x4d6bc2)));switch(_0x480cd1[_0x47b368(0xab)]){case _0x47b368(0x9a):_0x1d5628['push'](...validateWaitStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d));break;case _0x47b368(0x129):_0x1d5628[_0x47b368(0xb5)](...validateActivationStep(_0x480cd1,_0x72ab33,_0x4d6bc2));break;case'decision_point':_0x1d5628[_0x47b368(0xb5)](...validateDecisionPointStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d));break;case _0x47b368(0xda):_0x1d5628['push'](...validateAbTestStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d));break;case _0x47b368(0xc1):_0x1d5628[_0x47b368(0xb5)](...validateJumpStep(_0x480cd1,_0x72ab33,_0x4d6bc2));break;}return _0x1d5628;}function validateWaitStep(_0xa46c6e,_0x47a8ab,_0x4f58ef,_0x2934d7){const _0x30f3ae=a122_0x48a1,_0x22e5b8=[];if(!_0xa46c6e['with'])return _0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+_0x30f3ae(0x112),_0x30f3ae(0xa3),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x4f58ef,_0x47a8ab)),_0x22e5b8;if(_0xa46c6e[_0x30f3ae(0x131)]['condition']){const _0x275893=_0xa46c6e[_0x30f3ae(0x131)][_0x30f3ae(0x9d)];if(_0x275893['segment']){_0x4f58ef[_0x30f3ae(0xb9)]?.[_0x30f3ae(0xe0)](_0x275893[_0x30f3ae(0x14d)]);!_0x275893[_0x30f3ae(0x14d)]['startsWith'](_0x30f3ae(0x110))&&(_0x4f58ef[_0x30f3ae(0xb8)]&&!_0x4f58ef[_0x30f3ae(0xb8)][_0x30f3ae(0xca)](_0x275893[_0x30f3ae(0x14d)])&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+'.with.condition.segment',_0x30f3ae(0x130),_0x30f3ae(0xfe)+_0x275893[_0x30f3ae(0x14d)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x4f58ef)));_0x275893[_0x30f3ae(0x14b)]&&_0x4f58ef['stepNames']&&!_0x4f58ef[_0x30f3ae(0x99)]['has'](_0x275893['next'])&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+_0x30f3ae(0xc9),'INVALID_NEXT_REFERENCE',_0x30f3ae(0x10c)+_0x275893[_0x30f3ae(0x14b)]+'\x27',_0x4f58ef));_0x275893[_0x30f3ae(0xbc)]?.['next']&&_0x4f58ef[_0x30f3ae(0x99)]&&!_0x4f58ef[_0x30f3ae(0x99)][_0x30f3ae(0xca)](_0x275893[_0x30f3ae(0xbc)][_0x30f3ae(0x14b)])&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+_0x30f3ae(0x138),_0x30f3ae(0x10f),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x275893[_0x30f3ae(0xbc)]['next']+'\x27',_0x4f58ef));const _0x4658a6=_0x275893[_0x30f3ae(0x14b)]||_0xa46c6e[_0x30f3ae(0x14b)],_0x3c291c=_0x275893[_0x30f3ae(0xbc)]?.[_0x30f3ae(0x14b)]||_0xa46c6e[_0x30f3ae(0x14b)];if(_0x4658a6){const _0x24b566=_0x2934d7[_0x30f3ae(0x127)](_0x4658a6);_0x24b566?.['type']===_0x30f3ae(0xdb)&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x142),_0x47a8ab+_0x30f3ae(0xc9),_0x30f3ae(0x12f),_0x30f3ae(0x9f)+_0x4658a6+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x4f58ef,_0x47a8ab+_0x30f3ae(0x11a)));}if(_0x3c291c){const _0x3fe5a5=_0x2934d7['get'](_0x3c291c);_0x3fe5a5?.['type']==='merge'&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x142),_0x47a8ab+_0x30f3ae(0x138),'BRANCH_DIRECTLY_TO_MERGE',_0x30f3ae(0xce)+_0x3c291c+_0x30f3ae(0x133),_0x4f58ef,_0x47a8ab+_0x30f3ae(0xd0)));}}}return _0x22e5b8;}function validateActivationStep(_0x3ba7f6,_0x21b7ee,_0x60315a){const _0x39b4f8=a122_0x48a1,_0x3d8852=[];if(!_0x3ba7f6[_0x39b4f8(0x131)]?.[_0x39b4f8(0x129)])return _0x3d8852['push'](createIssue(_0x39b4f8(0x103),_0x21b7ee+_0x39b4f8(0x137),_0x39b4f8(0xef),_0x39b4f8(0x144),_0x60315a,_0x21b7ee)),_0x3d8852;const _0x27f77d=_0x3ba7f6[_0x39b4f8(0x131)][_0x39b4f8(0x129)];return _0x60315a[_0x39b4f8(0xd3)]&&!_0x27f77d[_0x39b4f8(0x12a)](_0x39b4f8(0x110))&&(!_0x60315a[_0x39b4f8(0xd3)][_0x39b4f8(0xca)](_0x27f77d)&&_0x3d8852[_0x39b4f8(0xb5)](createIssue(_0x39b4f8(0x103),_0x21b7ee+_0x39b4f8(0x137),_0x39b4f8(0x10d),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x27f77d+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x60315a))),_0x3d8852;}function validateDecisionPointStep(_0x4f0ae2,_0x4135bf,_0x376799,_0x27de2c){const _0x4ca11e=a122_0x48a1,_0x1ee8f4=[];if(!_0x4f0ae2['with']?.[_0x4ca11e(0xd2)]||_0x4f0ae2[_0x4ca11e(0x131)]['branches'][_0x4ca11e(0xcf)]===0x0)return _0x1ee8f4[_0x4ca11e(0xb5)](createIssue('error',_0x4135bf+_0x4ca11e(0x100),_0x4ca11e(0xad),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x376799,_0x4135bf)),_0x1ee8f4;for(let _0x323ade=0x0;_0x323ade<_0x4f0ae2[_0x4ca11e(0x131)]['branches'][_0x4ca11e(0xcf)];_0x323ade++){const _0x4cdde8=_0x4f0ae2[_0x4ca11e(0x131)]['branches'][_0x323ade],_0x4e7370=_0x4135bf+_0x4ca11e(0xe7)+_0x323ade+']';_0x4cdde8['segment']&&!_0x4cdde8[_0x4ca11e(0xc2)]&&(_0x376799[_0x4ca11e(0xb9)]?.['add'](_0x4cdde8[_0x4ca11e(0x14d)]),!_0x4cdde8['segment']['startsWith'](_0x4ca11e(0x110))&&(_0x376799[_0x4ca11e(0xb8)]&&!_0x376799['embeddedSegments']['has'](_0x4cdde8[_0x4ca11e(0x14d)])&&_0x1ee8f4[_0x4ca11e(0xb5)](createIssue(_0x4ca11e(0x103),_0x4e7370+_0x4ca11e(0xe9),_0x4ca11e(0x130),_0x4ca11e(0xb2)+_0x4cdde8[_0x4ca11e(0x14d)]+'\x27',_0x376799))));_0x4cdde8[_0x4ca11e(0x14b)]&&_0x376799['stepNames']&&!_0x376799['stepNames'][_0x4ca11e(0xca)](_0x4cdde8[_0x4ca11e(0x14b)])&&_0x1ee8f4[_0x4ca11e(0xb5)](createIssue(_0x4ca11e(0x103),_0x4e7370+_0x4ca11e(0xf2),_0x4ca11e(0x10f),'Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x4cdde8['next']+'\x27',_0x376799));if(_0x4cdde8[_0x4ca11e(0x14b)]){const _0x52151b=_0x27de2c['get'](_0x4cdde8[_0x4ca11e(0x14b)]);_0x52151b?.['type']===_0x4ca11e(0xdb)&&_0x1ee8f4[_0x4ca11e(0xb5)](createIssue(_0x4ca11e(0x142),_0x4e7370+_0x4ca11e(0xf2),'BRANCH_DIRECTLY_TO_MERGE',_0x4ca11e(0xa2)+_0x4cdde8[_0x4ca11e(0x116)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x4cdde8['next']+_0x4ca11e(0xa4),_0x376799));}}return _0x1ee8f4;}function validateAbTestStep(_0x2478c4,_0x181de6,_0x408319,_0x274689){const _0x2e01e4=a122_0x48a1,_0x5b2b1d=[];if(!_0x2478c4[_0x2e01e4(0x131)]?.['variants']||_0x2478c4[_0x2e01e4(0x131)][_0x2e01e4(0xc3)][_0x2e01e4(0xcf)]===0x0)return _0x5b2b1d[_0x2e01e4(0xb5)](createIssue(_0x2e01e4(0x103),_0x181de6+_0x2e01e4(0xf6),'MISSING_CONDITIONS',_0x2e01e4(0xb7),_0x408319,_0x181de6)),_0x5b2b1d;const _0x59a0ec=_0x2478c4['with'][_0x2e01e4(0xc3)][_0x2e01e4(0x12b)]((_0x28aa8f,_0x2951e3)=>_0x28aa8f+(_0x2951e3['percentage']||0x0),0x0);Math['abs'](_0x59a0ec-0x64)>0.01&&_0x5b2b1d[_0x2e01e4(0xb5)](createIssue(_0x2e01e4(0x103),_0x181de6+_0x2e01e4(0xf6),_0x2e01e4(0xe5),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x59a0ec+'%)',_0x408319));for(let _0x435368=0x0;_0x435368<_0x2478c4[_0x2e01e4(0x131)][_0x2e01e4(0xc3)][_0x2e01e4(0xcf)];_0x435368++){const _0x229b72=_0x2478c4[_0x2e01e4(0x131)][_0x2e01e4(0xc3)][_0x435368],_0x5cec8d=_0x181de6+_0x2e01e4(0x114)+_0x435368+']';_0x229b72[_0x2e01e4(0x14b)]&&_0x408319[_0x2e01e4(0x99)]&&!_0x408319[_0x2e01e4(0x99)][_0x2e01e4(0xca)](_0x229b72['next'])&&_0x5b2b1d[_0x2e01e4(0xb5)](createIssue('error',_0x5cec8d+_0x2e01e4(0xf2),_0x2e01e4(0x10f),_0x2e01e4(0xac)+_0x229b72[_0x2e01e4(0x14b)]+'\x27',_0x408319));if(_0x229b72[_0x2e01e4(0x14b)]){const _0x578f03=_0x274689[_0x2e01e4(0x127)](_0x229b72['next']);_0x578f03?.['type']===_0x2e01e4(0xdb)&&_0x5b2b1d['push'](createIssue(_0x2e01e4(0x142),_0x5cec8d+_0x2e01e4(0xf2),_0x2e01e4(0x12f),_0x2e01e4(0x13a)+_0x229b72[_0x2e01e4(0x116)]+_0x2e01e4(0x107)+_0x229b72['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x408319));}}return _0x5b2b1d;}function validateJumpStep(_0x56a801,_0x547699,_0x40b1ca){const _0x4f960c=a122_0x48a1,_0x2b7e51=[];if(!_0x56a801[_0x4f960c(0x131)]?.[_0x4f960c(0xe2)])return _0x2b7e51[_0x4f960c(0xb5)](createIssue(_0x4f960c(0x103),_0x547699+_0x4f960c(0x109),_0x4f960c(0xed),'Jump\x20step\x20requires\x20a\x20target',_0x40b1ca,_0x547699)),_0x2b7e51;return(!_0x56a801[_0x4f960c(0x131)][_0x4f960c(0xe2)]['journey']||!_0x56a801[_0x4f960c(0x131)]['target'][_0x4f960c(0x140)])&&_0x2b7e51[_0x4f960c(0xb5)](createIssue(_0x4f960c(0x103),_0x547699+_0x4f960c(0x109),_0x4f960c(0xed),_0x4f960c(0x13f),_0x40b1ca)),_0x2b7e51;}function a122_0x48a1(_0x3ec556,_0x73767a){_0x3ec556=_0x3ec556-0x97;const _0x588e7b=a122_0x588e();let _0x48a1ee=_0x588e7b[_0x3ec556];return _0x48a1ee;}function buildConvergenceMap(_0x26c39f){const _0x25135b=a122_0x48a1,_0x44df3e=new Map();function _0x4f2043(_0x594012,_0x2c06ed){const _0xa4775b=a122_0x48a1,_0x5bcd51=_0x44df3e[_0xa4775b(0x127)](_0x594012)||[];_0x5bcd51['push'](_0x2c06ed),_0x44df3e[_0xa4775b(0x149)](_0x594012,_0x5bcd51);}for(const _0x12e585 of _0x26c39f){_0x12e585['next']&&_0x4f2043(_0x12e585[_0x25135b(0x14b)],{'stepName':_0x12e585['name'],'description':'step\x20\x27'+_0x12e585[_0x25135b(0x116)]+'\x27'});if(_0x12e585[_0x25135b(0xab)]==='decision_point'&&_0x12e585[_0x25135b(0x131)]?.[_0x25135b(0xd2)])for(const _0x469acb of _0x12e585['with'][_0x25135b(0xd2)]){_0x469acb[_0x25135b(0x14b)]&&_0x4f2043(_0x469acb['next'],{'stepName':_0x12e585['name'],'description':'branch\x20\x27'+_0x469acb[_0x25135b(0x116)]+_0x25135b(0x117)+_0x12e585[_0x25135b(0x116)]+'\x27'});}if(_0x12e585['type']===_0x25135b(0xda)&&_0x12e585[_0x25135b(0x131)]?.[_0x25135b(0xc3)])for(const _0x1aac0f of _0x12e585[_0x25135b(0x131)]['variants']){_0x1aac0f['next']&&_0x4f2043(_0x1aac0f[_0x25135b(0x14b)],{'stepName':_0x12e585[_0x25135b(0x116)],'description':_0x25135b(0x102)+_0x1aac0f[_0x25135b(0x116)]+_0x25135b(0x117)+_0x12e585['name']+'\x27'});}_0x12e585[_0x25135b(0xab)]===_0x25135b(0x9a)&&_0x12e585['with']?.[_0x25135b(0x9d)]&&(_0x12e585[_0x25135b(0x131)][_0x25135b(0x9d)]['next']&&_0x4f2043(_0x12e585[_0x25135b(0x131)]['condition'][_0x25135b(0x14b)],{'stepName':_0x12e585[_0x25135b(0x116)],'description':_0x25135b(0xc0)+_0x12e585[_0x25135b(0x116)]+'\x27'}),_0x12e585['with']['condition'][_0x25135b(0xbc)]?.[_0x25135b(0x14b)]&&_0x4f2043(_0x12e585[_0x25135b(0x131)][_0x25135b(0x9d)][_0x25135b(0xbc)][_0x25135b(0x14b)],{'stepName':_0x12e585['name'],'description':_0x25135b(0x141)+_0x12e585[_0x25135b(0x116)]+'\x27'}));}return _0x44df3e;}function validateFlowControl(_0x16b4c4,_0x50b0ca,_0x598c77){const _0x5cbcdd=a122_0x48a1,_0x2d060a=[],_0xc57f39=_0x5cbcdd(0x108)+_0x50b0ca+']',_0x20ffea=_0x16b4c4[_0x5cbcdd(0x124)]||[];if(_0x20ffea[_0x5cbcdd(0xcf)]===0x0)return _0x2d060a;const _0x16f24f=new Map();for(const _0x86f0e0 of _0x20ffea){_0x86f0e0[_0x5cbcdd(0x116)]&&_0x16f24f[_0x5cbcdd(0x149)](_0x86f0e0[_0x5cbcdd(0x116)],_0x86f0e0);}const _0x42cefc=buildConvergenceMap(_0x20ffea),_0x1a4791=_0x20ffea[_0x5cbcdd(0x120)](_0x272194=>_0x272194[_0x5cbcdd(0xab)]===_0x5cbcdd(0xc6));!_0x1a4791&&_0x2d060a[_0x5cbcdd(0xb5)](createIssue(_0x5cbcdd(0x103),_0xc57f39+_0x5cbcdd(0x118),_0x5cbcdd(0xb4),_0x5cbcdd(0xc4)+_0x16b4c4[_0x5cbcdd(0x116)]+'\x27\x20has\x20no\x20end\x20step',_0x598c77));for(const [_0x371802,_0x361284]of _0x42cefc){const _0x5386aa=_0x16f24f[_0x5cbcdd(0x127)](_0x371802);if(!_0x5386aa)continue;if(_0x361284['length']>0x1&&_0x5386aa[_0x5cbcdd(0xab)]!==_0x5cbcdd(0xdb)){const _0x133867=_0x361284[_0x5cbcdd(0xc7)](_0x53785d=>_0x53785d[_0x5cbcdd(0x132)])[_0x5cbcdd(0x134)](',\x20');_0x2d060a[_0x5cbcdd(0xb5)](createIssue('error',_0xc57f39+_0x5cbcdd(0x118),_0x5cbcdd(0xeb),_0x5cbcdd(0x14a)+_0x371802+_0x5cbcdd(0xb1)+_0x133867+').\x20Use\x20a\x20merge\x20step.',_0x598c77));}_0x361284[_0x5cbcdd(0xcf)]===0x1&&_0x5386aa[_0x5cbcdd(0xab)]===_0x5cbcdd(0xdb)&&_0x2d060a[_0x5cbcdd(0xb5)](createIssue(_0x5cbcdd(0x142),_0xc57f39+_0x5cbcdd(0x118),_0x5cbcdd(0x122),_0x5cbcdd(0xa7)+_0x371802+_0x5cbcdd(0xe1)+_0x361284[0x0][_0x5cbcdd(0x132)]+_0x5cbcdd(0xf0),_0x598c77));}for(const _0xf5f647 of _0x20ffea){if(_0xf5f647['type']==='merge'&&_0xf5f647['next']){const _0x303949=_0x16f24f[_0x5cbcdd(0x127)](_0xf5f647[_0x5cbcdd(0x14b)]);_0x303949?.[_0x5cbcdd(0xab)]==='merge'&&_0x2d060a['push'](createIssue(_0x5cbcdd(0x103),_0xc57f39+_0x5cbcdd(0x118),'MERGE_TO_MERGE_CHAIN',_0x5cbcdd(0xa7)+_0xf5f647[_0x5cbcdd(0x116)]+_0x5cbcdd(0x128)+_0xf5f647['next']+_0x5cbcdd(0xba),_0x598c77));}}return _0x2d060a;}function validateCriteria(_0xa7e614,_0x4f8b14,_0x58acb3){const _0x1ec799=a122_0x48a1,_0x3568b3=[];return _0xa7e614[_0x1ec799(0x14d)]&&(_0x58acb3['referencedSegments']?.['add'](_0xa7e614['segment']),!_0xa7e614[_0x1ec799(0x14d)]['startsWith']('ref:')&&(_0x58acb3[_0x1ec799(0xb8)]&&!_0x58acb3[_0x1ec799(0xb8)][_0x1ec799(0xca)](_0xa7e614['segment'])&&_0x3568b3[_0x1ec799(0xb5)](createIssue(_0x1ec799(0x103),_0x4f8b14+_0x1ec799(0xe9),_0x1ec799(0x130),_0x1ec799(0x101)+_0xa7e614[_0x1ec799(0x14d)]+'\x27',_0x58acb3)))),_0x3568b3;}function validateEmbeddedSegment(_0x19ac1c,_0x22d54c,_0x8ccdd3){const _0x16883b=a122_0x48a1,_0xc3dd8a=[];return _0x19ac1c[_0x16883b(0xe8)]&&_0xc3dd8a[_0x16883b(0xb5)](...validateRuleDef(_0x19ac1c[_0x16883b(0xe8)],_0x22d54c+_0x16883b(0x9b),_0x8ccdd3)),_0xc3dd8a;}function validateStage(_0x4355b0,_0x413224,_0x509c02,_0x41d789){const _0x21c688=a122_0x48a1,_0x189813=[],_0x5a9009=_0x21c688(0x108)+_0x413224+']',_0x58266f=new Map(),_0x3d6adb=new Map();if(_0x4355b0[_0x21c688(0x124)]){for(let _0x3a5b91=0x0;_0x3a5b91<_0x4355b0[_0x21c688(0x124)][_0x21c688(0xcf)];_0x3a5b91++){const _0x45d3b9=_0x4355b0['steps'][_0x3a5b91];_0x45d3b9[_0x21c688(0x116)]&&_0x58266f[_0x21c688(0x149)](_0x45d3b9[_0x21c688(0x116)],_0x45d3b9);}for(let _0x29c944=0x0;_0x29c944<_0x4355b0[_0x21c688(0x124)][_0x21c688(0xcf)];_0x29c944++){const _0x1bbbef=_0x4355b0[_0x21c688(0x124)][_0x29c944],_0x1f6869=_0x5a9009+_0x21c688(0xd5)+_0x29c944+']';if(_0x1bbbef[_0x21c688(0x116)]){if(_0x3d6adb['has'](_0x1bbbef['name'])){const _0x2a3f12=_0x3d6adb[_0x21c688(0x127)](_0x1bbbef[_0x21c688(0x116)]);_0x189813[_0x21c688(0xb5)](createIssue(_0x21c688(0x103),_0x1f6869+_0x21c688(0xe3),'DUPLICATE_STEP_NAME','Duplicate\x20step\x20name\x20\x27'+_0x1bbbef[_0x21c688(0x116)]+_0x21c688(0x11c)+_0x2a3f12+'])',_0x41d789));}else _0x3d6adb['set'](_0x1bbbef[_0x21c688(0x116)],_0x29c944);}_0x189813['push'](...validateStep(_0x1bbbef,_0x1f6869,_0x41d789,_0x58266f));}}_0x4355b0[_0x21c688(0x111)]&&_0x189813['push'](...validateCriteria(_0x4355b0['entry_criteria'],_0x5a9009+_0x21c688(0xfc),_0x41d789));if(_0x4355b0[_0x21c688(0xf4)])for(let _0x4ade01=0x0;_0x4ade01<_0x4355b0[_0x21c688(0xf4)][_0x21c688(0xcf)];_0x4ade01++){_0x189813['push'](...validateCriteria(_0x4355b0[_0x21c688(0xf4)][_0x4ade01],_0x5a9009+'.exit_criteria['+_0x4ade01+']',_0x41d789));}return _0x4355b0[_0x21c688(0xbb)]&&_0x189813['push'](...validateCriteria(_0x4355b0[_0x21c688(0xbb)],_0x5a9009+_0x21c688(0xd8),_0x41d789)),_0x189813[_0x21c688(0xb5)](...validateStageStructure(_0x4355b0,_0x413224,_0x509c02,_0x41d789)),_0x189813[_0x21c688(0xb5)](...validateFlowControl(_0x4355b0,_0x413224,_0x41d789)),_0x189813;}function a122_0x588e(){const _0x3f1c62=['\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','join','\x27\x20has\x20no\x20steps','skipSchema','.with.activation','.with.condition.timeout.next','MISSING_MILESTONE','A/B\x20test\x20variant\x20\x27','latest','journeys,\x20stages,\x20or\x20versions','\x27\x20has\x20only\x20','4514855LaSTyF','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','stage','timeout\x20of\x20\x27','warning','Journey\x20has\x20','Activation\x20step\x20requires\x20an\x20activation\x20reference','FEW_STEPS','9rOVGpQ','INSUFFICIENT_STEPS','2077232yPqjrp','set','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','next','goal','segment','versions[','every','stepNames','wait','.rule','stages','condition','58484QSiWRq','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','level','.type','Decision\x20branch\x20\x27','MISSING_WAIT_PARAMS','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','MISSING_EXIT_CRITERIA','Merge\x20step\x20\x27','\x20versions)','version','Embedded\x20segment\x20\x27','type','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_CONDITIONS','.stages','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','source','\x27\x20(from:\x20','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Journey\x20has\x20no\x20goal\x20defined','MISSING_END_STEP','push','\x20with\x20latest:\x20true','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','embeddedSegments','referencedSegments','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','milestone','timeout','MISSING_ENTRY_CRITERIA','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','End\x20step\x20\x27','condition\x20of\x20\x27','jump','excluded','variants','Stage\x20\x27','path','end','map','success','.with.condition.next','has','UNUSED_EMBEDDED_SEGMENT','entries','\x20steps\x20(may\x20be\x20too\x20simple)','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','length','.with.condition.timeout','.exit_criteria','branches','activationKeys','launched','.steps[','segments.','endsWith','.milestone','7497980keifjS','ab_test','merge','keys','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','MISSING_STAGES','TOO_MANY_STAGES','add','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','target','.name','issues','INVALID_AB_TEST_PERCENTAGES','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.with.branches[','rule','.segment','goalIsInherited','CONVERGENCE_WITHOUT_MERGE','END_STEP_HAS_NEXT_OR_WITH','INVALID_JUMP_TARGET','document','MISSING_ACTIVATION_REF',').\x20Merge\x20is\x20unnecessary.','171RxeceV','.next','filter','exit_criteria','ACTIVATION_SCHEMA_ERROR','.with.variants','splice','journeys[','message','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','Journey\x20name\x20is\x20required','.entry_criteria','36807930EjHDEv','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','state','.with.branches','Criteria\x20references\x20undefined\x20segment\x20\x27','variant\x20\x27','error','excluded_','indices','1430496vNDnWI','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','stages[','.with.target','replace','JOURNEY_SCHEMA_ERROR','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MISSING_ACTIVATION_DEFINITION','journey\x20entry','INVALID_NEXT_REFERENCE','ref:','entry_criteria','.with','symbol','.with.variants[','journeys','name','\x27\x20of\x20\x27','.steps','size','.with.condition','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','\x27\x20(first\x20defined\x20at\x20steps[','versions','1082796gnXOxt','6IdRxnu','some','segments','SINGLE_INPUT_MERGE','activations','steps','\x27\x20has\x20no\x20exit_criteria\x20defined','\x20stages\x20but\x20maximum\x20is\x20','get','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','activation','startsWith','reduce','MISSING_NAME','includes','trim','BRANCH_DIRECTLY_TO_MERGE','MISSING_SEGMENT_REFERENCE','with','description'];a122_0x588e=function(){return _0x3f1c62;};return a122_0x588e();}function validateStagesForVersion(_0x27417f,_0x29e479,_0x3ab698,_0x3f56be,_0x4ceb66,_0xeec5a0,_0x4ccaae){const _0x3219db=a122_0x48a1;if(_0x27417f['length']===0x0){_0x4ceb66[_0x3219db(0xb5)]({'level':'error','path':_0x3f56be+_0x3219db(0x9c),'code':_0x3219db(0xde),'message':_0x3219db(0xfa),'location':getLocationFromPath(_0x3ab698[_0x3219db(0xee)],_0x3ab698['source'],['stages'])});return;}const _0x552a5b=new Set();for(const _0x5ce108 of _0x27417f){if(_0x5ce108['steps'])for(const _0x6317f7 of _0x5ce108['steps']){_0x6317f7[_0x3219db(0x116)]&&_0x552a5b['add'](_0x6317f7[_0x3219db(0x116)]);}}const _0x8bd810={..._0x3ab698,'stepNames':_0x552a5b},_0x2ece13=validateVersionStructure(_0x27417f,_0x8bd810);for(const _0x35a74e of _0x2ece13){const _0x29a869=_0x3f56be?{..._0x35a74e,'path':''+_0x3f56be+_0x35a74e['path']}:_0x35a74e;if(_0x29a869[_0x3219db(0xa0)]==='error')_0x4ceb66[_0x3219db(0xb5)](_0x29a869);else _0xeec5a0[_0x3219db(0xb5)](_0x29a869);}for(let _0x1d48f0=0x0;_0x1d48f0<_0x27417f['length'];_0x1d48f0++){const _0x35971e=validateStage(_0x27417f[_0x1d48f0],_0x1d48f0,_0x27417f[_0x3219db(0xcf)],_0x8bd810);for(const _0x87b479 of _0x35971e){const _0x2156fd=_0x3f56be?{..._0x87b479,'path':''+_0x3f56be+_0x87b479['path']}:_0x87b479;if(_0x2156fd[_0x3219db(0xa0)]===_0x3219db(0x103))_0x4ceb66[_0x3219db(0xb5)](_0x2156fd);else _0xeec5a0[_0x3219db(0xb5)](_0x2156fd);}}if(_0x29e479[_0x3219db(0x14c)]){const _0x352432=_0x4ccaae?.[_0x3219db(0xea)]?'goal':_0x3f56be+_0x3219db(0x14c),_0x356c48=validateCriteria(_0x29e479[_0x3219db(0x14c)],_0x352432,_0x8bd810);for(const _0x1db0b6 of _0x356c48){if(_0x1db0b6[_0x3219db(0xa0)]===_0x3219db(0x103))_0x4ceb66[_0x3219db(0xb5)](_0x1db0b6);else _0xeec5a0[_0x3219db(0xb5)](_0x1db0b6);}}}function extractVersionIndex(_0x429a9b){const _0x534688=_0x429a9b['match'](/^journeys\[(\d+)\]\./);return _0x534688?_0x534688[0x1]:undefined;}function deduplicateAcrossVersions(_0x910a30){const _0xa65df7=a122_0x48a1,_0x597c7e=new Map();for(let _0x20acd6=0x0;_0x20acd6<_0x910a30[_0xa65df7(0xcf)];_0x20acd6++){const _0x558453=_0x910a30[_0x20acd6]['code']+':'+_0x910a30[_0x20acd6][_0xa65df7(0xf9)],_0x5d1286=extractVersionIndex(_0x910a30[_0x20acd6][_0xa65df7(0xc5)]),_0x4ce525=_0x597c7e[_0xa65df7(0x127)](_0x558453);if(_0x4ce525){_0x4ce525[_0xa65df7(0x105)]['push'](_0x20acd6);if(_0x5d1286)_0x4ce525[_0xa65df7(0x11d)][_0xa65df7(0xe0)](_0x5d1286);}else _0x597c7e['set'](_0x558453,{'indices':[_0x20acd6],'versions':new Set(_0x5d1286?[_0x5d1286]:[])});}const _0x309754=new Set();for(const {indices:_0xd88edc,versions:_0x5d0036}of _0x597c7e['values']()){if(_0x5d0036[_0xa65df7(0x119)]<=0x1)continue;const _0x2144e2=_0x910a30[_0xd88edc[0x0]];_0x2144e2[_0xa65df7(0xc5)]=_0x2144e2['path'][_0xa65df7(0x10a)](/^journeys\[\d+\]\./,''),_0x2144e2[_0xa65df7(0xf9)]=_0x2144e2[_0xa65df7(0xf9)]+'\x20(across\x20'+_0x5d0036[_0xa65df7(0x119)]+_0xa65df7(0xa8);for(let _0x2b97d9=0x1;_0x2b97d9<_0xd88edc[_0xa65df7(0xcf)];_0x2b97d9++){_0x309754[_0xa65df7(0xe0)](_0xd88edc[_0x2b97d9]);}}const _0x4b931e=[..._0x309754]['sort']((_0x1b3ec1,_0x1d6955)=>_0x1d6955-_0x1b3ec1);for(const _0x7d03d7 of _0x4b931e){_0x910a30[_0xa65df7(0xf7)](_0x7d03d7,0x1);}}export function validateJourneyDef(_0x43d0ce,_0x3f30be={},_0x1d5953={}){const _0x5e9227=a122_0x48a1;if(_0x1d5953[_0x5e9227(0x136)])return runJourneySemanticChecks(_0x43d0ce,_0x3f30be);const _0x345aad=JourneyDefSchema['safeParse'](_0x43d0ce);if(_0x345aad[_0x5e9227(0xc8)])return runJourneySemanticChecks(_0x345aad['data'],_0x3f30be);return zodErrorsToJourneyValidationResult(_0x345aad['error'],_0x3f30be);}function zodErrorsToJourneyValidationResult(_0x1dab48,_0x2bf836){const _0x5dc56f=a122_0x48a1,_0x376742=flattenZodIssues(_0x1dab48[_0x5dc56f(0xe4)]),_0x1f4bb1=_0x376742[_0x5dc56f(0xc7)](_0x4afda5=>{const _0x20af9=_0x5dc56f,_0x55e64e=formatZodPath(_0x4afda5[_0x20af9(0xc5)]),_0x22efef=mapJourneyZodIssueToCode(_0x4afda5,_0x55e64e),_0x33de8c=getLocationFromPath(_0x2bf836[_0x20af9(0xee)],_0x2bf836[_0x20af9(0xb0)],_0x4afda5['path']['map'](_0xdd1033=>typeof _0xdd1033===_0x20af9(0x113)?String(_0xdd1033):_0xdd1033));return{'level':_0x20af9(0x103),'path':_0x55e64e,'code':_0x22efef,'message':_0x4afda5[_0x20af9(0xf9)],..._0x33de8c&&{'location':_0x33de8c}};});return{'valid':![],'errors':_0x1f4bb1,'warnings':[]};}function mapJourneyZodIssueToCode(_0x24eafe,_0xf212ba){const _0xb5d09f=a122_0x48a1;if(_0xf212ba==='name')return _0xb5d09f(0x12c);if(_0xf212ba[_0xb5d09f(0xd7)](_0xb5d09f(0xa1))&&_0xf212ba['includes']('steps'))return _0xb5d09f(0x10b);if(_0xf212ba==='stages'||_0xf212ba[_0xb5d09f(0xd7)](_0xb5d09f(0xae)))return'MISSING_STAGES';if(_0xf212ba===''&&_0x24eafe['message'][_0xb5d09f(0x12d)](_0xb5d09f(0x13c)))return _0xb5d09f(0xde);if(_0xf212ba[_0xb5d09f(0x12d)]('activation'))return _0xb5d09f(0xf5);return _0xb5d09f(0x10b);}function runJourneySemanticChecks(_0xa84cef,_0x4d0226){const _0xc61f97=a122_0x48a1,_0x5728ef=[],_0x15ecc8=[];(!_0xa84cef['name']||_0xa84cef['name'][_0xc61f97(0x12e)]()==='')&&_0x5728ef[_0xc61f97(0xb5)]({'level':_0xc61f97(0x103),'path':_0xc61f97(0x116),'code':_0xc61f97(0x12c),'message':_0xc61f97(0xfb),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],['name'])});const _0xe2abf3=new Set();if(_0xa84cef['segments'])for(const _0x4a75e6 of Object[_0xc61f97(0xdc)](_0xa84cef['segments'])){_0xe2abf3[_0xc61f97(0xe0)](_0x4a75e6);}const _0x1ab8b7=new Set();if(_0xa84cef[_0xc61f97(0x123)])for(const _0x5e9c85 of Object['keys'](_0xa84cef[_0xc61f97(0x123)])){_0x1ab8b7[_0xc61f97(0xe0)](_0x5e9c85);}const _0x5d31eb=new Set(),_0x574b67={..._0x4d0226,'embeddedSegments':_0xe2abf3,'referencedSegments':_0x5d31eb,'activationKeys':_0x1ab8b7[_0xc61f97(0x119)]>0x0?_0x1ab8b7:undefined};if(_0xa84cef[_0xc61f97(0x121)])for(const [_0x10c667,_0x30871c]of Object[_0xc61f97(0xcc)](_0xa84cef[_0xc61f97(0x121)])){const _0x210a6d=validateEmbeddedSegment(_0x30871c,_0xc61f97(0xd6)+_0x10c667,_0x574b67);for(const _0x18e7e2 of _0x210a6d){if(_0x18e7e2[_0xc61f97(0xa0)]===_0xc61f97(0x103))_0x5728ef[_0xc61f97(0xb5)](_0x18e7e2);else _0x15ecc8['push'](_0x18e7e2);}}const _0xc0da3a=!!_0xa84cef[_0xc61f97(0x14c)],_0x4ea2f6=_0xa84cef[_0xc61f97(0x115)]?.[_0xc61f97(0x98)](_0x95e93b=>!!_0x95e93b[_0xc61f97(0x14c)])??![];!_0xc0da3a&&!_0x4ea2f6&&_0x15ecc8[_0xc61f97(0xb5)]({'level':_0xc61f97(0x142),'path':_0xc61f97(0x14c),'code':'MISSING_GOAL','message':_0xc61f97(0xb3),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],[_0xc61f97(0x14c)])});const _0x347952=_0xa84cef[_0xc61f97(0x115)]??_0xa84cef[_0xc61f97(0x11d)];if(_0x347952&&_0x347952[_0xc61f97(0xf3)](_0x18dbae=>_0x18dbae[_0xc61f97(0x13b)]===!![])[_0xc61f97(0xcf)]>0x1){const _0x44cff5=_0xa84cef[_0xc61f97(0x115)]?_0xc61f97(0x115):_0xc61f97(0x11d);_0x5728ef['push']({'level':_0xc61f97(0x103),'path':_0x44cff5,'code':'DUPLICATE_LATEST','message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x44cff5===_0xc61f97(0x115)?_0xc61f97(0x10e):_0xc61f97(0xa9))+_0xc61f97(0xb6),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],[_0x44cff5])});}if(_0xa84cef[_0xc61f97(0x115)]&&_0xa84cef[_0xc61f97(0x115)][_0xc61f97(0xcf)]>0x0)for(let _0x2ef25b=0x0;_0x2ef25b<_0xa84cef['journeys'][_0xc61f97(0xcf)];_0x2ef25b++){const _0x1a4a56=_0xa84cef[_0xc61f97(0x115)][_0x2ef25b];if(_0xa84cef[_0xc61f97(0x115)][_0xc61f97(0xcf)]>0x1&&_0x1a4a56['state']===_0xc61f97(0xd4))continue;const _0x42328e=_0x1a4a56['stages']||[],_0x2b8426=_0xc61f97(0xf8)+_0x2ef25b+'].',_0xb36b1f=!!_0x1a4a56[_0xc61f97(0x14c)],_0x420177=_0xb36b1f?{..._0xa84cef,'goal':_0x1a4a56['goal']}:_0xa84cef;validateStagesForVersion(_0x42328e,_0x420177,_0x574b67,_0x2b8426,_0x5728ef,_0x15ecc8,{'goalIsInherited':!_0xb36b1f});}else{if(_0xa84cef[_0xc61f97(0x11d)]&&_0xa84cef['versions'][_0xc61f97(0xcf)]>0x0)for(let _0x7a7e11=0x0;_0x7a7e11<_0xa84cef['versions'][_0xc61f97(0xcf)];_0x7a7e11++){const _0x1302ff=_0xa84cef[_0xc61f97(0x11d)][_0x7a7e11];if(_0xa84cef[_0xc61f97(0x11d)][_0xc61f97(0xcf)]>0x1&&_0x1302ff[_0xc61f97(0xff)]===_0xc61f97(0xd4))continue;const _0x4a420e=_0x1302ff['stages']||[],_0x57d4da=_0xc61f97(0x97)+_0x7a7e11+'].';validateStagesForVersion(_0x4a420e,_0xa84cef,_0x574b67,_0x57d4da,_0x5728ef,_0x15ecc8);}else{const _0x343e17=_0xa84cef[_0xc61f97(0x9c)]||[];validateStagesForVersion(_0x343e17,_0xa84cef,_0x574b67,'',_0x5728ef,_0x15ecc8);}}_0xa84cef[_0xc61f97(0x115)]&&_0xa84cef[_0xc61f97(0x115)][_0xc61f97(0xcf)]>0x1&&(deduplicateAcrossVersions(_0x5728ef),deduplicateAcrossVersions(_0x15ecc8));for(const _0x467805 of _0xe2abf3){!_0x5d31eb[_0xc61f97(0xca)](_0x467805)&&!_0x467805['startsWith'](_0xc61f97(0x104))&&_0x15ecc8['push']({'level':'warning','path':_0xc61f97(0xd6)+_0x467805,'code':_0xc61f97(0xcb),'message':_0xc61f97(0xaa)+_0x467805+_0xc61f97(0xe6),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],[_0xc61f97(0x121),_0x467805])});}return{'valid':_0x5728ef['length']===0x0,'errors':_0x5728ef,'warnings':_0x15ecc8};}
|