@treasuredata/tdx 2026.3.2 → 2026.3.3
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.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/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/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/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/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xc4b18f,_0x2e35e4){const _0x814b3f=a128_0x35c8,_0x4f1f32=_0xc4b18f();while(!![]){try{const _0x5bf613=-parseInt(_0x814b3f(0x147))/0x1+-parseInt(_0x814b3f(0x149))/0x2*(-parseInt(_0x814b3f(0x146))/0x3)+-parseInt(_0x814b3f(0x13a))/0x4+-parseInt(_0x814b3f(0x141))/0x5+parseInt(_0x814b3f(0x13b))/0x6+parseInt(_0x814b3f(0x13f))/0x7*(parseInt(_0x814b3f(0x14a))/0x8)+parseInt(_0x814b3f(0x145))/0x9*(parseInt(_0x814b3f(0x14b))/0xa);if(_0x5bf613===_0x2e35e4)break;else _0x4f1f32['push'](_0x4f1f32['shift']());}catch(_0x6b5a87){_0x4f1f32['push'](_0x4f1f32['shift']());}}}(a128_0x631c,0x3e042));import{readdirSync,statSync}from'fs';import a128_0xbbfb1 from'path';export function findYamlFiles(_0x32e8f2){const _0x2e5372=[];function _0x5d38de(_0x339fb0){const _0x578a57=a128_0x35c8,_0x225fb8=readdirSync(_0x339fb0,{'withFileTypes':!![]});for(const _0x492bf2 of _0x225fb8){const _0x2594a7=a128_0xbbfb1[_0x578a57(0x143)](_0x339fb0,_0x492bf2[_0x578a57(0x140)]);if(_0x492bf2['isDirectory']())_0x5d38de(_0x2594a7);else(_0x492bf2[_0x578a57(0x140)][_0x578a57(0x142)](_0x578a57(0x14c))||_0x492bf2['name'][_0x578a57(0x142)]('.yaml'))&&_0x2e5372['push'](_0x2594a7);}}return _0x5d38de(_0x32e8f2),_0x2e5372;}export function discoverYamlFiles(_0xe6df09){const _0x5f449b=a128_0x35c8,_0x5b623c=findYamlFiles(_0xe6df09);return _0x5b623c[_0x5f449b(0x13c)](_0x5781c6=>{const _0x2f8d3e=_0x5f449b,_0x18c707=a128_0xbbfb1[_0x2f8d3e(0x13d)](_0xe6df09,_0x5781c6),_0x5cd024=a128_0xbbfb1[_0x2f8d3e(0x14d)](_0x18c707);return{'absolutePath':_0x5781c6,'relativePath':_0x18c707,'folderPath':_0x5cd024==='.'?'':_0x5cd024};});}function a128_0x631c(){const _0x366712=['275087YIbiWi','toLowerCase','229774YdffCW','1992CLzkyU','43250SnMnnC','.yml','dirname','348796XHGFLU','2205948UfKfeW','map','relative','isFile','553YANZCF','name','1798870jblKfA','endsWith','join','extname','747Cynzrh','6KqZRMJ'];a128_0x631c=function(){return _0x366712;};return a128_0x631c();}function a128_0x35c8(_0x268b7f,_0x30b98b){_0x268b7f=_0x268b7f-0x13a;const _0x631ce4=a128_0x631c();let _0x35c85a=_0x631ce4[_0x268b7f];return _0x35c85a;}export function isYamlFile(_0x4b6122){const _0x16dbad=a128_0x35c8;try{const _0x47bb3e=statSync(_0x4b6122);if(!_0x47bb3e[_0x16dbad(0x13e)]())return![];const _0x4da699=a128_0xbbfb1[_0x16dbad(0x144)](_0x4b6122)[_0x16dbad(0x148)]();return _0x4da699==='.yml'||_0x4da699==='.yaml';}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1f9424,_0x228086){const _0x18119f=a129_0x363c,_0x47d18f=_0x1f9424();while(!![]){try{const _0x57efbc=-parseInt(_0x18119f(0x177))/0x1+parseInt(_0x18119f(0x16d))/0x2+parseInt(_0x18119f(0x1a2))/0x3+parseInt(_0x18119f(0x19c))/0x4*(parseInt(_0x18119f(0x189))/0x5)+parseInt(_0x18119f(0x181))/0x6+-parseInt(_0x18119f(0x17b))/0x7+parseInt(_0x18119f(0x187))/0x8;if(_0x57efbc===_0x228086)break;else _0x47d18f['push'](_0x47d18f['shift']());}catch(_0x9bee91){_0x47d18f['push'](_0x47d18f['shift']());}}}(a129_0x1a04,0x8f794));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';function a129_0x1a04(){const _0x5d2e38=['journeys','steps','join','condition','67968RMyWzl','index','conditions','stages','decision_point','toLowerCase','description','entries','set','version','with','behavior','goal','journeyBundleName','sort','trim','versions','activations','draft','values','latest','segments','null','exit_criteria','name','isArray','379330SQwpdZ','activation','object','rule','launched','merged','version_number','all_columns','milestone','bundle_id','536388bdxbtD','startsWith','keys','notification','4537232phVVEi','schedule','reentry','string','segment','journey','3127848WzrtgR','entry_criteria','stringify','wait','branches','activation_template_id','1782568bOdBAw','length','370810cfpcqU','connector_config','connection','replace','exclude','type','push','nameMapping','get','slice','journeyStages','item','columns','match','bundle_name','map','yaml','some','endsWith','44WnjAkp','.yaml'];a129_0x1a04=function(){return _0x5d2e38;};return a129_0x1a04();}export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x3c19fe){const _0x37927e=a129_0x363c;return _0x3c19fe['toLowerCase']()[_0x37927e(0x18c)](/\s+/g,'_')[_0x37927e(0x18c)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')[_0x37927e(0x18c)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x1ea0b6){const _0x593d71=a129_0x363c,_0x1ed43a=_0x1ea0b6[_0x593d71(0x196)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x1ed43a){const _0x52924c=_0x1ed43a[0x1][_0x593d71(0x1a7)](),_0x2df3b7=_0x1ed43a[0x2],_0x5a9124=_0x2df3b7[_0x593d71(0x18c)](/-/g,'')['slice'](0x0,0x4)[_0x593d71(0x1a7)]();return _0x52924c+'_'+_0x5a9124;}const _0x589be4=_0x1ea0b6[_0x593d71(0x196)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x589be4){const _0x32eef3=_0x589be4[0x1],_0x334558=_0x589be4[0x2]['toLowerCase'](),_0x3dc7f7=_0x32eef3[_0x593d71(0x18c)](/-/g,'')[_0x593d71(0x192)](0x0,0x4)[_0x593d71(0x1a7)]();return _0x334558+'_'+_0x3dc7f7;}return undefined;}function stableStringify(_0x195dad){const _0x423648=a129_0x363c;if(Array[_0x423648(0x16c)](_0x195dad))return'['+_0x195dad[_0x423648(0x198)](_0x48fe25=>stableStringify(_0x48fe25))[_0x423648(0x1a0)](',')+']';if(_0x195dad&&typeof _0x195dad===_0x423648(0x16f)){const _0x13ba53=_0x195dad,_0x33067b=Object[_0x423648(0x179)](_0x13ba53)[_0x423648(0x161)](),_0x3db404=_0x33067b[_0x423648(0x198)](_0x251ee3=>'\x22'+_0x251ee3+'\x22:'+stableStringify(_0x13ba53[_0x251ee3]));return'{'+_0x3db404[_0x423648(0x1a0)](',')+'}';}const _0x3773b6=JSON[_0x423648(0x183)](_0x195dad);return _0x3773b6===undefined?_0x423648(0x169):_0x3773b6;}export function consolidateActivationsByContent(_0x1b0ab4){const _0x28b3c1=a129_0x363c,_0x33f55f={},_0x197f2b=new Map(),_0x1bfcd9=new Map();for(const _0x195279 of _0x1b0ab4){if(!_0x195279)continue;for(const [_0x458b61,_0x299d7b]of Object[_0x28b3c1(0x1a9)](_0x195279)){const _0x19c393={'connection':_0x299d7b[_0x28b3c1(0x18b)],..._0x299d7b[_0x28b3c1(0x174)]!==undefined&&{'all_columns':_0x299d7b['all_columns']},..._0x299d7b[_0x28b3c1(0x195)]!==undefined&&{'columns':_0x299d7b[_0x28b3c1(0x195)]},..._0x299d7b[_0x28b3c1(0x15e)]!==undefined&&{'behavior':_0x299d7b[_0x28b3c1(0x15e)]},..._0x299d7b['schedule']!==undefined&&{'schedule':_0x299d7b[_0x28b3c1(0x17c)]},..._0x299d7b[_0x28b3c1(0x17a)]!==undefined&&{'notification':_0x299d7b[_0x28b3c1(0x17a)]},..._0x299d7b[_0x28b3c1(0x18a)]!==undefined&&{'connector_config':_0x299d7b[_0x28b3c1(0x18a)]},..._0x299d7b[_0x28b3c1(0x186)]!==undefined&&{'activation_template_id':_0x299d7b['activation_template_id']}},_0x54eec0=stableStringify(_0x19c393),_0x324642=_0x1bfcd9[_0x28b3c1(0x191)](_0x54eec0);_0x324642?_0x197f2b[_0x28b3c1(0x1aa)](_0x458b61,_0x324642):(_0x33f55f[_0x458b61]=_0x299d7b,_0x197f2b[_0x28b3c1(0x1aa)](_0x458b61,_0x458b61),_0x1bfcd9[_0x28b3c1(0x1aa)](_0x54eec0,_0x458b61));}}return{'merged':_0x33f55f,'nameMapping':_0x197f2b};}export function updateActivationReferences(_0x44e032,_0x505471){const _0xfe4ca6=a129_0x363c;if(!_0x44e032)return;for(const _0x1fd23e of _0x44e032){if(!_0x1fd23e[_0xfe4ca6(0x19f)])continue;for(const _0x4edee of _0x1fd23e['steps']){if(_0x4edee[_0xfe4ca6(0x18e)]==='activation'&&_0x4edee[_0xfe4ca6(0x1ac)]?.[_0xfe4ca6(0x16e)]){const _0x28c3a0=_0x505471[_0xfe4ca6(0x191)](_0x4edee[_0xfe4ca6(0x1ac)][_0xfe4ca6(0x16e)]);_0x28c3a0&&_0x28c3a0!==_0x4edee[_0xfe4ca6(0x1ac)][_0xfe4ca6(0x16e)]&&(_0x4edee[_0xfe4ca6(0x1ac)]['activation']=_0x28c3a0);}}}}export function consolidateSegmentsByContent(_0x379d92,_0x3114d7){const _0x20d1bc=a129_0x363c,_0x216b86={},_0x2f802f=new Map(),_0x2e48b2=new Map();for(const _0x47c69b of _0x379d92){if(!_0x47c69b)continue;for(const [_0xcc2e06,_0x4e995c]of Object[_0x20d1bc(0x1a9)](_0x47c69b)){if(!_0x4e995c['rule']){_0x216b86[_0xcc2e06]=_0x4e995c,_0x2f802f[_0x20d1bc(0x1aa)](_0xcc2e06,_0xcc2e06);continue;}const _0x4456c8=_0x4e995c['description']&&_0x4e995c['description'][_0x20d1bc(0x162)]()?_0x4e995c['description']:undefined,_0x5e361f=JSON[_0x20d1bc(0x183)]({'description':_0x4456c8,'rule':deepSortObject(_0x4e995c['rule'])}),_0x449e40=_0x2e48b2[_0x20d1bc(0x191)](_0x5e361f);if(_0x449e40){const _0x524ebd={..._0x4e995c[_0x20d1bc(0x1a8)]!==undefined&&{'description':_0x4e995c[_0x20d1bc(0x1a8)]},'rule':_0x4e995c[_0x20d1bc(0x170)]?deepSortObject(_0x4e995c[_0x20d1bc(0x170)]):_0x4e995c[_0x20d1bc(0x170)]};if(_0xcc2e06<_0x449e40){_0x216b86[_0xcc2e06]=_0x524ebd,delete _0x216b86[_0x449e40];for(const [_0x4eb8c8,_0x5819b1]of _0x2f802f[_0x20d1bc(0x1a9)]()){_0x5819b1===_0x449e40&&_0x2f802f[_0x20d1bc(0x1aa)](_0x4eb8c8,_0xcc2e06);}_0x2f802f[_0x20d1bc(0x1aa)](_0xcc2e06,_0xcc2e06),_0x2e48b2[_0x20d1bc(0x1aa)](_0x5e361f,_0xcc2e06);}else _0x216b86[_0x449e40]=_0x524ebd,_0x2f802f[_0x20d1bc(0x1aa)](_0xcc2e06,_0x449e40);}else{let _0x37e237=_0xcc2e06;if(_0x3114d7){const _0x2218c4=_0x3114d7[_0x20d1bc(0x191)](_0x5e361f);_0x2218c4&&_0x2218c4[_0x20d1bc(0x188)]>0x0&&(_0x37e237=_0x2218c4[_0x20d1bc(0x192)]()[_0x20d1bc(0x161)]()[0x0]);}const _0x2e07a2={..._0x4e995c['description']!==undefined&&{'description':_0x4e995c[_0x20d1bc(0x1a8)]},'rule':_0x4e995c[_0x20d1bc(0x170)]?deepSortObject(_0x4e995c[_0x20d1bc(0x170)]):_0x4e995c[_0x20d1bc(0x170)]};_0x216b86[_0x37e237]=_0x2e07a2,_0x2f802f[_0x20d1bc(0x1aa)](_0xcc2e06,_0x37e237),_0x2e48b2[_0x20d1bc(0x1aa)](_0x5e361f,_0x37e237);}}}return{'merged':_0x216b86,'nameMapping':_0x2f802f};}export function updateSegmentReferences(_0x16090a,_0x479c54){const _0x4962b9=a129_0x363c;if(!_0x16090a)return;for(const _0x53cc8f of _0x16090a){if(_0x53cc8f[_0x4962b9(0x182)]?.[_0x4962b9(0x17f)]){const _0x4cb8bf=_0x479c54[_0x4962b9(0x191)](_0x53cc8f[_0x4962b9(0x182)][_0x4962b9(0x17f)]);_0x4cb8bf&&(_0x53cc8f[_0x4962b9(0x182)][_0x4962b9(0x17f)]=_0x4cb8bf);}if(_0x53cc8f[_0x4962b9(0x16a)])for(const _0x207a03 of _0x53cc8f[_0x4962b9(0x16a)]){if(_0x207a03[_0x4962b9(0x17f)]){const _0x1595f9=_0x479c54[_0x4962b9(0x191)](_0x207a03[_0x4962b9(0x17f)]);_0x1595f9&&(_0x207a03['segment']=_0x1595f9);}}if(_0x53cc8f['milestone']?.[_0x4962b9(0x17f)]){const _0x4e80b7=_0x479c54['get'](_0x53cc8f[_0x4962b9(0x175)][_0x4962b9(0x17f)]);_0x4e80b7&&(_0x53cc8f[_0x4962b9(0x175)][_0x4962b9(0x17f)]=_0x4e80b7);}if(_0x53cc8f[_0x4962b9(0x19f)])for(const _0x56127e of _0x53cc8f['steps']){if(_0x56127e[_0x4962b9(0x18e)]===_0x4962b9(0x1a6)&&_0x56127e[_0x4962b9(0x1ac)]?.[_0x4962b9(0x185)])for(const _0x50eec7 of _0x56127e[_0x4962b9(0x1ac)][_0x4962b9(0x185)]){if(_0x50eec7[_0x4962b9(0x17f)]){const _0x32c1e7=_0x479c54[_0x4962b9(0x191)](_0x50eec7[_0x4962b9(0x17f)]);_0x32c1e7&&(_0x50eec7['segment']=_0x32c1e7);}}if(_0x56127e[_0x4962b9(0x18e)]===_0x4962b9(0x184)&&_0x56127e['with']?.[_0x4962b9(0x1a1)]?.[_0x4962b9(0x17f)]){const _0x3b4f59=_0x479c54[_0x4962b9(0x191)](_0x56127e[_0x4962b9(0x1ac)]['condition'][_0x4962b9(0x17f)]);_0x3b4f59&&(_0x56127e[_0x4962b9(0x1ac)]['condition']['segment']=_0x3b4f59);}}}}export function updateSegmentRefsInSegments(_0x221e16,_0x408e79){const _0x22740b=a129_0x363c;for(const _0x17bb56 of Object[_0x22740b(0x166)](_0x221e16)){_0x17bb56['rule']&&updateSegmentRefsInRule(_0x17bb56[_0x22740b(0x170)],_0x408e79);}}function updateSegmentRefsInRule(_0x1b7089,_0xe8422c){const _0x49b35c=a129_0x363c;if(_0x1b7089===null||typeof _0x1b7089!==_0x49b35c(0x16f))return;if(Array[_0x49b35c(0x16c)](_0x1b7089)){for(const _0x20fa79 of _0x1b7089){updateSegmentRefsInRule(_0x20fa79,_0xe8422c);}return;}const _0x214bc2=_0x1b7089;if((_0x214bc2[_0x49b35c(0x18e)]==='include'||_0x214bc2[_0x49b35c(0x18e)]===_0x49b35c(0x18d))&&typeof _0x214bc2[_0x49b35c(0x17f)]===_0x49b35c(0x17e)){const _0x51be5f=_0xe8422c[_0x49b35c(0x191)](_0x214bc2[_0x49b35c(0x17f)]);_0x51be5f&&(_0x214bc2[_0x49b35c(0x17f)]=_0x51be5f);}if(_0x214bc2[_0x49b35c(0x1a4)]&&Array['isArray'](_0x214bc2['conditions']))for(const _0x3688b4 of _0x214bc2[_0x49b35c(0x1a4)]){updateSegmentRefsInRule(_0x3688b4,_0xe8422c);}}export function buildJourneysArray(_0x151c0e,_0x1c5d63){const _0x2e33c3=a129_0x363c;return _0x151c0e[_0x2e33c3(0x198)](_0x3a6bd5=>{const _0x32a768=_0x2e33c3,_0x109a38=_0x1c5d63?_0x3a6bd5['item']['id']===_0x1c5d63:_0x151c0e[_0x32a768(0x188)]===0x1,_0x3856a8=_0x3a6bd5[_0x32a768(0x199)][_0x32a768(0x19e)]?.[0x0],_0x5eeed2=_0x3856a8?.[_0x32a768(0x15f)]||_0x3a6bd5[_0x32a768(0x199)][_0x32a768(0x15f)],_0x2937bf={'version':_0x3856a8?.[_0x32a768(0x1ab)]||_0x3a6bd5[_0x32a768(0x199)]['version']||_0x3a6bd5[_0x32a768(0x194)][_0x32a768(0x16b)],'state':_0x3a6bd5[_0x32a768(0x194)]['state']===_0x32a768(0x171)?_0x32a768(0x171):_0x32a768(0x165),'stages':_0x3856a8?.[_0x32a768(0x1a5)]||_0x3a6bd5[_0x32a768(0x199)][_0x32a768(0x1a5)]||[],'id':_0x3856a8?.['id']||_0x3a6bd5['yaml']['id'],'version_number':_0x3856a8?.[_0x32a768(0x173)]||_0x3a6bd5['yaml'][_0x32a768(0x173)]};return _0x5eeed2&&(_0x2937bf['goal']=_0x5eeed2),_0x109a38&&(_0x2937bf[_0x32a768(0x167)]=!![]),_0x2937bf;});}export function buildMergedJourneyDef(_0x2589a5,_0x2e2e59,_0x5b0d8f){const _0x5d15db=a129_0x363c,_0x12c5d7=_0x2589a5[0x0][_0x5d15db(0x199)],_0x7999e0=buildJourneysArray(_0x2589a5,_0x5b0d8f),{merged:_0x868c2d,nameMapping:_0x3890ba}=consolidateSegmentsByContent(_0x2589a5[_0x5d15db(0x198)](_0x543fbf=>_0x543fbf[_0x5d15db(0x199)][_0x5d15db(0x168)]),_0x2e2e59);updateSegmentRefsInSegments(_0x868c2d,_0x3890ba);const _0x5e2911=Array['from'](_0x3890ba[_0x5d15db(0x1a9)]())[_0x5d15db(0x19a)](([_0x515dd5,_0x2cffd7])=>_0x515dd5!==_0x2cffd7&&_0x515dd5[_0x5d15db(0x178)](_0x5d15db(0x182)));let _0x33907a=_0x868c2d,_0x558dd5=new Map();if(_0x5e2911){const _0x114a1c=consolidateSegmentsByContent([_0x868c2d],_0x2e2e59);_0x33907a=_0x114a1c[_0x5d15db(0x172)],_0x558dd5=_0x114a1c[_0x5d15db(0x190)];}const _0x596364=new Map(_0x3890ba);for(const [_0xf142,_0x1a27da]of _0x558dd5[_0x5d15db(0x1a9)]()){_0x596364[_0x5d15db(0x1aa)](_0xf142,_0x1a27da);}for(const [_0x37bbc5,_0x30427a]of _0x596364[_0x5d15db(0x1a9)]()){let _0x2e6dd7=_0x30427a,_0x4c9230=0x0;while(_0x596364['has'](_0x2e6dd7)&&_0x596364[_0x5d15db(0x191)](_0x2e6dd7)!==_0x2e6dd7&&_0x4c9230<MAX_MAPPING_CHAIN_DEPTH){_0x2e6dd7=_0x596364[_0x5d15db(0x191)](_0x2e6dd7),_0x4c9230++;}_0x2e6dd7!==_0x30427a&&_0x596364[_0x5d15db(0x1aa)](_0x37bbc5,_0x2e6dd7);}for(const _0x49eee6 of _0x7999e0){updateSegmentReferences(_0x49eee6['stages'],_0x596364);}const {merged:_0x13cca0,nameMapping:_0x34c15}=consolidateActivationsByContent(_0x2589a5['map'](_0x295ac7=>_0x295ac7[_0x5d15db(0x199)][_0x5d15db(0x164)]));for(const _0x4214db of _0x7999e0){updateActivationReferences(_0x4214db[_0x5d15db(0x1a5)],_0x34c15);}let _0xcbc36e=_0x12c5d7[_0x5d15db(0x15f)];if(_0xcbc36e?.[_0x5d15db(0x17f)]){const _0x2fbd88=_0x596364[_0x5d15db(0x191)](_0xcbc36e[_0x5d15db(0x17f)]);_0x2fbd88&&(_0xcbc36e={..._0xcbc36e,'segment':_0x2fbd88});}for(const _0x772d5a of _0x7999e0){if(_0x772d5a['goal']?.['segment']){const _0x27281c=_0x596364[_0x5d15db(0x191)](_0x772d5a['goal'][_0x5d15db(0x17f)]);_0x27281c&&(_0x772d5a[_0x5d15db(0x15f)]={..._0x772d5a[_0x5d15db(0x15f)],'segment':_0x27281c});}}return _0x7999e0[_0x5d15db(0x19a)](_0x1d9133=>_0x1d9133['goal'])&&(_0xcbc36e=undefined),{'type':_0x5d15db(0x180),'name':_0x12c5d7['name'],'description':_0x12c5d7['description'],'goal':_0xcbc36e,'reentry':_0x12c5d7[_0x5d15db(0x17d)],'segments':Object[_0x5d15db(0x179)](_0x33907a)[_0x5d15db(0x188)]>0x0?_0x33907a:undefined,'activations':Object[_0x5d15db(0x179)](_0x13cca0)[_0x5d15db(0x188)]>0x0?_0x13cca0:undefined,'journeys':_0x7999e0,'bundle_id':_0x12c5d7[_0x5d15db(0x176)],'bundle_name':_0x12c5d7[_0x5d15db(0x197)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x492258,_0x145432,_0x3f4fa9,_0x157cee){const _0x40f2cb=a129_0x363c,_0x12e191=_0x492258+':'+_0x145432,_0x307500=_0x3f4fa9['get'](_0x12e191);if(_0x307500)return _0x307500;const _0x2857cd=await _0x157cee(_0x492258),_0x5ad66c=_0x2857cd['attributes'][_0x40f2cb(0x160)]||_0x2857cd['attributes']['name'],_0x3e580d=_0x2857cd['attributes'][_0x40f2cb(0x193)]['find'](_0x8d7cb9=>String(_0x8d7cb9['id'])===String(_0x145432)),_0x31a416=_0x3e580d?.[_0x40f2cb(0x16b)]||_0x145432,_0x3647de={'journeyName':_0x5ad66c,'stageName':_0x31a416};return _0x3f4fa9['set'](_0x12e191,_0x3647de),_0x3647de;}export function formatApiJourneyName(_0x3adfbc,_0xaff392){return _0xaff392+'\x20('+_0x3adfbc+')';}export function isLocalJourneyRef(_0x265f4c){const _0xf1cfb2=a129_0x363c;return _0x265f4c[_0xf1cfb2(0x19b)]('.yml')||_0x265f4c[_0xf1cfb2(0x19b)](_0xf1cfb2(0x19d));}export function buildLocalRuleToNameMapping(_0x3b843a){const _0x1eacba=a129_0x363c,_0x15d4b0=new Map();if(!_0x3b843a)return _0x15d4b0;for(const [_0x1651ab,_0x17c23c]of Object[_0x1eacba(0x1a9)](_0x3b843a)){if(_0x17c23c[_0x1eacba(0x170)]){const _0x1f04d0=serializeRule(_0x17c23c['rule']),_0xcd74eb=_0x15d4b0[_0x1eacba(0x191)](_0x1f04d0)||[];_0xcd74eb[_0x1eacba(0x18f)](_0x1651ab),_0x15d4b0[_0x1eacba(0x1aa)](_0x1f04d0,_0xcd74eb);}}return _0x15d4b0;}export function buildLocalRuleToNameMappingFromJourney(_0x4c8ac3){const _0x475f14=a129_0x363c,_0x446bc2=_0x4c8ac3[_0x475f14(0x168)];if(!_0x446bc2)return new Map();const _0x1bb5a6=collectSegmentUsageCounts(_0x4c8ac3),_0x642c9c=new Map();let _0x55a982=0x0;for(const [_0x4e5ce2,_0x5ce944]of Object[_0x475f14(0x1a9)](_0x446bc2)){if(!_0x5ce944[_0x475f14(0x170)]){_0x55a982++;continue;}const _0x183744=serializeRule(_0x5ce944[_0x475f14(0x170)]),_0x2db083=_0x642c9c[_0x475f14(0x191)](_0x183744)||[];_0x2db083[_0x475f14(0x18f)]({'name':_0x4e5ce2,'index':_0x55a982}),_0x642c9c[_0x475f14(0x1aa)](_0x183744,_0x2db083),_0x55a982++;}const _0x16663c=new Map();for(const [_0x2f4e3f,_0x24ff07]of _0x642c9c){const _0x1e9f15=_0x24ff07[_0x475f14(0x192)]()['sort']((_0x2f7cc3,_0x2f561e)=>{const _0x1d371e=_0x475f14,_0x14e6da=_0x1bb5a6[_0x1d371e(0x191)](_0x2f7cc3[_0x1d371e(0x16b)])||0x0,_0x48c684=_0x1bb5a6[_0x1d371e(0x191)](_0x2f561e[_0x1d371e(0x16b)])||0x0;if(_0x14e6da!==_0x48c684)return _0x48c684-_0x14e6da;return _0x2f7cc3[_0x1d371e(0x1a3)]-_0x2f561e[_0x1d371e(0x1a3)];})['map'](_0x37a12a=>_0x37a12a[_0x475f14(0x16b)]);_0x16663c[_0x475f14(0x1aa)](_0x2f4e3f,_0x1e9f15);}return _0x16663c;}function a129_0x363c(_0x59ceec,_0x539376){_0x59ceec=_0x59ceec-0x15e;const _0x1a04cc=a129_0x1a04();let _0x363c0d=_0x1a04cc[_0x59ceec];return _0x363c0d;}export function collectSegmentUsageCounts(_0x47b1d5){const _0x1ad69d=a129_0x363c,_0x3698f6=new Map(),_0x982bfe=_0x2521d0=>{const _0x16a4c4=a129_0x363c;if(!_0x2521d0)return;_0x3698f6['set'](_0x2521d0,(_0x3698f6[_0x16a4c4(0x191)](_0x2521d0)||0x0)+0x1);},_0x5369ec=_0x3e36b1=>{const _0x14a3bc=a129_0x363c;for(const _0x5d963b of _0x3e36b1){_0x982bfe(_0x5d963b[_0x14a3bc(0x182)]?.[_0x14a3bc(0x17f)]);if(_0x5d963b['exit_criteria'])for(const _0x1162c2 of _0x5d963b[_0x14a3bc(0x16a)]){_0x982bfe(_0x1162c2[_0x14a3bc(0x17f)]);}_0x982bfe(_0x5d963b[_0x14a3bc(0x175)]?.[_0x14a3bc(0x17f)]);if(_0x5d963b['steps'])for(const _0x1fbf76 of _0x5d963b[_0x14a3bc(0x19f)]){if(_0x1fbf76[_0x14a3bc(0x18e)]===_0x14a3bc(0x1a6))for(const _0x2e15f8 of _0x1fbf76[_0x14a3bc(0x1ac)]['branches']){_0x982bfe(_0x2e15f8['segment']);}else _0x1fbf76['type']===_0x14a3bc(0x184)&&_0x982bfe(_0x1fbf76[_0x14a3bc(0x1ac)][_0x14a3bc(0x1a1)]?.['segment']);}}};_0x982bfe(_0x47b1d5[_0x1ad69d(0x15f)]?.[_0x1ad69d(0x17f)]);if(_0x47b1d5[_0x1ad69d(0x19e)])for(const _0x17c9c2 of _0x47b1d5[_0x1ad69d(0x19e)]){_0x982bfe(_0x17c9c2[_0x1ad69d(0x15f)]?.[_0x1ad69d(0x17f)]),_0x5369ec(_0x17c9c2[_0x1ad69d(0x1a5)]);}_0x47b1d5[_0x1ad69d(0x1a5)]&&_0x5369ec(_0x47b1d5[_0x1ad69d(0x1a5)]);if(_0x47b1d5['versions'])for(const _0x37309f of _0x47b1d5[_0x1ad69d(0x163)]){_0x5369ec(_0x37309f[_0x1ad69d(0x1a5)]);}return _0x3698f6;}
|
|
1
|
+
(function(_0x5041ed,_0x4e87a0){const _0x288e69=a129_0x1da9,_0x3dfd82=_0x5041ed();while(!![]){try{const _0x3baec2=parseInt(_0x288e69(0x10b))/0x1+-parseInt(_0x288e69(0xe6))/0x2+parseInt(_0x288e69(0xfa))/0x3*(-parseInt(_0x288e69(0xe4))/0x4)+parseInt(_0x288e69(0x103))/0x5+-parseInt(_0x288e69(0xd4))/0x6*(parseInt(_0x288e69(0x10a))/0x7)+parseInt(_0x288e69(0xdc))/0x8+-parseInt(_0x288e69(0x105))/0x9;if(_0x3baec2===_0x4e87a0)break;else _0x3dfd82['push'](_0x3dfd82['shift']());}catch(_0x2e547b){_0x3dfd82['push'](_0x3dfd82['shift']());}}}(a129_0x8272,0x9db7c));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0xd3b3c){const _0x11a94d=a129_0x1da9;return _0xd3b3c['toLowerCase']()[_0x11a94d(0x113)](/\s+/g,'_')[_0x11a94d(0x113)](/[^a-z0-9_]/g,'')[_0x11a94d(0x113)](/_+/g,'_')[_0x11a94d(0x113)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x8fc808){const _0x2f2686=a129_0x1da9,_0x80ba21=_0x8fc808[_0x2f2686(0xf8)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x80ba21){const _0x4c2a83=_0x80ba21[0x1][_0x2f2686(0xeb)](),_0x28da4a=_0x80ba21[0x2],_0x785316=_0x28da4a[_0x2f2686(0x113)](/-/g,'')[_0x2f2686(0xd7)](0x0,0x4)[_0x2f2686(0xeb)]();return _0x4c2a83+'_'+_0x785316;}const _0x3c9dba=_0x8fc808[_0x2f2686(0xf8)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x3c9dba){const _0x2d9a4b=_0x3c9dba[0x1],_0x657a68=_0x3c9dba[0x2][_0x2f2686(0xeb)](),_0xc48857=_0x2d9a4b[_0x2f2686(0x113)](/-/g,'')[_0x2f2686(0xd7)](0x0,0x4)[_0x2f2686(0xeb)]();return _0x657a68+'_'+_0xc48857;}return undefined;}function stableStringify(_0x316c42){const _0x11fb5b=a129_0x1da9;if(Array[_0x11fb5b(0xff)](_0x316c42))return'['+_0x316c42[_0x11fb5b(0x104)](_0x55e10c=>stableStringify(_0x55e10c))[_0x11fb5b(0xd6)](',')+']';if(_0x316c42&&typeof _0x316c42===_0x11fb5b(0xea)){const _0x4effbd=_0x316c42,_0x379609=Object[_0x11fb5b(0xed)](_0x4effbd)['sort'](),_0x1668c1=_0x379609['map'](_0x47e987=>'\x22'+_0x47e987+'\x22:'+stableStringify(_0x4effbd[_0x47e987]));return'{'+_0x1668c1['join'](',')+'}';}const _0x314ac0=JSON[_0x11fb5b(0xde)](_0x316c42);return _0x314ac0===undefined?'null':_0x314ac0;}function a129_0x1da9(_0xe76fba,_0x48490a){_0xe76fba=_0xe76fba-0xc8;const _0x827250=a129_0x8272();let _0x1da906=_0x827250[_0xe76fba];return _0x1da906;}export function consolidateActivationsByContent(_0x310aa3){const _0x576f16=a129_0x1da9,_0x4abfd6={},_0x5aab6f=new Map(),_0x9070b4=new Map();for(const _0x637278 of _0x310aa3){if(!_0x637278)continue;for(const [_0x2a9278,_0x568967]of Object[_0x576f16(0xf7)](_0x637278)){const _0xb39c98={'connection':_0x568967[_0x576f16(0xef)],..._0x568967[_0x576f16(0xdd)]!==undefined&&{'all_columns':_0x568967[_0x576f16(0xdd)]},..._0x568967[_0x576f16(0x102)]!==undefined&&{'columns':_0x568967[_0x576f16(0x102)]},..._0x568967[_0x576f16(0xf2)]!==undefined&&{'behavior':_0x568967['behavior']},..._0x568967[_0x576f16(0xf3)]!==undefined&&{'schedule':_0x568967[_0x576f16(0xf3)]},..._0x568967[_0x576f16(0xd0)]!==undefined&&{'notification':_0x568967[_0x576f16(0xd0)]},..._0x568967[_0x576f16(0xec)]!==undefined&&{'connector_config':_0x568967[_0x576f16(0xec)]},..._0x568967['activation_template_id']!==undefined&&{'activation_template_id':_0x568967['activation_template_id']}},_0x2fa0eb=stableStringify(_0xb39c98),_0x233c3b=_0x9070b4[_0x576f16(0xf6)](_0x2fa0eb);_0x233c3b?_0x5aab6f[_0x576f16(0x100)](_0x2a9278,_0x233c3b):(_0x4abfd6[_0x2a9278]=_0x568967,_0x5aab6f[_0x576f16(0x100)](_0x2a9278,_0x2a9278),_0x9070b4['set'](_0x2fa0eb,_0x2a9278));}}return{'merged':_0x4abfd6,'nameMapping':_0x5aab6f};}export function updateActivationReferences(_0x242976,_0xd9fa50){const _0x3eff93=a129_0x1da9;if(!_0x242976)return;for(const _0x15b8a6 of _0x242976){if(!_0x15b8a6[_0x3eff93(0x109)])continue;for(const _0x505b5c of _0x15b8a6[_0x3eff93(0x109)]){if(_0x505b5c[_0x3eff93(0x112)]==='activation'&&_0x505b5c['with']?.[_0x3eff93(0xe3)]){const _0x5685d4=_0xd9fa50['get'](_0x505b5c['with'][_0x3eff93(0xe3)]);_0x5685d4&&_0x5685d4!==_0x505b5c[_0x3eff93(0xdf)][_0x3eff93(0xe3)]&&(_0x505b5c[_0x3eff93(0xdf)][_0x3eff93(0xe3)]=_0x5685d4);}}}}export function consolidateSegmentsByContent(_0x12e96e,_0x1961f7){const _0x14856c=a129_0x1da9,_0x3d8960={},_0x5727fa=new Map(),_0x4f931e=new Map();for(const _0x349a8e of _0x12e96e){if(!_0x349a8e)continue;for(const [_0x1e1db7,_0x989978]of Object[_0x14856c(0xf7)](_0x349a8e)){if(!_0x989978[_0x14856c(0xf1)]){_0x3d8960[_0x1e1db7]=_0x989978,_0x5727fa['set'](_0x1e1db7,_0x1e1db7);continue;}const _0x37baf3=_0x989978[_0x14856c(0x10e)]&&_0x989978['description']['trim']()?_0x989978[_0x14856c(0x10e)]:undefined,_0x25b716=JSON[_0x14856c(0xde)]({'description':_0x37baf3,'rule':deepSortObject(_0x989978[_0x14856c(0xf1)])}),_0x1bfb8b=_0x4f931e[_0x14856c(0xf6)](_0x25b716);if(_0x1bfb8b){const _0x337f74={..._0x989978[_0x14856c(0x10e)]!==undefined&&{'description':_0x989978[_0x14856c(0x10e)]},'rule':_0x989978[_0x14856c(0xf1)]?deepSortObject(_0x989978[_0x14856c(0xf1)]):_0x989978[_0x14856c(0xf1)]};if(_0x1e1db7<_0x1bfb8b){_0x3d8960[_0x1e1db7]=_0x337f74,delete _0x3d8960[_0x1bfb8b];for(const [_0x51baac,_0x430aa6]of _0x5727fa[_0x14856c(0xf7)]()){_0x430aa6===_0x1bfb8b&&_0x5727fa[_0x14856c(0x100)](_0x51baac,_0x1e1db7);}_0x5727fa[_0x14856c(0x100)](_0x1e1db7,_0x1e1db7),_0x4f931e[_0x14856c(0x100)](_0x25b716,_0x1e1db7);}else _0x3d8960[_0x1bfb8b]=_0x337f74,_0x5727fa[_0x14856c(0x100)](_0x1e1db7,_0x1bfb8b);}else{let _0x59b5ba=_0x1e1db7;if(_0x1961f7){const _0xa33ce5=_0x1961f7[_0x14856c(0xf6)](_0x25b716);_0xa33ce5&&_0xa33ce5[_0x14856c(0xe7)]>0x0&&(_0x59b5ba=_0xa33ce5['slice']()[_0x14856c(0x10c)]()[0x0]);}const _0x299134={..._0x989978[_0x14856c(0x10e)]!==undefined&&{'description':_0x989978['description']},'rule':_0x989978[_0x14856c(0xf1)]?deepSortObject(_0x989978[_0x14856c(0xf1)]):_0x989978[_0x14856c(0xf1)]};_0x3d8960[_0x59b5ba]=_0x299134,_0x5727fa[_0x14856c(0x100)](_0x1e1db7,_0x59b5ba),_0x4f931e[_0x14856c(0x100)](_0x25b716,_0x59b5ba);}}}return{'merged':_0x3d8960,'nameMapping':_0x5727fa};}export function updateSegmentReferences(_0x39d02e,_0x2a1e9c){const _0x542470=a129_0x1da9;if(!_0x39d02e)return;for(const _0x1bbfe0 of _0x39d02e){if(_0x1bbfe0[_0x542470(0xe0)]?.[_0x542470(0xd2)]){const _0x58bd91=_0x2a1e9c['get'](_0x1bbfe0[_0x542470(0xe0)][_0x542470(0xd2)]);_0x58bd91&&(_0x1bbfe0['entry_criteria'][_0x542470(0xd2)]=_0x58bd91);}if(_0x1bbfe0[_0x542470(0xcd)])for(const _0x3ebb1b of _0x1bbfe0['exit_criteria']){if(_0x3ebb1b[_0x542470(0xd2)]){const _0x132635=_0x2a1e9c[_0x542470(0xf6)](_0x3ebb1b[_0x542470(0xd2)]);_0x132635&&(_0x3ebb1b[_0x542470(0xd2)]=_0x132635);}}if(_0x1bbfe0[_0x542470(0x10d)]?.[_0x542470(0xd2)]){const _0x4c19b1=_0x2a1e9c[_0x542470(0xf6)](_0x1bbfe0[_0x542470(0x10d)]['segment']);_0x4c19b1&&(_0x1bbfe0[_0x542470(0x10d)]['segment']=_0x4c19b1);}if(_0x1bbfe0[_0x542470(0x109)])for(const _0x125256 of _0x1bbfe0[_0x542470(0x109)]){if(_0x125256['type']===_0x542470(0xd5)&&_0x125256[_0x542470(0xdf)]?.[_0x542470(0xf9)])for(const _0x1c27fc of _0x125256[_0x542470(0xdf)][_0x542470(0xf9)]){if(_0x1c27fc[_0x542470(0xd2)]){const _0x3bd3d9=_0x2a1e9c['get'](_0x1c27fc[_0x542470(0xd2)]);_0x3bd3d9&&(_0x1c27fc[_0x542470(0xd2)]=_0x3bd3d9);}}if(_0x125256[_0x542470(0x112)]==='wait'&&_0x125256[_0x542470(0xdf)]?.[_0x542470(0x107)]?.[_0x542470(0xd2)]){const _0x197f44=_0x2a1e9c['get'](_0x125256[_0x542470(0xdf)][_0x542470(0x107)][_0x542470(0xd2)]);_0x197f44&&(_0x125256[_0x542470(0xdf)]['condition']['segment']=_0x197f44);}}}}export function updateSegmentRefsInSegments(_0x259a7c,_0x5dd897){const _0x7bf91c=a129_0x1da9;for(const _0x3904ed of Object[_0x7bf91c(0xce)](_0x259a7c)){_0x3904ed[_0x7bf91c(0xf1)]&&updateSegmentRefsInRule(_0x3904ed['rule'],_0x5dd897);}}function updateSegmentRefsInRule(_0x2f0d2c,_0x16b949){const _0x4d87df=a129_0x1da9;if(_0x2f0d2c===null||typeof _0x2f0d2c!==_0x4d87df(0xea))return;if(Array['isArray'](_0x2f0d2c)){for(const _0x334f18 of _0x2f0d2c){updateSegmentRefsInRule(_0x334f18,_0x16b949);}return;}const _0xfcbb86=_0x2f0d2c;if((_0xfcbb86[_0x4d87df(0x112)]==='include'||_0xfcbb86[_0x4d87df(0x112)]==='exclude')&&typeof _0xfcbb86[_0x4d87df(0xd2)]==='string'){const _0x3a00ce=_0x16b949[_0x4d87df(0xf6)](_0xfcbb86[_0x4d87df(0xd2)]);_0x3a00ce&&(_0xfcbb86[_0x4d87df(0xd2)]=_0x3a00ce);}if(_0xfcbb86['conditions']&&Array[_0x4d87df(0xff)](_0xfcbb86[_0x4d87df(0xee)]))for(const _0x352558 of _0xfcbb86[_0x4d87df(0xee)]){updateSegmentRefsInRule(_0x352558,_0x16b949);}}export function buildJourneysArray(_0x38278a,_0x404193){const _0x1f81f9=a129_0x1da9;return _0x38278a[_0x1f81f9(0x104)](_0x5c1f86=>{const _0x48a7b7=_0x1f81f9,_0x3a3cc4=_0x404193?_0x5c1f86['item']['id']===_0x404193:_0x38278a[_0x48a7b7(0xe7)]===0x1,_0x2a64ea=_0x5c1f86[_0x48a7b7(0x111)][_0x48a7b7(0xfc)]?.[0x0],_0x1321e0=_0x2a64ea?.[_0x48a7b7(0xe1)]||_0x5c1f86['yaml'][_0x48a7b7(0xe1)],_0x56ecbc={'version':_0x2a64ea?.[_0x48a7b7(0xfe)]||_0x5c1f86[_0x48a7b7(0x111)][_0x48a7b7(0xfe)]||_0x5c1f86[_0x48a7b7(0xf4)]['name'],'state':_0x5c1f86[_0x48a7b7(0xf4)][_0x48a7b7(0x10f)]==='launched'?_0x48a7b7(0xd3):_0x48a7b7(0xcc),'stages':_0x2a64ea?.[_0x48a7b7(0xfb)]||_0x5c1f86[_0x48a7b7(0x111)]['stages']||[],'id':_0x2a64ea?.['id']||_0x5c1f86[_0x48a7b7(0x111)]['id'],'version_number':_0x2a64ea?.[_0x48a7b7(0xe2)]||_0x5c1f86[_0x48a7b7(0x111)]['version_number']};return _0x1321e0&&(_0x56ecbc['goal']=_0x1321e0),_0x3a3cc4&&(_0x56ecbc[_0x48a7b7(0xdb)]=!![]),_0x56ecbc;});}export function buildMergedJourneyDef(_0xca0fa5,_0xfbfeda,_0x4f4d04){const _0x16d014=a129_0x1da9,_0x49f1c1=_0xca0fa5[0x0]['yaml'],_0x407aa7=buildJourneysArray(_0xca0fa5,_0x4f4d04),{merged:_0x3a073f,nameMapping:_0x335690}=consolidateSegmentsByContent(_0xca0fa5[_0x16d014(0x104)](_0x1ad418=>_0x1ad418[_0x16d014(0x111)][_0x16d014(0xcb)]),_0xfbfeda);updateSegmentRefsInSegments(_0x3a073f,_0x335690);const _0x39458b=Array[_0x16d014(0x110)](_0x335690[_0x16d014(0xf7)]())[_0x16d014(0xf0)](([_0x261caa,_0x298816])=>_0x261caa!==_0x298816&&_0x261caa[_0x16d014(0xfd)](_0x16d014(0xe0)));let _0x144ba5=_0x3a073f,_0x3b68b7=new Map();if(_0x39458b){const _0x50609e=consolidateSegmentsByContent([_0x3a073f],_0xfbfeda);_0x144ba5=_0x50609e[_0x16d014(0xd9)],_0x3b68b7=_0x50609e[_0x16d014(0xe9)];}const _0x1cdad0=new Map(_0x335690);for(const [_0x18c269,_0x1bb889]of _0x3b68b7[_0x16d014(0xf7)]()){_0x1cdad0[_0x16d014(0x100)](_0x18c269,_0x1bb889);}for(const [_0x24ec62,_0x120e24]of _0x1cdad0[_0x16d014(0xf7)]()){let _0x2c5161=_0x120e24,_0x4496e5=0x0;while(_0x1cdad0[_0x16d014(0xc8)](_0x2c5161)&&_0x1cdad0[_0x16d014(0xf6)](_0x2c5161)!==_0x2c5161&&_0x4496e5<MAX_MAPPING_CHAIN_DEPTH){_0x2c5161=_0x1cdad0[_0x16d014(0xf6)](_0x2c5161),_0x4496e5++;}_0x2c5161!==_0x120e24&&_0x1cdad0[_0x16d014(0x100)](_0x24ec62,_0x2c5161);}for(const _0x5e212d of _0x407aa7){updateSegmentReferences(_0x5e212d['stages'],_0x1cdad0);}const {merged:_0x221714,nameMapping:_0x21d877}=consolidateActivationsByContent(_0xca0fa5[_0x16d014(0x104)](_0xbb9530=>_0xbb9530['yaml']['activations']));for(const _0x45fc92 of _0x407aa7){updateActivationReferences(_0x45fc92[_0x16d014(0xfb)],_0x21d877);}let _0x133c1e=_0x49f1c1['goal'];if(_0x133c1e?.[_0x16d014(0xd2)]){const _0x57196e=_0x1cdad0[_0x16d014(0xf6)](_0x133c1e[_0x16d014(0xd2)]);_0x57196e&&(_0x133c1e={..._0x133c1e,'segment':_0x57196e});}for(const _0x5f19a0 of _0x407aa7){if(_0x5f19a0[_0x16d014(0xe1)]?.['segment']){const _0x112f5e=_0x1cdad0[_0x16d014(0xf6)](_0x5f19a0[_0x16d014(0xe1)][_0x16d014(0xd2)]);_0x112f5e&&(_0x5f19a0['goal']={..._0x5f19a0['goal'],'segment':_0x112f5e});}}return _0x407aa7[_0x16d014(0xf0)](_0x5b1b2d=>_0x5b1b2d[_0x16d014(0xe1)])&&(_0x133c1e=undefined),{'type':'journey','name':_0x49f1c1[_0x16d014(0xcf)],'description':_0x49f1c1[_0x16d014(0x10e)],'goal':_0x133c1e,'reentry':_0x49f1c1[_0x16d014(0xd8)],'segments':Object[_0x16d014(0xed)](_0x144ba5)[_0x16d014(0xe7)]>0x0?_0x144ba5:undefined,'activations':Object['keys'](_0x221714)[_0x16d014(0xe7)]>0x0?_0x221714:undefined,'journeys':_0x407aa7,'bundle_id':_0x49f1c1[_0x16d014(0xe8)],'bundle_name':_0x49f1c1[_0x16d014(0x114)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x350ade,_0x20a723,_0x4bf69,_0x3937c5){const _0x312f7b=a129_0x1da9,_0x30d6e3=_0x350ade+':'+_0x20a723,_0x280465=_0x4bf69['get'](_0x30d6e3);if(_0x280465)return _0x280465;const _0x4fc8e0=await _0x3937c5(_0x350ade),_0xc6b310=_0x4fc8e0['attributes']['journeyBundleName']||_0x4fc8e0[_0x312f7b(0x106)]['name'],_0x4bebf3=_0x4fc8e0[_0x312f7b(0x106)]['journeyStages'][_0x312f7b(0xc9)](_0x58ce2d=>String(_0x58ce2d['id'])===String(_0x20a723)),_0x3d1d70=_0x4bebf3?.['name']||_0x20a723,_0x356640={'journeyName':_0xc6b310,'stageName':_0x3d1d70};return _0x4bf69[_0x312f7b(0x100)](_0x30d6e3,_0x356640),_0x356640;}export function formatApiJourneyName(_0x83696e,_0x4df0af){return _0x4df0af+'\x20('+_0x83696e+')';}export function isLocalJourneyRef(_0x3479fb){const _0x3f7d56=a129_0x1da9;return _0x3479fb['endsWith'](_0x3f7d56(0x101))||_0x3479fb[_0x3f7d56(0x108)](_0x3f7d56(0xf5));}export function buildLocalRuleToNameMapping(_0x189266){const _0x487684=a129_0x1da9,_0x3f7f7f=new Map();if(!_0x189266)return _0x3f7f7f;for(const [_0x25eee4,_0x997351]of Object[_0x487684(0xf7)](_0x189266)){if(_0x997351[_0x487684(0xf1)]){const _0x1bad4e=serializeRule(_0x997351[_0x487684(0xf1)]),_0x436600=_0x3f7f7f['get'](_0x1bad4e)||[];_0x436600[_0x487684(0xca)](_0x25eee4),_0x3f7f7f[_0x487684(0x100)](_0x1bad4e,_0x436600);}}return _0x3f7f7f;}function a129_0x8272(){const _0x596803=['sort','milestone','description','state','from','yaml','type','replace','bundle_name','has','find','push','segments','draft','exit_criteria','values','name','notification','index','segment','launched','6086922pOPbUe','decision_point','join','slice','reentry','merged','wait','latest','2383576ZzhtLm','all_columns','stringify','with','entry_criteria','goal','version_number','activation','8464HHthCn','versions','340196wRpDBq','length','bundle_id','nameMapping','object','toLowerCase','connector_config','keys','conditions','connection','some','rule','behavior','schedule','item','.yaml','get','entries','match','branches','366stkDmB','stages','journeys','startsWith','version','isArray','set','.yml','columns','3787230IRkdYK','map','1536561PQaYNQ','attributes','condition','endsWith','steps','7EZfVVc','1204085MQSjEh'];a129_0x8272=function(){return _0x596803;};return a129_0x8272();}export function buildLocalRuleToNameMappingFromJourney(_0x3ccef5){const _0xfd06ab=a129_0x1da9,_0x2d6ee1=_0x3ccef5['segments'];if(!_0x2d6ee1)return new Map();const _0x2969c3=collectSegmentUsageCounts(_0x3ccef5),_0x3d4027=new Map();let _0x35fcad=0x0;for(const [_0x205089,_0x46f4de]of Object['entries'](_0x2d6ee1)){if(!_0x46f4de['rule']){_0x35fcad++;continue;}const _0x50eb42=serializeRule(_0x46f4de[_0xfd06ab(0xf1)]),_0xaf379=_0x3d4027[_0xfd06ab(0xf6)](_0x50eb42)||[];_0xaf379[_0xfd06ab(0xca)]({'name':_0x205089,'index':_0x35fcad}),_0x3d4027[_0xfd06ab(0x100)](_0x50eb42,_0xaf379),_0x35fcad++;}const _0xf258=new Map();for(const [_0x48309c,_0x1b2ebb]of _0x3d4027){const _0x504f5d=_0x1b2ebb[_0xfd06ab(0xd7)]()['sort']((_0x2a30e2,_0x11a6ae)=>{const _0x5150d7=_0xfd06ab,_0x4f2632=_0x2969c3[_0x5150d7(0xf6)](_0x2a30e2[_0x5150d7(0xcf)])||0x0,_0x5b8450=_0x2969c3[_0x5150d7(0xf6)](_0x11a6ae[_0x5150d7(0xcf)])||0x0;if(_0x4f2632!==_0x5b8450)return _0x5b8450-_0x4f2632;return _0x2a30e2[_0x5150d7(0xd1)]-_0x11a6ae['index'];})[_0xfd06ab(0x104)](_0x12f340=>_0x12f340['name']);_0xf258[_0xfd06ab(0x100)](_0x48309c,_0x504f5d);}return _0xf258;}export function collectSegmentUsageCounts(_0x3ff5ef){const _0x9a8e=a129_0x1da9,_0x72e8c8=new Map(),_0x12ad21=_0x34f6b0=>{const _0x4c2424=a129_0x1da9;if(!_0x34f6b0)return;_0x72e8c8[_0x4c2424(0x100)](_0x34f6b0,(_0x72e8c8[_0x4c2424(0xf6)](_0x34f6b0)||0x0)+0x1);},_0x41ac4d=_0x74a48=>{const _0x5a6c6e=a129_0x1da9;for(const _0xe8f36 of _0x74a48){_0x12ad21(_0xe8f36['entry_criteria']?.[_0x5a6c6e(0xd2)]);if(_0xe8f36['exit_criteria'])for(const _0x4174ce of _0xe8f36['exit_criteria']){_0x12ad21(_0x4174ce['segment']);}_0x12ad21(_0xe8f36[_0x5a6c6e(0x10d)]?.['segment']);if(_0xe8f36[_0x5a6c6e(0x109)])for(const _0x4a8670 of _0xe8f36[_0x5a6c6e(0x109)]){if(_0x4a8670[_0x5a6c6e(0x112)]==='decision_point')for(const _0xf53477 of _0x4a8670[_0x5a6c6e(0xdf)]['branches']){_0x12ad21(_0xf53477['segment']);}else _0x4a8670['type']===_0x5a6c6e(0xda)&&_0x12ad21(_0x4a8670[_0x5a6c6e(0xdf)][_0x5a6c6e(0x107)]?.[_0x5a6c6e(0xd2)]);}}};_0x12ad21(_0x3ff5ef[_0x9a8e(0xe1)]?.[_0x9a8e(0xd2)]);if(_0x3ff5ef['journeys'])for(const _0x50dae2 of _0x3ff5ef[_0x9a8e(0xfc)]){_0x12ad21(_0x50dae2['goal']?.[_0x9a8e(0xd2)]),_0x41ac4d(_0x50dae2[_0x9a8e(0xfb)]);}_0x3ff5ef[_0x9a8e(0xfb)]&&_0x41ac4d(_0x3ff5ef[_0x9a8e(0xfb)]);if(_0x3ff5ef[_0x9a8e(0xe5)])for(const _0x3ab7ac of _0x3ff5ef['versions']){_0x41ac4d(_0x3ab7ac[_0x9a8e(0xfb)]);}return _0x72e8c8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x256ecb,_0x2f398a){const _0x4474bb=a130_0xb84a,_0x3a4411=_0x256ecb();while(!![]){try{const _0x4ff91a=-parseInt(_0x4474bb(0x1b1))/0x1+-parseInt(_0x4474bb(0x1a0))/0x2+-parseInt(_0x4474bb(0x1bc))/0x3+-parseInt(_0x4474bb(0x14c))/0x4+parseInt(_0x4474bb(0x141))/0x5*(-parseInt(_0x4474bb(0x177))/0x6)+-parseInt(_0x4474bb(0x130))/0x7*(parseInt(_0x4474bb(0x1a1))/0x8)+-parseInt(_0x4474bb(0x156))/0x9*(-parseInt(_0x4474bb(0x138))/0xa);if(_0x4ff91a===_0x2f398a)break;else _0x3a4411['push'](_0x3a4411['shift']());}catch(_0xec6113){_0x3a4411['push'](_0x3a4411['shift']());}}}(a130_0x19c1,0x1b973));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x377d88,_0x20895e,_0x5049c2,_0x1bf609,_0x2be1a8,_0x28fa43){return{'level':_0x377d88,'path':_0x20895e,'code':_0x5049c2,'message':_0x1bf609,'location':getLocationFromPath(_0x2be1a8['document'],_0x2be1a8['source'],pathToArray(_0x28fa43??_0x20895e))};}function validateVersionStructure(_0x263bbc,_0x541cbf){const _0x3bf795=a130_0xb84a,_0x106821=[];return _0x263bbc[_0x3bf795(0x18a)]>MAX_STAGES&&_0x106821[_0x3bf795(0x17d)](createIssue(_0x3bf795(0x19f),'stages','TOO_MANY_STAGES',_0x3bf795(0x145)+_0x263bbc[_0x3bf795(0x18a)]+_0x3bf795(0x13d)+MAX_STAGES,_0x541cbf)),_0x106821;}function validateStageStructure(_0x39bff3,_0x393be3,_0x255c94,_0x53456e){const _0x506a9d=a130_0xb84a,_0x56e799=[],_0x4a3101=_0x506a9d(0x1ca)+_0x393be3+']';_0x393be3===0x0&&!_0x39bff3['entry_criteria']&&_0x56e799[_0x506a9d(0x17d)](createIssue(_0x506a9d(0x19f),_0x4a3101+_0x506a9d(0x16a),_0x506a9d(0x15e),_0x506a9d(0x17c)+_0x39bff3[_0x506a9d(0x1c7)]+_0x506a9d(0x1ad),_0x53456e,_0x4a3101));const _0x4e2932=_0x393be3===_0x255c94-0x1;!_0x4e2932&&!_0x39bff3[_0x506a9d(0x1a9)]&&_0x56e799[_0x506a9d(0x17d)](createIssue(_0x506a9d(0x19f),_0x4a3101+_0x506a9d(0x170),_0x506a9d(0x19d),_0x506a9d(0x17c)+_0x39bff3[_0x506a9d(0x1c7)]+_0x506a9d(0x131),_0x53456e,_0x4a3101));(!_0x39bff3[_0x506a9d(0x129)]||_0x39bff3[_0x506a9d(0x129)][_0x506a9d(0x18a)]===0x0)&&_0x56e799[_0x506a9d(0x17d)](createIssue(_0x506a9d(0x1c0),_0x4a3101+_0x506a9d(0x182),'MISSING_EXIT_CRITERIA','Stage\x20\x27'+_0x39bff3[_0x506a9d(0x1c7)]+_0x506a9d(0x1b9),_0x53456e,_0x4a3101));const _0x51aec1=_0x39bff3[_0x506a9d(0x18b)]?.['length']??0x0;if(_0x51aec1===0x0)_0x56e799[_0x506a9d(0x17d)](createIssue(_0x506a9d(0x19f),_0x4a3101+_0x506a9d(0x1d4),_0x506a9d(0x12e),_0x506a9d(0x17c)+_0x39bff3['name']+_0x506a9d(0x1dd),_0x53456e,_0x4a3101+_0x506a9d(0x1d4)));else{if(_0x51aec1===0x1)_0x56e799[_0x506a9d(0x17d)](createIssue(_0x506a9d(0x1c0),_0x4a3101+'.steps',_0x506a9d(0x12e),_0x506a9d(0x17c)+_0x39bff3[_0x506a9d(0x1c7)]+_0x506a9d(0x184),_0x53456e,_0x4a3101+_0x506a9d(0x1d4)));else _0x51aec1<=0x3&&_0x56e799[_0x506a9d(0x17d)](createIssue('warning',_0x4a3101+_0x506a9d(0x1d4),_0x506a9d(0x157),_0x506a9d(0x17c)+_0x39bff3['name']+_0x506a9d(0x165)+_0x51aec1+_0x506a9d(0x159),_0x53456e,_0x4a3101+_0x506a9d(0x1d4)));}return _0x56e799;}function validateStep(_0x1680b9,_0x39980e,_0x1e005b,_0x553029){const _0x138dff=a130_0xb84a,_0x4da78c=[];if(_0x1680b9['type']===_0x138dff(0x183))return _0x1680b9[_0x138dff(0x142)]&&_0x4da78c[_0x138dff(0x17d)](createIssue('error',_0x39980e+'.next',_0x138dff(0x14d),'End\x20step\x20\x27'+_0x1680b9[_0x138dff(0x1c7)]+_0x138dff(0x178),_0x1e005b)),_0x138dff(0x166)in _0x1680b9&&_0x1680b9[_0x138dff(0x166)]!==undefined&&_0x4da78c[_0x138dff(0x17d)](createIssue('error',_0x39980e+'.with',_0x138dff(0x14d),'End\x20step\x20\x27'+_0x1680b9[_0x138dff(0x1c7)]+_0x138dff(0x171),_0x1e005b)),_0x4da78c;_0x1680b9['next']&&(_0x1e005b[_0x138dff(0x1da)]&&!_0x1e005b[_0x138dff(0x1da)]['has'](_0x1680b9[_0x138dff(0x142)])&&_0x4da78c[_0x138dff(0x17d)](createIssue(_0x138dff(0x19f),_0x39980e+_0x138dff(0x1b3),_0x138dff(0x180),_0x138dff(0x163)+_0x1680b9[_0x138dff(0x142)]+'\x27',_0x1e005b)));switch(_0x1680b9['type']){case _0x138dff(0x128):_0x4da78c['push'](...validateWaitStep(_0x1680b9,_0x39980e,_0x1e005b,_0x553029));break;case _0x138dff(0x1a2):_0x4da78c[_0x138dff(0x17d)](...validateActivationStep(_0x1680b9,_0x39980e,_0x1e005b));break;case'decision_point':_0x4da78c[_0x138dff(0x17d)](...validateDecisionPointStep(_0x1680b9,_0x39980e,_0x1e005b,_0x553029));break;case _0x138dff(0x162):_0x4da78c[_0x138dff(0x17d)](...validateAbTestStep(_0x1680b9,_0x39980e,_0x1e005b,_0x553029));break;case _0x138dff(0x14a):_0x4da78c[_0x138dff(0x17d)](...validateJumpStep(_0x1680b9,_0x39980e,_0x1e005b));break;}return _0x4da78c;}function validateWaitStep(_0x2a6749,_0xcfc574,_0x359978,_0x464d7e){const _0x266059=a130_0xb84a,_0x236a21=[];if(!_0x2a6749[_0x266059(0x166)])return _0x236a21[_0x266059(0x17d)](createIssue(_0x266059(0x19f),_0xcfc574+_0x266059(0x12a),_0x266059(0x1cd),_0x266059(0x15a),_0x359978,_0xcfc574)),_0x236a21;if(_0x2a6749['with']['condition']){const _0x365dc6=_0x2a6749[_0x266059(0x166)][_0x266059(0x1c4)];if(_0x365dc6[_0x266059(0x1bb)]){_0x359978[_0x266059(0x19c)]?.['add'](_0x365dc6[_0x266059(0x1bb)]);!_0x365dc6[_0x266059(0x1bb)]['startsWith']('ref:')&&(_0x359978[_0x266059(0x153)]&&!_0x359978[_0x266059(0x153)][_0x266059(0x1bd)](_0x365dc6[_0x266059(0x1bb)])&&_0x236a21[_0x266059(0x17d)](createIssue('error',_0xcfc574+_0x266059(0x17f),_0x266059(0x16c),_0x266059(0x1cf)+_0x365dc6['segment']+_0x266059(0x16d),_0x359978)));_0x365dc6[_0x266059(0x142)]&&_0x359978[_0x266059(0x1da)]&&!_0x359978[_0x266059(0x1da)]['has'](_0x365dc6[_0x266059(0x142)])&&_0x236a21['push'](createIssue(_0x266059(0x19f),_0xcfc574+_0x266059(0x176),'INVALID_NEXT_REFERENCE',_0x266059(0x169)+_0x365dc6[_0x266059(0x142)]+'\x27',_0x359978));_0x365dc6[_0x266059(0x19a)]?.[_0x266059(0x142)]&&_0x359978[_0x266059(0x1da)]&&!_0x359978[_0x266059(0x1da)][_0x266059(0x1bd)](_0x365dc6[_0x266059(0x19a)][_0x266059(0x142)])&&_0x236a21[_0x266059(0x17d)](createIssue('error',_0xcfc574+_0x266059(0x1b2),_0x266059(0x180),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x365dc6['timeout'][_0x266059(0x142)]+'\x27',_0x359978));const _0x578a79=_0x365dc6['next']||_0x2a6749[_0x266059(0x142)],_0x5d3151=_0x365dc6[_0x266059(0x19a)]?.[_0x266059(0x142)]||_0x2a6749[_0x266059(0x142)];if(_0x578a79){const _0x1d3db9=_0x464d7e[_0x266059(0x193)](_0x578a79);_0x1d3db9?.[_0x266059(0x1c6)]===_0x266059(0x1b4)&&_0x236a21['push'](createIssue(_0x266059(0x1c0),_0xcfc574+'.with.condition.next',_0x266059(0x190),_0x266059(0x1a7)+_0x578a79+_0x266059(0x144),_0x359978,_0xcfc574+_0x266059(0x14e)));}if(_0x5d3151){const _0x2ecdbe=_0x464d7e[_0x266059(0x193)](_0x5d3151);_0x2ecdbe?.['type']===_0x266059(0x1b4)&&_0x236a21[_0x266059(0x17d)](createIssue(_0x266059(0x1c0),_0xcfc574+_0x266059(0x1b2),_0x266059(0x190),_0x266059(0x186)+_0x5d3151+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x359978,_0xcfc574+_0x266059(0x14b)));}}}return _0x236a21;}function a130_0xb84a(_0x459037,_0x51c67b){_0x459037=_0x459037-0x128;const _0x19c152=a130_0x19c1();let _0xb84ae5=_0x19c152[_0x459037];return _0xb84ae5;}function validateActivationStep(_0x15994b,_0x3bec35,_0x4c500c){const _0x3a6718=a130_0xb84a,_0x12f709=[];if(!_0x15994b['with']?.[_0x3a6718(0x1a2)])return _0x12f709['push'](createIssue(_0x3a6718(0x19f),_0x3bec35+_0x3a6718(0x13a),_0x3a6718(0x1c5),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x4c500c,_0x3bec35)),_0x12f709;const _0x577514=_0x15994b[_0x3a6718(0x166)]['activation'];return _0x4c500c[_0x3a6718(0x16e)]&&!_0x577514[_0x3a6718(0x167)](_0x3a6718(0x1d7))&&(!_0x4c500c[_0x3a6718(0x16e)][_0x3a6718(0x1bd)](_0x577514)&&_0x12f709[_0x3a6718(0x17d)](createIssue(_0x3a6718(0x19f),_0x3bec35+_0x3a6718(0x13a),_0x3a6718(0x1a4),_0x3a6718(0x143)+_0x577514+_0x3a6718(0x1b7),_0x4c500c))),_0x12f709;}function validateDecisionPointStep(_0x51cdc7,_0x467964,_0x3a038f,_0xf4ed5b){const _0x473eab=a130_0xb84a,_0x2abc5b=[];if(!_0x51cdc7[_0x473eab(0x166)]?.['branches']||_0x51cdc7[_0x473eab(0x166)]['branches']['length']===0x0)return _0x2abc5b[_0x473eab(0x17d)](createIssue('error',_0x467964+_0x473eab(0x1c9),_0x473eab(0x188),_0x473eab(0x134),_0x3a038f,_0x467964)),_0x2abc5b;for(let _0x3d828d=0x0;_0x3d828d<_0x51cdc7[_0x473eab(0x166)]['branches'][_0x473eab(0x18a)];_0x3d828d++){const _0x1234da=_0x51cdc7[_0x473eab(0x166)]['branches'][_0x3d828d],_0x19ca82=_0x467964+_0x473eab(0x13e)+_0x3d828d+']';_0x1234da['segment']&&!_0x1234da[_0x473eab(0x1d8)]&&(_0x3a038f[_0x473eab(0x19c)]?.['add'](_0x1234da[_0x473eab(0x1bb)]),!_0x1234da[_0x473eab(0x1bb)][_0x473eab(0x167)](_0x473eab(0x1d7))&&(_0x3a038f[_0x473eab(0x153)]&&!_0x3a038f[_0x473eab(0x153)][_0x473eab(0x1bd)](_0x1234da[_0x473eab(0x1bb)])&&_0x2abc5b[_0x473eab(0x17d)](createIssue(_0x473eab(0x19f),_0x19ca82+_0x473eab(0x160),_0x473eab(0x16c),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x1234da[_0x473eab(0x1bb)]+'\x27',_0x3a038f))));_0x1234da[_0x473eab(0x142)]&&_0x3a038f[_0x473eab(0x1da)]&&!_0x3a038f[_0x473eab(0x1da)][_0x473eab(0x1bd)](_0x1234da[_0x473eab(0x142)])&&_0x2abc5b[_0x473eab(0x17d)](createIssue(_0x473eab(0x19f),_0x19ca82+_0x473eab(0x1b3),_0x473eab(0x180),_0x473eab(0x15f)+_0x1234da[_0x473eab(0x142)]+'\x27',_0x3a038f));if(_0x1234da[_0x473eab(0x142)]){const _0x5750e2=_0xf4ed5b['get'](_0x1234da[_0x473eab(0x142)]);_0x5750e2?.[_0x473eab(0x1c6)]===_0x473eab(0x1b4)&&_0x2abc5b['push'](createIssue(_0x473eab(0x1c0),_0x19ca82+_0x473eab(0x1b3),_0x473eab(0x190),'Decision\x20branch\x20\x27'+_0x1234da['name']+_0x473eab(0x18c)+_0x1234da[_0x473eab(0x142)]+_0x473eab(0x197),_0x3a038f));}}return _0x2abc5b;}function validateAbTestStep(_0x8b3663,_0x405d5e,_0x341cd7,_0x3e0afb){const _0x53363d=a130_0xb84a,_0x3a8db4=[];if(!_0x8b3663[_0x53363d(0x166)]?.['variants']||_0x8b3663[_0x53363d(0x166)][_0x53363d(0x196)]['length']===0x0)return _0x3a8db4['push'](createIssue(_0x53363d(0x19f),_0x405d5e+_0x53363d(0x185),_0x53363d(0x188),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x341cd7,_0x405d5e)),_0x3a8db4;const _0x517c0e=_0x8b3663[_0x53363d(0x166)][_0x53363d(0x196)][_0x53363d(0x133)]((_0x1712df,_0x1b7d87)=>_0x1712df+(_0x1b7d87[_0x53363d(0x13b)]||0x0),0x0);Math['abs'](_0x517c0e-0x64)>0.01&&_0x3a8db4[_0x53363d(0x17d)](createIssue(_0x53363d(0x19f),_0x405d5e+'.with.variants',_0x53363d(0x146),_0x53363d(0x191)+_0x517c0e+'%)',_0x341cd7));for(let _0x32da6d=0x0;_0x32da6d<_0x8b3663[_0x53363d(0x166)]['variants'][_0x53363d(0x18a)];_0x32da6d++){const _0xc0bdf5=_0x8b3663[_0x53363d(0x166)]['variants'][_0x32da6d],_0xab19c=_0x405d5e+_0x53363d(0x1de)+_0x32da6d+']';_0xc0bdf5[_0x53363d(0x142)]&&_0x341cd7[_0x53363d(0x1da)]&&!_0x341cd7[_0x53363d(0x1da)][_0x53363d(0x1bd)](_0xc0bdf5[_0x53363d(0x142)])&&_0x3a8db4[_0x53363d(0x17d)](createIssue('error',_0xab19c+_0x53363d(0x1b3),_0x53363d(0x180),_0x53363d(0x1e0)+_0xc0bdf5['next']+'\x27',_0x341cd7));if(_0xc0bdf5[_0x53363d(0x142)]){const _0x4903e=_0x3e0afb[_0x53363d(0x193)](_0xc0bdf5[_0x53363d(0x142)]);_0x4903e?.[_0x53363d(0x1c6)]===_0x53363d(0x1b4)&&_0x3a8db4['push'](createIssue(_0x53363d(0x1c0),_0xab19c+_0x53363d(0x1b3),_0x53363d(0x190),_0x53363d(0x12c)+_0xc0bdf5[_0x53363d(0x1c7)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0xc0bdf5[_0x53363d(0x142)]+_0x53363d(0x197),_0x341cd7));}}return _0x3a8db4;}function validateJumpStep(_0x288d68,_0x41c50b,_0x1197a7){const _0x5b3617=a130_0xb84a,_0x19f10a=[];if(!_0x288d68['with']?.['target'])return _0x19f10a['push'](createIssue(_0x5b3617(0x19f),_0x41c50b+_0x5b3617(0x1df),'INVALID_JUMP_TARGET',_0x5b3617(0x1d2),_0x1197a7,_0x41c50b)),_0x19f10a;return(!_0x288d68[_0x5b3617(0x166)][_0x5b3617(0x12b)][_0x5b3617(0x140)]||!_0x288d68['with'][_0x5b3617(0x12b)][_0x5b3617(0x18e)])&&_0x19f10a[_0x5b3617(0x17d)](createIssue('error',_0x41c50b+_0x5b3617(0x1df),'INVALID_JUMP_TARGET',_0x5b3617(0x161),_0x1197a7)),_0x19f10a;}function buildConvergenceMap(_0x3c9d78){const _0x154d3f=a130_0xb84a,_0x3483d2=new Map();function _0x170645(_0x2afeaa,_0x44b6e3){const _0x1ca4f9=a130_0xb84a,_0x56d856=_0x3483d2[_0x1ca4f9(0x193)](_0x2afeaa)||[];_0x56d856[_0x1ca4f9(0x17d)](_0x44b6e3),_0x3483d2[_0x1ca4f9(0x1d0)](_0x2afeaa,_0x56d856);}for(const _0x2fb58c of _0x3c9d78){_0x2fb58c['next']&&_0x170645(_0x2fb58c[_0x154d3f(0x142)],{'stepName':_0x2fb58c[_0x154d3f(0x1c7)],'description':'step\x20\x27'+_0x2fb58c['name']+'\x27'});if(_0x2fb58c[_0x154d3f(0x1c6)]===_0x154d3f(0x19e)&&_0x2fb58c[_0x154d3f(0x166)]?.[_0x154d3f(0x1d1)])for(const _0x6c4698 of _0x2fb58c['with'][_0x154d3f(0x1d1)]){_0x6c4698[_0x154d3f(0x142)]&&_0x170645(_0x6c4698[_0x154d3f(0x142)],{'stepName':_0x2fb58c['name'],'description':_0x154d3f(0x139)+_0x6c4698['name']+'\x27\x20of\x20\x27'+_0x2fb58c[_0x154d3f(0x1c7)]+'\x27'});}if(_0x2fb58c[_0x154d3f(0x1c6)]==='ab_test'&&_0x2fb58c['with']?.[_0x154d3f(0x196)])for(const _0x30323e of _0x2fb58c[_0x154d3f(0x166)][_0x154d3f(0x196)]){_0x30323e[_0x154d3f(0x142)]&&_0x170645(_0x30323e['next'],{'stepName':_0x2fb58c[_0x154d3f(0x1c7)],'description':_0x154d3f(0x1ac)+_0x30323e[_0x154d3f(0x1c7)]+_0x154d3f(0x1be)+_0x2fb58c[_0x154d3f(0x1c7)]+'\x27'});}_0x2fb58c['type']===_0x154d3f(0x128)&&_0x2fb58c[_0x154d3f(0x166)]?.[_0x154d3f(0x1c4)]&&(_0x2fb58c[_0x154d3f(0x166)][_0x154d3f(0x1c4)][_0x154d3f(0x142)]&&_0x170645(_0x2fb58c[_0x154d3f(0x166)][_0x154d3f(0x1c4)][_0x154d3f(0x142)],{'stepName':_0x2fb58c['name'],'description':'condition\x20of\x20\x27'+_0x2fb58c[_0x154d3f(0x1c7)]+'\x27'}),_0x2fb58c[_0x154d3f(0x166)][_0x154d3f(0x1c4)][_0x154d3f(0x19a)]?.['next']&&_0x170645(_0x2fb58c[_0x154d3f(0x166)][_0x154d3f(0x1c4)]['timeout'][_0x154d3f(0x142)],{'stepName':_0x2fb58c[_0x154d3f(0x1c7)],'description':_0x154d3f(0x1dc)+_0x2fb58c[_0x154d3f(0x1c7)]+'\x27'}));}return _0x3483d2;}function validateFlowControl(_0x188dd9,_0x514f18,_0x1895f5){const _0x406951=a130_0xb84a,_0x59ec6c=[],_0x2c84fe=_0x406951(0x1ca)+_0x514f18+']',_0x5d6bdc=_0x188dd9[_0x406951(0x18b)]||[];if(_0x5d6bdc[_0x406951(0x18a)]===0x0)return _0x59ec6c;const _0x1ba910=new Map();for(const _0x19c696 of _0x5d6bdc){_0x19c696['name']&&_0x1ba910[_0x406951(0x1d0)](_0x19c696[_0x406951(0x1c7)],_0x19c696);}const _0x36a422=buildConvergenceMap(_0x5d6bdc),_0x10196e=_0x5d6bdc[_0x406951(0x1db)](_0x30cce4=>_0x30cce4[_0x406951(0x1c6)]==='end');!_0x10196e&&_0x59ec6c[_0x406951(0x17d)](createIssue(_0x406951(0x19f),_0x2c84fe+_0x406951(0x1d4),_0x406951(0x16b),_0x406951(0x17c)+_0x188dd9[_0x406951(0x1c7)]+_0x406951(0x198),_0x1895f5));for(const [_0x5b06d1,_0x1db11f]of _0x36a422){const _0x193c72=_0x1ba910[_0x406951(0x193)](_0x5b06d1);if(!_0x193c72)continue;if(_0x1db11f[_0x406951(0x18a)]>0x1&&_0x193c72[_0x406951(0x1c6)]!==_0x406951(0x1b4)){const _0x3d5da0=_0x1db11f[_0x406951(0x175)](_0x3f1931=>_0x3f1931[_0x406951(0x17e)])[_0x406951(0x18d)](',\x20');_0x59ec6c[_0x406951(0x17d)](createIssue(_0x406951(0x19f),_0x2c84fe+_0x406951(0x1d4),_0x406951(0x17b),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x5b06d1+'\x27\x20(from:\x20'+_0x3d5da0+').\x20Use\x20a\x20merge\x20step.',_0x1895f5));}_0x1db11f['length']===0x1&&_0x193c72[_0x406951(0x1c6)]===_0x406951(0x1b4)&&_0x59ec6c[_0x406951(0x17d)](createIssue(_0x406951(0x1c0),_0x2c84fe+'.steps',_0x406951(0x1a3),'Merge\x20step\x20\x27'+_0x5b06d1+_0x406951(0x181)+_0x1db11f[0x0][_0x406951(0x17e)]+_0x406951(0x1d9),_0x1895f5));}for(const _0x10f1b6 of _0x5d6bdc){if(_0x10f1b6[_0x406951(0x1c6)]===_0x406951(0x1b4)&&_0x10f1b6[_0x406951(0x142)]){const _0x2f8107=_0x1ba910[_0x406951(0x193)](_0x10f1b6[_0x406951(0x142)]);_0x2f8107?.[_0x406951(0x1c6)]===_0x406951(0x1b4)&&_0x59ec6c[_0x406951(0x17d)](createIssue(_0x406951(0x19f),_0x2c84fe+_0x406951(0x1d4),'MERGE_TO_MERGE_CHAIN',_0x406951(0x150)+_0x10f1b6[_0x406951(0x1c7)]+_0x406951(0x151)+_0x10f1b6[_0x406951(0x142)]+_0x406951(0x154),_0x1895f5));}}return _0x59ec6c;}function validateCriteria(_0xf53f4f,_0x558cf7,_0x3964ef){const _0x334424=a130_0xb84a,_0x251c9a=[];return _0xf53f4f[_0x334424(0x1bb)]&&(_0x3964ef['referencedSegments']?.[_0x334424(0x15d)](_0xf53f4f[_0x334424(0x1bb)]),!_0xf53f4f[_0x334424(0x1bb)][_0x334424(0x167)]('ref:')&&(_0x3964ef[_0x334424(0x153)]&&!_0x3964ef[_0x334424(0x153)][_0x334424(0x1bd)](_0xf53f4f[_0x334424(0x1bb)])&&_0x251c9a[_0x334424(0x17d)](createIssue('error',_0x558cf7+'.segment','MISSING_SEGMENT_REFERENCE',_0x334424(0x149)+_0xf53f4f[_0x334424(0x1bb)]+'\x27',_0x3964ef)))),_0x251c9a;}function validateEmbeddedSegment(_0x505535,_0x197323,_0x586f36){const _0x2c8486=a130_0xb84a,_0x13c61d=[];return _0x505535[_0x2c8486(0x136)]&&_0x13c61d[_0x2c8486(0x17d)](...validateRuleDef(_0x505535[_0x2c8486(0x136)],_0x197323+_0x2c8486(0x1d6),_0x586f36)),_0x13c61d;}function a130_0x19c1(){const _0x30ecce=['ACTIVATION_SCHEMA_ERROR','length','steps','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','join','stage','match','BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','safeParse','get','Journey\x20can\x20have\x20at\x20most\x20one\x20','journey\x20entry','variants','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20has\x20no\x20end\x20step','every','timeout','indices','referencedSegments','MISSING_MILESTONE','decision_point','error','201194TpYbaT','184EZvgQx','activation','SINGLE_INPUT_MERGE','MISSING_ACTIVATION_DEFINITION','path','journeys','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x20versions)','milestone','.name','message','variant\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','values','goalIsInherited','entry_criteria','180049YPeaLM','.with.condition.timeout.next','.next','merge','DUPLICATE_STEP_NAME','DUPLICATE_LATEST','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','level','\x27\x20has\x20no\x20exit_criteria\x20defined','latest','segment','93963TaWqcS','has','\x27\x20of\x20\x27','goal','warning','activations','document','MISSING_STAGES','condition','MISSING_ACTIVATION_REF','type','name','journeys,\x20stages,\x20or\x20versions','.with.branches','stages[','state','.type','MISSING_WAIT_PARAMS','versions[','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','set','branches','Jump\x20step\x20requires\x20a\x20target','data','.steps','issues','.rule','ref:','excluded',').\x20Merge\x20is\x20unnecessary.','stepNames','some','timeout\x20of\x20\x27','\x27\x20has\x20no\x20steps','.with.variants[','.with.target','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_NAME','success','wait','exit_criteria','.with','target','A/B\x20test\x20variant\x20\x27','launched','INSUFFICIENT_STEPS','versions','7FtiekC','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','.exit_criteria[','reduce','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','keys','rule','splice','6730730RPtLTa','branch\x20\x27','.with.activation','percentage','trim','\x20stages\x20but\x20maximum\x20is\x20','.with.branches[','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','journey','5MIBmnZ','next','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Journey\x20has\x20','INVALID_AB_TEST_PERCENTAGES','Journey\x20has\x20no\x20goal\x20defined','segments.','Criteria\x20references\x20undefined\x20segment\x20\x27','jump','.with.condition.timeout','630984IcbgHY','END_STEP_HAS_NEXT_OR_WITH','.with.condition','symbol','Merge\x20step\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','version','embeddedSegments','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','\x27\x20(first\x20defined\x20at\x20steps[','9tsZPXq','FEW_STEPS','entries','\x20steps\x20(may\x20be\x20too\x20simple)','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','\x20(across\x20','source','add','MISSING_ENTRY_CRITERIA','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','.segment','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','ab_test','Step\x20references\x20non-existent\x20step\x20\x27','size','\x27\x20has\x20only\x20','with','startsWith','stages','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','.entry_criteria','MISSING_END_STEP','MISSING_SEGMENT_REFERENCE','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','activationKeys','segments','.milestone','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','replace','endsWith','filter','map','.with.condition.next','541956NUVfpw','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','Embedded\x20segment\x20\x27','code','CONVERGENCE_WITHOUT_MERGE','Stage\x20\x27','push','description','.with.condition.segment','INVALID_NEXT_REFERENCE','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','.exit_criteria','end','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.variants','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','includes','MISSING_CONDITIONS'];a130_0x19c1=function(){return _0x30ecce;};return a130_0x19c1();}function validateStage(_0x5a1359,_0x57cc10,_0xa175b8,_0x48907b){const _0x4f38f3=a130_0xb84a,_0x339cae=[],_0x186624=_0x4f38f3(0x1ca)+_0x57cc10+']',_0x296c07=new Map(),_0x3e2f38=new Map();if(_0x5a1359[_0x4f38f3(0x18b)]){for(let _0x4b6493=0x0;_0x4b6493<_0x5a1359['steps'][_0x4f38f3(0x18a)];_0x4b6493++){const _0x51691d=_0x5a1359[_0x4f38f3(0x18b)][_0x4b6493];_0x51691d[_0x4f38f3(0x1c7)]&&_0x296c07['set'](_0x51691d['name'],_0x51691d);}for(let _0x4c39ef=0x0;_0x4c39ef<_0x5a1359[_0x4f38f3(0x18b)]['length'];_0x4c39ef++){const _0x40848f=_0x5a1359[_0x4f38f3(0x18b)][_0x4c39ef],_0x1c4d10=_0x186624+'.steps['+_0x4c39ef+']';if(_0x40848f[_0x4f38f3(0x1c7)]){if(_0x3e2f38['has'](_0x40848f[_0x4f38f3(0x1c7)])){const _0x284b94=_0x3e2f38[_0x4f38f3(0x193)](_0x40848f[_0x4f38f3(0x1c7)]);_0x339cae[_0x4f38f3(0x17d)](createIssue(_0x4f38f3(0x19f),_0x1c4d10+_0x4f38f3(0x1aa),_0x4f38f3(0x1b5),'Duplicate\x20step\x20name\x20\x27'+_0x40848f['name']+_0x4f38f3(0x155)+_0x284b94+'])',_0x48907b));}else _0x3e2f38[_0x4f38f3(0x1d0)](_0x40848f['name'],_0x4c39ef);}_0x339cae['push'](...validateStep(_0x40848f,_0x1c4d10,_0x48907b,_0x296c07));}}_0x5a1359[_0x4f38f3(0x1b0)]&&_0x339cae['push'](...validateCriteria(_0x5a1359['entry_criteria'],_0x186624+_0x4f38f3(0x16a),_0x48907b));if(_0x5a1359[_0x4f38f3(0x129)])for(let _0x41beb9=0x0;_0x41beb9<_0x5a1359[_0x4f38f3(0x129)][_0x4f38f3(0x18a)];_0x41beb9++){_0x339cae[_0x4f38f3(0x17d)](...validateCriteria(_0x5a1359['exit_criteria'][_0x41beb9],_0x186624+_0x4f38f3(0x132)+_0x41beb9+']',_0x48907b));}return _0x5a1359[_0x4f38f3(0x1a9)]&&_0x339cae[_0x4f38f3(0x17d)](...validateCriteria(_0x5a1359[_0x4f38f3(0x1a9)],_0x186624+_0x4f38f3(0x170),_0x48907b)),_0x339cae[_0x4f38f3(0x17d)](...validateStageStructure(_0x5a1359,_0x57cc10,_0xa175b8,_0x48907b)),_0x339cae[_0x4f38f3(0x17d)](...validateFlowControl(_0x5a1359,_0x57cc10,_0x48907b)),_0x339cae;}function validateStagesForVersion(_0xd8b47a,_0x1a4572,_0x3ed63d,_0x12dade,_0x2c3f48,_0x58a8c1,_0x824c01){const _0xdec52=a130_0xb84a;if(_0xd8b47a[_0xdec52(0x18a)]===0x0){_0x2c3f48[_0xdec52(0x17d)]({'level':_0xdec52(0x19f),'path':_0x12dade+'stages','code':_0xdec52(0x1c3),'message':_0xdec52(0x13f),'location':getLocationFromPath(_0x3ed63d[_0xdec52(0x1c2)],_0x3ed63d['source'],[_0xdec52(0x168)])});return;}const _0xb74d77=new Set();for(const _0x5a31d0 of _0xd8b47a){if(_0x5a31d0[_0xdec52(0x18b)])for(const _0x4dd632 of _0x5a31d0['steps']){_0x4dd632['name']&&_0xb74d77[_0xdec52(0x15d)](_0x4dd632[_0xdec52(0x1c7)]);}}const _0x1c91f3={..._0x3ed63d,'stepNames':_0xb74d77},_0x2c35bc=validateVersionStructure(_0xd8b47a,_0x1c91f3);for(const _0x37af83 of _0x2c35bc){const _0x99f109=_0x12dade?{..._0x37af83,'path':''+_0x12dade+_0x37af83['path']}:_0x37af83;if(_0x99f109[_0xdec52(0x1b8)]==='error')_0x2c3f48[_0xdec52(0x17d)](_0x99f109);else _0x58a8c1['push'](_0x99f109);}for(let _0x38551d=0x0;_0x38551d<_0xd8b47a[_0xdec52(0x18a)];_0x38551d++){const _0x2f5929=validateStage(_0xd8b47a[_0x38551d],_0x38551d,_0xd8b47a['length'],_0x1c91f3);for(const _0xc41bc5 of _0x2f5929){const _0x4fe37a=_0x12dade?{..._0xc41bc5,'path':''+_0x12dade+_0xc41bc5[_0xdec52(0x1a5)]}:_0xc41bc5;if(_0x4fe37a[_0xdec52(0x1b8)]===_0xdec52(0x19f))_0x2c3f48['push'](_0x4fe37a);else _0x58a8c1[_0xdec52(0x17d)](_0x4fe37a);}}if(_0x1a4572[_0xdec52(0x1bf)]){const _0x26dc5e=_0x824c01?.[_0xdec52(0x1af)]?_0xdec52(0x1bf):_0x12dade+_0xdec52(0x1bf),_0x5e0a64=validateCriteria(_0x1a4572['goal'],_0x26dc5e,_0x1c91f3);for(const _0x15e110 of _0x5e0a64){if(_0x15e110['level']===_0xdec52(0x19f))_0x2c3f48[_0xdec52(0x17d)](_0x15e110);else _0x58a8c1[_0xdec52(0x17d)](_0x15e110);}}}function extractVersionIndex(_0x7bb481){const _0x44a593=a130_0xb84a,_0xf09ea5=_0x7bb481[_0x44a593(0x18f)](/^journeys\[(\d+)\]\./);return _0xf09ea5?_0xf09ea5[0x1]:undefined;}function deduplicateAcrossVersions(_0x37e05c){const _0x39a61f=a130_0xb84a,_0x3c94d6=new Map();for(let _0x22de0a=0x0;_0x22de0a<_0x37e05c[_0x39a61f(0x18a)];_0x22de0a++){const _0x51860d=_0x37e05c[_0x22de0a][_0x39a61f(0x17a)]+':'+_0x37e05c[_0x22de0a][_0x39a61f(0x1ab)],_0x55577f=extractVersionIndex(_0x37e05c[_0x22de0a]['path']),_0x5b023a=_0x3c94d6['get'](_0x51860d);if(_0x5b023a){_0x5b023a[_0x39a61f(0x19b)][_0x39a61f(0x17d)](_0x22de0a);if(_0x55577f)_0x5b023a[_0x39a61f(0x12f)][_0x39a61f(0x15d)](_0x55577f);}else _0x3c94d6[_0x39a61f(0x1d0)](_0x51860d,{'indices':[_0x22de0a],'versions':new Set(_0x55577f?[_0x55577f]:[])});}const _0x3969da=new Set();for(const {indices:_0x95531d,versions:_0x4c1673}of _0x3c94d6[_0x39a61f(0x1ae)]()){if(_0x4c1673[_0x39a61f(0x164)]<=0x1)continue;const _0x5a6e96=_0x37e05c[_0x95531d[0x0]];_0x5a6e96['path']=_0x5a6e96[_0x39a61f(0x1a5)][_0x39a61f(0x172)](/^journeys\[\d+\]\./,''),_0x5a6e96[_0x39a61f(0x1ab)]=_0x5a6e96[_0x39a61f(0x1ab)]+_0x39a61f(0x15b)+_0x4c1673[_0x39a61f(0x164)]+_0x39a61f(0x1a8);for(let _0x5297c0=0x1;_0x5297c0<_0x95531d[_0x39a61f(0x18a)];_0x5297c0++){_0x3969da[_0x39a61f(0x15d)](_0x95531d[_0x5297c0]);}}const _0x4b0f33=[..._0x3969da]['sort']((_0x59683b,_0x5313ea)=>_0x5313ea-_0x59683b);for(const _0xa8787a of _0x4b0f33){_0x37e05c[_0x39a61f(0x137)](_0xa8787a,0x1);}}export function validateJourneyDef(_0x45e56b,_0x359300={},_0x3eb86c={}){const _0x224d44=a130_0xb84a;if(_0x3eb86c['skipSchema'])return runJourneySemanticChecks(_0x45e56b,_0x359300);const _0x1f93f=JourneyDefSchema[_0x224d44(0x192)](_0x45e56b);if(_0x1f93f[_0x224d44(0x1e2)])return runJourneySemanticChecks(_0x1f93f[_0x224d44(0x1d3)],_0x359300);return zodErrorsToJourneyValidationResult(_0x1f93f[_0x224d44(0x19f)],_0x359300);}function zodErrorsToJourneyValidationResult(_0x21c9bb,_0x5776fa){const _0x253ed8=a130_0xb84a,_0x3141db=flattenZodIssues(_0x21c9bb[_0x253ed8(0x1d5)]),_0x3553a0=_0x3141db['map'](_0x18bfda=>{const _0x435296=_0x253ed8,_0x49432b=formatZodPath(_0x18bfda[_0x435296(0x1a5)]),_0x293ce1=mapJourneyZodIssueToCode(_0x18bfda,_0x49432b),_0xe21ab8=getLocationFromPath(_0x5776fa[_0x435296(0x1c2)],_0x5776fa[_0x435296(0x15c)],_0x18bfda[_0x435296(0x1a5)][_0x435296(0x175)](_0x486119=>typeof _0x486119===_0x435296(0x14f)?String(_0x486119):_0x486119));return{'level':_0x435296(0x19f),'path':_0x49432b,'code':_0x293ce1,'message':_0x18bfda[_0x435296(0x1ab)],..._0xe21ab8&&{'location':_0xe21ab8}};});return{'valid':![],'errors':_0x3553a0,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2e8498,_0x205412){const _0x260877=a130_0xb84a;if(_0x205412===_0x260877(0x1c7))return _0x260877(0x1e1);if(_0x205412['endsWith'](_0x260877(0x1cc))&&_0x205412['includes'](_0x260877(0x18b)))return'JOURNEY_SCHEMA_ERROR';if(_0x205412===_0x260877(0x168)||_0x205412[_0x260877(0x173)]('.stages'))return _0x260877(0x1c3);if(_0x205412===''&&_0x2e8498[_0x260877(0x1ab)]['includes'](_0x260877(0x1c8)))return _0x260877(0x1c3);if(_0x205412[_0x260877(0x187)]('activation'))return _0x260877(0x189);return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x522c2a,_0x2d85ad){const _0x15cb95=a130_0xb84a,_0x34f704=[],_0x5628d9=[];(!_0x522c2a[_0x15cb95(0x1c7)]||_0x522c2a[_0x15cb95(0x1c7)][_0x15cb95(0x13c)]()==='')&&_0x34f704[_0x15cb95(0x17d)]({'level':_0x15cb95(0x19f),'path':_0x15cb95(0x1c7),'code':'MISSING_NAME','message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x2d85ad['document'],_0x2d85ad[_0x15cb95(0x15c)],[_0x15cb95(0x1c7)])});const _0x44e584=new Set();if(_0x522c2a[_0x15cb95(0x16f)])for(const _0x28f245 of Object[_0x15cb95(0x135)](_0x522c2a[_0x15cb95(0x16f)])){_0x44e584['add'](_0x28f245);}const _0x1650f6=new Set();if(_0x522c2a[_0x15cb95(0x1c1)])for(const _0x4ab086 of Object['keys'](_0x522c2a['activations'])){_0x1650f6[_0x15cb95(0x15d)](_0x4ab086);}const _0x3c5fcf=new Set(),_0x2a31ec={..._0x2d85ad,'embeddedSegments':_0x44e584,'referencedSegments':_0x3c5fcf,'activationKeys':_0x1650f6[_0x15cb95(0x164)]>0x0?_0x1650f6:undefined};if(_0x522c2a[_0x15cb95(0x16f)])for(const [_0x14bfc2,_0x531d53]of Object[_0x15cb95(0x158)](_0x522c2a[_0x15cb95(0x16f)])){const _0x5b543e=validateEmbeddedSegment(_0x531d53,_0x15cb95(0x148)+_0x14bfc2,_0x2a31ec);for(const _0x180a27 of _0x5b543e){if(_0x180a27[_0x15cb95(0x1b8)]==='error')_0x34f704[_0x15cb95(0x17d)](_0x180a27);else _0x5628d9['push'](_0x180a27);}}const _0x712569=!!_0x522c2a['goal'],_0x421881=_0x522c2a[_0x15cb95(0x1a6)]?.[_0x15cb95(0x199)](_0x1a67e0=>!!_0x1a67e0[_0x15cb95(0x1bf)])??![];!_0x712569&&!_0x421881&&_0x5628d9['push']({'level':_0x15cb95(0x1c0),'path':_0x15cb95(0x1bf),'code':'MISSING_GOAL','message':_0x15cb95(0x147),'location':getLocationFromPath(_0x2d85ad[_0x15cb95(0x1c2)],_0x2d85ad[_0x15cb95(0x15c)],[_0x15cb95(0x1bf)])});const _0x22419b=_0x522c2a['journeys']??_0x522c2a[_0x15cb95(0x12f)];if(_0x22419b&&_0x22419b[_0x15cb95(0x174)](_0x21359f=>_0x21359f[_0x15cb95(0x1ba)]===!![])[_0x15cb95(0x18a)]>0x1){const _0x50476f=_0x522c2a[_0x15cb95(0x1a6)]?'journeys':_0x15cb95(0x12f);_0x34f704[_0x15cb95(0x17d)]({'level':_0x15cb95(0x19f),'path':_0x50476f,'code':_0x15cb95(0x1b6),'message':_0x15cb95(0x194)+(_0x50476f==='journeys'?_0x15cb95(0x195):_0x15cb95(0x152))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x2d85ad['document'],_0x2d85ad[_0x15cb95(0x15c)],[_0x50476f])});}if(_0x522c2a[_0x15cb95(0x1a6)]&&_0x522c2a[_0x15cb95(0x1a6)][_0x15cb95(0x18a)]>0x0)for(let _0x5bf92d=0x0;_0x5bf92d<_0x522c2a[_0x15cb95(0x1a6)][_0x15cb95(0x18a)];_0x5bf92d++){const _0x453c28=_0x522c2a['journeys'][_0x5bf92d];if(_0x522c2a[_0x15cb95(0x1a6)][_0x15cb95(0x18a)]>0x1&&_0x453c28[_0x15cb95(0x1cb)]==='launched')continue;const _0x3ca4ab=_0x453c28['stages']||[],_0x1a5531='journeys['+_0x5bf92d+'].',_0x49df3=!!_0x453c28['goal'],_0x248378=_0x49df3?{..._0x522c2a,'goal':_0x453c28[_0x15cb95(0x1bf)]}:_0x522c2a;validateStagesForVersion(_0x3ca4ab,_0x248378,_0x2a31ec,_0x1a5531,_0x34f704,_0x5628d9,{'goalIsInherited':!_0x49df3});}else{if(_0x522c2a[_0x15cb95(0x12f)]&&_0x522c2a[_0x15cb95(0x12f)][_0x15cb95(0x18a)]>0x0)for(let _0x3a979a=0x0;_0x3a979a<_0x522c2a[_0x15cb95(0x12f)][_0x15cb95(0x18a)];_0x3a979a++){const _0x5dbeae=_0x522c2a['versions'][_0x3a979a];if(_0x522c2a[_0x15cb95(0x12f)][_0x15cb95(0x18a)]>0x1&&_0x5dbeae['state']===_0x15cb95(0x12d))continue;const _0x4375e8=_0x5dbeae[_0x15cb95(0x168)]||[],_0x40fe17=_0x15cb95(0x1ce)+_0x3a979a+'].';validateStagesForVersion(_0x4375e8,_0x522c2a,_0x2a31ec,_0x40fe17,_0x34f704,_0x5628d9);}else{const _0x21d193=_0x522c2a[_0x15cb95(0x168)]||[];validateStagesForVersion(_0x21d193,_0x522c2a,_0x2a31ec,'',_0x34f704,_0x5628d9);}}_0x522c2a[_0x15cb95(0x1a6)]&&_0x522c2a[_0x15cb95(0x1a6)][_0x15cb95(0x18a)]>0x1&&(deduplicateAcrossVersions(_0x34f704),deduplicateAcrossVersions(_0x5628d9));for(const _0x4b3cb8 of _0x44e584){!_0x3c5fcf['has'](_0x4b3cb8)&&!_0x4b3cb8[_0x15cb95(0x167)]('excluded_')&&_0x5628d9[_0x15cb95(0x17d)]({'level':'warning','path':'segments.'+_0x4b3cb8,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x15cb95(0x179)+_0x4b3cb8+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x2d85ad[_0x15cb95(0x1c2)],_0x2d85ad['source'],[_0x15cb95(0x16f),_0x4b3cb8])});}return{'valid':_0x34f704[_0x15cb95(0x18a)]===0x0,'errors':_0x34f704,'warnings':_0x5628d9};}
|
|
1
|
+
(function(_0x45b551,_0x76ce31){const _0x4a577a=a130_0x56c6,_0x3ae880=_0x45b551();while(!![]){try{const _0xf3ce9a=parseInt(_0x4a577a(0x224))/0x1*(-parseInt(_0x4a577a(0x22b))/0x2)+-parseInt(_0x4a577a(0x233))/0x3*(-parseInt(_0x4a577a(0x261))/0x4)+parseInt(_0x4a577a(0x256))/0x5*(parseInt(_0x4a577a(0x205))/0x6)+-parseInt(_0x4a577a(0x215))/0x7*(parseInt(_0x4a577a(0x1d1))/0x8)+-parseInt(_0x4a577a(0x1f6))/0x9+parseInt(_0x4a577a(0x1be))/0xa*(parseInt(_0x4a577a(0x265))/0xb)+-parseInt(_0x4a577a(0x1f8))/0xc;if(_0xf3ce9a===_0x76ce31)break;else _0x3ae880['push'](_0x3ae880['shift']());}catch(_0xba3898){_0x3ae880['push'](_0x3ae880['shift']());}}}(a130_0x4b67,0x73b33));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';function a130_0x4b67(){const _0x5e076f=['\x27\x20(from:\x20','JOURNEY_SCHEMA_ERROR','Journey\x20can\x20have\x20at\x20most\x20one\x20','MISSING_GOAL','merge','.steps','6671JlrpbN','startsWith','.with.condition.timeout','error','\x20steps\x20(may\x20be\x20too\x20simple)','journeys','MISSING_ENTRY_CRITERIA','type','activations','some','Decision\x20branch\x20\x27','INVALID_NEXT_REFERENCE','MISSING_EXIT_CRITERIA','values','stages[','14081Zhgndv','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','milestone','.with.variants','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','.exit_criteria[','Journey\x20name\x20is\x20required','14jdunuC','Embedded\x20segment\x20\x27','abs','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','.with','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','5151rLDpZH','every','goal','.with.condition.segment','INSUFFICIENT_STEPS','MISSING_MILESTONE','safeParse','excluded','MISSING_SEGMENT_REFERENCE','length','MISSING_ACTIVATION_REF','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','segment','.next','SINGLE_INPUT_MERGE','source','wait','.with.branches[','version','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.condition.next','.steps[','segments','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','symbol','ACTIVATION_SCHEMA_ERROR','ref:','decision_point','journeys,\x20stages,\x20or\x20versions','embeddedSegments','jump','code','data','includes','7615wBTrvD','steps','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','MISSING_STAGES','reduce','segments.','.entry_criteria','INVALID_JUMP_TARGET','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','entries','activationKeys','1512qBuNdK','.with.target','\x20with\x20latest:\x20true','.with.condition.timeout.next','3212ZGzBoK','Step\x20references\x20non-existent\x20step\x20\x27','replace','warning',').\x20Merge\x20is\x20unnecessary.','\x27\x20has\x20only\x20','INVALID_AB_TEST_PERCENTAGES','get','UNUSED_EMBEDDED_SEGMENT','journey\x20entry','Stage\x20\x27','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.exit_criteria','ab_test','\x27\x20(first\x20defined\x20at\x20steps[','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','.milestone','.rule','stepNames','23750zLBdjz','goalIsInherited','match','MERGE_TO_MERGE_CHAIN','\x27\x20with\x20no\x20action\x20in\x20between','stages','A/B\x20test\x20variant\x20\x27',').\x20Use\x20a\x20merge\x20step.','target','Criteria\x20references\x20undefined\x20segment\x20\x27','END_STEP_HAS_NEXT_OR_WITH','skipSchema','level','has','rule','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','excluded_','.with.branches','success','616BNxZmx','variants','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x20versions)','description','sort','MISSING_NAME','exit_criteria','Journey\x20has\x20','DUPLICATE_STEP_NAME','name','\x20stages\x20but\x20maximum\x20is\x20','state','Activation\x20step\x20requires\x20an\x20activation\x20reference','.type','Duplicate\x20step\x20name\x20\x27','versions','timeout\x20of\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','launched','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','size','versions[','keys','.segment','add','.with.activation','map','CONVERGENCE_WITHOUT_MERGE','referencedSegments','step\x20\x27','endsWith','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','with','percentage','path','\x27\x20has\x20no\x20end\x20step','7016670ayjBgG','Merge\x20step\x20\x27','2604864RnTjiV','MISSING_CONDITIONS','\x27\x20of\x20\x27','branches','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','condition\x20of\x20\x27','latest','message','trim','push','\x27\x20has\x20no\x20exit_criteria\x20defined','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','activation','1182hEbGcB','condition','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','timeout','document','set','entry_criteria','FEW_STEPS','next','DUPLICATE_LATEST'];a130_0x4b67=function(){return _0x5e076f;};return a130_0x4b67();}const MAX_STAGES=0x8;function createIssue(_0x1b3e05,_0x411a25,_0x10a46f,_0x1476eb,_0x297bc3,_0x27d7c6){const _0x4bf769=a130_0x56c6;return{'level':_0x1b3e05,'path':_0x411a25,'code':_0x10a46f,'message':_0x1476eb,'location':getLocationFromPath(_0x297bc3[_0x4bf769(0x209)],_0x297bc3[_0x4bf769(0x242)],pathToArray(_0x27d7c6??_0x411a25))};}function validateVersionStructure(_0x275c81,_0x26deab){const _0x1d9118=a130_0x56c6,_0x195cf3=[];return _0x275c81[_0x1d9118(0x23c)]>MAX_STAGES&&_0x195cf3[_0x1d9118(0x201)](createIssue(_0x1d9118(0x218),_0x1d9118(0x1c3),'TOO_MANY_STAGES',_0x1d9118(0x1d9)+_0x275c81[_0x1d9118(0x23c)]+_0x1d9118(0x1dc)+MAX_STAGES,_0x26deab)),_0x195cf3;}function validateStageStructure(_0x5c1a62,_0x5dfec6,_0x26e5d9,_0x307651){const _0x2b0527=a130_0x56c6,_0xd6cd8f=[],_0x38ef20=_0x2b0527(0x223)+_0x5dfec6+']';_0x5dfec6===0x0&&!_0x5c1a62[_0x2b0527(0x20b)]&&_0xd6cd8f['push'](createIssue(_0x2b0527(0x218),_0x38ef20+_0x2b0527(0x25c),_0x2b0527(0x21b),_0x2b0527(0x1b5)+_0x5c1a62[_0x2b0527(0x1db)]+_0x2b0527(0x230),_0x307651,_0x38ef20));const _0x1791b2=_0x5dfec6===_0x26e5d9-0x1;!_0x1791b2&&!_0x5c1a62[_0x2b0527(0x226)]&&_0xd6cd8f[_0x2b0527(0x201)](createIssue(_0x2b0527(0x218),_0x38ef20+_0x2b0527(0x1bb),_0x2b0527(0x238),_0x2b0527(0x1b5)+_0x5c1a62[_0x2b0527(0x1db)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x307651,_0x38ef20));(!_0x5c1a62['exit_criteria']||_0x5c1a62[_0x2b0527(0x1d8)][_0x2b0527(0x23c)]===0x0)&&_0xd6cd8f['push'](createIssue('warning',_0x38ef20+_0x2b0527(0x1b7),_0x2b0527(0x221),'Stage\x20\x27'+_0x5c1a62[_0x2b0527(0x1db)]+_0x2b0527(0x202),_0x307651,_0x38ef20));const _0x3435e9=_0x5c1a62[_0x2b0527(0x257)]?.[_0x2b0527(0x23c)]??0x0;if(_0x3435e9===0x0)_0xd6cd8f[_0x2b0527(0x201)](createIssue('error',_0x38ef20+'.steps',_0x2b0527(0x237),_0x2b0527(0x1b5)+_0x5c1a62[_0x2b0527(0x1db)]+'\x27\x20has\x20no\x20steps',_0x307651,_0x38ef20+'.steps'));else{if(_0x3435e9===0x1)_0xd6cd8f[_0x2b0527(0x201)](createIssue('warning',_0x38ef20+'.steps','INSUFFICIENT_STEPS','Stage\x20\x27'+_0x5c1a62[_0x2b0527(0x1db)]+_0x2b0527(0x246),_0x307651,_0x38ef20+_0x2b0527(0x214)));else _0x3435e9<=0x3&&_0xd6cd8f[_0x2b0527(0x201)](createIssue(_0x2b0527(0x268),_0x38ef20+_0x2b0527(0x214),_0x2b0527(0x20c),_0x2b0527(0x1b5)+_0x5c1a62['name']+_0x2b0527(0x1b0)+_0x3435e9+_0x2b0527(0x219),_0x307651,_0x38ef20+_0x2b0527(0x214)));}return _0xd6cd8f;}function validateStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69){const _0x505a15=a130_0x56c6,_0x300a77=[];if(_0x32faf1[_0x505a15(0x21c)]==='end')return _0x32faf1[_0x505a15(0x20d)]&&_0x300a77[_0x505a15(0x201)](createIssue('error',_0x51d4c0+_0x505a15(0x240),_0x505a15(0x1c8),'End\x20step\x20\x27'+_0x32faf1[_0x505a15(0x1db)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x44ce4a)),_0x505a15(0x1f2)in _0x32faf1&&_0x32faf1[_0x505a15(0x1f2)]!==undefined&&_0x300a77['push'](createIssue(_0x505a15(0x218),_0x51d4c0+_0x505a15(0x22f),_0x505a15(0x1c8),'End\x20step\x20\x27'+_0x32faf1[_0x505a15(0x1db)]+_0x505a15(0x1f1),_0x44ce4a)),_0x300a77;_0x32faf1[_0x505a15(0x20d)]&&(_0x44ce4a[_0x505a15(0x1bd)]&&!_0x44ce4a[_0x505a15(0x1bd)][_0x505a15(0x1cb)](_0x32faf1['next'])&&_0x300a77[_0x505a15(0x201)](createIssue('error',_0x51d4c0+_0x505a15(0x240),'INVALID_NEXT_REFERENCE',_0x505a15(0x266)+_0x32faf1[_0x505a15(0x20d)]+'\x27',_0x44ce4a)));switch(_0x32faf1[_0x505a15(0x21c)]){case _0x505a15(0x243):_0x300a77['push'](...validateWaitStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69));break;case _0x505a15(0x204):_0x300a77['push'](...validateActivationStep(_0x32faf1,_0x51d4c0,_0x44ce4a));break;case _0x505a15(0x24f):_0x300a77['push'](...validateDecisionPointStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69));break;case'ab_test':_0x300a77[_0x505a15(0x201)](...validateAbTestStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69));break;case _0x505a15(0x252):_0x300a77[_0x505a15(0x201)](...validateJumpStep(_0x32faf1,_0x51d4c0,_0x44ce4a));break;}return _0x300a77;}function validateWaitStep(_0xf709a3,_0x58e382,_0x557242,_0x534bdd){const _0x5ce678=a130_0x56c6,_0x51cb67=[];if(!_0xf709a3[_0x5ce678(0x1f2)])return _0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x218),_0x58e382+'.with','MISSING_WAIT_PARAMS',_0x5ce678(0x1cd),_0x557242,_0x58e382)),_0x51cb67;if(_0xf709a3['with']['condition']){const _0x55fef7=_0xf709a3[_0x5ce678(0x1f2)][_0x5ce678(0x206)];if(_0x55fef7['segment']){_0x557242[_0x5ce678(0x1ee)]?.[_0x5ce678(0x1ea)](_0x55fef7[_0x5ce678(0x23f)]);!_0x55fef7['segment']['startsWith']('ref:')&&(_0x557242[_0x5ce678(0x251)]&&!_0x557242[_0x5ce678(0x251)][_0x5ce678(0x1cb)](_0x55fef7[_0x5ce678(0x23f)])&&_0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x218),_0x58e382+_0x5ce678(0x236),_0x5ce678(0x23b),_0x5ce678(0x1d3)+_0x55fef7[_0x5ce678(0x23f)]+_0x5ce678(0x258),_0x557242)));_0x55fef7['next']&&_0x557242[_0x5ce678(0x1bd)]&&!_0x557242[_0x5ce678(0x1bd)]['has'](_0x55fef7['next'])&&_0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x218),_0x58e382+_0x5ce678(0x248),_0x5ce678(0x220),_0x5ce678(0x232)+_0x55fef7[_0x5ce678(0x20d)]+'\x27',_0x557242));_0x55fef7[_0x5ce678(0x208)]?.['next']&&_0x557242[_0x5ce678(0x1bd)]&&!_0x557242[_0x5ce678(0x1bd)]['has'](_0x55fef7['timeout']['next'])&&_0x51cb67[_0x5ce678(0x201)](createIssue('error',_0x58e382+_0x5ce678(0x264),_0x5ce678(0x220),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x55fef7['timeout']['next']+'\x27',_0x557242));const _0x2a3273=_0x55fef7[_0x5ce678(0x20d)]||_0xf709a3[_0x5ce678(0x20d)],_0x41cca5=_0x55fef7[_0x5ce678(0x208)]?.[_0x5ce678(0x20d)]||_0xf709a3['next'];if(_0x2a3273){const _0x5d2cbc=_0x534bdd[_0x5ce678(0x1b2)](_0x2a3273);_0x5d2cbc?.[_0x5ce678(0x21c)]===_0x5ce678(0x213)&&_0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x268),_0x58e382+_0x5ce678(0x248),'BRANCH_DIRECTLY_TO_MERGE',_0x5ce678(0x247)+_0x2a3273+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x557242,_0x58e382+'.with.condition'));}if(_0x41cca5){const _0x306f56=_0x534bdd[_0x5ce678(0x1b2)](_0x41cca5);_0x306f56?.[_0x5ce678(0x21c)]===_0x5ce678(0x213)&&_0x51cb67['push'](createIssue(_0x5ce678(0x268),_0x58e382+'.with.condition.timeout.next',_0x5ce678(0x231),_0x5ce678(0x1b6)+_0x41cca5+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x557242,_0x58e382+_0x5ce678(0x217)));}}}return _0x51cb67;}function validateActivationStep(_0x491187,_0xbd4f4a,_0x4926dd){const _0x4678ba=a130_0x56c6,_0xf2180b=[];if(!_0x491187[_0x4678ba(0x1f2)]?.[_0x4678ba(0x204)])return _0xf2180b[_0x4678ba(0x201)](createIssue(_0x4678ba(0x218),_0xbd4f4a+_0x4678ba(0x1eb),_0x4678ba(0x23d),_0x4678ba(0x1de),_0x4926dd,_0xbd4f4a)),_0xf2180b;const _0x5b9162=_0x491187['with'][_0x4678ba(0x204)];return _0x4926dd[_0x4678ba(0x260)]&&!_0x5b9162[_0x4678ba(0x216)]('ref:')&&(!_0x4926dd['activationKeys'][_0x4678ba(0x1cb)](_0x5b9162)&&_0xf2180b[_0x4678ba(0x201)](createIssue(_0x4678ba(0x218),_0xbd4f4a+_0x4678ba(0x1eb),'MISSING_ACTIVATION_DEFINITION',_0x4678ba(0x203)+_0x5b9162+_0x4678ba(0x25e),_0x4926dd))),_0xf2180b;}function validateDecisionPointStep(_0x591cb1,_0x3b7a04,_0x3ff811,_0x2ed8db){const _0x4414e7=a130_0x56c6,_0x531f4e=[];if(!_0x591cb1[_0x4414e7(0x1f2)]?.[_0x4414e7(0x1fb)]||_0x591cb1[_0x4414e7(0x1f2)][_0x4414e7(0x1fb)][_0x4414e7(0x23c)]===0x0)return _0x531f4e[_0x4414e7(0x201)](createIssue(_0x4414e7(0x218),_0x3b7a04+_0x4414e7(0x1cf),'MISSING_CONDITIONS',_0x4414e7(0x207),_0x3ff811,_0x3b7a04)),_0x531f4e;for(let _0x4c6cf6=0x0;_0x4c6cf6<_0x591cb1['with'][_0x4414e7(0x1fb)]['length'];_0x4c6cf6++){const _0x1b3011=_0x591cb1[_0x4414e7(0x1f2)][_0x4414e7(0x1fb)][_0x4c6cf6],_0xa7bff5=_0x3b7a04+_0x4414e7(0x244)+_0x4c6cf6+']';_0x1b3011[_0x4414e7(0x23f)]&&!_0x1b3011[_0x4414e7(0x23a)]&&(_0x3ff811[_0x4414e7(0x1ee)]?.[_0x4414e7(0x1ea)](_0x1b3011['segment']),!_0x1b3011['segment']['startsWith'](_0x4414e7(0x24e))&&(_0x3ff811[_0x4414e7(0x251)]&&!_0x3ff811['embeddedSegments'][_0x4414e7(0x1cb)](_0x1b3011[_0x4414e7(0x23f)])&&_0x531f4e['push'](createIssue('error',_0xa7bff5+'.segment','MISSING_SEGMENT_REFERENCE',_0x4414e7(0x1ba)+_0x1b3011[_0x4414e7(0x23f)]+'\x27',_0x3ff811))));_0x1b3011['next']&&_0x3ff811[_0x4414e7(0x1bd)]&&!_0x3ff811[_0x4414e7(0x1bd)][_0x4414e7(0x1cb)](_0x1b3011[_0x4414e7(0x20d)])&&_0x531f4e[_0x4414e7(0x201)](createIssue('error',_0xa7bff5+_0x4414e7(0x240),_0x4414e7(0x220),_0x4414e7(0x22e)+_0x1b3011[_0x4414e7(0x20d)]+'\x27',_0x3ff811));if(_0x1b3011[_0x4414e7(0x20d)]){const _0x381d23=_0x2ed8db[_0x4414e7(0x1b2)](_0x1b3011['next']);_0x381d23?.['type']===_0x4414e7(0x213)&&_0x531f4e['push'](createIssue(_0x4414e7(0x268),_0xa7bff5+'.next',_0x4414e7(0x231),_0x4414e7(0x21f)+_0x1b3011[_0x4414e7(0x1db)]+_0x4414e7(0x1e3)+_0x1b3011['next']+_0x4414e7(0x1c2),_0x3ff811));}}return _0x531f4e;}function validateAbTestStep(_0x3affd4,_0xcd5d3d,_0x5ac78e,_0x1302a1){const _0x90b0e2=a130_0x56c6,_0x27000c=[];if(!_0x3affd4[_0x90b0e2(0x1f2)]?.[_0x90b0e2(0x1d2)]||_0x3affd4[_0x90b0e2(0x1f2)][_0x90b0e2(0x1d2)][_0x90b0e2(0x23c)]===0x0)return _0x27000c[_0x90b0e2(0x201)](createIssue(_0x90b0e2(0x218),_0xcd5d3d+_0x90b0e2(0x227),_0x90b0e2(0x1f9),_0x90b0e2(0x225),_0x5ac78e,_0xcd5d3d)),_0x27000c;const _0xcf8087=_0x3affd4[_0x90b0e2(0x1f2)][_0x90b0e2(0x1d2)][_0x90b0e2(0x25a)]((_0x1b9246,_0x1c8f2a)=>_0x1b9246+(_0x1c8f2a[_0x90b0e2(0x1f3)]||0x0),0x0);Math[_0x90b0e2(0x22d)](_0xcf8087-0x64)>0.01&&_0x27000c[_0x90b0e2(0x201)](createIssue('error',_0xcd5d3d+_0x90b0e2(0x227),_0x90b0e2(0x1b1),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0xcf8087+'%)',_0x5ac78e));for(let _0x136095=0x0;_0x136095<_0x3affd4[_0x90b0e2(0x1f2)]['variants'][_0x90b0e2(0x23c)];_0x136095++){const _0x5689f0=_0x3affd4[_0x90b0e2(0x1f2)][_0x90b0e2(0x1d2)][_0x136095],_0x1f8323=_0xcd5d3d+'.with.variants['+_0x136095+']';_0x5689f0['next']&&_0x5ac78e[_0x90b0e2(0x1bd)]&&!_0x5ac78e[_0x90b0e2(0x1bd)][_0x90b0e2(0x1cb)](_0x5689f0[_0x90b0e2(0x20d)])&&_0x27000c[_0x90b0e2(0x201)](createIssue(_0x90b0e2(0x218),_0x1f8323+_0x90b0e2(0x240),_0x90b0e2(0x220),_0x90b0e2(0x1fc)+_0x5689f0[_0x90b0e2(0x20d)]+'\x27',_0x5ac78e));if(_0x5689f0[_0x90b0e2(0x20d)]){const _0xc6f564=_0x1302a1[_0x90b0e2(0x1b2)](_0x5689f0[_0x90b0e2(0x20d)]);_0xc6f564?.['type']==='merge'&&_0x27000c[_0x90b0e2(0x201)](createIssue('warning',_0x1f8323+_0x90b0e2(0x240),_0x90b0e2(0x231),_0x90b0e2(0x1c4)+_0x5689f0[_0x90b0e2(0x1db)]+_0x90b0e2(0x1e3)+_0x5689f0[_0x90b0e2(0x20d)]+_0x90b0e2(0x1c2),_0x5ac78e));}}return _0x27000c;}function validateJumpStep(_0x2d5b88,_0xb50163,_0x608c55){const _0x24825b=a130_0x56c6,_0x1c8cb8=[];if(!_0x2d5b88[_0x24825b(0x1f2)]?.[_0x24825b(0x1c6)])return _0x1c8cb8[_0x24825b(0x201)](createIssue(_0x24825b(0x218),_0xb50163+_0x24825b(0x262),_0x24825b(0x25d),'Jump\x20step\x20requires\x20a\x20target',_0x608c55,_0xb50163)),_0x1c8cb8;return(!_0x2d5b88[_0x24825b(0x1f2)][_0x24825b(0x1c6)]['journey']||!_0x2d5b88[_0x24825b(0x1f2)][_0x24825b(0x1c6)]['stage'])&&_0x1c8cb8[_0x24825b(0x201)](createIssue('error',_0xb50163+_0x24825b(0x262),_0x24825b(0x25d),_0x24825b(0x1e5),_0x608c55)),_0x1c8cb8;}function buildConvergenceMap(_0x5eda47){const _0x22a4a0=a130_0x56c6,_0x2a6165=new Map();function _0x57ca0c(_0x5265bb,_0x1dadcd){const _0x452f39=a130_0x56c6,_0x79a1c8=_0x2a6165[_0x452f39(0x1b2)](_0x5265bb)||[];_0x79a1c8[_0x452f39(0x201)](_0x1dadcd),_0x2a6165[_0x452f39(0x20a)](_0x5265bb,_0x79a1c8);}for(const _0x75698a of _0x5eda47){_0x75698a['next']&&_0x57ca0c(_0x75698a[_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':_0x22a4a0(0x1ef)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'});if(_0x75698a[_0x22a4a0(0x21c)]===_0x22a4a0(0x24f)&&_0x75698a[_0x22a4a0(0x1f2)]?.[_0x22a4a0(0x1fb)])for(const _0x5dbad1 of _0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x1fb)]){_0x5dbad1['next']&&_0x57ca0c(_0x5dbad1[_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':'branch\x20\x27'+_0x5dbad1[_0x22a4a0(0x1db)]+_0x22a4a0(0x1fa)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'});}if(_0x75698a['type']===_0x22a4a0(0x1b8)&&_0x75698a[_0x22a4a0(0x1f2)]?.['variants'])for(const _0x15a779 of _0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x1d2)]){_0x15a779[_0x22a4a0(0x20d)]&&_0x57ca0c(_0x15a779[_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':'variant\x20\x27'+_0x15a779[_0x22a4a0(0x1db)]+_0x22a4a0(0x1fa)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'});}_0x75698a['type']===_0x22a4a0(0x243)&&_0x75698a['with']?.[_0x22a4a0(0x206)]&&(_0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x206)][_0x22a4a0(0x20d)]&&_0x57ca0c(_0x75698a['with']['condition'][_0x22a4a0(0x20d)],{'stepName':_0x75698a['name'],'description':_0x22a4a0(0x1fd)+_0x75698a['name']+'\x27'}),_0x75698a['with'][_0x22a4a0(0x206)]['timeout']?.[_0x22a4a0(0x20d)]&&_0x57ca0c(_0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x206)][_0x22a4a0(0x208)][_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':_0x22a4a0(0x1e2)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'}));}return _0x2a6165;}function validateFlowControl(_0x7b65e3,_0x25da8b,_0x318b75){const _0x2de7e5=a130_0x56c6,_0x26e86a=[],_0x7e97b7=_0x2de7e5(0x223)+_0x25da8b+']',_0x5a1db6=_0x7b65e3[_0x2de7e5(0x257)]||[];if(_0x5a1db6[_0x2de7e5(0x23c)]===0x0)return _0x26e86a;const _0x4a4fff=new Map();for(const _0x2464eb of _0x5a1db6){_0x2464eb[_0x2de7e5(0x1db)]&&_0x4a4fff['set'](_0x2464eb[_0x2de7e5(0x1db)],_0x2464eb);}const _0x32de3c=buildConvergenceMap(_0x5a1db6),_0x19da62=_0x5a1db6[_0x2de7e5(0x21e)](_0x51b163=>_0x51b163[_0x2de7e5(0x21c)]==='end');!_0x19da62&&_0x26e86a[_0x2de7e5(0x201)](createIssue(_0x2de7e5(0x218),_0x7e97b7+'.steps','MISSING_END_STEP','Stage\x20\x27'+_0x7b65e3[_0x2de7e5(0x1db)]+_0x2de7e5(0x1f5),_0x318b75));for(const [_0x40e96f,_0x49b160]of _0x32de3c){const _0x3d6bb1=_0x4a4fff[_0x2de7e5(0x1b2)](_0x40e96f);if(!_0x3d6bb1)continue;if(_0x49b160[_0x2de7e5(0x23c)]>0x1&&_0x3d6bb1[_0x2de7e5(0x21c)]!==_0x2de7e5(0x213)){const _0x11dce4=_0x49b160[_0x2de7e5(0x1ec)](_0x5887c5=>_0x5887c5[_0x2de7e5(0x1d5)])['join'](',\x20');_0x26e86a['push'](createIssue(_0x2de7e5(0x218),_0x7e97b7+_0x2de7e5(0x214),_0x2de7e5(0x1ed),_0x2de7e5(0x23e)+_0x40e96f+_0x2de7e5(0x20f)+_0x11dce4+_0x2de7e5(0x1c5),_0x318b75));}_0x49b160[_0x2de7e5(0x23c)]===0x1&&_0x3d6bb1[_0x2de7e5(0x21c)]===_0x2de7e5(0x213)&&_0x26e86a['push'](createIssue(_0x2de7e5(0x268),_0x7e97b7+_0x2de7e5(0x214),_0x2de7e5(0x241),_0x2de7e5(0x1f7)+_0x40e96f+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x49b160[0x0][_0x2de7e5(0x1d5)]+_0x2de7e5(0x269),_0x318b75));}for(const _0x4a7ca4 of _0x5a1db6){if(_0x4a7ca4['type']===_0x2de7e5(0x213)&&_0x4a7ca4[_0x2de7e5(0x20d)]){const _0x1abe97=_0x4a4fff[_0x2de7e5(0x1b2)](_0x4a7ca4[_0x2de7e5(0x20d)]);_0x1abe97?.[_0x2de7e5(0x21c)]===_0x2de7e5(0x213)&&_0x26e86a[_0x2de7e5(0x201)](createIssue(_0x2de7e5(0x218),_0x7e97b7+_0x2de7e5(0x214),_0x2de7e5(0x1c1),_0x2de7e5(0x1f7)+_0x4a7ca4['name']+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x4a7ca4['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x318b75));}}return _0x26e86a;}function validateCriteria(_0x1a32da,_0x27b89e,_0x1ebb45){const _0x4c4cd7=a130_0x56c6,_0x1c4ed7=[];return _0x1a32da[_0x4c4cd7(0x23f)]&&(_0x1ebb45[_0x4c4cd7(0x1ee)]?.[_0x4c4cd7(0x1ea)](_0x1a32da['segment']),!_0x1a32da[_0x4c4cd7(0x23f)][_0x4c4cd7(0x216)](_0x4c4cd7(0x24e))&&(_0x1ebb45[_0x4c4cd7(0x251)]&&!_0x1ebb45[_0x4c4cd7(0x251)][_0x4c4cd7(0x1cb)](_0x1a32da[_0x4c4cd7(0x23f)])&&_0x1c4ed7['push'](createIssue(_0x4c4cd7(0x218),_0x27b89e+_0x4c4cd7(0x1e9),'MISSING_SEGMENT_REFERENCE',_0x4c4cd7(0x1c7)+_0x1a32da['segment']+'\x27',_0x1ebb45)))),_0x1c4ed7;}function validateEmbeddedSegment(_0x40d1da,_0x11c7e6,_0x42ea26){const _0x13850e=a130_0x56c6,_0x39f53f=[];return _0x40d1da[_0x13850e(0x1cc)]&&_0x39f53f[_0x13850e(0x201)](...validateRuleDef(_0x40d1da[_0x13850e(0x1cc)],_0x11c7e6+_0x13850e(0x1bc),_0x42ea26)),_0x39f53f;}function validateStage(_0x92fe98,_0x5992a3,_0x447f3c,_0x163b89){const _0x54eb8d=a130_0x56c6,_0x320663=[],_0x202da8=_0x54eb8d(0x223)+_0x5992a3+']',_0x40ee53=new Map(),_0x414221=new Map();if(_0x92fe98[_0x54eb8d(0x257)]){for(let _0x3fc2b9=0x0;_0x3fc2b9<_0x92fe98[_0x54eb8d(0x257)]['length'];_0x3fc2b9++){const _0x550bf2=_0x92fe98[_0x54eb8d(0x257)][_0x3fc2b9];_0x550bf2[_0x54eb8d(0x1db)]&&_0x40ee53[_0x54eb8d(0x20a)](_0x550bf2[_0x54eb8d(0x1db)],_0x550bf2);}for(let _0x38cbb4=0x0;_0x38cbb4<_0x92fe98[_0x54eb8d(0x257)][_0x54eb8d(0x23c)];_0x38cbb4++){const _0x3f7cfa=_0x92fe98[_0x54eb8d(0x257)][_0x38cbb4],_0x304872=_0x202da8+_0x54eb8d(0x249)+_0x38cbb4+']';if(_0x3f7cfa['name']){if(_0x414221[_0x54eb8d(0x1cb)](_0x3f7cfa[_0x54eb8d(0x1db)])){const _0x26d2ac=_0x414221[_0x54eb8d(0x1b2)](_0x3f7cfa[_0x54eb8d(0x1db)]);_0x320663[_0x54eb8d(0x201)](createIssue(_0x54eb8d(0x218),_0x304872+'.name',_0x54eb8d(0x1da),_0x54eb8d(0x1e0)+_0x3f7cfa[_0x54eb8d(0x1db)]+_0x54eb8d(0x1b9)+_0x26d2ac+'])',_0x163b89));}else _0x414221[_0x54eb8d(0x20a)](_0x3f7cfa[_0x54eb8d(0x1db)],_0x38cbb4);}_0x320663[_0x54eb8d(0x201)](...validateStep(_0x3f7cfa,_0x304872,_0x163b89,_0x40ee53));}}_0x92fe98['entry_criteria']&&_0x320663[_0x54eb8d(0x201)](...validateCriteria(_0x92fe98['entry_criteria'],_0x202da8+'.entry_criteria',_0x163b89));if(_0x92fe98[_0x54eb8d(0x1d8)])for(let _0x4f6ffb=0x0;_0x4f6ffb<_0x92fe98[_0x54eb8d(0x1d8)][_0x54eb8d(0x23c)];_0x4f6ffb++){_0x320663['push'](...validateCriteria(_0x92fe98[_0x54eb8d(0x1d8)][_0x4f6ffb],_0x202da8+_0x54eb8d(0x229)+_0x4f6ffb+']',_0x163b89));}return _0x92fe98[_0x54eb8d(0x226)]&&_0x320663[_0x54eb8d(0x201)](...validateCriteria(_0x92fe98['milestone'],_0x202da8+_0x54eb8d(0x1bb),_0x163b89)),_0x320663[_0x54eb8d(0x201)](...validateStageStructure(_0x92fe98,_0x5992a3,_0x447f3c,_0x163b89)),_0x320663[_0x54eb8d(0x201)](...validateFlowControl(_0x92fe98,_0x5992a3,_0x163b89)),_0x320663;}function validateStagesForVersion(_0x583f75,_0x2eec0e,_0x1fab0b,_0x5b8f75,_0x33aa18,_0x3c7047,_0x1c1e04){const _0x13e0c2=a130_0x56c6;if(_0x583f75[_0x13e0c2(0x23c)]===0x0){_0x33aa18[_0x13e0c2(0x201)]({'level':_0x13e0c2(0x218),'path':_0x5b8f75+'stages','code':_0x13e0c2(0x259),'message':_0x13e0c2(0x228),'location':getLocationFromPath(_0x1fab0b['document'],_0x1fab0b[_0x13e0c2(0x242)],[_0x13e0c2(0x1c3)])});return;}const _0x5c26df=new Set();for(const _0xd6ba29 of _0x583f75){if(_0xd6ba29[_0x13e0c2(0x257)])for(const _0x24bef0 of _0xd6ba29[_0x13e0c2(0x257)]){_0x24bef0[_0x13e0c2(0x1db)]&&_0x5c26df[_0x13e0c2(0x1ea)](_0x24bef0[_0x13e0c2(0x1db)]);}}const _0x3ae15f={..._0x1fab0b,'stepNames':_0x5c26df},_0xd74d32=validateVersionStructure(_0x583f75,_0x3ae15f);for(const _0x325618 of _0xd74d32){const _0x449dc5=_0x5b8f75?{..._0x325618,'path':''+_0x5b8f75+_0x325618[_0x13e0c2(0x1f4)]}:_0x325618;if(_0x449dc5[_0x13e0c2(0x1ca)]===_0x13e0c2(0x218))_0x33aa18[_0x13e0c2(0x201)](_0x449dc5);else _0x3c7047[_0x13e0c2(0x201)](_0x449dc5);}for(let _0x97d7b8=0x0;_0x97d7b8<_0x583f75[_0x13e0c2(0x23c)];_0x97d7b8++){const _0xaf43fa=validateStage(_0x583f75[_0x97d7b8],_0x97d7b8,_0x583f75[_0x13e0c2(0x23c)],_0x3ae15f);for(const _0x1e7eb7 of _0xaf43fa){const _0x33d163=_0x5b8f75?{..._0x1e7eb7,'path':''+_0x5b8f75+_0x1e7eb7[_0x13e0c2(0x1f4)]}:_0x1e7eb7;if(_0x33d163[_0x13e0c2(0x1ca)]===_0x13e0c2(0x218))_0x33aa18[_0x13e0c2(0x201)](_0x33d163);else _0x3c7047[_0x13e0c2(0x201)](_0x33d163);}}if(_0x2eec0e['goal']){const _0x2bff43=_0x1c1e04?.[_0x13e0c2(0x1bf)]?'goal':_0x5b8f75+_0x13e0c2(0x235),_0x22b8ac=validateCriteria(_0x2eec0e[_0x13e0c2(0x235)],_0x2bff43,_0x3ae15f);for(const _0x575dbf of _0x22b8ac){if(_0x575dbf[_0x13e0c2(0x1ca)]===_0x13e0c2(0x218))_0x33aa18[_0x13e0c2(0x201)](_0x575dbf);else _0x3c7047[_0x13e0c2(0x201)](_0x575dbf);}}}function a130_0x56c6(_0x50f8be,_0x2395d5){_0x50f8be=_0x50f8be-0x1b0;const _0x4b6765=a130_0x4b67();let _0x56c6f6=_0x4b6765[_0x50f8be];return _0x56c6f6;}function extractVersionIndex(_0x461598){const _0x3430c0=a130_0x56c6,_0x5b3064=_0x461598[_0x3430c0(0x1c0)](/^journeys\[(\d+)\]\./);return _0x5b3064?_0x5b3064[0x1]:undefined;}function deduplicateAcrossVersions(_0x2b0d17){const _0x54ef10=a130_0x56c6,_0x19a44c=new Map();for(let _0x584fd1=0x0;_0x584fd1<_0x2b0d17[_0x54ef10(0x23c)];_0x584fd1++){const _0x3d517c=_0x2b0d17[_0x584fd1][_0x54ef10(0x253)]+':'+_0x2b0d17[_0x584fd1]['message'],_0x4deab9=extractVersionIndex(_0x2b0d17[_0x584fd1][_0x54ef10(0x1f4)]),_0xebcb73=_0x19a44c['get'](_0x3d517c);if(_0xebcb73){_0xebcb73['indices'][_0x54ef10(0x201)](_0x584fd1);if(_0x4deab9)_0xebcb73[_0x54ef10(0x1e1)]['add'](_0x4deab9);}else _0x19a44c[_0x54ef10(0x20a)](_0x3d517c,{'indices':[_0x584fd1],'versions':new Set(_0x4deab9?[_0x4deab9]:[])});}const _0x218b7c=new Set();for(const {indices:_0x58b19c,versions:_0x6d1fb2}of _0x19a44c[_0x54ef10(0x222)]()){if(_0x6d1fb2[_0x54ef10(0x1e6)]<=0x1)continue;const _0x36823b=_0x2b0d17[_0x58b19c[0x0]];_0x36823b[_0x54ef10(0x1f4)]=_0x36823b[_0x54ef10(0x1f4)][_0x54ef10(0x267)](/^journeys\[\d+\]\./,''),_0x36823b[_0x54ef10(0x1ff)]=_0x36823b[_0x54ef10(0x1ff)]+'\x20(across\x20'+_0x6d1fb2[_0x54ef10(0x1e6)]+_0x54ef10(0x1d4);for(let _0x529c4e=0x1;_0x529c4e<_0x58b19c[_0x54ef10(0x23c)];_0x529c4e++){_0x218b7c[_0x54ef10(0x1ea)](_0x58b19c[_0x529c4e]);}}const _0x511be2=[..._0x218b7c][_0x54ef10(0x1d6)]((_0x5d0383,_0x1cff23)=>_0x1cff23-_0x5d0383);for(const _0x14711d of _0x511be2){_0x2b0d17['splice'](_0x14711d,0x1);}}export function validateJourneyDef(_0x38932b,_0x2f9765={},_0xe14266={}){const _0x12abd0=a130_0x56c6;if(_0xe14266[_0x12abd0(0x1c9)])return runJourneySemanticChecks(_0x38932b,_0x2f9765);const _0x360808=JourneyDefSchema[_0x12abd0(0x239)](_0x38932b);if(_0x360808[_0x12abd0(0x1d0)])return runJourneySemanticChecks(_0x360808[_0x12abd0(0x254)],_0x2f9765);return zodErrorsToJourneyValidationResult(_0x360808[_0x12abd0(0x218)],_0x2f9765);}function zodErrorsToJourneyValidationResult(_0x50cbbe,_0x195973){const _0x1166f6=a130_0x56c6,_0x9d9d60=flattenZodIssues(_0x50cbbe['issues']),_0x1a461e=_0x9d9d60[_0x1166f6(0x1ec)](_0x7a6d08=>{const _0x606086=_0x1166f6,_0x33799a=formatZodPath(_0x7a6d08['path']),_0x224445=mapJourneyZodIssueToCode(_0x7a6d08,_0x33799a),_0x31b6ce=getLocationFromPath(_0x195973[_0x606086(0x209)],_0x195973[_0x606086(0x242)],_0x7a6d08[_0x606086(0x1f4)]['map'](_0x551ae0=>typeof _0x551ae0===_0x606086(0x24c)?String(_0x551ae0):_0x551ae0));return{'level':_0x606086(0x218),'path':_0x33799a,'code':_0x224445,'message':_0x7a6d08[_0x606086(0x1ff)],..._0x31b6ce&&{'location':_0x31b6ce}};});return{'valid':![],'errors':_0x1a461e,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2e9cfb,_0x3f3234){const _0x367455=a130_0x56c6;if(_0x3f3234===_0x367455(0x1db))return _0x367455(0x1d7);if(_0x3f3234[_0x367455(0x1f0)](_0x367455(0x1df))&&_0x3f3234['includes'](_0x367455(0x257)))return _0x367455(0x210);if(_0x3f3234==='stages'||_0x3f3234['endsWith']('.stages'))return'MISSING_STAGES';if(_0x3f3234===''&&_0x2e9cfb[_0x367455(0x1ff)][_0x367455(0x255)](_0x367455(0x250)))return _0x367455(0x259);if(_0x3f3234[_0x367455(0x255)]('activation'))return _0x367455(0x24d);return _0x367455(0x210);}function runJourneySemanticChecks(_0x28b628,_0x37f364){const _0xcd5dd0=a130_0x56c6,_0x110149=[],_0x4d0ac2=[];(!_0x28b628[_0xcd5dd0(0x1db)]||_0x28b628[_0xcd5dd0(0x1db)][_0xcd5dd0(0x200)]()==='')&&_0x110149[_0xcd5dd0(0x201)]({'level':_0xcd5dd0(0x218),'path':_0xcd5dd0(0x1db),'code':_0xcd5dd0(0x1d7),'message':_0xcd5dd0(0x22a),'location':getLocationFromPath(_0x37f364['document'],_0x37f364[_0xcd5dd0(0x242)],[_0xcd5dd0(0x1db)])});const _0x5cc383=new Set();if(_0x28b628[_0xcd5dd0(0x24a)])for(const _0x2e81ae of Object[_0xcd5dd0(0x1e8)](_0x28b628[_0xcd5dd0(0x24a)])){_0x5cc383[_0xcd5dd0(0x1ea)](_0x2e81ae);}const _0x50e0a6=new Set();if(_0x28b628[_0xcd5dd0(0x21d)])for(const _0x40058d of Object[_0xcd5dd0(0x1e8)](_0x28b628[_0xcd5dd0(0x21d)])){_0x50e0a6[_0xcd5dd0(0x1ea)](_0x40058d);}const _0x222f53=new Set(),_0x4d72f4={..._0x37f364,'embeddedSegments':_0x5cc383,'referencedSegments':_0x222f53,'activationKeys':_0x50e0a6[_0xcd5dd0(0x1e6)]>0x0?_0x50e0a6:undefined};if(_0x28b628[_0xcd5dd0(0x24a)])for(const [_0x4043fb,_0x276bb4]of Object[_0xcd5dd0(0x25f)](_0x28b628[_0xcd5dd0(0x24a)])){const _0x1b1ae2=validateEmbeddedSegment(_0x276bb4,_0xcd5dd0(0x25b)+_0x4043fb,_0x4d72f4);for(const _0xd668d3 of _0x1b1ae2){if(_0xd668d3[_0xcd5dd0(0x1ca)]===_0xcd5dd0(0x218))_0x110149[_0xcd5dd0(0x201)](_0xd668d3);else _0x4d0ac2[_0xcd5dd0(0x201)](_0xd668d3);}}const _0x54c9d3=!!_0x28b628['goal'],_0x3969c4=_0x28b628[_0xcd5dd0(0x21a)]?.[_0xcd5dd0(0x234)](_0x390672=>!!_0x390672['goal'])??![];!_0x54c9d3&&!_0x3969c4&&_0x4d0ac2[_0xcd5dd0(0x201)]({'level':'warning','path':_0xcd5dd0(0x235),'code':_0xcd5dd0(0x212),'message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x37f364[_0xcd5dd0(0x209)],_0x37f364[_0xcd5dd0(0x242)],[_0xcd5dd0(0x235)])});const _0x515dbd=_0x28b628[_0xcd5dd0(0x21a)]??_0x28b628[_0xcd5dd0(0x1e1)];if(_0x515dbd&&_0x515dbd['filter'](_0x1cd0c9=>_0x1cd0c9[_0xcd5dd0(0x1fe)]===!![])[_0xcd5dd0(0x23c)]>0x1){const _0x549c0e=_0x28b628[_0xcd5dd0(0x21a)]?'journeys':_0xcd5dd0(0x1e1);_0x110149['push']({'level':_0xcd5dd0(0x218),'path':_0x549c0e,'code':_0xcd5dd0(0x20e),'message':_0xcd5dd0(0x211)+(_0x549c0e==='journeys'?_0xcd5dd0(0x1b4):_0xcd5dd0(0x245))+_0xcd5dd0(0x263),'location':getLocationFromPath(_0x37f364[_0xcd5dd0(0x209)],_0x37f364[_0xcd5dd0(0x242)],[_0x549c0e])});}if(_0x28b628[_0xcd5dd0(0x21a)]&&_0x28b628[_0xcd5dd0(0x21a)][_0xcd5dd0(0x23c)]>0x0)for(let _0x4eb884=0x0;_0x4eb884<_0x28b628[_0xcd5dd0(0x21a)][_0xcd5dd0(0x23c)];_0x4eb884++){const _0x1e5150=_0x28b628[_0xcd5dd0(0x21a)][_0x4eb884];if(_0x28b628[_0xcd5dd0(0x21a)][_0xcd5dd0(0x23c)]>0x1&&_0x1e5150[_0xcd5dd0(0x1dd)]===_0xcd5dd0(0x1e4))continue;const _0xffa4ce=_0x1e5150['stages']||[],_0x83609c='journeys['+_0x4eb884+'].',_0x3e2785=!!_0x1e5150[_0xcd5dd0(0x235)],_0x40723c=_0x3e2785?{..._0x28b628,'goal':_0x1e5150[_0xcd5dd0(0x235)]}:_0x28b628;validateStagesForVersion(_0xffa4ce,_0x40723c,_0x4d72f4,_0x83609c,_0x110149,_0x4d0ac2,{'goalIsInherited':!_0x3e2785});}else{if(_0x28b628[_0xcd5dd0(0x1e1)]&&_0x28b628['versions'][_0xcd5dd0(0x23c)]>0x0)for(let _0x7cfd5a=0x0;_0x7cfd5a<_0x28b628[_0xcd5dd0(0x1e1)][_0xcd5dd0(0x23c)];_0x7cfd5a++){const _0x39b402=_0x28b628[_0xcd5dd0(0x1e1)][_0x7cfd5a];if(_0x28b628[_0xcd5dd0(0x1e1)][_0xcd5dd0(0x23c)]>0x1&&_0x39b402[_0xcd5dd0(0x1dd)]==='launched')continue;const _0x4bb9d0=_0x39b402[_0xcd5dd0(0x1c3)]||[],_0xb08b0d=_0xcd5dd0(0x1e7)+_0x7cfd5a+'].';validateStagesForVersion(_0x4bb9d0,_0x28b628,_0x4d72f4,_0xb08b0d,_0x110149,_0x4d0ac2);}else{const _0x26ccf1=_0x28b628['stages']||[];validateStagesForVersion(_0x26ccf1,_0x28b628,_0x4d72f4,'',_0x110149,_0x4d0ac2);}}_0x28b628[_0xcd5dd0(0x21a)]&&_0x28b628[_0xcd5dd0(0x21a)]['length']>0x1&&(deduplicateAcrossVersions(_0x110149),deduplicateAcrossVersions(_0x4d0ac2));for(const _0x570cab of _0x5cc383){!_0x222f53['has'](_0x570cab)&&!_0x570cab[_0xcd5dd0(0x216)](_0xcd5dd0(0x1ce))&&_0x4d0ac2[_0xcd5dd0(0x201)]({'level':_0xcd5dd0(0x268),'path':_0xcd5dd0(0x25b)+_0x570cab,'code':_0xcd5dd0(0x1b3),'message':_0xcd5dd0(0x22c)+_0x570cab+_0xcd5dd0(0x24b),'location':getLocationFromPath(_0x37f364[_0xcd5dd0(0x209)],_0x37f364[_0xcd5dd0(0x242)],[_0xcd5dd0(0x24a),_0x570cab])});}return{'valid':_0x110149[_0xcd5dd0(0x23c)]===0x0,'errors':_0x110149,'warnings':_0x4d0ac2};}
|