@treasuredata/tdx 2026.3.32 → 2026.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.d.ts +1 -3
- package/dist/commands/work-command.d.ts.map +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/work-command.js.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +42 -19
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/types/workspace.js.map +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.d.ts +15 -0
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +38 -21
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.d.ts +49 -0
- package/dist/sdk/workspace/weekly.d.ts.map +1 -0
- package/dist/sdk/workspace/weekly.js +1 -0
- package/dist/sdk/workspace/weekly.js.map +1 -0
- package/dist/sdk/workspace/wikilinks.d.ts +7 -2
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +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
- package/dist/sdk/workspace/skills.d.ts +0 -34
- package/dist/sdk/workspace/skills.d.ts.map +0 -1
- package/dist/sdk/workspace/skills.js +0 -1
- package/dist/sdk/workspace/skills.js.map +0 -1
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a131_0x2c444c=a131_0x967e;(function(_0x4f4599,_0x280e57){const _0x242fa5=a131_0x967e,_0x192b4a=_0x4f4599();while(!![]){try{const _0x1980d3=-parseInt(_0x242fa5(0x1d0))/0x1+-parseInt(_0x242fa5(0x217))/0x2+parseInt(_0x242fa5(0x219))/0x3*(parseInt(_0x242fa5(0x249))/0x4)+-parseInt(_0x242fa5(0x1de))/0x5+-parseInt(_0x242fa5(0x212))/0x6*(-parseInt(_0x242fa5(0x1e6))/0x7)+-parseInt(_0x242fa5(0x1ef))/0x8*(-parseInt(_0x242fa5(0x1f4))/0x9)+-parseInt(_0x242fa5(0x25c))/0xa*(parseInt(_0x242fa5(0x1eb))/0xb);if(_0x1980d3===_0x280e57)break;else _0x192b4a['push'](_0x192b4a['shift']());}catch(_0x45e2b4){_0x192b4a['push'](_0x192b4a['shift']());}}}(a131_0x3c08,0xa2446));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x1e1c56){const _0x37c994=a131_0x967e;return _0x1e1c56[_0x37c994(0x1e0)]??_0x1e1c56['attributes']?.[_0x37c994(0x1e0)]??undefined;}function getVersionNumber(_0x2e083a){const _0x480f97=a131_0x967e;return _0x2e083a[_0x480f97(0x243)]??_0x2e083a[_0x480f97(0x1e8)]?.[_0x480f97(0x243)]??0x0;}function getState(_0x153be4){const _0x1f754c=a131_0x967e;return _0x153be4[_0x1f754c(0x20e)]??_0x153be4['attributes']?.[_0x1f754c(0x20e)];}export function deduplicateJourneysByBundle(_0x488e8a){const _0x5531d4=a131_0x967e,_0x11a9e7=new Map();let _0x565668=0x0;for(const _0x1e032e of _0x488e8a){const _0x4d4072=getBundleId(_0x1e032e);if(!_0x4d4072){const _0x41da44=_0x5531d4(0x235)+(_0x1e032e['id']??'idx-'+_0x565668++);_0x11a9e7['set'](_0x41da44,_0x1e032e);continue;}const _0x2f341a=_0x11a9e7[_0x5531d4(0x234)](_0x4d4072);if(!_0x2f341a)_0x11a9e7[_0x5531d4(0x23a)](_0x4d4072,_0x1e032e);else{const _0x4bb727=getState(_0x2f341a)===_0x5531d4(0x1e5),_0x4a7de=getState(_0x1e032e)===_0x5531d4(0x1e5);if(_0x4a7de&&!_0x4bb727)_0x11a9e7[_0x5531d4(0x23a)](_0x4d4072,_0x1e032e);else{if(!_0x4a7de&&_0x4bb727){}else{const _0x4e2a98=getVersionNumber(_0x2f341a),_0x1e71c0=getVersionNumber(_0x1e032e);_0x1e71c0>_0x4e2a98&&_0x11a9e7[_0x5531d4(0x23a)](_0x4d4072,_0x1e032e);}}}}return Array[_0x5531d4(0x1f1)](_0x11a9e7[_0x5531d4(0x1ea)]());}const VALID_JOURNEY_STATES=new Set([a131_0x2c444c(0x245),a131_0x2c444c(0x21b),a131_0x2c444c(0x1e5)]);export function parseJourneyState(_0x5cb120){const _0x575150=a131_0x2c444c;if(typeof _0x5cb120===_0x575150(0x246)&&VALID_JOURNEY_STATES[_0x575150(0x1db)](_0x5cb120))return _0x5cb120;return _0x575150(0x245);}export function entityToJourneyListItem(_0x44899c,_0x2ce521){const _0x152512=a131_0x2c444c,_0x467475=_0x44899c[_0x152512(0x1e8)];return{'id':_0x44899c['id'],'name':_0x467475[_0x152512(0x241)]??'','journeyBundleName':_0x467475['journeyBundleName']??_0x467475[_0x152512(0x241)]??'','journeyBundleId':_0x467475['journeyBundleId']??'','versionNumber':_0x467475[_0x152512(0x243)],'description':_0x467475[_0x152512(0x224)]??null,'state':parseJourneyState(_0x467475['state']),'paused':_0x467475[_0x152512(0x200)]??![],'audienceId':_0x2ce521,'folderId':_0x467475[_0x152512(0x21d)]??_0x44899c['relationships']?.[_0x152512(0x239)]?.[_0x152512(0x1d7)]?.['id']??null,'createdAt':_0x467475['createdAt']??'','updatedAt':_0x467475['updatedAt']??''};}function convertToColumnId(_0x4b9dcc){const _0x22cfdd=a131_0x2c444c;return _0x4b9dcc[_0x22cfdd(0x204)](/-/g,'_');}function getStepEntries(_0x1979c5){const _0x58ffd0=a131_0x2c444c;if(!_0x1979c5)return[];if(Array[_0x58ffd0(0x256)](_0x1979c5))return _0x1979c5[_0x58ffd0(0x24e)](_0x46012e=>[_0x46012e['id'],_0x46012e]);return Object[_0x58ffd0(0x264)](_0x1979c5);}export function flattenJourneyActivation(_0x7f90ca){const _0x2cf4cb=a131_0x2c444c,{activationParams:_0x58a5a4,activationId:_0x56ee5b,runAfterJourneyRefresh:_0x1e9100}=_0x7f90ca[_0x2cf4cb(0x1e8)];return{'id':_0x7f90ca['id'],'activationId':_0x56ee5b,'runAfterJourneyRefresh':_0x1e9100,..._0x58a5a4};}function col(_0x158ded,_0x300d01={}){const _0x599f37=a131_0x2c444c;return{'column':_0x158ded,'direction':null,'stageIndex':null,'stageName':null,'category':_0x599f37(0x20f),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x300d01};}export function generateColumnMapping(_0x3da2a9){const _0x39af70=a131_0x2c444c,_0x36f7f0=[];_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x25e))),_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x24d),{'direction':'in','category':'journey'})),_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x238),{'direction':_0x39af70(0x214),'category':_0x39af70(0x262)}));_0x3da2a9[_0x39af70(0x1e8)][_0x39af70(0x229)]&&_0x36f7f0['push'](col(_0x39af70(0x1e4),{'direction':'in','category':_0x39af70(0x229),'detail':_0x3da2a9[_0x39af70(0x1e8)][_0x39af70(0x229)][_0x39af70(0x241)]||null}));const _0x327a3a=_0x3da2a9[_0x39af70(0x1e8)][_0x39af70(0x1d8)]||[];for(let _0x22acc2=0x0;_0x22acc2<_0x327a3a[_0x39af70(0x1d4)];_0x22acc2++){const _0x587685=_0x327a3a[_0x22acc2],_0x5e0fd9=_0x587685['name'],_0x18587d={'stageIndex':_0x22acc2,'stageName':_0x5e0fd9},_0x28000d=_0x587685[_0x39af70(0x23b)]?.[_0x39af70(0x241)]||null;_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x21c)+_0x22acc2,{..._0x18587d,'direction':'in','category':_0x39af70(0x1d9),'detail':_0x28000d})),_0x36f7f0[_0x39af70(0x1df)](col('outtime_stage_'+_0x22acc2,{..._0x18587d,'direction':'out','category':'stage','detail':_0x28000d}));_0x587685[_0x39af70(0x1ee)]&&_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x21c)+_0x22acc2+_0x39af70(0x263),{..._0x18587d,'direction':'in','category':_0x39af70(0x1ee),'detail':_0x587685[_0x39af70(0x1ee)]['name']||null}));const _0x304b06=_0x587685[_0x39af70(0x1f9)]||_0x587685['exitCriteria']||[];for(let _0x522716=0x0;_0x522716<_0x304b06[_0x39af70(0x1d4)];_0x522716++){_0x36f7f0[_0x39af70(0x1df)](col('intime_stage_'+_0x22acc2+_0x39af70(0x228)+_0x522716,{..._0x18587d,'direction':'in','category':_0x39af70(0x23e),'detail':_0x304b06[_0x522716][_0x39af70(0x241)]||null}));}const _0x4cf3e7=getStepEntries(_0x587685[_0x39af70(0x252)]);for(const [_0x2b8fb9,_0x29f9bb]of _0x4cf3e7){const _0x32e06f=convertToColumnId(_0x2b8fb9),_0x4f19b8=_0x29f9bb[_0x39af70(0x240)]||null,_0x2f265e=_0x29f9bb[_0x39af70(0x241)]||null,_0xea402d={..._0x18587d,'stepType':_0x4f19b8,'stepName':_0x2f265e,'stepId':_0x2b8fb9};_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x21c)+_0x22acc2+'_'+_0x32e06f,{..._0xea402d,'direction':'in','category':_0x39af70(0x1cf)})),_0x36f7f0['push'](col(_0x39af70(0x260)+_0x22acc2+'_'+_0x32e06f,{..._0xea402d,'direction':_0x39af70(0x214),'category':_0x39af70(0x1cf)}));if(_0x29f9bb[_0x39af70(0x240)]==='DecisionPoint'&&_0x29f9bb['branches'])for(const _0x4172ec of _0x29f9bb[_0x39af70(0x213)]){_0x4172ec[_0x39af70(0x1f5)]&&_0x36f7f0[_0x39af70(0x1df)](col('intime_stage_'+_0x22acc2+'_'+_0x32e06f+'_'+_0x4172ec[_0x39af70(0x1f5)],{..._0xea402d,'direction':'in','category':_0x39af70(0x207),'detail':_0x4172ec[_0x39af70(0x241)]||(_0x4172ec[_0x39af70(0x209)]?_0x39af70(0x202):null)}));}if((_0x29f9bb[_0x39af70(0x240)]===_0x39af70(0x20b)||_0x29f9bb[_0x39af70(0x240)]===_0x39af70(0x250))&&_0x29f9bb[_0x39af70(0x237)])for(const _0x2316af of _0x29f9bb[_0x39af70(0x237)]){_0x2316af['id']&&_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x21c)+_0x22acc2+'_'+_0x32e06f+_0x39af70(0x1f7)+convertToColumnId(_0x2316af['id']),{..._0xea402d,'direction':'in','category':'variant','detail':_0x2316af['name']||null}));}if(_0x29f9bb[_0x39af70(0x240)]==='WaitStep'||_0x29f9bb['type']===_0x39af70(0x1f2)){const _0x5504ac=[];if(_0x29f9bb['conditionSegmentId'])_0x5504ac[_0x39af70(0x1df)](_0x29f9bb[_0x39af70(0x205)]);else{if(Array[_0x39af70(0x256)](_0x29f9bb[_0x39af70(0x25f)]))for(const _0x277fa1 of _0x29f9bb[_0x39af70(0x25f)]){_0x277fa1[_0x39af70(0x1f5)]&&!_0x277fa1[_0x39af70(0x1d2)]&&_0x5504ac[_0x39af70(0x1df)](_0x277fa1[_0x39af70(0x1f5)]);}else _0x29f9bb[_0x39af70(0x20d)]?.['segmentId']&&_0x5504ac['push'](_0x29f9bb[_0x39af70(0x20d)][_0x39af70(0x1f5)]);}for(const _0xb590f of _0x5504ac){_0x36f7f0[_0x39af70(0x1df)](col(_0x39af70(0x21c)+_0x22acc2+'_'+_0x32e06f+'_'+_0xb590f,{..._0xea402d,'direction':'in','category':_0x39af70(0x207)}));}}}}return _0x36f7f0[_0x39af70(0x1df)](col('time')),_0x36f7f0;}export function aggregateJourneyHistory(_0x306b44){const _0x48b805=a131_0x2c444c,_0x10eac3=_0x306b44[_0x48b805(0x211)]((_0x264cde,_0x503804)=>_0x264cde+(_0x503804['entryInflux']??0x0),0x0),_0x2c465a=_0x306b44['reduce']((_0x3d087f,_0x1b9a96)=>_0x3d087f+(_0x1b9a96[_0x48b805(0x1fa)]??0x0),0x0),_0xbf1d79=_0x306b44['reduce']((_0x1bf699,_0x2854d3)=>_0x1bf699+((_0x2854d3['exitInflux']??0x0)+(_0x2854d3[_0x48b805(0x23d)]??0x0)),0x0),_0x1be97f=_0x306b44[_0x306b44[_0x48b805(0x1d4)]-0x1];return{'size':_0x1be97f?.[_0x48b805(0x231)]??0x0,'entered':_0x10eac3,'goal_achieved':_0x2c465a,'completion_rate':_0x2c465a&&_0x10eac3?_0x2c465a/_0x10eac3*0x64:0x0,'exit_or_jump':_0xbf1d79,'exit_or_jump_rate':_0xbf1d79&&_0x10eac3?_0xbf1d79/_0x10eac3*0x64:0x0};}export function aggregateStageHistory(_0x32c06d){const _0x2eaa78=a131_0x2c444c,_0x253942=_0x32c06d[_0x2eaa78(0x211)]((_0x5cef3a,_0xbca6ec)=>_0x5cef3a+(_0xbca6ec[_0x2eaa78(0x230)]??0x0),0x0),_0x23f759=_0x32c06d[_0x2eaa78(0x211)]((_0x123b76,_0x249316)=>_0x123b76+(_0x249316[_0x2eaa78(0x22f)]??0x0),0x0),_0xfb3268=_0x32c06d[_0x2eaa78(0x211)]((_0x4ce729,_0x190100)=>_0x4ce729+((_0x190100['exitInflux']??0x0)+(_0x190100[_0x2eaa78(0x23d)]??0x0)),0x0),_0x589ed7=_0x32c06d[_0x32c06d[_0x2eaa78(0x1d4)]-0x1];return{'size':_0x589ed7?.[_0x2eaa78(0x231)]??0x0,'entered':_0x253942,'milestone':_0x23f759,'milestone_rate':_0x23f759&&_0x253942?_0x23f759/_0x253942*0x64:0x0,'exit_or_jump':_0xfb3268,'exit_or_jump_rate':_0xfb3268&&_0x253942?_0xfb3268/_0x253942*0x64:0x0};}export function assembleJourneyStats(_0x5d2c25,_0x4d7d94){const _0x5e5eec=a131_0x2c444c,_0x5cb395=!!(_0x4d7d94?.[_0x5e5eec(0x1f1)]||_0x4d7d94?.['to'])&&!!_0x5d2c25[_0x5e5eec(0x1f8)]?.[_0x5e5eec(0x1d4)];if(_0x5cb395){const _0x4baeb7=aggregateJourneyHistory(_0x5d2c25[_0x5e5eec(0x1f8)]),_0x299a66={'journey_id':_0x5d2c25[_0x5e5eec(0x242)],..._0x4d7d94?.[_0x5e5eec(0x1f1)]&&{'from':_0x4d7d94[_0x5e5eec(0x1f1)]},..._0x4d7d94?.['to']&&{'to':_0x4d7d94['to']},..._0x4baeb7};return _0x4d7d94?.[_0x5e5eec(0x218)]&&(_0x299a66['history']=_0x5d2c25[_0x5e5eec(0x1f8)]),_0x299a66;}return{'journey_id':_0x5d2c25['journeyId'],'size':_0x5d2c25['size'],'entered':_0x5d2c25[_0x5e5eec(0x20c)],'goal_achieved':_0x5d2c25[_0x5e5eec(0x22c)],'completion_rate':_0x5d2c25[_0x5e5eec(0x221)],'exit_or_jump':_0x5d2c25[_0x5e5eec(0x21a)],'exit_or_jump_rate':_0x5d2c25[_0x5e5eec(0x233)]};}export function formatVersionsFromBundle(_0x10f592){const _0x4fdb46=a131_0x2c444c,_0x85d349=_0x10f592[_0x4fdb46(0x1dc)][_0x4fdb46(0x24e)](_0x1e0c8d=>({'journeyId':_0x1e0c8d['id'],'versionNumber':_0x1e0c8d[_0x4fdb46(0x1e8)][_0x4fdb46(0x243)]??0x0,'name':_0x1e0c8d[_0x4fdb46(0x1e8)][_0x4fdb46(0x241)],'state':_0x1e0c8d['attributes'][_0x4fdb46(0x20e)],'paused':_0x1e0c8d[_0x4fdb46(0x1e8)][_0x4fdb46(0x200)],'createdAt':_0x1e0c8d['attributes'][_0x4fdb46(0x1da)],'updatedAt':_0x1e0c8d[_0x4fdb46(0x1e8)][_0x4fdb46(0x257)]}));return _0x85d349[_0x4fdb46(0x1e9)]((_0x1e20d7,_0x2ba930)=>_0x1e20d7[_0x4fdb46(0x243)]-_0x2ba930['versionNumber']),_0x85d349;}function a131_0x3c08(){const _0x4f08d6=['includeAllVersions','_exit_','goal','listEntitiesByFolder','INVALID_ARGUMENT','goalSize','fetchTrafficRaw','journeyBundleName','milestoneInflux','entryInflux','size','update','exitOrJumpRate','get','no-bundle-','add','variants','outtime_journey','parentFolder','set','entryCriteria','journey_','jumpInflux','exit_criteria','latestJourneyId','type','name','journeyId','versionNumber','getParentSegmentFull','draft','string','flat','client','4368788dQFWFw','listActivationsFlat','rootFolderId','getBundle','intime_journey','map','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','ABTest','toLowerCase','steps','checkJourneyAppendable','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','limit','isArray','updatedAt','listSegmentFolders','lastVersionNumber','listJourneysWithDetailsFromParentSegment','Journey\x20activation\x20step\x20not\x20found:\x20','5890iLoTyX','audienceId','cdp_customer_id','conditions','outtime_stage_','resumeJourney','journey','_milestone','entries','createJourneyVersion','step','99607NwDmJZ','getJourneyStatistics','timedOutPath','listJourneysWithFolders','length','Journey\x20not\x20found:\x20','createVersion','data','journeyStages','stage','createdAt','has','journeys','conversion','618210jzqSDt','push','journeyBundleId','resolveJourneyId','journeyStageId','\x20in\x20journey\x20','intime_goal','launched','2863XxwDhb','all','attributes','sort','values','25751jJOqTM','getLatestJourneyId','applyVersionDeduplication','milestone','1716560USbGcA','createJourneyActivation','from','Wait','find','45sIvUrH','segmentId','listActivations','_variant_','history','exitCriterias','goalInflux','createActivation','getJourneyBundle','resume','listVersions','filter','paused','listJourneysWithDetails','Excluded\x20profiles','listJourneyActivations','replace','conditionSegmentId','getJourney','branch','NOT_FOUND','excluded','getConversionSankeyChart','AbTest','enteredSize','waitCondition','state','fixed','cdp_audience_','reduce','13506oyQeCF','branches','out','pauseJourney','JOURNEY_NOT_FOUND','1637924YJUkVY','includeHistory','3hrnGqj','exitOrJumpSize','simulation','intime_stage_','segmentFolderId','activation','getActivation','getActivationSankeyChart','completionRate','getColumnMapping','listJourneys','description','pause','activationStepsById'];a131_0x3c08=function(){return _0x4f08d6;};return a131_0x3c08();}export function synthesizePreBundleVersion(_0x361184){const _0x3a853e=a131_0x2c444c;return{'journeyId':_0x361184['id'],'versionNumber':0x1,'name':_0x361184[_0x3a853e(0x1e8)][_0x3a853e(0x241)],'state':_0x361184[_0x3a853e(0x1e8)]['state'],'paused':_0x361184[_0x3a853e(0x1e8)][_0x3a853e(0x200)],'createdAt':_0x361184[_0x3a853e(0x1e8)]['createdAt'],'updatedAt':_0x361184['attributes'][_0x3a853e(0x257)]};}export function buildStageNameMap(_0x2eaf7a){const _0x16a99f=a131_0x2c444c;return new Map(_0x2eaf7a[_0x16a99f(0x1e8)][_0x16a99f(0x1d8)]?.[_0x16a99f(0x24e)](_0x4aa6f4=>[_0x4aa6f4['id'],_0x4aa6f4[_0x16a99f(0x241)]])??[]);}function a131_0x967e(_0x133789,_0x1e8928){_0x133789=_0x133789-0x1cf;const _0x3c085c=a131_0x3c08();let _0x967e17=_0x3c085c[_0x133789];return _0x967e17;}export class JourneySDK{['client'];constructor(_0x5a0655){const _0x1d1184=a131_0x2c444c;this[_0x1d1184(0x248)]=new CDPApiClient(_0x5a0655);}[a131_0x2c444c(0x1ed)](_0xc3c2b8,_0x622e44){return _0x622e44?_0xc3c2b8:deduplicateJourneysByBundle(_0xc3c2b8);}async[a131_0x2c444c(0x201)](_0x24e870,_0x10d7e8){const _0x3a588c=a131_0x2c444c;try{const _0x488776=await this[_0x3a588c(0x248)][_0x3a588c(0x201)](_0x24e870);return{'journeys':this['applyVersionDeduplication'](_0x488776[_0x3a588c(0x1dc)],_0x10d7e8),'activationStepsById':_0x488776['activationStepsById']};}catch(_0x532647){if(isHttp404Error(_0x532647))return{'journeys':[],'activationStepsById':new Map()};throw _0x532647;}}async['listJourneysFromParentSegment'](_0x17b4a0,_0x216a1f,_0x48bafc){const _0x45f923=a131_0x2c444c;let _0x4bf3df=_0x216a1f;if(!_0x4bf3df)try{const _0x1e279a=await this[_0x45f923(0x248)][_0x45f923(0x244)](_0x17b4a0);_0x4bf3df=_0x1e279a[_0x45f923(0x24b)]??undefined;}catch(_0x4e715d){if(isHttp404Error(_0x4e715d))return[];throw _0x4e715d;}if(!_0x4bf3df)return[];let _0x410319;if(_0x48bafc?.[_0x45f923(0x227)]){const _0x176fce=await this['client'][_0x45f923(0x258)](_0x17b4a0),_0x5a05d1=_0x176fce[_0x45f923(0x24e)](_0x259e8e=>this[_0x45f923(0x248)][_0x45f923(0x223)](_0x259e8e['id'])),_0x1e6021=await Promise[_0x45f923(0x1e7)](_0x5a05d1),_0x55916e=new Set();_0x410319=_0x1e6021[_0x45f923(0x247)]()[_0x45f923(0x1ff)](_0x2d75f1=>{const _0xc0857e=_0x45f923;if(_0x55916e[_0xc0857e(0x1db)](_0x2d75f1['id']))return![];return _0x55916e[_0xc0857e(0x236)](_0x2d75f1['id']),!![];});}else{const _0x5ee2f5=await this[_0x45f923(0x248)][_0x45f923(0x22a)](_0x4bf3df,0x20,![]),_0x364f11=_0x5ee2f5[_0x45f923(0x1d7)],_0x53692d=_0x364f11[_0x45f923(0x1ff)](_0x48d61b=>_0x48d61b[_0x45f923(0x240)]===_0x45f923(0x262));_0x410319=_0x53692d[_0x45f923(0x24e)](_0x2902c3=>entityToJourneyListItem(_0x2902c3,_0x17b4a0));}return this['applyVersionDeduplication'](_0x410319,_0x48bafc?.['includeAllVersions']);}async[a131_0x2c444c(0x1d3)](_0x45ee8f,_0x3bd98a,_0x32e61c){const _0xf3af1d=a131_0x2c444c;if(!_0x3bd98a)return{'journeys':[],'folders':[]};const _0x1097ff=await this[_0xf3af1d(0x248)][_0xf3af1d(0x22a)](_0x3bd98a,0x20,![]),_0x4f9f4e=_0x1097ff['data'],_0x10226e=_0x4f9f4e[_0xf3af1d(0x1ff)](_0x5e2aea=>_0x5e2aea[_0xf3af1d(0x240)]==='folder-segment'&&_0x5e2aea['id']!==_0x3bd98a),_0x57397d=_0x10226e[_0xf3af1d(0x24e)](_0x5362eb=>({'id':_0x5362eb['id'],'name':_0x5362eb['attributes'][_0xf3af1d(0x241)]})),_0x326925=_0x4f9f4e[_0xf3af1d(0x1ff)](_0x270d28=>_0x270d28[_0xf3af1d(0x240)]===_0xf3af1d(0x262)),_0x568d90=_0x326925[_0xf3af1d(0x24e)](_0x473a24=>entityToJourneyListItem(_0x473a24,_0x45ee8f));return{'journeys':this[_0xf3af1d(0x1ed)](_0x568d90,_0x32e61c?.['includeAllVersions']),'folders':_0x57397d};}async[a131_0x2c444c(0x25a)](_0x4ba2e2,_0x258fce){const _0x5049bd=a131_0x2c444c;let _0xbc780d;try{_0xbc780d=await this[_0x5049bd(0x248)]['listSegmentFolders'](_0x4ba2e2);}catch(_0x45d24f){if(isHttp404Error(_0x45d24f))return{'journeys':[],'activationStepsById':new Map()};throw _0x45d24f;}const _0x2a3450=_0xbc780d['map'](async _0x1eba45=>{const _0x2c42d6=_0x5049bd;return await this['listJourneysWithDetails'](_0x1eba45['id'],_0x258fce?.[_0x2c42d6(0x227)]);}),_0x2ed77=await Promise[_0x5049bd(0x1e7)](_0x2a3450),_0x40dde2=new Map(),_0x1b73bd=[];for(const _0x258443 of _0x2ed77){_0x1b73bd[_0x5049bd(0x1df)](..._0x258443['journeys']);for(const [_0x1b9c8c,_0x3662f3]of _0x258443[_0x5049bd(0x226)]){_0x40dde2[_0x5049bd(0x23a)](_0x1b9c8c,_0x3662f3);}}const _0x2ae3ff=new Set(),_0x59ecc1=_0x1b73bd[_0x5049bd(0x1ff)](_0x2a6dba=>{const _0x2d4ea3=_0x5049bd;if(_0x2ae3ff[_0x2d4ea3(0x1db)](_0x2a6dba['id']))return![];return _0x2ae3ff['add'](_0x2a6dba['id']),!![];});return{'journeys':this[_0x5049bd(0x1ed)](_0x59ecc1,_0x258fce?.[_0x5049bd(0x227)]),'activationStepsById':_0x40dde2};}async[a131_0x2c444c(0x206)](_0x53a8ba){const _0xc8d41b=a131_0x2c444c;try{return await this['client']['getJourney'](_0x53a8ba);}catch(_0x326577){if(isHttp404Error(_0x326577))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0xc8d41b(0x1d5)+_0x53a8ba,_0x326577);throw _0x326577;}}async[a131_0x2c444c(0x1e1)](_0xdd933,_0x3b67d4){const _0x319d92=a131_0x2c444c,_0x2a2235=await this['listJourneysFromParentSegment'](_0xdd933),_0x5562a5=_0x2a2235[_0x319d92(0x1f3)](_0x5ce935=>_0x5ce935[_0x319d92(0x22e)][_0x319d92(0x251)]()===_0x3b67d4[_0x319d92(0x251)]());if(!_0x5562a5)throw new SDKError(ErrorCode[_0x319d92(0x216)],_0x319d92(0x1d5)+_0x3b67d4,undefined,{'helpText':_0x319d92(0x24f)});return _0x5562a5['id'];}async['getStatistics'](_0x4aebf2,_0x3eba81){const _0x29b1aa=a131_0x2c444c;try{return await this[_0x29b1aa(0x248)][_0x29b1aa(0x1d1)](_0x4aebf2,_0x3eba81);}catch(_0x2b5551){if(isHttp404Error(_0x2b5551))throw new SDKError(ErrorCode[_0x29b1aa(0x216)],'Journey\x20not\x20found:\x20'+_0x4aebf2,_0x2b5551);throw _0x2b5551;}}async['getTrafficData'](_0x251550,_0x3ed96c){const _0x1d77e8=a131_0x2c444c,_0x4f8289={'from':_0x3ed96c?.[_0x1d77e8(0x1f1)],'to':_0x3ed96c?.['to'],'limit':_0x3ed96c?.[_0x1d77e8(0x255)]},_0x5371e8=_0x3ed96c?.[_0x1d77e8(0x240)]!==_0x1d77e8(0x1dd);try{const [_0x4663b1,_0x49e3b7]=await Promise['all']([this['fetchTrafficRaw'](_0x251550,_0x3ed96c?.[_0x1d77e8(0x240)],_0x4f8289),_0x5371e8?this[_0x1d77e8(0x206)](_0x251550):undefined]);if(_0x4663b1[_0x1d77e8(0x21e)]&&_0x49e3b7){const _0x3f844a=buildStageNameMap(_0x49e3b7);_0x4663b1[_0x1d77e8(0x21e)]=_0x4663b1[_0x1d77e8(0x21e)][_0x1d77e8(0x24e)](_0x46d20c=>({..._0x46d20c,'journeyStageName':_0x3f844a['get'](_0x46d20c[_0x1d77e8(0x1e2)])??_0x46d20c['journeyStageId']}));}return _0x4663b1;}catch(_0x1112a2){if(isHttp404Error(_0x1112a2))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x1d77e8(0x1d5)+_0x251550,_0x1112a2);throw _0x1112a2;}}async[a131_0x2c444c(0x22d)](_0x5cbeb4,_0x407faf,_0x4e39b){const _0x3d0f73=a131_0x2c444c;if(_0x407faf===_0x3d0f73(0x1dd)){const _0x569cf4=await this[_0x3d0f73(0x248)][_0x3d0f73(0x20a)](_0x5cbeb4,_0x4e39b);return{'conversion':_0x569cf4};}if(_0x407faf===_0x3d0f73(0x21e)){const _0xce59b=await this['client'][_0x3d0f73(0x220)](_0x5cbeb4,_0x4e39b);return{'activation':_0xce59b};}const [_0x153d2c,_0x1c45f7]=await Promise[_0x3d0f73(0x1e7)]([this[_0x3d0f73(0x248)][_0x3d0f73(0x20a)](_0x5cbeb4,_0x4e39b),this[_0x3d0f73(0x248)][_0x3d0f73(0x220)](_0x5cbeb4,_0x4e39b)]);return{'conversion':_0x153d2c,'activation':_0x1c45f7};}async[a131_0x2c444c(0x225)](_0x20416a){const _0x496c9b=a131_0x2c444c;try{return await this[_0x496c9b(0x248)][_0x496c9b(0x215)](_0x20416a);}catch(_0x1d9b8c){if(isHttp404Error(_0x1d9b8c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x20416a,_0x1d9b8c);throw _0x1d9b8c;}}async[a131_0x2c444c(0x1fd)](_0x33577e){const _0x546937=a131_0x2c444c;try{return await this['client'][_0x546937(0x261)](_0x33577e);}catch(_0x4d3f79){if(isHttp404Error(_0x4d3f79))throw new SDKError(ErrorCode[_0x546937(0x216)],_0x546937(0x1d5)+_0x33577e,_0x4d3f79);throw _0x4d3f79;}}async['create'](_0x276b3f){return await this['client']['createJourney'](_0x276b3f);}async[a131_0x2c444c(0x232)](_0x50fb77,_0x28495f){const _0x371a8c=a131_0x2c444c;try{return await this[_0x371a8c(0x248)]['updateJourney'](_0x50fb77,_0x28495f);}catch(_0x443d5e){if(isHttp404Error(_0x443d5e))throw new SDKError(ErrorCode[_0x371a8c(0x216)],_0x371a8c(0x1d5)+_0x50fb77,_0x443d5e);throw _0x443d5e;}}async[a131_0x2c444c(0x21f)](_0x4b8398,_0x5d85fc){const _0x4f1e98=a131_0x2c444c;try{return await this[_0x4f1e98(0x248)]['getJourneyActivation'](_0x4b8398,_0x5d85fc);}catch(_0x2053bb){if(isHttp404Error(_0x2053bb))throw new SDKError(ErrorCode[_0x4f1e98(0x208)],_0x4f1e98(0x25b)+_0x5d85fc+_0x4f1e98(0x1e3)+_0x4b8398,_0x2053bb);throw _0x2053bb;}}async['listActivations'](_0x29fb03){const _0x23ea49=a131_0x2c444c;try{return await this['client'][_0x23ea49(0x203)](_0x29fb03);}catch(_0x5561ce){if(isHttp404Error(_0x5561ce))return[];throw _0x5561ce;}}async[a131_0x2c444c(0x24a)](_0x379cd9){const _0x5d2e5f=a131_0x2c444c,_0x2d3045=await this[_0x5d2e5f(0x1f6)](_0x379cd9);return _0x2d3045[_0x5d2e5f(0x24e)](flattenJourneyActivation);}async[a131_0x2c444c(0x1fb)](_0x4a6169,_0x108586){const _0x2f8764=a131_0x2c444c;return await this[_0x2f8764(0x248)][_0x2f8764(0x1f0)](_0x4a6169,_0x108586);}async[a131_0x2c444c(0x222)](_0x25324e){const _0x13319a=a131_0x2c444c,_0x18f681=await this[_0x13319a(0x206)](_0x25324e),_0xa5bc20=generateColumnMapping(_0x18f681);return{'journeyId':_0x18f681['id'],'journeyName':_0x18f681[_0x13319a(0x1e8)]['name'],'database':_0x13319a(0x210)+_0x18f681[_0x13319a(0x1e8)][_0x13319a(0x25d)],'table':_0x13319a(0x23c)+_0x18f681['id'],'columns':_0xa5bc20};}async[a131_0x2c444c(0x24c)](_0x1f5f20){const _0x61b34d=a131_0x2c444c;return this['client'][_0x61b34d(0x1fc)](_0x1f5f20);}async[a131_0x2c444c(0x1ec)](_0x46d3e7){const _0x3c8501=a131_0x2c444c;if(!_0x46d3e7)return undefined;try{const _0x175909=await this['getBundle'](_0x46d3e7);return _0x175909[_0x3c8501(0x23f)];}catch{return undefined;}}async[a131_0x2c444c(0x1fe)](_0xf59bc3){const _0x59bb6e=a131_0x2c444c,_0x37bd8d=await this[_0x59bb6e(0x206)](_0xf59bc3),_0x5e22cb=_0x37bd8d[_0x59bb6e(0x1e8)]['journeyBundleId'];if(!_0x5e22cb)return{'bundleId':'','bundleName':_0x37bd8d['attributes']['name'],'bundleDescription':_0x37bd8d[_0x59bb6e(0x1e8)]['description']??null,'latestJourneyId':_0x37bd8d['id'],'versions':[synthesizePreBundleVersion(_0x37bd8d)]};const _0x49900c=await this['getBundle'](_0x5e22cb);return{'bundleId':_0x5e22cb,'bundleName':_0x49900c[_0x59bb6e(0x241)],'bundleDescription':_0x49900c[_0x59bb6e(0x224)]??null,'latestJourneyId':_0x49900c[_0x59bb6e(0x23f)],'versions':formatVersionsFromBundle(_0x49900c)};}async[a131_0x2c444c(0x1d6)](_0x2fdd48){const _0x25f678=a131_0x2c444c,_0x3648e5=await this[_0x25f678(0x206)](_0x2fdd48),_0x2412c4=_0x3648e5[_0x25f678(0x1e8)][_0x25f678(0x1e0)];if(!_0x2412c4)throw new SDKError(ErrorCode[_0x25f678(0x22b)],_0x25f678(0x254));await this[_0x25f678(0x248)][_0x25f678(0x253)](_0x2412c4);const _0x409e0f=await this['client'][_0x25f678(0x1fc)](_0x2412c4),_0x159069=_0x409e0f[_0x25f678(0x241)]+'\x20v'+(_0x409e0f[_0x25f678(0x259)]+0x1);return this[_0x25f678(0x248)][_0x25f678(0x265)](_0x2412c4,{'sourceId':_0x2fdd48,'attributes':{'name':_0x159069}});}}
|
|
1
|
+
const a131_0x3560f7=a131_0x3a3d;function a131_0x3a3d(_0x4b2782,_0x14ef5c){_0x4b2782=_0x4b2782-0xe3;const _0x3cdf09=a131_0x3cdf();let _0x3a3d3d=_0x3cdf09[_0x4b2782];return _0x3a3d3d;}function a131_0x3cdf(){const _0x546832=['milestoneInflux','values','ABTest','130ypkwzU','excluded','getParentSegmentFull','conversion','createJourneyActivation','getTrafficData','\x20in\x20journey\x20','journeys','entries','conditions','createVersion','activationStepsById','journeyId','getJourneyBundle','WaitStep','listEntitiesByFolder','getBundle','JOURNEY_NOT_FOUND','map','outtime_journey','history','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','step','simulation','entryCriteria','intime_journey','string','add','conditionSegmentId','stage','intime_stage_','14236baBhCK','push','milestone','versionNumber','listJourneys','idx-','updateJourney','_exit_','includeAllVersions','enteredSize','cdp_customer_id','reduce','listJourneyActivations','132027ChgkDu','cdp_audience_','3040239JigvDb','name','15274uDbKPW','draft','parentFolder','filter','create','flat','type','getConversionSankeyChart','resume','description','timedOutPath','listSegmentFolders','folder-segment','9806780djAITa','intime_goal','time','createActivation','Journey\x20not\x20found:\x20','branch','exitCriteria','getJourney','update','waitCondition','getJourneyStatistics','getActivationSankeyChart','replace','all','branches','listJourneysWithDetails','goalInflux','activation','rootFolderId','variant','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','pauseJourney','getLatestJourneyId','state','get','has','Journey\x20activation\x20step\x20not\x20found:\x20','getActivation','attributes','journeyStageId','entryInflux','fetchTrafficRaw','outtime_stage_','exitCriterias','1617516gdKfFY','includeHistory','928OjKhWL','audienceId','relationships','NOT_FOUND','journey_','listActivations','DecisionPoint','exitInflux','segmentFolderId','segmentId','Wait','listActivationsFlat','data','journeyStages','Excluded\x20profiles','from','journey','pause','9ectJYJ','getJourneyActivation','length','jumpInflux','out','resumeJourney','INVALID_ARGUMENT','510508QQLKOq','goalSize','updatedAt','sort','getColumnMapping','applyVersionDeduplication','size','steps','paused','journeyBundleId','set','isArray','listJourneysWithDetailsFromParentSegment','fixed','createdAt','client','launched','goal','exitOrJumpSize'];a131_0x3cdf=function(){return _0x546832;};return a131_0x3cdf();}(function(_0x585109,_0x27cf3e){const _0x2367ca=a131_0x3a3d,_0x3ea0c6=_0x585109();while(!![]){try{const _0x5ebfdc=-parseInt(_0x2367ca(0x11e))/0x1+parseInt(_0x2367ca(0x16c))/0x2+-parseInt(_0x2367ca(0x120))/0x3+parseInt(_0x2367ca(0x111))/0x4*(-parseInt(_0x2367ca(0xf2))/0x5)+parseInt(_0x2367ca(0x151))/0x6+-parseInt(_0x2367ca(0x122))/0x7*(-parseInt(_0x2367ca(0x153))/0x8)+parseInt(_0x2367ca(0x165))/0x9*(parseInt(_0x2367ca(0x12f))/0xa);if(_0x5ebfdc===_0x27cf3e)break;else _0x3ea0c6['push'](_0x3ea0c6['shift']());}catch(_0x1b18e7){_0x3ea0c6['push'](_0x3ea0c6['shift']());}}}(a131_0x3cdf,0x7f1d0));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x462d11){const _0x14c26f=a131_0x3a3d;return _0x462d11[_0x14c26f(0xe5)]??_0x462d11[_0x14c26f(0x14b)]?.[_0x14c26f(0xe5)]??undefined;}function getVersionNumber(_0x1dcb5b){const _0x4cbfbd=a131_0x3a3d;return _0x1dcb5b['versionNumber']??_0x1dcb5b[_0x4cbfbd(0x14b)]?.['versionNumber']??0x0;}function getState(_0x16a98c){const _0x1382a1=a131_0x3a3d;return _0x16a98c[_0x1382a1(0x146)]??_0x16a98c[_0x1382a1(0x14b)]?.[_0x1382a1(0x146)];}export function deduplicateJourneysByBundle(_0x224215){const _0x28dc5f=a131_0x3a3d,_0x2feffe=new Map();let _0x2a5506=0x0;for(const _0x5113e3 of _0x224215){const _0x47993a=getBundleId(_0x5113e3);if(!_0x47993a){const _0x123e68='no-bundle-'+(_0x5113e3['id']??_0x28dc5f(0x116)+_0x2a5506++);_0x2feffe[_0x28dc5f(0xe6)](_0x123e68,_0x5113e3);continue;}const _0xc02ee=_0x2feffe[_0x28dc5f(0x147)](_0x47993a);if(!_0xc02ee)_0x2feffe[_0x28dc5f(0xe6)](_0x47993a,_0x5113e3);else{const _0x6e154b=getState(_0xc02ee)===_0x28dc5f(0xec),_0x525f20=getState(_0x5113e3)===_0x28dc5f(0xec);if(_0x525f20&&!_0x6e154b)_0x2feffe[_0x28dc5f(0xe6)](_0x47993a,_0x5113e3);else{if(!_0x525f20&&_0x6e154b){}else{const _0xd3c35d=getVersionNumber(_0xc02ee),_0x1e674f=getVersionNumber(_0x5113e3);_0x1e674f>_0xd3c35d&&_0x2feffe[_0x28dc5f(0xe6)](_0x47993a,_0x5113e3);}}}}return Array[_0x28dc5f(0x162)](_0x2feffe[_0x28dc5f(0xf0)]());}const VALID_JOURNEY_STATES=new Set(['draft',a131_0x3560f7(0x109),a131_0x3560f7(0xec)]);export function parseJourneyState(_0x1cd009){const _0xf2bb73=a131_0x3560f7;if(typeof _0x1cd009===_0xf2bb73(0x10c)&&VALID_JOURNEY_STATES['has'](_0x1cd009))return _0x1cd009;return _0xf2bb73(0x123);}export function entityToJourneyListItem(_0x18acde,_0x3031c4){const _0x8675d4=a131_0x3560f7,_0x1061d1=_0x18acde[_0x8675d4(0x14b)];return{'id':_0x18acde['id'],'name':_0x1061d1['name']??'','journeyBundleName':_0x1061d1['journeyBundleName']??_0x1061d1[_0x8675d4(0x121)]??'','journeyBundleId':_0x1061d1[_0x8675d4(0xe5)]??'','versionNumber':_0x1061d1[_0x8675d4(0x114)],'description':_0x1061d1[_0x8675d4(0x12b)]??null,'state':parseJourneyState(_0x1061d1[_0x8675d4(0x146)]),'paused':_0x1061d1[_0x8675d4(0xe4)]??![],'audienceId':_0x3031c4,'folderId':_0x1061d1[_0x8675d4(0x15b)]??_0x18acde[_0x8675d4(0x155)]?.[_0x8675d4(0x124)]?.[_0x8675d4(0x15f)]?.['id']??null,'createdAt':_0x1061d1['createdAt']??'','updatedAt':_0x1061d1['updatedAt']??''};}function convertToColumnId(_0x527bd7){const _0xe93955=a131_0x3560f7;return _0x527bd7[_0xe93955(0x13b)](/-/g,'_');}function getStepEntries(_0x194b4a){const _0x4307cc=a131_0x3560f7;if(!_0x194b4a)return[];if(Array['isArray'](_0x194b4a))return _0x194b4a[_0x4307cc(0x104)](_0x2af22a=>[_0x2af22a['id'],_0x2af22a]);return Object[_0x4307cc(0xfa)](_0x194b4a);}export function flattenJourneyActivation(_0x5e2f5a){const _0x42d792=a131_0x3560f7,{activationParams:_0x18349d,activationId:_0x570eb9,runAfterJourneyRefresh:_0x29b264}=_0x5e2f5a[_0x42d792(0x14b)];return{'id':_0x5e2f5a['id'],'activationId':_0x570eb9,'runAfterJourneyRefresh':_0x29b264,..._0x18349d};}function col(_0x1eb0e0,_0x50db24={}){const _0x3dc7f3=a131_0x3560f7;return{'column':_0x1eb0e0,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3dc7f3(0xe9),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x50db24};}export function generateColumnMapping(_0x92e7fe){const _0x10f193=a131_0x3560f7,_0xd18a32=[];_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x11b))),_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x10b),{'direction':'in','category':_0x10f193(0x163)})),_0xd18a32['push'](col(_0x10f193(0x105),{'direction':'out','category':_0x10f193(0x163)}));_0x92e7fe[_0x10f193(0x14b)][_0x10f193(0xed)]&&_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x130),{'direction':'in','category':_0x10f193(0xed),'detail':_0x92e7fe[_0x10f193(0x14b)]['goal']['name']||null}));const _0x2ba63e=_0x92e7fe[_0x10f193(0x14b)][_0x10f193(0x160)]||[];for(let _0x184b32=0x0;_0x184b32<_0x2ba63e[_0x10f193(0x167)];_0x184b32++){const _0x2154aa=_0x2ba63e[_0x184b32],_0x78ba88=_0x2154aa[_0x10f193(0x121)],_0x5082b3={'stageIndex':_0x184b32,'stageName':_0x78ba88},_0x282ae7=_0x2154aa[_0x10f193(0x10a)]?.[_0x10f193(0x121)]||null;_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32,{..._0x5082b3,'direction':'in','category':'stage','detail':_0x282ae7})),_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x14f)+_0x184b32,{..._0x5082b3,'direction':_0x10f193(0x169),'category':_0x10f193(0x10f),'detail':_0x282ae7}));_0x2154aa[_0x10f193(0x113)]&&_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32+'_milestone',{..._0x5082b3,'direction':'in','category':_0x10f193(0x113),'detail':_0x2154aa[_0x10f193(0x113)]['name']||null}));const _0x1223b2=_0x2154aa[_0x10f193(0x150)]||_0x2154aa[_0x10f193(0x135)]||[];for(let _0x6053c=0x0;_0x6053c<_0x1223b2[_0x10f193(0x167)];_0x6053c++){_0xd18a32[_0x10f193(0x112)](col('intime_stage_'+_0x184b32+_0x10f193(0x118)+_0x6053c,{..._0x5082b3,'direction':'in','category':'exit_criteria','detail':_0x1223b2[_0x6053c]['name']||null}));}const _0x586193=getStepEntries(_0x2154aa[_0x10f193(0xe3)]);for(const [_0x36d7aa,_0x3eae6f]of _0x586193){const _0x4e0d90=convertToColumnId(_0x36d7aa),_0x33583f=_0x3eae6f['type']||null,_0xc88f3b=_0x3eae6f[_0x10f193(0x121)]||null,_0x524c4c={..._0x5082b3,'stepType':_0x33583f,'stepName':_0xc88f3b,'stepId':_0x36d7aa};_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32+'_'+_0x4e0d90,{..._0x524c4c,'direction':'in','category':_0x10f193(0x108)})),_0xd18a32['push'](col(_0x10f193(0x14f)+_0x184b32+'_'+_0x4e0d90,{..._0x524c4c,'direction':_0x10f193(0x169),'category':'step'}));if(_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0x159)&&_0x3eae6f[_0x10f193(0x13d)])for(const _0x32c1c8 of _0x3eae6f[_0x10f193(0x13d)]){_0x32c1c8[_0x10f193(0x15c)]&&_0xd18a32['push'](col('intime_stage_'+_0x184b32+'_'+_0x4e0d90+'_'+_0x32c1c8[_0x10f193(0x15c)],{..._0x524c4c,'direction':'in','category':_0x10f193(0x134),'detail':_0x32c1c8[_0x10f193(0x121)]||(_0x32c1c8[_0x10f193(0xf3)]?_0x10f193(0x161):null)}));}if((_0x3eae6f[_0x10f193(0x128)]==='AbTest'||_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0xf1))&&_0x3eae6f['variants'])for(const _0x4435d4 of _0x3eae6f['variants']){_0x4435d4['id']&&_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32+'_'+_0x4e0d90+'_variant_'+convertToColumnId(_0x4435d4['id']),{..._0x524c4c,'direction':'in','category':_0x10f193(0x142),'detail':_0x4435d4['name']||null}));}if(_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0x100)||_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0x15d)){const _0x196828=[];if(_0x3eae6f['conditionSegmentId'])_0x196828['push'](_0x3eae6f[_0x10f193(0x10e)]);else{if(Array[_0x10f193(0xe7)](_0x3eae6f[_0x10f193(0xfb)]))for(const _0x5c2d35 of _0x3eae6f[_0x10f193(0xfb)]){_0x5c2d35['segmentId']&&!_0x5c2d35[_0x10f193(0x12c)]&&_0x196828[_0x10f193(0x112)](_0x5c2d35[_0x10f193(0x15c)]);}else _0x3eae6f[_0x10f193(0x138)]?.['segmentId']&&_0x196828[_0x10f193(0x112)](_0x3eae6f[_0x10f193(0x138)][_0x10f193(0x15c)]);}for(const _0x4e0de7 of _0x196828){_0xd18a32['push'](col(_0x10f193(0x110)+_0x184b32+'_'+_0x4e0d90+'_'+_0x4e0de7,{..._0x524c4c,'direction':'in','category':_0x10f193(0x134)}));}}}}return _0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x131))),_0xd18a32;}export function aggregateJourneyHistory(_0x1f1cd5){const _0x736a70=a131_0x3560f7,_0x2d1666=_0x1f1cd5[_0x736a70(0x11c)]((_0x15d891,_0x24c353)=>_0x15d891+(_0x24c353[_0x736a70(0x14d)]??0x0),0x0),_0xc0f88=_0x1f1cd5['reduce']((_0x9d97ee,_0x4408a0)=>_0x9d97ee+(_0x4408a0[_0x736a70(0x13f)]??0x0),0x0),_0x2631eb=_0x1f1cd5[_0x736a70(0x11c)]((_0x4905f0,_0x1bfa3b)=>_0x4905f0+((_0x1bfa3b[_0x736a70(0x15a)]??0x0)+(_0x1bfa3b[_0x736a70(0x168)]??0x0)),0x0),_0x12719b=_0x1f1cd5[_0x1f1cd5[_0x736a70(0x167)]-0x1];return{'size':_0x12719b?.['size']??0x0,'entered':_0x2d1666,'goal_achieved':_0xc0f88,'completion_rate':_0xc0f88&&_0x2d1666?_0xc0f88/_0x2d1666*0x64:0x0,'exit_or_jump':_0x2631eb,'exit_or_jump_rate':_0x2631eb&&_0x2d1666?_0x2631eb/_0x2d1666*0x64:0x0};}export function aggregateStageHistory(_0x2a0610){const _0x515831=a131_0x3560f7,_0x1b8824=_0x2a0610[_0x515831(0x11c)]((_0x381b3a,_0x217292)=>_0x381b3a+(_0x217292[_0x515831(0x14d)]??0x0),0x0),_0x39e3c1=_0x2a0610[_0x515831(0x11c)]((_0xdbba1b,_0x3f17b4)=>_0xdbba1b+(_0x3f17b4[_0x515831(0xef)]??0x0),0x0),_0x38d9fd=_0x2a0610['reduce']((_0x139019,_0x2af857)=>_0x139019+((_0x2af857[_0x515831(0x15a)]??0x0)+(_0x2af857[_0x515831(0x168)]??0x0)),0x0),_0x2e2788=_0x2a0610[_0x2a0610[_0x515831(0x167)]-0x1];return{'size':_0x2e2788?.[_0x515831(0x172)]??0x0,'entered':_0x1b8824,'milestone':_0x39e3c1,'milestone_rate':_0x39e3c1&&_0x1b8824?_0x39e3c1/_0x1b8824*0x64:0x0,'exit_or_jump':_0x38d9fd,'exit_or_jump_rate':_0x38d9fd&&_0x1b8824?_0x38d9fd/_0x1b8824*0x64:0x0};}export function assembleJourneyStats(_0x41b633,_0x2e1f21){const _0x147766=a131_0x3560f7,_0x17f873=!!(_0x2e1f21?.['from']||_0x2e1f21?.['to'])&&!!_0x41b633[_0x147766(0x106)]?.[_0x147766(0x167)];if(_0x17f873){const _0x288873=aggregateJourneyHistory(_0x41b633[_0x147766(0x106)]),_0x52ffd3={'journey_id':_0x41b633[_0x147766(0xfe)],..._0x2e1f21?.[_0x147766(0x162)]&&{'from':_0x2e1f21[_0x147766(0x162)]},..._0x2e1f21?.['to']&&{'to':_0x2e1f21['to']},..._0x288873};return _0x2e1f21?.[_0x147766(0x152)]&&(_0x52ffd3[_0x147766(0x106)]=_0x41b633['history']),_0x52ffd3;}return{'journey_id':_0x41b633['journeyId'],'size':_0x41b633[_0x147766(0x172)],'entered':_0x41b633[_0x147766(0x11a)],'goal_achieved':_0x41b633[_0x147766(0x16d)],'completion_rate':_0x41b633['completionRate'],'exit_or_jump':_0x41b633[_0x147766(0xee)],'exit_or_jump_rate':_0x41b633['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x48026f){const _0x53a828=a131_0x3560f7,_0x4aac3c=_0x48026f[_0x53a828(0xf9)]['map'](_0x460bf1=>({'journeyId':_0x460bf1['id'],'versionNumber':_0x460bf1['attributes'][_0x53a828(0x114)]??0x0,'name':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0x121)],'state':_0x460bf1['attributes'][_0x53a828(0x146)],'paused':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0xe4)],'createdAt':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0xea)],'updatedAt':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0x16e)]}));return _0x4aac3c[_0x53a828(0x16f)]((_0x4e4827,_0xa55391)=>_0x4e4827[_0x53a828(0x114)]-_0xa55391[_0x53a828(0x114)]),_0x4aac3c;}export function synthesizePreBundleVersion(_0x1cbd41){const _0x20b07c=a131_0x3560f7;return{'journeyId':_0x1cbd41['id'],'versionNumber':0x1,'name':_0x1cbd41[_0x20b07c(0x14b)][_0x20b07c(0x121)],'state':_0x1cbd41[_0x20b07c(0x14b)][_0x20b07c(0x146)],'paused':_0x1cbd41['attributes'][_0x20b07c(0xe4)],'createdAt':_0x1cbd41[_0x20b07c(0x14b)][_0x20b07c(0xea)],'updatedAt':_0x1cbd41[_0x20b07c(0x14b)]['updatedAt']};}export function buildStageNameMap(_0x4618fe){const _0x23a82b=a131_0x3560f7;return new Map(_0x4618fe[_0x23a82b(0x14b)][_0x23a82b(0x160)]?.[_0x23a82b(0x104)](_0x452376=>[_0x452376['id'],_0x452376[_0x23a82b(0x121)]])??[]);}export class JourneySDK{[a131_0x3560f7(0xeb)];constructor(_0x1d1697){this['client']=new CDPApiClient(_0x1d1697);}['applyVersionDeduplication'](_0x124031,_0x332115){return _0x332115?_0x124031:deduplicateJourneysByBundle(_0x124031);}async[a131_0x3560f7(0x13e)](_0xa77843,_0x5c8d44){const _0x48e4fa=a131_0x3560f7;try{const _0xa5aa6a=await this['client'][_0x48e4fa(0x13e)](_0xa77843);return{'journeys':this[_0x48e4fa(0x171)](_0xa5aa6a[_0x48e4fa(0xf9)],_0x5c8d44),'activationStepsById':_0xa5aa6a[_0x48e4fa(0xfd)]};}catch(_0x55399d){if(isHttp404Error(_0x55399d))return{'journeys':[],'activationStepsById':new Map()};throw _0x55399d;}}async['listJourneysFromParentSegment'](_0x9c3df8,_0x2a8898,_0x1da7bc){const _0x34a052=a131_0x3560f7;let _0x2769e7=_0x2a8898;if(!_0x2769e7)try{const _0x448c57=await this['client'][_0x34a052(0xf4)](_0x9c3df8);_0x2769e7=_0x448c57[_0x34a052(0x141)]??undefined;}catch(_0x15635a){if(isHttp404Error(_0x15635a))return[];throw _0x15635a;}if(!_0x2769e7)return[];let _0x41d0c7;if(_0x1da7bc?.[_0x34a052(0x119)]){const _0x22fa0e=await this[_0x34a052(0xeb)][_0x34a052(0x12d)](_0x9c3df8),_0x2e509c=_0x22fa0e[_0x34a052(0x104)](_0x558400=>this[_0x34a052(0xeb)][_0x34a052(0x115)](_0x558400['id'])),_0x1fe156=await Promise['all'](_0x2e509c),_0x586f22=new Set();_0x41d0c7=_0x1fe156[_0x34a052(0x127)]()[_0x34a052(0x125)](_0x46f552=>{const _0x2f4496=_0x34a052;if(_0x586f22[_0x2f4496(0x148)](_0x46f552['id']))return![];return _0x586f22[_0x2f4496(0x10d)](_0x46f552['id']),!![];});}else{const _0x569d70=await this[_0x34a052(0xeb)][_0x34a052(0x101)](_0x2769e7,0x20,![]),_0x156345=_0x569d70[_0x34a052(0x15f)],_0x4a9290=_0x156345['filter'](_0x466668=>_0x466668[_0x34a052(0x128)]===_0x34a052(0x163));_0x41d0c7=_0x4a9290[_0x34a052(0x104)](_0x503844=>entityToJourneyListItem(_0x503844,_0x9c3df8));}return this[_0x34a052(0x171)](_0x41d0c7,_0x1da7bc?.[_0x34a052(0x119)]);}async['listJourneysWithFolders'](_0x2a70e2,_0x3e9bc3,_0x3dc5c6){const _0x213938=a131_0x3560f7;if(!_0x3e9bc3)return{'journeys':[],'folders':[]};const _0x319510=await this[_0x213938(0xeb)][_0x213938(0x101)](_0x3e9bc3,0x20,![]),_0x23a2f5=_0x319510[_0x213938(0x15f)],_0x221929=_0x23a2f5['filter'](_0xcc71a5=>_0xcc71a5['type']===_0x213938(0x12e)&&_0xcc71a5['id']!==_0x3e9bc3),_0x34d159=_0x221929[_0x213938(0x104)](_0x976b57=>({'id':_0x976b57['id'],'name':_0x976b57[_0x213938(0x14b)]['name']})),_0x47594b=_0x23a2f5[_0x213938(0x125)](_0x43ae9e=>_0x43ae9e[_0x213938(0x128)]==='journey'),_0x3f0ae7=_0x47594b[_0x213938(0x104)](_0x51942b=>entityToJourneyListItem(_0x51942b,_0x2a70e2));return{'journeys':this[_0x213938(0x171)](_0x3f0ae7,_0x3dc5c6?.[_0x213938(0x119)]),'folders':_0x34d159};}async[a131_0x3560f7(0xe8)](_0xa69766,_0x49dc67){const _0x2a14ff=a131_0x3560f7;let _0x4685de;try{_0x4685de=await this[_0x2a14ff(0xeb)][_0x2a14ff(0x12d)](_0xa69766);}catch(_0x492697){if(isHttp404Error(_0x492697))return{'journeys':[],'activationStepsById':new Map()};throw _0x492697;}const _0x59e3a4=_0x4685de[_0x2a14ff(0x104)](async _0xe6313b=>{const _0x2d1a8b=_0x2a14ff;return await this[_0x2d1a8b(0x13e)](_0xe6313b['id'],_0x49dc67?.[_0x2d1a8b(0x119)]);}),_0x41d1ab=await Promise[_0x2a14ff(0x13c)](_0x59e3a4),_0x296bf=new Map(),_0x52a87d=[];for(const _0xea74c7 of _0x41d1ab){_0x52a87d['push'](..._0xea74c7['journeys']);for(const [_0x1d6c50,_0x35ab70]of _0xea74c7[_0x2a14ff(0xfd)]){_0x296bf[_0x2a14ff(0xe6)](_0x1d6c50,_0x35ab70);}}const _0x418388=new Set(),_0x15c761=_0x52a87d[_0x2a14ff(0x125)](_0x17692d=>{const _0x1e2668=_0x2a14ff;if(_0x418388[_0x1e2668(0x148)](_0x17692d['id']))return![];return _0x418388[_0x1e2668(0x10d)](_0x17692d['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x15c761,_0x49dc67?.[_0x2a14ff(0x119)]),'activationStepsById':_0x296bf};}async['getJourney'](_0x1c9c1f){const _0x180dc0=a131_0x3560f7;try{return await this[_0x180dc0(0xeb)][_0x180dc0(0x136)](_0x1c9c1f);}catch(_0x42ddbb){if(isHttp404Error(_0x42ddbb))throw new SDKError(ErrorCode[_0x180dc0(0x103)],'Journey\x20not\x20found:\x20'+_0x1c9c1f,_0x42ddbb);throw _0x42ddbb;}}async['resolveJourneyId'](_0x321b65,_0x1562f9){const _0x1e273e=a131_0x3560f7,_0xf94ab6=await this['listJourneysFromParentSegment'](_0x321b65),_0x3aec83=_0xf94ab6['find'](_0x2d76e9=>_0x2d76e9['journeyBundleName']['toLowerCase']()===_0x1562f9['toLowerCase']());if(!_0x3aec83)throw new SDKError(ErrorCode[_0x1e273e(0x103)],_0x1e273e(0x133)+_0x1562f9,undefined,{'helpText':_0x1e273e(0x107)});return _0x3aec83['id'];}async['getStatistics'](_0x67fde7,_0x8a017c){const _0x3c2e11=a131_0x3560f7;try{return await this[_0x3c2e11(0xeb)][_0x3c2e11(0x139)](_0x67fde7,_0x8a017c);}catch(_0x49dcd4){if(isHttp404Error(_0x49dcd4))throw new SDKError(ErrorCode[_0x3c2e11(0x103)],'Journey\x20not\x20found:\x20'+_0x67fde7,_0x49dcd4);throw _0x49dcd4;}}async[a131_0x3560f7(0xf7)](_0x50c133,_0x767292){const _0x205f67=a131_0x3560f7,_0x319c5a={'from':_0x767292?.['from'],'to':_0x767292?.['to'],'limit':_0x767292?.['limit']},_0x5e1271=_0x767292?.[_0x205f67(0x128)]!==_0x205f67(0xf5);try{const [_0x49e862,_0x592719]=await Promise[_0x205f67(0x13c)]([this[_0x205f67(0x14e)](_0x50c133,_0x767292?.[_0x205f67(0x128)],_0x319c5a),_0x5e1271?this[_0x205f67(0x136)](_0x50c133):undefined]);if(_0x49e862['activation']&&_0x592719){const _0x5aa69c=buildStageNameMap(_0x592719);_0x49e862[_0x205f67(0x140)]=_0x49e862['activation'][_0x205f67(0x104)](_0x1a6b75=>({..._0x1a6b75,'journeyStageName':_0x5aa69c[_0x205f67(0x147)](_0x1a6b75[_0x205f67(0x14c)])??_0x1a6b75[_0x205f67(0x14c)]}));}return _0x49e862;}catch(_0x16c811){if(isHttp404Error(_0x16c811))throw new SDKError(ErrorCode[_0x205f67(0x103)],_0x205f67(0x133)+_0x50c133,_0x16c811);throw _0x16c811;}}async[a131_0x3560f7(0x14e)](_0xdc9120,_0x19a839,_0x58bc42){const _0x303377=a131_0x3560f7;if(_0x19a839===_0x303377(0xf5)){const _0x5b00ea=await this[_0x303377(0xeb)][_0x303377(0x129)](_0xdc9120,_0x58bc42);return{'conversion':_0x5b00ea};}if(_0x19a839===_0x303377(0x140)){const _0x595520=await this[_0x303377(0xeb)][_0x303377(0x13a)](_0xdc9120,_0x58bc42);return{'activation':_0x595520};}const [_0x2a379b,_0x2a451f]=await Promise[_0x303377(0x13c)]([this[_0x303377(0xeb)][_0x303377(0x129)](_0xdc9120,_0x58bc42),this[_0x303377(0xeb)][_0x303377(0x13a)](_0xdc9120,_0x58bc42)]);return{'conversion':_0x2a379b,'activation':_0x2a451f};}async[a131_0x3560f7(0x164)](_0x1d4261){const _0x299dbc=a131_0x3560f7;try{return await this[_0x299dbc(0xeb)][_0x299dbc(0x144)](_0x1d4261);}catch(_0x26cb06){if(isHttp404Error(_0x26cb06))throw new SDKError(ErrorCode[_0x299dbc(0x103)],_0x299dbc(0x133)+_0x1d4261,_0x26cb06);throw _0x26cb06;}}async[a131_0x3560f7(0x12a)](_0x1e9629){const _0x400749=a131_0x3560f7;try{return await this[_0x400749(0xeb)][_0x400749(0x16a)](_0x1e9629);}catch(_0x5bb4b8){if(isHttp404Error(_0x5bb4b8))throw new SDKError(ErrorCode[_0x400749(0x103)],'Journey\x20not\x20found:\x20'+_0x1e9629,_0x5bb4b8);throw _0x5bb4b8;}}async[a131_0x3560f7(0x126)](_0x34479f){const _0x58b965=a131_0x3560f7;return await this[_0x58b965(0xeb)]['createJourney'](_0x34479f);}async[a131_0x3560f7(0x137)](_0x6047a2,_0x299a8c){const _0x26aca6=a131_0x3560f7;try{return await this[_0x26aca6(0xeb)][_0x26aca6(0x117)](_0x6047a2,_0x299a8c);}catch(_0x31cb4f){if(isHttp404Error(_0x31cb4f))throw new SDKError(ErrorCode[_0x26aca6(0x103)],'Journey\x20not\x20found:\x20'+_0x6047a2,_0x31cb4f);throw _0x31cb4f;}}async[a131_0x3560f7(0x14a)](_0x524b0c,_0x5646fe){const _0x24b149=a131_0x3560f7;try{return await this[_0x24b149(0xeb)][_0x24b149(0x166)](_0x524b0c,_0x5646fe);}catch(_0x1f70c8){if(isHttp404Error(_0x1f70c8))throw new SDKError(ErrorCode[_0x24b149(0x156)],_0x24b149(0x149)+_0x5646fe+_0x24b149(0xf8)+_0x524b0c,_0x1f70c8);throw _0x1f70c8;}}async['listActivations'](_0x4222c8){const _0x371412=a131_0x3560f7;try{return await this[_0x371412(0xeb)][_0x371412(0x11d)](_0x4222c8);}catch(_0x2ceaec){if(isHttp404Error(_0x2ceaec))return[];throw _0x2ceaec;}}async[a131_0x3560f7(0x15e)](_0x2ff022){const _0x12c53b=a131_0x3560f7,_0xc0769d=await this[_0x12c53b(0x158)](_0x2ff022);return _0xc0769d[_0x12c53b(0x104)](flattenJourneyActivation);}async[a131_0x3560f7(0x132)](_0x447a42,_0x51acfc){const _0x355413=a131_0x3560f7;return await this[_0x355413(0xeb)][_0x355413(0xf6)](_0x447a42,_0x51acfc);}async[a131_0x3560f7(0x170)](_0x5a33dc){const _0x547813=a131_0x3560f7,_0x3439f8=await this[_0x547813(0x136)](_0x5a33dc),_0x478119=generateColumnMapping(_0x3439f8);return{'journeyId':_0x3439f8['id'],'journeyName':_0x3439f8[_0x547813(0x14b)]['name'],'database':_0x547813(0x11f)+_0x3439f8[_0x547813(0x14b)][_0x547813(0x154)],'table':_0x547813(0x157)+_0x3439f8['id'],'columns':_0x478119};}async[a131_0x3560f7(0x102)](_0x146c37){const _0x3fa6da=a131_0x3560f7;return this[_0x3fa6da(0xeb)][_0x3fa6da(0xff)](_0x146c37);}async[a131_0x3560f7(0x145)](_0x386479){const _0x32bf9b=a131_0x3560f7;if(!_0x386479)return undefined;try{const _0x1b47ce=await this[_0x32bf9b(0x102)](_0x386479);return _0x1b47ce['latestJourneyId'];}catch{return undefined;}}async['listVersions'](_0x4c83e8){const _0x24750f=a131_0x3560f7,_0x47c11e=await this[_0x24750f(0x136)](_0x4c83e8),_0x5a2781=_0x47c11e['attributes'][_0x24750f(0xe5)];if(!_0x5a2781)return{'bundleId':'','bundleName':_0x47c11e[_0x24750f(0x14b)][_0x24750f(0x121)],'bundleDescription':_0x47c11e[_0x24750f(0x14b)][_0x24750f(0x12b)]??null,'latestJourneyId':_0x47c11e['id'],'versions':[synthesizePreBundleVersion(_0x47c11e)]};const _0x3ae144=await this[_0x24750f(0x102)](_0x5a2781);return{'bundleId':_0x5a2781,'bundleName':_0x3ae144[_0x24750f(0x121)],'bundleDescription':_0x3ae144['description']??null,'latestJourneyId':_0x3ae144['latestJourneyId'],'versions':formatVersionsFromBundle(_0x3ae144)};}async[a131_0x3560f7(0xfc)](_0x12ab01){const _0x240f8d=a131_0x3560f7,_0x1f257c=await this['getJourney'](_0x12ab01),_0x581db3=_0x1f257c['attributes'][_0x240f8d(0xe5)];if(!_0x581db3)throw new SDKError(ErrorCode[_0x240f8d(0x16b)],_0x240f8d(0x143));await this['client']['checkJourneyAppendable'](_0x581db3);const _0x5d9abd=await this[_0x240f8d(0xeb)][_0x240f8d(0xff)](_0x581db3),_0x3e125d=_0x5d9abd[_0x240f8d(0x121)]+'\x20v'+(_0x5d9abd['lastVersionNumber']+0x1);return this['client']['createJourneyVersion'](_0x581db3,{'sourceId':_0x12ab01,'attributes':{'name':_0x3e125d}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x1cd385=a132_0xaf40;(function(_0x302eae,_0x28223d){const _0x276f00=a132_0xaf40,_0x38426d=_0x302eae();while(!![]){try{const _0x5d34f5=parseInt(_0x276f00(0x1f3))/0x1*(-parseInt(_0x276f00(0x1eb))/0x2)+-parseInt(_0x276f00(0x1f4))/0x3*(parseInt(_0x276f00(0x1f5))/0x4)+parseInt(_0x276f00(0x1f1))/0x5*(-parseInt(_0x276f00(0x1ee))/0x6)+parseInt(_0x276f00(0x1ef))/0x7+-parseInt(_0x276f00(0x1fa))/0x8*(parseInt(_0x276f00(0x1ed))/0x9)+-parseInt(_0x276f00(0x1f8))/0xa*(-parseInt(_0x276f00(0x1f2))/0xb)+-parseInt(_0x276f00(0x1f6))/0xc*(-parseInt(_0x276f00(0x1f0))/0xd);if(_0x5d34f5===_0x28223d)break;else _0x38426d['push'](_0x38426d['shift']());}catch(_0x391f4a){_0x38426d['push'](_0x38426d['shift']());}}}(a132_0x1d21,0x1cd72));function a132_0xaf40(_0x1ae30a,_0x3b2550){_0x1ae30a=_0x1ae30a-0x1eb;const _0x1d2168=a132_0x1d21();let _0xaf40d=_0x1d2168[_0x1ae30a];return _0xaf40d;}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache('last_chat_id',a132_0x1cd385(0x1ec));function a132_0x1d21(){const _0x4c0d38=['78617ckFVhE','1evpGdD','138XsMjvO','2532XtdOfL','156lUUJSW','write','50qjxnFs','read','429344jXlYLo','426414faQVkP','llm/chat','9aHHHRY','30HAeEZq','1137360OYahfw','262613RXmpVD','46705aQZvMO'];a132_0x1d21=function(){return _0x4c0d38;};return a132_0x1d21();}export function saveLastChatId(_0xb5bfac){const _0x4eb343=a132_0x1cd385;chatIdCache[_0x4eb343(0x1f7)](_0xb5bfac);}export function loadLastChatId(){const _0x3cdadc=a132_0x1cd385;return chatIdCache[_0x3cdadc(0x1f9)]();}export function clearLastChatId(){chatIdCache['clear']();}
|