@treasuredata/tdx 0.28.1 → 0.28.2
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.js +1 -1
- package/dist/sdk/segment/journey-validator.d.ts.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.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/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_0x16cded=a107_0x128b;(function(_0x2b4186,_0x339ab8){const _0x4b2a72=a107_0x128b,_0x3fa8f7=_0x2b4186();while(!![]){try{const _0x34a7c9=-parseInt(_0x4b2a72(0xd5))/0x1+-parseInt(_0x4b2a72(0x100))/0x2+-parseInt(_0x4b2a72(0xc5))/0x3*(parseInt(_0x4b2a72(0x10e))/0x4)+parseInt(_0x4b2a72(0xab))/0x5+-parseInt(_0x4b2a72(0xbe))/0x6+parseInt(_0x4b2a72(0xa0))/0x7*(-parseInt(_0x4b2a72(0xe2))/0x8)+parseInt(_0x4b2a72(0x104))/0x9;if(_0x34a7c9===_0x339ab8)break;else _0x3fa8f7['push'](_0x3fa8f7['shift']());}catch(_0x463c8d){_0x3fa8f7['push'](_0x3fa8f7['shift']());}}}(a107_0x49ca,0xa1993));function a107_0x128b(_0x53b04a,_0x122813){_0x53b04a=_0x53b04a-0x9e;const _0x49cae0=a107_0x49ca();let _0x128ba9=_0x49cae0[_0x53b04a];return _0x128ba9;}import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x6c5560){const _0xff94d5=a107_0x128b;return _0x6c5560['journeyBundleId']??_0x6c5560[_0xff94d5(0xbb)]?.[_0xff94d5(0x115)]??undefined;}function getVersionNumber(_0x4ab211){const _0x3cbffb=a107_0x128b;return _0x4ab211[_0x3cbffb(0x108)]??_0x4ab211[_0x3cbffb(0xbb)]?.['versionNumber']??0x0;}export function deduplicateJourneysByBundle(_0x394108){const _0x5e1eb6=a107_0x128b,_0x3667f1=new Map();let _0x34fcf4=0x0;for(const _0x2eb3b8 of _0x394108){const _0x524c90=getBundleId(_0x2eb3b8);if(!_0x524c90){const _0x41eb93='no-bundle-'+(_0x2eb3b8['id']??_0x5e1eb6(0xc4)+_0x34fcf4++);_0x3667f1[_0x5e1eb6(0xf5)](_0x41eb93,_0x2eb3b8);continue;}const _0x373602=_0x3667f1[_0x5e1eb6(0xe5)](_0x524c90);if(!_0x373602)_0x3667f1[_0x5e1eb6(0xf5)](_0x524c90,_0x2eb3b8);else{const _0x453cdd=getVersionNumber(_0x373602),_0xcffe07=getVersionNumber(_0x2eb3b8);_0xcffe07>_0x453cdd&&_0x3667f1[_0x5e1eb6(0xf5)](_0x524c90,_0x2eb3b8);}}return Array[_0x5e1eb6(0xcb)](_0x3667f1[_0x5e1eb6(0xc9)]());}const VALID_JOURNEY_STATES=new Set([a107_0x16cded(0xff),a107_0x16cded(0xda),'launched']);export function parseJourneyState(_0x16b43a){const _0x59267f=a107_0x16cded;if(typeof _0x16b43a===_0x59267f(0xae)&&VALID_JOURNEY_STATES[_0x59267f(0xaa)](_0x16b43a))return _0x16b43a;return'draft';}export function entityToJourneyListItem(_0x17a7cc,_0x4f2e2e){const _0x4f84f4=a107_0x16cded,_0x54069f=_0x17a7cc[_0x4f84f4(0xbb)];return{'id':_0x17a7cc['id'],'name':_0x54069f[_0x4f84f4(0xdd)]??'','journeyBundleName':_0x54069f[_0x4f84f4(0xfd)]??_0x54069f[_0x4f84f4(0xdd)]??'','journeyBundleId':_0x54069f[_0x4f84f4(0x115)]??'','versionNumber':_0x54069f[_0x4f84f4(0x108)],'description':_0x54069f[_0x4f84f4(0xe0)]??null,'state':parseJourneyState(_0x54069f[_0x4f84f4(0x114)]),'paused':_0x54069f['paused']??![],'audienceId':_0x4f2e2e,'folderId':_0x54069f[_0x4f84f4(0x10c)]??_0x17a7cc[_0x4f84f4(0xdc)]?.[_0x4f84f4(0xcd)]?.[_0x4f84f4(0x101)]?.['id']??null,'createdAt':_0x54069f[_0x4f84f4(0xba)]??'','updatedAt':_0x54069f[_0x4f84f4(0x127)]??''};}function convertToColumnId(_0x3f2910){const _0x9fb102=a107_0x16cded;return _0x3f2910[_0x9fb102(0xfe)](/-/g,'_');}function getStepEntries(_0x33089d){const _0x55353b=a107_0x16cded;if(!_0x33089d)return[];if(Array[_0x55353b(0x110)](_0x33089d))return _0x33089d[_0x55353b(0xe4)](_0x9b886d=>[_0x9b886d['id'],_0x9b886d]);return Object[_0x55353b(0x10f)](_0x33089d);}export function flattenJourneyActivation(_0x11391c){const _0x52f8e5=a107_0x16cded,{activationParams:_0x2094a6,activationId:_0xf3403c,runAfterJourneyRefresh:_0x54c417}=_0x11391c[_0x52f8e5(0xbb)];return{'id':_0x11391c['id'],'activationId':_0xf3403c,'runAfterJourneyRefresh':_0x54c417,..._0x2094a6};}function col(_0x33fbdf,_0x42efc0={}){const _0x10b0cb=a107_0x16cded;return{'column':_0x33fbdf,'direction':null,'stageIndex':null,'stageName':null,'category':_0x10b0cb(0xad),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x42efc0};}export function generateColumnMapping(_0x3d812a){const _0x380104=a107_0x16cded,_0x589d9d=[];_0x589d9d[_0x380104(0xa6)](col('cdp_customer_id')),_0x589d9d[_0x380104(0xa6)](col(_0x380104(0xf3),{'direction':'in','category':_0x380104(0xb0)})),_0x589d9d[_0x380104(0xa6)](col(_0x380104(0x123),{'direction':_0x380104(0x11c),'category':_0x380104(0xb0)}));_0x3d812a[_0x380104(0xbb)][_0x380104(0xe9)]&&_0x589d9d[_0x380104(0xa6)](col('intime_goal',{'direction':'in','category':_0x380104(0xe9),'detail':_0x3d812a[_0x380104(0xbb)][_0x380104(0xe9)][_0x380104(0xdd)]||null}));const _0x1fa7f9=_0x3d812a[_0x380104(0xbb)][_0x380104(0x120)]||[];for(let _0x51bbf6=0x0;_0x51bbf6<_0x1fa7f9['length'];_0x51bbf6++){const _0x5ea7eb=_0x1fa7f9[_0x51bbf6],_0x2b7e8b=_0x5ea7eb[_0x380104(0xdd)],_0x1209e7={'stageIndex':_0x51bbf6,'stageName':_0x2b7e8b},_0x306324=_0x5ea7eb[_0x380104(0x106)]?.[_0x380104(0xdd)]||null;_0x589d9d['push'](col(_0x380104(0xc6)+_0x51bbf6,{..._0x1209e7,'direction':'in','category':_0x380104(0xd4),'detail':_0x306324})),_0x589d9d[_0x380104(0xa6)](col(_0x380104(0x112)+_0x51bbf6,{..._0x1209e7,'direction':'out','category':_0x380104(0xd4),'detail':_0x306324}));_0x5ea7eb['milestone']&&_0x589d9d['push'](col('intime_stage_'+_0x51bbf6+'_milestone',{..._0x1209e7,'direction':'in','category':'milestone','detail':_0x5ea7eb['milestone'][_0x380104(0xdd)]||null}));const _0x2012ef=_0x5ea7eb[_0x380104(0xcf)]||_0x5ea7eb[_0x380104(0x121)]||[];for(let _0x4ad3c6=0x0;_0x4ad3c6<_0x2012ef['length'];_0x4ad3c6++){_0x589d9d[_0x380104(0xa6)](col(_0x380104(0xc6)+_0x51bbf6+_0x380104(0xf8)+_0x4ad3c6,{..._0x1209e7,'direction':'in','category':_0x380104(0xfb),'detail':_0x2012ef[_0x4ad3c6][_0x380104(0xdd)]||null}));}const _0x3f280c=getStepEntries(_0x5ea7eb[_0x380104(0xf6)]);for(const [_0x2f2d2e,_0x506797]of _0x3f280c){const _0xb7a0e1=convertToColumnId(_0x2f2d2e),_0x38f118=_0x506797[_0x380104(0xee)]||null,_0xed7dde=_0x506797['name']||null,_0xcc37f3={..._0x1209e7,'stepType':_0x38f118,'stepName':_0xed7dde,'stepId':_0x2f2d2e};_0x589d9d['push'](col(_0x380104(0xc6)+_0x51bbf6+'_'+_0xb7a0e1,{..._0xcc37f3,'direction':'in','category':_0x380104(0xf4)})),_0x589d9d[_0x380104(0xa6)](col(_0x380104(0x112)+_0x51bbf6+'_'+_0xb7a0e1,{..._0xcc37f3,'direction':'out','category':_0x380104(0xf4)}));if(_0x506797['type']===_0x380104(0xec)&&_0x506797[_0x380104(0x111)])for(const _0x5d6c46 of _0x506797[_0x380104(0x111)]){_0x5d6c46['segmentId']&&_0x589d9d[_0x380104(0xa6)](col('intime_stage_'+_0x51bbf6+'_'+_0xb7a0e1+'_'+_0x5d6c46[_0x380104(0x117)],{..._0xcc37f3,'direction':'in','category':_0x380104(0x118),'detail':_0x5d6c46[_0x380104(0xdd)]||(_0x5d6c46['excluded']?'Excluded\x20profiles':null)}));}if((_0x506797[_0x380104(0xee)]==='AbTest'||_0x506797['type']==='ABTest')&&_0x506797[_0x380104(0xd8)])for(const _0x4ee9bc of _0x506797[_0x380104(0xd8)]){_0x4ee9bc['id']&&_0x589d9d[_0x380104(0xa6)](col('intime_stage_'+_0x51bbf6+'_'+_0xb7a0e1+_0x380104(0xb7)+convertToColumnId(_0x4ee9bc['id']),{..._0xcc37f3,'direction':'in','category':_0x380104(0xc8),'detail':_0x4ee9bc['name']||null}));}if(_0x506797['type']===_0x380104(0xc3)||_0x506797[_0x380104(0xee)]===_0x380104(0xa3)){const _0x5c778a=[];if(_0x506797[_0x380104(0xa7)])_0x5c778a[_0x380104(0xa6)](_0x506797[_0x380104(0xa7)]);else{if(Array[_0x380104(0x110)](_0x506797[_0x380104(0x10a)]))for(const _0x321342 of _0x506797['conditions']){_0x321342[_0x380104(0x117)]&&!_0x321342[_0x380104(0xf9)]&&_0x5c778a[_0x380104(0xa6)](_0x321342[_0x380104(0x117)]);}else _0x506797[_0x380104(0xb4)]?.[_0x380104(0x117)]&&_0x5c778a['push'](_0x506797[_0x380104(0xb4)][_0x380104(0x117)]);}for(const _0x3f45b0 of _0x5c778a){_0x589d9d[_0x380104(0xa6)](col('intime_stage_'+_0x51bbf6+'_'+_0xb7a0e1+'_'+_0x3f45b0,{..._0xcc37f3,'direction':'in','category':_0x380104(0x118)}));}}}}return _0x589d9d[_0x380104(0xa6)](col('time')),_0x589d9d;}export function aggregateJourneyHistory(_0x24f9b8){const _0x4e47ca=a107_0x16cded,_0x4b9927=_0x24f9b8[_0x4e47ca(0xde)]((_0x7e205a,_0xc064ad)=>_0x7e205a+(_0xc064ad[_0x4e47ca(0x11f)]??0x0),0x0),_0x4de477=_0x24f9b8[_0x4e47ca(0xde)]((_0x1e595a,_0x318bb7)=>_0x1e595a+(_0x318bb7['goalInflux']??0x0),0x0),_0x4b4130=_0x24f9b8[_0x4e47ca(0xde)]((_0x52c71f,_0x4bfbcc)=>_0x52c71f+((_0x4bfbcc[_0x4e47ca(0x105)]??0x0)+(_0x4bfbcc[_0x4e47ca(0xc2)]??0x0)),0x0),_0x52baba=_0x24f9b8[_0x24f9b8[_0x4e47ca(0xca)]-0x1];return{'size':_0x52baba?.[_0x4e47ca(0xd6)]??0x0,'entered':_0x4b9927,'goal_achieved':_0x4de477,'completion_rate':_0x4de477&&_0x4b9927?_0x4de477/_0x4b9927*0x64:0x0,'exit_or_jump':_0x4b4130,'exit_or_jump_rate':_0x4b4130&&_0x4b9927?_0x4b4130/_0x4b9927*0x64:0x0};}export function aggregateStageHistory(_0x5a6f8e){const _0x459fe5=a107_0x16cded,_0x550ef0=_0x5a6f8e['reduce']((_0x213067,_0x416eb8)=>_0x213067+(_0x416eb8[_0x459fe5(0x11f)]??0x0),0x0),_0x4d5363=_0x5a6f8e[_0x459fe5(0xde)]((_0x4b367b,_0x544b9b)=>_0x4b367b+(_0x544b9b[_0x459fe5(0x11d)]??0x0),0x0),_0x143ecd=_0x5a6f8e[_0x459fe5(0xde)]((_0x3c956e,_0x132aa5)=>_0x3c956e+((_0x132aa5[_0x459fe5(0x105)]??0x0)+(_0x132aa5['jumpInflux']??0x0)),0x0),_0x339197=_0x5a6f8e[_0x5a6f8e[_0x459fe5(0xca)]-0x1];return{'size':_0x339197?.[_0x459fe5(0xd6)]??0x0,'entered':_0x550ef0,'milestone':_0x4d5363,'milestone_rate':_0x4d5363&&_0x550ef0?_0x4d5363/_0x550ef0*0x64:0x0,'exit_or_jump':_0x143ecd,'exit_or_jump_rate':_0x143ecd&&_0x550ef0?_0x143ecd/_0x550ef0*0x64:0x0};}export function assembleJourneyStats(_0x446fd0,_0x5b9218){const _0x491438=a107_0x16cded,_0x58ad4e=!!(_0x5b9218?.['from']||_0x5b9218?.['to'])&&!!_0x446fd0[_0x491438(0xed)]?.[_0x491438(0xca)];if(_0x58ad4e){const _0x8517ce=aggregateJourneyHistory(_0x446fd0['history']),_0xa0c914={'journey_id':_0x446fd0[_0x491438(0x10d)],..._0x5b9218?.[_0x491438(0xcb)]&&{'from':_0x5b9218['from']},..._0x5b9218?.['to']&&{'to':_0x5b9218['to']},..._0x8517ce};return _0x5b9218?.[_0x491438(0x128)]&&(_0xa0c914[_0x491438(0xed)]=_0x446fd0[_0x491438(0xed)]),_0xa0c914;}return{'journey_id':_0x446fd0[_0x491438(0x10d)],'size':_0x446fd0['size'],'entered':_0x446fd0[_0x491438(0xd9)],'goal_achieved':_0x446fd0[_0x491438(0xfc)],'completion_rate':_0x446fd0[_0x491438(0xe6)],'exit_or_jump':_0x446fd0[_0x491438(0xbc)],'exit_or_jump_rate':_0x446fd0[_0x491438(0xaf)]};}export function formatVersionsFromBundle(_0x23a25a){const _0xa26674=a107_0x16cded,_0x38f2fd=_0x23a25a[_0xa26674(0xbf)][_0xa26674(0xe4)](_0x49583c=>({'journeyId':_0x49583c['id'],'versionNumber':_0x49583c[_0xa26674(0xbb)][_0xa26674(0x108)]??0x0,'name':_0x49583c['attributes']['name'],'state':_0x49583c[_0xa26674(0xbb)][_0xa26674(0x114)],'paused':_0x49583c[_0xa26674(0xbb)]['paused'],'createdAt':_0x49583c[_0xa26674(0xbb)]['createdAt'],'updatedAt':_0x49583c[_0xa26674(0xbb)][_0xa26674(0x127)]}));return _0x38f2fd[_0xa26674(0xa2)]((_0xa3ab04,_0x41614c)=>_0xa3ab04[_0xa26674(0x108)]-_0x41614c[_0xa26674(0x108)]),_0x38f2fd;}export function synthesizePreBundleVersion(_0x2e1ba8){const _0x378f18=a107_0x16cded;return{'journeyId':_0x2e1ba8['id'],'versionNumber':0x1,'name':_0x2e1ba8[_0x378f18(0xbb)][_0x378f18(0xdd)],'state':_0x2e1ba8[_0x378f18(0xbb)]['state'],'paused':_0x2e1ba8['attributes'][_0x378f18(0xf2)],'createdAt':_0x2e1ba8[_0x378f18(0xbb)][_0x378f18(0xba)],'updatedAt':_0x2e1ba8[_0x378f18(0xbb)]['updatedAt']};}export function buildStageNameMap(_0x4a77c8){const _0x705b17=a107_0x16cded;return new Map(_0x4a77c8[_0x705b17(0xbb)][_0x705b17(0x120)]?.[_0x705b17(0xe4)](_0x35095f=>[_0x35095f['id'],_0x35095f[_0x705b17(0xdd)]])??[]);}function a107_0x49ca(){const _0x20da2c=['idx-','27498KhEamb','intime_stage_','createJourneyVersion','variant','values','length','from','pause','parentFolder','folder-segment','exitCriterias','listVersions','getJourneyBundle','listActivationsFlat','Journey\x20not\x20found:\x20','stage','1187307IFuBvN','size','getColumnMapping','variants','enteredSize','simulation','toLowerCase','relationships','name','reduce','cdp_audience_','description','\x20in\x20journey\x20','2154848dGHfuT','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','map','get','completionRate','add','fetchTrafficRaw','goal','filter','getBundle','DecisionPoint','history','type','listJourneysWithDetails','journey_','flat','paused','intime_journey','step','set','steps','listSegmentFolders','_exit_','timedOutPath','limit','exit_criteria','goalSize','journeyBundleName','replace','draft','332264EMUGOf','data','listJourneysWithDetailsFromParentSegment','resolveJourneyId','21082374IzFfnY','exitInflux','entryCriteria','listEntitiesByFolder','versionNumber','getActivation','conditions','resumeJourney','segmentFolderId','journeyId','300jEgYYP','entries','isArray','branches','outtime_stage_','client','state','journeyBundleId','includeAllVersions','segmentId','branch','updateJourney','listActivations','NOT_FOUND','out','milestoneInflux','createJourney','entryInflux','journeyStages','exitCriteria','listJourneysWithFolders','outtime_journey','JOURNEY_NOT_FOUND','getJourneyActivation','getActivationSankeyChart','updatedAt','includeHistory','activationStepsById','all','7iFCThc','listJourneys','sort','Wait','checkJourneyAppendable','getJourneyStatistics','push','conditionSegmentId','listJourneysFromParentSegment','journeyStageId','has','3191695KGEciV','getJourney','fixed','string','exitOrJumpRate','journey','update','getParentSegmentFull','lastVersionNumber','waitCondition','activation','applyVersionDeduplication','_variant_','conversion','getConversionSankeyChart','createdAt','attributes','exitOrJumpSize','find','52038sOEsir','journeys','getTrafficData','createActivation','jumpInflux','WaitStep'];a107_0x49ca=function(){return _0x20da2c;};return a107_0x49ca();}export class JourneySDK{['client'];constructor(_0x17a4c2){const _0x7cb87f=a107_0x16cded;this[_0x7cb87f(0x113)]=new CDPApiClient(_0x17a4c2);}['applyVersionDeduplication'](_0x2c9485,_0x288679){return _0x288679?_0x2c9485:deduplicateJourneysByBundle(_0x2c9485);}async['listJourneysWithDetails'](_0x3ead97,_0x25ad73){const _0x2f800d=a107_0x16cded;try{const _0x2d185f=await this[_0x2f800d(0x113)]['listJourneysWithDetails'](_0x3ead97);return{'journeys':this[_0x2f800d(0xb6)](_0x2d185f[_0x2f800d(0xbf)],_0x25ad73),'activationStepsById':_0x2d185f[_0x2f800d(0x9e)]};}catch(_0xb5d2e8){if(isHttp404Error(_0xb5d2e8))return{'journeys':[],'activationStepsById':new Map()};throw _0xb5d2e8;}}async[a107_0x16cded(0xa8)](_0x473a7d,_0x278351,_0x4a989f){const _0x164bab=a107_0x16cded;let _0x236984=_0x278351;if(!_0x236984)try{const _0x3bd51d=await this[_0x164bab(0x113)][_0x164bab(0xb2)](_0x473a7d);_0x236984=_0x3bd51d['rootFolderId']??undefined;}catch(_0xb3637d){if(isHttp404Error(_0xb3637d))return[];throw _0xb3637d;}if(!_0x236984)return[];let _0x3a1e9b;if(_0x4a989f?.[_0x164bab(0x116)]){const _0x533c76=await this[_0x164bab(0x113)][_0x164bab(0xf7)](_0x473a7d),_0x37f353=_0x533c76['map'](_0x1c3e4a=>this[_0x164bab(0x113)][_0x164bab(0xa1)](_0x1c3e4a['id'])),_0x44ce3c=await Promise[_0x164bab(0x9f)](_0x37f353),_0x1898b1=new Set();_0x3a1e9b=_0x44ce3c[_0x164bab(0xf1)]()[_0x164bab(0xea)](_0x5c30b5=>{const _0xb172e1=_0x164bab;if(_0x1898b1[_0xb172e1(0xaa)](_0x5c30b5['id']))return![];return _0x1898b1[_0xb172e1(0xe7)](_0x5c30b5['id']),!![];});}else{const _0x4bc1ea=await this[_0x164bab(0x113)][_0x164bab(0x107)](_0x236984,0x20,![]),_0x4af941=_0x4bc1ea[_0x164bab(0x101)],_0x2b8a76=_0x4af941[_0x164bab(0xea)](_0x5072f2=>_0x5072f2[_0x164bab(0xee)]===_0x164bab(0xb0));_0x3a1e9b=_0x2b8a76[_0x164bab(0xe4)](_0x5b1c91=>entityToJourneyListItem(_0x5b1c91,_0x473a7d));}return this[_0x164bab(0xb6)](_0x3a1e9b,_0x4a989f?.[_0x164bab(0x116)]);}async[a107_0x16cded(0x122)](_0x4c01de,_0x2f21f9,_0x3d973e){const _0x2f82f9=a107_0x16cded;if(!_0x2f21f9)return{'journeys':[],'folders':[]};const _0x4a01ef=await this[_0x2f82f9(0x113)][_0x2f82f9(0x107)](_0x2f21f9,0x20,![]),_0x23a114=_0x4a01ef[_0x2f82f9(0x101)],_0x244dc9=_0x23a114[_0x2f82f9(0xea)](_0x44ae0a=>_0x44ae0a[_0x2f82f9(0xee)]===_0x2f82f9(0xce)&&_0x44ae0a['id']!==_0x2f21f9),_0x30028d=_0x244dc9[_0x2f82f9(0xe4)](_0x189625=>({'id':_0x189625['id'],'name':_0x189625[_0x2f82f9(0xbb)][_0x2f82f9(0xdd)]})),_0x35e9bf=_0x23a114['filter'](_0x2a3bc4=>_0x2a3bc4[_0x2f82f9(0xee)]===_0x2f82f9(0xb0)),_0xa9ca31=_0x35e9bf[_0x2f82f9(0xe4)](_0x4513cf=>entityToJourneyListItem(_0x4513cf,_0x4c01de));return{'journeys':this[_0x2f82f9(0xb6)](_0xa9ca31,_0x3d973e?.[_0x2f82f9(0x116)]),'folders':_0x30028d};}async[a107_0x16cded(0x102)](_0x5d63ec,_0x966bf4){const _0x21f8f7=a107_0x16cded;let _0x25e76a;try{_0x25e76a=await this[_0x21f8f7(0x113)][_0x21f8f7(0xf7)](_0x5d63ec);}catch(_0x10af2b){if(isHttp404Error(_0x10af2b))return{'journeys':[],'activationStepsById':new Map()};throw _0x10af2b;}const _0x515c11=_0x25e76a[_0x21f8f7(0xe4)](async _0x3f638e=>{const _0x3f11aa=_0x21f8f7;return await this[_0x3f11aa(0xef)](_0x3f638e['id'],_0x966bf4?.[_0x3f11aa(0x116)]);}),_0x81b30c=await Promise['all'](_0x515c11),_0x37b490=new Map(),_0x4c7760=[];for(const _0x1e92ed of _0x81b30c){_0x4c7760[_0x21f8f7(0xa6)](..._0x1e92ed[_0x21f8f7(0xbf)]);for(const [_0x1e50f7,_0x24d12e]of _0x1e92ed[_0x21f8f7(0x9e)]){_0x37b490['set'](_0x1e50f7,_0x24d12e);}}const _0x2ea06e=new Set(),_0x62e88f=_0x4c7760[_0x21f8f7(0xea)](_0xa6ff4e=>{const _0x3ad970=_0x21f8f7;if(_0x2ea06e[_0x3ad970(0xaa)](_0xa6ff4e['id']))return![];return _0x2ea06e[_0x3ad970(0xe7)](_0xa6ff4e['id']),!![];});return{'journeys':this[_0x21f8f7(0xb6)](_0x62e88f,_0x966bf4?.[_0x21f8f7(0x116)]),'activationStepsById':_0x37b490};}async['getJourney'](_0x3ea20c){const _0x1d8f28=a107_0x16cded;try{return await this[_0x1d8f28(0x113)][_0x1d8f28(0xac)](_0x3ea20c);}catch(_0x4bdc22){if(isHttp404Error(_0x4bdc22))throw new SDKError(ErrorCode[_0x1d8f28(0x124)],_0x1d8f28(0xd3)+_0x3ea20c,_0x4bdc22);throw _0x4bdc22;}}async[a107_0x16cded(0x103)](_0x48e457,_0x21c3a8){const _0x206ce7=a107_0x16cded,_0x112305=await this['listJourneysFromParentSegment'](_0x48e457),_0x5e32a9=_0x112305[_0x206ce7(0xbd)](_0x368513=>_0x368513[_0x206ce7(0xfd)][_0x206ce7(0xdb)]()===_0x21c3a8[_0x206ce7(0xdb)]());if(!_0x5e32a9)throw new SDKError(ErrorCode[_0x206ce7(0x124)],_0x206ce7(0xd3)+_0x21c3a8,undefined,{'helpText':_0x206ce7(0xe3)});return _0x5e32a9['id'];}async['getStatistics'](_0x5d226a,_0x470873){const _0x40c124=a107_0x16cded;try{return await this[_0x40c124(0x113)][_0x40c124(0xa5)](_0x5d226a,_0x470873);}catch(_0x5d5c0c){if(isHttp404Error(_0x5d5c0c))throw new SDKError(ErrorCode[_0x40c124(0x124)],_0x40c124(0xd3)+_0x5d226a,_0x5d5c0c);throw _0x5d5c0c;}}async[a107_0x16cded(0xc0)](_0x102081,_0x584d00){const _0x341d9f=a107_0x16cded,_0x320a81={'from':_0x584d00?.[_0x341d9f(0xcb)],'to':_0x584d00?.['to'],'limit':_0x584d00?.[_0x341d9f(0xfa)]},_0x590577=_0x584d00?.['type']!=='conversion';try{const [_0x1268e6,_0x5e2742]=await Promise[_0x341d9f(0x9f)]([this[_0x341d9f(0xe8)](_0x102081,_0x584d00?.[_0x341d9f(0xee)],_0x320a81),_0x590577?this[_0x341d9f(0xac)](_0x102081):undefined]);if(_0x1268e6[_0x341d9f(0xb5)]&&_0x5e2742){const _0x3d67f8=buildStageNameMap(_0x5e2742);_0x1268e6[_0x341d9f(0xb5)]=_0x1268e6[_0x341d9f(0xb5)][_0x341d9f(0xe4)](_0x2159ff=>({..._0x2159ff,'journeyStageName':_0x3d67f8[_0x341d9f(0xe5)](_0x2159ff[_0x341d9f(0xa9)])??_0x2159ff['journeyStageId']}));}return _0x1268e6;}catch(_0x1812bb){if(isHttp404Error(_0x1812bb))throw new SDKError(ErrorCode[_0x341d9f(0x124)],_0x341d9f(0xd3)+_0x102081,_0x1812bb);throw _0x1812bb;}}async[a107_0x16cded(0xe8)](_0x12a09a,_0x4b3a3f,_0x27e642){const _0x4d4e8e=a107_0x16cded;if(_0x4b3a3f===_0x4d4e8e(0xb8)){const _0x22fce8=await this['client']['getConversionSankeyChart'](_0x12a09a,_0x27e642);return{'conversion':_0x22fce8};}if(_0x4b3a3f===_0x4d4e8e(0xb5)){const _0x5a0f11=await this[_0x4d4e8e(0x113)][_0x4d4e8e(0x126)](_0x12a09a,_0x27e642);return{'activation':_0x5a0f11};}const [_0x16f547,_0x337d46]=await Promise['all']([this[_0x4d4e8e(0x113)][_0x4d4e8e(0xb9)](_0x12a09a,_0x27e642),this[_0x4d4e8e(0x113)][_0x4d4e8e(0x126)](_0x12a09a,_0x27e642)]);return{'conversion':_0x16f547,'activation':_0x337d46};}async[a107_0x16cded(0xcc)](_0x9b5b31){const _0x7a4ea7=a107_0x16cded;try{return await this[_0x7a4ea7(0x113)]['pauseJourney'](_0x9b5b31);}catch(_0x5ce9ff){if(isHttp404Error(_0x5ce9ff))throw new SDKError(ErrorCode[_0x7a4ea7(0x124)],'Journey\x20not\x20found:\x20'+_0x9b5b31,_0x5ce9ff);throw _0x5ce9ff;}}async['resume'](_0x4434b4){const _0x23c008=a107_0x16cded;try{return await this[_0x23c008(0x113)][_0x23c008(0x10b)](_0x4434b4);}catch(_0x4ca263){if(isHttp404Error(_0x4ca263))throw new SDKError(ErrorCode[_0x23c008(0x124)],_0x23c008(0xd3)+_0x4434b4,_0x4ca263);throw _0x4ca263;}}async['create'](_0x2046c9){const _0x19ddcf=a107_0x16cded;return await this[_0x19ddcf(0x113)][_0x19ddcf(0x11e)](_0x2046c9);}async[a107_0x16cded(0xb1)](_0x182d98,_0x3293a8){const _0x4a82b8=a107_0x16cded;try{return await this['client'][_0x4a82b8(0x119)](_0x182d98,_0x3293a8);}catch(_0x110303){if(isHttp404Error(_0x110303))throw new SDKError(ErrorCode[_0x4a82b8(0x124)],_0x4a82b8(0xd3)+_0x182d98,_0x110303);throw _0x110303;}}async[a107_0x16cded(0x109)](_0x2783e8,_0x292d99){const _0x4c7928=a107_0x16cded;try{return await this[_0x4c7928(0x113)][_0x4c7928(0x125)](_0x2783e8,_0x292d99);}catch(_0x39d1a3){if(isHttp404Error(_0x39d1a3))throw new SDKError(ErrorCode[_0x4c7928(0x11b)],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x292d99+_0x4c7928(0xe1)+_0x2783e8,_0x39d1a3);throw _0x39d1a3;}}async[a107_0x16cded(0x11a)](_0x186d29){const _0x6f5ac2=a107_0x16cded;try{return await this[_0x6f5ac2(0x113)]['listJourneyActivations'](_0x186d29);}catch(_0x4c92cf){if(isHttp404Error(_0x4c92cf))return[];throw _0x4c92cf;}}async[a107_0x16cded(0xd2)](_0xa8c684){const _0x456fb0=a107_0x16cded,_0x2f8539=await this[_0x456fb0(0x11a)](_0xa8c684);return _0x2f8539['map'](flattenJourneyActivation);}async[a107_0x16cded(0xc1)](_0x1e5c00,_0x50e35f){const _0x51abfd=a107_0x16cded;return await this[_0x51abfd(0x113)]['createJourneyActivation'](_0x1e5c00,_0x50e35f);}async[a107_0x16cded(0xd7)](_0x40d8cc){const _0x326776=a107_0x16cded,_0x1a90bd=await this[_0x326776(0xac)](_0x40d8cc),_0x33664c=generateColumnMapping(_0x1a90bd);return{'journeyId':_0x1a90bd['id'],'journeyName':_0x1a90bd['attributes']['name'],'database':_0x326776(0xdf)+_0x1a90bd['attributes']['audienceId'],'table':_0x326776(0xf0)+_0x1a90bd['id'],'columns':_0x33664c};}async[a107_0x16cded(0xeb)](_0x189f32){const _0x5026a3=a107_0x16cded;return this[_0x5026a3(0x113)][_0x5026a3(0xd1)](_0x189f32);}async[a107_0x16cded(0xd0)](_0x112d88){const _0x210fd6=a107_0x16cded,_0x331280=await this[_0x210fd6(0xac)](_0x112d88),_0x563fe2=_0x331280[_0x210fd6(0xbb)][_0x210fd6(0x115)];if(!_0x563fe2)return{'bundleId':'','bundleName':_0x331280[_0x210fd6(0xbb)][_0x210fd6(0xdd)],'bundleDescription':_0x331280['attributes']['description']??null,'latestJourneyId':_0x331280['id'],'versions':[synthesizePreBundleVersion(_0x331280)]};const _0x1e5e58=await this[_0x210fd6(0xeb)](_0x563fe2);return{'bundleId':_0x563fe2,'bundleName':_0x1e5e58[_0x210fd6(0xdd)],'bundleDescription':_0x1e5e58[_0x210fd6(0xe0)]??null,'latestJourneyId':_0x1e5e58['latestJourneyId'],'versions':formatVersionsFromBundle(_0x1e5e58)};}async['createVersion'](_0x5e6ddb){const _0x6ec874=a107_0x16cded,_0x21030e=await this[_0x6ec874(0xac)](_0x5e6ddb),_0x7c3d01=_0x21030e[_0x6ec874(0xbb)][_0x6ec874(0x115)];if(!_0x7c3d01)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x6ec874(0x113)][_0x6ec874(0xa4)](_0x7c3d01);const _0x1a72df=await this[_0x6ec874(0x113)][_0x6ec874(0xd1)](_0x7c3d01),_0x1ac6f4=_0x1a72df[_0x6ec874(0xdd)]+'\x20v'+(_0x1a72df[_0x6ec874(0xb3)]+0x1);return this[_0x6ec874(0x113)][_0x6ec874(0xc7)](_0x7c3d01,{'sourceId':_0x5e6ddb,'attributes':{'name':_0x1ac6f4}});}}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a108_0x55cfc2=a108_0x37ea;(function(_0x58df1f,_0x46fd53){const _0x5cbda3=a108_0x37ea,_0x5e3cf4=_0x58df1f();while(!![]){try{const _0x3c57ea=parseInt(_0x5cbda3(0xcf))/0x1+parseInt(_0x5cbda3(0xd2))/0x2+-parseInt(_0x5cbda3(0xd1))/0x3+parseInt(_0x5cbda3(0xd5))/0x4+-parseInt(_0x5cbda3(0xd6))/0x5*(parseInt(_0x5cbda3(0xd0))/0x6)+parseInt(_0x5cbda3(0xd8))/0x7+-parseInt(_0x5cbda3(0xd9))/0x8*(-parseInt(_0x5cbda3(0xd3))/0x9);if(_0x3c57ea===_0x46fd53)break;else _0x5e3cf4['push'](_0x5e3cf4['shift']());}catch(_0x5521af){_0x5e3cf4['push'](_0x5e3cf4['shift']());}}}(a108_0x3bbd,0x5144b));function a108_0x3bbd(){const _0x441b85=['last_chat_id','101265SrIlEs','12YNHVft','1109568NDchXY','65488xEckkM','18MJPqyq','clear','395480OGcAPh','569215bCECLe','read','4531296eGWKNs','200840ANFyMM','llm/chat','write'];a108_0x3bbd=function(){return _0x441b85;};return a108_0x3bbd();}function a108_0x37ea(_0x4643b2,_0x3fbb67){_0x4643b2=_0x4643b2-0xcf;const _0x3bbdc6=a108_0x3bbd();let _0x37eafa=_0x3bbdc6[_0x4643b2];return _0x37eafa;}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a108_0x55cfc2(0xdc),a108_0x55cfc2(0xda));export function saveLastChatId(_0x1dc5c0){const _0x34c11a=a108_0x55cfc2;chatIdCache[_0x34c11a(0xdb)](_0x1dc5c0);}export function loadLastChatId(){const _0x4e4921=a108_0x55cfc2;return chatIdCache[_0x4e4921(0xd7)]();}export function clearLastChatId(){const _0x7b590c=a108_0x55cfc2;chatIdCache[_0x7b590c(0xd4)]();}
|