@treasuredata/tdx 2026.3.35 → 2026.3.36
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/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.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a131_0x42d19c=a131_0x28e5;(function(_0x47cf8f,_0x48cc88){const _0x2a713a=a131_0x28e5,_0x888a00=_0x47cf8f();while(!![]){try{const _0xb391f3=parseInt(_0x2a713a(0x174))/0x1+parseInt(_0x2a713a(0x169))/0x2*(parseInt(_0x2a713a(0x1bf))/0x3)+parseInt(_0x2a713a(0x1c3))/0x4+-parseInt(_0x2a713a(0x1c6))/0x5+-parseInt(_0x2a713a(0x1d6))/0x6+-parseInt(_0x2a713a(0x1d1))/0x7+-parseInt(_0x2a713a(0x1ac))/0x8*(-parseInt(_0x2a713a(0x1c9))/0x9);if(_0xb391f3===_0x48cc88)break;else _0x888a00['push'](_0x888a00['shift']());}catch(_0xba56a6){_0x888a00['push'](_0x888a00['shift']());}}}(a131_0xc1f9,0x64c80));import{CDPApiClient}from'./client/cdp-api-client.js';function a131_0x28e5(_0x113465,_0x48f2fa){_0x113465=_0x113465-0x152;const _0xc1f90c=a131_0xc1f9();let _0x28e539=_0xc1f90c[_0x113465];return _0x28e539;}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x2908ac){const _0x237a64=a131_0x28e5;return _0x2908ac[_0x237a64(0x18a)]??_0x2908ac[_0x237a64(0x195)]?.[_0x237a64(0x18a)]??undefined;}function getVersionNumber(_0x226834){const _0x5e9138=a131_0x28e5;return _0x226834['versionNumber']??_0x226834[_0x5e9138(0x195)]?.['versionNumber']??0x0;}function getState(_0x20a8bf){const _0x1d80dc=a131_0x28e5;return _0x20a8bf[_0x1d80dc(0x166)]??_0x20a8bf[_0x1d80dc(0x195)]?.[_0x1d80dc(0x166)];}export function deduplicateJourneysByBundle(_0x57562a){const _0x3e4d1b=a131_0x28e5,_0x2ff0e1=new Map();let _0x4c6cee=0x0;for(const _0x315ec2 of _0x57562a){const _0x12db2b=getBundleId(_0x315ec2);if(!_0x12db2b){const _0x4d2442='no-bundle-'+(_0x315ec2['id']??_0x3e4d1b(0x1a6)+_0x4c6cee++);_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x4d2442,_0x315ec2);continue;}const _0xc5eb6a=_0x2ff0e1['get'](_0x12db2b);if(!_0xc5eb6a)_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x12db2b,_0x315ec2);else{const _0x157583=getState(_0xc5eb6a)==='launched',_0x4c9d02=getState(_0x315ec2)===_0x3e4d1b(0x17d);if(_0x4c9d02&&!_0x157583)_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x12db2b,_0x315ec2);else{if(!_0x4c9d02&&_0x157583){}else{const _0x18ab2e=getVersionNumber(_0xc5eb6a),_0x37cc58=getVersionNumber(_0x315ec2);_0x37cc58>_0x18ab2e&&_0x2ff0e1['set'](_0x12db2b,_0x315ec2);}}}}return Array[_0x3e4d1b(0x1d0)](_0x2ff0e1[_0x3e4d1b(0x183)]());}const VALID_JOURNEY_STATES=new Set([a131_0x42d19c(0x19d),a131_0x42d19c(0x16e),a131_0x42d19c(0x17d)]);function a131_0xc1f9(){const _0x198515=['variants','getBundle','listEntitiesByFolder','goalInflux','string','createActivation','exitOrJumpSize','DecisionPoint','idx-','createJourneyVersion','intime_goal','listJourneyActivations','journeyId','goalSize','57464SieBjc','resumeJourney','listJourneysWithDetailsFromParentSegment','fixed','out','Wait','history','pauseJourney','updatedAt','set','_exit_','sort','push','getJourneyBundle','audienceId','outtime_journey','flat','listJourneys','relationships','276XjgMmk','activation','completionRate','Journey\x20not\x20found:\x20','210560aYvbNn','pause','waitCondition','442595ypCDSP','getJourneyActivation','resolveJourneyId','576tNIxQH','milestone','Journey\x20activation\x20step\x20not\x20found:\x20','activationStepsById','cdp_audience_','time','fetchTrafficRaw','from','1001504TTKJIn','createJourney','\x20in\x20journey\x20','name','applyVersionDeduplication','3093516HQHGtv','checkJourneyAppendable','JOURNEY_NOT_FOUND','step','create','conditions','getConversionSankeyChart','journey','listJourneysFromParentSegment','INVALID_ARGUMENT','journeyBundleName','resume','reduce','cdp_customer_id','listJourneysWithDetails','replace','latestJourneyId','createJourneyActivation','has','AbTest','getJourney','steps','lastVersionNumber','entryCriteria','intime_journey','toLowerCase','versionNumber','conditionSegmentId','segmentId','includeHistory','getParentSegmentFull','length','listSegmentFolders','rootFolderId','limit','exitCriteria','isArray','state','listVersions','filter','90suGuWX','update','get','entries','excluded','simulation','outtime_stage_','includeAllVersions','enteredSize','folder-segment','getActivation','643485fGgYOc','getStatistics','paused','conversion','add','getActivationSankeyChart','type','milestoneInflux','exitCriterias','launched','getTrafficData','description','updateJourney','all','journeyStageId','values','journeyStages','parentFolder','intime_stage_','getJourneyStatistics','exit_criteria','createdAt','journeyBundleId','size','exitInflux','segmentFolderId','goal','NOT_FOUND','map','timedOutPath','Excluded\x20profiles','client','WaitStep','attributes','listActivations','entryInflux','branch','variant','data','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listJourneysWithFolders','draft'];a131_0xc1f9=function(){return _0x198515;};return a131_0xc1f9();}export function parseJourneyState(_0x21cb36){const _0x26d59e=a131_0x42d19c;if(typeof _0x21cb36===_0x26d59e(0x1a2)&&VALID_JOURNEY_STATES[_0x26d59e(0x153)](_0x21cb36))return _0x21cb36;return _0x26d59e(0x19d);}export function entityToJourneyListItem(_0x4facc1,_0xa6c57){const _0xd1742=a131_0x42d19c,_0x54ec34=_0x4facc1['attributes'];return{'id':_0x4facc1['id'],'name':_0x54ec34['name']??'','journeyBundleName':_0x54ec34[_0xd1742(0x1e0)]??_0x54ec34['name']??'','journeyBundleId':_0x54ec34['journeyBundleId']??'','versionNumber':_0x54ec34[_0xd1742(0x15b)],'description':_0x54ec34[_0xd1742(0x17f)]??null,'state':parseJourneyState(_0x54ec34[_0xd1742(0x166)]),'paused':_0x54ec34[_0xd1742(0x176)]??![],'audienceId':_0xa6c57,'folderId':_0x54ec34[_0xd1742(0x18d)]??_0x4facc1[_0xd1742(0x1be)]?.[_0xd1742(0x185)]?.[_0xd1742(0x19a)]?.['id']??null,'createdAt':_0x54ec34['createdAt']??'','updatedAt':_0x54ec34['updatedAt']??''};}function convertToColumnId(_0x3070b9){const _0x55c6f1=a131_0x42d19c;return _0x3070b9[_0x55c6f1(0x1e5)](/-/g,'_');}function getStepEntries(_0x45200f){const _0x554ed1=a131_0x42d19c;if(!_0x45200f)return[];if(Array[_0x554ed1(0x165)](_0x45200f))return _0x45200f['map'](_0x356dbe=>[_0x356dbe['id'],_0x356dbe]);return Object[_0x554ed1(0x16c)](_0x45200f);}export function flattenJourneyActivation(_0x3c2635){const {activationParams:_0x4f6803,activationId:_0x33c5b3,runAfterJourneyRefresh:_0x3e8785}=_0x3c2635['attributes'];return{'id':_0x3c2635['id'],'activationId':_0x33c5b3,'runAfterJourneyRefresh':_0x3e8785,..._0x4f6803};}function col(_0x18ce61,_0x5450c7={}){const _0x21484c=a131_0x42d19c;return{'column':_0x18ce61,'direction':null,'stageIndex':null,'stageName':null,'category':_0x21484c(0x1af),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x5450c7};}export function generateColumnMapping(_0x14b9c0){const _0x220d64=a131_0x42d19c,_0x38f4a8=[];_0x38f4a8['push'](col(_0x220d64(0x1e3))),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x159),{'direction':'in','category':_0x220d64(0x1dd)})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x1bb),{'direction':'out','category':_0x220d64(0x1dd)}));_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x18e)]&&_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x1a8),{'direction':'in','category':'goal','detail':_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x18e)]['name']||null}));const _0x267830=_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x184)]||[];for(let _0x24caa7=0x0;_0x24caa7<_0x267830[_0x220d64(0x160)];_0x24caa7++){const _0x39a48b=_0x267830[_0x24caa7],_0x1cad82=_0x39a48b[_0x220d64(0x1d4)],_0x3c372d={'stageIndex':_0x24caa7,'stageName':_0x1cad82},_0x3d3de3=_0x39a48b[_0x220d64(0x158)]?.[_0x220d64(0x1d4)]||null;_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7,{..._0x3c372d,'direction':'in','category':'stage','detail':_0x3d3de3})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x16f)+_0x24caa7,{..._0x3c372d,'direction':'out','category':'stage','detail':_0x3d3de3}));_0x39a48b[_0x220d64(0x1ca)]&&_0x38f4a8['push'](col('intime_stage_'+_0x24caa7+'_milestone',{..._0x3c372d,'direction':'in','category':_0x220d64(0x1ca),'detail':_0x39a48b['milestone'][_0x220d64(0x1d4)]||null}));const _0x5de34d=_0x39a48b[_0x220d64(0x17c)]||_0x39a48b[_0x220d64(0x164)]||[];for(let _0x5b543c=0x0;_0x5b543c<_0x5de34d[_0x220d64(0x160)];_0x5b543c++){_0x38f4a8[_0x220d64(0x1b8)](col('intime_stage_'+_0x24caa7+_0x220d64(0x1b6)+_0x5b543c,{..._0x3c372d,'direction':'in','category':_0x220d64(0x188),'detail':_0x5de34d[_0x5b543c][_0x220d64(0x1d4)]||null}));}const _0x537eed=getStepEntries(_0x39a48b[_0x220d64(0x156)]);for(const [_0xf1bf64,_0x3ba90b]of _0x537eed){const _0x1d6fde=convertToColumnId(_0xf1bf64),_0x3d93a3=_0x3ba90b['type']||null,_0x4df92f=_0x3ba90b['name']||null,_0x544f7c={..._0x3c372d,'stepType':_0x3d93a3,'stepName':_0x4df92f,'stepId':_0xf1bf64};_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde,{..._0x544f7c,'direction':'in','category':_0x220d64(0x1d9)})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x16f)+_0x24caa7+'_'+_0x1d6fde,{..._0x544f7c,'direction':_0x220d64(0x1b0),'category':_0x220d64(0x1d9)}));if(_0x3ba90b['type']===_0x220d64(0x1a5)&&_0x3ba90b['branches'])for(const _0x20896d of _0x3ba90b['branches']){_0x20896d[_0x220d64(0x15d)]&&_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_'+_0x20896d['segmentId'],{..._0x544f7c,'direction':'in','category':_0x220d64(0x198),'detail':_0x20896d[_0x220d64(0x1d4)]||(_0x20896d[_0x220d64(0x16d)]?_0x220d64(0x192):null)}));}if((_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x154)||_0x3ba90b['type']==='ABTest')&&_0x3ba90b[_0x220d64(0x19e)])for(const _0x3a74dc of _0x3ba90b[_0x220d64(0x19e)]){_0x3a74dc['id']&&_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_variant_'+convertToColumnId(_0x3a74dc['id']),{..._0x544f7c,'direction':'in','category':_0x220d64(0x199),'detail':_0x3a74dc[_0x220d64(0x1d4)]||null}));}if(_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x194)||_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x1b1)){const _0xb377fa=[];if(_0x3ba90b[_0x220d64(0x15c)])_0xb377fa[_0x220d64(0x1b8)](_0x3ba90b[_0x220d64(0x15c)]);else{if(Array[_0x220d64(0x165)](_0x3ba90b[_0x220d64(0x1db)]))for(const _0x17c0ea of _0x3ba90b['conditions']){_0x17c0ea[_0x220d64(0x15d)]&&!_0x17c0ea[_0x220d64(0x191)]&&_0xb377fa[_0x220d64(0x1b8)](_0x17c0ea[_0x220d64(0x15d)]);}else _0x3ba90b[_0x220d64(0x1c5)]?.[_0x220d64(0x15d)]&&_0xb377fa[_0x220d64(0x1b8)](_0x3ba90b['waitCondition']['segmentId']);}for(const _0x3654a0 of _0xb377fa){_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_'+_0x3654a0,{..._0x544f7c,'direction':'in','category':'branch'}));}}}}return _0x38f4a8['push'](col(_0x220d64(0x1ce))),_0x38f4a8;}export function aggregateJourneyHistory(_0x478a8f){const _0x5d2a3e=a131_0x42d19c,_0xa73703=_0x478a8f[_0x5d2a3e(0x1e2)]((_0x2ae3b7,_0x8704cc)=>_0x2ae3b7+(_0x8704cc[_0x5d2a3e(0x197)]??0x0),0x0),_0x2d2151=_0x478a8f['reduce']((_0x42a663,_0x2c371c)=>_0x42a663+(_0x2c371c[_0x5d2a3e(0x1a1)]??0x0),0x0),_0x43cbb1=_0x478a8f[_0x5d2a3e(0x1e2)]((_0x6ecf11,_0x6117ab)=>_0x6ecf11+((_0x6117ab[_0x5d2a3e(0x18c)]??0x0)+(_0x6117ab['jumpInflux']??0x0)),0x0),_0x25446f=_0x478a8f[_0x478a8f['length']-0x1];return{'size':_0x25446f?.['size']??0x0,'entered':_0xa73703,'goal_achieved':_0x2d2151,'completion_rate':_0x2d2151&&_0xa73703?_0x2d2151/_0xa73703*0x64:0x0,'exit_or_jump':_0x43cbb1,'exit_or_jump_rate':_0x43cbb1&&_0xa73703?_0x43cbb1/_0xa73703*0x64:0x0};}export function aggregateStageHistory(_0x3a3694){const _0x1b7ac0=a131_0x42d19c,_0x23c099=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x2eea00,_0x13150c)=>_0x2eea00+(_0x13150c[_0x1b7ac0(0x197)]??0x0),0x0),_0x158ce8=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x4cef17,_0x47f3e3)=>_0x4cef17+(_0x47f3e3[_0x1b7ac0(0x17b)]??0x0),0x0),_0x49abe0=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x14d02c,_0x2ee6fa)=>_0x14d02c+((_0x2ee6fa['exitInflux']??0x0)+(_0x2ee6fa['jumpInflux']??0x0)),0x0),_0x75d4fc=_0x3a3694[_0x3a3694[_0x1b7ac0(0x160)]-0x1];return{'size':_0x75d4fc?.['size']??0x0,'entered':_0x23c099,'milestone':_0x158ce8,'milestone_rate':_0x158ce8&&_0x23c099?_0x158ce8/_0x23c099*0x64:0x0,'exit_or_jump':_0x49abe0,'exit_or_jump_rate':_0x49abe0&&_0x23c099?_0x49abe0/_0x23c099*0x64:0x0};}export function assembleJourneyStats(_0x53d056,_0x3094f5){const _0x313a1c=a131_0x42d19c,_0x31e7d9=!!(_0x3094f5?.[_0x313a1c(0x1d0)]||_0x3094f5?.['to'])&&!!_0x53d056[_0x313a1c(0x1b2)]?.[_0x313a1c(0x160)];if(_0x31e7d9){const _0x7ffb8f=aggregateJourneyHistory(_0x53d056['history']),_0x54669d={'journey_id':_0x53d056[_0x313a1c(0x1aa)],..._0x3094f5?.['from']&&{'from':_0x3094f5[_0x313a1c(0x1d0)]},..._0x3094f5?.['to']&&{'to':_0x3094f5['to']},..._0x7ffb8f};return _0x3094f5?.[_0x313a1c(0x15e)]&&(_0x54669d['history']=_0x53d056[_0x313a1c(0x1b2)]),_0x54669d;}return{'journey_id':_0x53d056[_0x313a1c(0x1aa)],'size':_0x53d056[_0x313a1c(0x18b)],'entered':_0x53d056[_0x313a1c(0x171)],'goal_achieved':_0x53d056[_0x313a1c(0x1ab)],'completion_rate':_0x53d056[_0x313a1c(0x1c1)],'exit_or_jump':_0x53d056[_0x313a1c(0x1a4)],'exit_or_jump_rate':_0x53d056['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x4c9d9c){const _0x403c25=a131_0x42d19c,_0x2ff74a=_0x4c9d9c['journeys']['map'](_0x3633cd=>({'journeyId':_0x3633cd['id'],'versionNumber':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x15b)]??0x0,'name':_0x3633cd[_0x403c25(0x195)]['name'],'state':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x166)],'paused':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x176)],'createdAt':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x189)],'updatedAt':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x1b4)]}));return _0x2ff74a[_0x403c25(0x1b7)]((_0xa8a6ca,_0x389356)=>_0xa8a6ca['versionNumber']-_0x389356['versionNumber']),_0x2ff74a;}export function synthesizePreBundleVersion(_0x18cfa1){const _0x2a4417=a131_0x42d19c;return{'journeyId':_0x18cfa1['id'],'versionNumber':0x1,'name':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x1d4)],'state':_0x18cfa1['attributes']['state'],'paused':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x176)],'createdAt':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x189)],'updatedAt':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x1b4)]};}export function buildStageNameMap(_0x4eb127){const _0x12e473=a131_0x42d19c;return new Map(_0x4eb127[_0x12e473(0x195)][_0x12e473(0x184)]?.[_0x12e473(0x190)](_0x11e158=>[_0x11e158['id'],_0x11e158[_0x12e473(0x1d4)]])??[]);}export class JourneySDK{[a131_0x42d19c(0x193)];constructor(_0x35cbc8){const _0x39298c=a131_0x42d19c;this[_0x39298c(0x193)]=new CDPApiClient(_0x35cbc8);}[a131_0x42d19c(0x1d5)](_0x26ec5e,_0x349cf3){return _0x349cf3?_0x26ec5e:deduplicateJourneysByBundle(_0x26ec5e);}async['listJourneysWithDetails'](_0x15cc3f,_0x46002c){const _0x3d8b72=a131_0x42d19c;try{const _0x5f1040=await this[_0x3d8b72(0x193)][_0x3d8b72(0x1e4)](_0x15cc3f);return{'journeys':this[_0x3d8b72(0x1d5)](_0x5f1040['journeys'],_0x46002c),'activationStepsById':_0x5f1040[_0x3d8b72(0x1cc)]};}catch(_0x490f64){if(isHttp404Error(_0x490f64))return{'journeys':[],'activationStepsById':new Map()};throw _0x490f64;}}async[a131_0x42d19c(0x1de)](_0x4288ae,_0x4e07ba,_0x5c2df8){const _0x3a73da=a131_0x42d19c;let _0x39e9da=_0x4e07ba;if(!_0x39e9da)try{const _0x82c596=await this[_0x3a73da(0x193)][_0x3a73da(0x15f)](_0x4288ae);_0x39e9da=_0x82c596[_0x3a73da(0x162)]??undefined;}catch(_0x14d71f){if(isHttp404Error(_0x14d71f))return[];throw _0x14d71f;}if(!_0x39e9da)return[];let _0x526eca;if(_0x5c2df8?.[_0x3a73da(0x170)]){const _0x528073=await this[_0x3a73da(0x193)][_0x3a73da(0x161)](_0x4288ae),_0x1f3f0b=_0x528073['map'](_0x2e8f0f=>this['client'][_0x3a73da(0x1bd)](_0x2e8f0f['id'])),_0x38c3d8=await Promise[_0x3a73da(0x181)](_0x1f3f0b),_0x3a2843=new Set();_0x526eca=_0x38c3d8[_0x3a73da(0x1bc)]()[_0x3a73da(0x168)](_0x74850b=>{const _0x55af71=_0x3a73da;if(_0x3a2843[_0x55af71(0x153)](_0x74850b['id']))return![];return _0x3a2843[_0x55af71(0x178)](_0x74850b['id']),!![];});}else{const _0x270e9b=await this[_0x3a73da(0x193)]['listEntitiesByFolder'](_0x39e9da,0x20,![]),_0x39e33c=_0x270e9b[_0x3a73da(0x19a)],_0x48c222=_0x39e33c[_0x3a73da(0x168)](_0x2c0625=>_0x2c0625['type']===_0x3a73da(0x1dd));_0x526eca=_0x48c222[_0x3a73da(0x190)](_0x47a5a1=>entityToJourneyListItem(_0x47a5a1,_0x4288ae));}return this['applyVersionDeduplication'](_0x526eca,_0x5c2df8?.['includeAllVersions']);}async[a131_0x42d19c(0x19c)](_0x43b979,_0x4f90c0,_0x5976c2){const _0x5104b5=a131_0x42d19c;if(!_0x4f90c0)return{'journeys':[],'folders':[]};const _0x46d2eb=await this[_0x5104b5(0x193)][_0x5104b5(0x1a0)](_0x4f90c0,0x20,![]),_0x20fd06=_0x46d2eb['data'],_0x59af69=_0x20fd06[_0x5104b5(0x168)](_0x3e31bd=>_0x3e31bd[_0x5104b5(0x17a)]===_0x5104b5(0x172)&&_0x3e31bd['id']!==_0x4f90c0),_0x3c1fa0=_0x59af69[_0x5104b5(0x190)](_0x5348e5=>({'id':_0x5348e5['id'],'name':_0x5348e5['attributes']['name']})),_0x4fd3e4=_0x20fd06[_0x5104b5(0x168)](_0x42b24c=>_0x42b24c[_0x5104b5(0x17a)]===_0x5104b5(0x1dd)),_0x91e3b=_0x4fd3e4[_0x5104b5(0x190)](_0x86d901=>entityToJourneyListItem(_0x86d901,_0x43b979));return{'journeys':this[_0x5104b5(0x1d5)](_0x91e3b,_0x5976c2?.[_0x5104b5(0x170)]),'folders':_0x3c1fa0};}async[a131_0x42d19c(0x1ae)](_0x22c88b,_0x37c009){const _0x22779c=a131_0x42d19c;let _0xc2394b;try{_0xc2394b=await this[_0x22779c(0x193)]['listSegmentFolders'](_0x22c88b);}catch(_0x1d8555){if(isHttp404Error(_0x1d8555))return{'journeys':[],'activationStepsById':new Map()};throw _0x1d8555;}const _0x304962=_0xc2394b[_0x22779c(0x190)](async _0xb0a200=>{const _0x591ef9=_0x22779c;return await this[_0x591ef9(0x1e4)](_0xb0a200['id'],_0x37c009?.[_0x591ef9(0x170)]);}),_0x44e068=await Promise['all'](_0x304962),_0x4be3a8=new Map(),_0x5937cc=[];for(const _0x5b2c7a of _0x44e068){_0x5937cc[_0x22779c(0x1b8)](..._0x5b2c7a['journeys']);for(const [_0x474995,_0x198eed]of _0x5b2c7a[_0x22779c(0x1cc)]){_0x4be3a8[_0x22779c(0x1b5)](_0x474995,_0x198eed);}}const _0x11e4b5=new Set(),_0x19bcc0=_0x5937cc[_0x22779c(0x168)](_0x2b5ec5=>{const _0x4fdf10=_0x22779c;if(_0x11e4b5[_0x4fdf10(0x153)](_0x2b5ec5['id']))return![];return _0x11e4b5[_0x4fdf10(0x178)](_0x2b5ec5['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x19bcc0,_0x37c009?.['includeAllVersions']),'activationStepsById':_0x4be3a8};}async[a131_0x42d19c(0x155)](_0x1266c1){const _0x3b8d10=a131_0x42d19c;try{return await this[_0x3b8d10(0x193)][_0x3b8d10(0x155)](_0x1266c1);}catch(_0x2782b7){if(isHttp404Error(_0x2782b7))throw new SDKError(ErrorCode[_0x3b8d10(0x1d8)],_0x3b8d10(0x1c2)+_0x1266c1,_0x2782b7);throw _0x2782b7;}}async[a131_0x42d19c(0x1c8)](_0x4ffc19,_0x303f96){const _0x1f4aa3=a131_0x42d19c,_0x418e9a=await this[_0x1f4aa3(0x1de)](_0x4ffc19),_0x57c942=_0x418e9a['find'](_0x1b89a2=>_0x1b89a2['journeyBundleName'][_0x1f4aa3(0x15a)]()===_0x303f96['toLowerCase']());if(!_0x57c942)throw new SDKError(ErrorCode[_0x1f4aa3(0x1d8)],_0x1f4aa3(0x1c2)+_0x303f96,undefined,{'helpText':_0x1f4aa3(0x19b)});return _0x57c942['id'];}async[a131_0x42d19c(0x175)](_0x4344cf,_0x2b162c){const _0x2bc145=a131_0x42d19c;try{return await this['client'][_0x2bc145(0x187)](_0x4344cf,_0x2b162c);}catch(_0xa99e8c){if(isHttp404Error(_0xa99e8c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x2bc145(0x1c2)+_0x4344cf,_0xa99e8c);throw _0xa99e8c;}}async[a131_0x42d19c(0x17e)](_0x582438,_0x5b0f58){const _0x40ae49=a131_0x42d19c,_0x49edc4={'from':_0x5b0f58?.[_0x40ae49(0x1d0)],'to':_0x5b0f58?.['to'],'limit':_0x5b0f58?.[_0x40ae49(0x163)]},_0x234dee=_0x5b0f58?.[_0x40ae49(0x17a)]!==_0x40ae49(0x177);try{const [_0x4bc475,_0x574bae]=await Promise[_0x40ae49(0x181)]([this[_0x40ae49(0x1cf)](_0x582438,_0x5b0f58?.['type'],_0x49edc4),_0x234dee?this[_0x40ae49(0x155)](_0x582438):undefined]);if(_0x4bc475[_0x40ae49(0x1c0)]&&_0x574bae){const _0xb67fc1=buildStageNameMap(_0x574bae);_0x4bc475['activation']=_0x4bc475[_0x40ae49(0x1c0)]['map'](_0x49879d=>({..._0x49879d,'journeyStageName':_0xb67fc1[_0x40ae49(0x16b)](_0x49879d[_0x40ae49(0x182)])??_0x49879d[_0x40ae49(0x182)]}));}return _0x4bc475;}catch(_0x599a19){if(isHttp404Error(_0x599a19))throw new SDKError(ErrorCode[_0x40ae49(0x1d8)],'Journey\x20not\x20found:\x20'+_0x582438,_0x599a19);throw _0x599a19;}}async[a131_0x42d19c(0x1cf)](_0xfd4d64,_0x2e6b0d,_0xa462d7){const _0x3d1a8c=a131_0x42d19c;if(_0x2e6b0d===_0x3d1a8c(0x177)){const _0x25b4cb=await this['client'][_0x3d1a8c(0x1dc)](_0xfd4d64,_0xa462d7);return{'conversion':_0x25b4cb};}if(_0x2e6b0d==='activation'){const _0x407959=await this['client']['getActivationSankeyChart'](_0xfd4d64,_0xa462d7);return{'activation':_0x407959};}const [_0x518b03,_0x255846]=await Promise['all']([this[_0x3d1a8c(0x193)][_0x3d1a8c(0x1dc)](_0xfd4d64,_0xa462d7),this['client'][_0x3d1a8c(0x179)](_0xfd4d64,_0xa462d7)]);return{'conversion':_0x518b03,'activation':_0x255846};}async[a131_0x42d19c(0x1c4)](_0x56dadb){const _0x425c5f=a131_0x42d19c;try{return await this[_0x425c5f(0x193)][_0x425c5f(0x1b3)](_0x56dadb);}catch(_0x1bea49){if(isHttp404Error(_0x1bea49))throw new SDKError(ErrorCode[_0x425c5f(0x1d8)],'Journey\x20not\x20found:\x20'+_0x56dadb,_0x1bea49);throw _0x1bea49;}}async[a131_0x42d19c(0x1e1)](_0x61efb7){const _0x271b00=a131_0x42d19c;try{return await this[_0x271b00(0x193)][_0x271b00(0x1ad)](_0x61efb7);}catch(_0x2bc19f){if(isHttp404Error(_0x2bc19f))throw new SDKError(ErrorCode[_0x271b00(0x1d8)],_0x271b00(0x1c2)+_0x61efb7,_0x2bc19f);throw _0x2bc19f;}}async[a131_0x42d19c(0x1da)](_0x440cdd){const _0x37b40c=a131_0x42d19c;return await this[_0x37b40c(0x193)][_0x37b40c(0x1d2)](_0x440cdd);}async[a131_0x42d19c(0x16a)](_0x3ee353,_0x2e7fbb){const _0x2386d9=a131_0x42d19c;try{return await this[_0x2386d9(0x193)][_0x2386d9(0x180)](_0x3ee353,_0x2e7fbb);}catch(_0x351624){if(isHttp404Error(_0x351624))throw new SDKError(ErrorCode[_0x2386d9(0x1d8)],'Journey\x20not\x20found:\x20'+_0x3ee353,_0x351624);throw _0x351624;}}async[a131_0x42d19c(0x173)](_0x451a4c,_0xa00778){const _0x5dbc9=a131_0x42d19c;try{return await this[_0x5dbc9(0x193)][_0x5dbc9(0x1c7)](_0x451a4c,_0xa00778);}catch(_0x414bff){if(isHttp404Error(_0x414bff))throw new SDKError(ErrorCode[_0x5dbc9(0x18f)],_0x5dbc9(0x1cb)+_0xa00778+_0x5dbc9(0x1d3)+_0x451a4c,_0x414bff);throw _0x414bff;}}async[a131_0x42d19c(0x196)](_0x1f3fbd){const _0x3f3409=a131_0x42d19c;try{return await this[_0x3f3409(0x193)][_0x3f3409(0x1a9)](_0x1f3fbd);}catch(_0x3c3d25){if(isHttp404Error(_0x3c3d25))return[];throw _0x3c3d25;}}async['listActivationsFlat'](_0x190c34){const _0x224b4a=a131_0x42d19c,_0x1bfe0f=await this[_0x224b4a(0x196)](_0x190c34);return _0x1bfe0f[_0x224b4a(0x190)](flattenJourneyActivation);}async[a131_0x42d19c(0x1a3)](_0x5de8e1,_0x12429e){const _0x44e157=a131_0x42d19c;return await this[_0x44e157(0x193)][_0x44e157(0x152)](_0x5de8e1,_0x12429e);}async['getColumnMapping'](_0x1292b9){const _0x3449e9=a131_0x42d19c,_0x3d64b4=await this['getJourney'](_0x1292b9),_0x27dcf6=generateColumnMapping(_0x3d64b4);return{'journeyId':_0x3d64b4['id'],'journeyName':_0x3d64b4[_0x3449e9(0x195)]['name'],'database':_0x3449e9(0x1cd)+_0x3d64b4[_0x3449e9(0x195)][_0x3449e9(0x1ba)],'table':'journey_'+_0x3d64b4['id'],'columns':_0x27dcf6};}async['getBundle'](_0x4f80c7){const _0x18aabb=a131_0x42d19c;return this[_0x18aabb(0x193)]['getJourneyBundle'](_0x4f80c7);}async['getLatestJourneyId'](_0x440873){const _0x453577=a131_0x42d19c;if(!_0x440873)return undefined;try{const _0x566ddd=await this[_0x453577(0x19f)](_0x440873);return _0x566ddd[_0x453577(0x1e6)];}catch{return undefined;}}async[a131_0x42d19c(0x167)](_0x400c18){const _0x21b5c4=a131_0x42d19c,_0x397deb=await this[_0x21b5c4(0x155)](_0x400c18),_0x274685=_0x397deb[_0x21b5c4(0x195)]['journeyBundleId'];if(!_0x274685)return{'bundleId':'','bundleName':_0x397deb['attributes'][_0x21b5c4(0x1d4)],'bundleDescription':_0x397deb[_0x21b5c4(0x195)][_0x21b5c4(0x17f)]??null,'latestJourneyId':_0x397deb['id'],'versions':[synthesizePreBundleVersion(_0x397deb)]};const _0x5ef6df=await this['getBundle'](_0x274685);return{'bundleId':_0x274685,'bundleName':_0x5ef6df[_0x21b5c4(0x1d4)],'bundleDescription':_0x5ef6df['description']??null,'latestJourneyId':_0x5ef6df[_0x21b5c4(0x1e6)],'versions':formatVersionsFromBundle(_0x5ef6df)};}async['createVersion'](_0x1fe5b1){const _0x3202f5=a131_0x42d19c,_0x382599=await this[_0x3202f5(0x155)](_0x1fe5b1),_0x2754d1=_0x382599['attributes'][_0x3202f5(0x18a)];if(!_0x2754d1)throw new SDKError(ErrorCode[_0x3202f5(0x1df)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x3202f5(0x193)][_0x3202f5(0x1d7)](_0x2754d1);const _0x203240=await this['client'][_0x3202f5(0x1b9)](_0x2754d1),_0x33f397=_0x203240['name']+'\x20v'+(_0x203240[_0x3202f5(0x157)]+0x1);return this[_0x3202f5(0x193)][_0x3202f5(0x1a7)](_0x2754d1,{'sourceId':_0x1fe5b1,'attributes':{'name':_0x33f397}});}}
|
|
1
|
+
const a131_0x35aab0=a131_0x4ad8;function a131_0x4ed2(){const _0x14e0d8=['variant','3092528yFyUoF','conversion','goalInflux','excluded','1pmSfYx','reduce','toLowerCase','get','getActivationSankeyChart','milestone','8YzFNaa','listEntitiesByFolder','getLatestJourneyId','Journey\x20activation\x20step\x20not\x20found:\x20','add','12034719vQRxER','715074bbCPeF','history','getStatistics','step','INVALID_ARGUMENT','no-bundle-','exit_criteria','journeyStages','set','listActivationsFlat','listJourneys','attributes','find','5363765FaQLot','Excluded\x20profiles','createJourney','type','journeyBundleName','has','Journey\x20not\x20found:\x20','waitCondition','filter','journeyBundleId','exitOrJumpRate','isArray','entries','steps','timedOutPath','flat','activation','3562224eOIyuk','state','includeAllVersions','versionNumber','listJourneysWithDetailsFromParentSegment','latestJourneyId','updatedAt','resumeJourney','from','resolveJourneyId','listActivations','completionRate','getJourney','exitOrJumpSize','idx-','goal','intime_stage_','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','update','getBundle','includeHistory','branches','string','listJourneysFromParentSegment','push','createActivation','ABTest','data','journeyStageId','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','\x20in\x20journey\x20','activationStepsById','limit','out','getTrafficData','paused','entryCriteria','name','intime_goal','parentFolder','description','simulation','branch','688814rgioIb','segmentId','variants','journey','listSegmentFolders','WaitStep','conditions','createdAt','values','outtime_journey','listVersions','fixed','Wait','listJourneysWithDetails','cdp_audience_','checkJourneyAppendable','getJourneyStatistics','journeys','length','folder-segment','map','exitInflux','updateJourney','jumpInflux','conditionSegmentId','exitCriteria','launched','journeyId','getParentSegmentFull','applyVersionDeduplication','rootFolderId','outtime_stage_','getJourneyBundle','_variant_','client','all','createJourneyActivation','relationships','getConversionSankeyChart','exitCriterias','entryInflux','lastVersionNumber','_milestone','goalSize','draft','NOT_FOUND','3941511OmCxUc','cdp_customer_id','intime_journey','getActivation','stage','size','milestoneInflux','listJourneysWithFolders','resume','JOURNEY_NOT_FOUND'];a131_0x4ed2=function(){return _0x14e0d8;};return a131_0x4ed2();}(function(_0x1e0be1,_0x19c5af){const _0x3831da=a131_0x4ad8,_0x2a064c=_0x1e0be1();while(!![]){try{const _0x34741c=-parseInt(_0x3831da(0xd9))/0x1*(parseInt(_0x3831da(0x12e))/0x2)+parseInt(_0x3831da(0xe5))/0x3+-parseInt(_0x3831da(0xd5))/0x4+-parseInt(_0x3831da(0xf2))/0x5+parseInt(_0x3831da(0x103))/0x6+-parseInt(_0x3831da(0xca))/0x7*(-parseInt(_0x3831da(0xdf))/0x8)+parseInt(_0x3831da(0xe4))/0x9;if(_0x34741c===_0x19c5af)break;else _0x2a064c['push'](_0x2a064c['shift']());}catch(_0x7c33f){_0x2a064c['push'](_0x2a064c['shift']());}}}(a131_0x4ed2,0x84552));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x5cbcdb){const _0x419b01=a131_0x4ad8;return _0x5cbcdb[_0x419b01(0xfb)]??_0x5cbcdb['attributes']?.[_0x419b01(0xfb)]??undefined;}function getVersionNumber(_0x5878cb){const _0x4d50de=a131_0x4ad8;return _0x5878cb[_0x4d50de(0x106)]??_0x5878cb[_0x4d50de(0xf0)]?.[_0x4d50de(0x106)]??0x0;}function getState(_0x1e0b5e){const _0x266019=a131_0x4ad8;return _0x1e0b5e[_0x266019(0x104)]??_0x1e0b5e[_0x266019(0xf0)]?.[_0x266019(0x104)];}function a131_0x4ad8(_0x4b52da,_0x312fba){_0x4b52da=_0x4b52da-0xa6;const _0x4ed292=a131_0x4ed2();let _0x4ad832=_0x4ed292[_0x4b52da];return _0x4ad832;}export function deduplicateJourneysByBundle(_0x1229e2){const _0x57f9f9=a131_0x4ad8,_0x5bc7a2=new Map();let _0x1769e9=0x0;for(const _0x2956c8 of _0x1229e2){const _0x42082a=getBundleId(_0x2956c8);if(!_0x42082a){const _0xb55ed7=_0x57f9f9(0xea)+(_0x2956c8['id']??_0x57f9f9(0x111)+_0x1769e9++);_0x5bc7a2[_0x57f9f9(0xed)](_0xb55ed7,_0x2956c8);continue;}const _0x12c28d=_0x5bc7a2[_0x57f9f9(0xdc)](_0x42082a);if(!_0x12c28d)_0x5bc7a2[_0x57f9f9(0xed)](_0x42082a,_0x2956c8);else{const _0x3b0415=getState(_0x12c28d)===_0x57f9f9(0xb6),_0x12245f=getState(_0x2956c8)==='launched';if(_0x12245f&&!_0x3b0415)_0x5bc7a2[_0x57f9f9(0xed)](_0x42082a,_0x2956c8);else{if(!_0x12245f&&_0x3b0415){}else{const _0x2bb9ed=getVersionNumber(_0x12c28d),_0x2eaedc=getVersionNumber(_0x2956c8);_0x2eaedc>_0x2bb9ed&&_0x5bc7a2[_0x57f9f9(0xed)](_0x42082a,_0x2956c8);}}}}return Array['from'](_0x5bc7a2[_0x57f9f9(0x136)]());}const VALID_JOURNEY_STATES=new Set([a131_0x35aab0(0xc8),a131_0x35aab0(0x12c),'launched']);export function parseJourneyState(_0x23ac1f){const _0x59e3ab=a131_0x35aab0;if(typeof _0x23ac1f===_0x59e3ab(0x119)&&VALID_JOURNEY_STATES['has'](_0x23ac1f))return _0x23ac1f;return'draft';}export function entityToJourneyListItem(_0x4393da,_0x367e21){const _0x30281c=a131_0x35aab0,_0x31131d=_0x4393da['attributes'];return{'id':_0x4393da['id'],'name':_0x31131d[_0x30281c(0x128)]??'','journeyBundleName':_0x31131d[_0x30281c(0xf6)]??_0x31131d[_0x30281c(0x128)]??'','journeyBundleId':_0x31131d[_0x30281c(0xfb)]??'','versionNumber':_0x31131d[_0x30281c(0x106)],'description':_0x31131d[_0x30281c(0x12b)]??null,'state':parseJourneyState(_0x31131d[_0x30281c(0x104)]),'paused':_0x31131d[_0x30281c(0x126)]??![],'audienceId':_0x367e21,'folderId':_0x31131d['segmentFolderId']??_0x4393da[_0x30281c(0xc1)]?.[_0x30281c(0x12a)]?.[_0x30281c(0x11e)]?.['id']??null,'createdAt':_0x31131d[_0x30281c(0x135)]??'','updatedAt':_0x31131d[_0x30281c(0x109)]??''};}function convertToColumnId(_0x2171e8){return _0x2171e8['replace'](/-/g,'_');}function getStepEntries(_0x15a2fb){const _0x45fd21=a131_0x35aab0;if(!_0x15a2fb)return[];if(Array['isArray'](_0x15a2fb))return _0x15a2fb[_0x45fd21(0xb0)](_0x578c04=>[_0x578c04['id'],_0x578c04]);return Object[_0x45fd21(0xfe)](_0x15a2fb);}export function flattenJourneyActivation(_0xe2e570){const _0x53e118=a131_0x35aab0,{activationParams:_0xb77ca0,activationId:_0x405273,runAfterJourneyRefresh:_0x1fa13d}=_0xe2e570[_0x53e118(0xf0)];return{'id':_0xe2e570['id'],'activationId':_0x405273,'runAfterJourneyRefresh':_0x1fa13d,..._0xb77ca0};}function col(_0x2f163f,_0x46f3d0={}){const _0x4a3aa9=a131_0x35aab0;return{'column':_0x2f163f,'direction':null,'stageIndex':null,'stageName':null,'category':_0x4a3aa9(0xa7),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x46f3d0};}export function generateColumnMapping(_0xcdbf2a){const _0x1a684a=a131_0x35aab0,_0x4a1f79=[];_0x4a1f79[_0x1a684a(0x11b)](col(_0x1a684a(0xcb))),_0x4a1f79[_0x1a684a(0x11b)](col(_0x1a684a(0xcc),{'direction':'in','category':_0x1a684a(0x131)})),_0x4a1f79['push'](col(_0x1a684a(0x137),{'direction':_0x1a684a(0x124),'category':_0x1a684a(0x131)}));_0xcdbf2a[_0x1a684a(0xf0)]['goal']&&_0x4a1f79[_0x1a684a(0x11b)](col(_0x1a684a(0x129),{'direction':'in','category':_0x1a684a(0x112),'detail':_0xcdbf2a[_0x1a684a(0xf0)][_0x1a684a(0x112)][_0x1a684a(0x128)]||null}));const _0x1a1311=_0xcdbf2a[_0x1a684a(0xf0)][_0x1a684a(0xec)]||[];for(let _0x154134=0x0;_0x154134<_0x1a1311[_0x1a684a(0xae)];_0x154134++){const _0x490e58=_0x1a1311[_0x154134],_0x471ba8=_0x490e58[_0x1a684a(0x128)],_0x9ea786={'stageIndex':_0x154134,'stageName':_0x471ba8},_0x7d5e17=_0x490e58[_0x1a684a(0x127)]?.[_0x1a684a(0x128)]||null;_0x4a1f79[_0x1a684a(0x11b)](col('intime_stage_'+_0x154134,{..._0x9ea786,'direction':'in','category':_0x1a684a(0xce),'detail':_0x7d5e17})),_0x4a1f79[_0x1a684a(0x11b)](col(_0x1a684a(0xbb)+_0x154134,{..._0x9ea786,'direction':_0x1a684a(0x124),'category':_0x1a684a(0xce),'detail':_0x7d5e17}));_0x490e58[_0x1a684a(0xde)]&&_0x4a1f79['push'](col(_0x1a684a(0x113)+_0x154134+_0x1a684a(0xc6),{..._0x9ea786,'direction':'in','category':'milestone','detail':_0x490e58['milestone'][_0x1a684a(0x128)]||null}));const _0x3f3eb0=_0x490e58[_0x1a684a(0xc3)]||_0x490e58[_0x1a684a(0xb5)]||[];for(let _0x371080=0x0;_0x371080<_0x3f3eb0['length'];_0x371080++){_0x4a1f79['push'](col('intime_stage_'+_0x154134+'_exit_'+_0x371080,{..._0x9ea786,'direction':'in','category':_0x1a684a(0xeb),'detail':_0x3f3eb0[_0x371080]['name']||null}));}const _0x1cd7c1=getStepEntries(_0x490e58[_0x1a684a(0xff)]);for(const [_0x4bce86,_0x4c48a3]of _0x1cd7c1){const _0x927c80=convertToColumnId(_0x4bce86),_0x663e6f=_0x4c48a3['type']||null,_0x5b8f5e=_0x4c48a3[_0x1a684a(0x128)]||null,_0xf165e8={..._0x9ea786,'stepType':_0x663e6f,'stepName':_0x5b8f5e,'stepId':_0x4bce86};_0x4a1f79[_0x1a684a(0x11b)](col(_0x1a684a(0x113)+_0x154134+'_'+_0x927c80,{..._0xf165e8,'direction':'in','category':_0x1a684a(0xe8)})),_0x4a1f79['push'](col(_0x1a684a(0xbb)+_0x154134+'_'+_0x927c80,{..._0xf165e8,'direction':_0x1a684a(0x124),'category':'step'}));if(_0x4c48a3[_0x1a684a(0xf5)]==='DecisionPoint'&&_0x4c48a3[_0x1a684a(0x118)])for(const _0x328860 of _0x4c48a3[_0x1a684a(0x118)]){_0x328860[_0x1a684a(0x12f)]&&_0x4a1f79[_0x1a684a(0x11b)](col('intime_stage_'+_0x154134+'_'+_0x927c80+'_'+_0x328860[_0x1a684a(0x12f)],{..._0xf165e8,'direction':'in','category':'branch','detail':_0x328860[_0x1a684a(0x128)]||(_0x328860[_0x1a684a(0xd8)]?_0x1a684a(0xf3):null)}));}if((_0x4c48a3['type']==='AbTest'||_0x4c48a3[_0x1a684a(0xf5)]===_0x1a684a(0x11d))&&_0x4c48a3[_0x1a684a(0x130)])for(const _0x124021 of _0x4c48a3[_0x1a684a(0x130)]){_0x124021['id']&&_0x4a1f79[_0x1a684a(0x11b)](col(_0x1a684a(0x113)+_0x154134+'_'+_0x927c80+_0x1a684a(0xbd)+convertToColumnId(_0x124021['id']),{..._0xf165e8,'direction':'in','category':_0x1a684a(0xd4),'detail':_0x124021['name']||null}));}if(_0x4c48a3[_0x1a684a(0xf5)]===_0x1a684a(0x133)||_0x4c48a3[_0x1a684a(0xf5)]===_0x1a684a(0xa8)){const _0x4d97f3=[];if(_0x4c48a3[_0x1a684a(0xb4)])_0x4d97f3[_0x1a684a(0x11b)](_0x4c48a3['conditionSegmentId']);else{if(Array[_0x1a684a(0xfd)](_0x4c48a3[_0x1a684a(0x134)]))for(const _0x4bfde0 of _0x4c48a3[_0x1a684a(0x134)]){_0x4bfde0[_0x1a684a(0x12f)]&&!_0x4bfde0[_0x1a684a(0x100)]&&_0x4d97f3['push'](_0x4bfde0['segmentId']);}else _0x4c48a3[_0x1a684a(0xf9)]?.['segmentId']&&_0x4d97f3['push'](_0x4c48a3[_0x1a684a(0xf9)][_0x1a684a(0x12f)]);}for(const _0xb59736 of _0x4d97f3){_0x4a1f79['push'](col('intime_stage_'+_0x154134+'_'+_0x927c80+'_'+_0xb59736,{..._0xf165e8,'direction':'in','category':_0x1a684a(0x12d)}));}}}}return _0x4a1f79[_0x1a684a(0x11b)](col('time')),_0x4a1f79;}export function aggregateJourneyHistory(_0x280d9a){const _0x4dfb40=a131_0x35aab0,_0x3cdab0=_0x280d9a['reduce']((_0x1b6af1,_0x3f5b06)=>_0x1b6af1+(_0x3f5b06[_0x4dfb40(0xc4)]??0x0),0x0),_0x53de95=_0x280d9a[_0x4dfb40(0xda)]((_0x1e6cd3,_0x20e580)=>_0x1e6cd3+(_0x20e580[_0x4dfb40(0xd7)]??0x0),0x0),_0x30aa58=_0x280d9a[_0x4dfb40(0xda)]((_0x1860a7,_0x43b675)=>_0x1860a7+((_0x43b675['exitInflux']??0x0)+(_0x43b675[_0x4dfb40(0xb3)]??0x0)),0x0),_0x52e30b=_0x280d9a[_0x280d9a[_0x4dfb40(0xae)]-0x1];return{'size':_0x52e30b?.[_0x4dfb40(0xcf)]??0x0,'entered':_0x3cdab0,'goal_achieved':_0x53de95,'completion_rate':_0x53de95&&_0x3cdab0?_0x53de95/_0x3cdab0*0x64:0x0,'exit_or_jump':_0x30aa58,'exit_or_jump_rate':_0x30aa58&&_0x3cdab0?_0x30aa58/_0x3cdab0*0x64:0x0};}export function aggregateStageHistory(_0x2d91f2){const _0x23dc89=a131_0x35aab0,_0xb7020a=_0x2d91f2[_0x23dc89(0xda)]((_0x192b2b,_0x507f76)=>_0x192b2b+(_0x507f76[_0x23dc89(0xc4)]??0x0),0x0),_0x180ace=_0x2d91f2[_0x23dc89(0xda)]((_0x9d2141,_0x576f46)=>_0x9d2141+(_0x576f46[_0x23dc89(0xd0)]??0x0),0x0),_0x555020=_0x2d91f2['reduce']((_0x19c47c,_0x5ed3c0)=>_0x19c47c+((_0x5ed3c0[_0x23dc89(0xb1)]??0x0)+(_0x5ed3c0[_0x23dc89(0xb3)]??0x0)),0x0),_0x50e147=_0x2d91f2[_0x2d91f2[_0x23dc89(0xae)]-0x1];return{'size':_0x50e147?.[_0x23dc89(0xcf)]??0x0,'entered':_0xb7020a,'milestone':_0x180ace,'milestone_rate':_0x180ace&&_0xb7020a?_0x180ace/_0xb7020a*0x64:0x0,'exit_or_jump':_0x555020,'exit_or_jump_rate':_0x555020&&_0xb7020a?_0x555020/_0xb7020a*0x64:0x0};}export function assembleJourneyStats(_0xe98945,_0xb5f2fa){const _0x256c7b=a131_0x35aab0,_0x1e4343=!!(_0xb5f2fa?.[_0x256c7b(0x10b)]||_0xb5f2fa?.['to'])&&!!_0xe98945['history']?.[_0x256c7b(0xae)];if(_0x1e4343){const _0x268f6a=aggregateJourneyHistory(_0xe98945[_0x256c7b(0xe6)]),_0x5acaa0={'journey_id':_0xe98945[_0x256c7b(0xb7)],..._0xb5f2fa?.[_0x256c7b(0x10b)]&&{'from':_0xb5f2fa[_0x256c7b(0x10b)]},..._0xb5f2fa?.['to']&&{'to':_0xb5f2fa['to']},..._0x268f6a};return _0xb5f2fa?.[_0x256c7b(0x117)]&&(_0x5acaa0[_0x256c7b(0xe6)]=_0xe98945[_0x256c7b(0xe6)]),_0x5acaa0;}return{'journey_id':_0xe98945[_0x256c7b(0xb7)],'size':_0xe98945[_0x256c7b(0xcf)],'entered':_0xe98945['enteredSize'],'goal_achieved':_0xe98945[_0x256c7b(0xc7)],'completion_rate':_0xe98945[_0x256c7b(0x10e)],'exit_or_jump':_0xe98945[_0x256c7b(0x110)],'exit_or_jump_rate':_0xe98945[_0x256c7b(0xfc)]};}export function formatVersionsFromBundle(_0x21b006){const _0x3c9105=a131_0x35aab0,_0x378777=_0x21b006[_0x3c9105(0xad)][_0x3c9105(0xb0)](_0x564c1e=>({'journeyId':_0x564c1e['id'],'versionNumber':_0x564c1e[_0x3c9105(0xf0)][_0x3c9105(0x106)]??0x0,'name':_0x564c1e[_0x3c9105(0xf0)][_0x3c9105(0x128)],'state':_0x564c1e[_0x3c9105(0xf0)][_0x3c9105(0x104)],'paused':_0x564c1e[_0x3c9105(0xf0)]['paused'],'createdAt':_0x564c1e[_0x3c9105(0xf0)][_0x3c9105(0x135)],'updatedAt':_0x564c1e[_0x3c9105(0xf0)]['updatedAt']}));return _0x378777['sort']((_0x8b154d,_0x312d18)=>_0x8b154d[_0x3c9105(0x106)]-_0x312d18['versionNumber']),_0x378777;}export function synthesizePreBundleVersion(_0x5f014a){const _0x19afcc=a131_0x35aab0;return{'journeyId':_0x5f014a['id'],'versionNumber':0x1,'name':_0x5f014a['attributes'][_0x19afcc(0x128)],'state':_0x5f014a[_0x19afcc(0xf0)][_0x19afcc(0x104)],'paused':_0x5f014a['attributes'][_0x19afcc(0x126)],'createdAt':_0x5f014a[_0x19afcc(0xf0)]['createdAt'],'updatedAt':_0x5f014a[_0x19afcc(0xf0)]['updatedAt']};}export function buildStageNameMap(_0x1ccefa){const _0x2592f7=a131_0x35aab0;return new Map(_0x1ccefa[_0x2592f7(0xf0)][_0x2592f7(0xec)]?.[_0x2592f7(0xb0)](_0x5af266=>[_0x5af266['id'],_0x5af266[_0x2592f7(0x128)]])??[]);}export class JourneySDK{[a131_0x35aab0(0xbe)];constructor(_0x13103e){const _0x4316b1=a131_0x35aab0;this[_0x4316b1(0xbe)]=new CDPApiClient(_0x13103e);}[a131_0x35aab0(0xb9)](_0x55a36d,_0x301dc7){return _0x301dc7?_0x55a36d:deduplicateJourneysByBundle(_0x55a36d);}async[a131_0x35aab0(0xa9)](_0x4bbc7b,_0xaa4835){const _0x1daa41=a131_0x35aab0;try{const _0x52501e=await this[_0x1daa41(0xbe)][_0x1daa41(0xa9)](_0x4bbc7b);return{'journeys':this[_0x1daa41(0xb9)](_0x52501e[_0x1daa41(0xad)],_0xaa4835),'activationStepsById':_0x52501e[_0x1daa41(0x122)]};}catch(_0x21e375){if(isHttp404Error(_0x21e375))return{'journeys':[],'activationStepsById':new Map()};throw _0x21e375;}}async[a131_0x35aab0(0x11a)](_0x2fd7e8,_0x400df7,_0x51ca3e){const _0x40f6ad=a131_0x35aab0;let _0x3a6407=_0x400df7;if(!_0x3a6407)try{const _0x439873=await this[_0x40f6ad(0xbe)][_0x40f6ad(0xb8)](_0x2fd7e8);_0x3a6407=_0x439873[_0x40f6ad(0xba)]??undefined;}catch(_0x12d801){if(isHttp404Error(_0x12d801))return[];throw _0x12d801;}if(!_0x3a6407)return[];let _0x48f692;if(_0x51ca3e?.['includeAllVersions']){const _0x2ab149=await this[_0x40f6ad(0xbe)][_0x40f6ad(0x132)](_0x2fd7e8),_0x310aa7=_0x2ab149['map'](_0x41b2e9=>this[_0x40f6ad(0xbe)][_0x40f6ad(0xef)](_0x41b2e9['id'])),_0x37f325=await Promise[_0x40f6ad(0xbf)](_0x310aa7),_0x4d6e61=new Set();_0x48f692=_0x37f325[_0x40f6ad(0x101)]()[_0x40f6ad(0xfa)](_0x742ad=>{const _0x39a632=_0x40f6ad;if(_0x4d6e61[_0x39a632(0xf7)](_0x742ad['id']))return![];return _0x4d6e61[_0x39a632(0xe3)](_0x742ad['id']),!![];});}else{const _0x3d0ef3=await this['client']['listEntitiesByFolder'](_0x3a6407,0x20,![]),_0x302af5=_0x3d0ef3['data'],_0x216bda=_0x302af5[_0x40f6ad(0xfa)](_0x3cd35e=>_0x3cd35e[_0x40f6ad(0xf5)]==='journey');_0x48f692=_0x216bda[_0x40f6ad(0xb0)](_0x508a40=>entityToJourneyListItem(_0x508a40,_0x2fd7e8));}return this[_0x40f6ad(0xb9)](_0x48f692,_0x51ca3e?.['includeAllVersions']);}async[a131_0x35aab0(0xd1)](_0x65387,_0x50cffe,_0x59cacb){const _0x5bc326=a131_0x35aab0;if(!_0x50cffe)return{'journeys':[],'folders':[]};const _0x593afe=await this['client'][_0x5bc326(0xe0)](_0x50cffe,0x20,![]),_0x2bb3e1=_0x593afe['data'],_0x2c03bd=_0x2bb3e1[_0x5bc326(0xfa)](_0x46b831=>_0x46b831[_0x5bc326(0xf5)]===_0x5bc326(0xaf)&&_0x46b831['id']!==_0x50cffe),_0x6bada6=_0x2c03bd[_0x5bc326(0xb0)](_0x352b52=>({'id':_0x352b52['id'],'name':_0x352b52[_0x5bc326(0xf0)][_0x5bc326(0x128)]})),_0x443ece=_0x2bb3e1[_0x5bc326(0xfa)](_0x3bdf55=>_0x3bdf55[_0x5bc326(0xf5)]===_0x5bc326(0x131)),_0x8f78ab=_0x443ece['map'](_0x3e7058=>entityToJourneyListItem(_0x3e7058,_0x65387));return{'journeys':this[_0x5bc326(0xb9)](_0x8f78ab,_0x59cacb?.[_0x5bc326(0x105)]),'folders':_0x6bada6};}async[a131_0x35aab0(0x107)](_0x559639,_0x4e95b7){const _0x22708f=a131_0x35aab0;let _0x1d7911;try{_0x1d7911=await this[_0x22708f(0xbe)][_0x22708f(0x132)](_0x559639);}catch(_0x527318){if(isHttp404Error(_0x527318))return{'journeys':[],'activationStepsById':new Map()};throw _0x527318;}const _0x1a5c04=_0x1d7911[_0x22708f(0xb0)](async _0x715c86=>{const _0x34a428=_0x22708f;return await this['listJourneysWithDetails'](_0x715c86['id'],_0x4e95b7?.[_0x34a428(0x105)]);}),_0x15ef41=await Promise[_0x22708f(0xbf)](_0x1a5c04),_0x30e7f4=new Map(),_0x373829=[];for(const _0x32aecf of _0x15ef41){_0x373829[_0x22708f(0x11b)](..._0x32aecf[_0x22708f(0xad)]);for(const [_0x4936d2,_0x5f2fd6]of _0x32aecf[_0x22708f(0x122)]){_0x30e7f4[_0x22708f(0xed)](_0x4936d2,_0x5f2fd6);}}const _0x276e10=new Set(),_0x327575=_0x373829[_0x22708f(0xfa)](_0x2a4964=>{const _0x448bdf=_0x22708f;if(_0x276e10[_0x448bdf(0xf7)](_0x2a4964['id']))return![];return _0x276e10[_0x448bdf(0xe3)](_0x2a4964['id']),!![];});return{'journeys':this[_0x22708f(0xb9)](_0x327575,_0x4e95b7?.[_0x22708f(0x105)]),'activationStepsById':_0x30e7f4};}async[a131_0x35aab0(0x10f)](_0x8705bc){const _0x53c1d8=a131_0x35aab0;try{return await this[_0x53c1d8(0xbe)][_0x53c1d8(0x10f)](_0x8705bc);}catch(_0x408ad5){if(isHttp404Error(_0x408ad5))throw new SDKError(ErrorCode[_0x53c1d8(0xd3)],_0x53c1d8(0xf8)+_0x8705bc,_0x408ad5);throw _0x408ad5;}}async[a131_0x35aab0(0x10c)](_0xf7ef51,_0x24a550){const _0x506e4e=a131_0x35aab0,_0x19c9da=await this['listJourneysFromParentSegment'](_0xf7ef51),_0xc86315=_0x19c9da[_0x506e4e(0xf1)](_0x2015ee=>_0x2015ee[_0x506e4e(0xf6)][_0x506e4e(0xdb)]()===_0x24a550['toLowerCase']());if(!_0xc86315)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x506e4e(0xf8)+_0x24a550,undefined,{'helpText':_0x506e4e(0x120)});return _0xc86315['id'];}async[a131_0x35aab0(0xe7)](_0x54e1e9,_0x214cf4){const _0x177c2d=a131_0x35aab0;try{return await this[_0x177c2d(0xbe)][_0x177c2d(0xac)](_0x54e1e9,_0x214cf4);}catch(_0x4a806a){if(isHttp404Error(_0x4a806a))throw new SDKError(ErrorCode[_0x177c2d(0xd3)],_0x177c2d(0xf8)+_0x54e1e9,_0x4a806a);throw _0x4a806a;}}async[a131_0x35aab0(0x125)](_0x3b235e,_0xddcae1){const _0x451f52=a131_0x35aab0,_0xf8db29={'from':_0xddcae1?.[_0x451f52(0x10b)],'to':_0xddcae1?.['to'],'limit':_0xddcae1?.[_0x451f52(0x123)]},_0x32ec0f=_0xddcae1?.[_0x451f52(0xf5)]!==_0x451f52(0xd6);try{const [_0x3b85cc,_0x4476a7]=await Promise[_0x451f52(0xbf)]([this['fetchTrafficRaw'](_0x3b235e,_0xddcae1?.[_0x451f52(0xf5)],_0xf8db29),_0x32ec0f?this[_0x451f52(0x10f)](_0x3b235e):undefined]);if(_0x3b85cc[_0x451f52(0x102)]&&_0x4476a7){const _0xcdd00d=buildStageNameMap(_0x4476a7);_0x3b85cc[_0x451f52(0x102)]=_0x3b85cc[_0x451f52(0x102)][_0x451f52(0xb0)](_0x5ec4fd=>({..._0x5ec4fd,'journeyStageName':_0xcdd00d[_0x451f52(0xdc)](_0x5ec4fd[_0x451f52(0x11f)])??_0x5ec4fd[_0x451f52(0x11f)]}));}return _0x3b85cc;}catch(_0x59d562){if(isHttp404Error(_0x59d562))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x451f52(0xf8)+_0x3b235e,_0x59d562);throw _0x59d562;}}async['fetchTrafficRaw'](_0x1a062e,_0x52160a,_0x309178){const _0x3bc17a=a131_0x35aab0;if(_0x52160a===_0x3bc17a(0xd6)){const _0x42295a=await this[_0x3bc17a(0xbe)]['getConversionSankeyChart'](_0x1a062e,_0x309178);return{'conversion':_0x42295a};}if(_0x52160a===_0x3bc17a(0x102)){const _0x1d97d6=await this['client'][_0x3bc17a(0xdd)](_0x1a062e,_0x309178);return{'activation':_0x1d97d6};}const [_0x13527c,_0x15e213]=await Promise[_0x3bc17a(0xbf)]([this[_0x3bc17a(0xbe)][_0x3bc17a(0xc2)](_0x1a062e,_0x309178),this[_0x3bc17a(0xbe)][_0x3bc17a(0xdd)](_0x1a062e,_0x309178)]);return{'conversion':_0x13527c,'activation':_0x15e213};}async['pause'](_0x22c4e4){const _0x214ca8=a131_0x35aab0;try{return await this[_0x214ca8(0xbe)]['pauseJourney'](_0x22c4e4);}catch(_0x56e572){if(isHttp404Error(_0x56e572))throw new SDKError(ErrorCode[_0x214ca8(0xd3)],_0x214ca8(0xf8)+_0x22c4e4,_0x56e572);throw _0x56e572;}}async[a131_0x35aab0(0xd2)](_0x21591e){const _0x42ce1a=a131_0x35aab0;try{return await this[_0x42ce1a(0xbe)][_0x42ce1a(0x10a)](_0x21591e);}catch(_0x4f30f2){if(isHttp404Error(_0x4f30f2))throw new SDKError(ErrorCode[_0x42ce1a(0xd3)],_0x42ce1a(0xf8)+_0x21591e,_0x4f30f2);throw _0x4f30f2;}}async['create'](_0x4ac71b){const _0x48e0ad=a131_0x35aab0;return await this[_0x48e0ad(0xbe)][_0x48e0ad(0xf4)](_0x4ac71b);}async[a131_0x35aab0(0x115)](_0x3277a5,_0x41edc4){const _0x392cf2=a131_0x35aab0;try{return await this[_0x392cf2(0xbe)][_0x392cf2(0xb2)](_0x3277a5,_0x41edc4);}catch(_0x5bdd65){if(isHttp404Error(_0x5bdd65))throw new SDKError(ErrorCode[_0x392cf2(0xd3)],_0x392cf2(0xf8)+_0x3277a5,_0x5bdd65);throw _0x5bdd65;}}async[a131_0x35aab0(0xcd)](_0x19eb27,_0x10aff5){const _0x55e97a=a131_0x35aab0;try{return await this[_0x55e97a(0xbe)]['getJourneyActivation'](_0x19eb27,_0x10aff5);}catch(_0x52011b){if(isHttp404Error(_0x52011b))throw new SDKError(ErrorCode[_0x55e97a(0xc9)],_0x55e97a(0xe2)+_0x10aff5+_0x55e97a(0x121)+_0x19eb27,_0x52011b);throw _0x52011b;}}async['listActivations'](_0x327cf1){try{return await this['client']['listJourneyActivations'](_0x327cf1);}catch(_0x33ea5f){if(isHttp404Error(_0x33ea5f))return[];throw _0x33ea5f;}}async[a131_0x35aab0(0xee)](_0x4fc8b7){const _0x1d2175=a131_0x35aab0,_0x2e9edb=await this[_0x1d2175(0x10d)](_0x4fc8b7);return _0x2e9edb[_0x1d2175(0xb0)](flattenJourneyActivation);}async[a131_0x35aab0(0x11c)](_0xd5fb8b,_0x12ef44){const _0x248607=a131_0x35aab0;return await this['client'][_0x248607(0xc0)](_0xd5fb8b,_0x12ef44);}async['getColumnMapping'](_0x13be76){const _0x2a43ac=a131_0x35aab0,_0x119f52=await this[_0x2a43ac(0x10f)](_0x13be76),_0x66d923=generateColumnMapping(_0x119f52);return{'journeyId':_0x119f52['id'],'journeyName':_0x119f52[_0x2a43ac(0xf0)][_0x2a43ac(0x128)],'database':_0x2a43ac(0xaa)+_0x119f52['attributes']['audienceId'],'table':'journey_'+_0x119f52['id'],'columns':_0x66d923};}async[a131_0x35aab0(0x116)](_0x449166){const _0x1b2094=a131_0x35aab0;return this[_0x1b2094(0xbe)][_0x1b2094(0xbc)](_0x449166);}async[a131_0x35aab0(0xe1)](_0x24ffff){const _0x48c3c2=a131_0x35aab0;if(!_0x24ffff)return undefined;try{const _0x4b62c4=await this['getBundle'](_0x24ffff);return _0x4b62c4[_0x48c3c2(0x108)];}catch{return undefined;}}async[a131_0x35aab0(0xa6)](_0x26fa5f){const _0x193d91=a131_0x35aab0,_0x54f622=await this['getJourney'](_0x26fa5f),_0x3002ca=_0x54f622[_0x193d91(0xf0)][_0x193d91(0xfb)];if(!_0x3002ca)return{'bundleId':'','bundleName':_0x54f622[_0x193d91(0xf0)][_0x193d91(0x128)],'bundleDescription':_0x54f622[_0x193d91(0xf0)][_0x193d91(0x12b)]??null,'latestJourneyId':_0x54f622['id'],'versions':[synthesizePreBundleVersion(_0x54f622)]};const _0x17d352=await this[_0x193d91(0x116)](_0x3002ca);return{'bundleId':_0x3002ca,'bundleName':_0x17d352[_0x193d91(0x128)],'bundleDescription':_0x17d352[_0x193d91(0x12b)]??null,'latestJourneyId':_0x17d352['latestJourneyId'],'versions':formatVersionsFromBundle(_0x17d352)};}async['createVersion'](_0x55fbc9){const _0x4b8a33=a131_0x35aab0,_0x504efc=await this['getJourney'](_0x55fbc9),_0x37da27=_0x504efc[_0x4b8a33(0xf0)][_0x4b8a33(0xfb)];if(!_0x37da27)throw new SDKError(ErrorCode[_0x4b8a33(0xe9)],_0x4b8a33(0x114));await this[_0x4b8a33(0xbe)][_0x4b8a33(0xab)](_0x37da27);const _0x4f6db9=await this[_0x4b8a33(0xbe)][_0x4b8a33(0xbc)](_0x37da27),_0x4f6248=_0x4f6db9['name']+'\x20v'+(_0x4f6db9[_0x4b8a33(0xc5)]+0x1);return this['client']['createJourneyVersion'](_0x37da27,{'sourceId':_0x55fbc9,'attributes':{'name':_0x4f6248}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a132_0xcb08(_0xf2146c,_0x3e3b15){_0xf2146c=_0xf2146c-0x1e3;const _0x22c88d=a132_0x22c8();let _0xcb08a8=_0x22c88d[_0xf2146c];return _0xcb08a8;}const a132_0x46286c=a132_0xcb08;function a132_0x22c8(){const _0xdcb3c9=['64536ncdQpR','370grELis','31888mNRYMa','3iVQeaR','clear','8ixnAXg','14016cPydVf','25935qZiSre','27764VVDWzY','477BBgtqp','4462772jFCxWN','246186dHOpqf','last_chat_id','read','3970gLpAJd','write','3705184hkKnER'];a132_0x22c8=function(){return _0xdcb3c9;};return a132_0x22c8();}(function(_0x48afe9,_0x12f58b){const _0x46a9d6=a132_0xcb08,_0x138670=_0x48afe9();while(!![]){try{const _0x39834d=-parseInt(_0x46a9d6(0x1eb))/0x1*(parseInt(_0x46a9d6(0x1f1))/0x2)+-parseInt(_0x46a9d6(0x1e9))/0x3*(parseInt(_0x46a9d6(0x1f0))/0x4)+-parseInt(_0x46a9d6(0x1e7))/0x5*(parseInt(_0x46a9d6(0x1e6))/0x6)+parseInt(_0x46a9d6(0x1e5))/0x7+parseInt(_0x46a9d6(0x1e8))/0x8*(-parseInt(_0x46a9d6(0x1ef))/0x9)+-parseInt(_0x46a9d6(0x1e3))/0xa*(-parseInt(_0x46a9d6(0x1ee))/0xb)+-parseInt(_0x46a9d6(0x1ec))/0xc*(-parseInt(_0x46a9d6(0x1ed))/0xd);if(_0x39834d===_0x12f58b)break;else _0x138670['push'](_0x138670['shift']());}catch(_0x42cd94){_0x138670['push'](_0x138670['shift']());}}}(a132_0x22c8,0xb80c5));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x46286c(0x1f2),'llm/chat');export function saveLastChatId(_0x57ce48){const _0x1e04f5=a132_0x46286c;chatIdCache[_0x1e04f5(0x1e4)](_0x57ce48);}export function loadLastChatId(){const _0x36a85c=a132_0x46286c;return chatIdCache[_0x36a85c(0x1f3)]();}export function clearLastChatId(){const _0x9cdfcb=a132_0x46286c;chatIdCache[_0x9cdfcb(0x1ea)]();}
|