@treasuredata/tdx 2026.7.2 → 2026.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/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-move-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/table-deleted.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.d.ts +11 -2
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.d.ts +16 -0
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +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-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.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/cas/validate-files.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.d.ts +5 -1
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/oauth-refresh.js.map +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/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.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/util/tree-search.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/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.d.ts +29 -0
- package/dist/utils/proxy-fetch.d.ts.map +1 -0
- package/dist/utils/proxy-fetch.js +1 -0
- package/dist/utils/proxy-fetch.js.map +1 -0
- 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 a136_0x2ef949=a136_0x524c;(function(_0x1d9c9f,_0x51a923){const _0x27aedc=a136_0x524c,_0x3ffbee=_0x1d9c9f();while(!![]){try{const _0x539e81=-parseInt(_0x27aedc(0x227))/0x1+-parseInt(_0x27aedc(0x217))/0x2+-parseInt(_0x27aedc(0x250))/0x3+-parseInt(_0x27aedc(0x24c))/0x4*(parseInt(_0x27aedc(0x24d))/0x5)+-parseInt(_0x27aedc(0x271))/0x6*(-parseInt(_0x27aedc(0x279))/0x7)+parseInt(_0x27aedc(0x22e))/0x8*(-parseInt(_0x27aedc(0x257))/0x9)+-parseInt(_0x27aedc(0x230))/0xa*(-parseInt(_0x27aedc(0x25f))/0xb);if(_0x539e81===_0x51a923)break;else _0x3ffbee['push'](_0x3ffbee['shift']());}catch(_0x133ac3){_0x3ffbee['push'](_0x3ffbee['shift']());}}}(a136_0x53ad,0x2d8f0));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x381b6d){const _0x3d7100=a136_0x524c;return _0x381b6d['journeyBundleId']??_0x381b6d[_0x3d7100(0x236)]?.[_0x3d7100(0x206)]??undefined;}function a136_0x524c(_0x426d14,_0x2183b9){_0x426d14=_0x426d14-0x1f3;const _0x53ad3f=a136_0x53ad();let _0x524c9e=_0x53ad3f[_0x426d14];return _0x524c9e;}function getVersionNumber(_0x401152){const _0x328c0b=a136_0x524c;return _0x401152[_0x328c0b(0x22f)]??_0x401152[_0x328c0b(0x236)]?.['versionNumber']??0x0;}function getState(_0x1bfb3c){const _0x279879=a136_0x524c;return _0x1bfb3c[_0x279879(0x25e)]??_0x1bfb3c['attributes']?.[_0x279879(0x25e)];}export function deduplicateJourneysByBundle(_0x171899){const _0x16e6d5=a136_0x524c,_0xc946d4=new Map();let _0x2377f5=0x0;for(const _0x8d75c7 of _0x171899){const _0x575339=getBundleId(_0x8d75c7);if(!_0x575339){const _0x119791=_0x16e6d5(0x237)+(_0x8d75c7['id']??_0x16e6d5(0x27a)+_0x2377f5++);_0xc946d4['set'](_0x119791,_0x8d75c7);continue;}const _0x10d562=_0xc946d4[_0x16e6d5(0x274)](_0x575339);if(!_0x10d562)_0xc946d4['set'](_0x575339,_0x8d75c7);else{const _0x380989=getState(_0x10d562)===_0x16e6d5(0x26c),_0x2fdf21=getState(_0x8d75c7)===_0x16e6d5(0x26c);if(_0x2fdf21&&!_0x380989)_0xc946d4['set'](_0x575339,_0x8d75c7);else{if(!_0x2fdf21&&_0x380989){}else{const _0xa34241=getVersionNumber(_0x10d562),_0x5744f8=getVersionNumber(_0x8d75c7);_0x5744f8>_0xa34241&&_0xc946d4[_0x16e6d5(0x272)](_0x575339,_0x8d75c7);}}}}return Array[_0x16e6d5(0x204)](_0xc946d4[_0x16e6d5(0x249)]());}const VALID_JOURNEY_STATES=new Set([a136_0x2ef949(0x212),'simulation',a136_0x2ef949(0x26c)]);export function parseJourneyState(_0x1721e2){const _0xfe0fe0=a136_0x2ef949;if(typeof _0x1721e2===_0xfe0fe0(0x263)&&VALID_JOURNEY_STATES[_0xfe0fe0(0x255)](_0x1721e2))return _0x1721e2;return'draft';}export function entityToJourneyListItem(_0x2480b4,_0x2c6215){const _0x19a22c=a136_0x2ef949,_0x1b2112=_0x2480b4[_0x19a22c(0x236)];return{'id':_0x2480b4['id'],'name':_0x1b2112[_0x19a22c(0x26b)]??'','journeyBundleName':_0x1b2112[_0x19a22c(0x25c)]??_0x1b2112['name']??'','journeyBundleId':_0x1b2112['journeyBundleId']??'','versionNumber':_0x1b2112[_0x19a22c(0x22f)],'description':_0x1b2112[_0x19a22c(0x200)]??null,'state':parseJourneyState(_0x1b2112[_0x19a22c(0x25e)]),'paused':_0x1b2112[_0x19a22c(0x231)]??![],'audienceId':_0x2c6215,'folderId':_0x1b2112[_0x19a22c(0x21b)]??_0x2480b4[_0x19a22c(0x226)]?.[_0x19a22c(0x228)]?.[_0x19a22c(0x233)]?.['id']??null,'createdAt':_0x1b2112[_0x19a22c(0x21d)]??'','updatedAt':_0x1b2112[_0x19a22c(0x210)]??''};}function a136_0x53ad(){const _0x428fe1=['13720619LYIaAE','getLatestJourneyId','waitCondition','map','string','folder-segment','listEntitiesByFolder','Journey\x20not\x20found:\x20','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','goal','resolveJourneyId','exitCriteria','name','launched','reduce','goalSize','applyVersionDeduplication','journeys','192IJxjLD','set','getParentSegmentFull','get','_milestone','WaitStep','conditions','fixed','48349IqASZP','idx-','replace','exitInflux','outtime_stage_','listJourneyActivations','toLowerCase','excluded','type','milestone','intime_goal','intime_stage_','pauseJourney','\x20in\x20journey\x20','listActivations','client','variants','isArray','description','branch','getJourneyBundle','segmentId','from','getJourneyStatistics','journeyBundleId','getBundle','_variant_','activationStepsById','getColumnMapping','getJourney','sort','rootFolderId','checkJourneyAppendable','filter','updatedAt','branches','draft','outtime_journey','getTrafficData','pause','latestJourneyId','593318khMsPb','exitCriterias','steps','cdp_audience_','segmentFolderId','createJourney','createdAt','getConversionSankeyChart','journeyStageId','push','listActivationsFlat','listJourneysWithDetails','size','update','goalInflux','relationships','255097ccCknW','parentFolder','resumeJourney','listJourneys','conditionSegmentId','listJourneysWithFolders','history','103552KQtmgo','versionNumber','10VCWFUX','paused','entryCriteria','data','create','step','attributes','no-bundle-','createVersion','getJourneyActivation','journey','run','JOURNEY_NOT_FOUND','all','journeyStages','resume','resolveRootFolderId','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','getActivationSankeyChart','entryInflux','INVALID_ARGUMENT','out','includeAllVersions','stage','length','values','listJourneysFromParentSegment','audienceId','1236ZYhaoP','3805Nmtycm','listVersions','conversion','552552oRtMIS','entries','listJourneysWithDetailsFromParentSegment','jumpInflux','timedOutPath','has','activation','216WDThSJ','time','exitOrJumpSize','getStatistics','milestoneInflux','journeyBundleName','fetchTrafficRaw','state'];a136_0x53ad=function(){return _0x428fe1;};return a136_0x53ad();}function convertToColumnId(_0x17e7c4){const _0xb42552=a136_0x2ef949;return _0x17e7c4[_0xb42552(0x27b)](/-/g,'_');}function getStepEntries(_0x4b15a8){const _0x5c4f69=a136_0x2ef949;if(!_0x4b15a8)return[];if(Array['isArray'](_0x4b15a8))return _0x4b15a8[_0x5c4f69(0x262)](_0x37af88=>[_0x37af88['id'],_0x37af88]);return Object[_0x5c4f69(0x251)](_0x4b15a8);}export function flattenJourneyActivation(_0x15c5d2){const _0x4c1a74=a136_0x2ef949,{activationParams:_0x393b21,activationId:_0x1d2ab,runAfterJourneyRefresh:_0xbc9ec3}=_0x15c5d2[_0x4c1a74(0x236)];return{'id':_0x15c5d2['id'],'activationId':_0x1d2ab,'runAfterJourneyRefresh':_0xbc9ec3,..._0x393b21};}function col(_0x143c0a,_0xc977ff={}){const _0x28372a=a136_0x2ef949;return{'column':_0x143c0a,'direction':null,'stageIndex':null,'stageName':null,'category':_0x28372a(0x278),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0xc977ff};}export function generateColumnMapping(_0x3cb46a){const _0x3d59ca=a136_0x2ef949,_0x3366b3=[];_0x3366b3[_0x3d59ca(0x220)](col('cdp_customer_id')),_0x3366b3[_0x3d59ca(0x220)](col('intime_journey',{'direction':'in','category':_0x3d59ca(0x23a)})),_0x3366b3[_0x3d59ca(0x220)](col(_0x3d59ca(0x213),{'direction':_0x3d59ca(0x245),'category':_0x3d59ca(0x23a)}));_0x3cb46a[_0x3d59ca(0x236)][_0x3d59ca(0x268)]&&_0x3366b3[_0x3d59ca(0x220)](col(_0x3d59ca(0x1f8),{'direction':'in','category':_0x3d59ca(0x268),'detail':_0x3cb46a[_0x3d59ca(0x236)][_0x3d59ca(0x268)][_0x3d59ca(0x26b)]||null}));const _0x57e906=_0x3cb46a['attributes'][_0x3d59ca(0x23e)]||[];for(let _0x3b0174=0x0;_0x3b0174<_0x57e906[_0x3d59ca(0x248)];_0x3b0174++){const _0x4844d0=_0x57e906[_0x3b0174],_0x3f6a32=_0x4844d0['name'],_0x9edd15={'stageIndex':_0x3b0174,'stageName':_0x3f6a32},_0x4c4db0=_0x4844d0[_0x3d59ca(0x232)]?.['name']||null;_0x3366b3['push'](col(_0x3d59ca(0x1f9)+_0x3b0174,{..._0x9edd15,'direction':'in','category':_0x3d59ca(0x247),'detail':_0x4c4db0})),_0x3366b3[_0x3d59ca(0x220)](col(_0x3d59ca(0x27d)+_0x3b0174,{..._0x9edd15,'direction':_0x3d59ca(0x245),'category':_0x3d59ca(0x247),'detail':_0x4c4db0}));_0x4844d0[_0x3d59ca(0x1f7)]&&_0x3366b3[_0x3d59ca(0x220)](col('intime_stage_'+_0x3b0174+_0x3d59ca(0x275),{..._0x9edd15,'direction':'in','category':_0x3d59ca(0x1f7),'detail':_0x4844d0['milestone']['name']||null}));const _0x2101b8=_0x4844d0[_0x3d59ca(0x218)]||_0x4844d0[_0x3d59ca(0x26a)]||[];for(let _0xe538f0=0x0;_0xe538f0<_0x2101b8[_0x3d59ca(0x248)];_0xe538f0++){_0x3366b3['push'](col(_0x3d59ca(0x1f9)+_0x3b0174+'_exit_'+_0xe538f0,{..._0x9edd15,'direction':'in','category':'exit_criteria','detail':_0x2101b8[_0xe538f0][_0x3d59ca(0x26b)]||null}));}const _0x157693=getStepEntries(_0x4844d0[_0x3d59ca(0x219)]);for(const [_0x33ee24,_0xaacdd]of _0x157693){const _0xaf9a45=convertToColumnId(_0x33ee24),_0x101950=_0xaacdd[_0x3d59ca(0x1f6)]||null,_0x4693f0=_0xaacdd[_0x3d59ca(0x26b)]||null,_0x2abf80={..._0x9edd15,'stepType':_0x101950,'stepName':_0x4693f0,'stepId':_0x33ee24};_0x3366b3[_0x3d59ca(0x220)](col(_0x3d59ca(0x1f9)+_0x3b0174+'_'+_0xaf9a45,{..._0x2abf80,'direction':'in','category':_0x3d59ca(0x235)})),_0x3366b3[_0x3d59ca(0x220)](col(_0x3d59ca(0x27d)+_0x3b0174+'_'+_0xaf9a45,{..._0x2abf80,'direction':_0x3d59ca(0x245),'category':_0x3d59ca(0x235)}));if(_0xaacdd[_0x3d59ca(0x1f6)]==='DecisionPoint'&&_0xaacdd[_0x3d59ca(0x211)])for(const _0x7815ea of _0xaacdd[_0x3d59ca(0x211)]){_0x7815ea[_0x3d59ca(0x203)]&&_0x3366b3[_0x3d59ca(0x220)](col('intime_stage_'+_0x3b0174+'_'+_0xaf9a45+'_'+_0x7815ea[_0x3d59ca(0x203)],{..._0x2abf80,'direction':'in','category':'branch','detail':_0x7815ea[_0x3d59ca(0x26b)]||(_0x7815ea[_0x3d59ca(0x1f5)]?'Excluded\x20profiles':null)}));}if((_0xaacdd['type']==='AbTest'||_0xaacdd[_0x3d59ca(0x1f6)]==='ABTest')&&_0xaacdd[_0x3d59ca(0x1fe)])for(const _0x16f25d of _0xaacdd['variants']){_0x16f25d['id']&&_0x3366b3[_0x3d59ca(0x220)](col(_0x3d59ca(0x1f9)+_0x3b0174+'_'+_0xaf9a45+_0x3d59ca(0x208)+convertToColumnId(_0x16f25d['id']),{..._0x2abf80,'direction':'in','category':'variant','detail':_0x16f25d[_0x3d59ca(0x26b)]||null}));}if(_0xaacdd[_0x3d59ca(0x1f6)]===_0x3d59ca(0x276)||_0xaacdd['type']==='Wait'){const _0x9eac73=[];if(_0xaacdd[_0x3d59ca(0x22b)])_0x9eac73[_0x3d59ca(0x220)](_0xaacdd[_0x3d59ca(0x22b)]);else{if(Array[_0x3d59ca(0x1ff)](_0xaacdd[_0x3d59ca(0x277)]))for(const _0x43d708 of _0xaacdd['conditions']){_0x43d708['segmentId']&&!_0x43d708[_0x3d59ca(0x254)]&&_0x9eac73['push'](_0x43d708[_0x3d59ca(0x203)]);}else _0xaacdd[_0x3d59ca(0x261)]?.[_0x3d59ca(0x203)]&&_0x9eac73[_0x3d59ca(0x220)](_0xaacdd['waitCondition'][_0x3d59ca(0x203)]);}for(const _0x59aad3 of _0x9eac73){_0x3366b3[_0x3d59ca(0x220)](col(_0x3d59ca(0x1f9)+_0x3b0174+'_'+_0xaf9a45+'_'+_0x59aad3,{..._0x2abf80,'direction':'in','category':_0x3d59ca(0x201)}));}}}}return _0x3366b3['push'](col(_0x3d59ca(0x258))),_0x3366b3;}export function aggregateJourneyHistory(_0x174f7f){const _0x4eb70a=a136_0x2ef949,_0x5d47af=_0x174f7f[_0x4eb70a(0x26d)]((_0x2c0228,_0x15f8e6)=>_0x2c0228+(_0x15f8e6[_0x4eb70a(0x243)]??0x0),0x0),_0x3f7a6c=_0x174f7f['reduce']((_0x10d5ca,_0x408154)=>_0x10d5ca+(_0x408154[_0x4eb70a(0x225)]??0x0),0x0),_0x37dae0=_0x174f7f['reduce']((_0x537368,_0x1df795)=>_0x537368+((_0x1df795['exitInflux']??0x0)+(_0x1df795['jumpInflux']??0x0)),0x0),_0x3b61f7=_0x174f7f[_0x174f7f[_0x4eb70a(0x248)]-0x1];return{'size':_0x3b61f7?.[_0x4eb70a(0x223)]??0x0,'entered':_0x5d47af,'goal_achieved':_0x3f7a6c,'completion_rate':_0x3f7a6c&&_0x5d47af?_0x3f7a6c/_0x5d47af*0x64:0x0,'exit_or_jump':_0x37dae0,'exit_or_jump_rate':_0x37dae0&&_0x5d47af?_0x37dae0/_0x5d47af*0x64:0x0};}export function aggregateStageHistory(_0x547913){const _0x44a0a3=a136_0x2ef949,_0x383139=_0x547913[_0x44a0a3(0x26d)]((_0x311b7b,_0x187db1)=>_0x311b7b+(_0x187db1[_0x44a0a3(0x243)]??0x0),0x0),_0x56577d=_0x547913[_0x44a0a3(0x26d)]((_0xf479ae,_0x5889ba)=>_0xf479ae+(_0x5889ba[_0x44a0a3(0x25b)]??0x0),0x0),_0x18673a=_0x547913[_0x44a0a3(0x26d)]((_0x2f71dc,_0x3714e2)=>_0x2f71dc+((_0x3714e2[_0x44a0a3(0x27c)]??0x0)+(_0x3714e2[_0x44a0a3(0x253)]??0x0)),0x0),_0x3c09d9=_0x547913[_0x547913[_0x44a0a3(0x248)]-0x1];return{'size':_0x3c09d9?.[_0x44a0a3(0x223)]??0x0,'entered':_0x383139,'milestone':_0x56577d,'milestone_rate':_0x56577d&&_0x383139?_0x56577d/_0x383139*0x64:0x0,'exit_or_jump':_0x18673a,'exit_or_jump_rate':_0x18673a&&_0x383139?_0x18673a/_0x383139*0x64:0x0};}export function assembleJourneyStats(_0x54d6ce,_0x2d9df0){const _0x5ed770=a136_0x2ef949,_0x2e89af=!!(_0x2d9df0?.[_0x5ed770(0x204)]||_0x2d9df0?.['to'])&&!!_0x54d6ce[_0x5ed770(0x22d)]?.[_0x5ed770(0x248)];if(_0x2e89af){const _0xf20653=aggregateJourneyHistory(_0x54d6ce[_0x5ed770(0x22d)]),_0x3e3dd8={'journey_id':_0x54d6ce['journeyId'],..._0x2d9df0?.[_0x5ed770(0x204)]&&{'from':_0x2d9df0[_0x5ed770(0x204)]},..._0x2d9df0?.['to']&&{'to':_0x2d9df0['to']},..._0xf20653};return _0x2d9df0?.['includeHistory']&&(_0x3e3dd8['history']=_0x54d6ce['history']),_0x3e3dd8;}return{'journey_id':_0x54d6ce['journeyId'],'size':_0x54d6ce[_0x5ed770(0x223)],'entered':_0x54d6ce['enteredSize'],'goal_achieved':_0x54d6ce[_0x5ed770(0x26e)],'completion_rate':_0x54d6ce['completionRate'],'exit_or_jump':_0x54d6ce[_0x5ed770(0x259)],'exit_or_jump_rate':_0x54d6ce['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x67b549){const _0x2e4027=a136_0x2ef949,_0x9ff6a8=_0x67b549['journeys']['map'](_0x315bc1=>({'journeyId':_0x315bc1['id'],'versionNumber':_0x315bc1[_0x2e4027(0x236)][_0x2e4027(0x22f)]??0x0,'name':_0x315bc1[_0x2e4027(0x236)][_0x2e4027(0x26b)],'state':_0x315bc1[_0x2e4027(0x236)][_0x2e4027(0x25e)],'paused':_0x315bc1['attributes'][_0x2e4027(0x231)],'createdAt':_0x315bc1[_0x2e4027(0x236)][_0x2e4027(0x21d)],'updatedAt':_0x315bc1[_0x2e4027(0x236)][_0x2e4027(0x210)]}));return _0x9ff6a8[_0x2e4027(0x20c)]((_0x494f06,_0x16d464)=>_0x494f06[_0x2e4027(0x22f)]-_0x16d464[_0x2e4027(0x22f)]),_0x9ff6a8;}export function synthesizePreBundleVersion(_0x1e1da9){const _0xc68092=a136_0x2ef949;return{'journeyId':_0x1e1da9['id'],'versionNumber':0x1,'name':_0x1e1da9[_0xc68092(0x236)][_0xc68092(0x26b)],'state':_0x1e1da9[_0xc68092(0x236)][_0xc68092(0x25e)],'paused':_0x1e1da9[_0xc68092(0x236)][_0xc68092(0x231)],'createdAt':_0x1e1da9[_0xc68092(0x236)]['createdAt'],'updatedAt':_0x1e1da9[_0xc68092(0x236)][_0xc68092(0x210)]};}export function buildStageNameMap(_0x1d320f){const _0x2d07ca=a136_0x2ef949;return new Map(_0x1d320f[_0x2d07ca(0x236)][_0x2d07ca(0x23e)]?.[_0x2d07ca(0x262)](_0x315de9=>[_0x315de9['id'],_0x315de9['name']])??[]);}export class JourneySDK{[a136_0x2ef949(0x1fd)];constructor(_0x5a1715){const _0x369e0f=a136_0x2ef949;this[_0x369e0f(0x1fd)]=new CDPApiClient(_0x5a1715);}['applyVersionDeduplication'](_0x1dee64,_0x2cb5da){return _0x2cb5da?_0x1dee64:deduplicateJourneysByBundle(_0x1dee64);}async['resolveRootFolderId'](_0x3746c1){const _0x3880d2=a136_0x2ef949,_0x682f38=await this[_0x3880d2(0x1fd)][_0x3880d2(0x273)](_0x3746c1);return _0x682f38[_0x3880d2(0x20d)]??undefined;}async[a136_0x2ef949(0x222)](_0x265a52,_0x1e9ddf){const _0x3359c3=a136_0x2ef949;try{const _0x4e0dde=await this[_0x3359c3(0x1fd)][_0x3359c3(0x222)](_0x265a52);return{'journeys':this[_0x3359c3(0x26f)](_0x4e0dde[_0x3359c3(0x270)],_0x1e9ddf),'activationStepsById':_0x4e0dde['activationStepsById']};}catch(_0x5545a9){if(isHttp404Error(_0x5545a9))return{'journeys':[],'activationStepsById':new Map()};throw _0x5545a9;}}async[a136_0x2ef949(0x24a)](_0x34c240,_0x2a0913,_0x499587){const _0x15bbe5=a136_0x2ef949;let _0x2626e7=_0x2a0913;if(!_0x2626e7)try{_0x2626e7=await this['resolveRootFolderId'](_0x34c240);}catch(_0x329098){if(isHttp404Error(_0x329098))return[];throw _0x329098;}if(!_0x2626e7)return[];let _0x1d96ef;if(_0x499587?.[_0x15bbe5(0x246)])_0x1d96ef=await this['client'][_0x15bbe5(0x22a)](_0x2626e7);else{const _0x2ac24b=await this['client'][_0x15bbe5(0x265)](_0x2626e7,0x20,![]),_0x580a22=_0x2ac24b[_0x15bbe5(0x233)],_0x2813fc=_0x580a22[_0x15bbe5(0x20f)](_0x5def6e=>_0x5def6e[_0x15bbe5(0x1f6)]==='journey');_0x1d96ef=_0x2813fc[_0x15bbe5(0x262)](_0x5279fa=>entityToJourneyListItem(_0x5279fa,_0x34c240));}return this['applyVersionDeduplication'](_0x1d96ef,_0x499587?.[_0x15bbe5(0x246)]);}async[a136_0x2ef949(0x22c)](_0xe8b445,_0x4c20d3,_0x1d2404){const _0x4d50e3=a136_0x2ef949;if(!_0x4c20d3)return{'journeys':[],'folders':[]};const _0x29108c=await this[_0x4d50e3(0x1fd)][_0x4d50e3(0x265)](_0x4c20d3,0x20,![]),_0x107f53=_0x29108c[_0x4d50e3(0x233)],_0x4b3e50=_0x107f53[_0x4d50e3(0x20f)](_0x24a3f6=>_0x24a3f6[_0x4d50e3(0x1f6)]===_0x4d50e3(0x264)&&_0x24a3f6['id']!==_0x4c20d3),_0x4685ed=_0x4b3e50[_0x4d50e3(0x262)](_0x46e83d=>({'id':_0x46e83d['id'],'name':_0x46e83d[_0x4d50e3(0x236)][_0x4d50e3(0x26b)]})),_0x18cdcb=_0x107f53[_0x4d50e3(0x20f)](_0xc63155=>_0xc63155[_0x4d50e3(0x1f6)]===_0x4d50e3(0x23a)),_0x45aa99=_0x18cdcb[_0x4d50e3(0x262)](_0x55cb14=>entityToJourneyListItem(_0x55cb14,_0xe8b445));return{'journeys':this[_0x4d50e3(0x26f)](_0x45aa99,_0x1d2404?.['includeAllVersions']),'folders':_0x4685ed};}async[a136_0x2ef949(0x252)](_0x33cef3,_0x7eb059){const _0x22a59e=a136_0x2ef949;let _0x4098da;try{_0x4098da=await this[_0x22a59e(0x240)](_0x33cef3);}catch(_0x49d46f){if(isHttp404Error(_0x49d46f))return{'journeys':[],'activationStepsById':new Map()};throw _0x49d46f;}if(!_0x4098da)return{'journeys':[],'activationStepsById':new Map()};const _0xd80d84=await this[_0x22a59e(0x222)](_0x4098da,_0x7eb059?.['includeAllVersions']);return{'journeys':this[_0x22a59e(0x26f)](_0xd80d84[_0x22a59e(0x270)],_0x7eb059?.[_0x22a59e(0x246)]),'activationStepsById':_0xd80d84[_0x22a59e(0x209)]};}async[a136_0x2ef949(0x20b)](_0x5d1325){const _0xc45938=a136_0x2ef949;try{return await this[_0xc45938(0x1fd)][_0xc45938(0x20b)](_0x5d1325);}catch(_0x39384d){if(isHttp404Error(_0x39384d))throw new SDKError(ErrorCode[_0xc45938(0x23c)],_0xc45938(0x266)+_0x5d1325,_0x39384d);throw _0x39384d;}}async[a136_0x2ef949(0x269)](_0x23f835,_0x524efa){const _0x2342f4=a136_0x2ef949,_0x22b5ac=await this[_0x2342f4(0x24a)](_0x23f835),_0x389d3b=_0x22b5ac['find'](_0x2cf1d9=>_0x2cf1d9[_0x2342f4(0x25c)][_0x2342f4(0x1f4)]()===_0x524efa[_0x2342f4(0x1f4)]());if(!_0x389d3b)throw new SDKError(ErrorCode[_0x2342f4(0x23c)],'Journey\x20not\x20found:\x20'+_0x524efa,undefined,{'helpText':_0x2342f4(0x241)});return _0x389d3b['id'];}async[a136_0x2ef949(0x25a)](_0x4da1a8,_0x5dd53d){const _0xc41df3=a136_0x2ef949;try{return await this['client'][_0xc41df3(0x205)](_0x4da1a8,_0x5dd53d);}catch(_0x12ab6e){if(isHttp404Error(_0x12ab6e))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0xc41df3(0x266)+_0x4da1a8,_0x12ab6e);throw _0x12ab6e;}}async[a136_0x2ef949(0x214)](_0x929577,_0x41c0b5){const _0x38bf0d=a136_0x2ef949,_0x126975={'from':_0x41c0b5?.[_0x38bf0d(0x204)],'to':_0x41c0b5?.['to'],'limit':_0x41c0b5?.['limit']},_0x2f1d0e=_0x41c0b5?.[_0x38bf0d(0x1f6)]!==_0x38bf0d(0x24f);try{const [_0xdec0ee,_0x48345c]=await Promise[_0x38bf0d(0x23d)]([this[_0x38bf0d(0x25d)](_0x929577,_0x41c0b5?.[_0x38bf0d(0x1f6)],_0x126975),_0x2f1d0e?this[_0x38bf0d(0x20b)](_0x929577):undefined]);if(_0xdec0ee[_0x38bf0d(0x256)]&&_0x48345c){const _0x3f7161=buildStageNameMap(_0x48345c);_0xdec0ee[_0x38bf0d(0x256)]=_0xdec0ee['activation'][_0x38bf0d(0x262)](_0x31fad2=>({..._0x31fad2,'journeyStageName':_0x3f7161[_0x38bf0d(0x274)](_0x31fad2['journeyStageId'])??_0x31fad2[_0x38bf0d(0x21f)]}));}return _0xdec0ee;}catch(_0x4e10dc){if(isHttp404Error(_0x4e10dc))throw new SDKError(ErrorCode[_0x38bf0d(0x23c)],_0x38bf0d(0x266)+_0x929577,_0x4e10dc);throw _0x4e10dc;}}async[a136_0x2ef949(0x25d)](_0x2c0884,_0x4b6187,_0x5854f1){const _0x5f3015=a136_0x2ef949;if(_0x4b6187===_0x5f3015(0x24f)){const _0x312dd7=await this[_0x5f3015(0x1fd)][_0x5f3015(0x21e)](_0x2c0884,_0x5854f1);return{'conversion':_0x312dd7};}if(_0x4b6187===_0x5f3015(0x256)){const _0x241fb4=await this['client'][_0x5f3015(0x242)](_0x2c0884,_0x5854f1);return{'activation':_0x241fb4};}const [_0x3c03ba,_0x50a7d9]=await Promise[_0x5f3015(0x23d)]([this[_0x5f3015(0x1fd)][_0x5f3015(0x21e)](_0x2c0884,_0x5854f1),this[_0x5f3015(0x1fd)][_0x5f3015(0x242)](_0x2c0884,_0x5854f1)]);return{'conversion':_0x3c03ba,'activation':_0x50a7d9};}async[a136_0x2ef949(0x215)](_0x134cb5){const _0x40edf4=a136_0x2ef949;try{return await this[_0x40edf4(0x1fd)][_0x40edf4(0x1fa)](_0x134cb5);}catch(_0x1e682a){if(isHttp404Error(_0x1e682a))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x40edf4(0x266)+_0x134cb5,_0x1e682a);throw _0x1e682a;}}async[a136_0x2ef949(0x23f)](_0x319a10){const _0x4b58e7=a136_0x2ef949;try{return await this[_0x4b58e7(0x1fd)][_0x4b58e7(0x229)](_0x319a10);}catch(_0x36218c){if(isHttp404Error(_0x36218c))throw new SDKError(ErrorCode[_0x4b58e7(0x23c)],_0x4b58e7(0x266)+_0x319a10,_0x36218c);throw _0x36218c;}}async[a136_0x2ef949(0x23b)](_0x599d32){const _0x1dd62b=a136_0x2ef949;try{return await this[_0x1dd62b(0x1fd)]['runJourney'](_0x599d32);}catch(_0x7300de){if(isHttp404Error(_0x7300de))throw new SDKError(ErrorCode[_0x1dd62b(0x23c)],_0x1dd62b(0x266)+_0x599d32,_0x7300de);throw _0x7300de;}}async[a136_0x2ef949(0x234)](_0x4f46a9){const _0x33212f=a136_0x2ef949;return await this[_0x33212f(0x1fd)][_0x33212f(0x21c)](_0x4f46a9);}async[a136_0x2ef949(0x224)](_0x35b695,_0x413b11){const _0x4996dd=a136_0x2ef949;try{return await this[_0x4996dd(0x1fd)]['updateJourney'](_0x35b695,_0x413b11);}catch(_0x2e5f97){if(isHttp404Error(_0x2e5f97))throw new SDKError(ErrorCode[_0x4996dd(0x23c)],_0x4996dd(0x266)+_0x35b695,_0x2e5f97);throw _0x2e5f97;}}async['getActivation'](_0x5a0e45,_0x8a174d){const _0x5623c4=a136_0x2ef949;try{return await this[_0x5623c4(0x1fd)][_0x5623c4(0x239)](_0x5a0e45,_0x8a174d);}catch(_0x1d8496){if(isHttp404Error(_0x1d8496))throw new SDKError(ErrorCode['NOT_FOUND'],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x8a174d+_0x5623c4(0x1fb)+_0x5a0e45,_0x1d8496);throw _0x1d8496;}}async[a136_0x2ef949(0x1fc)](_0x195ba7){const _0x5a7869=a136_0x2ef949;try{return await this['client'][_0x5a7869(0x1f3)](_0x195ba7);}catch(_0x1094e0){if(isHttp404Error(_0x1094e0))return[];throw _0x1094e0;}}async[a136_0x2ef949(0x221)](_0x52d236){const _0x2190ae=a136_0x2ef949,_0x4130b9=await this['listActivations'](_0x52d236);return _0x4130b9[_0x2190ae(0x262)](flattenJourneyActivation);}async['createActivation'](_0x1f3391,_0x403e9e){const _0x1f00de=a136_0x2ef949;return await this[_0x1f00de(0x1fd)]['createJourneyActivation'](_0x1f3391,_0x403e9e);}async[a136_0x2ef949(0x20a)](_0x1b8c03){const _0x3e8416=a136_0x2ef949,_0xeeeb39=await this[_0x3e8416(0x20b)](_0x1b8c03),_0x16054c=generateColumnMapping(_0xeeeb39);return{'journeyId':_0xeeeb39['id'],'journeyName':_0xeeeb39[_0x3e8416(0x236)][_0x3e8416(0x26b)],'database':_0x3e8416(0x21a)+_0xeeeb39[_0x3e8416(0x236)][_0x3e8416(0x24b)],'table':'journey_'+_0xeeeb39['id'],'columns':_0x16054c};}async[a136_0x2ef949(0x207)](_0x563bab){const _0xf058f1=a136_0x2ef949;return this[_0xf058f1(0x1fd)]['getJourneyBundle'](_0x563bab);}async[a136_0x2ef949(0x260)](_0x3c037d){const _0x5013a8=a136_0x2ef949;if(!_0x3c037d)return undefined;try{const _0x3579ed=await this['getBundle'](_0x3c037d);return _0x3579ed[_0x5013a8(0x216)];}catch{return undefined;}}async[a136_0x2ef949(0x24e)](_0x3068e8){const _0x2aa6e9=a136_0x2ef949,_0x9137d7=await this[_0x2aa6e9(0x20b)](_0x3068e8),_0x5ae047=_0x9137d7[_0x2aa6e9(0x236)][_0x2aa6e9(0x206)];if(!_0x5ae047)return{'bundleId':'','bundleName':_0x9137d7[_0x2aa6e9(0x236)]['name'],'bundleDescription':_0x9137d7['attributes'][_0x2aa6e9(0x200)]??null,'latestJourneyId':_0x9137d7['id'],'versions':[synthesizePreBundleVersion(_0x9137d7)]};const _0x521308=await this[_0x2aa6e9(0x207)](_0x5ae047);return{'bundleId':_0x5ae047,'bundleName':_0x521308['name'],'bundleDescription':_0x521308[_0x2aa6e9(0x200)]??null,'latestJourneyId':_0x521308[_0x2aa6e9(0x216)],'versions':formatVersionsFromBundle(_0x521308)};}async[a136_0x2ef949(0x238)](_0x198cf4){const _0x115a92=a136_0x2ef949,_0xff8cc6=await this['getJourney'](_0x198cf4),_0x396251=_0xff8cc6[_0x115a92(0x236)][_0x115a92(0x206)];if(!_0x396251)throw new SDKError(ErrorCode[_0x115a92(0x244)],_0x115a92(0x267));await this[_0x115a92(0x1fd)][_0x115a92(0x20e)](_0x396251);const _0x673409=await this[_0x115a92(0x1fd)][_0x115a92(0x202)](_0x396251),_0x1d3282=_0x673409['name']+'\x20v'+(_0x673409['lastVersionNumber']+0x1);return this[_0x115a92(0x1fd)]['createJourneyVersion'](_0x396251,{'sourceId':_0x198cf4,'attributes':{'name':_0x1d3282}});}}
|
|
1
|
+
const a136_0x4bf9a9=a136_0x7440;(function(_0x4eee9e,_0x2fd195){const _0x3faf1a=a136_0x7440,_0x2b0357=_0x4eee9e();while(!![]){try{const _0x1dc288=-parseInt(_0x3faf1a(0x1c8))/0x1*(-parseInt(_0x3faf1a(0x21d))/0x2)+-parseInt(_0x3faf1a(0x1d5))/0x3+parseInt(_0x3faf1a(0x1f6))/0x4*(-parseInt(_0x3faf1a(0x203))/0x5)+parseInt(_0x3faf1a(0x1ed))/0x6*(parseInt(_0x3faf1a(0x246))/0x7)+parseInt(_0x3faf1a(0x1e9))/0x8+-parseInt(_0x3faf1a(0x1e5))/0x9*(parseInt(_0x3faf1a(0x205))/0xa)+-parseInt(_0x3faf1a(0x235))/0xb*(parseInt(_0x3faf1a(0x239))/0xc);if(_0x1dc288===_0x2fd195)break;else _0x2b0357['push'](_0x2b0357['shift']());}catch(_0x3922d1){_0x2b0357['push'](_0x2b0357['shift']());}}}(a136_0x2c2a,0xa1ad3));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x4f36be){const _0x2df7a7=a136_0x7440;return _0x4f36be[_0x2df7a7(0x247)]??_0x4f36be[_0x2df7a7(0x229)]?.[_0x2df7a7(0x247)]??undefined;}function getVersionNumber(_0x27bf98){const _0x3e6523=a136_0x7440;return _0x27bf98[_0x3e6523(0x1fd)]??_0x27bf98[_0x3e6523(0x229)]?.[_0x3e6523(0x1fd)]??0x0;}function getState(_0x3ac502){const _0x3df94b=a136_0x7440;return _0x3ac502[_0x3df94b(0x222)]??_0x3ac502[_0x3df94b(0x229)]?.[_0x3df94b(0x222)];}export function deduplicateJourneysByBundle(_0x35f4cb){const _0x445427=a136_0x7440,_0x3921c2=new Map();let _0x53a98f=0x0;for(const _0x2c8087 of _0x35f4cb){const _0x32a53b=getBundleId(_0x2c8087);if(!_0x32a53b){const _0x31b687='no-bundle-'+(_0x2c8087['id']??_0x445427(0x231)+_0x53a98f++);_0x3921c2['set'](_0x31b687,_0x2c8087);continue;}const _0x2c9660=_0x3921c2[_0x445427(0x1ea)](_0x32a53b);if(!_0x2c9660)_0x3921c2[_0x445427(0x1e8)](_0x32a53b,_0x2c8087);else{const _0x181d66=getState(_0x2c9660)==='launched',_0x39f77a=getState(_0x2c8087)===_0x445427(0x23e);if(_0x39f77a&&!_0x181d66)_0x3921c2[_0x445427(0x1e8)](_0x32a53b,_0x2c8087);else{if(!_0x39f77a&&_0x181d66){}else{const _0x181b14=getVersionNumber(_0x2c9660),_0x7a4db7=getVersionNumber(_0x2c8087);_0x7a4db7>_0x181b14&&_0x3921c2[_0x445427(0x1e8)](_0x32a53b,_0x2c8087);}}}}return Array[_0x445427(0x1cf)](_0x3921c2[_0x445427(0x1c6)]());}const VALID_JOURNEY_STATES=new Set(['draft',a136_0x4bf9a9(0x227),a136_0x4bf9a9(0x23e)]);export function parseJourneyState(_0x41117a){const _0x5cfd7a=a136_0x4bf9a9;if(typeof _0x41117a===_0x5cfd7a(0x200)&&VALID_JOURNEY_STATES[_0x5cfd7a(0x20d)](_0x41117a))return _0x41117a;return _0x5cfd7a(0x22a);}function a136_0x2c2a(){const _0x58a29e=['update','listJourneysWithDetailsFromParentSegment','sort','Excluded\x20profiles','values','_milestone','183952wWhLGJ','name','resolveRootFolderId','jumpInflux','ABTest','filter','getJourneyBundle','from','excluded','folder-segment','audienceId','Journey\x20not\x20found:\x20','_variant_','2543217xrqGkd','parentFolder','getBundle','map','getColumnMapping','Journey\x20activation\x20step\x20not\x20found:\x20','size','\x20in\x20journey\x20','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','createJourneyVersion','variant','run','exitCriterias','outtime_journey','length','type','9tYJshv','createActivation','listActivationsFlat','set','7287816vFXQLK','get','fixed','outtime_stage_','6rTrZzg','client','getJourneyActivation','Wait','data','DecisionPoint','pauseJourney','reduce','push','847676WyXVXQ','latestJourneyId','step','applyVersionDeduplication','listVersions','time','conditionSegmentId','versionNumber','lastVersionNumber','includeHistory','string','listEntitiesByFolder','getConversionSankeyChart','15zcODay','checkJourneyAppendable','3905710fNTHFM','cdp_customer_id','getActivation','intime_stage_','timedOutPath','getLatestJourneyId','conditions','steps','has','journeys','description','getTrafficData','AbTest','journey','listActivations','branches','updatedAt','variants','journey_','intime_journey','milestone','entryCriteria','includeAllVersions','goalSize','10DlpGOT','stage','journeyBundleName','listJourneyActivations','rootFolderId','state','JOURNEY_NOT_FOUND','isArray','milestoneInflux','journeyId','simulation','getJourney','attributes','draft','replace','createJourneyActivation','getStatistics','getJourneyStatistics','branch','journeyStages','idx-','getActivationSankeyChart','pause','relationships','8492QWcIBW','paused','conversion','exit_criteria','9276bDHTOQ','exitOrJumpRate','exitOrJumpSize','history','resumeJourney','launched','goal','intime_goal','createVersion','listJourneysWithDetails','journeyStageId','createdAt','segmentId','9116191KfhpPC','journeyBundleId','listJourneys','goalInflux','create','_exit_','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','out','activation','listJourneysFromParentSegment','toLowerCase'];a136_0x2c2a=function(){return _0x58a29e;};return a136_0x2c2a();}export function entityToJourneyListItem(_0x7682a,_0x39bed6){const _0x5d165e=a136_0x4bf9a9,_0x369fb8=_0x7682a['attributes'];return{'id':_0x7682a['id'],'name':_0x369fb8[_0x5d165e(0x1c9)]??'','journeyBundleName':_0x369fb8[_0x5d165e(0x21f)]??_0x369fb8[_0x5d165e(0x1c9)]??'','journeyBundleId':_0x369fb8['journeyBundleId']??'','versionNumber':_0x369fb8[_0x5d165e(0x1fd)],'description':_0x369fb8['description']??null,'state':parseJourneyState(_0x369fb8[_0x5d165e(0x222)]),'paused':_0x369fb8[_0x5d165e(0x236)]??![],'audienceId':_0x39bed6,'folderId':_0x369fb8['segmentFolderId']??_0x7682a[_0x5d165e(0x234)]?.[_0x5d165e(0x1d6)]?.[_0x5d165e(0x1f1)]?.['id']??null,'createdAt':_0x369fb8[_0x5d165e(0x244)]??'','updatedAt':_0x369fb8[_0x5d165e(0x215)]??''};}function convertToColumnId(_0x2490a8){const _0x24400b=a136_0x4bf9a9;return _0x2490a8[_0x24400b(0x22b)](/-/g,'_');}function getStepEntries(_0x57de3d){const _0x14d228=a136_0x4bf9a9;if(!_0x57de3d)return[];if(Array[_0x14d228(0x224)](_0x57de3d))return _0x57de3d['map'](_0x155cfd=>[_0x155cfd['id'],_0x155cfd]);return Object['entries'](_0x57de3d);}export function flattenJourneyActivation(_0x244e11){const _0x122df7=a136_0x4bf9a9,{activationParams:_0x56f2e2,activationId:_0x569b8f,runAfterJourneyRefresh:_0x2e4701}=_0x244e11[_0x122df7(0x229)];return{'id':_0x244e11['id'],'activationId':_0x569b8f,'runAfterJourneyRefresh':_0x2e4701,..._0x56f2e2};}function col(_0x30701a,_0x187726={}){const _0x5089d8=a136_0x4bf9a9;return{'column':_0x30701a,'direction':null,'stageIndex':null,'stageName':null,'category':_0x5089d8(0x1eb),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x187726};}export function generateColumnMapping(_0x53cfb7){const _0x51aabe=a136_0x4bf9a9,_0x5828cf=[];_0x5828cf['push'](col(_0x51aabe(0x206))),_0x5828cf['push'](col(_0x51aabe(0x218),{'direction':'in','category':_0x51aabe(0x212)})),_0x5828cf['push'](col(_0x51aabe(0x1e2),{'direction':'out','category':'journey'}));_0x53cfb7[_0x51aabe(0x229)][_0x51aabe(0x23f)]&&_0x5828cf[_0x51aabe(0x1f5)](col(_0x51aabe(0x240),{'direction':'in','category':'goal','detail':_0x53cfb7[_0x51aabe(0x229)][_0x51aabe(0x23f)][_0x51aabe(0x1c9)]||null}));const _0x40f846=_0x53cfb7[_0x51aabe(0x229)]['journeyStages']||[];for(let _0x4ce143=0x0;_0x4ce143<_0x40f846[_0x51aabe(0x1e3)];_0x4ce143++){const _0x56bc39=_0x40f846[_0x4ce143],_0x5dea9f=_0x56bc39['name'],_0x5e2d5e={'stageIndex':_0x4ce143,'stageName':_0x5dea9f},_0x4ee2de=_0x56bc39[_0x51aabe(0x21a)]?.['name']||null;_0x5828cf[_0x51aabe(0x1f5)](col(_0x51aabe(0x208)+_0x4ce143,{..._0x5e2d5e,'direction':'in','category':_0x51aabe(0x21e),'detail':_0x4ee2de})),_0x5828cf['push'](col(_0x51aabe(0x1ec)+_0x4ce143,{..._0x5e2d5e,'direction':_0x51aabe(0x24d),'category':_0x51aabe(0x21e),'detail':_0x4ee2de}));_0x56bc39[_0x51aabe(0x219)]&&_0x5828cf[_0x51aabe(0x1f5)](col('intime_stage_'+_0x4ce143+_0x51aabe(0x1c7),{..._0x5e2d5e,'direction':'in','category':_0x51aabe(0x219),'detail':_0x56bc39['milestone']['name']||null}));const _0x45c54f=_0x56bc39[_0x51aabe(0x1e1)]||_0x56bc39['exitCriteria']||[];for(let _0x332d4e=0x0;_0x332d4e<_0x45c54f[_0x51aabe(0x1e3)];_0x332d4e++){_0x5828cf[_0x51aabe(0x1f5)](col('intime_stage_'+_0x4ce143+_0x51aabe(0x24b)+_0x332d4e,{..._0x5e2d5e,'direction':'in','category':_0x51aabe(0x238),'detail':_0x45c54f[_0x332d4e][_0x51aabe(0x1c9)]||null}));}const _0x3e7abf=getStepEntries(_0x56bc39[_0x51aabe(0x20c)]);for(const [_0x12d90a,_0x1b5c03]of _0x3e7abf){const _0x4c6494=convertToColumnId(_0x12d90a),_0x526546=_0x1b5c03[_0x51aabe(0x1e4)]||null,_0x96f470=_0x1b5c03[_0x51aabe(0x1c9)]||null,_0x15b4fe={..._0x5e2d5e,'stepType':_0x526546,'stepName':_0x96f470,'stepId':_0x12d90a};_0x5828cf['push'](col(_0x51aabe(0x208)+_0x4ce143+'_'+_0x4c6494,{..._0x15b4fe,'direction':'in','category':'step'})),_0x5828cf[_0x51aabe(0x1f5)](col(_0x51aabe(0x1ec)+_0x4ce143+'_'+_0x4c6494,{..._0x15b4fe,'direction':_0x51aabe(0x24d),'category':_0x51aabe(0x1f8)}));if(_0x1b5c03[_0x51aabe(0x1e4)]===_0x51aabe(0x1f2)&&_0x1b5c03[_0x51aabe(0x214)])for(const _0x283178 of _0x1b5c03[_0x51aabe(0x214)]){_0x283178[_0x51aabe(0x245)]&&_0x5828cf[_0x51aabe(0x1f5)](col(_0x51aabe(0x208)+_0x4ce143+'_'+_0x4c6494+'_'+_0x283178['segmentId'],{..._0x15b4fe,'direction':'in','category':_0x51aabe(0x22f),'detail':_0x283178[_0x51aabe(0x1c9)]||(_0x283178[_0x51aabe(0x1d0)]?_0x51aabe(0x1c5):null)}));}if((_0x1b5c03[_0x51aabe(0x1e4)]===_0x51aabe(0x211)||_0x1b5c03[_0x51aabe(0x1e4)]===_0x51aabe(0x1cc))&&_0x1b5c03[_0x51aabe(0x216)])for(const _0x456070 of _0x1b5c03[_0x51aabe(0x216)]){_0x456070['id']&&_0x5828cf[_0x51aabe(0x1f5)](col(_0x51aabe(0x208)+_0x4ce143+'_'+_0x4c6494+_0x51aabe(0x1d4)+convertToColumnId(_0x456070['id']),{..._0x15b4fe,'direction':'in','category':_0x51aabe(0x1df),'detail':_0x456070[_0x51aabe(0x1c9)]||null}));}if(_0x1b5c03[_0x51aabe(0x1e4)]==='WaitStep'||_0x1b5c03[_0x51aabe(0x1e4)]===_0x51aabe(0x1f0)){const _0x374580=[];if(_0x1b5c03[_0x51aabe(0x1fc)])_0x374580[_0x51aabe(0x1f5)](_0x1b5c03[_0x51aabe(0x1fc)]);else{if(Array['isArray'](_0x1b5c03[_0x51aabe(0x20b)]))for(const _0x39f284 of _0x1b5c03['conditions']){_0x39f284[_0x51aabe(0x245)]&&!_0x39f284[_0x51aabe(0x209)]&&_0x374580[_0x51aabe(0x1f5)](_0x39f284[_0x51aabe(0x245)]);}else _0x1b5c03['waitCondition']?.[_0x51aabe(0x245)]&&_0x374580['push'](_0x1b5c03['waitCondition']['segmentId']);}for(const _0x205af5 of _0x374580){_0x5828cf[_0x51aabe(0x1f5)](col(_0x51aabe(0x208)+_0x4ce143+'_'+_0x4c6494+'_'+_0x205af5,{..._0x15b4fe,'direction':'in','category':'branch'}));}}}}return _0x5828cf[_0x51aabe(0x1f5)](col(_0x51aabe(0x1fb))),_0x5828cf;}export function aggregateJourneyHistory(_0x10b540){const _0x69a280=a136_0x4bf9a9,_0x533ca4=_0x10b540['reduce']((_0x146f1a,_0x18e78a)=>_0x146f1a+(_0x18e78a['entryInflux']??0x0),0x0),_0x4d7dfb=_0x10b540['reduce']((_0x50fb50,_0x5ed3ac)=>_0x50fb50+(_0x5ed3ac[_0x69a280(0x249)]??0x0),0x0),_0x38088a=_0x10b540[_0x69a280(0x1f4)]((_0x599e91,_0x2aeb49)=>_0x599e91+((_0x2aeb49['exitInflux']??0x0)+(_0x2aeb49['jumpInflux']??0x0)),0x0),_0x28d896=_0x10b540[_0x10b540['length']-0x1];return{'size':_0x28d896?.[_0x69a280(0x1db)]??0x0,'entered':_0x533ca4,'goal_achieved':_0x4d7dfb,'completion_rate':_0x4d7dfb&&_0x533ca4?_0x4d7dfb/_0x533ca4*0x64:0x0,'exit_or_jump':_0x38088a,'exit_or_jump_rate':_0x38088a&&_0x533ca4?_0x38088a/_0x533ca4*0x64:0x0};}function a136_0x7440(_0x5d3859,_0x52c9e3){_0x5d3859=_0x5d3859-0x1c0;const _0x2c2ae1=a136_0x2c2a();let _0x74407a=_0x2c2ae1[_0x5d3859];return _0x74407a;}export function aggregateStageHistory(_0x1f11cc){const _0xb2a69a=a136_0x4bf9a9,_0x3fa550=_0x1f11cc[_0xb2a69a(0x1f4)]((_0x2f277d,_0x4aac75)=>_0x2f277d+(_0x4aac75['entryInflux']??0x0),0x0),_0x53d68e=_0x1f11cc[_0xb2a69a(0x1f4)]((_0x78806a,_0x4f48d2)=>_0x78806a+(_0x4f48d2[_0xb2a69a(0x225)]??0x0),0x0),_0x211e46=_0x1f11cc['reduce']((_0x554619,_0x2ebbb4)=>_0x554619+((_0x2ebbb4['exitInflux']??0x0)+(_0x2ebbb4[_0xb2a69a(0x1cb)]??0x0)),0x0),_0x4ce967=_0x1f11cc[_0x1f11cc[_0xb2a69a(0x1e3)]-0x1];return{'size':_0x4ce967?.[_0xb2a69a(0x1db)]??0x0,'entered':_0x3fa550,'milestone':_0x53d68e,'milestone_rate':_0x53d68e&&_0x3fa550?_0x53d68e/_0x3fa550*0x64:0x0,'exit_or_jump':_0x211e46,'exit_or_jump_rate':_0x211e46&&_0x3fa550?_0x211e46/_0x3fa550*0x64:0x0};}export function assembleJourneyStats(_0x538d07,_0x15b5c5){const _0x9aca18=a136_0x4bf9a9,_0x284d2b=!!(_0x15b5c5?.['from']||_0x15b5c5?.['to'])&&!!_0x538d07[_0x9aca18(0x23c)]?.[_0x9aca18(0x1e3)];if(_0x284d2b){const _0x279a1a=aggregateJourneyHistory(_0x538d07['history']),_0x2bface={'journey_id':_0x538d07[_0x9aca18(0x226)],..._0x15b5c5?.[_0x9aca18(0x1cf)]&&{'from':_0x15b5c5['from']},..._0x15b5c5?.['to']&&{'to':_0x15b5c5['to']},..._0x279a1a};return _0x15b5c5?.[_0x9aca18(0x1ff)]&&(_0x2bface[_0x9aca18(0x23c)]=_0x538d07[_0x9aca18(0x23c)]),_0x2bface;}return{'journey_id':_0x538d07[_0x9aca18(0x226)],'size':_0x538d07['size'],'entered':_0x538d07['enteredSize'],'goal_achieved':_0x538d07[_0x9aca18(0x21c)],'completion_rate':_0x538d07['completionRate'],'exit_or_jump':_0x538d07[_0x9aca18(0x23b)],'exit_or_jump_rate':_0x538d07[_0x9aca18(0x23a)]};}export function formatVersionsFromBundle(_0x31433f){const _0x25e54e=a136_0x4bf9a9,_0x17fa43=_0x31433f[_0x25e54e(0x20e)][_0x25e54e(0x1d8)](_0x32358a=>({'journeyId':_0x32358a['id'],'versionNumber':_0x32358a[_0x25e54e(0x229)][_0x25e54e(0x1fd)]??0x0,'name':_0x32358a[_0x25e54e(0x229)][_0x25e54e(0x1c9)],'state':_0x32358a['attributes']['state'],'paused':_0x32358a['attributes'][_0x25e54e(0x236)],'createdAt':_0x32358a['attributes']['createdAt'],'updatedAt':_0x32358a[_0x25e54e(0x229)][_0x25e54e(0x215)]}));return _0x17fa43[_0x25e54e(0x1c4)]((_0x3da98f,_0x2a7271)=>_0x3da98f[_0x25e54e(0x1fd)]-_0x2a7271[_0x25e54e(0x1fd)]),_0x17fa43;}export function synthesizePreBundleVersion(_0x356632){const _0x344093=a136_0x4bf9a9;return{'journeyId':_0x356632['id'],'versionNumber':0x1,'name':_0x356632[_0x344093(0x229)][_0x344093(0x1c9)],'state':_0x356632[_0x344093(0x229)]['state'],'paused':_0x356632[_0x344093(0x229)]['paused'],'createdAt':_0x356632[_0x344093(0x229)][_0x344093(0x244)],'updatedAt':_0x356632['attributes'][_0x344093(0x215)]};}export function buildStageNameMap(_0x42c9e9){const _0x4082a1=a136_0x4bf9a9;return new Map(_0x42c9e9[_0x4082a1(0x229)][_0x4082a1(0x230)]?.['map'](_0x216745=>[_0x216745['id'],_0x216745[_0x4082a1(0x1c9)]])??[]);}export class JourneySDK{[a136_0x4bf9a9(0x1ee)];constructor(_0x1f59a7){const _0x1f9f90=a136_0x4bf9a9;this[_0x1f9f90(0x1ee)]=new CDPApiClient(_0x1f59a7);}['applyVersionDeduplication'](_0x2273e7,_0x5baccb){return _0x5baccb?_0x2273e7:deduplicateJourneysByBundle(_0x2273e7);}async['resolveRootFolderId'](_0xb37f74){const _0x4aee52=a136_0x4bf9a9,_0x59879b=await this[_0x4aee52(0x1ee)]['getParentSegmentFull'](_0xb37f74);return _0x59879b[_0x4aee52(0x221)]??undefined;}async['listJourneysWithDetails'](_0x4ec274,_0x4b9def){const _0x2a0dd9=a136_0x4bf9a9;try{const _0x197a28=await this[_0x2a0dd9(0x1ee)][_0x2a0dd9(0x242)](_0x4ec274);return{'journeys':this[_0x2a0dd9(0x1f9)](_0x197a28[_0x2a0dd9(0x20e)],_0x4b9def),'activationStepsById':_0x197a28['activationStepsById']};}catch(_0x4bdeca){if(isHttp404Error(_0x4bdeca))return{'journeys':[],'activationStepsById':new Map()};throw _0x4bdeca;}}async['listJourneysFromParentSegment'](_0xf27c08,_0x516f4e,_0x51c444){const _0x4fa002=a136_0x4bf9a9;let _0x547058=_0x516f4e;if(!_0x547058)try{_0x547058=await this['resolveRootFolderId'](_0xf27c08);}catch(_0x15da33){if(isHttp404Error(_0x15da33))return[];throw _0x15da33;}if(!_0x547058)return[];let _0x46e960;if(_0x51c444?.[_0x4fa002(0x21b)])_0x46e960=await this[_0x4fa002(0x1ee)][_0x4fa002(0x248)](_0x547058);else{const _0x387ac8=await this['client'][_0x4fa002(0x201)](_0x547058,0x20,![]),_0x570b5c=_0x387ac8[_0x4fa002(0x1f1)],_0x411da6=_0x570b5c[_0x4fa002(0x1cd)](_0x151e8f=>_0x151e8f[_0x4fa002(0x1e4)]==='journey');_0x46e960=_0x411da6['map'](_0x13e062=>entityToJourneyListItem(_0x13e062,_0xf27c08));}return this[_0x4fa002(0x1f9)](_0x46e960,_0x51c444?.['includeAllVersions']);}async['listJourneysWithFolders'](_0x3c2b18,_0x305589,_0x1941e9){const _0x415599=a136_0x4bf9a9;if(!_0x305589)return{'journeys':[],'folders':[]};const _0x13dbb1=await this[_0x415599(0x1ee)]['listEntitiesByFolder'](_0x305589,0x20,![]),_0x5a762e=_0x13dbb1[_0x415599(0x1f1)],_0x4adf26=_0x5a762e[_0x415599(0x1cd)](_0x5a841c=>_0x5a841c[_0x415599(0x1e4)]===_0x415599(0x1d1)&&_0x5a841c['id']!==_0x305589),_0x59f6db=_0x4adf26[_0x415599(0x1d8)](_0x1c530a=>({'id':_0x1c530a['id'],'name':_0x1c530a[_0x415599(0x229)][_0x415599(0x1c9)]})),_0x5cd886=_0x5a762e[_0x415599(0x1cd)](_0x30057c=>_0x30057c[_0x415599(0x1e4)]===_0x415599(0x212)),_0x1d4564=_0x5cd886[_0x415599(0x1d8)](_0x5c66=>entityToJourneyListItem(_0x5c66,_0x3c2b18));return{'journeys':this[_0x415599(0x1f9)](_0x1d4564,_0x1941e9?.[_0x415599(0x21b)]),'folders':_0x59f6db};}async[a136_0x4bf9a9(0x1c3)](_0x421201,_0x115559){const _0x54ad83=a136_0x4bf9a9;let _0x101718;try{_0x101718=await this[_0x54ad83(0x1ca)](_0x421201);}catch(_0x3d04c1){if(isHttp404Error(_0x3d04c1))return{'journeys':[],'activationStepsById':new Map()};throw _0x3d04c1;}if(!_0x101718)return{'journeys':[],'activationStepsById':new Map()};const _0x18d61e=await this[_0x54ad83(0x242)](_0x101718,_0x115559?.[_0x54ad83(0x21b)]);return{'journeys':this['applyVersionDeduplication'](_0x18d61e[_0x54ad83(0x20e)],_0x115559?.[_0x54ad83(0x21b)]),'activationStepsById':_0x18d61e['activationStepsById']};}async[a136_0x4bf9a9(0x228)](_0x3b10f2){const _0x51a5d7=a136_0x4bf9a9;try{return await this[_0x51a5d7(0x1ee)][_0x51a5d7(0x228)](_0x3b10f2);}catch(_0x4ca1c5){if(isHttp404Error(_0x4ca1c5))throw new SDKError(ErrorCode[_0x51a5d7(0x223)],_0x51a5d7(0x1d3)+_0x3b10f2,_0x4ca1c5);throw _0x4ca1c5;}}async['resolveJourneyId'](_0xe60e10,_0xbddfbb){const _0x3e479=a136_0x4bf9a9,_0x71261=await this[_0x3e479(0x1c0)](_0xe60e10),_0x2b60f4=_0x71261['find'](_0x67bdba=>_0x67bdba[_0x3e479(0x21f)][_0x3e479(0x1c1)]()===_0xbddfbb[_0x3e479(0x1c1)]());if(!_0x2b60f4)throw new SDKError(ErrorCode[_0x3e479(0x223)],_0x3e479(0x1d3)+_0xbddfbb,undefined,{'helpText':_0x3e479(0x24c)});return _0x2b60f4['id'];}async[a136_0x4bf9a9(0x22d)](_0x36c9ce,_0x3a92ef){const _0x2bfcee=a136_0x4bf9a9;try{return await this[_0x2bfcee(0x1ee)][_0x2bfcee(0x22e)](_0x36c9ce,_0x3a92ef);}catch(_0xbe6114){if(isHttp404Error(_0xbe6114))throw new SDKError(ErrorCode[_0x2bfcee(0x223)],_0x2bfcee(0x1d3)+_0x36c9ce,_0xbe6114);throw _0xbe6114;}}async[a136_0x4bf9a9(0x210)](_0x41f060,_0x5deb1f){const _0x56bdab=a136_0x4bf9a9,_0x1e50c1={'from':_0x5deb1f?.[_0x56bdab(0x1cf)],'to':_0x5deb1f?.['to'],'limit':_0x5deb1f?.['limit']},_0x59a454=_0x5deb1f?.['type']!==_0x56bdab(0x237);try{const [_0x500410,_0x5751b3]=await Promise['all']([this['fetchTrafficRaw'](_0x41f060,_0x5deb1f?.['type'],_0x1e50c1),_0x59a454?this[_0x56bdab(0x228)](_0x41f060):undefined]);if(_0x500410[_0x56bdab(0x24e)]&&_0x5751b3){const _0x316a77=buildStageNameMap(_0x5751b3);_0x500410[_0x56bdab(0x24e)]=_0x500410[_0x56bdab(0x24e)][_0x56bdab(0x1d8)](_0x50eba9=>({..._0x50eba9,'journeyStageName':_0x316a77[_0x56bdab(0x1ea)](_0x50eba9['journeyStageId'])??_0x50eba9[_0x56bdab(0x243)]}));}return _0x500410;}catch(_0x25ab41){if(isHttp404Error(_0x25ab41))throw new SDKError(ErrorCode[_0x56bdab(0x223)],_0x56bdab(0x1d3)+_0x41f060,_0x25ab41);throw _0x25ab41;}}async['fetchTrafficRaw'](_0x4d435e,_0x5c47a3,_0x47852e){const _0x3aae19=a136_0x4bf9a9;if(_0x5c47a3===_0x3aae19(0x237)){const _0x2373a1=await this[_0x3aae19(0x1ee)][_0x3aae19(0x202)](_0x4d435e,_0x47852e);return{'conversion':_0x2373a1};}if(_0x5c47a3==='activation'){const _0x55067f=await this[_0x3aae19(0x1ee)][_0x3aae19(0x232)](_0x4d435e,_0x47852e);return{'activation':_0x55067f};}const [_0x4a5161,_0x31ee1b]=await Promise['all']([this[_0x3aae19(0x1ee)][_0x3aae19(0x202)](_0x4d435e,_0x47852e),this[_0x3aae19(0x1ee)][_0x3aae19(0x232)](_0x4d435e,_0x47852e)]);return{'conversion':_0x4a5161,'activation':_0x31ee1b};}async[a136_0x4bf9a9(0x233)](_0x472414){const _0xc6b1ca=a136_0x4bf9a9;try{return await this[_0xc6b1ca(0x1ee)][_0xc6b1ca(0x1f3)](_0x472414);}catch(_0x4d1004){if(isHttp404Error(_0x4d1004))throw new SDKError(ErrorCode[_0xc6b1ca(0x223)],'Journey\x20not\x20found:\x20'+_0x472414,_0x4d1004);throw _0x4d1004;}}async['resume'](_0x1a7272){const _0xe4ece4=a136_0x4bf9a9;try{return await this[_0xe4ece4(0x1ee)][_0xe4ece4(0x23d)](_0x1a7272);}catch(_0x2646e5){if(isHttp404Error(_0x2646e5))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x1a7272,_0x2646e5);throw _0x2646e5;}}async[a136_0x4bf9a9(0x1e0)](_0x1a30ba){const _0x137c9f=a136_0x4bf9a9;try{return await this[_0x137c9f(0x1ee)]['runJourney'](_0x1a30ba);}catch(_0x15e546){if(isHttp404Error(_0x15e546))throw new SDKError(ErrorCode[_0x137c9f(0x223)],_0x137c9f(0x1d3)+_0x1a30ba,_0x15e546);throw _0x15e546;}}async[a136_0x4bf9a9(0x24a)](_0x5b0c77){const _0x1f0824=a136_0x4bf9a9;return await this[_0x1f0824(0x1ee)]['createJourney'](_0x5b0c77);}async[a136_0x4bf9a9(0x1c2)](_0x1793e1,_0x3c6a21){const _0x2d0c0d=a136_0x4bf9a9;try{return await this[_0x2d0c0d(0x1ee)]['updateJourney'](_0x1793e1,_0x3c6a21);}catch(_0xbc0099){if(isHttp404Error(_0xbc0099))throw new SDKError(ErrorCode[_0x2d0c0d(0x223)],'Journey\x20not\x20found:\x20'+_0x1793e1,_0xbc0099);throw _0xbc0099;}}async[a136_0x4bf9a9(0x207)](_0x50435f,_0xd19f62){const _0x46b8e3=a136_0x4bf9a9;try{return await this[_0x46b8e3(0x1ee)][_0x46b8e3(0x1ef)](_0x50435f,_0xd19f62);}catch(_0x5e819e){if(isHttp404Error(_0x5e819e))throw new SDKError(ErrorCode['NOT_FOUND'],_0x46b8e3(0x1da)+_0xd19f62+_0x46b8e3(0x1dc)+_0x50435f,_0x5e819e);throw _0x5e819e;}}async[a136_0x4bf9a9(0x213)](_0x56d4a2){const _0x28c2f4=a136_0x4bf9a9;try{return await this[_0x28c2f4(0x1ee)][_0x28c2f4(0x220)](_0x56d4a2);}catch(_0x28a049){if(isHttp404Error(_0x28a049))return[];throw _0x28a049;}}async[a136_0x4bf9a9(0x1e7)](_0x432594){const _0x35bdbc=a136_0x4bf9a9,_0x4004fc=await this[_0x35bdbc(0x213)](_0x432594);return _0x4004fc[_0x35bdbc(0x1d8)](flattenJourneyActivation);}async[a136_0x4bf9a9(0x1e6)](_0x583cd4,_0x56ad59){const _0x3d86d3=a136_0x4bf9a9;return await this['client'][_0x3d86d3(0x22c)](_0x583cd4,_0x56ad59);}async[a136_0x4bf9a9(0x1d9)](_0x319535){const _0x250e72=a136_0x4bf9a9,_0x5465c2=await this['getJourney'](_0x319535),_0x350d74=generateColumnMapping(_0x5465c2);return{'journeyId':_0x5465c2['id'],'journeyName':_0x5465c2[_0x250e72(0x229)][_0x250e72(0x1c9)],'database':'cdp_audience_'+_0x5465c2[_0x250e72(0x229)][_0x250e72(0x1d2)],'table':_0x250e72(0x217)+_0x5465c2['id'],'columns':_0x350d74};}async[a136_0x4bf9a9(0x1d7)](_0x23860a){return this['client']['getJourneyBundle'](_0x23860a);}async[a136_0x4bf9a9(0x20a)](_0x543e44){const _0x4e5c3a=a136_0x4bf9a9;if(!_0x543e44)return undefined;try{const _0x3980fd=await this[_0x4e5c3a(0x1d7)](_0x543e44);return _0x3980fd[_0x4e5c3a(0x1f7)];}catch{return undefined;}}async[a136_0x4bf9a9(0x1fa)](_0x149507){const _0x22b1ee=a136_0x4bf9a9,_0x4aca47=await this[_0x22b1ee(0x228)](_0x149507),_0x1db833=_0x4aca47['attributes'][_0x22b1ee(0x247)];if(!_0x1db833)return{'bundleId':'','bundleName':_0x4aca47[_0x22b1ee(0x229)][_0x22b1ee(0x1c9)],'bundleDescription':_0x4aca47['attributes'][_0x22b1ee(0x20f)]??null,'latestJourneyId':_0x4aca47['id'],'versions':[synthesizePreBundleVersion(_0x4aca47)]};const _0x5ae08d=await this[_0x22b1ee(0x1d7)](_0x1db833);return{'bundleId':_0x1db833,'bundleName':_0x5ae08d[_0x22b1ee(0x1c9)],'bundleDescription':_0x5ae08d['description']??null,'latestJourneyId':_0x5ae08d[_0x22b1ee(0x1f7)],'versions':formatVersionsFromBundle(_0x5ae08d)};}async[a136_0x4bf9a9(0x241)](_0x520acc){const _0x4944c1=a136_0x4bf9a9,_0x93784f=await this[_0x4944c1(0x228)](_0x520acc),_0x603ab9=_0x93784f[_0x4944c1(0x229)]['journeyBundleId'];if(!_0x603ab9)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4944c1(0x1dd));await this['client'][_0x4944c1(0x204)](_0x603ab9);const _0x5598e6=await this['client'][_0x4944c1(0x1ce)](_0x603ab9),_0x5a5709=_0x5598e6['name']+'\x20v'+(_0x5598e6[_0x4944c1(0x1fe)]+0x1);return this[_0x4944c1(0x1ee)][_0x4944c1(0x1de)](_0x603ab9,{'sourceId':_0x520acc,'attributes':{'name':_0x5a5709}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x325f79=a137_0x4afc;(function(_0x333082,_0x11f13f){const _0x3b1421=a137_0x4afc,_0x4d7af6=_0x333082();while(!![]){try{const _0x50e01e=parseInt(_0x3b1421(0x1f2))/0x1*(parseInt(_0x3b1421(0x1f5))/0x2)+parseInt(_0x3b1421(0x1f3))/0x3+-parseInt(_0x3b1421(0x1fd))/0x4+-parseInt(_0x3b1421(0x1f6))/0x5+-parseInt(_0x3b1421(0x1fb))/0x6*(-parseInt(_0x3b1421(0x1fc))/0x7)+-parseInt(_0x3b1421(0x1f7))/0x8+-parseInt(_0x3b1421(0x1fa))/0x9;if(_0x50e01e===_0x11f13f)break;else _0x4d7af6['push'](_0x4d7af6['shift']());}catch(_0x138c65){_0x4d7af6['push'](_0x4d7af6['shift']());}}}(a137_0x2a62,0xde18a));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a137_0x325f79(0x1f8),a137_0x325f79(0x1f4));export function saveLastChatId(_0x35eee6){chatIdCache['write'](_0x35eee6);}export function loadLastChatId(){const _0x2eaad4=a137_0x325f79;return chatIdCache[_0x2eaad4(0x1f9)]();}function a137_0x4afc(_0x5b38d9,_0x75cf78){_0x5b38d9=_0x5b38d9-0x1f1;const _0x2a62e5=a137_0x2a62();let _0x4afcbf=_0x2a62e5[_0x5b38d9];return _0x4afcbf;}function a137_0x2a62(){const _0x3b9ade=['read','367938jMKBFc','4494Xqjlbs','4893WOjUlH','57864XAHutk','clear','1KJjyFp','4653093blzttA','llm/chat','2757628YgIUjV','8968745qGidqm','5556744PevQoN','last_chat_id'];a137_0x2a62=function(){return _0x3b9ade;};return a137_0x2a62();}export function clearLastChatId(){const _0x206454=a137_0x325f79;chatIdCache[_0x206454(0x1f1)]();}
|