@treasuredata/tdx 0.28.2 → 0.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.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/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/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 a107_0xd24541=a107_0x4574;(function(_0x4e056f,_0x1a7bf1){const _0x2afe86=a107_0x4574,_0x51b8a3=_0x4e056f();while(!![]){try{const _0x5435ae=-parseInt(_0x2afe86(0x1fc))/0x1+-parseInt(_0x2afe86(0x269))/0x2+parseInt(_0x2afe86(0x223))/0x3*(-parseInt(_0x2afe86(0x208))/0x4)+parseInt(_0x2afe86(0x217))/0x5*(-parseInt(_0x2afe86(0x21b))/0x6)+-parseInt(_0x2afe86(0x214))/0x7+parseInt(_0x2afe86(0x264))/0x8*(parseInt(_0x2afe86(0x22e))/0x9)+parseInt(_0x2afe86(0x24a))/0xa*(parseInt(_0x2afe86(0x268))/0xb);if(_0x5435ae===_0x1a7bf1)break;else _0x51b8a3['push'](_0x51b8a3['shift']());}catch(_0x4f53db){_0x51b8a3['push'](_0x51b8a3['shift']());}}}(a107_0x4e43,0x75396));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x48cd2d){const _0x321d8d=a107_0x4574;return _0x48cd2d[_0x321d8d(0x20d)]??_0x48cd2d[_0x321d8d(0x227)]?.['journeyBundleId']??undefined;}function a107_0x4e43(){const _0xb8e51a=['listVersions','21393iPbsLZ','audienceId','getParentSegmentFull','_milestone','cdp_audience_','add','rootFolderId','journey','state','milestoneInflux','length','listEntitiesByFolder','exitOrJumpSize','entries','exitCriteria','updatedAt','lastVersionNumber','conversion','variants','checkJourneyAppendable','find','exitOrJumpRate','milestone','listJourneysWithFolders','steps','waitCondition','from','getTrafficData','20789890mICIrA','createActivation','createJourney','Journey\x20activation\x20step\x20not\x20found:\x20','_variant_','excluded','folder-segment','ABTest','exitCriterias','AbTest','activationStepsById','size','listActivations','all','segmentId','intime_stage_','Wait','applyVersionDeduplication','update','flat','isArray','branch','\x20in\x20journey\x20','journeyStages','getBundle','journeyBundleName','3096RueIZG','create','listJourneyActivations','goal','11eQMRFu','533110EkzBmK','includeAllVersions','get','activation','pause','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listJourneys','enteredSize','versionNumber','no-bundle-','intime_goal','listJourneysWithDetailsFromParentSegment','journeys','description','exit_criteria','Excluded\x20profiles','step','data','NOT_FOUND','simulation','outtime_stage_','resumeJourney','push','updateJourney','map','goalSize','cdp_customer_id','intime_journey','values','INVALID_ARGUMENT','_exit_','createJourneyActivation','reduce','198551ciYWUT','paused','listSegmentFolders','idx-','conditions','getConversionSankeyChart','name','out','has','relationships','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','journeyId','28rtEClT','resolveJourneyId','listJourneysFromParentSegment','stage','includeHistory','journeyBundleId','filter','completionRate','exitInflux','fetchTrafficRaw','getJourney','getActivationSankeyChart','5312699JEioqG','segmentFolderId','getJourneyBundle','5iWQhpo','JOURNEY_NOT_FOUND','client','Journey\x20not\x20found:\x20','2928054fbVMhr','DecisionPoint','toLowerCase','set','createVersion','latestJourneyId','journeyStageId','string','345714DtGaWm','conditionSegmentId','jumpInflux','draft','attributes','launched','type','timedOutPath','createdAt','history'];a107_0x4e43=function(){return _0xb8e51a;};return a107_0x4e43();}function a107_0x4574(_0x3fe09e,_0x3657cb){_0x3fe09e=_0x3fe09e-0x1dd;const _0x4e43de=a107_0x4e43();let _0x457485=_0x4e43de[_0x3fe09e];return _0x457485;}function getVersionNumber(_0x37cd80){const _0x188afc=a107_0x4574;return _0x37cd80[_0x188afc(0x1e3)]??_0x37cd80[_0x188afc(0x227)]?.['versionNumber']??0x0;}export function deduplicateJourneysByBundle(_0x1f433d){const _0x3f5472=a107_0x4574,_0x3831fb=new Map();let _0x30ecda=0x0;for(const _0x3dbc8b of _0x1f433d){const _0x21908a=getBundleId(_0x3dbc8b);if(!_0x21908a){const _0x542780=_0x3f5472(0x1e4)+(_0x3dbc8b['id']??_0x3f5472(0x1ff)+_0x30ecda++);_0x3831fb[_0x3f5472(0x21e)](_0x542780,_0x3dbc8b);continue;}const _0x25ebd9=_0x3831fb[_0x3f5472(0x1dd)](_0x21908a);if(!_0x25ebd9)_0x3831fb[_0x3f5472(0x21e)](_0x21908a,_0x3dbc8b);else{const _0x3c77ae=getVersionNumber(_0x25ebd9),_0x23af78=getVersionNumber(_0x3dbc8b);_0x23af78>_0x3c77ae&&_0x3831fb['set'](_0x21908a,_0x3dbc8b);}}return Array['from'](_0x3831fb[_0x3f5472(0x1f7)]());}const VALID_JOURNEY_STATES=new Set(['draft',a107_0xd24541(0x1ee),a107_0xd24541(0x228)]);export function parseJourneyState(_0x5e2b2a){const _0x16a74b=a107_0xd24541;if(typeof _0x5e2b2a===_0x16a74b(0x222)&&VALID_JOURNEY_STATES[_0x16a74b(0x204)](_0x5e2b2a))return _0x5e2b2a;return _0x16a74b(0x226);}export function entityToJourneyListItem(_0xea39ad,_0x307083){const _0x30230f=a107_0xd24541,_0x2dbfeb=_0xea39ad['attributes'];return{'id':_0xea39ad['id'],'name':_0x2dbfeb[_0x30230f(0x202)]??'','journeyBundleName':_0x2dbfeb[_0x30230f(0x263)]??_0x2dbfeb[_0x30230f(0x202)]??'','journeyBundleId':_0x2dbfeb['journeyBundleId']??'','versionNumber':_0x2dbfeb[_0x30230f(0x1e3)],'description':_0x2dbfeb[_0x30230f(0x1e8)]??null,'state':parseJourneyState(_0x2dbfeb[_0x30230f(0x236)]),'paused':_0x2dbfeb['paused']??![],'audienceId':_0x307083,'folderId':_0x2dbfeb[_0x30230f(0x215)]??_0xea39ad[_0x30230f(0x205)]?.['parentFolder']?.[_0x30230f(0x1ec)]?.['id']??null,'createdAt':_0x2dbfeb[_0x30230f(0x22b)]??'','updatedAt':_0x2dbfeb[_0x30230f(0x23d)]??''};}function convertToColumnId(_0x3ee7f5){return _0x3ee7f5['replace'](/-/g,'_');}function getStepEntries(_0x35e6f0){const _0xe50484=a107_0xd24541;if(!_0x35e6f0)return[];if(Array[_0xe50484(0x25e)](_0x35e6f0))return _0x35e6f0['map'](_0x17409a=>[_0x17409a['id'],_0x17409a]);return Object[_0xe50484(0x23b)](_0x35e6f0);}export function flattenJourneyActivation(_0x148d19){const _0x33a9b1=a107_0xd24541,{activationParams:_0xe9d077,activationId:_0x19755a,runAfterJourneyRefresh:_0x13d338}=_0x148d19[_0x33a9b1(0x227)];return{'id':_0x148d19['id'],'activationId':_0x19755a,'runAfterJourneyRefresh':_0x13d338,..._0xe9d077};}function col(_0x93cecc,_0x39a1f2={}){return{'column':_0x93cecc,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x39a1f2};}export function generateColumnMapping(_0x4e8436){const _0x49395b=a107_0xd24541,_0x58078b=[];_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x1f5))),_0x58078b['push'](col(_0x49395b(0x1f6),{'direction':'in','category':_0x49395b(0x235)})),_0x58078b[_0x49395b(0x1f1)](col('outtime_journey',{'direction':_0x49395b(0x203),'category':'journey'}));_0x4e8436[_0x49395b(0x227)]['goal']&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x1e5),{'direction':'in','category':_0x49395b(0x267),'detail':_0x4e8436[_0x49395b(0x227)][_0x49395b(0x267)]['name']||null}));const _0x46a354=_0x4e8436['attributes'][_0x49395b(0x261)]||[];for(let _0x54fd3e=0x0;_0x54fd3e<_0x46a354[_0x49395b(0x238)];_0x54fd3e++){const _0x2e8ead=_0x46a354[_0x54fd3e],_0x1055e4=_0x2e8ead[_0x49395b(0x202)],_0x4ea33e={'stageIndex':_0x54fd3e,'stageName':_0x1055e4},_0x286020=_0x2e8ead['entryCriteria']?.[_0x49395b(0x202)]||null;_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e,{..._0x4ea33e,'direction':'in','category':_0x49395b(0x20b),'detail':_0x286020})),_0x58078b['push'](col(_0x49395b(0x1ef)+_0x54fd3e,{..._0x4ea33e,'direction':'out','category':_0x49395b(0x20b),'detail':_0x286020}));_0x2e8ead[_0x49395b(0x244)]&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+_0x49395b(0x231),{..._0x4ea33e,'direction':'in','category':_0x49395b(0x244),'detail':_0x2e8ead['milestone']['name']||null}));const _0x547dc6=_0x2e8ead[_0x49395b(0x252)]||_0x2e8ead[_0x49395b(0x23c)]||[];for(let _0x3f6f0e=0x0;_0x3f6f0e<_0x547dc6[_0x49395b(0x238)];_0x3f6f0e++){_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+_0x49395b(0x1f9)+_0x3f6f0e,{..._0x4ea33e,'direction':'in','category':_0x49395b(0x1e9),'detail':_0x547dc6[_0x3f6f0e]['name']||null}));}const _0x3e8ec7=getStepEntries(_0x2e8ead[_0x49395b(0x246)]);for(const [_0x314854,_0x25d1bc]of _0x3e8ec7){const _0x1cd0e5=convertToColumnId(_0x314854),_0x4d16d9=_0x25d1bc['type']||null,_0xe53b6d=_0x25d1bc['name']||null,_0x42c442={..._0x4ea33e,'stepType':_0x4d16d9,'stepName':_0xe53b6d,'stepId':_0x314854};_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5,{..._0x42c442,'direction':'in','category':_0x49395b(0x1eb)})),_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x1ef)+_0x54fd3e+'_'+_0x1cd0e5,{..._0x42c442,'direction':_0x49395b(0x203),'category':'step'}));if(_0x25d1bc[_0x49395b(0x229)]===_0x49395b(0x21c)&&_0x25d1bc['branches'])for(const _0x5d1332 of _0x25d1bc['branches']){_0x5d1332['segmentId']&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5+'_'+_0x5d1332['segmentId'],{..._0x42c442,'direction':'in','category':_0x49395b(0x25f),'detail':_0x5d1332[_0x49395b(0x202)]||(_0x5d1332[_0x49395b(0x24f)]?_0x49395b(0x1ea):null)}));}if((_0x25d1bc['type']===_0x49395b(0x253)||_0x25d1bc[_0x49395b(0x229)]===_0x49395b(0x251))&&_0x25d1bc['variants'])for(const _0x35c5b0 of _0x25d1bc[_0x49395b(0x240)]){_0x35c5b0['id']&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5+_0x49395b(0x24e)+convertToColumnId(_0x35c5b0['id']),{..._0x42c442,'direction':'in','category':'variant','detail':_0x35c5b0['name']||null}));}if(_0x25d1bc['type']==='WaitStep'||_0x25d1bc[_0x49395b(0x229)]===_0x49395b(0x25a)){const _0x1b8f58=[];if(_0x25d1bc['conditionSegmentId'])_0x1b8f58[_0x49395b(0x1f1)](_0x25d1bc[_0x49395b(0x224)]);else{if(Array[_0x49395b(0x25e)](_0x25d1bc[_0x49395b(0x200)]))for(const _0x563461 of _0x25d1bc[_0x49395b(0x200)]){_0x563461['segmentId']&&!_0x563461[_0x49395b(0x22a)]&&_0x1b8f58[_0x49395b(0x1f1)](_0x563461[_0x49395b(0x258)]);}else _0x25d1bc[_0x49395b(0x247)]?.[_0x49395b(0x258)]&&_0x1b8f58['push'](_0x25d1bc['waitCondition'][_0x49395b(0x258)]);}for(const _0x240af9 of _0x1b8f58){_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5+'_'+_0x240af9,{..._0x42c442,'direction':'in','category':_0x49395b(0x25f)}));}}}}return _0x58078b['push'](col('time')),_0x58078b;}export function aggregateJourneyHistory(_0x493a56){const _0x227305=a107_0xd24541,_0x46b0fe=_0x493a56[_0x227305(0x1fb)]((_0x373395,_0x55dfd7)=>_0x373395+(_0x55dfd7['entryInflux']??0x0),0x0),_0x4cdf35=_0x493a56['reduce']((_0x2f885e,_0x13354f)=>_0x2f885e+(_0x13354f['goalInflux']??0x0),0x0),_0xe75c31=_0x493a56[_0x227305(0x1fb)]((_0x1fb86b,_0x2f80f1)=>_0x1fb86b+((_0x2f80f1[_0x227305(0x210)]??0x0)+(_0x2f80f1[_0x227305(0x225)]??0x0)),0x0),_0x5c87f8=_0x493a56[_0x493a56[_0x227305(0x238)]-0x1];return{'size':_0x5c87f8?.[_0x227305(0x255)]??0x0,'entered':_0x46b0fe,'goal_achieved':_0x4cdf35,'completion_rate':_0x4cdf35&&_0x46b0fe?_0x4cdf35/_0x46b0fe*0x64:0x0,'exit_or_jump':_0xe75c31,'exit_or_jump_rate':_0xe75c31&&_0x46b0fe?_0xe75c31/_0x46b0fe*0x64:0x0};}export function aggregateStageHistory(_0xf8a797){const _0x1894d2=a107_0xd24541,_0x54e0b1=_0xf8a797[_0x1894d2(0x1fb)]((_0x375fc9,_0x236bf8)=>_0x375fc9+(_0x236bf8['entryInflux']??0x0),0x0),_0x473733=_0xf8a797[_0x1894d2(0x1fb)]((_0x103939,_0x6764a)=>_0x103939+(_0x6764a[_0x1894d2(0x237)]??0x0),0x0),_0x5e8ff0=_0xf8a797[_0x1894d2(0x1fb)]((_0x308901,_0x521458)=>_0x308901+((_0x521458['exitInflux']??0x0)+(_0x521458[_0x1894d2(0x225)]??0x0)),0x0),_0x1ecf2d=_0xf8a797[_0xf8a797[_0x1894d2(0x238)]-0x1];return{'size':_0x1ecf2d?.['size']??0x0,'entered':_0x54e0b1,'milestone':_0x473733,'milestone_rate':_0x473733&&_0x54e0b1?_0x473733/_0x54e0b1*0x64:0x0,'exit_or_jump':_0x5e8ff0,'exit_or_jump_rate':_0x5e8ff0&&_0x54e0b1?_0x5e8ff0/_0x54e0b1*0x64:0x0};}export function assembleJourneyStats(_0x2902d4,_0x5c8276){const _0x4f4530=a107_0xd24541,_0xa46925=!!(_0x5c8276?.['from']||_0x5c8276?.['to'])&&!!_0x2902d4[_0x4f4530(0x22c)]?.[_0x4f4530(0x238)];if(_0xa46925){const _0x3ace82=aggregateJourneyHistory(_0x2902d4[_0x4f4530(0x22c)]),_0x2c92ae={'journey_id':_0x2902d4[_0x4f4530(0x207)],..._0x5c8276?.['from']&&{'from':_0x5c8276[_0x4f4530(0x248)]},..._0x5c8276?.['to']&&{'to':_0x5c8276['to']},..._0x3ace82};return _0x5c8276?.[_0x4f4530(0x20c)]&&(_0x2c92ae[_0x4f4530(0x22c)]=_0x2902d4[_0x4f4530(0x22c)]),_0x2c92ae;}return{'journey_id':_0x2902d4[_0x4f4530(0x207)],'size':_0x2902d4[_0x4f4530(0x255)],'entered':_0x2902d4[_0x4f4530(0x1e2)],'goal_achieved':_0x2902d4[_0x4f4530(0x1f4)],'completion_rate':_0x2902d4[_0x4f4530(0x20f)],'exit_or_jump':_0x2902d4[_0x4f4530(0x23a)],'exit_or_jump_rate':_0x2902d4[_0x4f4530(0x243)]};}export function formatVersionsFromBundle(_0x4cdeef){const _0x154d50=a107_0xd24541,_0x28c5bf=_0x4cdeef[_0x154d50(0x1e7)][_0x154d50(0x1f3)](_0x279196=>({'journeyId':_0x279196['id'],'versionNumber':_0x279196[_0x154d50(0x227)][_0x154d50(0x1e3)]??0x0,'name':_0x279196[_0x154d50(0x227)][_0x154d50(0x202)],'state':_0x279196[_0x154d50(0x227)][_0x154d50(0x236)],'paused':_0x279196[_0x154d50(0x227)][_0x154d50(0x1fd)],'createdAt':_0x279196['attributes'][_0x154d50(0x22b)],'updatedAt':_0x279196[_0x154d50(0x227)][_0x154d50(0x23d)]}));return _0x28c5bf['sort']((_0x1b8e42,_0x5981d)=>_0x1b8e42[_0x154d50(0x1e3)]-_0x5981d[_0x154d50(0x1e3)]),_0x28c5bf;}export function synthesizePreBundleVersion(_0x4275f2){const _0x43a69c=a107_0xd24541;return{'journeyId':_0x4275f2['id'],'versionNumber':0x1,'name':_0x4275f2[_0x43a69c(0x227)]['name'],'state':_0x4275f2[_0x43a69c(0x227)][_0x43a69c(0x236)],'paused':_0x4275f2['attributes'][_0x43a69c(0x1fd)],'createdAt':_0x4275f2['attributes']['createdAt'],'updatedAt':_0x4275f2['attributes'][_0x43a69c(0x23d)]};}export function buildStageNameMap(_0x34f4f4){const _0x3333b1=a107_0xd24541;return new Map(_0x34f4f4['attributes'][_0x3333b1(0x261)]?.[_0x3333b1(0x1f3)](_0xf37f9=>[_0xf37f9['id'],_0xf37f9[_0x3333b1(0x202)]])??[]);}export class JourneySDK{[a107_0xd24541(0x219)];constructor(_0x2c78dc){const _0xcb8b2a=a107_0xd24541;this[_0xcb8b2a(0x219)]=new CDPApiClient(_0x2c78dc);}[a107_0xd24541(0x25b)](_0x36e435,_0x554b48){return _0x554b48?_0x36e435:deduplicateJourneysByBundle(_0x36e435);}async['listJourneysWithDetails'](_0x4ff771,_0x2e0472){const _0x2ae491=a107_0xd24541;try{const _0x6174a=await this['client']['listJourneysWithDetails'](_0x4ff771);return{'journeys':this[_0x2ae491(0x25b)](_0x6174a['journeys'],_0x2e0472),'activationStepsById':_0x6174a[_0x2ae491(0x254)]};}catch(_0x2736fe){if(isHttp404Error(_0x2736fe))return{'journeys':[],'activationStepsById':new Map()};throw _0x2736fe;}}async[a107_0xd24541(0x20a)](_0x59ac00,_0x179004,_0x4af516){const _0x3ebe0d=a107_0xd24541;let _0x36876b=_0x179004;if(!_0x36876b)try{const _0x3ec746=await this[_0x3ebe0d(0x219)][_0x3ebe0d(0x230)](_0x59ac00);_0x36876b=_0x3ec746[_0x3ebe0d(0x234)]??undefined;}catch(_0x5a1fe0){if(isHttp404Error(_0x5a1fe0))return[];throw _0x5a1fe0;}if(!_0x36876b)return[];let _0x231bef;if(_0x4af516?.[_0x3ebe0d(0x26a)]){const _0x3c9970=await this[_0x3ebe0d(0x219)][_0x3ebe0d(0x1fe)](_0x59ac00),_0x3be9d1=_0x3c9970['map'](_0x419179=>this['client'][_0x3ebe0d(0x1e1)](_0x419179['id'])),_0x4bb01e=await Promise[_0x3ebe0d(0x257)](_0x3be9d1),_0x485692=new Set();_0x231bef=_0x4bb01e[_0x3ebe0d(0x25d)]()['filter'](_0x1b2d07=>{const _0x1cf205=_0x3ebe0d;if(_0x485692[_0x1cf205(0x204)](_0x1b2d07['id']))return![];return _0x485692[_0x1cf205(0x233)](_0x1b2d07['id']),!![];});}else{const _0x2cd84f=await this['client'][_0x3ebe0d(0x239)](_0x36876b,0x20,![]),_0x1d6c22=_0x2cd84f[_0x3ebe0d(0x1ec)],_0x55cf18=_0x1d6c22[_0x3ebe0d(0x20e)](_0x1b7b98=>_0x1b7b98['type']===_0x3ebe0d(0x235));_0x231bef=_0x55cf18[_0x3ebe0d(0x1f3)](_0x31c305=>entityToJourneyListItem(_0x31c305,_0x59ac00));}return this['applyVersionDeduplication'](_0x231bef,_0x4af516?.[_0x3ebe0d(0x26a)]);}async[a107_0xd24541(0x245)](_0x147c8f,_0x12e6d2,_0x4d167d){const _0x1aef85=a107_0xd24541;if(!_0x12e6d2)return{'journeys':[],'folders':[]};const _0x227cd8=await this[_0x1aef85(0x219)][_0x1aef85(0x239)](_0x12e6d2,0x20,![]),_0x3ca165=_0x227cd8[_0x1aef85(0x1ec)],_0x5a490e=_0x3ca165['filter'](_0x395633=>_0x395633[_0x1aef85(0x229)]===_0x1aef85(0x250)&&_0x395633['id']!==_0x12e6d2),_0xce9463=_0x5a490e[_0x1aef85(0x1f3)](_0x29c8c0=>({'id':_0x29c8c0['id'],'name':_0x29c8c0[_0x1aef85(0x227)]['name']})),_0x3c3b20=_0x3ca165[_0x1aef85(0x20e)](_0x48801c=>_0x48801c[_0x1aef85(0x229)]===_0x1aef85(0x235)),_0x2f6bda=_0x3c3b20[_0x1aef85(0x1f3)](_0x42e52c=>entityToJourneyListItem(_0x42e52c,_0x147c8f));return{'journeys':this[_0x1aef85(0x25b)](_0x2f6bda,_0x4d167d?.[_0x1aef85(0x26a)]),'folders':_0xce9463};}async[a107_0xd24541(0x1e6)](_0x487c39,_0x43d8fe){const _0x20fcf5=a107_0xd24541;let _0x76312d;try{_0x76312d=await this[_0x20fcf5(0x219)][_0x20fcf5(0x1fe)](_0x487c39);}catch(_0x23fe5f){if(isHttp404Error(_0x23fe5f))return{'journeys':[],'activationStepsById':new Map()};throw _0x23fe5f;}const _0x58caa0=_0x76312d[_0x20fcf5(0x1f3)](async _0x4321a5=>{const _0x16ce56=_0x20fcf5;return await this['listJourneysWithDetails'](_0x4321a5['id'],_0x43d8fe?.[_0x16ce56(0x26a)]);}),_0x33f192=await Promise['all'](_0x58caa0),_0x5a62fd=new Map(),_0x372bcd=[];for(const _0x253d2e of _0x33f192){_0x372bcd[_0x20fcf5(0x1f1)](..._0x253d2e[_0x20fcf5(0x1e7)]);for(const [_0x3dc922,_0x19257d]of _0x253d2e[_0x20fcf5(0x254)]){_0x5a62fd[_0x20fcf5(0x21e)](_0x3dc922,_0x19257d);}}const _0x3e4782=new Set(),_0x6a2236=_0x372bcd[_0x20fcf5(0x20e)](_0x17ff4c=>{if(_0x3e4782['has'](_0x17ff4c['id']))return![];return _0x3e4782['add'](_0x17ff4c['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x6a2236,_0x43d8fe?.[_0x20fcf5(0x26a)]),'activationStepsById':_0x5a62fd};}async['getJourney'](_0x5ab0d4){const _0xf20d47=a107_0xd24541;try{return await this['client'][_0xf20d47(0x212)](_0x5ab0d4);}catch(_0x389bfa){if(isHttp404Error(_0x389bfa))throw new SDKError(ErrorCode[_0xf20d47(0x218)],_0xf20d47(0x21a)+_0x5ab0d4,_0x389bfa);throw _0x389bfa;}}async[a107_0xd24541(0x209)](_0x19492f,_0x26eea5){const _0x25affc=a107_0xd24541,_0x7dca78=await this[_0x25affc(0x20a)](_0x19492f),_0x21c63f=_0x7dca78[_0x25affc(0x242)](_0x9cadce=>_0x9cadce[_0x25affc(0x263)][_0x25affc(0x21d)]()===_0x26eea5[_0x25affc(0x21d)]());if(!_0x21c63f)throw new SDKError(ErrorCode[_0x25affc(0x218)],_0x25affc(0x21a)+_0x26eea5,undefined,{'helpText':_0x25affc(0x1e0)});return _0x21c63f['id'];}async['getStatistics'](_0x2c4c2a,_0x4155f7){const _0x2b0d47=a107_0xd24541;try{return await this['client']['getJourneyStatistics'](_0x2c4c2a,_0x4155f7);}catch(_0x4d3743){if(isHttp404Error(_0x4d3743))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x2b0d47(0x21a)+_0x2c4c2a,_0x4d3743);throw _0x4d3743;}}async[a107_0xd24541(0x249)](_0x4823f1,_0x4f313f){const _0x15e3a0=a107_0xd24541,_0x588fa7={'from':_0x4f313f?.[_0x15e3a0(0x248)],'to':_0x4f313f?.['to'],'limit':_0x4f313f?.['limit']},_0x44d627=_0x4f313f?.[_0x15e3a0(0x229)]!==_0x15e3a0(0x23f);try{const [_0x6a9194,_0x10de27]=await Promise[_0x15e3a0(0x257)]([this['fetchTrafficRaw'](_0x4823f1,_0x4f313f?.[_0x15e3a0(0x229)],_0x588fa7),_0x44d627?this[_0x15e3a0(0x212)](_0x4823f1):undefined]);if(_0x6a9194[_0x15e3a0(0x1de)]&&_0x10de27){const _0x15ae52=buildStageNameMap(_0x10de27);_0x6a9194[_0x15e3a0(0x1de)]=_0x6a9194[_0x15e3a0(0x1de)][_0x15e3a0(0x1f3)](_0x3a9230=>({..._0x3a9230,'journeyStageName':_0x15ae52[_0x15e3a0(0x1dd)](_0x3a9230[_0x15e3a0(0x221)])??_0x3a9230['journeyStageId']}));}return _0x6a9194;}catch(_0x407272){if(isHttp404Error(_0x407272))throw new SDKError(ErrorCode[_0x15e3a0(0x218)],_0x15e3a0(0x21a)+_0x4823f1,_0x407272);throw _0x407272;}}async[a107_0xd24541(0x211)](_0x7539d7,_0x4a291c,_0x49d31e){const _0x2af936=a107_0xd24541;if(_0x4a291c===_0x2af936(0x23f)){const _0x5cf8f6=await this[_0x2af936(0x219)][_0x2af936(0x201)](_0x7539d7,_0x49d31e);return{'conversion':_0x5cf8f6};}if(_0x4a291c==='activation'){const _0x4cf5ba=await this[_0x2af936(0x219)][_0x2af936(0x213)](_0x7539d7,_0x49d31e);return{'activation':_0x4cf5ba};}const [_0x5c1f18,_0x2feb30]=await Promise[_0x2af936(0x257)]([this[_0x2af936(0x219)][_0x2af936(0x201)](_0x7539d7,_0x49d31e),this[_0x2af936(0x219)][_0x2af936(0x213)](_0x7539d7,_0x49d31e)]);return{'conversion':_0x5c1f18,'activation':_0x2feb30};}async[a107_0xd24541(0x1df)](_0x565f48){const _0x1f4750=a107_0xd24541;try{return await this[_0x1f4750(0x219)]['pauseJourney'](_0x565f48);}catch(_0x4ddace){if(isHttp404Error(_0x4ddace))throw new SDKError(ErrorCode[_0x1f4750(0x218)],_0x1f4750(0x21a)+_0x565f48,_0x4ddace);throw _0x4ddace;}}async['resume'](_0x242664){const _0xdc17e2=a107_0xd24541;try{return await this[_0xdc17e2(0x219)][_0xdc17e2(0x1f0)](_0x242664);}catch(_0x3cb174){if(isHttp404Error(_0x3cb174))throw new SDKError(ErrorCode[_0xdc17e2(0x218)],'Journey\x20not\x20found:\x20'+_0x242664,_0x3cb174);throw _0x3cb174;}}async[a107_0xd24541(0x265)](_0x390a82){const _0x52bad0=a107_0xd24541;return await this['client'][_0x52bad0(0x24c)](_0x390a82);}async[a107_0xd24541(0x25c)](_0x503759,_0x357d36){const _0x5da965=a107_0xd24541;try{return await this['client'][_0x5da965(0x1f2)](_0x503759,_0x357d36);}catch(_0x415dfd){if(isHttp404Error(_0x415dfd))throw new SDKError(ErrorCode[_0x5da965(0x218)],'Journey\x20not\x20found:\x20'+_0x503759,_0x415dfd);throw _0x415dfd;}}async['getActivation'](_0x5f067e,_0x34c7fa){const _0x452637=a107_0xd24541;try{return await this[_0x452637(0x219)]['getJourneyActivation'](_0x5f067e,_0x34c7fa);}catch(_0x45a354){if(isHttp404Error(_0x45a354))throw new SDKError(ErrorCode[_0x452637(0x1ed)],_0x452637(0x24d)+_0x34c7fa+_0x452637(0x260)+_0x5f067e,_0x45a354);throw _0x45a354;}}async[a107_0xd24541(0x256)](_0xdfe956){const _0x17616f=a107_0xd24541;try{return await this[_0x17616f(0x219)][_0x17616f(0x266)](_0xdfe956);}catch(_0x55a29f){if(isHttp404Error(_0x55a29f))return[];throw _0x55a29f;}}async['listActivationsFlat'](_0x427c7e){const _0x587f4f=await this['listActivations'](_0x427c7e);return _0x587f4f['map'](flattenJourneyActivation);}async[a107_0xd24541(0x24b)](_0x5e6fa0,_0x4af7c2){const _0x26accb=a107_0xd24541;return await this[_0x26accb(0x219)][_0x26accb(0x1fa)](_0x5e6fa0,_0x4af7c2);}async['getColumnMapping'](_0x4e1c0e){const _0x250b34=a107_0xd24541,_0x2e482b=await this['getJourney'](_0x4e1c0e),_0x949b3d=generateColumnMapping(_0x2e482b);return{'journeyId':_0x2e482b['id'],'journeyName':_0x2e482b[_0x250b34(0x227)]['name'],'database':_0x250b34(0x232)+_0x2e482b[_0x250b34(0x227)][_0x250b34(0x22f)],'table':'journey_'+_0x2e482b['id'],'columns':_0x949b3d};}async[a107_0xd24541(0x262)](_0x54934a){const _0x374e8d=a107_0xd24541;return this[_0x374e8d(0x219)][_0x374e8d(0x216)](_0x54934a);}async[a107_0xd24541(0x22d)](_0x2b1ecb){const _0x395651=a107_0xd24541,_0x5200a3=await this[_0x395651(0x212)](_0x2b1ecb),_0x367d7d=_0x5200a3[_0x395651(0x227)]['journeyBundleId'];if(!_0x367d7d)return{'bundleId':'','bundleName':_0x5200a3[_0x395651(0x227)][_0x395651(0x202)],'bundleDescription':_0x5200a3['attributes'][_0x395651(0x1e8)]??null,'latestJourneyId':_0x5200a3['id'],'versions':[synthesizePreBundleVersion(_0x5200a3)]};const _0xf28b2=await this[_0x395651(0x262)](_0x367d7d);return{'bundleId':_0x367d7d,'bundleName':_0xf28b2[_0x395651(0x202)],'bundleDescription':_0xf28b2['description']??null,'latestJourneyId':_0xf28b2[_0x395651(0x220)],'versions':formatVersionsFromBundle(_0xf28b2)};}async[a107_0xd24541(0x21f)](_0x63dfed){const _0x35649d=a107_0xd24541,_0x28eb0f=await this[_0x35649d(0x212)](_0x63dfed),_0x3097e7=_0x28eb0f[_0x35649d(0x227)][_0x35649d(0x20d)];if(!_0x3097e7)throw new SDKError(ErrorCode[_0x35649d(0x1f8)],_0x35649d(0x206));await this[_0x35649d(0x219)][_0x35649d(0x241)](_0x3097e7);const _0x45753c=await this[_0x35649d(0x219)][_0x35649d(0x216)](_0x3097e7),_0x3911c6=_0x45753c[_0x35649d(0x202)]+'\x20v'+(_0x45753c[_0x35649d(0x23e)]+0x1);return this[_0x35649d(0x219)]['createJourneyVersion'](_0x3097e7,{'sourceId':_0x63dfed,'attributes':{'name':_0x3911c6}});}}
|
|
1
|
+
const a107_0x10abf2=a107_0x34ff;function a107_0x34ff(_0x29dc76,_0x131b67){_0x29dc76=_0x29dc76-0x111;const _0x7341a9=a107_0x7341();let _0x34ff0b=_0x7341a9[_0x29dc76];return _0x34ff0b;}(function(_0x52b110,_0x446d59){const _0x3d16b1=a107_0x34ff,_0x1d2b72=_0x52b110();while(!![]){try{const _0x58d4d1=parseInt(_0x3d16b1(0x111))/0x1+parseInt(_0x3d16b1(0x18e))/0x2*(-parseInt(_0x3d16b1(0x168))/0x3)+-parseInt(_0x3d16b1(0x12c))/0x4+parseInt(_0x3d16b1(0x12b))/0x5*(parseInt(_0x3d16b1(0x13d))/0x6)+parseInt(_0x3d16b1(0x19c))/0x7+parseInt(_0x3d16b1(0x18c))/0x8*(parseInt(_0x3d16b1(0x16c))/0x9)+-parseInt(_0x3d16b1(0x151))/0xa*(parseInt(_0x3d16b1(0x172))/0xb);if(_0x58d4d1===_0x446d59)break;else _0x1d2b72['push'](_0x1d2b72['shift']());}catch(_0x91d178){_0x1d2b72['push'](_0x1d2b72['shift']());}}}(a107_0x7341,0x55847));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x44911b){const _0x1353c3=a107_0x34ff;return _0x44911b['journeyBundleId']??_0x44911b[_0x1353c3(0x188)]?.[_0x1353c3(0x17c)]??undefined;}function getVersionNumber(_0xd07d22){const _0x3b7b28=a107_0x34ff;return _0xd07d22['versionNumber']??_0xd07d22[_0x3b7b28(0x188)]?.[_0x3b7b28(0x140)]??0x0;}export function deduplicateJourneysByBundle(_0x21ef75){const _0x42c9e0=a107_0x34ff,_0x37cd23=new Map();let _0x4b63b7=0x0;for(const _0xde04c5 of _0x21ef75){const _0xcafb9d=getBundleId(_0xde04c5);if(!_0xcafb9d){const _0x3c0c47=_0x42c9e0(0x145)+(_0xde04c5['id']??'idx-'+_0x4b63b7++);_0x37cd23[_0x42c9e0(0x141)](_0x3c0c47,_0xde04c5);continue;}const _0x49c371=_0x37cd23['get'](_0xcafb9d);if(!_0x49c371)_0x37cd23[_0x42c9e0(0x141)](_0xcafb9d,_0xde04c5);else{const _0x2f7f60=getVersionNumber(_0x49c371),_0x11df65=getVersionNumber(_0xde04c5);_0x11df65>_0x2f7f60&&_0x37cd23[_0x42c9e0(0x141)](_0xcafb9d,_0xde04c5);}}return Array['from'](_0x37cd23[_0x42c9e0(0x18a)]());}const VALID_JOURNEY_STATES=new Set([a107_0x10abf2(0x148),a107_0x10abf2(0x195),'launched']);export function parseJourneyState(_0x304125){const _0x296636=a107_0x10abf2;if(typeof _0x304125==='string'&&VALID_JOURNEY_STATES[_0x296636(0x184)](_0x304125))return _0x304125;return'draft';}export function entityToJourneyListItem(_0x18939e,_0x5bf0d9){const _0x3d3f2f=a107_0x10abf2,_0x3e91d1=_0x18939e[_0x3d3f2f(0x188)];return{'id':_0x18939e['id'],'name':_0x3e91d1[_0x3d3f2f(0x177)]??'','journeyBundleName':_0x3e91d1[_0x3d3f2f(0x11b)]??_0x3e91d1['name']??'','journeyBundleId':_0x3e91d1['journeyBundleId']??'','versionNumber':_0x3e91d1[_0x3d3f2f(0x140)],'description':_0x3e91d1['description']??null,'state':parseJourneyState(_0x3e91d1[_0x3d3f2f(0x146)]),'paused':_0x3e91d1[_0x3d3f2f(0x134)]??![],'audienceId':_0x5bf0d9,'folderId':_0x3e91d1[_0x3d3f2f(0x150)]??_0x18939e[_0x3d3f2f(0x19f)]?.['parentFolder']?.[_0x3d3f2f(0x12a)]?.['id']??null,'createdAt':_0x3e91d1[_0x3d3f2f(0x129)]??'','updatedAt':_0x3e91d1['updatedAt']??''};}function convertToColumnId(_0x435deb){const _0x3f9bde=a107_0x10abf2;return _0x435deb[_0x3f9bde(0x193)](/-/g,'_');}function getStepEntries(_0x2cecff){const _0x42184f=a107_0x10abf2;if(!_0x2cecff)return[];if(Array[_0x42184f(0x15a)](_0x2cecff))return _0x2cecff[_0x42184f(0x15e)](_0x562a81=>[_0x562a81['id'],_0x562a81]);return Object[_0x42184f(0x181)](_0x2cecff);}function a107_0x7341(){const _0x2573b3=['getJourneyActivation','paused','reduce','exitCriterias','getTrafficData','exitOrJumpSize','getJourneyBundle','latestJourneyId','add','getActivation','942PaaeXw','push','description','versionNumber','set','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','goalSize','milestoneInflux','no-bundle-','state','filter','draft','intime_goal','listJourneyActivations','entryInflux','segmentId','all','intime_journey','get','segmentFolderId','30jUEado','Wait','resolveJourneyId','activation','JOURNEY_NOT_FOUND','listVersions','activationStepsById','jumpInflux','variant','isArray','DecisionPoint','steps','create','map','limit','fetchTrafficRaw','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','getJourney','conditionSegmentId','size','folder-segment','stage','includeHistory','309YHNZaN','exit_criteria','excluded','variants','153BnCPEU','listJourneysWithFolders','applyVersionDeduplication','exitCriteria','_variant_','fixed','2630749ZaJQwc','outtime_stage_','toLowerCase','lastVersionNumber','completionRate','name','createVersion','from','updatedAt','getParentSegmentFull','journeyBundleId','conversion','journeys','exitOrJumpRate','pauseJourney','entries','journey','journeyId','has','NOT_FOUND','Journey\x20activation\x20step\x20not\x20found:\x20','intime_stage_','attributes','cdp_customer_id','values','journey_','277496xAuGUw','listJourneys','4782mbVxHd','conditions','WaitStep','type','listEntitiesByFolder','replace','journeyStageId','simulation','createJourneyVersion','entryCriteria','resumeJourney','includeAllVersions','AbTest','enteredSize','1424066XOXJyR','journeyStages','milestone','relationships','624443duJrmh','goalInflux','length','client','rootFolderId','createJourney','listActivations','out','listJourneysWithDetails','getJourneyStatistics','journeyBundleName','getStatistics','getActivationSankeyChart','history','getConversionSankeyChart','listJourneysFromParentSegment','exitInflux','time','resume','listSegmentFolders','branch','Journey\x20not\x20found:\x20','INVALID_ARGUMENT','_milestone','createdAt','data','14660TcNiPO','2255420cYaJQH','listJourneysWithDetailsFromParentSegment','updateJourney','goal','find','cdp_audience_','getBundle'];a107_0x7341=function(){return _0x2573b3;};return a107_0x7341();}export function flattenJourneyActivation(_0x48f7c2){const _0x121d36=a107_0x10abf2,{activationParams:_0x3873d3,activationId:_0x33924d,runAfterJourneyRefresh:_0x4ea48c}=_0x48f7c2[_0x121d36(0x188)];return{'id':_0x48f7c2['id'],'activationId':_0x33924d,'runAfterJourneyRefresh':_0x4ea48c,..._0x3873d3};}function col(_0x3efd63,_0x4a4be1={}){const _0x24218a=a107_0x10abf2;return{'column':_0x3efd63,'direction':null,'stageIndex':null,'stageName':null,'category':_0x24218a(0x171),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x4a4be1};}export function generateColumnMapping(_0x4794a9){const _0x33ab27=a107_0x10abf2,_0x5b588c=[];_0x5b588c['push'](col(_0x33ab27(0x189))),_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x14e),{'direction':'in','category':'journey'})),_0x5b588c[_0x33ab27(0x13e)](col('outtime_journey',{'direction':_0x33ab27(0x118),'category':_0x33ab27(0x182)}));_0x4794a9['attributes'][_0x33ab27(0x12f)]&&_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x149),{'direction':'in','category':_0x33ab27(0x12f),'detail':_0x4794a9[_0x33ab27(0x188)][_0x33ab27(0x12f)][_0x33ab27(0x177)]||null}));const _0x5489f4=_0x4794a9[_0x33ab27(0x188)]['journeyStages']||[];for(let _0x4635bd=0x0;_0x4635bd<_0x5489f4[_0x33ab27(0x113)];_0x4635bd++){const _0x1580c7=_0x5489f4[_0x4635bd],_0x351ab6=_0x1580c7['name'],_0x3ca155={'stageIndex':_0x4635bd,'stageName':_0x351ab6},_0x31e8f4=_0x1580c7[_0x33ab27(0x197)]?.[_0x33ab27(0x177)]||null;_0x5b588c['push'](col(_0x33ab27(0x187)+_0x4635bd,{..._0x3ca155,'direction':'in','category':_0x33ab27(0x166),'detail':_0x31e8f4})),_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x173)+_0x4635bd,{..._0x3ca155,'direction':_0x33ab27(0x118),'category':'stage','detail':_0x31e8f4}));_0x1580c7['milestone']&&_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x187)+_0x4635bd+_0x33ab27(0x128),{..._0x3ca155,'direction':'in','category':_0x33ab27(0x19e),'detail':_0x1580c7['milestone'][_0x33ab27(0x177)]||null}));const _0x15071c=_0x1580c7[_0x33ab27(0x136)]||_0x1580c7[_0x33ab27(0x16f)]||[];for(let _0x4bd360=0x0;_0x4bd360<_0x15071c[_0x33ab27(0x113)];_0x4bd360++){_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x187)+_0x4635bd+'_exit_'+_0x4bd360,{..._0x3ca155,'direction':'in','category':_0x33ab27(0x169),'detail':_0x15071c[_0x4bd360][_0x33ab27(0x177)]||null}));}const _0x7fb746=getStepEntries(_0x1580c7[_0x33ab27(0x15c)]);for(const [_0xa69faf,_0xb1820a]of _0x7fb746){const _0x46ecb1=convertToColumnId(_0xa69faf),_0x1471dc=_0xb1820a[_0x33ab27(0x191)]||null,_0x2a07e0=_0xb1820a[_0x33ab27(0x177)]||null,_0x5f38a6={..._0x3ca155,'stepType':_0x1471dc,'stepName':_0x2a07e0,'stepId':_0xa69faf};_0x5b588c['push'](col('intime_stage_'+_0x4635bd+'_'+_0x46ecb1,{..._0x5f38a6,'direction':'in','category':'step'})),_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x173)+_0x4635bd+'_'+_0x46ecb1,{..._0x5f38a6,'direction':_0x33ab27(0x118),'category':'step'}));if(_0xb1820a[_0x33ab27(0x191)]===_0x33ab27(0x15b)&&_0xb1820a['branches'])for(const _0x5011f6 of _0xb1820a['branches']){_0x5011f6[_0x33ab27(0x14c)]&&_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x187)+_0x4635bd+'_'+_0x46ecb1+'_'+_0x5011f6[_0x33ab27(0x14c)],{..._0x5f38a6,'direction':'in','category':'branch','detail':_0x5011f6[_0x33ab27(0x177)]||(_0x5011f6[_0x33ab27(0x16a)]?'Excluded\x20profiles':null)}));}if((_0xb1820a[_0x33ab27(0x191)]===_0x33ab27(0x19a)||_0xb1820a['type']==='ABTest')&&_0xb1820a[_0x33ab27(0x16b)])for(const _0x4a483d of _0xb1820a[_0x33ab27(0x16b)]){_0x4a483d['id']&&_0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x187)+_0x4635bd+'_'+_0x46ecb1+_0x33ab27(0x170)+convertToColumnId(_0x4a483d['id']),{..._0x5f38a6,'direction':'in','category':_0x33ab27(0x159),'detail':_0x4a483d[_0x33ab27(0x177)]||null}));}if(_0xb1820a[_0x33ab27(0x191)]===_0x33ab27(0x190)||_0xb1820a[_0x33ab27(0x191)]===_0x33ab27(0x152)){const _0x13c80d=[];if(_0xb1820a[_0x33ab27(0x163)])_0x13c80d['push'](_0xb1820a[_0x33ab27(0x163)]);else{if(Array[_0x33ab27(0x15a)](_0xb1820a['conditions']))for(const _0x3b3aee of _0xb1820a[_0x33ab27(0x18f)]){_0x3b3aee[_0x33ab27(0x14c)]&&!_0x3b3aee['timedOutPath']&&_0x13c80d[_0x33ab27(0x13e)](_0x3b3aee['segmentId']);}else _0xb1820a['waitCondition']?.[_0x33ab27(0x14c)]&&_0x13c80d[_0x33ab27(0x13e)](_0xb1820a['waitCondition'][_0x33ab27(0x14c)]);}for(const _0x24311c of _0x13c80d){_0x5b588c['push'](col(_0x33ab27(0x187)+_0x4635bd+'_'+_0x46ecb1+'_'+_0x24311c,{..._0x5f38a6,'direction':'in','category':_0x33ab27(0x125)}));}}}}return _0x5b588c[_0x33ab27(0x13e)](col(_0x33ab27(0x122))),_0x5b588c;}export function aggregateJourneyHistory(_0x539b0c){const _0x157483=a107_0x10abf2,_0x3cd126=_0x539b0c['reduce']((_0xe74bc8,_0x297fc4)=>_0xe74bc8+(_0x297fc4['entryInflux']??0x0),0x0),_0x5863e1=_0x539b0c[_0x157483(0x135)]((_0x4c2ed3,_0x7deef1)=>_0x4c2ed3+(_0x7deef1[_0x157483(0x112)]??0x0),0x0),_0x27e9ec=_0x539b0c[_0x157483(0x135)]((_0x4a9b05,_0x4b7408)=>_0x4a9b05+((_0x4b7408[_0x157483(0x121)]??0x0)+(_0x4b7408[_0x157483(0x158)]??0x0)),0x0),_0x1375c3=_0x539b0c[_0x539b0c[_0x157483(0x113)]-0x1];return{'size':_0x1375c3?.[_0x157483(0x164)]??0x0,'entered':_0x3cd126,'goal_achieved':_0x5863e1,'completion_rate':_0x5863e1&&_0x3cd126?_0x5863e1/_0x3cd126*0x64:0x0,'exit_or_jump':_0x27e9ec,'exit_or_jump_rate':_0x27e9ec&&_0x3cd126?_0x27e9ec/_0x3cd126*0x64:0x0};}export function aggregateStageHistory(_0x308755){const _0x51fa58=a107_0x10abf2,_0x42ae40=_0x308755[_0x51fa58(0x135)]((_0x1694ae,_0x48113b)=>_0x1694ae+(_0x48113b[_0x51fa58(0x14b)]??0x0),0x0),_0x5c72cb=_0x308755[_0x51fa58(0x135)]((_0xa4eaec,_0x49f9e4)=>_0xa4eaec+(_0x49f9e4[_0x51fa58(0x144)]??0x0),0x0),_0x1291ef=_0x308755['reduce']((_0x1dd489,_0x3ea7c9)=>_0x1dd489+((_0x3ea7c9[_0x51fa58(0x121)]??0x0)+(_0x3ea7c9[_0x51fa58(0x158)]??0x0)),0x0),_0x5096a5=_0x308755[_0x308755['length']-0x1];return{'size':_0x5096a5?.[_0x51fa58(0x164)]??0x0,'entered':_0x42ae40,'milestone':_0x5c72cb,'milestone_rate':_0x5c72cb&&_0x42ae40?_0x5c72cb/_0x42ae40*0x64:0x0,'exit_or_jump':_0x1291ef,'exit_or_jump_rate':_0x1291ef&&_0x42ae40?_0x1291ef/_0x42ae40*0x64:0x0};}export function assembleJourneyStats(_0x4de3eb,_0x8c6d0a){const _0x46ccd0=a107_0x10abf2,_0x41d6ed=!!(_0x8c6d0a?.[_0x46ccd0(0x179)]||_0x8c6d0a?.['to'])&&!!_0x4de3eb[_0x46ccd0(0x11e)]?.[_0x46ccd0(0x113)];if(_0x41d6ed){const _0x2a59d8=aggregateJourneyHistory(_0x4de3eb[_0x46ccd0(0x11e)]),_0x45e27f={'journey_id':_0x4de3eb[_0x46ccd0(0x183)],..._0x8c6d0a?.['from']&&{'from':_0x8c6d0a['from']},..._0x8c6d0a?.['to']&&{'to':_0x8c6d0a['to']},..._0x2a59d8};return _0x8c6d0a?.[_0x46ccd0(0x167)]&&(_0x45e27f['history']=_0x4de3eb['history']),_0x45e27f;}return{'journey_id':_0x4de3eb[_0x46ccd0(0x183)],'size':_0x4de3eb[_0x46ccd0(0x164)],'entered':_0x4de3eb[_0x46ccd0(0x19b)],'goal_achieved':_0x4de3eb[_0x46ccd0(0x143)],'completion_rate':_0x4de3eb[_0x46ccd0(0x176)],'exit_or_jump':_0x4de3eb[_0x46ccd0(0x138)],'exit_or_jump_rate':_0x4de3eb[_0x46ccd0(0x17f)]};}export function formatVersionsFromBundle(_0x1056fd){const _0x25daff=a107_0x10abf2,_0x29fe67=_0x1056fd[_0x25daff(0x17e)][_0x25daff(0x15e)](_0x3bb321=>({'journeyId':_0x3bb321['id'],'versionNumber':_0x3bb321[_0x25daff(0x188)][_0x25daff(0x140)]??0x0,'name':_0x3bb321[_0x25daff(0x188)][_0x25daff(0x177)],'state':_0x3bb321[_0x25daff(0x188)][_0x25daff(0x146)],'paused':_0x3bb321[_0x25daff(0x188)][_0x25daff(0x134)],'createdAt':_0x3bb321['attributes']['createdAt'],'updatedAt':_0x3bb321[_0x25daff(0x188)][_0x25daff(0x17a)]}));return _0x29fe67['sort']((_0x5a5367,_0x85402a)=>_0x5a5367[_0x25daff(0x140)]-_0x85402a[_0x25daff(0x140)]),_0x29fe67;}export function synthesizePreBundleVersion(_0x265158){const _0x5627be=a107_0x10abf2;return{'journeyId':_0x265158['id'],'versionNumber':0x1,'name':_0x265158['attributes']['name'],'state':_0x265158[_0x5627be(0x188)]['state'],'paused':_0x265158['attributes'][_0x5627be(0x134)],'createdAt':_0x265158[_0x5627be(0x188)][_0x5627be(0x129)],'updatedAt':_0x265158[_0x5627be(0x188)][_0x5627be(0x17a)]};}export function buildStageNameMap(_0x1959c1){const _0x344c08=a107_0x10abf2;return new Map(_0x1959c1[_0x344c08(0x188)][_0x344c08(0x19d)]?.[_0x344c08(0x15e)](_0x317f79=>[_0x317f79['id'],_0x317f79[_0x344c08(0x177)]])??[]);}export class JourneySDK{[a107_0x10abf2(0x114)];constructor(_0x56ce16){const _0x20d175=a107_0x10abf2;this[_0x20d175(0x114)]=new CDPApiClient(_0x56ce16);}['applyVersionDeduplication'](_0x424e7d,_0x3cd4e9){return _0x3cd4e9?_0x424e7d:deduplicateJourneysByBundle(_0x424e7d);}async[a107_0x10abf2(0x119)](_0x596838,_0x28659a){const _0x2801e4=a107_0x10abf2;try{const _0x40a83e=await this[_0x2801e4(0x114)]['listJourneysWithDetails'](_0x596838);return{'journeys':this[_0x2801e4(0x16e)](_0x40a83e['journeys'],_0x28659a),'activationStepsById':_0x40a83e['activationStepsById']};}catch(_0x2726d7){if(isHttp404Error(_0x2726d7))return{'journeys':[],'activationStepsById':new Map()};throw _0x2726d7;}}async[a107_0x10abf2(0x120)](_0xae9578,_0x3db600,_0x3faab4){const _0x15cba4=a107_0x10abf2;let _0x43bba4=_0x3db600;if(!_0x43bba4)try{const _0x3afe6d=await this[_0x15cba4(0x114)][_0x15cba4(0x17b)](_0xae9578);_0x43bba4=_0x3afe6d[_0x15cba4(0x115)]??undefined;}catch(_0x15929b){if(isHttp404Error(_0x15929b))return[];throw _0x15929b;}if(!_0x43bba4)return[];let _0x57fdcc;if(_0x3faab4?.[_0x15cba4(0x199)]){const _0x4feda0=await this[_0x15cba4(0x114)][_0x15cba4(0x124)](_0xae9578),_0x3fd279=_0x4feda0[_0x15cba4(0x15e)](_0x5f379b=>this[_0x15cba4(0x114)][_0x15cba4(0x18d)](_0x5f379b['id'])),_0x84850e=await Promise[_0x15cba4(0x14d)](_0x3fd279),_0x4aff30=new Set();_0x57fdcc=_0x84850e['flat']()[_0x15cba4(0x147)](_0x38b963=>{const _0x55bbf9=_0x15cba4;if(_0x4aff30[_0x55bbf9(0x184)](_0x38b963['id']))return![];return _0x4aff30[_0x55bbf9(0x13b)](_0x38b963['id']),!![];});}else{const _0x3a2157=await this[_0x15cba4(0x114)]['listEntitiesByFolder'](_0x43bba4,0x20,![]),_0x259d71=_0x3a2157[_0x15cba4(0x12a)],_0x30df38=_0x259d71[_0x15cba4(0x147)](_0x53be66=>_0x53be66[_0x15cba4(0x191)]===_0x15cba4(0x182));_0x57fdcc=_0x30df38[_0x15cba4(0x15e)](_0x206e08=>entityToJourneyListItem(_0x206e08,_0xae9578));}return this[_0x15cba4(0x16e)](_0x57fdcc,_0x3faab4?.[_0x15cba4(0x199)]);}async[a107_0x10abf2(0x16d)](_0x351245,_0x3a61c1,_0x4bbe50){const _0x358d39=a107_0x10abf2;if(!_0x3a61c1)return{'journeys':[],'folders':[]};const _0x30b1b2=await this[_0x358d39(0x114)][_0x358d39(0x192)](_0x3a61c1,0x20,![]),_0x515571=_0x30b1b2[_0x358d39(0x12a)],_0x3b907c=_0x515571[_0x358d39(0x147)](_0x50a4fa=>_0x50a4fa[_0x358d39(0x191)]===_0x358d39(0x165)&&_0x50a4fa['id']!==_0x3a61c1),_0x2c82c7=_0x3b907c[_0x358d39(0x15e)](_0x4efcf7=>({'id':_0x4efcf7['id'],'name':_0x4efcf7['attributes'][_0x358d39(0x177)]})),_0x21ea93=_0x515571[_0x358d39(0x147)](_0x1100f7=>_0x1100f7[_0x358d39(0x191)]===_0x358d39(0x182)),_0x2fef68=_0x21ea93['map'](_0x27223c=>entityToJourneyListItem(_0x27223c,_0x351245));return{'journeys':this[_0x358d39(0x16e)](_0x2fef68,_0x4bbe50?.[_0x358d39(0x199)]),'folders':_0x2c82c7};}async[a107_0x10abf2(0x12d)](_0xbafc37,_0x5e1991){const _0xd74dac=a107_0x10abf2;let _0x5d57e4;try{_0x5d57e4=await this['client'][_0xd74dac(0x124)](_0xbafc37);}catch(_0x53e935){if(isHttp404Error(_0x53e935))return{'journeys':[],'activationStepsById':new Map()};throw _0x53e935;}const _0x388d1f=_0x5d57e4[_0xd74dac(0x15e)](async _0x981ec9=>{return await this['listJourneysWithDetails'](_0x981ec9['id'],_0x5e1991?.['includeAllVersions']);}),_0x147bf6=await Promise[_0xd74dac(0x14d)](_0x388d1f),_0x550a48=new Map(),_0x4c25eb=[];for(const _0x1e29bd of _0x147bf6){_0x4c25eb[_0xd74dac(0x13e)](..._0x1e29bd[_0xd74dac(0x17e)]);for(const [_0x6ed07c,_0x157a66]of _0x1e29bd[_0xd74dac(0x157)]){_0x550a48[_0xd74dac(0x141)](_0x6ed07c,_0x157a66);}}const _0x57cfcb=new Set(),_0x2beaea=_0x4c25eb[_0xd74dac(0x147)](_0x5af20b=>{const _0x372955=_0xd74dac;if(_0x57cfcb[_0x372955(0x184)](_0x5af20b['id']))return![];return _0x57cfcb[_0x372955(0x13b)](_0x5af20b['id']),!![];});return{'journeys':this[_0xd74dac(0x16e)](_0x2beaea,_0x5e1991?.['includeAllVersions']),'activationStepsById':_0x550a48};}async[a107_0x10abf2(0x162)](_0x458ed2){const _0x464395=a107_0x10abf2;try{return await this[_0x464395(0x114)][_0x464395(0x162)](_0x458ed2);}catch(_0x5b293d){if(isHttp404Error(_0x5b293d))throw new SDKError(ErrorCode[_0x464395(0x155)],_0x464395(0x126)+_0x458ed2,_0x5b293d);throw _0x5b293d;}}async[a107_0x10abf2(0x153)](_0xd91645,_0x5a642b){const _0xe1c3d5=a107_0x10abf2,_0x14ba01=await this[_0xe1c3d5(0x120)](_0xd91645),_0x45e762=_0x14ba01[_0xe1c3d5(0x130)](_0x1999bd=>_0x1999bd['journeyBundleName'][_0xe1c3d5(0x174)]()===_0x5a642b['toLowerCase']());if(!_0x45e762)throw new SDKError(ErrorCode[_0xe1c3d5(0x155)],_0xe1c3d5(0x126)+_0x5a642b,undefined,{'helpText':_0xe1c3d5(0x161)});return _0x45e762['id'];}async[a107_0x10abf2(0x11c)](_0x17a503,_0x40508c){const _0x1ef040=a107_0x10abf2;try{return await this[_0x1ef040(0x114)][_0x1ef040(0x11a)](_0x17a503,_0x40508c);}catch(_0x56ed8e){if(isHttp404Error(_0x56ed8e))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x17a503,_0x56ed8e);throw _0x56ed8e;}}async[a107_0x10abf2(0x137)](_0x58dbbb,_0x322089){const _0x58a160=a107_0x10abf2,_0x132e3d={'from':_0x322089?.[_0x58a160(0x179)],'to':_0x322089?.['to'],'limit':_0x322089?.[_0x58a160(0x15f)]},_0x1c19d2=_0x322089?.[_0x58a160(0x191)]!==_0x58a160(0x17d);try{const [_0x1b716a,_0x288790]=await Promise[_0x58a160(0x14d)]([this[_0x58a160(0x160)](_0x58dbbb,_0x322089?.[_0x58a160(0x191)],_0x132e3d),_0x1c19d2?this[_0x58a160(0x162)](_0x58dbbb):undefined]);if(_0x1b716a['activation']&&_0x288790){const _0x41fe2e=buildStageNameMap(_0x288790);_0x1b716a[_0x58a160(0x154)]=_0x1b716a['activation'][_0x58a160(0x15e)](_0x5682a4=>({..._0x5682a4,'journeyStageName':_0x41fe2e[_0x58a160(0x14f)](_0x5682a4['journeyStageId'])??_0x5682a4[_0x58a160(0x194)]}));}return _0x1b716a;}catch(_0x303830){if(isHttp404Error(_0x303830))throw new SDKError(ErrorCode[_0x58a160(0x155)],'Journey\x20not\x20found:\x20'+_0x58dbbb,_0x303830);throw _0x303830;}}async[a107_0x10abf2(0x160)](_0x42884e,_0x50c2b5,_0x36ff84){const _0x203807=a107_0x10abf2;if(_0x50c2b5===_0x203807(0x17d)){const _0x98a8c=await this['client'][_0x203807(0x11f)](_0x42884e,_0x36ff84);return{'conversion':_0x98a8c};}if(_0x50c2b5==='activation'){const _0x28ad94=await this[_0x203807(0x114)][_0x203807(0x11d)](_0x42884e,_0x36ff84);return{'activation':_0x28ad94};}const [_0x1384f8,_0xb41db7]=await Promise[_0x203807(0x14d)]([this[_0x203807(0x114)]['getConversionSankeyChart'](_0x42884e,_0x36ff84),this[_0x203807(0x114)]['getActivationSankeyChart'](_0x42884e,_0x36ff84)]);return{'conversion':_0x1384f8,'activation':_0xb41db7};}async['pause'](_0x405549){const _0x204207=a107_0x10abf2;try{return await this[_0x204207(0x114)][_0x204207(0x180)](_0x405549);}catch(_0x4c1414){if(isHttp404Error(_0x4c1414))throw new SDKError(ErrorCode[_0x204207(0x155)],'Journey\x20not\x20found:\x20'+_0x405549,_0x4c1414);throw _0x4c1414;}}async[a107_0x10abf2(0x123)](_0x3a46c7){const _0x3038ef=a107_0x10abf2;try{return await this[_0x3038ef(0x114)][_0x3038ef(0x198)](_0x3a46c7);}catch(_0x233cd8){if(isHttp404Error(_0x233cd8))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x3038ef(0x126)+_0x3a46c7,_0x233cd8);throw _0x233cd8;}}async[a107_0x10abf2(0x15d)](_0x1d7b4c){const _0x1f6e71=a107_0x10abf2;return await this[_0x1f6e71(0x114)][_0x1f6e71(0x116)](_0x1d7b4c);}async['update'](_0x5eea76,_0x3ecd11){const _0x59e881=a107_0x10abf2;try{return await this[_0x59e881(0x114)][_0x59e881(0x12e)](_0x5eea76,_0x3ecd11);}catch(_0x12b0b5){if(isHttp404Error(_0x12b0b5))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x59e881(0x126)+_0x5eea76,_0x12b0b5);throw _0x12b0b5;}}async[a107_0x10abf2(0x13c)](_0x4165f7,_0x2ce316){const _0x435f04=a107_0x10abf2;try{return await this['client'][_0x435f04(0x133)](_0x4165f7,_0x2ce316);}catch(_0xab496e){if(isHttp404Error(_0xab496e))throw new SDKError(ErrorCode[_0x435f04(0x185)],_0x435f04(0x186)+_0x2ce316+'\x20in\x20journey\x20'+_0x4165f7,_0xab496e);throw _0xab496e;}}async['listActivations'](_0x3d79f0){const _0x56e898=a107_0x10abf2;try{return await this['client'][_0x56e898(0x14a)](_0x3d79f0);}catch(_0x32b3ac){if(isHttp404Error(_0x32b3ac))return[];throw _0x32b3ac;}}async['listActivationsFlat'](_0x3a9f9c){const _0x36bf1d=a107_0x10abf2,_0x72d342=await this[_0x36bf1d(0x117)](_0x3a9f9c);return _0x72d342[_0x36bf1d(0x15e)](flattenJourneyActivation);}async['createActivation'](_0x33362c,_0x371f82){const _0x1be982=a107_0x10abf2;return await this[_0x1be982(0x114)]['createJourneyActivation'](_0x33362c,_0x371f82);}async['getColumnMapping'](_0x5ea21d){const _0x63db46=a107_0x10abf2,_0x401de8=await this[_0x63db46(0x162)](_0x5ea21d),_0x4b5b19=generateColumnMapping(_0x401de8);return{'journeyId':_0x401de8['id'],'journeyName':_0x401de8[_0x63db46(0x188)]['name'],'database':_0x63db46(0x131)+_0x401de8['attributes']['audienceId'],'table':_0x63db46(0x18b)+_0x401de8['id'],'columns':_0x4b5b19};}async[a107_0x10abf2(0x132)](_0x36af36){const _0x5c75d1=a107_0x10abf2;return this[_0x5c75d1(0x114)][_0x5c75d1(0x139)](_0x36af36);}async[a107_0x10abf2(0x156)](_0xf4b292){const _0x1bcbff=a107_0x10abf2,_0x192267=await this[_0x1bcbff(0x162)](_0xf4b292),_0x56edd1=_0x192267['attributes'][_0x1bcbff(0x17c)];if(!_0x56edd1)return{'bundleId':'','bundleName':_0x192267[_0x1bcbff(0x188)][_0x1bcbff(0x177)],'bundleDescription':_0x192267[_0x1bcbff(0x188)]['description']??null,'latestJourneyId':_0x192267['id'],'versions':[synthesizePreBundleVersion(_0x192267)]};const _0x3a8343=await this[_0x1bcbff(0x132)](_0x56edd1);return{'bundleId':_0x56edd1,'bundleName':_0x3a8343['name'],'bundleDescription':_0x3a8343[_0x1bcbff(0x13f)]??null,'latestJourneyId':_0x3a8343[_0x1bcbff(0x13a)],'versions':formatVersionsFromBundle(_0x3a8343)};}async[a107_0x10abf2(0x178)](_0x9a6921){const _0x21d511=a107_0x10abf2,_0x5518a8=await this[_0x21d511(0x162)](_0x9a6921),_0x1877ec=_0x5518a8['attributes']['journeyBundleId'];if(!_0x1877ec)throw new SDKError(ErrorCode[_0x21d511(0x127)],_0x21d511(0x142));await this[_0x21d511(0x114)]['checkJourneyAppendable'](_0x1877ec);const _0x132ed9=await this[_0x21d511(0x114)][_0x21d511(0x139)](_0x1877ec),_0x41cb39=_0x132ed9['name']+'\x20v'+(_0x132ed9[_0x21d511(0x175)]+0x1);return this[_0x21d511(0x114)][_0x21d511(0x196)](_0x1877ec,{'sourceId':_0x9a6921,'attributes':{'name':_0x41cb39}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a108_0x2654ec=a108_0xcc16;(function(_0x1460ef,_0x479892){const _0x3909cd=a108_0xcc16,_0x49392c=_0x1460ef();while(!![]){try{const _0x18a6ca=parseInt(_0x3909cd(0xba))/0x1+parseInt(_0x3909cd(0xc1))/0x2+-parseInt(_0x3909cd(0xc3))/0x3+-parseInt(_0x3909cd(0xc4))/0x4*(parseInt(_0x3909cd(0xbf))/0x5)+parseInt(_0x3909cd(0xc2))/0x6+parseInt(_0x3909cd(0xbb))/0x7+parseInt(_0x3909cd(0xbc))/0x8;if(_0x18a6ca===_0x479892)break;else _0x49392c['push'](_0x49392c['shift']());}catch(_0x48dd5b){_0x49392c['push'](_0x49392c['shift']());}}}(a108_0x1a99,0xbb5c8));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a108_0x2654ec(0xc5),a108_0x2654ec(0xbd));export function saveLastChatId(_0x5335cd){const _0x36a2d2=a108_0x2654ec;chatIdCache[_0x36a2d2(0xbe)](_0x5335cd);}function a108_0xcc16(_0x6a63ca,_0x362e6c){_0x6a63ca=_0x6a63ca-0xba;const _0x1a993f=a108_0x1a99();let _0xcc160e=_0x1a993f[_0x6a63ca];return _0xcc160e;}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0xeb911c=a108_0x2654ec;chatIdCache[_0xeb911c(0xc0)]();}function a108_0x1a99(){const _0x35c7d1=['write','34025PeVKoV','clear','412948DOGGJp','410514AuDODu','158574pUPMVV','752csdDzr','last_chat_id','141140tauxHM','200004YrBckm','13240200xOilwU','llm/chat'];a108_0x1a99=function(){return _0x35c7d1;};return a108_0x1a99();}
|